From d010c81b132d2d40e6f72adb49bcfe5a4d1ac353 Mon Sep 17 00:00:00 2001 From: Olaf Date: Mon, 8 May 2017 11:45:01 +0200 Subject: List packages for vcpkg install --- toolsrc/src/commands_update.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index e39c7dd35..f87ccfb06 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -56,15 +56,18 @@ namespace vcpkg::Commands::Update } else { + std::string install_line; System::println("The following packages differ from their port versions:"); for (auto&& package : outdated_packages) { + install_line += package.spec.to_string(); + install_line += " "; System::println(" %-32s %s", package.spec, package.version_diff.to_string()); } System::println("\n" "To update these packages, run\n" " .\\vcpkg remove --outdated\n" - " .\\vcpkg install ..."); + " .\\vcpkg install " + install_line); } auto version_file = paths.get_filesystem().read_contents(paths.root / "toolsrc" / "VERSION.txt"); -- cgit v1.2.3 From 727be4b538a7433f4c321cdd6a38a6f72b465f51 Mon Sep 17 00:00:00 2001 From: Arkadiy Shapkin Date: Wed, 10 May 2017 03:07:04 +0300 Subject: [jemalloc] Initial commit for jemalloc library --- ports/jemalloc/CONTROL | 4 +++ ports/jemalloc/fix-cmakelists.patch | 36 +++++++++++++++++++++++ ports/jemalloc/fix-utilities.patch | 30 +++++++++++++++++++ ports/jemalloc/portfile.cmake | 58 +++++++++++++++++++++++++++++++++++++ 4 files changed, 128 insertions(+) create mode 100644 ports/jemalloc/CONTROL create mode 100644 ports/jemalloc/fix-cmakelists.patch create mode 100644 ports/jemalloc/fix-utilities.patch create mode 100644 ports/jemalloc/portfile.cmake diff --git a/ports/jemalloc/CONTROL b/ports/jemalloc/CONTROL new file mode 100644 index 000000000..e3c808657 --- /dev/null +++ b/ports/jemalloc/CONTROL @@ -0,0 +1,4 @@ +Source: jemalloc +Version: 4.3.1 +Description: jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support +Build-Depends: diff --git a/ports/jemalloc/fix-cmakelists.patch b/ports/jemalloc/fix-cmakelists.patch new file mode 100644 index 000000000..0094a15f5 --- /dev/null +++ b/ports/jemalloc/fix-cmakelists.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 06e83ef..17526b0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -57,6 +57,7 @@ option(enable-lazy-lock "Enable lazy locking (only lock when multi-threaded" OFF + option(force_lazy_lock "Forcing lazy-lock to avoid allocator/threading bootstrap issues" OFF) + # install_prefix - installation directory prefix + # with-xslroot= XSL stylesheet root path ++option(build-tests "Build tests" OFF) + + set (PACKAGE_NAME "jemalloc") + project (${PACKAGE_NAME} C) +@@ -825,6 +826,17 @@ if(C_UTIL_INTEGRATION_DEFS) + "${C_UTIL_INTEGRATION_DEFS}") + endif() + ++install(FILES include/jemalloc/jemalloc${install_suffix}.h ++ DESTINATION include/jemalloc) ++ ++install(TARGETS ${LIBJEMALLOCSO} ++ EXPORT JemallocTargets ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++install(EXPORT JemallocTargets NAMESPACE jemalloc:: DESTINATION share/jemalloc) ++ ++if (build-tests) + ################################################################## + # Common source for Unit, Integration and stress test libraries + set(C_TESTLIB_SRCS +@@ -1028,4 +1040,4 @@ foreach(sourcefile ${TESTS_INTEGRATION}) + add_test(NAME ${exename} COMMAND ${exename}) + add_dependencies(check ${exename}) + endforeach(sourcefile ${TESTS_UNIT}) +- ++endif() diff --git a/ports/jemalloc/fix-utilities.patch b/ports/jemalloc/fix-utilities.patch new file mode 100644 index 000000000..32c39e0b3 --- /dev/null +++ b/ports/jemalloc/fix-utilities.patch @@ -0,0 +1,30 @@ +diff --git a/Utilities.cmake b/Utilities.cmake +index 562e948..d2d3530 100644 +--- a/Utilities.cmake ++++ b/Utilities.cmake +@@ -633,9 +633,11 @@ file(TO_NATIVE_PATH "${file_path}" ntv_file_path) + # This converts #undefs into #cmakedefines so configure_file can handle it + set(PS_CMD + "Get-Content \"${ntv_file_path}\" | +-ForEach { ++ForEach { + if($_ -match '^#undef[ \t]*[^ \t]*') +- { $_ -replace '^#undef[ \t]*([^ \t]*)','#cmakedefine $1 @$1@' } else {$_}}" ++ { $_ -replace '^#undef[ \t]*([^ \t]*)','#cmakedefine $1 @$1@' } else {$_} ++} | ++Set-Content \"${ntv_file_path}.cmake\"" + ) + + if(EXISTS ${file_path}) +@@ -646,9 +648,8 @@ if(EXISTS ${file_path}) + # Convert autoconf .in into a cmake .in + execute_process(COMMAND powershell -Command "${PS_CMD}" + RESULT_VARIABLE error_level +- ERROR_VARIABLE error_output +- OUTPUT_FILE ${file_path}.cmake) +- ++ ERROR_VARIABLE error_output) ++ + if(NOT ${error_level} EQUAL 0) + message(FATAL_ERROR "Powershell completed with ${error_level} : ${error_output}") + endif() diff --git a/ports/jemalloc/portfile.cmake b/ports/jemalloc/portfile.cmake new file mode 100644 index 000000000..22aa76f08 --- /dev/null +++ b/ports/jemalloc/portfile.cmake @@ -0,0 +1,58 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building not supported yet. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +include(vcpkg_common_functions) + +set(GIT_URL "https://github.com/jemalloc/jemalloc-cmake.git") +set(GIT_REF "jemalloc-cmake.4.3.1") + +if(NOT EXISTS "${DOWNLOADS}/jemalloc-cmake.git") + message(STATUS "Cloning") + vcpkg_execute_required_process( + COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/jemalloc-cmake.git + WORKING_DIRECTORY ${DOWNLOADS} + LOGNAME clone + ) +endif() + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) + +if(NOT EXISTS "${SOURCE_PATH}/.git") + message(STATUS "Adding worktree") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + vcpkg_execute_required_process( + COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${GIT_REF} + WORKING_DIRECTORY ${DOWNLOADS}/jemalloc-cmake.git + LOGNAME worktree + ) + message(STATUS "Patching") + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch" + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-utilities.patch" + ) +endif() + +# jemalloc uses git to get it version +find_program(GIT NAMES git git.cmd) +get_filename_component(GIT_EXE_PATH ${GIT} DIRECTORY) +set(ENV{PATH} "${GIT_EXE_PATH};$ENV{PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/jemalloc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/jemalloc/COPYING ${CURRENT_PACKAGES_DIR}/share/jemalloc/copyright) -- cgit v1.2.3 From c0be6aecc6c817e556e6bfd1251842615023644e Mon Sep 17 00:00:00 2001 From: Jon Erickson Date: Tue, 16 May 2017 21:10:00 -0400 Subject: Added '--full-desc' option to search and list commands to shows full description for packages. --- toolsrc/src/commands_list.cpp | 28 ++++++++++++++++++++-------- toolsrc/src/commands_search.cpp | 28 ++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/toolsrc/src/commands_list.cpp b/toolsrc/src/commands_list.cpp index 6451ac5eb..521fc5a9a 100644 --- a/toolsrc/src/commands_list.cpp +++ b/toolsrc/src/commands_list.cpp @@ -7,12 +7,24 @@ namespace vcpkg::Commands::List { - static void do_print(const StatusParagraph& pgh) + static const std::string OPTION_FULLDESC = "--full-desc"; // TODO: This should find a better home, eventually + + static void do_print(const StatusParagraph& pgh, bool FullDesc) { - System::println("%-27s %-16s %s", - pgh.package.displayname(), - pgh.package.version, - details::shorten_description(pgh.package.description)); + if (FullDesc) + { + System::println("%-27s %-16s %s", + pgh.package.displayname(), + pgh.package.version, + pgh.package.description); + } + else + { + System::println("%-27s %-16s %s", + pgh.package.displayname(), + pgh.package.version, + details::shorten_description(pgh.package.description)); + } } void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) @@ -21,7 +33,7 @@ namespace vcpkg::Commands::List "The argument should be a substring to search for, or no argument to display all installed libraries.\n%s", Commands::Help::create_example_string("list png")); args.check_max_arg_count(1, example); - args.check_and_get_optional_command_arguments({}); + const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_FULLDESC}); const StatusParagraphs status_paragraphs = database_load_check(paths); std::vector installed_packages = get_installed_ports(status_paragraphs); @@ -42,7 +54,7 @@ namespace vcpkg::Commands::List { for (const StatusParagraph* status_paragraph : installed_packages) { - do_print(*status_paragraph); + do_print(*status_paragraph, options.find(OPTION_FULLDESC) != options.cend()); } } else @@ -56,7 +68,7 @@ namespace vcpkg::Commands::List continue; } - do_print(*status_paragraph); + do_print(*status_paragraph, options.find(OPTION_FULLDESC) != options.cend()); } } diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index 0ba7305e9..6ec2a5395 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -9,6 +9,8 @@ namespace vcpkg::Commands::Search { static const std::string OPTION_GRAPH = "--graph"; // TODO: This should find a better home, eventually + static const std::string OPTION_FULLDESC = "--full-desc"; // TODO: This should find a better home, eventually + static std::string replace_dashes_with_underscore(const std::string& input) { @@ -45,12 +47,22 @@ namespace vcpkg::Commands::Search return s; } - static void do_print(const SourceParagraph& source_paragraph) + static void do_print(const SourceParagraph& source_paragraph, bool FullDesc) { - System::println("%-20s %-16s %s", - source_paragraph.name, - source_paragraph.version, - details::shorten_description(source_paragraph.description)); + if (FullDesc) + { + System::println("%-20s %-16s %s", + source_paragraph.name, + source_paragraph.version, + source_paragraph.description); + } + else + { + System::println("%-20s %-16s %s", + source_paragraph.name, + source_paragraph.version, + details::shorten_description(source_paragraph.description)); + } } void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) @@ -59,7 +71,7 @@ namespace vcpkg::Commands::Search "The argument should be a substring to search for, or no argument to display all libraries.\n%s", Commands::Help::create_example_string("search png")); args.check_max_arg_count(1, example); - const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_GRAPH}); + const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}); const std::vector source_paragraphs = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); @@ -74,7 +86,7 @@ namespace vcpkg::Commands::Search { for (const SourceParagraph& source_paragraph : source_paragraphs) { - do_print(source_paragraph); + do_print(source_paragraph, options.find(OPTION_FULLDESC) != options.cend()); } } else @@ -88,7 +100,7 @@ namespace vcpkg::Commands::Search continue; } - do_print(source_paragraph); + do_print(source_paragraph, options.find(OPTION_FULLDESC) != options.cend()); } } -- cgit v1.2.3 From aea0653a8bb1fc27401e711ad01b7d5e86b02e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Fri, 19 May 2017 23:31:04 +0200 Subject: Add port for Python 3 --- ports/python3/0001-Static-library.patch | 46 +++++++++++++ ports/python3/0002-Static-CRT.patch | 17 +++++ .../0003-Fix-header-for-static-linkage.patch | 14 ++++ ports/python3/CONTROL | 3 + ports/python3/portfile.cmake | 78 ++++++++++++++++++++++ 5 files changed, 158 insertions(+) create mode 100644 ports/python3/0001-Static-library.patch create mode 100644 ports/python3/0002-Static-CRT.patch create mode 100644 ports/python3/0003-Fix-header-for-static-linkage.patch create mode 100644 ports/python3/CONTROL create mode 100644 ports/python3/portfile.cmake diff --git a/ports/python3/0001-Static-library.patch b/ports/python3/0001-Static-library.patch new file mode 100644 index 000000000..4bc10af41 --- /dev/null +++ b/ports/python3/0001-Static-library.patch @@ -0,0 +1,46 @@ +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 6ea1848..4134d7b 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -1,4 +1,4 @@ +- ++ + + + +@@ -41,7 +41,7 @@ + + + +- DynamicLibrary ++ StaticLibrary + false + + +@@ -66,12 +66,24 @@ + + /Zm200 %(AdditionalOptions) + $(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories) +- _USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) ++ _USRDLL;Py_BUILD_CORE;Py_NO_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) + + + version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies) + 0x1e000000 + ++ ++ MachineX86 ++ ++ ++ MachineX86 ++ ++ ++ MachineX86 ++ ++ ++ MachineX86 ++ + + + +-- diff --git a/ports/python3/0002-Static-CRT.patch b/ports/python3/0002-Static-CRT.patch new file mode 100644 index 000000000..267d03d75 --- /dev/null +++ b/ports/python3/0002-Static-CRT.patch @@ -0,0 +1,17 @@ +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 4134d7b..ecbccf0 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -67,6 +67,10 @@ + /Zm200 %(AdditionalOptions) + $(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories) + _USRDLL;Py_BUILD_CORE;Py_NO_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) ++ MultiThreadedDebug ++ MultiThreadedDebug ++ MultiThreaded ++ MultiThreaded + + + version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies) +-- + diff --git a/ports/python3/0003-Fix-header-for-static-linkage.patch b/ports/python3/0003-Fix-header-for-static-linkage.patch new file mode 100644 index 000000000..99e56d29c --- /dev/null +++ b/ports/python3/0003-Fix-header-for-static-linkage.patch @@ -0,0 +1,14 @@ +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index 64e7aec..aa36745 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -274,6 +274,7 @@ typedef int pid_t; + + /* For Windows the Python core is in a DLL by default. Test + Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ ++#define Py_NO_ENABLE_SHARED + #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) + # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */ + # define MS_COREDLL /* deprecated old symbol */ +-- + diff --git a/ports/python3/CONTROL b/ports/python3/CONTROL new file mode 100644 index 000000000..6cef24232 --- /dev/null +++ b/ports/python3/CONTROL @@ -0,0 +1,3 @@ +Source: python3 +Version: 3.6.1 +Description: The Python programming language as an embeddable library \ No newline at end of file diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake new file mode 100644 index 000000000..d3ffbfa24 --- /dev/null +++ b/ports/python3/portfile.cmake @@ -0,0 +1,78 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) +vcpkg_from_github( + OUT_SOURCE_PATH TEMP_SOURCE_PATH + REPO python/cpython + REF v3.6.1 + SHA512 1fdc1dc44d82762a793093fa19d6401c99fbc05375d8d7e378274ed5555a25dfb3537f93ef04e52ebbf95b42fda74303293dd37aba81ce0c4296a675ab75fa62 + HEAD_REF master + ) +# We need per-triplet directories because we need to patch the project files differently based on the linkage +file(REMOVE_RECURSE ${SOURCE_PATH}) +file(COPY ${TEMP_SOURCE_PATH} DESTINATION ${SOURCE_PATH}) +set(SOURCE_PATH ${SOURCE_PATH}/cpython-3.6.1) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-Static-library.patch + ) +endif() +if (VCPKG_CRT_LINKAGE STREQUAL static) + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0002-Static-CRT.patch + ) +endif() + +if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(BUILD_ARCH "Win32") + set(OUT_DIR "win32") +elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + set(BUILD_ARCH "x64") + set(OUT_DIR "amd64") +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/PCBuild/pythoncore.vcxproj + PLATFORM ${BUILD_ARCH}) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0003-Fix-header-for-static-linkage.patch + ) +endif() + +file(GLOB HEADERS ${SOURCE_PATH}/Include/*.h) +file(COPY ${HEADERS} ${SOURCE_PATH}/PC/pyconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/python3.6) + +file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python36.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python36_d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python36.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python36_d.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/python3) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/python3/LICENSE ${CURRENT_PACKAGES_DIR}/share/python3/copyright) + +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 683d8a8820680fc017d0faef08bac490f68e781e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Sat, 20 May 2017 10:58:30 +0200 Subject: Add warning for unsupported linkage combination Don't remove source directories Install Python's standard library --- ports/python3/portfile.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index d3ffbfa24..19f04a15d 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -9,6 +9,13 @@ # VCPKG_ROOT_DIR = # VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) # +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static) + # Because the patches patch the same file, they have to be applied in the correct order + # In this scenario, only the second patch needs to be applied, which doesn't work + message(STATUS "Warning: Dynamic library with static CRT is not supported. Building static library.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) @@ -20,7 +27,6 @@ vcpkg_from_github( HEAD_REF master ) # We need per-triplet directories because we need to patch the project files differently based on the linkage -file(REMOVE_RECURSE ${SOURCE_PATH}) file(COPY ${TEMP_SOURCE_PATH} DESTINATION ${SOURCE_PATH}) set(SOURCE_PATH ${SOURCE_PATH}/cpython-3.6.1) @@ -64,6 +70,8 @@ endif() file(GLOB HEADERS ${SOURCE_PATH}/Include/*.h) file(COPY ${HEADERS} ${SOURCE_PATH}/PC/pyconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/python3.6) +file(COPY ${SOURCE_PATH}/Lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/python3) + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python36.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python36_d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) -- cgit v1.2.3 From 48ba7fed91b746d6132feab1149c067ba8659b6c Mon Sep 17 00:00:00 2001 From: Bagong Date: Sun, 21 May 2017 16:56:01 +0200 Subject: Add targets for single and double long precision and update source to 3.3.6-pl2 --- ports/fftw3/CMakeLists.txt | 31 ++++++++++++++++++++++++++----- ports/fftw3/CONTROL | 2 +- ports/fftw3/config.h | 12 ++++++------ ports/fftw3/portfile.cmake | 18 +++++++++++------- 4 files changed, 44 insertions(+), 19 deletions(-) diff --git a/ports/fftw3/CMakeLists.txt b/ports/fftw3/CMakeLists.txt index 6e0626f4b..10c63d710 100644 --- a/ports/fftw3/CMakeLists.txt +++ b/ports/fftw3/CMakeLists.txt @@ -67,14 +67,12 @@ include_directories( simd-support ) -# Create a target for the library -add_library(fftw3 +set(COMMON_SOURCES ${fftw_api_SOURCE} ${fftw_dft_SOURCE} ${fftw_dft_scalar_SOURCE} ${fftw_dft_scalar_codelets_SOURCE} ${fftw_dft_simd_SOURCE} - ${fftw_dft_simd_sse2_SOURCE} ${fftw_kernel_SOURCE} ${fftw_rdft_SOURCE} ${fftw_rdft_scalar_SOURCE} @@ -84,13 +82,36 @@ add_library(fftw3 ${fftw_rdft_scalar_r2r_SOURCE} ${fftw_rdft_simd_SOURCE} - ${fftw_rdft_simd_sse2_SOURCE} ${fftw_reodft_SOURCE} ${fftw_simd_support_SOURCE} ${fftw_threads_SOURCE} ) -install(TARGETS fftw3 +set(SSE2_SOURCES + ${fftw_dft_simd_sse2_SOURCE} + ${fftw_rdft_simd_sse2_SOURCE} +) + +# Create default target for the library (double precision) +add_library(fftw3 ${COMMON_SOURCES} ${SSE2_SOURCES}) +target_compile_definitions(fftw3 PRIVATE HAVE_SSE2) +set(INSTALL_TARGETS fftw3) + +# Optionally add single precision +if(BUILD_SINGLE) + add_library(fftw3f ${COMMON_SOURCES} ${SSE2_SOURCES}) + target_compile_definitions(fftw3f PRIVATE FFTW_SINGLE BENCHFFT_SINGLE HAVE_SSE2) + set(INSTALL_TARGETS ${INSTALL_TARGETS} fftw3f) +endif(BUILD_SINGLE) + +# Optionally add long-double precision (does not support SSE2) +if(BUILD_LONG_DOUBLE) + add_library(fftw3l ${COMMON_SOURCES}) + target_compile_definitions(fftw3l PRIVATE FFTW_LDOUBLE BENCHFFT_LDOUBLE) + set(INSTALL_TARGETS ${INSTALL_TARGETS} fftw3l) +endif(BUILD_LONG_DOUBLE) + +install(TARGETS ${INSTALL_TARGETS} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) diff --git a/ports/fftw3/CONTROL b/ports/fftw3/CONTROL index e7a464d65..b4fba283d 100644 --- a/ports/fftw3/CONTROL +++ b/ports/fftw3/CONTROL @@ -1,3 +1,3 @@ Source: fftw3 -Version: 3.3.6-p11 +Version: 3.3.6-p12 Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). diff --git a/ports/fftw3/config.h b/ports/fftw3/config.h index 3fbe33864..900062344 100644 --- a/ports/fftw3/config.h +++ b/ports/fftw3/config.h @@ -1,13 +1,13 @@ /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to compile in long-double precision. */ -#undef BENCHFFT_LDOUBLE +/*#undef BENCHFFT_LDOUBLE*/ /* Define to compile in quad precision. */ #undef BENCHFFT_QUAD /* Define to compile in single precision. */ -#undef BENCHFFT_SINGLE +/*#undef BENCHFFT_SINGLE*/ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. @@ -53,7 +53,7 @@ #undef FFTW_ENABLE_ALLOCA /* Define to compile in long-double precision. */ -#undef FFTW_LDOUBLE +/*#undef FFTW_LDOUBLE*/ /* Define to compile in quad precision. */ #undef FFTW_QUAD @@ -62,7 +62,7 @@ #undef FFTW_RANDOM_ESTIMATOR /* Define to compile in single precision. */ -#undef FFTW_SINGLE +/*#undef FFTW_SINGLE*/ /* Define to 1 if you have the `abort' function. */ #define HAVE_ABORT 1 @@ -216,7 +216,7 @@ #define HAVE_SQRT 1 /* Define to enable SSE/SSE2 optimizations. */ -#define HAVE_SSE2 1 +/* #define HAVE_SSE2 1 */ /* Define to 1 if you have the header file. */ #define HAVE_STDDEF_H 1 @@ -390,4 +390,4 @@ #endif /* Define to `unsigned int' if does not define. */ -#undef size_t \ No newline at end of file +#undef size_t diff --git a/ports/fftw3/portfile.cmake b/ports/fftw3/portfile.cmake index fe97533b4..99ac01e2d 100644 --- a/ports/fftw3/portfile.cmake +++ b/ports/fftw3/portfile.cmake @@ -7,21 +7,25 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fftw-3.3.6-pl1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fftw-3.3.6-pl2) vcpkg_download_distfile(ARCHIVE - URLS "http://www.fftw.org/fftw-3.3.6-pl1.tar.gz" - FILENAME "fftw-3.3.6-pl1.tar.gz" - SHA512 e2ed33fcb068a36a841bbd898d12ceec74f4e9a0a349e7c55959878b50224a69a0f87656347dad7d7e1448ebc50d28d8f34f6da7992c43072d26942fd97c0134 + URLS "http://www.fftw.org/fftw-3.3.6-pl2.tar.gz" + FILENAME "fftw-3.3.6-pl2.tar.gz" + SHA512 e130309856752a1555b6d151c4d0ce9eb4b2c208fff7e3e89282ca8ef6104718f865cbb5e9c4af4367b3615b69b0d50fd001a26d74fd5324ff2faabe14fe3472 ) vcpkg_extract_source_archive(${ARCHIVE}) +option(BUILD_SINGLE "Additionally build single precision library" ON) +option(BUILD_LONG_DOUBLE "Additionally build long-double precision library" ON) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS -DBUILD_SINGLE=${BUILD_SINGLE} -DBUILD_LONG_DOUBLE=${BUILD_LONG_DOUBLE} ) vcpkg_install_cmake() @@ -31,9 +35,9 @@ file(COPY ${SOURCE_PATH}/api/fftw3.h DESTINATION ${CURRENT_PACKAGES_DIR}/include if (VCPKG_CRT_LINKAGE STREQUAL dynamic) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-dynamic.patch) + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-dynamic.patch) endif() # Handle copyright -- cgit v1.2.3 From f772d7f9897e3341026e967706ab1913b97a964e Mon Sep 17 00:00:00 2001 From: Alexander Saprykin Date: Sun, 21 May 2017 17:40:58 +0200 Subject: Add port for plibsys library https://github.com/saprykin/plibsys --- ports/plibsys/CONTROL | 3 ++ ports/plibsys/portfile.cmake | 69 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 ports/plibsys/CONTROL create mode 100644 ports/plibsys/portfile.cmake diff --git a/ports/plibsys/CONTROL b/ports/plibsys/CONTROL new file mode 100644 index 000000000..5f099fc51 --- /dev/null +++ b/ports/plibsys/CONTROL @@ -0,0 +1,3 @@ +Source: plibsys +Version: 0.0.3 +Description: Highly portable C system library: threads and synchronization, sockets, IPC, data structures and more. diff --git a/ports/plibsys/portfile.cmake b/ports/plibsys/portfile.cmake new file mode 100644 index 000000000..1a8402a60 --- /dev/null +++ b/ports/plibsys/portfile.cmake @@ -0,0 +1,69 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/plibsys-0.0.3) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "https://github.com/saprykin/plibsys/archive/0.0.3.tar.gz" + FILENAME "plibsys-0.0.3.tar.gz" + SHA512 e2393fecb3e5feae81a4d60cd03e2ca17bc58453efaa5598beacdc5acedbc7c90374f9f851301fee08ace8dace843a2dff8c1c449cd457302363c98dd24e0415 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + SET(PLIBSYS_STATIC OFF) +else() + SET(PLIBSYS_STATIC ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DPLIBSYS_TESTS=OFF + -DPLIBSYS_COVERAGE=OFF + -DPLIBSYS_BUILD_STATIC=${PLIBSYS_STATIC} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/plibsys RENAME copyright) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(PLIBSYS_FILENAME plibsys) + + # Put shared libraries into the proper directory + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/plibsys.dll ${CURRENT_PACKAGES_DIR}/bin/plibsys.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.dll ${CURRENT_PACKAGES_DIR}/debug/bin/plibsys.dll) +else() + set(PLIBSYS_FILENAME plibsysstatic) + + # For static build remove dynamic libraries + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/plibsys.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/plibsys.dll) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.dll) +endif() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tmp) + +# Save library files +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/${PLIBSYS_FILENAME}.lib ${CURRENT_PACKAGES_DIR}/tmp/plibsys.lib) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/${PLIBSYS_FILENAME}.lib ${CURRENT_PACKAGES_DIR}/tmp/plibsys_debug.lib) + +# Remove unused shared libraries +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib) + +# Re-install library files +file(RENAME ${CURRENT_PACKAGES_DIR}/tmp/plibsys.lib ${CURRENT_PACKAGES_DIR}/lib/plibsys.lib) +file(RENAME ${CURRENT_PACKAGES_DIR}/tmp/plibsys_debug.lib ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.lib) + +# Remove duplicate library files (already installed) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tmp) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 28052ca6494032cbb14af6179f056f937571e988 Mon Sep 17 00:00:00 2001 From: Alexander Saprykin Date: Sun, 21 May 2017 17:44:23 +0200 Subject: Use spaces for script indentation --- ports/plibsys/portfile.cmake | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ports/plibsys/portfile.cmake b/ports/plibsys/portfile.cmake index 1a8402a60..749fa27f5 100644 --- a/ports/plibsys/portfile.cmake +++ b/ports/plibsys/portfile.cmake @@ -28,22 +28,22 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/plibsys RENAME copyright) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(PLIBSYS_FILENAME plibsys) + set(PLIBSYS_FILENAME plibsys) - # Put shared libraries into the proper directory - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + # Put shared libraries into the proper directory + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/plibsys.dll ${CURRENT_PACKAGES_DIR}/bin/plibsys.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.dll ${CURRENT_PACKAGES_DIR}/debug/bin/plibsys.dll) else() - set(PLIBSYS_FILENAME plibsysstatic) + set(PLIBSYS_FILENAME plibsysstatic) - # For static build remove dynamic libraries + # For static build remove dynamic libraries file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/plibsys.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/plibsys.dll) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.dll) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/plibsys.dll) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/plibsys.dll) endif() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tmp) -- cgit v1.2.3 From fea0c6199b90acff596986d3441229b985802551 Mon Sep 17 00:00:00 2001 From: Cloud Han Date: Sun, 21 May 2017 23:52:46 +0800 Subject: add dependency for gli --- ports/gli/CONTROL | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/gli/CONTROL b/ports/gli/CONTROL index 8d89bc2d1..2b1a5ccb4 100644 --- a/ports/gli/CONTROL +++ b/ports/gli/CONTROL @@ -1,3 +1,4 @@ Source: gli Version: 0.8.2 +Build-Depends: glm Description: OpenGL Image (GLI) https://gli.g-truc.net -- cgit v1.2.3 From e70e4db4b46e925c1867ba9880eb5a2b3fb741a3 Mon Sep 17 00:00:00 2001 From: Yuxuan He Date: Tue, 23 May 2017 00:00:19 +0800 Subject: Add support for gtest's dynamic CRT + static linkiing. --- ports/gtest/portfile.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index ea5186e47..a92eec31a 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -17,8 +17,15 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch ) +if (VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(gtest_force_shared_crt YES) +else() + set(gtest_force_shared_crt NO) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + OPTIONS -Dgtest_force_shared_crt=${gtest_force_shared_crt} ) vcpkg_install_cmake() -- cgit v1.2.3 From 30ea0b801f631ab31a6b612ccf09142f6ff85c63 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Mon, 22 May 2017 12:10:20 -0700 Subject: [rttr] initial commit of version 0.9.5 --- ports/rttr/CONTROL | 3 +++ ports/rttr/fix-directory-output.patch | 36 +++++++++++++++++++++++++++ ports/rttr/portfile.cmake | 36 +++++++++++++++++++++++++++ scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 27 ++++++++++++++------ 4 files changed, 94 insertions(+), 8 deletions(-) create mode 100644 ports/rttr/CONTROL create mode 100644 ports/rttr/fix-directory-output.patch create mode 100644 ports/rttr/portfile.cmake diff --git a/ports/rttr/CONTROL b/ports/rttr/CONTROL new file mode 100644 index 000000000..950247999 --- /dev/null +++ b/ports/rttr/CONTROL @@ -0,0 +1,3 @@ +Source: rttr +Version: 0.9.5 +Description: an easy and intuitive way to use reflection in C++ diff --git a/ports/rttr/fix-directory-output.patch b/ports/rttr/fix-directory-output.patch new file mode 100644 index 000000000..020e16831 --- /dev/null +++ b/ports/rttr/fix-directory-output.patch @@ -0,0 +1,36 @@ +diff --git a/CMake/config.cmake b/CMake/config.cmake +index 1d753b3..02fe814 100644 +--- a/CMake/config.cmake ++++ b/CMake/config.cmake +@@ -124,7 +124,7 @@ install( + FILES + "${CMAKE_CURRENT_BINARY_DIR}/CMake/rttr-config-version.cmake" + DESTINATION +- cmake ++ share/rttr + COMPONENT + Devel + ) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d64ee41..e33e7bf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -76,4 +76,4 @@ add_subdirectory(src) + add_subdirectory(doc) + + # here we specify the installation directory +-set(CMAKE_INSTALL_PREFIX ${RTTR_INSTALL_DIR} CACHE PATH "RTTR install prefix" FORCE) ++set(CMAKE_INSTALL_PREFIX ${RTTR_INSTALL_DIR} CACHE PATH "RTTR install prefix") +diff --git a/src/rttr/CMakeLists.txt b/src/rttr/CMakeLists.txt +index 3dffa2c..405b377 100644 +--- a/src/rttr/CMakeLists.txt ++++ b/src/rttr/CMakeLists.txt +@@ -47,7 +47,7 @@ install(TARGETS rttr_core EXPORT rttr_targets + ARCHIVE DESTINATION ${RTTR_LIB_INSTALL_DIR}) + + install(EXPORT rttr_targets +- DESTINATION cmake ++ DESTINATION share/rttr + NAMESPACE RTTR:: + FILE rttr-config.cmake) + diff --git a/ports/rttr/portfile.cmake b/ports/rttr/portfile.cmake new file mode 100644 index 000000000..0a79ec2da --- /dev/null +++ b/ports/rttr/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rttr-0.9.5-src) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.rttr.org/releases/rttr-0.9.5-src.zip" + FILENAME "rttr-0.9.5-src.zip" + SHA512 49110cb588d2dd40a42de34b21a898fe7e21bd1e57f33b9183292c9e7cb8c8aa9e811e24613854a91e97d5cee2e561b430d89deab9f715081a3c6a1866966258 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rttr-0.9.5-src + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +#Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rttr) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/rttr/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/rttr/copyright) +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/cmake + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/README.md + ${CURRENT_PACKAGES_DIR}/debug/LICENSE.txt + ${CURRENT_PACKAGES_DIR}/LICENSE.txt + ${CURRENT_PACKAGES_DIR}/README.md +) + + diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 7c1891584..3b0c794d9 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -19,7 +19,7 @@ function(vcpkg_fixup_cmake_targets) set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/share/${PORT}) set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/share/${PORT}) - if(NOT ${_vfct_CONFIG_PATH} STREQUAL "") + if(_vfct_CONFIG_PATH) set(DEBUG_CONFIG ${CURRENT_PACKAGES_DIR}/debug/${_vfct_CONFIG_PATH}) set(RELEASE_CONFIG ${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}) @@ -34,26 +34,26 @@ function(vcpkg_fixup_cmake_targets) get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG} NAME) string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) - if(${DEBUG_CONFIG_DIR_NAME} STREQUAL "cmake") + if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake") file(REMOVE_RECURSE ${DEBUG_CONFIG}) else() get_filename_component(DEBUG_CONFIG_PARENT_DIR ${DEBUG_CONFIG} DIRECTORY) get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG_PARENT_DIR} NAME) string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) - if(${DEBUG_CONFIG_DIR_NAME} STREQUAL "cmake") + if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake") file(REMOVE_RECURSE ${DEBUG_CONFIG_PARENT_DIR}) endif() endif() get_filename_component(RELEASE_CONFIG_DIR_NAME ${RELEASE_CONFIG} NAME) string(TOLOWER "${RELEASE_CONFIG_DIR_NAME}" RELEASE_CONFIG_DIR_NAME) - if(${RELEASE_CONFIG_DIR_NAME} STREQUAL "cmake") + if(RELEASE_CONFIG_DIR_NAME STREQUAL "cmake") file(REMOVE_RECURSE ${RELEASE_CONFIG}) else() get_filename_component(RELEASE_CONFIG_PARENT_DIR ${RELEASE_CONFIG} DIRECTORY) get_filename_component(RELEASE_CONFIG_DIR_NAME ${RELEASE_CONFIG_PARENT_DIR} NAME) string(TOLOWER "${RELEASE_CONFIG_DIR_NAME}" RELEASE_CONFIG_DIR_NAME) - if(${RELEASE_CONFIG_DIR_NAME} STREQUAL "cmake") + if(RELEASE_CONFIG_DIR_NAME STREQUAL "cmake") file(REMOVE_RECURSE ${RELEASE_CONFIG_PARENT_DIR}) endif() endif() @@ -63,10 +63,18 @@ function(vcpkg_fixup_cmake_targets) message(FATAL_ERROR "'${DEBUG_SHARE}' does not exist.") endif() - file(GLOB UNUSED_FILES "${DEBUG_SHARE}/*[Tt]argets.cmake" "${DEBUG_SHARE}/*[Cc]onfig.cmake" "${DEBUG_SHARE}/*[Cc]onfigVersion.cmake") + file(GLOB UNUSED_FILES + "${DEBUG_SHARE}/*[Tt]argets.cmake" + "${DEBUG_SHARE}/*[Cc]onfig.cmake" + "${DEBUG_SHARE}/*[Cc]onfigVersion.cmake" + "${DEBUG_SHARE}/*[Cc]onfig-version.cmake" + ) file(REMOVE ${UNUSED_FILES}) - file(GLOB RELEASE_TARGETS "${RELEASE_SHARE}/*[Tt]argets-release.cmake") + file(GLOB RELEASE_TARGETS + "${RELEASE_SHARE}/*[Tt]argets-release.cmake" + "${RELEASE_SHARE}/*[Cc]onfig-release.cmake" + ) foreach(RELEASE_TARGET ${RELEASE_TARGETS}) get_filename_component(RELEASE_TARGET_NAME ${RELEASE_TARGET} NAME) @@ -75,7 +83,10 @@ function(vcpkg_fixup_cmake_targets) file(WRITE ${RELEASE_TARGET} "${_contents}") endforeach() - file(GLOB DEBUG_TARGETS "${DEBUG_SHARE}/*[Tt]argets-debug.cmake") + file(GLOB DEBUG_TARGETS + "${DEBUG_SHARE}/*[Tt]argets-debug.cmake" + "${DEBUG_SHARE}/*[Cc]onfig-debug.cmake" + ) foreach(DEBUG_TARGET ${DEBUG_TARGETS}) get_filename_component(DEBUG_TARGET_NAME ${DEBUG_TARGET} NAME) -- cgit v1.2.3 From 932f0f0657767c26687dcad81311d4badc56348b Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Mon, 22 May 2017 23:57:37 +0300 Subject: scripts/fetchDependency.ps1: fix vcpkg boostrapping with Powershell Core --- scripts/fetchDependency.ps1 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 98144bffa..bbc027861 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -9,7 +9,9 @@ $downloadPromptOverride_NO_OVERRIDE= 0 $downloadPromptOverride_DO_NOT_PROMPT = 1 $downloadPromptOverride_ALWAYS_PROMPT = 2 -Import-Module BitsTransfer -Verbose:$false +if ($PSVersionTable.PSEdition -eq "Desktop") { + Import-Module BitsTransfer -Verbose:$false +} Write-Verbose "Fetching dependency: $Dependency" @@ -80,7 +82,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) New-Item -ItemType directory -Path $downloadDir | Out-Null } - if ($Dependency -ne "git") # git fails with BITS + if (($PSVersionTable.PSEdition -eq "Desktop") -and ($Dependency -ne "git")) # git fails with BITS { try { $WC = New-Object System.Net.WebClient @@ -195,11 +197,8 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) performDownload $Dependency $url $downloadsDir $downloadPath $downloadVersion $requiredVersion #calculating the hash - $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256") - $fileAsByteArray = [io.File]::ReadAllBytes($downloadPath) - $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) - $downloadedFileHash = -Join ($hashByteArray | ForEach {"{0:x2}" -f $_}) - + $downloadedFileHash = (Get-FileHash -Path $downloadPath -Algorithm SHA256).Hash + if ($expectedDownloadedFileHash -ne $downloadedFileHash) { throw [System.IO.FileNotFoundException] ("Mismatching hash of the downloaded " + $Dependency) -- cgit v1.2.3 From 528088d25d6ab5ed221e5288e688f264bf1a054d Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 23 May 2017 01:41:58 +0300 Subject: [strtk] add version 2017.01.02 --- ports/strtk/CONTROL | 4 ++++ ports/strtk/copyright | 7 +++++++ ports/strtk/portfile.cmake | 11 +++++++++++ 3 files changed, 22 insertions(+) create mode 100644 ports/strtk/CONTROL create mode 100644 ports/strtk/copyright create mode 100644 ports/strtk/portfile.cmake diff --git a/ports/strtk/CONTROL b/ports/strtk/CONTROL new file mode 100644 index 000000000..a1d1b5e44 --- /dev/null +++ b/ports/strtk/CONTROL @@ -0,0 +1,4 @@ +Source: strtk +Version: 2017.01.02-1e2960f +Description: robust, optimized and portable string processing algorithms for the C++ language +Build-Depends: boost \ No newline at end of file diff --git a/ports/strtk/copyright b/ports/strtk/copyright new file mode 100644 index 000000000..f9418e215 --- /dev/null +++ b/ports/strtk/copyright @@ -0,0 +1,7 @@ +Copyright 2010-2017 Arash Partow + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/ports/strtk/portfile.cmake b/ports/strtk/portfile.cmake new file mode 100644 index 000000000..6122da897 --- /dev/null +++ b/ports/strtk/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ArashPartow/strtk + REF 1e2960fd55918532dd96aed6a4b9cc6ee8f2e3c5 + SHA512 89b3d40dbdf66a21a38005f3d878e039f2e59c378aac13077ce183b495e903aeebd5f99ce4fbb892cf69503e5e7bf560498e65769f2f67d722262c0cf22fe74e +) + +file(COPY ${SOURCE_PATH}/strtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/strtk) -- cgit v1.2.3 From 621d2f852d43b5766bbf13bd22591524a083e48e Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Mon, 22 May 2017 15:41:02 -0700 Subject: [vcpkg-search] added search in description --- toolsrc/src/commands_search.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index 0ba7305e9..739aa0f43 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -85,7 +85,11 @@ namespace vcpkg::Commands::Search if (Strings::case_insensitive_ascii_find(source_paragraph.name, args.command_arguments[0]) == source_paragraph.name.end()) { - continue; + if (Strings::case_insensitive_ascii_find(source_paragraph.description, args.command_arguments[0]) == + source_paragraph.description.end()) + { + continue; + } } do_print(source_paragraph); -- cgit v1.2.3 From 21e30e6d802e3ab3b985cb9b4bde0fa5adef432d Mon Sep 17 00:00:00 2001 From: Scott Date: Mon, 22 May 2017 18:06:33 -0700 Subject: Added fluid.exe to output tools This is added as per the conversion here https://github.com/Microsoft/vcpkg/pull/551#issuecomment-303247813 If this should not be in the vcpkg output, please close the PR. --- ports/fltk/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/fltk/portfile.cmake b/ports/fltk/portfile.cmake index 261a03c7f..aca489e3f 100644 --- a/ports/fltk/portfile.cmake +++ b/ports/fltk/portfile.cmake @@ -40,11 +40,15 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMAKE ${CURRENT_PACKAGES_DIR}/debug/include ) + +file(COPY ${CURRENT_PACKAGES_DIR}/bin/fluid.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/fluid.exe) file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/fltk-config) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/bin/fluid.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/debug) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/fluid.exe) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/fltk-config) + vcpkg_copy_pdbs() if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) -- cgit v1.2.3 From 630132096d2dbbc2d955b92ead1a92def7ffa350 Mon Sep 17 00:00:00 2001 From: Yuxuan He Date: Tue, 23 May 2017 09:40:38 +0800 Subject: Only check CRT on gtest_force_shared_crt. --- ports/gtest/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index a92eec31a..0bfe4e60c 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -17,7 +17,7 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch ) -if (VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") +if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") set(gtest_force_shared_crt YES) else() set(gtest_force_shared_crt NO) -- cgit v1.2.3 From 3dd8bde9bdb46e3c501db5a123cb1431c701f2a1 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Mon, 22 May 2017 21:30:50 -0500 Subject: Adding policy ALLOW_OBSOLETE_MSVCRT suppressing dependency check for msvcrt.dll --- toolsrc/include/PostBuildLint_BuildPolicies.h | 8 ++-- toolsrc/src/PostBuildLint.cpp | 60 +++++++++++++++------------ toolsrc/src/PostBuildLint_BuildPolicies.cpp | 9 ++++ 3 files changed, 47 insertions(+), 30 deletions(-) diff --git a/toolsrc/include/PostBuildLint_BuildPolicies.h b/toolsrc/include/PostBuildLint_BuildPolicies.h index 697edbb8d..95e01d71c 100644 --- a/toolsrc/include/PostBuildLint_BuildPolicies.h +++ b/toolsrc/include/PostBuildLint_BuildPolicies.h @@ -13,7 +13,8 @@ namespace vcpkg::PostBuildLint EMPTY_PACKAGE, DLLS_WITHOUT_LIBS, ONLY_RELEASE_CRT, - EMPTY_INCLUDE_FOLDER + EMPTY_INCLUDE_FOLDER, + ALLOW_OBSOLETE_MSVCRT }; static BuildPolicies parse(const std::string& s); @@ -38,8 +39,9 @@ namespace vcpkg::PostBuildLint static constexpr BuildPolicies DLLS_WITHOUT_LIBS(BuildPolicies::BackingEnum::DLLS_WITHOUT_LIBS); static constexpr BuildPolicies ONLY_RELEASE_CRT(BuildPolicies::BackingEnum::ONLY_RELEASE_CRT); static constexpr BuildPolicies EMPTY_INCLUDE_FOLDER(BuildPolicies::BackingEnum::EMPTY_INCLUDE_FOLDER); + static constexpr BuildPolicies ALLOW_OBSOLETE_MSVCRT(BuildPolicies::BackingEnum::ALLOW_OBSOLETE_MSVCRT); - static constexpr std::array VALUES = { - EMPTY_PACKAGE, DLLS_WITHOUT_LIBS, ONLY_RELEASE_CRT, EMPTY_INCLUDE_FOLDER}; + static constexpr std::array VALUES = { + EMPTY_PACKAGE, DLLS_WITHOUT_LIBS, ONLY_RELEASE_CRT, EMPTY_INCLUDE_FOLDER, ALLOW_OBSOLETE_MSVCRT}; } } diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 0d2f556c1..a8365e109 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -37,30 +37,6 @@ namespace vcpkg::PostBuildLint } }; - const std::vector& get_outdated_dynamic_crts() - { - static const std::vector v = {{"msvcp100.dll", R"(msvcp100\.dll)"}, - {"msvcp100d.dll", R"(msvcp100d\.dll)"}, - {"msvcp110.dll", R"(msvcp110\.dll)"}, - {"msvcp110_win.dll", R"(msvcp110_win\.dll)"}, - {"msvcp120.dll", R"(msvcp120\.dll)"}, - {"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"}, - {"msvcp60.dll", R"(msvcp60\.dll)"}, - {"msvcp60.dll", R"(msvcp60\.dll)"}, - - {"msvcr100.dll", R"(msvcr100\.dll)"}, - {"msvcr100d.dll", R"(msvcr100d\.dll)"}, - {"msvcr100_clr0400.dll", R"(msvcr100_clr0400\.dll)"}, - {"msvcr110.dll", R"(msvcr110\.dll)"}, - {"msvcr120.dll", R"(msvcr120\.dll)"}, - {"msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)"}, - {"msvcrt.dll", R"(msvcrt\.dll)"}, - {"msvcrt20.dll", R"(msvcrt20\.dll)"}, - {"msvcrt40.dll", R"(msvcrt40\.dll)"}}; - - return v; - } - template static bool contains_and_enabled(const std::map map, const T& key) { @@ -70,6 +46,34 @@ namespace vcpkg::PostBuildLint return false; } + const std::vector& get_outdated_dynamic_crts(const std::map& policies) + { + static std::vector v = {{"msvcp100.dll", R"(msvcp100\.dll)"}, + {"msvcp100d.dll", R"(msvcp100d\.dll)"}, + {"msvcp110.dll", R"(msvcp110\.dll)"}, + {"msvcp110_win.dll", R"(msvcp110_win\.dll)"}, + {"msvcp120.dll", R"(msvcp120\.dll)"}, + {"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"}, + {"msvcp60.dll", R"(msvcp60\.dll)"}, + {"msvcp60.dll", R"(msvcp60\.dll)"}, + + {"msvcr100.dll", R"(msvcr100\.dll)"}, + {"msvcr100d.dll", R"(msvcr100d\.dll)"}, + {"msvcr100_clr0400.dll", R"(msvcr100_clr0400\.dll)"}, + {"msvcr110.dll", R"(msvcr110\.dll)"}, + {"msvcr120.dll", R"(msvcr120\.dll)"}, + {"msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)"}, + {"msvcrt20.dll", R"(msvcrt20\.dll)"}, + {"msvcrt40.dll", R"(msvcrt40\.dll)"}}; + + if (contains_and_enabled(policies, BuildPoliciesC::ALLOW_OBSOLETE_MSVCRT)) + { + v.push_back(OutdatedDynamicCrt{"msvcrt.dll", R"(msvcrt\.dll)"}); + } + + return v; + } + static LintStatus check_for_files_in_include_directory(const Files::Filesystem& fs, const std::map& policies, const fs::path& package_dir) @@ -656,9 +660,11 @@ namespace vcpkg::PostBuildLint OutdatedDynamicCrt_and_file() = delete; }; - static LintStatus check_outdated_crt_linkage_of_dlls(const std::vector& dlls, const fs::path dumpbin_exe) + static LintStatus check_outdated_crt_linkage_of_dlls(const std::vector& dlls, + const fs::path dumpbin_exe, + const BuildInfo& build_info) { - const std::vector& outdated_crts = get_outdated_dynamic_crts(); + const std::vector& outdated_crts = get_outdated_dynamic_crts(build_info.policies); std::vector dlls_with_outdated_crt; @@ -798,7 +804,7 @@ namespace vcpkg::PostBuildLint error_count += check_uwp_bit_of_dlls(pre_build_info.cmake_system_name, dlls, toolset.dumpbin); error_count += check_dll_architecture(pre_build_info.target_architecture, dlls); - error_count += check_outdated_crt_linkage_of_dlls(dlls, toolset.dumpbin); + error_count += check_outdated_crt_linkage_of_dlls(dlls, toolset.dumpbin, build_info); break; } case LinkageType::BackingEnum::STATIC: diff --git a/toolsrc/src/PostBuildLint_BuildPolicies.cpp b/toolsrc/src/PostBuildLint_BuildPolicies.cpp index 001ba31e7..d2189e20d 100644 --- a/toolsrc/src/PostBuildLint_BuildPolicies.cpp +++ b/toolsrc/src/PostBuildLint_BuildPolicies.cpp @@ -12,6 +12,7 @@ namespace vcpkg::PostBuildLint static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs"; static const std::string NAME_ONLY_RELEASE_CRT = "PolicyOnlyReleaseCRT"; static const std::string NAME_EMPTY_INCLUDE_FOLDER = "PolicyEmptyIncludeFolder"; + static const std::string NAME_ALLOW_OBSOLETE_MSVCRT = "PolicyAllowObsoleteMsvcrt"; BuildPolicies BuildPolicies::parse(const std::string& s) { @@ -35,6 +36,11 @@ namespace vcpkg::PostBuildLint return BuildPoliciesC::EMPTY_INCLUDE_FOLDER; } + if (s == NAME_ALLOW_OBSOLETE_MSVCRT) + { + return BuildPoliciesC::ALLOW_OBSOLETE_MSVCRT; + } + return BuildPoliciesC::NULLVALUE; } @@ -46,6 +52,7 @@ namespace vcpkg::PostBuildLint case BuildPoliciesC::DLLS_WITHOUT_LIBS: return NAME_DLLS_WITHOUT_LIBS; case BuildPoliciesC::ONLY_RELEASE_CRT: return NAME_ONLY_RELEASE_CRT; case BuildPoliciesC::EMPTY_INCLUDE_FOLDER: return NAME_EMPTY_INCLUDE_FOLDER; + case BuildPoliciesC::ALLOW_OBSOLETE_MSVCRT: return NAME_ALLOW_OBSOLETE_MSVCRT; case BuildPoliciesC::NULLVALUE: return NULLVALUE_STRING; default: Checks::unreachable(VCPKG_LINE_INFO); } @@ -57,6 +64,7 @@ namespace vcpkg::PostBuildLint static const std::string CMAKE_VARIABLE_DLLS_WITHOUT_LIBS = "VCPKG_POLICY_DLLS_WITHOUT_LIBS"; static const std::string CMAKE_VARIABLE_ONLY_RELEASE_CRT = "VCPKG_POLICY_ONLY_RELEASE_CRT"; static const std::string CMAKE_VARIABLE_EMPTY_INCLUDE_FOLDER = "VCPKG_POLICY_EMPTY_INCLUDE_FOLDER"; + static const std::string CMAKE_VARIABLE_ALLOW_OBSOLETE_MSVCRT = "VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT"; switch (this->backing_enum) { @@ -64,6 +72,7 @@ namespace vcpkg::PostBuildLint case BuildPoliciesC::DLLS_WITHOUT_LIBS: return CMAKE_VARIABLE_DLLS_WITHOUT_LIBS; case BuildPoliciesC::ONLY_RELEASE_CRT: return CMAKE_VARIABLE_ONLY_RELEASE_CRT; case BuildPoliciesC::EMPTY_INCLUDE_FOLDER: return CMAKE_VARIABLE_EMPTY_INCLUDE_FOLDER; + case BuildPoliciesC::ALLOW_OBSOLETE_MSVCRT: return CMAKE_VARIABLE_ALLOW_OBSOLETE_MSVCRT; case BuildPoliciesC::NULLVALUE: Enums::nullvalue_used(VCPKG_LINE_INFO, BuildPoliciesC::ENUM_NAME); default: Checks::unreachable(VCPKG_LINE_INFO); } -- cgit v1.2.3 From 91876e047a54526b4ea459eb4bd7e5cce9a51564 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Mon, 22 May 2017 21:38:11 -0500 Subject: Add support for installing binary distributions of HWLOC - this depends on #1144 - this fixes #1124 --- ports/hwloc/CONTROL | 4 ++++ ports/hwloc/portfile.cmake | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 ports/hwloc/CONTROL create mode 100644 ports/hwloc/portfile.cmake diff --git a/ports/hwloc/CONTROL b/ports/hwloc/CONTROL new file mode 100644 index 000000000..f79c957e5 --- /dev/null +++ b/ports/hwloc/CONTROL @@ -0,0 +1,4 @@ +Source: hwloc +Version: 1.11.7 +Description: Portable Hardware Locality (hwloc) + The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various system attributes such as cache and memory information as well as the locality of I/O devices such as network interfaces, InfiniBand HCAs or GPUs. diff --git a/ports/hwloc/portfile.cmake b/ports/hwloc/portfile.cmake new file mode 100644 index 000000000..785061158 --- /dev/null +++ b/ports/hwloc/portfile.cmake @@ -0,0 +1,53 @@ +# 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) + +if(TRIPLET_SYSTEM_ARCH MATCHES "x86") + vcpkg_download_distfile(ARCHIVE + URLS "https://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-win32-build-1.11.7.zip" + FILENAME "hwloc-win32-build-1.11.7.zip" + SHA512 c474f2400b207bbad3da94d201d03eb711df6a87aacb8429c489591ed47393eb499d99da5737a22d0745194296db11bf9e8ebbabd4bf2ecfd2d2878a773195d8 + ) + set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hwloc-win32-build-1.11.7) +elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64") + vcpkg_download_distfile(ARCHIVE + URLS "https://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-win64-build-1.11.7.zip" + FILENAME "hwloc-win64-build-1.11.7.zip" + SHA512 1373107f75f372fa519a7c3f686fbb6ff89e14c3750e1d64755c768daf77a01a1d962b5e7ecadc65f9917b56f45193e637db3958a0bede08cfe2dd983a335d9b + ) + set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hwloc-win64-build-1.11.7) +else() + message(FATAL_ERROR " HWLOC is not available for download for the ARM platform") +endif() +vcpkg_extract_source_archive(${ARCHIVE}) + +message(STATUS "Installing") + +# copy include files +file(COPY ${SOURCE_PATH}/include/hwloc.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/include/hwloc DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# copy binaries +file(COPY ${SOURCE_PATH}/bin/libhwloc-5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(COPY ${SOURCE_PATH}/lib/libhwloc.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + +file(COPY ${SOURCE_PATH}/bin/libhwloc-5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(COPY ${SOURCE_PATH}/lib/libhwloc.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +message(STATUS "Installing done") + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/hwloc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/hwloc/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/hwloc/copyright) + +set(VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT enabled) -- cgit v1.2.3 From 54be2d5e91a3feb586e7edf9681cd146d342fad8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 22 May 2017 20:26:56 -0700 Subject: [pdcurses] Fix x64/x86 builds. --- ports/pdcurses/CONTROL | 2 +- ports/pdcurses/portfile.cmake | 30 ++++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/ports/pdcurses/CONTROL b/ports/pdcurses/CONTROL index 66f0f4535..befa5c2fc 100644 --- a/ports/pdcurses/CONTROL +++ b/ports/pdcurses/CONTROL @@ -1,3 +1,3 @@ Source: pdcurses -Version: 3.4 +Version: 3.4-1 Description: Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model. diff --git a/ports/pdcurses/portfile.cmake b/ports/pdcurses/portfile.cmake index 4c43e68d2..1d94466dc 100644 --- a/ports/pdcurses/portfile.cmake +++ b/ports/pdcurses/portfile.cmake @@ -1,6 +1,6 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) find_program(NMAKE nmake) vcpkg_download_distfile(ARCHIVE @@ -8,17 +8,31 @@ vcpkg_download_distfile(ARCHIVE FILENAME "pdcurs34.zip" SHA512 0b916bfe37517abb80df7313608cc4e1ed7659a41ce82763000dfdfa5b8311ffd439193c74fc84a591f343147212bf1caf89e7db71f1f7e4fa70f534834cb039 ) -vcpkg_extract_source_archive(${ARCHIVE}) -set(PDC_NMAKE_CMD ${NMAKE} /A -f vcpkg.mak WIDE=Y UTF8=Y) +if(EXISTS ${CURRENT_BUILDTREES_DIR}/src) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) +endif() + +vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}) + +file(READ ${SOURCE_PATH}/win32/vcwin32.mak PDC_MAK_ORIG) +string(REPLACE " -pdb:none" "" PDC_MAK_ORIG ${PDC_MAK_ORIG}) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + string(REPLACE "/MACHINE:IX86 " "/MACHINE:X64 " PDC_MAK_X64 ${PDC_MAK_ORIG}) + file(WRITE ${SOURCE_PATH}/win32/vcpkg_x64.mak ${PDC_MAK_X64}) + set(PDC_NMAKE_CMD ${NMAKE} /A -f vcpkg_x64.mak WIDE=Y UTF8=Y) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + string(REPLACE "/MACHINE:IX86 " "/MACHINE:X86 " PDC_MAK_X86 ${PDC_MAK_ORIG}) + file(WRITE ${SOURCE_PATH}/win32/vcpkg_x86.mak ${PDC_MAK_X86}) + set(PDC_NMAKE_CMD ${NMAKE} /A -f vcpkg_x86.mak WIDE=Y UTF8=Y) +else() + message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + set(PDC_NMAKE_CWD ${SOURCE_PATH}/win32) set(PDC_PDCLIB ${SOURCE_PATH}/win32/pdcurses) -file(READ ${SOURCE_PATH}/win32/vcwin32.mak PDC_MAK) -string(REPLACE " -pdb:none" "" PDC_MAK ${PDC_MAK}) -string(REPLACE "/MACHINE:IX86 " "" PDC_MAK ${PDC_MAK}) -file(WRITE ${SOURCE_PATH}/win32/vcpkg.mak ${PDC_MAK}) - if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(PDC_NMAKE_CMD ${PDC_NMAKE_CMD} DLL=Y) endif() -- cgit v1.2.3 From f9d0ee313c815f7d2b322f0c68d20b539465ce38 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 22 May 2017 20:49:15 -0700 Subject: [vcpkg] Avoid modifying static globals after initialization --- toolsrc/src/PostBuildLint.cpp | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index a8365e109..4491f3f2e 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -48,27 +48,34 @@ namespace vcpkg::PostBuildLint const std::vector& get_outdated_dynamic_crts(const std::map& policies) { - static std::vector v = {{"msvcp100.dll", R"(msvcp100\.dll)"}, - {"msvcp100d.dll", R"(msvcp100d\.dll)"}, - {"msvcp110.dll", R"(msvcp110\.dll)"}, - {"msvcp110_win.dll", R"(msvcp110_win\.dll)"}, - {"msvcp120.dll", R"(msvcp120\.dll)"}, - {"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"}, - {"msvcp60.dll", R"(msvcp60\.dll)"}, - {"msvcp60.dll", R"(msvcp60\.dll)"}, - - {"msvcr100.dll", R"(msvcr100\.dll)"}, - {"msvcr100d.dll", R"(msvcr100d\.dll)"}, - {"msvcr100_clr0400.dll", R"(msvcr100_clr0400\.dll)"}, - {"msvcr110.dll", R"(msvcr110\.dll)"}, - {"msvcr120.dll", R"(msvcr120\.dll)"}, - {"msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)"}, - {"msvcrt20.dll", R"(msvcrt20\.dll)"}, - {"msvcrt40.dll", R"(msvcrt40\.dll)"}}; + static const std::vector v_no_msvcrt = { + {"msvcp100.dll", R"(msvcp100\.dll)"}, + {"msvcp100d.dll", R"(msvcp100d\.dll)"}, + {"msvcp110.dll", R"(msvcp110\.dll)"}, + {"msvcp110_win.dll", R"(msvcp110_win\.dll)"}, + {"msvcp120.dll", R"(msvcp120\.dll)"}, + {"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"}, + {"msvcp60.dll", R"(msvcp60\.dll)"}, + {"msvcp60.dll", R"(msvcp60\.dll)"}, + + {"msvcr100.dll", R"(msvcr100\.dll)"}, + {"msvcr100d.dll", R"(msvcr100d\.dll)"}, + {"msvcr100_clr0400.dll", R"(msvcr100_clr0400\.dll)"}, + {"msvcr110.dll", R"(msvcr110\.dll)"}, + {"msvcr120.dll", R"(msvcr120\.dll)"}, + {"msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)"}, + {"msvcrt20.dll", R"(msvcrt20\.dll)"}, + {"msvcrt40.dll", R"(msvcrt40\.dll)"}}; + + static const std::vector v = [&]() { + auto ret = v_no_msvcrt; + ret.push_back(OutdatedDynamicCrt{"msvcrt.dll", R"(msvcrt\.dll)"}); + return ret; + }(); if (contains_and_enabled(policies, BuildPoliciesC::ALLOW_OBSOLETE_MSVCRT)) { - v.push_back(OutdatedDynamicCrt{"msvcrt.dll", R"(msvcrt\.dll)"}); + return v_no_msvcrt; } return v; -- cgit v1.2.3 From 70429b207dbdf8b2f0c9b71372d3d121acd9ba51 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 22 May 2017 22:00:02 -0700 Subject: [vcpkg] Enable VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT --- scripts/ports.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 9558ac2dc..1d699a966 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -85,6 +85,9 @@ if(CMD MATCHES "^BUILD$") if (DEFINED VCPKG_POLICY_ONLY_RELEASE_CRT) file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyOnlyReleaseCRT: ${VCPKG_POLICY_ONLY_RELEASE_CRT}\n") endif() + if (DEFINED VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT) + file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyAllowObsoleteMsvcrt: ${VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT}\n") + endif() if (DEFINED VCPKG_POLICY_EMPTY_INCLUDE_FOLDER) file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyEmptyIncludeFolder: ${VCPKG_POLICY_EMPTY_INCLUDE_FOLDER}\n") endif() -- cgit v1.2.3 From 67e038b9e059745e953f13e666777081055794bb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 22 May 2017 22:21:10 -0700 Subject: [hwloc] Use VCPKG_TARGET_ARCHITECTURE instead of TRIPLET_SYSTEM_ARCH. --- ports/hwloc/portfile.cmake | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/ports/hwloc/portfile.cmake b/ports/hwloc/portfile.cmake index 785061158..c689d621f 100644 --- a/ports/hwloc/portfile.cmake +++ b/ports/hwloc/portfile.cmake @@ -1,25 +1,13 @@ -# 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) -if(TRIPLET_SYSTEM_ARCH MATCHES "x86") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") vcpkg_download_distfile(ARCHIVE URLS "https://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-win32-build-1.11.7.zip" FILENAME "hwloc-win32-build-1.11.7.zip" SHA512 c474f2400b207bbad3da94d201d03eb711df6a87aacb8429c489591ed47393eb499d99da5737a22d0745194296db11bf9e8ebbabd4bf2ecfd2d2878a773195d8 ) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hwloc-win32-build-1.11.7) -elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") vcpkg_download_distfile(ARCHIVE URLS "https://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-win64-build-1.11.7.zip" FILENAME "hwloc-win64-build-1.11.7.zip" @@ -27,7 +15,7 @@ elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64") ) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hwloc-win64-build-1.11.7) else() - message(FATAL_ERROR " HWLOC is not available for download for the ARM platform") + message(FATAL_ERROR "HWLOC is not available for download for the platform: ${VCPKG_TARGET_ARCHITECTURE}") endif() vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 1780157dbc64bf568fe0f9653b585f519ab1a019 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 23 May 2017 01:11:52 -0700 Subject: [fltk] Place fluid.exe into tools/fltk. Remove static import libs in shared builds. --- ports/fltk/CONTROL | 2 +- ports/fltk/portfile.cmake | 32 +++++++++++++++++++------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/ports/fltk/CONTROL b/ports/fltk/CONTROL index 985c6b1c0..2fdb2eecb 100644 --- a/ports/fltk/CONTROL +++ b/ports/fltk/CONTROL @@ -1,4 +1,4 @@ Source: fltk -Version: 1.3.4-2 +Version: 1.3.4-3 Description: FLTK (pronounced fulltick) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its built-in GLUT emulation. Build-Depends: zlib, libpng, libjpeg-turbo \ No newline at end of file diff --git a/ports/fltk/portfile.cmake b/ports/fltk/portfile.cmake index aca489e3f..ba9058316 100644 --- a/ports/fltk/portfile.cmake +++ b/ports/fltk/portfile.cmake @@ -28,8 +28,11 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS + OPTIONS -DOPTION_BUILD_EXAMPLES=OFF + -DOPTION_USE_SYSTEM_ZLIB=ON + -DOPTION_USE_SYSTEM_LIBPNG=ON + -DOPTION_USE_SYSTEM_LIBJPEG=ON -DOPTION_BUILD_SHARED_LIBS=${BUILD_SHARED} ) @@ -41,30 +44,33 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ) -file(COPY ${CURRENT_PACKAGES_DIR}/bin/fluid.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(COPY ${CURRENT_PACKAGES_DIR}/bin/fluid.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/fltk) file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/fluid.exe) file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/fltk-config) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/bin/fluid.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/debug) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/fluid.exe) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/fltk-config) vcpkg_copy_pdbs() -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/fltk) - +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/bin + ) else() - file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/bin - ${CURRENT_PACKAGES_DIR}/bin - ) - - + file(GLOB SHARED_LIBS "${CURRENT_PACKAGES_DIR}/lib/*_SHARED.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*_SHAREDd.lib") + file(GLOB STATIC_LIBS "${CURRENT_PACKAGES_DIR}/lib/*.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib") + list(FILTER STATIC_LIBS EXCLUDE REGEX "_SHAREDd?\\.lib\$") + file(REMOVE ${STATIC_LIBS}) + foreach(SHARED_LIB ${SHARED_LIBS}) + string(REGEX REPLACE "_SHARED(d?)\\.lib\$" "\\1.lib" NEWNAME ${SHARED_LIB}) + file(RENAME ${SHARED_LIB} ${NEWNAME}) + endforeach() endif() - - file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fltk -- cgit v1.2.3 From c3924adea45ccf19f89708ddaa184d6ae7d716c2 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Sun, 21 May 2017 06:03:24 -0500 Subject: Adding support for HPX (https://github.com/STEllAR-GROUP/hpx) --- ports/hpx/CONTROL | 5 +++ ports/hpx/portfile.cmake | 88 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 ports/hpx/CONTROL create mode 100644 ports/hpx/portfile.cmake diff --git a/ports/hpx/CONTROL b/ports/hpx/CONTROL new file mode 100644 index 000000000..e6bfb7e1e --- /dev/null +++ b/ports/hpx/CONTROL @@ -0,0 +1,5 @@ +Source: hpx +Version: 1.0.0 +Build-Depends: boost, hwloc +Description: The C++ Standards Library for Concurrency and Parallelism + HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case. diff --git a/ports/hpx/portfile.cmake b/ports/hpx/portfile.cmake new file mode 100644 index 000000000..369e9ec13 --- /dev/null +++ b/ports/hpx/portfile.cmake @@ -0,0 +1,88 @@ +include(vcpkg_common_functions) + +if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(FATAL_ERROR "HPX can be built with dynamic linking only") +endif() + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hpx_1.0.0) + +vcpkg_download_distfile(ARCHIVE + URLS "http://stellar-group.org/files/hpx_1.0.0.tar.gz" + FILENAME "hpx_1.0.0.tar.gz" + SHA512 42c155654f118bff34b48d929b1732fd56126b8fd3e7657b5bd2f84275288ddf538572ed1152883c4aed5e9683de53b9b1f1c3613e5092e7bd1a5e165bed606d +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# apply hotfix to enable building with vcpkg +vcpkg_download_distfile(DIFF + URLS "http://stellar-group.org/files/build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" + FILENAME "build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" + SHA512 ceceb84b54bf564b7b9258063454084207538a2bd212f7f65503c6638914eb3c093076e4303369639ef9b34812a2c8ed363c08bbdf5a39cc5d49f720a376af75 +) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) + +SET(BOOST_PATH "${CURRENT_INSTALLED_DIR}/share/boost") +SET(HWLOC_PATH "${CURRENT_INSTALLED_DIR}/share/hwloc") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBOOST_ROOT=${BOOST_PATH} + -DHWLOC_ROOT=${HWLOC_ROOT} + -DHPX_WITH_VCPKG=ON + -DHPX_WITH_HWLOC=ON + -DHPX_WITH_TESTS=OFF + -DHPX_WITH_EXAMPLES=OFF + -DHPX_WITH_TOOLS=OFF + -DHPX_WITH_RUNTIME=OFF +) + +vcpkg_install_cmake() + +file(INSTALL + ${SOURCE_PATH}/LICENSE_1_0.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/hpx RENAME copyright) + +# post build cleanup +file(GLOB __hpx_cmakes ${CURRENT_PACKAGES_DIR}/lib/cmake/HPX/*.*) +foreach(__hpx_cmake ${__hpx_cmakes}) + file(COPY ${__hpx_cmake} DESTINATION ${CURRENT_PACKAGES_DIR}/share/hpx/cmake) + file(REMOVE ${__hpx_cmake}) +endforeach() + +file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/lib/*.dll) +foreach(__hpx_dll ${__hpx_dlls}) + file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${__hpx_dll}) +endforeach() + +file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/lib/hpx/*.dll) +foreach(__hpx_dll ${__hpx_dlls}) + file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/bin/hpx) + file(REMOVE ${__hpx_dll}) +endforeach() + +file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) +foreach(__hpx_dll ${__hpx_dlls}) + file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${__hpx_dll}) +endforeach() + +file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/debug/lib/hpx/*.dll) +foreach(__hpx_dll ${__hpx_dlls}) + file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/hpx) + file(REMOVE ${__hpx_dll}) +endforeach() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/bazel) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/bazel) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +vcpkg_copy_pdbs() + -- cgit v1.2.3 From 3b55cb075437f03259b386a0d62db935d08e569b Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Mon, 22 May 2017 10:27:05 -0500 Subject: Allowing for HPX to be built for x86-windows as well --- ports/hpx/portfile.cmake | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ports/hpx/portfile.cmake b/ports/hpx/portfile.cmake index 369e9ec13..d051d8084 100644 --- a/ports/hpx/portfile.cmake +++ b/ports/hpx/portfile.cmake @@ -21,6 +21,14 @@ vcpkg_download_distfile(DIFF ) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) +# apply hotfix to fix issues with building 32bit version +vcpkg_download_distfile(DIFF + URLS "http://stellar-group.org/files/Fixing-32bit-MSVC-compilation.diff" + FILENAME "Fixing-32bit-MSVC-compilation.diff" + SHA512 31c904d317b4c24eddd819e4856f8326ff3850a5a196c7648c46a11dbb85f35e972e077957b3c4aec67c8b043816fe1cebc92cfe28ed815f682537dfc3421b8b +) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) + SET(BOOST_PATH "${CURRENT_INSTALLED_DIR}/share/boost") SET(HWLOC_PATH "${CURRENT_INSTALLED_DIR}/share/hwloc") @@ -39,11 +47,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +# post build cleanup +file(RENAME ${CURRENT_PACKAGES_DIR}/share/hpx-1.0.0 ${CURRENT_PACKAGES_DIR}/share/hpx) + file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/hpx RENAME copyright) -# post build cleanup file(GLOB __hpx_cmakes ${CURRENT_PACKAGES_DIR}/lib/cmake/HPX/*.*) foreach(__hpx_cmake ${__hpx_cmakes}) file(COPY ${__hpx_cmake} DESTINATION ${CURRENT_PACKAGES_DIR}/share/hpx/cmake) -- cgit v1.2.3 From 633d52348b249299e68ec4328ea9a25f1c8640eb Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Mon, 22 May 2017 16:29:09 -0500 Subject: Adding another patch enabling to build HPX if UNICODE is set --- ports/hpx/CONTROL | 2 +- ports/hpx/portfile.cmake | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ports/hpx/CONTROL b/ports/hpx/CONTROL index e6bfb7e1e..c1433102a 100644 --- a/ports/hpx/CONTROL +++ b/ports/hpx/CONTROL @@ -1,5 +1,5 @@ Source: hpx -Version: 1.0.0 +Version: 1.0.0-3 Build-Depends: boost, hwloc Description: The C++ Standards Library for Concurrency and Parallelism HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case. diff --git a/ports/hpx/portfile.cmake b/ports/hpx/portfile.cmake index d051d8084..3c51bb13b 100644 --- a/ports/hpx/portfile.cmake +++ b/ports/hpx/portfile.cmake @@ -1,8 +1,9 @@ include(vcpkg_common_functions) -if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(FATAL_ERROR "HPX can be built with dynamic linking only") -endif() +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building of HPX not supported yet. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hpx_1.0.0) @@ -29,6 +30,15 @@ vcpkg_download_distfile(DIFF ) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) +# apply hotfix to fix issues when building with UNICODE enabled +vcpkg_download_distfile(DIFF + URLS "http://stellar-group.org/files/Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" + FILENAME "Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" + SHA512 8fcdb36307702d64b9d2b26920374a6c5a29a50d125305dc95926c4cbc91215cb0c72ede83b06d0fc007fe7b2283845e08351bd45f11f3677f0d3db4ac8f9424 +) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) + + SET(BOOST_PATH "${CURRENT_INSTALLED_DIR}/share/boost") SET(HWLOC_PATH "${CURRENT_INSTALLED_DIR}/share/hwloc") -- cgit v1.2.3 From b8db426e037b66e94591f612cf74d2609df9b41b Mon Sep 17 00:00:00 2001 From: pravic Date: Tue, 23 May 2017 16:38:16 +0300 Subject: [sciter] Update to 4.0.1.0 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 62cc3309d..d6f84d4da 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.0.0.9-2 +Version: 4.0.1.0 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 5c7c7c5c6..7d5016f1c 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,9 +12,9 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_VERSION 4.0.0.9) -set(SCITER_REVISION 43565156c373f9635cc491551b870a948d4d6f37) -set(SCITER_SHA 6c50822c46784a8b2114973dffa8ec4041c69f84303507fdcde425dbac8d698dd6241a209cdc0ae0663751ed0f78d92f7b0c26794417f374978bfb3e33bf004c) +set(SCITER_VERSION 4.0.1.0) +set(SCITER_REVISION 67d2939a0510886c036c7c41267603463cbf96e0) +set(SCITER_SHA adf77354cc8624892ac1daaf03cba56cf8c3f2d7f77426977011af2a3070f685f51fd594dfb58a7fc7421f3d8c418ba47afb6ceb00170c8623eefcedfe1dca82) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From 8f230963fbd2675e6c709982fcad68b8471f0a69 Mon Sep 17 00:00:00 2001 From: yintothayang Date: Tue, 23 May 2017 23:18:29 +0900 Subject: new port for RedShell SDK --- ports/redshell/CONTROL | 3 +++ ports/redshell/portfile.cmake | 47 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 ports/redshell/CONTROL create mode 100644 ports/redshell/portfile.cmake diff --git a/ports/redshell/CONTROL b/ports/redshell/CONTROL new file mode 100644 index 000000000..34632b1fc --- /dev/null +++ b/ports/redshell/CONTROL @@ -0,0 +1,3 @@ +Source: redshell +Version: 1.0.0 +Description: RedShell C++ SDK. Steam attribution tracking, www.redshell.io diff --git a/ports/redshell/portfile.cmake b/ports/redshell/portfile.cmake new file mode 100644 index 000000000..89fef684a --- /dev/null +++ b/ports/redshell/portfile.cmake @@ -0,0 +1,47 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/redshell) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Innervate/red-shell-cpp + REF 1.0.0 + SHA512 00c79a09e92131e4ee0f46b14a2280bdb4e8c5970876dba99e8edd2294813f1b602eb0c9c8e24c9fd363a5c276dfa3daaf71f6ba2774842a8b565c803b3ff08c + HEAD_REF master +) + +# Header .h +file(COPY + "${SOURCE_PATH}/include/RedShell.h" + DESTINATION ${CURRENT_PACKAGES_DIR}/include/redshell +) + +# Debug .lib +file(COPY + "${SOURCE_PATH}/lib/${VCPKG_TARGET_ARCHITECTURE}/debug/RedShell.lib" + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +# Release .lib +file(COPY + "${SOURCE_PATH}/lib/${VCPKG_TARGET_ARCHITECTURE}/RedShell.lib" + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) + +# Debug .dll +file(COPY + "${SOURCE_PATH}/bin/${VCPKG_TARGET_ARCHITECTURE}/debug/RedShell.dll" + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) + +# Release .dll +file(COPY + "${SOURCE_PATH}/bin/${VCPKG_TARGET_ARCHITECTURE}/RedShell.dll" + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) + +# Copyright +file(COPY + "${SOURCE_PATH}/LICENSE.txt" + DESTINATION ${CURRENT_PACKAGES_DIR}/share/redshell/copyright +) -- cgit v1.2.3 From c37a0f1dca1b844daf2a5a515e1f5c6e98ff1292 Mon Sep 17 00:00:00 2001 From: yintothayang Date: Wed, 24 May 2017 00:39:25 +0900 Subject: disallow ARM and UWP arch --- ports/redshell/portfile.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ports/redshell/portfile.cmake b/ports/redshell/portfile.cmake index 89fef684a..c394d7013 100644 --- a/ports/redshell/portfile.cmake +++ b/ports/redshell/portfile.cmake @@ -1,5 +1,13 @@ include(vcpkg_common_functions) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm) + message(FATAL_ERROR "Error: redshell does not support the ARM architecture.") +endif() + +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Error: redshell does not support UWP builds.") +endif() + set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/redshell) vcpkg_from_github( -- cgit v1.2.3 From 5ba2f0d81cf9ad13d544606608f314230a0db283 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 May 2017 11:53:20 -0700 Subject: scripts/fetchDependency.ps1: Retain previous code for hashing to support Win7 --- scripts/fetchDependency.ps1 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index bbc027861..6c2e85b60 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -10,7 +10,7 @@ $downloadPromptOverride_DO_NOT_PROMPT = 1 $downloadPromptOverride_ALWAYS_PROMPT = 2 if ($PSVersionTable.PSEdition -eq "Desktop") { - Import-Module BitsTransfer -Verbose:$false + Import-Module BitsTransfer -Verbose:$false } Write-Verbose "Fetching dependency: $Dependency" @@ -197,8 +197,18 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) performDownload $Dependency $url $downloadsDir $downloadPath $downloadVersion $requiredVersion #calculating the hash - $downloadedFileHash = (Get-FileHash -Path $downloadPath -Algorithm SHA256).Hash - + if ($PSVersionTable.PSEdition -eq "Desktop") + { + $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256") + $fileAsByteArray = [io.File]::ReadAllBytes($downloadPath) + $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) + $downloadedFileHash = -Join ($hashByteArray | ForEach {"{0:x2}" -f $_}) + } + else + { + $downloadedFileHash = (Get-FileHash -Path $downloadPath -Algorithm SHA256).Hash + } + if ($expectedDownloadedFileHash -ne $downloadedFileHash) { throw [System.IO.FileNotFoundException] ("Mismatching hash of the downloaded " + $Dependency) -- cgit v1.2.3 From 2629a3696fae89147953d3d3eeb4d89aaba1951d Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 23 May 2017 13:09:58 -0700 Subject: Brotli #1150 Created a brotli port file --- ports/brotli/portfile.cmake | 61 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 ports/brotli/portfile.cmake diff --git a/ports/brotli/portfile.cmake b/ports/brotli/portfile.cmake new file mode 100644 index 000000000..7dde90739 --- /dev/null +++ b/ports/brotli/portfile.cmake @@ -0,0 +1,61 @@ +include(vcpkg_common_functions) +find_program(GIT git) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) +set(INCLUDE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/c/include/brotli) + +set(GIT_URL "https://github.com/google/brotli.git") +set(GIT_REF "0a84e9bf864dfe3862bfe7b4e09650ff283c9825") + +if(NOT EXISTS "${DOWNLOADS}/brotli.git") + message(STATUS "Cloning") + vcpkg_execute_required_process( + COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/brotli.git + WORKING_DIRECTORY ${DOWNLOADS} + LOGNAME clone + ) +endif() + +if(NOT EXISTS "${SOURCE_PATH}/.git") + message(STATUS "Adding worktree and patching") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + vcpkg_execute_required_process( + COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${GIT_REF} + WORKING_DIRECTORY ${DOWNLOADS}/brotli.git + LOGNAME worktree + ) + message(STATUS "Patching") +endif() + + +vcpkg_configure_cmake( + SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src" + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + + +file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") +file(GLOB DLLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll") +file(GLOB LIBS "${CURRENT_PACKAGES_DIR}/bin/*.lib") +file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +file(GLOB DEBUG_DLLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll") +file(GLOB DEBUG_LIBS "${CURRENT_PACKAGES_DIR}/debug/bin/*.lib") +file(GLOB HEADERS "${INCLUDE_DIRECTORY}/*.h") +file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(COPY ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(COPY ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/brotli) +file(REMOVE ${EXES}) +file(REMOVE ${LIBS}) +file(REMOVE ${DEBUG_EXES}) +file(REMOVE ${DEBUG_LIBS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brotli RENAME copyright) + +#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/) +#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) -- cgit v1.2.3 From 29c80c72f4bfc4e6055003d405aba55dfa901ae8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 23 May 2017 14:10:42 -0700 Subject: [plibsys] Use vcpkg_from_github --- ports/plibsys/portfile.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/plibsys/portfile.cmake b/ports/plibsys/portfile.cmake index 749fa27f5..b70fe771d 100644 --- a/ports/plibsys/portfile.cmake +++ b/ports/plibsys/portfile.cmake @@ -1,13 +1,13 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/plibsys-0.0.3) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://github.com/saprykin/plibsys/archive/0.0.3.tar.gz" - FILENAME "plibsys-0.0.3.tar.gz" +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO saprykin/plibsys + REF 0.0.3 SHA512 e2393fecb3e5feae81a4d60cd03e2ca17bc58453efaa5598beacdc5acedbc7c90374f9f851301fee08ace8dace843a2dff8c1c449cd457302363c98dd24e0415 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (VCPKG_CRT_LINKAGE STREQUAL dynamic) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) SET(PLIBSYS_STATIC OFF) else() SET(PLIBSYS_STATIC ON) -- cgit v1.2.3 From e607ff8a7ba1e44812c0a2ea4306c1660b51b640 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 23 May 2017 15:08:19 -0700 Subject: [brotli] Use vcpkg_from_github and latest stable release --- ports/brotli/CONTROL | 3 ++ ports/brotli/portfile.cmake | 92 ++++++++++++++++++++------------------------- 2 files changed, 44 insertions(+), 51 deletions(-) create mode 100644 ports/brotli/CONTROL diff --git a/ports/brotli/CONTROL b/ports/brotli/CONTROL new file mode 100644 index 000000000..75a2973a0 --- /dev/null +++ b/ports/brotli/CONTROL @@ -0,0 +1,3 @@ +Source: brotli +Version: 0.6.0 +Description: a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling. diff --git a/ports/brotli/portfile.cmake b/ports/brotli/portfile.cmake index 7dde90739..36e489bc4 100644 --- a/ports/brotli/portfile.cmake +++ b/ports/brotli/portfile.cmake @@ -1,61 +1,51 @@ include(vcpkg_common_functions) -find_program(GIT git) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) -set(INCLUDE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/c/include/brotli) - -set(GIT_URL "https://github.com/google/brotli.git") -set(GIT_REF "0a84e9bf864dfe3862bfe7b4e09650ff283c9825") - -if(NOT EXISTS "${DOWNLOADS}/brotli.git") - message(STATUS "Cloning") - vcpkg_execute_required_process( - COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/brotli.git - WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME clone - ) -endif() - -if(NOT EXISTS "${SOURCE_PATH}/.git") - message(STATUS "Adding worktree and patching") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) - vcpkg_execute_required_process( - COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${GIT_REF} - WORKING_DIRECTORY ${DOWNLOADS}/brotli.git - LOGNAME worktree - ) - message(STATUS "Patching") -endif() +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/brotli + REF v0.6.0 + SHA512 36caa277790efeb5bff0fdc090cdcf00fd9995c4e81a60ed31d36af2e13848ec1afe5d84e6926eebbee013525191e9404e112cb7fbede16097221c5bc3dfb5d5 + HEAD_REF master +) vcpkg_configure_cmake( - SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src" - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) -vcpkg_install_cmake() +vcpkg_build_cmake() - -file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") -file(GLOB DLLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll") -file(GLOB LIBS "${CURRENT_PACKAGES_DIR}/bin/*.lib") -file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") -file(GLOB DEBUG_DLLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll") -file(GLOB DEBUG_LIBS "${CURRENT_PACKAGES_DIR}/debug/bin/*.lib") -file(GLOB HEADERS "${INCLUDE_DIRECTORY}/*.h") -file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(COPY ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(COPY ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/brotli) -file(REMOVE ${EXES}) -file(REMOVE ${LIBS}) -file(REMOVE ${DEBUG_EXES}) -file(REMOVE ${DEBUG_LIBS}) +file(GLOB DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" +) +file(GLOB LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" +) +file(GLOB DEBUG_DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" +) +file(GLOB DEBUG_LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" +) +file(GLOB HEADERS "${SOURCE_PATH}/c/include/brotli/*.h" "${SOURCE_PATH}/include/brotli/*.h") +if(DLLS) + file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() +file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/brotli) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brotli RENAME copyright) -#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/) -#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) +vcpkg_copy_pdbs() -- cgit v1.2.3 From ceae20960f93592b5b8cd77fb3adfd98224906de Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 23 May 2017 15:39:36 -0700 Subject: [gli] Use vcpkg_from_github. Use GLI license, not GLM license. --- ports/gli/CONTROL | 2 +- ports/gli/portfile.cmake | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/ports/gli/CONTROL b/ports/gli/CONTROL index 2b1a5ccb4..b8edac798 100644 --- a/ports/gli/CONTROL +++ b/ports/gli/CONTROL @@ -1,4 +1,4 @@ Source: gli -Version: 0.8.2 +Version: 0.8.2-1 Build-Depends: glm Description: OpenGL Image (GLI) https://gli.g-truc.net diff --git a/ports/gli/portfile.cmake b/ports/gli/portfile.cmake index c0854909f..305233619 100644 --- a/ports/gli/portfile.cmake +++ b/ports/gli/portfile.cmake @@ -1,20 +1,19 @@ #header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gli-0.8.2.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/g-truc/gli/archive/0.8.2.0.tar.gz" - FILENAME "0.8.2.0.tar.gz" + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO g-truc/gli + REF 0.8.2.0 SHA512 c254a4e1497d0add985e4a882c552db99c512cc0e9cc72145d51a6e7deada817d624d9818099a47136a8a3ef1223a26a34e355e3c713166f0bb062e506059834 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) - -# Remove glm/CMakeLists.txt -file(REMOVE ${SOURCE_PATH}/glm/CMakeLists.txt) # Put the license file where vcpkg expects it -file(COPY ${SOURCE_PATH}/external/glm/copying.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gli/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/gli/copying.txt ${CURRENT_PACKAGES_DIR}/share/gli/copyright) +# manual.md contains the "licenses" section for the project +file(COPY ${SOURCE_PATH}/manual.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/gli/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/gli/manual.md ${CURRENT_PACKAGES_DIR}/share/gli/copyright) # Copy the glm header files -file(GLOB HEADER_FILES ${SOURCE_PATH}/gli/*) +file(GLOB HEADER_FILES "${SOURCE_PATH}/gli/*.hpp" "${SOURCE_PATH}/gli/core") file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/gli) -- cgit v1.2.3 From e748a448ebb466d2d06ca9b3c0f43d6e849e8b67 Mon Sep 17 00:00:00 2001 From: codicodi Date: Mon, 22 May 2017 11:57:19 +0200 Subject: [tbb] update to 2017 U6 --- ports/tbb/CONTROL | 2 +- ports/tbb/portfile.cmake | 85 +++++++++++++++++++----------------------------- 2 files changed, 34 insertions(+), 53 deletions(-) diff --git a/ports/tbb/CONTROL b/ports/tbb/CONTROL index b82b70555..9dc9198f8 100644 --- a/ports/tbb/CONTROL +++ b/ports/tbb/CONTROL @@ -1,3 +1,3 @@ Source: tbb -Version: 20160916 +Version: 2017_U6 Description: Intel's Threading Building Blocks. diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index fc761f113..a733be711 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -1,24 +1,26 @@ -# 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} -# - if (VCPKG_LIBRARY_LINKAGE STREQUAL static) message(STATUS "Warning: Static building not supported yet. Building dynamic.") set(VCPKG_LIBRARY_LINKAGE dynamic) endif() +if (VCPKG_CRT_LINKAGE STREQUAL static OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Build settings not supported") +endif() + include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO 01org/tbb + REF 2017_U6 + SHA512 76b49fd085d8407b68b0f17e6eebfbcb7d2e6f9116bb5f6a00c6b4d59a55b16f9de79a2b9c9c3ece497b01810c33df21d0657893fd886db8bed639091ba97060 + HEAD_REF tbb_2017) + +if(TRIPLET_SYSTEM_ARCH STREQUAL x86) + set(BUILD_ARCH Win32) +else() + set(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) +endif() -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tbb2017_20160916oss) -vcpkg_download_distfile(ARCHIVE - URLS "https://www.threadingbuildingblocks.org/sites/default/files/software_releases/windows/tbb2017_20160916oss_win_1.zip" - FILENAME "tbb2017_20160916oss_win_1.zip" - SHA512 14bbc54aa0c4506bab6e6fdb7e9e562cbc88881cb683a8bd690e3101177e55433f25a2143e7af1ed52edacb44dc92fab354e1f2101bc13b33b3ea137def8bdd1 -) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_build_msbuild(PROJECT_PATH ${SOURCE_PATH}/build/vs2012/makefile.sln PLATFORM ${BUILD_ARCH}) # Installation message(STATUS "Installing") @@ -27,54 +29,33 @@ file(COPY ${SOURCE_PATH}/include/serial DESTINATION ${CURRENT_PACKAGES_DIR}/include) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(BIN_PATH ${SOURCE_PATH}/bin/intel64/vc14) - set(LIB_PATH ${SOURCE_PATH}/lib/intel64/vc14) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(BIN_PATH ${SOURCE_PATH}/bin/ia32/vc14) - set(LIB_PATH ${SOURCE_PATH}/lib/ia32/vc14) -else() - message(FATAL_ERROR "Unsupported architecture") -endif() +set(DEBUG_OUTPUT_PATH ${SOURCE_PATH}/build/vs2012/${BUILD_ARCH}/Debug) +set(RELEASE_OUTPUT_PATH ${SOURCE_PATH}/build/vs2012/${BUILD_ARCH}/Release) file(COPY - ${LIB_PATH}/tbb.lib - ${LIB_PATH}/tbb_preview.lib - ${LIB_PATH}/tbbmalloc.lib - ${LIB_PATH}/tbbmalloc_proxy.lib - ${LIB_PATH}/tbbproxy.lib - ${LIB_PATH}/tbbproxy.pdb + ${RELEASE_OUTPUT_PATH}/tbb.lib + ${RELEASE_OUTPUT_PATH}/tbbmalloc.lib + ${RELEASE_OUTPUT_PATH}/tbbmalloc_proxy.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(COPY - ${LIB_PATH}/tbb_debug.lib - ${LIB_PATH}/tbb_preview_debug.lib - ${LIB_PATH}/tbbmalloc_debug.lib - ${LIB_PATH}/tbbmalloc_proxy_debug.lib - ${LIB_PATH}/tbbproxy_debug.lib - ${LIB_PATH}/tbbproxy_debug.pdb + ${DEBUG_OUTPUT_PATH}/tbb_debug.lib + ${DEBUG_OUTPUT_PATH}/tbbmalloc_debug.lib + ${DEBUG_OUTPUT_PATH}/tbbmalloc_proxy_debug.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(COPY - ${BIN_PATH}/tbb.dll - ${BIN_PATH}/tbb_preview.dll - ${BIN_PATH}/tbbmalloc.dll - ${BIN_PATH}/tbbmalloc_proxy.dll - ${BIN_PATH}/tbb.pdb - ${BIN_PATH}/tbb_preview.pdb - ${BIN_PATH}/tbbmalloc.pdb - ${BIN_PATH}/tbbmalloc_proxy.pdb + ${RELEASE_OUTPUT_PATH}/tbb.dll + ${RELEASE_OUTPUT_PATH}/tbbmalloc.dll + ${RELEASE_OUTPUT_PATH}/tbbmalloc_proxy.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) file(COPY - ${BIN_PATH}/tbb_debug.dll - ${BIN_PATH}/tbb_preview_debug.dll - ${BIN_PATH}/tbbmalloc_debug.dll - ${BIN_PATH}/tbbmalloc_proxy_debug.dll - ${BIN_PATH}/tbb_debug.pdb - ${BIN_PATH}/tbb_preview_debug.pdb - ${BIN_PATH}/tbbmalloc_debug.pdb - ${BIN_PATH}/tbbmalloc_proxy_debug.pdb + ${DEBUG_OUTPUT_PATH}/tbb_debug.dll + ${DEBUG_OUTPUT_PATH}/tbbmalloc_debug.dll + ${DEBUG_OUTPUT_PATH}/tbbmalloc_proxy_debug.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +vcpkg_copy_pdbs() + message(STATUS "Installing done") # Handle copyright -- cgit v1.2.3 From 6be01a12db23788c32ca8cc8e70b8467ae912d1d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 24 May 2017 00:44:00 -0700 Subject: [vcpkg] Refactored to simplify BuildPolicies into BuildPolicy. Restrict policy consumers to a simpler interface than std::map. Rename vcpkg::getMachineType -> vcpkg::to_machine_type. --- .gitattributes | 3 + toolsrc/include/MachineType.h | 2 +- toolsrc/include/PostBuildLint_BuildPolicies.h | 47 ---------------- toolsrc/include/pch.h | 1 + toolsrc/include/vcpkg_Build.h | 39 +++++++++++-- toolsrc/src/MachineType.cpp | 2 +- toolsrc/src/PostBuildLint.cpp | 32 ++++------- toolsrc/src/PostBuildLint_BuildPolicies.cpp | 80 --------------------------- toolsrc/src/coff_file_reader.cpp | 6 +- toolsrc/src/vcpkg_Build.cpp | 37 +++++++++---- toolsrc/src/vcpkg_Build_BuildPolicy.cpp | 51 +++++++++++++++++ toolsrc/vcpkglib/vcpkglib.vcxproj | 5 +- toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 15 ++--- 13 files changed, 138 insertions(+), 182 deletions(-) delete mode 100644 toolsrc/include/PostBuildLint_BuildPolicies.h delete mode 100644 toolsrc/src/PostBuildLint_BuildPolicies.cpp create mode 100644 toolsrc/src/vcpkg_Build_BuildPolicy.cpp diff --git a/.gitattributes b/.gitattributes index 9812ceb1f..a83b236d4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,4 @@ *.patch text eol=lf +*.vcxproj text eol=crlf +*.vcxproj.filters text eol=crlf +*.sln text eol=crlf \ No newline at end of file diff --git a/toolsrc/include/MachineType.h b/toolsrc/include/MachineType.h index 2318c092b..6f61bbd53 100644 --- a/toolsrc/include/MachineType.h +++ b/toolsrc/include/MachineType.h @@ -32,5 +32,5 @@ namespace vcpkg WCEMIPSV2 = 0x169, // MIPS little-endian WCE v2 }; - MachineType getMachineType(const uint16_t value); + MachineType to_machine_type(const uint16_t value); } diff --git a/toolsrc/include/PostBuildLint_BuildPolicies.h b/toolsrc/include/PostBuildLint_BuildPolicies.h deleted file mode 100644 index 95e01d71c..000000000 --- a/toolsrc/include/PostBuildLint_BuildPolicies.h +++ /dev/null @@ -1,47 +0,0 @@ -#pragma once -#include "CStringView.h" -#include -#include - -namespace vcpkg::PostBuildLint -{ - struct BuildPolicies final - { - enum class BackingEnum - { - NULLVALUE = 0, - EMPTY_PACKAGE, - DLLS_WITHOUT_LIBS, - ONLY_RELEASE_CRT, - EMPTY_INCLUDE_FOLDER, - ALLOW_OBSOLETE_MSVCRT - }; - - static BuildPolicies parse(const std::string& s); - - constexpr BuildPolicies() : backing_enum(BackingEnum::NULLVALUE) {} - constexpr explicit BuildPolicies(BackingEnum backing_enum) : backing_enum(backing_enum) {} - constexpr operator BackingEnum() const { return backing_enum; } - - const std::string& to_string() const; - const std::string& cmake_variable() const; - - private: - BackingEnum backing_enum; - }; - - namespace BuildPoliciesC - { - static constexpr CStringView ENUM_NAME = "vcpkg::PostBuildLint::BuildPolicies"; - - static constexpr BuildPolicies NULLVALUE(BuildPolicies::BackingEnum::NULLVALUE); - static constexpr BuildPolicies EMPTY_PACKAGE(BuildPolicies::BackingEnum::EMPTY_PACKAGE); - static constexpr BuildPolicies DLLS_WITHOUT_LIBS(BuildPolicies::BackingEnum::DLLS_WITHOUT_LIBS); - static constexpr BuildPolicies ONLY_RELEASE_CRT(BuildPolicies::BackingEnum::ONLY_RELEASE_CRT); - static constexpr BuildPolicies EMPTY_INCLUDE_FOLDER(BuildPolicies::BackingEnum::EMPTY_INCLUDE_FOLDER); - static constexpr BuildPolicies ALLOW_OBSOLETE_MSVCRT(BuildPolicies::BackingEnum::ALLOW_OBSOLETE_MSVCRT); - - static constexpr std::array VALUES = { - EMPTY_PACKAGE, DLLS_WITHOUT_LIBS, ONLY_RELEASE_CRT, EMPTY_INCLUDE_FOLDER, ALLOW_OBSOLETE_MSVCRT}; - } -} diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index 2eee658c8..c58c30ea3 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h index 4deb81900..45b3ff1e8 100644 --- a/toolsrc/include/vcpkg_Build.h +++ b/toolsrc/include/vcpkg_Build.h @@ -1,12 +1,13 @@ #pragma once +#include "CStringView.h" #include "PackageSpec.h" -#include "PostBuildLint_BuildPolicies.h" #include "PostBuildLint_LinkageType.h" #include "StatusParagraphs.h" #include "VcpkgPaths.h" #include "vcpkg_Files.h" #include "vcpkg_optional.h" + #include #include #include @@ -69,16 +70,46 @@ namespace vcpkg::Build const BuildPackageConfig& config, const StatusParagraphs& status_db); - struct BuildInfo + enum class BuildPolicy + { + EMPTY_PACKAGE, + DLLS_WITHOUT_LIBS, + ONLY_RELEASE_CRT, + EMPTY_INCLUDE_FOLDER, + ALLOW_OBSOLETE_MSVCRT, + // Must be last + COUNT, + }; + + Optional to_build_policy(const std::string& str); + + const std::string& to_string(BuildPolicy policy); + CStringView to_cmake_variable(BuildPolicy policy); + + struct BuildPolicies { - static BuildInfo create(std::unordered_map pgh); + BuildPolicies() {} + BuildPolicies(std::map&& map) : m_policies(std::move(map)) {} + inline bool is_enabled(BuildPolicy policy) const + { + auto it = m_policies.find(policy); + if (it != m_policies.cend()) return it->second; + return false; + } + + private: + std::map m_policies; + }; + + struct BuildInfo + { PostBuildLint::LinkageType crt_linkage; PostBuildLint::LinkageType library_linkage; Optional version; - std::map policies; + BuildPolicies policies; }; BuildInfo read_build_info(const Files::Filesystem& fs, const fs::path& filepath); diff --git a/toolsrc/src/MachineType.cpp b/toolsrc/src/MachineType.cpp index f288855e6..2f44ce21a 100644 --- a/toolsrc/src/MachineType.cpp +++ b/toolsrc/src/MachineType.cpp @@ -5,7 +5,7 @@ namespace vcpkg { - MachineType getMachineType(const uint16_t value) + MachineType to_machine_type(const uint16_t value) { MachineType t = static_cast(value); switch (t) diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 4491f3f2e..bcad27032 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -12,6 +12,7 @@ using vcpkg::Build::PreBuildInfo; using vcpkg::Build::BuildInfo; +using vcpkg::Build::BuildPolicy; namespace vcpkg::PostBuildLint { @@ -37,16 +38,7 @@ namespace vcpkg::PostBuildLint } }; - template - static bool contains_and_enabled(const std::map map, const T& key) - { - auto it = map.find(key); - if (it != map.cend()) return it->second; - - return false; - } - - const std::vector& get_outdated_dynamic_crts(const std::map& policies) + const std::vector& get_outdated_dynamic_crts(const Build::BuildPolicies& policies) { static const std::vector v_no_msvcrt = { {"msvcp100.dll", R"(msvcp100\.dll)"}, @@ -73,7 +65,7 @@ namespace vcpkg::PostBuildLint return ret; }(); - if (contains_and_enabled(policies, BuildPoliciesC::ALLOW_OBSOLETE_MSVCRT)) + if (policies.is_enabled(BuildPolicy::ALLOW_OBSOLETE_MSVCRT)) { return v_no_msvcrt; } @@ -82,10 +74,10 @@ namespace vcpkg::PostBuildLint } static LintStatus check_for_files_in_include_directory(const Files::Filesystem& fs, - const std::map& policies, + const Build::BuildPolicies& policies, const fs::path& package_dir) { - if (contains_and_enabled(policies, BuildPoliciesC::EMPTY_INCLUDE_FOLDER)) + if (policies.is_enabled(BuildPolicy::EMPTY_INCLUDE_FOLDER)) { return LintStatus::SUCCESS; } @@ -511,16 +503,12 @@ namespace vcpkg::PostBuildLint return LintStatus::ERROR_DETECTED; } - static LintStatus check_lib_files_are_available_if_dlls_are_available(const std::map& policies, + static LintStatus check_lib_files_are_available_if_dlls_are_available(const Build::BuildPolicies& policies, const size_t lib_count, const size_t dll_count, const fs::path& lib_dir) { - auto it = policies.find(BuildPoliciesC::DLLS_WITHOUT_LIBS); - if (it != policies.cend() && it->second) - { - return LintStatus::SUCCESS; - } + if (policies.is_enabled(BuildPolicy::DLLS_WITHOUT_LIBS)) return LintStatus::SUCCESS; if (lib_count == 0 && dll_count != 0) { @@ -528,7 +516,7 @@ namespace vcpkg::PostBuildLint System::println(System::Color::warning, "If this is intended, add the following line in the portfile:\n" " SET(%s enabled)", - BuildPoliciesC::DLLS_WITHOUT_LIBS.cmake_variable()); + to_cmake_variable(BuildPolicy::DLLS_WITHOUT_LIBS)); return LintStatus::ERROR_DETECTED; } @@ -750,7 +738,7 @@ namespace vcpkg::PostBuildLint size_t error_count = 0; - if (contains_and_enabled(build_info.policies, BuildPoliciesC::EMPTY_PACKAGE)) + if (build_info.policies.is_enabled(BuildPolicy::EMPTY_PACKAGE)) { return error_count; } @@ -822,7 +810,7 @@ namespace vcpkg::PostBuildLint error_count += check_bin_folders_are_not_present_in_static_build(fs, package_dir); - if (!contains_and_enabled(build_info.policies, BuildPoliciesC::ONLY_RELEASE_CRT)) + if (!build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT)) { error_count += check_crt_linkage_of_libs( BuildType::value_of(ConfigurationTypeC::DEBUG, build_info.crt_linkage), diff --git a/toolsrc/src/PostBuildLint_BuildPolicies.cpp b/toolsrc/src/PostBuildLint_BuildPolicies.cpp deleted file mode 100644 index d2189e20d..000000000 --- a/toolsrc/src/PostBuildLint_BuildPolicies.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#include "pch.h" - -#include "PostBuildLint_BuildPolicies.h" -#include "vcpkg_Checks.h" -#include "vcpkg_Enums.h" - -namespace vcpkg::PostBuildLint -{ - static const std::string NULLVALUE_STRING = Enums::nullvalue_to_string(BuildPoliciesC::ENUM_NAME); - - static const std::string NAME_EMPTY_PACKAGE = "PolicyEmptyPackage"; - static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs"; - static const std::string NAME_ONLY_RELEASE_CRT = "PolicyOnlyReleaseCRT"; - static const std::string NAME_EMPTY_INCLUDE_FOLDER = "PolicyEmptyIncludeFolder"; - static const std::string NAME_ALLOW_OBSOLETE_MSVCRT = "PolicyAllowObsoleteMsvcrt"; - - BuildPolicies BuildPolicies::parse(const std::string& s) - { - if (s == NAME_EMPTY_PACKAGE) - { - return BuildPoliciesC::EMPTY_PACKAGE; - } - - if (s == NAME_DLLS_WITHOUT_LIBS) - { - return BuildPoliciesC::DLLS_WITHOUT_LIBS; - } - - if (s == NAME_ONLY_RELEASE_CRT) - { - return BuildPoliciesC::ONLY_RELEASE_CRT; - } - - if (s == NAME_EMPTY_INCLUDE_FOLDER) - { - return BuildPoliciesC::EMPTY_INCLUDE_FOLDER; - } - - if (s == NAME_ALLOW_OBSOLETE_MSVCRT) - { - return BuildPoliciesC::ALLOW_OBSOLETE_MSVCRT; - } - - return BuildPoliciesC::NULLVALUE; - } - - const std::string& BuildPolicies::to_string() const - { - switch (this->backing_enum) - { - case BuildPoliciesC::EMPTY_PACKAGE: return NAME_EMPTY_PACKAGE; - case BuildPoliciesC::DLLS_WITHOUT_LIBS: return NAME_DLLS_WITHOUT_LIBS; - case BuildPoliciesC::ONLY_RELEASE_CRT: return NAME_ONLY_RELEASE_CRT; - case BuildPoliciesC::EMPTY_INCLUDE_FOLDER: return NAME_EMPTY_INCLUDE_FOLDER; - case BuildPoliciesC::ALLOW_OBSOLETE_MSVCRT: return NAME_ALLOW_OBSOLETE_MSVCRT; - case BuildPoliciesC::NULLVALUE: return NULLVALUE_STRING; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - - const std::string& BuildPolicies::cmake_variable() const - { - static const std::string CMAKE_VARIABLE_EMPTY_PACKAGE = "VCPKG_POLICY_EMPTY_PACKAGE"; - static const std::string CMAKE_VARIABLE_DLLS_WITHOUT_LIBS = "VCPKG_POLICY_DLLS_WITHOUT_LIBS"; - static const std::string CMAKE_VARIABLE_ONLY_RELEASE_CRT = "VCPKG_POLICY_ONLY_RELEASE_CRT"; - static const std::string CMAKE_VARIABLE_EMPTY_INCLUDE_FOLDER = "VCPKG_POLICY_EMPTY_INCLUDE_FOLDER"; - static const std::string CMAKE_VARIABLE_ALLOW_OBSOLETE_MSVCRT = "VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT"; - - switch (this->backing_enum) - { - case BuildPoliciesC::EMPTY_PACKAGE: return CMAKE_VARIABLE_EMPTY_PACKAGE; - case BuildPoliciesC::DLLS_WITHOUT_LIBS: return CMAKE_VARIABLE_DLLS_WITHOUT_LIBS; - case BuildPoliciesC::ONLY_RELEASE_CRT: return CMAKE_VARIABLE_ONLY_RELEASE_CRT; - case BuildPoliciesC::EMPTY_INCLUDE_FOLDER: return CMAKE_VARIABLE_EMPTY_INCLUDE_FOLDER; - case BuildPoliciesC::ALLOW_OBSOLETE_MSVCRT: return CMAKE_VARIABLE_ALLOW_OBSOLETE_MSVCRT; - case BuildPoliciesC::NULLVALUE: Enums::nullvalue_used(VCPKG_LINE_INFO, BuildPoliciesC::ENUM_NAME); - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } -} diff --git a/toolsrc/src/coff_file_reader.cpp b/toolsrc/src/coff_file_reader.cpp index 467fc9a64..b06c6d57b 100644 --- a/toolsrc/src/coff_file_reader.cpp +++ b/toolsrc/src/coff_file_reader.cpp @@ -87,7 +87,7 @@ namespace vcpkg::COFFFileReader std::string machine_field_as_string = data.substr(MACHINE_TYPE_OFFSET, MACHINE_TYPE_SIZE); const uint16_t machine = reinterpret_bytes(machine_field_as_string.c_str()); - return getMachineType(machine); + return to_machine_type(machine); } private: @@ -210,7 +210,7 @@ namespace vcpkg::COFFFileReader std::string machine_field_as_string = data.substr(MACHINE_TYPE_OFFSET, MACHINE_TYPE_SIZE); const uint16_t machine = reinterpret_bytes(machine_field_as_string.c_str()); - return getMachineType(machine); + return to_machine_type(machine); } private: @@ -297,7 +297,7 @@ namespace vcpkg::COFFFileReader marker.set_to_offset(offset + ArchiveMemberHeader::HEADER_SIZE); // Skip the header, no need to read it. marker.seek_to_marker(fs); const uint16_t first_two_bytes = peek_value_from_stream(fs); - const bool isImportHeader = getMachineType(first_two_bytes) == MachineType::UNKNOWN; + const bool isImportHeader = to_machine_type(first_two_bytes) == MachineType::UNKNOWN; const MachineType machine = isImportHeader ? ImportHeader::read(fs).machineType() : CoffFileHeader::read(fs).machineType(); machine_types.insert(machine); diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index 6605fa4fb..d44a673fc 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -13,8 +13,6 @@ #include "vcpkglib.h" #include "vcpkglib_helpers.h" -using vcpkg::PostBuildLint::BuildPolicies; -namespace BuildPoliciesC = vcpkg::PostBuildLint::BuildPoliciesC; using vcpkg::PostBuildLint::LinkageType; namespace LinkageTypeC = vcpkg::PostBuildLint::LinkageTypeC; @@ -214,7 +212,7 @@ namespace vcpkg::Build Commands::Version::version()); } - BuildInfo BuildInfo::create(std::unordered_map pgh) + static BuildInfo inner_create_buildinfo(std::unordered_map pgh) { BuildInfo build_info; const std::string crt_linkage_as_string = @@ -240,20 +238,35 @@ namespace vcpkg::Build pgh.erase(it_version); } + std::map policies; + // The remaining entries are policies for (const std::unordered_map::value_type& p : pgh) { - const BuildPolicies policy = BuildPolicies::parse(p.first); - Checks::check_exit( - VCPKG_LINE_INFO, policy != BuildPoliciesC::NULLVALUE, "Unknown policy found: %s", p.first); - if (p.second == "enabled") - build_info.policies.emplace(policy, true); - else if (p.second == "disabled") - build_info.policies.emplace(policy, false); + auto maybe_policy = to_build_policy(p.first); + if (auto policy = maybe_policy.get()) + { + Checks::check_exit(VCPKG_LINE_INFO, + policies.find(*policy) == policies.end(), + "Policy specified multiple times: %s", + p.first); + + if (p.second == "enabled") + policies.emplace(*policy, true); + else if (p.second == "disabled") + policies.emplace(*policy, false); + else + Checks::exit_with_message( + VCPKG_LINE_INFO, "Unknown setting for policy '%s': %s", p.first, p.second); + } else - Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown setting for policy '%s': %s", p.first, p.second); + { + Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown policy found: %s", p.first); + } } + build_info.policies = BuildPolicies(std::move(policies)); + return build_info; } @@ -262,7 +275,7 @@ namespace vcpkg::Build const Expected> pghs = Paragraphs::get_single_paragraph(fs, filepath); Checks::check_exit(VCPKG_LINE_INFO, pghs.get() != nullptr, "Invalid BUILD_INFO file for package"); - return BuildInfo::create(*pghs.get()); + return inner_create_buildinfo(*pghs.get()); } PreBuildInfo PreBuildInfo::from_triplet_file(const VcpkgPaths& paths, const Triplet& triplet) diff --git a/toolsrc/src/vcpkg_Build_BuildPolicy.cpp b/toolsrc/src/vcpkg_Build_BuildPolicy.cpp new file mode 100644 index 000000000..e75e176a2 --- /dev/null +++ b/toolsrc/src/vcpkg_Build_BuildPolicy.cpp @@ -0,0 +1,51 @@ +#include "pch.h" + +#include "vcpkg_Build.h" +#include "vcpkg_Checks.h" +#include "vcpkg_Enums.h" + +namespace vcpkg::Build +{ + static const std::string NAME_EMPTY_PACKAGE = "PolicyEmptyPackage"; + static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs"; + static const std::string NAME_ONLY_RELEASE_CRT = "PolicyOnlyReleaseCRT"; + static const std::string NAME_EMPTY_INCLUDE_FOLDER = "PolicyEmptyIncludeFolder"; + static const std::string NAME_ALLOW_OBSOLETE_MSVCRT = "PolicyAllowObsoleteMsvcrt"; + + Optional to_build_policy(const std::string& s) + { + if (s == NAME_EMPTY_PACKAGE) return BuildPolicy::EMPTY_PACKAGE; + if (s == NAME_DLLS_WITHOUT_LIBS) return BuildPolicy::DLLS_WITHOUT_LIBS; + if (s == NAME_ONLY_RELEASE_CRT) return BuildPolicy::ONLY_RELEASE_CRT; + if (s == NAME_EMPTY_INCLUDE_FOLDER) return BuildPolicy::EMPTY_INCLUDE_FOLDER; + if (s == NAME_ALLOW_OBSOLETE_MSVCRT) return BuildPolicy::ALLOW_OBSOLETE_MSVCRT; + + return nullopt; + } + + const std::string& to_string(BuildPolicy policy) + { + switch (policy) + { + case BuildPolicy::EMPTY_PACKAGE: return NAME_EMPTY_PACKAGE; + case BuildPolicy::DLLS_WITHOUT_LIBS: return NAME_DLLS_WITHOUT_LIBS; + case BuildPolicy::ONLY_RELEASE_CRT: return NAME_ONLY_RELEASE_CRT; + case BuildPolicy::EMPTY_INCLUDE_FOLDER: return NAME_EMPTY_INCLUDE_FOLDER; + case BuildPolicy::ALLOW_OBSOLETE_MSVCRT: return NAME_ALLOW_OBSOLETE_MSVCRT; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + + CStringView to_cmake_variable(BuildPolicy policy) + { + switch (policy) + { + case BuildPolicy::EMPTY_PACKAGE: return "VCPKG_POLICY_EMPTY_PACKAGE"; + case BuildPolicy::DLLS_WITHOUT_LIBS: return "VCPKG_POLICY_DLLS_WITHOUT_LIBS"; + case BuildPolicy::ONLY_RELEASE_CRT: return "VCPKG_POLICY_ONLY_RELEASE_CRT"; + case BuildPolicy::EMPTY_INCLUDE_FOLDER: return "VCPKG_POLICY_EMPTY_INCLUDE_FOLDER"; + case BuildPolicy::ALLOW_OBSOLETE_MSVCRT: return "VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT"; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } +} diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 472f4d4e9..4ec37a16d 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -141,8 +141,8 @@ + - @@ -154,7 +154,6 @@ - @@ -189,7 +188,7 @@ - + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index f8958b4a6..895eb2a4a 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -129,9 +129,6 @@ Source Files - - Source Files - Source Files @@ -183,6 +180,9 @@ Source Files + + Source Files + @@ -257,18 +257,12 @@ Header Files - - Header Files - Header Files Header Files - - Header Files - Header Files @@ -314,5 +308,8 @@ Header Files + + Header Files + \ No newline at end of file -- cgit v1.2.3 From 2b944c21e84a38af5628c849141fe959eb1c65e1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 24 May 2017 03:33:20 -0700 Subject: [vcpkg] Fix regression on Windows 7/8 introduced with Powershell Core support --- scripts/fetchDependency.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6c2e85b60..b6144d581 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -9,7 +9,7 @@ $downloadPromptOverride_NO_OVERRIDE= 0 $downloadPromptOverride_DO_NOT_PROMPT = 1 $downloadPromptOverride_ALWAYS_PROMPT = 2 -if ($PSVersionTable.PSEdition -eq "Desktop") { +if ($PSVersionTable.PSEdition -ne "Core") { Import-Module BitsTransfer -Verbose:$false } @@ -82,7 +82,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) New-Item -ItemType directory -Path $downloadDir | Out-Null } - if (($PSVersionTable.PSEdition -eq "Desktop") -and ($Dependency -ne "git")) # git fails with BITS + if (($PSVersionTable.PSEdition -ne "Core") -and ($Dependency -ne "git")) # git fails with BITS { try { $WC = New-Object System.Net.WebClient @@ -197,7 +197,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) performDownload $Dependency $url $downloadsDir $downloadPath $downloadVersion $requiredVersion #calculating the hash - if ($PSVersionTable.PSEdition -eq "Desktop") + if ($PSVersionTable.PSEdition -ne "Core") { $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256") $fileAsByteArray = [io.File]::ReadAllBytes($downloadPath) -- cgit v1.2.3 From 1c4f0e51839bb67c14fbffb71a5a9be9de14ac91 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 24 May 2017 15:49:47 +0200 Subject: [hwloc] build from source --- ports/hwloc/CMakeLists.txt | 51 ++++++++++++++++++++++++++++++++++++ ports/hwloc/CONTROL | 2 +- ports/hwloc/portfile.cmake | 64 ++++++++++++++++++++-------------------------- 3 files changed, 80 insertions(+), 37 deletions(-) create mode 100644 ports/hwloc/CMakeLists.txt diff --git a/ports/hwloc/CMakeLists.txt b/ports/hwloc/CMakeLists.txt new file mode 100644 index 000000000..7f75c558c --- /dev/null +++ b/ports/hwloc/CMakeLists.txt @@ -0,0 +1,51 @@ +cmake_minimum_required(VERSION 3.0) +project(hwloc C) + +configure_file(contrib/windows/hwloc_config.h include/hwloc/autogen/config.h COPYONLY) +configure_file(contrib/windows/static-components.h include/static-components.h COPYONLY) +configure_file(contrib/windows/private_config.h include/private/autogen/config.h COPYONLY) + +file(READ ${CMAKE_CURRENT_BINARY_DIR}/include/private/autogen/config.h PRIVATE_CONFIG_H) +string(REPLACE "#define HAVE_DECL_SNPRINTF 0" "#define HAVE_DECL_SNPRINTF 1" PRIVATE_CONFIG_H "${PRIVATE_CONFIG_H}") +string(REPLACE "#define HAVE_DECL_STRTOULL 0" "#define HAVE_DECL_STRTOULL 1" PRIVATE_CONFIG_H "${PRIVATE_CONFIG_H}") +if(CMAKE_SIZEOF_VOID_P EQUAL 4) + string(REPLACE "/* #undef HWLOC_X86_32_ARCH */" "#define HWLOC_X86_32_ARCH 1" PRIVATE_CONFIG_H "${PRIVATE_CONFIG_H}") + string(REPLACE "#define HWLOC_X86_64_ARCH 1" "/* #undef HWLOC_X86_64_ARCH */" PRIVATE_CONFIG_H "${PRIVATE_CONFIG_H}") + string(REPLACE "#define SIZEOF_VOID_P 8" "#define SIZEOF_VOID_P 4" PRIVATE_CONFIG_H "${PRIVATE_CONFIG_H}") +endif() +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/private/autogen/config.h "${PRIVATE_CONFIG_H}") + +add_library(libhwloc + src/base64.c + src/bind.c + src/bitmap.c + src/components.c + src/distances.c + src/diff.c + src/misc.c + src/pci-common.c + src/topology-custom.c + src/topology-noos.c + src/topology-synthetic.c + src/topology-windows.c + src/topology-x86.c + src/topology-xml-nolibxml.c + src/topology-xml.c + src/topology.c + src/traversal.c + src/dolib.c) + +set_target_properties(libhwloc PROPERTIES DEFINE_SYMBOL _USRDLL) +target_include_directories(libhwloc PRIVATE ./include ./src ${CMAKE_CURRENT_BINARY_DIR}/include) +target_compile_definitions(libhwloc PRIVATE _CRT_SECURE_NO_WARNINGS) + +install(TARGETS libhwloc + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +if(NOT HWLOC_SKIP_INCLUDES) + install(FILES include/hwloc.h DESTINATION include) + install(DIRECTORY include/hwloc DESTINATION include FILES_MATCHING PATTERN "*.h") + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/hwloc/autogen/config.h DESTINATION include/hwloc/autogen) +endif() diff --git a/ports/hwloc/CONTROL b/ports/hwloc/CONTROL index f79c957e5..1bd3af628 100644 --- a/ports/hwloc/CONTROL +++ b/ports/hwloc/CONTROL @@ -1,4 +1,4 @@ Source: hwloc -Version: 1.11.7 +Version: 1.11.7-1 Description: Portable Hardware Locality (hwloc) The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various system attributes such as cache and memory information as well as the locality of I/O devices such as network interfaces, InfiniBand HCAs or GPUs. diff --git a/ports/hwloc/portfile.cmake b/ports/hwloc/portfile.cmake index c689d621f..a2031bdcb 100644 --- a/ports/hwloc/portfile.cmake +++ b/ports/hwloc/portfile.cmake @@ -1,41 +1,33 @@ -include(vcpkg_common_functions) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "UWP builds not supported") +endif() -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - vcpkg_download_distfile(ARCHIVE - URLS "https://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-win32-build-1.11.7.zip" - FILENAME "hwloc-win32-build-1.11.7.zip" - SHA512 c474f2400b207bbad3da94d201d03eb711df6a87aacb8429c489591ed47393eb499d99da5737a22d0745194296db11bf9e8ebbabd4bf2ecfd2d2878a773195d8 - ) - set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hwloc-win32-build-1.11.7) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - vcpkg_download_distfile(ARCHIVE - URLS "https://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-win64-build-1.11.7.zip" - FILENAME "hwloc-win64-build-1.11.7.zip" - SHA512 1373107f75f372fa519a7c3f686fbb6ff89e14c3750e1d64755c768daf77a01a1d962b5e7ecadc65f9917b56f45193e637db3958a0bede08cfe2dd983a335d9b - ) - set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hwloc-win64-build-1.11.7) +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO open-mpi/hwloc + REF hwloc-1.11.7 + SHA512 bc3a74c60bfbed1e860c2fe2b5b49956eca5cfd9c00a262f6cd3026a42ae8b5411fa296e471a95cba657d943b8853675442e796e648034398af3015e5f59476e) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DHWLOC_SKIP_INCLUDES=ON) + +vcpkg_install_cmake() + +file(READ ${CURRENT_PACKAGES_DIR}/include/hwloc/autogen/config.h PUBLIC_CONFIG_H) +string(REPLACE "defined( DECLSPEC_EXPORTS )" "0" PUBLIC_CONFIG_H "${PUBLIC_CONFIG_H}") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined( _USRDLL )" "0" PUBLIC_CONFIG_H "${PUBLIC_CONFIG_H}") else() - message(FATAL_ERROR "HWLOC is not available for download for the platform: ${VCPKG_TARGET_ARCHITECTURE}") + string(REPLACE "defined( _USRDLL )" "1" PUBLIC_CONFIG_H "${PUBLIC_CONFIG_H}") endif() -vcpkg_extract_source_archive(${ARCHIVE}) - -message(STATUS "Installing") - -# copy include files -file(COPY ${SOURCE_PATH}/include/hwloc.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${SOURCE_PATH}/include/hwloc DESTINATION ${CURRENT_PACKAGES_DIR}/include) - -# copy binaries -file(COPY ${SOURCE_PATH}/bin/libhwloc-5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(COPY ${SOURCE_PATH}/lib/libhwloc.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - -file(COPY ${SOURCE_PATH}/bin/libhwloc-5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(COPY ${SOURCE_PATH}/lib/libhwloc.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -message(STATUS "Installing done") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/hwloc/autogen/config.h "${PUBLIC_CONFIG_H}") # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/hwloc) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/hwloc/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/hwloc/copyright) - -set(VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT enabled) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/hwloc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/hwloc/COPYING ${CURRENT_PACKAGES_DIR}/share/hwloc/copyright) -- cgit v1.2.3 From 61ad15ce0bf1b3b866623ad91647537fe1a36b2f Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 24 May 2017 20:46:16 +0200 Subject: [freetype] update to 2.8 --- .../0002-Add-CONFIG_INSTALL_PATH-option.patch | 36 ++++++++-------------- ports/freetype/CONTROL | 2 +- ports/freetype/portfile.cmake | 10 +++--- 3 files changed, 19 insertions(+), 29 deletions(-) diff --git a/ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch b/ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch index 33b0b920f..eeecbc1f7 100644 --- a/ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch +++ b/ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch @@ -1,29 +1,17 @@ -From 59ebd2985f081229edc3c487367a1e5d5ac8db9a Mon Sep 17 00:00:00 2001 -From: Robert Schumacher -Date: Mon, 10 Oct 2016 23:00:38 -0700 -Subject: [PATCH] Add CONFIG_INSTALL_PATH option - ---- - CMakeLists.txt | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - diff --git a/CMakeLists.txt b/CMakeLists.txt -index 774737d..5de689c 100644 +index 6bb2558..a894ada 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -401,8 +401,11 @@ install(TARGETS freetype - ARCHIVE DESTINATION lib - FRAMEWORK DESTINATION Library/Frameworks - ) +@@ -419,8 +419,11 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) + ARCHIVE DESTINATION lib + FRAMEWORK DESTINATION Library/Frameworks + ) + -+set(CONFIG_INSTALL_PATH "lib/cmake/freetype" CACHE STRING "location to install cmake config files") ++ set(CONFIG_INSTALL_PATH "lib/cmake/freetype" CACHE STRING "location to install cmake config files") + - install(EXPORT freetype-targets -- DESTINATION lib/cmake/freetype -+ DESTINATION ${CONFIG_INSTALL_PATH} - FILE freetype-config.cmake - ) - --- -2.9.2.windows.1 - + install(EXPORT freetype-targets +- DESTINATION lib/cmake/freetype ++ DESTINATION ${CONFIG_INSTALL_PATH} + FILE freetype-config.cmake + ) + endif () diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL index 3afd18c9d..541f8b024 100644 --- a/ports/freetype/CONTROL +++ b/ports/freetype/CONTROL @@ -1,4 +1,4 @@ Source: freetype -Version: 2.6.3-5 +Version: 2.8 Build-Depends: zlib, bzip2, libpng Description: A library to render fonts. \ No newline at end of file diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake index b5c20a610..8bce2577e 100644 --- a/ports/freetype/portfile.cmake +++ b/ports/freetype/portfile.cmake @@ -1,9 +1,10 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freetype-2.6.3) +set(FT_VERSION 2.8) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freetype-${FT_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "http://download.savannah.gnu.org/releases/freetype/freetype-2.6.3.tar.bz2" - FILENAME "freetype-2.6.3.tar.bz2" - SHA512 e1f9018835fc88beeb4479537b59f866c52393ae18d24a1e0710a464cf948ab02b35c2c6043bc20c1db3a04871ee4eb0bb1d210550c0ea2780c8b1aea98fbf0d + URLS "http://download.savannah.gnu.org/releases/freetype/freetype-${FT_VERSION}.tar.bz2" + FILENAME "freetype-${FT_VERSION}.tar.bz2" + SHA512 3842c34bf6100a8c9b78258146b2ff35e9bb4c993937d3ef09982c1e2552dfd15f8849ddd8a1e84edf08b5a5fb918b68cf7b1584545c5900e22a00bfa1c89ff5 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -16,6 +17,7 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DCONFIG_INSTALL_PATH=share/freetype -DWITH_ZLIB=ON -- cgit v1.2.3 From 14c3c51a009e1764b7f1141cdc024493bced5d8d Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Wed, 24 May 2017 22:34:02 +0300 Subject: [sqlite3] update to 3.19.1 --- ports/sqlite3/CONTROL | 2 +- ports/sqlite3/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index f1d9bde16..d833f02b9 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,3 +1,3 @@ Source: sqlite3 -Version: 3.18.0-1 +Version: 3.19.1-1 Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. \ No newline at end of file diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index 1b906fba5..768cd83a6 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(SQLITE_VERSION 3180000) -set(SQLITE_HASH d390c1d83afc27ec184ea6ab392477647cc80eb97ca177797cd494409c5646435c7a84502cc74ded1b654af13e65d2eef444bb0255a127e59d2cf40d5d0c1192) +set(SQLITE_VERSION 3190100) +set(SQLITE_HASH 14064707d9ca029131ec92863026748e184ad4d6ca9d25e941fc254d9ad24f1451fc5fae6516603a420925aab1736e3fb92085f03d8dc47ec913839e158652c4) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite-amalgamation-${SQLITE_VERSION}) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From de8a0a5d7ead87365b8c63c177f490fea98322c9 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 24 May 2017 13:00:07 -0700 Subject: created Apache Thrift portfile --- ports/thrift/portfile.cmake | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 ports/thrift/portfile.cmake diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake new file mode 100644 index 000000000..474872094 --- /dev/null +++ b/ports/thrift/portfile.cmake @@ -0,0 +1,54 @@ +include(vcpkg_common_functions) + +set(WINFLEXBISON_PATH ${CURRENT_BUILDTREES_DIR}/flex) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/thrift + REF 0.10.0 + SHA512 1ca372654cf556e41aecda041ada150515bbb469ba75b05300127702d1f41049338ca67b6e46ce39d89cbf27c1da9ebee75b06bad0cc4035def7a36843dbe8fe + HEAD_REF master +) + +message(STATUS "download win flex bison") +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-latest.zip/download" + FILENAME "win_flex_bison-latest.zip" + SHA512 1a6c1fa3b7603df4db2efbb88c31b28ff1a641d4607afdb89e65e76aedf8da821979f1a9f5a1d291149a567c68346321dcbcffe0d517a836e7099b41dc6d9538 +) +message(STATUS "done download") + +file(MAKE_DIRECTORY "${WINFLEXBISON_PATH}") +vcpkg_execute_required_process( + COMMAND ${CMAKE_COMMAND} -E tar xfz ${ARCHIVE} + WORKING_DIRECTORY ${WINFLEXBISON_PATH} + LOGNAME extract-winflex +) + + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/thrift-0.10.0) +set(FLEX_EXECUTABLE "${WINFLEXBISON_PATH}/win_flex.exe") +set(BISON_EXECUTABLE "${WINFLEXBISON_PATH}/win_bison.exe") + + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SHARED_LIB=OFF -DWITH_STATIC_LIB=ON -DBUILD_TESTING=off -DBUILD_JAVA=off -DBUILD_C_GLIB=off -DBUILD_PYTHON=off -DBUILD_CPP=on -DBUILD_HASKELL=off -DBUILD_TUTORIALS=off -DFLEX_EXECUTABLE=${FLEX_EXECUTABLE} -DBISON_EXECUTABLE=${BISON_EXECUTABLE} +) +message(STATUS "Build ${TARGET_TRIPLET}-rel") +vcpkg_execute_required_process( + COMMAND ${CMAKE_COMMAND} --build . --target INSTALL --config Release + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME build-${TARGET_TRIPLET}-rel +) +message(STATUS "Build ${TARGET_TRIPLET}-rel done") + +message(STATUS "Build ${TARGET_TRIPLET}-dbg") +vcpkg_execute_required_process( + COMMAND ${CMAKE_COMMAND} --build . --target INSTALL --config Debug + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME build-${TARGET_TRIPLET}-dbg +) +message(STATUS "Build ${TARGET_TRIPLET}-dbg done") -- cgit v1.2.3 From 0704b2a2b3c08a7cbefdb23a57ec7aae08b9e722 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 24 May 2017 13:00:36 -0700 Subject: Create CONTROL --- ports/thrift/CONTROL | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 ports/thrift/CONTROL diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL new file mode 100644 index 000000000..958f8a1fa --- /dev/null +++ b/ports/thrift/CONTROL @@ -0,0 +1,4 @@ +Source: thrift +Version: 0.10.0 +Build-Depends: boost, zlib, libevent, openssl +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. -- cgit v1.2.3 From e01c52396160747221c70df31d5801272606ce15 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 24 May 2017 14:27:24 -0700 Subject: fixed issue with binaries --- ports/thrift/portfile.cmake | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 474872094..419b5772c 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -1,7 +1,6 @@ include(vcpkg_common_functions) set(WINFLEXBISON_PATH ${CURRENT_BUILDTREES_DIR}/flex) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -27,7 +26,6 @@ vcpkg_execute_required_process( ) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/thrift-0.10.0) set(FLEX_EXECUTABLE "${WINFLEXBISON_PATH}/win_flex.exe") set(BISON_EXECUTABLE "${WINFLEXBISON_PATH}/win_bison.exe") @@ -35,20 +33,23 @@ set(BISON_EXECUTABLE "${WINFLEXBISON_PATH}/win_bison.exe") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SHARED_LIB=OFF -DWITH_STATIC_LIB=ON -DBUILD_TESTING=off -DBUILD_JAVA=off -DBUILD_C_GLIB=off -DBUILD_PYTHON=off -DBUILD_CPP=on -DBUILD_HASKELL=off -DBUILD_TUTORIALS=off -DFLEX_EXECUTABLE=${FLEX_EXECUTABLE} -DBISON_EXECUTABLE=${BISON_EXECUTABLE} + OPTIONS -DWITH_SHARED_LIB=OFF -DWITH_STATIC_LIB=ON -DBUILD_TESTING=off -DBUILD_JAVA=off -DBUILD_C_GLIB=off -DBUILD_PYTHON=off -DBUILD_CPP=on -DBUILD_HASKELL=off -DBUILD_TUTORIALS=off -DFLEX_EXECUTABLE=${FLEX_EXECUTABLE} -DBISON_EXECUTABLE=${BISON_EXECUTABLE} ) -message(STATUS "Build ${TARGET_TRIPLET}-rel") -vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --target INSTALL --config Release - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME build-${TARGET_TRIPLET}-rel -) -message(STATUS "Build ${TARGET_TRIPLET}-rel done") -message(STATUS "Build ${TARGET_TRIPLET}-dbg") -vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --target INSTALL --config Debug - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME build-${TARGET_TRIPLET}-dbg -) -message(STATUS "Build ${TARGET_TRIPLET}-dbg done") +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/thrift RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") +file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") + +if(EXES) + file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +vcpkg_copy_pdbs() -- cgit v1.2.3 From a5eb44f1a62315f673b8f2f48c1d3895dcceabda Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 24 May 2017 15:51:18 -0700 Subject: [vcpkg] Rename CoffFileHeader::machineType -> machine_type --- toolsrc/src/coff_file_reader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/coff_file_reader.cpp b/toolsrc/src/coff_file_reader.cpp index b06c6d57b..6c38c452b 100644 --- a/toolsrc/src/coff_file_reader.cpp +++ b/toolsrc/src/coff_file_reader.cpp @@ -80,7 +80,7 @@ namespace vcpkg::COFFFileReader return ret; } - MachineType machineType() const + MachineType machine_type() const { static const size_t MACHINE_TYPE_OFFSET = 0; static const size_t MACHINE_TYPE_SIZE = 2; @@ -203,7 +203,7 @@ namespace vcpkg::COFFFileReader return ret; } - MachineType machineType() const + MachineType machine_type() const { static const size_t MACHINE_TYPE_OFFSET = 6; static const size_t MACHINE_TYPE_SIZE = 2; @@ -236,7 +236,7 @@ namespace vcpkg::COFFFileReader read_and_verify_PE_signature(fs); CoffFileHeader header = CoffFileHeader::read(fs); - MachineType machine = header.machineType(); + MachineType machine = header.machine_type(); return {machine}; } @@ -299,7 +299,7 @@ namespace vcpkg::COFFFileReader const uint16_t first_two_bytes = peek_value_from_stream(fs); const bool isImportHeader = to_machine_type(first_two_bytes) == MachineType::UNKNOWN; const MachineType machine = - isImportHeader ? ImportHeader::read(fs).machineType() : CoffFileHeader::read(fs).machineType(); + isImportHeader ? ImportHeader::read(fs).machine_type() : CoffFileHeader::read(fs).machine_type(); machine_types.insert(machine); } -- cgit v1.2.3 From 81fe73d02061866c2188fc8d9e13f9990a20d64d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 24 May 2017 15:54:12 -0700 Subject: [vcpkg] Add comments --- toolsrc/include/BinaryParagraph.h | 3 +++ toolsrc/include/SourceParagraph.h | 3 +++ toolsrc/include/StatusParagraph.h | 3 +++ toolsrc/include/vcpkg_Build.h | 6 ++++++ 4 files changed, 15 insertions(+) diff --git a/toolsrc/include/BinaryParagraph.h b/toolsrc/include/BinaryParagraph.h index 90ca8fe9a..1c2edf790 100644 --- a/toolsrc/include/BinaryParagraph.h +++ b/toolsrc/include/BinaryParagraph.h @@ -6,6 +6,9 @@ namespace vcpkg { + /// + /// Built package metadata + /// struct BinaryParagraph { BinaryParagraph(); diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 8d51b45d4..19f558170 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -15,6 +15,9 @@ namespace vcpkg const std::string& to_string(const Dependency& dep); + /// + /// Port metadata (CONTROL file) + /// struct SourceParagraph { SourceParagraph(); diff --git a/toolsrc/include/StatusParagraph.h b/toolsrc/include/StatusParagraph.h index ad913d11b..2d1815dc0 100644 --- a/toolsrc/include/StatusParagraph.h +++ b/toolsrc/include/StatusParagraph.h @@ -23,6 +23,9 @@ namespace vcpkg PURGE }; + /// + /// Installed package metadata + /// struct StatusParagraph { StatusParagraph(); diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h index 45b3ff1e8..e0a5ae1ce 100644 --- a/toolsrc/include/vcpkg_Build.h +++ b/toolsrc/include/vcpkg_Build.h @@ -33,8 +33,14 @@ namespace vcpkg::Build std::string create_error_message(const BuildResult build_result, const PackageSpec& spec); std::string create_user_troubleshooting_message(const PackageSpec& spec); + /// + /// 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 target_architecture; -- cgit v1.2.3 From 888ebcb293f4e263c755fa71393292e45de992f9 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 24 May 2017 16:28:23 -0700 Subject: Created Apache Arrow Control #978 --- ports/arrow/CONTROL | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 ports/arrow/CONTROL diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL new file mode 100644 index 000000000..2e0233bb6 --- /dev/null +++ b/ports/arrow/CONTROL @@ -0,0 +1,4 @@ +Source: arrow +Version: apache-arrow-0.4.0 +Build-Depends: boost +Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. -- cgit v1.2.3 From 1bca466fcb223bcecd2ddd4c97a16a35a9cf0528 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 24 May 2017 16:30:01 -0700 Subject: Created Apache Arrow portfile #978 Note: this portfile only works 64 bit --- ports/arrow/portfile.cmake | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ports/arrow/portfile.cmake diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake new file mode 100644 index 000000000..d82610e11 --- /dev/null +++ b/ports/arrow/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/arrow + REF apache-arrow-0.4.0 + SHA512 cdd67a884528b088688d88c0627b9c13077215e234dd0772797f0bf63319ffc18533276d52110a37a0938d32f006023b74dce93e71d34b1e0003a86761cea6ee + HEAD_REF master +) + + +set(CPP_SOURCE_PATH "${SOURCE_PATH}/cpp") + +vcpkg_configure_cmake( + SOURCE_PATH ${CPP_SOURCE_PATH} + OPTIONS -DARROW_BUILD_TESTS=off +) + + +vcpkg_install_cmake() + + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/arrow RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From d8149aae0838f70bcdb9e2b2f26469250d702789 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 24 May 2017 18:39:27 -0700 Subject: Apache Arrow only supports x64 --- ports/arrow/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index d82610e11..9bf6f999e 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -1,5 +1,9 @@ include(vcpkg_common_functions) +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + message(FATAL_ERROR "Apache Arrow only supports x64") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/arrow -- cgit v1.2.3 From c5d7766b0049c0d292c1886689b08f3d4d2c9057 Mon Sep 17 00:00:00 2001 From: Hennadii Zabula Date: Tue, 23 May 2017 12:31:09 +0300 Subject: Fix double conversion build --- ports/double-conversion/001-fix-arm.patch | 13 +++++++++++++ ports/double-conversion/portfile.cmake | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 ports/double-conversion/001-fix-arm.patch diff --git a/ports/double-conversion/001-fix-arm.patch b/ports/double-conversion/001-fix-arm.patch new file mode 100644 index 000000000..98ce2080c --- /dev/null +++ b/ports/double-conversion/001-fix-arm.patch @@ -0,0 +1,13 @@ +diff --git a/double-conversion/utils.h b/double-conversion/utils.h" +index 51d5e61..24cd5f1 100644 +--- a/double-conversion/utils.h ++++ "b/double-conversion/utils.h" +@@ -68,7 +68,7 @@ inline void abort_noreturn() { abort(); } + // disabled.) + // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) + #if defined(_M_X64) || defined(__x86_64__) || \ +- defined(__ARMEL__) || defined(__avr32__) || \ ++ defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || \ + defined(__hppa__) || defined(__ia64__) || \ + defined(__mips__) || \ + defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index 05365d777..c5f954c1f 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -22,6 +22,12 @@ vcpkg_download_distfile(ARCHIVE SHA512 1406dc22b4ea71e1a2490f96cfed3230e122b97607c83ba106df4e90c7e4bfdcfc136c88741e7f1127237b38b4944d462ec5a4627a71f5ea3fe14afbcc64cd44 ) vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-arm.patch +) + vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=True) vcpkg_install_cmake() -- cgit v1.2.3 From b1104ad7e5f0e410bf4b03ca53a39d8affb6c41c Mon Sep 17 00:00:00 2001 From: Hennadii Zabula Date: Thu, 25 May 2017 17:09:13 +0300 Subject: Fix pcre arm uwp build --- ports/pcre/fix-arm-config-define.patch | 54 ++++++++++++++++++++++++++++++++++ ports/pcre/fix-option.patch | 19 +++++++++--- ports/pcre/portfile.cmake | 3 +- 3 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 ports/pcre/fix-arm-config-define.patch diff --git a/ports/pcre/fix-arm-config-define.patch b/ports/pcre/fix-arm-config-define.patch new file mode 100644 index 000000000..94ca808c3 --- /dev/null +++ b/ports/pcre/fix-arm-config-define.patch @@ -0,0 +1,54 @@ +diff --git a/sljit/sljitConfigInternal.h b/sljit/sljitConfigInternal.h +index 4dc452f..5a9827d 100644 +--- "a/sljit/sljitConfigInternal.h" ++++ "b/sljit/sljitConfigInternal.h" +@@ -149,7 +149,7 @@ + + #if defined(_M_X64) || defined(__x86_64__) + #define SLJIT_CONFIG_X86_64 1 +-#elif defined(_ARM_) ++#elif defined(_M_ARM) + #define SLJIT_CONFIG_ARM_V5 1 + #else + #define SLJIT_CONFIG_X86_32 1 +@@ -332,9 +332,16 @@ + + #else + ++#if defined(__linux__) + /* Calls __ARM_NR_cacheflush on ARM-Linux. */ + #define SLJIT_CACHE_FLUSH(from, to) \ + __clear_cache((char*)(from), (char*)(to)) ++#elif(_WIN32) ++#pragma comment(lib, "kernel32.lib") ++uint32_t FlushInstructionCache(void *hProcess, void *lpBaseAddress, uintptr_t dwSize); ++#define SLJIT_CACHE_FLUSH(from, to) \ ++ FlushInstructionCache(GetCurrentProcess(), (void*)(from), (uintptr_t)(to - from)); ++#endif + + #endif + +diff --git "a/sljit/sljitNativeARM_32.c" "b/sljit/sljitNativeARM_32.c" +index a756f82..86bdcbb 100644 +--- "a/sljit/sljitNativeARM_32.c" ++++ "b/sljit/sljitNativeARM_32.c" +@@ -1798,7 +1798,8 @@ extern "C" { + extern unsigned int __aeabi_uidivmod(unsigned int numerator, unsigned int denominator); + extern int __aeabi_idivmod(int numerator, int denominator); + #else +-#error "Software divmod functions are needed" ++extern unsigned int __aeabi_uidivmod(unsigned int numerator, unsigned int denominator); ++extern int __aeabi_idivmod(int numerator, int denominator); + #endif + + #ifdef __cplusplus +@@ -1852,7 +1853,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile + FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, + ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod)))); + #else +-#error "Software divmod functions are needed" ++ FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, ++ ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod)))); + #endif + + if ((op >= SLJIT_DIV_UW) && (compiler->scratches >= 3)) { diff --git a/ports/pcre/fix-option.patch b/ports/pcre/fix-option.patch index d1a2b13eb..bbaf4df91 100644 --- a/ports/pcre/fix-option.patch +++ b/ports/pcre/fix-option.patch @@ -2,12 +2,23 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 42451ad..858a34b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -191,7 +191,7 @@ IF (MINGW) +@@ -74,7 +74,6 @@ PROJECT(PCRE C CXX) + # CMP0026 to avoid warnings for the use of LOCATION in GET_TARGET_PROPERTY. + + CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) +-CMAKE_POLICY(SET CMP0026 OLD) + + SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake + +@@ -191,9 +190,8 @@ IF (MINGW) ENDIF(MINGW) IF(MSVC) - OPTION(PCRE_STATIC_RUNTIME OFF CACHE BOOL -+ OPTION(PCRE_STATIC_RUNTIME - "ON=Compile against the static runtime (/MT)." - OFF) +- "ON=Compile against the static runtime (/MT)." +- OFF) ++ add_definitions(/wd4703) ++ OPTION(PCRE_STATIC_RUNTIME "ON=Compile against the static runtime (/MT)." OFF) OPTION(INSTALL_MSVC_PDB + "ON=Install .pdb files built by MSVC, if generated" + OFF) diff --git a/ports/pcre/portfile.cmake b/ports/pcre/portfile.cmake index 3b310b7ea..9e5a933ff 100644 --- a/ports/pcre/portfile.cmake +++ b/ports/pcre/portfile.cmake @@ -18,7 +18,8 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-option.patch) + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-option.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-arm-config-define.patch) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From f1bf4276955ef2b1d93b6181bdd89b5af836712f Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 25 May 2017 08:42:01 -0700 Subject: Added Flex and Bison to vcpkg_find_acquire_program --- scripts/cmake/vcpkg_find_acquire_program.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 5c8a00ad2..7edfb4628 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -84,6 +84,12 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://github.com/mesonbuild/meson/archive/0.40.1.zip") set(ARCHIVE "meson-0.40.1.zip") set(HASH 4c1d07f32d527859f762c34de74d31d569573fc833335ab9652ed38d1f9e64b49869e826527c28a6a07cb8e594fd5c647b34aa95e626236a2707f75df0a2d435) + elseif(VAR MATCHES "WINFLEXBISON") + set(PROGNAME winflexbison) + set(PATHS ${DOWNLOADS}/tools/winflexbison) + set(URL "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-2.5.9.zip/download") + set(ARCHIVE "win_flex_bison-2.5.9.zip") + set(HASH 9580f0e46893670a011645947c1becda69909a41a38bb4197fe33bd1ab7719da6b80e1be316f269e1a4759286870d49a9b07ef83afc4bac33232bd348e0bc814) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() -- cgit v1.2.3 From 8d10c7ac34a0856877fed83a6e45986bdf1b1ef7 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 25 May 2017 08:45:58 -0700 Subject: Use vcpkg_find_acquire_program -used vcpkg_find_acquire_program -added warning because dynamic building not supported -removed duplicate command --- ports/thrift/portfile.cmake | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 419b5772c..af66b4a57 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -1,6 +1,11 @@ include(vcpkg_common_functions) -set(WINFLEXBISON_PATH ${CURRENT_BUILDTREES_DIR}/flex) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported. Building static.") # See note below + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_find_acquire_program(WINFLEXBISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -10,25 +15,8 @@ vcpkg_from_github( HEAD_REF master ) -message(STATUS "download win flex bison") -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-latest.zip/download" - FILENAME "win_flex_bison-latest.zip" - SHA512 1a6c1fa3b7603df4db2efbb88c31b28ff1a641d4607afdb89e65e76aedf8da821979f1a9f5a1d291149a567c68346321dcbcffe0d517a836e7099b41dc6d9538 -) -message(STATUS "done download") - -file(MAKE_DIRECTORY "${WINFLEXBISON_PATH}") -vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} -E tar xfz ${ARCHIVE} - WORKING_DIRECTORY ${WINFLEXBISON_PATH} - LOGNAME extract-winflex -) - - -set(FLEX_EXECUTABLE "${WINFLEXBISON_PATH}/win_flex.exe") -set(BISON_EXECUTABLE "${WINFLEXBISON_PATH}/win_bison.exe") - +set(FLEX_EXECUTABLE "${DOWNLOADS}/tools/winflexbison/win_flex.exe") +set(BISON_EXECUTABLE "${DOWNLOADS}/tools/winflexbison/win_bison.exe") vcpkg_configure_cmake( @@ -40,10 +28,7 @@ vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/thrift RENAME copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") -file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") if(EXES) file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -- cgit v1.2.3 From ac7d832d2d93028949d527737e566cde501145d5 Mon Sep 17 00:00:00 2001 From: Jim McGrath Date: Thu, 25 May 2017 13:41:59 -0500 Subject: add an openssl mirror that points to where old releases will be archived to --- ports/openssl/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index b325432b0..508027686 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -13,7 +13,7 @@ get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}") vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE - URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" + 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 0d314b42352f4b1df2c40ca1094abc7e9ad684c5c35ea997efdd58204c70f22a1abcb17291820f0fff3769620a4e06906034203d31eb1a4d540df3e0db294016 ) -- cgit v1.2.3 From 160233e2b0f86623c79def29c24da1f8904ad546 Mon Sep 17 00:00:00 2001 From: Jim McGrath Date: Thu, 25 May 2017 13:48:23 -0500 Subject: use openssl 1.0.2l --- ports/openssl/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index b325432b0..95bf51a58 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -4,7 +4,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endif() include(vcpkg_common_functions) -set(OPENSSL_VERSION 1.0.2k) +set(OPENSSL_VERSION 1.0.2l) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) vcpkg_find_acquire_program(PERL) find_program(NMAKE nmake) @@ -15,7 +15,7 @@ set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}") vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" - SHA512 0d314b42352f4b1df2c40ca1094abc7e9ad684c5c35ea997efdd58204c70f22a1abcb17291820f0fff3769620a4e06906034203d31eb1a4d540df3e0db294016 + SHA512 047d964508ad6025c79caabd8965efd2416dc026a56183d0ef4de7a0a6769ce8e0b4608a3f8393d326f6d03b26a2b067e6e0c750f35b20be190e595e8290c0e3 ) vcpkg_extract_source_archive(${OPENSSL_SOURCE_ARCHIVE}) -- cgit v1.2.3 From bbe3fc72b422fa58d02300cb22930992edd20336 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 25 May 2017 13:07:35 -0700 Subject: Added note --- ports/thrift/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index af66b4a57..8aec05cb7 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -5,6 +5,10 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(VCPKG_LIBRARY_LINKAGE static) endif() +# As per Ben Craig thrift comment see https://issues.apache.org/jira/browse/THRIFT-1834 +# Currently, Thrift is designed to be packaged as a static library. As a static library, the consuming program / dll will only pull in the object files that it needs, so the per-binary size increase should be pretty small. +# Thrift isn't a very good candidate to become a dynamic library. No attempts are made to preserve binary compatibility, or to provide a C / COM-like interface to make binary compatibility easy. + vcpkg_find_acquire_program(WINFLEXBISON) vcpkg_from_github( -- cgit v1.2.3 From 3940773ab8eb0e29c0d5e567899271490e113784 Mon Sep 17 00:00:00 2001 From: Jack Chang Date: Thu, 25 May 2017 15:10:43 -0700 Subject: [uwebsockets] update to 0.14.3 --- ports/uwebsockets/CONTROL | 2 +- ports/uwebsockets/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index 39441586b..6371c8ad0 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets -Version: 0.14.2 +Version: 0.14.3 Build-Depends: libuv, openssl, zlib, boost Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js diff --git a/ports/uwebsockets/portfile.cmake b/ports/uwebsockets/portfile.cmake index 1de6762d4..85c64c743 100644 --- a/ports/uwebsockets/portfile.cmake +++ b/ports/uwebsockets/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(VERSION 0.14.2) +set(VERSION 0.14.3) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/uwebsockets-${VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/uWebSockets/uWebSockets/archive/v${VERSION}.zip" FILENAME "uwebsockets-v${VERSION}.zip" - SHA512 b6389a00a310d77ec55273c1b9499679b13f5e430c31fbc5dd5847780455115d95d5a439cd82dddc537d85c4afb5db4cacefb6db5b3f9681ff142d6ab9ef5024 + SHA512 a64a6ee91d411f4285deb10b9b7620b4c4a2ff0f8137864380968349f7786c406ba44644b6ca589ee41c1e5adfa1ee1cf3697e54ecf5d459ab8bf69a3a4def7e ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 985e787b751891c4923a281644b40b4a20f3da90 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 25 May 2017 15:55:46 -0700 Subject: [vcpkg-ci] Add uwebsockets to internal CI --- scripts/internalCI.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1 index 151b664b8..66744976d 100644 --- a/scripts/internalCI.ps1 +++ b/scripts/internalCI.ps1 @@ -15,7 +15,7 @@ if (-not $?) { throw $? } ./vcpkg.exe install azure-storage-cpp cpprestsdk:x64-windows-static cpprestsdk:x86-uwp if (-not $?) { throw $? } -./vcpkg.exe install bond chakracore cryptopp zlib expat sdl2 curl sqlite3 libuv protobuf:x64-windows sfml opencv:x64-windows +./vcpkg.exe install bond chakracore cryptopp zlib expat sdl2 curl sqlite3 libuv protobuf:x64-windows sfml opencv:x64-windows uwebsockets uwebsockets:x64-windows-static if (-not $?) { throw $? } ./vcpkg.exe install opencv:x86-uwp boost:x86-uwp -- cgit v1.2.3 From 341d606e6013787c8b6e9fa5e5bdbcb57450c166 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 25 May 2017 16:09:59 -0700 Subject: [redshell] Add comment to control file indicating the prebuilt dependencies --- ports/redshell/CONTROL | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/redshell/CONTROL b/ports/redshell/CONTROL index 34632b1fc..54d211498 100644 --- a/ports/redshell/CONTROL +++ b/ports/redshell/CONTROL @@ -1,3 +1,4 @@ Source: redshell Version: 1.0.0 Description: RedShell C++ SDK. Steam attribution tracking, www.redshell.io +# Built-Using: openssl (= 1.0.2k-2), cpprestsdk (= 2.9.0-2), boost (= 1.64-4), websocketpp (= 0.7.0), zlib (= 1.2.11), bzip2 (= 1.0.6-1) -- cgit v1.2.3 From 9884310dbea5177f697ccee4d722af5fec9a2f63 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 25 May 2017 18:04:02 -0700 Subject: Remove unintuitive naming in vcpkg_find_acquire_program --- scripts/cmake/vcpkg_find_acquire_program.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 7edfb4628..127982842 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -84,8 +84,14 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://github.com/mesonbuild/meson/archive/0.40.1.zip") set(ARCHIVE "meson-0.40.1.zip") set(HASH 4c1d07f32d527859f762c34de74d31d569573fc833335ab9652ed38d1f9e64b49869e826527c28a6a07cb8e594fd5c647b34aa95e626236a2707f75df0a2d435) - elseif(VAR MATCHES "WINFLEXBISON") - set(PROGNAME winflexbison) + elseif(VAR MATCHES "FLEX") + set(PROGNAME win_flex) + set(PATHS ${DOWNLOADS}/tools/winflexbison) + set(URL "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-2.5.9.zip/download") + set(ARCHIVE "win_flex_bison-2.5.9.zip") + set(HASH 9580f0e46893670a011645947c1becda69909a41a38bb4197fe33bd1ab7719da6b80e1be316f269e1a4759286870d49a9b07ef83afc4bac33232bd348e0bc814) + elseif(VAR MATCHES "BISON") + set(PROGNAME win_bison) set(PATHS ${DOWNLOADS}/tools/winflexbison) set(URL "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-2.5.9.zip/download") set(ARCHIVE "win_flex_bison-2.5.9.zip") -- cgit v1.2.3 From 9e65a5e24d05d181f7fdeabae85ed2ca12f2e9ab Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 25 May 2017 18:08:19 -0700 Subject: Remove unnecessary Variables -Added vcpkg_find_acquire_program for flex and bison -Removed unnecessary variables --- ports/thrift/portfile.cmake | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 8aec05cb7..b87d13aa7 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -9,7 +9,8 @@ endif() # Currently, Thrift is designed to be packaged as a static library. As a static library, the consuming program / dll will only pull in the object files that it needs, so the per-binary size increase should be pretty small. # Thrift isn't a very good candidate to become a dynamic library. No attempts are made to preserve binary compatibility, or to provide a C / COM-like interface to make binary compatibility easy. -vcpkg_find_acquire_program(WINFLEXBISON) +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -19,13 +20,9 @@ vcpkg_from_github( HEAD_REF master ) -set(FLEX_EXECUTABLE "${DOWNLOADS}/tools/winflexbison/win_flex.exe") -set(BISON_EXECUTABLE "${DOWNLOADS}/tools/winflexbison/win_bison.exe") - - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DWITH_SHARED_LIB=OFF -DWITH_STATIC_LIB=ON -DBUILD_TESTING=off -DBUILD_JAVA=off -DBUILD_C_GLIB=off -DBUILD_PYTHON=off -DBUILD_CPP=on -DBUILD_HASKELL=off -DBUILD_TUTORIALS=off -DFLEX_EXECUTABLE=${FLEX_EXECUTABLE} -DBISON_EXECUTABLE=${BISON_EXECUTABLE} + OPTIONS -DWITH_SHARED_LIB=OFF -DWITH_STATIC_LIB=ON -DBUILD_TESTING=off -DBUILD_JAVA=off -DBUILD_C_GLIB=off -DBUILD_PYTHON=off -DBUILD_CPP=on -DBUILD_HASKELL=off -DBUILD_TUTORIALS=off -DFLEX_EXECUTABLE=${FLEX} -DBISON_EXECUTABLE=${BISON} ) vcpkg_install_cmake() -- cgit v1.2.3 From e288a87b9f048b53ecf20bebc429ab1ab732220a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 25 May 2017 18:15:05 -0700 Subject: [vcpkg-ci] Do not delete log files --- scripts/internalCI.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1 index 66744976d..68c917f7a 100644 --- a/scripts/internalCI.ps1 +++ b/scripts/internalCI.ps1 @@ -6,7 +6,7 @@ New-Item -type file downloads\AlwaysAllowDownloads -errorAction SilentlyContinue if (-not $?) { throw $? } # Clear out any intermediate files from the previous build -Get-ChildItem buildtrees/*/* | ? Name -ne "src" | Remove-Item -Recurse -Force +Get-ChildItem buildtrees/*/* | ? { $_.Name -ne "src" -and $_.Extension -ne ".log"} | Remove-Item -Recurse -Force # Purge any outdated packages ./vcpkg remove --outdated --recurse -- cgit v1.2.3 From 139ed0bf5f1423db445895b03f383bcde4a903ed Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 26 May 2017 15:19:59 -0700 Subject: force users to use --head as latest stable fails to build --- ports/thrift/portfile.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index b87d13aa7..48a4fae82 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -5,6 +5,12 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(VCPKG_LIBRARY_LINKAGE static) endif() +#Note: last stable fails to build. So use --head instead + +if(NOT VCPKG_USE_HEAD_VERSION) + message(FATAL_ERROR "Package does not specify REF. It must built using --head.") + endif() + # As per Ben Craig thrift comment see https://issues.apache.org/jira/browse/THRIFT-1834 # Currently, Thrift is designed to be packaged as a static library. As a static library, the consuming program / dll will only pull in the object files that it needs, so the per-binary size increase should be pretty small. # Thrift isn't a very good candidate to become a dynamic library. No attempts are made to preserve binary compatibility, or to provide a C / COM-like interface to make binary compatibility easy. -- cgit v1.2.3 From 3ecfc53b1edfb0589f4c733ff79388cd70887b23 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 26 May 2017 15:30:14 -0700 Subject: Removed hash --- ports/thrift/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 48a4fae82..41163fbd9 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -21,8 +21,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 0.10.0 - SHA512 1ca372654cf556e41aecda041ada150515bbb469ba75b05300127702d1f41049338ca67b6e46ce39d89cbf27c1da9ebee75b06bad0cc4035def7a36843dbe8fe + REF latest + SHA512 HEAD_REF master ) -- cgit v1.2.3 From aa3e3c10e79401a520704c976715442e7b8ac352 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 26 May 2017 15:31:55 -0700 Subject: revert back to using sha --- ports/thrift/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 41163fbd9..48a4fae82 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -21,8 +21,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF latest - SHA512 + REF 0.10.0 + SHA512 1ca372654cf556e41aecda041ada150515bbb469ba75b05300127702d1f41049338ca67b6e46ce39d89cbf27c1da9ebee75b06bad0cc4035def7a36843dbe8fe HEAD_REF master ) -- cgit v1.2.3 From ae06119765a5c8ddb3194a4081b350e813e7a6db Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 26 May 2017 15:34:54 -0700 Subject: Removed sha and ref --- ports/thrift/portfile.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 48a4fae82..d59f84374 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -21,8 +21,6 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 0.10.0 - SHA512 1ca372654cf556e41aecda041ada150515bbb469ba75b05300127702d1f41049338ca67b6e46ce39d89cbf27c1da9ebee75b06bad0cc4035def7a36843dbe8fe HEAD_REF master ) -- cgit v1.2.3 From afcf47263ea6326f068d495b31d7903eb4b14a19 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 26 May 2017 15:35:22 -0700 Subject: Change version to latest --- ports/thrift/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 958f8a1fa..00899f1ef 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 0.10.0 +Version: latest Build-Depends: boost, zlib, libevent, openssl 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. -- cgit v1.2.3 From a934d1ff13628c02a49c482c2a6590556d394820 Mon Sep 17 00:00:00 2001 From: weizili Date: Sun, 28 May 2017 14:09:55 +0800 Subject: Add evpp port file --- ports/evpp/CONTROL | 4 +++ ports/evpp/portfile.cmake | 62 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 ports/evpp/CONTROL create mode 100644 ports/evpp/portfile.cmake diff --git a/ports/evpp/CONTROL b/ports/evpp/CONTROL new file mode 100644 index 000000000..e9fedbeb5 --- /dev/null +++ b/ports/evpp/CONTROL @@ -0,0 +1,4 @@ +Source: evpp +Version: 0.5.0 +Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols. +Build-Depends: glog, libevent diff --git a/ports/evpp/portfile.cmake b/ports/evpp/portfile.cmake new file mode 100644 index 000000000..db6eb1198 --- /dev/null +++ b/ports/evpp/portfile.cmake @@ -0,0 +1,62 @@ +# 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) + +set(EVPP_LOCAL_TEST OFF) + +set(EVPP_VERSION 0.5.0) +if (EVPP_LOCAL_TEST) + set(EVPP_HASH c8e25c82a14788231a08fafb44b062cf57fd20e66437f3051d290d96b259aba47e4ac34916e04163b9d25383b1c7ba43f36880f4759390cbd25f776da6dc0738) + set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/evpp) + vcpkg_download_distfile(ARCHIVE + URLS "http://127.0.0.1:8000/evpp.zip" + FILENAME "evpp-${EVPP_VERSION}.zip" + SHA512 ${EVPP_HASH} + ) +else () + set(EVPP_HASH fce8ebfec8b22b137f827a886f9ef658d70e060cef3950600ac42136d87cdd9357d78897348ed1d1c112c5e04350626fb218b02cba190a2c2a6fb81136eb2d7d) + set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/evpp-${EVPP_VERSION}) + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/Qihoo360/evpp/archive/v${EVPP_VERSION}.zip" + FILENAME "evpp-${EVPP_VERSION}.zip" + SHA512 ${EVPP_HASH} + ) +endif () + +message(STATUS "Begin to extract files ...") +vcpkg_extract_source_archive(${ARCHIVE}) + +message(STATUS "Building evpp project ...") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DCMAKE_TOOLCHAIN_FILE=D:/git/vcpkg/scripts/buildsystems/vcpkg.cmake -DEVPP_VCPKG_BUILD=ON +) + +vcpkg_install_cmake() +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/evpp) + +#remove duplicated files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# remove not used cmake files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake ) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/evpp) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/evpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/evpp/copyright) + +message(STATUS "Installing done") -- cgit v1.2.3 From 6f5a606a51858bc3f446fa5b50a4e11313fc48ee Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 28 May 2017 13:44:08 +0200 Subject: [lzo] enable dynamic build --- ports/lzo/CONTROL | 2 +- ports/lzo/portfile.cmake | 33 +++++++++++++++++++++++---------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/ports/lzo/CONTROL b/ports/lzo/CONTROL index a3b69bd7e..ba477b484 100644 --- a/ports/lzo/CONTROL +++ b/ports/lzo/CONTROL @@ -1,3 +1,3 @@ Source: lzo -Version: 2.10 +Version: 2.10-1 Description: Lossless data compression library diff --git a/ports/lzo/portfile.cmake b/ports/lzo/portfile.cmake index e9575f5ce..b8faeb358 100644 --- a/ports/lzo/portfile.cmake +++ b/ports/lzo/portfile.cmake @@ -6,11 +6,6 @@ # CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} # -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "Warning: Dynamic building not supported yet. Building static.") - set(VCPKG_LIBRARY_LINKAGE static) -endif() - include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lzo-2.10) vcpkg_download_distfile(ARCHIVE @@ -20,20 +15,38 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +set(LZO_STATIC OFF) +set(LZO_SHARED OFF) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(LZO_STATIC ON) +else() + set(LZO_SHARED ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA + OPTIONS + -DENABLE_STATIC=${LZO_STATIC} + -DENABLE_SHARED=${LZO_SHARED} ) vcpkg_install_cmake() - vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/libexec) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/libexec) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(READ ${CURRENT_PACKAGES_DIR}/include/lzo/lzoconf.h LZO_CONFIG) + string(REPLACE "# define __LZO_EXPORT1 /*empty*/" + "# define __LZO_EXPORT1 __declspec(dllimport)" LZO_CONFIG "${LZO_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/lzo/lzoconf.h "${LZO_CONFIG}") +endif() + # Handle copyright -file(COPY ${CURRENT_BUILDTREES_DIR}/src/lzo-2.10/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lzo) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lzo) file(RENAME ${CURRENT_PACKAGES_DIR}/share/lzo/COPYING ${CURRENT_PACKAGES_DIR}/share/lzo/copyright) -- cgit v1.2.3 From cad6321b8ea068528a1526224a5deec93c9aa051 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 28 May 2017 04:46:21 -0700 Subject: [thrift] Small cleanup, added an unstable ref back in since the last stable doesn't build. --- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 34 +++++++++++++++++++++------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 00899f1ef..aef580f73 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: latest +Version: 20172805-72ca60debae1d9fb35d9f0085118873669006d7f Build-Depends: boost, zlib, libevent, openssl 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index d59f84374..94e8201bf 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -3,17 +3,11 @@ include(vcpkg_common_functions) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(STATUS "Warning: Dynamic building not supported. Building static.") # See note below set(VCPKG_LIBRARY_LINKAGE static) -endif() - -#Note: last stable fails to build. So use --head instead - -if(NOT VCPKG_USE_HEAD_VERSION) - message(FATAL_ERROR "Package does not specify REF. It must built using --head.") - endif() -# As per Ben Craig thrift comment see https://issues.apache.org/jira/browse/THRIFT-1834 -# Currently, Thrift is designed to be packaged as a static library. As a static library, the consuming program / dll will only pull in the object files that it needs, so the per-binary size increase should be pretty small. -# Thrift isn't a very good candidate to become a dynamic library. No attempts are made to preserve binary compatibility, or to provide a C / COM-like interface to make binary compatibility easy. + # As per Ben Craig thrift comment see https://issues.apache.org/jira/browse/THRIFT-1834 + # Currently, Thrift is designed to be packaged as a static library. As a static library, the consuming program / dll will only pull in the object files that it needs, so the per-binary size increase should be pretty small. + # Thrift isn't a very good candidate to become a dynamic library. No attempts are made to preserve binary compatibility, or to provide a C / COM-like interface to make binary compatibility easy. +endif() vcpkg_find_acquire_program(FLEX) vcpkg_find_acquire_program(BISON) @@ -21,12 +15,25 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift + REF 72ca60debae1d9fb35d9f0085118873669006d7f + SHA512 6050c66b176ad596d9632b224b8fb49aa3b823c977dacad729dbcdefb0da60eb983d3a32d9326b4317bae6755fb1fc4cee2cc6c282b3e1636a4528844c0f5915 HEAD_REF master ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DWITH_SHARED_LIB=OFF -DWITH_STATIC_LIB=ON -DBUILD_TESTING=off -DBUILD_JAVA=off -DBUILD_C_GLIB=off -DBUILD_PYTHON=off -DBUILD_CPP=on -DBUILD_HASKELL=off -DBUILD_TUTORIALS=off -DFLEX_EXECUTABLE=${FLEX} -DBISON_EXECUTABLE=${BISON} + OPTIONS + -DWITH_SHARED_LIB=OFF + -DWITH_STATIC_LIB=ON + -DBUILD_TESTING=off + -DBUILD_JAVA=off + -DBUILD_C_GLIB=off + -DBUILD_PYTHON=off + -DBUILD_CPP=on + -DBUILD_HASKELL=off + -DBUILD_TUTORIALS=off + -DFLEX_EXECUTABLE=${FLEX} + -DBISON_EXECUTABLE=${BISON} ) vcpkg_install_cmake() @@ -34,9 +41,10 @@ vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/thrift RENAME copyright) file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") - if(EXES) - file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/thrift) + file(REMOVE ${EXES}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/thrift) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From b566676eff46d8d945f5cc47152ac2ef3d0c8bd8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 28 May 2017 05:28:34 -0700 Subject: [double-conversion] Bump version, build arm static to avoid cmake bug --- ports/double-conversion/CONTROL | 2 +- ports/double-conversion/portfile.cmake | 43 ++++++++++++++++++++-------------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/ports/double-conversion/CONTROL b/ports/double-conversion/CONTROL index b997336e7..226a90676 100644 --- a/ports/double-conversion/CONTROL +++ b/ports/double-conversion/CONTROL @@ -1,3 +1,3 @@ Source: double-conversion -Version: 2.0.1 +Version: 2.0.1-1 Description: Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles. diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index c5f954c1f..a4106c2c0 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -6,41 +6,48 @@ # CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} # -# 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} -# +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + # This is due to a bug in CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS on arm + message(STATUS "DLLs on arm aren't currently supported. Building static libs instead.") + set(VCPKG_LIBRARY_LINKAGE "static") +endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/double-conversion-d4d68e4e788bec89d55a6a3e33af674087837c82) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/google/double-conversion/archive/d4d68e4e788bec89d55a6a3e33af674087837c82.zip" - FILENAME "d4d68e4e788bec89d55a6a3e33af674087837c82.zip" - SHA512 1406dc22b4ea71e1a2490f96cfed3230e122b97607c83ba106df4e90c7e4bfdcfc136c88741e7f1127237b38b4944d462ec5a4627a71f5ea3fe14afbcc64cd44 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/double-conversion + REF d4d68e4e788bec89d55a6a3e33af674087837c82 + SHA512 200b2f5ff1dfe4591f3c168e465ed154993469b7adf22b5bb2ae707d60d360ac45b51385f2d09d2a8358a914db01a790050cd9d9b78645f5ea5159410ce1de17 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-arm.patch ) -vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=True) +set(OPTIONS) +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=True) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${OPTIONS} +) + vcpkg_install_cmake() + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) file(RENAME ${CURRENT_PACKAGES_DIR}/CMake ${CURRENT_PACKAGES_DIR}/share/double-conversion) file(READ ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake DEBUG_MODULE) string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/double-conversion/double-conversionLibraryDepends-debug.cmake "${DEBUG_MODULE}") -#file(COPY ${SOURCE_PATH}/double-conversion DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMake) -vcpkg_copy_pdbs() -message(STATUS "Installing done") +vcpkg_copy_pdbs() # Include files should not be duplicated into the /debug/include directory. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From e6b5e1d7916feaf95dc47765e77b2f0732164b9b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 28 May 2017 12:51:57 -0700 Subject: [pcre] Bump version and split fix-option.patch into two to preserve compat with previous port versions --- ports/pcre/CONTROL | 2 +- ports/pcre/fix-option-2.patch | 24 ++++++++++++++++++++++++ ports/pcre/fix-option.patch | 19 ++++--------------- ports/pcre/portfile.cmake | 3 ++- 4 files changed, 31 insertions(+), 17 deletions(-) create mode 100644 ports/pcre/fix-option-2.patch diff --git a/ports/pcre/CONTROL b/ports/pcre/CONTROL index f1b583592..aeabb2012 100644 --- a/ports/pcre/CONTROL +++ b/ports/pcre/CONTROL @@ -1,3 +1,3 @@ Source: pcre -Version: 8.40 +Version: 8.40-1 Description: Perl Compatible Regular Expresions diff --git a/ports/pcre/fix-option-2.patch b/ports/pcre/fix-option-2.patch new file mode 100644 index 000000000..f9d8e0e5e --- /dev/null +++ b/ports/pcre/fix-option-2.patch @@ -0,0 +1,24 @@ +diff --git b/CMakeLists.txt a/CMakeLists.txt +index 858a34bd..d1a64570 100644 +--- b/CMakeLists.txt ++++ a/CMakeLists.txt +@@ -74,7 +74,6 @@ PROJECT(PCRE C CXX) + # CMP0026 to avoid warnings for the use of LOCATION in GET_TARGET_PROPERTY. + + CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) +-CMAKE_POLICY(SET CMP0026 OLD) + + SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake + +@@ -191,9 +190,8 @@ IF (MINGW) + ENDIF(MINGW) + + IF(MSVC) +- OPTION(PCRE_STATIC_RUNTIME +- "ON=Compile against the static runtime (/MT)." +- OFF) ++ add_definitions(/wd4703) ++ OPTION(PCRE_STATIC_RUNTIME "ON=Compile against the static runtime (/MT)." OFF) + OPTION(INSTALL_MSVC_PDB + "ON=Install .pdb files built by MSVC, if generated" + OFF) diff --git a/ports/pcre/fix-option.patch b/ports/pcre/fix-option.patch index bbaf4df91..d1a2b13eb 100644 --- a/ports/pcre/fix-option.patch +++ b/ports/pcre/fix-option.patch @@ -2,23 +2,12 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 42451ad..858a34b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -74,7 +74,6 @@ PROJECT(PCRE C CXX) - # CMP0026 to avoid warnings for the use of LOCATION in GET_TARGET_PROPERTY. - - CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) --CMAKE_POLICY(SET CMP0026 OLD) - - SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake - -@@ -191,9 +190,8 @@ IF (MINGW) +@@ -191,7 +191,7 @@ IF (MINGW) ENDIF(MINGW) IF(MSVC) - OPTION(PCRE_STATIC_RUNTIME OFF CACHE BOOL -- "ON=Compile against the static runtime (/MT)." -- OFF) -+ add_definitions(/wd4703) -+ OPTION(PCRE_STATIC_RUNTIME "ON=Compile against the static runtime (/MT)." OFF) ++ OPTION(PCRE_STATIC_RUNTIME + "ON=Compile against the static runtime (/MT)." + OFF) OPTION(INSTALL_MSVC_PDB - "ON=Install .pdb files built by MSVC, if generated" - OFF) diff --git a/ports/pcre/portfile.cmake b/ports/pcre/portfile.cmake index 9e5a933ff..f2088ef69 100644 --- a/ports/pcre/portfile.cmake +++ b/ports/pcre/portfile.cmake @@ -19,7 +19,8 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-option.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-arm-config-define.patch) + ${CMAKE_CURRENT_LIST_DIR}/fix-option-2.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-arm-config-define.patch) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 334a35e4251eb3076594951550930aa9c46cec06 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 28 May 2017 13:07:20 -0700 Subject: [vcpkg-toolchain] Compare CMAKE_SYSTEM_NAME, not WINDOWS_STORE. Fixes #1179. --- scripts/buildsystems/vcpkg.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 26fa020db..d3e1e814a 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -1,3 +1,6 @@ +# Mark variables as used so cmake doesn't complain about them +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE}) + if(NOT VCPKG_TOOLCHAIN) if(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) @@ -32,7 +35,7 @@ if(NOT VCPKG_TOOLCHAIN) endif() endif() - if(WINDOWS_STORE OR WINDOWS_PHONE) + if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") set(_VCPKG_TARGET_TRIPLET_PLAT uwp) else() set(_VCPKG_TARGET_TRIPLET_PLAT windows) -- cgit v1.2.3 From 49cd3995862c0bed0701f84535812e1d0690896f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 24 May 2017 23:33:16 -0700 Subject: [vcpkg-docs] Rework documentation for compatibility with readthedocs.io and MkDocs. --- README.md | 16 +- docs/EXAMPLES.md | 302 --------------------- docs/FAQ.md | 93 ------- docs/PRIVACY.md | 48 ---- docs/ROADMAP.md | 3 - docs/_config.yml | 2 +- docs/about/faq.md | 84 ++++++ docs/about/privacy.md | 44 +++ docs/example-3-patch-libpng.md | 204 -------------- docs/examples/packaging-zlib.md | 80 ++++++ docs/examples/patching-libpng.md | 204 ++++++++++++++ docs/examples/using-sqlite.md | 177 ++++++++++++ docs/index.md | 38 +++ docs/maintainers/control-files.md | 51 ++++ docs/maintainers/portfile-functions.md | 15 + docs/maintainers/vcpkg_acquire_msys.md | 47 ++++ docs/maintainers/vcpkg_apply_patches.md | 35 +++ docs/maintainers/vcpkg_build_msbuild.md | 59 ++++ docs/maintainers/vcpkg_configure_cmake.md | 49 ++++ docs/maintainers/vcpkg_copy_pdbs.md | 19 ++ docs/maintainers/vcpkg_copy_tool_dependencies.md | 21 ++ docs/maintainers/vcpkg_download_distfile.md | 39 +++ docs/maintainers/vcpkg_execute_required_process.md | 33 +++ docs/maintainers/vcpkg_extract_source_archive.md | 32 +++ docs/maintainers/vcpkg_find_acquire_program.md | 37 +++ docs/maintainers/vcpkg_from_github.md | 52 ++++ docs/maintainers/vcpkg_install_cmake.md | 25 ++ docs/regenerate.ps1 | 27 ++ docs/specifications/export-command.md | 172 ++++++++++++ docs/users/integration.md | 85 ++++++ scripts/cmake/vcpkg_acquire_msys.cmake | 45 +++ scripts/cmake/vcpkg_apply_patches.cmake | 52 ++-- scripts/cmake/vcpkg_build_msbuild.cmake | 99 ++++--- scripts/cmake/vcpkg_configure_cmake.cmake | 46 ++++ scripts/cmake/vcpkg_copy_pdbs.cmake | 16 ++ scripts/cmake/vcpkg_copy_tool_dependencies.cmake | 20 +- scripts/cmake/vcpkg_download_distfile.cmake | 37 ++- scripts/cmake/vcpkg_execute_required_process.cmake | 31 ++- scripts/cmake/vcpkg_extract_source_archive.cmake | 29 ++ scripts/cmake/vcpkg_find_acquire_program.cmake | 34 +++ scripts/cmake/vcpkg_from_github.cmake | 60 +++- scripts/cmake/vcpkg_install_cmake.cmake | 22 ++ 42 files changed, 1848 insertions(+), 736 deletions(-) delete mode 100644 docs/EXAMPLES.md delete mode 100644 docs/FAQ.md delete mode 100644 docs/PRIVACY.md delete mode 100644 docs/ROADMAP.md create mode 100644 docs/about/faq.md create mode 100644 docs/about/privacy.md delete mode 100644 docs/example-3-patch-libpng.md create mode 100644 docs/examples/packaging-zlib.md create mode 100644 docs/examples/patching-libpng.md create mode 100644 docs/examples/using-sqlite.md create mode 100644 docs/index.md create mode 100644 docs/maintainers/control-files.md create mode 100644 docs/maintainers/portfile-functions.md create mode 100644 docs/maintainers/vcpkg_acquire_msys.md create mode 100644 docs/maintainers/vcpkg_apply_patches.md create mode 100644 docs/maintainers/vcpkg_build_msbuild.md create mode 100644 docs/maintainers/vcpkg_configure_cmake.md create mode 100644 docs/maintainers/vcpkg_copy_pdbs.md create mode 100644 docs/maintainers/vcpkg_copy_tool_dependencies.md create mode 100644 docs/maintainers/vcpkg_download_distfile.md create mode 100644 docs/maintainers/vcpkg_execute_required_process.md create mode 100644 docs/maintainers/vcpkg_extract_source_archive.md create mode 100644 docs/maintainers/vcpkg_find_acquire_program.md create mode 100644 docs/maintainers/vcpkg_from_github.md create mode 100644 docs/maintainers/vcpkg_install_cmake.md create mode 100644 docs/regenerate.ps1 create mode 100644 docs/specifications/export-command.md create mode 100644 docs/users/integration.md diff --git a/README.md b/README.md index f323a6a27..09132a224 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ For short description of available commands, run `vcpkg help`. ## Quick Start Prerequisites: -- Visual Studio 2015 Update 3 or -- Visual Studio 2017 -- CMake 3.8.0 or higher (note: downloaded automatically if not found) -- `git.exe` available in your path +- Windows 10, 8.1, or 7 +- Visual Studio 2017 or Visual Studio 2015 Update 3 +- Git +- *Optional: CMake 3.8.0* Clone this repository, then run ``` @@ -24,12 +24,14 @@ Install any packages with ``` C:\src\vcpkg> .\vcpkg install sdl2 curl ``` -Finally, create a New Project (or open an existing one) in Visual Studio 2015 or Visual Studio 2017. You can now `#include` and use any of the installed libraries. +Finally, create a New Project (or open an existing one) in Visual Studio 2017 or 2015. All installed libraries are immediately ready to be `#include`'d and used in your project. + +For CMake projects, simply include our toolchain file. See our [using a package](docs/examples/using-sqlite.md) example for the specifics. ## Examples -See the [`docs\EXAMPLES.md`](docs/EXAMPLES.md) document for specific walkthroughs, including using a package and adding a new package. +See the [documentation](docs/index.md) for specific walkthroughs, including [using a package](docs/examples/using-sqlite.md) and [adding a new package](docs/examples/packaging-zlib.md). -See a 4 minute [demo in video](https://www.youtube.com/watch?v=y41WFKbQFTw). +See a 4 minute [video demo](https://www.youtube.com/watch?v=y41WFKbQFTw). ## Contributing Vcpkg is built with your contributions. Here are some ways you can contribute: diff --git a/docs/EXAMPLES.md b/docs/EXAMPLES.md deleted file mode 100644 index 0d58b17d7..000000000 --- a/docs/EXAMPLES.md +++ /dev/null @@ -1,302 +0,0 @@ -# Vcpkg - -## Overview -Vcpkg helps you get C and C++ libraries on Windows. - -For short description of available commands, run `.\vcpkg help`. - -## Table of Contents -- Example 1: Using Sqlite - - Step 1: Build - - Step 2: Use - - Option A: VS Project (User-wide integration) - - Option B: CMake (Toolchain file) - - Option C: Other buildsystems - - Option D: VS Project (Individual Project integration) -- Example 2: Package a remote project (zlib) -- Example 3: Patching libpng to work for uwp-x86 - - -## Example 1: Using Sqlite - -### Step 1: Build - -First, we need to know what name [Sqlite](https://sqlite.org) goes by in the ports tree. To do that, we'll run the `search` command and inspect the output: -``` -PS D:\src\vcpkg> .\vcpkg search sqlite -libodb-sqlite 2.4.0 Sqlite support for the ODB ORM library -sqlite3 3.15.0 SQLite is a software library that implements a se... - -If your library is not listed, please open an issue at: - https://github.com/Microsoft/vcpkg/issues -``` -Looking at the list, we can see that the port is named "sqlite3". You can also run the `search` command without arguments to see the full list of packages. - -Installing is then as simple as using the `install` command. -``` -PS D:\src\vcpkg> .\vcpkg install sqlite3 --- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-windows --- DOWNLOADS=D:/src/vcpkg/downloads --- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/sqlite3_x86-windows --- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/sqlite3 --- CURRENT_PORT_DIR=D:/src/vcpkg/ports/sqlite3/. --- Downloading https://sqlite.org/2016/sqlite-amalgamation-3150000.zip... --- Downloading https://sqlite.org/2016/sqlite-amalgamation-3150000.zip... OK --- Testing integrity of downloaded file... --- Testing integrity of downloaded file... OK --- Extracting source D:/src/vcpkg/downloads/sqlite-amalgamation-3150000.zip --- Extracting done --- Configuring x86-windows-rel --- Configuring x86-windows-rel done --- Configuring x86-windows-dbg --- Configuring x86-windows-dbg done --- Build x86-windows-rel --- Build x86-windows-rel done --- Build x86-windows-dbg --- Build x86-windows-dbg done --- Package x86-windows-rel --- Package x86-windows-rel done --- Package x86-windows-dbg --- Package x86-windows-dbg done --- Performing post-build validation --- Performing post-build validation done -Package sqlite3:x86-windows is installed -``` - -We can check that sqlite3 was successfully installed for x86 windows desktop by running the `list` command. -``` -PS D:\src\vcpkg> .\vcpkg list -sqlite3:x86-windows 3.15.0 SQLite is a software library that implements a se... -``` - -To install for other architectures and platforms such as Universal Windows Platform or x64 Desktop, you can suffix the package name with `:`. -``` -PS D:\src\vcpkg> .\vcpkg install sqlite3:x86-uwp zlib:x64-windows -``` - -See `.\vcpkg help triplet` for all supported targets. - - -### Step 2: Use - -#### Option A: VS Project (User-wide integration) - -The recommended and most productive way to use vcpkg is via user-wide integration, making the system available for all projects you build. The user-wide integration will require administrator access the first time it is used on a given machine. After the first use, administrator access is no longer required and the integration is on a per-user basis. -``` -PS D:\src\vcpkg> .\vcpkg integrate install -Applied user-wide integration for this vcpkg root. - -All C++ projects can now #include any installed libraries. -Linking will be handled automatically. -Installing new libraries will make them instantly available. -``` -*Note: You will need to restart Visual Studio or perform a Build to update intellisense with the changes.* - -You can now simply use File -> New Project in Visual Studio 2015 or Visual Studio 2017 and the library will be automatically available. For Sqlite, you can try out their [C/C++ sample](https://sqlite.org/quickstart.html). - -To remove the integration for your user, you can use `.\vcpkg integrate remove`. - - -#### Option B: CMake (Toolchain File) - -The best way to use installed libraries with cmake is via the toolchain file `scripts\buildsystems\vcpkg.cmake`. To use this file, you simply need to add it onto your CMake command line as `-DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake`. - -Alternatively, if you are using CMake through Open Folder with Visual Studio 2017 you can define `CMAKE_TOOLCHAIN_FILE` by adding a `variables` section to each of your `CMakeSettings.json` configurations: - -```json -{ - "configurations": [ - { - "name": "x86-Debug", - "generator": "Visual Studio 15 2017", - "configurationType" : "Debug", - "buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "-m -v:minimal", - "variables": [ - { - "name": "CMAKE_TOOLCHAIN_FILE", - "value": "D:\\src\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake" - } - ] - } - ] -} -``` - -Now let's make a simple CMake project with a main file. -```cmake -# CMakeLists.txt -cmake_minimum_required(VERSION 3.0) -project(test) - -find_package(Sqlite3 REQUIRED) - -link_libraries(sqlite3) -add_executable(main main.cpp) -``` -```cpp -// main.cpp -#include -#include - -int main() -{ - printf("%s\n", sqlite3_libversion()); - return 0; -} -``` - -Then, we build our project in the normal CMake way: -``` -PS D:\src\cmake-test> mkdir build -PS D:\src\cmake-test> cd build -PS D:\src\cmake-test\build> cmake .. "-DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake" - // omitted CMake output here // --- Build files have been written to: D:/src/cmake-test/build -PS D:\src\cmake-test\build> cmake --build . - // omitted MSBuild output here // -Build succeeded. - 0 Warning(s) - 0 Error(s) - -Time Elapsed 00:00:02.38 -PS D:\src\cmake-test\build> .\Debug\main.exe -3.15.0 -``` - -*Note: The correct sqlite3.dll is automatically copied to the output folder when building for x86-windows. You will need to distribute this along with your application.* - -Unlike other platforms, we do not automatically add the `include\` directory to your compilation line by default. If you're using a library that does not provide CMake integration, you will need to explicitly search for the files and add them yourself using [`find_path()`][1] and [`find_library()`][2]. - -```cmake -# To find and use catch -find_path(CATCH_INCLUDE_DIR catch.hpp) -include_directories(${CATCH_INCLUDE_DIR}) - -# To find and use azure-storage-cpp -find_path(WASTORAGE_INCLUDE_DIR was/blob.h) -find_library(WASTORAGE_LIBRARY wastorage) -include_directories(${WASTORAGE_INCLUDE_DIR}) -link_libraries(${WASTORAGE_LIBRARY}) - -# Note that we recommend using the target-specific directives for a cleaner cmake: -# target_include_directories(main ${LIBRARY}) -# target_link_libraries(main PRIVATE ${LIBRARY}) -``` - -[1]: https://cmake.org/cmake/help/latest/command/find_path.html -[2]: https://cmake.org/cmake/help/latest/command/find_library.html - - -#### Option C: Other buildsystems - -Libraries are installed into the `installed\` subfolder, partitioned by architecture (e.g. x86-windows): -* The header files are installed to `installed\x86-windows\include` -* Release `.lib` files are installed to `installed\x86-windows\lib` or `installed\x86-windows\lib\manual-link` -* Release `.dll` files are installed to `installed\x86-windows\bin` -* Debug `.lib` files are installed to `installed\x86-windows\debug\lib` or `installed\x86-windows\debug\lib\manual-link` -* Debug `.dll` files are installed to `installed\x86-windows\debug\bin` - -See your build system specific documentation for how to use prebuilt binaries. - -Generally, to run any produced executables you will also need to either copy the needed `dll` files to the same folder as your `exe` or *prepend* the correct `bin` directory to your path. - -Example for setting the path for debug mode in powershell: -``` -PS D:\src\vcpkg> $env:path = "D:\src\vcpkg\installed\x86-windows\debug\bin;" + $env:path -``` - -#### Option D: VS Project (Individual Project integration) - -We also provide individual VS project integration through a NuGet package. This will modify the project file, so we do not recommend this approach for open source projects. -``` -PS D:\src\vcpkg> .\vcpkg integrate project -Created nupkg: D:\src\vcpkg\scripts\buildsystems\vcpkg.D.src.vcpkg.1.0.0.nupkg - -With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: - Install-Package vcpkg.D.src.vcpkg -Source "D:/src/vcpkg/scripts/buildsystems" -``` -*Note: The generated NuGet package does not contain the actual libraries. It instead acts like a shortcut (or symlink) to the vcpkg install and will "automatically" update with any changes (install/remove) to the libraries. You do not need to regenerate or update the NuGet package.* - - -## Example 2: Package a remote project (zlib) - -### Bootstrap with `create` -First, locate a globally accessible archive of the library's sources. Zip, gzip, and bzip are all supported. Strongly prefer official sources or mirrors over unofficial mirrors. - -*Looking at zlib's website, the URL http://zlib.net/zlib128.zip looks appropriate.* - -Second, determine a suitable package name. This should be ASCII, lowercase, and recognizable to someone who knows the library's "human name". If the library is already packaged in another package manager, prefer that name. - -*Since zlib is already packaged as zlib, we will use the name zlib2 for this example.* - -Finally, if the server's name for the archive is not very descriptive (such as downloading a zipped commit or branch from GitHub), choose a nice archive name of the form `-.zip`. - -*`zlib128.zip` is a fine name, so no change needed.* - -All this information can then be passed into the `create` command, which will download the sources and bootstrap the packaging process inside `ports\`. - -``` -PS D:\src\vcpkg> .\vcpkg create zlib2 http://zlib.net/zlib128.zip zlib128.zip --- Generated portfile: D:/src/vcpkg/ports/zlib2/portfile.cmake -``` - -### Create the CONTROL file -In addition to the generated `ports\\portfile.cmake`, We also need a `ports\\CONTROL` file. This file is a simply formatted set of fields describing the package's metadata. - -*For zlib2, we'll create the file `ports\zlib2\CONTROL` with the following contents:* -``` -Source: zlib2 -Version: 1.2.8 -Description: A Massively Spiffy Yet Delicately Unobtrusive Compression Library -``` - -### Tweak the generated portfile -The generated `portfile.cmake` will need some editing to correctly package most libraries in the wild, however we can start by trying out the build. - -``` -PS D:\src\vcpkg> .\vcpkg build zlib2 --- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-windows --- DOWNLOADS=D:/src/vcpkg/downloads --- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/zlib2_x86-windows --- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/zlib2 --- CURRENT_PORT_DIR=D:/src/vcpkg/ports/zlib2 --- Using cached D:/src/vcpkg/downloads/zlib128.zip --- Extracting source D:/src/vcpkg/downloads/zlib128.zip --- Extracting done --- Configuring x86-windows-rel -CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:13 (message): - Command failed: C:/Program Files - (x86)/CMake/bin/cmake.exe;D:/src/vcpkg/buildtrees/zlib2/src/zlib128;-G;Ninja;-DCMAKE_VERBOSE_MAKEFILE=ON;-DCMAKE_BUILD_TYPE=Release;-DCMAKE_TOOLCHAIN_FILE=D:/src/vcpkg/triplets/x86-windows.cmake;-DCMAKE_PREFIX_PATH=D:/src/vcpkg/installed/x86-windows;- -DCMAKE_INSTALL_PREFIX=D:/src/vcpkg/packages/zlib2_x86-windows - - - Working Directory: D:/src/vcpkg/buildtrees/zlib2/x86-windows-rel - - See logs for more information: - - D:/src/vcpkg/buildtrees/zlib2/config-x86-windows-rel-out.log - D:/src/vcpkg/buildtrees/zlib2/config-x86-windows-rel-err.log - -Call Stack (most recent call first): - scripts/cmake/vcpkg_configure_cmake.cmake:15 (vcpkg_execute_required_process) - ports/zlib2/portfile.cmake:8 (vcpkg_configure_cmake) - scripts/ports.cmake:105 (include) - scripts/ports.cmake:184 (build) -``` - -At this point, it is a matter of reading the error messages and log files while steadily improving the quality of the portfile. Zlib required providing a discrete copy of the LICENSE to copy into the package, suppressing the build and installation of executables and headers, and removing the static libraries after they were installed. - -### Suggested example portfiles -In the `ports\` directory are many libraries that can be used as examples, including many that are not based on CMake. - -- Header only libraries - - rapidjson - - range-v3 -- MSBuild-based - - mpg123 - - glew -- Non-CMake, custom buildsystem - - openssl - - boost diff --git a/docs/FAQ.md b/docs/FAQ.md deleted file mode 100644 index 0a82d320e..000000000 --- a/docs/FAQ.md +++ /dev/null @@ -1,93 +0,0 @@ -# Frequently Asked Questions: Vcpkg - -Vcpkg is a tool to acquire C++ open source library and rebuild them on Windows. - -## Can I contribute a new library? -Yes! Start out by reading our [contribution guidelines](../CONTRIBUTING.md). - -## Can Vcpkg create pre-built binary packages? What is the binary format used by Vcpkg? -In the preview release, we do not have a supported way to distribute individual binary packages. This avoids the issue of trying to use a specific pre-built package against differently built dependencies. As such, we have also not specified a stable format for the built library packages. - -We instead recommend copying the entire system as a whole (which ensures that every package and its dependencies stay in sync with each other). - -## How do I update libraries? -The `vcpkg update` command lists all packages which are out-of-sync with your current portfiles. To update a package, follow the instructions in the command. - -## How do I get more libraries? -The list of libraries is enumerated from the [`ports\`](../ports) directory. By design, you can add and remove libraries from this directory as you see fit for yourself or your company (see [Example #2](EXAMPLES.md#example-2)). - -We recommend cloning directly from [GitHub](https://github.com/microsoft/vcpkg) and using `git pull` to update the list of portfiles. Once you've updated your portfiles, `vcpkg update` will indicate any installed libraries that are now out of date. - -## Can I build a private library with this tool? -Yes. Follow [Example #2](EXAMPLES.md#example-2) for creating a portfile using a fake URL. Then, either pre-seed the `downloads\` folder with a zip containing your private sources or replace the normal `vcpkg_download_distfile` and `vcpkg_extract_source_archive` with functions that unpack your source code. - -## Can I use a prebuilt private library with this tool? -Yes. The `portfile.cmake` for a library is fundamentally a script that places the headers and binaries into the correct arrangement in the `${CURRENT_PACKAGES_DIR}`, so to pull in prebuilt binaries you can write a portfile which directly downloads and arranges the files. - -To see an example of this, look at [`ports\opengl\portfile.cmake`](../ports/opengl/portfile.cmake) package which simply copies files out of the Windows SDK. - -## Which platforms I can target with Vcpkg? -We currently target Windows Desktop (x86 and x64) as well as the Universal Windows Platform (x86, x64, and ARM). See `vcpkg help triplet` for the current list. - -## Does `vcpkg.exe` run on Linux/OSX? -No, for this preview we are focusing on Windows as a host platform. If you'd be interested in having Vcpkg run on Linux or OSX, please let us know in [this issue](https://github.com/microsoft/vcpkg/issues/57). - -## How do I use different versions of a library on one machine? -Within a single instance of Vcpkg (e.g. one set of `installed\`, `packages\`, `ports\` and so forth), you can only have one version of a library installed (otherwise, the headers would conflict with each other!). This is because a package in Vcpkg corresponds to the `X-dev` or `X-devel` packages in other system package managers. - -To use different versions of a library (for different projects), we recommend making separate instances of Vcpkg and using the [per-project integration mechanisms](EXAMPLES.md#example-1-2-d). The versions of each library are specified by the files in `ports\`, so they are easily manipulated using standard VCS techniques. This makes it very easy to roll back the entire set of libraries to a consistent set of older versions which all work with each other. If you need to then pin a specific library forward, that is as easy as checking out the appropriate version of `ports\package\`. - -If your application is very sensitive to the versions of libraries, we recommend checking in the specific set of portfiles you need into your source control along with your project sources and using the `--vcpkg-root` option to redirect the working directory of `vcpkg.exe`. - -## How does Vcpkg protect my Privacy? -See the [Privacy document](PRIVACY.md) for all information regarding privacy. - -## Can I use my own CMake toolchain file with Vcpkg's toolchain file? -Yes. If you already have a CMake toolchain file, you will need to include our toolchain file at the end of yours. This should be as simple as an `include(\scripts\buildsystems\vcpkg.cmake)` directive. Alternatively, you could copy the contents of our `scripts\buildsystems\vcpkg.cmake` into the end of your existing toolchain file. - -## Can I use my own/specific flags for rebuilding libs? -Yes. In the current preview, there is not yet a standardized global way to change them, however you can edit individual portfiles and tweak the exact build process however you'd like. - -By saving the changes to the portfile (and checking them in), you'll get the same results even if you're rebuilding from scratch in the future and forgot what exact settings you used. - -## How is CMake used internally by Vcpkg? -Vcpkg uses CMake internally as a build scripting language. This is because CMake is already an extremely common build system for cross-platform open source libraries and is becoming very popular for C++ projects in general. It is easy to acquire on Windows (does not require system-wide installation) and reasonably legible for unfamiliar users. - -## Will Vcpkg support downloading compiled binaries from a public or private server? -We do plan to eventually support downloading precompiled binaries, similar to other system package managers. - -In a corporate scenario, we currently recommend building the libraries once and distributing the entire vcpkg root directory to everyone else on the project through some raw file transport such as a network share or HTTP host. - -## What Visual C++ toolsets are supported? -We plan to only support Visual Studio 2015 and above. - -## Why does Visual Studio not use my libraries with user-wide integration enabled? -Enabling user-wide integration (`vcpkg integrate install`) changes the default for some project properties. In particular, "C/C++/General/Additional Include Directories" and "Linker/General/Additional Library Directories" are normally blank *without* user-wide integration. *With* integration, a blank value means that the augmented default supplied by vcpkg is overridden, and headers/libraries will not be found. To reinstate the default, set the properties to inherit from parent. - -## Can I acquire my package's sources by Git url+tag? -Yes, however we prefer compressed archives of the specific release/commit since the internal downloads and build trees are meant to be read only. Github provides archives for every commit, tag, and branch, so it's always possible to perform this substitution for repositories hosted there. - -See [`ports\cpprestsdk\portfile.cmake`](../ports/cpprestsdk/portfile.cmake) for an example of using git directly. - -## Why not NuGet? -NuGet is a package manager for .NET libraries with a strong dependency on MSBuild. It does not meet the specific needs of Native C++ customers in at least three ways. - -- **Compilation Flavors**. With so many possible combinations of compilation options, the task of providing a truly complete set of options is intrinsicly impossible. Furthermore, the download size for reasonably complete binary packages becomes enormous. This makes it a requirement to split the results into multiple packages, but then searching becomes very difficult. - -- **Binary vs Source**. Very closely tied to the first point, NuGet is designed from the ground up to provide relatively small, prebuilt binaries. Due to the nature of native code, developers need to have access to the source code to ensure ABI compatibility, performance, integrity, and debuggability. - -- **Per-dll vs Per-application**. NuGet is highly project centric. This works well in managed languages with naturally stable ABIs, because base libraries can continue to evolve without breaking those higher up. However, in native languages where the ABI is much more fragile, the only robust strategy is to explicitly build each library against the exact dependencies that will be included in the final application. This is difficult to ensure in NuGet and leads to a highly disconnected and independently versioned ecosystem. - -## Why not Conan? -Conan.io is a publicly-federated, project-centric, cross-platform, C++ package manager written in python. Our primary differences are: - -- **Public federation vs private federation**. Conan relies on individuals publishing independent copies of each package. We believe this approach encourages a large number of packages that are all broken in different ways. We believe it is a waste of user's time to pick through the list of 20+ public packages for Boost 1.56 to determine the handful that will work for their particular situation. In contrast, we believe there should be a single, collaboratively maintained version which works for the vast majority of cases and allow users to hack freely on their private versions. We believe this will result in a set of high quality packages that are heavily tested with each other and form a fantastic base for any private modifications you need. - -- **Per-dll vs Per-application**. When dependencies are independently versioned on a library level, it encourages every build environment to be a completely unique, unable to take advantage of or contribute to a solid, well tested ecosystem. In contrast, by versioning all libraries together as a platform (similar to a system package manager), we hope to congregate testing and effort on very common sets of library versions to maximize the quality and stability of the ecosystem. This also completely designs out the ability for a library to ask for versions that conflict with the application's choices (I want openssl Z and boost X but X only works with openssl Y). - -- **Cross-platform vs single-platform**. While being hosted on many platforms is an excellent north star, we believe the level of system integration and stability provided by apt-get, yum, and homebrew is well worth needing to exchange `apt-get install libboost-all-dev` with `brew install boost` in automated scripts. We chose to make our system as easy as possible to integrate into a world with these very successful system managers -- one more line for `vcpkg install boost` -- instead of attempting to replace them where they are already so successful and well-loved. - -- **C++/CMake vs python**. While Python is an excellent language loved by many, we believe that transparency and familiarity are the most important factors when choosing a tool as important to your workflow as a package manager. Consequently, we chose to make the implementation languages be as universally accepted as possible: C++ should be used in a C++ package manager for C++ programmers. You should not be required to learn another language just to understand your package manager. - -## Why not Chocolatey? -Chocolatey is an excellent system for managing software. However, it is not currently designed to acquire redistributable developer assets and help you with debugging. Vcpkg, in comparison, is designed to get you the libraries you need to build your application and help you deliver through any platform you'd like (including Chocolatey!). diff --git a/docs/PRIVACY.md b/docs/PRIVACY.md deleted file mode 100644 index ad345c809..000000000 --- a/docs/PRIVACY.md +++ /dev/null @@ -1,48 +0,0 @@ - -# Privacy document for vcpkg - - -## Do you collect telemetry data? What is it used for? - -We do collect telemetry data from usage of "vcpkg.exe". We explicitly ONLY collect information from invocations of the tool itself; we do NOT add any tracking information into the produced libraries. -We use this information to understand usage issues and to guide tool improvements. - - -## What telemetry is collected? - -We collect the command line used, the time of invocation, and how long the command took. Some commands also add additional calculated information (such as the full set of libraries to install). We generate a completely random UUID on first use and attach it to each event. For this preview, we do not offer a mechanism to disable this data collection since it is critical for improving the product. In the full release, you will be able to opt-out with a simple configuration. For more information about how Microsoft protects your privacy, see https://privacy.microsoft.com/en-us/privacy. - -Here is an example of an event for the command line `vcpkg install zlib`: -``` -[{ - "ver": 1, - "name": "Microsoft.ApplicationInsights.Event", - "time": "2016-09-01T00:19:10.949Z", - "sampleRate": 100.000000, - "seq": "0:0", - "iKey": "aaaaaaaa-4393-4dd9-ab8e-97e8fe6d7603", - "flags": 0.000000, - "tags": { - "ai.device.os": "Windows", - "ai.device.osVersion": "10.0.14912", - "ai.session.id": "aaaaaaaa-7c69-4b83-7d82-8a4198d7e88d", - "ai.user.id": "aaaaaaaa-c9ab-4bf5-0847-a3455f539754", - "ai.user.accountAcquisitionDate": "2016-08-20T00:38:09.860Z" - }, - "data": { - "baseType": "EventData", - "baseData": { - "ver": 2, - "name": "commandline_test7", - "properties": { "version":"0.0.30-9b4e44a693459c0a618f370681f837de6dd95a30","cmdline":"install zlib","command":"install","installplan":"zlib:x86-windows" }, - "measurements": { "elapsed_us":68064.355736 } - } - } -}] -``` -In the source code (included in `toolsrc\`), you can search for calls to the functions `TrackProperty()` and `TrackMetric()` to see every specific data point we collect. - - -## Is the data stored on my system? - -We store each event document in your temporary files directory. These will be cleaned out whenever you clear your temporary files. diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md deleted file mode 100644 index df6e3853e..000000000 --- a/docs/ROADMAP.md +++ /dev/null @@ -1,3 +0,0 @@ -# Roadmap - - diff --git a/docs/_config.yml b/docs/_config.yml index 2f7efbeab..c4192631f 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1 +1 @@ -theme: jekyll-theme-minimal \ No newline at end of file +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/docs/about/faq.md b/docs/about/faq.md new file mode 100644 index 000000000..85a0c14db --- /dev/null +++ b/docs/about/faq.md @@ -0,0 +1,84 @@ +# Frequently Asked Questions + +## Can I contribute a new library? +Yes! Start out by reading our [contribution guidelines](https://github.com/Microsoft/vcpkg/blob/master/CONTRIBUTING.md). + +## Can Vcpkg create pre-built binary packages? What is the binary format used by Vcpkg? +Yes! See [the `export` command](../users/integration.md#export). + +## How do I update libraries? +The `vcpkg update` command lists all packages which are out-of-sync with your current portfiles. To update a package, follow the instructions in the command. + +## How do I get more libraries? +The list of libraries is enumerated from the [`ports\`](https://github.com/Microsoft/vcpkg/blob/master/ports) directory. By design, you can add and remove libraries from this directory as you see fit for yourself or your company -- see [Example #2](../examples/packaging-zlib.md). + +We recommend cloning directly from [GitHub](https://github.com/microsoft/vcpkg) and using `git pull` to update the list of portfiles. Once you've updated your portfiles, `vcpkg update` will indicate any installed libraries that are now out of date. + +## Can I build a private library with this tool? +Yes. Follow [our Packaging zlib Example](../examples/packaging-zlib.md) for creating a portfile using a fake URL. Then, either pre-seed the `downloads\` folder with a zip containing your private sources or replace the normal calls to `vcpkg_download_distfile` and `vcpkg_extract_source_archive` with functions that unpack your source code. + +## Can I use a prebuilt private library with this tool? +Yes. The `portfile.cmake` for a library is fundamentally a script that places the headers and binaries into the correct arrangement in the `${CURRENT_PACKAGES_DIR}`, so to pull in prebuilt binaries you can write a portfile which directly downloads and arranges the files. + +To see an example of this, look at [`ports\opengl\portfile.cmake`](https://github.com/microsoft/vcpkg/blob/master/ports/opengl/portfile.cmake) which simply copies files out of the Windows SDK. + +## Which platforms I can target with Vcpkg? +We currently target Windows Desktop (x86 and x64) as well as the Universal Windows Platform (x86, x64, and ARM). See `vcpkg help triplet` for the current list. + +## Does Vcpkg run on Linux/OSX? +No, for this preview we are focusing on Windows as a host platform. If you'd be interested in having Vcpkg run on Linux or OSX, please let us know in [this issue](https://github.com/microsoft/vcpkg/issues/57)! + +## How do I use different versions of a library on one machine? +Within a single instance of Vcpkg (e.g. one set of `installed\`, `packages\`, `ports\` and so forth), you can only have one version of a library installed (otherwise, the headers would conflict with each other!). For those with experience with system-wide package managers, packages in Vcpkg correspond to the `X-dev` or `X-devel` packages. + +To use different versions of a library for different projects, we recommend making separate instances of Vcpkg and using the [per-project integration mechanisms](../users/integration.md). The versions of each library are specified by the files in `ports\`, so they are easily manipulated using standard `git` commands. This makes it very easy to roll back the entire set of libraries to a consistent set of older versions which all work with each other. If you need to then pin a specific library forward, that is as easy as checking out the appropriate version of `ports\\`. + +If your application is very sensitive to the versions of libraries, we recommend checking in the specific set of portfiles you need into your source control along with your project sources and using the `--vcpkg-root` option to redirect the working directory of `vcpkg.exe`. + +## How does Vcpkg protect my Privacy? +See the [Privacy document](privacy.md) for all information regarding privacy. + +## Can I use my own CMake toolchain file with Vcpkg's toolchain file? +Yes. If you already have a CMake toolchain file, you will need to include our toolchain file at the end of yours. This should be as simple as an `include(\scripts\buildsystems\vcpkg.cmake)` directive. Alternatively, you could copy the contents of our `scripts\buildsystems\vcpkg.cmake` into the end of your existing toolchain file. + +## Can I use my own/specific flags for rebuilding libs? +Yes. In the current preview, there is not yet a standardized global way to change them, however you can edit individual portfiles and tweak the exact build process however you'd like. + +By saving the changes to the portfile (and checking them in), you'll get the same results even if you're rebuilding from scratch in the future and forgot what exact settings you used. + +## How is CMake used internally by Vcpkg? +Vcpkg uses CMake internally as a build scripting language. This is because CMake is already an extremely common build system for cross-platform open source libraries and is becoming very popular for C++ projects in general. It is easy to acquire on Windows, does not require system-wide installation, and legible for unfamiliar users. + +## Will Vcpkg support downloading compiled binaries from a public or private server? +We would like to eventually support downloading precompiled binaries, similar to other system package managers. + +In a corporate scenario, we currently recommend building the libraries once and distributing the entire vcpkg root directory to everyone else on the project through some raw file transport such as a network share or HTTP host. See [the `export` command](../users/integration.md#export). + +## What Visual C++ toolsets are supported? +We support Visual Studio 2015 Update 3 and above. + +## Why does Visual Studio not use my libraries with user-wide integration enabled? +Enabling user-wide integration (`vcpkg integrate install`) changes the default for some project properties. In particular, "C/C++/General/Additional Include Directories" and "Linker/General/Additional Library Directories" are normally blank *without* user-wide integration. *With* integration, a blank value means that the augmented default supplied by vcpkg is overridden, and headers/libraries will not be found. To reinstate the default, set the properties to inherit from parent. + +## Why not NuGet? +NuGet is a package manager for .NET libraries with a strong dependency on MSBuild. It does not meet the specific needs of Native C++ customers in at least three ways. + +- **Compilation Flavors**. With so many possible combinations of compilation options, the task of providing a truly complete set of options is intrinsicly impossible. Furthermore, the download size for reasonably complete binary packages becomes enormous. This makes it a requirement to split the results into multiple packages, but then searching becomes very difficult. + +- **Binary vs Source**. Very closely tied to the first point, NuGet is designed from the ground up to provide relatively small, prebuilt binaries. Due to the nature of native code, developers need to have access to the source code to ensure ABI compatibility, performance, integrity, and debuggability. + +- **Per-dll vs Per-application**. NuGet is highly project centric. This works well in managed languages with naturally stable ABIs, because base libraries can continue to evolve without breaking those higher up. However, in native languages where the ABI is much more fragile, the only robust strategy is to explicitly build each library against the exact dependencies that will be included in the final application. This is difficult to ensure in NuGet and leads to a highly disconnected and independently versioned ecosystem. + +## Why not Conan? +Conan.io is a publicly-federated, project-centric, cross-platform, C++ package manager written in python. Our primary differences are: + +- **Public federation vs private federation**. Conan relies on individuals publishing independent copies of each package. We believe this approach encourages a large number of packages that are all broken in different ways. We believe it is a waste of user's time to pick through the list of 20+ public packages for Boost 1.56 to determine the handful that will work for their particular situation. In contrast, we believe there should be a single, collaboratively maintained version which works for the vast majority of cases and allow users to hack freely on their private versions. We believe this will result in a set of high quality packages that are heavily tested with each other and form a fantastic base for any private modifications you need. + +- **Per-dll vs Per-application**. When dependencies are independently versioned on a library level, it encourages every build environment to be a completely unique, unable to take advantage of or contribute to a solid, well tested ecosystem. In contrast, by versioning all libraries together as a platform (similar to a system package manager), we hope to congregate testing and effort on very common sets of library versions to maximize the quality and stability of the ecosystem. This also completely designs out the ability for a library to ask for versions that conflict with the application's choices (I want openssl Z and boost X but X only claims to work with openssl Y). + +- **Cross-platform vs single-platform**. While being hosted on many platforms is an excellent north star, we believe the level of system integration and stability provided by apt-get, yum, and homebrew is well worth needing to exchange `apt-get install libboost-all-dev` with `brew install boost` in automated scripts. We chose to make our system as easy as possible to integrate into a world with these very successful system managers -- one more line for `vcpkg install boost` -- instead of attempting to replace them where they are already so successful and well-loved. + +- **C++/CMake vs python**. While Python is an excellent language loved by many, we believe that transparency and familiarity are the most important factors when choosing a tool as important to your workflow as a package manager. Consequently, we chose to make the implementation languages be as universally accepted as possible: C++ should be used in a C++ package manager for C++ programmers. You should not be required to learn another language just to understand your package manager. + +## Why not Chocolatey? +Chocolatey is an excellent system for managing applications. However, it is not currently designed to acquire redistributable developer assets and help you with debugging. Vcpkg, in comparison, is designed to get you the libraries you need to build your application and help you deliver through any platform you'd like (including Chocolatey!). diff --git a/docs/about/privacy.md b/docs/about/privacy.md new file mode 100644 index 000000000..9ff0e7a47 --- /dev/null +++ b/docs/about/privacy.md @@ -0,0 +1,44 @@ + +# Privacy and Vcpkg + +## Do you collect telemetry data? What is it used for? + +We do collect telemetry data from usage of "vcpkg.exe". We explicitly ONLY collect information from invocations of the tool itself; we do NOT add any tracking information into the produced libraries. We use this information to understand usage issues, such as failing packages, and to guide tool improvements. + +## What telemetry is collected? + +We collect the command line used, the time of invocation, and how long the command took. Some commands also add additional calculated information (such as the full set of libraries to install). We generate a completely random UUID on first use and attach it to each event. For this preview, we do not offer a mechanism to disable this data collection since it is critical for improving the product. In the full release, you will be able to opt-out with a simple configuration. For more information about how Microsoft protects your privacy, see https://privacy.microsoft.com/en-us/privacy. + +Here is an example of an event for the command line `vcpkg install zlib`: +```json +[{ + "ver": 1, + "name": "Microsoft.ApplicationInsights.Event", + "time": "2016-09-01T00:19:10.949Z", + "sampleRate": 100.000000, + "seq": "0:0", + "iKey": "aaaaaaaa-4393-4dd9-ab8e-97e8fe6d7603", + "flags": 0.000000, + "tags": { + "ai.device.os": "Windows", + "ai.device.osVersion": "10.0.14912", + "ai.session.id": "aaaaaaaa-7c69-4b83-7d82-8a4198d7e88d", + "ai.user.id": "aaaaaaaa-c9ab-4bf5-0847-a3455f539754", + "ai.user.accountAcquisitionDate": "2016-08-20T00:38:09.860Z" + }, + "data": { + "baseType": "EventData", + "baseData": { + "ver": 2, + "name": "commandline_test7", + "properties": { "version":"0.0.30-9b4e44a693459c0a618f370681f837de6dd95a30","cmdline":"install zlib","command":"install","installplan":"zlib:x86-windows" }, + "measurements": { "elapsed_us":68064.355736 } + } + } +}] +``` +In the source code (included in `toolsrc\`), you can search for calls to the functions `TrackProperty()` and `TrackMetric()` to see every specific data point we collect. + +## Is the data stored on my system? + +We store each event document in your temporary files directory. These will be cleaned out whenever you clear your temporary files. diff --git a/docs/example-3-patch-libpng.md b/docs/example-3-patch-libpng.md deleted file mode 100644 index a47a2626a..000000000 --- a/docs/example-3-patch-libpng.md +++ /dev/null @@ -1,204 +0,0 @@ -## Example 3: Patching libpng to work for uwp-x86 - -### Initial error logs -First, try building: - -``` -PS D:\src\vcpkg> vcpkg install libpng:x86-uwp --- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-uwp --- DOWNLOADS=D:/src/vcpkg/downloads --- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/libpng_x86-uwp --- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/libpng --- CURRENT_PORT_DIR=D:/src/vcpkg/ports/libpng/. --- Using cached D:/src/vcpkg/downloads/libpng-1.6.24.tar.xz --- Extracting done --- Configuring x86-uwp-rel --- Configuring x86-uwp-rel done --- Configuring x86-uwp-dbg --- Configuring x86-uwp-dbg done --- Build x86-uwp-rel -CMake Error at scripts/cmake/execute_required_process.cmake:14 (message): - Command failed: C:/Program - Files/CMake/bin/cmake.exe;--build;.;--config;Release - - Working Directory: D:/src/vcpkg/buildtrees/libpng/x86-uwp-rel - - See logs for more information: - - D:\src\vcpkg\buildtrees\libpng\build-x86-uwp-rel-out.log - D:\src\vcpkg\buildtrees\libpng\build-x86-uwp-rel-err.log - -Call Stack (most recent call first): - scripts/cmake/vcpkg_build_cmake.cmake:3 (execute_required_process) - ports/libpng/portfile.cmake:22 (vcpkg_build_cmake) - scripts/ports.cmake:84 (include) - - -Error: build command failed -``` - -Next, looking at the above logs (build-...-out.log and build-...-err.log). - -``` -// build-x86-uwp-rel-out.log -... -"D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\ALL_BUILD.vcxproj" (default target) (1) -> -"D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj" (default target) (3) -> -(ClCompile target) -> - D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24\pngerror.c(775): warning C4013: 'ExitProcess' undefined; assuming extern returning int [D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj] - - -"D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\ALL_BUILD.vcxproj" (default target) (1) -> -"D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj" (default target) (3) -> -(Link target) -> - pngerror.obj : error LNK2019: unresolved external symbol _ExitProcess referenced in function _png_longjmp [D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj] - D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\Release\libpng16.dll : fatal error LNK1120: 1 unresolved externals [D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj] - - 1 Warning(s) - 2 Error(s) - -Time Elapsed 00:00:04.19 -``` - -### Identify the problematic code - -Taking a look at [MSDN](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx) shows that `ExitProcess` is only available for desktop apps. Additionally, it's useful to see the surrounding context: - -```c -/* buildtrees\libpng\src\libpng-1.6.24\pngerror.c:769 */ - /* If control reaches this point, png_longjmp() must not return. The only - * choice is to terminate the whole process (or maybe the thread); to do - * this the ANSI-C abort() function is used unless a different method is - * implemented by overriding the default configuration setting for - * PNG_ABORT(). - */ - PNG_ABORT(); -``` - -A recursive search for `PNG_ABORT` reveals the definition: -``` -PS D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24> findstr /snipl "PNG_ABORT" * -CHANGES:701: Added PNG_SETJMP_SUPPORTED, PNG_SETJMP_NOT_SUPPORTED, and PNG_ABORT() macros -libpng-manual.txt:432:errors will result in a call to PNG_ABORT() which defaults to abort(). -libpng-manual.txt:434:You can #define PNG_ABORT() to a function that does something -libpng-manual.txt:2753:errors will result in a call to PNG_ABORT() which defaults to abort(). -libpng-manual.txt:2755:You can #define PNG_ABORT() to a function that does something -libpng-manual.txt:4226:PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()), -libpng.3:942:errors will result in a call to PNG_ABORT() which defaults to abort(). -libpng.3:944:You can #define PNG_ABORT() to a function that does something -libpng.3:3263:errors will result in a call to PNG_ABORT() which defaults to abort(). -libpng.3:3265:You can #define PNG_ABORT() to a function that does something -libpng.3:4736:PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()), -png.h:994: * will use it; otherwise it will call PNG_ABORT(). This function was -pngerror.c:773: * PNG_ABORT(). -pngerror.c:775: PNG_ABORT(); -pngpriv.h:459:#ifndef PNG_ABORT -pngpriv.h:461:# define PNG_ABORT() ExitProcess(0) -pngpriv.h:463:# define PNG_ABORT() abort() -``` - -This already gives us some great clues, but the full definition tells the complete story. - -```c -/* buildtrees\libpng\src\libpng-1.6.24\pngpriv.h:459 */ -#ifndef PNG_ABORT -# ifdef _WINDOWS_ -# define PNG_ABORT() ExitProcess(0) -# else -# define PNG_ABORT() abort() -# endif -#endif -``` - -`abort()` is a standard CRT call and certainly available in UWP, so we just need to convince libpng to be more platform agnostic. The easiest and most reliable way to achieve this is to patch the code; while in this particular case we could pass in a compiler flag to override `PNG_ABORT` because this is a private header, in general it is more reliable to avoid adding more required compiler switches when possible (especially when it isn't already exposed as a CMake option). - -### Patching the code to improve compatibility - -I recommend using git to create the patch file, since you'll already have it installed. -``` -PS D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24> git init . -Initialized empty Git repository in D:/src/vcpkg/buildtrees/libpng/src/libpng-1.6.24/.git/ - -PS D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24> git add . -warning: LF will be replaced by CRLF in ANNOUNCE. -The file will have its original line endings in your working directory. -... - -PS D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24> git commit -m "temp" -[master (root-commit) 68f253f] temp - 422 files changed, 167717 insertions(+) -... -``` - -Now we can modify `pngpriv.h` to use `abort()` everywhere. -```c -/* buildtrees\libpng\src\libpng-1.6.24\pngpriv.h:459 */ -#ifndef PNG_ABORT -# define PNG_ABORT() abort() -#endif -``` - -The output of `git diff` is already in patch format, so we just need to save the patch into the `ports/libpng` directory. -``` -PS buildtrees\libpng\src\libpng-1.6.24> git diff | out-file -enc ascii ..\..\..\..\ports\libpng\use-abort-on-all-platforms.patch -``` - -Finally, we need to apply the patch after extracting the source. -```cmake -# ports\libpng\portfile.cmake -... -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-1.6.24 - PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch" -) - -vcpkg_configure_cmake( -... -``` - -### Verification - -To be completely sure this works from scratch, we need to remove the package and rebuild it: - -``` -PS D:\src\vcpkg> vcpkg remove libpng:x86-uwp -Package libpng:x86-uwp was successfully removed -``` -and delete the building directory: D:\src\vcpkg\buildtrees\libpng - -Now we try a fresh, from scratch install. -``` -PS D:\src\vcpkg> vcpkg install libpng:x86-uwp --- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-uwp --- DOWNLOADS=D:/src/vcpkg/downloads --- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/libpng_x86-uwp --- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/libpng --- CURRENT_PORT_DIR=D:/src/vcpkg/ports/libpng/. --- Using cached D:/src/vcpkg/downloads/libpng-1.6.24.tar.xz --- Extracting source D:/src/vcpkg/downloads/libpng-1.6.24.tar.xz --- Extracting done --- Configuring x86-uwp-rel --- Configuring x86-uwp-rel done --- Configuring x86-uwp-dbg --- Configuring x86-uwp-dbg done --- Build x86-uwp-rel --- Build x86-uwp-rel done --- Build x86-uwp-dbg --- Build x86-uwp-dbg done --- Package x86-uwp-rel --- Package x86-uwp-rel done --- Package x86-uwp-dbg --- Package x86-uwp-dbg done -Package libpng:x86-uwp is installed -``` - -Finally, to fully commit and publish the changes, we need to bump the internal release number and add the patch file to source control. - -``` -# ports\libpng\CONTROL -Source: libpng -Version: 1.6.24-1 -Build-Depends: zlib -``` diff --git a/docs/examples/packaging-zlib.md b/docs/examples/packaging-zlib.md new file mode 100644 index 000000000..81bc58314 --- /dev/null +++ b/docs/examples/packaging-zlib.md @@ -0,0 +1,80 @@ +## Example 2: Packaging zlib + +### Bootstrap with `create` +First, locate a globally accessible archive of the library's sources. Zip, gzip, and bzip are all supported. Strongly prefer official sources or mirrors over unofficial mirrors. + +*Looking at zlib's website, the URL http://zlib.net/zlib128.zip looks appropriate.* + +Second, determine a suitable package name. This should be ASCII, lowercase, and recognizable to someone who knows the library's "human name". If the library is already packaged in another package manager, prefer that name. + +*Since zlib is already packaged as zlib, we will use the name zlib2 for this example.* + +Finally, if the server's name for the archive is not very descriptive (such as downloading a zipped commit or branch from GitHub), choose a nice archive name of the form `-.zip`. + +*`zlib128.zip` is a fine name, so no change needed.* + +All this information can then be passed into the `create` command, which will download the sources and bootstrap the packaging process inside `ports\`. + +```no-highlight +PS D:\src\vcpkg> .\vcpkg create zlib2 http://zlib.net/zlib128.zip zlib128.zip +-- Generated portfile: D:/src/vcpkg/ports/zlib2/portfile.cmake +``` + +### Create the CONTROL file +In addition to the generated `ports\\portfile.cmake`, we also need a `ports\\CONTROL` file. This file is a simply formatted set of fields describing the package's metadata. + +*For zlib2, we'll create the file `ports\zlib2\CONTROL` with the following contents:* +```no-highlight +Source: zlib2 +Version: 1.2.8 +Description: A Massively Spiffy Yet Delicately Unobtrusive Compression Library +``` + +### Tweak the generated portfile +The generated `portfile.cmake` will need some editing to correctly package most libraries in the wild, however we can start by trying out the build. + +```no-highlight +PS D:\src\vcpkg> .\vcpkg build zlib2 +-- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-windows +-- DOWNLOADS=D:/src/vcpkg/downloads +-- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/zlib2_x86-windows +-- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/zlib2 +-- CURRENT_PORT_DIR=D:/src/vcpkg/ports/zlib2 +-- Using cached D:/src/vcpkg/downloads/zlib128.zip +-- Extracting source D:/src/vcpkg/downloads/zlib128.zip +-- Extracting done +-- Configuring x86-windows-rel +CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:13 (message): + Command failed: C:/Program Files + (x86)/CMake/bin/cmake.exe;D:/src/vcpkg/buildtrees/zlib2/src/zlib128;-G;Ninja;-DCMAKE_VERBOSE_MAKEFILE=ON;-DCMAKE_BUILD_TYPE=Release;-DCMAKE_TOOLCHAIN_FILE=D:/src/vcpkg/triplets/x86-windows.cmake;-DCMAKE_PREFIX_PATH=D:/src/vcpkg/installed/x86-windows;- +DCMAKE_INSTALL_PREFIX=D:/src/vcpkg/packages/zlib2_x86-windows + + + Working Directory: D:/src/vcpkg/buildtrees/zlib2/x86-windows-rel + + See logs for more information: + + D:/src/vcpkg/buildtrees/zlib2/config-x86-windows-rel-out.log + D:/src/vcpkg/buildtrees/zlib2/config-x86-windows-rel-err.log + +Call Stack (most recent call first): + scripts/cmake/vcpkg_configure_cmake.cmake:15 (vcpkg_execute_required_process) + ports/zlib2/portfile.cmake:8 (vcpkg_configure_cmake) + scripts/ports.cmake:105 (include) + scripts/ports.cmake:184 (build) +``` + +At this point, it is a matter of reading the error messages and log files while steadily improving the quality of the portfile. Zlib required providing a discrete copy of the LICENSE to copy into the package, suppressing the build and installation of executables and headers, and removing the static libraries after they were installed. + +### Suggested example portfiles +In the `ports\` directory are many libraries that can be used as examples, including many that are not based on CMake. + +- Header only libraries + - rapidjson + - range-v3 +- MSBuild-based + - mpg123 + - glew +- Non-CMake, custom buildsystem + - openssl + - boost diff --git a/docs/examples/patching-libpng.md b/docs/examples/patching-libpng.md new file mode 100644 index 000000000..2337b73da --- /dev/null +++ b/docs/examples/patching-libpng.md @@ -0,0 +1,204 @@ +## Example 3: Patching libpng to work for x86-uwp + +### Initial error logs +First, try building: + +```no-highlight +PS D:\src\vcpkg> vcpkg install libpng:x86-uwp +-- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-uwp +-- DOWNLOADS=D:/src/vcpkg/downloads +-- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/libpng_x86-uwp +-- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/libpng +-- CURRENT_PORT_DIR=D:/src/vcpkg/ports/libpng/. +-- Using cached D:/src/vcpkg/downloads/libpng-1.6.24.tar.xz +-- Extracting done +-- Configuring x86-uwp-rel +-- Configuring x86-uwp-rel done +-- Configuring x86-uwp-dbg +-- Configuring x86-uwp-dbg done +-- Build x86-uwp-rel +CMake Error at scripts/cmake/execute_required_process.cmake:14 (message): + Command failed: C:/Program + Files/CMake/bin/cmake.exe;--build;.;--config;Release + + Working Directory: D:/src/vcpkg/buildtrees/libpng/x86-uwp-rel + + See logs for more information: + + D:\src\vcpkg\buildtrees\libpng\build-x86-uwp-rel-out.log + D:\src\vcpkg\buildtrees\libpng\build-x86-uwp-rel-err.log + +Call Stack (most recent call first): + scripts/cmake/vcpkg_build_cmake.cmake:3 (execute_required_process) + ports/libpng/portfile.cmake:22 (vcpkg_build_cmake) + scripts/ports.cmake:84 (include) + + +Error: build command failed +``` + +Next, looking at the above logs (build-...-out.log and build-...-err.log). + +```no-highlight +// build-x86-uwp-rel-out.log +... +"D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\ALL_BUILD.vcxproj" (default target) (1) -> +"D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj" (default target) (3) -> +(ClCompile target) -> + D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24\pngerror.c(775): warning C4013: 'ExitProcess' undefined; assuming extern returning int [D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj] + + +"D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\ALL_BUILD.vcxproj" (default target) (1) -> +"D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj" (default target) (3) -> +(Link target) -> + pngerror.obj : error LNK2019: unresolved external symbol _ExitProcess referenced in function _png_longjmp [D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj] + D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\Release\libpng16.dll : fatal error LNK1120: 1 unresolved externals [D:\src\vcpkg\buildtrees\libpng\x86-uwp-rel\png.vcxproj] + + 1 Warning(s) + 2 Error(s) + +Time Elapsed 00:00:04.19 +``` + +### Identify the problematic code + +Taking a look at [MSDN](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx) shows that `ExitProcess` is only available for desktop apps. Additionally, it's useful to see the surrounding context: + +```c +/* buildtrees\libpng\src\libpng-1.6.24\pngerror.c:769 */ + /* If control reaches this point, png_longjmp() must not return. The only + * choice is to terminate the whole process (or maybe the thread); to do + * this the ANSI-C abort() function is used unless a different method is + * implemented by overriding the default configuration setting for + * PNG_ABORT(). + */ + PNG_ABORT(); +``` + +A recursive search for `PNG_ABORT` reveals the definition: +```no-highlight +PS D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24> findstr /snipl "PNG_ABORT" * +CHANGES:701: Added PNG_SETJMP_SUPPORTED, PNG_SETJMP_NOT_SUPPORTED, and PNG_ABORT() macros +libpng-manual.txt:432:errors will result in a call to PNG_ABORT() which defaults to abort(). +libpng-manual.txt:434:You can #define PNG_ABORT() to a function that does something +libpng-manual.txt:2753:errors will result in a call to PNG_ABORT() which defaults to abort(). +libpng-manual.txt:2755:You can #define PNG_ABORT() to a function that does something +libpng-manual.txt:4226:PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()), +libpng.3:942:errors will result in a call to PNG_ABORT() which defaults to abort(). +libpng.3:944:You can #define PNG_ABORT() to a function that does something +libpng.3:3263:errors will result in a call to PNG_ABORT() which defaults to abort(). +libpng.3:3265:You can #define PNG_ABORT() to a function that does something +libpng.3:4736:PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()), +png.h:994: * will use it; otherwise it will call PNG_ABORT(). This function was +pngerror.c:773: * PNG_ABORT(). +pngerror.c:775: PNG_ABORT(); +pngpriv.h:459:#ifndef PNG_ABORT +pngpriv.h:461:# define PNG_ABORT() ExitProcess(0) +pngpriv.h:463:# define PNG_ABORT() abort() +``` + +This already gives us some great clues, but the full definition tells the complete story. + +```c +/* buildtrees\libpng\src\libpng-1.6.24\pngpriv.h:459 */ +#ifndef PNG_ABORT +# ifdef _WINDOWS_ +# define PNG_ABORT() ExitProcess(0) +# else +# define PNG_ABORT() abort() +# endif +#endif +``` + +`abort()` is a standard CRT call and certainly available in UWP, so we just need to convince libpng to be more platform agnostic. The easiest and most reliable way to achieve this is to patch the code; while in this particular case we could pass in a compiler flag to override `PNG_ABORT` because this is a private header, in general it is more reliable to avoid adding more required compiler switches when possible (especially when it isn't already exposed as a CMake option). + +### Patching the code to improve compatibility + +We recommend using git to create the patch file, since you'll already have it installed. +```no-highlight +PS D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24> git init . +Initialized empty Git repository in D:/src/vcpkg/buildtrees/libpng/src/libpng-1.6.24/.git/ + +PS D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24> git add . +warning: LF will be replaced by CRLF in ANNOUNCE. +The file will have its original line endings in your working directory. +... + +PS D:\src\vcpkg\buildtrees\libpng\src\libpng-1.6.24> git commit -m "temp" +[master (root-commit) 68f253f] temp + 422 files changed, 167717 insertions(+) +... +``` + +Now we can modify `pngpriv.h` to use `abort()` everywhere. +```c +/* buildtrees\libpng\src\libpng-1.6.24\pngpriv.h:459 */ +#ifndef PNG_ABORT +# define PNG_ABORT() abort() +#endif +``` + +The output of `git diff` is already in patch format, so we just need to save the patch into the `ports/libpng` directory. +```no-highlight +PS buildtrees\libpng\src\libpng-1.6.24> git diff | out-file -enc ascii ..\..\..\..\ports\libpng\use-abort-on-all-platforms.patch +``` + +Finally, we need to apply the patch after extracting the source. +```cmake +# ports\libpng\portfile.cmake +... +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-1.6.24 + PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch" +) + +vcpkg_configure_cmake( +... +``` + +### Verification + +To be completely sure this works from scratch, we need to remove the package and rebuild it: + +```no-highlight +PS D:\src\vcpkg> vcpkg remove libpng:x86-uwp +Package libpng:x86-uwp was successfully removed +``` +and complete delete the building directory: D:\src\vcpkg\buildtrees\libpng + +Now we try a fresh, from scratch install. +```no-highlight +PS D:\src\vcpkg> vcpkg install libpng:x86-uwp +-- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-uwp +-- DOWNLOADS=D:/src/vcpkg/downloads +-- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/libpng_x86-uwp +-- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/libpng +-- CURRENT_PORT_DIR=D:/src/vcpkg/ports/libpng/. +-- Using cached D:/src/vcpkg/downloads/libpng-1.6.24.tar.xz +-- Extracting source D:/src/vcpkg/downloads/libpng-1.6.24.tar.xz +-- Extracting done +-- Configuring x86-uwp-rel +-- Configuring x86-uwp-rel done +-- Configuring x86-uwp-dbg +-- Configuring x86-uwp-dbg done +-- Build x86-uwp-rel +-- Build x86-uwp-rel done +-- Build x86-uwp-dbg +-- Build x86-uwp-dbg done +-- Package x86-uwp-rel +-- Package x86-uwp-rel done +-- Package x86-uwp-dbg +-- Package x86-uwp-dbg done +Package libpng:x86-uwp is installed +``` + +Finally, to fully commit and publish the changes, we need to bump the internal release number and add the patch file to source control, then make a Pull Request! + +```no-highlight +# ports\libpng\CONTROL +Source: libpng +Version: 1.6.24-1 +Build-Depends: zlib +``` diff --git a/docs/examples/using-sqlite.md b/docs/examples/using-sqlite.md new file mode 100644 index 000000000..d12695bfb --- /dev/null +++ b/docs/examples/using-sqlite.md @@ -0,0 +1,177 @@ +# Example: Using Sqlite + + - [Step 1: Install](#install) + - [Step 2: Use](#use) + - [VS/MSBuild Project (User-wide integration)](#msbuild) + - [CMake (Toolchain file)](#cmake) + - [Other integration options](../users/integration.md) + +--- + +## Step 1: Install + +First, we need to know what name [Sqlite](https://sqlite.org) goes by in the ports tree. To do that, we'll run the `search` command and inspect the output: +```no-highlight +PS D:\src\vcpkg> .\vcpkg search sqlite +libodb-sqlite 2.4.0 Sqlite support for the ODB ORM library +sqlite3 3.15.0 SQLite is a software library that implements a se... + +If your library is not listed, please open an issue at: + https://github.com/Microsoft/vcpkg/issues +``` +Looking at the list, we can see that the port is named "sqlite3". You can also run the `search` command without arguments to see the full list of packages. + +Installing is then as simple as using the `install` command. +```no-highlight +PS D:\src\vcpkg> .\vcpkg install sqlite3 +-- CURRENT_INSTALLED_DIR=D:/src/vcpkg/installed/x86-windows +-- DOWNLOADS=D:/src/vcpkg/downloads +-- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/sqlite3_x86-windows +-- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/sqlite3 +-- CURRENT_PORT_DIR=D:/src/vcpkg/ports/sqlite3/. +-- Downloading https://sqlite.org/2016/sqlite-amalgamation-3150000.zip... +-- Downloading https://sqlite.org/2016/sqlite-amalgamation-3150000.zip... OK +-- Testing integrity of downloaded file... +-- Testing integrity of downloaded file... OK +-- Extracting source D:/src/vcpkg/downloads/sqlite-amalgamation-3150000.zip +-- Extracting done +-- Configuring x86-windows-rel +-- Configuring x86-windows-rel done +-- Configuring x86-windows-dbg +-- Configuring x86-windows-dbg done +-- Build x86-windows-rel +-- Build x86-windows-rel done +-- Build x86-windows-dbg +-- Build x86-windows-dbg done +-- Package x86-windows-rel +-- Package x86-windows-rel done +-- Package x86-windows-dbg +-- Package x86-windows-dbg done +-- Performing post-build validation +-- Performing post-build validation done +Package sqlite3:x86-windows is installed +``` + +We can check that sqlite3 was successfully installed for x86 windows desktop by running the `list` command. +```no-highlight +PS D:\src\vcpkg> .\vcpkg list +sqlite3:x86-windows 3.15.0 SQLite is a software library that implements a se... +``` + +To install for other architectures and platforms such as Universal Windows Platform or x64 Desktop, you can suffix the package name with `:`. +```no-highlight +PS D:\src\vcpkg> .\vcpkg install sqlite3:x86-uwp zlib:x64-windows +``` + +See `.\vcpkg help triplet` for all supported targets. + +--- + +## Step 2: Use + +#### VS/MSBuild Project (User-wide integration) + +The recommended and most productive way to use vcpkg is via user-wide integration, making the system available for all projects you build. The user-wide integration will prompt for administrator access the first time it is used on a given machine, but afterwords is no longer required and the integration is configured on a per-user basis. +```no-highlight +PS D:\src\vcpkg> .\vcpkg integrate install +Applied user-wide integration for this vcpkg root. + +All C++ projects can now #include any installed libraries. +Linking will be handled automatically. +Installing new libraries will make them instantly available. +``` +*Note: You will need to restart Visual Studio or perform a Build to update intellisense with the changes.* + +You can now simply use File -> New Project in Visual Studio 2015 or Visual Studio 2017 and the library will be automatically available. For Sqlite, you can try out their [C/C++ sample](https://sqlite.org/quickstart.html). + +To remove the integration for your user, you can use `.\vcpkg integrate remove`. + + +#### CMake (Toolchain File) + +The best way to use installed libraries with cmake is via the toolchain file `scripts\buildsystems\vcpkg.cmake`. To use this file, you simply need to add it onto your CMake command line as `-DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake`. + +If you are using CMake through Open Folder with Visual Studio 2017 you can define `CMAKE_TOOLCHAIN_FILE` by adding a "variables" section to each of your `CMakeSettings.json` configurations: + +```json +{ + "configurations": [{ + "name": "x86-Debug", + "generator": "Visual Studio 15 2017", + "configurationType" : "Debug", + "buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "-m -v:minimal", + "variables": [{ + "name": "CMAKE_TOOLCHAIN_FILE", + "value": "D:\\src\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake" + }] + }] +} +``` + +Now let's make a simple CMake project with a main file. +```cmake +# CMakeLists.txt +cmake_minimum_required(VERSION 3.0) +project(test) + +find_package(Sqlite3 REQUIRED) + +add_executable(main main.cpp) +target_link_libraries(main sqlite3) +``` +```cpp +// main.cpp +#include +#include + +int main() +{ + printf("%s\n", sqlite3_libversion()); + return 0; +} +``` + +Then, we build our project in the normal CMake way: +```no-highlight +PS D:\src\cmake-test> mkdir build +PS D:\src\cmake-test> cd build +PS D:\src\cmake-test\build> cmake .. "-DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake" + // omitted CMake output here // +-- Build files have been written to: D:/src/cmake-test/build +PS D:\src\cmake-test\build> cmake --build . + // omitted MSBuild output here // +Build succeeded. + 0 Warning(s) + 0 Error(s) + +Time Elapsed 00:00:02.38 +PS D:\src\cmake-test\build> .\Debug\main.exe +3.15.0 +``` + +*Note: The correct sqlite3.dll is automatically copied to the output folder when building for x86-windows. You will need to distribute this along with your application.* + +##### Handling libraries without native cmake support + +Unlike other platforms, we do not automatically add the `include\` directory to your compilation line by default. If you're using a library that does not provide CMake integration, you will need to explicitly search for the files and add them yourself using [`find_path()`][1] and [`find_library()`][2]. + +```cmake +# To find and use catch +find_path(CATCH_INCLUDE_DIR catch.hpp) +include_directories(${CATCH_INCLUDE_DIR}) + +# To find and use azure-storage-cpp +find_path(WASTORAGE_INCLUDE_DIR was/blob.h) +find_library(WASTORAGE_LIBRARY wastorage) +include_directories(${WASTORAGE_INCLUDE_DIR}) +link_libraries(${WASTORAGE_LIBRARY}) + +# Note that we recommend using the target-specific directives for a cleaner cmake: +# target_include_directories(main ${LIBRARY}) +# target_link_libraries(main PRIVATE ${LIBRARY}) +``` + +[1]: https://cmake.org/cmake/help/latest/command/find_path.html +[2]: https://cmake.org/cmake/help/latest/command/find_library.html diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..9b279baf0 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,38 @@ +### Quick Start + +Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are currently in a preview state; your involvement is vital to its success. + +- [How to use Sqlite in your application](examples/using-sqlite.md) + +### Examples + +- [Example 1: Using Sqlite](examples/using-sqlite.md) +- [Example 2: Packaging zlib](examples/packaging-zlib.md) +- [Example 3: Patching libpng for x86-uwp](examples/patching-libpng.md) + +### User Help + +- [Integration with build systems](users/integration.md) + +### Maintainer help + +- [Control files](maintainers/control-files.md) +- [Portfile functions](maintainers/portfile-functions.md) + +### Specifications + +- [Export](specifications/export-command.md) + +### Blog posts + +- [Vcpkg: introducing the export command](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/) +- [Binary Compatibility and Pain-free Upgrade Why Moving to Visual Studio 2017 is almost "too easy"](https://blogs.msdn.microsoft.com/vcblog/2017/03/07/binary-compatibility-and-pain-free-upgrade-why-moving-to-visual-studio-2017-is-almost-too-easy/) +- [Vcpkg recent enhancements](https://blogs.msdn.microsoft.com/vcblog/2017/02/14/vcpkg-recent-enhancements/) +- [Vcpkg 3 Months Anniversary, Survey](https://blogs.msdn.microsoft.com/vcblog/2017/01/11/vcpkg-3-months-anniversary-survey/) +- [Vcpkg updates: Static linking is now available](https://blogs.msdn.microsoft.com/vcblog/2016/11/01/vcpkg-updates-static-linking-is-now-available/) +- [Vcpkg: a tool to acquire and build C++ open source libraries on Windows](https://blogs.msdn.microsoft.com/vcblog/2016/09/19/vcpkg-a-tool-to-acquire-and-build-c-open-source-libraries-on-windows/) + +### Other + +- [FAQ](about/faq.md) +- [Privacy](about/privacy.md) diff --git a/docs/maintainers/control-files.md b/docs/maintainers/control-files.md new file mode 100644 index 000000000..1cb444df3 --- /dev/null +++ b/docs/maintainers/control-files.md @@ -0,0 +1,51 @@ +## `CONTROL` files +Each port has some static metadata in the form of a `CONTROL` file. This file uses the same rough syntax as and a subset of the fields from [the Debian `control` format][debian]. + +Fields are case-sensitive. + +[debian]: https://www.debian.org/doc/debian-policy/ch-controlfields.html + +### Recognized fields + +#### Source +The name of the port. + +#### Version +The port version. + +This field should be an alphanumeric string which may also contain `.`, `_`, or `-`. No attempt at ordering versions is made; all versions are treated as bitstrings 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. + +Example: +```no-highlight +Version: 1.0.5-2 +``` + +#### Description +A description of the library + +The first sentence of the description should concisely describe the purpose and contents of the library. Then, a larger description including the library's "proper name" should follow. + +#### Maintainer +Reserved for future use. + +#### Build-Depends +The list of dependencies required to build and use this library. + +Example: +```no-highlight +Build-Depends: zlib, libpng, libjpeg-turbo, tiff +``` + +Unlike dpkg, Vcpkg does not distinguish between build-only dependencies and runtime dependencies. The complete list of dependencies needed to successfully use the library should be specified. + +*For example: websocketpp is a header only library, and thus does not require any dependencies at install time. However, downstream users need boost and openssl to make use of the library. Therefore, websocketpp lists boost and openssl as dependencies* + +Dependencies can be filtered based on the target triplet to support different requirements on Windows Desktop versus the Universal Windows Platform. Currently, the string inside brackets is substring-compared against the triplet name. __This will change in a future version to not depend on the triplet name.__ + +Example: +```no-highlight +Build-Depends: zlib [windows], openssl [windows], boost [windows], websocketpp [windows] +``` + diff --git a/docs/maintainers/portfile-functions.md b/docs/maintainers/portfile-functions.md new file mode 100644 index 000000000..705d65b7e --- /dev/null +++ b/docs/maintainers/portfile-functions.md @@ -0,0 +1,15 @@ + + +# Portfile helper functions +- [vcpkg\_acquire\_msys](vcpkg_acquire_msys.md) +- [vcpkg\_apply\_patches](vcpkg_apply_patches.md) +- [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md) +- [vcpkg\_configure\_cmake](vcpkg_configure_cmake.md) +- [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\_required\_process](vcpkg_execute_required_process.md) +- [vcpkg\_extract\_source\_archive](vcpkg_extract_source_archive.md) +- [vcpkg\_find\_acquire\_program](vcpkg_find_acquire_program.md) +- [vcpkg\_from\_github](vcpkg_from_github.md) +- [vcpkg\_install\_cmake](vcpkg_install_cmake.md) diff --git a/docs/maintainers/vcpkg_acquire_msys.md b/docs/maintainers/vcpkg_acquire_msys.md new file mode 100644 index 000000000..46cda81fd --- /dev/null +++ b/docs/maintainers/vcpkg_acquire_msys.md @@ -0,0 +1,47 @@ +# vcpkg_acquire_msys + +Download and prepare an MSYS2 instance. + +## Usage +```cmake +vcpkg_acquire_msys() +``` + +## Parameters +### MSYS_ROOT_VAR +An out-variable that will be set to the path to MSYS2. + +## Notes +A call to `vcpkg_acquire_msys` will usually be followed by a call to `bash.exe`: +```cmake +vcpkg_acquire_msys(MSYS_ROOT) +set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + +vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc "${CMAKE_CURRENT_LIST_DIR}\\build.sh" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME build-${TARGET_TRIPLET}-rel +) +``` +To ensure a package is available: +```cmake +vcpkg_acquire_msys(MSYS_ROOT) +set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + +message(STATUS "Installing MSYS Packages") +vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc -c + "pacman -Sy --noconfirm --needed make" + WORKING_DIRECTORY ${MSYS_ROOT} + LOGNAME pacman-${TARGET_TRIPLET}) +``` + +## Examples + +* [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) +* [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake) +* [libvpx](https://github.com/Microsoft/vcpkg/blob/master/ports/libvpx/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_acquire_msys.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_acquire_msys.cmake) diff --git a/docs/maintainers/vcpkg_apply_patches.md b/docs/maintainers/vcpkg_apply_patches.md new file mode 100644 index 000000000..d4d8dbfec --- /dev/null +++ b/docs/maintainers/vcpkg_apply_patches.md @@ -0,0 +1,35 @@ +# vcpkg_apply_patches + +Apply a set of patches to a source tree. + +## Usage +```cmake +vcpkg_apply_patches( + SOURCE_PATH <${SOURCE_PATH}> + [QUIET] + PATCHES ... +) +``` + +## Parameters +### SOURCE_PATH +The source path in which apply the patches. By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### PATCHES +A list of patches that are applied to the source tree. + +Generally, these take the form of `${CMAKE_CURRENT_LIST_DIR}/some.patch` to select patches in the `port\\` directory. + +### QUIET +Disables the warning message upon failure. + +This should only be used for edge cases, such as patches that are known to fail even on a clean source tree. + +## Examples + +* [boost](https://github.com/Microsoft/vcpkg/blob/master/ports/boost/portfile.cmake) +* [freetype](https://github.com/Microsoft/vcpkg/blob/master/ports/freetype/portfile.cmake) +* [libpng](https://github.com/Microsoft/vcpkg/blob/master/ports/libpng/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_apply_patches.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_apply_patches.cmake) diff --git a/docs/maintainers/vcpkg_build_msbuild.md b/docs/maintainers/vcpkg_build_msbuild.md new file mode 100644 index 000000000..178964fcd --- /dev/null +++ b/docs/maintainers/vcpkg_build_msbuild.md @@ -0,0 +1,59 @@ +# vcpkg_build_msbuild + +Build an msbuild-based project. + +## Usage +```cmake +vcpkg_build_msbuild( + PROJECT_PATH <${SOURCE_PATH}/port.sln> + [RELEASE_CONFIGURATION ] + [DEBUG_CONFIGURATION ] + [TARGET ] + [TARGET_PLATFORM_VERSION <10.0.15063.0>] + [PLATFORM <${TRIPLET_SYSTEM_ARCH}>] + [PLATFORM_TOOLSET <${VCPKG_PLATFORM_TOOLSET}>] + [OPTIONS ...] + [OPTIONS_RELEASE ...] + [OPTIONS_DEBUG ...] +) +``` + +## Parameters +### PROJECT_PATH +The path to the solution (`.sln`) or project (`.vcxproj`) file. + +### RELEASE_CONFIGURATION +The configuration (``/p:Configuration`` msbuild parameter) used for Release builds. + +### DEBUG_CONFIGURATION +The configuration (``/p:Configuration`` msbuild parameter) +used for Debug builds. + +### TARGET_PLATFORM_VERSION +The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter) + +### TARGET +The MSBuild target to build. (``/t:``) + +### PLATFORM +The platform (``/p:Platform`` msbuild parameter) used for the build. + +### PLATFORM_TOOLSET +The platform toolset (``/p:PlatformToolset`` msbuild parameter) used for the build. + +### OPTIONS +Additional options passed to msbuild for all builds. + +### OPTIONS_RELEASE +Additional options passed to msbuild for Release builds. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to msbuild for Debug builds. These are in addition to `OPTIONS`. + +## Examples + +* [libuv](https://github.com/Microsoft/vcpkg/blob/master/ports/libuv/portfile.cmake) +* [zeromq](https://github.com/Microsoft/vcpkg/blob/master/ports/zeromq/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_build_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_msbuild.cmake) diff --git a/docs/maintainers/vcpkg_configure_cmake.md b/docs/maintainers/vcpkg_configure_cmake.md new file mode 100644 index 000000000..93f661767 --- /dev/null +++ b/docs/maintainers/vcpkg_configure_cmake.md @@ -0,0 +1,49 @@ +# vcpkg_configure_cmake + +Configure CMake for Debug and Release builds of a project. + +## Usage +```cmake +vcpkg_configure_cmake( + SOURCE_PATH <${SOURCE_PATH}> + [PREFER_NINJA] + [GENERATOR <"NMake Makefiles">] + [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] + [OPTIONS_RELEASE <-DOPTIMIZE=1>...] + [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +) +``` + +## Parameters +### 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. + +### 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". + +### OPTIONS +Additional options passed to CMake during the configuration. + +### OPTIONS_RELEASE +Additional options passed to CMake during the Release configuration. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`. + +## Notes +This command supplies many common arguments to CMake. To see the full list, examine the source. + +## Examples + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) +* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_configure_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_cmake.cmake) diff --git a/docs/maintainers/vcpkg_copy_pdbs.md b/docs/maintainers/vcpkg_copy_pdbs.md new file mode 100644 index 000000000..6bfa488db --- /dev/null +++ b/docs/maintainers/vcpkg_copy_pdbs.md @@ -0,0 +1,19 @@ +# vcpkg_copy_pdbs + +Automatically locate pdbs in the build tree and copy them adjacent to all DLLs. + +## Usage +```cmake +vcpkg_copy_pdbs() +``` + +## Notes +This command should always be called by portfiles after they have finished rearranging the binary output. + +## Examples + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_copy_pdbs.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_copy_pdbs.cmake) diff --git a/docs/maintainers/vcpkg_copy_tool_dependencies.md b/docs/maintainers/vcpkg_copy_tool_dependencies.md new file mode 100644 index 000000000..05d74f0b2 --- /dev/null +++ b/docs/maintainers/vcpkg_copy_tool_dependencies.md @@ -0,0 +1,21 @@ +# vcpkg_copy_tool_dependencies + +Copy all DLL dependencies of built tools into the tool folder. + +## Usage +```cmake +vcpkg_copy_tool_dependencies(<${CURRENT_PACKAGES_DIR}/tools/${PORT}>) +``` +## Parameters +The path to the directory containing the tools. + +## Notes +This command should always be called by portfiles after they have finished rearranging the binary output, if they have any tools. + +## Examples + +* [glib](https://github.com/Microsoft/vcpkg/blob/master/ports/glib/portfile.cmake) +* [fltk](https://github.com/Microsoft/vcpkg/blob/master/ports/fltk/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_copy_tool_dependencies.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_copy_tool_dependencies.cmake) diff --git a/docs/maintainers/vcpkg_download_distfile.md b/docs/maintainers/vcpkg_download_distfile.md new file mode 100644 index 000000000..7897610e3 --- /dev/null +++ b/docs/maintainers/vcpkg_download_distfile.md @@ -0,0 +1,39 @@ +# vcpkg_download_distfile + +Download and cache a file needed for this port. + +## Usage +```cmake +vcpkg_download_distfile( + + URLS ... + FILENAME + SHA512 <5981de...> +) +``` +## Parameters +### OUT_VARIABLE +This variable will be set to the full path to the downloaded file. This can then immediately be passed in to [`vcpkg_extract_source_archive`](vcpkg_extract_source_archive.md) for sources. + +### URLS +A list of URLs to be consulted. They will be tried in order until one of the downloaded files successfully matches the SHA512 given. + +### FILENAME +The local name for the file. Files are shared between ports, so the file may need to be renamed to make it clearly attributed to this port and avoid conflicts. + +### SHA512 +The expected hash for the file. + +If this doesn't match the downloaded version, the build will be terminated with a message describing the mismatch. + +## Notes +The command [`vcpkg_from_github`](vcpkg_from_github.md) should be used instead of this for downloading the main archive for GitHub projects. + +## Examples + +* [boost](https://github.com/Microsoft/vcpkg/blob/master/ports/boost/portfile.cmake) +* [fontconfig](https://github.com/Microsoft/vcpkg/blob/master/ports/fontconfig/portfile.cmake) +* [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_download_distfile.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_download_distfile.cmake) diff --git a/docs/maintainers/vcpkg_execute_required_process.md b/docs/maintainers/vcpkg_execute_required_process.md new file mode 100644 index 000000000..4b1a7e081 --- /dev/null +++ b/docs/maintainers/vcpkg_execute_required_process.md @@ -0,0 +1,33 @@ +# vcpkg_execute_required_process + +Execute a process with logging and fail the build if the command fails. + +## Usage +```cmake +vcpkg_execute_required_process( + COMMAND <${PERL}> [...] + WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg> + LOGNAME +) +``` +## Parameters +### COMMAND +The command to be executed, along with its arguments. + +### 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 + +* [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) +* [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) + +## Source +[scripts/cmake/vcpkg_execute_required_process.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_execute_required_process.cmake) diff --git a/docs/maintainers/vcpkg_extract_source_archive.md b/docs/maintainers/vcpkg_extract_source_archive.md new file mode 100644 index 000000000..104032ffc --- /dev/null +++ b/docs/maintainers/vcpkg_extract_source_archive.md @@ -0,0 +1,32 @@ +# vcpkg_extract_source_archive + +Extract an archive into the source directory. + +## Usage +```cmake +vcpkg_extract_source_archive( + <${ARCHIVE}> [<${TARGET_DIRECTORY}>] +) +``` +## Parameters +### ARCHIVE +The full path to the archive to be extracted. + +This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md). + +### TARGET_DIRECTORY +If specified, the archive will be extracted into the target directory instead of `${CURRENT_BUILDTREES_DIR}\src\`. + +This can be used to mimic git submodules, by extracting into a subdirectory of another archive. + +## Notes +This command will also create a tracking file named .extracted in the TARGET_DIRECTORY. This file, when present, will suppress the extraction of the archive. + +## Examples + +* [libraw](https://github.com/Microsoft/vcpkg/blob/master/ports/libraw/portfile.cmake) +* [protobuf](https://github.com/Microsoft/vcpkg/blob/master/ports/protobuf/portfile.cmake) +* [msgpack](https://github.com/Microsoft/vcpkg/blob/master/ports/msgpack/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_extract_source_archive.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_extract_source_archive.cmake) diff --git a/docs/maintainers/vcpkg_find_acquire_program.md b/docs/maintainers/vcpkg_find_acquire_program.md new file mode 100644 index 000000000..209b4416e --- /dev/null +++ b/docs/maintainers/vcpkg_find_acquire_program.md @@ -0,0 +1,37 @@ +# vcpkg_find_acquire_program + +Download or find a well-known tool. + +## Usage +```cmake +vcpkg_find_acquire_program() +``` +## Parameters +### VAR +This variable specifies both the program to be acquired as well as the out parameter that will be set to the path of the program executable. + +## Notes +The current list of programs includes: + +- 7Z +- BISON +- FLEX +- PERL +- PYTHON2 +- PYTHON3 +- JOM +- MESON +- NASM +- NINJA +- YASM + +Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md). + +## Examples + +* [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) +* [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) +* [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_find_acquire_program.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_find_acquire_program.cmake) diff --git a/docs/maintainers/vcpkg_from_github.md b/docs/maintainers/vcpkg_from_github.md new file mode 100644 index 000000000..cb7849fcc --- /dev/null +++ b/docs/maintainers/vcpkg_from_github.md @@ -0,0 +1,52 @@ +# vcpkg_from_github + +Download and extract a project from GitHub. Enables support for `install --head`. + +## Usage: +```cmake +vcpkg_from_github( + OUT_SOURCE_PATH + REPO + [REF ] + [SHA512 <45d0d7f8cc350...>] + [HEAD_REF ] +) +``` + +## Parameters: +### OUT_SOURCE_PATH +Specifies the out-variable that will contain the extracted location. + +This should be set to `SOURCE_PATH` by convention. + +### REPO +The organization or user and repository on GitHub. + +### REF +A stable git commit-ish (ideally a tag) that will not change contents. + +If `REF` is specified, `SHA512` must also be specified. + +### SHA512 +The SHA512 hash that should match the archive (https://github.com/${REPO}/archive/${REF}.tar.gz). + +This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. + +### HEAD_REF +The unstable git commit-ish (ideally a branch) to pull for `--head` builds. + +For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. + +## Notes: +At least one of `REF` and `HEAD_REF` must be specified. + +This exports the `VCPKG_HEAD_VERSION` variable during head builds. + +## Examples: + +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +* [ms-gsl](https://github.com/Microsoft/vcpkg/blob/master/ports/ms-gsl/portfile.cmake) +* [beast](https://github.com/Microsoft/vcpkg/blob/master/ports/beast/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_from_github.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_github.cmake) diff --git a/docs/maintainers/vcpkg_install_cmake.md b/docs/maintainers/vcpkg_install_cmake.md new file mode 100644 index 000000000..e199d1292 --- /dev/null +++ b/docs/maintainers/vcpkg_install_cmake.md @@ -0,0 +1,25 @@ +# vcpkg_install_cmake + +Build and install a cmake project. + +## Usage: +```cmake +vcpkg_install_cmake([MSVC_64_TOOLSET]) +``` + +## Parameters: +### MSVC_64_TOOLSET +This adds the `/p:PreferredToolArchitecture=x64` switch if the underlying buildsystem is MSBuild. Some large projects can run out of memory when linking if they use the 32-bit hosted tools. + +## Notes: +This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). + +## Examples: + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) +* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_install_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_cmake.cmake) diff --git a/docs/regenerate.ps1 b/docs/regenerate.ps1 new file mode 100644 index 000000000..abb91af61 --- /dev/null +++ b/docs/regenerate.ps1 @@ -0,0 +1,27 @@ +Param([string]$VcpkgRoot = "") + +$ErrorActionPreference = "Stop" + +if (!$VcpkgRoot) { + $VcpkgRoot = ".." +} + +$VcpkgRoot = Resolve-Path $VcpkgRoot + +if (!(Test-Path "$VcpkgRoot\.vcpkg-root")) { + throw "Invalid vcpkg instance, did you forget -VcpkgRoot?" +} + +Set-Content -Path "$PSScriptRoot\maintainers\portfile-functions.md" -Value "`n`n# Portfile helper functions" + +ls "$VcpkgRoot\scripts\cmake\*.cmake" | % { + $contents = Get-Content $_ ` + | ? { $_ -match "^## |^##`$" } ` + | % { $_ -replace "^## ?","" } + + if ($contents) { + Set-Content -Path "$PSScriptRoot\maintainers\$($_.BaseName).md" -Value "$($contents -join "`n")`n`n## Source`n[scripts/cmake/$($_.Name)](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/$($_.Name))" + "- [$($_.BaseName -replace "_","\_")]($($_.BaseName).md)" ` + | Out-File -Enc Ascii -Append -FilePath "$PSScriptRoot\maintainers\portfile-functions.md" + } +} diff --git a/docs/specifications/export-command.md b/docs/specifications/export-command.md new file mode 100644 index 000000000..aaa95cb1c --- /dev/null +++ b/docs/specifications/export-command.md @@ -0,0 +1,172 @@ +# Binary Export (Apr 28, 2017) + +## 1. Motivation + +### A. Build once and share + +Customers want to be able to build their set of required libraries once, and then distribute the resulting binaries to all members of the "group". This has been brought up in +- Enterprise environments, in which there are dedicated teams to acquire libraries and then share them with other team to consume them +- Academic environments, in which the professor/teacher wants to build the required libraries and then provide them to all the students +- CI Systems, in which developers want to quickly distribute their exact set of dependencies to a cloud-based farm of build machines + +Building once and sharing ensures that everyone gets exactly the same binaries, isolates the building effort to a small number of people and minimizes friction to obtain them. Therefore, there is value in enabling users to easily export ready-to-share binaries from `vcpkg`. + +### B. Very large libraries + +Libraries like [Qt][] can take a very long time to build (5+ hours). Therefore, having the ability to build them and then distribute the binaries can save a lot of time. + +### C. Flexibility and uses without `vcpkg` + +`vcpkg` currently handles cases where you have a `vcpkg` enlistment on your machine and use it for acquiring libraries and integrating into Visual Studio, CMake etc. However, users need the ability to build the libraries and then use them outside of and independently of `vcpkg`. For example: +- Use `vcpkg` for the build, then host the binaries in a website (similarly to nuget) +- Use `vcpkg` for the build, then put the binaries in an installer and distribute the installer + +Consuming the libraries outside of `vcpkg` forfeits the ability to install new libraries or update existing ones, but this can be: +- not a concern, like in a short term project or assignment +- explicitly desired, like in the development of a game where libraries and their versions are sealed for a particular release, never to be modified + +### D. Easy consumption in Visual Studio for NuGet users + +Customers have requested C++ NuGet packages to integrate into their project. This has come from: +- Customers than have used NuGet (e.g. in C#) and find it very convenient +- Customers who are working on a C# project that has a few dependencies on C++ and just want those dependencies to be satisfied in the most automatic way possible + +Providing a way to create NuGet packages provides great value to those customers. In an enterprise environment which focuses on C#, the dedicated acquisition team can create the NuGet packages with `vcpkg` and provide them to the other developers. For the "end-developer", this makes the consumption of C++ libraries the same as C# ones. + +[Qt]: https://www.qt.io/ + +## 2. Other design concerns + +- The `vcpkg` root may have a variety of packages built and many of them might be unrelated to the current task. Providing an easy way to export a subset of them will enhance user experience. +- Since binary compatibility is not guaranteed, it is not safe to individually export packages. Therefore, when exporting a particular package, all of the dependencies that it was built against must also be present in the export format (e.g. zip file). When a `vcpkg export` command succeeds, there is a guarantee that all required headers/binaries are available in the target bundle. + +## 3. Proposed solution + +This document proposes the `vcpkg export` command to pack the desired binaries in a convenient format. It is not the goal of this document to discuss binary distribution for C++ in a similar way that NuGet does for C#. It proposes exporting "library sets" instead of individual libraries as a solution to the C++ binary incompatibility problem. + +From a user experience perspective, the user expresses interest in exporting a particular library (e.g. `vcpkg export cpprestsdk`). `vcpkg export` should then make sure that the output contains `cpprestsdk` along with all dependencies it was actually built against. + +## 4. Proposed User experience + +### i. User knows what libraries he needs and wants to export them to an archive format (zip) +Developer Bob needs gtest and cpprestsdk and has been manually building them and their dependencies, then using the binaries in his project via applocal deployment. Bob has been experimenting with `vcpkg` and wants to use `vcpkg` for the building part only. + +Bob tries to export the libraries: +```no-highlight +> vcpkg export gtest cpprestsdk --zip +The following packages are already built and will be exported: + * boost:x86-windows + * bzip2:x86-windows + cpprestsdk:x86-windows + * openssl:x86-windows + * websocketpp:x86-windows + * zlib:x86-windows +The following packages need to be built: + gtest:x86-windows +Additional packages (*) need to be exported to complete this operation. +There are packages that have not been built. +To build them, run: + vcpkg install gtest:x86-windows +``` + +Bob proceeds to install the missing libraries: +```no-highlight +> vcpkg install gtest:x86-windows +// -- omitted build information -- // +Package gtest:x86-windows is installed. +``` + +Bob then returns to export the libraries: +```no-highlight +> vcpkg export gtest cpprestsdk --zip +The following packages are already built and will be exported: + * boost:x86-windows + * bzip2:x86-windows + cpprestsdk:x86-windows + gtest:x86-windows + * openssl:x86-windows + * websocketpp:x86-windows + * zlib:x86-windows +Additional packages (*) need to be exported to complete this operation. +Exporting package zlib:x86-windows... +Exporting package zlib:x86-windows... done +Exporting package openssl:x86-windows... +Exporting package openssl:x86-windows... done +Exporting package bzip2:x86-windows... +Exporting package bzip2:x86-windows... done +Exporting package boost:x86-windows... +Exporting package boost:x86-windows... done +Exporting package websocketpp:x86-windows... +Exporting package websocketpp:x86-windows... done +Exporting package cpprestsdk:x86-windows... +Exporting package cpprestsdk:x86-windows... done +Exporting package gtest:x86-windows... +Exporting package gtest:x86-windows... done +Creating zip archive... +Creating zip archive... done +zip archive exported at: C:/vcpkg/vcpkg-export-20170428-155351.zip +``` + +Bob takes the zip file and extracts the contents next to his other dependencies. Bob can now proceed with building his own project as before. + +### ii. User has a vcpkg root that works and wants to share it +Developer Alice has been using `vcpkg` and has a Visual Studio project that consumes libraries from it (via `vcpkg integrate`). The project is built for both 32-bit and 64-bit architectures. Alice wants to quickly share the dependencies with Bob so he can test the project. +```no-highlight +> vcpkg export gtest zlib gtest:x64-windows zlib:x64-windows --nuget +The following packages are already built and will be exported: + gtest:x86-windows + gtest:x64-windows + zlib:x86-windows + zlib:x64-windows +Exporting package zlib:x86-windows... +Exporting package zlib:x86-windows... done +Exporting package zlib:x64-windows... +Exporting package zlib:x64-windows... done +Exporting package gtest:x86-windows... +Exporting package gtest:x86-windows... done +Exporting package gtest:x64-windows... +Exporting package gtest:x64-windows... done +Creating nuget package... +Creating nuget package... done +Nuget package exported at: C:/vcpkg/scripts/buildsystems/tmp/vcpkg-export-20170428-164312.nupkg +``` + +Alice gives to Bob: a) The link to her project and b) The NuGet package "vcpkg-export-20170428-164312.nupkg". Bob clones the project and then installs the NuGet package. Bob is now ready to build Alice's project. + +### iii. User has a vcpkg root that works and wants to share it #2 +Developer Alice has been using `vcpkg` and has a CMake project that consumes libraries from it (via CMake toolchain file). Alice wants to quickly share the dependencies with Bob so he can test the project. +```no-highlight +> vcpkg export cpprestsdk zlib --zip +The following packages are already built and will be exported: + * boost:x86-windows + * bzip2:x86-windows + cpprestsdk:x86-windows + * openssl:x86-windows + * websocketpp:x86-windows + zlib:x86-windows +Additional packages (*) need to be exported to complete this operation. +Exporting package zlib:x86-windows... +Exporting package zlib:x86-windows... done +Exporting package openssl:x86-windows... +Exporting package openssl:x86-windows... done +Exporting package bzip2:x86-windows... +Exporting package bzip2:x86-windows... done +Exporting package boost:x86-windows... +Exporting package boost:x86-windows... done +Exporting package websocketpp:x86-windows... +Exporting package websocketpp:x86-windows... done +Exporting package cpprestsdk:x86-windows... +Exporting package cpprestsdk:x86-windows... done +Creating zip archive... +Creating zip archive... done +zip archive exported at: C:/vcpkg/vcpkg-export-20170428-155351.zip +``` + +Alice gives to Bob: a) The links to her project and b) The zip file "vcpkg-export-20170428-155351.zip". Bob clones the project, extracts the zip file and uses the provided (in the zip) CMake toolchain file to make the dependencies available to CMake. Bob is now ready to build Alice's project. + +## 5. Technical model + +- Each exported library, must be accompanied with all of its dependencies, even if they are not explicitly specified in the `vcpkg export` command. +- When exporting a library, a dependency graph will be built, similarly to install, to figure out which packages needs to be exported. +- It is allowed to have packages from different triplets, so users can include 32/64-bit and dynamic/static binaries in the same export. +- The exported archives also include the files needed to integrate with MSBuild and/or CMake. \ No newline at end of file diff --git a/docs/users/integration.md b/docs/users/integration.md new file mode 100644 index 000000000..38332f1aa --- /dev/null +++ b/docs/users/integration.md @@ -0,0 +1,85 @@ +## Buildsystem Integration + +Vcpkg offers many ways to integrate into your build so you can do what's right for your project. There are two main categories of integration: + +- [`integrate` command](#integrate) +- [`export` command](#export) + + +### Integrate Command + +These link your project(s) to a specific copy of Vcpkg on your machine so any updates or new package installations will be instantly available for the next build of your project. + +#### User-wide for MSBuild (Recommended for Open Source MSBuild projects) +```no-highlight +vcpkg integrate install +``` +This will implicitly add Include Directories, Link Directories, and Link Libraries for all packages installed with Vcpkg to all VS2015 and VS2017 MSBuild projects. We also add a post-build action for executable projects that will analyze and copy any DLLs you need to the output folder, enabling a seamless F5 experience. + +For the vast majority of libraries, this is all you need to do -- just File -> New Project and write code! However, some libraries perform conflicting behaviors such as redefining `main()`. Since you need to choose per-project which of these conflicting options you want, you will need to add those libraries to your linker inputs manually. + +Here are some examples, though this is not an exhaustive list: +- Gtest provides `gtest`, `gmock`, `gtest_main`, and `gmock_main` +- SDL2 provides `SDL2main` +- SFML provides `sfml-main` +- Boost.Test provides `boost_test_exec_monitor` + +To get a full list for all your installed packages, run `vcpkg owns manual-link`. + +#### CMake toolchain file (Recommended for Open Source CMake projects) +```no-highlight +cmake ../my/project -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake +``` +Projects configured with the Vcpkg toolchain file will have the appropriate Vcpkg folders added to the cmake search paths. This makes all libraries available to be found through `find_package()`, `find_path()`, and `find_library()`. + +See [Example: Using Sqlite](../examples/using-sqlite.md) for a fully worked example using our CMake toolchain. + +Note that we do not automatically add ourselves to your compiler include paths. To use a header-only library, simply use `find_path()`, which will correctly work on all platforms: +```cmake +# To find and use catch +find_path(CATCH_INCLUDE_DIR catch.hpp) +include_directories(${CATCH_INCLUDE_DIR}) +``` + +#### Linking NuGet file + +We also provide individual VS project integration through a NuGet package. This will modify the project file, so we do not recommend this approach for open source projects. +```no-highlight +PS D:\src\vcpkg> .\vcpkg integrate project +Created nupkg: D:\src\vcpkg\scripts\buildsystems\vcpkg.D.src.vcpkg.1.0.0.nupkg + +With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: + Install-Package vcpkg.D.src.vcpkg -Source "D:/src/vcpkg/scripts/buildsystems" +``` +*Note: The generated NuGet package does not contain the actual libraries. It instead acts like a shortcut (or symlink) to the vcpkg install and will "automatically" update with any changes (install/remove) to the libraries. You do not need to regenerate or update the NuGet package.* + +#### Manual compiler settings + +Libraries are installed into the `installed\` subfolder, partitioned by architecture (e.g. x86-windows): +* The header files are installed to `installed\x86-windows\include` +* Release `.lib` files are installed to `installed\x86-windows\lib` or `installed\x86-windows\lib\manual-link` +* Release `.dll` files are installed to `installed\x86-windows\bin` +* Debug `.lib` files are installed to `installed\x86-windows\debug\lib` or `installed\x86-windows\debug\lib\manual-link` +* Debug `.dll` files are installed to `installed\x86-windows\debug\bin` + +See your build system specific documentation for how to use prebuilt binaries. + +Generally, to run any produced executables you will also need to either copy the needed DLL files to the same folder as your executable or *prepend* the correct `bin\` directory to your path. + + +### Export Command +This command creates a shrinkwrapped archive containing a specific set of libraries (and their dependencies) that can be quickly and reliably shared with build servers or other users in your organization. + +- `--nuget`: NuGet package (Recommended for MSBuild projects) +- `--zip`: Zip archive +- `--7zip`: 7Zip archive (Recommended for CMake projects) +- `--raw`: Raw, uncompressed folder + +Each of these have the same layout, which mimics the layout of a full vcpkg: + +- `installed\` contains the installed package files +- `scripts\buildsystems\vcpkg.cmake` is a toolchain file suitable for use with CMake + +Additionally, NuGet packages will contain a `build\native\vcpkg.targets` that integrates with MSBuild projects. + +Please also see our [blog post](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/) for additional examples. \ No newline at end of file diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index ee526529b..b63700877 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -1,3 +1,48 @@ +## # vcpkg_acquire_msys +## +## Download and prepare an MSYS2 instance. +## +## ## Usage +## ```cmake +## vcpkg_acquire_msys() +## ``` +## +## ## Parameters +## ### MSYS_ROOT_VAR +## An out-variable that will be set to the path to MSYS2. +## +## ## Notes +## A call to `vcpkg_acquire_msys` will usually be followed by a call to `bash.exe`: +## ```cmake +## vcpkg_acquire_msys(MSYS_ROOT) +## set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) +## +## vcpkg_execute_required_process( +## COMMAND ${BASH} --noprofile --norc "${CMAKE_CURRENT_LIST_DIR}\\build.sh" +## WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel +## LOGNAME build-${TARGET_TRIPLET}-rel +## ) +## ``` +## To ensure a package is available: +## ```cmake +## vcpkg_acquire_msys(MSYS_ROOT) +## set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) +## +## message(STATUS "Installing MSYS Packages") +## vcpkg_execute_required_process( +## COMMAND +## ${BASH} --noprofile --norc -c +## "pacman -Sy --noconfirm --needed make" +## WORKING_DIRECTORY ${MSYS_ROOT} +## LOGNAME pacman-${TARGET_TRIPLET}) +## ``` +## +## ## Examples +## +## * [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) +## * [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake) +## * [libvpx](https://github.com/Microsoft/vcpkg/blob/master/ports/libvpx/portfile.cmake) + function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) set(TOOLPATH ${DOWNLOADS}/tools/msys2) diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index 1ef138a1e..ac6e5cc93 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -1,23 +1,35 @@ -#.rst: -# .. command:: vcpkg_apply_patches -# -# Apply a set of patches to a source tree. -# -# :: -# vcpkg_apply_patches(SOURCE_PATH -# PATCHES patch1 [patch ...] -# ) -# -# ``SOURCE_PATH`` -# The source path in which apply the patches. -# ``PATCHES`` -# A list of patches that are applied to the source tree -# ``QUIET`` -# If this option is passed, the warning message when applyng -# a patch fails is not printed. This is convenient for patches -# that are known to fail even on a clean source tree, and for -# which the standard warning message would be confusing for the user. -# +## # vcpkg_apply_patches +## +## Apply a set of patches to a source tree. +## +## ## Usage +## ```cmake +## vcpkg_apply_patches( +## SOURCE_PATH <${SOURCE_PATH}> +## [QUIET] +## PATCHES ... +## ) +## ``` +## +## ## Parameters +## ### SOURCE_PATH +## The source path in which apply the patches. By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. +## +## ### PATCHES +## A list of patches that are applied to the source tree. +## +## Generally, these take the form of `${CMAKE_CURRENT_LIST_DIR}/some.patch` to select patches in the `port\\` directory. +## +## ### QUIET +## Disables the warning message upon failure. +## +## This should only be used for edge cases, such as patches that are known to fail even on a clean source tree. +## +## ## Examples +## +## * [boost](https://github.com/Microsoft/vcpkg/blob/master/ports/boost/portfile.cmake) +## * [freetype](https://github.com/Microsoft/vcpkg/blob/master/ports/freetype/portfile.cmake) +## * [libpng](https://github.com/Microsoft/vcpkg/blob/master/ports/libpng/portfile.cmake) function(vcpkg_apply_patches) cmake_parse_arguments(_ap "QUIET" "SOURCE_PATH" "PATCHES" ${ARGN}) diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index 6fe3f5aa0..1e3c85ba2 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -1,46 +1,59 @@ -#.rst: -# .. command:: vcpkg_build_msbuild -# -# Build a msbuild-based project. -# -# :: -# vcpkg_build_msbuild(PROJECT_PATH -# [RELEASE_CONFIGURATION ] # (default = "Release") -# [DEBUG_CONFIGURATION ] @ (default = "Debug") -# [TARGET_PLATFORM_VERSION ] -# [PLATFORM ] # (default = "${TRIPLET_SYSTEM_ARCH}") -# [PLATFORM_TOOLSET ] # (default = "${VCPKG_PLATFORM_TOOLSET}") -# [OPTIONS arg1 [arg2 ...]] -# [OPTIONS_RELEASE arg1 [arg2 ...]] -# [OPTIONS_DEBUG arg1 [arg2 ...]] -# ) -# -# ``PROJECT_PATH`` -# The path to the *.sln msbuild project file. -# ``RELEASE_CONFIGURATION`` -# The configuration (``/p:Configuration`` msbuild parameter) -# used for Release builds. -# ``DEBUG_CONFIGURATION`` -# The configuration (``/p:Configuration`` msbuild parameter) -# used for Debug builds. -# ``TARGET_PLATFORM_VERSION`` -# The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter) -# ``TARGET`` -# The MSBuild target to build. (``/t:``) -# ``PLATFORM`` -# The platform (``/p:Platform`` msbuild parameter) -# used for the build. -# ``PLATFORM_TOOLSET`` -# The platform toolset (``/p:PlatformToolset`` msbuild parameter) -# used for the build. -# ``OPTIONS`` -# The options passed to msbuild for all builds. -# ``OPTIONS_RELEASE`` -# The options passed to msbuild for Release builds. -# ``OPTIONS_DEBUG`` -# The options passed to msbuild for Debug builds. -# - +## # vcpkg_build_msbuild +## +## Build an msbuild-based project. +## +## ## Usage +## ```cmake +## vcpkg_build_msbuild( +## PROJECT_PATH <${SOURCE_PATH}/port.sln> +## [RELEASE_CONFIGURATION ] +## [DEBUG_CONFIGURATION ] +## [TARGET ] +## [TARGET_PLATFORM_VERSION <10.0.15063.0>] +## [PLATFORM <${TRIPLET_SYSTEM_ARCH}>] +## [PLATFORM_TOOLSET <${VCPKG_PLATFORM_TOOLSET}>] +## [OPTIONS ...] +## [OPTIONS_RELEASE ...] +## [OPTIONS_DEBUG ...] +## ) +## ``` +## +## ## Parameters +## ### PROJECT_PATH +## The path to the solution (`.sln`) or project (`.vcxproj`) file. +## +## ### RELEASE_CONFIGURATION +## The configuration (``/p:Configuration`` msbuild parameter) used for Release builds. +## +## ### DEBUG_CONFIGURATION +## The configuration (``/p:Configuration`` msbuild parameter) +## used for Debug builds. +## +## ### TARGET_PLATFORM_VERSION +## The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter) +## +## ### TARGET +## The MSBuild target to build. (``/t:``) +## +## ### PLATFORM +## The platform (``/p:Platform`` msbuild parameter) used for the build. +## +## ### PLATFORM_TOOLSET +## The platform toolset (``/p:PlatformToolset`` msbuild parameter) used for the build. +## +## ### OPTIONS +## Additional options passed to msbuild for all builds. +## +## ### OPTIONS_RELEASE +## Additional options passed to msbuild for Release builds. These are in addition to `OPTIONS`. +## +## ### OPTIONS_DEBUG +## Additional options passed to msbuild for Debug builds. These are in addition to `OPTIONS`. +## +## ## Examples +## +## * [libuv](https://github.com/Microsoft/vcpkg/blob/master/ports/libuv/portfile.cmake) +## * [zeromq](https://github.com/Microsoft/vcpkg/blob/master/ports/zeromq/portfile.cmake) function(vcpkg_build_msbuild) cmake_parse_arguments(_csc "" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" ${ARGN}) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index cd979be1b..7d43336de 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -1,3 +1,49 @@ +## # vcpkg_configure_cmake +## +## Configure CMake for Debug and Release builds of a project. +## +## ## Usage +## ```cmake +## vcpkg_configure_cmake( +## SOURCE_PATH <${SOURCE_PATH}> +## [PREFER_NINJA] +## [GENERATOR <"NMake Makefiles">] +## [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] +## [OPTIONS_RELEASE <-DOPTIMIZE=1>...] +## [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +## ) +## ``` +## +## ## Parameters +## ### 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. +## +## ### 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". +## +## ### OPTIONS +## Additional options passed to CMake during the configuration. +## +## ### OPTIONS_RELEASE +## Additional options passed to CMake during the Release configuration. These are in addition to `OPTIONS`. +## +## ### OPTIONS_DEBUG +## Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`. +## +## ## Notes +## This command supplies many common arguments to CMake. To see the full list, examine the source. +## +## ## Examples +## +## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +## * [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" "SOURCE_PATH;GENERATOR" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) diff --git a/scripts/cmake/vcpkg_copy_pdbs.cmake b/scripts/cmake/vcpkg_copy_pdbs.cmake index 61ad97728..ca55eb015 100644 --- a/scripts/cmake/vcpkg_copy_pdbs.cmake +++ b/scripts/cmake/vcpkg_copy_pdbs.cmake @@ -1,3 +1,19 @@ +## # vcpkg_copy_pdbs +## +## Automatically locate pdbs in the build tree and copy them adjacent to all DLLs. +## +## ## Usage +## ```cmake +## vcpkg_copy_pdbs() +## ``` +## +## ## Notes +## This command should always be called by portfiles after they have finished rearranging the binary output. +## +## ## Examples +## +## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) function(vcpkg_copy_pdbs) function(merge_filelist OUTVAR INVAR) diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake index f8af19230..165f19ed1 100644 --- a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake +++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake @@ -1,5 +1,21 @@ -# Copy dlls for all tools in TOOL_DIR - +## # vcpkg_copy_tool_dependencies +## +## Copy all DLL dependencies of built tools into the tool folder. +## +## ## Usage +## ```cmake +## vcpkg_copy_tool_dependencies(<${CURRENT_PACKAGES_DIR}/tools/${PORT}>) +## ``` +## ## Parameters +## The path to the directory containing the tools. +## +## ## Notes +## This command should always be called by portfiles after they have finished rearranging the binary output, if they have any tools. +## +## ## Examples +## +## * [glib](https://github.com/Microsoft/vcpkg/blob/master/ports/glib/portfile.cmake) +## * [fltk](https://github.com/Microsoft/vcpkg/blob/master/ports/fltk/portfile.cmake) function(vcpkg_copy_tool_dependencies TOOL_DIR) macro(search_for_dependencies PATH_TO_SEARCH) file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index d086f9d23..006570195 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -1,4 +1,39 @@ -# Usage: vcpkg_download_distfile( URLS FILENAME SHA512 <5981de...>) +## # vcpkg_download_distfile +## +## Download and cache a file needed for this port. +## +## ## Usage +## ```cmake +## vcpkg_download_distfile( +## +## URLS ... +## FILENAME +## SHA512 <5981de...> +## ) +## ``` +## ## Parameters +## ### OUT_VARIABLE +## This variable will be set to the full path to the downloaded file. This can then immediately be passed in to [`vcpkg_extract_source_archive`](vcpkg_extract_source_archive.md) for sources. +## +## ### URLS +## A list of URLs to be consulted. They will be tried in order until one of the downloaded files successfully matches the SHA512 given. +## +## ### FILENAME +## The local name for the file. Files are shared between ports, so the file may need to be renamed to make it clearly attributed to this port and avoid conflicts. +## +## ### SHA512 +## The expected hash for the file. +## +## If this doesn't match the downloaded version, the build will be terminated with a message describing the mismatch. +## +## ## Notes +## The command [`vcpkg_from_github`](vcpkg_from_github.md) should be used instead of this for downloading the main archive for GitHub projects. +## +## ## Examples +## +## * [boost](https://github.com/Microsoft/vcpkg/blob/master/ports/boost/portfile.cmake) +## * [fontconfig](https://github.com/Microsoft/vcpkg/blob/master/ports/fontconfig/portfile.cmake) +## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) function(vcpkg_download_distfile VAR) set(oneValueArgs FILENAME SHA512) set(multipleValuesArgs URLS) diff --git a/scripts/cmake/vcpkg_execute_required_process.cmake b/scripts/cmake/vcpkg_execute_required_process.cmake index 7feff08b2..173bca6e9 100644 --- a/scripts/cmake/vcpkg_execute_required_process.cmake +++ b/scripts/cmake/vcpkg_execute_required_process.cmake @@ -1,4 +1,33 @@ -# Usage: vcpkg_execute_required_process(COMMAND [...] WORKING_DIRECTORY LOGNAME ) +## # vcpkg_execute_required_process +## +## Execute a process with logging and fail the build if the command fails. +## +## ## Usage +## ```cmake +## vcpkg_execute_required_process( +## COMMAND <${PERL}> [...] +## WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg> +## LOGNAME +## ) +## ``` +## ## Parameters +## ### COMMAND +## The command to be executed, along with its arguments. +## +## ### 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 +## +## * [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) +## * [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) function(vcpkg_execute_required_process) cmake_parse_arguments(vcpkg_execute_required_process "" "WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN}) #debug_message("vcpkg_execute_required_process(${vcpkg_execute_required_process_COMMAND})") diff --git a/scripts/cmake/vcpkg_extract_source_archive.cmake b/scripts/cmake/vcpkg_extract_source_archive.cmake index 71654b452..5c16616c6 100644 --- a/scripts/cmake/vcpkg_extract_source_archive.cmake +++ b/scripts/cmake/vcpkg_extract_source_archive.cmake @@ -1,3 +1,32 @@ +## # vcpkg_extract_source_archive +## +## Extract an archive into the source directory. +## +## ## Usage +## ```cmake +## vcpkg_extract_source_archive( +## <${ARCHIVE}> [<${TARGET_DIRECTORY}>] +## ) +## ``` +## ## Parameters +## ### ARCHIVE +## The full path to the archive to be extracted. +## +## This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md). +## +## ### TARGET_DIRECTORY +## If specified, the archive will be extracted into the target directory instead of `${CURRENT_BUILDTREES_DIR}\src\`. +## +## This can be used to mimic git submodules, by extracting into a subdirectory of another archive. +## +## ## Notes +## This command will also create a tracking file named .extracted in the TARGET_DIRECTORY. This file, when present, will suppress the extraction of the archive. +## +## ## Examples +## +## * [libraw](https://github.com/Microsoft/vcpkg/blob/master/ports/libraw/portfile.cmake) +## * [protobuf](https://github.com/Microsoft/vcpkg/blob/master/ports/protobuf/portfile.cmake) +## * [msgpack](https://github.com/Microsoft/vcpkg/blob/master/ports/msgpack/portfile.cmake) include(vcpkg_execute_required_process) function(vcpkg_extract_source_archive_ex) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 127982842..e7e33c692 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -1,3 +1,37 @@ +## # vcpkg_find_acquire_program +## +## Download or find a well-known tool. +## +## ## Usage +## ```cmake +## vcpkg_find_acquire_program() +## ``` +## ## Parameters +## ### VAR +## This variable specifies both the program to be acquired as well as the out parameter that will be set to the path of the program executable. +## +## ## Notes +## The current list of programs includes: +## +## - 7Z +## - BISON +## - FLEX +## - PERL +## - PYTHON2 +## - PYTHON3 +## - JOM +## - MESON +## - NASM +## - NINJA +## - YASM +## +## Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md). +## +## ## Examples +## +## * [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) +## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) +## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) function(vcpkg_find_acquire_program VAR) if(${VAR} AND NOT ${VAR} MATCHES "-NOTFOUND") return() diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index f0f8dba8b..0ce485954 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -1,14 +1,52 @@ -# Usage: -# vcpkg_from_github( -# OUT_SOURCE_PATH -# REPO -# REF -# SHA512 -# HEAD_REF -# ) -# -# Notes: -# This will export VCPKG_HEAD_VERSION variable during head builds. +## # vcpkg_from_github +## +## Download and extract a project from GitHub. Enables support for `install --head`. +## +## ## Usage: +## ```cmake +## vcpkg_from_github( +## OUT_SOURCE_PATH +## REPO +## [REF ] +## [SHA512 <45d0d7f8cc350...>] +## [HEAD_REF ] +## ) +## ``` +## +## ## Parameters: +## ### OUT_SOURCE_PATH +## Specifies the out-variable that will contain the extracted location. +## +## This should be set to `SOURCE_PATH` by convention. +## +## ### REPO +## The organization or user and repository on GitHub. +## +## ### REF +## A stable git commit-ish (ideally a tag) that will not change contents. +## +## If `REF` is specified, `SHA512` must also be specified. +## +## ### SHA512 +## The SHA512 hash that should match the archive (https://github.com/${REPO}/archive/${REF}.tar.gz). +## +## This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. +## +## ### HEAD_REF +## The unstable git commit-ish (ideally a branch) to pull for `--head` builds. +## +## For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. +## +## ## Notes: +## At least one of `REF` and `HEAD_REF` must be specified. +## +## This exports the `VCPKG_HEAD_VERSION` variable during head builds. +## +## ## Examples: +## +## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +## * [ms-gsl](https://github.com/Microsoft/vcpkg/blob/master/ports/ms-gsl/portfile.cmake) +## * [beast](https://github.com/Microsoft/vcpkg/blob/master/ports/beast/portfile.cmake) function(vcpkg_from_github) set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 HEAD_REF) set(multipleValuesArgs) diff --git a/scripts/cmake/vcpkg_install_cmake.cmake b/scripts/cmake/vcpkg_install_cmake.cmake index 0ebff6961..f778007ef 100644 --- a/scripts/cmake/vcpkg_install_cmake.cmake +++ b/scripts/cmake/vcpkg_install_cmake.cmake @@ -1,3 +1,25 @@ +## # vcpkg_install_cmake +## +## Build and install a cmake project. +## +## ## Usage: +## ```cmake +## vcpkg_install_cmake([MSVC_64_TOOLSET]) +## ``` +## +## ## Parameters: +## ### MSVC_64_TOOLSET +## This adds the `/p:PreferredToolArchitecture=x64` switch if the underlying buildsystem is MSBuild. Some large projects can run out of memory when linking if they use the 32-bit hosted tools. +## +## ## Notes: +## This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). +## +## ## Examples: +## +## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +## * [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_install_cmake) cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN}) -- cgit v1.2.3 From 71726ac000d3dce275289e0807f6bee3e50fe85c Mon Sep 17 00:00:00 2001 From: Bagong Date: Mon, 29 May 2017 09:05:52 +0200 Subject: Correct path bison/flex add ruby 2.4.1 and gperf 3.0.1 --- scripts/cmake/vcpkg_find_acquire_program.cmake | 34 +++++++++++++++++--------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index e7e33c692..f6814c37f 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -90,6 +90,12 @@ function(vcpkg_find_acquire_program VAR) " https://www.python.org/ftp/python/2.7.13/python-2.7.13.msi\n" ) 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) elseif(VAR MATCHES "JOM") set(PROGNAME jom) set(SUBDIR "jom-1.1.2") @@ -118,18 +124,24 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://github.com/mesonbuild/meson/archive/0.40.1.zip") set(ARCHIVE "meson-0.40.1.zip") set(HASH 4c1d07f32d527859f762c34de74d31d569573fc833335ab9652ed38d1f9e64b49869e826527c28a6a07cb8e594fd5c647b34aa95e626236a2707f75df0a2d435) - elseif(VAR MATCHES "FLEX") - set(PROGNAME win_flex) - set(PATHS ${DOWNLOADS}/tools/winflexbison) - set(URL "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-2.5.9.zip/download") - set(ARCHIVE "win_flex_bison-2.5.9.zip") - set(HASH 9580f0e46893670a011645947c1becda69909a41a38bb4197fe33bd1ab7719da6b80e1be316f269e1a4759286870d49a9b07ef83afc4bac33232bd348e0bc814) + elseif(VAR MATCHES "FLEX") + set(PROGNAME win_flex) + set(PATHS ${DOWNLOADS}/tools/win_flex) + set(URL "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-2.5.9.zip/download") + set(ARCHIVE "win_flex_bison-2.5.9.zip") + set(HASH 9580f0e46893670a011645947c1becda69909a41a38bb4197fe33bd1ab7719da6b80e1be316f269e1a4759286870d49a9b07ef83afc4bac33232bd348e0bc814) elseif(VAR MATCHES "BISON") - set(PROGNAME win_bison) - set(PATHS ${DOWNLOADS}/tools/winflexbison) - set(URL "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-2.5.9.zip/download") - set(ARCHIVE "win_flex_bison-2.5.9.zip") - set(HASH 9580f0e46893670a011645947c1becda69909a41a38bb4197fe33bd1ab7719da6b80e1be316f269e1a4759286870d49a9b07ef83afc4bac33232bd348e0bc814) + set(PROGNAME win_bison) + set(PATHS ${DOWNLOADS}/tools/win_bison) + set(URL "https://sourceforge.net/projects/winflexbison/files/win_flex_bison-2.5.9.zip/download") + set(ARCHIVE "win_flex_bison-2.5.9.zip") + set(HASH 9580f0e46893670a011645947c1becda69909a41a38bb4197fe33bd1ab7719da6b80e1be316f269e1a4759286870d49a9b07ef83afc4bac33232bd348e0bc814) + elseif(VAR MATCHES "GPERF") + set(PROGNAME gperf) + set(PATHS ${DOWNLOADS}/tools/gperf/bin) + set(URL "https://sourceforge.net/projects/gnuwin32/files/gperf/3.0.1/gperf-3.0.1-bin.zip/download") + set(ARCHIVE "gperf-3.0.1-bin.zip") + set(HASH 3f2d3418304390ecd729b85f65240a9e4d204b218345f82ea466ca3d7467789f43d0d2129fcffc18eaad3513f49963e79775b10cc223979540fa2e502fe7d4d9) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() -- cgit v1.2.3 From 6161049f3c895282e7b4237624f26e216f4e7314 Mon Sep 17 00:00:00 2001 From: Hennadii Zabula Date: Mon, 29 May 2017 09:55:52 +0300 Subject: Fix gettext arm --- ports/gettext/config.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/gettext/config.h b/ports/gettext/config.h index cde9f23b4..81811e937 100644 --- a/ports/gettext/config.h +++ b/ports/gettext/config.h @@ -1,6 +1,9 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Disable function deprecated warnings */ +#define _CRT_NONSTDC_NO_WARNINGS + /* Define to the number of bits in type 'ptrdiff_t'. */ #define BITSIZEOF_PTRDIFF_T sizeof(ptrdiff_t) -- cgit v1.2.3 From 867a1665f283aa42125953247713cc2e6a274842 Mon Sep 17 00:00:00 2001 From: Hennadii Zabula Date: Mon, 29 May 2017 11:42:27 +0300 Subject: Add uwp fix patch --- ports/gettext/0002-Fix-uwp-build.patch | 77 ++++++++++++++++++++++++++++++++++ ports/gettext/portfile.cmake | 1 + 2 files changed, 78 insertions(+) create mode 100644 ports/gettext/0002-Fix-uwp-build.patch diff --git a/ports/gettext/0002-Fix-uwp-build.patch b/ports/gettext/0002-Fix-uwp-build.patch new file mode 100644 index 000000000..4e21ef1ed --- /dev/null +++ b/ports/gettext/0002-Fix-uwp-build.patch @@ -0,0 +1,77 @@ +diff --git "a/gettext-0.19/gettext-runtime/intl/langprefs.c" "b/gettext-0.19/gettext-runtime/intl/langprefs.c" +index aeb1c4e9..2ac531be 100644 +--- "a/gettext-0.19/gettext-runtime/intl/langprefs.c" ++++ "b/gettext-0.19/gettext-runtime/intl/langprefs.c" +@@ -33,7 +33,13 @@ extern void _nl_locale_name_canonicalize (char *name); + #endif + + #if defined _WIN32 || defined __WIN32__ +-# define WIN32_NATIVE ++# if !defined(WINAPI_FAMILY) ++# define WIN32_NATIVE ++# else ++# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++# define WIN32_NATIVE ++# endif ++# endif + #endif + + #ifdef WIN32_NATIVE +diff --git "a/gettext-0.19/gettext-runtime/intl/localcharset.c" "b/gettext-0.19/gettext-runtime/intl/localcharset.c" +index 670b8e6c..035a96bd 100644 +--- "a/gettext-0.19/gettext-runtime/intl/localcharset.c" ++++ "b/gettext-0.19/gettext-runtime/intl/localcharset.c" +@@ -36,6 +36,16 @@ + # define WINDOWS_NATIVE + #endif + ++#if defined _WIN32 || defined __WIN32__ ++# if !defined(WINAPI_FAMILY) ++# define HAVE_ACP ++# else ++# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++# define HAVE_ACP ++# endif ++# endif ++#endif ++ + #if defined __EMX__ + /* Assume EMX program runs on OS/2, even if compiled under DOS. */ + # ifndef OS2 +@@ -361,7 +371,7 @@ STATIC + const char * + locale_charset (void) + { +- const char *codeset; ++ const char *codeset = NULL; + const char *aliases; + + #if !(defined WINDOWS_NATIVE || defined OS2) +@@ -457,7 +467,7 @@ locale_charset (void) + + # endif + +-#elif defined WINDOWS_NATIVE ++#elif defined WINDOWS_NATIVE && defined HAVE_ACP + + static char buf[2 + 10 + 1]; + +diff --git "a/gettext-0.19/gettext-runtime/intl/localename.c" "b/gettext-0.19/gettext-runtime/intl/localename.c" +index 108dd6f1..ace3aa88 100644 +--- "a/gettext-0.19/gettext-runtime/intl/localename.c" ++++ "b/gettext-0.19/gettext-runtime/intl/localename.c" +@@ -54,7 +54,13 @@ + #endif + + #if defined _WIN32 || defined __WIN32__ +-# define WINDOWS_NATIVE ++# if !defined(WINAPI_FAMILY) ++# define WINDOWS_NATIVE ++# else ++# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++# define WINDOWS_NATIVE ++# endif ++# endif + #endif + + #if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index f14f7a707..baf4babf2 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -26,6 +26,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/gettext- vcpkg_apply_patches( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Fix-macro-definitions.patch" + "${CMAKE_CURRENT_LIST_DIR}/0002-Fix-uwp-build.patch" ) vcpkg_configure_cmake( -- cgit v1.2.3 From 866dfad5ba1fbc344b51bfe7904cf38ba4a51816 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Wed, 24 May 2017 02:22:17 +0300 Subject: [openssl] Support using asm code --- ports/openssl/portfile.cmake | 52 +++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 3b13c4660..08cd4e04c 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -6,16 +6,19 @@ endif() include(vcpkg_common_functions) set(OPENSSL_VERSION 1.0.2l) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) + vcpkg_find_acquire_program(PERL) +vcpkg_find_acquire_program(NASM) find_program(NMAKE nmake) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}") +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +set(ENV{PATH} "${PERL_EXE_PATH};${NASM_EXE_PATH};$ENV{PATH}") 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 047d964508ad6025c79caabd8965efd2416dc026a56183d0ef4de7a0a6769ce8e0b4608a3f8393d326f6d03b26a2b067e6e0c750f35b20be190e595e8290c0e3 + SHA512 047d964508ad6025c79caabd8965efd2416dc026a56183d0ef4de7a0a6769ce8e0b4608a3f8393d326f6d03b26a2b067e6e0c750f35b20be190e595e8290c0e3 ) vcpkg_extract_source_archive(${OPENSSL_SOURCE_ARCHIVE}) @@ -29,22 +32,28 @@ vcpkg_apply_patches( set(CONFIGURE_COMMAND ${PERL} Configure enable-static-engine enable-capieng - no-asm no-ssl2 ) if(TARGET_TRIPLET MATCHES "x86-windows") set(OPENSSL_ARCH VC-WIN32) - set(OPENSSL_DO "ms\\do_ms.bat") -elseif(TARGET_TRIPLET MATCHES "x64") + set(OPENSSL_DO "ms\\do_nasm.bat") +elseif(TARGET_TRIPLET MATCHES "x64-windows") set(OPENSSL_ARCH VC-WIN64A) set(OPENSSL_DO "ms\\do_win64a.bat") else() message(FATAL_ERROR "Unsupported target triplet: ${TARGET_TRIPLET}") endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPENSSL_MAKEFILE "ms\\ntdll.mak") +else() + set(OPENSSL_MAKEFILE "ms\\nt.mak") +endif() + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + message(STATUS "Build ${TARGET_TRIPLET}-rel") file(COPY ${MASTER_COPY_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/openssl-${OPENSSL_VERSION}) @@ -60,20 +69,14 @@ vcpkg_execute_required_process( WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel ) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_execute_required_process(COMMAND ${NMAKE} -f ms\\ntdll.mak install - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME build-${TARGET_TRIPLET}-rel) -else() - vcpkg_execute_required_process(COMMAND ${NMAKE} -f ms\\nt.mak install - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME build-${TARGET_TRIPLET}-rel) -endif() - +vcpkg_execute_required_process( + COMMAND ${NMAKE} -f ${OPENSSL_MAKEFILE} install + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME build-${TARGET_TRIPLET}-rel) message(STATUS "Build ${TARGET_TRIPLET}-rel done") + message(STATUS "Build ${TARGET_TRIPLET}-dbg") file(COPY ${MASTER_COPY_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/openssl-${OPENSSL_VERSION}) @@ -89,19 +92,14 @@ vcpkg_execute_required_process( WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg ) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_execute_required_process(COMMAND ${NMAKE} -f ms\\ntdll.mak install - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME build-${TARGET_TRIPLET}-dbg) -else() - vcpkg_execute_required_process(COMMAND ${NMAKE} -f ms\\nt.mak install - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME build-${TARGET_TRIPLET}-dbg) -endif() +vcpkg_execute_required_process( + COMMAND ${NMAKE} -f ${OPENSSL_MAKEFILE} install + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME build-${TARGET_TRIPLET}-dbg) message(STATUS "Build ${TARGET_TRIPLET}-dbg done") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe @@ -118,4 +116,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) endif() -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() -- cgit v1.2.3 From dc43c4271b85a2cc74e0847113af4bbf64140163 Mon Sep 17 00:00:00 2001 From: Bagong Date: Mon, 29 May 2017 20:32:06 +0200 Subject: Add default path of 64-bit python as installed by MSVS2017 --- scripts/cmake/vcpkg_find_acquire_program.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index f6814c37f..03216058c 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -70,7 +70,7 @@ function(vcpkg_find_acquire_program VAR) set(ARCHIVE "python-3.5.3-embed-win32.zip") set(HASH c8cfdc09d052dc27e4380e8e4bf0d32a4c0def7e03896c1fa6cabc26dde78bb74dbb04e3673cc36e3e307d65a1ef284d69174f0cc80008c83bc6178f192ac5cf) elseif(VAR MATCHES "PYTHON2") - find_program(PYTHON2 NAMES python2 python PATHS C:/python27 ENV PYTHON) + find_program(PYTHON2 NAMES python2 python PATHS C:/python27 c:/Python27amd64 ENV PYTHON) if(NOT PYTHON2 MATCHES "NOTFOUND") execute_process( COMMAND ${PYTHON2} --version -- cgit v1.2.3 From 72eb21a5151fc806a0e10c060253f8e3ad08b6a5 Mon Sep 17 00:00:00 2001 From: codicodi Date: Mon, 29 May 2017 21:36:10 +0200 Subject: [boost] forcibly undefine BOOST_ALL_DYN_LINK in static builds --- ports/boost/CONTROL | 2 +- ports/boost/portfile.cmake | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index ec2e77ffa..964665b96 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost -Version: 1.64-4 +Version: 1.64-5 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2 diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 79c2f02da..b8d56ee90 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -221,6 +221,9 @@ file( file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#define BOOST_ALL_NO_LIB\n" ) +file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp + "\n#undef BOOST_ALL_DYN_LINK\n" +) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp -- cgit v1.2.3 From c9c00bde39836b707f0591a5e80b61437dac8cfc Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Mon, 29 May 2017 16:10:19 -0500 Subject: Fixing static builds for HPX - flyby: prefixing downloaded patch files with 'hpx-' --- ports/hpx/portfile.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/hpx/portfile.cmake b/ports/hpx/portfile.cmake index 3c51bb13b..fce8fce61 100644 --- a/ports/hpx/portfile.cmake +++ b/ports/hpx/portfile.cmake @@ -16,24 +16,24 @@ vcpkg_extract_source_archive(${ARCHIVE}) # apply hotfix to enable building with vcpkg vcpkg_download_distfile(DIFF - URLS "http://stellar-group.org/files/build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" - FILENAME "build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" - SHA512 ceceb84b54bf564b7b9258063454084207538a2bd212f7f65503c6638914eb3c093076e4303369639ef9b34812a2c8ed363c08bbdf5a39cc5d49f720a376af75 + URLS "http://stellar-group.org/files/hpx-Build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" + FILENAME "hpx-Build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" + SHA512 86df311a120686139955e1c0fdca55379594be3fa8d46d69ee59d83da351ce3bed487ab946c80f7127aab9699e470e24e545b112f92be9f971f41d95c429d01d ) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) # apply hotfix to fix issues with building 32bit version vcpkg_download_distfile(DIFF - URLS "http://stellar-group.org/files/Fixing-32bit-MSVC-compilation.diff" - FILENAME "Fixing-32bit-MSVC-compilation.diff" + URLS "http://stellar-group.org/files/hpx-Fixing-32bit-MSVC-compilation.diff" + FILENAME "hpx-Fixing-32bit-MSVC-compilation.diff" SHA512 31c904d317b4c24eddd819e4856f8326ff3850a5a196c7648c46a11dbb85f35e972e077957b3c4aec67c8b043816fe1cebc92cfe28ed815f682537dfc3421b8b ) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) # apply hotfix to fix issues when building with UNICODE enabled vcpkg_download_distfile(DIFF - URLS "http://stellar-group.org/files/Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" - FILENAME "Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" + URLS "http://stellar-group.org/files/hpx-Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" + FILENAME "hpx-Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" SHA512 8fcdb36307702d64b9d2b26920374a6c5a29a50d125305dc95926c4cbc91215cb0c72ede83b06d0fc007fe7b2283845e08351bd45f11f3677f0d3db4ac8f9424 ) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) -- cgit v1.2.3 From 506f396a8477520a351b53ce0a860be77aca6349 Mon Sep 17 00:00:00 2001 From: Voskrese Date: Tue, 30 May 2017 17:57:00 +0300 Subject: File does not have expected hash File path: [ E:/tools/vcpkg/downloads/range-v3-fork_base_to_00ed689bac7a9dcd8601dbde382758675516799d.diff ] Expected hash: [ 615a53ebac22df03e865bdcc86580914c4505ec5fc691b6a2f864f7bf63690b99d0da0db2d5b1026e34b0a3f7557f30dfa0cad65643bae0b53c0ec066af9eb8e ] Actual hash: [ 6158cd9ee1f5957294a26dc780c881839e0bae8610688a618cd11d47df34d5e543fa09ac9a3b33d4a65af8eceae0a6a3055621206c291ef75f982e7915daf91a ] Please delete the file and retry if this file should be downloaded again. --- ports/range-v3/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/range-v3/portfile.cmake b/ports/range-v3/portfile.cmake index 639e8fcef..150b52c8a 100644 --- a/ports/range-v3/portfile.cmake +++ b/ports/range-v3/portfile.cmake @@ -9,7 +9,7 @@ vcpkg_download_distfile(ARCHIVE vcpkg_download_distfile(DIFF URLS "https://github.com/Microsoft/Range-V3-VS2015/compare/fork_base...00ed689bac7a9dcd8601dbde382758675516799d.diff" FILENAME "range-v3-fork_base_to_00ed689bac7a9dcd8601dbde382758675516799d.diff" - SHA512 615a53ebac22df03e865bdcc86580914c4505ec5fc691b6a2f864f7bf63690b99d0da0db2d5b1026e34b0a3f7557f30dfa0cad65643bae0b53c0ec066af9eb8e + SHA512 6158cd9ee1f5957294a26dc780c881839e0bae8610688a618cd11d47df34d5e543fa09ac9a3b33d4a65af8eceae0a6a3055621206c291ef75f982e7915daf91a ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From b81c419c601c3c07e4c78b91119f2217481df159 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 30 May 2017 08:18:01 -0700 Subject: created parquet-cpp control --- ports/parquet-cpp/CONTROL | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 ports/parquet-cpp/CONTROL diff --git a/ports/parquet-cpp/CONTROL b/ports/parquet-cpp/CONTROL new file mode 100644 index 000000000..cadfee906 --- /dev/null +++ b/ports/parquet-cpp/CONTROL @@ -0,0 +1,4 @@ +Source: parquet-cpp +Version: apache-parquet-cpp-1.1.0 +Build-Depends: boost, snappy, zlib, brotli, arrow, thrift +Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. -- cgit v1.2.3 From eb3b2accbcef7eb7f322bc18d46b0abfa24da0a9 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Tue, 30 May 2017 12:24:21 -0700 Subject: Add support for compiler flags --- scripts/cmake/vcpkg_configure_cmake.cmake | 45 ++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 7d43336de..cbbacae3f 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -109,11 +109,29 @@ function(vcpkg_configure_cmake) list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=OFF) 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)) + message(STATUS "Variables for VCPKG_CXX_FLAGS_DEBUG and VCPKG_C_FLAGS_DEBUG are set correctly") + 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)) + message(STATUS "Variables for VCPKG_CXX_FLAGS_RELEASE and VCPKG_C_FLAGS_RELEASE are set correctly") + 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)) + message(STATUS "Variables for VCPKG_CXX_FLAGS and VCPKG_C_FLAGS are set correctly") + else() + message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS and VCPKG_C_FLAGS") + endif() list(APPEND _csc_OPTIONS "-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}" - "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP" - "-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /MP" + "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}" + "-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" @@ -123,28 +141,31 @@ function(vcpkg_configure_cmake) "-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" ) + if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" + "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" + "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" ) list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi" - "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi" + "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_CXX_FLAGS_RELEASE}" + "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_C_FLAGS_RELEASE}" ) + elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" + "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" + "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" ) list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi" - "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi" + "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_CXX_FLAGS_RELEASE}" + "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_C_FLAGS_RELEASE}" ) endif() + list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF" - "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF" + "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" + "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" ) message(STATUS "Configuring ${TARGET_TRIPLET}-rel") -- cgit v1.2.3 From eac9ab7fabfe68f9b78e6e8f42e1c091855490f6 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Tue, 30 May 2017 18:05:28 -0700 Subject: [range-v3] update version ...and don't bother with the "get upstream and then patch" dance. --- ports/range-v3/CONTROL | 2 +- ports/range-v3/portfile.cmake | 33 ++++++++++++++++++++------------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/ports/range-v3/CONTROL b/ports/range-v3/CONTROL index 942851b42..2bf8b6087 100644 --- a/ports/range-v3/CONTROL +++ b/ports/range-v3/CONTROL @@ -1,3 +1,3 @@ Source: range-v3 -Version: 20150729-vcpkg3 +Version: 20151130-vcpkg4 Description: Range library for C++11/14/17. diff --git a/ports/range-v3/portfile.cmake b/ports/range-v3/portfile.cmake index 150b52c8a..61429548b 100644 --- a/ports/range-v3/portfile.cmake +++ b/ports/range-v3/portfile.cmake @@ -1,19 +1,26 @@ #header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/range-v3-6eb5c831ffe12cd5cb96390dbe917ca1b248772d) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/ericniebler/range-v3/archive/6eb5c831ffe12cd5cb96390dbe917ca1b248772d.zip" - FILENAME "range-v3-6eb5c831ffe12cd5cb96390dbe917ca1b248772d.zip" - SHA512 2605af46c2c049f66dc982b1c4e506a8f115d47cc6c61a80f08921c667e52ad3097c485280ee43711c84b84a1490929e085b89cf9ad4c83b93222315210e92aa -) -vcpkg_download_distfile(DIFF - URLS "https://github.com/Microsoft/Range-V3-VS2015/compare/fork_base...00ed689bac7a9dcd8601dbde382758675516799d.diff" - FILENAME "range-v3-fork_base_to_00ed689bac7a9dcd8601dbde382758675516799d.diff" - SHA512 6158cd9ee1f5957294a26dc780c881839e0bae8610688a618cd11d47df34d5e543fa09ac9a3b33d4a65af8eceae0a6a3055621206c291ef75f982e7915daf91a -) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) +# set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/range-v3-6eb5c831ffe12cd5cb96390dbe917ca1b248772d) +# vcpkg_download_distfile(ARCHIVE +# URLS "https://github.com/ericniebler/range-v3/archive/6eb5c831ffe12cd5cb96390dbe917ca1b248772d.zip" +# FILENAME "range-v3-6eb5c831ffe12cd5cb96390dbe917ca1b248772d.zip" +# SHA512 2605af46c2c049f66dc982b1c4e506a8f115d47cc6c61a80f08921c667e52ad3097c485280ee43711c84b84a1490929e085b89cf9ad4c83b93222315210e92aa +# ) +# vcpkg_download_distfile(DIFF +# URLS "https://github.com/Microsoft/Range-V3-VS2015/compare/fork_base...00ed689bac7a9dcd8601dbde382758675516799d.diff" +# FILENAME "range-v3-fork_base_to_00ed689bac7a9dcd8601dbde382758675516799d.diff" +# SHA512 6158cd9ee1f5957294a26dc780c881839e0bae8610688a618cd11d47df34d5e543fa09ac9a3b33d4a65af8eceae0a6a3055621206c291ef75f982e7915daf91a +# ) +# vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/Range-V3-VS2015 + REF 2695c779d52717b635e97352fed6b75d32eba7a4 + SHA512 a1dad795b15c8491963f75fb58097dd290203406038cb2790c66b7ebd854a42043a92cfa2fed30c125529c3aa8d0cfc05cf1d149c84e96eb1f865857ad87adeb + HEAD_REF master +) file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/range-v3) file(RENAME ${CURRENT_PACKAGES_DIR}/share/range-v3/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/range-v3/copyright) -- cgit v1.2.3 From 93048a383287db0e9042800c495bdac97deddfcc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 30 May 2017 19:23:15 -0700 Subject: [openssl] Bump version to include asm changes --- ports/openssl/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index 6fb520404..aaf7b17ab 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2k-2 +Version: 1.0.2k-3 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. -- cgit v1.2.3 From ed826d84124f52bc8625027ea672a3bd4e5d7d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 31 May 2017 10:42:25 +0200 Subject: Fix GSL port so that CMake can find it - Remove lib prefix from library - Generate separate library for the cblas part --- ports/gsl/CMakeLists.txt | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/ports/gsl/CMakeLists.txt b/ports/gsl/CMakeLists.txt index 704542035..c6121e6cd 100644 --- a/ports/gsl/CMakeLists.txt +++ b/ports/gsl/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.8) -project(libgsl C) +project(gsl C) option(INSTALL_HEADERS "Install public header files" ON) @@ -27,10 +27,15 @@ function(extract_sources SUBFOLDER ALLSOURCES) endfunction(extract_sources) set(SOURCES) +set(CBLAS_SOURCES) extract_from_makefile("SUBDIRS = ([^\n]*)" FOLDERS "./Makefile.am") extract_sources("." SOURCES) foreach(DIR IN LISTS FOLDERS) - extract_sources("${DIR}" SOURCES) + if("${DIR}" STREQUAL "cblas") + extract_sources("${DIR}" CBLAS_SOURCES) + else() + extract_sources("${DIR}" SOURCES) + endif() endforeach() file(READ gsl_types.h GSLTYPES_H) @@ -43,13 +48,19 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gsl_types.h "${GSLTYPES_H}") file(GLOB_RECURSE PUBLIC_HEADERS gsl*.h) list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/gsl_types.h) -add_library(libgsl ${SOURCES}) -set_target_properties(libgsl PROPERTIES DEFINE_SYMBOL DLL_EXPORT WINDOWS_EXPORT_ALL_SYMBOLS ON) +add_library(gslcblas ${CBLAS_SOURCES}) +set_target_properties(gslcblas PROPERTIES DEFINE_SYMBOL DLL_EXPORT WINDOWS_EXPORT_ALL_SYMBOLS ON) + +add_library(gsl ${SOURCES}) +set_target_properties(gsl PROPERTIES DEFINE_SYMBOL DLL_EXPORT WINDOWS_EXPORT_ALL_SYMBOLS ON) +target_link_libraries(gsl PUBLIC gslcblas) + if(INSTALL_HEADERS) - set_target_properties(libgsl PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") + set_target_properties(gsl PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") endif() -target_include_directories(libgsl PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories(gslcblas PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories(gsl PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) # For the build, we need to copy all headers to the gsl directory file(COPY ${PUBLIC_HEADERS} DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/gsl") @@ -58,7 +69,7 @@ if(INSTALL_HEADERS) set(TARGET_INSTALL_OPTIONS PUBLIC_HEADER DESTINATION include/gsl) endif() -install(TARGETS libgsl +install(TARGETS gsl gslcblas RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib -- cgit v1.2.3 From f53871c169f274817d2322bdaf6483b997e545bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 31 May 2017 12:13:48 +0200 Subject: Bump GSL version and don't define DLL_EXPORT for gslcblas --- ports/gsl/CMakeLists.txt | 2 +- ports/gsl/CONTROL | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/gsl/CMakeLists.txt b/ports/gsl/CMakeLists.txt index c6121e6cd..45abb5bd2 100644 --- a/ports/gsl/CMakeLists.txt +++ b/ports/gsl/CMakeLists.txt @@ -49,7 +49,7 @@ file(GLOB_RECURSE PUBLIC_HEADERS gsl*.h) list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/gsl_types.h) add_library(gslcblas ${CBLAS_SOURCES}) -set_target_properties(gslcblas PROPERTIES DEFINE_SYMBOL DLL_EXPORT WINDOWS_EXPORT_ALL_SYMBOLS ON) +set_target_properties(gslcblas PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) add_library(gsl ${SOURCES}) set_target_properties(gsl PROPERTIES DEFINE_SYMBOL DLL_EXPORT WINDOWS_EXPORT_ALL_SYMBOLS ON) diff --git a/ports/gsl/CONTROL b/ports/gsl/CONTROL index 8970dca69..a18b341c9 100644 --- a/ports/gsl/CONTROL +++ b/ports/gsl/CONTROL @@ -1,3 +1,3 @@ Source: gsl -Version: 2.3 +Version: 2.3-1 Description: The GNU Scientific Library is a numerical library for C and C++ programmers -- cgit v1.2.3 From 985a70f4eff16b3ffab30e91ea0b2f59ce3952b5 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 31 May 2017 13:19:04 +0200 Subject: [libuv] update to 1.12.0 --- ports/libuv/CONTROL | 2 +- ports/libuv/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index 275dee9df..a4fb1457e 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.11.0 +Version: 1.12.0 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. \ No newline at end of file diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index a8f4463cd..8c287bf5a 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.11.0 - SHA512 fb0415d62a32cfc658bad6c849263ac236d27e9188fac603467173a5ae34fb3ad3e3bfd333e543ebd98b4fd59e0a58a93275e830c4365c058b62bb0c2c802732 + REF v1.12.0 + SHA512 879359747e8319b6e951157f9406176c53ee24833ab9ea3e6ad2b9cf25368fd8f166fa2074b89bdb75e2a6a77757d91a079c4ef86b92330a8ea11519cd1e3018 HEAD_REF v1.x) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 9970ef441474be816765170081fbcf6b6132709f Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 31 May 2017 17:43:19 +0200 Subject: [fontconfig] update to 2.12.3 --- ports/fontconfig/CMakeLists.txt | 4 +- ports/fontconfig/CONTROL | 2 +- ports/fontconfig/include/config.h | 153 +++++++++++++++++++++++++++++----- ports/fontconfig/include/fcobjshash.h | 108 ++++++++++++------------ ports/fontconfig/include/fcstdint.h | 3 +- ports/fontconfig/portfile.cmake | 19 +++-- 6 files changed, 204 insertions(+), 85 deletions(-) diff --git a/ports/fontconfig/CMakeLists.txt b/ports/fontconfig/CMakeLists.txt index ff1af1955..e32af9cbd 100644 --- a/ports/fontconfig/CMakeLists.txt +++ b/ports/fontconfig/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(fontconfig) +project(fontconfig C) add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) add_definitions(-FI"${FC_INCLUDE_DIR}/config.h") @@ -45,6 +45,8 @@ add_library(fontconfig src/fcxml.c src/ftglue.c) +set_target_properties(fontconfig PROPERTIES DEFINE_SYMBOL "FcPublic=__declspec(dllexport)") + target_include_directories(fontconfig PRIVATE . ${FC_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIR} diff --git a/ports/fontconfig/CONTROL b/ports/fontconfig/CONTROL index ecb371f15..85a72c3fc 100644 --- a/ports/fontconfig/CONTROL +++ b/ports/fontconfig/CONTROL @@ -1,4 +1,4 @@ Source: fontconfig -Version: 2.12.1 +Version: 2.12.3 Description: Library for configuring and customizing font access. Build-Depends: freetype, expat, libiconv diff --git a/ports/fontconfig/include/config.h b/ports/fontconfig/include/config.h index 8f21dda01..0fbdead6e 100644 --- a/ports/fontconfig/include/config.h +++ b/ports/fontconfig/include/config.h @@ -1,9 +1,21 @@ +/* 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 FC_CACHEDIR "./" /* The normal alignment of `double', in bytes. */ #define ALIGNOF_DOUBLE 8 +/* The normal alignment of `void *', in bytes. */ +#if defined(_WIN64) +#define ALIGNOF_VOID_P 8 +#else +#define ALIGNOF_VOID_P 4 +#endif + /* Use libxml2 instead of Expat */ /* #undef ENABLE_LIBXML2 */ @@ -14,7 +26,10 @@ /* #undef FC_ARCHITECTURE */ /* System font directory */ -#define FC_DEFAULT_FONTS "c:/windows/fonts" +#define FC_DEFAULT_FONTS "WINDOWSFONTDIR" + +/* The type of len parameter of the gperf hash/lookup function */ +#define FC_GPERF_SIZE_T size_t /* Define to nothing if C supports flexible array members, and to 1 if it does not. That way, with a declaration like `struct s { int n; double @@ -137,13 +152,6 @@ /* Define to 1 if you have the `readlink' function. */ /* #undef HAVE_READLINK */ -/* Define to 1 if you have the 'scandir' function. */ -/* #undef HAVE_SCANDIR */ - -/* Define to 1 if you have the 'scandir' function with int (* compar)(const - void *, const void *) */ -/* #undef HAVE_SCANDIR_VOID_P */ - /* Define to 1 if you have the header file. */ /* #undef HAVE_SCHED_H */ @@ -160,7 +168,7 @@ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ +#define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 @@ -168,9 +176,6 @@ /* Define to 1 if `d_type' is a member of `struct dirent'. */ /* #undef HAVE_STRUCT_DIRENT_D_TYPE */ -/* Define to 1 if `st_mtim' is a member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_MTIM */ - /* Define to 1 if `f_flags' is a member of `struct statfs'. */ /* #undef HAVE_STRUCT_STATFS_F_FLAGS */ @@ -183,6 +188,9 @@ /* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */ /* #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME */ +/* Define to 1 if `st_mtim' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_MTIM */ + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_SYS_DIR_H */ @@ -190,8 +198,7 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_MOUNT_H */ -/* Define to 1 if you have the header file, and it defines `DIR'. - */ +/* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_SYS_NDIR_H */ /* Define to 1 if you have the header file. */ @@ -200,6 +207,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_STATFS_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_STATVFS_H */ + /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 @@ -210,10 +220,10 @@ /* #undef HAVE_SYS_VFS_H */ /* Define to 1 if `usLowerOpticalPointSize' is a member of `TT_OS2'. */ -/* #undef HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE */ +#define HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE 1 /* Define to 1 if `usUpperOpticalPointSize' is a member of `TT_OS2'. */ -/* #undef HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE */ +#define HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 @@ -233,24 +243,49 @@ /* Define to 1 if you have the `_mktemp_s' function. */ #define HAVE__MKTEMP_S 1 -/* Define to necessary symbol if this constant - uses a non-standard name on +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "fontconfig" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "fontconfig" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "fontconfig 2.12.3" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "fontconfig" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.12.3" + +/* Define to necessary symbol if this constant uses a non-standard name on your system. */ /* #undef PTHREAD_CREATE_JOINABLE */ /* The size of `char', as computed by sizeof. */ -#define SIZEOF_CHAR 1 +/* #undef SIZEOF_CHAR */ /* The size of `int', as computed by sizeof. */ -#define SIZEOF_INT 4 +/* #undef SIZEOF_INT */ /* The size of `long', as computed by sizeof. */ -#define SIZEOF_LONG 4 +/* #undef SIZEOF_LONG */ /* The size of `short', as computed by sizeof. */ -#define SIZEOF_SHORT 2 +/* #undef SIZEOF_SHORT */ /* The size of `void*', as computed by sizeof. */ +/* #undef SIZEOF_VOIDP */ + /* The size of `void *', as computed by sizeof. */ #if defined(_WIN64) #define SIZEOF_VOIDP 8 @@ -264,4 +299,76 @@ #define STDC_HEADERS 1 /* Use iconv. */ -#define USE_ICONV 1 \ No newline at end of file +#define USE_ICONV 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.12.3" + +/* 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 + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#define _FILE_OFFSET_BITS 64 + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +#include "config-fixups.h" diff --git a/ports/fontconfig/include/fcobjshash.h b/ports/fontconfig/include/fcobjshash.h index 1fe860a2f..15829e873 100644 --- a/ports/fontconfig/include/fcobjshash.h +++ b/ports/fontconfig/include/fcobjshash.h @@ -1,5 +1,5 @@ /* ANSI-C code produced by gperf version 3.0.4 */ -/* Command-line: gperf -m 100 src/fcobjshash.gperf */ +/* Command-line: gperf -m 100 fcobjshash.gperf */ /* Computed positions: -k'2-3' */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ @@ -29,9 +29,9 @@ #error "gperf generated tables don't work with this execution character set. Please report a bug to ." #endif -#line 1 "src/fcobjshash.gperf" +#line 1 "fcobjshash.gperf" -#line 13 "src/fcobjshash.gperf" +#line 13 "fcobjshash.gperf" struct FcObjectTypeInfo { int name; int id; @@ -47,7 +47,7 @@ inline #endif #endif static unsigned int -FcObjectTypeHash (register const char *str, register unsigned int len) +FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len) { static const unsigned char asso_values[] = { @@ -191,7 +191,7 @@ __attribute__ ((__gnu_inline__)) #endif #endif const struct FcObjectTypeInfo * -FcObjectTypeLookup (register const char *str, register unsigned int len) +FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len) { enum { @@ -205,106 +205,106 @@ FcObjectTypeLookup (register const char *str, register unsigned int len) static const struct FcObjectTypeInfo wordlist[] = { {-1}, {-1}, {-1}, {-1}, -#line 38 "src/fcobjshash.gperf" +#line 38 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str4,FC_FILE_OBJECT}, -#line 64 "src/fcobjshash.gperf" +#line 64 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str5,FC_COLOR_OBJECT}, {-1}, -#line 31 "src/fcobjshash.gperf" +#line 31 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str7,FC_FOUNDRY_OBJECT}, -#line 22 "src/fcobjshash.gperf" +#line 22 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str8,FC_FULLNAME_OBJECT}, -#line 29 "src/fcobjshash.gperf" +#line 29 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str9,FC_PIXEL_SIZE_OBJECT}, -#line 61 "src/fcobjshash.gperf" +#line 61 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str10,FC_PRGNAME_OBJECT}, {-1}, -#line 23 "src/fcobjshash.gperf" +#line 23 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str12,FC_FULLNAMELANG_OBJECT}, -#line 37 "src/fcobjshash.gperf" +#line 37 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str13,FC_GLOBAL_ADVANCE_OBJECT}, -#line 63 "src/fcobjshash.gperf" +#line 63 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str14,FC_POSTSCRIPT_NAME_OBJECT}, {-1}, -#line 34 "src/fcobjshash.gperf" +#line 34 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str16,FC_HINTING_OBJECT}, -#line 46 "src/fcobjshash.gperf" +#line 46 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str17,FC_MINSPACE_OBJECT}, -#line 33 "src/fcobjshash.gperf" +#line 33 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str18,FC_HINT_STYLE_OBJECT}, -#line 54 "src/fcobjshash.gperf" +#line 54 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str19,FC_FONTFORMAT_OBJECT}, -#line 52 "src/fcobjshash.gperf" +#line 52 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str20,FC_FONTVERSION_OBJECT}, -#line 60 "src/fcobjshash.gperf" +#line 60 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str21,FC_FONT_FEATURES_OBJECT}, -#line 41 "src/fcobjshash.gperf" +#line 41 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str22,FC_OUTLINE_OBJECT}, -#line 36 "src/fcobjshash.gperf" +#line 36 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str23,FC_AUTOHINT_OBJECT}, -#line 43 "src/fcobjshash.gperf" +#line 43 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str24,FC_DPI_OBJECT}, -#line 62 "src/fcobjshash.gperf" +#line 62 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str25,FC_HASH_OBJECT}, -#line 24 "src/fcobjshash.gperf" +#line 24 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str26,FC_SLANT_OBJECT}, -#line 28 "src/fcobjshash.gperf" +#line 28 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str27,FC_ASPECT_OBJECT}, -#line 27 "src/fcobjshash.gperf" +#line 27 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str28,FC_SIZE_OBJECT}, -#line 45 "src/fcobjshash.gperf" +#line 45 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str29,FC_SCALE_OBJECT}, -#line 65 "src/fcobjshash.gperf" +#line 65 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str30,FC_SYMBOL_OBJECT}, -#line 40 "src/fcobjshash.gperf" +#line 40 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str31,FC_RASTERIZER_OBJECT}, -#line 42 "src/fcobjshash.gperf" +#line 42 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str32,FC_SCALABLE_OBJECT}, -#line 32 "src/fcobjshash.gperf" +#line 32 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str33,FC_ANTIALIAS_OBJECT}, -#line 51 "src/fcobjshash.gperf" +#line 51 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str34,FC_LANG_OBJECT}, -#line 20 "src/fcobjshash.gperf" +#line 20 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str35,FC_STYLE_OBJECT}, -#line 18 "src/fcobjshash.gperf" +#line 18 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str36,FC_FAMILY_OBJECT}, -#line 44 "src/fcobjshash.gperf" +#line 44 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str37,FC_RGBA_OBJECT}, -#line 59 "src/fcobjshash.gperf" +#line 59 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str38,FC_NAMELANG_OBJECT}, -#line 21 "src/fcobjshash.gperf" +#line 21 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str39,FC_STYLELANG_OBJECT}, -#line 19 "src/fcobjshash.gperf" +#line 19 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str40,FC_FAMILYLANG_OBJECT}, -#line 26 "src/fcobjshash.gperf" +#line 26 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str41,FC_WIDTH_OBJECT}, -#line 49 "src/fcobjshash.gperf" +#line 49 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str42,FC_MATRIX_OBJECT}, -#line 50 "src/fcobjshash.gperf" +#line 50 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str43,FC_CHARSET_OBJECT}, {-1}, -#line 47 "src/fcobjshash.gperf" - {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHAR_WIDTH_OBJECT}, -#line 48 "src/fcobjshash.gperf" +#line 47 "fcobjshash.gperf" + {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHARWIDTH_OBJECT}, +#line 48 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str46,FC_CHAR_HEIGHT_OBJECT}, -#line 55 "src/fcobjshash.gperf" +#line 55 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str47,FC_EMBOLDEN_OBJECT}, -#line 58 "src/fcobjshash.gperf" +#line 58 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str48,FC_LCD_FILTER_OBJECT}, -#line 30 "src/fcobjshash.gperf" +#line 30 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str49,FC_SPACING_OBJECT}, -#line 39 "src/fcobjshash.gperf" +#line 39 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str50,FC_INDEX_OBJECT}, -#line 25 "src/fcobjshash.gperf" +#line 25 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str51,FC_WEIGHT_OBJECT}, -#line 53 "src/fcobjshash.gperf" +#line 53 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str52,FC_CAPABILITY_OBJECT}, -#line 56 "src/fcobjshash.gperf" +#line 56 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str53,FC_EMBEDDED_BITMAP_OBJECT}, {-1}, {-1}, {-1}, {-1}, -#line 57 "src/fcobjshash.gperf" +#line 57 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str58,FC_DECORATIVE_OBJECT}, -#line 35 "src/fcobjshash.gperf" +#line 35 "fcobjshash.gperf" {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str59,FC_VERTICAL_LAYOUT_OBJECT} }; diff --git a/ports/fontconfig/include/fcstdint.h b/ports/fontconfig/include/fcstdint.h index 1a8be6ef0..e317b2aa4 100644 --- a/ports/fontconfig/include/fcstdint.h +++ b/ports/fontconfig/include/fcstdint.h @@ -1,7 +1,8 @@ #ifndef _FONTCONFIG_SRC_FCSTDINT_H #define _FONTCONFIG_SRC_FCSTDINT_H 1 #ifndef _GENERATED_STDINT_H -#define _GENERATED_STDINT_H "fontconfig 2.12.1" +#define _GENERATED_STDINT_H "fontconfig 2.12.3" +/* generated using gnu compiler gcc.exe (Rev3, Built by MSYS2 project) 6.3.0 */ #define _STDINT_HAVE_STDINT_H 1 #include #endif diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index 8755ad733..ec3122d67 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -1,10 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fontconfig-2.12.1) +set(FONTCONFIG_VERSION 2.12.3) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fontconfig-${FONTCONFIG_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.12.1.tar.gz" - FILENAME "fontconfig-2.12.1.tar.gz" - SHA512 0959a80522e09551e49ec7b2383b7dfb319d4e1c058ad0b55bb35d3f675acbb7ff08c9c30a8798b731070687f84dd3d2ff7e28aafac6ecfa9d3f85c5847c0955) + URLS "https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.gz" + FILENAME "fontconfig-${FONTCONFIG_VERSION}.tar.gz" + SHA512 b17725c028be1c5e6f76c136b0ed7db1be7694cbbf217310083512708e05cdc1a824427f89082e6ef259c10297900f26cbe899f7c5762e7662855739f3eff5ea) # Download single-header implementation of dirent API for Windows and it's license vcpkg_download_distfile(DIRENT_H @@ -23,8 +24,8 @@ file(RENAME ${SOURCE_PATH}/fontconfig-dirent.h ${SOURCE_PATH}/dirent.h) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS - -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DFC_INCLUDE_DIR=${CMAKE_CURRENT_LIST_DIR}/include OPTIONS_DEBUG -DFC_SKIP_TOOLS=ON @@ -33,6 +34,14 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + foreach(HEADER fcfreetype.h fontconfig.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER} FC_HEADER) + string(REPLACE "#define FcPublic" "#define FcPublic __declspec(dllimport)" FC_HEADER "${FC_HEADER}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER} "${FC_HEADER}") + endforeach() +endif() + file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fontconfig) file(RENAME ${CURRENT_PACKAGES_DIR}/share/fontconfig/COPYING ${CURRENT_PACKAGES_DIR}/share/fontconfig/copyright) file(COPY ${DIRENT_LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/fontconfig) -- cgit v1.2.3 From 2f26b5733a2131d60fcad6e34a4f807a426e2ab9 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 31 May 2017 18:59:08 +0200 Subject: [nana] update to 1.5.1 --- ports/nana/CONTROL | 4 ++-- ports/nana/fix-linking.patch | 51 -------------------------------------------- ports/nana/portfile.cmake | 27 +++++++++-------------- 3 files changed, 12 insertions(+), 70 deletions(-) delete mode 100644 ports/nana/fix-linking.patch diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL index 96d79560f..c8270c56a 100644 --- a/ports/nana/CONTROL +++ b/ports/nana/CONTROL @@ -1,4 +1,4 @@ Source: nana -Version: 1.4.1-66be23c9204c5567d1c51e6f57ba23bffa517a7c +Version: 1.5.1-hotfix-42f8985 Description: Cross-platform library for GUI programming in modern C++ style. -Build-Depends: zlib, libpng, libjpeg-turbo +Build-Depends: libpng, libjpeg-turbo diff --git a/ports/nana/fix-linking.patch b/ports/nana/fix-linking.patch deleted file mode 100644 index f897ed228..000000000 --- a/ports/nana/fix-linking.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5c9c9c9..ae35185 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -149,26 +149,20 @@ endif () - # Find PNG - if(NANA_CMAKE_ENABLE_PNG) - add_definitions(-DNANA_ENABLE_PNG) -- set(NANA_LINKS "${NANA_LINKS} -lpng") - if(NANA_CMAKE_LIBPNG_FROM_OS) -- find_package(PNG) -- if (PNG_FOUND) -- include_directories( ${PNG_INCLUDE_DIRS}) -- add_definitions(-DUSE_LIBPNG_FROM_OS) -- endif(PNG_FOUND) -+ find_package(PNG REQUIRED) -+ include_directories(${PNG_INCLUDE_DIRS}) -+ add_definitions(-DUSE_LIBPNG_FROM_OS) - endif(NANA_CMAKE_LIBPNG_FROM_OS) - endif(NANA_CMAKE_ENABLE_PNG) - - # Find JPEG - if(NANA_CMAKE_ENABLE_JPEG) - add_definitions(-DNANA_ENABLE_JPEG) -- set(NANA_LINKS "${NANA_LINKS} -ljpeg") - if(NANA_CMAKE_LIBJPEG_FROM_OS) -- find_package(JPEG) -- if (JPEG_FOUND) -- include_directories( ${JPEG_INCLUDE_DIRS}) -- add_definitions(-DUSE_LIBJPEG_FROM_OS) -- endif(JPEG_FOUND) -+ find_package(JPEG REQUIRED) -+ include_directories(${JPEG_INCLUDE_DIRS}) -+ add_definitions(-DUSE_LIBJPEG_FROM_OS) - endif(NANA_CMAKE_LIBJPEG_FROM_OS) - endif(NANA_CMAKE_ENABLE_JPEG) - -@@ -253,7 +247,12 @@ endforeach(subdir ${NANA_SOURCE_SUBDIRS}) - - include_directories(${NANA_INCLUDE_DIR}) - add_library(${PROJECT_NAME} ${sources} ) --target_link_libraries(${PROJECT_NAME} ${NANA_LINKS}) -+if(NANA_CMAKE_ENABLE_JPEG AND NANA_CMAKE_LIBJPEG_FROM_OS) -+ target_link_libraries(${PROJECT_NAME} ${JPEG_LIBRARIES}) -+endif() -+if(NANA_CMAKE_ENABLE_PNG AND NANA_CMAKE_LIBPNG_FROM_OS) -+ target_link_libraries(${PROJECT_NAME} ${PNG_LIBRARIES}) -+endif() - - # Headers: use INCLUDE_DIRECTORIES - # Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES) diff --git a/ports/nana/portfile.cmake b/ports/nana/portfile.cmake index 117e41e23..f2b7fab17 100644 --- a/ports/nana/portfile.cmake +++ b/ports/nana/portfile.cmake @@ -1,35 +1,28 @@ -include(vcpkg_common_functions) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() +include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cnjinhao/nana - REF 66be23c9204c5567d1c51e6f57ba23bffa517a7c - SHA512 4f87acb51cc4bb2760402b33c81b6bd15a794b026dd31876a0ccc24a86f2c501b873f7bf3a57098e261fddc49d4935c39d13ae1595cb85b67bce337ae2fd3a0d - HEAD_REF master + REF 42f89854fd6795d9b2113d011a87404dcc9ba37e + SHA512 89b75ccb95e5c4a2075a59064de0b0ff2fca90f90e9b391c2def7f74cc7484930b7139e314f33250bfaa148bfc5a5c9cf78ae3cac2336e0f32a9651670c36685 + HEAD_REF develop ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-linking.patch") - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS - -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON + -DMSVC_USE_STATIC_RUNTIME=OFF # dont override our settings -DNANA_CMAKE_ENABLE_PNG=ON -DNANA_CMAKE_ENABLE_JPEG=ON OPTIONS_DEBUG -DNANA_CMAKE_INSTALL_INCLUDES=OFF) vcpkg_install_cmake() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/nana.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/nana.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -endif() - vcpkg_copy_pdbs() file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nana) -- cgit v1.2.3 From 4570ac743c24d636f03af0fc9e90a0e42c76b3ae Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 31 May 2017 22:54:06 +0200 Subject: [gtk] update to 3.22.15 --- ports/gtk/CONTROL | 2 +- ports/gtk/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/gtk/CONTROL b/ports/gtk/CONTROL index f1a30f2c7..6a5a0e8b7 100644 --- a/ports/gtk/CONTROL +++ b/ports/gtk/CONTROL @@ -1,4 +1,4 @@ Source: gtk -Version: 3.22.14 +Version: 3.22.15 Description: Portable library for creating graphical user interfaces. Build-Depends: glib, atk, gdk-pixbuf, pango, cairo, libepoxy, gettext diff --git a/ports/gtk/portfile.cmake b/ports/gtk/portfile.cmake index b16013de6..29af53e58 100644 --- a/ports/gtk/portfile.cmake +++ b/ports/gtk/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(GTK_VERSION 3.22.14) +set(GTK_VERSION 3.22.15) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gtk+-${GTK_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://ftp.gnome.org/pub/gnome/sources/gtk+/3.22/gtk+-${GTK_VERSION}.tar.xz" FILENAME "gtk+-${GTK_VERSION}.tar.xz" - SHA512 f7b2cfc63f8c849c45dc4f80c8115dcf20d0da63718eedbe133f8ac86c17488a91fecb8a0e47bb6b48f81b06ce6897540d900ab8bfbe673426dacf4f7ef74e8b) + SHA512 c99c4a52bc447a21be20546bdc7808081abde076af9603424c1de20af031ac3f9bd121709d4c18705db8ba2f66ace0aae9b32741347788a8d81afa358d67e758) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 9acdaa7722237c1585beb0fb6f822e6cf5580242 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 31 May 2017 22:54:47 +0200 Subject: [pango] update to 1.40.6 --- ports/pango/CONTROL | 2 +- ports/pango/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL index 430243537..011f33691 100644 --- a/ports/pango/CONTROL +++ b/ports/pango/CONTROL @@ -1,4 +1,4 @@ Source: pango -Version: 1.40.5-2 +Version: 1.40.6 Description: Text and font handling library. Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz diff --git a/ports/pango/portfile.cmake b/ports/pango/portfile.cmake index 0f454a4e5..7f28b8ca7 100644 --- a/ports/pango/portfile.cmake +++ b/ports/pango/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(PANGO_VERSION 1.40.5) +set(PANGO_VERSION 1.40.6) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pango-${PANGO_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-${PANGO_VERSION}.tar.xz" FILENAME "pango-${PANGO_VERSION}.tar.xz" - SHA512 40e8bf85dbb4b6fd35da3acec06a0d2b9dde95a3c5a212d243dbcbc0d00f12bd061757a04cb2f4a8db61329efd7ed9be53e3f5d6a2eb2a3defba1d12f9eed43d) + SHA512 d916b364a77de3e68779e6d841d95bca456daf89405b92eaf51dceef093a9761cbb6c48f4c2971dec47c0bbdb645a3f3f4fb9af425274bf1d1822b278575e1f7) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 39666bbcd9f1816b8ebf836298de843f321ab364 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 31 May 2017 15:14:31 -0700 Subject: [gettext] Bump version to include uwp change --- ports/gettext/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/gettext/CONTROL b/ports/gettext/CONTROL index 3ab837168..fad410359 100644 --- a/ports/gettext/CONTROL +++ b/ports/gettext/CONTROL @@ -1,3 +1,3 @@ Source: gettext -Version: 0.19 +Version: 0.19-1 Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages -- cgit v1.2.3 From d8791515cc6f547c7d03637acb27e3eff4ccbe32 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 31 May 2017 16:53:05 -0700 Subject: [vcpkg-specs] Initial commit of Feature Packages draft --- docs/specifications/feature-packages.md | 287 ++++++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 docs/specifications/feature-packages.md diff --git a/docs/specifications/feature-packages.md b/docs/specifications/feature-packages.md new file mode 100644 index 000000000..2c7f60ff9 --- /dev/null +++ b/docs/specifications/feature-packages.md @@ -0,0 +1,287 @@ +# Proposal: Features / Feature packages (Feb 23 2017) + +## 1. Motivation + +### A. OpenCV + CUDA + +[OpenCV][] is a computer vision library that can optionally be built with CUDA support to massively accelerate certain tasks when using computers with NVidia GPUs. For users without NVidia GPUs, building with CUDA support provides no benefit. [CUDA][] is provided only via a 1.3 GB installer (at the time of this authoring), which requires administrator access to install and modifies the global system state. + +Therefore, there is significant value in enabling users to choose whether they find CUDA support valuable for their particular scenario. + +### B. OpenCV + OpenCV\_contrib + +The community around [OpenCV][] has built up a library of extensions called [OpenCV_contrib][]. However, these extensions are a source-level patch onto the main OpenCV codebase and therefore must be applied _during_ the core OpenCV build. Further confounding the problem, it is the author's understanding that these community extensions have only been developed with [CUDA][] enabled and cannot be built without that dependency. + +Therefore, if CUDA is disabled, OpenCV\_contrib must also be disabled. Likewise, when a user requests OpenCV\_contrib, CUDA must be enabled. It would be convienent, but not a requirement, to enable CUDA without enabling the community extensions. + +Finally, these extensions add additional exports and headers which could be depended upon by other libraries. For maintainers, there must be a way to specify this requirement such that `vcpkg install mylib-depends-ocv-contrib` will verify/build/rebuild OpenCV with the community extensions enabled. + +### C. C++ REST SDK + SignalR + +The [C++ REST SDK][cpprestsdk] is a networking library that provides (among other features) HTTP and Websockets clients. To implement the HTTP client functionality on Windows Desktop, only the core Win32 platform APIs are needed (`zlib` is optional). + +However, the websockets client is based on [Websockets++][], which adds mandatory dependencies on `boost`, `openssl`, and `zlib`. Many users of the C++ REST SDK do not use the websockets component, so to minimize their overall dependency footprint it can be disabled at build time. Ideally, these kinds of options would be easily accessible to users in Vcpkg who are concerned about the final size or licensing of their deployment. + +[SignalR-Client-Cpp][SignalR] depends on the websockets functionality provided by the C++ REST SDK. Therefore, the maintainers of the `signalrclient` port would ideally like to express this dependency such that `cpprestsdk` will be automatically correctly built for their needs. Note that `signalrclient` does not _inherently_ care about `boost`, `websocketspp` or `openssl` -- it depends only on the public websocket client APIs provided by `cpprestsdk`. It would be much more maintainable to declare dependencies based on the public APIs rather than the dependencies themselves. + +[OpenCV]: http://opencv.org/ +[CUDA]: http://www.nvidia.com/object/cuda_home_new.html +[OpenCV_contrib]: https://github.com/opencv/opencv_contrib +[cpprestsdk]: https://github.com/Microsoft/cpprestsdk +[Websockets++]: https://www.zaphoyd.com/websocketpp/ +[SignalR]: https://github.com/aspnet/SignalR-Client-Cpp + +## 2. Other design concerns + +- General-purpose Open Source projects must be able to easily and succinctly describe their build dependencies inside Vcpkg. This should be no more verbose than a single `vcpkg install` line and, when that command succeeds, there is a strong expectation that all required functionality/headers/imports are available. + +- The internal state of the Vcpkg enlistment must be either extremely transparent OR managed by version control (git). This enables larger projects to efficiently transfer the entire state of their customized Vcpkg system between machines (and onto build servers) by having the destination clone and then run a single `vcpkg install` line for the subset of dependencies required. The results of this operation should be as repeatable as reasonably achievable given the current limits of the underlying toolchain. + +## 3. Proposed solution + +A key summary of the above motivations is that they are all scenarios surrounding APIs that are not independently buildable from each other. We have an existing solution for APIs that are independently buildable: separate packages. Therefore, we seek to extend the user-facing notion of "packages" to include capabilities and contracts that cannot be made into independent builds. + +This document proposes "features" (also called feature packages). These features are intended to model semi-independently toggleable API sets/contracts such that they can be sanely depended upon by other packages. It is not a goal to model exclusive alternatives (such as implementation choices that are not directly user-observable) through this mechanism. + +- Individual libraries within `boost` may be reasonably represented as features. +- Whether a graphics library is built on DirectX xor OpenGL (where one but not both must be chosen) is not representable as a feature. + +From a user experience perspective (i.e. from `vcpkg install`) feature packages act as much as possible like completely independent packages. However, internally, any change to a package's features will result in a rebuild of the associated "parent" package. This will invoke a package rebuild experience similar to upgrading. + +When using `vcpkg install `, some features will be enabled by default. These default features can be avoided by referring to the packages as `[core]` and features can be added by supplying them on the same installation line. + +### A. Proposed User experience + +#### i. User with no preference about options +Install of a library with default features: +```no-highlight +> vcpkg install cpprestsdk +// -- omitted build information -- // +Package cpprestsdk[core]:x86-windows is installed. +Package cpprestsdk[compression]:x86-windows is installed. +Package cpprestsdk[ws-client]:x86-windows is installed. +``` + +Removal of that library: +```no-highlight +> vcpkg remove cpprestsdk +The following packages will be removed: + cpprestsdk:x86-windows +Removing package cpprestsdk:x86-windows... +Removing package cpprestsdk:x86-windows... done +Purging package cpprestsdk:x86-windows... +Cleaned up D:\src\vcpkg\packages\cpprestsdk_x64-windows +Purging package cpprestsdk:x86-windows... done +``` + +Installation of a library with optional features: +```no-highlight +> vcpkg install opencv +// -- omitted build information -- // +Package opencv[core]:x86-windows is installed. +``` + +#### ii. User desires CUDA support for OpenCV directly, and is unfamiliar with feature packages +Developer Bob knows he wants OpenCV, so he guesses what the package is called +```no-highlight +> vcpkg install opencv +// -- omitted build information -- // +Package opencv[core]:x86-windows is installed. +``` + +Bob attempts to build his application against OpenCV (assuming CUDA), which fails at runtime or compile time indicating that OpenCV wasn't built with CUDA. +Bob comes back to vcpkg, not knowing about the "feature packages" feature. The primary inquiry tools for Vcpkg are `search` and `list`, so he runs `vcpkg search`: +```no-highlight +> vcpkg search opencv +opencv 3.2.0 computer vision library +opencv[cuda] support for NVidia CUDA +opencv[contrib] community supported extensions for OpenCV + +If your library is not listed, please open an issue at: + https://github.com/Microsoft/vcpkg/issues +``` +He isn't immediately sure what the lack of a version number means, but anything in `vcpkg search` can be applied to `vcpkg install`, so he runs: +```no-highlight +> vcpkg install opencv[cuda] +The following packages will be rebuilt: + opencv:x86-windows + +To rebuild with this feature, use: + vcpkg remove opencv:x86-windows + vcpkg install opencv[core,cuda]:x86-windows +``` +Bob follows the instructions... +```no-highlight +> vcpkg remove opencv:x86-windows +// -- omitted results as above -- // +> vcpkg install opencv[core,cuda]:x86-windows +// -- omitted build information -- // +Package opencv[core]:x86-windows is installed. +Package opencv[cuda]:x86-windows is installed. +``` +and he can now use OpenCV's CUDA support in his application. + +#### iii. User is familiar with feature packages, and wants to opt-out of a feature +Developer Alice has used `cpprestsdk`, built it from source, and she knows about the option to disable websockets. She uses `search` to find the complete list of features: +``` +> vcpkg search cpprestsdk +cpprestsdk 2.9.0-2 C++11 JSON, REST, and OAuth library The C++ RES... +cpprestsdk[compression] Gzip compression support in the HTTP client. +cpprestsdk[ws-client] Websocket client support based on websocketspp. + +If your library is not listed, please open an issue at: + https://github.com/Microsoft/vcpkg/issues +``` + +She decided she only wants `cpprestsdk[compression]`, so she installs only that feature: +```no-highlight +> vcpkg install cpprestsdk[compression] +// -- omitted build information -- // +Package cpprestsdk[core]:x86-windows is installed. +Package cpprestsdk[compression]:x86-windows is installed. +``` +She receives a quick recursive build that only depends on `zlib`. + +She's now interested in some additional libraries built on top of cpprestsdk: `azure-storage-cpp` and `signalrclient`. +```no-highlight +> vcpkg install azure-storage-cpp +// -- omitted build information -- // +Package azure-storage-cpp[core]:x86-windows is installed. + +> vcpkg install signalrclient +Package signalrclient:x86-windows depends on cpprestsdk[ws-client]:x86-windows. + +The following packages will be rebuilt: + * azure-storage-cpp:x86-windows + * cpprestsdk:x86-windows + +To rebuild the current package graph with this feature, use: + vcpkg remove cpprestsdk:x86-windows azure-storage-cpp:x86-windows + vcpkg install cpprestsdk[core,compression,ws-client]:x86-windows + vcpkg install azure-storage-cpp[core]:x86-windows + vcpkg install signalrclient[core]:x86-windows +``` +She follows the above script and can use both `azure-storage-cpp` and `signalrclient` in her code. + +Some time has passed, she decided not to use `signalrclient`, and she's interested in shipping her application. She wants to minimize her final install size, so she'd like to remove all unneeded packages like `boost` and `openssl`. +```no-highlight +> vcpkg remove boost openssl +The following packages and features will be removed: + * signalrclient[core]:x86-windows + * cpprestsdk[ws-client]:x86-windows + boost[core]:x86-windows + openssl[core]:x86-windows + +The following packages will be rebuilt: + * azure-storage-cpp:x86-windows + * cpprestsdk:x86-windows + +Removing features requires rebuilding packages. +To rebuild the current package graph without these features, use: + vcpkg remove cpprestsdk:x86-windows azure-storage-cpp:x86-windows signalrclient:x86-windows openssl:x86-windows boost:x86-windows + vcpkg install cpprestsdk[core,compression]:x86-windows + vcpkg install azure-storage-cpp[core]:x86-windows +``` +In the end, her final `vcpkg list` outputs: +```no-highlight +> vcpkg list +zlib[core]:x86-windows 1.2.11 A compression library +azure-storage-cpp[core]:x86-windows 2.6.0 Microsoft Azure Storage Client SDK for ... +cpprestsdk[core]:x86-windows 2.9.0-2 C++11 JSON, REST, and OAuth library +cpprestsdk[compression]:x86-windows Gzip compression support in the HTTP client. +``` + +### B. Technical model + +- Each package can have any number "features". +- Features follow the same naming conventions as packages, but when referenced are always "namespaced" by the parent package. + - `cpprestsdk[ws-client]` is a completely orthogonal feature from `poco[ws-client]`. +- Features are valid dependencies. + - `signalrclient` depends on `cpprestsdk[ws-client]` +- Features can have dependencies (including other features). + - `cpprestsdk[ws-client]` depends on `boost`, `openssl`, and `websocketspp` + - `opencv[cuda]` depends on `cuda` + - `opencv[contrib]` depends on `opencv[cuda]` + - `boost[python]` depends on `libpython` +- Every package has an implicit feature called `core`, which covers the core library with a minimum set of features. All features implicitly depend on the `core` feature of their parent package + - `azure-storage-cpp` depends on `cpprestsdk[core]` + - `cpprestsdk[ws-client]` implicitly depends on `cpprestsdk[core]` +- Each package declares a list of default features that are enabled when the package is referred to by its raw name, and `core` is always a default feature. + - `cpprestsdk` declares `ws-client` and `compression` to be default features. Any unqualified reference `cpprestsdk` implicitly means `cpprestsdk[core]` _and_ `cpprestsdk[ws-client]` _and_ `cpprestsdk[compression]`. + - `opencv` does not declare `cuda` nor `contrib` to be default features. + +As a conclusion of the above, it is expected that all packages will be buildable with all features disabled (just the `core` feature) and with all features enabled. + +### C. Proposed Control File Syntax + +#### OpenCV and CUDA +To add the feature CUDA to OpenCV, we will adopt the following syntax in the CONTROL file: +```no-highlight +# opencv/CONTROL +Source: opencv +Version: 3.2.0-1 +Build-Depends: zlib, libpng, libjpeg-turbo, tiff +Description: computer vision library +Default-Features: + +Feature: cuda +Build-Depends: cuda +Description: parallel computing platform + +Feature: contrib +Build-Depends: opencv[cuda] +Description: library of OpenCV Extensions +``` + +#### Signalrclient +```no-highlight +# signalrclient/CONTROL +Source: signalrclient +Version: 1.0.0-beta1 +Build-Depends: cpprestsdk[ws-client] +Description: C++ client for SignalR. +``` +```no-highlight +# cpprestsdk/CONTROL +Source: cpprestsdk +Version: 2.9.0-2 +Build-Depends: +Description: C++11 JSON, REST, and OAuth library ... +Default-Features: compression, ws-client + +Feature: compression +Build-Depends: zlib (windows) +Description: Gzip compression support in the HTTP client. + +Feature: ws-client +Build-Depends: boost (windows), openssl (windows), websocketpp (windows) +Description: Websocket client support based on websocketspp +``` + +### D. Additional Control File Technical Details + +- If any feature paragraphs exist, the field `Default-Features` must be present. + +## 4. Related Work + +### Cargo's Features (from Rust): +The proposed feature packages are exceedingly similar to Cargo's Features, with the following changes: + +- We avoid any collision problems because features are always namespaced by the owning package +- We do not have a concept of "feature groups", instead we allow dependencies from one feature to another within the same package (Note: This may be how "feature groups" are implemented internally to Cargo -- it was not clear from the documentation). +- Because of the nature of C and C++, it is extremely commonplace that large software packages can have features disabled to remove their dependencies upon other libraries. Changing this configuration requires a rebuild of the package and potentially rippling ABI changes to any downstream dependencies. Therefore, we expect significantly more use of this feature to manage optional API contracts instead of the intended use in Cargo (curation). +- We do not intend feature packages to be used to express the curation relationship, beyond the notion of a "default" set within a package. + +### Gentoo's USE flags: +Gentoo's USE flags can be shortly summarized as a global set of keywords that is used to make cross-cutting changes to the entire package graph's build configuration. This system standardizes many common settings such that they can be simultaneously toggled for the entire graph. + +The most common example of this would be using KDE vs Gnome. A user who knows that, given the choice, they would prefer the KDE/Qt interface can manage the massive space of package configuration efficiently without learning the particular term that each package has decided to call "build using Qt instead of GTK". + +USE flags can be customized hierarchically when needed, including at the per-package level. They can be depended upon by other packages, both positively and negatively. USE flags themselves can be used in any boolean expression to determine the complete set of package dependencies, including removing dependencies when flags are enabled. + +Problems with USE flags: + +- They require coordination from package maintainers to achieve the goal of "portable" flags. This increases the burden of adding a package -- to author a good package, I need to be aware of every uncommon USE flag and evaluate how those could map onto my local configuration space. +- Based on research online, it seems extremely common that users need to tweak flags at a per-package level. This calls into question how valuable the cross-cutting power above is. +- The vast majority of common USE flags are essentially a list of all the common packages and focus on giving the user a view of dependencies (which a package manager is designed to abstract when possible) instead of APIs (which is what users code against). +- Dependency analysis with USE flags becomes a SAT problem with an enormous state space -- P*F bits -- which compounds with any versioning relations. This may work acceptably in practice via heuristics, but it implies that a) there is a looming performance wall which could suddenly create a poor user experience and b) the heuristics may incorrectly model the user's needs, causing a disconnect in desire vs practice, which again leads to a poor user experience. -- cgit v1.2.3 From e733211c6070fe674b648e150598c05d8e5d4a35 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 31 May 2017 18:01:47 -0700 Subject: [hpx] Bump version to include patches --- ports/hpx/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/hpx/CONTROL b/ports/hpx/CONTROL index c1433102a..cfb599e51 100644 --- a/ports/hpx/CONTROL +++ b/ports/hpx/CONTROL @@ -1,5 +1,5 @@ Source: hpx -Version: 1.0.0-3 +Version: 1.0.0-4 Build-Depends: boost, hwloc Description: The C++ Standards Library for Concurrency and Parallelism HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case. -- cgit v1.2.3 From 33dd3ee38d2dae173db756beabb9fd2f87bb524c Mon Sep 17 00:00:00 2001 From: Hennadii Zabula Date: Mon, 29 May 2017 12:26:27 +0300 Subject: Fix harbuzz build for arm --- ports/harfbuzz/0001-fix-uwp-build.patch | 15 +++++++++++++++ ports/harfbuzz/CONTROL | 2 +- ports/harfbuzz/portfile.cmake | 17 +++++++++++++++-- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 ports/harfbuzz/0001-fix-uwp-build.patch diff --git a/ports/harfbuzz/0001-fix-uwp-build.patch b/ports/harfbuzz/0001-fix-uwp-build.patch new file mode 100644 index 000000000..532ce668e --- /dev/null +++ b/ports/harfbuzz/0001-fix-uwp-build.patch @@ -0,0 +1,15 @@ +diff --git "a/harfbuzz-1.4.6/src/hb-ft.cc" "b/harfbuzz-1.4.6/src/hb-ft.cc" +index 48d6a0ef..f4ce6608 100644 +--- "a/harfbuzz-1.4.6/src/hb-ft.cc" ++++ "b/harfbuzz-1.4.6/src/hb-ft.cc" +@@ -31,6 +31,10 @@ + + #include "hb-ft.h" + ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) ++#define generic GenericFromFreeTypeLibrary ++#endif ++ + #include "hb-font-private.hh" + + #include "hb-cache-private.hh" // Maybe use in the future? diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 6ebe28f37..1544982e2 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz Version: 1.4.6 Description: HarfBuzz OpenType text shaping engine -Build-Depends: freetype, glib +Build-Depends: freetype, glib [windows] diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 8c77d1efe..367d12246 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -7,13 +7,26 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ + PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch" +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + SET(HAVE_GLIB "OFF") + SET(BUILTIN_UCDN "ON") +else() + SET(HAVE_GLIB "ON") + SET(BUILTIN_UCDN "OFF") +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DHB_HAVE_FREETYPE=ON - -DHB_HAVE_GLIB=ON - -DHB_BUILTIN_UCDN=OFF + -DHB_HAVE_GLIB=${HAVE_GLIB} + -DHB_BUILTIN_UCDN=${BUILTIN_UCDN} OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) -- cgit v1.2.3 From 41069b853078ce3ecfb5a66101c62ff84100e02e Mon Sep 17 00:00:00 2001 From: Hennadii Zabula Date: Thu, 1 Jun 2017 11:54:56 +0300 Subject: Fix openssl pathlib --- ports/openssl/fix-uwp-pathlib.patch | 13 +++++++++++++ ports/openssl/portfile-uwp.cmake | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 ports/openssl/fix-uwp-pathlib.patch diff --git a/ports/openssl/fix-uwp-pathlib.patch b/ports/openssl/fix-uwp-pathlib.patch new file mode 100644 index 000000000..17a1a4e10 --- /dev/null +++ b/ports/openssl/fix-uwp-pathlib.patch @@ -0,0 +1,13 @@ +diff --git "a/ms/setVSvars.bat" "b/ms/setVSvars.bat" +index e6ebc0a7..cde9afb2 100644 +--- "a/ms/setVSvars.bat" ++++ "b/ms/setVSvars.bat" +@@ -179,7 +179,7 @@ exit /b + call:setVar _VS14VC VisualStudio14VC + call:setVar _WKITS10 WindowsKits10.0 + set PATH=%_VS14VCBin%;%PATH% +- set "LIBPATH=%_WKITS10%UnionMetadata\Facade;%_VS14VC%vcpackages;%_WKITS10%references\windows.foundation.foundationcontract\1.0.0.0\;%_WKITS10%references\windows.foundation.universalapicontract\1.0.0.0\" ++ set "LIBPATH=%_WKITS10%UnionMetadata\Facade;%_VS14VC%vcpackages;%_WKITS10%references\windows.foundation.foundationcontract\2.0.0.0\;%_WKITS10%references\windows.foundation.universalapicontract\3.0.0.0\" + goto :eof + + :end diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake index cf2f1e7ca..c752f554a 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl/portfile-uwp.cmake @@ -40,6 +40,13 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) +message(STATUS ${SOURCE_PATH}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-uwp-pathlib.patch +) + file(REMOVE_RECURSE ${SOURCE_PATH}/tmp32dll) file(REMOVE_RECURSE ${SOURCE_PATH}/out32dll) file(REMOVE_RECURSE ${SOURCE_PATH}/inc32dll) -- cgit v1.2.3 From 370868235b65dc41d44a4c4628cd5e289cfaca18 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 1 Jun 2017 14:25:40 -0700 Subject: Created portfile #863 --- ports/paho-mqtt/portfile.cmake | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 ports/paho-mqtt/portfile.cmake diff --git a/ports/paho-mqtt/portfile.cmake b/ports/paho-mqtt/portfile.cmake new file mode 100644 index 000000000..5fc6341f8 --- /dev/null +++ b/ports/paho-mqtt/portfile.cmake @@ -0,0 +1,56 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eclipse/paho.mqtt.c + REF v1.1.0 + SHA512 49eebf258e15076048103ff79442ad0d21164b83f713eee7f226998106b5931d310871d3b372322d5ef1cb2801219a6e626400b6fe4198814150a6277d6bfd74 + HEAD_REF master +) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DPAHO_WITH_SSL=TRUE +) + + +vcpkg_build_cmake() + +file(GLOB DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" +) +file(GLOB LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" +) +file(GLOB DEBUG_DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" +) +file(GLOB DEBUG_LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" +) +file(GLOB HEADERS "${SOURCE_PATH}/*/*.h") +if(DLLS) + file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() +file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_copy_pdbs() + + +file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/paho-mqtt RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From cf39b0b8e3ef5f7e03e7465d5102993f53e04041 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 1 Jun 2017 14:26:42 -0700 Subject: created portfile --- ports/paho-mqtt/CONTROL | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 ports/paho-mqtt/CONTROL diff --git a/ports/paho-mqtt/CONTROL b/ports/paho-mqtt/CONTROL new file mode 100644 index 000000000..7981a5195 --- /dev/null +++ b/ports/paho-mqtt/CONTROL @@ -0,0 +1,4 @@ +Source: paho-mqtt +Version: Version 1.1.0 (Paho 1.2) +Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things +Build-Depends: openssl -- cgit v1.2.3 From 40e9cca0036f720de5e4e8a9027922be2e1e7b2a Mon Sep 17 00:00:00 2001 From: mnml_ Date: Fri, 2 Jun 2017 12:37:46 +0200 Subject: replace empty-include-dir-hack with new policy As https://github.com/Microsoft/vcpkg/blob/master/CHANGELOG.md states 0.0.78 introduced a policy to allow an empty include directory So the workaround mentioned in https://github.com/Microsoft/vcpkg/pull/117 isn't needed anymore. I just replaced it with the line(+comment) from https://github.com/Microsoft/vcpkg/blob/master/ports/ecm/portfile.cmake#L28 --- ports/ragel/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/ragel/portfile.cmake b/ports/ragel/portfile.cmake index bad1efaaf..00082e4bd 100644 --- a/ports/ragel/portfile.cmake +++ b/ports/ragel/portfile.cmake @@ -23,7 +23,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(WRITE ${CURRENT_PACKAGES_DIR}/include/ragel.txt) +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ragel) -- cgit v1.2.3 From 75cf4be8d47075d90f5b42356bc667efbfbb1d18 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 2 Jun 2017 06:46:29 -0700 Subject: removed parquet-cpp control --- ports/parquet-cpp/CONTROL | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 ports/parquet-cpp/CONTROL diff --git a/ports/parquet-cpp/CONTROL b/ports/parquet-cpp/CONTROL deleted file mode 100644 index cadfee906..000000000 --- a/ports/parquet-cpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: parquet-cpp -Version: apache-parquet-cpp-1.1.0 -Build-Depends: boost, snappy, zlib, brotli, arrow, thrift -Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. -- cgit v1.2.3 From 1253b875195590e528d8a28e12a798264603ba43 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Fri, 2 Jun 2017 18:13:12 +0200 Subject: Implement support to request a specific toolset version via the variable `VCPKG_PLATFORM_TOOLSET` in the triplet file --- toolsrc/include/VcpkgPaths.h | 7 +++-- toolsrc/src/PostBuildLint.cpp | 2 +- toolsrc/src/VcpkgPaths.cpp | 63 ++++++++++++++++++++++++++++++++++++------- toolsrc/src/commands_env.cpp | 2 +- toolsrc/src/vcpkg_Build.cpp | 2 +- 5 files changed, 61 insertions(+), 15 deletions(-) diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h index 25c1728b9..ca03f0e2a 100644 --- a/toolsrc/include/VcpkgPaths.h +++ b/toolsrc/include/VcpkgPaths.h @@ -48,7 +48,10 @@ namespace vcpkg const fs::path& get_cmake_exe() const; const fs::path& get_git_exe() const; const fs::path& get_nuget_exe() const; - const Toolset& get_toolset() const; + const std::vector& get_toolsets() const; + + const Toolset& get_latest_toolset() const; + const Toolset& get_toolset(const std::string& toolset_version) const; Files::Filesystem& get_filesystem() const; @@ -56,6 +59,6 @@ namespace vcpkg Lazy cmake_exe; Lazy git_exe; Lazy nuget_exe; - Lazy toolset; + Lazy> toolsets; }; } diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index bcad27032..363346ab6 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -733,7 +733,7 @@ namespace vcpkg::PostBuildLint const auto& fs = paths.get_filesystem(); // for dumpbin - const Toolset& toolset = paths.get_toolset(); + const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset); const fs::path package_dir = paths.package_dir(spec); size_t error_count = 0; diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 3dd32de01..acd847b5f 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -269,7 +269,7 @@ namespace vcpkg return nullopt; } - static Toolset find_toolset_instance(const VcpkgPaths& paths) + static std::vector find_toolset_instances(const VcpkgPaths& paths) { const auto& fs = paths.get_filesystem(); @@ -277,7 +277,10 @@ namespace vcpkg // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations. std::vector paths_examined; + std::vector found_toolsets; + // VS2017 + Optional vs2017_toolset; for (const fs::path& instance : vs2017_installation_instances) { const fs::path vc_dir = instance / "VC"; @@ -303,9 +306,15 @@ namespace vcpkg paths_examined.push_back(dumpbin_path); if (fs.exists(dumpbin_path)) { - return {dumpbin_path, vcvarsall_bat, L"v141"}; + vs2017_toolset = Toolset{dumpbin_path, vcvarsall_bat, L"v141"}; + break; } } + if(vs2017_toolset) break; + } + if(auto value = vs2017_toolset.get()) + { + found_toolsets.push_back(*value); } // VS2015 @@ -321,23 +330,57 @@ namespace vcpkg paths_examined.push_back(vs2015_dumpbin_exe); if (fs.exists(vs2015_dumpbin_exe)) { - return {vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140"}; + found_toolsets.push_back({vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140"}); } } } - System::println(System::Color::error, "Could not locate a complete toolset."); - System::println("The following paths were examined:"); - for (const fs::path& path : paths_examined) + std::sort(found_toolsets.begin(), + found_toolsets.end(), + [](const Toolset& left, const Toolset& right) { return left.version > right.version; }); + + if(found_toolsets.empty()) { - System::println(" %s", path.u8string()); + System::println(System::Color::error, "Could not locate a complete toolset."); + System::println("The following paths were examined:"); + for(const fs::path& path : paths_examined) + { + System::println(" %s", path.u8string()); + } + Checks::exit_fail(VCPKG_LINE_INFO); } - Checks::exit_fail(VCPKG_LINE_INFO); + + return found_toolsets; + } + + const std::vector& VcpkgPaths::get_toolsets() const + { + return this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); }); } - const Toolset& VcpkgPaths::get_toolset() const + const Toolset& VcpkgPaths::get_latest_toolset() const { - return this->toolset.get_lazy([this]() { return find_toolset_instance(*this); }); + // Invariant: toolsets are non-empty and sorted + return get_toolsets().back(); } + const Toolset& VcpkgPaths::get_toolset(const std::string& toolset_version) const + { + if(toolset_version.empty()) + { + return this->get_latest_toolset(); + } + else + { + const auto& vs_toolsets = this->get_toolsets(); + + const auto toolset = Util::find_if(vs_toolsets, [&](const Toolset& toolset) { return toolset_version == Strings::to_utf8(toolset.version); }); + if(toolset == vs_toolsets.end()) + { + Checks::exit_with_message(VCPKG_LINE_INFO, Strings::format("Could not find toolset %s", toolset_version)); + } + return *toolset; + } + } + Files::Filesystem& VcpkgPaths::get_filesystem() const { return Files::get_real_filesystem(); } } diff --git a/toolsrc/src/commands_env.cpp b/toolsrc/src/commands_env.cpp index 5e1ecc5e7..dd7172b89 100644 --- a/toolsrc/src/commands_env.cpp +++ b/toolsrc/src/commands_env.cpp @@ -13,7 +13,7 @@ namespace vcpkg::Commands::Env args.check_and_get_optional_command_arguments({}); auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); - System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, paths.get_toolset()) + L" && cmd"); + System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, paths.get_toolset(pre_build_info.platform_toolset)) + L" && cmd"); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index d44a673fc..817febe2f 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -128,8 +128,8 @@ namespace vcpkg::Build const fs::path& git_exe_path = paths.get_git_exe(); const fs::path ports_cmake_script_path = paths.ports_cmake; - const Toolset& toolset = paths.get_toolset(); auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); + const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset); const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); const std::wstring cmd_launch_cmake = -- cgit v1.2.3 From 4b6c1f291c5e9812926b49bbf97dadee285aa0e2 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 2 Jun 2017 13:33:45 -0700 Subject: Acquire chromium depot tools --- scripts/cmake/vcpkg_acquire_depot_tools.cmake | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/cmake/vcpkg_acquire_depot_tools.cmake diff --git a/scripts/cmake/vcpkg_acquire_depot_tools.cmake b/scripts/cmake/vcpkg_acquire_depot_tools.cmake new file mode 100644 index 000000000..3b206e271 --- /dev/null +++ b/scripts/cmake/vcpkg_acquire_depot_tools.cmake @@ -0,0 +1,20 @@ +function(vcpkg_acquire_depot_tools PATH_TO_ROOT_OUT) + set(TOOLPATH ${DOWNLOADS}/tools/depot_tools) + set(URL "https://storage.googleapis.com/chrome-infra/depot_tools.zip") + set(ARCHIVE "depot_tools.zip") + set(STAMP "initialized-depot-tools.stamp") + + if(NOT EXISTS "${TOOLPATH}/${STAMP}") + message(STATUS "Acquiring Depot Tools...") + file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE}) + file(REMOVE_RECURSE ${TOOLPATH}) + file(MAKE_DIRECTORY ${TOOLPATH}) + execute_process( + COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} + WORKING_DIRECTORY ${TOOLPATH} + ) + file(WRITE "${TOOLPATH}/${STAMP}" "0") + message(STATUS "Acquiring Depot Tools... OK") + endif() + set(${PATH_TO_ROOT_OUT} ${TOOLPATH} PARENT_SCOPE) +endfunction() -- cgit v1.2.3 From e3c90826317d4ba6a01afc3d6cfbfcc898f546e4 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 2 Jun 2017 13:36:32 -0700 Subject: Include it in common tools --- scripts/cmake/vcpkg_common_functions.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index a0e9633c3..29f0f8dff 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -19,4 +19,5 @@ include(vcpkg_copy_pdbs) include(vcpkg_copy_tool_dependencies) include(vcpkg_get_program_files_32_bit) include(vcpkg_get_program_files_platform_bitness) -include(vcpkg_get_windows_sdk) \ No newline at end of file +include(vcpkg_get_windows_sdk) +include(vcpkg_acquire_depot_tools) -- cgit v1.2.3 From c24021c022352e66a89a4583d1521ec5828f0c14 Mon Sep 17 00:00:00 2001 From: mmazaherit Date: Sat, 3 Jun 2017 14:43:03 -0400 Subject: 0 --- ports/suitesparse/CONTROL | 6 ++++++ ports/suitesparse/metis.patch | 13 ++++++++++++ ports/suitesparse/portfile.cmake | 45 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 ports/suitesparse/CONTROL create mode 100644 ports/suitesparse/metis.patch create mode 100644 ports/suitesparse/portfile.cmake diff --git a/ports/suitesparse/CONTROL b/ports/suitesparse/CONTROL new file mode 100644 index 000000000..3b35dd915 --- /dev/null +++ b/ports/suitesparse/CONTROL @@ -0,0 +1,6 @@ +Source: suitesparse +Version: 4.5.4 +#Build-Depends: metis +#Use the following line instead for optional features from OpenCV-contrib that require protobuf +#Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf +Description: computer vision library diff --git a/ports/suitesparse/metis.patch b/ports/suitesparse/metis.patch new file mode 100644 index 000000000..aab5229af --- /dev/null +++ b/ports/suitesparse/metis.patch @@ -0,0 +1,13 @@ +diff --git "a/GKlib/gk_arch.h" "b/GKlib/gk_arch.h" +index 01c72e56..2cb80ccf 100644 +--- "a/GKlib/gk_arch.h" ++++ "b/GKlib/gk_arch.h" +@@ -60,7 +60,7 @@ typedef ptrdiff_t ssize_t; + + #ifdef __MSC__ + /* MSC does not have rint() function */ +-#define rint(x) ((int)((x)+0.5)) ++//#define rint(x) ((int)((x)+0.5)) + + /* MSC does not have INFINITY defined */ + #ifndef INFINITY diff --git a/ports/suitesparse/portfile.cmake b/ports/suitesparse/portfile.cmake new file mode 100644 index 000000000..1aabcb79e --- /dev/null +++ b/ports/suitesparse/portfile.cmake @@ -0,0 +1,45 @@ +include(vcpkg_common_functions) + +set(SUITESPARSE_VER SuiteSparse-4.5.4) +set(METIS_VER metis-5.1.0) +set(SUITESPARSEWIN_PATH ${CURRENT_BUILDTREES_DIR}/src/suitesparse-metis-for-windows-1.3.1) +set(SUITESPARSE_PATH ${SUITESPARSEWIN_PATH}/Suitesparse) +set(METIS_PATH ${SUITESPARSEWIN_PATH}/metis) + + + +vcpkg_download_distfile(SUITESPARSEWIN +URLS "https://github.com/jlblancoc/suitesparse-metis-for-windows/archive/v1.3.1.zip" +FILENAME "suitesparse-metis-for-windows-1.3.1.zip" +SHA512 f8b9377420432f1c0a05bf884fe9e72f1f4eaf7e05663c66a383b5d8ddbd4fbfaa7d433727b4dc3e66b41dbb96b1327d380b68a51a424276465512666e63393d +) +vcpkg_download_distfile(SUITESPARSE + URLS "http://faculty.cse.tamu.edu/davis/SuiteSparse/${SUITESPARSE_VER}.tar.gz" + FILENAME "${SUITESPARSE_VER}.tar.gz" + SHA512 43d791065a69b8842acc3490fc8e2c24d32217864228cfc5106ece581f8867eb84cf9d7c03e01307366cb285c98dee37de13f8bbaf30466feeb56afed9002b9f +) +vcpkg_download_distfile(METIS + URLS "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/${METIS_VER}.tar.gz" + FILENAME "${METIS_VER}.tar.gz" + SHA512 deea47749d13bd06fbeaf98a53c6c0b61603ddc17a43dae81d72c8015576f6495fd83c11b0ef68d024879ed5415c14ebdbd87ce49c181bdac680573bea8bdb25 +) + +vcpkg_extract_source_archive(${SUITESPARSEWIN}) + +#extract suitesparse and copy into suitesparse folder in suitesparse-metis-for-windows package +vcpkg_extract_source_archive(${SUITESPARSE} ${SUITESPARSEWIN_PATH}) + +#extract metis and copy into metis folder in suitesparse-metis-for-windows package +vcpkg_extract_source_archive(${METIS}) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/${METIS_VER} DESTINATION ${METIS_PATH}) +vcpkg_apply_patches( + SOURCE_PATH ${METIS_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/metis.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SUITESPARSEWIN_PATH} + OPTIONS + OPTIONS_DEBUG +) +vcpkg_install_cmake() \ No newline at end of file -- cgit v1.2.3 From 48017d08947482e7341e4588fb93309c976b6026 Mon Sep 17 00:00:00 2001 From: mmazaherit Date: Sat, 3 Jun 2017 18:53:42 -0400 Subject: 0 --- ports/suitesparse/CONTROL | 6 ++---- ports/suitesparse/portfile.cmake | 46 +++++++++++++++++++++++++++++++--------- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/ports/suitesparse/CONTROL b/ports/suitesparse/CONTROL index 3b35dd915..e2340b457 100644 --- a/ports/suitesparse/CONTROL +++ b/ports/suitesparse/CONTROL @@ -1,6 +1,4 @@ Source: suitesparse -Version: 4.5.4 +Version: 4.5.5 #Build-Depends: metis -#Use the following line instead for optional features from OpenCV-contrib that require protobuf -#Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf -Description: computer vision library +Description: algebra library diff --git a/ports/suitesparse/portfile.cmake b/ports/suitesparse/portfile.cmake index 1aabcb79e..38ff80eb1 100644 --- a/ports/suitesparse/portfile.cmake +++ b/ports/suitesparse/portfile.cmake @@ -1,10 +1,22 @@ +# 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) -set(SUITESPARSE_VER SuiteSparse-4.5.4) +set(SUITESPARSE_VER SuiteSparse-4.5.5) #if you change the version, becarefull of changing the SHA512 checksum accordingly set(METIS_VER metis-5.1.0) -set(SUITESPARSEWIN_PATH ${CURRENT_BUILDTREES_DIR}/src/suitesparse-metis-for-windows-1.3.1) -set(SUITESPARSE_PATH ${SUITESPARSEWIN_PATH}/Suitesparse) -set(METIS_PATH ${SUITESPARSEWIN_PATH}/metis) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/suitesparse-metis-for-windows-1.3.1) +set(SUITESPARSE_PATH ${SOURCE_PATH}/Suitesparse) +set(METIS_PATH ${SOURCE_PATH}/metis) @@ -16,7 +28,7 @@ SHA512 f8b9377420432f1c0a05bf884fe9e72f1f4eaf7e05663c66a383b5d8ddbd4fbfaa7d43372 vcpkg_download_distfile(SUITESPARSE URLS "http://faculty.cse.tamu.edu/davis/SuiteSparse/${SUITESPARSE_VER}.tar.gz" FILENAME "${SUITESPARSE_VER}.tar.gz" - SHA512 43d791065a69b8842acc3490fc8e2c24d32217864228cfc5106ece581f8867eb84cf9d7c03e01307366cb285c98dee37de13f8bbaf30466feeb56afed9002b9f + SHA512 4337c683027efca6c0800815587409db14db7d70df673451e307eb3ece5538815d06d90f3a831fa45071372f70b6f37eaa68fe951f69dbb52a5bfd84d2dc4913 ) vcpkg_download_distfile(METIS URLS "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/${METIS_VER}.tar.gz" @@ -27,19 +39,33 @@ vcpkg_download_distfile(METIS vcpkg_extract_source_archive(${SUITESPARSEWIN}) #extract suitesparse and copy into suitesparse folder in suitesparse-metis-for-windows package -vcpkg_extract_source_archive(${SUITESPARSE} ${SUITESPARSEWIN_PATH}) +vcpkg_extract_source_archive(${SUITESPARSE} ${SOURCE_PATH}) #extract metis and copy into metis folder in suitesparse-metis-for-windows package vcpkg_extract_source_archive(${METIS}) file(COPY ${CURRENT_BUILDTREES_DIR}/src/${METIS_VER} DESTINATION ${METIS_PATH}) + vcpkg_apply_patches( SOURCE_PATH ${METIS_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/metis.patch" ) vcpkg_configure_cmake( - SOURCE_PATH ${SUITESPARSEWIN_PATH} - OPTIONS - OPTIONS_DEBUG + SOURCE_PATH ${SOURCE_PATH} + #PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DBUILD_METIS=ON + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 + ) -vcpkg_install_cmake() \ No newline at end of file +vcpkg_build_cmake() + +# Handle copyright +file(COPY ${SUITESPARSE_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 ${METIS_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/suitesparse/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/suitesparse/copyright_metis) + + +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From df56717129efc85c4984a3d1dbfd0aaf341e86eb Mon Sep 17 00:00:00 2001 From: mmazaherit Date: Sun, 4 Jun 2017 16:45:01 -0400 Subject: Tested, OK --- ports/suitesparse/CONTROL | 2 +- ports/suitesparse/fix-install-suitesparse.patch | 19 ++++++++++++ ports/suitesparse/portfile.cmake | 39 ++++++++++++++++--------- 3 files changed, 45 insertions(+), 15 deletions(-) create mode 100644 ports/suitesparse/fix-install-suitesparse.patch diff --git a/ports/suitesparse/CONTROL b/ports/suitesparse/CONTROL index e2340b457..237112257 100644 --- a/ports/suitesparse/CONTROL +++ b/ports/suitesparse/CONTROL @@ -1,4 +1,4 @@ Source: suitesparse Version: 4.5.5 -#Build-Depends: metis +Build-Depends: metis, clapack Description: algebra library diff --git a/ports/suitesparse/fix-install-suitesparse.patch b/ports/suitesparse/fix-install-suitesparse.patch new file mode 100644 index 000000000..ca8cbbd97 --- /dev/null +++ b/ports/suitesparse/fix-install-suitesparse.patch @@ -0,0 +1,19 @@ +diff --git "a/CMakeLists.txt" "b/CMakeLists.txt" +index 679df4e..0a01d47 100644 +--- "a/CMakeLists.txt" ++++ "b/CMakeLists.txt" +@@ -106,10 +106,10 @@ macro(install_suitesparse_project targetName headersList) + set_target_properties(${targetName} PROPERTIES PUBLIC_HEADER "${headersList}") + install(TARGETS ${targetName} + EXPORT SuiteSparse +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib${LIB_POSTFIX} +- ARCHIVE DESTINATION lib${LIB_POSTFIX} +- PUBLIC_HEADER DESTINATION include/suitesparse ++ RUNTIME DESTINATION ${suitesparse_PKG_DIR}/$<$:Debug/>bin ++ LIBRARY DESTINATION ${suitesparse_PKG_DIR}/$<$:Debug/>lib ++ ARCHIVE DESTINATION ${suitesparse_PKG_DIR}/$<$:Debug/>lib ++ PUBLIC_HEADER DESTINATION ${suitesparse_PKG_DIR}/include/suitesparse + ) + endmacro() + diff --git a/ports/suitesparse/portfile.cmake b/ports/suitesparse/portfile.cmake index 38ff80eb1..0e5e9ad4b 100644 --- a/ports/suitesparse/portfile.cmake +++ b/ports/suitesparse/portfile.cmake @@ -14,22 +14,23 @@ include(vcpkg_common_functions) set(SUITESPARSE_VER SuiteSparse-4.5.5) #if you change the version, becarefull of changing the SHA512 checksum accordingly set(METIS_VER metis-5.1.0) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/suitesparse-metis-for-windows-1.3.1) -set(SUITESPARSE_PATH ${SOURCE_PATH}/Suitesparse) -set(METIS_PATH ${SOURCE_PATH}/metis) - - +set(SUITESPARSEWIN_PATH ${CURRENT_BUILDTREES_DIR}/src/suitesparse-metis-for-windows-1.3.1) +set(SUITESPARSE_PATH ${SUITESPARSEWIN_PATH}/Suitesparse) +set(METIS_PATH ${SUITESPARSEWIN_PATH}/metis) +#CMake scripts for painless usage of SuiteSparse+METIS from Visual Studio and the rest of Windows/Linux/OSX IDEs supported by CMake vcpkg_download_distfile(SUITESPARSEWIN URLS "https://github.com/jlblancoc/suitesparse-metis-for-windows/archive/v1.3.1.zip" FILENAME "suitesparse-metis-for-windows-1.3.1.zip" SHA512 f8b9377420432f1c0a05bf884fe9e72f1f4eaf7e05663c66a383b5d8ddbd4fbfaa7d433727b4dc3e66b41dbb96b1327d380b68a51a424276465512666e63393d ) +#suitesparse libary vcpkg_download_distfile(SUITESPARSE URLS "http://faculty.cse.tamu.edu/davis/SuiteSparse/${SUITESPARSE_VER}.tar.gz" FILENAME "${SUITESPARSE_VER}.tar.gz" SHA512 4337c683027efca6c0800815587409db14db7d70df673451e307eb3ece5538815d06d90f3a831fa45071372f70b6f37eaa68fe951f69dbb52a5bfd84d2dc4913 ) +#Metis library vcpkg_download_distfile(METIS URLS "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/${METIS_VER}.tar.gz" FILENAME "${METIS_VER}.tar.gz" @@ -39,29 +40,39 @@ vcpkg_download_distfile(METIS vcpkg_extract_source_archive(${SUITESPARSEWIN}) #extract suitesparse and copy into suitesparse folder in suitesparse-metis-for-windows package -vcpkg_extract_source_archive(${SUITESPARSE} ${SOURCE_PATH}) +vcpkg_extract_source_archive(${SUITESPARSE} ${SUITESPARSEWIN_PATH}) #extract metis and copy into metis folder in suitesparse-metis-for-windows package vcpkg_extract_source_archive(${METIS}) file(COPY ${CURRENT_BUILDTREES_DIR}/src/${METIS_VER} DESTINATION ${METIS_PATH}) + vcpkg_apply_patches( SOURCE_PATH ${METIS_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/metis.patch" ) +vcpkg_apply_patches( + SOURCE_PATH ${SUITESPARSEWIN_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-suitesparse.patch" +) + vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - #PREFER_NINJA # Disable this option if project cannot be built with Ninja + SOURCE_PATH ${SUITESPARSEWIN_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS - -DBUILD_METIS=ON - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 - + -DBUILD_METIS=ON + -DSUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS=ON + -DSUITESPARSE_CUSTOM_BLAS_LIB=${VCPKG_ROOT_DIR}/packages/openblas_${TARGET_TRIPLET}/lib/openblas.lib + -DSUITESPARSE_CUSTOM_LAPACK_LIB=${VCPKG_ROOT_DIR}/packages/clapack_${TARGET_TRIPLET}/lib/lapack.lib + -Dsuitesparse_PKG_DIR=${CURRENT_PACKAGES_DIR} + #OPTIONS_RELEASE + #OPTIONS_DEBUG ) -vcpkg_build_cmake() +vcpkg_install_cmake() + -# Handle copyright +# Handle copyright of suitesparse and metis file(COPY ${SUITESPARSE_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 ${METIS_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse) -- cgit v1.2.3 From 3f2f920a9684822f7bc5b46260300dcc68fa25d5 Mon Sep 17 00:00:00 2001 From: Bagong Date: Mon, 5 Jun 2017 11:34:31 +0200 Subject: Add private header paths in cmake config files via patch --- ports/qt5/CONTROL | 2 +- ports/qt5/add-private-header-paths.patch | 801 +++++++++++++++++++++++++++++++ ports/qt5/portfile.cmake | 4 + 3 files changed, 806 insertions(+), 1 deletion(-) create mode 100644 ports/qt5/add-private-header-paths.patch diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index 8d95c691e..26b850785 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 -Version: 5.8-2 +Version: 5.8-3 Description: Qt5 application framework main components. Webengine, examples and tests not included. Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre, harfbuzz, sqlite3, libpq, double-conversion diff --git a/ports/qt5/add-private-header-paths.patch b/ports/qt5/add-private-header-paths.patch new file mode 100644 index 000000000..c6e233710 --- /dev/null +++ b/ports/qt5/add-private-header-paths.patch @@ -0,0 +1,801 @@ +diff --git a/Qt53DCore/Qt53DCoreConfig.cmake b/Qt53DCore/Qt53DCoreConfig.cmake +index 80fc091..4fbaf5e 100644 +--- a/Qt53DCore/Qt53DCoreConfig.cmake ++++ b/Qt53DCore/Qt53DCoreConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::3DCore) + + set(_Qt53DCore_OWN_INCLUDE_DIRS "${_qt53DCore_install_prefix}/include/" "${_qt53DCore_install_prefix}/include/Qt3DCore") +- set(Qt53DCore_PRIVATE_INCLUDE_DIRS "") ++ set(Qt53DCore_PRIVATE_INCLUDE_DIRS ++ "${_qt53DCore_install_prefix}/include/Qt3DCore/5.8.0" ++ "${_qt53DCore_install_prefix}/include/Qt3DCore/5.8.0/Qt3DCore" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt53DCore_OWN_INCLUDE_DIRS}) +diff --git a/Qt53DExtras/Qt53DExtrasConfig.cmake b/Qt53DExtras/Qt53DExtrasConfig.cmake +index 61de455..5f00da8 100644 +--- a/Qt53DExtras/Qt53DExtrasConfig.cmake ++++ b/Qt53DExtras/Qt53DExtrasConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::3DExtras) + + set(_Qt53DExtras_OWN_INCLUDE_DIRS "${_qt53DExtras_install_prefix}/include/" "${_qt53DExtras_install_prefix}/include/Qt3DExtras") +- set(Qt53DExtras_PRIVATE_INCLUDE_DIRS "") ++ set(Qt53DExtras_PRIVATE_INCLUDE_DIRS ++ "${_qt53DExtras_install_prefix}/include/Qt3DExtras/5.8.0" ++ "${_qt53DExtras_install_prefix}/include/Qt3DExtras/5.8.0/Qt3DExtras" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt53DExtras_OWN_INCLUDE_DIRS}) +diff --git a/Qt53DInput/Qt53DInputConfig.cmake b/Qt53DInput/Qt53DInputConfig.cmake +index 1526967..089441e 100644 +--- a/Qt53DInput/Qt53DInputConfig.cmake ++++ b/Qt53DInput/Qt53DInputConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::3DInput) + + set(_Qt53DInput_OWN_INCLUDE_DIRS "${_qt53DInput_install_prefix}/include/" "${_qt53DInput_install_prefix}/include/Qt3DInput") +- set(Qt53DInput_PRIVATE_INCLUDE_DIRS "") ++ set(Qt53DInput_PRIVATE_INCLUDE_DIRS ++ "${_qt53DInput_install_prefix}/include/Qt3DInput/5.8.0" ++ "${_qt53DInput_install_prefix}/include/Qt3DInput/5.8.0/Qt3DInput" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt53DInput_OWN_INCLUDE_DIRS}) +diff --git a/Qt53DLogic/Qt53DLogicConfig.cmake b/Qt53DLogic/Qt53DLogicConfig.cmake +index 336f0dc..963be42 100644 +--- a/Qt53DLogic/Qt53DLogicConfig.cmake ++++ b/Qt53DLogic/Qt53DLogicConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::3DLogic) + + set(_Qt53DLogic_OWN_INCLUDE_DIRS "${_qt53DLogic_install_prefix}/include/" "${_qt53DLogic_install_prefix}/include/Qt3DLogic") +- set(Qt53DLogic_PRIVATE_INCLUDE_DIRS "") ++ set(Qt53DLogic_PRIVATE_INCLUDE_DIRS ++ "${_qt53DLogic_install_prefix}/include/Qt3DLogic/5.8.0" ++ "${_qt53DLogic_install_prefix}/include/Qt3DLogic/5.8.0/Qt3DLogic" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt53DLogic_OWN_INCLUDE_DIRS}) +diff --git a/Qt53DQuick/Qt53DQuickConfig.cmake b/Qt53DQuick/Qt53DQuickConfig.cmake +index cf510c9..0277c0c 100644 +--- a/Qt53DQuick/Qt53DQuickConfig.cmake ++++ b/Qt53DQuick/Qt53DQuickConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::3DQuick) + + set(_Qt53DQuick_OWN_INCLUDE_DIRS "${_qt53DQuick_install_prefix}/include/" "${_qt53DQuick_install_prefix}/include/Qt3DQuick") +- set(Qt53DQuick_PRIVATE_INCLUDE_DIRS "") ++ set(Qt53DQuick_PRIVATE_INCLUDE_DIRS ++ "${_qt53DQuick_install_prefix}/include/Qt3DQuick/5.8.0" ++ "${_qt53DQuick_install_prefix}/include/Qt3DQuick/5.8.0/Qt3DQuick" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt53DQuick_OWN_INCLUDE_DIRS}) +diff --git a/Qt53DQuickInput/Qt53DQuickInputConfig.cmake b/Qt53DQuickInput/Qt53DQuickInputConfig.cmake +index 06fe217..f935824 100644 +--- a/Qt53DQuickInput/Qt53DQuickInputConfig.cmake ++++ b/Qt53DQuickInput/Qt53DQuickInputConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::3DQuickInput) + + set(_Qt53DQuickInput_OWN_INCLUDE_DIRS "${_qt53DQuickInput_install_prefix}/include/" "${_qt53DQuickInput_install_prefix}/include/Qt3DQuickInput") +- set(Qt53DQuickInput_PRIVATE_INCLUDE_DIRS "") ++ set(Qt53DQuickInput_PRIVATE_INCLUDE_DIRS ++ "${_qt53DQuickInput_install_prefix}/include/Qt3DQuickInput/5.8.0" ++ "${_qt53DQuickInput_install_prefix}/include/Qt3DQuickInput/5.8.0/Qt3DQuickInput" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt53DQuickInput_OWN_INCLUDE_DIRS}) +diff --git a/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake b/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake +index dd5472b..ef728fd 100644 +--- a/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake ++++ b/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::3DQuickRender) + + set(_Qt53DQuickRender_OWN_INCLUDE_DIRS "${_qt53DQuickRender_install_prefix}/include/" "${_qt53DQuickRender_install_prefix}/include/Qt3DQuickRender") +- set(Qt53DQuickRender_PRIVATE_INCLUDE_DIRS "") ++ set(Qt53DQuickRender_PRIVATE_INCLUDE_DIRS ++ "${_qt53DQuickRender_install_prefix}/include/Qt3DQuickRender/5.8.0" ++ "${_qt53DQuickRender_install_prefix}/include/Qt3DQuickRender/5.8.0/Qt3DQuickRender" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt53DQuickRender_OWN_INCLUDE_DIRS}) +diff --git a/Qt53DRender/Qt53DRenderConfig.cmake b/Qt53DRender/Qt53DRenderConfig.cmake +index 70eff4b..271463b 100644 +--- a/Qt53DRender/Qt53DRenderConfig.cmake ++++ b/Qt53DRender/Qt53DRenderConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::3DRender) + + set(_Qt53DRender_OWN_INCLUDE_DIRS "${_qt53DRender_install_prefix}/include/" "${_qt53DRender_install_prefix}/include/Qt3DRender") +- set(Qt53DRender_PRIVATE_INCLUDE_DIRS "") ++ set(Qt53DRender_PRIVATE_INCLUDE_DIRS ++ "${_qt53DRender_install_prefix}/include/Qt3DRender/5.8.0" ++ "${_qt53DRender_install_prefix}/include/Qt3DRender/5.8.0/Qt3DRender" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt53DRender_OWN_INCLUDE_DIRS}) +diff --git a/Qt5AxBase/Qt5AxBaseConfig.cmake b/Qt5AxBase/Qt5AxBaseConfig.cmake +index 48966d5..63afee8 100644 +--- a/Qt5AxBase/Qt5AxBaseConfig.cmake ++++ b/Qt5AxBase/Qt5AxBaseConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::AxBase) + + set(_Qt5AxBase_OWN_INCLUDE_DIRS "${_qt5AxBase_install_prefix}/include/" "${_qt5AxBase_install_prefix}/include/ActiveQt") +- set(Qt5AxBase_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5AxBase_PRIVATE_INCLUDE_DIRS ++ "${_qt5AxBase_install_prefix}/include/ActiveQt/5.8.0" ++ "${_qt5AxBase_install_prefix}/include/ActiveQt/5.8.0/ActiveQt" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5AxBase_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Bluetooth/Qt5BluetoothConfig.cmake b/Qt5Bluetooth/Qt5BluetoothConfig.cmake +index 9d2f7c4..1223caf 100644 +--- a/Qt5Bluetooth/Qt5BluetoothConfig.cmake ++++ b/Qt5Bluetooth/Qt5BluetoothConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Bluetooth) + + set(_Qt5Bluetooth_OWN_INCLUDE_DIRS "${_qt5Bluetooth_install_prefix}/include/" "${_qt5Bluetooth_install_prefix}/include/QtBluetooth") +- set(Qt5Bluetooth_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Bluetooth_PRIVATE_INCLUDE_DIRS ++ "${_qt5Bluetooth_install_prefix}/include/QtBluetooth/5.8.0" ++ "${_qt5Bluetooth_install_prefix}/include/QtBluetooth/5.8.0/QtBluetooth" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Bluetooth_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Charts/Qt5ChartsConfig.cmake b/Qt5Charts/Qt5ChartsConfig.cmake +index fef4b13..52e458d 100644 +--- a/Qt5Charts/Qt5ChartsConfig.cmake ++++ b/Qt5Charts/Qt5ChartsConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Charts) + + set(_Qt5Charts_OWN_INCLUDE_DIRS "${_qt5Charts_install_prefix}/include/" "${_qt5Charts_install_prefix}/include/QtCharts") +- set(Qt5Charts_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Charts_PRIVATE_INCLUDE_DIRS ++ "${_qt5Charts_install_prefix}/include/QtCharts/5.8.0" ++ "${_qt5Charts_install_prefix}/include/QtCharts/5.8.0/QtCharts" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Charts_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Core/Qt5CoreConfig.cmake b/Qt5Core/Qt5CoreConfig.cmake +index 4232dc7..c35d103 100644 +--- a/Qt5Core/Qt5CoreConfig.cmake ++++ b/Qt5Core/Qt5CoreConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Core) + + set(_Qt5Core_OWN_INCLUDE_DIRS "${_qt5Core_install_prefix}/include/" "${_qt5Core_install_prefix}/include/QtCore") +- set(Qt5Core_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Core_PRIVATE_INCLUDE_DIRS ++ "${_qt5Core_install_prefix}/include/QtCore/5.8.0" ++ "${_qt5Core_install_prefix}/include/QtCore/5.8.0/QtCore" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Core_OWN_INCLUDE_DIRS}) +diff --git a/Qt5DBus/Qt5DBusConfig.cmake b/Qt5DBus/Qt5DBusConfig.cmake +index d5e3ac6..472b928 100644 +--- a/Qt5DBus/Qt5DBusConfig.cmake ++++ b/Qt5DBus/Qt5DBusConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::DBus) + + set(_Qt5DBus_OWN_INCLUDE_DIRS "${_qt5DBus_install_prefix}/include/" "${_qt5DBus_install_prefix}/include/QtDBus") +- set(Qt5DBus_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5DBus_PRIVATE_INCLUDE_DIRS ++ "${_qt5DBus_install_prefix}/include/QtDBus/5.8.0" ++ "${_qt5DBus_install_prefix}/include/QtDBus/5.8.0/QtDBus" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5DBus_OWN_INCLUDE_DIRS}) +diff --git a/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake b/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake +index b518994..91559aa 100644 +--- a/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake ++++ b/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::DataVisualization) + + set(_Qt5DataVisualization_OWN_INCLUDE_DIRS "${_qt5DataVisualization_install_prefix}/include/" "${_qt5DataVisualization_install_prefix}/include/QtDataVisualization") +- set(Qt5DataVisualization_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5DataVisualization_PRIVATE_INCLUDE_DIRS ++ "${_qt5DataVisualization_install_prefix}/include/QtDataVisualization/5.8.0" ++ "${_qt5DataVisualization_install_prefix}/include/QtDataVisualization/5.8.0/QtDataVisualization" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5DataVisualization_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Designer/Qt5DesignerConfig.cmake b/Qt5Designer/Qt5DesignerConfig.cmake +index 69ea6dc..7b76032 100644 +--- a/Qt5Designer/Qt5DesignerConfig.cmake ++++ b/Qt5Designer/Qt5DesignerConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Designer) + + set(_Qt5Designer_OWN_INCLUDE_DIRS "${_qt5Designer_install_prefix}/include/" "${_qt5Designer_install_prefix}/include/QtDesigner") +- set(Qt5Designer_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Designer_PRIVATE_INCLUDE_DIRS ++ "${_qt5Designer_install_prefix}/include/QtDesigner/5.8.0" ++ "${_qt5Designer_install_prefix}/include/QtDesigner/5.8.0/QtDesigner" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Designer_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Gamepad/Qt5GamepadConfig.cmake b/Qt5Gamepad/Qt5GamepadConfig.cmake +index 66db87f..987ae8f 100644 +--- a/Qt5Gamepad/Qt5GamepadConfig.cmake ++++ b/Qt5Gamepad/Qt5GamepadConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Gamepad) + + set(_Qt5Gamepad_OWN_INCLUDE_DIRS "${_qt5Gamepad_install_prefix}/include/" "${_qt5Gamepad_install_prefix}/include/QtGamepad") +- set(Qt5Gamepad_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Gamepad_PRIVATE_INCLUDE_DIRS ++ "${_qt5Gamepad_install_prefix}/include/QtGamepad/5.8.0" ++ "${_qt5Gamepad_install_prefix}/include/QtGamepad/5.8.0/QtGamepad" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Gamepad_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Gui/Qt5GuiConfig.cmake b/Qt5Gui/Qt5GuiConfig.cmake +index 4718ba9..56888c1 100644 +--- a/Qt5Gui/Qt5GuiConfig.cmake ++++ b/Qt5Gui/Qt5GuiConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Gui) + + set(_Qt5Gui_OWN_INCLUDE_DIRS "${_qt5Gui_install_prefix}/include/" "${_qt5Gui_install_prefix}/include/QtGui") +- set(Qt5Gui_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Gui_PRIVATE_INCLUDE_DIRS ++ "${_qt5Gui_install_prefix}/include/QtGui/5.8.0" ++ "${_qt5Gui_install_prefix}/include/QtGui/5.8.0/QtGui" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Gui_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Help/Qt5HelpConfig.cmake b/Qt5Help/Qt5HelpConfig.cmake +index e84511c..0da7c20 100644 +--- a/Qt5Help/Qt5HelpConfig.cmake ++++ b/Qt5Help/Qt5HelpConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Help) + + set(_Qt5Help_OWN_INCLUDE_DIRS "${_qt5Help_install_prefix}/include/" "${_qt5Help_install_prefix}/include/QtHelp") +- set(Qt5Help_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Help_PRIVATE_INCLUDE_DIRS ++ "${_qt5Help_install_prefix}/include/QtHelp/5.8.0" ++ "${_qt5Help_install_prefix}/include/QtHelp/5.8.0/QtHelp" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Help_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Location/Qt5LocationConfig.cmake b/Qt5Location/Qt5LocationConfig.cmake +index a8bdf0a..f5348c2 100644 +--- a/Qt5Location/Qt5LocationConfig.cmake ++++ b/Qt5Location/Qt5LocationConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Location) + + set(_Qt5Location_OWN_INCLUDE_DIRS "${_qt5Location_install_prefix}/include/" "${_qt5Location_install_prefix}/include/QtLocation") +- set(Qt5Location_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Location_PRIVATE_INCLUDE_DIRS ++ "${_qt5Location_install_prefix}/include/QtLocation/5.8.0" ++ "${_qt5Location_install_prefix}/include/QtLocation/5.8.0/QtLocation" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Location_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Multimedia/Qt5MultimediaConfig.cmake b/Qt5Multimedia/Qt5MultimediaConfig.cmake +index 69f353f..67fa08b 100644 +--- a/Qt5Multimedia/Qt5MultimediaConfig.cmake ++++ b/Qt5Multimedia/Qt5MultimediaConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Multimedia) + + set(_Qt5Multimedia_OWN_INCLUDE_DIRS "${_qt5Multimedia_install_prefix}/include/" "${_qt5Multimedia_install_prefix}/include/QtMultimedia") +- set(Qt5Multimedia_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Multimedia_PRIVATE_INCLUDE_DIRS ++ "${_qt5Multimedia_install_prefix}/include/QtMultimedia/5.8.0" ++ "${_qt5Multimedia_install_prefix}/include/QtMultimedia/5.8.0/QtMultimedia" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Multimedia_OWN_INCLUDE_DIRS}) +diff --git a/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake b/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake +index 88162f8..1dcf69e 100644 +--- a/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake ++++ b/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::MultimediaWidgets) + + set(_Qt5MultimediaWidgets_OWN_INCLUDE_DIRS "${_qt5MultimediaWidgets_install_prefix}/include/" "${_qt5MultimediaWidgets_install_prefix}/include/QtMultimediaWidgets") +- set(Qt5MultimediaWidgets_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5MultimediaWidgets_PRIVATE_INCLUDE_DIRS ++ "${_qt5MultimediaWidgets_install_prefix}/include/QtMultimediaWidgets/5.8.0" ++ "${_qt5MultimediaWidgets_install_prefix}/include/QtMultimediaWidgets/5.8.0/QtMultimediaWidgets" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5MultimediaWidgets_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Network/Qt5NetworkConfig.cmake b/Qt5Network/Qt5NetworkConfig.cmake +index 1778278..6a5d7f3 100644 +--- a/Qt5Network/Qt5NetworkConfig.cmake ++++ b/Qt5Network/Qt5NetworkConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Network) + + set(_Qt5Network_OWN_INCLUDE_DIRS "${_qt5Network_install_prefix}/include/" "${_qt5Network_install_prefix}/include/QtNetwork") +- set(Qt5Network_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Network_PRIVATE_INCLUDE_DIRS ++ "${_qt5Network_install_prefix}/include/QtNetwork/5.8.0" ++ "${_qt5Network_install_prefix}/include/QtNetwork/5.8.0/QtNetwork" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Network_OWN_INCLUDE_DIRS}) +diff --git a/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake b/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake +index 50f56e0..821080c 100644 +--- a/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake ++++ b/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::NetworkAuth) + + set(_Qt5NetworkAuth_OWN_INCLUDE_DIRS "${_qt5NetworkAuth_install_prefix}/include/" "${_qt5NetworkAuth_install_prefix}/include/QtNetworkAuth") +- set(Qt5NetworkAuth_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5NetworkAuth_PRIVATE_INCLUDE_DIRS ++ "${_qt5NetworkAuth_install_prefix}/include/QtNetworkAuth/5.8.0" ++ "${_qt5NetworkAuth_install_prefix}/include/QtNetworkAuth/5.8.0/QtNetworkAuth" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5NetworkAuth_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Nfc/Qt5NfcConfig.cmake b/Qt5Nfc/Qt5NfcConfig.cmake +index 83ffddd..d8a5ba9 100644 +--- a/Qt5Nfc/Qt5NfcConfig.cmake ++++ b/Qt5Nfc/Qt5NfcConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Nfc) + + set(_Qt5Nfc_OWN_INCLUDE_DIRS "${_qt5Nfc_install_prefix}/include/" "${_qt5Nfc_install_prefix}/include/QtNfc") +- set(Qt5Nfc_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Nfc_PRIVATE_INCLUDE_DIRS ++ "${_qt5Nfc_install_prefix}/include/QtNfc/5.8.0" ++ "${_qt5Nfc_install_prefix}/include/QtNfc/5.8.0/QtNfc" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Nfc_OWN_INCLUDE_DIRS}) +diff --git a/Qt5OpenGL/Qt5OpenGLConfig.cmake b/Qt5OpenGL/Qt5OpenGLConfig.cmake +index 6c874ac..3ac408a 100644 +--- a/Qt5OpenGL/Qt5OpenGLConfig.cmake ++++ b/Qt5OpenGL/Qt5OpenGLConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::OpenGL) + + set(_Qt5OpenGL_OWN_INCLUDE_DIRS "${_qt5OpenGL_install_prefix}/include/" "${_qt5OpenGL_install_prefix}/include/QtOpenGL") +- set(Qt5OpenGL_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5OpenGL_PRIVATE_INCLUDE_DIRS ++ "${_qt5OpenGL_install_prefix}/include/QtOpenGL/5.8.0" ++ "${_qt5OpenGL_install_prefix}/include/QtOpenGL/5.8.0/QtOpenGL" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5OpenGL_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Positioning/Qt5PositioningConfig.cmake b/Qt5Positioning/Qt5PositioningConfig.cmake +index 1aa3128..a6a2f24 100644 +--- a/Qt5Positioning/Qt5PositioningConfig.cmake ++++ b/Qt5Positioning/Qt5PositioningConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Positioning) + + set(_Qt5Positioning_OWN_INCLUDE_DIRS "${_qt5Positioning_install_prefix}/include/" "${_qt5Positioning_install_prefix}/include/QtPositioning") +- set(Qt5Positioning_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Positioning_PRIVATE_INCLUDE_DIRS ++ "${_qt5Positioning_install_prefix}/include/QtPositioning/5.8.0" ++ "${_qt5Positioning_install_prefix}/include/QtPositioning/5.8.0/QtPositioning" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Positioning_OWN_INCLUDE_DIRS}) +diff --git a/Qt5PrintSupport/Qt5PrintSupportConfig.cmake b/Qt5PrintSupport/Qt5PrintSupportConfig.cmake +index d7c6765..9a24e99 100644 +--- a/Qt5PrintSupport/Qt5PrintSupportConfig.cmake ++++ b/Qt5PrintSupport/Qt5PrintSupportConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::PrintSupport) + + set(_Qt5PrintSupport_OWN_INCLUDE_DIRS "${_qt5PrintSupport_install_prefix}/include/" "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport") +- set(Qt5PrintSupport_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5PrintSupport_PRIVATE_INCLUDE_DIRS ++ "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport/5.8.0" ++ "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport/5.8.0/QtPrintSupport" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5PrintSupport_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Purchasing/Qt5PurchasingConfig.cmake b/Qt5Purchasing/Qt5PurchasingConfig.cmake +index b0cf03d..d0b527d 100644 +--- a/Qt5Purchasing/Qt5PurchasingConfig.cmake ++++ b/Qt5Purchasing/Qt5PurchasingConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Purchasing) + + set(_Qt5Purchasing_OWN_INCLUDE_DIRS "${_qt5Purchasing_install_prefix}/include/" "${_qt5Purchasing_install_prefix}/include/QtPurchasing") +- set(Qt5Purchasing_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Purchasing_PRIVATE_INCLUDE_DIRS ++ "${_qt5Purchasing_install_prefix}/include/QtPurchasing/5.8.0" ++ "${_qt5Purchasing_install_prefix}/include/QtPurchasing/5.8.0/QtPurchasing" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Purchasing_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Qml/Qt5QmlConfig.cmake b/Qt5Qml/Qt5QmlConfig.cmake +index 966e3ff..c59d5d1 100644 +--- a/Qt5Qml/Qt5QmlConfig.cmake ++++ b/Qt5Qml/Qt5QmlConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Qml) + + set(_Qt5Qml_OWN_INCLUDE_DIRS "${_qt5Qml_install_prefix}/include/" "${_qt5Qml_install_prefix}/include/QtQml") +- set(Qt5Qml_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Qml_PRIVATE_INCLUDE_DIRS ++ "${_qt5Qml_install_prefix}/include/QtQml/5.8.0" ++ "${_qt5Qml_install_prefix}/include/QtQml/5.8.0/QtQml" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Qml_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Quick/Qt5QuickConfig.cmake b/Qt5Quick/Qt5QuickConfig.cmake +index e1e2d05..def9557 100644 +--- a/Qt5Quick/Qt5QuickConfig.cmake ++++ b/Qt5Quick/Qt5QuickConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Quick) + + set(_Qt5Quick_OWN_INCLUDE_DIRS "${_qt5Quick_install_prefix}/include/" "${_qt5Quick_install_prefix}/include/QtQuick") +- set(Qt5Quick_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Quick_PRIVATE_INCLUDE_DIRS ++ "${_qt5Quick_install_prefix}/include/QtQuick/5.8.0" ++ "${_qt5Quick_install_prefix}/include/QtQuick/5.8.0/QtQuick" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Quick_OWN_INCLUDE_DIRS}) +diff --git a/Qt5QuickControls2/Qt5QuickControls2Config.cmake b/Qt5QuickControls2/Qt5QuickControls2Config.cmake +index cf34ce5..6f0ec96 100644 +--- a/Qt5QuickControls2/Qt5QuickControls2Config.cmake ++++ b/Qt5QuickControls2/Qt5QuickControls2Config.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::QuickControls2) + + set(_Qt5QuickControls2_OWN_INCLUDE_DIRS "${_qt5QuickControls2_install_prefix}/include/" "${_qt5QuickControls2_install_prefix}/include/QtQuickControls2") +- set(Qt5QuickControls2_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5QuickControls2_PRIVATE_INCLUDE_DIRS ++ "${_qt5QuickControls2_install_prefix}/include/QtQuickControls2/5.8.0" ++ "${_qt5QuickControls2_install_prefix}/include/QtQuickControls2/5.8.0/QtQuickControls2" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5QuickControls2_OWN_INCLUDE_DIRS}) +diff --git a/Qt5QuickTest/Qt5QuickTestConfig.cmake b/Qt5QuickTest/Qt5QuickTestConfig.cmake +index 9b2b8b2..6e1ea1d 100644 +--- a/Qt5QuickTest/Qt5QuickTestConfig.cmake ++++ b/Qt5QuickTest/Qt5QuickTestConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::QuickTest) + + set(_Qt5QuickTest_OWN_INCLUDE_DIRS "${_qt5QuickTest_install_prefix}/include/" "${_qt5QuickTest_install_prefix}/include/QtQuickTest") +- set(Qt5QuickTest_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5QuickTest_PRIVATE_INCLUDE_DIRS ++ "${_qt5QuickTest_install_prefix}/include/QtQuickTest/5.8.0" ++ "${_qt5QuickTest_install_prefix}/include/QtQuickTest/5.8.0/QtQuickTest" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5QuickTest_OWN_INCLUDE_DIRS}) +diff --git a/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake b/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake +index b0b8988..559b2f0 100644 +--- a/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake ++++ b/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::QuickWidgets) + + set(_Qt5QuickWidgets_OWN_INCLUDE_DIRS "${_qt5QuickWidgets_install_prefix}/include/" "${_qt5QuickWidgets_install_prefix}/include/QtQuickWidgets") +- set(Qt5QuickWidgets_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5QuickWidgets_PRIVATE_INCLUDE_DIRS ++ "${_qt5QuickWidgets_install_prefix}/include/QtQuickWidgets/5.8.0" ++ "${_qt5QuickWidgets_install_prefix}/include/QtQuickWidgets/5.8.0/QtQuickWidgets" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5QuickWidgets_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Script/Qt5ScriptConfig.cmake b/Qt5Script/Qt5ScriptConfig.cmake +index da053f8..b2b34d6 100644 +--- a/Qt5Script/Qt5ScriptConfig.cmake ++++ b/Qt5Script/Qt5ScriptConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Script) + + set(_Qt5Script_OWN_INCLUDE_DIRS "${_qt5Script_install_prefix}/include/" "${_qt5Script_install_prefix}/include/QtScript") +- set(Qt5Script_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Script_PRIVATE_INCLUDE_DIRS ++ "${_qt5Script_install_prefix}/include/QtScript/5.8.0" ++ "${_qt5Script_install_prefix}/include/QtScript/5.8.0/QtScript" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Script_OWN_INCLUDE_DIRS}) +diff --git a/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake b/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake +index e4bf959..959ac50 100644 +--- a/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake ++++ b/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::ScriptTools) + + set(_Qt5ScriptTools_OWN_INCLUDE_DIRS "${_qt5ScriptTools_install_prefix}/include/" "${_qt5ScriptTools_install_prefix}/include/QtScriptTools") +- set(Qt5ScriptTools_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5ScriptTools_PRIVATE_INCLUDE_DIRS ++ "${_qt5ScriptTools_install_prefix}/include/QtScriptTools/5.8.0" ++ "${_qt5ScriptTools_install_prefix}/include/QtScriptTools/5.8.0/QtScriptTools" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5ScriptTools_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Scxml/Qt5ScxmlConfig.cmake b/Qt5Scxml/Qt5ScxmlConfig.cmake +index 90ac06b..e78c552 100644 +--- a/Qt5Scxml/Qt5ScxmlConfig.cmake ++++ b/Qt5Scxml/Qt5ScxmlConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Scxml) + + set(_Qt5Scxml_OWN_INCLUDE_DIRS "${_qt5Scxml_install_prefix}/include/" "${_qt5Scxml_install_prefix}/include/QtScxml") +- set(Qt5Scxml_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Scxml_PRIVATE_INCLUDE_DIRS ++ "${_qt5Scxml_install_prefix}/include/QtScxml/5.8.0" ++ "${_qt5Scxml_install_prefix}/include/QtScxml/5.8.0/QtScxml" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Scxml_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Sensors/Qt5SensorsConfig.cmake b/Qt5Sensors/Qt5SensorsConfig.cmake +index 9e53e4d..2096beb 100644 +--- a/Qt5Sensors/Qt5SensorsConfig.cmake ++++ b/Qt5Sensors/Qt5SensorsConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Sensors) + + set(_Qt5Sensors_OWN_INCLUDE_DIRS "${_qt5Sensors_install_prefix}/include/" "${_qt5Sensors_install_prefix}/include/QtSensors") +- set(Qt5Sensors_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Sensors_PRIVATE_INCLUDE_DIRS ++ "${_qt5Sensors_install_prefix}/include/QtSensors/5.8.0" ++ "${_qt5Sensors_install_prefix}/include/QtSensors/5.8.0/QtSensors" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Sensors_OWN_INCLUDE_DIRS}) +diff --git a/Qt5SerialBus/Qt5SerialBusConfig.cmake b/Qt5SerialBus/Qt5SerialBusConfig.cmake +index f2e4d69..8ba391c 100644 +--- a/Qt5SerialBus/Qt5SerialBusConfig.cmake ++++ b/Qt5SerialBus/Qt5SerialBusConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::SerialBus) + + set(_Qt5SerialBus_OWN_INCLUDE_DIRS "${_qt5SerialBus_install_prefix}/include/" "${_qt5SerialBus_install_prefix}/include/QtSerialBus") +- set(Qt5SerialBus_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5SerialBus_PRIVATE_INCLUDE_DIRS ++ "${_qt5SerialBus_install_prefix}/include/QtSerialBus/5.8.0" ++ "${_qt5SerialBus_install_prefix}/include/QtSerialBus/5.8.0/QtSerialBus" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5SerialBus_OWN_INCLUDE_DIRS}) +diff --git a/Qt5SerialPort/Qt5SerialPortConfig.cmake b/Qt5SerialPort/Qt5SerialPortConfig.cmake +index fa15de5..4ec1024 100644 +--- a/Qt5SerialPort/Qt5SerialPortConfig.cmake ++++ b/Qt5SerialPort/Qt5SerialPortConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::SerialPort) + + set(_Qt5SerialPort_OWN_INCLUDE_DIRS "${_qt5SerialPort_install_prefix}/include/" "${_qt5SerialPort_install_prefix}/include/QtSerialPort") +- set(Qt5SerialPort_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5SerialPort_PRIVATE_INCLUDE_DIRS ++ "${_qt5SerialPort_install_prefix}/include/QtSerialPort/5.8.0" ++ "${_qt5SerialPort_install_prefix}/include/QtSerialPort/5.8.0/QtSerialPort" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5SerialPort_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Sql/Qt5SqlConfig.cmake b/Qt5Sql/Qt5SqlConfig.cmake +index 0e5d50c..baf3f66 100644 +--- a/Qt5Sql/Qt5SqlConfig.cmake ++++ b/Qt5Sql/Qt5SqlConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Sql) + + set(_Qt5Sql_OWN_INCLUDE_DIRS "${_qt5Sql_install_prefix}/include/" "${_qt5Sql_install_prefix}/include/QtSql") +- set(Qt5Sql_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Sql_PRIVATE_INCLUDE_DIRS ++ "${_qt5Sql_install_prefix}/include/QtSql/5.8.0" ++ "${_qt5Sql_install_prefix}/include/QtSql/5.8.0/QtSql" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Sql_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Svg/Qt5SvgConfig.cmake b/Qt5Svg/Qt5SvgConfig.cmake +index 5d6ad04..b0d1aaa 100644 +--- a/Qt5Svg/Qt5SvgConfig.cmake ++++ b/Qt5Svg/Qt5SvgConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Svg) + + set(_Qt5Svg_OWN_INCLUDE_DIRS "${_qt5Svg_install_prefix}/include/" "${_qt5Svg_install_prefix}/include/QtSvg") +- set(Qt5Svg_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Svg_PRIVATE_INCLUDE_DIRS ++ "${_qt5Svg_install_prefix}/include/QtSvg/5.8.0" ++ "${_qt5Svg_install_prefix}/include/QtSvg/5.8.0/QtSvg" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Svg_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Test/Qt5TestConfig.cmake b/Qt5Test/Qt5TestConfig.cmake +index 8183efd..f15979f 100644 +--- a/Qt5Test/Qt5TestConfig.cmake ++++ b/Qt5Test/Qt5TestConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Test) + + set(_Qt5Test_OWN_INCLUDE_DIRS "${_qt5Test_install_prefix}/include/" "${_qt5Test_install_prefix}/include/QtTest") +- set(Qt5Test_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Test_PRIVATE_INCLUDE_DIRS ++ "${_qt5Test_install_prefix}/include/QtTest/5.8.0" ++ "${_qt5Test_install_prefix}/include/QtTest/5.8.0/QtTest" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Test_OWN_INCLUDE_DIRS}) +diff --git a/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake b/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake +index 2577e82..aa4bf39 100644 +--- a/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake ++++ b/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::TextToSpeech) + + set(_Qt5TextToSpeech_OWN_INCLUDE_DIRS "${_qt5TextToSpeech_install_prefix}/include/" "${_qt5TextToSpeech_install_prefix}/include/QtTextToSpeech") +- set(Qt5TextToSpeech_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5TextToSpeech_PRIVATE_INCLUDE_DIRS ++ "${_qt5TextToSpeech_install_prefix}/include/QtTextToSpeech/5.8.0" ++ "${_qt5TextToSpeech_install_prefix}/include/QtTextToSpeech/5.8.0/QtTextToSpeech" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5TextToSpeech_OWN_INCLUDE_DIRS}) +diff --git a/Qt5UiTools/Qt5UiToolsConfig.cmake b/Qt5UiTools/Qt5UiToolsConfig.cmake +index f217198..1bfa8b2 100644 +--- a/Qt5UiTools/Qt5UiToolsConfig.cmake ++++ b/Qt5UiTools/Qt5UiToolsConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::UiTools) + + set(_Qt5UiTools_OWN_INCLUDE_DIRS "${_qt5UiTools_install_prefix}/include/" "${_qt5UiTools_install_prefix}/include/QtUiTools") +- set(Qt5UiTools_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5UiTools_PRIVATE_INCLUDE_DIRS ++ "${_qt5UiTools_install_prefix}/include/QtUiTools/5.8.0" ++ "${_qt5UiTools_install_prefix}/include/QtUiTools/5.8.0/QtUiTools" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5UiTools_OWN_INCLUDE_DIRS}) +diff --git a/Qt5WebChannel/Qt5WebChannelConfig.cmake b/Qt5WebChannel/Qt5WebChannelConfig.cmake +index ce8949c..c056b9d 100644 +--- a/Qt5WebChannel/Qt5WebChannelConfig.cmake ++++ b/Qt5WebChannel/Qt5WebChannelConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::WebChannel) + + set(_Qt5WebChannel_OWN_INCLUDE_DIRS "${_qt5WebChannel_install_prefix}/include/" "${_qt5WebChannel_install_prefix}/include/QtWebChannel") +- set(Qt5WebChannel_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5WebChannel_PRIVATE_INCLUDE_DIRS ++ "${_qt5WebChannel_install_prefix}/include/QtWebChannel/5.8.0" ++ "${_qt5WebChannel_install_prefix}/include/QtWebChannel/5.8.0/QtWebChannel" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5WebChannel_OWN_INCLUDE_DIRS}) +diff --git a/Qt5WebSockets/Qt5WebSocketsConfig.cmake b/Qt5WebSockets/Qt5WebSocketsConfig.cmake +index c2609da..42e21b8 100644 +--- a/Qt5WebSockets/Qt5WebSocketsConfig.cmake ++++ b/Qt5WebSockets/Qt5WebSocketsConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::WebSockets) + + set(_Qt5WebSockets_OWN_INCLUDE_DIRS "${_qt5WebSockets_install_prefix}/include/" "${_qt5WebSockets_install_prefix}/include/QtWebSockets") +- set(Qt5WebSockets_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5WebSockets_PRIVATE_INCLUDE_DIRS ++ "${_qt5WebSockets_install_prefix}/include/QtWebSockets/5.8.0" ++ "${_qt5WebSockets_install_prefix}/include/QtWebSockets/5.8.0/QtWebSockets" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5WebSockets_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Widgets/Qt5WidgetsConfig.cmake b/Qt5Widgets/Qt5WidgetsConfig.cmake +index 44c7aed..658e29a 100644 +--- a/Qt5Widgets/Qt5WidgetsConfig.cmake ++++ b/Qt5Widgets/Qt5WidgetsConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Widgets) + + set(_Qt5Widgets_OWN_INCLUDE_DIRS "${_qt5Widgets_install_prefix}/include/" "${_qt5Widgets_install_prefix}/include/QtWidgets") +- set(Qt5Widgets_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Widgets_PRIVATE_INCLUDE_DIRS ++ "${_qt5Widgets_install_prefix}/include/QtWidgets/5.8.0" ++ "${_qt5Widgets_install_prefix}/include/QtWidgets/5.8.0/QtWidgets" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Widgets_OWN_INCLUDE_DIRS}) +diff --git a/Qt5WinExtras/Qt5WinExtrasConfig.cmake b/Qt5WinExtras/Qt5WinExtrasConfig.cmake +index c63cee3..f9ea776 100644 +--- a/Qt5WinExtras/Qt5WinExtrasConfig.cmake ++++ b/Qt5WinExtras/Qt5WinExtrasConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::WinExtras) + + set(_Qt5WinExtras_OWN_INCLUDE_DIRS "${_qt5WinExtras_install_prefix}/include/" "${_qt5WinExtras_install_prefix}/include/QtWinExtras") +- set(Qt5WinExtras_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5WinExtras_PRIVATE_INCLUDE_DIRS ++ "${_qt5WinExtras_install_prefix}/include/QtWinExtras/5.8.0" ++ "${_qt5WinExtras_install_prefix}/include/QtWinExtras/5.8.0/QtWinExtras" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5WinExtras_OWN_INCLUDE_DIRS}) +diff --git a/Qt5Xml/Qt5XmlConfig.cmake b/Qt5Xml/Qt5XmlConfig.cmake +index fee861c..31dc6f7 100644 +--- a/Qt5Xml/Qt5XmlConfig.cmake ++++ b/Qt5Xml/Qt5XmlConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::Xml) + + set(_Qt5Xml_OWN_INCLUDE_DIRS "${_qt5Xml_install_prefix}/include/" "${_qt5Xml_install_prefix}/include/QtXml") +- set(Qt5Xml_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5Xml_PRIVATE_INCLUDE_DIRS ++ "${_qt5Xml_install_prefix}/include/QtXml/5.8.0" ++ "${_qt5Xml_install_prefix}/include/QtXml/5.8.0/QtXml" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5Xml_OWN_INCLUDE_DIRS}) +diff --git a/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake b/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake +index 662a612..45cfe8b 100644 +--- a/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake ++++ b/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake +@@ -56,7 +56,10 @@ endmacro() + if (NOT TARGET Qt5::XmlPatterns) + + set(_Qt5XmlPatterns_OWN_INCLUDE_DIRS "${_qt5XmlPatterns_install_prefix}/include/" "${_qt5XmlPatterns_install_prefix}/include/QtXmlPatterns") +- set(Qt5XmlPatterns_PRIVATE_INCLUDE_DIRS "") ++ set(Qt5XmlPatterns_PRIVATE_INCLUDE_DIRS ++ "${_qt5XmlPatterns_install_prefix}/include/QtXmlPatterns/5.8.0" ++ "${_qt5XmlPatterns_install_prefix}/include/QtXmlPatterns/5.8.0/QtXmlPatterns" ++ ) + include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) + + foreach(_dir ${_Qt5XmlPatterns_OWN_INCLUDE_DIRS}) + diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake index ee871b155..89dd82a80 100644 --- a/ports/qt5/portfile.cmake +++ b/ports/qt5/portfile.cmake @@ -56,6 +56,10 @@ configure_qt( ) install_qt() +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/lib/cmake + PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-private-header-paths.patch" +) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From dff3a8908c2e37a3c8de5582f4f2187c16337f49 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 5 Jun 2017 16:58:06 -0700 Subject: [harfbuzz] Bump version for arm fix. Change restriction to cover architecture instead of platform. --- ports/harfbuzz/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 1544982e2..cff52498a 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.4.6 +Version: 1.4.6-1 Description: HarfBuzz OpenType text shaping engine -Build-Depends: freetype, glib [windows] +Build-Depends: freetype, glib [x86], glib [x64] -- cgit v1.2.3 From 566172b3b6831eb6468d20894ebd995db544e6af Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Mon, 5 Jun 2017 17:01:20 -0700 Subject: remove debug statements --- scripts/cmake/vcpkg_configure_cmake.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index cbbacae3f..07acfc8ea 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -111,19 +111,16 @@ function(vcpkg_configure_cmake) 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)) - message(STATUS "Variables for VCPKG_CXX_FLAGS_DEBUG and VCPKG_C_FLAGS_DEBUG are set correctly") 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)) - message(STATUS "Variables for VCPKG_CXX_FLAGS_RELEASE and VCPKG_C_FLAGS_RELEASE are set correctly") 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)) - message(STATUS "Variables for VCPKG_CXX_FLAGS and VCPKG_C_FLAGS are set correctly") else() message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS and VCPKG_C_FLAGS") endif() -- cgit v1.2.3 From 56b27d1d00b08af2cba16197cc7b5f5eed98bca0 Mon Sep 17 00:00:00 2001 From: mmazaherit Date: Mon, 5 Jun 2017 21:11:09 -0400 Subject: -use metis library in vcpkg -improved port script --- ports/suitesparse/CONTROL | 2 +- ports/suitesparse/fix-install-suitesparse.patch | 35 ++++++------ ports/suitesparse/metis.patch | 13 ----- ports/suitesparse/portfile.cmake | 71 ++++++++++++------------- 4 files changed, 51 insertions(+), 70 deletions(-) delete mode 100644 ports/suitesparse/metis.patch diff --git a/ports/suitesparse/CONTROL b/ports/suitesparse/CONTROL index 237112257..a40b4ff24 100644 --- a/ports/suitesparse/CONTROL +++ b/ports/suitesparse/CONTROL @@ -1,4 +1,4 @@ Source: suitesparse Version: 4.5.5 -Build-Depends: metis, clapack +Build-Depends:metis, clapack Description: algebra library diff --git a/ports/suitesparse/fix-install-suitesparse.patch b/ports/suitesparse/fix-install-suitesparse.patch index ca8cbbd97..4da6e73f4 100644 --- a/ports/suitesparse/fix-install-suitesparse.patch +++ b/ports/suitesparse/fix-install-suitesparse.patch @@ -1,19 +1,16 @@ -diff --git "a/CMakeLists.txt" "b/CMakeLists.txt" -index 679df4e..0a01d47 100644 ---- "a/CMakeLists.txt" -+++ "b/CMakeLists.txt" -@@ -106,10 +106,10 @@ macro(install_suitesparse_project targetName headersList) - set_target_properties(${targetName} PROPERTIES PUBLIC_HEADER "${headersList}") - install(TARGETS ${targetName} - EXPORT SuiteSparse -- RUNTIME DESTINATION bin -- LIBRARY DESTINATION lib${LIB_POSTFIX} -- ARCHIVE DESTINATION lib${LIB_POSTFIX} -- PUBLIC_HEADER DESTINATION include/suitesparse -+ RUNTIME DESTINATION ${suitesparse_PKG_DIR}/$<$:Debug/>bin -+ LIBRARY DESTINATION ${suitesparse_PKG_DIR}/$<$:Debug/>lib -+ ARCHIVE DESTINATION ${suitesparse_PKG_DIR}/$<$:Debug/>lib -+ PUBLIC_HEADER DESTINATION ${suitesparse_PKG_DIR}/include/suitesparse - ) - endmacro() - +diff --git "a/SuiteSparse/CMakeLists.txt" "b/SuiteSparse/CMakeLists.txt" +index 7361363..8a48cf3 100644 +--- "a/SuiteSparse/CMakeLists.txt" ++++ "b/SuiteSparse/CMakeLists.txt" +@@ -10,7 +10,11 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_BUILD_TYPE MATCHES "Debug") + IF (BUILD_METIS) + INCLUDE_DIRECTORIES("${METIS_SOURCE_DIR}/include") + ELSE (BUILD_METIS) ++ IF(USE_VCPKG_METIS) ++ INCLUDE_DIRECTORIES("${METIS_SOURCE_DIR}/include") ++ ELSE (USE_VCPKG_METIS) + ADD_DEFINITIONS(-DNPARTITION) ++ ENDIF(USE_VCPKG_METIS) + ENDIF ( BUILD_METIS) + + # Disable COMPLEX numbers: disable it by default, since it causes problems in some platforms. diff --git a/ports/suitesparse/metis.patch b/ports/suitesparse/metis.patch deleted file mode 100644 index aab5229af..000000000 --- a/ports/suitesparse/metis.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git "a/GKlib/gk_arch.h" "b/GKlib/gk_arch.h" -index 01c72e56..2cb80ccf 100644 ---- "a/GKlib/gk_arch.h" -+++ "b/GKlib/gk_arch.h" -@@ -60,7 +60,7 @@ typedef ptrdiff_t ssize_t; - - #ifdef __MSC__ - /* MSC does not have rint() function */ --#define rint(x) ((int)((x)+0.5)) -+//#define rint(x) ((int)((x)+0.5)) - - /* MSC does not have INFINITY defined */ - #ifndef INFINITY diff --git a/ports/suitesparse/portfile.cmake b/ports/suitesparse/portfile.cmake index 0e5e9ad4b..1deb3a39e 100644 --- a/ports/suitesparse/portfile.cmake +++ b/ports/suitesparse/portfile.cmake @@ -13,70 +13,67 @@ include(vcpkg_common_functions) set(SUITESPARSE_VER SuiteSparse-4.5.5) #if you change the version, becarefull of changing the SHA512 checksum accordingly -set(METIS_VER metis-5.1.0) set(SUITESPARSEWIN_PATH ${CURRENT_BUILDTREES_DIR}/src/suitesparse-metis-for-windows-1.3.1) set(SUITESPARSE_PATH ${SUITESPARSEWIN_PATH}/Suitesparse) -set(METIS_PATH ${SUITESPARSEWIN_PATH}/metis) -#CMake scripts for painless usage of SuiteSparse+METIS from Visual Studio and the rest of Windows/Linux/OSX IDEs supported by CMake -vcpkg_download_distfile(SUITESPARSEWIN -URLS "https://github.com/jlblancoc/suitesparse-metis-for-windows/archive/v1.3.1.zip" -FILENAME "suitesparse-metis-for-windows-1.3.1.zip" -SHA512 f8b9377420432f1c0a05bf884fe9e72f1f4eaf7e05663c66a383b5d8ddbd4fbfaa7d433727b4dc3e66b41dbb96b1327d380b68a51a424276465512666e63393d -) -#suitesparse libary +#download suitesparse libary vcpkg_download_distfile(SUITESPARSE URLS "http://faculty.cse.tamu.edu/davis/SuiteSparse/${SUITESPARSE_VER}.tar.gz" FILENAME "${SUITESPARSE_VER}.tar.gz" SHA512 4337c683027efca6c0800815587409db14db7d70df673451e307eb3ece5538815d06d90f3a831fa45071372f70b6f37eaa68fe951f69dbb52a5bfd84d2dc4913 ) -#Metis library -vcpkg_download_distfile(METIS - URLS "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/${METIS_VER}.tar.gz" - FILENAME "${METIS_VER}.tar.gz" - SHA512 deea47749d13bd06fbeaf98a53c6c0b61603ddc17a43dae81d72c8015576f6495fd83c11b0ef68d024879ed5415c14ebdbd87ce49c181bdac680573bea8bdb25 + +#download suitesparse-metis-for-windows scripts, suitesparse does not have CMake build system, jlblancoc has made one for it +vcpkg_download_distfile(SUITESPARSEWIN +URLS "https://github.com/jlblancoc/suitesparse-metis-for-windows/archive/v1.3.1.zip" +FILENAME "suitesparse-metis-for-windows-1.3.1.zip" +SHA512 f8b9377420432f1c0a05bf884fe9e72f1f4eaf7e05663c66a383b5d8ddbd4fbfaa7d433727b4dc3e66b41dbb96b1327d380b68a51a424276465512666e63393d ) +#extract suitesparse-metis-for-windows first and merge with suitesparse library vcpkg_extract_source_archive(${SUITESPARSEWIN}) - -#extract suitesparse and copy into suitesparse folder in suitesparse-metis-for-windows package vcpkg_extract_source_archive(${SUITESPARSE} ${SUITESPARSEWIN_PATH}) -#extract metis and copy into metis folder in suitesparse-metis-for-windows package -vcpkg_extract_source_archive(${METIS}) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/${METIS_VER} DESTINATION ${METIS_PATH}) - - -vcpkg_apply_patches( - SOURCE_PATH ${METIS_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/metis.patch" -) vcpkg_apply_patches( SOURCE_PATH ${SUITESPARSEWIN_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-suitesparse.patch" ) - vcpkg_configure_cmake( SOURCE_PATH ${SUITESPARSEWIN_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja + #PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS - -DBUILD_METIS=ON + + -DBUILD_METIS=OFF #Disable the option to build metis from source + -DUSE_VCPKG_METIS=ON #Force using vcpckg metis library + -DMETIS_SOURCE_DIR=${CURRENT_INSTALLED_DIR} + -DSUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS=ON - -DSUITESPARSE_CUSTOM_BLAS_LIB=${VCPKG_ROOT_DIR}/packages/openblas_${TARGET_TRIPLET}/lib/openblas.lib - -DSUITESPARSE_CUSTOM_LAPACK_LIB=${VCPKG_ROOT_DIR}/packages/clapack_${TARGET_TRIPLET}/lib/lapack.lib - -Dsuitesparse_PKG_DIR=${CURRENT_PACKAGES_DIR} - #OPTIONS_RELEASE - #OPTIONS_DEBUG + -DSUITESPARSE_CUSTOM_BLAS_LIB=${CURRENT_INSTALLED_DIR}/lib/openblas.lib + -DSUITESPARSE_CUSTOM_LAPACK_LIB=${CURRENT_INSTALLED_DIR}/lib/lapack.lib + + -DLIB_POSTFIX= + OPTIONS_DEBUG + -DSUITESPARSE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug + OPTIONS_RELEASE + -DSUITESPARSE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR} ) + vcpkg_install_cmake() +#clean folders +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) +file(GLOB REMFILES ${CURRENT_PACKAGES_DIR}/debug/*.*) +file(REMOVE ${REMFILES}) +file(GLOB REMFILES ${CURRENT_PACKAGES_DIR}/*.*) +file(REMOVE ${REMFILES}) -# Handle copyright of suitesparse and metis +# Handle copyright of suitesparse and suitesparse-metis-for-windows file(COPY ${SUITESPARSE_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 ${METIS_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/suitesparse/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/suitesparse/copyright_metis) +file(COPY ${SUITESPARSEWIN_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) -vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 60825eed0e8b8c7646d0e66bc2743b4a1e8e4a96 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 5 Jun 2017 22:01:41 -0700 Subject: [vcpkg] Formatting and simplification of VcpkgPaths::get_toolset() --- toolsrc/include/VcpkgPaths.h | 6 ++-- toolsrc/src/VcpkgPaths.cpp | 79 ++++++++++++++++++-------------------------- 2 files changed, 37 insertions(+), 48 deletions(-) diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h index ca03f0e2a..95cd4bc28 100644 --- a/toolsrc/include/VcpkgPaths.h +++ b/toolsrc/include/VcpkgPaths.h @@ -48,9 +48,11 @@ namespace vcpkg const fs::path& get_cmake_exe() const; const fs::path& get_git_exe() const; const fs::path& get_nuget_exe() const; - const std::vector& get_toolsets() const; - const Toolset& get_latest_toolset() const; + /// Retrieve a toolset matching a VS version + /// + /// Valid version strings are "v140", "v141", and "". Empty string gets the latest. + /// const Toolset& get_toolset(const std::string& toolset_version) const; Files::Filesystem& get_filesystem() const; diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index acd847b5f..9068e3903 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -279,6 +279,24 @@ namespace vcpkg std::vector found_toolsets; + // VS2015 + const Optional vs_2015_installation_instance = get_VS2015_installation_instance(); + if (auto v = vs_2015_installation_instance.get()) + { + const fs::path vs2015_vcvarsall_bat = *v / "VC" / "vcvarsall.bat"; + + paths_examined.push_back(vs2015_vcvarsall_bat); + if (fs.exists(vs2015_vcvarsall_bat)) + { + const fs::path vs2015_dumpbin_exe = *v / "VC" / "bin" / "dumpbin.exe"; + paths_examined.push_back(vs2015_dumpbin_exe); + if (fs.exists(vs2015_dumpbin_exe)) + { + found_toolsets.push_back({vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140"}); + } + } + } + // VS2017 Optional vs2017_toolset; for (const fs::path& instance : vs2017_installation_instances) @@ -310,40 +328,18 @@ namespace vcpkg break; } } - if(vs2017_toolset) break; - } - if(auto value = vs2017_toolset.get()) - { - found_toolsets.push_back(*value); - } - - // VS2015 - const Optional vs_2015_installation_instance = get_VS2015_installation_instance(); - if (auto v = vs_2015_installation_instance.get()) - { - const fs::path vs2015_vcvarsall_bat = *v / "VC" / "vcvarsall.bat"; - - paths_examined.push_back(vs2015_vcvarsall_bat); - if (fs.exists(vs2015_vcvarsall_bat)) + if (auto value = vs2017_toolset.get()) { - const fs::path vs2015_dumpbin_exe = *v / "VC" / "bin" / "dumpbin.exe"; - paths_examined.push_back(vs2015_dumpbin_exe); - if (fs.exists(vs2015_dumpbin_exe)) - { - found_toolsets.push_back({vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140"}); - } + found_toolsets.push_back(*value); + break; } } - std::sort(found_toolsets.begin(), - found_toolsets.end(), - [](const Toolset& left, const Toolset& right) { return left.version > right.version; }); - - if(found_toolsets.empty()) + if (found_toolsets.empty()) { System::println(System::Color::error, "Could not locate a complete toolset."); System::println("The following paths were examined:"); - for(const fs::path& path : paths_examined) + for (const fs::path& path : paths_examined) { System::println(" %s", path.u8string()); } @@ -353,31 +349,22 @@ namespace vcpkg return found_toolsets; } - const std::vector& VcpkgPaths::get_toolsets() const - { - return this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); }); - } - - const Toolset& VcpkgPaths::get_latest_toolset() const - { - // Invariant: toolsets are non-empty and sorted - return get_toolsets().back(); - } const Toolset& VcpkgPaths::get_toolset(const std::string& toolset_version) const { - if(toolset_version.empty()) + // Invariant: toolsets are non-empty and sorted with newest at back() + const auto& vs_toolsets = this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); }); + + if (toolset_version.empty()) { - return this->get_latest_toolset(); + return vs_toolsets.back(); } else { - const auto& vs_toolsets = this->get_toolsets(); - - const auto toolset = Util::find_if(vs_toolsets, [&](const Toolset& toolset) { return toolset_version == Strings::to_utf8(toolset.version); }); - if(toolset == vs_toolsets.end()) - { - Checks::exit_with_message(VCPKG_LINE_INFO, Strings::format("Could not find toolset %s", toolset_version)); - } + const auto toolset = Util::find_if(vs_toolsets, [&](const Toolset& toolset) { + return toolset_version == Strings::to_utf8(toolset.version); + }); + Checks::check_exit( + VCPKG_LINE_INFO, toolset != vs_toolsets.end(), "Could not find toolset '%s'", toolset_version); return *toolset; } } -- cgit v1.2.3 From 93ebc6c7467b245ed81ed724e8b3d4db442d3f89 Mon Sep 17 00:00:00 2001 From: bagong Date: Tue, 6 Jun 2017 10:11:54 +0200 Subject: Make sure dsound uses version and header of current environment --- ports/portaudio/CONTROL | 2 +- ports/portaudio/find_dsound.patch | 114 ++++++++++++++++++++++++++++++++++++++ ports/portaudio/portfile.cmake | 3 +- 3 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 ports/portaudio/find_dsound.patch diff --git a/ports/portaudio/CONTROL b/ports/portaudio/CONTROL index b2fb68b84..5e5ffc57c 100644 --- a/ports/portaudio/CONTROL +++ b/ports/portaudio/CONTROL @@ -1,3 +1,3 @@ Source: portaudio -Version: 19.0.6.00 +Version: 19.0.6.00-1 Description: PortAudio Portable Cross-platform Audio I/O API PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O. diff --git a/ports/portaudio/find_dsound.patch b/ports/portaudio/find_dsound.patch new file mode 100644 index 000000000..be82b5641 --- /dev/null +++ b/ports/portaudio/find_dsound.patch @@ -0,0 +1,114 @@ +--- a/cmake_support/FindDXSDK.cmake ++++ b/cmake_support/FindDXSDK.cmake +@@ -16,44 +16,70 @@ else(WIN32) + message(FATAL_ERROR "FindDXSDK.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}" ) + endif(WIN32) + +-find_path(DXSDK_ROOT_DIR +- include/dxsdkver.h +- HINTS +- $ENV{DXSDK_DIR} +-) +- +-find_path(DXSDK_INCLUDE_DIR +- dxsdkver.h +- PATHS +- ${DXSDK_ROOT_DIR}/include +-) +- +-IF(CMAKE_CL_64) +-find_path(DXSDK_LIBRARY_DIR +- dsound.lib +- PATHS +- ${DXSDK_ROOT_DIR}/lib/x64 +-) +-ELSE(CMAKE_CL_64) +-find_path(DXSDK_LIBRARY_DIR +- dsound.lib +- PATHS +- ${DXSDK_ROOT_DIR}/lib/x86 +-) +-ENDIF(CMAKE_CL_64) +- +-find_library(DXSDK_DSOUND_LIBRARY +- dsound.lib +- PATHS +- ${DXSDK_LIBRARY_DIR} +-) +- +-# handle the QUIETLY and REQUIRED arguments and set DXSDK_FOUND to TRUE if +-# all listed variables are TRUE +-INCLUDE(FindPackageHandleStandardArgs) +-FIND_PACKAGE_HANDLE_STANDARD_ARGS(DXSDK DEFAULT_MSG DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR) +- +-MARK_AS_ADVANCED( +- DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR +- DXSDK_LIBRARY_DIR DXSDK_DSOUND_LIBRARY +-) ++# Dsound.lib is statically linked (i.e. dsound.dll not required) and DXSDK_LIBRARY_DIR not used. ++# In the environments supported by VCPKG we may as well avoid looking out for DX9 to avoid version ++# mismatch in find. ++ ++if(MSVC AND MSVC_VERSION GREATER_EQUAL 1900) ++ ++ # if the environment is set up properly, matching lib and header will be found ++ ++ find_path(DXSDK_INCLUDE_DIR ++ dsound.h ++ ) ++ find_library(DXSDK_DSOUND_LIBRARY ++ dsound.lib ++ ) ++ ++ INCLUDE(FindPackageHandleStandardArgs) ++ FIND_PACKAGE_HANDLE_STANDARD_ARGS(DXSDK DEFAULT_MSG DXSDK_INCLUDE_DIR DXSDK_DSOUND_LIBRARY) ++ ++ MARK_AS_ADVANCED( ++ DXSDK_INCLUDE_DIR DXSDK_DSOUND_LIBRARY ++ ) ++ ++else() ++ ++ find_path(DXSDK_ROOT_DIR ++ include/dxsdkver.h ++ HINTS ++ $ENV{DXSDK_DIR} ++ ) ++ ++ find_path(DXSDK_INCLUDE_DIR ++ dxsdkver.h ++ HINTS ++ ${DXSDK_ROOT_DIR}/include ++ ) ++ ++ IF(CMAKE_CL_64) ++ find_path(DXSDK_LIBRARY_DIR ++ dsound.lib ++ HINTS ++ ${DXSDK_ROOT_DIR}/lib/x64 ++ ) ++ ELSE(CMAKE_CL_64) ++ find_path(DXSDK_LIBRARY_DIR ++ dsound.lib ++ HINTS ++ ${DXSDK_ROOT_DIR}/lib/x86 ++ ) ++ ENDIF(CMAKE_CL_64) ++ ++ find_library(DXSDK_DSOUND_LIBRARY ++ dsound.lib ++ HINTS ++ ${DXSDK_LIBRARY_DIR} ++ ) ++ ++ # handle the QUIETLY and REQUIRED arguments and set DXSDK_FOUND to TRUE if ++ # all listed variables are TRUE ++ INCLUDE(FindPackageHandleStandardArgs) ++ FIND_PACKAGE_HANDLE_STANDARD_ARGS(DXSDK DEFAULT_MSG DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR) ++ ++ MARK_AS_ADVANCED( ++ DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR ++ DXSDK_LIBRARY_DIR DXSDK_DSOUND_LIBRARY ++ ) ++ ++endif() diff --git a/ports/portaudio/portfile.cmake b/ports/portaudio/portfile.cmake index b243d5a6d..582ebf4d7 100644 --- a/ports/portaudio/portfile.cmake +++ b/ports/portaudio/portfile.cmake @@ -18,7 +18,8 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/cmakelists-install.patch) + ${CMAKE_CURRENT_LIST_DIR}/cmakelists-install.patch + ${CMAKE_CURRENT_LIST_DIR}/find_dsound.patch) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 485f7cf426078962bd8b4a16ee3a2f8cd110a1da Mon Sep 17 00:00:00 2001 From: bagong Date: Tue, 6 Jun 2017 11:02:33 +0200 Subject: Leave crt linkage and build type in vcpkges hands and add some verbosity to build options --- ports/portaudio/crt_linkage_build_config.patch | 61 ++++++++++++++++++++++++++ ports/portaudio/portfile.cmake | 12 ++++- 2 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 ports/portaudio/crt_linkage_build_config.patch diff --git a/ports/portaudio/crt_linkage_build_config.patch b/ports/portaudio/crt_linkage_build_config.patch new file mode 100644 index 000000000..b1cef3014 --- /dev/null +++ b/ports/portaudio/crt_linkage_build_config.patch @@ -0,0 +1,61 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,32 +10,32 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + # project. If this is part of a larger project (i.e. the CMakeLists.txt has + # been imported by some other CMakeLists.txt), we don't want to trump over + # the top of that project's global settings. +-IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_LIST_DIR}) +- IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) +- MESSAGE(STATUS "Setting CMAKE_BUILD_TYPE type to 'Debug' as none was specified.") +- SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) +- SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release") +- ENDIF() +- +- PROJECT(portaudio) +- +- SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON) +- +- IF(WIN32 AND MSVC) +- OPTION(PA_DLL_LINK_WITH_STATIC_RUNTIME "Link with static runtime libraries (minimizes runtime dependencies)" ON) +- IF(PA_DLL_LINK_WITH_STATIC_RUNTIME) +- FOREACH(flag_var +- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE +- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO +- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE +- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) +- IF(${flag_var} MATCHES "/MD") +- STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") +- ENDIF() +- ENDFOREACH() +- ENDIF() +- ENDIF() +-ENDIF() ++# IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_LIST_DIR}) ++ # IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) ++ # MESSAGE(STATUS "Setting CMAKE_BUILD_TYPE type to 'Debug' as none was specified.") ++ # SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) ++ # SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release") ++ # ENDIF() ++ ++ # PROJECT(portaudio) ++ ++ # SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON) ++ ++ # IF(WIN32 AND MSVC) ++ # OPTION(PA_DLL_LINK_WITH_STATIC_RUNTIME "Link with static runtime libraries (minimizes runtime dependencies)" ON) ++ # IF(PA_DLL_LINK_WITH_STATIC_RUNTIME) ++ # FOREACH(flag_var ++ # CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE ++ # CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO ++ # CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE ++ # CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) ++ # IF(${flag_var} MATCHES "/MD") ++ # STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") ++ # ENDIF() ++ # ENDFOREACH() ++ # ENDIF() ++ # ENDIF() ++# ENDIF() + + SET(PA_PKGCONFIG_VERSION 19) + diff --git a/ports/portaudio/portfile.cmake b/ports/portaudio/portfile.cmake index 582ebf4d7..74a9cdcf6 100644 --- a/ports/portaudio/portfile.cmake +++ b/ports/portaudio/portfile.cmake @@ -19,18 +19,26 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmakelists-install.patch - ${CMAKE_CURRENT_LIST_DIR}/find_dsound.patch) + ${CMAKE_CURRENT_LIST_DIR}/find_dsound.patch + ${CMAKE_CURRENT_LIST_DIR}/crt_linkage_build_config.patch) +# NOTE: the ASIO backend will be built automatically if the ASIO-SDK is provided +# in a sibling folder of the portaudio source in vcpkg/buildtrees/portaudio/src vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DPA_USE_DS=ON + -DPA_USE_WASAPI=ON + -DPA_USE_WDMKS=ON + -DPA_USE_WMME=ON ) vcpkg_install_cmake() # Remove static builds from dynamic builds and otherwise # Remove x86 and x64 from resulting files -if (VCPKG_CRT_LINKAGE STREQUAL dynamic) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file (REMOVE ${CURRENT_PACKAGES_DIR}/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib) file (REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/portaudio_static_${VCPKG_TARGET_ARCHITECTURE}.lib) -- cgit v1.2.3 From ca3d9f41b6477ee9d5c02421f39ac6d968d8b144 Mon Sep 17 00:00:00 2001 From: codicodi Date: Tue, 6 Jun 2017 16:36:34 +0200 Subject: [libepoxy] update to 1.4.3 --- ports/libepoxy/CONTROL | 2 +- ports/libepoxy/portfile.cmake | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ports/libepoxy/CONTROL b/ports/libepoxy/CONTROL index 2f9939ee4..95bc19474 100644 --- a/ports/libepoxy/CONTROL +++ b/ports/libepoxy/CONTROL @@ -1,3 +1,3 @@ Source: libepoxy -Version: 1.4.2 +Version: 1.4.3 Description: Epoxy is a library for handling OpenGL function pointer management for you diff --git a/ports/libepoxy/portfile.cmake b/ports/libepoxy/portfile.cmake index 27c073786..e50754db3 100644 --- a/ports/libepoxy/portfile.cmake +++ b/ports/libepoxy/portfile.cmake @@ -7,19 +7,19 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO anholt/libepoxy - REF 1.4.2 - SHA512 b94e1fe749c63a82f38369ff62b7d0d8cf1c55884159f030dc2919c17daf5811dd71cfd6a663edb38df66ff4ca53120a6a53501568cc8a582f08d4ae82fe9d89 + REF 1.4.3 + SHA512 41c7a4eea66c89346b0ec71407b2d22bf645ed0ef81ebad560370903f138ed48abb6bc6bcc88c75a3a05497acc6720397db828d61301599c05040263a9f4f7f0 HEAD_REF master) -# ensure python is on path - not for meson but some source generation scripts -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PYTHON3_PATH}") - -vcpkg_configure_meson(SOURCE_PATH ${SOURCE_PATH}) +vcpkg_configure_meson(SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -Denable-glx=no + -Denable-egl=no) vcpkg_install_meson() - vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig) + file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libepoxy) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libepoxy/COPYING ${CURRENT_PACKAGES_DIR}/share/libepoxy/copyright) -- cgit v1.2.3 From 7be0c32a192e146705775e33c1c3d05c16437b56 Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 1 Jun 2017 15:42:52 +0200 Subject: [jasper] initial commit --- ports/jasper/CONTROL | 4 ++++ ports/jasper/portfile.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 ports/jasper/CONTROL create mode 100644 ports/jasper/portfile.cmake diff --git a/ports/jasper/CONTROL b/ports/jasper/CONTROL new file mode 100644 index 000000000..682501e49 --- /dev/null +++ b/ports/jasper/CONTROL @@ -0,0 +1,4 @@ +Source: jasper +Version: 2.0.13 +Description: Open source implementation of the JPEG-2000 Part-1 standard +Build-Depends: libjpeg-turbo diff --git a/ports/jasper/portfile.cmake b/ports/jasper/portfile.cmake new file mode 100644 index 000000000..fa2b415a7 --- /dev/null +++ b/ports/jasper/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mdadams/jasper + REF version-2.0.13 + SHA512 8c09a7b773e739a2594cd1002fe66f79ea4336f7de7c97267ab976c06ba075468a7f3c8731dff13a98221cd11d3f2bf8dcddb3fc2c2fc7d7c5ba402bcd3f9fd8 + HEAD_REF master) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(JASPER_LINKAGE -DJAS_ENABLE_SHARED=OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF + -DJAS_ENABLE_LIBJPEG=ON + -DJAS_ENABLE_OPENGL=OFF # not needed for the library + -DJAS_ENABLE_DOC=OFF + ${JASPER_LINKAGE}) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + file(GLOB EXECS ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${EXECS}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +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) -- cgit v1.2.3 From 3ee46a4bb6fa2efca575ec8dee79c239c802f62a Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 6 Jun 2017 10:37:21 -0700 Subject: stop cmake build on a failed download --- scripts/cmake/vcpkg_acquire_depot_tools.cmake | 48 +++++++++++++++++++++------ 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/scripts/cmake/vcpkg_acquire_depot_tools.cmake b/scripts/cmake/vcpkg_acquire_depot_tools.cmake index 3b206e271..1cc375725 100644 --- a/scripts/cmake/vcpkg_acquire_depot_tools.cmake +++ b/scripts/cmake/vcpkg_acquire_depot_tools.cmake @@ -3,18 +3,46 @@ function(vcpkg_acquire_depot_tools PATH_TO_ROOT_OUT) set(URL "https://storage.googleapis.com/chrome-infra/depot_tools.zip") set(ARCHIVE "depot_tools.zip") set(STAMP "initialized-depot-tools.stamp") + set(downloaded_file_path ${DOWNLOADS}/${ARCHIVE}) if(NOT EXISTS "${TOOLPATH}/${STAMP}") - message(STATUS "Acquiring Depot Tools...") - file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE}) - file(REMOVE_RECURSE ${TOOLPATH}) - file(MAKE_DIRECTORY ${TOOLPATH}) - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} - WORKING_DIRECTORY ${TOOLPATH} - ) - file(WRITE "${TOOLPATH}/${STAMP}" "0") - message(STATUS "Acquiring Depot Tools... OK") + + message(STATUS "Acquiring Depot Tools...") + + if(EXISTS ${downloaded_file_path}) + message(STATUS "Using cached ${downloaded_file_path}") + else() + if(_VCPKG_NO_DOWNLOADS) + message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") + endif() + file(DOWNLOAD ${URL} ${downloaded_file_path} STATUS download_status) + list(GET download_status 0 status_code) + if (NOT "${status_code}" STREQUAL "0") + message(STATUS "Downloading ${URL}... Failed. Status: ${download_status}") + file(REMOVE ${downloaded_file_path}) + set(download_success 0) + else() + message(STATUS "Downloading ${URL}... OK") + set(download_success 1) + endif() + + if (NOT ${download_success}) + message(FATAL_ERROR + "\n" + " Failed to download file.\n" + " Add mirrors or submit an issue at https://github.com/Microsoft/vcpkg/issues\n") + endif() + endif() + + + file(REMOVE_RECURSE ${TOOLPATH}) + file(MAKE_DIRECTORY ${TOOLPATH}) + execute_process( + COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} + WORKING_DIRECTORY ${TOOLPATH} + ) + file(WRITE "${TOOLPATH}/${STAMP}" "0") + message(STATUS "Acquiring Depot Tools... OK") endif() set(${PATH_TO_ROOT_OUT} ${TOOLPATH} PARENT_SCOPE) endfunction() -- cgit v1.2.3 From 79fcaafd0c486875c34f0e39356b3c95406cfd2d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Jun 2017 11:12:25 -0700 Subject: [harfbuzz] Change glib dependency back to platform-dependent --- ports/harfbuzz/CONTROL | 2 +- ports/harfbuzz/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index cff52498a..5ed9e68b8 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz Version: 1.4.6-1 Description: HarfBuzz OpenType text shaping engine -Build-Depends: freetype, glib [x86], glib [x64] +Build-Depends: freetype, glib [windows] diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 367d12246..798743d45 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -12,12 +12,12 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch" ) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") SET(HAVE_GLIB "OFF") - SET(BUILTIN_UCDN "ON") + SET(BUILTIN_UCDN "ON") else() SET(HAVE_GLIB "ON") - SET(BUILTIN_UCDN "OFF") + SET(BUILTIN_UCDN "OFF") endif() vcpkg_configure_cmake( -- cgit v1.2.3 From 7b4d83c444b0e7fee241ed293614efca17c67201 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Jun 2017 11:39:00 -0700 Subject: [qt5] Add check for long path. --- ports/qt5/portfile.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake index ee871b155..0424ba2e5 100644 --- a/ports/qt5/portfile.cmake +++ b/ports/qt5/portfile.cmake @@ -1,6 +1,12 @@ -include(${CMAKE_TRIPLET_FILE}) include(vcpkg_common_functions) +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) include(configure_qt) include(install_qt) -- cgit v1.2.3 From 264cd050e6280e5b87ec055e0a9d8985a7ba30b3 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Mon, 5 Jun 2017 15:58:47 -0700 Subject: ExpectedT factory class --- toolsrc/include/LineInfo.h | 2 + toolsrc/include/PackageSpec.h | 6 ++- toolsrc/include/PackageSpecParseResult.h | 31 ++++++------- toolsrc/include/Paragraphs.h | 3 +- toolsrc/include/SourceParagraph.h | 17 ++++++- toolsrc/include/vcpkg_expected.h | 79 ++++++++++++++++++++++++-------- toolsrc/src/PackageSpec.cpp | 10 ++-- toolsrc/src/PackageSpecParseResult.cpp | 24 +--------- toolsrc/src/Paragraphs.cpp | 23 ++++++---- toolsrc/src/SourceParagraph.cpp | 47 ++++++++++++++----- toolsrc/src/commands_build.cpp | 17 ++++--- toolsrc/src/tests_paragraph.cpp | 66 +++++++++++++++----------- toolsrc/src/vcpkg.cpp | 4 +- toolsrc/src/vcpkg_Dependencies.cpp | 10 +++- toolsrc/src/vcpkg_Files.cpp | 6 +-- toolsrc/src/vcpkg_Input.cpp | 4 +- 16 files changed, 221 insertions(+), 128 deletions(-) diff --git a/toolsrc/include/LineInfo.h b/toolsrc/include/LineInfo.h index 66d91c520..62973462a 100644 --- a/toolsrc/include/LineInfo.h +++ b/toolsrc/include/LineInfo.h @@ -1,5 +1,7 @@ #pragma once +#include + namespace vcpkg { struct LineInfo diff --git a/toolsrc/include/PackageSpec.h b/toolsrc/include/PackageSpec.h index 050d9d079..58edb8274 100644 --- a/toolsrc/include/PackageSpec.h +++ b/toolsrc/include/PackageSpec.h @@ -7,9 +7,11 @@ namespace vcpkg { struct PackageSpec { - static Expected from_string(const std::string& spec_as_string, const Triplet& default_triplet); + static ExpectedT from_string(const std::string& spec_as_string, + const Triplet& default_triplet); static std::string to_string(const std::string& name, const Triplet& triplet); - static Expected from_name_and_triplet(const std::string& name, const Triplet& triplet); + static ExpectedT from_name_and_triplet(const std::string& name, + const Triplet& triplet); const std::string& name() const; diff --git a/toolsrc/include/PackageSpecParseResult.h b/toolsrc/include/PackageSpecParseResult.h index b72c534c2..17d151626 100644 --- a/toolsrc/include/PackageSpecParseResult.h +++ b/toolsrc/include/PackageSpecParseResult.h @@ -1,5 +1,6 @@ #pragma once -#include + +#include "vcpkg_expected.h" namespace vcpkg { @@ -10,27 +11,21 @@ namespace vcpkg INVALID_CHARACTERS }; - struct PackageSpecParseResultCategoryImpl final : std::error_category - { - virtual const char* name() const noexcept override; + CStringView to_string(PackageSpecParseResult ev) noexcept; - virtual std::string message(int ev) const noexcept override; - }; - - const std::error_category& package_spec_parse_result_category(); + template<> + struct ErrorHolder + { + ErrorHolder() : m_err(PackageSpecParseResult::SUCCESS) {} + ErrorHolder(PackageSpecParseResult err) : m_err(err) {} - std::error_code make_error_code(PackageSpecParseResult e); + constexpr bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; } - PackageSpecParseResult to_package_spec_parse_result(int i); + PackageSpecParseResult error() const { return m_err; } - PackageSpecParseResult to_package_spec_parse_result(std::error_code ec); -} + CStringView to_string() const { return vcpkg::to_string(m_err); } -// Enable implicit conversion to std::error_code -namespace std -{ - template<> - struct is_error_code_enum : ::std::true_type - { + private: + PackageSpecParseResult m_err; }; } diff --git a/toolsrc/include/Paragraphs.h b/toolsrc/include/Paragraphs.h index 66f6bd2e4..59f0eefc8 100644 --- a/toolsrc/include/Paragraphs.h +++ b/toolsrc/include/Paragraphs.h @@ -16,7 +16,8 @@ namespace vcpkg::Paragraphs Expected parse_single_paragraph(const std::string& str); Expected> parse_paragraphs(const std::string& str); - Expected try_load_port(const Files::Filesystem& fs, const fs::path& control_path); + ExpectedT try_load_port(const Files::Filesystem& fs, + const fs::path& control_path); Expected try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec); diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 19f558170..9874eb3a9 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -1,5 +1,6 @@ #pragma once +#include "vcpkg_expected.h" #include #include @@ -15,14 +16,23 @@ namespace vcpkg const std::string& to_string(const Dependency& dep); + struct ParseControlErrorInfo + { + std::string name; + std::string remaining_fields_as_string; + std::string valid_fields_as_string; + std::error_code error; + }; + /// /// Port metadata (CONTROL file) /// struct SourceParagraph { - SourceParagraph(); + static ExpectedT parse_control_file( + std::unordered_map fields); - explicit SourceParagraph(std::unordered_map fields); + SourceParagraph(); std::string name; std::string version; @@ -31,6 +41,9 @@ namespace vcpkg std::vector depends; }; + void print_error_message(const ParseControlErrorInfo& info); + void print_error_message(std::vector error_info_list); + std::vector filter_dependencies(const std::vector& deps, const Triplet& t); std::vector expand_qualified_dependencies(const std::vector& depends); diff --git a/toolsrc/include/vcpkg_expected.h b/toolsrc/include/vcpkg_expected.h index 3a920022b..15dbf5e79 100644 --- a/toolsrc/include/vcpkg_expected.h +++ b/toolsrc/include/vcpkg_expected.h @@ -5,27 +5,63 @@ namespace vcpkg { - template - class Expected + template + struct ErrorHolder { - public: - // Constructors are intentionally implicit - Expected(const std::error_code& ec) : m_error_code(ec), m_t() {} + ErrorHolder() : m_is_error(false) {} + ErrorHolder(const Err& err) : m_is_error(true), m_err(err) {} + ErrorHolder(Err&& err) : m_is_error(true), m_err(std::move(err)) {} + + constexpr bool has_error() const { return m_is_error; } + + const Err& error() const { return m_err; } + Err& error() { return m_err; } + + CStringView to_string() const { return "value was error"; } + + private: + bool m_is_error; + Err m_err; + }; + + template<> + struct ErrorHolder + { + ErrorHolder() = default; + ErrorHolder(const std::error_code& err) : m_err(err) {} + + constexpr bool has_error() const { return bool(m_err); } - Expected(std::errc ec) : Expected(std::make_error_code(ec)) {} + const std::error_code& error() const { return m_err; } + std::error_code& error() { return m_err; } - Expected(const T& t) : m_error_code(), m_t(t) {} + CStringView to_string() const { return "value was error"; } - Expected(T&& t) : m_error_code(), m_t(std::move(t)) {} + private: + std::error_code m_err; + }; + + template + class ExpectedT + { + public: + constexpr ExpectedT() = default; + + // Constructors are intentionally implicit + + ExpectedT(const S& s) : m_s(s) {} + ExpectedT(S&& s) : m_s(std::move(s)) {} - Expected() : Expected(std::error_code(), T()) {} + ExpectedT(const T& t) : m_t(t) {} + ExpectedT(T&& t) : m_t(std::move(t)) {} - Expected(const Expected&) = default; - Expected(Expected&&) = default; - Expected& operator=(const Expected&) = default; - Expected& operator=(Expected&&) = default; + ExpectedT(const ExpectedT&) = default; + ExpectedT(ExpectedT&&) = default; + ExpectedT& operator=(const ExpectedT&) = default; + ExpectedT& operator=(ExpectedT&&) = default; - std::error_code error_code() const { return this->m_error_code; } + explicit constexpr operator bool() const noexcept { return !m_s.has_error(); } + constexpr bool has_value() const noexcept { return !m_s.has_error(); } T&& value_or_exit(const LineInfo& line_info) && { @@ -39,9 +75,13 @@ namespace vcpkg return this->m_t; } + const S& error() const & { return this->m_s.error(); } + + S&& error() && { return std::move(this->m_s.error()); } + const T* get() const { - if (m_error_code) + if (!this->has_value()) { return nullptr; } @@ -50,7 +90,7 @@ namespace vcpkg T* get() { - if (m_error_code) + if (!this->has_value()) { return nullptr; } @@ -60,10 +100,13 @@ namespace vcpkg private: void exit_if_error(const LineInfo& line_info) const { - Checks::check_exit(line_info, !this->m_error_code, this->m_error_code.message()); + Checks::check_exit(line_info, !m_s.has_error(), m_s.to_string()); } - std::error_code m_error_code; + ErrorHolder m_s; T m_t; }; + + template + using Expected = ExpectedT; } diff --git a/toolsrc/src/PackageSpec.cpp b/toolsrc/src/PackageSpec.cpp index 69883a030..ab005f255 100644 --- a/toolsrc/src/PackageSpec.cpp +++ b/toolsrc/src/PackageSpec.cpp @@ -7,7 +7,8 @@ namespace vcpkg { static bool is_valid_package_spec_char(char c) { return (c == '-') || isdigit(c) || (isalpha(c) && islower(c)); } - Expected PackageSpec::from_string(const std::string& spec_as_string, const Triplet& default_triplet) + ExpectedT PackageSpec::from_string(const std::string& spec_as_string, + const Triplet& default_triplet) { auto pos = spec_as_string.find(':'); if (pos == std::string::npos) @@ -18,7 +19,7 @@ namespace vcpkg auto pos2 = spec_as_string.find(':', pos + 1); if (pos2 != std::string::npos) { - return std::error_code(PackageSpecParseResult::TOO_MANY_COLONS); + return PackageSpecParseResult::TOO_MANY_COLONS; } const std::string name = spec_as_string.substr(0, pos); @@ -26,11 +27,12 @@ namespace vcpkg return from_name_and_triplet(name, triplet); } - Expected PackageSpec::from_name_and_triplet(const std::string& name, const Triplet& triplet) + ExpectedT PackageSpec::from_name_and_triplet(const std::string& name, + const Triplet& triplet) { if (Util::find_if_not(name, is_valid_package_spec_char) != name.end()) { - return std::error_code(PackageSpecParseResult::INVALID_CHARACTERS); + return PackageSpecParseResult::INVALID_CHARACTERS; } PackageSpec p; diff --git a/toolsrc/src/PackageSpecParseResult.cpp b/toolsrc/src/PackageSpecParseResult.cpp index 487c3aa1d..838c788ba 100644 --- a/toolsrc/src/PackageSpecParseResult.cpp +++ b/toolsrc/src/PackageSpecParseResult.cpp @@ -5,11 +5,9 @@ namespace vcpkg { - const char* PackageSpecParseResultCategoryImpl::name() const noexcept { return "PackageSpecParseResult"; } - - std::string PackageSpecParseResultCategoryImpl::message(int ev) const noexcept + CStringView to_string(PackageSpecParseResult ev) noexcept { - switch (static_cast(ev)) + switch (ev) { case PackageSpecParseResult::SUCCESS: return "OK"; case PackageSpecParseResult::TOO_MANY_COLONS: return "Too many colons"; @@ -19,22 +17,4 @@ namespace vcpkg default: Checks::unreachable(VCPKG_LINE_INFO); } } - - const std::error_category& package_spec_parse_result_category() - { - static PackageSpecParseResultCategoryImpl instance; - return instance; - } - - std::error_code make_error_code(PackageSpecParseResult e) - { - return std::error_code(static_cast(e), package_spec_parse_result_category()); - } - - PackageSpecParseResult to_package_spec_parse_result(int i) { return static_cast(i); } - - PackageSpecParseResult to_package_spec_parse_result(std::error_code ec) - { - return to_package_spec_parse_result(ec.value()); - } } diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp index 70d3db2b3..13103d1f8 100644 --- a/toolsrc/src/Paragraphs.cpp +++ b/toolsrc/src/Paragraphs.cpp @@ -168,7 +168,7 @@ namespace vcpkg::Paragraphs return parse_single_paragraph(*spgh); } - return contents.error_code(); + return contents.error(); } Expected>> get_paragraphs(const Files::Filesystem& fs, @@ -180,7 +180,7 @@ namespace vcpkg::Paragraphs return parse_paragraphs(*spgh); } - return contents.error_code(); + return contents.error(); } Expected> parse_single_paragraph(const std::string& str) @@ -201,15 +201,16 @@ namespace vcpkg::Paragraphs return Parser(str.c_str(), str.c_str() + str.size()).get_paragraphs(); } - Expected try_load_port(const Files::Filesystem& fs, const fs::path& path) + ExpectedT try_load_port(const Files::Filesystem& fs, const fs::path& path) { + ParseControlErrorInfo error_info; Expected> pghs = get_single_paragraph(fs, path / "CONTROL"); if (auto p = pghs.get()) { - return SourceParagraph(*p); + return SourceParagraph::parse_control_file(*p); } - - return pghs.error_code(); + error_info.error = pghs.error(); + return error_info; } Expected try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec) @@ -222,20 +223,26 @@ namespace vcpkg::Paragraphs return BinaryParagraph(*p); } - return pghs.error_code(); + return pghs.error(); } std::vector load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir) { std::vector output; + std::vector port_errors; for (auto&& path : fs.get_files_non_recursive(ports_dir)) { - Expected source_paragraph = try_load_port(fs, path); + ExpectedT source_paragraph = try_load_port(fs, path); if (auto srcpgh = source_paragraph.get()) { output.emplace_back(std::move(*srcpgh)); } + else + { + port_errors.emplace_back(source_paragraph.error()); + } } + print_error_message(port_errors); return output; } diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index d140ce72b..9516681c9 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -5,6 +5,8 @@ #include "vcpkg_Checks.h" #include "vcpkg_Maps.h" #include "vcpkg_System.h" +#include "vcpkg_expected.h" + #include "vcpkglib_helpers.h" namespace vcpkg @@ -37,15 +39,41 @@ namespace vcpkg SourceParagraph::SourceParagraph() = default; - SourceParagraph::SourceParagraph(std::unordered_map fields) + void print_error_message(const ParseControlErrorInfo& info) + { + System::println( + System::Color::error, "Error: There are invalid fields in the Source Paragraph of %s", info.name); + System::println("The following fields were not expected:\n\n %s\n\n", info.remaining_fields_as_string); + System::println("This is the list of valid fields (case-sensitive): \n\n %s\n", info.valid_fields_as_string); + System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n"); + } + + void print_error_message(std::vector error_info_list) + { + for (ParseControlErrorInfo error_info : error_info_list) + { + System::println( + System::Color::error, "Error: There are invalid fields in the Source Paragraph of %s", error_info.name); + System::println("The following fields were not expected:\n\n %s\n\n", + error_info.remaining_fields_as_string); + } + + System::println("This is the list of valid fields (case-sensitive): \n\n %s\n", + error_info_list.front().valid_fields_as_string); + System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n"); + } + + ExpectedT SourceParagraph::parse_control_file( + std::unordered_map fields) { - this->name = details::remove_required_field(&fields, SourceParagraphRequiredField::SOURCE); - this->version = details::remove_required_field(&fields, SourceParagraphRequiredField::VERSION); - this->description = details::remove_optional_field(&fields, SourceParagraphOptionalField::DESCRIPTION); - this->maintainer = details::remove_optional_field(&fields, SourceParagraphOptionalField::MAINTAINER); + SourceParagraph sparagraph; + sparagraph.name = details::remove_required_field(&fields, SourceParagraphRequiredField::SOURCE); + sparagraph.version = details::remove_required_field(&fields, SourceParagraphRequiredField::VERSION); + sparagraph.description = details::remove_optional_field(&fields, SourceParagraphOptionalField::DESCRIPTION); + sparagraph.maintainer = details::remove_optional_field(&fields, SourceParagraphOptionalField::MAINTAINER); std::string deps = details::remove_optional_field(&fields, SourceParagraphOptionalField::BUILD_DEPENDS); - this->depends = expand_qualified_dependencies(parse_depends(deps)); + sparagraph.depends = expand_qualified_dependencies(parse_depends(deps)); if (!fields.empty()) { @@ -55,12 +83,9 @@ namespace vcpkg const std::string remaining_fields_as_string = Strings::join("\n ", remaining_fields); const std::string valid_fields_as_string = Strings::join("\n ", valid_fields); - System::println( - System::Color::error, "Error: There are invalid fields in the Source Paragraph of %s", this->name); - System::println("The following fields were not expected:\n\n %s\n\n", remaining_fields_as_string); - System::println("This is the list of valid fields (case-sensitive): \n\n %s\n", valid_fields_as_string); - Checks::exit_fail(VCPKG_LINE_INFO); + return ParseControlErrorInfo{sparagraph.name, remaining_fields_as_string, valid_fields_as_string}; } + return sparagraph; } std::vector vcpkg::expand_qualified_dependencies(const std::vector& depends) diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index ec6586fa3..4a0cee021 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -33,13 +33,16 @@ namespace vcpkg::Commands::BuildCommand Checks::exit_success(VCPKG_LINE_INFO); } - const Expected maybe_spgh = Paragraphs::try_load_port(paths.get_filesystem(), port_dir); - Checks::check_exit(VCPKG_LINE_INFO, - !maybe_spgh.error_code(), - "Could not find package %s: %s", - spec, - maybe_spgh.error_code().message()); - const SourceParagraph& spgh = *maybe_spgh.get(); + const ExpectedT maybe_spgh = + Paragraphs::try_load_port(paths.get_filesystem(), port_dir); + // why do we add a const here + if (!maybe_spgh) + { + print_error_message(maybe_spgh.error()); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + const SourceParagraph& spgh = maybe_spgh.value_or_exit(VCPKG_LINE_INFO); Checks::check_exit(VCPKG_LINE_INFO, spec.name() == spgh.name, "The Name: field inside the CONTROL does not match the port directory: '%s' != '%s'", diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests_paragraph.cpp index b66adc816..1c77b437b 100644 --- a/toolsrc/src/tests_paragraph.cpp +++ b/toolsrc/src/tests_paragraph.cpp @@ -25,7 +25,10 @@ namespace UnitTest1 { TEST_METHOD(SourceParagraph_Construct_Minimum) { - vcpkg::SourceParagraph pgh({{"Source", "zlib"}, {"Version", "1.2.8"}}); + auto m_pgh = vcpkg::SourceParagraph::parse_control_file({{"Source", "zlib"}, {"Version", "1.2.8"}}); + + Assert::IsTrue(m_pgh.has_value()); + auto& pgh = *m_pgh.get(); Assert::AreEqual("zlib", pgh.name.c_str()); Assert::AreEqual("1.2.8", pgh.version.c_str()); @@ -36,11 +39,12 @@ namespace UnitTest1 TEST_METHOD(SourceParagraph_Construct_Maximum) { - vcpkg::SourceParagraph pgh({{"Source", "s"}, - {"Version", "v"}, - {"Maintainer", "m"}, - {"Description", "d"}, - {"Build-Depends", "bd"}}); + auto m_pgh = vcpkg::SourceParagraph::parse_control_file({ + {"Source", "s"}, {"Version", "v"}, {"Maintainer", "m"}, {"Description", "d"}, {"Build-Depends", "bd"}, + }); + Assert::IsTrue(m_pgh.has_value()); + auto& pgh = *m_pgh.get(); + Assert::AreEqual("s", pgh.name.c_str()); Assert::AreEqual("v", pgh.version.c_str()); Assert::AreEqual("m", pgh.maintainer.c_str()); @@ -51,7 +55,11 @@ namespace UnitTest1 TEST_METHOD(SourceParagraph_Two_Depends) { - vcpkg::SourceParagraph pgh({{"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl"}}); + auto m_pgh = vcpkg::SourceParagraph::parse_control_file({ + {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl"}, + }); + Assert::IsTrue(m_pgh.has_value()); + auto& pgh = *m_pgh.get(); Assert::AreEqual(size_t(2), pgh.depends.size()); Assert::AreEqual("z", pgh.depends[0].name.c_str()); @@ -60,8 +68,11 @@ namespace UnitTest1 TEST_METHOD(SourceParagraph_Three_Depends) { - vcpkg::SourceParagraph pgh( - {{"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl, xyz"}}); + auto m_pgh = vcpkg::SourceParagraph::parse_control_file({ + {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl, xyz"}, + }); + Assert::IsTrue(m_pgh.has_value()); + auto& pgh = *m_pgh.get(); Assert::AreEqual(size_t(3), pgh.depends.size()); Assert::AreEqual("z", pgh.depends[0].name.c_str()); @@ -71,8 +82,11 @@ namespace UnitTest1 TEST_METHOD(SourceParagraph_Construct_Qualified_Depends) { - vcpkg::SourceParagraph pgh( - {{"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "libA [windows], libB [uwp]"}}); + auto m_pgh = vcpkg::SourceParagraph::parse_control_file({ + {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "libA [windows], libB [uwp]"}, + }); + Assert::IsTrue(m_pgh.has_value()); + auto& pgh = *m_pgh.get(); Assert::AreEqual("zlib", pgh.name.c_str()); Assert::AreEqual("1.2.8", pgh.version.c_str()); @@ -101,13 +115,15 @@ namespace UnitTest1 TEST_METHOD(BinaryParagraph_Construct_Maximum) { - vcpkg::BinaryParagraph pgh({{"Package", "s"}, - {"Version", "v"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Maintainer", "m"}, - {"Description", "d"}, - {"Depends", "bd"}}); + vcpkg::BinaryParagraph pgh({ + {"Package", "s"}, + {"Version", "v"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Maintainer", "m"}, + {"Description", "d"}, + {"Depends", "bd"}, + }); Assert::AreEqual("s", pgh.spec.name().c_str()); Assert::AreEqual("v", pgh.version.c_str()); Assert::AreEqual("m", pgh.maintainer.c_str()); @@ -327,28 +343,26 @@ namespace UnitTest1 TEST_METHOD(package_spec_parse) { - vcpkg::Expected spec = + vcpkg::ExpectedT spec = vcpkg::PackageSpec::from_string("zlib", vcpkg::Triplet::X86_WINDOWS); - Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, - vcpkg::to_package_spec_parse_result(spec.error_code())); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, spec.error()); Assert::AreEqual("zlib", spec.get()->name().c_str()); Assert::AreEqual(vcpkg::Triplet::X86_WINDOWS.canonical_name(), spec.get()->triplet().canonical_name()); } TEST_METHOD(package_spec_parse_with_arch) { - vcpkg::Expected spec = + vcpkg::ExpectedT spec = vcpkg::PackageSpec::from_string("zlib:x64-uwp", vcpkg::Triplet::X86_WINDOWS); - Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, - vcpkg::to_package_spec_parse_result(spec.error_code())); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, spec.error()); Assert::AreEqual("zlib", spec.get()->name().c_str()); Assert::AreEqual(vcpkg::Triplet::X64_UWP.canonical_name(), spec.get()->triplet().canonical_name()); } TEST_METHOD(package_spec_parse_with_multiple_colon) { - auto ec = vcpkg::PackageSpec::from_string("zlib:x86-uwp:", vcpkg::Triplet::X86_WINDOWS).error_code(); - Assert::AreEqual(vcpkg::PackageSpecParseResult::TOO_MANY_COLONS, vcpkg::to_package_spec_parse_result(ec)); + auto ec = vcpkg::PackageSpec::from_string("zlib:x86-uwp:", vcpkg::Triplet::X86_WINDOWS).error(); + Assert::AreEqual(vcpkg::PackageSpecParseResult::TOO_MANY_COLONS, ec); } TEST_METHOD(utf8_to_utf16) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 154aefd0a..738b7b284 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -61,10 +61,10 @@ static void inner(const VcpkgCmdArguments& args) const Expected expected_paths = VcpkgPaths::create(vcpkg_root_dir); Checks::check_exit(VCPKG_LINE_INFO, - !expected_paths.error_code(), + !expected_paths.error(), "Error: Invalid vcpkg root directory %s: %s", vcpkg_root_dir.string(), - expected_paths.error_code().message()); + expected_paths.error().message()); const VcpkgPaths paths = expected_paths.value_or_exit(VCPKG_LINE_INFO); int exit_code = _wchdir(paths.root.c_str()); Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed"); diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index acfb55239..ea5832e46 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -174,11 +174,14 @@ namespace vcpkg::Dependencies if (auto bpgh = maybe_bpgh.get()) return InstallPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type}; - Expected maybe_spgh = + ExpectedT maybe_spgh = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); if (auto spgh = maybe_spgh.get()) return InstallPlanAction{spec, {nullopt, nullopt, *spgh}, request_type}; + else + print_error_message(maybe_spgh.error()); + Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec); } }; @@ -283,11 +286,14 @@ namespace vcpkg::Dependencies if (auto bpgh = maybe_bpgh.get()) return ExportPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type}; - Expected maybe_spgh = + ExpectedT maybe_spgh = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); if (auto spgh = maybe_spgh.get()) return ExportPlanAction{spec, {nullopt, nullopt, *spgh}, request_type}; + else + print_error_message(maybe_spgh.error()); + Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec); } }; diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg_Files.cpp index 17aa2997a..7b12ea699 100644 --- a/toolsrc/src/vcpkg_Files.cpp +++ b/toolsrc/src/vcpkg_Files.cpp @@ -15,7 +15,7 @@ namespace vcpkg::Files std::fstream file_stream(file_path, std::ios_base::in | std::ios_base::binary); if (file_stream.fail()) { - return std::errc::no_such_file_or_directory; + return std::make_error_code(std::errc::no_such_file_or_directory); } file_stream.seekg(0, file_stream.end); @@ -24,7 +24,7 @@ namespace vcpkg::Files if (length > SIZE_MAX) { - return std::errc::file_too_large; + return std::make_error_code(std::errc::file_too_large); } std::string output; @@ -39,7 +39,7 @@ namespace vcpkg::Files std::fstream file_stream(file_path, std::ios_base::in | std::ios_base::binary); if (file_stream.fail()) { - return std::errc::no_such_file_or_directory; + return std::make_error_code(std::errc::no_such_file_or_directory); } std::vector output; diff --git a/toolsrc/src/vcpkg_Input.cpp b/toolsrc/src/vcpkg_Input.cpp index 7d8e4767e..df738315b 100644 --- a/toolsrc/src/vcpkg_Input.cpp +++ b/toolsrc/src/vcpkg_Input.cpp @@ -12,14 +12,14 @@ namespace vcpkg::Input CStringView example_text) { const std::string as_lowercase = Strings::ascii_to_lowercase(package_spec_as_string); - Expected expected_spec = PackageSpec::from_string(as_lowercase, default_triplet); + auto expected_spec = PackageSpec::from_string(as_lowercase, default_triplet); if (auto spec = expected_spec.get()) { return *spec; } // Intentionally show the lowercased string - System::println(System::Color::error, "Error: %s: %s", expected_spec.error_code().message(), as_lowercase); + System::println(System::Color::error, "Error: %s: %s", vcpkg::to_string(expected_spec.error()), as_lowercase); System::print(example_text); Checks::exit_fail(VCPKG_LINE_INFO); } -- cgit v1.2.3 From fcf0f331c67a39a758d55c5c841cb81b2dd49289 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Mon, 5 Jun 2017 16:25:04 -0700 Subject: error message vector check --- toolsrc/src/SourceParagraph.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 9516681c9..8a131ef6a 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -50,6 +50,7 @@ namespace vcpkg void print_error_message(std::vector error_info_list) { + if (error_info_list.size() == 0) return; for (ParseControlErrorInfo error_info : error_info_list) { System::println( -- cgit v1.2.3 From 6c09b1dd240cc295c6b123ce3597ae612e872e2d Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Mon, 5 Jun 2017 16:57:35 -0700 Subject: PackageSpecParseResult const ref bug --- toolsrc/include/PackageSpecParseResult.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolsrc/include/PackageSpecParseResult.h b/toolsrc/include/PackageSpecParseResult.h index 17d151626..1462b8073 100644 --- a/toolsrc/include/PackageSpecParseResult.h +++ b/toolsrc/include/PackageSpecParseResult.h @@ -21,7 +21,8 @@ namespace vcpkg constexpr bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; } - PackageSpecParseResult error() const { return m_err; } + const PackageSpecParseResult& error() const { return m_err; } + PackageSpecParseResult& error() { return m_err; } CStringView to_string() const { return vcpkg::to_string(m_err); } -- cgit v1.2.3 From cc443d1c6b10735f9e4e5d439432124ffcfb376f Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Mon, 5 Jun 2017 17:55:06 -0700 Subject: minor changes --- toolsrc/include/SourceParagraph.h | 2 +- toolsrc/src/SourceParagraph.cpp | 2 -- toolsrc/src/commands_build.cpp | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 9874eb3a9..7b0fa3178 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -32,7 +32,7 @@ namespace vcpkg static ExpectedT parse_control_file( std::unordered_map fields); - SourceParagraph(); + SourceParagraph() = default; std::string name; std::string version; diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 8a131ef6a..c77659176 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -37,8 +37,6 @@ namespace vcpkg return valid_fields; } - SourceParagraph::SourceParagraph() = default; - void print_error_message(const ParseControlErrorInfo& info) { System::println( diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index 4a0cee021..294b70b27 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -35,7 +35,7 @@ namespace vcpkg::Commands::BuildCommand const ExpectedT maybe_spgh = Paragraphs::try_load_port(paths.get_filesystem(), port_dir); - // why do we add a const here + if (!maybe_spgh) { print_error_message(maybe_spgh.error()); -- cgit v1.2.3 From 69d5f50ce433750c422446b64b0a45b6b4ea738a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 22 May 2017 20:18:40 -0700 Subject: Install continue --- toolsrc/include/vcpkg_Build.h | 43 ++++++++++-- toolsrc/include/vcpkg_Commands.h | 7 ++ toolsrc/src/commands_build.cpp | 5 +- toolsrc/src/commands_ci.cpp | 55 ++------------- toolsrc/src/commands_install.cpp | 147 ++++++++++++++++++++------------------- toolsrc/src/vcpkg_Build.cpp | 22 +++--- 6 files changed, 141 insertions(+), 138 deletions(-) diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h index e0a5ae1ce..bce1eeb3e 100644 --- a/toolsrc/include/vcpkg_Build.h +++ b/toolsrc/include/vcpkg_Build.h @@ -14,6 +14,38 @@ namespace vcpkg::Build { + enum class UseHeadVersion + { + NO = 0, + YES + }; + + inline UseHeadVersion to_use_head_version(const bool value) + { + return value ? UseHeadVersion::YES : UseHeadVersion::NO; + } + + inline bool to_bool(const UseHeadVersion value) { return value == UseHeadVersion::YES; } + + enum class AllowDownloads + { + NO = 0, + YES + }; + + inline AllowDownloads to_allow_downloads(const bool value) + { + return value ? AllowDownloads::YES : AllowDownloads::NO; + } + + inline bool to_bool(const AllowDownloads value) { return value == AllowDownloads::YES; } + + struct BuildPackageOptions + { + UseHeadVersion use_head_version; + AllowDownloads allow_downloads; + }; + enum class BuildResult { NULLVALUE = 0, @@ -59,17 +91,18 @@ namespace vcpkg::Build struct BuildPackageConfig { - BuildPackageConfig(const SourceParagraph& src, const Triplet& triplet, fs::path&& port_dir) - : src(src), triplet(triplet), port_dir(std::move(port_dir)), use_head_version(false), no_downloads(false) + BuildPackageConfig(const SourceParagraph& src, + const Triplet& triplet, + fs::path&& port_dir, + const BuildPackageOptions& build_package_options) + : src(src), triplet(triplet), port_dir(std::move(port_dir)), build_package_options(build_package_options) { } const SourceParagraph& src; const Triplet& triplet; fs::path port_dir; - - bool use_head_version; - bool no_downloads; + const BuildPackageOptions& build_package_options; }; ExtendedBuildResult build_package(const VcpkgPaths& paths, diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 14d468352..006971e47 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -4,6 +4,8 @@ #include "VcpkgCmdArguments.h" #include "VcpkgPaths.h" #include "VersionT.h" +#include "vcpkg_Build.h" +#include "vcpkg_Dependencies.h" #include namespace vcpkg::Commands @@ -48,6 +50,11 @@ namespace vcpkg::Commands const fs::path& listfile() const; }; + Build::BuildResult perform_install_plan_action(const VcpkgPaths& paths, + const Dependencies::InstallPlanAction& action, + const Build::BuildPackageOptions& install_plan_options, + StatusParagraphs& status_db); + void install_files_and_write_listfile(Files::Filesystem& fs, const fs::path& source_dir, const InstallDir& dirs); diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index 294b70b27..5a5cd462e 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -50,9 +50,8 @@ namespace vcpkg::Commands::BuildCommand spec.name()); StatusParagraphs status_db = database_load_check(paths); - const Build::BuildPackageConfig build_config{ - spgh, spec.triplet(), paths.port_dir(spec), - }; + Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; + const Build::BuildPackageConfig build_config{spgh, spec.triplet(), paths.port_dir(spec), build_package_options}; const auto result = Build::build_package(paths, build_config, status_db); if (result.code == BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES) { diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp index e9755335c..bad1286f0 100644 --- a/toolsrc/src/commands_ci.cpp +++ b/toolsrc/src/commands_ci.cpp @@ -50,6 +50,8 @@ namespace vcpkg::Commands::CI const ElapsedTime timer = ElapsedTime::create_started(); size_t counter = 0; const size_t package_count = install_plan.size(); + const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; + for (const InstallPlanAction& action : install_plan) { const ElapsedTime build_timer = ElapsedTime::create_started(); @@ -60,55 +62,10 @@ namespace vcpkg::Commands::CI timing.push_back("0"); results.push_back(BuildResult::NULLVALUE); - try - { - switch (action.plan_type) - { - case InstallPlanType::ALREADY_INSTALLED: - results.back() = BuildResult::SUCCEEDED; - System::println(System::Color::success, "Package %s is already installed", display_name); - break; - case InstallPlanType::BUILD_AND_INSTALL: - { - System::println("Building package %s... ", display_name); - auto&& source_paragraph = action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO); - const Build::BuildPackageConfig build_config{ - source_paragraph, action.spec.triplet(), paths.port_dir(action.spec), - }; - const auto result_ex = Build::build_package(paths, build_config, status_db); - const auto result = result_ex.code; - - timing.back() = build_timer.to_string(); - results.back() = result; - if (result != BuildResult::SUCCEEDED) - { - System::println(System::Color::error, Build::create_error_message(result, action.spec)); - continue; - } - System::println(System::Color::success, "Building package %s... done", display_name); - - const BinaryParagraph bpgh = - Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); - System::println("Installing package %s... ", display_name); - Install::install_package(paths, bpgh, &status_db); - System::println(System::Color::success, "Installing package %s... done", display_name); - break; - } - case InstallPlanType::INSTALL: - results.back() = BuildResult::SUCCEEDED; - System::println("Installing package %s... ", display_name); - Install::install_package( - paths, action.any_paragraph.binary_paragraph.value_or_exit(VCPKG_LINE_INFO), &status_db); - System::println(System::Color::success, "Installing package %s... done", display_name); - break; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - catch (const std::exception& e) - { - System::println(System::Color::error, "Error: Could not install package %s: %s", action.spec, e.what()); - results.back() = BuildResult::NULLVALUE; - } + const BuildResult result = + Install::perform_install_plan_action(paths, action, install_plan_options, status_db); + timing.back() = build_timer.to_string(); + results.back() = result; System::println("Elapsed time for package %s: %s", action.spec, build_timer.to_string()); } diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index bebe6a3a2..73b3e9eab 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -263,6 +263,77 @@ namespace vcpkg::Commands::Install status_db->insert(std::make_unique(source_paragraph)); } + using Build::BuildResult; + + BuildResult perform_install_plan_action(const VcpkgPaths& paths, + const InstallPlanAction& action, + const Build::BuildPackageOptions& build_package_options, + StatusParagraphs& status_db) + { + const InstallPlanType& plan_type = action.plan_type; + const std::string display_name = action.spec.to_string(); + + const bool is_user_requested = action.request_type == RequestType::USER_REQUESTED; + const bool use_head_version = to_bool(build_package_options.use_head_version); + + if (plan_type == InstallPlanType::ALREADY_INSTALLED) + { + if (use_head_version && is_user_requested) + { + System::println( + System::Color::warning, "Package %s is already installed -- not building from HEAD", display_name); + } + else + { + System::println(System::Color::success, "Package %s is already installed", display_name); + } + return BuildResult::SUCCEEDED; + } + + if (plan_type == InstallPlanType::BUILD_AND_INSTALL) + { + if (use_head_version) + System::println("Building package %s from HEAD... ", display_name); + else + System::println("Building package %s... ", display_name); + + const Build::BuildPackageConfig build_config{ + action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO), + action.spec.triplet(), + paths.port_dir(action.spec), + build_package_options}; + const auto result = Build::build_package(paths, build_config, status_db); + if (result.code != Build::BuildResult::SUCCEEDED) + { + System::println(System::Color::error, Build::create_error_message(result.code, action.spec)); + return result.code; + } + System::println("Building package %s... done", display_name); + + const BinaryParagraph bpgh = + Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); + System::println("Installing package %s... ", display_name); + install_package(paths, bpgh, &status_db); + System::println(System::Color::success, "Installing package %s... done", display_name); + return BuildResult::SUCCEEDED; + } + + if (plan_type == InstallPlanType::INSTALL) + { + if (use_head_version && is_user_requested) + { + System::println( + System::Color::warning, "Package %s is already built -- not building from HEAD", display_name); + } + System::println("Installing package %s... ", display_name); + install_package(paths, action.any_paragraph.binary_paragraph.value_or_exit(VCPKG_LINE_INFO), &status_db); + System::println(System::Color::success, "Installing package %s... done", display_name); + return BuildResult::SUCCEEDED; + } + + Checks::unreachable(VCPKG_LINE_INFO); + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { static const std::string OPTION_DRY_RUN = "--dry-run"; @@ -315,80 +386,16 @@ namespace vcpkg::Commands::Install Checks::exit_success(VCPKG_LINE_INFO); } + const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version), + Build::to_allow_downloads(!no_downloads)}; + // execute the plan for (const InstallPlanAction& action : install_plan) { - const std::string display_name = action.spec.to_string(); - - try - { - switch (action.plan_type) - { - case InstallPlanType::ALREADY_INSTALLED: - if (use_head_version && action.request_type == RequestType::USER_REQUESTED) - { - System::println(System::Color::warning, - "Package %s is already installed -- not building from HEAD", - display_name); - } - else - { - System::println(System::Color::success, "Package %s is already installed", display_name); - } - break; - case InstallPlanType::BUILD_AND_INSTALL: - { - Build::BuildPackageConfig build_config{ - action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO), - action.spec.triplet(), - paths.port_dir(action.spec), - }; - - build_config.use_head_version = - use_head_version && action.request_type == RequestType::USER_REQUESTED; - build_config.no_downloads = no_downloads; - - if (build_config.use_head_version) - System::println("Building package %s from HEAD... ", display_name); - else - System::println("Building package %s... ", display_name); - - const auto result = Build::build_package(paths, build_config, status_db); - if (result.code != Build::BuildResult::SUCCEEDED) - { - System::println(System::Color::error, - Build::create_error_message(result.code, action.spec)); - System::println(Build::create_user_troubleshooting_message(action.spec)); - Checks::exit_fail(VCPKG_LINE_INFO); - } - System::println("Building package %s... done", display_name); - - const BinaryParagraph bpgh = - Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); - System::println("Installing package %s... ", display_name); - install_package(paths, bpgh, &status_db); - System::println(System::Color::success, "Installing package %s... done", display_name); - break; - } - case InstallPlanType::INSTALL: - if (use_head_version && action.request_type == RequestType::USER_REQUESTED) - { - System::println(System::Color::warning, - "Package %s is already built -- not building from HEAD", - display_name); - } - System::println("Installing package %s... ", display_name); - install_package( - paths, action.any_paragraph.binary_paragraph.value_or_exit(VCPKG_LINE_INFO), &status_db); - System::println(System::Color::success, "Installing package %s... done", display_name); - break; - case InstallPlanType::UNKNOWN: - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - catch (const std::exception& e) + const BuildResult result = perform_install_plan_action(paths, action, install_plan_options, status_db); + if (result != BuildResult::SUCCEEDED) { - System::println(System::Color::error, "Error: Could not install package %s: %s", action.spec, e.what()); + System::println(Build::create_user_troubleshooting_message(action.spec)); Checks::exit_fail(VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index 817febe2f..91e4552ec 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -132,17 +132,17 @@ namespace vcpkg::Build const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset); const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); - const std::wstring cmd_launch_cmake = - make_cmake_cmd(cmake_exe_path, - ports_cmake_script_path, - {{L"CMD", L"BUILD"}, - {L"PORT", config.src.name}, - {L"CURRENT_PORT_DIR", config.port_dir / "/."}, - {L"TARGET_TRIPLET", triplet.canonical_name()}, - {L"VCPKG_PLATFORM_TOOLSET", toolset.version}, - {L"VCPKG_USE_HEAD_VERSION", config.use_head_version ? L"1" : L"0"}, - {L"_VCPKG_NO_DOWNLOADS", config.no_downloads ? L"1" : L"0"}, - {L"GIT", git_exe_path}}); + const std::wstring cmd_launch_cmake = make_cmake_cmd( + cmake_exe_path, + ports_cmake_script_path, + {{L"CMD", L"BUILD"}, + {L"PORT", config.src.name}, + {L"CURRENT_PORT_DIR", config.port_dir / "/."}, + {L"TARGET_TRIPLET", triplet.canonical_name()}, + {L"VCPKG_PLATFORM_TOOLSET", toolset.version}, + {L"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? L"1" : L"0"}, + {L"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? L"1" : L"0"}, + {L"GIT", git_exe_path}}); const std::wstring command = Strings::wformat(LR"(%s && %s)", cmd_set_environment, cmd_launch_cmake); -- cgit v1.2.3 From a8edf0710cd8a52abd8b88ff0ebe159621c3b206 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 6 Jun 2017 15:50:44 -0700 Subject: Add missing #include --- toolsrc/include/PostBuildLint_LinkageType.h | 1 + 1 file changed, 1 insertion(+) diff --git a/toolsrc/include/PostBuildLint_LinkageType.h b/toolsrc/include/PostBuildLint_LinkageType.h index 8d19dc5a4..383cd0ffb 100644 --- a/toolsrc/include/PostBuildLint_LinkageType.h +++ b/toolsrc/include/PostBuildLint_LinkageType.h @@ -1,6 +1,7 @@ #pragma once #include "CStringView.h" #include +#include namespace vcpkg::PostBuildLint { -- cgit v1.2.3 From 831f0631f7eea7aebad5fcce95c0bbf0e0cdff68 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Jun 2017 16:08:36 -0700 Subject: [vcpkg] Added parser support for 'Supports' field --- toolsrc/include/SourceParagraph.h | 37 +++++++++++++++++- toolsrc/include/vcpkg_Util.h | 6 +++ toolsrc/src/BinaryParagraph.cpp | 2 +- toolsrc/src/SourceParagraph.cpp | 80 +++++++++++++++++++++++++++++--------- toolsrc/src/tests_dependencies.cpp | 65 ++++++++++++++++++++++++++++++- toolsrc/src/tests_paragraph.cpp | 23 ++++++++++- 6 files changed, 189 insertions(+), 24 deletions(-) diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 7b0fa3178..a53158f3f 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -1,6 +1,9 @@ #pragma once +#include "vcpkg_System.h" #include "vcpkg_expected.h" + +#include #include #include @@ -38,6 +41,7 @@ namespace vcpkg std::string version; std::string description; std::string maintainer; + std::vector supports; std::vector depends; }; @@ -47,5 +51,36 @@ namespace vcpkg std::vector filter_dependencies(const std::vector& deps, const Triplet& t); std::vector expand_qualified_dependencies(const std::vector& depends); - std::vector parse_depends(const std::string& depends_string); + std::vector parse_comma_list(const std::string& str); + + struct Supports + { + static ExpectedT> parse(const std::vector& strs); + + using Architecture = System::CPUArchitecture; + + enum class Platform + { + WINDOWS, + UWP, + }; + enum class Linkage + { + DYNAMIC, + STATIC, + }; + enum class ToolsetVersion + { + V140, + V141, + }; + + bool supports(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools); + + private: + std::vector architectures; + std::vector platforms; + std::vector crt_linkages; + std::vector toolsets; + }; } diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg_Util.h index 6648302ac..1bd1bcc4a 100644 --- a/toolsrc/include/vcpkg_Util.h +++ b/toolsrc/include/vcpkg_Util.h @@ -34,6 +34,12 @@ namespace vcpkg::Util cont.erase(std::remove_if(cont.begin(), cont.end(), pred), cont.end()); } + template + auto find(const Container& cont, V&& v) + { + return std::find(cont.cbegin(), cont.cend(), v); + } + template auto find_if(const Container& cont, Pred pred) { diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp index d545eee2a..21980cd7d 100644 --- a/toolsrc/src/BinaryParagraph.cpp +++ b/toolsrc/src/BinaryParagraph.cpp @@ -42,7 +42,7 @@ namespace vcpkg Checks::check_exit(VCPKG_LINE_INFO, multi_arch == "same", "Multi-Arch must be 'same' but was %s", multi_arch); std::string deps = details::remove_optional_field(&fields, BinaryParagraphOptionalField::DEPENDS); - this->depends = parse_depends(deps); + this->depends = parse_comma_list(deps); } BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet) diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index c77659176..2508af1e8 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -5,6 +5,7 @@ #include "vcpkg_Checks.h" #include "vcpkg_Maps.h" #include "vcpkg_System.h" +#include "vcpkg_Util.h" #include "vcpkg_expected.h" #include "vcpkglib_helpers.h" @@ -23,6 +24,7 @@ namespace vcpkg static const std::string DESCRIPTION = "Description"; static const std::string MAINTAINER = "Maintainer"; static const std::string BUILD_DEPENDS = "Build-Depends"; + static const std::string SUPPORTS = "Supports"; } static const std::vector& get_list_of_valid_fields() @@ -32,7 +34,8 @@ namespace vcpkg SourceParagraphOptionalField::DESCRIPTION, SourceParagraphOptionalField::MAINTAINER, - SourceParagraphOptionalField::BUILD_DEPENDS}; + SourceParagraphOptionalField::BUILD_DEPENDS, + SourceParagraphOptionalField::SUPPORTS}; return valid_fields; } @@ -72,7 +75,10 @@ namespace vcpkg sparagraph.maintainer = details::remove_optional_field(&fields, SourceParagraphOptionalField::MAINTAINER); std::string deps = details::remove_optional_field(&fields, SourceParagraphOptionalField::BUILD_DEPENDS); - sparagraph.depends = expand_qualified_dependencies(parse_depends(deps)); + sparagraph.depends = expand_qualified_dependencies(parse_comma_list(deps)); + + std::string sups = details::remove_optional_field(&fields, SourceParagraphOptionalField::SUPPORTS); + sparagraph.supports = parse_comma_list(sups); if (!fields.empty()) { @@ -89,7 +95,7 @@ namespace vcpkg std::vector vcpkg::expand_qualified_dependencies(const std::vector& depends) { - auto convert = [&](const std::string& depend_string) -> Dependency { + return Util::fmap(depends, [&](const std::string& depend_string) -> Dependency { auto pos = depend_string.find(' '); if (pos == std::string::npos) return {depend_string, ""}; // expect of the form "\w+ \[\w+\]" @@ -102,21 +108,12 @@ namespace vcpkg } dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3); return dep; - }; - - std::vector ret; - - for (auto&& depend_string : depends) - { - ret.push_back(convert(depend_string)); - } - - return ret; + }); } - std::vector parse_depends(const std::string& depends_string) + std::vector parse_comma_list(const std::string& str) { - if (depends_string.empty()) + if (str.empty()) { return {}; } @@ -126,17 +123,17 @@ namespace vcpkg size_t cur = 0; do { - auto pos = depends_string.find(',', cur); + auto pos = str.find(',', cur); if (pos == std::string::npos) { - out.push_back(depends_string.substr(cur)); + out.push_back(str.substr(cur)); break; } - out.push_back(depends_string.substr(cur, pos - cur)); + out.push_back(str.substr(cur, pos - cur)); // skip comma and space ++pos; - if (depends_string[pos] == ' ') + if (str[pos] == ' ') { ++pos; } @@ -161,4 +158,49 @@ namespace vcpkg } const std::string& to_string(const Dependency& dep) { return dep.name; } + + ExpectedT> Supports::parse(const std::vector& strs) + { + Supports ret; + std::vector unrecognized; + + for (auto&& str : strs) + { + if (str == "x64") + ret.architectures.push_back(Architecture::X64); + else if (str == "x86") + ret.architectures.push_back(Architecture::X86); + else if (str == "arm") + ret.architectures.push_back(Architecture::ARM); + else if (str == "windows") + ret.platforms.push_back(Platform::WINDOWS); + else if (str == "uwp") + ret.platforms.push_back(Platform::UWP); + else if (str == "v140") + ret.toolsets.push_back(ToolsetVersion::V140); + else if (str == "v141") + ret.toolsets.push_back(ToolsetVersion::V141); + else if (str == "crt-static") + ret.crt_linkages.push_back(Linkage::STATIC); + else if (str == "crt-dynamic") + ret.crt_linkages.push_back(Linkage::DYNAMIC); + else + unrecognized.push_back(str); + } + + if (unrecognized.empty()) + return std::move(ret); + else + return std::move(unrecognized); + } + + bool Supports::supports(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools) + { + auto is_in_or_empty = [](auto v, auto&& c) -> bool { return c.empty() || c.end() != Util::find(c, v); }; + if (!is_in_or_empty(arch, architectures)) return false; + if (!is_in_or_empty(plat, platforms)) return false; + if (!is_in_or_empty(crt, crt_linkages)) return false; + if (!is_in_or_empty(tools, toolsets)) return false; + return true; + } } diff --git a/toolsrc/src/tests_dependencies.cpp b/toolsrc/src/tests_dependencies.cpp index 3aabed80e..fdf2afea8 100644 --- a/toolsrc/src/tests_dependencies.cpp +++ b/toolsrc/src/tests_dependencies.cpp @@ -15,7 +15,7 @@ namespace UnitTest1 { TEST_METHOD(parse_depends_one) { - auto v = expand_qualified_dependencies(parse_depends("libA [windows]")); + auto v = expand_qualified_dependencies(parse_comma_list("libA [windows]")); Assert::AreEqual(size_t(1), v.size()); Assert::AreEqual("libA", v[0].name.c_str()); Assert::AreEqual("windows", v[0].qualifier.c_str()); @@ -23,7 +23,7 @@ namespace UnitTest1 TEST_METHOD(filter_depends) { - auto deps = expand_qualified_dependencies(parse_depends("libA [windows], libB, libC [uwp]")); + auto deps = expand_qualified_dependencies(parse_comma_list("libA [windows], libB, libC [uwp]")); auto v = filter_dependencies(deps, Triplet::X64_WINDOWS); Assert::AreEqual(size_t(2), v.size()); Assert::AreEqual("libA", v[0].c_str()); @@ -35,4 +35,65 @@ namespace UnitTest1 Assert::AreEqual("libC", v2[1].c_str()); } }; + + class SupportsTests : public TestClass + { + TEST_METHOD(parse_supports_all) + { + auto v = Supports::parse({ + "x64", "x86", "arm", "windows", "uwp", "v140", "v141", "crt-static", "crt-dynamic", + }); + Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get())); + + Assert::IsTrue(v.get()->supports(System::CPUArchitecture::X64, + Supports::Platform::UWP, + Supports::Linkage::DYNAMIC, + Supports::ToolsetVersion::V140)); + Assert::IsTrue(v.get()->supports(System::CPUArchitecture::ARM, + Supports::Platform::WINDOWS, + Supports::Linkage::STATIC, + Supports::ToolsetVersion::V141)); + } + + TEST_METHOD(parse_supports_invalid) + { + auto v = Supports::parse({"arm64"}); + Assert::AreEqual(uintptr_t(0), uintptr_t(v.get())); + Assert::AreEqual(size_t(1), v.error().size()); + Assert::AreEqual("arm64", v.error()[0].c_str()); + } + + TEST_METHOD(parse_supports_case_sensitive) + { + auto v = Supports::parse({"Windows"}); + Assert::AreEqual(uintptr_t(0), uintptr_t(v.get())); + Assert::AreEqual(size_t(1), v.error().size()); + Assert::AreEqual("Windows", v.error()[0].c_str()); + } + + TEST_METHOD(parse_supports_some) + { + auto v = Supports::parse({ + "x64", "x86", "windows", + }); + Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get())); + + Assert::IsTrue(v.get()->supports(System::CPUArchitecture::X64, + Supports::Platform::WINDOWS, + Supports::Linkage::DYNAMIC, + Supports::ToolsetVersion::V140)); + Assert::IsFalse(v.get()->supports(System::CPUArchitecture::ARM, + Supports::Platform::WINDOWS, + Supports::Linkage::DYNAMIC, + Supports::ToolsetVersion::V140)); + Assert::IsFalse(v.get()->supports(System::CPUArchitecture::X64, + Supports::Platform::UWP, + Supports::Linkage::DYNAMIC, + Supports::ToolsetVersion::V140)); + Assert::IsTrue(v.get()->supports(System::CPUArchitecture::X64, + Supports::Platform::WINDOWS, + Supports::Linkage::STATIC, + Supports::ToolsetVersion::V141)); + } + }; } diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests_paragraph.cpp index 1c77b437b..374e4ddd1 100644 --- a/toolsrc/src/tests_paragraph.cpp +++ b/toolsrc/src/tests_paragraph.cpp @@ -40,7 +40,12 @@ namespace UnitTest1 TEST_METHOD(SourceParagraph_Construct_Maximum) { auto m_pgh = vcpkg::SourceParagraph::parse_control_file({ - {"Source", "s"}, {"Version", "v"}, {"Maintainer", "m"}, {"Description", "d"}, {"Build-Depends", "bd"}, + {"Source", "s"}, + {"Version", "v"}, + {"Maintainer", "m"}, + {"Description", "d"}, + {"Build-Depends", "bd"}, + {"Supports", "x64"}, }); Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); @@ -51,6 +56,8 @@ namespace UnitTest1 Assert::AreEqual("d", pgh.description.c_str()); Assert::AreEqual(size_t(1), pgh.depends.size()); Assert::AreEqual("bd", pgh.depends[0].name.c_str()); + Assert::AreEqual(size_t(1), pgh.supports.size()); + Assert::AreEqual("x64", pgh.supports[0].c_str()); } TEST_METHOD(SourceParagraph_Two_Depends) @@ -80,6 +87,20 @@ namespace UnitTest1 Assert::AreEqual("xyz", pgh.depends[2].name.c_str()); } + TEST_METHOD(SourceParagraph_Three_Supports) + { + auto m_pgh = vcpkg::SourceParagraph::parse_control_file({ + {"Source", "zlib"}, {"Version", "1.2.8"}, {"Supports", "x64, windows, uwp"}, + }); + Assert::IsTrue(m_pgh.has_value()); + auto& pgh = *m_pgh.get(); + + Assert::AreEqual(size_t(3), pgh.supports.size()); + Assert::AreEqual("x64", pgh.supports[0].c_str()); + Assert::AreEqual("windows", pgh.supports[1].c_str()); + Assert::AreEqual("uwp", pgh.supports[2].c_str()); + } + TEST_METHOD(SourceParagraph_Construct_Qualified_Depends) { auto m_pgh = vcpkg::SourceParagraph::parse_control_file({ -- cgit v1.2.3 From 9a698d7088beb3fa32b1b9d0321781c0ba07e18e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 6 Jun 2017 16:30:01 -0700 Subject: Convert BuildType/Configuration Type into simple enum classes --- toolsrc/include/PostBuildLint_BuildType.h | 32 ++++++++++++------- toolsrc/include/PostBuildLint_ConfigurationType.h | 36 --------------------- toolsrc/include/PostBuildLint_LinkageType.h | 39 ----------------------- toolsrc/include/vcpkg_Build.h | 14 ++++++-- toolsrc/src/PostBuildLint.cpp | 15 ++++----- toolsrc/src/PostBuildLint_BuildType.cpp | 12 +++---- toolsrc/src/PostBuildLint_ConfigurationType.cpp | 24 -------------- toolsrc/src/PostBuildLint_LinkageType.cpp | 39 ----------------------- toolsrc/src/vcpkg_Build.cpp | 31 ++++++++++-------- toolsrc/vcpkglib/vcpkglib.vcxproj | 4 --- toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 12 ------- 11 files changed, 62 insertions(+), 196 deletions(-) delete mode 100644 toolsrc/include/PostBuildLint_ConfigurationType.h delete mode 100644 toolsrc/include/PostBuildLint_LinkageType.h delete mode 100644 toolsrc/src/PostBuildLint_ConfigurationType.cpp delete mode 100644 toolsrc/src/PostBuildLint_LinkageType.cpp diff --git a/toolsrc/include/PostBuildLint_BuildType.h b/toolsrc/include/PostBuildLint_BuildType.h index 58bb20766..38ad3084e 100644 --- a/toolsrc/include/PostBuildLint_BuildType.h +++ b/toolsrc/include/PostBuildLint_BuildType.h @@ -1,12 +1,17 @@ #pragma once #include "CStringView.h" -#include "PostBuildLint_ConfigurationType.h" -#include "PostBuildLint_LinkageType.h" +#include "vcpkg_Build.h" #include #include namespace vcpkg::PostBuildLint { + enum class ConfigurationType + { + DEBUG, + RELEASE, + }; + struct BuildType { enum class BackingEnum @@ -17,11 +22,13 @@ namespace vcpkg::PostBuildLint RELEASE_DYNAMIC }; - static BuildType value_of(const ConfigurationType& config, const LinkageType& linkage); + static BuildType value_of(const ConfigurationType& config, const Build::LinkageType& linkage); BuildType() = delete; - constexpr BuildType(const BackingEnum backing_enum, const ConfigurationType config, const LinkageType linkage) + constexpr BuildType(const BackingEnum backing_enum, + const ConfigurationType config, + const Build::LinkageType linkage) : backing_enum(backing_enum), m_config(config), m_linkage(linkage) { } @@ -29,28 +36,29 @@ namespace vcpkg::PostBuildLint constexpr operator BackingEnum() const { return backing_enum; } const ConfigurationType& config() const; - const LinkageType& linkage() const; + const Build::LinkageType& linkage() const; const std::regex& crt_regex() const; const std::string& to_string() const; private: BackingEnum backing_enum; ConfigurationType m_config; - LinkageType m_linkage; + Build::LinkageType m_linkage; }; namespace BuildTypeC { - namespace CC = ConfigurationTypeC; - namespace LC = LinkageTypeC; + using Build::LinkageType; using BE = BuildType::BackingEnum; static constexpr CStringView ENUM_NAME = "vcpkg::PostBuildLint::BuildType"; - static constexpr BuildType DEBUG_STATIC = {BE::DEBUG_STATIC, CC::DEBUG, LC::STATIC}; - static constexpr BuildType DEBUG_DYNAMIC = {BE::DEBUG_DYNAMIC, CC::DEBUG, LC::DYNAMIC}; - static constexpr BuildType RELEASE_STATIC = {BE::RELEASE_STATIC, CC::RELEASE, LC::STATIC}; - static constexpr BuildType RELEASE_DYNAMIC = {BE::RELEASE_DYNAMIC, CC::RELEASE, LC::DYNAMIC}; + static constexpr BuildType DEBUG_STATIC = {BE::DEBUG_STATIC, ConfigurationType::DEBUG, LinkageType::STATIC}; + static constexpr BuildType DEBUG_DYNAMIC = {BE::DEBUG_DYNAMIC, ConfigurationType::DEBUG, LinkageType::DYNAMIC}; + static constexpr BuildType RELEASE_STATIC = { + BE::RELEASE_STATIC, ConfigurationType::RELEASE, LinkageType::STATIC}; + static constexpr BuildType RELEASE_DYNAMIC = { + BE::RELEASE_DYNAMIC, ConfigurationType::RELEASE, LinkageType::DYNAMIC}; static constexpr std::array VALUES = { DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC}; diff --git a/toolsrc/include/PostBuildLint_ConfigurationType.h b/toolsrc/include/PostBuildLint_ConfigurationType.h deleted file mode 100644 index 8157415b0..000000000 --- a/toolsrc/include/PostBuildLint_ConfigurationType.h +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once -#include "CStringView.h" -#include - -namespace vcpkg::PostBuildLint -{ - struct ConfigurationType - { - enum class BackingEnum - { - NULLVALUE = 0, - DEBUG = 1, - RELEASE = 2 - }; - - constexpr ConfigurationType() : backing_enum(BackingEnum::NULLVALUE) {} - constexpr explicit ConfigurationType(BackingEnum backing_enum) : backing_enum(backing_enum) {} - constexpr operator BackingEnum() const { return backing_enum; } - - const std::string& to_string() const; - - private: - BackingEnum backing_enum; - }; - - namespace ConfigurationTypeC - { - static constexpr CStringView ENUM_NAME = "vcpkg::PostBuildLint::ConfigurationType"; - - static constexpr ConfigurationType NULLVALUE(ConfigurationType::BackingEnum::NULLVALUE); - static constexpr ConfigurationType DEBUG(ConfigurationType::BackingEnum::DEBUG); - static constexpr ConfigurationType RELEASE(ConfigurationType::BackingEnum::RELEASE); - - static constexpr std::array VALUES = {DEBUG, RELEASE}; - } -} diff --git a/toolsrc/include/PostBuildLint_LinkageType.h b/toolsrc/include/PostBuildLint_LinkageType.h deleted file mode 100644 index 383cd0ffb..000000000 --- a/toolsrc/include/PostBuildLint_LinkageType.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once -#include "CStringView.h" -#include -#include - -namespace vcpkg::PostBuildLint -{ - struct LinkageType final - { - enum class BackingEnum - { - NULLVALUE = 0, - DYNAMIC, - STATIC - }; - - static LinkageType value_of(const std::string& as_string); - - constexpr LinkageType() : backing_enum(BackingEnum::NULLVALUE) {} - constexpr explicit LinkageType(BackingEnum backing_enum) : backing_enum(backing_enum) {} - constexpr operator BackingEnum() const { return backing_enum; } - - const std::string& to_string() const; - - private: - BackingEnum backing_enum; - }; - - namespace LinkageTypeC - { - static constexpr CStringView ENUM_NAME = "vcpkg::PostBuildLint::LinkageType"; - - static constexpr LinkageType NULLVALUE(LinkageType::BackingEnum::NULLVALUE); - static constexpr LinkageType DYNAMIC(LinkageType::BackingEnum::DYNAMIC); - static constexpr LinkageType STATIC(LinkageType::BackingEnum::STATIC); - - static constexpr std::array VALUES = {DYNAMIC, STATIC}; - } -} diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h index bce1eeb3e..e13f66029 100644 --- a/toolsrc/include/vcpkg_Build.h +++ b/toolsrc/include/vcpkg_Build.h @@ -2,12 +2,12 @@ #include "CStringView.h" #include "PackageSpec.h" -#include "PostBuildLint_LinkageType.h" #include "StatusParagraphs.h" #include "VcpkgPaths.h" #include "vcpkg_Files.h" #include "vcpkg_optional.h" +#include #include #include #include @@ -141,10 +141,18 @@ namespace vcpkg::Build std::map m_policies; }; + enum class LinkageType : char + { + DYNAMIC, + STATIC, + }; + + Optional to_linkage_type(const std::string& str); + struct BuildInfo { - PostBuildLint::LinkageType crt_linkage; - PostBuildLint::LinkageType library_linkage; + LinkageType crt_linkage; + LinkageType library_linkage; Optional version; diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 363346ab6..82d50a68f 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -777,7 +777,7 @@ namespace vcpkg::PostBuildLint switch (build_info.library_linkage) { - case LinkageType::BackingEnum::DYNAMIC: + case Build::LinkageType::DYNAMIC: { std::vector debug_dlls = fs.get_files_recursive(debug_bin_dir); Util::unstable_keep_if(debug_dlls, has_extension_pred(fs, ".dll")); @@ -802,7 +802,7 @@ namespace vcpkg::PostBuildLint error_count += check_outdated_crt_linkage_of_dlls(dlls, toolset.dumpbin, build_info); break; } - case LinkageType::BackingEnum::STATIC: + case Build::LinkageType::STATIC: { std::vector dlls = fs.get_files_recursive(package_dir); Util::unstable_keep_if(dlls, has_extension_pred(fs, ".dll")); @@ -812,18 +812,17 @@ namespace vcpkg::PostBuildLint if (!build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT)) { - error_count += check_crt_linkage_of_libs( - BuildType::value_of(ConfigurationTypeC::DEBUG, build_info.crt_linkage), - debug_libs, - toolset.dumpbin); + error_count += + check_crt_linkage_of_libs(BuildType::value_of(ConfigurationType::DEBUG, build_info.crt_linkage), + debug_libs, + toolset.dumpbin); } error_count += - check_crt_linkage_of_libs(BuildType::value_of(ConfigurationTypeC::RELEASE, build_info.crt_linkage), + check_crt_linkage_of_libs(BuildType::value_of(ConfigurationType::RELEASE, build_info.crt_linkage), release_libs, toolset.dumpbin); break; } - case LinkageType::BackingEnum::NULLVALUE: default: Checks::unreachable(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/PostBuildLint_BuildType.cpp b/toolsrc/src/PostBuildLint_BuildType.cpp index e690036d2..649f0ccca 100644 --- a/toolsrc/src/PostBuildLint_BuildType.cpp +++ b/toolsrc/src/PostBuildLint_BuildType.cpp @@ -5,24 +5,24 @@ namespace vcpkg::PostBuildLint { - BuildType BuildType::value_of(const ConfigurationType& config, const LinkageType& linkage) + BuildType BuildType::value_of(const ConfigurationType& config, const Build::LinkageType& linkage) { - if (config == ConfigurationTypeC::DEBUG && linkage == LinkageTypeC::STATIC) + if (config == ConfigurationType::DEBUG && linkage == Build::LinkageType::STATIC) { return BuildTypeC::DEBUG_STATIC; } - if (config == ConfigurationTypeC::DEBUG && linkage == LinkageTypeC::DYNAMIC) + if (config == ConfigurationType::DEBUG && linkage == Build::LinkageType::DYNAMIC) { return BuildTypeC::DEBUG_DYNAMIC; } - if (config == ConfigurationTypeC::RELEASE && linkage == LinkageTypeC::STATIC) + if (config == ConfigurationType::RELEASE && linkage == Build::LinkageType::STATIC) { return BuildTypeC::RELEASE_STATIC; } - if (config == ConfigurationTypeC::RELEASE && linkage == LinkageTypeC::DYNAMIC) + if (config == ConfigurationType::RELEASE && linkage == Build::LinkageType::DYNAMIC) { return BuildTypeC::RELEASE_DYNAMIC; } @@ -32,7 +32,7 @@ namespace vcpkg::PostBuildLint const ConfigurationType& BuildType::config() const { return this->m_config; } - const LinkageType& BuildType::linkage() const { return this->m_linkage; } + const Build::LinkageType& BuildType::linkage() const { return this->m_linkage; } const std::regex& BuildType::crt_regex() const { diff --git a/toolsrc/src/PostBuildLint_ConfigurationType.cpp b/toolsrc/src/PostBuildLint_ConfigurationType.cpp deleted file mode 100644 index eeccb1804..000000000 --- a/toolsrc/src/PostBuildLint_ConfigurationType.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "pch.h" - -#include "PackageSpec.h" -#include "PostBuildLint_ConfigurationType.h" -#include "vcpkg_Enums.h" - -namespace vcpkg::PostBuildLint -{ - static const std::string NULLVALUE_STRING = Enums::nullvalue_to_string(ConfigurationTypeC::ENUM_NAME); - - static const std::string NAME_DEBUG = "Debug"; - static const std::string NAME_RELEASE = "Release"; - - const std::string& ConfigurationType::to_string() const - { - switch (this->backing_enum) - { - case ConfigurationTypeC::DEBUG: return NAME_DEBUG; - case ConfigurationTypeC::RELEASE: return NAME_RELEASE; - case ConfigurationTypeC::NULLVALUE: return NULLVALUE_STRING; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } -} diff --git a/toolsrc/src/PostBuildLint_LinkageType.cpp b/toolsrc/src/PostBuildLint_LinkageType.cpp deleted file mode 100644 index 43bdbed7b..000000000 --- a/toolsrc/src/PostBuildLint_LinkageType.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "pch.h" - -#include "PostBuildLint_LinkageType.h" -#include "vcpkg_Checks.h" -#include "vcpkg_Enums.h" - -namespace vcpkg::PostBuildLint -{ - static const std::string NULLVALUE_STRING = Enums::nullvalue_to_string(LinkageTypeC::ENUM_NAME); - - static const std::string NAME_DYNAMIC = "dynamic"; - static const std::string NAME_STATIC = "static"; - - LinkageType LinkageType::value_of(const std::string& as_string) - { - if (as_string == NAME_DYNAMIC) - { - return LinkageTypeC::DYNAMIC; - } - - if (as_string == NAME_STATIC) - { - return LinkageTypeC::STATIC; - } - - return LinkageTypeC::NULLVALUE; - } - - const std::string& LinkageType::to_string() const - { - switch (this->backing_enum) - { - case LinkageTypeC::DYNAMIC: return NAME_DYNAMIC; - case LinkageTypeC::STATIC: return NAME_STATIC; - case LinkageTypeC::NULLVALUE: return NULLVALUE_STRING; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } -} diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index 91e4552ec..0ca6dc243 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -13,11 +13,15 @@ #include "vcpkglib.h" #include "vcpkglib_helpers.h" -using vcpkg::PostBuildLint::LinkageType; -namespace LinkageTypeC = vcpkg::PostBuildLint::LinkageTypeC; - namespace vcpkg::Build { + Optional to_linkage_type(const std::string& str) + { + if (str == "dynamic") return LinkageType::DYNAMIC; + if (str == "static") return LinkageType::STATIC; + return nullopt; + } + namespace BuildInfoRequiredField { static const std::string CRT_LINKAGE = "CRTLinkage"; @@ -217,19 +221,20 @@ namespace vcpkg::Build BuildInfo build_info; const std::string crt_linkage_as_string = details::remove_required_field(&pgh, BuildInfoRequiredField::CRT_LINKAGE); - build_info.crt_linkage = LinkageType::value_of(crt_linkage_as_string); - Checks::check_exit(VCPKG_LINE_INFO, - build_info.crt_linkage != LinkageTypeC::NULLVALUE, - "Invalid crt linkage type: [%s]", - crt_linkage_as_string); + + auto crtlinkage = to_linkage_type(crt_linkage_as_string); + if (auto p = crtlinkage.get()) + build_info.crt_linkage = *p; + else + Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid crt linkage type: [%s]", crt_linkage_as_string); const std::string library_linkage_as_string = details::remove_required_field(&pgh, BuildInfoRequiredField::LIBRARY_LINKAGE); - build_info.library_linkage = LinkageType::value_of(library_linkage_as_string); - Checks::check_exit(VCPKG_LINE_INFO, - build_info.library_linkage != LinkageTypeC::NULLVALUE, - "Invalid library linkage type: [%s]", - library_linkage_as_string); + auto liblinkage = to_linkage_type(library_linkage_as_string); + if (auto p = liblinkage.get()) + build_info.library_linkage = *p; + else + Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid library linkage type: [%s]", library_linkage_as_string); auto it_version = pgh.find("Version"); if (it_version != pgh.end()) diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 4ec37a16d..abc2e4a4e 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -154,8 +154,6 @@ - - @@ -218,8 +216,6 @@ Create - - diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 895eb2a4a..599bfeafb 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -129,12 +129,6 @@ Source Files - - Source Files - - - Source Files - Source Files @@ -257,12 +251,6 @@ Header Files - - Header Files - - - Header Files - Header Files -- cgit v1.2.3 From 938a5b44bae1b8ff77d8c26d93a0e4f9e15fddba Mon Sep 17 00:00:00 2001 From: "Stephen E. Baker" Date: Tue, 6 Jun 2017 22:11:52 -0400 Subject: Add package for luafilesystem LuaFileSystem (https://keplerproject.github.io/luafilesystem/) is a library that provides a portable way to access directory structure and file attributes from lua. --- ports/luafilesystem/CMakeLists.txt | 21 +++++++++++++++++++++ ports/luafilesystem/CONTROL | 4 ++++ ports/luafilesystem/lfs-def-fix.patch | 21 +++++++++++++++++++++ ports/luafilesystem/portfile.cmake | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 ports/luafilesystem/CMakeLists.txt create mode 100644 ports/luafilesystem/CONTROL create mode 100644 ports/luafilesystem/lfs-def-fix.patch create mode 100644 ports/luafilesystem/portfile.cmake diff --git a/ports/luafilesystem/CMakeLists.txt b/ports/luafilesystem/CMakeLists.txt new file mode 100644 index 000000000..85fb5eb86 --- /dev/null +++ b/ports/luafilesystem/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.0) +project(luafilesystem) + +if(NOT WIN32) + message(FATAL_ERROR "Written for windows only") +endif() + +find_path(LUA_INCLUDE_DIR lua.h PATH_SUFFIXES lua) +find_library(LUA_LIBRARY lua) +set(LFS_INCLUDES ${LUA_INCLUDE_DIR}) +set(LFS_LIBRARIES ${LUA_LIBRARY}) + +add_library( lfs src/lfs.h src/lfs.c src/lfs.def) + +target_include_directories(lfs PRIVATE ${LFS_INCLUDES}) +target_link_libraries(lfs PRIVATE ${LFS_LIBRARIES}) + +install(TARGETS lfs + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) diff --git a/ports/luafilesystem/CONTROL b/ports/luafilesystem/CONTROL new file mode 100644 index 000000000..f101b7cb3 --- /dev/null +++ b/ports/luafilesystem/CONTROL @@ -0,0 +1,4 @@ +Source: luafilesystem +Version: 1.6.3 +Description: LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution. +Build-Depends: lua diff --git a/ports/luafilesystem/lfs-def-fix.patch b/ports/luafilesystem/lfs-def-fix.patch new file mode 100644 index 000000000..62cea763e --- /dev/null +++ b/ports/luafilesystem/lfs-def-fix.patch @@ -0,0 +1,21 @@ +From 644c9c32ca9053ced3d37ff76fc1fbc0389ddf53 Mon Sep 17 00:00:00 2001 +From: Alex +Date: Mon, 16 Feb 2015 08:15:41 +0300 +Subject: [PATCH] DEF file fixes (DESCRIPTION is deprecated; VERSION must + contain one or two numers) + +--- + src/lfs.def | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/lfs.def b/src/lfs.def +index 7aa7a35..8a36d41 100644 +--- a/src/lfs.def ++++ b/src/lfs.def +@@ -1,5 +1,4 @@ + LIBRARY lfs.dll +-DESCRIPTION "LuaFileSystem" +-VERSION 1.5.0 ++VERSION 1.6 + EXPORTS + luaopen_lfs diff --git a/ports/luafilesystem/portfile.cmake b/ports/luafilesystem/portfile.cmake new file mode 100644 index 000000000..e55d56881 --- /dev/null +++ b/ports/luafilesystem/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +set(LUAFILESYSTEM_VERSION 1.6.3) +set(LUAFILESYSTEM_REVISION v_1_6_3) +set(LUAFILESYSTEM_HASH abfa1b3ac22ed80189560a1a025a7ea21a954defe14e5b539e08f266d180962a691262efc7eb2ddacc2d4aae14d6e356b1a276165b5bed46a13e4d6c61ab99f1) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/luafilesystem-${LUAFILESYSTEM_VERSION}) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO keplerproject/luafilesystem + REF ${LUAFILESYSTEM_REVISION} + SHA512 ${LUAFILESYSTEM_HASH} + HEAD_REF master) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/lfs-def-fix.patch) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/luafilesystem) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/luafilesystem/LICENSE ${CURRENT_PACKAGES_DIR}/share/luafilesystem/copyright) + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) -- cgit v1.2.3 From 55ec9354f4a619c1eb079efc21b5bb6502c36dcb Mon Sep 17 00:00:00 2001 From: Hennadii Zabula Date: Wed, 7 Jun 2017 09:55:44 +0300 Subject: Bump port package version --- ports/openssl/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index aaf7b17ab..c6de2ad68 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2k-3 +Version: 1.0.2k-4 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. -- cgit v1.2.3 From a2f2df640cd6fed54ddeb7579fd8938df13ab35a Mon Sep 17 00:00:00 2001 From: Hennadii Zabula Date: Wed, 7 Jun 2017 09:56:46 +0300 Subject: Remove redundant message --- ports/openssl/portfile-uwp.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake index c752f554a..df1776eaa 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl/portfile-uwp.cmake @@ -40,8 +40,6 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) -message(STATUS ${SOURCE_PATH}) - vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-uwp-pathlib.patch -- cgit v1.2.3 From 37a23b4ce573da8bf154a345d1419bfa2615d5b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20T=C3=A4schner?= Date: Tue, 30 May 2017 16:00:52 +0200 Subject: Add wxWidgets port. --- ports/wxwidgets/CONTROL | 4 + ports/wxwidgets/portfile.cmake | 102 +++ ports/wxwidgets/use-installed-libs.patch | 1198 ++++++++++++++++++++++++++++++ 3 files changed, 1304 insertions(+) create mode 100644 ports/wxwidgets/CONTROL create mode 100644 ports/wxwidgets/portfile.cmake create mode 100644 ports/wxwidgets/use-installed-libs.patch diff --git a/ports/wxwidgets/CONTROL b/ports/wxwidgets/CONTROL new file mode 100644 index 000000000..cb91bb99b --- /dev/null +++ b/ports/wxwidgets/CONTROL @@ -0,0 +1,4 @@ +Source: wxwidgets +Version: 3.1.0 +Description: wxWidgets is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. +Build-Depends: zlib, libpng, tiff diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake new file mode 100644 index 000000000..300d64361 --- /dev/null +++ b/ports/wxwidgets/portfile.cmake @@ -0,0 +1,102 @@ +# 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://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.7z" + FILENAME "wxWidgets-3.1.0.7z" + SHA512 309cd3c11052ab7ea77816ffcb70e280c0984fb7770c7e9999b4437d1ef9bb91c3f0521ad9d3592abd542bbed1fa74f6c83fce029504cf1ac4cf25e96c920b0f +) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src + PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-installed-libs.patch" +) + +find_program(NMAKE nmake REQUIRED) + +set(NMAKE_OPTIONS "") + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + list(APPEND NMAKE_OPTIONS TARGET_CPU=X64) + set(LIB_SUB_PATH_PRE vc_x64) +else () + set(LIB_SUB_PATH_PRE vc) +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + list(APPEND NMAKE_OPTIONS SHARED=1) + set(LIB_SUB_PATH_TYP dll) +else() + list(APPEND NMAKE_OPTIONS RUNTIME_LIBS=static) + set(LIB_SUB_PATH_TYP lib) +endif() + +set(LIB_SUB_PATH ${LIB_SUB_PATH_PRE}_${LIB_SUB_PATH_TYP}${TARGET_TRIPLET}) + +list(APPEND NMAKE_OPTIONS VCPKG_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include) + +set(NMAKE_OPTIONS_REL + "${NMAKE_OPTIONS}" + VCPKG_LIB_DIR=${CURRENT_INSTALLED_DIR}/lib + BUILD=release + CFG=${TARGET_TRIPLET}-rel +) + +set(NMAKE_OPTIONS_DBG + "${NMAKE_OPTIONS}" + VCPKG_LIB_DIR=${CURRENT_INSTALLED_DIR}/debug/lib + CFG=${TARGET_TRIPLET}-dbg +) + +################ +# Release build +################ +message(STATUS "Building ${TARGET_TRIPLET}-rel") +vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc + "${NMAKE_OPTIONS_REL}" + WORKING_DIRECTORY ${SOURCE_PATH}/build/msw + LOGNAME nmake-build-${TARGET_TRIPLET}-release +) +message(STATUS "Building ${TARGET_TRIPLET}-rel done") + +################ +# Debug build +################ +message(STATUS "Building ${TARGET_TRIPLET}-dbg") +vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc + "${NMAKE_OPTIONS_DBG}" + WORKING_DIRECTORY ${SOURCE_PATH}/build/msw + LOGNAME nmake-build-${TARGET_TRIPLET}-debug +) +message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + +# Install headers and libraries +file(INSTALL ${SOURCE_PATH}/include + DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/mswu/wx/setup.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/wx) +file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/mswu/wx/msw/rcdefs.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/wx/msw) +file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/ + DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.lib") +file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-dbg/ + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "*.lib" PATTERN "*.pdb") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/mswu ${CURRENT_PACKAGES_DIR}/debug/lib/mswud) + +# Handle copyright +file(COPY ${SOURCE_PATH}/docs/licence.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxwidgets) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/wxWidgets/licence.txt ${CURRENT_PACKAGES_DIR}/share/wxwidgets/copyright) diff --git a/ports/wxwidgets/use-installed-libs.patch b/ports/wxwidgets/use-installed-libs.patch new file mode 100644 index 000000000..9abae7128 --- /dev/null +++ b/ports/wxwidgets/use-installed-libs.patch @@ -0,0 +1,1198 @@ +diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc +index 5a30f76..b2de89d 100644 +--- a/build/msw/makefile.vc ++++ b/build/msw/makefile.vc +@@ -50,50 +50,6 @@ WXREGEX_OBJECTS = \ + $(OBJS)\wxregex_regexec.obj \ + $(OBJS)\wxregex_regerror.obj \ + $(OBJS)\wxregex_regfree.obj +-WXZLIB_CFLAGS = /M$(__RUNTIME_LIBS_25)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \ +- /Fd$(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).pdb $(____DEBUGRUNTIME) \ +- $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ +- /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ +- $(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS \ +- /D_CRT_NONSTDC_NO_WARNINGS $(CPPFLAGS) $(CFLAGS) +-WXZLIB_OBJECTS = \ +- $(OBJS)\wxzlib_adler32.obj \ +- $(OBJS)\wxzlib_compress.obj \ +- $(OBJS)\wxzlib_crc32.obj \ +- $(OBJS)\wxzlib_deflate.obj \ +- $(OBJS)\wxzlib_gzclose.obj \ +- $(OBJS)\wxzlib_gzlib.obj \ +- $(OBJS)\wxzlib_gzread.obj \ +- $(OBJS)\wxzlib_gzwrite.obj \ +- $(OBJS)\wxzlib_infback.obj \ +- $(OBJS)\wxzlib_inffast.obj \ +- $(OBJS)\wxzlib_inflate.obj \ +- $(OBJS)\wxzlib_inftrees.obj \ +- $(OBJS)\wxzlib_trees.obj \ +- $(OBJS)\wxzlib_uncompr.obj \ +- $(OBJS)\wxzlib_zutil.obj +-WXPNG_CFLAGS = /M$(__RUNTIME_LIBS_40)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \ +- /Fd$(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).pdb $(____DEBUGRUNTIME) \ +- $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ +- /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ +- $(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /I..\..\src\zlib \ +- $(CPPFLAGS) $(CFLAGS) +-WXPNG_OBJECTS = \ +- $(OBJS)\wxpng_png.obj \ +- $(OBJS)\wxpng_pngerror.obj \ +- $(OBJS)\wxpng_pngget.obj \ +- $(OBJS)\wxpng_pngmem.obj \ +- $(OBJS)\wxpng_pngpread.obj \ +- $(OBJS)\wxpng_pngread.obj \ +- $(OBJS)\wxpng_pngrio.obj \ +- $(OBJS)\wxpng_pngrtran.obj \ +- $(OBJS)\wxpng_pngrutil.obj \ +- $(OBJS)\wxpng_pngset.obj \ +- $(OBJS)\wxpng_pngtrans.obj \ +- $(OBJS)\wxpng_pngwio.obj \ +- $(OBJS)\wxpng_pngwrite.obj \ +- $(OBJS)\wxpng_pngwtran.obj \ +- $(OBJS)\wxpng_pngwutil.obj + WXJPEG_CFLAGS = /M$(__RUNTIME_LIBS_55)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \ + /Fd$(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).pdb $(____DEBUGRUNTIME) \ + $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ +@@ -147,53 +103,6 @@ WXJPEG_OBJECTS = \ + $(OBJS)\wxjpeg_jquant1.obj \ + $(OBJS)\wxjpeg_jquant2.obj \ + $(OBJS)\wxjpeg_jdmerge.obj +-WXTIFF_CFLAGS = /M$(__RUNTIME_LIBS_70)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \ +- /Fd$(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).pdb $(____DEBUGRUNTIME) \ +- $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ +- /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ +- $(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /I..\..\src\zlib \ +- /I..\..\src\jpeg /I..\..\src\tiff\libtiff /D_CRT_NONSTDC_NO_WARNINGS \ +- $(CPPFLAGS) $(CFLAGS) +-WXTIFF_OBJECTS = \ +- $(OBJS)\wxtiff_tif_win32.obj \ +- $(OBJS)\wxtiff_tif_aux.obj \ +- $(OBJS)\wxtiff_tif_close.obj \ +- $(OBJS)\wxtiff_tif_codec.obj \ +- $(OBJS)\wxtiff_tif_color.obj \ +- $(OBJS)\wxtiff_tif_compress.obj \ +- $(OBJS)\wxtiff_tif_dir.obj \ +- $(OBJS)\wxtiff_tif_dirinfo.obj \ +- $(OBJS)\wxtiff_tif_dirread.obj \ +- $(OBJS)\wxtiff_tif_dirwrite.obj \ +- $(OBJS)\wxtiff_tif_dumpmode.obj \ +- $(OBJS)\wxtiff_tif_error.obj \ +- $(OBJS)\wxtiff_tif_extension.obj \ +- $(OBJS)\wxtiff_tif_fax3.obj \ +- $(OBJS)\wxtiff_tif_fax3sm.obj \ +- $(OBJS)\wxtiff_tif_flush.obj \ +- $(OBJS)\wxtiff_tif_getimage.obj \ +- $(OBJS)\wxtiff_tif_jbig.obj \ +- $(OBJS)\wxtiff_tif_jpeg.obj \ +- $(OBJS)\wxtiff_tif_jpeg_12.obj \ +- $(OBJS)\wxtiff_tif_luv.obj \ +- $(OBJS)\wxtiff_tif_lzma.obj \ +- $(OBJS)\wxtiff_tif_lzw.obj \ +- $(OBJS)\wxtiff_tif_next.obj \ +- $(OBJS)\wxtiff_tif_ojpeg.obj \ +- $(OBJS)\wxtiff_tif_open.obj \ +- $(OBJS)\wxtiff_tif_packbits.obj \ +- $(OBJS)\wxtiff_tif_pixarlog.obj \ +- $(OBJS)\wxtiff_tif_predict.obj \ +- $(OBJS)\wxtiff_tif_print.obj \ +- $(OBJS)\wxtiff_tif_read.obj \ +- $(OBJS)\wxtiff_tif_strip.obj \ +- $(OBJS)\wxtiff_tif_swab.obj \ +- $(OBJS)\wxtiff_tif_thunder.obj \ +- $(OBJS)\wxtiff_tif_tile.obj \ +- $(OBJS)\wxtiff_tif_version.obj \ +- $(OBJS)\wxtiff_tif_warning.obj \ +- $(OBJS)\wxtiff_tif_write.obj \ +- $(OBJS)\wxtiff_tif_zip.obj + WXEXPAT_CFLAGS = /M$(__RUNTIME_LIBS_85)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) /Fd$(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).pdb \ + $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ +@@ -358,8 +267,8 @@ MONODLL_CFLAGS = /M$(__RUNTIME_LIBS_116)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /I..\..\src\stc\scintilla\include \ + /I..\..\src\stc\scintilla\lexlib /I..\..\src\stc\scintilla\src /D__WX__ \ + /DSCI_LEXER /DLINK_LEXERS /DwxUSE_BASE=1 /DWXMAKINGDLL $(CPPFLAGS) $(CFLAGS) +@@ -371,8 +280,8 @@ MONODLL_CXXFLAGS = /M$(__RUNTIME_LIBS_116)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /I..\..\src\stc\scintilla\include \ + /I..\..\src\stc\scintilla\lexlib /I..\..\src\stc\scintilla\src /D__WX__ \ + /DSCI_LEXER /DLINK_LEXERS /DwxUSE_BASE=1 /DWXMAKINGDLL $(__RTTIFLAG) \ +@@ -517,8 +426,8 @@ MONOLIB_CFLAGS = /M$(__RUNTIME_LIBS_131)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /I..\..\src\stc\scintilla\include \ + /I..\..\src\stc\scintilla\lexlib /I..\..\src\stc\scintilla\src /D__WX__ \ + /DSCI_LEXER /DLINK_LEXERS /DwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) +@@ -530,8 +439,8 @@ MONOLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_131)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /I..\..\src\stc\scintilla\include \ + /I..\..\src\stc\scintilla\lexlib /I..\..\src\stc\scintilla\src /D__WX__ \ + /DSCI_LEXER /DLINK_LEXERS /DwxUSE_BASE=1 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ +@@ -673,8 +582,8 @@ BASEDLL_CFLAGS = /M$(__RUNTIME_LIBS_147)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DwxUSE_GUI=0 /DWXMAKINGDLL_BASE /DwxUSE_BASE=1 \ + $(CPPFLAGS) $(CFLAGS) + BASEDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_147)$(__DEBUGRUNTIME) /DWIN32 \ +@@ -685,8 +594,8 @@ BASEDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_147)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DwxUSE_GUI=0 /DWXMAKINGDLL_BASE /DwxUSE_BASE=1 \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_basedll.pch" $(CPPFLAGS) $(CXXFLAGS) +@@ -814,8 +723,8 @@ BASELIB_CFLAGS = /M$(__RUNTIME_LIBS_162)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DwxUSE_GUI=0 /DwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) + BASELIB_CXXFLAGS = /M$(__RUNTIME_LIBS_162)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) \ +@@ -825,8 +734,8 @@ BASELIB_CXXFLAGS = /M$(__RUNTIME_LIBS_162)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DwxUSE_GUI=0 /DwxUSE_BASE=1 $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_baselib.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +@@ -952,8 +861,8 @@ NETDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_178)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DwxUSE_GUI=0 /DWXUSINGDLL /DWXMAKINGDLL_NET \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_netdll.pch" $(CPPFLAGS) $(CXXFLAGS) +@@ -981,8 +890,8 @@ NETLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_193)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_netlib.pch" $(CPPFLAGS) $(CXXFLAGS) + NETLIB_OBJECTS = \ +@@ -1007,8 +916,8 @@ COREDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_209)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_CORE /DwxUSE_BASE=0 \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_coredll.pch" $(CPPFLAGS) $(CXXFLAGS) +@@ -1031,8 +940,8 @@ CORELIB_CXXFLAGS = /M$(__RUNTIME_LIBS_224)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DwxUSE_BASE=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_corelib.pch" $(CPPFLAGS) $(CXXFLAGS) + CORELIB_OBJECTS = \ +@@ -1052,8 +961,8 @@ ADVDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_240)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_ADV $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_advdll.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +@@ -1070,8 +979,8 @@ ADVLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_255)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_advlib.pch" $(CPPFLAGS) $(CXXFLAGS) + ADVLIB_OBJECTS = \ +@@ -1085,8 +994,8 @@ MEDIADLL_CXXFLAGS = /M$(__RUNTIME_LIBS_271)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_MEDIA $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_mediadll.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +@@ -1106,8 +1015,8 @@ MEDIALIB_CXXFLAGS = /M$(__RUNTIME_LIBS_286)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_medialib.pch" $(CPPFLAGS) $(CXXFLAGS) + MEDIALIB_OBJECTS = \ +@@ -1124,8 +1033,8 @@ HTMLDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_302)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_HTML $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_htmldll.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +@@ -1168,8 +1077,8 @@ HTMLLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_317)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_htmllib.pch" $(CPPFLAGS) $(CXXFLAGS) + HTMLLIB_OBJECTS = \ +@@ -1209,8 +1118,8 @@ WEBVIEWDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_333)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_WEBVIEW $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_webviewdll.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +@@ -1230,8 +1139,8 @@ WEBVIEWLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_348)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_webviewlib.pch" $(CPPFLAGS) $(CXXFLAGS) + WEBVIEWLIB_OBJECTS = \ +@@ -1248,8 +1157,8 @@ QADLL_CXXFLAGS = /M$(__RUNTIME_LIBS_364)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_QA $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_qadll.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +@@ -1267,8 +1176,8 @@ QALIB_CXXFLAGS = /M$(__RUNTIME_LIBS_379)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_qalib.pch" $(CPPFLAGS) $(CXXFLAGS) + QALIB_OBJECTS = \ +@@ -1283,8 +1192,8 @@ XMLDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_395)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DwxUSE_GUI=0 /DWXUSINGDLL /DWXMAKINGDLL_XML \ + $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_xmldll.pch" $(CPPFLAGS) $(CXXFLAGS) +@@ -1302,8 +1211,8 @@ XMLLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_410)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_xmllib.pch" $(CPPFLAGS) $(CXXFLAGS) + XMLLIB_OBJECTS = \ +@@ -1318,8 +1227,8 @@ XRCDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_426)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_XRC $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_xrcdll.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +@@ -1402,8 +1311,8 @@ XRCLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_441)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_xrclib.pch" $(CPPFLAGS) $(CXXFLAGS) + XRCLIB_OBJECTS = \ +@@ -1483,8 +1392,8 @@ AUIDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_457)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_AUI $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_auidll.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +@@ -1511,8 +1420,8 @@ AUILIB_CXXFLAGS = /M$(__RUNTIME_LIBS_472)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_auilib.pch" $(CPPFLAGS) $(CXXFLAGS) + AUILIB_OBJECTS = \ +@@ -1536,8 +1445,8 @@ RIBBONDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_488)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_RIBBON $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_ribbondll.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +@@ -1564,8 +1473,8 @@ RIBBONLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_503)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_ribbonlib.pch" $(CPPFLAGS) $(CXXFLAGS) + RIBBONLIB_OBJECTS = \ +@@ -1589,8 +1498,8 @@ PROPGRIDDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_519)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_PROPGRID $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_propgriddll.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +@@ -1614,8 +1523,8 @@ PROPGRIDLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_534)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_propgridlib.pch" $(CPPFLAGS) $(CXXFLAGS) + PROPGRIDLIB_OBJECTS = \ +@@ -1636,8 +1545,8 @@ RICHTEXTDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_550)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_RICHTEXT $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_richtextdll.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +@@ -1664,8 +1573,8 @@ RICHTEXTLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_565)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_richtextlib.pch" $(CPPFLAGS) $(CXXFLAGS) + RICHTEXTLIB_OBJECTS = \ +@@ -1689,8 +1598,8 @@ STCDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_581)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /I..\..\src\stc\scintilla\include \ + /I..\..\src\stc\scintilla\lexlib /I..\..\src\stc\scintilla\src /D__WX__ \ + /DSCI_LEXER /DLINK_LEXERS /DWXUSINGDLL /DWXMAKINGDLL_STC $(__RTTIFLAG) \ +@@ -1711,8 +1620,8 @@ STCLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_596)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /I..\..\src\stc\scintilla\include \ + /I..\..\src\stc\scintilla\lexlib /I..\..\src\stc\scintilla\src /D__WX__ \ + /DSCI_LEXER /DLINK_LEXERS $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ +@@ -1730,8 +1639,8 @@ GLDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_612)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_GL $(__RTTIFLAG) \ + $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_gldll.pch" \ + $(CPPFLAGS) $(CXXFLAGS) +@@ -1749,8 +1658,8 @@ GLLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_627)$(__DEBUGRUNTIME) /DWIN32 \ + $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ +- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ +- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ ++ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ ++ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ + /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ + /Fp"$(OBJS)\wxprec_gllib.pch" $(CPPFLAGS) $(CXXFLAGS) + GLLIB_OBJECTS = \ +@@ -1851,9 +1760,6 @@ __RUNTIME_LIBS_25 = D + !if "$(RUNTIME_LIBS)" == "static" + __RUNTIME_LIBS_25 = $(__THREADSFLAG) + !endif +-!if "$(USE_GUI)" == "1" +-__wxpng___depname = $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib +-!endif + !if "$(RUNTIME_LIBS)" == "dynamic" + __RUNTIME_LIBS_40 = D + !endif +@@ -1869,9 +1775,6 @@ __RUNTIME_LIBS_55 = D + !if "$(RUNTIME_LIBS)" == "static" + __RUNTIME_LIBS_55 = $(__THREADSFLAG) + !endif +-!if "$(USE_GUI)" == "1" +-__wxtiff___depname = $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib +-!endif + !if "$(RUNTIME_LIBS)" == "dynamic" + __RUNTIME_LIBS_70 = D + !endif +@@ -5627,13 +5530,13 @@ __UNICODE_DEFINE_p_67 = /d _UNICODE + ____CAIRO_INCLUDEDIR_FILENAMES_4 = /i $(CAIRO_ROOT)\include\cairo + !endif + !if "$(USE_GUI)" == "1" +-__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib ++__LIB_TIFF_p = tiff$(WXDEBUGFLAG).lib + !endif + !if "$(USE_GUI)" == "1" + __LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib + !endif + !if "$(USE_GUI)" == "1" +-__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib ++__LIB_PNG_p = libpng16$(WXDEBUGFLAG).lib + !endif + !if "$(USE_CAIRO)" == "1" + __CAIRO_LIB_p = cairo.lib +@@ -5751,17 +5654,14 @@ $(OBJS): + + ### Targets: ### + +-all: setup_h $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(__wxpng___depname) $(__wxjpeg___depname) $(__wxtiff___depname) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(__wxscintilla) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__webviewdll___depname) $(__webviewlib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__auidll___depname) $(__auilib___depname) $(__ribbondll___depname) $(__ribbonlib___depname) $(__propgriddll___depname) $(__propgridlib___depname) $(__richtextdll___depname) $(__richtextlib___depname) $(__stcdll___depname) $(__stclib___depname) $(__gldll___depname) $(__gllib___depname) build_cfg_file ++all: setup_h $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(__wxjpeg___depname) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(__wxscintilla) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__webviewdll___depname) $(__webviewlib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__auidll___depname) $(__auilib___depname) $(__ribbondll___depname) $(__ribbonlib___depname) $(__propgriddll___depname) $(__propgridlib___depname) $(__richtextdll___depname) $(__richtextlib___depname) $(__stcdll___depname) $(__stclib___depname) $(__gldll___depname) $(__gllib___depname) build_cfg_file + + clean: + -if exist $(OBJS)\*.obj del $(OBJS)\*.obj + -if exist $(OBJS)\*.res del $(OBJS)\*.res + -if exist $(OBJS)\*.pch del $(OBJS)\*.pch + -if exist $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +- -if exist $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib +- -if exist $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib +- -if exist $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib + -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll +@@ -5861,20 +5761,6 @@ $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib: $(WXREGEX_OBJECTS) + $(WXREGEX_OBJECTS) + << + +-$(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib: $(WXZLIB_OBJECTS) +- if exist $@ del $@ +- link /LIB /NOLOGO /OUT:$@ @<< +- $(WXZLIB_OBJECTS) +-<< +- +-!if "$(USE_GUI)" == "1" +-$(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib: $(WXPNG_OBJECTS) +- if exist $@ del $@ +- link /LIB /NOLOGO /OUT:$@ @<< +- $(WXPNG_OBJECTS) +-<< +-!endif +- + !if "$(USE_GUI)" == "1" + $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib: $(WXJPEG_OBJECTS) + if exist $@ del $@ +@@ -5906,9 +5792,9 @@ $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib: $(WXSCINTILLA_OBJECTS) + !endif + + !if "$(MONOLITHIC)" == "1" && "$(SHARED)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\monodll_dummy.obj $(MONODLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\monodll_version.res $(__wxscintilla_library_link_DEP) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_108) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(MONODLL_OBJECTS) $(MONODLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(__wxscintilla) /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\monodll_dummy.obj $(MONODLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\monodll_version.res $(__wxscintilla_library_link_DEP) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_108) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(MONODLL_OBJECTS) $(MONODLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(__wxscintilla) /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + << + !endif + +@@ -5921,9 +5807,9 @@ $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXD + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +-$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\basedll_dummy.obj $(BASEDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\basedll_version.res +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_139) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(BASEDLL_OBJECTS) $(BASEDLL_RESOURCES) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib ++$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\basedll_dummy.obj $(BASEDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\basedll_version.res ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_139) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(BASEDLL_OBJECTS) $(BASEDLL_RESOURCES) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + << + !endif + +@@ -5940,9 +5826,9 @@ wxbase: $(____wxbase_namedll_DEP) $(____wxbase_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +-$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\netdll_dummy.obj $(NETDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\netdll_version.res $(__basedll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_170) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(NETDLL_OBJECTS) $(NETDLL_RESOURCES) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib ++$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\netdll_dummy.obj $(NETDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\netdll_version.res $(__basedll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_170) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(NETDLL_OBJECTS) $(NETDLL_RESOURCES) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib + << + !endif + +@@ -5959,9 +5845,9 @@ wxnet: $(____wxnet_namedll_DEP) $(____wxnet_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\coredll_dummy.obj $(COREDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\coredll_version.res $(__basedll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_201) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(COREDLL_OBJECTS) $(COREDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\coredll_dummy.obj $(COREDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\coredll_version.res $(__basedll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_201) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(COREDLL_OBJECTS) $(COREDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib + << + !endif + +@@ -5978,9 +5864,9 @@ wxcore: $(____wxcore_namedll_DEP) $(____wxcore_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\advdll_dummy.obj $(ADVDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\advdll_version.res $(__coredll___depname) $(__basedll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_232) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(ADVDLL_OBJECTS) $(ADVDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\advdll_dummy.obj $(ADVDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\advdll_version.res $(__coredll___depname) $(__basedll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_232) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(ADVDLL_OBJECTS) $(ADVDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib + << + !endif + +@@ -5997,9 +5883,9 @@ wxadv: $(____wxadv_namedll_DEP) $(____wxadv_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_MEDIA)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\mediadll_dummy.obj $(MEDIADLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\mediadll_version.res $(__coredll___depname) $(__basedll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_263) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(MEDIADLL_OBJECTS) $(MEDIADLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\mediadll_dummy.obj $(MEDIADLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\mediadll_version.res $(__coredll___depname) $(__basedll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_263) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(MEDIADLL_OBJECTS) $(MEDIADLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib + << + !endif + +@@ -6016,9 +5902,9 @@ wxmedia: $(____wxmedia_namedll_DEP) $(____wxmedia_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\htmldll_dummy.obj $(HTMLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\htmldll_version.res $(__coredll___depname) $(__basedll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_294) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(HTMLDLL_OBJECTS) $(HTMLDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\htmldll_dummy.obj $(HTMLDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\htmldll_version.res $(__coredll___depname) $(__basedll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_294) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(HTMLDLL_OBJECTS) $(HTMLDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib + << + !endif + +@@ -6035,9 +5921,9 @@ wxhtml: $(____wxhtml_namedll_DEP) $(____wxhtml_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_WEBVIEW)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\webviewdll_dummy.obj $(WEBVIEWDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\webviewdll_version.res $(__coredll___depname) $(__basedll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_325) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(WEBVIEWDLL_OBJECTS) $(WEBVIEWDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\webviewdll_dummy.obj $(WEBVIEWDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\webviewdll_version.res $(__coredll___depname) $(__basedll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_325) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(WEBVIEWDLL_OBJECTS) $(WEBVIEWDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib + << + !endif + +@@ -6054,9 +5940,9 @@ wxwebview: $(____wxwebview_namedll_DEP) $(____wxwebview_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_QA)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\qadll_dummy.obj $(QADLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\qadll_version.res $(__coredll___depname) $(__basedll___depname) $(__xmldll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_356) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(QADLL_OBJECTS) $(QADLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\qadll_dummy.obj $(QADLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\qadll_version.res $(__coredll___depname) $(__basedll___depname) $(__xmldll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_356) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(QADLL_OBJECTS) $(QADLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib + << + !endif + +@@ -6073,9 +5959,9 @@ wxqa: $(____wxqa_namedll_DEP) $(____wxqa_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" +-$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\xmldll_dummy.obj $(XMLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xmldll_version.res $(__basedll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_387) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(XMLDLL_OBJECTS) $(XMLDLL_RESOURCES) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib ++$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\xmldll_dummy.obj $(XMLDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xmldll_version.res $(__basedll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_387) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(XMLDLL_OBJECTS) $(XMLDLL_RESOURCES) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib + << + !endif + +@@ -6092,9 +5978,9 @@ wxxml: $(____wxxml_namedll_DEP) $(____wxxml_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_XRC)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\xrcdll_dummy.obj $(XRCDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xrcdll_version.res $(__htmldll_library_link_DEP) $(__advdll___depname) $(__coredll___depname) $(__xmldll___depname) $(__basedll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_418) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(XRCDLL_OBJECTS) $(XRCDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\xrcdll_dummy.obj $(XRCDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xrcdll_version.res $(__htmldll_library_link_DEP) $(__advdll___depname) $(__coredll___depname) $(__xmldll___depname) $(__basedll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_418) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(XRCDLL_OBJECTS) $(XRCDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib + << + !endif + +@@ -6111,9 +5997,9 @@ wxxrc: $(____wxxrc_namedll_DEP) $(____wxxrc_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_AUI)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\auidll_dummy.obj $(AUIDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\auidll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_449) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(AUIDLL_OBJECTS) $(AUIDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\auidll_dummy.obj $(AUIDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\auidll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_449) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(AUIDLL_OBJECTS) $(AUIDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib + << + !endif + +@@ -6130,9 +6016,9 @@ wxaui: $(____wxaui_namedll_DEP) $(____wxaui_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_RIBBON)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\ribbondll_dummy.obj $(RIBBONDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\ribbondll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_480) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(RIBBONDLL_OBJECTS) $(RIBBONDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\ribbondll_dummy.obj $(RIBBONDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\ribbondll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_480) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(RIBBONDLL_OBJECTS) $(RIBBONDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib + << + !endif + +@@ -6149,9 +6035,9 @@ wxribbon: $(____wxribbon_namedll_DEP) $(____wxribbon_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_PROPGRID)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\propgriddll_dummy.obj $(PROPGRIDDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\propgriddll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_511) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(PROPGRIDDLL_OBJECTS) $(PROPGRIDDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\propgriddll_dummy.obj $(PROPGRIDDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\propgriddll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_511) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(PROPGRIDDLL_OBJECTS) $(PROPGRIDDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib + << + !endif + +@@ -6168,9 +6054,9 @@ wxpropgrid: $(____wxpropgrid_namedll_DEP) $(____wxpropgrid_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_RICHTEXT)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\richtextdll_dummy.obj $(RICHTEXTDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\richtextdll_version.res $(__advdll___depname) $(__htmldll_library_link_DEP) $(__xmldll___depname) $(__coredll___depname) $(__basedll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_542) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(RICHTEXTDLL_OBJECTS) $(RICHTEXTDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\richtextdll_dummy.obj $(RICHTEXTDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\richtextdll_version.res $(__advdll___depname) $(__htmldll_library_link_DEP) $(__xmldll___depname) $(__coredll___depname) $(__basedll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_542) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(RICHTEXTDLL_OBJECTS) $(RICHTEXTDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib + << + !endif + +@@ -6187,9 +6073,9 @@ wxrichtext: $(____wxrichtext_namedll_DEP) $(____wxrichtext_namelib_DEP) + !endif + + !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_STC)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\stcdll_dummy.obj $(STCDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(__wxscintilla) $(OBJS)\stcdll_version.res $(__coredll___depname) $(__basedll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_573) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(STCDLL_OBJECTS) $(STCDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\stcdll_dummy.obj $(STCDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(__wxscintilla) $(OBJS)\stcdll_version.res $(__coredll___depname) $(__basedll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_573) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(STCDLL_OBJECTS) $(STCDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib + << + !endif + +@@ -6206,9 +6092,9 @@ wxstc: $(____wxstc_namedll_DEP) $(____wxstc_namelib_DEP) + !endif + + !if "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_OPENGL)" == "1" +-$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\gldll_dummy.obj $(GLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\gldll_version.res $(__basedll___depname) $(__coredll___depname) $(__monodll___depname) +- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_604) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< +- $(GLDLL_OBJECTS) $(GLDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(__WXLIBGLDEP_CORE_p) $(__WXLIBGLDEP_BASE_p) $(__WXLIB_MONO_p) opengl32.lib glu32.lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib ++$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\gldll_dummy.obj $(GLDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\gldll_version.res $(__basedll___depname) $(__coredll___depname) $(__monodll___depname) ++ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_604) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< ++ $(GLDLL_OBJECTS) $(GLDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(__WXLIBGLDEP_CORE_p) $(__WXLIBGLDEP_BASE_p) $(__WXLIB_MONO_p) opengl32.lib glu32.lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib + << + !endif + +@@ -6303,96 +6189,6 @@ $(OBJS)\wxregex_regerror.obj: ..\..\src\regex\regerror.c + $(OBJS)\wxregex_regfree.obj: ..\..\src\regex\regfree.c + $(CC) /c /nologo /TC /Fo$@ $(WXREGEX_CFLAGS) ..\..\src\regex\regfree.c + +-$(OBJS)\wxzlib_adler32.obj: ..\..\src\zlib\adler32.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\adler32.c +- +-$(OBJS)\wxzlib_compress.obj: ..\..\src\zlib\compress.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\compress.c +- +-$(OBJS)\wxzlib_crc32.obj: ..\..\src\zlib\crc32.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\crc32.c +- +-$(OBJS)\wxzlib_deflate.obj: ..\..\src\zlib\deflate.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\deflate.c +- +-$(OBJS)\wxzlib_gzclose.obj: ..\..\src\zlib\gzclose.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzclose.c +- +-$(OBJS)\wxzlib_gzlib.obj: ..\..\src\zlib\gzlib.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzlib.c +- +-$(OBJS)\wxzlib_gzread.obj: ..\..\src\zlib\gzread.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzread.c +- +-$(OBJS)\wxzlib_gzwrite.obj: ..\..\src\zlib\gzwrite.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzwrite.c +- +-$(OBJS)\wxzlib_infback.obj: ..\..\src\zlib\infback.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\infback.c +- +-$(OBJS)\wxzlib_inffast.obj: ..\..\src\zlib\inffast.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\inffast.c +- +-$(OBJS)\wxzlib_inflate.obj: ..\..\src\zlib\inflate.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\inflate.c +- +-$(OBJS)\wxzlib_inftrees.obj: ..\..\src\zlib\inftrees.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\inftrees.c +- +-$(OBJS)\wxzlib_trees.obj: ..\..\src\zlib\trees.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\trees.c +- +-$(OBJS)\wxzlib_uncompr.obj: ..\..\src\zlib\uncompr.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\uncompr.c +- +-$(OBJS)\wxzlib_zutil.obj: ..\..\src\zlib\zutil.c +- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\zutil.c +- +-$(OBJS)\wxpng_png.obj: ..\..\src\png\png.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\png.c +- +-$(OBJS)\wxpng_pngerror.obj: ..\..\src\png\pngerror.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngerror.c +- +-$(OBJS)\wxpng_pngget.obj: ..\..\src\png\pngget.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngget.c +- +-$(OBJS)\wxpng_pngmem.obj: ..\..\src\png\pngmem.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngmem.c +- +-$(OBJS)\wxpng_pngpread.obj: ..\..\src\png\pngpread.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngpread.c +- +-$(OBJS)\wxpng_pngread.obj: ..\..\src\png\pngread.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngread.c +- +-$(OBJS)\wxpng_pngrio.obj: ..\..\src\png\pngrio.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngrio.c +- +-$(OBJS)\wxpng_pngrtran.obj: ..\..\src\png\pngrtran.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngrtran.c +- +-$(OBJS)\wxpng_pngrutil.obj: ..\..\src\png\pngrutil.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngrutil.c +- +-$(OBJS)\wxpng_pngset.obj: ..\..\src\png\pngset.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngset.c +- +-$(OBJS)\wxpng_pngtrans.obj: ..\..\src\png\pngtrans.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngtrans.c +- +-$(OBJS)\wxpng_pngwio.obj: ..\..\src\png\pngwio.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwio.c +- +-$(OBJS)\wxpng_pngwrite.obj: ..\..\src\png\pngwrite.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwrite.c +- +-$(OBJS)\wxpng_pngwtran.obj: ..\..\src\png\pngwtran.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwtran.c +- +-$(OBJS)\wxpng_pngwutil.obj: ..\..\src\png\pngwutil.c +- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwutil.c +- + $(OBJS)\wxjpeg_jcomapi.obj: ..\..\src\jpeg\jcomapi.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcomapi.c + +@@ -6531,123 +6327,6 @@ $(OBJS)\wxjpeg_jquant2.obj: ..\..\src\jpeg\jquant2.c + $(OBJS)\wxjpeg_jdmerge.obj: ..\..\src\jpeg\jdmerge.c + $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdmerge.c + +-$(OBJS)\wxtiff_tif_win32.obj: ..\..\src\tiff\libtiff\tif_win32.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_win32.c +- +-$(OBJS)\wxtiff_tif_aux.obj: ..\..\src\tiff\libtiff\tif_aux.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_aux.c +- +-$(OBJS)\wxtiff_tif_close.obj: ..\..\src\tiff\libtiff\tif_close.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_close.c +- +-$(OBJS)\wxtiff_tif_codec.obj: ..\..\src\tiff\libtiff\tif_codec.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_codec.c +- +-$(OBJS)\wxtiff_tif_color.obj: ..\..\src\tiff\libtiff\tif_color.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_color.c +- +-$(OBJS)\wxtiff_tif_compress.obj: ..\..\src\tiff\libtiff\tif_compress.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_compress.c +- +-$(OBJS)\wxtiff_tif_dir.obj: ..\..\src\tiff\libtiff\tif_dir.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dir.c +- +-$(OBJS)\wxtiff_tif_dirinfo.obj: ..\..\src\tiff\libtiff\tif_dirinfo.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dirinfo.c +- +-$(OBJS)\wxtiff_tif_dirread.obj: ..\..\src\tiff\libtiff\tif_dirread.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dirread.c +- +-$(OBJS)\wxtiff_tif_dirwrite.obj: ..\..\src\tiff\libtiff\tif_dirwrite.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dirwrite.c +- +-$(OBJS)\wxtiff_tif_dumpmode.obj: ..\..\src\tiff\libtiff\tif_dumpmode.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dumpmode.c +- +-$(OBJS)\wxtiff_tif_error.obj: ..\..\src\tiff\libtiff\tif_error.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_error.c +- +-$(OBJS)\wxtiff_tif_extension.obj: ..\..\src\tiff\libtiff\tif_extension.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_extension.c +- +-$(OBJS)\wxtiff_tif_fax3.obj: ..\..\src\tiff\libtiff\tif_fax3.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_fax3.c +- +-$(OBJS)\wxtiff_tif_fax3sm.obj: ..\..\src\tiff\libtiff\tif_fax3sm.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_fax3sm.c +- +-$(OBJS)\wxtiff_tif_flush.obj: ..\..\src\tiff\libtiff\tif_flush.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_flush.c +- +-$(OBJS)\wxtiff_tif_getimage.obj: ..\..\src\tiff\libtiff\tif_getimage.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_getimage.c +- +-$(OBJS)\wxtiff_tif_jbig.obj: ..\..\src\tiff\libtiff\tif_jbig.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_jbig.c +- +-$(OBJS)\wxtiff_tif_jpeg.obj: ..\..\src\tiff\libtiff\tif_jpeg.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_jpeg.c +- +-$(OBJS)\wxtiff_tif_jpeg_12.obj: ..\..\src\tiff\libtiff\tif_jpeg_12.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_jpeg_12.c +- +-$(OBJS)\wxtiff_tif_luv.obj: ..\..\src\tiff\libtiff\tif_luv.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_luv.c +- +-$(OBJS)\wxtiff_tif_lzma.obj: ..\..\src\tiff\libtiff\tif_lzma.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_lzma.c +- +-$(OBJS)\wxtiff_tif_lzw.obj: ..\..\src\tiff\libtiff\tif_lzw.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_lzw.c +- +-$(OBJS)\wxtiff_tif_next.obj: ..\..\src\tiff\libtiff\tif_next.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_next.c +- +-$(OBJS)\wxtiff_tif_ojpeg.obj: ..\..\src\tiff\libtiff\tif_ojpeg.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_ojpeg.c +- +-$(OBJS)\wxtiff_tif_open.obj: ..\..\src\tiff\libtiff\tif_open.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_open.c +- +-$(OBJS)\wxtiff_tif_packbits.obj: ..\..\src\tiff\libtiff\tif_packbits.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_packbits.c +- +-$(OBJS)\wxtiff_tif_pixarlog.obj: ..\..\src\tiff\libtiff\tif_pixarlog.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_pixarlog.c +- +-$(OBJS)\wxtiff_tif_predict.obj: ..\..\src\tiff\libtiff\tif_predict.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_predict.c +- +-$(OBJS)\wxtiff_tif_print.obj: ..\..\src\tiff\libtiff\tif_print.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_print.c +- +-$(OBJS)\wxtiff_tif_read.obj: ..\..\src\tiff\libtiff\tif_read.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_read.c +- +-$(OBJS)\wxtiff_tif_strip.obj: ..\..\src\tiff\libtiff\tif_strip.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_strip.c +- +-$(OBJS)\wxtiff_tif_swab.obj: ..\..\src\tiff\libtiff\tif_swab.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_swab.c +- +-$(OBJS)\wxtiff_tif_thunder.obj: ..\..\src\tiff\libtiff\tif_thunder.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_thunder.c +- +-$(OBJS)\wxtiff_tif_tile.obj: ..\..\src\tiff\libtiff\tif_tile.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_tile.c +- +-$(OBJS)\wxtiff_tif_version.obj: ..\..\src\tiff\libtiff\tif_version.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_version.c +- +-$(OBJS)\wxtiff_tif_warning.obj: ..\..\src\tiff\libtiff\tif_warning.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_warning.c +- +-$(OBJS)\wxtiff_tif_write.obj: ..\..\src\tiff\libtiff\tif_write.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_write.c +- +-$(OBJS)\wxtiff_tif_zip.obj: ..\..\src\tiff\libtiff\tif_zip.c +- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_zip.c +- + $(OBJS)\wxexpat_xmlparse.obj: ..\..\src\expat\lib\xmlparse.c + $(CC) /c /nologo /TC /Fo$@ $(WXEXPAT_CFLAGS) ..\..\src\expat\lib\xmlparse.c + +@@ -9595,7 +9274,7 @@ $(OBJS)\monodll_animateg.obj: ..\..\src\generic\animateg.cpp + !endif + + $(OBJS)\monodll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /i ..\..\src\stc\scintilla\include /i ..\..\src\stc\scintilla\lexlib /i ..\..\src\stc\scintilla\src /d __WX__ /d SCI_LEXER /d LINK_LEXERS /d wxUSE_BASE=1 /d WXMAKINGDLL ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /i ..\..\src\stc\scintilla\include /i ..\..\src\stc\scintilla\lexlib /i ..\..\src\stc\scintilla\src /d __WX__ /d SCI_LEXER /d LINK_LEXERS /d wxUSE_BASE=1 /d WXMAKINGDLL ..\..\src\msw\version.rc + + $(OBJS)\monolib_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp +@@ -12133,7 +11812,7 @@ $(OBJS)\basedll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\basedll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXMAKINGDLL_BASE /d wxUSE_BASE=1 ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXMAKINGDLL_BASE /d wxUSE_BASE=1 ..\..\src\msw\version.rc + + $(OBJS)\basedll_any.obj: ..\..\src\common\any.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\any.cpp +@@ -12814,7 +12493,7 @@ $(OBJS)\netdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\netdll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXUSINGDLL /d WXMAKINGDLL_NET ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXUSINGDLL /d WXMAKINGDLL_NET ..\..\src\msw\version.rc + + $(OBJS)\netdll_fs_inet.obj: ..\..\src\common\fs_inet.cpp + $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\fs_inet.cpp +@@ -12895,7 +12574,7 @@ $(OBJS)\coredll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\coredll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_CORE /d wxUSE_BASE=0 ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_CORE /d wxUSE_BASE=0 ..\..\src\msw\version.rc + + $(OBJS)\coredll_event.obj: ..\..\src\common\event.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\event.cpp +@@ -15852,7 +15531,7 @@ $(OBJS)\advdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\advdll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_ADV ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_ADV ..\..\src\msw\version.rc + + $(OBJS)\advdll_bmpcbox.obj: ..\..\src\msw\bmpcbox.cpp + $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\bmpcbox.cpp +@@ -16179,7 +15858,7 @@ $(OBJS)\mediadll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MEDIADLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\mediadll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_MEDIA ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_MEDIA ..\..\src\msw\version.rc + + $(OBJS)\mediadll_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MEDIADLL_CXXFLAGS) ..\..\src\common\mediactrlcmn.cpp +@@ -16212,7 +15891,7 @@ $(OBJS)\htmldll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\htmldll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_HTML ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_HTML ..\..\src\msw\version.rc + + $(OBJS)\htmldll_helpbest.obj: ..\..\src\msw\helpbest.cpp + $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\msw\helpbest.cpp +@@ -16383,7 +16062,7 @@ $(OBJS)\webviewdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\webviewdll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_WEBVIEW ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_WEBVIEW ..\..\src\msw\version.rc + + $(OBJS)\webviewdll_webview_ie.obj: ..\..\src\msw\webview_ie.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\msw\webview_ie.cpp +@@ -16416,7 +16095,7 @@ $(OBJS)\qadll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(QADLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\qadll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_QA ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_QA ..\..\src\msw\version.rc + + $(OBJS)\qadll_debugrpt.obj: ..\..\src\common\debugrpt.cpp + $(CXX) /c /nologo /TP /Fo$@ $(QADLL_CXXFLAGS) ..\..\src\common\debugrpt.cpp +@@ -16437,7 +16116,7 @@ $(OBJS)\xmldll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XMLDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\xmldll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXUSINGDLL /d WXMAKINGDLL_XML ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXUSINGDLL /d WXMAKINGDLL_XML ..\..\src\msw\version.rc + + $(OBJS)\xmldll_xml.obj: ..\..\src\xml\xml.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XMLDLL_CXXFLAGS) ..\..\src\xml\xml.cpp +@@ -16458,7 +16137,7 @@ $(OBJS)\xrcdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\xrcdll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_XRC ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_XRC ..\..\src\msw\version.rc + + $(OBJS)\xrcdll_xh_activityindicator.obj: ..\..\src\xrc\xh_activityindicator.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_activityindicator.cpp +@@ -16869,7 +16548,7 @@ $(OBJS)\auidll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\auidll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_AUI ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_AUI ..\..\src\msw\version.rc + + $(OBJS)\auidll_framemanager.obj: ..\..\src\aui\framemanager.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\framemanager.cpp +@@ -16944,7 +16623,7 @@ $(OBJS)\ribbondll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\ribbondll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_RIBBON ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_RIBBON ..\..\src\msw\version.rc + + $(OBJS)\ribbondll_art_internal.obj: ..\..\src\ribbon\art_internal.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\art_internal.cpp +@@ -17019,7 +16698,7 @@ $(OBJS)\propgriddll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\propgriddll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_PROPGRID ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_PROPGRID ..\..\src\msw\version.rc + + $(OBJS)\propgriddll_advprops.obj: ..\..\src\propgrid\advprops.cpp + $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\advprops.cpp +@@ -17076,7 +16755,7 @@ $(OBJS)\richtextdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\richtextdll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_RICHTEXT ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_RICHTEXT ..\..\src\msw\version.rc + + $(OBJS)\richtextdll_richtextbuffer.obj: ..\..\src\richtext\richtextbuffer.cpp + $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextbuffer.cpp +@@ -17151,7 +16830,7 @@ $(OBJS)\stcdll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(STCDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\stcdll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /i ..\..\src\stc\scintilla\include /i ..\..\src\stc\scintilla\lexlib /i ..\..\src\stc\scintilla\src /d __WX__ /d SCI_LEXER /d LINK_LEXERS /d WXUSINGDLL /d WXMAKINGDLL_STC ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /i ..\..\src\stc\scintilla\include /i ..\..\src\stc\scintilla\lexlib /i ..\..\src\stc\scintilla\src /d __WX__ /d SCI_LEXER /d LINK_LEXERS /d WXUSINGDLL /d WXMAKINGDLL_STC ..\..\src\msw\version.rc + + $(OBJS)\stcdll_stc.obj: ..\..\src\stc\stc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(STCDLL_CXXFLAGS) ..\..\src\stc\stc.cpp +@@ -17178,7 +16857,7 @@ $(OBJS)\gldll_dummy.obj: ..\..\src\common\dummy.cpp + $(CXX) /c /nologo /TP /Fo$@ $(GLDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp + + $(OBJS)\gldll_version.res: ..\..\src\msw\version.rc +- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_GL ..\..\src\msw\version.rc ++ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_GL ..\..\src\msw\version.rc + + $(OBJS)\gldll_glcmn.obj: ..\..\src\common\glcmn.cpp + $(CXX) /c /nologo /TP /Fo$@ $(GLDLL_CXXFLAGS) ..\..\src\common\glcmn.cpp -- cgit v1.2.3 From c35dd41195fc56506b44e415751a8e2fb1730019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20T=C3=A4schner?= Date: Thu, 1 Jun 2017 08:32:41 +0200 Subject: [cairo] Add cairo-pdf.h and cairo-svg.h to subdir cairo in includes. --- ports/cairo/CONTROL | 2 +- ports/cairo/portfile.cmake | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index 89ba03b79..88325c521 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,4 +1,4 @@ Source: cairo -Version: 1.15.4 +Version: 1.15.4-1 Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index 57b45e91c..47055a270 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -49,6 +49,13 @@ DESTINATION ${CURRENT_PACKAGES_DIR}/include ) +file(COPY +"${SOURCE_PATH}/src/cairo-pdf.h" +"${SOURCE_PATH}/src/cairo-svg.h" +DESTINATION +${CURRENT_PACKAGES_DIR}/include/cairo +) + # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cairo) file(RENAME ${CURRENT_PACKAGES_DIR}/share/cairo/COPYING ${CURRENT_PACKAGES_DIR}/share/cairo/copyright) -- cgit v1.2.3 From 226eefef9da1ec3b601b192263ff3d6b95aaf3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20T=C3=A4schner?= Date: Thu, 1 Jun 2017 11:08:25 +0200 Subject: [pango] Add CAIRO_WIN32_STATIC_BUILD symbol to static builds of pangocairo lib. --- ports/pango/CMakeLists.txt | 4 ++++ ports/pango/CONTROL | 2 +- ports/pango/portfile.cmake | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/pango/CMakeLists.txt b/ports/pango/CMakeLists.txt index 7dad7dbcf..ea36939b5 100644 --- a/ports/pango/CMakeLists.txt +++ b/ports/pango/CMakeLists.txt @@ -130,6 +130,10 @@ pango_add_module(pangocairo pango/pangocairo-font.c pango/pangocairo-fontmap.c pango/pangocairo-render.c) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + target_compile_definitions(pangocairo PRIVATE CAIRO_WIN32_STATIC_BUILD=1) +endif() target_link_libraries(pangocairo ${CAIRO_LIBRARIES} pango pangowin32 pangoft2 ${FONT_LIBRARIES}) target_include_directories(pangocairo PRIVATE ${CAIRO_INCLUDE_DIR} ${FONT_INCLUDE_DIRS}) diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL index 011f33691..f5e2709c4 100644 --- a/ports/pango/CONTROL +++ b/ports/pango/CONTROL @@ -1,4 +1,4 @@ Source: pango -Version: 1.40.6 +Version: 1.40.6-1 Description: Text and font handling library. Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz diff --git a/ports/pango/portfile.cmake b/ports/pango/portfile.cmake index 7f28b8ca7..4e373e84a 100644 --- a/ports/pango/portfile.cmake +++ b/ports/pango/portfile.cmake @@ -17,6 +17,8 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DVCPKG_LIBRARY_LINKAGE=${VCPKG_LIBRARY_LINKAGE} OPTIONS_DEBUG -DPANGO_SKIP_HEADERS=ON) -- cgit v1.2.3 From 208e53cc4a0f0addf7175dd4ba8799c3127eb5df Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 7 Jun 2017 19:33:21 +0200 Subject: [tbb] update to 2017_U7 --- ports/tbb/CONTROL | 2 +- ports/tbb/portfile.cmake | 31 +++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/ports/tbb/CONTROL b/ports/tbb/CONTROL index 9dc9198f8..a9a584c06 100644 --- a/ports/tbb/CONTROL +++ b/ports/tbb/CONTROL @@ -1,3 +1,3 @@ Source: tbb -Version: 2017_U6 +Version: 2017_U7 Description: Intel's Threading Building Blocks. diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index a733be711..387762bcb 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -10,8 +10,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO 01org/tbb - REF 2017_U6 - SHA512 76b49fd085d8407b68b0f17e6eebfbcb7d2e6f9116bb5f6a00c6b4d59a55b16f9de79a2b9c9c3ece497b01810c33df21d0657893fd886db8bed639091ba97060 + REF 2017_U7 + SHA512 77fdd381eece8fb2fba4115af55d168e9d433bbdae3c21a53c35e7d5ed3397645fe75998ad10593b718f6959daaac05112401480cdb4fd2054f50b5f6f1a0df6 HEAD_REF tbb_2017) if(TRIPLET_SYSTEM_ARCH STREQUAL x86) @@ -56,6 +56,33 @@ file(COPY vcpkg_copy_pdbs() +# Since 2017_U7 TBB provides a CMake script to generate config file +include(${SOURCE_PATH}/cmake/TBBMakeConfig.cmake) +tbb_make_config(TBB_ROOT ${CURRENT_PACKAGES_DIR} + CONFIG_DIR TBB_CONFIG_DIR # is set to ${CURRENT_PACKAGES_DIR}/cmake + SYSTEM_NAME "Windows" + CONFIG_FOR_SOURCE + TBB_RELEASE_DIR "\${_tbb_root}/bin" + TBB_DEBUG_DIR "\${_tbb_root}/debug/bin") + +file(COPY ${TBB_CONFIG_DIR}/TBBConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) +file(COPY ${TBB_CONFIG_DIR}/TBBConfigVersion.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) +file(REMOVE_RECURSE ${TBB_CONFIG_DIR}) + +# make it work with our installation layout +file(READ ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake TBB_CONFIG_CMAKE) +string(REPLACE +"get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)" +"get_filename_component(_tbb_root \"\${_tbb_root}\" PATH) +get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)" TBB_CONFIG_CMAKE "${TBB_CONFIG_CMAKE}") +string(REPLACE +"\${_tbb_root}/bin/\${_tbb_component}.lib" +"\${_tbb_root}/lib/\${_tbb_component}.lib" TBB_CONFIG_CMAKE "${TBB_CONFIG_CMAKE}") +string(REPLACE +"\${_tbb_root}/debug/bin/\${_tbb_component}_debug.lib" +"\${_tbb_root}/debug/lib/\${_tbb_component}_debug.lib" TBB_CONFIG_CMAKE "${TBB_CONFIG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${TBB_CONFIG_CMAKE}") + message(STATUS "Installing done") # Handle copyright -- cgit v1.2.3 From 1831ce4bcc6f0ca18c3425563bc2de8857f30e41 Mon Sep 17 00:00:00 2001 From: sigman Date: Wed, 7 Jun 2017 22:08:08 +0300 Subject: Magnum OpengGL 3d library port Added ports to support Magnum C++ OpenGL engine http://mosra.cz/blog/magnum.php and its direct dependencies --- ports/corrade/CONTROL | 3 +++ ports/corrade/portfile.cmake | 45 ++++++++++++++++++++++++++++++++++++++++++++ ports/magnum/CONTROL | 4 ++++ ports/magnum/portfile.cmake | 33 ++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 ports/corrade/CONTROL create mode 100644 ports/corrade/portfile.cmake create mode 100644 ports/magnum/CONTROL create mode 100644 ports/magnum/portfile.cmake diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL new file mode 100644 index 000000000..487766e89 --- /dev/null +++ b/ports/corrade/CONTROL @@ -0,0 +1,3 @@ +Source: corrade +Version: jun2017 +Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake new file mode 100644 index 000000000..91251ea6b --- /dev/null +++ b/ports/corrade/portfile.cmake @@ -0,0 +1,45 @@ +# + +set(CORRADE_HASH b87c50db3543367b6eb20dc72246c6687449b029) + +include(vcpkg_common_functions) + + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/corrade-${CORRADE_HASH}) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/mosra/corrade/archive/${CORRADE_HASH}.zip" + FILENAME "corrade-${CORRADE_HASH}.zip" + SHA512 b15b544f996b8c95fbdf73ff9b76deea465fdcf06f431b09f4bbb9a786f4e864fdb4f8c5a2977cb366ee2398c54eac4c469da29c2ab7c67d3b8f7cbf7d2120dc +) +vcpkg_extract_source_archive(${ARCHIVE}) + +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() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Drop a copy of tools +file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/) +# Tools require dlls +file(GLOB TO_COPY + ${CURRENT_PACKAGES_DIR}/bin/*.dll) +file(COPY ${TO_COPY} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/) + +file(GLOB_RECURSE TO_REMOVE + ${CURRENT_PACKAGES_DIR}/bin/*.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE ${TO_REMOVE}) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/corrade) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/corrade/COPYING ${CURRENT_PACKAGES_DIR}/share/corrade/copyright) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL new file mode 100644 index 000000000..d07dd3160 --- /dev/null +++ b/ports/magnum/CONTROL @@ -0,0 +1,4 @@ +Source: magnum +Version: jun2017 +Build-Depends: corrade, sdl2 +Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake new file mode 100644 index 000000000..10f9be3c5 --- /dev/null +++ b/ports/magnum/portfile.cmake @@ -0,0 +1,33 @@ +### + +set(MAGNUM_HASH c8416ca4c3e9b68ba62acc9f73de235526cb3d6e) + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/magnum-${MAGNUM_HASH}) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/mosra/magnum/archive/${MAGNUM_HASH}.zip" + FILENAME "magnum-${MAGNUM_HASH}.zip" + SHA512 1248efaba22568a753396192624690a478c69946cdbbffe83e34cb85d54ec65756b693e025bf477fc192e6fecce56dc1b68631e1a763986267b83d6530af6ef4 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DWITH_SDL2APPLICATION=ON + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum/copyright) + +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 76b754e52ddcb2d2a6958e4a913d0371c00279d8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Jun 2017 11:40:47 -0700 Subject: [vcpkg-docs] Initial commit of triplets documentation --- README.md | 2 ++ docs/index.md | 1 + docs/maintainers/control-files.md | 18 ++++++------- docs/users/triplets.md | 54 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 docs/users/triplets.md diff --git a/README.md b/README.md index 09132a224..83e61bd9f 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ For CMake projects, simply include our toolchain file. See our [using a package] ## Examples See the [documentation](docs/index.md) for specific walkthroughs, including [using a package](docs/examples/using-sqlite.md) and [adding a new package](docs/examples/packaging-zlib.md). +Our docs are now also available online at ReadTheDocs: [https://vcpkg.readthedocs.io/]()! + See a 4 minute [video demo](https://www.youtube.com/watch?v=y41WFKbQFTw). ## Contributing diff --git a/docs/index.md b/docs/index.md index 9b279baf0..3fa5784e9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,6 +13,7 @@ Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are ### User Help - [Integration with build systems](users/integration.md) +- [Triplet files](users/triplets.md) ### Maintainer help diff --git a/docs/maintainers/control-files.md b/docs/maintainers/control-files.md index 1cb444df3..e446fe6fa 100644 --- a/docs/maintainers/control-files.md +++ b/docs/maintainers/control-files.md @@ -1,16 +1,16 @@ -## `CONTROL` files -Each port has some static metadata in the form of a `CONTROL` file. This file uses the same rough syntax as and a subset of the fields from [the Debian `control` format][debian]. +# CONTROL files +Each port has some static metadata in the form of a `CONTROL` file. This file uses the same syntax and a subset of the fields from [the Debian `control` format][debian]. -Fields are case-sensitive. +Field names are case-sensitive. [debian]: https://www.debian.org/doc/debian-policy/ch-controlfields.html -### Recognized fields +## Recognized fields -#### Source +### Source The name of the port. -#### Version +### Version The port version. This field should be an alphanumeric string which may also contain `.`, `_`, or `-`. No attempt at ordering versions is made; all versions are treated as bitstrings and are only evaluated for equality. @@ -22,15 +22,15 @@ Example: Version: 1.0.5-2 ``` -#### Description +### Description A description of the library The first sentence of the description should concisely describe the purpose and contents of the library. Then, a larger description including the library's "proper name" should follow. -#### Maintainer +### Maintainer Reserved for future use. -#### Build-Depends +### Build-Depends The list of dependencies required to build and use this library. Example: diff --git a/docs/users/triplets.md b/docs/users/triplets.md new file mode 100644 index 000000000..2b0971da3 --- /dev/null +++ b/docs/users/triplets.md @@ -0,0 +1,54 @@ +# Triplet files + +Triplet is a standard term used in cross compiling as a way to completely capture the target environment (cpu, os, compiler, runtime, etc) in a single convenient name. + +In Vcpkg, we use triplets to describe self-consistent builds of library sets. This means every library will be built using the same target cpu, OS, and compiler toolchain, but also CRT linkage and preferred library type. + +We currently provide many triplets by default (run `vcpkg help triplet`). However, you can easily add your own by creating a new file in the `triplets\` directory. The new triplet will immediately be available for use in commands, such as `vcpkg install boost:x86-windows-custom`. + +## Variables +### VCPKG_TARGET_ARCHITECTURE +Specifies the target machine architecture. + +Valid options are `x86`, `x64`, and `arm`. + +### VCPKG_CRT_LINKAGE +Specifies the desired MSVCRT linkage. + +Valid options are `dynamic` and `static`. + +### VCPKG_LIBRARY_LINKAGE +Specifies the preferred library linkage. + +Valid options are `dynamic` and `static`. Note that libraries can ignore this setting if they do not support the preferred linkage type. + +### VCPKG_CMAKE_SYSTEM_NAME +Specifies the target platform. + +Valid options are `WindowsStore` or empty. Empty corresponds to Windows Desktop and `WindowsStore` corresponds to UWP. +When setting this variable to `WindowsStore`, you must also set `VCPKG_CMAKE_SYSTEM_VERSION` to `10.0`. + +### VCPKG_PLATFORM_TOOLSET +Specifies the C/C++ compiler toolchain to use. + +This can be set to `v141`, `v140`, or left blank. If left blank, we select the latest compiler toolset available on your machine. + +## Per-port customization +The CMake Macro `PORT` will be set when interpreting the triplet file and can be used to change settings (such as `VCPKG_LIBRARY_LINKAGE`) on a per-port basis. + +Example: +```cmake +set(VCPKG_LIBRARY_LINKAGE static) +set(VCPKG_CRT_LINKAGE dynamic) +if(PORT STREQUAL "qt5") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() +``` +This will build `qt5` as DLLs against the dynamic CRT, but every other library as a static library (still against the dynamic CRT). + +For an example in a real project, see https://github.com/Intelight/vcpkg/blob/master/triplets/x86-windows-mixed.cmake. + +## Additional Remarks +The default triplet when running any vcpkg command is `%VCPKG_DEFAULT_TRIPLET%` or `x86-windows` if that environment variable is undefined. + +We recommend using a systematic naming scheme when creating new triplets. The Android toolchain naming scheme is a good source of inspiration: https://developer.android.com/ndk/guides/standalone_toolchain.html. -- cgit v1.2.3 From 357db2295892fa49c351bd1eb31cefcfc283fda0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Jun 2017 15:26:55 -0700 Subject: Fix link to documentation in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 83e61bd9f..c16483955 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Vcpkg ![](https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5261/badge) - + ## Overview Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are currently in a preview state; your involvement is vital to its success. @@ -31,7 +31,7 @@ For CMake projects, simply include our toolchain file. See our [using a package] ## Examples See the [documentation](docs/index.md) for specific walkthroughs, including [using a package](docs/examples/using-sqlite.md) and [adding a new package](docs/examples/packaging-zlib.md). -Our docs are now also available online at ReadTheDocs: [https://vcpkg.readthedocs.io/]()! +Our docs are now also available online at ReadTheDocs: ! See a 4 minute [video demo](https://www.youtube.com/watch?v=y41WFKbQFTw). -- cgit v1.2.3 From f0605ca60a560ab1358177beec58a53068128753 Mon Sep 17 00:00:00 2001 From: sigman Date: Thu, 8 Jun 2017 02:48:04 +0300 Subject: [Magnum] Fix static library build Fixes cmake scripts to build a static version of the libraries. --- ports/corrade/portfile.cmake | 12 ++++++++++++ ports/magnum/portfile.cmake | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 91251ea6b..2f5578b43 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -13,9 +13,16 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC 1) +else() + set(BUILD_STATIC 0) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DBUILD_STATIC=${BUILD_STATIC} # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 @@ -38,6 +45,11 @@ file(GLOB_RECURSE TO_REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(REMOVE ${TO_REMOVE}) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/corrade) file(RENAME ${CURRENT_PACKAGES_DIR}/share/corrade/COPYING ${CURRENT_PACKAGES_DIR}/share/corrade/copyright) diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 10f9be3c5..71517c15c 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -11,10 +11,17 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC 1) +else() + set(BUILD_STATIC 0) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DWITH_SDL2APPLICATION=ON + OPTIONS -DBUILD_STATIC=${BUILD_STATIC} # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 @@ -25,6 +32,10 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum) -- cgit v1.2.3 From b90dbbc928d5880de690392f431d12321b337481 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Jun 2017 17:08:13 -0700 Subject: [vcpkg-docs] Document how to change the deduced triplet for cmake and msbuild. Fixes #1185. --- docs/users/integration.md | 38 +++++++++++++++++++++++++++++++++++++- docs/users/triplets.md | 2 ++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/docs/users/integration.md b/docs/users/integration.md index 38332f1aa..1e52adb88 100644 --- a/docs/users/integration.md +++ b/docs/users/integration.md @@ -5,11 +5,14 @@ Vcpkg offers many ways to integrate into your build so you can do what's right f - [`integrate` command](#integrate) - [`export` command](#export) +Each integration style has heuristics to deduce the correct [triplet][]. This can be overridden using [a common method](#triplet-selection) based on your buildsystem. + ### Integrate Command These link your project(s) to a specific copy of Vcpkg on your machine so any updates or new package installations will be instantly available for the next build of your project. + #### User-wide for MSBuild (Recommended for Open Source MSBuild projects) ```no-highlight vcpkg integrate install @@ -82,4 +85,37 @@ Each of these have the same layout, which mimics the layout of a full vcpkg: Additionally, NuGet packages will contain a `build\native\vcpkg.targets` that integrates with MSBuild projects. -Please also see our [blog post](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/) for additional examples. \ No newline at end of file +Please also see our [blog post](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/) for additional examples. + + +### Triplet selection +Every integration mechanism besides manually adding the folders will deduce a [triplet][] for your project as one of: +- x86-windows +- x64-windows +- x86-uwp +- x64-uwp +- arm-uwp + +#### With MSBuild +You can see the automatically deduced triplet by setting your MSBuild verbosity to Normal or higher: + +> *Shortcut: Ctrl+Q "build and run"* +> +> Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity + +To override the automatically chosen [triplet][], you can specify the MSBuild property `VcpkgTriplet` in your `.vcxproj`. We recommend adding this to the `Globals` PropertyGroup. +```xml + + + x86-windows-static + x64-windows-static + +``` + +#### With CMake +Simply set `VCPKG_TARGET_TRIPLET` on the configure line. +```no-highlight +cmake ../my/project -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=... +``` + +[triplet]: triplets.md diff --git a/docs/users/triplets.md b/docs/users/triplets.md index 2b0971da3..06f77e63f 100644 --- a/docs/users/triplets.md +++ b/docs/users/triplets.md @@ -6,6 +6,8 @@ In Vcpkg, we use triplets to describe self-consistent builds of library sets. Th We currently provide many triplets by default (run `vcpkg help triplet`). However, you can easily add your own by creating a new file in the `triplets\` directory. The new triplet will immediately be available for use in commands, such as `vcpkg install boost:x86-windows-custom`. +To change the triplet used by your project, such as to enable static linking, see our [Integration Document](integration.md#triplet-selection). + ## Variables ### VCPKG_TARGET_ARCHITECTURE Specifies the target machine architecture. -- cgit v1.2.3 From 35e574de5dc3ba912bc2e7bc1c451db8c638002c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20T=C3=A4schner?= Date: Thu, 8 Jun 2017 07:35:33 +0200 Subject: [cairo] Copy headers to include and include/cairo. --- ports/cairo/portfile.cmake | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index 47055a270..9471c427a 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -33,7 +33,7 @@ endif() vcpkg_install_cmake() # Copy the appropriate header files. -file(COPY +foreach(FILE "${SOURCE_PATH}/src/cairo.h" "${SOURCE_PATH}/src/cairo-deprecated.h" "${SOURCE_PATH}/src/cairo-features.h" @@ -44,17 +44,10 @@ file(COPY "${SOURCE_PATH}/cairo-version.h" "${SOURCE_PATH}/src/cairo-win32.h" "${SOURCE_PATH}/util/cairo-gobject/cairo-gobject.h" -"${SOURCE_PATH}/src/cairo-ft.h" -DESTINATION -${CURRENT_PACKAGES_DIR}/include -) - -file(COPY -"${SOURCE_PATH}/src/cairo-pdf.h" -"${SOURCE_PATH}/src/cairo-svg.h" -DESTINATION -${CURRENT_PACKAGES_DIR}/include/cairo -) +"${SOURCE_PATH}/src/cairo-ft.h") + file(COPY ${FILE} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(COPY ${FILE} DESTINATION ${CURRENT_PACKAGES_DIR}/include/cairo) +endforeach() # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cairo) -- cgit v1.2.3 From 1c11bec722bbe25b1523cf436e9567d1689cc408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20T=C3=A4schner?= Date: Thu, 8 Jun 2017 08:00:22 +0200 Subject: Revert "[pango] Add CAIRO_WIN32_STATIC_BUILD symbol to static builds of pangocairo lib." This reverts commit 226eefef9da1ec3b601b192263ff3d6b95aaf3cf. --- ports/pango/CMakeLists.txt | 4 ---- ports/pango/CONTROL | 2 +- ports/pango/portfile.cmake | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ports/pango/CMakeLists.txt b/ports/pango/CMakeLists.txt index ea36939b5..7dad7dbcf 100644 --- a/ports/pango/CMakeLists.txt +++ b/ports/pango/CMakeLists.txt @@ -130,10 +130,6 @@ pango_add_module(pangocairo pango/pangocairo-font.c pango/pangocairo-fontmap.c pango/pangocairo-render.c) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - target_compile_definitions(pangocairo PRIVATE CAIRO_WIN32_STATIC_BUILD=1) -endif() target_link_libraries(pangocairo ${CAIRO_LIBRARIES} pango pangowin32 pangoft2 ${FONT_LIBRARIES}) target_include_directories(pangocairo PRIVATE ${CAIRO_INCLUDE_DIR} ${FONT_INCLUDE_DIRS}) diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL index f5e2709c4..011f33691 100644 --- a/ports/pango/CONTROL +++ b/ports/pango/CONTROL @@ -1,4 +1,4 @@ Source: pango -Version: 1.40.6-1 +Version: 1.40.6 Description: Text and font handling library. Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz diff --git a/ports/pango/portfile.cmake b/ports/pango/portfile.cmake index 4e373e84a..7f28b8ca7 100644 --- a/ports/pango/portfile.cmake +++ b/ports/pango/portfile.cmake @@ -17,8 +17,6 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - -DVCPKG_LIBRARY_LINKAGE=${VCPKG_LIBRARY_LINKAGE} OPTIONS_DEBUG -DPANGO_SKIP_HEADERS=ON) -- cgit v1.2.3 From 796220ee174b756dd9b47f5790d9907d57b0e175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20T=C3=A4schner?= Date: Thu, 8 Jun 2017 08:02:15 +0200 Subject: [cairo] Hardcode value of CAIRO_WIN32_STATIC_BUILD into the cairo headers. --- ports/cairo/CONTROL | 2 +- ports/cairo/portfile.cmake | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index 89ba03b79..88325c521 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,4 +1,4 @@ Source: cairo -Version: 1.15.4 +Version: 1.15.4-1 Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index 57b45e91c..d6036d93c 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -32,6 +32,14 @@ endif() vcpkg_install_cmake() +file(READ "${SOURCE_PATH}/src/cairo.h" CAIRO_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}") +else() + string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "0" CAIRO_H "${CAIRO_H}") +endif() +file(WRITE "${SOURCE_PATH}/src/cairo.h" "${CAIRO_H}") + # Copy the appropriate header files. file(COPY "${SOURCE_PATH}/src/cairo.h" -- cgit v1.2.3 From 8adde5920866d899c4325be731d40dd4027d4a4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20T=C3=A4schner?= Date: Thu, 8 Jun 2017 09:01:29 +0200 Subject: [cairo] Hardcode CAIRO_WIN32_STATIC_BUILD only in the installed header. --- ports/cairo/portfile.cmake | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index d6036d93c..c184aebeb 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -32,14 +32,6 @@ endif() vcpkg_install_cmake() -file(READ "${SOURCE_PATH}/src/cairo.h" CAIRO_H) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}") -else() - string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "0" CAIRO_H "${CAIRO_H}") -endif() -file(WRITE "${SOURCE_PATH}/src/cairo.h" "${CAIRO_H}") - # Copy the appropriate header files. file(COPY "${SOURCE_PATH}/src/cairo.h" @@ -57,6 +49,16 @@ DESTINATION ${CURRENT_PACKAGES_DIR}/include ) +foreach(FILE "${CURRENT_PACKAGES_DIR}/include/cairo.h") + file(READ ${FILE} CAIRO_H) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}") + else() + string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "0" CAIRO_H "${CAIRO_H}") + endif() + file(WRITE ${FILE} "${CAIRO_H}") +endforeach() + # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cairo) file(RENAME ${CURRENT_PACKAGES_DIR}/share/cairo/COPYING ${CURRENT_PACKAGES_DIR}/share/cairo/copyright) -- cgit v1.2.3 From a73514fd771813e2281a5e9178ca779ee7dac82e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 8 Jun 2017 02:15:58 -0700 Subject: [openssl] Fix VS2017-only uwp builds. Use JOM for multithreading. --- ports/openssl/CONTROL | 2 +- ports/openssl/make-openssl.bat | 14 ++++++++++++-- ports/openssl/portfile-uwp.cmake | 7 +++++-- ports/openssl/portfile.cmake | 25 +++++++++++++++++++++---- 4 files changed, 39 insertions(+), 9 deletions(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index c6de2ad68..fb5861cd4 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2k-4 +Version: 1.0.2k-5 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/make-openssl.bat b/ports/openssl/make-openssl.bat index 4c038094d..6f0afdf74 100644 --- a/ports/openssl/make-openssl.bat +++ b/ports/openssl/make-openssl.bat @@ -1,10 +1,20 @@ set build=%1 -perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL +perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL -FS -FIWindows.h + +set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\3.0.0.0\ +set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\2.0.0.0\ +set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\1.0.0.0\ +set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\4.0.0.0\ +set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\3.0.0.0\ +set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\2.0.0.0\ +set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\1.0.0.0\ call ms\do_winuniversal.bat -call ms\setVSvars.bat universal10.0%build% +mkdir inc32\openssl +jom -j %NUMBER_OF_PROCESSORS% -k -f ms\ntdll.mak +REM due to a race condition in the build, we need to have a second single-threaded pass. nmake -f ms\ntdll.mak diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake index df1776eaa..cc29c7e4d 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl/portfile-uwp.cmake @@ -7,7 +7,8 @@ # if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Static building not supported yet") + set(VCPKG_LIBRARY_LINKAGE dynamic) + message("Static building not supported yet") endif() if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") @@ -29,8 +30,10 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2k_WinRT) vcpkg_find_acquire_program(PERL) +vcpkg_find_acquire_program(JOM) +get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") +set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${JOM_EXE_PATH}") vcpkg_download_distfile(ARCHIVE URLS "https://github.com/Microsoft/openssl/archive/OpenSSL_1_0_2k_WinRT.zip" diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 08cd4e04c..0dfd9aa88 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -13,6 +13,7 @@ find_program(NMAKE nmake) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +vcpkg_find_acquire_program(JOM) set(ENV{PATH} "${PERL_EXE_PATH};${NASM_EXE_PATH};$ENV{PATH}") vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE @@ -60,7 +61,7 @@ set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/openssl- set(OPENSSLDIR_RELEASE ${CURRENT_PACKAGES_DIR}) vcpkg_execute_required_process( - COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" + COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel ) @@ -69,10 +70,19 @@ vcpkg_execute_required_process( WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel ) +# Openssl's buildsystem has a race condition which will cause JOM to fail at some point. +# This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build. +make_directory(${SOURCE_PATH_RELEASE}/inc32/openssl) +execute_process( + COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log +) vcpkg_execute_required_process( COMMAND ${NMAKE} -f ${OPENSSL_MAKEFILE} install WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME build-${TARGET_TRIPLET}-rel) + LOGNAME build-${TARGET_TRIPLET}-rel-1) message(STATUS "Build ${TARGET_TRIPLET}-rel done") @@ -83,7 +93,7 @@ set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/openssl-${ set(OPENSSLDIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug) vcpkg_execute_required_process( - COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" + COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} LOGNAME configure-perl-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg ) @@ -92,10 +102,17 @@ vcpkg_execute_required_process( WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg ) +make_directory(${SOURCE_PATH_DEBUG}/inc32/openssl) +execute_process( + COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log +) vcpkg_execute_required_process( COMMAND ${NMAKE} -f ${OPENSSL_MAKEFILE} install WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME build-${TARGET_TRIPLET}-dbg) + LOGNAME build-${TARGET_TRIPLET}-dbg-1) message(STATUS "Build ${TARGET_TRIPLET}-dbg done") -- cgit v1.2.3 From 9abbfe88acb6f3f3497c9e8245c5754be5aa8cd4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 8 Jun 2017 02:21:21 -0700 Subject: [cairo] Merge changes from PR #1232 --- ports/cairo/CONTROL | 2 +- ports/cairo/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index 88325c521..0cad79902 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,4 +1,4 @@ Source: cairo -Version: 1.15.4-1 +Version: 1.15.4-2 Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index 9d01d4992..a15649627 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -49,7 +49,7 @@ foreach(FILE file(COPY ${FILE} DESTINATION ${CURRENT_PACKAGES_DIR}/include/cairo) endforeach() -foreach(FILE "${CURRENT_PACKAGES_DIR}/include/cairo.h") +foreach(FILE "${CURRENT_PACKAGES_DIR}/include/cairo.h" "${CURRENT_PACKAGES_DIR}/include/cairo/cairo.h") file(READ ${FILE} CAIRO_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}") -- cgit v1.2.3 From 247a6cec90004b8666d155eacc0f27d3a6c8fcf9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 8 Jun 2017 00:36:17 -0700 Subject: [vcpkg] Improve diagnostics upon port load failure --- toolsrc/include/Paragraphs.h | 8 ++++ toolsrc/include/SourceParagraph.h | 9 +++-- toolsrc/include/Span.h | 38 ++++++++++++++++++ toolsrc/include/pch.h | 1 + toolsrc/include/vcpkg_Strings.h | 15 ++++---- toolsrc/src/Paragraphs.cpp | 23 +++++++---- toolsrc/src/SourceParagraph.cpp | 64 +++++++++++++++++-------------- toolsrc/src/commands_ci.cpp | 5 ++- toolsrc/src/commands_depends.cpp | 5 +-- toolsrc/src/commands_search.cpp | 25 +++++++++++- toolsrc/src/vcpkg_Dependencies.cpp | 6 +-- toolsrc/vcpkglib/vcpkglib.vcxproj | 1 + toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 3 ++ 13 files changed, 147 insertions(+), 56 deletions(-) create mode 100644 toolsrc/include/Span.h diff --git a/toolsrc/include/Paragraphs.h b/toolsrc/include/Paragraphs.h index 59f0eefc8..04f9fb879 100644 --- a/toolsrc/include/Paragraphs.h +++ b/toolsrc/include/Paragraphs.h @@ -21,6 +21,14 @@ namespace vcpkg::Paragraphs Expected try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec); + struct LoadResults + { + std::vector paragraphs; + std::vector errors; + }; + + LoadResults try_load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); + std::vector load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); std::map extract_port_names_and_versions( diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index a53158f3f..47ad5b830 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -1,5 +1,6 @@ #pragma once +#include "Span.h" #include "vcpkg_System.h" #include "vcpkg_expected.h" @@ -23,7 +24,6 @@ namespace vcpkg { std::string name; std::string remaining_fields_as_string; - std::string valid_fields_as_string; std::error_code error; }; @@ -45,8 +45,11 @@ namespace vcpkg std::vector depends; }; - void print_error_message(const ParseControlErrorInfo& info); - void print_error_message(std::vector error_info_list); + void print_error_message(span error_info_list); + inline void print_error_message(const ParseControlErrorInfo& error_info_list) + { + return print_error_message({&error_info_list, 1}); + } std::vector filter_dependencies(const std::vector& deps, const Triplet& t); diff --git a/toolsrc/include/Span.h b/toolsrc/include/Span.h new file mode 100644 index 000000000..b16af2cef --- /dev/null +++ b/toolsrc/include/Span.h @@ -0,0 +1,38 @@ +#pragma once + +#include +#include +#include + +template +struct span +{ +public: + using element_type = T; + using pointer = T*; + using reference = T&; + using iterator = T*; + + constexpr span() noexcept : m_ptr(nullptr), m_count(0) {} + constexpr span(std::nullptr_t) noexcept : span() {} + constexpr span(T* ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {} + constexpr span(T* ptr_begin, T* ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {} + + template + constexpr span(T (&arr)[N]) noexcept : span(arr, N) + { + } + + span(std::vector& v) noexcept : span(v.data(), v.size()) {} + span(const std::vector>& v) noexcept : span(v.data(), v.size()) {} + + constexpr iterator begin() const { return m_ptr; } + constexpr iterator end() const { return m_ptr + m_count; } + + constexpr reference operator[](size_t i) const { return m_ptr[i]; } + constexpr size_t size() const { return m_count; } + +private: + pointer m_ptr; + size_t m_count; +}; diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index c58c30ea3..406d0741e 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index 3f8f4562e..cab8071aa 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -58,8 +58,8 @@ namespace vcpkg::Strings std::string ascii_to_lowercase(const std::string& input); - template - std::basic_string join(const CharType* delimiter, const std::vector& v, Transformer transformer) + template + std::basic_string join(const CharType* delimiter, const Container& v, Transformer transformer) { if (v.empty()) { @@ -69,20 +69,21 @@ namespace vcpkg::Strings std::basic_string output; size_t size = v.size(); - output.append(transformer(v.at(0))); + output.append(transformer(v[0])); for (size_t i = 1; i < size; ++i) { output.append(delimiter); - output.append(transformer(v.at(i))); + output.append(transformer(v[i])); } return output; } - template - std::basic_string join(const CharType* delimiter, const std::vector& v) + template + std::basic_string join(const CharType* delimiter, const Container& v) { - return join(delimiter, v, [](const T& x) -> const T& { return x; }); + using Element = decltype(v[0]); + return join(delimiter, v, [](const Element& x) -> const Element& { return x; }); } void trim(std::string* s); diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp index 13103d1f8..31e8f1da3 100644 --- a/toolsrc/src/Paragraphs.cpp +++ b/toolsrc/src/Paragraphs.cpp @@ -209,6 +209,7 @@ namespace vcpkg::Paragraphs { return SourceParagraph::parse_control_file(*p); } + error_info.name = path.filename().generic_u8string(); error_info.error = pghs.error(); return error_info; } @@ -226,25 +227,33 @@ namespace vcpkg::Paragraphs return pghs.error(); } - std::vector load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir) + LoadResults try_load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir) { - std::vector output; - std::vector port_errors; + LoadResults ret; for (auto&& path : fs.get_files_non_recursive(ports_dir)) { ExpectedT source_paragraph = try_load_port(fs, path); if (auto srcpgh = source_paragraph.get()) { - output.emplace_back(std::move(*srcpgh)); + ret.paragraphs.emplace_back(std::move(*srcpgh)); } else { - port_errors.emplace_back(source_paragraph.error()); + ret.errors.emplace_back(source_paragraph.error()); } } - print_error_message(port_errors); + return ret; + } - return output; + std::vector load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir) + { + auto results = try_load_all_ports(fs, ports_dir); + if (!results.errors.empty()) + { + print_error_message(results.errors); + Checks::exit_fail(VCPKG_LINE_INFO); + } + return std::move(results.paragraphs); } std::map extract_port_names_and_versions( diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 2508af1e8..4001e891f 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -27,42 +27,52 @@ namespace vcpkg static const std::string SUPPORTS = "Supports"; } - static const std::vector& get_list_of_valid_fields() + static span get_list_of_valid_fields() { - static const std::vector valid_fields = {SourceParagraphRequiredField::SOURCE, - SourceParagraphRequiredField::VERSION, + static const std::string valid_fields[] = {SourceParagraphRequiredField::SOURCE, + SourceParagraphRequiredField::VERSION, - SourceParagraphOptionalField::DESCRIPTION, - SourceParagraphOptionalField::MAINTAINER, - SourceParagraphOptionalField::BUILD_DEPENDS, - SourceParagraphOptionalField::SUPPORTS}; + SourceParagraphOptionalField::DESCRIPTION, + SourceParagraphOptionalField::MAINTAINER, + SourceParagraphOptionalField::BUILD_DEPENDS, + SourceParagraphOptionalField::SUPPORTS}; return valid_fields; } - void print_error_message(const ParseControlErrorInfo& info) + void print_error_message(span error_info_list) { - System::println( - System::Color::error, "Error: There are invalid fields in the Source Paragraph of %s", info.name); - System::println("The following fields were not expected:\n\n %s\n\n", info.remaining_fields_as_string); - System::println("This is the list of valid fields (case-sensitive): \n\n %s\n", info.valid_fields_as_string); - System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n"); - } + Checks::check_exit(VCPKG_LINE_INFO, error_info_list.size() > 0); - void print_error_message(std::vector error_info_list) - { - if (error_info_list.size() == 0) return; - for (ParseControlErrorInfo error_info : error_info_list) + for (auto&& error_info : error_info_list) { - System::println( - System::Color::error, "Error: There are invalid fields in the Source Paragraph of %s", error_info.name); - System::println("The following fields were not expected:\n\n %s\n\n", - error_info.remaining_fields_as_string); + if (error_info.error) + { + System::println( + System::Color::error, "Error: while loading %s: %s", error_info.name, error_info.error.message()); + } } - System::println("This is the list of valid fields (case-sensitive): \n\n %s\n", - error_info_list.front().valid_fields_as_string); - System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n"); + bool have_remaining_fields = false; + for (auto&& error_info : error_info_list) + { + if (!error_info.remaining_fields_as_string.empty()) + { + System::println(System::Color::error, + "Error: There are invalid fields in the Source Paragraph of %s", + error_info.name); + System::println("The following fields were not expected:\n\n %s\n\n", + error_info.remaining_fields_as_string); + have_remaining_fields = true; + } + } + + if (have_remaining_fields) + { + System::println("This is the list of valid fields (case-sensitive): \n\n %s\n", + Strings::join("\n ", get_list_of_valid_fields())); + System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n"); + } } ExpectedT SourceParagraph::parse_control_file( @@ -83,12 +93,10 @@ namespace vcpkg if (!fields.empty()) { const std::vector remaining_fields = Maps::extract_keys(fields); - const std::vector& valid_fields = get_list_of_valid_fields(); const std::string remaining_fields_as_string = Strings::join("\n ", remaining_fields); - const std::string valid_fields_as_string = Strings::join("\n ", valid_fields); - return ParseControlErrorInfo{sparagraph.name, remaining_fields_as_string, valid_fields_as_string}; + return ParseControlErrorInfo{sparagraph.name, remaining_fields_as_string}; } return sparagraph; } diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp index bad1286f0..7e724f3ee 100644 --- a/toolsrc/src/commands_ci.cpp +++ b/toolsrc/src/commands_ci.cpp @@ -20,9 +20,10 @@ namespace vcpkg::Commands::CI const fs::path& ports_directory, const Triplet& triplet) { - std::vector ports = Paragraphs::load_all_ports(fs, ports_directory); + auto sources = Paragraphs::load_all_ports(fs, ports_directory); + std::vector specs; - for (const SourceParagraph& p : ports) + for (const SourceParagraph& p : sources) { specs.push_back(PackageSpec::from_name_and_triplet(p.name, triplet).value_or_exit(VCPKG_LINE_INFO)); } diff --git a/toolsrc/src/commands_depends.cpp b/toolsrc/src/commands_depends.cpp index ad33bbad4..9db4b7bb1 100644 --- a/toolsrc/src/commands_depends.cpp +++ b/toolsrc/src/commands_depends.cpp @@ -13,10 +13,9 @@ namespace vcpkg::Commands::DependInfo args.check_exact_arg_count(0, example); args.check_and_get_optional_command_arguments({}); - const std::vector source_paragraphs = - Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + auto sources = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - for (const SourceParagraph& source_paragraph : source_paragraphs) + for (const SourceParagraph& source_paragraph : sources) { auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name; }); System::println("%s: %s", source_paragraph.name, s); diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index 739aa0f43..4b7f49ba8 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -4,6 +4,7 @@ #include "SourceParagraph.h" #include "vcpkg_Commands.h" #include "vcpkg_System.h" +#include "vcpkglib.h" #include "vcpkglib_helpers.h" namespace vcpkg::Commands::Search @@ -61,8 +62,28 @@ namespace vcpkg::Commands::Search args.check_max_arg_count(1, example); const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_GRAPH}); - const std::vector source_paragraphs = - Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); + + if (!sources_and_errors.errors.empty()) + { + if (vcpkg::g_debugging) + { + print_error_message(sources_and_errors.errors); + } + else + { + for (auto&& error : sources_and_errors.errors) + { + System::println( + System::Color::warning, "Warning: an error occurred while parsing '%s'\n", error.name); + } + System::println(System::Color::warning, + "Use '--debug' to get more information about the parse failures.\n"); + } + } + + auto& source_paragraphs = sources_and_errors.paragraphs; + if (options.find(OPTION_GRAPH) != options.cend()) { const std::string graph_as_string = create_graph_as_string(source_paragraphs); diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index ea5832e46..f32d92f4c 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -179,10 +179,8 @@ namespace vcpkg::Dependencies if (auto spgh = maybe_spgh.get()) return InstallPlanAction{spec, {nullopt, nullopt, *spgh}, request_type}; - else - print_error_message(maybe_spgh.error()); - - Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec); + print_error_message(maybe_spgh.error()); + Checks::exit_fail(VCPKG_LINE_INFO); } }; diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index abc2e4a4e..487609cca 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -142,6 +142,7 @@ + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 599bfeafb..a901cebe7 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -299,5 +299,8 @@ Header Files + + Header Files + \ No newline at end of file -- cgit v1.2.3 From 44a995d4461c54f0ff838af2649b618c533e60b7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 8 Jun 2017 04:36:11 -0700 Subject: [vcpkg] Hotfix previous commit. --- ports/opencv/CONTROL | 1 + toolsrc/include/SourceParagraph.h | 2 +- toolsrc/include/vcpkg_Strings.h | 2 +- toolsrc/src/SourceParagraph.cpp | 2 +- toolsrc/src/tests_dependencies.cpp | 48 +++++++++++++++++++------------------- 5 files changed, 28 insertions(+), 27 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 8da12f3d9..ce15807ba 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -4,3 +4,4 @@ Build-Depends: zlib, libpng, libjpeg-turbo, tiff #Use the following line instead for optional features from OpenCV-contrib that require protobuf #Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf Description: computer vision library +Supports: x64 \ No newline at end of file diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 47ad5b830..2f30e338e 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -78,7 +78,7 @@ namespace vcpkg V141, }; - bool supports(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools); + bool is_supported(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools); private: std::vector architectures; diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index cab8071aa..e95a0601a 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -61,7 +61,7 @@ namespace vcpkg::Strings template std::basic_string join(const CharType* delimiter, const Container& v, Transformer transformer) { - if (v.empty()) + if (v.size() == 0) { return std::basic_string(); } diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 4001e891f..3b770a4b4 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -202,7 +202,7 @@ namespace vcpkg return std::move(unrecognized); } - bool Supports::supports(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools) + bool Supports::is_supported(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools) { auto is_in_or_empty = [](auto v, auto&& c) -> bool { return c.empty() || c.end() != Util::find(c, v); }; if (!is_in_or_empty(arch, architectures)) return false; diff --git a/toolsrc/src/tests_dependencies.cpp b/toolsrc/src/tests_dependencies.cpp index fdf2afea8..995d46873 100644 --- a/toolsrc/src/tests_dependencies.cpp +++ b/toolsrc/src/tests_dependencies.cpp @@ -45,14 +45,14 @@ namespace UnitTest1 }); Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get())); - Assert::IsTrue(v.get()->supports(System::CPUArchitecture::X64, - Supports::Platform::UWP, - Supports::Linkage::DYNAMIC, - Supports::ToolsetVersion::V140)); - Assert::IsTrue(v.get()->supports(System::CPUArchitecture::ARM, - Supports::Platform::WINDOWS, - Supports::Linkage::STATIC, - Supports::ToolsetVersion::V141)); + Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::X64, + Supports::Platform::UWP, + Supports::Linkage::DYNAMIC, + Supports::ToolsetVersion::V140)); + Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::ARM, + Supports::Platform::WINDOWS, + Supports::Linkage::STATIC, + Supports::ToolsetVersion::V141)); } TEST_METHOD(parse_supports_invalid) @@ -78,22 +78,22 @@ namespace UnitTest1 }); Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get())); - Assert::IsTrue(v.get()->supports(System::CPUArchitecture::X64, - Supports::Platform::WINDOWS, - Supports::Linkage::DYNAMIC, - Supports::ToolsetVersion::V140)); - Assert::IsFalse(v.get()->supports(System::CPUArchitecture::ARM, - Supports::Platform::WINDOWS, - Supports::Linkage::DYNAMIC, - Supports::ToolsetVersion::V140)); - Assert::IsFalse(v.get()->supports(System::CPUArchitecture::X64, - Supports::Platform::UWP, - Supports::Linkage::DYNAMIC, - Supports::ToolsetVersion::V140)); - Assert::IsTrue(v.get()->supports(System::CPUArchitecture::X64, - Supports::Platform::WINDOWS, - Supports::Linkage::STATIC, - Supports::ToolsetVersion::V141)); + Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::X64, + Supports::Platform::WINDOWS, + Supports::Linkage::DYNAMIC, + Supports::ToolsetVersion::V140)); + Assert::IsFalse(v.get()->is_supported(System::CPUArchitecture::ARM, + Supports::Platform::WINDOWS, + Supports::Linkage::DYNAMIC, + Supports::ToolsetVersion::V140)); + Assert::IsFalse(v.get()->is_supported(System::CPUArchitecture::X64, + Supports::Platform::UWP, + Supports::Linkage::DYNAMIC, + Supports::ToolsetVersion::V140)); + Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::X64, + Supports::Platform::WINDOWS, + Supports::Linkage::STATIC, + Supports::ToolsetVersion::V141)); } }; } -- cgit v1.2.3 From 1653cf43632a5914ff7da8e7b1260dc578393daf Mon Sep 17 00:00:00 2001 From: "Stephen E. Baker" Date: Wed, 7 Jun 2017 22:23:17 -0400 Subject: Add package for lpeg LPeg (http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html) is an expression parsing library for lua created by the developer of lua. --- ports/lpeg/CMakeLists.txt | 28 ++++++++++++++++++++++++++++ ports/lpeg/CONTROL | 4 ++++ ports/lpeg/COPYRIGHT | 7 +++++++ ports/lpeg/lpeg.def | 3 +++ ports/lpeg/portfile.cmake | 31 +++++++++++++++++++++++++++++++ 5 files changed, 73 insertions(+) create mode 100644 ports/lpeg/CMakeLists.txt create mode 100644 ports/lpeg/CONTROL create mode 100644 ports/lpeg/COPYRIGHT create mode 100644 ports/lpeg/lpeg.def create mode 100644 ports/lpeg/portfile.cmake diff --git a/ports/lpeg/CMakeLists.txt b/ports/lpeg/CMakeLists.txt new file mode 100644 index 000000000..f5a72fad4 --- /dev/null +++ b/ports/lpeg/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.0) +project(lpeg) + +if(NOT WIN32) + message(FATAL_ERROR "Written for windows only") +endif() + +find_path(LUA_INCLUDE_DIR lua.h PATH_SUFFIXES lua) +find_library(LUA_LIBRARY lua) +set(LPEG_INCLUDES ${LUA_INCLUDE_DIR}) +set(LPEG_LIBRARIES ${LUA_LIBRARY}) + +add_library(lpeg + lpvm.c + lptree.c + lpprint.c + lpcap.c + lpcode.c + lpeg.def) + +target_include_directories(lpeg PRIVATE ${LPEG_INCLUDES}) +target_link_libraries(lpeg PRIVATE ${LPEG_LIBRARIES}) + +install(TARGETS lpeg + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) +install(FILES re.lua DESTINATION share/lua) diff --git a/ports/lpeg/CONTROL b/ports/lpeg/CONTROL new file mode 100644 index 000000000..f1eeae348 --- /dev/null +++ b/ports/lpeg/CONTROL @@ -0,0 +1,4 @@ +Source: lpeg +Version: 1.0.1 +Description: LPeg is a pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs). +Build-Depends: lua diff --git a/ports/lpeg/COPYRIGHT b/ports/lpeg/COPYRIGHT new file mode 100644 index 000000000..7870c54ce --- /dev/null +++ b/ports/lpeg/COPYRIGHT @@ -0,0 +1,7 @@ +Copyright © 2007-2017 Lua.org, PUC-Rio. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ports/lpeg/lpeg.def b/ports/lpeg/lpeg.def new file mode 100644 index 000000000..c4c1285b7 --- /dev/null +++ b/ports/lpeg/lpeg.def @@ -0,0 +1,3 @@ +LIBRARY lpeg +EXPORTS + luaopen_lpeg diff --git a/ports/lpeg/portfile.cmake b/ports/lpeg/portfile.cmake new file mode 100644 index 000000000..5a36f7944 --- /dev/null +++ b/ports/lpeg/portfile.cmake @@ -0,0 +1,31 @@ +#cmake-only scripts +include(vcpkg_common_functions) + +set(LPEG_VER 1.0.1) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lpeg-${LPEG_VER}) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-${LPEG_VER}.tar.gz" + FILENAME "lpeg-${LPEG_VER}.tar.gz" + SHA512 7b43fbee7eff443000986684bc56bba6d2796a31cf860740746c70e155bdea1b62a46b93f97e2747e3ef0f63e965148778ac2985d0f2d83e1e37ec4ebbabf4aa +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/lpeg.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +# Remove debug share +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(COPY ${CMAKE_CURRENT_LIST_DIR}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/lpeg) + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) -- cgit v1.2.3 From a24dacfc9709787e4e2e63017056fdb2cdcc6ba5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 8 Jun 2017 05:35:04 -0700 Subject: [vcpkg] Hotfix previous commit --- ports/opencv/CONTROL | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index ce15807ba..8da12f3d9 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -4,4 +4,3 @@ Build-Depends: zlib, libpng, libjpeg-turbo, tiff #Use the following line instead for optional features from OpenCV-contrib that require protobuf #Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf Description: computer vision library -Supports: x64 \ No newline at end of file -- cgit v1.2.3 From a5429a01294b6a622c0b1af58976f61d6e8c1043 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 8 Jun 2017 11:37:33 -0700 Subject: Create Tacopie control --- ports/tacopie/CONTROL | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ports/tacopie/CONTROL diff --git a/ports/tacopie/CONTROL b/ports/tacopie/CONTROL new file mode 100644 index 000000000..086c57f24 --- /dev/null +++ b/ports/tacopie/CONTROL @@ -0,0 +1,3 @@ +Source: tacopie +Version: 2.4.1 +Description: Tacopie is a TCP Client & Server C++11 library -- cgit v1.2.3 From 003e5a0dd92e1dbd559dab42477993fc027d7bb2 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 8 Jun 2017 11:39:24 -0700 Subject: Created Tacopie potfile --- ports/tacopie/portfile.cmake | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 ports/tacopie/portfile.cmake diff --git a/ports/tacopie/portfile.cmake b/ports/tacopie/portfile.cmake new file mode 100644 index 000000000..19ce897e6 --- /dev/null +++ b/ports/tacopie/portfile.cmake @@ -0,0 +1,52 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Cylix/tacopie + REF 2.4.1 + SHA512 a1579080412114d3899492cd9559bb0eadd6048c1f84ac66ec8ca47bd6fbb35306f0d203d789bd1b7ed0a0a5ab27434dfe6583a1c67873c85bca4b6e2a186d77 + HEAD_REF master +) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_build_cmake() + +file(GLOB DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" +) +file(GLOB LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/lib/*.lib" +) +file(GLOB DEBUG_DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" +) +file(GLOB DEBUG_LIBS +"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/lib/*.lib" +) +file(GLOB HEADERS "${SOURCE_PATH}/includes/tacopie/*.hpp" "${SOURCE_PATH}/includes/tacopie/*.hpp") +if(DLLS) + file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() +file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/tacopie) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tacopie RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From af6c9989d2e3124fcd3c5612faa3e233ae34f39d Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 8 Jun 2017 11:42:25 -0700 Subject: Created cpp-redis portfile #982 --- ports/cpp-redis/portfile.cmake | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 ports/cpp-redis/portfile.cmake diff --git a/ports/cpp-redis/portfile.cmake b/ports/cpp-redis/portfile.cmake new file mode 100644 index 000000000..42b2697e7 --- /dev/null +++ b/ports/cpp-redis/portfile.cmake @@ -0,0 +1,53 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Cylix/cpp_redis + REF 3.5.1 + SHA512 2c50cf777d5955f7bcb94a55514fac444d0dcacc2df343dd89969889be7653a793620dbaac9d6dd0f444eee7f0664c4eb96a1d83477d207143660764afeea129 + HEAD_REF master +) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DUSE_CUSTOM_TCP_CLIENT=TRUE +) + +vcpkg_build_cmake() + +file(GLOB DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" +) +file(GLOB LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/lib/*.lib" +) +file(GLOB DEBUG_DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" +) +file(GLOB DEBUG_LIBS +"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/lib/*.lib" +) +file(GLOB HEADERS "${SOURCE_PATH}/includes/cpp_redis/*.hpp" "${SOURCE_PATH}/includes/cpp_redis/*.hpp") +if(DLLS) + file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() +file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/cpp_redis) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpp-redis RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From a9b3cb7fe9d369e471ca1d811a14df0b88cf5385 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 8 Jun 2017 11:43:12 -0700 Subject: Created Control file --- ports/cpp-redis/CONTROL | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ports/cpp-redis/CONTROL diff --git a/ports/cpp-redis/CONTROL b/ports/cpp-redis/CONTROL new file mode 100644 index 000000000..30491dca4 --- /dev/null +++ b/ports/cpp-redis/CONTROL @@ -0,0 +1,3 @@ +Source: cpp-redis +Version: 3.5.1 +Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining. -- cgit v1.2.3 From 346c2bee991499ba6698545501e958608638b900 Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 9 Jun 2017 00:55:17 +0200 Subject: [fltk] force import macro to either 0 or 1 --- ports/fltk/CONTROL | 2 +- ports/fltk/portfile.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ports/fltk/CONTROL b/ports/fltk/CONTROL index 2fdb2eecb..2b4f00629 100644 --- a/ports/fltk/CONTROL +++ b/ports/fltk/CONTROL @@ -1,4 +1,4 @@ Source: fltk -Version: 1.3.4-3 +Version: 1.3.4-4 Description: FLTK (pronounced fulltick) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its built-in GLUT emulation. Build-Depends: zlib, libpng, libjpeg-turbo \ No newline at end of file diff --git a/ports/fltk/portfile.cmake b/ports/fltk/portfile.cmake index ba9058316..c6c6fd830 100644 --- a/ports/fltk/portfile.cmake +++ b/ports/fltk/portfile.cmake @@ -28,6 +28,7 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DOPTION_BUILD_EXAMPLES=OFF -DOPTION_USE_SYSTEM_ZLIB=ON @@ -71,6 +72,16 @@ else() endforeach() endif() +foreach(FILE Fl_Export.H fl_utf8.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/FL/${FILE} FLTK_HEADER) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "defined(FL_DLL)" "0" FLTK_HEADER "${FLTK_HEADER}") + else() + string(REPLACE "defined(FL_DLL)" "1" FLTK_HEADER "${FLTK_HEADER}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/FL/${FILE} "${FLTK_HEADER}") +endforeach() + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fltk -- cgit v1.2.3 From fbf406083ea34a8b090d7bc0e94180ff091b52de Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 8 Jun 2017 20:14:25 -0700 Subject: [openblas] Fix error in patching cblas.h which removes semicolons --- ports/openblas/CONTROL | 2 +- ports/openblas/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/openblas/CONTROL b/ports/openblas/CONTROL index 29c2cea0e..a816dec6a 100644 --- a/ports/openblas/CONTROL +++ b/ports/openblas/CONTROL @@ -1,3 +1,3 @@ Source: openblas -Version: v0.2.19-1 +Version: v0.2.19-2 Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index f4bf66d15..d00a4f67c 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -61,8 +61,8 @@ file(COPY ${SOURCE_PATH}/config.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(RENAME ${CURRENT_PACKAGES_DIR}/include/config.h ${CURRENT_PACKAGES_DIR}/include/openblas_config.h) 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}) +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 ${CURRENT_BUILDTREES_DIR}/src/OpenBLAS-0.2.19/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openblas) -- cgit v1.2.3 From 9b57ecbdd786113e33d8a149d240769682c7846e Mon Sep 17 00:00:00 2001 From: mmazaherit Date: Thu, 8 Jun 2017 23:53:01 -0400 Subject: check in ceres-solver port --- ports/ceres-solver/CONTROL | 4 +++ ports/ceres-solver/portfile.cmake | 71 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 ports/ceres-solver/CONTROL create mode 100644 ports/ceres-solver/portfile.cmake diff --git a/ports/ceres-solver/CONTROL b/ports/ceres-solver/CONTROL new file mode 100644 index 000000000..2084f200c --- /dev/null +++ b/ports/ceres-solver/CONTROL @@ -0,0 +1,4 @@ +Source: ceres-solver +Version: 1.12.0 +Build-Depends:suitesparse, eigen3, clapack, gflags, glog +Description: non-linear optimization package \ No newline at end of file diff --git a/ports/ceres-solver/portfile.cmake b/ports/ceres-solver/portfile.cmake new file mode 100644 index 000000000..b42dc04e3 --- /dev/null +++ b/ports/ceres-solver/portfile.cmake @@ -0,0 +1,71 @@ +# 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) + +set (CERES_VER 1.12.0) #update SHA512 checksum w.r.t to verison +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ceres-solver-${CERES_VER}) + +vcpkg_download_distfile(ARCHIVE +URLS "https://github.com/ceres-solver/ceres-solver/archive/${CERES_VER}.zip" +FILENAME "ceres-solver-${CERES_VER}.zip" +SHA512 cbd476e4be89cad3c3366cd2396be46a49e8672932219d48fcd54f2eef8e86ee7fd9a824aa9743d13324b3ea9ba90501ede0297713a4d5844be75ce95418ecc1 +) + +vcpkg_extract_source_archive(${ARCHIVE}) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + #PREFER_NINJA # Disable this option if project cannot be built with Ninja + + OPTIONS + -DEXPORT_BUILD_DIR=ON + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF + -DEIGENSPARSE=ON + -DSUITESPARSE=ON + -DCXSPARSE=ON + #-DBUILD_SHARED_LIBS=OFF + -DCXSPARSE_INCLUDE_DIR=${SUITESPARSE_INCLUDE_DIR} + -DCXSPARSE_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/libcxsparse.lib + -DSUITESPARSE_INCLUDE_DIR_HINTS=${CURRENT_INSTALLED_DIR}/include/suitesparse + -DEIGEN_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/eigen3 + -DLAPACK_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/lapack.lib + -DBLAS_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/openblas.lib + -DMETIS_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/metis.lib + -DGFLAGS_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DGFLAGS_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/gflags.lib + -DGLOG_INCLUDE_DIR=${PACKAGES_INCLUDE_DIR} + -DGLOG_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/glog.lib + + OPTIONS_RELEASE + -DSUITESPARSE_LIBRARY_DIR_HINTS=${CURRENT_INSTALLED_DIR}/lib + + OPTIONS_DEBUG + -DSUITESPARSEQR_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/libspqrd.lib + -DSUITESPARSE_LIBRARY_DIR_HINTS=${CURRENT_INSTALLED_DIR}/debug/lib + +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +#clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/CMake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMake) + +# Handle copyright of suitesparse and metis +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ceres-solver) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/ceres-solver/LICENSE ${CURRENT_PACKAGES_DIR}/share/ceres-solver/copyright) + + -- cgit v1.2.3 From 5b05633220dee8335c10c2ca0c496e2d3dd6c403 Mon Sep 17 00:00:00 2001 From: evpobr Date: Fri, 9 Jun 2017 12:28:00 +0500 Subject: Fix TagLib port configuration under Win 7 and lower If installed SDK >= 8.0, TagLib was configured to use CreateFile2 function (Win8 and higher). Closes #1240. --- ports/taglib/CONTROL | 2 +- ports/taglib/dont-assume-latin-1.patch | 18 ----------------- ports/taglib/portfile.cmake | 18 +++++------------ ports/taglib/replace_non-uwp_functions.patch | 29 ---------------------------- 4 files changed, 6 insertions(+), 61 deletions(-) delete mode 100644 ports/taglib/dont-assume-latin-1.patch delete mode 100644 ports/taglib/replace_non-uwp_functions.patch diff --git a/ports/taglib/CONTROL b/ports/taglib/CONTROL index dbf00d6a2..dff921020 100644 --- a/ports/taglib/CONTROL +++ b/ports/taglib/CONTROL @@ -1,4 +1,4 @@ Source: taglib -Version: 1.11.1-2 +Version: 1.11.1-3 Description: TagLib Audio Meta-Data Library Build-Depends: zlib \ No newline at end of file diff --git a/ports/taglib/dont-assume-latin-1.patch b/ports/taglib/dont-assume-latin-1.patch deleted file mode 100644 index 39557f74d..000000000 --- a/ports/taglib/dont-assume-latin-1.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp -index b267aaa..3db0521 100644 ---- a/taglib/toolkit/tfilestream.cpp -+++ b/taglib/toolkit/tfilestream.cpp -@@ -54,7 +54,12 @@ namespace - if(!path.wstr().empty()) - return CreateFile2(path.wstr().c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL); - else if(!path.str().empty()) -- return CreateFile2(std::wstring(path.str().cbegin(), path.str().end()).c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL); -+ { -+ auto size = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, path.str().data(), path.str().size(), NULL, 0); -+ std::wstring tmp(size, L'\0'); -+ MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, path.str().data(), path.str().size(), &tmp[0], tmp.size()); -+ return CreateFile2(tmp.c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL); -+ } - else - return InvalidFileHandle; - } diff --git a/ports/taglib/portfile.cmake b/ports/taglib/portfile.cmake index edc11c5b1..262fbf537 100644 --- a/ports/taglib/portfile.cmake +++ b/ports/taglib/portfile.cmake @@ -1,29 +1,21 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/taglib-1.11.1) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO taglib/taglib - REF v1.11.1 - SHA512 7846775c4954ea948fe4383e514ba7c11f55d038ee06b6ea5a0a1c1069044b348026e76b27aa4ba1c71539aa8143e1401fab39184cc6e915ba0ae2c06133cb98 - HEAD_REF master + REF 662f340f933077a926de443c9882f483973570e3 + SHA512 34087f77bb099f1f8ec82926a212a562bf589fc13f54eac50a56730c4411af2f4dbf1b7d09877087899048c3070325aea02297c6a94d0ad43fbf6742363dd2b6 ) -if(NOT VCPKG_USE_HEAD_VERSION) # these have been fixed upstream after 1.11.1 - # patches for UWP - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/replace_non-uwp_functions.patch - ${CMAKE_CURRENT_LIST_DIR}/dont-assume-latin-1.patch - ) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(WINRT_OPTIONS -DHAVE_VSNPRINTF=1 -DPLATFORM_WINRT) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DHAVE_VSNPRINTF=1 # taglib/ConfigureChecks.cmake doesn't properly detect MSVC vsnprintf() on UWP + ${WINRT_OPTIONS} ) vcpkg_install_cmake() diff --git a/ports/taglib/replace_non-uwp_functions.patch b/ports/taglib/replace_non-uwp_functions.patch deleted file mode 100644 index 5f01672d5..000000000 --- a/ports/taglib/replace_non-uwp_functions.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp -index 5205bae..b267aaa 100644 ---- a/taglib/toolkit/tfilestream.cpp -+++ b/taglib/toolkit/tfilestream.cpp -@@ -52,9 +52,9 @@ namespace - const DWORD access = readOnly ? GENERIC_READ : (GENERIC_READ | GENERIC_WRITE); - - if(!path.wstr().empty()) -- return CreateFileW(path.wstr().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); -+ return CreateFile2(path.wstr().c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL); - else if(!path.str().empty()) -- return CreateFileA(path.str().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); -+ return CreateFile2(std::wstring(path.str().cbegin(), path.str().end()).c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL); - else - return InvalidFileHandle; - } -@@ -437,9 +437,10 @@ long FileStream::length() - #ifdef _WIN32 - - SetLastError(NO_ERROR); -- const DWORD fileSize = GetFileSize(d->file, NULL); -+ LARGE_INTEGER fileSize; -+ GetFileSizeEx(d->file, &fileSize); - if(GetLastError() == NO_ERROR) { -- return static_cast(fileSize); -+ return fileSize.QuadPart; - } - else { - debug("FileStream::length() -- Failed to get the file size."); -- cgit v1.2.3 From 741caef3fb352f6fbd5d4d59592f0c2629892064 Mon Sep 17 00:00:00 2001 From: sigman Date: Fri, 9 Jun 2017 15:09:05 +0300 Subject: [Magnum][Corrade] Cleanup and Audio support Enabled audio support in magnum by default via openal-soft dependency. --- ports/corrade/portfile.cmake | 3 --- ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 5 ++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 2f5578b43..76979496b 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -23,9 +23,6 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DBUILD_STATIC=${BUILD_STATIC} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index d07dd3160..f934ba0a6 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum Version: jun2017 -Build-Depends: corrade, sdl2 +Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 71517c15c..dd934b31d 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -21,10 +21,9 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DWITH_SDL2APPLICATION=ON + OPTIONS -DWITH_AUDIO=ON + OPTIONS -DWITH_WAVAUDIOIMPORTER=ON OPTIONS -DBUILD_STATIC=${BUILD_STATIC} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() -- cgit v1.2.3 From 1b761052002a9466704d53ea5b5029df9e89aaa0 Mon Sep 17 00:00:00 2001 From: sigman Date: Fri, 9 Jun 2017 15:17:01 +0300 Subject: [Magnum-plugins] Import plugins for the magnum opengl library Added magnum-plugins library with the reasonable defaults and minimal dependencies . --- ports/magnum-plugins/CONTROL | 4 +++ ports/magnum-plugins/portfile.cmake | 52 +++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 ports/magnum-plugins/CONTROL create mode 100644 ports/magnum-plugins/portfile.cmake diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL new file mode 100644 index 000000000..0aec0062d --- /dev/null +++ b/ports/magnum-plugins/CONTROL @@ -0,0 +1,4 @@ +Source: magnum-plugins +Version: jun2017 +Build-Depends: stb, magnum +Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake new file mode 100644 index 000000000..fae2b08e7 --- /dev/null +++ b/ports/magnum-plugins/portfile.cmake @@ -0,0 +1,52 @@ +### + +set(MAGNUM_PLUGINS_HASH 645b50647d5164c5ec8f5bc83ba2578f6cfe7d80) + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/magnum-plugins-${MAGNUM_PLUGINS_HASH}) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/mosra/magnum-plugins/archive/${MAGNUM_PLUGINS_HASH}.zip" + FILENAME "magnum-plugins-${MAGNUM_PLUGINS_HASH}.zip" + SHA512 5ab603f50cee325113e3f1ccd67d294d32f7386334136304ad8135ac8ff0218cbd2834197c7db85bb5fd11c69e28d00217fa5d9dbdad71a83e372722a6f8bda0 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC 1) +else() + set(BUILD_STATIC 0) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DWITH_STBIMAGECONVERTER=ON + OPTIONS -DWITH_STBIMAGEIMPORTER=ON + OPTIONS -DWITH_STBTRUETYPEFONT=ON + OPTIONS -DWITH_STBTRUETYPEFONT=ON + OPTIONS -DWITH_MINIEXRIMAGECONVERTER=ON + OPTIONS -DWITH_OPENGEXIMPORTER=ON + OPTIONS -DWITH_OPENGEXIMPORTER=ON + OPTIONS -DWITH_STANFORDIMPORTER=ON + OPTIONS -DWITH_DRWAVAUDIOIMPORTER=ON + OPTIONS -DWITH_ANYAUDIOIMPORTER=ON + OPTIONS -DWITH_ANYIMAGECONVERTER=ON + OPTIONS -DWITH_ANYSCENEIMPORTER=ON + OPTIONS -DBUILD_STATIC=${BUILD_STATIC} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum-plugins) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/copyright) + +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From fea889c5d917a60cc94a38e2f2eafdc7c2eb9fdc Mon Sep 17 00:00:00 2001 From: mmazaherit Date: Fri, 9 Jun 2017 13:16:58 -0400 Subject: Updated the ceres port --- ports/ceres-solver/CONTROL | 4 --- ports/ceres-solver/portfile.cmake | 71 --------------------------------------- ports/ceres/CONTROL | 4 +++ ports/ceres/portfile.cmake | 70 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 75 deletions(-) delete mode 100644 ports/ceres-solver/CONTROL delete mode 100644 ports/ceres-solver/portfile.cmake create mode 100644 ports/ceres/CONTROL create mode 100644 ports/ceres/portfile.cmake diff --git a/ports/ceres-solver/CONTROL b/ports/ceres-solver/CONTROL deleted file mode 100644 index 2084f200c..000000000 --- a/ports/ceres-solver/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: ceres-solver -Version: 1.12.0 -Build-Depends:suitesparse, eigen3, clapack, gflags, glog -Description: non-linear optimization package \ No newline at end of file diff --git a/ports/ceres-solver/portfile.cmake b/ports/ceres-solver/portfile.cmake deleted file mode 100644 index b42dc04e3..000000000 --- a/ports/ceres-solver/portfile.cmake +++ /dev/null @@ -1,71 +0,0 @@ -# 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) - -set (CERES_VER 1.12.0) #update SHA512 checksum w.r.t to verison -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ceres-solver-${CERES_VER}) - -vcpkg_download_distfile(ARCHIVE -URLS "https://github.com/ceres-solver/ceres-solver/archive/${CERES_VER}.zip" -FILENAME "ceres-solver-${CERES_VER}.zip" -SHA512 cbd476e4be89cad3c3366cd2396be46a49e8672932219d48fcd54f2eef8e86ee7fd9a824aa9743d13324b3ea9ba90501ede0297713a4d5844be75ce95418ecc1 -) - -vcpkg_extract_source_archive(${ARCHIVE}) - - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - #PREFER_NINJA # Disable this option if project cannot be built with Ninja - - OPTIONS - -DEXPORT_BUILD_DIR=ON - -DBUILD_EXAMPLES=OFF - -DBUILD_TESTING=OFF - -DEIGENSPARSE=ON - -DSUITESPARSE=ON - -DCXSPARSE=ON - #-DBUILD_SHARED_LIBS=OFF - -DCXSPARSE_INCLUDE_DIR=${SUITESPARSE_INCLUDE_DIR} - -DCXSPARSE_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/libcxsparse.lib - -DSUITESPARSE_INCLUDE_DIR_HINTS=${CURRENT_INSTALLED_DIR}/include/suitesparse - -DEIGEN_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/eigen3 - -DLAPACK_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/lapack.lib - -DBLAS_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/openblas.lib - -DMETIS_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/metis.lib - -DGFLAGS_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include - -DGFLAGS_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/gflags.lib - -DGLOG_INCLUDE_DIR=${PACKAGES_INCLUDE_DIR} - -DGLOG_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/glog.lib - - OPTIONS_RELEASE - -DSUITESPARSE_LIBRARY_DIR_HINTS=${CURRENT_INSTALLED_DIR}/lib - - OPTIONS_DEBUG - -DSUITESPARSEQR_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/libspqrd.lib - -DSUITESPARSE_LIBRARY_DIR_HINTS=${CURRENT_INSTALLED_DIR}/debug/lib - -) -vcpkg_install_cmake() -vcpkg_copy_pdbs() - -#clean -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/CMake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMake) - -# Handle copyright of suitesparse and metis -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ceres-solver) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/ceres-solver/LICENSE ${CURRENT_PACKAGES_DIR}/share/ceres-solver/copyright) - - diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL new file mode 100644 index 000000000..d8c4c4ec6 --- /dev/null +++ b/ports/ceres/CONTROL @@ -0,0 +1,4 @@ +Source: ceres +Version: 1.12.0 +Build-Depends:suitesparse, eigen3, clapack, gflags, glog +Description: non-linear optimization package \ No newline at end of file diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake new file mode 100644 index 000000000..a488b6da9 --- /dev/null +++ b/ports/ceres/portfile.cmake @@ -0,0 +1,70 @@ +# 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) + +set(VCPKG_PLATFORM_TOOLSET "v140") # Force VS2015 because VS2017 compiler return internal error +# eigen3\eigen\src\core\redux.h(237): fatal error C1001: An internal error has occurred in the compiler. [internal\ceres\ceres.vcxproj] + +vcpkg_from_github( +OUT_SOURCE_PATH SOURCE_PATH +REPO ceres-solver/ceres-solver +REF 1.12.0 +SHA512 4b4cba5627fbd80a626e8a31d9f561d6cee1c8345970304e4b5b163a9dcadc6d636257d1046ecede00781a11229ef671ee89c3e7e6baf15f49f63f36e6a2ebe1 +HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + #PREFER_NINJA # Disable this option if project cannot be built with Ninja + + OPTIONS + -DEXPORT_BUILD_DIR=ON + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF + -DEIGENSPARSE=ON + -DSUITESPARSE=ON + -DCXSPARSE=ON + #-DBUILD_SHARED_LIBS=OFF + -DCXSPARSE_INCLUDE_DIR=${SUITESPARSE_INCLUDE_DIR} + -DCXSPARSE_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/libcxsparse.lib + -DSUITESPARSE_INCLUDE_DIR_HINTS=${CURRENT_INSTALLED_DIR}/include/suitesparse + -DEIGEN_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/eigen3 + -DLAPACK_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/lapack.lib + -DBLAS_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/openblas.lib + -DMETIS_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/metis.lib + -DGFLAGS_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DGFLAGS_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/gflags.lib + -DGLOG_INCLUDE_DIR=${PACKAGES_INCLUDE_DIR} + -DGLOG_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/glog.lib + + OPTIONS_RELEASE + -DSUITESPARSE_LIBRARY_DIR_HINTS=${CURRENT_INSTALLED_DIR}/lib + + OPTIONS_DEBUG + -DSUITESPARSEQR_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/libspqrd.lib + -DSUITESPARSE_LIBRARY_DIR_HINTS=${CURRENT_INSTALLED_DIR}/debug/lib + +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +#clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/CMake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMake) + +# Handle copyright of suitesparse and metis +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ceres) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/ceres/LICENSE ${CURRENT_PACKAGES_DIR}/share/ceres/copyright) + + -- cgit v1.2.3 From 69e24834db7fcd5e20a38c1b06e88f734764ceb7 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 9 Jun 2017 13:16:42 -0700 Subject: Create Sundials CONTROL --- ports/sundials/CONTROL | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ports/sundials/CONTROL diff --git a/ports/sundials/CONTROL b/ports/sundials/CONTROL new file mode 100644 index 000000000..b1f0c349b --- /dev/null +++ b/ports/sundials/CONTROL @@ -0,0 +1,3 @@ +Source: sundials +Version: 2.7.0 +Description: SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers) -- cgit v1.2.3 From da11fd2d986650d83e782bc69fd6dd0e2fab95f2 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 9 Jun 2017 13:18:30 -0700 Subject: #1135 Created Portfile Sundials --- ports/sundials/portfile.cmake | 52 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 ports/sundials/portfile.cmake diff --git a/ports/sundials/portfile.cmake b/ports/sundials/portfile.cmake new file mode 100644 index 000000000..bca4ea3b4 --- /dev/null +++ b/ports/sundials/portfile.cmake @@ -0,0 +1,52 @@ + include(vcpkg_common_functions) + + set(ARCHIVE_NAME "sundials-2.7.0") + set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}") + + + vcpkg_download_distfile(ARCHIVE_FILE + URLS "https://computation.llnl.gov/projects/sundials/download/${ARCHIVE_NAME}.tar.gz" + FILENAME "${ARCHIVE_NAME}.tar.gz" + SHA512 c86c167538065a4109b36ae7c8f60f3d92184133cfa661b5acfccee052c38f40be865412a1746bb57907b61602c212c0f15e1e30ef29e8a49db6d46a75a28e69 + ) + vcpkg_extract_source_archive(${ARCHIVE_FILE}) + + + message("-- Extracted to ${ARCHIVE_FILE} ${ARCHIVE_NAME}") + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + ) + + vcpkg_install_cmake(DISABLE_PARALLEL) + + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + file(GLOB REMOVE_DLLS + "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll" + "${CURRENT_PACKAGES_DIR}/lib/*.dll" + ) + + file(GLOB DEBUG_DLLS + "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll" + ) + + file(GLOB DLLS + "${CURRENT_PACKAGES_DIR}/lib/*.dll" + ) + + if(DLLS) + file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + endif() + + + if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sundials RENAME copyright) + + file(REMOVE ${REMOVE_DLLS}) + + vcpkg_copy_pdbs() -- cgit v1.2.3 From 2071719138cac9f2e943b129e5a19bef6f16f930 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Jun 2017 15:39:32 -0700 Subject: [c-ares] Fix support for static/md --- ports/c-ares/CONTROL | 2 +- ports/c-ares/portfile.cmake | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ports/c-ares/CONTROL b/ports/c-ares/CONTROL index 977066b4c..db04bd3fa 100644 --- a/ports/c-ares/CONTROL +++ b/ports/c-ares/CONTROL @@ -1,4 +1,4 @@ Source: c-ares -Version: 1.12.1-dev-40eb41f +Version: 1.12.1-dev-40eb41f-1 Description: A C library for asynchronous DNS requests Build-Depends: \ No newline at end of file diff --git a/ports/c-ares/portfile.cmake b/ports/c-ares/portfile.cmake index 4c97ed46e..86c4ba442 100644 --- a/ports/c-ares/portfile.cmake +++ b/ports/c-ares/portfile.cmake @@ -28,14 +28,17 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/c-ares") -if(VCPKG_CRT_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) else() - file(GLOB RELEASE_EXE_FILES "${CURRENT_PACKAGES_DIR}/bin/*.exe") - file(REMOVE ${RELEASE_EXE_FILES}) - file(GLOB DEBUG_EXE_FILES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") - file(REMOVE ${DEBUG_EXE_FILES}) + file(GLOB EXE_FILES + "${CURRENT_PACKAGES_DIR}/bin/*.exe" + "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe" + ) + if (EXE_FILES) + file(REMOVE ${EXE_FILES}) + endif() endif() vcpkg_copy_pdbs() -- cgit v1.2.3 From 9a642ade4e7a605e7d11b693e471990d5c6468ed Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Jun 2017 19:34:07 -0700 Subject: [box2d][directxmesh][directxtex][directxtk][directxtk12][dxut][entityx][octomap][pdcurses][redshell][rttr][tbb][uvatlas] Improve constraint checking --- ports/box2d/portfile.cmake | 4 ++++ ports/directxmesh/portfile.cmake | 4 ++++ ports/directxtex/portfile.cmake | 4 ++++ ports/directxtk/portfile.cmake | 4 ++++ ports/directxtk12/portfile.cmake | 4 ++++ ports/dxut/portfile.cmake | 5 +++++ ports/entityx/portfile.cmake | 4 ++++ ports/octomap/portfile.cmake | 5 +++++ ports/pdcurses/portfile.cmake | 4 ++++ ports/redshell/portfile.cmake | 9 +++++++++ ports/rttr/portfile.cmake | 5 +++++ ports/tbb/portfile.cmake | 7 +++++-- ports/uvatlas/portfile.cmake | 3 +++ 13 files changed, 60 insertions(+), 2 deletions(-) diff --git a/ports/box2d/portfile.cmake b/ports/box2d/portfile.cmake index 8bfc5fb54..c84c33387 100644 --- a/ports/box2d/portfile.cmake +++ b/ports/box2d/portfile.cmake @@ -7,6 +7,10 @@ elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm") message(FATAL_ERROR "ARM not supported") endif(TRIPLET_SYSTEM_ARCH MATCHES "x86") +if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "Box2d only supports dynamic CRT linkage") +endif() + include(vcpkg_common_functions) if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") diff --git a/ports/directxmesh/portfile.cmake b/ports/directxmesh/portfile.cmake index 184784d48..51840b68f 100644 --- a/ports/directxmesh/portfile.cmake +++ b/ports/directxmesh/portfile.cmake @@ -10,6 +10,10 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(VCPKG_LIBRARY_LINKAGE static) endif() +if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "DirectXMesh only supports dynamic CRT linkage") +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/DirectXMesh-oct2016) vcpkg_download_distfile(ARCHIVE diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake index 70bb16658..392290c06 100644 --- a/ports/directxtex/portfile.cmake +++ b/ports/directxtex/portfile.cmake @@ -10,6 +10,10 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(VCPKG_LIBRARY_LINKAGE static) endif() +if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "DirectXTex only supports dynamic CRT linkage") +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/directxtex-dec2016) vcpkg_download_distfile(ARCHIVE diff --git a/ports/directxtk/portfile.cmake b/ports/directxtk/portfile.cmake index fc4418d75..5a751446c 100644 --- a/ports/directxtk/portfile.cmake +++ b/ports/directxtk/portfile.cmake @@ -3,6 +3,10 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(VCPKG_LIBRARY_LINKAGE static) endif() +if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "DirectXTk only supports dynamic CRT linkage") +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/DirectXTK-dec2016) vcpkg_download_distfile(ARCHIVE diff --git a/ports/directxtk12/portfile.cmake b/ports/directxtk12/portfile.cmake index e6f2fb4d8..6a545ccbd 100644 --- a/ports/directxtk12/portfile.cmake +++ b/ports/directxtk12/portfile.cmake @@ -3,6 +3,10 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(VCPKG_LIBRARY_LINKAGE static) endif() +if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "DirectXTk12 only supports dynamic CRT linkage") +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/DirectXTK12-dec2016) vcpkg_download_distfile(ARCHIVE diff --git a/ports/dxut/portfile.cmake b/ports/dxut/portfile.cmake index 97dc8b2e3..cc12d769b 100644 --- a/ports/dxut/portfile.cmake +++ b/ports/dxut/portfile.cmake @@ -2,6 +2,11 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(STATUS "Warning: Dynamic building not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) endif() + +if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "DXUT only supports dynamic CRT linkage") +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/DXUT-sept2016) vcpkg_download_distfile(ARCHIVE_FILE diff --git a/ports/entityx/portfile.cmake b/ports/entityx/portfile.cmake index d7bcdbe1b..d35fb9da3 100644 --- a/ports/entityx/portfile.cmake +++ b/ports/entityx/portfile.cmake @@ -11,6 +11,10 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(VCPKG_LIBRARY_LINKAGE static) endif() +if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "Entityx only supports dynamic CRT linkage") +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/entityx-1.2.0) vcpkg_download_distfile(ARCHIVE diff --git a/ports/octomap/portfile.cmake b/ports/octomap/portfile.cmake index 96b7a6386..099a1ed78 100644 --- a/ports/octomap/portfile.cmake +++ b/ports/octomap/portfile.cmake @@ -1,3 +1,8 @@ +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message("Octomap does not currently support building purely static. Building dynamic instead.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + include(vcpkg_common_functions) set(GIT_REF "cefed0c1d79afafa5aeb05273cf1246b093b771c") set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/octomap-${GIT_REF}) diff --git a/ports/pdcurses/portfile.cmake b/ports/pdcurses/portfile.cmake index 1d94466dc..22268fdc0 100644 --- a/ports/pdcurses/portfile.cmake +++ b/ports/pdcurses/portfile.cmake @@ -1,4 +1,8 @@ +if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "PDCurses only supports dynamic CRT linkage") +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) find_program(NMAKE nmake) diff --git a/ports/redshell/portfile.cmake b/ports/redshell/portfile.cmake index c394d7013..d7fbec955 100644 --- a/ports/redshell/portfile.cmake +++ b/ports/redshell/portfile.cmake @@ -8,6 +8,15 @@ if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "Error: redshell does not support UWP builds.") endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message("Redshell only supports dynamic library linkage") + set(VCPKG_LIBRARY_LINKAGE "dynamic") +endif() + +if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "Redshell only supports dynamic CRT linkage") +endif() + set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/redshell) vcpkg_from_github( diff --git a/ports/rttr/portfile.cmake b/ports/rttr/portfile.cmake index 0a79ec2da..b590b7873 100644 --- a/ports/rttr/portfile.cmake +++ b/ports/rttr/portfile.cmake @@ -1,3 +1,8 @@ +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message("Rttr only supports dynamic library linkage") + set(VCPKG_LIBRARY_LINKAGE "dynamic") +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rttr-0.9.5-src) vcpkg_download_distfile(ARCHIVE diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index 387762bcb..d633a9b23 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -2,8 +2,11 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) message(STATUS "Warning: Static building not supported yet. Building dynamic.") set(VCPKG_LIBRARY_LINKAGE dynamic) endif() -if (VCPKG_CRT_LINKAGE STREQUAL static OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Build settings not supported") +if (VCPKG_CRT_LINKAGE STREQUAL static) + message(FATAL_ERROR "TBB does not currently support static crt linkage") +endif() +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "TBB does not currently support UWP") endif() include(vcpkg_common_functions) diff --git a/ports/uvatlas/portfile.cmake b/ports/uvatlas/portfile.cmake index 22b04326c..79dc605f1 100644 --- a/ports/uvatlas/portfile.cmake +++ b/ports/uvatlas/portfile.cmake @@ -10,6 +10,9 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(STATUS "Warning: Dynamic building not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) endif() +if (VCPKG_CRT_LINKAGE STREQUAL static) + message(FATAL_ERROR "UVAtlas does not currently support static crt linkage") +endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/UVAtlas-sept2016) -- cgit v1.2.3 From db8db9c45c937a9d16c37097de43a0e70acd2b58 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Jun 2017 19:34:32 -0700 Subject: [arrow][libbson] Fix static builds. --- ports/arrow/CONTROL | 2 +- ports/arrow/portfile.cmake | 8 +++++++- ports/libbson/CONTROL | 2 +- ports/libbson/portfile.cmake | 2 ++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL index 2e0233bb6..717360d12 100644 --- a/ports/arrow/CONTROL +++ b/ports/arrow/CONTROL @@ -1,4 +1,4 @@ Source: arrow -Version: apache-arrow-0.4.0 +Version: apache-arrow-0.4.0-1 Build-Depends: boost Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index 9bf6f999e..f5cdb1ae4 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -20,9 +20,15 @@ vcpkg_configure_cmake( OPTIONS -DARROW_BUILD_TESTS=off ) - vcpkg_install_cmake() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/arrow_static.lib ${CURRENT_PACKAGES_DIR}/lib/arrow.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/arrow_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/arrow.lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/arrow_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/arrow_static.lib) +endif() file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/arrow RENAME copyright) diff --git a/ports/libbson/CONTROL b/ports/libbson/CONTROL index 0edf7847c..141221ba4 100644 --- a/ports/libbson/CONTROL +++ b/ports/libbson/CONTROL @@ -1,3 +1,3 @@ Source: libbson -Version: 1.6.2 +Version: 1.6.2-1 Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. \ No newline at end of file diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake index 58513498e..1a86128a4 100644 --- a/ports/libbson/portfile.cmake +++ b/ports/libbson/portfile.cmake @@ -53,6 +53,8 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) PATCHES ${CMAKE_CURRENT_LIST_DIR}/static.patch ) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) endif() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson RENAME copyright) -- cgit v1.2.3 From 8cbadbffdcf0f1f4d5acd16012ecbb47532bdac9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Jun 2017 20:38:25 -0700 Subject: [corrade][magnum-plugins][magnum] Use vcpkg_from_github() --- ports/corrade/CONTROL | 2 +- ports/corrade/portfile.cmake | 25 ++++++++------------- ports/magnum-plugins/CONTROL | 2 +- ports/magnum-plugins/portfile.cmake | 43 +++++++++++++++++-------------------- ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 25 ++++++++++----------- 6 files changed, 43 insertions(+), 56 deletions(-) diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL index 487766e89..748d0c61a 100644 --- a/ports/corrade/CONTROL +++ b/ports/corrade/CONTROL @@ -1,3 +1,3 @@ Source: corrade -Version: jun2017 +Version: jun2017-1 Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 76979496b..113d24dc7 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -1,17 +1,11 @@ -# - -set(CORRADE_HASH b87c50db3543367b6eb20dc72246c6687449b029) - include(vcpkg_common_functions) - - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/corrade-${CORRADE_HASH}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mosra/corrade/archive/${CORRADE_HASH}.zip" - FILENAME "corrade-${CORRADE_HASH}.zip" - SHA512 b15b544f996b8c95fbdf73ff9b76deea465fdcf06f431b09f4bbb9a786f4e864fdb4f8c5a2977cb366ee2398c54eac4c469da29c2ab7c67d3b8f7cbf7d2120dc +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/corrade + REF b87c50db3543367b6eb20dc72246c6687449b029 + SHA512 882ccba210c6db7dc8a70e425e1cc119dd1c1a880b8b7d36b2c9478a2105294294680495e7bafb8c0bc7f667bd247dbd008e8ff133a8ea26b13df781a8896297 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) @@ -31,11 +25,10 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Drop a copy of tools -file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/) +file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/corrade) + # Tools require dlls -file(GLOB TO_COPY - ${CURRENT_PACKAGES_DIR}/bin/*.dll) -file(COPY ${TO_COPY} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/corrade) file(GLOB_RECURSE TO_REMOVE ${CURRENT_PACKAGES_DIR}/bin/*.exe diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 0aec0062d..1bf1111c4 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017 +Version: jun2017-1 Build-Depends: stb, magnum Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index fae2b08e7..199789c99 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -1,15 +1,11 @@ -### - -set(MAGNUM_PLUGINS_HASH 645b50647d5164c5ec8f5bc83ba2578f6cfe7d80) - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/magnum-plugins-${MAGNUM_PLUGINS_HASH}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mosra/magnum-plugins/archive/${MAGNUM_PLUGINS_HASH}.zip" - FILENAME "magnum-plugins-${MAGNUM_PLUGINS_HASH}.zip" - SHA512 5ab603f50cee325113e3f1ccd67d294d32f7386334136304ad8135ac8ff0218cbd2834197c7db85bb5fd11c69e28d00217fa5d9dbdad71a83e372722a6f8bda0 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum-plugins + REF 645b50647d5164c5ec8f5bc83ba2578f6cfe7d80 + SHA512 73c7fb7e9a5a9e2a4ee7314b5d41d98ada9cf1a50c1cd833c2ae19c5bdab66862f3696f142e987f9d2b551142e94f96a2d8ccad37625682c8391400091dcf879 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) @@ -20,19 +16,20 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DWITH_STBIMAGECONVERTER=ON - OPTIONS -DWITH_STBIMAGEIMPORTER=ON - OPTIONS -DWITH_STBTRUETYPEFONT=ON - OPTIONS -DWITH_STBTRUETYPEFONT=ON - OPTIONS -DWITH_MINIEXRIMAGECONVERTER=ON - OPTIONS -DWITH_OPENGEXIMPORTER=ON - OPTIONS -DWITH_OPENGEXIMPORTER=ON - OPTIONS -DWITH_STANFORDIMPORTER=ON - OPTIONS -DWITH_DRWAVAUDIOIMPORTER=ON - OPTIONS -DWITH_ANYAUDIOIMPORTER=ON - OPTIONS -DWITH_ANYIMAGECONVERTER=ON - OPTIONS -DWITH_ANYSCENEIMPORTER=ON - OPTIONS -DBUILD_STATIC=${BUILD_STATIC} + OPTIONS + -DWITH_STBIMAGECONVERTER=ON + -DWITH_STBIMAGEIMPORTER=ON + -DWITH_STBTRUETYPEFONT=ON + -DWITH_STBTRUETYPEFONT=ON + -DWITH_MINIEXRIMAGECONVERTER=ON + -DWITH_OPENGEXIMPORTER=ON + -DWITH_OPENGEXIMPORTER=ON + -DWITH_STANFORDIMPORTER=ON + -DWITH_DRWAVAUDIOIMPORTER=ON + -DWITH_ANYAUDIOIMPORTER=ON + -DWITH_ANYIMAGECONVERTER=ON + -DWITH_ANYSCENEIMPORTER=ON + -DBUILD_STATIC=${BUILD_STATIC} ) vcpkg_install_cmake() diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index f934ba0a6..a110136f2 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017 +Version: jun2017-1 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index dd934b31d..67d1f825a 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -1,15 +1,11 @@ -### - -set(MAGNUM_HASH c8416ca4c3e9b68ba62acc9f73de235526cb3d6e) - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/magnum-${MAGNUM_HASH}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mosra/magnum/archive/${MAGNUM_HASH}.zip" - FILENAME "magnum-${MAGNUM_HASH}.zip" - SHA512 1248efaba22568a753396192624690a478c69946cdbbffe83e34cb85d54ec65756b693e025bf477fc192e6fecce56dc1b68631e1a763986267b83d6530af6ef4 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum + REF c8416ca4c3e9b68ba62acc9f73de235526cb3d6e + SHA512 d595be48ae44d944d5747880e0108bdc445b92fcc306f0169699e2b80500919647063ac88ef67491b2d8e92ae1f0612cd8768fc63d8cc4ffe4c625988b63504d + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) @@ -20,10 +16,11 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DWITH_SDL2APPLICATION=ON - OPTIONS -DWITH_AUDIO=ON - OPTIONS -DWITH_WAVAUDIOIMPORTER=ON - OPTIONS -DBUILD_STATIC=${BUILD_STATIC} + OPTIONS + -DWITH_SDL2APPLICATION=ON + -DWITH_AUDIO=ON + -DWITH_WAVAUDIOIMPORTER=ON + -DBUILD_STATIC=${BUILD_STATIC} ) vcpkg_install_cmake() -- cgit v1.2.3 From 1fce25e659e2102e9d052af5be85c4044cd76507 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 8 Jun 2017 03:32:20 -0700 Subject: [wxwidgets] Use vcpkg_from_github. Support static+md. --- ports/wxwidgets/CONTROL | 4 ++-- ports/wxwidgets/portfile.cmake | 39 +++++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/ports/wxwidgets/CONTROL b/ports/wxwidgets/CONTROL index cb91bb99b..40da8e3d7 100644 --- a/ports/wxwidgets/CONTROL +++ b/ports/wxwidgets/CONTROL @@ -1,4 +1,4 @@ Source: wxwidgets -Version: 3.1.0 +Version: 3.1.0-1 Description: wxWidgets is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. -Build-Depends: zlib, libpng, tiff +Build-Depends: zlib, libpng, tiff, expat diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index 300d64361..15688264d 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -11,18 +11,16 @@ # include(vcpkg_common_functions) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.7z" - FILENAME "wxWidgets-3.1.0.7z" - SHA512 309cd3c11052ab7ea77816ffcb70e280c0984fb7770c7e9999b4437d1ef9bb91c3f0521ad9d3592abd542bbed1fa74f6c83fce029504cf1ac4cf25e96c920b0f +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wxWidgets/wxWidgets + REF v3.1.0 + SHA512 740f3c977526395f32c2da4ea7f5f2ddc9b9a4cfd8d2cd129f011ede8e427621461c551c648b5d7a8f9ce78477e30426b836b310cff09c427ca8f9b9a9532074 + HEAD_REF master ) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) - -vcpkg_extract_source_archive(${ARCHIVE}) - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src + SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-installed-libs.patch" ) @@ -37,38 +35,43 @@ else () set(LIB_SUB_PATH_PRE vc) endif() -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") list(APPEND NMAKE_OPTIONS SHARED=1) set(LIB_SUB_PATH_TYP dll) else() - list(APPEND NMAKE_OPTIONS RUNTIME_LIBS=static) set(LIB_SUB_PATH_TYP lib) endif() +if (VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND NMAKE_OPTIONS RUNTIME_LIBS=static) +endif() + set(LIB_SUB_PATH ${LIB_SUB_PATH_PRE}_${LIB_SUB_PATH_TYP}${TARGET_TRIPLET}) list(APPEND NMAKE_OPTIONS VCPKG_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include) set(NMAKE_OPTIONS_REL - "${NMAKE_OPTIONS}" + ${NMAKE_OPTIONS} VCPKG_LIB_DIR=${CURRENT_INSTALLED_DIR}/lib BUILD=release CFG=${TARGET_TRIPLET}-rel ) set(NMAKE_OPTIONS_DBG - "${NMAKE_OPTIONS}" + ${NMAKE_OPTIONS} VCPKG_LIB_DIR=${CURRENT_INSTALLED_DIR}/debug/lib CFG=${TARGET_TRIPLET}-dbg ) +file(REMOVE_RECURSE ${SOURCE_PATH}/lib/${LIB_SUB_PATH}) + ################ # Release build ################ message(STATUS "Building ${TARGET_TRIPLET}-rel") +set(ENV{_LINK_} ${CURRENT_INSTALLED_DIR}/lib/expat.lib) vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc - "${NMAKE_OPTIONS_REL}" + COMMAND ${NMAKE} -f makefile.vc ${NMAKE_OPTIONS_REL} WORKING_DIRECTORY ${SOURCE_PATH}/build/msw LOGNAME nmake-build-${TARGET_TRIPLET}-release ) @@ -78,9 +81,9 @@ message(STATUS "Building ${TARGET_TRIPLET}-rel done") # Debug build ################ message(STATUS "Building ${TARGET_TRIPLET}-dbg") +set(ENV{_LINK_} ${CURRENT_INSTALLED_DIR}/debug/lib/expat.lib) vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc - "${NMAKE_OPTIONS_DBG}" + COMMAND ${NMAKE} -f makefile.vc ${NMAKE_OPTIONS_DBG} WORKING_DIRECTORY ${SOURCE_PATH}/build/msw LOGNAME nmake-build-${TARGET_TRIPLET}-debug ) @@ -92,7 +95,7 @@ file(INSTALL ${SOURCE_PATH}/include file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/mswu/wx/setup.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/wx) file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/mswu/wx/msw/rcdefs.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/wx/msw) file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/ - DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.lib") + DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.lib" PATTERN "*.pdb") file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-dbg/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "*.lib" PATTERN "*.pdb") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/mswu ${CURRENT_PACKAGES_DIR}/debug/lib/mswud) -- cgit v1.2.3 From 29681a5773be9b6be55b0d021b51aef01cebffec Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Jun 2017 22:24:04 -0700 Subject: [lpeg] Use copyright file from sources --- ports/lpeg/CONTROL | 2 +- ports/lpeg/COPYRIGHT | 7 ------- ports/lpeg/portfile.cmake | 3 ++- 3 files changed, 3 insertions(+), 9 deletions(-) delete mode 100644 ports/lpeg/COPYRIGHT diff --git a/ports/lpeg/CONTROL b/ports/lpeg/CONTROL index f1eeae348..edb3e1712 100644 --- a/ports/lpeg/CONTROL +++ b/ports/lpeg/CONTROL @@ -1,4 +1,4 @@ Source: lpeg -Version: 1.0.1 +Version: 1.0.1-1 Description: LPeg is a pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs). Build-Depends: lua diff --git a/ports/lpeg/COPYRIGHT b/ports/lpeg/COPYRIGHT deleted file mode 100644 index 7870c54ce..000000000 --- a/ports/lpeg/COPYRIGHT +++ /dev/null @@ -1,7 +0,0 @@ -Copyright © 2007-2017 Lua.org, PUC-Rio. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ports/lpeg/portfile.cmake b/ports/lpeg/portfile.cmake index 5a36f7944..8b8af69d2 100644 --- a/ports/lpeg/portfile.cmake +++ b/ports/lpeg/portfile.cmake @@ -17,6 +17,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/lpeg.def DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() @@ -25,7 +26,7 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(COPY ${CMAKE_CURRENT_LIST_DIR}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/lpeg) +file(COPY ${SOURCE_PATH}/lpeg DESTINATION ${CURRENT_PACKAGES_DIR}/share/lpeg) # Allow empty include directory set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) -- cgit v1.2.3 From fb6eb34298c8c01d9ec10b194f1ca40debf73e44 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Jun 2017 22:48:22 -0700 Subject: [sundials] Disable examples --- ports/sundials/portfile.cmake | 75 +++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 39 deletions(-) diff --git a/ports/sundials/portfile.cmake b/ports/sundials/portfile.cmake index bca4ea3b4..141cb3b11 100644 --- a/ports/sundials/portfile.cmake +++ b/ports/sundials/portfile.cmake @@ -1,52 +1,49 @@ - include(vcpkg_common_functions) +include(vcpkg_common_functions) - set(ARCHIVE_NAME "sundials-2.7.0") - set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}") +set(ARCHIVE_NAME "sundials-2.7.0") +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}") +vcpkg_download_distfile(ARCHIVE_FILE + URLS "https://computation.llnl.gov/projects/sundials/download/${ARCHIVE_NAME}.tar.gz" + FILENAME "${ARCHIVE_NAME}.tar.gz" + SHA512 c86c167538065a4109b36ae7c8f60f3d92184133cfa661b5acfccee052c38f40be865412a1746bb57907b61602c212c0f15e1e30ef29e8a49db6d46a75a28e69 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) - vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://computation.llnl.gov/projects/sundials/download/${ARCHIVE_NAME}.tar.gz" - FILENAME "${ARCHIVE_NAME}.tar.gz" - SHA512 c86c167538065a4109b36ae7c8f60f3d92184133cfa661b5acfccee052c38f40be865412a1746bb57907b61602c212c0f15e1e30ef29e8a49db6d46a75a28e69 - ) - vcpkg_extract_source_archive(${ARCHIVE_FILE}) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DEXAMPLES_ENABLE=OFF +) +vcpkg_install_cmake(DISABLE_PARALLEL) - message("-- Extracted to ${ARCHIVE_FILE} ${ARCHIVE_NAME}") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - ) +file(GLOB REMOVE_DLLS + "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll" + "${CURRENT_PACKAGES_DIR}/lib/*.dll" +) - vcpkg_install_cmake(DISABLE_PARALLEL) +file(GLOB DEBUG_DLLS + "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll" +) +file(GLOB DLLS + "${CURRENT_PACKAGES_DIR}/lib/*.dll" +) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(DLLS) + file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() - file(GLOB REMOVE_DLLS - "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll" - "${CURRENT_PACKAGES_DIR}/lib/*.dll" - ) +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() - file(GLOB DEBUG_DLLS - "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll" - ) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sundials RENAME copyright) - file(GLOB DLLS - "${CURRENT_PACKAGES_DIR}/lib/*.dll" - ) +if(REMOVE_DLLS) + file(REMOVE ${REMOVE_DLLS}) +endif() - if(DLLS) - file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - endif() - - - if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - endif() - - file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sundials RENAME copyright) - - file(REMOVE ${REMOVE_DLLS}) - - vcpkg_copy_pdbs() +vcpkg_copy_pdbs() -- cgit v1.2.3 From 6259ae99e8ea9cec4ef74f1250677cfcc70ee1b8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Jun 2017 23:13:19 -0700 Subject: [wt] Fix static builds. Enable sqlite3, postgres, and pango backends. --- ports/wt/CONTROL | 4 ++-- ports/wt/portfile.cmake | 23 ++++++++++++++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/ports/wt/CONTROL b/ports/wt/CONTROL index 24b87df83..5efc3e24c 100644 --- a/ports/wt/CONTROL +++ b/ports/wt/CONTROL @@ -1,4 +1,4 @@ Source: wt -Version: 3.3.7 +Version: 3.3.7-1 Description: Wt is a C++ library for developing web applications -Build-Depends: boost, openssl +Build-Depends: boost, openssl, sqlite3, libpq, pango diff --git a/ports/wt/portfile.cmake b/ports/wt/portfile.cmake index e5cded5ec..9e219de1f 100644 --- a/ports/wt/portfile.cmake +++ b/ports/wt/portfile.cmake @@ -13,19 +13,32 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-disable-boost-autolink-option.patch ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(SHARED_LIBS ON) +else() + set(SHARED_LIBS OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DSHARED_LIBS=ON - -DENABLE_SSL=ON + -DSHARED_LIBS=${SHARED_LIBS} + -DBOOST_DYNAMIC=ON + -DDISABLE_BOOST_AUTOLINK=ON -DBUILD_EXAMPLES=OFF - -DENABLE_POSTGRES=OFF + + -DENABLE_SSL=ON + -DENABLE_HARU=OFF + -DENABLE_PANGO=ON + -DENABLE_SQLITE=ON + -DENABLE_POSTGRES=ON -DENABLE_FIREBIRD=OFF -DENABLE_MYSQL=OFF -DENABLE_QT4=OFF - -DBOOST_DYNAMIC=ON - -DDISABLE_BOOST_AUTOLINK=ON -DENABLE_LIBWTTEST=OFF + -DENABLE_OPENGL=ON + + -DUSE_SYSTEM_SQLITE3=ON ) vcpkg_install_cmake() -- cgit v1.2.3 From 89cd6818d3b139cbfce6c1ab3d26d1ecf8f6f525 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Jun 2017 23:31:44 -0700 Subject: [ceres][openblas] Strengthen constraints --- ports/ceres/portfile.cmake | 14 +++++++++----- ports/openblas/portfile.cmake | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index a488b6da9..0ed2c94b8 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -10,17 +10,21 @@ # VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) # +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Ceres does not currently support static CRT linkage") +endif() + include(vcpkg_common_functions) set(VCPKG_PLATFORM_TOOLSET "v140") # Force VS2015 because VS2017 compiler return internal error # eigen3\eigen\src\core\redux.h(237): fatal error C1001: An internal error has occurred in the compiler. [internal\ceres\ceres.vcxproj] vcpkg_from_github( -OUT_SOURCE_PATH SOURCE_PATH -REPO ceres-solver/ceres-solver -REF 1.12.0 -SHA512 4b4cba5627fbd80a626e8a31d9f561d6cee1c8345970304e4b5b163a9dcadc6d636257d1046ecede00781a11229ef671ee89c3e7e6baf15f49f63f36e6a2ebe1 -HEAD_REF master + OUT_SOURCE_PATH SOURCE_PATH + REPO ceres-solver/ceres-solver + REF 1.12.0 + SHA512 4b4cba5627fbd80a626e8a31d9f561d6cee1c8345970304e4b5b163a9dcadc6d636257d1046ecede00781a11229ef671ee89c3e7e6baf15f49f63f36e6a2ebe1 + HEAD_REF master ) vcpkg_configure_cmake( diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index d00a4f67c..ec6f420f8 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -18,7 +18,7 @@ if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message(WARNING "openblas only support dynamic link for msvc") + message("openblas currenly only supports dynamic library linkage") set(VCPKG_LIBRARY_LINKAGE "dynamic") endif() -- cgit v1.2.3 From e5dc2f9c8ff5dfe3266a0c144a1e21b96fa62e25 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Jun 2017 23:45:52 -0700 Subject: [vcpkg] Rename --full-desc to --x-full-desc --- toolsrc/src/commands_list.cpp | 10 ++++------ toolsrc/src/commands_search.cpp | 20 +++++++++----------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/toolsrc/src/commands_list.cpp b/toolsrc/src/commands_list.cpp index 521fc5a9a..d21883fc2 100644 --- a/toolsrc/src/commands_list.cpp +++ b/toolsrc/src/commands_list.cpp @@ -7,16 +7,13 @@ namespace vcpkg::Commands::List { - static const std::string OPTION_FULLDESC = "--full-desc"; // TODO: This should find a better home, eventually + static const std::string OPTION_FULLDESC = "--x-full-desc"; // TODO: This should find a better home, eventually static void do_print(const StatusParagraph& pgh, bool FullDesc) { if (FullDesc) { - System::println("%-27s %-16s %s", - pgh.package.displayname(), - pgh.package.version, - pgh.package.description); + System::println("%-27s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description); } else { @@ -33,7 +30,8 @@ namespace vcpkg::Commands::List "The argument should be a substring to search for, or no argument to display all installed libraries.\n%s", Commands::Help::create_example_string("list png")); args.check_max_arg_count(1, example); - const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_FULLDESC}); + const std::unordered_set options = + args.check_and_get_optional_command_arguments({OPTION_FULLDESC}); const StatusParagraphs status_paragraphs = database_load_check(paths); std::vector installed_packages = get_installed_ports(status_paragraphs); diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index 6ec2a5395..bdb1e5d77 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -8,9 +8,8 @@ namespace vcpkg::Commands::Search { - static const std::string OPTION_GRAPH = "--graph"; // TODO: This should find a better home, eventually - static const std::string OPTION_FULLDESC = "--full-desc"; // TODO: This should find a better home, eventually - + static const std::string OPTION_GRAPH = "--graph"; // TODO: This should find a better home, eventually + static const std::string OPTION_FULLDESC = "--x-full-desc"; // TODO: This should find a better home, eventually static std::string replace_dashes_with_underscore(const std::string& input) { @@ -51,17 +50,15 @@ namespace vcpkg::Commands::Search { if (FullDesc) { - System::println("%-20s %-16s %s", - source_paragraph.name, - source_paragraph.version, - source_paragraph.description); + System::println( + "%-20s %-16s %s", source_paragraph.name, source_paragraph.version, source_paragraph.description); } else { System::println("%-20s %-16s %s", - source_paragraph.name, - source_paragraph.version, - details::shorten_description(source_paragraph.description)); + source_paragraph.name, + source_paragraph.version, + details::shorten_description(source_paragraph.description)); } } @@ -71,7 +68,8 @@ namespace vcpkg::Commands::Search "The argument should be a substring to search for, or no argument to display all libraries.\n%s", Commands::Help::create_example_string("search png")); args.check_max_arg_count(1, example); - const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}); + const std::unordered_set options = + args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}); const std::vector source_paragraphs = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); -- cgit v1.2.3 From 13b29588ba5c1b89969a3bf2a5cc61a97e9c83a0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Jun 2017 22:38:17 -0700 Subject: [vcpkg-cmake] Add tools subdirectories to the find programs path. Improves #1143. --- scripts/buildsystems/vcpkg.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index d3e1e814a..513c33ecb 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -1,6 +1,5 @@ # Mark variables as used so cmake doesn't complain about them set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE}) - if(NOT VCPKG_TOOLCHAIN) if(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) @@ -55,7 +54,6 @@ if(NOT VCPKG_TOOLCHAIN) endif() endwhile() set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE}) - set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed) if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) @@ -103,6 +101,12 @@ if(NOT VCPKG_TOOLCHAIN) ) set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools) + file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*) + foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS}) + if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR}) + set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_TOOLS_DIR}) + endif() + endforeach() option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON) function(add_executable name) -- cgit v1.2.3 From 676f55ddda709b24e4f2df9a3e3b52404b7c04ec Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 10 Jun 2017 01:43:52 -0700 Subject: [lpeg] Fix oversight while changing copyright --- ports/lpeg/CONTROL | 2 +- ports/lpeg/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/lpeg/CONTROL b/ports/lpeg/CONTROL index edb3e1712..5f2a3aff7 100644 --- a/ports/lpeg/CONTROL +++ b/ports/lpeg/CONTROL @@ -1,4 +1,4 @@ Source: lpeg -Version: 1.0.1-1 +Version: 1.0.1-2 Description: LPeg is a pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs). Build-Depends: lua diff --git a/ports/lpeg/portfile.cmake b/ports/lpeg/portfile.cmake index 8b8af69d2..43cc89d93 100644 --- a/ports/lpeg/portfile.cmake +++ b/ports/lpeg/portfile.cmake @@ -26,7 +26,7 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(COPY ${SOURCE_PATH}/lpeg DESTINATION ${CURRENT_PACKAGES_DIR}/share/lpeg) +file(INSTALL ${SOURCE_PATH}/lpeg.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/lpeg RENAME copyright) # Allow empty include directory set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) -- cgit v1.2.3 From 1e3754f7dfdd46aeac022a27a9d6907cc1d4d18d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Jun 2017 23:59:57 -0700 Subject: [taglib] Add HEAD_REF back. --- ports/taglib/portfile.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/taglib/portfile.cmake b/ports/taglib/portfile.cmake index 262fbf537..c90d16ca8 100644 --- a/ports/taglib/portfile.cmake +++ b/ports/taglib/portfile.cmake @@ -3,19 +3,19 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO taglib/taglib - REF 662f340f933077a926de443c9882f483973570e3 - SHA512 34087f77bb099f1f8ec82926a212a562bf589fc13f54eac50a56730c4411af2f4dbf1b7d09877087899048c3070325aea02297c6a94d0ad43fbf6742363dd2b6 + REF 662f340f933077a926de443c9882f483973570e3 + SHA512 34087f77bb099f1f8ec82926a212a562bf589fc13f54eac50a56730c4411af2f4dbf1b7d09877087899048c3070325aea02297c6a94d0ad43fbf6742363dd2b6 + HEAD_REF master ) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(WINRT_OPTIONS -DHAVE_VSNPRINTF=1 -DPLATFORM_WINRT) + set(WINRT_OPTIONS -DHAVE_VSNPRINTF=1 -DPLATFORM_WINRT=1) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS - ${WINRT_OPTIONS} + OPTIONS ${WINRT_OPTIONS} ) vcpkg_install_cmake() -- cgit v1.2.3 From deb9d5329ed95805f48da01a4cae385621faf300 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Sat, 10 Jun 2017 13:03:42 +0300 Subject: [suitesparse] Install *.config files --- ports/suitesparse/portfile.cmake | 76 +++++++++++++++++++++++++++------------- 1 file changed, 51 insertions(+), 25 deletions(-) diff --git a/ports/suitesparse/portfile.cmake b/ports/suitesparse/portfile.cmake index 1deb3a39e..737561f9f 100644 --- a/ports/suitesparse/portfile.cmake +++ b/ports/suitesparse/portfile.cmake @@ -12,6 +12,11 @@ include(vcpkg_common_functions) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + set(SUITESPARSE_VER SuiteSparse-4.5.5) #if you change the version, becarefull of changing the SHA512 checksum accordingly set(SUITESPARSEWIN_PATH ${CURRENT_BUILDTREES_DIR}/src/suitesparse-metis-for-windows-1.3.1) set(SUITESPARSE_PATH ${SUITESPARSEWIN_PATH}/Suitesparse) @@ -25,50 +30,72 @@ vcpkg_download_distfile(SUITESPARSE #download suitesparse-metis-for-windows scripts, suitesparse does not have CMake build system, jlblancoc has made one for it vcpkg_download_distfile(SUITESPARSEWIN -URLS "https://github.com/jlblancoc/suitesparse-metis-for-windows/archive/v1.3.1.zip" -FILENAME "suitesparse-metis-for-windows-1.3.1.zip" -SHA512 f8b9377420432f1c0a05bf884fe9e72f1f4eaf7e05663c66a383b5d8ddbd4fbfaa7d433727b4dc3e66b41dbb96b1327d380b68a51a424276465512666e63393d + URLS "https://github.com/jlblancoc/suitesparse-metis-for-windows/archive/v1.3.1.zip" + FILENAME "suitesparse-metis-for-windows-1.3.1.zip" + SHA512 f8b9377420432f1c0a05bf884fe9e72f1f4eaf7e05663c66a383b5d8ddbd4fbfaa7d433727b4dc3e66b41dbb96b1327d380b68a51a424276465512666e63393d ) -#extract suitesparse-metis-for-windows first and merge with suitesparse library +#extract suitesparse-metis-for-windows first and merge with suitesparse library vcpkg_extract_source_archive(${SUITESPARSEWIN}) vcpkg_extract_source_archive(${SUITESPARSE} ${SUITESPARSEWIN_PATH}) vcpkg_apply_patches( SOURCE_PATH ${SUITESPARSEWIN_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-suitesparse.patch" + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-suitesparse.patch" ) vcpkg_configure_cmake( SOURCE_PATH ${SUITESPARSEWIN_PATH} - #PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS - - -DBUILD_METIS=OFF #Disable the option to build metis from source - -DUSE_VCPKG_METIS=ON #Force using vcpckg metis library - -DMETIS_SOURCE_DIR=${CURRENT_INSTALLED_DIR} - - -DSUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS=ON - -DSUITESPARSE_CUSTOM_BLAS_LIB=${CURRENT_INSTALLED_DIR}/lib/openblas.lib - -DSUITESPARSE_CUSTOM_LAPACK_LIB=${CURRENT_INSTALLED_DIR}/lib/lapack.lib - - -DLIB_POSTFIX= + PREFER_NINJA + OPTIONS + -DBUILD_METIS=OFF #Disable the option to build metis from source + -DUSE_VCPKG_METIS=ON #Force using vcpckg metis library + -DMETIS_SOURCE_DIR=${CURRENT_INSTALLED_DIR} + -DLIB_POSTFIX= + -DSUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS=ON + -DSUITESPARSE_CUSTOM_BLAS_LIB=${CURRENT_INSTALLED_DIR}/lib/openblas.lib + -DSUITESPARSE_CUSTOM_LAPACK_LIB=${CURRENT_INSTALLED_DIR}/lib/lapack.lib OPTIONS_DEBUG -DSUITESPARSE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug OPTIONS_RELEASE - -DSUITESPARSE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR} + -DSUITESPARSE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR} ) vcpkg_install_cmake() +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/suitesparse/) + +file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SuiteSparse-config.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SuiteSparse-config-release.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config-release.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/cmake/SuiteSparse-config-debug.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config-debug.cmake) + +file(RENAME ${CURRENT_PACKAGES_DIR}/UseSuiteSparse.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/UseSuiteSparse.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/SuiteSparseConfig.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparseConfig.cmake) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/UseSuiteSparse.cmake) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/SuiteSparseConfig.cmake) + +# Update paths in SuiteSparseConfig.cmake +file(READ ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparseConfig.cmake _contents) +string(REPLACE "set(SuiteSparse_LIB_POSTFIX \"64\")" "set(SuiteSparse_LIB_POSTFIX \"\")" _contents "${_contents}") +string(REPLACE "\#\# do nothing, it's OK" "include(${USE_SuiteSparse})" _contents "${_contents}") + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparseConfig.cmake "${_contents}") + +# Update paths in SuiteSparse-config.cmake +file(READ ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config.cmake _contents) +string(REPLACE "get_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)" + "get_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config.cmake "${_contents}") + +# Update paths in SuiteSparse-config-debug.cmake +file(READ ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config-debug.cmake _contents) +string(REPLACE "\${_IMPORT_PREFIX}/lib/" "\${_IMPORT_PREFIX}/debug/lib/" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config-debug.cmake "${_contents}") + #clean folders -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) -file(GLOB REMFILES ${CURRENT_PACKAGES_DIR}/debug/*.*) -file(REMOVE ${REMFILES}) -file(GLOB REMFILES ${CURRENT_PACKAGES_DIR}/*.*) -file(REMOVE ${REMFILES}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright of suitesparse and suitesparse-metis-for-windows file(COPY ${SUITESPARSE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/suitesparse) @@ -76,4 +103,3 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/suitesparse/LICENSE.txt ${CURRENT_PACK file(COPY ${SUITESPARSEWIN_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) - -- cgit v1.2.3 From 1c7a52a42a68d6ffba4e6a6b94273191ae49e11a Mon Sep 17 00:00:00 2001 From: Ben Harper Date: Thu, 8 Jun 2017 17:23:16 +0200 Subject: Add utfz to ports utfz is a UTF-8 decoding library. It is notably different from utfcpp because it doesn't use exceptions. --- ports/utfz/CONTROL | 3 +++ ports/utfz/portfile.cmake | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 ports/utfz/CONTROL create mode 100644 ports/utfz/portfile.cmake diff --git a/ports/utfz/CONTROL b/ports/utfz/CONTROL new file mode 100644 index 000000000..26344d928 --- /dev/null +++ b/ports/utfz/CONTROL @@ -0,0 +1,3 @@ +Source: utfz +Version: 1.2 +Description: A tiny C++ library for parsing and encoding utf-8 diff --git a/ports/utfz/portfile.cmake b/ports/utfz/portfile.cmake new file mode 100644 index 000000000..924e4a4b3 --- /dev/null +++ b/ports/utfz/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/utfz-1.2) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/IMQS/utfz/archive/v1.2.zip" + FILENAME "utfz-1.2.zip" + SHA512 a3bef8f769c7eb15fbd3a4c3c64f2e70666bfd305ad3c24ef676c7f5a428d95fdb8dcfe18cb5bfa072069e9368a29bf375848f9a775e60bec2eae7ffa5662b55 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Copy the include file +file(COPY ${SOURCE_PATH}/utfz.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/utfz) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/utfz/license ${CURRENT_PACKAGES_DIR}/share/utfz/copyright) -- cgit v1.2.3 From 29c913cdec5344c070ccd0e1e074a33783bfcc03 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Sat, 10 Jun 2017 13:05:44 +0300 Subject: [ceres] Install *.config files --- ports/ceres/portfile.cmake | 66 ++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index 0ed2c94b8..61cb4a009 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -29,46 +29,44 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - #PREFER_NINJA # Disable this option if project cannot be built with Ninja - - OPTIONS - -DEXPORT_BUILD_DIR=ON - -DBUILD_EXAMPLES=OFF - -DBUILD_TESTING=OFF - -DEIGENSPARSE=ON - -DSUITESPARSE=ON - -DCXSPARSE=ON - #-DBUILD_SHARED_LIBS=OFF - -DCXSPARSE_INCLUDE_DIR=${SUITESPARSE_INCLUDE_DIR} - -DCXSPARSE_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/libcxsparse.lib - -DSUITESPARSE_INCLUDE_DIR_HINTS=${CURRENT_INSTALLED_DIR}/include/suitesparse - -DEIGEN_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/eigen3 - -DLAPACK_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/lapack.lib - -DBLAS_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/openblas.lib - -DMETIS_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/metis.lib - -DGFLAGS_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include - -DGFLAGS_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/gflags.lib - -DGLOG_INCLUDE_DIR=${PACKAGES_INCLUDE_DIR} - -DGLOG_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/glog.lib - - OPTIONS_RELEASE - -DSUITESPARSE_LIBRARY_DIR_HINTS=${CURRENT_INSTALLED_DIR}/lib - - OPTIONS_DEBUG - -DSUITESPARSEQR_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/libspqrd.lib - -DSUITESPARSE_LIBRARY_DIR_HINTS=${CURRENT_INSTALLED_DIR}/debug/lib - + OPTIONS + -DEXPORT_BUILD_DIR=ON + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF + -DCXSPARSE=ON + -DEIGENSPARSE=ON + -DSUITESPARSE=ON + -DBLAS_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/openblas.lib + -DCXSPARSE_INCLUDE_DIR=${SUITESPARSE_INCLUDE_DIR} + -DCXSPARSE_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/libcxsparse.lib + -DEIGEN_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/eigen3 + -DGFLAGS_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DGFLAGS_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/gflags.lib + -DGLOG_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DGLOG_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/glog.lib + -DLAPACK_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/lapack.lib + -DMETIS_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/metis.lib + -DSUITESPARSE_INCLUDE_DIR_HINTS=${CURRENT_INSTALLED_DIR}/include/suitesparse + OPTIONS_RELEASE + -DSUITESPARSE_LIBRARY_DIR_HINTS=${CURRENT_INSTALLED_DIR}/lib + OPTIONS_DEBUG + -DSUITESPARSEQR_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/libspqrd.lib + -DSUITESPARSE_LIBRARY_DIR_HINTS=${CURRENT_INSTALLED_DIR}/debug/lib ) + vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + vcpkg_copy_pdbs() -#clean -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/CMake) +#clean file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE ${CURRENT_PACKAGES_DIR}/share/ceres/FindEigen.cmake) +file(REMOVE ${CURRENT_PACKAGES_DIR}/share/ceres/FindGflags.cmake) +file(REMOVE ${CURRENT_PACKAGES_DIR}/share/ceres/FindGlog.cmake) # Handle copyright of suitesparse and metis file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ceres) file(RENAME ${CURRENT_PACKAGES_DIR}/share/ceres/LICENSE ${CURRENT_PACKAGES_DIR}/share/ceres/copyright) - - -- cgit v1.2.3 From 7cfb8336739cf5ff3a6b31964ebbe4536211d8d9 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 10 Jun 2017 15:03:48 +0200 Subject: [tiff] update to 4.0.8 --- ports/tiff/CONTROL | 4 ++-- ports/tiff/portfile.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/tiff/CONTROL b/ports/tiff/CONTROL index dfebf3cc8..28452b794 100644 --- a/ports/tiff/CONTROL +++ b/ports/tiff/CONTROL @@ -1,4 +1,4 @@ Source: tiff -Version: 4.0.7-1 -Build-Depends: zlib, libjpeg-turbo, liblzma [windows], freeglut [windows] +Version: 4.0.8 +Build-Depends: zlib, libjpeg-turbo, liblzma [windows] Description: A library that supports the manipulation of TIFF image files diff --git a/ports/tiff/portfile.cmake b/ports/tiff/portfile.cmake index 708fb70ad..bfa1c3853 100644 --- a/ports/tiff/portfile.cmake +++ b/ports/tiff/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(LIBTIFF_VERSION 4.0.7) -set(LIBTIFF_HASH 941357bdd5f947cdca41a1d31ae14b3fadc174ae5dce7b7981dbe58f61995f575ac2e97a7cc4fcc435184012017bec0920278263490464644f2cdfad9a6c5ddc) +set(LIBTIFF_VERSION 4.0.8) +set(LIBTIFF_HASH 5d010ec4ce37aca733f7ab7db9f432987b0cd21664bd9d99452a146833c40f0d1e7309d1870b0395e947964134d5cfeb1366181e761fe353ad585803ff3d6be6) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tiff-${LIBTIFF_VERSION}) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From 27db5c14bbe9025dd5953b6cd4accb51e4be0501 Mon Sep 17 00:00:00 2001 From: sigman Date: Sat, 10 Jun 2017 17:48:40 +0300 Subject: [magnum-plugins] Patch for missing include vs2017 regression --- ports/magnum-plugins/001-fix-include.patch | 12 ++++++++++++ ports/magnum-plugins/CONTROL | 2 +- ports/magnum-plugins/portfile.cmake | 5 +++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 ports/magnum-plugins/001-fix-include.patch diff --git a/ports/magnum-plugins/001-fix-include.patch b/ports/magnum-plugins/001-fix-include.patch new file mode 100644 index 000000000..c6aa9c755 --- /dev/null +++ b/ports/magnum-plugins/001-fix-include.patch @@ -0,0 +1,12 @@ +diff --git a/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp b/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp +index c94ee98..843d1ec 100644 +--- a/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp ++++ b/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp +@@ -25,6 +25,7 @@ + + #include + #include ++#include + #include + + #include "MagnumPlugins/OpenGexImporter/OpenDdl/Document.h" diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 1bf1111c4..087383c4a 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017-1 +Version: jun2017-2 Build-Depends: stb, magnum Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index 199789c99..dde435ee4 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -7,6 +7,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-include.patch +) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) else() -- cgit v1.2.3 From c4de5e29b11bd5815b479aa94172a227c3cac55a Mon Sep 17 00:00:00 2001 From: mmazaherit Date: Sat, 10 Jun 2017 17:53:46 -0400 Subject: check in qhull --- ports/qhull/CONTROL | 3 +++ ports/qhull/portfile.cmake | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 ports/qhull/CONTROL create mode 100644 ports/qhull/portfile.cmake diff --git a/ports/qhull/CONTROL b/ports/qhull/CONTROL new file mode 100644 index 000000000..aaf569f25 --- /dev/null +++ b/ports/qhull/CONTROL @@ -0,0 +1,3 @@ +Source: qhull +Version:1.0 +Description: computes the convex hull, Delaunay triangulation, Voronoi diagram diff --git a/ports/qhull/portfile.cmake b/ports/qhull/portfile.cmake new file mode 100644 index 000000000..77c585b40 --- /dev/null +++ b/ports/qhull/portfile.cmake @@ -0,0 +1,46 @@ +# 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 qhull/qhull + REF master + SHA512 16aa9f93ce6fe8342a3b579881f10bb417679b0a70849e6b0cc5a89551e4de773a43bb0d54948196690d68d168f3a2a215e4600745ff1566302b0b426565fb25 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + #PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include + -DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull + -DDOC_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull + + OPTIONS_RELEASE + -Dqhull_TARGETS_INSTALL=qhullcpp + -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib + + OPTIONS_DEBUG + -Dqhull_TARGETS_INSTALL=qhullcpp_d + -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB_RECURSE HTMFILES ${CURRENT_PACKAGES_DIR}/include/*.htm) +file(REMOVE ${HTMFILES}) + +# Handle copyright +file(COPY ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/qhull) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/qhull/README.txt ${CURRENT_PACKAGES_DIR}/share/qhull/copyright) -- cgit v1.2.3 From a78809e77be6a4a2ae31ace726337e3ade8dcab9 Mon Sep 17 00:00:00 2001 From: bagong Date: Sun, 11 Jun 2017 00:19:46 +0200 Subject: Qwt: fix 'missing zlib1.dll' --- ports/qwt/CONTROL | 2 +- ports/qwt/portfile.cmake | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/qwt/CONTROL b/ports/qwt/CONTROL index 7564c1c7b..dd6400764 100644 --- a/ports/qwt/CONTROL +++ b/ports/qwt/CONTROL @@ -1,4 +1,4 @@ Source: qwt -Version: 6.1.3-1 +Version: 6.1.3-2 Description: Qt widgets library for technical applications Build-Depends: qt5 diff --git a/ports/qwt/portfile.cmake b/ports/qwt/portfile.cmake index 109c0bc7c..99f84425a 100644 --- a/ports/qwt/portfile.cmake +++ b/ports/qwt/portfile.cmake @@ -21,6 +21,9 @@ else() ) endif() +# The qwt build requires zlib1.dll +SET(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") + vcpkg_configure_qmake( SOURCE_PATH ${SOURCE_PATH} ) -- cgit v1.2.3 From 1a30b7a8a12084062ad0060c72792ba7e72750b5 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 10 Jun 2017 16:54:03 +0200 Subject: [ilmbase] initial commit --- ports/ilmbase/CONTROL | 3 ++ ports/ilmbase/fix-parallel-build.patch | 54 ++++++++++++++++++++++++++++++++++ ports/ilmbase/portfile.cmake | 49 ++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 ports/ilmbase/CONTROL create mode 100644 ports/ilmbase/fix-parallel-build.patch create mode 100644 ports/ilmbase/portfile.cmake diff --git a/ports/ilmbase/CONTROL b/ports/ilmbase/CONTROL new file mode 100644 index 000000000..8bb022905 --- /dev/null +++ b/ports/ilmbase/CONTROL @@ -0,0 +1,3 @@ +Source: ilmbase +Version: 2.2.0 +Description: Base libraries from ILM for OpenEXR diff --git a/ports/ilmbase/fix-parallel-build.patch b/ports/ilmbase/fix-parallel-build.patch new file mode 100644 index 000000000..85c773f31 --- /dev/null +++ b/ports/ilmbase/fix-parallel-build.patch @@ -0,0 +1,54 @@ +diff --git a/Half/CMakeLists.txt b/Half/CMakeLists.txt +index 6f9714d..0c43904 100644 +--- a/Half/CMakeLists.txt ++++ b/Half/CMakeLists.txt +@@ -2,10 +2,10 @@ + + ADD_EXECUTABLE ( eLut eLut.cpp ) + +-ADD_CUSTOM_COMMAND ( +- TARGET eLut POST_BUILD ++ADD_CUSTOM_TARGET ( make_eLut + COMMAND eLut > ${CMAKE_CURRENT_BINARY_DIR}/eLut.h + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ++ DEPENDS eLut + ) + SET_SOURCE_FILES_PROPERTIES( + ${CMAKE_CURRENT_BINARY_DIR}/eLut.h +@@ -13,25 +13,16 @@ SET_SOURCE_FILES_PROPERTIES( + ) + + ADD_EXECUTABLE ( toFloat toFloat.cpp ) +-ADD_CUSTOM_COMMAND ( +- TARGET toFloat POST_BUILD ++ADD_CUSTOM_TARGET ( make_toFloat + COMMAND toFloat > ${CMAKE_CURRENT_BINARY_DIR}/toFloat.h + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ++ DEPENDS toFloat + ) + SET_SOURCE_FILES_PROPERTIES( + ${CMAKE_CURRENT_BINARY_DIR}/toFloat.h + PROPERTIES HEADER_FILE_ONLY TRUE + ) + +-SET_SOURCE_FILES_PROPERTIES( +- half.cpp +- PROPERTIES +- OBJECT_DEPENDS +- ${CMAKE_CURRENT_BINARY_DIR}/eLut.h +- OBJECT_DEPENDS +- ${CMAKE_CURRENT_BINARY_DIR}/toFloat.h +- ) +- + IF(BUILD_SHARED_LIBS) + ADD_DEFINITIONS(-DHALF_EXPORTS) + ENDIF() +@@ -41,7 +32,7 @@ ADD_LIBRARY ( Half ${LIB_TYPE} + ) + + +-ADD_DEPENDENCIES ( Half toFloat eLut ) ++ADD_DEPENDENCIES ( Half make_toFloat make_eLut ) + + INSTALL ( TARGETS + Half diff --git a/ports/ilmbase/portfile.cmake b/ports/ilmbase/portfile.cmake new file mode 100644 index 000000000..8036413ad --- /dev/null +++ b/ports/ilmbase/portfile.cmake @@ -0,0 +1,49 @@ +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "UWP build not supported") +endif() + +set(ILM_VERSION 2.2.0) +set(ILM_HASH 0bbad14ed2bd286dff3987b16ef8631470211da54f822cb3e29b7931807216845ded81c9bf41fd2d22a8b362e8b9904a5450f61f5a242e460083e86b846513f1) + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ilmbase-${ILM_VERSION}) +vcpkg_download_distfile(ARCHIVE + URLS "http://download.savannah.nongnu.org/releases/openexr/ilmbase-${ILM_VERSION}.tar.gz" + FILENAME "ilmbase-${ILM_VERSION}.zip" + SHA512 ${ILM_HASH}) + +vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-parallel-build.patch) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA) +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + foreach(SUBDIR "" "/debug") + file(GLOB DLLS ${CURRENT_PACKAGES_DIR}${SUBDIR}/lib/*.dll) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}${SUBDIR}/bin) + file(REMOVE ${DLLS}) + endforeach() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +foreach(HEADER halfExport.h IexExport.h IexMathFloatExc.h IlmThreadExport.h ImathExport.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/OpenEXR/${HEADER} HEADER_FILE) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "defined(OPENEXR_DLL)" "1" HEADER_FILE "${HEADER_FILE}") + else() + string(REPLACE "defined(OPENEXR_DLL)" "0" HEADER_FILE "${HEADER_FILE}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/OpenEXR/${HEADER} "${HEADER_FILE}") +endforeach() + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ilmbase) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/ilmbase/LICENSE ${CURRENT_PACKAGES_DIR}/share/ilmbase/copyright) -- cgit v1.2.3 From ec625bc160748ea4b35c3c0c4fb7daa06b42de32 Mon Sep 17 00:00:00 2001 From: mmazaherit Date: Sun, 11 Jun 2017 17:26:22 -0400 Subject: check in flann --- ports/flann/CONTROL | 3 +++ ports/flann/fix-install-flann.patch | 41 +++++++++++++++++++++++++++++ ports/flann/portfile.cmake | 51 +++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 ports/flann/CONTROL create mode 100644 ports/flann/fix-install-flann.patch create mode 100644 ports/flann/portfile.cmake diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL new file mode 100644 index 000000000..a4a5c4ddc --- /dev/null +++ b/ports/flann/CONTROL @@ -0,0 +1,3 @@ +Source: flann +Version: 1.9.1 +Description: performing fast approximate nearest neighbor searches in high dimensional spaces diff --git a/ports/flann/fix-install-flann.patch b/ports/flann/fix-install-flann.patch new file mode 100644 index 000000000..f65094e8f --- /dev/null +++ b/ports/flann/fix-install-flann.patch @@ -0,0 +1,41 @@ +diff --git "a/src/cpp/CMakeLists.txt" "b/src/cpp/CMakeLists.txt" +index 49c53f0..cc58c90 100644 +--- "a/src/cpp/CMakeLists.txt" ++++ "b/src/cpp/CMakeLists.txt" +@@ -87,7 +87,7 @@ if (BUILD_C_BINDINGS) + 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}) ++ add_library(flann ${C_SOURCES}) + + if(MINGW AND OPENMP_FOUND) + target_link_libraries(flann gomp) +@@ -111,12 +111,12 @@ endif() + endif(WIN32) + + +-install ( +- TARGETS flann_cpp flann_cpp_s +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} +- ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} +-) ++#install ( ++# TARGETS flann_cpp flann_cpp_s ++# RUNTIME DESTINATION bin ++# LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} ++# ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} ++#) + + if (BUILD_CUDA_LIB) + install ( +@@ -129,7 +129,7 @@ endif() + + if (BUILD_C_BINDINGS) + install ( +- TARGETS flann flann_s ++ TARGETS flann + 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 new file mode 100644 index 000000000..4a87365c0 --- /dev/null +++ b/ports/flann/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_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mariusmuja/flann + REF 1.9.1 + SHA512 0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7 +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-flann.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + #PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_PYTHON_BINDINGS=OFF + -DBUILD_MATLAB_BINDINGS=OFF + -DBUILD_DOC=OFF + + OPTIONS_RELEASE + -DFLANN_LIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib + + OPTIONS_DEBUG + -DFLANN_LIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib + +) + +vcpkg_install_cmake() + +#clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/flann/README.md ${CURRENT_PACKAGES_DIR}/share/flann/copyright) \ No newline at end of file -- cgit v1.2.3 From b38ff27ef5bb932933c301f28a877ff178f20c76 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Sun, 11 Jun 2017 20:14:40 -0700 Subject: Update Beast package to version 54 --- ports/beast/CONTROL | 4 ++-- ports/beast/portfile.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL index 09f588090..28070c889 100644 --- a/ports/beast/CONTROL +++ b/ports/beast/CONTROL @@ -1,4 +1,4 @@ Source: beast -Version: v40 +Version: v54 Build-Depends: boost -Description: HTTP and WebSocket, header-only using Boost.Asio and C++11 +Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake index b464613e2..6e34ba1b1 100644 --- a/ports/beast/portfile.cmake +++ b/ports/beast/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vinniefalco/Beast - REF f2d825594ee34ccc1ebc0b231899a1735245778d - SHA512 21ea2ba77ff8c1dac873e7abd4caa03da50f155c34b39783380d4319c930be02076bf2b7ffcf93a964cac60bfb0a2ec8621156c332adedd3a2af82a27ca50e1a + REF 6a8912a88ba94dd28aa11b086faaf32a11c3fbf7 + SHA512 0fa23fabe75c4a26bb2da3505df96f3a9382d8fda614dc618c1dec075eae790fd83849bc59884e17aa0811af0b06c401a8c5929f8060dbfd5044c350f7ad90be HEAD_REF master ) -- cgit v1.2.3 From faf0d669d768a57b83439f2edc4720c0ff894c68 Mon Sep 17 00:00:00 2001 From: pravic Date: Mon, 12 Jun 2017 10:07:31 +0300 Subject: [sciter] Update to 4.0.1.1 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index d6f84d4da..edf88da4d 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.0.1.0 +Version: 4.0.1.1 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 7d5016f1c..dbd13c77b 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,9 +12,9 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_VERSION 4.0.1.0) -set(SCITER_REVISION 67d2939a0510886c036c7c41267603463cbf96e0) -set(SCITER_SHA adf77354cc8624892ac1daaf03cba56cf8c3f2d7f77426977011af2a3070f685f51fd594dfb58a7fc7421f3d8c418ba47afb6ceb00170c8623eefcedfe1dca82) +set(SCITER_VERSION 4.0.1.1) +set(SCITER_REVISION 5caaf6f5bd408fd45c30deb873ce76ae7af53819) +set(SCITER_SHA 88d332891a98fd80200ae04a7b5cc72a6edcbc123abe8147a17ac8e4189fbc4b7ed58f7acc06a6683ec3f1ed74e133115c35599751f6a31358b911e07b602ec4) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From 0e50d7019929bcf9d4fabe58f9c8b1be467f5471 Mon Sep 17 00:00:00 2001 From: Silvio Date: Mon, 12 Jun 2017 17:26:30 +0200 Subject: Fix protobuf dynamic build Backport https://github.com/google/protobuf/pull/3216 --- ports/protobuf/0001-fix-missing-export.patch | 13 +++++++++++++ ports/protobuf/portfile.cmake | 9 +++++++++ 2 files changed, 22 insertions(+) create mode 100644 ports/protobuf/0001-fix-missing-export.patch diff --git a/ports/protobuf/0001-fix-missing-export.patch b/ports/protobuf/0001-fix-missing-export.patch new file mode 100644 index 000000000..c7d5ff6c8 --- /dev/null +++ b/ports/protobuf/0001-fix-missing-export.patch @@ -0,0 +1,13 @@ +diff --git a/src/google/protobuf/generated_message_util.h b/src/google/protobuf/generated_message_util.h +index 4417446..a7154b4 100644 +--- a/src/google/protobuf/generated_message_util.h ++++ b/src/google/protobuf/generated_message_util.h +@@ -164,7 +164,7 @@ class ExplicitlyConstructed { + + // Default empty string object. Don't use this directly. Instead, call + // GetEmptyString() to get the reference. +-extern ExplicitlyConstructed< ::std::string> fixed_address_empty_string; ++LIBPROTOBUF_EXPORT extern ExplicitlyConstructed< ::std::string> fixed_address_empty_string; + LIBPROTOBUF_EXPORT extern ProtobufOnceType empty_string_once_init_; + LIBPROTOBUF_EXPORT void InitEmptyString(); + diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index c053e1bb5..852086ff5 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -17,6 +17,15 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}) set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32) vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +# Patch to fix the missing export of fixed_address_empty_string, +# see https://github.com/google/protobuf/pull/3216 +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-missing-export.patch" +) + + vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${TOOL_PATH}) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) -- cgit v1.2.3 From 70871f0a1838e58a4db028a71780bfbd89bfc284 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 12 Jun 2017 15:07:41 -0700 Subject: [protobuf] Bump version number --- ports/protobuf/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 757d39d6b..43e4ad1e8 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,4 +1,4 @@ Source: protobuf -Version: 3.3.0 +Version: 3.3.0-1 Build-Depends: zlib Description: Protocol Buffers - Google's data interchange format \ No newline at end of file -- cgit v1.2.3 From 191f2bde0ec7aa698e8911c43aa2e2308c17eef3 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Mon, 12 Jun 2017 16:58:15 -0700 Subject: [beast] update to version 55 --- ports/beast/CONTROL | 2 +- ports/beast/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL index 28070c889..9f6ff2ae0 100644 --- a/ports/beast/CONTROL +++ b/ports/beast/CONTROL @@ -1,4 +1,4 @@ Source: beast -Version: v54 +Version: v55 Build-Depends: boost Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake index 6e34ba1b1..a1e92d444 100644 --- a/ports/beast/portfile.cmake +++ b/ports/beast/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vinniefalco/Beast - REF 6a8912a88ba94dd28aa11b086faaf32a11c3fbf7 - SHA512 0fa23fabe75c4a26bb2da3505df96f3a9382d8fda614dc618c1dec075eae790fd83849bc59884e17aa0811af0b06c401a8c5929f8060dbfd5044c350f7ad90be + REF fde69298dce9d29c13eac272d34216e972bfb2fc + SHA512 fe39cee7ccfaa36df005fe86c3f2bb5e917974a1c11d5c5ea48e1075b650373c0bca172f7069b5f7dc95e8c3b1425b5dc365b6a9b89eea5f41f6aafacfe352e6 HEAD_REF master ) -- cgit v1.2.3 From 61dbead6fc9dc3b27515db9fbc4d48e772f298bd Mon Sep 17 00:00:00 2001 From: sigman78 Date: Tue, 13 Jun 2017 12:35:54 +0300 Subject: [magnum] Patch SDL2 includes, msbuild compatibility Concerning SDL2 includes and how do they work. It is seems what the common practice is to append 'SDL2' include path to the compiler options and then do plain #include "SDL.h". While it works in cmake based projects it won't pass in msbuild ones. This patch changes #include to 'global' style and solves the problem. --- ports/magnum/001-sdl-includes.patch | 20 ++++++++++++++++++++ ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 5 +++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 ports/magnum/001-sdl-includes.patch diff --git a/ports/magnum/001-sdl-includes.patch b/ports/magnum/001-sdl-includes.patch new file mode 100644 index 000000000..afa1301d9 --- /dev/null +++ b/ports/magnum/001-sdl-includes.patch @@ -0,0 +1,20 @@ +diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h +index 99c3174..311b2c1 100644 +--- a/src/Magnum/Platform/Sdl2Application.h ++++ b/src/Magnum/Platform/Sdl2Application.h +@@ -42,11 +42,11 @@ + #ifdef CORRADE_TARGET_WINDOWS /* Windows version of SDL2 redefines main(), we don't want that */ + #define SDL_MAIN_HANDLED + #endif +-#include +-#include ++#include ++#include + + #ifdef CORRADE_TARGET_WINDOWS_RT +-#include /* For SDL_WinRTRunApp */ ++#include /* For SDL_WinRTRunApp */ + #include /* For the WinMain entrypoint */ + #endif + + diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index a110136f2..c4530c254 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-1 +Version: jun2017-2 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 67d1f825a..81e2123b6 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -7,6 +7,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch +) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) else() -- cgit v1.2.3 From 4167807f09e3f772a87d0f1f0ae5f51f9cdc5610 Mon Sep 17 00:00:00 2001 From: sigman78 Date: Tue, 13 Jun 2017 15:20:29 +0300 Subject: [magnum] Emit plugin binary path to the header Drop-in solution for the msbuild users. --- ports/magnum/002-magnum-defs.patch | 26 ++++++++++++++++++++++++++ ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 6 +++++- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 ports/magnum/002-magnum-defs.patch diff --git a/ports/magnum/002-magnum-defs.patch b/ports/magnum/002-magnum-defs.patch new file mode 100644 index 000000000..de7d1cb10 --- /dev/null +++ b/ports/magnum/002-magnum-defs.patch @@ -0,0 +1,26 @@ +diff --git a/src/Magnum/configure.h.cmake b/src/Magnum/configure.h.cmake +index 6a752d4..cd1277b 100644 +--- a/src/Magnum/configure.h.cmake ++++ b/src/Magnum/configure.h.cmake +@@ -35,4 +35,23 @@ + #cmakedefine MAGNUM_TARGET_WEBGL + #cmakedefine MAGNUM_TARGET_HEADLESS + ++// Plugin directories ++#ifdef _DEBUG ++#define MAGNUM_PLUGINS_DIR "${MAGNUM_PLUGINS_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR}" ++#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_DIR}" ++#else ++#define MAGNUM_PLUGINS_DIR "${MAGNUM_PLUGINS_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_RELEASE_DIR}" ++#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_DIR}" ++#endif ++ + #endif diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index c4530c254..9160e2287 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-2 +Version: jun2017-3 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 81e2123b6..3aed5a737 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -9,7 +9,9 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch + ${CMAKE_CURRENT_LIST_DIR}/002-magnum-defs.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -26,6 +28,8 @@ vcpkg_configure_cmake( -DWITH_AUDIO=ON -DWITH_WAVAUDIOIMPORTER=ON -DBUILD_STATIC=${BUILD_STATIC} + -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d + -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum ) vcpkg_install_cmake() -- cgit v1.2.3 From 0a7fee0e8b0a637c83b9dd55bcb7a85c85779aba Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 13 Jun 2017 16:09:00 -0700 Subject: removed parquet file --- ports/parquet-cpp/CONTROL | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 ports/parquet-cpp/CONTROL diff --git a/ports/parquet-cpp/CONTROL b/ports/parquet-cpp/CONTROL deleted file mode 100644 index cadfee906..000000000 --- a/ports/parquet-cpp/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: parquet-cpp -Version: apache-parquet-cpp-1.1.0 -Build-Depends: boost, snappy, zlib, brotli, arrow, thrift -Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. -- cgit v1.2.3 From 9a409006cf7ec63bebe0d9341799b5cb529155ae Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 13 Jun 2017 17:11:23 -0700 Subject: added Live555 #19 --- ports/live555/BasicUsageEnvironment.txt | 25 +++ ports/live555/CMakeLists.txt | 22 +++ ports/live555/CONTROL | 3 + ports/live555/UsageEnvironment.txt | 21 ++ ports/live555/groupsock.txt | 28 +++ ports/live555/live.txt | 14 ++ ports/live555/liveMedia.txt | 331 ++++++++++++++++++++++++++++++++ ports/live555/master.txt | 12 ++ ports/live555/mediaServer.txt | 23 +++ ports/live555/portfile.cmake | 71 +++++++ ports/live555/proxyServer.txt | 17 ++ ports/live555/testProgs.txt | 114 +++++++++++ 12 files changed, 681 insertions(+) create mode 100644 ports/live555/BasicUsageEnvironment.txt create mode 100644 ports/live555/CMakeLists.txt create mode 100644 ports/live555/CONTROL create mode 100644 ports/live555/UsageEnvironment.txt create mode 100644 ports/live555/groupsock.txt create mode 100644 ports/live555/live.txt create mode 100644 ports/live555/liveMedia.txt create mode 100644 ports/live555/master.txt create mode 100644 ports/live555/mediaServer.txt create mode 100644 ports/live555/portfile.cmake create mode 100644 ports/live555/proxyServer.txt create mode 100644 ports/live555/testProgs.txt diff --git a/ports/live555/BasicUsageEnvironment.txt b/ports/live555/BasicUsageEnvironment.txt new file mode 100644 index 000000000..40d311ee0 --- /dev/null +++ b/ports/live555/BasicUsageEnvironment.txt @@ -0,0 +1,25 @@ +# CMakeLists.txt in BasicUsageEnvironment + +SET(BASIC_USAGE_ENVIRONMENT_SRCS +BasicHashTable.cpp +BasicTaskScheduler.cpp +BasicTaskScheduler0.cpp +BasicUsageEnvironment.cpp +BasicUsageEnvironment0.cpp +DelayQueue.cpp +) + +SET(BASIC_USAGE_ENVIRONMENT_HEADERS +include/BasicHashTable.hh +include/BasicUsageEnvironment.hh +include/BasicUsageEnvironment0.hh +include/BasicUsageEnvironment_version.hh +include/DelayQueue.hh +include/HandlerSet.hh +) + +INCLUDE_DIRECTORIES( +${live555Includes} +) + +ADD_LIBRARY( BasicUsageEnvironment STATIC ${BASIC_USAGE_ENVIRONMENT_HEADERS} ${BASIC_USAGE_ENVIRONMENT_SRCS}) diff --git a/ports/live555/CMakeLists.txt b/ports/live555/CMakeLists.txt new file mode 100644 index 000000000..cab15c4c6 --- /dev/null +++ b/ports/live555/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 2.6) + +PROJECT( live555 ) + +file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/master.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src RENAME CMakeLists.txt) +file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/live.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live RENAME CMakeLists.txt) +file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/BasicUsageEnvironment.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/BasicUsageEnvironment RENAME CMakeLists.txt) +file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/groupsock.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/groupsock RENAME CMakeLists.txt) +file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/liveMedia.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/liveMedia RENAME CMakeLists.txt) +file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/mediaServer.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/mediaServer RENAME CMakeLists.txt) +file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/proxyServer.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/proxyServer RENAME CMakeLists.txt) +file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/testProgs.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/testProgs RENAME CMakeLists.txt) +file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/UsageEnvironment.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/UsageEnvironment RENAME CMakeLists.txt) + + +set(BUILD ${CMAKE_CURRENT_SOURCE_DIR}/src/build) + +message(STATUS "${BUILD} is here") +file(MAKE_DIRECTORY ${BUILD}) +execute_process(COMMAND ${CMAKE_COMMAND} .. WORKING_DIRECTORY ${BUILD}) + +execute_process(COMMAND ${CMAKE_COMMAND} --build . WORKING_DIRECTORY ${BUILD}) \ No newline at end of file diff --git a/ports/live555/CONTROL b/ports/live555/CONTROL new file mode 100644 index 000000000..37048f268 --- /dev/null +++ b/ports/live555/CONTROL @@ -0,0 +1,3 @@ +Source: live555 +Version: 2017.06.04 +Description: A complete RTSP server application diff --git a/ports/live555/UsageEnvironment.txt b/ports/live555/UsageEnvironment.txt new file mode 100644 index 000000000..0e93ec145 --- /dev/null +++ b/ports/live555/UsageEnvironment.txt @@ -0,0 +1,21 @@ +# CMakeLists.txt in UsageEnvironment + +SET(USAGE_ENVIRONMENT_SRCS +HashTable.cpp +strDup.cpp +UsageEnvironment.cpp +) + +SET(USAGE_ENVIRONMENT_HEADERS +include/Boolean.hh +include/HashTable.hh +include/strDup.hh +include/UsageEnvironment.hh +include/UsageEnvironment_version.hh +) + +INCLUDE_DIRECTORIES( +${live555Includes} +) + +ADD_LIBRARY( UsageEnvironment STATIC ${USAGE_ENVIRONMENT_HEADERS} ${USAGE_ENVIRONMENT_SRCS}) diff --git a/ports/live555/groupsock.txt b/ports/live555/groupsock.txt new file mode 100644 index 000000000..c8c795ffa --- /dev/null +++ b/ports/live555/groupsock.txt @@ -0,0 +1,28 @@ +# CMakeLists.txt in groupsock + +SET(GROUPSOCK_SRCS +GroupEId.cpp +Groupsock.cpp +GroupsockHelper.cpp +inet.c +IOHandlers.cpp +NetAddress.cpp +NetInterface.cpp +) + +SET(GROUPSOCK_HEADERS +include/GroupEId.hh +include/Groupsock.hh +include/GroupsockHelper.hh +include/groupsock_version.hh +include/IOHandlers.hh +include/NetAddress.hh +include/NetInterface.hh +include/TunnelEncaps.hh +) + +INCLUDE_DIRECTORIES( +${live555Includes} +) + +ADD_LIBRARY( groupsock STATIC ${GROUPSOCK_HEADERS} ${GROUPSOCK_SRCS}) diff --git a/ports/live555/live.txt b/ports/live555/live.txt new file mode 100644 index 000000000..1bb168407 --- /dev/null +++ b/ports/live555/live.txt @@ -0,0 +1,14 @@ +# CMakeLists.txt in live + +# includes +INCLUDE_DIRECTORIES( +${live555Includes} +) + +ADD_SUBDIRECTORY(BasicUsageEnvironment) +ADD_SUBDIRECTORY(groupsock) +ADD_SUBDIRECTORY(liveMedia) +#ADD_SUBDIRECTORY(mediaServer) +#ADD_SUBDIRECTORY(proxyServer) +ADD_SUBDIRECTORY(UsageEnvironment) +#ADD_SUBDIRECTORY(testProgs) diff --git a/ports/live555/liveMedia.txt b/ports/live555/liveMedia.txt new file mode 100644 index 000000000..067fd5bc0 --- /dev/null +++ b/ports/live555/liveMedia.txt @@ -0,0 +1,331 @@ +# CMakeLists.txt in liveMedia + +SET(LIVE_MEDIA_SRCS +rtcp_from_spec.c +AC3AudioFileServerMediaSubsession.cpp +AC3AudioRTPSink.cpp +AC3AudioRTPSource.cpp +AC3AudioStreamFramer.cpp +ADTSAudioFileServerMediaSubsession.cpp +ADTSAudioFileSource.cpp +AMRAudioFileServerMediaSubsession.cpp +AMRAudioFileSink.cpp +AMRAudioFileSource.cpp +AMRAudioRTPSink.cpp +AMRAudioRTPSource.cpp +AMRAudioSource.cpp +AudioInputDevice.cpp +AudioRTPSink.cpp +AVIFileSink.cpp +Base64.cpp +BasicUDPSink.cpp +BasicUDPSource.cpp +BitVector.cpp +ByteStreamFileSource.cpp +ByteStreamMemoryBufferSource.cpp +ByteStreamMultiFileSource.cpp +#DarwinInjector.cpp +DeviceSource.cpp +DigestAuthentication.cpp +DVVideoFileServerMediaSubsession.cpp +DVVideoRTPSink.cpp +DVVideoRTPSource.cpp +DVVideoStreamFramer.cpp +EBMLNumber.cpp +FileServerMediaSubsession.cpp +FileSink.cpp +FramedFileSource.cpp +FramedFilter.cpp +FramedSource.cpp +GenericMediaServer.cpp +GSMAudioRTPSink.cpp +H261VideoRTPSource.cpp +H263plusVideoFileServerMediaSubsession.cpp +H263plusVideoRTPSink.cpp +H263plusVideoRTPSource.cpp +H263plusVideoStreamFramer.cpp +H263plusVideoStreamParser.cpp +H264or5VideoFileSink.cpp +H264or5VideoRTPSink.cpp +H264or5VideoStreamDiscreteFramer.cpp +H264or5VideoStreamFramer.cpp +H264VideoFileServerMediaSubsession.cpp +H264VideoFileSink.cpp +H264VideoRTPSink.cpp +H264VideoRTPSource.cpp +H264VideoStreamDiscreteFramer.cpp +H264VideoStreamFramer.cpp +H265VideoFileServerMediaSubsession.cpp +H265VideoFileSink.cpp +H265VideoRTPSink.cpp +H265VideoRTPSource.cpp +H265VideoStreamDiscreteFramer.cpp +H265VideoStreamFramer.cpp +InputFile.cpp +JPEGVideoRTPSink.cpp +JPEGVideoRTPSource.cpp +JPEGVideoSource.cpp +Locale.cpp +MatroskaDemuxedTrack.cpp +MatroskaFile.cpp +MatroskaFileParser.cpp +MatroskaFileServerDemux.cpp +MatroskaFileServerMediaSubsession.cpp +Media.cpp +MediaSession.cpp +MediaSink.cpp +MediaSource.cpp +MP3ADU.cpp +MP3ADUdescriptor.cpp +MP3ADUinterleaving.cpp +MP3ADURTPSink.cpp +MP3ADURTPSource.cpp +MP3ADUTranscoder.cpp +MP3AudioFileServerMediaSubsession.cpp +MP3AudioMatroskaFileServerMediaSubsession.cpp +MP3FileSource.cpp +MP3Internals.cpp +MP3InternalsHuffman.cpp +MP3InternalsHuffmanTable.cpp +MP3StreamState.cpp +MP3Transcoder.cpp +MPEG1or2AudioRTPSink.cpp +MPEG1or2AudioRTPSource.cpp +MPEG1or2AudioStreamFramer.cpp +MPEG1or2Demux.cpp +MPEG1or2DemuxedElementaryStream.cpp +MPEG1or2DemuxedServerMediaSubsession.cpp +MPEG1or2FileServerDemux.cpp +MPEG1or2VideoFileServerMediaSubsession.cpp +MPEG1or2VideoRTPSink.cpp +MPEG1or2VideoRTPSource.cpp +MPEG1or2VideoStreamDiscreteFramer.cpp +MPEG1or2VideoStreamFramer.cpp +MPEG2IndexFromTransportStream.cpp +MPEG2TransportFileServerMediaSubsession.cpp +MPEG2TransportStreamFramer.cpp +MPEG2TransportStreamFromESSource.cpp +MPEG2TransportStreamFromPESSource.cpp +MPEG2TransportStreamIndexFile.cpp +MPEG2TransportStreamMultiplexor.cpp +MPEG2TransportStreamTrickModeFilter.cpp +MPEG2TransportUDPServerMediaSubsession.cpp +MPEG4ESVideoRTPSink.cpp +MPEG4ESVideoRTPSource.cpp +MPEG4GenericRTPSink.cpp +MPEG4GenericRTPSource.cpp +MPEG4LATMAudioRTPSink.cpp +MPEG4LATMAudioRTPSource.cpp +MPEG4VideoFileServerMediaSubsession.cpp +MPEG4VideoStreamDiscreteFramer.cpp +MPEG4VideoStreamFramer.cpp +MPEGVideoStreamFramer.cpp +MPEGVideoStreamParser.cpp +MultiFramedRTPSink.cpp +MultiFramedRTPSource.cpp +OggDemuxedTrack.cpp +OggFile.cpp +OggFileParser.cpp +OggFileServerDemux.cpp +OggFileServerMediaSubsession.cpp +OggFileSink.cpp +OnDemandServerMediaSubsession.cpp +ourMD5.cpp +OutputFile.cpp +PassiveServerMediaSubsession.cpp +ProxyServerMediaSession.cpp +QCELPAudioRTPSource.cpp +QuickTimeFileSink.cpp +QuickTimeGenericRTPSource.cpp +RTCP.cpp +RTPInterface.cpp +RTPSink.cpp +RTPSource.cpp +RTSPClient.cpp +RTSPCommon.cpp +RTSPRegisterSender.cpp +RTSPServer.cpp +RTSPServerSupportingHTTPStreaming.cpp +ServerMediaSession.cpp +SimpleRTPSink.cpp +SimpleRTPSource.cpp +SIPClient.cpp +StreamParser.cpp +StreamReplicator.cpp +T140TextRTPSink.cpp +TCPStreamSink.cpp +TextRTPSink.cpp +TheoraVideoRTPSink.cpp +TheoraVideoRTPSource.cpp +uLawAudioFilter.cpp +VideoRTPSink.cpp +VorbisAudioRTPSink.cpp +VorbisAudioRTPSource.cpp +VP8VideoRTPSink.cpp +VP8VideoRTPSource.cpp +VP9VideoRTPSink.cpp +VP9VideoRTPSource.cpp +WAVAudioFileServerMediaSubsession.cpp +WAVAudioFileSource.cpp +) + +SET(LIVE_MEDIA_HEADERS +include/AC3AudioFileServerMediaSubsession.hh +include/AC3AudioRTPSink.hh +include/AC3AudioRTPSource.hh +include/AC3AudioStreamFramer.hh +include/ADTSAudioFileServerMediaSubsession.hh +include/ADTSAudioFileSource.hh +include/AMRAudioFileServerMediaSubsession.hh +include/AMRAudioFileSink.hh +include/AMRAudioFileSource.hh +include/AMRAudioRTPSink.hh +include/AMRAudioRTPSource.hh +include/AMRAudioSource.hh +include/AudioInputDevice.hh +include/AudioRTPSink.hh +include/AVIFileSink.hh +include/Base64.hh +include/BasicUDPSink.hh +include/BasicUDPSource.hh +include/BitVector.hh +include/ByteStreamFileSource.hh +include/ByteStreamMemoryBufferSource.hh +include/ByteStreamMultiFileSource.hh +#include/DarwinInjector.hh +include/DeviceSource.hh +include/DigestAuthentication.hh +include/DVVideoFileServerMediaSubsession.hh +include/DVVideoRTPSink.hh +include/DVVideoRTPSource.hh +include/DVVideoStreamFramer.hh +include/FileServerMediaSubsession.hh +include/FileSink.hh +include/FramedFileSource.hh +include/FramedFilter.hh +include/FramedSource.hh +include/GenericMediaServer.hh +include/GSMAudioRTPSink.hh +include/H261VideoRTPSource.hh +include/H263plusVideoFileServerMediaSubsession.hh +include/H263plusVideoRTPSink.hh +include/H263plusVideoRTPSource.hh +include/H263plusVideoStreamFramer.hh +include/H264or5VideoFileSink.hh +include/H264or5VideoRTPSink.hh +include/H264or5VideoStreamDiscreteFramer.hh +include/H264or5VideoStreamFramer.hh +include/H264VideoFileServerMediaSubsession.hh +include/H264VideoFileSink.hh +include/H264VideoRTPSink.hh +include/H264VideoRTPSource.hh +include/H264VideoStreamDiscreteFramer.hh +include/H264VideoStreamFramer.hh +include/H265VideoFileServerMediaSubsession.hh +include/H265VideoFileSink.hh +include/H265VideoRTPSink.hh +include/H265VideoRTPSource.hh +include/H265VideoStreamDiscreteFramer.hh +include/H265VideoStreamFramer.hh +include/InputFile.hh +include/JPEGVideoRTPSink.hh +include/JPEGVideoRTPSource.hh +include/JPEGVideoSource.hh +include/liveMedia.hh +include/liveMedia_version.hh +include/Locale.hh +include/MatroskaFile.hh +include/MatroskaFileServerDemux.hh +include/Media.hh +include/MediaSession.hh +include/MediaSink.hh +include/MediaSource.hh +include/MediaTranscodingTable.hh +include/MP3ADU.hh +include/MP3ADUinterleaving.hh +include/MP3ADURTPSink.hh +include/MP3ADURTPSource.hh +include/MP3ADUTranscoder.hh +include/MP3AudioFileServerMediaSubsession.hh +include/MP3FileSource.hh +include/MP3Transcoder.hh +include/MPEG1or2AudioRTPSink.hh +include/MPEG1or2AudioRTPSource.hh +include/MPEG1or2AudioStreamFramer.hh +include/MPEG1or2Demux.hh +include/MPEG1or2DemuxedElementaryStream.hh +include/MPEG1or2DemuxedServerMediaSubsession.hh +include/MPEG1or2FileServerDemux.hh +include/MPEG1or2VideoFileServerMediaSubsession.hh +include/MPEG1or2VideoRTPSink.hh +include/MPEG1or2VideoRTPSource.hh +include/MPEG1or2VideoStreamDiscreteFramer.hh +include/MPEG1or2VideoStreamFramer.hh +include/MPEG2IndexFromTransportStream.hh +include/MPEG2TransportFileServerMediaSubsession.hh +include/MPEG2TransportStreamFramer.hh +include/MPEG2TransportStreamFromESSource.hh +include/MPEG2TransportStreamFromPESSource.hh +include/MPEG2TransportStreamIndexFile.hh +include/MPEG2TransportStreamMultiplexor.hh +include/MPEG2TransportStreamTrickModeFilter.hh +include/MPEG2TransportUDPServerMediaSubsession.hh +include/MPEG4ESVideoRTPSink.hh +include/MPEG4ESVideoRTPSource.hh +include/MPEG4GenericRTPSink.hh +include/MPEG4GenericRTPSource.hh +include/MPEG4LATMAudioRTPSink.hh +include/MPEG4LATMAudioRTPSource.hh +include/MPEG4VideoFileServerMediaSubsession.hh +include/MPEG4VideoStreamDiscreteFramer.hh +include/MPEG4VideoStreamFramer.hh +include/MPEGVideoStreamFramer.hh +include/MultiFramedRTPSink.hh +include/MultiFramedRTPSource.hh +include/OggFile.hh +include/OggFileServerDemux.hh +include/OggFileSink.hh +include/OnDemandServerMediaSubsession.hh +include/ourMD5.hh +include/OutputFile.hh +include/PassiveServerMediaSubsession.hh +include/ProxyServerMediaSession.hh +include/QCELPAudioRTPSource.hh +include/QuickTimeFileSink.hh +include/QuickTimeGenericRTPSource.hh +include/RTCP.hh +include/RTPInterface.hh +include/RTPSink.hh +include/RTPSource.hh +include/RTSPClient.hh +include/RTSPCommon.hh +include/RTSPRegisterSender.hh +include/RTSPServer.hh +include/RTSPServerSupportingHTTPStreaming.hh +include/ServerMediaSession.hh +include/SimpleRTPSink.hh +include/SimpleRTPSource.hh +include/SIPClient.hh +include/StreamReplicator.hh +include/T140TextRTPSink.hh +include/TCPStreamSink.hh +include/TextRTPSink.hh +include/TheoraVideoRTPSink.hh +include/TheoraVideoRTPSource.hh +include/uLawAudioFilter.hh +include/VideoRTPSink.hh +include/VorbisAudioRTPSink.hh +include/VorbisAudioRTPSource.hh +include/VP8VideoRTPSink.hh +include/VP8VideoRTPSource.hh +include/VP9VideoRTPSink.hh +include/VP9VideoRTPSource.hh +include/WAVAudioFileServerMediaSubsession.hh +include/WAVAudioFileSource.hh +) + +INCLUDE_DIRECTORIES( +${live555Includes} +) + +ADD_LIBRARY( liveMedia STATIC ${LIVE_MEDIA_HEADERS} ${LIVE_MEDIA_SRCS}) diff --git a/ports/live555/master.txt b/ports/live555/master.txt new file mode 100644 index 000000000..b71c69f68 --- /dev/null +++ b/ports/live555/master.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 2.6) + +PROJECT( live555 C CXX) + +SET(live555Includes +${live555_SOURCE_DIR}/live/BasicUsageEnvironment/include +${live555_SOURCE_DIR}/live/groupsock/include +${live555_SOURCE_DIR}/live/liveMedia/include +${live555_SOURCE_DIR}/live/UsageEnvironment/include +) + +ADD_SUBDIRECTORY( live ) diff --git a/ports/live555/mediaServer.txt b/ports/live555/mediaServer.txt new file mode 100644 index 000000000..1337b8204 --- /dev/null +++ b/ports/live555/mediaServer.txt @@ -0,0 +1,23 @@ +# CMakeLists.txt mediaServer directory + +# headers +SET(MEDIA_SERVER_HDRS +DynamicRTSPServer.hh +) + +# source files for mediaServer +SET(MEDIA_SERVER_SRCS +DynamicRTSPServer.cpp +live555MediaServer.cpp +) + +ADD_EXECUTABLE(mediaServer ${MEDIA_SERVER_HDRS} ${MEDIA_SERVER_SRCS}) +TARGET_LINK_LIBRARIES( +mediaServer +BasicUsageEnvironment +groupsock +liveMedia +UsageEnvironment +ws2_32 +winmm +) diff --git a/ports/live555/portfile.cmake b/ports/live555/portfile.cmake new file mode 100644 index 000000000..7e2fcf14b --- /dev/null +++ b/ports/live555/portfile.cmake @@ -0,0 +1,71 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/live) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.live555.com/liveMedia/public/live.2017.06.04.tar.gz" + FILENAME "live.2017.06.04.tar.gz" + SHA512 89eb3854c2ef7d0a1f443b4ca46c66040dfcc586ffd1e3e08c1b9e831eae6ade1c16e628c0ed0e7804c4e7430993f662e3fe8df2f09903024153d188276c3088 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/master.txt ${CURRENT_BUILDTREES_DIR}/src/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) +vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/live.txt ${CURRENT_BUILDTREES_DIR}/src/live/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) +vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/BasicUsageEnvironment.txt ${CURRENT_BUILDTREES_DIR}/src/live/BasicUsageEnvironment/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) +vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/groupsock.txt ${CURRENT_BUILDTREES_DIR}/src/live/groupsock/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) +vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/liveMedia.txt ${CURRENT_BUILDTREES_DIR}/src/live/liveMedia/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) +vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/mediaServer.txt ${CURRENT_BUILDTREES_DIR}/src/live/mediaServer/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) +vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/proxyServer.txt ${CURRENT_BUILDTREES_DIR}/src/live/proxyServer/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) +vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/testProgs.txt ${CURRENT_BUILDTREES_DIR}/src/live/testProgs/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) +vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/UsageEnvironment.txt ${CURRENT_BUILDTREES_DIR}/src/live/UsageEnvironment/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_build_cmake() + +file(GLOB DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/live/*/Release/*.dll" +) +file(GLOB LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/live/*/Release/*.lib" +) +file(GLOB DEBUG_DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/live/*/Debug/*.dll" +) +file(GLOB DEBUG_LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/live/*/Debug/*.lib" + +) + +file(GLOB HEADERS +"${CURRENT_BUILDTREES_DIR}/src/live/BasicUsageEnvironment/include/*.hh" +"${CURRENT_BUILDTREES_DIR}/src/live/groupsock/include/*.hh" +"${CURRENT_BUILDTREES_DIR}/src/live/liveMedia/include/*.hh" +"${CURRENT_BUILDTREES_DIR}/src/live/UsageEnvironment/include/*.hh" +) +if(DLLS) + file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() +file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/live/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/live555 RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/live555/proxyServer.txt b/ports/live555/proxyServer.txt new file mode 100644 index 000000000..69677848e --- /dev/null +++ b/ports/live555/proxyServer.txt @@ -0,0 +1,17 @@ +# CMakeLists.txt proxyServer directory + +# source files for proxyServer +SET(PROXY_SERVER_SRCS +live555ProxyServer.cpp +) + +ADD_EXECUTABLE(proxyServer ${PROXY_SERVER_SRCS}) +TARGET_LINK_LIBRARIES( +proxyServer +BasicUsageEnvironment +groupsock +liveMedia +UsageEnvironment +ws2_32 +winmm +) diff --git a/ports/live555/testProgs.txt b/ports/live555/testProgs.txt new file mode 100644 index 000000000..ea9307069 --- /dev/null +++ b/ports/live555/testProgs.txt @@ -0,0 +1,114 @@ +# CMakeLists.txt testProgs directory + +# headers +SET(COMMON_HDRS +playCommon.hh +) + +# source files for MediaPreEncoderServer +SET(OPEN_RTSP_SRCS +openRTSP.cpp +playCommon.cpp +) + +SET(PLAY_SIP_SRCS +playCommon.cpp +playSIP.cpp +) + +SET(TEST_AMR_AUDIO_STREAMER_SRCS +testAMRAudioStreamer.cpp +) + +SET(TEST_H264_VIDEO_STREAMER_SRCS +testH264VideoStreamer.cpp +) + +SET(TEST_H265_VIDEO_STREAMER_SRCS +testH265VideoStreamer.cpp +) + +SET(ON_DEMAND_RTSP_SERVER_SRCS +testOnDemandRTSPServer.cpp +) + +SET(TEST_RTSP_CLIENT_SRCS +testRTSPClient.cpp +) + +ADD_EXECUTABLE(openRTSP ${COMMON_HDRS} ${OPEN_RTSP_SRCS}) +TARGET_LINK_LIBRARIES( +openRTSP +BasicUsageEnvironment +groupsock +liveMedia +UsageEnvironment +ws2_32 +winmm +) + +ADD_EXECUTABLE(playSip ${COMMON_HDRS} ${PLAY_SIP_SRCS}) +TARGET_LINK_LIBRARIES( +playSip +BasicUsageEnvironment +groupsock +liveMedia +UsageEnvironment +ws2_32 +winmm +) + +ADD_EXECUTABLE(testAmrAudioStreamer ${COMMON_HDRS} ${TEST_AMR_AUDIO_STREAMER_SRCS}) +TARGET_LINK_LIBRARIES( +testAmrAudioStreamer +BasicUsageEnvironment +groupsock +liveMedia +UsageEnvironment +ws2_32 +winmm +) + +ADD_EXECUTABLE(testH264VideoStreamer ${COMMON_HDRS} ${TEST_H264_VIDEO_STREAMER_SRCS}) +TARGET_LINK_LIBRARIES( +testH264VideoStreamer +BasicUsageEnvironment +groupsock +liveMedia +UsageEnvironment +ws2_32 +winmm +) + +ADD_EXECUTABLE(testH265VideoStreamer ${COMMON_HDRS} ${TEST_H265_VIDEO_STREAMER_SRCS}) +TARGET_LINK_LIBRARIES( +testH265VideoStreamer +BasicUsageEnvironment +groupsock +liveMedia +UsageEnvironment +ws2_32 +winmm +) + +ADD_EXECUTABLE(testOnDemandRTSPServer ${COMMON_HDRS} ${ON_DEMAND_RTSP_SERVER_SRCS}) +TARGET_LINK_LIBRARIES( +testOnDemandRTSPServer +BasicUsageEnvironment +groupsock +liveMedia +UsageEnvironment +ws2_32 +winmm +) + +ADD_EXECUTABLE(testRTSPClient ${COMMON_HDRS} ${TEST_RTSP_CLIENT_SRCS}) +TARGET_LINK_LIBRARIES( +testRTSPClient +BasicUsageEnvironment +groupsock +liveMedia +UsageEnvironment +ws2_32 +winmm +) -- cgit v1.2.3 From b20acde02c540eb23ac266834ac877ca93a60122 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 13 Jun 2017 17:16:51 -0700 Subject: removed testing cmake list --- ports/live555/CMakeLists.txt | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 ports/live555/CMakeLists.txt diff --git a/ports/live555/CMakeLists.txt b/ports/live555/CMakeLists.txt deleted file mode 100644 index cab15c4c6..000000000 --- a/ports/live555/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -cmake_minimum_required(VERSION 2.6) - -PROJECT( live555 ) - -file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/master.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src RENAME CMakeLists.txt) -file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/live.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live RENAME CMakeLists.txt) -file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/BasicUsageEnvironment.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/BasicUsageEnvironment RENAME CMakeLists.txt) -file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/groupsock.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/groupsock RENAME CMakeLists.txt) -file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/liveMedia.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/liveMedia RENAME CMakeLists.txt) -file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/mediaServer.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/mediaServer RENAME CMakeLists.txt) -file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/proxyServer.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/proxyServer RENAME CMakeLists.txt) -file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/testProgs.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/testProgs RENAME CMakeLists.txt) -file(INSTALL ${CMAKE_CURRENT_SOURCE_DIR}/UsageEnvironment.txt DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src/live/UsageEnvironment RENAME CMakeLists.txt) - - -set(BUILD ${CMAKE_CURRENT_SOURCE_DIR}/src/build) - -message(STATUS "${BUILD} is here") -file(MAKE_DIRECTORY ${BUILD}) -execute_process(COMMAND ${CMAKE_COMMAND} .. WORKING_DIRECTORY ${BUILD}) - -execute_process(COMMAND ${CMAKE_COMMAND} --build . WORKING_DIRECTORY ${BUILD}) \ No newline at end of file -- cgit v1.2.3 From d81930ce36e8cd654c976f9e8f09e47036c336b5 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Tue, 13 Jun 2017 17:39:39 -0700 Subject: [beast] Update to version 56 --- ports/beast/CONTROL | 2 +- ports/beast/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL index 9f6ff2ae0..142b40d1e 100644 --- a/ports/beast/CONTROL +++ b/ports/beast/CONTROL @@ -1,4 +1,4 @@ Source: beast -Version: v55 +Version: v56 Build-Depends: boost Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake index a1e92d444..540defe78 100644 --- a/ports/beast/portfile.cmake +++ b/ports/beast/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vinniefalco/Beast - REF fde69298dce9d29c13eac272d34216e972bfb2fc - SHA512 fe39cee7ccfaa36df005fe86c3f2bb5e917974a1c11d5c5ea48e1075b650373c0bca172f7069b5f7dc95e8c3b1425b5dc365b6a9b89eea5f41f6aafacfe352e6 + REF 18c68ceec99697121ec442b35dac6c9587a9566a + SHA512 844acd6543610b17686de5b14631576091336dabdaba0800aa4bba7c6a7d55268cc7bfbcd5337a8a3055011f94cba116bb04ebc2c7e0086b25a63796c2177edd HEAD_REF master ) -- cgit v1.2.3 From 27bb11f6fc0da827190571125b62db8df5c86c68 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Jun 2017 23:04:35 -0700 Subject: [ceres][suitesparse] Bump version --- ports/ceres/CONTROL | 2 +- ports/suitesparse/CONTROL | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL index d8c4c4ec6..4266bbac1 100644 --- a/ports/ceres/CONTROL +++ b/ports/ceres/CONTROL @@ -1,4 +1,4 @@ Source: ceres -Version: 1.12.0 +Version: 1.12.0-1 Build-Depends:suitesparse, eigen3, clapack, gflags, glog Description: non-linear optimization package \ No newline at end of file diff --git a/ports/suitesparse/CONTROL b/ports/suitesparse/CONTROL index a40b4ff24..74491898e 100644 --- a/ports/suitesparse/CONTROL +++ b/ports/suitesparse/CONTROL @@ -1,4 +1,4 @@ Source: suitesparse -Version: 4.5.5 -Build-Depends:metis, clapack +Version: 4.5.5-1 +Build-Depends: metis, clapack Description: algebra library -- cgit v1.2.3 From 795dd722e18d9993bacb53f0e9d22a10b8181fea Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Jun 2017 23:11:45 -0700 Subject: [utfz] Use vcpkg_from_github() --- ports/utfz/portfile.cmake | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ports/utfz/portfile.cmake b/ports/utfz/portfile.cmake index 924e4a4b3..27b5d17c4 100644 --- a/ports/utfz/portfile.cmake +++ b/ports/utfz/portfile.cmake @@ -1,11 +1,12 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/utfz-1.2) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/IMQS/utfz/archive/v1.2.zip" - FILENAME "utfz-1.2.zip" - SHA512 a3bef8f769c7eb15fbd3a4c3c64f2e70666bfd305ad3c24ef676c7f5a428d95fdb8dcfe18cb5bfa072069e9368a29bf375848f9a775e60bec2eae7ffa5662b55 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO IMQS/utfz + REF v1.2 + SHA512 286a7a79fe860df8c5a4e1fc75f56460026fe9fbcd2f0ea3e70ecf78e4c5de73442a008339a90c2bd4ef94d5a89c0ed2fb537b91927f11aaa1aa5876d36a628b + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 50fca8f92acd0e0a6ae082e67d58c59e01a51ad5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Jun 2017 23:43:15 -0700 Subject: [pybind11] Build against python3 library inside vcpkg, add find_acquire_program(PYTHON3) --- ports/pybind11/CONTROL | 5 +++-- ports/pybind11/portfile.cmake | 31 +++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/ports/pybind11/CONTROL b/ports/pybind11/CONTROL index a51fd173c..e5ca37eb4 100644 --- a/ports/pybind11/CONTROL +++ b/ports/pybind11/CONTROL @@ -1,3 +1,4 @@ Source: pybind11 -Version: 2.1.0 -Description: pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. \ No newline at end of file +Version: 2.1.0-1 +Description: pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. +Build-Depends: python3 \ No newline at end of file diff --git a/ports/pybind11/portfile.cmake b/ports/pybind11/portfile.cmake index 933efbd19..668edb5d9 100644 --- a/ports/pybind11/portfile.cmake +++ b/ports/pybind11/portfile.cmake @@ -1,17 +1,32 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pybind11-2.1.0) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/pybind/pybind11/archive/v2.1.0.tar.gz" - FILENAME "pybind11-2.1.0.tar.gz" +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pybind/pybind11 + REF v2.1.0 SHA512 2f74dcd2b82d8e41da7db36351284fe04511038bec66bdde820da9c0fce92f6d2c5aeb2e48264058a91a775a1a6a99bc757d26ebf001de3df4183d700d46efa1 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_find_acquire_program(PYTHON3) + +get_filename_component(PYPATH ${PYTHON3} PATH) +set(ENV{PATH} "$ENV{PATH};${PYPATH}") vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DPYBIND11_TEST=OFF + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPYBIND11_TEST=OFF + -DPYTHONLIBS_FOUND=ON + -DPYTHON_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include + -DPYTHON_MODULE_EXTENSION=.dll + OPTIONS_RELEASE + -DPYTHON_IS_DEBUG=OFF + -DPYTHON_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/python36.lib + OPTIONS_DEBUG + -DPYTHON_IS_DEBUG=ON + -DPYTHON_LIBRARIES=${CURRENT_INSTALLED_DIR}/debug/lib/python36_d.lib ) vcpkg_install_cmake() -- cgit v1.2.3 From 14deb3a440b10776f0e1fb3051cb549c59271220 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 10 Jun 2017 19:00:08 +0200 Subject: [openexr] initial commit --- ports/openexr/CONTROL | 4 +++ ports/openexr/add-missing-export.patch | 13 ++++++++ ports/openexr/portfile.cmake | 54 ++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 ports/openexr/CONTROL create mode 100644 ports/openexr/add-missing-export.patch create mode 100644 ports/openexr/portfile.cmake diff --git a/ports/openexr/CONTROL b/ports/openexr/CONTROL new file mode 100644 index 000000000..1ce905777 --- /dev/null +++ b/ports/openexr/CONTROL @@ -0,0 +1,4 @@ +Source: openexr +Version: 2.2.0 +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, ilmbase diff --git a/ports/openexr/add-missing-export.patch b/ports/openexr/add-missing-export.patch new file mode 100644 index 000000000..c78842d18 --- /dev/null +++ b/ports/openexr/add-missing-export.patch @@ -0,0 +1,13 @@ +diff --git a/IlmImf/ImfHeader.h b/IlmImf/ImfHeader.h +index 756a62e..dd71e0e 100644 +--- a/IlmImf/ImfHeader.h ++++ b/IlmImf/ImfHeader.h +@@ -493,7 +493,7 @@ class Header::ConstIterator + // + //------------------------------------------------------------------------ + +-void staticInitialize (); ++IMF_EXPORT void staticInitialize (); + + + //----------------- diff --git a/ports/openexr/portfile.cmake b/ports/openexr/portfile.cmake new file mode 100644 index 000000000..1bcabc458 --- /dev/null +++ b/ports/openexr/portfile.cmake @@ -0,0 +1,54 @@ +set(OPENEXR_VERSION 2.2.0) +set(OPENEXR_HASH 017abbeeb6b814508180721bc8e8940094965c4c55b135a198c6bcb109a04bf7f72e4aee81ee72cb2185fe818a41d892b383e8d2d59f40c673198948cb79279a) + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openexr-${OPENEXR_VERSION}) +vcpkg_download_distfile(ARCHIVE + URLS "http://download.savannah.nongnu.org/releases/openexr/openexr-${OPENEXR_VERSION}.tar.gz" + FILENAME "openexr-${OPENEXR_VERSION}.zip" + SHA512 ${OPENEXR_HASH}) + +vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-missing-export.patch) + +# Ensure helper executables can run during build +set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin") + +# In debug build buildsystem cannot locate IlmBase headers +set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG}") +set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -I\"${CURRENT_INSTALLED_DIR}/include/OpenExr\"") + +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DILMBASE_PACKAGE_PREFIX=${CURRENT_INSTALLED_DIR}/debug + OPTIONS_RELEASE + -DILMBASE_PACKAGE_PREFIX=${CURRENT_INSTALLED_DIR}) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + foreach(SUBDIR "" "/debug") + file(GLOB DLLS ${CURRENT_PACKAGES_DIR}${SUBDIR}/lib/*.dll) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}${SUBDIR}/bin) + file(REMOVE ${DLLS}) + endforeach() +endif() + +vcpkg_copy_pdbs() + +file(READ ${CURRENT_PACKAGES_DIR}/include/OpenEXR/ImfExport.h HEADER_FILE) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "defined(OPENEXR_DLL)" "1" HEADER_FILE "${HEADER_FILE}") +else() + string(REPLACE "defined(OPENEXR_DLL)" "0" HEADER_FILE "${HEADER_FILE}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/OpenEXR/ImfExport.h "${HEADER_FILE}") + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openexr) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/openexr/LICENSE ${CURRENT_PACKAGES_DIR}/share/openexr/copyright) -- cgit v1.2.3 From a051d0cb8aa5a80c06809e8d0839fd7353fab945 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 11 Jun 2017 00:29:50 +0200 Subject: [freeimage] use vcpkg-provided openexr --- ports/freeimage/CMakeLists.txt | 34 ++--------------------- ports/freeimage/CONTROL | 4 +-- ports/freeimage/FreeImageConfig-dynamic.h | 1 + ports/freeimage/cmake/FindOpenEXR.cmake | 28 +++++++++++++++++++ ports/freeimage/portfile.cmake | 3 +- ports/freeimage/use-external-openexr.patch | 44 ++++++++++++++++++++++++++++++ 6 files changed, 80 insertions(+), 34 deletions(-) create mode 100644 ports/freeimage/cmake/FindOpenEXR.cmake create mode 100644 ports/freeimage/use-external-openexr.patch diff --git a/ports/freeimage/CMakeLists.txt b/ports/freeimage/CMakeLists.txt index 1cafdd880..f385f508c 100644 --- a/ports/freeimage/CMakeLists.txt +++ b/ports/freeimage/CMakeLists.txt @@ -16,6 +16,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) find_package(WEBP REQUIRED) find_package(JXR REQUIRED) find_package(LibRaw REQUIRED) +find_package(OpenEXR REQUIRED) option(BUILD_SHARED_LIBS "Build shared libraries" ON) option(INSTALL_HEADERS "Install the development headers" ON) @@ -24,35 +25,6 @@ set(REAL_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Source) # Add a debug postfix set(CMAKE_DEBUG_POSTFIX "d") - -# For now the internal copy of OpenEXR is used (as a private always static library) -file(GLOB OPENEXR_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/OpenEXR/Half/*.h - ${REAL_SOURCE_DIR}/OpenEXR/Iex/*.h - ${REAL_SOURCE_DIR}/OpenEXR/IexMath/*.h - ${REAL_SOURCE_DIR}/OpenEXR/IlmImf/*.h - ${REAL_SOURCE_DIR}/OpenEXR/IlmThread/*.h - ${REAL_SOURCE_DIR}/OpenEXR/Imath/*.h - ${REAL_SOURCE_DIR}/OpenEXR/*.h) - -file(GLOB OPENEXR_SRCS ${REAL_SOURCE_DIR}/OpenEXR/Half/*.cpp - ${REAL_SOURCE_DIR}/OpenEXR/Iex/*.cpp - ${REAL_SOURCE_DIR}/OpenEXR/IexMath/*.cpp - ${REAL_SOURCE_DIR}/OpenEXR/IlmImf/*.cpp - ${REAL_SOURCE_DIR}/OpenEXR/IlmThread/*.cpp - ${REAL_SOURCE_DIR}/OpenEXR/Imath/*.cpp) - -add_library(FreeImage_Private_OpenEXR STATIC ${OPENEXR_PRIVATE_HEADERS} ${OPENEXR_SRCS}) - -set(FreeImage_Private_OpenEXR_INCLUDE_DIRS ${REAL_SOURCE_DIR}/OpenEXR - ${REAL_SOURCE_DIR}/OpenEXR/Half - ${REAL_SOURCE_DIR}/OpenEXR/Iex - ${REAL_SOURCE_DIR}/OpenEXR/IexMath - ${REAL_SOURCE_DIR}/OpenEXR/IlmImf - ${REAL_SOURCE_DIR}/OpenEXR/IlmThread - ${REAL_SOURCE_DIR}/OpenEXR/Imath) - -target_include_directories(FreeImage_Private_OpenEXR PRIVATE ${FreeImage_Private_OpenEXR_INCLUDE_DIRS} - ${ZLIB_INCLUDE_DIRS}) # List the public header files set(PUBLIC_HEADERS ${REAL_SOURCE_DIR}/FreeImage.h) @@ -124,7 +96,7 @@ target_include_directories(FreeImage PRIVATE ${REAL_SOURCE_DIR} ${WEBP_INCLUDE_DIRS} ${JXR_INCLUDE_DIRS} ${LibRaw_INCLUDE_DIRS} - ${FreeImage_Private_OpenEXR_INCLUDE_DIRS} + ${OpenEXR_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) @@ -136,7 +108,7 @@ target_link_libraries(FreeImage ${ZLIB_LIBRARIES} ${WEBP_LIBRARIES} ${JXR_LIBRARIES} ${LibRaw_LIBRARIES} - FreeImage_Private_OpenEXR) + ${OpenEXR_LIBRARIES}) target_compile_definitions(FreeImage PRIVATE ${PNG_DEFINITIONS}) diff --git a/ports/freeimage/CONTROL b/ports/freeimage/CONTROL index 9eb197b10..2d9fa1523 100644 --- a/ports/freeimage/CONTROL +++ b/ports/freeimage/CONTROL @@ -1,4 +1,4 @@ Source: freeimage -Version: 3.17.0-1 -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp, libraw, jxrlib +Version: 3.17.0-2 +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp, libraw, jxrlib, openexr Description: Support library for graphics image formats diff --git a/ports/freeimage/FreeImageConfig-dynamic.h b/ports/freeimage/FreeImageConfig-dynamic.h index d87b65b4c..41dcf57d9 100644 --- a/ports/freeimage/FreeImageConfig-dynamic.h +++ b/ports/freeimage/FreeImageConfig-dynamic.h @@ -1,5 +1,6 @@ #ifndef FREEIMAGE_CONFIG_H #define FREEIMAGE_CONFIG_H +#undef FREEIMAGE_LIB #endif diff --git a/ports/freeimage/cmake/FindOpenEXR.cmake b/ports/freeimage/cmake/FindOpenEXR.cmake new file mode 100644 index 000000000..beca25145 --- /dev/null +++ b/ports/freeimage/cmake/FindOpenEXR.cmake @@ -0,0 +1,28 @@ +find_path(OpenEXR_INCLUDE_DIRS OpenEXR/OpenEXRConfig.h) + +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}") + +find_library(OpenEXR_LIBRARY IlmImf-${OpenEXR_LIB_SUFFIX}) +find_library(OpenEXR_UTIL_LIBRARY IlmImfUtil-${OpenEXR_LIB_SUFFIX}) + +find_library(OpenEXR_HALF_LIBRARY Half) +find_library(OpenEXR_IEX_LIBRARY Iex-${OpenEXR_LIB_SUFFIX}) +find_library(OpenEXR_THREAD_LIBRARY IlmThread-${OpenEXR_LIB_SUFFIX}) +find_library(OpenEXR_IEXMATH_LIBRARY IexMath-${OpenEXR_LIB_SUFFIX}) +find_library(OpenEXR_MATH_LIBRARY Imath-${OpenEXR_LIB_SUFFIX}) + +set(OpenEXR_LIBRARIES + ${OpenEXR_LIBRARY} + ${OpenEXR_MATH_LIBRARY} + ${OpenEXR_IEXMATH_LIBRARY} + ${OpenEXR_UTIL_LIBRARY} + ${OpenEXR_HALF_LIBRARY} + ${OpenEXR_IEX_LIBRARY} + ${OpenEXR_THREAD_LIBRARY}) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR REQUIRED_VARS OpenEXR_LIBRARIES OpenEXR_INCLUDE_DIRS) diff --git a/ports/freeimage/portfile.cmake b/ports/freeimage/portfile.cmake index e48782bf0..db8d2537a 100644 --- a/ports/freeimage/portfile.cmake +++ b/ports/freeimage/portfile.cmake @@ -18,7 +18,6 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH}) # This is not strictly necessary, but to make sure # that no "internal" libraries are used by removing them -# Note that the only "internal" dependency used is OpenEXR file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibJPEG) file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibPNG) file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibTIFF4) @@ -27,6 +26,7 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibOpenJPEG) file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibJXR) file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibWebP) file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibRawLite) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/OpenEXR) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} @@ -38,6 +38,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/use-external-png-zlib.patch" "${CMAKE_CURRENT_LIST_DIR}/use-external-rawlib.patch" "${CMAKE_CURRENT_LIST_DIR}/use-external-webp.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-openexr.patch" "${CMAKE_CURRENT_LIST_DIR}/use-freeimage-config-include.patch" ) diff --git a/ports/freeimage/use-external-openexr.patch b/ports/freeimage/use-external-openexr.patch new file mode 100644 index 000000000..08915da72 --- /dev/null +++ b/ports/freeimage/use-external-openexr.patch @@ -0,0 +1,44 @@ +diff --git a/Source/FreeImage/PluginEXR.cpp b/Source/FreeImage/PluginEXR.cpp +index b286430..82b3b72 100644 +--- a/Source/FreeImage/PluginEXR.cpp ++++ b/Source/FreeImage/PluginEXR.cpp +@@ -28,16 +28,16 @@ + #pragma warning (disable : 4800) // ImfVersion.h - 'const int' : forcing value to bool 'true' or 'false' (performance warning) + #endif + +-#include "../OpenEXR/IlmImf/ImfIO.h" +-#include "../OpenEXR/Iex/Iex.h" +-#include "../OpenEXR/IlmImf/ImfOutputFile.h" +-#include "../OpenEXR/IlmImf/ImfInputFile.h" +-#include "../OpenEXR/IlmImf/ImfRgbaFile.h" +-#include "../OpenEXR/IlmImf/ImfChannelList.h" +-#include "../OpenEXR/IlmImf/ImfRgba.h" +-#include "../OpenEXR/IlmImf/ImfArray.h" +-#include "../OpenEXR/IlmImf/ImfPreviewImage.h" +-#include "../OpenEXR/Half/half.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + + // ========================================================== +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index 562fdd7..ce12649 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -39,7 +39,7 @@ + #include "Utilities.h" + #include + #include "../Metadata/FreeImageTag.h" +-#include "../OpenEXR/Half/half.h" ++#include + + #include "FreeImageIO.h" + #include "PSDParser.h" -- cgit v1.2.3 From 2d79c53fb985153de00d1ccbb3465602889c6dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20T=C3=A4schner?= Date: Wed, 14 Jun 2017 08:05:50 +0200 Subject: [cairo] Initialize mutexes. --- ports/cairo/CONTROL | 2 +- .../Initialize-mutexes-for-static-builds-for-win32.patch | 16 ++++++++++++++++ ports/cairo/portfile.cmake | 5 +++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 ports/cairo/Initialize-mutexes-for-static-builds-for-win32.patch diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index 0cad79902..b03290e9e 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,4 +1,4 @@ Source: cairo -Version: 1.15.4-2 +Version: 1.15.4-3 Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig diff --git a/ports/cairo/Initialize-mutexes-for-static-builds-for-win32.patch b/ports/cairo/Initialize-mutexes-for-static-builds-for-win32.patch new file mode 100644 index 000000000..420d91e28 --- /dev/null +++ b/ports/cairo/Initialize-mutexes-for-static-builds-for-win32.patch @@ -0,0 +1,16 @@ + src/win32/cairo-win32-device.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/win32/cairo-win32-device.c b/src/win32/cairo-win32-device.c +index 741e49e..c60c494 100644 +--- a/src/win32/cairo-win32-device.c ++++ b/src/win32/cairo-win32-device.c +@@ -131,6 +131,8 @@ _cairo_win32_device_get (void) + { + cairo_win32_device_t *device; + ++ CAIRO_MUTEX_INITIALIZE (); ++ + if (__cairo_win32_device) + return cairo_device_reference (__cairo_win32_device); + diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index a15649627..7e6e02155 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -15,6 +15,11 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/Initialize-mutexes-for-static-builds-for-win32.patch" +) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_cairo.txt DESTINATION ${SOURCE_PATH}/src) file(RENAME ${SOURCE_PATH}/src/CMakeLists_cairo.txt ${SOURCE_PATH}/src/CMakeLists.txt) -- cgit v1.2.3 From 2752e690b9230e8078d0688f0b9830874d0662df Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 15 Jun 2017 00:55:26 +0200 Subject: [fmt] update to 3.0.2 --- ports/fmt/CONTROL | 2 +- ports/fmt/portfile.cmake | 26 ++++++++------------------ 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL index 4e980b4d5..e5749ab1f 100644 --- a/ports/fmt/CONTROL +++ b/ports/fmt/CONTROL @@ -1,3 +1,3 @@ Source: fmt -Version: 3.0.1-4 +Version: 3.0.2 Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams. diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake index 959a0ebe7..49728fbe0 100644 --- a/ports/fmt/portfile.cmake +++ b/ports/fmt/portfile.cmake @@ -1,15 +1,11 @@ -#if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) -# message(STATUS "Warning: Dynamic building not supported yet. Building static.") -# set(VCPKG_LIBRARY_LINKAGE static) -#endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fmt-3.0.1) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://github.com/fmtlib/fmt/archive/3.0.1.tar.gz" - FILENAME "fmt-3.0.1.tar.gz" - SHA512 daf5dfb2fe63eb611983fa248bd2182c6202cf1c4f0fc236f357040fce8e87ad531cdf59090306bb313ea333d546e516f467b385e05094e696d0ca091310aad6 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fmtlib/fmt + REF 3.0.2 + SHA512 50f5a25d1a10fd5b265f3811fa11886b9efdae2952f2aefc9f22c87c1a748128369f4d530b320e5e9c67c745cdab4607d1cb08940f4cf968300dee22e1150117 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -18,10 +14,8 @@ vcpkg_configure_cmake( -DFMT_CMAKE_DIR=share/fmt -DFMT_TEST=OFF -DFMT_DOC=OFF - -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ) - vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE.rst DESTINATION ${CURRENT_PACKAGES_DIR}/share/fmt RENAME copyright) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -36,12 +30,8 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(WRITE ${CURRENT_PACKAGES_DIR}/include/fmt/format.h "${FMT_FORMAT_H}") endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -#file(REMOVE ${CURRENT_PACKAGES_DIR}/include/fmt/format.cc) -#file(REMOVE ${CURRENT_PACKAGES_DIR}/include/fmt/ostream.cc) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share/fmt/fmt-targets-debug.cmake ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake) -file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake FMT_DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" FMT_DEBUG_MODULE "${FMT_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake "${FMT_DEBUG_MODULE}") + +vcpkg_fixup_cmake_targets() file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake FMT_DEBUG_MODULE) string(REPLACE "lib/fmt.dll" "bin/fmt.dll" FMT_DEBUG_MODULE ${FMT_DEBUG_MODULE}) -- cgit v1.2.3 From e24f83aed10aca9014c75e203f99695eda8d3610 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 15 Jun 2017 08:30:22 +0900 Subject: Fix typo of template Fix typo of portfile template. --- scripts/templates/portfile.in.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake index 2ea430453..bc5f5fe07 100644 --- a/scripts/templates/portfile.in.cmake +++ b/scripts/templates/portfile.in.cmake @@ -1,7 +1,7 @@ # 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} +# 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) -- cgit v1.2.3 From 2b08a3bf21e8c0eb05a3d8616961cb2d138c88c9 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 14 Jun 2017 20:41:19 -0700 Subject: [beast] update to version 57 --- ports/beast/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake index 540defe78..7f73d1483 100644 --- a/ports/beast/portfile.cmake +++ b/ports/beast/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vinniefalco/Beast - REF 18c68ceec99697121ec442b35dac6c9587a9566a - SHA512 844acd6543610b17686de5b14631576091336dabdaba0800aa4bba7c6a7d55268cc7bfbcd5337a8a3055011f94cba116bb04ebc2c7e0086b25a63796c2177edd + REF 8ba182cb2e0d073724be170cb64cd3d9226f161f + SHA512 e8f776aaac1f79f40cc06df0abc76e68da4aa502a66fe0b8a1a51f7c8d1245ee9fe4b767e398415f582b6f79df00711b91c60b688c574a06794e7c860a1775dc HEAD_REF master ) -- cgit v1.2.3 From 687440f9760f3b9492de9a3105cdd6b99f9a3634 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 14 Jun 2017 22:06:52 -0700 Subject: [vcpkg] Add additional debug messages --- toolsrc/src/vcpkg_System.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 21329e003..c91c6be78 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -142,6 +142,7 @@ namespace vcpkg::System const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s 2>&1")###", cmd_line); + Debug::println("_wpopen(%s)", Strings::to_utf8(actual_cmd_line)); std::string output; char buf[1024]; auto pipe = _wpopen(actual_cmd_line.c_str(), L"r"); @@ -158,6 +159,7 @@ namespace vcpkg::System return {1, output}; } auto ec = _pclose(pipe); + Debug::println("_wpopen() returned %d", ec); return {ec, output}; } -- cgit v1.2.3 From d1841f11c72560b8689a33f05457ed5e5e6ec1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Thu, 15 Jun 2017 13:09:44 +0200 Subject: Update Catch to 1.9.5 --- ports/catch/CONTROL | 2 +- ports/catch/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/catch/CONTROL b/ports/catch/CONTROL index 4c9626863..883643ad5 100644 --- a/ports/catch/CONTROL +++ b/ports/catch/CONTROL @@ -1,3 +1,3 @@ Source: catch -Version: 1.9.4 +Version: 1.9.5 Description: C++ Automated Test Cases in Headers diff --git a/ports/catch/portfile.cmake b/ports/catch/portfile.cmake index 670c51fbc..2fae419b0 100644 --- a/ports/catch/portfile.cmake +++ b/ports/catch/portfile.cmake @@ -10,13 +10,13 @@ include(vcpkg_common_functions) vcpkg_download_distfile(HEADER - URLS "https://github.com/philsquared/Catch/releases/download/v1.9.4/catch.hpp" + URLS "https://github.com/philsquared/Catch/releases/download/v1.9.5/catch.hpp" FILENAME "catch.hpp" - SHA512 efbb5086d1eff393cf7997cd51f7b42d43cf744425f1abab91f3fb84524e98f9e0fef22d6725c2f5a1fe89965035d2ea5ea6e005abcf85a747953cf0101c9407 + SHA512 4e5dc6959903282c90c7e7981238248072c7f5d4083ccfcd62ca8db494bed46cbd280624d1bafaf2221ca02e7877a4cc319f1adee06dfaeee9da3757b7a7ba56 ) vcpkg_download_distfile(LICENSE - URLS "https://raw.githubusercontent.com/philsquared/Catch/v1.9.4/LICENSE.txt" + URLS "https://raw.githubusercontent.com/philsquared/Catch/v1.9.5/LICENSE.txt" FILENAME "LICENSE.txt" SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 ) -- cgit v1.2.3 From d1c32d241f8c06dc7169ea43070032229b2a7eb0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 15 Jun 2017 10:18:14 -0700 Subject: [catch] Rename downloaded files to not conflict with older versions or other ports --- ports/catch/CONTROL | 2 +- ports/catch/portfile.cmake | 24 ++++++++---------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/ports/catch/CONTROL b/ports/catch/CONTROL index 883643ad5..cce74b299 100644 --- a/ports/catch/CONTROL +++ b/ports/catch/CONTROL @@ -1,3 +1,3 @@ Source: catch -Version: 1.9.5 +Version: 1.9.5-1 Description: C++ Automated Test Cases in Headers diff --git a/ports/catch/portfile.cmake b/ports/catch/portfile.cmake index 2fae419b0..d3cd5a2bb 100644 --- a/ports/catch/portfile.cmake +++ b/ports/catch/portfile.cmake @@ -1,26 +1,18 @@ -# 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} -# - -#header-only library include(vcpkg_common_functions) +set(CATCH_VERSION v1.9.5) + vcpkg_download_distfile(HEADER - URLS "https://github.com/philsquared/Catch/releases/download/v1.9.5/catch.hpp" - FILENAME "catch.hpp" + URLS "https://github.com/philsquared/Catch/releases/download/${CATCH_VERSION}/catch.hpp" + FILENAME "catch-${CATCH_VERSION}.hpp" SHA512 4e5dc6959903282c90c7e7981238248072c7f5d4083ccfcd62ca8db494bed46cbd280624d1bafaf2221ca02e7877a4cc319f1adee06dfaeee9da3757b7a7ba56 ) vcpkg_download_distfile(LICENSE - URLS "https://raw.githubusercontent.com/philsquared/Catch/v1.9.5/LICENSE.txt" - FILENAME "LICENSE.txt" + URLS "https://raw.githubusercontent.com/philsquared/Catch/${CATCH_VERSION}/LICENSE.txt" + FILENAME "catch-LICENSE-${CATCH_VERSION}.txt" SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 ) -file(COPY ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include ) -file(COPY ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch ) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/catch/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/catch/copyright) +file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME catch.hpp) +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch RENAME copyright) -- cgit v1.2.3 From 7b9275f1b35e6533dc63d1f1dd7b61066216e3f1 Mon Sep 17 00:00:00 2001 From: sigman Date: Thu, 15 Jun 2017 17:49:43 +0300 Subject: [corrade][magnum][magnum-plugins] Updated to upstream, enabled more features in [magnum] Removed plugin location defines. Fixed tools search path in FindCorrade, FindMagnum cmake modules. --- ports/corrade/CONTROL | 2 +- ports/corrade/portfile.cmake | 4 ++-- ports/magnum-plugins/001-fix-include.patch | 12 ------------ ports/magnum-plugins/001-tools-path.patch | 26 ++++++++++++++++++++++++++ ports/magnum-plugins/CONTROL | 2 +- ports/magnum-plugins/portfile.cmake | 7 ++++--- ports/magnum/002-magnum-defs.patch | 26 -------------------------- ports/magnum/002-tools-path.patch | 26 ++++++++++++++++++++++++++ ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 30 +++++++++++++++++++++++++++--- 10 files changed, 88 insertions(+), 49 deletions(-) delete mode 100644 ports/magnum-plugins/001-fix-include.patch create mode 100644 ports/magnum-plugins/001-tools-path.patch delete mode 100644 ports/magnum/002-magnum-defs.patch create mode 100644 ports/magnum/002-tools-path.patch diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL index 748d0c61a..d8fb3681a 100644 --- a/ports/corrade/CONTROL +++ b/ports/corrade/CONTROL @@ -1,3 +1,3 @@ Source: corrade -Version: jun2017-1 +Version: jun2017-2 Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 113d24dc7..3ae3710f6 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/corrade - REF b87c50db3543367b6eb20dc72246c6687449b029 - SHA512 882ccba210c6db7dc8a70e425e1cc119dd1c1a880b8b7d36b2c9478a2105294294680495e7bafb8c0bc7f667bd247dbd008e8ff133a8ea26b13df781a8896297 + REF c182fe636894a998f241212d0205d0c126b7926f + SHA512 e62486368eab9c5f90ef9f4af91500f465d9e3baa6e5f6e9f2a49844d09676faefcb965a9d5b27a54eda19436af6b23dcda19504be6cd0dcd52dfad2ad4bfa21 HEAD_REF master ) diff --git a/ports/magnum-plugins/001-fix-include.patch b/ports/magnum-plugins/001-fix-include.patch deleted file mode 100644 index c6aa9c755..000000000 --- a/ports/magnum-plugins/001-fix-include.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp b/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp -index c94ee98..843d1ec 100644 ---- a/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp -+++ b/src/MagnumPlugins/OpenGexImporter/OpenDdl/OpenDdl.cpp -@@ -25,6 +25,7 @@ - - #include - #include -+#include - #include - - #include "MagnumPlugins/OpenGexImporter/OpenDdl/Document.h" diff --git a/ports/magnum-plugins/001-tools-path.patch b/ports/magnum-plugins/001-tools-path.patch new file mode 100644 index 000000000..18a351c2e --- /dev/null +++ b/ports/magnum-plugins/001-tools-path.patch @@ -0,0 +1,26 @@ +diff --git a/modules/FindCorrade.cmake b/modules/FindCorrade.cmake +index e63bc03..052006f 100644 +--- a/modules/FindCorrade.cmake ++++ b/modules/FindCorrade.cmake +@@ -397,7 +397,7 @@ foreach(_component ${Corrade_FIND_COMPONENTS}) + if(_component MATCHES ${_CORRADE_EXECUTABLE_COMPONENTS}) + add_executable(Corrade::${_component} IMPORTED) + +- find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component}) ++ find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component} PATH_SUFFIXES corrade) + mark_as_advanced(CORRADE_${_COMPONENT}_EXECUTABLE) + + if(CORRADE_${_COMPONENT}_EXECUTABLE) +diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake +index 8df555d..12f7aa4 100644 +--- a/modules/FindMagnum.cmake ++++ b/modules/FindMagnum.cmake +@@ -493,7 +493,7 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) + if(_component MATCHES ${_MAGNUM_EXECUTABLE_COMPONENTS}) + add_executable(Magnum::${_component} IMPORTED) + +- find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component}) ++ find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component} PATH_SUFFIXES magnum) + mark_as_advanced(MAGNUM_${_COMPONENT}_EXECUTABLE) + + if(MAGNUM_${_COMPONENT}_EXECUTABLE) diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 087383c4a..9d684689a 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017-2 +Version: jun2017-3 Build-Depends: stb, magnum Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index dde435ee4..0fe8f83a1 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -2,14 +2,15 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-plugins - REF 645b50647d5164c5ec8f5bc83ba2578f6cfe7d80 - SHA512 73c7fb7e9a5a9e2a4ee7314b5d41d98ada9cf1a50c1cd833c2ae19c5bdab66862f3696f142e987f9d2b551142e94f96a2d8ccad37625682c8391400091dcf879 + REF 34a3bc34335ca05097e735db19fe1fae81dbfbb5 + SHA512 918c3eeae246d1ac67e3595c50ff599872a0c1498e9a8a0386ad656f3d9d2209b048b53c25f198660e15201147795578c5c931b00116da46fd77d8e91c0826cb HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-include.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-tools-path.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) diff --git a/ports/magnum/002-magnum-defs.patch b/ports/magnum/002-magnum-defs.patch deleted file mode 100644 index de7d1cb10..000000000 --- a/ports/magnum/002-magnum-defs.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/Magnum/configure.h.cmake b/src/Magnum/configure.h.cmake -index 6a752d4..cd1277b 100644 ---- a/src/Magnum/configure.h.cmake -+++ b/src/Magnum/configure.h.cmake -@@ -35,4 +35,23 @@ - #cmakedefine MAGNUM_TARGET_WEBGL - #cmakedefine MAGNUM_TARGET_HEADLESS - -+// Plugin directories -+#ifdef _DEBUG -+#define MAGNUM_PLUGINS_DIR "${MAGNUM_PLUGINS_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR}" -+#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_DIR}" -+#else -+#define MAGNUM_PLUGINS_DIR "${MAGNUM_PLUGINS_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_FONT_DIR "${MAGNUM_PLUGINS_FONT_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_FONTCONVERTER_DIR "${MAGNUM_PLUGINS_FONTCONVERTER_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_IMAGECONVERTER_DIR "${MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_RELEASE_DIR}" -+#define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_DIR}" -+#endif -+ - #endif diff --git a/ports/magnum/002-tools-path.patch b/ports/magnum/002-tools-path.patch new file mode 100644 index 000000000..18a351c2e --- /dev/null +++ b/ports/magnum/002-tools-path.patch @@ -0,0 +1,26 @@ +diff --git a/modules/FindCorrade.cmake b/modules/FindCorrade.cmake +index e63bc03..052006f 100644 +--- a/modules/FindCorrade.cmake ++++ b/modules/FindCorrade.cmake +@@ -397,7 +397,7 @@ foreach(_component ${Corrade_FIND_COMPONENTS}) + if(_component MATCHES ${_CORRADE_EXECUTABLE_COMPONENTS}) + add_executable(Corrade::${_component} IMPORTED) + +- find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component}) ++ find_program(CORRADE_${_COMPONENT}_EXECUTABLE corrade-${_component} PATH_SUFFIXES corrade) + mark_as_advanced(CORRADE_${_COMPONENT}_EXECUTABLE) + + if(CORRADE_${_COMPONENT}_EXECUTABLE) +diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake +index 8df555d..12f7aa4 100644 +--- a/modules/FindMagnum.cmake ++++ b/modules/FindMagnum.cmake +@@ -493,7 +493,7 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) + if(_component MATCHES ${_MAGNUM_EXECUTABLE_COMPONENTS}) + add_executable(Magnum::${_component} IMPORTED) + +- find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component}) ++ find_program(MAGNUM_${_COMPONENT}_EXECUTABLE magnum-${_component} PATH_SUFFIXES magnum) + mark_as_advanced(MAGNUM_${_COMPONENT}_EXECUTABLE) + + if(MAGNUM_${_COMPONENT}_EXECUTABLE) diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 9160e2287..9245e4380 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-3 +Version: jun2017-4 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 3aed5a737..14d5e0846 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum - REF c8416ca4c3e9b68ba62acc9f73de235526cb3d6e - SHA512 d595be48ae44d944d5747880e0108bdc445b92fcc306f0169699e2b80500919647063ac88ef67491b2d8e92ae1f0612cd8768fc63d8cc4ffe4c625988b63504d + REF ed7eac0b42a598dff8984830e7f943dd6af07deb + SHA512 843e209b82b4f6f7c3f9612aec2641a28cb09361eefefe435bb7d2c06d0e4df65b6b9adf5893222cf31ddc3ccec967eb343da1da6180e9fbfef1b26234e145d5 HEAD_REF master ) @@ -11,7 +11,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch - ${CMAKE_CURRENT_LIST_DIR}/002-magnum-defs.patch + ${CMAKE_CURRENT_LIST_DIR}/002-tools-path.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -25,15 +25,39 @@ vcpkg_configure_cmake( PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DWITH_SDL2APPLICATION=ON + -DWITH_WINDOWLESSWGLAPPLICATION=ON + -DWITH_WGLCONTEXT=ON + -DWITH_OPENGLTESTER=ON -DWITH_AUDIO=ON -DWITH_WAVAUDIOIMPORTER=ON + -DWITH_MAGNUMFONT=ON + -DWITH_MAGNUMFONTCONVERTER=ON + -DWITH_OBJIMPORTER=ON + -DWITH_TGAIMPORTER=ON + -DWITH_DISTANCEFIELDCONVERTER=ON + -DWITH_FONTCONVERTER=ON + -DWITH_TGAIMAGECONVERTER=ON -DBUILD_STATIC=${BUILD_STATIC} -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum + --trace ) vcpkg_install_cmake() +# Drop a copy of tools +file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-distancefieldconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) +file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-fontconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) + +# Tools require dlls +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/magnum) + +file(GLOB_RECURSE TO_REMOVE + ${CURRENT_PACKAGES_DIR}/bin/*.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE ${TO_REMOVE}) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -- cgit v1.2.3 From 517b3fabbbb713d7483a62f71446623d80d04e97 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 15 Jun 2017 12:52:19 -0700 Subject: [beast] Update to version 58 --- ports/beast/CONTROL | 2 +- ports/beast/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL index 142b40d1e..170be13df 100644 --- a/ports/beast/CONTROL +++ b/ports/beast/CONTROL @@ -1,4 +1,4 @@ Source: beast -Version: v56 +Version: v58 Build-Depends: boost Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake index 7f73d1483..36e91bed7 100644 --- a/ports/beast/portfile.cmake +++ b/ports/beast/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vinniefalco/Beast - REF 8ba182cb2e0d073724be170cb64cd3d9226f161f - SHA512 e8f776aaac1f79f40cc06df0abc76e68da4aa502a66fe0b8a1a51f7c8d1245ee9fe4b767e398415f582b6f79df00711b91c60b688c574a06794e7c860a1775dc + REF 3f8097b6fddce8463084ce5c0d69db9a9079c2b8 + SHA512 843cc0ddea35987e4f5eeaabcbcf3317135979eec9645a324740afa2a0af5041af787ee05e14d55d2ce17c72e227eacbadbe87c49e1bb6d7a0b075ad9694d92d HEAD_REF master ) -- cgit v1.2.3 From e3e89d166307e02211606771289ec8d9e4574c01 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 15 Jun 2017 13:04:24 -0700 Subject: [nuklea] new port #1291 --- ports/nuklear/CONTROL | 3 +++ ports/nuklear/portfile.cmake | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 ports/nuklear/CONTROL create mode 100644 ports/nuklear/portfile.cmake diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL new file mode 100644 index 000000000..45dab49d2 --- /dev/null +++ b/ports/nuklear/CONTROL @@ -0,0 +1,3 @@ +Source: nuklear +Version: 2017-06-15-5c7194c2fe2c68c1a8212712c0b4b6195382d27d +Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake new file mode 100644 index 000000000..907d8d2a9 --- /dev/null +++ b/ports/nuklear/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vurtun/nuklear + REF 5c7194c2fe2c68c1a8212712c0b4b6195382d27d + SHA512 85d8255071fb42d0a521d8d34ac579dbaa5800e96d156fa42e4ee971f1d92ea51ef3a69a166f03f3cf66b086c452892cc29457bbe4aea599c918649e87e84c38 + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/Readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/nuklear RENAME copyright) +vcpkg_copy_pdbs() -- cgit v1.2.3 From e8b87926911d99b41620d88f9f61ed540cc488ef Mon Sep 17 00:00:00 2001 From: Sean Li Date: Fri, 16 Jun 2017 15:52:59 +0800 Subject: flann: Add compilation of dll and flann_cpp. --- ports/flann/CONTROL | 2 +- ports/flann/fix-install-flann.patch | 41 ------------------------------------- ports/flann/portfile.cmake | 39 ++++++++++------------------------- 3 files changed, 12 insertions(+), 70 deletions(-) delete mode 100644 ports/flann/fix-install-flann.patch diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL index a4a5c4ddc..5cedc1833 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,3 +1,3 @@ Source: flann Version: 1.9.1 -Description: performing fast approximate nearest neighbor searches in high dimensional spaces +Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flann/fix-install-flann.patch b/ports/flann/fix-install-flann.patch deleted file mode 100644 index f65094e8f..000000000 --- a/ports/flann/fix-install-flann.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git "a/src/cpp/CMakeLists.txt" "b/src/cpp/CMakeLists.txt" -index 49c53f0..cc58c90 100644 ---- "a/src/cpp/CMakeLists.txt" -+++ "b/src/cpp/CMakeLists.txt" -@@ -87,7 +87,7 @@ if (BUILD_C_BINDINGS) - 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}) -+ add_library(flann ${C_SOURCES}) - - if(MINGW AND OPENMP_FOUND) - target_link_libraries(flann gomp) -@@ -111,12 +111,12 @@ endif() - endif(WIN32) - - --install ( -- TARGETS flann_cpp flann_cpp_s -- RUNTIME DESTINATION bin -- LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} -- ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} --) -+#install ( -+# TARGETS flann_cpp flann_cpp_s -+# RUNTIME DESTINATION bin -+# LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} -+# ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} -+#) - - if (BUILD_CUDA_LIB) - install ( -@@ -129,7 +129,7 @@ endif() - - if (BUILD_C_BINDINGS) - install ( -- TARGETS flann flann_s -+ TARGETS flann - 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 4a87365c0..cf4e6fc49 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -11,41 +11,24 @@ # include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO mariusmuja/flann - REF 1.9.1 - SHA512 0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7 -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-flann.patch" +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flann-1.9.1) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/mariusmuja/flann/archive/1.9.1.zip" + FILENAME "flann-1.9.1.zip" + SHA512 d2f5c13535a179800602dc8a94ee91da23b01f71bc893facdf91ab18a73c5738604cda9870f38c3797af75ded47c808b1d95d3bde707af814e1eb1388b56bb95 ) +vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - #PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS - -DBUILD_EXAMPLES=OFF - -DBUILD_PYTHON_BINDINGS=OFF - -DBUILD_MATLAB_BINDINGS=OFF - -DBUILD_DOC=OFF - - OPTIONS_RELEASE - -DFLANN_LIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib - - OPTIONS_DEBUG - -DFLANN_LIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib - + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DBUILD_EXAMPLES=OFF -DBUILD_DOC=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_MATLAB_BINDINGS=OFF ) vcpkg_install_cmake() -#clean file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - + # Handle copyright -file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/flann/README.md ${CURRENT_PACKAGES_DIR}/share/flann/copyright) \ No newline at end of file +file(COPY ${CURRENT_BUILDTREES_DIR}/src/flann-1.9.1/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/flann/COPYING ${CURRENT_PACKAGES_DIR}/share/flann/copyright) -- cgit v1.2.3 From c626675abb963d15f5d290a56005556d95b160bd Mon Sep 17 00:00:00 2001 From: Sean Li Date: Fri, 16 Jun 2017 17:16:10 +0800 Subject: Remove dll for static build. --- ports/flann/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index cf4e6fc49..46d8d70ab 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -29,6 +29,10 @@ 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() + # Handle copyright file(COPY ${CURRENT_BUILDTREES_DIR}/src/flann-1.9.1/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann) file(RENAME ${CURRENT_PACKAGES_DIR}/share/flann/COPYING ${CURRENT_PACKAGES_DIR}/share/flann/copyright) -- cgit v1.2.3 From 45cc143b2628b70e33f19676a7ca14ff681e5e97 Mon Sep 17 00:00:00 2001 From: Sean Li Date: Fri, 16 Jun 2017 22:23:37 +0800 Subject: Add WINDOWS_EXPORT_ALL_SYMBOLS property to flann_cpp only. --- ports/flann/CONTROL | 2 +- ports/flann/export-all-symbols-of-flann-cpp.patch | 12 ++++++++++++ ports/flann/portfile.cmake | 11 ++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 ports/flann/export-all-symbols-of-flann-cpp.patch diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL index 5cedc1833..f8d71978d 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,3 +1,3 @@ Source: flann -Version: 1.9.1 +Version: 1.9.1-1 Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flann/export-all-symbols-of-flann-cpp.patch b/ports/flann/export-all-symbols-of-flann-cpp.patch new file mode 100644 index 000000000..86f172ff3 --- /dev/null +++ b/ports/flann/export-all-symbols-of-flann-cpp.patch @@ -0,0 +1,12 @@ +diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt +index 49c53f0..b9cf76b 100644 +--- a/src/cpp/CMakeLists.txt ++++ b/src/cpp/CMakeLists.txt +@@ -52,6 +52,7 @@ set_target_properties(flann_cpp PROPERTIES + VERSION ${FLANN_VERSION} + SOVERSION ${FLANN_SOVERSION} + DEFINE_SYMBOL FLANN_EXPORTS ++ WINDOWS_EXPORT_ALL_SYMBOLS ON + ) + + if (BUILD_CUDA_LIB) diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index 46d8d70ab..b9b518591 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -19,10 +19,19 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/export-all-symbols-of-flann-cpp.patch" +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DBUILD_EXAMPLES=OFF -DBUILD_DOC=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_MATLAB_BINDINGS=OFF + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_DOC=OFF + -DBUILD_PYTHON_BINDINGS=OFF + -DBUILD_MATLAB_BINDINGS=OFF ) vcpkg_install_cmake() -- cgit v1.2.3 From 8f013f811f644b439c2d47510c002f3cc5576c43 Mon Sep 17 00:00:00 2001 From: Sean Li Date: Fri, 16 Jun 2017 22:34:40 +0800 Subject: Remove import libraries in static build. --- ports/flann/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index b9b518591..667374b7d 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -40,6 +40,8 @@ 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) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp.lib) endif() # Handle copyright -- cgit v1.2.3 From ce7d0d3743ddda3cc2e6fe158930c474312ab91c Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 16 Jun 2017 09:23:09 -0700 Subject: [beast] Update to version 59 --- ports/beast/CONTROL | 2 +- ports/beast/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL index 170be13df..78bf70edc 100644 --- a/ports/beast/CONTROL +++ b/ports/beast/CONTROL @@ -1,4 +1,4 @@ Source: beast -Version: v58 +Version: v59 Build-Depends: boost Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake index 36e91bed7..0cb76c053 100644 --- a/ports/beast/portfile.cmake +++ b/ports/beast/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vinniefalco/Beast - REF 3f8097b6fddce8463084ce5c0d69db9a9079c2b8 - SHA512 843cc0ddea35987e4f5eeaabcbcf3317135979eec9645a324740afa2a0af5041af787ee05e14d55d2ce17c72e227eacbadbe87c49e1bb6d7a0b075ad9694d92d + REF 4e4bcf8b1114229713eec0cf5fd392e5bdd76717 + SHA512 514b93dccd483b1b847d9274f8a6fe9f4c32fdae6e1c45410abd3bb3554fa901aac8d6fc666a76420e1c4fa729e2ce7f95afa459faf01614de41995040eeb7bb HEAD_REF master ) -- cgit v1.2.3 From 3c80824f8586902a39a411e19135dbabc16a7835 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 16 Jun 2017 12:00:00 -0700 Subject: [jansson] new port required by #1122 --- ports/jansson/CONTROL | 3 +++ ports/jansson/portfile.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 ports/jansson/CONTROL create mode 100644 ports/jansson/portfile.cmake diff --git a/ports/jansson/CONTROL b/ports/jansson/CONTROL new file mode 100644 index 000000000..c14e7d7d8 --- /dev/null +++ b/ports/jansson/CONTROL @@ -0,0 +1,3 @@ +Source: jansson +Version: v2.10 +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 new file mode 100644 index 000000000..33dc9021c --- /dev/null +++ b/ports/jansson/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO akheron/jansson + REF v2.10 + SHA512 0859c8a29c1cb7e406d3eb369285500e98ee23677e3a6af6cd81511c57a6aa8dbabe4a8c7b673a3000203b68f74d84786817aec76cb1e85af217268159bda4b6 + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(JANSSON_STATIC_CRT ON) +else() + set(JANSSON_STATIC_CRT OFF) +endif() + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DJANSSON_STATIC_CRT=${JANSSON_STATIC_CRT} + -DJANSSON_EXAMPLES=OFF + -DJANSSON_WITHOUT_TESTS=OFF + -DJANSSON_BUILD_SHARED_LIBS=ON +) + + +vcpkg_install_cmake(DISABLE_PARALLEL) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jansson RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + + +vcpkg_copy_pdbs() -- cgit v1.2.3 From beda0c38321cca1f78dfa5ca4fedc06897e725ee Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 16 Jun 2017 15:19:20 -0700 Subject: [cunit] new port required by #1122 --- ports/cunit/CMakeLists.txt | 42 +++++++++++++++++++++++++++++++++ ports/cunit/CONTROL | 3 +++ ports/cunit/portfile.cmake | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 ports/cunit/CMakeLists.txt create mode 100644 ports/cunit/CONTROL create mode 100644 ports/cunit/portfile.cmake diff --git a/ports/cunit/CMakeLists.txt b/ports/cunit/CMakeLists.txt new file mode 100644 index 000000000..0de2e3b30 --- /dev/null +++ b/ports/cunit/CMakeLists.txt @@ -0,0 +1,42 @@ +cmake_minimum_required (VERSION 3.8.0) +project (libcunit C CXX) +set(CMAKE_CXX_STANDARD 11) + + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +set(HEADERS_DIR "${PROJECT_SOURCE_DIR}/CUnit/Headers") +set(SOURCES_DIR "${PROJECT_SOURCE_DIR}/CUnit/Sources") +set(EXAMPLES_DIR "${PROJECT_SOURCE_DIR}/Examples") + +configure_file( + "${HEADERS_DIR}/CUnit.h.in" + "${PROJECT_BINARY_DIR}/CUnit.h" +) +include_directories("${PROJECT_BINARY_DIR}") +include_directories(${HEADERS_DIR}) +include_directories(${EXAMPLES_DIR}) + +file(GLOB TARGET_SRC + "${SOURCES_DIR}/Automated/Automated.c" + "${SOURCES_DIR}/Basic/Basic.c" + "${SOURCES_DIR}/Console/Console.c" + "${SOURCES_DIR}/Framework/CUError.c" + "${SOURCES_DIR}/Framework/MyMem.c" + "${SOURCES_DIR}/Framework/TestDB.c" + "${SOURCES_DIR}/Framework/TestRun.c" + "${SOURCES_DIR}/Framework/Util.c" +) + +add_library(libcunit SHARED ${TARGET_SRC}) + +if (MSVC) + add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4005 /wd4996 /nologo /DCU_BUILD_DLL /DCU_DLL" ) +endif() + +add_executable(AutomatedTest ${EXAMPLES_DIR}/AutomatedTest/AutomatedTest.c "${EXAMPLES_DIR}/ExampleTests.c") +add_executable(BasicTest ${EXAMPLES_DIR}/BasicTest/BasicTest.c "${EXAMPLES_DIR}/ExampleTests.c") +add_executable(ConsoleTest ${EXAMPLES_DIR}/ConsoleTest/ConsoleTest.c "${EXAMPLES_DIR}/ExampleTests.c") + +target_link_libraries(AutomatedTest libcunit) +target_link_libraries(BasicTest libcunit) +target_link_libraries(ConsoleTest libcunit) diff --git a/ports/cunit/CONTROL b/ports/cunit/CONTROL new file mode 100644 index 000000000..6f2b56cf7 --- /dev/null +++ b/ports/cunit/CONTROL @@ -0,0 +1,3 @@ +Source: cunit +Version: 2.1.3 +Description: CUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces diff --git a/ports/cunit/portfile.cmake b/ports/cunit/portfile.cmake new file mode 100644 index 000000000..0e1955efa --- /dev/null +++ b/ports/cunit/portfile.cmake @@ -0,0 +1,58 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CUnit-2.1-3) +vcpkg_download_distfile(ARCHIVE + URLS "http://downloads.sourceforge.net/project/cunit/CUnit/2.1-3/CUnit-2.1-3.tar.bz2" + FILENAME "CUnit-2.1-3.tar.bz2" + SHA512 547b417109332446dfab8fda17bf4ccd2da841dc93f824dc90a20635bcf1fb80fb2176500d8a0906940f3f3d3e2f77b2d70a71090c9ab84ad9af43f3582bc487 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_build_cmake() + +file(GLOB HEADERS "${SOURCE_PATH}/CUnit/Headers/*.h") +file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/cunit) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cunit RENAME copyright) + + +file(GLOB DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" +) +file(GLOB LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" +) +file(GLOB DEBUG_DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" +) +file(GLOB DEBUG_LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" +) + +if(DLLS) + file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() +file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +vcpkg_copy_pdbs() -- cgit v1.2.3 From f22475aad9b5380a55375697c077146d0212e5b8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 16 Jun 2017 20:02:18 -0700 Subject: [cunit] Refactor CMake to perform proper installation --- ports/cunit/CMakeLists.txt | 48 +++++++++++++++++++++++++++++++--------------- ports/cunit/CONTROL | 2 +- ports/cunit/portfile.cmake | 43 ++++------------------------------------- 3 files changed, 38 insertions(+), 55 deletions(-) diff --git a/ports/cunit/CMakeLists.txt b/ports/cunit/CMakeLists.txt index 0de2e3b30..21d212751 100644 --- a/ports/cunit/CMakeLists.txt +++ b/ports/cunit/CMakeLists.txt @@ -1,22 +1,31 @@ cmake_minimum_required (VERSION 3.8.0) -project (libcunit C CXX) -set(CMAKE_CXX_STANDARD 11) +project (libcunit C) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set(HEADERS_DIR "${PROJECT_SOURCE_DIR}/CUnit/Headers") set(SOURCES_DIR "${PROJECT_SOURCE_DIR}/CUnit/Sources") set(EXAMPLES_DIR "${PROJECT_SOURCE_DIR}/Examples") +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 -D_CRT_SECURE_NO_WARNINGS) +endif() + configure_file( "${HEADERS_DIR}/CUnit.h.in" "${PROJECT_BINARY_DIR}/CUnit.h" ) + +file(READ "${PROJECT_BINARY_DIR}/CUnit.h" CUNIT_H) +if (BUILD_SHARED_LIBS) + string(REPLACE "ifdef CU_DLL" "if 1" CUNIT_H "${CUNIT_H}") +else() + string(REPLACE "ifdef CU_DLL" "if 0" CUNIT_H "${CUNIT_H}") +endif() +file(WRITE "${PROJECT_BINARY_DIR}/CUnit.h" "${CUNIT_H}") + include_directories("${PROJECT_BINARY_DIR}") include_directories(${HEADERS_DIR}) -include_directories(${EXAMPLES_DIR}) -file(GLOB TARGET_SRC +add_library(libcunit "${SOURCES_DIR}/Automated/Automated.c" "${SOURCES_DIR}/Basic/Basic.c" "${SOURCES_DIR}/Console/Console.c" @@ -26,17 +35,26 @@ file(GLOB TARGET_SRC "${SOURCES_DIR}/Framework/TestRun.c" "${SOURCES_DIR}/Framework/Util.c" ) +target_compile_definitions(libcunit PRIVATE -DCU_BUILD_DLL) -add_library(libcunit SHARED ${TARGET_SRC}) +if(BUILD_EXAMPLES) + include_directories(${EXAMPLES_DIR}) + add_executable(AutomatedTest ${EXAMPLES_DIR}/AutomatedTest/AutomatedTest.c "${EXAMPLES_DIR}/ExampleTests.c") + add_executable(BasicTest ${EXAMPLES_DIR}/BasicTest/BasicTest.c "${EXAMPLES_DIR}/ExampleTests.c") + add_executable(ConsoleTest ${EXAMPLES_DIR}/ConsoleTest/ConsoleTest.c "${EXAMPLES_DIR}/ExampleTests.c") -if (MSVC) - add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4005 /wd4996 /nologo /DCU_BUILD_DLL /DCU_DLL" ) + target_link_libraries(AutomatedTest libcunit) + target_link_libraries(BasicTest libcunit) + target_link_libraries(ConsoleTest libcunit) endif() -add_executable(AutomatedTest ${EXAMPLES_DIR}/AutomatedTest/AutomatedTest.c "${EXAMPLES_DIR}/ExampleTests.c") -add_executable(BasicTest ${EXAMPLES_DIR}/BasicTest/BasicTest.c "${EXAMPLES_DIR}/ExampleTests.c") -add_executable(ConsoleTest ${EXAMPLES_DIR}/ConsoleTest/ConsoleTest.c "${EXAMPLES_DIR}/ExampleTests.c") +install( + TARGETS libcunit + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) -target_link_libraries(AutomatedTest libcunit) -target_link_libraries(BasicTest libcunit) -target_link_libraries(ConsoleTest libcunit) +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY "${HEADERS_DIR}/" DESTINATION include/cunit FILES_MATCHING PATTERN "*.h") +endif() \ No newline at end of file diff --git a/ports/cunit/CONTROL b/ports/cunit/CONTROL index 6f2b56cf7..3ef430092 100644 --- a/ports/cunit/CONTROL +++ b/ports/cunit/CONTROL @@ -1,3 +1,3 @@ Source: cunit -Version: 2.1.3 +Version: 2.1.3-1 Description: CUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces diff --git a/ports/cunit/portfile.cmake b/ports/cunit/portfile.cmake index 0e1955efa..7e4a977af 100644 --- a/ports/cunit/portfile.cmake +++ b/ports/cunit/portfile.cmake @@ -8,51 +8,16 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) - +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_build_cmake() +vcpkg_install_cmake() -file(GLOB HEADERS "${SOURCE_PATH}/CUnit/Headers/*.h") -file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/cunit) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cunit RENAME copyright) - -file(GLOB DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" -) -file(GLOB LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" -) -file(GLOB DEBUG_DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" -) -file(GLOB DEBUG_LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" -) - -if(DLLS) - file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -endif() -file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() -file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() vcpkg_copy_pdbs() -- cgit v1.2.3 From 47909aff3ed07f28ab0ccb23ec69a8908048fc7a Mon Sep 17 00:00:00 2001 From: Sean Li Date: Sat, 17 Jun 2017 11:05:52 +0800 Subject: Substitue vcpkg_from_github for vcpkg_download_distfile. --- ports/flann/portfile.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index 667374b7d..bbc47eb05 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -11,13 +11,13 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flann-1.9.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mariusmuja/flann/archive/1.9.1.zip" - FILENAME "flann-1.9.1.zip" - SHA512 d2f5c13535a179800602dc8a94ee91da23b01f71bc893facdf91ab18a73c5738604cda9870f38c3797af75ded47c808b1d95d3bde707af814e1eb1388b56bb95 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mariusmuja/flann + REF 1.9.1 + SHA512 0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7 ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} @@ -45,5 +45,5 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() # Handle copyright -file(COPY ${CURRENT_BUILDTREES_DIR}/src/flann-1.9.1/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann) file(RENAME ${CURRENT_PACKAGES_DIR}/share/flann/COPYING ${CURRENT_PACKAGES_DIR}/share/flann/copyright) -- cgit v1.2.3 From 5c5affcc2928a611ccbefc1fe37d6bc66720a33c Mon Sep 17 00:00:00 2001 From: Sean Li Date: Sat, 17 Jun 2017 12:09:44 +0800 Subject: Revert previous patch rather than deleting it. --- ports/flann/Revert-fix-install-flann.patch | 41 ++++++++++++++++++++++++++++++ ports/flann/fix-install-flann.patch | 41 ++++++++++++++++++++++++++++++ ports/flann/portfile.cmake | 5 +++- 3 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 ports/flann/Revert-fix-install-flann.patch create mode 100644 ports/flann/fix-install-flann.patch diff --git a/ports/flann/Revert-fix-install-flann.patch b/ports/flann/Revert-fix-install-flann.patch new file mode 100644 index 000000000..ace1b592a --- /dev/null +++ b/ports/flann/Revert-fix-install-flann.patch @@ -0,0 +1,41 @@ +diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt +index cc58c90..49c53f0 100644 +--- a/src/cpp/CMakeLists.txt ++++ b/src/cpp/CMakeLists.txt +@@ -87,7 +87,7 @@ if (BUILD_C_BINDINGS) + 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 ${C_SOURCES}) ++ add_library(flann SHARED ${C_SOURCES}) + + if(MINGW AND OPENMP_FOUND) + target_link_libraries(flann gomp) +@@ -111,12 +111,12 @@ endif() + endif(WIN32) + + +-#install ( +-# TARGETS flann_cpp flann_cpp_s +-# RUNTIME DESTINATION bin +-# LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} +-# ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} +-#) ++install ( ++ TARGETS flann_cpp flann_cpp_s ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} ++ ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} ++) + + if (BUILD_CUDA_LIB) + install ( +@@ -129,7 +129,7 @@ endif() + + if (BUILD_C_BINDINGS) + install ( +- TARGETS flann ++ TARGETS flann flann_s + RUNTIME DESTINATION bin + LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} diff --git a/ports/flann/fix-install-flann.patch b/ports/flann/fix-install-flann.patch new file mode 100644 index 000000000..f65094e8f --- /dev/null +++ b/ports/flann/fix-install-flann.patch @@ -0,0 +1,41 @@ +diff --git "a/src/cpp/CMakeLists.txt" "b/src/cpp/CMakeLists.txt" +index 49c53f0..cc58c90 100644 +--- "a/src/cpp/CMakeLists.txt" ++++ "b/src/cpp/CMakeLists.txt" +@@ -87,7 +87,7 @@ if (BUILD_C_BINDINGS) + 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}) ++ add_library(flann ${C_SOURCES}) + + if(MINGW AND OPENMP_FOUND) + target_link_libraries(flann gomp) +@@ -111,12 +111,12 @@ endif() + endif(WIN32) + + +-install ( +- TARGETS flann_cpp flann_cpp_s +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} +- ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} +-) ++#install ( ++# TARGETS flann_cpp flann_cpp_s ++# RUNTIME DESTINATION bin ++# LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} ++# ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} ++#) + + if (BUILD_CUDA_LIB) + install ( +@@ -129,7 +129,7 @@ endif() + + if (BUILD_C_BINDINGS) + install ( +- TARGETS flann flann_s ++ TARGETS flann + 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 bbc47eb05..03367f9ca 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -21,7 +21,10 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/export-all-symbols-of-flann-cpp.patch" + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-install-flann.patch + ${CMAKE_CURRENT_LIST_DIR}/Revert-fix-install-flann.patch + ${CMAKE_CURRENT_LIST_DIR}/export-all-symbols-of-flann-cpp.patch ) vcpkg_configure_cmake( -- cgit v1.2.3 From 89b9b8ed34fd2da493665d2515ff418efb378b9a Mon Sep 17 00:00:00 2001 From: Sean Li Date: Sat, 17 Jun 2017 12:14:29 +0800 Subject: Remove static lib for dynamic build. --- ports/flann/portfile.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index 03367f9ca..52be7aa24 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -45,6 +45,9 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp.lib) +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp_s.lib) endif() # Handle copyright -- cgit v1.2.3 From 525d30d256f67a86ed6497b80c659106fcb84521 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 16 Jun 2017 21:43:00 -0700 Subject: [flann] Add HEAD_REF, rename static libs to appear dynamic --- ports/flann/CONTROL | 2 +- ports/flann/portfile.cmake | 20 +++++++------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL index f8d71978d..41a18ae62 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,3 +1,3 @@ Source: flann -Version: 1.9.1-1 +Version: 1.9.1-2 Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index 52be7aa24..96f2af0e3 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/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_from_github( @@ -17,6 +5,7 @@ vcpkg_from_github( REPO mariusmuja/flann REF 1.9.1 SHA512 0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7 + HEAD_REF master ) vcpkg_apply_patches( @@ -29,7 +18,7 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja + PREFER_NINJA OPTIONS -DBUILD_EXAMPLES=OFF -DBUILD_DOC=OFF @@ -45,6 +34,11 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp.lib) + # Rename static libs to appear dynamic + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp.lib) elseif(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp_s.lib) -- cgit v1.2.3 From 84a7ec41150f6b2094995b4d206e1008f6c6c1c2 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 18 Jun 2017 17:52:32 +0100 Subject: [libzip] Add libzip port, version 1.2.0 libzip does not have support for static builds, therefore a large amount of hack patching was required to build both a static and share variant. --- ports/libzip/CONTROL | 4 ++ ports/libzip/LICENSE | 66 +++++++++++++++++++++++++++ ports/libzip/enable-static.patch | 99 ++++++++++++++++++++++++++++++++++++++++ ports/libzip/portfile.cmake | 47 +++++++++++++++++++ 4 files changed, 216 insertions(+) create mode 100644 ports/libzip/CONTROL create mode 100644 ports/libzip/LICENSE create mode 100644 ports/libzip/enable-static.patch create mode 100644 ports/libzip/portfile.cmake diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL new file mode 100644 index 000000000..d5fd1042e --- /dev/null +++ b/ports/libzip/CONTROL @@ -0,0 +1,4 @@ +Source: libzip +Version: 1.2.0 +Build-Depends: zlib +Description: A library for reading, creating, and modifying zip archives. diff --git a/ports/libzip/LICENSE b/ports/libzip/LICENSE new file mode 100644 index 000000000..1c2e86bf2 --- /dev/null +++ b/ports/libzip/LICENSE @@ -0,0 +1,66 @@ +Copyright (C) 1999-2016 Dieter Baron and Thomas Klausner + +The authors can be contacted at + +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. The names of the authors may not be used to endorse or promote + products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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 AUTHORS 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. + + + +For AES encryption support, files under the following license are used: + +--------------------------------------------------------------------------- +Copyright (c) 2002, Dr Brian Gladman < >, Worcester, UK. +All rights reserved. + +LICENSE TERMS + +The free distribution and use of this software in both source and binary +form is allowed (with or without changes) provided that: + + 1. distributions of this source code include the above copyright + notice, this list of conditions and the following disclaimer; + + 2. distributions in binary form include the above copyright + notice, this list of conditions and the following disclaimer + in the documentation and/or other associated materials; + + 3. the copyright holder's name is not used to endorse products + built using this software without specific written permission. + +ALTERNATIVELY, provided that this notice is retained in full, this product +may be distributed under the terms of the GNU General Public License (GPL), +in which case the provisions of the GPL apply INSTEAD OF those given above. + +DISCLAIMER + +This software is provided 'as is' with no explicit or implied warranties +in respect of its properties, including, but not limited to, correctness +and/or fitness for purpose. +--------------------------------------------------------------------------- +Issue Date: 18th November 2008 diff --git a/ports/libzip/enable-static.patch b/ports/libzip/enable-static.patch new file mode 100644 index 000000000..d95b90f3d --- /dev/null +++ b/ports/libzip/enable-static.patch @@ -0,0 +1,99 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d443757..303dfe2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -102,14 +102,20 @@ IF(MSVC) + ADD_DEFINITIONS("-D_CRT_SECURE_NO_WARNINGS") + ENDIF(MSVC) + ++OPTION(ENABLE_STATIC "Enable static builds" OFF) ++IF(ENABLE_STATIC) ++ set(ZIP_EXTERN_OVERRIDE ON) ++ set(ZIP_EXTERN ON) ++ENDIF(ENABLE_STATIC) ++ + ADD_DEFINITIONS("-DHAVE_CONFIG_H") + + # Targets + ADD_SUBDIRECTORY(lib) +-ADD_SUBDIRECTORY(man) +-ADD_SUBDIRECTORY(src) +-ADD_SUBDIRECTORY(regress) +-ADD_SUBDIRECTORY(examples) ++# ADD_SUBDIRECTORY(man) ++# ADD_SUBDIRECTORY(src) ++# ADD_SUBDIRECTORY(regress) ++# ADD_SUBDIRECTORY(examples) + + # TODO: pkgconfig file + +diff --git a/cmake-zipconf.h.in b/cmake-zipconf.h.in +index 17edc6c..ac9c394 100644 +--- a/cmake-zipconf.h.in ++++ b/cmake-zipconf.h.in +@@ -118,4 +118,10 @@ typedef unsigned long long zip_uint64_t; + #define ZIP_INT64_MAX 0x7fffffffffffffffLL + #define ZIP_UINT64_MAX 0xffffffffffffffffULL + ++#cmakedefine ZIP_EXTERN_OVERRIDE ++#ifdef ZIP_EXTERN_OVERRIDE ++#undef ZIP_EXTERN ++#cmakedefine ZIP_EXTERN ++#endif ++ + #endif /* zipconf.h */ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 1596f30..eb55fc0 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -191,19 +191,20 @@ IF(NOT HAVE_MKSTEMP) + SET(LIBZIP_EXTRA_FILES mkstemp.c) + ENDIF(NOT HAVE_MKSTEMP) + +-ADD_LIBRARY(zip SHARED ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPSYS_FILES}) +-SET_TARGET_PROPERTIES(zip PROPERTIES VERSION 3.0 SOVERSION 3 ) +-TARGET_LINK_LIBRARIES(zip ${ZLIB_LIBRARY}) +-INSTALL(TARGETS zip +- RUNTIME DESTINATION bin +- ARCHIVE DESTINATION lib +- LIBRARY DESTINATION lib) +-#CREATE_LIBTOOL_FILE(zip lib) +- +-#ADD_LIBRARY(zipstatic STATIC ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPSYS_FILES}) +-#SET_TARGET_PROPERTIES(zipstatic PROPERTIES VERSION 3.0 SOVERSION 3 ) +-#TARGET_LINK_LIBRARIES(zipstatic ${ZLIB_LIBRARY}) +-#INSTALL(TARGETS zipstatic +-# RUNTIME DESTINATION bin +-# ARCHIVE DESTINATION lib +-# LIBRARY DESTINATION lib) ++IF(ENABLE_STATIC) ++ ADD_LIBRARY(zipstatic STATIC ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPSYS_FILES}) ++ SET_TARGET_PROPERTIES(zipstatic PROPERTIES VERSION 3.0 SOVERSION 3 ) ++ TARGET_LINK_LIBRARIES(zipstatic ${ZLIB_LIBRARY}) ++ INSTALL(TARGETS zipstatic ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib) ++ELSE(ENABLE_STATIC) ++ ADD_LIBRARY(zip SHARED ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPSYS_FILES}) ++ SET_TARGET_PROPERTIES(zip PROPERTIES VERSION 3.0 SOVERSION 3 ) ++ TARGET_LINK_LIBRARIES(zip ${ZLIB_LIBRARY}) ++ INSTALL(TARGETS zip ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib) ++ENDIF(ENABLE_STATIC) +diff --git a/lib/compat.h b/lib/compat.h +index 4c9e3a0..d667fe3 100644 +--- a/lib/compat.h ++++ b/lib/compat.h +@@ -42,7 +42,9 @@ + #define __STDC_LIMIT_MACROS + + #ifdef _WIN32 ++#ifndef ZIP_EXTERN_OVERRIDE + #define ZIP_EXTERN __declspec(dllexport) ++#endif + /* for dup(), close(), etc. */ + #include + #endif diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake new file mode 100644 index 000000000..62a0ddd22 --- /dev/null +++ b/ports/libzip/portfile.cmake @@ -0,0 +1,47 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libzip-1.2.0) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "https://nih.at/libzip/libzip-1.2.0.tar.gz" + FILENAME "libzip-1.2.0.tar.gz" + SHA512 b71642a80f8e2573c9082d513018bfd2d1d155663ac83fdf7ec969a08d5230fcbc76f2cf89c26ff1d1288e9f407ba9fa234604d813ed3bab816ca1670f7a53f3 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +# Patch cmake and configuration to allow static builds +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/enable-static.patch" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DENABLE_STATIC=OFF + ) +else() + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DENABLE_STATIC=ON + ) +endif() + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/zip.dll ${CURRENT_PACKAGES_DIR}/debug/bin/zipd.dll) +else() + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/zipstatic.lib ${CURRENT_PACKAGES_DIR}/lib/zip.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/zipstatic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zipd.lib) +endif() + +# Move zipconf.h to include and remove include directories from lib +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libzip/include/zipconf.h ${CURRENT_PACKAGES_DIR}/include/zipconf.h) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libzip ${CURRENT_PACKAGES_DIR}/debug/lib/libzip) + +# Remove debug include +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Copy copright information +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libzip RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 23c718eeb234ea7453599089575f822de1e39811 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Tue, 20 Jun 2017 03:15:25 +0900 Subject: Add OpenNI2 port Add OpenNI2 port --- ports/openni2/CONTROL | 3 + ports/openni2/disable_kinect.patch | 40 + ports/openni2/portfile.cmake | 241 ++++++ ports/openni2/upgrade_projects.patch | 1584 ++++++++++++++++++++++++++++++++++ 4 files changed, 1868 insertions(+) create mode 100644 ports/openni2/CONTROL create mode 100644 ports/openni2/disable_kinect.patch create mode 100644 ports/openni2/portfile.cmake create mode 100644 ports/openni2/upgrade_projects.patch diff --git a/ports/openni2/CONTROL b/ports/openni2/CONTROL new file mode 100644 index 000000000..5dca7646a --- /dev/null +++ b/ports/openni2/CONTROL @@ -0,0 +1,3 @@ +Source: openni2 +Version: 2.2.0.33 +Description: OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera. diff --git a/ports/openni2/disable_kinect.patch b/ports/openni2/disable_kinect.patch new file mode 100644 index 000000000..593ca079a --- /dev/null +++ b/ports/openni2/disable_kinect.patch @@ -0,0 +1,40 @@ +diff --git a/OpenNI.sln b/OpenNI.sln +index 9af176a..3786850 100644 +--- a/OpenNI.sln ++++ b/OpenNI.sln +@@ -86,12 +86,6 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Install", "Packaging\Instal + {5B74F010-8B79-46B5-B906-C2B56CDB3386} = {5B74F010-8B79-46B5-B906-C2B56CDB3386} + {D5709FB9-909D-415F-8F86-2F25BEF6CE23} = {D5709FB9-909D-415F-8F86-2F25BEF6CE23} + {1723CBBA-8EE7-439A-93FB-2E94B4DB2E63} = {1723CBBA-8EE7-439A-93FB-2E94B4DB2E63} +- {E636BACA-795F-41CF-BC52-14C727BF014E} = {E636BACA-795F-41CF-BC52-14C727BF014E} +- EndProjectSection +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Kinect", "Source\Drivers\Kinect\Kinect.vcxproj", "{E636BACA-795F-41CF-BC52-14C727BF014E}" +- ProjectSection(ProjectDependencies) = postProject +- {72D595BB-8C52-449B-91DB-0E9F6AEAF5BB} = {72D595BB-8C52-449B-91DB-0E9F6AEAF5BB} + EndProjectSection + EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DepthUtils", "Source\DepthUtils\DepthUtils.vcxproj", "{72D595BB-8C52-449B-91DB-0E9F6AEABBBB}" +@@ -252,14 +246,6 @@ Global + {BAEB9C48-562C-4D56-A6CD-18932265480A}.Debug|x86.ActiveCfg = Debug|x86 + {BAEB9C48-562C-4D56-A6CD-18932265480A}.Release|x64.ActiveCfg = Release|x64 + {BAEB9C48-562C-4D56-A6CD-18932265480A}.Release|x86.ActiveCfg = Release|x86 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Debug|x64.ActiveCfg = Debug|x64 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Debug|x64.Build.0 = Debug|x64 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Debug|x86.ActiveCfg = Debug|Win32 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Debug|x86.Build.0 = Debug|Win32 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Release|x64.ActiveCfg = Release|x64 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Release|x64.Build.0 = Release|x64 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Release|x86.ActiveCfg = Release|Win32 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Release|x86.Build.0 = Release|Win32 + {72D595BB-8C52-449B-91DB-0E9F6AEABBBB}.Debug|x64.ActiveCfg = Debug|x64 + {72D595BB-8C52-449B-91DB-0E9F6AEABBBB}.Debug|x64.Build.0 = Debug|x64 + {72D595BB-8C52-449B-91DB-0E9F6AEABBBB}.Debug|x86.ActiveCfg = Debug|Win32 +@@ -317,7 +303,6 @@ Global + {9F6652AF-35F2-452E-A2D3-08D05F5C075E} = {238D091D-1A85-4A61-9DCD-483768C51804} + {31F0F25B-A84A-48AC-9716-5DF9137F3855} = {238D091D-1A85-4A61-9DCD-483768C51804} + {15ECC029-90DE-4D1D-B00A-4A8E647D8C24} = {238D091D-1A85-4A61-9DCD-483768C51804} +- {E636BACA-795F-41CF-BC52-14C727BF014E} = {238D091D-1A85-4A61-9DCD-483768C51804} + {5B74F010-8B79-46B5-B906-C2B56CDB3386} = {238D091D-1A85-4A61-9DCD-483768C51804} + {BDA3BF24-550A-4BF9-83E5-0056134EED40} = {20285393-1DB1-4300-8AD3-30AEAE3C5DA6} + {D39A4248-3985-41DE-AFD5-AEC58D29291F} = {20285393-1DB1-4300-8AD3-30AEAE3C5DA6} diff --git a/ports/openni2/portfile.cmake b/ports/openni2/portfile.cmake new file mode 100644 index 000000000..5d798e195 --- /dev/null +++ b/ports/openni2/portfile.cmake @@ -0,0 +1,241 @@ +# 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) +# + +# UWP Not Support +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "Error: UWP builds are currently not supported.") +endif() + +# Static Build Not Support +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(STATUS "Warning: Static building not supported. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE "dynamic") +endif() + +# Download Source Code +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/OpenNI2-2.2-beta2) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/OpenNI/OpenNI2/archive/2.2-beta2.zip" + FILENAME "OpenNI2-2.2-beta.zip" + SHA512 9779161493114265745c9eb8b15db95a3ed2322cd75504931d0fb7b6214d7abc8a9eb2ea5f35e309bc4d2748f015eee27ada4974a2e9568b5ecb9d98099c84e9 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Apply Patches +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/upgrade_projects.patch" +) + +set(KINECTSDK10_INSTALLED FALSE) +if(EXISTS "$ENV{KINECTSDK10_DIR}/inc/NuiApi.h") + set(KINECTSDK10_INSTALLED TRUE) +endif() + +if(NOT ${KINECTSDK10_INSTALLED}) + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable_kinect.patch" + ) +endif() + +# Build OpenNI2 +vcpkg_build_msbuild( + PROJECT_PATH "${SOURCE_PATH}/OpenNI.sln" +) + +# Install OpenNI2 +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(PLATFORM Win32) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(PLATFORM x64) +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_THIRDPARTY_PATH "${SOURCE_PATH}/ThirdParty") + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/Android-Arm/OniPlatformAndroid-Arm.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/Android-Arm +) + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/Driver/OniDriverAPI.h" + "${SOURCE_INCLUDE_PATH}/Driver/OniDriverTypes.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/Driver +) + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/Linux-Arm/OniPlatformLinux-Arm.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/Linux-Arm +) + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/Linux-x86/OniPlatformLinux-x86.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/Linux-x86 +) + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/MacOSX/OniPlatformMacOSX.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/MacOSX +) + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/Win32/OniPlatformWin32.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/Win32 +) + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/OniCAPI.h" + "${SOURCE_INCLUDE_PATH}/OniCEnums.h" + "${SOURCE_INCLUDE_PATH}/OniCProperties.h" + "${SOURCE_INCLUDE_PATH}/OniCTypes.h" + "${SOURCE_INCLUDE_PATH}/OniEnums.h" + "${SOURCE_INCLUDE_PATH}/OniPlatform.h" + "${SOURCE_INCLUDE_PATH}/OniProperties.h" + "${SOURCE_INCLUDE_PATH}/OniVersion.h" + "${SOURCE_INCLUDE_PATH}/OpenNI.h" + "${SOURCE_INCLUDE_PATH}/PrimeSense.h" + "${SOURCE_INCLUDE_PATH}/PS1080.h" + "${SOURCE_INCLUDE_PATH}/PSLink.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include +) + +file( + INSTALL + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib +) + +file( + INSTALL + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/lib +) + +file( + INSTALL + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/OniFile.dll" + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PS1080.dll" + "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini" + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PSLink.dll" + "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PSLink.ini" + DESTINATION + ${CURRENT_PACKAGES_DIR}/bin/OpenNI2/Drivers +) + +if(${KINECTSDK10_INSTALLED}) + file( + INSTALL + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll" + DESTINATION + ${CURRENT_PACKAGES_DIR}/bin/OpenNI2/Drivers + ) +endif() + +file( + INSTALL + "${SOURCE_CONFIG_PATH}/OpenNI.ini" + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2.dll" + DESTINATION + ${CURRENT_PACKAGES_DIR}/bin +) + +file( + INSTALL + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/OniFile.dll" + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/PS1080.dll" + "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini" + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/PSLink.dll" + "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PSLink.ini" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2/Drivers +) + +if(${KINECTSDK10_INSTALLED}) + file( + INSTALL + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/Kinect.dll" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2/Drivers + ) +endif() + +file( + INSTALL + "${SOURCE_CONFIG_PATH}/OpenNI.ini" + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2.dll" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/bin +) + +file( + INSTALL + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/OniFile.dll" + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PS1080.dll" + "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini" + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PSLink.dll" + "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PSLink.ini" + DESTINATION + ${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers +) + +if(${KINECTSDK10_INSTALLED}) + file( + INSTALL + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll" + DESTINATION + ${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers + ) +endif() + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(NUMBEROFBIT 32) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(NUMBEROFBIT 64) +endif() + +file( + INSTALL + "${SOURCE_THIRDPARTY_PATH}/GL/glut${NUMBEROFBIT}.dll" + "${SOURCE_BIN_PATH_RELEASE}/NiViewer.exe" + "${SOURCE_CONFIG_PATH}/OpenNI.ini" + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2.dll" + "${SOURCE_BIN_PATH_RELEASE}/PS1080Console.exe" + "${SOURCE_BIN_PATH_RELEASE}/PSLinkConsole.exe" + DESTINATION + ${CURRENT_PACKAGES_DIR}/tools/openni2/ +) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openni2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/openni2/LICENSE ${CURRENT_PACKAGES_DIR}/share/openni2/copyright) diff --git a/ports/openni2/upgrade_projects.patch b/ports/openni2/upgrade_projects.patch new file mode 100644 index 000000000..c1d23b72f --- /dev/null +++ b/ports/openni2/upgrade_projects.patch @@ -0,0 +1,1584 @@ +diff --git a/Samples/ClosestPointViewer/ClosestPointViewer.vcxproj b/Samples/ClosestPointViewer/ClosestPointViewer.vcxproj +index fe63dbf..6050e8f 100644 +--- a/Samples/ClosestPointViewer/ClosestPointViewer.vcxproj ++++ b/Samples/ClosestPointViewer/ClosestPointViewer.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -105,7 +109,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -133,7 +137,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +@@ -142,6 +146,7 @@ + glut32.lib;OpenNI2.lib;MWClosestPoint.lib + $(OutDir);..\..\ThirdParty\GL + true ++ false + + + ..\..\Include +@@ -161,7 +166,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +diff --git a/Samples/EventBasedRead/EventBasedRead.vcxproj b/Samples/EventBasedRead/EventBasedRead.vcxproj +index f67db7a..ffe19ac 100644 +--- a/Samples/EventBasedRead/EventBasedRead.vcxproj ++++ b/Samples/EventBasedRead/EventBasedRead.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -83,7 +87,7 @@ + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions) + Level4 +- true ++ false + true + + +@@ -101,7 +105,7 @@ + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions) + Level4 +- true ++ false + true + + +@@ -119,7 +123,7 @@ + MaxSpeed + true + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +@@ -144,7 +148,7 @@ + MaxSpeed + true + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +diff --git a/Samples/MWClosestPoint/MWClosestPoint.vcxproj b/Samples/MWClosestPoint/MWClosestPoint.vcxproj +index 74cafe7..5844506 100644 +--- a/Samples/MWClosestPoint/MWClosestPoint.vcxproj ++++ b/Samples/MWClosestPoint/MWClosestPoint.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + ..\..\Include + _CLOSEST_POINT;%(PreprocessorDefinitions) + true +- true ++ false + + + +@@ -105,7 +109,7 @@ + ..\..\Include + _CLOSEST_POINT;%(PreprocessorDefinitions) + true +- true ++ false + + + +@@ -134,7 +138,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +@@ -163,7 +167,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +diff --git a/Samples/MWClosestPointApp/MWClosestPointApp.vcxproj b/Samples/MWClosestPointApp/MWClosestPointApp.vcxproj +index 063ec37..deb7c17 100644 +--- a/Samples/MWClosestPointApp/MWClosestPointApp.vcxproj ++++ b/Samples/MWClosestPointApp/MWClosestPointApp.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -83,7 +87,7 @@ + Disabled + ..\MWClosestPoint;..\..\Include + true +- true ++ false + + + +@@ -103,7 +107,7 @@ + Disabled + ..\MWClosestPoint;..\..\Include + true +- true ++ false + + + +@@ -131,7 +135,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +@@ -159,7 +163,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +diff --git a/Samples/MultiDepthViewer/MultiDepthViewer.vcxproj b/Samples/MultiDepthViewer/MultiDepthViewer.vcxproj +index d021c0d..85a0d4f 100644 +--- a/Samples/MultiDepthViewer/MultiDepthViewer.vcxproj ++++ b/Samples/MultiDepthViewer/MultiDepthViewer.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -102,7 +106,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -127,7 +131,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +@@ -136,6 +140,7 @@ + glut32.lib;OpenNI2.lib + $(OutDir);..\..\ThirdParty\GL + true ++ false + + + +@@ -152,7 +157,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +diff --git a/Samples/MultipleStreamRead/MultipleStreamRead.vcxproj b/Samples/MultipleStreamRead/MultipleStreamRead.vcxproj +index 15887ec..5fa8202 100644 +--- a/Samples/MultipleStreamRead/MultipleStreamRead.vcxproj ++++ b/Samples/MultipleStreamRead/MultipleStreamRead.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -83,7 +87,7 @@ + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions) + Level4 +- true ++ false + true + + +@@ -101,7 +105,7 @@ + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions) + Level4 +- true ++ false + true + + +@@ -119,7 +123,7 @@ + MaxSpeed + true + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +@@ -144,7 +148,7 @@ + MaxSpeed + true + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +diff --git a/Samples/SimpleRead/SimpleRead.vcxproj b/Samples/SimpleRead/SimpleRead.vcxproj +index de3942f..6ce41e3 100644 +--- a/Samples/SimpleRead/SimpleRead.vcxproj ++++ b/Samples/SimpleRead/SimpleRead.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -83,7 +87,7 @@ + ..\Common;..\..\Include;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions) + Level4 +- true ++ false + true + + +@@ -101,7 +105,7 @@ + ..\Common;..\..\Include;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions) + Level4 +- true ++ false + true + + +@@ -119,7 +123,7 @@ + MaxSpeed + true + ..\Common;..\..\Include;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +@@ -144,7 +148,7 @@ + MaxSpeed + true + ..\Common;..\..\Include;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +diff --git a/Samples/SimpleViewer/SimpleViewer.vcxproj b/Samples/SimpleViewer/SimpleViewer.vcxproj +index d693a1d..40621e1 100644 +--- a/Samples/SimpleViewer/SimpleViewer.vcxproj ++++ b/Samples/SimpleViewer/SimpleViewer.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -102,7 +106,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -127,7 +131,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +@@ -136,6 +140,7 @@ + glut32.lib;OpenNI2.lib + $(OutDir);..\..\ThirdParty\GL + true ++ false + + + +@@ -152,7 +157,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +diff --git a/Source/Core/OpenNI.vcxproj b/Source/Core/OpenNI.vcxproj +index 12189de..f176682 100644 +--- a/Source/Core/OpenNI.vcxproj ++++ b/Source/Core/OpenNI.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + +@@ -88,7 +92,7 @@ + _WINDLL;%(PreprocessorDefinitions);OPENNI2_EXPORT + ProgramDatabase + Level4 +- true ++ false + true + + +@@ -110,7 +114,7 @@ + _WINDLL;%(PreprocessorDefinitions);OPENNI2_EXPORT + ProgramDatabase + Level4 +- true ++ false + true + + +@@ -132,7 +136,7 @@ + true + _MBCS;%(PreprocessorDefinitions);OPENNI2_EXPORT + ..\..\Include;..\Drivers\OniFile\Formats;..\..\ThirdParty\PSCommon\XnLib\Include;..\..\ThirdParty\LibJPEG;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +@@ -161,7 +165,7 @@ + true + _MBCS;%(PreprocessorDefinitions);OPENNI2_EXPORT + ..\..\Include;..\Drivers\OniFile\Formats;..\..\ThirdParty\PSCommon\XnLib\Include;..\..\ThirdParty\LibJPEG;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +diff --git a/Source/DepthUtils/DepthUtils.vcxproj b/Source/DepthUtils/DepthUtils.vcxproj +index dcab0b7..e474661 100644 +--- a/Source/DepthUtils/DepthUtils.vcxproj ++++ b/Source/DepthUtils/DepthUtils.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -35,23 +35,27 @@ + StaticLibrary + true + MultiByte ++ v141 + + + StaticLibrary + true + MultiByte ++ v141 + + + StaticLibrary + false + true + MultiByte ++ v141 + + + StaticLibrary + false + true + MultiByte ++ v141 + + + +@@ -94,7 +98,7 @@ + Disabled + _WINDLL;%(PreprocessorDefinitions);DepthUtils_EXPORT + Level4 +- true ++ false + true + + +@@ -114,7 +118,7 @@ + Disabled + _WINDLL;%(PreprocessorDefinitions);DepthUtils_EXPORT + Level4 +- true ++ false + true + + +@@ -134,7 +138,7 @@ + MaxSpeed + true + _MBCS;%(PreprocessorDefinitions);DepthUtils_EXPORT +- true ++ false + true + true + AnySuitable +@@ -160,7 +164,7 @@ + MaxSpeed + true + _MBCS;%(PreprocessorDefinitions);DepthUtils_EXPORT +- true ++ false + true + AnySuitable + Speed +diff --git a/Source/Drivers/DummyDevice/DummyDevice.vcxproj b/Source/Drivers/DummyDevice/DummyDevice.vcxproj +index 56c5944..0401f3d 100644 +--- a/Source/Drivers/DummyDevice/DummyDevice.vcxproj ++++ b/Source/Drivers/DummyDevice/DummyDevice.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + _WINDLL;%(PreprocessorDefinitions);DummyDevice2_EXPORT + ProgramDatabase + Level4 +- true ++ false + true + + +@@ -104,7 +108,7 @@ + _WINDLL;%(PreprocessorDefinitions);DummyDevice2_EXPORT + ProgramDatabase + Level4 +- true ++ false + true + + +@@ -124,7 +128,7 @@ + true + _MBCS;%(PreprocessorDefinitions);DummyDevice2_EXPORT + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include +- true ++ false + true + AnySuitable + Speed +@@ -153,7 +157,7 @@ + true + _MBCS;%(PreprocessorDefinitions);DummyDevice2_EXPORT + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include +- true ++ false + true + AnySuitable + Speed +diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj +index f54e8b2..7f54d04 100644 +--- a/Source/Drivers/Kinect/Kinect.vcxproj ++++ b/Source/Drivers/Kinect/Kinect.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -28,12 +28,14 @@ + true + Unicode + true ++ v141 + + + DynamicLibrary + true + Unicode + true ++ v141 + + + DynamicLibrary +@@ -41,6 +43,7 @@ + true + MultiByte + true ++ v141 + + + DynamicLibrary +@@ -48,6 +51,7 @@ + true + MultiByte + true ++ v141 + + + +@@ -99,7 +103,7 @@ + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; + _WINDLL;%(PreprocessorDefinitions);_WINDOWS + false +- true ++ false + + + true +@@ -115,7 +119,7 @@ + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; + _WINDLL;%(PreprocessorDefinitions);_WINDOWS + false +- true ++ false + + + true +@@ -135,7 +139,7 @@ + true + true + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; +- true ++ false + + + true +@@ -153,7 +157,7 @@ + true + true + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; +- true ++ false + + + true +diff --git a/Source/Drivers/OniFile/OniFile.vcxproj b/Source/Drivers/OniFile/OniFile.vcxproj +index 9b173f7..e2f4391 100644 +--- a/Source/Drivers/OniFile/OniFile.vcxproj ++++ b/Source/Drivers/OniFile/OniFile.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -28,23 +28,27 @@ + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + +@@ -98,7 +102,7 @@ + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;ONIFILESPLAYER_EXPORTS;%(PreprocessorDefinitions) + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG +- true ++ false + true + + +@@ -133,7 +137,7 @@ + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;ONIFILESPLAYER_EXPORTS;%(PreprocessorDefinitions) + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG +- true ++ false + true + + +@@ -169,7 +173,7 @@ + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;ONIFILESPLAYER_EXPORTS;%(PreprocessorDefinitions) + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG +- true ++ false + true + AnySuitable + Speed +@@ -212,7 +216,7 @@ + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;ONIFILESPLAYER_EXPORTS;%(PreprocessorDefinitions) + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG +- true ++ false + true + AnySuitable + Speed +diff --git a/Source/Drivers/PS1080/PS1080.vcxproj b/Source/Drivers/PS1080/PS1080.vcxproj +index 2a1154d..8495c28 100644 +--- a/Source/Drivers/PS1080/PS1080.vcxproj ++++ b/Source/Drivers/PS1080/PS1080.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -525,23 +525,27 @@ + DynamicLibrary + true + Unicode ++ v141 + + + DynamicLibrary + true + Unicode ++ v141 + + + DynamicLibrary + false + true + Unicode ++ v141 + + + DynamicLibrary + false + true + Unicode ++ v141 + + + +@@ -587,7 +591,7 @@ + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;PS1080_EXPORTS;%(PreprocessorDefinitions) + .\Include;.\;..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG;..\..\DepthUtils +- true ++ false + StreamingSIMDExtensions2 + true + +@@ -612,7 +616,7 @@ + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;PS1080_EXPORTS;%(PreprocessorDefinitions) + .\Include;.\;..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG;..\..\DepthUtils +- true ++ false + StreamingSIMDExtensions2 + true + +@@ -638,7 +642,7 @@ + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;PS1080_EXPORTS;%(PreprocessorDefinitions) + .\Include;.\;..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG;..\..\DepthUtils +- true ++ false + StreamingSIMDExtensions2 + true + AnySuitable +@@ -670,7 +674,7 @@ + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;PS1080_EXPORTS;%(PreprocessorDefinitions) + .\Include;.\;..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG;..\..\DepthUtils +- true ++ false + StreamingSIMDExtensions2 + true + AnySuitable +diff --git a/Source/Drivers/PS1080/PS1080Console/PS1080Console.vcxproj b/Source/Drivers/PS1080/PS1080Console/PS1080Console.vcxproj +index b9adfea..7446d5a 100644 +--- a/Source/Drivers/PS1080/PS1080Console/PS1080Console.vcxproj ++++ b/Source/Drivers/PS1080/PS1080Console/PS1080Console.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -28,19 +28,23 @@ + Application + MultiByte + true ++ v141 + + + Application + MultiByte ++ v141 + + + Application + MultiByte + true ++ v141 + + + Application + MultiByte ++ v141 + + + +@@ -87,7 +91,7 @@ + EditAndContinue + 4250;4127;%(DisableSpecificWarnings) + true +- true ++ false + + + XnLib.lib;OpenNI2.lib;%(AdditionalDependencies) +@@ -95,7 +99,7 @@ + true + Console + MachineX86 +- true ++ false + + + +@@ -114,7 +118,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + XnLib.lib;OpenNI2.lib;%(AdditionalDependencies) +@@ -139,7 +143,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + XnLib.lib;OpenNI2.lib;%(AdditionalDependencies) +@@ -169,7 +173,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + XnLib.lib;OpenNI2.lib;%(AdditionalDependencies) +diff --git a/Source/Drivers/PSLink/PSLink.vcxproj b/Source/Drivers/PSLink/PSLink.vcxproj +index 8915163..68a7e96 100644 +--- a/Source/Drivers/PSLink/PSLink.vcxproj ++++ b/Source/Drivers/PSLink/PSLink.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -28,19 +28,23 @@ + DynamicLibrary + Unicode + true ++ v141 + + + DynamicLibrary + Unicode ++ v141 + + + DynamicLibrary + Unicode + true ++ v141 + + + DynamicLibrary + Unicode ++ v141 + + + +@@ -87,7 +91,7 @@ + EditAndContinue + 4250;4127;%(DisableSpecificWarnings) + true +- true ++ false + + + XnLib.lib;%(AdditionalDependencies) +@@ -95,7 +99,7 @@ + true + Windows + MachineX86 +- true ++ false + + + +@@ -115,7 +119,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + XnLib.lib;%(AdditionalDependencies) +@@ -140,7 +144,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + XnLib.lib;%(AdditionalDependencies) +@@ -170,7 +174,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + XnLib.lib;%(AdditionalDependencies) +diff --git a/Source/Drivers/PSLink/PSLinkConsole/PSLinkConsole.vcxproj b/Source/Drivers/PSLink/PSLinkConsole/PSLinkConsole.vcxproj +index e6c7c8c..26ff9c8 100644 +--- a/Source/Drivers/PSLink/PSLinkConsole/PSLinkConsole.vcxproj ++++ b/Source/Drivers/PSLink/PSLinkConsole/PSLinkConsole.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -28,19 +28,23 @@ + Application + MultiByte + true ++ v141 + + + Application + MultiByte ++ v141 + + + Application + MultiByte + true ++ v141 + + + Application + MultiByte ++ v141 + + + +@@ -87,7 +91,7 @@ + EditAndContinue + 4250;4127;%(DisableSpecificWarnings) + true +- true ++ false + + + OpenNI2.lib;XnLib.lib;%(AdditionalDependencies) +@@ -95,7 +99,7 @@ + true + Console + MachineX86 +- true ++ false + + + +@@ -114,7 +118,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + OpenNI2.lib;XnLib.lib;%(AdditionalDependencies) +@@ -139,7 +143,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + OpenNI2.lib;XnLib.lib;%(AdditionalDependencies) +@@ -169,7 +173,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + OpenNI2.lib;XnLib.lib;%(AdditionalDependencies) +diff --git a/Source/Drivers/TestDevice/TestDevice.vcxproj b/Source/Drivers/TestDevice/TestDevice.vcxproj +index e20a074..3777b2e 100644 +--- a/Source/Drivers/TestDevice/TestDevice.vcxproj ++++ b/Source/Drivers/TestDevice/TestDevice.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + _WINDLL;%(PreprocessorDefinitions);TestDevice2_EXPORT + ProgramDatabase + Level4 +- true ++ false + true + + +@@ -101,7 +105,7 @@ + _WINDLL;%(PreprocessorDefinitions);TestDevice2_EXPORT + ProgramDatabase + Level4 +- true ++ false + true + + +@@ -118,7 +122,7 @@ + true + _MBCS;%(PreprocessorDefinitions);TestDevice2_EXPORT + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include +- true ++ false + true + AnySuitable + Speed +@@ -144,7 +148,7 @@ + true + _MBCS;%(PreprocessorDefinitions);TestDevice2_EXPORT + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include +- true ++ false + true + AnySuitable + Speed +diff --git a/Source/Tools/NiViewer/NiViewer.vcxproj b/Source/Tools/NiViewer/NiViewer.vcxproj +index 0a4c392..e331009 100644 +--- a/Source/Tools/NiViewer/NiViewer.vcxproj ++++ b/Source/Tools/NiViewer/NiViewer.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -105,7 +109,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -133,7 +137,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +@@ -142,6 +146,7 @@ + Comdlg32.lib;OpenNI2.lib;XnLib.lib;glut32.lib + $(OutDir);..\..\..\ThirdParty\GL + true ++ false + + + ..\..\..\Include +@@ -161,7 +166,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +diff --git a/ThirdParty/PSCommon/XnLib/Source/XnLib.vcxproj b/ThirdParty/PSCommon/XnLib/Source/XnLib.vcxproj +index 2761222..f2094b3 100644 +--- a/ThirdParty/PSCommon/XnLib/Source/XnLib.vcxproj ++++ b/ThirdParty/PSCommon/XnLib/Source/XnLib.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -116,23 +116,27 @@ + StaticLibrary + true + MultiByte ++ v141 + + + StaticLibrary + true + MultiByte ++ v141 + + + StaticLibrary + false + true + MultiByte ++ v141 + + + StaticLibrary + false + true + MultiByte ++ v141 + + + +@@ -176,7 +180,7 @@ + ..\Include;..\Driver\Win32\Build\sys;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions);XnLib_EXPORT + Level4 +- true ++ false + true + + +@@ -198,7 +202,7 @@ + ..\Include;..\Driver\Win32\Build\sys;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions);XnLib_EXPORT + Level4 +- true ++ false + true + + +@@ -220,7 +224,7 @@ + true + _MBCS;%(PreprocessorDefinitions);XnLib_EXPORT + ..\Include;..\Driver\Win32\Build\sys;%(AdditionalIncludeDirectories) +- true ++ false + true + true + AnySuitable +@@ -248,7 +252,7 @@ + true + _MBCS;%(PreprocessorDefinitions);XnLib_EXPORT + ..\Include;..\Driver\Win32\Build\sys;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +diff --git a/Wrappers/java/OpenNI.jni/OpenNI.jni.vcxproj b/Wrappers/java/OpenNI.jni/OpenNI.jni.vcxproj +index b95c484..bfd0503 100644 +--- a/Wrappers/java/OpenNI.jni/OpenNI.jni.vcxproj ++++ b/Wrappers/java/OpenNI.jni/OpenNI.jni.vcxproj +@@ -1,5 +1,5 @@ + ・ソ +- ++ + + + Debug +@@ -28,18 +28,22 @@ + true + Unicode + true ++ v141 + + + DynamicLibrary + false + true + Unicode ++ v141 + + + DynamicLibrary ++ v141 + + + DynamicLibrary ++ v141 + + + -- cgit v1.2.3 From b29b05ed8cd1a850a86010dd16cd1d7e0558134d Mon Sep 17 00:00:00 2001 From: codicodi Date: Mon, 19 Jun 2017 21:04:18 +0200 Subject: [utf8proc] initial commit --- ports/utf8proc/CONTROL | 3 +++ ports/utf8proc/fix-buildsystem.patch | 48 ++++++++++++++++++++++++++++++++++++ ports/utf8proc/portfile.cmake | 28 +++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 ports/utf8proc/CONTROL create mode 100644 ports/utf8proc/fix-buildsystem.patch create mode 100644 ports/utf8proc/portfile.cmake diff --git a/ports/utf8proc/CONTROL b/ports/utf8proc/CONTROL new file mode 100644 index 000000000..1dcbbbef1 --- /dev/null +++ b/ports/utf8proc/CONTROL @@ -0,0 +1,3 @@ +Source: utf8proc +Version: 2.1.0 +Description: Clean C library for processing UTF-8 Unicode data. diff --git a/ports/utf8proc/fix-buildsystem.patch b/ports/utf8proc/fix-buildsystem.patch new file mode 100644 index 000000000..17af16c9b --- /dev/null +++ b/ports/utf8proc/fix-buildsystem.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index be676ba..7a2b6d8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,9 +13,9 @@ set(SO_MAJOR 2) + set(SO_MINOR 1) + set(SO_PATCH 0) + +-add_definitions ( +- -DUTF8PROC_EXPORTS +-) ++if(BUILD_SHARED_LIBS) ++ add_definitions(-DUTF8PROC_EXPORTS -DUTF8PROC_SHARED) ++endif() + + if (NOT MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -std=c99 -pedantic -Wall") +@@ -31,3 +31,10 @@ set_target_properties (utf8proc PROPERTIES + VERSION "${SO_MAJOR}.${SO_MINOR}.${SO_PATCH}" + SOVERSION ${SO_MAJOR} + ) ++ ++install(TARGETS utf8proc ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib) ++ ++install(FILES utf8proc.h DESTINATION include) +diff --git a/utf8proc.h b/utf8proc.h +index edf46d4..7b3f11a 100644 +--- a/utf8proc.h ++++ b/utf8proc.h +@@ -120,13 +120,13 @@ typedef bool utf8proc_bool; + #endif + #include + +-#ifdef _WIN32 ++#if defined _WIN32 && defined UTF8PROC_SHARED + # ifdef UTF8PROC_EXPORTS + # define UTF8PROC_DLLEXPORT __declspec(dllexport) + # else + # define UTF8PROC_DLLEXPORT __declspec(dllimport) + # endif +-#elif __GNUC__ >= 4 ++#elif __GNUC__ >= 4 && defined UTF8PROC_SHARED + # define UTF8PROC_DLLEXPORT __attribute__ ((visibility("default"))) + #else + # define UTF8PROC_DLLEXPORT diff --git a/ports/utf8proc/portfile.cmake b/ports/utf8proc/portfile.cmake new file mode 100644 index 000000000..64244ec03 --- /dev/null +++ b/ports/utf8proc/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO JuliaLang/utf8proc + REF v2.1.0 + SHA512 72b7f377fa6a62018d3eeab8723a27e25db3d1f794ae0bf21fff62ec1a7439bec52e7c93d2a00c218de6ff518097fb4a7a87c56e61ba8c98e689aa8f7171c812) + +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(READ ${CURRENT_PACKAGES_DIR}/include/utf8proc.h UTF8PROC_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "defined UTF8PROC_SHARED" "0" UTF8PROC_H "${UTF8PROC_H}") +else() + string(REPLACE "defined UTF8PROC_SHARED" "1" UTF8PROC_H "${UTF8PROC_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/utf8proc.h "${UTF8PROC_H}") + +file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/utf8proc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/utf8proc/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/utf8proc/copyright) -- cgit v1.2.3 From 8085cd34f2f5eef533aaeac6232cde4f073a4bf0 Mon Sep 17 00:00:00 2001 From: Gilles Khouzam Date: Sat, 17 Jun 2017 11:30:03 -0700 Subject: Adding support for FFmpeg in UWP. Adding support to download gas-preprocessor as an acquire_program. Update all packages for msys2 Download perl and gcc for ARM assembly in ffmpeg. --- docs/maintainers/vcpkg_find_acquire_program.md | 1 + ports/ffmpeg/portfile.cmake | 43 ++++++++++++++++++++++++-- scripts/cmake/vcpkg_acquire_msys.cmake | 4 +++ scripts/cmake/vcpkg_find_acquire_program.cmake | 14 +++++++-- 4 files changed, 58 insertions(+), 4 deletions(-) diff --git a/docs/maintainers/vcpkg_find_acquire_program.md b/docs/maintainers/vcpkg_find_acquire_program.md index 209b4416e..bc50ef4c8 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: - NASM - NINJA - YASM +- GASPREPROCESSOR Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md). diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 7b45fc898..3a5ea2fe4 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -25,16 +25,55 @@ file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg ${CURRENT_BU set(OPTIONS "--disable-ffmpeg --disable-ffprobe --disable-doc --enable-debug") set(OPTIONS "${OPTIONS} --enable-runtime-cpudetect") + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + SET(UWP TRUE) + set(OPTIONS "${OPTIONS} --disable-programs --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") + set(OPTIONS "${OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") + + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(UWP_PLATFORM "arm") + vcpkg_find_acquire_program(GASPREPROCESSOR) + foreach(GAS_PATH ${GASPREPROCESSOR}) + get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY) + set(ENV{PATH} "$ENV{PATH};${GAS_ITEM_PATH}") + endforeach(GAS_PATH) + + ## Get Perl and GCC for MSYS2 + execute_process( + COMMAND ${BASH} --noprofile --norc -c "PATH=/usr/bin:\$PATH;pacman -Sy --noconfirm --needed perl gcc" + ) + + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(UWP_PLATFORM "x64") + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(UWP_PLATFORM "Win32") + else () + message(FATAL_ERROR "Unsupported architecture") + endif() +endif() + set(OPTIONS_DEBUG "") # Note: --disable-optimizations can't be used due to http://ffmpeg.org/pipermail/libav-user/2013-March/003945.html if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(OPTIONS "${OPTIONS} --disable-static --enable-shared") + if (UWP) + set(OPTIONS "${OPTIONS} --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib") + endif() endif() if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") - set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd --extra-ldflags=-NODEFAULTLIB:libcmt") + set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd") + if (NOT UWP) + set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-ldflags=-NODEFAULTLIB:libcmt") + endif() + set(OPTIONS "${OPTIONS} --extra-cflags=-MD --extra-cxxflags=-MD") else() - set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MTd --extra-cxxflags=-MTd --extra-ldflags=-NODEFAULTLIB:libcmt") + set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MTd --extra-cxxflags=-MTd") + if (NOT UWP) + set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-ldflags=-NODEFAULTLIB:libcmt") + endif() + set(OPTIONS "${OPTIONS} --extra-cflags=-MT --extra-cxxflags=-MT") endif() message(STATUS "Building ${_csc_PROJECT_PATH} for Release") diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index b63700877..d87ec3e7c 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -84,6 +84,10 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin:\$PATH;pacman-key --init;pacman-key --populate" WORKING_DIRECTORY ${TOOLPATH} ) + execute_process( + COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin:\$PATH;pacman -Syu --noconfirm" + WORKING_DIRECTORY ${TOOLPATH} + ) file(WRITE "${TOOLPATH}/${STAMP}" "0") message(STATUS "Acquiring MSYS2... OK") endif() diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 03216058c..fef62da53 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -16,6 +16,7 @@ ## - 7Z ## - BISON ## - FLEX +## - GASPREPROCESSOR ## - PERL ## - PYTHON2 ## - PYTHON3 @@ -142,6 +143,15 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://sourceforge.net/projects/gnuwin32/files/gperf/3.0.1/gperf-3.0.1-bin.zip/download") set(ARCHIVE "gperf-3.0.1-bin.zip") set(HASH 3f2d3418304390ecd729b85f65240a9e4d204b218345f82ea466ca3d7467789f43d0d2129fcffc18eaad3513f49963e79775b10cc223979540fa2e502fe7d4d9) + elseif(VAR MATCHES "GASPREPROCESSOR") + set(NOEXTRACT true) + set(PROGNAME gas-preprocessor) + set(REQUIRED_INTERPRETER PERL) + set(SCRIPTNAME "gas-preprocessor.pl") + set(PATHS ${DOWNLOADS}/tools/gas-preprocessor) + set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/36bacb4cba27003c572e5bf7a9c4dfe3c9a8d40d/gas-preprocessor.pl") + set(ARCHIVE "gas-preprocessor.pl") + set(HASH a25caadccd1457a0fd2abb5a0da9aca1713b2c351d76daf87a4141e52021f51aa09e95a62942c6f0764f79cc1fa65bf71584955b09e62ee7da067b5c82baf6b3) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() @@ -151,8 +161,8 @@ function(vcpkg_find_acquire_program VAR) find_program(${VAR} ${PROGNAME} PATHS ${PATHS}) else() vcpkg_find_acquire_program(${REQUIRED_INTERPRETER}) - find_file(SCIRPT ${SCRIPTNAME} PATHS ${PATHS}) - set(${VAR} ${${REQUIRED_INTERPRETER}} ${SCIRPT}) + find_file(SCRIPT ${SCRIPTNAME} PATHS ${PATHS}) + set(${VAR} ${${REQUIRED_INTERPRETER}} ${SCRIPT}) endif() endmacro() -- cgit v1.2.3 From 8d955c83b53d42983ebd9a046a0a0a5ade08537f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 19 Jun 2017 13:25:41 -0700 Subject: Use std::experimental::filesystem instead of std::tr2::sys --- toolsrc/include/filesystem_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/include/filesystem_fs.h b/toolsrc/include/filesystem_fs.h index 8e223511d..0651ebf25 100644 --- a/toolsrc/include/filesystem_fs.h +++ b/toolsrc/include/filesystem_fs.h @@ -4,7 +4,7 @@ namespace fs { - namespace stdfs = std::tr2::sys; + namespace stdfs = std::experimental::filesystem; using stdfs::path; using stdfs::copy_options; -- cgit v1.2.3 From bca0988023a8c7bfc896d0f5787eb02e74c6fb59 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Mon, 19 Jun 2017 15:06:15 -0700 Subject: [vcpkg] feature packages initial parsing --- toolsrc/include/PackageSpec.h | 6 ++ toolsrc/include/Paragraphs.h | 8 +-- toolsrc/include/SourceParagraph.h | 27 ++++++-- toolsrc/include/vcpkg_Commands.h | 2 +- toolsrc/include/vcpkg_Input.h | 3 + toolsrc/include/vcpkg_Strings.h | 2 + toolsrc/src/Paragraphs.cpp | 21 ++++-- toolsrc/src/SourceParagraph.cpp | 62 +++++++++++++++-- toolsrc/src/VcpkgCmdArguments.cpp | 5 ++ toolsrc/src/commands_build.cpp | 32 +++++---- toolsrc/src/commands_build_external.cpp | 6 +- toolsrc/src/commands_ci.cpp | 6 +- toolsrc/src/commands_depends.cpp | 5 +- toolsrc/src/commands_portsdiff.cpp | 4 +- toolsrc/src/commands_search.cpp | 61 ++++++++++++----- toolsrc/src/commands_update.cpp | 4 +- toolsrc/src/tests_paragraph.cpp | 116 +++++++++++++++++--------------- toolsrc/src/vcpkg_Dependencies.cpp | 16 ++--- toolsrc/src/vcpkg_Input.cpp | 34 +++++++++- toolsrc/src/vcpkg_Strings.cpp | 5 ++ 20 files changed, 300 insertions(+), 125 deletions(-) diff --git a/toolsrc/include/PackageSpec.h b/toolsrc/include/PackageSpec.h index 58edb8274..62b6fc9de 100644 --- a/toolsrc/include/PackageSpec.h +++ b/toolsrc/include/PackageSpec.h @@ -26,6 +26,12 @@ namespace vcpkg Triplet m_triplet; }; + struct FullPackageSpec + { + PackageSpec package_spec; + std::vector features; + }; + bool operator==(const PackageSpec& left, const PackageSpec& right); bool operator!=(const PackageSpec& left, const PackageSpec& right); } diff --git a/toolsrc/include/Paragraphs.h b/toolsrc/include/Paragraphs.h index 04f9fb879..83a32b2af 100644 --- a/toolsrc/include/Paragraphs.h +++ b/toolsrc/include/Paragraphs.h @@ -16,20 +16,20 @@ namespace vcpkg::Paragraphs Expected parse_single_paragraph(const std::string& str); Expected> parse_paragraphs(const std::string& str); - ExpectedT try_load_port(const Files::Filesystem& fs, - const fs::path& control_path); + ExpectedT try_load_port(const Files::Filesystem& fs, + const fs::path& control_path); Expected try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec); struct LoadResults { - std::vector paragraphs; + std::vector paragraphs; std::vector errors; }; LoadResults try_load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); - std::vector load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); + std::vector load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); std::map extract_port_names_and_versions( const std::vector& source_paragraphs); diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 2f30e338e..31c9560cc 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -10,6 +10,8 @@ namespace vcpkg { + extern bool g_feature_packages; + struct Triplet; struct Dependency @@ -27,23 +29,38 @@ namespace vcpkg std::error_code error; }; + struct FeatureParagraph + { + std::string name; + std::string description; + std::vector depends; + }; + /// /// Port metadata (CONTROL file) /// struct SourceParagraph { - static ExpectedT parse_control_file( - std::unordered_map fields); - - SourceParagraph() = default; - std::string name; std::string version; std::string description; std::string maintainer; std::vector supports; std::vector depends; + std::string default_features; }; + struct SourceControlFile + { + static ExpectedT parse_control_file( + std::vector>&& control_paragraphs); + + SourceParagraph core_paragraph; + std::vector> feature_paragraphs; + + std::vector errors; + }; + + std::vector getSourceParagraphs(const std::vector& control_files); void print_error_message(span error_info_list); inline void print_error_message(const ParseControlErrorInfo& error_info_list) diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 006971e47..67319f240 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -18,7 +18,7 @@ namespace vcpkg::Commands namespace BuildCommand { - void perform_and_exit(const PackageSpec& spec, + void perform_and_exit(const FullPackageSpec& full_spec, const fs::path& port_dir, const std::unordered_set& options, const VcpkgPaths& paths); diff --git a/toolsrc/include/vcpkg_Input.h b/toolsrc/include/vcpkg_Input.h index 77f7ecfb5..fa568207a 100644 --- a/toolsrc/include/vcpkg_Input.h +++ b/toolsrc/include/vcpkg_Input.h @@ -6,6 +6,9 @@ namespace vcpkg::Input PackageSpec check_and_get_package_spec(const std::string& package_spec_as_string, const Triplet& default_triplet, CStringView example_text); + FullPackageSpec check_and_get_full_package_spec(const std::string& full_package_spec_as_string, + const Triplet& default_triplet, + CStringView example_text); void check_triplet(const Triplet& t, const VcpkgPaths& paths); } diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index e95a0601a..325a2cb4c 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -54,6 +54,8 @@ namespace vcpkg::Strings std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern); + bool case_insensitive_ascii_contains(const std::string& s, const std::string& pattern); + int case_insensitive_ascii_compare(const CStringView left, const CStringView right); std::string ascii_to_lowercase(const std::string& input); diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp index 31e8f1da3..440d04ce4 100644 --- a/toolsrc/src/Paragraphs.cpp +++ b/toolsrc/src/Paragraphs.cpp @@ -201,13 +201,22 @@ namespace vcpkg::Paragraphs return Parser(str.c_str(), str.c_str() + str.size()).get_paragraphs(); } - ExpectedT try_load_port(const Files::Filesystem& fs, const fs::path& path) + ExpectedT try_load_port(const Files::Filesystem& fs, const fs::path& path) { ParseControlErrorInfo error_info; - Expected> pghs = get_single_paragraph(fs, path / "CONTROL"); - if (auto p = pghs.get()) + Expected>> pghs = get_paragraphs(fs, path / "CONTROL"); + if (auto vector_pghs = pghs.get()) { - return SourceParagraph::parse_control_file(*p); + auto csf = SourceControlFile::parse_control_file(std::move(*vector_pghs)); + if (!g_feature_packages) + { + if (auto ptr = csf.get()) + { + ptr->core_paragraph.default_features.clear(); + ptr->feature_paragraphs.clear(); + } + } + return csf; } error_info.name = path.filename().generic_u8string(); error_info.error = pghs.error(); @@ -232,7 +241,7 @@ namespace vcpkg::Paragraphs LoadResults ret; for (auto&& path : fs.get_files_non_recursive(ports_dir)) { - ExpectedT source_paragraph = try_load_port(fs, path); + ExpectedT source_paragraph = try_load_port(fs, path); if (auto srcpgh = source_paragraph.get()) { ret.paragraphs.emplace_back(std::move(*srcpgh)); @@ -245,7 +254,7 @@ namespace vcpkg::Paragraphs return ret; } - std::vector load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir) + std::vector load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir) { auto results = try_load_all_ports(fs, ports_dir); if (!results.errors.empty()) diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 3b770a4b4..a938feb99 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -12,7 +12,7 @@ namespace vcpkg { - // + bool g_feature_packages = false; namespace SourceParagraphRequiredField { static const std::string SOURCE = "Source"; @@ -25,6 +25,7 @@ namespace vcpkg static const std::string MAINTAINER = "Maintainer"; static const std::string BUILD_DEPENDS = "Build-Depends"; static const std::string SUPPORTS = "Supports"; + static const std::string DEFAULTFEATURES = "Default-Features"; } static span get_list_of_valid_fields() @@ -40,6 +41,17 @@ namespace vcpkg return valid_fields; } + namespace FeatureParagraphRequiredField + { + static const std::string FEATURE = "Feature"; + } + + namespace FeatureParagraphOptionalField + { + static const std::string DESCRIPTION = "Description"; + static const std::string BUILD_DEPENDS = "Build-Depends"; + } + void print_error_message(span error_info_list) { Checks::check_exit(VCPKG_LINE_INFO, error_info_list.size() > 0); @@ -74,11 +86,22 @@ namespace vcpkg System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n"); } } + std::vector getSourceParagraphs(const std::vector& control_files) + { + return Util::fmap(control_files, [](const SourceControlFile& x) { return x.core_paragraph; }); + } - ExpectedT SourceParagraph::parse_control_file( - std::unordered_map fields) + ExpectedT SourceControlFile::parse_control_file( + std::vector>&& control_paragraphs) { - SourceParagraph sparagraph; + if (control_paragraphs.size() == 0) + { + return ExpectedT(); + } + auto&& fields = control_paragraphs.front(); + + SourceControlFile control_file; + SourceParagraph& sparagraph = control_file.core_paragraph; sparagraph.name = details::remove_required_field(&fields, SourceParagraphRequiredField::SOURCE); sparagraph.version = details::remove_required_field(&fields, SourceParagraphRequiredField::VERSION); sparagraph.description = details::remove_optional_field(&fields, SourceParagraphOptionalField::DESCRIPTION); @@ -90,6 +113,9 @@ namespace vcpkg std::string sups = details::remove_optional_field(&fields, SourceParagraphOptionalField::SUPPORTS); sparagraph.supports = parse_comma_list(sups); + sparagraph.default_features = + details::remove_optional_field(&fields, SourceParagraphOptionalField::DEFAULTFEATURES); + if (!fields.empty()) { const std::vector remaining_fields = Maps::extract_keys(fields); @@ -98,7 +124,33 @@ namespace vcpkg return ParseControlErrorInfo{sparagraph.name, remaining_fields_as_string}; } - return sparagraph; + + control_paragraphs.erase(control_paragraphs.begin()); + + for (auto&& feature_pgh : control_paragraphs) + { + control_file.feature_paragraphs.emplace_back(std::make_unique()); + + FeatureParagraph& fparagraph = *control_file.feature_paragraphs.back(); + + fparagraph.name = details::remove_required_field(&feature_pgh, FeatureParagraphRequiredField::FEATURE); + fparagraph.description = + details::remove_required_field(&feature_pgh, FeatureParagraphOptionalField::DESCRIPTION); + std::string feature_deps = + details::remove_optional_field(&feature_pgh, FeatureParagraphOptionalField::BUILD_DEPENDS); + fparagraph.depends = expand_qualified_dependencies(parse_comma_list(feature_deps)); + + if (!feature_pgh.empty()) + { + const std::vector remaining_fields = Maps::extract_keys(feature_pgh); + + const std::string remaining_fields_as_string = Strings::join("\n ", remaining_fields); + + return ParseControlErrorInfo{sparagraph.name, remaining_fields_as_string}; + } + } + + return control_file; } std::vector vcpkg::expand_qualified_dependencies(const std::vector& depends) diff --git a/toolsrc/src/VcpkgCmdArguments.cpp b/toolsrc/src/VcpkgCmdArguments.cpp index 733308cb0..62e0b114c 100644 --- a/toolsrc/src/VcpkgCmdArguments.cpp +++ b/toolsrc/src/VcpkgCmdArguments.cpp @@ -117,6 +117,11 @@ namespace vcpkg parse_switch(false, "printmetrics", args.printmetrics); continue; } + if (arg == "--featurepackages") + { + g_feature_packages = true; + continue; + } args.optional_command_arguments.insert(arg); continue; diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index 5a5cd462e..a9e4f574e 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -19,11 +19,12 @@ namespace vcpkg::Commands::BuildCommand static const std::string OPTION_CHECKS_ONLY = "--checks-only"; - void perform_and_exit(const PackageSpec& spec, + void perform_and_exit(const FullPackageSpec& full_spec, const fs::path& port_dir, const std::unordered_set& options, const VcpkgPaths& paths) { + const PackageSpec& spec = full_spec.package_spec; if (options.find(OPTION_CHECKS_ONLY) != options.end()) { auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, spec.triplet()); @@ -33,25 +34,32 @@ namespace vcpkg::Commands::BuildCommand Checks::exit_success(VCPKG_LINE_INFO); } - const ExpectedT maybe_spgh = + const ExpectedT source_control_file = Paragraphs::try_load_port(paths.get_filesystem(), port_dir); - if (!maybe_spgh) + if (!source_control_file.has_value()) { - print_error_message(maybe_spgh.error()); + print_error_message(source_control_file.error()); Checks::exit_fail(VCPKG_LINE_INFO); } - const SourceParagraph& spgh = maybe_spgh.value_or_exit(VCPKG_LINE_INFO); + for (std::string str : full_spec.features) + { + System::println("%s \n", str); + } + const SourceControlFile& scf = source_control_file.value_or_exit(VCPKG_LINE_INFO); Checks::check_exit(VCPKG_LINE_INFO, - spec.name() == spgh.name, + spec.name() == scf.core_paragraph.name, "The Name: field inside the CONTROL does not match the port directory: '%s' != '%s'", - spgh.name, + scf.core_paragraph.name, spec.name()); StatusParagraphs status_db = database_load_check(paths); Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; - const Build::BuildPackageConfig build_config{spgh, spec.triplet(), paths.port_dir(spec), build_package_options}; + + const Build::BuildPackageConfig build_config{ + scf.core_paragraph, spec.triplet(), paths.port_dir(spec), build_package_options}; + const auto result = Build::build_package(paths, build_config, status_db); if (result.code == BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES) { @@ -82,11 +90,11 @@ namespace vcpkg::Commands::BuildCommand static const std::string example = Commands::Help::create_example_string("build zlib:x64-windows"); args.check_exact_arg_count( 1, example); // Build only takes a single package and all dependencies must already be installed - const PackageSpec spec = - Input::check_and_get_package_spec(args.command_arguments.at(0), default_triplet, example); - Input::check_triplet(spec.triplet(), paths); + std::string command_argument = args.command_arguments.at(0); + const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, example); + Input::check_triplet(spec.package_spec.triplet(), paths); const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}); - perform_and_exit(spec, paths.port_dir(spec), options, paths); + perform_and_exit(spec, paths.port_dir(spec.package_spec), options, paths); } } diff --git a/toolsrc/src/commands_build_external.cpp b/toolsrc/src/commands_build_external.cpp index 2712ba0cf..ff70e9cf2 100644 --- a/toolsrc/src/commands_build_external.cpp +++ b/toolsrc/src/commands_build_external.cpp @@ -11,9 +11,9 @@ namespace vcpkg::Commands::BuildExternal static const std::string example = Commands::Help::create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)"); args.check_exact_arg_count(2, example); - const PackageSpec spec = - Input::check_and_get_package_spec(args.command_arguments.at(0), default_triplet, example); - Input::check_triplet(spec.triplet(), paths); + const FullPackageSpec spec = + Input::check_and_get_full_package_spec(args.command_arguments.at(0), default_triplet, example); + Input::check_triplet(spec.package_spec.triplet(), paths); const std::unordered_set options = args.check_and_get_optional_command_arguments({}); const fs::path port_dir = args.command_arguments.at(1); diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp index 7e724f3ee..65e44e847 100644 --- a/toolsrc/src/commands_ci.cpp +++ b/toolsrc/src/commands_ci.cpp @@ -20,11 +20,11 @@ namespace vcpkg::Commands::CI const fs::path& ports_directory, const Triplet& triplet) { - auto sources = Paragraphs::load_all_ports(fs, ports_directory); - + auto ports = Paragraphs::load_all_ports(fs, ports_directory); std::vector specs; - for (const SourceParagraph& p : sources) + for (const SourceControlFile& control_file : ports) { + const SourceParagraph& p = control_file.core_paragraph; specs.push_back(PackageSpec::from_name_and_triplet(p.name, triplet).value_or_exit(VCPKG_LINE_INFO)); } diff --git a/toolsrc/src/commands_depends.cpp b/toolsrc/src/commands_depends.cpp index 9db4b7bb1..468bf5d72 100644 --- a/toolsrc/src/commands_depends.cpp +++ b/toolsrc/src/commands_depends.cpp @@ -13,10 +13,11 @@ namespace vcpkg::Commands::DependInfo args.check_exact_arg_count(0, example); args.check_and_get_optional_command_arguments({}); - auto sources = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + const auto source_control_files = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - for (const SourceParagraph& source_paragraph : sources) + for (const SourceControlFile& source_control_file : source_control_files) { + const SourceParagraph& source_paragraph = source_control_file.core_paragraph; auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name; }); System::println("%s: %s", source_paragraph.name, s); } diff --git a/toolsrc/src/commands_portsdiff.cpp b/toolsrc/src/commands_portsdiff.cpp index a614d654e..e872c394d 100644 --- a/toolsrc/src/commands_portsdiff.cpp +++ b/toolsrc/src/commands_portsdiff.cpp @@ -97,10 +97,10 @@ namespace vcpkg::Commands::PortsDiff L".vcpkg-root", git_exe.native()); System::cmd_execute_clean(cmd); - const std::vector source_paragraphs = + const std::vector source_control_files = Paragraphs::load_all_ports(paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string); const std::map names_and_versions = - Paragraphs::extract_port_names_and_versions(source_paragraphs); + Paragraphs::extract_port_names_and_versions(getSourceParagraphs(source_control_files)); fs.remove_all(temp_checkout_path, ec); return names_and_versions; } diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index 0f8ebbb3b..b39d21887 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -19,15 +19,16 @@ namespace vcpkg::Commands::Search return output; } - static std::string create_graph_as_string(const std::vector& source_paragraphs) + static std::string create_graph_as_string(const std::vector& source_control_files) { int empty_node_count = 0; std::string s; s.append("digraph G{ rankdir=LR; edge [minlen=3]; overlap=false;"); - for (const SourceParagraph& source_paragraph : source_paragraphs) + for (const SourceControlFile& source_control_file : source_control_files) { + const SourceParagraph& source_paragraph = source_control_file.core_paragraph; if (source_paragraph.depends.empty()) { empty_node_count++; @@ -46,10 +47,9 @@ namespace vcpkg::Commands::Search s.append(Strings::format("empty [label=\"%d singletons...\"]; }", empty_node_count)); return s; } - - static void do_print(const SourceParagraph& source_paragraph, bool FullDesc) + static void do_print(const SourceParagraph& source_paragraph, bool full_desc) { - if (FullDesc) + if (full_desc) { System::println( "%-20s %-16s %s", source_paragraph.name, source_paragraph.version, source_paragraph.description); @@ -63,6 +63,20 @@ namespace vcpkg::Commands::Search } } + static void do_print(const std::string& name, const FeatureParagraph& feature_paragraph, bool full_desc) + { + if (full_desc) + { + System::println("%-37s %s", name + "[" + feature_paragraph.name + "]", feature_paragraph.description); + } + else + { + System::println("%-37s %s", + name + "[" + feature_paragraph.name + "]", + details::shorten_description(feature_paragraph.description)); + } + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { static const std::string example = Strings::format( @@ -85,7 +99,7 @@ namespace vcpkg::Commands::Search for (auto&& error : sources_and_errors.errors) { System::println( - System::Color::warning, "Warning: an error occurred while parsing '%s'\n", error.name); + System::Color::warning, "Warning: an error occurred while parsing '%s'", error.name); } System::println(System::Color::warning, "Use '--debug' to get more information about the parse failures.\n"); @@ -93,7 +107,6 @@ namespace vcpkg::Commands::Search } auto& source_paragraphs = sources_and_errors.paragraphs; - if (options.find(OPTION_GRAPH) != options.cend()) { const std::string graph_as_string = create_graph_as_string(source_paragraphs); @@ -103,27 +116,41 @@ namespace vcpkg::Commands::Search if (args.command_arguments.empty()) { - for (const SourceParagraph& source_paragraph : source_paragraphs) + for (const SourceControlFile& source_control_file : source_paragraphs) { - do_print(source_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + do_print(source_control_file.core_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + for (auto&& feature_paragraph : source_control_file.feature_paragraphs) + { + do_print(source_control_file.core_paragraph.name, + *feature_paragraph, + options.find(OPTION_FULLDESC) != options.cend()); + } } } else { + const auto& icontains = Strings::case_insensitive_ascii_contains; + // At this point there is 1 argument - for (const SourceParagraph& source_paragraph : source_paragraphs) + auto&& args_zero = args.command_arguments[0]; + for (const SourceControlFile& source_control_file : source_paragraphs) { - if (Strings::case_insensitive_ascii_find(source_paragraph.name, args.command_arguments[0]) == - source_paragraph.name.end()) + auto&& sp = source_control_file.core_paragraph; + + bool contains_name = icontains(sp.name, args_zero); + if (contains_name || icontains(sp.description, args_zero)) { - if (Strings::case_insensitive_ascii_find(source_paragraph.description, args.command_arguments[0]) == - source_paragraph.description.end()) + do_print(sp, options.find(OPTION_FULLDESC) != options.cend()); + } + + for (auto&& feature_paragraph : source_control_file.feature_paragraphs) + { + if (contains_name || icontains(feature_paragraph->name, args_zero) || + icontains(feature_paragraph->description, args_zero)) { - continue; + do_print(sp.name, *feature_paragraph, options.find(OPTION_FULLDESC) != options.cend()); } } - - do_print(source_paragraph, options.find(OPTION_FULLDESC) != options.cend()); } } diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index f87ccfb06..f00a89da4 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -15,8 +15,8 @@ namespace vcpkg::Commands::Update std::vector find_outdated_packages(const VcpkgPaths& paths, const StatusParagraphs& status_db) { - const std::vector source_paragraphs = - Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + auto source_control_files = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + const std::vector source_paragraphs = getSourceParagraphs(source_control_files); const std::map src_names_to_versions = Paragraphs::extract_port_names_and_versions(source_paragraphs); const std::vector installed_packages = get_installed_ports(status_db); diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests_paragraph.cpp index 374e4ddd1..8dff520fb 100644 --- a/toolsrc/src/tests_paragraph.cpp +++ b/toolsrc/src/tests_paragraph.cpp @@ -25,99 +25,107 @@ namespace UnitTest1 { TEST_METHOD(SourceParagraph_Construct_Minimum) { - auto m_pgh = vcpkg::SourceParagraph::parse_control_file({{"Source", "zlib"}, {"Version", "1.2.8"}}); + auto m_pgh = + vcpkg::SourceControlFile::parse_control_file(std::vector>{{ + {"Source", "zlib"}, {"Version", "1.2.8"}, + }}); Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); - Assert::AreEqual("zlib", pgh.name.c_str()); - Assert::AreEqual("1.2.8", pgh.version.c_str()); - Assert::AreEqual("", pgh.maintainer.c_str()); - Assert::AreEqual("", pgh.description.c_str()); - Assert::AreEqual(size_t(0), pgh.depends.size()); + Assert::AreEqual("zlib", pgh.core_paragraph.name.c_str()); + Assert::AreEqual("1.2.8", pgh.core_paragraph.version.c_str()); + Assert::AreEqual("", pgh.core_paragraph.maintainer.c_str()); + Assert::AreEqual("", pgh.core_paragraph.description.c_str()); + Assert::AreEqual(size_t(0), pgh.core_paragraph.depends.size()); } TEST_METHOD(SourceParagraph_Construct_Maximum) { - auto m_pgh = vcpkg::SourceParagraph::parse_control_file({ - {"Source", "s"}, - {"Version", "v"}, - {"Maintainer", "m"}, - {"Description", "d"}, - {"Build-Depends", "bd"}, - {"Supports", "x64"}, - }); + auto m_pgh = + vcpkg::SourceControlFile::parse_control_file(std::vector>{{ + {"Source", "s"}, + {"Version", "v"}, + {"Maintainer", "m"}, + {"Description", "d"}, + {"Build-Depends", "bd"}, + {"Supports", "x64"}, + }}); Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); - Assert::AreEqual("s", pgh.name.c_str()); - Assert::AreEqual("v", pgh.version.c_str()); - Assert::AreEqual("m", pgh.maintainer.c_str()); - Assert::AreEqual("d", pgh.description.c_str()); - Assert::AreEqual(size_t(1), pgh.depends.size()); - Assert::AreEqual("bd", pgh.depends[0].name.c_str()); - Assert::AreEqual(size_t(1), pgh.supports.size()); - Assert::AreEqual("x64", pgh.supports[0].c_str()); + Assert::AreEqual("s", pgh.core_paragraph.name.c_str()); + Assert::AreEqual("v", pgh.core_paragraph.version.c_str()); + Assert::AreEqual("m", pgh.core_paragraph.maintainer.c_str()); + Assert::AreEqual("d", pgh.core_paragraph.description.c_str()); + Assert::AreEqual(size_t(1), pgh.core_paragraph.depends.size()); + Assert::AreEqual("bd", pgh.core_paragraph.depends[0].name.c_str()); + Assert::AreEqual(size_t(1), pgh.core_paragraph.supports.size()); + Assert::AreEqual("x64", pgh.core_paragraph.supports[0].c_str()); } TEST_METHOD(SourceParagraph_Two_Depends) { - auto m_pgh = vcpkg::SourceParagraph::parse_control_file({ - {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl"}, - }); + auto m_pgh = + vcpkg::SourceControlFile::parse_control_file(std::vector>{{ + {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl"}, + }}); Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); - Assert::AreEqual(size_t(2), pgh.depends.size()); - Assert::AreEqual("z", pgh.depends[0].name.c_str()); - Assert::AreEqual("openssl", pgh.depends[1].name.c_str()); + Assert::AreEqual(size_t(2), pgh.core_paragraph.depends.size()); + Assert::AreEqual("z", pgh.core_paragraph.depends[0].name.c_str()); + Assert::AreEqual("openssl", pgh.core_paragraph.depends[1].name.c_str()); } TEST_METHOD(SourceParagraph_Three_Depends) { - auto m_pgh = vcpkg::SourceParagraph::parse_control_file({ - {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl, xyz"}, - }); + auto m_pgh = + vcpkg::SourceControlFile::parse_control_file(std::vector>{{ + {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl, xyz"}, + }}); Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); - Assert::AreEqual(size_t(3), pgh.depends.size()); - Assert::AreEqual("z", pgh.depends[0].name.c_str()); - Assert::AreEqual("openssl", pgh.depends[1].name.c_str()); - Assert::AreEqual("xyz", pgh.depends[2].name.c_str()); + Assert::AreEqual(size_t(3), pgh.core_paragraph.depends.size()); + Assert::AreEqual("z", pgh.core_paragraph.depends[0].name.c_str()); + Assert::AreEqual("openssl", pgh.core_paragraph.depends[1].name.c_str()); + Assert::AreEqual("xyz", pgh.core_paragraph.depends[2].name.c_str()); } TEST_METHOD(SourceParagraph_Three_Supports) { - auto m_pgh = vcpkg::SourceParagraph::parse_control_file({ - {"Source", "zlib"}, {"Version", "1.2.8"}, {"Supports", "x64, windows, uwp"}, - }); + auto m_pgh = + vcpkg::SourceControlFile::parse_control_file(std::vector>{{ + {"Source", "zlib"}, {"Version", "1.2.8"}, {"Supports", "x64, windows, uwp"}, + }}); Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); - Assert::AreEqual(size_t(3), pgh.supports.size()); - Assert::AreEqual("x64", pgh.supports[0].c_str()); - Assert::AreEqual("windows", pgh.supports[1].c_str()); - Assert::AreEqual("uwp", pgh.supports[2].c_str()); + Assert::AreEqual(size_t(3), pgh.core_paragraph.supports.size()); + Assert::AreEqual("x64", pgh.core_paragraph.supports[0].c_str()); + Assert::AreEqual("windows", pgh.core_paragraph.supports[1].c_str()); + Assert::AreEqual("uwp", pgh.core_paragraph.supports[2].c_str()); } TEST_METHOD(SourceParagraph_Construct_Qualified_Depends) { - auto m_pgh = vcpkg::SourceParagraph::parse_control_file({ - {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "libA [windows], libB [uwp]"}, - }); + auto m_pgh = + vcpkg::SourceControlFile::parse_control_file(std::vector>{{ + {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "libA [windows], libB [uwp]"}, + }}); Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); - Assert::AreEqual("zlib", pgh.name.c_str()); - Assert::AreEqual("1.2.8", pgh.version.c_str()); - Assert::AreEqual("", pgh.maintainer.c_str()); - Assert::AreEqual("", pgh.description.c_str()); - Assert::AreEqual(size_t(2), pgh.depends.size()); - Assert::AreEqual("libA", pgh.depends[0].name.c_str()); - Assert::AreEqual("windows", pgh.depends[0].qualifier.c_str()); - Assert::AreEqual("libB", pgh.depends[1].name.c_str()); - Assert::AreEqual("uwp", pgh.depends[1].qualifier.c_str()); + Assert::AreEqual("zlib", pgh.core_paragraph.name.c_str()); + Assert::AreEqual("1.2.8", pgh.core_paragraph.version.c_str()); + Assert::AreEqual("", pgh.core_paragraph.maintainer.c_str()); + Assert::AreEqual("", pgh.core_paragraph.description.c_str()); + Assert::AreEqual(size_t(2), pgh.core_paragraph.depends.size()); + Assert::AreEqual("libA", pgh.core_paragraph.depends[0].name.c_str()); + Assert::AreEqual("windows", pgh.core_paragraph.depends[0].qualifier.c_str()); + Assert::AreEqual("libB", pgh.core_paragraph.depends[1].name.c_str()); + Assert::AreEqual("uwp", pgh.core_paragraph.depends[1].qualifier.c_str()); } TEST_METHOD(BinaryParagraph_Construct_Minimum) diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index f32d92f4c..add8acb4d 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -174,12 +174,12 @@ namespace vcpkg::Dependencies if (auto bpgh = maybe_bpgh.get()) return InstallPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type}; - ExpectedT maybe_spgh = + ExpectedT source_control_file = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); - if (auto spgh = maybe_spgh.get()) - return InstallPlanAction{spec, {nullopt, nullopt, *spgh}, request_type}; + if (auto scf = source_control_file.get()) + return InstallPlanAction{spec, {nullopt, nullopt, (*scf).core_paragraph}, request_type}; - print_error_message(maybe_spgh.error()); + print_error_message(source_control_file.error()); Checks::exit_fail(VCPKG_LINE_INFO); } }; @@ -284,13 +284,13 @@ namespace vcpkg::Dependencies if (auto bpgh = maybe_bpgh.get()) return ExportPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type}; - ExpectedT maybe_spgh = + ExpectedT source_control_file = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); - if (auto spgh = maybe_spgh.get()) - return ExportPlanAction{spec, {nullopt, nullopt, *spgh}, request_type}; + if (auto scf = source_control_file.get()) + return ExportPlanAction{spec, {nullopt, nullopt, (*scf).core_paragraph}, request_type}; else - print_error_message(maybe_spgh.error()); + print_error_message(source_control_file.error()); Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec); } diff --git a/toolsrc/src/vcpkg_Input.cpp b/toolsrc/src/vcpkg_Input.cpp index df738315b..fdedd5507 100644 --- a/toolsrc/src/vcpkg_Input.cpp +++ b/toolsrc/src/vcpkg_Input.cpp @@ -15,7 +15,7 @@ namespace vcpkg::Input auto expected_spec = PackageSpec::from_string(as_lowercase, default_triplet); if (auto spec = expected_spec.get()) { - return *spec; + return PackageSpec{*spec}; } // Intentionally show the lowercased string @@ -34,4 +34,36 @@ namespace vcpkg::Input Checks::exit_fail(VCPKG_LINE_INFO); } } + + FullPackageSpec check_and_get_full_package_spec(const std::string& full_package_spec_as_string, + const Triplet& default_triplet, + CStringView example_text) + { + int left_pos = (int)full_package_spec_as_string.find('['); + if (left_pos == std::string::npos) + { + return FullPackageSpec{ + check_and_get_package_spec(full_package_spec_as_string, default_triplet, example_text)}; + } + int right_pos = (int)full_package_spec_as_string.find(']'); + if (left_pos >= right_pos) + { + System::println(System::Color::error, "Error: Argument is not formatted correctly \"%s\""); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + std::string package_spec_as_string = full_package_spec_as_string.substr(0, left_pos); + const std::string as_lowercase = Strings::ascii_to_lowercase(package_spec_as_string); + auto expected_spec = PackageSpec::from_string(as_lowercase, default_triplet); + if (auto&& spec = expected_spec.get()) + { + return {*spec, + parse_comma_list(full_package_spec_as_string.substr(left_pos + 1, right_pos - left_pos - 1))}; + } + + // Intentionally show the lowercased string + System::println(System::Color::error, "Error: %s: %s", vcpkg::to_string(expected_spec.error()), as_lowercase); + System::print(example_text); + Checks::exit_fail(VCPKG_LINE_INFO); + } } diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 9ba9eb700..aafed5fd3 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -68,6 +68,11 @@ namespace vcpkg::Strings [](const char a, const char b) { return details::tolower_char(a) == b; }); } + bool case_insensitive_ascii_contains(const std::string& s, const std::string& pattern) + { + return case_insensitive_ascii_find(s, pattern) != s.end(); + } + int case_insensitive_ascii_compare(const CStringView left, const CStringView right) { return _stricmp(left, right); -- cgit v1.2.3 From 98d98683f347d5d0e4f63e3786b03a2fd3ea1663 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 20 Jun 2017 02:03:27 +0300 Subject: [libpng] update to 1.6.29 --- ports/libpng/CONTROL | 2 +- ports/libpng/portfile.cmake | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index 801a9f1fb..ec827ebd7 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.28-1 +Version: 1.6.29-1 Build-Depends: zlib 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 7c9c8194a..be4cb526d 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -1,10 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-1.6.28) +set(LIBPNG_VERSION 1.6.29) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-${LIBPNG_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "https://downloads.sourceforge.net/project/libpng/libpng16/1.6.28/libpng-1.6.28.tar.xz" - FILENAME "libpng-1.6.28.tar.xz" - SHA512 3541139062a1c6cded7abe378ae73519835ec68561006ba33b3fe34f65676e4f91f2561b11d890ac20255dbf2e691e0b3d4fbf11db77b47b67979ba45b8af655 + URLS "https://downloads.sourceforge.net/project/libpng/libpng16/${LIBPNG_VERSION}/libpng-${LIBPNG_VERSION}.tar.xz" + FILENAME "libpng-${LIBPNG_VERSION}.tar.xz" + SHA512 070393423ec11f19e3264a0200959ae09238aa005615571586987253028b4ffb7e6b7c734a132f65180252b0259f79add03896d79fdc7dcfd8773b82c82a5ffc ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( @@ -35,6 +36,7 @@ vcpkg_configure_cmake( -DSKIP_INSTALL_HEADERS=ON ) +vcpkg_build_cmake() vcpkg_install_cmake() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) -- cgit v1.2.3 From b5777c8dbfffb5139b6cf8aa7c9aa8b54331fa26 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 20 Jun 2017 02:14:55 +0300 Subject: [libraw] update to 0.18.2 --- ports/libraw/CONTROL | 2 +- ports/libraw/portfile.cmake | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ports/libraw/CONTROL b/ports/libraw/CONTROL index 9bb52aae0..bddc5c2db 100644 --- a/ports/libraw/CONTROL +++ b/ports/libraw/CONTROL @@ -1,4 +1,4 @@ Source: libraw -Version: 0.18.0-1 +Version: 0.18.2-1 Build-Depends: libjpeg-turbo Description: raw image decoder library diff --git a/ports/libraw/portfile.cmake b/ports/libraw/portfile.cmake index 2e25ec714..0b13213ad 100644 --- a/ports/libraw/portfile.cmake +++ b/ports/libraw/portfile.cmake @@ -1,9 +1,10 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/LibRaw-0.18.0) +set(LIBRAW_VERSION 0.18.2) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/LibRaw-${LIBRAW_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "http://www.libraw.org/data/LibRaw-0.18.0.zip" - FILENAME "LibRaw-0.18.0.zip" - SHA512 c66ae2331caffe18c2835d76d6106052125fab2f549a6f06687b4c1fedaae1c46ee0e4ae4c23b0480976870d76e8cfdbb91dd3cf11e3433ccc070bf03c538bb1 + URLS "http://www.libraw.org/data/LibRaw-${LIBRAW_VERSION}.zip" + FILENAME "LibRaw-${LIBRAW_VERSION}.zip" + SHA512 e557dc47e8c2f79cdb55fafe7e668b823ecd7afe2537c8b7cd6e3f299110efa4ba1696ce8aa01bdba06a5570eec53a4a04f1af32974f98a1521ab5cd174effd3 ) set(LIBRAW_CMAKE_COMMIT "a71f3b83ee3dccd7be32f9a2f410df4d9bdbde0a") set(LIBRAW_CMAKE_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/LibRaw-cmake-${LIBRAW_CMAKE_COMMIT}) @@ -26,6 +27,7 @@ vcpkg_configure_cmake( -DINSTALL_CMAKE_MODULE_PATH=${CURRENT_PACKAGES_DIR}/share/libraw ) +vcpkg_build_cmake() vcpkg_install_cmake() # Rename thread-safe version to be "raw.lib". This is unfortunately needed -- cgit v1.2.3 From 5ff2ec20327d1e8177a28db9df7876047293b5d1 Mon Sep 17 00:00:00 2001 From: Michael Offel Date: Tue, 20 Jun 2017 01:59:25 +0200 Subject: add c++ requests 1.3.0 port --- ports/cpr/CONTROL | 4 ++++ ports/cpr/force_static_library.patch | 13 +++++++++++ ports/cpr/portfile.cmake | 45 ++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 ports/cpr/CONTROL create mode 100644 ports/cpr/force_static_library.patch create mode 100644 ports/cpr/portfile.cmake diff --git a/ports/cpr/CONTROL b/ports/cpr/CONTROL new file mode 100644 index 000000000..417850b75 --- /dev/null +++ b/ports/cpr/CONTROL @@ -0,0 +1,4 @@ +Source: cpr +Version: 1.3.0 +Description: C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project. +Build-Depends: curl diff --git a/ports/cpr/force_static_library.patch b/ports/cpr/force_static_library.patch new file mode 100644 index 000000000..4571f21ac --- /dev/null +++ b/ports/cpr/force_static_library.patch @@ -0,0 +1,13 @@ +diff --git a/cpr/CMakeLists.txt b/cpr/CMakeLists.txt +index a6db5bd..9df92a6 100644 +--- a/cpr/CMakeLists.txt ++++ b/cpr/CMakeLists.txt +@@ -3,7 +3,7 @@ include_directories( + ${CPR_INCLUDE_DIRS} + ${CURL_INCLUDE_DIRS}) + +-add_library(${CPR_LIBRARIES} ++add_library(${CPR_LIBRARIES} STATIC + + # Source files + auth.cpp diff --git a/ports/cpr/portfile.cmake b/ports/cpr/portfile.cmake new file mode 100644 index 000000000..ddcbc4cb7 --- /dev/null +++ b/ports/cpr/portfile.cmake @@ -0,0 +1,45 @@ +# 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 whoshuu/cpr + REF 1.3.0 + SHA512 fd08f8a592a5e1fb8dc93158a4850b81575983c08527fb415f65bd9284f93c804c8680d16c548744583cd26b9353a7d4838269cfc59ccb6003da8941f620c273 +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/force_static_library.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DBUILD_CPR_TESTS=OFF + -DUSE_SYSTEM_CURL=ON +) + +vcpkg_build_cmake() + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/cpr.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/cpr/CMakeFiles/cpr.dir/cpr.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/cpr.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/cpr/CMakeFiles/cpr.dir/cpr.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpr) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cpr/LICENSE ${CURRENT_PACKAGES_DIR}/share/cpr/copyright) -- cgit v1.2.3 From ef4a0ced9bc25abd28dbde47fabf90252cf632a9 Mon Sep 17 00:00:00 2001 From: bagong Date: Tue, 20 Jun 2017 02:08:48 +0200 Subject: Add port qscintilla --- ports/qscintilla/CONTROL | 4 +++ ports/qscintilla/portfile.cmake | 67 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 ports/qscintilla/CONTROL create mode 100644 ports/qscintilla/portfile.cmake diff --git a/ports/qscintilla/CONTROL b/ports/qscintilla/CONTROL new file mode 100644 index 000000000..bcdde0e37 --- /dev/null +++ b/ports/qscintilla/CONTROL @@ -0,0 +1,4 @@ +Source: qscintilla +Version: 2.10 +Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt)) +Build-Depends: qt5 diff --git a/ports/qscintilla/portfile.cmake b/ports/qscintilla/portfile.cmake new file mode 100644 index 000000000..ba5a13ac2 --- /dev/null +++ b/ports/qscintilla/portfile.cmake @@ -0,0 +1,67 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/QScintilla_gpl-2.10) +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/pyqt/files/QScintilla2/QScintilla-2.10/QScintilla_gpl-2.10.zip" + FILENAME "QScintilla_gpl-2.10.zip" + SHA512 7c580cfee03af1056f530af756a0ff9cc2396a5419fa23aecc66a6bc8809a4fb154788956220bb0b068a5c214d571c053271c3906d6d541196fbbf7c6dbec917 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_find_acquire_program(PYTHON3) + +# Add python3 to path +SET(ENV{PATH} "${DOWNLOADS}/tools/python;$ENV{PATH}") + +vcpkg_configure_qmake( + SOURCE_PATH "${SOURCE_PATH}/Qt4Qt5" + OPTIONS + CONFIG+=build_all + CONFIG-=hide_symbols +) + +vcpkg_build_qmake() + +# Install following vcpkg conventions (following qwt portfile) +set(BUILD_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + +file(GLOB HEADER_FILES ${SOURCE_PATH}/include/*) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/qscintilla) + +file(INSTALL + ${BUILD_DIR}/release/qscintilla2_qt5.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + ${BUILD_DIR}/debug/qscintilla2_qt5.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL + ${BUILD_DIR}/release/qscintilla2_qt5.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + + file(INSTALL + ${BUILD_DIR}/debug/qscintilla2_qt5.dll + ${BUILD_DIR}/debug/qscintilla2_qt5.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/qscintilla) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/qscintilla/LICENSE ${CURRENT_PACKAGES_DIR}/share/qscintilla/copyright) -- cgit v1.2.3 From 7b5093984fb19cd4df1d3ee66bb6e72903694853 Mon Sep 17 00:00:00 2001 From: Michael Offel Date: Tue, 20 Jun 2017 02:17:56 +0200 Subject: make copy less verbose --- ports/cpr/portfile.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/cpr/portfile.cmake b/ports/cpr/portfile.cmake index ddcbc4cb7..00470c2ea 100644 --- a/ports/cpr/portfile.cmake +++ b/ports/cpr/portfile.cmake @@ -34,11 +34,11 @@ vcpkg_configure_cmake( vcpkg_build_cmake() -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/cpr.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/cpr/CMakeFiles/cpr.dir/cpr.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/cpr.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/cpr/CMakeFiles/cpr.dir/cpr.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/cpr.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/cpr/CMakeFiles/cpr.dir/cpr.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/cpr.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/cpr/CMakeFiles/cpr.dir/cpr.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpr) -- cgit v1.2.3 From 807fa4588c731f3f5564b0d09bedec4d51f4c2cf Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 19 Jun 2017 21:49:32 -0700 Subject: [cunit] Install generated config header --- ports/cunit/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/cunit/CMakeLists.txt b/ports/cunit/CMakeLists.txt index 21d212751..b796355aa 100644 --- a/ports/cunit/CMakeLists.txt +++ b/ports/cunit/CMakeLists.txt @@ -57,4 +57,5 @@ install( if(NOT DISABLE_INSTALL_HEADERS) install(DIRECTORY "${HEADERS_DIR}/" DESTINATION include/cunit FILES_MATCHING PATTERN "*.h") -endif() \ No newline at end of file + install(FILES "${PROJECT_BINARY_DIR}/CUnit.h" DESTINATION include/cunit) +endif() -- cgit v1.2.3 From bfc687284eea4588aee2b36bffc726573fc4153d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 19 Jun 2017 22:18:05 -0700 Subject: [libpng] Define CMAKE_SYSTEM_PROCESSOR to avoid double-eval failure --- ports/libpng/CONTROL | 2 +- ports/libpng/portfile.cmake | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index ec827ebd7..561cc81f8 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.29-1 +Version: 1.6.29-2 Build-Depends: zlib 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 be4cb526d..ebcf78aa8 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -23,6 +23,13 @@ else() set(PNG_SHARED_LIBS OFF) endif() +# Libpng's cmake uses if(${CMAKE_SYSTEM_PROCESSOR} ....) which performs double-evaluation and breaks if the variable is not defined. +if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(CMAKE_SYSTEM_PROCESSOR AMD64) +else() + set(CMAKE_SYSTEM_PROCESSOR ${VCPKG_TARGET_ARCHITECTURE}) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -32,6 +39,7 @@ vcpkg_configure_cmake( -DSKIP_INSTALL_PROGRAMS=ON -DSKIP_INSTALL_EXECUTABLES=ON -DSKIP_INSTALL_FILES=ON + -DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR} OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) -- cgit v1.2.3 From 72229384873eccbbad2b2993e5dc5ab2946886ed Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 19 Jun 2017 22:29:26 -0700 Subject: [libzip] Avoid renaming DLLs -- this breaks the import lib --- ports/libzip/CONTROL | 2 +- ports/libzip/portfile.cmake | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL index d5fd1042e..2106a5f94 100644 --- a/ports/libzip/CONTROL +++ b/ports/libzip/CONTROL @@ -1,4 +1,4 @@ Source: libzip -Version: 1.2.0 +Version: 1.2.0-1 Build-Depends: zlib Description: A library for reading, creating, and modifying zip archives. diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake index 62a0ddd22..fccb6cdf2 100644 --- a/ports/libzip/portfile.cmake +++ b/ports/libzip/portfile.cmake @@ -27,11 +27,9 @@ endif() vcpkg_install_cmake() -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/zip.dll ${CURRENT_PACKAGES_DIR}/debug/bin/zipd.dll) -else() +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/zipstatic.lib ${CURRENT_PACKAGES_DIR}/lib/zip.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/zipstatic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zipd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/zipstatic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zip.lib) endif() # Move zipconf.h to include and remove include directories from lib -- cgit v1.2.3 From b4dac2d58aa720f54acd777d4485d8b391f33ba1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 19 Jun 2017 23:23:03 -0700 Subject: [openni2] Fix patch. Disable kinect optional component. Move headers. --- ports/openni2/portfile.cmake | 60 ++++++++-------------------------- ports/openni2/upgrade_projects.patch | 63 ++++++++++++------------------------ 2 files changed, 34 insertions(+), 89 deletions(-) diff --git a/ports/openni2/portfile.cmake b/ports/openni2/portfile.cmake index 5d798e195..12ac4902b 100644 --- a/ports/openni2/portfile.cmake +++ b/ports/openni2/portfile.cmake @@ -21,6 +21,11 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(VCPKG_LIBRARY_LINKAGE "dynamic") endif() +# Static CRT linkage not supported +if (VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Warning: Static CRT linkage is not supported.") +endif() + # Download Source Code include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/OpenNI2-2.2-beta2) @@ -31,24 +36,12 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -# Apply Patches vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/upgrade_projects.patch" + PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable_kinect.patch" ) -set(KINECTSDK10_INSTALLED FALSE) -if(EXISTS "$ENV{KINECTSDK10_DIR}/inc/NuiApi.h") - set(KINECTSDK10_INSTALLED TRUE) -endif() - -if(NOT ${KINECTSDK10_INSTALLED}) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable_kinect.patch" - ) -endif() - # Build OpenNI2 vcpkg_build_msbuild( PROJECT_PATH "${SOURCE_PATH}/OpenNI.sln" @@ -71,7 +64,7 @@ file( INSTALL "${SOURCE_INCLUDE_PATH}/Android-Arm/OniPlatformAndroid-Arm.h" DESTINATION - ${CURRENT_PACKAGES_DIR}/include/Android-Arm + ${CURRENT_PACKAGES_DIR}/include/openni2/Android-Arm ) file( @@ -79,35 +72,35 @@ file( "${SOURCE_INCLUDE_PATH}/Driver/OniDriverAPI.h" "${SOURCE_INCLUDE_PATH}/Driver/OniDriverTypes.h" DESTINATION - ${CURRENT_PACKAGES_DIR}/include/Driver + ${CURRENT_PACKAGES_DIR}/include/openni2/Driver ) file( INSTALL "${SOURCE_INCLUDE_PATH}/Linux-Arm/OniPlatformLinux-Arm.h" DESTINATION - ${CURRENT_PACKAGES_DIR}/include/Linux-Arm + ${CURRENT_PACKAGES_DIR}/include/openni2/Linux-Arm ) file( INSTALL "${SOURCE_INCLUDE_PATH}/Linux-x86/OniPlatformLinux-x86.h" DESTINATION - ${CURRENT_PACKAGES_DIR}/include/Linux-x86 + ${CURRENT_PACKAGES_DIR}/include/openni2/Linux-x86 ) file( INSTALL "${SOURCE_INCLUDE_PATH}/MacOSX/OniPlatformMacOSX.h" DESTINATION - ${CURRENT_PACKAGES_DIR}/include/MacOSX + ${CURRENT_PACKAGES_DIR}/include/openni2/MacOSX ) file( INSTALL "${SOURCE_INCLUDE_PATH}/Win32/OniPlatformWin32.h" DESTINATION - ${CURRENT_PACKAGES_DIR}/include/Win32 + ${CURRENT_PACKAGES_DIR}/include/openni2/Win32 ) file( @@ -125,7 +118,7 @@ file( "${SOURCE_INCLUDE_PATH}/PS1080.h" "${SOURCE_INCLUDE_PATH}/PSLink.h" DESTINATION - ${CURRENT_PACKAGES_DIR}/include + ${CURRENT_PACKAGES_DIR}/include/openni2 ) file( @@ -153,15 +146,6 @@ file( ${CURRENT_PACKAGES_DIR}/bin/OpenNI2/Drivers ) -if(${KINECTSDK10_INSTALLED}) - file( - INSTALL - "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll" - DESTINATION - ${CURRENT_PACKAGES_DIR}/bin/OpenNI2/Drivers - ) -endif() - file( INSTALL "${SOURCE_CONFIG_PATH}/OpenNI.ini" @@ -181,15 +165,6 @@ file( ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2/Drivers ) -if(${KINECTSDK10_INSTALLED}) - file( - INSTALL - "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/Kinect.dll" - DESTINATION - ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2/Drivers - ) -endif() - file( INSTALL "${SOURCE_CONFIG_PATH}/OpenNI.ini" @@ -209,15 +184,6 @@ file( ${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers ) -if(${KINECTSDK10_INSTALLED}) - file( - INSTALL - "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll" - DESTINATION - ${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers - ) -endif() - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(NUMBEROFBIT 32) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") diff --git a/ports/openni2/upgrade_projects.patch b/ports/openni2/upgrade_projects.patch index c1d23b72f..1a44381b0 100644 --- a/ports/openni2/upgrade_projects.patch +++ b/ports/openni2/upgrade_projects.patch @@ -2,8 +2,7 @@ diff --git a/Samples/ClosestPointViewer/ClosestPointViewer.vcxproj b/Samples/Clo index fe63dbf..6050e8f 100644 --- a/Samples/ClosestPointViewer/ClosestPointViewer.vcxproj +++ b/Samples/ClosestPointViewer/ClosestPointViewer.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -85,8 +84,7 @@ diff --git a/Samples/EventBasedRead/EventBasedRead.vcxproj b/Samples/EventBasedR index f67db7a..ffe19ac 100644 --- a/Samples/EventBasedRead/EventBasedRead.vcxproj +++ b/Samples/EventBasedRead/EventBasedRead.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -160,8 +158,7 @@ diff --git a/Samples/MWClosestPoint/MWClosestPoint.vcxproj b/Samples/MWClosestPo index 74cafe7..5844506 100644 --- a/Samples/MWClosestPoint/MWClosestPoint.vcxproj +++ b/Samples/MWClosestPoint/MWClosestPoint.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -235,8 +232,7 @@ diff --git a/Samples/MWClosestPointApp/MWClosestPointApp.vcxproj b/Samples/MWClo index 063ec37..deb7c17 100644 --- a/Samples/MWClosestPointApp/MWClosestPointApp.vcxproj +++ b/Samples/MWClosestPointApp/MWClosestPointApp.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -310,8 +306,7 @@ diff --git a/Samples/MultiDepthViewer/MultiDepthViewer.vcxproj b/Samples/MultiDe index d021c0d..85a0d4f 100644 --- a/Samples/MultiDepthViewer/MultiDepthViewer.vcxproj +++ b/Samples/MultiDepthViewer/MultiDepthViewer.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -393,8 +388,7 @@ diff --git a/Samples/MultipleStreamRead/MultipleStreamRead.vcxproj b/Samples/Mul index 15887ec..5fa8202 100644 --- a/Samples/MultipleStreamRead/MultipleStreamRead.vcxproj +++ b/Samples/MultipleStreamRead/MultipleStreamRead.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -468,8 +462,7 @@ diff --git a/Samples/SimpleRead/SimpleRead.vcxproj b/Samples/SimpleRead/SimpleRe index de3942f..6ce41e3 100644 --- a/Samples/SimpleRead/SimpleRead.vcxproj +++ b/Samples/SimpleRead/SimpleRead.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -543,8 +536,7 @@ diff --git a/Samples/SimpleViewer/SimpleViewer.vcxproj b/Samples/SimpleViewer/Si index d693a1d..40621e1 100644 --- a/Samples/SimpleViewer/SimpleViewer.vcxproj +++ b/Samples/SimpleViewer/SimpleViewer.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -626,8 +618,7 @@ diff --git a/Source/Core/OpenNI.vcxproj b/Source/Core/OpenNI.vcxproj index 12189de..f176682 100644 --- a/Source/Core/OpenNI.vcxproj +++ b/Source/Core/OpenNI.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -701,8 +692,7 @@ diff --git a/Source/DepthUtils/DepthUtils.vcxproj b/Source/DepthUtils/DepthUtils index dcab0b7..e474661 100644 --- a/Source/DepthUtils/DepthUtils.vcxproj +++ b/Source/DepthUtils/DepthUtils.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -776,8 +766,7 @@ diff --git a/Source/Drivers/DummyDevice/DummyDevice.vcxproj b/Source/Drivers/Dum index 56c5944..0401f3d 100644 --- a/Source/Drivers/DummyDevice/DummyDevice.vcxproj +++ b/Source/Drivers/DummyDevice/DummyDevice.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -851,8 +840,7 @@ diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect index f54e8b2..7f54d04 100644 --- a/Source/Drivers/Kinect/Kinect.vcxproj +++ b/Source/Drivers/Kinect/Kinect.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -929,8 +917,7 @@ diff --git a/Source/Drivers/OniFile/OniFile.vcxproj b/Source/Drivers/OniFile/Oni index 9b173f7..e2f4391 100644 --- a/Source/Drivers/OniFile/OniFile.vcxproj +++ b/Source/Drivers/OniFile/OniFile.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -1004,8 +991,7 @@ diff --git a/Source/Drivers/PS1080/PS1080.vcxproj b/Source/Drivers/PS1080/PS1080 index 2a1154d..8495c28 100644 --- a/Source/Drivers/PS1080/PS1080.vcxproj +++ b/Source/Drivers/PS1080/PS1080.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -1079,8 +1065,7 @@ diff --git a/Source/Drivers/PS1080/PS1080Console/PS1080Console.vcxproj b/Source/ index b9adfea..7446d5a 100644 --- a/Source/Drivers/PS1080/PS1080Console/PS1080Console.vcxproj +++ b/Source/Drivers/PS1080/PS1080Console/PS1080Console.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -1159,8 +1144,7 @@ diff --git a/Source/Drivers/PSLink/PSLink.vcxproj b/Source/Drivers/PSLink/PSLink index 8915163..68a7e96 100644 --- a/Source/Drivers/PSLink/PSLink.vcxproj +++ b/Source/Drivers/PSLink/PSLink.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -1239,8 +1223,7 @@ diff --git a/Source/Drivers/PSLink/PSLinkConsole/PSLinkConsole.vcxproj b/Source/ index e6c7c8c..26ff9c8 100644 --- a/Source/Drivers/PSLink/PSLinkConsole/PSLinkConsole.vcxproj +++ b/Source/Drivers/PSLink/PSLinkConsole/PSLinkConsole.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -1319,8 +1302,7 @@ diff --git a/Source/Drivers/TestDevice/TestDevice.vcxproj b/Source/Drivers/TestD index e20a074..3777b2e 100644 --- a/Source/Drivers/TestDevice/TestDevice.vcxproj +++ b/Source/Drivers/TestDevice/TestDevice.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -1394,8 +1376,7 @@ diff --git a/Source/Tools/NiViewer/NiViewer.vcxproj b/Source/Tools/NiViewer/NiVi index 0a4c392..e331009 100644 --- a/Source/Tools/NiViewer/NiViewer.vcxproj +++ b/Source/Tools/NiViewer/NiViewer.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -1477,8 +1458,7 @@ diff --git a/ThirdParty/PSCommon/XnLib/Source/XnLib.vcxproj b/ThirdParty/PSCommo index 2761222..f2094b3 100644 --- a/ThirdParty/PSCommon/XnLib/Source/XnLib.vcxproj +++ b/ThirdParty/PSCommon/XnLib/Source/XnLib.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + @@ -1552,8 +1532,7 @@ diff --git a/Wrappers/java/OpenNI.jni/OpenNI.jni.vcxproj b/Wrappers/java/OpenNI. index b95c484..bfd0503 100644 --- a/Wrappers/java/OpenNI.jni/OpenNI.jni.vcxproj +++ b/Wrappers/java/OpenNI.jni/OpenNI.jni.vcxproj -@@ -1,5 +1,5 @@ - ・ソ +@@ -2,4 +2,4 @@ - + -- cgit v1.2.3 From c8d638bcd664ae3db1dbd0712a743b94d6124c11 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Jun 2017 01:08:04 -0700 Subject: [ffmpeg] Simplify UWP build slightly. Fix -MD/-MT to not apply during debug builds. --- ports/ffmpeg/CONTROL | 2 +- ports/ffmpeg/portfile.cmake | 26 +++++++++----------------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index eea91d568..443003d92 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,4 +1,4 @@ Source: ffmpeg -Version: 3.2.4-2 +Version: 3.2.4-3 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. \ No newline at end of file diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 3a5ea2fe4..702596b11 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -27,12 +27,10 @@ set(OPTIONS "--disable-ffmpeg --disable-ffprobe --disable-doc --enable-debug") set(OPTIONS "${OPTIONS} --enable-runtime-cpudetect") if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - SET(UWP TRUE) set(OPTIONS "${OPTIONS} --disable-programs --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") set(OPTIONS "${OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set(UWP_PLATFORM "arm") vcpkg_find_acquire_program(GASPREPROCESSOR) foreach(GAS_PATH ${GASPREPROCESSOR}) get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY) @@ -40,40 +38,34 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endforeach(GAS_PATH) ## Get Perl and GCC for MSYS2 - execute_process( + vcpkg_execute_required_process( COMMAND ${BASH} --noprofile --norc -c "PATH=/usr/bin:\$PATH;pacman -Sy --noconfirm --needed perl gcc" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME msys-${TARGET_TRIPLET} ) - elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(UWP_PLATFORM "x64") elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(UWP_PLATFORM "Win32") - else () + else() message(FATAL_ERROR "Unsupported architecture") endif() endif() set(OPTIONS_DEBUG "") # Note: --disable-optimizations can't be used due to http://ffmpeg.org/pipermail/libav-user/2013-March/003945.html +set(OPTIONS_RELEASE "") if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(OPTIONS "${OPTIONS} --disable-static --enable-shared") - if (UWP) + if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(OPTIONS "${OPTIONS} --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib") endif() endif() if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd") - if (NOT UWP) - set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-ldflags=-NODEFAULTLIB:libcmt") - endif() - set(OPTIONS "${OPTIONS} --extra-cflags=-MD --extra-cxxflags=-MD") + set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MD --extra-cxxflags=-MD") else() set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MTd --extra-cxxflags=-MTd") - if (NOT UWP) - set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-ldflags=-NODEFAULTLIB:libcmt") - endif() - set(OPTIONS "${OPTIONS} --extra-cflags=-MT --extra-cxxflags=-MT") + set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MT --extra-cxxflags=-MT") endif() message(STATUS "Building ${_csc_PROJECT_PATH} for Release") @@ -83,7 +75,7 @@ vcpkg_execute_required_process( "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" # BUILD DIR "${SOURCE_PATH}" # SOURCE DIR "${CURRENT_PACKAGES_DIR}" # PACKAGE DIR - "${OPTIONS}" + "${OPTIONS} ${OPTIONS_RELEASE}" WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel ) -- cgit v1.2.3 From 8741214bf69d1209a1e6d405ed8561d27f04436a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 17 Jun 2017 02:39:14 -0700 Subject: [vcpkg] Use unique_ptr<> for paragraphs. Post-parser phase rework. --- toolsrc/include/Paragraphs.h | 28 +++--- toolsrc/include/SourceParagraph.h | 24 ++--- toolsrc/include/StatusParagraph.h | 2 +- toolsrc/include/vcpkg_Build.h | 10 +- toolsrc/include/vcpkg_Parse.h | 36 ++++++++ toolsrc/include/vcpkg_expected.h | 6 +- toolsrc/include/vcpkglib.h | 1 + toolsrc/include/vcpkglib_helpers.h | 18 ---- toolsrc/src/BinaryParagraph.cpp | 46 +++++---- toolsrc/src/Paragraphs.cpp | 38 ++++---- toolsrc/src/SourceParagraph.cpp | 149 ++++++++++++++---------------- toolsrc/src/StatusParagraph.cpp | 12 ++- toolsrc/src/commands_build.cpp | 12 ++- toolsrc/src/commands_ci.cpp | 13 +-- toolsrc/src/commands_depends.cpp | 4 +- toolsrc/src/commands_list.cpp | 3 +- toolsrc/src/commands_portsdiff.cpp | 6 +- toolsrc/src/commands_search.cpp | 28 +++--- toolsrc/src/commands_update.cpp | 7 +- toolsrc/src/tests_paragraph.cpp | 66 ++++++------- toolsrc/src/vcpkg_Build.cpp | 83 ++++++++--------- toolsrc/src/vcpkg_Build_BuildPolicy.cpp | 11 --- toolsrc/src/vcpkg_Dependencies.cpp | 19 ++-- toolsrc/src/vcpkg_Parse.cpp | 59 ++++++++++++ toolsrc/src/vcpkglib.cpp | 10 +- toolsrc/src/vcpkglib_helpers.cpp | 56 ----------- toolsrc/vcpkglib/vcpkglib.vcxproj | 4 +- toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 12 +-- 28 files changed, 387 insertions(+), 376 deletions(-) create mode 100644 toolsrc/include/vcpkg_Parse.h delete mode 100644 toolsrc/include/vcpkglib_helpers.h create mode 100644 toolsrc/src/vcpkg_Parse.cpp delete mode 100644 toolsrc/src/vcpkglib_helpers.cpp diff --git a/toolsrc/include/Paragraphs.h b/toolsrc/include/Paragraphs.h index 83a32b2af..60f509266 100644 --- a/toolsrc/include/Paragraphs.h +++ b/toolsrc/include/Paragraphs.h @@ -1,36 +1,38 @@ #pragma once +#include + #include "BinaryParagraph.h" #include "VcpkgPaths.h" #include "VersionT.h" #include "filesystem_fs.h" +#include "vcpkg_Parse.h" #include "vcpkg_expected.h" -#include namespace vcpkg::Paragraphs { - using ParagraphDataMap = std::unordered_map; + using RawParagraph = Parse::RawParagraph; - Expected get_single_paragraph(const Files::Filesystem& fs, const fs::path& control_path); - Expected> get_paragraphs(const Files::Filesystem& fs, const fs::path& control_path); - Expected parse_single_paragraph(const std::string& str); - Expected> parse_paragraphs(const std::string& str); + Expected get_single_paragraph(const Files::Filesystem& fs, const fs::path& control_path); + Expected> get_paragraphs(const Files::Filesystem& fs, const fs::path& control_path); + Expected parse_single_paragraph(const std::string& str); + Expected> parse_paragraphs(const std::string& str); - ExpectedT try_load_port(const Files::Filesystem& fs, - const fs::path& control_path); + Parse::ParseExpected try_load_port(const Files::Filesystem& fs, const fs::path& control_path); Expected try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec); struct LoadResults { - std::vector paragraphs; - std::vector errors; + std::vector> paragraphs; + std::vector> errors; }; LoadResults try_load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); - std::vector load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); + std::vector> load_all_ports(const Files::Filesystem& fs, + const fs::path& ports_dir); - std::map extract_port_names_and_versions( - const std::vector& source_paragraphs); + std::map load_all_port_names_and_versions(const Files::Filesystem& fs, + const fs::path& ports_dir); } diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 31c9560cc..e85884b51 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -1,6 +1,7 @@ #pragma once #include "Span.h" +#include "vcpkg_Parse.h" #include "vcpkg_System.h" #include "vcpkg_expected.h" @@ -22,13 +23,6 @@ namespace vcpkg const std::string& to_string(const Dependency& dep); - struct ParseControlErrorInfo - { - std::string name; - std::string remaining_fields_as_string; - std::error_code error; - }; - struct FeatureParagraph { std::string name; @@ -47,23 +41,19 @@ namespace vcpkg std::string maintainer; std::vector supports; std::vector depends; - std::string default_features; + std::vector default_features; }; struct SourceControlFile { - static ExpectedT parse_control_file( - std::vector>&& control_paragraphs); + static Parse::ParseExpected parse_control_file( + std::vector&& control_paragraphs); - SourceParagraph core_paragraph; + std::unique_ptr core_paragraph; std::vector> feature_paragraphs; - - std::vector errors; }; - std::vector getSourceParagraphs(const std::vector& control_files); - - void print_error_message(span error_info_list); - inline void print_error_message(const ParseControlErrorInfo& error_info_list) + void print_error_message(span> error_info_list); + inline void print_error_message(const std::unique_ptr& error_info_list) { return print_error_message({&error_info_list, 1}); } diff --git a/toolsrc/include/StatusParagraph.h b/toolsrc/include/StatusParagraph.h index 2d1815dc0..b56533d65 100644 --- a/toolsrc/include/StatusParagraph.h +++ b/toolsrc/include/StatusParagraph.h @@ -29,7 +29,7 @@ namespace vcpkg struct StatusParagraph { StatusParagraph(); - explicit StatusParagraph(const std::unordered_map& fields); + explicit StatusParagraph(std::unordered_map&& fields); BinaryParagraph package; Want want; diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h index e13f66029..9a4e2baeb 100644 --- a/toolsrc/include/vcpkg_Build.h +++ b/toolsrc/include/vcpkg_Build.h @@ -120,14 +120,20 @@ namespace vcpkg::Build COUNT, }; - Optional to_build_policy(const std::string& str); + constexpr std::array g_all_policies = { + BuildPolicy::EMPTY_PACKAGE, + BuildPolicy::DLLS_WITHOUT_LIBS, + BuildPolicy::ONLY_RELEASE_CRT, + BuildPolicy::EMPTY_INCLUDE_FOLDER, + BuildPolicy::ALLOW_OBSOLETE_MSVCRT, + }; const std::string& to_string(BuildPolicy policy); CStringView to_cmake_variable(BuildPolicy policy); struct BuildPolicies { - BuildPolicies() {} + BuildPolicies() = default; BuildPolicies(std::map&& map) : m_policies(std::move(map)) {} inline bool is_enabled(BuildPolicy policy) const diff --git a/toolsrc/include/vcpkg_Parse.h b/toolsrc/include/vcpkg_Parse.h new file mode 100644 index 000000000..a2eb152dc --- /dev/null +++ b/toolsrc/include/vcpkg_Parse.h @@ -0,0 +1,36 @@ +#pragma once + +#include +#include + +#include "vcpkg_expected.h" +#include "vcpkg_optional.h" + +namespace vcpkg::Parse +{ + struct ParseControlErrorInfo + { + std::string name; + std::vector missing_fields; + std::vector extra_fields; + std::error_code error; + }; + + template + using ParseExpected = ExpectedT, std::unique_ptr>; + + using RawParagraph = std::unordered_map; + + struct ParagraphParser + { + ParagraphParser(RawParagraph&& fields) : fields(std::move(fields)) {} + + void required_field(const std::string& fieldname, std::string& out); + std::string optional_field(const std::string& fieldname); + std::unique_ptr error_info(const std::string& name) const; + + private: + RawParagraph&& fields; + std::vector missing_fields; + }; +} diff --git a/toolsrc/include/vcpkg_expected.h b/toolsrc/include/vcpkg_expected.h index 15dbf5e79..9637ec087 100644 --- a/toolsrc/include/vcpkg_expected.h +++ b/toolsrc/include/vcpkg_expected.h @@ -9,8 +9,10 @@ namespace vcpkg struct ErrorHolder { ErrorHolder() : m_is_error(false) {} - ErrorHolder(const Err& err) : m_is_error(true), m_err(err) {} - ErrorHolder(Err&& err) : m_is_error(true), m_err(std::move(err)) {} + template + ErrorHolder(U&& err) : m_is_error(true), m_err(std::forward(err)) + { + } constexpr bool has_error() const { return m_is_error; } diff --git a/toolsrc/include/vcpkglib.h b/toolsrc/include/vcpkglib.h index df64e5463..bd2400b77 100644 --- a/toolsrc/include/vcpkglib.h +++ b/toolsrc/include/vcpkglib.h @@ -36,4 +36,5 @@ namespace vcpkg const fs::path& cmake_script, const std::vector& pass_variables); + std::string shorten_description(const std::string& desc); } // namespace vcpkg diff --git a/toolsrc/include/vcpkglib_helpers.h b/toolsrc/include/vcpkglib_helpers.h deleted file mode 100644 index a8ddcde4d..000000000 --- a/toolsrc/include/vcpkglib_helpers.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include - -namespace vcpkg::details -{ - std::string optional_field(const std::unordered_map& fields, - const std::string& fieldname); - std::string remove_optional_field(std::unordered_map* fields, - const std::string& fieldname); - - std::string required_field(const std::unordered_map& fields, - const std::string& fieldname); - std::string remove_required_field(std::unordered_map* fields, - const std::string& fieldname); - - std::string shorten_description(const std::string& desc); -} diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp index 21980cd7d..af76c6b29 100644 --- a/toolsrc/src/BinaryParagraph.cpp +++ b/toolsrc/src/BinaryParagraph.cpp @@ -2,13 +2,11 @@ #include "BinaryParagraph.h" #include "vcpkg_Checks.h" -#include "vcpkglib_helpers.h" - -using namespace vcpkg::details; +#include "vcpkg_Parse.h" namespace vcpkg { - namespace BinaryParagraphRequiredField + namespace Fields { static const std::string PACKAGE = "Package"; static const std::string VERSION = "Version"; @@ -16,7 +14,7 @@ namespace vcpkg static const std::string MULTI_ARCH = "Multi-Arch"; } - namespace BinaryParagraphOptionalField + namespace Fields { static const std::string DESCRIPTION = "Description"; static const std::string MAINTAINER = "Maintainer"; @@ -27,22 +25,36 @@ namespace vcpkg BinaryParagraph::BinaryParagraph(std::unordered_map fields) { - const std::string name = details::remove_required_field(&fields, BinaryParagraphRequiredField::PACKAGE); - const std::string architecture = - details::remove_required_field(&fields, BinaryParagraphRequiredField::ARCHITECTURE); - const Triplet triplet = Triplet::from_canonical_name(architecture); + using namespace vcpkg::Parse; - this->spec = PackageSpec::from_name_and_triplet(name, triplet).value_or_exit(VCPKG_LINE_INFO); - this->version = details::remove_required_field(&fields, BinaryParagraphRequiredField::VERSION); + ParagraphParser parser(std::move(fields)); - this->description = details::remove_optional_field(&fields, BinaryParagraphOptionalField::DESCRIPTION); - this->maintainer = details::remove_optional_field(&fields, BinaryParagraphOptionalField::MAINTAINER); + { + std::string name; + parser.required_field(Fields::PACKAGE, name); + std::string architecture; + parser.required_field(Fields::ARCHITECTURE, architecture); + this->spec = PackageSpec::from_name_and_triplet(name, Triplet::from_canonical_name(architecture)) + .value_or_exit(VCPKG_LINE_INFO); + } - std::string multi_arch = details::remove_required_field(&fields, BinaryParagraphRequiredField::MULTI_ARCH); - Checks::check_exit(VCPKG_LINE_INFO, multi_arch == "same", "Multi-Arch must be 'same' but was %s", multi_arch); + parser.required_field(Fields::VERSION, this->version); + this->description = parser.optional_field(Fields::DESCRIPTION); + this->maintainer = parser.optional_field(Fields::MAINTAINER); + + std::string multi_arch; + parser.required_field(Fields::MULTI_ARCH, multi_arch); - std::string deps = details::remove_optional_field(&fields, BinaryParagraphOptionalField::DEPENDS); - this->depends = parse_comma_list(deps); + this->depends = parse_comma_list(parser.optional_field(Fields::DEPENDS)); + + if (auto err = parser.error_info(this->spec.name())) + { + print_error_message(err); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + // prefer failing above when possible because it gives better information + Checks::check_exit(VCPKG_LINE_INFO, multi_arch == "same", "Multi-Arch must be 'same' but was %s", multi_arch); } BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet) diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp index 440d04ce4..3749e919e 100644 --- a/toolsrc/src/Paragraphs.cpp +++ b/toolsrc/src/Paragraphs.cpp @@ -4,6 +4,8 @@ #include "Paragraphs.h" #include "vcpkg_Files.h" +using namespace vcpkg::Parse; + namespace vcpkg::Paragraphs { struct Parser @@ -201,9 +203,8 @@ namespace vcpkg::Paragraphs return Parser(str.c_str(), str.c_str() + str.size()).get_paragraphs(); } - ExpectedT try_load_port(const Files::Filesystem& fs, const fs::path& path) + ParseExpected try_load_port(const Files::Filesystem& fs, const fs::path& path) { - ParseControlErrorInfo error_info; Expected>> pghs = get_paragraphs(fs, path / "CONTROL"); if (auto vector_pghs = pghs.get()) { @@ -212,14 +213,16 @@ namespace vcpkg::Paragraphs { if (auto ptr = csf.get()) { - ptr->core_paragraph.default_features.clear(); - ptr->feature_paragraphs.clear(); + Checks::check_exit(VCPKG_LINE_INFO, ptr->get() != nullptr); + ptr->get()->core_paragraph->default_features.clear(); + ptr->get()->feature_paragraphs.clear(); } } return csf; } - error_info.name = path.filename().generic_u8string(); - error_info.error = pghs.error(); + auto error_info = std::make_unique(); + error_info->name = path.filename().generic_u8string(); + error_info->error = pghs.error(); return error_info; } @@ -241,20 +244,21 @@ namespace vcpkg::Paragraphs LoadResults ret; for (auto&& path : fs.get_files_non_recursive(ports_dir)) { - ExpectedT source_paragraph = try_load_port(fs, path); - if (auto srcpgh = source_paragraph.get()) + auto maybe_spgh = try_load_port(fs, path); + if (auto spgh = maybe_spgh.get()) { - ret.paragraphs.emplace_back(std::move(*srcpgh)); + ret.paragraphs.emplace_back(std::move(*spgh)); } else { - ret.errors.emplace_back(source_paragraph.error()); + ret.errors.emplace_back(std::move(maybe_spgh).error()); } } return ret; } - std::vector load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir) + std::vector> load_all_ports(const Files::Filesystem& fs, + const fs::path& ports_dir) { auto results = try_load_all_ports(fs, ports_dir); if (!results.errors.empty()) @@ -265,14 +269,14 @@ namespace vcpkg::Paragraphs return std::move(results.paragraphs); } - std::map extract_port_names_and_versions( - const std::vector& source_paragraphs) + std::map load_all_port_names_and_versions(const Files::Filesystem& fs, + const fs::path& ports_dir) { + auto all_ports = load_all_ports(fs, ports_dir); + std::map names_and_versions; - for (const SourceParagraph& port : source_paragraphs) - { - names_and_versions.emplace(port.name, port.version); - } + for (auto&& port : all_ports) + names_and_versions.emplace(port->core_paragraph->name, port->core_paragraph->version); return names_and_versions; } diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index a938feb99..83b8e2e2d 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -8,73 +8,56 @@ #include "vcpkg_Util.h" #include "vcpkg_expected.h" -#include "vcpkglib_helpers.h" - namespace vcpkg { - bool g_feature_packages = false; - namespace SourceParagraphRequiredField - { - static const std::string SOURCE = "Source"; - static const std::string VERSION = "Version"; - } + using namespace vcpkg::Parse; - namespace SourceParagraphOptionalField + bool g_feature_packages = false; + namespace Fields { + static const std::string BUILD_DEPENDS = "Build-Depends"; + static const std::string DEFAULTFEATURES = "Default-Features"; static const std::string DESCRIPTION = "Description"; + static const std::string FEATURE = "Feature"; static const std::string MAINTAINER = "Maintainer"; - static const std::string BUILD_DEPENDS = "Build-Depends"; + static const std::string SOURCE = "Source"; static const std::string SUPPORTS = "Supports"; - static const std::string DEFAULTFEATURES = "Default-Features"; + static const std::string VERSION = "Version"; } static span get_list_of_valid_fields() { - static const std::string valid_fields[] = {SourceParagraphRequiredField::SOURCE, - SourceParagraphRequiredField::VERSION, - - SourceParagraphOptionalField::DESCRIPTION, - SourceParagraphOptionalField::MAINTAINER, - SourceParagraphOptionalField::BUILD_DEPENDS, - SourceParagraphOptionalField::SUPPORTS}; + static const std::string valid_fields[] = { + Fields::SOURCE, Fields::VERSION, Fields::DESCRIPTION, Fields::MAINTAINER, Fields::BUILD_DEPENDS, + }; return valid_fields; } - namespace FeatureParagraphRequiredField - { - static const std::string FEATURE = "Feature"; - } - - namespace FeatureParagraphOptionalField - { - static const std::string DESCRIPTION = "Description"; - static const std::string BUILD_DEPENDS = "Build-Depends"; - } - - void print_error_message(span error_info_list) + void print_error_message(span> error_info_list) { Checks::check_exit(VCPKG_LINE_INFO, error_info_list.size() > 0); for (auto&& error_info : error_info_list) { - if (error_info.error) + Checks::check_exit(VCPKG_LINE_INFO, error_info != nullptr); + if (error_info->error) { System::println( - System::Color::error, "Error: while loading %s: %s", error_info.name, error_info.error.message()); + System::Color::error, "Error: while loading %s: %s", error_info->name, error_info->error.message()); } } bool have_remaining_fields = false; for (auto&& error_info : error_info_list) { - if (!error_info.remaining_fields_as_string.empty()) + if (!error_info->extra_fields.empty()) { System::println(System::Color::error, "Error: There are invalid fields in the Source Paragraph of %s", - error_info.name); + error_info->name); System::println("The following fields were not expected:\n\n %s\n\n", - error_info.remaining_fields_as_string); + Strings::join("\n ", error_info->extra_fields)); have_remaining_fields = true; } } @@ -86,71 +69,75 @@ namespace vcpkg System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n"); } } - std::vector getSourceParagraphs(const std::vector& control_files) + + static ParseExpected parse_source_paragraph(RawParagraph&& fields) { - return Util::fmap(control_files, [](const SourceControlFile& x) { return x.core_paragraph; }); + ParagraphParser parser(std::move(fields)); + + auto spgh = std::make_unique(); + + parser.required_field(Fields::SOURCE, spgh->name); + parser.required_field(Fields::VERSION, spgh->version); + + spgh->description = parser.optional_field(Fields::DESCRIPTION); + spgh->maintainer = parser.optional_field(Fields::MAINTAINER); + spgh->depends = expand_qualified_dependencies(parse_comma_list(parser.optional_field(Fields::BUILD_DEPENDS))); + spgh->supports = parse_comma_list(parser.optional_field(Fields::SUPPORTS)); + spgh->default_features = parse_comma_list(parser.optional_field(Fields::DEFAULTFEATURES)); + + auto err = parser.error_info(spgh->name); + if (err) + return std::move(err); + else + return std::move(spgh); } - ExpectedT SourceControlFile::parse_control_file( - std::vector>&& control_paragraphs) + static ParseExpected parse_feature_paragraph(RawParagraph&& fields) { - if (control_paragraphs.size() == 0) - { - return ExpectedT(); - } - auto&& fields = control_paragraphs.front(); + ParagraphParser parser(std::move(fields)); - SourceControlFile control_file; - SourceParagraph& sparagraph = control_file.core_paragraph; - sparagraph.name = details::remove_required_field(&fields, SourceParagraphRequiredField::SOURCE); - sparagraph.version = details::remove_required_field(&fields, SourceParagraphRequiredField::VERSION); - sparagraph.description = details::remove_optional_field(&fields, SourceParagraphOptionalField::DESCRIPTION); - sparagraph.maintainer = details::remove_optional_field(&fields, SourceParagraphOptionalField::MAINTAINER); + auto fpgh = std::make_unique(); - std::string deps = details::remove_optional_field(&fields, SourceParagraphOptionalField::BUILD_DEPENDS); - sparagraph.depends = expand_qualified_dependencies(parse_comma_list(deps)); + parser.required_field(Fields::FEATURE, fpgh->name); + parser.required_field(Fields::DESCRIPTION, fpgh->description); - std::string sups = details::remove_optional_field(&fields, SourceParagraphOptionalField::SUPPORTS); - sparagraph.supports = parse_comma_list(sups); + fpgh->depends = expand_qualified_dependencies(parse_comma_list(parser.optional_field(Fields::BUILD_DEPENDS))); - sparagraph.default_features = - details::remove_optional_field(&fields, SourceParagraphOptionalField::DEFAULTFEATURES); + auto err = parser.error_info(fpgh->name); + if (err) + return std::move(err); + else + return std::move(fpgh); + } - if (!fields.empty()) + ParseExpected SourceControlFile::parse_control_file( + std::vector>&& control_paragraphs) + { + if (control_paragraphs.size() == 0) { - const std::vector remaining_fields = Maps::extract_keys(fields); + return std::make_unique(); + } - const std::string remaining_fields_as_string = Strings::join("\n ", remaining_fields); + auto control_file = std::make_unique(); - return ParseControlErrorInfo{sparagraph.name, remaining_fields_as_string}; - } + auto maybe_source = parse_source_paragraph(std::move(control_paragraphs.front())); + if (auto source = maybe_source.get()) + control_file->core_paragraph = std::move(*source); + else + return std::move(maybe_source).error(); control_paragraphs.erase(control_paragraphs.begin()); for (auto&& feature_pgh : control_paragraphs) { - control_file.feature_paragraphs.emplace_back(std::make_unique()); - - FeatureParagraph& fparagraph = *control_file.feature_paragraphs.back(); - - fparagraph.name = details::remove_required_field(&feature_pgh, FeatureParagraphRequiredField::FEATURE); - fparagraph.description = - details::remove_required_field(&feature_pgh, FeatureParagraphOptionalField::DESCRIPTION); - std::string feature_deps = - details::remove_optional_field(&feature_pgh, FeatureParagraphOptionalField::BUILD_DEPENDS); - fparagraph.depends = expand_qualified_dependencies(parse_comma_list(feature_deps)); - - if (!feature_pgh.empty()) - { - const std::vector remaining_fields = Maps::extract_keys(feature_pgh); - - const std::string remaining_fields_as_string = Strings::join("\n ", remaining_fields); - - return ParseControlErrorInfo{sparagraph.name, remaining_fields_as_string}; - } + auto maybe_feature = parse_feature_paragraph(std::move(feature_pgh)); + if (auto feature = maybe_feature.get()) + control_file->feature_paragraphs.emplace_back(std::move(*feature)); + else + return std::move(maybe_feature).error(); } - return control_file; + return std::move(control_file); } std::vector vcpkg::expand_qualified_dependencies(const std::vector& depends) diff --git a/toolsrc/src/StatusParagraph.cpp b/toolsrc/src/StatusParagraph.cpp index b9ceed278..5b5c3978f 100644 --- a/toolsrc/src/StatusParagraph.cpp +++ b/toolsrc/src/StatusParagraph.cpp @@ -1,9 +1,8 @@ #include "pch.h" #include "StatusParagraph.h" -#include "vcpkglib_helpers.h" -using namespace vcpkg::details; +using namespace vcpkg::Parse; namespace vcpkg { @@ -24,9 +23,14 @@ namespace vcpkg .push_back('\n'); } - StatusParagraph::StatusParagraph(const std::unordered_map& fields) : package(fields) + StatusParagraph::StatusParagraph(std::unordered_map&& fields) { - std::string status_field = required_field(fields, BinaryParagraphRequiredField::STATUS); + auto status_it = fields.find(BinaryParagraphRequiredField::STATUS); + Checks::check_exit(VCPKG_LINE_INFO, status_it != fields.end(), "Expected 'Status' field in status paragraph"); + std::string status_field = std::move(status_it->second); + fields.erase(status_it); + + this->package = BinaryParagraph(std::move(fields)); auto b = status_field.begin(); auto mark = b; diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index a9e4f574e..4da9cede2 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -11,6 +11,8 @@ #include "vcpkglib.h" using vcpkg::Build::BuildResult; +using vcpkg::Parse::ParseControlErrorInfo; +using vcpkg::Parse::ParseExpected; namespace vcpkg::Commands::BuildCommand { @@ -34,7 +36,7 @@ namespace vcpkg::Commands::BuildCommand Checks::exit_success(VCPKG_LINE_INFO); } - const ExpectedT source_control_file = + const ParseExpected source_control_file = Paragraphs::try_load_port(paths.get_filesystem(), port_dir); if (!source_control_file.has_value()) @@ -47,18 +49,18 @@ namespace vcpkg::Commands::BuildCommand { System::println("%s \n", str); } - const SourceControlFile& scf = source_control_file.value_or_exit(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 Name: field inside the CONTROL does not match the port directory: '%s' != '%s'", - scf.core_paragraph.name, + scf->core_paragraph->name, spec.name()); StatusParagraphs status_db = database_load_check(paths); Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; const Build::BuildPackageConfig build_config{ - scf.core_paragraph, spec.triplet(), paths.port_dir(spec), build_package_options}; + *scf->core_paragraph, spec.triplet(), paths.port_dir(spec), build_package_options}; const auto result = Build::build_package(paths, build_config, status_db); if (result.code == BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES) diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp index 65e44e847..7ffc7577a 100644 --- a/toolsrc/src/commands_ci.cpp +++ b/toolsrc/src/commands_ci.cpp @@ -8,6 +8,7 @@ #include "vcpkg_Files.h" #include "vcpkg_Input.h" #include "vcpkg_System.h" +#include "vcpkg_Util.h" #include "vcpkglib.h" namespace vcpkg::Commands::CI @@ -21,14 +22,10 @@ namespace vcpkg::Commands::CI const Triplet& triplet) { auto ports = Paragraphs::load_all_ports(fs, ports_directory); - std::vector specs; - for (const SourceControlFile& control_file : ports) - { - const SourceParagraph& p = control_file.core_paragraph; - specs.push_back(PackageSpec::from_name_and_triplet(p.name, triplet).value_or_exit(VCPKG_LINE_INFO)); - } - - return specs; + return Util::fmap(ports, [&](auto&& control_file) -> PackageSpec { + return PackageSpec::from_name_and_triplet(control_file->core_paragraph->name, triplet) + .value_or_exit(VCPKG_LINE_INFO); + }); } void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) diff --git a/toolsrc/src/commands_depends.cpp b/toolsrc/src/commands_depends.cpp index 468bf5d72..ccfe58e4e 100644 --- a/toolsrc/src/commands_depends.cpp +++ b/toolsrc/src/commands_depends.cpp @@ -15,9 +15,9 @@ namespace vcpkg::Commands::DependInfo const auto source_control_files = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - for (const SourceControlFile& source_control_file : source_control_files) + 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; auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name; }); System::println("%s: %s", source_paragraph.name, s); } diff --git a/toolsrc/src/commands_list.cpp b/toolsrc/src/commands_list.cpp index d21883fc2..9bc9bcc08 100644 --- a/toolsrc/src/commands_list.cpp +++ b/toolsrc/src/commands_list.cpp @@ -3,7 +3,6 @@ #include "vcpkg_Commands.h" #include "vcpkg_System.h" #include "vcpkglib.h" -#include "vcpkglib_helpers.h" namespace vcpkg::Commands::List { @@ -20,7 +19,7 @@ namespace vcpkg::Commands::List System::println("%-27s %-16s %s", pgh.package.displayname(), pgh.package.version, - details::shorten_description(pgh.package.description)); + vcpkg::shorten_description(pgh.package.description)); } } diff --git a/toolsrc/src/commands_portsdiff.cpp b/toolsrc/src/commands_portsdiff.cpp index e872c394d..83d62896f 100644 --- a/toolsrc/src/commands_portsdiff.cpp +++ b/toolsrc/src/commands_portsdiff.cpp @@ -97,10 +97,8 @@ namespace vcpkg::Commands::PortsDiff L".vcpkg-root", git_exe.native()); System::cmd_execute_clean(cmd); - const std::vector source_control_files = - Paragraphs::load_all_ports(paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string); - const std::map names_and_versions = - Paragraphs::extract_port_names_and_versions(getSourceParagraphs(source_control_files)); + const std::map names_and_versions = Paragraphs::load_all_port_names_and_versions( + paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string); fs.remove_all(temp_checkout_path, ec); return names_and_versions; } diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index b39d21887..fee99a5db 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -5,7 +5,6 @@ #include "vcpkg_Commands.h" #include "vcpkg_System.h" #include "vcpkglib.h" -#include "vcpkglib_helpers.h" namespace vcpkg::Commands::Search { @@ -19,16 +18,17 @@ namespace vcpkg::Commands::Search return output; } - static std::string create_graph_as_string(const std::vector& source_control_files) + static std::string create_graph_as_string( + const std::vector>& source_control_files) { int empty_node_count = 0; std::string s; s.append("digraph G{ rankdir=LR; edge [minlen=3]; overlap=false;"); - for (const SourceControlFile& source_control_file : source_control_files) + for (const 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; if (source_paragraph.depends.empty()) { empty_node_count++; @@ -59,7 +59,7 @@ namespace vcpkg::Commands::Search System::println("%-20s %-16s %s", source_paragraph.name, source_paragraph.version, - details::shorten_description(source_paragraph.description)); + vcpkg::shorten_description(source_paragraph.description)); } } @@ -73,7 +73,7 @@ namespace vcpkg::Commands::Search { System::println("%-37s %s", name + "[" + feature_paragraph.name + "]", - details::shorten_description(feature_paragraph.description)); + vcpkg::shorten_description(feature_paragraph.description)); } } @@ -99,7 +99,7 @@ namespace vcpkg::Commands::Search for (auto&& error : sources_and_errors.errors) { System::println( - System::Color::warning, "Warning: an error occurred while parsing '%s'", error.name); + System::Color::warning, "Warning: an error occurred while parsing '%s'", error->name); } System::println(System::Color::warning, "Use '--debug' to get more information about the parse failures.\n"); @@ -116,12 +116,12 @@ namespace vcpkg::Commands::Search if (args.command_arguments.empty()) { - for (const SourceControlFile& source_control_file : source_paragraphs) + for (const auto& source_control_file : source_paragraphs) { - do_print(source_control_file.core_paragraph, options.find(OPTION_FULLDESC) != options.cend()); - for (auto&& feature_paragraph : source_control_file.feature_paragraphs) + do_print(*source_control_file->core_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + for (auto&& feature_paragraph : source_control_file->feature_paragraphs) { - do_print(source_control_file.core_paragraph.name, + do_print(source_control_file->core_paragraph->name, *feature_paragraph, options.find(OPTION_FULLDESC) != options.cend()); } @@ -133,9 +133,9 @@ namespace vcpkg::Commands::Search // At this point there is 1 argument auto&& args_zero = args.command_arguments[0]; - for (const SourceControlFile& source_control_file : source_paragraphs) + for (const auto& source_control_file : source_paragraphs) { - auto&& sp = source_control_file.core_paragraph; + auto&& sp = *source_control_file->core_paragraph; bool contains_name = icontains(sp.name, args_zero); if (contains_name || icontains(sp.description, args_zero)) @@ -143,7 +143,7 @@ namespace vcpkg::Commands::Search do_print(sp, options.find(OPTION_FULLDESC) != options.cend()); } - for (auto&& feature_paragraph : source_control_file.feature_paragraphs) + for (auto&& feature_paragraph : source_control_file->feature_paragraphs) { if (contains_name || icontains(feature_paragraph->name, args_zero) || icontains(feature_paragraph->description, args_zero)) diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index f00a89da4..35f24af12 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -15,10 +15,8 @@ namespace vcpkg::Commands::Update std::vector find_outdated_packages(const VcpkgPaths& paths, const StatusParagraphs& status_db) { - auto source_control_files = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - const std::vector source_paragraphs = getSourceParagraphs(source_control_files); const std::map src_names_to_versions = - Paragraphs::extract_port_names_and_versions(source_paragraphs); + Paragraphs::load_all_port_names_and_versions(paths.get_filesystem(), paths.ports); const std::vector installed_packages = get_installed_ports(status_db); std::vector output; @@ -67,7 +65,8 @@ namespace vcpkg::Commands::Update System::println("\n" "To update these packages, run\n" " .\\vcpkg remove --outdated\n" - " .\\vcpkg install " + install_line); + " .\\vcpkg install " + + install_line); } auto version_file = paths.get_filesystem().read_contents(paths.root / "toolsrc" / "VERSION.txt"); diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests_paragraph.cpp index 8dff520fb..2a53cc8b4 100644 --- a/toolsrc/src/tests_paragraph.cpp +++ b/toolsrc/src/tests_paragraph.cpp @@ -33,11 +33,11 @@ namespace UnitTest1 Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); - Assert::AreEqual("zlib", pgh.core_paragraph.name.c_str()); - Assert::AreEqual("1.2.8", pgh.core_paragraph.version.c_str()); - Assert::AreEqual("", pgh.core_paragraph.maintainer.c_str()); - Assert::AreEqual("", pgh.core_paragraph.description.c_str()); - Assert::AreEqual(size_t(0), pgh.core_paragraph.depends.size()); + Assert::AreEqual("zlib", pgh->core_paragraph->name.c_str()); + Assert::AreEqual("1.2.8", pgh->core_paragraph->version.c_str()); + Assert::AreEqual("", pgh->core_paragraph->maintainer.c_str()); + Assert::AreEqual("", pgh->core_paragraph->description.c_str()); + Assert::AreEqual(size_t(0), pgh->core_paragraph->depends.size()); } TEST_METHOD(SourceParagraph_Construct_Maximum) @@ -54,14 +54,14 @@ namespace UnitTest1 Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); - Assert::AreEqual("s", pgh.core_paragraph.name.c_str()); - Assert::AreEqual("v", pgh.core_paragraph.version.c_str()); - Assert::AreEqual("m", pgh.core_paragraph.maintainer.c_str()); - Assert::AreEqual("d", pgh.core_paragraph.description.c_str()); - Assert::AreEqual(size_t(1), pgh.core_paragraph.depends.size()); - Assert::AreEqual("bd", pgh.core_paragraph.depends[0].name.c_str()); - Assert::AreEqual(size_t(1), pgh.core_paragraph.supports.size()); - Assert::AreEqual("x64", pgh.core_paragraph.supports[0].c_str()); + Assert::AreEqual("s", pgh->core_paragraph->name.c_str()); + Assert::AreEqual("v", pgh->core_paragraph->version.c_str()); + Assert::AreEqual("m", pgh->core_paragraph->maintainer.c_str()); + Assert::AreEqual("d", pgh->core_paragraph->description.c_str()); + Assert::AreEqual(size_t(1), pgh->core_paragraph->depends.size()); + Assert::AreEqual("bd", pgh->core_paragraph->depends[0].name.c_str()); + Assert::AreEqual(size_t(1), pgh->core_paragraph->supports.size()); + Assert::AreEqual("x64", pgh->core_paragraph->supports[0].c_str()); } TEST_METHOD(SourceParagraph_Two_Depends) @@ -73,9 +73,9 @@ namespace UnitTest1 Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); - Assert::AreEqual(size_t(2), pgh.core_paragraph.depends.size()); - Assert::AreEqual("z", pgh.core_paragraph.depends[0].name.c_str()); - Assert::AreEqual("openssl", pgh.core_paragraph.depends[1].name.c_str()); + Assert::AreEqual(size_t(2), pgh->core_paragraph->depends.size()); + Assert::AreEqual("z", pgh->core_paragraph->depends[0].name.c_str()); + Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name.c_str()); } TEST_METHOD(SourceParagraph_Three_Depends) @@ -87,10 +87,10 @@ namespace UnitTest1 Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); - Assert::AreEqual(size_t(3), pgh.core_paragraph.depends.size()); - Assert::AreEqual("z", pgh.core_paragraph.depends[0].name.c_str()); - Assert::AreEqual("openssl", pgh.core_paragraph.depends[1].name.c_str()); - Assert::AreEqual("xyz", pgh.core_paragraph.depends[2].name.c_str()); + Assert::AreEqual(size_t(3), pgh->core_paragraph->depends.size()); + Assert::AreEqual("z", pgh->core_paragraph->depends[0].name.c_str()); + Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name.c_str()); + Assert::AreEqual("xyz", pgh->core_paragraph->depends[2].name.c_str()); } TEST_METHOD(SourceParagraph_Three_Supports) @@ -102,10 +102,10 @@ namespace UnitTest1 Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); - Assert::AreEqual(size_t(3), pgh.core_paragraph.supports.size()); - Assert::AreEqual("x64", pgh.core_paragraph.supports[0].c_str()); - Assert::AreEqual("windows", pgh.core_paragraph.supports[1].c_str()); - Assert::AreEqual("uwp", pgh.core_paragraph.supports[2].c_str()); + Assert::AreEqual(size_t(3), pgh->core_paragraph->supports.size()); + Assert::AreEqual("x64", pgh->core_paragraph->supports[0].c_str()); + Assert::AreEqual("windows", pgh->core_paragraph->supports[1].c_str()); + Assert::AreEqual("uwp", pgh->core_paragraph->supports[2].c_str()); } TEST_METHOD(SourceParagraph_Construct_Qualified_Depends) @@ -117,15 +117,15 @@ namespace UnitTest1 Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); - Assert::AreEqual("zlib", pgh.core_paragraph.name.c_str()); - Assert::AreEqual("1.2.8", pgh.core_paragraph.version.c_str()); - Assert::AreEqual("", pgh.core_paragraph.maintainer.c_str()); - Assert::AreEqual("", pgh.core_paragraph.description.c_str()); - Assert::AreEqual(size_t(2), pgh.core_paragraph.depends.size()); - Assert::AreEqual("libA", pgh.core_paragraph.depends[0].name.c_str()); - Assert::AreEqual("windows", pgh.core_paragraph.depends[0].qualifier.c_str()); - Assert::AreEqual("libB", pgh.core_paragraph.depends[1].name.c_str()); - Assert::AreEqual("uwp", pgh.core_paragraph.depends[1].qualifier.c_str()); + Assert::AreEqual("zlib", pgh->core_paragraph->name.c_str()); + Assert::AreEqual("1.2.8", pgh->core_paragraph->version.c_str()); + Assert::AreEqual("", pgh->core_paragraph->maintainer.c_str()); + Assert::AreEqual("", pgh->core_paragraph->description.c_str()); + Assert::AreEqual(size_t(2), pgh->core_paragraph->depends.size()); + Assert::AreEqual("libA", pgh->core_paragraph->depends[0].name.c_str()); + Assert::AreEqual("windows", pgh->core_paragraph->depends[0].qualifier.c_str()); + Assert::AreEqual("libB", pgh->core_paragraph->depends[1].name.c_str()); + Assert::AreEqual("uwp", pgh->core_paragraph->depends[1].qualifier.c_str()); } TEST_METHOD(BinaryParagraph_Construct_Minimum) diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index 0ca6dc243..a73d59910 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -11,7 +11,6 @@ #include "vcpkg_System.h" #include "vcpkg_optional.h" #include "vcpkglib.h" -#include "vcpkglib_helpers.h" namespace vcpkg::Build { @@ -218,56 +217,52 @@ namespace vcpkg::Build static BuildInfo inner_create_buildinfo(std::unordered_map pgh) { + Parse::ParagraphParser parser(std::move(pgh)); + BuildInfo build_info; - const std::string crt_linkage_as_string = - details::remove_required_field(&pgh, BuildInfoRequiredField::CRT_LINKAGE); - - auto crtlinkage = to_linkage_type(crt_linkage_as_string); - if (auto p = crtlinkage.get()) - build_info.crt_linkage = *p; - else - Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid crt linkage type: [%s]", crt_linkage_as_string); - - const std::string library_linkage_as_string = - details::remove_required_field(&pgh, BuildInfoRequiredField::LIBRARY_LINKAGE); - auto liblinkage = to_linkage_type(library_linkage_as_string); - if (auto p = liblinkage.get()) - build_info.library_linkage = *p; - else - Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid library linkage type: [%s]", library_linkage_as_string); - - auto it_version = pgh.find("Version"); - if (it_version != pgh.end()) + { - build_info.version = it_version->second; - pgh.erase(it_version); + std::string crt_linkage_as_string; + parser.required_field(BuildInfoRequiredField::CRT_LINKAGE, crt_linkage_as_string); + + auto crtlinkage = to_linkage_type(crt_linkage_as_string); + if (auto p = crtlinkage.get()) + build_info.crt_linkage = *p; + else + Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid crt linkage type: [%s]", crt_linkage_as_string); } - std::map policies; + { + std::string library_linkage_as_string; + parser.required_field(BuildInfoRequiredField::LIBRARY_LINKAGE, library_linkage_as_string); + auto liblinkage = to_linkage_type(library_linkage_as_string); + if (auto p = liblinkage.get()) + build_info.library_linkage = *p; + else + Checks::exit_with_message( + VCPKG_LINE_INFO, "Invalid library linkage type: [%s]", library_linkage_as_string); + } + build_info.version = parser.optional_field("Version"); - // The remaining entries are policies - for (const std::unordered_map::value_type& p : pgh) + std::map policies; + for (auto policy : g_all_policies) { - auto maybe_policy = to_build_policy(p.first); - if (auto policy = maybe_policy.get()) - { - Checks::check_exit(VCPKG_LINE_INFO, - policies.find(*policy) == policies.end(), - "Policy specified multiple times: %s", - p.first); - - if (p.second == "enabled") - policies.emplace(*policy, true); - else if (p.second == "disabled") - policies.emplace(*policy, false); - else - Checks::exit_with_message( - VCPKG_LINE_INFO, "Unknown setting for policy '%s': %s", p.first, p.second); - } + const auto setting = parser.optional_field(to_string(policy)); + if (setting.empty()) + continue; + else if (setting == "enabled") + policies.emplace(policy, true); + else if (setting == "disabled") + policies.emplace(policy, false); else - { - Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown policy found: %s", p.first); - } + Checks::exit_with_message( + VCPKG_LINE_INFO, "Unknown setting for policy '%s': %s", to_string(policy), setting); + } + + if (auto err = parser.error_info("PostBuildInformation")) + { + print_error_message(err); + Checks::exit_fail(VCPKG_LINE_INFO); } build_info.policies = BuildPolicies(std::move(policies)); diff --git a/toolsrc/src/vcpkg_Build_BuildPolicy.cpp b/toolsrc/src/vcpkg_Build_BuildPolicy.cpp index e75e176a2..b3bb778dc 100644 --- a/toolsrc/src/vcpkg_Build_BuildPolicy.cpp +++ b/toolsrc/src/vcpkg_Build_BuildPolicy.cpp @@ -12,17 +12,6 @@ namespace vcpkg::Build static const std::string NAME_EMPTY_INCLUDE_FOLDER = "PolicyEmptyIncludeFolder"; static const std::string NAME_ALLOW_OBSOLETE_MSVCRT = "PolicyAllowObsoleteMsvcrt"; - Optional to_build_policy(const std::string& s) - { - if (s == NAME_EMPTY_PACKAGE) return BuildPolicy::EMPTY_PACKAGE; - if (s == NAME_DLLS_WITHOUT_LIBS) return BuildPolicy::DLLS_WITHOUT_LIBS; - if (s == NAME_ONLY_RELEASE_CRT) return BuildPolicy::ONLY_RELEASE_CRT; - if (s == NAME_EMPTY_INCLUDE_FOLDER) return BuildPolicy::EMPTY_INCLUDE_FOLDER; - if (s == NAME_ALLOW_OBSOLETE_MSVCRT) return BuildPolicy::ALLOW_OBSOLETE_MSVCRT; - - return nullopt; - } - const std::string& to_string(BuildPolicy policy) { switch (policy) diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index add8acb4d..bbf807c95 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -174,12 +174,11 @@ namespace vcpkg::Dependencies if (auto bpgh = maybe_bpgh.get()) return InstallPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type}; - ExpectedT source_control_file = - Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); - if (auto scf = source_control_file.get()) - return InstallPlanAction{spec, {nullopt, nullopt, (*scf).core_paragraph}, request_type}; + auto maybe_scf = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); + if (auto scf = maybe_scf.get()) + return InstallPlanAction{spec, {nullopt, nullopt, *scf->get()->core_paragraph}, request_type}; - print_error_message(source_control_file.error()); + print_error_message(maybe_scf.error()); Checks::exit_fail(VCPKG_LINE_INFO); } }; @@ -284,13 +283,11 @@ namespace vcpkg::Dependencies if (auto bpgh = maybe_bpgh.get()) return ExportPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type}; - ExpectedT source_control_file = - Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); - if (auto scf = source_control_file.get()) - return ExportPlanAction{spec, {nullopt, nullopt, (*scf).core_paragraph}, request_type}; - + auto maybe_scf = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); + if (auto scf = maybe_scf.get()) + return ExportPlanAction{spec, {nullopt, nullopt, *scf->get()->core_paragraph}, request_type}; else - print_error_message(source_control_file.error()); + print_error_message(maybe_scf.error()); Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec); } diff --git a/toolsrc/src/vcpkg_Parse.cpp b/toolsrc/src/vcpkg_Parse.cpp new file mode 100644 index 000000000..b63ce41a9 --- /dev/null +++ b/toolsrc/src/vcpkg_Parse.cpp @@ -0,0 +1,59 @@ +#include "pch.h" + +#include "vcpkg_Checks.h" +#include "vcpkg_Maps.h" +#include "vcpkg_Parse.h" + +namespace vcpkg::Parse +{ + static Optional get_field(const std::unordered_map& fields, + const std::string& fieldname) + { + auto it = fields.find(fieldname); + if (it == fields.end()) + { + return nullopt; + } + + return it->second; + } + + static Optional remove_field(std::unordered_map* fields, + const std::string& fieldname) + { + auto it = fields->find(fieldname); + if (it == fields->end()) + { + return nullopt; + } + + const std::string value = std::move(it->second); + fields->erase(it); + return value; + } + + void ParagraphParser::required_field(const std::string& fieldname, std::string& out) + { + auto maybe_field = remove_field(&fields, fieldname); + if (auto field = maybe_field.get()) + out = std::move(*field); + else + missing_fields.push_back(fieldname); + } + std::string ParagraphParser::optional_field(const std::string& fieldname) + { + return remove_field(&fields, fieldname).value_or(""); + } + std::unique_ptr ParagraphParser::error_info(const std::string& name) const + { + if (!fields.empty() || !missing_fields.empty()) + { + auto err = std::make_unique(); + err->name = name; + err->extra_fields = Maps::extract_keys(fields); + err->missing_fields = std::move(missing_fields); + return err; + } + return nullptr; + } +} diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp index 15130f77e..6b180b532 100644 --- a/toolsrc/src/vcpkglib.cpp +++ b/toolsrc/src/vcpkglib.cpp @@ -31,7 +31,7 @@ namespace vcpkg std::vector> status_pghs; for (auto&& p : pghs) { - status_pghs.push_back(std::make_unique(p)); + status_pghs.push_back(std::make_unique(std::move(p))); } return StatusParagraphs(std::move(status_pghs)); @@ -69,7 +69,7 @@ namespace vcpkg auto pghs = Paragraphs::get_paragraphs(fs, file).value_or_exit(VCPKG_LINE_INFO); for (auto&& p : pghs) { - current_status_db.insert(std::make_unique(p)); + current_status_db.insert(std::make_unique(std::move(p))); } } @@ -239,4 +239,10 @@ namespace vcpkg return Strings::wformat( LR"("%s" %s -P "%s")", cmake_exe.native(), cmd_cmake_pass_variables, cmake_script.generic_wstring()); } + + std::string shorten_description(const std::string& desc) + { + auto simple_desc = std::regex_replace(desc, std::regex("\\s+"), " "); + return simple_desc.size() <= 52 ? simple_desc : simple_desc.substr(0, 49) + "..."; + } } diff --git a/toolsrc/src/vcpkglib_helpers.cpp b/toolsrc/src/vcpkglib_helpers.cpp deleted file mode 100644 index 9f992d320..000000000 --- a/toolsrc/src/vcpkglib_helpers.cpp +++ /dev/null @@ -1,56 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Checks.h" -#include "vcpkglib_helpers.h" - -namespace vcpkg::details -{ - std::string optional_field(const std::unordered_map& fields, const std::string& fieldname) - { - auto it = fields.find(fieldname); - if (it == fields.end()) - { - return std::string(); - } - - return it->second; - } - - std::string remove_optional_field(std::unordered_map* fields, - const std::string& fieldname) - { - auto it = fields->find(fieldname); - if (it == fields->end()) - { - return std::string(); - } - - const std::string value = std::move(it->second); - fields->erase(it); - return value; - } - - std::string required_field(const std::unordered_map& fields, const std::string& fieldname) - { - auto it = fields.find(fieldname); - Checks::check_exit(VCPKG_LINE_INFO, it != fields.end(), "Required field not present: %s", fieldname); - return it->second; - } - - std::string remove_required_field(std::unordered_map* fields, - const std::string& fieldname) - { - auto it = fields->find(fieldname); - Checks::check_exit(VCPKG_LINE_INFO, it != fields->end(), "Required field not present: %s", fieldname); - - const std::string value = std::move(it->second); - fields->erase(it); - return value; - } - - std::string shorten_description(const std::string& desc) - { - auto simple_desc = std::regex_replace(desc, std::regex("\\s+"), " "); - return simple_desc.size() <= 52 ? simple_desc : simple_desc.substr(0, 49) + "..."; - } -} diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 487609cca..200f91d1c 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -161,7 +161,7 @@ - + @@ -227,7 +227,7 @@ - + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index a901cebe7..4f51dfa9a 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -30,9 +30,6 @@ Source Files - - Source Files - Source Files @@ -177,14 +174,14 @@ Source Files + + Source Files + Header Files - - Header Files - Header Files @@ -302,5 +299,8 @@ Header Files + + Header Files + \ No newline at end of file -- cgit v1.2.3 From 4e41db458c0d9471e7997b4d50b38d77fe8c872e Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 20 Jun 2017 09:45:11 -0700 Subject: Fixes VCPKG_CRT_LINKAGE, Turned off tests, Added VCPKG_LIBRARY_LINKAGE --- ports/jansson/portfile.cmake | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/ports/jansson/portfile.cmake b/ports/jansson/portfile.cmake index 33dc9021c..412d295b7 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -1,12 +1,11 @@ include(vcpkg_common_functions) - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO akheron/jansson - REF v2.10 - SHA512 0859c8a29c1cb7e406d3eb369285500e98ee23677e3a6af6cd81511c57a6aa8dbabe4a8c7b673a3000203b68f74d84786817aec76cb1e85af217268159bda4b6 - HEAD_REF master + OUT_SOURCE_PATH SOURCE_PATH + REPO akheron/jansson + REF v2.10 + SHA512 0859c8a29c1cb7e406d3eb369285500e98ee23677e3a6af6cd81511c57a6aa8dbabe4a8c7b673a3000203b68f74d84786817aec76cb1e85af217268159bda4b6 + HEAD_REF master ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -16,13 +15,19 @@ else() endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(JANSSON_BUILD_SHARED_LIBS ON) +else() + set(JANSSON_BUILD_SHARED_LIBS OFF) +endif() + vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DJANSSON_STATIC_CRT=${JANSSON_STATIC_CRT} + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DJANSSON_STATIC_CRT=${JANSSON_STATIC_CRT} -DJANSSON_EXAMPLES=OFF - -DJANSSON_WITHOUT_TESTS=OFF - -DJANSSON_BUILD_SHARED_LIBS=ON + -DJANSSON_WITHOUT_TESTS=ON + -DJANSSON_BUILD_SHARED_LIBS=${JANSSON_BUILD_SHARED_LIBS} ) @@ -33,8 +38,8 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +if(VCPKG_CRT_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -- cgit v1.2.3 From e4e2d27ee90456b674171df1fb3daf6ff2b894aa Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 20 Jun 2017 09:50:46 -0700 Subject: fixes VCPKG_CRT_LINKAGE --- ports/jansson/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/jansson/portfile.cmake b/ports/jansson/portfile.cmake index 412d295b7..c5409bec2 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -8,7 +8,7 @@ vcpkg_from_github( HEAD_REF master ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") +if(VCPKG_CRT_LINKAGE STREQUAL static) set(JANSSON_STATIC_CRT ON) else() set(JANSSON_STATIC_CRT OFF) -- cgit v1.2.3 From befe2531f620471e1b2c5562c9994420e03c008a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Jun 2017 09:53:22 -0700 Subject: [vcpkg] Handle missing fields in print_error_message() --- toolsrc/src/SourceParagraph.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 83b8e2e2d..9289edb38 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -56,7 +56,7 @@ namespace vcpkg System::println(System::Color::error, "Error: There are invalid fields in the Source Paragraph of %s", error_info->name); - System::println("The following fields were not expected:\n\n %s\n\n", + System::println("The following fields were not expected:\n\n %s\n", Strings::join("\n ", error_info->extra_fields)); have_remaining_fields = true; } @@ -68,6 +68,18 @@ namespace vcpkg Strings::join("\n ", get_list_of_valid_fields())); System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n"); } + + for (auto&& error_info : error_info_list) + { + if (!error_info->missing_fields.empty()) + { + System::println(System::Color::error, + "Error: There are missing fields in the Source Paragraphs of %s", + error_info->name); + System::println("The following fields were missing:\n\n %s\n", + Strings::join("\n ", error_info->missing_fields)); + } + } } static ParseExpected parse_source_paragraph(RawParagraph&& fields) -- cgit v1.2.3 From 82a0834b37d758e516122373f295d93d1eb7280e Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 20 Jun 2017 11:36:16 -0700 Subject: enable cmake config for glm --- ports/glm/portfile.cmake | 57 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 12 deletions(-) diff --git a/ports/glm/portfile.cmake b/ports/glm/portfile.cmake index 4780a1b39..ffe731856 100644 --- a/ports/glm/portfile.cmake +++ b/ports/glm/portfile.cmake @@ -1,20 +1,53 @@ #header-only library +# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glm) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/g-truc/glm/releases/download/0.9.8.1/glm-0.9.8.1.zip" - FILENAME "glm-0.9.8.1.zip" - SHA512 93223ea7a08d969331a6b93d598c0b59dfc09e86770661c444f81939bd175053d3f6b1211a4aa4e59d732df39b97fe491eb35d4ac2efb286a1cf68ed29bfa80a + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO g-truc/glm + REF 0.9.8.4 + SHA512 ff0e0651a695caebe9235882d14e09546d52b3cdf66cca8e2078f15b02a3fca4e47bd97d2807aa329f76aa633af3b4999501bd4d0b22ad44b00558d4917f39ed + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) -# Remove glm/CMakeLists.txt -file(REMOVE ${SOURCE_PATH}/glm/CMakeLists.txt) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/glm") + +# changes target search path +file(READ ${CURRENT_PACKAGES_DIR}/share/glm/glmTargets.cmake GLM_TARGETS) +string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)" GLM_TARGETS ${GLM_TARGETS}) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/glm/glmTargets.cmake "${GLM_TARGETS}") + +file(READ ${CURRENT_PACKAGES_DIR}/share/glm/glmConfig.cmake GLM_CONFIG) +string(REPLACE "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../../\" ABSOLUTE)" + "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)" GLM_CONFIG ${GLM_CONFIG}) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/glm/glmConfig.cmake "${GLM_CONFIG}") + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Put the license file where vcpkg expects it file(COPY ${SOURCE_PATH}/copying.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glm/) file(RENAME ${CURRENT_PACKAGES_DIR}/share/glm/copying.txt ${CURRENT_PACKAGES_DIR}/share/glm/copyright) - -# Copy the glm header files -file(GLOB HEADER_FILES ${SOURCE_PATH}/glm/*) -file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/glm) -- cgit v1.2.3 From 3a5e2f6f500b5c8e71f3cdb08c49bf63eeac1d6c Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 20 Jun 2017 12:35:21 -0700 Subject: rocks db initial framework #1057 --- ports/rocksdb/CONTROL | 4 +++ ports/rocksdb/portfile.cmake | 85 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 ports/rocksdb/CONTROL create mode 100644 ports/rocksdb/portfile.cmake diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL new file mode 100644 index 000000000..b6e231010 --- /dev/null +++ b/ports/rocksdb/CONTROL @@ -0,0 +1,4 @@ +Source: rocksdb +Version: 5.4.6 +Description: A library that provides an embeddable, persistent key-value store for fast storage +Build-Depends: snappy, lz4, gflags, zlib diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake new file mode 100644 index 000000000..841c52c25 --- /dev/null +++ b/ports/rocksdb/portfile.cmake @@ -0,0 +1,85 @@ +include(vcpkg_common_functions) + +find_program(GIT git) + +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + message(FATAL_ERROR "Rocksdb only supports x64") +endif() + + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/rocksdb + REF v5.4.6 + SHA512 fe804335ef1b6e37df9b76ab665c1071253d62848878732e541e88444d9d226a1ac70a53a51641e1f554974711781d524d5069ac672589de7d2ec59874ec9290 + HEAD_REF master +) + +LIST(APPEND ENV_REPLACE_LIST + "set(GFLAGS_HOME \${CURRENT_INSTALLED_DIR})" + "set(GFLAGS_INCLUDE \${GFLAGS_HOME}/include)" + "set(GFLAGS_LIB_DEBUG \${GFLAGS_HOME}/debug/lib/gflags.lib)" + "set(GFLAGS_LIB_RELEASE \${GFLAGS_HOME}/lib/gflags.lib)" + "set(SNAPPY_HOME \${CURRENT_INSTALLED_DIR})" + "set(SNAPPY_INCLUDE \${SNAPPY_HOME}/include)" + "set(SNAPPY_LIB_DEBUG \${SNAPPY_HOME}/debug/lib/snappy.lib)" + "set(SNAPPY_LIB_RELEASE \${SNAPPY_HOME}/lib/snappy.lib)" + "set(LZ4_HOME \${CURRENT_INSTALLED_DIR})" + "set(LZ4_INCLUDE \${LZ4_HOME}/include)" + "set(LZ4_LIB_DEBUG \${LZ4_HOME}/debug/lib/lz4.lib)" + "set(LZ4_LIB_RELEASE \${LZ4_HOME}/lib/lz4.lib)" + "set(ZLIB_HOME \${CURRENT_INSTALLED_DIR})" + "set(ZLIB_INCLUDE \${ZLIB_HOME}/include)" + "set(ZLIB_LIB_DEBUG \${ZLIB_HOME}/debug/lib/zlib.lib)" + "set(ZLIB_LIB_RELEASE \${ZLIB_HOME}/lib/zlib.lib)" +) +LIST(APPEND ENV_FIND_LIST + "set(GFLAGS_HOME \$ENV{THIRDPARTY_HOME}/Gflags.Library)" + "set(GFLAGS_INCLUDE \${GFLAGS_HOME}/inc/include)" + "set(GFLAGS_LIB_DEBUG \${GFLAGS_HOME}/bin/debug/amd64/gflags.lib)" + "set(GFLAGS_LIB_RELEASE \${GFLAGS_HOME}/bin/retail/amd64/gflags.lib)" + "set(SNAPPY_HOME \$ENV{THIRDPARTY_HOME}/Snappy.Library)" + "set(SNAPPY_INCLUDE \${SNAPPY_HOME}/inc/inc)" + "set(SNAPPY_LIB_DEBUG \${SNAPPY_HOME}/bin/debug/amd64/snappy.lib)" + "set(SNAPPY_LIB_RELEASE \${SNAPPY_HOME}/bin/retail/amd64/snappy.lib)" + "set(LZ4_HOME \$ENV{THIRDPARTY_HOME}/LZ4.Library)" + "set(LZ4_INCLUDE \${LZ4_HOME}/inc/include)" + "set(LZ4_LIB_DEBUG \${LZ4_HOME}/bin/debug/amd64/lz4.lib)" + "set(LZ4_LIB_RELEASE \${LZ4_HOME}/bin/retail/amd64/lz4.lib)" + "set(ZLIB_HOME \$ENV{THIRDPARTY_HOME}/ZLIB.Library)" + "set(ZLIB_INCLUDE \${ZLIB_HOME}/inc/include)" + "set(ZLIB_LIB_DEBUG \${ZLIB_HOME}/bin/debug/amd64/zlib.lib)" + "set(ZLIB_LIB_RELEASE \${ZLIB_HOME}/bin/retail/amd64/zlib.lib)" +) + +message(STATUS "${SOURCE_PATH}/thirdparty.inc is here") + +LIST( LENGTH ENV_REPLACE_LIST COUNT ) +MATH(EXPR COUNT "${COUNT}-1") + +file(READ "${SOURCE_PATH}/thirdparty.inc" THIRDY_PARTY) +foreach( INDEX RANGE ${COUNT}) + list (GET ENV_REPLACE_LIST ${INDEX} TO_REPLACE) + list (GET ENV_FIND_LIST ${INDEX} TO_FIND) + message(STATUS "Replacing ${TO_FIND} to ${TO_REPLACE} ") + string(REPLACE ${TO_FIND} ${TO_REPLACE} THIRDY_PARTY "${THIRDY_PARTY}") +endforeach() + +file(WRITE "${SOURCE_PATH}/thirdparty.inc" "${THIRDY_PARTY}") + + + + +# +# vcpkg_configure_cmake( +# SOURCE_PATH ${SOURCE_PATH} +# OPTIONS +# -DGIT_EXECUTABLE=${GIT} +# -DGFLAGS=1 +# -DSNAPPY=1 +# -DLZ4=1 +# -DZLIB=1 +# ) +# +# +# vcpkg_build_cmake() -- cgit v1.2.3 From 9fe35b0d4d0cf4622f56013f9ba9a8a061912548 Mon Sep 17 00:00:00 2001 From: Gilles Khouzam Date: Tue, 20 Jun 2017 12:46:42 -0700 Subject: Fixing invocation of bash command to install gcc and perl for ffmpeg --- ports/ffmpeg/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 702596b11..de17e2851 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -39,10 +39,11 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") ## Get Perl and GCC for MSYS2 vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "PATH=/usr/bin:\$PATH;pacman -Sy --noconfirm --needed perl gcc" + COMMAND ${BASH} --noprofile --norc -c 'PATH=/usr/bin:\$PATH;pacman -Sy --noconfirm --needed perl gcc' WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} LOGNAME msys-${TARGET_TRIPLET} ) + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") else() -- cgit v1.2.3 From 0ed990fb8f97455024f537d27749212135a7f0e8 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 20 Jun 2017 14:00:27 -0700 Subject: failed to build on vs 2017 --- ports/rocksdb/portfile.cmake | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 841c52c25..d6b71473a 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -6,6 +6,9 @@ if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") message(FATAL_ERROR "Rocksdb only supports x64") endif() +set(VCPKG_PLATFORM_TOOLSET v140) +set(MSVS_VERSION 2015) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -68,18 +71,16 @@ endforeach() file(WRITE "${SOURCE_PATH}/thirdparty.inc" "${THIRDY_PARTY}") +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DGIT_EXECUTABLE=${GIT} + -DGFLAGS=1 + -DSNAPPY=1 + -DLZ4=1 + -DZLIB=1 + -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} +) -# -# vcpkg_configure_cmake( -# SOURCE_PATH ${SOURCE_PATH} -# OPTIONS -# -DGIT_EXECUTABLE=${GIT} -# -DGFLAGS=1 -# -DSNAPPY=1 -# -DLZ4=1 -# -DZLIB=1 -# ) -# -# -# vcpkg_build_cmake() +vcpkg_build_cmake() -- cgit v1.2.3 From 79d4a2e297a0cc481ecfd8a100b2e1a78b40d0a4 Mon Sep 17 00:00:00 2001 From: codicodi Date: Tue, 20 Jun 2017 23:35:49 +0200 Subject: [opus] update to 1.2 --- ports/opus/CONTROL | 2 +- ports/opus/portfile.cmake | 71 +++++++++++++++++++++++------------------------ 2 files changed, 36 insertions(+), 37 deletions(-) diff --git a/ports/opus/CONTROL b/ports/opus/CONTROL index 7177b2199..dbff6715a 100644 --- a/ports/opus/CONTROL +++ b/ports/opus/CONTROL @@ -1,3 +1,3 @@ Source: opus -Version: 1.1.4 +Version: 1.2 Description: Totally open, royalty-free, highly versatile audio codec diff --git a/ports/opus/portfile.cmake b/ports/opus/portfile.cmake index a004f09dd..f2a6dc018 100644 --- a/ports/opus/portfile.cmake +++ b/ports/opus/portfile.cmake @@ -1,11 +1,26 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "UWP builds not supported") +endif() + include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/opus-1.1.4) -vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.xiph.org/releases/opus/opus-1.1.4.tar.gz" - FILENAME "opus-1.1.4.tar.gz" - SHA512 57f14b9e8037eaa02a4d86535d3bbcceca249310fbc9ef1a452cc19dd442d4cf338d5db241d20605c236e22549df2c8266b7486c5f1666b80c532afd52cb3585 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/opus + REF v1.2 + SHA512 4fef70e3b439613f85ede30cc401b84c77f1828f56908d04cb76061b8116c083cc035b50eaec4205110481e9d8b794b9c05f6778d8428cc68f6d57bd3db721ca + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) + +# Ensure proper crt linkage +file(READ ${SOURCE_PATH}/win32/VS2015/common.props OPUS_PROPS) +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + string(REPLACE ">MultiThreaded<" ">MultiThreadedDLL<" OPUS_PROPS "${OPUS_PROPS}") + string(REPLACE ">MultiThreadedDebug<" ">MultiThreadedDebugDLL<" OPUS_PROPS "${OPUS_PROPS}") +else() + string(REPLACE ">MultiThreadedDLL<" ">MultiThreaded<" OPUS_PROPS "${OPUS_PROPS}") + string(REPLACE ">MultiThreadedDebugDLL<" ">MultiThreadedDebug<" OPUS_PROPS "${OPUS_PROPS}") +endif() +file(WRITE ${SOURCE_PATH}/win32/VS2015/common.props "${OPUS_PROPS}") if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(RELEASE_CONFIGURATION "Release") @@ -20,44 +35,21 @@ if(TARGET_TRIPLET MATCHES "x86") elseif(TARGET_TRIPLET MATCHES "x64") set(ARCH_DIR "x64") else() - message("Architecture not supported") + message(FATAL_ERROR "Architecture not supported") endif() -function(build_project PROJECT_PATH) - vcpkg_build_msbuild( - PROJECT_PATH ${PROJECT_PATH} - RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION} - DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION} - ) -endfunction(build_project) - - -build_project(${SOURCE_PATH}/win32/VS2015/celt.vcxproj) -build_project(${SOURCE_PATH}/win32/VS2015/silk_common.vcxproj) -build_project(${SOURCE_PATH}/win32/VS2015/silk_float.vcxproj) -build_project(${SOURCE_PATH}/win32/VS2015/silk_fixed.vcxproj) -build_project(${SOURCE_PATH}/win32/VS2015/opus.vcxproj) - +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/win32/VS2015/opus.vcxproj + RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION} + DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION} +) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) # Install release build file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/celt.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/silk_common.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/silk_fixed.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/silk_float.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) # Install debug build file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/celt.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/celt.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_common.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_common.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_fixed.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_fixed.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_float.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/silk_float.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) else() # Install release build file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${RELEASE_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) @@ -66,11 +58,18 @@ else() # Install debug build file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) - file(INSTALL ${SOURCE_PATH}/win32/VS2015/${ARCH_DIR}/${DEBUG_CONFIGURATION}/opus.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) endif() +vcpkg_copy_pdbs() + # Install headers file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME opus) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(READ ${CURRENT_PACKAGES_DIR}/include/opus/opus_defines.h OPUS_DEFINES) + string(REPLACE "define OPUS_EXPORT" "define OPUS_EXPORT __declspec(dllimport)" OPUS_DEFINES "${OPUS_DEFINES}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/opus/opus_defines.h "${OPUS_DEFINES}") +endif() + # Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/opus RENAME copyright) -- cgit v1.2.3 From 4ee63ac225118241242ca0382f00c04a0fc7c849 Mon Sep 17 00:00:00 2001 From: bagong Date: Tue, 20 Jun 2017 23:55:24 +0200 Subject: Make python path more general --- ports/qscintilla/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/qscintilla/portfile.cmake b/ports/qscintilla/portfile.cmake index ba5a13ac2..d07883b88 100644 --- a/ports/qscintilla/portfile.cmake +++ b/ports/qscintilla/portfile.cmake @@ -22,7 +22,8 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_find_acquire_program(PYTHON3) # Add python3 to path -SET(ENV{PATH} "${DOWNLOADS}/tools/python;$ENV{PATH}") +get_filename_component(PYTHON_PATH ${PYTHON} DIRECTORY) +SET(ENV{PATH} "${PYTHON_PATH};$ENV{PATH}") vcpkg_configure_qmake( SOURCE_PATH "${SOURCE_PATH}/Qt4Qt5" -- cgit v1.2.3 From 338f8614e3e0e8bd96b80c88fce825f02c2e0721 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Jun 2017 15:20:23 -0700 Subject: [vcpkg-fixup-cmake-targets][glm] Upgrade GLM. Move cmake fixup logic into helper script. --- ports/glm/CONTROL | 2 +- ports/glm/portfile.cmake | 27 --------------------------- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 22 ++++++++++++++++++++-- 3 files changed, 21 insertions(+), 30 deletions(-) diff --git a/ports/glm/CONTROL b/ports/glm/CONTROL index 3e1f91148..2f7355c30 100644 --- a/ports/glm/CONTROL +++ b/ports/glm/CONTROL @@ -1,3 +1,3 @@ Source: glm -Version: 0.9.8.1 +Version: 0.9.8.4 Description: OpenGL Mathematics (GLM) https://glm.g-truc.net diff --git a/ports/glm/portfile.cmake b/ports/glm/portfile.cmake index ffe731856..ff988c47b 100644 --- a/ports/glm/portfile.cmake +++ b/ports/glm/portfile.cmake @@ -1,16 +1,3 @@ -#header-only library -# 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( @@ -23,26 +10,12 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/glm") -# changes target search path -file(READ ${CURRENT_PACKAGES_DIR}/share/glm/glmTargets.cmake GLM_TARGETS) -string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" - "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)" GLM_TARGETS ${GLM_TARGETS}) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/glm/glmTargets.cmake "${GLM_TARGETS}") - -file(READ ${CURRENT_PACKAGES_DIR}/share/glm/glmConfig.cmake GLM_CONFIG) -string(REPLACE "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../../\" ABSOLUTE)" - "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)" GLM_CONFIG ${GLM_CONFIG}) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/glm/glmConfig.cmake "${GLM_CONFIG}") - vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 3b0c794d9..f65337544 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -76,8 +76,6 @@ function(vcpkg_fixup_cmake_targets) "${RELEASE_SHARE}/*[Cc]onfig-release.cmake" ) foreach(RELEASE_TARGET ${RELEASE_TARGETS}) - get_filename_component(RELEASE_TARGET_NAME ${RELEASE_TARGET} NAME) - file(READ ${RELEASE_TARGET} _contents) string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+\\.exe)" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") file(WRITE ${RELEASE_TARGET} "${_contents}") @@ -99,6 +97,26 @@ function(vcpkg_fixup_cmake_targets) file(REMOVE ${DEBUG_TARGET}) endforeach() + file(GLOB MAIN_TARGETS "${RELEASE_SHARE}/*[Tt]argets.cmake") + foreach(MAIN_TARGET ${MAIN_TARGETS}) + file(READ ${MAIN_TARGET} _contents) + string(REGEX REPLACE + "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + _contents "${_contents}") + file(WRITE ${MAIN_TARGET} "${_contents}") + endforeach() + + file(GLOB MAIN_CONFIGS "${RELEASE_SHARE}/*[Cc]onfig.cmake") + foreach(MAIN_CONFIG ${MAIN_CONFIGS}) + file(READ ${MAIN_CONFIG} _contents) + string(REGEX REPLACE + "get_filename_component\\(PACKAGE_PREFIX_DIR \"\\\${CMAKE_CURRENT_LIST_DIR}/\\.\\./(\\.\\./)*\" ABSOLUTE\\)" + "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)" + _contents "${_contents}") + file(WRITE ${MAIN_CONFIG} "${_contents}") + endforeach() + # Remove /debug/share// if it's empty. file(GLOB_RECURSE REMAINING_FILES "${DEBUG_SHARE}/*") if(NOT REMAINING_FILES) -- cgit v1.2.3 From a87c933c8423a9ab62d58f55f28e81f2be599e06 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 20 Jun 2017 15:20:52 -0700 Subject: update tinyxml2 to 5.0.0 --- ports/tinyxml2/portfile.cmake | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake index 656f4783f..afdbae878 100644 --- a/ports/tinyxml2/portfile.cmake +++ b/ports/tinyxml2/portfile.cmake @@ -1,11 +1,24 @@ +# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tinyxml2-3.0.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/leethomason/tinyxml2/archive/3.0.0.zip" - FILENAME "tinyxml2-3.0.0.zip" - SHA512 3581e086e41ea01418fdf74e53b932c41cada9a45b73fb71c15424672182dc2a1e55110f030962ae44df6f5d9f060478c5b04373f886da843a78fcabae8b063c + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO leethomason/tinyxml2 + REF 5.0.0 + SHA512 ef310a466d0aec9dd0d25063c68f5312cd063366ee57499d8e462e25a556ea510617b66cdec1a368e8867dc082e0297e27fe09f16eb915392235be34206881e4 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -16,7 +29,19 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/tinyxml2") + +# changes target search path +file(READ ${CURRENT_PACKAGES_DIR}/share/tinyxml2/tinyxml2Targets.cmake TINYXML2_TARGETS) +string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)" TINYXML2_TARGETS ${TINYXML2_TARGETS}) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/tinyxml2/tinyxml2Targets.cmake "${TINYXML2_TARGETS}") + +vcpkg_copy_pdbs() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright file(COPY ${SOURCE_PATH}/readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml2) file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinyxml2/readme.md ${CURRENT_PACKAGES_DIR}/share/tinyxml2/copyright) -vcpkg_copy_pdbs() -- cgit v1.2.3 From d026905ae90290fd808ee0896e11e71f2ff8ac5b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Jun 2017 15:36:35 -0700 Subject: [cpr] Enable dynamic builds via CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS --- ports/cpr/enable-install.patch | 17 +++++++++++++++++ ports/cpr/force_static_library.patch | 13 ------------- ports/cpr/portfile.cmake | 31 +++++++++---------------------- 3 files changed, 26 insertions(+), 35 deletions(-) create mode 100644 ports/cpr/enable-install.patch delete mode 100644 ports/cpr/force_static_library.patch diff --git a/ports/cpr/enable-install.patch b/ports/cpr/enable-install.patch new file mode 100644 index 000000000..da8d3ee73 --- /dev/null +++ b/ports/cpr/enable-install.patch @@ -0,0 +1,17 @@ +diff --git a/cpr/CMakeLists.txt b/cpr/CMakeLists.txt +index a6db5bd..b4982d1 100644 +--- a/cpr/CMakeLists.txt ++++ b/cpr/CMakeLists.txt +@@ -45,3 +45,12 @@ add_library(${CPR_LIBRARIES} + message(STATUS "Using CURL_LIBRARIES: ${CURL_LIBRARIES}.") + target_link_libraries(${CPR_LIBRARIES} + ${CURL_LIBRARIES}) ++ ++install(TARGETS ${CPR_LIBRARIES} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) ++if(NOT DISABLE_INSTALL_HEADERS) ++ install(DIRECTORY ${CPR_INCLUDE_DIRS} DESTINATION include) ++endif() diff --git a/ports/cpr/force_static_library.patch b/ports/cpr/force_static_library.patch deleted file mode 100644 index 4571f21ac..000000000 --- a/ports/cpr/force_static_library.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cpr/CMakeLists.txt b/cpr/CMakeLists.txt -index a6db5bd..9df92a6 100644 ---- a/cpr/CMakeLists.txt -+++ b/cpr/CMakeLists.txt -@@ -3,7 +3,7 @@ include_directories( - ${CPR_INCLUDE_DIRS} - ${CURL_INCLUDE_DIRS}) - --add_library(${CPR_LIBRARIES} -+add_library(${CPR_LIBRARIES} STATIC - - # Source files - auth.cpp diff --git a/ports/cpr/portfile.cmake b/ports/cpr/portfile.cmake index 00470c2ea..281e0da43 100644 --- a/ports/cpr/portfile.cmake +++ b/ports/cpr/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_from_github( @@ -21,24 +9,23 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/force_static_library.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/enable-install.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja + PREFER_NINJA OPTIONS - -DBUILD_CPR_TESTS=OFF - -DUSE_SYSTEM_CURL=ON + -DBUILD_CPR_TESTS=OFF + -DUSE_SYSTEM_CURL=ON + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON ) -vcpkg_build_cmake() +vcpkg_install_cmake() -file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/cpr.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/cpr/CMakeFiles/cpr.dir/cpr.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/cpr.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/cpr/CMakeFiles/cpr.dir/cpr.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +vcpkg_copy_pdbs() # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpr) -- cgit v1.2.3 From 032692ad9e15537e6f6793498c7fea0515c77a35 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 20 Jun 2017 15:37:31 -0700 Subject: added thor #1319 --- ports/thor/CONTROL | 4 +++ ports/thor/portfile.cmake | 71 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 ports/thor/CONTROL create mode 100644 ports/thor/portfile.cmake diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL new file mode 100644 index 000000000..9da28972a --- /dev/null +++ b/ports/thor/CONTROL @@ -0,0 +1,4 @@ +Source: thor +Version: +Description: +Build-Depends: sfml diff --git a/ports/thor/portfile.cmake b/ports/thor/portfile.cmake new file mode 100644 index 000000000..046dd57b5 --- /dev/null +++ b/ports/thor/portfile.cmake @@ -0,0 +1,71 @@ +include(vcpkg_common_functions) + + + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tests) +vcpkg_from_github(ARCHIVE + OUT_SOURCE_PATH SOURCE_PATH + REPO Bromeon/Thor + REF v2.0 + SHA512 634fa5286405d9a8a837c082ace98bbb02e609521418935855b9e2fcad57003dbe35088bd771cf6a9292e55d3787f7e463d7a4cca0d0f007509de2520d9a8cf9 + HEAD_REF master +) + + +set(ENV{SFML_ROOT} ${CURRENT_INSTALLED_DIR}) + +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(THOR_STATIC_STD_LIBS ON) +else() + set(THOR_STATIC_STD_LIBS OFF) +endif() + + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(THOR_SHARED_LIBS ON) +else() + set(THOR_SHARED_LIBS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTHOR_SHARED_LIBS=${THOR_SHARED_LIBS} + -DTHOR_STATIC_STD_LIBS=${THOR_STATIC_STD_LIBS} +) + +vcpkg_build_cmake() + +file(GLOB DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/src/*.dll" +) +file(GLOB LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/src/*.lib" +) +file(GLOB DEBUG_DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/src/*.dll" +) +file(GLOB DEBUG_LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/src/*.lib" +) +if(DLLS) + file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() +file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include/thor) +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/thor RENAME copyright) -- cgit v1.2.3 From ab3b3e4fa435c560383367cd8f836f06d35b0460 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 20 Jun 2017 15:39:42 -0700 Subject: added description and version to control --- ports/thor/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL index 9da28972a..ddaad1c5d 100644 --- a/ports/thor/CONTROL +++ b/ports/thor/CONTROL @@ -1,4 +1,4 @@ Source: thor -Version: -Description: +Version: v2.0 +Description: Extends the multimedia library SFML with higher-level features Build-Depends: sfml -- cgit v1.2.3 From d387490dc8e349741433ccff0d735cb31d088b78 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 20 Jun 2017 15:41:50 -0700 Subject: update control file and cleanup portfile --- ports/tinyxml2/CONTROL | 2 +- ports/tinyxml2/portfile.cmake | 21 --------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL index b8bf3d76a..ee5e20f34 100644 --- a/ports/tinyxml2/CONTROL +++ b/ports/tinyxml2/CONTROL @@ -1,3 +1,3 @@ Source: tinyxml2 -Version: 3.0.0 +Version: 5.0.0 Description: A simple, small, efficient, C++ XML parser \ No newline at end of file diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake index afdbae878..59184178d 100644 --- a/ports/tinyxml2/portfile.cmake +++ b/ports/tinyxml2/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_from_github( @@ -22,21 +10,12 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/tinyxml2") -# changes target search path -file(READ ${CURRENT_PACKAGES_DIR}/share/tinyxml2/tinyxml2Targets.cmake TINYXML2_TARGETS) -string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" - "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)" TINYXML2_TARGETS ${TINYXML2_TARGETS}) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/tinyxml2/tinyxml2Targets.cmake "${TINYXML2_TARGETS}") - vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 0cb1ec56b14c7906c48c28cc8f430cdd12386e44 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 20 Jun 2017 15:56:52 -0700 Subject: fix include folder --- ports/thor/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/thor/portfile.cmake b/ports/thor/portfile.cmake index 046dd57b5..710d464b9 100644 --- a/ports/thor/portfile.cmake +++ b/ports/thor/portfile.cmake @@ -67,5 +67,5 @@ endif() file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include/thor) +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/thor RENAME copyright) -- cgit v1.2.3 From e72b0ec9a2ac23300c39d7bc8217dfd5cfa6ab63 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Jun 2017 16:26:25 -0700 Subject: [vcpkg] Hotfix regression in 8741214. Fixes #1325. --- toolsrc/src/vcpkg_Build.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index a73d59910..c794b5ede 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -242,7 +242,8 @@ namespace vcpkg::Build Checks::exit_with_message( VCPKG_LINE_INFO, "Invalid library linkage type: [%s]", library_linkage_as_string); } - build_info.version = parser.optional_field("Version"); + std::string version = parser.optional_field("Version"); + if (!version.empty()) build_info.version = std::move(version); std::map policies; for (auto policy : g_all_policies) -- cgit v1.2.3 From 833c38c6307e8e34bcf578fc7e24b29228f35928 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Jun 2017 16:19:36 -0700 Subject: [jansson] Enable cmake scripts --- ports/jansson/portfile.cmake | 11 ++--------- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 4 ++++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ports/jansson/portfile.cmake b/ports/jansson/portfile.cmake index c5409bec2..50d5a994e 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -30,17 +30,10 @@ vcpkg_configure_cmake( -DJANSSON_BUILD_SHARED_LIBS=${JANSSON_BUILD_SHARED_LIBS} ) - vcpkg_install_cmake(DISABLE_PARALLEL) +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jansson RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) - -if(VCPKG_CRT_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jansson RENAME copyright) vcpkg_copy_pdbs() diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 3b0c794d9..5f96c4b26 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -16,6 +16,10 @@ function(vcpkg_fixup_cmake_targets) cmake_parse_arguments(_vfct "" "CONFIG_PATH" "" ${ARGN}) + if(_vfct_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_fixup_cmake_targets was passed extra arguments: ${_vfct_UNPARSED_ARGUMENTS}") + endif() + set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/share/${PORT}) set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/share/${PORT}) -- cgit v1.2.3 From db92e194c24f51dfaa3e733230c996aaf0eeb859 Mon Sep 17 00:00:00 2001 From: weizili Date: Wed, 21 Jun 2017 16:42:28 +0800 Subject: Update to version 0.6.1 --- ports/evpp/CONTROL | 2 +- ports/evpp/portfile.cmake | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ports/evpp/CONTROL b/ports/evpp/CONTROL index e9fedbeb5..1f9f3a443 100644 --- a/ports/evpp/CONTROL +++ b/ports/evpp/CONTROL @@ -1,4 +1,4 @@ Source: evpp -Version: 0.5.0 +Version: 0.6.1 Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols. Build-Depends: glog, libevent diff --git a/ports/evpp/portfile.cmake b/ports/evpp/portfile.cmake index db6eb1198..22c565c1c 100644 --- a/ports/evpp/portfile.cmake +++ b/ports/evpp/portfile.cmake @@ -14,9 +14,9 @@ include(vcpkg_common_functions) set(EVPP_LOCAL_TEST OFF) -set(EVPP_VERSION 0.5.0) +set(EVPP_VERSION 0.6.1) if (EVPP_LOCAL_TEST) - set(EVPP_HASH c8e25c82a14788231a08fafb44b062cf57fd20e66437f3051d290d96b259aba47e4ac34916e04163b9d25383b1c7ba43f36880f4759390cbd25f776da6dc0738) + set(EVPP_HASH bfefb3f7c1f620fbca2c3d94e2e7c39aa963156a084caf39bcc348a9380f97c73c9ee965126434d71c8b14836e669d554ed98632b3bb38eb65b421fd8eff49b2) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/evpp) vcpkg_download_distfile(ARCHIVE URLS "http://127.0.0.1:8000/evpp.zip" @@ -24,7 +24,7 @@ if (EVPP_LOCAL_TEST) SHA512 ${EVPP_HASH} ) else () - set(EVPP_HASH fce8ebfec8b22b137f827a886f9ef658d70e060cef3950600ac42136d87cdd9357d78897348ed1d1c112c5e04350626fb218b02cba190a2c2a6fb81136eb2d7d) + set(EVPP_HASH 13986f81efc7f831274cc55819980ee57d6a8729867901beafd3d31c50682de304a9552912ace1c7e0a92ee2df41a8c456b5f77f4721d622c97584b38b68cd37) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/evpp-${EVPP_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/Qihoo360/evpp/archive/v${EVPP_VERSION}.zip" @@ -33,14 +33,11 @@ else () ) endif () -message(STATUS "Begin to extract files ...") vcpkg_extract_source_archive(${ARCHIVE}) -message(STATUS "Building evpp project ...") - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DCMAKE_TOOLCHAIN_FILE=D:/git/vcpkg/scripts/buildsystems/vcpkg.cmake -DEVPP_VCPKG_BUILD=ON + OPTIONS -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/buildsystems/vcpkg.cmake -DEVPP_VCPKG_BUILD=ON ) vcpkg_install_cmake() @@ -59,4 +56,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake ) file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/evpp) file(RENAME ${CURRENT_PACKAGES_DIR}/share/evpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/evpp/copyright) -message(STATUS "Installing done") -- cgit v1.2.3 From 053f3ee32f309208ac3af9c71b95253d4a144436 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 22 Jun 2017 00:21:29 +0900 Subject: Fix QHull port to use release version Fix QHull port to use latest release version, because master/HEAD of QHull has some bugs. --- ports/qhull/CONTROL | 2 +- ports/qhull/portfile.cmake | 46 +++++++++++++++++++++++++++++----------------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/ports/qhull/CONTROL b/ports/qhull/CONTROL index aaf569f25..a36061285 100644 --- a/ports/qhull/CONTROL +++ b/ports/qhull/CONTROL @@ -1,3 +1,3 @@ Source: qhull -Version:1.0 +Version: 2015.2 Description: computes the convex hull, Delaunay triangulation, Voronoi diagram diff --git a/ports/qhull/portfile.cmake b/ports/qhull/portfile.cmake index 77c585b40..493a14e38 100644 --- a/ports/qhull/portfile.cmake +++ b/ports/qhull/portfile.cmake @@ -1,7 +1,7 @@ # 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} +# 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) @@ -13,33 +13,45 @@ include(vcpkg_common_functions) vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH + OUT_SOURCE_PATH SOURCE_PATH REPO qhull/qhull - REF master - SHA512 16aa9f93ce6fe8342a3b579881f10bb417679b0a70849e6b0cc5a89551e4de773a43bb0d54948196690d68d168f3a2a215e4600745ff1566302b0b426565fb25 + REF 5a79a0009454c86e9848646b3c296009125231bf # Qhull 2015.2 + SHA512 ebcbf452eff420c62f92b734e5359b275493930b3e6798801eb1a81aa4fbf631b41e298a6071698c3b18c0939c55ddbc1b66b7019091bb4988dcfc7deb25e287 + HEAD_REF master ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - #PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS - -DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include - -DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull - -DDOC_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull - - OPTIONS_RELEASE - -Dqhull_TARGETS_INSTALL=qhullcpp - -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib - - OPTIONS_DEBUG - -Dqhull_TARGETS_INSTALL=qhullcpp_d - -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib + #PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include + -DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull + -DDOC_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull + OPTIONS_RELEASE + -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib + OPTIONS_DEBUG + -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib ) vcpkg_install_cmake() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(GLOB_RECURSE HTMFILES ${CURRENT_PACKAGES_DIR}/include/*.htm) file(REMOVE ${HTMFILES}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) + +file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qhull) +file(COPY ${EXEFILES_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qhull) +file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_d.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_p.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_pd.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_rd.lib) +endif() # Handle copyright file(COPY ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/qhull) -- cgit v1.2.3 From dab6693550dcee29544058e72e108b540a4c08e3 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 21 Jun 2017 08:23:27 -0700 Subject: Added aurora as independant portfile --- ports/aurora/CONTROL | 3 +++ ports/aurora/portfile.cmake | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 ports/aurora/CONTROL create mode 100644 ports/aurora/portfile.cmake diff --git a/ports/aurora/CONTROL b/ports/aurora/CONTROL new file mode 100644 index 000000000..172c019cd --- /dev/null +++ b/ports/aurora/CONTROL @@ -0,0 +1,3 @@ +Source: aurora +Version: 2017-06-21-c75699d2a8caa726260c29b6d7a0fd35f8f28933 +Description: Aurora is an open-source C++ library providing various rather uncommon C++ utilities diff --git a/ports/aurora/portfile.cmake b/ports/aurora/portfile.cmake new file mode 100644 index 000000000..32e3d804f --- /dev/null +++ b/ports/aurora/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Bromeon/Aurora + REF c75699d2a8caa726260c29b6d7a0fd35f8f28933 + SHA512 862253e281eb441b773feb330d5ce4d7fe10769f516e927c0f875477ec912671fc35132a48986b2394f6d0a7160a5cb70afe868c597350c385ce23686b9613d6 + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/aurora RENAME copyright) +vcpkg_copy_pdbs() -- cgit v1.2.3 From 302f67feedf6bb0cb1163f2fcdef4a162c5a843c Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 15 Jun 2017 07:46:30 +0900 Subject: Add PCL port Add Point Cloud Library (PCL) --- ports/pcl/1635.patch | 36 +++++++++++++++++++++ ports/pcl/1788.patch | 24 ++++++++++++++ ports/pcl/1823.patch | 22 +++++++++++++ ports/pcl/1830.patch | 68 ++++++++++++++++++++++++++++++++++++++++ ports/pcl/1855.patch | 24 ++++++++++++++ ports/pcl/1856.patch | 23 ++++++++++++++ ports/pcl/CONTROL | 4 +++ ports/pcl/config.patch | 39 +++++++++++++++++++++++ ports/pcl/config_install.patch | 13 ++++++++ ports/pcl/find_flann.patch | 35 +++++++++++++++++++++ ports/pcl/find_openni2.patch | 12 +++++++ ports/pcl/find_qhull.patch | 13 ++++++++ ports/pcl/portfile.cmake | 71 ++++++++++++++++++++++++++++++++++++++++++ 13 files changed, 384 insertions(+) create mode 100644 ports/pcl/1635.patch create mode 100644 ports/pcl/1788.patch create mode 100644 ports/pcl/1823.patch create mode 100644 ports/pcl/1830.patch create mode 100644 ports/pcl/1855.patch create mode 100644 ports/pcl/1856.patch create mode 100644 ports/pcl/CONTROL create mode 100644 ports/pcl/config.patch create mode 100644 ports/pcl/config_install.patch create mode 100644 ports/pcl/find_flann.patch create mode 100644 ports/pcl/find_openni2.patch create mode 100644 ports/pcl/find_qhull.patch create mode 100644 ports/pcl/portfile.cmake diff --git a/ports/pcl/1635.patch b/ports/pcl/1635.patch new file mode 100644 index 000000000..716097949 --- /dev/null +++ b/ports/pcl/1635.patch @@ -0,0 +1,36 @@ +From 8710ee9b6c3ef236a84450ab9fd1f8f167c87a56 Mon Sep 17 00:00:00 2001 +From: Tsukasa Sugiura +Date: Thu, 16 Jun 2016 01:52:29 +0900 +Subject: [PATCH] Fix compile error C2440 of pcl_visualization on MSVC + +The pcl_visualization occur compile error C2440 on MSVC. +This error occurs because that can not directly cast to enum type from +double type in MSVC. +It must explicitly cast to int type from double type before cast to enum +type. +--- + visualization/src/pcl_visualizer.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/visualization/src/pcl_visualizer.cpp b/visualization/src/pcl_visualizer.cpp +index b5fabde110..7c84b7543e 100644 +--- a/visualization/src/pcl_visualizer.cpp ++++ b/visualization/src/pcl_visualizer.cpp +@@ -1492,7 +1492,7 @@ pcl::visualization::PCLVisualizer::setPointCloudRenderingProperties ( + actor->GetMapper ()->ScalarVisibilityOn (); + actor->GetMapper ()->SetScalarRange (range[0], range[1]); + vtkSmartPointer table; +- if (!pcl::visualization::getColormapLUT (static_cast(value), table)) ++ if (!pcl::visualization::getColormapLUT (static_cast(static_cast(value)), table)) + break; + table->SetRange (range[0], range[1]); + actor->GetMapper ()->SetLookupTable (table); +@@ -1738,7 +1738,7 @@ pcl::visualization::PCLVisualizer::setShapeRenderingProperties ( + actor->GetMapper ()->ScalarVisibilityOn (); + actor->GetMapper ()->SetScalarRange (range[0], range[1]); + vtkSmartPointer table = vtkSmartPointer::New (); +- getColormapLUT (static_cast(value), table); ++ getColormapLUT (static_cast(static_cast(value)), table); + table->SetRange (range[0], range[1]); + actor->GetMapper ()->SetLookupTable (table); + style_->updateLookUpTableDisplay (false); diff --git a/ports/pcl/1788.patch b/ports/pcl/1788.patch new file mode 100644 index 000000000..da384708a --- /dev/null +++ b/ports/pcl/1788.patch @@ -0,0 +1,24 @@ +From 1216590288f9c1e9195954c06cebdc421a8a3986 Mon Sep 17 00:00:00 2001 +From: Tsukasa Sugiura +Date: Fri, 30 Dec 2016 05:11:36 +0900 +Subject: [PATCH] Update find Boost versions + +Update find Boost versions. +Add Boost 1.62.0 and Boost 1.63.0. +--- + cmake/pcl_find_boost.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/pcl_find_boost.cmake b/cmake/pcl_find_boost.cmake +index a3abe1c069..7ccf80c727 100644 +--- a/cmake/pcl_find_boost.cmake ++++ b/cmake/pcl_find_boost.cmake +@@ -19,7 +19,7 @@ if(${CMAKE_VERSION} VERSION_LESS 2.8.5) + "1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43") + else(${CMAKE_VERSION} VERSION_LESS 2.8.5) + set(Boost_ADDITIONAL_VERSIONS +- "1.61.0" "1.61" "1.60.0" "1.60" ++ "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" + "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" + "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" + "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47") diff --git a/ports/pcl/1823.patch b/ports/pcl/1823.patch new file mode 100644 index 000000000..cc901a6be --- /dev/null +++ b/ports/pcl/1823.patch @@ -0,0 +1,22 @@ +From b89b32b5e812353e93a5c35203c70b878c8ae2b7 Mon Sep 17 00:00:00 2001 +From: Mourad Boufarguine +Date: Mon, 20 Feb 2017 10:13:25 +0100 +Subject: [PATCH] Link to delayimp library for all MSVC versions + +--- + cmake/pcl_targets.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/pcl_targets.cmake b/cmake/pcl_targets.cmake +index 691ead0b7a..06df2791cd 100644 +--- a/cmake/pcl_targets.cmake ++++ b/cmake/pcl_targets.cmake +@@ -196,7 +196,7 @@ macro(PCL_ADD_LIBRARY _name _component) + target_link_libraries(${_name} gomp) + endif() + +- if(MSVC90 OR MSVC10) ++ if(MSVC) + target_link_libraries(${_name} delayimp.lib) # because delay load is enabled for openmp.dll + endif() + diff --git a/ports/pcl/1830.patch b/ports/pcl/1830.patch new file mode 100644 index 000000000..b197e9183 --- /dev/null +++ b/ports/pcl/1830.patch @@ -0,0 +1,68 @@ +From b9022ebd8ad5f5300662069b5f79995d0c0e18be Mon Sep 17 00:00:00 2001 +From: Tsukasa Sugiura +Date: Fri, 24 Feb 2017 23:52:40 +0900 +Subject: [PATCH] Remove MSVCdd variables + +Version check for MSVC with MSVC_VERSION variable instead of MSVCdd +variables, because MSVCdd variables are legacy. +(e.g. MSVCdd is not defined for Visual C++ 2017.) +--- + CMakeLists.txt | 14 +++++++------- + cmake/pcl_cpack.cmake | 10 +++++----- + 2 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7c455e175d..a07a3af0a4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -248,18 +248,18 @@ if(OPENMP_FOUND) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + message (STATUS "Found OpenMP") + if(MSVC) +- if(MSVC90) ++ if(MSVC_VERSION EQUAL 1500) + set(OPENMP_DLL VCOMP90) +- elseif(MSVC10) ++ elseif(MSVC_VERSION EQUAL 1600) + set(OPENMP_DLL VCOMP100) +- elseif(MSVC11) ++ elseif(MSVC_VERSION EQUAL 1700) + set(OPENMP_DLL VCOMP110) +- elseif(MSVC12) ++ elseif(MSVC_VERSION EQUAL 1800) + set(OPENMP_DLL VCOMP120) +- elseif(MSVC14) ++ elseif(MSVC_VERSION EQUAL 1900) ++ set(OPENMP_DLL VCOMP140) ++ elseif(MSVC_VERSION EQUAL 1910) + set(OPENMP_DLL VCOMP140) +- elseif(MSVC15) +- set(OPENMP_DLL VCOMP150) + endif() + if(OPENMP_DLL) + set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DELAYLOAD:${OPENMP_DLL}D.dll") +diff --git a/cmake/pcl_cpack.cmake b/cmake/pcl_cpack.cmake +index a42d930d2c..eec2b1b1db 100644 +--- a/cmake/pcl_cpack.cmake ++++ b/cmake/pcl_cpack.cmake +@@ -37,15 +37,15 @@ if(WIN32) + if(BUILD_all_in_one_installer) + set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION}-AllInOne") + endif(BUILD_all_in_one_installer) +- if(MSVC10) ++ if(MSVC_VERSION EQUAL 1600) + set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-msvc2010-${win_system_name}") +- elseif(MSVC11) ++ elseif(MSVC_VERSION EQUAL 1700) + set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-msvc2012-${win_system_name}") +- elseif(MSVC12) ++ elseif(MSVC_VERSION EQUAL 1800) + set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-msvc2013-${win_system_name}") +- elseif(MSVC14) ++ elseif(MSVC_VERSION EQUAL 1900) + set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-msvc2015-${win_system_name}") +- elseif(MSVC15) ++ elseif(MSVC_VERSION EQUAL 1910) + set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-msvc2017-${win_system_name}") + else() + set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-${win_system_name}") diff --git a/ports/pcl/1855.patch b/ports/pcl/1855.patch new file mode 100644 index 000000000..319408849 --- /dev/null +++ b/ports/pcl/1855.patch @@ -0,0 +1,24 @@ +From 274e55a289c1f67e19c24a7672453384527247eb Mon Sep 17 00:00:00 2001 +From: Tsukasa Sugiura +Date: Tue, 18 Apr 2017 21:54:12 +0900 +Subject: [PATCH] Update find Boost version + +Update find Boost version. +Add Boost 1.64.0 that supported Visual Studio 2017. +--- + cmake/pcl_find_boost.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/pcl_find_boost.cmake b/cmake/pcl_find_boost.cmake +index 7ccf80c727..68920ccd41 100644 +--- a/cmake/pcl_find_boost.cmake ++++ b/cmake/pcl_find_boost.cmake +@@ -19,7 +19,7 @@ if(${CMAKE_VERSION} VERSION_LESS 2.8.5) + "1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43") + else(${CMAKE_VERSION} VERSION_LESS 2.8.5) + set(Boost_ADDITIONAL_VERSIONS +- "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" ++ "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" + "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" + "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" + "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47") diff --git a/ports/pcl/1856.patch b/ports/pcl/1856.patch new file mode 100644 index 000000000..75ccccc95 --- /dev/null +++ b/ports/pcl/1856.patch @@ -0,0 +1,23 @@ +From fd32c32e92c24823b4852f44221e67aba7accbf3 Mon Sep 17 00:00:00 2001 +From: Tsukasa Sugiura +Date: Sun, 23 Apr 2017 01:36:06 +0900 +Subject: [PATCH] Update find Boost versions for PCLConfig + +Add latest versions to find Boost macro. +--- + PCLConfig.cmake.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in +index fd214a85cb..af1f772db6 100644 +--- a/PCLConfig.cmake.in ++++ b/PCLConfig.cmake.in +@@ -91,7 +91,7 @@ macro(find_boost) + else(${CMAKE_VERSION} VERSION_LESS 2.8.5) + set(Boost_ADDITIONAL_VERSIONS + "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@.@Boost_SUBMINOR_VERSION@" "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@" +- "1.61.0" "1.61" "1.60.0" "1.60" ++ "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" + "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" + "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" + "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47") diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL new file mode 100644 index 000000000..aa3b892b6 --- /dev/null +++ b/ports/pcl/CONTROL @@ -0,0 +1,4 @@ +Source: pcl +Version: 1.8.0 +Build-Depends: boost, eigen3, flann, qhull, vtk, openni2 +Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. diff --git a/ports/pcl/config.patch b/ports/pcl/config.patch new file mode 100644 index 000000000..2f1e26bb2 --- /dev/null +++ b/ports/pcl/config.patch @@ -0,0 +1,39 @@ +diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in +index 994d20e5d..7f57c0790 100644 +--- a/PCLConfig.cmake.in ++++ b/PCLConfig.cmake.in +@@ -149,7 +149,7 @@ macro(find_qhull) + NAMES "@QHULL_LIBRARY_DEBUG_NAME@" + HINTS "${QHULL_ROOT}" "$ENV{QHULL_ROOT}" + PATHS "$ENV{PROGRAMFILES}/qhull" "$ENV{PROGRAMW6432}/qhull" +- PATH_SUFFIXES project build bin lib) ++ PATH_SUFFIXES project build bin debug/lib) + + find_package_handle_standard_args(qhull DEFAULT_MSG QHULL_LIBRARY QHULL_INCLUDE_DIRS) + +@@ -433,7 +433,7 @@ macro(find_flann) + HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}" + PATHS "$ENV{PROGRAMFILES}/flann 1.6.9" "$ENV{PROGRAMW6432}/flann 1.6.9" + "$ENV{PROGRAMFILES}/flann" "$ENV{PROGRAMW6432}/flann" +- PATH_SUFFIXES lib) ++ PATH_SUFFIXES debug/lib) + + find_package_handle_standard_args(Flann DEFAULT_MSG FLANN_LIBRARY FLANN_INCLUDE_DIRS) + if(FLANN_FOUND) +@@ -708,6 +708,7 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR) + if(WIN32 AND NOT MINGW) + # PCLConfig.cmake is installed to PCL_ROOT/cmake + get_filename_component(PCL_ROOT "${PCL_DIR}" PATH) ++ get_filename_component(PCL_ROOT "${PCL_ROOT}" PATH) + else(WIN32 AND NOT MINGW) + # PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y + get_filename_component(PCL_ROOT "${PCL_DIR}" PATH) +@@ -719,7 +720,7 @@ if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl + # Found a PCL installation + # pcl_message("Found a PCL installation") + set(PCL_INCLUDE_DIRS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") +- set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@") ++ set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@" "${PCL_ROOT}/debug/@LIB_INSTALL_DIR@") + if(EXISTS "${PCL_ROOT}/3rdParty") + set(PCL_ALL_IN_ONE_INSTALLER ON) + endif(EXISTS "${PCL_ROOT}/3rdParty") diff --git a/ports/pcl/config_install.patch b/ports/pcl/config_install.patch new file mode 100644 index 000000000..de11bd939 --- /dev/null +++ b/ports/pcl/config_install.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/pcl_utils.cmake b/cmake/pcl_utils.cmake +index 55b0820f2..034fbc227 100644 +--- a/cmake/pcl_utils.cmake ++++ b/cmake/pcl_utils.cmake +@@ -109,7 +109,7 @@ macro(SET_INSTALL_DIRS) + set(BIN_INSTALL_DIR "bin") + set(PKGCFG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig") + if(WIN32 AND NOT MINGW) +- set(PCLCONFIG_INSTALL_DIR "cmake") ++ set(PCLCONFIG_INSTALL_DIR "share/pcl") + else(WIN32 AND NOT MINGW) + set(PCLCONFIG_INSTALL_DIR "share/${PROJECT_NAME_LOWER}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}") + endif(WIN32 AND NOT MINGW) diff --git a/ports/pcl/find_flann.patch b/ports/pcl/find_flann.patch new file mode 100644 index 000000000..e46618255 --- /dev/null +++ b/ports/pcl/find_flann.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e5fd763e3..241fa5208 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -276,9 +276,9 @@ include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) + add_definitions(-DEIGEN_USE_NEW_STDVECTOR + -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET) + # FLANN (required) +-if(NOT PCL_SHARED_LIBS OR (WIN32 AND NOT MINGW)) ++if(NOT PCL_SHARED_LIBS) + set(FLANN_USE_STATIC ON) +-endif(NOT PCL_SHARED_LIBS OR (WIN32 AND NOT MINGW)) ++endif(NOT PCL_SHARED_LIBS) + find_package(FLANN 1.7.0 REQUIRED) + include_directories(${FLANN_INCLUDE_DIRS}) + +diff --git a/cmake/Modules/FindFLANN.cmake b/cmake/Modules/FindFLANN.cmake +index b5739dc95..b5c22a3b0 100644 +--- a/cmake/Modules/FindFLANN.cmake ++++ b/cmake/Modules/FindFLANN.cmake +@@ -10,11 +10,11 @@ + # look for shared ones + + if(FLANN_USE_STATIC) +- set(FLANN_RELEASE_NAME flann_cpp_s) +- set(FLANN_DEBUG_NAME flann_cpp_s-gd) ++ set(FLANN_RELEASE_NAME flann_cpp) ++ set(FLANN_DEBUG_NAME flann_cpp) + else(FLANN_USE_STATIC) + set(FLANN_RELEASE_NAME flann_cpp) +- set(FLANN_DEBUG_NAME flann_cpp-gd) ++ set(FLANN_DEBUG_NAME flann_cpp) + endif(FLANN_USE_STATIC) + + find_package(PkgConfig QUIET) diff --git a/ports/pcl/find_openni2.patch b/ports/pcl/find_openni2.patch new file mode 100644 index 000000000..4bd3e0799 --- /dev/null +++ b/ports/pcl/find_openni2.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/Modules/FindOpenNI2.cmake b/cmake/Modules/FindOpenNI2.cmake +index 713099a14..f31de96a6 100644 +--- a/cmake/Modules/FindOpenNI2.cmake ++++ b/cmake/Modules/FindOpenNI2.cmake +@@ -51,6 +51,7 @@ find_path(OPENNI2_INCLUDE_DIRS OpenNI.h + PATHS + "$ENV{OPENNI2_INCLUDE${OPENNI2_SUFFIX}}" # Win64 needs '64' suffix + /usr/include/openni2 # common path for deb packages ++ PATH_SUFFIXES include/openni2 + ) + + find_library(OPENNI2_LIBRARY diff --git a/ports/pcl/find_qhull.patch b/ports/pcl/find_qhull.patch new file mode 100644 index 000000000..0f5036e1e --- /dev/null +++ b/ports/pcl/find_qhull.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/Modules/FindQhull.cmake b/cmake/Modules/FindQhull.cmake +index 698bd151b..44c1d5d8d 100644 +--- a/cmake/Modules/FindQhull.cmake ++++ b/cmake/Modules/FindQhull.cmake +@@ -55,7 +55,7 @@ find_library(QHULL_LIBRARY_DEBUG + NAMES ${QHULL_DEBUG_NAME} ${QHULL_RELEASE_NAME} + HINTS "${QHULL_ROOT}" "$ENV{QHULL_ROOT}" + PATHS "$ENV{PROGRAMFILES}/QHull" "$ENV{PROGRAMW6432}/QHull" +- PATH_SUFFIXES project build bin lib) ++ PATH_SUFFIXES project build bin debug/lib) + + if(NOT QHULL_LIBRARY_DEBUG) + set(QHULL_LIBRARY_DEBUG ${QHULL_LIBRARY}) diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake new file mode 100644 index 000000000..2c4aad052 --- /dev/null +++ b/ports/pcl/portfile.cmake @@ -0,0 +1,71 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pcl-pcl-1.8.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/PointCloudLibrary/pcl/archive/pcl-1.8.0.zip" + FILENAME "pcl-1.8.0.zip" + SHA512 932f7e2101707003712e53d9310c6ba8304b8d325997a71a45d052c329cd9465f1d390c6c53a11bcb01d65e808c7701452ea06f116a0bd779d8098fdf3246ca8 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/config.patch" + "${CMAKE_CURRENT_LIST_DIR}/config_install.patch" + "${CMAKE_CURRENT_LIST_DIR}/find_flann.patch" + "${CMAKE_CURRENT_LIST_DIR}/find_qhull.patch" + "${CMAKE_CURRENT_LIST_DIR}/find_openni2.patch" + # Fix for PCL 1.8.0 + "${CMAKE_CURRENT_LIST_DIR}/1635.patch" + "${CMAKE_CURRENT_LIST_DIR}/1788.patch" + "${CMAKE_CURRENT_LIST_DIR}/1823.patch" + "${CMAKE_CURRENT_LIST_DIR}/1830.patch" + "${CMAKE_CURRENT_LIST_DIR}/1855.patch" + "${CMAKE_CURRENT_LIST_DIR}/1856.patch" +) + +if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(CRT_LINKAGE ON) +elseif(VCPKG_CRT_LINKAGE STREQUAL "static") + set(CRT_LINKAGE OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + #PREFER_NINJA + OPTIONS + # BUILD + -DBUILD_2d=OFF # The pcl-2d import library is not generated. + -DBUILD_surface_on_nurbs=ON + -DBUILD_tools=OFF + # PCL + -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${CRT_LINKAGE} + -DPCL_SHARED_LIBS=${CRT_LINKAGE} + # WITH + -DWITH_CUDA=OFF + -DWITH_LIBUSB=OFF + -DWITH_OPENNI2=ON + -DWITH_PCAP=OFF + -DWITH_PNG=OFF + -DWITH_QHULL=ON + -DWITH_QT=OFF + -DWITH_VTK=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcl) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/pcl/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/pcl/copyright) -- cgit v1.2.3 From 6bb7c10b155376088e24f9bcf12acd133b89fb85 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Wed, 21 Jun 2017 21:38:28 +0900 Subject: Fix to enable pcl_2d module Fix to enable pcl_2d module. It's a header only library. --- ports/pcl/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index 2c4aad052..cd335531e 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -46,7 +46,6 @@ vcpkg_configure_cmake( #PREFER_NINJA OPTIONS # BUILD - -DBUILD_2d=OFF # The pcl-2d import library is not generated. -DBUILD_surface_on_nurbs=ON -DBUILD_tools=OFF # PCL @@ -65,6 +64,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/pcl_2d_release.dll ${CURRENT_PACKAGES_DIR}/debug/bin/pcl_2d_debug.dll) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcl) -- cgit v1.2.3 From f58052047adb5d9a3e3dee17feb9ff8f784d48e9 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 21 Jun 2017 09:04:57 -0700 Subject: [thor] Fixes aurora headers, defines SFML_STATIC, uses install target --- ports/thor/CONTROL | 2 +- ports/thor/portfile.cmake | 53 ++++++++++++++++++++++------------------------- 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL index ddaad1c5d..46396427b 100644 --- a/ports/thor/CONTROL +++ b/ports/thor/CONTROL @@ -1,4 +1,4 @@ Source: thor Version: v2.0 Description: Extends the multimedia library SFML with higher-level features -Build-Depends: sfml +Build-Depends: sfml, aurora diff --git a/ports/thor/portfile.cmake b/ports/thor/portfile.cmake index 710d464b9..32602a84c 100644 --- a/ports/thor/portfile.cmake +++ b/ports/thor/portfile.cmake @@ -35,37 +35,34 @@ vcpkg_configure_cmake( -DTHOR_STATIC_STD_LIBS=${THOR_STATIC_STD_LIBS} ) -vcpkg_build_cmake() +vcpkg_install_cmake() -file(GLOB DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/src/*.dll" -) -file(GLOB LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/src/*.lib" -) -file(GLOB DEBUG_DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/src/*.dll" -) -file(GLOB DEBUG_LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/src/*.lib" + +set(CONFIG_FILE "${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp") + +file(READ ${CONFIG_FILE} CONFIG_H) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(SFML_STATIC)" "1" CONFIG_H "${CONFIG_H}") + else() + string(REPLACE "defined(SFML_STATIC)" "0" CONFIG_H "${CONFIG_H}") + endif() + +file(WRITE ${CONFIG_FILE} "${CONFIG_H}") + +file(GLOB LICENSE + "${CURRENT_PACKAGES_DIR}/debug/LicenseThor.txt" + "${CURRENT_PACKAGES_DIR}/debug/LicenseAurora.txt" + "${CURRENT_PACKAGES_DIR}/LicenseThor.txt" + "${CURRENT_PACKAGES_DIR}/LicenseAurora.txt" ) -if(DLLS) - file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -endif() -file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +if(LICENSE) + file(REMOVE ${LICENSE}) endif() -file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/Aurora) -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/thor RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From cf27696e5a213bed7077dd33d6012a88bbcabd96 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 21 Jun 2017 09:29:50 -0700 Subject: remove internal copy used during build --- ports/thor/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/thor/portfile.cmake b/ports/thor/portfile.cmake index 32602a84c..c96df4728 100644 --- a/ports/thor/portfile.cmake +++ b/ports/thor/portfile.cmake @@ -11,6 +11,8 @@ vcpkg_from_github(ARCHIVE HEAD_REF master ) +file(COPY ${CURRENT_INSTALLED_DIR}/include/Aurora DESTINATION ${SOURCE_PATH}/extlibs/aurora/include) + set(ENV{SFML_ROOT} ${CURRENT_INSTALLED_DIR}) -- cgit v1.2.3 From b8e9aed3836cbc77c323705fbdad28e85df31022 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Wed, 21 Jun 2017 10:06:24 -0700 Subject: [beast] Update to version 63 --- ports/beast/CONTROL | 2 +- ports/beast/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL index 78bf70edc..1dc1e4a1c 100644 --- a/ports/beast/CONTROL +++ b/ports/beast/CONTROL @@ -1,4 +1,4 @@ Source: beast -Version: v59 +Version: v63 Build-Depends: boost Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake index 0cb76c053..86011da55 100644 --- a/ports/beast/portfile.cmake +++ b/ports/beast/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vinniefalco/Beast - REF 4e4bcf8b1114229713eec0cf5fd392e5bdd76717 - SHA512 514b93dccd483b1b847d9274f8a6fe9f4c32fdae6e1c45410abd3bb3554fa901aac8d6fc666a76420e1c4fa729e2ce7f95afa459faf01614de41995040eeb7bb + REF f68dc343e7c077caee8a95b2a59a2ccb9f979567 + SHA512 d1c4ce5ee4d4b7cb20084c96af87ce106a4474631754a54a7cc19343e0767ed7a14cdb00f27bb1958e35f411b99c90444efd578e8c77e98d7e416703ea6f28bd HEAD_REF master ) -- cgit v1.2.3 From b188fefecaf03c1f30ee4752c2235975058553e2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 21 Jun 2017 15:27:34 -0700 Subject: [triplet] Use pointer to instance-controlled strings and cache hashcode --- toolsrc/include/triplet.h | 34 +++++++++++++++++----------------- toolsrc/src/triplet.cpp | 39 +++++++++++++++++++++++++++++---------- 2 files changed, 46 insertions(+), 27 deletions(-) diff --git a/toolsrc/include/triplet.h b/toolsrc/include/triplet.h index e634afd3f..be3bcf5b3 100644 --- a/toolsrc/include/triplet.h +++ b/toolsrc/include/triplet.h @@ -4,8 +4,13 @@ namespace vcpkg { + struct TripletInstance; + struct Triplet { + public: + constexpr Triplet() : m_instance(&default_instance) {} + static Triplet from_canonical_name(const std::string& triplet_as_string); static const Triplet X86_WINDOWS; @@ -16,28 +21,23 @@ namespace vcpkg const std::string& canonical_name() const; const std::string& to_string() const; + size_t hash_code() const; + + bool operator==(const Triplet& other) const; private: - std::string m_canonical_name; - }; + static const TripletInstance default_instance; - bool operator==(const Triplet& left, const Triplet& right); + constexpr Triplet(const TripletInstance* ptr) : m_instance(ptr) {} + + const TripletInstance* m_instance; + }; bool operator!=(const Triplet& left, const Triplet& right); } -namespace std +template<> +struct std::hash { - template<> - struct hash - { - size_t operator()(const vcpkg::Triplet& t) const - { - std::hash hasher; - size_t hash = 17; - hash = hash * 31 + hasher(t.canonical_name()); - return hash; - } - }; - -} // namespace std + size_t operator()(const vcpkg::Triplet& t) const { return t.hash_code(); } +}; diff --git a/toolsrc/src/triplet.cpp b/toolsrc/src/triplet.cpp index ff41ce77d..451deb040 100644 --- a/toolsrc/src/triplet.cpp +++ b/toolsrc/src/triplet.cpp @@ -6,31 +6,50 @@ namespace vcpkg { + struct TripletInstance + { + TripletInstance(std::string&& s) : value(std::move(s)), hash(std::hash()(value)) {} + + const std::string value; + const size_t hash = 0; + + bool operator==(const TripletInstance& o) const { return o.value == value; } + }; + const TripletInstance Triplet::default_instance({}); +} + +template<> +struct std::hash +{ + size_t operator()(const vcpkg::TripletInstance& t) const { return t.hash; } +}; + +namespace vcpkg +{ + static std::unordered_set g_triplet_instances; + const Triplet Triplet::X86_WINDOWS = from_canonical_name("x86-windows"); const Triplet Triplet::X64_WINDOWS = from_canonical_name("x64-windows"); const Triplet Triplet::X86_UWP = from_canonical_name("x86-uwp"); const Triplet Triplet::X64_UWP = from_canonical_name("x64-uwp"); const Triplet Triplet::ARM_UWP = from_canonical_name("arm-uwp"); - bool operator==(const Triplet& left, const Triplet& right) - { - return left.canonical_name() == right.canonical_name(); - } + bool Triplet::operator==(const Triplet& other) const { return this->m_instance == other.m_instance; } bool operator!=(const Triplet& left, const Triplet& right) { return !(left == right); } Triplet Triplet::from_canonical_name(const std::string& triplet_as_string) { - const std::string s(Strings::ascii_to_lowercase(triplet_as_string)); + std::string s(Strings::ascii_to_lowercase(triplet_as_string)); auto it = std::find(s.cbegin(), s.cend(), '-'); Checks::check_exit(VCPKG_LINE_INFO, it != s.cend(), "Invalid triplet: %s", triplet_as_string); - Triplet t; - t.m_canonical_name = s; - return t; + auto p = g_triplet_instances.emplace(std::move(s)); + return &*p.first; } - const std::string& Triplet::canonical_name() const { return this->m_canonical_name; } + const std::string& Triplet::canonical_name() const { return this->m_instance->value; } - const std::string& Triplet::to_string() const { return this->m_canonical_name; } + const std::string& Triplet::to_string() const { return this->canonical_name(); } + size_t Triplet::hash_code() const { return m_instance->hash; } } -- cgit v1.2.3 From 7a6d530a8c0b58d3b32b81acfd5f060675d2653d Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 21 Jun 2017 16:43:02 -0700 Subject: fixed zlib debug ext, added gtest to deps --- ports/rocksdb/CONTROL | 2 +- ports/rocksdb/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index b6e231010..a9c879104 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,4 @@ Source: rocksdb Version: 5.4.6 Description: A library that provides an embeddable, persistent key-value store for fast storage -Build-Depends: snappy, lz4, gflags, zlib +Build-Depends: snappy, lz4, gflags, zlib, gtest diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index d6b71473a..f47c2fb19 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -33,7 +33,7 @@ LIST(APPEND ENV_REPLACE_LIST "set(LZ4_LIB_RELEASE \${LZ4_HOME}/lib/lz4.lib)" "set(ZLIB_HOME \${CURRENT_INSTALLED_DIR})" "set(ZLIB_INCLUDE \${ZLIB_HOME}/include)" - "set(ZLIB_LIB_DEBUG \${ZLIB_HOME}/debug/lib/zlib.lib)" + "set(ZLIB_LIB_DEBUG \${ZLIB_HOME}/debug/lib/zlibd.lib)" "set(ZLIB_LIB_RELEASE \${ZLIB_HOME}/lib/zlib.lib)" ) LIST(APPEND ENV_FIND_LIST -- cgit v1.2.3 From 8461bc1913df1a7db287999c33876291cd25be61 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Jun 2017 17:41:31 -0700 Subject: [vcpkg-export] Fix nuget export. Fixes #1223. --- toolsrc/src/commands_export.cpp | 4 ++++ toolsrc/src/vcpkg_Files.cpp | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index e46001b06..cbb3a7733 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -122,6 +122,10 @@ namespace vcpkg::Commands::Export const std::string targets_redirect_content = create_targets_redirect("../../scripts/buildsystems/msbuild/vcpkg.targets"); const fs::path targets_redirect = paths.buildsystems / "tmp" / "vcpkg.export.nuget.targets"; + + std::error_code ec; + fs.create_directories(paths.buildsystems / "tmp", ec); + fs.write_contents(targets_redirect, targets_redirect_content); const std::string nuspec_file_content = diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg_Files.cpp index 7b12ea699..29da7e684 100644 --- a/toolsrc/src/vcpkg_Files.cpp +++ b/toolsrc/src/vcpkg_Files.cpp @@ -164,7 +164,8 @@ namespace vcpkg::Files { FILE* f = nullptr; auto ec = _wfopen_s(&f, file_path.native().c_str(), L"wb"); - Checks::check_exit(VCPKG_LINE_INFO, ec == 0); + Checks::check_exit( + VCPKG_LINE_INFO, ec == 0, "Error: Could not open file for writing: %s", file_path.u8string().c_str()); auto count = fwrite(data.data(), sizeof(data[0]), data.size(), f); fclose(f); -- cgit v1.2.3 From 03de2e421b1e40d3a2c9eb60889e983b7d83b49b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Jun 2017 18:17:41 -0700 Subject: [evpp] Simplify port to use vcpkg_from_github() --- ports/evpp/portfile.cmake | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/ports/evpp/portfile.cmake b/ports/evpp/portfile.cmake index 22c565c1c..db27b4d63 100644 --- a/ports/evpp/portfile.cmake +++ b/ports/evpp/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) set(EVPP_LOCAL_TEST OFF) @@ -23,35 +11,27 @@ if (EVPP_LOCAL_TEST) FILENAME "evpp-${EVPP_VERSION}.zip" SHA512 ${EVPP_HASH} ) + vcpkg_extract_source_archive(${ARCHIVE}) else () - set(EVPP_HASH 13986f81efc7f831274cc55819980ee57d6a8729867901beafd3d31c50682de304a9552912ace1c7e0a92ee2df41a8c456b5f77f4721d622c97584b38b68cd37) - set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/evpp-${EVPP_VERSION}) - vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Qihoo360/evpp/archive/v${EVPP_VERSION}.zip" - FILENAME "evpp-${EVPP_VERSION}.zip" - SHA512 ${EVPP_HASH} + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Qihoo360/evpp + REF v${EVPP_VERSION} + SHA512 08226fe9853c1984f6554ede8f79a5767eec1d12ff2ff7172eef6f715ac7ea3f495b2336876823842408bd92b0ad99c9a3d506c07fc0add369f5cfa777f0406a + HEAD_REF master ) endif () -vcpkg_extract_source_archive(${ARCHIVE}) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/buildsystems/vcpkg.cmake -DEVPP_VCPKG_BUILD=ON + OPTIONS -DEVPP_VCPKG_BUILD=ON ) vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/evpp) -#remove duplicated files +# remove duplicated include files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# remove not used cmake files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake ) - # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/evpp) file(RENAME ${CURRENT_PACKAGES_DIR}/share/evpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/evpp/copyright) -- cgit v1.2.3 From 0154ef4a7b5a7022cc6f4338f136fa9b5f35d222 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Wed, 21 Jun 2017 22:31:23 -0700 Subject: glew cmake build --- ports/glew/portfile.cmake | 98 +++++++++-------------------------------------- 1 file changed, 18 insertions(+), 80 deletions(-) diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake index c975ca099..1628a8394 100644 --- a/ports/glew/portfile.cmake +++ b/ports/glew/portfile.cmake @@ -1,91 +1,29 @@ include(vcpkg_common_functions) + set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glew-2.0.0) + vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0.tgz" - FILENAME "glew-2.0.0.tgz" - SHA512 e9bcd5f19a4495ce6511dfd76e64b4e4d958603c513ee9063eb9fe24fc6e0413f168620661230f1baef558f2f907cef7fe7ab2bdf957a6f7bda5fe96e9319c6a + URLS "https://sourceforge.net/projects/glew/files/glew/snapshots/glew-20170423.tgz" + FILENAME "glew-20170423.tgz" + SHA512 2d4651196e01b4db7b210fc60505bf50ac9e37b49c8eee9c9bbfeadb4cb6f87f4c907e60e708a7371ff4b7596bee51ed35a76fba76f9a13a1f32f123121f1350 ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) -IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") - SET(BUILD_ARCH "Win32") -ELSEIF(TRIPLET_SYSTEM_ARCH MATCHES "arm") - MESSAGE(FATAL_ERROR " ARM is currently not supported.") -ELSE() - SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) -ENDIF() - -# TODO: Maybe switch to glews' cmake build system in the future -FOREACH(LINKAGE shared static) - if(NOT EXISTS ${SOURCE_PATH}/build/vc12/glew_${LINKAGE}14.vcxproj) - message(STATUS "Upgrading " ${LINKAGE} " project") - file(READ ${SOURCE_PATH}/build/vc12/glew_${LINKAGE}.vcxproj PROJ) - string(REPLACE - "v120" - "v140" - PROJ ${PROJ}) - string(REPLACE - "opengl32.lib%" - "opengl32.lib\;%" - PROJ ${PROJ}) - - if (LINKAGE STREQUAL "static") - string(REPLACE - "MultiThreadedDebugDLL" - "MultiThreadedDebug" - PROJ ${PROJ} - ) - endif() - file(WRITE ${SOURCE_PATH}/build/vc12/glew_${LINKAGE}14.vcxproj ${PROJ}) - endif() -ENDFOREACH(LINKAGE) -message(STATUS "Upgrading projects done") +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/build/cmake +) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/build/vc12/glew_static14.vcxproj - ) -else() - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/build/vc12/glew_shared14.vcxproj - ) -endif() +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/glew") -message(STATUS "Installing") +vcpkg_copy_pdbs() -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(INSTALL - ${SOURCE_PATH}/bin/Debug/${BUILD_ARCH}/glew32d.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) - file(INSTALL - ${SOURCE_PATH}/bin/Release/${BUILD_ARCH}/glew32.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) - file(INSTALL - ${SOURCE_PATH}/lib/Debug/${BUILD_ARCH}/glew32d.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib RENAME glew32.lib - ) - file(INSTALL - ${SOURCE_PATH}/lib/Release/${BUILD_ARCH}/glew32.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) -else() - file(INSTALL - ${SOURCE_PATH}/lib/Debug/${BUILD_ARCH}/glew32sd.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib RENAME glew32.lib - ) - file(INSTALL - ${SOURCE_PATH}/lib/Release/${BUILD_ARCH}/glew32s.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME glew32.lib - ) -endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/glewinfo.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/visualinfo.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/glewinfo.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/visualinfo.exe) -file(INSTALL - ${SOURCE_PATH}/include/GL - DESTINATION ${CURRENT_PACKAGES_DIR}/include -) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glew RENAME copyright) -vcpkg_copy_pdbs() -message(STATUS "Installing done") +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glew RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From ac763f975b469934e925f7320a5855245f4a509b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Jun 2017 23:25:57 -0700 Subject: [glew] Move source dir to avoid conflicts with previous source version. Rename static -> dynamic. --- ports/glew/CONTROL | 2 +- ports/glew/portfile.cmake | 27 ++++++++++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/ports/glew/CONTROL b/ports/glew/CONTROL index 21051a475..6c56fefe9 100644 --- a/ports/glew/CONTROL +++ b/ports/glew/CONTROL @@ -1,3 +1,3 @@ Source: glew -Version: 2.0.0-1 +Version: 2.0.0-2 Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. \ No newline at end of file diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake index 1628a8394..8ca69eb5f 100644 --- a/ports/glew/portfile.cmake +++ b/ports/glew/portfile.cmake @@ -1,13 +1,13 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glew-2.0.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/20170423/glew-2.0.0) vcpkg_download_distfile(ARCHIVE_FILE URLS "https://sourceforge.net/projects/glew/files/glew/snapshots/glew-20170423.tgz" FILENAME "glew-20170423.tgz" SHA512 2d4651196e01b4db7b210fc60505bf50ac9e37b49c8eee9c9bbfeadb4cb6f87f4c907e60e708a7371ff4b7596bee51ed35a76fba76f9a13a1f32f123121f1350 ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) +vcpkg_extract_source_archive(${ARCHIVE_FILE} ${CURRENT_BUILDTREES_DIR}/src/20170423) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/build/cmake @@ -17,13 +17,30 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/glew") -vcpkg_copy_pdbs() +foreach(FILE ${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-debug.cmake ${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-release.cmake) + file(READ ${FILE} _contents) + string(REPLACE "libglew32" "glew32" _contents "${_contents}") + file(WRITE ${FILE} "${_contents}") +endforeach() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libglew32.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libglew32.lib ${CURRENT_PACKAGES_DIR}/lib/glew32.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/glew32d.lib) +endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/glewinfo.exe) file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/visualinfo.exe) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/glewinfo.exe) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/visualinfo.exe) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +endif() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glew RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From bffa100a43c995b56b782f0de64dbaabb4f1f2a1 Mon Sep 17 00:00:00 2001 From: sigman Date: Thu, 22 Jun 2017 13:29:00 +0300 Subject: [magnum][magnum-plugins] Fixed plugins location, static plugins build Static libray linkage should work now, including plugins. --- ports/magnum-plugins/CONTROL | 2 +- ports/magnum-plugins/portfile.cmake | 20 ++++++++++++++++++++ ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 15 +++++++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 9d684689a..f6e194c9f 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017-3 +Version: jun2017-4 Build-Depends: stb, magnum Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index 0fe8f83a1..b26262490 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -15,8 +15,10 @@ vcpkg_apply_patches( if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) + set(BUILD_PLUGINS_STATIC 1) else() set(BUILD_STATIC 0) + set(BUILD_PLUGINS_STATIC 0) endif() vcpkg_configure_cmake( @@ -36,6 +38,9 @@ vcpkg_configure_cmake( -DWITH_ANYIMAGECONVERTER=ON -DWITH_ANYSCENEIMPORTER=ON -DBUILD_STATIC=${BUILD_STATIC} + -DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC} + -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d + -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum ) vcpkg_install_cmake() @@ -46,6 +51,21 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + # move plugin libs to conventional place + file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) + file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*) + file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) +else() + # remove headers and libs for plugins + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + # hint vcpkg + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) endif() # Handle copyright diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 9245e4380..a040014da 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-4 +Version: jun2017-5 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 14d5e0846..9eff36dcf 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -16,8 +16,10 @@ vcpkg_apply_patches( if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) + set(BUILD_PLUGINS_STATIC 1) else() set(BUILD_STATIC 0) + set(BUILD_PLUGINS_STATIC 0) endif() vcpkg_configure_cmake( @@ -38,6 +40,7 @@ vcpkg_configure_cmake( -DWITH_FONTCONVERTER=ON -DWITH_TGAIMAGECONVERTER=ON -DBUILD_STATIC=${BUILD_STATIC} + -DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC} -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum --trace @@ -64,6 +67,18 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + # move plugin libs to conventional place + file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) + file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*) + file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) +else() + # remove headers and libs for plugins + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/MagnumPlugins) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) endif() # Handle copyright -- cgit v1.2.3 From b68967891edbf9317921e5f5158a8f2e7772bbea Mon Sep 17 00:00:00 2001 From: sigman Date: Thu, 22 Jun 2017 13:38:03 +0300 Subject: [SObjectizer] In-process message dispatching framework Added port of the C++ message dispatching actor model framework. https://sourceforge.net/projects/sobjectizer/ --- ports/sobjectizer/001-cmake.patch | 36 ++++++++++++++++++++++++++++++++++ ports/sobjectizer/CONTROL | 3 +++ ports/sobjectizer/portfile.cmake | 41 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 ports/sobjectizer/001-cmake.patch create mode 100644 ports/sobjectizer/CONTROL create mode 100644 ports/sobjectizer/portfile.cmake diff --git a/ports/sobjectizer/001-cmake.patch b/ports/sobjectizer/001-cmake.patch new file mode 100644 index 000000000..cb4285e91 --- /dev/null +++ b/ports/sobjectizer/001-cmake.patch @@ -0,0 +1,36 @@ +diff --git a/so_5/CMakeLists.txt b/so_5/CMakeLists.txt +index bd6f1d7..0e30831 100644 +--- a/so_5/CMakeLists.txt ++++ b/so_5/CMakeLists.txt +@@ -71,12 +71,17 @@ set(SO_5_SRC exception.cpp + disp/prio_dedicated_threads/one_per_prio/pub.cpp + ) + +-add_library(${SO_5_TARGET} SHARED ${SO_5_SRC}) ++if (SO_BUILD_STATIC) ++ message(STATUS "Building static.") ++ add_library(${SO_5_TARGET} STATIC ${SO_5_SRC}) ++ target_compile_definitions(${SO_5_TARGET} ++ PUBLIC -DSO_5_STATIC_LIB ++ ) ++else() ++ message(STATUS "Building dynamic.") ++ add_library(${SO_5_TARGET} SHARED ${SO_5_SRC}) ++endif() + +-add_library(${SO_5_S_TARGET} STATIC ${SO_5_SRC}) +-target_compile_definitions(${SO_5_S_TARGET} +- PUBLIC -DSO_5_STATIC_LIB +-) + + set(SO_5_EXT_LIBS ) + if( ANDROID ) +@@ -90,7 +95,7 @@ foreach(__extLibrary ${SO_5_EXT_LIBS}) + endforeach() + + install( +- TARGETS ${SO_5_TARGET} ${SO_5_S_TARGET} ++ TARGETS ${SO_5_TARGET} + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL new file mode 100644 index 000000000..3ec628460 --- /dev/null +++ b/ports/sobjectizer/CONTROL @@ -0,0 +1,3 @@ +Source: sobjectizer +Version: 5.5.19 +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 new file mode 100644 index 000000000..cbc6a9e12 --- /dev/null +++ b/ports/sobjectizer/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +set(VERSION 5.5.19) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so-${VERSION}/dev) + +vcpkg_download_distfile(ARCHIVE + URLS "https://downloads.sourceforge.net/project/sobjectizer/sobjectizer/SObjectizer%20Core%20v.5.5/so-${VERSION}.zip" + FILENAME "so-${VERSION}.zip" + SHA512 1dd5167e3a04a169f0d192504e64b2d7f0ce82322f4388207f15de21e31bf0a75f7b84efa406f0f84bea18235861479a169358e3a1b3bad6c3f7ffe5d33c502e +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-cmake.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(SO_BUILD_STATIC ON) + set(SO_BUILD_SHARED OFF) +else() + set(SO_BUILD_STATIC OFF) + set(SO_BUILD_SHARED ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSO_BUILD_STATIC=${SO_BUILD_STATIC} + -DSO_BUILD_SHARED=${SO_BUILD_SHARED} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/../LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sobjectizer) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/sobjectizer/LICENSE ${CURRENT_PACKAGES_DIR}/share/sobjectizer/copyright) -- cgit v1.2.3 From 5c93bc0102c2c90c31c14f7a978c946adc0ea904 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Jun 2017 14:54:34 -0700 Subject: [dlib] Fix static builds. Add cmake files back in. --- ports/dlib/CONTROL | 2 +- ports/dlib/portfile.cmake | 47 ++++++++++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index a6e886c4a..d9db5b99d 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,4 +1,4 @@ Source: dlib -Version: 19.4-3 +Version: 19.4-4 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3 Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index 2a5ae6f44..6c1bad0f8 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -8,43 +8,48 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/dlib-19.4) vcpkg_download_distfile(ARCHIVE - URLS "http://dlib.net/files/dlib-19.4.tar.bz2" - FILENAME "dlib-19.4.tar.bz2" - SHA512 c5ae22c507b57a13d880d79e9671730829114d0276508b0a41b373d3abae9057d960fce84fafe1be468d943910853baaa70c88f2516e20a0c41f3895bf217f7b + URLS "http://dlib.net/files/dlib-19.4.tar.bz2" + FILENAME "dlib-19.4.tar.bz2" + SHA512 c5ae22c507b57a13d880d79e9671730829114d0276508b0a41b373d3abae9057d960fce84fafe1be468d943910853baaa70c88f2516e20a0c41f3895bf217f7b ) vcpkg_extract_source_archive(${ARCHIVE}) file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libjpeg) file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libpng) file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/zlib) +# This fixes static builds; dlib doesn't pull in the needed transitive dependencies +file(READ "${SOURCE_PATH}/dlib/CMakeLists.txt" DLIB_CMAKE) +string(REPLACE "PNG_LIBRARY" "PNG_LIBRARIES" DLIB_CMAKE "${DLIB_CMAKE}") +file(WRITE "${SOURCE_PATH}/dlib/CMakeLists.txt" "${DLIB_CMAKE}") + vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DDLIB_LINK_WITH_SQLITE3=ON - -DDLIB_USE_FFTW=ON - -DDLIB_PNG_SUPPORT=ON - -DDLIB_JPEG_SUPPORT=ON - -DDLIB_USE_BLAS=OFF - -DDLIB_USE_LAPACK=OFF - -DDLIB_USE_CUDA=OFF - -DDLIB_GIF_SUPPORT=OFF - -DDLIB_USE_MKL_FFT=OFF - #-DDLIB_USE_CUDA=ON - OPTIONS_DEBUG - -DDLIB_ENABLE_ASSERTS=ON - #-DDLIB_ENABLE_STACK_TRACE=ON + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDLIB_LINK_WITH_SQLITE3=ON + -DDLIB_USE_FFTW=ON + -DDLIB_PNG_SUPPORT=ON + -DDLIB_JPEG_SUPPORT=ON + -DDLIB_USE_BLAS=OFF + -DDLIB_USE_LAPACK=OFF + -DDLIB_USE_CUDA=OFF + -DDLIB_GIF_SUPPORT=OFF + -DDLIB_USE_MKL_FFT=OFF + #-DDLIB_USE_CUDA=ON + OPTIONS_DEBUG + -DDLIB_ENABLE_ASSERTS=ON + #-DDLIB_ENABLE_STACK_TRACE=ON ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + # There is no way to suppress installation of the headers and resource files in debug build. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) # Remove other files not required in package -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/all) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/test) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/travis) -- cgit v1.2.3 From b0b186643c0ae0bc268bbf4ec2adeeb81c953004 Mon Sep 17 00:00:00 2001 From: Jozef Izso Date: Fri, 23 Jun 2017 13:49:56 +0200 Subject: grpc 1.4.0 --- ports/grpc/CONTROL | 2 +- ports/grpc/portfile.cmake | 5 ++--- ports/grpc/revert-c019e05.patch | 18 ------------------ 3 files changed, 3 insertions(+), 22 deletions(-) delete mode 100644 ports/grpc/revert-c019e05.patch diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 47290a0d3..8298a047c 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.3.1-1 +Version: 1.4.0 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework \ No newline at end of file diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 10e79cd55..3397e86dc 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF v1.3.1 - SHA512 1c9f35e84995158b75bb8694bb9d8c5ddafccf347c4827213290b221f9fc3ab9071c9f79a10a563e9cdfabae3f4b83d6148907f106066f54093242f818038438 + REF v1.4.0 + SHA512 183254e62604bae0ef8b97c3cda9718ec7ac03a1f29e29ecc582adf670d07ee177ae1ad92ffc042f8b12715f3afa8a0e4db34f88b826fe307249fd6eb7efd249 HEAD_REF master ) @@ -21,7 +21,6 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/revert-c019e05.patch ${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext.patch ) diff --git a/ports/grpc/revert-c019e05.patch b/ports/grpc/revert-c019e05.patch deleted file mode 100644 index 77c501f77..000000000 --- a/ports/grpc/revert-c019e05.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e09f729..c85a20a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -11847,7 +11847,12 @@ endif (gRPC_BUILD_TESTS) - - - -- -+if (gRPC_INSTALL) -+ install(EXPORT gRPCTargets -+ DESTINATION ${CMAKE_INSTALL_CMAKEDIR} -+ NAMESPACE gRPC:: -+ ) -+endif() - - foreach(_config gRPCConfig gRPCConfigVersion) - configure_file(tools/cmake/${_config}.cmake.in -- cgit v1.2.3 From c75a8aa7acce785ff0231921c829041f0d7fb131 Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 22 Jun 2017 16:07:21 +0200 Subject: [ptex] initial commit --- ports/ptex/CONTROL | 4 +++ ports/ptex/fix-build.patch | 65 ++++++++++++++++++++++++++++++++++++++++++++++ ports/ptex/portfile.cmake | 35 +++++++++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 ports/ptex/CONTROL create mode 100644 ports/ptex/fix-build.patch create mode 100644 ports/ptex/portfile.cmake diff --git a/ports/ptex/CONTROL b/ports/ptex/CONTROL new file mode 100644 index 000000000..b2e6bff27 --- /dev/null +++ b/ports/ptex/CONTROL @@ -0,0 +1,4 @@ +Source: ptex +Version: 2.1.28 +Description: Per-Face Texture Mapping for Production Rendering. +Build-Depends: zlib diff --git a/ports/ptex/fix-build.patch b/ports/ptex/fix-build.patch new file mode 100644 index 000000000..6d6484d60 --- /dev/null +++ b/ports/ptex/fix-build.patch @@ -0,0 +1,65 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dd327d0..5043452 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,15 +6,6 @@ include(CTest) + include(FindZLIB) + include(FindThreads) + +-enable_testing() +- +-# Detect the build type from the $FLAVOR environment variable +-if ("$ENV{FLAVOR}" MATCHES "debug") +- set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "type of build" FORCE) +-else () +- set(CMAKE_BUILD_TYPE "Release" CACHE STRING "type of build" FORCE) +-endif () +- + if (NOT WIN32) + set(CMAKE_CXX_FLAGS "-std=c++98 -Wall -Wextra -pedantic") + endif () +@@ -40,6 +31,6 @@ include_directories(src/ptex) + include_directories(${ZLIB_INCLUDE_DIR}) + + add_subdirectory(src/ptex) +-add_subdirectory(src/utils) +-add_subdirectory(src/tests) +-add_subdirectory(src/doc) ++#add_subdirectory(src/utils) ++#add_subdirectory(src/tests) ++#add_subdirectory(src/doc) +diff --git a/src/ptex/CMakeLists.txt b/src/ptex/CMakeLists.txt +index c926d98..ac2c71d 100644 +--- a/src/ptex/CMakeLists.txt ++++ b/src/ptex/CMakeLists.txt +@@ -1,6 +1,8 @@ +-if (WIN32) +- add_definitions(/DPTEX_EXPORTS) +-endif (WIN32) ++if (BUILD_SHARED_LIBS) ++ add_definitions(-DPTEX_EXPORTS) ++else () ++ add_definitions(-DPTEX_STATIC) ++endif () + + set(SRCS + PtexCache.cpp +@@ -14,15 +16,11 @@ set(SRCS + PtexUtils.cpp + PtexWriter.cpp) + +-add_library(Ptex_static STATIC ${SRCS}) +-set_target_properties(Ptex_static PROPERTIES OUTPUT_NAME Ptex) ++add_library(Ptex ${SRCS}) + +-add_library(Ptex_dynamic SHARED ${SRCS}) +-set_target_properties(Ptex_dynamic PROPERTIES OUTPUT_NAME Ptex) ++target_link_libraries(Ptex ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES}) + +-target_link_libraries(Ptex_dynamic ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES}) +- +-install(TARGETS Ptex_static Ptex_dynamic DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++install(TARGETS Ptex RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + install(FILES + PtexHalf.h diff --git a/ports/ptex/portfile.cmake b/ports/ptex/portfile.cmake new file mode 100644 index 000000000..52d77096b --- /dev/null +++ b/ports/ptex/portfile.cmake @@ -0,0 +1,35 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "UWP build not supported") +endif() + +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wdas/ptex + REF v2.1.28 + SHA512 ddce3c79f14d196e550c1e8a5b371482f88190cd667a2e2aa84601de1639f7cabb8571c1b3a49b48df46ce550d27088a00a67b1403c3bfec2ed73437c3dca3e8 + HEAD_REF master) + +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-build.patch) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +foreach(HEADER PtexHalf.h Ptexture.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/${HEADER} PTEX_HEADER) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "ifndef PTEX_STATIC" "if 1" PTEX_HEADER "${PTEX_HEADER}") + else() + string(REPLACE "ifndef PTEX_STATIC" "if 0" PTEX_HEADER "${PTEX_HEADER}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/${HEADER} "${PTEX_HEADER}") +endforeach() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(COPY ${SOURCE_PATH}/src/doc/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ptex) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/ptex/license.txt ${CURRENT_PACKAGES_DIR}/share/ptex/copyright) -- cgit v1.2.3 From 63153c58b9d6ce4f8f724365a7644c2fe3f40d15 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sat, 24 Jun 2017 01:33:44 +0900 Subject: Add Kinect driver to OpenNI2 port Add Kinect driver to OpenNI2 port. OpenNI2 port generate Kinect driver when Kinect SDK has been installed in your system. --- ports/openni2/CONTROL | 2 +- .../inherit_from_parent_or_project_defaults.patch | 41 ++++++++++++ ports/openni2/portfile.cmake | 43 +++++++++++- ports/openni2/replace_environment_variable.patch | 76 ++++++++++++++++++++++ 4 files changed, 160 insertions(+), 2 deletions(-) create mode 100644 ports/openni2/inherit_from_parent_or_project_defaults.patch create mode 100644 ports/openni2/replace_environment_variable.patch diff --git a/ports/openni2/CONTROL b/ports/openni2/CONTROL index 5dca7646a..2f0e010e0 100644 --- a/ports/openni2/CONTROL +++ b/ports/openni2/CONTROL @@ -1,3 +1,3 @@ Source: openni2 -Version: 2.2.0.33 +Version: 2.2.0.33-1 Description: OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera. diff --git a/ports/openni2/inherit_from_parent_or_project_defaults.patch b/ports/openni2/inherit_from_parent_or_project_defaults.patch new file mode 100644 index 000000000..73893f3b9 --- /dev/null +++ b/ports/openni2/inherit_from_parent_or_project_defaults.patch @@ -0,0 +1,41 @@ +diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj +index 7f54d04..08a49fe 100644 +--- a/Source/Drivers/Kinect/Kinect.vcxproj ++++ b/Source/Drivers/Kinect/Kinect.vcxproj +@@ -72,28 +72,29 @@ + + $(SolutionDir)Bin\$(Platform)-$(Configuration)\OpenNI2\Drivers\ + $(SolutionDir)Bin\Intermediate\$(Platform)-$(Configuration)\$(ProjectName)\ +- $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include +- $(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib; ++ $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath) ++ $(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(LibraryPath) + true + + + $(SolutionDir)Bin\$(Platform)-$(Configuration)\OpenNI2\Drivers\ + $(SolutionDir)Bin\Intermediate\$(Platform)-$(Configuration)\$(ProjectName)\ +- $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include; +- $(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64; ++ $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath) ++ $(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;$(LibraryPath) + true + + + $(SolutionDir)Bin\$(Platform)-$(Configuration)\OpenNI2\Drivers\ + $(SolutionDir)Bin\Intermediate\$(Platform)-$(Configuration)\$(ProjectName)\ +- $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include; +- $(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib; ++ $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath) ++ $(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(LibraryPath) + false + + + $(SolutionDir)Bin\$(Platform)-$(Configuration)\OpenNI2\Drivers\ + $(SolutionDir)Bin\Intermediate\$(Platform)-$(Configuration)\$(ProjectName)\ +- $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include ++ $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath) ++ $(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;$(LibraryPath) + false + + diff --git a/ports/openni2/portfile.cmake b/ports/openni2/portfile.cmake index 12ac4902b..5b832eaa4 100644 --- a/ports/openni2/portfile.cmake +++ b/ports/openni2/portfile.cmake @@ -39,9 +39,23 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/upgrade_projects.patch" - PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable_kinect.patch" + "${CMAKE_CURRENT_LIST_DIR}/inherit_from_parent_or_project_defaults.patch" + "${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch" ) +get_filename_component(KINECTSDK10_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect;SDKInstallPath]" ABSOLUTE CACHE) +set(KINECTSDK10_INSTALLED FALSE) +if(EXISTS "${KINECTSDK10_DIR}") + set(KINECTSDK10_INSTALLED TRUE) +endif() + +if(NOT ${KINECTSDK10_INSTALLED}) + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable_kinect.patch" + ) +endif() + # Build OpenNI2 vcpkg_build_msbuild( PROJECT_PATH "${SOURCE_PATH}/OpenNI.sln" @@ -146,6 +160,15 @@ file( ${CURRENT_PACKAGES_DIR}/bin/OpenNI2/Drivers ) +if(${KINECTSDK10_INSTALLED}) + file( + INSTALL + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll" + DESTINATION + ${CURRENT_PACKAGES_DIR}/bin/OpenNI2/Drivers + ) +endif() + file( INSTALL "${SOURCE_CONFIG_PATH}/OpenNI.ini" @@ -165,6 +188,15 @@ file( ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2/Drivers ) +if(${KINECTSDK10_INSTALLED}) + file( + INSTALL + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/Kinect.dll" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2/Drivers + ) +endif() + file( INSTALL "${SOURCE_CONFIG_PATH}/OpenNI.ini" @@ -184,6 +216,15 @@ file( ${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers ) +if(${KINECTSDK10_INSTALLED}) + file( + INSTALL + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll" + DESTINATION + ${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers + ) +endif() + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(NUMBEROFBIT 32) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") diff --git a/ports/openni2/replace_environment_variable.patch b/ports/openni2/replace_environment_variable.patch new file mode 100644 index 000000000..a5bfe2a54 --- /dev/null +++ b/ports/openni2/replace_environment_variable.patch @@ -0,0 +1,76 @@ +diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj +index 08a49fe..7fd8620 100644 +--- a/Source/Drivers/Kinect/Kinect.vcxproj ++++ b/Source/Drivers/Kinect/Kinect.vcxproj +@@ -101,7 +101,7 @@ + + Level3 + Disabled +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;C:\Program Files\Microsoft SDKs\Kinect\v1.8\inc; + _WINDLL;%(PreprocessorDefinitions);_WINDOWS + false + false +@@ -109,7 +109,7 @@ + + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;C:\Program Files\Microsoft SDKs\Kinect\v1.8\lib\x86; + true + + +@@ -117,7 +117,7 @@ + + Level3 + Disabled +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;C:\Program Files\Microsoft SDKs\Kinect\v1.8\inc; + _WINDLL;%(PreprocessorDefinitions);_WINDOWS + false + false +@@ -125,7 +125,7 @@ + + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;C:\Program Files\Microsoft SDKs\Kinect\v1.8\lib\amd64; + + + +@@ -139,7 +139,7 @@ + MaxSpeed + true + true +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;C:\Program Files\Microsoft SDKs\Kinect\v1.8\inc; + false + + +@@ -147,7 +147,7 @@ + true + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;C:\Program Files\Microsoft SDKs\Kinect\v1.8\lib\x86; + true + + +@@ -157,7 +157,7 @@ + MaxSpeed + true + true +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;C:\Program Files\Microsoft SDKs\Kinect\v1.8\inc; + false + + +@@ -165,7 +165,7 @@ + true + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;C:\Program Files\Microsoft SDKs\Kinect\v1.8\lib\amd64; + true + + -- cgit v1.2.3 From c21a0604e0b0590444f13aac632143f6df6685ff Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 12:25:20 -0700 Subject: [apr] port update --- ports/apr/CONTROL | 2 +- ports/apr/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/apr/CONTROL b/ports/apr/CONTROL index eed3c518d..ac1b7d5c3 100644 --- a/ports/apr/CONTROL +++ b/ports/apr/CONTROL @@ -1,3 +1,3 @@ Source: apr -Version: 1.5.2 +Version: 1.6.2 Description: The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems. diff --git a/ports/apr/portfile.cmake b/ports/apr/portfile.cmake index f65b44649..414ca1dda 100644 --- a/ports/apr/portfile.cmake +++ b/ports/apr/portfile.cmake @@ -7,11 +7,11 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-1.5.2) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-1.6.2) vcpkg_download_distfile(ARCHIVE - URLS "https://www.apache.org/dist/apr/apr-1.5.2.tar.bz2" - FILENAME "apr-1.5.2.tar.bz2" - SHA512 d1156ad16abf07887797777b56c2147c890f16d8445829b3e3b4917950d24c5fd2f8febd439992467a5ea0511da562c0fb4a7cfd8a235ab55882388bfa2b919d + URLS "https://www.apache.org/dist/apr/apr-1.6.2.tar.bz2" + FILENAME "apr-1.6.2.tar.bz2" + SHA512 20f449fde522f186b919b64ce6f90073b267557e17438607d31af917eca7941222dd7a7379d66f1430ff68f7e28fbccd140d24f3ca7aae8a876a550b19de284a ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 77310c8722ae5f715e4c3477a1bd8a39a4644e0a Mon Sep 17 00:00:00 2001 From: Gilles Khouzam Date: Fri, 23 Jun 2017 14:12:50 -0700 Subject: Updating the OpenSSL UWP port to 1.0.2l --- ports/openssl/CONTROL | 2 +- ports/openssl/portfile-uwp.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index fb5861cd4..465f941b7 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2k-5 +Version: 1.0.21-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/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake index cc29c7e4d..e1f7a7932 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl/portfile-uwp.cmake @@ -27,7 +27,7 @@ endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2k_WinRT) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2l_WinRT) vcpkg_find_acquire_program(PERL) vcpkg_find_acquire_program(JOM) @@ -36,9 +36,9 @@ get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${JOM_EXE_PATH}") vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/openssl/archive/OpenSSL_1_0_2k_WinRT.zip" - FILENAME "openssl-microsoft-1.0.2k_WinRT.zip" - SHA512 afb434ef69c399f690f7ce723fabb228f77a12428f19062c5df3b8b841a2a7881c01150fdcfd2fab23867e3963292874a08ad227b37d168907b507fb1d7fede7 + URLS "https://github.com/Microsoft/openssl/archive/OpenSSL_1_0_2l_WinRT.zip" + FILENAME "openssl-microsoft-1.0.2l_WinRT.zip" + SHA512 238b3daad7f1a2486e09d47e6d1bd4b0aa8e8a896358c6dfe11a77c2654da1b29d3c7612f9d200d5be5a020f33d96fe39cd75b99aa35aa4129feb756f7f98ee8 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From bffc9699991d51bd627b606d6dc47eef2cfd3955 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 14:58:52 -0700 Subject: [dirent] new port need by #1343 --- ports/dirent/CONTROL | 3 +++ ports/dirent/portfile.cmake | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 ports/dirent/CONTROL create mode 100644 ports/dirent/portfile.cmake diff --git a/ports/dirent/CONTROL b/ports/dirent/CONTROL new file mode 100644 index 000000000..50f6d7ede --- /dev/null +++ b/ports/dirent/CONTROL @@ -0,0 +1,3 @@ +Source: dirent +Version: 2017-06-23-5c7194c2fe2c68c1a8212712c0b4b6195382d27d +Description: Dirent is a C/C++ programming interface that allows programmers to retrieve information about files and directories under Linux/UNIX. This project provides Linux compatible Dirent interface for Microsoft Windows. diff --git a/ports/dirent/portfile.cmake b/ports/dirent/portfile.cmake new file mode 100644 index 000000000..9476a8dcd --- /dev/null +++ b/ports/dirent/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tronkko/dirent + REF 8b1db5092479a73d47eafd3de739b27e876e6bf3 + SHA512 f529aa65c2a4b8249c1291f3bccad25fa3a9c2146a2c74abc0a4710f68e2bd6f73cd52682bb406fbcab71d6a5225a354f9e8bdc22ce63b7a4e64bb65bab34b9f + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/dirent RENAME copyright) +vcpkg_copy_pdbs() -- cgit v1.2.3 From d7989ade6913b95a84c1e57069fd82bd3a623c11 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 16:25:31 -0700 Subject: [rtmidi] init port #582 --- ports/rtmidi/CMakeLists.txt | 41 +++++++++++++++++++++++++++++++++++++++++ ports/rtmidi/CONTROL | 3 +++ ports/rtmidi/portfile.cmake | 20 ++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 ports/rtmidi/CMakeLists.txt create mode 100644 ports/rtmidi/CONTROL create mode 100644 ports/rtmidi/portfile.cmake diff --git a/ports/rtmidi/CMakeLists.txt b/ports/rtmidi/CMakeLists.txt new file mode 100644 index 000000000..eac2d2f54 --- /dev/null +++ b/ports/rtmidi/CMakeLists.txt @@ -0,0 +1,41 @@ +cmake_minimum_required(VERSION 3.8) +project(rtmidi CXX) +set(RTMIDI_SOURCES + ${PROJECT_SOURCE_DIR}/RtMidi.cpp + ${PROJECT_SOURCE_DIR}/rtmidi_c.cpp +) + +set(RTMIDI_HEADERS + ${PROJECT_SOURCE_DIR}/RtMidi.h + ${PROJECT_SOURCE_DIR}/rtmidi_c.h +) + +include_directories(${RTMIDI_HEADERS}) + +if(BUILD_SHARED) + add_library(rtmidi SHARED ${RTMIDI_SOURCES}) + target_compile_definitions(rtmidi PRIVATE -DRTMIDI_EXPORT) +else() + add_library(rtmidi STATIC ${RTMIDI_SOURCES}) +endif() + + +file(READ "${PROJECT_SOURCE_DIR}/rtmidi_c.h" RTMIDI_EXPORT) +if (BUILD_SHARED) + string(REPLACE "if defined(RTMIDI_EXPORT)" "if 1" RTMIDI_EXPORT "${RTMIDI_EXPORT}") +else() + string(REPLACE "if defined(RTMIDI_EXPORT)" "if 0" RTMIDI_EXPORT "${RTMIDI_EXPORT}") +endif() +file(WRITE "${PROJECT_BINARY_DIR}/rtmidi_c.h" "${RTMIDI_EXPORT}") + +install( + TARGETS rtmidi + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES "${PROJECT_SOURCE_DIR}/RtMidi.h" DESTINATION include) + install(FILES "${PROJECT_BINARY_DIR}/rtmidi_c.h" DESTINATION include) +endif() diff --git a/ports/rtmidi/CONTROL b/ports/rtmidi/CONTROL new file mode 100644 index 000000000..9cf64df9e --- /dev/null +++ b/ports/rtmidi/CONTROL @@ -0,0 +1,3 @@ +Source: rtmidi +Version: 2.1.1 +Description: A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK) and Windows (Multimedia) diff --git a/ports/rtmidi/portfile.cmake b/ports/rtmidi/portfile.cmake new file mode 100644 index 000000000..cee6e1a73 --- /dev/null +++ b/ports/rtmidi/portfile.cmake @@ -0,0 +1,20 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO thestk/rtmidi + REF 2.1.1 + SHA512 4d378720dd0f7c0e1a87741c088756839878ed56465b053040f70a1e039828fe221a6b1669b77b2fdd146cb192934c5719cc934c2c6a6304f44dbee2972c68e8 + HEAD_REF master +) +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() + +file(INSTALL ${SOURCE_PATH}/readme DESTINATION ${CURRENT_PACKAGES_DIR}/share/rtmidi RENAME copyright) -- cgit v1.2.3 From ac9cec6e1c3eea8d9dd28f94a3299bb4062fc224 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 16:31:26 -0700 Subject: Small fix BUILD_SHARED_LIBS --- ports/rtmidi/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/rtmidi/CMakeLists.txt b/ports/rtmidi/CMakeLists.txt index eac2d2f54..6a09540b8 100644 --- a/ports/rtmidi/CMakeLists.txt +++ b/ports/rtmidi/CMakeLists.txt @@ -12,7 +12,7 @@ set(RTMIDI_HEADERS include_directories(${RTMIDI_HEADERS}) -if(BUILD_SHARED) +if(BUILD_SHARED_LIBS) add_library(rtmidi SHARED ${RTMIDI_SOURCES}) target_compile_definitions(rtmidi PRIVATE -DRTMIDI_EXPORT) else() -- cgit v1.2.3 From 2100e95c25db8b76058d9e125c5b2fcdce9fd74a Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 16:33:25 -0700 Subject: Small fix BUILD_SHARED_LIBS --- ports/rtmidi/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/rtmidi/CMakeLists.txt b/ports/rtmidi/CMakeLists.txt index 6a09540b8..f334a598e 100644 --- a/ports/rtmidi/CMakeLists.txt +++ b/ports/rtmidi/CMakeLists.txt @@ -21,7 +21,7 @@ endif() file(READ "${PROJECT_SOURCE_DIR}/rtmidi_c.h" RTMIDI_EXPORT) -if (BUILD_SHARED) +if (BUILD_SHARED_LIBS) string(REPLACE "if defined(RTMIDI_EXPORT)" "if 1" RTMIDI_EXPORT "${RTMIDI_EXPORT}") else() string(REPLACE "if defined(RTMIDI_EXPORT)" "if 0" RTMIDI_EXPORT "${RTMIDI_EXPORT}") -- cgit v1.2.3 From 9eca90f2d1c4f2ddc0cd0153b7addbff3757bac4 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 16:37:25 -0700 Subject: Small fix BUILD_SHARED_LIBS use vcpkg lib linkage --- ports/rtmidi/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/rtmidi/CMakeLists.txt b/ports/rtmidi/CMakeLists.txt index f334a598e..0603fdcb8 100644 --- a/ports/rtmidi/CMakeLists.txt +++ b/ports/rtmidi/CMakeLists.txt @@ -12,6 +12,13 @@ set(RTMIDI_HEADERS include_directories(${RTMIDI_HEADERS}) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_SHARED_LIBS ON) +else() + set(BUILD_SHARED_LIBS OFF) +endif() + + if(BUILD_SHARED_LIBS) add_library(rtmidi SHARED ${RTMIDI_SOURCES}) target_compile_definitions(rtmidi PRIVATE -DRTMIDI_EXPORT) -- cgit v1.2.3 From 26b489772842ad009aa5bd4bdd316c6a73d26503 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 23 Jun 2017 21:06:39 -0700 Subject: [beast] Update to version 66 --- ports/beast/CONTROL | 2 +- ports/beast/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL index 1dc1e4a1c..c0dc43c05 100644 --- a/ports/beast/CONTROL +++ b/ports/beast/CONTROL @@ -1,4 +1,4 @@ Source: beast -Version: v63 +Version: v66 Build-Depends: boost Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake index 86011da55..726be4b1e 100644 --- a/ports/beast/portfile.cmake +++ b/ports/beast/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vinniefalco/Beast - REF f68dc343e7c077caee8a95b2a59a2ccb9f979567 - SHA512 d1c4ce5ee4d4b7cb20084c96af87ce106a4474631754a54a7cc19343e0767ed7a14cdb00f27bb1958e35f411b99c90444efd578e8c77e98d7e416703ea6f28bd + REF 7fb75d0627f7842a6a706b810d427962509e0e52 + SHA512 5d086d2edf18facc3f379c42ffcc2679f9c03f891d58f2c8e6cb1a9aa6ee73b232544d1c2a86ce9c42dbc9a41a58bd3480f958cc1c569e8b3b1890755ecfd7fc HEAD_REF master ) -- cgit v1.2.3 From 88fd6f14d8a66a20ccdaea06b5a22067a94387e9 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 23 Jun 2017 23:27:31 -0700 Subject: [ctemplate] new port #543 --- ports/ctemplate/CMakeLists.txt | 97 ++++++++++++++++++++++++++++++++++++++++++ ports/ctemplate/CONTROL | 3 ++ ports/ctemplate/fix-msvc.patch | 17 ++++++++ ports/ctemplate/portfile.cmake | 39 +++++++++++++++++ 4 files changed, 156 insertions(+) create mode 100644 ports/ctemplate/CMakeLists.txt create mode 100644 ports/ctemplate/CONTROL create mode 100644 ports/ctemplate/fix-msvc.patch create mode 100644 ports/ctemplate/portfile.cmake diff --git a/ports/ctemplate/CMakeLists.txt b/ports/ctemplate/CMakeLists.txt new file mode 100644 index 000000000..22869f7c5 --- /dev/null +++ b/ports/ctemplate/CMakeLists.txt @@ -0,0 +1,97 @@ +cmake_minimum_required(VERSION 3.5.1) +project(libctemplate C CXX) + +# find_package(PythonInterp) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) + add_definitions(-D_VARIADIC_MAX=10) +endif() + +set(SOURCE_PATH ${PROJECT_SOURCE_DIR}/src) +set(BASE_SOURCE_PATH ${SOURCE_PATH}/base) +set(WINDOWS_SOURCE_PATH ${SOURCE_PATH}/windows) +set(HTMLPARSER_SOURCE_PATH ${SOURCE_PATH}/htmlparser) + +set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/include) + +set(HTMLPARSER_CONFIG ${HTMLPARSER_SOURCE_PATH}/htmlparser_fsm.config) +set(JSPASPER_CONFIG ${HTMLPARSER_SOURCE_PATH}/jsparser_fsm.config) +set(FSM_GENERATOR ${HTMLPARSER_SOURCE_PATH}/generate_fsm.py) + +set(BASE_HEADERS + "${BASE_SOURCE_PATH}/arena.h" + "${BASE_SOURCE_PATH}/manual_constructor.h" + "${BASE_SOURCE_PATH}/mutex.h" + "${BASE_SOURCE_PATH}/small_map.h" + "${BASE_SOURCE_PATH}/thread_annotations.h" + "${BASE_SOURCE_PATH}/util.h" + "${BASE_SOURCE_PATH}/arena-inl.h" +) + +set( + HTMLPARSER_HEADERS + "${HTMLPARSER_SOURCE_PATH}/htmlparser.h" + "${HTMLPARSER_SOURCE_PATH}/htmlparser_cpp.h" + "${HTMLPARSER_SOURCE_PATH}/jsparser.h" + "${HTMLPARSER_SOURCE_PATH}/statemachine.h" +) +set(SRC_FILES + "${SOURCE_PATH}/base/arena.cc" + "${SOURCE_PATH}/htmlparser/htmlparser.cc" + "${SOURCE_PATH}/htmlparser/jsparser.cc" + "${SOURCE_PATH}/htmlparser/statemachine.cc" + "${SOURCE_PATH}/per_expand_data.cc" + "${SOURCE_PATH}/template.cc" + "${SOURCE_PATH}/template_annotator.cc" + "${SOURCE_PATH}/template_cache.cc" + "${SOURCE_PATH}/template_dictionary.cc" + "${SOURCE_PATH}/template_modifiers.cc" + "${SOURCE_PATH}/template_namelist.cc" + "${SOURCE_PATH}/template_pathops.cc" + "${SOURCE_PATH}/template_string.cc" + "${SOURCE_PATH}/windows/port.cc" +) + +file(COPY "${WINDOWS_SOURCE_PATH}/" DESTINATION ${COMMON_INCLUDES}) +file(COPY "${WINDOWS_SOURCE_PATH}/config.h" DESTINATION ${COMMON_INCLUDES}/windows) +file(COPY "${WINDOWS_SOURCE_PATH}/port.h" DESTINATION ${COMMON_INCLUDES}/windows) +file(COPY ${HTMLPARSER_HEADERS} DESTINATION ${COMMON_INCLUDES}/htmlparser) +file(COPY ${BASE_HEADERS} DESTINATION ${COMMON_INCLUDES}/base) + +execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${FSM_GENERATOR} ${HTMLPARSER_CONFIG} + WORKING_DIRECTORY ${COMMON_INCLUDES}/htmlparser + OUTPUT_VARIABLE HTMLPARSER_CONFIG_H +) +execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${FSM_GENERATOR} ${JSPASPER_CONFIG} + WORKING_DIRECTORY ${COMMON_INCLUDES}/htmlparser + OUTPUT_VARIABLE JSPASPER_CONFIG_H +) + +file(WRITE "${COMMON_INCLUDES}/htmlparser/htmlparser_fsm.h" "${HTMLPARSER_CONFIG_H}") +file(WRITE "${COMMON_INCLUDES}/htmlparser/jsparser_fsm.h" "${JSPASPER_CONFIG_H}") + +option(BUILD_SHARED_LIBRARY "Building shared library" ON) + +include_directories(${COMMON_INCLUDES}) + +if(BUILD_SHARED_LIBRARY) + add_library(libctemplate SHARED ${SRC_FILES}) +else() + add_library(libctemplate STATIC ${SRC_FILES} ) + # Note: CTEMPLATE_DLL_DECL should be empty to build static file + target_compile_definitions(libctemplate PRIVATE -DCTEMPLATE_DLL_DECL=) +endif() + +install( + TARGETS libctemplate + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include FILES_MATCHING PATTERN "*.h") +endif() diff --git a/ports/ctemplate/CONTROL b/ports/ctemplate/CONTROL new file mode 100644 index 000000000..eb78d4c0f --- /dev/null +++ b/ports/ctemplate/CONTROL @@ -0,0 +1,3 @@ +Source: ctemplate +Version: 2017-06-23-44b7c5b918a08ad561c63e9d28beecb40c10ebca +Description: C++ CTemplate system diff --git a/ports/ctemplate/fix-msvc.patch b/ports/ctemplate/fix-msvc.patch new file mode 100644 index 000000000..acfbce4bf --- /dev/null +++ b/ports/ctemplate/fix-msvc.patch @@ -0,0 +1,17 @@ +diff --git a/src/per_expand_data.cc b/src/per_expand_data.cc +index f8f3025..0a468cf 100644 +--- a/src/per_expand_data.cc ++++ b/src/per_expand_data.cc +@@ -42,10 +42,12 @@ namespace ctemplate { + + using std::string; + ++#ifndef _MSC_VER + bool PerExpandData::DataEq::operator()(const char* s1, const char* s2) const { + return ((s1 == 0 && s2 == 0) || + (s1 && s2 && *s1 == *s2 && strcmp(s1, s2) == 0)); + } ++#endif + + PerExpandData::~PerExpandData() { + delete map_; diff --git a/ports/ctemplate/portfile.cmake b/ports/ctemplate/portfile.cmake new file mode 100644 index 000000000..cb1e07b74 --- /dev/null +++ b/ports/ctemplate/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +set(GIT_REF 44b7c5b918a08ad561c63e9d28beecb40c10ebca) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OlafvdSpek/ctemplate + REF 44b7c5b918a08ad561c63e9d28beecb40c10ebca + SHA512 b572f6d0d182e977d3a459e68bde6244dad7196c44c16407990dc1fb6a7a93bcd8d6851e515d50b6051c1d011f71695f895f6ab233664baadae0bf6a3d464305 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_find_acquire_program(PYTHON2) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-msvc.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set (BUILD_SHARED_LIBRARY ON) +else() + set(BUILD_SHARED_LIBRARY OFF) +endif() + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DPYTHON_EXECUTABLE=${PYTHON2} -DBUILD_SHARED_LIBRARY=${BUILD_SHARED_LIBRARY} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ctemplate RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From b64935e67ac6817defd862fc7fbc3a1f4819d79c Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sun, 25 Jun 2017 04:07:09 +0900 Subject: Add Kinect SDK v1.x port Add Kinect for Windows SDK v1.x port. --- ports/kinectsdk1/CONTROL | 3 +++ ports/kinectsdk1/portfile.cmake | 52 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 ports/kinectsdk1/CONTROL create mode 100644 ports/kinectsdk1/portfile.cmake diff --git a/ports/kinectsdk1/CONTROL b/ports/kinectsdk1/CONTROL new file mode 100644 index 000000000..21f531425 --- /dev/null +++ b/ports/kinectsdk1/CONTROL @@ -0,0 +1,3 @@ +Source: kinectsdk1 +Version: 1.8 +Description: Kinect for Windows SDK for Kinect v1 sensor. diff --git a/ports/kinectsdk1/portfile.cmake b/ports/kinectsdk1/portfile.cmake new file mode 100644 index 000000000..61f006492 --- /dev/null +++ b/ports/kinectsdk1/portfile.cmake @@ -0,0 +1,52 @@ +# 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) + +get_filename_component(KINECTSDK10_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect;SDKInstallPath]" ABSOLUTE CACHE) +if(NOT EXISTS "${KINECTSDK10_DIR}") + message(FATAL_ERROR "Error: Could not find Kinect for Windows SDK v1.x.") +endif() + +file( + INSTALL + "${KINECTSDK10_DIR}/inc/NuiApi.h" + "${KINECTSDK10_DIR}/inc/NuiImageCamera.h" + "${KINECTSDK10_DIR}/inc/NuiSensor.h" + "${KINECTSDK10_DIR}/inc/NuiSkeleton.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/kinectsdk1 +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(ARCHITECTURE x86) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ARCHITECTURE amd64) +endif() + +file( + INSTALL + "${KINECTSDK10_DIR}/lib/${ARCHITECTURE}/Kinect10.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib +) + +file( + INSTALL + "${KINECTSDK10_DIR}/lib/${ARCHITECTURE}/Kinect10.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/lib +) + +# Handle copyright +file(COPY "${KINECTSDK10_DIR}/SDKEula.rtf" DESTINATION ${CURRENT_PACKAGES_DIR}/share/kinectsdk1) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/kinectsdk1/SDKEula.rtf ${CURRENT_PACKAGES_DIR}/share/kinectsdk1/copyright) \ No newline at end of file -- cgit v1.2.3 From b9f718cbad306baba8bc1952593192d3efdb5c57 Mon Sep 17 00:00:00 2001 From: Jens Frederich Date: Mon, 26 Jun 2017 16:51:36 +0200 Subject: [think-cell-range] Update to version 498839d --- ports/think-cell-range/CONTROL | 2 +- ports/think-cell-range/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/think-cell-range/CONTROL b/ports/think-cell-range/CONTROL index 3b5872232..b7d53af12 100644 --- a/ports/think-cell-range/CONTROL +++ b/ports/think-cell-range/CONTROL @@ -1,5 +1,5 @@ Source: think-cell-range Maintainer: jfrederich@gmail.com -Version: e2d3018 +Version: 498839d Description: think-cell's range library , , Build-Depends: boost diff --git a/ports/think-cell-range/portfile.cmake b/ports/think-cell-range/portfile.cmake index 858461e36..56d01a55e 100644 --- a/ports/think-cell-range/portfile.cmake +++ b/ports/think-cell-range/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/range-e2d3018c3a797e7328dea005e72b34cace8b1fc6) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/range-498839d41519d38bb81089f7d0f517026bd042cc) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/think-cell/range/archive/e2d3018c3a797e7328dea005e72b34cace8b1fc6.zip" - FILENAME "think-cell_range-e2d3018.zip" - SHA512 13c74aba4950a84fdf446c976564030b18a740c5ce42b7650116a0559ba9e9a59471ff0f80132c626bc442402b3717805d3615b9ea70751e2dd1e648fd9f7916 + URLS "https://github.com/think-cell/range/archive/498839d41519d38bb81089f7d0f517026bd042cc.zip" + FILENAME "think-cell_range-498839d.zip" + SHA512 801e987c828c954cb50f9a6f9f2feee2ce05f7232d531ecce7394800ecc5a750992795da173fb72b6efcabd6978015a650730682b7db3f874fb8aaac28869711 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 40935c4e407a6e6c08e7ed007da812833597e9be Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Mon, 26 Jun 2017 13:31:09 -0700 Subject: [speex] init port #958 --- ports/speex/CMakeLists.txt | 105 +++++++++++++++++++++++++++++++++++++++++++++ ports/speex/CONTROL | 3 ++ ports/speex/portfile.cmake | 26 +++++++++++ 3 files changed, 134 insertions(+) create mode 100644 ports/speex/CMakeLists.txt create mode 100644 ports/speex/CONTROL create mode 100644 ports/speex/portfile.cmake diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt new file mode 100644 index 000000000..1c1a42a80 --- /dev/null +++ b/ports/speex/CMakeLists.txt @@ -0,0 +1,105 @@ +cmake_minimum_required (VERSION 3.8.0) +project (libspeex) + +set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/include) +set(SOURCE_PATH ${PROJECT_SOURCE_DIR}) +set(SPEEX_PATH ${SOURCE_PATH}/include/speex) +set(LIBSPEEX_PATH ${SOURCE_PATH}/libspeex) + +option(USE_SSE "USE_SSE used Note: USE_SSE and FIXED_POINT are mutually exclusive." ON) +if(MSVC) + add_definitions(-DHAVE_CONFIG_H) + if(USE_SSE) + add_definitions(-DUSE_SSE -DFLOATING_POINT) + else() + add_definitions(-DFIXED_POINT) + endif() +endif() + + +set(LIB_HEADERS + "${LIBSPEEX_PATH}/cb_search.h" + "${SOURCE_PATH}/win32/config.h" + "${LIBSPEEX_PATH}/fftwrap.h" + "${LIBSPEEX_PATH}/filters.h" + "${LIBSPEEX_PATH}/filters_sse.h" + "${LIBSPEEX_PATH}/kiss_fft.h" + "${LIBSPEEX_PATH}/kiss_fftr.h" + "${LIBSPEEX_PATH}/lpc.h" + "${LIBSPEEX_PATH}/arch.h" + "${LIBSPEEX_PATH}/lsp.h" + "${LIBSPEEX_PATH}/ltp.h" + "${LIBSPEEX_PATH}/ltp_sse.h" + "${LIBSPEEX_PATH}/math_approx.h" + "${LIBSPEEX_PATH}/modes.h" + "${LIBSPEEX_PATH}/nb_celp.h" + "${LIBSPEEX_PATH}/quant_lsp.h" + "${LIBSPEEX_PATH}/sb_celp.h" + "${LIBSPEEX_PATH}/stack_alloc.h" + "${LIBSPEEX_PATH}/vbr.h" + "${LIBSPEEX_PATH}/vq.h" +) +set( + SPEEX_HEADERS + "${SPEEX_PATH}/speex.h" + "${SPEEX_PATH}/speex_bits.h" + "${SPEEX_PATH}/speex_callbacks.h" + "${SPEEX_PATH}/speex_header.h" + "${SPEEX_PATH}/speex_stereo.h" + "${SPEEX_PATH}/speex_types.h" +) +set(SRC + "${LIBSPEEX_PATH}/bits.c" + "${LIBSPEEX_PATH}/cb_search.c" + "${LIBSPEEX_PATH}/exc_10_16_table.c" + "${LIBSPEEX_PATH}/exc_10_32_table.c" + "${LIBSPEEX_PATH}/exc_20_32_table.c" + "${LIBSPEEX_PATH}/exc_5_256_table.c" + "${LIBSPEEX_PATH}/exc_5_64_table.c" + "${LIBSPEEX_PATH}/exc_8_128_table.c" + "${LIBSPEEX_PATH}/fftwrap.c" + "${LIBSPEEX_PATH}/filters.c" + "${LIBSPEEX_PATH}/gain_table.c" + "${LIBSPEEX_PATH}/gain_table_lbr.c" + "${LIBSPEEX_PATH}/hexc_10_32_table.c" + "${LIBSPEEX_PATH}/hexc_table.c" + "${LIBSPEEX_PATH}/high_lsp_tables.c" + "${LIBSPEEX_PATH}/kiss_fft.c" + "${LIBSPEEX_PATH}/kiss_fftr.c" + "${LIBSPEEX_PATH}/lpc.c" + "${LIBSPEEX_PATH}/lsp.c" + "${LIBSPEEX_PATH}/lsp_tables_nb.c" + "${LIBSPEEX_PATH}/ltp.c" + "${LIBSPEEX_PATH}/modes.c" + "${LIBSPEEX_PATH}/modes_wb.c" + "${LIBSPEEX_PATH}/nb_celp.c" + "${LIBSPEEX_PATH}/quant_lsp.c" + "${LIBSPEEX_PATH}/sb_celp.c" + "${LIBSPEEX_PATH}/smallft.c" + "${LIBSPEEX_PATH}/speex.c" + "${LIBSPEEX_PATH}/speex_callbacks.c" + "${LIBSPEEX_PATH}/speex_header.c" + "${LIBSPEEX_PATH}/stereo.c" + "${LIBSPEEX_PATH}/vbr.c" + "${LIBSPEEX_PATH}/vq.c" + "${LIBSPEEX_PATH}/window.c" +) + +file(COPY ${LIB_HEADERS} DESTINATION ${COMMON_INCLUDES}/) +file(COPY ${SPEEX_HEADERS} DESTINATION ${COMMON_INCLUDES}/speex) + + +include_directories(${COMMON_INCLUDES}) +add_library (libspeex STATIC ${SRC}) + + +install( + TARGETS libspeex + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include/ FILES_MATCHING PATTERN "*.h") +endif() diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL new file mode 100644 index 000000000..64514910e --- /dev/null +++ b/ports/speex/CONTROL @@ -0,0 +1,3 @@ +Source: speex +Version: +Description: diff --git a/ports/speex/portfile.cmake b/ports/speex/portfile.cmake new file mode 100644 index 000000000..96e8526ab --- /dev/null +++ b/ports/speex/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic ) + message(STATUS "Speex support visibility on Win32 ye. Building static.") + message(STATUS "See https://github.com/xiph/speex/blob/master/win32/config.h for more") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/speex + REF cae5026cfd88782c7051af6e685059223578b7e9 + SHA512 93385363561c41f5c6bb7fce8e7cd1954520191a4741a8618daaf0a0bfa0c5c5de9926b989f1ae85b99bf4307afb445f307a01a9487abcc0d4ffa690711b8e49 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/speex RENAME copyright) -- cgit v1.2.3 From 81e9de89b9d6be074a62344dfd68bfea097ce3b7 Mon Sep 17 00:00:00 2001 From: codicodi Date: Mon, 26 Jun 2017 22:35:44 +0200 Subject: [opus] update to 1.2.1 --- ports/opus/CONTROL | 2 +- ports/opus/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/opus/CONTROL b/ports/opus/CONTROL index dbff6715a..6f794c986 100644 --- a/ports/opus/CONTROL +++ b/ports/opus/CONTROL @@ -1,3 +1,3 @@ Source: opus -Version: 1.2 +Version: 1.2.1 Description: Totally open, royalty-free, highly versatile audio codec diff --git a/ports/opus/portfile.cmake b/ports/opus/portfile.cmake index f2a6dc018..5bc9b6b60 100644 --- a/ports/opus/portfile.cmake +++ b/ports/opus/portfile.cmake @@ -6,8 +6,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/opus - REF v1.2 - SHA512 4fef70e3b439613f85ede30cc401b84c77f1828f56908d04cb76061b8116c083cc035b50eaec4205110481e9d8b794b9c05f6778d8428cc68f6d57bd3db721ca + REF v1.2.1 + SHA512 fdc64b43875dd07dc9eb1c37e9a61d1c10e3095de62ed9597d51b93445136958c9f5fee78c33ae7f90c72a20200083cdc727d8e79f2f9e580ad4e2f8c50cccb4 HEAD_REF master ) -- cgit v1.2.3 From 838e8783d659456037c0e8e89dcc689e626b6816 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Mon, 26 Jun 2017 13:48:04 -0700 Subject: adding tests for install plans --- toolsrc/include/vcpkg_Dependencies.h | 19 +++- toolsrc/src/commands_ci.cpp | 3 +- toolsrc/src/commands_install.cpp | 3 +- toolsrc/src/test_install_plan.cpp | 155 ++++++++++++++++++++++++++++ toolsrc/src/vcpkg_Dependencies.cpp | 79 +++++++++++++- toolsrc/vcpkgtest/vcpkgtest.vcxproj | 1 + toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters | 3 + 7 files changed, 259 insertions(+), 4 deletions(-) create mode 100644 toolsrc/src/test_install_plan.cpp diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index 018c4f5cf..da31aa4bf 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -97,7 +97,24 @@ namespace vcpkg::Dependencies RequestType request_type; }; - std::vector create_install_plan(const VcpkgPaths& paths, + __interface PortFileProvider { virtual const SourceControlFile* get_control_file(const PackageSpec& spec) const; }; + + struct MapPortFile : PortFileProvider + { + const std::unordered_map& ports; + explicit MapPortFile(const std::unordered_map& map); + const SourceControlFile* get_control_file(const PackageSpec& spec) const override; + }; + + struct PathsPortFile : PortFileProvider + { + const VcpkgPaths& ports; + mutable std::unordered_map cache; + explicit PathsPortFile(const VcpkgPaths& paths); + const SourceControlFile* get_control_file(const PackageSpec& spec) const override; + }; + + std::vector create_install_plan(const PortFileProvider& port_file_provider, const std::vector& specs, const StatusParagraphs& status_db); diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp index 7ffc7577a..85febd580 100644 --- a/toolsrc/src/commands_ci.cpp +++ b/toolsrc/src/commands_ci.cpp @@ -40,7 +40,8 @@ namespace vcpkg::Commands::CI const std::vector specs = load_all_package_specs(paths.get_filesystem(), paths.ports, triplet); StatusParagraphs status_db = database_load_check(paths); - const std::vector install_plan = Dependencies::create_install_plan(paths, specs, status_db); + const std::vector install_plan /* = + Dependencies::create_install_plan(Dependencies::PathsPortFile(paths), specs, status_db)*/; Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); std::vector results; diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index 73b3e9eab..a58432eef 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -359,7 +359,8 @@ namespace vcpkg::Commands::Install // create the plan StatusParagraphs status_db = database_load_check(paths); - std::vector install_plan = Dependencies::create_install_plan(paths, specs, status_db); + std::vector install_plan = + Dependencies::create_install_plan(Dependencies::PathsPortFile(paths), specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); // log the plan diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp new file mode 100644 index 000000000..90aaa532f --- /dev/null +++ b/toolsrc/src/test_install_plan.cpp @@ -0,0 +1,155 @@ +#include "CppUnitTest.h" +#include "vcpkg_Dependencies.h" + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +using namespace vcpkg; + +namespace UnitTest1 +{ + class InstallPlanTests : public TestClass + { + TEST_METHOD(basic_install_scheme) + { + std::vector> status_paragraphs; + + std::unordered_map map; + auto add_scf = [&](std::vector>&& fields) -> PackageSpec { + auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(fields)); + Assert::IsTrue(m_pgh.has_value()); + auto& scf = *m_pgh.get(); + + auto spec = PackageSpec::from_name_and_triplet(scf.core_paragraph.name, Triplet::X86_WINDOWS); + Assert::IsTrue(spec.has_value()); + map.emplace(*spec.get(), std::move(*m_pgh.get())); + return PackageSpec{*spec.get()}; + }; + + auto spec_a = add_scf({{{"Source", "a"}, {"Version", "1.2.8"}, {"Build-Depends", "b"}}}); + auto spec_b = add_scf({{{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", "c"}}}); + auto spec_c = add_scf({{{"Source", "c"}, {"Version", "2.5.3"}, {"Build-Depends", ""}}}); + + auto map_port = Dependencies::MapPortFile(map); + auto install_plan = + Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(3), install_plan.size()); + Assert::AreEqual("c", install_plan[0].spec.name().c_str()); + Assert::AreEqual("b", install_plan[1].spec.name().c_str()); + Assert::AreEqual("a", install_plan[2].spec.name().c_str()); + } + + TEST_METHOD(multiple_install_scheme) + { + std::vector> status_paragraphs; + + std::unordered_map map; + auto add_scf = [&](std::vector>&& fields) -> PackageSpec { + auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(fields)); + Assert::IsTrue(m_pgh.has_value()); + auto& scf = *m_pgh.get(); + + auto spec = PackageSpec::from_name_and_triplet(scf.core_paragraph.name, Triplet::X86_WINDOWS); + Assert::IsTrue(spec.has_value()); + map.emplace(*spec.get(), std::move(*m_pgh.get())); + return PackageSpec{*spec.get()}; + }; + + auto spec_a = add_scf({{{"Source", "a"}, {"Version", "1.2.8"}, {"Build-Depends", "d"}}}); + auto spec_b = add_scf({{{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", "d, e"}}}); + auto spec_c = add_scf({{{"Source", "c"}, {"Version", "2.5.3"}, {"Build-Depends", "e, h"}}}); + auto spec_d = add_scf({{{"Source", "d"}, {"Version", "4.0"}, {"Build-Depends", "f, g, h"}}}); + auto spec_e = add_scf({{{"Source", "e"}, {"Version", "1.0"}, {"Build-Depends", "g"}}}); + auto spec_f = add_scf({{{"Source", "f"}, {"Version", "1.0"}, {"Build-Depends", ""}}}); + auto spec_g = add_scf({{{"Source", "g"}, {"Version", "1.0"}, {"Build-Depends", ""}}}); + auto spec_h = add_scf({{{"Source", "h"}, {"Version", "1.0"}, {"Build-Depends", ""}}}); + + auto map_port = Dependencies::MapPortFile(map); + auto install_plan = Dependencies::create_install_plan( + map_port, {spec_a, spec_b, spec_c}, StatusParagraphs(std::move(status_paragraphs))); + + auto iterator_pos = [&](const PackageSpec& spec) -> int { + int counter = 0; + for (auto&& install_p : install_plan) + { + if (install_p.spec == spec) + { + return counter; + } + counter++; + } + return -1; + }; + int a_pos = iterator_pos(spec_a), b_pos = iterator_pos(spec_b), c_pos = iterator_pos(spec_c), + d_pos = iterator_pos(spec_d), e_pos = iterator_pos(spec_e), f_pos = iterator_pos(spec_f), + g_pos = iterator_pos(spec_g), h_pos = iterator_pos(spec_h); + + Assert::IsTrue(a_pos > d_pos); + Assert::IsTrue(b_pos > e_pos); + Assert::IsTrue(b_pos > d_pos); + Assert::IsTrue(c_pos > e_pos); + Assert::IsTrue(c_pos > h_pos); + Assert::IsTrue(d_pos > f_pos); + Assert::IsTrue(d_pos > g_pos); + Assert::IsTrue(d_pos > h_pos); + Assert::IsTrue(e_pos > g_pos); + } + + TEST_METHOD(long_install_scheme) + { + using Pgh = std::unordered_map; + std::vector> status_paragraphs; + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "j"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Build-Depends", "k"}, + {"Status", "install ok installed"}})); + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "k"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Build-Depends", ""}, + {"Status", "install ok installed"}})); + + std::unordered_map map; + auto add_scf = [&](std::vector>&& fields) -> PackageSpec { + auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(fields)); + Assert::IsTrue(m_pgh.has_value()); + auto& scf = *m_pgh.get(); + + auto spec = PackageSpec::from_name_and_triplet(scf.core_paragraph.name, Triplet::X86_WINDOWS); + Assert::IsTrue(spec.has_value()); + map.emplace(*spec.get(), std::move(*m_pgh.get())); + return PackageSpec{*spec.get()}; + }; + + auto spec_h = add_scf({{{"Source", "h"}, {"Version", "1.2.8"}, {"Build-Depends", "j, k"}}}); + auto spec_c = add_scf({{{"Source", "c"}, {"Version", "1.2.8"}, {"Build-Depends", "d, e, f, g, h, j, k"}}}); + auto spec_k = add_scf({{{"Source", "k"}, {"Version", "1.2.8"}, {"Build-Depends", ""}}}); + auto spec_b = + add_scf({{{"Source", "b"}, {"Version", "1.2.8"}, {"Build-Depends", "c, d, e, f, g, h, j, k"}}}); + auto spec_d = add_scf({{{"Source", "d"}, {"Version", "1.2.8"}, {"Build-Depends", "e, f, g, h, j, k"}}}); + auto spec_j = add_scf({{{"Source", "j"}, {"Version", "1.2.8"}, {"Build-Depends", "k"}}}); + auto spec_f = add_scf({{{"Source", "f"}, {"Version", "1.2.8"}, {"Build-Depends", "g, h, j, k"}}}); + auto spec_e = add_scf({{{"Source", "e"}, {"Version", "1.2.8"}, {"Build-Depends", "f, g, h, j, k"}}}); + auto spec_a = + add_scf({{{"Source", "a"}, {"Version", "1.2.8"}, {"Build-Depends", "b, c, d, e, f, g, h, j, k"}}}); + auto spec_g = add_scf({{{"Source", "g"}, {"Version", "1.2.8"}, {"Build-Depends", "h, j, k"}}}); + + auto map_port = Dependencies::MapPortFile(map); + auto install_plan = + Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(8), install_plan.size()); + Assert::AreEqual("h", install_plan[0].spec.name().c_str()); + Assert::AreEqual("g", install_plan[1].spec.name().c_str()); + Assert::AreEqual("f", install_plan[2].spec.name().c_str()); + Assert::AreEqual("e", install_plan[3].spec.name().c_str()); + Assert::AreEqual("d", install_plan[4].spec.name().c_str()); + Assert::AreEqual("c", install_plan[5].spec.name().c_str()); + Assert::AreEqual("b", install_plan[6].spec.name().c_str()); + Assert::AreEqual("a", install_plan[7].spec.name().c_str()); + } + }; +} \ No newline at end of file diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index bbf807c95..79f572496 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -139,9 +139,86 @@ namespace vcpkg::Dependencies return left->spec.name() < right->spec.name(); } - std::vector create_install_plan(const VcpkgPaths& paths, + MapPortFile::MapPortFile(const std::unordered_map& map) : ports(map){}; + const SourceControlFile* MapPortFile::get_control_file(const PackageSpec& spec) const + { + auto scf = ports.find(spec); + if (scf == ports.end()) + { + Checks::exit_fail(VCPKG_LINE_INFO); + } + return &scf->second; + } + + PathsPortFile::PathsPortFile(const VcpkgPaths& paths) : ports(paths){}; + const SourceControlFile* PathsPortFile::get_control_file(const PackageSpec& spec) const + { + std::unordered_map::iterator cache_it = cache.find(spec); + if (cache_it != cache.end()) + { + return &cache_it->second; + } + ExpectedT source_control_file = + Paragraphs::try_load_port(ports.get_filesystem(), ports.port_dir(spec)); + + if (auto scf = source_control_file.get()) + { + auto it = cache.emplace(spec, std::move(*scf)); + return &it.first->second; + } + + Checks::exit_fail(VCPKG_LINE_INFO); + } + + std::vector create_install_plan(const PortFileProvider& port_file_provider, const std::vector& specs, const StatusParagraphs& status_db) + { + struct InstallAdjacencyProvider final : Graphs::AdjacencyProvider + { + const PortFileProvider& port_file_provider; + const StatusParagraphs& status_db; + const std::unordered_set& specs_as_set; + + InstallAdjacencyProvider(const PortFileProvider& port_file_provider, + const StatusParagraphs& s, + const std::unordered_set& specs_as_set) + : port_file_provider(port_file_provider), status_db(s), specs_as_set(specs_as_set) + { + } + + std::vector adjacency_list(const InstallPlanAction& plan) const override + { + if (plan.any_paragraph.status_paragraph.get()) return std::vector{}; + return plan.any_paragraph.dependencies(plan.spec.triplet()); + } + + InstallPlanAction load_vertex_data(const PackageSpec& spec) const override + { + const RequestType request_type = specs_as_set.find(spec) != specs_as_set.end() + ? RequestType::USER_REQUESTED + : RequestType::AUTO_SELECTED; + auto it = status_db.find_installed(spec); + if (it != status_db.end()) return InstallPlanAction{spec, {*it->get(), nullopt, nullopt}, request_type}; + return InstallPlanAction{ + spec, {nullopt, nullopt, port_file_provider.get_control_file(spec)->core_paragraph}, request_type}; + } + }; + + const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); + std::vector toposort = + Graphs::topological_sort(specs, InstallAdjacencyProvider{port_file_provider, status_db, specs_as_set}); + Util::erase_remove_if(toposort, [](const InstallPlanAction& plan) { + return plan.request_type == RequestType::AUTO_SELECTED && + plan.plan_type == InstallPlanType::ALREADY_INSTALLED; + }); + + return toposort; + } + + std::vector create_full_install_plan(const VcpkgPaths& paths, + const std::vector& specs, + const StatusParagraphs& status_db) { struct InstallAdjacencyProvider final : Graphs::AdjacencyProvider { diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index 26d5c98eb..ca66260d4 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -22,6 +22,7 @@ + diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters index f1230cfce..e376e59f4 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters @@ -24,5 +24,8 @@ Source Files + + Source Files + \ No newline at end of file -- cgit v1.2.3 From cc06f978914917622904a0326094c1d5fba4118e Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Mon, 26 Jun 2017 15:45:31 -0700 Subject: Merge branch 'master' into create_install_tests --- toolsrc/src/commands_ci.cpp | 4 +-- toolsrc/src/test_install_plan.cpp | 16 +++++----- toolsrc/src/vcpkg_Dependencies.cpp | 61 ++------------------------------------ 3 files changed, 13 insertions(+), 68 deletions(-) diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp index 85febd580..5f6fc95b5 100644 --- a/toolsrc/src/commands_ci.cpp +++ b/toolsrc/src/commands_ci.cpp @@ -40,8 +40,8 @@ namespace vcpkg::Commands::CI const std::vector specs = load_all_package_specs(paths.get_filesystem(), paths.ports, triplet); StatusParagraphs status_db = database_load_check(paths); - const std::vector install_plan /* = - Dependencies::create_install_plan(Dependencies::PathsPortFile(paths), specs, status_db)*/; + const std::vector install_plan = + Dependencies::create_install_plan(Dependencies::PathsPortFile(paths), specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); std::vector results; diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index 90aaa532f..2404e30f7 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -19,9 +19,9 @@ namespace UnitTest1 Assert::IsTrue(m_pgh.has_value()); auto& scf = *m_pgh.get(); - auto spec = PackageSpec::from_name_and_triplet(scf.core_paragraph.name, Triplet::X86_WINDOWS); + auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, Triplet::X86_WINDOWS); Assert::IsTrue(spec.has_value()); - map.emplace(*spec.get(), std::move(*m_pgh.get())); + map.emplace(*spec.get(), std::move(*scf.get())); return PackageSpec{*spec.get()}; }; @@ -49,9 +49,9 @@ namespace UnitTest1 Assert::IsTrue(m_pgh.has_value()); auto& scf = *m_pgh.get(); - auto spec = PackageSpec::from_name_and_triplet(scf.core_paragraph.name, Triplet::X86_WINDOWS); + auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, Triplet::X86_WINDOWS); Assert::IsTrue(spec.has_value()); - map.emplace(*spec.get(), std::move(*m_pgh.get())); + map.emplace(*spec.get(), std::move(*scf.get())); return PackageSpec{*spec.get()}; }; @@ -103,13 +103,13 @@ namespace UnitTest1 {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, {"Multi-Arch", "same"}, - {"Build-Depends", "k"}, + {"Depends", "k"}, {"Status", "install ok installed"}})); status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "k"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, {"Multi-Arch", "same"}, - {"Build-Depends", ""}, + {"Depends", ""}, {"Status", "install ok installed"}})); std::unordered_map map; @@ -118,9 +118,9 @@ namespace UnitTest1 Assert::IsTrue(m_pgh.has_value()); auto& scf = *m_pgh.get(); - auto spec = PackageSpec::from_name_and_triplet(scf.core_paragraph.name, Triplet::X86_WINDOWS); + auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, Triplet::X86_WINDOWS); Assert::IsTrue(spec.has_value()); - map.emplace(*spec.get(), std::move(*m_pgh.get())); + map.emplace(*spec.get(), std::move(*scf.get())); return PackageSpec{*spec.get()}; }; diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 79f572496..726c147fd 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -158,12 +158,12 @@ namespace vcpkg::Dependencies { return &cache_it->second; } - ExpectedT source_control_file = + Parse::ParseExpected source_control_file = Paragraphs::try_load_port(ports.get_filesystem(), ports.port_dir(spec)); if (auto scf = source_control_file.get()) { - auto it = cache.emplace(spec, std::move(*scf)); + auto it = cache.emplace(spec, std::move(*scf->get())); return &it.first->second; } @@ -201,7 +201,7 @@ namespace vcpkg::Dependencies auto it = status_db.find_installed(spec); if (it != status_db.end()) return InstallPlanAction{spec, {*it->get(), nullopt, nullopt}, request_type}; return InstallPlanAction{ - spec, {nullopt, nullopt, port_file_provider.get_control_file(spec)->core_paragraph}, request_type}; + spec, {nullopt, nullopt, *port_file_provider.get_control_file(spec)->core_paragraph}, request_type}; } }; @@ -216,61 +216,6 @@ namespace vcpkg::Dependencies return toposort; } - std::vector create_full_install_plan(const VcpkgPaths& paths, - const std::vector& specs, - const StatusParagraphs& status_db) - { - struct InstallAdjacencyProvider final : Graphs::AdjacencyProvider - { - const VcpkgPaths& paths; - const StatusParagraphs& status_db; - const std::unordered_set& specs_as_set; - - InstallAdjacencyProvider(const VcpkgPaths& p, - const StatusParagraphs& s, - const std::unordered_set& specs_as_set) - : paths(p), status_db(s), specs_as_set(specs_as_set) - { - } - - std::vector adjacency_list(const InstallPlanAction& plan) const override - { - if (plan.any_paragraph.status_paragraph.get()) return std::vector{}; - return plan.any_paragraph.dependencies(plan.spec.triplet()); - } - - InstallPlanAction load_vertex_data(const PackageSpec& spec) const override - { - const RequestType request_type = specs_as_set.find(spec) != specs_as_set.end() - ? RequestType::USER_REQUESTED - : RequestType::AUTO_SELECTED; - auto it = status_db.find_installed(spec); - if (it != status_db.end()) return InstallPlanAction{spec, {*it->get(), nullopt, nullopt}, request_type}; - - Expected maybe_bpgh = Paragraphs::try_load_cached_package(paths, spec); - if (auto bpgh = maybe_bpgh.get()) - return InstallPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type}; - - auto maybe_scf = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); - if (auto scf = maybe_scf.get()) - return InstallPlanAction{spec, {nullopt, nullopt, *scf->get()->core_paragraph}, request_type}; - - print_error_message(maybe_scf.error()); - Checks::exit_fail(VCPKG_LINE_INFO); - } - }; - - const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); - std::vector toposort = - Graphs::topological_sort(specs, InstallAdjacencyProvider{paths, status_db, specs_as_set}); - Util::erase_remove_if(toposort, [](const InstallPlanAction& plan) { - return plan.request_type == RequestType::AUTO_SELECTED && - plan.plan_type == InstallPlanType::ALREADY_INSTALLED; - }); - - return toposort; - } - std::vector create_remove_plan(const std::vector& specs, const StatusParagraphs& status_db) { -- cgit v1.2.3 From 112041512d1b26caad3939bd5947a6305830c56d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Tue, 27 Jun 2017 12:38:01 +0200 Subject: Update Catch to 1.9.6 --- ports/catch/CONTROL | 2 +- ports/catch/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/catch/CONTROL b/ports/catch/CONTROL index cce74b299..1c8d6b94a 100644 --- a/ports/catch/CONTROL +++ b/ports/catch/CONTROL @@ -1,3 +1,3 @@ Source: catch -Version: 1.9.5-1 +Version: 1.9.6 Description: C++ Automated Test Cases in Headers diff --git a/ports/catch/portfile.cmake b/ports/catch/portfile.cmake index d3cd5a2bb..98342e052 100644 --- a/ports/catch/portfile.cmake +++ b/ports/catch/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v1.9.5) +set(CATCH_VERSION v1.9.6) vcpkg_download_distfile(HEADER URLS "https://github.com/philsquared/Catch/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-${CATCH_VERSION}.hpp" - SHA512 4e5dc6959903282c90c7e7981238248072c7f5d4083ccfcd62ca8db494bed46cbd280624d1bafaf2221ca02e7877a4cc319f1adee06dfaeee9da3757b7a7ba56 + SHA512 a0e4d568a5d90e72cef6ae9e741a66909235498c2901e96623892e5b323cb3bc51d55617ee6a42b30938a0cf2564323c621bd201d94eb67ba9c4fe5de65c10ee ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From f761259f34706c7c8529fc2340c5e55a9a0c69e8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 27 Jun 2017 10:22:29 -0700 Subject: [boost] Update diff hash. No version bump required because contents are functionally identical. --- ports/boost/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index b8d56ee90..8db544237 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_extract_source_archive(${ARCHIVE_FILE}) # apply boost range hotfix vcpkg_download_distfile(DIFF URLS "https://github.com/boostorg/range/commit/e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff" - FILENAME "boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff" - SHA512 77dad42bfd9bbab2bbddf361d5b7ad3dd6f812f4294c6dd1a677bb4d0191a4fff43bca32fdd4fce05d428562abb6e38afd0fd33ca6a8b5f28481d70cd2f3dd67 + FILENAME "boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2-2.diff" + SHA512 88392fcf092d07ee2de66d937634688eef1d7491a4e2fb0fce064b4e631813a0814455a329f9eed8b968ff205883751d51a86edecc8e355790fc8a35d6742483 ) FILE(READ "${DIFF}" content) -- cgit v1.2.3 From e8f819e04e6aed6327537f954a9eda02fca49d1a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 27 Jun 2017 11:24:31 -0700 Subject: [vcpkg-fixup-cmake-targets] Fix bug when port has no unused cmake config files. --- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index c56b96ccc..6fa096cbd 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -73,7 +73,9 @@ function(vcpkg_fixup_cmake_targets) "${DEBUG_SHARE}/*[Cc]onfigVersion.cmake" "${DEBUG_SHARE}/*[Cc]onfig-version.cmake" ) - file(REMOVE ${UNUSED_FILES}) + if(UNUSED_FILES) + file(REMOVE ${UNUSED_FILES}) + endif() file(GLOB RELEASE_TARGETS "${RELEASE_SHARE}/*[Tt]argets-release.cmake" -- cgit v1.2.3 From 0ee8ad5cb2ed21731885fa40bd0e2776eec39c71 Mon Sep 17 00:00:00 2001 From: codicodi Date: Tue, 27 Jun 2017 20:47:20 +0200 Subject: [fmt] update to 4.0.0 --- ports/fmt/CONTROL | 2 +- ports/fmt/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL index e5749ab1f..c4fd79f76 100644 --- a/ports/fmt/CONTROL +++ b/ports/fmt/CONTROL @@ -1,3 +1,3 @@ Source: fmt -Version: 3.0.2 +Version: 4.0.0 Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams. diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake index 49728fbe0..f40e2adc9 100644 --- a/ports/fmt/portfile.cmake +++ b/ports/fmt/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fmtlib/fmt - REF 3.0.2 - SHA512 50f5a25d1a10fd5b265f3811fa11886b9efdae2952f2aefc9f22c87c1a748128369f4d530b320e5e9c67c745cdab4607d1cb08940f4cf968300dee22e1150117 + REF 4.0.0 + SHA512 8b9f7ce4720c3caef6de4a75b8d4b0fd7db4f1638edca98d5ea95f4a5157aef8faefbac68438236691bd373111ca089b4d3864f7352f3fba1fe44392e9644f8b HEAD_REF master ) -- cgit v1.2.3 From 7944f9f7779ebbc0923efd27cff268ac23b1c312 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Tue, 27 Jun 2017 14:52:26 -0700 Subject: refactor create_install_plan tests --- toolsrc/include/vcpkg_Dependencies.h | 6 +- toolsrc/src/commands_ci.cpp | 3 +- toolsrc/src/commands_install.cpp | 3 +- toolsrc/src/test_install_plan.cpp | 118 ++++++++++++++++------------------- toolsrc/src/vcpkg_Dependencies.cpp | 14 ++--- 5 files changed, 67 insertions(+), 77 deletions(-) diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index da31aa4bf..c8e15de27 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -97,13 +97,13 @@ namespace vcpkg::Dependencies RequestType request_type; }; - __interface PortFileProvider { virtual const SourceControlFile* get_control_file(const PackageSpec& spec) const; }; + __interface PortFileProvider { virtual const SourceControlFile& get_control_file(const PackageSpec& spec) const; }; struct MapPortFile : PortFileProvider { const std::unordered_map& ports; explicit MapPortFile(const std::unordered_map& map); - const SourceControlFile* get_control_file(const PackageSpec& spec) const override; + const SourceControlFile& get_control_file(const PackageSpec& spec) const override; }; struct PathsPortFile : PortFileProvider @@ -111,7 +111,7 @@ namespace vcpkg::Dependencies const VcpkgPaths& ports; mutable std::unordered_map cache; explicit PathsPortFile(const VcpkgPaths& paths); - const SourceControlFile* get_control_file(const PackageSpec& spec) const override; + const SourceControlFile& get_control_file(const PackageSpec& spec) const override; }; std::vector create_install_plan(const PortFileProvider& port_file_provider, diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp index 5f6fc95b5..95d722302 100644 --- a/toolsrc/src/commands_ci.cpp +++ b/toolsrc/src/commands_ci.cpp @@ -40,8 +40,9 @@ namespace vcpkg::Commands::CI const std::vector specs = load_all_package_specs(paths.get_filesystem(), paths.ports, triplet); StatusParagraphs status_db = database_load_check(paths); + auto paths_port_file = Dependencies::PathsPortFile(paths); const std::vector install_plan = - Dependencies::create_install_plan(Dependencies::PathsPortFile(paths), specs, status_db); + Dependencies::create_install_plan(paths_port_file, specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); std::vector results; diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index a58432eef..d340a9cf8 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -359,8 +359,9 @@ namespace vcpkg::Commands::Install // create the plan StatusParagraphs status_db = database_load_check(paths); + auto paths_port_file = Dependencies::PathsPortFile(paths); std::vector install_plan = - Dependencies::create_install_plan(Dependencies::PathsPortFile(paths), specs, status_db); + Dependencies::create_install_plan(paths_port_file, specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); // log the plan diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index 2404e30f7..93a1436d8 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -9,12 +9,11 @@ namespace UnitTest1 { class InstallPlanTests : public TestClass { - TEST_METHOD(basic_install_scheme) + struct PackageSpecMap { - std::vector> status_paragraphs; - std::unordered_map map; - auto add_scf = [&](std::vector>&& fields) -> PackageSpec { + PackageSpec get_package_spec(std::vector>&& fields) + { auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(fields)); Assert::IsTrue(m_pgh.has_value()); auto& scf = *m_pgh.get(); @@ -23,13 +22,19 @@ namespace UnitTest1 Assert::IsTrue(spec.has_value()); map.emplace(*spec.get(), std::move(*scf.get())); return PackageSpec{*spec.get()}; - }; + } + }; + TEST_METHOD(basic_install_scheme) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map; - auto spec_a = add_scf({{{"Source", "a"}, {"Version", "1.2.8"}, {"Build-Depends", "b"}}}); - auto spec_b = add_scf({{{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", "c"}}}); - auto spec_c = add_scf({{{"Source", "c"}, {"Version", "2.5.3"}, {"Build-Depends", ""}}}); + auto spec_a = spec_map.get_package_spec({{{"Source", "a"}, {"Version", "1.2.8"}, {"Build-Depends", "b"}}}); + auto spec_b = spec_map.get_package_spec({{{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", "c"}}}); + auto spec_c = spec_map.get_package_spec({{{"Source", "c"}, {"Version", "2.5.3"}, {"Build-Depends", ""}}}); - auto map_port = Dependencies::MapPortFile(map); + auto map_port = Dependencies::MapPortFile(spec_map.map); auto install_plan = Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); @@ -43,43 +48,30 @@ namespace UnitTest1 { std::vector> status_paragraphs; - std::unordered_map map; - auto add_scf = [&](std::vector>&& fields) -> PackageSpec { - auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(fields)); - Assert::IsTrue(m_pgh.has_value()); - auto& scf = *m_pgh.get(); - - auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, Triplet::X86_WINDOWS); - Assert::IsTrue(spec.has_value()); - map.emplace(*spec.get(), std::move(*scf.get())); - return PackageSpec{*spec.get()}; - }; + PackageSpecMap spec_map; - auto spec_a = add_scf({{{"Source", "a"}, {"Version", "1.2.8"}, {"Build-Depends", "d"}}}); - auto spec_b = add_scf({{{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", "d, e"}}}); - auto spec_c = add_scf({{{"Source", "c"}, {"Version", "2.5.3"}, {"Build-Depends", "e, h"}}}); - auto spec_d = add_scf({{{"Source", "d"}, {"Version", "4.0"}, {"Build-Depends", "f, g, h"}}}); - auto spec_e = add_scf({{{"Source", "e"}, {"Version", "1.0"}, {"Build-Depends", "g"}}}); - auto spec_f = add_scf({{{"Source", "f"}, {"Version", "1.0"}, {"Build-Depends", ""}}}); - auto spec_g = add_scf({{{"Source", "g"}, {"Version", "1.0"}, {"Build-Depends", ""}}}); - auto spec_h = add_scf({{{"Source", "h"}, {"Version", "1.0"}, {"Build-Depends", ""}}}); + auto spec_a = spec_map.get_package_spec({{{"Source", "a"}, {"Version", "1.2.8"}, {"Build-Depends", "d"}}}); + auto spec_b = spec_map.get_package_spec({{{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", "d, e"}}}); + auto spec_c = + spec_map.get_package_spec({{{"Source", "c"}, {"Version", "2.5.3"}, {"Build-Depends", "e, h"}}}); + auto spec_d = + spec_map.get_package_spec({{{"Source", "d"}, {"Version", "4.0"}, {"Build-Depends", "f, g, h"}}}); + auto spec_e = spec_map.get_package_spec({{{"Source", "e"}, {"Version", "1.0"}, {"Build-Depends", "g"}}}); + auto spec_f = spec_map.get_package_spec({{{"Source", "f"}, {"Version", "1.0"}, {"Build-Depends", ""}}}); + auto spec_g = spec_map.get_package_spec({{{"Source", "g"}, {"Version", "1.0"}, {"Build-Depends", ""}}}); + auto spec_h = spec_map.get_package_spec({{{"Source", "h"}, {"Version", "1.0"}, {"Build-Depends", ""}}}); - auto map_port = Dependencies::MapPortFile(map); + auto map_port = Dependencies::MapPortFile(spec_map.map); auto install_plan = Dependencies::create_install_plan( map_port, {spec_a, spec_b, spec_c}, StatusParagraphs(std::move(status_paragraphs))); auto iterator_pos = [&](const PackageSpec& spec) -> int { - int counter = 0; - for (auto&& install_p : install_plan) - { - if (install_p.spec == spec) - { - return counter; - } - counter++; - } - return -1; + auto it = std::find_if( + install_plan.begin(), install_plan.end(), [&](auto& action) { return action.spec == spec; }); + Assert::IsTrue(it != install_plan.end()); + return (int)(it - install_plan.begin()); }; + int a_pos = iterator_pos(spec_a), b_pos = iterator_pos(spec_b), c_pos = iterator_pos(spec_c), d_pos = iterator_pos(spec_d), e_pos = iterator_pos(spec_e), f_pos = iterator_pos(spec_f), g_pos = iterator_pos(spec_g), h_pos = iterator_pos(spec_h); @@ -112,32 +104,28 @@ namespace UnitTest1 {"Depends", ""}, {"Status", "install ok installed"}})); - std::unordered_map map; - auto add_scf = [&](std::vector>&& fields) -> PackageSpec { - auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(fields)); - Assert::IsTrue(m_pgh.has_value()); - auto& scf = *m_pgh.get(); - - auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, Triplet::X86_WINDOWS); - Assert::IsTrue(spec.has_value()); - map.emplace(*spec.get(), std::move(*scf.get())); - return PackageSpec{*spec.get()}; - }; - - auto spec_h = add_scf({{{"Source", "h"}, {"Version", "1.2.8"}, {"Build-Depends", "j, k"}}}); - auto spec_c = add_scf({{{"Source", "c"}, {"Version", "1.2.8"}, {"Build-Depends", "d, e, f, g, h, j, k"}}}); - auto spec_k = add_scf({{{"Source", "k"}, {"Version", "1.2.8"}, {"Build-Depends", ""}}}); - auto spec_b = - add_scf({{{"Source", "b"}, {"Version", "1.2.8"}, {"Build-Depends", "c, d, e, f, g, h, j, k"}}}); - auto spec_d = add_scf({{{"Source", "d"}, {"Version", "1.2.8"}, {"Build-Depends", "e, f, g, h, j, k"}}}); - auto spec_j = add_scf({{{"Source", "j"}, {"Version", "1.2.8"}, {"Build-Depends", "k"}}}); - auto spec_f = add_scf({{{"Source", "f"}, {"Version", "1.2.8"}, {"Build-Depends", "g, h, j, k"}}}); - auto spec_e = add_scf({{{"Source", "e"}, {"Version", "1.2.8"}, {"Build-Depends", "f, g, h, j, k"}}}); - auto spec_a = - add_scf({{{"Source", "a"}, {"Version", "1.2.8"}, {"Build-Depends", "b, c, d, e, f, g, h, j, k"}}}); - auto spec_g = add_scf({{{"Source", "g"}, {"Version", "1.2.8"}, {"Build-Depends", "h, j, k"}}}); - - auto map_port = Dependencies::MapPortFile(map); + PackageSpecMap spec_map; + + auto spec_h = + spec_map.get_package_spec({{{"Source", "h"}, {"Version", "1.2.8"}, {"Build-Depends", "j, k"}}}); + auto spec_c = spec_map.get_package_spec( + {{{"Source", "c"}, {"Version", "1.2.8"}, {"Build-Depends", "d, e, f, g, h, j, k"}}}); + auto spec_k = spec_map.get_package_spec({{{"Source", "k"}, {"Version", "1.2.8"}, {"Build-Depends", ""}}}); + auto spec_b = spec_map.get_package_spec( + {{{"Source", "b"}, {"Version", "1.2.8"}, {"Build-Depends", "c, d, e, f, g, h, j, k"}}}); + auto spec_d = spec_map.get_package_spec( + {{{"Source", "d"}, {"Version", "1.2.8"}, {"Build-Depends", "e, f, g, h, j, k"}}}); + auto spec_j = spec_map.get_package_spec({{{"Source", "j"}, {"Version", "1.2.8"}, {"Build-Depends", "k"}}}); + auto spec_f = + spec_map.get_package_spec({{{"Source", "f"}, {"Version", "1.2.8"}, {"Build-Depends", "g, h, j, k"}}}); + auto spec_e = spec_map.get_package_spec( + {{{"Source", "e"}, {"Version", "1.2.8"}, {"Build-Depends", "f, g, h, j, k"}}}); + auto spec_a = spec_map.get_package_spec( + {{{"Source", "a"}, {"Version", "1.2.8"}, {"Build-Depends", "b, c, d, e, f, g, h, j, k"}}}); + auto spec_g = + spec_map.get_package_spec({{{"Source", "g"}, {"Version", "1.2.8"}, {"Build-Depends", "h, j, k"}}}); + + auto map_port = Dependencies::MapPortFile(spec_map.map); auto install_plan = Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 726c147fd..984d0ab4c 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -140,23 +140,23 @@ namespace vcpkg::Dependencies } MapPortFile::MapPortFile(const std::unordered_map& map) : ports(map){}; - const SourceControlFile* MapPortFile::get_control_file(const PackageSpec& spec) const + const SourceControlFile& MapPortFile::get_control_file(const PackageSpec& spec) const { auto scf = ports.find(spec); if (scf == ports.end()) { Checks::exit_fail(VCPKG_LINE_INFO); } - return &scf->second; + return scf->second; } PathsPortFile::PathsPortFile(const VcpkgPaths& paths) : ports(paths){}; - const SourceControlFile* PathsPortFile::get_control_file(const PackageSpec& spec) const + const SourceControlFile& PathsPortFile::get_control_file(const PackageSpec& spec) const { std::unordered_map::iterator cache_it = cache.find(spec); if (cache_it != cache.end()) { - return &cache_it->second; + return cache_it->second; } Parse::ParseExpected source_control_file = Paragraphs::try_load_port(ports.get_filesystem(), ports.port_dir(spec)); @@ -164,9 +164,9 @@ namespace vcpkg::Dependencies if (auto scf = source_control_file.get()) { auto it = cache.emplace(spec, std::move(*scf->get())); - return &it.first->second; + return it.first->second; } - + print_error_message(source_control_file.error()); Checks::exit_fail(VCPKG_LINE_INFO); } @@ -201,7 +201,7 @@ namespace vcpkg::Dependencies auto it = status_db.find_installed(spec); if (it != status_db.end()) return InstallPlanAction{spec, {*it->get(), nullopt, nullopt}, request_type}; return InstallPlanAction{ - spec, {nullopt, nullopt, *port_file_provider.get_control_file(spec)->core_paragraph}, request_type}; + spec, {nullopt, nullopt, *port_file_provider.get_control_file(spec).core_paragraph}, request_type}; } }; -- cgit v1.2.3 From bbb7f8f2655fdd3ed91459d64f2517d70ea5300b Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 27 Jun 2017 17:34:09 -0700 Subject: [apr-util] init #1016 --- ports/apr-util/CONTROL | 4 ++++ ports/apr-util/portfile.cmake | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 ports/apr-util/CONTROL create mode 100644 ports/apr-util/portfile.cmake diff --git a/ports/apr-util/CONTROL b/ports/apr-util/CONTROL new file mode 100644 index 000000000..e61eb3653 --- /dev/null +++ b/ports/apr-util/CONTROL @@ -0,0 +1,4 @@ +Source: apr-util +Version: 1.6.0 +Description: Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation +Build-Depends: expat, apr, openssl diff --git a/ports/apr-util/portfile.cmake b/ports/apr-util/portfile.cmake new file mode 100644 index 000000000..1f65f05ec --- /dev/null +++ b/ports/apr-util/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-util-1.6.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://archive.apache.org/dist/apr/apr-util-1.6.0-win32-src.zip" + FILENAME "apr-util-1.6.0-win32-src.zip" + SHA512 98679ea181d3132020713481703bbefa0c174e0b2a0df65dfdd176e9771935e1f9455c4242bac19dded9414abe2b9d293fcc674ab16f96d8987bcf26346fce3a +) +vcpkg_extract_source_archive(${ARCHIVE}) + +set(APR_HOME ${VCPKG_ROOT_DIR}/packages/apr_${TARGET_TRIPLET}) +set(EXPAT_HOME ${VCPKG_ROOT_DIR}/packages/expat_${TARGET_TRIPLET}) +set(EXPAT_LIB ${EXPAT_HOME}/lib/expat.lib) +set(EXPAT_LIB_DEBUG ${EXPAT_HOME}/debug/lib/expat.lib) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DAPR_HOME=${APR_HOME} -DEXPAT_LIB=${EXPAT_LIB} -DEXPAT_HOME=${EXPAT_HOME} + OPTIONS_DEBUG -DEXPAT_LIB=${EXPAT_LIB_DEBUG} -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/apr-util RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 7590bd0c15f99f93dde02be272c5e39adde17c20 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 27 Jun 2017 20:31:49 -0700 Subject: created a patch but static build still failing --- ports/apr-util/portfile.cmake | 18 ++++++- ports/apr-util/use-vcpkg-expat.patch | 102 +++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 ports/apr-util/use-vcpkg-expat.patch diff --git a/ports/apr-util/portfile.cmake b/ports/apr-util/portfile.cmake index 1f65f05ec..cefe30dca 100644 --- a/ports/apr-util/portfile.cmake +++ b/ports/apr-util/portfile.cmake @@ -13,9 +13,25 @@ set(EXPAT_HOME ${VCPKG_ROOT_DIR}/packages/expat_${TARGET_TRIPLET}) set(EXPAT_LIB ${EXPAT_HOME}/lib/expat.lib) set(EXPAT_LIB_DEBUG ${EXPAT_HOME}/debug/lib/expat.lib) +if(VCPG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_SHARED_LIBRARY ON) +else() + set(BUILD_SHARED_LIBRARY OFF) +endif() + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-expat.patch" +) + + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DAPR_HOME=${APR_HOME} -DEXPAT_LIB=${EXPAT_LIB} -DEXPAT_HOME=${EXPAT_HOME} + OPTIONS + -DAPR_HOME=${APR_HOME} + -DEXPAT_LIB=${EXPAT_LIB} + -DEXPAT_HOME=${EXPAT_HOME} + -DBUILD_SHARED_LIBRARY=${BUILD_SHARED_LIBRARY} OPTIONS_DEBUG -DEXPAT_LIB=${EXPAT_LIB_DEBUG} -DDISABLE_INSTALL_HEADERS=ON ) diff --git a/ports/apr-util/use-vcpkg-expat.patch b/ports/apr-util/use-vcpkg-expat.patch new file mode 100644 index 000000000..711c0d17e --- /dev/null +++ b/ports/apr-util/use-vcpkg-expat.patch @@ -0,0 +1,102 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 43fdf49..057e5e1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,8 +27,13 @@ OPTION(APR_HAS_LDAP "LDAP support" ON) + OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON) + OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF) + OPTION(TEST_STATIC_LIBS "Test programs use APR static libraries instead of shared libraries?" OFF) +-SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR include files") +-SET(APR_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib" CACHE STRING "APR library to link with") ++SET(APR_INCLUDE_DIR "${APR_HOME}/include" CACHE STRING "Directory with APR include files") ++ ++if(BUILD_SHARED_LIBRARY) ++ SET(APR_LIBRARIES "${APR_HOME}/lib/libapr-1.lib" CACHE STRING "APR library to link with") ++else() ++ SET(APR_LIBRARIES "${APR_HOME}/lib/apr-1.lib" CACHE STRING "APR library to link with") ++endif() + + IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") + MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") +@@ -75,8 +80,8 @@ CONFIGURE_FILE(include/apu_want.hw + COPYONLY) + + # TBD: +-# SET(XMLLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xml/expat/lib) +-SET(XMLLIB_LIBRARIES libexpat) ++SET(XMLLIB_INCLUDE_DIR ${EXPAT_HOME}/include) ++SET(XMLLIB_LIBRARIES ${EXPAT_LIB}) + + SET(LDAP_LIBRARIES) + IF(APR_HAS_LDAP) +@@ -217,11 +222,11 @@ SET(APR_TEST_SOURCES + test/testxml.c + ) + +-SET(EXPAT_SOURCES +- xml/expat/lib/xmlrole.c +- xml/expat/lib/xmltok.c +- xml/expat/lib/xmlparse.c +-) ++# SET(EXPAT_SOURCES ++# xml/expat/lib/xmlrole.c ++# xml/expat/lib/xmltok.c ++# xml/expat/lib/xmlparse.c ++# ) + + SET(install_targets) + SET(install_bin_pdb) +@@ -230,8 +235,8 @@ SET(dbd_drivers) + # Note: The WINNT definition on some targets is used only by libaprutil.rc. + + # static expat (not installed) +-ADD_LIBRARY(libexpat STATIC ${EXPAT_SOURCES}) +-SET_TARGET_PROPERTIES(libexpat PROPERTIES COMPILE_DEFINITIONS "XML_STATIC;COMPILED_FROM_DSP") ++# ADD_LIBRARY(libexpat STATIC ${EXPAT_SOURCES}) ++# SET_TARGET_PROPERTIES(libexpat PROPERTIES COMPILE_DEFINITIONS "XML_STATIC;COMPILED_FROM_DSP") + + # libaprutil-1 is shared, aprutil-1 is static + ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc) +@@ -270,7 +275,7 @@ IF(APU_HAVE_ODBC) + ENDIF() + + IF(APR_HAS_LDAP) +- ADD_LIBRARY(apr_ldap-1 SHARED ldap/apr_ldap_init.c ldap/apr_ldap_option.c ++ ADD_LIBRARY(apr_ldap-1 SHARED ldap/apr_ldap_init.c ldap/apr_ldap_option.c + ldap/apr_ldap_rebind.c libaprutil.rc) + SET(install_targets ${install_targets} apr_ldap-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_ldap-1.pdb) +@@ -288,9 +293,9 @@ IF(APR_BUILD_TESTAPR) + ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} --verbose) + + # copy data files to build directory so that we can run programs from there +- EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory ++ EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory + ${PROJECT_BINARY_DIR}/data) +- EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different ++ EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${PROJECT_SOURCE_DIR}/test/data/billion-laughs.xml + ${PROJECT_BINARY_DIR}/data/billion-laughs.xml) + +@@ -330,13 +335,15 @@ INSTALL(TARGETS ${install_targets} + ARCHIVE DESTINATION lib + ) + +-IF(INSTALL_PDB) +- INSTALL(FILES ${install_bin_pdb} +- DESTINATION bin +- CONFIGURATIONS RelWithDebInfo Debug) +-ENDIF() ++# IF(INSTALL_PDB) ++# INSTALL(FILES ${install_bin_pdb} ++# DESTINATION bin ++# CONFIGURATIONS RelWithDebInfo Debug) ++# ENDIF() + +-INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) ++if(NOT DISABLE_INSTALL_HEADERS) ++ INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) ++endif() + + STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype) + MESSAGE(STATUS "") -- cgit v1.2.3 From 7b5563f5f8f006cdb7b0e0c8b48cd08734c3a279 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 27 Jun 2017 22:50:49 -0700 Subject: Build static fixed --- ports/apr-util/portfile.cmake | 2 +- ports/apr-util/use-vcpkg-expat.patch | 40 +++++++++++++++++++++++++++++++----- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/ports/apr-util/portfile.cmake b/ports/apr-util/portfile.cmake index cefe30dca..07d6766b2 100644 --- a/ports/apr-util/portfile.cmake +++ b/ports/apr-util/portfile.cmake @@ -13,7 +13,7 @@ set(EXPAT_HOME ${VCPKG_ROOT_DIR}/packages/expat_${TARGET_TRIPLET}) set(EXPAT_LIB ${EXPAT_HOME}/lib/expat.lib) set(EXPAT_LIB_DEBUG ${EXPAT_HOME}/debug/lib/expat.lib) -if(VCPG_LIBRARY_LINKAGE STREQUAL dynamic) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(BUILD_SHARED_LIBRARY ON) else() set(BUILD_SHARED_LIBRARY OFF) diff --git a/ports/apr-util/use-vcpkg-expat.patch b/ports/apr-util/use-vcpkg-expat.patch index 711c0d17e..911404e2d 100644 --- a/ports/apr-util/use-vcpkg-expat.patch +++ b/ports/apr-util/use-vcpkg-expat.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 43fdf49..057e5e1 100644 +index 43fdf49..8040552 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,13 @@ OPTION(APR_HAS_LDAP "LDAP support" ON) @@ -46,7 +46,7 @@ index 43fdf49..057e5e1 100644 SET(install_targets) SET(install_bin_pdb) -@@ -230,8 +235,8 @@ SET(dbd_drivers) +@@ -230,21 +235,25 @@ SET(dbd_drivers) # Note: The WINNT definition on some targets is used only by libaprutil.rc. # static expat (not installed) @@ -56,8 +56,25 @@ index 43fdf49..057e5e1 100644 +# SET_TARGET_PROPERTIES(libexpat PROPERTIES COMPILE_DEFINITIONS "XML_STATIC;COMPILED_FROM_DSP") # libaprutil-1 is shared, aprutil-1 is static ++if(BUILD_SHARED_LIBRARY) ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc) -@@ -270,7 +275,7 @@ IF(APU_HAVE_ODBC) + SET(install_targets ${install_targets} libaprutil-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprutil-1.pdb) + TARGET_LINK_LIBRARIES(libaprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) + SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;XML_STATIC;WINNT") + ++else() + ADD_LIBRARY(aprutil-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED}) + SET(install_targets ${install_targets} aprutil-1) + TARGET_LINK_LIBRARIES(aprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) + SET_TARGET_PROPERTIES(aprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_STATIC;APR_DECLARE_STATIC;APU_DSO_MODULE_BUILD;XML_STATIC") ++endif() + ++if(BUILD_SHARED_LIBRARY) + IF(APU_HAVE_CRYPTO) + IF(NOT OPENSSL_FOUND) + MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build") +@@ -270,7 +279,7 @@ IF(APU_HAVE_ODBC) ENDIF() IF(APR_HAS_LDAP) @@ -66,7 +83,15 @@ index 43fdf49..057e5e1 100644 ldap/apr_ldap_rebind.c libaprutil.rc) SET(install_targets ${install_targets} apr_ldap-1) SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_ldap-1.pdb) -@@ -288,9 +293,9 @@ IF(APR_BUILD_TESTAPR) +@@ -281,6 +290,7 @@ IF(APR_HAS_LDAP) + ELSE() + SET(apr_ldap_libraries) + ENDIF() ++endif() + + IF(APR_BUILD_TESTAPR) + ENABLE_TESTING() +@@ -288,13 +298,13 @@ IF(APR_BUILD_TESTAPR) ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} --verbose) # copy data files to build directory so that we can run programs from there @@ -78,7 +103,12 @@ index 43fdf49..057e5e1 100644 ${PROJECT_SOURCE_DIR}/test/data/billion-laughs.xml ${PROJECT_BINARY_DIR}/data/billion-laughs.xml) -@@ -330,13 +335,15 @@ INSTALL(TARGETS ${install_targets} +- IF(TEST_STATIC_LIBS) ++ IF(NOT BUILD_SHARED_LIBRARY) + SET(whichapr aprutil-1) + SET(apiflag "-DAPR_DECLARE_STATIC -DAPU_DECLARE_STATIC") + ELSE() +@@ -330,13 +340,15 @@ INSTALL(TARGETS ${install_targets} ARCHIVE DESTINATION lib ) -- cgit v1.2.3 From 3d31f16c01774bd470bdee81354be82fdbdc6bb5 Mon Sep 17 00:00:00 2001 From: Mitchell Mebane Date: Wed, 28 Jun 2017 09:50:05 -0500 Subject: Fix OpenSSL version number --- ports/openssl/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index 465f941b7..bb00f9cc3 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.21-1 +Version: 1.0.2l-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. -- cgit v1.2.3 From 04e60310274b24820ec62313458aae001bcc035f Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 28 Jun 2017 11:52:22 -0700 Subject: [msinttypes] required by #1343 --- ports/msinttypes/CONTROL | 3 +++ ports/msinttypes/portfile.cmake | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 ports/msinttypes/CONTROL create mode 100644 ports/msinttypes/portfile.cmake diff --git a/ports/msinttypes/CONTROL b/ports/msinttypes/CONTROL new file mode 100644 index 000000000..a7ed816ee --- /dev/null +++ b/ports/msinttypes/CONTROL @@ -0,0 +1,3 @@ +Source: msinttypes +Version: 2017-06-26-f9e7c5758ed9e3b9f4b2394de1881c704dd79de0 +Description: msinttypes is a package to provide missing ISO C9x compliant headers for Microsoft Visual Studio diff --git a/ports/msinttypes/portfile.cmake b/ports/msinttypes/portfile.cmake new file mode 100644 index 000000000..469032f76 --- /dev/null +++ b/ports/msinttypes/portfile.cmake @@ -0,0 +1,13 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO chemeris/msinttypes + REF 7636cabe55318824dc702d15b69711f5d7c30250 + SHA512 1c3c350d12c6b69e1cb6469f742afc126d50fd92e137ecacdb8367e320350cd42d7d41fbb0aa38d6a13aefbef5308f9ec89825e9b80a932f552a889f63b35cb2 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/inttypes.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/stdint.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/stdint.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/msinttypes RENAME copyright) -- cgit v1.2.3 From 0e34f8139061b53572dff30bcbd5567682a7eefa Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 28 Jun 2017 13:21:01 -0700 Subject: [libconfig] init #1343 --- ports/libconfig/CMakeLists.txt | 69 +++++++++++++++++++++++++ ports/libconfig/CONTROL | 4 ++ ports/libconfig/portfile.cmake | 34 +++++++++++++ ports/libconfig/scandir.c | 111 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 218 insertions(+) create mode 100644 ports/libconfig/CMakeLists.txt create mode 100644 ports/libconfig/CONTROL create mode 100644 ports/libconfig/portfile.cmake create mode 100644 ports/libconfig/scandir.c diff --git a/ports/libconfig/CMakeLists.txt b/ports/libconfig/CMakeLists.txt new file mode 100644 index 000000000..fd5313a7d --- /dev/null +++ b/ports/libconfig/CMakeLists.txt @@ -0,0 +1,69 @@ +cmake_minimum_required(VERSION 3.5.1) +project(libconfig C CXX) + + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +set(SOURCE_PATH ${PROJECT_SOURCE_DIR}/lib) +set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/includes) + +set(C_HEADERS + ${SOURCE_PATH}/grammar.h + ${SOURCE_PATH}/libconfig.h + ${SOURCE_PATH}/libconfig.hh + ${SOURCE_PATH}/parsectx.h + ${SOURCE_PATH}/scanctx.h + ${SOURCE_PATH}/scanner.h + ${SOURCE_PATH}/wincompat.h + ${SOURCE_PATH}/libconfig.h++ + ${SOURCE_PATH}/libconfigcpp.c++ +) + +set( + EXTERNAL_HEADERS ${SOURCE_PATH}/win32 +) + + + +set(C_SOURCES + ${SOURCE_PATH}/grammar.c + ${SOURCE_PATH}/libconfig.c + ${SOURCE_PATH}/scanctx.c + ${SOURCE_PATH}/win32/scandir.c + ${SOURCE_PATH}/scanner.c + ${SOURCE_PATH}/strbuf.c +) + +set(CPP_SOURCES + ${SOURCE_PATH}/libconfigcpp.cc +) + +file(COPY ${C_HEADERS} DESTINATION ${COMMON_INCLUDES}) + +include_directories(${COMMON_INCLUDES}) +include_directories(${EXTERNAL_HEADERS}) + +if(BUILD_SHARED) + add_library(libconfig SHARED ${C_SOURCES}) + add_library(libconfig++ SHARED ${C_SOURCES} ${CPP_SOURCES}) + target_compile_definitions(libconfig PRIVATE -DLIBCONFIG_EXPORTS -DYY_NO_UNISTD_H -DYY_USE_CONST) + target_compile_definitions(libconfig++ PRIVATE -DLIBCONFIG_EXPORTS -DLIBCONFIGXX_EXPORTS -DYY_NO_UNISTD_H -DYY_USE_CONST) +else() + add_library(libconfig STATIC ${C_SOURCES}) + add_library(libconfig++ STATIC ${C_SOURCES} ${CPP_SOURCES}) + target_compile_definitions(libconfig PRIVATE -DLIBCONFIG_STATIC -DYY_NO_UNISTD_H) + target_compile_definitions(libconfig++ PRIVATE -DLIBCONFIG_STATIC -DYY_NO_UNISTD_H) +endif() + +install( + TARGETS libconfig libconfig++ + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include FILES_MATCHING PATTERN "*.h") +endif() diff --git a/ports/libconfig/CONTROL b/ports/libconfig/CONTROL new file mode 100644 index 000000000..05e51e748 --- /dev/null +++ b/ports/libconfig/CONTROL @@ -0,0 +1,4 @@ +Source: libconfig +Version: 1.6.0 +Description: Library for collision detection between two convex shapes +Build-Depends: msinttypes, dirent diff --git a/ports/libconfig/portfile.cmake b/ports/libconfig/portfile.cmake new file mode 100644 index 000000000..32571982e --- /dev/null +++ b/ports/libconfig/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hyperrealm/libconfig + REF v1.6 + SHA512 6222110851970fda11d21e73bc322be95fb1ce62c513e2f4cc7875d7b32d1d211860971692db679edf8ac46151033a132fc669bd16590fec56360ef3a6e584f8 + HEAD_REF master +) + +set(DIRENT_HOME ${VCPKG_ROOT_DIR}/packages/dirent_${TARGET_TRIPLET}) +set(MIINTTYPES_HOME ${VCPKG_ROOT_DIR}/packages/msinttypes_${TARGET_TRIPLET}) +set(WIN_SRC ${SOURCE_PATH}/lib/win32) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/scandir.c DESTINATION ${WIN_SRC}) + +file(COPY ${DIRENT_HOME}/include/dirent.h DESTINATION ${WIN_SRC}) +file(COPY ${MIINTTYPES_HOME}/include/stdint.h DESTINATION ${WIN_SRC}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set (BUILD_SHARED_LIBRARY ON) +else() + set(BUILD_SHARED_LIBRARY OFF) +endif() + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DBUILD_SHARED=${BUILD_SHARED_LIBRARY} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libconfig RENAME copyright) diff --git a/ports/libconfig/scandir.c b/ports/libconfig/scandir.c new file mode 100644 index 000000000..555a3dc5e --- /dev/null +++ b/ports/libconfig/scandir.c @@ -0,0 +1,111 @@ +// "$Id: scandir.c 1339 2006-04-03 22:47:29Z spitzak $" +// +// Copyright 1998-2006 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 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 +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library 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. +// +// Please report all bugs and problems to "fltk-bugs@fltk.org". + +// Emulation of posix scandir() call +// This source file is #include'd by scandir.c +// THIS IS A C FILE! DO NOT CHANGE TO C++!!! + +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef FILENAME_MAX +#define FILENAME_MAX 2048 +#endif + +/** + * The scandir() function reads the directory dirname and builds an array of + * pointers to directory entries. It returns the number of entries in the array. + * A pointer to the array of directory entries is stored in the location + * referenced by namelist. + */ +int scandir(const char *dirname, struct dirent ***namelist, + int (*select)(struct dirent *), + int (*compar)(struct dirent **, struct dirent **)) { + char *d; + WIN32_FIND_DATA find; + HANDLE h; + int nDir = 0, NDir = 0; + struct dirent **dir = 0, *selectDir; + unsigned long ret; + char findIn[MAX_PATH*4]; + + //utf8tomb(dirname, strlen(dirname), findIn, _MAX_PATH); + strcpy(findIn, dirname); + + d = findIn+strlen(findIn); + if (d==findIn) *d++ = '.'; + if (*(d-1)!='/' && *(d-1)!='\\') *d++ = '/'; + *d++ = '*'; + *d++ = 0; + + if ((h=FindFirstFile(findIn, &find))==INVALID_HANDLE_VALUE) { + ret = GetLastError(); + if (ret != ERROR_NO_MORE_FILES) { + // TODO: return some error code + } + *namelist = dir; + return nDir; + } + do { + selectDir=(struct dirent*)malloc(sizeof(struct dirent)); + strcpy(selectDir->d_name, find.cFileName); + if (!select || (*select)(selectDir)) { + if (nDir==NDir) { + struct dirent **tempDir = (struct dirent **)calloc(sizeof(struct dirent*), NDir+33); + if (NDir) memcpy(tempDir, dir, sizeof(struct dirent*)*NDir); + if (dir) free(dir); + dir = tempDir; + NDir += 32; + } + dir[nDir] = selectDir; + nDir++; + dir[nDir] = 0; + } else { + free(selectDir); + } + } while (FindNextFile(h, &find)); + ret = GetLastError(); + if (ret != ERROR_NO_MORE_FILES) { + // TODO: return some error code + } + FindClose(h); + + if (compar) qsort (dir, nDir, sizeof(*dir), + (int(*)(const void*, const void*))compar); + + *namelist = dir; + return nDir; +} + +#ifdef __cplusplus +} +#endif + +// +// End of "$Id: scandir.c 1339 2006-04-03 22:47:29Z spitzak $". +// -- cgit v1.2.3 From 6c9d51451091470a6414a1e466a1f6f6d9b870ff Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Jun 2017 00:26:41 -0700 Subject: [angle] Initial commit with cmake buildsystem --- ports/angle/CMakeLists.txt | 149 +++++++++++++++++++++++++++++++++++++++++++++ ports/angle/CONTROL | 4 ++ ports/angle/portfile.cmake | 22 +++++++ 3 files changed, 175 insertions(+) create mode 100644 ports/angle/CMakeLists.txt create mode 100644 ports/angle/CONTROL create mode 100644 ports/angle/portfile.cmake diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt new file mode 100644 index 000000000..4f4138a05 --- /dev/null +++ b/ports/angle/CMakeLists.txt @@ -0,0 +1,149 @@ +cmake_minimum_required(VERSION 3.8) +project(angle) + +add_compile_options(/d2guard4 /Wv:18 /WX) +set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /guard:cf") + +add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DANGLE_STANDALONE_BUILD -DANGLE_ENABLE_DEBUG_ANNOTATIONS) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/id/commit.h" "#define ANGLE_COMMIT_HASH \"invalid-hash\"\n#define ANGLE_COMMIT_HASH_SIZE 12\n#define ANGLE_COMMIT_DATE \"invalid-date\"\n") + +include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) + +########## +# numerics +add_library(numerics INTERFACE) +file(GLOB_RECURSE NUMERICS_SOURCES "src/common/third_party/numerics/*.h") +target_sources(numerics INTERFACE ${NUMERICS_SOURCES}) +target_include_directories(numerics INTERFACE src/common/third_party/numerics) + +########## +# angle_common +file(GLOB ANGLE_COMMON_SOURCES "src/common/*.h" "src/common/*.inl" "src/common/*.cpp") +list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|_linux|_mac") +add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES} ${NUMERICS_SOURCES}) +target_link_libraries(angle_common PUBLIC numerics) + +########## +# angle_image_util +file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp") +add_library(angle_image_util STATIC ${ANGLE_IMAGE_UTIL_SOURCES}) +target_link_libraries(angle_image_util PRIVATE angle_common) + +########## +# translator +file(GLOB TRANSLATOR_SOURCES + "src/compiler/translator/glslang.l" + "src/compiler/translator/glslang.y" + "src/compiler/translator/*.h" + "src/compiler/translator/*.cpp" + "src/third_party/compiler/ArrayBoundsClamper.cpp" +) +add_library(translator STATIC ${TRANSLATOR_SOURCES}) +target_compile_definitions(translator PUBLIC + -DANGLE_ENABLE_ESSL + -DANGLE_ENABLE_GLSL + -DANGLE_ENABLE_HLSL +) +target_link_libraries(translator PRIVATE angle_common) + +########## +# preprocessor +file(GLOB PREPROCESSOR_SOURCES + "src/compiler/preprocessor/*.h" + "src/compiler/preprocessor/*.cpp" +) +add_library(preprocessor STATIC ${PREPROCESSOR_SOURCES}) +target_link_libraries(preprocessor PRIVATE angle_common) + +########## +# libANGLE +file(GLOB LIBANGLE_SOURCES + "src/third_party/systeminfo/SystemInfo.cpp" + "src/third_party/murmurhash/MurmurHash3.cpp" + "src/common/event_tracer.cpp" + + "src/libANGLE/*.cpp" + "src/libANGLE/*.inl" + "src/libANGLE/*.h" + + "src/libANGLE/renderer/*.cpp" + "src/libANGLE/renderer/*.inl" + "src/libANGLE/renderer/*.h" + + "src/libANGLE/renderer/gl/*.cpp" + "src/libANGLE/renderer/gl/*.inl" + "src/libANGLE/renderer/gl/*.h" + + "src/libANGLE/renderer/gl/wgl/*.cpp" + "src/libANGLE/renderer/gl/wgl/*.inl" + "src/libANGLE/renderer/gl/wgl/*.h" + + "src/libANGLE/renderer/vulkan/*.cpp" + "src/libANGLE/renderer/vulkan/*.inl" + "src/libANGLE/renderer/vulkan/*.h" + + "src/libANGLE/renderer/null/*.cpp" + "src/libANGLE/renderer/null/*.inl" + "src/libANGLE/renderer/null/*.h" +) +file(GLOB_RECURSE LIBANGLE_D3D_SOURCES "src/libANGLE/renderer/d3d/*.h" "src/libANGLE/renderer/d3d/*.cpp" "src/libANGLE/renderer/d3d/*.inl") +list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") +list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest|winrt") +add_library(libANGLE STATIC ${LIBANGLE_SOURCES} ${LIBANGLE_D3D_SOURCES}) +# kernel32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib;d3d9.lib;dxguid.lib +find_library(D3D9_LIB NAMES d3d9) +find_library(DXGUID_LIB NAMES dxguid) +target_link_libraries(libANGLE PRIVATE angle_common angle_image_util translator ${D3D9_LIB} ${DXGUID_LIB} preprocessor) +target_include_directories(libANGLE PRIVATE "src/third_party/khronos") +target_compile_definitions(libANGLE PUBLIC + -DANGLE_ENABLE_D3D9 + -DANGLE_ENABLE_D3D11 + -DANGLE_ENABLE_OPENGL + -DANGLE_ENABLE_VULKAN + -DANGLE_ENABLE_NULL +) +target_compile_definitions(libANGLE PRIVATE -DLIBANGLE_IMPLEMENTATION) + +########## +# libGLESv2 +file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2.def") +add_library(libGLESv2 ${LIBGLESV2_SOURCES}) +target_link_libraries(libGLESv2 PRIVATE angle_common libANGLE) +target_compile_definitions(libGLESv2 PRIVATE + -DLIBGLESV2_IMPLEMENTATION + -DLIBANGLE_IMPLEMENTATION + -DGL_GLEXT_PROTOTYPES + "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" + -DGL_APICALL= + -DEGLAPI= +) + +########## +# libEGL +add_library(libEGL "src/libEGL/libEGL.def" "src/libEGL/libEGL.cpp" "src/libEGL/libEGL.rc" "src/libEGL/resource.h") +target_link_libraries(libEGL PRIVATE angle_common libANGLE libGLESv2) +target_compile_definitions(libEGL PRIVATE + -DLIBANGLE_IMPLEMENTATION + -DGL_GLEXT_PROTOTYPES + "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" + -DGL_APICALL= + -DEGLAPI= +) + + +install(TARGETS libEGL libGLESv2 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY include/ + DESTINATION include + FILES_MATCHING PATTERN "*.h" + PATTERN "GLSLANG" EXCLUDE + PATTERN "export.h" EXCLUDE + ) +endif() diff --git a/ports/angle/CONTROL b/ports/angle/CONTROL new file mode 100644 index 000000000..4f5f8880d --- /dev/null +++ b/ports/angle/CONTROL @@ -0,0 +1,4 @@ +Source: angle +Version: 2017-06-14-8d471f +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 new file mode 100644 index 000000000..1499fa623 --- /dev/null +++ b/ports/angle/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/angle + REF 8d471f907d8d4ec1d46bc9366493bd76c11c1870 + SHA512 b9235d2a98330bc8533c3fe871129e7235c680420eac16610eae4ca7224c5284313ab6377f30ddfb8a2da39b69f3ef0d16023fe1e7cec3fc2198f4eb4bdccb26 + HEAD_REF master +) + +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=1 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/angle RENAME copyright) -- cgit v1.2.3 From 52d5091f85d182abb9b6581cfbb8b73909da1696 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Jun 2017 00:33:28 -0700 Subject: [angle] Disable static builds --- ports/angle/CMakeLists.txt | 1 - ports/angle/portfile.cmake | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt index 4f4138a05..a4895f938 100644 --- a/ports/angle/CMakeLists.txt +++ b/ports/angle/CMakeLists.txt @@ -91,7 +91,6 @@ file(GLOB_RECURSE LIBANGLE_D3D_SOURCES "src/libANGLE/renderer/d3d/*.h" "src/libA list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest|winrt") add_library(libANGLE STATIC ${LIBANGLE_SOURCES} ${LIBANGLE_D3D_SOURCES}) -# kernel32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib;d3d9.lib;dxguid.lib find_library(D3D9_LIB NAMES d3d9) find_library(DXGUID_LIB NAMES dxguid) target_link_libraries(libANGLE PRIVATE angle_common angle_image_util translator ${D3D9_LIB} ${DXGUID_LIB} preprocessor) diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake index 1499fa623..4668b7dea 100644 --- a/ports/angle/portfile.cmake +++ b/ports/angle/portfile.cmake @@ -1,5 +1,10 @@ include(vcpkg_common_functions) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "ANGLE currently only supports being built as a dynamic library") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/angle -- cgit v1.2.3 From 305d649307464ef439b241fb66f5718e8bc9af01 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Jun 2017 14:52:35 -0700 Subject: [angle] Fix build --- ports/angle/CMakeLists.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt index a4895f938..2d7af54cc 100644 --- a/ports/angle/CMakeLists.txt +++ b/ports/angle/CMakeLists.txt @@ -11,18 +11,18 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/id/commit.h" "#define ANGLE_COMM include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) ########## -# numerics -add_library(numerics INTERFACE) -file(GLOB_RECURSE NUMERICS_SOURCES "src/common/third_party/numerics/*.h") -target_sources(numerics INTERFACE ${NUMERICS_SOURCES}) -target_include_directories(numerics INTERFACE src/common/third_party/numerics) +# anglebase +add_library(anglebase INTERFACE) +file(GLOB_RECURSE anglebase_SOURCES "src/common/third_party/base/*.h") +target_sources(anglebase INTERFACE ${anglebase_SOURCES}) +target_include_directories(anglebase INTERFACE src/common/third_party/base) ########## # angle_common file(GLOB ANGLE_COMMON_SOURCES "src/common/*.h" "src/common/*.inl" "src/common/*.cpp") list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|_linux|_mac") -add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES} ${NUMERICS_SOURCES}) -target_link_libraries(angle_common PUBLIC numerics) +add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES}) +target_link_libraries(angle_common PUBLIC anglebase) ########## # angle_image_util @@ -60,7 +60,7 @@ target_link_libraries(preprocessor PRIVATE angle_common) # libANGLE file(GLOB LIBANGLE_SOURCES "src/third_party/systeminfo/SystemInfo.cpp" - "src/third_party/murmurhash/MurmurHash3.cpp" + "src/common/third_party/murmurhash/MurmurHash3.cpp" "src/common/event_tracer.cpp" "src/libANGLE/*.cpp" @@ -79,9 +79,9 @@ file(GLOB LIBANGLE_SOURCES "src/libANGLE/renderer/gl/wgl/*.inl" "src/libANGLE/renderer/gl/wgl/*.h" - "src/libANGLE/renderer/vulkan/*.cpp" - "src/libANGLE/renderer/vulkan/*.inl" - "src/libANGLE/renderer/vulkan/*.h" + # "src/libANGLE/renderer/vulkan/*.cpp" + # "src/libANGLE/renderer/vulkan/*.inl" + # "src/libANGLE/renderer/vulkan/*.h" "src/libANGLE/renderer/null/*.cpp" "src/libANGLE/renderer/null/*.inl" @@ -99,7 +99,7 @@ target_compile_definitions(libANGLE PUBLIC -DANGLE_ENABLE_D3D9 -DANGLE_ENABLE_D3D11 -DANGLE_ENABLE_OPENGL - -DANGLE_ENABLE_VULKAN + # -DANGLE_ENABLE_VULKAN -DANGLE_ENABLE_NULL ) target_compile_definitions(libANGLE PRIVATE -DLIBANGLE_IMPLEMENTATION) -- cgit v1.2.3 From 4509e764cc691a0ae097ef512bda2095cf477152 Mon Sep 17 00:00:00 2001 From: bagong Date: Tue, 20 Jun 2017 00:31:34 +0200 Subject: [AUBIO] Add new package --- ports/aubio/CONTROL | 4 + ports/aubio/aubio-5.def | 442 ++++++++++++++++++++++++++++++++++++++ ports/aubio/crt_lib_linkage.patch | 68 ++++++ ports/aubio/portfile.cmake | 106 +++++++++ 4 files changed, 620 insertions(+) create mode 100644 ports/aubio/CONTROL create mode 100644 ports/aubio/aubio-5.def create mode 100644 ports/aubio/crt_lib_linkage.patch create mode 100644 ports/aubio/portfile.cmake diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL new file mode 100644 index 000000000..f7aee6191 --- /dev/null +++ b/ports/aubio/CONTROL @@ -0,0 +1,4 @@ +Source: aubio +Version: 0.46~alpha +Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. +Build-Depends: ffmpeg, libsndfile diff --git a/ports/aubio/aubio-5.def b/ports/aubio/aubio-5.def new file mode 100644 index 000000000..8b3fb9b7d --- /dev/null +++ b/ports/aubio/aubio-5.def @@ -0,0 +1,442 @@ +EXPORTS +aubio_autocorr +aubio_beattracking_checkstate +aubio_beattracking_do +aubio_beattracking_get_bpm +aubio_beattracking_get_confidence +aubio_beattracking_get_period +aubio_beattracking_get_period_s +aubio_bintofreq +aubio_bintomidi +aubio_cleanup +aubio_db_spl +aubio_default_log +aubio_fft_do +aubio_fft_do_complex +aubio_fft_get_imag +aubio_fft_get_norm +aubio_fft_get_phas +aubio_fft_get_real +aubio_fft_get_realimag +aubio_fft_get_spectrum +aubio_fft_rdo +aubio_fft_rdo_complex +aubio_filter_do +aubio_filter_do_filtfilt +aubio_filter_do_outplace +aubio_filter_do_reset +aubio_filter_get_feedback +aubio_filter_get_feedforward +aubio_filter_get_order +aubio_filter_get_samplerate +aubio_filter_set_a_weighting +aubio_filter_set_biquad +aubio_filter_set_c_weighting +aubio_filter_set_samplerate +aubio_filterbank_do +aubio_filterbank_get_coeffs +aubio_filterbank_set_coeffs +aubio_filterbank_set_mel_coeffs_slaney +aubio_filterbank_set_triangle_bands +aubio_freqtobin +aubio_freqtomidi +aubio_hist_do +aubio_hist_do_notnull +aubio_hist_dyn_notnull +aubio_hist_mean +aubio_hist_weight +aubio_io_validate_channels +aubio_io_validate_samplerate +aubio_is_power_of_two +aubio_level_detection +aubio_level_lin +aubio_log +aubio_log_reset +aubio_log_set_function +aubio_log_set_level_function +aubio_mfcc_do +aubio_miditobin +aubio_miditofreq +aubio_next_power_of_two +aubio_notes_do +aubio_notes_get_minioi_ms +aubio_notes_get_silence +aubio_notes_set_minioi_ms +aubio_notes_set_silence +aubio_onset_do +aubio_onset_get_awhitening +aubio_onset_get_compression +aubio_onset_get_delay +aubio_onset_get_delay_ms +aubio_onset_get_delay_s +aubio_onset_get_descriptor +aubio_onset_get_last +aubio_onset_get_last_ms +aubio_onset_get_last_s +aubio_onset_get_minioi +aubio_onset_get_minioi_ms +aubio_onset_get_minioi_s +aubio_onset_get_silence +aubio_onset_get_threshold +aubio_onset_get_thresholded_descriptor +aubio_onset_reset +aubio_onset_set_awhitening +aubio_onset_set_compression +aubio_onset_set_default_parameters +aubio_onset_set_delay +aubio_onset_set_delay_ms +aubio_onset_set_delay_s +aubio_onset_set_minioi +aubio_onset_set_minioi_ms +aubio_onset_set_minioi_s +aubio_onset_set_silence +aubio_onset_set_threshold +aubio_ooura_cdft +aubio_ooura_ddct +aubio_ooura_ddst +aubio_ooura_dfct +aubio_ooura_dfst +aubio_ooura_rdft +aubio_parameter_get_current_value +aubio_parameter_get_max_value +aubio_parameter_get_min_value +aubio_parameter_get_next_value +aubio_parameter_get_steps +aubio_parameter_set_current_value +aubio_parameter_set_max_value +aubio_parameter_set_min_value +aubio_parameter_set_steps +aubio_parameter_set_target_value +aubio_peakpicker_do +aubio_peakpicker_get_threshold +aubio_peakpicker_get_thresholded_input +aubio_peakpicker_get_thresholdfn +aubio_peakpicker_set_threshold +aubio_peakpicker_set_thresholdfn +aubio_pitch_cands +aubio_pitch_do +aubio_pitch_get_confidence +aubio_pitch_get_silence +aubio_pitch_get_tolerance +aubio_pitch_set_silence +aubio_pitch_set_tolerance +aubio_pitch_set_unit +aubio_pitch_slideblock +aubio_pitchfcomb_do +aubio_pitchmcomb_combdet +aubio_pitchmcomb_do +aubio_pitchmcomb_get_root_peak +aubio_pitchmcomb_quadpick +aubio_pitchmcomb_sort_cand_ene +aubio_pitchmcomb_sort_cand_freq +aubio_pitchmcomb_sort_peak +aubio_pitchmcomb_spectral_pp +aubio_pitchschmitt_do +aubio_pitchspecacf_do +aubio_pitchspecacf_get_confidence +aubio_pitchspecacf_get_tolerance +aubio_pitchspecacf_set_tolerance +aubio_pitchyin_diff +aubio_pitchyin_do +aubio_pitchyin_get_confidence +aubio_pitchyin_get_tolerance +aubio_pitchyin_getcum +aubio_pitchyin_getpitch +aubio_pitchyin_set_tolerance +aubio_pitchyinfft_do +aubio_pitchyinfft_get_confidence +aubio_pitchyinfft_get_tolerance +aubio_pitchyinfft_set_tolerance +aubio_pvoc_do +aubio_pvoc_rdo +aubio_quadfrac +aubio_resampler_do +aubio_sampler_do +aubio_sampler_do_multi +aubio_sampler_get_playing +aubio_sampler_load +aubio_sampler_play +aubio_sampler_set_playing +aubio_sampler_stop +aubio_scale_do +aubio_scale_set_limits +aubio_schmittS16LE +aubio_silence_detection +aubio_sink_close +aubio_sink_do +aubio_sink_do_multi +aubio_sink_get_channels +aubio_sink_get_samplerate +aubio_sink_preset_channels +aubio_sink_preset_samplerate +aubio_sink_sndfile_close +aubio_sink_sndfile_do +aubio_sink_sndfile_do_multi +aubio_sink_sndfile_get_channels +aubio_sink_sndfile_get_samplerate +aubio_sink_sndfile_open +aubio_sink_sndfile_preset_channels +aubio_sink_sndfile_preset_samplerate +aubio_sink_wavwrite_close +aubio_sink_wavwrite_do +aubio_sink_wavwrite_do_multi +aubio_sink_wavwrite_get_channels +aubio_sink_wavwrite_get_samplerate +aubio_sink_wavwrite_open +aubio_sink_wavwrite_preset_channels +aubio_sink_wavwrite_preset_samplerate +aubio_source_avcodec_close +aubio_source_avcodec_do +aubio_source_avcodec_do_multi +aubio_source_avcodec_get_channels +aubio_source_avcodec_get_duration +aubio_source_avcodec_get_samplerate +aubio_source_avcodec_has_network_url +aubio_source_avcodec_readframe +aubio_source_avcodec_reset_resampler +aubio_source_avcodec_seek +aubio_source_close +aubio_source_do +aubio_source_do_multi +aubio_source_get_channels +aubio_source_get_duration +aubio_source_get_samplerate +aubio_source_seek +aubio_source_sndfile_close +aubio_source_sndfile_do +aubio_source_sndfile_do_multi +aubio_source_sndfile_get_channels +aubio_source_sndfile_get_duration +aubio_source_sndfile_get_samplerate +aubio_source_sndfile_seek +aubio_source_wavread_close +aubio_source_wavread_do +aubio_source_wavread_do_multi +aubio_source_wavread_get_channels +aubio_source_wavread_get_duration +aubio_source_wavread_get_samplerate +aubio_source_wavread_readframe +aubio_source_wavread_seek +aubio_specdesc_centroid +aubio_specdesc_complex +aubio_specdesc_decrease +aubio_specdesc_do +aubio_specdesc_energy +aubio_specdesc_hfc +aubio_specdesc_kl +aubio_specdesc_kurtosis +aubio_specdesc_mkl +aubio_specdesc_phase +aubio_specdesc_rolloff +aubio_specdesc_skewness +aubio_specdesc_slope +aubio_specdesc_specdiff +aubio_specdesc_specflux +aubio_specdesc_spread +aubio_specdesc_wphase +aubio_spectral_whitening_do +aubio_spectral_whitening_get_floor +aubio_spectral_whitening_get_relax_time +aubio_spectral_whitening_reset +aubio_spectral_whitening_set_floor +aubio_spectral_whitening_set_relax_time +aubio_tempo_do +aubio_tempo_get_bpm +aubio_tempo_get_confidence +aubio_tempo_get_delay +aubio_tempo_get_delay_ms +aubio_tempo_get_delay_s +aubio_tempo_get_last +aubio_tempo_get_last_ms +aubio_tempo_get_last_s +aubio_tempo_get_last_tatum +aubio_tempo_get_period +aubio_tempo_get_period_s +aubio_tempo_get_silence +aubio_tempo_get_threshold +aubio_tempo_set_delay +aubio_tempo_set_delay_ms +aubio_tempo_set_delay_s +aubio_tempo_set_silence +aubio_tempo_set_tatum_signature +aubio_tempo_set_threshold +aubio_tempo_was_tatum +aubio_tss_do +aubio_tss_set_alpha +aubio_tss_set_beta +aubio_tss_set_threshold +aubio_unwrap2pi +aubio_wavetable_do +aubio_wavetable_do_multi +aubio_wavetable_get_amp +aubio_wavetable_get_freq +aubio_wavetable_get_playing +aubio_wavetable_play +aubio_wavetable_set_amp +aubio_wavetable_set_freq +aubio_wavetable_set_playing +aubio_wavetable_stop +aubio_zero_crossing_rate +cvec_centroid +cvec_copy +cvec_logmag +cvec_mean +cvec_moment +cvec_norm_get_data +cvec_norm_get_sample +cvec_norm_ones +cvec_norm_set_all +cvec_norm_set_sample +cvec_norm_zeros +cvec_phas_get_data +cvec_phas_get_sample +cvec_phas_ones +cvec_phas_set_all +cvec_phas_set_sample +cvec_phas_zeros +cvec_print +cvec_sum +cvec_zeros +del_aubio_beattracking +del_aubio_fft +del_aubio_filter +del_aubio_filterbank +del_aubio_hist +del_aubio_mfcc +del_aubio_notes +del_aubio_onset +del_aubio_parameter +del_aubio_peakpicker +del_aubio_pitch +del_aubio_pitchfcomb +del_aubio_pitchmcomb +del_aubio_pitchschmitt +del_aubio_pitchspecacf +del_aubio_pitchyin +del_aubio_pitchyinfft +del_aubio_pvoc +del_aubio_resampler +del_aubio_sampler +del_aubio_scale +del_aubio_sink +del_aubio_sink_sndfile +del_aubio_sink_wavwrite +del_aubio_source +del_aubio_source_avcodec +del_aubio_source_sndfile +del_aubio_source_wavread +del_aubio_specdesc +del_aubio_spectral_whitening +del_aubio_tempo +del_aubio_tss +del_aubio_wavetable +del_cvec +del_fmat +del_fvec +del_lvec +fmat_copy +fmat_get_channel +fmat_get_channel_data +fmat_get_data +fmat_get_sample +fmat_ones +fmat_print +fmat_rev +fmat_set +fmat_set_sample +fmat_vecmul +fmat_weight +fmat_zeros +fvec_abs +fvec_adapt_thres +fvec_add +fvec_alpha_norm +fvec_alpha_normalise +fvec_ceil +fvec_clamp +fvec_copy +fvec_cos +fvec_exp +fvec_floor +fvec_get_data +fvec_get_sample +fvec_gettimesig +fvec_ishift +fvec_local_hfc +fvec_log +fvec_log10 +fvec_max +fvec_max_elem +fvec_mean +fvec_median +fvec_min +fvec_min_elem +fvec_min_removal +fvec_moving_thres +fvec_ones +fvec_peakpick +fvec_pow +fvec_print +fvec_push +fvec_quadratic_peak_mag +fvec_quadratic_peak_pos +fvec_rev +fvec_round +fvec_set_all +fvec_set_sample +fvec_set_window +fvec_shift +fvec_sin +fvec_sqrt +fvec_sum +fvec_weight +fvec_weighted_copy +fvec_zeros +lvec_get_data +lvec_get_sample +lvec_ones +lvec_print +lvec_set_all +lvec_set_sample +lvec_zeros +new_aubio_beattracking +new_aubio_fft +new_aubio_filter +new_aubio_filter_a_weighting +new_aubio_filter_biquad +new_aubio_filter_c_weighting +new_aubio_filterbank +new_aubio_hist +new_aubio_mfcc +new_aubio_notes +new_aubio_onset +new_aubio_parameter +new_aubio_peakpicker +new_aubio_pitch +new_aubio_pitchfcomb +new_aubio_pitchmcomb +new_aubio_pitchschmitt +new_aubio_pitchspecacf +new_aubio_pitchyin +new_aubio_pitchyinfft +new_aubio_pvoc +new_aubio_resampler +new_aubio_sampler +new_aubio_scale +new_aubio_sink +new_aubio_sink_sndfile +new_aubio_sink_wavwrite +new_aubio_source +new_aubio_source_avcodec +new_aubio_source_sndfile +new_aubio_source_wavread +new_aubio_specdesc +new_aubio_spectral_whitening +new_aubio_tempo +new_aubio_tss +new_aubio_wavetable +new_aubio_window +new_cvec +new_fmat +new_fvec +new_lvec diff --git a/ports/aubio/crt_lib_linkage.patch b/ports/aubio/crt_lib_linkage.patch new file mode 100644 index 000000000..36a8a3640 --- /dev/null +++ b/ports/aubio/crt_lib_linkage.patch @@ -0,0 +1,68 @@ +diff --git a/src/wscript_build b/src/wscript_build +index 0a7d72a..bf84227 100644 +--- a/src/wscript_build ++++ b/src/wscript_build +@@ -24,7 +24,12 @@ ctx(features = 'c', + if ctx.env['DEST_OS'] in ['ios', 'iosimulator']: + build_features = ['cstlib', 'cshlib'] + elif ctx.env['DEST_OS'] in ['win32', 'win64']: +- build_features = ['cstlib', 'cshlib'] ++ if ctx.options.library_linkage == "static": ++ build_features = ['cstlib'] ++ elif ctx.options.library_linkage == "dynamic": ++ build_features = ['cshlib'] ++ else: ++ build_features = ['cstlib', 'cshlib'] + elif ctx.env['DEST_OS'] in ['emscripten']: + build_features = ['cstlib'] + elif '--static' in ctx.env['LDFLAGS'] or '--static' in ctx.env['LINKFLAGS']: +diff --git a/wscript b/wscript +index 6363f1e..e0d57a4 100644 +--- a/wscript ++++ b/wscript +@@ -44,6 +44,16 @@ def options(ctx): + dest = 'build_type', + help = 'whether to compile with (--build-type=release) or without (--build-type=debug) '\ + ' compiler opimizations [default: release]') ++ ctx.add_option('--crt-linkage', action = 'store', ++ default = "dynamic", ++ choices = ('static', 'dynamic'), ++ dest = 'crt_linkage', ++ help = 'whether to compile with static CRT linkage (--crt-linkage=static) or the default dynamic (--crt-linkage=dynamic)') ++ ctx.add_option('--library-linkage', action = 'store', ++ default = "both", ++ choices = ('dynamic', 'static', 'both'), ++ dest = 'library_linkage', ++ help = 'whether to compile a dynamic (shared) (--library-linkage=dynamic) or static library (--library-linkage=static) ("both" is broken for msvc)') + add_option_enable_disable(ctx, 'fftw3f', default = False, + help_str = 'compile with fftw3f instead of ooura (recommended)', + help_disable_str = 'do not compile with fftw3f') +@@ -139,16 +149,25 @@ def configure(ctx): + else: + # enable debug symbols + ctx.env.CFLAGS += ['/Z7', '/FS'] +- ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO'] ++ if ctx.options.library_linkage == "dynamic": ++ ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO', '/DEF:..\\aubio-5.def'] ++ else: ++ ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO'] + # configure warnings + ctx.env.CFLAGS += ['/W4', '/D_CRT_SECURE_NO_WARNINGS'] + # set optimization level and runtime libs + if (ctx.options.build_type == "release"): + ctx.env.CFLAGS += ['/Ox'] +- ctx.env.CFLAGS += ['/MD'] ++ if (ctx.options.crt_linkage == "static"): ++ ctx.env.CFLAGS += ['/MT'] ++ else: ++ ctx.env.CFLAGS += ['/MD'] + else: + assert(ctx.options.build_type == "debug") +- ctx.env.CFLAGS += ['/MDd'] ++ if (ctx.options.crt_linkage == "static"): ++ ctx.env.CFLAGS += ['/MTd'] ++ else: ++ ctx.env.CFLAGS += ['/MDd'] + + ctx.check_cc(lib='m', uselib_store='M', mandatory=False) + diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake new file mode 100644 index 000000000..714ec3ae8 --- /dev/null +++ b/ports/aubio/portfile.cmake @@ -0,0 +1,106 @@ +# NOTES +# - if you get a codepage/unicode related error (non-critical) during configuration, +# ignore it or, try switching the console codepage to windows english (`chcp 1252`) +# - the build breaks with "missing pthreads" if --enable-fftw3(f) is added (if fftw3 +# is not added, the embedded ooura fft lib is used) +# - the port uses ffmpeg and libsndfile as dependencies and also depends on possibilty to acquire waf and pkg-config(-lite) in vcpkg. +# - crt-linkage is handled here, not in the generic waf-configure function because it is controlled via a patch to the aubio wscript +# Waf seems to have no generic way to switch crt-linkage. +# - The static build works, but: vcpkg's static ffmpegs build is fake ;), therefore it is still required to make the ffmpeg dlls +# available in order to run exectables with statically linked aubio. + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aubio-3c230fae309e9ea3298783368dd71bae6172359a) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/aubio/aubio/archive/3c230fae309e9ea3298783368dd71bae6172359a.zip" + FILENAME "aubio-0.4.6-3c230f.zip" + SHA512 081fe59612f0b1860f465208739b1377869c64b91cecf4a6f6fbdea19204b801c650ff956b34be5988ef1905f3546d3c55846037487e0b34b014f1adbb68629c +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Pkg-config is equired by aubio to detect ffmpeg and libsndfile +vcpkg_find_acquire_program(PKG-CONFIG) + +# Waf depends on python, so this also installs python3 +vcpkg_acquire_waf() + +# Configure pkg-config dir +get_filename_component(PKG_CONFIG_DIR ${PKG-CONFIG} DIRECTORY) +# Add pkg-config and vcpkg-bin-dir to environment search path +set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin;${PKG_CONFIG_DIR};$ENV{PATH}") +# Set pkg-config search-path +set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig") + +# Add waf executable if missing +if(NOT EXISTS "${SOURCE_PATH}/waf") + file(COPY "${WAF_DIR}/waf" DESTINATION "${SOURCE_PATH}") +endif() + +# Add arguments for crt linkage and library linkage +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/crt_lib_linkage.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/aubio-5.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_waf( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --library-linkage=${VCPKG_LIBRARY_LINKAGE} + --crt-linkage=${VCPKG_CRT_LINKAGE} + --enable-sndfile + --enable-avcodec + --disable-docs + --verbose + # OPTIONS_DEBUG + # OPTIONS_RELEASE + OPTIONS_BUILD + --library-linkage=${VCPKG_LIBRARY_LINKAGE} + --verbose + --notests + # OPTIONS_BUILD_RELEASE + # OPTIONS_BUILD_DEBUG + # TARGETS +) + +# Postinstall cleanup debug +message(STATUS "Cleaning up build") +# Remove unused files +# Debug executable and include folder +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(GLOB DEBUG_EXECS ${CURRENT_PACKAGES_DIR}/debug/bin/*) +file(REMOVE ${DEBUG_EXECS}) +# In release branch move execs to tools +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/aubio) +file(GLOB RELEASE_EXECS ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB RELEASE_EXE_SYMBOLS ${CURRENT_PACKAGES_DIR}/bin/*.pdb) +FILE(COPY ${RELEASE_EXECS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/aubio) +FILE(REMOVE ${RELEASE_EXECS} ${RELEASE_EXE_SYMBOLS}) + +# Prepare (re-)moving dynamic libs +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll ${CURRENT_PACKAGES_DIR}/debug/lib/*.pdb) +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll ${CURRENT_PACKAGES_DIR}/lib/*.pdb) + +if(${VCPKG_LIBRARY_LINKAGE} MATCHES "dynamic") + # Move dlls + file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${DEBUG_DLLS} ${RELEASE_DLLS}) +elseif(${VCPKG_LIBRARY_LINKAGE} MATCHES "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright and credentials +file(COPY + ${SOURCE_PATH}/COPYING + ${SOURCE_PATH}/AUTHORS + ${SOURCE_PATH}/ChangeLog + ${SOURCE_PATH}/README.md + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/aubio) + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/aubio/COPYING ${CURRENT_PACKAGES_DIR}/share/aubio/copyright) + +# TODO +# Add python script for dynamic symbols export in dynamic linking -- cgit v1.2.3 From a2cee615e4c444d5ce84fac618bfb2b18cd6985f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Jun 2017 02:52:02 -0700 Subject: [aubio] CMake buildsystem replacement --- ports/aubio/CMakeLists.txt | 54 +++++++++++++++++++++++++++ ports/aubio/portfile.cmake | 91 ++++------------------------------------------ 2 files changed, 61 insertions(+), 84 deletions(-) create mode 100644 ports/aubio/CMakeLists.txt diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt new file mode 100644 index 000000000..df2c598f9 --- /dev/null +++ b/ports/aubio/CMakeLists.txt @@ -0,0 +1,54 @@ +cmake_minimum_required(VERSION 3.8) +project(aubio C) + +add_definitions( + -DHAVE_STDLIB_H=1 + -DHAVE_STDIO_H=1 + -DHAVE_MATH_H=1 + -DHAVE_STRING_H=1 + -DHAVE_LIMITS_H=1 + -DHAVE_STDARG_H=1 + -DHAVE_C99_VARARGS_MACROS=1 + + -DHAVE_SNDFILE=1 + -DHAVE_WAVWRITE=1 + -DHAVE_WAVREAD=1 + -DHAVE_LIBAV=1 + -DHAVE_SWRESAMPLE=1 +) + +find_path(LIBSNDFILE_H sndfile.h) +find_library(LIBSNDFILE_LIB libsndfile-1) +find_library(AVCODEC_LIB avcodec) +find_library(AVUTIL_LIB avutil) +find_library(AVDEVICE_LIB avdevice) +find_library(AVFILTER_LIB avfilter) +find_library(AVFORMAT_LIB avformat) +find_library(SWRESAMPLE_LIB swresample) + +include_directories(src ${LIBSNDFILE_H}) +link_libraries(${LIBSNDFILE_LIB} ${AVCODEC_LIB} ${AVUTIL_LIB} ${AVDEVICE_LIB} ${AVFILTER_LIB} ${AVFORMAT_LIB} ${SWRESAMPLE_LIB} ws2_32.lib) + +file(GLOB_RECURSE SOURCES src/*.c aubio-5.def) +set_source_files_properties(src/io/sink_wavwrite.c PROPERTIES COMPILE_FLAGS /FIWinsock2.h) +add_library(aubio ${SOURCES}) + +set(CMAKE_DEBUG_POSTFIX d) + +install( + TARGETS aubio + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY src/ + DESTINATION include/aubio + FILES_MATCHING + PATTERN "*.h" + PATTERN "*_priv.h" EXCLUDE + PATTERN "config.h" EXCLUDE + ) +endif() diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake index 714ec3ae8..e8a7d4551 100644 --- a/ports/aubio/portfile.cmake +++ b/ports/aubio/portfile.cmake @@ -1,14 +1,3 @@ -# NOTES -# - if you get a codepage/unicode related error (non-critical) during configuration, -# ignore it or, try switching the console codepage to windows english (`chcp 1252`) -# - the build breaks with "missing pthreads" if --enable-fftw3(f) is added (if fftw3 -# is not added, the embedded ooura fft lib is used) -# - the port uses ffmpeg and libsndfile as dependencies and also depends on possibilty to acquire waf and pkg-config(-lite) in vcpkg. -# - crt-linkage is handled here, not in the generic waf-configure function because it is controlled via a patch to the aubio wscript -# Waf seems to have no generic way to switch crt-linkage. -# - The static build works, but: vcpkg's static ffmpegs build is fake ;), therefore it is still required to make the ffmpeg dlls -# available in order to run exectables with statically linked aubio. - include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aubio-3c230fae309e9ea3298783368dd71bae6172359a) vcpkg_download_distfile(ARCHIVE @@ -18,78 +7,14 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -# Pkg-config is equired by aubio to detect ffmpeg and libsndfile -vcpkg_find_acquire_program(PKG-CONFIG) - -# Waf depends on python, so this also installs python3 -vcpkg_acquire_waf() - -# Configure pkg-config dir -get_filename_component(PKG_CONFIG_DIR ${PKG-CONFIG} DIRECTORY) -# Add pkg-config and vcpkg-bin-dir to environment search path -set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin;${PKG_CONFIG_DIR};$ENV{PATH}") -# Set pkg-config search-path -set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig") +file(COPY ${CMAKE_CURRENT_LIST_DIR}/aubio-5.def ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -# Add waf executable if missing -if(NOT EXISTS "${SOURCE_PATH}/waf") - file(COPY "${WAF_DIR}/waf" DESTINATION "${SOURCE_PATH}") -endif() - -# Add arguments for crt linkage and library linkage -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/crt_lib_linkage.patch" +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 ) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/aubio-5.def DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_waf( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - --library-linkage=${VCPKG_LIBRARY_LINKAGE} - --crt-linkage=${VCPKG_CRT_LINKAGE} - --enable-sndfile - --enable-avcodec - --disable-docs - --verbose - # OPTIONS_DEBUG - # OPTIONS_RELEASE - OPTIONS_BUILD - --library-linkage=${VCPKG_LIBRARY_LINKAGE} - --verbose - --notests - # OPTIONS_BUILD_RELEASE - # OPTIONS_BUILD_DEBUG - # TARGETS -) - -# Postinstall cleanup debug -message(STATUS "Cleaning up build") -# Remove unused files -# Debug executable and include folder -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(GLOB DEBUG_EXECS ${CURRENT_PACKAGES_DIR}/debug/bin/*) -file(REMOVE ${DEBUG_EXECS}) -# In release branch move execs to tools -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/aubio) -file(GLOB RELEASE_EXECS ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB RELEASE_EXE_SYMBOLS ${CURRENT_PACKAGES_DIR}/bin/*.pdb) -FILE(COPY ${RELEASE_EXECS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/aubio) -FILE(REMOVE ${RELEASE_EXECS} ${RELEASE_EXE_SYMBOLS}) - -# Prepare (re-)moving dynamic libs -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll ${CURRENT_PACKAGES_DIR}/debug/lib/*.pdb) -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll ${CURRENT_PACKAGES_DIR}/lib/*.pdb) - -if(${VCPKG_LIBRARY_LINKAGE} MATCHES "dynamic") - # Move dlls - file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${DEBUG_DLLS} ${RELEASE_DLLS}) -elseif(${VCPKG_LIBRARY_LINKAGE} MATCHES "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() +vcpkg_install_cmake() # Handle copyright and credentials file(COPY @@ -100,7 +25,5 @@ file(COPY DESTINATION ${CURRENT_PACKAGES_DIR}/share/aubio) +vcpkg_copy_pdbs() file(RENAME ${CURRENT_PACKAGES_DIR}/share/aubio/COPYING ${CURRENT_PACKAGES_DIR}/share/aubio/copyright) - -# TODO -# Add python script for dynamic symbols export in dynamic linking -- cgit v1.2.3 From ced194257dd35c5ccd38f3ed19a3cafdaadb5393 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Jun 2017 03:06:29 -0700 Subject: [aubio] Fix static build --- ports/aubio/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt index df2c598f9..d1124b46c 100644 --- a/ports/aubio/CMakeLists.txt +++ b/ports/aubio/CMakeLists.txt @@ -18,7 +18,7 @@ add_definitions( ) find_path(LIBSNDFILE_H sndfile.h) -find_library(LIBSNDFILE_LIB libsndfile-1) +find_library(LIBSNDFILE_LIB NAMES libsndfile-1 libsndfile) find_library(AVCODEC_LIB avcodec) find_library(AVUTIL_LIB avutil) find_library(AVDEVICE_LIB avdevice) -- cgit v1.2.3 From b7efd0e07d1a397e701f038569204d6a2879ed67 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Jun 2017 03:16:23 -0700 Subject: [aubio] Use CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS --- ports/aubio/CMakeLists.txt | 4 +- ports/aubio/aubio-5.def | 442 -------------------------------------- ports/aubio/crt_lib_linkage.patch | 68 ------ ports/aubio/portfile.cmake | 14 +- 4 files changed, 10 insertions(+), 518 deletions(-) delete mode 100644 ports/aubio/aubio-5.def delete mode 100644 ports/aubio/crt_lib_linkage.patch diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt index d1124b46c..6577e075c 100644 --- a/ports/aubio/CMakeLists.txt +++ b/ports/aubio/CMakeLists.txt @@ -17,6 +17,8 @@ add_definitions( -DHAVE_SWRESAMPLE=1 ) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + find_path(LIBSNDFILE_H sndfile.h) find_library(LIBSNDFILE_LIB NAMES libsndfile-1 libsndfile) find_library(AVCODEC_LIB avcodec) @@ -29,7 +31,7 @@ find_library(SWRESAMPLE_LIB swresample) include_directories(src ${LIBSNDFILE_H}) link_libraries(${LIBSNDFILE_LIB} ${AVCODEC_LIB} ${AVUTIL_LIB} ${AVDEVICE_LIB} ${AVFILTER_LIB} ${AVFORMAT_LIB} ${SWRESAMPLE_LIB} ws2_32.lib) -file(GLOB_RECURSE SOURCES src/*.c aubio-5.def) +file(GLOB_RECURSE SOURCES src/*.c) set_source_files_properties(src/io/sink_wavwrite.c PROPERTIES COMPILE_FLAGS /FIWinsock2.h) add_library(aubio ${SOURCES}) diff --git a/ports/aubio/aubio-5.def b/ports/aubio/aubio-5.def deleted file mode 100644 index 8b3fb9b7d..000000000 --- a/ports/aubio/aubio-5.def +++ /dev/null @@ -1,442 +0,0 @@ -EXPORTS -aubio_autocorr -aubio_beattracking_checkstate -aubio_beattracking_do -aubio_beattracking_get_bpm -aubio_beattracking_get_confidence -aubio_beattracking_get_period -aubio_beattracking_get_period_s -aubio_bintofreq -aubio_bintomidi -aubio_cleanup -aubio_db_spl -aubio_default_log -aubio_fft_do -aubio_fft_do_complex -aubio_fft_get_imag -aubio_fft_get_norm -aubio_fft_get_phas -aubio_fft_get_real -aubio_fft_get_realimag -aubio_fft_get_spectrum -aubio_fft_rdo -aubio_fft_rdo_complex -aubio_filter_do -aubio_filter_do_filtfilt -aubio_filter_do_outplace -aubio_filter_do_reset -aubio_filter_get_feedback -aubio_filter_get_feedforward -aubio_filter_get_order -aubio_filter_get_samplerate -aubio_filter_set_a_weighting -aubio_filter_set_biquad -aubio_filter_set_c_weighting -aubio_filter_set_samplerate -aubio_filterbank_do -aubio_filterbank_get_coeffs -aubio_filterbank_set_coeffs -aubio_filterbank_set_mel_coeffs_slaney -aubio_filterbank_set_triangle_bands -aubio_freqtobin -aubio_freqtomidi -aubio_hist_do -aubio_hist_do_notnull -aubio_hist_dyn_notnull -aubio_hist_mean -aubio_hist_weight -aubio_io_validate_channels -aubio_io_validate_samplerate -aubio_is_power_of_two -aubio_level_detection -aubio_level_lin -aubio_log -aubio_log_reset -aubio_log_set_function -aubio_log_set_level_function -aubio_mfcc_do -aubio_miditobin -aubio_miditofreq -aubio_next_power_of_two -aubio_notes_do -aubio_notes_get_minioi_ms -aubio_notes_get_silence -aubio_notes_set_minioi_ms -aubio_notes_set_silence -aubio_onset_do -aubio_onset_get_awhitening -aubio_onset_get_compression -aubio_onset_get_delay -aubio_onset_get_delay_ms -aubio_onset_get_delay_s -aubio_onset_get_descriptor -aubio_onset_get_last -aubio_onset_get_last_ms -aubio_onset_get_last_s -aubio_onset_get_minioi -aubio_onset_get_minioi_ms -aubio_onset_get_minioi_s -aubio_onset_get_silence -aubio_onset_get_threshold -aubio_onset_get_thresholded_descriptor -aubio_onset_reset -aubio_onset_set_awhitening -aubio_onset_set_compression -aubio_onset_set_default_parameters -aubio_onset_set_delay -aubio_onset_set_delay_ms -aubio_onset_set_delay_s -aubio_onset_set_minioi -aubio_onset_set_minioi_ms -aubio_onset_set_minioi_s -aubio_onset_set_silence -aubio_onset_set_threshold -aubio_ooura_cdft -aubio_ooura_ddct -aubio_ooura_ddst -aubio_ooura_dfct -aubio_ooura_dfst -aubio_ooura_rdft -aubio_parameter_get_current_value -aubio_parameter_get_max_value -aubio_parameter_get_min_value -aubio_parameter_get_next_value -aubio_parameter_get_steps -aubio_parameter_set_current_value -aubio_parameter_set_max_value -aubio_parameter_set_min_value -aubio_parameter_set_steps -aubio_parameter_set_target_value -aubio_peakpicker_do -aubio_peakpicker_get_threshold -aubio_peakpicker_get_thresholded_input -aubio_peakpicker_get_thresholdfn -aubio_peakpicker_set_threshold -aubio_peakpicker_set_thresholdfn -aubio_pitch_cands -aubio_pitch_do -aubio_pitch_get_confidence -aubio_pitch_get_silence -aubio_pitch_get_tolerance -aubio_pitch_set_silence -aubio_pitch_set_tolerance -aubio_pitch_set_unit -aubio_pitch_slideblock -aubio_pitchfcomb_do -aubio_pitchmcomb_combdet -aubio_pitchmcomb_do -aubio_pitchmcomb_get_root_peak -aubio_pitchmcomb_quadpick -aubio_pitchmcomb_sort_cand_ene -aubio_pitchmcomb_sort_cand_freq -aubio_pitchmcomb_sort_peak -aubio_pitchmcomb_spectral_pp -aubio_pitchschmitt_do -aubio_pitchspecacf_do -aubio_pitchspecacf_get_confidence -aubio_pitchspecacf_get_tolerance -aubio_pitchspecacf_set_tolerance -aubio_pitchyin_diff -aubio_pitchyin_do -aubio_pitchyin_get_confidence -aubio_pitchyin_get_tolerance -aubio_pitchyin_getcum -aubio_pitchyin_getpitch -aubio_pitchyin_set_tolerance -aubio_pitchyinfft_do -aubio_pitchyinfft_get_confidence -aubio_pitchyinfft_get_tolerance -aubio_pitchyinfft_set_tolerance -aubio_pvoc_do -aubio_pvoc_rdo -aubio_quadfrac -aubio_resampler_do -aubio_sampler_do -aubio_sampler_do_multi -aubio_sampler_get_playing -aubio_sampler_load -aubio_sampler_play -aubio_sampler_set_playing -aubio_sampler_stop -aubio_scale_do -aubio_scale_set_limits -aubio_schmittS16LE -aubio_silence_detection -aubio_sink_close -aubio_sink_do -aubio_sink_do_multi -aubio_sink_get_channels -aubio_sink_get_samplerate -aubio_sink_preset_channels -aubio_sink_preset_samplerate -aubio_sink_sndfile_close -aubio_sink_sndfile_do -aubio_sink_sndfile_do_multi -aubio_sink_sndfile_get_channels -aubio_sink_sndfile_get_samplerate -aubio_sink_sndfile_open -aubio_sink_sndfile_preset_channels -aubio_sink_sndfile_preset_samplerate -aubio_sink_wavwrite_close -aubio_sink_wavwrite_do -aubio_sink_wavwrite_do_multi -aubio_sink_wavwrite_get_channels -aubio_sink_wavwrite_get_samplerate -aubio_sink_wavwrite_open -aubio_sink_wavwrite_preset_channels -aubio_sink_wavwrite_preset_samplerate -aubio_source_avcodec_close -aubio_source_avcodec_do -aubio_source_avcodec_do_multi -aubio_source_avcodec_get_channels -aubio_source_avcodec_get_duration -aubio_source_avcodec_get_samplerate -aubio_source_avcodec_has_network_url -aubio_source_avcodec_readframe -aubio_source_avcodec_reset_resampler -aubio_source_avcodec_seek -aubio_source_close -aubio_source_do -aubio_source_do_multi -aubio_source_get_channels -aubio_source_get_duration -aubio_source_get_samplerate -aubio_source_seek -aubio_source_sndfile_close -aubio_source_sndfile_do -aubio_source_sndfile_do_multi -aubio_source_sndfile_get_channels -aubio_source_sndfile_get_duration -aubio_source_sndfile_get_samplerate -aubio_source_sndfile_seek -aubio_source_wavread_close -aubio_source_wavread_do -aubio_source_wavread_do_multi -aubio_source_wavread_get_channels -aubio_source_wavread_get_duration -aubio_source_wavread_get_samplerate -aubio_source_wavread_readframe -aubio_source_wavread_seek -aubio_specdesc_centroid -aubio_specdesc_complex -aubio_specdesc_decrease -aubio_specdesc_do -aubio_specdesc_energy -aubio_specdesc_hfc -aubio_specdesc_kl -aubio_specdesc_kurtosis -aubio_specdesc_mkl -aubio_specdesc_phase -aubio_specdesc_rolloff -aubio_specdesc_skewness -aubio_specdesc_slope -aubio_specdesc_specdiff -aubio_specdesc_specflux -aubio_specdesc_spread -aubio_specdesc_wphase -aubio_spectral_whitening_do -aubio_spectral_whitening_get_floor -aubio_spectral_whitening_get_relax_time -aubio_spectral_whitening_reset -aubio_spectral_whitening_set_floor -aubio_spectral_whitening_set_relax_time -aubio_tempo_do -aubio_tempo_get_bpm -aubio_tempo_get_confidence -aubio_tempo_get_delay -aubio_tempo_get_delay_ms -aubio_tempo_get_delay_s -aubio_tempo_get_last -aubio_tempo_get_last_ms -aubio_tempo_get_last_s -aubio_tempo_get_last_tatum -aubio_tempo_get_period -aubio_tempo_get_period_s -aubio_tempo_get_silence -aubio_tempo_get_threshold -aubio_tempo_set_delay -aubio_tempo_set_delay_ms -aubio_tempo_set_delay_s -aubio_tempo_set_silence -aubio_tempo_set_tatum_signature -aubio_tempo_set_threshold -aubio_tempo_was_tatum -aubio_tss_do -aubio_tss_set_alpha -aubio_tss_set_beta -aubio_tss_set_threshold -aubio_unwrap2pi -aubio_wavetable_do -aubio_wavetable_do_multi -aubio_wavetable_get_amp -aubio_wavetable_get_freq -aubio_wavetable_get_playing -aubio_wavetable_play -aubio_wavetable_set_amp -aubio_wavetable_set_freq -aubio_wavetable_set_playing -aubio_wavetable_stop -aubio_zero_crossing_rate -cvec_centroid -cvec_copy -cvec_logmag -cvec_mean -cvec_moment -cvec_norm_get_data -cvec_norm_get_sample -cvec_norm_ones -cvec_norm_set_all -cvec_norm_set_sample -cvec_norm_zeros -cvec_phas_get_data -cvec_phas_get_sample -cvec_phas_ones -cvec_phas_set_all -cvec_phas_set_sample -cvec_phas_zeros -cvec_print -cvec_sum -cvec_zeros -del_aubio_beattracking -del_aubio_fft -del_aubio_filter -del_aubio_filterbank -del_aubio_hist -del_aubio_mfcc -del_aubio_notes -del_aubio_onset -del_aubio_parameter -del_aubio_peakpicker -del_aubio_pitch -del_aubio_pitchfcomb -del_aubio_pitchmcomb -del_aubio_pitchschmitt -del_aubio_pitchspecacf -del_aubio_pitchyin -del_aubio_pitchyinfft -del_aubio_pvoc -del_aubio_resampler -del_aubio_sampler -del_aubio_scale -del_aubio_sink -del_aubio_sink_sndfile -del_aubio_sink_wavwrite -del_aubio_source -del_aubio_source_avcodec -del_aubio_source_sndfile -del_aubio_source_wavread -del_aubio_specdesc -del_aubio_spectral_whitening -del_aubio_tempo -del_aubio_tss -del_aubio_wavetable -del_cvec -del_fmat -del_fvec -del_lvec -fmat_copy -fmat_get_channel -fmat_get_channel_data -fmat_get_data -fmat_get_sample -fmat_ones -fmat_print -fmat_rev -fmat_set -fmat_set_sample -fmat_vecmul -fmat_weight -fmat_zeros -fvec_abs -fvec_adapt_thres -fvec_add -fvec_alpha_norm -fvec_alpha_normalise -fvec_ceil -fvec_clamp -fvec_copy -fvec_cos -fvec_exp -fvec_floor -fvec_get_data -fvec_get_sample -fvec_gettimesig -fvec_ishift -fvec_local_hfc -fvec_log -fvec_log10 -fvec_max -fvec_max_elem -fvec_mean -fvec_median -fvec_min -fvec_min_elem -fvec_min_removal -fvec_moving_thres -fvec_ones -fvec_peakpick -fvec_pow -fvec_print -fvec_push -fvec_quadratic_peak_mag -fvec_quadratic_peak_pos -fvec_rev -fvec_round -fvec_set_all -fvec_set_sample -fvec_set_window -fvec_shift -fvec_sin -fvec_sqrt -fvec_sum -fvec_weight -fvec_weighted_copy -fvec_zeros -lvec_get_data -lvec_get_sample -lvec_ones -lvec_print -lvec_set_all -lvec_set_sample -lvec_zeros -new_aubio_beattracking -new_aubio_fft -new_aubio_filter -new_aubio_filter_a_weighting -new_aubio_filter_biquad -new_aubio_filter_c_weighting -new_aubio_filterbank -new_aubio_hist -new_aubio_mfcc -new_aubio_notes -new_aubio_onset -new_aubio_parameter -new_aubio_peakpicker -new_aubio_pitch -new_aubio_pitchfcomb -new_aubio_pitchmcomb -new_aubio_pitchschmitt -new_aubio_pitchspecacf -new_aubio_pitchyin -new_aubio_pitchyinfft -new_aubio_pvoc -new_aubio_resampler -new_aubio_sampler -new_aubio_scale -new_aubio_sink -new_aubio_sink_sndfile -new_aubio_sink_wavwrite -new_aubio_source -new_aubio_source_avcodec -new_aubio_source_sndfile -new_aubio_source_wavread -new_aubio_specdesc -new_aubio_spectral_whitening -new_aubio_tempo -new_aubio_tss -new_aubio_wavetable -new_aubio_window -new_cvec -new_fmat -new_fvec -new_lvec diff --git a/ports/aubio/crt_lib_linkage.patch b/ports/aubio/crt_lib_linkage.patch deleted file mode 100644 index 36a8a3640..000000000 --- a/ports/aubio/crt_lib_linkage.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/src/wscript_build b/src/wscript_build -index 0a7d72a..bf84227 100644 ---- a/src/wscript_build -+++ b/src/wscript_build -@@ -24,7 +24,12 @@ ctx(features = 'c', - if ctx.env['DEST_OS'] in ['ios', 'iosimulator']: - build_features = ['cstlib', 'cshlib'] - elif ctx.env['DEST_OS'] in ['win32', 'win64']: -- build_features = ['cstlib', 'cshlib'] -+ if ctx.options.library_linkage == "static": -+ build_features = ['cstlib'] -+ elif ctx.options.library_linkage == "dynamic": -+ build_features = ['cshlib'] -+ else: -+ build_features = ['cstlib', 'cshlib'] - elif ctx.env['DEST_OS'] in ['emscripten']: - build_features = ['cstlib'] - elif '--static' in ctx.env['LDFLAGS'] or '--static' in ctx.env['LINKFLAGS']: -diff --git a/wscript b/wscript -index 6363f1e..e0d57a4 100644 ---- a/wscript -+++ b/wscript -@@ -44,6 +44,16 @@ def options(ctx): - dest = 'build_type', - help = 'whether to compile with (--build-type=release) or without (--build-type=debug) '\ - ' compiler opimizations [default: release]') -+ ctx.add_option('--crt-linkage', action = 'store', -+ default = "dynamic", -+ choices = ('static', 'dynamic'), -+ dest = 'crt_linkage', -+ help = 'whether to compile with static CRT linkage (--crt-linkage=static) or the default dynamic (--crt-linkage=dynamic)') -+ ctx.add_option('--library-linkage', action = 'store', -+ default = "both", -+ choices = ('dynamic', 'static', 'both'), -+ dest = 'library_linkage', -+ help = 'whether to compile a dynamic (shared) (--library-linkage=dynamic) or static library (--library-linkage=static) ("both" is broken for msvc)') - add_option_enable_disable(ctx, 'fftw3f', default = False, - help_str = 'compile with fftw3f instead of ooura (recommended)', - help_disable_str = 'do not compile with fftw3f') -@@ -139,16 +149,25 @@ def configure(ctx): - else: - # enable debug symbols - ctx.env.CFLAGS += ['/Z7', '/FS'] -- ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO'] -+ if ctx.options.library_linkage == "dynamic": -+ ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO', '/DEF:..\\aubio-5.def'] -+ else: -+ ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO'] - # configure warnings - ctx.env.CFLAGS += ['/W4', '/D_CRT_SECURE_NO_WARNINGS'] - # set optimization level and runtime libs - if (ctx.options.build_type == "release"): - ctx.env.CFLAGS += ['/Ox'] -- ctx.env.CFLAGS += ['/MD'] -+ if (ctx.options.crt_linkage == "static"): -+ ctx.env.CFLAGS += ['/MT'] -+ else: -+ ctx.env.CFLAGS += ['/MD'] - else: - assert(ctx.options.build_type == "debug") -- ctx.env.CFLAGS += ['/MDd'] -+ if (ctx.options.crt_linkage == "static"): -+ ctx.env.CFLAGS += ['/MTd'] -+ else: -+ ctx.env.CFLAGS += ['/MDd'] - - ctx.check_cc(lib='m', uselib_store='M', mandatory=False) - diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake index e8a7d4551..1e1993326 100644 --- a/ports/aubio/portfile.cmake +++ b/ports/aubio/portfile.cmake @@ -7,7 +7,7 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/aubio-5.def ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -17,12 +17,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Handle copyright and credentials -file(COPY - ${SOURCE_PATH}/COPYING - ${SOURCE_PATH}/AUTHORS - ${SOURCE_PATH}/ChangeLog - ${SOURCE_PATH}/README.md - DESTINATION +file(COPY + ${SOURCE_PATH}/COPYING + ${SOURCE_PATH}/AUTHORS + ${SOURCE_PATH}/ChangeLog + ${SOURCE_PATH}/README.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/aubio) vcpkg_copy_pdbs() -- cgit v1.2.3 From 196b48ef5f1344a845e8381676f2798eb1011809 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 13:56:24 -0700 Subject: [aubio] Add capability to build tools (note: currently fails due to missing config.h) --- ports/aubio/CMakeLists.txt | 146 ++++++++++++++++++++++++++++----------------- ports/aubio/CONTROL | 2 +- ports/aubio/portfile.cmake | 7 ++- 3 files changed, 97 insertions(+), 58 deletions(-) diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt index 6577e075c..bb24c5b15 100644 --- a/ports/aubio/CMakeLists.txt +++ b/ports/aubio/CMakeLists.txt @@ -1,56 +1,90 @@ -cmake_minimum_required(VERSION 3.8) -project(aubio C) - -add_definitions( - -DHAVE_STDLIB_H=1 - -DHAVE_STDIO_H=1 - -DHAVE_MATH_H=1 - -DHAVE_STRING_H=1 - -DHAVE_LIMITS_H=1 - -DHAVE_STDARG_H=1 - -DHAVE_C99_VARARGS_MACROS=1 - - -DHAVE_SNDFILE=1 - -DHAVE_WAVWRITE=1 - -DHAVE_WAVREAD=1 - -DHAVE_LIBAV=1 - -DHAVE_SWRESAMPLE=1 -) - -set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - -find_path(LIBSNDFILE_H sndfile.h) -find_library(LIBSNDFILE_LIB NAMES libsndfile-1 libsndfile) -find_library(AVCODEC_LIB avcodec) -find_library(AVUTIL_LIB avutil) -find_library(AVDEVICE_LIB avdevice) -find_library(AVFILTER_LIB avfilter) -find_library(AVFORMAT_LIB avformat) -find_library(SWRESAMPLE_LIB swresample) - -include_directories(src ${LIBSNDFILE_H}) -link_libraries(${LIBSNDFILE_LIB} ${AVCODEC_LIB} ${AVUTIL_LIB} ${AVDEVICE_LIB} ${AVFILTER_LIB} ${AVFORMAT_LIB} ${SWRESAMPLE_LIB} ws2_32.lib) - -file(GLOB_RECURSE SOURCES src/*.c) -set_source_files_properties(src/io/sink_wavwrite.c PROPERTIES COMPILE_FLAGS /FIWinsock2.h) -add_library(aubio ${SOURCES}) - -set(CMAKE_DEBUG_POSTFIX d) - -install( - TARGETS aubio - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -if(NOT DISABLE_INSTALL_HEADERS) - install( - DIRECTORY src/ - DESTINATION include/aubio - FILES_MATCHING - PATTERN "*.h" - PATTERN "*_priv.h" EXCLUDE - PATTERN "config.h" EXCLUDE - ) -endif() +cmake_minimum_required(VERSION 3.8) +project(aubio C) + +add_definitions( + -DHAVE_STDLIB_H=1 + -DHAVE_STDIO_H=1 + -DHAVE_MATH_H=1 + -DHAVE_STRING_H=1 + -DHAVE_LIMITS_H=1 + -DHAVE_STDARG_H=1 + -DHAVE_C99_VARARGS_MACROS=1 + + -DHAVE_SNDFILE=1 + -DHAVE_WAVWRITE=1 + -DHAVE_WAVREAD=1 + -DHAVE_LIBAV=1 + -DHAVE_SWRESAMPLE=1 +) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +set(CMAKE_DEBUG_POSTFIX d) + +option(BUILD_TOOLS "Build and install tools" ON) +set(TOOLS_INSTALLDIR "bin" CACHE STRING "Target directory for installed tools") + +find_path(LIBSNDFILE_H sndfile.h) +find_library(LIBSNDFILE_LIB NAMES libsndfile-1 libsndfile) +find_library(AVCODEC_LIB avcodec) +find_library(AVUTIL_LIB avutil) +find_library(AVDEVICE_LIB avdevice) +find_library(AVFILTER_LIB avfilter) +find_library(AVFORMAT_LIB avformat) +find_library(SWRESAMPLE_LIB swresample) +find_library(OGG_LIB ogg) +find_library(FLAC_LIB flac) +find_library(VORBIS_LIB vorbis) +find_library(VORBISENC_LIB vorbisenc) + +include_directories(src ${LIBSNDFILE_H}) + +file(GLOB_RECURSE SOURCES src/*.c) + +set_source_files_properties(src/io/sink_wavwrite.c PROPERTIES COMPILE_FLAGS /FIWinsock2.h) +add_library(aubio ${SOURCES}) +target_link_libraries(aubio PUBLIC + ${LIBSNDFILE_LIB} + ${OGG_LIB} + ${FLAC_LIB} + ${VORBIS_LIB} + ${VORBISENC_LIB} + ${AVCODEC_LIB} + ${AVUTIL_LIB} + ${AVDEVICE_LIB} + ${AVFILTER_LIB} + ${AVFORMAT_LIB} + ${SWRESAMPLE_LIB} + ws2_32.lib +) + +if(BUILD_TOOLS) + set(EXAMPLE_EXECS aubiomfcc aubionotes aubioonset aubiopitch aubioquiet aubiotrack) + foreach(EXAMPLE_EXEC ${EXAMPLE_EXECS}) + add_executable(${EXAMPLE_EXEC} examples/${EXAMPLE_EXEC}.c examples/utils.c examples/jackio.c) + target_link_libraries(${EXAMPLE_EXEC} PRIVATE aubio) + target_compile_definitions(${EXAMPLE_EXEC} PRIVATE -DHAVE_WIN_HACKS=1) + endforeach() + + install( + TARGETS ${EXAMPLE_EXECS} + RUNTIME DESTINATION ${TOOLS_INSTALLDIR} + ) +endif() + +install( + TARGETS aubio + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY src/ + DESTINATION include/aubio + FILES_MATCHING + PATTERN "*.h" + PATTERN "*_priv.h" EXCLUDE + PATTERN "config.h" EXCLUDE + ) +endif() diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL index f7aee6191..3edc3db74 100644 --- a/ports/aubio/CONTROL +++ b/ports/aubio/CONTROL @@ -1,4 +1,4 @@ Source: aubio Version: 0.46~alpha Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. -Build-Depends: ffmpeg, libsndfile +Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake index 1e1993326..6f7b5fbc8 100644 --- a/ports/aubio/portfile.cmake +++ b/ports/aubio/portfile.cmake @@ -12,7 +12,12 @@ 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=1 + OPTIONS_RELEASE + #-DTOOLS_INSTALLDIR=tools/aubio + -DBUILD_TOOLS=OFF + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=1 + -DBUILD_TOOLS=OFF ) vcpkg_install_cmake() -- cgit v1.2.3 From 77b5193954e4e5d99e031f4812a481b639a50470 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 28 Jun 2017 14:06:52 -0700 Subject: [libconfig] added msvc scanner patches --- ports/libconfig/CMakeLists.txt | 2 +- .../libconfig/fix-scanner-header-msvc-patch.patch | 108 ++ .../libconfig/fix-scanner-source-msvc-patch.patch | 1122 ++++++++++++++++++++ ports/libconfig/portfile.cmake | 9 +- 4 files changed, 1239 insertions(+), 2 deletions(-) create mode 100644 ports/libconfig/fix-scanner-header-msvc-patch.patch create mode 100644 ports/libconfig/fix-scanner-source-msvc-patch.patch diff --git a/ports/libconfig/CMakeLists.txt b/ports/libconfig/CMakeLists.txt index fd5313a7d..c04e2976a 100644 --- a/ports/libconfig/CMakeLists.txt +++ b/ports/libconfig/CMakeLists.txt @@ -65,5 +65,5 @@ install( ) if(NOT DISABLE_INSTALL_HEADERS) - install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include FILES_MATCHING PATTERN "*.h") + install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include) endif() diff --git a/ports/libconfig/fix-scanner-header-msvc-patch.patch b/ports/libconfig/fix-scanner-header-msvc-patch.patch new file mode 100644 index 000000000..c2e13c2ff --- /dev/null +++ b/ports/libconfig/fix-scanner-header-msvc-patch.patch @@ -0,0 +1,108 @@ +diff --git a/lib/scanner.h b/lib/scanner.h +index cdca3bb..1fc0509 100644 +--- a/lib/scanner.h ++++ b/lib/scanner.h +@@ -13,7 +13,7 @@ + #define FLEX_SCANNER + #define YY_FLEX_MAJOR_VERSION 2 + #define YY_FLEX_MINOR_VERSION 5 +-#define YY_FLEX_SUBMINOR_VERSION 39 ++#define YY_FLEX_SUBMINOR_VERSION 35 + #if YY_FLEX_SUBMINOR_VERSION > 0 + #define FLEX_BETA + #endif +@@ -132,7 +132,15 @@ typedef void* yyscan_t; + + /* Size of default input buffer. */ + #ifndef YY_BUF_SIZE ++#ifdef __ia64__ ++/* On IA-64, the buffer size is 16k, not 8k. ++ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. ++ * Ditto for the __ia64__ case accordingly. ++ */ ++#define YY_BUF_SIZE 32768 ++#else + #define YY_BUF_SIZE 16384 ++#endif /* __ia64__ */ + #endif + + #ifndef YY_TYPEDEF_YY_BUFFER_STATE +@@ -162,7 +170,7 @@ struct yy_buffer_state + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ +- yy_size_t yy_n_chars; ++ int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to +@@ -206,13 +214,13 @@ void libconfig_yypop_buffer_state (yyscan_t yyscanner ); + + YY_BUFFER_STATE libconfig_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); + YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); ++YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + + void *libconfig_yyalloc (yy_size_t ,yyscan_t yyscanner ); + void *libconfig_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); + void libconfig_yyfree (void * ,yyscan_t yyscanner ); + +-#define libconfig_yywrap(yyscanner) 1 ++#define libconfig_yywrap(n) 1 + #define YY_SKIP_YYWRAP + + #define yytext_ptr yytext_r +@@ -221,7 +229,8 @@ void libconfig_yyfree (void * ,yyscan_t yyscanner ); + #define INITIAL 0 + #define COMMENT 1 + #define STRING 2 +-#define INCLUDE 3 ++#define INCLUDE_F 3 ++#define INCLUDE_D 4 + + #endif + +@@ -260,7 +269,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner ); + + void libconfig_yyset_out (FILE * out_str ,yyscan_t yyscanner ); + +-yy_size_t libconfig_yyget_leng (yyscan_t yyscanner ); ++int libconfig_yyget_leng (yyscan_t yyscanner ); + + char *libconfig_yyget_text (yyscan_t yyscanner ); + +@@ -268,10 +277,6 @@ int libconfig_yyget_lineno (yyscan_t yyscanner ); + + void libconfig_yyset_lineno (int line_number ,yyscan_t yyscanner ); + +-int libconfig_yyget_column (yyscan_t yyscanner ); +- +-void libconfig_yyset_column (int column_no ,yyscan_t yyscanner ); +- + YYSTYPE * libconfig_yyget_lval (yyscan_t yyscanner ); + + void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); +@@ -302,7 +307,12 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); + + /* Amount of stuff to slurp up with each read. */ + #ifndef YY_READ_BUF_SIZE ++#ifdef __ia64__ ++/* On IA-64, the buffer size is 16k, not 8k */ ++#define YY_READ_BUF_SIZE 16384 ++#else + #define YY_READ_BUF_SIZE 8192 ++#endif /* __ia64__ */ + #endif + + /* Number of entries by which start-condition stack grows. */ +@@ -337,8 +347,8 @@ extern int libconfig_yylex \ + #undef YY_DECL + #endif + +-#line 207 "scanner.l" ++#line 315 "scanner.l" + +-#line 343 "scanner.h" ++#line 353 "scanner.h" + #undef libconfig_yyIN_HEADER + #endif /* libconfig_yyHEADER_H */ diff --git a/ports/libconfig/fix-scanner-source-msvc-patch.patch b/ports/libconfig/fix-scanner-source-msvc-patch.patch new file mode 100644 index 000000000..e8f24e638 --- /dev/null +++ b/ports/libconfig/fix-scanner-source-msvc-patch.patch @@ -0,0 +1,1122 @@ +diff --git a/lib/scanner.c b/lib/scanner.c +index dc07eb0..efb6730 100644 +--- a/lib/scanner.c ++++ b/lib/scanner.c +@@ -9,7 +9,7 @@ + #define FLEX_SCANNER + #define YY_FLEX_MAJOR_VERSION 2 + #define YY_FLEX_MINOR_VERSION 5 +-#define YY_FLEX_SUBMINOR_VERSION 39 ++#define YY_FLEX_SUBMINOR_VERSION 35 + #if YY_FLEX_SUBMINOR_VERSION > 0 + #define FLEX_BETA + #endif +@@ -159,7 +159,15 @@ typedef void* yyscan_t; + + /* Size of default input buffer. */ + #ifndef YY_BUF_SIZE ++#ifdef __ia64__ ++/* On IA-64, the buffer size is 16k, not 8k. ++ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. ++ * Ditto for the __ia64__ case accordingly. ++ */ ++#define YY_BUF_SIZE 32768 ++#else + #define YY_BUF_SIZE 16384 ++#endif /* __ia64__ */ + #endif + + /* The state buf must be large enough to hold one state per character in the main buffer. +@@ -171,11 +179,6 @@ typedef void* yyscan_t; + typedef struct yy_buffer_state *YY_BUFFER_STATE; + #endif + +-#ifndef YY_TYPEDEF_YY_SIZE_T +-#define YY_TYPEDEF_YY_SIZE_T +-typedef size_t yy_size_t; +-#endif +- + #define EOB_ACT_CONTINUE_SCAN 0 + #define EOB_ACT_END_OF_FILE 1 + #define EOB_ACT_LAST_MATCH 2 +@@ -194,13 +197,6 @@ typedef size_t yy_size_t; + if ( yytext[yyl] == '\n' )\ + --yylineno;\ + }while(0) +- #define YY_LINENO_REWIND_TO(dst) \ +- do {\ +- const char *p;\ +- for ( p = yy_cp-1; p >= (dst); --p)\ +- if ( *p == '\n' )\ +- --yylineno;\ +- }while(0) + + /* Return all but the first "n" matched characters back to the input stream. */ + #define yyless(n) \ +@@ -218,6 +214,11 @@ typedef size_t yy_size_t; + + #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) + ++#ifndef YY_TYPEDEF_YY_SIZE_T ++#define YY_TYPEDEF_YY_SIZE_T ++typedef size_t yy_size_t; ++#endif ++ + #ifndef YY_STRUCT_YY_BUFFER_STATE + #define YY_STRUCT_YY_BUFFER_STATE + struct yy_buffer_state +@@ -235,7 +236,7 @@ struct yy_buffer_state + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ +- yy_size_t yy_n_chars; ++ int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to +@@ -314,7 +315,7 @@ static void libconfig_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yys + + YY_BUFFER_STATE libconfig_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); + YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); ++YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + + void *libconfig_yyalloc (yy_size_t ,yyscan_t yyscanner ); + void *libconfig_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +@@ -344,7 +345,7 @@ void libconfig_yyfree (void * ,yyscan_t yyscanner ); + + #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +-#define libconfig_yywrap(yyscanner) 1 ++#define libconfig_yywrap(n) 1 + #define YY_SKIP_YYWRAP + + typedef unsigned char YY_CHAR; +@@ -368,8 +369,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; + +-#define YY_NUM_RULES 42 +-#define YY_END_OF_BUFFER 43 ++#define YY_NUM_RULES 47 ++#define YY_END_OF_BUFFER 48 + /* This struct is not used in this scanner, + but its presence is necessary. */ + struct yy_trans_info +@@ -377,20 +378,21 @@ struct yy_trans_info + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +-static yyconst flex_int16_t yy_accept[103] = ++static yyconst flex_int16_t yy_accept[117] = + { 0, +- 0, 0, 0, 0, 0, 0, 0, 0, 43, 41, +- 22, 21, 21, 5, 41, 37, 38, 29, 41, 24, +- 30, 41, 31, 31, 23, 39, 29, 29, 35, 36, +- 25, 26, 22, 41, 3, 4, 3, 6, 15, 14, +- 17, 20, 42, 22, 0, 40, 29, 30, 31, 30, +- 0, 1, 0, 30, 0, 32, 0, 29, 29, 22, +- 0, 0, 2, 6, 12, 0, 11, 10, 7, 8, +- 9, 17, 19, 18, 0, 30, 30, 0, 0, 30, +- 32, 33, 29, 29, 0, 0, 0, 30, 34, 29, +- 27, 0, 13, 34, 28, 0, 0, 0, 0, 0, +- +- 16, 0 ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 48, 46, 27, 26, 26, 5, 46, 42, 43, 34, ++ 46, 29, 35, 46, 36, 36, 28, 44, 34, 34, ++ 40, 41, 30, 31, 27, 46, 3, 4, 3, 6, ++ 15, 14, 17, 20, 47, 22, 25, 47, 27, 0, ++ 45, 34, 35, 36, 35, 0, 1, 0, 35, 0, ++ 37, 0, 34, 34, 27, 0, 0, 2, 6, 12, ++ 0, 11, 10, 7, 8, 9, 17, 19, 18, 22, ++ 24, 23, 0, 35, 35, 0, 0, 35, 37, 38, ++ 34, 34, 0, 0, 0, 35, 39, 34, 32, 0, ++ ++ 13, 39, 33, 0, 0, 0, 0, 0, 0, 16, ++ 0, 0, 0, 0, 21, 0 + } ; + + static yyconst flex_int32_t yy_ec[256] = +@@ -434,110 +436,116 @@ static yyconst flex_int32_t yy_meta[49] = + 3, 3, 3, 3, 3, 3, 1, 1 + } ; + +-static yyconst flex_int16_t yy_base[113] = ++static yyconst flex_int16_t yy_base[129] = + { 0, +- 0, 47, 47, 48, 46, 47, 48, 49, 203, 204, +- 200, 204, 204, 204, 198, 204, 204, 0, 45, 204, +- 47, 50, 60, 74, 204, 204, 178, 28, 204, 204, +- 204, 204, 64, 158, 204, 204, 183, 0, 204, 63, +- 0, 204, 83, 195, 193, 204, 0, 88, 102, 98, +- 62, 204, 190, 104, 119, 162, 0, 67, 65, 121, +- 127, 124, 204, 0, 204, 0, 204, 204, 204, 204, +- 204, 0, 204, 204, 108, 117, 122, 134, 132, 136, +- 204, 139, 136, 116, 126, 0, 140, 142, 135, 130, +- 0, 102, 204, 204, 0, 85, 72, 63, 98, 158, +- +- 204, 204, 169, 173, 177, 181, 183, 187, 191, 89, +- 66, 63 ++ 0, 47, 47, 48, 46, 47, 48, 49, 50, 53, ++ 223, 224, 220, 224, 224, 224, 218, 224, 224, 0, ++ 46, 224, 49, 54, 62, 76, 224, 224, 198, 33, ++ 224, 224, 224, 224, 70, 178, 224, 224, 203, 0, ++ 224, 64, 0, 224, 61, 0, 224, 65, 215, 213, ++ 224, 0, 89, 100, 94, 109, 224, 212, 113, 125, ++ 187, 0, 70, 88, 100, 172, 169, 224, 0, 224, ++ 0, 224, 224, 224, 224, 224, 0, 224, 224, 0, ++ 224, 224, 58, 115, 127, 137, 129, 139, 224, 184, ++ 181, 123, 172, 0, 141, 143, 181, 125, 0, 165, ++ ++ 224, 224, 0, 160, 167, 165, 133, 159, 163, 224, ++ 156, 149, 166, 161, 224, 224, 169, 173, 177, 181, ++ 185, 187, 191, 195, 199, 136, 119, 81 + } ; + +-static yyconst flex_int16_t yy_def[113] = ++static yyconst flex_int16_t yy_def[129] = + { 0, +- 102, 1, 103, 103, 104, 104, 105, 105, 102, 102, +- 102, 102, 102, 102, 106, 102, 102, 107, 102, 102, +- 102, 102, 102, 102, 102, 102, 107, 107, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 108, 102, 102, +- 109, 102, 102, 102, 106, 102, 107, 102, 102, 102, +- 102, 102, 106, 102, 102, 102, 110, 107, 107, 102, +- 102, 102, 102, 108, 102, 111, 102, 102, 102, 102, +- 102, 109, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 110, 107, 107, 102, 112, 102, 102, 102, 107, +- 107, 102, 102, 102, 107, 102, 102, 102, 102, 102, +- +- 102, 0, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102 ++ 116, 1, 117, 117, 118, 118, 119, 119, 120, 120, ++ 116, 116, 116, 116, 116, 116, 121, 116, 116, 122, ++ 116, 116, 116, 116, 116, 116, 116, 116, 122, 122, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 123, ++ 116, 116, 124, 116, 116, 125, 116, 116, 116, 121, ++ 116, 122, 116, 116, 116, 116, 116, 121, 116, 116, ++ 116, 126, 122, 122, 116, 116, 116, 116, 123, 116, ++ 127, 116, 116, 116, 116, 116, 124, 116, 116, 125, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 126, ++ 122, 122, 116, 128, 116, 116, 116, 122, 122, 116, ++ ++ 116, 116, 122, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 0, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116 + } ; + +-static yyconst flex_int16_t yy_nxt[253] = ++static yyconst flex_int16_t yy_nxt[273] = + { 0, +- 10, 11, 12, 13, 13, 14, 15, 16, 17, 18, +- 19, 20, 19, 21, 22, 23, 24, 25, 26, 25, +- 10, 18, 18, 18, 27, 18, 18, 18, 18, 28, +- 18, 18, 29, 10, 30, 10, 18, 18, 18, 27, +- 18, 18, 18, 18, 28, 18, 31, 32, 33, 36, +- 36, 39, 39, 42, 42, 59, 37, 37, 48, 52, +- 49, 49, 50, 50, 53, 60, 93, 34, 65, 86, +- 51, 59, 75, 54, 75, 49, 49, 76, 76, 40, +- 40, 43, 43, 55, 61, 51, 56, 54, 73, 49, +- 49, 57, 82, 83, 66, 84, 67, 55, 55, 100, +- +- 56, 99, 68, 50, 50, 69, 70, 71, 83, 98, +- 84, 51, 55, 50, 50, 54, 74, 49, 49, 77, +- 77, 51, 60, 76, 76, 55, 51, 78, 56, 79, +- 97, 79, 76, 76, 80, 80, 51, 77, 77, 91, +- 55, 61, 78, 96, 87, 78, 87, 80, 80, 88, +- 88, 80, 80, 95, 91, 88, 88, 88, 88, 100, +- 78, 94, 92, 101, 90, 89, 85, 62, 95, 35, +- 35, 35, 35, 38, 38, 38, 38, 41, 41, 41, +- 41, 45, 45, 45, 45, 47, 47, 64, 81, 64, +- 64, 72, 46, 72, 72, 46, 44, 63, 62, 58, +- +- 46, 44, 102, 9, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102 ++ 12, 13, 14, 15, 15, 16, 17, 18, 19, 20, ++ 21, 22, 21, 23, 24, 25, 26, 27, 28, 27, ++ 12, 20, 20, 20, 29, 20, 20, 20, 20, 30, ++ 20, 20, 31, 12, 32, 12, 20, 20, 20, 29, ++ 20, 20, 20, 20, 30, 20, 33, 34, 35, 38, ++ 38, 41, 41, 44, 44, 47, 39, 39, 47, 53, ++ 64, 54, 54, 57, 55, 55, 78, 36, 58, 70, ++ 81, 65, 56, 84, 84, 59, 64, 54, 54, 42, ++ 42, 45, 45, 48, 101, 60, 48, 56, 61, 59, ++ 66, 54, 54, 62, 79, 71, 91, 72, 82, 60, ++ ++ 60, 65, 61, 73, 55, 55, 74, 75, 76, 55, ++ 55, 91, 56, 59, 60, 54, 54, 56, 92, 83, ++ 66, 83, 94, 60, 84, 84, 61, 56, 85, 85, ++ 84, 84, 56, 92, 108, 87, 86, 87, 60, 90, ++ 88, 88, 85, 85, 88, 88, 99, 95, 103, 95, ++ 86, 86, 96, 96, 88, 88, 96, 96, 96, 96, ++ 108, 99, 114, 103, 110, 86, 115, 114, 109, 37, ++ 37, 37, 37, 40, 40, 40, 40, 43, 43, 43, ++ 43, 46, 46, 46, 46, 50, 50, 50, 50, 52, ++ 52, 69, 113, 69, 69, 77, 112, 77, 77, 80, ++ ++ 111, 80, 80, 107, 106, 105, 104, 102, 100, 98, ++ 97, 93, 67, 89, 51, 51, 49, 68, 67, 63, ++ 51, 49, 116, 11, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116 + } ; + +-static yyconst flex_int16_t yy_chk[253] = ++static yyconst flex_int16_t yy_chk[273] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, +- 4, 5, 6, 7, 8, 28, 3, 4, 19, 22, +- 19, 19, 21, 21, 22, 33, 112, 2, 40, 111, +- 21, 28, 51, 23, 51, 23, 23, 51, 51, 5, +- 6, 7, 8, 23, 33, 21, 23, 24, 43, 24, +- 24, 23, 110, 58, 40, 59, 40, 24, 23, 99, +- +- 24, 98, 40, 48, 48, 40, 40, 40, 58, 97, +- 59, 48, 24, 50, 50, 49, 43, 49, 49, 54, +- 54, 50, 60, 75, 75, 49, 48, 54, 49, 55, +- 96, 55, 76, 76, 55, 55, 50, 77, 77, 84, +- 49, 60, 54, 92, 78, 77, 78, 79, 79, 78, +- 78, 80, 80, 90, 84, 87, 87, 88, 88, 100, +- 77, 89, 85, 100, 83, 82, 62, 61, 90, 103, +- 103, 103, 103, 104, 104, 104, 104, 105, 105, 105, +- 105, 106, 106, 106, 106, 107, 107, 108, 56, 108, +- 108, 109, 53, 109, 109, 45, 44, 37, 34, 27, +- +- 15, 11, 9, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +- 102, 102 ++ 4, 5, 6, 7, 8, 9, 3, 4, 10, 21, ++ 30, 21, 21, 24, 23, 23, 45, 2, 24, 42, ++ 48, 35, 23, 83, 83, 25, 30, 25, 25, 5, ++ 6, 7, 8, 9, 128, 25, 10, 23, 25, 26, ++ 35, 26, 26, 25, 45, 42, 63, 42, 48, 26, ++ ++ 25, 65, 26, 42, 53, 53, 42, 42, 42, 55, ++ 55, 63, 53, 54, 26, 54, 54, 55, 64, 56, ++ 65, 56, 127, 54, 56, 56, 54, 53, 59, 59, ++ 84, 84, 55, 64, 107, 60, 59, 60, 54, 126, ++ 60, 60, 85, 85, 87, 87, 92, 86, 98, 86, ++ 85, 59, 86, 86, 88, 88, 95, 95, 96, 96, ++ 108, 92, 114, 98, 108, 85, 114, 113, 107, 117, ++ 117, 117, 117, 118, 118, 118, 118, 119, 119, 119, ++ 119, 120, 120, 120, 120, 121, 121, 121, 121, 122, ++ 122, 123, 112, 123, 123, 124, 111, 124, 124, 125, ++ ++ 109, 125, 125, 106, 105, 104, 100, 97, 93, 91, ++ 90, 67, 66, 61, 58, 50, 49, 39, 36, 29, ++ 17, 13, 11, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, ++ 116, 116 + } ; + + /* Table of booleans, true if rule could match eol. */ +-static yyconst flex_int32_t yy_rule_can_match_eol[43] = ++static yyconst flex_int32_t yy_rule_can_match_eol[48] = + { 0, + 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, +- 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, }; ++ 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 0, 0, 0, 0, 0, 0, 0, }; + + /* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. +@@ -550,7 +558,7 @@ static yyconst flex_int32_t yy_rule_can_match_eol[43] = + /* -*- mode: C -*- */ + /* -------------------------------------------------------------------------- + libconfig - A library for processing structured configuration files +- Copyright (C) 2005-2014 Mark A Lindner ++ Copyright (C) 2005-2015 Mark A Lindner + + This file is part of libconfig. + +@@ -577,9 +585,11 @@ static yyconst flex_int32_t yy_rule_can_match_eol[43] = + #endif + + #include ++#include + #include + #include + #include ++#include + #include "parsectx.h" + #include "scanctx.h" + #include "grammar.h" +@@ -621,13 +631,30 @@ static unsigned long long fromhex(const char *s) + #endif /* __MINGW32__ */ + } + ++static int filter_dotfiles(const struct dirent *de) ++{ ++ const char *fname = de->d_name; ++ ++#ifdef _DIRENT_HAVE_D_TYPE ++ /* filter out non-files and non-symlinks */ ++ if((de->d_type != DT_REG) && (de->d_type != DT_LNK) && (de->d_type != DT_UNKNOWN)) ++ return 0; ++#endif ++ ++ return (fname /* != NULL */ ++ && ('\0' != fname[0]) /* can't really happen */ ++ && ('.' != fname[0]) ++ ) ? 1 : 0 ; ++} + +-#line 626 "scanner.c" ++ ++#line 652 "scanner.c" + + #define INITIAL 0 + #define COMMENT 1 + #define STRING 2 +-#define INCLUDE 3 ++#define INCLUDE_F 3 ++#define INCLUDE_D 4 + + #ifndef YY_NO_UNISTD_H + /* Special case for "unistd.h", since it is non-ANSI. We include it way +@@ -652,8 +679,8 @@ struct yyguts_t + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; +- yy_size_t yy_n_chars; +- yy_size_t yyleng_r; ++ int yy_n_chars; ++ int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; +@@ -706,7 +733,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner ); + + void libconfig_yyset_out (FILE * out_str ,yyscan_t yyscanner ); + +-yy_size_t libconfig_yyget_leng (yyscan_t yyscanner ); ++int libconfig_yyget_leng (yyscan_t yyscanner ); + + char *libconfig_yyget_text (yyscan_t yyscanner ); + +@@ -714,10 +741,6 @@ int libconfig_yyget_lineno (yyscan_t yyscanner ); + + void libconfig_yyset_lineno (int line_number ,yyscan_t yyscanner ); + +-int libconfig_yyget_column (yyscan_t yyscanner ); +- +-void libconfig_yyset_column (int column_no ,yyscan_t yyscanner ); +- + YYSTYPE * libconfig_yyget_lval (yyscan_t yyscanner ); + + void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); +@@ -754,7 +777,12 @@ static int input (yyscan_t yyscanner ); + + /* Amount of stuff to slurp up with each read. */ + #ifndef YY_READ_BUF_SIZE ++#ifdef __ia64__ ++/* On IA-64, the buffer size is 16k, not 8k */ ++#define YY_READ_BUF_SIZE 16384 ++#else + #define YY_READ_BUF_SIZE 8192 ++#endif /* __ia64__ */ + #endif + + /* Copy whatever the last rule matched to the standard output. */ +@@ -861,6 +889,11 @@ YY_DECL + register int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + ++#line 121 "scanner.l" ++ ++ ++#line 896 "scanner.c" ++ + yylval = yylval_param; + + if ( !yyg->yy_init ) +@@ -889,12 +922,6 @@ YY_DECL + libconfig_yy_load_buffer_state(yyscanner ); + } + +- { +-#line 102 "scanner.l" +- +- +-#line 897 "scanner.c" +- + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; +@@ -912,7 +939,7 @@ YY_DECL + yy_match: + do + { +- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; ++ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; +@@ -921,13 +948,13 @@ yy_match: + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 103 ) ++ if ( yy_current_state >= 117 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } +- while ( yy_current_state != 102 ); ++ while ( yy_current_state != 116 ); + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + +@@ -938,7 +965,7 @@ yy_find_action: + + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) + { +- yy_size_t yyl; ++ int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + +@@ -961,69 +988,69 @@ do_action: /* This label is used only to access EOF actions. */ + + case 1: + YY_RULE_SETUP +-#line 104 "scanner.l" ++#line 123 "scanner.l" + { BEGIN COMMENT; } + YY_BREAK + case 2: + YY_RULE_SETUP +-#line 105 "scanner.l" ++#line 124 "scanner.l" + { BEGIN INITIAL; } + YY_BREAK + case 3: + YY_RULE_SETUP +-#line 106 "scanner.l" ++#line 125 "scanner.l" + { /* ignore */ } + YY_BREAK + case 4: + /* rule 4 can match eol */ + YY_RULE_SETUP +-#line 107 "scanner.l" ++#line 126 "scanner.l" + { /* ignore */ } + YY_BREAK + case 5: + YY_RULE_SETUP +-#line 109 "scanner.l" ++#line 128 "scanner.l" + { BEGIN STRING; } + YY_BREAK + case 6: + /* rule 6 can match eol */ + YY_RULE_SETUP +-#line 110 "scanner.l" ++#line 129 "scanner.l" + { scanctx_append_string(yyextra, yytext); } + YY_BREAK + case 7: + YY_RULE_SETUP +-#line 111 "scanner.l" ++#line 130 "scanner.l" + { scanctx_append_string(yyextra, "\n"); } + YY_BREAK + case 8: + YY_RULE_SETUP +-#line 112 "scanner.l" ++#line 131 "scanner.l" + { scanctx_append_string(yyextra, "\r"); } + YY_BREAK + case 9: + YY_RULE_SETUP +-#line 113 "scanner.l" ++#line 132 "scanner.l" + { scanctx_append_string(yyextra, "\t"); } + YY_BREAK + case 10: + YY_RULE_SETUP +-#line 114 "scanner.l" ++#line 133 "scanner.l" + { scanctx_append_string(yyextra, "\f"); } + YY_BREAK + case 11: + YY_RULE_SETUP +-#line 115 "scanner.l" ++#line 134 "scanner.l" + { scanctx_append_string(yyextra, "\\"); } + YY_BREAK + case 12: + YY_RULE_SETUP +-#line 116 "scanner.l" ++#line 135 "scanner.l" + { scanctx_append_string(yyextra, "\""); } + YY_BREAK + case 13: + YY_RULE_SETUP +-#line 117 "scanner.l" ++#line 136 "scanner.l" + { + char c[2] = { (char)(strtol(yytext + 2, NULL, 16) & 0xFF), + 0 }; +@@ -1032,12 +1059,12 @@ YY_RULE_SETUP + YY_BREAK + case 14: + YY_RULE_SETUP +-#line 122 "scanner.l" ++#line 141 "scanner.l" + { scanctx_append_string(yyextra, "\\"); } + YY_BREAK + case 15: + YY_RULE_SETUP +-#line 123 "scanner.l" ++#line 142 "scanner.l" + { + yylval->sval = scanctx_take_string(yyextra); + BEGIN INITIAL; +@@ -1046,198 +1073,304 @@ YY_RULE_SETUP + YY_BREAK + case 16: + YY_RULE_SETUP +-#line 129 "scanner.l" +-{ BEGIN INCLUDE; } ++#line 148 "scanner.l" ++{ BEGIN INCLUDE_F; } + YY_BREAK + case 17: + /* rule 17 can match eol */ + YY_RULE_SETUP +-#line 130 "scanner.l" ++#line 149 "scanner.l" + { scanctx_append_string(yyextra, yytext); } + YY_BREAK + case 18: + YY_RULE_SETUP +-#line 131 "scanner.l" ++#line 150 "scanner.l" + { scanctx_append_string(yyextra, "\\"); } + YY_BREAK + case 19: + YY_RULE_SETUP +-#line 132 "scanner.l" ++#line 151 "scanner.l" + { scanctx_append_string(yyextra, "\""); } + YY_BREAK + case 20: + YY_RULE_SETUP +-#line 133 "scanner.l" ++#line 152 "scanner.l" + { +- const char *error; +- FILE *fp = scanctx_push_include(yyextra, +- (void *)YY_CURRENT_BUFFER, +- &error); +- if(fp) +- { +- yyin = fp; +- libconfig_yy_switch_to_buffer(libconfig_yy_create_buffer(yyin,YY_BUF_SIZE,yyscanner),yyscanner); +- } +- else +- { +- yyextra->config->error_text = error; +- yyextra->config->error_file = scanctx_current_filename( +- yyextra); +- yyextra->config->error_line = libconfig_yyget_lineno( +- yyscanner); +- return TOK_ERROR; +- } +- BEGIN INITIAL; +- } ++ const char *error; ++ FILE *fp = scanctx_push_include(yyextra, ++ (void *)YY_CURRENT_BUFFER, ++ scanctx_getpath(yyextra), ++ &error); ++ if(fp) ++ { ++ yyin = fp; ++ libconfig_yy_switch_to_buffer(libconfig_yy_create_buffer(yyin,YY_BUF_SIZE,yyscanner),yyscanner ++ ); ++ } ++ else ++ { ++ yyextra->config->error_text = error; ++ yyextra->config->error_file = scanctx_current_filename( ++ yyextra); ++ yyextra->config->error_line = libconfig_yyget_lineno(yyscanner); ++ return TOK_ERROR; ++ } ++ BEGIN INITIAL; ++ } + YY_BREAK + case 21: +-/* rule 21 can match eol */ + YY_RULE_SETUP +-#line 157 "scanner.l" +-{ /* ignore */ } ++#line 177 "scanner.l" ++{ BEGIN INCLUDE_D; } + YY_BREAK + case 22: ++/* rule 22 can match eol */ + YY_RULE_SETUP +-#line 158 "scanner.l" +-{ /* ignore */ } ++#line 178 "scanner.l" ++{ scanctx_append_string(yyextra, yytext); } + YY_BREAK + case 23: + YY_RULE_SETUP +-#line 160 "scanner.l" +-{ return(TOK_EQUALS); } ++#line 179 "scanner.l" ++{ scanctx_append_string(yyextra, "\\"); } + YY_BREAK + case 24: + YY_RULE_SETUP +-#line 161 "scanner.l" +-{ return(TOK_COMMA); } ++#line 180 "scanner.l" ++{ scanctx_append_string(yyextra, "\""); } + YY_BREAK + case 25: + YY_RULE_SETUP +-#line 162 "scanner.l" +-{ return(TOK_GROUP_START); } ++#line 181 "scanner.l" ++{ ++ const char *error; ++ const char* basedir; ++ FILE *fp = NULL; ++ ++ basedir = scanctx_getpath(yyextra); ++ if(scanctx_dirscan(yyextra, basedir, filter_dotfiles, NULL) < 0) ++ { ++ if(basedir) ++ free((void*)basedir); ++ return TOK_ERROR; ++ } ++ ++ if(scanctx_inloop(yyextra)) ++ { ++ fp = scanctx_push_include(yyextra, ++ (void *)YY_CURRENT_BUFFER, ++ scanctx_filename(yyextra, NULL, scanctx_dirnext(yyextra)), ++ &error ++ ); ++ ++ if(fp) ++ { ++ yyin = fp; ++ libconfig_yy_switch_to_buffer(libconfig_yy_create_buffer(yyin,YY_BUF_SIZE,yyscanner),yyscanner ++ ); ++ } ++ else ++ { ++ yyextra->config->error_text = error; ++ yyextra->config->error_file = scanctx_current_filename(yyextra); ++ yyextra->config->error_line = libconfig_yyget_lineno(yyscanner); ++ } ++ } ++ else ++ scanctx_dirend(yyextra); /* avoid leaks */ ++ ++ BEGIN INITIAL; ++ } + YY_BREAK + case 26: ++/* rule 26 can match eol */ + YY_RULE_SETUP +-#line 163 "scanner.l" +-{ return(TOK_GROUP_END); } ++#line 223 "scanner.l" ++{ /* ignore */ } + YY_BREAK + case 27: + YY_RULE_SETUP +-#line 164 "scanner.l" +-{ yylval->ival = 1; return(TOK_BOOLEAN); } ++#line 224 "scanner.l" ++{ /* ignore */ } + YY_BREAK + case 28: + YY_RULE_SETUP +-#line 165 "scanner.l" +-{ yylval->ival = 0; return(TOK_BOOLEAN); } ++#line 226 "scanner.l" ++{ return(TOK_EQUALS); } + YY_BREAK + case 29: + YY_RULE_SETUP +-#line 166 "scanner.l" +-{ yylval->sval = yytext; return(TOK_NAME); } ++#line 227 "scanner.l" ++{ return(TOK_COMMA); } + YY_BREAK + case 30: + YY_RULE_SETUP +-#line 167 "scanner.l" +-{ yylval->fval = atof(yytext); return(TOK_FLOAT); } ++#line 228 "scanner.l" ++{ return(TOK_GROUP_START); } + YY_BREAK + case 31: + YY_RULE_SETUP +-#line 168 "scanner.l" ++#line 229 "scanner.l" ++{ return(TOK_GROUP_END); } ++ YY_BREAK ++case 32: ++YY_RULE_SETUP ++#line 230 "scanner.l" ++{ yylval->ival = 1; return(TOK_BOOLEAN); } ++ YY_BREAK ++case 33: ++YY_RULE_SETUP ++#line 231 "scanner.l" ++{ yylval->ival = 0; return(TOK_BOOLEAN); } ++ YY_BREAK ++case 34: ++YY_RULE_SETUP ++#line 232 "scanner.l" ++{ yylval->sval = yytext; return(TOK_NAME); } ++ YY_BREAK ++case 35: ++YY_RULE_SETUP ++#line 233 "scanner.l" ++{ yylval->fval = atof(yytext); return(TOK_FLOAT); } ++ YY_BREAK ++case 36: ++YY_RULE_SETUP ++#line 234 "scanner.l" + { + long long llval; +- llval = atoll(yytext); ++ char *endptr; ++ int errsave = errno; ++ errno = 0; ++ llval = strtoll(yytext, &endptr, 0); /* base 10 or base 8 */ ++ if(*endptr || errno) ++ { ++ errno = 0; ++ return(TOK_ERROR); /* some error occured ... */ ++ } ++ errno = errsave; ++ if((*yytext == '0') && (*(yytext+1) != '\0')) ++ { /* it's octal... so INT we go */ ++ yylval->ival = (int)(llval); ++ return(TOK_INTEGER); ++ } ++ + if((llval < INT_MIN) || (llval > INT_MAX)) + { +- yylval->llval = llval; +- return(TOK_INTEGER64); ++ yylval->llval = llval; ++ return(TOK_INTEGER64); + } + else + { +- yylval->ival = llval; +- return(TOK_INTEGER); ++ yylval->ival = llval; ++ return(TOK_INTEGER); + } + } + YY_BREAK +-case 32: ++case 37: + YY_RULE_SETUP +-#line 182 "scanner.l" ++#line 263 "scanner.l" + { yylval->llval = atoll(yytext); return(TOK_INTEGER64); } + YY_BREAK +-case 33: ++case 38: + YY_RULE_SETUP +-#line 183 "scanner.l" ++#line 264 "scanner.l" + { + yylval->ival = strtoul(yytext, NULL, 16); + return(TOK_HEX); + } + YY_BREAK +-case 34: ++case 39: + YY_RULE_SETUP +-#line 187 "scanner.l" ++#line 268 "scanner.l" + { yylval->llval = fromhex(yytext); return(TOK_HEX64); } + YY_BREAK +-case 35: ++case 40: + YY_RULE_SETUP +-#line 188 "scanner.l" ++#line 269 "scanner.l" + { return(TOK_ARRAY_START); } + YY_BREAK +-case 36: ++case 41: + YY_RULE_SETUP +-#line 189 "scanner.l" ++#line 270 "scanner.l" + { return(TOK_ARRAY_END); } + YY_BREAK +-case 37: ++case 42: + YY_RULE_SETUP +-#line 190 "scanner.l" ++#line 271 "scanner.l" + { return(TOK_LIST_START); } + YY_BREAK +-case 38: ++case 43: + YY_RULE_SETUP +-#line 191 "scanner.l" ++#line 272 "scanner.l" + { return(TOK_LIST_END); } + YY_BREAK +-case 39: ++case 44: + YY_RULE_SETUP +-#line 192 "scanner.l" ++#line 273 "scanner.l" + { return(TOK_SEMICOLON); } + YY_BREAK +-case 40: ++case 45: + *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ + yyg->yy_c_buf_p = yy_cp -= 1; + YY_DO_BEFORE_ACTION; /* set up yytext again */ + YY_RULE_SETUP +-#line 193 "scanner.l" ++#line 274 "scanner.l" + { /* ignore */ } + YY_BREAK +-case 41: ++case 46: + YY_RULE_SETUP +-#line 194 "scanner.l" ++#line 275 "scanner.l" + { return(TOK_GARBAGE); } + YY_BREAK + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(COMMENT): + case YY_STATE_EOF(STRING): +-case YY_STATE_EOF(INCLUDE): +-#line 196 "scanner.l" ++case YY_STATE_EOF(INCLUDE_F): ++case YY_STATE_EOF(INCLUDE_D): ++#line 277 "scanner.l" + { +- YY_BUFFER_STATE buf = (YY_BUFFER_STATE)scanctx_pop_include( +- yyextra); +- if(buf) +- { +- libconfig_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner); +- libconfig_yy_switch_to_buffer(buf,yyscanner); +- } +- else +- yyterminate(); +- } ++ const char* error; ++ FILE *fp; ++ YY_BUFFER_STATE buf = (YY_BUFFER_STATE)scanctx_pop_include(yyextra); ++ if(buf) ++ { ++ libconfig_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner); ++ libconfig_yy_switch_to_buffer(buf,yyscanner); ++ } ++ else /* if no more buffers, we are done */ ++ yyterminate(); ++ ++ if(scanctx_inloop(yyextra)) ++ { ++ /* gotta keep looping.... */ ++ fp = scanctx_push_include(yyextra, ++ (void *)YY_CURRENT_BUFFER, ++ scanctx_filename(yyextra, NULL, scanctx_dirnext(yyextra)), ++ &error ++ ); ++ if(fp) ++ { ++ yyin = fp; ++ libconfig_yy_switch_to_buffer(libconfig_yy_create_buffer(yyin,YY_BUF_SIZE,yyscanner),yyscanner ++ ); ++ } ++ else ++ { ++ yyextra->config->error_text = error; ++ yyextra->config->error_file = scanctx_current_filename(yyextra); ++ yyextra->config->error_line = libconfig_yyget_lineno(yyscanner); ++ } ++ } ++ else /* not on loop, or just finished */ ++ scanctx_dirend(yyextra); ++ } + YY_BREAK +-case 42: ++case 47: + YY_RULE_SETUP +-#line 207 "scanner.l" ++#line 315 "scanner.l" + ECHO; + YY_BREAK +-#line 1241 "scanner.c" ++#line 1374 "scanner.c" + + case YY_END_OF_BUFFER: + { +@@ -1367,7 +1500,6 @@ ECHO; + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +- } /* end of user's declarations */ + } /* end of libconfig_yylex */ + + /* yy_get_next_buffer - try to read in a new buffer +@@ -1424,21 +1556,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner) + + else + { +- yy_size_t num_to_read = ++ int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ +- YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; ++ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { +- yy_size_t new_size = b->yy_buf_size * 2; ++ int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; +@@ -1469,7 +1601,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), +- yyg->yy_n_chars, num_to_read ); ++ yyg->yy_n_chars, (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } +@@ -1532,7 +1664,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 103 ) ++ if ( yy_current_state >= 117 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +@@ -1561,13 +1693,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner) + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; +- if ( yy_current_state >= 103 ) ++ if ( yy_current_state >= 117 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; +- yy_is_jam = (yy_current_state == 102); ++ yy_is_jam = (yy_current_state == 116); + +- (void)yyg; + return yy_is_jam ? 0 : yy_current_state; + } + +@@ -1596,7 +1727,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) + + else + { /* need more input */ +- yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++ int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) +@@ -1884,7 +2015,7 @@ void libconfig_yypop_buffer_state (yyscan_t yyscanner) + */ + static void libconfig_yyensure_buffer_stack (yyscan_t yyscanner) + { +- yy_size_t num_to_alloc; ++ int num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { +@@ -1982,12 +2113,12 @@ YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char * yystr , yyscan_t yyscan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +-YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) ++YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; +- yy_size_t i; ++ int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; +@@ -2097,7 +2228,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner) + /** Get the length of the current token. + * @param yyscanner The scanner object. + */ +-yy_size_t libconfig_yyget_leng (yyscan_t yyscanner) ++int libconfig_yyget_leng (yyscan_t yyscanner) + { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +@@ -2133,7 +2264,7 @@ void libconfig_yyset_lineno (int line_number , yyscan_t yyscanner) + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) +- YY_FATAL_ERROR( "libconfig_yyset_lineno called with no buffer" ); ++ yy_fatal_error( "libconfig_yyset_lineno called with no buffer" , yyscanner); + + yylineno = line_number; + } +@@ -2148,7 +2279,7 @@ void libconfig_yyset_column (int column_no , yyscan_t yyscanner) + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) +- YY_FATAL_ERROR( "libconfig_yyset_column called with no buffer" ); ++ yy_fatal_error( "libconfig_yyset_column called with no buffer" , yyscanner); + + yycolumn = column_no; + } +@@ -2372,4 +2503,4 @@ void libconfig_yyfree (void * ptr , yyscan_t yyscanner) + + #define YYTABLES_NAME "yytables" + +-#line 207 "scanner.l" ++#line 315 "scanner.l" diff --git a/ports/libconfig/portfile.cmake b/ports/libconfig/portfile.cmake index 32571982e..7500e8118 100644 --- a/ports/libconfig/portfile.cmake +++ b/ports/libconfig/portfile.cmake @@ -8,6 +8,13 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix-scanner-source-msvc-patch.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-scanner-header-msvc-patch.patch" +) + set(DIRENT_HOME ${VCPKG_ROOT_DIR}/packages/dirent_${TARGET_TRIPLET}) set(MIINTTYPES_HOME ${VCPKG_ROOT_DIR}/packages/msinttypes_${TARGET_TRIPLET}) set(WIN_SRC ${SOURCE_PATH}/lib/win32) @@ -24,11 +31,11 @@ else() set(BUILD_SHARED_LIBRARY OFF) endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DBUILD_SHARED=${BUILD_SHARED_LIBRARY} OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) +vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libconfig RENAME copyright) -- cgit v1.2.3 From a88a904849e03cc807942f78edf06ba7b464b6cd Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 14:16:48 -0700 Subject: [kinectsdk1] Move includes to match how the SDK expects them to be included --- ports/kinectsdk1/CONTROL | 2 +- ports/kinectsdk1/portfile.cmake | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/ports/kinectsdk1/CONTROL b/ports/kinectsdk1/CONTROL index 21f531425..3d4c83fd2 100644 --- a/ports/kinectsdk1/CONTROL +++ b/ports/kinectsdk1/CONTROL @@ -1,3 +1,3 @@ Source: kinectsdk1 -Version: 1.8 +Version: 1.8-1 Description: Kinect for Windows SDK for Kinect v1 sensor. diff --git a/ports/kinectsdk1/portfile.cmake b/ports/kinectsdk1/portfile.cmake index 61f006492..3df29b3bf 100644 --- a/ports/kinectsdk1/portfile.cmake +++ b/ports/kinectsdk1/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) get_filename_component(KINECTSDK10_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect;SDKInstallPath]" ABSOLUTE CACHE) @@ -24,13 +12,15 @@ file( "${KINECTSDK10_DIR}/inc/NuiSensor.h" "${KINECTSDK10_DIR}/inc/NuiSkeleton.h" DESTINATION - ${CURRENT_PACKAGES_DIR}/include/kinectsdk1 + ${CURRENT_PACKAGES_DIR}/include ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(ARCHITECTURE x86) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(ARCHITECTURE amd64) +else() + message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() file( -- cgit v1.2.3 From 59441adf76db180ff9ba9b0d92443d607d7c4741 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 14:19:40 -0700 Subject: [kinectsdk1] Improve not-found error message --- ports/kinectsdk1/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/kinectsdk1/portfile.cmake b/ports/kinectsdk1/portfile.cmake index 3df29b3bf..aef4cd1c2 100644 --- a/ports/kinectsdk1/portfile.cmake +++ b/ports/kinectsdk1/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) get_filename_component(KINECTSDK10_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect;SDKInstallPath]" ABSOLUTE CACHE) if(NOT EXISTS "${KINECTSDK10_DIR}") - message(FATAL_ERROR "Error: Could not find Kinect for Windows SDK v1.x.") + message(FATAL_ERROR "Error: Could not find Kinect for Windows SDK v1.x. It can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=40278.") endif() file( -- cgit v1.2.3 From 2c248dd4a6f473e57ade0c529b81e3b8f3b4dd4e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 14:26:44 -0700 Subject: [rtmidi] Slightly simplify cmake replacement --- ports/rtmidi/CMakeLists.txt | 25 ++----------------------- ports/rtmidi/CONTROL | 2 +- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/ports/rtmidi/CMakeLists.txt b/ports/rtmidi/CMakeLists.txt index 0603fdcb8..91782fd18 100644 --- a/ports/rtmidi/CMakeLists.txt +++ b/ports/rtmidi/CMakeLists.txt @@ -1,32 +1,11 @@ cmake_minimum_required(VERSION 3.8) project(rtmidi CXX) -set(RTMIDI_SOURCES - ${PROJECT_SOURCE_DIR}/RtMidi.cpp - ${PROJECT_SOURCE_DIR}/rtmidi_c.cpp -) - -set(RTMIDI_HEADERS - ${PROJECT_SOURCE_DIR}/RtMidi.h - ${PROJECT_SOURCE_DIR}/rtmidi_c.h -) - -include_directories(${RTMIDI_HEADERS}) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(BUILD_SHARED_LIBS ON) -else() - set(BUILD_SHARED_LIBS OFF) -endif() - +add_library(rtmidi RtMidi.cpp rtmidi_c.cpp) if(BUILD_SHARED_LIBS) - add_library(rtmidi SHARED ${RTMIDI_SOURCES}) target_compile_definitions(rtmidi PRIVATE -DRTMIDI_EXPORT) -else() - add_library(rtmidi STATIC ${RTMIDI_SOURCES}) endif() - file(READ "${PROJECT_SOURCE_DIR}/rtmidi_c.h" RTMIDI_EXPORT) if (BUILD_SHARED_LIBS) string(REPLACE "if defined(RTMIDI_EXPORT)" "if 1" RTMIDI_EXPORT "${RTMIDI_EXPORT}") @@ -43,6 +22,6 @@ install( ) if(NOT DISABLE_INSTALL_HEADERS) - install(FILES "${PROJECT_SOURCE_DIR}/RtMidi.h" DESTINATION include) + install(FILES "RtMidi.h" DESTINATION include) install(FILES "${PROJECT_BINARY_DIR}/rtmidi_c.h" DESTINATION include) endif() diff --git a/ports/rtmidi/CONTROL b/ports/rtmidi/CONTROL index 9cf64df9e..9057812a0 100644 --- a/ports/rtmidi/CONTROL +++ b/ports/rtmidi/CONTROL @@ -1,3 +1,3 @@ Source: rtmidi -Version: 2.1.1 +Version: 2.1.1-1 Description: A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK) and Windows (Multimedia) -- cgit v1.2.3 From 821039eeb702b0f65156fb5510d53b0b9210c506 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Wed, 28 Jun 2017 15:09:00 -0600 Subject: [tinyxml2] Update tinyxml2 to fix static linkage Also specify BUILD_STATIC_LIBS when building static --- ports/tinyxml2/CONTROL | 4 ++-- ports/tinyxml2/portfile.cmake | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL index ee5e20f34..aaa9a7c4f 100644 --- a/ports/tinyxml2/CONTROL +++ b/ports/tinyxml2/CONTROL @@ -1,3 +1,3 @@ Source: tinyxml2 -Version: 5.0.0 -Description: A simple, small, efficient, C++ XML parser \ No newline at end of file +Version: 5.0.1 +Description: A simple, small, efficient, C++ XML parser diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake index 59184178d..0c8b0b84b 100644 --- a/ports/tinyxml2/portfile.cmake +++ b/ports/tinyxml2/portfile.cmake @@ -3,13 +3,21 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO leethomason/tinyxml2 - REF 5.0.0 - SHA512 ef310a466d0aec9dd0d25063c68f5312cd063366ee57499d8e462e25a556ea510617b66cdec1a368e8867dc082e0297e27fe09f16eb915392235be34206881e4 + REF 5.0.1 + SHA512 a51ec5843774df0482620c549fb6c61d30a6db5025be26ff6d25b3c53533a27a57f00b026bd9fbca78e9e30084b3f5f6fbff9dba315d078419da084b57f518ba HEAD_REF master ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC_LIBS 1) +else() + set(BUILD_STATIC_LIBS 0) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} ) vcpkg_install_cmake() -- cgit v1.2.3 From 43ac9177ecde47a33b18e4e1c6617e15b3d3abd9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 15:12:28 -0700 Subject: [ctemplate] CMakeLists.txt simplification --- ports/ctemplate/CMakeLists.txt | 11 +++++------ ports/ctemplate/portfile.cmake | 9 +-------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/ports/ctemplate/CMakeLists.txt b/ports/ctemplate/CMakeLists.txt index 22869f7c5..c7cc211f4 100644 --- a/ports/ctemplate/CMakeLists.txt +++ b/ports/ctemplate/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.5.1) project(libctemplate C CXX) # find_package(PythonInterp) +if(NOT PYTHON_EXECUTABLE) + message(FATAL_ERROR "PYTHON_EXECUTABLE must be set") +endif() if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) @@ -73,14 +76,10 @@ execute_process( file(WRITE "${COMMON_INCLUDES}/htmlparser/htmlparser_fsm.h" "${HTMLPARSER_CONFIG_H}") file(WRITE "${COMMON_INCLUDES}/htmlparser/jsparser_fsm.h" "${JSPASPER_CONFIG_H}") -option(BUILD_SHARED_LIBRARY "Building shared library" ON) - include_directories(${COMMON_INCLUDES}) -if(BUILD_SHARED_LIBRARY) - add_library(libctemplate SHARED ${SRC_FILES}) -else() - add_library(libctemplate STATIC ${SRC_FILES} ) +add_library(libctemplate ${SRC_FILES}) +if(NOT BUILD_SHARED_LIBS) # Note: CTEMPLATE_DLL_DECL should be empty to build static file target_compile_definitions(libctemplate PRIVATE -DCTEMPLATE_DLL_DECL=) endif() diff --git a/ports/ctemplate/portfile.cmake b/ports/ctemplate/portfile.cmake index cb1e07b74..af1f0532c 100644 --- a/ports/ctemplate/portfile.cmake +++ b/ports/ctemplate/portfile.cmake @@ -19,16 +19,9 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/fix-msvc.patch ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set (BUILD_SHARED_LIBRARY ON) -else() - set(BUILD_SHARED_LIBRARY OFF) -endif() - - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DPYTHON_EXECUTABLE=${PYTHON2} -DBUILD_SHARED_LIBRARY=${BUILD_SHARED_LIBRARY} + OPTIONS -DPYTHON_EXECUTABLE=${PYTHON2} OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) -- cgit v1.2.3 From 78349d7a0c4cd0d2df1f120cbe58be9fa873757c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 15:27:08 -0700 Subject: [speex] Simplify CMakeLists.txt --- ports/speex/CMakeLists.txt | 121 +++++++++++++++++---------------------------- ports/speex/portfile.cmake | 7 +-- 2 files changed, 48 insertions(+), 80 deletions(-) diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt index 1c1a42a80..eff1d585a 100644 --- a/ports/speex/CMakeLists.txt +++ b/ports/speex/CMakeLists.txt @@ -1,10 +1,11 @@ cmake_minimum_required (VERSION 3.8.0) -project (libspeex) +project (libspeex C) + +if(BUILD_SHARED_LIBS) + message(FATAL_ERROR "This CMake buildsystem only supports static builds") +endif() set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/include) -set(SOURCE_PATH ${PROJECT_SOURCE_DIR}) -set(SPEEX_PATH ${SOURCE_PATH}/include/speex) -set(LIBSPEEX_PATH ${SOURCE_PATH}/libspeex) option(USE_SSE "USE_SSE used Note: USE_SSE and FIXED_POINT are mutually exclusive." ON) if(MSVC) @@ -16,82 +17,48 @@ if(MSVC) endif() endif() +include_directories(win32 include) + +set(CMAKE_DEBUG_POSTFIX d) -set(LIB_HEADERS - "${LIBSPEEX_PATH}/cb_search.h" - "${SOURCE_PATH}/win32/config.h" - "${LIBSPEEX_PATH}/fftwrap.h" - "${LIBSPEEX_PATH}/filters.h" - "${LIBSPEEX_PATH}/filters_sse.h" - "${LIBSPEEX_PATH}/kiss_fft.h" - "${LIBSPEEX_PATH}/kiss_fftr.h" - "${LIBSPEEX_PATH}/lpc.h" - "${LIBSPEEX_PATH}/arch.h" - "${LIBSPEEX_PATH}/lsp.h" - "${LIBSPEEX_PATH}/ltp.h" - "${LIBSPEEX_PATH}/ltp_sse.h" - "${LIBSPEEX_PATH}/math_approx.h" - "${LIBSPEEX_PATH}/modes.h" - "${LIBSPEEX_PATH}/nb_celp.h" - "${LIBSPEEX_PATH}/quant_lsp.h" - "${LIBSPEEX_PATH}/sb_celp.h" - "${LIBSPEEX_PATH}/stack_alloc.h" - "${LIBSPEEX_PATH}/vbr.h" - "${LIBSPEEX_PATH}/vq.h" -) -set( - SPEEX_HEADERS - "${SPEEX_PATH}/speex.h" - "${SPEEX_PATH}/speex_bits.h" - "${SPEEX_PATH}/speex_callbacks.h" - "${SPEEX_PATH}/speex_header.h" - "${SPEEX_PATH}/speex_stereo.h" - "${SPEEX_PATH}/speex_types.h" -) set(SRC - "${LIBSPEEX_PATH}/bits.c" - "${LIBSPEEX_PATH}/cb_search.c" - "${LIBSPEEX_PATH}/exc_10_16_table.c" - "${LIBSPEEX_PATH}/exc_10_32_table.c" - "${LIBSPEEX_PATH}/exc_20_32_table.c" - "${LIBSPEEX_PATH}/exc_5_256_table.c" - "${LIBSPEEX_PATH}/exc_5_64_table.c" - "${LIBSPEEX_PATH}/exc_8_128_table.c" - "${LIBSPEEX_PATH}/fftwrap.c" - "${LIBSPEEX_PATH}/filters.c" - "${LIBSPEEX_PATH}/gain_table.c" - "${LIBSPEEX_PATH}/gain_table_lbr.c" - "${LIBSPEEX_PATH}/hexc_10_32_table.c" - "${LIBSPEEX_PATH}/hexc_table.c" - "${LIBSPEEX_PATH}/high_lsp_tables.c" - "${LIBSPEEX_PATH}/kiss_fft.c" - "${LIBSPEEX_PATH}/kiss_fftr.c" - "${LIBSPEEX_PATH}/lpc.c" - "${LIBSPEEX_PATH}/lsp.c" - "${LIBSPEEX_PATH}/lsp_tables_nb.c" - "${LIBSPEEX_PATH}/ltp.c" - "${LIBSPEEX_PATH}/modes.c" - "${LIBSPEEX_PATH}/modes_wb.c" - "${LIBSPEEX_PATH}/nb_celp.c" - "${LIBSPEEX_PATH}/quant_lsp.c" - "${LIBSPEEX_PATH}/sb_celp.c" - "${LIBSPEEX_PATH}/smallft.c" - "${LIBSPEEX_PATH}/speex.c" - "${LIBSPEEX_PATH}/speex_callbacks.c" - "${LIBSPEEX_PATH}/speex_header.c" - "${LIBSPEEX_PATH}/stereo.c" - "${LIBSPEEX_PATH}/vbr.c" - "${LIBSPEEX_PATH}/vq.c" - "${LIBSPEEX_PATH}/window.c" + "libspeex/bits.c" + "libspeex/cb_search.c" + "libspeex/exc_10_16_table.c" + "libspeex/exc_10_32_table.c" + "libspeex/exc_20_32_table.c" + "libspeex/exc_5_256_table.c" + "libspeex/exc_5_64_table.c" + "libspeex/exc_8_128_table.c" + "libspeex/fftwrap.c" + "libspeex/filters.c" + "libspeex/gain_table.c" + "libspeex/gain_table_lbr.c" + "libspeex/hexc_10_32_table.c" + "libspeex/hexc_table.c" + "libspeex/high_lsp_tables.c" + "libspeex/kiss_fft.c" + "libspeex/kiss_fftr.c" + "libspeex/lpc.c" + "libspeex/lsp.c" + "libspeex/lsp_tables_nb.c" + "libspeex/ltp.c" + "libspeex/modes.c" + "libspeex/modes_wb.c" + "libspeex/nb_celp.c" + "libspeex/quant_lsp.c" + "libspeex/sb_celp.c" + "libspeex/smallft.c" + "libspeex/speex.c" + "libspeex/speex_callbacks.c" + "libspeex/speex_header.c" + "libspeex/stereo.c" + "libspeex/vbr.c" + "libspeex/vq.c" + "libspeex/window.c" ) -file(COPY ${LIB_HEADERS} DESTINATION ${COMMON_INCLUDES}/) -file(COPY ${SPEEX_HEADERS} DESTINATION ${COMMON_INCLUDES}/speex) - - -include_directories(${COMMON_INCLUDES}) -add_library (libspeex STATIC ${SRC}) - +add_library(libspeex ${SRC}) install( TARGETS libspeex @@ -101,5 +68,5 @@ install( ) if(NOT DISABLE_INSTALL_HEADERS) - install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include/ FILES_MATCHING PATTERN "*.h") + install(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*.h") endif() diff --git a/ports/speex/portfile.cmake b/ports/speex/portfile.cmake index 96e8526ab..75841d7d0 100644 --- a/ports/speex/portfile.cmake +++ b/ports/speex/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic ) - message(STATUS "Speex support visibility on Win32 ye. Building static.") +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Speex doesn't support visibility on Win32 yet. Building static.") message(STATUS "See https://github.com/xiph/speex/blob/master/win32/config.h for more") - set(VCPKG_LIBRARY_LINKAGE dynamic) + set(VCPKG_LIBRARY_LINKAGE static) endif() vcpkg_from_github( @@ -18,6 +18,7 @@ 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 ) -- cgit v1.2.3 From 76ca4cb60e75ed30357dc7d91e6f803146f78684 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 28 Jun 2017 15:36:09 -0700 Subject: Add description and version name --- ports/speex/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL index 64514910e..bec6229e1 100644 --- a/ports/speex/CONTROL +++ b/ports/speex/CONTROL @@ -1,3 +1,3 @@ Source: speex -Version: -Description: +Version: 2017-06-28-cae5026cfd88782c7051af6e685059223578b7e9 +Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. -- cgit v1.2.3 From e6d1f16038824274a8797f2bff1179c178eee23c Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 28 Jun 2017 16:12:00 -0700 Subject: use CMake's autoexport --- ports/speex/CMakeLists.txt | 5 +---- ports/speex/portfile.cmake | 6 ------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt index eff1d585a..839222ae6 100644 --- a/ports/speex/CMakeLists.txt +++ b/ports/speex/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required (VERSION 3.8.0) project (libspeex C) -if(BUILD_SHARED_LIBS) - message(FATAL_ERROR "This CMake buildsystem only supports static builds") -endif() - set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/include) option(USE_SSE "USE_SSE used Note: USE_SSE and FIXED_POINT are mutually exclusive." ON) @@ -56,6 +52,7 @@ set(SRC "libspeex/vbr.c" "libspeex/vq.c" "libspeex/window.c" + "win32/libspeex.def" ) add_library(libspeex ${SRC}) diff --git a/ports/speex/portfile.cmake b/ports/speex/portfile.cmake index 75841d7d0..f6d2108e0 100644 --- a/ports/speex/portfile.cmake +++ b/ports/speex/portfile.cmake @@ -1,11 +1,5 @@ include(vcpkg_common_functions) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "Speex doesn't support visibility on Win32 yet. Building static.") - message(STATUS "See https://github.com/xiph/speex/blob/master/win32/config.h for more") - set(VCPKG_LIBRARY_LINKAGE static) -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/speex -- cgit v1.2.3 From 6aae6ca3c0384d23c901e80cfbd46ed32a29321d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Jun 2017 19:21:55 -0700 Subject: [eigen3] Fix installed cmake-config files to be relative --- ports/eigen3/CONTROL | 2 +- ports/eigen3/portfile.cmake | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL index d6e01c6cc..4dd1cd983 100644 --- a/ports/eigen3/CONTROL +++ b/ports/eigen3/CONTROL @@ -1,3 +1,3 @@ Source: eigen3 -Version: 3.3.3-2 +Version: 3.3.3-3 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 229da45e7..ba968950a 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -21,6 +21,10 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(READ "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" EIGEN_TARGETS) +string(REPLACE "set(_IMPORT_PREFIX " "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}/../..\" ABSOLUTE) #" EIGEN_TARGETS "${EIGEN_TARGETS}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" "${EIGEN_TARGETS}") + # Put the licence file where vcpkg expects it file(COPY ${SOURCE_PATH}/COPYING.README DESTINATION ${CURRENT_PACKAGES_DIR}/share/eigen3) file(RENAME ${CURRENT_PACKAGES_DIR}/share/eigen3/COPYING.README ${CURRENT_PACKAGES_DIR}/share/eigen3/copyright) -- cgit v1.2.3 From 49d00f460453fbbedd9cdee635720d0bc84de9cb Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 28 Jun 2017 21:46:53 -0700 Subject: [rocksdb] fixed third party deps --- ports/rocksdb/CONTROL | 2 +- .../fix-building-both-static-and-shared.patch | 91 ++++++++++++++++++++++ ports/rocksdb/fix-third-party-deps.patch | 64 +++++++++++++++ ports/rocksdb/portfile.cmake | 75 +++++------------- 4 files changed, 175 insertions(+), 57 deletions(-) create mode 100644 ports/rocksdb/fix-building-both-static-and-shared.patch create mode 100644 ports/rocksdb/fix-third-party-deps.patch diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index a9c879104..2efbda7c3 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,4 @@ Source: rocksdb -Version: 5.4.6 +Version: 2017-06-28-18c63af6ef2b9f014c404b88488ae52e6fead03c Description: A library that provides an embeddable, persistent key-value store for fast storage Build-Depends: snappy, lz4, gflags, zlib, gtest diff --git a/ports/rocksdb/fix-building-both-static-and-shared.patch b/ports/rocksdb/fix-building-both-static-and-shared.patch new file mode 100644 index 000000000..78b863643 --- /dev/null +++ b/ports/rocksdb/fix-building-both-static-and-shared.patch @@ -0,0 +1,91 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cbbde8e..cb19649 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -315,10 +315,13 @@ endif() + + include_directories(${PROJECT_SOURCE_DIR}) + include_directories(${PROJECT_SOURCE_DIR}/include) +-include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src) ++ + find_package(Threads REQUIRED) + +-add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) ++if(BUILD_TEST) ++ include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src) ++ add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) ++endif() + + # Main library source code + +@@ -574,22 +577,28 @@ if(WITH_LIBRADOS) + list(APPEND THIRDPARTY_LIBS rados) + endif() + +-add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES}) +-target_link_libraries(${ROCKSDB_STATIC_LIB} ++if(BUILD_STATIC_LIBRARY) ++ add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES}) ++ target_link_libraries(${ROCKSDB_STATIC_LIB} + ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) +- +-if(WIN32) +- add_library(${ROCKSDB_IMPORT_LIB} SHARED ${SOURCES}) +- target_link_libraries(${ROCKSDB_IMPORT_LIB} +- ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) +- set_target_properties(${ROCKSDB_IMPORT_LIB} PROPERTIES +- COMPILE_DEFINITIONS "ROCKSDB_DLL;ROCKSDB_LIBRARY_EXPORTS") + if(MSVC) + set_target_properties(${ROCKSDB_STATIC_LIB} PROPERTIES +- COMPILE_FLAGS "/Fd${CMAKE_CFG_INTDIR}/${ROCKSDB_STATIC_LIB}.pdb") ++ COMPILE_FLAGS "/Fd${CMAKE_CFG_INTDIR}/${ROCKSDB_STATIC_LIB}.pdb") ++ endif() ++ set(INSTALL_TARGETS ${INSTALL_TARGETS} ${ROCKSDB_STATIC_LIB}) ++else() ++ if(WIN32) ++ add_library(${ROCKSDB_IMPORT_LIB} SHARED ${SOURCES}) ++ target_link_libraries(${ROCKSDB_IMPORT_LIB} ++ ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) + set_target_properties(${ROCKSDB_IMPORT_LIB} PROPERTIES ++ COMPILE_DEFINITIONS "ROCKSDB_DLL;ROCKSDB_LIBRARY_EXPORTS") ++ if(MSVC) ++ set_target_properties(${ROCKSDB_IMPORT_LIB} PROPERTIES + COMPILE_FLAGS "/Fd${CMAKE_CFG_INTDIR}/${ROCKSDB_IMPORT_LIB}.pdb") ++ endif() + endif() ++ set(INSTALL_TARGETS ${INSTALL_TARGETS} ${ROCKSDB_IMPORT_LIB}) + endif() + + option(WITH_JNI "build with JNI" OFF) +@@ -600,6 +609,7 @@ else() + message(STATUS "JNI library is disabled") + endif() + ++if(BUILD_TEST) + set(TESTS + cache/cache_test.cc + cache/lru_cache_test.cc +@@ -810,6 +820,7 @@ foreach(sourcefile ${C_TEST_EXES}) + add_dependencies(check ${exename}${ARTIFACT_SUFFIX}) + endforeach(sourcefile ${C_TEST_EXES}) + add_subdirectory(tools) ++endif() + + # Installation and packaging for Linux + if(NOT WIN32) +@@ -819,4 +830,15 @@ install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/rocksdb/" + COMPONENT devel + DESTINATION include/rocksdb) + set(CMAKE_INSTALL_PREFIX /usr) ++else() ++ install( ++ TARGETS ${INSTALL_TARGETS} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) ++endif() ++ ++if(NOT DISABLE_INSTALL_HEADERS) ++ install(DIRECTORY "include/rocksdb/" DESTINATION include/rocksdb) + endif() diff --git a/ports/rocksdb/fix-third-party-deps.patch b/ports/rocksdb/fix-third-party-deps.patch new file mode 100644 index 000000000..7f832d158 --- /dev/null +++ b/ports/rocksdb/fix-third-party-deps.patch @@ -0,0 +1,64 @@ +diff --git a/thirdparty.inc b/thirdparty.inc +index 9fffd9b..2e1ea9d 100644 +--- a/thirdparty.inc ++++ b/thirdparty.inc +@@ -21,10 +21,10 @@ set (THIRDPARTY_LIBS "") # Initialization, don't touch + # + # Edit these 4 lines to define paths to GFLAGS + # +-set(GFLAGS_HOME $ENV{THIRDPARTY_HOME}/Gflags.Library) +-set(GFLAGS_INCLUDE ${GFLAGS_HOME}/inc/include) +-set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/bin/debug/amd64/gflags.lib) +-set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/bin/retail/amd64/gflags.lib) ++set(GFLAGS_HOME ${CURRENT_INSTALLED_DIR}) ++set(GFLAGS_INCLUDE ${GFLAGS_HOME}/include) ++set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/debug/lib/gflags.lib) ++set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/lib/gflags.lib) + + # ================================================== GFLAGS ================================================== + # +@@ -65,10 +65,10 @@ endif () + # + # Edit these 4 lines to define paths to Snappy + # +-set(SNAPPY_HOME $ENV{THIRDPARTY_HOME}/Snappy.Library) +-set(SNAPPY_INCLUDE ${SNAPPY_HOME}/inc/inc) +-set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/bin/debug/amd64/snappy.lib) +-set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/bin/retail/amd64/snappy.lib) ++set(SNAPPY_HOME ${CURRENT_INSTALLED_DIR}) ++set(SNAPPY_INCLUDE ${SNAPPY_HOME}/include) ++set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/debug/lib/snappy.lib) ++set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/lib/snappy.lib) + + # + # Don't touch these lines +@@ -108,10 +108,10 @@ endif () + # + # Edit these 4 lines to define paths to LZ4 + # +-set(LZ4_HOME $ENV{THIRDPARTY_HOME}/LZ4.Library) +-set(LZ4_INCLUDE ${LZ4_HOME}/inc/include) +-set(LZ4_LIB_DEBUG ${LZ4_HOME}/bin/debug/amd64/lz4.lib) +-set(LZ4_LIB_RELEASE ${LZ4_HOME}/bin/retail/amd64/lz4.lib) ++set(LZ4_HOME ${CURRENT_INSTALLED_DIR}) ++set(LZ4_INCLUDE ${LZ4_HOME}/include) ++set(LZ4_LIB_DEBUG ${LZ4_HOME}/debug/lib/lz4.lib) ++set(LZ4_LIB_RELEASE ${LZ4_HOME}/lib/lz4.lib) + + # + # Don't touch these lines +@@ -151,10 +151,10 @@ endif () + # + # Edit these 4 lines to define paths to ZLIB + # +-set(ZLIB_HOME $ENV{THIRDPARTY_HOME}/ZLIB.Library) +-set(ZLIB_INCLUDE ${ZLIB_HOME}/inc/include) +-set(ZLIB_LIB_DEBUG ${ZLIB_HOME}/bin/debug/amd64/zlib.lib) +-set(ZLIB_LIB_RELEASE ${ZLIB_HOME}/bin/retail/amd64/zlib.lib) ++set(ZLIB_HOME ${CURRENT_INSTALLED_DIR}) ++set(ZLIB_INCLUDE ${ZLIB_HOME}/include) ++set(ZLIB_LIB_DEBUG ${ZLIB_HOME}/debug/lib/zlibd.lib) ++set(ZLIB_LIB_RELEASE ${ZLIB_HOME}/lib/zlib.lib) + + # + # Don't touch these lines diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index f47c2fb19..5c6741521 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -6,73 +6,31 @@ if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") message(FATAL_ERROR "Rocksdb only supports x64") endif() -set(VCPKG_PLATFORM_TOOLSET v140) -set(MSVS_VERSION 2015) - - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/rocksdb - REF v5.4.6 - SHA512 fe804335ef1b6e37df9b76ab665c1071253d62848878732e541e88444d9d226a1ac70a53a51641e1f554974711781d524d5069ac672589de7d2ec59874ec9290 + REF 18c63af6ef2b9f014c404b88488ae52e6fead03c + SHA512 8dd4d27768feba6d9ddb61debe6cae21fa6d25c27dc347cba3b28cc39d2c1fa860dba7c8adedba4b40883eccccca190b60941cf958855c6b70ec5a3b96c20ac5 HEAD_REF master ) -LIST(APPEND ENV_REPLACE_LIST - "set(GFLAGS_HOME \${CURRENT_INSTALLED_DIR})" - "set(GFLAGS_INCLUDE \${GFLAGS_HOME}/include)" - "set(GFLAGS_LIB_DEBUG \${GFLAGS_HOME}/debug/lib/gflags.lib)" - "set(GFLAGS_LIB_RELEASE \${GFLAGS_HOME}/lib/gflags.lib)" - "set(SNAPPY_HOME \${CURRENT_INSTALLED_DIR})" - "set(SNAPPY_INCLUDE \${SNAPPY_HOME}/include)" - "set(SNAPPY_LIB_DEBUG \${SNAPPY_HOME}/debug/lib/snappy.lib)" - "set(SNAPPY_LIB_RELEASE \${SNAPPY_HOME}/lib/snappy.lib)" - "set(LZ4_HOME \${CURRENT_INSTALLED_DIR})" - "set(LZ4_INCLUDE \${LZ4_HOME}/include)" - "set(LZ4_LIB_DEBUG \${LZ4_HOME}/debug/lib/lz4.lib)" - "set(LZ4_LIB_RELEASE \${LZ4_HOME}/lib/lz4.lib)" - "set(ZLIB_HOME \${CURRENT_INSTALLED_DIR})" - "set(ZLIB_INCLUDE \${ZLIB_HOME}/include)" - "set(ZLIB_LIB_DEBUG \${ZLIB_HOME}/debug/lib/zlibd.lib)" - "set(ZLIB_LIB_RELEASE \${ZLIB_HOME}/lib/zlib.lib)" +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix-building-both-static-and-shared.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-third-party-deps.patch" ) -LIST(APPEND ENV_FIND_LIST - "set(GFLAGS_HOME \$ENV{THIRDPARTY_HOME}/Gflags.Library)" - "set(GFLAGS_INCLUDE \${GFLAGS_HOME}/inc/include)" - "set(GFLAGS_LIB_DEBUG \${GFLAGS_HOME}/bin/debug/amd64/gflags.lib)" - "set(GFLAGS_LIB_RELEASE \${GFLAGS_HOME}/bin/retail/amd64/gflags.lib)" - "set(SNAPPY_HOME \$ENV{THIRDPARTY_HOME}/Snappy.Library)" - "set(SNAPPY_INCLUDE \${SNAPPY_HOME}/inc/inc)" - "set(SNAPPY_LIB_DEBUG \${SNAPPY_HOME}/bin/debug/amd64/snappy.lib)" - "set(SNAPPY_LIB_RELEASE \${SNAPPY_HOME}/bin/retail/amd64/snappy.lib)" - "set(LZ4_HOME \$ENV{THIRDPARTY_HOME}/LZ4.Library)" - "set(LZ4_INCLUDE \${LZ4_HOME}/inc/include)" - "set(LZ4_LIB_DEBUG \${LZ4_HOME}/bin/debug/amd64/lz4.lib)" - "set(LZ4_LIB_RELEASE \${LZ4_HOME}/bin/retail/amd64/lz4.lib)" - "set(ZLIB_HOME \$ENV{THIRDPARTY_HOME}/ZLIB.Library)" - "set(ZLIB_INCLUDE \${ZLIB_HOME}/inc/include)" - "set(ZLIB_LIB_DEBUG \${ZLIB_HOME}/bin/debug/amd64/zlib.lib)" - "set(ZLIB_LIB_RELEASE \${ZLIB_HOME}/bin/retail/amd64/zlib.lib)" -) - -message(STATUS "${SOURCE_PATH}/thirdparty.inc is here") -LIST( LENGTH ENV_REPLACE_LIST COUNT ) -MATH(EXPR COUNT "${COUNT}-1") - -file(READ "${SOURCE_PATH}/thirdparty.inc" THIRDY_PARTY) -foreach( INDEX RANGE ${COUNT}) - list (GET ENV_REPLACE_LIST ${INDEX} TO_REPLACE) - list (GET ENV_FIND_LIST ${INDEX} TO_FIND) - message(STATUS "Replacing ${TO_FIND} to ${TO_REPLACE} ") - string(REPLACE ${TO_FIND} ${TO_REPLACE} THIRDY_PARTY "${THIRDY_PARTY}") -endforeach() - -file(WRITE "${SOURCE_PATH}/thirdparty.inc" "${THIRDY_PARTY}") +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC_LIBRARY ON) +else() + set(BUILD_STATIC_LIBRARY OFF) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DGIT_EXECUTABLE=${GIT} -DGFLAGS=1 @@ -80,7 +38,12 @@ vcpkg_configure_cmake( -DLZ4=1 -DZLIB=1 -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} + -DBUILD_STATIC_LIBRARY=${BUILD_STATIC_LIBRARY} + -DFAIL_ON_WARNINGS=OFF + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON ) +vcpkg_install_cmake(DISABLE_PARALLEL) -vcpkg_build_cmake() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb RENAME copyright) -- cgit v1.2.3 From 618a18417cce873737cc72842ab94ca8a7613d7e Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 28 Jun 2017 21:53:09 -0700 Subject: [rocksdb] vcpkg_copy_pdbs --- ports/rocksdb/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 5c6741521..34ec5f334 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -47,3 +47,5 @@ vcpkg_configure_cmake( vcpkg_install_cmake(DISABLE_PARALLEL) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From b8bfb0fd90694dd56ff8d951ed219a8e9d80c2d8 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 28 Jun 2017 22:10:09 -0700 Subject: [rocksdb]fix crt issues --- ports/rocksdb/portfile.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 34ec5f334..883e03d5b 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -28,6 +28,12 @@ else() set(BUILD_STATIC_LIBRARY OFF) endif() +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(WITH_MD_LIBRARY OFF) +else() + set(WITH_MD_LIBRARY ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -40,6 +46,7 @@ vcpkg_configure_cmake( -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} -DBUILD_STATIC_LIBRARY=${BUILD_STATIC_LIBRARY} -DFAIL_ON_WARNINGS=OFF + -DWITH_MD_LIBRARY=${WITH_MD_LIBRARY} OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) -- cgit v1.2.3 From 348c60112235b74add06ff0d13d948898a309e44 Mon Sep 17 00:00:00 2001 From: Hennadii Zabula Date: Fri, 23 Jun 2017 16:40:16 +0300 Subject: Fix uwp build --- ports/angle/001-fix-uwp.patch | 113 +++++++++++++++++++++++++++++++++++ ports/angle/CMakeListsUwp.txt | 136 ++++++++++++++++++++++++++++++++++++++++++ ports/angle/portfile.cmake | 11 +++- 3 files changed, 259 insertions(+), 1 deletion(-) create mode 100644 ports/angle/001-fix-uwp.patch create mode 100644 ports/angle/CMakeListsUwp.txt diff --git a/ports/angle/001-fix-uwp.patch b/ports/angle/001-fix-uwp.patch new file mode 100644 index 000000000..bae1c8724 --- /dev/null +++ b/ports/angle/001-fix-uwp.patch @@ -0,0 +1,113 @@ +diff --git "a//src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp" "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp" +index dd37ace8..9116b9e6 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp" +@@ -141,6 +141,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, + unsigned int width, + unsigned int height, + bool containsAlpha, ++ unsigned int samples, + IDXGISwapChain1 **swapChain) + { + if (device == nullptr || factory == nullptr || swapChain == nullptr || width == 0 || +@@ -154,7 +155,7 @@ HRESULT CoreWindowNativeWindow::createSwapChain(ID3D11Device *device, + swapChainDesc.Height = height; + swapChainDesc.Format = format; + swapChainDesc.Stereo = FALSE; +- swapChainDesc.SampleDesc.Count = 1; ++ swapChainDesc.SampleDesc.Count = samples; + swapChainDesc.SampleDesc.Quality = 0; + swapChainDesc.BufferUsage = + DXGI_USAGE_SHADER_INPUT | DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_BACK_BUFFER; +diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h" +index d43bf0ba..77b4ae95 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.h" +@@ -32,7 +32,8 @@ class CoreWindowNativeWindow : public InspectableNativeWindow, public std::enabl + DXGI_FORMAT format, + unsigned int width, + unsigned int height, +- bool containsAlpha, ++ bool containsAlpha, ++ unsigned int samples, + IDXGISwapChain1 **swapChain) override; + + protected: +diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" +index 3e67269f..a66935ce 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/InspectableNativeWindow.h" +@@ -53,6 +53,7 @@ class InspectableNativeWindow + unsigned int width, + unsigned int height, + bool containsAlpha, ++ unsigned int samples, + IDXGISwapChain1 **swapChain) = 0; + + bool getClientRect(RECT *rect) +diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp" "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp" +index 2ef2235c..284fccbb 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.cpp" +@@ -89,6 +89,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device, + DXGI_FORMAT format, + UINT width, + UINT height, ++ UINT samples, + IDXGISwapChain **swapChain) + { + if (mImpl) +@@ -96,7 +97,7 @@ HRESULT NativeWindow11WinRT::createSwapChain(ID3D11Device *device, + IDXGIFactory2 *factory2 = d3d11::DynamicCastComObject(factory); + IDXGISwapChain1 *swapChain1 = nullptr; + HRESULT result = +- mImpl->createSwapChain(device, factory2, format, width, height, mHasAlpha, &swapChain1); ++ mImpl->createSwapChain(device, factory2, format, width, height, mHasAlpha, samples, &swapChain1); + SafeRelease(factory2); + *swapChain = static_cast(swapChain1); + return result; +diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h" +index 996fd3a1..97a2c2c4 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/NativeWindow11WinRT.h" +@@ -34,6 +34,7 @@ class NativeWindow11WinRT : public NativeWindow11 + DXGI_FORMAT format, + UINT width, + UINT height, ++ UINT samples, + IDXGISwapChain **swapChain) override; + + void commitChange() override; +diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp" "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp" +index c6d07fc8..89d9f870 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.cpp" +@@ -246,6 +246,7 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device, + unsigned int width, + unsigned int height, + bool containsAlpha, ++ unsigned int samples, + IDXGISwapChain1 **swapChain) + { + if (device == nullptr || factory == nullptr || swapChain == nullptr || width == 0 || +@@ -259,7 +260,7 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device, + swapChainDesc.Height = height; + swapChainDesc.Format = format; + swapChainDesc.Stereo = FALSE; +- swapChainDesc.SampleDesc.Count = 1; ++ swapChainDesc.SampleDesc.Count = samples; + swapChainDesc.SampleDesc.Quality = 0; + swapChainDesc.BufferUsage = + DXGI_USAGE_SHADER_INPUT | DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_BACK_BUFFER; +diff --git "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" +index f9a2fc0e..dc5c804e 100644 +--- "a/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" ++++ "b/src/libANGLE/renderer/d3d/d3d11/winrt/SwapChainPanelNativeWindow.h" +@@ -27,6 +27,7 @@ class SwapChainPanelNativeWindow : public InspectableNativeWindow, public std::e + unsigned int width, + unsigned int height, + bool containsAlpha, ++ unsigned int samples, + IDXGISwapChain1 **swapChain) override; + + protected: diff --git a/ports/angle/CMakeListsUwp.txt b/ports/angle/CMakeListsUwp.txt new file mode 100644 index 000000000..b339ca4e5 --- /dev/null +++ b/ports/angle/CMakeListsUwp.txt @@ -0,0 +1,136 @@ +cmake_minimum_required(VERSION 3.8) +project(angle) + +add_compile_options(/d2guard4 /Wv:18 /WX) +set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /guard:cf") + +add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DANGLE_STANDALONE_BUILD -DANGLE_ENABLE_DEBUG_ANNOTATIONS) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/id/commit.h" "#define ANGLE_COMMIT_HASH \"invalid-hash\"\n#define ANGLE_COMMIT_HASH_SIZE 12\n#define ANGLE_COMMIT_DATE \"invalid-date\"\n") + +include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) + +########## +# anglebase +add_library(anglebase INTERFACE) +file(GLOB_RECURSE anglebase_SOURCES "src/common/third_party/base/*.h") +target_sources(anglebase INTERFACE ${anglebase_SOURCES}) +target_include_directories(anglebase INTERFACE src/common/third_party/base) + +########## +# angle_common +file(GLOB ANGLE_COMMON_SOURCES "src/common/*.h" "src/common/*.inl" "src/common/*.cpp") +list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|_linux|_mac") +add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES}) +target_link_libraries(angle_common PUBLIC anglebase) + +########## +# angle_image_util +file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp") +add_library(angle_image_util STATIC ${ANGLE_IMAGE_UTIL_SOURCES}) +target_link_libraries(angle_image_util PRIVATE angle_common) + +########## +# translator +file(GLOB TRANSLATOR_SOURCES + "src/compiler/translator/glslang.l" + "src/compiler/translator/glslang.y" + "src/compiler/translator/*.h" + "src/compiler/translator/*.cpp" + "src/third_party/compiler/ArrayBoundsClamper.cpp" +) +add_library(translator STATIC ${TRANSLATOR_SOURCES}) +target_compile_definitions(translator PUBLIC + -DANGLE_ENABLE_ESSL + -DANGLE_ENABLE_GLSL + -DANGLE_ENABLE_HLSL +) +target_link_libraries(translator PRIVATE angle_common) + +########## +# preprocessor +file(GLOB PREPROCESSOR_SOURCES + "src/compiler/preprocessor/*.h" + "src/compiler/preprocessor/*.cpp" +) +add_library(preprocessor STATIC ${PREPROCESSOR_SOURCES}) +target_link_libraries(preprocessor PRIVATE angle_common) + +########## +# libANGLE +file(GLOB LIBANGLE_SOURCES + "src/third_party/systeminfo/SystemInfo.cpp" + "src/common/third_party/murmurhash/MurmurHash3.cpp" + "src/common/event_tracer.cpp" + + "src/libANGLE/*.cpp" + "src/libANGLE/*.inl" + "src/libANGLE/*.h" + + "src/libANGLE/renderer/*.cpp" + "src/libANGLE/renderer/*.inl" + "src/libANGLE/renderer/*.h" + + "src/libANGLE/renderer/null/*.cpp" + "src/libANGLE/renderer/null/*.inl" + "src/libANGLE/renderer/null/*.h" +) +file(GLOB_RECURSE LIBANGLE_D3D_SOURCES "src/libANGLE/renderer/d3d/*.h" "src/libANGLE/renderer/d3d/*.cpp" "src/libANGLE/renderer/d3d/*.inl") +list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") +list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest|d3d9|win32") +add_library(libANGLE STATIC ${LIBANGLE_SOURCES} ${LIBANGLE_D3D_SOURCES}) +find_library(D3D11_LIB NAMES d3d11) +find_library(DXGUID_LIB NAMES dxguid) +target_link_libraries(libANGLE PRIVATE angle_common angle_image_util translator ${D3D9_LIB} ${DXGUID_LIB} preprocessor) +target_include_directories(libANGLE PRIVATE "src/third_party/khronos") + +list(APPEND ANGLE_DEFINITIONS -DANGLE_ENABLE_D3D11) +list(APPEND ANGLE_DEFINITIONS -DANGLE_ENABLE_NULL) + +target_compile_definitions(libANGLE PUBLIC + ${ANGLE_DEFINITIONS} +) +target_compile_definitions(libANGLE PRIVATE -DLIBANGLE_IMPLEMENTATION) + +########## +# libGLESv2 +file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2.def") +add_library(libGLESv2 ${LIBGLESV2_SOURCES}) +target_link_libraries(libGLESv2 PRIVATE angle_common libANGLE) +target_compile_definitions(libGLESv2 PRIVATE + -DLIBGLESV2_IMPLEMENTATION + -DLIBANGLE_IMPLEMENTATION + -DGL_GLEXT_PROTOTYPES + "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" + -DGL_APICALL= + -DEGLAPI= +) + +########## +# libEGL +add_library(libEGL "src/libEGL/libEGL.def" "src/libEGL/libEGL.cpp" "src/libEGL/libEGL.rc" "src/libEGL/resource.h") +target_link_libraries(libEGL PRIVATE angle_common libANGLE libGLESv2) +target_compile_definitions(libEGL PRIVATE + -DLIBANGLE_IMPLEMENTATION + -DGL_GLEXT_PROTOTYPES + "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" + -DGL_APICALL= + -DEGLAPI= +) + + +install(TARGETS libEGL libGLESv2 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY include/ + DESTINATION include + FILES_MATCHING PATTERN "*.h" + PATTERN "GLSLANG" EXCLUDE + PATTERN "export.h" EXCLUDE + ) +endif() diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake index 4668b7dea..d2b61c9cf 100644 --- a/ports/angle/portfile.cmake +++ b/ports/angle/portfile.cmake @@ -13,7 +13,16 @@ vcpkg_from_github( HEAD_REF master ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +if(NOT TARGET_TRIPLET MATCHES "uwp") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +else() + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeListsUwp.txt DESTINATION ${SOURCE_PATH}) + file(RENAME ${SOURCE_PATH}/CMakeListsUwp.txt ${SOURCE_PATH}/CMakeLists.txt) + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch + ) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From aa56370103e712974a8269c427aee044fe81a892 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 29 Jun 2017 05:35:22 -0700 Subject: [libconfig] Fix description --- ports/libconfig/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libconfig/CONTROL b/ports/libconfig/CONTROL index 05e51e748..d86439cfd 100644 --- a/ports/libconfig/CONTROL +++ b/ports/libconfig/CONTROL @@ -1,4 +1,4 @@ Source: libconfig Version: 1.6.0 -Description: Library for collision detection between two convex shapes +Description: C/C++ library for processing configuration files Build-Depends: msinttypes, dirent -- cgit v1.2.3 From 18c5c3f23b3c4e644f22037800ff19d692475713 Mon Sep 17 00:00:00 2001 From: Bagong Date: Thu, 29 Jun 2017 16:23:50 +0200 Subject: Avoid build error _missing config.h_ on build of tools --- ports/aubio/CMakeLists.txt | 4 ++++ ports/aubio/CONTROL | 2 +- ports/aubio/portfile.cmake | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt index bb24c5b15..3e20a28f6 100644 --- a/ports/aubio/CMakeLists.txt +++ b/ports/aubio/CMakeLists.txt @@ -64,6 +64,10 @@ if(BUILD_TOOLS) target_link_libraries(${EXAMPLE_EXEC} PRIVATE aubio) target_compile_definitions(${EXAMPLE_EXEC} PRIVATE -DHAVE_WIN_HACKS=1) endforeach() + # Create and add fake config.h to avoid build errors (file is generated for + # cross-platform requirements in waf build-system) + file(WRITE "${CMAKE_BINARY_DIR}/config.h" "") + include_directories(${CMAKE_BINARY_DIR}) install( TARGETS ${EXAMPLE_EXECS} diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL index 3edc3db74..f919c15be 100644 --- a/ports/aubio/CONTROL +++ b/ports/aubio/CONTROL @@ -1,4 +1,4 @@ Source: aubio -Version: 0.46~alpha +Version: 0.46~alpha-1 Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake index 6f7b5fbc8..d5bca4428 100644 --- a/ports/aubio/portfile.cmake +++ b/ports/aubio/portfile.cmake @@ -13,8 +13,8 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS_RELEASE - #-DTOOLS_INSTALLDIR=tools/aubio - -DBUILD_TOOLS=OFF + -DTOOLS_INSTALLDIR=tools/aubio + -DBUILD_TOOLS=ON OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 -DBUILD_TOOLS=OFF -- cgit v1.2.3 From 61d9cf34cde4ba658b9150bafc47da00b1e69abd Mon Sep 17 00:00:00 2001 From: sigman Date: Thu, 29 Jun 2017 20:07:00 +0300 Subject: [SObjectizer] Patch static/dynamic linkage flags --- ports/sobjectizer/CONTROL | 2 +- ports/sobjectizer/portfile.cmake | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL index 3ec628460..09780452b 100644 --- a/ports/sobjectizer/CONTROL +++ b/ports/sobjectizer/CONTROL @@ -1,3 +1,3 @@ Source: sobjectizer -Version: 5.5.19 +Version: 5.5.19-2 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 cbc6a9e12..7849817d8 100644 --- a/ports/sobjectizer/portfile.cmake +++ b/ports/sobjectizer/portfile.cmake @@ -36,6 +36,16 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# patch SO_5_STATIC_LIB in headers with actual value +set(DECLSPEC_FILE ${CURRENT_PACKAGES_DIR}/include/so_5/h/declspec.hpp) +file(READ ${DECLSPEC_FILE} DECLSPEC_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined( SO_5_STATIC_LIB )" "1" DECLSPEC_H "${DECLSPEC_H}") +else() + string(REPLACE "defined( SO_5_STATIC_LIB )" "0" DECLSPEC_H "${DECLSPEC_H}") +endif() +file(WRITE ${DECLSPEC_FILE} "${DECLSPEC_H}") + # Handle copyright file(COPY ${SOURCE_PATH}/../LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sobjectizer) file(RENAME ${CURRENT_PACKAGES_DIR}/share/sobjectizer/LICENSE ${CURRENT_PACKAGES_DIR}/share/sobjectizer/copyright) -- cgit v1.2.3 From 5c955c301924d73a5ff9d159124ce2acc2d22a27 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 29 Jun 2017 11:19:37 -0700 Subject: [speex] user official tags --- ports/speex/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/speex/portfile.cmake b/ports/speex/portfile.cmake index f6d2108e0..6eed0cfc9 100644 --- a/ports/speex/portfile.cmake +++ b/ports/speex/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/speex - REF cae5026cfd88782c7051af6e685059223578b7e9 - SHA512 93385363561c41f5c6bb7fce8e7cd1954520191a4741a8618daaf0a0bfa0c5c5de9926b989f1ae85b99bf4307afb445f307a01a9487abcc0d4ffa690711b8e49 + REF Speex-1.2.0 + SHA512 612dfd67a9089f929b7f2a613ed3a1d2fda3d3ec0a4adafe27e2c1f4542de1870b42b8042f0dcb16d52e08313d686cc35b76940776419c775417f5bad18b448f HEAD_REF master ) -- cgit v1.2.3 From 6f287235ca75926697d785f83cba7028024110cf Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 29 Jun 2017 11:21:03 -0700 Subject: [speex] user official tags --- ports/speex/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL index bec6229e1..cb11e2e10 100644 --- a/ports/speex/CONTROL +++ b/ports/speex/CONTROL @@ -1,3 +1,3 @@ Source: speex -Version: 2017-06-28-cae5026cfd88782c7051af6e685059223578b7e9 +Version: Speex-1.2.0 Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. -- cgit v1.2.3 From f114e81a7552327d7cd60e3842b837caf8baa663 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 29 Jun 2017 13:38:45 -0700 Subject: [libconfig] fixed issues with portfile --- ports/libconfig/CMakeLists.txt | 50 +++++++++++------------------------------- ports/libconfig/portfile.cmake | 14 +++--------- 2 files changed, 16 insertions(+), 48 deletions(-) diff --git a/ports/libconfig/CMakeLists.txt b/ports/libconfig/CMakeLists.txt index c04e2976a..e81d77948 100644 --- a/ports/libconfig/CMakeLists.txt +++ b/ports/libconfig/CMakeLists.txt @@ -6,53 +6,29 @@ if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) endif() -set(SOURCE_PATH ${PROJECT_SOURCE_DIR}/lib) -set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/includes) - -set(C_HEADERS - ${SOURCE_PATH}/grammar.h - ${SOURCE_PATH}/libconfig.h - ${SOURCE_PATH}/libconfig.hh - ${SOURCE_PATH}/parsectx.h - ${SOURCE_PATH}/scanctx.h - ${SOURCE_PATH}/scanner.h - ${SOURCE_PATH}/wincompat.h - ${SOURCE_PATH}/libconfig.h++ - ${SOURCE_PATH}/libconfigcpp.c++ -) - -set( - EXTERNAL_HEADERS ${SOURCE_PATH}/win32 -) - - - set(C_SOURCES - ${SOURCE_PATH}/grammar.c - ${SOURCE_PATH}/libconfig.c - ${SOURCE_PATH}/scanctx.c - ${SOURCE_PATH}/win32/scandir.c - ${SOURCE_PATH}/scanner.c - ${SOURCE_PATH}/strbuf.c + lib/grammar.c + lib/libconfig.c + lib/scanctx.c + lib/win32/scandir.c + lib/scanner.c + lib/strbuf.c ) set(CPP_SOURCES - ${SOURCE_PATH}/libconfigcpp.cc + lib/libconfigcpp.cc ) -file(COPY ${C_HEADERS} DESTINATION ${COMMON_INCLUDES}) +include_directories(lib) +include_directories(lib/win32) -include_directories(${COMMON_INCLUDES}) -include_directories(${EXTERNAL_HEADERS}) +add_library(libconfig ${C_SOURCES}) +add_library(libconfig++ ${C_SOURCES} ${CPP_SOURCES}) -if(BUILD_SHARED) - add_library(libconfig SHARED ${C_SOURCES}) - add_library(libconfig++ SHARED ${C_SOURCES} ${CPP_SOURCES}) +if(BUILD_SHARED_LIBS) target_compile_definitions(libconfig PRIVATE -DLIBCONFIG_EXPORTS -DYY_NO_UNISTD_H -DYY_USE_CONST) target_compile_definitions(libconfig++ PRIVATE -DLIBCONFIG_EXPORTS -DLIBCONFIGXX_EXPORTS -DYY_NO_UNISTD_H -DYY_USE_CONST) else() - add_library(libconfig STATIC ${C_SOURCES}) - add_library(libconfig++ STATIC ${C_SOURCES} ${CPP_SOURCES}) target_compile_definitions(libconfig PRIVATE -DLIBCONFIG_STATIC -DYY_NO_UNISTD_H) target_compile_definitions(libconfig++ PRIVATE -DLIBCONFIG_STATIC -DYY_NO_UNISTD_H) endif() @@ -65,5 +41,5 @@ install( ) if(NOT DISABLE_INSTALL_HEADERS) - install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include) + install(FILES lib/libconfig.h++ lib/libconfig.h DESTINATION include) endif() diff --git a/ports/libconfig/portfile.cmake b/ports/libconfig/portfile.cmake index 7500e8118..01df06372 100644 --- a/ports/libconfig/portfile.cmake +++ b/ports/libconfig/portfile.cmake @@ -15,27 +15,19 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/fix-scanner-header-msvc-patch.patch" ) -set(DIRENT_HOME ${VCPKG_ROOT_DIR}/packages/dirent_${TARGET_TRIPLET}) -set(MIINTTYPES_HOME ${VCPKG_ROOT_DIR}/packages/msinttypes_${TARGET_TRIPLET}) set(WIN_SRC ${SOURCE_PATH}/lib/win32) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/scandir.c DESTINATION ${WIN_SRC}) +file(COPY ${CURRENT_INSTALLED_DIR}/include/dirent.h DESTINATION ${WIN_SRC}) +file(COPY ${CURRENT_INSTALLED_DIR}/include/stdint.h DESTINATION ${WIN_SRC}) -file(COPY ${DIRENT_HOME}/include/dirent.h DESTINATION ${WIN_SRC}) -file(COPY ${MIINTTYPES_HOME}/include/stdint.h DESTINATION ${WIN_SRC}) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set (BUILD_SHARED_LIBRARY ON) -else() - set(BUILD_SHARED_LIBRARY OFF) -endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DBUILD_SHARED=${BUILD_SHARED_LIBRARY} OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) + vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libconfig RENAME copyright) -- cgit v1.2.3 From c588de6b8f6cbcb419d1b612676c247b41a73b54 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 29 Jun 2017 13:41:49 -0700 Subject: [libconfig] fixed issues with portfile --- ports/libconfig/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/libconfig/portfile.cmake b/ports/libconfig/portfile.cmake index 01df06372..bff376bfc 100644 --- a/ports/libconfig/portfile.cmake +++ b/ports/libconfig/portfile.cmake @@ -31,3 +31,5 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libconfig RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From b1461da8c6adb5c51a5c12bffd628c7bbf9d68dd Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 29 Jun 2017 13:48:36 -0700 Subject: [rocksdb] remove static variables portfile --- ports/rocksdb/fix-building-both-static-and-shared.patch | 2 +- ports/rocksdb/portfile.cmake | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/ports/rocksdb/fix-building-both-static-and-shared.patch b/ports/rocksdb/fix-building-both-static-and-shared.patch index 78b863643..c9742450b 100644 --- a/ports/rocksdb/fix-building-both-static-and-shared.patch +++ b/ports/rocksdb/fix-building-both-static-and-shared.patch @@ -24,7 +24,7 @@ index cbbde8e..cb19649 100644 -add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES}) -target_link_libraries(${ROCKSDB_STATIC_LIB} -+if(BUILD_STATIC_LIBRARY) ++if(NOT BUILD_SHARED_LIBS) + add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES}) + target_link_libraries(${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 883e03d5b..a12ba4ca5 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -22,12 +22,6 @@ vcpkg_apply_patches( ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(BUILD_STATIC_LIBRARY ON) -else() - set(BUILD_STATIC_LIBRARY OFF) -endif() - if(VCPKG_CRT_LINKAGE STREQUAL static) set(WITH_MD_LIBRARY OFF) else() @@ -44,7 +38,6 @@ vcpkg_configure_cmake( -DLZ4=1 -DZLIB=1 -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} - -DBUILD_STATIC_LIBRARY=${BUILD_STATIC_LIBRARY} -DFAIL_ON_WARNINGS=OFF -DWITH_MD_LIBRARY=${WITH_MD_LIBRARY} OPTIONS_DEBUG -- cgit v1.2.3 From 5427ef1c034992b79fdc6cd3dc12dd21a05c2610 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 29 Jun 2017 14:27:54 -0700 Subject: [speex] Use simple version --- ports/speex/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL index cb11e2e10..680dcdf13 100644 --- a/ports/speex/CONTROL +++ b/ports/speex/CONTROL @@ -1,3 +1,3 @@ Source: speex -Version: Speex-1.2.0 +Version: 1.2.0 Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. -- cgit v1.2.3 From 753702bf2a448d95e1f89c3fef6520ba900d5d63 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 29 Jun 2017 15:06:05 -0700 Subject: [sobjectizer] Update to 5.5.19.2 --- ports/sobjectizer/CONTROL | 2 +- ports/sobjectizer/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL index 09780452b..9b9bd724e 100644 --- a/ports/sobjectizer/CONTROL +++ b/ports/sobjectizer/CONTROL @@ -1,3 +1,3 @@ Source: sobjectizer -Version: 5.5.19-2 +Version: 5.5.19.2 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 7849817d8..5ea87917c 100644 --- a/ports/sobjectizer/portfile.cmake +++ b/ports/sobjectizer/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(VERSION 5.5.19) +set(VERSION 5.5.19.2) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so-${VERSION}/dev) vcpkg_download_distfile(ARCHIVE URLS "https://downloads.sourceforge.net/project/sobjectizer/sobjectizer/SObjectizer%20Core%20v.5.5/so-${VERSION}.zip" - FILENAME "so-${VERSION}.zip" - SHA512 1dd5167e3a04a169f0d192504e64b2d7f0ce82322f4388207f15de21e31bf0a75f7b84efa406f0f84bea18235861479a169358e3a1b3bad6c3f7ffe5d33c502e + FILENAME "so-${VERSION}.tar.xz" + SHA512 8f70e751766ea43ddbc8e633aa729b81f01b84b7e3d4faf237e77a61dabe60bb1aaad8dabb868db4e473d801f5a639eb3d12aa8180feacb894f7a99b08375291 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 03fde38584ef4723e1f1c0f566d6227077d4ac1f Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 29 Jun 2017 15:18:58 -0700 Subject: [libconfig] use find path --- ports/libconfig/CMakeLists.txt | 7 ++++++- ports/libconfig/portfile.cmake | 6 +----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ports/libconfig/CMakeLists.txt b/ports/libconfig/CMakeLists.txt index e81d77948..61776d1aa 100644 --- a/ports/libconfig/CMakeLists.txt +++ b/ports/libconfig/CMakeLists.txt @@ -20,7 +20,12 @@ set(CPP_SOURCES ) include_directories(lib) -include_directories(lib/win32) + +find_path(DIRENT_H dirent.h) +find_path(STDINT_H stdint.h) + +include_directories(${DIRENT_H}) +include_directories(${STDINT_H}) add_library(libconfig ${C_SOURCES}) add_library(libconfig++ ${C_SOURCES} ${CPP_SOURCES}) diff --git a/ports/libconfig/portfile.cmake b/ports/libconfig/portfile.cmake index bff376bfc..7838958da 100644 --- a/ports/libconfig/portfile.cmake +++ b/ports/libconfig/portfile.cmake @@ -15,12 +15,8 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/fix-scanner-header-msvc-patch.patch" ) -set(WIN_SRC ${SOURCE_PATH}/lib/win32) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/scandir.c DESTINATION ${WIN_SRC}) -file(COPY ${CURRENT_INSTALLED_DIR}/include/dirent.h DESTINATION ${WIN_SRC}) -file(COPY ${CURRENT_INSTALLED_DIR}/include/stdint.h DESTINATION ${WIN_SRC}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/scandir.c DESTINATION ${SOURCE_PATH}/lib/win32) vcpkg_configure_cmake( -- cgit v1.2.3 From f01c32d49300cf60c2e3a84355aab64a367bcccc Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 29 Jun 2017 15:46:05 -0700 Subject: [msinttypes] added outer folder to prevent polluting the environment --- ports/msinttypes/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/msinttypes/portfile.cmake b/ports/msinttypes/portfile.cmake index 469032f76..63fbd05eb 100644 --- a/ports/msinttypes/portfile.cmake +++ b/ports/msinttypes/portfile.cmake @@ -8,6 +8,6 @@ vcpkg_from_github( HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/inttypes.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/stdint.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/inttypes.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/msinttypes) +file(INSTALL ${SOURCE_PATH}/stdint.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/msinttypes) file(INSTALL ${SOURCE_PATH}/stdint.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/msinttypes RENAME copyright) -- cgit v1.2.3 From b578291e475d3bd75e668e22a0bb5dfe8d15e8f3 Mon Sep 17 00:00:00 2001 From: Bagong Date: Fri, 30 Jun 2017 09:44:34 +0200 Subject: Fix inconsistency in python acquisition --- ports/qscintilla/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/qscintilla/portfile.cmake b/ports/qscintilla/portfile.cmake index d07883b88..047868ee8 100644 --- a/ports/qscintilla/portfile.cmake +++ b/ports/qscintilla/portfile.cmake @@ -22,7 +22,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_find_acquire_program(PYTHON3) # Add python3 to path -get_filename_component(PYTHON_PATH ${PYTHON} DIRECTORY) +get_filename_component(PYTHON_PATH ${PYTHON3} DIRECTORY) SET(ENV{PATH} "${PYTHON_PATH};$ENV{PATH}") vcpkg_configure_qmake( -- cgit v1.2.3 From 54213a0f6945a69a53c334db0f0a5dd257a5c74b Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 30 Jun 2017 11:35:20 -0700 Subject: [libconfig] Add source of the file --- ports/libconfig/scandir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/libconfig/scandir.c b/ports/libconfig/scandir.c index 555a3dc5e..313730410 100644 --- a/ports/libconfig/scandir.c +++ b/ports/libconfig/scandir.c @@ -22,6 +22,7 @@ // Emulation of posix scandir() call // This source file is #include'd by scandir.c // THIS IS A C FILE! DO NOT CHANGE TO C++!!! +// See @http://www.fltk.org/strfiles/1779/scandir.c #include #include -- cgit v1.2.3 From 997107adb7feed450f9f5ce5ae0fb344541e6d54 Mon Sep 17 00:00:00 2001 From: Joe Schmitt Date: Fri, 30 Jun 2017 13:59:23 -0700 Subject: Disable protobuf compiler on UWP --- ports/protobuf/001-add-compiler-flag.patch | 99 ++++++++++++++++++++++++++++++ ports/protobuf/portfile.cmake | 10 +++ 2 files changed, 109 insertions(+) create mode 100644 ports/protobuf/001-add-compiler-flag.patch diff --git a/ports/protobuf/001-add-compiler-flag.patch b/ports/protobuf/001-add-compiler-flag.patch new file mode 100644 index 000000000..766b1b5d8 --- /dev/null +++ b/ports/protobuf/001-add-compiler-flag.patch @@ -0,0 +1,99 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 7618ba21..bd92b09d 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -165,8 +165,11 @@ endif (protobuf_UNICODE) + + include(libprotobuf-lite.cmake) + include(libprotobuf.cmake) +-include(libprotoc.cmake) +-include(protoc.cmake) ++ ++if(protobuf_BUILD_COMPILER) ++ include(libprotoc.cmake) ++ include(protoc.cmake) ++endif() + + if (protobuf_BUILD_TESTS) + include(tests.cmake) +diff --git a/cmake/install.cmake b/cmake/install.cmake +index 28dc90dc..44e4939c 100644 +--- a/cmake/install.cmake ++++ b/cmake/install.cmake +@@ -1,21 +1,38 @@ + include(GNUInstallDirs) + +-foreach(_library +- libprotobuf-lite +- libprotobuf +- libprotoc) +- set_property(TARGET ${_library} +- PROPERTY INTERFACE_INCLUDE_DIRECTORIES +- $ +- $) +- 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}) +-endforeach() ++if(protobuf_BUILD_COMPILER) ++ foreach(_library ++ libprotobuf-lite ++ libprotobuf ++ libprotoc) ++ set_property(TARGET ${_library} ++ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ++ $ ++ $) ++ 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}) ++ endforeach() ++else() ++ foreach(_library ++ libprotobuf-lite ++ libprotobuf) ++ set_property(TARGET ${_library} ++ PROPERTY INTERFACE_INCLUDE_DIRECTORIES ++ $ ++ $) ++ 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}) ++ endforeach() ++endif() + +-install(TARGETS protoc EXPORT protobuf-targets +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) ++if(protobuf_BUILD_COMPILER) ++ install(TARGETS protoc EXPORT protobuf-targets ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) ++endif() + + file(STRINGS extract_includes.bat.in _extract_strings + REGEX "^copy") +@@ -94,10 +111,18 @@ configure_file(protobuf-options.cmake + ${CMAKE_INSTALL_CMAKEDIR}/protobuf-options.cmake @ONLY) + + # Allows the build directory to be used as a find directory. +-export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc +- NAMESPACE protobuf:: +- FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake +-) ++if(protobuf_BUILD_COMPILER) ++ export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc ++ NAMESPACE protobuf:: ++ FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake ++ ) ++else() ++ export(TARGETS libprotobuf-lite libprotobuf ++ NAMESPACE protobuf:: ++ FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake ++ ) ++endif() ++ + + install(EXPORT protobuf-targets + DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 852086ff5..4347adeff 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -20,14 +20,23 @@ vcpkg_extract_source_archive(${ARCHIVE_FILE}) # Patch to fix the missing export of fixed_address_empty_string, # see https://github.com/google/protobuf/pull/3216 +# Add a flag that can be set to disable the protobuf compiler vcpkg_apply_patches( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION} PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-missing-export.patch" + "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch" ) vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${TOOL_PATH}) +# Disable the protobuf compiler when targeting UWP +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + set(protobuf_BUILD_COMPILER OFF) +else() + set(protobuf_BUILD_COMPILER ON) +endif() + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(protobuf_BUILD_SHARED_LIBS ON) else() @@ -47,6 +56,7 @@ vcpkg_configure_cmake( -Dprotobuf_MSVC_STATIC_RUNTIME=${protobuf_MSVC_STATIC_RUNTIME} -Dprotobuf_WITH_ZLIB=ON -Dprotobuf_BUILD_TESTS=OFF + -Dprotobuf_BUILD_COMPILER=${protobuf_BUILD_COMPILER} -DCMAKE_INSTALL_CMAKEDIR=share/protobuf ) -- cgit v1.2.3 From 294b56c593c70107fcb6829bd66c03ee10c0ca71 Mon Sep 17 00:00:00 2001 From: Joe Schmitt Date: Fri, 30 Jun 2017 14:40:55 -0700 Subject: Remove duplicate code from protobuf compiler flag --- ports/protobuf/001-add-compiler-flag.patch | 78 +++++++++--------------------- 1 file changed, 22 insertions(+), 56 deletions(-) diff --git a/ports/protobuf/001-add-compiler-flag.patch b/ports/protobuf/001-add-compiler-flag.patch index 766b1b5d8..aec510f44 100644 --- a/ports/protobuf/001-add-compiler-flag.patch +++ b/ports/protobuf/001-add-compiler-flag.patch @@ -17,53 +17,28 @@ index 7618ba21..bd92b09d 100644 if (protobuf_BUILD_TESTS) include(tests.cmake) diff --git a/cmake/install.cmake b/cmake/install.cmake -index 28dc90dc..44e4939c 100644 +index 28dc90dc..52c1f721 100644 --- a/cmake/install.cmake +++ b/cmake/install.cmake -@@ -1,21 +1,38 @@ +@@ -1,9 +1,12 @@ include(GNUInstallDirs) --foreach(_library ++set(LIBRARIES_TO_SET_DEST libprotobuf-lite libprotobuf) ++if(protobuf_BUILD_COMPILER) ++ list(APPEND LIBRARIES_TO_SET_DEST libprotoc) ++endif() ++ + foreach(_library - libprotobuf-lite - libprotobuf - libprotoc) -- set_property(TARGET ${_library} -- PROPERTY INTERFACE_INCLUDE_DIRECTORIES -- $ -- $) -- 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}) --endforeach() -+if(protobuf_BUILD_COMPILER) -+ foreach(_library -+ libprotobuf-lite -+ libprotobuf -+ libprotoc) -+ set_property(TARGET ${_library} -+ PROPERTY INTERFACE_INCLUDE_DIRECTORIES -+ $ -+ $) -+ 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}) -+ endforeach() -+else() -+ foreach(_library -+ libprotobuf-lite -+ libprotobuf) -+ set_property(TARGET ${_library} -+ PROPERTY INTERFACE_INCLUDE_DIRECTORIES -+ $ -+ $) -+ 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}) -+ endforeach() -+endif() ++ ${LIBRARIES_TO_SET_DEST}) + set_property(TARGET ${_library} + PROPERTY INTERFACE_INCLUDE_DIRECTORIES + $ +@@ -14,8 +17,10 @@ foreach(_library + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library}) + endforeach() -install(TARGETS protoc EXPORT protobuf-targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) @@ -74,26 +49,17 @@ index 28dc90dc..44e4939c 100644 file(STRINGS extract_includes.bat.in _extract_strings REGEX "^copy") -@@ -94,10 +111,18 @@ configure_file(protobuf-options.cmake +@@ -94,7 +99,12 @@ configure_file(protobuf-options.cmake ${CMAKE_INSTALL_CMAKEDIR}/protobuf-options.cmake @ONLY) # Allows the build directory to be used as a find directory. -export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc -- NAMESPACE protobuf:: -- FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake --) ++set(FIND_DIRS libprotobuf-lite libprotobuf) +if(protobuf_BUILD_COMPILER) -+ export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc -+ NAMESPACE protobuf:: -+ FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake -+ ) -+else() -+ export(TARGETS libprotobuf-lite libprotobuf -+ NAMESPACE protobuf:: -+ FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake -+ ) ++ list(APPEND FIND_DIRS libprotoc protoc) +endif() + - - install(EXPORT protobuf-targets - DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" ++export(TARGETS ${FIND_DIRS} + NAMESPACE protobuf:: + FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake + ) -- cgit v1.2.3 From c21a2fe38ab9523974a80194d6cea5dae6fcb76a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 30 Jun 2017 17:33:48 -0700 Subject: [angle] Add preliminary UWP support --- ports/angle/CMakeLists.txt | 354 +++++++++++++++++++++++---------------- ports/angle/CMakeListsUwp.txt | 136 --------------- ports/angle/CONTROL | 2 +- ports/angle/commit.h | 3 + ports/angle/portfile.cmake | 20 +-- scripts/buildsystems/vcpkg.cmake | 7 + 6 files changed, 227 insertions(+), 295 deletions(-) delete mode 100644 ports/angle/CMakeListsUwp.txt create mode 100644 ports/angle/commit.h diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt index 2d7af54cc..5a4c05359 100644 --- a/ports/angle/CMakeLists.txt +++ b/ports/angle/CMakeLists.txt @@ -1,148 +1,206 @@ -cmake_minimum_required(VERSION 3.8) -project(angle) - -add_compile_options(/d2guard4 /Wv:18 /WX) -set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /guard:cf") - -add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DANGLE_STANDALONE_BUILD -DANGLE_ENABLE_DEBUG_ANNOTATIONS) - -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/id/commit.h" "#define ANGLE_COMMIT_HASH \"invalid-hash\"\n#define ANGLE_COMMIT_HASH_SIZE 12\n#define ANGLE_COMMIT_DATE \"invalid-date\"\n") - -include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) - -########## -# anglebase -add_library(anglebase INTERFACE) -file(GLOB_RECURSE anglebase_SOURCES "src/common/third_party/base/*.h") -target_sources(anglebase INTERFACE ${anglebase_SOURCES}) -target_include_directories(anglebase INTERFACE src/common/third_party/base) - -########## -# angle_common -file(GLOB ANGLE_COMMON_SOURCES "src/common/*.h" "src/common/*.inl" "src/common/*.cpp") -list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|_linux|_mac") -add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES}) -target_link_libraries(angle_common PUBLIC anglebase) - -########## -# angle_image_util -file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp") -add_library(angle_image_util STATIC ${ANGLE_IMAGE_UTIL_SOURCES}) -target_link_libraries(angle_image_util PRIVATE angle_common) - -########## -# translator -file(GLOB TRANSLATOR_SOURCES - "src/compiler/translator/glslang.l" - "src/compiler/translator/glslang.y" - "src/compiler/translator/*.h" - "src/compiler/translator/*.cpp" - "src/third_party/compiler/ArrayBoundsClamper.cpp" -) -add_library(translator STATIC ${TRANSLATOR_SOURCES}) -target_compile_definitions(translator PUBLIC - -DANGLE_ENABLE_ESSL - -DANGLE_ENABLE_GLSL - -DANGLE_ENABLE_HLSL -) -target_link_libraries(translator PRIVATE angle_common) - -########## -# preprocessor -file(GLOB PREPROCESSOR_SOURCES - "src/compiler/preprocessor/*.h" - "src/compiler/preprocessor/*.cpp" -) -add_library(preprocessor STATIC ${PREPROCESSOR_SOURCES}) -target_link_libraries(preprocessor PRIVATE angle_common) - -########## -# libANGLE -file(GLOB LIBANGLE_SOURCES - "src/third_party/systeminfo/SystemInfo.cpp" - "src/common/third_party/murmurhash/MurmurHash3.cpp" - "src/common/event_tracer.cpp" - - "src/libANGLE/*.cpp" - "src/libANGLE/*.inl" - "src/libANGLE/*.h" - - "src/libANGLE/renderer/*.cpp" - "src/libANGLE/renderer/*.inl" - "src/libANGLE/renderer/*.h" - - "src/libANGLE/renderer/gl/*.cpp" - "src/libANGLE/renderer/gl/*.inl" - "src/libANGLE/renderer/gl/*.h" - - "src/libANGLE/renderer/gl/wgl/*.cpp" - "src/libANGLE/renderer/gl/wgl/*.inl" - "src/libANGLE/renderer/gl/wgl/*.h" - - # "src/libANGLE/renderer/vulkan/*.cpp" - # "src/libANGLE/renderer/vulkan/*.inl" - # "src/libANGLE/renderer/vulkan/*.h" - - "src/libANGLE/renderer/null/*.cpp" - "src/libANGLE/renderer/null/*.inl" - "src/libANGLE/renderer/null/*.h" -) -file(GLOB_RECURSE LIBANGLE_D3D_SOURCES "src/libANGLE/renderer/d3d/*.h" "src/libANGLE/renderer/d3d/*.cpp" "src/libANGLE/renderer/d3d/*.inl") -list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") -list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest|winrt") -add_library(libANGLE STATIC ${LIBANGLE_SOURCES} ${LIBANGLE_D3D_SOURCES}) -find_library(D3D9_LIB NAMES d3d9) -find_library(DXGUID_LIB NAMES dxguid) -target_link_libraries(libANGLE PRIVATE angle_common angle_image_util translator ${D3D9_LIB} ${DXGUID_LIB} preprocessor) -target_include_directories(libANGLE PRIVATE "src/third_party/khronos") -target_compile_definitions(libANGLE PUBLIC - -DANGLE_ENABLE_D3D9 - -DANGLE_ENABLE_D3D11 - -DANGLE_ENABLE_OPENGL - # -DANGLE_ENABLE_VULKAN - -DANGLE_ENABLE_NULL -) -target_compile_definitions(libANGLE PRIVATE -DLIBANGLE_IMPLEMENTATION) - -########## -# libGLESv2 -file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2.def") -add_library(libGLESv2 ${LIBGLESV2_SOURCES}) -target_link_libraries(libGLESv2 PRIVATE angle_common libANGLE) -target_compile_definitions(libGLESv2 PRIVATE - -DLIBGLESV2_IMPLEMENTATION - -DLIBANGLE_IMPLEMENTATION - -DGL_GLEXT_PROTOTYPES - "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" - -DGL_APICALL= - -DEGLAPI= -) - -########## -# libEGL -add_library(libEGL "src/libEGL/libEGL.def" "src/libEGL/libEGL.cpp" "src/libEGL/libEGL.rc" "src/libEGL/resource.h") -target_link_libraries(libEGL PRIVATE angle_common libANGLE libGLESv2) -target_compile_definitions(libEGL PRIVATE - -DLIBANGLE_IMPLEMENTATION - -DGL_GLEXT_PROTOTYPES - "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" - -DGL_APICALL= - -DEGLAPI= -) - - -install(TARGETS libEGL libGLESv2 - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -if(NOT DISABLE_INSTALL_HEADERS) - install( - DIRECTORY include/ - DESTINATION include - FILES_MATCHING PATTERN "*.h" - PATTERN "GLSLANG" EXCLUDE - PATTERN "export.h" EXCLUDE - ) -endif() +cmake_minimum_required(VERSION 3.8) +project(angle CXX) + +if(WIN32 AND NOT WINDOWS_STORE) + set(WINDOWS_DESKTOP 1) +else() + set(WINDOWS_DESKTOP 0) +endif() + +add_compile_options(/d2guard4 /Wv:18) +set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /guard:cf") + +add_definitions( + -D_CRT_SECURE_NO_DEPRECATE + -D_SCL_SECURE_NO_WARNINGS + -D_HAS_EXCEPTIONS=0 + -DNOMINMAX + -DANGLE_STANDALONE_BUILD + -DANGLE_ENABLE_DEBUG_ANNOTATIONS +) + +configure_file(commit.h include/id/commit.h COPYONLY) +include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) + +########## +# angle::common +file(GLOB ANGLE_COMMON_SOURCES "src/common/*.h" "src/common/*.inl" "src/common/*.cpp" "src/common/third_party/base/*.h") +list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|_linux|_mac") +add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES}) +target_include_directories(angle_common PUBLIC src/common/third_party/base) +add_library(angle::common ALIAS angle_common) + +########## +# angle::image_util +file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp") +add_library(angle_image_util STATIC ${ANGLE_IMAGE_UTIL_SOURCES}) +target_link_libraries(angle_image_util PRIVATE angle::common) +add_library(angle::image_util ALIAS angle_image_util) + +########## +# angle::translator +file(GLOB TRANSLATOR_SOURCES + "src/compiler/translator/glslang.l" + "src/compiler/translator/glslang.y" + "src/compiler/translator/*.h" + "src/compiler/translator/*.cpp" + "src/third_party/compiler/ArrayBoundsClamper.cpp" +) +add_library(angle_translator STATIC ${TRANSLATOR_SOURCES}) +target_compile_definitions(angle_translator PUBLIC + -DANGLE_ENABLE_ESSL + -DANGLE_ENABLE_GLSL + -DANGLE_ENABLE_HLSL +) +target_link_libraries(angle_translator PRIVATE angle::common) +add_library(angle::translator ALIAS angle_translator) + +########## +# angle::preprocessor +file(GLOB PREPROCESSOR_SOURCES + "src/compiler/preprocessor/*.h" + "src/compiler/preprocessor/*.cpp" +) +add_library(angle_preprocessor STATIC ${PREPROCESSOR_SOURCES}) +target_link_libraries(angle_preprocessor PRIVATE angle::common) +add_library(angle::preprocessor ALIAS angle_preprocessor) + +########## +# libANGLE + +## OpenGL Renderer +if(WINDOWS_DESKTOP) + file(GLOB LIBANGLE_GL_SOURCES + "src/libANGLE/renderer/gl/*.cpp" + "src/libANGLE/renderer/gl/*.inl" + "src/libANGLE/renderer/gl/*.h" + + "src/libANGLE/renderer/gl/wgl/*.cpp" + "src/libANGLE/renderer/gl/wgl/*.inl" + "src/libANGLE/renderer/gl/wgl/*.h" + ) + list(FILTER LIBANGLE_GL_SOURCES EXCLUDE REGEX "_unittest") + add_library(angle_renderer_opengl INTERFACE) + target_sources(angle_renderer_opengl INTERFACE ${LIBANGLE_GL_SOURCES}) + target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL) + add_library(angle::renderer::opengl ALIAS angle_renderer_opengl) +endif() + +## All D3D Sources +file(GLOB_RECURSE LIBANGLE_D3D_SOURCES + "src/libANGLE/renderer/d3d/*.cpp" + "src/libANGLE/renderer/d3d/*.inl" + "src/libANGLE/renderer/d3d/*.h" +) +list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest") + +## WinRT D3D Renderer +if(WINDOWS_STORE) + set(LIBANGLE_D3D_WINRT_SOURCES ${LIBANGLE_D3D_SOURCES}) + list(FILTER LIBANGLE_D3D_WINRT_SOURCES INCLUDE REGEX "winrt") + add_library(angle_renderer_winrt INTERFACE) + target_sources(angle_renderer_winrt INTERFACE ${LIBANGLE_D3D_WINRT_SOURCES}) + add_library(angle::renderer::winrt ALIAS angle_renderer_winrt) +endif() + +## Win32/d3d9 D3D Renderer +if(WINDOWS_DESKTOP) + set(LIBANGLE_D3D_DESKTOP_SOURCES ${LIBANGLE_D3D_SOURCES}) + list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32") + find_library(D3D9_LIB NAMES d3d9) + add_library(angle_renderer_win32 INTERFACE) + target_sources(angle_renderer_win32 INTERFACE ${LIBANGLE_D3D_DESKTOP_SOURCES}) + target_compile_definitions(angle_renderer_win32 INTERFACE -DANGLE_ENABLE_D3D9) + target_link_libraries(angle_renderer_win32 INTERFACE ${D3D9_LIB}) + add_library(angle::renderer::win32 ALIAS angle_renderer_win32) +endif() + +## D3D11 Base renderer +list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32") +find_library(DXGUID_LIB NAMES dxguid) +find_library(D3D11_LIB NAMES d3d11) +add_library(angle_renderer_d3d INTERFACE) +target_sources(angle_renderer_d3d INTERFACE ${LIBANGLE_D3D_SOURCES}) +target_compile_definitions(angle_renderer_d3d INTERFACE + -DANGLE_ENABLE_D3D11 + "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" +) +target_link_libraries(angle_renderer_d3d INTERFACE ${D3D11_LIB} ${DXGUID_LIB}) +add_library(angle::renderer::d3d ALIAS angle_renderer_d3d) + +## Core libANGLE library +file(GLOB LIBANGLE_SOURCES + "src/third_party/systeminfo/SystemInfo.cpp" + "src/common/third_party/murmurhash/MurmurHash3.cpp" + "src/common/event_tracer.cpp" + + "src/libANGLE/*.cpp" + "src/libANGLE/*.inl" + "src/libANGLE/*.h" + + "src/libANGLE/renderer/*.cpp" + "src/libANGLE/renderer/*.inl" + "src/libANGLE/renderer/*.h" + + "src/libANGLE/renderer/null/*.cpp" + "src/libANGLE/renderer/null/*.inl" + "src/libANGLE/renderer/null/*.h" +) +list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") + +add_library(libANGLE STATIC ${LIBANGLE_SOURCES}) +target_link_libraries(libANGLE PRIVATE + angle::common + angle::image_util + angle::translator + angle::preprocessor + angle::renderer::d3d + $<$:angle::renderer::winrt> + $<$:angle::renderer::win32> + $<$:angle::renderer::opengl> +) +target_include_directories(libANGLE PRIVATE "src/third_party/khronos") +target_compile_definitions(libANGLE + PRIVATE -DANGLE_ENABLE_NULL + PUBLIC -DLIBANGLE_IMPLEMENTATION +) +add_library(angle::libANGLE ALIAS libANGLE) + +########## +# libGLESv2 +file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2.def") +add_library(libGLESv2 ${LIBGLESV2_SOURCES}) +target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE) +target_compile_definitions(libGLESv2 + PRIVATE -DLIBGLESV2_IMPLEMENTATION + PUBLIC + -DGL_GLEXT_PROTOTYPES + -DGL_APICALL= + -DEGLAPI= +) + +########## +# libEGL +add_library(libEGL + "src/libEGL/libEGL.def" + "src/libEGL/libEGL.cpp" + "src/libEGL/libEGL.rc" + "src/libEGL/resource.h" +) +target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2) + +install(TARGETS libEGL libGLESv2 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY include/ + DESTINATION include + FILES_MATCHING PATTERN "*.h" + PATTERN "GLSLANG" EXCLUDE + PATTERN "export.h" EXCLUDE + ) +endif() diff --git a/ports/angle/CMakeListsUwp.txt b/ports/angle/CMakeListsUwp.txt deleted file mode 100644 index b339ca4e5..000000000 --- a/ports/angle/CMakeListsUwp.txt +++ /dev/null @@ -1,136 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(angle) - -add_compile_options(/d2guard4 /Wv:18 /WX) -set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /guard:cf") - -add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DANGLE_STANDALONE_BUILD -DANGLE_ENABLE_DEBUG_ANNOTATIONS) - -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/id/commit.h" "#define ANGLE_COMMIT_HASH \"invalid-hash\"\n#define ANGLE_COMMIT_HASH_SIZE 12\n#define ANGLE_COMMIT_DATE \"invalid-date\"\n") - -include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) - -########## -# anglebase -add_library(anglebase INTERFACE) -file(GLOB_RECURSE anglebase_SOURCES "src/common/third_party/base/*.h") -target_sources(anglebase INTERFACE ${anglebase_SOURCES}) -target_include_directories(anglebase INTERFACE src/common/third_party/base) - -########## -# angle_common -file(GLOB ANGLE_COMMON_SOURCES "src/common/*.h" "src/common/*.inl" "src/common/*.cpp") -list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|_linux|_mac") -add_library(angle_common STATIC ${ANGLE_COMMON_SOURCES}) -target_link_libraries(angle_common PUBLIC anglebase) - -########## -# angle_image_util -file(GLOB ANGLE_IMAGE_UTIL_SOURCES "src/image_util/*.h" "src/image_util/*.inl" "src/image_util/*.cpp") -add_library(angle_image_util STATIC ${ANGLE_IMAGE_UTIL_SOURCES}) -target_link_libraries(angle_image_util PRIVATE angle_common) - -########## -# translator -file(GLOB TRANSLATOR_SOURCES - "src/compiler/translator/glslang.l" - "src/compiler/translator/glslang.y" - "src/compiler/translator/*.h" - "src/compiler/translator/*.cpp" - "src/third_party/compiler/ArrayBoundsClamper.cpp" -) -add_library(translator STATIC ${TRANSLATOR_SOURCES}) -target_compile_definitions(translator PUBLIC - -DANGLE_ENABLE_ESSL - -DANGLE_ENABLE_GLSL - -DANGLE_ENABLE_HLSL -) -target_link_libraries(translator PRIVATE angle_common) - -########## -# preprocessor -file(GLOB PREPROCESSOR_SOURCES - "src/compiler/preprocessor/*.h" - "src/compiler/preprocessor/*.cpp" -) -add_library(preprocessor STATIC ${PREPROCESSOR_SOURCES}) -target_link_libraries(preprocessor PRIVATE angle_common) - -########## -# libANGLE -file(GLOB LIBANGLE_SOURCES - "src/third_party/systeminfo/SystemInfo.cpp" - "src/common/third_party/murmurhash/MurmurHash3.cpp" - "src/common/event_tracer.cpp" - - "src/libANGLE/*.cpp" - "src/libANGLE/*.inl" - "src/libANGLE/*.h" - - "src/libANGLE/renderer/*.cpp" - "src/libANGLE/renderer/*.inl" - "src/libANGLE/renderer/*.h" - - "src/libANGLE/renderer/null/*.cpp" - "src/libANGLE/renderer/null/*.inl" - "src/libANGLE/renderer/null/*.h" -) -file(GLOB_RECURSE LIBANGLE_D3D_SOURCES "src/libANGLE/renderer/d3d/*.h" "src/libANGLE/renderer/d3d/*.cpp" "src/libANGLE/renderer/d3d/*.inl") -list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest") -list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest|d3d9|win32") -add_library(libANGLE STATIC ${LIBANGLE_SOURCES} ${LIBANGLE_D3D_SOURCES}) -find_library(D3D11_LIB NAMES d3d11) -find_library(DXGUID_LIB NAMES dxguid) -target_link_libraries(libANGLE PRIVATE angle_common angle_image_util translator ${D3D9_LIB} ${DXGUID_LIB} preprocessor) -target_include_directories(libANGLE PRIVATE "src/third_party/khronos") - -list(APPEND ANGLE_DEFINITIONS -DANGLE_ENABLE_D3D11) -list(APPEND ANGLE_DEFINITIONS -DANGLE_ENABLE_NULL) - -target_compile_definitions(libANGLE PUBLIC - ${ANGLE_DEFINITIONS} -) -target_compile_definitions(libANGLE PRIVATE -DLIBANGLE_IMPLEMENTATION) - -########## -# libGLESv2 -file(GLOB LIBGLESV2_SOURCES "src/libGLESv2/*.h" "src/libGLESv2/*.cpp" "src/libGLESv2/libGLESv2.def") -add_library(libGLESv2 ${LIBGLESV2_SOURCES}) -target_link_libraries(libGLESv2 PRIVATE angle_common libANGLE) -target_compile_definitions(libGLESv2 PRIVATE - -DLIBGLESV2_IMPLEMENTATION - -DLIBANGLE_IMPLEMENTATION - -DGL_GLEXT_PROTOTYPES - "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" - -DGL_APICALL= - -DEGLAPI= -) - -########## -# libEGL -add_library(libEGL "src/libEGL/libEGL.def" "src/libEGL/libEGL.cpp" "src/libEGL/libEGL.rc" "src/libEGL/resource.h") -target_link_libraries(libEGL PRIVATE angle_common libANGLE libGLESv2) -target_compile_definitions(libEGL PRIVATE - -DLIBANGLE_IMPLEMENTATION - -DGL_GLEXT_PROTOTYPES - "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" - -DGL_APICALL= - -DEGLAPI= -) - - -install(TARGETS libEGL libGLESv2 - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -if(NOT DISABLE_INSTALL_HEADERS) - install( - DIRECTORY include/ - DESTINATION include - FILES_MATCHING PATTERN "*.h" - PATTERN "GLSLANG" EXCLUDE - PATTERN "export.h" EXCLUDE - ) -endif() diff --git a/ports/angle/CONTROL b/ports/angle/CONTROL index 4f5f8880d..a7e261bb1 100644 --- a/ports/angle/CONTROL +++ b/ports/angle/CONTROL @@ -1,4 +1,4 @@ Source: angle -Version: 2017-06-14-8d471f +Version: 2017-06-14-8d471f-1 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/commit.h b/ports/angle/commit.h new file mode 100644 index 000000000..57a20e3b7 --- /dev/null +++ b/ports/angle/commit.h @@ -0,0 +1,3 @@ +#define ANGLE_COMMIT_HASH "invalid-hash" +#define ANGLE_COMMIT_HASH_SIZE 12 +#define ANGLE_COMMIT_DATE "invalid-date" diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake index d2b61c9cf..aebf528dd 100644 --- a/ports/angle/portfile.cmake +++ b/ports/angle/portfile.cmake @@ -5,6 +5,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(VCPKG_LIBRARY_LINKAGE dynamic) endif() +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "ANGLE currently only supports being built for desktop") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/angle @@ -12,17 +16,13 @@ vcpkg_from_github( SHA512 b9235d2a98330bc8533c3fe871129e7235c680420eac16610eae4ca7224c5284313ab6377f30ddfb8a2da39b69f3ef0d16023fe1e7cec3fc2198f4eb4bdccb26 HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch +) -if(NOT TARGET_TRIPLET MATCHES "uwp") - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -else() - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeListsUwp.txt DESTINATION ${SOURCE_PATH}) - file(RENAME ${SOURCE_PATH}/CMakeListsUwp.txt ${SOURCE_PATH}/CMakeLists.txt) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch - ) -endif() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 513c33ecb..41bdb3e60 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -140,3 +140,10 @@ if(NOT VCPKG_TOOLCHAIN) set(VCPKG_TOOLCHAIN ON) endif() + +set(_UNUSED ${CMAKE_TOOLCHAIN_FILE}) +set(_UNUSED ${CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION}) +set(_UNUSED ${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}) +set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY}) +set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY}) +set(_UNUSED ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP}) -- cgit v1.2.3 From f4e797920f7b0be50881469d018cd6f7d92dba82 Mon Sep 17 00:00:00 2001 From: Stephane Lajoie Date: Sat, 1 Jul 2017 19:24:11 -0400 Subject: Added LLVM. --- ports/llvm/CONTROL | 3 +++ ports/llvm/portfile.cmake | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 ports/llvm/CONTROL create mode 100644 ports/llvm/portfile.cmake diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL new file mode 100644 index 000000000..9b7936004 --- /dev/null +++ b/ports/llvm/CONTROL @@ -0,0 +1,3 @@ +Source: llvm +Version: 4.0.0 +Description: The LLVM Compiler Infrastructure diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake new file mode 100644 index 000000000..a71c941ed --- /dev/null +++ b/ports/llvm/portfile.cmake @@ -0,0 +1,42 @@ +# 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) +# + +# LLVM documentation recommends always using static library linkage when +# building with Microsoft toolchain; it's also the default on other platforms +set(VCPKG_LIBRARY_LINKAGE static) + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-4.0.0.src) +vcpkg_download_distfile(ARCHIVE + URLS "http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz" + FILENAME "llvm-4.0.0.src.tar.xz" + SHA512 cf681f0626ef6d568d951cdc3e143471a1d7715a0ba11e52aa273cf5d8d421e1357ef2645cc85879eaefcd577e99e74d07b01566825b3d0461171ef2cbfc7704 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DLLVM_BUILD_TOOLS=OFF + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +# Remove extra copies of include files in debug directory +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/llvm) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/llvm/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/llvm/copyright) -- cgit v1.2.3 From 7367278356eec0d528e767b427b9f08322350888 Mon Sep 17 00:00:00 2001 From: bagong Date: Mon, 3 Jul 2017 02:04:19 +0200 Subject: Fix and enhance qscintilla build --- ports/qscintilla/CONTROL | 4 ++-- ports/qscintilla/portfile.cmake | 36 ++++++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/ports/qscintilla/CONTROL b/ports/qscintilla/CONTROL index bcdde0e37..22a30137c 100644 --- a/ports/qscintilla/CONTROL +++ b/ports/qscintilla/CONTROL @@ -1,4 +1,4 @@ Source: qscintilla -Version: 2.10 -Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt)) +Version: 2.10-1 +Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt) and without QtDesigner plugin) Build-Depends: qt5 diff --git a/ports/qscintilla/portfile.cmake b/ports/qscintilla/portfile.cmake index 047868ee8..ca8204398 100644 --- a/ports/qscintilla/portfile.cmake +++ b/ports/qscintilla/portfile.cmake @@ -25,41 +25,61 @@ vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON_PATH ${PYTHON3} DIRECTORY) SET(ENV{PATH} "${PYTHON_PATH};$ENV{PATH}") +set(BUILD_OPTIONS + "${SOURCE_PATH}/Qt4Qt5/qscintilla.pro" + CONFIG+=build_all + CONFIG-=hide_symbols +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_OPTIONS + ${BUILD_OPTIONS} + CONFIG+=staticlib + ) +endif() + vcpkg_configure_qmake( SOURCE_PATH "${SOURCE_PATH}/Qt4Qt5" OPTIONS - CONFIG+=build_all - CONFIG-=hide_symbols + ${BUILD_OPTIONS} ) vcpkg_build_qmake() -# Install following vcpkg conventions (following qwt portfile) set(BUILD_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) -file(GLOB HEADER_FILES ${SOURCE_PATH}/include/*) -file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/qscintilla) +file(GLOB HEADER_FILES ${SOURCE_PATH}/Qt4Qt5/Qsci/*) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/Qsci) file(INSTALL ${BUILD_DIR}/release/qscintilla2_qt5.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib + RENAME qscintilla2.lib ) file(INSTALL ${BUILD_DIR}/debug/qscintilla2_qt5.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + RENAME qscintilla2.lib ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(INSTALL - ${BUILD_DIR}/release/qscintilla2_qt5.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin + file(INSTALL + ${BUILD_DIR}/release/qscintilla2_qt5.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + RENAME qscintilla2.dll ) file(INSTALL ${BUILD_DIR}/debug/qscintilla2_qt5.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + RENAME qscintilla2.dll + ) + + file(INSTALL ${BUILD_DIR}/debug/qscintilla2_qt5.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + RENAME qscintilla2.pdb ) endif() -- cgit v1.2.3 From 83c7bfc3cec78f82608581ef110ee550aae71234 Mon Sep 17 00:00:00 2001 From: Stephane Lajoie Date: Mon, 3 Jul 2017 10:00:36 -0400 Subject: Reduce size of the build and fix post-build errors. --- ports/llvm/portfile.cmake | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index a71c941ed..c3c6121a2 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -25,18 +25,30 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DLLVM_BUILD_TOOLS=OFF - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA + OPTIONS + -DLLVM_BUILD_TOOLS=OFF + -DLLVM_BUILD_UTILS=OFF + -DLLVM_TARGETS_TO_BUILD=X86 ) vcpkg_install_cmake() +# Move cmake modules to correct vcpkg location and remove extra copy +file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/llvm DESTINATION ${CURRENT_PACKAGES_DIR}/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + # Remove extra copies of include files in debug directory file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Remove bin directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + +# Remove one empty include subdirectory +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/llvm/MC/MCAnalysis) + # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/llvm) file(RENAME ${CURRENT_PACKAGES_DIR}/share/llvm/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/llvm/copyright) -- cgit v1.2.3 From c89b4358156854bd4ef8a4f8a714553b7b14b59e Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Tue, 4 Jul 2017 00:55:46 +0800 Subject: fix the static-linking setting in docs/users/integration.md --- docs/users/integration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/users/integration.md b/docs/users/integration.md index 1e52adb88..f1b5014bf 100644 --- a/docs/users/integration.md +++ b/docs/users/integration.md @@ -107,8 +107,8 @@ To override the automatically chosen [triplet][], you can specify the MSBuild pr ```xml - x86-windows-static - x64-windows-static + x86-windows-static + x64-windows-static ``` -- cgit v1.2.3 From b33632943c51a53c61fbbfe38b4f23c1767dc602 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 3 Jul 2017 19:08:24 -0700 Subject: [qt5] Fastfail static builds --- ports/qt5/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake index cf127bf1b..a76186256 100644 --- a/ports/qt5/portfile.cmake +++ b/ports/qt5/portfile.cmake @@ -7,6 +7,10 @@ if(BUILDTREES_PATH_LENGTH GREATER 27) ) endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) include(configure_qt) include(install_qt) -- cgit v1.2.3 From e4d5f9376656bfd51cce034d18d74f6b2e552ae8 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Mon, 3 Jul 2017 21:27:49 -0700 Subject: [libconfig] redefine scandir and preventing duplicated symbols --- ports/libconfig/CMakeLists.txt | 5 ++++- ports/libconfig/scandir.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ports/libconfig/CMakeLists.txt b/ports/libconfig/CMakeLists.txt index 61776d1aa..878e70533 100644 --- a/ports/libconfig/CMakeLists.txt +++ b/ports/libconfig/CMakeLists.txt @@ -4,6 +4,7 @@ project(libconfig C CXX) if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) + add_definitions(-Dscandir=libconfig_scandir) endif() set(C_SOURCES @@ -28,7 +29,9 @@ include_directories(${DIRENT_H}) include_directories(${STDINT_H}) add_library(libconfig ${C_SOURCES}) -add_library(libconfig++ ${C_SOURCES} ${CPP_SOURCES}) +add_library(libconfig++ ${CPP_SOURCES}) + +target_link_libraries(libconfig++ libconfig) if(BUILD_SHARED_LIBS) target_compile_definitions(libconfig PRIVATE -DLIBCONFIG_EXPORTS -DYY_NO_UNISTD_H -DYY_USE_CONST) diff --git a/ports/libconfig/scandir.c b/ports/libconfig/scandir.c index 313730410..cab75716e 100644 --- a/ports/libconfig/scandir.c +++ b/ports/libconfig/scandir.c @@ -44,7 +44,7 @@ extern "C" { * A pointer to the array of directory entries is stored in the location * referenced by namelist. */ -int scandir(const char *dirname, struct dirent ***namelist, +int libconfig_scandir(const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*compar)(struct dirent **, struct dirent **)) { char *d; -- cgit v1.2.3 From 4b87e9cdcb24d3b979f4ceb8bca39fd99f7f7f1d Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Mon, 3 Jul 2017 22:07:38 -0700 Subject: [libconfig] fix guards --- ports/libconfig/CMakeLists.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ports/libconfig/CMakeLists.txt b/ports/libconfig/CMakeLists.txt index 878e70533..1ba4adaae 100644 --- a/ports/libconfig/CMakeLists.txt +++ b/ports/libconfig/CMakeLists.txt @@ -48,6 +48,20 @@ install( ARCHIVE DESTINATION lib ) +file(READ lib/libconfig.h++ LIBCONFIGXX_H) +file(READ lib/libconfig.h LIBCONFIG_H) + +if(BUILD_SHARED_LIBS) + string(REPLACE "defined(LIBCONFIGXX_EXPORTS)" "1" LIBCONFIGXX_H "${LIBCONFIGXX_H}") + string(REPLACE "defined(LIBCONFIG_EXPORTS)" "1" LIBCONFIG_H "${LIBCONFIGXX_H}") +else() + string(REPLACE "defined(LIBCONFIGXX_STATIC)" "1" LIBCONFIGXX_H "${LIBCONFIGXX_H}") + string(REPLACE "defined(LIBCONFIG_STATIC)" "1" LIBCONFIG_H "${LIBCONFIG_H}") +endif() + +file(WRITE ${PROJECT_BINARY_DIR}/libconfig.h++ ${LIBCONFIGXX_H}) +file(WRITE ${PROJECT_BINARY_DIR}/libconfig.h ${LIBCONFIG_H}) + if(NOT DISABLE_INSTALL_HEADERS) - install(FILES lib/libconfig.h++ lib/libconfig.h DESTINATION include) + install(FILES ${PROJECT_BINARY_DIR}/libconfig.h++ ${PROJECT_BINARY_DIR}/libconfig.h DESTINATION include) endif() -- cgit v1.2.3 From 0fae90a20e766e98b972333dd647e7ba99a7d93d Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Mon, 3 Jul 2017 22:34:55 -0700 Subject: [libconfig] Prevent Cmake Eating Semi-colons --- ports/libconfig/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libconfig/CMakeLists.txt b/ports/libconfig/CMakeLists.txt index 1ba4adaae..ca56aad67 100644 --- a/ports/libconfig/CMakeLists.txt +++ b/ports/libconfig/CMakeLists.txt @@ -59,8 +59,8 @@ else() string(REPLACE "defined(LIBCONFIG_STATIC)" "1" LIBCONFIG_H "${LIBCONFIG_H}") endif() -file(WRITE ${PROJECT_BINARY_DIR}/libconfig.h++ ${LIBCONFIGXX_H}) -file(WRITE ${PROJECT_BINARY_DIR}/libconfig.h ${LIBCONFIG_H}) +file(WRITE ${PROJECT_BINARY_DIR}/libconfig.h++ "${LIBCONFIGXX_H}") +file(WRITE ${PROJECT_BINARY_DIR}/libconfig.h "${LIBCONFIG_H}") if(NOT DISABLE_INSTALL_HEADERS) install(FILES ${PROJECT_BINARY_DIR}/libconfig.h++ ${PROJECT_BINARY_DIR}/libconfig.h DESTINATION include) -- cgit v1.2.3 From 91a526d0eae8025354c2c9c4029df442d30c0e9e Mon Sep 17 00:00:00 2001 From: Stephane Lajoie Date: Tue, 4 Jul 2017 03:30:13 -0400 Subject: Disable ABI breaking checks. --- ports/llvm/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index c3c6121a2..bd629e0c3 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -27,9 +27,10 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_UTILS=OFF - -DLLVM_TARGETS_TO_BUILD=X86 + -DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF ) vcpkg_install_cmake() -- cgit v1.2.3 From 6711aa1db5ccd73286f3a7dfb9d1b120b3f5f9f2 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Wed, 5 Jul 2017 02:28:32 +0300 Subject: [vtk] Update to version 7.1.1 Fix FindHdf5 for shared library. Closes #739, #1129 --- ports/vtk/CONTROL | 2 +- ports/vtk/fix-findhdf5-shared.patch | 20 ++++++++++++++++++++ ports/vtk/portfile.cmake | 9 +++++---- 3 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 ports/vtk/fix-findhdf5-shared.patch diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index d963451ce..dc00025bf 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,4 @@ Source: vtk -Version: 7.1.0 +Version: 7.1.1 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi diff --git a/ports/vtk/fix-findhdf5-shared.patch b/ports/vtk/fix-findhdf5-shared.patch new file mode 100644 index 000000000..762a9ab07 --- /dev/null +++ b/ports/vtk/fix-findhdf5-shared.patch @@ -0,0 +1,20 @@ +diff --git a/CMake/FindHDF5.cmake b/CMake/FindHDF5.cmake +index 6d558e39b1..9511e9a1ad 100644 +--- a/CMake/FindHDF5.cmake ++++ b/CMake/FindHDF5.cmake +@@ -3,11 +3,11 @@ + # (BUG #0014363). + + # include the default FindHDF5.cmake. +-if(CMAKE_VERSION VERSION_LESS 3.6.1) ++#if(CMAKE_VERSION VERSION_LESS 3.6.1) + include(${CMAKE_CURRENT_LIST_DIR}/NewCMake/FindHDF5.cmake) +-else() +- include(${CMAKE_ROOT}/Modules/FindHDF5.cmake) +-endif() ++#else() ++# include(${CMAKE_ROOT}/Modules/FindHDF5.cmake) ++#endif() + + if(HDF5_FOUND AND (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL)) + include(vtkMPI) diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 611023a61..16854513b 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/VTK-7.1.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/VTK-7.1.1) vcpkg_download_distfile(ARCHIVE - URLS "http://www.vtk.org/files/release/7.1/VTK-7.1.0.tar.gz" - FILENAME "VTK-7.1.0.tar.gz" - SHA512 83f0c9291cd2bc517a4bc449ad28a1d77e7ece169e846c7beab0b1140b9ef4b7bad30e3fa6e5a59826a707df78e2e336e07fa8bd30cf7498096ee80feef16534 + URLS "http://www.vtk.org/files/release/7.1/VTK-7.1.1.tar.gz" + FILENAME "VTK-7.1.1.tar.gz" + SHA512 34a068801fe45f98325e5334d2569fc9b15ed38620386f1b5b860c9735e5fb8510953b50a3340d3ef9795e22fecf798c25bf750215b2ff1ff1eb7a1ecd87b623 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -14,6 +14,7 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/transfer-hdf5-definitions.patch ${CMAKE_CURRENT_LIST_DIR}/netcdf-use-hdf5-definitions.patch ${CMAKE_CURRENT_LIST_DIR}/dont-define-ssize_t.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-findhdf5-shared.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) -- cgit v1.2.3 From 330043341cb28da7bb121f29199cf72fff36b66a Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 5 Jul 2017 13:04:17 -0700 Subject: [matio] new port #621 --- ports/matio/CMakeLists.txt | 89 ++++++++++++++++++++++++++++++++++++++++++++++ ports/matio/CONTROL | 4 +++ ports/matio/portfile.cmake | 23 ++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 ports/matio/CMakeLists.txt create mode 100644 ports/matio/CONTROL create mode 100644 ports/matio/portfile.cmake diff --git a/ports/matio/CMakeLists.txt b/ports/matio/CMakeLists.txt new file mode 100644 index 000000000..eaecf304b --- /dev/null +++ b/ports/matio/CMakeLists.txt @@ -0,0 +1,89 @@ +cmake_minimum_required(VERSION 3.8.0) +project(libmatio C) + +set(SRC + src/endian.c + src/inflate.c + src/io.c + src/mat.c + src/mat4.c + src/mat5.c + src/mat73.c + visual_studio/matio.def + src/matvar_cell.c + src/matvar_struct.c + src/read_data.c + src/snprintf.c +) + +set( + HEADERS + src/mat4.h + src/mat5.h + src/mat73.h + src/matio.h + src/matio_private.h + visual_studio/matio_pubconf.h + visual_studio/matioConfig.h +) + + +add_library(libmatio ${SRC}) + + +set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/includes) + +file(COPY ${HEADERS} DESTINATION ${COMMON_INCLUDES}) + +#fixes issues with relative directories +include_directories(${COMMON_INCLUDES}) + +option(BUILD_SHARED_LIBRARY ON) + +add_definitions( + -DH5_NO_DEPRECATED_SYMBOLS + -DMAT73=1 -DREPLACE_GETOPT + -DMATIO_HAVE_INTTYPES_H=1 + -DMATIO_HAVE_STDINT_H=1 +) + +if(BUILD_SHARED_LIBRARY) + add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB) + set(HDF5_USE_STATIC_LIBRARIES OFF) +else() + set(HDF5_USE_STATIC_LIBRARIES ON) +endif() + +find_package( ZLIB REQUIRED ) + +if (ZLIB_FOUND) + include_directories( ${ZLIB_INCLUDE_DIRS} ) + target_link_libraries(libmatio ${ZLIB_LIBRARIES}) + add_definitions(-DHAVE_ZLIB=1) +endif( ZLIB_FOUND ) + +find_package( HDF5 REQUIRED) + +if(HDF5_FOUND) + include_directories( ${HDF5_INCLUDE_DIRS} ) + target_link_libraries(libmatio ${HDF5_C_LIBRARIES}) + add_definitions(-DHAVE_HDF5=1) +endif() + +message(STATUS ${HDF5_C_LIBRARIES}) + +install( + TARGETS libmatio + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES + src/matio.h + visual_studio/matio_pubconf.h + visual_studio/matioConfig.h + DESTINATION include + ) +endif() diff --git a/ports/matio/CONTROL b/ports/matio/CONTROL new file mode 100644 index 000000000..eb2f87b70 --- /dev/null +++ b/ports/matio/CONTROL @@ -0,0 +1,4 @@ +Source: matio +Version: 1.5.10 +Description: MATLAB MAT File I/O Library +Build-Depends: zlib, hdf5 diff --git a/ports/matio/portfile.cmake b/ports/matio/portfile.cmake new file mode 100644 index 000000000..2878bdbfb --- /dev/null +++ b/ports/matio/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tbeu/matio + REF v1.5.10 + SHA512 c06ff6b3d17a136be20cebca4e1a4bb87eea98e35d979713e73f855487dee568895245528b1b8e55caf02f88aff1b742daf75f590e2d3b08158d0ad73e377243 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/matio RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From c2f0be9ec3309058ad762c9cfbb529fd87c6eef8 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Thu, 6 Jul 2017 00:16:34 +0300 Subject: [draco] Initial port --- ports/draco/CONTROL | 4 ++++ ports/draco/portfile.cmake | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 ports/draco/CONTROL create mode 100644 ports/draco/portfile.cmake diff --git a/ports/draco/CONTROL b/ports/draco/CONTROL new file mode 100644 index 000000000..f8ce4ba96 --- /dev/null +++ b/ports/draco/CONTROL @@ -0,0 +1,4 @@ +Source: draco +Version: 0.10.0 +Description: A library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics. +Build-Depends: \ No newline at end of file diff --git a/ports/draco/portfile.cmake b/ports/draco/portfile.cmake new file mode 100644 index 000000000..0b9bca010 --- /dev/null +++ b/ports/draco/portfile.cmake @@ -0,0 +1,50 @@ +# 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) +# + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/draco + REF 0.10.0 + SHA512 4e1c5d0799b7c005167847886f6cb9ae450beb4fe6dc58971955abe0cdf43317253a2e19a185cf1210169a6b2d1922c0d684e50d39145894b01e775717e6d173 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Install tools and plugins +file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe") +if(TOOLS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/draco) + file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/draco) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/draco) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/draco/LICENSE ${CURRENT_PACKAGES_DIR}/share/draco/copyright) -- cgit v1.2.3 From 1eedcc9b00ae0c0fa4505e84cb0e1141e8c42696 Mon Sep 17 00:00:00 2001 From: David Nerjes Date: Thu, 6 Jul 2017 09:22:58 +0200 Subject: initial port of sdl2_gfx --- ports/sdl2-gfx/CMakeLists.txt | 32 ++++++++++++++++++++++++++++++++ ports/sdl2-gfx/CONTROL | 4 ++++ ports/sdl2-gfx/portfile.cmake | 31 +++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 ports/sdl2-gfx/CMakeLists.txt create mode 100644 ports/sdl2-gfx/CONTROL create mode 100644 ports/sdl2-gfx/portfile.cmake diff --git a/ports/sdl2-gfx/CMakeLists.txt b/ports/sdl2-gfx/CMakeLists.txt new file mode 100644 index 000000000..7cc35ccb0 --- /dev/null +++ b/ports/sdl2-gfx/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.0) +project(SDL2_GFX C) + +find_path(SDL_INCLUDE_DIR SDL2/SDL.h) +find_library(SDL_LIBRARY SDL2) + +# builtin formats +set(SDL_GFX_DEFINES + WIN32 + DLL_EXPORT) + +add_library(SDL2_gfx + SDL2_framerate.c + SDL2_gfxPrimitives.c + SDL2_imageFilter.c + SDL2_rotozoom.c) + +target_compile_definitions(SDL2_gfx PRIVATE ${SDL_GFX_DEFINES}) +target_include_directories(SDL2_gfx PRIVATE ${SDL_INCLUDE_DIR}/SDL2) +target_link_libraries(SDL2_gfx ${SDL_LIBRARY}) + +install(TARGETS SDL2_gfx + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +if(NOT SDL_GFX_SKIP_HEADERS) + install(FILES SDL2_framerate.h SDL2_gfxPrimitives.h SDL2_imageFilter.h SDL2_rotozoom.h SDL2_gfxPrimitives_font.h DESTINATION include/SDL2) +endif() + +message(STATUS "Link-time dependencies:") +message(STATUS " " ${SDL_LIBRARY}) diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL new file mode 100644 index 000000000..cecb70f0a --- /dev/null +++ b/ports/sdl2-gfx/CONTROL @@ -0,0 +1,4 @@ +Source: sdl2-gfx +Version: 1.0.3 +Build-Depends: sdl2 +Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer. diff --git a/ports/sdl2-gfx/portfile.cmake b/ports/sdl2-gfx/portfile.cmake new file mode 100644 index 000000000..50c23372b --- /dev/null +++ b/ports/sdl2-gfx/portfile.cmake @@ -0,0 +1,31 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_gfx-1.0.3) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.3.zip" + FILENAME "SDL2_gfx-1.0.3.zip" + SHA512 f68485f71acf979aba68f3575f260fbc95a59496a9639498bcff80ffbfdb157c82a44bb5a0b0e3b1e157376ea4ff2f196f50466e6f24d850f94cfe7c24b1a497 +) +vcpkg_extract_source_archive(${ARCHIVE}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx/COPYING ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx/copyright) + +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From dc2da6dff4dd65efe9bb6a088aa59507678ae0fb Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 6 Jul 2017 00:30:18 +0900 Subject: Update PCL 1.8.1 RC1 Update PCL 1.8.1 RC1 --- ports/pcl/1635.patch | 36 ---------------------- ports/pcl/1788.patch | 24 --------------- ports/pcl/1823.patch | 22 -------------- ports/pcl/1830.patch | 68 ------------------------------------------ ports/pcl/1855.patch | 24 --------------- ports/pcl/1856.patch | 23 -------------- ports/pcl/CONTROL | 2 +- ports/pcl/config.patch | 12 ++++---- ports/pcl/config_install.patch | 4 +-- ports/pcl/find_flann.patch | 16 ---------- ports/pcl/portfile.cmake | 22 +++++--------- 11 files changed, 17 insertions(+), 236 deletions(-) delete mode 100644 ports/pcl/1635.patch delete mode 100644 ports/pcl/1788.patch delete mode 100644 ports/pcl/1823.patch delete mode 100644 ports/pcl/1830.patch delete mode 100644 ports/pcl/1855.patch delete mode 100644 ports/pcl/1856.patch diff --git a/ports/pcl/1635.patch b/ports/pcl/1635.patch deleted file mode 100644 index 716097949..000000000 --- a/ports/pcl/1635.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 8710ee9b6c3ef236a84450ab9fd1f8f167c87a56 Mon Sep 17 00:00:00 2001 -From: Tsukasa Sugiura -Date: Thu, 16 Jun 2016 01:52:29 +0900 -Subject: [PATCH] Fix compile error C2440 of pcl_visualization on MSVC - -The pcl_visualization occur compile error C2440 on MSVC. -This error occurs because that can not directly cast to enum type from -double type in MSVC. -It must explicitly cast to int type from double type before cast to enum -type. ---- - visualization/src/pcl_visualizer.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/visualization/src/pcl_visualizer.cpp b/visualization/src/pcl_visualizer.cpp -index b5fabde110..7c84b7543e 100644 ---- a/visualization/src/pcl_visualizer.cpp -+++ b/visualization/src/pcl_visualizer.cpp -@@ -1492,7 +1492,7 @@ pcl::visualization::PCLVisualizer::setPointCloudRenderingProperties ( - actor->GetMapper ()->ScalarVisibilityOn (); - actor->GetMapper ()->SetScalarRange (range[0], range[1]); - vtkSmartPointer table; -- if (!pcl::visualization::getColormapLUT (static_cast(value), table)) -+ if (!pcl::visualization::getColormapLUT (static_cast(static_cast(value)), table)) - break; - table->SetRange (range[0], range[1]); - actor->GetMapper ()->SetLookupTable (table); -@@ -1738,7 +1738,7 @@ pcl::visualization::PCLVisualizer::setShapeRenderingProperties ( - actor->GetMapper ()->ScalarVisibilityOn (); - actor->GetMapper ()->SetScalarRange (range[0], range[1]); - vtkSmartPointer table = vtkSmartPointer::New (); -- getColormapLUT (static_cast(value), table); -+ getColormapLUT (static_cast(static_cast(value)), table); - table->SetRange (range[0], range[1]); - actor->GetMapper ()->SetLookupTable (table); - style_->updateLookUpTableDisplay (false); diff --git a/ports/pcl/1788.patch b/ports/pcl/1788.patch deleted file mode 100644 index da384708a..000000000 --- a/ports/pcl/1788.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 1216590288f9c1e9195954c06cebdc421a8a3986 Mon Sep 17 00:00:00 2001 -From: Tsukasa Sugiura -Date: Fri, 30 Dec 2016 05:11:36 +0900 -Subject: [PATCH] Update find Boost versions - -Update find Boost versions. -Add Boost 1.62.0 and Boost 1.63.0. ---- - cmake/pcl_find_boost.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/pcl_find_boost.cmake b/cmake/pcl_find_boost.cmake -index a3abe1c069..7ccf80c727 100644 ---- a/cmake/pcl_find_boost.cmake -+++ b/cmake/pcl_find_boost.cmake -@@ -19,7 +19,7 @@ if(${CMAKE_VERSION} VERSION_LESS 2.8.5) - "1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43") - else(${CMAKE_VERSION} VERSION_LESS 2.8.5) - set(Boost_ADDITIONAL_VERSIONS -- "1.61.0" "1.61" "1.60.0" "1.60" -+ "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" - "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" - "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" - "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47") diff --git a/ports/pcl/1823.patch b/ports/pcl/1823.patch deleted file mode 100644 index cc901a6be..000000000 --- a/ports/pcl/1823.patch +++ /dev/null @@ -1,22 +0,0 @@ -From b89b32b5e812353e93a5c35203c70b878c8ae2b7 Mon Sep 17 00:00:00 2001 -From: Mourad Boufarguine -Date: Mon, 20 Feb 2017 10:13:25 +0100 -Subject: [PATCH] Link to delayimp library for all MSVC versions - ---- - cmake/pcl_targets.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/pcl_targets.cmake b/cmake/pcl_targets.cmake -index 691ead0b7a..06df2791cd 100644 ---- a/cmake/pcl_targets.cmake -+++ b/cmake/pcl_targets.cmake -@@ -196,7 +196,7 @@ macro(PCL_ADD_LIBRARY _name _component) - target_link_libraries(${_name} gomp) - endif() - -- if(MSVC90 OR MSVC10) -+ if(MSVC) - target_link_libraries(${_name} delayimp.lib) # because delay load is enabled for openmp.dll - endif() - diff --git a/ports/pcl/1830.patch b/ports/pcl/1830.patch deleted file mode 100644 index b197e9183..000000000 --- a/ports/pcl/1830.patch +++ /dev/null @@ -1,68 +0,0 @@ -From b9022ebd8ad5f5300662069b5f79995d0c0e18be Mon Sep 17 00:00:00 2001 -From: Tsukasa Sugiura -Date: Fri, 24 Feb 2017 23:52:40 +0900 -Subject: [PATCH] Remove MSVCdd variables - -Version check for MSVC with MSVC_VERSION variable instead of MSVCdd -variables, because MSVCdd variables are legacy. -(e.g. MSVCdd is not defined for Visual C++ 2017.) ---- - CMakeLists.txt | 14 +++++++------- - cmake/pcl_cpack.cmake | 10 +++++----- - 2 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7c455e175d..a07a3af0a4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -248,18 +248,18 @@ if(OPENMP_FOUND) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") - message (STATUS "Found OpenMP") - if(MSVC) -- if(MSVC90) -+ if(MSVC_VERSION EQUAL 1500) - set(OPENMP_DLL VCOMP90) -- elseif(MSVC10) -+ elseif(MSVC_VERSION EQUAL 1600) - set(OPENMP_DLL VCOMP100) -- elseif(MSVC11) -+ elseif(MSVC_VERSION EQUAL 1700) - set(OPENMP_DLL VCOMP110) -- elseif(MSVC12) -+ elseif(MSVC_VERSION EQUAL 1800) - set(OPENMP_DLL VCOMP120) -- elseif(MSVC14) -+ elseif(MSVC_VERSION EQUAL 1900) -+ set(OPENMP_DLL VCOMP140) -+ elseif(MSVC_VERSION EQUAL 1910) - set(OPENMP_DLL VCOMP140) -- elseif(MSVC15) -- set(OPENMP_DLL VCOMP150) - endif() - if(OPENMP_DLL) - set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DELAYLOAD:${OPENMP_DLL}D.dll") -diff --git a/cmake/pcl_cpack.cmake b/cmake/pcl_cpack.cmake -index a42d930d2c..eec2b1b1db 100644 ---- a/cmake/pcl_cpack.cmake -+++ b/cmake/pcl_cpack.cmake -@@ -37,15 +37,15 @@ if(WIN32) - if(BUILD_all_in_one_installer) - set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}-${PCL_VERSION}-AllInOne") - endif(BUILD_all_in_one_installer) -- if(MSVC10) -+ if(MSVC_VERSION EQUAL 1600) - set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-msvc2010-${win_system_name}") -- elseif(MSVC11) -+ elseif(MSVC_VERSION EQUAL 1700) - set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-msvc2012-${win_system_name}") -- elseif(MSVC12) -+ elseif(MSVC_VERSION EQUAL 1800) - set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-msvc2013-${win_system_name}") -- elseif(MSVC14) -+ elseif(MSVC_VERSION EQUAL 1900) - set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-msvc2015-${win_system_name}") -- elseif(MSVC15) -+ elseif(MSVC_VERSION EQUAL 1910) - set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-msvc2017-${win_system_name}") - else() - set(CPACK_NSIS_PACKAGE_NAME "${CPACK_NSIS_PACKAGE_NAME}-${win_system_name}") diff --git a/ports/pcl/1855.patch b/ports/pcl/1855.patch deleted file mode 100644 index 319408849..000000000 --- a/ports/pcl/1855.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 274e55a289c1f67e19c24a7672453384527247eb Mon Sep 17 00:00:00 2001 -From: Tsukasa Sugiura -Date: Tue, 18 Apr 2017 21:54:12 +0900 -Subject: [PATCH] Update find Boost version - -Update find Boost version. -Add Boost 1.64.0 that supported Visual Studio 2017. ---- - cmake/pcl_find_boost.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/pcl_find_boost.cmake b/cmake/pcl_find_boost.cmake -index 7ccf80c727..68920ccd41 100644 ---- a/cmake/pcl_find_boost.cmake -+++ b/cmake/pcl_find_boost.cmake -@@ -19,7 +19,7 @@ if(${CMAKE_VERSION} VERSION_LESS 2.8.5) - "1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43") - else(${CMAKE_VERSION} VERSION_LESS 2.8.5) - set(Boost_ADDITIONAL_VERSIONS -- "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" -+ "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" - "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" - "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" - "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47") diff --git a/ports/pcl/1856.patch b/ports/pcl/1856.patch deleted file mode 100644 index 75ccccc95..000000000 --- a/ports/pcl/1856.patch +++ /dev/null @@ -1,23 +0,0 @@ -From fd32c32e92c24823b4852f44221e67aba7accbf3 Mon Sep 17 00:00:00 2001 -From: Tsukasa Sugiura -Date: Sun, 23 Apr 2017 01:36:06 +0900 -Subject: [PATCH] Update find Boost versions for PCLConfig - -Add latest versions to find Boost macro. ---- - PCLConfig.cmake.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in -index fd214a85cb..af1f772db6 100644 ---- a/PCLConfig.cmake.in -+++ b/PCLConfig.cmake.in -@@ -91,7 +91,7 @@ macro(find_boost) - else(${CMAKE_VERSION} VERSION_LESS 2.8.5) - set(Boost_ADDITIONAL_VERSIONS - "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@.@Boost_SUBMINOR_VERSION@" "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@" -- "1.61.0" "1.61" "1.60.0" "1.60" -+ "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60" - "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" - "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" - "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47") diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index aa3b892b6..f27722d34 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,4 +1,4 @@ Source: pcl -Version: 1.8.0 +Version: 1.8.1rc1 Build-Depends: boost, eigen3, flann, qhull, vtk, openni2 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. diff --git a/ports/pcl/config.patch b/ports/pcl/config.patch index 2f1e26bb2..e3df7cd18 100644 --- a/ports/pcl/config.patch +++ b/ports/pcl/config.patch @@ -1,8 +1,8 @@ diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in -index 994d20e5d..7f57c0790 100644 +index f3089dfec..67ba5297c 100644 --- a/PCLConfig.cmake.in +++ b/PCLConfig.cmake.in -@@ -149,7 +149,7 @@ macro(find_qhull) +@@ -155,7 +155,7 @@ macro(find_qhull) NAMES "@QHULL_LIBRARY_DEBUG_NAME@" HINTS "${QHULL_ROOT}" "$ENV{QHULL_ROOT}" PATHS "$ENV{PROGRAMFILES}/qhull" "$ENV{PROGRAMW6432}/qhull" @@ -11,7 +11,7 @@ index 994d20e5d..7f57c0790 100644 find_package_handle_standard_args(qhull DEFAULT_MSG QHULL_LIBRARY QHULL_INCLUDE_DIRS) -@@ -433,7 +433,7 @@ macro(find_flann) +@@ -443,7 +443,7 @@ macro(find_flann) HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}" PATHS "$ENV{PROGRAMFILES}/flann 1.6.9" "$ENV{PROGRAMW6432}/flann 1.6.9" "$ENV{PROGRAMFILES}/flann" "$ENV{PROGRAMW6432}/flann" @@ -20,15 +20,15 @@ index 994d20e5d..7f57c0790 100644 find_package_handle_standard_args(Flann DEFAULT_MSG FLANN_LIBRARY FLANN_INCLUDE_DIRS) if(FLANN_FOUND) -@@ -708,6 +708,7 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR) +@@ -715,6 +715,7 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR) if(WIN32 AND NOT MINGW) # PCLConfig.cmake is installed to PCL_ROOT/cmake get_filename_component(PCL_ROOT "${PCL_DIR}" PATH) + get_filename_component(PCL_ROOT "${PCL_ROOT}" PATH) else(WIN32 AND NOT MINGW) # PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y - get_filename_component(PCL_ROOT "${PCL_DIR}" PATH) -@@ -719,7 +720,7 @@ if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl + set(PCL_ROOT "@CMAKE_INSTALL_PREFIX@") +@@ -725,7 +726,7 @@ if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl # Found a PCL installation # pcl_message("Found a PCL installation") set(PCL_INCLUDE_DIRS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") diff --git a/ports/pcl/config_install.patch b/ports/pcl/config_install.patch index de11bd939..fd71f8408 100644 --- a/ports/pcl/config_install.patch +++ b/ports/pcl/config_install.patch @@ -1,8 +1,8 @@ diff --git a/cmake/pcl_utils.cmake b/cmake/pcl_utils.cmake -index 55b0820f2..034fbc227 100644 +index 69f1e76a4..ad0579200 100644 --- a/cmake/pcl_utils.cmake +++ b/cmake/pcl_utils.cmake -@@ -109,7 +109,7 @@ macro(SET_INSTALL_DIRS) +@@ -114,7 +114,7 @@ macro(SET_INSTALL_DIRS) set(BIN_INSTALL_DIR "bin") set(PKGCFG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig") if(WIN32 AND NOT MINGW) diff --git a/ports/pcl/find_flann.patch b/ports/pcl/find_flann.patch index e46618255..394ecd867 100644 --- a/ports/pcl/find_flann.patch +++ b/ports/pcl/find_flann.patch @@ -1,19 +1,3 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e5fd763e3..241fa5208 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -276,9 +276,9 @@ include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) - add_definitions(-DEIGEN_USE_NEW_STDVECTOR - -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET) - # FLANN (required) --if(NOT PCL_SHARED_LIBS OR (WIN32 AND NOT MINGW)) -+if(NOT PCL_SHARED_LIBS) - set(FLANN_USE_STATIC ON) --endif(NOT PCL_SHARED_LIBS OR (WIN32 AND NOT MINGW)) -+endif(NOT PCL_SHARED_LIBS) - find_package(FLANN 1.7.0 REQUIRED) - include_directories(${FLANN_INCLUDE_DIRS}) - diff --git a/cmake/Modules/FindFLANN.cmake b/cmake/Modules/FindFLANN.cmake index b5739dc95..b5c22a3b0 100644 --- a/cmake/Modules/FindFLANN.cmake diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index cd335531e..b4e580dd7 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -11,13 +11,14 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pcl-pcl-1.8.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/PointCloudLibrary/pcl/archive/pcl-1.8.0.zip" - FILENAME "pcl-1.8.0.zip" - SHA512 932f7e2101707003712e53d9310c6ba8304b8d325997a71a45d052c329cd9465f1d390c6c53a11bcb01d65e808c7701452ea06f116a0bd779d8098fdf3246ca8 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO PointCloudLibrary/pcl + REF pcl-1.8.1rc1 + SHA512 c719f7ff8cc5be3cfb5f01c89727e94858ed0cf5d50e2b884599e4a5b289564b4e2843979406b62adee1f2cee7332195dcd6219e99accef5700f3119758eb53f + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} @@ -26,13 +27,6 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/find_flann.patch" "${CMAKE_CURRENT_LIST_DIR}/find_qhull.patch" "${CMAKE_CURRENT_LIST_DIR}/find_openni2.patch" - # Fix for PCL 1.8.0 - "${CMAKE_CURRENT_LIST_DIR}/1635.patch" - "${CMAKE_CURRENT_LIST_DIR}/1788.patch" - "${CMAKE_CURRENT_LIST_DIR}/1823.patch" - "${CMAKE_CURRENT_LIST_DIR}/1830.patch" - "${CMAKE_CURRENT_LIST_DIR}/1855.patch" - "${CMAKE_CURRENT_LIST_DIR}/1856.patch" ) if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") @@ -50,6 +44,7 @@ vcpkg_configure_cmake( -DBUILD_tools=OFF # PCL -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${CRT_LINKAGE} + -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${CRT_LINKAGE} -DPCL_SHARED_LIBS=${CRT_LINKAGE} # WITH -DWITH_CUDA=OFF @@ -64,7 +59,6 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/pcl_2d_release.dll ${CURRENT_PACKAGES_DIR}/debug/bin/pcl_2d_debug.dll) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcl) -- cgit v1.2.3 From 2a567f53123f0271651cb13ed933231459d3d169 Mon Sep 17 00:00:00 2001 From: Bagong Date: Fri, 7 Jul 2017 02:43:57 +0200 Subject: Undo rename of dll and follow standard for pdb --- ports/qscintilla/portfile.cmake | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ports/qscintilla/portfile.cmake b/ports/qscintilla/portfile.cmake index ca8204398..a03ecb7db 100644 --- a/ports/qscintilla/portfile.cmake +++ b/ports/qscintilla/portfile.cmake @@ -67,20 +67,15 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(INSTALL ${BUILD_DIR}/release/qscintilla2_qt5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin - RENAME qscintilla2.dll ) file(INSTALL ${BUILD_DIR}/debug/qscintilla2_qt5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - RENAME qscintilla2.dll ) - file(INSTALL - ${BUILD_DIR}/debug/qscintilla2_qt5.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - RENAME qscintilla2.pdb - ) +vcpkg_copy_pdbs() + endif() # Handle copyright -- cgit v1.2.3 From f354d6b31dc626ed649c3c679378965a8c8117c8 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 6 Jul 2017 19:59:56 -0700 Subject: [matio] Fixed issues with customer cmakelists.txt --- ports/matio/CMakeLists.txt | 50 +++++++++++----------------------------------- 1 file changed, 12 insertions(+), 38 deletions(-) diff --git a/ports/matio/CMakeLists.txt b/ports/matio/CMakeLists.txt index eaecf304b..60f8e76d7 100644 --- a/ports/matio/CMakeLists.txt +++ b/ports/matio/CMakeLists.txt @@ -16,30 +16,12 @@ set(SRC src/snprintf.c ) -set( - HEADERS - src/mat4.h - src/mat5.h - src/mat73.h - src/matio.h - src/matio_private.h - visual_studio/matio_pubconf.h - visual_studio/matioConfig.h -) - +include_directories(src visual_studio) add_library(libmatio ${SRC}) - -set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/includes) - -file(COPY ${HEADERS} DESTINATION ${COMMON_INCLUDES}) - -#fixes issues with relative directories include_directories(${COMMON_INCLUDES}) -option(BUILD_SHARED_LIBRARY ON) - add_definitions( -DH5_NO_DEPRECATED_SYMBOLS -DMAT73=1 -DREPLACE_GETOPT @@ -47,30 +29,23 @@ add_definitions( -DMATIO_HAVE_STDINT_H=1 ) -if(BUILD_SHARED_LIBRARY) - add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB) - set(HDF5_USE_STATIC_LIBRARIES OFF) +if(BUILD_SHARED_LIBS) + add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB) else() - set(HDF5_USE_STATIC_LIBRARIES ON) + add_definitions(-DH5_BUILT_AS_STATIC_LIB) endif() -find_package( ZLIB REQUIRED ) +find_package(ZLIB REQUIRED) -if (ZLIB_FOUND) - include_directories( ${ZLIB_INCLUDE_DIRS} ) - target_link_libraries(libmatio ${ZLIB_LIBRARIES}) - add_definitions(-DHAVE_ZLIB=1) -endif( ZLIB_FOUND ) +include_directories( ${ZLIB_INCLUDE_DIRS} ) +target_link_libraries(libmatio ${ZLIB_LIBRARIES}) +add_definitions(-DHAVE_ZLIB=1) -find_package( HDF5 REQUIRED) - -if(HDF5_FOUND) - include_directories( ${HDF5_INCLUDE_DIRS} ) - target_link_libraries(libmatio ${HDF5_C_LIBRARIES}) - add_definitions(-DHAVE_HDF5=1) -endif() +find_package(HDF5 REQUIRED) -message(STATUS ${HDF5_C_LIBRARIES}) +include_directories( ${HDF5_INCLUDE_DIRS} ) +target_link_libraries(libmatio ${HDF5_C_LIBRARIES}) +add_definitions(-DHAVE_HDF5=1) install( TARGETS libmatio @@ -83,7 +58,6 @@ if(NOT DISABLE_INSTALL_HEADERS) install(FILES src/matio.h visual_studio/matio_pubconf.h - visual_studio/matioConfig.h DESTINATION include ) endif() -- cgit v1.2.3 From e60f06f7e94b1b1e107c46ff29d60d46dad124fb Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 6 Jul 2017 20:08:22 -0700 Subject: [matio] Removed unnecessary include --- ports/matio/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/matio/CMakeLists.txt b/ports/matio/CMakeLists.txt index 60f8e76d7..2f085d7e1 100644 --- a/ports/matio/CMakeLists.txt +++ b/ports/matio/CMakeLists.txt @@ -20,8 +20,6 @@ include_directories(src visual_studio) add_library(libmatio ${SRC}) -include_directories(${COMMON_INCLUDES}) - add_definitions( -DH5_NO_DEPRECATED_SYMBOLS -DMAT73=1 -DREPLACE_GETOPT -- cgit v1.2.3 From c0890d7276f8a999e2e0914de617755ecb302cb0 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Fri, 7 Jul 2017 16:29:57 +0300 Subject: [grpc] Fix missing dll's for grpc_cpp_plugin --- ports/grpc/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 3397e86dc..1da3735cc 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -60,6 +60,11 @@ 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) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY ${CURRENT_INSTALLED_DIR}/bin/libprotobuf.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) + file(COPY ${CURRENT_INSTALLED_DIR}/bin/libprotoc.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) + file(COPY ${CURRENT_INSTALLED_DIR}/bin/zlib1.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) + endif() endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) -- cgit v1.2.3 From 2986a6c57d5fc3dcad3f4e9c41db340d8392e164 Mon Sep 17 00:00:00 2001 From: Kalessin Date: Fri, 7 Jul 2017 22:12:09 +0200 Subject: add LuaJIT port --- ports/luajit/CONTROL | 3 +++ ports/luajit/portfile.cmake | 66 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 ports/luajit/CONTROL create mode 100644 ports/luajit/portfile.cmake diff --git a/ports/luajit/CONTROL b/ports/luajit/CONTROL new file mode 100644 index 000000000..5a5ad6b91 --- /dev/null +++ b/ports/luajit/CONTROL @@ -0,0 +1,3 @@ +Source: luajit +Version: 2.0.5 +Description: LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. diff --git a/ports/luajit/portfile.cmake b/ports/luajit/portfile.cmake new file mode 100644 index 000000000..d00aaf73b --- /dev/null +++ b/ports/luajit/portfile.cmake @@ -0,0 +1,66 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/LuaJIT-2.0.5) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LuaJIT/LuaJIT + REF v2.0.5 + SHA512 65d982d7fe532a61335613f414f3b8fa5333747bdf7aefc2c2d52022d227594ade827639049b97e3c4ffae9f38f32cb15f1a17b1780fb0a943e1a3af05e2b576 + HEAD_REF master +) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/luajit) + +set (SRC ${SOURCE_PATH}/src) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set (LJIT_STATIC "") +else() + set (LJIT_STATIC "static") +endif() + +message(STATUS "Building ${TARGET_TRIPLET}-dbg") + +file(REMOVE "${SOURCE_PATH}/src/*.dll") +file(REMOVE "${SOURCE_PATH}/src/*.exe") +vcpkg_execute_required_process_repeat( + COUNT 1 + COMMAND "${SOURCE_PATH}/src/msvcbuild.bat" "debug" ${LJIT_STATIC} + WORKING_DIRECTORY "${SOURCE_PATH}/src/" + LOGNAME build-${TARGET_TRIPLET}-dbg +) + + +file(INSTALL ${SRC}/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${SRC}/luajit.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL ${SRC}/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +message(STATUS "Building ${TARGET_TRIPLET}-rel") + +file(REMOVE "${SOURCE_PATH}/src/*.dll") +file(REMOVE "${SOURCE_PATH}/src/*.exe") +vcpkg_execute_required_process_repeat( + COUNT 1 + COMMAND "${SOURCE_PATH}/src/msvcbuild.bat" ${LJIT_STATIC} + WORKING_DIRECTORY "${SOURCE_PATH}/src/" + LOGNAME build-${TARGET_TRIPLET}-rel +) + +file(INSTALL ${SRC}/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${SRC}/luajit.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL ${SRC}/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() + +file(INSTALL ${SRC}/lua.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SRC}/luajit.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SRC}/luaconf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SRC}/lualib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SRC}/lauxlib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SRC}/lua.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -- cgit v1.2.3 From ea99a07799704967f84ee2d51a18148dd2ec428d Mon Sep 17 00:00:00 2001 From: Kalessin Date: Fri, 7 Jul 2017 23:21:40 +0200 Subject: fix static build --- ports/luajit/001-fixStaticBuild.patch | 20 +++++++++++++++ ports/luajit/portfile.cmake | 47 ++++++++++++++++++++++------------- 2 files changed, 50 insertions(+), 17 deletions(-) create mode 100644 ports/luajit/001-fixStaticBuild.patch diff --git a/ports/luajit/001-fixStaticBuild.patch b/ports/luajit/001-fixStaticBuild.patch new file mode 100644 index 000000000..11b6ea219 --- /dev/null +++ b/ports/luajit/001-fixStaticBuild.patch @@ -0,0 +1,20 @@ +diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat +index bd0c4c5..1210fd2 100644 +--- a/src/msvcbuild.bat ++++ b/src/msvcbuild.bat +@@ -67,6 +67,7 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c + @shift + @set LJCOMPILE=%LJCOMPILE% /Zi + @set LJLINK=%LJLINK% /debug ++@set DEBUG=1 + :NODEBUG + @if "%1"=="amalg" goto :AMALGDLL + @if "%1"=="static" goto :STATIC +@@ -76,6 +77,7 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c + @if errorlevel 1 goto :BAD + @goto :MTDLL + :STATIC ++@if "%DEBUG%"=="1" set LJCOMPILE=%LJCOMPILE% /MTd + %LJCOMPILE% lj_*.c lib_*.c + @if errorlevel 1 goto :BAD + %LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj diff --git a/ports/luajit/portfile.cmake b/ports/luajit/portfile.cmake index d00aaf73b..42f26d7b4 100644 --- a/ports/luajit/portfile.cmake +++ b/ports/luajit/portfile.cmake @@ -21,46 +21,59 @@ else() set (LJIT_STATIC "static") endif() +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-fixStaticBuild.patch +) + message(STATUS "Building ${TARGET_TRIPLET}-dbg") -file(REMOVE "${SOURCE_PATH}/src/*.dll") -file(REMOVE "${SOURCE_PATH}/src/*.exe") +file(REMOVE "${SRC}/*.dll") +file(REMOVE "${SRC}/*.exe") +file(REMOVE "${SRC}/*.lib") + vcpkg_execute_required_process_repeat( COUNT 1 - COMMAND "${SOURCE_PATH}/src/msvcbuild.bat" "debug" ${LJIT_STATIC} + COMMAND "${SOURCE_PATH}/src/msvcbuild.bat" debug ${LJIT_STATIC} WORKING_DIRECTORY "${SOURCE_PATH}/src/" LOGNAME build-${TARGET_TRIPLET}-dbg ) - -file(INSTALL ${SRC}/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(INSTALL ${SRC}/luajit.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools) +file(INSTALL ${SRC}/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(INSTALL ${SRC}/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) endif() +file(REMOVE "${SRC}/*.dll") +file(REMOVE "${SRC}/*.exe") +file(REMOVE "${SRC}/*.lib") + message(STATUS "Building ${TARGET_TRIPLET}-rel") -file(REMOVE "${SOURCE_PATH}/src/*.dll") -file(REMOVE "${SOURCE_PATH}/src/*.exe") -vcpkg_execute_required_process_repeat( +vcpkg_execute_required_process_repeat(d8un COUNT 1 COMMAND "${SOURCE_PATH}/src/msvcbuild.bat" ${LJIT_STATIC} WORKING_DIRECTORY "${SOURCE_PATH}/src/" LOGNAME build-${TARGET_TRIPLET}-rel ) -file(INSTALL ${SRC}/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${SRC}/luajit.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(INSTALL ${SRC}/luajit.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(INSTALL ${SRC}/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(INSTALL ${SRC}/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SRC}/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) endif() -file(INSTALL ${SRC}/lua.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SRC}/luajit.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SRC}/luaconf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SRC}/lualib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SRC}/lauxlib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SRC}/lua.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SRC}/lua.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SRC}/luajit.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SRC}/luaconf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SRC}/lualib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SRC}/lauxlib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SRC}/lua.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(REMOVE "${SRC}/*.dll") +file(REMOVE "${SRC}/*.exe") +file(REMOVE "${SRC}/*.lib") -- cgit v1.2.3 From 0e866f673038eb22d958e54551369448082b215a Mon Sep 17 00:00:00 2001 From: Kalessin Date: Fri, 7 Jul 2017 23:27:09 +0200 Subject: add pdb copy command --- ports/luajit/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/luajit/portfile.cmake b/ports/luajit/portfile.cmake index 42f26d7b4..ddcd5eb54 100644 --- a/ports/luajit/portfile.cmake +++ b/ports/luajit/portfile.cmake @@ -46,6 +46,7 @@ file(INSTALL ${SRC}/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/li if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(INSTALL ${SRC}/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) endif() +vcpkg_copy_pdbs() file(REMOVE "${SRC}/*.dll") file(REMOVE "${SRC}/*.exe") @@ -66,6 +67,7 @@ file(INSTALL ${SRC}/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(INSTALL ${SRC}/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) endif() +vcpkg_copy_pdbs() file(INSTALL ${SRC}/lua.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(INSTALL ${SRC}/luajit.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -- cgit v1.2.3 From 56833bd4f5367b06970e5905c9687ff63724bc30 Mon Sep 17 00:00:00 2001 From: Kalessin Date: Fri, 7 Jul 2017 23:30:44 +0200 Subject: disable build for uwp --- ports/luajit/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/luajit/portfile.cmake b/ports/luajit/portfile.cmake index ddcd5eb54..da68d3ad4 100644 --- a/ports/luajit/portfile.cmake +++ b/ports/luajit/portfile.cmake @@ -1,5 +1,9 @@ include(vcpkg_common_functions) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "LuaJIT currently only supports being built for desktop") +endif() + set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/LuaJIT-2.0.5) vcpkg_from_github( -- cgit v1.2.3 From e626129d53587647ea7d7a73217117dde588c9d3 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Fri, 30 Jun 2017 00:56:12 +0300 Subject: [openimageio] Initial commit. Closes #687 --- ports/openimageio/CONTROL | 4 +++ ports/openimageio/portfile.cmake | 53 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 ports/openimageio/CONTROL create mode 100644 ports/openimageio/portfile.cmake diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL new file mode 100644 index 000000000..b04914c5c --- /dev/null +++ b/ports/openimageio/CONTROL @@ -0,0 +1,4 @@ +Source: openimageio +Version: 1.7.15 +Description: An library for reading and writing images, and a bunch of related classes, utilities, and application +Build-Depends: boost, libjpeg-turbo, tiff, libpng, openexr \ No newline at end of file diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake new file mode 100644 index 000000000..cc62bd58c --- /dev/null +++ b/ports/openimageio/portfile.cmake @@ -0,0 +1,53 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenImageIO/oiio + REF Release-1.7.15 + SHA512 5b83961a77de36082e0a3abeac8015f9455504680d7437777524a9ac17ac7994df2a2ad1af86a884cf17c1afcd71a36a30e24711cba8d8a30511c05e36d7fadc + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILDSTATIC ON) + set(LINKSTATIC ON) +else() + set(BUILDSTATIC OFF) + set(LINKSTATIC OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOIIO_BUILD_TOOLS=OFF + -DOIIO_BUILD_TESTS=OFF + -DHIDE_SYMBOLS=ON + -DUSE_FFMPEG=OFF + -DUSE_FIELD3D=OFF + -DUSE_FREETYPE=OFF + -DUSE_GIF=OFF + -DUSE_LIBRAW=OFF + -DUSE_NUKE=OFF + -DUSE_OCIO=OFF + -DUSE_OPENCV=OFF + -DUSE_OPENJPEG=OFF + -DUSE_PTEX=OFF + -DUSE_PYTHON=OFF + -DUSE_QT=OFF + -DBUILDSTATIC=${BUILDSTATIC} + -DLINKSTATIC=${LINKSTATIC} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# 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) -- cgit v1.2.3 From d222302b2f4bd2d857949fde71b927385d703acd Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Fri, 30 Jun 2017 20:49:54 +0300 Subject: [cereal] Portfile fix --- ports/cereal/CONTROL | 2 +- ports/cereal/portfile.cmake | 31 +++++++++++++++++++-------- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 4 ++++ 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/ports/cereal/CONTROL b/ports/cereal/CONTROL index 3c598a735..77ca17835 100644 --- a/ports/cereal/CONTROL +++ b/ports/cereal/CONTROL @@ -1,3 +1,3 @@ Source: cereal -Version: 1.2.1 +Version: 1.2.2 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 f6555416c..d70c9a6e9 100644 --- a/ports/cereal/portfile.cmake +++ b/ports/cereal/portfile.cmake @@ -1,16 +1,29 @@ #header-only library + include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cereal-1.2.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/USCiLab/cereal/archive/v1.2.1.tar.gz" - FILENAME "cereal-1.2.1.tar.gz" - SHA512 f0050f27433a4b544e7785aa94fc7b14a57eed6d542e25d3d0fda4d27cf55ea55e796be2138bf80809c96c392436513fe42764b3a456938395bf7f7177dd1c73 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO USCiLab/cereal + REF v1.2.2 + SHA512 9567b2e19add9446b24f8afd122eea09ba6ecd1a090335cf0ab31fdc8f64c6c97daa3d9eaf0801c36a770737488e0eebf81d96d7b7a65deed30da6130f2d47eb + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DJUST_INSTALL_CEREAL=ON ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/cmake/cereal") + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cereal) file(RENAME ${CURRENT_PACKAGES_DIR}/share/cereal/LICENSE ${CURRENT_PACKAGES_DIR}/share/cereal/copyright) - -# Copy the cereal header files -file(COPY ${SOURCE_PATH}/include/cereal DESTINATION ${CURRENT_PACKAGES_DIR}/include) \ No newline at end of file diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 6fa096cbd..eaf3bb966 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -116,6 +116,10 @@ function(vcpkg_fixup_cmake_targets) file(GLOB MAIN_CONFIGS "${RELEASE_SHARE}/*[Cc]onfig.cmake") foreach(MAIN_CONFIG ${MAIN_CONFIGS}) file(READ ${MAIN_CONFIG} _contents) + string(REGEX REPLACE + "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + _contents "${_contents}") string(REGEX REPLACE "get_filename_component\\(PACKAGE_PREFIX_DIR \"\\\${CMAKE_CURRENT_LIST_DIR}/\\.\\./(\\.\\./)*\" ABSOLUTE\\)" "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)" -- cgit v1.2.3 From f8ae60976d28aea7f8aac6ef5d39669b36b41ae1 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Sat, 1 Jul 2017 00:38:26 +0300 Subject: [freeglut] Remove debug suffix --- ports/freeglut/CONTROL | 2 +- ports/freeglut/portfile.cmake | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ports/freeglut/CONTROL b/ports/freeglut/CONTROL index 00680a773..775f98938 100644 --- a/ports/freeglut/CONTROL +++ b/ports/freeglut/CONTROL @@ -1,3 +1,3 @@ Source: freeglut -Version: 3.0.0 +Version: 3.0.0-1 Description: Open source implementation of GLUT with source and binary backwards compatibility. \ No newline at end of file diff --git a/ports/freeglut/portfile.cmake b/ports/freeglut/portfile.cmake index 929d8b9e4..c2d1f2816 100644 --- a/ports/freeglut/portfile.cmake +++ b/ports/freeglut/portfile.cmake @@ -7,6 +7,12 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +# disable debug suffix, because FindGLUT.cmake from CMake 3.8 doesn't support it +file(READ ${SOURCE_PATH}/CMakeLists.txt FREEGLUT_CMAKELISTS) +string(REPLACE "SET( CMAKE_DEBUG_POSTFIX \"d\" )" + "\#SET( CMAKE_DEBUG_POSTFIX \"d\" )" FREEGLUT_CMAKELISTS "${FREEGLUT_CMAKELISTS}") +file(WRITE ${SOURCE_PATH}/CMakeLists.txt "${FREEGLUT_CMAKELISTS}") + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(FREEGLUT_STATIC OFF) set(FREEGLUT_DYNAMIC ON) @@ -26,6 +32,15 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +# Patch header +file(READ ${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h FREEGLUT_STDH) +string(REPLACE "pragma comment (lib, \"freeglut_staticd.lib\")" + "pragma comment (lib, \"freeglut_static.lib\")" FREEGLUT_STDH "${FREEGLUT_STDH}") +string(REPLACE "pragma comment (lib, \"freeglutd.lib\")" + "pragma comment (lib, \"freeglut.lib\")" FREEGLUT_STDH "${FREEGLUT_STDH}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h "${FREEGLUT_STDH}") + +# Clean file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -- cgit v1.2.3 From 4267c86b1f7cfe20e88fe7a1eaaa4caaca8c5d77 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 7 Jul 2017 17:19:19 -0700 Subject: [grpc] Use vcpkg_copy_tool_dependencies --- ports/grpc/CONTROL | 2 +- ports/grpc/portfile.cmake | 6 +----- toolsrc/src/PostBuildLint.cpp | 14 +++++++------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 8298a047c..280342f61 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.4.0 +Version: 1.4.0-1 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework \ No newline at end of file diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 1da3735cc..1c2f4b7f2 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -60,11 +60,7 @@ 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) - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(COPY ${CURRENT_INSTALLED_DIR}/bin/libprotobuf.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) - file(COPY ${CURRENT_INSTALLED_DIR}/bin/libprotoc.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) - file(COPY ${CURRENT_INSTALLED_DIR}/bin/zlib1.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/grpc) - endif() + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/grpc) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 82d50a68f..8e11ae5b1 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -775,15 +775,15 @@ namespace vcpkg::PostBuildLint error_count += check_lib_architecture(pre_build_info.target_architecture, libs); } + std::vector debug_dlls = fs.get_files_recursive(debug_bin_dir); + Util::unstable_keep_if(debug_dlls, has_extension_pred(fs, ".dll")); + std::vector release_dlls = fs.get_files_recursive(release_bin_dir); + Util::unstable_keep_if(release_dlls, has_extension_pred(fs, ".dll")); + switch (build_info.library_linkage) { case Build::LinkageType::DYNAMIC: { - std::vector debug_dlls = fs.get_files_recursive(debug_bin_dir); - Util::unstable_keep_if(debug_dlls, has_extension_pred(fs, ".dll")); - std::vector release_dlls = fs.get_files_recursive(release_bin_dir); - Util::unstable_keep_if(release_dlls, has_extension_pred(fs, ".dll")); - error_count += check_matching_debug_and_release_binaries(debug_dlls, release_dlls); error_count += check_lib_files_are_available_if_dlls_are_available( @@ -804,8 +804,8 @@ namespace vcpkg::PostBuildLint } case Build::LinkageType::STATIC: { - std::vector dlls = fs.get_files_recursive(package_dir); - Util::unstable_keep_if(dlls, has_extension_pred(fs, ".dll")); + auto dlls = release_dlls; + dlls.insert(dlls.end(), debug_dlls.begin(), debug_dlls.end()); error_count += check_no_dlls_present(dlls); error_count += check_bin_folders_are_not_present_in_static_build(fs, package_dir); -- cgit v1.2.3 From d67ae2fa3f84a3ce616f1d986009fd64f38edb4f Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Sat, 8 Jul 2017 03:42:54 +0300 Subject: [grpc] Update to version 1.4.1 Fix installing gRPCTargets*.cmake --- ports/grpc/CONTROL | 2 +- ports/grpc/portfile.cmake | 5 +++-- ports/grpc/revert-c019e05.patch | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 ports/grpc/revert-c019e05.patch diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 280342f61..d9654cddf 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.4.0-1 +Version: 1.4.1 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework \ No newline at end of file diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 1c2f4b7f2..e26c758d0 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF v1.4.0 - SHA512 183254e62604bae0ef8b97c3cda9718ec7ac03a1f29e29ecc582adf670d07ee177ae1ad92ffc042f8b12715f3afa8a0e4db34f88b826fe307249fd6eb7efd249 + REF v1.4.1 + SHA512 5028e4f881a41e4c4ddf770bd824d1d5de825f86d68dbbfab22e2a34ec0e46b27754b0f5b40cfc02b0d22a756b08056b100837b590745b5fdbdce9a803e59f8d HEAD_REF master ) @@ -21,6 +21,7 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES + ${CMAKE_CURRENT_LIST_DIR}/revert-c019e05.patch ${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext.patch ) diff --git a/ports/grpc/revert-c019e05.patch b/ports/grpc/revert-c019e05.patch new file mode 100644 index 000000000..afb5cfa71 --- /dev/null +++ b/ports/grpc/revert-c019e05.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b7555b1bc3..edbffea76c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14204,6 +14204,13 @@ endif (gRPC_BUILD_TESTS) + + + ++if (gRPC_INSTALL) ++ install(EXPORT gRPCTargets ++ DESTINATION ${CMAKE_INSTALL_CMAKEDIR} ++ NAMESPACE gRPC:: ++ ) ++endif() ++ + foreach(_config gRPCConfig gRPCConfigVersion) + configure_file(tools/cmake/${_config}.cmake.in + ${_config}.cmake @ONLY) -- cgit v1.2.3 From 09bce9186ef205c62882b42dc117e421d1a3ad90 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 7 Jul 2017 17:44:09 -0700 Subject: [sdl2-gfx] Small cleanup, better support static linking --- ports/sdl2-gfx/CMakeLists.txt | 12 +++++------- ports/sdl2-gfx/CONTROL | 2 +- ports/sdl2-gfx/portfile.cmake | 11 +---------- 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/ports/sdl2-gfx/CMakeLists.txt b/ports/sdl2-gfx/CMakeLists.txt index 7cc35ccb0..d0a9f0c82 100644 --- a/ports/sdl2-gfx/CMakeLists.txt +++ b/ports/sdl2-gfx/CMakeLists.txt @@ -5,9 +5,10 @@ find_path(SDL_INCLUDE_DIR SDL2/SDL.h) find_library(SDL_LIBRARY SDL2) # builtin formats -set(SDL_GFX_DEFINES - WIN32 - DLL_EXPORT) +set(SDL_GFX_DEFINES WIN32) +if(BUILD_SHARED_LIBS) + list(APPEND SDL_GFX_DEFINES DLL_EXPORT) +endif() add_library(SDL2_gfx SDL2_framerate.c @@ -17,7 +18,7 @@ add_library(SDL2_gfx target_compile_definitions(SDL2_gfx PRIVATE ${SDL_GFX_DEFINES}) target_include_directories(SDL2_gfx PRIVATE ${SDL_INCLUDE_DIR}/SDL2) -target_link_libraries(SDL2_gfx ${SDL_LIBRARY}) +target_link_libraries(SDL2_gfx PRIVATE ${SDL_LIBRARY}) install(TARGETS SDL2_gfx RUNTIME DESTINATION bin @@ -27,6 +28,3 @@ install(TARGETS SDL2_gfx if(NOT SDL_GFX_SKIP_HEADERS) install(FILES SDL2_framerate.h SDL2_gfxPrimitives.h SDL2_imageFilter.h SDL2_rotozoom.h SDL2_gfxPrimitives_font.h DESTINATION include/SDL2) endif() - -message(STATUS "Link-time dependencies:") -message(STATUS " " ${SDL_LIBRARY}) diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL index cecb70f0a..799306235 100644 --- a/ports/sdl2-gfx/CONTROL +++ b/ports/sdl2-gfx/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-gfx -Version: 1.0.3 +Version: 1.0.3-1 Build-Depends: sdl2 Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer. diff --git a/ports/sdl2-gfx/portfile.cmake b/ports/sdl2-gfx/portfile.cmake index 50c23372b..f7c2d63f6 100644 --- a/ports/sdl2-gfx/portfile.cmake +++ b/ports/sdl2-gfx/portfile.cmake @@ -1,11 +1,3 @@ -# 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) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_gfx-1.0.3) vcpkg_download_distfile(ARCHIVE @@ -18,12 +10,11 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DSDL_GFX_SKIP_HEADERS=1 ) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx) file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx/COPYING ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx/copyright) -- cgit v1.2.3 From 5e45ee4a2d7668c3431bd029bdab3cc41f185369 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 7 Jul 2017 17:51:59 -0700 Subject: [protobuf] Fix protobuf headers to encode dynamic/static link. Fixes #1354. Fixes #1353. --- ports/protobuf/CONTROL | 2 +- ports/protobuf/portfile.cmake | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 43e4ad1e8..2ba75ed23 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,4 +1,4 @@ Source: protobuf -Version: 3.3.0-1 +Version: 3.3.0-2 Build-Depends: zlib Description: Protocol Buffers - Google's data interchange format \ No newline at end of file diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 852086ff5..52574ecee 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -85,6 +85,16 @@ else() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe) endif() +foreach(FILE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/arena.h ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/port.h) + file(READ ${FILE} _contents) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "defined(PROTOBUF_USE_DLLS)" "1" _contents ${_contents}) + else() + string(REPLACE "defined(PROTOBUF_USE_DLLS)" "0" _contents ${_contents}) + endif() + file(WRITE ${FILE} ${_contents}) +endforeach() + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/protobuf RENAME copyright) file(INSTALL ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) vcpkg_copy_pdbs() -- cgit v1.2.3 From 6e97f0018482e15e9b06f536a4ed12a73789c958 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 7 Jul 2017 18:44:28 -0700 Subject: [matio] Use target_X cmake directives. Prefer modern cmake ZLIB::ZLIB. --- ports/matio/CMakeLists.txt | 34 ++++++++++++++-------------------- ports/matio/CONTROL | 2 +- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/ports/matio/CMakeLists.txt b/ports/matio/CMakeLists.txt index 2f085d7e1..31b7e1e2b 100644 --- a/ports/matio/CMakeLists.txt +++ b/ports/matio/CMakeLists.txt @@ -16,34 +16,28 @@ set(SRC src/snprintf.c ) -include_directories(src visual_studio) - -add_library(libmatio ${SRC}) - -add_definitions( +add_library(libmatio ${SRC}) +target_include_directories(libmatio PRIVATE src visual_studio) +target_compile_definitions(libmatio PRIVATE -DH5_NO_DEPRECATED_SYMBOLS - -DMAT73=1 -DREPLACE_GETOPT + -DMAT73=1 + -DREPLACE_GETOPT -DMATIO_HAVE_INTTYPES_H=1 -DMATIO_HAVE_STDINT_H=1 ) -if(BUILD_SHARED_LIBS) - add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB) -else() - add_definitions(-DH5_BUILT_AS_STATIC_LIB) -endif() - find_package(ZLIB REQUIRED) - -include_directories( ${ZLIB_INCLUDE_DIRS} ) -target_link_libraries(libmatio ${ZLIB_LIBRARIES}) -add_definitions(-DHAVE_ZLIB=1) +target_link_libraries(libmatio PRIVATE ZLIB::ZLIB) +target_compile_definitions(libmatio PRIVATE -DHAVE_ZLIB=1) find_package(HDF5 REQUIRED) - -include_directories( ${HDF5_INCLUDE_DIRS} ) -target_link_libraries(libmatio ${HDF5_C_LIBRARIES}) -add_definitions(-DHAVE_HDF5=1) +target_include_directories(libmatio PRIVATE ${HDF5_INCLUDE_DIRS} ) +target_link_libraries(libmatio PRIVATE ${HDF5_C_LIBRARIES}) +if(BUILD_SHARED_LIBS) + target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_DYNAMIC_LIB) +else() + target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_STATIC_LIB) +endif() install( TARGETS libmatio diff --git a/ports/matio/CONTROL b/ports/matio/CONTROL index eb2f87b70..f4dac30a1 100644 --- a/ports/matio/CONTROL +++ b/ports/matio/CONTROL @@ -1,4 +1,4 @@ Source: matio -Version: 1.5.10 +Version: 1.5.10-1 Description: MATLAB MAT File I/O Library Build-Depends: zlib, hdf5 -- cgit v1.2.3 From b5cd10bc66b785fdc385c16cfddc503324ba8e53 Mon Sep 17 00:00:00 2001 From: Stephane Lajoie Date: Fri, 7 Jul 2017 22:23:19 -0400 Subject: Use vcpkg_fixup_cmake_targets to move cmake modules in place. Make sure MCAnalysis directory is empty before removing. Use file(INSTALL ...) to put licence file in place. --- ports/llvm/portfile.cmake | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index bd629e0c3..c09b66ff4 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -36,9 +36,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Move cmake modules to correct vcpkg location and remove extra copy -file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/llvm DESTINATION ${CURRENT_PACKAGES_DIR}/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/llvm) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Remove extra copies of include files in debug directory file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -47,9 +46,11 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -# Remove one empty include subdirectory -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/llvm/MC/MCAnalysis) +# Remove one empty include subdirectory if it is 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() # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/llvm) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/llvm/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/llvm/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/llvm RENAME copyright) -- cgit v1.2.3 From 8cd9b24ee41df6b0582e6a98a31c997539c478f8 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 7 Jul 2017 22:41:34 -0700 Subject: [protobuf] Fix protobuf missing semi colons #1409 --- ports/protobuf/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 52574ecee..07b7ea3aa 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -88,11 +88,11 @@ endif() foreach(FILE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/arena.h ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/port.h) file(READ ${FILE} _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - string(REPLACE "defined(PROTOBUF_USE_DLLS)" "1" _contents ${_contents}) + string(REPLACE "defined(PROTOBUF_USE_DLLS)" "1" _contents "${_contents}") else() - string(REPLACE "defined(PROTOBUF_USE_DLLS)" "0" _contents ${_contents}) + string(REPLACE "defined(PROTOBUF_USE_DLLS)" "0" _contents "${_contents}") endif() - file(WRITE ${FILE} ${_contents}) + file(WRITE ${FILE} "${_contents}") endforeach() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/protobuf RENAME copyright) -- cgit v1.2.3 From c297ee9848453ce85d272c3f5f0ddf382dce027d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 7 Jul 2017 23:12:54 -0700 Subject: [protobuf] Hotfix previous change. Fixes #1409. --- ports/protobuf/CONTROL | 2 +- ports/protobuf/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 2ba75ed23..192b57f96 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,4 +1,4 @@ Source: protobuf -Version: 3.3.0-2 +Version: 3.3.0-3 Build-Depends: zlib Description: Protocol Buffers - Google's data interchange format \ No newline at end of file diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 52574ecee..11a06ccd7 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -88,9 +88,9 @@ endif() foreach(FILE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/arena.h ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/port.h) file(READ ${FILE} _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - string(REPLACE "defined(PROTOBUF_USE_DLLS)" "1" _contents ${_contents}) + string(REPLACE "defined(PROTOBUF_USE_DLLS)" "1" _contents "${_contents}") else() - string(REPLACE "defined(PROTOBUF_USE_DLLS)" "0" _contents ${_contents}) + string(REPLACE "defined(PROTOBUF_USE_DLLS)" "0" _contents "${_contents}") endif() file(WRITE ${FILE} ${_contents}) endforeach() -- cgit v1.2.3 From 8d011eee976962a460bd8ed361ae8cc1b339651e Mon Sep 17 00:00:00 2001 From: James Chang Date: Sat, 8 Jul 2017 23:03:07 +0800 Subject: [eigen3] fix the missing CMakeLists.txt problem and copy additional Eigen directory to include --- ports/eigen3/CONTROL | 2 +- ports/eigen3/portfile.cmake | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL index 4dd1cd983..d93fc145a 100644 --- a/ports/eigen3/CONTROL +++ b/ports/eigen3/CONTROL @@ -1,3 +1,3 @@ Source: eigen3 -Version: 3.3.3-3 +Version: 3.3.3-4 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 ba968950a..219abadfa 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -6,7 +6,14 @@ vcpkg_download_distfile(ARCHIVE FILENAME "eigen-3.3.3.tar.bz2" SHA512 bb5a8b761371e516f0a344a7c9f6e369e21c2907c8548227933ca6010fc607a66c8d6ff7c41b1aec3dea7d482ce8c2a09e38ae5c7a2c5b16bdd8007e7a81ecc3 ) + vcpkg_extract_source_archive(${ARCHIVE}) +# check if required file exists +if((NOT EXISTS ${SOURCE_PATH}/Eigen/CMakeLists.txt) OR (NOT EXISTS ${SOURCE_PATH}/unsupported/Eigen/CMakeLists.txt)) + message(STATUS "Missing CMakeLists.txt in cache, remove ${CURRENT_BUILDTREES_DIR} and try again.") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}) + vcpkg_extract_source_archive(${ARCHIVE}) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -25,6 +32,13 @@ file(READ "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" EIGEN_TARGE string(REPLACE "set(_IMPORT_PREFIX " "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}/../..\" ABSOLUTE) #" EIGEN_TARGETS "${EIGEN_TARGETS}") file(WRITE "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" "${EIGEN_TARGETS}") +# Copy the eigen header files to conventional location for user-wide MSBuild integration +file(COPY ${SOURCE_PATH}/Eigen DESTINATION ${CURRENT_PACKAGES_DIR}/include) +# and no need to leave CMakeLists.txt there +if(EXISTS ${CURRENT_PACKAGES_DIR}/include/Eigen/CMakeLists.txt) + file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Eigen/CMakeLists.txt) +endif() + # Put the licence file where vcpkg expects it file(COPY ${SOURCE_PATH}/COPYING.README DESTINATION ${CURRENT_PACKAGES_DIR}/share/eigen3) file(RENAME ${CURRENT_PACKAGES_DIR}/share/eigen3/COPYING.README ${CURRENT_PACKAGES_DIR}/share/eigen3/copyright) -- cgit v1.2.3 From aa5c657ac46577570ee642593ef3059b8a36450b Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Sat, 8 Jul 2017 18:55:04 -0700 Subject: [beast] Update to version 76 --- ports/beast/CONTROL | 2 +- ports/beast/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL index c0dc43c05..5c32ec3e1 100644 --- a/ports/beast/CONTROL +++ b/ports/beast/CONTROL @@ -1,4 +1,4 @@ Source: beast -Version: v66 +Version: v76 Build-Depends: boost Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake index 726be4b1e..3f6b29705 100644 --- a/ports/beast/portfile.cmake +++ b/ports/beast/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vinniefalco/Beast - REF 7fb75d0627f7842a6a706b810d427962509e0e52 - SHA512 5d086d2edf18facc3f379c42ffcc2679f9c03f891d58f2c8e6cb1a9aa6ee73b232544d1c2a86ce9c42dbc9a41a58bd3480f958cc1c569e8b3b1890755ecfd7fc + REF 1bc30cb6e4ce0fd2e288b2cd74d18f857801cbc7 + SHA512 c3d6b99273c2b2acdd366547119e78c25f788dabfae11f533aea8d31d03383b46516398370103b01e3b9bb0bb3921c981299cd3591107845630181b48e3b010e HEAD_REF master ) -- cgit v1.2.3 From 7b12b4349ad96977b2631dce3246b6f84948d85f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 8 Jul 2017 22:43:43 -0700 Subject: [eigen3] Copy includes from packages dir instead of source, since they're already being installed. --- ports/eigen3/CONTROL | 2 +- ports/eigen3/portfile.cmake | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL index d93fc145a..8e397a6d0 100644 --- a/ports/eigen3/CONTROL +++ b/ports/eigen3/CONTROL @@ -1,3 +1,3 @@ Source: eigen3 -Version: 3.3.3-4 +Version: 3.3.3-5 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 219abadfa..6afe3a9e4 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -10,7 +10,7 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) # check if required file exists if((NOT EXISTS ${SOURCE_PATH}/Eigen/CMakeLists.txt) OR (NOT EXISTS ${SOURCE_PATH}/unsupported/Eigen/CMakeLists.txt)) - message(STATUS "Missing CMakeLists.txt in cache, remove ${CURRENT_BUILDTREES_DIR} and try again.") + message(STATUS "Missing CMakeLists.txt in cache, re-extracting.") file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}) vcpkg_extract_source_archive(${ARCHIVE}) endif() @@ -32,12 +32,9 @@ file(READ "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" EIGEN_TARGE string(REPLACE "set(_IMPORT_PREFIX " "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}/../..\" ABSOLUTE) #" EIGEN_TARGETS "${EIGEN_TARGETS}") file(WRITE "${CURRENT_PACKAGES_DIR}/share/eigen3/Eigen3Targets.cmake" "${EIGEN_TARGETS}") +file(GLOB INCLUDES ${CURRENT_PACKAGES_DIR}/include/eigen3/*) # Copy the eigen header files to conventional location for user-wide MSBuild integration -file(COPY ${SOURCE_PATH}/Eigen DESTINATION ${CURRENT_PACKAGES_DIR}/include) -# and no need to leave CMakeLists.txt there -if(EXISTS ${CURRENT_PACKAGES_DIR}/include/Eigen/CMakeLists.txt) - file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Eigen/CMakeLists.txt) -endif() +file(COPY ${INCLUDES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) # Put the licence file where vcpkg expects it file(COPY ${SOURCE_PATH}/COPYING.README DESTINATION ${CURRENT_PACKAGES_DIR}/share/eigen3) -- cgit v1.2.3 From 6f31f2d1b92f19cf8972dff67a5ef79905942a8d Mon Sep 17 00:00:00 2001 From: Maktm Date: Sun, 9 Jul 2017 01:28:51 -0500 Subject: Adds a missing new line statement --- toolsrc/src/commands_help.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/commands_help.cpp b/toolsrc/src/commands_help.cpp index a9f9956fe..e4be11a77 100644 --- a/toolsrc/src/commands_help.cpp +++ b/toolsrc/src/commands_help.cpp @@ -56,7 +56,7 @@ namespace vcpkg::Commands::Help std::string create_example_string(const std::string& command_and_arguments) { std::string cs = Strings::format("Example:\n" - " vcpkg %s", + " vcpkg %s\n", command_and_arguments); return cs; } -- cgit v1.2.3 From 26cf1a80e9e6855b521729a30d4cf6f530cc16c8 Mon Sep 17 00:00:00 2001 From: Viktor Elofsson Date: Fri, 7 Jul 2017 16:32:34 +0200 Subject: Add port for Rasterbar-libtorrent. --- ports/libtorrent/CONTROL | 4 ++ ports/libtorrent/add-datetime-to-boost-libs.patch | 13 +++++ ports/libtorrent/add-dbghelp-to-win32-libs.patch | 13 +++++ ports/libtorrent/portfile.cmake | 58 +++++++++++++++++++++++ 4 files changed, 88 insertions(+) create mode 100644 ports/libtorrent/CONTROL create mode 100644 ports/libtorrent/add-datetime-to-boost-libs.patch create mode 100644 ports/libtorrent/add-dbghelp-to-win32-libs.patch create mode 100644 ports/libtorrent/portfile.cmake diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL new file mode 100644 index 000000000..3e2294cee --- /dev/null +++ b/ports/libtorrent/CONTROL @@ -0,0 +1,4 @@ +Source: libtorrent +Version: 1.1.4 +Description: An efficient feature complete C++ BitTorrent implementation +Build-Depends: boost, openssl diff --git a/ports/libtorrent/add-datetime-to-boost-libs.patch b/ports/libtorrent/add-datetime-to-boost-libs.patch new file mode 100644 index 000000000..35d8de1cf --- /dev/null +++ b/ports/libtorrent/add-datetime-to-boost-libs.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 340e38f..1963d90 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -258,7 +258,7 @@ endif() + + # Boost + if(NOT DEFINED Boost_INCLUDE_DIR OR NOT DEFINED Boost_LIBRARIES) +- FIND_PACKAGE(Boost REQUIRED COMPONENTS system chrono random) ++ FIND_PACKAGE(Boost REQUIRED COMPONENTS system date_time chrono random) + endif() + include_directories(${Boost_INCLUDE_DIRS}) + target_link_libraries(torrent-rasterbar ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) diff --git a/ports/libtorrent/add-dbghelp-to-win32-libs.patch b/ports/libtorrent/add-dbghelp-to-win32-libs.patch new file mode 100644 index 000000000..35df3bc2b --- /dev/null +++ b/ports/libtorrent/add-dbghelp-to-win32-libs.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1963d90..99698a2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -267,7 +267,7 @@ target_link_libraries(torrent-rasterbar ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_I + #add_definitions(-DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -D__USE_W32_SOCKETS -DWIN32_LEAN_AND_MEAN ) + + if (WIN32) +- target_link_libraries(torrent-rasterbar wsock32 ws2_32 Iphlpapi) ++ target_link_libraries(torrent-rasterbar wsock32 ws2_32 Iphlpapi dbghelp) + add_definitions(-D_WIN32_WINNT=0x0600) + # prevent winsock1 to be included + add_definitions(-DWIN32_LEAN_AND_MEAN) diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake new file mode 100644 index 000000000..476d84221 --- /dev/null +++ b/ports/libtorrent/portfile.cmake @@ -0,0 +1,58 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libtorrent-libtorrent-1_1_4) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/arvidn/libtorrent/archive/libtorrent-1_1_4.zip" + FILENAME "libtorrent-1_1_4.zip" + SHA512 fd3b875c9626721db9b3e719ce50deeb6f39a030df1e23dd421d0b142aac9c3bb7bee3a61f0c18bb30f85d4dd6131fe90d6138c09ba598f09230824f8d5a3fb1 +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-datetime-to-boost-libs.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-dbghelp-to-win32-libs.patch +) + +if (NOT VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(FATAL_ERROR "Only dynamic linking supported.") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -Ddeprecated-functions=off +) + +vcpkg_install_cmake() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + # Put shared libraries into the proper directory + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/torrent-rasterbar.dll ${CURRENT_PACKAGES_DIR}/bin/torrent-rasterbar.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/torrent-rasterbar.dll ${CURRENT_PACKAGES_DIR}/debug/bin/torrent-rasterbar.dll) +else() + +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtorrent) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libtorrent/LICENSE ${CURRENT_PACKAGES_DIR}/share/libtorrent/copyright) + +# Do not duplicate include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 20944ef885c1b300974e0b4893e003d342330f06 Mon Sep 17 00:00:00 2001 From: Viktor Elofsson Date: Sun, 9 Jul 2017 22:34:33 +0200 Subject: Fix vcpkg Boost naming for static libs and also fix the include file for shared libs. --- ports/libtorrent/portfile.cmake | 13 ++++++++++--- ports/libtorrent/vcpkg-boost-madness.patch | 13 +++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 ports/libtorrent/vcpkg-boost-madness.patch diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake index 476d84221..6eb49c0b4 100644 --- a/ports/libtorrent/portfile.cmake +++ b/ports/libtorrent/portfile.cmake @@ -24,16 +24,20 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-datetime-to-boost-libs.patch PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-dbghelp-to-win32-libs.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/vcpkg-boost-madness.patch ) -if (NOT VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(FATAL_ERROR "Only dynamic linking supported.") +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(LIBTORRENT_SHARED ON) +else() + set(LIBTORRENT_SHARED OFF) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS + -Dshared=${LIBTORRENT_SHARED} -Ddeprecated-functions=off ) @@ -46,8 +50,11 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/torrent-rasterbar.dll ${CURRENT_PACKAGES_DIR}/bin/torrent-rasterbar.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/torrent-rasterbar.dll ${CURRENT_PACKAGES_DIR}/debug/bin/torrent-rasterbar.dll) -else() + # Defines for shared lib + file(READ ${CURRENT_PACKAGES_DIR}/include/libtorrent/export.hpp EXPORT_H) + string(REPLACE "defined TORRENT_BUILDING_SHARED" "1" EXPORT_H "${EXPORT_H}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/libtorrent/export.hpp "${EXPORT_H}") endif() # Handle copyright diff --git a/ports/libtorrent/vcpkg-boost-madness.patch b/ports/libtorrent/vcpkg-boost-madness.patch new file mode 100644 index 000000000..e9e498ee4 --- /dev/null +++ b/ports/libtorrent/vcpkg-boost-madness.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 99698a2..454bae6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -252,7 +252,7 @@ else() + + set(Boost_USE_STATIC_RUNTIME ON) + endif() +- set(Boost_USE_STATIC_LIBS ON) ++ set(Boost_USE_STATIC_LIBS OFF) + add_library(torrent-rasterbar STATIC ${sources2}) + endif() + -- cgit v1.2.3 From aea2734ad4c7fbe04bd5f35844aa72e4300d74fb Mon Sep 17 00:00:00 2001 From: Stephane Lajoie Date: Sun, 9 Jul 2017 19:47:35 -0400 Subject: Patch CMakeLists to install CMake modules to share/llvm instead of lib/cmake/llvm. This works better than vcpkg_fixup_cmake_targets because other parts of the LLVM build system really want all the variables set correctly. Also set other options to prevent creation of any bin/* instead of removing them after the fact, for the same reason. --- ports/llvm/install-cmake-modules-to-share.patch | 10 ++++++++ ports/llvm/portfile.cmake | 33 +++++++++---------------- 2 files changed, 21 insertions(+), 22 deletions(-) create mode 100644 ports/llvm/install-cmake-modules-to-share.patch diff --git a/ports/llvm/install-cmake-modules-to-share.patch b/ports/llvm/install-cmake-modules-to-share.patch new file mode 100644 index 000000000..b5193beca --- /dev/null +++ b/ports/llvm/install-cmake-modules-to-share.patch @@ -0,0 +1,10 @@ +diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt +index ac4b0b7..13a271d 100644 +--- a/cmake/modules/CMakeLists.txt ++++ b/cmake/modules/CMakeLists.txt +@@ -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 --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index c09b66ff4..9edf7f2b1 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/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) -# - # LLVM documentation recommends always using static library linkage when # building with Microsoft toolchain; it's also the default on other platforms set(VCPKG_LIBRARY_LINKAGE static) @@ -23,29 +11,30 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-cmake-modules-to-share.patch +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DLLVM_TARGETS_TO_BUILD=X86 - -DLLVM_BUILD_TOOLS=OFF - -DLLVM_BUILD_UTILS=OFF + -DLLVM_INCLUDE_TOOLS=OFF + -DLLVM_INCLUDE_UTILS=OFF + -DLLVM_INCLUDE_EXAMPLES=OFF + -DLLVM_INCLUDE_TESTS=OFF -DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF + -DLLVM_TOOLS_INSTALL_DIR=tools ) vcpkg_install_cmake() -# Move cmake modules to correct vcpkg location and remove extra copy -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/llvm) +# Remove extra copy of cmake modules and include files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - -# Remove extra copies of include files in debug directory file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Remove bin directories -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - # Remove one empty include subdirectory if it is indeed empty file(GLOB MCANALYSISFILES ${CURRENT_PACKAGES_DIR}/include/llvm/MC/MCAnalysis/*) if(NOT MCANALYSISFILES) -- cgit v1.2.3 From f9a0afb534687c950f0ab6bf11a45544b86e0cda Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 9 Jul 2017 22:36:14 -0700 Subject: new port: alembic --- ports/alembic/CONTROL | 4 ++++ ports/alembic/portfile.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 ports/alembic/CONTROL create mode 100644 ports/alembic/portfile.cmake diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL new file mode 100644 index 000000000..29ec78bc1 --- /dev/null +++ b/ports/alembic/CONTROL @@ -0,0 +1,4 @@ +Source: alembic +Version: 1.7.1 +Build-Depends:ilmbase +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. http://alembic.io/ diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake new file mode 100644 index 000000000..ae056bcdd --- /dev/null +++ b/ports/alembic/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alembic/alembic + REF 1.7.1 + SHA512 89e30b681a76eaf79b20ebeff62c495971b0eb64b28f249a14bbcf3bdb40df7eda93b0ede299dd5511bd4587a2cc2d4ebd851fb89bf999fdccc31fee3cffbba2 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Alembic") + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/abcdiff.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/abcecho.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/abcechobounds.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/abcls.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/abcstitcher.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/abctree.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/abcdiff.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/abcecho.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/abcechobounds.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/abcls.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/abcstitcher.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/abctree.exe) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/bin/Alembic.dll) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/Alembic.dll) + +# Put the license file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/Alembic/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/Alembic/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/Alembic/copyright) -- cgit v1.2.3 From d887fa4a301aa9bdf87d746ee4d1bed57d827bb8 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Mon, 10 Jul 2017 07:58:52 -0700 Subject: use glob to remove exe --- ports/alembic/portfile.cmake | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index ae056bcdd..26fa79e9c 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -20,18 +20,10 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/abcdiff.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/abcecho.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/abcechobounds.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/abcls.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/abcstitcher.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/abctree.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/abcdiff.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/abcecho.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/abcechobounds.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/abcls.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/abcstitcher.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/abctree.exe) +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(RENAME ${CURRENT_PACKAGES_DIR}/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/bin/Alembic.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/Alembic.dll) -- cgit v1.2.3 From ecf671bfa65d24dc01370a5a9ec626ee196a27ab Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Wed, 5 Jul 2017 12:46:26 +0300 Subject: [gflags] Rebuild required because of changes vcpkg_fixup_cmake_targets() --- ports/gflags/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index 8833c2f56..9fab690ce 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.2.0-3 +Version: 2.2.0-4 Description: A C++ library that implements commandline flags processing -- cgit v1.2.3 From 9bbe30521cc84453f7c53b7dd0787c7229eaa1de Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Wed, 5 Jul 2017 12:49:14 +0300 Subject: [glog] Update to version 0.3.5 --- ports/glog/CONTROL | 2 +- ports/glog/fix-cmake-install-files.patch | 32 ---------------------------- ports/glog/portfile.cmake | 36 ++++++++------------------------ 3 files changed, 10 insertions(+), 60 deletions(-) delete mode 100644 ports/glog/fix-cmake-install-files.patch diff --git a/ports/glog/CONTROL b/ports/glog/CONTROL index 5cf97bd11..74653e8bc 100644 --- a/ports/glog/CONTROL +++ b/ports/glog/CONTROL @@ -1,4 +1,4 @@ Source: glog -Version: 0.3.4-0472b91-1 +Version: 0.3.5 Description: C++ implementation of the Google logging module Build-Depends: gflags diff --git a/ports/glog/fix-cmake-install-files.patch b/ports/glog/fix-cmake-install-files.patch deleted file mode 100644 index 34f6f07f3..000000000 --- a/ports/glog/fix-cmake-install-files.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1429590..5ed110d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -390,7 +390,8 @@ if (HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS) - endif (HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS) - - if (gflags_FOUND) -- target_include_directories (glog PUBLIC ${gflags_INCLUDE_DIR}) -+ # when set to PUBLIC, will cause some wrong interface_include_directory for vcpkg -+ target_include_directories (glog PRIVATE ${gflags_INCLUDE_DIR}) - target_link_libraries (glog PUBLIC ${gflags_LIBRARIES}) - - if (NOT BUILD_SHARED_LIBS) -@@ -557,7 +558,7 @@ endif (gflags_FOUND) - - configure_package_config_file (glog-config.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/glog-config.cmake -- INSTALL_DESTINATION lib/cmake/glog -+ INSTALL_DESTINATION share/glog - NO_CHECK_REQUIRED_COMPONENTS_MACRO) - - write_basic_package_version_file (glog-config-version.cmake VERSION -@@ -569,6 +570,6 @@ export (PACKAGE glog) - install (FILES - ${CMAKE_CURRENT_BINARY_DIR}/glog-config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/glog-config-version.cmake -- DESTINATION lib/cmake/glog) -+ DESTINATION share/glog) - --install (EXPORT glog-targets NAMESPACE glog:: DESTINATION lib/cmake/glog) -+install (EXPORT glog-targets NAMESPACE glog:: DESTINATION share/glog) diff --git a/ports/glog/portfile.cmake b/ports/glog/portfile.cmake index d981c7e27..1fa6b0164 100644 --- a/ports/glog/portfile.cmake +++ b/ports/glog/portfile.cmake @@ -7,46 +7,28 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glog-0472b91c5defdf90cff7292e3bf7bd86770a9a0a) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/google/glog/archive/0472b91c5defdf90cff7292e3bf7bd86770a9a0a.zip" - FILENAME "glog-0472b91c5defdf90cff7292e3bf7bd86770a9a0a.zip" - SHA512 24506ad1cc05e8361379b925ecfc8f32cc47692a47598401cca340eb2a528fe28b8b0d3636983056c7910469d105095bd3bacacff6278bffa18d85603c3dbfa8 -) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-cmake-install-files.patch" + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/glog + REF v0.3.5 + SHA512 a54a3b8b4b7660d7558ba5168c659bc3c8323c30908a4f6a4bbc6f9cd899350f3243aabc720daebfdeb799b276b51ba1eaa1a0f83149c4e1a038d552ada1ed72 + HEAD_REF master ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/glog) -file(GLOB GLOG_CMAKE_FILES ${CURRENT_PACKAGES_DIR}/debug/share/glog/*.cmake) -file(COPY ${GLOG_CMAKE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/glog) +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/glog") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# changes target search path -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/glog/glog-targets-debug.cmake GLOG_DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" GLOG_DEBUG_MODULE "${GLOG_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/glog/glog-targets-debug.cmake "${GLOG_DEBUG_MODULE}") - -# remove not used cmake files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake ) +vcpkg_copy_pdbs() # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/glog) file(RENAME ${CURRENT_PACKAGES_DIR}/share/glog/COPYING ${CURRENT_PACKAGES_DIR}/share/glog/copyright) - -- cgit v1.2.3 From ce69ed555265ec85fd4c24a44600354b94930758 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 7 Jul 2017 23:11:46 -0700 Subject: [libconfig] Simplify CMake. Move header patching into the portfile. --- ports/libconfig/CMakeLists.txt | 36 ++++++++++-------------------------- ports/libconfig/CONTROL | 2 +- ports/libconfig/portfile.cmake | 15 +++++++++++++++ 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/ports/libconfig/CMakeLists.txt b/ports/libconfig/CMakeLists.txt index ca56aad67..8762917ef 100644 --- a/ports/libconfig/CMakeLists.txt +++ b/ports/libconfig/CMakeLists.txt @@ -1,7 +1,6 @@ cmake_minimum_required(VERSION 3.5.1) project(libconfig C CXX) - if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) add_definitions(-Dscandir=libconfig_scandir) @@ -20,27 +19,26 @@ set(CPP_SOURCES lib/libconfigcpp.cc ) -include_directories(lib) - find_path(DIRENT_H dirent.h) find_path(STDINT_H stdint.h) -include_directories(${DIRENT_H}) -include_directories(${STDINT_H}) +include_directories(lib ${DIRENT_H} ${STDINT_H}) + +add_definitions(-DYY_NO_UNISTD_H -DYY_USE_CONST) add_library(libconfig ${C_SOURCES}) add_library(libconfig++ ${CPP_SOURCES}) -target_link_libraries(libconfig++ libconfig) - if(BUILD_SHARED_LIBS) - target_compile_definitions(libconfig PRIVATE -DLIBCONFIG_EXPORTS -DYY_NO_UNISTD_H -DYY_USE_CONST) - target_compile_definitions(libconfig++ PRIVATE -DLIBCONFIG_EXPORTS -DLIBCONFIGXX_EXPORTS -DYY_NO_UNISTD_H -DYY_USE_CONST) + target_compile_definitions(libconfig PRIVATE -DLIBCONFIG_EXPORTS) + target_compile_definitions(libconfig++ PRIVATE -DLIBCONFIGXX_EXPORTS) else() - target_compile_definitions(libconfig PRIVATE -DLIBCONFIG_STATIC -DYY_NO_UNISTD_H) - target_compile_definitions(libconfig++ PRIVATE -DLIBCONFIG_STATIC -DYY_NO_UNISTD_H) + target_compile_definitions(libconfig PUBLIC -DLIBCONFIG_STATIC) + target_compile_definitions(libconfig++ PUBLIC -DLIBCONFIGXX_STATIC) endif() +target_link_libraries(libconfig++ PRIVATE libconfig) + install( TARGETS libconfig libconfig++ RUNTIME DESTINATION bin @@ -48,20 +46,6 @@ install( ARCHIVE DESTINATION lib ) -file(READ lib/libconfig.h++ LIBCONFIGXX_H) -file(READ lib/libconfig.h LIBCONFIG_H) - -if(BUILD_SHARED_LIBS) - string(REPLACE "defined(LIBCONFIGXX_EXPORTS)" "1" LIBCONFIGXX_H "${LIBCONFIGXX_H}") - string(REPLACE "defined(LIBCONFIG_EXPORTS)" "1" LIBCONFIG_H "${LIBCONFIGXX_H}") -else() - string(REPLACE "defined(LIBCONFIGXX_STATIC)" "1" LIBCONFIGXX_H "${LIBCONFIGXX_H}") - string(REPLACE "defined(LIBCONFIG_STATIC)" "1" LIBCONFIG_H "${LIBCONFIG_H}") -endif() - -file(WRITE ${PROJECT_BINARY_DIR}/libconfig.h++ "${LIBCONFIGXX_H}") -file(WRITE ${PROJECT_BINARY_DIR}/libconfig.h "${LIBCONFIG_H}") - if(NOT DISABLE_INSTALL_HEADERS) - install(FILES ${PROJECT_BINARY_DIR}/libconfig.h++ ${PROJECT_BINARY_DIR}/libconfig.h DESTINATION include) + install(FILES lib/libconfig.h++ lib/libconfig.h DESTINATION include) endif() diff --git a/ports/libconfig/CONTROL b/ports/libconfig/CONTROL index d86439cfd..45bf1db9b 100644 --- a/ports/libconfig/CONTROL +++ b/ports/libconfig/CONTROL @@ -1,4 +1,4 @@ Source: libconfig Version: 1.6.0 Description: C/C++ library for processing configuration files -Build-Depends: msinttypes, dirent +Build-Depends: dirent diff --git a/ports/libconfig/portfile.cmake b/ports/libconfig/portfile.cmake index 7838958da..73028de7c 100644 --- a/ports/libconfig/portfile.cmake +++ b/ports/libconfig/portfile.cmake @@ -26,6 +26,21 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +foreach(FILE ${CURRENT_PACKAGES_DIR}/include/libconfig.h++ ${CURRENT_PACKAGES_DIR}/include/libconfig.h) + file(READ ${FILE} _contents) + string(REPLACE "defined(LIBCONFIGXX_EXPORTS)" "0" _contents "${_contents}") + string(REPLACE "defined(LIBCONFIG_EXPORTS)" "0" _contents "${_contents}") + + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "defined(LIBCONFIGXX_STATIC)" "0" _contents "${_contents}") + string(REPLACE "defined(LIBCONFIG_STATIC)" "0" _contents "${_contents}") + else() + string(REPLACE "defined(LIBCONFIGXX_STATIC)" "1" _contents "${_contents}") + string(REPLACE "defined(LIBCONFIG_STATIC)" "1" _contents "${_contents}") + endif() + file(WRITE ${FILE} "${_contents}") +endforeach() + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libconfig RENAME copyright) vcpkg_copy_pdbs() -- cgit v1.2.3 From 83e3a296dc6921b2371b12dde004b6d7a4d11dd6 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Wed, 5 Jul 2017 12:52:10 +0300 Subject: [suitesparse] Porfile fix --- ports/suitesparse/CONTROL | 2 +- ports/suitesparse/portfile.cmake | 22 ++-------------------- ports/suitesparse/remove-debug-postfix.patch | 11 +++++++++++ 3 files changed, 14 insertions(+), 21 deletions(-) create mode 100644 ports/suitesparse/remove-debug-postfix.patch diff --git a/ports/suitesparse/CONTROL b/ports/suitesparse/CONTROL index 74491898e..000132c37 100644 --- a/ports/suitesparse/CONTROL +++ b/ports/suitesparse/CONTROL @@ -1,4 +1,4 @@ Source: suitesparse -Version: 4.5.5-1 +Version: 4.5.5-2 Build-Depends: metis, clapack Description: algebra library diff --git a/ports/suitesparse/portfile.cmake b/ports/suitesparse/portfile.cmake index 737561f9f..ce97c4b9f 100644 --- a/ports/suitesparse/portfile.cmake +++ b/ports/suitesparse/portfile.cmake @@ -42,6 +42,7 @@ vcpkg_extract_source_archive(${SUITESPARSE} ${SUITESPARSEWIN_PATH}) vcpkg_apply_patches( SOURCE_PATH ${SUITESPARSEWIN_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-suitesparse.patch" + PATCHES "${CMAKE_CURRENT_LIST_DIR}/remove-debug-postfix.patch" ) vcpkg_configure_cmake( @@ -63,11 +64,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/suitesparse/) - -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SuiteSparse-config.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SuiteSparse-config-release.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config-release.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/cmake/SuiteSparse-config-debug.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config-debug.cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") file(RENAME ${CURRENT_PACKAGES_DIR}/UseSuiteSparse.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/UseSuiteSparse.cmake) file(RENAME ${CURRENT_PACKAGES_DIR}/SuiteSparseConfig.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparseConfig.cmake) @@ -77,24 +74,9 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/SuiteSparseConfig.cmake) # Update paths in SuiteSparseConfig.cmake file(READ ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparseConfig.cmake _contents) string(REPLACE "set(SuiteSparse_LIB_POSTFIX \"64\")" "set(SuiteSparse_LIB_POSTFIX \"\")" _contents "${_contents}") -string(REPLACE "\#\# do nothing, it's OK" "include(${USE_SuiteSparse})" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparseConfig.cmake "${_contents}") -# Update paths in SuiteSparse-config.cmake -file(READ ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config.cmake _contents) -string(REPLACE "get_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)" - "get_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config.cmake "${_contents}") - -# Update paths in SuiteSparse-config-debug.cmake -file(READ ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config-debug.cmake _contents) -string(REPLACE "\${_IMPORT_PREFIX}/lib/" "\${_IMPORT_PREFIX}/debug/lib/" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config-debug.cmake "${_contents}") - #clean folders -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright of suitesparse and suitesparse-metis-for-windows diff --git a/ports/suitesparse/remove-debug-postfix.patch b/ports/suitesparse/remove-debug-postfix.patch new file mode 100644 index 000000000..1b41139da --- /dev/null +++ b/ports/suitesparse/remove-debug-postfix.patch @@ -0,0 +1,11 @@ +--- CMakeLists.txt Mon Feb 22 22:18:25 2016 ++++ CMakeLists.txt Wed Jul 05 14:14:21 2017 +@@ -35,7 +35,7 @@ + + # We want libraries to be named "libXXX" and "libXXXd" in all compilers: + # ------------------------------------------------------------------------ +-set(CMAKE_DEBUG_POSTFIX "d") ++#set(CMAKE_DEBUG_POSTFIX "d") + IF(MSVC) + set(SP_LIB_PREFIX "lib") # Libs are: "libXXX" + ENDIF(MSVC) -- cgit v1.2.3 From 4857f86a3b331fbb5a57b008908b3dfd4d57d0f0 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Fri, 30 Jun 2017 18:13:09 +0300 Subject: [ceres] Portfile fix --- ports/ceres/CONTROL | 2 +- ports/ceres/fix-find-packages.patch | 247 ++++++++++++++++++++++++++++++++++++ ports/ceres/portfile.cmake | 38 +++--- 3 files changed, 266 insertions(+), 21 deletions(-) create mode 100644 ports/ceres/fix-find-packages.patch diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL index 4266bbac1..856d690be 100644 --- a/ports/ceres/CONTROL +++ b/ports/ceres/CONTROL @@ -1,4 +1,4 @@ Source: ceres -Version: 1.12.0-1 +Version: 1.12.0-2 Build-Depends:suitesparse, eigen3, clapack, gflags, glog Description: non-linear optimization package \ No newline at end of file diff --git a/ports/ceres/fix-find-packages.patch b/ports/ceres/fix-find-packages.patch new file mode 100644 index 000000000..bdabdaa89 --- /dev/null +++ b/ports/ceres/fix-find-packages.patch @@ -0,0 +1,247 @@ +--- a/cmake/FindSuiteSparse.cmake Mon Dec 05 18:42:48 2016 ++++ b/cmake/FindSuiteSparse.cmake Fri Jul 07 01:50:54 2017 +@@ -179,8 +179,6 @@ + /opt/local/include/ufsparse # Mac OS X + /usr/local/homebrew/include # Mac OS X + /usr/local/include +- /usr/local/include/suitesparse +- /usr/include/suitesparse # Ubuntu + /usr/include) + list(APPEND SUITESPARSE_CHECK_LIBRARY_DIRS + ${SUITESPARSE_LIBRARY_DIR_HINTS} +@@ -188,9 +186,10 @@ + /opt/local/lib/ufsparse # Mac OS X + /usr/local/homebrew/lib # Mac OS X + /usr/local/lib +- /usr/local/lib/suitesparse +- /usr/lib/suitesparse # Ubuntu + /usr/lib) ++# Additional suffixes to try appending to each search path. ++list(APPEND SUITESPARSE_CHECK_PATH_SUFFIXES ++ suitesparse) # Windows/Ubuntu + + # Given the number of components of SuiteSparse, and to ensure that the + # automatic failure message generated by FindPackageHandleStandardArgs() +@@ -218,7 +217,8 @@ + set(AMD_FOUND TRUE) + list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS AMD_FOUND) + find_library(AMD_LIBRARY NAMES amd +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${AMD_LIBRARY}) + message(STATUS "Found AMD library: ${AMD_LIBRARY}") + else (EXISTS ${AMD_LIBRARY}) +@@ -229,7 +229,8 @@ + mark_as_advanced(AMD_LIBRARY) + + find_path(AMD_INCLUDE_DIR NAMES amd.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${AMD_INCLUDE_DIR}) + message(STATUS "Found AMD header in: ${AMD_INCLUDE_DIR}") + else (EXISTS ${AMD_INCLUDE_DIR}) +@@ -243,7 +244,8 @@ + set(CAMD_FOUND TRUE) + list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS CAMD_FOUND) + find_library(CAMD_LIBRARY NAMES camd +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${CAMD_LIBRARY}) + message(STATUS "Found CAMD library: ${CAMD_LIBRARY}") + else (EXISTS ${CAMD_LIBRARY}) +@@ -254,7 +256,8 @@ + mark_as_advanced(CAMD_LIBRARY) + + find_path(CAMD_INCLUDE_DIR NAMES camd.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${CAMD_INCLUDE_DIR}) + message(STATUS "Found CAMD header in: ${CAMD_INCLUDE_DIR}") + else (EXISTS ${CAMD_INCLUDE_DIR}) +@@ -268,7 +271,8 @@ + set(COLAMD_FOUND TRUE) + list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS COLAMD_FOUND) + find_library(COLAMD_LIBRARY NAMES colamd +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${COLAMD_LIBRARY}) + message(STATUS "Found COLAMD library: ${COLAMD_LIBRARY}") + else (EXISTS ${COLAMD_LIBRARY}) +@@ -279,7 +283,8 @@ + mark_as_advanced(COLAMD_LIBRARY) + + find_path(COLAMD_INCLUDE_DIR NAMES colamd.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${COLAMD_INCLUDE_DIR}) + message(STATUS "Found COLAMD header in: ${COLAMD_INCLUDE_DIR}") + else (EXISTS ${COLAMD_INCLUDE_DIR}) +@@ -293,7 +298,8 @@ + set(CCOLAMD_FOUND TRUE) + list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS CCOLAMD_FOUND) + find_library(CCOLAMD_LIBRARY NAMES ccolamd +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${CCOLAMD_LIBRARY}) + message(STATUS "Found CCOLAMD library: ${CCOLAMD_LIBRARY}") + else (EXISTS ${CCOLAMD_LIBRARY}) +@@ -304,7 +310,8 @@ + mark_as_advanced(CCOLAMD_LIBRARY) + + find_path(CCOLAMD_INCLUDE_DIR NAMES ccolamd.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${CCOLAMD_INCLUDE_DIR}) + message(STATUS "Found CCOLAMD header in: ${CCOLAMD_INCLUDE_DIR}") + else (EXISTS ${CCOLAMD_INCLUDE_DIR}) +@@ -318,7 +325,8 @@ + set(CHOLMOD_FOUND TRUE) + list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS CHOLMOD_FOUND) + find_library(CHOLMOD_LIBRARY NAMES cholmod +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${CHOLMOD_LIBRARY}) + message(STATUS "Found CHOLMOD library: ${CHOLMOD_LIBRARY}") + else (EXISTS ${CHOLMOD_LIBRARY}) +@@ -329,7 +337,8 @@ + mark_as_advanced(CHOLMOD_LIBRARY) + + find_path(CHOLMOD_INCLUDE_DIR NAMES cholmod.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${CHOLMOD_INCLUDE_DIR}) + message(STATUS "Found CHOLMOD header in: ${CHOLMOD_INCLUDE_DIR}") + else (EXISTS ${CHOLMOD_INCLUDE_DIR}) +@@ -343,7 +352,8 @@ + set(SUITESPARSEQR_FOUND TRUE) + list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS SUITESPARSEQR_FOUND) + find_library(SUITESPARSEQR_LIBRARY NAMES spqr +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${SUITESPARSEQR_LIBRARY}) + message(STATUS "Found SuiteSparseQR library: ${SUITESPARSEQR_LIBRARY}") + else (EXISTS ${SUITESPARSEQR_LIBRARY}) +@@ -354,7 +364,8 @@ + mark_as_advanced(SUITESPARSEQR_LIBRARY) + + find_path(SUITESPARSEQR_INCLUDE_DIR NAMES SuiteSparseQR.hpp +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${SUITESPARSEQR_INCLUDE_DIR}) + message(STATUS "Found SuiteSparseQR header in: ${SUITESPARSEQR_INCLUDE_DIR}") + else (EXISTS ${SUITESPARSEQR_INCLUDE_DIR}) +@@ -370,7 +381,8 @@ + # support for it, this will do no harm if it wasn't. + set(TBB_FOUND TRUE) + find_library(TBB_LIBRARIES NAMES tbb +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${TBB_LIBRARIES}) + message(STATUS "Found Intel Thread Building Blocks (TBB) library: " + "${TBB_LIBRARIES}, assuming SuiteSparseQR was compiled with TBB.") +@@ -383,7 +395,8 @@ + + if (TBB_FOUND) + find_library(TBB_MALLOC_LIB NAMES tbbmalloc +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${TBB_MALLOC_LIB}) + message(STATUS "Found Intel Thread Building Blocks (TBB) Malloc library: " + "${TBB_MALLOC_LIB}") +@@ -413,7 +426,8 @@ + # If SuiteSparse version is >= 4 then SuiteSparse_config is required. + # For SuiteSparse 3, UFconfig.h is required. + find_library(SUITESPARSE_CONFIG_LIBRARY NAMES suitesparseconfig +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${SUITESPARSE_CONFIG_LIBRARY}) + message(STATUS "Found SuiteSparse_config library: " + "${SUITESPARSE_CONFIG_LIBRARY}") +@@ -421,7 +435,8 @@ + mark_as_advanced(SUITESPARSE_CONFIG_LIBRARY) + + find_path(SUITESPARSE_CONFIG_INCLUDE_DIR NAMES SuiteSparse_config.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${SUITESPARSE_CONFIG_INCLUDE_DIR}) + message(STATUS "Found SuiteSparse_config header in: " + "${SUITESPARSE_CONFIG_INCLUDE_DIR}") +@@ -439,7 +454,8 @@ + # does not have librt). + if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR UNIX AND NOT APPLE) + find_library(LIBRT_LIBRARY NAMES rt +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (LIBRT_LIBRARY) + message(STATUS "Adding librt: ${LIBRT_LIBRARY} to " + "SuiteSparse_config libraries (required on Linux & Unix [not OSX] if " +@@ -458,7 +474,8 @@ + # UFconfig header which should be present in < v4 installs. + set(SUITESPARSE_CONFIG_FOUND FALSE) + find_path(UFCONFIG_INCLUDE_DIR NAMES UFconfig.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${UFCONFIG_INCLUDE_DIR}) + message(STATUS "Found UFconfig header in: ${UFCONFIG_INCLUDE_DIR}") + set(UFCONFIG_FOUND TRUE) +@@ -549,7 +566,8 @@ + + # METIS (Optional dependency). + find_library(METIS_LIBRARY NAMES metis +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${METIS_LIBRARY}) + message(STATUS "Found METIS library: ${METIS_LIBRARY}.") + set(METIS_FOUND TRUE) +--- a/cmake/FindCXSparse.cmake Mon Dec 05 18:42:48 2016 ++++ b/cmake/FindCXSparse.cmake Fri Jul 07 01:50:04 2017 +@@ -135,12 +135,16 @@ + /usr/local/homebrew/lib # Mac OS X. + /opt/local/lib + /usr/lib) ++# Additional suffixes to try appending to each search path. ++list(APPEND CXSPARSE_CHECK_PATH_SUFFIXES ++ suitesparse) # Linux/Windows + + # Search supplied hint directories first if supplied. + find_path(CXSPARSE_INCLUDE_DIR + NAMES cs.h +- PATHS ${CXSPARSE_INCLUDE_DIR_HINTS} +- ${CXSPARSE_CHECK_INCLUDE_DIRS}) ++ HINTS ${CXSPARSE_INCLUDE_DIR_HINTS} ++ PATHS ${CXSPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${CXSPARSE_CHECK_PATH_SUFFIXES}) + if (NOT CXSPARSE_INCLUDE_DIR OR + NOT EXISTS ${CXSPARSE_INCLUDE_DIR}) + cxsparse_report_not_found( +@@ -150,8 +154,9 @@ + NOT EXISTS ${CXSPARSE_INCLUDE_DIR}) + + find_library(CXSPARSE_LIBRARY NAMES cxsparse +- PATHS ${CXSPARSE_LIBRARY_DIR_HINTS} +- ${CXSPARSE_CHECK_LIBRARY_DIRS}) ++ HINTS ${CXSPARSE_LIBRARY_DIR_HINTS} ++ PATHS ${CXSPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${CXSPARSE_CHECK_PATH_SUFFIXES}) + if (NOT CXSPARSE_LIBRARY OR + NOT EXISTS ${CXSPARSE_LIBRARY}) + cxsparse_report_not_found( diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index 61cb4a009..959fa90d4 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -27,6 +27,15 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-find-packages.patch +) + +# Ninja crash compiler with error: +# "fatal error C1001: An internal error has occurred in the compiler. (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 255)" + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -36,22 +45,8 @@ vcpkg_configure_cmake( -DCXSPARSE=ON -DEIGENSPARSE=ON -DSUITESPARSE=ON - -DBLAS_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/openblas.lib - -DCXSPARSE_INCLUDE_DIR=${SUITESPARSE_INCLUDE_DIR} - -DCXSPARSE_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/libcxsparse.lib - -DEIGEN_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/eigen3 - -DGFLAGS_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include - -DGFLAGS_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/gflags.lib - -DGLOG_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include - -DGLOG_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/glog.lib - -DLAPACK_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/lapack.lib - -DMETIS_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/metis.lib - -DSUITESPARSE_INCLUDE_DIR_HINTS=${CURRENT_INSTALLED_DIR}/include/suitesparse - OPTIONS_RELEASE - -DSUITESPARSE_LIBRARY_DIR_HINTS=${CURRENT_INSTALLED_DIR}/lib - OPTIONS_DEBUG - -DSUITESPARSEQR_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/libspqrd.lib - -DSUITESPARSE_LIBRARY_DIR_HINTS=${CURRENT_INSTALLED_DIR}/debug/lib + -DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION=OFF # TheiaSfm doesn't work well with this + -DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION=OFF # TheiaSfm doesn't work well with this ) vcpkg_install_cmake() @@ -60,12 +55,15 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") vcpkg_copy_pdbs() -#clean +# Changes target search path +file(READ ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake CERES_TARGETS) +string(REPLACE "get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../" + "get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../../" CERES_TARGETS "${CERES_TARGETS}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake "${CERES_TARGETS}") + +# Clean file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE ${CURRENT_PACKAGES_DIR}/share/ceres/FindEigen.cmake) -file(REMOVE ${CURRENT_PACKAGES_DIR}/share/ceres/FindGflags.cmake) -file(REMOVE ${CURRENT_PACKAGES_DIR}/share/ceres/FindGlog.cmake) # Handle copyright of suitesparse and metis file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ceres) -- cgit v1.2.3 From afbe116fb7d6a39a8e3d8e0714712dffd11d691c Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Mon, 10 Jul 2017 20:45:34 -0700 Subject: [apr-util] use find_library --- ports/apr-util/portfile.cmake | 32 +++++++++++++------------------- ports/apr-util/use-vcpkg-expat.patch | 36 ++++++++++++++++-------------------- 2 files changed, 29 insertions(+), 39 deletions(-) diff --git a/ports/apr-util/portfile.cmake b/ports/apr-util/portfile.cmake index 07d6766b2..abff4b47d 100644 --- a/ports/apr-util/portfile.cmake +++ b/ports/apr-util/portfile.cmake @@ -1,5 +1,4 @@ include(vcpkg_common_functions) -include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-util-1.6.0) vcpkg_download_distfile(ARCHIVE URLS "https://archive.apache.org/dist/apr/apr-util-1.6.0-win32-src.zip" @@ -8,36 +7,31 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -set(APR_HOME ${VCPKG_ROOT_DIR}/packages/apr_${TARGET_TRIPLET}) -set(EXPAT_HOME ${VCPKG_ROOT_DIR}/packages/expat_${TARGET_TRIPLET}) -set(EXPAT_LIB ${EXPAT_HOME}/lib/expat.lib) -set(EXPAT_LIB_DEBUG ${EXPAT_HOME}/debug/lib/expat.lib) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(BUILD_SHARED_LIBRARY ON) -else() - set(BUILD_SHARED_LIBRARY OFF) -endif() vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-expat.patch" + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-expat.patch" ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DAPR_HOME=${APR_HOME} - -DEXPAT_LIB=${EXPAT_LIB} - -DEXPAT_HOME=${EXPAT_HOME} - -DBUILD_SHARED_LIBRARY=${BUILD_SHARED_LIBRARY} - OPTIONS_DEBUG -DEXPAT_LIB=${EXPAT_LIB_DEBUG} -DDISABLE_INSTALL_HEADERS=ON + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) vcpkg_install_cmake() +file(READ ${CURRENT_PACKAGES_DIR}/include/apu.h APU_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "defined(APU_DECLARE_EXPORT)" "1" APU_H "${APU_H}") +else() + string(REPLACE "defined(APU_DECLARE_STATIC)" "1" APU_H "${APU_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/apu.h "${APU_H}") + + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/apr-util RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/apr-util/use-vcpkg-expat.patch b/ports/apr-util/use-vcpkg-expat.patch index 911404e2d..8bfe3e24e 100644 --- a/ports/apr-util/use-vcpkg-expat.patch +++ b/ports/apr-util/use-vcpkg-expat.patch @@ -1,35 +1,31 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 43fdf49..8040552 100644 +index 43fdf49..56424c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -27,8 +27,13 @@ OPTION(APR_HAS_LDAP "LDAP support" ON) +@@ -27,8 +27,9 @@ OPTION(APR_HAS_LDAP "LDAP support" ON) OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON) OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF) OPTION(TEST_STATIC_LIBS "Test programs use APR static libraries instead of shared libraries?" OFF) -SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR include files") -SET(APR_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib" CACHE STRING "APR library to link with") -+SET(APR_INCLUDE_DIR "${APR_HOME}/include" CACHE STRING "Directory with APR include files") + -+if(BUILD_SHARED_LIBRARY) -+ SET(APR_LIBRARIES "${APR_HOME}/lib/libapr-1.lib" CACHE STRING "APR library to link with") -+else() -+ SET(APR_LIBRARIES "${APR_HOME}/lib/apr-1.lib" CACHE STRING "APR library to link with") -+endif() ++find_path(APR_INCLUDE_DIR apr.h) ++find_library(APR_LIBRARIES NAMES libapr-1 apr-1) IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") -@@ -75,8 +80,8 @@ CONFIGURE_FILE(include/apu_want.hw +@@ -75,8 +76,8 @@ CONFIGURE_FILE(include/apu_want.hw COPYONLY) # TBD: -# SET(XMLLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xml/expat/lib) -SET(XMLLIB_LIBRARIES libexpat) -+SET(XMLLIB_INCLUDE_DIR ${EXPAT_HOME}/include) -+SET(XMLLIB_LIBRARIES ${EXPAT_LIB}) ++find_path(XMLLIB_INCLUDE_DIR expat.h) ++find_library(XMLLIB_LIBRARIES NAMES expat) SET(LDAP_LIBRARIES) IF(APR_HAS_LDAP) -@@ -217,11 +222,11 @@ SET(APR_TEST_SOURCES +@@ -217,11 +218,11 @@ SET(APR_TEST_SOURCES test/testxml.c ) @@ -46,7 +42,7 @@ index 43fdf49..8040552 100644 SET(install_targets) SET(install_bin_pdb) -@@ -230,21 +235,25 @@ SET(dbd_drivers) +@@ -230,21 +231,25 @@ SET(dbd_drivers) # Note: The WINNT definition on some targets is used only by libaprutil.rc. # static expat (not installed) @@ -56,7 +52,7 @@ index 43fdf49..8040552 100644 +# SET_TARGET_PROPERTIES(libexpat PROPERTIES COMPILE_DEFINITIONS "XML_STATIC;COMPILED_FROM_DSP") # libaprutil-1 is shared, aprutil-1 is static -+if(BUILD_SHARED_LIBRARY) ++if(BUILD_SHARED_LIBS) ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc) SET(install_targets ${install_targets} libaprutil-1) SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprutil-1.pdb) @@ -70,11 +66,11 @@ index 43fdf49..8040552 100644 SET_TARGET_PROPERTIES(aprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_STATIC;APR_DECLARE_STATIC;APU_DSO_MODULE_BUILD;XML_STATIC") +endif() -+if(BUILD_SHARED_LIBRARY) ++if(BUILD_SHARED_LIBS) IF(APU_HAVE_CRYPTO) IF(NOT OPENSSL_FOUND) MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build") -@@ -270,7 +279,7 @@ IF(APU_HAVE_ODBC) +@@ -270,7 +275,7 @@ IF(APU_HAVE_ODBC) ENDIF() IF(APR_HAS_LDAP) @@ -83,7 +79,7 @@ index 43fdf49..8040552 100644 ldap/apr_ldap_rebind.c libaprutil.rc) SET(install_targets ${install_targets} apr_ldap-1) SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_ldap-1.pdb) -@@ -281,6 +290,7 @@ IF(APR_HAS_LDAP) +@@ -281,6 +286,7 @@ IF(APR_HAS_LDAP) ELSE() SET(apr_ldap_libraries) ENDIF() @@ -91,7 +87,7 @@ index 43fdf49..8040552 100644 IF(APR_BUILD_TESTAPR) ENABLE_TESTING() -@@ -288,13 +298,13 @@ IF(APR_BUILD_TESTAPR) +@@ -288,13 +294,13 @@ IF(APR_BUILD_TESTAPR) ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} --verbose) # copy data files to build directory so that we can run programs from there @@ -104,11 +100,11 @@ index 43fdf49..8040552 100644 ${PROJECT_BINARY_DIR}/data/billion-laughs.xml) - IF(TEST_STATIC_LIBS) -+ IF(NOT BUILD_SHARED_LIBRARY) ++ IF(NOT BUILD_SHARED_LIBS) SET(whichapr aprutil-1) SET(apiflag "-DAPR_DECLARE_STATIC -DAPU_DECLARE_STATIC") ELSE() -@@ -330,13 +340,15 @@ INSTALL(TARGETS ${install_targets} +@@ -330,13 +336,15 @@ INSTALL(TARGETS ${install_targets} ARCHIVE DESTINATION lib ) -- cgit v1.2.3 From fe602fc3581e3e9d99a64d759a45fc63d49f7f59 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 11 Jul 2017 08:58:15 -0700 Subject: [vcpkg] remove flushall --- toolsrc/src/vcpkg_System.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index c91c6be78..883fe6612 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -94,7 +94,7 @@ namespace vcpkg::System }; // Flush stdout before launching external process - _flushall(); + fflush(nullptr); std::vector env_cstr; env_cstr.reserve(env_wstrings.size() + 2); @@ -125,7 +125,7 @@ namespace vcpkg::System int cmd_execute(const CWStringView cmd_line) { // Flush stdout before launching external process - _flushall(); + fflush(nullptr); // Basically we are wrapping it in quotes const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line); -- cgit v1.2.3 From 5498864711a2c7b1224e2ebfeff0269d591a2136 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 11 Jul 2017 14:09:56 -0700 Subject: [vcpkg-toolchain] Add INPUT_FILE NUL. Fixes #1431. --- scripts/cmake/vcpkg_get_windows_sdk.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake index ca58ab10a..64d8838e7 100644 --- a/scripts/cmake/vcpkg_get_windows_sdk.cmake +++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake @@ -2,6 +2,7 @@ function(vcpkg_get_windows_sdk ret) execute_process( COMMAND powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& {& '${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1'}" 2>&1 + INPUT_FILE NUL OUTPUT_VARIABLE WINDOWS_SDK RESULT_VARIABLE error_code) -- cgit v1.2.3 From 1a84896b87061943f6965638dfb5e7725c7f6695 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 11 Jul 2017 14:39:32 -0700 Subject: [opencv] Disable FLANN hidden dependency. Fixes #1433. --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 8da12f3d9..97f2017ee 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.2.0-1 +Version: 3.2.0-2 Build-Depends: zlib, libpng, libjpeg-turbo, tiff #Use the following line instead for optional features from OpenCV-contrib that require protobuf #Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index c72eefba1..b296e3658 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -42,6 +42,7 @@ vcpkg_configure_cmake( -DBUILD_PNG=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF + -DBUILD_opencv_flann=OFF -DBUILD_opencv_apps=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -- cgit v1.2.3 From c27c8d294101971373f087b0d18ae693e18f5d69 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 11 Jul 2017 14:55:24 -0700 Subject: [alembic] Disable static builds --- ports/alembic/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index 26fa79e9c..b57a1232d 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -1,5 +1,10 @@ include(vcpkg_common_functions) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Alembic does not support static linkage. Building dynamically.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alembic/alembic -- cgit v1.2.3 From 42a425ced2bfaa63eac056303cfd672d8900f4a5 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 12 Jul 2017 16:46:57 +0200 Subject: [zstd] update to 1.3.0 --- ports/zstd/CONTROL | 2 +- ports/zstd/fix-buildsystem.diff | 100 ---------------------------------------- ports/zstd/portfile.cmake | 9 ++-- 3 files changed, 4 insertions(+), 107 deletions(-) delete mode 100644 ports/zstd/fix-buildsystem.diff diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL index 19c1bd4e8..52713f2b8 100644 --- a/ports/zstd/CONTROL +++ b/ports/zstd/CONTROL @@ -1,3 +1,3 @@ Source: zstd -Version: 1.2.0 +Version: 1.3.0 Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net diff --git a/ports/zstd/fix-buildsystem.diff b/ports/zstd/fix-buildsystem.diff deleted file mode 100644 index b0dfaf09c..000000000 --- a/ports/zstd/fix-buildsystem.diff +++ /dev/null @@ -1,100 +0,0 @@ -diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt -index 5c4eca6..2f933e2 100644 ---- a/build/cmake/CMakeLists.txt -+++ b/build/cmake/CMakeLists.txt -@@ -15,8 +15,8 @@ LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") - #----------------------------------------------------------------------------- - # Add extra compilation flags - #----------------------------------------------------------------------------- --INCLUDE(AddZstdCompilationFlags) --ADD_ZSTD_COMPILATION_FLAGS() -+#INCLUDE(AddZstdCompilationFlags) -+#ADD_ZSTD_COMPILATION_FLAGS() Combination of flags set there makes no sense & triggers compiler errors in release - - #----------------------------------------------------------------------------- - # Options -diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt -index 429d494..4c13057 100644 ---- a/build/cmake/lib/CMakeLists.txt -+++ b/build/cmake/lib/CMakeLists.txt -@@ -90,37 +90,34 @@ IF (MSVC) - ENDIF (MSVC) - - # Split project to static and shared libraries build --ADD_LIBRARY(libzstd_shared SHARED ${Sources} ${Headers} ${PlatformDependResources}) -+IF (ZSTD_BUILD_SHARED) -+ ADD_LIBRARY(libzstd_shared SHARED ${Sources} ${Headers} ${PlatformDependResources}) -+ENDIF(ZSTD_BUILD_SHARED) - IF (ZSTD_BUILD_STATIC) - ADD_LIBRARY(libzstd_static STATIC ${Sources} ${Headers}) - ENDIF (ZSTD_BUILD_STATIC) - - # Add specific compile definitions for MSVC project - IF (MSVC) -- SET_PROPERTY(TARGET libzstd_shared APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_DLL_EXPORT=1;ZSTD_HEAPMODE=0;_CONSOLE;_CRT_SECURE_NO_WARNINGS") -+ IF(ZSTD_BUILD_SHARED) -+ SET_PROPERTY(TARGET libzstd_shared APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_DLL_EXPORT=1;ZSTD_HEAPMODE=0;_CONSOLE;_CRT_SECURE_NO_WARNINGS") -+ ENDIF(ZSTD_BUILD_SHARED) - IF (ZSTD_BUILD_STATIC) - SET_PROPERTY(TARGET libzstd_static APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_HEAPMODE=0;_CRT_SECURE_NO_WARNINGS") - ENDIF (ZSTD_BUILD_STATIC) - ENDIF (MSVC) - - # Define library base name --IF (MSVC) -- -- IF (CMAKE_SIZEOF_VOID_P MATCHES "8") -- SET(LIBRARY_BASE_NAME "zstdlib_x64") -- ELSE () -- SET(LIBRARY_BASE_NAME "zstdlib_x86") -- ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8") --ELSE () -- SET(LIBRARY_BASE_NAME zstd) --ENDIF (MSVC) -+SET(LIBRARY_BASE_NAME zstd) - - # Define static and shared library names --SET_TARGET_PROPERTIES( -- libzstd_shared -- PROPERTIES -- OUTPUT_NAME ${LIBRARY_BASE_NAME} -- SOVERSION ${LIBVER_MAJOR}.${LIBVER_MINOR}.${LIBVER_RELEASE}) -+IF(ZSTD_BUILD_SHARED) -+ SET_TARGET_PROPERTIES( -+ libzstd_shared -+ PROPERTIES -+ OUTPUT_NAME ${LIBRARY_BASE_NAME} -+ SOVERSION ${LIBVER_MAJOR}.${LIBVER_MINOR}.${LIBVER_RELEASE}) -+ENDIF(ZSTD_BUILD_SHARED) - - IF (ZSTD_BUILD_STATIC) - SET_TARGET_PROPERTIES( -@@ -129,6 +126,15 @@ IF (ZSTD_BUILD_STATIC) - OUTPUT_NAME ${LIBRARY_BASE_NAME}) - ENDIF (ZSTD_BUILD_STATIC) - -+ -+INSTALL(FILES ${LIBRARY_DIR}/zstd.h ${LIBRARY_DIR}/deprecated/zbuff.h ${LIBRARY_DIR}/dictBuilder/zdict.h DESTINATION "include") -+IF(ZSTD_BUILD_SHARED) -+ INSTALL(TARGETS libzstd_shared RUNTIME DESTINATION "bin" ARCHIVE DESTINATION "lib" LIBRARY DESTINATION "lib") -+ENDIF(ZSTD_BUILD_SHARED) -+IF (ZSTD_BUILD_STATIC) -+ INSTALL(TARGETS libzstd_static ARCHIVE DESTINATION "lib") -+ENDIF (ZSTD_BUILD_STATIC) -+ - IF (UNIX) - # pkg-config - SET(PREFIX "${CMAKE_INSTALL_PREFIX}") -@@ -142,12 +148,7 @@ IF (UNIX) - COMMENT "Creating pkg-config file") - - # install target -- INSTALL(FILES ${LIBRARY_DIR}/zstd.h ${LIBRARY_DIR}/deprecated/zbuff.h ${LIBRARY_DIR}/dictBuilder/zdict.h DESTINATION "include") - INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/libzstd.pc" DESTINATION "share/pkgconfig") -- INSTALL(TARGETS libzstd_shared LIBRARY DESTINATION "lib") -- IF (ZSTD_BUILD_STATIC) -- INSTALL(TARGETS libzstd_static ARCHIVE DESTINATION "lib") -- ENDIF (ZSTD_BUILD_STATIC) - - # uninstall target - CONFIGURE_FILE( diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index d6fe4eb59..ba60826e0 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -2,13 +2,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/zstd - REF v1.2.0 - SHA512 b21910c6bdcfad3199c07b9f70f7c049062ebd1cce9249dd33c36153e29f24dd9e796ddbc2f37846b9f508c14b0d0f67651fd8d2bdce558128f20bdfff50a7df + REF v1.3.0 + SHA512 5eb9e001e14d3342e76eb57b672c636fd56839ba8fc0ba9a751484ea93389c72c494ad2125dc2f9be1f72481f3af34568477123f7e9d3c7504e061e4c083cb30 HEAD_REF dev) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.diff) - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(ZSTD_STATIC 1) set(ZSTD_SHARED 0) @@ -33,7 +30,7 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - foreach(HEADER zdict.h zstd.h) + foreach(HEADER zdict.h zstd.h zstd_errors.h) file(READ ${CURRENT_PACKAGES_DIR}/include/${HEADER} HEADER_CONTENTS) string(REPLACE "defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/${HEADER} "${HEADER_CONTENTS}") -- cgit v1.2.3 From a93e63b27bde49a6f9a0ae6277fbb8366d913667 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 12 Jul 2017 16:51:37 +0200 Subject: [libuv] update to 1.13.1 --- ports/libuv/CONTROL | 2 +- ports/libuv/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index a4fb1457e..bbfcda090 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.12.0 +Version: 1.13.1 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. \ No newline at end of file diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index 8c287bf5a..47447df99 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.12.0 - SHA512 879359747e8319b6e951157f9406176c53ee24833ab9ea3e6ad2b9cf25368fd8f166fa2074b89bdb75e2a6a77757d91a079c4ef86b92330a8ea11519cd1e3018 + REF v1.13.1 + SHA512 5d4bbc90f353ea438e8eac3ea0c4e89c09d3f51629c1d06b52072f04d8cccfd7119189ba21ad13eb8df28575e0844fbb1b09ed903bd95f6ea806e6cba353ef1a HEAD_REF v1.x) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 30e4a2686f473ef8b5d8817b4630ea87425c81c2 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 12 Jul 2017 17:47:19 +0200 Subject: [pcre] update to 8.41 --- ports/pcre/CONTROL | 2 +- ports/pcre/fix-arm-config-define.patch | 36 ++++++++++++++++++++-------------- ports/pcre/fix-option-2.patch | 2 +- ports/pcre/fix-option.patch | 13 ------------ ports/pcre/portfile.cmake | 7 +++---- 5 files changed, 26 insertions(+), 34 deletions(-) delete mode 100644 ports/pcre/fix-option.patch diff --git a/ports/pcre/CONTROL b/ports/pcre/CONTROL index aeabb2012..6a321d5d0 100644 --- a/ports/pcre/CONTROL +++ b/ports/pcre/CONTROL @@ -1,3 +1,3 @@ Source: pcre -Version: 8.40-1 +Version: 8.41 Description: Perl Compatible Regular Expresions diff --git a/ports/pcre/fix-arm-config-define.patch b/ports/pcre/fix-arm-config-define.patch index 94ca808c3..eb136a8cd 100644 --- a/ports/pcre/fix-arm-config-define.patch +++ b/ports/pcre/fix-arm-config-define.patch @@ -28,27 +28,33 @@ index 4dc452f..5a9827d 100644 #endif -diff --git "a/sljit/sljitNativeARM_32.c" "b/sljit/sljitNativeARM_32.c" -index a756f82..86bdcbb 100644 ---- "a/sljit/sljitNativeARM_32.c" -+++ "b/sljit/sljitNativeARM_32.c" -@@ -1798,7 +1798,8 @@ extern "C" { +diff --git a/sljit/sljitNativeARM_32.c b/sljit/sljitNativeARM_32.c +index 745da99..83942b0 100644 +--- a/sljit/sljitNativeARM_32.c ++++ b/sljit/sljitNativeARM_32.c +@@ -1573,12 +1573,8 @@ static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s3 + extern "C" { + #endif + +-#if defined(__GNUC__) extern unsigned int __aeabi_uidivmod(unsigned int numerator, unsigned int denominator); extern int __aeabi_idivmod(int numerator, int denominator); - #else +-#else -#error "Software divmod functions are needed" -+extern unsigned int __aeabi_uidivmod(unsigned int numerator, unsigned int denominator); -+extern int __aeabi_idivmod(int numerator, int denominator); - #endif +-#endif #ifdef __cplusplus -@@ -1852,7 +1853,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile + } +@@ -1635,12 +1631,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compile + } + } + +-#if defined(__GNUC__) FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod)))); - #else +-#else -#error "Software divmod functions are needed" -+ FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, -+ ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod)))); - #endif +-#endif - if ((op >= SLJIT_DIV_UW) && (compiler->scratches >= 3)) { + if (saved_reg_count > 0) { + if (saved_reg_count >= 3) { diff --git a/ports/pcre/fix-option-2.patch b/ports/pcre/fix-option-2.patch index f9d8e0e5e..de78c5f16 100644 --- a/ports/pcre/fix-option-2.patch +++ b/ports/pcre/fix-option-2.patch @@ -17,7 +17,7 @@ index 858a34bd..d1a64570 100644 - OPTION(PCRE_STATIC_RUNTIME - "ON=Compile against the static runtime (/MT)." - OFF) -+ add_definitions(/wd4703) ++ add_definitions(/wd4703 /wd4146 /wd4308) + OPTION(PCRE_STATIC_RUNTIME "ON=Compile against the static runtime (/MT)." OFF) OPTION(INSTALL_MSVC_PDB "ON=Install .pdb files built by MSVC, if generated" diff --git a/ports/pcre/fix-option.patch b/ports/pcre/fix-option.patch deleted file mode 100644 index d1a2b13eb..000000000 --- a/ports/pcre/fix-option.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 42451ad..858a34b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -191,7 +191,7 @@ IF (MINGW) - ENDIF(MINGW) - - IF(MSVC) -- OPTION(PCRE_STATIC_RUNTIME OFF CACHE BOOL -+ OPTION(PCRE_STATIC_RUNTIME - "ON=Compile against the static runtime (/MT)." - OFF) - OPTION(INSTALL_MSVC_PDB diff --git a/ports/pcre/portfile.cmake b/ports/pcre/portfile.cmake index f2088ef69..5e9009ace 100644 --- a/ports/pcre/portfile.cmake +++ b/ports/pcre/portfile.cmake @@ -6,20 +6,19 @@ # CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} # -set(PCRE_VERSION 8.40) +set(PCRE_VERSION 8.41) include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pcre-${PCRE_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PCRE_VERSION}.zip" "https://downloads.sourceforge.net/project/pcre/pcre/${PCRE_VERSION}/pcre-${PCRE_VERSION}.zip" FILENAME "pcre-${PCRE_VERSION}.zip" - SHA512 121c0389a739a2a1d7d5d87e5f15167601739ddfab9eed66a1f55b5bbadadb58730208430f5ad069f9342c9a84ee1817dfa07efc802c29c84f86147714ee8eff + SHA512 a3fd57090a5d9ce9d608aeecd59f42f04deea5b86a5c5899bdb25b18d8ec3a89b2b52b62e325c6485a87411eb65f1421604f80c3eaa653bd7dbab05ad22795ea ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-option.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-option-2.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-option-2.patch ${CMAKE_CURRENT_LIST_DIR}/fix-arm-config-define.patch) vcpkg_configure_cmake( -- cgit v1.2.3 From 2c13232c08684368c337318e5d0879341841c5f3 Mon Sep 17 00:00:00 2001 From: Michael Offel Date: Wed, 12 Jul 2017 18:07:36 +0200 Subject: add cppcms 1.1.0 --- ports/cppcms/CONTROL | 4 ++++ ports/cppcms/portfile.cmake | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 ports/cppcms/CONTROL create mode 100644 ports/cppcms/portfile.cmake diff --git a/ports/cppcms/CONTROL b/ports/cppcms/CONTROL new file mode 100644 index 000000000..74deb6633 --- /dev/null +++ b/ports/cppcms/CONTROL @@ -0,0 +1,4 @@ +Source: cppcms +Version: 1.1.0 +Description: CppCMS is a Free High Performance Web Development Framework (not a CMS) aimed at Rapid Web Application Development +Build-Depends: icu, pcre, openssl, zlib diff --git a/ports/cppcms/portfile.cmake b/ports/cppcms/portfile.cmake new file mode 100644 index 000000000..6a4c8e578 --- /dev/null +++ b/ports/cppcms/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO artyom-beilis/cppcms + REF v1.1.0 + SHA512 cfc77f28ddee05b8a350fff1dbd7c09adcf008b8662d4f977b203dee50b5fadae97df499a655ebb48263a7448e0bdca514c8ac52ea805bf33e48612dabaa69f4 +) + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR ${PYTHON2} DIRECTORY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DCMAKE_PROGRAM_PATH=${PYTHON2_DIR} -DUSE_WINDOWS6_API=ON +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB EXE_DEBUG_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE ${EXE_DEBUG_FILES}) +file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(REMOVE ${EXE_FILES}) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LGPLv3.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppcms) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppcms/LGPLv3.txt ${CURRENT_PACKAGES_DIR}/share/cppcms/copyright) -- cgit v1.2.3 From cceab527882fb078f15d70d8ba3a68d4be9ec594 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 12 Jul 2017 18:26:28 +0200 Subject: [libarchive] update to 3.3.2 --- ports/libarchive/CONTROL | 2 +- ports/libarchive/fix-buildsystem.patch | 4 ++-- ports/libarchive/portfile.cmake | 13 ++++++------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ports/libarchive/CONTROL b/ports/libarchive/CONTROL index f4f9b8cdd..3cd81ee5c 100644 --- a/ports/libarchive/CONTROL +++ b/ports/libarchive/CONTROL @@ -1,4 +1,4 @@ Source: libarchive -Version: 3.3.1-1 +Version: 3.3.2 Description: Library for reading and writing streaming archives Build-Depends: zlib, bzip2, libxml2, lz4, liblzma, openssl diff --git a/ports/libarchive/fix-buildsystem.patch b/ports/libarchive/fix-buildsystem.patch index fcfe67c4f..59ffec3c9 100644 --- a/ports/libarchive/fix-buildsystem.patch +++ b/ports/libarchive/fix-buildsystem.patch @@ -132,8 +132,8 @@ index 1f85c01..11b2fb1 100644 --- a/libarchive/CMakeLists.txt +++ b/libarchive/CMakeLists.txt @@ -210,28 +210,22 @@ IF(WIN32 AND NOT CYGWIN) - LIST(APPEND libarchive_SOURCES filter_fork_windows.c) - ENDIF(WIN32 AND NOT CYGWIN) + LIST(APPEND libarchive_SOURCES archive_disk_acl_sunos.c) + ENDIF() -# Libarchive is a shared library -ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) diff --git a/ports/libarchive/portfile.cmake b/ports/libarchive/portfile.cmake index 72958dfda..a5bed4143 100644 --- a/ports/libarchive/portfile.cmake +++ b/ports/libarchive/portfile.cmake @@ -4,14 +4,13 @@ if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) endif() include(vcpkg_common_functions) -set(ARCHIVE_VERSION 3.3.1) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libarchive-${ARCHIVE_VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/libarchive/libarchive/archive/v${ARCHIVE_VERSION}.zip" - FILENAME "libarchive-${ARCHIVE_VERSION}.zip" - SHA512 a54fe3c5c24c83df244f3f2346212a6aa8d8945cf4ddc407e54c891ebbf8c98b93492e5652c9813a6d5dc654a32479e08a40bb0d2af7400a29ac027028e986f5) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libarchive/libarchive + REF v3.3.2 + SHA512 7bc17d6f742080278e35f86b0233d70045df0ca1578cd427126e0acce183709bf33ecca689db65e2e67bdfaf687c04d36cae1202a926beeebc88076648aa40bc + HEAD_REF master) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES -- cgit v1.2.3 From 8c37df17244e020908a2c3df544df707804a5f5b Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 12 Jul 2017 18:35:41 +0200 Subject: [nana] update to 1.5.3 --- ports/nana/CONTROL | 2 +- ports/nana/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL index c8270c56a..cc46b51b8 100644 --- a/ports/nana/CONTROL +++ b/ports/nana/CONTROL @@ -1,4 +1,4 @@ Source: nana -Version: 1.5.1-hotfix-42f8985 +Version: 1.5.3 Description: Cross-platform library for GUI programming in modern C++ style. Build-Depends: libpng, libjpeg-turbo diff --git a/ports/nana/portfile.cmake b/ports/nana/portfile.cmake index f2b7fab17..7150122e7 100644 --- a/ports/nana/portfile.cmake +++ b/ports/nana/portfile.cmake @@ -7,8 +7,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cnjinhao/nana - REF 42f89854fd6795d9b2113d011a87404dcc9ba37e - SHA512 89b75ccb95e5c4a2075a59064de0b0ff2fca90f90e9b391c2def7f74cc7484930b7139e314f33250bfaa148bfc5a5c9cf78ae3cac2336e0f32a9651670c36685 + REF v1.5.3 + SHA512 92f2a5023da180616420c411d4ebe0abf5043493688ada82aa5fa15a9331a8842f7def219a1d9edf476b40d311caac1354a5042c87b377af88117fdfae2daced HEAD_REF develop ) -- cgit v1.2.3 From 5ab198c4ad21b9f84cf8567c93993fca785673ff Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 12 Jul 2017 18:56:46 +0200 Subject: [libpng] update to 1.6.30 --- ports/libpng/CONTROL | 2 +- .../libpng/dont-double-eval-CMAKE_SYSTEM_PROCESSOR.patch | 15 --------------- ports/libpng/portfile.cmake | 14 +++++--------- 3 files changed, 6 insertions(+), 25 deletions(-) delete mode 100644 ports/libpng/dont-double-eval-CMAKE_SYSTEM_PROCESSOR.patch diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index 561cc81f8..5790f872d 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.29-2 +Version: 1.6.30 Build-Depends: zlib Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. diff --git a/ports/libpng/dont-double-eval-CMAKE_SYSTEM_PROCESSOR.patch b/ports/libpng/dont-double-eval-CMAKE_SYSTEM_PROCESSOR.patch deleted file mode 100644 index 3af02186f..000000000 --- a/ports/libpng/dont-double-eval-CMAKE_SYSTEM_PROCESSOR.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e076d5e..428cf68 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -78,8 +78,8 @@ set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names") - set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings") - - # set definitions and sources for arm --if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm" OR -- ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^aarch64") -+if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR -+ CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64") - set(PNG_ARM_NEON_POSSIBLE_VALUES check on off) - set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations: - check: (default) use internal checking code; diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index ebcf78aa8..0dc6e2a0f 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -1,18 +1,17 @@ include(vcpkg_common_functions) -set(LIBPNG_VERSION 1.6.29) +set(LIBPNG_VERSION 1.6.30) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-${LIBPNG_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://downloads.sourceforge.net/project/libpng/libpng16/${LIBPNG_VERSION}/libpng-${LIBPNG_VERSION}.tar.xz" FILENAME "libpng-${LIBPNG_VERSION}.tar.xz" - SHA512 070393423ec11f19e3264a0200959ae09238aa005615571586987253028b4ffb7e6b7c734a132f65180252b0259f79add03896d79fdc7dcfd8773b82c82a5ffc + SHA512 8c58f0f8523d7c7e8e641134c9a0e7fb6b60cddd6b4689afaafde0c99cff74652c6fb800a45149910aa2d8f06695ba4774f6a4d64810f2419a714d4188d72f82 ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch - ${CMAKE_CURRENT_LIST_DIR}/dont-double-eval-CMAKE_SYSTEM_PROCESSOR.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -32,6 +31,7 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DPNG_STATIC=${PNG_STATIC_LIBS} -DPNG_SHARED=${PNG_SHARED_LIBS} @@ -44,7 +44,6 @@ vcpkg_configure_cmake( -DSKIP_INSTALL_HEADERS=ON ) -vcpkg_build_cmake() vcpkg_install_cmake() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -52,11 +51,8 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng ${CURRENT_PACKAGES_DIR}/share/libpng) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng/libpng16-debug.cmake ${CURRENT_PACKAGES_DIR}/share/libpng/libpng16-debug.cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/libpng) +# Remove CMake config files as they are incorrectly generated and everyone uses built-in FindPNG anyway. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libpng ${CURRENT_PACKAGES_DIR}/debug/lib/libpng) file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpng) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpng/LICENSE ${CURRENT_PACKAGES_DIR}/share/libpng/copyright) -- cgit v1.2.3 From 89589c000a6f523fba8f7b44582a1347694b9ece Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 12 Jul 2017 19:47:35 +0200 Subject: [libjpeg-turbo] update to 1.5.2 --- ports/libjpeg-turbo/CONTROL | 2 +- .../add-options-for-exes-docs-headers.patch | 20 ++++++++++++-------- ports/libjpeg-turbo/portfile.cmake | 19 +++++++------------ 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/ports/libjpeg-turbo/CONTROL b/ports/libjpeg-turbo/CONTROL index d9df1c43d..14dd8ad9b 100644 --- a/ports/libjpeg-turbo/CONTROL +++ b/ports/libjpeg-turbo/CONTROL @@ -1,3 +1,3 @@ Source: libjpeg-turbo -Version: 1.5.1-1 +Version: 1.5.2 Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. diff --git a/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch b/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch index 5be2594c7..bd10a21bb 100644 --- a/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch +++ b/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index bfb7661..5373cd7 100644 +index 131b437..c29e604 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -55,6 +55,9 @@ option(WITH_JAVA "Build Java wrapper for the TurboJPEG library" FALSE) +@@ -62,6 +62,9 @@ option(WITH_JAVA "Build Java wrapper for the TurboJPEG library" FALSE) option(WITH_12BIT "Encode/decode JPEG images with 12-bit samples (implies WITH_SIMD=0 WITH_TURBOJPEG=0 WITH_ARITH_ENC=0 WITH_ARITH_DEC=0)" FALSE) option(ENABLE_STATIC "Build static libraries" TRUE) option(ENABLE_SHARED "Build shared libraries" TRUE) @@ -12,7 +12,7 @@ index bfb7661..5373cd7 100644 if(WITH_12BIT) set(WITH_SIMD FALSE) -@@ -264,14 +267,16 @@ if(WITH_TURBOJPEG) +@@ -279,14 +282,16 @@ if(WITH_TURBOJPEG) target_link_libraries(turbojpeg jpeg-static) set_target_properties(turbojpeg PROPERTIES LINK_INTERFACE_LIBRARIES "") @@ -36,7 +36,7 @@ index bfb7661..5373cd7 100644 endif() if(ENABLE_STATIC) -@@ -284,14 +289,16 @@ if(WITH_TURBOJPEG) +@@ -299,14 +304,16 @@ if(WITH_TURBOJPEG) add_dependencies(turbojpeg-static simd) endif() @@ -60,7 +60,7 @@ index bfb7661..5373cd7 100644 endif() endif() -@@ -303,7 +310,7 @@ else() +@@ -318,7 +325,7 @@ else() set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c) endif() @@ -69,7 +69,7 @@ index bfb7661..5373cd7 100644 add_executable(cjpeg-static cjpeg.c cdjpeg.c rdgif.c rdppm.c rdswitch.c ${CJPEG_BMP_SOURCES}) set_property(TARGET cjpeg-static PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS}) -@@ -319,10 +326,11 @@ if(ENABLE_STATIC) +@@ -334,10 +341,11 @@ if(ENABLE_STATIC) set_property(TARGET jpegtran-static PROPERTY COMPILE_FLAGS "-DUSE_SETMODE") endif() @@ -84,7 +84,7 @@ index bfb7661..5373cd7 100644 # # Tests -@@ -880,24 +888,30 @@ add_custom_target(installer +@@ -917,24 +925,30 @@ add_custom_target(installer if(WITH_TURBOJPEG) if(ENABLE_SHARED) @@ -119,7 +119,7 @@ index bfb7661..5373cd7 100644 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cjpeg-static.exe DESTINATION bin RENAME cjpeg.exe) install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/djpeg-static.exe -@@ -907,14 +921,20 @@ if(ENABLE_STATIC) +@@ -944,17 +958,23 @@ if(ENABLE_STATIC) endif() endif() @@ -149,6 +149,10 @@ index bfb7661..5373cd7 100644 + ${CMAKE_SOURCE_DIR}/jmorecfg.h ${CMAKE_SOURCE_DIR}/jpeglib.h + DESTINATION include) +endif() + + configure_file("${CMAKE_SOURCE_DIR}/cmakescripts/cmake_uninstall.cmake.in" + "cmake_uninstall.cmake" IMMEDIATE @ONLY) + diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt index d423cce..9da7c6e 100644 --- a/sharedlib/CMakeLists.txt diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index 995e8e0ee..d1138dbbf 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -1,16 +1,12 @@ include(vcpkg_common_functions) - -set(LIBJPEGTURBO_VERSION 1.5.1) -set(LIBJPEGTURBO_HASH "7b89f3c707daa98b0ed19ec417aab5273a1248ce7f98722a671ea80558a8eb0e73b136ce7be7c059f9f42262e682743abcab64e325f82cd4bd1531e0a4035209") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libjpeg-turbo-${LIBJPEGTURBO_VERSION}) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${LIBJPEGTURBO_VERSION}.zip" - FILENAME "libjpeg-turbo-${LIBJPEGTURBO_VERSION}.zip" - SHA512 ${LIBJPEGTURBO_HASH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libjpeg-turbo/libjpeg-turbo + REF 1.5.2 + SHA512 43f0c3e8c87bef4f0010827fd3c245df2467c0a6c714d2984284d3a64f933d06bbffc9fb893c8f3f2cd7f8fce2702cf39074c34e5bf370d90d1ca0d03c803590 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) + vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-options-for-exes-docs-headers.patch" @@ -45,7 +41,6 @@ vcpkg_configure_cmake( OPTIONS_DEBUG -DINSTALL_HEADERS=OFF ) -vcpkg_build_cmake() vcpkg_install_cmake() # Rename libraries for static builds -- cgit v1.2.3 From 6acb8b4956110b2dbb58ec19d4d8c6fa1fdd1100 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 12 Jul 2017 20:16:56 +0200 Subject: [fontconfig] update to 2.12.4 --- ports/fontconfig/CONTROL | 4 ++-- ports/fontconfig/portfile.cmake | 18 ++---------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/ports/fontconfig/CONTROL b/ports/fontconfig/CONTROL index 85a72c3fc..5fc4fcff2 100644 --- a/ports/fontconfig/CONTROL +++ b/ports/fontconfig/CONTROL @@ -1,4 +1,4 @@ Source: fontconfig -Version: 2.12.3 +Version: 2.12.4 Description: Library for configuring and customizing font access. -Build-Depends: freetype, expat, libiconv +Build-Depends: freetype, expat, libiconv, dirent diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake index ec3122d67..f3bc3e2ef 100644 --- a/ports/fontconfig/portfile.cmake +++ b/ports/fontconfig/portfile.cmake @@ -1,26 +1,14 @@ include(vcpkg_common_functions) -set(FONTCONFIG_VERSION 2.12.3) +set(FONTCONFIG_VERSION 2.12.4) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fontconfig-${FONTCONFIG_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.gz" FILENAME "fontconfig-${FONTCONFIG_VERSION}.tar.gz" - SHA512 b17725c028be1c5e6f76c136b0ed7db1be7694cbbf217310083512708e05cdc1a824427f89082e6ef259c10297900f26cbe899f7c5762e7662855739f3eff5ea) - -# Download single-header implementation of dirent API for Windows and it's license -vcpkg_download_distfile(DIRENT_H - URLS "https://raw.githubusercontent.com/tronkko/dirent/8b1db5092479a73d47eafd3de739b27e876e6bf3/include/dirent.h" - FILENAME "fontconfig-dirent.h" - SHA512 dc9e63fd9cf4ccffdc052f92933633ef9d09dfcfe3b1d15f1f32c99349babd36a62d02283e3d8ba7766d92817be015eb211f11efc4fa52cc90d532a34d1ae785) -vcpkg_download_distfile(DIRENT_LICENSE - URLS "https://raw.githubusercontent.com/tronkko/dirent/8b1db5092479a73d47eafd3de739b27e876e6bf3/LICENSE" - FILENAME "fontconfig-dirent-license" - SHA512 58c294f80b679252dbee9687ff6bda660fe1ed6f94506e1b9edc19358de98b274b25b3697bdcd34becb28a4f186c6d321a16ab616164e2fb378b37357fc71e4f) + SHA512 2be3ee0e8e0e3b62571135a3cae06e456c289dd1ad40ef2a7c780406418ee5efce863a833eca5a8ef55bc737a0ea04ef562bba6fd27e174ae43e42131b52810d) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${DIRENT_H} DESTINATION ${SOURCE_PATH}) -file(RENAME ${SOURCE_PATH}/fontconfig-dirent.h ${SOURCE_PATH}/dirent.h) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -44,5 +32,3 @@ endif() file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fontconfig) file(RENAME ${CURRENT_PACKAGES_DIR}/share/fontconfig/COPYING ${CURRENT_PACKAGES_DIR}/share/fontconfig/copyright) -file(COPY ${DIRENT_LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/fontconfig) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/fontconfig/fontconfig-dirent-license ${CURRENT_PACKAGES_DIR}/share/fontconfig/dirent-for-vs-copyright) -- cgit v1.2.3 From c009c53725ba5ddf525a0cc5791e4402dd6c1ce3 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 12 Jul 2017 15:00:02 -0700 Subject: [cppcms] Disable static linkage --- ports/cppcms/portfile.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ports/cppcms/portfile.cmake b/ports/cppcms/portfile.cmake index 6a4c8e578..30371b6f8 100644 --- a/ports/cppcms/portfile.cmake +++ b/ports/cppcms/portfile.cmake @@ -1,5 +1,14 @@ include(vcpkg_common_functions) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "cppcms doesn't support static linkage. Building dynamic instead.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL static) + message("cppcms doesn't support static CRT linkage.") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO artyom-beilis/cppcms -- cgit v1.2.3 From b0f0f402fd4efd7b4f6baf8117ca6ee77be24079 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 12 Jul 2017 15:03:17 -0700 Subject: [aubio] Copy tool DLL dependencies --- ports/aubio/CONTROL | 2 +- ports/aubio/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL index f919c15be..55b20f655 100644 --- a/ports/aubio/CONTROL +++ b/ports/aubio/CONTROL @@ -1,4 +1,4 @@ Source: aubio -Version: 0.46~alpha-1 +Version: 0.46~alpha-2 Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake index d5bca4428..9421f2487 100644 --- a/ports/aubio/portfile.cmake +++ b/ports/aubio/portfile.cmake @@ -31,4 +31,5 @@ file(COPY ${CURRENT_PACKAGES_DIR}/share/aubio) vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/aubio) file(RENAME ${CURRENT_PACKAGES_DIR}/share/aubio/COPYING ${CURRENT_PACKAGES_DIR}/share/aubio/copyright) -- cgit v1.2.3 From e9ba08be3aeaaea3cfc5a8455fac41384e2d7f93 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 12 Jul 2017 20:28:14 -0700 Subject: [vcpkg] remove platform dependency of string format --- toolsrc/src/vcpkg_Strings.cpp | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index aafed5fd3..77ff1a106 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -19,26 +19,36 @@ namespace vcpkg::Strings::details std::string format_internal(const char* fmtstr, ...) { - va_list lst; - va_start(lst, fmtstr); + va_list args; + va_start(args, fmtstr); - const int sz = _vscprintf_l(fmtstr, c_locale(), lst); - std::string output(sz, '\0'); - _vsnprintf_s_l(&output[0], output.size() + 1, output.size() + 1, fmtstr, c_locale(), lst); - va_end(lst); + int sz = vsnprintf(nullptr, 0, fmtstr, args) + 1; + + char* buffer = new char[sz]; + + vsnprintf(buffer, sz, fmtstr, args); + va_end(args); + + std::string output(buffer); + delete[] buffer; return output; } std::wstring wformat_internal(const wchar_t* fmtstr, ...) { - va_list lst; - va_start(lst, fmtstr); + va_list args; + va_start(args, fmtstr); + + int sz = vswprintf(nullptr, 0, fmtstr, args) + 1; + + wchar_t* buffer = new wchar_t[sz]; + + vswprintf(buffer, sz, fmtstr, args); + va_end(args); - const int sz = _vscwprintf_l(fmtstr, c_locale(), lst); - std::wstring output(sz, '\0'); - _vsnwprintf_s_l(&output[0], output.size() + 1, output.size() + 1, fmtstr, c_locale(), lst); - va_end(lst); + std::wstring output(buffer); + delete[] buffer; return output; } -- cgit v1.2.3 From 8059e874a6e00ad596e04657b802380c9cb99475 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 13 Jul 2017 16:40:37 +0900 Subject: Add suffix to debug libraries of FLANN Add suffix (-gd) to debug libraries of FLANN. The release libraries and the debug libraries should be the another names. --- ports/flann/CONTROL | 2 +- ports/flann/portfile.cmake | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL index 41a18ae62..117938c82 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,3 +1,3 @@ Source: flann -Version: 1.9.1-2 +Version: 1.9.1-3 Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index 96f2af0e3..6f0165468 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -24,6 +24,7 @@ vcpkg_configure_cmake( -DBUILD_DOC=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_MATLAB_BINDINGS=OFF + -DCMAKE_DEBUG_POSTFIX=-gd ) vcpkg_install_cmake() @@ -32,16 +33,11 @@ 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) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp.lib) - # Rename static libs to appear dynamic - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann-gd.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp-gd.lib) elseif(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp_s.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s-gd.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp_s-gd.lib) endif() # Handle copyright -- cgit v1.2.3 From ee4c0eb45e8e2fae7d0eb6603df2a9dfb33292c2 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 13 Jul 2017 20:50:26 +0900 Subject: Enable Qt option Enable Qt option --- ports/pcl/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index b4e580dd7..972d1bc64 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -53,7 +53,7 @@ vcpkg_configure_cmake( -DWITH_PCAP=OFF -DWITH_PNG=OFF -DWITH_QHULL=ON - -DWITH_QT=OFF + -DWITH_QT=ON -DWITH_VTK=ON ) -- cgit v1.2.3 From 062883535b5900cf5169b8f1494d872403656ae5 Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 13 Jul 2017 17:21:30 +0200 Subject: [cairo] update to 1.15.6 --- ports/cairo/CMakeLists.txt | 214 +++++++++++++++++- ports/cairo/CMakeLists_cairo.txt | 311 -------------------------- ports/cairo/CONTROL | 2 +- ports/cairo/export-only-in-shared-build.patch | 15 ++ ports/cairo/portfile.cmake | 27 +-- 5 files changed, 239 insertions(+), 330 deletions(-) delete mode 100644 ports/cairo/CMakeLists_cairo.txt create mode 100644 ports/cairo/export-only-in-shared-build.patch diff --git a/ports/cairo/CMakeLists.txt b/ports/cairo/CMakeLists.txt index 348732130..692c29cd5 100644 --- a/ports/cairo/CMakeLists.txt +++ b/ports/cairo/CMakeLists.txt @@ -1,3 +1,213 @@ cmake_minimum_required(VERSION 3.0) -project(cairo VERSION 1.14.6 LANGUAGES C CXX) -add_subdirectory(src) +project(cairo C) + +# Add include directories +include_directories("." "./win32") + +file(GLOB SOURCES +"cairo-analysis-surface.c" +"cairo-arc.c" +"cairo-array.c" +"cairo-atomic.c" +"cairo-base64-stream.c" +"cairo-base85-stream.c" +"cairo-bentley-ottmann.c" +"cairo-bentley-ottmann-rectangular.c" +"cairo-bentley-ottmann-rectilinear.c" +"cairo-botor-scan-converter.c" +"cairo-boxes.c" +"cairo-boxes-intersect.c" +"cairo.c" +"cairo-cache.c" +"cairo-clip.c" +"cairo-clip-boxes.c" +"cairo-clip-polygon.c" +"cairo-clip-region.c" +"cairo-clip-surface.c" +"cairo-color.c" +"cairo-composite-rectangles.c" +"cairo-compositor.c" +"cairo-contour.c" +"cairo-damage.c" +"cairo-debug.c" +"cairo-default-context.c" +"cairo-device.c" +"cairo-error.c" +"cairo-fallback-compositor.c" +"cairo-fixed.c" +"cairo-font-face.c" +"cairo-font-face-twin.c" +"cairo-font-face-twin-data.c" +"cairo-font-options.c" +"cairo-freelist.c" +"cairo-freed-pool.c" +"cairo-gstate.c" +"cairo-hash.c" +"cairo-hull.c" +"cairo-image-compositor.c" +"cairo-image-info.c" +"cairo-image-source.c" +"cairo-image-surface.c" +"cairo-line.c" +"cairo-lzw.c" +"cairo-matrix.c" +"cairo-mask-compositor.c" +"cairo-mesh-pattern-rasterizer.c" +"cairo-mempool.c" +"cairo-misc.c" +"cairo-mono-scan-converter.c" +"cairo-mutex.c" +"cairo-no-compositor.c" +"cairo-observer.c" +"cairo-output-stream.c" +"cairo-paginated-surface.c" +"cairo-path-bounds.c" +"cairo-path.c" +"cairo-path-fill.c" +"cairo-path-fixed.c" +"cairo-path-in-fill.c" +"cairo-path-stroke.c" +"cairo-path-stroke-boxes.c" +"cairo-path-stroke-polygon.c" +"cairo-path-stroke-traps.c" +"cairo-path-stroke-tristrip.c" +"cairo-pattern.c" +"cairo-pen.c" +"cairo-polygon.c" +"cairo-polygon-intersect.c" +"cairo-polygon-reduce.c" +"cairo-raster-source-pattern.c" +"cairo-recording-surface.c" +"cairo-rectangle.c" +"cairo-rectangular-scan-converter.c" +"cairo-region.c" +"cairo-rtree.c" +"cairo-scaled-font.c" +"cairo-shape-mask-compositor.c" +"cairo-slope.c" +"cairo-spans.c" +"cairo-spans-compositor.c" +"cairo-spline.c" +"cairo-stroke-dash.c" +"cairo-stroke-style.c" +"cairo-surface.c" +"cairo-surface-clipper.c" +"cairo-surface-fallback.c" +"cairo-surface-observer.c" +"cairo-surface-offset.c" +"cairo-surface-snapshot.c" +"cairo-surface-subsurface.c" +"cairo-surface-wrapper.c" +"cairo-time.c" +"cairo-tor-scan-converter.c" +"cairo-tor22-scan-converter.c" +"cairo-clip-tor-scan-converter.c" +"cairo-tag-attributes.c" +"cairo-tag-stack.c" +"cairo-toy-font-face.c" +"cairo-traps.c" +"cairo-tristrip.c" +"cairo-traps-compositor.c" +"cairo-unicode.c" +"cairo-user-font.c" +"cairo-version.c" +"cairo-wideint.c" +# win32 +"win32/cairo-win32-debug.c" +"win32/cairo-win32-device.c" +"win32/cairo-win32-gdi-compositor.c" +"win32/cairo-win32-system.c" +"win32/cairo-win32-surface.c" +"win32/cairo-win32-display-surface.c" +"win32/cairo-win32-printing-surface.c" +"win32/cairo-win32-font.c" +# generic font support +"cairo-cff-subset.c" +"cairo-scaled-font-subsets.c" +"cairo-truetype-subset.c" +"cairo-type1-fallback.c" +"cairo-type1-glyph-names.c" +"cairo-type1-subset.c" +"cairo-type3-glyph-surface.c" +# pdf +"cairo-pdf-interchange.c" +"cairo-pdf-operators.c" +"cairo-pdf-shading.c" +"cairo-pdf-surface.c" +# png +"cairo-png.c" +# ps surface +"cairo-ps-surface.c" +# deflate source +"cairo-deflate-stream.c" +# svg surface +"cairo-svg-surface.c" +# script surface +"cairo-script-surface.c" +# fontconfig + freetype +"cairo-ft-font.c" +) + +set(CMAKE_DEBUG_POSTFIX "d") + +find_package(ZLIB REQUIRED) +find_package(PNG REQUIRED) + +# Make the pixman library available +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(PIXMAN_SUFFIX "d") +endif() +find_library(PIXMAN_LIBRARY NAMES pixman-1${PIXMAN_SUFFIX}) + +find_package(Freetype CONFIG REQUIRED) + +# Cairo needs to be told which features of FreeType are availible +add_definitions( + -DHAVE_FT_GLYPHSLOT_EMBOLDEN=1 + -DHAVE_FT_LIBRARY_SETLCDFILTER=1 + -DHAVE_FT_GLYPHSLOT_OBLIQUE=1 + -DHAVE_FT_LOAD_SFNT_TABLE=1 + -DHAVE_FT_GET_X11_FONT_FORMAT=1) + +# Find FontConfig +find_library(FONTCONFIG_LIBRARY fontconfig) + +add_library(cairo ${SOURCES}) +# cairo produces a lot of warnings which are disabled here because they otherwise fill up the log files +target_compile_options(cairo PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4312" PUBLIC "/wd4267" + PUBLIC "/wd4996" PUBLIC "/wd4311" PUBLIC "/wd4334" PUBLIC "/wd4101") +target_link_libraries(cairo gdi32 msimg32 user32 ZLIB::ZLIB PNG::PNG freetype ${PIXMAN_LIBRARY} ${FONTCONFIG_LIBRARY}) + +install(TARGETS cairo + RUNTIME DESTINATION bin + LIBRARY DESTINATION bin + ARCHIVE DESTINATION lib +) + +# GObject support module + +set(CAIRO_GOBJECT_SOURCES + "../util/cairo-gobject/cairo-gobject-enums.c" + "../util/cairo-gobject/cairo-gobject-structs.c") + +# GObject support sources do not include header with export macro +if(BUILD_SHARED_LIBS) + set_source_files_properties( + "../util/cairo-gobject/cairo-gobject-enums.c" + "../util/cairo-gobject/cairo-gobject-structs.c" + PROPERTIES COMPILE_DEFINITIONS "cairo_public=__declspec(dllexport)") +endif() + +# Make GLib's GObject available +find_path(GLIB_INCLUDE_DIR glib.h) +find_library(GLIB_LIBRARY NAMES glib-2.0) +find_library(GOBJECT_LIBRARY NAMES gobject-2.0) +set(GLIB_LIBRARIES ${GLIB_LIBRARY} ${GOBJECT_LIBRARY}) + +add_library(cairo-gobject ${CAIRO_GOBJECT_SOURCES}) +target_link_libraries(cairo-gobject cairo ${GLIB_LIBRARIES}) +target_include_directories(cairo-gobject PRIVATE ${GLIB_INCLUDE_DIR}) +install(TARGETS cairo-gobject + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) diff --git a/ports/cairo/CMakeLists_cairo.txt b/ports/cairo/CMakeLists_cairo.txt deleted file mode 100644 index 33077bc21..000000000 --- a/ports/cairo/CMakeLists_cairo.txt +++ /dev/null @@ -1,311 +0,0 @@ -set(CURRENT_INSTALLED_DIR ${CMAKE_PREFIX_PATH}) - -# Add include directories -include_directories("." "./win32" "${CURRENT_INSTALLED_DIR}/include") - -file(GLOB SOURCES -"cairo-analysis-surface.c" -"cairo-arc.c" -"cairo-array.c" -"cairo-atomic.c" -"cairo-base64-stream.c" -"cairo-base85-stream.c" -"cairo-bentley-ottmann.c" -"cairo-bentley-ottmann-rectangular.c" -"cairo-bentley-ottmann-rectilinear.c" -"cairo-botor-scan-converter.c" -"cairo-boxes.c" -"cairo-boxes-intersect.c" -"cairo.c" -"cairo-cache.c" -"cairo-clip.c" -"cairo-clip-boxes.c" -"cairo-clip-polygon.c" -"cairo-clip-region.c" -"cairo-clip-surface.c" -"cairo-color.c" -"cairo-composite-rectangles.c" -"cairo-compositor.c" -"cairo-contour.c" -"cairo-damage.c" -"cairo-debug.c" -"cairo-default-context.c" -"cairo-device.c" -"cairo-error.c" -"cairo-fallback-compositor.c" -"cairo-fixed.c" -"cairo-font-face.c" -"cairo-font-face-twin.c" -"cairo-font-face-twin-data.c" -"cairo-font-options.c" -"cairo-freelist.c" -"cairo-freed-pool.c" -"cairo-gstate.c" -"cairo-hash.c" -"cairo-hull.c" -"cairo-image-compositor.c" -"cairo-image-info.c" -"cairo-image-source.c" -"cairo-image-surface.c" -"cairo-line.c" -"cairo-lzw.c" -"cairo-matrix.c" -"cairo-mask-compositor.c" -"cairo-mesh-pattern-rasterizer.c" -"cairo-mempool.c" -"cairo-misc.c" -"cairo-mono-scan-converter.c" -"cairo-mutex.c" -"cairo-no-compositor.c" -"cairo-observer.c" -"cairo-output-stream.c" -"cairo-paginated-surface.c" -"cairo-path-bounds.c" -"cairo-path.c" -"cairo-path-fill.c" -"cairo-path-fixed.c" -"cairo-path-in-fill.c" -"cairo-path-stroke.c" -"cairo-path-stroke-boxes.c" -"cairo-path-stroke-polygon.c" -"cairo-path-stroke-traps.c" -"cairo-path-stroke-tristrip.c" -"cairo-pattern.c" -"cairo-pen.c" -"cairo-polygon.c" -"cairo-polygon-intersect.c" -"cairo-polygon-reduce.c" -"cairo-raster-source-pattern.c" -"cairo-recording-surface.c" -"cairo-rectangle.c" -"cairo-rectangular-scan-converter.c" -"cairo-region.c" -"cairo-rtree.c" -"cairo-scaled-font.c" -"cairo-shape-mask-compositor.c" -"cairo-slope.c" -"cairo-spans.c" -"cairo-spans-compositor.c" -"cairo-spline.c" -"cairo-stroke-dash.c" -"cairo-stroke-style.c" -"cairo-surface.c" -"cairo-surface-clipper.c" -"cairo-surface-fallback.c" -"cairo-surface-observer.c" -"cairo-surface-offset.c" -"cairo-surface-snapshot.c" -"cairo-surface-subsurface.c" -"cairo-surface-wrapper.c" -"cairo-time.c" -"cairo-tor-scan-converter.c" -"cairo-tor22-scan-converter.c" -"cairo-clip-tor-scan-converter.c" -"cairo-tag-attributes.c" -"cairo-tag-stack.c" -"cairo-toy-font-face.c" -"cairo-traps.c" -"cairo-tristrip.c" -"cairo-traps-compositor.c" -"cairo-unicode.c" -"cairo-user-font.c" -"cairo-version.c" -"cairo-wideint.c" -# win32 -"win32/cairo-win32-debug.c" -"win32/cairo-win32-device.c" -"win32/cairo-win32-gdi-compositor.c" -"win32/cairo-win32-system.c" -"win32/cairo-win32-surface.c" -"win32/cairo-win32-display-surface.c" -"win32/cairo-win32-printing-surface.c" -"win32/cairo-win32-font.c" -# generic font support -"cairo-cff-subset.c" -"cairo-scaled-font-subsets.c" -"cairo-truetype-subset.c" -"cairo-type1-fallback.c" -"cairo-type1-glyph-names.c" -"cairo-type1-subset.c" -"cairo-type3-glyph-surface.c" -# pdf -"cairo-pdf-interchange.c" -"cairo-pdf-operators.c" -"cairo-pdf-shading.c" -"cairo-pdf-surface.c" -# png -"cairo-png.c" -# ps surface -"cairo-ps-surface.c" -# deflate source -"cairo-deflate-stream.c" -# svg surface -"cairo-svg-surface.c" -# script surface -"cairo-script-surface.c" -# fontconfig + freetype -"cairo-ft-font.c" -) - -set(CMAKE_DEBUG_POSTFIX "d") - -if (${CMAKE_BUILD_TYPE} STREQUAL "Debug") - # Make the zlib library available - find_library(ZLIB_DEBUG_IMPLIB NAMES zlibd) - if (ZLIB_DEBUG_IMPLIB STREQUAL ZLIB_DEBUG_IMPLIB-NOTFOUND) - message(FATAL_ERROR "The zlibd.lib import library could not be found. Check to ensure that zlib is properly installed.") - endif() - add_library(zlib UNKNOWN IMPORTED) - set_property(TARGET zlib PROPERTY IMPORTED_LOCATION "${ZLIB_DEBUG_IMPLIB}") - - # Make the libpng library available - find_library(LIBPNG_DEBUG_IMPLIB NAMES libpng16d) - if (LIBPNG_DEBUG_IMPLIB STREQUAL LIBPNG_DEBUG_IMPLIB-NOTFOUND) - message(FATAL_ERROR "The libpng16d.lib import library could not be found. Check to ensure that libpng is properly installed.") - endif() - add_library(libpng UNKNOWN IMPORTED) - set_property(TARGET libpng PROPERTY IMPORTED_LOCATION "${LIBPNG_DEBUG_IMPLIB}") - - # Make the pixman library available - find_library(PIXMAN_DEBUG_IMPLIB NAMES pixman-1d) - if (PIXMAN_DEBUG_IMPLIB STREQUAL PIXMAN_DEBUG_IMPLIB-NOTFOUND) - message(FATAL_ERROR "The pixman-1d.lib import library could not be found. Check to ensure that pixman is properly installed.") - endif() - add_library(pixman UNKNOWN IMPORTED) - set_property(TARGET pixman PROPERTY IMPORTED_LOCATION "${PIXMAN_DEBUG_IMPLIB}") - -elseif (${CMAKE_BUILD_TYPE} STREQUAL "Release") - # Make the zlib library available - find_library(ZLIB_RELEASE_IMPLIB NAMES zlib) - if (ZLIB_RELEASE_IMPLIB STREQUAL ZLIB_RELEASE_IMPLIB-NOTFOUND) - message(FATAL_ERROR "The zlib.lib import library could not be found. Check to ensure that zlib is properly installed.") - endif() - add_library(zlib UNKNOWN IMPORTED) - set_property(TARGET zlib PROPERTY IMPORTED_LOCATION "${ZLIB_RELEASE_IMPLIB}") - - # Make the libpng library available - find_library(LIBPNG_RELEASE_IMPLIB NAMES libpng16) - if (LIBPNG_RELEASE_IMPLIB STREQUAL LIBPNG_RELEASE_IMPLIB-NOTFOUND) - message(FATAL_ERROR "The libpng16.lib import library could not be found. Check to ensure that libpng is properly installed.") - endif() - add_library(libpng UNKNOWN IMPORTED) - set_property(TARGET libpng PROPERTY IMPORTED_LOCATION "${LIBPNG_RELEASE_IMPLIB}") - - # Make the pixman library available - find_library(PIXMAN_RELEASE_IMPLIB NAMES pixman-1) - if (PIXMAN_RELEASE_IMPLIB STREQUAL PIXMAN_RELEASE_IMPLIB-NOTFOUND) - message(FATAL_ERROR "The pixman-1.lib import library could not be found. Check to ensure that pixman is properly installed.") - endif() - add_library(pixman UNKNOWN IMPORTED) - set_property(TARGET pixman PROPERTY IMPORTED_LOCATION "${PIXMAN_RELEASE_IMPLIB}") - -else() - message(FATAL_ERROR "Unexpected value '${CMAKE_BUILD_TYPE}' for CMAKE_BUILD_TYPE.") -endif() - -# Make the gdi32 library available -find_library(GDI32_LIBRARY NAMES gdi32) -if (GDI32_LIBRARY STREQUAL GDI32_LIBRARY-NOTFOUND) - message(FATAL_ERROR "The gdi32.lib import library could not be found. Check to ensure that the Windows SDK is installed.") -endif() -add_library(gdi32 UNKNOWN IMPORTED) -set_property(TARGET gdi32 PROPERTY IMPORTED_LOCATION "${GDI32_LIBRARY}") - -# Make the msimg32 library available -find_library(MSIMG32_LIBRARY NAMES msimg32) -if (MSIMG32_LIBRARY STREQUAL MSIMG32_LIBRARY-NOTFOUND) - message(FATAL_ERROR "The msimg32.lib import library could not be found. Check to ensure that the Windows SDK is installed.") -endif() -add_library(msimg32 UNKNOWN IMPORTED) -set_property(TARGET msimg32 PROPERTY IMPORTED_LOCATION "${MSIMG32_LIBRARY}") - -# Make the user32 library available -find_library(USER32_LIBRARY NAMES user32) -if (USER32_LIBRARY STREQUAL USER32_LIBRARY-NOTFOUND) - message(FATAL_ERROR "The user32.lib import library could not be found. Check to ensure that the Windows SDK is installed.") -endif() -add_library(user32 UNKNOWN IMPORTED) -set_property(TARGET user32 PROPERTY IMPORTED_LOCATION "${USER32_LIBRARY}") - -# Find dependencies of optional modules - -# Find FreeType -if(CMAKE_BUILD_TYPE STREQUAL Debug) - set(FREETYPE_SUFFIX d) -endif() -find_library(FREETYPE_LIBRARY freetype${FREETYPE_SUFFIX}) -if (FREETYPE_LIBRARY MATCHES NOTFOUND) - message(FATAL_ERROR "The freetype library could not be found. Check to ensure that it is properly installed.") -endif() - -# Cairo needs to be told which features of FreeType are availible -add_definitions( - -DHAVE_FT_GLYPHSLOT_EMBOLDEN=1 - -DHAVE_FT_LIBRARY_SETLCDFILTER=1 - -DHAVE_FT_GLYPHSLOT_OBLIQUE=1 - -DHAVE_FT_LOAD_SFNT_TABLE=1 - -DHAVE_FT_GET_X11_FONT_FORMAT=1) - -# Find FontConfig -find_library(FONTCONFIG_LIBRARY fontconfig) -if (FONTCONFIG_LIBRARY MATCHES NOTFOUND) - message(FATAL_ERROR "The fontconfig library could not be found. Check to ensure that it is properly installed.") -endif() - -if (BUILD_SHARED_LIBS) - add_library(cairo ${SOURCES}) - # cairo produces a lot of warnings which are disabled here because they otherwise fill up the log files - target_compile_options(cairo PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4312" PUBLIC "/wd4267" PUBLIC "/wd4996" PUBLIC "/wd4311" PUBLIC "/wd4334" PUBLIC "/wd4101") - target_link_libraries(cairo gdi32 msimg32 user32 zlib libpng pixman ${FREETYPE_LIBRARY} ${FONTCONFIG_LIBRARY}) - - install(TARGETS cairo - RUNTIME DESTINATION bin - LIBRARY DESTINATION bin - ARCHIVE DESTINATION lib - ) -else() - add_library(cairo-static ${SOURCES}) - target_compile_options(cairo-static PUBLIC "/DCAIRO_WIN32_STATIC_BUILD=1") - # cairo produces a lot of warnings which are disabled here because they otherwise fill up the log files - target_compile_options(cairo-static PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4312" PUBLIC "/wd4267" PUBLIC "/wd4996" PUBLIC "/wd4311" PUBLIC "/wd4334" PUBLIC "/wd4101") - target_link_libraries(cairo-static gdi32 msimg32 user32 zlib libpng pixman ${FREETYPE_LIBRARY} ${FONTCONFIG_LIBRARY}) - - install(TARGETS cairo-static - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - ) -endif() - -# GObject support module - -set(CAIRO_GOBJECT_SOURCES - "../util/cairo-gobject/cairo-gobject-enums.c" - "../util/cairo-gobject/cairo-gobject-structs.c") - -# GObject support sources do not include header with export macro -if(BUILD_SHARED_LIBS) - set_source_files_properties( - "../util/cairo-gobject/cairo-gobject-enums.c" - "../util/cairo-gobject/cairo-gobject-structs.c" - PROPERTIES COMPILE_DEFINITIONS cairo_public=__declspec\(dllexport\)) -endif() - -# Make GLib's GObject available -find_library(GLIB_LIBRARY NAMES glib-2.0) -find_library(GOBJECT_LIBRARY NAMES gobject-2.0) -set(GLIB_LIBRARIES ${GLIB_LIBRARY} ${GOBJECT_LIBRARY}) -if (GLIB_LIBRARIES MATCHES NOTFOUND) - message(FATAL_ERROR "The glib library could not be found. Check to ensure that it is properly installed.") -endif() - -add_library(cairo-gobject ${CAIRO_GOBJECT_SOURCES}) -if(BUILD_SHARED_LIBS) - target_link_libraries(cairo-gobject cairo ${GLIB_LIBRARIES}) -else() - target_link_libraries(cairo-gobject cairo-static ${GLIB_LIBRARIES}) -endif() -install(TARGETS cairo-gobject - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index b03290e9e..9a6a550a6 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,4 +1,4 @@ Source: cairo -Version: 1.15.4-3 +Version: 1.15.6 Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig diff --git a/ports/cairo/export-only-in-shared-build.patch b/ports/cairo/export-only-in-shared-build.patch new file mode 100644 index 000000000..d8b46c1ee --- /dev/null +++ b/ports/cairo/export-only-in-shared-build.patch @@ -0,0 +1,15 @@ +diff --git a/src/cairoint.h b/src/cairoint.h +index 4fedf86..dfa149e 100644 +--- a/src/cairoint.h ++++ b/src/cairoint.h +@@ -50,7 +50,9 @@ + #include "config.h" + #endif + +-#ifdef _MSC_VER ++#if defined _MSC_VER && defined cairo_EXPORTS + #define cairo_public __declspec(dllexport) ++#else ++#define cairo_public + #endif + diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index 7e6e02155..0ccf0c470 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -7,33 +7,28 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cairo-1.15.4) +set(CAIRO_VERSION 1.15.6) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cairo-${CAIRO_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "http://cairographics.org/snapshots/cairo-1.15.4.tar.xz" - FILENAME "cairo-1.15.4.tar.xz" - SHA512 ac3e6879fcf0876bca9f801cdf9e970ef1822644228cdd21962d0bf5db5fc074973f4ae651eb9c76b44fffd405cf0a0c7cbb228dba96b835ea137a2740277ee9 + URLS "http://cairographics.org/snapshots/cairo-${CAIRO_VERSION}.tar.xz" + FILENAME "cairo-${CAIRO_VERSION}.tar.xz" + SHA512 e4eccba745a03545001ebd6f1a7b87bee4b932f80a2d877a764500ad5c18011a5bac585f31eec6d0b65ccaa818de0df2b3b99f0792111363bd3554cfa7f688b6 ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/Initialize-mutexes-for-static-builds-for-win32.patch" + "${CMAKE_CURRENT_LIST_DIR}/export-only-in-shared-build.patch" ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_cairo.txt DESTINATION ${SOURCE_PATH}/src) -file(RENAME ${SOURCE_PATH}/src/CMakeLists_cairo.txt ${SOURCE_PATH}/src/CMakeLists.txt) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src) file(COPY ${CURRENT_PORT_DIR}/cairo-features.h DESTINATION ${SOURCE_PATH}/src) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - ) -elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - ) -endif() +vcpkg_configure_cmake( + PREFER_NINJA + SOURCE_PATH ${SOURCE_PATH}/src +) vcpkg_install_cmake() -- cgit v1.2.3 From 93ff4c35d29ac6cfb6ecd7a33e2c8bebd9562348 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 13 Jul 2017 15:52:03 -0700 Subject: [libevent] Add missing openssl dependency. Simplify portfile. Fixes #1456. --- ports/libevent/CONTROL | 3 ++- ports/libevent/portfile.cmake | 34 ++++++++-------------------------- 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/ports/libevent/CONTROL b/ports/libevent/CONTROL index 56ca1f4c7..87c0d0a64 100644 --- a/ports/libevent/CONTROL +++ b/ports/libevent/CONTROL @@ -1,3 +1,4 @@ Source: libevent -Version: 2.1.8-1 +Version: 2.1.8-2 +Build-Depends: openssl Description: An event notification library \ No newline at end of file diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake index ce0bc73ba..1c70dd11f 100644 --- a/ports/libevent/portfile.cmake +++ b/ports/libevent/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libevent-release-2.1.8-stable) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/libevent/libevent/archive/release-2.1.8-stable.tar.gz" - FILENAME "libevent-2.1.8-stable.tar.gz" + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libevent/libevent + REF release-2.1.8-stable SHA512 0d5c872dc797b69ab8ea4b83aebcbac20735b8c6f5adfcc2950aa4d6013d240f5fac3376e817da75ae0ccead50cec0d931619e135a050add438777457b086549 ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -14,27 +14,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/share/libevent) - -file(READ ${CURRENT_PACKAGES_DIR}/debug/cmake/LibeventTargets-debug.cmake DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") -string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${_IMPORT_PREFIX}" DEBUG_MODULE "${DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets-debug.cmake "${DEBUG_MODULE}") - -file(READ ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets-release.cmake RELEASE_MODULE) -string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${_IMPORT_PREFIX}" RELEASE_MODULE "${RELEASE_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets-release.cmake "${RELEASE_MODULE}") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) - -file(READ ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventConfig.cmake CONFIG_MODULE) -string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${LIBEVENT_CMAKE_DIR}/../.." CONFIG_MODULE "${CONFIG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventConfig.cmake "${CONFIG_MODULE}") -file(READ ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets.cmake TARGETS_MODULE) -string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${LIBEVENT_CMAKE_DIR}/../.." TARGETS_MODULE "${TARGETS_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets.cmake "${TARGETS_MODULE}") +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +vcpkg_copy_pdbs() -file(COPY ${CURRENT_BUILDTREES_DIR}/src/libevent-release-2.1.8-stable/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libevent/LICENSE ${CURRENT_PACKAGES_DIR}/share/libevent/copyright) -vcpkg_copy_pdbs() -- cgit v1.2.3 From 6950aeb6378adb47ff467a79d58ae8d4b5abe9cb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 13 Jul 2017 17:47:20 -0700 Subject: [vcpkg-applocal] Recurse into other binaries. Fixes #1435. --- scripts/buildsystems/msbuild/applocal.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index 932ba11cd..08a6d9a8f 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -50,6 +50,9 @@ function resolve([string]$targetBinary) { deployBinary $targetBinaryDir $installedDir "$_" if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $targetBinaryDir "$g_install_root\plugins" "$_" } resolve "$targetBinaryDir\$_" + } elseif (Test-Path "$targetBinaryDir\$_") { + Write-Verbose " ${_}: $_ not found in vcpkg; locally deployed" + resolve "$targetBinaryDir\$_" } else { Write-Verbose " ${_}: $installedDir\$_ not found" } -- cgit v1.2.3 From 21a7ede5cdde89b7fcef19aacbf2e223b9040f54 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Fri, 14 Jul 2017 14:09:50 -0400 Subject: Port libmikmod to vcpkg --- ports/libmikmod/CONTROL | 3 +++ ports/libmikmod/portfile.cmake | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 ports/libmikmod/CONTROL create mode 100644 ports/libmikmod/portfile.cmake diff --git a/ports/libmikmod/CONTROL b/ports/libmikmod/CONTROL new file mode 100644 index 000000000..59a573ff6 --- /dev/null +++ b/ports/libmikmod/CONTROL @@ -0,0 +1,3 @@ +Source: libmikmod +Version: +Description: diff --git a/ports/libmikmod/portfile.cmake b/ports/libmikmod/portfile.cmake new file mode 100644 index 000000000..336e13922 --- /dev/null +++ b/ports/libmikmod/portfile.cmake @@ -0,0 +1,36 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libmikmod-3.3.11.1) +vcpkg_download_distfile(ARCHIVE + URLS "https://downloads.sourceforge.net/project/mikmod/libmikmod/3.3.11.1/libmikmod-3.3.11.1.tar.gz" + FILENAME "libmikmod-3.3.11.1.tar.gz" + SHA512 f2439e2b691613847cd0787dd4e050116683ce7b05c215b8afecde5c6add819ea6c18e678e258c0a80786bef463f406072de15127f64368f694287a5e8e1a9de +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DENABLE_DOC=OFF -DENABLE_THREADS=ON + OPTIONS_RELEASE -DENABLE_SIMD=ON + OPTIONS_DEBUG -DENABLE_SIMD=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmikmod) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmikmod/COPYING.LESSER ${CURRENT_PACKAGES_DIR}/share/libmikmod/copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) \ No newline at end of file -- cgit v1.2.3 From 94e262d3f635b557ffde09e97bbca2c173a8f440 Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 14 Jul 2017 19:37:25 +0100 Subject: [duktape] Add port for duktape 2.0.3 --- ports/duktape/CMakeLists.txt | 23 +++++++++++++++++++++++ ports/duktape/CONTROL | 4 ++++ ports/duktape/LICENSE | 25 +++++++++++++++++++++++++ ports/duktape/duk_config.h.patch | 13 +++++++++++++ ports/duktape/portfile.cmake | 37 +++++++++++++++++++++++++++++++++++++ 5 files changed, 102 insertions(+) create mode 100644 ports/duktape/CMakeLists.txt create mode 100644 ports/duktape/CONTROL create mode 100644 ports/duktape/LICENSE create mode 100644 ports/duktape/duk_config.h.patch create mode 100644 ports/duktape/portfile.cmake diff --git a/ports/duktape/CMakeLists.txt b/ports/duktape/CMakeLists.txt new file mode 100644 index 000000000..bbbe062cc --- /dev/null +++ b/ports/duktape/CMakeLists.txt @@ -0,0 +1,23 @@ +# CMAKE project for duktape +option(SOURCE_PATH "Root directory.") +option(ENABLE_STATIC "Build a static library.") + +set (PROJECT duktape) +project (${PROJECT}) + +file(GLOB_RECURSE DUKTAPE_SOURCES "${SOURCE_PATH}/src/*.c") +file(GLOB_RECURSE DUKTAPE_HEADERS "${SOURCE_PATH}/src/*.h") + +if (ENABLE_STATIC) + add_library(${PROJECT} STATIC ${DUKTAPE_SOURCES} ${DUKTAPE_HEADERS}) +else () + add_definitions(-DDUK_F_DLL_BUILD) + add_library(${PROJECT} SHARED ${DUKTAPE_SOURCES}) +endif () + +set_target_properties(${PROJECT} PROPERTIES PUBLIC_HEADER "${DUKTAPE_HEADERS}") + +install(TARGETS ${PROJECT} + ARCHIVE DESTINATION "lib" + RUNTIME DESTINATION "bin" + PUBLIC_HEADER DESTINATION "include") diff --git a/ports/duktape/CONTROL b/ports/duktape/CONTROL new file mode 100644 index 000000000..07ae7f1fe --- /dev/null +++ b/ports/duktape/CONTROL @@ -0,0 +1,4 @@ +Source: duktape +Version: 2.0.3-1 +Description: Embeddable Javascript engine with a focus on portability and compact footprint. +Build-Depends: diff --git a/ports/duktape/LICENSE b/ports/duktape/LICENSE new file mode 100644 index 000000000..e8497318b --- /dev/null +++ b/ports/duktape/LICENSE @@ -0,0 +1,25 @@ +=============== +Duktape license +=============== + +(http://opensource.org/licenses/MIT) + +Copyright (c) 2013-2017 by Duktape authors (see AUTHORS.rst) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/ports/duktape/duk_config.h.patch b/ports/duktape/duk_config.h.patch new file mode 100644 index 000000000..d0be961ce --- /dev/null +++ b/ports/duktape/duk_config.h.patch @@ -0,0 +1,13 @@ +diff --git a/src/duk_config.h b/src/duk_config.h +index a942563..8d3d309 100644 +--- a/src/duk_config.h ++++ b/src/duk_config.h +@@ -64,7 +64,7 @@ + + /* DLL build detection */ + /* not configured for DLL build */ +-#undef DUK_F_DLL_BUILD ++// #undef DUK_F_DLL_BUILD + + /* Apple OSX, iOS */ + #if defined(__APPLE__) diff --git a/ports/duktape/portfile.cmake b/ports/duktape/portfile.cmake new file mode 100644 index 000000000..8b7819524 --- /dev/null +++ b/ports/duktape/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/duktape-2.0.3) +set(CMAKE_PATH ${CMAKE_CURRENT_LIST_DIR}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "https://github.com/svaarala/duktape/releases/download/v2.0.3/duktape-2.0.3.tar.xz" + FILENAME "duktape-2.0.3.tar.xz" + SHA512 ba21731242d953d82c677e1205e3596e270e6d57156a0bca8068fc3b6a35996af69bcfac979b871a7e3eab31f28a06cb99078f0b3eaac54be9c5899f57f4100e +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +# Patch duk_config.h to remove 'undef DUK_F_DLL_BUILD' +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/duk_config.h.patch" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_configure_cmake( + SOURCE_PATH ${CMAKE_PATH} + OPTIONS -DENABLE_STATIC=OFF -DSOURCE_PATH=${SOURCE_PATH} + ) +else() + vcpkg_configure_cmake( + SOURCE_PATH ${CMAKE_PATH} + OPTIONS -DENABLE_STATIC=ON -DSOURCE_PATH=${SOURCE_PATH} + ) +endif() + +vcpkg_install_cmake() + +# Remove debug include +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Copy copright information +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/duktape RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 336e25218a73f9b54120e3c35b3d28e6426deeb1 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Wed, 12 Jul 2017 17:40:41 -0700 Subject: feature packages graph traversal --- toolsrc/include/BinaryParagraph.h | 4 +- toolsrc/include/vcpkg_Dependencies.h | 89 ++++++++++ toolsrc/include/vcpkg_Graphs.h | 93 +++++++++++ toolsrc/include/vcpkg_Util.h | 1 + toolsrc/src/BinaryParagraph.cpp | 11 +- toolsrc/src/PackageSpec.cpp | 5 +- toolsrc/src/test_install_plan.cpp | 308 +++++++++++++++++++++++++++++++++++ toolsrc/src/vcpkg_Dependencies.cpp | 244 +++++++++++++++++++++++++++ 8 files changed, 752 insertions(+), 3 deletions(-) diff --git a/toolsrc/include/BinaryParagraph.h b/toolsrc/include/BinaryParagraph.h index 1c2edf790..4adde5e36 100644 --- a/toolsrc/include/BinaryParagraph.h +++ b/toolsrc/include/BinaryParagraph.h @@ -25,8 +25,10 @@ namespace vcpkg std::string version; std::string description; std::string maintainer; + std::string feature; + std::vector default_features; std::vector depends; }; void serialize(const BinaryParagraph& pgh, std::string& out_str); -} +} \ No newline at end of file diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index c8e15de27..92523a654 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -2,6 +2,7 @@ #include "PackageSpec.h" #include "StatusParagraphs.h" #include "VcpkgPaths.h" +#include "vcpkg_Graphs.h" #include "vcpkg_optional.h" #include @@ -23,6 +24,45 @@ namespace vcpkg::Dependencies Optional status_paragraph; Optional binary_paragraph; Optional source_paragraph; + Optional source_control_file; + }; + + struct ClusterNode + { + std::vector status_paragraphs; + Optional source_paragraph; + }; +} + +namespace vcpkg::Dependencies +{ + struct FeatureSpec + { + PackageSpec spec; + std::string feature_name; + }; + + struct FeatureNodeEdges + { + std::vector dotted; + std::vector dashed; + bool plus = false; + }; + std::vector to_feature_specs(const std::vector depends, + const std::unordered_map str_to_spec); + struct Cluster + { + ClusterNode cluster_node; + std::unordered_map edges; + std::unordered_set tracked_nodes; + std::unordered_set original_nodes; + bool minus = false; + bool zero = true; + Cluster() = default; + + private: + Cluster(const Cluster&) = delete; + Cluster& operator=(const Cluster&) = delete; }; enum class InstallPlanType @@ -39,6 +79,10 @@ namespace vcpkg::Dependencies InstallPlanAction(); InstallPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type); + InstallPlanAction(const PackageSpec& spec, + const SourceControlFile& any_paragraph, + std::unordered_set features, + const RequestType& request_type); InstallPlanAction(const InstallPlanAction&) = delete; InstallPlanAction(InstallPlanAction&&) = default; InstallPlanAction& operator=(const InstallPlanAction&) = delete; @@ -48,6 +92,7 @@ namespace vcpkg::Dependencies AnyParagraph any_paragraph; InstallPlanType plan_type; RequestType request_type; + std::unordered_set feature_list; }; enum class RemovePlanType @@ -73,6 +118,12 @@ namespace vcpkg::Dependencies RequestType request_type; }; + struct AnyAction + { + Optional install_plan; + Optional remove_plan; + }; + enum class ExportPlanType { UNKNOWN, @@ -125,3 +176,41 @@ namespace vcpkg::Dependencies const std::vector& specs, const StatusParagraphs& status_db); } + +template<> +struct std::hash +{ + size_t operator()(const vcpkg::Dependencies::Cluster& value) const + { + size_t hash = 17; + if (auto source = value.cluster_node.source_paragraph.get()) + { + hash = hash * 31 + std::hash()((*source)->core_paragraph->name); + } + else if (!value.cluster_node.status_paragraphs.empty()) + { + auto start = *value.cluster_node.status_paragraphs.begin(); + hash = hash * 31 + std::hash()(start.package.displayname()); + } + + return hash; + } +}; + +namespace vcpkg::Dependencies +{ + struct GraphPlan + { + Graphs::Graph remove_graph; + Graphs::Graph install_graph; + }; + bool mark_plus(const std::string& feature, + Cluster& cluster, + std::unordered_map& pkg_to_cluster, + GraphPlan& graph_plan); + void mark_minus(Cluster& cluster, std::unordered_map& pkg_to_cluster, GraphPlan& graph_plan); + + 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_Graphs.h b/toolsrc/include/vcpkg_Graphs.h index 3c8c024c2..13c0a7136 100644 --- a/toolsrc/include/vcpkg_Graphs.h +++ b/toolsrc/include/vcpkg_Graphs.h @@ -1,6 +1,7 @@ #pragma once #include +#include namespace vcpkg::Graphs { @@ -63,4 +64,96 @@ namespace vcpkg::Graphs return sorted; } + + template + struct GraphAdjacencyProvider final : AdjacencyProvider + { + const std::unordered_map>& vertices; + + GraphAdjacencyProvider(const std::unordered_map>& vertices) : vertices(vertices) {} + + std::vector adjacency_list(const V& vertex) const override + { + const std::unordered_set& as_set = this->vertices.at(vertex); + return std::vector(as_set.cbegin(), as_set.cend()); // TODO: Avoid redundant copy + } + + V load_vertex_data(const V& vertex) const override { return vertex; } + }; + + template + struct Graph + { + public: + void add_vertex(V v) { this->vertices[v]; } + + // TODO: Change with iterators + void add_vertices(const std::vector& vs) + { + for (const V& v : vs) + { + this->vertices[v]; + } + } + + void add_edge(V u, V v) + { + this->vertices[v]; + this->vertices[u].insert(v); + } + + std::vector topological_sort() const + { + GraphAdjacencyProvider adjacency_provider{this->vertices}; + std::unordered_map indegrees = count_indegrees(); + + std::vector sorted; + sorted.reserve(indegrees.size()); + + std::unordered_map exploration_status; + exploration_status.reserve(indegrees.size()); + + for (auto& pair : indegrees) + { + if (pair.second == 0) // Starting from vertices with indegree == 0. Not required. + { + V vertex = pair.first; + topological_sort_internal(vertex, adjacency_provider, exploration_status, sorted); + } + } + + return sorted; + } + + std::unordered_map count_indegrees() const + { + std::unordered_map indegrees; + + for (auto& pair : this->vertices) + { + indegrees[pair.first]; + for (V neighbour : pair.second) + { + ++indegrees[neighbour]; + } + } + + return indegrees; + } + + const std::unordered_map>& adjacency_list() const { return this->vertices; } + std::vector vertex_list() const + { + // why no &? it returns 0 + std::vector vertex_list; + for (const auto& vertex : this->vertices) + { + vertex_list.emplace_back(vertex.first); + } + return vertex_list; + } + + private: + std::unordered_map> vertices; + }; } diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg_Util.h index 1bd1bcc4a..671997e7e 100644 --- a/toolsrc/include/vcpkg_Util.h +++ b/toolsrc/include/vcpkg_Util.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp index af76c6b29..e126054a8 100644 --- a/toolsrc/src/BinaryParagraph.cpp +++ b/toolsrc/src/BinaryParagraph.cpp @@ -16,9 +16,11 @@ namespace vcpkg namespace Fields { + static const std::string FEATURE = "Feature"; static const std::string DESCRIPTION = "Description"; static const std::string MAINTAINER = "Maintainer"; static const std::string DEPENDS = "Depends"; + static const std::string DEFAULTFEATURES = "Default-Features"; } BinaryParagraph::BinaryParagraph() = default; @@ -38,7 +40,10 @@ namespace vcpkg .value_or_exit(VCPKG_LINE_INFO); } - parser.required_field(Fields::VERSION, this->version); + // one or the other + this->version = parser.optional_field(Fields::VERSION); + this->feature = parser.optional_field(Fields::FEATURE); + this->description = parser.optional_field(Fields::DESCRIPTION); this->maintainer = parser.optional_field(Fields::MAINTAINER); @@ -46,6 +51,10 @@ namespace vcpkg parser.required_field(Fields::MULTI_ARCH, multi_arch); this->depends = parse_comma_list(parser.optional_field(Fields::DEPENDS)); + if (this->feature.empty()) + { + this->default_features = parse_comma_list(parser.optional_field(Fields::DEFAULTFEATURES)); + } if (auto err = parser.error_info(this->spec.name())) { diff --git a/toolsrc/src/PackageSpec.cpp b/toolsrc/src/PackageSpec.cpp index ab005f255..12217ac98 100644 --- a/toolsrc/src/PackageSpec.cpp +++ b/toolsrc/src/PackageSpec.cpp @@ -5,7 +5,10 @@ namespace vcpkg { - static bool is_valid_package_spec_char(char c) { return (c == '-') || isdigit(c) || (isalpha(c) && islower(c)); } + static bool is_valid_package_spec_char(char c) + { + return (c == '-') || isdigit(c) || (isalpha(c) && islower(c)) || (c == '[') || (c == ']'); + } ExpectedT PackageSpec::from_string(const std::string& spec_as_string, const Triplet& default_triplet) diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index 93a1436d8..d90e1e523 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -1,5 +1,6 @@ #include "CppUnitTest.h" #include "vcpkg_Dependencies.h" +#include "vcpkg_Util.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; @@ -24,6 +25,35 @@ namespace UnitTest1 return PackageSpec{*spec.get()}; } }; + + static void features_check(Dependencies::AnyAction* install_action, + std::string pkg_name, + std::vector vec) + { + const auto& plan = *install_action->install_plan.get(); + const auto& feature_list = plan.feature_list; + + Assert::AreEqual(pkg_name.c_str(), + (*plan.any_paragraph.source_control_file.get())->core_paragraph->name.c_str()); + Assert::AreEqual(size_t(vec.size()), feature_list.size()); + + for (auto&& feature_name : vec) + { + if (feature_name == "core" || feature_name == "") + { + Assert::IsTrue(Util::find(feature_list, "core") != feature_list.end() || + Util::find(feature_list, "") != feature_list.end()); + continue; + } + Assert::IsTrue(Util::find(feature_list, feature_name) != feature_list.end()); + } + } + + static void remove_plan_check(Dependencies::AnyAction* install_action, std::string pkg_name) + { + Assert::AreEqual(pkg_name.c_str(), install_action->remove_plan.get()->spec.name().c_str()); + } + TEST_METHOD(basic_install_scheme) { std::vector> status_paragraphs; @@ -139,5 +169,283 @@ namespace UnitTest1 Assert::AreEqual("b", install_plan[6].spec.name().c_str()); Assert::AreEqual("a", install_plan[7].spec.name().c_str()); } + + TEST_METHOD(basic_feature_test_1) + { + using Pgh = std::unordered_map; + + std::vector> status_paragraphs; + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, + {"Default-Features", ""}, + {"Version", "1.3.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", "b, b[beefeatureone]"}, + {"Status", "install ok installed"}})); + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "b"}, + {"Feature", "beefeatureone"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", ""}, + {"Status", "install ok installed"}})); + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "b"}, + {"Default-Features", "beefeatureone"}, + {"Version", "1.3"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", ""}, + {"Status", "install ok installed"}})); + + PackageSpecMap spec_map; + + auto spec_a = + FullPackageSpec{spec_map.get_package_spec( + {{{"Source", "a"}, {"Version", "1.3.8"}, {"Build-Depends", "b, b[beefeatureone]"}}, + {{"Feature", "featureone"}, + {"Description", "the first feature for a"}, + {"Build-Depends", "b[beefeaturetwo]"}} + + }), + {"featureone"}}; + auto spec_b = FullPackageSpec{spec_map.get_package_spec( + {{{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, + {{"Feature", "beefeatureone"}, {"Description", "the first feature for b"}, {"Build-Depends", ""}}, + {{"Feature", "beefeaturetwo"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}}, + {{"Feature", "beefeaturethree"}, {"Description", "the third feature for b"}, {"Build-Depends", ""}} + + })}; + + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(4), install_plan.size()); + remove_plan_check(&install_plan[0], "a"); + remove_plan_check(&install_plan[1], "b"); + features_check(&install_plan[2], "b", {"beefeatureone", "core", "beefeatureone"}); + features_check(&install_plan[3], "a", {"featureone", "core"}); + } + + TEST_METHOD(basic_feature_test_2) + { + using Pgh = std::unordered_map; + + std::vector> status_paragraphs; + + PackageSpecMap spec_map; + + auto spec_a = + FullPackageSpec{spec_map.get_package_spec( + {{{"Source", "a"}, {"Version", "1.3.8"}, {"Build-Depends", "b[beefeatureone]"}}, + {{"Feature", "featureone"}, + {"Description", "the first feature for a"}, + {"Build-Depends", "b[beefeaturetwo]"}} + + }), + {"featureone"}}; + auto spec_b = FullPackageSpec{spec_map.get_package_spec( + {{{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, + {{"Feature", "beefeatureone"}, {"Description", "the first feature for b"}, {"Build-Depends", ""}}, + {{"Feature", "beefeaturetwo"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}}, + {{"Feature", "beefeaturethree"}, {"Description", "the third feature for b"}, {"Build-Depends", ""}} + + })}; + + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(2), install_plan.size()); + features_check(&install_plan[0], "b", {"beefeatureone", "beefeaturetwo", "core"}); + features_check(&install_plan[1], "a", {"featureone", "core"}); + } + + TEST_METHOD(basic_feature_test_3) + { + using Pgh = std::unordered_map; + + std::vector> status_paragraphs; + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, + {"Default-Features", ""}, + {"Version", "1.3"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", ""}, + {"Status", "install ok installed"}})); + + PackageSpecMap spec_map; + + auto spec_a = FullPackageSpec{ + spec_map.get_package_spec( + {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b"}}, + {{"Feature", "one"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}}), + {"core"}}; + auto spec_b = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, + })}; + auto spec_c = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "c"}, {"Version", "1.3"}, {"Build-Depends", "a[one]"}}, + }), + {"core"}}; + + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, {spec_c, spec_a}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(4), install_plan.size()); + remove_plan_check(&install_plan[0], "a"); + features_check(&install_plan[1], "b", {"core"}); + features_check(&install_plan[2], "a", {"one", "core"}); + features_check(&install_plan[3], "c", {"core"}); + } + + TEST_METHOD(basic_feature_test_4) + { + using Pgh = std::unordered_map; + + std::vector> status_paragraphs; + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, + {"Default-Features", ""}, + {"Version", "1.3"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", ""}, + {"Status", "install ok installed"}})); + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, + {"Feature", "one"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", ""}, + {"Status", "install ok installed"}})); + + PackageSpecMap spec_map; + + auto spec_a = FullPackageSpec{ + spec_map.get_package_spec( + {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b"}}, + {{"Feature", "one"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}}), + }; + auto spec_b = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, + })}; + auto spec_c = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "c"}, {"Version", "1.3"}, {"Build-Depends", "a[one]"}}, + }), + {"core"}}; + + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, {spec_c}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(1), install_plan.size()); + features_check(&install_plan[0], "c", {"core"}); + } + + TEST_METHOD(basic_feature_test_5) + { + using Pgh = std::unordered_map; + + std::vector> status_paragraphs; + + PackageSpecMap spec_map; + + auto spec_a = FullPackageSpec{ + spec_map.get_package_spec( + {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", ""}}, + {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", "b[1]"}}, + {{"Feature", "2"}, {"Description", "the first feature for a"}, {"Build-Depends", "b[2]"}}, + {{"Feature", "3"}, {"Description", "the first feature for a"}, {"Build-Depends", "a[2]"}}}), + {"3"}}; + auto spec_b = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, + {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}, + {{"Feature", "2"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}, + })}; + + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(2), install_plan.size()); + features_check(&install_plan[0], "b", {"core", "2"}); + features_check(&install_plan[1], "a", {"core", "3", "2"}); + } + + TEST_METHOD(basic_feature_test_6) + { + using Pgh = std::unordered_map; + + std::vector> status_paragraphs; + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "b"}, + {"Default-Features", ""}, + {"Version", "1.3"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", ""}, + {"Status", "install ok installed"}})); + PackageSpecMap spec_map; + + auto spec_a = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b[core]"}}, + }), + {"core"}}; + auto spec_b = FullPackageSpec{ + spec_map.get_package_spec({ + {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, + {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}, + }), + {"1"}}; + + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, {spec_a, spec_b}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(3), install_plan.size()); + remove_plan_check(&install_plan[0], "b"); + features_check(&install_plan[1], "b", {"core", "1"}); + features_check(&install_plan[2], "a", {"core"}); + } + + TEST_METHOD(basic_feature_test_7) + { + using Pgh = std::unordered_map; + + std::vector> status_paragraphs; + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "x"}, + {"Default-Features", ""}, + {"Version", "1.3"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", "b"}, + {"Status", "install ok installed"}})); + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "b"}, + {"Default-Features", ""}, + {"Version", "1.3"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", ""}, + {"Status", "install ok installed"}})); + PackageSpecMap spec_map; + + auto spec_a = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", ""}}, + })}; + auto spec_x = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "x"}, {"Version", "1.3"}, {"Build-Depends", "a"}}, + }), + {"core"}}; + auto spec_b = FullPackageSpec{ + spec_map.get_package_spec({ + {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}, {"Default-Features", ""}}, + {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}, + }), + {"1"}}; + + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, {spec_b, spec_x}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(5), install_plan.size()); + remove_plan_check(&install_plan[0], "x"); + remove_plan_check(&install_plan[1], "b"); + + // order here may change but A < X, and B anywhere + features_check(&install_plan[2], "a", {"core"}); + features_check(&install_plan[3], "x", {"core"}); + features_check(&install_plan[4], "b", {"core", "1"}); + } }; } \ No newline at end of file diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 984d0ab4c..824de15e1 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -54,6 +54,20 @@ namespace vcpkg::Dependencies { } + InstallPlanAction::InstallPlanAction(const PackageSpec& spec, + const SourceControlFile& any_paragraph, + std::unordered_set features, + const RequestType& request_type) + : InstallPlanAction() + { + this->spec = spec; + this->request_type = request_type; + + this->plan_type = InstallPlanType::BUILD_AND_INSTALL; + this->any_paragraph.source_control_file = &any_paragraph; + this->feature_list = features; + } + InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type) @@ -320,4 +334,234 @@ namespace vcpkg::Dependencies Graphs::topological_sort(specs, ExportAdjacencyProvider{paths, status_db, specs_as_set}); return toposort; } + + std::vector to_feature_specs(const std::vector depends, + const std::unordered_map str_to_spec) + { + std::vector f_specs; + for (auto&& depend : depends) + { + int end = (int)depend.find(']'); + if (end != std::string::npos) + { + int start = (int)depend.find('['); + + auto feature_name = depend.substr(start + 1, end - start - 1); + auto package_name = depend.substr(0, start); + auto p_spec = str_to_spec.find(package_name); + if (p_spec != str_to_spec.end()) + { + auto feature_spec = FeatureSpec{p_spec->second, feature_name}; + f_specs.emplace_back(std::move(feature_spec)); + } + } + else + { + auto p_spec = str_to_spec.find(depend); + if (p_spec != str_to_spec.end()) + { + auto feature_spec = FeatureSpec{p_spec->second, ""}; + f_specs.emplace_back(std::move(feature_spec)); + } + } + } + return f_specs; + } + + bool mark_plus(const std::string& feature, + Cluster& cluster, + std::unordered_map& pkg_to_cluster, + GraphPlan& graph_plan) + { + auto it = cluster.edges.find(feature); + std::string updated_feature = feature; + if (updated_feature == "") + { + updated_feature = "core"; + it = cluster.edges.find("core"); + } + if (it == cluster.edges.end()) + { + Checks::exit_fail(VCPKG_LINE_INFO); + } + + if (cluster.edges[updated_feature].plus) return true; + + if (cluster.original_nodes.find(updated_feature) == cluster.original_nodes.end()) + { + cluster.zero = true; + } + + if (!cluster.zero) + { + return false; + } + cluster.edges[updated_feature].plus = true; + + if (!cluster.original_nodes.empty()) + { + mark_minus(cluster, pkg_to_cluster, graph_plan); + } + + graph_plan.install_graph.add_vertex(&cluster); + auto& tracked = cluster.tracked_nodes; + tracked.insert(updated_feature); + if (tracked.find("core") == tracked.end() && tracked.find("") == tracked.end()) + { + cluster.tracked_nodes.insert("core"); + for (auto&& depend : cluster.edges["core"].dashed) + { + auto& depend_cluster = pkg_to_cluster[depend.spec]; + mark_plus(depend.feature_name, depend_cluster, pkg_to_cluster, graph_plan); + graph_plan.install_graph.add_edge(&cluster, &depend_cluster); + } + } + + for (auto&& depend : cluster.edges[updated_feature].dashed) + { + auto& depend_cluster = pkg_to_cluster[depend.spec]; + mark_plus(depend.feature_name, depend_cluster, pkg_to_cluster, graph_plan); + if (&depend_cluster == &cluster) continue; + graph_plan.install_graph.add_edge(&cluster, &depend_cluster); + } + return true; + } + + void mark_minus(Cluster& cluster, std::unordered_map& pkg_to_cluster, GraphPlan& graph_plan) + { + if (cluster.minus) return; + cluster.minus = true; + + graph_plan.remove_graph.add_vertex(&cluster); + for (auto&& pair : cluster.edges) + { + auto& dotted_edges = pair.second.dotted; + for (auto&& depend : dotted_edges) + { + auto& depend_cluster = pkg_to_cluster[depend.spec]; + graph_plan.remove_graph.add_edge(&cluster, &depend_cluster); + depend_cluster.zero = true; + mark_minus(depend_cluster, pkg_to_cluster, graph_plan); + } + } + for (auto&& original_feature : cluster.original_nodes) + { + cluster.zero = true; + mark_plus(original_feature, cluster, pkg_to_cluster, graph_plan); + } + } + + std::vector create_feature_install_plan(const std::unordered_map& map, + const std::vector& specs, + const StatusParagraphs& status_db) + { + const auto triplet = Triplet::X86_WINDOWS; + std::unordered_map pkg_spec_to_package_node; + std::unordered_map str_to_spec; + + for (const auto& it : map) + { + str_to_spec.emplace(it.first.name(), it.first); + } + + for (const auto& it : map) + { + Cluster& node = pkg_spec_to_package_node[it.first]; + FeatureNodeEdges core_dependencies; + core_dependencies.dashed = + to_feature_specs(filter_dependencies(it.second.core_paragraph->depends, triplet), str_to_spec); + node.edges["core"] = std::move(core_dependencies); + + for (const auto& feature : it.second.feature_paragraphs) + { + FeatureNodeEdges added_edges; + added_edges.dashed = to_feature_specs(filter_dependencies(feature->depends, triplet), str_to_spec); + node.edges.emplace(feature->name, std::move(added_edges)); + } + node.cluster_node.source_paragraph = &it.second; + } + + for (auto&& status_paragraph : status_db) + { + auto& spec = status_paragraph->package.spec; + auto& status_paragraph_feature = status_paragraph->package.feature; + Cluster& cluster = pkg_spec_to_package_node[spec]; + + cluster.zero = false; + auto reverse_edges = to_feature_specs(status_paragraph->package.depends, str_to_spec); + + for (auto&& dependency : reverse_edges) + { + auto pkg_node = pkg_spec_to_package_node.find(dependency.spec); + auto depends_name = dependency.feature_name; + if (depends_name == "") + { + for (auto&& default_feature : status_paragraph->package.default_features) + { + auto& target_node = pkg_node->second.edges[default_feature]; + target_node.dotted.emplace_back(FeatureSpec{spec, status_paragraph_feature}); + } + depends_name = "core"; + } + auto& target_node = pkg_node->second.edges[depends_name]; + target_node.dotted.emplace_back(FeatureSpec{spec, status_paragraph_feature}); + } + cluster.cluster_node.status_paragraphs.emplace_back(*status_paragraph); + if (status_paragraph_feature == "") + { + cluster.original_nodes.insert("core"); + } + else + { + cluster.original_nodes.insert(status_paragraph_feature); + } + } + + GraphPlan graph_plan; + for (auto&& spec : specs) + { + Cluster& spec_cluster = pkg_spec_to_package_node[spec.package_spec]; + for (auto&& feature : spec.features) + { + mark_plus(feature, spec_cluster, pkg_spec_to_package_node, graph_plan); + } + } + + Graphs::GraphAdjacencyProvider adjacency_remove_graph(graph_plan.remove_graph.adjacency_list()); + auto remove_vertex_list = graph_plan.remove_graph.vertex_list(); + auto remove_toposort = Graphs::topological_sort(remove_vertex_list, adjacency_remove_graph); + + Graphs::GraphAdjacencyProvider adjacency_install_graph(graph_plan.install_graph.adjacency_list()); + auto insert_vertex_list = graph_plan.install_graph.vertex_list(); + auto insert_toposort = Graphs::topological_sort(insert_vertex_list, adjacency_install_graph); + + std::vector install_plan; + + for (auto&& cluster : remove_toposort) + { + auto scf = *cluster->cluster_node.source_paragraph.get(); + + AnyAction any_plan; + any_plan.remove_plan = RemovePlanAction{ + str_to_spec[scf->core_paragraph->name], RemovePlanType::REMOVE, RequestType::AUTO_SELECTED}; + + install_plan.emplace_back(std::move(any_plan)); + } + + for (auto&& cluster : insert_toposort) + { + if (!cluster->zero) continue; + + auto scf = *cluster->cluster_node.source_paragraph.get(); + auto& pkg_spec = str_to_spec[scf->core_paragraph->name]; + auto action = InstallPlanAction{ + pkg_spec, map.find(pkg_spec)->second, cluster->tracked_nodes, RequestType::AUTO_SELECTED}; + + AnyAction any_plan; + any_plan.install_plan = std::move(action); + install_plan.emplace_back(std::move(any_plan)); + } + + return install_plan; + } } -- cgit v1.2.3 From f28b8a99faad4b3d1f22416baa9b4cb9f604b223 Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 14 Jul 2017 21:36:48 +0100 Subject: [duktape] Improve the cmake list to use BUILD_SHARED_LIBS --- ports/duktape/CMakeLists.txt | 15 ++++++--------- ports/duktape/portfile.cmake | 15 ++++----------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/ports/duktape/CMakeLists.txt b/ports/duktape/CMakeLists.txt index bbbe062cc..f62a9c56e 100644 --- a/ports/duktape/CMakeLists.txt +++ b/ports/duktape/CMakeLists.txt @@ -1,23 +1,20 @@ # CMAKE project for duktape option(SOURCE_PATH "Root directory.") -option(ENABLE_STATIC "Build a static library.") -set (PROJECT duktape) -project (${PROJECT}) +project (duktape) file(GLOB_RECURSE DUKTAPE_SOURCES "${SOURCE_PATH}/src/*.c") file(GLOB_RECURSE DUKTAPE_HEADERS "${SOURCE_PATH}/src/*.h") -if (ENABLE_STATIC) - add_library(${PROJECT} STATIC ${DUKTAPE_SOURCES} ${DUKTAPE_HEADERS}) -else () +if (BUILD_SHARED_LIBS) add_definitions(-DDUK_F_DLL_BUILD) - add_library(${PROJECT} SHARED ${DUKTAPE_SOURCES}) endif () -set_target_properties(${PROJECT} PROPERTIES PUBLIC_HEADER "${DUKTAPE_HEADERS}") +add_library(duktape ${DUKTAPE_SOURCES} ${DUKTAPE_HEADERS}) -install(TARGETS ${PROJECT} +set_target_properties("duktape" PROPERTIES PUBLIC_HEADER "${DUKTAPE_HEADERS}") + +install(TARGETS duktape ARCHIVE DESTINATION "lib" RUNTIME DESTINATION "bin" PUBLIC_HEADER DESTINATION "include") diff --git a/ports/duktape/portfile.cmake b/ports/duktape/portfile.cmake index 8b7819524..b6e10396b 100644 --- a/ports/duktape/portfile.cmake +++ b/ports/duktape/portfile.cmake @@ -14,17 +14,10 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/duk_config.h.patch" ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_configure_cmake( - SOURCE_PATH ${CMAKE_PATH} - OPTIONS -DENABLE_STATIC=OFF -DSOURCE_PATH=${SOURCE_PATH} - ) -else() - vcpkg_configure_cmake( - SOURCE_PATH ${CMAKE_PATH} - OPTIONS -DENABLE_STATIC=ON -DSOURCE_PATH=${SOURCE_PATH} - ) -endif() +vcpkg_configure_cmake( + SOURCE_PATH ${CMAKE_PATH} + OPTIONS -DSOURCE_PATH=${SOURCE_PATH} +) vcpkg_install_cmake() -- cgit v1.2.3 From 8c9744fa14c9b8ed643f906aeb31e3b231577133 Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 14 Jul 2017 21:38:37 +0100 Subject: [duktape] Copy license from build tree instead --- ports/duktape/LICENSE | 25 ------------------------- ports/duktape/portfile.cmake | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 ports/duktape/LICENSE diff --git a/ports/duktape/LICENSE b/ports/duktape/LICENSE deleted file mode 100644 index e8497318b..000000000 --- a/ports/duktape/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -=============== -Duktape license -=============== - -(http://opensource.org/licenses/MIT) - -Copyright (c) 2013-2017 by Duktape authors (see AUTHORS.rst) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/ports/duktape/portfile.cmake b/ports/duktape/portfile.cmake index b6e10396b..84278616c 100644 --- a/ports/duktape/portfile.cmake +++ b/ports/duktape/portfile.cmake @@ -25,6 +25,6 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Copy copright information -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/duktape RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/duktape" RENAME "copyright") vcpkg_copy_pdbs() -- cgit v1.2.3 From 852802770f735e47aadd0a1bb5b9b1b64875874b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 14 Jul 2017 14:11:53 -0700 Subject: [flann] Restore rename behavior --- ports/flann/CONTROL | 2 +- ports/flann/portfile.cmake | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL index 117938c82..ad9a5e871 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,3 +1,3 @@ Source: flann -Version: 1.9.1-3 +Version: 1.9.1-4 Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index 6f0165468..ba7eca546 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -35,6 +35,11 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann-gd.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp-gd.lib) + + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann-gd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s-gd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann-gd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann_cpp-gd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp_s-gd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp-gd.lib) elseif(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s-gd.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp_s-gd.lib) -- cgit v1.2.3 From bf614498dcead3e064cb8768bb5842662cbfef16 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sat, 15 Jul 2017 06:25:23 +0900 Subject: Fix find_flann.patch Fix find_flann.patch according to this change (PR#1452). --- ports/pcl/find_flann.patch | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ports/pcl/find_flann.patch b/ports/pcl/find_flann.patch index 394ecd867..6cbfb011f 100644 --- a/ports/pcl/find_flann.patch +++ b/ports/pcl/find_flann.patch @@ -1,19 +1,15 @@ diff --git a/cmake/Modules/FindFLANN.cmake b/cmake/Modules/FindFLANN.cmake -index b5739dc95..b5c22a3b0 100644 +index b5739dc95..4041a2539 100644 --- a/cmake/Modules/FindFLANN.cmake +++ b/cmake/Modules/FindFLANN.cmake -@@ -10,11 +10,11 @@ +@@ -10,8 +10,8 @@ # look for shared ones if(FLANN_USE_STATIC) - set(FLANN_RELEASE_NAME flann_cpp_s) - set(FLANN_DEBUG_NAME flann_cpp_s-gd) + set(FLANN_RELEASE_NAME flann_cpp) -+ set(FLANN_DEBUG_NAME flann_cpp) ++ set(FLANN_DEBUG_NAME flann_cpp-gd) else(FLANN_USE_STATIC) set(FLANN_RELEASE_NAME flann_cpp) -- set(FLANN_DEBUG_NAME flann_cpp-gd) -+ set(FLANN_DEBUG_NAME flann_cpp) - endif(FLANN_USE_STATIC) - - find_package(PkgConfig QUIET) + set(FLANN_DEBUG_NAME flann_cpp-gd) -- cgit v1.2.3 From e235ab759e16295dab105ec6d2be901df18c31a4 Mon Sep 17 00:00:00 2001 From: Christopher Warrington Date: Fri, 14 Jul 2017 15:16:50 -0700 Subject: Upgrade Bond to 6.0.0 * Updated to the 6.0.0 release of Bond. * Regenerated patches. --- ports/bond/0001_boost_static_libs.patch | 12 ++++++------ ports/bond/0002_omit_rapidjson.patch | 4 ++-- ports/bond/CONTROL | 2 +- ports/bond/portfile.cmake | 18 ++++++++++-------- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/ports/bond/0001_boost_static_libs.patch b/ports/bond/0001_boost_static_libs.patch index 9e84800e6..de40a6254 100644 --- a/ports/bond/0001_boost_static_libs.patch +++ b/ports/bond/0001_boost_static_libs.patch @@ -1,17 +1,17 @@ diff --git a/cmake/Config.cmake b/cmake/Config.cmake -index c6e2b40d..d8b4d689 100644 +index d5125c70..a2eb536c 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake -@@ -35,7 +35,7 @@ if (MSVC) - # Bond with MSVC CRT-specific code too much. More details at - # https://msdn.microsoft.com/en-us/library/ms175759.aspx - add_definitions (-D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1 -D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1) +@@ -46,7 +46,7 @@ if (MSVC) + add_compile_options (/permissive-) + endif() + - set (Boost_USE_STATIC_LIBS ON) + set (Boost_USE_STATIC_LIBS OFF) endif (MSVC) if (WIN32) -@@ -106,9 +106,6 @@ if (DEFINED ENV{APPVEYOR} AND ("$ENV{BOND_BUILD}" STREQUAL "C++")) +@@ -131,9 +131,6 @@ if (DEFINED ENV{APPVEYOR} AND ("$ENV{BOND_BUILD}" STREQUAL "C++")) endif() endif() diff --git a/ports/bond/0002_omit_rapidjson.patch b/ports/bond/0002_omit_rapidjson.patch index 38d43f98d..7d502353d 100644 --- a/ports/bond/0002_omit_rapidjson.patch +++ b/ports/bond/0002_omit_rapidjson.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 72d62c5e..d7eb5cd4 100644 +index fe0f629e..54b6d8ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -39,7 +39,6 @@ install (DIRECTORY +@@ -49,7 +49,6 @@ install (DIRECTORY cpp/inc/bond cpp/generated/bond python/inc/bond diff --git a/ports/bond/CONTROL b/ports/bond/CONTROL index 29d17b584..9007113f3 100644 --- a/ports/bond/CONTROL +++ b/ports/bond/CONTROL @@ -1,5 +1,5 @@ Source: bond Maintainer: bond@microsoft.com -Version: 5.3.1 +Version: 6.0.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. Build-Depends: boost, rapidjson diff --git a/ports/bond/portfile.cmake b/ports/bond/portfile.cmake index c28021a38..f3664da8c 100644 --- a/ports/bond/portfile.cmake +++ b/ports/bond/portfile.cmake @@ -4,24 +4,24 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bond-5.3.1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bond-6.0.0) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/bond/archive/5.3.1.zip" - FILENAME "bond-5.3.1.zip" - SHA512 aa1b3b6cbbbfbdb450306b59d0216c4b63b25ce2f5852387b42cb5c098e8fb6f90d8d1f688344fa4375244510009767d7d46a6a0b5f49c725b22cf3e9d73d1e5 + URLS "https://github.com/Microsoft/bond/archive/6.0.0.zip" + FILENAME "bond-6.0.0.zip" + SHA512 d585debabb7b74c1e85313278456bd6b63a388dbf64515c550b1d9739114b0963ffb1982d145fa4d3717747e8eba82e79ed2744a6c9e3cb1615d9a78b75b42bb ) vcpkg_download_distfile(GBC_ARCHIVE - URLS "https://github.com/Microsoft/bond/releases/download/5.3.1/gbc-5.3.1-amd64.exe.zip" - FILENAME "gbc-5.3.1-amd64.zip" - SHA512 fb1eff0b7bd34cba26fa6a0ffeba7789cff55976e95a695aa2cf6ae60b5c4e8b0dd15f0d7968599bd5b17c9b8b325aa29e3e13aca4854ec38ed50253d67038e4 + URLS "https://github.com/Microsoft/bond/releases/download/6.0.0/gbc-6.0.0-amd64.exe.zip" + FILENAME "gbc-6.0.0-amd64.zip" + SHA512 2aa4b5add478b952cb7733dcbf5c35634cde66812f1f1920d5fb1e2a52681a101ac6157bdba535a59316c4590fa37c74889b734106ca3e202a7a5ec0bcb1847f ) vcpkg_extract_source_archive(${ARCHIVE}) # Extract the precompiled gbc vcpkg_extract_source_archive(${GBC_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/tools/) -set(FETCHED_GBC_PATH ${CURRENT_BUILDTREES_DIR}/tools/gbc-5.3.1-amd64.exe) +set(FETCHED_GBC_PATH ${CURRENT_BUILDTREES_DIR}/tools/gbc-6.0.0-amd64.exe) if (NOT EXISTS ${FETCHED_GBC_PATH}) message(FATAL_ERROR "Fetching GBC failed. Expected '${FETCHED_GBC_PATH}' to exists, but it doesn't.") @@ -43,6 +43,8 @@ vcpkg_configure_cmake( OPTIONS -DBOND_LIBRARIES_ONLY=TRUE -DBOND_GBC_PATH=${FETCHED_GBC_PATH} + -DBOND_ENABLE_COMM=FALSE + -DBOND_ENABLE_GRPC=FALSE ) vcpkg_install_cmake() -- cgit v1.2.3 From 73ed70bb33875d00606998c515a82c519ea3c6cc Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 14 Jul 2017 23:45:04 +0100 Subject: [duktape] Revert duk_config.h to its original state --- ports/duktape/portfile.cmake | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/ports/duktape/portfile.cmake b/ports/duktape/portfile.cmake index 84278616c..14934a31a 100644 --- a/ports/duktape/portfile.cmake +++ b/ports/duktape/portfile.cmake @@ -8,11 +8,13 @@ vcpkg_download_distfile(ARCHIVE_FILE ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) -# Patch duk_config.h to remove 'undef DUK_F_DLL_BUILD' -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/duk_config.h.patch" -) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + # Patch duk_config.h to remove 'undef DUK_F_DLL_BUILD' + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/duk_config.h.patch" + ) +endif() vcpkg_configure_cmake( SOURCE_PATH ${CMAKE_PATH} @@ -21,6 +23,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +# Revert duk_config.h to its original state +# This is always done in case the file has already been previously patched +set(DUK_CONFIG_H_PATH "${CURRENT_PACKAGES_DIR}/include/duk_config.h") +file(READ ${DUK_CONFIG_H_PATH} CONTENT) +string(REPLACE "// #undef DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD" CONTENT "${CONTENT}") +file(WRITE ${DUK_CONFIG_H_PATH} "${CONTENT}") + # Remove debug include file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 6af7b6716cba48d44d2935da4b4499fd4a3cd187 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Fri, 14 Jul 2017 19:32:16 -0400 Subject: Handle static builds of libmikmod --- ports/libmikmod/portfile.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/libmikmod/portfile.cmake b/ports/libmikmod/portfile.cmake index 336e13922..7af2b684e 100644 --- a/ports/libmikmod/portfile.cmake +++ b/ports/libmikmod/portfile.cmake @@ -33,4 +33,8 @@ vcpkg_install_cmake() file(COPY ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmikmod) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmikmod/COPYING.LESSER ${CURRENT_PACKAGES_DIR}/share/libmikmod/copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) \ No newline at end of file +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() \ No newline at end of file -- cgit v1.2.3 From 6d986f5112ab9dfa4f3a67e13a347cc6f40f62b1 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Fri, 14 Jul 2017 19:46:45 -0400 Subject: Add a port for allegro5 --- ports/allegro5/CONTROL | 4 ++++ ports/allegro5/portfile.cmake | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 ports/allegro5/CONTROL create mode 100644 ports/allegro5/portfile.cmake diff --git a/ports/allegro5/CONTROL b/ports/allegro5/CONTROL new file mode 100644 index 000000000..2f7ff0ccd --- /dev/null +++ b/ports/allegro5/CONTROL @@ -0,0 +1,4 @@ +Source: allegro5 +Version: 5.2.1.0 +Description: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like. +Build-Depends: opengl, zlib, freetype, libogg, libvorbis, opus, libflac, openal-soft, libpng, bzip2 \ No newline at end of file diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake new file mode 100644 index 000000000..0028a090a --- /dev/null +++ b/ports/allegro5/portfile.cmake @@ -0,0 +1,36 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-5.2.1.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/liballeg/allegro5/archive/5.2.1.0.zip" + FILENAME "allegro5-5.2.1.0.zip" + SHA512 3271483714699e10d6ec0c0d94491d20d227b5a767d5134b592418bd0838c64d3a6448ba8448d568aeb846a6b50004656507deabb2d82dfe748f4ccc83ba1a53 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DSHARED=OFF -DWANT_DOCS=OFF -DALLEGRO_SDL=OFF -DWANT_STATIC_RUNTIME=ON -DWANT_DEMO=OFF -DWANT_EXAMPLES=OFF -DWANT_CURL_EXAMPLE=OFF -DWANT_TESTS=OFF + OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON + OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF +) + +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) \ No newline at end of file -- cgit v1.2.3 From af1aa04b56c2933fe0699a77d12cdd841aadf89d Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Fri, 14 Jul 2017 23:45:50 -0400 Subject: Add support for physfs and libtheora to allegro5 --- ports/allegro5/CONTROL | 2 +- ports/allegro5/portfile.cmake | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/ports/allegro5/CONTROL b/ports/allegro5/CONTROL index 2f7ff0ccd..becfe1966 100644 --- a/ports/allegro5/CONTROL +++ b/ports/allegro5/CONTROL @@ -1,4 +1,4 @@ Source: allegro5 Version: 5.2.1.0 Description: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like. -Build-Depends: opengl, zlib, freetype, libogg, libvorbis, opus, libflac, openal-soft, libpng, bzip2 \ No newline at end of file +Build-Depends: opengl, zlib, freetype, libogg, libvorbis, opus, libflac, openal-soft, libpng, bzip2, physfs, libtheora \ No newline at end of file diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 0028a090a..7481f7f3c 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -22,7 +22,44 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DSHARED=OFF -DWANT_DOCS=OFF -DALLEGRO_SDL=OFF -DWANT_STATIC_RUNTIME=ON -DWANT_DEMO=OFF -DWANT_EXAMPLES=OFF -DWANT_CURL_EXAMPLE=OFF -DWANT_TESTS=OFF + OPTIONS + -DWANT_DOCS=OFF + -DALLEGRO_SDL=OFF + -DWANT_DEMO=OFF + -DWANT_EXAMPLES=OFF + -DWANT_CURL_EXAMPLE=OFF + -DWANT_TESTS=OFF + -DWANT_AUDIO=ON + -DWANT_COLOR=ON + -DWANT_D3D=ON + -DWANT_D3D9EX=ON + -DWANT_DSOUND=ON + -DWANT_FLAC=ON + -DWANT_FONT=ON + -DWANT_GLES2=ON + -DWANT_GLES3=ON + -DWANT_IMAGE=ON + -DWANT_IMAGE_JPG=ON + -DWANT_IMAGE_PNG=ON + -DWANT_MEMFILE=ON + -DWANT_MODAUDIO=ON + -DWANT_NATIVE_DIALOG=ON + -DWANT_NATIVE_IMAGE_LOADER=ON + -DWANT_OGG_VIDEO=ON + -DWANT_OPENAL=ON + -DWANT_OPENGL=ON + -DWANT_OPUS=ON + -DWANT_PHYSFS=ON + -DWANT_POPUP_EXAMPLES=OFF + -DWANT_PRIMITIVES=ON + -DWANT_RELEASE_LOGGING=OFF + -DWANT_SHADERS_D3D=ON + -DWANT_SHADERS_GL=ON + -DWANT_TREMOR=ON + -DWANT_TTF=ON + -DWANT_VIDEO=ON + -DWANT_VORBIS=ON + -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF ) -- cgit v1.2.3 From 8d2313181324c7df95d9d5e772e8e33d1509b3ff Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Fri, 14 Jul 2017 23:46:03 -0400 Subject: Flesh out libmikmod --- ports/libmikmod/CONTROL | 5 +++-- ports/libmikmod/portfile.cmake | 14 +++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ports/libmikmod/CONTROL b/ports/libmikmod/CONTROL index 59a573ff6..b9f970959 100644 --- a/ports/libmikmod/CONTROL +++ b/ports/libmikmod/CONTROL @@ -1,3 +1,4 @@ Source: libmikmod -Version: -Description: +Version: 3.3.11.1 +Description: Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm. +Build-Depends: openal-soft \ No newline at end of file diff --git a/ports/libmikmod/portfile.cmake b/ports/libmikmod/portfile.cmake index 7af2b684e..1231f5bfa 100644 --- a/ports/libmikmod/portfile.cmake +++ b/ports/libmikmod/portfile.cmake @@ -22,7 +22,19 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DENABLE_DOC=OFF -DENABLE_THREADS=ON + OPTIONS + -DENABLE_DOC=OFF + -DENABLE_THREADS=ON + -DDISABLE_HQMIXER=OFF + -DENABLE_AF=ON + -DENABLE_AIFF=ON + -DENABLE_NAS=ON + -DENABLE_OPENAL=ON + -DENABLE_PIPE=ON + -DENABLE_RAW=ON + -DENABLE_STDOUT=ON + -DENABLE_WAV=ON + -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include OPTIONS_RELEASE -DENABLE_SIMD=ON OPTIONS_DEBUG -DENABLE_SIMD=OFF ) -- cgit v1.2.3 From 7a732c9d20577f88e209decd1f6bd4132f2e215b Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sat, 15 Jul 2017 00:08:54 -0400 Subject: Remove some dependencies that we don't yet have on vcpkg --- ports/allegro5/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 7481f7f3c..f969424d7 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -48,6 +48,7 @@ vcpkg_configure_cmake( -DWANT_OGG_VIDEO=ON -DWANT_OPENAL=ON -DWANT_OPENGL=ON + -DWANT_OPENSL=OFF # Not yet available on vcpkg -DWANT_OPUS=ON -DWANT_PHYSFS=ON -DWANT_POPUP_EXAMPLES=OFF @@ -55,7 +56,7 @@ vcpkg_configure_cmake( -DWANT_RELEASE_LOGGING=OFF -DWANT_SHADERS_D3D=ON -DWANT_SHADERS_GL=ON - -DWANT_TREMOR=ON + -DWANT_TREMOR=OFF # Not yet available on vcpkg -DWANT_TTF=ON -DWANT_VIDEO=ON -DWANT_VORBIS=ON -- cgit v1.2.3 From d973fe70b0cbb7c4820e9e08dd4c527266d8b22a Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sat, 15 Jul 2017 00:09:06 -0400 Subject: Clarify two include directories for allegro5 --- ports/allegro5/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index f969424d7..956632112 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -61,6 +61,8 @@ vcpkg_configure_cmake( -DWANT_VIDEO=ON -DWANT_VORBIS=ON -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DOPUS_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF ) -- cgit v1.2.3 From ce0f037bc149b6be003bd7c53c5c3e8bff2ddd7f Mon Sep 17 00:00:00 2001 From: James Chang Date: Sat, 15 Jul 2017 12:23:21 +0800 Subject: [eigen3] update to version 3.3.4 also remove the code to check for missing CMakeLists.txt, since it can only happen in version 3.3.3 --- ports/eigen3/CONTROL | 2 +- ports/eigen3/portfile.cmake | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL index 8e397a6d0..9920801cf 100644 --- a/ports/eigen3/CONTROL +++ b/ports/eigen3/CONTROL @@ -1,3 +1,3 @@ Source: eigen3 -Version: 3.3.3-5 +Version: 3.3.4 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 6afe3a9e4..a4922f008 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -1,19 +1,12 @@ #header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eigen-eigen-67e894c6cd8f) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eigen-eigen-5a0156e40feb) vcpkg_download_distfile(ARCHIVE - URLS "http://bitbucket.org/eigen/eigen/get/3.3.3.tar.bz2" - FILENAME "eigen-3.3.3.tar.bz2" - SHA512 bb5a8b761371e516f0a344a7c9f6e369e21c2907c8548227933ca6010fc607a66c8d6ff7c41b1aec3dea7d482ce8c2a09e38ae5c7a2c5b16bdd8007e7a81ecc3 + URLS "http://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2" + FILENAME "eigen-3.3.4.tar.bz2" + SHA512 d67a3fd8f7ce811af65fc1d43ec347dadf9c643a49135f7e455fc303773bad09e80a125282c7dfca7a1993b79e1f66576ac92418119fbb0fa50c1a581b957c0d ) - vcpkg_extract_source_archive(${ARCHIVE}) -# check if required file exists -if((NOT EXISTS ${SOURCE_PATH}/Eigen/CMakeLists.txt) OR (NOT EXISTS ${SOURCE_PATH}/unsupported/Eigen/CMakeLists.txt)) - message(STATUS "Missing CMakeLists.txt in cache, re-extracting.") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}) - vcpkg_extract_source_archive(${ARCHIVE}) -endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From db1cf01b36808c76e789d0c7fdab67567bcf5e27 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sat, 15 Jul 2017 00:39:27 -0400 Subject: Remove modaudio for now - modaudio support relies on DUMB, which is not available on vcpkg right now --- ports/allegro5/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 956632112..59464e652 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -42,7 +42,7 @@ vcpkg_configure_cmake( -DWANT_IMAGE_JPG=ON -DWANT_IMAGE_PNG=ON -DWANT_MEMFILE=ON - -DWANT_MODAUDIO=ON + -DWANT_MODAUDIO=OFF # Not available on vcpkg right now -DWANT_NATIVE_DIALOG=ON -DWANT_NATIVE_IMAGE_LOADER=ON -DWANT_OGG_VIDEO=ON -- cgit v1.2.3 From 1b9546aea4d8fd0193843ac8a6ed21cdaaec128a Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sat, 15 Jul 2017 00:46:09 -0400 Subject: Guess we don't need d3d9ex either --- ports/allegro5/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 59464e652..59f5e54c3 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -32,7 +32,7 @@ vcpkg_configure_cmake( -DWANT_AUDIO=ON -DWANT_COLOR=ON -DWANT_D3D=ON - -DWANT_D3D9EX=ON + -DWANT_D3D9EX=OFF # Not available on vcpkg -DWANT_DSOUND=ON -DWANT_FLAC=ON -DWANT_FONT=ON -- cgit v1.2.3 From 2da5aac5edb625d958854fec664b60f0be7c34b5 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sat, 15 Jul 2017 00:49:19 -0400 Subject: Go a little deeper with OPENAL_INCLUDE_DIR --- ports/allegro5/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 59f5e54c3..85fece836 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -60,7 +60,7 @@ vcpkg_configure_cmake( -DWANT_TTF=ON -DWANT_VIDEO=ON -DWANT_VORBIS=ON - -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/AL -DOPUS_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include -DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON -- cgit v1.2.3 From 8b802d3ffaeb1f173d081be20209fb4863944da7 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sat, 15 Jul 2017 01:07:22 -0400 Subject: opusfile isn't available on vcpkg, let's not include it --- ports/allegro5/CONTROL | 2 +- ports/allegro5/portfile.cmake | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ports/allegro5/CONTROL b/ports/allegro5/CONTROL index becfe1966..2d3003935 100644 --- a/ports/allegro5/CONTROL +++ b/ports/allegro5/CONTROL @@ -1,4 +1,4 @@ Source: allegro5 Version: 5.2.1.0 Description: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like. -Build-Depends: opengl, zlib, freetype, libogg, libvorbis, opus, libflac, openal-soft, libpng, bzip2, physfs, libtheora \ No newline at end of file +Build-Depends: opengl, zlib, freetype, libogg, libvorbis, libflac, openal-soft, libpng, bzip2, physfs, libtheora \ No newline at end of file diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 85fece836..83ab6e5d9 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -49,7 +49,7 @@ vcpkg_configure_cmake( -DWANT_OPENAL=ON -DWANT_OPENGL=ON -DWANT_OPENSL=OFF # Not yet available on vcpkg - -DWANT_OPUS=ON + -DWANT_OPUS=OFF # opus is available on vcpkg, but opusfile isn't -DWANT_PHYSFS=ON -DWANT_POPUP_EXAMPLES=OFF -DWANT_PRIMITIVES=ON @@ -61,7 +61,6 @@ vcpkg_configure_cmake( -DWANT_VIDEO=ON -DWANT_VORBIS=ON -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/AL - -DOPUS_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include -DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF -- cgit v1.2.3 From d4f924f7537700dfc25f265eb68cbf377b7c32d3 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sat, 15 Jul 2017 10:45:14 -0400 Subject: Add vcpkg_copy_pdbs() to allegro5's portfile - Maybe this'll resolve those errors? --- ports/allegro5/portfile.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 83ab6e5d9..0c3a8a42c 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -72,4 +72,6 @@ vcpkg_install_cmake() 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) \ No newline at end of file +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From b0ade3ed2ef18240715d0aec6e8d0866c6bf9e8d Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sat, 15 Jul 2017 11:00:37 -0400 Subject: Nope, let's try globbing --- ports/allegro5/portfile.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 0c3a8a42c..69863649c 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -74,4 +74,7 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/allegro5/LICENSE.txt ${CURRENT_PACKAGE file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB PDB_GLOB ${CURRENT_BUILDTREES_DIR}-dbg/lib/*.dbg) +file(COPY ${PDB_GLOB} DESTINATION ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug) + vcpkg_copy_pdbs() -- cgit v1.2.3 From 7dfa5b6bb987dab4e94a3d4eedefccf070b24e6b Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sat, 15 Jul 2017 11:47:50 -0400 Subject: Oops --- ports/allegro5/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 69863649c..9f5aa3416 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -74,7 +74,7 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/allegro5/LICENSE.txt ${CURRENT_PACKAGE file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(GLOB PDB_GLOB ${CURRENT_BUILDTREES_DIR}-dbg/lib/*.dbg) +file(GLOB PDB_GLOB ${CURRENT_BUILDTREES_DIR}-dbg/lib/*.pdb) file(COPY ${PDB_GLOB} DESTINATION ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug) vcpkg_copy_pdbs() -- cgit v1.2.3 From a29b5e4612d921b2fbf22e36a016616061da99af Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sat, 15 Jul 2017 13:56:02 -0400 Subject: Let's try this --- ports/allegro5/portfile.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 9f5aa3416..e1f18baaa 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -19,6 +19,11 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(ALLEGRO_USE_STATIC -DSHARED=ON) +else() + set(ALLEGRO_USE_STATIC -DSHARED=OFF) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja @@ -26,6 +31,7 @@ vcpkg_configure_cmake( -DWANT_DOCS=OFF -DALLEGRO_SDL=OFF -DWANT_DEMO=OFF + ${ALLEGRO_USE_STATIC} -DWANT_EXAMPLES=OFF -DWANT_CURL_EXAMPLE=OFF -DWANT_TESTS=OFF -- cgit v1.2.3 From c5bf43980811520752252004fc834840b0bcf653 Mon Sep 17 00:00:00 2001 From: Han Hu Date: Mon, 17 Jul 2017 17:38:36 +0800 Subject: 1 fix relative path for looking include directory 2 install the additional FindEigen Gflags Glog file, because the original ***Config.cmake file of the library do not define proper variable for use in CeresConfig.cmake --- ports/ceres/portfile.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index 61cb4a009..68ad24425 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -55,17 +55,20 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") +file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/CeresConfig.cmake CERES_MODULE) +string(REPLACE "\${CERES_CURRENT_CONFIG_DIR}/../" "\${CERES_CURRENT_CONFIG_DIR}/../../" CERES_MODULE "${CERES_MODULE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/CeresConfig.cmake "${CERES_MODULE}") + vcpkg_copy_pdbs() #clean file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE ${CURRENT_PACKAGES_DIR}/share/ceres/FindEigen.cmake) -file(REMOVE ${CURRENT_PACKAGES_DIR}/share/ceres/FindGflags.cmake) -file(REMOVE ${CURRENT_PACKAGES_DIR}/share/ceres/FindGlog.cmake) +# file(REMOVE ${CURRENT_PACKAGES_DIR}/share/ceres/FindEigen.cmake) +# file(REMOVE ${CURRENT_PACKAGES_DIR}/share/ceres/FindGflags.cmake) +# file(REMOVE ${CURRENT_PACKAGES_DIR}/share/ceres/FindGlog.cmake) # Handle copyright of suitesparse and metis file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ceres) -- cgit v1.2.3 From 628096612448488000b680c71e930cb31fc59a9e Mon Sep 17 00:00:00 2001 From: AuroraDysis Date: Mon, 17 Jul 2017 21:43:46 +0800 Subject: [blaze] initial port --- ports/blaze/CONTROL | 3 +++ ports/blaze/portfile.cmake | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 ports/blaze/CONTROL create mode 100644 ports/blaze/portfile.cmake diff --git a/ports/blaze/CONTROL b/ports/blaze/CONTROL new file mode 100644 index 000000000..dd1b065ef --- /dev/null +++ b/ports/blaze/CONTROL @@ -0,0 +1,3 @@ +Source: blaze +Version: 3.1 +Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic. diff --git a/ports/blaze/portfile.cmake b/ports/blaze/portfile.cmake new file mode 100644 index 000000000..cf268451c --- /dev/null +++ b/ports/blaze/portfile.cmake @@ -0,0 +1,19 @@ +#header-only library +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/blaze-3.1) +vcpkg_download_distfile(ARCHIVE + URLS "https://bitbucket.org/blaze-lib/blaze/downloads/blaze-3.1.tar.gz" + FILENAME "blaze-3.1.tar.gz" + SHA512 fe03a7615d4105d6a869cfd69b3db3165b838eff53cdff7adbbd5ae9d753aa009bbab50925463c6704f9530a4c4ad5605e373b3cbaee96ca982a474a665ed756 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Copy the blaze header files +file(COPY "${SOURCE_PATH}/blaze" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" + FILES_MATCHING PATTERN "*.h") + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/blaze) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/blaze/LICENSE ${CURRENT_PACKAGES_DIR}/share/blaze/copyright) -- cgit v1.2.3 From 7cca4a2d59124070661d69912288d73758ed4f94 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Mon, 17 Jul 2017 13:36:33 -0700 Subject: clean tests --- toolsrc/src/test_install_plan.cpp | 98 +++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 55 deletions(-) diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index d90e1e523..19cede6df 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -24,6 +24,10 @@ namespace UnitTest1 map.emplace(*spec.get(), std::move(*scf.get())); return PackageSpec{*spec.get()}; } + PackageSpec set_package_map(std::string source, std::string version, std::string build_depends) + { + return get_package_spec({{{"Source", source}, {"Version", version}, {"Build-Depends", build_depends}}}); + } }; static void features_check(Dependencies::AnyAction* install_action, @@ -59,10 +63,9 @@ namespace UnitTest1 std::vector> status_paragraphs; PackageSpecMap spec_map; - - auto spec_a = spec_map.get_package_spec({{{"Source", "a"}, {"Version", "1.2.8"}, {"Build-Depends", "b"}}}); - auto spec_b = spec_map.get_package_spec({{{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", "c"}}}); - auto spec_c = spec_map.get_package_spec({{{"Source", "c"}, {"Version", "2.5.3"}, {"Build-Depends", ""}}}); + auto spec_a = spec_map.set_package_map("a", "1.2.8", "b"); + auto spec_b = spec_map.set_package_map("b", "1.3", "c"); + auto spec_c = spec_map.set_package_map("c", "2.5.3", ""); auto map_port = Dependencies::MapPortFile(spec_map.map); auto install_plan = @@ -79,17 +82,14 @@ namespace UnitTest1 std::vector> status_paragraphs; PackageSpecMap spec_map; - - auto spec_a = spec_map.get_package_spec({{{"Source", "a"}, {"Version", "1.2.8"}, {"Build-Depends", "d"}}}); - auto spec_b = spec_map.get_package_spec({{{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", "d, e"}}}); - auto spec_c = - spec_map.get_package_spec({{{"Source", "c"}, {"Version", "2.5.3"}, {"Build-Depends", "e, h"}}}); - auto spec_d = - spec_map.get_package_spec({{{"Source", "d"}, {"Version", "4.0"}, {"Build-Depends", "f, g, h"}}}); - auto spec_e = spec_map.get_package_spec({{{"Source", "e"}, {"Version", "1.0"}, {"Build-Depends", "g"}}}); - auto spec_f = spec_map.get_package_spec({{{"Source", "f"}, {"Version", "1.0"}, {"Build-Depends", ""}}}); - auto spec_g = spec_map.get_package_spec({{{"Source", "g"}, {"Version", "1.0"}, {"Build-Depends", ""}}}); - auto spec_h = spec_map.get_package_spec({{{"Source", "h"}, {"Version", "1.0"}, {"Build-Depends", ""}}}); + auto spec_a = spec_map.set_package_map("a", "1.2.8", "d"); + auto spec_b = spec_map.set_package_map("b", "1.3", "d, e"); + auto spec_c = spec_map.set_package_map("c", "2.5.3", "e, h"); + auto spec_d = spec_map.set_package_map("d", "4.0", "f, g, h"); + auto spec_e = spec_map.set_package_map("e", "1.0", "g"); + auto spec_f = spec_map.set_package_map("f", "1.0", ""); + auto spec_g = spec_map.set_package_map("g", "1.0", ""); + auto spec_h = spec_map.set_package_map("h", "1.0", ""); auto map_port = Dependencies::MapPortFile(spec_map.map); auto install_plan = Dependencies::create_install_plan( @@ -136,24 +136,16 @@ namespace UnitTest1 PackageSpecMap spec_map; - auto spec_h = - spec_map.get_package_spec({{{"Source", "h"}, {"Version", "1.2.8"}, {"Build-Depends", "j, k"}}}); - auto spec_c = spec_map.get_package_spec( - {{{"Source", "c"}, {"Version", "1.2.8"}, {"Build-Depends", "d, e, f, g, h, j, k"}}}); - auto spec_k = spec_map.get_package_spec({{{"Source", "k"}, {"Version", "1.2.8"}, {"Build-Depends", ""}}}); - auto spec_b = spec_map.get_package_spec( - {{{"Source", "b"}, {"Version", "1.2.8"}, {"Build-Depends", "c, d, e, f, g, h, j, k"}}}); - auto spec_d = spec_map.get_package_spec( - {{{"Source", "d"}, {"Version", "1.2.8"}, {"Build-Depends", "e, f, g, h, j, k"}}}); - auto spec_j = spec_map.get_package_spec({{{"Source", "j"}, {"Version", "1.2.8"}, {"Build-Depends", "k"}}}); - auto spec_f = - spec_map.get_package_spec({{{"Source", "f"}, {"Version", "1.2.8"}, {"Build-Depends", "g, h, j, k"}}}); - auto spec_e = spec_map.get_package_spec( - {{{"Source", "e"}, {"Version", "1.2.8"}, {"Build-Depends", "f, g, h, j, k"}}}); - auto spec_a = spec_map.get_package_spec( - {{{"Source", "a"}, {"Version", "1.2.8"}, {"Build-Depends", "b, c, d, e, f, g, h, j, k"}}}); - auto spec_g = - spec_map.get_package_spec({{{"Source", "g"}, {"Version", "1.2.8"}, {"Build-Depends", "h, j, k"}}}); + auto spec_a = spec_map.set_package_map("a", "1.2.8", "b, c, d, e, f, g, h, j, k"); + auto spec_b = spec_map.set_package_map("b", "1.2.8", "c, d, e, f, g, h, j, k"); + auto spec_c = spec_map.set_package_map("c", "1.2.8", "d, e, f, g, h, j, k"); + auto spec_d = spec_map.set_package_map("d", "1.2.8", "e, f, g, h, j, k"); + auto spec_e = spec_map.set_package_map("e", "1.2.8", "f, g, h, j, k"); + auto spec_f = spec_map.set_package_map("f", "1.2.8", "g, h, j, k"); + auto spec_g = spec_map.set_package_map("g", "1.2.8", "h, j, k"); + auto spec_h = spec_map.set_package_map("h", "1.2.8", "j, k"); + auto spec_j = spec_map.set_package_map("j", "1.2.8", "k"); + auto spec_k = spec_map.set_package_map("k", "1.2.8", ""); auto map_port = Dependencies::MapPortFile(spec_map.map); auto install_plan = @@ -197,23 +189,20 @@ namespace UnitTest1 {"Status", "install ok installed"}})); PackageSpecMap spec_map; - auto spec_a = - FullPackageSpec{spec_map.get_package_spec( - {{{"Source", "a"}, {"Version", "1.3.8"}, {"Build-Depends", "b, b[beefeatureone]"}}, - {{"Feature", "featureone"}, - {"Description", "the first feature for a"}, - {"Build-Depends", "b[beefeaturetwo]"}} - - }), + FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "a"}, {"Version", "1.3.8"}, {"Build-Depends", "b, b[beefeatureone]"}}, + {{"Feature", "featureone"}, + {"Description", "the first feature for a"}, + {"Build-Depends", "b[beefeaturetwo]"}}, + }), {"featureone"}}; - auto spec_b = FullPackageSpec{spec_map.get_package_spec( - {{{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, - {{"Feature", "beefeatureone"}, {"Description", "the first feature for b"}, {"Build-Depends", ""}}, - {{"Feature", "beefeaturetwo"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}}, - {{"Feature", "beefeaturethree"}, {"Description", "the third feature for b"}, {"Build-Depends", ""}} - - })}; + auto spec_b = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, + {{"Feature", "beefeatureone"}, {"Description", "the first feature for b"}, {"Build-Depends", ""}}, + {{"Feature", "beefeaturetwo"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}}, + {{"Feature", "beefeaturethree"}, {"Description", "the third feature for b"}, {"Build-Depends", ""}}, + })}; auto install_plan = Dependencies::create_feature_install_plan( spec_map.map, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); @@ -242,13 +231,12 @@ namespace UnitTest1 }), {"featureone"}}; - auto spec_b = FullPackageSpec{spec_map.get_package_spec( - {{{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, - {{"Feature", "beefeatureone"}, {"Description", "the first feature for b"}, {"Build-Depends", ""}}, - {{"Feature", "beefeaturetwo"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}}, - {{"Feature", "beefeaturethree"}, {"Description", "the third feature for b"}, {"Build-Depends", ""}} - - })}; + auto spec_b = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, + {{"Feature", "beefeatureone"}, {"Description", "the first feature for b"}, {"Build-Depends", ""}}, + {{"Feature", "beefeaturetwo"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}}, + {{"Feature", "beefeaturethree"}, {"Description", "the third feature for b"}, {"Build-Depends", ""}}, + })}; auto install_plan = Dependencies::create_feature_install_plan( spec_map.map, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); -- cgit v1.2.3 From 772a226df37ed89b0a8034cff98c2c9b5371bb7e Mon Sep 17 00:00:00 2001 From: jasjuang Date: Mon, 17 Jul 2017 15:39:20 -0700 Subject: fix cmake error when using find_package in down stream project --- ports/alembic/portfile.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index b57a1232d..c98a84e57 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -32,6 +32,16 @@ file(REMOVE ${DEBUG_EXE}) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/bin/Alembic.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/Alembic.dll) +file(READ ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-debug.cmake DEBUG_CONFIG) +string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/Alembic.dll" + "\${_IMPORT_PREFIX}/debug/bin/Alembic.dll" DEBUG_CONFIG ${DEBUG_CONFIG}) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-debug.cmake "${DEBUG_CONFIG}") + +file(READ ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-release.cmake RELEASE_CONFIG) +string(REPLACE "\${_IMPORT_PREFIX}/lib/Alembic.dll" + "\${_IMPORT_PREFIX}/bin/Alembic.dll" RELEASE_CONFIG ${RELEASE_CONFIG}) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-release.cmake "${RELEASE_CONFIG}") + # Put the license file where vcpkg expects it file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/Alembic/) file(RENAME ${CURRENT_PACKAGES_DIR}/share/Alembic/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/Alembic/copyright) -- cgit v1.2.3 From 2cd756033a9505c4235f522e7e2f07d61949f57f Mon Sep 17 00:00:00 2001 From: jasjuang Date: Mon, 17 Jul 2017 16:20:00 -0700 Subject: bump up version number --- ports/alembic/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index 29ec78bc1..cdd9a01e7 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.1 +Version: 1.7.1-1 Build-Depends:ilmbase 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. http://alembic.io/ -- cgit v1.2.3 From 15e2cc11f5df4189cf77e9b23af0a7f059921538 Mon Sep 17 00:00:00 2001 From: Martin Moene Date: Tue, 18 Jul 2017 16:08:18 +0200 Subject: Add gsl-lite 0.24.0 --- ports/gsl-lite/CONTROL | 3 +++ ports/gsl-lite/portfile.cmake | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ports/gsl-lite/CONTROL create mode 100644 ports/gsl-lite/portfile.cmake diff --git a/ports/gsl-lite/CONTROL b/ports/gsl-lite/CONTROL new file mode 100644 index 000000000..0facec7fd --- /dev/null +++ b/ports/gsl-lite/CONTROL @@ -0,0 +1,3 @@ +Source: gsl-lite +Version: 0.24.0 +Description: A single-file header-only version of ISO C++ Guideline Support Library (GSL) for C++98, C++11 and later diff --git a/ports/gsl-lite/portfile.cmake b/ports/gsl-lite/portfile.cmake new file mode 100644 index 000000000..07fb2ab81 --- /dev/null +++ b/ports/gsl-lite/portfile.cmake @@ -0,0 +1,18 @@ +include(vcpkg_common_functions) + +set(GSL_LITE_VERSION v0.24.0) + +vcpkg_download_distfile(HEADER + URLS "https://github.com/martinmoene/gsl-lite/releases/download/${GSL_LITE_VERSION}/gsl-lite.h" + FILENAME "gsl-lite-${GSL_LITE_VERSION}.h" + SHA512 fbe93aadf25feb488c2190e867933f198adb92a5a87e6bee8a8e1d6f0185829953348cb67eb52f70945d5a3cdb1f4d7403cfd950ab808b215ce445c37e9d9daf +) + +vcpkg_download_distfile(LICENSE + URLS https://github.com/martinmoene/gsl-lite/raw/${GSL_LITE_VERSION}/LICENSE.txt" + FILENAME "gsl-lite-LICENSE-${GSL_LITE_VERSION}.txt" + SHA512 8c43bac30bd7dd1911e29739be50735e013a15b6d1553d4ac64c76b8597d9a896491d9d5be277f22296439570a34813ed89deec6c80483dd2a9754a141febe15 +) + +file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME gsl-lite.h) +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsl-lite RENAME copyright) -- cgit v1.2.3 From 02f4d09ea6b21dc5d10237094b2841e8528f6156 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 18 Jul 2017 12:07:08 -0700 Subject: [ceres] Bump version for PR #1469 --- ports/ceres/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL index 4266bbac1..856d690be 100644 --- a/ports/ceres/CONTROL +++ b/ports/ceres/CONTROL @@ -1,4 +1,4 @@ Source: ceres -Version: 1.12.0-1 +Version: 1.12.0-2 Build-Depends:suitesparse, eigen3, clapack, gflags, glog Description: non-linear optimization package \ No newline at end of file -- cgit v1.2.3 From 2807fce1ab3e77e8a59ab18adf0c11a610e24fc5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 18 Jul 2017 12:26:55 -0700 Subject: [vcpkg-from-github] Improve documentation (#1457) --- scripts/cmake/vcpkg_from_github.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index 0ce485954..645690353 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -23,7 +23,9 @@ ## The organization or user and repository on GitHub. ## ## ### REF -## A stable git commit-ish (ideally a tag) that will not change contents. +## A stable git commit-ish (ideally a tag) 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. ## ## If `REF` is specified, `SHA512` must also be specified. ## @@ -38,7 +40,7 @@ ## For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. ## ## ## Notes: -## At least one of `REF` and `HEAD_REF` must be specified. +## At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. ## ## This exports the `VCPKG_HEAD_VERSION` variable during head builds. ## -- cgit v1.2.3 From 2f9594d2b1dfecae5ffd5cbdc8fe4a5d8f3e047e Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 15 Jul 2017 01:52:42 +0200 Subject: [openjpeg] fix import macro --- ports/openjpeg/CONTROL | 2 +- ports/openjpeg/portfile.cmake | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ports/openjpeg/CONTROL b/ports/openjpeg/CONTROL index cd2f0aaa8..15a56452e 100644 --- a/ports/openjpeg/CONTROL +++ b/ports/openjpeg/CONTROL @@ -1,3 +1,3 @@ Source: openjpeg -Version: 2.1.2-1 +Version: 2.1.2-2 Description: JPEG 2000 image library diff --git a/ports/openjpeg/portfile.cmake b/ports/openjpeg/portfile.cmake index f48395997..769f1410e 100644 --- a/ports/openjpeg/portfile.cmake +++ b/ports/openjpeg/portfile.cmake @@ -18,11 +18,16 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle debug cmake config files (see https://github.com/Microsoft/vcpkg/issues/77) -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/openjpeg/OpenJPEGTargets-debug.cmake OPENJPEG_DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" OPENJPEG_DEBUG_MODULE "${OPENJPEG_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/openjpeg/OpenJPEGTargets-debug.cmake "${OPENJPEG_DEBUG_MODULE}") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +vcpkg_fixup_cmake_targets() + +file(READ ${CURRENT_PACKAGES_DIR}/include/openjpeg-2.1/openjpeg.h OPENJPEG_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(OPJ_STATIC)" "1" OPENJPEG_H "${OPENJPEG_H}") +else() + string(REPLACE "defined(OPJ_STATIC)" "0" OPENJPEG_H "${OPENJPEG_H}") +endif() +string(REPLACE "defined(DLL_EXPORT)" "0" OPENJPEG_H "${OPENJPEG_H}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/openjpeg-2.1/openjpeg.h "${OPENJPEG_H}") # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openjpeg) -- cgit v1.2.3 From d1f441d5d56fe07e354adbf183e2a3a46c27d480 Mon Sep 17 00:00:00 2001 From: Martin Moene Date: Tue, 18 Jul 2017 23:03:33 +0200 Subject: Fix quote, file extension, hash of gsl-lite-0.24.0 --- ports/gsl-lite/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/gsl-lite/portfile.cmake b/ports/gsl-lite/portfile.cmake index 07fb2ab81..a2773b759 100644 --- a/ports/gsl-lite/portfile.cmake +++ b/ports/gsl-lite/portfile.cmake @@ -9,9 +9,9 @@ vcpkg_download_distfile(HEADER ) vcpkg_download_distfile(LICENSE - URLS https://github.com/martinmoene/gsl-lite/raw/${GSL_LITE_VERSION}/LICENSE.txt" + URLS "https://github.com/martinmoene/gsl-lite/raw/${GSL_LITE_VERSION}/LICENSE" FILENAME "gsl-lite-LICENSE-${GSL_LITE_VERSION}.txt" - SHA512 8c43bac30bd7dd1911e29739be50735e013a15b6d1553d4ac64c76b8597d9a896491d9d5be277f22296439570a34813ed89deec6c80483dd2a9754a141febe15 + SHA512 1feff12bda27a5ec52440a7624de54d841faf3e254fff04ab169b7f312e685f4bfe71236de8b8ef759111ae95bdb69e05f2e8318773b0aff4ba24ea9568749bb ) file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME gsl-lite.h) -- cgit v1.2.3 From 4c8f8b3840acfd187110e517a1e2a8d44db48da8 Mon Sep 17 00:00:00 2001 From: codicodi Date: Tue, 18 Jul 2017 23:20:29 +0200 Subject: [flatbuffers] update to 1.7.1 --- ports/flatbuffers/CONTROL | 2 +- ports/flatbuffers/portfile.cmake | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ports/flatbuffers/CONTROL b/ports/flatbuffers/CONTROL index 1fbe5d628..e68024e91 100644 --- a/ports/flatbuffers/CONTROL +++ b/ports/flatbuffers/CONTROL @@ -1,4 +1,4 @@ Source: flatbuffers -Version: 1.6.0 +Version: 1.7.1 Description: Memory Efficient Serialization Library http://google.github.io/flatbuffers/ 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. \ No newline at end of file diff --git a/ports/flatbuffers/portfile.cmake b/ports/flatbuffers/portfile.cmake index e2c05d2c0..b785e2fc5 100644 --- a/ports/flatbuffers/portfile.cmake +++ b/ports/flatbuffers/portfile.cmake @@ -11,15 +11,14 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(VCPKG_LIBRARY_LINKAGE static) endif() - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flatbuffers-1.6.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/google/flatbuffers/archive/v1.6.0.zip" - FILENAME "flatbuffers-1.6.0.zip" - SHA512 c23043a54d7055f4e0a0164fdafd3f1d60292e57d62d20d30f641c9da90935d14da847f86239a19f777e68b707cfb25452da9192607a3a399ab25ce06b31c282 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/flatbuffers + REF v1.7.1 + SHA512 57732fc352c216c4be6d3237f93b872abf9dd2b62361d7d2856f99804a178760e4665ead2e33d5acdd00984ad03a746f581c9784ece583e1b2df1a10776f967a + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) set(OPTIONS) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") @@ -37,7 +36,6 @@ vcpkg_configure_cmake( # OPTIONS_DEBUG -DDEBUGGABLE=1 ) -vcpkg_build_cmake() vcpkg_install_cmake() if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin) -- cgit v1.2.3 From 40d2e35ca6fdf443a1b2b4d7aedf0a93cba47041 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 18 Jul 2017 17:20:01 -0700 Subject: [duktape] Stamp headers with the correct DUK_F_DLL_BUILD value. --- ports/duktape/CONTROL | 2 +- ports/duktape/portfile.cmake | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ports/duktape/CONTROL b/ports/duktape/CONTROL index 07ae7f1fe..74b01d4cf 100644 --- a/ports/duktape/CONTROL +++ b/ports/duktape/CONTROL @@ -1,4 +1,4 @@ Source: duktape -Version: 2.0.3-1 +Version: 2.0.3-3 Description: Embeddable Javascript engine with a focus on portability and compact footprint. Build-Depends: diff --git a/ports/duktape/portfile.cmake b/ports/duktape/portfile.cmake index 14934a31a..e3e84c0de 100644 --- a/ports/duktape/portfile.cmake +++ b/ports/duktape/portfile.cmake @@ -8,13 +8,10 @@ vcpkg_download_distfile(ARCHIVE_FILE ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - # Patch duk_config.h to remove 'undef DUK_F_DLL_BUILD' - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/duk_config.h.patch" - ) -endif() +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/duk_config.h.patch" +) vcpkg_configure_cmake( SOURCE_PATH ${CMAKE_PATH} @@ -23,11 +20,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -# Revert duk_config.h to its original state -# This is always done in case the file has already been previously patched set(DUK_CONFIG_H_PATH "${CURRENT_PACKAGES_DIR}/include/duk_config.h") file(READ ${DUK_CONFIG_H_PATH} CONTENT) -string(REPLACE "// #undef DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD" CONTENT "${CONTENT}") +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "// #undef DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD\n#define DUK_F_DLL_BUILD 1" CONTENT "${CONTENT}") +else() + string(REPLACE "// #undef DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD\n#define DUK_F_DLL_BUILD 0" CONTENT "${CONTENT}") +endif() file(WRITE ${DUK_CONFIG_H_PATH} "${CONTENT}") # Remove debug include -- cgit v1.2.3 From d1c44edbe1fa26a670a3f6262fc58f3c06d13eb0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 18 Jul 2017 17:27:25 -0700 Subject: [pcl] Add qt5 dependency. --- ports/pcl/CONTROL | 4 ++-- ports/pcl/portfile.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index f27722d34..1c7c8e7f2 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,4 +1,4 @@ Source: pcl -Version: 1.8.1rc1 -Build-Depends: boost, eigen3, flann, qhull, vtk, openni2 +Version: 1.8.1rc1-1 +Build-Depends: boost, eigen3, flann, qhull, vtk, openni2, qt5 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index 972d1bc64..193a051a5 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -43,8 +43,8 @@ vcpkg_configure_cmake( -DBUILD_surface_on_nurbs=ON -DBUILD_tools=OFF # PCL - -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${CRT_LINKAGE} - -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${CRT_LINKAGE} + -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=ON + -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=ON -DPCL_SHARED_LIBS=${CRT_LINKAGE} # WITH -DWITH_CUDA=OFF -- cgit v1.2.3 From 0094308a34657f9b3e855cc1d17495766a2751bd Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 18 Jul 2017 17:58:56 -0700 Subject: fix ceres find_package error for downstream project --- ports/ceres/portfile.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index b90e1c336..e8a22184a 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -52,10 +52,6 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") -file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/CeresConfig.cmake CERES_MODULE) -string(REPLACE "\${CERES_CURRENT_CONFIG_DIR}/../" "\${CERES_CURRENT_CONFIG_DIR}/../../" CERES_MODULE "${CERES_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/CeresConfig.cmake "${CERES_MODULE}") - vcpkg_copy_pdbs() # Changes target search path -- cgit v1.2.3 From 2a342a0f171e4ab76d4470e5a02ec240aec8f0e0 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 18 Jul 2017 18:03:00 -0700 Subject: bump version number --- ports/ceres/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL index 673fa5fdc..4c8cf30a8 100644 --- a/ports/ceres/CONTROL +++ b/ports/ceres/CONTROL @@ -1,4 +1,4 @@ Source: ceres -Version: 1.12.0-3 +Version: 1.12.0-4 Build-Depends:suitesparse, eigen3, clapack, gflags, glog Description: non-linear optimization package \ No newline at end of file -- cgit v1.2.3 From 1445115906139f5c6d14bcbbacdcc0cfb543fd80 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Wed, 19 Jul 2017 14:19:11 -0700 Subject: refactor feature packages --- toolsrc/include/vcpkg_Dependencies.h | 40 +++++++-------------- toolsrc/src/commands_ci.cpp | 2 +- toolsrc/src/test_install_plan.cpp | 2 +- toolsrc/src/vcpkg_Dependencies.cpp | 67 ++++++++++++++++++------------------ 4 files changed, 48 insertions(+), 63 deletions(-) diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index 92523a654..ff559c0f1 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -44,20 +44,20 @@ namespace vcpkg::Dependencies struct FeatureNodeEdges { - std::vector dotted; - std::vector dashed; + std::vector remove_edges; + std::vector build_edges; bool plus = false; }; std::vector to_feature_specs(const std::vector depends, const std::unordered_map str_to_spec); struct Cluster { - ClusterNode cluster_node; + ClusterNode cluster_data; std::unordered_map edges; - std::unordered_set tracked_nodes; - std::unordered_set original_nodes; - bool minus = false; - bool zero = true; + std::unordered_set to_install_features; + std::unordered_set original_features; + bool will_remove = false; + bool transient_uninstalled = true; Cluster() = default; private: @@ -81,7 +81,7 @@ namespace vcpkg::Dependencies InstallPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type); InstallPlanAction(const PackageSpec& spec, const SourceControlFile& any_paragraph, - std::unordered_set features, + const std::unordered_set& features, const RequestType& request_type); InstallPlanAction(const InstallPlanAction&) = delete; InstallPlanAction(InstallPlanAction&&) = default; @@ -163,6 +163,10 @@ namespace vcpkg::Dependencies mutable std::unordered_map cache; explicit PathsPortFile(const VcpkgPaths& paths); const SourceControlFile& get_control_file(const PackageSpec& spec) const override; + + private: + PathsPortFile(const PathsPortFile&) = delete; + PathsPortFile& operator=(const PathsPortFile&) = delete; }; std::vector create_install_plan(const PortFileProvider& port_file_provider, @@ -177,26 +181,6 @@ namespace vcpkg::Dependencies const StatusParagraphs& status_db); } -template<> -struct std::hash -{ - size_t operator()(const vcpkg::Dependencies::Cluster& value) const - { - size_t hash = 17; - if (auto source = value.cluster_node.source_paragraph.get()) - { - hash = hash * 31 + std::hash()((*source)->core_paragraph->name); - } - else if (!value.cluster_node.status_paragraphs.empty()) - { - auto start = *value.cluster_node.status_paragraphs.begin(); - hash = hash * 31 + std::hash()(start.package.displayname()); - } - - return hash; - } -}; - namespace vcpkg::Dependencies { struct GraphPlan diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp index 95d722302..f781adf69 100644 --- a/toolsrc/src/commands_ci.cpp +++ b/toolsrc/src/commands_ci.cpp @@ -40,7 +40,7 @@ namespace vcpkg::Commands::CI const std::vector specs = load_all_package_specs(paths.get_filesystem(), paths.ports, triplet); StatusParagraphs status_db = database_load_check(paths); - auto paths_port_file = Dependencies::PathsPortFile(paths); + const auto& paths_port_file = Dependencies::PathsPortFile(paths); const std::vector install_plan = Dependencies::create_install_plan(paths_port_file, specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index 19cede6df..671b6ed67 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -430,7 +430,7 @@ namespace UnitTest1 remove_plan_check(&install_plan[0], "x"); remove_plan_check(&install_plan[1], "b"); - // order here may change but A < X, and B anywhere + // TODO: order here may change but A < X, and B anywhere features_check(&install_plan[2], "a", {"core"}); features_check(&install_plan[3], "x", {"core"}); features_check(&install_plan[4], "b", {"core", "1"}); diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 824de15e1..90168813e 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -56,7 +56,7 @@ namespace vcpkg::Dependencies InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const SourceControlFile& any_paragraph, - std::unordered_set features, + const std::unordered_set& features, const RequestType& request_type) : InstallPlanAction() { @@ -153,7 +153,8 @@ namespace vcpkg::Dependencies return left->spec.name() < right->spec.name(); } - MapPortFile::MapPortFile(const std::unordered_map& map) : ports(map){}; + MapPortFile::MapPortFile(const std::unordered_map& map) : ports(map) {} + const SourceControlFile& MapPortFile::get_control_file(const PackageSpec& spec) const { auto scf = ports.find(spec); @@ -164,7 +165,8 @@ namespace vcpkg::Dependencies return scf->second; } - PathsPortFile::PathsPortFile(const VcpkgPaths& paths) : ports(paths){}; + PathsPortFile::PathsPortFile(const VcpkgPaths& paths) : ports(paths) {} + const SourceControlFile& PathsPortFile::get_control_file(const PackageSpec& spec) const { std::unordered_map::iterator cache_it = cache.find(spec); @@ -382,34 +384,34 @@ namespace vcpkg::Dependencies } if (it == cluster.edges.end()) { - Checks::exit_fail(VCPKG_LINE_INFO); + Checks::unreachable(VCPKG_LINE_INFO); } if (cluster.edges[updated_feature].plus) return true; - if (cluster.original_nodes.find(updated_feature) == cluster.original_nodes.end()) + if (cluster.original_features.find(updated_feature) == cluster.original_features.end()) { - cluster.zero = true; + cluster.transient_uninstalled = true; } - if (!cluster.zero) + if (!cluster.transient_uninstalled) { return false; } cluster.edges[updated_feature].plus = true; - if (!cluster.original_nodes.empty()) + if (!cluster.original_features.empty()) { mark_minus(cluster, pkg_to_cluster, graph_plan); } graph_plan.install_graph.add_vertex(&cluster); - auto& tracked = cluster.tracked_nodes; + auto& tracked = cluster.to_install_features; tracked.insert(updated_feature); if (tracked.find("core") == tracked.end() && tracked.find("") == tracked.end()) { - cluster.tracked_nodes.insert("core"); - for (auto&& depend : cluster.edges["core"].dashed) + cluster.to_install_features.insert("core"); + for (auto&& depend : cluster.edges["core"].build_edges) { auto& depend_cluster = pkg_to_cluster[depend.spec]; mark_plus(depend.feature_name, depend_cluster, pkg_to_cluster, graph_plan); @@ -417,7 +419,7 @@ namespace vcpkg::Dependencies } } - for (auto&& depend : cluster.edges[updated_feature].dashed) + for (auto&& depend : cluster.edges[updated_feature].build_edges) { auto& depend_cluster = pkg_to_cluster[depend.spec]; mark_plus(depend.feature_name, depend_cluster, pkg_to_cluster, graph_plan); @@ -429,28 +431,27 @@ namespace vcpkg::Dependencies void mark_minus(Cluster& cluster, std::unordered_map& pkg_to_cluster, GraphPlan& graph_plan) { - if (cluster.minus) return; - cluster.minus = true; + if (cluster.will_remove) return; + cluster.will_remove = true; graph_plan.remove_graph.add_vertex(&cluster); for (auto&& pair : cluster.edges) { - auto& dotted_edges = pair.second.dotted; - for (auto&& depend : dotted_edges) + auto& remove_edges_edges = pair.second.remove_edges; + for (auto&& depend : remove_edges_edges) { auto& depend_cluster = pkg_to_cluster[depend.spec]; graph_plan.remove_graph.add_edge(&cluster, &depend_cluster); - depend_cluster.zero = true; + depend_cluster.transient_uninstalled = true; mark_minus(depend_cluster, pkg_to_cluster, graph_plan); } } - for (auto&& original_feature : cluster.original_nodes) + for (auto&& original_feature : cluster.original_features) { - cluster.zero = true; + cluster.transient_uninstalled = true; mark_plus(original_feature, cluster, pkg_to_cluster, graph_plan); } } - std::vector create_feature_install_plan(const std::unordered_map& map, const std::vector& specs, const StatusParagraphs& status_db) @@ -468,17 +469,17 @@ namespace vcpkg::Dependencies { Cluster& node = pkg_spec_to_package_node[it.first]; FeatureNodeEdges core_dependencies; - core_dependencies.dashed = + core_dependencies.build_edges = to_feature_specs(filter_dependencies(it.second.core_paragraph->depends, triplet), str_to_spec); node.edges["core"] = std::move(core_dependencies); for (const auto& feature : it.second.feature_paragraphs) { FeatureNodeEdges added_edges; - added_edges.dashed = to_feature_specs(filter_dependencies(feature->depends, triplet), str_to_spec); + added_edges.build_edges = to_feature_specs(filter_dependencies(feature->depends, triplet), str_to_spec); node.edges.emplace(feature->name, std::move(added_edges)); } - node.cluster_node.source_paragraph = &it.second; + node.cluster_data.source_paragraph = &it.second; } for (auto&& status_paragraph : status_db) @@ -487,7 +488,7 @@ namespace vcpkg::Dependencies auto& status_paragraph_feature = status_paragraph->package.feature; Cluster& cluster = pkg_spec_to_package_node[spec]; - cluster.zero = false; + cluster.transient_uninstalled = false; auto reverse_edges = to_feature_specs(status_paragraph->package.depends, str_to_spec); for (auto&& dependency : reverse_edges) @@ -499,21 +500,21 @@ namespace vcpkg::Dependencies for (auto&& default_feature : status_paragraph->package.default_features) { auto& target_node = pkg_node->second.edges[default_feature]; - target_node.dotted.emplace_back(FeatureSpec{spec, status_paragraph_feature}); + target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); } depends_name = "core"; } auto& target_node = pkg_node->second.edges[depends_name]; - target_node.dotted.emplace_back(FeatureSpec{spec, status_paragraph_feature}); + target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); } - cluster.cluster_node.status_paragraphs.emplace_back(*status_paragraph); + cluster.cluster_data.status_paragraphs.emplace_back(*status_paragraph); if (status_paragraph_feature == "") { - cluster.original_nodes.insert("core"); + cluster.original_features.insert("core"); } else { - cluster.original_nodes.insert(status_paragraph_feature); + cluster.original_features.insert(status_paragraph_feature); } } @@ -539,7 +540,7 @@ namespace vcpkg::Dependencies for (auto&& cluster : remove_toposort) { - auto scf = *cluster->cluster_node.source_paragraph.get(); + auto scf = *cluster->cluster_data.source_paragraph.get(); AnyAction any_plan; any_plan.remove_plan = RemovePlanAction{ @@ -550,12 +551,12 @@ namespace vcpkg::Dependencies for (auto&& cluster : insert_toposort) { - if (!cluster->zero) continue; + if (!cluster->transient_uninstalled) continue; - auto scf = *cluster->cluster_node.source_paragraph.get(); + auto scf = *cluster->cluster_data.source_paragraph.get(); auto& pkg_spec = str_to_spec[scf->core_paragraph->name]; auto action = InstallPlanAction{ - pkg_spec, map.find(pkg_spec)->second, cluster->tracked_nodes, RequestType::AUTO_SELECTED}; + pkg_spec, map.find(pkg_spec)->second, cluster->to_install_features, RequestType::AUTO_SELECTED}; AnyAction any_plan; any_plan.install_plan = std::move(action); -- cgit v1.2.3 From 5df9e1db7f73385bc64b9da6d1c46c33b10247e1 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 20 Jul 2017 09:14:15 +0900 Subject: Update PCL 1.8.1 RC2 Update PCL 1.8.1 RC2 --- ports/pcl/CONTROL | 2 +- ports/pcl/config.patch | 4 ++-- ports/pcl/portfile.cmake | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index 1c7c8e7f2..f13403e9a 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,4 +1,4 @@ Source: pcl -Version: 1.8.1rc1-1 +Version: 1.8.1rc2 Build-Depends: boost, eigen3, flann, qhull, vtk, openni2, qt5 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. diff --git a/ports/pcl/config.patch b/ports/pcl/config.patch index e3df7cd18..d95f89dac 100644 --- a/ports/pcl/config.patch +++ b/ports/pcl/config.patch @@ -1,5 +1,5 @@ diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in -index f3089dfec..67ba5297c 100644 +index f4ef6a0ff..63c01c6d2 100644 --- a/PCLConfig.cmake.in +++ b/PCLConfig.cmake.in @@ -155,7 +155,7 @@ macro(find_qhull) @@ -27,7 +27,7 @@ index f3089dfec..67ba5297c 100644 + get_filename_component(PCL_ROOT "${PCL_ROOT}" PATH) else(WIN32 AND NOT MINGW) # PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y - set(PCL_ROOT "@CMAKE_INSTALL_PREFIX@") + get_filename_component(PCL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) @@ -725,7 +726,7 @@ if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl # Found a PCL installation # pcl_message("Found a PCL installation") diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index 193a051a5..7997ca300 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -15,8 +15,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO PointCloudLibrary/pcl - REF pcl-1.8.1rc1 - SHA512 c719f7ff8cc5be3cfb5f01c89727e94858ed0cf5d50e2b884599e4a5b289564b4e2843979406b62adee1f2cee7332195dcd6219e99accef5700f3119758eb53f + REF pcl-1.8.1rc2 + SHA512 e5bf069f0eacfaf068b37cb0d17bed65a83dddc30c0eaa2ef70bbc534ab1cfc690e581913cd39df6246ba73b5f76fb229d90e0c5b4971744f341f7d2abb57229 HEAD_REF master ) @@ -43,8 +43,8 @@ vcpkg_configure_cmake( -DBUILD_surface_on_nurbs=ON -DBUILD_tools=OFF # PCL - -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=ON - -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=ON + -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${CRT_LINKAGE} + -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${CRT_LINKAGE} -DPCL_SHARED_LIBS=${CRT_LINKAGE} # WITH -DWITH_CUDA=OFF -- cgit v1.2.3 From 4c7f0d0c59083c207b6f3d1bb4528b822f83e126 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Wed, 19 Jul 2017 18:12:19 -0700 Subject: upgrade assimp to 4.0.0, fix cmake error for down stream project --- ports/assimp/CONTROL | 2 +- ports/assimp/portfile.cmake | 39 ++++++++++++++++++++------------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index 2c4736563..2e2b88692 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 3.3.1 +Version: 4.0.0 Description: The Open Asset import library Build-Depends: zlib diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 452233265..0da9cc2a8 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -1,19 +1,12 @@ -# 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) -SET(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/assimp-3.3.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/assimp/assimp/archive/v3.3.1.zip" - FILENAME "assimp-3.3.1.zip" - SHA512 d8488702989629a80297b9aea1f91fd5f3d0736f91cc5d7991a41ade99a445e9897c752fbedb2829350fabb5439d4ea31d34bbedb771b3e66aef23cd40b02122 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO assimp/assimp + REF v4.0.0 + SHA512 ab2b376c6323fc8579fe3a4b3dbe92c44d753747464a14d6e2be70d2a855c208df882ad84487a7b96f364afb175938b5f6a1111d767450b01e0b8b7f0f36ba62 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -21,20 +14,28 @@ vcpkg_configure_cmake( -DASSIMP_BUILD_ASSIMP_VIEW=False -DASSIMP_BUILD_ZLIB=False -DASSIMP_BUILD_ASSIMP_TOOLS=False - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/assimp-4.0") + +vcpkg_copy_pdbs() + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/assimp-3.3 ${CURRENT_PACKAGES_DIR}/share/assimp) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +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}) +string(REPLACE "assimp\${ASSIMP_LIBRARY_SUFFIX}" + "assimp\${ASSIMP_LIBRARY_SUFFIX}.lib" ASSIMP_CONFIG ${ASSIMP_CONFIG}) +string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})" + "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES})" ASSIMP_CONFIG ${ASSIMP_CONFIG}) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake "${ASSIMP_CONFIG}") + # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/assimp) file(RENAME ${CURRENT_PACKAGES_DIR}/share/assimp/LICENSE ${CURRENT_PACKAGES_DIR}/share/assimp/copyright) - -vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 2ff2c1562a797cc0d43f27ea6e078fb8316073f6 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Fri, 30 Jun 2017 18:44:23 +0300 Subject: [theia] Initial commit --- ports/theia/CONTROL | 4 + ports/theia/fix-cmakelists.patch | 310 +++++++++++++++++++++++++++++++++ ports/theia/fix-find-suitesparse.patch | 227 ++++++++++++++++++++++++ ports/theia/fix-glog-error.patch | 12 ++ ports/theia/fix-vlfeat-static.patch | 49 ++++++ ports/theia/portfile.cmake | 58 ++++++ 6 files changed, 660 insertions(+) create mode 100644 ports/theia/CONTROL create mode 100644 ports/theia/fix-cmakelists.patch create mode 100644 ports/theia/fix-find-suitesparse.patch create mode 100644 ports/theia/fix-glog-error.patch create mode 100644 ports/theia/fix-vlfeat-static.patch create mode 100644 ports/theia/portfile.cmake diff --git a/ports/theia/CONTROL b/ports/theia/CONTROL new file mode 100644 index 000000000..554009d2d --- /dev/null +++ b/ports/theia/CONTROL @@ -0,0 +1,4 @@ +Source: theia +Version: 0.7-d15154a +Build-Depends: flann, cereal, ceres, openimageio, glew, freeglut +Description: An open source library for multiview geometry and structure from motion \ No newline at end of file diff --git a/ports/theia/fix-cmakelists.patch b/ports/theia/fix-cmakelists.patch new file mode 100644 index 000000000..674543c68 --- /dev/null +++ b/ports/theia/fix-cmakelists.patch @@ -0,0 +1,310 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9c1b150..367fbbc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -218,24 +218,71 @@ include_directories( + # as system headers. + include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) + ++ ++set(THEIA_USE_EXTERNAL_CEREAL OFF CACHE BOOL "Use a system Cereal library") ++set(THEIA_USE_EXTERNAL_FLANN OFF CACHE BOOL "Use a system Flann library") ++ + # build Third party libraries included in distro. +-add_subdirectory(libraries) +-include_directories( +- libraries +- libraries/spectra +- ${akaze_SOURCE_DIR} +- ${akaze_INCLUDE_DIR} +- ${cereal_SOURCE_DIR} +- ${cereal_SOURCE_DIR}/include +- ${flann_SOURCE_DIR} +- ${flann_SOURCE_DIR}/src/cpp +- ${gtest_SOURCE_DIR}/include +- ${gtest_SOURCE_DIR} +- ${optimo_SOURCE_DIR} +- ${statx_SOURCE_DIR} +- ${stlplus3_SOURCE_DIR} +- ${vlfeat_SOURCE_DIR} +- ${visual_sfm_SOURCE_DIR}) ++if (BUILD_TESTING) ++ add_subdirectory(libraries/gtest) ++endif (BUILD_TESTING) ++ ++# AKAZE feature extractor. ++add_subdirectory(libraries/akaze) ++ ++include_directories(${akaze_SOURCE_DIR} ${akaze_INCLUDE_DIR}) ++ ++# Cereal for portable IO. ++if(NOT THEIA_USE_EXTERNAL_CEREAL) ++ add_subdirectory(libraries/cereal) ++ ++ include_directories(${cereal_SOURCE_DIR} ${cereal_SOURCE_DIR}/include) ++ set(THEIA_INTERNAL_CEREAL_LIB ${THEIA_INTERNAL_LIB_PREFIX}/cereal ${THEIA_INTERNAL_LIB_PREFIX}/cereal/include) ++else() ++ find_package(cereal REQUIRED) ++ ++ set(_THEIA_CEREAL_LIBRARIES cereal) ++endif() ++ ++# Flann for fast approximate nearest neighbor searches. ++if(NOT THEIA_USE_EXTERNAL_FLANN) ++ add_subdirectory(libraries/flann) ++ ++ include_directories(${flann_SOURCE_DIR} ${flann_SOURCE_DIR}/src/cpp) ++ set(_THEIA_FLANN_LIBRARIES flann_cpp) ++ set(THEIA_INTERNAL_FLANN_LIB ${THEIA_INTERNAL_LIB_PREFIX}/flann) ++else() ++ find_package(Flann REQUIRED) ++ ++ include_directories(${FLANN_INCLUDE_DIR}) ++ set(_THEIA_FLANN_LIBRARIES ${FLANN_LIBRARY}) ++endif() ++ ++# Add Optimo. ++add_subdirectory(libraries/optimo) ++include_directories(${optimo_SOURCE_DIR}) ++ ++# Add Spectra. ++include_directories(libraries/spectra) ++ ++# Add Statx. ++add_subdirectory(libraries/statx) ++include_directories(${statx_SOURCE_DIR}) ++ ++# STLPlus for filepath tools. ++add_subdirectory(libraries/stlplus3) ++include_directories(${stlplus3_SOURCE_DIR}) ++ ++# Add VLFeat. ++add_subdirectory(libraries/vlfeat) ++include_directories(${vlfeat_SOURCE_DIR}) ++ ++# Add VisualSfM files. ++add_subdirectory(libraries/visual_sfm) ++include_directories(${visual_sfm_SOURCE_DIR}) ++ ++include_directories(libraries) ++ + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") + include(OptimizeTheiaCompilerFlags) +@@ -260,7 +307,19 @@ install(FILES ${THEIA_HDRS} DESTINATION include/theia) + file(GLOB_RECURSE THEIA_INTERNAL_HDRS ${CMAKE_SOURCE_DIR}/src/theia/*.h) + install(DIRECTORY src/theia/ DESTINATION include/theia FILES_MATCHING PATTERN "*.h") + +-install(DIRECTORY libraries/ DESTINATION include/theia/libraries FILES_MATCHING PATTERN "*.h*") ++install(DIRECTORY libraries/akaze/ DESTINATION include/theia/libraries/akaze FILES_MATCHING PATTERN "*.h*") ++if(NOT THEIA_USE_EXTERNAL_CEREAL) ++ install(DIRECTORY libraries/cereal/ DESTINATION include/theia/libraries/cereal FILES_MATCHING PATTERN "*.h*") ++endif() ++if(NOT THEIA_USE_EXTERNAL_FLANN) ++ install(DIRECTORY libraries/flann/ DESTINATION include/theia/libraries/flann FILES_MATCHING PATTERN "*.h*") ++endif() ++install(DIRECTORY libraries/optimo/ DESTINATION include/theia/libraries/optimo FILES_MATCHING PATTERN "*.h*") ++install(DIRECTORY libraries/spectra/ DESTINATION include/theia/libraries/spectra FILES_MATCHING PATTERN "*.h*") ++install(DIRECTORY libraries/statx/ DESTINATION include/theia/libraries/statx FILES_MATCHING PATTERN "*.h*") ++install(DIRECTORY libraries/stlplus3/ DESTINATION include/theia/libraries/stlplus3 FILES_MATCHING PATTERN "*.h*") ++install(DIRECTORY libraries/visual_sfm/ DESTINATION include/theia/libraries/visual_sfm FILES_MATCHING PATTERN "*.h*") ++install(DIRECTORY libraries/vlfeat/ DESTINATION include/theia/libraries/vlfeat FILES_MATCHING PATTERN "*.h*") + + # Add an uninstall target to remove all installed files. + configure_file("${CMAKE_SOURCE_DIR}/cmake/uninstall.cmake.in" +@@ -320,8 +379,9 @@ configure_file("${CMAKE_SOURCE_DIR}/cmake/TheiaConfigVersion.cmake.in" + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/TheiaConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/TheiaConfigVersion.cmake" + "${CMAKE_SOURCE_DIR}/cmake/FindEigen.cmake" +- "${CMAKE_SOURCE_DIR}/cmake/FindGlog.cmake" ++ "${CMAKE_SOURCE_DIR}/cmake/FindFlann.cmake" + "${CMAKE_SOURCE_DIR}/cmake/FindGflags.cmake" +- "${CMAKE_SOURCE_DIR}/cmake/FindOpenImageIO.cmake" ++ "${CMAKE_SOURCE_DIR}/cmake/FindGlog.cmake" ++ "${CMAKE_SOURCE_DIR}/cmake/FindOpenImageIO.cmake" + "${CMAKE_SOURCE_DIR}/cmake/FindSuiteSparse.cmake" + DESTINATION ${CMAKECONFIG_INSTALL_DIR}) +diff --git a/cmake/FindFlann.cmake b/cmake/FindFlann.cmake +new file mode 100644 +index 0000000..5d19ef7 +--- /dev/null ++++ b/cmake/FindFlann.cmake +@@ -0,0 +1,63 @@ ++############################################################################### ++# Find FLANN ++# ++# This sets the following variables: ++# FLANN_FOUND - True if FLANN was found. ++# FLANN_INCLUDE_DIRS - Directories containing the FLANN include files. ++# FLANN_LIBRARIES - Libraries needed to use FLANN. ++# FLANN_DEFINITIONS - Compiler flags for FLANN. ++# If FLANN_USE_STATIC is specified and then look for static libraries ONLY else ++# look for shared ones ++ ++if(FLANN_USE_STATIC) ++ set(FLANN_RELEASE_NAME flann_cpp_s flann_cpp) ++ set(FLANN_DEBUG_NAME flann_cpp_s-gd flann_cpp-gd) ++else(FLANN_USE_STATIC) ++ set(FLANN_RELEASE_NAME flann_cpp) ++ set(FLANN_DEBUG_NAME flann_cpp-gd) ++endif(FLANN_USE_STATIC) ++ ++find_package(PkgConfig QUIET) ++if (FLANN_FIND_VERSION) ++ pkg_check_modules(PC_FLANN flann>=${FLANN_FIND_VERSION}) ++else(FLANN_FIND_VERSION) ++ pkg_check_modules(PC_FLANN flann) ++endif(FLANN_FIND_VERSION) ++ ++set(FLANN_DEFINITIONS ${PC_FLANN_CFLAGS_OTHER}) ++ ++find_path(FLANN_INCLUDE_DIR flann/flann.hpp ++ HINTS ${PC_FLANN_INCLUDEDIR} ${PC_FLANN_INCLUDE_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}" ++ PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann" ++ PATH_SUFFIXES include) ++ ++find_library(FLANN_LIBRARY ++ NAMES ${FLANN_RELEASE_NAME} ++ HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}" ++ PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann" ++ PATH_SUFFIXES lib) ++ ++find_library(FLANN_LIBRARY_DEBUG ++ NAMES ${FLANN_DEBUG_NAME} ${FLANN_RELEASE_NAME} ++ HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}" ++ PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann" ++ PATH_SUFFIXES lib) ++ ++if(NOT FLANN_LIBRARY_DEBUG) ++ set(FLANN_LIBRARY_DEBUG ${FLANN_LIBRARY}) ++endif(NOT FLANN_LIBRARY_DEBUG) ++ ++set(FLANN_INCLUDE_DIRS ${FLANN_INCLUDE_DIR}) ++set(FLANN_LIBRARIES optimized ${FLANN_LIBRARY} debug ${FLANN_LIBRARY_DEBUG}) ++ ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(FLANN DEFAULT_MSG FLANN_LIBRARY FLANN_INCLUDE_DIR) ++ ++mark_as_advanced(FLANN_LIBRARY FLANN_LIBRARY_DEBUG FLANN_INCLUDE_DIR) ++ ++if(FLANN_FOUND) ++ message(STATUS "Flann found (include: ${FLANN_INCLUDE_DIRS}, lib: ${FLANN_LIBRARIES})") ++ if(FLANN_USE_STATIC) ++ add_definitions(-DFLANN_STATIC) ++ endif(FLANN_USE_STATIC) ++endif(FLANN_FOUND) +diff --git a/cmake/TheiaConfig.cmake.in b/cmake/TheiaConfig.cmake.in +index a3ea187..9195da1 100644 +--- a/cmake/TheiaConfig.cmake.in ++++ b/cmake/TheiaConfig.cmake.in +@@ -207,22 +207,47 @@ endif (NOT TARGET theia AND NOT Theia_BINARY_DIR) + # Set the expected XX_LIBRARIES variable for FindPackage(). + set(THEIA_LIBRARIES theia) + ++set(THEIA_USE_EXTERNAL_CEREAL @THEIA_USE_EXTERNAL_CEREAL@) ++set(THEIA_USE_EXTERNAL_FLANN @THEIA_USE_EXTERNAL_FLANN@) ++ ++# Cereal. ++if (THEIA_USE_EXTERNAL_CEREAL) ++ find_package(cereal QUIET) ++ if (TARGET cereal) ++ message(STATUS "Found required Theia dependency: Cereal") ++ else (TARGET cereal) ++ theia_report_not_found("Missing required Theia dependency: Cereal.") ++ endif (TARGET cereal) ++ list(APPEND THEIA_LIBRARIES cereal) ++endif (THEIA_USE_EXTERNAL_CEREAL) ++ ++# Flann. ++if (THEIA_USE_EXTERNAL_FLANN) ++ find_package(Flann QUIET) ++ if (FLANN_FOUND) ++ message(STATUS "Found required Theia dependency: Flann") ++ else (FLANN_FOUND) ++ theia_report_not_found("Missing required Theia dependency: Flann.") ++ endif (FLANN_FOUND) ++ list(APPEND THEIA_INCLUDE_DIRS ${FLANN_INCLUDE_DIR}) ++ list(APPEND THEIA_LIBRARIES ${FLANN_LIBRARY}) ++endif (THEIA_USE_EXTERNAL_FLANN) ++ + # Add the libraries included with the distribution. + set(THEIA_INTERNAL_LIB_PREFIX ${THEIA_INCLUDE_DIR}/theia/libraries) + set(THEIA_INTERNAL_LIBS_INCLUDES + ${THEIA_INTERNAL_LIB_PREFIX} + ${THEIA_INTERNAL_LIB_PREFIX}/akaze +- ${THEIA_INTERNAL_LIB_PREFIX}/cereal +- ${THEIA_INTERNAL_LIB_PREFIX}/cereal/include +- ${THEIA_INTERNAL_LIB_PREFIX}/flann ++ @THEIA_INTERNAL_CEREAL_LIB@ ++ @THEIA_INTERNAL_FLANN_LIB@ + ${THEIA_INTERNAL_LIB_PREFIX}/gtest + ${THEIA_INTERNAL_LIB_PREFIX}/gtest/include + ${THEIA_INTERNAL_LIB_PREFIX}/optimo + ${THEIA_INTERNAL_LIB_PREFIX}/spectra + ${THEIA_INTERNAL_LIB_PREFIX}/statx + ${THEIA_INTERNAL_LIB_PREFIX}/stlplus3 +- ${THEIA_INTERNAL_LIB_PREFIX}/vlfeat +- ${THEIA_INTERNAL_LIB_PREFIX}/visual_sfm) ++ ${THEIA_INTERNAL_LIB_PREFIX}/visual_sfm ++ ${THEIA_INTERNAL_LIB_PREFIX}/vlfeat) + + list(APPEND THEIA_INCLUDE_DIRS ${THEIA_INTERNAL_LIBS_INCLUDES}) + +diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt +deleted file mode 100644 +index 84f3829..0000000 +--- a/libraries/CMakeLists.txt ++++ /dev/null +@@ -1,27 +0,0 @@ +-if (${BUILD_TESTING}) +- add_subdirectory(gtest) +-endif (${BUILD_TESTING}) +- +-# AKAZE feature extractor. +-add_subdirectory(akaze) +- +-# Cereal for portable IO. +-add_subdirectory(cereal) +- +-# Flann for fast approximate nearest neighbor searches. +-add_subdirectory(flann) +- +-# Add Optimo. +-add_subdirectory(optimo) +- +-# Add Statx. +-add_subdirectory(statx) +- +-# STLPlus for filepath tools. +-add_subdirectory(stlplus3) +- +-# Add VLFeat. +-add_subdirectory(vlfeat) +- +-# Add VisualSfM files. +-add_subdirectory(visual_sfm) +\ No newline at end of file +diff --git a/src/theia/CMakeLists.txt b/src/theia/CMakeLists.txt +index 65787eb..07c54a4 100644 +--- a/src/theia/CMakeLists.txt ++++ b/src/theia/CMakeLists.txt +@@ -174,14 +174,15 @@ set(THEIA_LIBRARY_DEPENDENCIES + ${CERES_LIBRARIES} + ${GFLAGS_LIBRARIES} + ${GLOG_LIBRARIES} +- ${SUITESPARSE_LIBRARIES} + ${OPENIMAGEIO_LIBRARIES} ++ ${SUITESPARSE_LIBRARIES} ++ ${_THEIA_CEREAL_LIBRARIES} ++ ${_THEIA_FLANN_LIBRARIES} + akaze +- flann_cpp + statx + stlplus3 +- vlfeat +- visual_sfm) ++ visual_sfm ++ vlfeat) + + set(THEIA_LIBRARY_SOURCE + ${THEIA_SRC} diff --git a/ports/theia/fix-find-suitesparse.patch b/ports/theia/fix-find-suitesparse.patch new file mode 100644 index 000000000..f7de44aa0 --- /dev/null +++ b/ports/theia/fix-find-suitesparse.patch @@ -0,0 +1,227 @@ +--- a/cmake/FindSuiteSparse.cmake Mon Feb 06 18:05:05 2017 ++++ b/cmake/FindSuiteSparse.cmake Fri Jul 07 02:13:31 2017 +@@ -152,6 +152,12 @@ + # the first. + endmacro(SUITESPARSE_REPORT_NOT_FOUND) + ++# Protect against any alternative find_package scripts for this library having ++# been called previously (in a client project) which set SUITESPARSE_FOUND, but ++# not the other variables we require / set here which could cause the search ++# logic here to fail. ++unset(SUITESPARSE_FOUND) ++ + # Handle possible presence of lib prefix for libraries on MSVC, see + # also SUITESPARSE_RESET_FIND_LIBRARY_PREFIX(). + if (MSVC) +@@ -173,8 +179,6 @@ + /opt/local/include/ufsparse # Mac OS X + /usr/local/homebrew/include # Mac OS X + /usr/local/include +- /usr/local/include/suitesparse +- /usr/include/suitesparse # Ubuntu + /usr/include) + list(APPEND SUITESPARSE_CHECK_LIBRARY_DIRS + ${SUITESPARSE_LIBRARY_DIR_HINTS} +@@ -182,9 +186,10 @@ + /opt/local/lib/ufsparse # Mac OS X + /usr/local/homebrew/lib # Mac OS X + /usr/local/lib +- /usr/local/lib/suitesparse +- /usr/lib/suitesparse # Ubuntu + /usr/lib) ++# Additional suffixes to try appending to each search path. ++list(APPEND SUITESPARSE_CHECK_PATH_SUFFIXES ++ suitesparse) # Windows/Ubuntu + + # Given the number of components of SuiteSparse, and to ensure that the + # automatic failure message generated by FindPackageHandleStandardArgs() +@@ -212,7 +217,8 @@ + set(AMD_FOUND TRUE) + list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS AMD_FOUND) + find_library(AMD_LIBRARY NAMES amd +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${AMD_LIBRARY}) + message(STATUS "Found AMD library: ${AMD_LIBRARY}") + else (EXISTS ${AMD_LIBRARY}) +@@ -223,7 +229,8 @@ + mark_as_advanced(AMD_LIBRARY) + + find_path(AMD_INCLUDE_DIR NAMES amd.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${AMD_INCLUDE_DIR}) + message(STATUS "Found AMD header in: ${AMD_INCLUDE_DIR}") + else (EXISTS ${AMD_INCLUDE_DIR}) +@@ -237,7 +244,8 @@ + set(CAMD_FOUND TRUE) + list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS CAMD_FOUND) + find_library(CAMD_LIBRARY NAMES camd +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${CAMD_LIBRARY}) + message(STATUS "Found CAMD library: ${CAMD_LIBRARY}") + else (EXISTS ${CAMD_LIBRARY}) +@@ -248,7 +256,8 @@ + mark_as_advanced(CAMD_LIBRARY) + + find_path(CAMD_INCLUDE_DIR NAMES camd.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${CAMD_INCLUDE_DIR}) + message(STATUS "Found CAMD header in: ${CAMD_INCLUDE_DIR}") + else (EXISTS ${CAMD_INCLUDE_DIR}) +@@ -262,7 +271,8 @@ + set(COLAMD_FOUND TRUE) + list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS COLAMD_FOUND) + find_library(COLAMD_LIBRARY NAMES colamd +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${COLAMD_LIBRARY}) + message(STATUS "Found COLAMD library: ${COLAMD_LIBRARY}") + else (EXISTS ${COLAMD_LIBRARY}) +@@ -273,7 +283,8 @@ + mark_as_advanced(COLAMD_LIBRARY) + + find_path(COLAMD_INCLUDE_DIR NAMES colamd.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${COLAMD_INCLUDE_DIR}) + message(STATUS "Found COLAMD header in: ${COLAMD_INCLUDE_DIR}") + else (EXISTS ${COLAMD_INCLUDE_DIR}) +@@ -287,7 +298,8 @@ + set(CCOLAMD_FOUND TRUE) + list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS CCOLAMD_FOUND) + find_library(CCOLAMD_LIBRARY NAMES ccolamd +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${CCOLAMD_LIBRARY}) + message(STATUS "Found CCOLAMD library: ${CCOLAMD_LIBRARY}") + else (EXISTS ${CCOLAMD_LIBRARY}) +@@ -298,7 +310,8 @@ + mark_as_advanced(CCOLAMD_LIBRARY) + + find_path(CCOLAMD_INCLUDE_DIR NAMES ccolamd.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${CCOLAMD_INCLUDE_DIR}) + message(STATUS "Found CCOLAMD header in: ${CCOLAMD_INCLUDE_DIR}") + else (EXISTS ${CCOLAMD_INCLUDE_DIR}) +@@ -312,7 +325,8 @@ + set(CHOLMOD_FOUND TRUE) + list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS CHOLMOD_FOUND) + find_library(CHOLMOD_LIBRARY NAMES cholmod +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${CHOLMOD_LIBRARY}) + message(STATUS "Found CHOLMOD library: ${CHOLMOD_LIBRARY}") + else (EXISTS ${CHOLMOD_LIBRARY}) +@@ -323,7 +337,8 @@ + mark_as_advanced(CHOLMOD_LIBRARY) + + find_path(CHOLMOD_INCLUDE_DIR NAMES cholmod.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${CHOLMOD_INCLUDE_DIR}) + message(STATUS "Found CHOLMOD header in: ${CHOLMOD_INCLUDE_DIR}") + else (EXISTS ${CHOLMOD_INCLUDE_DIR}) +@@ -337,7 +352,8 @@ + set(SUITESPARSEQR_FOUND TRUE) + list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS SUITESPARSEQR_FOUND) + find_library(SUITESPARSEQR_LIBRARY NAMES spqr +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${SUITESPARSEQR_LIBRARY}) + message(STATUS "Found SuiteSparseQR library: ${SUITESPARSEQR_LIBRARY}") + else (EXISTS ${SUITESPARSEQR_LIBRARY}) +@@ -348,7 +364,8 @@ + mark_as_advanced(SUITESPARSEQR_LIBRARY) + + find_path(SUITESPARSEQR_INCLUDE_DIR NAMES SuiteSparseQR.hpp +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${SUITESPARSEQR_INCLUDE_DIR}) + message(STATUS "Found SuiteSparseQR header in: ${SUITESPARSEQR_INCLUDE_DIR}") + else (EXISTS ${SUITESPARSEQR_INCLUDE_DIR}) +@@ -364,7 +381,8 @@ + # support for it, this will do no harm if it wasn't. + set(TBB_FOUND TRUE) + find_library(TBB_LIBRARIES NAMES tbb +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${TBB_LIBRARIES}) + message(STATUS "Found Intel Thread Building Blocks (TBB) library: " + "${TBB_LIBRARIES}, assuming SuiteSparseQR was compiled with TBB.") +@@ -377,7 +395,8 @@ + + if (TBB_FOUND) + find_library(TBB_MALLOC_LIB NAMES tbbmalloc +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${TBB_MALLOC_LIB}) + message(STATUS "Found Intel Thread Building Blocks (TBB) Malloc library: " + "${TBB_MALLOC_LIB}") +@@ -407,7 +426,8 @@ + # If SuiteSparse version is >= 4 then SuiteSparse_config is required. + # For SuiteSparse 3, UFconfig.h is required. + find_library(SUITESPARSE_CONFIG_LIBRARY NAMES suitesparseconfig +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${SUITESPARSE_CONFIG_LIBRARY}) + message(STATUS "Found SuiteSparse_config library: " + "${SUITESPARSE_CONFIG_LIBRARY}") +@@ -415,7 +435,8 @@ + mark_as_advanced(SUITESPARSE_CONFIG_LIBRARY) + + find_path(SUITESPARSE_CONFIG_INCLUDE_DIR NAMES SuiteSparse_config.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${SUITESPARSE_CONFIG_INCLUDE_DIR}) + message(STATUS "Found SuiteSparse_config header in: " + "${SUITESPARSE_CONFIG_INCLUDE_DIR}") +@@ -433,7 +454,8 @@ + # does not have librt). + if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR UNIX AND NOT APPLE) + find_library(LIBRT_LIBRARY NAMES rt +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (LIBRT_LIBRARY) + message(STATUS "Adding librt: ${LIBRT_LIBRARY} to " + "SuiteSparse_config libraries (required on Linux & Unix [not OSX] if " +@@ -452,7 +474,8 @@ + # UFconfig header which should be present in < v4 installs. + set(SUITESPARSE_CONFIG_FOUND FALSE) + find_path(UFCONFIG_INCLUDE_DIR NAMES UFconfig.h +- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${UFCONFIG_INCLUDE_DIR}) + message(STATUS "Found UFconfig header in: ${UFCONFIG_INCLUDE_DIR}") + set(UFCONFIG_FOUND TRUE) +@@ -543,7 +566,8 @@ + + # METIS (Optional dependency). + find_library(METIS_LIBRARY NAMES metis +- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) ++ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} ++ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) + if (EXISTS ${METIS_LIBRARY}) + message(STATUS "Found METIS library: ${METIS_LIBRARY}.") + set(METIS_FOUND TRUE) diff --git a/ports/theia/fix-glog-error.patch b/ports/theia/fix-glog-error.patch new file mode 100644 index 000000000..1e72c9f35 --- /dev/null +++ b/ports/theia/fix-glog-error.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9c1b150..6518e6a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -146,6 +146,7 @@ else (GLOG_FOUND) + message(FATAL_ERROR "Can't find Google Logging. Please set GLOG_INCLUDE_DIR & " + "GLOG_LIBRARY") + endif (GLOG_FOUND) ++add_definitions(-DGLOG_NO_ABBREVIATED_SEVERITIES) + + # Ceres + message("-- Check for Ceres") diff --git a/ports/theia/fix-vlfeat-static.patch b/ports/theia/fix-vlfeat-static.patch new file mode 100644 index 000000000..cbade039f --- /dev/null +++ b/ports/theia/fix-vlfeat-static.patch @@ -0,0 +1,49 @@ +diff --git a/libraries/vlfeat/CMakeLists.txt b/libraries/vlfeat/CMakeLists.txt +index d248bcf..24469c9 100644 +--- a/libraries/vlfeat/CMakeLists.txt ++++ b/libraries/vlfeat/CMakeLists.txt +@@ -16,11 +16,11 @@ set(vl_sources + set_source_files_properties(${vl_sources} PROPERTIES LANGUAGE C) + + if (MSVC) +- add_definitions(-DVL_BUILD_DLL) ++ #add_definitions(-DVL_BUILD_DLL) + add_definitions(-DVL_DISABLE_SSE2) + endif (MSVC) + +-add_library(vlfeat SHARED ${vl_sources}) ++add_library(vlfeat ${vl_sources}) + install(TARGETS vlfeat + EXPORT TheiaExport + RUNTIME DESTINATION bin +diff --git a/libraries/vlfeat/vl/host.h b/libraries/vlfeat/vl/host.h +index 4fdb86c..01c1134 100644 +--- a/libraries/vlfeat/vl/host.h ++++ b/libraries/vlfeat/vl/host.h +@@ -316,18 +316,24 @@ defined(__DOXYGEN__) + # define snprintf _snprintf + # define isnan _isnan + #endif +-# ifdef VL_BUILD_DLL ++# if defined(VL_BUILD_DLL) + # ifdef __cplusplus + # define VL_EXPORT extern "C" __declspec(dllexport) + # else + # define VL_EXPORT extern __declspec(dllexport) + # endif +-# else ++# elif defined(VL_DLL) + # ifdef __cplusplus + # define VL_EXPORT extern "C" __declspec(dllimport) + # else + # define VL_EXPORT extern __declspec(dllimport) + # endif ++# else ++# ifdef __cplusplus ++# define VL_EXPORT extern "C" ++# else ++# define VL_EXPORT extern ++# endif + # endif + #endif + diff --git a/ports/theia/portfile.cmake b/ports/theia/portfile.cmake new file mode 100644 index 000000000..a45089225 --- /dev/null +++ b/ports/theia/portfile.cmake @@ -0,0 +1,58 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sweeneychris/TheiaSfM + REF d15154a6c30ea48e7d135be126e2936802e476ad + SHA512 e3cb29b1806b6d2ed161c28432ad8788f756e03db55f883bfa2c4b389b506aa46909f0de57460e93e38926d8103382c54f51685bb9035688e4c7378f913c2de0 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-vlfeat-static.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-glog-error.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-find-suitesparse.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_TESTING=OFF + -DTHEIA_USE_EXTERNAL_CEREAL=ON + -DTHEIA_USE_EXTERNAL_FLANN=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + +# Changes target search path +file(READ ${CURRENT_PACKAGES_DIR}/share/theia/TheiaConfig.cmake THEIA_TARGETS) +string(REPLACE "get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${THEIA_CURRENT_CONFIG_INSTALL_DIR}/../ ABSOLUTE)" + "get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${THEIA_CURRENT_CONFIG_INSTALL_DIR}/../../ ABSOLUTE)" THEIA_TARGETS "${THEIA_TARGETS}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/theia/TheiaConfig.cmake "${THEIA_TARGETS}") + +vcpkg_copy_pdbs() + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/optimo) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/theia/libraries/akaze/cimg/cmake-modules) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/theia/libraries/akaze/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/theia/libraries/akaze/datasets) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/theia/libraries/spectra/doxygen) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/optimo) + +# Handle copyright +file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/theia) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/theia/license.txt ${CURRENT_PACKAGES_DIR}/share/theia/copyright) +file(COPY ${SOURCE_PATH}/data/camera_sensor_database_license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/theia) -- cgit v1.2.3 From e8b4006196fd757dc4c49a9fcf3e85239af6d686 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 20 Jul 2017 13:22:38 -0700 Subject: [beast] Update to version 84 --- ports/beast/CONTROL | 2 +- ports/beast/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL index 5c32ec3e1..901846ede 100644 --- a/ports/beast/CONTROL +++ b/ports/beast/CONTROL @@ -1,4 +1,4 @@ Source: beast -Version: v76 +Version: v84 Build-Depends: boost Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake index 3f6b29705..e58c676e6 100644 --- a/ports/beast/portfile.cmake +++ b/ports/beast/portfile.cmake @@ -4,10 +4,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vinniefalco/Beast - REF 1bc30cb6e4ce0fd2e288b2cd74d18f857801cbc7 - SHA512 c3d6b99273c2b2acdd366547119e78c25f788dabfae11f533aea8d31d03383b46516398370103b01e3b9bb0bb3921c981299cd3591107845630181b48e3b010e + REF 32902fad8b7c57be27b96e00ed6ec82748732133 + SHA512 55d1ccff105f997ab7b607528980161baf22aff56109e368a6232f3cfe1fbbf3f060e2b88d68f00728e75b951b60291b8cd6d56a3e299208e6cd757cb53bd774 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/beast RENAME copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/beast RENAME copyright) -- cgit v1.2.3 From f8f6628eecb8d2df9b7262d8d50752c33f8cfc12 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Thu, 20 Jul 2017 16:37:30 -0400 Subject: Let's try making that directory --- ports/allegro5/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index e1f18baaa..626bec45a 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -81,6 +81,7 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/allegro5/LICENSE.txt ${CURRENT_PACKAGE 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() -- cgit v1.2.3 From fb5b310db98dbf5cebe7aceea02efafe88ef839e Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 20 Jul 2017 13:39:09 -0700 Subject: [pystring] init port --- ports/pystring/CMakeLists.txt | 23 +++++++++++++++++++++++ ports/pystring/CONTROL | 3 +++ ports/pystring/portfile.cmake | 22 ++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 ports/pystring/CMakeLists.txt create mode 100644 ports/pystring/CONTROL create mode 100644 ports/pystring/portfile.cmake diff --git a/ports/pystring/CMakeLists.txt b/ports/pystring/CMakeLists.txt new file mode 100644 index 000000000..6fccf78d9 --- /dev/null +++ b/ports/pystring/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.5.1) +project(libpystring C CXX) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +add_library(libpystring pystring.cpp) + +install( + TARGETS libpystring + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES pystring.h DESTINATION include) +endif() diff --git a/ports/pystring/CONTROL b/ports/pystring/CONTROL new file mode 100644 index 000000000..23980ef12 --- /dev/null +++ b/ports/pystring/CONTROL @@ -0,0 +1,3 @@ +Source: pystring +Version: 1.1.3 +Description: Pystring is a collection of C++ functions which match the interface and behavior of python's string class methods using std::string diff --git a/ports/pystring/portfile.cmake b/ports/pystring/portfile.cmake new file mode 100644 index 000000000..d6e9700f8 --- /dev/null +++ b/ports/pystring/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO imageworks/pystring + REF v1.1.3 + SHA512 a46bb2e96d6eb351a4a8097cde46ac2877d28e88f9e57e0ac36c42e8fc8543517c4be70306a01e2f88a891fc53c612494aeb37f47a200d94b8e1b050ed16eff6 + HEAD_REF master +) + +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_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pystring RENAME copyright) -- cgit v1.2.3 From 4f5f505f360fb332f860de2a64f969ebeadaa8f9 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Thu, 20 Jul 2017 17:25:17 -0400 Subject: Let's try vcpkg_from_github --- ports/allegro5/portfile.cmake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 626bec45a..dad86f1b6 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -11,11 +11,12 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-5.2.1.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/liballeg/allegro5/archive/5.2.1.0.zip" - FILENAME "allegro5-5.2.1.0.zip" - SHA512 3271483714699e10d6ec0c0d94491d20d227b5a767d5134b592418bd0838c64d3a6448ba8448d568aeb846a6b50004656507deabb2d82dfe748f4ccc83ba1a53 +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-5.2.3.0) +vcpkg_from_github( + OUT_SOURCE_PATH ${SOURCE_PATH} + REPO liballeg/allegro5 + REF 7d8892a + HEAD_REF master ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 6d64cf15fb528c16223c6868bdceeb47f864d4a1 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Thu, 20 Jul 2017 17:27:26 -0400 Subject: Ah, wait --- ports/allegro5/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index dad86f1b6..3be645c6b 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -16,6 +16,7 @@ vcpkg_from_github( OUT_SOURCE_PATH ${SOURCE_PATH} REPO liballeg/allegro5 REF 7d8892a + SHA512 1 HEAD_REF master ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 65081aa44cbe2c872e2e846a7d90cd5a0d8007f6 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Thu, 20 Jul 2017 17:29:05 -0400 Subject: Fix the SHA512 --- ports/allegro5/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 3be645c6b..c01ea932e 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -16,7 +16,7 @@ vcpkg_from_github( OUT_SOURCE_PATH ${SOURCE_PATH} REPO liballeg/allegro5 REF 7d8892a - SHA512 1 + SHA512 b1531fa2f22023ecd4e053d03d1c54bf0b94aa3af004a3a06245c4d8278fea64e9d354467873ebd665301903d954795fed88e2467c88441f39c273e7e0d87d6e HEAD_REF master ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 9604264ac296dc1eef3ce025f985adb2c0e819da Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Thu, 20 Jul 2017 17:30:33 -0400 Subject: Let's try the hash --- ports/allegro5/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index c01ea932e..b67e150dc 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -11,7 +11,7 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-5.2.3.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-7d8892a) vcpkg_from_github( OUT_SOURCE_PATH ${SOURCE_PATH} REPO liballeg/allegro5 -- cgit v1.2.3 From 69f63b1904a7c106efb678f9dbd2ba06909a9bda Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Thu, 20 Jul 2017 17:32:12 -0400 Subject: Oh, the FULL hash --- ports/allegro5/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index b67e150dc..8024c6b73 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -11,7 +11,7 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-7d8892a) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-7d8892a9278c57f2d8bb1e555f9ec59cf9ed4f73) vcpkg_from_github( OUT_SOURCE_PATH ${SOURCE_PATH} REPO liballeg/allegro5 -- cgit v1.2.3 From a56ace5ee421234c2cce31e4d9f33a940d505b21 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Thu, 20 Jul 2017 17:34:46 -0400 Subject: Guh --- ports/allegro5/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 8024c6b73..f9935dfd1 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -15,7 +15,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-7d8892a9278c57f2d8bb1e555 vcpkg_from_github( OUT_SOURCE_PATH ${SOURCE_PATH} REPO liballeg/allegro5 - REF 7d8892a + REF 7d8892a9278c57f2d8bb1e555f9ec59cf9ed4f73 SHA512 b1531fa2f22023ecd4e053d03d1c54bf0b94aa3af004a3a06245c4d8278fea64e9d354467873ebd665301903d954795fed88e2467c88441f39c273e7e0d87d6e HEAD_REF master ) -- cgit v1.2.3 From 6170eddeb7761aa3fa6b5542cd903c7e6b8b922d Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Thu, 20 Jul 2017 17:36:21 -0400 Subject: Don't need that function --- ports/allegro5/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index f9935dfd1..094219a83 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -19,7 +19,6 @@ vcpkg_from_github( SHA512 b1531fa2f22023ecd4e053d03d1c54bf0b94aa3af004a3a06245c4d8278fea64e9d354467873ebd665301903d954795fed88e2467c88441f39c273e7e0d87d6e HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(ALLEGRO_USE_STATIC -DSHARED=ON) -- cgit v1.2.3 From d1ff4a83b5d539e036bb35dd7d3221b12ceafd8c Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Thu, 20 Jul 2017 18:43:30 -0400 Subject: Try the /Z7 flag - Debug info is not generated in PDB's, it's within the binaries instead --- ports/allegro5/portfile.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 094219a83..a1d075727 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -70,7 +70,9 @@ vcpkg_configure_cmake( -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/AL -DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON - OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF + OPTIONS_DEBUG + -DWANT_ALLOW_SSE=OFF + -DCMAKE_CXX_FLAGS_DEBUG="/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1" ) vcpkg_install_cmake() -- cgit v1.2.3 From a8a1ad9374f59bc94835f6f4e988f5970848c8dd Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Thu, 20 Jul 2017 18:52:48 -0400 Subject: Need C flags, too --- ports/allegro5/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index a1d075727..3769f227e 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -73,6 +73,7 @@ vcpkg_configure_cmake( OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF -DCMAKE_CXX_FLAGS_DEBUG="/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1" + -DCMAKE_C_FLAGS_DEBUG="/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1" ) vcpkg_install_cmake() -- cgit v1.2.3 From f90508f3be64ac68d06420ab16ba2d362e35298f Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Thu, 20 Jul 2017 19:22:33 -0400 Subject: Eh, actually, no --- ports/allegro5/portfile.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 3769f227e..094219a83 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -70,10 +70,7 @@ vcpkg_configure_cmake( -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/AL -DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON - OPTIONS_DEBUG - -DWANT_ALLOW_SSE=OFF - -DCMAKE_CXX_FLAGS_DEBUG="/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1" - -DCMAKE_C_FLAGS_DEBUG="/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1" + OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF ) vcpkg_install_cmake() -- cgit v1.2.3 From a354afaae34f3c1525271da8f58044b7a3b5ea40 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Thu, 20 Jul 2017 19:32:22 -0400 Subject: This is personal now --- ports/allegro5/fix-pdb-install.patch | 13 +++++++++++++ ports/allegro5/portfile.cmake | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 ports/allegro5/fix-pdb-install.patch diff --git a/ports/allegro5/fix-pdb-install.patch b/ports/allegro5/fix-pdb-install.patch new file mode 100644 index 000000000..ef964b9f3 --- /dev/null +++ b/ports/allegro5/fix-pdb-install.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/Common.cmake b/cmake/Common.cmake +index 782196f..de29535 100644 +--- a/cmake/Common.cmake ++++ b/cmake/Common.cmake +@@ -223,7 +223,7 @@ function(install_our_library target filename) + # PUBLIC_HEADER DESTINATION "include" + ) + if(MSVC AND BUILD_SHARED_LIBS) +- install(FILES ${CMAKE_BINARY_DIR}/lib/\${CMAKE_INSTALL_CONFIG_NAME}/${filename}.pdb ++ install(FILES ${CMAKE_BINARY_DIR}/lib/${filename}.pdb + DESTINATION lib + CONFIGURATIONS Debug RelWithDebInfo + ) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 094219a83..d2801d5d4 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -25,6 +25,13 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") else() set(ALLEGRO_USE_STATIC -DSHARED=OFF) endif() + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-pdb-install.patch +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja -- cgit v1.2.3 From 5369537e51e452a18ad3fb2ff742fad12811cc38 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 20 Jul 2017 19:04:10 -0700 Subject: [clara] init port #1429 --- ports/clara/CONTROL | 3 +++ ports/clara/portfile.cmake | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 ports/clara/CONTROL create mode 100644 ports/clara/portfile.cmake diff --git a/ports/clara/CONTROL b/ports/clara/CONTROL new file mode 100644 index 000000000..10aba99f3 --- /dev/null +++ b/ports/clara/CONTROL @@ -0,0 +1,3 @@ +Source: clara +Version: 2017-07-20-9661f2b4a50895d52ebb4c59382785a2b416c310 +Description: A simple to use command line parser for C++ \ No newline at end of file diff --git a/ports/clara/portfile.cmake b/ports/clara/portfile.cmake new file mode 100644 index 000000000..020d8cd87 --- /dev/null +++ b/ports/clara/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO philsquared/Clara + REF 9661f2b4a50895d52ebb4c59382785a2b416c310 + SHA512 0de5bbef3deb2b7a93be02a407ea88ef93a3d60cea4013b80bdb8cf3805e31af1d8598cb7a8415023d7f632b106d510360c61b5df15b09f30d6c045f2add33b3 + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/single_include/clara.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/single_include/clara.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/share/clara RENAME copyright) +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From a42da34a07187063da297b422a95dbb2d7bd064a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 20 Jul 2017 19:18:00 -0700 Subject: [libevent] Fail faster for unsupported platforms. --- ports/libevent/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake index 1c70dd11f..99f0bb0e1 100644 --- a/ports/libevent/portfile.cmake +++ b/ports/libevent/portfile.cmake @@ -1,5 +1,9 @@ include(vcpkg_common_functions) +if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") + message(FATAL_ERROR "libevent does not currently support UWP") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libevent/libevent -- cgit v1.2.3 From 0c117ea3db646d2b1fe5979faf4f4c9c6e44b9f9 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 21 Jul 2017 10:48:20 +0200 Subject: [gsl] Add a "d" debug postfix See https://github.com/Microsoft/vcpkg/issues/1196#issuecomment-305751793 for details --- ports/gsl/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/gsl/CMakeLists.txt b/ports/gsl/CMakeLists.txt index 45abb5bd2..eb38a4431 100644 --- a/ports/gsl/CMakeLists.txt +++ b/ports/gsl/CMakeLists.txt @@ -48,6 +48,10 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gsl_types.h "${GSLTYPES_H}") file(GLOB_RECURSE PUBLIC_HEADERS gsl*.h) list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/gsl_types.h) +# The debug libraries have a "d" postfix so that CMake's FindGSL.cmake +# module can distinguish between Release and Debug libraries +set(CMAKE_DEBUG_POSTFIX "d") + add_library(gslcblas ${CBLAS_SOURCES}) set_target_properties(gslcblas PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) @@ -74,4 +78,4 @@ install(TARGETS gsl gslcblas LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ${TARGET_INSTALL_OPTIONS} -) \ No newline at end of file +) -- cgit v1.2.3 From e47238f98c3325d69e9731ab81d43b17a8372363 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 21 Jul 2017 10:50:34 +0200 Subject: [gsl] Bump version number --- ports/gsl/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/gsl/CONTROL b/ports/gsl/CONTROL index a18b341c9..62d0c7e8e 100644 --- a/ports/gsl/CONTROL +++ b/ports/gsl/CONTROL @@ -1,3 +1,3 @@ Source: gsl -Version: 2.3-1 +Version: 2.3-2 Description: The GNU Scientific Library is a numerical library for C and C++ programmers -- cgit v1.2.3 From dc4998bf702b14f51f36ab40d85d3b090d5bfa9c Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 21 Jul 2017 13:01:00 +0200 Subject: [sdl2] Prevent exports in static build --- ports/sdl2-image/CMakeLists.txt | 92 +++++++++++----------- ports/sdl2-image/CONTROL | 2 +- ports/sdl2-image/portfile.cmake | 1 + ports/sdl2-mixer/CMakeLists.txt | 1 + ports/sdl2-mixer/CONTROL | 2 +- ports/sdl2-net/CMakeLists.txt | 1 + ports/sdl2-net/CONTROL | 2 +- ports/sdl2-ttf/CMakeLists.txt | 1 + ports/sdl2-ttf/CONTROL | 2 +- ports/sdl2/CONTROL | 2 +- .../sdl2/export-symbols-only-in-shared-build.patch | 16 ++++ ports/sdl2/portfile.cmake | 1 + ports/smpeg2/CMakeLists.txt | 3 +- ports/smpeg2/CONTROL | 2 +- ports/smpeg2/portfile.cmake | 1 + 15 files changed, 77 insertions(+), 52 deletions(-) create mode 100644 ports/sdl2/export-symbols-only-in-shared-build.patch diff --git a/ports/sdl2-image/CMakeLists.txt b/ports/sdl2-image/CMakeLists.txt index e742a408d..8b5f7131f 100644 --- a/ports/sdl2-image/CMakeLists.txt +++ b/ports/sdl2-image/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 2.6) -project(SDL2_image) +project(SDL2_image C) ### configuration ### @@ -27,24 +27,26 @@ set(WEBP_DYNAMIC \"libwebp-4.dll\") add_library(SDL2_image IMG.c - IMG_bmp.c - IMG_gif.c - IMG_jpg.c - IMG_lbm.c - IMG_pcx.c - IMG_png.c - IMG_pnm.c - IMG_tga.c - IMG_tif.c - IMG_webp.c - IMG_xcf.c - IMG_xpm.c - IMG_xv.c - IMG_xxx.c - ) + IMG_bmp.c + IMG_gif.c + IMG_jpg.c + IMG_lbm.c + IMG_pcx.c + IMG_png.c + IMG_pnm.c + IMG_tga.c + IMG_tif.c + IMG_webp.c + IMG_xcf.c + IMG_xpm.c + IMG_xv.c + IMG_xxx.c + ) + +set_target_properties(SDL2_image PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) foreach(FORMAT ${SUPPORTED_FORMATS}) - add_definitions(-DLOAD_${FORMAT}) + add_definitions(-DLOAD_${FORMAT}) endforeach(FORMAT) # SDL @@ -59,27 +61,27 @@ target_link_libraries(SDL2_image ${SDL_LIBRARY}) # external dependencies foreach(DEPENDENCY ${DEPENDENCIES}) - find_package(${DEPENDENCY}) - - if(NOT DEFINED ${DEPENDENCY}_FLAG) - set(${DEPENDENCY}_FLAG ${DEPENDENCY}) - endif() - - add_definitions(-DLOAD_${${DEPENDENCY}_FLAG}) - if(${DEPENDENCY}_FOUND) - message(STATUS " --> linking statically.") - target_link_libraries(SDL2_image ${${DEPENDENCY}_LIBRARIES}) - elseif(DEFINED ${DEPENDENCY}_DYNAMIC) - message(STATUS " --> linking dynamically.") - add_definitions(-DLOAD_${${DEPENDENCY}_FLAG}_DYNAMIC=${${DEPENDENCY}_DYNAMIC}) - set(RUNTIME_DEPENDENCIES ON) - else() - message(STATUS " --> skipping.") - endif() + find_package(${DEPENDENCY}) + + if(NOT DEFINED ${DEPENDENCY}_FLAG) + set(${DEPENDENCY}_FLAG ${DEPENDENCY}) + endif() + + add_definitions(-DLOAD_${${DEPENDENCY}_FLAG}) + if(${DEPENDENCY}_FOUND) + message(STATUS " --> linking statically.") + target_link_libraries(SDL2_image ${${DEPENDENCY}_LIBRARIES}) + elseif(DEFINED ${DEPENDENCY}_DYNAMIC) + message(STATUS " --> linking dynamically.") + add_definitions(-DLOAD_${${DEPENDENCY}_FLAG}_DYNAMIC=${${DEPENDENCY}_DYNAMIC}) + set(RUNTIME_DEPENDENCIES ON) + else() + message(STATUS " --> skipping.") + endif() endforeach(DEPENDENCY) if(DEFINED RUNTIME_DEPENDENCIES) - include_directories(VisualC/external/include) + include_directories(VisualC/external/include) endif() @@ -94,16 +96,16 @@ install(FILES SDL_image.h DESTINATION include/SDL2 CONFIGURATIONS Release) message(STATUS "Link-time dependencies:") message(STATUS " " ${SDL_LIBRARY}) foreach(DEPENDENCY ${DEPENDENCIES}) - if(${DEPENDENCY}_FOUND) - message(STATUS " " ${DEPENDENCY}) - endif() + if(${DEPENDENCY}_FOUND) + message(STATUS " " ${DEPENDENCY}) + endif() endforeach(DEPENDENCY) if(DEFINED RUNTIME_DEPENDENCIES) - message(STATUS "Run-time dependencies:") - foreach(DEPENDENCY ${DEPENDENCIES}) - if(NOT ${DEPENDENCY}_FOUND AND DEFINED ${DEPENDENCY}_DYNAMIC) - message(STATUS " " ${${DEPENDENCY}_DYNAMIC}) - endif() - endforeach(DEPENDENCY) -endif() \ No newline at end of file + message(STATUS "Run-time dependencies:") + foreach(DEPENDENCY ${DEPENDENCIES}) + if(NOT ${DEPENDENCY}_FOUND AND DEFINED ${DEPENDENCY}_DYNAMIC) + message(STATUS " " ${${DEPENDENCY}_DYNAMIC}) + endif() + endforeach(DEPENDENCY) +endif() diff --git a/ports/sdl2-image/CONTROL b/ports/sdl2-image/CONTROL index 04c9f77bb..5ebec2f38 100644 --- a/ports/sdl2-image/CONTROL +++ b/ports/sdl2-image/CONTROL @@ -1,5 +1,5 @@ Source: sdl2-image -Version: 2.0.1 +Version: 2.0.1-1 Build-Depends: sdl2, libpng, libjpeg-turbo, tiff, libwebp 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 4cc6ce74a..ad3f1a2d5 100644 --- a/ports/sdl2-image/portfile.cmake +++ b/ports/sdl2-image/portfile.cmake @@ -25,6 +25,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindWEBP.cmake DESTINATION ${SOURCE_PATH}/cm vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # OPTIONS # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 diff --git a/ports/sdl2-mixer/CMakeLists.txt b/ports/sdl2-mixer/CMakeLists.txt index 094912b48..6d1cb28c0 100644 --- a/ports/sdl2-mixer/CMakeLists.txt +++ b/ports/sdl2-mixer/CMakeLists.txt @@ -76,6 +76,7 @@ add_library(SDL2_mixer native_midi/native_midi_common.c native_midi/native_midi_win32.c) +set_target_properties(SDL2_mixer PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) target_compile_definitions(SDL2_mixer PRIVATE ${SDL_MIXER_DEFINES}) target_include_directories(SDL2_mixer PRIVATE ${SDL_MIXER_INCLUDES} ./native_midi) target_link_libraries(SDL2_mixer ${SDL_MIXER_LIBRARIES} Winmm) diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL index b5d51aecd..88356b73f 100644 --- a/ports/sdl2-mixer/CONTROL +++ b/ports/sdl2-mixer/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-mixer -Version: 2.0.1 +Version: 2.0.1-1 Description: Multi-channel audio mixer library for SDL. Build-Depends: sdl2, libflac, smpeg2, libmodplug, libvorbis diff --git a/ports/sdl2-net/CMakeLists.txt b/ports/sdl2-net/CMakeLists.txt index d87b88c89..9b81f8d42 100644 --- a/ports/sdl2-net/CMakeLists.txt +++ b/ports/sdl2-net/CMakeLists.txt @@ -8,6 +8,7 @@ find_library(SDL_LIBRARY SDL2) add_library(SDL2_net SDLnet.c SDLnetselect.c SDLnetTCP.c SDLnetUDP.c) +set_target_properties(SDL2_net PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) target_compile_definitions(SDL2_net PRIVATE _WINSOCK_DEPRECATED_NO_WARNINGS) target_include_directories(SDL2_net PRIVATE ${SDL_INCLUDE_DIR}/SDL2) target_link_libraries(SDL2_net ${SDL_LIBRARY} ws2_32 iphlpapi) diff --git a/ports/sdl2-net/CONTROL b/ports/sdl2-net/CONTROL index 850cc9163..692bb7615 100644 --- a/ports/sdl2-net/CONTROL +++ b/ports/sdl2-net/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-net -Version: 2.0.1 +Version: 2.0.1-1 Description: Networking library for SDL Build-Depends: sdl2 diff --git a/ports/sdl2-ttf/CMakeLists.txt b/ports/sdl2-ttf/CMakeLists.txt index f2e677483..133616479 100644 --- a/ports/sdl2-ttf/CMakeLists.txt +++ b/ports/sdl2-ttf/CMakeLists.txt @@ -7,6 +7,7 @@ find_package(FreeType REQUIRED) add_library(SDL2_ttf SDL_ttf.c) +set_target_properties(SDL2_ttf PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) target_include_directories(SDL2_ttf PRIVATE ${SDL_INCLUDE_DIR}/SDL2 ${FREETYPE_INCLUDE_DIR_ft2build}) target_link_libraries(SDL2_ttf ${SDL_LIBRARY} ${FREETYPE_LIBRARY}) diff --git a/ports/sdl2-ttf/CONTROL b/ports/sdl2-ttf/CONTROL index de0385428..fe09831ee 100644 --- a/ports/sdl2-ttf/CONTROL +++ b/ports/sdl2-ttf/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-ttf -Version: 2.0.14 +Version: 2.0.14-1 Description: A library for rendering TrueType fonts with SDL Build-Depends: sdl2, freetype diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index c0d747691..f22820579 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.5-2 +Version: 2.0.5-3 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/export-symbols-only-in-shared-build.patch b/ports/sdl2/export-symbols-only-in-shared-build.patch new file mode 100644 index 000000000..b442954d5 --- /dev/null +++ b/ports/sdl2/export-symbols-only-in-shared-build.patch @@ -0,0 +1,16 @@ +diff --git a/include/begin_code.h b/include/begin_code.h +index 04e78c6..16464f5 100644 +--- a/include/begin_code.h ++++ b/include/begin_code.h +@@ -58,8 +58,10 @@ + # else + # define DECLSPEC __declspec(dllimport) + # endif +-# else ++# elif defined(SDL2_EXPORTS) + # define DECLSPEC __declspec(dllexport) ++# else ++# define DECLSPEC + # endif + # else + # if defined(__GNUC__) && __GNUC__ >= 4 diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index 185e39665..33123c1ba 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/dont-ignore-default-libs.patch + ${CMAKE_CURRENT_LIST_DIR}/export-symbols-only-in-shared-build.patch ) if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") diff --git a/ports/smpeg2/CMakeLists.txt b/ports/smpeg2/CMakeLists.txt index 9f061cfb8..7cda2840a 100644 --- a/ports/smpeg2/CMakeLists.txt +++ b/ports/smpeg2/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 2.6) -project(SMPEG2) +project(SMPEG2 CXX) find_path(SDL_INCLUDE_DIR SDL2/SDL.h) find_library(SDL_LIBRARY SDL2) @@ -42,6 +42,7 @@ add_library(smpeg2 MPEGsystem.cpp smpeg.cpp) +set_target_properties(smpeg2 PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) target_link_libraries(smpeg2 ${SDL_LIBRARY}) install(TARGETS smpeg2 diff --git a/ports/smpeg2/CONTROL b/ports/smpeg2/CONTROL index 8465a6446..26c0b3904 100644 --- a/ports/smpeg2/CONTROL +++ b/ports/smpeg2/CONTROL @@ -1,4 +1,4 @@ Source: smpeg2 -Version: 2.0.0 +Version: 2.0.0-1 Description: SDL MPEG Player Library Build-Depends: sdl2 diff --git a/ports/smpeg2/portfile.cmake b/ports/smpeg2/portfile.cmake index 43e6e623e..7639ca264 100644 --- a/ports/smpeg2/portfile.cmake +++ b/ports/smpeg2/portfile.cmake @@ -17,6 +17,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS_DEBUG -DSMPEG_SKIP_HEADERS=ON) -- cgit v1.2.3 From 7f84fdc48fd2ae58803264b4d395541bbf3b7602 Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 21 Jul 2017 15:03:10 +0200 Subject: [opusfile] initial commit --- ports/opusfile/CMakeLists.txt | 40 ++++++++++++++++++++++++++++++++++++++++ ports/opusfile/CONTROL | 4 ++++ ports/opusfile/portfile.cmake | 29 +++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 ports/opusfile/CMakeLists.txt create mode 100644 ports/opusfile/CONTROL create mode 100644 ports/opusfile/portfile.cmake diff --git a/ports/opusfile/CMakeLists.txt b/ports/opusfile/CMakeLists.txt new file mode 100644 index 000000000..737adee1a --- /dev/null +++ b/ports/opusfile/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.4) +project(opusfile C) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4267 /wd4244 /wd4090") +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + +find_path(OGG_INCLUDE_DIR ogg/ogg.h) +find_library(OGG_LIBRARY ogg) + +find_path(OPUS_INCLUDE_DIR opus.h PATH_SUFFIXES opus) +find_library(OPUS_LIBRARY opus) + +find_package(OpenSSL MODULE REQUIRED) + +add_library(opusfile + src/info.c + src/internal.c + src/opusfile.c + src/stream.c) + +target_include_directories(opusfile PRIVATE include PUBLIC ${OGG_INCLUDE_DIR} ${OPUS_INCLUDE_DIR}) +target_link_libraries(opusfile PRIVATE ${OGG_LIBRARY} ${OPUS_LIBRARY}) + +add_library(opusurl + src/http.c + src/wincerts.c) + +target_compile_definitions(opusurl PRIVATE OP_ENABLE_HTTP) +target_include_directories(opusurl PRIVATE include) +target_link_libraries(opusurl PRIVATE opusfile OpenSSL::SSL ws2_32.lib crypt32.lib) + +install(TARGETS opusfile opusurl + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +if(NOT OPUSFILE_SKIP_HEADERS) + install(FILES include/opusfile.h + DESTINATION include/opus) +endif() diff --git a/ports/opusfile/CONTROL b/ports/opusfile/CONTROL new file mode 100644 index 000000000..92acb39f8 --- /dev/null +++ b/ports/opusfile/CONTROL @@ -0,0 +1,4 @@ +Source: opusfile +Version: 0.8 +Description: Stand-alone decoder library for .opus streams +Build-Depends: libogg, opus, openssl diff --git a/ports/opusfile/portfile.cmake b/ports/opusfile/portfile.cmake new file mode 100644 index 000000000..0ba18d849 --- /dev/null +++ b/ports/opusfile/portfile.cmake @@ -0,0 +1,29 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "UWP builds not supported") +endif() + +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/opusfile + REF v0.8 + SHA512 82fcb09c0b77bffb5877c660a268e0c166a1ac314b270799fe5cb4e0fa2cd10fd909b380761031f7dfb60d8b7561e5fe54d93b74d37bb0e6f629bdf9a6384ae1 + HEAD_REF master) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DOPUSFILE_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# make includes work with MSBuild integration +file(READ ${CURRENT_PACKAGES_DIR}/include/opus/opusfile.h OPUSFILE_H) + string(REPLACE "# include " "# include \"opus_multistream.h\"" OPUSFILE_H "${OPUSFILE_H}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/opus/opusfile.h "${OPUSFILE_H}") + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/opusfile) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/opusfile/COPYING ${CURRENT_PACKAGES_DIR}/share/opusfile/copyright) -- cgit v1.2.3 From 809eb64c97e6ec459cd1e1d601e916100395529e Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 21 Jul 2017 12:26:24 -0700 Subject: [cxxopts] init port required by #1248 --- ports/cxxopts/CONTROL | 3 +++ ports/cxxopts/portfile.cmake | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 ports/cxxopts/CONTROL create mode 100644 ports/cxxopts/portfile.cmake diff --git a/ports/cxxopts/CONTROL b/ports/cxxopts/CONTROL new file mode 100644 index 000000000..e1f571b11 --- /dev/null +++ b/ports/cxxopts/CONTROL @@ -0,0 +1,3 @@ +Source: cxxopts +Version: 1.3.0 +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 new file mode 100644 index 000000000..c45da3a05 --- /dev/null +++ b/ports/cxxopts/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jarro2783/cxxopts + REF v1.3.0 + SHA512 0c02716cdc1ca83f64c3757685042580e06c894ac51986a8df971ed30b8dd6d49448f2c9f61fff947fb34c48055f11cac446b54a9294bc880d78d91081c379b4 + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/include/cxxopts.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cxxopts RENAME copyright) +vcpkg_copy_pdbs() -- cgit v1.2.3 From c2a552b4f370edc69d3d3b0f65ff6a7e6d659418 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 21 Jul 2017 21:56:20 -0700 Subject: [uriparser] init required by #1369 --- ports/uriparser/CMakeLists.txt | 47 ++++++++++++++++++++++++++++++++++++++++++ ports/uriparser/CONTROL | 3 +++ ports/uriparser/portfile.cmake | 22 ++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 ports/uriparser/CMakeLists.txt create mode 100644 ports/uriparser/CONTROL create mode 100644 ports/uriparser/portfile.cmake diff --git a/ports/uriparser/CMakeLists.txt b/ports/uriparser/CMakeLists.txt new file mode 100644 index 000000000..ec7f7bf38 --- /dev/null +++ b/ports/uriparser/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.8) +project(uriparser C CXX) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories(include) + +set(SRC + src/UriCommon.c + src/UriCommon.h + src/UriCompare.c + src/UriEscape.c + src/UriFile.c + src/UriIp4.c + src/UriIp4Base.c + src/UriIp4Base.h + src/UriNormalize.c + src/UriNormalizeBase.c + src/UriNormalizeBase.h + src/UriParse.c + src/UriParseBase.c + src/UriParseBase.h + src/UriQuery.c + src/UriRecompose.c + src/UriResolve.c + src/UriShorten.c +) + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +add_library(uriparser ${SRC}) + +install( + TARGETS uriparser + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY include/ DESTINATION include) +endif() diff --git a/ports/uriparser/CONTROL b/ports/uriparser/CONTROL new file mode 100644 index 000000000..7bba4c357 --- /dev/null +++ b/ports/uriparser/CONTROL @@ -0,0 +1,3 @@ +Source: uriparser +Version: 0.8.4 +Description: uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C. uriparser is cross-platform, fast, supports Unicode diff --git a/ports/uriparser/portfile.cmake b/ports/uriparser/portfile.cmake new file mode 100644 index 000000000..040e3a9d7 --- /dev/null +++ b/ports/uriparser/portfile.cmake @@ -0,0 +1,22 @@ + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/uriparser-0.8.4) +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/uriparser/files/Sources/0.8.4/uriparser-0.8.4.zip/download" + FILENAME "uriparser-0.8.4.zip" + SHA512 c22a98a027c4caa1d3559b1d3112f7ac567a489037d2b38f1999483f623a2e8d79fbacdc8859fe4e669a12f0f55935179f7be2f4424c61e51d1d68f6ced37185 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +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_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/uriparser RENAME copyright) -- cgit v1.2.3 From 7c3f56b542c4b7c7c8d7858a257d4deeb0530c92 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 21 Jul 2017 22:00:32 -0700 Subject: [minizip] init required by #1369 --- ports/minizip/CMakeLists.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++ ports/minizip/CONTROL | 4 ++++ ports/minizip/portfile.cmake | 26 +++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 ports/minizip/CMakeLists.txt create mode 100644 ports/minizip/CONTROL create mode 100644 ports/minizip/portfile.cmake diff --git a/ports/minizip/CMakeLists.txt b/ports/minizip/CMakeLists.txt new file mode 100644 index 000000000..b42d6f576 --- /dev/null +++ b/ports/minizip/CMakeLists.txt @@ -0,0 +1,50 @@ +cmake_minimum_required(VERSION 3.8) +project(minizip C CXX) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +find_package(ZLIB REQUIRED) + +find_package(Bzip2 REQUIRED) + +set(MIN_SRC contrib/minizip) + +include_directories(${MIN_SRC} ${ZLIB_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR}) + +set(SRC + ${MIN_SRC}/ioapi.c + ${MIN_SRC}/iowin32.c + ${MIN_SRC}/unzip.c + ${MIN_SRC}/zip.c +) +set(HEADERS + ${MIN_SRC}/ioapi.h + ${MIN_SRC}/iowin32.h + ${MIN_SRC}/unzip.h + ${MIN_SRC}/zip.h +) +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +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) + +install( + TARGETS minizip + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${HEADERS} DESTINATION include/minizip) +endif() diff --git a/ports/minizip/CONTROL b/ports/minizip/CONTROL new file mode 100644 index 000000000..e4a5daee2 --- /dev/null +++ b/ports/minizip/CONTROL @@ -0,0 +1,4 @@ +Source: minizip +Version: 1.2.11 +Description: +Build-Depends: bzip2, zlib diff --git a/ports/minizip/portfile.cmake b/ports/minizip/portfile.cmake new file mode 100644 index 000000000..c1c04f211 --- /dev/null +++ b/ports/minizip/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "WindowsStore not supported") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO madler/zlib + REF v1.2.11 + SHA512 104c62ed1228b5f1199bc037081861576900eb0697a226cafa62a35c4c890b5cb46622e399f9aad82ee5dfb475bae26ae75e2bd6da3d261361b1c8b996970faf + HEAD_REF master +) + +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_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/contrib/minizip/MiniZip64_info.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/minizip RENAME copyright) -- cgit v1.2.3 From a92af9b14f37249fbf284613d7679a75d7a3b283 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 21 Jul 2017 23:14:55 -0700 Subject: [libssh] init #1454 --- ports/libssh/CONTROL | 4 ++++ ports/libssh/portfile.cmake | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 ports/libssh/CONTROL create mode 100644 ports/libssh/portfile.cmake diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL new file mode 100644 index 000000000..284d44091 --- /dev/null +++ b/ports/libssh/CONTROL @@ -0,0 +1,4 @@ +Source: libssh +Version: 0.7.5 +Description:libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side +Build-Depends: zlib, openssl diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake new file mode 100644 index 000000000..8cac84063 --- /dev/null +++ b/ports/libssh/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "WindowsStore not supported") +endif() +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libssh-0.7.5) +vcpkg_download_distfile(ARCHIVE + URLS "https://red.libssh.org/attachments/download/218/libssh-0.7.5.tar.xz" + FILENAME "libssh-0.7.5.tar.xz" + SHA512 6c7f539899caaedf13d66fa2e0fac1a475ecdfe389131abcbdf908bdebc50a0b9e6b0d43e67e52aea85c32f6aa68e46ca2f50695992f82ded83489f445a8e775 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DWITH_STATIC_LIB=ON + +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake/libssh") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(INSTALL ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/static ${CURRENT_PACKAGES_DIR}/debug/lib/static) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh RENAME copyright) -- cgit v1.2.3 From e8f681855c9890f1dc380274c6327511e417071c Mon Sep 17 00:00:00 2001 From: Kalessin Date: Sat, 22 Jul 2017 10:05:36 +0200 Subject: link to debug runtime --- ports/luajit/001-fixStaticBuild.patch | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ports/luajit/001-fixStaticBuild.patch b/ports/luajit/001-fixStaticBuild.patch index 11b6ea219..240a1beec 100644 --- a/ports/luajit/001-fixStaticBuild.patch +++ b/ports/luajit/001-fixStaticBuild.patch @@ -10,11 +10,17 @@ index bd0c4c5..1210fd2 100644 :NODEBUG @if "%1"=="amalg" goto :AMALGDLL @if "%1"=="static" goto :STATIC -@@ -76,6 +77,7 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c +-%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL lj_*.c lib_*.c ++@if "%DEBUG%"=="1" set LJCOMPILE=%LJCOMPILE% /MDd ++@if "%DEBUG%"=="" set LJCOMPILE=%LJCOMPILE% /MD ++%LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c + @if errorlevel 1 goto :BAD + %LJLINK% /DLL /out:%LJDLLNAME% lj_*.obj lib_*.obj @if errorlevel 1 goto :BAD @goto :MTDLL :STATIC +@if "%DEBUG%"=="1" set LJCOMPILE=%LJCOMPILE% /MTd ++@if "%DEBUG%"=="" set LJCOMPILE=%LJCOMPILE% /MT %LJCOMPILE% lj_*.c lib_*.c @if errorlevel 1 goto :BAD - %LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj + %LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj \ No newline at end of file -- cgit v1.2.3 From dd7435e5a1d334c965a098686afee02ddb8e4b0d Mon Sep 17 00:00:00 2001 From: Han Hu Date: Sat, 22 Jul 2017 16:28:48 +0800 Subject: add openscenegraph, a render engine similar to ogre, but used widely in GIS area. --- ports/osg/CONTROL | 4 ++++ ports/osg/portfile.cmake | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 ports/osg/CONTROL create mode 100644 ports/osg/portfile.cmake diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL new file mode 100644 index 000000000..867a8b4e0 --- /dev/null +++ b/ports/osg/CONTROL @@ -0,0 +1,4 @@ +Source: osg +Version: 3.5.6 +Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit. +Build-Depends: freetype, jasper, openexr, zlib, gdal, giflib, libjpeg-turbo, libpng, tiff diff --git a/ports/osg/portfile.cmake b/ports/osg/portfile.cmake new file mode 100644 index 000000000..5d68a57be --- /dev/null +++ b/ports/osg/portfile.cmake @@ -0,0 +1,58 @@ +# 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) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building will not support load data through plugins.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/OpenSceneGraph-OpenSceneGraph-3.5.6) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-3.5.6.zip" + FILENAME "osg-3.5.6.zip" + SHA512 f1745748ff86243291da96a4781af9487204a82540d3cc42b33bcbf693137ab9a6a741cad18afa74f62ef66933840ac54894397f880471f6c639210fa23e7f4b +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + # PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DOSG_USE_UTF8_FILENAME=ON + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +# handle osg tools and plugins +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +set(OSG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/osg) +file(MAKE_DIRECTORY ${OSG_TOOL_PATH}) + +file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH}) +file(REMOVE_RECURSE ${OSG_TOOLS}) +file(GLOB OSG_TOOLS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE_RECURSE ${OSG_TOOLS_DBG}) + +file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.5.6/*.dll) +file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-3.5.6) +file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.5.6/*.dll) +file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-3.5.6) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.5.6/) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.5.6/) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/osg) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/osg/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/osg/copyright) -- cgit v1.2.3 From 97718fb49163f93b6f8e8044704ffb3c558bbdbb Mon Sep 17 00:00:00 2001 From: Cloud Han Date: Mon, 24 Jul 2017 01:27:56 +0800 Subject: fix #1497 --- ports/opencv/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index b296e3658..c72eefba1 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -42,7 +42,6 @@ vcpkg_configure_cmake( -DBUILD_PNG=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF - -DBUILD_opencv_flann=OFF -DBUILD_opencv_apps=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -- cgit v1.2.3 From 21b2afb9d7c0a8a1d273a380ea179798343bbaa6 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 23 Jul 2017 10:57:20 -0700 Subject: [minizip] include mztools --- ports/minizip/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/minizip/CMakeLists.txt b/ports/minizip/CMakeLists.txt index b42d6f576..11d08a3c8 100644 --- a/ports/minizip/CMakeLists.txt +++ b/ports/minizip/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.8) -project(minizip C CXX) +project(minizip C) if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) @@ -18,12 +18,15 @@ set(SRC ${MIN_SRC}/iowin32.c ${MIN_SRC}/unzip.c ${MIN_SRC}/zip.c + ${MIN_SRC}/mz.c + ${MIN_SRC}/mztools.c ) set(HEADERS ${MIN_SRC}/ioapi.h ${MIN_SRC}/iowin32.h ${MIN_SRC}/unzip.h ${MIN_SRC}/zip.h + ${MIN_SRC}/mztools.h ) if(BUILD_SHARED_LIBS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -- cgit v1.2.3 From ddffe31def3d32dfdf65ef004e7c48092daf6da4 Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 21 Jul 2017 16:45:25 +0200 Subject: [libopusenc] initial commit --- ports/libopusenc/CMakeLists.txt | 38 ++++++++++++++++++++++++++++++++++++++ ports/libopusenc/CONTROL | 4 ++++ ports/libopusenc/portfile.cmake | 29 +++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 ports/libopusenc/CMakeLists.txt create mode 100644 ports/libopusenc/CONTROL create mode 100644 ports/libopusenc/portfile.cmake diff --git a/ports/libopusenc/CMakeLists.txt b/ports/libopusenc/CMakeLists.txt new file mode 100644 index 000000000..10f425821 --- /dev/null +++ b/ports/libopusenc/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.4) +project(libopusenc C) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4267 /wd4244 /wd4996 /wd4101 /wd4018") + +find_path(OPUS_INCLUDE_DIR opus.h PATH_SUFFIXES opus) +find_library(OPUS_LIBRARY opus) + +add_library(opusenc + src/ogg_packer.c + src/opus_header.c + src/opusenc.c + src/picture.c + src/resample.c) + +get_filename_component(FOLDER ${CMAKE_CURRENT_SOURCE_DIR} NAME) +string(REPLACE "libopusenc-" "" VERSION ${FOLDER}) + +target_compile_definitions(opusenc PRIVATE + RANDOM_PREFIX=libopusenc + OUTSIDE_SPEEX + FLOATING_POINT + PACKAGE_VERSION="${VERSION}" + PACKAGE_NAME="libopusenc" + OPE_BUILD) +set_target_properties(opusenc PROPERTIES DEFINE_SYMBOL DLL_EXPORT) +target_include_directories(opusenc PRIVATE include ${OPUS_INCLUDE_DIR}) +target_link_libraries(opusenc PRIVATE ${OPUS_LIBRARY}) + +install(TARGETS opusenc + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +if(NOT OPUSENC_SKIP_HEADERS) + install(FILES include/opusenc.h + DESTINATION include/opus) +endif() diff --git a/ports/libopusenc/CONTROL b/ports/libopusenc/CONTROL new file mode 100644 index 000000000..8f1ebb9ed --- /dev/null +++ b/ports/libopusenc/CONTROL @@ -0,0 +1,4 @@ +Source: libopusenc +Version: 0.1 +Description: Library for encoding .opus audio files and live streams. +Build-Depends: opus diff --git a/ports/libopusenc/portfile.cmake b/ports/libopusenc/portfile.cmake new file mode 100644 index 000000000..d41880e01 --- /dev/null +++ b/ports/libopusenc/portfile.cmake @@ -0,0 +1,29 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "UWP builds not supported") +endif() + +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/libopusenc + REF v0.1 + SHA512 6abc5cd9e87ad41409f844d350cf43ee0067ad05a768aa9ef1d726a7e98ef9b006cbc42a6601d05a51dba6386a1361751a9a367a902c52eff8b4e56c3bf8a04b + HEAD_REF master) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DOPUSENC_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# make includes work with MSBuild integration +file(READ ${CURRENT_PACKAGES_DIR}/include/opus/opusenc.h OPUSENC_H) + string(REPLACE "#include " "#include \"opus.h\"" OPUSENC_H "${OPUSENC_H}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/opus/opusenc.h "${OPUSENC_H}") + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libopusenc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libopusenc/COPYING ${CURRENT_PACKAGES_DIR}/share/libopusenc/copyright) -- cgit v1.2.3 From 349fba17c739a056dc5e96ac532a326a7323bcdc Mon Sep 17 00:00:00 2001 From: Kalessin Date: Sun, 23 Jul 2017 20:43:57 +0200 Subject: fix luajit patch --- ports/luajit/001-fixStaticBuild.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/luajit/001-fixStaticBuild.patch b/ports/luajit/001-fixStaticBuild.patch index 240a1beec..b21991702 100644 --- a/ports/luajit/001-fixStaticBuild.patch +++ b/ports/luajit/001-fixStaticBuild.patch @@ -1,8 +1,8 @@ diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat -index bd0c4c5..1210fd2 100644 +index bd0c4c5..95e1cf4 100644 --- a/src/msvcbuild.bat +++ b/src/msvcbuild.bat -@@ -67,6 +67,7 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c +@@ -67,15 +67,20 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c @shift @set LJCOMPILE=%LJCOMPILE% /Zi @set LJLINK=%LJLINK% /debug @@ -23,4 +23,4 @@ index bd0c4c5..1210fd2 100644 +@if "%DEBUG%"=="" set LJCOMPILE=%LJCOMPILE% /MT %LJCOMPILE% lj_*.c lib_*.c @if errorlevel 1 goto :BAD - %LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj \ No newline at end of file + %LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj -- cgit v1.2.3 From a3f0d84839caa64c500ceda8095b8da42cd4359a Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 23 Jul 2017 11:46:49 -0700 Subject: [minizip] fix linker issues --- ports/minizip/CMakeLists.txt | 19 ++++++++++++++++++- ports/minizip/portfile.cmake | 4 +++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ports/minizip/CMakeLists.txt b/ports/minizip/CMakeLists.txt index 11d08a3c8..caf2b856d 100644 --- a/ports/minizip/CMakeLists.txt +++ b/ports/minizip/CMakeLists.txt @@ -18,7 +18,7 @@ set(SRC ${MIN_SRC}/iowin32.c ${MIN_SRC}/unzip.c ${MIN_SRC}/zip.c - ${MIN_SRC}/mz.c + ${MIN_SRC}/unzip.c ${MIN_SRC}/mztools.c ) set(HEADERS @@ -26,6 +26,7 @@ set(HEADERS ${MIN_SRC}/iowin32.h ${MIN_SRC}/unzip.h ${MIN_SRC}/zip.h + ${MIN_SRC}/unzip.h ${MIN_SRC}/mztools.h ) if(BUILD_SHARED_LIBS) @@ -40,6 +41,16 @@ target_compile_definitions(minizip PRIVATE -D_ZLIB_H) target_link_libraries(minizip PRIVATE ${BZIP2_LIBRARIES}) target_compile_definitions(minizip PRIVATE -DHAVE_BZIP2=1) +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) + +set_target_properties(minizip_bin PROPERTIES OUTPUT_NAME minizip) +set_target_properties(miniunz_bin PROPERTIES OUTPUT_NAME miniunz) + + install( TARGETS minizip RUNTIME DESTINATION bin @@ -47,6 +58,12 @@ install( ARCHIVE DESTINATION lib ) +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS minizip_bin miniunz_bin + RUNTIME DESTINATION tools/minizip + ) +endif() if(NOT DISABLE_INSTALL_HEADERS) install(FILES ${HEADERS} DESTINATION include/minizip) diff --git a/ports/minizip/portfile.cmake b/ports/minizip/portfile.cmake index c1c04f211..c0ed49486 100644 --- a/ports/minizip/portfile.cmake +++ b/ports/minizip/portfile.cmake @@ -17,10 +17,12 @@ 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 + 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(INSTALL ${SOURCE_PATH}/contrib/minizip/MiniZip64_info.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/minizip RENAME copyright) -- cgit v1.2.3 From 8097e2f3c29eb05f707ad86c712e8523cca9421f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 24 Jul 2017 09:03:03 -0700 Subject: [vcpkg] ALLOW_OBSOLETE_MSVCRT policy should enable use of all CRTs. --- toolsrc/src/PostBuildLint.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 8e11ae5b1..a5d923ad2 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -38,7 +38,7 @@ namespace vcpkg::PostBuildLint } }; - const std::vector& get_outdated_dynamic_crts(const Build::BuildPolicies& policies) + const std::vector& get_outdated_dynamic_crts() { static const std::vector v_no_msvcrt = { {"msvcp100.dll", R"(msvcp100\.dll)"}, @@ -59,18 +59,7 @@ namespace vcpkg::PostBuildLint {"msvcrt20.dll", R"(msvcrt20\.dll)"}, {"msvcrt40.dll", R"(msvcrt40\.dll)"}}; - static const std::vector v = [&]() { - auto ret = v_no_msvcrt; - ret.push_back(OutdatedDynamicCrt{"msvcrt.dll", R"(msvcrt\.dll)"}); - return ret; - }(); - - if (policies.is_enabled(BuildPolicy::ALLOW_OBSOLETE_MSVCRT)) - { - return v_no_msvcrt; - } - - return v; + return v_no_msvcrt; } static LintStatus check_for_files_in_include_directory(const Files::Filesystem& fs, @@ -659,7 +648,7 @@ namespace vcpkg::PostBuildLint const fs::path dumpbin_exe, const BuildInfo& build_info) { - const std::vector& outdated_crts = get_outdated_dynamic_crts(build_info.policies); + if (build_info.policies.is_enabled(BuildPolicy::ALLOW_OBSOLETE_MSVCRT)) return LintStatus::SUCCESS; std::vector dlls_with_outdated_crt; @@ -673,7 +662,7 @@ namespace vcpkg::PostBuildLint "Running command:\n %s\n failed", Strings::to_utf8(cmd_line)); - for (const OutdatedDynamicCrt& outdated_crt : outdated_crts) + for (const OutdatedDynamicCrt& outdated_crt : get_outdated_dynamic_crts()) { if (std::regex_search(ec_data.output.cbegin(), ec_data.output.cend(), outdated_crt.regex)) { -- cgit v1.2.3 From eb66ce1b46fb07d4fec20c77001e24d0dd7ddf50 Mon Sep 17 00:00:00 2001 From: Han Hu Date: Sat, 22 Jul 2017 19:28:16 +0800 Subject: embree port --- ports/embree/CONTROL | 4 ++++ ports/embree/portfile.cmake | 50 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 ports/embree/CONTROL create mode 100644 ports/embree/portfile.cmake diff --git a/ports/embree/CONTROL b/ports/embree/CONTROL new file mode 100644 index 000000000..3f4ff53a1 --- /dev/null +++ b/ports/embree/CONTROL @@ -0,0 +1,4 @@ +Source: embree +Version: 2.16.4-1 +Description: High Performance Ray Tracing Kernels. +Build-Depends: tbb diff --git a/ports/embree/portfile.cmake b/ports/embree/portfile.cmake new file mode 100644 index 000000000..8d054d3ab --- /dev/null +++ b/ports/embree/portfile.cmake @@ -0,0 +1,50 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/embree-2.16.4) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/embree/embree/archive/v2.16.4.zip" + FILENAME "embree-2.16.4.zip" + SHA512 d26d31c7866c072d562dd824af02c90a1bc0302a2765fa6101925956f9b61870e45a4f0a54edae87d07a63aa4687f4244e3e5554491729ea31b617e87d02fb11 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(REMOVE ${SOURCE_PATH}/common/cmake/FindTBB.cmake) + +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(EMBREE_STATIC_RUNTIME ON) +else() + set(EMBREE_STATIC_RUNTIME OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DEMBREE_ISPC_SUPPORT=OFF + -DEMBREE_TUTORIALS=OFF + -DEMBREE_STATIC_RUNTIME=${EMBREE_STATIC_RUNTIME} + "-DTBB_LIBRARIES=TBB::tbb" + "-DTBB_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include" +) + +# just wait, the release build of embree is insanely slow in MSVC +# a single file will took about 2-10 min +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# these cmake files do not seem to contain helpful configuration for find libs, just remove them +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config-version.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config-version.cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/models) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/models) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/embree) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/share/embree/doc) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/embree) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/embree/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/embree/copyright) -- cgit v1.2.3 From 11f540d7e9a3f43614196f45ab7e82ab3fbed03e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 24 Jul 2017 13:26:45 -0700 Subject: [vcpkg] Use _vsnprintf_s_l on Windows for locale-insensitivity. Avoid manual buffer management. --- toolsrc/src/vcpkg_Strings.cpp | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 77ff1a106..36d017f54 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -11,27 +11,49 @@ namespace vcpkg::Strings::details // Avoids C4244 warnings because of char<->int conversion that occur when using std::tolower() static char tolower_char(const char c) { return static_cast(std::tolower(c)); } +#if defined(_WIN32) static _locale_t& c_locale() { static _locale_t c_locale_impl = _create_locale(LC_ALL, "C"); return c_locale_impl; } + static int plat_vsnprintf(_Out_writes_z_(bufsz) char* const buffer, + _In_ size_t const bufsz, + _In_z_ _Printf_format_string_params_(1) char const* const fmtstr, + va_list args) + { + return _vsnprintf_s_l(buffer, bufsz, bufsz, fmtstr, c_locale(), args); + } + static int plat_vswprintf(_Out_writes_z_(bufsz) wchar_t* const buffer, + _In_ size_t const bufsz, + _In_z_ _Printf_format_string_params_(1) wchar_t const* const fmtstr, + va_list args) + { + return _vsnwprintf_s_l(buffer, bufsz, bufsz, fmtstr, c_locale(), args); + } +#else + static int plat_vsnprintf(char* buffer, size_t bufsz, const char* fmtstr, va_list args) + { + return vsnprintf(buffer, bufsz, fmtstr, args); + } + static int plat_vswprintf(char* buffer, size_t bufsz, const char* fmtstr, va_list args) + { + return vswprintf(buffer, bufsz, fmtstr, args); + } +#endif std::string format_internal(const char* fmtstr, ...) { va_list args; va_start(args, fmtstr); - int sz = vsnprintf(nullptr, 0, fmtstr, args) + 1; + int sz = plat_vsnprintf(nullptr, 0, fmtstr, args); - char* buffer = new char[sz]; + std::string output(sz, '\0'); - vsnprintf(buffer, sz, fmtstr, args); + plat_vsnprintf(&output.at(0), output.size() + 1, fmtstr, args); va_end(args); - std::string output(buffer); - delete[] buffer; - return output; } @@ -40,16 +62,13 @@ namespace vcpkg::Strings::details va_list args; va_start(args, fmtstr); - int sz = vswprintf(nullptr, 0, fmtstr, args) + 1; + int sz = plat_vswprintf(nullptr, 0, fmtstr, args); - wchar_t* buffer = new wchar_t[sz]; + std::wstring output(sz, L'\0'); - vswprintf(buffer, sz, fmtstr, args); + plat_vswprintf(&output.at(0), output.size() + 1, fmtstr, args); va_end(args); - std::wstring output(buffer); - delete[] buffer; - return output; } } -- cgit v1.2.3 From c0af06a69141b251f84f75588c18013889a99f76 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 24 Jul 2017 13:34:18 -0700 Subject: [vcpkg] Revert #1450, pending bugfix. --- toolsrc/src/vcpkg_Strings.cpp | 51 ++++++++++--------------------------------- 1 file changed, 11 insertions(+), 40 deletions(-) diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 36d017f54..aafed5fd3 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -11,63 +11,34 @@ namespace vcpkg::Strings::details // Avoids C4244 warnings because of char<->int conversion that occur when using std::tolower() static char tolower_char(const char c) { return static_cast(std::tolower(c)); } -#if defined(_WIN32) static _locale_t& c_locale() { static _locale_t c_locale_impl = _create_locale(LC_ALL, "C"); return c_locale_impl; } - static int plat_vsnprintf(_Out_writes_z_(bufsz) char* const buffer, - _In_ size_t const bufsz, - _In_z_ _Printf_format_string_params_(1) char const* const fmtstr, - va_list args) - { - return _vsnprintf_s_l(buffer, bufsz, bufsz, fmtstr, c_locale(), args); - } - static int plat_vswprintf(_Out_writes_z_(bufsz) wchar_t* const buffer, - _In_ size_t const bufsz, - _In_z_ _Printf_format_string_params_(1) wchar_t const* const fmtstr, - va_list args) - { - return _vsnwprintf_s_l(buffer, bufsz, bufsz, fmtstr, c_locale(), args); - } -#else - static int plat_vsnprintf(char* buffer, size_t bufsz, const char* fmtstr, va_list args) - { - return vsnprintf(buffer, bufsz, fmtstr, args); - } - static int plat_vswprintf(char* buffer, size_t bufsz, const char* fmtstr, va_list args) - { - return vswprintf(buffer, bufsz, fmtstr, args); - } -#endif std::string format_internal(const char* fmtstr, ...) { - va_list args; - va_start(args, fmtstr); - - int sz = plat_vsnprintf(nullptr, 0, fmtstr, args); + va_list lst; + va_start(lst, fmtstr); + const int sz = _vscprintf_l(fmtstr, c_locale(), lst); std::string output(sz, '\0'); - - plat_vsnprintf(&output.at(0), output.size() + 1, fmtstr, args); - va_end(args); + _vsnprintf_s_l(&output[0], output.size() + 1, output.size() + 1, fmtstr, c_locale(), lst); + va_end(lst); return output; } std::wstring wformat_internal(const wchar_t* fmtstr, ...) { - va_list args; - va_start(args, fmtstr); - - int sz = plat_vswprintf(nullptr, 0, fmtstr, args); - - std::wstring output(sz, L'\0'); + va_list lst; + va_start(lst, fmtstr); - plat_vswprintf(&output.at(0), output.size() + 1, fmtstr, args); - va_end(args); + const int sz = _vscwprintf_l(fmtstr, c_locale(), lst); + std::wstring output(sz, '\0'); + _vsnwprintf_s_l(&output[0], output.size() + 1, output.size() + 1, fmtstr, c_locale(), lst); + va_end(lst); return output; } -- cgit v1.2.3 From 3c841c6128ebfe8e99a372f2907bd985b533a799 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 24 Jul 2017 13:59:53 -0700 Subject: [vcpkg] Revert revert. Bug fixed. --- toolsrc/src/vcpkg_Strings.cpp | 49 ++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index aafed5fd3..0c1c1f9f9 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -1,5 +1,6 @@ #include "pch.h" +#include "vcpkg_Checks.h" #include "vcpkg_Strings.h" #include "vcpkg_Util.h" @@ -11,34 +12,58 @@ namespace vcpkg::Strings::details // Avoids C4244 warnings because of char<->int conversion that occur when using std::tolower() static char tolower_char(const char c) { return static_cast(std::tolower(c)); } +#if defined(_WIN32) static _locale_t& c_locale() { static _locale_t c_locale_impl = _create_locale(LC_ALL, "C"); return c_locale_impl; } +#endif std::string format_internal(const char* fmtstr, ...) { - va_list lst; - va_start(lst, fmtstr); + va_list args; + va_start(args, fmtstr); + +#if defined(_WIN32) + const int sz = _vscprintf_l(fmtstr, c_locale(), args); +#else + const int sz = vsnprintf(nullptr, 0, fmtstr, args); +#endif + Checks::check_exit(VCPKG_LINE_INFO, sz > 0); - const int sz = _vscprintf_l(fmtstr, c_locale(), lst); std::string output(sz, '\0'); - _vsnprintf_s_l(&output[0], output.size() + 1, output.size() + 1, fmtstr, c_locale(), lst); - va_end(lst); + +#if defined(_WIN32) + _vsnprintf_s_l(&output.at(0), output.size() + 1, output.size(), fmtstr, c_locale(), args); +#else + vsnprintf(&output.at(0), output.size() + 1, fmtstr, args); +#endif + va_end(args); return output; } std::wstring wformat_internal(const wchar_t* fmtstr, ...) { - va_list lst; - va_start(lst, fmtstr); - - const int sz = _vscwprintf_l(fmtstr, c_locale(), lst); - std::wstring output(sz, '\0'); - _vsnwprintf_s_l(&output[0], output.size() + 1, output.size() + 1, fmtstr, c_locale(), lst); - va_end(lst); + va_list args; + va_start(args, fmtstr); + +#if defined(_WIN32) + const int sz = _vscwprintf_l(fmtstr, c_locale(), args); +#else + const int sz = vswprintf(nullptr, 0, fmtstr, args); +#endif + Checks::check_exit(VCPKG_LINE_INFO, sz > 0); + + std::wstring output(sz, L'\0'); + +#if defined(_WIN32) + _vsnwprintf_s_l(&output.at(0), output.size() + 1, output.size(), fmtstr, c_locale(), args); +#else + vswprintf(&output.at(0), output.size() + 1, fmtstr, args); +#endif + va_end(args); return output; } -- cgit v1.2.3 From 59389ca236b005922cf1101f66c957d2396f6371 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Wed, 19 Jul 2017 14:29:28 -0700 Subject: end to end feature pkg draft --- toolsrc/include/BinaryParagraph.h | 3 + toolsrc/include/PackageSpec.h | 6 +- toolsrc/include/SourceParagraph.h | 1 + toolsrc/include/vcpkg_Build.h | 23 ++++++- toolsrc/include/vcpkg_Commands.h | 1 + toolsrc/include/vcpkg_Dependencies.h | 34 ++++++---- toolsrc/src/BinaryParagraph.cpp | 15 ++++- toolsrc/src/PackageSpec.cpp | 47 +++++++++++--- toolsrc/src/commands_install.cpp | 38 ++++++++++- toolsrc/src/commands_remove.cpp | 2 +- toolsrc/src/test_install_plan.cpp | 118 ++++++++++++++++++++++++++++++----- toolsrc/src/tests_paragraph.cpp | 20 +++--- toolsrc/src/vcpkg_Build.cpp | 62 +++++++++++++++--- toolsrc/src/vcpkg_Dependencies.cpp | 88 +++++++++++++------------- toolsrc/src/vcpkg_Input.cpp | 27 ++------ toolsrc/src/vcpkg_Parse.cpp | 12 ---- 16 files changed, 359 insertions(+), 138 deletions(-) diff --git a/toolsrc/include/BinaryParagraph.h b/toolsrc/include/BinaryParagraph.h index 4adde5e36..f411b3c39 100644 --- a/toolsrc/include/BinaryParagraph.h +++ b/toolsrc/include/BinaryParagraph.h @@ -14,6 +14,9 @@ namespace vcpkg BinaryParagraph(); explicit BinaryParagraph(std::unordered_map fields); BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet); + BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, + const FeatureParagraph& fpgh, + const Triplet& triplet); std::string displayname() const; diff --git a/toolsrc/include/PackageSpec.h b/toolsrc/include/PackageSpec.h index 62b6fc9de..15b5e5b9b 100644 --- a/toolsrc/include/PackageSpec.h +++ b/toolsrc/include/PackageSpec.h @@ -1,5 +1,6 @@ #pragma once #include "PackageSpecParseResult.h" +#include "SourceParagraph.h" #include "Triplet.h" #include "vcpkg_expected.h" @@ -7,8 +8,6 @@ namespace vcpkg { struct PackageSpec { - static ExpectedT from_string(const std::string& spec_as_string, - const Triplet& default_triplet); static std::string to_string(const std::string& name, const Triplet& triplet); static ExpectedT from_name_and_triplet(const std::string& name, const Triplet& triplet); @@ -30,6 +29,9 @@ namespace vcpkg { PackageSpec package_spec; std::vector features; + + static ExpectedT from_string(const std::string& spec_as_string, + const Triplet& default_triplet); }; bool operator==(const PackageSpec& left, const PackageSpec& right); diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index e85884b51..7ddf999cc 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -60,6 +60,7 @@ namespace vcpkg std::vector filter_dependencies(const std::vector& deps, const Triplet& t); + // zlib[uwp] becomes Dependency{"zlib", "uwp"} std::vector expand_qualified_dependencies(const std::vector& depends); std::vector parse_comma_list(const std::string& str); diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h index 9a4e2baeb..c4f3e6746 100644 --- a/toolsrc/include/vcpkg_Build.h +++ b/toolsrc/include/vcpkg_Build.h @@ -95,14 +95,35 @@ namespace vcpkg::Build const Triplet& triplet, fs::path&& port_dir, const BuildPackageOptions& build_package_options) - : src(src), triplet(triplet), port_dir(std::move(port_dir)), build_package_options(build_package_options) + : src(src) + , scf(nullptr) + , triplet(triplet) + , port_dir(std::move(port_dir)) + , build_package_options(build_package_options) + , feature_list(nullptr) + { + } + + BuildPackageConfig(const SourceControlFile& src, + const Triplet& triplet, + fs::path&& port_dir, + const BuildPackageOptions& build_package_options, + const std::unordered_set& feature_list) + : src(*src.core_paragraph) + , scf(&src) + , triplet(triplet) + , port_dir(std::move(port_dir)) + , build_package_options(build_package_options) + , feature_list(&feature_list) { } const SourceParagraph& src; + const SourceControlFile* scf; const Triplet& triplet; fs::path port_dir; const BuildPackageOptions& build_package_options; + const std::unordered_set* feature_list; }; ExtendedBuildResult build_package(const VcpkgPaths& paths, diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 67319f240..8348a64e4 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -77,6 +77,7 @@ namespace vcpkg::Commands namespace Remove { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); + void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db); } namespace Update diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index ff559c0f1..e3af0fd28 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -26,12 +26,6 @@ namespace vcpkg::Dependencies Optional source_paragraph; Optional source_control_file; }; - - struct ClusterNode - { - std::vector status_paragraphs; - Optional source_paragraph; - }; } namespace vcpkg::Dependencies @@ -48,11 +42,13 @@ namespace vcpkg::Dependencies std::vector build_edges; bool plus = false; }; - std::vector to_feature_specs(const std::vector depends, - const std::unordered_map str_to_spec); + std::vector to_feature_specs(const std::vector& depends, const Triplet& t); + struct Cluster { - ClusterNode cluster_data; + std::vector status_paragraphs; + Optional source_control_file; + PackageSpec spec; std::unordered_map edges; std::unordered_set to_install_features; std::unordered_set original_features; @@ -65,6 +61,13 @@ namespace vcpkg::Dependencies Cluster& operator=(const Cluster&) = delete; }; + struct ClusterPtr + { + Cluster* ptr; + }; + + bool operator==(const ClusterPtr& l, const ClusterPtr& r); + enum class InstallPlanType { UNKNOWN, @@ -181,12 +184,21 @@ namespace vcpkg::Dependencies const StatusParagraphs& status_db); } +template<> +struct std::hash +{ + size_t operator()(const vcpkg::Dependencies::ClusterPtr& value) const + { + return std::hash()(value.ptr->spec); + } +}; + namespace vcpkg::Dependencies { struct GraphPlan { - Graphs::Graph remove_graph; - Graphs::Graph install_graph; + Graphs::Graph remove_graph; + Graphs::Graph install_graph; }; bool mark_plus(const std::string& feature, Cluster& cluster, diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp index e126054a8..b6f3e8a87 100644 --- a/toolsrc/src/BinaryParagraph.cpp +++ b/toolsrc/src/BinaryParagraph.cpp @@ -75,6 +75,16 @@ namespace vcpkg this->depends = filter_dependencies(spgh.depends, triplet); } + BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet) + { + this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO); + this->version = ""; + this->feature = fpgh.name; + this->description = fpgh.description; + this->maintainer = ""; + this->depends = filter_dependencies(fpgh.depends, triplet); + } + std::string BinaryParagraph::displayname() const { return this->spec.to_string(); } std::string BinaryParagraph::dir() const { return this->spec.dir(); } @@ -87,7 +97,10 @@ namespace vcpkg void serialize(const BinaryParagraph& pgh, std::string& out_str) { out_str.append("Package: ").append(pgh.spec.name()).push_back('\n'); - out_str.append("Version: ").append(pgh.version).push_back('\n'); + if (!pgh.version.empty()) + out_str.append("Version: ").append(pgh.version).push_back('\n'); + else if (!pgh.feature.empty()) + out_str.append("Feature: ").append(pgh.feature).push_back('\n'); if (!pgh.depends.empty()) { out_str.append("Depends: "); diff --git a/toolsrc/src/PackageSpec.cpp b/toolsrc/src/PackageSpec.cpp index 12217ac98..a7e5648cd 100644 --- a/toolsrc/src/PackageSpec.cpp +++ b/toolsrc/src/PackageSpec.cpp @@ -10,13 +10,47 @@ namespace vcpkg return (c == '-') || isdigit(c) || (isalpha(c) && islower(c)) || (c == '[') || (c == ']'); } - ExpectedT PackageSpec::from_string(const std::string& spec_as_string, - const Triplet& default_triplet) + ExpectedT FullPackageSpec::from_string(const std::string& spec_as_string, + const Triplet& default_triplet) { auto pos = spec_as_string.find(':'); - if (pos == std::string::npos) + auto pos_l_bracket = spec_as_string.find('['); + auto pos_r_bracket = spec_as_string.find(']'); + + FullPackageSpec f; + if (pos == std::string::npos && pos_l_bracket == std::string::npos) + { + f.package_spec = + PackageSpec::from_name_and_triplet(spec_as_string, default_triplet).value_or_exit(VCPKG_LINE_INFO); + return f; + } + else if (pos == std::string::npos) + { + if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket) + { + return PackageSpecParseResult::INVALID_CHARACTERS; + } + const std::string name = spec_as_string.substr(0, pos_l_bracket); + f.package_spec = PackageSpec::from_name_and_triplet(name, default_triplet).value_or_exit(VCPKG_LINE_INFO); + f.features = parse_comma_list(spec_as_string.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1)); + return f; + } + else if (pos_l_bracket == std::string::npos && pos_r_bracket == std::string::npos) + { + const std::string name = spec_as_string.substr(0, pos); + const Triplet triplet = Triplet::from_canonical_name(spec_as_string.substr(pos + 1)); + f.package_spec = PackageSpec::from_name_and_triplet(name, triplet).value_or_exit(VCPKG_LINE_INFO); + } + else { - return from_name_and_triplet(spec_as_string, default_triplet); + if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket) + { + return PackageSpecParseResult::INVALID_CHARACTERS; + } + const std::string name = spec_as_string.substr(0, pos_l_bracket); + f.features = parse_comma_list(spec_as_string.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1)); + const Triplet triplet = Triplet::from_canonical_name(spec_as_string.substr(pos + 1)); + f.package_spec = PackageSpec::from_name_and_triplet(name, triplet).value_or_exit(VCPKG_LINE_INFO); } auto pos2 = spec_as_string.find(':', pos + 1); @@ -24,10 +58,7 @@ namespace vcpkg { return PackageSpecParseResult::TOO_MANY_COLONS; } - - const std::string name = spec_as_string.substr(0, pos); - const Triplet triplet = Triplet::from_canonical_name(spec_as_string.substr(pos + 1)); - return from_name_and_triplet(name, triplet); + return f; } ExpectedT PackageSpec::from_name_and_triplet(const std::string& name, diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index d340a9cf8..2ce5b6c62 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -16,6 +16,8 @@ namespace vcpkg::Commands::Install using Dependencies::InstallPlanAction; using Dependencies::RequestType; using Dependencies::InstallPlanType; + using Dependencies::RemovePlanAction; + using Dependencies::RemovePlanType; InstallDir InstallDir::from_destination_root(const fs::path& destination_root, const std::string& destination_subdirectory, @@ -290,7 +292,7 @@ namespace vcpkg::Commands::Install return BuildResult::SUCCEEDED; } - if (plan_type == InstallPlanType::BUILD_AND_INSTALL) + if (plan_type == InstallPlanType::BUILD_AND_INSTALL && !g_feature_packages) { if (use_head_version) System::println("Building package %s from HEAD... ", display_name); @@ -318,7 +320,36 @@ namespace vcpkg::Commands::Install return BuildResult::SUCCEEDED; } - if (plan_type == InstallPlanType::INSTALL) + if (plan_type == InstallPlanType::BUILD_AND_INSTALL && g_feature_packages) + { + if (use_head_version) + System::println("Building package %s from HEAD... ", display_name); + else + System::println("Building package %s... ", display_name); + + const Build::BuildPackageConfig build_config{ + *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), + action.spec.triplet(), + paths.port_dir(action.spec), + build_package_options, + action.feature_list}; + const auto result = Build::build_package(paths, build_config, status_db); + if (result.code != Build::BuildResult::SUCCEEDED) + { + System::println(System::Color::error, Build::create_error_message(result.code, action.spec)); + return result.code; + } + System::println("Building package %s... done", display_name); + + const BinaryParagraph bpgh = + Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); + System::println("Installing package %s... ", display_name); + install_package(paths, bpgh, &status_db); + System::println(System::Color::success, "Installing package %s... done", display_name); + return BuildResult::SUCCEEDED; + } + + if (plan_type == InstallPlanType::INSTALL && !g_feature_packages) { if (use_head_version && is_user_requested) { @@ -359,7 +390,8 @@ namespace vcpkg::Commands::Install // create the plan StatusParagraphs status_db = database_load_check(paths); - auto paths_port_file = Dependencies::PathsPortFile(paths); + + Dependencies::PathsPortFile paths_port_file(paths); std::vector install_plan = Dependencies::create_install_plan(paths_port_file, specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index e2b5d12a1..eabf2b9ae 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -14,7 +14,7 @@ namespace vcpkg::Commands::Remove using Dependencies::RequestType; using Update::OutdatedPackage; - static void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db) + void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db) { auto& fs = paths.get_filesystem(); StatusParagraph& pkg = **status_db->find(spec.name(), spec.triplet()); diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index 671b6ed67..d02af5662 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -13,13 +13,16 @@ namespace UnitTest1 struct PackageSpecMap { std::unordered_map map; + Triplet triplet; + PackageSpecMap(const Triplet& t) { triplet = t; } + PackageSpec get_package_spec(std::vector>&& fields) { auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(fields)); Assert::IsTrue(m_pgh.has_value()); auto& scf = *m_pgh.get(); - auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, Triplet::X86_WINDOWS); + auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, triplet); Assert::IsTrue(spec.has_value()); map.emplace(*spec.get(), std::move(*scf.get())); return PackageSpec{*spec.get()}; @@ -32,11 +35,14 @@ namespace UnitTest1 static void features_check(Dependencies::AnyAction* install_action, std::string pkg_name, - std::vector vec) + std::vector vec, + const Triplet& triplet = Triplet::X86_WINDOWS) { - const auto& plan = *install_action->install_plan.get(); + const auto& plan = install_action->install_plan.value_or_exit(VCPKG_LINE_INFO); const auto& feature_list = plan.feature_list; + Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); + Assert::AreEqual(pkg_name.c_str(), (*plan.any_paragraph.source_control_file.get())->core_paragraph->name.c_str()); Assert::AreEqual(size_t(vec.size()), feature_list.size()); @@ -53,16 +59,20 @@ namespace UnitTest1 } } - static void remove_plan_check(Dependencies::AnyAction* install_action, std::string pkg_name) + static void remove_plan_check(Dependencies::AnyAction* remove_action, + std::string pkg_name, + const Triplet& triplet = Triplet::X86_WINDOWS) { - Assert::AreEqual(pkg_name.c_str(), install_action->remove_plan.get()->spec.name().c_str()); + const auto& plan = remove_action->remove_plan.value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); + Assert::AreEqual(pkg_name.c_str(), plan.spec.name().c_str()); } TEST_METHOD(basic_install_scheme) { std::vector> status_paragraphs; - PackageSpecMap spec_map; + PackageSpecMap spec_map(Triplet::X86_WINDOWS); auto spec_a = spec_map.set_package_map("a", "1.2.8", "b"); auto spec_b = spec_map.set_package_map("b", "1.3", "c"); auto spec_c = spec_map.set_package_map("c", "2.5.3", ""); @@ -81,7 +91,7 @@ namespace UnitTest1 { std::vector> status_paragraphs; - PackageSpecMap spec_map; + PackageSpecMap spec_map(Triplet::X86_WINDOWS); auto spec_a = spec_map.set_package_map("a", "1.2.8", "d"); auto spec_b = spec_map.set_package_map("b", "1.3", "d, e"); auto spec_c = spec_map.set_package_map("c", "2.5.3", "e, h"); @@ -134,7 +144,7 @@ namespace UnitTest1 {"Depends", ""}, {"Status", "install ok installed"}})); - PackageSpecMap spec_map; + PackageSpecMap spec_map(Triplet::X86_WINDOWS); auto spec_a = spec_map.set_package_map("a", "1.2.8", "b, c, d, e, f, g, h, j, k"); auto spec_b = spec_map.set_package_map("b", "1.2.8", "c, d, e, f, g, h, j, k"); @@ -188,7 +198,7 @@ namespace UnitTest1 {"Depends", ""}, {"Status", "install ok installed"}})); - PackageSpecMap spec_map; + PackageSpecMap spec_map(Triplet::X86_WINDOWS); auto spec_a = FullPackageSpec{spec_map.get_package_spec({ {{"Source", "a"}, {"Version", "1.3.8"}, {"Build-Depends", "b, b[beefeatureone]"}}, @@ -220,7 +230,7 @@ namespace UnitTest1 std::vector> status_paragraphs; - PackageSpecMap spec_map; + PackageSpecMap spec_map(Triplet::X86_WINDOWS); auto spec_a = FullPackageSpec{spec_map.get_package_spec( @@ -259,7 +269,7 @@ namespace UnitTest1 {"Depends", ""}, {"Status", "install ok installed"}})); - PackageSpecMap spec_map; + PackageSpecMap spec_map(Triplet::X86_WINDOWS); auto spec_a = FullPackageSpec{ spec_map.get_package_spec( @@ -303,7 +313,7 @@ namespace UnitTest1 {"Depends", ""}, {"Status", "install ok installed"}})); - PackageSpecMap spec_map; + PackageSpecMap spec_map(Triplet::X86_WINDOWS); auto spec_a = FullPackageSpec{ spec_map.get_package_spec( @@ -331,7 +341,7 @@ namespace UnitTest1 std::vector> status_paragraphs; - PackageSpecMap spec_map; + PackageSpecMap spec_map(Triplet::X86_WINDOWS); auto spec_a = FullPackageSpec{ spec_map.get_package_spec( @@ -366,7 +376,7 @@ namespace UnitTest1 {"Multi-Arch", "same"}, {"Depends", ""}, {"Status", "install ok installed"}})); - PackageSpecMap spec_map; + PackageSpecMap spec_map(Triplet::X86_WINDOWS); auto spec_a = FullPackageSpec{spec_map.get_package_spec({ {{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b[core]"}}, @@ -407,7 +417,7 @@ namespace UnitTest1 {"Multi-Arch", "same"}, {"Depends", ""}, {"Status", "install ok installed"}})); - PackageSpecMap spec_map; + PackageSpecMap spec_map(Triplet::X86_WINDOWS); auto spec_a = FullPackageSpec{spec_map.get_package_spec({ {{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", ""}}, @@ -435,5 +445,83 @@ namespace UnitTest1 features_check(&install_plan[3], "x", {"core"}); features_check(&install_plan[4], "b", {"core", "1"}); } + + TEST_METHOD(basic_feature_test_8) + { + using Pgh = std::unordered_map; + + std::vector> status_paragraphs; + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, + {"Default-Features", ""}, + {"Version", "1.3"}, + {"Architecture", "x64-windows"}, + {"Multi-Arch", "same"}, + {"Depends", ""}, + {"Status", "install ok installed"}})); + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, + {"Default-Features", ""}, + {"Version", "1.3"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", ""}, + {"Status", "install ok installed"}})); + + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + + auto spec_a_64 = FullPackageSpec{ + spec_map.get_package_spec( + {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b"}}, + {{"Feature", "one"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}}), + {"core"}}; + auto spec_b_64 = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, + })}; + auto spec_c_64 = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "c"}, {"Version", "1.3"}, {"Build-Depends", "a[one]"}}, + }), + {"core"}}; + + spec_map.triplet = Triplet::X86_WINDOWS; + auto spec_a_86 = FullPackageSpec{ + spec_map.get_package_spec( + {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b"}}, + {{"Feature", "one"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}}), + {"core"}}; + auto spec_b_86 = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, + })}; + auto spec_c_86 = FullPackageSpec{spec_map.get_package_spec({ + {{"Source", "c"}, {"Version", "1.3"}, {"Build-Depends", "a[one]"}}, + }), + {"core"}}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + {spec_c_64, spec_a_86, spec_a_64, spec_c_86}, + StatusParagraphs(std::move(status_paragraphs))); + + /*Assert::AreEqual(size_t(8), install_plan.size()); + auto iterator_pos = [&](const PackageSpec& spec, size_t start) -> int { + auto it = std::find_if(install_plan.begin() + start, install_plan.end(), [&](auto& action) { + return action.spec == spec; + }); + Assert::IsTrue(it != install_plan.end()); + return (int)(it - install_plan.begin()); + }; + int a_64_1 = iterator_pos(spec_a_64.package_spec, 0), a_86_1 = iterator_pos(spec_a_86.package_spec, 0), + b_64 = iterator_pos(spec_b_64.package_spec, 0), b_86 = iterator_pos(spec_b_86.package_spec, 0), + c_64 = iterator_pos(spec_c_64.package_spec, 0), c_86 = iterator_pos(spec_c_86.package_spec, 0), + a_64_2 = iterator_pos(spec_a_64.package_spec, a_64_1 + 1), + a_86_2 = iterator_pos(spec_a_86.package_spec, a_86_1 + 1);*/ + + remove_plan_check(&install_plan[0], "a", Triplet::X64_WINDOWS); + remove_plan_check(&install_plan[1], "a"); + features_check(&install_plan[2], "b", {"core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[3], "a", {"one", "core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[4], "c", {"core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[5], "b", {"core"}); + features_check(&install_plan[6], "a", {"one", "core"}); + features_check(&install_plan[7], "c", {"core"}); + } }; } \ No newline at end of file diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests_paragraph.cpp index 2a53cc8b4..dd9a40160 100644 --- a/toolsrc/src/tests_paragraph.cpp +++ b/toolsrc/src/tests_paragraph.cpp @@ -372,25 +372,27 @@ namespace UnitTest1 TEST_METHOD(package_spec_parse) { - vcpkg::ExpectedT spec = - vcpkg::PackageSpec::from_string("zlib", vcpkg::Triplet::X86_WINDOWS); + vcpkg::ExpectedT spec = + vcpkg::FullPackageSpec::from_string("zlib", vcpkg::Triplet::X86_WINDOWS); Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, spec.error()); - Assert::AreEqual("zlib", spec.get()->name().c_str()); - Assert::AreEqual(vcpkg::Triplet::X86_WINDOWS.canonical_name(), spec.get()->triplet().canonical_name()); + Assert::AreEqual("zlib", spec.get()->package_spec.name().c_str()); + Assert::AreEqual(vcpkg::Triplet::X86_WINDOWS.canonical_name(), + spec.get()->package_spec.triplet().canonical_name()); } TEST_METHOD(package_spec_parse_with_arch) { - vcpkg::ExpectedT spec = - vcpkg::PackageSpec::from_string("zlib:x64-uwp", vcpkg::Triplet::X86_WINDOWS); + vcpkg::ExpectedT spec = + vcpkg::FullPackageSpec::from_string("zlib:x64-uwp", vcpkg::Triplet::X86_WINDOWS); Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, spec.error()); - Assert::AreEqual("zlib", spec.get()->name().c_str()); - Assert::AreEqual(vcpkg::Triplet::X64_UWP.canonical_name(), spec.get()->triplet().canonical_name()); + Assert::AreEqual("zlib", spec.get()->package_spec.name().c_str()); + Assert::AreEqual(vcpkg::Triplet::X64_UWP.canonical_name(), + spec.get()->package_spec.triplet().canonical_name()); } TEST_METHOD(package_spec_parse_with_multiple_colon) { - auto ec = vcpkg::PackageSpec::from_string("zlib:x86-uwp:", vcpkg::Triplet::X86_WINDOWS).error(); + auto ec = vcpkg::FullPackageSpec::from_string("zlib:x86-uwp:", vcpkg::Triplet::X86_WINDOWS).error(); Assert::AreEqual(vcpkg::PackageSpecParseResult::TOO_MANY_COLONS, ec); } diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index c794b5ede..a0d690f37 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -102,6 +102,17 @@ namespace vcpkg::Build paths.get_filesystem().write_contents(binary_control_file, Strings::serialize(bpgh)); } + static void create_binary_feature_control_file(const VcpkgPaths& paths, + const SourceParagraph& source_paragraph, + const FeatureParagraph& feature_paragraph, + const Triplet& triplet, + const BuildInfo& build_info) + { + BinaryParagraph bpgh = BinaryParagraph(source_paragraph, feature_paragraph, triplet); + const fs::path binary_control_file = paths.packages / bpgh.dir() / "CONTROL"; + paths.get_filesystem().write_contents(binary_control_file, Strings::serialize(bpgh)); + } + ExtendedBuildResult build_package(const VcpkgPaths& paths, const BuildPackageConfig& config, const StatusParagraphs& status_db) @@ -135,17 +146,36 @@ namespace vcpkg::Build const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset); const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); + std::string features; + if (g_feature_packages) + { + if (config.feature_list) + { + for (auto&& feature : *config.feature_list) + { + features.append(feature + ";"); + } + if (features.size() > 0) + { + features.pop_back(); + } + } + } + const std::wstring cmd_launch_cmake = make_cmake_cmd( cmake_exe_path, ports_cmake_script_path, - {{L"CMD", L"BUILD"}, - {L"PORT", config.src.name}, - {L"CURRENT_PORT_DIR", config.port_dir / "/."}, - {L"TARGET_TRIPLET", triplet.canonical_name()}, - {L"VCPKG_PLATFORM_TOOLSET", toolset.version}, - {L"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? L"1" : L"0"}, - {L"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? L"1" : L"0"}, - {L"GIT", git_exe_path}}); + { + {L"CMD", L"BUILD"}, + {L"PORT", config.src.name}, + {L"CURRENT_PORT_DIR", config.port_dir / "/."}, + {L"TARGET_TRIPLET", triplet.canonical_name()}, + {L"VCPKG_PLATFORM_TOOLSET", toolset.version}, + {L"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? L"1" : L"0"}, + {L"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? L"1" : L"0"}, + {L"GIT", git_exe_path}, + {L"FEATURES", features}, + }); const std::wstring command = Strings::wformat(LR"(%s && %s)", cmd_set_environment, cmd_launch_cmake); @@ -170,7 +200,21 @@ namespace vcpkg::Build { return {BuildResult::POST_BUILD_CHECKS_FAILED, {}}; } - + if (g_feature_packages) + { + if (config.feature_list) + { + for (auto&& feature : *config.feature_list) + { + for (auto&& f_pgh : config.scf->feature_paragraphs) + { + if (f_pgh->name == feature) + create_binary_feature_control_file( + paths, *config.scf->core_paragraph, *f_pgh, triplet, build_info); + } + } + } + } create_binary_control_file(paths, config.src, triplet, build_info); // const fs::path port_buildtrees_dir = paths.buildtrees / spec.name; diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 90168813e..820e51b33 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -12,6 +12,8 @@ namespace vcpkg::Dependencies { + bool operator==(const ClusterPtr& l, const ClusterPtr& r) { return l.ptr == r.ptr; } + std::vector AnyParagraph::dependencies(const Triplet& triplet) const { auto to_package_specs = [&](const std::vector& dependencies_as_string) { @@ -337,8 +339,7 @@ namespace vcpkg::Dependencies return toposort; } - std::vector to_feature_specs(const std::vector depends, - const std::unordered_map str_to_spec) + std::vector to_feature_specs(const std::vector& depends, const Triplet& triplet) { std::vector f_specs; for (auto&& depend : depends) @@ -350,21 +351,16 @@ namespace vcpkg::Dependencies auto feature_name = depend.substr(start + 1, end - start - 1); auto package_name = depend.substr(0, start); - auto p_spec = str_to_spec.find(package_name); - if (p_spec != str_to_spec.end()) - { - auto feature_spec = FeatureSpec{p_spec->second, feature_name}; - f_specs.emplace_back(std::move(feature_spec)); - } + auto p_spec = PackageSpec::from_name_and_triplet(package_name, triplet).value_or_exit(VCPKG_LINE_INFO); + auto feature_spec = FeatureSpec{p_spec, feature_name}; + f_specs.emplace_back(std::move(feature_spec)); } else { - auto p_spec = str_to_spec.find(depend); - if (p_spec != str_to_spec.end()) - { - auto feature_spec = FeatureSpec{p_spec->second, ""}; - f_specs.emplace_back(std::move(feature_spec)); - } + auto p_spec = PackageSpec::from_name_and_triplet(depend, triplet).value_or_exit(VCPKG_LINE_INFO); + + auto feature_spec = FeatureSpec{p_spec, ""}; + f_specs.emplace_back(std::move(feature_spec)); } } return f_specs; @@ -405,7 +401,7 @@ namespace vcpkg::Dependencies mark_minus(cluster, pkg_to_cluster, graph_plan); } - graph_plan.install_graph.add_vertex(&cluster); + graph_plan.install_graph.add_vertex({&cluster}); auto& tracked = cluster.to_install_features; tracked.insert(updated_feature); if (tracked.find("core") == tracked.end() && tracked.find("") == tracked.end()) @@ -415,7 +411,7 @@ namespace vcpkg::Dependencies { auto& depend_cluster = pkg_to_cluster[depend.spec]; mark_plus(depend.feature_name, depend_cluster, pkg_to_cluster, graph_plan); - graph_plan.install_graph.add_edge(&cluster, &depend_cluster); + graph_plan.install_graph.add_edge({&cluster}, {&depend_cluster}); } } @@ -424,7 +420,7 @@ namespace vcpkg::Dependencies auto& depend_cluster = pkg_to_cluster[depend.spec]; mark_plus(depend.feature_name, depend_cluster, pkg_to_cluster, graph_plan); if (&depend_cluster == &cluster) continue; - graph_plan.install_graph.add_edge(&cluster, &depend_cluster); + graph_plan.install_graph.add_edge({&cluster}, {&depend_cluster}); } return true; } @@ -434,14 +430,14 @@ namespace vcpkg::Dependencies if (cluster.will_remove) return; cluster.will_remove = true; - graph_plan.remove_graph.add_vertex(&cluster); + graph_plan.remove_graph.add_vertex({&cluster}); for (auto&& pair : cluster.edges) { auto& remove_edges_edges = pair.second.remove_edges; for (auto&& depend : remove_edges_edges) { auto& depend_cluster = pkg_to_cluster[depend.spec]; - graph_plan.remove_graph.add_edge(&cluster, &depend_cluster); + graph_plan.remove_graph.add_edge({&cluster}, {&depend_cluster}); depend_cluster.transient_uninstalled = true; mark_minus(depend_cluster, pkg_to_cluster, graph_plan); } @@ -456,40 +452,37 @@ namespace vcpkg::Dependencies const std::vector& specs, const StatusParagraphs& status_db) { - const auto triplet = Triplet::X86_WINDOWS; std::unordered_map pkg_spec_to_package_node; - std::unordered_map str_to_spec; - - for (const auto& it : map) - { - str_to_spec.emplace(it.first.name(), it.first); - } for (const auto& it : map) { Cluster& node = pkg_spec_to_package_node[it.first]; + + node.spec = it.first; FeatureNodeEdges core_dependencies; - core_dependencies.build_edges = - to_feature_specs(filter_dependencies(it.second.core_paragraph->depends, triplet), str_to_spec); + auto core_depends = filter_dependencies(it.second.core_paragraph->depends, node.spec.triplet()); + core_dependencies.build_edges = to_feature_specs(core_depends, node.spec.triplet()); node.edges["core"] = std::move(core_dependencies); for (const auto& feature : it.second.feature_paragraphs) { FeatureNodeEdges added_edges; - added_edges.build_edges = to_feature_specs(filter_dependencies(feature->depends, triplet), str_to_spec); + auto depends = filter_dependencies(feature->depends, node.spec.triplet()); + added_edges.build_edges = to_feature_specs(depends, node.spec.triplet()); node.edges.emplace(feature->name, std::move(added_edges)); } - node.cluster_data.source_paragraph = &it.second; + node.source_control_file = &it.second; } - for (auto&& status_paragraph : status_db) + for (auto&& status_paragraph : get_installed_ports(status_db)) { auto& spec = status_paragraph->package.spec; auto& status_paragraph_feature = status_paragraph->package.feature; Cluster& cluster = pkg_spec_to_package_node[spec]; cluster.transient_uninstalled = false; - auto reverse_edges = to_feature_specs(status_paragraph->package.depends, str_to_spec); + auto reverse_edges = + to_feature_specs(status_paragraph->package.depends, status_paragraph->package.spec.triplet()); for (auto&& dependency : reverse_edges) { @@ -507,7 +500,7 @@ namespace vcpkg::Dependencies auto& target_node = pkg_node->second.edges[depends_name]; target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); } - cluster.cluster_data.status_paragraphs.emplace_back(*status_paragraph); + cluster.status_paragraphs.emplace_back(*status_paragraph); if (status_paragraph_feature == "") { cluster.original_features.insert("core"); @@ -528,35 +521,40 @@ namespace vcpkg::Dependencies } } - Graphs::GraphAdjacencyProvider adjacency_remove_graph(graph_plan.remove_graph.adjacency_list()); + Graphs::GraphAdjacencyProvider adjacency_remove_graph(graph_plan.remove_graph.adjacency_list()); auto remove_vertex_list = graph_plan.remove_graph.vertex_list(); auto remove_toposort = Graphs::topological_sort(remove_vertex_list, adjacency_remove_graph); - Graphs::GraphAdjacencyProvider adjacency_install_graph(graph_plan.install_graph.adjacency_list()); + Graphs::GraphAdjacencyProvider adjacency_install_graph(graph_plan.install_graph.adjacency_list()); auto insert_vertex_list = graph_plan.install_graph.vertex_list(); auto insert_toposort = Graphs::topological_sort(insert_vertex_list, adjacency_install_graph); std::vector install_plan; - for (auto&& cluster : remove_toposort) + for (auto&& like_cluster : remove_toposort) { - auto scf = *cluster->cluster_data.source_paragraph.get(); + auto scf = *like_cluster.ptr->source_control_file.get(); AnyAction any_plan; any_plan.remove_plan = RemovePlanAction{ - str_to_spec[scf->core_paragraph->name], RemovePlanType::REMOVE, RequestType::AUTO_SELECTED}; + PackageSpec::from_name_and_triplet(scf->core_paragraph->name, like_cluster.ptr->spec.triplet()) + .value_or_exit(VCPKG_LINE_INFO), + RemovePlanType::REMOVE, + RequestType::AUTO_SELECTED}; install_plan.emplace_back(std::move(any_plan)); } - for (auto&& cluster : insert_toposort) + for (auto&& like_cluster : insert_toposort) { - if (!cluster->transient_uninstalled) continue; - - auto scf = *cluster->cluster_data.source_paragraph.get(); - auto& pkg_spec = str_to_spec[scf->core_paragraph->name]; - auto action = InstallPlanAction{ - pkg_spec, map.find(pkg_spec)->second, cluster->to_install_features, RequestType::AUTO_SELECTED}; + if (!like_cluster.ptr->transient_uninstalled) continue; + + auto scf = *like_cluster.ptr->source_control_file.get(); + auto pkg_spec = + PackageSpec::from_name_and_triplet(scf->core_paragraph->name, like_cluster.ptr->spec.triplet()) + .value_or_exit(VCPKG_LINE_INFO); + auto action = + InstallPlanAction{pkg_spec, *scf, like_cluster.ptr->to_install_features, RequestType::AUTO_SELECTED}; AnyAction any_plan; any_plan.install_plan = std::move(action); diff --git a/toolsrc/src/vcpkg_Input.cpp b/toolsrc/src/vcpkg_Input.cpp index fdedd5507..f4e9a07c2 100644 --- a/toolsrc/src/vcpkg_Input.cpp +++ b/toolsrc/src/vcpkg_Input.cpp @@ -12,10 +12,10 @@ namespace vcpkg::Input CStringView example_text) { const std::string as_lowercase = Strings::ascii_to_lowercase(package_spec_as_string); - auto expected_spec = PackageSpec::from_string(as_lowercase, default_triplet); + auto expected_spec = FullPackageSpec::from_string(as_lowercase, default_triplet); if (auto spec = expected_spec.get()) { - return PackageSpec{*spec}; + return PackageSpec{spec->package_spec}; } // Intentionally show the lowercased string @@ -39,26 +39,11 @@ namespace vcpkg::Input const Triplet& default_triplet, CStringView example_text) { - int left_pos = (int)full_package_spec_as_string.find('['); - if (left_pos == std::string::npos) - { - return FullPackageSpec{ - check_and_get_package_spec(full_package_spec_as_string, default_triplet, example_text)}; - } - int right_pos = (int)full_package_spec_as_string.find(']'); - if (left_pos >= right_pos) - { - System::println(System::Color::error, "Error: Argument is not formatted correctly \"%s\""); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - std::string package_spec_as_string = full_package_spec_as_string.substr(0, left_pos); - const std::string as_lowercase = Strings::ascii_to_lowercase(package_spec_as_string); - auto expected_spec = PackageSpec::from_string(as_lowercase, default_triplet); - if (auto&& spec = expected_spec.get()) + const std::string as_lowercase = Strings::ascii_to_lowercase(full_package_spec_as_string); + auto expected_spec = FullPackageSpec::from_string(as_lowercase, default_triplet); + if (auto spec = expected_spec.get()) { - return {*spec, - parse_comma_list(full_package_spec_as_string.substr(left_pos + 1, right_pos - left_pos - 1))}; + return *spec; } // Intentionally show the lowercased string diff --git a/toolsrc/src/vcpkg_Parse.cpp b/toolsrc/src/vcpkg_Parse.cpp index b63ce41a9..659af2939 100644 --- a/toolsrc/src/vcpkg_Parse.cpp +++ b/toolsrc/src/vcpkg_Parse.cpp @@ -6,18 +6,6 @@ namespace vcpkg::Parse { - static Optional get_field(const std::unordered_map& fields, - const std::string& fieldname) - { - auto it = fields.find(fieldname); - if (it == fields.end()) - { - return nullopt; - } - - return it->second; - } - static Optional remove_field(std::unordered_map* fields, const std::string& fieldname) { -- cgit v1.2.3 From f650be847cce20aebf40031a45c57043d43f5562 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 25 Jul 2017 03:12:30 +0300 Subject: [hunspell] add version 1.6.1 --- ports/hunspell/0001_fix_unistd.patch | 78 ++++++++++++++++++ ports/hunspell/CMakeLists.txt | 151 +++++++++++++++++++++++++++++++++++ ports/hunspell/CONTROL | 3 + ports/hunspell/config.h.in | 35 ++++++++ ports/hunspell/portfile.cmake | 52 ++++++++++++ 5 files changed, 319 insertions(+) create mode 100644 ports/hunspell/0001_fix_unistd.patch create mode 100644 ports/hunspell/CMakeLists.txt create mode 100644 ports/hunspell/CONTROL create mode 100644 ports/hunspell/config.h.in create mode 100644 ports/hunspell/portfile.cmake diff --git a/ports/hunspell/0001_fix_unistd.patch b/ports/hunspell/0001_fix_unistd.patch new file mode 100644 index 000000000..79a48d824 --- /dev/null +++ b/ports/hunspell/0001_fix_unistd.patch @@ -0,0 +1,78 @@ +From 9f33c841afe51be517eaea318d46985c596c94ff Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Tue, 25 Jul 2017 01:58:39 +0300 +Subject: [PATCH] tools/hzip: fix build with MSVC + +--- + src/tools/hzip.cxx | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/tools/hzip.cxx b/src/tools/hzip.cxx +index ef1864f..d284c64 100644 +--- a/src/tools/hzip.cxx ++++ b/src/tools/hzip.cxx +@@ -41,7 +41,9 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif /* HAVE_UNISTD_H */ + #include + #include + +-- +2.12.2.windows.2 + +From 840f920bcd370668b9e788b3c8272eca1f20ce3a Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Tue, 25 Jul 2017 01:55:13 +0300 +Subject: [PATCH] tools/unmunch: fix build with MSVC + +--- + src/tools/unmunch.cxx | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/tools/unmunch.cxx b/src/tools/unmunch.cxx +index 44b4cb1..2144370 100644 +--- a/src/tools/unmunch.cxx ++++ b/src/tools/unmunch.cxx +@@ -42,7 +42,9 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif /* HAVE_UNISTD_H */ + #include + #include + #include +-- +2.12.2.windows.2 + +From 1c231aa84624082a0fa52d59be8c449bfe1fadd1 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Tue, 25 Jul 2017 01:50:21 +0300 +Subject: [PATCH] tools/munch: fix build with MSVC + +Include only if exists +--- + src/tools/munch.cxx | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/tools/munch.cxx b/src/tools/munch.cxx +index 17fc6fd..8503abe 100644 +--- a/src/tools/munch.cxx ++++ b/src/tools/munch.cxx +@@ -40,7 +40,9 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif /* HAVE_UNISTD_H */ + #include + #include + #include +-- +2.12.2.windows.2 diff --git a/ports/hunspell/CMakeLists.txt b/ports/hunspell/CMakeLists.txt new file mode 100644 index 000000000..c04e0e37c --- /dev/null +++ b/ports/hunspell/CMakeLists.txt @@ -0,0 +1,151 @@ +cmake_minimum_required(VERSION 3.0) +project(hunspell) + +#get hunspell version +file(STRINGS "configure.ac" CONFIGURE_AC_INIT REGEX "AC_INIT\\(\\[hunspell\\],\\[.*\\].*" ) +string(REGEX REPLACE "AC_INIT\\(\\[.*\\],\\[([0-9]+\\.[0-9]+\\.[0-9]+)\\].*" "\\1" VERSION ${CONFIGURE_AC_INIT}) +message(STATUS "Hunspell version: ${VERSION}") + +option(BUILD_SHARED_LIBS "Build shared libs" OFF) +option(ENABLE_NLS "Define if translation of program messages to the user's native language is requested" OFF) +option(HUNSPELL_WARNING_ON "Define if you need warning messages" OFF) + +if(NOT BUILD_SHARED_LIBS) + add_definitions(-DHUNSPELL_STATIC) +endif() + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories("src/hunspell") +include_directories("src/parsers") + +#libhunspell +set(LIBHUNSPELL_SRCS + src/hunspell/affentry.cxx + src/hunspell/affixmgr.cxx + src/hunspell/csutil.cxx + src/hunspell/hashmgr.cxx + src/hunspell/hunspell.cxx + src/hunspell/suggestmgr.cxx + src/hunspell/phonet.cxx + src/hunspell/filemgr.cxx + src/hunspell/hunzip.cxx + src/hunspell/replist.cxx + src/hunspell/affentry.hxx + src/hunspell/htypes.hxx + src/hunspell/affixmgr.hxx + src/hunspell/csutil.hxx + src/hunspell/atypes.hxx + src/hunspell/suggestmgr.hxx + src/hunspell/baseaffix.hxx + src/hunspell/hashmgr.hxx + src/hunspell/langnum.hxx + src/hunspell/phonet.hxx + src/hunspell/filemgr.hxx + src/hunspell/hunzip.hxx + src/hunspell/replist.hxx +) + +set(LIBHUNSPELL_HDRS + src/hunspell/hunspell.hxx + src/hunspell/hunspell.h + src/hunspell/hunvisapi.h + src/hunspell/w_char.hxx + src/hunspell/atypes.hxx + src/hunspell/csutil.hxx + src/hunspell/htypes.hxx +) + +#hunspell/libhunspell +add_library(libhunspell ${LIBHUNSPELL_HDRS} ${LIBHUNSPELL_SRCS}) +target_compile_definitions(libhunspell PRIVATE -DBUILDING_LIBHUNSPELL) + +#parsers/libparsers +set(LIBPARSERS_SRCS + src/parsers/firstparser.cxx + src/parsers/xmlparser.cxx + src/parsers/latexparser.cxx + src/parsers/manparser.cxx + src/parsers/textparser.cxx + src/parsers/htmlparser.cxx + src/parsers/odfparser.cxx +) +add_library(libparsers OBJECT ${LIBPARSERS_SRCS}) + +#parsers/testparser +set(TESTPARSER_SRCS + src/parsers/firstparser.cxx + src/parsers/firstparser.hxx + src/parsers/xmlparser.cxx + src/parsers/xmlparser.hxx + src/parsers/latexparser.cxx + src/parsers/latexparser.hxx + src/parsers/manparser.cxx + src/parsers/manparser.hxx + src/parsers/testparser.cxx + src/parsers/textparser.cxx + src/parsers/textparser.hxx + src/parsers/htmlparser.cxx + src/parsers/htmlparser.hxx + src/parsers/odfparser.hxx + src/parsers/odfparser.cxx +) + +add_executable(testparser ${TESTPARSER_SRCS}) +target_link_libraries(testparser libhunspell) + +#tools/analyze +add_executable(analyze "src/tools/analyze.cxx") +target_link_libraries(analyze libhunspell) + +#tools/chmorph +add_executable(chmorph "src/tools/chmorph.cxx" $) +target_link_libraries(chmorph libhunspell) + +#tools/hunspell +include(CheckIncludeFile) +check_include_file("curses.h" HAVE_CURSES_H) +check_include_file("langinfo.h" HAVE_LANGINFO_CODESET) +check_include_file("libintl.h" HAVE_LIBINTL_H) +check_include_file("locale.h" HAVE_LOCALE_H) +check_include_file("ncursesw/curses.h" HAVE_NCURSESW_H) +check_include_file("unistd.h" HAVE_UNISTD_H) +configure_file("config.h.in" "config.h") + +add_executable(hunspell "src/tools/hunspell.cxx" $) +target_include_directories(hunspell PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") +target_link_libraries(hunspell libhunspell) + +#tools/munch +add_executable(munch "src/tools/munch.cxx") + +#tools/unmunch +add_executable(unmunch "src/tools/unmunch.cxx") + +#tools/hzip +#add_executable(hzip "src/tools/hzip.cxx") +#target_link_libraries(hzip libhunspell) + +#tools/hunzip +add_executable(hunzip "src/tools/hunzip.cxx") +target_link_libraries(hunzip libhunspell) + +install( +TARGETS + libhunspell + hunspell + testparser + analyze + chmorph + munch + unmunch +# hzip + hunzip +ARCHIVE DESTINATION lib +LIBRARY DESTINATION lib +RUNTIME DESTINATION bin +) + +install(FILES ${LIBHUNSPELL_HDRS} DESTINATION "include/hunspell/") diff --git a/ports/hunspell/CONTROL b/ports/hunspell/CONTROL new file mode 100644 index 000000000..ec7979e35 --- /dev/null +++ b/ports/hunspell/CONTROL @@ -0,0 +1,3 @@ +Source: hunspell +Version: 1.6.1-1 +Description: The most popular spellchecking library. diff --git a/ports/hunspell/config.h.in b/ports/hunspell/config.h.in new file mode 100644 index 000000000..c659d1c52 --- /dev/null +++ b/ports/hunspell/config.h.in @@ -0,0 +1,35 @@ + +/* Define to 1 if translation of program messages to the user's native language is requested. */ +#cmakedefine ENABLE_NLS 1 + +/* "Define if you have the header" */ +#cmakedefine HAVE_CURSES_H 1 + +/* Define if you have the iconv() function. */ +#cmakedefine HAVE_ICONV 1 + +/* Define if you have and nl_langinfo(CODESET). */ +#cmakedefine HAVE_LANGINFO_CODESET 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LIBINTL_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LOCALE_H 1 + +/* "Define if you have the header" */ +#cmakedefine HAVE_NCURSESW_H 1 + +/* "Define if you have fancy command input editing with Readline" */ +#cmakedefine HAVE_READLINE 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H 1 + +/* Define if you need warning messages */ +#cmakedefine HUNSPELL_WARNING_ON 1 + +/* Define as const if the declaration of iconv() needs const. */ +#cmakedefine ICONV_CONST const + +#cmakedefine VERSION "@VERSION@" \ No newline at end of file diff --git a/ports/hunspell/portfile.cmake b/ports/hunspell/portfile.cmake new file mode 100644 index 000000000..7d632563c --- /dev/null +++ b/ports/hunspell/portfile.cmake @@ -0,0 +1,52 @@ +include(vcpkg_common_functions) +set(HUNSPELL_VERSION 1.6.1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hunspell-${HUNSPELL_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/hunspell/hunspell/archive/v${HUNSPELL_VERSION}.zip" + FILENAME "hunspell-${HUNSPELL_VERSION}.zip" + SHA512 164eb1ae9ff9f4d8efe8998fa3ad847bf5a0c1a87113acc52dcdb3aaddb4e9179274585623bd7152f9a82b803bd42ce24fe856ac8d49121214bef59ac1c7753c +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001_fix_unistd.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_build_cmake() +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB_RECURSE TOOLS_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB_RECURSE TOOLS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + +file(COPY ${TOOLS_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(REMOVE ${TOOLS_RELEASE} ${TOOLS_DEBUG}) + +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/hunspell) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright) + +file(COPY ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/hunspell) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING.LESSER ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright-lgpl) + +file(COPY ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/hunspell) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/hunspell/COPYING.MPL ${CURRENT_PACKAGES_DIR}/share/hunspell/copyright-mpl) + -- cgit v1.2.3 From 1e53c60fd70299563d06371e3e38d95975d4d6a5 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 25 Jul 2017 03:21:57 +0300 Subject: [lcms] rename library to lcms2 --- ports/lcms/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/lcms/CMakeLists.txt b/ports/lcms/CMakeLists.txt index 0fedfb95e..cd69bab3b 100644 --- a/ports/lcms/CMakeLists.txt +++ b/ports/lcms/CMakeLists.txt @@ -40,7 +40,7 @@ include_directories( "./include" ) -add_library(lcms ${SRCS}) +add_library(lcms2 ${SRCS}) if(NOT SKIP_INSTALL_HEADERS ) @@ -52,7 +52,7 @@ if(NOT SKIP_INSTALL_HEADERS ) endif(NOT SKIP_INSTALL_HEADERS ) -install(TARGETS lcms EXPORT lcms_EXPORT +install(TARGETS lcms2 EXPORT lcms_EXPORT RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib -- cgit v1.2.3 From 8a6322e7f306a45594a0a75cb16174fd08cd87d1 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 25 Jul 2017 03:44:01 +0300 Subject: [gsl] update to 2.4 --- ports/gsl/CONTROL | 2 +- ports/gsl/portfile.cmake | 22 ++++++---------------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/ports/gsl/CONTROL b/ports/gsl/CONTROL index 62d0c7e8e..8ea4fdedd 100644 --- a/ports/gsl/CONTROL +++ b/ports/gsl/CONTROL @@ -1,3 +1,3 @@ Source: gsl -Version: 2.3-2 +Version: 2.4-1 Description: The GNU Scientific Library is a numerical library for C and C++ programmers diff --git a/ports/gsl/portfile.cmake b/ports/gsl/portfile.cmake index 76ab1582b..519fe4708 100644 --- a/ports/gsl/portfile.cmake +++ b/ports/gsl/portfile.cmake @@ -1,21 +1,11 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gsl-2.3) +set(GSL_VERSION 2.4) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gsl-${GSL_VERSION}) + vcpkg_download_distfile(ARCHIVE - URLS "ftp://ftp.gnu.org/gnu/gsl/gsl-2.3.tar.gz" - FILENAME "gsl-2.3.tar.gz" - SHA512 ada622079f4ac667d95f74b38aa368726fc1b18fd34555bcefe90920d3da93a9289ebff966be43325af806107001bc8973daf9f8418e6c97b866be2296b566ff + URLS "ftp://ftp.gnu.org/gnu/gsl/gsl-${GSL_VERSION}.tar.gz" + FILENAME "gsl-${GSL_VERSION}.tar.gz" + SHA512 12442b023dd959e8b22a9c486646b5cedec7fdba0daf2604cda365cf96d10d99aefdec2b42e59c536cc071da1525373454e5ed6f4b15293b305ca9b1dc6db130 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 5d86005aa7a25f192d6a3023423e2977bcef7367 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 25 Jul 2017 04:07:08 +0300 Subject: cmake: update to 3.9 --- scripts/fetchDependency.ps1 | 12 ++++++------ toolsrc/src/VcpkgPaths.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index b6144d581..eecd7fe5a 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -151,12 +151,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.8.0" - $downloadVersion = "3.8.0" - $url = "https://cmake.org/files/v3.8/cmake-3.8.0-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.8.0-win32-x86.zip" - $expectedDownloadedFileHash = "857fca00974ad6ac12fa042373d85ad1288770d4f09fbd99753c822df76b1c6c" - $executableFromDownload = "$downloadsDir\cmake-3.8.0-win32-x86\bin\cmake.exe" + $requiredVersion = "3.9.0" + $downloadVersion = "3.9.0" + $url = "https://cmake.org/files/v3.9/cmake-3.9.0-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.9.0-win32-x86.zip" + $expectedDownloadedFileHash = "9d593839f64b94718a1b75b8519b56ecb959e4d37d406bf2a087e2c1f7a6b89c" + $executableFromDownload = "$downloadsDir\cmake-3.9.0-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP $extractionFolder = $downloadsDir } diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 9068e3903..bc1152b9d 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -98,10 +98,10 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path scripts_folder) { - static constexpr std::array expected_version = {3, 8, 0}; + static constexpr std::array expected_version = {3, 9, 0}; static const std::wstring version_check_arguments = L"--version"; - const fs::path downloaded_copy = downloads_folder / "cmake-3.8.0-win32-x86" / "bin" / "cmake.exe"; + const fs::path downloaded_copy = downloads_folder / "cmake-3.9.0-win32-x86" / "bin" / "cmake.exe"; const std::vector from_path = find_from_PATH(L"cmake"); std::vector candidate_paths; -- cgit v1.2.3 From 40a8f75748758b657a6a1ffe8014c4510ebf2182 Mon Sep 17 00:00:00 2001 From: Han Hu Date: Tue, 25 Jul 2017 13:00:02 +0800 Subject: port geogram, a mesh processing lib, similar to CGAL, but lighter, simpler and faster for some algorithms. --- ports/geogram/CONTROL | 4 + ports/geogram/Config.cmake.in | 4 + ports/geogram/fix-cmake-config-and-install.patch | 208 +++++++++++++++++++++++ ports/geogram/portfile.cmake | 67 ++++++++ 4 files changed, 283 insertions(+) create mode 100644 ports/geogram/CONTROL create mode 100644 ports/geogram/Config.cmake.in create mode 100644 ports/geogram/fix-cmake-config-and-install.patch create mode 100644 ports/geogram/portfile.cmake diff --git a/ports/geogram/CONTROL b/ports/geogram/CONTROL new file mode 100644 index 000000000..95690395b --- /dev/null +++ b/ports/geogram/CONTROL @@ -0,0 +1,4 @@ +Source: geogram +Version: 1.4.9 +Description: Geogram is a programming library of geometric algorithms. +Build-Depends: glfw3, openblas, clapack diff --git a/ports/geogram/Config.cmake.in b/ports/geogram/Config.cmake.in new file mode 100644 index 000000000..72808723e --- /dev/null +++ b/ports/geogram/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") +check_required_components("@PROJECT_NAME@") \ No newline at end of file diff --git a/ports/geogram/fix-cmake-config-and-install.patch b/ports/geogram/fix-cmake-config-and-install.patch new file mode 100644 index 000000000..b5490fdc1 --- /dev/null +++ b/ports/geogram/fix-cmake-config-and-install.patch @@ -0,0 +1,208 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 17dc02e..e489d75 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,7 +42,7 @@ set(VORPALINE_VERSION_MINOR 4) + set(VORPALINE_VERSION_PATCH 9) + set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH}) + +-set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR}) ++set(VORPALINE_INCLUDE_SUBPATH ./) + + # Determine the current Build-OS (Build-platform without the compiler info) + string(REGEX REPLACE "-[^-]+$" "" VORPALINE_OS ${VORPALINE_PLATFORM}) +@@ -106,6 +106,11 @@ if(GEOGRAM_WITH_VORPALINE) + add_subdirectory(src/lib/vorpalib) + endif() + ++# find this library in the outside scope ++if(GEOGRAM_WITH_GRAPHICS) ++ find_package(GLFW3 REQUIRED) ++endif(GEOGRAM_WITH_GRAPHICS) ++ + add_subdirectory(src/lib/third_party) + + if(GEOGRAM_WITH_GRAPHICS) +@@ -138,8 +143,44 @@ file(REMOVE ${CMAKE_BINARY_DIR}/doc/LICENSE.txt) + + + # FindGeogram.cmake ++# This installation is not suitable for vcpkg ++# install(FILES cmake/FindGeogram.cmake DESTINATION lib/cmake/modules COMPONENT devkit) ++ ++set(config_install_dir "share/geogram") ++set(include_install_dir "include") ++set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") ++ ++# Configuration ++set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake") ++set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") ++set(targets_export_name "${PROJECT_NAME}Targets") ++set(namespace "${PROJECT_NAME}::") ++ ++# Include module with fuction 'write_basic_package_version_file' ++include(CMakePackageConfigHelpers) ++ ++write_basic_package_version_file( ++ "${version_config}" COMPATIBILITY SameMajorVersion VERSION ${VORPALINE_VERSION} ++) ++ ++configure_package_config_file( ++ "cmake/Config.cmake.in" ++ "${project_config}" ++ INSTALL_DESTINATION "${config_install_dir}" ++) + +-install(FILES cmake/FindGeogram.cmake DESTINATION lib/cmake/modules COMPONENT devkit) ++# Config ++install( ++ FILES "${project_config}" "${version_config}" ++ DESTINATION "${config_install_dir}" ++) ++ ++# Config ++install( ++ EXPORT "${targets_export_name}" ++ NAMESPACE "${namespace}" ++ DESTINATION "${config_install_dir}" ++) + + # Configure CPack + +diff --git a/src/lib/geogram/CMakeLists.txt b/src/lib/geogram/CMakeLists.txt +index d90bc48..927f857 100644 +--- a/src/lib/geogram/CMakeLists.txt ++++ b/src/lib/geogram/CMakeLists.txt +@@ -47,7 +47,14 @@ if(WIN32) + endif() + + # Install the library +-install_devkit_targets(geogram) ++install( ++ TARGETS geogram ++ EXPORT "${PROJECT_NAME}Targets" ++ LIBRARY DESTINATION "lib" ++ ARCHIVE DESTINATION "lib" ++ RUNTIME DESTINATION "bin" ++ INCLUDES DESTINATION "include" ++) + + # Install include files for the standard devkit + install( +diff --git a/src/lib/geogram_gfx/CMakeLists.txt b/src/lib/geogram_gfx/CMakeLists.txt +index f319b93..e24039d 100644 +--- a/src/lib/geogram_gfx/CMakeLists.txt ++++ b/src/lib/geogram_gfx/CMakeLists.txt +@@ -33,14 +33,21 @@ if(VORPALINE_BUILD_DYNAMIC) + endif() + + # Install the library +-install_devkit_targets(geogram_gfx) ++install( ++ TARGETS geogram_gfx ++ EXPORT "${PROJECT_NAME}Targets" ++ LIBRARY DESTINATION "lib" ++ ARCHIVE DESTINATION "lib" ++ RUNTIME DESTINATION "bin" ++ INCLUDES DESTINATION "include" ++) + + # Install include files for the standard devkit + install( + DIRECTORY . + DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx + COMPONENT devkit +- FILES_MATCHING PATTERN *.h ++ FILES_MATCHING PATTERN *.h PATTERN *.xpm # xpm is the colrbar file + ) + + # Install include files for the full devkit +@@ -48,7 +55,7 @@ install( + DIRECTORY . + DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx + COMPONENT devkit-full +- FILES_MATCHING PATTERN *.h ++ FILES_MATCHING PATTERN *.h PATTERN *.xpm # xpm is the colrbar file + ) + + install( +diff --git a/src/lib/third_party/numerics/CMakeLists.txt b/src/lib/third_party/numerics/CMakeLists.txt +index 5789cd2..e4262e3 100644 +--- a/src/lib/third_party/numerics/CMakeLists.txt ++++ b/src/lib/third_party/numerics/CMakeLists.txt +@@ -10,16 +10,18 @@ endif() + + include_directories(${GEOGRAM_SOURCE_DIR}/src/lib/third_party/numerics/INCLUDE) + ++find_package(BLAS REQUIRED) ++find_package(LAPACK REQUIRED) + aux_source_directories(SOURCES "Source Files" .) + aux_source_directories(SOURCES "Source Files\\LIBF2C" LIBF2C) +-aux_source_directories(SOURCES "Source Files\\CBLAS" CBLAS) +-aux_source_directories(SOURCES "Source Files\\CLAPACK" CLAPACK) ++# aux_source_directories(SOURCES "Source Files\\CBLAS" CBLAS) ++# aux_source_directories(SOURCES "Source Files\\CLAPACK" CLAPACK) + aux_source_directories(SOURCES "Source Files\\SUPERLU" SUPERLU) + aux_source_directories(SOURCES "Source Files\\ARPACK" ARPACK) + aux_source_directories(SOURCES "Source Files\\ARPACK_UTIL" ARPACK_UTIL) + + add_library(geogram_num_3rdparty ${SOURCES}) +- ++target_link_libraries(geogram_num_3rdparty ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES}) + if(UNIX) + target_link_libraries(geogram_num_3rdparty m) + endif() +diff --git a/src/lib/third_party/numerics/LIBF2C/getarg_.c b/src/lib/third_party/numerics/LIBF2C/getarg_.c +index 2b69a1e..a504538 100644 +--- a/src/lib/third_party/numerics/LIBF2C/getarg_.c ++++ b/src/lib/third_party/numerics/LIBF2C/getarg_.c +@@ -17,20 +17,20 @@ VOID getarg_(n, s, ls) ftnint *n; char *s; ftnlen ls; + void getarg_(ftnint *n, char *s, ftnlen ls) + #endif + { +- extern int xargc; +- extern char **xargv; +- Const char *t; +- int i; ++ // extern int xargc; ++ // extern char **xargv; ++ // Const char *t; ++ // int i; + +- if(*n>=0 && *n=0 && *n +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/geogram_1.4.9) +vcpkg_download_distfile(ARCHIVE + URLS "https://gforge.inria.fr/frs/download.php/file/36914/geogram_1.4.9.zip" + FILENAME "geogram-1.4.9.zip" + SHA512 de8a93abca90885c3ce1ad6b828442daa1eeaf016594fe707f25c8d4077c6b6cec0958a0662c0aed4ff015a994a55d7ebc7521cbb39b9adcf4373c44c957715e +) +vcpkg_extract_source_archive(${ARCHIVE}) +file(COPY ${CURRENT_PORT_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}/cmake) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-cmake-config-and-install.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + # PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DVORPALINE_BUILD_DYNAMIC=FALSE + -DGEOGRAM_WITH_GRAPHICS=ON + -DGEOGRAM_LIB_ONLY=ON + -DGEOGRAM_USE_SYSTEM_GLFW3=ON + -DVORPALINE_PLATFORM=Win-vs-generic + -DGEOGRAM_WITH_VORPALINE=OFF + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 + ) +else() + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + # PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DVORPALINE_BUILD_DYNAMIC=TRUE + -DGEOGRAM_LIB_ONLY=ON + -DGEOGRAM_USE_SYSTEM_GLFW3=ON + -DVORPALINE_PLATFORM=Win-vs-dynamic-generic + -DGEOGRAM_WITH_VORPALINE=OFF + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 + ) +endif() +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/geogram") + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/doc/devkit/license.dox DESTINATION ${CURRENT_PACKAGES_DIR}/share/geogram) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/geogram/license.dox ${CURRENT_PACKAGES_DIR}/share/geogram/copyright) -- cgit v1.2.3 From 509b59b7aea7611d8f2203ebd7b6357ba772afb7 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 25 Jul 2017 12:42:59 +0300 Subject: scipts/getWindowsSDK: use registry for SDK detection --- scripts/getWindowsSDK.ps1 | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 index 7902707cb..3aa23cc56 100644 --- a/scripts/getWindowsSDK.ps1 +++ b/scripts/getWindowsSDK.ps1 @@ -17,19 +17,14 @@ $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $validInstances = New-Object System.Collections.ArrayList -$CandidateProgramFiles = $(& $scriptsDir\getProgramFiles32bit.ps1), $(& $scriptsDir\getProgramFilesPlatformBitness.ps1) -Write-Verbose "Program Files Candidate locations: $([system.String]::Join(',', $CandidateProgramFiles))" - # Windows 10 SDK -Write-Verbose "`n" -Write-Verbose "Looking for Windows 10 SDK" -foreach ($ProgramFiles in $CandidateProgramFiles) +function CheckWindows10SDK($path) { - $folder = "$ProgramFiles\Windows Kits\10\Include" + $folder = "$path\Include" if (!(Test-Path $folder)) { Write-Verbose "$folder - Not Found" - continue + return } Write-Verbose "$folder - Found" @@ -42,7 +37,7 @@ foreach ($ProgramFiles in $CandidateProgramFiles) if (!(Test-Path $windowsheader)) { Write-Verbose "$windowsheader - Not Found" - continue + return } Write-Verbose "$windowsheader - Found" @@ -50,7 +45,7 @@ foreach ($ProgramFiles in $CandidateProgramFiles) if (!(Test-Path $ddkheader)) { Write-Verbose "$ddkheader - Not Found" - continue + return } Write-Verbose "$ddkheader - Found" @@ -60,16 +55,20 @@ foreach ($ProgramFiles in $CandidateProgramFiles) } } -# Windows 8.1 SDK Write-Verbose "`n" -Write-Verbose "Looking for Windows 8.1 SDK" -foreach ($ProgramFiles in $CandidateProgramFiles) +Write-Verbose "Looking for Windows 10 SDK" +CheckWindows10SDK((Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue).KitsRoot10) +CheckWindows10SDK((Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue).KitsRoot10) + + +# Windows 8.1 SDK +function CheckWindows81SDK($path) { - $folder = "$ProgramFiles\Windows Kits\8.1\Include" + $folder = "$path\Include" if (!(Test-Path $folder)) { Write-Verbose "$folder - Not Found" - continue + return } Write-Verbose "$folder - Found" @@ -78,6 +77,11 @@ foreach ($ProgramFiles in $CandidateProgramFiles) $validInstances.Add($win81sdkVersionString) > $null } +Write-Verbose "`n" +Write-Verbose "Looking for Windows 8.1 SDK" +CheckWindows81SDK((Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue).KitsRoot81) +CheckWindows81SDK((Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue).KitsRoot81) + Write-Verbose "`n`n`n" Write-Verbose "The following Windows SDKs were found:" foreach ($instance in $validInstances) -- cgit v1.2.3 From f05010c998e22357e17a3a6781f2deb5280ae324 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 25 Jul 2017 16:46:05 +0300 Subject: [freerdp] update to 2.0-rc0 --- ports/freerdp/CONTROL | 2 +- ports/freerdp/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/freerdp/CONTROL b/ports/freerdp/CONTROL index cdbca23e7..849fd740b 100644 --- a/ports/freerdp/CONTROL +++ b/ports/freerdp/CONTROL @@ -1,4 +1,4 @@ Source: freerdp -Version: 2.0.0-beta1+android11~vcpkg1 +Version: 2.0.0-rc0~vcpkg1 Description: A free implementation of the Remote Desktop Protocol (RDP) Build-Depends: openssl \ No newline at end of file diff --git a/ports/freerdp/portfile.cmake b/ports/freerdp/portfile.cmake index 144616e5d..d1a715db6 100644 --- a/ports/freerdp/portfile.cmake +++ b/ports/freerdp/portfile.cmake @@ -1,8 +1,8 @@ include(vcpkg_common_functions) -set(FREERDP_VERSION 2.0.0-beta1+android11) -set(FREERDP_REVISION 86fcb35f4273bf11410f962572e65644c6fe9ae3) -set(FREERDP_HASH 6ad9f6dfab827f7bb50c31c6694d7254d890fff5178581b6ffd4f4e970a31e866b4a3d3e637d25d13dbb8f7d7e0cc219a056ce4f5642951576d9531cb0859ebe) +set(FREERDP_VERSION 2.0.0-rc0) +set(FREERDP_REVISION 2.0.0-rc0) +set(FREERDP_HASH 9bc9ee976c73f274a4258613409e242088bd077bcd1cc43f7941170374fc0f9deda7f2f7644506d0cdc2e029b6037abb21d848810dcce6aefa3c5f1642f19cb3) string(REGEX REPLACE "\\+" "-" FREERDP_VERSION_ESCAPED ${FREERDP_VERSION}) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FreeRDP-${FREERDP_VERSION_ESCAPED}) -- cgit v1.2.3 From 28ea7814dabfe6347dd9b534b950e5aaa513cd56 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 25 Jul 2017 16:46:17 +0300 Subject: [freerdp] fix tools installation --- ports/freerdp/portfile.cmake | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/ports/freerdp/portfile.cmake b/ports/freerdp/portfile.cmake index d1a715db6..8ac9df315 100644 --- a/ports/freerdp/portfile.cmake +++ b/ports/freerdp/portfile.cmake @@ -49,23 +49,28 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) endif() if(NOT TARGET_TRIPLET MATCHES "uwp") - make_directory("${CURRENT_PACKAGES_DIR}/tools") - file(RENAME "${CURRENT_PACKAGES_DIR}/bin/winpr-hash.exe" "${CURRENT_PACKAGES_DIR}/tools/winpr-hash.exe") - file(RENAME "${CURRENT_PACKAGES_DIR}/bin/winpr-makecert.exe" "${CURRENT_PACKAGES_DIR}/tools/winpr-makecert.exe") - file(RENAME "${CURRENT_PACKAGES_DIR}/bin/wfreerdp.exe" "${CURRENT_PACKAGES_DIR}/tools/wfreerdp.exe") - - make_directory("${CURRENT_PACKAGES_DIR}/debug/tools") - file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/winpr-hash.exe" "${CURRENT_PACKAGES_DIR}/debug/tools/winpr-hash.exe") - file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/winpr-makecert.exe" "${CURRENT_PACKAGES_DIR}/debug/tools/winpr-makecert.exe") - file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/wfreerdp.exe" "${CURRENT_PACKAGES_DIR}/debug/tools/wfreerdp.exe") + file(GLOB_RECURSE TOOLS_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(GLOB_RECURSE TOOLS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + + file(COPY ${TOOLS_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + + file(REMOVE ${TOOLS_RELEASE} ${TOOLS_DEBUG}) endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/freerdp) file(RENAME ${CURRENT_PACKAGES_DIR}/share/freerdp/LICENSE ${CURRENT_PACKAGES_DIR}/share/freerdp/copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) -- cgit v1.2.3 From a01242655af7aba9712156b803e7c4381b234fc2 Mon Sep 17 00:00:00 2001 From: codicodi Date: Tue, 25 Jul 2017 15:05:23 +0200 Subject: [openal-soft] update to 1.18.0 --- ports/openal-soft/CONTROL | 4 +- .../dont-export-symbols-in-static-build.patch | 13 +++++ ports/openal-soft/portfile.cmake | 59 ++++++++++++++++++---- 3 files changed, 63 insertions(+), 13 deletions(-) create mode 100644 ports/openal-soft/dont-export-symbols-in-static-build.patch diff --git a/ports/openal-soft/CONTROL b/ports/openal-soft/CONTROL index e54c98e64..4d423e2fa 100644 --- a/ports/openal-soft/CONTROL +++ b/ports/openal-soft/CONTROL @@ -1,3 +1,3 @@ Source: openal-soft -Version: 1.17.2 -Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. \ No newline at end of file +Version: 1.18.0 +Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. diff --git a/ports/openal-soft/dont-export-symbols-in-static-build.patch b/ports/openal-soft/dont-export-symbols-in-static-build.patch new file mode 100644 index 000000000..6663ad208 --- /dev/null +++ b/ports/openal-soft/dont-export-symbols-in-static-build.patch @@ -0,0 +1,13 @@ +diff --git a/config.h.in b/config.h.in +index a71b54f..8d84645 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -1,6 +1,8 @@ + /* API declaration export attribute */ ++#ifndef AL_LIBTYPE_STATIC + #define AL_API ${EXPORT_DECL} + #define ALC_API ${EXPORT_DECL} ++#endif + + /* Define any available alignment declaration */ + #define ALIGN(x) ${ALIGN_DECL} diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake index bfb8b4ffb..992993821 100644 --- a/ports/openal-soft/portfile.cmake +++ b/ports/openal-soft/portfile.cmake @@ -1,32 +1,69 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "WindowsStore not supported") endif() + include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openal-soft-1.17.2) -vcpkg_download_distfile(ARCHIVE - URLS "http://openal-soft.org/openal-releases/openal-soft-1.17.2.tar.bz2" - FILENAME "openal-soft-1.17.2.tar.bz2" - MD5 1764e0d8fec499589b47ebc724e0913d - SHA512 50c20cd3ddada55d91643a79c2894d5a14315d5fc1ed8e870e3d8d3f410e8b7d8da29b838226e7fce37fbeca719ff919b51806f72e4cd529a18fbe8bd68860e3 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kcat/openal-soft + REF openal-soft-1.18.0 + SHA512 b3f1ac7eaaef38ef960cdfaf7bd475c32258f752718e762333188837ab33eb6e3f9a39776138a52a434dec42157ffba10f0592ef8d3ec3b023a5261e05832a69 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/dont-export-symbols-in-static-build.patch) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(OPENAL_LIBTYPE "SHARED") +else() + set(OPENAL_LIBTYPE "STATIC") +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS + -DLIBTYPE=${OPENAL_LIBTYPE} -DALSOFT_UTILS=OFF -DALSOFT_NO_CONFIG_UTIL=ON -DALSOFT_EXAMPLES=OFF -DALSOFT_TESTS=OFF -DALSOFT_CONFIG=OFF -DALSOFT_HRTF_DEFS=OFF + -DALSOFT_AMBDEC_PRESETS=OFF + -DALSOFT_BACKEND_ALSA=OFF + -DALSOFT_BACKEND_OSS=OFF + -DALSOFT_BACKEND_SOLARIS=OFF + -DALSOFT_BACKEND_SNDIO=OFF + -DALSOFT_BACKEND_QSA=OFF + -DALSOFT_BACKEND_PORTAUDIO=OFF + -DALSOFT_BACKEND_PULSEAUDIO=OFF + -DALSOFT_BACKEND_COREAUDIO=OFF + -DALSOFT_BACKEND_JACK=OFF + -DALSOFT_BACKEND_OPENSL=OFF + -DALSOFT_BACKEND_WAVE=ON + -DALSOFT_REQUIRE_WINMM=ON + -DALSOFT_REQUIRE_DSOUND=ON + -DALSOFT_REQUIRE_MMDEVAPI=ON ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenAL) + +foreach(HEADER al.h alc.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/AL/${HEADER} AL_H) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(AL_LIBTYPE_STATIC)" "1" AL_H "${AL_H}") + else() + string(REPLACE "defined(AL_LIBTYPE_STATIC)" "0" AL_H "${AL_H}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/AL/${HEADER} "${AL_H}") +endforeach() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/openal-soft) file(RENAME ${CURRENT_PACKAGES_DIR}/share/openal-soft/COPYING ${CURRENT_PACKAGES_DIR}/share/openal-soft/copyright) vcpkg_copy_pdbs() - -- cgit v1.2.3 From 677db9bffbd8a588ff085cbdbcbd69797a959ede Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 25 Jul 2017 17:20:58 +0300 Subject: [libraw] depend on lcms --- ports/libraw/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libraw/CONTROL b/ports/libraw/CONTROL index bddc5c2db..9d355533b 100644 --- a/ports/libraw/CONTROL +++ b/ports/libraw/CONTROL @@ -1,4 +1,4 @@ Source: libraw -Version: 0.18.2-1 -Build-Depends: libjpeg-turbo +Version: 0.18.2-2 +Build-Depends: lcms, libjpeg-turbo Description: raw image decoder library -- cgit v1.2.3 From d59fb7942c43c240a5f938b3349fa803b8f4c4b9 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 25 Jul 2017 10:25:17 -0700 Subject: [libkml] init port --- ports/libkml/CONTROL | 4 ++++ ports/libkml/portfile.cmake | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ports/libkml/CONTROL create mode 100644 ports/libkml/portfile.cmake diff --git a/ports/libkml/CONTROL b/ports/libkml/CONTROL new file mode 100644 index 000000000..1fe7086af --- /dev/null +++ b/ports/libkml/CONTROL @@ -0,0 +1,4 @@ +Source: libkml +Version: 1.3.0 +Description: Reference implementation of OGC KML 2.2 +Build-Depends: zlib, boost, expat, minizip, uriparser diff --git a/ports/libkml/portfile.cmake b/ports/libkml/portfile.cmake new file mode 100644 index 000000000..9c19ff32b --- /dev/null +++ b/ports/libkml/portfile.cmake @@ -0,0 +1,17 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libkml/libkml + REF 1.3.0 + SHA512 aa48158103d3af764bf98c1fb4cf3e1356b9cc6c8e79d80b96850916f0a8ccb1dac3a46427735dd0bf20647daa047d10e722ac3da2a214d4c1559bf6d5d7c853 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cxxopts RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 4ae13d4031654ea19005da0557d262778e11939c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 25 Jul 2017 10:46:28 -0700 Subject: [beast] Fix download hash --- ports/beast/CONTROL | 2 +- ports/beast/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL index 901846ede..2e44e7909 100644 --- a/ports/beast/CONTROL +++ b/ports/beast/CONTROL @@ -1,4 +1,4 @@ Source: beast -Version: v84 +Version: v84-1 Build-Depends: boost Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake index e58c676e6..31d049ea1 100644 --- a/ports/beast/portfile.cmake +++ b/ports/beast/portfile.cmake @@ -5,7 +5,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vinniefalco/Beast REF 32902fad8b7c57be27b96e00ed6ec82748732133 - SHA512 55d1ccff105f997ab7b607528980161baf22aff56109e368a6232f3cfe1fbbf3f060e2b88d68f00728e75b951b60291b8cd6d56a3e299208e6cd757cb53bd774 + SHA512 409bd23e19c4bb157619405713f73b90c5f680bec487ad7b6fc8bcd30db54444a78950ce631c8e267e4397b9128679528fd237d3c53f7e1e55634473a169af5f HEAD_REF master ) -- cgit v1.2.3 From 722d829b65fd481ea5047abc0351aa0c4a01a4cf Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 25 Jul 2017 16:50:25 -0700 Subject: [vcpkg] minizip fix missing header --- ports/minizip/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/minizip/CMakeLists.txt b/ports/minizip/CMakeLists.txt index caf2b856d..9ebb5d217 100644 --- a/ports/minizip/CMakeLists.txt +++ b/ports/minizip/CMakeLists.txt @@ -22,6 +22,7 @@ set(SRC ${MIN_SRC}/mztools.c ) set(HEADERS + ${MIN_SRC}/crypt.h ${MIN_SRC}/ioapi.h ${MIN_SRC}/iowin32.h ${MIN_SRC}/unzip.h -- cgit v1.2.3 From 148a6e0a5b205e8e83a95d48a996d8d07b50a9cd Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 25 Jul 2017 17:01:55 -0700 Subject: [libkml] cmake fixup --- ports/libkml/portfile.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/libkml/portfile.cmake b/ports/libkml/portfile.cmake index 9c19ff32b..8aaa96957 100644 --- a/ports/libkml/portfile.cmake +++ b/ports/libkml/portfile.cmake @@ -12,6 +12,8 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cxxopts RENAME copyright) - vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libkml RENAME copyright) -- cgit v1.2.3 From fa6b454ddf44971b9122beec41ac0408e7d9dc22 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Thu, 27 Jul 2017 02:36:27 +0900 Subject: [alembic] add hdf5 dependency and fix link issue. #1545 --- ports/alembic/CONTROL | 2 +- ports/alembic/fix-hdf5link.patch | 17 +++++++++++++++++ ports/alembic/portfile.cmake | 6 ++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 ports/alembic/fix-hdf5link.patch diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index cdd9a01e7..0e2b62452 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic Version: 1.7.1-1 -Build-Depends:ilmbase +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. http://alembic.io/ diff --git a/ports/alembic/fix-hdf5link.patch b/ports/alembic/fix-hdf5link.patch new file mode 100644 index 000000000..b9729f1ca --- /dev/null +++ b/ports/alembic/fix-hdf5link.patch @@ -0,0 +1,17 @@ +diff --git a/lib/Alembic/CMakeLists.txt b/lib/Alembic/CMakeLists.txt +index 5028c91..1f81d50 100644 +--- a/lib/Alembic/CMakeLists.txt ++++ b/lib/Alembic/CMakeLists.txt +@@ -49,6 +49,12 @@ ADD_SUBDIRECTORY(AbcMaterial) + ADD_SUBDIRECTORY(Ogawa) + + ADD_LIBRARY(Alembic ${LIB_TYPE} ${CXX_FILES}) ++IF (USE_HDF5) ++ TARGET_LINK_LIBRARIES(Alembic ++ ${HDF5_LIBRARIES} ++ ) ++ ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB) ++ENDIF() + + TARGET_INCLUDE_DIRECTORIES(Alembic + PUBLIC diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index c98a84e57..56c3a4d30 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -13,8 +13,14 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-hdf5link.patch +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DUSE_HDF5=ON ) vcpkg_install_cmake() -- cgit v1.2.3 From 60296cf16189d4cb048482a1c4476a41d9b18918 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 26 Jul 2017 13:54:28 -0700 Subject: [vcpkg] Add support for single-option arguments. --- toolsrc/include/VcpkgCmdArguments.h | 17 +++++++-- toolsrc/src/VcpkgCmdArguments.cpp | 69 ++++++++++++++++++++++++++++++++----- toolsrc/src/tests_arguments.cpp | 23 +++++++++++++ 3 files changed, 98 insertions(+), 11 deletions(-) diff --git a/toolsrc/include/VcpkgCmdArguments.h b/toolsrc/include/VcpkgCmdArguments.h index 316987100..0de5747b1 100644 --- a/toolsrc/include/VcpkgCmdArguments.h +++ b/toolsrc/include/VcpkgCmdArguments.h @@ -2,11 +2,18 @@ #include "vcpkg_optional.h" #include +#include #include #include namespace vcpkg { + struct ParsedArguments + { + std::unordered_set switches; + std::unordered_map settings; + }; + struct VcpkgCmdArguments { static VcpkgCmdArguments create_from_command_line(const int argc, const wchar_t* const* const argv); @@ -21,7 +28,13 @@ namespace vcpkg std::string command; std::vector command_arguments; std::unordered_set check_and_get_optional_command_arguments( - const std::vector& valid_options) const; + const std::vector& valid_options) const + { + return std::move(check_and_get_optional_command_arguments(valid_options, {}).switches); + } + + ParsedArguments check_and_get_optional_command_arguments(const std::vector& valid_switches, + const std::vector& valid_settings) const; void check_max_arg_count(const size_t expected_arg_count) const; void check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const; @@ -31,6 +44,6 @@ namespace vcpkg void check_exact_arg_count(const size_t expected_arg_count, const std::string& example_text) const; private: - std::unordered_set optional_command_arguments; + std::unordered_map> optional_command_arguments; }; } diff --git a/toolsrc/src/VcpkgCmdArguments.cpp b/toolsrc/src/VcpkgCmdArguments.cpp index 62e0b114c..ebf4c5fc5 100644 --- a/toolsrc/src/VcpkgCmdArguments.cpp +++ b/toolsrc/src/VcpkgCmdArguments.cpp @@ -123,7 +123,15 @@ namespace vcpkg continue; } - args.optional_command_arguments.insert(arg); + 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)); + } + else + { + args.optional_command_arguments.emplace(arg, nullopt); + } continue; } @@ -140,30 +148,73 @@ namespace vcpkg return args; } - std::unordered_set VcpkgCmdArguments::check_and_get_optional_command_arguments( - const std::vector& valid_options) const + ParsedArguments VcpkgCmdArguments::check_and_get_optional_command_arguments( + const std::vector& valid_switches, const std::vector& valid_settings) const { - std::unordered_set output; + bool failed = false; + ParsedArguments output; + auto options_copy = this->optional_command_arguments; - for (const std::string& option : valid_options) + for (const std::string& option : valid_switches) { auto it = options_copy.find(option); if (it != options_copy.end()) { - output.insert(option); - options_copy.erase(it); + if (it->second.has_value()) + { + // Having a string value indicates it was passed like '--a=xyz' + System::println(System::Color::error, "The option '%s' does not accept an argument.", option); + failed = true; + } + else + { + output.switches.insert(option); + options_copy.erase(it); + } + } + } + + for (const std::string& option : valid_settings) + { + auto it = options_copy.find(option); + if (it != options_copy.end()) + { + if (!it->second.has_value()) + { + // Not having a string value indicates it was passed like '--a' + System::println(System::Color::error, "The option '%s' must be passed an argument.", option); + failed = true; + } + else + { + output.settings.emplace(option, it->second.value_or_exit(VCPKG_LINE_INFO)); + options_copy.erase(it); + } } } if (!options_copy.empty()) { System::println(System::Color::error, "Unknown option(s) for command '%s':", this->command); - for (const std::string& option : options_copy) + for (auto&& option : options_copy) + { + System::println(" %s", option.first); + } + System::println("\nValid options are:", this->command); + for (auto&& option : valid_switches) { - System::println(option); + System::println(" %s", option); } + for (auto&& option : valid_settings) + { + System::println(" %s=...", option); + } + System::println(" --triplet "); + System::println(" --vcpkg-root "); + Checks::exit_fail(VCPKG_LINE_INFO); } + if (failed) Checks::exit_fail(VCPKG_LINE_INFO); return output; } diff --git a/toolsrc/src/tests_arguments.cpp b/toolsrc/src/tests_arguments.cpp index 624fbb910..14b3c3d4f 100644 --- a/toolsrc/src/tests_arguments.cpp +++ b/toolsrc/src/tests_arguments.cpp @@ -31,5 +31,28 @@ namespace UnitTest1 Assert::IsTrue(v.sendmetrics && v.sendmetrics.get()); Assert::IsTrue(v.printmetrics && *v.printmetrics.get()); } + + TEST_METHOD(create_from_arg_sequence_valued_options) + { + std::vector t = {"--a=b", "command", "argument"}; + auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); + auto opts = v.check_and_get_optional_command_arguments({}, {"--a"}); + Assert::AreEqual("b", opts.settings["--a"].c_str()); + Assert::AreEqual(size_t{1}, v.command_arguments.size()); + Assert::AreEqual("argument", v.command_arguments[0].c_str()); + Assert::AreEqual("command", v.command.c_str()); + } + + TEST_METHOD(create_from_arg_sequence_valued_options2) + { + std::vector t = {"--a", "--b=c"}; + auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); + auto opts = v.check_and_get_optional_command_arguments({"--a", "--c"}, {"--b", "--d"}); + Assert::AreEqual("c", opts.settings["--b"].c_str()); + Assert::IsTrue(opts.settings.find("--d") == opts.settings.end()); + Assert::IsTrue(opts.switches.find("--a") != opts.switches.end()); + Assert::IsTrue(opts.settings.find("--c") == opts.settings.end()); + Assert::AreEqual(size_t{0}, v.command_arguments.size()); + } }; } \ No newline at end of file -- cgit v1.2.3 From 06597edfb7e47ff16c60c6dbbecf7883294d8ecb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 26 Jul 2017 16:25:24 -0700 Subject: [vcpkg-export] Add NuGet id and NuGet version options to export command. --- toolsrc/include/vcpkg_optional.h | 6 +++++ toolsrc/src/commands_export.cpp | 49 ++++++++++++++++++++++++++++++---------- 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/toolsrc/include/vcpkg_optional.h b/toolsrc/include/vcpkg_optional.h index 03fa50678..31a2d3e88 100644 --- a/toolsrc/include/vcpkg_optional.h +++ b/toolsrc/include/vcpkg_optional.h @@ -65,6 +65,12 @@ namespace vcpkg T m_t; }; + template + Optional> make_optional(U&& u) + { + return Optional>(std::forward(u)); + } + template bool operator==(const Optional& o, const T& t) { diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index cbb3a7733..5e1cc2052 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -110,11 +110,10 @@ namespace vcpkg::Commands::Export static fs::path do_nuget_export(const VcpkgPaths& paths, const std::string& nuget_id, + const std::string& nuget_version, const fs::path& raw_exported_dir, const fs::path& output_dir) { - static const std::string NUPKG_VERSION = "1.0.0"; - Files::Filesystem& fs = paths.get_filesystem(); const fs::path& nuget_exe = paths.get_nuget_exe(); @@ -129,7 +128,7 @@ namespace vcpkg::Commands::Export fs.write_contents(targets_redirect, targets_redirect_content); const std::string nuspec_file_content = - create_nuspec_file_contents(raw_exported_dir.string(), targets_redirect.string(), nuget_id, NUPKG_VERSION); + create_nuspec_file_contents(raw_exported_dir.string(), targets_redirect.string(), nuget_id, nuget_version); const fs::path nuspec_file_path = paths.buildsystems / "tmp" / "vcpkg.export.nuspec"; fs.write_contents(nuspec_file_path, nuspec_file_content); @@ -203,6 +202,16 @@ namespace vcpkg::Commands::Export return exported_archive_path; } + static Optional maybe_lookup(std::unordered_map const& m, + std::string const& key) + { + auto it = m.find(key); + if (it != m.end()) + return it->second; + else + return nullopt; + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { static const std::string OPTION_DRY_RUN = "--dry-run"; @@ -210,6 +219,8 @@ namespace vcpkg::Commands::Export static const std::string OPTION_NUGET = "--nuget"; static const std::string OPTION_ZIP = "--zip"; static const std::string OPTION_7ZIP = "--7zip"; + static const std::string OPTION_NUGET_ID = "--nuget-id"; + static const std::string OPTION_NUGET_VERSION = "--nuget-version"; // input sanitization static const std::string example = @@ -222,18 +233,30 @@ namespace vcpkg::Commands::Export for (auto&& spec : specs) Input::check_triplet(spec.triplet(), paths); - const std::unordered_set options = args.check_and_get_optional_command_arguments( - {OPTION_DRY_RUN, OPTION_RAW, OPTION_NUGET, OPTION_ZIP, OPTION_7ZIP}); - const bool dryRun = options.find(OPTION_DRY_RUN) != options.cend(); - const bool raw = options.find(OPTION_RAW) != options.cend(); - const bool nuget = options.find(OPTION_NUGET) != options.cend(); - const bool zip = options.find(OPTION_ZIP) != options.cend(); - const bool _7zip = options.find(OPTION_7ZIP) != options.cend(); + const auto options = args.check_and_get_optional_command_arguments( + { + OPTION_DRY_RUN, OPTION_RAW, OPTION_NUGET, OPTION_ZIP, OPTION_7ZIP, + }, + { + OPTION_NUGET_ID, OPTION_NUGET_VERSION, + }); + const bool dryRun = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); + const bool raw = options.switches.find(OPTION_RAW) != options.switches.cend(); + const bool nuget = options.switches.find(OPTION_NUGET) != options.switches.cend(); + const bool zip = options.switches.find(OPTION_ZIP) != options.switches.cend(); + const bool _7zip = options.switches.find(OPTION_7ZIP) != options.switches.cend(); Checks::check_exit(VCPKG_LINE_INFO, raw || nuget || zip || _7zip, "Must provide at least one of the following options: --raw --nuget --zip --7zip"); + auto maybe_nuget_id = maybe_lookup(options.settings, OPTION_NUGET_ID); + auto maybe_nuget_version = maybe_lookup(options.settings, OPTION_NUGET_VERSION); + + Checks::check_exit(VCPKG_LINE_INFO, !maybe_nuget_id || nuget, "--nuget-id is only valid with --nuget"); + Checks::check_exit( + VCPKG_LINE_INFO, !maybe_nuget_version || nuget, "--nuget-version is only valid with --nuget"); + // create the plan StatusParagraphs status_db = database_load_check(paths); std::vector export_plan = Dependencies::create_export_plan(paths, specs, status_db); @@ -352,8 +375,10 @@ namespace vcpkg::Commands::Export { System::println("Creating nuget package... "); - const std::string nuget_id = raw_exported_dir_path.filename().string(); - const fs::path output_path = do_nuget_export(paths, nuget_id, raw_exported_dir_path, export_to_path); + const std::string nuget_id = maybe_nuget_id.value_or(raw_exported_dir_path.filename().string()); + const std::string nuget_version = maybe_nuget_version.value_or("1.0.0"); + const fs::path output_path = + do_nuget_export(paths, nuget_id, nuget_version, raw_exported_dir_path, export_to_path); System::println(System::Color::success, "Creating nuget package... done"); System::println(System::Color::success, "NuGet package exported at: %s", output_path.generic_string()); -- cgit v1.2.3 From 800af576df9c632053f1e71f8c16a1c3d37caec2 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 26 Jul 2017 16:46:22 -0700 Subject: [vcpkg-help] Improve help, including a list of topics. --- toolsrc/src/commands_help.cpp | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/commands_help.cpp b/toolsrc/src/commands_help.cpp index e4be11a77..a12f9003d 100644 --- a/toolsrc/src/commands_help.cpp +++ b/toolsrc/src/commands_help.cpp @@ -5,6 +5,14 @@ namespace vcpkg::Commands::Help { + void help_topics() + { + System::println("Available help topics:\n" + " triplet\n" + " integrate\n" + " export"); + } + void help_topic_valid_triplet(const VcpkgPaths& paths) { System::println("Available architecture triplets:"); @@ -14,6 +22,21 @@ namespace vcpkg::Commands::Help } } + void help_topic_export() + { + System::println("Summary:\n" + " vcpkg export [options] ...\n" + "\n" + "Options:\n" + " --7zip Export to a 7zip (.7z) file\n" + " --dry-run Do not actually export\n" + " --nuget Export a NuGet package\n" + " --nuget-id= Specify the id for the exported NuGet package\n" + " --nuget-version= Specify the version for the exported NuGet package\n" + " --raw Export to an uncompressed directory\n" + " --zip Export to a zip file"); + } + void print_usage() { System::println( @@ -25,6 +48,8 @@ namespace vcpkg::Commands::Help " vcpkg list List installed packages\n" " vcpkg update Display list of packages for updating\n" " vcpkg hash [alg] Hash a file by specific algorithm, default SHA512\n" + " vcpkg help topics Display the list of help topics\n" + " vcpkg help Display help for a specific topic\n" "\n" "%s" // Integration help "\n" @@ -77,14 +102,28 @@ namespace vcpkg::Commands::Help Checks::exit_success(VCPKG_LINE_INFO); } const auto& topic = args.command_arguments[0]; - if (topic == "triplet") + if (topic == "triplet" || topic == "triplets" || topic == "triple") { help_topic_valid_triplet(paths); } + else if (topic == "export") + { + help_topic_export(); + } + else if (topic == "integrate") + { + System::print("Commands:\n" + "%s", + Integrate::INTEGRATE_COMMAND_HELPSTRING); + } + else if (topic == "topics") + { + help_topics(); + } else { System::println(System::Color::error, "Error: unknown topic %s", topic); - print_usage(); + help_topics(); Checks::exit_fail(VCPKG_LINE_INFO); } Checks::exit_success(VCPKG_LINE_INFO); -- cgit v1.2.3 From 17b6d75d0d16d8b620e6680c0364208aa8a52651 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 26 Jul 2017 16:51:28 -0700 Subject: [vcpkg-export] Tweak error formatting --- toolsrc/src/commands_export.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index 5e1cc2052..4adfbc0f6 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -246,9 +246,12 @@ namespace vcpkg::Commands::Export const bool zip = options.switches.find(OPTION_ZIP) != options.switches.cend(); const bool _7zip = options.switches.find(OPTION_7ZIP) != options.switches.cend(); - Checks::check_exit(VCPKG_LINE_INFO, - raw || nuget || zip || _7zip, - "Must provide at least one of the following options: --raw --nuget --zip --7zip"); + if (!raw && !nuget && !zip && !_7zip && !dryRun) + { + System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --zip --7zip"); + System::print(example); + Checks::exit_fail(VCPKG_LINE_INFO); + } auto maybe_nuget_id = maybe_lookup(options.settings, OPTION_NUGET_ID); auto maybe_nuget_version = maybe_lookup(options.settings, OPTION_NUGET_VERSION); -- cgit v1.2.3 From 9fb336bd036ec38c0d00e4e30458730ad074a551 Mon Sep 17 00:00:00 2001 From: Han Hu Date: Thu, 27 Jul 2017 15:42:25 +0800 Subject: fix find lapack --- ports/geogram/fix-cmake-config-and-install.patch | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/geogram/fix-cmake-config-and-install.patch b/ports/geogram/fix-cmake-config-and-install.patch index b5490fdc1..77f1ef1c2 100644 --- a/ports/geogram/fix-cmake-config-and-install.patch +++ b/ports/geogram/fix-cmake-config-and-install.patch @@ -134,6 +134,7 @@ index 5789cd2..e4262e3 100644 include_directories(${GEOGRAM_SOURCE_DIR}/src/lib/third_party/numerics/INCLUDE) ++set(LAPACK_lapack_WORKS TRUE) +find_package(BLAS REQUIRED) +find_package(LAPACK REQUIRED) aux_source_directories(SOURCES "Source Files" .) -- cgit v1.2.3 From af677d965e3c5b34f37304401736dff983c1d4fd Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 27 Jul 2017 11:20:20 -0700 Subject: [opencv] Bump version to match flann change. --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 97f2017ee..7dbaf64c2 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.2.0-2 +Version: 3.2.0-3 Build-Depends: zlib, libpng, libjpeg-turbo, tiff #Use the following line instead for optional features from OpenCV-contrib that require protobuf #Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index c72eefba1..3323fb0f4 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -42,6 +42,7 @@ vcpkg_configure_cmake( -DBUILD_PNG=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF + -DBUILD_opencv_flann=ON -DBUILD_opencv_apps=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF @@ -59,7 +60,9 @@ vcpkg_configure_cmake( -DWITH_CUBLAS=OFF -DWITH_OPENCLAMDBLAS=OFF -DWITH_LAPACK=OFF - #-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules # uncomment the following 3 lines to build opencv_contrib modules + + # uncomment the following 3 lines to build opencv_contrib modules + #-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules #-DBUILD_PROTOBUF=OFF #-DUPDATE_PROTO_FILES=ON OPTIONS_DEBUG -- cgit v1.2.3 From c979a4b1bab4ea7dbecfa52d584de9d4c03446e2 Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 28 Jul 2017 01:04:04 +0200 Subject: [libpng] update to 1.6.31 --- ports/libpng/CONTROL | 2 +- ports/libpng/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index 5790f872d..c9b3dc2d2 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.30 +Version: 1.6.31 Build-Depends: zlib 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 0dc6e2a0f..baa39a903 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(LIBPNG_VERSION 1.6.30) +set(LIBPNG_VERSION 1.6.31) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-${LIBPNG_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://downloads.sourceforge.net/project/libpng/libpng16/${LIBPNG_VERSION}/libpng-${LIBPNG_VERSION}.tar.xz" FILENAME "libpng-${LIBPNG_VERSION}.tar.xz" - SHA512 8c58f0f8523d7c7e8e641134c9a0e7fb6b60cddd6b4689afaafde0c99cff74652c6fb800a45149910aa2d8f06695ba4774f6a4d64810f2419a714d4188d72f82 + SHA512 714da63e19d32eadeeb44edf7f2afeaf6ac59f2756e0951015313a98c0f3c1216296886301c5704958b56f4c96b00725791ba2efe9f26b4a92cd743410cc36a9 ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( -- cgit v1.2.3 From 48f9ee87270670f9fb810e6a5742a31fa20f0f83 Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 28 Jul 2017 01:18:21 +0200 Subject: [nana] update to 1.5.4 --- ports/nana/CONTROL | 2 +- ports/nana/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL index cc46b51b8..680dec287 100644 --- a/ports/nana/CONTROL +++ b/ports/nana/CONTROL @@ -1,4 +1,4 @@ Source: nana -Version: 1.5.3 +Version: 1.5.4 Description: Cross-platform library for GUI programming in modern C++ style. Build-Depends: libpng, libjpeg-turbo diff --git a/ports/nana/portfile.cmake b/ports/nana/portfile.cmake index 7150122e7..6f61d79f7 100644 --- a/ports/nana/portfile.cmake +++ b/ports/nana/portfile.cmake @@ -7,8 +7,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cnjinhao/nana - REF v1.5.3 - SHA512 92f2a5023da180616420c411d4ebe0abf5043493688ada82aa5fa15a9331a8842f7def219a1d9edf476b40d311caac1354a5042c87b377af88117fdfae2daced + REF v1.5.4 + SHA512 54d8d06a7792c7c626793f0c5f769884d7af78950a1df7d543f13bbb6de5ae35b51130a150438faa1c3c53dfea29fad6d12b94c535c264aac893325b244c6e0a HEAD_REF develop ) -- cgit v1.2.3 From 6c22dbea97bd708172ae977c17c2dce202ce5b8c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 27 Jul 2017 17:15:24 -0700 Subject: [alembic] Bump version for previous PR --- ports/alembic/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index 0e2b62452..274328735 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.1-1 -Build-Depends:ilmbase, hdf5 +Version: 1.7.1-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. http://alembic.io/ -- cgit v1.2.3 From f7facd51cc0d714cdce0e2b59765c8aabebd9b7d Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 27 Jul 2017 19:25:07 -0700 Subject: [glslang] use vcpkg_from_github --- ports/glslang/CONTROL | 4 +-- ports/glslang/portfile.cmake | 61 +++++++++++++++----------------------------- 2 files changed, 22 insertions(+), 43 deletions(-) diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL index 3b81f5287..ac6e6810b 100644 --- a/ports/glslang/CONTROL +++ b/ports/glslang/CONTROL @@ -1,3 +1,3 @@ Source: glslang -Version: 1c573fbcfba6b3d631008b1babc838501ca925d3-1 -Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator +Version: 1c573fbcfba6b3d631008b1babc838501ca925d3-2 +Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake index 9fd6ae468..8dabcb390 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -1,51 +1,30 @@ -# 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) -find_program(GIT git) - -set(GIT_URL "https://github.com/KhronosGroup/glslang.git") -set(GIT_REF "1c573fbcfba6b3d631008b1babc838501ca925d3") - -if(NOT EXISTS "${DOWNLOADS}/glslang.git") - message(STATUS "Cloning") - vcpkg_execute_required_process( - COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/glslang.git - WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME clone - ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "Dynamic not supported. Building static") + set(VCPKG_LIBRARY_LINKAGE "static") endif() -if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") - message(STATUS "Adding worktree and patching") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) - vcpkg_execute_required_process( - COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REF} - WORKING_DIRECTORY ${DOWNLOADS}/glslang.git - LOGNAME worktree - ) - message(STATUS "Patching") -endif() - -set(VCPKG_LIBRARY_LINKAGE "static") +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/glslang + REF 1c573fbcfba6b3d631008b1babc838501ca925d3 + SHA512 4f04dc39d9a70959ded1f4fe05ca5c7b0413c05bc3f049c11b5be7c8e1a70675f4221c9d8c712e7695f30eadb9bd7d0f1e71f431a6c9d4fea2cd2abbc73bd49a + HEAD_REF master +) vcpkg_configure_cmake( - SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src" + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() -file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/Public" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang) -file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/Include" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang) -file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/MachineIndependent/Versions.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang/MachineIndependent) -file(COPY "${CURRENT_BUILDTREES_DIR}/src/SPIRV/Logger.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV) -file(COPY "${CURRENT_BUILDTREES_DIR}/src/SPIRV/spirv.hpp" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV) -file(COPY "${CURRENT_BUILDTREES_DIR}/src/SPIRV/GlslangToSpv.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV) +file(COPY "${SOURCE_PATH}/glslang/Public" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang) +file(COPY "${SOURCE_PATH}/glslang/Include" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang) +file(COPY "${SOURCE_PATH}/glslang/MachineIndependent/Versions.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang/MachineIndependent) +file(COPY "${SOURCE_PATH}/SPIRV/Logger.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV) +file(COPY "${SOURCE_PATH}/SPIRV/spirv.hpp" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV) +file(COPY "${SOURCE_PATH}/SPIRV/GlslangToSpv.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV) file(COPY "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe" DESTINATION ${CURRENT_PACKAGES_DIR}/tools) file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe") file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/glslangValidator.exe") @@ -56,12 +35,12 @@ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/spirv-remap.exe") file(GLOB BIN_DIR "${CURRENT_PACKAGES_DIR}/bin/*") list(LENGTH BIN_DIR BIN_DIR_SIZE) if(${BIN_DIR_SIZE} EQUAL 0) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") endif() file(GLOB DEBUG_BIN_DIR "${CURRENT_PACKAGES_DIR}/debug/bin/*") list(LENGTH DEBUG_BIN_DIR DEBUG_BIN_DIR_SIZE) if(${DEBUG_BIN_DIR_SIZE} EQUAL 0) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") endif() # Handle copyright -- cgit v1.2.3 From f9278cdf808352bfd7cf58ebcb422125a0bea622 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 27 Jul 2017 19:34:13 -0700 Subject: [libpq] update --- ports/libpq/portfile.cmake | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/ports/libpq/portfile.cmake b/ports/libpq/portfile.cmake index 50ac67bb7..d98ce9a8a 100644 --- a/ports/libpq/portfile.cmake +++ b/ports/libpq/portfile.cmake @@ -1,33 +1,18 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/postgresql-9.6.1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/postgresql-9.6.3) vcpkg_download_distfile(ARCHIVE - URLS "https://ftp.postgresql.org/pub/source/v9.6.1/postgresql-9.6.1.tar.bz2" - FILENAME "postgresql-9.6.1.tar.bz2" - SHA512 f27af67f9a96f6327150330bf091a803e10eabbac4e488cf5e4d72907e2eb1dbde7282fe0b89fd75711fd8bdcdb3688b5a9eac1e4d6871f4e8681c9c8b0e7c45 + URLS "https://ftp.postgresql.org/pub/source/v9.6.3/postgresql-9.6.3.tar.bz2" + FILENAME "postgresql-9.6.3.tar.bz2" + SHA512 97141972e154e6b0e756ee6a4e20f26e82022a9fd4c56305314a3a5567a79ece638e4ac3d513b46138737ae6bd27a098f30013a94767db151181aac9c01290a1 ) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 OPTIONS_DEBUG -DINSTALL_INCLUDES=OFF ) vcpkg_install_cmake() +vcpkg_copy_pdbs() -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpq) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpq/COPYRIGHT ${CURRENT_PACKAGES_DIR}/share/libpq/copyright) - - - -vcpkg_copy_pdbs() \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpq RENAME copyright) -- cgit v1.2.3 From 2b27fdec678de875880bbbaa3af146ce7a515414 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 27 Jul 2017 20:08:28 -0700 Subject: [libogg] use vcpkg_from_github --- ports/libogg/CONTROL | 2 +- ports/libogg/portfile.cmake | 46 +++++++++++---------------------------------- 2 files changed, 12 insertions(+), 36 deletions(-) diff --git a/ports/libogg/CONTROL b/ports/libogg/CONTROL index 266cf4c2b..fb4557e57 100644 --- a/ports/libogg/CONTROL +++ b/ports/libogg/CONTROL @@ -1,3 +1,3 @@ Source: libogg -Version: 1.3.2 +Version: 2017-07-27-cab46b19847 Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs. diff --git a/ports/libogg/portfile.cmake b/ports/libogg/portfile.cmake index 4127a6aef..fb666acde 100644 --- a/ports/libogg/portfile.cmake +++ b/ports/libogg/portfile.cmake @@ -1,44 +1,20 @@ -# 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) -find_program(GIT git) - -set(GIT_URL "https://git.xiph.org/ogg.git") -set(GIT_REF "cab46b19847eb1d38aeda73ab4708716e5776366") - -if(NOT EXISTS "${DOWNLOADS}/ogg.git") - message(STATUS "Cloning") - vcpkg_execute_required_process( - COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/ogg.git - WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME clone - ) -endif() - -if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") - message(STATUS "Adding worktree") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) - vcpkg_execute_required_process( - COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REF} - WORKING_DIRECTORY ${DOWNLOADS}/ogg.git - LOGNAME worktree - ) -endif() +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/ogg + REF cab46b19847eb1d38aeda73ab4708716e5776366 + SHA512 3a5add81210a699c219ef3cef52ed71e00069dfee160aaf23bb68126f768a57139a77022f8c7bec88143a9393865a1e81b0a4c4e7b9e7f533dc665d656e99d90 + HEAD_REF master +) vcpkg_configure_cmake( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src + SOURCE_PATH ${SOURCE_PATH} ) vcpkg_install_cmake() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(COPY ${CURRENT_BUILDTREES_DIR}/src/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libogg) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libogg/COPYING ${CURRENT_PACKAGES_DIR}/share/libogg/copyright) vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libogg RENAME copyright) -- cgit v1.2.3 From 78266bd041db09034e2f9236b4979b7eeb7e38c8 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 27 Jul 2017 20:21:15 -0700 Subject: [vcpkg] shorten license instruction in portfile.in.cmake --- scripts/templates/portfile.in.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/templates/portfile.in.cmake b/scripts/templates/portfile.in.cmake index bc5f5fe07..e89ad4640 100644 --- a/scripts/templates/portfile.in.cmake +++ b/scripts/templates/portfile.in.cmake @@ -30,5 +30,4 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # 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) \ No newline at end of file +# file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/@PORT@ RENAME copyright) -- cgit v1.2.3 From e665c617b2eefc094da355c20e7e1570d88108a8 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 27 Jul 2017 20:37:19 -0700 Subject: [log4cplus] update --- ports/log4cplus/portfile.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/log4cplus/portfile.cmake b/ports/log4cplus/portfile.cmake index 1eb1a7a59..ecd4e5765 100644 --- a/ports/log4cplus/portfile.cmake +++ b/ports/log4cplus/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/log4cplus-REL_1_1_3-RC7) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/log4cplus/log4cplus/archive/REL_1_1_3-RC7.zip" - FILENAME "REL_1_1_3-RC7.zip" - SHA512 06320cb2ab6e18e91c6d79a943c9fdcd82b984e8e908e232f0e0e8eca69496f1f3845913107218bc2be356473315f8dfb822a5993bab8efcadfc4819532da823 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO log4cplus/log4cplus + REF REL_1_2_1-RC2 + SHA512 480a2a61b01e988253c1bf2bb26088030541a63811c8ffbb9e90581d556b717df5220e3ff72eedd27ea704af35218f71f20ceadf4d6d94984b4f56d273b4d3a3 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 49961e151b2382bd9b136f1fa3c109261c7dc794 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 27 Jul 2017 20:43:05 -0700 Subject: [dimcli] update --- ports/dimcli/CONTROL | 3 +-- ports/dimcli/portfile.cmake | 28 +++++++++------------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/ports/dimcli/CONTROL b/ports/dimcli/CONTROL index c85457c89..295c1ecda 100644 --- a/ports/dimcli/CONTROL +++ b/ports/dimcli/CONTROL @@ -1,4 +1,3 @@ Source: dimcli -Version: 1.0.3 +Version: 2.0.0 Description: C++ command line parser toolkit - diff --git a/ports/dimcli/portfile.cmake b/ports/dimcli/portfile.cmake index 465e1699e..72097a5f5 100644 --- a/ports/dimcli/portfile.cmake +++ b/ports/dimcli/portfile.cmake @@ -1,28 +1,19 @@ -# 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} -# - -set(ver 1.0.3) include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/dimcli-${ver}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/gknowles/dimcli/archive/v${ver}.zip" - FILENAME "dimcli-${ver}.zip" - SHA512 5168aff22223cb85421fabd4ce82f3ec0bcab6551704484bc5b05be02ead23bd3d4a629c558a15f214e9d999eccc9c129649d066fdacfda3c839a40b48f8ec17 -) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gknowles/dimcli + REF v2.0.0 + SHA512 55ff29e3ddd6a96946f58e661231a1d2197f56a86c9260142f083589738aaa5e2f7721c754fa4a86b450a943c19367e1c4f82aec57e5b7ae7336f989e0194dec + HEAD_REF master +) set(staticCrt OFF) if(VCPKG_CRT_LINKAGE STREQUAL static) set(staticCrt ON) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DLINK_STATIC_RUNTIME:BOOL=${staticCrt} + OPTIONS -DLINK_STATIC_RUNTIME:BOOL=${staticCrt} ) vcpkg_install_cmake() @@ -31,7 +22,6 @@ vcpkg_install_cmake() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") # Handle copyright -file(INSTALL "${SOURCE_PATH}/LICENSE" +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/dimcli" RENAME copyright) - -- cgit v1.2.3 From c1da4fa5298207fd796c3a1eee6b8133391928e7 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 27 Jul 2017 21:07:39 -0700 Subject: [log4plus] update and fix cmake --- ports/log4cplus/CONTROL | 2 +- ports/log4cplus/portfile.cmake | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/log4cplus/CONTROL b/ports/log4cplus/CONTROL index 2d367a31a..d4af82051 100644 --- a/ports/log4cplus/CONTROL +++ b/ports/log4cplus/CONTROL @@ -1,3 +1,3 @@ Source: log4cplus -Version: 1.1.3-RC7 +Version: REL_1_2_1-RC2 Description: A simple to use C++ logging API providing thread--safe, flexible, and arbitrarily granular control over log management and configuration diff --git a/ports/log4cplus/portfile.cmake b/ports/log4cplus/portfile.cmake index ecd4e5765..c1c5de3e2 100644 --- a/ports/log4cplus/portfile.cmake +++ b/ports/log4cplus/portfile.cmake @@ -9,12 +9,18 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DLOG4CPLUS_BUILD_TESTING=OFF -DLOG4CPLUS_BUILD_LOGGINGSERVER=OFF -DWITH_UNIT_TESTS=OFF ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +vcpkg_copy_pdbs() + 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/log4cplus) -- cgit v1.2.3 From dd380654c632187e8ac5b2f55aac15892ad76bbd Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 27 Jul 2017 21:17:34 -0700 Subject: [openvr] update --- ports/openvr/CONTROL | 2 +- ports/openvr/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/openvr/CONTROL b/ports/openvr/CONTROL index 2a2228ba2..69d7ba966 100644 --- a/ports/openvr/CONTROL +++ b/ports/openvr/CONTROL @@ -1,3 +1,3 @@ Source: openvr -Version: 1.0.5 +Version: 1.0.9 Description: an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting. diff --git a/ports/openvr/portfile.cmake b/ports/openvr/portfile.cmake index 94e90143d..50ec79d77 100644 --- a/ports/openvr/portfile.cmake +++ b/ports/openvr/portfile.cmake @@ -7,11 +7,11 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openvr-1.0.5) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openvr-1.0.9) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/ValveSoftware/openvr/archive/v1.0.5.zip" - FILENAME "openvr-v1.0.5.zip" - SHA512 18c2e3f7a8754d0e9389c953d0af70788c77adf43f51d25b6664beaeb407dc8d2daa755396c45ce2b4be1b08d333b378810dbebdf3c9bb5f5a03a9d372dc97b0 + URLS "https://github.com/ValveSoftware/openvr/archive/v1.0.9.zip" + FILENAME "openvr-v1.0.9.zip" + SHA512 969cf6bf94802553bb4f1e5d6a2348566847b3d60efee9d8f83233d1d85e44a870e388028be956950d4f8ecb79f8e0bcf0a6b987b0ab3083060ece5ea48b8fa7 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 859c9b839c44d6c69f1f9c96d123d25adf1c67b0 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 27 Jul 2017 21:23:51 -0700 Subject: [utfcpp] update --- ports/utfcpp/CONTROL | 2 +- ports/utfcpp/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/utfcpp/CONTROL b/ports/utfcpp/CONTROL index 619e8b2b3..e98dd9ee4 100644 --- a/ports/utfcpp/CONTROL +++ b/ports/utfcpp/CONTROL @@ -1,3 +1,3 @@ Source: utfcpp -Version: 2.3.4 +Version: 2.3.5 Description: UTF-8 with C++ in a Portable Way diff --git a/ports/utfcpp/portfile.cmake b/ports/utfcpp/portfile.cmake index 56599dd3a..19c062f36 100644 --- a/ports/utfcpp/portfile.cmake +++ b/ports/utfcpp/portfile.cmake @@ -1,10 +1,10 @@ #header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/utfcpp-2.3.4) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/utfcpp-2.3.5) vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://github.com/nemtrif/utfcpp/archive/v2.3.4.tar.gz" - FILENAME "utfcpp-2.3.4.tar.gz" - SHA512 1baa67c4efb926bba97dfbc869ac057d5d6cf67e94879fc0854ec3d75a5bae7c47cb3e9fd9cbc7bed9ca5daf40f173c0349bce2f6aa34a400bdf77d01522ff2f + URLS "https://github.com/nemtrif/utfcpp/archive/v2.3.5.tar.gz" + FILENAME "utfcpp-2.3.5.tar.gz" + SHA512 d5e672de952b78a78a8af0c81664f15667b30558fd406a9abc72c14dc444e0869e7c02cb66fa017ec0e760c0fb23c3e923a4b171c2acb3ed7b71612783e789ee ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) -- cgit v1.2.3 From 4a5ce3165dcd0769c55a53151c145a3d3df9d9ef Mon Sep 17 00:00:00 2001 From: paercebal Date: Fri, 28 Jul 2017 12:57:05 +0200 Subject: fix the TRIPLET_SYSTEM_ARCH initialization --- scripts/ports.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 1d699a966..8b4d17d80 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -32,8 +32,6 @@ endif() if(CMD MATCHES "^BUILD$") - string(REGEX REPLACE "([^-]*)-([^-]*)" "\\1" TRIPLET_SYSTEM_ARCH ${TARGET_TRIPLET}) - set(CMAKE_TRIPLET_FILE ${VCPKG_ROOT_DIR}/triplets/${TARGET_TRIPLET}.cmake) if(NOT EXISTS ${CMAKE_TRIPLET_FILE}) message(FATAL_ERROR "Unsupported target triplet. Triplet file does not exist: ${CMAKE_TRIPLET_FILE}") @@ -70,6 +68,7 @@ if(CMD MATCHES "^BUILD$") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR} ${CURRENT_PACKAGES_DIR}) include(${CMAKE_TRIPLET_FILE}) + set(TRIPLET_SYSTEM_ARCH ${VCPKG_TARGET_ARCHITECTURE}) include(${CURRENT_PORT_DIR}/portfile.cmake) set(BUILD_INFO_FILE_PATH ${CURRENT_PACKAGES_DIR}/BUILD_INFO) -- cgit v1.2.3 From ffbb6ff424a89585211a4aefb12ec4d230283035 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 28 Jul 2017 10:21:19 -0700 Subject: [lcms] Version bump --- ports/lcms/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/lcms/CONTROL b/ports/lcms/CONTROL index 64567fddd..2349503e9 100644 --- a/ports/lcms/CONTROL +++ b/ports/lcms/CONTROL @@ -1,4 +1,4 @@ Source: lcms -Version: 2.8 +Version: 2.8-1 Build-Depends: Description: Little CMS. \ No newline at end of file -- cgit v1.2.3 From 63454f618996baefef3f60f90767cd4c02d7590d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 28 Jul 2017 11:44:54 -0700 Subject: [vcpkg-cmake] Always search for dynamic boost libraries --- scripts/buildsystems/vcpkg.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 41bdb3e60..8fd08ffb6 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -138,6 +138,13 @@ if(NOT VCPKG_TOOLCHAIN) endif() endfunction() + function(find_package name) + if(name STREQUAL "Boost") + unset(Boost_USE_STATIC_LIBS) + endif() + _find_package(${ARGV}) + endfunction() + set(VCPKG_TOOLCHAIN ON) endif() -- cgit v1.2.3 From 4735040f66155c1b8f94d339bedb6afd4905e47c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 28 Jul 2017 16:46:57 -0700 Subject: [vcpkg] Hotfix for 63454f6189. --- scripts/buildsystems/vcpkg.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 8fd08ffb6..d8c7ee6b8 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -138,12 +138,12 @@ if(NOT VCPKG_TOOLCHAIN) endif() endfunction() - function(find_package name) + macro(find_package name) if(name STREQUAL "Boost") unset(Boost_USE_STATIC_LIBS) endif() _find_package(${ARGV}) - endfunction() + endmacro() set(VCPKG_TOOLCHAIN ON) endif() -- cgit v1.2.3 From b46bb2f913f553c75af115e7d1106797f491913f Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 28 Jul 2017 16:54:57 -0700 Subject: [vcpkg] add a patch for empty string literal --- ports/libkml/patch_empty_literal_on_vc.patch | 13 +++++++++++++ ports/libkml/portfile.cmake | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 ports/libkml/patch_empty_literal_on_vc.patch diff --git a/ports/libkml/patch_empty_literal_on_vc.patch b/ports/libkml/patch_empty_literal_on_vc.patch new file mode 100644 index 000000000..8a3581a05 --- /dev/null +++ b/ports/libkml/patch_empty_literal_on_vc.patch @@ -0,0 +1,13 @@ +diff --git a/src/kml/base/file_win32.cc b/src/kml/base/file_win32.cc +index c46e099..28ccb36 100644 +--- a/src/kml/base/file_win32.cc ++++ b/src/kml/base/file_win32.cc +@@ -42,7 +42,7 @@ namespace kmlbase { + // Internal to the win32 file class. We need a conversion from string to + // LPCWSTR. + static std::wstring Str2Wstr(const string& str) { +- std::wstring wstr(str.length(), L''); ++ std::wstring wstr(str.length(), L' '); + std::copy(str.begin(), str.end(), wstr.begin()); + return wstr; + } diff --git a/ports/libkml/portfile.cmake b/ports/libkml/portfile.cmake index 8aaa96957..5d2f014f8 100644 --- a/ports/libkml/portfile.cmake +++ b/ports/libkml/portfile.cmake @@ -7,6 +7,13 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/patch_empty_literal_on_vc.patch" +) + + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} ) -- cgit v1.2.3 From 7c6c706160528c9234a91161b834529d4e13d761 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 28 Jul 2017 17:05:38 -0700 Subject: [vcpkg-getWindowsSDK] Also look in the paths, just in case. --- scripts/getWindowsSDK.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 index 3aa23cc56..9aebae8e3 100644 --- a/scripts/getWindowsSDK.ps1 +++ b/scripts/getWindowsSDK.ps1 @@ -59,7 +59,8 @@ Write-Verbose "`n" Write-Verbose "Looking for Windows 10 SDK" CheckWindows10SDK((Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue).KitsRoot10) CheckWindows10SDK((Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue).KitsRoot10) - +CheckWindows10SDK("$env:ProgramFiles\Windows Kits\10") +CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") # Windows 8.1 SDK function CheckWindows81SDK($path) @@ -81,6 +82,8 @@ Write-Verbose "`n" Write-Verbose "Looking for Windows 8.1 SDK" CheckWindows81SDK((Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue).KitsRoot81) CheckWindows81SDK((Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue).KitsRoot81) +CheckWindows81SDK("$env:ProgramFiles\Windows Kits\8.1") +CheckWindows81SDK("${env:ProgramFiles(x86)}\Windows Kits\8.1") Write-Verbose "`n`n`n" Write-Verbose "The following Windows SDKs were found:" -- cgit v1.2.3 From 1c10c0b8fd9498034c82b49c6eb759caf61ff6bc Mon Sep 17 00:00:00 2001 From: ousttrue Date: Sat, 29 Jul 2017 13:19:49 +0900 Subject: [alembic] fix FindHDF5.cmake issue for cmake-3.9.0 --- ports/alembic/portfile.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index 56c3a4d30..a5fc75473 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -18,9 +18,15 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-hdf5link.patch ) +SET(VCPKG_INSTALLED ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DUSE_HDF5=ON +# work around for cmake-3.9 FindHDF5.cmake issue +# https://gitlab.kitware.com/cmake/cmake/issues/17039 + -DHDF5_FOUND=1 + -DHDF5_INCLUDE_DIRS=${VCPKG_INSTALLED}/include + -DHDF5_LIBRARIES=${VCPKG_INSTALLED}/lib/hdf5.lib ) vcpkg_install_cmake() -- cgit v1.2.3 From 2dafea79de0cbe53f3224a35ab35d397ab618665 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Sat, 29 Jul 2017 13:27:48 +0900 Subject: increment version --- ports/alembic/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index 274328735..c12a59217 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.1-2 +Version: 1.7.1-3 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. http://alembic.io/ -- cgit v1.2.3 From 1abfae8a3defdc2573ae9f1cd569d4c750ec2dbe Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sat, 29 Jul 2017 17:48:14 +0900 Subject: Fix link the dependency libraries in debug configuration Fix link the dependency libraries in debug configuration. This commit will fixed a problem that linking dependency libraries of release version in debug configuration. --- ports/vtk/CONTROL | 2 +- ports/vtk/disable-workaround-findhdf5.patch | 23 +++++++++++++++++++++++ ports/vtk/portfile.cmake | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ports/vtk/disable-workaround-findhdf5.patch diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index dc00025bf..2b273560a 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,4 @@ Source: vtk -Version: 7.1.1 +Version: 7.1.1-1 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi diff --git a/ports/vtk/disable-workaround-findhdf5.patch b/ports/vtk/disable-workaround-findhdf5.patch new file mode 100644 index 000000000..c896af2f5 --- /dev/null +++ b/ports/vtk/disable-workaround-findhdf5.patch @@ -0,0 +1,23 @@ +diff --git a/CMake/vtkModuleMacros.cmake b/CMake/vtkModuleMacros.cmake +index fdd83ed8fc..4986582a5b 100644 +--- a/CMake/vtkModuleMacros.cmake ++++ b/CMake/vtkModuleMacros.cmake +@@ -885,18 +885,6 @@ macro(vtk_module_third_party _pkg) + set(vtk${_lower}_DEFINITIONS ${${_upper}_DEFINITIONS}) + endif() + +- #a workaround for bad FindHDF5 behavior in which deb or opt can +- #end up empty. cmake >= 2.8.12.2 makes this uneccessary +- string(REGEX MATCH "debug;.*optimized;.*" +- _remove_deb_opt "${vtk${_lower}_LIBRARIES}") +- if (_remove_deb_opt) +- set(_tmp ${vtk${_lower}_LIBRARIES}) +- list(REMOVE_ITEM _tmp "debug") +- list(REMOVE_ITEM _tmp "optimized") +- list(REMOVE_DUPLICATES _tmp) +- set(vtk${_lower}_LIBRARIES ${_tmp}) +- endif() +- + set(vtk${_lower}_INCLUDE_DIRS "") + else() + if(_nolibs) diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 16854513b..269e6cc79 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -15,6 +15,7 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/netcdf-use-hdf5-definitions.patch ${CMAKE_CURRENT_LIST_DIR}/dont-define-ssize_t.patch ${CMAKE_CURRENT_LIST_DIR}/fix-findhdf5-shared.patch + ${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) -- cgit v1.2.3 From cdf5e78806b33d06ab9f1a52ebcfd792fe54053f Mon Sep 17 00:00:00 2001 From: ousttrue Date: Sat, 29 Jul 2017 17:56:53 +0900 Subject: use CURRENT_INSTALLED_DIR --- ports/alembic/portfile.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index a5fc75473..99f2450e5 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -18,15 +18,14 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-hdf5link.patch ) -SET(VCPKG_INSTALLED ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DUSE_HDF5=ON # work around for cmake-3.9 FindHDF5.cmake issue # https://gitlab.kitware.com/cmake/cmake/issues/17039 -DHDF5_FOUND=1 - -DHDF5_INCLUDE_DIRS=${VCPKG_INSTALLED}/include - -DHDF5_LIBRARIES=${VCPKG_INSTALLED}/lib/hdf5.lib + -DHDF5_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include + -DHDF5_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/hdf5.lib ) vcpkg_install_cmake() -- cgit v1.2.3 From ec3858c6b1679cc5bf360d69a97774498205da84 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Sun, 30 Jul 2017 09:19:13 +0900 Subject: use FIND_LIBRARY, bypass FindHDF5.cmake --- ports/alembic/bypass-findhdf5.patch | 30 ++++++++++++++++++++++++++++++ ports/alembic/portfile.cmake | 13 ++++++------- 2 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 ports/alembic/bypass-findhdf5.patch diff --git a/ports/alembic/bypass-findhdf5.patch b/ports/alembic/bypass-findhdf5.patch new file mode 100644 index 000000000..91cb37fab --- /dev/null +++ b/ports/alembic/bypass-findhdf5.patch @@ -0,0 +1,30 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ce0a8e0..229fc77 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -226,7 +226,24 @@ INCLUDE_DIRECTORIES(${ALEMBIC_ILMBASE_INCLUDE_DIRECTORY}) + IF (USE_HDF5) + FIND_PACKAGE(ZLIB REQUIRED) + SET(ALEMBIC_WITH_HDF5 "1") +- INCLUDE("./cmake/AlembicHDF5.cmake") ++ #INCLUDE("./cmake/AlembicHDF5.cmake") ++ FIND_LIBRARY(HDF5_LIBRARIES_RELEASE ++ NAMES hdf5 ++ PATHS ${HDF5_ROOT}/lib ++ ) ++ MESSAGE(STATUS ${HDF5_LIBRARIES_RELEASE}) ++ FIND_LIBRARY(HDF5_LIBRARIES_DEBUG ++ NAMES hdf5_D ++ PATHS ${HDF5_ROOT}/debug/lib ++ ) ++ MESSAGE(STATUS ${HDF5_LIBRARIES_DEBUG}) ++ SET(HDF5_LIBRARIES ++ optimized ${HDF5_LIBRARIES_RELEASE} ++ debug ${HDF5_LIBRARIES_DEBUG} ++ ) ++ SET(HDF5_INCLUDE_DIRS ++ ${HDF5_ROOT}/include ++ ) + INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIRS}) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DH5_USE_18_API") + ENDIF() diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index 99f2450e5..0d7b67dda 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -15,17 +15,16 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-hdf5link.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-hdf5link.patch + ${CMAKE_CURRENT_LIST_DIR}/bypass-findhdf5.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DUSE_HDF5=ON -# work around for cmake-3.9 FindHDF5.cmake issue -# https://gitlab.kitware.com/cmake/cmake/issues/17039 - -DHDF5_FOUND=1 - -DHDF5_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include - -DHDF5_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/hdf5.lib + OPTIONS + -DUSE_HDF5=ON + -DHDF5_ROOT=${CURRENT_INSTALLED_DIR} ) vcpkg_install_cmake() -- cgit v1.2.3 From f4c860a928bf2912179f072e9178d7f3ea99e94c Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 29 Jul 2017 15:27:34 +0200 Subject: [snappy] update to 1.1.6 --- ports/snappy/CMakeLists.txt | 164 ------------------------------------- ports/snappy/CONTROL | 2 +- ports/snappy/SnappyConfig.cmake.in | 9 -- ports/snappy/config.h.in | 95 --------------------- ports/snappy/portfile.cmake | 31 ++++--- 5 files changed, 21 insertions(+), 280 deletions(-) delete mode 100644 ports/snappy/CMakeLists.txt delete mode 100644 ports/snappy/SnappyConfig.cmake.in delete mode 100644 ports/snappy/config.h.in diff --git a/ports/snappy/CMakeLists.txt b/ports/snappy/CMakeLists.txt deleted file mode 100644 index ea613019d..000000000 --- a/ports/snappy/CMakeLists.txt +++ /dev/null @@ -1,164 +0,0 @@ -# https://github.com/google/snappy/pull/29 -CMAKE_MINIMUM_REQUIRED(VERSION 3.4) -PROJECT(snappy VERSION 1.1.4 LANGUAGES C CXX) - -option(SNAPPY_BUILD_TESTS "Build snappy tests" OFF) - -SET(CMAKE_INCLUDE_CURRENT_DIR ON) - -INCLUDE(CheckIncludeFiles) -INCLUDE(CheckLibraryExists) -INCLUDE(CheckCXXSourceCompiles) -INCLUDE(CMakePackageConfigHelpers) - -CHECK_INCLUDE_FILES("byteswap.h" HAVE_BYTESWAP_H) -CHECK_INCLUDE_FILES("dlfcn.h" HAVE_DLFCN_H) -CHECK_INCLUDE_FILES("inttypes.h" HAVE_INTTYPES_H) -CHECK_INCLUDE_FILES("memory.h" HAVE_MEMORY_H) -CHECK_INCLUDE_FILES("stddef.h" HAVE_STDDEF_H) -CHECK_INCLUDE_FILES("stdint.h" HAVE_STDINT_H) -CHECK_INCLUDE_FILES("stdlib.h" HAVE_STDLIB_H) -CHECK_INCLUDE_FILES("strings.h" HAVE_STRINGS_H) -CHECK_INCLUDE_FILES("string.h" HAVE_STRING_H) -CHECK_INCLUDE_FILES("sys/byteswap.h" HAVE_SYS_BYTESWAP_H) -CHECK_INCLUDE_FILES("sys/endian.h" HAVE_SYS_ENDIAN_H) -CHECK_INCLUDE_FILES("sys/mman.h" HAVE_SYS_MMAN_H) -CHECK_INCLUDE_FILES("sys/resource.h" HAVE_SYS_RESOURCE_H) -CHECK_INCLUDE_FILES("sys/stat.h" HAVE_SYS_STAT_H) -CHECK_INCLUDE_FILES("sys/time.h" HAVE_SYS_TIME_H) -CHECK_INCLUDE_FILES("sys/types.h" HAVE_SYS_TYPES_H) -CHECK_INCLUDE_FILES("sys/uio.h" HAVE_SYS_UIO_H) -CHECK_INCLUDE_FILES("unistd.h" HAVE_UNISTD_H) -CHECK_INCLUDE_FILES("windows.h" HAVE_WINDOWS_H) - -IF (NOT HAVE_SYS_UIO_H) - SET(HAVE_SYS_UIO_H 0) -ENDIF (NOT HAVE_SYS_UIO_H) - -IF (NOT HAVE_STDINT_H) - SET(HAVE_STDINT_H 0) -ENDIF (NOT HAVE_STDINT_H) - -IF (NOT HAVE_STDDEF_H) - SET(HAVE_STDDEF_H 0) -ENDIF (NOT HAVE_STDDEF_H) - -CHECK_CXX_SOURCE_COMPILES("int main(void) { return __builtin_expect(0, 1); }" - HAVE_BUILTIN_EXPECT) - -CHECK_CXX_SOURCE_COMPILES("int main(void) { return __builtin_ctzll(0); }" - HAVE_BUILTIN_CTZ) - -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in config.h) - -# Configure snappy-stubs-public.h.in -SET(ac_cv_have_stdint_h ${HAVE_STDINT_H}) -SET(ac_cv_have_stddef_h ${HAVE_STDDEF_H}) -SET(ac_cv_have_sys_uio_h ${HAVE_SYS_UIO_H}) -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/snappy-stubs-public.h.in - snappy-stubs-public.h) - -IF (MSVC AND (CMAKE_SIZEOF_VOID_P EQUAL 8)) - ADD_DEFINITIONS(-D__SSE2__) -ENDIF (MSVC AND (CMAKE_SIZEOF_VOID_P EQUAL 8)) - -IF (WIN32) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) -ENDIF (WIN32) - -# Define the main library. -ADD_LIBRARY(snappy - snappy-c.cc - snappy-c.h - snappy-sinksource.cc - snappy-sinksource.h - snappy-stubs-internal.cc - snappy-stubs-public.h - snappy.cc - snappy.h) - -TARGET_COMPILE_DEFINITIONS(snappy PRIVATE -DHAVE_CONFIG_H) - -SET_TARGET_PROPERTIES(snappy PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) - -INSTALL(FILES snappy.h - snappy-c.h - snappy-sinksource.h - ${CMAKE_CURRENT_BINARY_DIR}/snappy-stubs-public.h - DESTINATION include) - -INSTALL(TARGETS snappy - EXPORT SnappyTargets - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) -INSTALL(EXPORT SnappyTargets NAMESPACE Snappy:: DESTINATION share/snappy) - -SET(INCLUDE_INSTALL_DIR include) -SET(LIBRARY_INSTALL_DIR lib) -SET(BINARY_INSTALL_DIR bin) - -WRITE_BASIC_PACKAGE_VERSION_FILE(${CMAKE_CURRENT_BINARY_DIR}/SnappyConfigVersion.cmake - COMPATIBILITY SameMajorVersion) -CONFIGURE_PACKAGE_CONFIG_FILE(SnappyConfig.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/SnappyConfig.cmake - INSTALL_DESTINATION share/snappy - PATH_VARS INCLUDE_INSTALL_DIR LIBRARY_INSTALL_DIR BINARY_INSTALL_DIR - ) - -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/SnappyConfig.cmake - ${CMAKE_CURRENT_BINARY_DIR}/SnappyConfigVersion.cmake - DESTINATION share/snappy) - -if (SNAPPY_BUILD_TESTS) - FIND_PACKAGE(zlib QUIET) - if (NOT ZLIB_FOUND) - CHECK_LIBRARY_EXISTS(zlib zlibVersion "" HAVE_LIBZ) - ENDIF (NOT ZLIB_FOUND) - CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_15_compress "" HAVE_LIBLZO2) - CHECK_LIBRARY_EXISTS(lzf lzf_compress "" HAVE_LIBLZF) - CHECK_LIBRARY_EXISTS(fastlz fastlz_compress "" HAVE_LIBFASTLZ) - CHECK_LIBRARY_EXISTS(quicklz qlz_compress "" HAVE_LIBQUICKLZ) - - FIND_PACKAGE(GTest REQUIRED) - SET(HAVE_GTEST 1) - - FIND_PACKAGE(Gflags REQUIRED) - SET(HAVE_GFLAGS 1) - - ENABLE_TESTING() - - IF (ZLIB_FOUND) - set(HAVE_LIBZ 1) - LIST(APPEND COMPRESSION_LIBS ${ZLIB_LIBRARIES}) - ELSE() - LIST(APPEND COMPRESSION_LIBS zlib) - ENDIF (ZLIB_FOUND) - - IF (HAVE_LIBLZO2) - LIST(APPEND COMPRESSION_LIBS lzo2) - ENDIF (HAVE_LIBLZO2) - - IF (HAVE_LIBLZF) - LIST(APPEND COMPRESSION_LIBS lzf) - ENDIF (HAVE_LIBLZF) - - IF (HAVE_LIBFASTLZ) - LIST(APPEND COMPRESSION_LIBS fastlz) - ENDIF (HAVE_LIBFASTLZ) - - IF (HAVE_LIBQUICKLZ) - LIST(APPEND COMPRESSION_LIBS quicklz) - ENDIF (HAVE_LIBQUICKLZ) - - ADD_EXECUTABLE(snappy-unittest snappy_unittest.cc snappy-test.cc) - TARGET_COMPILE_DEFINITIONS(snappy-unittest PRIVATE -DHAVE_CONFIG_H) - TARGET_LINK_LIBRARIES(snappy-unittest snappy ${COMPRESSION_LIBS} - ${GFLAGS_LIBRARIES}) - TARGET_INCLUDE_DIRECTORIES(snappy-unittest BEFORE PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} - ${GTEST_INCLUDE_DIRS} ${GFLAGS_INCLUDE_DIRS}) - - ADD_TEST(NAME snappy-unittest - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/snappy-unittest) -endif (SNAPPY_BUILD_TESTS) diff --git a/ports/snappy/CONTROL b/ports/snappy/CONTROL index 7d09402bf..984b00882 100644 --- a/ports/snappy/CONTROL +++ b/ports/snappy/CONTROL @@ -1,3 +1,3 @@ Source: snappy -Version: 1.1.4-1 +Version: 1.1.6-be6dc3d Description: A fast compressor/decompressor. diff --git a/ports/snappy/SnappyConfig.cmake.in b/ports/snappy/SnappyConfig.cmake.in deleted file mode 100644 index 80387748c..000000000 --- a/ports/snappy/SnappyConfig.cmake.in +++ /dev/null @@ -1,9 +0,0 @@ -set(SNAPPY_VERSION @SNAPPY_MAJOR@.@SNAPPY_MINOR@.@SNAPPY_PATCHLEVEL@) - -@PACKAGE_INIT@ - -set_and_check(SNAPPY_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") -set_and_check(SNAPPY_LIBRARY_DIR "@PACKAGE_LIBRARY_INSTALL_DIR@") -set_and_check(SNAPPY_BINARY_DIR "@PACKAGE_BINARY_INSTALL_DIR@") - -check_required_components(SNAPPY) diff --git a/ports/snappy/config.h.in b/ports/snappy/config.h.in deleted file mode 100644 index 32297cd4f..000000000 --- a/ports/snappy/config.h.in +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef SNAPPY_CONFIG_H -#define SNAPPY_CONFIG_H 1 - -/* Define to 1 if the compiler supports __builtin_ctz and friends. */ -#cmakedefine HAVE_BUILTIN_CTZ ${HAVE_BUILTIN_CTZ} - -/* Define to 1 if the compiler supports __builtin_expect. */ -#cmakedefine HAVE_BUILTIN_EXPECT ${HAVE_BUILTIN_EXPECT} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_BYTESWAP_H ${HAVE_BYTESWAP_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_DLFCN_H ${HAVE_DLFCN_H} - -/* Use the gflags package for command-line parsing. */ -#cmakedefine HAVE_GFLAGS ${HAVE_GFLAGS} - -/* Defined when Google Test is available. */ -#cmakedefine HAVE_GTEST ${HAVE_GTEST} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_INTTYPES_H ${HAVE_INTTYPES_H} - -/* Define to 1 if you have the `fastlz' library (-lfastlz). */ -#cmakedefine HAVE_LIBFASTLZ ${HAVE_LIBFASTLZ} - -/* Define to 1 if you have the `lzf' library (-llzf). */ -#cmakedefine HAVE_LIBLZF ${HAVE_LIBLZF} - -/* Define to 1 if you have the `lzo2' library (-llzo2). */ -#cmakedefine HAVE_LIBLZO2 ${HAVE_LIBLZO2} - -/* Define to 1 if you have the `quicklz' library (-lquicklz). */ -#cmakedefine HAVE_LIBQUICKLZ ${HAVE_LIBQUICKLZ} - -/* Define to 1 if you have the `z' library (-lz). */ -#cmakedefine HAVE_LIBZ ${HAVE_LIBZ} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_UIO_H ${HAVE_SYS_UIO_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_MEMORY_H ${HAVE_MEMORY_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDDEF_H ${HAVE_STDDEF_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H ${HAVE_STDLIB_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRINGS_H ${HAVE_STRINGS_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H ${HAVE_STRING_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_BYTESWAP_H ${HAVE_SYS_BYTESWAP_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_ENDIAN_H ${HAVE_SYS_ENDIAN_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_MMAN_H ${HAVE_SYS_MMAN_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_RESOURCE_H ${HAVE_SYS_RESOURCE_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_STAT_H ${HAVE_SYS_STAT_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TIME_H ${HAVE_SYS_TIME_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H} - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_WINDOWS_H ${HAVE_WINDOWS_H} - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ -#cmakedefine WORDS_BIGENDIAN - -#endif diff --git a/ports/snappy/portfile.cmake b/ports/snappy/portfile.cmake index d4bb7bb20..7e78a7f1b 100644 --- a/ports/snappy/portfile.cmake +++ b/ports/snappy/portfile.cmake @@ -3,24 +3,33 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/snappy - REF 1.1.4 - SHA512 873f655713611f4bdfc13ab2a6d09245681f427fbd4f6a7a880a49b8c526875dbdd623e203905450268f542be24a2dc9dae50e6acc1516af1d2ffff3f96553da + REF be6dc3db83c4701e3e79694dcbfd1c3da03b91dd + SHA512 1e01a925a2c0bab8b9a329d005384e4b620df118317fd8408ea6afdb22278a2710d26b8d51e2ef762798c757a9e01b47db55280ebb84ca290fb88ae5b18d63e3 HEAD_REF master ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/SnappyConfig.cmake.in DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH}) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH}) + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSNAPPY_BUILD_TESTS=OFF) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Snappy) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + foreach(CONF debug release) + file(READ ${CURRENT_PACKAGES_DIR}/share/snappy/SnappyTargets-${CONF}.cmake CONFIG_FILE) + string(REPLACE "lib/snappy.dll" "bin/snappy.dll" CONFIG_FILE "${CONFIG_FILE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/snappy/SnappyTargets-${CONF}.cmake "${CONFIG_FILE}") + endforeach() + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/snappy.dll ${CURRENT_PACKAGES_DIR}/bin/snappy.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/snappy.dll ${CURRENT_PACKAGES_DIR}/debug/bin/snappy.dll) +endif() + vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/share/snappy/SnappyConfigVersion.cmake) -vcpkg_fixup_cmake_targets() - -file(COPY ${CURRENT_BUILDTREES_DIR}/src/snappy-1.1.4/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/snappy) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/snappy) file(RENAME ${CURRENT_PACKAGES_DIR}/share/snappy/COPYING ${CURRENT_PACKAGES_DIR}/share/snappy/copyright) -- cgit v1.2.3 From af32beafa797ba373d0d1c5bcf1ab1f5914b049f Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 30 Jul 2017 11:09:07 -0700 Subject: New port: g2o --- ports/g2o/CONTROL | 4 ++++ ports/g2o/portfile.cmake | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 ports/g2o/CONTROL create mode 100644 ports/g2o/portfile.cmake diff --git a/ports/g2o/CONTROL b/ports/g2o/CONTROL new file mode 100644 index 000000000..c91bc321d --- /dev/null +++ b/ports/g2o/CONTROL @@ -0,0 +1,4 @@ +Source: g2o +Version: 20170730_git +Build-Depends:suitesparse, eigen3, clapack, ceres, qt5 +Description: g2o: A General Framework for Graph Optimization http://openslam.org/g2o.html diff --git a/ports/g2o/portfile.cmake b/ports/g2o/portfile.cmake new file mode 100644 index 000000000..c23d95f84 --- /dev/null +++ b/ports/g2o/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO RainerKuemmerle/g2o + REF 20170730_git + SHA512 a85e3f79e6a8bd0f81a9a1a7a01227779100d9f4ebd0ae9c03537bbdcc246018f292b53045f027bbe28ecf63b98de2f22f5528c992c93c9790eb6a3a40995903 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +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/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Put the license file where vcpkg expects it +file(COPY ${SOURCE_PATH}/doc/license-bsd.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/g2o/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/g2o/license-bsd.txt ${CURRENT_PACKAGES_DIR}/share/g2o/copyright) -- cgit v1.2.3 From 82bebc44bb8e7ab0a1d41236e40ceeb5d1e5eb88 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 30 Jul 2017 16:18:22 -0700 Subject: handle dll macros --- ports/g2o/portfile.cmake | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/ports/g2o/portfile.cmake b/ports/g2o/portfile.cmake index c23d95f84..0bb596c00 100644 --- a/ports/g2o/portfile.cmake +++ b/ports/g2o/portfile.cmake @@ -16,6 +16,33 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + foreach(HEADER g2o/apps/g2o_hierarchical/g2o_hierarchical_api.h + g2o/types/slam3d_addons/g2o_types_slam3d_addons_api.h + g2o/apps/g2o_cli/g2o_cli_api.h + g2o/apps/g2o_simulator/g2o_simulator_api.h + g2o/core/g2o_core_api.h + g2o/solvers/csparse/g2o_csparse_api.h + g2o/stuff/g2o_stuff_api.h + g2o/types/icp/g2o_types_icp_api.h + g2o/solvers/slam2d_linear/g2o_slam2d_linear_api.h + g2o/types/data/g2o_types_data_api.h + g2o/types/sclam2d/g2o_types_sclam2d_api.h + g2o/types/slam2d/g2o_types_slam2d_api.h + g2o/types/slam3d/g2o_types_slam3d_api.h + g2o/types/sba/g2o_types_sba_api.h + g2o/types/slam2d_addons/g2o_types_slam2d_addons_api.h + g2o/solvers/csparse/g2o_csparse_extension_api.h + g2o/core/robust_kernel_factory.h + g2o/stuff/opengl_primitives.h + g2o/core/optimization_algorithm_factory.h + g2o/core/factory.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/${HEADER} HEADER_CONTENTS) + string(REPLACE "#ifdef G2O_SHARED_LIBS" "#if 1" HEADER_CONTENTS "${HEADER_CONTENTS}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/${HEADER} "${HEADER_CONTENTS}") + endforeach() +endif() + file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(REMOVE ${EXE}) -- cgit v1.2.3 From 8b49289b77472ba078dfa0d08dcd77a903e2c1ca Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 31 Jul 2017 03:18:00 -0700 Subject: [BinaryParagraph] Remove extra qualification (permissive-) --- toolsrc/include/BinaryParagraph.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/toolsrc/include/BinaryParagraph.h b/toolsrc/include/BinaryParagraph.h index f411b3c39..1e12dd8a6 100644 --- a/toolsrc/include/BinaryParagraph.h +++ b/toolsrc/include/BinaryParagraph.h @@ -14,9 +14,7 @@ namespace vcpkg BinaryParagraph(); explicit BinaryParagraph(std::unordered_map fields); BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet); - BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, - const FeatureParagraph& fpgh, - const Triplet& triplet); + BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet); std::string displayname() const; -- cgit v1.2.3 From c22ab980bcab362134ef3e5db329a81c1767c2c9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 31 Jul 2017 11:27:22 -0700 Subject: [openssl] Switch to msys2 as a perl provider due to strawberryperl being down. --- ports/openssl/portfile.cmake | 14 ++++++++++++-- scripts/cmake/vcpkg_acquire_msys.cmake | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 0dfd9aa88..45417e4eb 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -7,14 +7,24 @@ include(vcpkg_common_functions) set(OPENSSL_VERSION 1.0.2l) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) -vcpkg_find_acquire_program(PERL) vcpkg_find_acquire_program(NASM) find_program(NMAKE nmake) +vcpkg_acquire_msys(MSYS_ROOT) +set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + +vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c "PATH=/usr/bin:\$PATH;pacman -Sy --noconfirm --needed perl" + WORKING_DIRECTORY ${MSYS_ROOT} + LOGNAME pacman-${TARGET_TRIPLET} +) + +set(PERL ${MSYS_ROOT}/usr/bin/perl.exe) + get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) vcpkg_find_acquire_program(JOM) -set(ENV{PATH} "${PERL_EXE_PATH};${NASM_EXE_PATH};$ENV{PATH}") +set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH};${PERL_EXE_PATH}") 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" diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index d87ec3e7c..905952eab 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -32,7 +32,7 @@ ## vcpkg_execute_required_process( ## COMMAND ## ${BASH} --noprofile --norc -c -## "pacman -Sy --noconfirm --needed make" +## "PATH=/usr/bin:\$PATH;pacman -Sy --noconfirm --needed make" ## WORKING_DIRECTORY ${MSYS_ROOT} ## LOGNAME pacman-${TARGET_TRIPLET}) ## ``` -- cgit v1.2.3 From 215f205700b0af10205f7bbde879cb6c8f5c2b1a Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 30 Jul 2017 01:55:17 +0200 Subject: [physfs] enable static builds, use external zlib --- ports/physfs/CONTROL | 3 +- .../export-symbols-in-shared-build-only.patch | 13 +++++++++ ports/physfs/portfile.cmake | 34 +++++++++++----------- 3 files changed, 32 insertions(+), 18 deletions(-) create mode 100644 ports/physfs/export-symbols-in-shared-build-only.patch diff --git a/ports/physfs/CONTROL b/ports/physfs/CONTROL index 3e502435f..5eac58c36 100644 --- a/ports/physfs/CONTROL +++ b/ports/physfs/CONTROL @@ -1,3 +1,4 @@ Source: physfs -Version: 2.0.3 +Version: 2.0.3-1 Description: a library to provide abstract access to various archives +Build-Depends: zlib diff --git a/ports/physfs/export-symbols-in-shared-build-only.patch b/ports/physfs/export-symbols-in-shared-build-only.patch new file mode 100644 index 000000000..b3303dcd8 --- /dev/null +++ b/ports/physfs/export-symbols-in-shared-build-only.patch @@ -0,0 +1,13 @@ +diff --git a/physfs.h b/physfs.h +index 3c252c6..4319981 100644 +--- a/physfs.h ++++ b/physfs.h +@@ -221,7 +221,7 @@ extern "C" { + #endif + + #ifndef DOXYGEN_SHOULD_IGNORE_THIS +-#if (defined _MSC_VER) ++#if (defined _MSC_VER && defined (physfs_EXPORTS)) + #define __EXPORT__ __declspec(dllexport) + #elif (__GNUC__ >= 3) + #define __EXPORT__ __attribute__((visibility("default"))) diff --git a/ports/physfs/portfile.cmake b/ports/physfs/portfile.cmake index 082cc7740..4e00a43fc 100644 --- a/ports/physfs/portfile.cmake +++ b/ports/physfs/portfile.cmake @@ -1,32 +1,32 @@ -# 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} -# - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/physfs-2.0.3) +set(PHYSFS_VERSION 2.0.3) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/physfs-${PHYSFS_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "https://icculus.org/physfs/downloads/physfs-2.0.3.tar.bz2" - FILENAME "physfs-2.0.3.tar.bz2" + URLS "https://icculus.org/physfs/downloads/physfs-${PHYSFS_VERSION}.tar.bz2" + FILENAME "physfs-${PHYSFS_VERSION}.tar.bz2" SHA512 47eff0c81b8dc3bb526766b0a8ad2437d2951867880116d6e6e8f2ec1490e263541fb741867fed6517cc3fa8a9c5651b36e3e02a499f19cfdc5c7261c9707e80 ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/export-symbols-in-shared-build-only.patch) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PHYSFS_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PHYSFS_SHARED) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPHYSFS_BUILD_STATIC=${PHYSFS_STATIC} + -DPHYSFS_BUILD_SHARED=${PHYSFS_SHARED} + -DPHYSFS_BUILD_TEST=OFF ) vcpkg_install_cmake() +vcpkg_copy_pdbs() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/test_physfs.exe) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/test_physfs.exe) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/physfs) -- cgit v1.2.3 From fcbf64e1fbdcff40f6c727668a06ecd1a3bc4775 Mon Sep 17 00:00:00 2001 From: codicodi Date: Tue, 1 Aug 2017 23:15:23 +0200 Subject: [openal-soft] update to 1.18.1 --- ports/openal-soft/CONTROL | 2 +- ports/openal-soft/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/openal-soft/CONTROL b/ports/openal-soft/CONTROL index 4d423e2fa..742bab3fe 100644 --- a/ports/openal-soft/CONTROL +++ b/ports/openal-soft/CONTROL @@ -1,3 +1,3 @@ Source: openal-soft -Version: 1.18.0 +Version: 1.18.1 Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake index 992993821..de9538b5e 100644 --- a/ports/openal-soft/portfile.cmake +++ b/ports/openal-soft/portfile.cmake @@ -6,8 +6,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kcat/openal-soft - REF openal-soft-1.18.0 - SHA512 b3f1ac7eaaef38ef960cdfaf7bd475c32258f752718e762333188837ab33eb6e3f9a39776138a52a434dec42157ffba10f0592ef8d3ec3b023a5261e05832a69 + REF openal-soft-1.18.1 + SHA512 6e9d65dafbd77ca5d7badb1999b08a104e9c7e6c6637fb9ccca946de5bdfc6266de9d316ce06a979c94309ac9e0e5c1fac27b2673297f9062ef67f0e8a54e39c HEAD_REF master ) -- cgit v1.2.3 From bd2665ced95a1c869837e65db0e01552bc5886a2 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 1 Aug 2017 14:55:47 -0700 Subject: [cpp-redis] Add missing headers, manipulate them to match build type (CUSTOM_TCP_CLIENT=true) --- ports/cpp-redis/CONTROL | 2 +- ports/cpp-redis/portfile.cmake | 57 ++++++++++++++++++------------------------ 2 files changed, 26 insertions(+), 33 deletions(-) diff --git a/ports/cpp-redis/CONTROL b/ports/cpp-redis/CONTROL index 30491dca4..978eb678d 100644 --- a/ports/cpp-redis/CONTROL +++ b/ports/cpp-redis/CONTROL @@ -1,3 +1,3 @@ Source: cpp-redis -Version: 3.5.1 +Version: 3.5.1-1 Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining. diff --git a/ports/cpp-redis/portfile.cmake b/ports/cpp-redis/portfile.cmake index 42b2697e7..9c5378f9f 100644 --- a/ports/cpp-redis/portfile.cmake +++ b/ports/cpp-redis/portfile.cmake @@ -1,5 +1,9 @@ include(vcpkg_common_functions) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "cpp-redis only supports static library linkage.") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Cylix/cpp_redis @@ -8,45 +12,34 @@ vcpkg_from_github( HEAD_REF master ) +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(MSVC_RUNTIME_LIBRARY_CONFIG "/MD") +else() + set(MSVC_RUNTIME_LIBRARY_CONFIG "/MT") +endif() + +# cpp-redis forcibly removes "/RTC1" in its cmake file. Because this is an ABI-sensitive flag, we need to re-add it in a form that won't be detected. +list(APPEND VCPKG_CXX_FLAGS_DEBUG "-RTC1") +list(APPEND VCPKG_C_FLAGS_DEBUG "-RTC1") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DUSE_CUSTOM_TCP_CLIENT=TRUE + OPTIONS + -DUSE_CUSTOM_TCP_CLIENT=TRUE + -DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG} ) -vcpkg_build_cmake() +vcpkg_install_cmake() -file(GLOB DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" -) -file(GLOB LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/lib/*.lib" -) -file(GLOB DEBUG_DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" -) -file(GLOB DEBUG_LIBS -"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/lib/*.lib" -) -file(GLOB HEADERS "${SOURCE_PATH}/includes/cpp_redis/*.hpp" "${SOURCE_PATH}/includes/cpp_redis/*.hpp") -if(DLLS) - file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -endif() -file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() -file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/cpp_redis) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB_RECURSE FILES "${CURRENT_PACKAGES_DIR}/include/*") +foreach(file ${FILES}) + file(READ ${file} _contents) + string(REPLACE "ifndef __CPP_REDIS_USE_CUSTOM_TCP_CLIENT" "if 0" _contents "${_contents}") + file(WRITE ${file} "${_contents}") +endforeach() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpp-redis RENAME copyright) -- cgit v1.2.3 From 957cb214e92f45069f142d8b6ccf2a6425df9c51 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Tue, 1 Aug 2017 15:17:42 -0700 Subject: change qualifier bracket to parens --- ports/cpprestsdk/CONTROL | 2 +- ports/harfbuzz/CONTROL | 2 +- ports/mongo-c-driver/CONTROL | 2 +- ports/tiff/CONTROL | 2 +- toolsrc/src/SourceParagraph.cpp | 2 +- toolsrc/src/tests_dependencies.cpp | 4 ++-- toolsrc/src/tests_paragraph.cpp | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index f284f2b53..f34f1ad4a 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,5 @@ Source: cpprestsdk Version: 2.9.0-2 -Build-Depends: zlib [windows], openssl [windows], boost [windows], websocketpp [windows] +Build-Depends: zlib (windows), openssl (windows), boost (windows), websocketpp (windows) Description: C++11 JSON, REST, and OAuth library The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. \ No newline at end of file diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 5ed9e68b8..acc0b6c7d 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz Version: 1.4.6-1 Description: HarfBuzz OpenType text shaping engine -Build-Depends: freetype, glib [windows] +Build-Depends: freetype, glib (windows) diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL index 8d77eeca5..a460b313c 100644 --- a/ports/mongo-c-driver/CONTROL +++ b/ports/mongo-c-driver/CONTROL @@ -1,4 +1,4 @@ Source: mongo-c-driver Version: 1.6.2 -Build-Depends: libbson, openssl [uwp] +Build-Depends: libbson, openssl (uwp) Description: Client library written in C for MongoDB. \ No newline at end of file diff --git a/ports/tiff/CONTROL b/ports/tiff/CONTROL index 28452b794..f5727b475 100644 --- a/ports/tiff/CONTROL +++ b/ports/tiff/CONTROL @@ -1,4 +1,4 @@ Source: tiff Version: 4.0.8 -Build-Depends: zlib, libjpeg-turbo, liblzma [windows] +Build-Depends: zlib, libjpeg-turbo, liblzma (windows) Description: A library that supports the manipulation of TIFF image files diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 9289edb38..cb7aeb33e 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -160,7 +160,7 @@ namespace vcpkg // expect of the form "\w+ \[\w+\]" Dependency dep; dep.name = depend_string.substr(0, pos); - if (depend_string.c_str()[pos + 1] != '[' || depend_string[depend_string.size() - 1] != ']') + if (depend_string.c_str()[pos + 1] != '(' || depend_string[depend_string.size() - 1] != ')') { // Error, but for now just slurp the entire string. return {depend_string, ""}; diff --git a/toolsrc/src/tests_dependencies.cpp b/toolsrc/src/tests_dependencies.cpp index 995d46873..7a49bdbd0 100644 --- a/toolsrc/src/tests_dependencies.cpp +++ b/toolsrc/src/tests_dependencies.cpp @@ -15,7 +15,7 @@ namespace UnitTest1 { TEST_METHOD(parse_depends_one) { - auto v = expand_qualified_dependencies(parse_comma_list("libA [windows]")); + auto v = expand_qualified_dependencies(parse_comma_list("libA (windows)")); Assert::AreEqual(size_t(1), v.size()); Assert::AreEqual("libA", v[0].name.c_str()); Assert::AreEqual("windows", v[0].qualifier.c_str()); @@ -23,7 +23,7 @@ namespace UnitTest1 TEST_METHOD(filter_depends) { - auto deps = expand_qualified_dependencies(parse_comma_list("libA [windows], libB, libC [uwp]")); + auto deps = expand_qualified_dependencies(parse_comma_list("libA (windows), libB, libC (uwp)")); auto v = filter_dependencies(deps, Triplet::X64_WINDOWS); Assert::AreEqual(size_t(2), v.size()); Assert::AreEqual("libA", v[0].c_str()); diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests_paragraph.cpp index dd9a40160..920e58c02 100644 --- a/toolsrc/src/tests_paragraph.cpp +++ b/toolsrc/src/tests_paragraph.cpp @@ -112,7 +112,7 @@ namespace UnitTest1 { auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::vector>{{ - {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "libA [windows], libB [uwp]"}, + {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "libA (windows), libB (uwp)"}, }}); Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); -- cgit v1.2.3 From cc822ead1cce550a0f0f77f39a14c02b43244276 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 1 Aug 2017 15:23:45 -0700 Subject: [tacopie][cpp-redis] Update cpp-redis to depend on tacopie. Fix tacopie port. --- ports/cpp-redis/CONTROL | 1 + ports/cpp-redis/portfile.cmake | 13 ++++++------ ports/tacopie/portfile.cmake | 48 +++++++++++++++--------------------------- 3 files changed, 25 insertions(+), 37 deletions(-) diff --git a/ports/cpp-redis/CONTROL b/ports/cpp-redis/CONTROL index 978eb678d..7010a0d00 100644 --- a/ports/cpp-redis/CONTROL +++ b/ports/cpp-redis/CONTROL @@ -1,3 +1,4 @@ Source: cpp-redis Version: 3.5.1-1 +Build-Depends: tacopie Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining. diff --git a/ports/cpp-redis/portfile.cmake b/ports/cpp-redis/portfile.cmake index 9c5378f9f..3a560a047 100644 --- a/ports/cpp-redis/portfile.cmake +++ b/ports/cpp-redis/portfile.cmake @@ -7,11 +7,13 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Cylix/cpp_redis - REF 3.5.1 - SHA512 2c50cf777d5955f7bcb94a55514fac444d0dcacc2df343dd89969889be7653a793620dbaac9d6dd0f444eee7f0664c4eb96a1d83477d207143660764afeea129 + REF 3.5.2 + SHA512 d19445c93fad9fba39c7aed07b2d196ec0c96366324a2a2ee856c930683b5428fe8b5bc46de4b2b23112aae83f8229a4703c2355d1c74831602ec3a7f8dac315 HEAD_REF master ) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/tacopie/CMakeLists.txt DESTINATION ${SOURCE_PATH}/tacopie) + if(VCPKG_CRT_LINKAGE STREQUAL dynamic) set(MSVC_RUNTIME_LIBRARY_CONFIG "/MD") else() @@ -19,14 +21,13 @@ else() endif() # cpp-redis forcibly removes "/RTC1" in its cmake file. Because this is an ABI-sensitive flag, we need to re-add it in a form that won't be detected. -list(APPEND VCPKG_CXX_FLAGS_DEBUG "-RTC1") -list(APPEND VCPKG_C_FLAGS_DEBUG "-RTC1") +set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -RTC1") +set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG} -RTC1") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DUSE_CUSTOM_TCP_CLIENT=TRUE -DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG} ) @@ -37,7 +38,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bi file(GLOB_RECURSE FILES "${CURRENT_PACKAGES_DIR}/include/*") foreach(file ${FILES}) file(READ ${file} _contents) - string(REPLACE "ifndef __CPP_REDIS_USE_CUSTOM_TCP_CLIENT" "if 0" _contents "${_contents}") + string(REPLACE "ifndef __CPP_REDIS_USE_CUSTOM_TCP_CLIENT" "if 1" _contents "${_contents}") file(WRITE ${file} "${_contents}") endforeach() diff --git a/ports/tacopie/portfile.cmake b/ports/tacopie/portfile.cmake index 19ce897e6..dac3cf858 100644 --- a/ports/tacopie/portfile.cmake +++ b/ports/tacopie/portfile.cmake @@ -1,5 +1,9 @@ include(vcpkg_common_functions) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "cpp-redis only supports static library linkage.") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Cylix/tacopie @@ -8,44 +12,26 @@ vcpkg_from_github( HEAD_REF master ) +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(MSVC_RUNTIME_LIBRARY_CONFIG "/MD") +else() + set(MSVC_RUNTIME_LIBRARY_CONFIG "/MT") +endif() + +# tacopie forcibly removes "/RTC1" in its cmake file. Because this is an ABI-sensitive flag, we need to re-add it in a form that won't be detected. +set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -RTC1") +set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG} -RTC1") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG} ) -vcpkg_build_cmake() +vcpkg_install_cmake() -file(GLOB DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" -) -file(GLOB LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/lib/*.lib" -) -file(GLOB DEBUG_DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" -) -file(GLOB DEBUG_LIBS -"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/lib/*.lib" -) -file(GLOB HEADERS "${SOURCE_PATH}/includes/tacopie/*.hpp" "${SOURCE_PATH}/includes/tacopie/*.hpp") -if(DLLS) - file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -endif() -file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() -file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/tacopie) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tacopie RENAME copyright) -- cgit v1.2.3 From af7261a0d5dbcc1790fc8ec6b78e18c2f73027f6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 1 Aug 2017 15:24:14 -0700 Subject: [tacopie] Bump version --- ports/tacopie/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/tacopie/CONTROL b/ports/tacopie/CONTROL index 086c57f24..accbf0291 100644 --- a/ports/tacopie/CONTROL +++ b/ports/tacopie/CONTROL @@ -1,3 +1,3 @@ Source: tacopie -Version: 2.4.1 +Version: 2.4.1-1 Description: Tacopie is a TCP Client & Server C++11 library -- cgit v1.2.3 From 5e9ac8a25bee0eb074f139bc73ed8e2a3755fc2d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 1 Aug 2017 15:26:30 -0700 Subject: [cpp-redis] Bump version --- ports/cpp-redis/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/cpp-redis/CONTROL b/ports/cpp-redis/CONTROL index 7010a0d00..1d6a15b59 100644 --- a/ports/cpp-redis/CONTROL +++ b/ports/cpp-redis/CONTROL @@ -1,4 +1,4 @@ Source: cpp-redis -Version: 3.5.1-1 +Version: 3.5.2 Build-Depends: tacopie Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining. -- cgit v1.2.3 From b5489350abeaae55a303fcd6cf7c6b2094d91a4d Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Thu, 1 Jun 2017 21:09:01 +0300 Subject: [folly] Updated to version v2017.07.17.01 --- ports/folly/CONTROL | 2 +- ports/folly/fix-cmakelists.patch | 89 ---------------------------------------- ports/folly/fix-generators.patch | 36 ---------------- ports/folly/portfile.cmake | 18 ++++---- 4 files changed, 9 insertions(+), 136 deletions(-) delete mode 100644 ports/folly/fix-cmakelists.patch delete mode 100644 ports/folly/fix-generators.patch diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index f9a4a4329..489465d74 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,4 +1,4 @@ Source: folly -Version: v2017.05.08.00-2 +Version: v2017.07.17.01 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: zlib, openssl, boost, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy diff --git a/ports/folly/fix-cmakelists.patch b/ports/folly/fix-cmakelists.patch deleted file mode 100644 index 9f5700dbb..000000000 --- a/ports/folly/fix-cmakelists.patch +++ /dev/null @@ -1,89 +0,0 @@ -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 211c6fbf..988225a2 100755 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -11,8 +11,8 @@ find_package(Boost 1.55.0 MODULE - REQUIRED - ) - find_package(DoubleConversion MODULE REQUIRED) --find_package(GFlags MODULE REQUIRED) --find_package(GLog MODULE REQUIRED) -+find_package(gflags CONFIG REQUIRED) -+find_package(glog CONFIG REQUIRED) - find_package(LibEvent MODULE REQUIRED) - find_package(OpenSSL MODULE REQUIRED) - find_package(PThread MODULE) -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 38886d65..4c796eac 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,15 +1,8 @@ - cmake_minimum_required(VERSION 3.4.0 FATAL_ERROR) - --# Unfortunately, CMake doesn't easily provide us a way to merge static --# libraries, which is what we want to do to generate the main folly library, so --# we do a bit of a workaround here to inject a property into the generated --# project files that will only get enabled for the folly target. Ugly, but --# the alternatives are far, far worse. - if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio 15( 2017)? Win64") -- set(CMAKE_GENERATOR_TOOLSET "v141truev141") - set(MSVC_IS_2017 ON) - elseif ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 14 2015 Win64") -- set(CMAKE_GENERATOR_TOOLSET "v140truev140") - set(MSVC_IS_2017 OFF) - else() - message(FATAL_ERROR "This build script only supports building Folly on 64-bit Windows with Visual Studio 2015 or Visual Studio 2017.") -@@ -122,7 +115,8 @@ add_library(folly_base STATIC - ) - auto_source_group(folly ${FOLLY_DIR} ${files} ${hfiles}) - apply_folly_compile_options_to_target(folly_base) --target_include_directories(folly_base PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) -+target_include_directories(folly_base PUBLIC -+ $) - # Add the generated files to the correct source group. - source_group("folly" FILES ${CMAKE_CURRENT_BINARY_DIR}/folly/folly-config.h) - source_group("folly\\build" FILES -@@ -133,10 +127,9 @@ source_group("folly\\build" FILES - ) - - target_include_directories(folly_base -- PUBLIC -+ PRIVATE - ${DOUBLE_CONVERSION_INCLUDE_DIR} - ${LIBGFLAGS_INCLUDE_DIR} -- ${LIBGLOG_INCLUDE_DIR} - ${LIBEVENT_INCLUDE_DIR} - ) - target_link_libraries(folly_base -@@ -151,13 +144,13 @@ target_link_libraries(folly_base - ${DOUBLE_CONVERSION_LIBRARY} - ${LIBEVENT_LIB} - ${LIBGFLAGS_LIBRARY} -- ${LIBGLOG_LIBRARY} -+ glog::glog - OpenSSL::SSL - OpenSSL::Crypto - Ws2_32.lib - ) - if (FOLLY_HAVE_PTHREAD) -- target_include_directories(folly_base PUBLIC ${LIBPTHREAD_INCLUDE_DIRS}) -+ target_include_directories(folly_base PRIVATE ${LIBPTHREAD_INCLUDE_DIRS}) - target_link_libraries(folly_base PUBLIC ${LIBPTHREAD_LIBRARIES}) - endif() - -@@ -199,13 +192,10 @@ add_library(folly ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp) - apply_folly_compile_options_to_target(folly) - source_group("" FILES ${CMAKE_CURRENT_BINARY_DIR}/folly_dep.cpp) - --# Rather than list the dependencies in two places, we apply them directly on --# the folly_base target and then copy them over to the folly target. --get_target_property(FOLLY_LINK_LIBRARIES folly_base INTERFACE_LINK_LIBRARIES) --target_link_libraries(folly PUBLIC ${FOLLY_LINK_LIBRARIES}) -+target_link_libraries(folly PUBLIC folly_base) - target_include_directories(folly PUBLIC $) - --install(TARGETS folly -+install(TARGETS folly folly_base - EXPORT folly - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib diff --git a/ports/folly/fix-generators.patch b/ports/folly/fix-generators.patch deleted file mode 100644 index e774b8c6b..000000000 --- a/ports/folly/fix-generators.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4c796ea..684f48f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,13 +1,5 @@ - cmake_minimum_required(VERSION 3.4.0 FATAL_ERROR) - --if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio 15( 2017)? Win64") -- set(MSVC_IS_2017 ON) --elseif ("${CMAKE_GENERATOR}" STREQUAL "Visual Studio 14 2015 Win64") -- set(MSVC_IS_2017 OFF) --else() -- message(FATAL_ERROR "This build script only supports building Folly on 64-bit Windows with Visual Studio 2015 or Visual Studio 2017.") --endif() -- - # includes - set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH}) - include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -@@ -24,10 +16,14 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) - - project(${PACKAGE_NAME} CXX) - --# Check architecture OS --if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8) -- message(FATAL_ERROR "Folly requires a 64bit OS") -+if (NOT MSVC_VERSION LESS 1910) -+ set(MSVC_IS_2017 ON) -+elseif (NOT MSVC_VERSION LESS 1900) -+ set(MSVC_IS_2017 OFF) -+else() -+ message(FATAL_ERROR "This build script only supports building Folly on 64-bit Windows with Visual Studio 2015 or Visual Studio 2017.") - endif() -+ - if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") - message(FATAL_ERROR "You should only be using CMake to build Folly if you are on Windows!") - endif() diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 6d5ce8d25..919e799d5 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -17,17 +17,11 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2017.05.08.00 - SHA512 1f689ec288e2a5de28223bddd68fdbb37c26c46ed9d9b831cacc46580788b9bf8eed151a043a4905172e509c70ed3d845689bf2c0cd45ce05fbe76907e2049aa + REF v2017.07.17.01 + SHA512 1529941ebcc9ee3502e4ab07463bb5bc6a397259cbbf1817ac64fd186fd4cd964ffe8b473fe6a432e80632ffa553106a0d3fe2962e860eb409e3391029ed5584 HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch" - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-generators.patch" -) - if(VCPKG_CRT_LINKAGE STREQUAL static) set(MSVC_USE_STATIC_RUNTIME ON) else() @@ -42,8 +36,7 @@ vcpkg_configure_cmake( ) # Folly runs built executables during the build, so they need access to the installed DLLs. -# TODO: Confirm it's ok that we aren't adding the debug/bin folder. -set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin") +set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") vcpkg_install_cmake(MSVC_64_TOOLSET) @@ -51,6 +44,11 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets() +# changes target search path +file(READ ${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake FOLLY_MODULE) +string(REPLACE "${CURRENT_INSTALLED_DIR}/lib/" "" FOLLY_MODULE "${FOLLY_MODULE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake "${FOLLY_MODULE}") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -- cgit v1.2.3 From 9a87ee9c9dc655dccb4e7b927279c9094f960448 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 1 Aug 2017 16:03:40 -0700 Subject: [openssl] Fix error in msys call to perform the perl installation. --- ports/openssl/portfile-uwp.cmake | 13 ++++++++++++- ports/openssl/portfile.cmake | 2 +- scripts/cmake/vcpkg_acquire_msys.cmake | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake index e1f7a7932..455cd927d 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl/portfile-uwp.cmake @@ -29,9 +29,20 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2l_WinRT) -vcpkg_find_acquire_program(PERL) vcpkg_find_acquire_program(JOM) get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY) + +vcpkg_acquire_msys(MSYS_ROOT) +set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + +vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c 'PATH=/usr/bin:\$PATH pacman -Sy --noconfirm --needed perl' + WORKING_DIRECTORY ${MSYS_ROOT} + LOGNAME pacman-${TARGET_TRIPLET} +) + +set(PERL ${MSYS_ROOT}/usr/bin/perl.exe) + get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${JOM_EXE_PATH}") diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 45417e4eb..e5a3699f0 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -14,7 +14,7 @@ vcpkg_acquire_msys(MSYS_ROOT) set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "PATH=/usr/bin:\$PATH;pacman -Sy --noconfirm --needed perl" + COMMAND ${BASH} --noprofile --norc -c 'PATH=/usr/bin:\$PATH pacman -Sy --noconfirm --needed perl' WORKING_DIRECTORY ${MSYS_ROOT} LOGNAME pacman-${TARGET_TRIPLET} ) diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index 905952eab..87c34c274 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -32,7 +32,7 @@ ## vcpkg_execute_required_process( ## COMMAND ## ${BASH} --noprofile --norc -c -## "PATH=/usr/bin:\$PATH;pacman -Sy --noconfirm --needed make" +## 'PATH=/usr/bin:\$PATH pacman -Sy --noconfirm --needed make' ## WORKING_DIRECTORY ${MSYS_ROOT} ## LOGNAME pacman-${TARGET_TRIPLET}) ## ``` -- cgit v1.2.3 From 1a07422d3dd3e58f1d2eb132d0e54fbf82f1ac48 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Thu, 27 Jul 2017 04:47:59 +0300 Subject: [libtheora] update to master, refactor --- ports/libtheora/0001-fix-uwp.patch | 53 +++++++++++++++++ ports/libtheora/CMakeLists.txt | 114 ++++++++++++++++++++++--------------- ports/libtheora/CONTROL | 2 +- ports/libtheora/libtheora.def | 61 ++++++++++++++++++++ ports/libtheora/portfile.cmake | 40 ++++++++----- 5 files changed, 209 insertions(+), 61 deletions(-) create mode 100644 ports/libtheora/0001-fix-uwp.patch create mode 100644 ports/libtheora/libtheora.def diff --git a/ports/libtheora/0001-fix-uwp.patch b/ports/libtheora/0001-fix-uwp.patch new file mode 100644 index 000000000..b6dc8779d --- /dev/null +++ b/ports/libtheora/0001-fix-uwp.patch @@ -0,0 +1,53 @@ +From 47eb8d07a8caaa6cc1e6e906a7cd5b44ee0fb624 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Thu, 27 Jul 2017 04:24:36 +0300 +Subject: [PATCH] remove redundant assignments + +--- + lib/tokenize.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/lib/tokenize.c b/lib/tokenize.c +index 57b7aa8..3f53fb5 100644 +--- a/lib/tokenize.c ++++ b/lib/tokenize.c +@@ -487,11 +487,11 @@ int oc_enc_tokenize_ac(oc_enc_ctx *_enc,int _pli,ptrdiff_t _fragi, + zzj=64; + for(zzi=OC_MINI(_zzi,63);zzi>0;zzi--){ + ogg_uint32_t best_cost; +- int best_bits=best_bits; +- int best_next=best_next; +- int best_token=best_token; +- int best_eb=best_eb; +- int best_qc=best_qc; ++ int best_bits; ++ int best_next; ++ int best_token; ++ int best_eb; ++ int best_qc; + ogg_uint32_t d2; + int dq; + int qc_m; +@@ -1091,8 +1091,8 @@ void oc_enc_tokenize_dc_frag_list(oc_enc_ctx *_enc,int _pli, + int neobs1; + int token; + int eb; +- int token1=token1; +- int eb1=eb1; ++ int token1; ++ int eb1; + /*Return immediately if there are no coded fragments; otherwise we'd flush + any trailing EOB run into the AC 1 list and never read it back out.*/ + if(_ncoded_fragis<=0)return; +@@ -1328,7 +1328,7 @@ void oc_enc_tokenize_finish(oc_enc_ctx *_enc){ + int new_eb; + int zzj; + int plj; +- ptrdiff_t ti=ti; ++ ptrdiff_t ti; + int run_count; + /*Make sure this coefficient has tokens at all.*/ + if(_enc->ndct_tokens[pli][zzi]<=0)continue; +-- +2.12.2.windows.2 + diff --git a/ports/libtheora/CMakeLists.txt b/ports/libtheora/CMakeLists.txt index a13c5a8e6..24ecbccf4 100644 --- a/ports/libtheora/CMakeLists.txt +++ b/ports/libtheora/CMakeLists.txt @@ -1,67 +1,91 @@ -project(theora) +cmake_minimum_required(VERSION 3.0) +project(theora LANGUAGES C) set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}") FIND_PACKAGE(OGG REQUIRED) file(GLOB HEADERS -"include/theora/codec.h" -"include/theora/theora.h" -"include/theora/theoradec.h" + "include/theora/codec.h" + "include/theora/theora.h" + "include/theora/theoradec.h" + "include/theora/theoraenc.h" ) - include_directories("include") include_directories(${OGG_INCLUDE_DIR}) -file(GLOB SOURCES -"lib/analyze.c" -"lib/encapiwrapper.c" -"lib/encfrag.c" -"lib/encinfo.c" -"lib/encode.c" -#"lib/encoder_disabled.c" -"lib/enquant.c" -"lib/fdct.c" -"lib/huffenc.c" -"lib/mathops.c" -"lib/mcenc.c" -"lib/rate.c" -"lib/tokenize.c" -"lib/x86_vc/mmxencfrag.c" -"lib/x86_vc/mmxfdct.c" -"lib/x86_vc/x86cpu.c" -"lib/x86_vc/x86enc.c" -"lib/apiwrapper.c" -"lib/bitpack.c" -"lib/decapiwrapper.c" -"lib/decinfo.c" -"lib/decode.c" -"lib/dequant.c" -"lib/fragment.c" -"lib/huffdec.c" -"lib/idct.c" -"lib/info.c" -"lib/internal.c" -"lib/quant.c" -"lib/state.c" -"lib/x86_vc/mmxfrag.c" -"lib/x86_vc/mmxidct.c" -"lib/x86_vc/mmxstate.c" -"lib/x86_vc/x86state.c" -"win32/xmingw32/libtheoradec-all.def" +set(LIBTHEORA_COMMON + "lib/apiwrapper.c" + "lib/bitpack.c" + "lib/dequant.c" + "lib/fragment.c" + "lib/idct.c" + "lib/info.c" + "lib/internal.c" + "lib/state.c" + "lib/quant.c" + + "lib/x86_vc/mmxfrag.c" + "lib/x86_vc/mmxidct.c" + "lib/x86_vc/mmxstate.c" + "lib/x86_vc/x86cpu.c" + "lib/x86_vc/x86state.c" +) + +set(LIBTHEORA_ENC + "lib/analyze.c" + "lib/encapiwrapper.c" + "lib/encfrag.c" + "lib/encinfo.c" + "lib/encode.c" + "lib/enquant.c" + "lib/fdct.c" + "lib/huffenc.c" + "lib/mathops.c" + "lib/mcenc.c" + "lib/rate.c" + "lib/tokenize.c" + + "lib/x86_vc/mmxencfrag.c" + "lib/x86_vc/mmxfdct.c" + "lib/x86_vc/x86enc.c" +) + +set(LIBTHEORA_DEC + "lib/decapiwrapper.c" + "lib/decinfo.c" + "lib/decode.c" + "lib/huffdec.c" ) -add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_BIND_TO_CURRENT_CRT_VERSION) +add_definitions(-D_CRT_SECURE_NO_DEPRECATE) +add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + +option(USE_X86 "Use x86 optimization" OFF) +if(USE_X86) + add_definitions(-DOC_X86_ASM) +endif() + if (${BUILD_SHARED_LIBS}) - add_definitions(-DLIBTHEORA_EXPORTS) + add_definitions(-DLIBTHEORA_EXPORTS) endif() -add_library(theora ${SOURCES} ${HEADERS}) +add_library(theora-common OBJECT ${LIBTHEORA_COMMON} ${HEADERS}) +add_library(theora-enc OBJECT ${LIBTHEORA_ENC} ${HEADERS}) +add_library(theora-dec OBJECT ${LIBTHEORA_DEC} ${HEADERS}) + +add_library(theora $ $ $ "libtheora.def") target_link_libraries(theora ${OGG_LIBRARY}) +add_library(theoraenc $ $ "win32/xmingw32/libtheoraenc-all.def") +target_link_libraries(theoraenc ${OGG_LIBRARY}) + +add_library(theoradec $ $ "win32/xmingw32/libtheoradec-all.def") +target_link_libraries(theoradec ${OGG_LIBRARY}) + install(FILES ${HEADERS} DESTINATION include/theora) -install(TARGETS theora +install(TARGETS theora theoraenc theoradec RUNTIME DESTINATION bin LIBRARY DESTINATION bin ARCHIVE DESTINATION lib diff --git a/ports/libtheora/CONTROL b/ports/libtheora/CONTROL index 7d373c1cf..b964eb8ef 100644 --- a/ports/libtheora/CONTROL +++ b/ports/libtheora/CONTROL @@ -1,4 +1,4 @@ Source: libtheora -Version: 1.1.1 +Version: 1.2.0alpha1-20170719~vcpkg1 Description: Theora is a free and open video compression format from the Xiph.org Foundation. Build-Depends: libogg diff --git a/ports/libtheora/libtheora.def b/ports/libtheora/libtheora.def new file mode 100644 index 000000000..9755b81e7 --- /dev/null +++ b/ports/libtheora/libtheora.def @@ -0,0 +1,61 @@ +EXPORTS +; Old alpha API + theora_version_string + theora_version_number + theora_decode_header + theora_decode_init + theora_decode_packetin + theora_decode_YUVout + theora_control + theora_packet_isheader + theora_packet_iskeyframe + theora_granule_shift + theora_granule_frame + theora_granule_time + theora_info_init + theora_info_clear + theora_clear + theora_comment_init + theora_comment_add + theora_comment_add_tag + theora_comment_query + theora_comment_query_count + theora_comment_clear +; New theora-exp API + th_version_string + th_version_number + th_decode_headerin + th_decode_alloc + th_setup_free + th_decode_ctl + th_decode_packetin + th_decode_ycbcr_out + th_decode_free + th_packet_isheader + th_packet_iskeyframe + th_granule_frame + th_granule_time + th_info_init + th_info_clear + th_comment_init + th_comment_add + th_comment_add_tag + th_comment_query + th_comment_query_count + th_comment_clear +; Old alpha API + theora_encode_init + theora_encode_YUVin + theora_encode_packetout + theora_encode_header + theora_encode_comment + theora_encode_tables +; New theora-exp API + th_encode_alloc + th_encode_ctl + th_encode_flushheader + th_encode_ycbcr_in + th_encode_packetout + th_encode_free + TH_VP31_QUANT_INFO + TH_VP31_HUFF_CODES diff --git a/ports/libtheora/portfile.cmake b/ports/libtheora/portfile.cmake index 0d63621e5..9312d6685 100644 --- a/ports/libtheora/portfile.cmake +++ b/ports/libtheora/portfile.cmake @@ -1,31 +1,41 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libtheora-1.1.1) -vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2" - FILENAME "libtheora-1.1.1.tar.bz2" - SHA512 9ab9b3af1c35d16a7d6d84f61f59ef3180132e30c27bdd7c0fa2683e0d00e2c791accbc7fd2c90718cc947d8bd10ee4a5940fb55f90f1fd7b0ed30583a47dbbd + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/theora + REF fa5707d68c2a4338d58aa8b6afc95539ba89fecb + SHA512 e33da23a17e93709dfe4421b512cedbd9aab0d706f5650e0436f9c8e1cde76b902c3338d46750bb86d83e1bceb111ee84e90df36fb59b5c2e7f7aee1610752b2 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp.patch ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/libtheora.def DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindOGG.cmake DESTINATION ${SOURCE_PATH}) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(THEORA_X86_OPT ON) +else() + set(THEORA_X86_OPT OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_X86=${THEORA_X86_OPT} ) +vcpkg_build_cmake() vcpkg_install_cmake() +vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtheora) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libtheora/LICENSE ${CURRENT_PACKAGES_DIR}/share/libtheora/copyright) -- cgit v1.2.3 From ebc875df58a9441e30fab54e7ba84418e6bf8238 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 1 Aug 2017 17:12:59 -0700 Subject: [openssl][vcpkg_find_acquire_program] Use msys to provide perl for vcpkg_find_acquire_program. Revert openssl to use this instead of msys directly. --- ports/libvpx/portfile.cmake | 2 +- ports/openblas/portfile.cmake | 2 +- ports/openssl/portfile-uwp.cmake | 13 +------------ ports/openssl/portfile.cmake | 22 +++++++++------------- scripts/cmake/vcpkg_find_acquire_program.cmake | 14 +++++++++----- 5 files changed, 21 insertions(+), 32 deletions(-) diff --git a/ports/libvpx/portfile.cmake b/ports/libvpx/portfile.cmake index 87f6cfdfc..f7e36b5a8 100644 --- a/ports/libvpx/portfile.cmake +++ b/ports/libvpx/portfile.cmake @@ -25,7 +25,7 @@ vcpkg_find_acquire_program(PERL) vcpkg_acquire_msys(MSYS_ROOT) get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "${PERL_EXE_PATH};${YASM_EXE_PATH};${MSYS_ROOT}/usr/bin;$ENV{PATH}") +set(ENV{PATH} "${YASM_EXE_PATH};${MSYS_ROOT}/usr/bin;$ENV{PATH};${PERL_EXE_PATH}") set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) message(STATUS "Installing MSYS Packages") diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index ec6f420f8..635d6f6fb 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -38,7 +38,7 @@ vcpkg_apply_patches( # openblas require perl to generate .def for exports vcpkg_find_acquire_program(PERL) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "${PERL_EXE_PATH};$ENV{PATH}") +set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake index 455cd927d..e1f7a7932 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl/portfile-uwp.cmake @@ -29,20 +29,9 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2l_WinRT) +vcpkg_find_acquire_program(PERL) vcpkg_find_acquire_program(JOM) get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY) - -vcpkg_acquire_msys(MSYS_ROOT) -set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) - -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c 'PATH=/usr/bin:\$PATH pacman -Sy --noconfirm --needed perl' - WORKING_DIRECTORY ${MSYS_ROOT} - LOGNAME pacman-${TARGET_TRIPLET} -) - -set(PERL ${MSYS_ROOT}/usr/bin/perl.exe) - get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${JOM_EXE_PATH}") diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index e5a3699f0..569de6c75 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -7,20 +7,10 @@ include(vcpkg_common_functions) set(OPENSSL_VERSION 1.0.2l) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) +vcpkg_find_acquire_program(PERL) vcpkg_find_acquire_program(NASM) find_program(NMAKE nmake) -vcpkg_acquire_msys(MSYS_ROOT) -set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) - -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c 'PATH=/usr/bin:\$PATH pacman -Sy --noconfirm --needed perl' - WORKING_DIRECTORY ${MSYS_ROOT} - LOGNAME pacman-${TARGET_TRIPLET} -) - -set(PERL ${MSYS_ROOT}/usr/bin/perl.exe) - get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) vcpkg_find_acquire_program(JOM) @@ -65,11 +55,11 @@ endif() file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) -message(STATUS "Build ${TARGET_TRIPLET}-rel") file(COPY ${MASTER_COPY_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/openssl-${OPENSSL_VERSION}) set(OPENSSLDIR_RELEASE ${CURRENT_PACKAGES_DIR}) +message(STATUS "Configure ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} @@ -80,6 +70,9 @@ vcpkg_execute_required_process( WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-rel ) +message(STATUS "Configure ${TARGET_TRIPLET}-rel done") + +message(STATUS "Build ${TARGET_TRIPLET}-rel") # Openssl's buildsystem has a race condition which will cause JOM to fail at some point. # This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build. make_directory(${SOURCE_PATH_RELEASE}/inc32/openssl) @@ -97,7 +90,7 @@ vcpkg_execute_required_process( message(STATUS "Build ${TARGET_TRIPLET}-rel done") -message(STATUS "Build ${TARGET_TRIPLET}-dbg") +message(STATUS "Configure ${TARGET_TRIPLET}-dbg") file(COPY ${MASTER_COPY_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/openssl-${OPENSSL_VERSION}) set(OPENSSLDIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug) @@ -112,6 +105,9 @@ vcpkg_execute_required_process( WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} LOGNAME configure-do-${TARGET_TRIPLET}-${CMAKE_BUILD_TYPE}-dbg ) +message(STATUS "Configure ${TARGET_TRIPLET}-dbg done") + +message(STATUS "Build ${TARGET_TRIPLET}-dbg") make_directory(${SOURCE_PATH_DEBUG}/inc32/openssl) execute_process( COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index fef62da53..4efe756ee 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -33,6 +33,7 @@ ## * [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) ## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) ## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) +include(vcpkg_acquire_msys) function(vcpkg_find_acquire_program VAR) if(${VAR} AND NOT ${VAR} MATCHES "-NOTFOUND") return() @@ -46,11 +47,14 @@ function(vcpkg_find_acquire_program VAR) vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) if(VAR MATCHES "PERL") - set(PROGNAME perl) - set(PATHS ${DOWNLOADS}/tools/perl/perl/bin) - 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) + vcpkg_acquire_msys(MSYS_ROOT) + vcpkg_execute_required_process( + COMMAND ${MSYS_ROOT}/usr/bin/bash.exe --noprofile --norc -c 'PATH=/usr/bin:\$PATH pacman -Sy --noconfirm --needed perl' + WORKING_DIRECTORY ${MSYS_ROOT} + LOGNAME acquire-perl-${TARGET_TRIPLET} + ) + set(PERL "${MSYS_ROOT}/usr/bin/perl.exe" PARENT_SCOPE) + return() elseif(VAR MATCHES "NASM") set(PROGNAME nasm) set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.12.02) -- cgit v1.2.3 From f9c9bc8287915e52842fab756e93e68f0c9d7042 Mon Sep 17 00:00:00 2001 From: Josue Andrade Gomes Date: Tue, 1 Aug 2017 21:45:42 -0300 Subject: GraphicsMagick 1.3.26 --- ports/graphicsmagick/CONTROL | 2 +- ports/graphicsmagick/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/graphicsmagick/CONTROL b/ports/graphicsmagick/CONTROL index 95ff82ec4..b23651a50 100644 --- a/ports/graphicsmagick/CONTROL +++ b/ports/graphicsmagick/CONTROL @@ -1,4 +1,4 @@ Source: graphicsmagick -Version: 1.3.25 +Version: 1.3.26 Build-Depends: zlib, bzip2, freetype, libjpeg-turbo, libpng, tiff Description: Image processing library diff --git a/ports/graphicsmagick/portfile.cmake b/ports/graphicsmagick/portfile.cmake index 6a27b689e..58d36ad0e 100644 --- a/ports/graphicsmagick/portfile.cmake +++ b/ports/graphicsmagick/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(GM_VERSION 1.3.25) +set(GM_VERSION 1.3.26) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/graphicsmagick-${GM_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://downloads.sourceforge.net/project/graphicsmagick/graphicsmagick/1.3.25/GraphicsMagick-${GM_VERSION}.tar.bz2" FILENAME "GraphicsMagick-${GM_VERSION}.tar.bz2" - SHA512 718802f675988ae36122e8a5f88c74754fa610ec2b4d4630772db7d8898c2e48117ea85fd6741c0b6f256f6f4d68abb642cdeddfb3d330ae1ab2951920cdc1a3 + SHA512 c8791ec0e42527e90c602713c52826d1b8e8bbce7861f8cb48083d0f32465399c4f9a86f44342c5670f2fe54e6c5da878241ddf314c67d7fa98542b912ff61ba ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 88a5b96ea442bb87ff8c6a43d5fbd94dfc984cb9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 1 Aug 2017 18:00:52 -0700 Subject: [g2o] Remove unneeded dependency on qt5 (only used in examples and apps, which aren't built) --- ports/g2o/CONTROL | 4 ++-- ports/g2o/portfile.cmake | 35 +++++++++++------------------------ 2 files changed, 13 insertions(+), 26 deletions(-) diff --git a/ports/g2o/CONTROL b/ports/g2o/CONTROL index c91bc321d..00ec4d963 100644 --- a/ports/g2o/CONTROL +++ b/ports/g2o/CONTROL @@ -1,4 +1,4 @@ Source: g2o -Version: 20170730_git -Build-Depends:suitesparse, eigen3, clapack, ceres, qt5 +Version: 20170730_git-1 +Build-Depends: suitesparse, eigen3, clapack, ceres Description: g2o: A General Framework for Graph Optimization http://openslam.org/g2o.html diff --git a/ports/g2o/portfile.cmake b/ports/g2o/portfile.cmake index 0bb596c00..bdfa20f62 100644 --- a/ports/g2o/portfile.cmake +++ b/ports/g2o/portfile.cmake @@ -10,6 +10,10 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DG2O_BUILD_EXAMPLES=OFF + -DG2O_BUILD_APPS=OFF ) vcpkg_install_cmake() @@ -17,36 +21,19 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - foreach(HEADER g2o/apps/g2o_hierarchical/g2o_hierarchical_api.h - g2o/types/slam3d_addons/g2o_types_slam3d_addons_api.h - g2o/apps/g2o_cli/g2o_cli_api.h - g2o/apps/g2o_simulator/g2o_simulator_api.h - g2o/core/g2o_core_api.h - g2o/solvers/csparse/g2o_csparse_api.h - g2o/stuff/g2o_stuff_api.h - g2o/types/icp/g2o_types_icp_api.h - g2o/solvers/slam2d_linear/g2o_slam2d_linear_api.h - g2o/types/data/g2o_types_data_api.h - g2o/types/sclam2d/g2o_types_sclam2d_api.h - g2o/types/slam2d/g2o_types_slam2d_api.h - g2o/types/slam3d/g2o_types_slam3d_api.h - g2o/types/sba/g2o_types_sba_api.h - g2o/types/slam2d_addons/g2o_types_slam2d_addons_api.h - g2o/solvers/csparse/g2o_csparse_extension_api.h - g2o/core/robust_kernel_factory.h - g2o/stuff/opengl_primitives.h - g2o/core/optimization_algorithm_factory.h - g2o/core/factory.h) - file(READ ${CURRENT_PACKAGES_DIR}/include/${HEADER} HEADER_CONTENTS) + file(GLOB_RECURSE HEADERS "${CURRENT_PACKAGES_DIR}/include/*") + foreach(HEADER ${HEADERS}) + file(READ ${HEADER} HEADER_CONTENTS) string(REPLACE "#ifdef G2O_SHARED_LIBS" "#if 1" HEADER_CONTENTS "${HEADER_CONTENTS}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/${HEADER} "${HEADER_CONTENTS}") + file(WRITE ${HEADER} "${HEADER_CONTENTS}") endforeach() endif() 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}) +if(EXE OR DEBUG_EXE) + file(REMOVE ${EXE} ${DEBUG_EXE}) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -- cgit v1.2.3 From 6f112cf9611cabbe5641cc6ce0bd13d0144f50be Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 2 Aug 2017 14:36:02 -0700 Subject: [vcpkg-find-acquire-program] Restore strawberry perl to satisfy openssl:x64-windows --- scripts/cmake/vcpkg_find_acquire_program.cmake | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 4efe756ee..fef62da53 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -33,7 +33,6 @@ ## * [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) ## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) ## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) -include(vcpkg_acquire_msys) function(vcpkg_find_acquire_program VAR) if(${VAR} AND NOT ${VAR} MATCHES "-NOTFOUND") return() @@ -47,14 +46,11 @@ function(vcpkg_find_acquire_program VAR) vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) if(VAR MATCHES "PERL") - vcpkg_acquire_msys(MSYS_ROOT) - vcpkg_execute_required_process( - COMMAND ${MSYS_ROOT}/usr/bin/bash.exe --noprofile --norc -c 'PATH=/usr/bin:\$PATH pacman -Sy --noconfirm --needed perl' - WORKING_DIRECTORY ${MSYS_ROOT} - LOGNAME acquire-perl-${TARGET_TRIPLET} - ) - set(PERL "${MSYS_ROOT}/usr/bin/perl.exe" PARENT_SCOPE) - return() + set(PROGNAME perl) + set(PATHS ${DOWNLOADS}/tools/perl/perl/bin) + 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) elseif(VAR MATCHES "NASM") set(PROGNAME nasm) set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.12.02) -- cgit v1.2.3 From d26e890b31c35e3a7ec9d6662f87498d68e02eaf Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 2 Aug 2017 16:20:19 -0700 Subject: [openexr][ilmbase] Change local archive name. Fixes #1574. Fixes #1575. --- ports/ilmbase/portfile.cmake | 2 +- ports/openexr/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/ilmbase/portfile.cmake b/ports/ilmbase/portfile.cmake index 8036413ad..f81423afc 100644 --- a/ports/ilmbase/portfile.cmake +++ b/ports/ilmbase/portfile.cmake @@ -9,7 +9,7 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ilmbase-${ILM_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "http://download.savannah.nongnu.org/releases/openexr/ilmbase-${ILM_VERSION}.tar.gz" - FILENAME "ilmbase-${ILM_VERSION}.zip" + FILENAME "ilmbase-${ILM_VERSION}.tar.gz" SHA512 ${ILM_HASH}) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/openexr/portfile.cmake b/ports/openexr/portfile.cmake index 1bcabc458..e95899bc7 100644 --- a/ports/openexr/portfile.cmake +++ b/ports/openexr/portfile.cmake @@ -5,7 +5,7 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openexr-${OPENEXR_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "http://download.savannah.nongnu.org/releases/openexr/openexr-${OPENEXR_VERSION}.tar.gz" - FILENAME "openexr-${OPENEXR_VERSION}.zip" + FILENAME "openexr-${OPENEXR_VERSION}.tar.gz" SHA512 ${OPENEXR_HASH}) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 04af706671e16732f1ab01984774d2b851731389 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Thu, 3 Aug 2017 10:09:35 +0300 Subject: [qt5] copy tools dependencies --- ports/qt5/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake index a76186256..33709c528 100644 --- a/ports/qt5/portfile.cmake +++ b/ports/qt5/portfile.cmake @@ -87,6 +87,8 @@ vcpkg_execute_required_process( LOGNAME fix-cmake ) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5 RENAME copyright) if(EXISTS ${CURRENT_PACKAGES_DIR}/plugins) file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins) -- cgit v1.2.3 From 277b419f60caa07f9daf911f197915644dae6b9a Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 3 Aug 2017 12:46:24 +0200 Subject: [opusfile] update to 0.9 --- ports/opusfile/CONTROL | 2 +- ports/opusfile/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/opusfile/CONTROL b/ports/opusfile/CONTROL index 92acb39f8..fd8a652c8 100644 --- a/ports/opusfile/CONTROL +++ b/ports/opusfile/CONTROL @@ -1,4 +1,4 @@ Source: opusfile -Version: 0.8 +Version: 0.9 Description: Stand-alone decoder library for .opus streams Build-Depends: libogg, opus, openssl diff --git a/ports/opusfile/portfile.cmake b/ports/opusfile/portfile.cmake index 0ba18d849..06c2a2196 100644 --- a/ports/opusfile/portfile.cmake +++ b/ports/opusfile/portfile.cmake @@ -6,8 +6,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/opusfile - REF v0.8 - SHA512 82fcb09c0b77bffb5877c660a268e0c166a1ac314b270799fe5cb4e0fa2cd10fd909b380761031f7dfb60d8b7561e5fe54d93b74d37bb0e6f629bdf9a6384ae1 + REF v0.9 + SHA512 8bada67cf12511fd914813fe782a5bf40a5d1ecadbe77e2e8d7bf40bf09bf0e6af3dfbc9b7987496dea813d3b120897cb9117f06521eeb098105e1a795ab702b HEAD_REF master) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 374c3f94c8c34af25bf5e74953a9c03016668dbc Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 3 Aug 2017 19:43:04 +0200 Subject: [lzfse] new port --- ports/lzfse/CONTROL | 3 +++ ports/lzfse/disable-cli-option.patch | 51 ++++++++++++++++++++++++++++++++++++ ports/lzfse/portfile.cmake | 37 ++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 ports/lzfse/CONTROL create mode 100644 ports/lzfse/disable-cli-option.patch create mode 100644 ports/lzfse/portfile.cmake diff --git a/ports/lzfse/CONTROL b/ports/lzfse/CONTROL new file mode 100644 index 000000000..7559d661e --- /dev/null +++ b/ports/lzfse/CONTROL @@ -0,0 +1,3 @@ +Source: lzfse +Version: 1.0 +Description: Lempel-Ziv style data compressor using Finite State Entropy coding. diff --git a/ports/lzfse/disable-cli-option.patch b/ports/lzfse/disable-cli-option.patch new file mode 100644 index 000000000..260b7a2be --- /dev/null +++ b/ports/lzfse/disable-cli-option.patch @@ -0,0 +1,51 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 336a68d..96a2a74 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -67,18 +67,20 @@ add_library(lzfse + src/lzvn_encode_base.c) + lzfse_add_compiler_flags(lzfse -Wall -Wno-unknown-pragmas -Wno-unused-variable) + +-add_executable(lzfse_cli +- src/lzfse_main.c) +-target_link_libraries(lzfse_cli lzfse) +-set_target_properties(lzfse_cli PROPERTIES OUTPUT_NAME lzfse) +-lzfse_add_compiler_flags(lzfse_cli -Wall -Wno-unknown-pragmas -Wno-unused-variable) +- +-if(CMAKE_VERSION VERSION_LESS 3.1 OR CMAKE_C_COMPLIER_ID STREQUAL "Intel") +- lzfse_add_compiler_flags(lzfse -std=c99) +- lzfse_add_compiler_flags(lzfse_cli -std=c99) +-else() +- set_property(TARGET lzfse PROPERTY C_STANDARD 99) +- set_property(TARGET lzfse_cli PROPERTY C_STANDARD 99) ++if(NOT LZFSE_DISABLE_CLI) ++ add_executable(lzfse_cli ++ src/lzfse_main.c) ++ target_link_libraries(lzfse_cli lzfse) ++ set_target_properties(lzfse_cli PROPERTIES OUTPUT_NAME lzfse) ++ lzfse_add_compiler_flags(lzfse_cli -Wall -Wno-unknown-pragmas -Wno-unused-variable) ++ ++ if(CMAKE_VERSION VERSION_LESS 3.1 OR CMAKE_C_COMPLIER_ID STREQUAL "Intel") ++ lzfse_add_compiler_flags(lzfse -std=c99) ++ lzfse_add_compiler_flags(lzfse_cli -std=c99) ++ else() ++ set_property(TARGET lzfse PROPERTY C_STANDARD 99) ++ set_property(TARGET lzfse_cli PROPERTY C_STANDARD 99) ++ endif() + endif() + + set_target_properties(lzfse PROPERTIES +@@ -95,7 +97,12 @@ endif() + if(NOT LZFSE_BUNDLE_MODE) + include(GNUInstallDirs) + +- install(TARGETS lzfse lzfse_cli ++ if(NOT LZFSE_DISABLE_CLI) ++ install(TARGETS lzfse_cli ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") ++ endif() ++ ++ install(TARGETS lzfse + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") diff --git a/ports/lzfse/portfile.cmake b/ports/lzfse/portfile.cmake new file mode 100644 index 000000000..80d9e2f10 --- /dev/null +++ b/ports/lzfse/portfile.cmake @@ -0,0 +1,37 @@ +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + message(FATAL_ERROR "ARM build not supported") +endif() + +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lzfse/lzfse + REF lzfse-1.0 + SHA512 9d7ca44e6d3d2bdf4b82b0eb66c14922369b8b6fe2cf891187a77c6708b8d26c2c1b2ccddec6059e85dbbbb37c497419549f02812b5f34d06238ac246a8cf912 + HEAD_REF master) + +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-cli-option.patch) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLZFSE_DISABLE_TESTS=ON + -DLZFSE_DISABLE_CLI=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(READ ${CURRENT_PACKAGES_DIR}/include/lzfse.h LZFSE_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "defined(LZFSE_DLL)" "1" LZFSE_H "${LZFSE_H}") +else() + string(REPLACE "defined(LZFSE_DLL)" "0" LZFSE_H "${LZFSE_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/lzfse.h "${LZFSE_H}") + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/lzfse) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/lzfse/LICENSE ${CURRENT_PACKAGES_DIR}/share/lzfse/copyright) -- cgit v1.2.3 From 54ac84f3f36e171306507e89a198ba7b8ae08cf7 Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 4 Aug 2017 02:07:15 +0200 Subject: [msgpack] update to 2.1.5, disable static libs in dynamic build --- ports/msgpack/CONTROL | 2 +- ports/msgpack/add-static-lib-option.patch | 84 +++++++++++++++++++++++++++++++ ports/msgpack/portfile.cmake | 28 ++++++----- 3 files changed, 101 insertions(+), 13 deletions(-) create mode 100644 ports/msgpack/add-static-lib-option.patch diff --git a/ports/msgpack/CONTROL b/ports/msgpack/CONTROL index de50a5575..1d0daba68 100644 --- a/ports/msgpack/CONTROL +++ b/ports/msgpack/CONTROL @@ -1,3 +1,3 @@ Source: msgpack -Version: 2.1.1 +Version: 2.1.5 Description: MessagePack is an efficient binary serialization format, which lets you exchange data among multiple languages like JSON, except that it's faster and smaller. diff --git a/ports/msgpack/add-static-lib-option.patch b/ports/msgpack/add-static-lib-option.patch new file mode 100644 index 000000000..349a413fb --- /dev/null +++ b/ports/msgpack/add-static-lib-option.patch @@ -0,0 +1,84 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f92363e..b0becbb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -196,27 +196,28 @@ IF (MSGPACK_ENABLE_SHARED) + ${CMAKE_CURRENT_SOURCE_DIR} + ) + ENDIF () ++IF (MSGPACK_ENABLE_STATIC) ++ ADD_LIBRARY (msgpackc-static STATIC ++ ${msgpackc_SOURCES} ++ ${msgpackc_HEADERS} ++ ) + +-ADD_LIBRARY (msgpackc-static STATIC +- ${msgpackc_SOURCES} +- ${msgpackc_HEADERS} +-) +- +-TARGET_INCLUDE_DIRECTORIES (msgpackc-static +- PUBLIC +- $ +- $ +- $ +- PRIVATE +- ${CMAKE_CURRENT_SOURCE_DIR} +-) ++ TARGET_INCLUDE_DIRECTORIES (msgpackc-static ++ PUBLIC ++ $ ++ $ ++ $ ++ PRIVATE ++ ${CMAKE_CURRENT_SOURCE_DIR} ++ ) ++ SET_TARGET_PROPERTIES (msgpackc-static PROPERTIES OUTPUT_NAME "msgpackc" COMPILE_DEFINITIONS MSGPACK_DLLEXPORT=) ++ENDIF () + +-IF (NOT MSGPACK_ENABLE_SHARED) ++IF (MSGPACK_ENABLE_STATIC AND NOT MSGPACK_ENABLE_SHARED) + # Add alias for subdirectories + ADD_LIBRARY (msgpackc ALIAS msgpackc-static) + ENDIF () + +-SET_TARGET_PROPERTIES (msgpackc-static PROPERTIES OUTPUT_NAME "msgpackc") + IF (MSGPACK_ENABLE_SHARED) + IF (MSVC) + SET_TARGET_PROPERTIES (msgpackc PROPERTIES IMPORT_SUFFIX "_import.lib") +@@ -239,14 +240,18 @@ IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" ST + IF (MSGPACK_ENABLE_SHARED) + SET_PROPERTY (TARGET msgpackc APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3 -DPIC") + ENDIF () +- SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3" ) ++ IF (MSGPACK_ENABLE_STATIC) ++ SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3" ) ++ ENDIF () + ENDIF () + + IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + IF (MSGPACK_ENABLE_SHARED) + SET_PROPERTY (TARGET msgpackc APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") + ENDIF () +- SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") ++ IF (MSGPACK_ENABLE_STATIC) ++ SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags") ++ ENDIF () + ENDIF () + + IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") +@@ -278,10 +283,12 @@ IF (MSGPACK_BUILD_EXAMPLES) + ADD_SUBDIRECTORY (example) + ENDIF () + +-IF (MSGPACK_ENABLE_SHARED) ++IF (MSGPACK_ENABLE_SHARED AND MSGPACK_ENABLE_STATIC) + SET (MSGPACK_INSTALLTARGETS msgpackc msgpackc-static) +-ELSE() ++ELSEIF (MSGPACK_ENABLE_STATIC) + SET (MSGPACK_INSTALLTARGETS msgpackc-static) ++ELSE () ++ SET (MSGPACK_INSTALLTARGETS msgpackc) + ENDIF () + + INSTALL (TARGETS ${MSGPACK_INSTALLTARGETS} EXPORT msgpack-targets diff --git a/ports/msgpack/portfile.cmake b/ports/msgpack/portfile.cmake index 3beb72c5d..9328811dd 100644 --- a/ports/msgpack/portfile.cmake +++ b/ports/msgpack/portfile.cmake @@ -1,30 +1,34 @@ include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO msgpack/msgpack-c + REF cpp-2.1.5 + SHA512 aab8357e494bb5aa7407b53e5e650382869ea95812a6677e085530d5f27cde6946fbfd0095b19608c75163dbb82de9ccb6a695234e7c03659fc6efc2da300e19 + HEAD_REF master) -set(MSGPACK_VERSION 2.1.1) -set(MSGPACK_HASH 31ed6fda498d43da6fdbbe000ce36c40e4cf886f00d879c57d406def7f5bba4eaf66f02f221398cb50f6f4c748d5cde9c97eca0cfa21b368c7c933c3301cf9b5) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/msgpack-${MSGPACK_VERSION}) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/msgpack/msgpack-c/releases/download/cpp-${MSGPACK_VERSION}/msgpack-${MSGPACK_VERSION}.tar.gz" - FILENAME "msgpack-${MSGPACK_VERSION}.tar.gz" - SHA512 ${MSGPACK_HASH} -) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-static-lib-option.patch) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(MSGPACK_ENABLE_SHARED OFF) + set(MSGPACK_ENABLE_STATIC ON) else() set(MSGPACK_ENABLE_SHARED ON) + set(MSGPACK_ENABLE_STATIC OFF) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DMSGPACK_ENABLE_SHARED=${MSGPACK_ENABLE_SHARED} -) + OPTIONS + -DMSGPACK_ENABLE_SHARED=${MSGPACK_ENABLE_SHARED} + -DMSGPACK_ENABLE_STATIC=${MSGPACK_ENABLE_STATIC} + -DMSGPACK_BUILD_EXAMPLES=OFF + -DMSGPACK_BUILD_TESTS=OFF) vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/msgpack) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 17cb5b9c3483a2aca45e2a525d2ce3b386676832 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 4 Aug 2017 14:38:56 -0700 Subject: [qt5] Bump version to include tool dependency copying. --- ports/qt5/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index 26b850785..01c7a3a19 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 -Version: 5.8-3 +Version: 5.8-4 Description: Qt5 application framework main components. Webengine, examples and tests not included. Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre, harfbuzz, sqlite3, libpq, double-conversion -- cgit v1.2.3 From 639f649f5c9948dcf8b3031efd35b346ee77d9fa Mon Sep 17 00:00:00 2001 From: Arseniy Shestakov Date: Wed, 2 Aug 2017 06:36:50 +0300 Subject: [fuzzylite] new port for fuzzylite 6.0 --- ports/fuzzylite/CONTROL | 3 +++ ports/fuzzylite/portfile.cmake | 46 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 ports/fuzzylite/CONTROL create mode 100644 ports/fuzzylite/portfile.cmake diff --git a/ports/fuzzylite/CONTROL b/ports/fuzzylite/CONTROL new file mode 100644 index 000000000..b278a1b8f --- /dev/null +++ b/ports/fuzzylite/CONTROL @@ -0,0 +1,3 @@ +Source: fuzzylite +Version: 6.0 +Description: A fuzzy logic control library in C++ diff --git a/ports/fuzzylite/portfile.cmake b/ports/fuzzylite/portfile.cmake new file mode 100644 index 000000000..976ca66de --- /dev/null +++ b/ports/fuzzylite/portfile.cmake @@ -0,0 +1,46 @@ +include(vcpkg_common_functions) + +if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fuzzylite/fuzzylite + REF v6.0 + SHA512 6f5d40d0359458e109ac2aebfbf571f61867a8b49920f4a5e1b5d86bdf578dba038b942c9e05eab0d4620f73e8cded770abe7b5e597a3b4c39dbcf6a1259f4af + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(FL_BUILD_SHARED ON) + set(FL_BUILD_STATIC OFF) +else() + set(FL_BUILD_SHARED OFF) + set(FL_BUILD_STATIC ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/fuzzylite + PREFER_NINJA + OPTIONS + -DFL_BUILD_SHARED=${FL_BUILD_SHARED} + -DFL_BUILD_STATIC=${FL_BUILD_STATIC} + -DFL_BUILD_BINARY=OFF + -DFL_BUILD_TESTS=OFF +) + +vcpkg_build_cmake() +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/fuzzylite-static.lib ${CURRENT_PACKAGES_DIR}/lib/fuzzylite.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fuzzylite-static-debug.lib ${CURRENT_PACKAGES_DIR}/debug/lib/fuzzylite-debug.lib) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fuzzylite RENAME copyright) -- cgit v1.2.3 From d85a8530b9debfeae0f98bc208740948dc02a1df Mon Sep 17 00:00:00 2001 From: Josue Andrade Gomes Date: Fri, 4 Aug 2017 21:32:46 -0300 Subject: [graphicsmagick] build fixes --- ports/graphicsmagick/CMakeLists.txt | 4 +- ports/graphicsmagick/CONTROL | 2 +- ports/graphicsmagick/magick_types.h | 133 ++++++++++++++++++++++++++++++++++++ ports/graphicsmagick/portfile.cmake | 11 +-- 4 files changed, 142 insertions(+), 8 deletions(-) create mode 100644 ports/graphicsmagick/magick_types.h diff --git a/ports/graphicsmagick/CMakeLists.txt b/ports/graphicsmagick/CMakeLists.txt index 5c5b1d166..035a193cc 100644 --- a/ports/graphicsmagick/CMakeLists.txt +++ b/ports/graphicsmagick/CMakeLists.txt @@ -8,7 +8,7 @@ find_package(PNG REQUIRED) find_package(TIFF REQUIRED) find_package(Freetype REQUIRED) -add_definitions(-D_MAGICKLIB_ -DMAGICK_IMPLEMENTATION) +add_definitions(-D_MAGICKLIB_ -D_WANDLIB_ -DMAGICK_IMPLEMENTATION -D_VISUALC_) if (BUILD_SHARED_LIBS) add_definitions(-D_DLL -DDLL) @@ -79,7 +79,7 @@ add_library(graphicsmagick coders/art.c coders/avs.c coders/uyvy.c coders/vicar.c coders/vid.c coders/viff.c coders/wbmp.c coders/webp.c coders/wmf.c coders/wpg.c coders/x.c coders/xbm.c coders/xc.c coders/xcf.c - coders/xpm.c coders/xwd.c coders/yuv.c + coders/xpm.c coders/xtrn.c coders/xwd.c coders/yuv.c filters/analyze.c magick/analyze.c magick/animate.c magick/annotate.c magick/attribute.c magick/average.c magick/bit_stream.c magick/blob.c magick/cdl.c diff --git a/ports/graphicsmagick/CONTROL b/ports/graphicsmagick/CONTROL index b23651a50..13770197d 100644 --- a/ports/graphicsmagick/CONTROL +++ b/ports/graphicsmagick/CONTROL @@ -1,4 +1,4 @@ Source: graphicsmagick -Version: 1.3.26 +Version: 1.3.26-1 Build-Depends: zlib, bzip2, freetype, libjpeg-turbo, libpng, tiff Description: Image processing library diff --git a/ports/graphicsmagick/magick_types.h b/ports/graphicsmagick/magick_types.h new file mode 100644 index 000000000..a27979210 --- /dev/null +++ b/ports/graphicsmagick/magick_types.h @@ -0,0 +1,133 @@ +/* + Copyright (C) 2003 - 2012 GraphicsMagick Group + + This program is covered by multiple licenses, which are described in + Copyright.txt. You should have received a copy of Copyright.txt with this + package; otherwise see http://www.graphicsmagick.org/www/Copyright.html. + + GraphicsMagick types typedefs. + + GraphicsMagick is expected to compile with any C '89 ANSI C compiler + supporting at least 16-bit 'short', 32-bit 'int', and 32-bit 'long'. + It is also expected to take advantage of 64-bit LP64 and Windows + WIN64 LLP64. We use C '99 style types but declare our own types so + as to not depend on C '99 header files, and take care to depend only + on C '89 library functions, POSIX, or well-known extensions. Any C + '99 syntax used is removed if the compiler does not support it. +*/ + +#ifndef _MAGICK_TYPES_H +#define _MAGICK_TYPES_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +/* + Assign ANSI C stdint.h-like typedefs based on the sizes of native types + magick_int8_t -- -128 to 127 + magick_uint8_t -- 0 to 255 + magick_int16_t -- -32,768 to 32,767 + magick_uint16_t -- 0 to 65,535 + magick_int32_t -- -2,147,483,648 to 2,147,483,647 + magick_uint32_t -- 0 to 4,294,967,295 + magick_int64_t -- -9,223,372,036,854,775,807 to 9,223,372,036,854,775,807 + magick_uint64_t -- 0 to 18,446,744,073,709,551,615 + + magick_uintmax_t -- largest native unsigned integer type ("%ju") + 0 to UINTMAX_MAX + UINTMAX_C(value) declares constant value + magick_uintptr_t -- unsigned type for storing a pointer value ("%tu") + 0 to UINTPTR_MAX + + ANSI C '99 stddef.h-like types + size_t -- unsigned type representing sizes of objects ("%zu") + 0 to SIZE_MAX + magick_ptrdiff_t -- signed type for subtracting two pointers ("%td") + PTRDIFF_MIN to PTRDIFF_MAX + + EEE Std 1003.1, 2004 types + ssize_t -- signed type for a count of bytes or an error indication ("%zd") + ? to SSIZE_MAX +*/ + +#if (defined(WIN32) || defined(WIN64)) && \ + !defined(__MINGW32__) && !defined(__MINGW64__) + + /* The following typedefs are used for WIN32 & WIN64 (without + configure) */ + typedef signed char magick_int8_t; + typedef unsigned char magick_uint8_t; + + typedef signed short magick_int16_t; + typedef unsigned short magick_uint16_t; + + typedef signed int magick_int32_t; +# define MAGICK_INT32_F "" + typedef unsigned int magick_uint32_t; +# define MAGICK_UINT32_F "" + + typedef signed __int64 magick_int64_t; +# define MAGICK_INT64_F "I64" + typedef unsigned __int64 magick_uint64_t; +# define MAGICK_UINT64_F "I64" + + typedef magick_uint64_t magick_uintmax_t; + +# if defined(WIN32) + typedef unsigned long magick_uintptr_t; +# define MAGICK_SIZE_T_F "l" +# define MAGICK_SIZE_T unsigned long +# define MAGICK_SSIZE_T_F "l" +# define MAGICK_SSIZE_T long +# elif defined(WIN64) + /* WIN64 uses the LLP64 model */ + typedef unsigned long long magick_uintptr_t; +# define MAGICK_SIZE_T_F "I64" +# define MAGICK_SIZE_T unsigned __int64 +# define MAGICK_SSIZE_T_F "I64" +# define MAGICK_SSIZE_T signed __int64 +# endif + +#else + + /* The following typedefs are subtituted when using Unixish configure */ + typedef @INT8_T@ magick_int8_t; + typedef @UINT8_T@ magick_uint8_t; + + typedef @INT16_T@ magick_int16_t; + typedef @UINT16_T@ magick_uint16_t; + + typedef @INT32_T@ magick_int32_t; +# define MAGICK_INT32_F @INT32_F@ + typedef @UINT32_T@ magick_uint32_t; +# define MAGICK_UINT32_F @UINT32_F@ + + typedef @INT64_T@ magick_int64_t; +# define MAGICK_INT64_F @INT64_F@ + typedef @UINT64_T@ magick_uint64_t; +# define MAGICK_UINT64_F @UINT64_F@ + + typedef @UINTMAX_T@ magick_uintmax_t; +# define MAGICK_UINTMAX_F @UINTMAX_F@ + + typedef @UINTPTR_T@ magick_uintptr_t; +# define MAGICK_UINTPTR_F @UINTPTR_F@ + +# define MAGICK_SIZE_T_F @MAGICK_SIZE_T_F@ +# define MAGICK_SIZE_T @MAGICK_SIZE_T@ + +# define MAGICK_SSIZE_T_F @MAGICK_SSIZE_T_F@ +# define MAGICK_SSIZE_T @MAGICK_SSIZE_T@ + +#endif + + /* 64-bit file and blob offset type */ + typedef magick_int64_t magick_off_t; +#define MAGICK_OFF_F MAGICK_INT64_F + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif /* defined(__cplusplus) || defined(c_plusplus) */ + +#endif /* _MAGICK_TYPES_H */ diff --git a/ports/graphicsmagick/portfile.cmake b/ports/graphicsmagick/portfile.cmake index 58d36ad0e..6636802cf 100644 --- a/ports/graphicsmagick/portfile.cmake +++ b/ports/graphicsmagick/portfile.cmake @@ -1,16 +1,17 @@ include(vcpkg_common_functions) set(GM_VERSION 1.3.26) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/graphicsmagick-${GM_VERSION}) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/graphicsmagick-${GM_VERSION}-windows-source) vcpkg_download_distfile(ARCHIVE - URLS "https://downloads.sourceforge.net/project/graphicsmagick/graphicsmagick/1.3.25/GraphicsMagick-${GM_VERSION}.tar.bz2" - FILENAME "GraphicsMagick-${GM_VERSION}.tar.bz2" - SHA512 c8791ec0e42527e90c602713c52826d1b8e8bbce7861f8cb48083d0f32465399c4f9a86f44342c5670f2fe54e6c5da878241ddf314c67d7fa98542b912ff61ba -) + URLS "https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/${GM_VERSION}/GraphicsMagick-${GM_VERSION}-windows-source.7z" + FILENAME "GraphicsMagick-${GM_VERSION}-windows-source.7z" + SHA512 c45a054d082d9a7a2889a2235dd5b96bd564acf55bd581426ecd32c426f9797d7d56d6e5f25a5a7da8ebd26bf0d962372b5d48d86532dc6c57522d27c0d18ec8 + ) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/magick_types.h DESTINATION ${SOURCE_PATH}/magick) # GM always requires a dynamic BZIP2. This patch makes this dependent if _DLL is defined vcpkg_apply_patches( -- cgit v1.2.3 From fa09a1bc8462a80c1dbc9b903b280ed8f1649d18 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Sun, 6 Aug 2017 11:33:07 +0200 Subject: Update MSMPI to version 8.1 and improve error message when wrong redistributable package is installed --- ports/msmpi/CONTROL | 2 +- ports/msmpi/portfile.cmake | 33 +++++++++++++++++++++------------ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/ports/msmpi/CONTROL b/ports/msmpi/CONTROL index e17fd1c00..a7f9f38ef 100644 --- a/ports/msmpi/CONTROL +++ b/ports/msmpi/CONTROL @@ -1,3 +1,3 @@ Source: msmpi -Version: 8.0-1 +Version: 8.1 Description: Microsoft MPI diff --git a/ports/msmpi/portfile.cmake b/ports/msmpi/portfile.cmake index 6125a20f6..59d61385d 100644 --- a/ports/msmpi/portfile.cmake +++ b/ports/msmpi/portfile.cmake @@ -1,18 +1,26 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/msmpi-8.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/msmpi-8.1) vcpkg_download_distfile(SDK_ARCHIVE - URLS "https://download.microsoft.com/download/B/2/E/B2EB83FE-98C2-4156-834A-E1711E6884FB/msmpisdk.msi" - FILENAME "msmpisdk-8.0.msi" - SHA512 49c762873ba777ccb3c959a1d2ca1392e4c3c8d366e604ad707184ea432302e6649894ec6599162d0d40f3e6ebc0dada1eb9ca0da1cde0f6ba7a9b1847dac8c0 + URLS "https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/msmpisdk.msi" + FILENAME "msmpisdk-8.1.msi" + SHA512 a0cfb713865257b812c19644286fc0d02ec57ce2a0bea066fead4e0ff18b545a0787065ab748f8dd335bb2fa486911aab54c1b842993b7b685c5832c014a63bf ) +macro(download_msmpi_redistributable_package) + vcpkg_download_distfile(REDIST_ARCHIVE + URLS "https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/MSMpiSetup.exe" + FILENAME "MSMpiSetup-8.1.exe" + SHA512 92ae65f3d52e786e39dffedabdf48255b4985a075993e626f5f59674e9ffaedbf33a4725e8f142b21468e24cd6d3e49f3d91da0fbda1867784cc93300c12c96b + ) +endmacro() + ### Check for correct version of installed redistributable package # We always want the ProgramFiles folder even on a 64-bit machine (not the ProgramFilesx86 folder) vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS) set(SYSTEM_MPIEXEC_FILEPATH "${PROGRAM_FILES_PLATFORM_BITNESS}/Microsoft MPI/Bin/mpiexec.exe") -set(MSMPI_EXPECTED_FULL_VERSION "8.0.12438.0") +set(MSMPI_EXPECTED_FULL_VERSION "8.1.12438.1084") if(EXISTS ${SYSTEM_MPIEXEC_FILEPATH}) set(MPIEXEC_VERSION_LOGNAME "mpiexec-version") @@ -25,10 +33,15 @@ if(EXISTS ${SYSTEM_MPIEXEC_FILEPATH}) if(${MPIEXEC_OUTPUT} MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)\\]") if(NOT ${CMAKE_MATCH_1} STREQUAL ${MSMPI_EXPECTED_FULL_VERSION}) + download_msmpi_redistributable_package() + message(FATAL_ERROR " The version of the installed MSMPI redistributable packages does not match the version to be installed\n" - " Expected version: ${MSMPI_EXPECTED_FULL_VERSION}\n" - " Found version: ${CMAKE_MATCH_1}\n") + " Expected version: ${MSMPI_EXPECTED_FULL_VERSION}\n" + " Found version: ${CMAKE_MATCH_1}\n" + " Please upgrade the installed version on your system.\n" + " The appropriate installer for the expected version has been downloaded to:\n" + " ${REDIST_ARCHIVE}\n") endif() else() message(FATAL_ERROR @@ -38,11 +51,7 @@ if(EXISTS ${SYSTEM_MPIEXEC_FILEPATH}) " ${CURRENT_BUILDTREES_DIR}\\${MPIEXEC_VERSION_LOGNAME}-err.log\n") endif() else() - vcpkg_download_distfile(REDIST_ARCHIVE - URLS "https://download.microsoft.com/download/B/2/E/B2EB83FE-98C2-4156-834A-E1711E6884FB/MSMpiSetup.exe" - FILENAME "MSMpiSetup-8.0.exe" - SHA512 f5271255817f5417de8e432cd21e5ff3c617911a30b7777560c0ceb6f4031ace5fa88fc7675759ae0964bcf4e2076fe367a06c129f3a9ad06871a08bf95ed68b - ) + download_msmpi_redistributable_package() message(FATAL_ERROR " Could not find:\n" -- cgit v1.2.3 From eb5b7e149f93e073d6c6587942013cf31bf83cf9 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Sun, 6 Aug 2017 11:37:27 +0200 Subject: Update VTK to version 8.0. --- ports/vtk/CONTROL | 2 +- ports/vtk/disable-workaround-findhdf5.patch | 23 ----------- ports/vtk/dont-define-ssize_t.patch | 13 ------- ports/vtk/fix-findhdf5-shared.patch | 20 ---------- ports/vtk/netcdf-use-hdf5-definitions.patch | 10 ----- ports/vtk/portfile.cmake | 44 ++++++++++------------ .../transfer-3rd-party-module-definitions.patch | 26 ------------- ports/vtk/transfer-hdf5-definitions.patch | 10 ----- 8 files changed, 20 insertions(+), 128 deletions(-) delete mode 100644 ports/vtk/disable-workaround-findhdf5.patch delete mode 100644 ports/vtk/dont-define-ssize_t.patch delete mode 100644 ports/vtk/fix-findhdf5-shared.patch delete mode 100644 ports/vtk/netcdf-use-hdf5-definitions.patch delete mode 100644 ports/vtk/transfer-3rd-party-module-definitions.patch delete mode 100644 ports/vtk/transfer-hdf5-definitions.patch diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 2b273560a..b1a06c9ad 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,4 @@ Source: vtk -Version: 7.1.1-1 +Version: 8.0.0 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi diff --git a/ports/vtk/disable-workaround-findhdf5.patch b/ports/vtk/disable-workaround-findhdf5.patch deleted file mode 100644 index c896af2f5..000000000 --- a/ports/vtk/disable-workaround-findhdf5.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/CMake/vtkModuleMacros.cmake b/CMake/vtkModuleMacros.cmake -index fdd83ed8fc..4986582a5b 100644 ---- a/CMake/vtkModuleMacros.cmake -+++ b/CMake/vtkModuleMacros.cmake -@@ -885,18 +885,6 @@ macro(vtk_module_third_party _pkg) - set(vtk${_lower}_DEFINITIONS ${${_upper}_DEFINITIONS}) - endif() - -- #a workaround for bad FindHDF5 behavior in which deb or opt can -- #end up empty. cmake >= 2.8.12.2 makes this uneccessary -- string(REGEX MATCH "debug;.*optimized;.*" -- _remove_deb_opt "${vtk${_lower}_LIBRARIES}") -- if (_remove_deb_opt) -- set(_tmp ${vtk${_lower}_LIBRARIES}) -- list(REMOVE_ITEM _tmp "debug") -- list(REMOVE_ITEM _tmp "optimized") -- list(REMOVE_DUPLICATES _tmp) -- set(vtk${_lower}_LIBRARIES ${_tmp}) -- endif() -- - set(vtk${_lower}_INCLUDE_DIRS "") - else() - if(_nolibs) diff --git a/ports/vtk/dont-define-ssize_t.patch b/ports/vtk/dont-define-ssize_t.patch deleted file mode 100644 index ba9b5e605..000000000 --- a/ports/vtk/dont-define-ssize_t.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in b/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in -index 0a19c41..0d92371 100644 ---- a/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in -+++ b/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in -@@ -110,7 +110,7 @@ - #cmakedefine HAVE_LIBHDF5_HL - - /* Define to `int' if system doesn't define. */ --#cmakedefine ssize_t @ssize_t@ -+/* #cmakedefine ssize_t @ssize_t@ */ - - /* Define to `int' if system doesn't define. */ - #cmakedefine ptrdiff_t @ptrdiff_t@ diff --git a/ports/vtk/fix-findhdf5-shared.patch b/ports/vtk/fix-findhdf5-shared.patch deleted file mode 100644 index 762a9ab07..000000000 --- a/ports/vtk/fix-findhdf5-shared.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/CMake/FindHDF5.cmake b/CMake/FindHDF5.cmake -index 6d558e39b1..9511e9a1ad 100644 ---- a/CMake/FindHDF5.cmake -+++ b/CMake/FindHDF5.cmake -@@ -3,11 +3,11 @@ - # (BUG #0014363). - - # include the default FindHDF5.cmake. --if(CMAKE_VERSION VERSION_LESS 3.6.1) -+#if(CMAKE_VERSION VERSION_LESS 3.6.1) - include(${CMAKE_CURRENT_LIST_DIR}/NewCMake/FindHDF5.cmake) --else() -- include(${CMAKE_ROOT}/Modules/FindHDF5.cmake) --endif() -+#else() -+# include(${CMAKE_ROOT}/Modules/FindHDF5.cmake) -+#endif() - - if(HDF5_FOUND AND (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL)) - include(vtkMPI) diff --git a/ports/vtk/netcdf-use-hdf5-definitions.patch b/ports/vtk/netcdf-use-hdf5-definitions.patch deleted file mode 100644 index a6a3528ca..000000000 --- a/ports/vtk/netcdf-use-hdf5-definitions.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/ThirdParty/netcdf/vtknetcdf/CMakeLists.txt Mon Nov 14 17:59:47 2016 -+++ b/ThirdParty/netcdf/vtknetcdf/CMakeLists.txt Thu Jan 05 21:15:28 2017 -@@ -330,6 +330,7 @@ - ${netcdf_dispatch_SOURCES} - ${netcdf_liblib_SOURCES}) - target_link_libraries(vtkNetCDF ${vtkhdf5_LIBRARIES}) -+target_compile_definitions(vtkNetCDF PRIVATE ${vtkhdf5_DEFINITIONS}) - - if (UNIX) - # link against the math library. diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 269e6cc79..26cbb3d45 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -1,29 +1,15 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/VTK-7.1.1) -vcpkg_download_distfile(ARCHIVE - URLS "http://www.vtk.org/files/release/7.1/VTK-7.1.1.tar.gz" - FILENAME "VTK-7.1.1.tar.gz" - SHA512 34a068801fe45f98325e5334d2569fc9b15ed38620386f1b5b860c9735e5fb8510953b50a3340d3ef9795e22fecf798c25bf750215b2ff1ff1eb7a1ecd87b623 -) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/transfer-3rd-party-module-definitions.patch - ${CMAKE_CURRENT_LIST_DIR}/transfer-hdf5-definitions.patch - ${CMAKE_CURRENT_LIST_DIR}/netcdf-use-hdf5-definitions.patch - ${CMAKE_CURRENT_LIST_DIR}/dont-define-ssize_t.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-findhdf5-shared.patch - ${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "Kitware/VTK" + REF "v8.0.0" + SHA512 1a328f24df0b1c40c623ae80c9d49f8b27570144b10af02aeed41b90b50b8d4e0dd83d1341961f6818cde36e2cd793c578ebc95a46950cebfc518f486f249791 + HEAD_REF "master" ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - # HACK: The FindHDF5.cmake script does not seem to detect the HDF5_DEFINITIONS correctly - # if HDF5 has been built without the tools (which is the case in the HDF5 port), - # so we set the BUILT_AS_DYNAMIC_LIB=1 flag here explicitly because we know HDF5 - # has been build as dynamic library in the current case. - list(APPEND ADDITIONAL_OPTIONS "-DHDF5_DEFINITIONS=-DH5_BUILT_AS_DYNAMIC_LIB=1") + list(APPEND ADDITIONAL_OPTIONS "-DVTK_EXTERNAL_HDF5_IS_SHARED=ON") endif() vcpkg_configure_cmake( @@ -68,6 +54,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +# Remove tools from the bin directory. +# We make sure no references to the deleted files are left in the CMake config files. file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake VTK_TARGETS_RELEASE_MODULE) string(REPLACE "list\(APPEND _IMPORT_CHECK_FILES_FOR_vtkEncodeString" "#list(APPEND _IMPORT_CHECK_FILES_FOR_vtkEncodeString" VTK_TARGETS_RELEASE_MODULE "${VTK_TARGETS_RELEASE_MODULE}") string(REPLACE "list\(APPEND _IMPORT_CHECK_FILES_FOR_vtkHashSource" "#list(APPEND _IMPORT_CHECK_FILES_FOR_vtkHashSource" VTK_TARGETS_RELEASE_MODULE "${VTK_TARGETS_RELEASE_MODULE}") @@ -82,10 +70,16 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake "${VTK_TARGE file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-7.1.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-7.1.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkEncodeString-7.1.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkHashSource-7.1.exe) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-8.0.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-8.0.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkEncodeString-8.0.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkHashSource-8.0.exe) +else() + # On static builds there should be no bin directory at all + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() # Handle copyright file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk) diff --git a/ports/vtk/transfer-3rd-party-module-definitions.patch b/ports/vtk/transfer-3rd-party-module-definitions.patch deleted file mode 100644 index 7b402892f..000000000 --- a/ports/vtk/transfer-3rd-party-module-definitions.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/CMake/vtkModuleMacros.cmake Mon Nov 14 17:59:47 2016 -+++ b/CMake/vtkModuleMacros.cmake Thu Jan 05 21:36:06 2017 -@@ -665,6 +665,9 @@ - if(${dep}_LIBRARY_DIRS) - link_directories(${${dep}_LIBRARY_DIRS}) - endif() -+ if(${dep}_DEFINITIONS) -+ target_compile_definitions(${vtk-module} PRIVATE ${${dep}_DEFINITIONS}) -+ endif() - vtk_module_link_libraries(${vtk-module} LINK_PRIVATE ${${dep}_LIBRARIES}) - if(_help_vs7 AND ${dep}_LIBRARIES) - add_dependencies(${vtk-module} ${${dep}_LIBRARIES}) -@@ -870,6 +873,13 @@ - set(vtk${_lower}_LIBRARIES "${${_pkg}_LIBRARIES}") - else() - set(vtk${_lower}_LIBRARIES "${${_upper}_LIBRARIES}") -+ endif() -+ if(${_pkg}_DEFINITIONS) -+ set(vtk${_lower}_DEFINITIONS ${${_pkg}_DEFINITIONS}) -+ elseif(${_upper}_DEFINITIONS) -+ set(vtk${_lower}_DEFINITIONS ${${_upper}_DEFINITIONS}) -+ else() -+ set(vtk${_lower}_DEFINITIONS ${${_upper}_DEFINITIONS}) - endif() - - #a workaround for bad FindHDF5 behavior in which deb or opt can diff --git a/ports/vtk/transfer-hdf5-definitions.patch b/ports/vtk/transfer-hdf5-definitions.patch deleted file mode 100644 index 6184fdf7a..000000000 --- a/ports/vtk/transfer-hdf5-definitions.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/ThirdParty/hdf5/module.cmake Mon Nov 14 17:59:47 2016 -+++ b/ThirdParty/hdf5/module.cmake Thu Jan 05 21:23:20 2017 -@@ -5,6 +5,7 @@ - endif() - if(VTK_USE_SYSTEM_HDF5) - set(vtkhdf5_LIBRARIES ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES}) -+ set(vtkhdf5_DEFINITIONS ${HDF5_DEFINITIONS}) - endif() - vtk_module(vtkhdf5 - EXCLUDE_FROM_WRAPPING -- cgit v1.2.3 From 888843e03923448e9ac874c13919e779f967a44c Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 6 Aug 2017 01:10:48 +0200 Subject: [double-conversion] update to 3.0.0 --- ports/double-conversion/CONTROL | 2 +- ports/double-conversion/portfile.cmake | 55 +++++++++++++++++----------------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/ports/double-conversion/CONTROL b/ports/double-conversion/CONTROL index 226a90676..2ab2391e7 100644 --- a/ports/double-conversion/CONTROL +++ b/ports/double-conversion/CONTROL @@ -1,3 +1,3 @@ Source: double-conversion -Version: 2.0.1-1 +Version: 3.0.0 Description: Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles. diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index a4106c2c0..7bf2f6a63 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -1,24 +1,10 @@ -# 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} -# - -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - # This is due to a bug in CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS on arm - message(STATUS "DLLs on arm aren't currently supported. Building static libs instead.") - set(VCPKG_LIBRARY_LINKAGE "static") -endif() - include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/double-conversion - REF d4d68e4e788bec89d55a6a3e33af674087837c82 - SHA512 200b2f5ff1dfe4591f3c168e465ed154993469b7adf22b5bb2ae707d60d360ac45b51385f2d09d2a8358a914db01a790050cd9d9b78645f5ea5159410ce1de17 + REF v3.0.0 + SHA512 5057af6e72f2aaace56ebdd9a0ddfa34318cbdfeabec5c361b60e6c92f160c8999c046c50f8c6f8d590eb8e97aa70bb6e97ba8148f0dc95dbc42f204fcdc1abf HEAD_REF master ) @@ -27,25 +13,38 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-arm.patch ) -set(OPTIONS) -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set(OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=True) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS - ${OPTIONS} + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=True ) vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/CMake ${CURRENT_PACKAGES_DIR}/share/double-conversion) -file(READ ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/double-conversion/double-conversionLibraryDepends-debug.cmake "${DEBUG_MODULE}") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMake) +# Rename exported target files into something vcpkg_fixup_cmake_targets expects +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake + ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionTargets-debug.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends-release.cmake + ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets-release.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends.cmake + ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake) + +file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake TARGETS_FILE) +string(REPLACE "double-conversionLibraryDepends" "double-conversionTargets" TARGETS_FILE "${TARGETS_FILE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake "${TARGETS_FILE}") + +# Remove hardcoded paths from config file +file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake CONFIG_FILE) +string(REPLACE "${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion/double-conversionLibraryDepends.cmake" + "\${double-conversion_CMAKE_DIR}/double-conversionTargets.cmake" CONFIG_FILE "${CONFIG_FILE}") +string(REPLACE "${CURRENT_PACKAGES_DIR}" + "\${double-conversion_CMAKE_DIR}/../.." CONFIG_FILE "${CONFIG_FILE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake "${CONFIG_FILE}") + +vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) vcpkg_copy_pdbs() -- cgit v1.2.3 From b7201507ff154afb2471654b9a7707e92f059cb4 Mon Sep 17 00:00:00 2001 From: pravic Date: Mon, 7 Aug 2017 10:42:49 +0300 Subject: [sciter] Update to 4.0.2.5262 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index edf88da4d..c41495b51 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.0.1.1 +Version: 4.0.2-1 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index dbd13c77b..c5cfad6ea 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,9 +12,9 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_VERSION 4.0.1.1) -set(SCITER_REVISION 5caaf6f5bd408fd45c30deb873ce76ae7af53819) -set(SCITER_SHA 88d332891a98fd80200ae04a7b5cc72a6edcbc123abe8147a17ac8e4189fbc4b7ed58f7acc06a6683ec3f1ed74e133115c35599751f6a31358b911e07b602ec4) +set(SCITER_VERSION 4.0.2-1) +set(SCITER_REVISION 2d1de5b6d9da55b50168cb9069c8b12490f39d60) +set(SCITER_SHA 3d33bd0f76474b76e2281b96517c26ac1bb4b8009847499c063c0066a8e69280019c133a10967be8aaed97bbd6186023728619233dea6e7bcf1567e45cd57017) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From cebc7acf025e888f70e84f56941d267b2fbda70a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 7 Aug 2017 12:26:30 -0700 Subject: Updated version of nuget to 4.1.0 --- scripts/fetchDependency.ps1 | 10 +++++----- toolsrc/src/VcpkgPaths.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index eecd7fe5a..13799cc73 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -162,11 +162,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "nuget") { - $requiredVersion = "3.3.0" - $downloadVersion = "3.5.0" - $url = "https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe" - $downloadPath = "$downloadsDir\nuget-3.5.0\nuget.exe" - $expectedDownloadedFileHash = "399ec24c26ed54d6887cde61994bb3d1cada7956c1b19ff880f06f060c039918" + $requiredVersion = "4.1.0" + $downloadVersion = "4.1.0" + $url = "https://dist.nuget.org/win-x86-commandline/v4.1.0/nuget.exe" + $downloadPath = "$downloadsDir\nuget-4.1.0\nuget.exe" + $expectedDownloadedFileHash = "4c1de9b026e0c4ab087302ff75240885742c0faa62bd2554f913bbe1f6cb63a0" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index bc1152b9d..f3501e162 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -122,10 +122,10 @@ namespace vcpkg fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path scripts_folder) { - static constexpr std::array expected_version = {3, 3, 0}; + static constexpr std::array expected_version = {4, 1, 0}; static const std::wstring version_check_arguments = L""; - const fs::path downloaded_copy = downloads_folder / "nuget-3.5.0" / "nuget.exe"; + const fs::path downloaded_copy = downloads_folder / "nuget-4.1.0" / "nuget.exe"; const std::vector from_path = find_from_PATH(L"nuget"); std::vector candidate_paths; -- cgit v1.2.3 From 4d4dfe0e7316f0a6a1f366e944dd04d4a60f214a Mon Sep 17 00:00:00 2001 From: Neil Shipp Date: Mon, 7 Aug 2017 14:25:26 -0700 Subject: OpenBLAS-2.20 and UWP support --- ports/openblas/CONTROL | 2 +- ports/openblas/install-openblas.patch | 45 ++++++++++++++++++++-- ports/openblas/portfile.cmake | 72 ++++++++++++++++++++++++++++------- 3 files changed, 100 insertions(+), 19 deletions(-) diff --git a/ports/openblas/CONTROL b/ports/openblas/CONTROL index a816dec6a..a3a3f702f 100644 --- a/ports/openblas/CONTROL +++ b/ports/openblas/CONTROL @@ -1,3 +1,3 @@ Source: openblas -Version: v0.2.19-2 +Version: v0.2.20 Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. diff --git a/ports/openblas/install-openblas.patch b/ports/openblas/install-openblas.patch index 7beb11af9..354b593dc 100644 --- a/ports/openblas/install-openblas.patch +++ b/ports/openblas/install-openblas.patch @@ -1,9 +1,9 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index ff42643..1a013ee 100644 +index a379f549..f95a872b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -13,7 +13,7 @@ enable_language(ASM) - enable_language(C) +@@ -16,7 +16,7 @@ enable_language(C) + include(GNUInstallDirs) if(MSVC) -set(OpenBLAS_LIBNAME libopenblas) @@ -11,7 +11,7 @@ index ff42643..1a013ee 100644 else() set(OpenBLAS_LIBNAME openblas) endif() -@@ -174,6 +174,10 @@ set_target_properties(${OpenBLAS_LIBNAME} PROPERTIES +@@ -197,6 +197,10 @@ set_target_properties(${OpenBLAS_LIBNAME} PROPERTIES SOVERSION ${OpenBLAS_MAJOR_VERSION} ) @@ -22,3 +22,40 @@ index ff42643..1a013ee 100644 # TODO: Why is the config saved here? Is this necessary with CMake? #Save the config files for installation +diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake +index a7f98bfb..02ab7080 100644 +--- a/cmake/prebuild.cmake ++++ b/cmake/prebuild.cmake +@@ -37,6 +37,10 @@ + + # CPUIDEMU = ../../cpuid/table.o + ++if (NOT DEFINED BLASHELPER_BINARY_DIR) ++ set(BLASHELPER_BINARY_DIR "${PROJECT_BINARY_DIR}") ++endif () ++ + if (DEFINED CPUIDEMU) + set(EXFLAGS "-DCPUIDEMU -DVENDOR=99") + endif () +@@ -95,8 +99,8 @@ endif () + message(STATUS "Running getarch") + + # use the cmake binary w/ the -E param to run a shell command in a cross-platform way +-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT) +-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT) ++execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT) ++execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT) + + message(STATUS "GETARCH results:\n${GETARCH_MAKE_OUT}") + +@@ -121,8 +125,8 @@ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") + endif () + + # use the cmake binary w/ the -E param to run a shell command in a cross-platform way +-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT) +-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT) ++execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT) ++execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT) + + # append config data from getarch_2nd to the TARGET file and read in CMake vars + file(APPEND ${TARGET_CONF} ${GETARCH2_CONF_OUT}) diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index 635d6f6fb..90d6c9c86 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -12,7 +12,6 @@ include(vcpkg_common_functions) - if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") message(FATAL_ERROR "openblas can only be built for x64 currently") endif() @@ -22,11 +21,11 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(VCPKG_LIBRARY_LINKAGE "dynamic") endif() -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openblas-0.2.19) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openblas-0.2.20) vcpkg_download_distfile(ARCHIVE - URLS "https://codeload.github.com/xianyi/OpenBLAS/zip/v0.2.19" - FILENAME "openblas-v0.2.19.zip" - SHA512 d95dcd1ca5b3bdc5355969d10c22486f7e32f7dfc3a418b5d0a979d030e9f2ed242d2d78267a5896aa83d27b6041e13ee4c6694f9a589765535011eb22dad9e2 + URLS "https://codeload.github.com/xianyi/OpenBLAS/zip/v0.2.20" + FILENAME "openblas-v0.2.20.zip" + SHA512 c9cd7397bb026e3bb06c9407ad5ac26bf936258da81ac22132ceceb53c0235677e18a6046f1db8a75c8a92a614b2d156a3da89d684421a24bd283430ce55db7d ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -35,20 +34,63 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/install-openblas.patch" ) +find_program(GIT NAMES git git.cmd) + +# sed and awk are installed with git but in a different directory +get_filename_component(GIT_EXE_PATH ${GIT} DIRECTORY) +set(SED_EXE_PATH "${GIT_EXE_PATH}/../usr/bin") + # openblas require perl to generate .def for exports vcpkg_find_acquire_program(PERL) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") +set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${SED_EXE_PATH}") -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DTARGET=NEHALEM -DBUILD_WITHOUT_LAPACK=ON - # 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 +message(STATUS "woo: ${TARGET_TRIPLET} ${VCPKG_CMAKE_SYSTEM_NAME}") + +# for UWP version, must build non uwp first for helper +# binaries. +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(STATUS "Building Windows helper files") + set(TEMP_CMAKE_SYSTEM_NAME "${VCPKG_CMAKE_SYSTEM_NAME}") + set(TEMP_CMAKE_SYSTEM_VERSION "${VCPKG_CMAKE_SYSTEM_VERSION}") + set(TEMP_TARGET_TRIPLET "${TARGET_TRIPLET}") + unset(VCPKG_CMAKE_SYSTEM_NAME) + unset(VCPKG_CMAKE_SYSTEM_VERSION) + set(TARGET_TRIPLET "x64-windows") + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DTARGET=NEHALEM -DBUILD_WITHOUT_LAPACK=ON + ) + + # add just built path to environment for gen_config_h.exe, + # getarch.exe and getarch_2nd.exe + set(ENV{PATH} "$ENV{PATH};${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + + # restore target build information + set(VCPKG_CMAKE_SYSTEM_NAME "${TEMP_CMAKE_SYSTEM_NAME}") + set(VCPKG_CMAKE_SYSTEM_VERSION "${TEMP_CMAKE_SYSTEM_VERSION}") + set(TARGET_TRIPLET "${TEMP_TARGET_TRIPLET}") + + message(STATUS "Finished building Windows helper files") + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DCMAKE_SYSTEM_PROCESSOR=AMD64 -DVS_WINRT_COMPONENT=TRUE -DBUILD_WITHOUT_LAPACK=ON + "-DBLASHELPER_BINARY_DIR=${CURRENT_BUILDTREES_DIR}/x64-windows-rel") + +else() + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DTARGET=NEHALEM -DBUILD_WITHOUT_LAPACK=ON + # 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 ) +endif() + vcpkg_install_cmake() @@ -65,7 +107,9 @@ string(REPLACE "#include \"common.h\"" "#include \"openblas_common.h\"" CBLAS_H file(WRITE ${CURRENT_PACKAGES_DIR}/include/cblas.h "${CBLAS_H}") # openblas is BSD -file(COPY ${CURRENT_BUILDTREES_DIR}/src/OpenBLAS-0.2.19/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openblas) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/OpenBLAS-0.2.20/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openblas) file(RENAME ${CURRENT_PACKAGES_DIR}/share/openblas/LICENSE ${CURRENT_PACKAGES_DIR}/share/openblas/copyright) vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 5ef872a604cd9c1f067b4b5773ca2fef55c038e4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 7 Aug 2017 16:11:39 -0700 Subject: Update CHANGELOG and bump version to v0.0.82 --- CHANGELOG.md | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 205 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06b9b8fac..81fe17a47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,207 @@ +vcpkg (0.0.82) +-------------- + * Add ports: + - alembic 1.7.1-3 + - allegro5 5.2.1.0 + - angle 2017-06-14-8d471f-1 + - apr-util 1.6.0 + - arrow apache-arrow-0.4.0-1 + - aubio 0.46~alpha-2 + - aurora 2017-06-21-c75699d2a8caa726260c29b6d7a0fd35f8f28933 + - benchmark 1.1.0 + - blaze 3.1 + - brotli 0.6.0 + - c-ares 1.12.1-dev-40eb41f-1 + - ceres 1.12.0-4 + - clara 2017-07-20-9661f2b4a50895d52ebb4c59382785a2b416c310 + - corrade jun2017-2 + - cpp-redis 3.5.2 + - cppcms 1.1.0 + - cppunit 1.13.2 + - cpr 1.3.0 + - ctemplate 2017-06-23-44b7c5b918a08ad561c63e9d28beecb40c10ebca + - cunit 2.1.3-1 + - cxxopts 1.3.0 + - dirent 2017-06-23-5c7194c2fe2c68c1a8212712c0b4b6195382d27d + - draco 0.10.0 + - duktape 2.0.3-3 + - embree 2.16.4-1 + - evpp 0.6.1 + - flann 1.9.1-4 + - folly v2017.07.17.01 + - g2o 20170730_git-1 + - geogram 1.4.9 + - gsl-lite 0.24.0 + - hpx 1.0.0-4 + - hunspell 1.6.1-1 + - hwloc 1.11.7-1 + - hypre 2.11.1 + - ilmbase 2.2.0 + - jansson v2.10 + - jasper 2.0.13 + - kinectsdk1 1.8-1 + - libconfig 1.6.0 + - libmikmod 3.3.11.1 + - libopusenc 0.1 + - libssh 0.7.5 + - libtorrent 1.1.4 + - libusb 1.0.21-fc99620 + - libusb-win32 1.2.6.0 + - libzip 1.2.0-1 + - live555 2017.06.04 + - llvm 4.0.0 + - lpeg 1.0.1-2 + - luafilesystem 1.6.3 + - luajit 2.0.5 + - magnum jun2017-5 + - magnum-plugins jun2017-4 + - matio 1.5.10-1 + - minizip 1.2.11 + - msinttypes 2017-06-26-f9e7c5758ed9e3b9f4b2394de1881c704dd79de0 + - nuklear 2017-06-15-5c7194c2fe2c68c1a8212712c0b4b6195382d27d + - ode 0.15.1 + - openexr 2.2.0 + - openimageio 1.7.15 + - openni2 2.2.0.33 + - opusfile 0.9 + - osg 3.5.6 + - paho-mqtt Version 1.1.0 (Paho 1.2) + - plibsys 0.0.3 + - podofo 0.9.5 + - ptex 2.1.28 + - pystring 1.1.3 + - python3 3.6.1 + - qhull 2015.2 + - qscintilla 2.10-1 + - redshell 1.0.0 + - rocksdb 2017-06-28-18c63af6ef2b9f014c404b88488ae52e6fead03c + - rtmidi 2.1.1-1 + - rttr 0.9.5 + - sciter 4.0.2-1 + - sdl2-gfx 1.0.3-1 + - snappy 1.1.6-be6dc3d + - sobjectizer 5.5.19.2 + - speex 1.2.0 + - strtk 2017.01.02-1e2960f + - suitesparse 4.5.5-2 + - sundials 2.7.0 + - tacopie 2.4.1-1 + - theia 0.7-d15154a + - thor v2.0 + - thrift 20172805-72ca60debae1d9fb35d9f0085118873669006d7f + - uriparser 0.8.4 + - utf8proc 2.1.0 + - utfz 1.2 + - wxwidgets 3.1.0-1 + * Update ports: + - apr 1.5.2 -> 1.6.2 + - assimp 3.3.1 -> 4.0.0 + - beast 1.0.0-b30 -> v84-1 + - bond 5.3.1 -> 6.0.0 + - boost 1.64-2 -> 1.64-5 + - bzip2 1.0.6 -> 1.0.6-1 + - cairo 1.15.4 -> 1.15.6 + - catch 1.9.1 -> 1.9.6 + - cereal 1.2.1 -> 1.2.2 + - chakracore 1.4.0 -> 1.4.3 + - dimcli 1.0.3 -> 2.0.0 + - dlfcn-win32 1.1.0 -> 1.1.1 + - dlib 19.4-1 -> 19.4-4 + - doctest 1.1.0 -> 1.2.0 + - double-conversion 2.0.1 -> 3.0.0 + - eigen3 3.3.3 -> 3.3.4 + - expat 2.1.1 -> 2.1.1-1 + - ffmpeg 3.2.4-2 -> 3.2.4-3 + - fftw3 3.3.6-p11 -> 3.3.6-p12 + - flatbuffers 1.6.0 -> 1.7.1 + - fltk 1.3.4-2 -> 1.3.4-4 + - fmt 3.0.1-4 -> 4.0.0 + - fontconfig 2.12.1 -> 2.12.4 + - freeglut 3.0.0 -> 3.0.0-1 + - freeimage 3.17.0-1 -> 3.17.0-2 + - freerdp 2.0.0-beta1+android11 -> 2.0.0-rc0~vcpkg1 + - freetype 2.6.3-5 -> 2.8 + - gdcm2 2.6.7 -> 2.6.8 + - gettext 0.19 -> 0.19-1 + - gflags 2.2.0-2 -> 2.2.0-4 + - glew 2.0.0-1 -> 2.0.0-2 + - gli 0.8.2 -> 0.8.2-1 + - glib 2.52.1 -> 2.52.2 + - glm 0.9.8.1 -> 0.9.8.4 + - glog 0.3.4-0472b91-1 -> 0.3.5 + - glslang 1c573fbcfba6b3d631008b1babc838501ca925d3-1 -> 1c573fbcfba6b3d631008b1babc838501ca925d3-2 + - graphicsmagick 1.3.25 -> 1.3.26 + - grpc 1.2.3 -> 1.4.1 + - gsl 2.3 -> 2.4-1 + - gtk 3.22.11 -> 3.22.15 + - harfbuzz 1.4.6 -> 1.4.6-1 + - lcms 2.8 -> 2.8-1 + - libarchive 3.3.1 -> 3.3.2 + - libbson 1.6.2 -> 1.6.2-1 + - libepoxy 1.4.1-7d58fd3 -> 1.4.3 + - libevent 2.1.8-1 -> 2.1.8-2 + - libgd 2.2.4-1 -> 2.2.4-2 + - libjpeg-turbo 1.5.1-1 -> 1.5.2 + - libogg 1.3.2 -> 2017-07-27-cab46b19847 + - libpng 1.6.28-1 -> 1.6.31 + - libraw 0.18.0-1 -> 0.18.2-2 + - libuv 1.10.1-2 -> 1.13.1 + - log4cplus 1.1.3-RC7 -> REL_1_2_1-RC2 + - lzo 2.09 -> 2.10-1 + - msgpack 2.1.1 -> 2.1.5 + - msmpi 8.0-1 -> 8.1 + - nana 1.4.1-66be23c9204c5567d1c51e6f57ba23bffa517a7c -> 1.5.4 + - openal-soft 1.17.2 -> 1.18.1 + - openblas v0.2.19-1 -> v0.2.19-2 + - opencv 3.2.0-1 -> 3.2.0-3 + - openjpeg 2.1.2-1 -> 2.1.2-2 + - openssl 1.0.2k-2 -> 1.0.2l-1 + - openvr 1.0.5 -> 1.0.9 + - opus 1.1.4 -> 1.2.1 + - pango 1.40.5-1 -> 1.40.6 + - pcre 8.40 -> 8.41 + - pdcurses 3.4 -> 3.4-1 + - portaudio 19.0.6.00 -> 19.0.6.00-1 + - protobuf 3.2.0 -> 3.3.0-3 + - pybind11 2.1.0 -> 2.1.0-1 + - qt5 5.8-1 -> 5.8-4 + - qwt 6.1.3-1 -> 6.1.3-2 + - ragel 6.9 -> 6.10 + - range-v3 20150729-vcpkg3 -> 20151130-vcpkg4 + - rxcpp 3.0.0 -> 4.0.0-1 + - sdl2 2.0.5-2 -> 2.0.5-3 + - sdl2-image 2.0.1 -> 2.0.1-1 + - sdl2-mixer 2.0.1 -> 2.0.1-1 + - sdl2-net 2.0.1 -> 2.0.1-1 + - sdl2-ttf 2.0.14 -> 2.0.14-1 + - smpeg2 2.0.0 -> 2.0.0-1 + - spdlog 0.12.0 -> 0.13.0 + - sqlite3 3.18.0-1 -> 3.19.1-1 + - taglib 1.11.1-1 -> 1.11.1-3 + - tbb 20160916 -> 2017_U7 + - think-cell-range e2d3018 -> 498839d + - tiff 4.0.7-1 -> 4.0.8 + - tinyxml2 3.0.0 -> 5.0.1 + - utfcpp 2.3.4 -> 2.3.5 + - uwebsockets 0.14.2 -> 0.14.3 + - vtk 7.1.0 -> 7.1.1-1 + - wt 3.3.7 -> 3.3.7-1 + - zstd 1.1.1 -> 1.3.0 + * `vcpkg` has exceeded 300 libraries! + * Add the following options to `vcpkg export` command: `--nuget-id`, `--nuget-version` + * Improve `vcpkg help`: + - Improve clarity + - Add `vcpkg help ` option (example: `vcpkg help export`) + - Add `vcpkg help topics` option + * `vcpkg search` now also searches in the description of ports + * Documentation has been reworked and is now also available in ReadTheDocs: https://vcpkg.readthedocs.io/ + * Bump required version & auto-downloaded version of `cmake` to 3.9.0 (was 3.8.0) + * Bump required version & auto-downloaded version of `nuget` to 4.1.0 (was 3.5.0) + * Huge number of fixes and improvements in the `vcpkg` tool + +-- vcpkg team MON, 07 Aug 2017 16:00:00 -0800 + + vcpkg (0.0.81) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index acd7a53e1..ab282ee07 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.81" \ No newline at end of file +"0.0.82" \ No newline at end of file -- cgit v1.2.3 From f80939510761f740275336bdeb95104dc44c97ca Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Tue, 8 Aug 2017 21:39:18 +0900 Subject: Update PCL 1.8.1 Update PCL 1.8.1 --- ports/pcl/CONTROL | 2 +- ports/pcl/portfile.cmake | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index f13403e9a..a92e912de 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,4 +1,4 @@ Source: pcl -Version: 1.8.1rc2 +Version: 1.8.1 Build-Depends: boost, eigen3, flann, qhull, vtk, openni2, qt5 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index 7997ca300..8010d9c70 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -15,8 +15,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO PointCloudLibrary/pcl - REF pcl-1.8.1rc2 - SHA512 e5bf069f0eacfaf068b37cb0d17bed65a83dddc30c0eaa2ef70bbc534ab1cfc690e581913cd39df6246ba73b5f76fb229d90e0c5b4971744f341f7d2abb57229 + REF pcl-1.8.1 + SHA512 9e7c87fb750a176712f08d215a906012c9e8174b687bbc8c08fa65de083b4468951bd8017b10409015d5eff0fc343885d2aae5c340346118b1a251af7bdd5cd7 HEAD_REF master ) @@ -29,23 +29,23 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/find_openni2.patch" ) -if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") - set(CRT_LINKAGE ON) -elseif(VCPKG_CRT_LINKAGE STREQUAL "static") - set(CRT_LINKAGE OFF) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(LIBRARY_LINKAGE ON) +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(LIBRARY_LINKAGE OFF) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - #PREFER_NINJA + PREFER_NINJA OPTIONS # BUILD -DBUILD_surface_on_nurbs=ON -DBUILD_tools=OFF # PCL - -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${CRT_LINKAGE} - -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${CRT_LINKAGE} - -DPCL_SHARED_LIBS=${CRT_LINKAGE} + -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${LIBRARY_LINKAGE} + -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${LIBRARY_LINKAGE} + -DPCL_SHARED_LIBS=${LIBRARY_LINKAGE} # WITH -DWITH_CUDA=OFF -DWITH_LIBUSB=OFF -- cgit v1.2.3 From e3a31b6e37fe03852ed26ac80ac412574a4bffe2 Mon Sep 17 00:00:00 2001 From: veggiesaurus Date: Tue, 8 Aug 2017 17:09:28 +0200 Subject: x86 and x64 (dynamic & static) working --- ports/cfitsio/CONTROL | 3 +++ ports/cfitsio/portfile.cmake | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 ports/cfitsio/CONTROL create mode 100644 ports/cfitsio/portfile.cmake diff --git a/ports/cfitsio/CONTROL b/ports/cfitsio/CONTROL new file mode 100644 index 000000000..e45b8a8c2 --- /dev/null +++ b/ports/cfitsio/CONTROL @@ -0,0 +1,3 @@ +Source: cfitsio +Version: 3.410 +Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format diff --git a/ports/cfitsio/portfile.cmake b/ports/cfitsio/portfile.cmake new file mode 100644 index 000000000..2490beb80 --- /dev/null +++ b/ports/cfitsio/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cfitsio) +vcpkg_download_distfile(ARCHIVE + URLS "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3410.tar.gz" + FILENAME "cfitsio3410.tar.gz" + SHA512 b2ac31ab17e19eeeb4f1601f42f348402c0a4ab03725dbf74fe75eaabbee2f44f64f0c0ee7f0b2688bd93a9cc0dccf29f07e73b9148fff97fc78bebdbb5f6f0f +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Remove duplicate include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + # move DLLs to bin directories for dynamic builds + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/bin/cfitsio.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/debug/bin/cfitsio.dll) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cfitsio RENAME copyright) -- cgit v1.2.3 From 3e50c4e4817f7201f4e00ad0373cac828c04e294 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Tue, 8 Aug 2017 17:45:09 +0200 Subject: [hypre] update to 2.11.2 --- ports/hypre/CONTROL | 2 +- ports/hypre/fix-root-cmakelists.patch | 25 ++++++++++++++----------- ports/hypre/portfile.cmake | 8 ++++---- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/ports/hypre/CONTROL b/ports/hypre/CONTROL index 6eaef6f1a..9a96cb4d4 100644 --- a/ports/hypre/CONTROL +++ b/ports/hypre/CONTROL @@ -1,4 +1,4 @@ Source: hypre -Version: 2.11.1 +Version: 2.11.2 Description: SCALABLE LINEAR SOLVERS AND MULTIGRID METHODS Build-Depends: msmpi \ No newline at end of file diff --git a/ports/hypre/fix-root-cmakelists.patch b/ports/hypre/fix-root-cmakelists.patch index aa349b3f0..e69d6607e 100644 --- a/ports/hypre/fix-root-cmakelists.patch +++ b/ports/hypre/fix-root-cmakelists.patch @@ -1,5 +1,5 @@ ---- a/CMakeLists.txt Thu Jun 09 15:56:18 2016 -+++ b/CMakeLists.txt Wed Jan 04 18:27:54 2017 +--- a/CMakeLists.txt Mon Mar 13 21:37:24 2017 ++++ b/CMakeLists.txt Sun Aug 06 19:34:00 2017 @@ -1,6 +1,8 @@ cmake_minimum_required (VERSION 2.8.8) project (hypre) @@ -7,9 +7,9 @@ +include(GenerateExportHeader) + # The version number. - set (HYPRE_VERSION 2.11.1) - set (HYPRE_DATE 2016/06/09) -@@ -616,6 +618,8 @@ + set (HYPRE_VERSION 2.11.2) + set (HYPRE_DATE 2017/03/13) +@@ -618,6 +620,8 @@ struct_ls/sparse_msg_solve.c ) @@ -18,7 +18,7 @@ # Headers and sources: sstruct_mv list (APPEND HYPRE_HEADERS sstruct_mv/HYPRE_sstruct_mv.h -@@ -756,11 +760,11 @@ +@@ -758,11 +762,11 @@ find_package (MPI) if ((MPI_C_FOUND) AND (NOT CMAKE_C_COMPILER STREQUAL MPI_C_COMPILER)) include_directories (${MPI_C_INCLUDE_PATH}) @@ -32,14 +32,16 @@ endif () endif (NOT HYPRE_SEQUENTIAL) -@@ -802,8 +806,19 @@ - endif () +@@ -807,7 +811,23 @@ add_library (HYPRE ${HYPRE_SOURCES} ${FEI_LIBS}) -- + -install (TARGETS HYPRE DESTINATION lib) -+target_link_libraries(HYPRE ${MPI_C_LIBRARIES}) -+if(WIN32 AND BUILD_SHARED_LIBS) ++if (NOT HYPRE_SEQUENTIAL) ++ target_link_libraries(HYPRE ${MPI_C_LIBRARIES}) ++endif() ++ ++if (WIN32 AND BUILD_SHARED_LIBS) + set_target_properties(HYPRE PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + @@ -51,6 +53,7 @@ + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) ++ install (FILES ${HYPRE_HEADERS} DESTINATION include) # add_subdirectory (test EXCLUDE_FROM_ALL) diff --git a/ports/hypre/portfile.cmake b/ports/hypre/portfile.cmake index e09c9678b..a0b38216e 100644 --- a/ports/hypre/portfile.cmake +++ b/ports/hypre/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hypre-2.11.1/src) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hypre-2.11.2/src) vcpkg_download_distfile(ARCHIVE - URLS "http://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods/download/hypre-2.11.1.tar.gz" - FILENAME "hypre-2.11.1.tar.gz" - SHA512 4266c1b5225bcc97781246475100382f4929d7c918c854570a36b90602e8f111a4893cd1c93b95c68305c851898b970dd92ac173efe9211be5bb914d3c3c5d83 + URLS "http://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods/download/hypre-2.11.2.tar.gz" + FILENAME "hypre-2.11.2.tar.gz" + SHA512 a06321028121e5420fa944ce4fae5f9b96e6021ec2802e68ec3c349f19a20543ed7eff774a4735666c5807ce124eb571b3f86757c67e91faa1c683c3f657469f ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 6c900d9683e318d8fcd524110dab13ad24af3ff7 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Tue, 8 Aug 2017 17:45:59 +0200 Subject: [cereal] fix head ref --- ports/cereal/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/cereal/portfile.cmake b/ports/cereal/portfile.cmake index d70c9a6e9..47eb76c49 100644 --- a/ports/cereal/portfile.cmake +++ b/ports/cereal/portfile.cmake @@ -7,7 +7,7 @@ vcpkg_from_github( REPO USCiLab/cereal REF v1.2.2 SHA512 9567b2e19add9446b24f8afd122eea09ba6ecd1a090335cf0ab31fdc8f64c6c97daa3d9eaf0801c36a770737488e0eebf81d96d7b7a65deed30da6130f2d47eb - HEAD_REF master + HEAD_REF develop ) vcpkg_configure_cmake( -- cgit v1.2.3 From 7e0be3c9cc2d7252f6519bf9891ac48abadfa042 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Tue, 8 Aug 2017 17:48:24 +0200 Subject: [mpfr] add initial port --- ports/mpfr/CMakeLists.txt | 275 ++++++++++++++++++++++++++++++++++++++++++++++ ports/mpfr/CONTROL | 4 + ports/mpfr/portfile.cmake | 23 ++++ 3 files changed, 302 insertions(+) create mode 100644 ports/mpfr/CMakeLists.txt create mode 100644 ports/mpfr/CONTROL create mode 100644 ports/mpfr/portfile.cmake diff --git a/ports/mpfr/CMakeLists.txt b/ports/mpfr/CMakeLists.txt new file mode 100644 index 000000000..8a989ff28 --- /dev/null +++ b/ports/mpfr/CMakeLists.txt @@ -0,0 +1,275 @@ +cmake_minimum_required(VERSION 3.3.0) + +project(MPFR VERSION 3.1.5 LANGUAGES C) + +# Find GMP (or MPIR) +find_library(GMP_LIBRARY NAMES gmp mpir) +find_path(GMP_INCLUDE_DIR "gmp.h") + +set(GMP_LIBRARIES ${GMP_LIBRARY}) +set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR}) + +# Sources +set(SRCS + src/mpfr.h + src/mpf2mpfr.h + src/mpfr-gmp.h + src/mpfr-impl.h + src/mpfr-intmax.h + src/mpfr-longlong.h + src/mpfr-thread.h + src/exceptions.c + src/extract.c + src/uceil_exp2.c + src/uceil_log2.c + src/ufloor_log2.c + src/add.c + src/add1.c + src/add_ui.c + src/agm.c + src/clear.c + src/cmp.c + src/cmp_abs.c + src/cmp_si.c + src/cmp_ui.c + src/comparisons.c + src/div_2exp.c + src/div_2si.c + src/div_2ui.c + src/div.c + src/div_ui.c + src/dump.c + src/eq.c + src/exp10.c + src/exp2.c + src/exp3.c + src/exp.c + src/frac.c + src/frexp.c + src/get_d.c + src/get_exp.c + src/get_str.c + src/init.c + src/inp_str.c + src/isinteger.c + src/isinf.c + src/isnan.c + src/isnum.c + src/const_log2.c + src/log.c + src/modf.c + src/mul_2exp.c + src/mul_2si.c + src/mul_2ui.c + src/mul.c + src/mul_ui.c + src/neg.c + src/next.c + src/out_str.c + src/printf.c + src/vasprintf.c + src/const_pi.c + src/pow.c + src/pow_si.c + src/pow_ui.c + src/print_raw.c + src/print_rnd_mode.c + src/reldiff.c + src/round_prec.c + src/set.c + src/setmax.c + src/setmin.c + src/set_d.c + src/set_dfl_prec.c + src/set_exp.c + src/set_rnd.c + src/set_f.c + src/set_prc_raw.c + src/set_prec.c + src/set_q.c + src/set_si.c + src/set_str.c + src/set_str_raw.c + src/set_ui.c + src/set_z.c + src/sqrt.c + src/sqrt_ui.c + src/sub.c + src/sub1.c + src/sub_ui.c + src/rint.c + src/ui_div.c + src/ui_sub.c + src/urandom.c + src/urandomb.c + src/get_z_exp.c + src/swap.c + src/factorial.c + src/cosh.c + src/sinh.c + src/tanh.c + src/sinh_cosh.c + src/acosh.c + src/asinh.c + src/atanh.c + src/atan.c + src/cmp2.c + src/exp_2.c + src/asin.c + src/const_euler.c + src/cos.c + src/sin.c + src/tan.c + src/fma.c + src/fms.c + src/hypot.c + src/log1p.c + src/expm1.c + src/log2.c + src/log10.c + src/ui_pow.c + src/ui_pow_ui.c + src/minmax.c + src/dim.c + src/signbit.c + src/copysign.c + src/setsign.c + src/gmp_op.c + src/init2.c + src/acos.c + src/sin_cos.c + src/set_nan.c + src/set_inf.c + src/set_zero.c + src/powerof2.c + src/gamma.c + src/set_ld.c + src/get_ld.c + src/cbrt.c + src/volatile.c + src/fits_s.h + src/fits_sshort.c + src/fits_sint.c + src/fits_slong.c + src/fits_u.h + src/fits_ushort.c + src/fits_uint.c + src/fits_ulong.c + src/fits_uintmax.c + src/fits_intmax.c + src/get_si.c + src/get_ui.c + src/zeta.c + src/cmp_d.c + src/erf.c + src/inits.c + src/inits2.c + src/clears.c + src/sgn.c + src/check.c + src/sub1sp.c + src/version.c + src/mpn_exp.c + src/mpfr-gmp.c + src/mp_clz_tab.c + src/sum.c + src/add1sp.c + src/free_cache.c + src/si_op.c + src/cmp_ld.c + src/set_ui_2exp.c + src/set_si_2exp.c + src/set_uj.c + src/set_sj.c + src/get_sj.c + src/get_uj.c + src/get_z.c + src/iszero.c + src/cache.c + src/sqr.c + src/int_ceil_log2.c + src/isqrt.c + src/strtofr.c + src/pow_z.c + src/logging.c + src/mulders.c + src/get_f.c + src/round_p.c + src/erfc.c + src/atan2.c + src/subnormal.c + src/const_catalan.c + src/root.c + src/gen_inverse.h + src/sec.c + src/csc.c + src/cot.c + src/eint.c + src/sech.c + src/csch.c + src/coth.c + src/round_near_x.c + src/constant.c + src/abort_prec_max.c + src/stack_interface.c + src/lngamma.c + src/zeta_ui.c + src/set_d64.c + src/get_d64.c + src/jn.c + src/yn.c + src/rem1.c + src/get_patches.c + src/add_d.c + src/sub_d.c + src/d_sub.c + src/mul_d.c + src/div_d.c + src/d_div.c + src/li2.c + src/rec_sqrt.c + src/min_prec.c + src/buildopt.c + src/digamma.c + src/bernoulli.c + src/isregular.c + src/set_flt.c + src/get_flt.c + src/scale2.c + src/set_z_exp.c + src/ai.c + src/gammaonethird.c + src/ieee_floats.h + src/grandom.c) + +configure_file("src/mparam_h.in" "mparam.h") + +# Create and configure the target +add_library(mpfr ${SRCS}) + +# target_compile_definitions(mpfr PRIVATE HAVE_CONFIG_H) +target_compile_definitions(mpfr PRIVATE __MPFR_WITHIN_MPFR) +if(BUILD_SHARED_LIBS) + target_compile_definitions(mpfr PRIVATE __GMP_LIBGMP_DLL) +endif() + +target_link_libraries(mpfr ${GMP_LIBRARIES}) + +target_include_directories(mpfr PUBLIC ${GMP_INCLUDE_DIRS}) +target_include_directories(mpfr PRIVATE ${CMAKE_BINARY_DIR}) +target_include_directories(mpfr PRIVATE ${PROJECT_SOURCE_DIR}) +target_include_directories(mpfr PRIVATE ${PROJECT_SOURCE_DIR}/src) + +# Install +install( + TARGETS mpfr + EXPORT MPFRExports + RUNTIME DESTINATION "bin" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + ) + +install( + FILES src/mpfr.h + DESTINATION "include" +) \ No newline at end of file diff --git a/ports/mpfr/CONTROL b/ports/mpfr/CONTROL new file mode 100644 index 000000000..16224d73b --- /dev/null +++ b/ports/mpfr/CONTROL @@ -0,0 +1,4 @@ +Source: mpfr +Version: 3.1.5 +Description: The MPFR library is a C library for multiple-precision floating-point computations with correct rounding +Build-Depends: mpir \ No newline at end of file diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake new file mode 100644 index 000000000..6a61d4038 --- /dev/null +++ b/ports/mpfr/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpfr-3.1.5) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.mpfr.org/mpfr-current/mpfr-3.1.5.tar.xz" + FILENAME "mpfr-3.1.5.tar.xz" + SHA512 3643469b9099b31e41d6ec9158196cd1c30894030c8864ee5b1b1e91b488bccbf7c263c951b03fe9f4ae6f9d29279e157a7dfed0885467d875f107a3d964f032 +) + +vcpkg_extract_source_archive(${ARCHIVE}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpfr) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/mpfr/COPYING ${CURRENT_PACKAGES_DIR}/share/mpfr/copyright) -- cgit v1.2.3 From 614218c18cdc361a394a06180a7b646d42b9843c Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Tue, 8 Aug 2017 17:56:09 +0200 Subject: [vtk] reenable patch to disable a FindHDF5 workaround --- ports/vtk/disable-workaround-findhdf5.patch | 21 +++++++++++++++++++++ ports/vtk/portfile.cmake | 6 ++++++ 2 files changed, 27 insertions(+) create mode 100644 ports/vtk/disable-workaround-findhdf5.patch diff --git a/ports/vtk/disable-workaround-findhdf5.patch b/ports/vtk/disable-workaround-findhdf5.patch new file mode 100644 index 000000000..004397048 --- /dev/null +++ b/ports/vtk/disable-workaround-findhdf5.patch @@ -0,0 +1,21 @@ +--- a/CMake/vtkModuleMacros.cmake Mon Jun 26 15:29:04 2017 ++++ b/CMake/vtkModuleMacros.cmake Tue Aug 08 17:54:03 2017 +@@ -893,18 +893,6 @@ + set(vtk${_lower}_LIBRARIES "${${_upper_pkg_name}_LIBRARIES}") + endif() + +- #a workaround for bad FindHDF5 behavior in which deb or opt can +- #end up empty. cmake >= 2.8.12.2 makes this unnecessary +- string(REGEX MATCH "debug;.*optimized;.*" +- _remove_deb_opt "${vtk${_lower}_LIBRARIES}") +- if (_remove_deb_opt) +- set(_tmp ${vtk${_lower}_LIBRARIES}) +- list(REMOVE_ITEM _tmp "debug") +- list(REMOVE_ITEM _tmp "optimized") +- list(REMOVE_DUPLICATES _tmp) +- set(vtk${_lower}_LIBRARIES ${_tmp}) +- endif() +- + set(vtk${_lower}_INCLUDE_DIRS "") + else() + if(_nolibs) diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 26cbb3d45..0e6e551f2 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -8,6 +8,12 @@ vcpkg_from_github( HEAD_REF "master" ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch +) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) list(APPEND ADDITIONAL_OPTIONS "-DVTK_EXTERNAL_HDF5_IS_SHARED=ON") endif() -- cgit v1.2.3 From 890ed6172521f6b24b1233c4bb45c64a186515c5 Mon Sep 17 00:00:00 2001 From: Neil Shipp Date: Tue, 8 Aug 2017 10:18:31 -0700 Subject: Remove debug code --- ports/openblas/portfile.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index 90d6c9c86..42ba59d27 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -45,8 +45,6 @@ vcpkg_find_acquire_program(PERL) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${SED_EXE_PATH}") -message(STATUS "woo: ${TARGET_TRIPLET} ${VCPKG_CMAKE_SYSTEM_NAME}") - # for UWP version, must build non uwp first for helper # binaries. if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -- cgit v1.2.3 From cbc615244f65c5a424b5ffce7e4a2d41bbabf0aa Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Tue, 8 Aug 2017 21:23:22 +0200 Subject: Fix the required CMake version mentioned in the readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c16483955..0cd002e23 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Prerequisites: - Windows 10, 8.1, or 7 - Visual Studio 2017 or Visual Studio 2015 Update 3 - Git -- *Optional: CMake 3.8.0* +- *Optional: CMake 3.9.0* Clone this repository, then run ``` -- cgit v1.2.3 From 247497e04d40c5a9a15e22bad32a9e23860f9b4b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 8 Aug 2017 13:50:34 -0700 Subject: [libkml] Prefer the ninja generator --- ports/libkml/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/libkml/portfile.cmake b/ports/libkml/portfile.cmake index 5d2f014f8..cb07e271f 100644 --- a/ports/libkml/portfile.cmake +++ b/ports/libkml/portfile.cmake @@ -16,6 +16,7 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() -- cgit v1.2.3 From 7b33a26c89bb6983f3f1512beeeb2c29686462d9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 8 Aug 2017 13:59:01 -0700 Subject: [minizip] Bump version to include minizip/crypt.h --- ports/minizip/CONTROL | 2 +- ports/minizip/portfile.cmake | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/minizip/CONTROL b/ports/minizip/CONTROL index e4a5daee2..b3023e990 100644 --- a/ports/minizip/CONTROL +++ b/ports/minizip/CONTROL @@ -1,4 +1,4 @@ Source: minizip -Version: 1.2.11 +Version: 1.2.11-1 Description: Build-Depends: bzip2, zlib diff --git a/ports/minizip/portfile.cmake b/ports/minizip/portfile.cmake index c0ed49486..f12e3329b 100644 --- a/ports/minizip/portfile.cmake +++ b/ports/minizip/portfile.cmake @@ -24,5 +24,11 @@ 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() file(INSTALL ${SOURCE_PATH}/contrib/minizip/MiniZip64_info.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/minizip RENAME copyright) -- cgit v1.2.3 From d5659ea88d6bfa656f82d22f2cd186fe2ebb3b27 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 8 Aug 2017 14:00:03 -0700 Subject: [vcpkg] Improve error messages during Binary Paragraph parsing --- toolsrc/src/BinaryParagraph.cpp | 4 +++- toolsrc/src/SourceParagraph.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp index b6f3e8a87..49e9d58e5 100644 --- a/toolsrc/src/BinaryParagraph.cpp +++ b/toolsrc/src/BinaryParagraph.cpp @@ -56,8 +56,10 @@ namespace vcpkg this->default_features = parse_comma_list(parser.optional_field(Fields::DEFAULTFEATURES)); } - if (auto err = parser.error_info(this->spec.name())) + if (auto err = parser.error_info(this->spec.to_string())) { + System::println( + System::Color::error, "Error: while parsing the Binary Paragraph for %s", this->spec.to_string()); print_error_message(err); Checks::exit_fail(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 9289edb38..a34167db7 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -54,7 +54,7 @@ namespace vcpkg if (!error_info->extra_fields.empty()) { System::println(System::Color::error, - "Error: There are invalid fields in the Source Paragraph of %s", + "Error: There are invalid fields in the control file of %s", error_info->name); System::println("The following fields were not expected:\n\n %s\n", Strings::join("\n ", error_info->extra_fields)); @@ -74,7 +74,7 @@ namespace vcpkg if (!error_info->missing_fields.empty()) { System::println(System::Color::error, - "Error: There are missing fields in the Source Paragraphs of %s", + "Error: There are missing fields in the control file of %s", error_info->name); System::println("The following fields were missing:\n\n %s\n", Strings::join("\n ", error_info->missing_fields)); -- cgit v1.2.3 From 17033cc0c63d913a56f8c66c97cc73d2d4372b63 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 8 Aug 2017 14:26:13 -0700 Subject: update opencv to 3.3.0 --- ports/opencv/CONTROL | 8 ++++---- ports/opencv/portfile.cmake | 50 ++++++++++++++++++++++----------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 7dbaf64c2..9360d64ed 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,6 +1,6 @@ Source: opencv -Version: 3.2.0-3 -Build-Depends: zlib, libpng, libjpeg-turbo, tiff -#Use the following line instead for optional features from OpenCV-contrib that require protobuf -#Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf +Version: 3.3.0 +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, vtk, protobuf, ceres +# Uncomment the following line if building without opencv_contrib is desired +# Build-Depends: zlib, libpng, libjpeg-turbo, tiff, vtk Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 3323fb0f4..4e946a463 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -3,11 +3,11 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) set(VCPKG_LIBRARY_LINKAGE dynamic) endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/opencv-3.2.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/opencv-3.3.0) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/opencv/opencv/archive/3.2.0.zip" - FILENAME "opencv-3.2.0.zip" - SHA512 c6418d2a7654fe9d50611e756778df4c6736f2de76b85773efbf490bb475dd95ec1041fe57a87163ce11a7db44430cd378c8416af3319f979ced92532bf5ebb5 + URLS "https://github.com/opencv/opencv/archive/3.3.0.zip" + FILENAME "opencv-3.3.0.zip" + SHA512 14430c6225926e5118daccb57c7276d9f9160c90a034b2c73a09b73ac90ba7ebd3ae78cccffb4a10b58bb0e5e16ebd03bf617030fa74cc67d9d18366bf6b4951 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -19,19 +19,19 @@ vcpkg_apply_patches( ) file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libpng ${SOURCE_PATH}/3rdparty/zlib ${SOURCE_PATH}/3rdparty/libtiff) -# Uncomment the following lines and the lines under OPTIONS to build opencv_contrib -# Important: after uncommenting you've add protobuf dependency within CONTROL file -#SET(CONTRIB_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/opencv_contrib-3.2.0) -#vcpkg_download_distfile(CONTRIB_ARCHIVE -# URLS "https://github.com/opencv/opencv_contrib/archive/3.2.0.zip" -# FILENAME "opencv_contrib-3.2.0.zip" -# SHA512 da6cda7a7ae1d722967e18f9b8d60895b93bbc3664dfdb1645cb4d8b337a9c4207b9073fd546a596c48a489f92d15191aa34c7c607167b536fbe4937b8424b43 -#) -#vcpkg_extract_source_archive(${CONTRIB_ARCHIVE}) -#vcpkg_apply_patches( -# SOURCE_PATH ${CONTRIB_SOURCE_PATH} -# PATCHES "${CMAKE_CURRENT_LIST_DIR}/open_contrib-remove-waldboost.patch" -#) +# Comment out the following 11 lines if you don't want to build with opencv_contrib +# Important: remember to also update the CONTROL file +SET(CONTRIB_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/opencv_contrib-3.3.0) +vcpkg_download_distfile(CONTRIB_ARCHIVE + URLS "https://github.com/opencv/opencv_contrib/archive/3.3.0.zip" + FILENAME "opencv_contrib-3.3.0.zip" + SHA512 1c76d49689459708117acfbd0893cbfb915fbd0defff95702fb388a29d12b50fb53fbf246e64e68aa3adb347aa45ff478df5e2e8c6d9cfa57a628744bbb1bd04 +) +vcpkg_extract_source_archive(${CONTRIB_ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${CONTRIB_SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/open_contrib-remove-waldboost.patch" +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -60,11 +60,12 @@ vcpkg_configure_cmake( -DWITH_CUBLAS=OFF -DWITH_OPENCLAMDBLAS=OFF -DWITH_LAPACK=OFF + -DBUILD_opencv_dnn=OFF - # uncomment the following 3 lines to build opencv_contrib modules - #-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules - #-DBUILD_PROTOBUF=OFF - #-DUPDATE_PROTO_FILES=ON + # comment the following 3 lines if you don't want to build opencv_contrib modules + -DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules + -DBUILD_PROTOBUF=OFF + -DUPDATE_PROTO_FILES=ON OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -DINSTALL_OTHER=OFF @@ -72,13 +73,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/opencv/OpenCVModules-debug.cmake OPENCV_DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" OPENCV_DEBUG_MODULE "${OPENCV_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-debug.cmake "${OPENCV_DEBUG_MODULE}") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/opencv) file(RENAME ${CURRENT_PACKAGES_DIR}/share/opencv/LICENSE ${CURRENT_PACKAGES_DIR}/share/opencv/copyright) +file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) vcpkg_copy_pdbs() -- cgit v1.2.3 From 35e53e4b90a1bfa444f45bc596ecb18565f63620 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 8 Aug 2017 15:00:28 -0700 Subject: [msmpi] Fix installation when path contains spaces --- ports/msmpi/portfile.cmake | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ports/msmpi/portfile.cmake b/ports/msmpi/portfile.cmake index 59d61385d..ca841313e 100644 --- a/ports/msmpi/portfile.cmake +++ b/ports/msmpi/portfile.cmake @@ -34,7 +34,7 @@ if(EXISTS ${SYSTEM_MPIEXEC_FILEPATH}) if(${MPIEXEC_OUTPUT} MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)\\]") if(NOT ${CMAKE_MATCH_1} STREQUAL ${MSMPI_EXPECTED_FULL_VERSION}) download_msmpi_redistributable_package() - + message(FATAL_ERROR " The version of the installed MSMPI redistributable packages does not match the version to be installed\n" " Expected version: ${MSMPI_EXPECTED_FULL_VERSION}\n" @@ -65,8 +65,15 @@ file(TO_NATIVE_PATH "${SDK_ARCHIVE}" SDK_ARCHIVE) file(TO_NATIVE_PATH "${SOURCE_PATH}/sdk" SDK_SOURCE_DIR) file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/msiexec-${TARGET_TRIPLET}.log" MSIEXEC_LOG_PATH) +set(PARAM_MSI "/a \"${SDK_ARCHIVE}\"") +set(PARAM_LOG "/log \"${MSIEXEC_LOG_PATH}\"") +set(PARAM_TARGET_DIR "TARGETDIR=\"${SDK_SOURCE_DIR}\"") +set(SCRIPT_FILE ${CURRENT_BUILDTREES_DIR}/msiextract-msmpi.bat) +# Write the command out to a script file and run that to avoid weird escaping behavior when spaces are present +file(WRITE ${SCRIPT_FILE} "msiexec ${PARAM_MSI} /qn ${PARAM_LOG} ${PARAM_TARGET_DIR}") + vcpkg_execute_required_process( - COMMAND msiexec /a ${SDK_ARCHIVE} /qn TARGETDIR=${SDK_SOURCE_DIR} /log "${MSIEXEC_LOG_PATH}" + COMMAND ${SCRIPT_FILE} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} LOGNAME extract-sdk ) -- cgit v1.2.3 From 7399ea0d6ee6095266c8aa7d4c7706c53e30e5d1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 8 Aug 2017 15:10:54 -0700 Subject: [jemalloc] Update to use vcpkg_from_github. Avoid adding config scripts that are not present in upstream. Rename DLLs to 'jemalloc' to match expectations elsewhere. --- ports/jemalloc/CONTROL | 2 +- ports/jemalloc/fix-cmakelists.patch | 43 ++++++++++++++++++++++++++----- ports/jemalloc/portfile.cmake | 50 +++++++++++-------------------------- 3 files changed, 52 insertions(+), 43 deletions(-) diff --git a/ports/jemalloc/CONTROL b/ports/jemalloc/CONTROL index e3c808657..c867b4573 100644 --- a/ports/jemalloc/CONTROL +++ b/ports/jemalloc/CONTROL @@ -1,4 +1,4 @@ Source: jemalloc -Version: 4.3.1 +Version: 4.3.1-1 Description: jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support Build-Depends: diff --git a/ports/jemalloc/fix-cmakelists.patch b/ports/jemalloc/fix-cmakelists.patch index 0094a15f5..a19cb4050 100644 --- a/ports/jemalloc/fix-cmakelists.patch +++ b/ports/jemalloc/fix-cmakelists.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 06e83ef..17526b0 100644 +index 06e83ef..229e17a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,7 @@ option(enable-lazy-lock "Enable lazy locking (only lock when multi-threaded" OFF @@ -10,7 +10,41 @@ index 06e83ef..17526b0 100644 set (PACKAGE_NAME "jemalloc") project (${PACKAGE_NAME} C) -@@ -825,6 +826,17 @@ if(C_UTIL_INTEGRATION_DEFS) +@@ -711,12 +712,8 @@ endif() + + # The original library, delivery product + set(LIBJEMALLOCLIB jemalloc${install_suffix}) +-add_library(${LIBJEMALLOCLIB} STATIC ${C_SRCS}) +- +-# Now add shared library. Needed for integration tests +-# and a benchmark +-set(LIBJEMALLOCSO jemallocso${install_suffix}) +-add_library(${LIBJEMALLOCSO} SHARED ${C_SRCS}) ++set(LIBJEMALLOCSO ${LIBJEMALLOCLIB}) ++add_library(${LIBJEMALLOCLIB} ${C_SRCS}) + + if(WIN32) + # May want to replace /d2Zi+ to /Zo +@@ -745,8 +745,6 @@ if(WIN32) + # either impport or export which is both wrong for a static library + set_target_properties(${LIBJEMALLOCLIB} + PROPERTIES +- COMPILE_DEFINITIONS +- "JEMALLOC_EXPORT=" + CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG + ${PROJECT_BINARY_DIR}/Debug + CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE +@@ -754,6 +752,9 @@ if(WIN32) + COMPILE_PDB_NAME + ${LIBJEMALLOCLIB} + ) ++ if(NOT BUILD_SHARED_LIBS) ++ target_compile_definitions(${LIBJEMALLOCLIB} "JEMALLOC_EXPORT=") ++ endif() + + endif() + +@@ -825,6 +822,14 @@ if(C_UTIL_INTEGRATION_DEFS) "${C_UTIL_INTEGRATION_DEFS}") endif() @@ -18,17 +52,14 @@ index 06e83ef..17526b0 100644 + DESTINATION include/jemalloc) + +install(TARGETS ${LIBJEMALLOCSO} -+ EXPORT JemallocTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) -+install(EXPORT JemallocTargets NAMESPACE jemalloc:: DESTINATION share/jemalloc) -+ +if (build-tests) ################################################################## # Common source for Unit, Integration and stress test libraries set(C_TESTLIB_SRCS -@@ -1028,4 +1040,4 @@ foreach(sourcefile ${TESTS_INTEGRATION}) +@@ -1028,4 +1033,4 @@ foreach(sourcefile ${TESTS_INTEGRATION}) add_test(NAME ${exename} COMMAND ${exename}) add_dependencies(check ${exename}) endforeach(sourcefile ${TESTS_UNIT}) diff --git a/ports/jemalloc/portfile.cmake b/ports/jemalloc/portfile.cmake index 22aa76f08..3fe6fdbb7 100644 --- a/ports/jemalloc/portfile.cmake +++ b/ports/jemalloc/portfile.cmake @@ -5,52 +5,30 @@ endif() include(vcpkg_common_functions) -set(GIT_URL "https://github.com/jemalloc/jemalloc-cmake.git") -set(GIT_REF "jemalloc-cmake.4.3.1") - -if(NOT EXISTS "${DOWNLOADS}/jemalloc-cmake.git") - message(STATUS "Cloning") - vcpkg_execute_required_process( - COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/jemalloc-cmake.git - WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME clone - ) -endif() - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) - -if(NOT EXISTS "${SOURCE_PATH}/.git") - message(STATUS "Adding worktree") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) - vcpkg_execute_required_process( - COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${GIT_REF} - WORKING_DIRECTORY ${DOWNLOADS}/jemalloc-cmake.git - LOGNAME worktree - ) - message(STATUS "Patching") - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch" - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-utilities.patch" - ) -endif() - -# jemalloc uses git to get it version -find_program(GIT NAMES git git.cmd) -get_filename_component(GIT_EXE_PATH ${GIT} DIRECTORY) -set(ENV{PATH} "${GIT_EXE_PATH};$ENV{PATH}") +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jemalloc/jemalloc-cmake + REF jemalloc-cmake.4.3.1 + SHA512 e94b62ec3a53acc0ab5acb247d7646bc172108e80f592bb41c2dd50d181cbbeb33d623adf28415ffc0a0e2de3818af2dfe4c04af75ac891ef5042bc5bb186886 + HEAD_REF master +) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-utilities.patch" +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS -DGIT_FOUND=OFF -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets() - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -- cgit v1.2.3 From 68fabb939e09c55fe4fe0458157df426a6e1d5d8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 8 Aug 2017 15:51:42 -0700 Subject: [cpp-redis] Commit missing tacopie/CMakeLists.txt Fixes #1610 --- ports/cpp-redis/CONTROL | 2 +- ports/cpp-redis/tacopie/CMakeLists.txt | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 ports/cpp-redis/tacopie/CMakeLists.txt diff --git a/ports/cpp-redis/CONTROL b/ports/cpp-redis/CONTROL index 1d6a15b59..36b2e8b55 100644 --- a/ports/cpp-redis/CONTROL +++ b/ports/cpp-redis/CONTROL @@ -1,4 +1,4 @@ Source: cpp-redis -Version: 3.5.2 +Version: 3.5.2-1 Build-Depends: tacopie Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining. diff --git a/ports/cpp-redis/tacopie/CMakeLists.txt b/ports/cpp-redis/tacopie/CMakeLists.txt new file mode 100644 index 000000000..74959e2e1 --- /dev/null +++ b/ports/cpp-redis/tacopie/CMakeLists.txt @@ -0,0 +1,8 @@ +find_library(TACOPIE tacopie) +find_path(TACOPIE_H tacopie/tacopie) + +message(STATUS "TACOPIE_H: ${TACOPIE_H}") + +add_library(tacopie INTERFACE) +target_link_libraries(tacopie INTERFACE "${TACOPIE}") +target_include_directories(tacopie INTERFACE "${TACOPIE_H}") \ No newline at end of file -- cgit v1.2.3 From 6a3c13f42b6cd0b5fa2fb294368fd8f10cc6329c Mon Sep 17 00:00:00 2001 From: Neil Shipp Date: Tue, 8 Aug 2017 17:44:24 -0700 Subject: Use SOURCE_PATH for license file path --- ports/openblas/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index 42ba59d27..c437a8642 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -105,7 +105,7 @@ string(REPLACE "#include \"common.h\"" "#include \"openblas_common.h\"" CBLAS_H file(WRITE ${CURRENT_PACKAGES_DIR}/include/cblas.h "${CBLAS_H}") # openblas is BSD -file(COPY ${CURRENT_BUILDTREES_DIR}/src/OpenBLAS-0.2.20/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openblas) +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_copy_pdbs() -- cgit v1.2.3 From c8488c2d6bcb6964d578d3fed7e1453e75fabb70 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 8 Aug 2017 22:31:44 -0700 Subject: update ceres to 1.13 --- ports/ceres/CONTROL | 2 +- ports/ceres/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL index 4c8cf30a8..e323c4593 100644 --- a/ports/ceres/CONTROL +++ b/ports/ceres/CONTROL @@ -1,4 +1,4 @@ Source: ceres -Version: 1.12.0-4 +Version: 1.13.0 Build-Depends:suitesparse, eigen3, clapack, gflags, glog Description: non-linear optimization package \ No newline at end of file diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index e8a22184a..2f9d9d6e9 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -22,8 +22,8 @@ set(VCPKG_PLATFORM_TOOLSET "v140") # Force VS2015 because VS2017 compiler return vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ceres-solver/ceres-solver - REF 1.12.0 - SHA512 4b4cba5627fbd80a626e8a31d9f561d6cee1c8345970304e4b5b163a9dcadc6d636257d1046ecede00781a11229ef671ee89c3e7e6baf15f49f63f36e6a2ebe1 + REF 1.13.0 + SHA512 b548a303d1d4eeb75545551c381624879e363a2eba13cdd998fb3bea9bd51f6b9215b579d59d6133117b70d8bf35e18b983400c3d6200403210c18fcb1886ebb HEAD_REF master ) -- cgit v1.2.3 From 0f428cf897e6a4efc841ddd4ebf36f96f2078847 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 9 Aug 2017 14:46:01 +0200 Subject: [yaml-cpp] fix import macro and cmake config files --- ports/yaml-cpp/CONTROL | 2 +- ports/yaml-cpp/portfile.cmake | 59 +++++++++++++++++++++++++++---------------- 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/ports/yaml-cpp/CONTROL b/ports/yaml-cpp/CONTROL index f55ccfc4f..02490ca3a 100644 --- a/ports/yaml-cpp/CONTROL +++ b/ports/yaml-cpp/CONTROL @@ -1,3 +1,3 @@ Source: yaml-cpp -Version: 0.5.4 candidate +Version: 0.5.4-rc-1 Description: yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec. diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake index 69f838884..8d20458cb 100644 --- a/ports/yaml-cpp/portfile.cmake +++ b/ports/yaml-cpp/portfile.cmake @@ -1,38 +1,53 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/yaml-cpp-380ecb404ef99ba132154ed43dd2b84136b30b14) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/jbeder/yaml-cpp/archive/380ecb404ef99ba132154ed43dd2b84136b30b14.zip" - FILENAME "380ecb404ef99ba132154ed43dd2b84136b30b14.zip" - SHA512 7e090b53ba760f4f9a44701359fe2c30c05f1bbcd2cba78a8f9a88c651b09be6d592e65826fbacb9dd7317afbe3cd968be531b89f83e79f15cd97e9c27d17232 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jbeder/yaml-cpp + REF 380ecb404ef99ba132154ed43dd2b84136b30b14 + SHA512 36fa4432f1ee94049dc67c52c180efe1eddc7678bfc545437b0d751be1eecd94d541daabdbcb01acbb84a321f2c80d609ba2927c8458ad8499e007123ae25d4e + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA + OPTIONS + -DYAML_CPP_BUILD_TOOLS=OFF ) vcpkg_install_cmake() - vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) + +# Adjust paths and remove hardcoded ones from the config files +file(READ ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-config.cmake YAML_CONFIG) +string(REPLACE "set(YAML_CPP_INCLUDE_DIR \"\${YAML_CPP_CMAKE_DIR}/../include\")" + "set(YAML_CPP_INCLUDE_DIR \"\${YAML_CPP_CMAKE_DIR}/../../include\")" YAML_CONFIG "${YAML_CONFIG}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-config.cmake "${YAML_CONFIG}") + +file(READ ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets.cmake YAML_CONFIG) +string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")" +"get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH) +get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH) +get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" YAML_CONFIG "${YAML_CONFIG}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets.cmake "${YAML_CONFIG}") + +foreach(CONF debug release) + file(READ ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets-${CONF}.cmake YAML_CONFIG) + string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${_IMPORT_PREFIX}" YAML_CONFIG "${YAML_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets-${CONF}.cmake "${YAML_CONFIG}") +endforeach() # Remove debug include files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Remove cmake files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/CMake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMake) + +file(READ ${CURRENT_PACKAGES_DIR}/include/yaml-cpp/dll.h DLL_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "#ifdef YAML_CPP_DLL" "#if 1" DLL_H "${DLL_H}") +else() + string(REPLACE "#ifdef YAML_CPP_DLL" "#if 0" DLL_H "${DLL_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/yaml-cpp/dll.h "${DLL_H}") # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/yaml-cpp) file(RENAME ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/copyright) - -- cgit v1.2.3 From 232ab30a920d75b8a6bf0a17842f504f9556b95d Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 9 Aug 2017 21:31:51 +0200 Subject: [stb] update to lastest master --- ports/stb/CONTROL | 2 +- ports/stb/portfile.cmake | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/stb/CONTROL b/ports/stb/CONTROL index 136f8e57e..f881c1aff 100644 --- a/ports/stb/CONTROL +++ b/ports/stb/CONTROL @@ -1,3 +1,3 @@ Source: stb -Version: 1.0 +Version: 20170724-9d9f75e Description: stb single-file public domain libraries for C/C++ diff --git a/ports/stb/portfile.cmake b/ports/stb/portfile.cmake index 1c00e99db..c34294adc 100644 --- a/ports/stb/portfile.cmake +++ b/ports/stb/portfile.cmake @@ -1,12 +1,12 @@ #header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/stb-e713a69f1ea6ee1e0d55725ed0731520045a5993) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/nothings/stb/archive/e713a69f1ea6ee1e0d55725ed0731520045a5993.zip" - FILENAME "stb-e713a69f1ea6ee1e0d55725ed0731520045a5993.zip" - SHA512 28d73905e626bf286bc42e30bc50e8449912a9db5e421e09bfbd17790de1909fe9df19c96d6ad3125a6ae0947d45b11b83ee5965dab68d1eadd0c332e391400e +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nothings/stb + REF 9d9f75eb682dd98b34de08bb5c489c6c561c9fa6 + SHA512 e710385b1de9b07108c1a0628e74832e163729d95d529a6fe333156cc8e518af47e480761c2f9acd69cffbc14e477952d7e5b208708ffbd3870949dccf315b4f + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) # Put the licence file where vcpkg expects it file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/stb/README.md) -- cgit v1.2.3 From 052b34d4c5df0ade113514552621798ad0e32173 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 9 Aug 2017 13:16:09 -0700 Subject: Add text filtering in `vcpkg depend-info` --- toolsrc/src/commands_depends.cpp | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/commands_depends.cpp b/toolsrc/src/commands_depends.cpp index ccfe58e4e..2d1fb658b 100644 --- a/toolsrc/src/commands_depends.cpp +++ b/toolsrc/src/commands_depends.cpp @@ -4,16 +4,44 @@ #include "vcpkg_Commands.h" #include "vcpkg_Strings.h" #include "vcpkg_System.h" +#include "vcpkg_Util.h" namespace vcpkg::Commands::DependInfo { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string example = Commands::Help::create_example_string(R"###(depend-info)###"); - args.check_exact_arg_count(0, example); + static const std::string example = Commands::Help::create_example_string(R"###(depend-info [pat])###"); + args.check_max_arg_count(1, example); args.check_and_get_optional_command_arguments({}); - const auto source_control_files = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + std::vector> source_control_files = + Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + + if (args.command_arguments.size() == 1) + { + const std::string filter = args.command_arguments.at(0); + + Util::erase_remove_if(source_control_files, + [&](const std::unique_ptr& source_control_file) { + + const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; + + if (Strings::case_insensitive_ascii_contains(source_paragraph.name, filter)) + { + return false; + } + + for (const Dependency& dependency : source_paragraph.depends) + { + if (Strings::case_insensitive_ascii_contains(dependency.name, filter)) + { + return false; + } + } + + return true; + }); + } for (auto&& source_control_file : source_control_files) { -- cgit v1.2.3 From 8df35ffa1c152809dbbf83e31a7cf87ea723a9d9 Mon Sep 17 00:00:00 2001 From: Sergey Podobry Date: Thu, 10 Aug 2017 10:52:43 +0300 Subject: [plog] initial port of plog 1.1.3 --- ports/plog/CONTROL | 3 +++ ports/plog/portfile.cmake | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 ports/plog/CONTROL create mode 100644 ports/plog/portfile.cmake diff --git a/ports/plog/CONTROL b/ports/plog/CONTROL new file mode 100644 index 000000000..091778688 --- /dev/null +++ b/ports/plog/CONTROL @@ -0,0 +1,3 @@ +Source: plog +Version: 1.1.3 +Description: Portable, simple and extensible C++ logging library. diff --git a/ports/plog/portfile.cmake b/ports/plog/portfile.cmake new file mode 100644 index 000000000..5cc0dfbd4 --- /dev/null +++ b/ports/plog/portfile.cmake @@ -0,0 +1,17 @@ +# Header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SergiusTheBest/plog + REF 1.1.3 + SHA512 9a5a455e1942158d2802313682ed007750789a9048773302d92f2591dfac0185914dba8b67fa285fed25e54dff44e2c97c92b9e7decd39fa2bca460c03549377 + HEAD_REF master +) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/plog) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/plog/LICENSE ${CURRENT_PACKAGES_DIR}/share/plog/copyright) + +# Copy header files +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") -- cgit v1.2.3 From c344e708ec292ac8269819c2e384d7d3aef329c4 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Thu, 10 Aug 2017 11:56:23 +0200 Subject: [vtk] fix issue where release libraries are referenced from VTK debug build --- ports/vtk/CleanLibraryList.cmake | 77 ++++++++++++++++++++++++++ ports/vtk/dont-define-ssize_t.patch | 13 +++++ ports/vtk/portfile.cmake | 104 ++++++++++++++++++++++++++++++------ ports/vtk/use-fixed-find-hdf5.patch | 20 +++++++ 4 files changed, 199 insertions(+), 15 deletions(-) create mode 100644 ports/vtk/CleanLibraryList.cmake create mode 100644 ports/vtk/dont-define-ssize_t.patch create mode 100644 ports/vtk/use-fixed-find-hdf5.patch diff --git a/ports/vtk/CleanLibraryList.cmake b/ports/vtk/CleanLibraryList.cmake new file mode 100644 index 000000000..899039e44 --- /dev/null +++ b/ports/vtk/CleanLibraryList.cmake @@ -0,0 +1,77 @@ +# - A smarter replacement for list(REMOVE_DUPLICATES) for library lists +# +# Note that, in the case of cyclic link dependencies, you _do_ actually need +# a library in a list multiple times. So, only use this function when you know +# that the dependency graph is acyclic. +# +# clean_library_list( <_default>) - where +# listvar is the name of a destination variable, and the the source, and +# it is followed by either "debug", "optimized" or "general" which will be +# applied to libraries without any prefix. +# +# Removes duplicates from the list, leaving only the last instance, while +# preserving the meaning of the "optimized", "debug", and "general" labeling. +# (Libraries listed as general are listed in the result instead as optimized and +# debug) +# +# Requires CMake 2.6 or newer (uses the 'function' command) +# +# Original Author: +# 2009-2010 Ryan Pavlik +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# 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) + +if(__clean_library_list) + return() +endif() +set(__clean_library_list YES) + +function(clean_library_list _var _default) + set(_work ${${_var}}) + if(_work) + # Turn each of optimized, debug, and general into flags + # prefixed on their respective library (combining list items) + string(REGEX REPLACE "optimized;" "1CLL%O%" _work "${_work}") + string(REGEX REPLACE "debug;" "1CLL%D%" _work "${_work}") + string(REGEX REPLACE "general;" "1CLL%G%" _work "${_work}") + + # Any library that doesn't have a prefix is _default, and a general + # library is both debug and optimized so stdize it + set(_std) + foreach(_lib ${_work}) + if(NOT "${_lib}" MATCHES "^1CLL%.%") + if("${_default}" STREQUAL "optimized") + list(APPEND _std "1CLL%O%${_lib}") + elseif("${_default}" STREQUAL "debug") + list(APPEND _std "1CLL%D%${_lib}") + else() + list(APPEND _std "1CLL%D%${_lib}" "1CLL%O%${_lib}") + endif() + elseif("${_lib}" MATCHES "^1CLL%G%") + string(REPLACE "1CLL%G%" "" _justlib "${_lib}") + list(APPEND _std "1CLL%D%${_justlib}" "1CLL%O%${_justlib}") + else() + list(APPEND _std "${_lib}") + endif() + endforeach() + + # REMOVE_DUPLICATES leaves the first - so we reverse before and after + # to keep the last, instead + list(REVERSE _std) + list(REMOVE_DUPLICATES _std) + list(REVERSE _std) + + # Split list items back out again: turn prefixes into the + # library type flags. + string(REGEX REPLACE "1CLL%D%" "debug;" _std "${_std}") + string(REGEX REPLACE "1CLL%O%" "optimized;" _std "${_std}") + + # Return _std + set(${_var} ${_std} PARENT_SCOPE) + endif() +endfunction() diff --git a/ports/vtk/dont-define-ssize_t.patch b/ports/vtk/dont-define-ssize_t.patch new file mode 100644 index 000000000..ba9b5e605 --- /dev/null +++ b/ports/vtk/dont-define-ssize_t.patch @@ -0,0 +1,13 @@ +diff --git a/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in b/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in +index 0a19c41..0d92371 100644 +--- a/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in ++++ b/ThirdParty/netcdf/vtknetcdf/ncconfig.h.in +@@ -110,7 +110,7 @@ + #cmakedefine HAVE_LIBHDF5_HL + + /* Define to `int' if system doesn't define. */ +-#cmakedefine ssize_t @ssize_t@ ++/* #cmakedefine ssize_t @ssize_t@ */ + + /* Define to `int' if system doesn't define. */ + #cmakedefine ptrdiff_t @ptrdiff_t@ diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 0e6e551f2..65f2a428e 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -11,6 +11,20 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES + # Disable ssize_t because this can conflict with ssize_t that is defined on windows. + ${CMAKE_CURRENT_LIST_DIR}/dont-define-ssize_t.patch + + # We force CMake to use it's own version of the FindHDF5 module since newer versions + # shipped with CMake behave differently. E.g. the one shipped with CMake 3.9 always + # only finds the release libraries, but not the debug libraries. + # The file shipped with CMake allows us to set the libraries explicitly as it is done below. + # Maybe in the future we can disable the patch and use the new version shipped with CMake + # together with the hdf5-config.cmake that is written by HDF5 itself, but currently VTK + # disables taking the config into account explicitly. + ${CMAKE_CURRENT_LIST_DIR}/use-fixed-find-hdf5.patch + + # We disable a workaround in the VTK CMake scripts that can lead to the fact that a dependency + # will link to both, the debug and the release library. ${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch ) @@ -60,25 +74,82 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -# Remove tools from the bin directory. -# We make sure no references to the deleted files are left in the CMake config files. -file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake VTK_TARGETS_RELEASE_MODULE) -string(REPLACE "list\(APPEND _IMPORT_CHECK_FILES_FOR_vtkEncodeString" "#list(APPEND _IMPORT_CHECK_FILES_FOR_vtkEncodeString" VTK_TARGETS_RELEASE_MODULE "${VTK_TARGETS_RELEASE_MODULE}") -string(REPLACE "list\(APPEND _IMPORT_CHECK_FILES_FOR_vtkHashSource" "#list(APPEND _IMPORT_CHECK_FILES_FOR_vtkHashSource" VTK_TARGETS_RELEASE_MODULE "${VTK_TARGETS_RELEASE_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake "${VTK_TARGETS_RELEASE_MODULE}") +vcpkg_fixup_cmake_targets() -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/vtk/VTKTargets-debug.cmake VTK_TARGETS_DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" VTK_TARGETS_DEBUG_MODULE "${VTK_TARGETS_DEBUG_MODULE}") -string(REPLACE "list\(APPEND _IMPORT_CHECK_FILES_FOR_vtkEncodeString" "#list(APPEND _IMPORT_CHECK_FILES_FOR_vtkEncodeString" VTK_TARGETS_DEBUG_MODULE "${VTK_TARGETS_DEBUG_MODULE}") -string(REPLACE "list\(APPEND _IMPORT_CHECK_FILES_FOR_vtkHashSource" "#list(APPEND _IMPORT_CHECK_FILES_FOR_vtkHashSource" VTK_TARGETS_DEBUG_MODULE "${VTK_TARGETS_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake "${VTK_TARGETS_DEBUG_MODULE}") +# For VTK vcpkg_fixup_cmake_targets is not enough: +# Files for system third party dependencies are written to modules that +# are located in the paths `share/vtk/Modules` and `debug/share/vtk/Modules`. +# In the release folder, only the release libraries are referenced (e.g. "C:/vcpkg/installed/x64-windows/lib/zlib.lib"). +# But in the debug folder both libraries (e.g. "optimized;C:/vcpkg/installed/x64-windows/lib/zlib.lib;debug;C:/vcpkg/installed/x64-windows/debug/lib/zlibd.lib") +# or only the debug library (e.g. "C:/vcpkg/installed/x64-windows/debug/lib/hdf5_D.lib") is referenced. +# This is because VCPKG appends only the release library prefix (.../x64-windows/lib) +# when configuring release but both (.../x64-windows/lib and .../x64-windows/debug/lib) +# when configuring debug. +# Now if we delete the debug/share/Modules folder and just leave share/Modules, a library +# that links to VTK will always use the release third party dependencies, even if +# debug VTK is used. +# +# The following code merges the libraries from both release and debug: -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +include(${CMAKE_CURRENT_LIST_DIR}/CleanLibraryList.cmake) + +function(_vtk_combine_third_party_libraries MODULE_NAME) + set(MODULE_LIBRARIES_REGEX "set\\(${MODULE_NAME}_LIBRARIES \"([^\"]*)\"\\)") + + # Read release libraries + file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/${MODULE_NAME}.cmake" RELEASE_MODULE_CONTENT) + if("${RELEASE_MODULE_CONTENT}" MATCHES "${MODULE_LIBRARIES_REGEX}") + set(RELEASE_LIBRARY_LIST "${CMAKE_MATCH_1}") + clean_library_list(RELEASE_LIBRARY_LIST "optimized") + else() + message(FATAL_ERROR "Could not extract module libraries for ${MODULE_NAME}") + endif() + + # Read debug libraries + file(READ "${CURRENT_PACKAGES_DIR}/debug/share/vtk/Modules/${MODULE_NAME}.cmake" DEBUG_MODULE_CONTENT) + if("${DEBUG_MODULE_CONTENT}" MATCHES "${MODULE_LIBRARIES_REGEX}") + set(DEBUG_LIBRARY_LIST "${CMAKE_MATCH_1}") + clean_library_list(DEBUG_LIBRARY_LIST "debug") + else() + message(FATAL_ERROR "Could not extract module libraries for ${MODULE_NAME}") + endif() + + # Combine libraries + set(LIBRARY_LIST ${RELEASE_LIBRARY_LIST} ${DEBUG_LIBRARY_LIST}) + clean_library_list(LIBRARY_LIST "general") + + # Write combined libraries back + string(REGEX REPLACE "${MODULE_LIBRARIES_REGEX}" + "set(${MODULE_NAME}_LIBRARIES \"${LIBRARY_LIST}\")" + RELEASE_MODULE_CONTENT + "${RELEASE_MODULE_CONTENT}" + ) + file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/${MODULE_NAME}.cmake" "${RELEASE_MODULE_CONTENT}") +endfunction() + +# IMPORTANT: Please make sure to extend this list whenever a new library is marked `USE_SYSTEM` in the configure step above! +set(SYSTEM_THIRD_PARTY_MODULES + vtkexpat + vtkfreetype + vtkglew + vtkhdf5 + vtkjsoncpp + vtklibxml2 + vtkpng + vtktiff + vtkzlib +) + +foreach(MODULE IN LISTS SYSTEM_THIRD_PARTY_MODULES) + _vtk_combine_third_party_libraries("${MODULE}") +endforeach() + + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtkEncodeString-8.0.exe) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtkHashSource-8.0.exe) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-8.0.exe) - file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-8.0.exe) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkEncodeString-8.0.exe) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkHashSource-8.0.exe) else() @@ -87,6 +158,9 @@ else() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + # Handle copyright file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk) file(RENAME ${CURRENT_PACKAGES_DIR}/share/vtk/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/vtk/copyright) diff --git a/ports/vtk/use-fixed-find-hdf5.patch b/ports/vtk/use-fixed-find-hdf5.patch new file mode 100644 index 000000000..762a9ab07 --- /dev/null +++ b/ports/vtk/use-fixed-find-hdf5.patch @@ -0,0 +1,20 @@ +diff --git a/CMake/FindHDF5.cmake b/CMake/FindHDF5.cmake +index 6d558e39b1..9511e9a1ad 100644 +--- a/CMake/FindHDF5.cmake ++++ b/CMake/FindHDF5.cmake +@@ -3,11 +3,11 @@ + # (BUG #0014363). + + # include the default FindHDF5.cmake. +-if(CMAKE_VERSION VERSION_LESS 3.6.1) ++#if(CMAKE_VERSION VERSION_LESS 3.6.1) + include(${CMAKE_CURRENT_LIST_DIR}/NewCMake/FindHDF5.cmake) +-else() +- include(${CMAKE_ROOT}/Modules/FindHDF5.cmake) +-endif() ++#else() ++# include(${CMAKE_ROOT}/Modules/FindHDF5.cmake) ++#endif() + + if(HDF5_FOUND AND (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL)) + include(vtkMPI) -- cgit v1.2.3 From 44b34505e4674088cbfae86c68fee9eb10441472 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Thu, 10 Aug 2017 12:06:49 +0200 Subject: [vtk] Fix tools directory --- ports/vtk/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 65f2a428e..2814ccd27 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -145,9 +145,9 @@ foreach(MODULE IN LISTS SYSTEM_THIRD_PARTY_MODULES) endforeach() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtkEncodeString-8.0.exe) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtkHashSource-8.0.exe) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/vtk) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/vtkEncodeString-8.0.exe) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/vtkHashSource-8.0.exe) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkEncodeString-8.0.exe) -- cgit v1.2.3 From dd9f27100da0ca3338fbc934ce16848635338d7b Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Thu, 10 Aug 2017 15:29:42 +0200 Subject: [vtk] do not use "debug;" or "optimized;" prefixes for library configurations, but wrap them in generator expressions instead --- ports/vtk/CleanLibraryList.cmake | 77 ------------------------------ ports/vtk/SplitLibraryConfigurations.cmake | 31 ++++++++++++ ports/vtk/portfile.cmake | 19 +++++--- 3 files changed, 43 insertions(+), 84 deletions(-) delete mode 100644 ports/vtk/CleanLibraryList.cmake create mode 100644 ports/vtk/SplitLibraryConfigurations.cmake diff --git a/ports/vtk/CleanLibraryList.cmake b/ports/vtk/CleanLibraryList.cmake deleted file mode 100644 index 899039e44..000000000 --- a/ports/vtk/CleanLibraryList.cmake +++ /dev/null @@ -1,77 +0,0 @@ -# - A smarter replacement for list(REMOVE_DUPLICATES) for library lists -# -# Note that, in the case of cyclic link dependencies, you _do_ actually need -# a library in a list multiple times. So, only use this function when you know -# that the dependency graph is acyclic. -# -# clean_library_list( <_default>) - where -# listvar is the name of a destination variable, and the the source, and -# it is followed by either "debug", "optimized" or "general" which will be -# applied to libraries without any prefix. -# -# Removes duplicates from the list, leaving only the last instance, while -# preserving the meaning of the "optimized", "debug", and "general" labeling. -# (Libraries listed as general are listed in the result instead as optimized and -# debug) -# -# Requires CMake 2.6 or newer (uses the 'function' command) -# -# Original Author: -# 2009-2010 Ryan Pavlik -# http://academic.cleardefinition.com -# Iowa State University HCI Graduate Program/VRAC -# -# Copyright Iowa State University 2009-2010. -# 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) - -if(__clean_library_list) - return() -endif() -set(__clean_library_list YES) - -function(clean_library_list _var _default) - set(_work ${${_var}}) - if(_work) - # Turn each of optimized, debug, and general into flags - # prefixed on their respective library (combining list items) - string(REGEX REPLACE "optimized;" "1CLL%O%" _work "${_work}") - string(REGEX REPLACE "debug;" "1CLL%D%" _work "${_work}") - string(REGEX REPLACE "general;" "1CLL%G%" _work "${_work}") - - # Any library that doesn't have a prefix is _default, and a general - # library is both debug and optimized so stdize it - set(_std) - foreach(_lib ${_work}) - if(NOT "${_lib}" MATCHES "^1CLL%.%") - if("${_default}" STREQUAL "optimized") - list(APPEND _std "1CLL%O%${_lib}") - elseif("${_default}" STREQUAL "debug") - list(APPEND _std "1CLL%D%${_lib}") - else() - list(APPEND _std "1CLL%D%${_lib}" "1CLL%O%${_lib}") - endif() - elseif("${_lib}" MATCHES "^1CLL%G%") - string(REPLACE "1CLL%G%" "" _justlib "${_lib}") - list(APPEND _std "1CLL%D%${_justlib}" "1CLL%O%${_justlib}") - else() - list(APPEND _std "${_lib}") - endif() - endforeach() - - # REMOVE_DUPLICATES leaves the first - so we reverse before and after - # to keep the last, instead - list(REVERSE _std) - list(REMOVE_DUPLICATES _std) - list(REVERSE _std) - - # Split list items back out again: turn prefixes into the - # library type flags. - string(REGEX REPLACE "1CLL%D%" "debug;" _std "${_std}") - string(REGEX REPLACE "1CLL%O%" "optimized;" _std "${_std}") - - # Return _std - set(${_var} ${_std} PARENT_SCOPE) - endif() -endfunction() diff --git a/ports/vtk/SplitLibraryConfigurations.cmake b/ports/vtk/SplitLibraryConfigurations.cmake new file mode 100644 index 000000000..e7f4e6436 --- /dev/null +++ b/ports/vtk/SplitLibraryConfigurations.cmake @@ -0,0 +1,31 @@ + +cmake_minimum_required(VERSION 3.2.0) + +function(split_library_configurations LIBRARIES OPTIMIZED_OUT_VAR DEBUG_OUT_VAR GENERAL_OUT_VAR) + set(OPTIMIZED_LIBRARIES) + set(DEBUG_LIBRARIES) + set(GENERAL_LIBRARIES) + + set(CURRENT_TYPE) + foreach(LIBRARY ${LIBRARIES}) + message(STATUS "LIB ${LIBRARY}:") + if("${LIBRARY}" STREQUAL "optimized" OR "${LIBRARY}" STREQUAL "debug" OR "${LIBRARY}" STREQUAL "general") + set(CURRENT_TYPE "${LIBRARY}") + message(STATUS "SET CURRENT_TYPE: ${CURRENT_TYPE}") + else() + message(STATUS "ADD TO ${CURRENT_TYPE}") + if("${CURRENT_TYPE}" STREQUAL "optimized") + list(APPEND OPTIMIZED_LIBRARIES "${LIBRARY}") + elseif("${CURRENT_TYPE}" STREQUAL "debug") + list(APPEND DEBUG_LIBRARIES "${LIBRARY}") + else() + list(APPEND GENERAL_LIBRARIES "${LIBRARY}") + endif() + set(CURRENT_TYPE) + endif() + endforeach() + + set(${OPTIMIZED_OUT_VAR} "${OPTIMIZED_LIBRARIES}" PARENT_SCOPE) + set(${DEBUG_OUT_VAR} "${DEBUG_LIBRARIES}" PARENT_SCOPE) + set(${GENERAL_OUT_VAR} "${GENERAL_LIBRARIES}" PARENT_SCOPE) +endfunction() \ No newline at end of file diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 2814ccd27..bf6022f35 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -91,7 +91,7 @@ vcpkg_fixup_cmake_targets() # # The following code merges the libraries from both release and debug: -include(${CMAKE_CURRENT_LIST_DIR}/CleanLibraryList.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/SplitLibraryConfigurations.cmake) function(_vtk_combine_third_party_libraries MODULE_NAME) set(MODULE_LIBRARIES_REGEX "set\\(${MODULE_NAME}_LIBRARIES \"([^\"]*)\"\\)") @@ -100,7 +100,6 @@ function(_vtk_combine_third_party_libraries MODULE_NAME) file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/${MODULE_NAME}.cmake" RELEASE_MODULE_CONTENT) if("${RELEASE_MODULE_CONTENT}" MATCHES "${MODULE_LIBRARIES_REGEX}") set(RELEASE_LIBRARY_LIST "${CMAKE_MATCH_1}") - clean_library_list(RELEASE_LIBRARY_LIST "optimized") else() message(FATAL_ERROR "Could not extract module libraries for ${MODULE_NAME}") endif() @@ -109,14 +108,20 @@ function(_vtk_combine_third_party_libraries MODULE_NAME) file(READ "${CURRENT_PACKAGES_DIR}/debug/share/vtk/Modules/${MODULE_NAME}.cmake" DEBUG_MODULE_CONTENT) if("${DEBUG_MODULE_CONTENT}" MATCHES "${MODULE_LIBRARIES_REGEX}") set(DEBUG_LIBRARY_LIST "${CMAKE_MATCH_1}") - clean_library_list(DEBUG_LIBRARY_LIST "debug") else() message(FATAL_ERROR "Could not extract module libraries for ${MODULE_NAME}") endif() - - # Combine libraries - set(LIBRARY_LIST ${RELEASE_LIBRARY_LIST} ${DEBUG_LIBRARY_LIST}) - clean_library_list(LIBRARY_LIST "general") + + split_library_configurations("${RELEASE_LIBRARY_LIST}" OPTIMIZED_RELEASE_LIBRARIES DEBUG_RELEASE_LIBRARIES GENERAL_RELEASE_LIBRARIES) + split_library_configurations("${DEBUG_LIBRARY_LIST}" OPTIMIZED_DEBUG_LIBRARIES DEBUG_DEBUG_LIBRARIES GENERAL_DEBUG_LIBRARIES) + + # Combine libraries and wrap them in generator expressions + foreach(LIBRARY ${OPTIMIZED_RELEASE_LIBRARIES} ${GENERAL_RELEASE_LIBRARIES}) + list(APPEND LIBRARY_LIST "$<$>:${LIBRARY}>") + endforeach() + foreach(LIBRARY ${DEBUG_DEBUG_LIBRARIES} ${GENERAL_DEBUG_LIBRARIES}) + list(APPEND LIBRARY_LIST "$<$:${LIBRARY}>") + endforeach() # Write combined libraries back string(REGEX REPLACE "${MODULE_LIBRARIES_REGEX}" -- cgit v1.2.3 From 6d73c73b21c3be9a4c0b1ab4cca2622abb094362 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Thu, 10 Aug 2017 15:30:37 +0200 Subject: [vtk] remove some debug messages --- ports/vtk/SplitLibraryConfigurations.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/ports/vtk/SplitLibraryConfigurations.cmake b/ports/vtk/SplitLibraryConfigurations.cmake index e7f4e6436..fc4d87ec8 100644 --- a/ports/vtk/SplitLibraryConfigurations.cmake +++ b/ports/vtk/SplitLibraryConfigurations.cmake @@ -8,12 +8,9 @@ function(split_library_configurations LIBRARIES OPTIMIZED_OUT_VAR DEBUG_OUT_VAR set(CURRENT_TYPE) foreach(LIBRARY ${LIBRARIES}) - message(STATUS "LIB ${LIBRARY}:") if("${LIBRARY}" STREQUAL "optimized" OR "${LIBRARY}" STREQUAL "debug" OR "${LIBRARY}" STREQUAL "general") set(CURRENT_TYPE "${LIBRARY}") - message(STATUS "SET CURRENT_TYPE: ${CURRENT_TYPE}") else() - message(STATUS "ADD TO ${CURRENT_TYPE}") if("${CURRENT_TYPE}" STREQUAL "optimized") list(APPEND OPTIMIZED_LIBRARIES "${LIBRARY}") elseif("${CURRENT_TYPE}" STREQUAL "debug") -- cgit v1.2.3 From dffe4793b8f8a11687a7e6eb9cfef8a866a39479 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Thu, 10 Aug 2017 17:05:43 +0200 Subject: [vtk] Fix remaining references to release libraries from debug version of VTK --- ports/vtk/portfile.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index bf6022f35..ed5a5a6ce 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -149,7 +149,15 @@ foreach(MODULE IN LISTS SYSTEM_THIRD_PARTY_MODULES) _vtk_combine_third_party_libraries("${MODULE}") endforeach() - +# Remove all explicit references to vcpkg system libraries in the general VTKTargets.cmake file +# since these references always point to the release libraries, even in the debug case. +# The dependencies should be handled by the explicit modules we fixed above, so removing +# them here shouldn't cause any problems. +file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTENT) +string(REGEX REPLACE "${CURRENT_INSTALLED_DIR}/lib/[^\\.]*\\.lib" "" VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}") + +# Move executable to tools directory file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/vtk) file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/vtkEncodeString-8.0.exe) file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/vtkHashSource-8.0.exe) -- cgit v1.2.3 From 616cfb0eff834d5311f064db218ffb8e5e3a52ab Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Thu, 10 Aug 2017 18:20:40 +0200 Subject: [vtk] Fixed that the VTK debug was build linked against the release GLEW library --- ports/vtk/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index ed5a5a6ce..61c8903d1 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -28,6 +28,11 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch ) +# Remove the FindGLEW.cmake that is distributed with VTK, since it does not +# detect the debug libraries correctly. +# The default file distributed with CMake should be superior by all means. +file(REMOVE ${SOURCE_PATH}/CMake/FindGLEW.cmake) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) list(APPEND ADDITIONAL_OPTIONS "-DVTK_EXTERNAL_HDF5_IS_SHARED=ON") endif() -- cgit v1.2.3 From dd15e6f026fd3b55a724d57b16abeb7c0d37fa93 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Fri, 11 Aug 2017 03:07:08 +0900 Subject: Change directory structure to install the header files Fix bug when using "vcpkg integrate install" command by change directory structure to install the header files. --- ports/pcl/config.patch | 32 ++++++++++++++++++++++++++++---- ports/pcl/config_install.patch | 11 ++++++++++- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/ports/pcl/config.patch b/ports/pcl/config.patch index d95f89dac..c949f128f 100644 --- a/ports/pcl/config.patch +++ b/ports/pcl/config.patch @@ -1,5 +1,5 @@ diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in -index f4ef6a0ff..63c01c6d2 100644 +index f4ef6a0ff..3a2c259dc 100644 --- a/PCLConfig.cmake.in +++ b/PCLConfig.cmake.in @@ -155,7 +155,7 @@ macro(find_qhull) @@ -20,7 +20,7 @@ index f4ef6a0ff..63c01c6d2 100644 find_package_handle_standard_args(Flann DEFAULT_MSG FLANN_LIBRARY FLANN_INCLUDE_DIRS) if(FLANN_FOUND) -@@ -715,6 +715,7 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR) +@@ -715,25 +715,18 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR) if(WIN32 AND NOT MINGW) # PCLConfig.cmake is installed to PCL_ROOT/cmake get_filename_component(PCL_ROOT "${PCL_DIR}" PATH) @@ -28,12 +28,36 @@ index f4ef6a0ff..63c01c6d2 100644 else(WIN32 AND NOT MINGW) # PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y get_filename_component(PCL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) -@@ -725,7 +726,7 @@ if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl + endif(WIN32 AND NOT MINGW) + + # check whether PCLConfig.cmake is found into a PCL installation or in a build tree +-if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h") ++if(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") # Found a PCL installation # pcl_message("Found a PCL installation") - set(PCL_INCLUDE_DIRS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") +- set(PCL_INCLUDE_DIRS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") - set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@") +- if(EXISTS "${PCL_ROOT}/3rdParty") +- set(PCL_ALL_IN_ONE_INSTALLER ON) +- endif(EXISTS "${PCL_ROOT}/3rdParty") +-elseif(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") +- # Found a non-standard (likely ANDROID) PCL installation +- # pcl_message("Found a PCL installation") + set(PCL_INCLUDE_DIRS "${PCL_ROOT}/include") +- set(PCL_LIBRARY_DIRS "${PCL_ROOT}/lib") + set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@" "${PCL_ROOT}/debug/@LIB_INSTALL_DIR@") if(EXISTS "${PCL_ROOT}/3rdParty") set(PCL_ALL_IN_ONE_INSTALLER ON) endif(EXISTS "${PCL_ROOT}/3rdParty") +@@ -743,9 +736,9 @@ elseif(EXISTS "${PCL_DIR}/include/pcl/pcl_config.h") + set(PCL_INCLUDE_DIRS "${PCL_DIR}/include") # for pcl_config.h + set(PCL_LIBRARY_DIRS "${PCL_DIR}/@LIB_INSTALL_DIR@") + set(PCL_SOURCES_TREE "@CMAKE_SOURCE_DIR@") +-else(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h") ++else(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") + pcl_report_not_found("PCL can not be found on this machine") +-endif(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h") ++endif(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") + + #set a suffix for debug libraries + set(PCL_DEBUG_SUFFIX "@CMAKE_DEBUG_POSTFIX@") diff --git a/ports/pcl/config_install.patch b/ports/pcl/config_install.patch index fd71f8408..ae5e8257b 100644 --- a/ports/pcl/config_install.patch +++ b/ports/pcl/config_install.patch @@ -1,7 +1,16 @@ diff --git a/cmake/pcl_utils.cmake b/cmake/pcl_utils.cmake -index 69f1e76a4..ad0579200 100644 +index 69f1e76a4..37305815e 100644 --- a/cmake/pcl_utils.cmake +++ b/cmake/pcl_utils.cmake +@@ -105,7 +105,7 @@ macro(SET_INSTALL_DIRS) + endif (NOT DEFINED LIB_INSTALL_DIR) + if(NOT ANDROID) + set(INCLUDE_INSTALL_ROOT +- "include/${PROJECT_NAME_LOWER}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}") ++ "include") + else(NOT ANDROID) + set(INCLUDE_INSTALL_ROOT "include") # Android, don't put into subdir + endif(NOT ANDROID) @@ -114,7 +114,7 @@ macro(SET_INSTALL_DIRS) set(BIN_INSTALL_DIR "bin") set(PKGCFG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig") -- cgit v1.2.3 From 4a57f69e161b1dd75ada91a0910eeb0ba1141b09 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Thu, 10 Aug 2017 21:58:44 +0200 Subject: [vtk] Use libjpeg, proj and lz4 from vcpkg --- ports/vtk/CONTROL | 2 +- ports/vtk/fix-find-libproj4.patch | 68 +++++++++++++++++++++++++++++++++++++++ ports/vtk/portfile.cmake | 12 +++++-- 3 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 ports/vtk/fix-find-libproj4.patch diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index b1a06c9ad..6a95b2f37 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,4 @@ Source: vtk Version: 8.0.0 Description: Software system for 3D computer graphics, image processing, and visualization -Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi +Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj, lz4 diff --git a/ports/vtk/fix-find-libproj4.patch b/ports/vtk/fix-find-libproj4.patch new file mode 100644 index 000000000..4074d87a9 --- /dev/null +++ b/ports/vtk/fix-find-libproj4.patch @@ -0,0 +1,68 @@ +--- a/CMake/FindLIBPROJ4.cmake Thu Aug 10 21:03:55 2017 ++++ b/CMake/FindLIBPROJ4.cmake Thu Aug 10 21:08:58 2017 +@@ -11,7 +11,7 @@ + file( TO_CMAKE_PATH "$ENV{LIBPROJ4_DIR}" _LIBPROJ4_DIR ) + endif () + +- find_library( LIBPROJ4_LIBRARIES ++ find_library( LIBPROJ4_LIBRARY_RELEASE + NAMES proj + PATHS + ${_LIBPROJ4_DIR}/lib64 +@@ -24,7 +24,21 @@ + ${CMAKE_INSTALL_PREFIX}/lib + /usr/local/lib + /usr/lib +- NO_DEFAULT_PATH ++ ) ++ ++ find_library( LIBPROJ4_LIBRARY_DEBUG ++ NAMES projd ++ PATHS ++ ${_LIBPROJ4_DIR}/lib64 ++ ${CMAKE_INSTALL_PREFIX}/lib64 ++ /usr/local/lib64 ++ /usr/lib64 ++ ${_LIBPROJ4_DIR} ++ ${_LIBPROJ4_DIR}/lib ++ ${CMAKE_INSTALL_PREFIX}/bin ++ ${CMAKE_INSTALL_PREFIX}/lib ++ /usr/local/lib ++ /usr/lib + ) + + find_path( LIBPROJ4_INCLUDE_DIR +@@ -37,19 +51,22 @@ + /usr/local/include + /usr/include + /usr/include/postgresql +- NO_DEFAULT_PATH + ) + +- if ( NOT LIBPROJ4_INCLUDE_DIR OR NOT LIBPROJ4_LIBRARIES ) +- if ( LIBPROJ4_REQUIRED ) +- message( FATAL_ERROR "LIBPROJ4 is required. Set LIBPROJ4_DIR" ) +- endif () +- else () +- set( LIBPROJ4_FOUND 1 ) +- mark_as_advanced( LIBPROJ4_FOUND ) +- endif () ++ include(SelectLibraryConfigurations) ++ select_library_configurations(LIBPROJ4) ++ ++ include(FindPackageHandleStandardArgs) ++ find_package_handle_standard_args(LIBPROJ4 ++ REQUIRED_VARS LIBPROJ4_LIBRARY LIBPROJ4_INCLUDE_DIR) ++ ++ if(LIBPROJ4_FOUND) ++ set(LIBPROJ4_INCLUDE_DIRS ${LIBPROJ4_INCLUDE_DIR}) + ++ if(NOT LIBPROJ4_LIBRARIES) ++ set(LIBPROJ4_LIBRARIES ${LIBPROJ4_LIBRARY}) ++ endif() ++ endif() + endif () + +-mark_as_advanced( FORCE LIBPROJ4_INCLUDE_DIR ) +-mark_as_advanced( FORCE LIBPROJ4_LIBRARIES ) ++mark_as_advanced(LIBPROJ4_INCLUDE_DIR) diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 61c8903d1..d48715473 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -26,6 +26,8 @@ vcpkg_apply_patches( # We disable a workaround in the VTK CMake scripts that can lead to the fact that a dependency # will link to both, the debug and the release library. ${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch + + ${CMAKE_CURRENT_LIST_DIR}/fix-find-libproj4.patch ) # Remove the FindGLEW.cmake that is distributed with VTK, since it does not @@ -52,13 +54,16 @@ vcpkg_configure_cmake( -DVTK_USE_SYSTEM_EXPAT=ON -DVTK_USE_SYSTEM_FREETYPE=ON # -DVTK_USE_SYSTEM_GL2PS=ON + # -DVTK_USE_SYSTEM_LIBHARU=ON + -DVTK_USE_SYSTEM_JPEG=ON -DVTK_USE_SYSTEM_GLEW=ON -DVTK_USE_SYSTEM_HDF5=ON -DVTK_USE_SYSTEM_JSONCPP=ON - # -DVTK_USE_SYSTEM_LIBPROJ4=ON - # -DVTK_USE_SYSTEM_LIBRARIES=ON + -DVTK_USE_SYSTEM_LIBPROJ4=ON -DVTK_USE_SYSTEM_LIBXML2=ON + -DVTK_USE_SYSTEM_LZ4=ON # -DVTK_USE_SYSTEM_NETCDF=ON + # -DVTK_USE_SYSTEM_NETCDFCPP=ON # -DVTK_USE_SYSTEM_OGGTHEORA=ON -DVTK_USE_SYSTEM_PNG=ON -DVTK_USE_SYSTEM_TIFF=ON @@ -141,10 +146,13 @@ endfunction() set(SYSTEM_THIRD_PARTY_MODULES vtkexpat vtkfreetype + vtkjpeg vtkglew vtkhdf5 vtkjsoncpp + vtklibproj4 vtklibxml2 + vtklz4 vtkpng vtktiff vtkzlib -- cgit v1.2.3 From 7f5a659734e0a4a2ac01c0428e825acec2c6f54f Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Thu, 10 Aug 2017 22:05:12 +0200 Subject: [vtk] do not install headers into subdirectory "vtk-8.0" so that "vcpkg integrate install" works as excpected --- ports/vtk/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index d48715473..f5d1fdda3 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -43,6 +43,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DVTK_INSTALL_INCLUDE_DIR=include -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DVTK_Group_MPI=ON -- cgit v1.2.3 From dc064a443639300cad283b30f1070746ecbbcd0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 11 Aug 2017 00:03:15 +0200 Subject: Update Catch to 1.9.7 --- ports/catch/CONTROL | 2 +- ports/catch/portfile.cmake | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ports/catch/CONTROL b/ports/catch/CONTROL index 1c8d6b94a..3e1e1ebaf 100644 --- a/ports/catch/CONTROL +++ b/ports/catch/CONTROL @@ -1,3 +1,3 @@ Source: catch -Version: 1.9.6 +Version: 1.9.7 Description: C++ Automated Test Cases in Headers diff --git a/ports/catch/portfile.cmake b/ports/catch/portfile.cmake index 98342e052..10360187b 100644 --- a/ports/catch/portfile.cmake +++ b/ports/catch/portfile.cmake @@ -1,11 +1,10 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v1.9.6) - +set(CATCH_VERSION v1.9.7) vcpkg_download_distfile(HEADER URLS "https://github.com/philsquared/Catch/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-${CATCH_VERSION}.hpp" - SHA512 a0e4d568a5d90e72cef6ae9e741a66909235498c2901e96623892e5b323cb3bc51d55617ee6a42b30938a0cf2564323c621bd201d94eb67ba9c4fe5de65c10ee + SHA512 c61fc39d9388a45d9c601c05dafeeba0e7887476b3b28e30a6ab47cb00e062be626c12d9712caa49e0cbfa3fd7517874137a24e8c293d6dd23353ea87f9fbf5c ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From 3115c1dd300a8eef323079539f9668f26a9e0b06 Mon Sep 17 00:00:00 2001 From: Convery Date: Fri, 11 Aug 2017 02:54:37 +0200 Subject: Update CONTROL --- ports/uwebsockets/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index 6371c8ad0..4faab5bfe 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets -Version: 0.14.3 +Version: 0.14.4 Build-Depends: libuv, openssl, zlib, boost Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js -- cgit v1.2.3 From 3f7cbe9528e0c5df078dbb937d94dde34f71517e Mon Sep 17 00:00:00 2001 From: Convery Date: Fri, 11 Aug 2017 03:07:57 +0200 Subject: Update portfile.cmake --- ports/uwebsockets/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/uwebsockets/portfile.cmake b/ports/uwebsockets/portfile.cmake index 85c64c743..9c7a9d719 100644 --- a/ports/uwebsockets/portfile.cmake +++ b/ports/uwebsockets/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(VERSION 0.14.3) +set(VERSION 0.14.4) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/uwebsockets-${VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/uWebSockets/uWebSockets/archive/v${VERSION}.zip" FILENAME "uwebsockets-v${VERSION}.zip" - SHA512 a64a6ee91d411f4285deb10b9b7620b4c4a2ff0f8137864380968349f7786c406ba44644b6ca589ee41c1e5adfa1ee1cf3697e54ecf5d459ab8bf69a3a4def7e + SHA512 cc395437790a51a729582897111304e7d6c72574d59c55929a686b6a8a489eb3ea3ea7f037aeda9083243317ed885bd710a708d3dd635220387d3253e0712b10 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 199288a8f50a2839951bc51f3aaac267f5cdc1f0 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Fri, 11 Aug 2017 10:17:32 +0200 Subject: [vtk] Use system libtheora --- ports/vtk/CONTROL | 4 ++-- ports/vtk/portfile.cmake | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 6a95b2f37..652c27700 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,4 @@ Source: vtk -Version: 8.0.0 +Version: 8.0.0-1 Description: Software system for 3D computer graphics, image processing, and visualization -Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj, lz4 +Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj, lz4, libtheora diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index f5d1fdda3..ff9d457f1 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -43,7 +43,6 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DVTK_INSTALL_INCLUDE_DIR=include -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DVTK_Group_MPI=ON @@ -65,10 +64,11 @@ vcpkg_configure_cmake( -DVTK_USE_SYSTEM_LZ4=ON # -DVTK_USE_SYSTEM_NETCDF=ON # -DVTK_USE_SYSTEM_NETCDFCPP=ON - # -DVTK_USE_SYSTEM_OGGTHEORA=ON + -DVTK_USE_SYSTEM_OGGTHEORA=ON -DVTK_USE_SYSTEM_PNG=ON -DVTK_USE_SYSTEM_TIFF=ON -DVTK_USE_SYSTEM_ZLIB=ON + -DVTK_INSTALL_INCLUDE_DIR=include -DVTK_INSTALL_DATA_DIR=share/vtk/data -DVTK_INSTALL_DOC_DIR=share/vtk/doc -DVTK_INSTALL_PACKAGE_DIR=share/vtk @@ -154,6 +154,7 @@ set(SYSTEM_THIRD_PARTY_MODULES vtklibproj4 vtklibxml2 vtklz4 + vtkoggtheora vtkpng vtktiff vtkzlib -- cgit v1.2.3 From 844df491b77304b9ef51492f670c4438064b731b Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 11 Aug 2017 14:49:33 +0200 Subject: [openjpeg] update to 2.2.0 --- ports/openjpeg/CONTROL | 2 +- ports/openjpeg/portfile.cmake | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ports/openjpeg/CONTROL b/ports/openjpeg/CONTROL index 15a56452e..7a1140c10 100644 --- a/ports/openjpeg/CONTROL +++ b/ports/openjpeg/CONTROL @@ -1,3 +1,3 @@ Source: openjpeg -Version: 2.1.2-2 +Version: 2.2.0 Description: JPEG 2000 image library diff --git a/ports/openjpeg/portfile.cmake b/ports/openjpeg/portfile.cmake index 769f1410e..3f393fa97 100644 --- a/ports/openjpeg/portfile.cmake +++ b/ports/openjpeg/portfile.cmake @@ -1,17 +1,18 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openjpeg-2.1.2) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/uclouvain/openjpeg/archive/v2.1.2.zip" - FILENAME "openjpeg-2.1.2.zip" - SHA512 45518b92b2a8e7218ab3efdebe1acf0437c01ab2e4d5769da17103a76ba38a7305fb36d0ceeca0576d53c071a3482d2d3f01d6e48a569191290bfba9274ef7b4 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO uclouvain/openjpeg + REF v2.2.0 + SHA512 20651c380bee582ab1950994c424cc00061ad852e9c5438fb32a9809e3f275571a4cc7e92589add0d91debf2394262e58f441c2dd918809fc1c602ed68396a3a + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DBUILD_CODEC:BOOL=OFF -DOPENJPEG_INSTALL_PACKAGE_DIR=share/openjpeg + -DOPENJPEG_INSTALL_INCLUDE_DIR=include ) vcpkg_install_cmake() @@ -20,14 +21,14 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_fixup_cmake_targets() -file(READ ${CURRENT_PACKAGES_DIR}/include/openjpeg-2.1/openjpeg.h OPENJPEG_H) +file(READ ${CURRENT_PACKAGES_DIR}/include/openjpeg.h OPENJPEG_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") string(REPLACE "defined(OPJ_STATIC)" "1" OPENJPEG_H "${OPENJPEG_H}") else() string(REPLACE "defined(OPJ_STATIC)" "0" OPENJPEG_H "${OPENJPEG_H}") endif() string(REPLACE "defined(DLL_EXPORT)" "0" OPENJPEG_H "${OPENJPEG_H}") -file(WRITE ${CURRENT_PACKAGES_DIR}/include/openjpeg-2.1/openjpeg.h "${OPENJPEG_H}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/openjpeg.h "${OPENJPEG_H}") # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openjpeg) -- cgit v1.2.3 From 7c4aa342167f06700262118eb2570247848ce621 Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 11 Aug 2017 14:50:17 +0200 Subject: [gdal] fix build with updated openjpeg --- ports/gdal/0004-Fix-openjpeg-include.patch | 19 +++++++++++++++++++ ports/gdal/CONTROL | 2 +- ports/gdal/portfile.cmake | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ports/gdal/0004-Fix-openjpeg-include.patch diff --git a/ports/gdal/0004-Fix-openjpeg-include.patch b/ports/gdal/0004-Fix-openjpeg-include.patch new file mode 100644 index 000000000..2865455d8 --- /dev/null +++ b/ports/gdal/0004-Fix-openjpeg-include.patch @@ -0,0 +1,19 @@ +diff --git a/frmts/openjpeg/openjpegdataset.cpp b/frmts/openjpeg/openjpegdataset.cpp +index 1fd4f4f..417f7a8 100644 +--- a/frmts/openjpeg/openjpegdataset.cpp ++++ b/frmts/openjpeg/openjpegdataset.cpp +@@ -29,12 +29,8 @@ + + /* This file is to be used with openjpeg 2.0 */ + +-#if defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20100 +-#include +-#else +-#include /* openjpeg.h needs FILE* */ +-#include +-#endif ++#include ++#include + #include + + #include "gdaljp2abstractdataset.h" diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index 26ed0da1e..2182a3d35 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,4 +1,4 @@ Source: gdal -Version: 1.11.3-3 +Version: 1.11.3-4 Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. Build-Depends: proj, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 5296b6586..96fa8fa6a 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -23,6 +23,7 @@ foreach(BUILD_TYPE debug release) ${CMAKE_CURRENT_LIST_DIR}/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch ${CMAKE_CURRENT_LIST_DIR}/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch ${CMAKE_CURRENT_LIST_DIR}/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch + ${CMAKE_CURRENT_LIST_DIR}/0004-Fix-openjpeg-include.patch ) endforeach() -- cgit v1.2.3 From 8b09cb2efed9323133e54429a84be39c8c6c850f Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 11 Aug 2017 09:02:36 -0700 Subject: update make to 3.9.1 --- scripts/fetchDependency.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 13799cc73..6941ed21e 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -151,12 +151,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.9.0" - $downloadVersion = "3.9.0" - $url = "https://cmake.org/files/v3.9/cmake-3.9.0-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.9.0-win32-x86.zip" - $expectedDownloadedFileHash = "9d593839f64b94718a1b75b8519b56ecb959e4d37d406bf2a087e2c1f7a6b89c" - $executableFromDownload = "$downloadsDir\cmake-3.9.0-win32-x86\bin\cmake.exe" + $requiredVersion = "3.9.1" + $downloadVersion = "3.9.1" + $url = "https://cmake.org/files/v3.9/cmake-3.9.1-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.9.1-win32-x86.zip" + $expectedDownloadedFileHash = "e0d9501bd34e3100e925dcb2e07f5f0ce8980bdbe5fce0ae950b21368d54c1a1" + $executableFromDownload = "$downloadsDir\cmake-3.9.1-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP $extractionFolder = $downloadsDir } -- cgit v1.2.3 From 6e5ec2ff08ebb2b1e746a7f950562c50d94b01c5 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 11 Aug 2017 09:10:37 -0700 Subject: [cmake] Fix cmake path --- toolsrc/src/VcpkgPaths.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index f3501e162..38b11584a 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -98,10 +98,10 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path scripts_folder) { - static constexpr std::array expected_version = {3, 9, 0}; + static constexpr std::array expected_version = {3, 9, 1}; static const std::wstring version_check_arguments = L"--version"; - const fs::path downloaded_copy = downloads_folder / "cmake-3.9.0-win32-x86" / "bin" / "cmake.exe"; + const fs::path downloaded_copy = downloads_folder / "cmake-3.9.1-win32-x86" / "bin" / "cmake.exe"; const std::vector from_path = find_from_PATH(L"cmake"); std::vector candidate_paths; -- cgit v1.2.3 From f37acb1b21670839880e002ffc1bd4b0ba3559cb Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 11 Aug 2017 09:12:40 -0700 Subject: [cmake] change version in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0cd002e23..6b4deaff5 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Prerequisites: - Windows 10, 8.1, or 7 - Visual Studio 2017 or Visual Studio 2015 Update 3 - Git -- *Optional: CMake 3.9.0* +- *Optional: CMake 3.9.1* Clone this repository, then run ``` -- cgit v1.2.3 From ce452195c89df9f9a93e98bf27701a093d1550f1 Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 10 Aug 2017 21:43:50 +0200 Subject: [curl] update to 7.55.0 --- ports/curl/0002_fix_uwp.patch | 77 ++++++++++++++++------------------------- ports/curl/CONTROL | 2 +- ports/curl/portfile.cmake | 80 +++++++++++++++++++++++++------------------ 3 files changed, 78 insertions(+), 81 deletions(-) diff --git a/ports/curl/0002_fix_uwp.patch b/ports/curl/0002_fix_uwp.patch index 5cd0678cf..a3f227fb1 100644 --- a/ports/curl/0002_fix_uwp.patch +++ b/ports/curl/0002_fix_uwp.patch @@ -1,20 +1,20 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index ed3f38a..d6480b7 100644 +index 0caf3dc..de9fcdb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1010,7 +1010,9 @@ include(CMake/OtherTests.cmake) - add_definitions(-DHAVE_CONFIG_H) +@@ -941,7 +941,9 @@ check_symbol_exists(ioctl "${CURL_INCLUDES}" HAVE_IOCTL) + check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT) - # For windows, do not allow the compiler to use default target (Vista). + # symbol exists in win32, but function does not. -if(WIN32) +if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + add_definitions(-D_WIN32_WINNT=0x0A00 -DHAVE_STRUCT_POLLFD -D_WINSOCK_DEPRECATED_NO_WARNINGS) +elseif(WIN32) - add_definitions(-D_WIN32_WINNT=0x0501) - endif(WIN32) - + if(ENABLE_INET_PTON) + check_function_exists(inet_pton HAVE_INET_PTON) + # _WIN32_WINNT_VISTA (0x0600) diff --git a/lib/curl_gethostname.c b/lib/curl_gethostname.c -index 2591fd8..cef38ac 100644 +index 8337c72..41867b2 100644 --- a/lib/curl_gethostname.c +++ b/lib/curl_gethostname.c @@ -21,6 +21,7 @@ @@ -25,7 +25,7 @@ index 2591fd8..cef38ac 100644 #include "curl_gethostname.h" -@@ -64,9 +65,10 @@ int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) { +@@ -64,9 +65,10 @@ int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) #ifdef DEBUGBUILD /* Override host name when environment variable CURL_GETHOSTNAME is set */ @@ -38,10 +38,10 @@ index 2591fd8..cef38ac 100644 } else { diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c -index 812a073..02c8416 100644 +index aea5452..c1f59f2 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c -@@ -696,9 +696,12 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, +@@ -700,9 +700,12 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, /* Calculate the timestamp */ #ifdef DEBUGBUILD @@ -57,40 +57,23 @@ index 812a073..02c8416 100644 #endif tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000; diff --git a/lib/ftp.c b/lib/ftp.c -index b231731..d50779f 100644 +index 6e86e53..a96fe1a 100644 --- a/lib/ftp.c +++ b/lib/ftp.c -@@ -3250,7 +3250,7 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status, - ssize_t nread; - int ftpcode; - CURLcode result = CURLE_OK; -- char *path; -+ char *path = NULL; - const char *path_to_use = data->state.path; - - if(!ftp) -diff --git a/lib/smb.c b/lib/smb.c -index 7cb0c96..2f43d3c 100644 ---- a/lib/smb.c -+++ b/lib/smb.c -@@ -32,8 +32,12 @@ - - #ifdef HAVE_PROCESS_H - #include -+#if defined(CURL_WINDOWS_APP) -+#define getpid GetCurrentProcessId -+#else - #define getpid _getpid - #endif -+#endif - - #include "smb.h" - #include "urldata.h" -diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c -index 56a8823..5a895ed 100644 ---- a/lib/vtls/vtls.c -+++ b/lib/vtls/vtls.c -@@ -197,7 +197,7 @@ unsigned int Curl_rand(struct Curl_easy *data) +@@ -4292,7 +4292,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) + /* prevpath is "raw" so we convert the input path before we compare the + strings */ + size_t dlen; +- char *path; ++ char *path = NULL; + CURLcode result = + Curl_urldecode(conn->data, data->state.path, 0, &path, &dlen, FALSE); + if(result) { +diff --git a/lib/rand.c b/lib/rand.c +index 2713a0a..7da6e00 100644 +--- a/lib/rand.c ++++ b/lib/rand.c +@@ -44,7 +44,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) static bool seeded = FALSE; #ifdef CURLDEBUG @@ -98,12 +81,12 @@ index 56a8823..5a895ed 100644 + char *force_entropy = curl_getenv("CURL_ENTROPY"); if(force_entropy) { if(!seeded) { - size_t elen = strlen(force_entropy); -@@ -208,6 +208,7 @@ unsigned int Curl_rand(struct Curl_easy *data) - } + unsigned int seed = 0; +@@ -58,6 +58,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) else randseed++; + *rnd = randseed; + free(force_entropy); - return randseed; + return CURLE_OK; } #endif diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index 9ae7e7e52..320d82afb 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,4 +1,4 @@ Source: curl -Version: 7.51.0-3 +Version: 7.55.0 Build-Depends: zlib, openssl, libssh2 Description: A library for transferring data with URLs diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 35bfbd592..c00f813b2 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/curl-curl-7_51_0) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://github.com/curl/curl/archive/curl-7_51_0.tar.gz" - FILENAME "curl-7.51.0.tar.gz" - SHA512 88ec572efb1b2fb793dc26b627e54863718e774343283f0eb92022ce252f7798332d9d3f20f63e45c38576614a000abbf12570e91e14a118f150e0378f1a27e5 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO curl/curl + REF curl-7_55_0 + SHA512 7b49e7761f5864589c6cd6eb14d8e6908797c986d8bc46a3d8dc32b7bcd12d5af464259cf3f9975a4792c8e2a504f04dd071d266d2340082a31f7ee508e17d08 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} @@ -14,41 +14,40 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/0002_fix_uwp.patch ) -if (VCPKG_CRT_LINKAGE STREQUAL dynamic) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) SET(CURL_STATICLIB OFF) else() SET(CURL_STATICLIB ON) endif() +set(UWP_OPTIONS) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_TESTING=OFF - -DBUILD_CURL_EXE=OFF - -DENABLE_MANUAL=OFF - -DUSE_WIN32_LDAP=OFF - -DCURL_DISABLE_TELNET=ON - -DENABLE_IPV6=OFF - -DENABLE_UNIX_SOCKETS=OFF - -DCMAKE_USE_OPENSSL=ON - -DCURL_STATICLIB=${CURL_STATICLIB} - OPTIONS_DEBUG - -DENABLE_DEBUG=ON - ) -else() - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_TESTING=OFF - -DBUILD_CURL_EXE=OFF - -DENABLE_MANUAL=OFF - -DCURL_STATICLIB=${CURL_STATICLIB} - OPTIONS_DEBUG - -DENABLE_DEBUG=ON + set(UWP_OPTIONS + -DUSE_WIN32_LDAP=OFF + -DCURL_DISABLE_TELNET=ON + -DENABLE_IPV6=OFF + -DENABLE_UNIX_SOCKETS=OFF ) endif() +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_PATH ${PERL} DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${PERL_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${UWP_OPTIONS} + -DBUILD_TESTING=OFF + -DBUILD_CURL_EXE=OFF + -DENABLE_MANUAL=OFF + -DCURL_STATICLIB=${CURL_STATICLIB} + -DCMAKE_USE_OPENSSL=ON + OPTIONS_DEBUG + -DENABLE_DEBUG=ON +) + vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright) @@ -56,6 +55,21 @@ 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) + # Drop debug suffix, as FindCURL.cmake does not look for it + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl.lib) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/curl-config ${CURRENT_PACKAGES_DIR}/debug/bin/curl-config) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libcurl_imp.lib ${CURRENT_PACKAGES_DIR}/lib/libcurl.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d_imp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl.lib) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +file(READ ${CURRENT_PACKAGES_DIR}/include/curl/curl.h CURL_H) +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}") endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/curl/curl.h "${CURL_H}") -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() -- cgit v1.2.3 From 2cdabbf028d6b18c6dd14a84408957f87a925b67 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 11 Aug 2017 12:00:04 -0700 Subject: Update CHANGELOG and bump version to v0.0.83 --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81fe17a47..52357ed6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,33 @@ +vcpkg (0.0.83) +-------------- + * Add ports: + - fuzzylite 6.0 + - jemalloc 4.3.1-1 + - libkml 1.3.0 + - pcl 1.8.1 + - plog 1.1.3 + * Update ports: + - catch 1.9.6 -> 1.9.7 + - ceres 1.12.0-4 -> 1.13.0 + - cpp-redis 3.5.2 -> 3.5.2-1 + - gdal 1.11.3-3 -> 1.11.3-4 + - graphicsmagick 1.3.26 -> 1.3.26-1 + - hypre 2.11.1 -> 2.11.2 + - libtheora 1.1.1 -> 1.2.0alpha1-20170719~vcpkg1 + - minizip 1.2.11 -> 1.2.11-1 + - openblas v0.2.19-2 -> v0.2.20 + - openjpeg 2.1.2-2 -> 2.2.0 + - physfs 2.0.3 -> 2.0.3-1 + - stb 1.0 -> 20170724-9d9f75e + - uwebsockets 0.14.3 -> 0.14.4 + - vtk 7.1.1-1 -> 8.0.0-1 + - yaml-cpp 0.5.4 candidate -> 0.5.4-rc-1 + * Bump required version & auto-downloaded version of `cmake` to 3.9.1 (was 3.9.0) + * Fixes and improvements in the `vcpkg` tool itself + +-- vcpkg team FRI, 11 Aug 2017 12:00:00 -0800 + + vcpkg (0.0.82) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index ab282ee07..6320e715f 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.82" \ No newline at end of file +"0.0.83" \ No newline at end of file -- cgit v1.2.3 From 454cad276fe18319b2ba3084148f249f12cb26f4 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 11 Aug 2017 15:25:45 -0700 Subject: fix hdf5 compile error --- 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 ad9a5e871..f4a062981 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,3 +1,3 @@ Source: flann -Version: 1.9.1-4 +Version: 1.9.1-5 Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index ba7eca546..f1ead2ad9 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -25,6 +25,7 @@ vcpkg_configure_cmake( -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_MATLAB_BINDINGS=OFF -DCMAKE_DEBUG_POSTFIX=-gd + -DHDF5_NO_FIND_PACKAGE_CONFIG_FILE=ON ) vcpkg_install_cmake() -- cgit v1.2.3 From 8a0a99b62a61b8efffd8a5e375900c4b572f5d3f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 11 Aug 2017 15:40:06 -0700 Subject: Update required/downloaded git to 2.14.1 --- scripts/fetchDependency.ps1 | 14 +++++++------- toolsrc/src/VcpkgPaths.cpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6941ed21e..d142f57fe 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -172,16 +172,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "git") { - $requiredVersion = "2.0.0" - $downloadVersion = "2.11.1" - $url = "https://github.com/git-for-windows/git/releases/download/v2.11.1.windows.1/MinGit-2.11.1-32-bit.zip" # We choose the 32-bit version - $downloadPath = "$downloadsDir\MinGit-2.11.1-32-bit.zip" - $expectedDownloadedFileHash = "6ca79af09015625f350ef4ad74a75cfb001b340aec095b6963be9d45becb3bba" + $requiredVersion = "2.14.1" + $downloadVersion = "2.14.1" + $url = "https://github.com/git-for-windows/git/releases/download/v2.14.1.windows.1/MinGit-2.14.1-32-bit.zip" # We choose the 32-bit version + $downloadPath = "$downloadsDir\MinGit-2.14.1-32-bit.zip" + $expectedDownloadedFileHash = "77b468e0ead1e7da4cb3a1cf35dabab5210bf10457b4142f5e9430318217cdef" # There is another copy of git.exe in MinGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. - $executableFromDownload = "$downloadsDir\MinGit-2.11.1-32-bit\cmd\git.exe" + $executableFromDownload = "$downloadsDir\MinGit-2.14.1-32-bit\cmd\git.exe" $extractionType = $ExtractionType_ZIP - $extractionFolder = "$downloadsDir\MinGit-2.11.1-32-bit" + $extractionFolder = "$downloadsDir\MinGit-2.14.1-32-bit" } else { diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 38b11584a..f3513a3f3 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -143,10 +143,10 @@ namespace vcpkg fs::path get_git_path(const fs::path& downloads_folder, const fs::path scripts_folder) { - static constexpr std::array expected_version = {2, 0, 0}; + static constexpr std::array expected_version = {2, 14, 1}; static const std::wstring version_check_arguments = L"--version"; - const fs::path downloaded_copy = downloads_folder / "MinGit-2.11.1-32-bit" / "cmd" / "git.exe"; + const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.1-32-bit" / "cmd" / "git.exe"; const std::vector from_path = find_from_PATH(L"git"); std::vector candidate_paths; -- cgit v1.2.3 From 3a0ae04ee662fe2819bc7aa1e7686671d2acf4d4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 11 Aug 2017 16:09:45 -0700 Subject: Print more info when fetchDependency fails --- toolsrc/src/VcpkgPaths.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index f3513a3f3..91f5ddb0e 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -72,14 +72,21 @@ namespace vcpkg static fs::path fetch_dependency(const fs::path scripts_folder, const std::wstring& tool_name, - const fs::path& expected_downloaded_path) + const fs::path& expected_downloaded_path, + const std::array& version) { const fs::path script = scripts_folder / "fetchDependency.ps1"; auto install_cmd = System::create_powershell_script_cmd(script, Strings::wformat(L"-Dependency %s", tool_name)); System::ExitCodeAndOutput rc = System::cmd_execute_and_capture_output(install_cmd); if (rc.exit_code) { - System::println(System::Color::error, "Launching powershell failed or was denied"); + const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); + + System::println(System::Color::error, + "Launching powershell failed or was denied when trying to fetch %s version %s.\n" + "(No sufficient installed version was found)", + Strings::to_utf8(tool_name), + version_as_string); Metrics::track_property("error", "powershell install failed"); Metrics::track_property("installcmd", install_cmd); Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); @@ -117,7 +124,7 @@ namespace vcpkg return *p; } - return fetch_dependency(scripts_folder, L"cmake", downloaded_copy); + return fetch_dependency(scripts_folder, L"cmake", downloaded_copy, expected_version); } fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path scripts_folder) @@ -138,7 +145,7 @@ namespace vcpkg return *p; } - return fetch_dependency(scripts_folder, L"nuget", downloaded_copy); + return fetch_dependency(scripts_folder, L"nuget", downloaded_copy, expected_version); } fs::path get_git_path(const fs::path& downloads_folder, const fs::path scripts_folder) @@ -162,7 +169,7 @@ namespace vcpkg return *p; } - return fetch_dependency(scripts_folder, L"git", downloaded_copy); + return fetch_dependency(scripts_folder, L"git", downloaded_copy, expected_version); } Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir) -- cgit v1.2.3 From 011368ef9e1754715873eb0a298f0d069210ea6c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 11 Aug 2017 16:11:00 -0700 Subject: Take path by const& --- toolsrc/src/VcpkgPaths.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 91f5ddb0e..60204bcdd 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -70,7 +70,7 @@ namespace vcpkg return Util::fmap(Strings::split(out.output, "\n"), [](auto&& s) { return fs::path(s); }); } - static fs::path fetch_dependency(const fs::path scripts_folder, + static fs::path fetch_dependency(const fs::path& scripts_folder, const std::wstring& tool_name, const fs::path& expected_downloaded_path, const std::array& version) @@ -103,7 +103,7 @@ namespace vcpkg return actual_downloaded_path; } - static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path scripts_folder) + static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { static constexpr std::array expected_version = {3, 9, 1}; static const std::wstring version_check_arguments = L"--version"; @@ -127,7 +127,7 @@ namespace vcpkg return fetch_dependency(scripts_folder, L"cmake", downloaded_copy, expected_version); } - fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path scripts_folder) + fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { static constexpr std::array expected_version = {4, 1, 0}; static const std::wstring version_check_arguments = L""; @@ -148,7 +148,7 @@ namespace vcpkg return fetch_dependency(scripts_folder, L"nuget", downloaded_copy, expected_version); } - fs::path get_git_path(const fs::path& downloads_folder, const fs::path scripts_folder) + fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { static constexpr std::array expected_version = {2, 14, 1}; static const std::wstring version_check_arguments = L"--version"; -- cgit v1.2.3 From f1c6b5cd4b581ec8d3a1b86fe01c4444e3906b2d Mon Sep 17 00:00:00 2001 From: paercebal Date: Sat, 12 Aug 2017 10:57:56 +0200 Subject: Enable tolerance for similar configurations --- scripts/buildsystems/msbuild/vcpkg.targets | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 5c24d755a..1cb338237 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -41,10 +41,10 @@ - %(AdditionalDependencies);$(VcpkgRoot)debug\lib\*.lib - %(AdditionalDependencies);$(VcpkgRoot)lib\*.lib - %(AdditionalLibraryDirectories);$(VcpkgRoot)lib;$(VcpkgRoot)lib\manual-link - %(AdditionalLibraryDirectories);$(VcpkgRoot)debug\lib;$(VcpkgRoot)debug\lib\manual-link + %(AdditionalDependencies);$(VcpkgRoot)debug\lib\*.lib + %(AdditionalDependencies);$(VcpkgRoot)lib\*.lib + %(AdditionalLibraryDirectories);$(VcpkgRoot)lib;$(VcpkgRoot)lib\manual-link + %(AdditionalLibraryDirectories);$(VcpkgRoot)debug\lib;$(VcpkgRoot)debug\lib\manual-link %(AdditionalIncludeDirectories);$(VcpkgRoot)include @@ -63,11 +63,11 @@ - - -- cgit v1.2.3 From ee42c44b39505b9bb2718009ec4260c05fc63fbc Mon Sep 17 00:00:00 2001 From: glachancecmaisonneuve Date: Sun, 13 Aug 2017 00:08:47 -0400 Subject: chmlib --- ports/chmlib/CONTROL | 3 + ports/chmlib/chm.vcxproj | 205 ++++++++++++++++++++++++++++++++++++++++++++ ports/chmlib/portfile.cmake | 57 ++++++++++++ 3 files changed, 265 insertions(+) create mode 100644 ports/chmlib/CONTROL create mode 100644 ports/chmlib/chm.vcxproj create mode 100644 ports/chmlib/portfile.cmake diff --git a/ports/chmlib/CONTROL b/ports/chmlib/CONTROL new file mode 100644 index 000000000..22680db33 --- /dev/null +++ b/ports/chmlib/CONTROL @@ -0,0 +1,3 @@ +Source: chmlib +Version: 0.40 +Description: CHMLIB is a library for dealing with Microsoft ITSS/CHM format files. Right now, it is a very simple library, but sufficient for dealing with all of the .chm files I've come across. Due to the fairly well-designed indexing built into this particular file format, even a small library is able to gain reasonably good performance indexing into ITSS archives. \ No newline at end of file diff --git a/ports/chmlib/chm.vcxproj b/ports/chmlib/chm.vcxproj new file mode 100644 index 000000000..61955291e --- /dev/null +++ b/ports/chmlib/chm.vcxproj @@ -0,0 +1,205 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {3bafee52-fe1a-494e-ab46-89bf77ed63a7} + chmLibExe1 + chm + 10.0.14393.0 + + + + StaticLibrary + true + v141 + + + StaticLibrary + false + v141 + true + + + StaticLibrary + true + v141 + + + StaticLibrary + false + v141 + true + + + + + + + + + + + + + + + + + + + + + + ..\..\..\x86-windows-static-dbg\ + ..\..\..\x86-windows-static-dbg\ + + + + ..\..\..\x86-windows-static-rel\ + ..\..\..\x86-windows-static-rel\ + + + + ..\..\..\x64-windows-static-dbg\ + ..\..\..\x64-windows-static-dbg\ + + + + ..\..\..\x64-windows-static-rel\ + ..\..\..\x64-windows-static-rel\ + + + + Disabled + true + false + WIN32;CHM_MT;CHM_DEBUG;_CRT_SECURE_NO_WARNINGS + 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) + MultiThreadedDebug + true + CompileAsC + OldStyle + false + + + + + Console + LinkVerbose + libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib + + + true + MachineX86 + Windows + true + libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib + + + + + Disabled + true + false + WIN32;CHM_MT;CHM_DEBUG;_CRT_SECURE_NO_WARNINGS + 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) + MultiThreadedDebug + true + CompileAsC + OldStyle + false + + + + + Console + LinkVerbose + libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib + + + Windows + true + libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib + + + + + true + true + true + false + CHM_MT;WIN32;_CRT_SECURE_NO_WARNINGS + 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) + MultiThreaded + CompileAsC + + + true + true + + + Console + LinkVerbose + + + MachineX86 + Windows + true + libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib + + + + + true + true + true + false + CHM_MT;WIN32;_CRT_SECURE_NO_WARNINGS + 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) + MultiThreaded + CompileAsC + + + true + true + + + Console + LinkVerbose + + + Windows + true + libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ports/chmlib/portfile.cmake b/ports/chmlib/portfile.cmake new file mode 100644 index 000000000..cb2f2cf96 --- /dev/null +++ b/ports/chmlib/portfile.cmake @@ -0,0 +1,57 @@ +# 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) +# + +#message("VCPKG_TARGET_ARCHITECTURE" ${VCPKG_TARGET_ARCHITECTURE}) +#if(NOT ${VCPKG_TARGET_ARCHITECTURE} STREQUAL "x86") +# message(FATAL_ERROR "chmlib only supports x86") +#endif() + +if(${VCPKG_CRT_LINKAGE} STREQUAL "dynamic") + message(FATAL_ERROR "chmlib supports static linking only.") +endif() + +if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") + message(FATAL_ERROR "chmlib supports static linking only.") +endif() + +set(CHMLIB_VERSION chmlib-0.40) +set(CHMLIB_FILENAME ${CHMLIB_VERSION}.zip) +set(CHMLIB_URL http://www.jedrea.com/chmlib/${CHMLIB_FILENAME}) +set(CHMLIB_SRC ${CURRENT_BUILDTREES_DIR}/src/${CHMLIB_VERSION}/src) +include(vcpkg_common_functions) + +vcpkg_download_distfile( + ARCHIVE + URLS ${CHMLIB_URL} + FILENAME ${CHMLIB_FILENAME} + SHA512 ad3b0d49fcf99e724c0c38b9c842bae9508d0e4ad47122b0f489c113160f5344223d311abb79f25cbb0b662bb00e2925d338d60dd20a0c309bda2822cda4cd24 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY "${VCPKG_ROOT_DIR}/ports/${PORT}/chm.vcxproj" + DESTINATION ${CHMLIB_SRC}) + +vcpkg_build_msbuild( + PROJECT_PATH ${CHMLIB_SRC}/chm.vcxproj + RELEASE_CONFIGURATION Release + DEBUG_CONFIGURATION Debug + OPTIONS_DEBUG /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + OPTIONS_RELEASE /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + OPTIONS /v:diagnostic /p:SkipInvalidConfigurations=true +) + +file(INSTALL ${CHMLIB_SRC}/chm_lib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +file(COPY ${CURRENT_BUILDTREES_DIR}/src/chmlib-0.40/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/chmlib) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/chmlib/COPYING ${CURRENT_PACKAGES_DIR}/share/chmlib/copyright) \ No newline at end of file -- cgit v1.2.3 From a6099f826714918a509619453b71ac0ee4dbe8da Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 13 Aug 2017 17:21:08 -0700 Subject: update glew to 2.1.0 --- ports/glew/CONTROL | 2 +- ports/glew/portfile.cmake | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/glew/CONTROL b/ports/glew/CONTROL index 6c56fefe9..1d7fc62f5 100644 --- a/ports/glew/CONTROL +++ b/ports/glew/CONTROL @@ -1,3 +1,3 @@ Source: glew -Version: 2.0.0-2 +Version: 2.1.0 Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. \ No newline at end of file diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake index 8ca69eb5f..30f55451a 100644 --- a/ports/glew/portfile.cmake +++ b/ports/glew/portfile.cmake @@ -1,13 +1,13 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/20170423/glew-2.0.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glew/glew-2.1.0) vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://sourceforge.net/projects/glew/files/glew/snapshots/glew-20170423.tgz" - FILENAME "glew-20170423.tgz" - SHA512 2d4651196e01b4db7b210fc60505bf50ac9e37b49c8eee9c9bbfeadb4cb6f87f4c907e60e708a7371ff4b7596bee51ed35a76fba76f9a13a1f32f123121f1350 + URLS "https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.tgz" + FILENAME "glew-2.1.0.tgz" + SHA512 9a9b4d81482ccaac4b476c34ed537585ae754a82ebb51c3efa16d953c25cc3931be46ed2e49e79c730cd8afc6a1b78c97d52cd714044a339c3bc29734cd4d2ab ) -vcpkg_extract_source_archive(${ARCHIVE_FILE} ${CURRENT_BUILDTREES_DIR}/src/20170423) +vcpkg_extract_source_archive(${ARCHIVE_FILE} ${CURRENT_BUILDTREES_DIR}/src/glew) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/build/cmake -- cgit v1.2.3 From 67f44796bbfc58342f353b033583ee3d0e97789f Mon Sep 17 00:00:00 2001 From: codicodi Date: Tue, 15 Aug 2017 18:17:20 +0200 Subject: [libogg] export all symbols --- ports/libogg/CONTROL | 2 +- ports/libogg/portfile.cmake | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/libogg/CONTROL b/ports/libogg/CONTROL index fb4557e57..47fd8faab 100644 --- a/ports/libogg/CONTROL +++ b/ports/libogg/CONTROL @@ -1,3 +1,3 @@ Source: libogg -Version: 2017-07-27-cab46b19847 +Version: 1.3.2-cab46b1-2 Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs. diff --git a/ports/libogg/portfile.cmake b/ports/libogg/portfile.cmake index fb666acde..a3640c54c 100644 --- a/ports/libogg/portfile.cmake +++ b/ports/libogg/portfile.cmake @@ -9,6 +9,9 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ) vcpkg_install_cmake() -- cgit v1.2.3 From f44f2f4e6ea987d0b1d70dca9cdbd0252f1a00fd Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 15 Aug 2017 11:15:39 -0700 Subject: [libharu] init port --- ports/libharu/CONTROL | 4 +++ ports/libharu/portfile.cmake | 59 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 ports/libharu/CONTROL create mode 100644 ports/libharu/portfile.cmake diff --git a/ports/libharu/CONTROL b/ports/libharu/CONTROL new file mode 100644 index 000000000..743224fc9 --- /dev/null +++ b/ports/libharu/CONTROL @@ -0,0 +1,4 @@ +Source: libharu +Version: 2017-08-15-d84867ebf9f +Description: libharu - free PDF library +Build-Depends: zlib,libpng diff --git a/ports/libharu/portfile.cmake b/ports/libharu/portfile.cmake new file mode 100644 index 000000000..1777b1c11 --- /dev/null +++ b/ports/libharu/portfile.cmake @@ -0,0 +1,59 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libharu/libharu + REF d84867ebf9f3de6afd661d2cdaff102457fbc371 + SHA512 789579dd52c1056ae90a4ce5360c26ba92cadae5341a3901c4159afe624129a1f628fa6412952a398e048b0e5040c93f7ed5b4e4bc620a22d897098298fe2a99 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DLIBHPDF_DEBUG=ON +) + +vcpkg_build_cmake() + +file(GLOB DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" +) +file(GLOB LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" +) +file(GLOB DEBUG_DLLS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" +) +file(GLOB DEBUG_LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" +) +file(GLOB HEADERS "${SOURCE_PATH}/include/*.h" "${CMAKE_BINARY_DIR}/include/*.h") + +if(DLLS) + file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() +file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libharu RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + 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) +endif() + +vcpkg_copy_pdbs() -- cgit v1.2.3 From c12a2e2065ce9506d4c6a61569fa8dbe29f392e9 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 15 Aug 2017 12:24:12 -0700 Subject: [gl2ps] init --- ports/gl2ps/CONTROL | 4 + ports/gl2ps/portfile.cmake | 24 +++ ports/gl2ps/separate-static-dynamic-build.patch | 214 ++++++++++++++++++++++++ 3 files changed, 242 insertions(+) create mode 100644 ports/gl2ps/CONTROL create mode 100644 ports/gl2ps/portfile.cmake create mode 100644 ports/gl2ps/separate-static-dynamic-build.patch diff --git a/ports/gl2ps/CONTROL b/ports/gl2ps/CONTROL new file mode 100644 index 000000000..59c9bd770 --- /dev/null +++ b/ports/gl2ps/CONTROL @@ -0,0 +1,4 @@ +Source: gl2ps +Version: OpenGL to PostScript Printing Library +Description: +Build-Depends: freeglut, zlib, libpng diff --git a/ports/gl2ps/portfile.cmake b/ports/gl2ps/portfile.cmake new file mode 100644 index 000000000..7f08f8de4 --- /dev/null +++ b/ports/gl2ps/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gl2ps-gl2ps_1_4_0-e7b16f8f80382e45b681651e6381de09250243a6) +vcpkg_download_distfile(ARCHIVE + URLS "http://gitlab.onelab.info/gl2ps/gl2ps/repository/archive.tar.gz?ref=gl2ps_1_4_0" + FILENAME "gl2ps_1_4_0.tar.gz" + SHA512 6ec18debdf94e8de22ca7084fe6fef72fb858fc6295a35fa3c98c3c45211f9f72e23a14224a85877f64031077da4978b8d5d81f24dfe18de8c2ec32a680eba60 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/separate-static-dynamic-build.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.GL2PS DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl2ps RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl2ps RENAME copyright.LGPL) diff --git a/ports/gl2ps/separate-static-dynamic-build.patch b/ports/gl2ps/separate-static-dynamic-build.patch new file mode 100644 index 000000000..fe2267e6a --- /dev/null +++ b/ports/gl2ps/separate-static-dynamic-build.patch @@ -0,0 +1,214 @@ +diff --git "a/CMakeLists.txt" "b/CMakeLists.txt" +index 40da57e..39acf6b 100644 +--- "a/CMakeLists.txt" ++++ "b/CMakeLists.txt" +@@ -1,34 +1,34 @@ + # GL2PS, an OpenGL to PostScript Printing Library + # Copyright (C) 1999-2017 C. Geuzaine +-# ++# + # This program is free software; you can redistribute it and/or + # modify it under the terms of either: +-# ++# + # a) the GNU Library General Public License as published by the Free + # Software Foundation, either version 2 of the License, or (at your + # option) any later version; or +-# ++# + # b) the GL2PS License as published by Christophe Geuzaine, either + # version 2 of the License, or (at your option) any later version. +-# ++# + # This program 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 either + # the GNU Library General Public License or the GL2PS License for + # more details. +-# ++# + # You should have received a copy of the GNU Library General Public + # License along with this library in the file named "COPYING.LGPL"; + # if not, write to the Free Software Foundation, Inc., 675 Mass Ave, + # Cambridge, MA 02139, USA. +-# ++# + # You should have received a copy of the GL2PS License with this + # library in the file named "COPYING.GL2PS"; if not, I will be glad + # to provide one. +-# ++# + # For the latest info about gl2ps and a full list of contributors, + # see http://www.geuz.org/gl2ps/. +-# ++# + # Please report all bugs and problems to . + + cmake_minimum_required(VERSION 2.4 FATAL_ERROR) +@@ -55,8 +55,8 @@ set(GL2PS_EXTRA_VERSION "" CACHE STRING "GL2PS extra version string") + set(GL2PS_VERSION "${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}") + set(GL2PS_VERSION "${GL2PS_VERSION}.${GL2PS_PATCH_VERSION}${GL2PS_EXTRA_VERSION}") + +-execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE +- OUTPUT_STRIP_TRAILING_WHITESPACE) ++execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE ++OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT DATE) + set(DATE "unknown") + endif(NOT DATE) +@@ -113,84 +113,93 @@ endif(MATH_LIBRARY) + + include_directories(${EXTERNAL_INCLUDES}) + +-if(OPENGL_FOUND) +- add_library(lib STATIC gl2ps.c gl2ps.h) +- set_target_properties(lib PROPERTIES OUTPUT_NAME gl2ps) +- +- add_library(shared SHARED gl2ps.c gl2ps.h) +- target_link_libraries(shared ${EXTERNAL_LIBRARIES}) +- set_target_properties(shared PROPERTIES OUTPUT_NAME gl2ps) +- set_target_properties(shared PROPERTIES +- VERSION ${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}.${GL2PS_PATCH_VERSION} +- SOVERSION ${GL2PS_MAJOR_VERSION}) +- if(MSVC) +- set_target_properties(shared PROPERTIES COMPILE_FLAGS "-DGL2PSDLL -DGL2PSDLL_EXPORTS") +- endif(MSVC) +- +- install(TARGETS lib shared DESTINATION lib${LIB_SUFFIX}) +-endif(OPENGL_FOUND) ++ ++add_library(gl2ps gl2ps.c gl2ps.h) ++target_link_libraries(gl2ps ${EXTERNAL_LIBRARIES}) ++set_target_properties(gl2ps PROPERTIES ++ VERSION ${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}.${GL2PS_PATCH_VERSION} ++SOVERSION ${GL2PS_MAJOR_VERSION}) ++ ++if(BUILD_SHARED_LIBS) ++ target_compile_definitions(gl2ps PRIVATE -DGL2PSDLL -DGL2PSDLL_EXPORTS) ++endif() ++ ++install( ++ TARGETS gl2ps ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) ++ + + if(WIN32) +- set(GL2PS_DOC .) ++ set(GL2PS_DOC share/gl2ps/docs) + else(WIN32) + set(GL2PS_DOC share/doc/gl2ps) + endif(WIN32) + ++if(NOT DISABLE_INSTALL_HEADERS) + install(FILES gl2ps.h DESTINATION include) + install(FILES ${CMAKE_SOURCE_DIR}/README.txt DESTINATION ${GL2PS_DOC}) + install(FILES ${CMAKE_SOURCE_DIR}/COPYING.LGPL DESTINATION ${GL2PS_DOC}) + install(FILES ${CMAKE_SOURCE_DIR}/COPYING.GL2PS DESTINATION ${GL2PS_DOC}) + install(FILES ${CMAKE_SOURCE_DIR}/gl2psTest.c DESTINATION ${GL2PS_DOC}) + install(FILES ${CMAKE_SOURCE_DIR}/gl2psTestSimple.c DESTINATION ${GL2PS_DOC}) ++endif() ++ ++if(BUILD_TESTS) ++ ++ if(GLUT_FOUND) ++ add_executable(gl2psTest gl2psTest.c) ++ target_link_libraries(gl2psTest gl2ps ${EXTERNAL_LIBRARIES}) ++ add_executable(gl2psTestSimple gl2psTestSimple.c) ++ target_link_libraries(gl2psTestSimple gl2ps ${EXTERNAL_LIBRARIES}) ++ endif(GLUT_FOUND) ++ ++ find_package(LATEX) ++ if(PDFLATEX_COMPILER) ++ add_custom_command(OUTPUT gl2ps.pdf DEPENDS gl2ps.tex ++ COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex ++ COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex ++ COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex ++ COMMAND ${CMAKE_COMMAND} -E copy gl2ps.pdf ${CMAKE_SOURCE_DIR}) ++ add_custom_target(pdf ALL DEPENDS gl2ps.pdf) ++ install(FILES gl2ps.pdf DESTINATION ${GL2PS_DOC}) ++ find_program(TTH tth) ++ if(TTH) ++ add_custom_command(OUTPUT gl2ps.html DEPENDS gl2ps.tex gl2ps.pdf ++ COMMAND ${CMAKE_COMMAND} -E copy_if_different ++ ${CMAKE_SOURCE_DIR}/gl2ps.tex ${CMAKE_BINARY_DIR}/gl2ps.tex ++ COMMAND ${TTH} ARGS -w1 gl2ps.tex) ++ add_custom_target(html DEPENDS gl2ps.html) ++ endif(TTH) ++ endif(PDFLATEX_COMPILER) ++ ++endif() + +-if(GLUT_FOUND) +- add_executable(gl2psTest WIN32 gl2psTest.c) +- target_link_libraries(gl2psTest lib ${EXTERNAL_LIBRARIES}) +- add_executable(gl2psTestSimple WIN32 gl2psTestSimple.c) +- target_link_libraries(gl2psTestSimple lib ${EXTERNAL_LIBRARIES}) +-endif(GLUT_FOUND) +- +-find_package(LATEX) +-if(PDFLATEX_COMPILER) +- add_custom_command(OUTPUT gl2ps.pdf DEPENDS gl2ps.tex +- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex +- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex +- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex +- COMMAND ${CMAKE_COMMAND} -E copy gl2ps.pdf ${CMAKE_SOURCE_DIR}) +- add_custom_target(pdf ALL DEPENDS gl2ps.pdf) +- install(FILES gl2ps.pdf DESTINATION ${GL2PS_DOC}) +- find_program(TTH tth) +- if(TTH) +- add_custom_command(OUTPUT gl2ps.html DEPENDS gl2ps.tex gl2ps.pdf +- COMMAND ${CMAKE_COMMAND} -E copy_if_different +- ${CMAKE_SOURCE_DIR}/gl2ps.tex ${CMAKE_BINARY_DIR}/gl2ps.tex +- COMMAND ${TTH} ARGS -w1 gl2ps.tex) +- add_custom_target(html DEPENDS gl2ps.html) +- endif(TTH) +-endif(PDFLATEX_COMPILER) + + set(CPACK_PACKAGE_VENDOR "Christophe Geuzaine") + set(CPACK_PACKAGE_VERSION_MAJOR ${GL2PS_MAJOR_VERSION}) + set(CPACK_PACKAGE_VERSION_MINOR ${GL2PS_MINOR_VERSION}) + set(CPACK_PACKAGE_VERSION_PATCH ${GL2PS_PATCH_VERSION}) + set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/README.txt) +-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY +- "An OpenGL to PostScript (and PDF, and SVG...) printing library") +-set(CPACK_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-${GL2PS_OS}) +-set(CPACK_PACKAGE_INSTALL_DIRECTORY "gl2ps") +-set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING.LGPL) +-set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.txt) +-set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.txt) +-set(CPACK_PACKAGE_EXECUTABLE "gl2ps;gl2ps") +-set(CPACK_STRIP_FILES TRUE) +-set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-source) +-set(CPACK_SOURCE_GENERATOR TGZ) +-set(CPACK_SOURCE_IGNORE_FILES "TODO.txt" "${CMAKE_BINARY_DIR}" "/CVS/" +- "/.svn" "~$" "DS_Store$" "/tmp/" "/bin/" "/lib/") +-if(WIN32) +- set(CPACK_GENERATOR ZIP) +-else(WIN32) +- set(CPACK_GENERATOR TGZ) +-endif(WIN32) +- +-include(CPack) ++set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ++ "An OpenGL to PostScript (and PDF, and SVG...) printing library") ++ set(CPACK_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-${GL2PS_OS}) ++ set(CPACK_PACKAGE_INSTALL_DIRECTORY "gl2ps") ++ set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING.LGPL) ++ set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.txt) ++ set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.txt) ++ set(CPACK_PACKAGE_EXECUTABLE "gl2ps;gl2ps") ++ set(CPACK_STRIP_FILES TRUE) ++ set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-source) ++ set(CPACK_SOURCE_GENERATOR TGZ) ++ set(CPACK_SOURCE_IGNORE_FILES "TODO.txt" "${CMAKE_BINARY_DIR}" "/CVS/" ++ "/.svn" "~$" "DS_Store$" "/tmp/" "/bin/" "/lib/") ++ if(WIN32) ++ set(CPACK_GENERATOR ZIP) ++ else(WIN32) ++ set(CPACK_GENERATOR TGZ) ++ endif(WIN32) ++ ++ # include(CPack) -- cgit v1.2.3 From 675323c45c0ffb47c62adb2d3ac098bda5cc5d1d Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 15 Aug 2017 12:47:23 -0700 Subject: [date] init port --- ports/date/CMakeLists.txt | 25 +++++++++++++++++++++++++ ports/date/CONTROL | 3 +++ ports/date/portfile.cmake | 22 ++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 ports/date/CMakeLists.txt create mode 100644 ports/date/CONTROL create mode 100644 ports/date/portfile.cmake diff --git a/ports/date/CMakeLists.txt b/ports/date/CMakeLists.txt new file mode 100644 index 000000000..2f4771db1 --- /dev/null +++ b/ports/date/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.5.1) +project(tz CXX) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +include_directories(${PROJECT_SRC_DIR}) + +add_library(tz tz.cpp) + +install( + TARGETS tz + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES date.h tz.h julian.h iso_week.h islamic.h DESTINATION include) +endif() diff --git a/ports/date/CONTROL b/ports/date/CONTROL new file mode 100644 index 000000000..8eab618c2 --- /dev/null +++ b/ports/date/CONTROL @@ -0,0 +1,3 @@ +Source: date +Version: 2.2 +Description: A date and time library based on the C++11/14/17 header diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake new file mode 100644 index 000000000..ef49b7d0a --- /dev/null +++ b/ports/date/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO HowardHinnant/date + REF v2.2 + SHA512 6889152acf1d0cc551d572eccaabd9f00ebecdb5723356949db2f1bd5f4b13e1ffad889082451cfb28254968a576b983116bc1a77e060426c9f33ca7774822cb + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 561e1dd69b8f53c1a87f2e68ff347b4a60c950e1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 15 Aug 2017 13:58:04 -0700 Subject: [vcpkg-tests] Reformat --- toolsrc/src/tests_paragraph.cpp | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests_paragraph.cpp index 920e58c02..af4b55498 100644 --- a/toolsrc/src/tests_paragraph.cpp +++ b/toolsrc/src/tests_paragraph.cpp @@ -27,7 +27,8 @@ namespace UnitTest1 { auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::vector>{{ - {"Source", "zlib"}, {"Version", "1.2.8"}, + {"Source", "zlib"}, + {"Version", "1.2.8"}, }}); Assert::IsTrue(m_pgh.has_value()); @@ -68,7 +69,9 @@ namespace UnitTest1 { auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::vector>{{ - {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl"}, + {"Source", "zlib"}, + {"Version", "1.2.8"}, + {"Build-Depends", "z, openssl"}, }}); Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); @@ -82,7 +85,9 @@ namespace UnitTest1 { auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::vector>{{ - {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl, xyz"}, + {"Source", "zlib"}, + {"Version", "1.2.8"}, + {"Build-Depends", "z, openssl, xyz"}, }}); Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); @@ -97,7 +102,9 @@ namespace UnitTest1 { auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::vector>{{ - {"Source", "zlib"}, {"Version", "1.2.8"}, {"Supports", "x64, windows, uwp"}, + {"Source", "zlib"}, + {"Version", "1.2.8"}, + {"Supports", "x64, windows, uwp"}, }}); Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); @@ -112,7 +119,9 @@ namespace UnitTest1 { auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::vector>{{ - {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "libA (windows), libB (uwp)"}, + {"Source", "zlib"}, + {"Version", "1.2.8"}, + {"Build-Depends", "libA (windows), libB (uwp)"}, }}); Assert::IsTrue(m_pgh.has_value()); auto& pgh = *m_pgh.get(); @@ -131,7 +140,10 @@ namespace UnitTest1 TEST_METHOD(BinaryParagraph_Construct_Minimum) { vcpkg::BinaryParagraph pgh({ - {"Package", "zlib"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, {"Multi-Arch", "same"}, + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, }); Assert::AreEqual("zlib", pgh.spec.name().c_str()); @@ -320,7 +332,10 @@ namespace UnitTest1 TEST_METHOD(BinaryParagraph_serialize_min) { vcpkg::BinaryParagraph pgh({ - {"Package", "zlib"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, {"Multi-Arch", "same"}, + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, }); std::string ss = Strings::serialize(pgh); auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO); -- cgit v1.2.3 From f4d11d7c9ea98007af88684db12de351b83bd976 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 15 Aug 2017 14:41:23 -0700 Subject: Remove download prompts for cmake/git The prompts were causing a lot of issues for users and especially CI builds --- scripts/fetchDependency.ps1 | 53 ++--------------------- scripts/findVisualStudioInstallationInstances.ps1 | 2 +- scripts/internalCI.ps1 | 1 - 3 files changed, 4 insertions(+), 52 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index d142f57fe..5eb0cc0db 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -1,14 +1,8 @@ [CmdletBinding()] param( - [string]$Dependency, - [ValidateNotNullOrEmpty()] - [string]$downloadPromptOverride = "0" + [string]$Dependency ) -$downloadPromptOverride_NO_OVERRIDE= 0 -$downloadPromptOverride_DO_NOT_PROMPT = 1 -$downloadPromptOverride_ALWAYS_PROMPT = 2 - if ($PSVersionTable.PSEdition -ne "Core") { Import-Module BitsTransfer -Verbose:$false } @@ -22,38 +16,6 @@ $downloadsDir = "$vcpkgRootDir\downloads" function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { - function promptForDownload([string]$title, [string]$message, [string]$yesDescription, [string]$noDescription, [string]$downloadPromptOverride) - { - $do_not_prompt = ($downloadPromptOverride -eq $downloadPromptOverride_DO_NOT_PROMPT) -Or - (Test-Path "$downloadsDir\AlwaysAllowEverything") -Or - (Test-Path "$downloadsDir\AlwaysAllowDownloads") - - if (($downloadPromptOverride -ne $downloadPromptOverride_ALWAYS_PROMPT) -And $do_not_prompt) - { - return $true - } - - $yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", $yesDescription - $no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", $noDescription - $AlwaysAllowDownloads = New-Object System.Management.Automation.Host.ChoiceDescription "&Always Allow Downloads", ($yesDescription + "(Future download prompts will not be displayed)") - - $options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no, $AlwaysAllowDownloads) - $result = $host.ui.PromptForChoice($title, $message, $options, 0) - - switch ($result) - { - 0 {return $true} - 1 {return $false} - 2 { - New-Item "$downloadsDir\AlwaysAllowDownloads" -type file -force | Out-Null - return $true - } - } - - throw "Unexpected result" - } - - function performDownload( [Parameter(Mandatory=$true)][string]$Dependency, [Parameter(Mandatory=$true)][string]$url, [Parameter(Mandatory=$true)][string]$downloadDir, @@ -66,16 +28,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) return } - $title = "Download " + $Dependency - $message = ("No suitable version of " + $Dependency + " was found (requires $requiredVersion or higher). Download portable version?") - $yesDescription = "Downloads " + $Dependency + " v" + $downloadVersion +" app-locally." - $noDescription = "Does not download " + $Dependency + "." - - $userAllowedDownload = promptForDownload $title $message $yesDescription $noDescription $downloadPromptOverride - if (!$userAllowedDownload) - { - throw [System.IO.FileNotFoundException] ("Could not detect suitable version of " + $Dependency + " and download not allowed") - } + Write-Host "A suitable version of $Dependency was not found (required v$requiredVersion). Downloading portable $Dependency v$downloadVersion..." if (!(Test-Path $downloadDir)) { @@ -202,7 +155,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256") $fileAsByteArray = [io.File]::ReadAllBytes($downloadPath) $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) - $downloadedFileHash = -Join ($hashByteArray | ForEach {"{0:x2}" -f $_}) + $downloadedFileHash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) } else { diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 14bfc244b..ca807980c 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -8,7 +8,7 @@ $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" -$nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget" 1 +$nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget" $nugetPackageDir = "$downloadsDir\nuget-packages" $SetupAPIVersion = "1.8.24" diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1 index 68c917f7a..67871acc1 100644 --- a/scripts/internalCI.ps1 +++ b/scripts/internalCI.ps1 @@ -1,7 +1,6 @@ $ErrorActionPreference = "Stop" New-Item -type directory downloads -errorAction SilentlyContinue | Out-Null -New-Item -type file downloads\AlwaysAllowDownloads -errorAction SilentlyContinue | Out-Null ./scripts/bootstrap.ps1 if (-not $?) { throw $? } -- cgit v1.2.3 From 66ac9bb63a32603aa3d7a4903e79962eb937e565 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 15 Aug 2017 18:20:28 -0700 Subject: fix debug build, fix dll copy problem --- ports/opencv/portfile.cmake | 60 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 4e946a463..8405f1e1a 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -19,8 +19,8 @@ vcpkg_apply_patches( ) file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libpng ${SOURCE_PATH}/3rdparty/zlib ${SOURCE_PATH}/3rdparty/libtiff) -# Comment out the following 11 lines if you don't want to build with opencv_contrib -# Important: remember to also update the CONTROL file +# Uncomment the following lines and the lines under OPTIONS to build opencv_contrib +# Important: after uncommenting you've add protobuf dependency within CONTROL file SET(CONTRIB_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/opencv_contrib-3.3.0) vcpkg_download_distfile(CONTRIB_ARCHIVE URLS "https://github.com/opencv/opencv_contrib/archive/3.3.0.zip" @@ -62,7 +62,7 @@ vcpkg_configure_cmake( -DWITH_LAPACK=OFF -DBUILD_opencv_dnn=OFF - # comment the following 3 lines if you don't want to build opencv_contrib modules + # uncomment the following 3 lines to build opencv_contrib modules -DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules -DBUILD_PROTOBUF=OFF -DUPDATE_PROTO_FILES=ON @@ -73,12 +73,60 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/opencv) file(RENAME ${CURRENT_PACKAGES_DIR}/share/opencv/LICENSE ${CURRENT_PACKAGES_DIR}/share/opencv/copyright) file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) +if(${VCPKG_PLATFORM_TOOLSET} STREQUAL "v150") + set(OpenCV_RUNTIME vc15) +else() + set(OpenCV_RUNTIME vc14) +endif() +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL "x64") + set(OpenCV_ARCH x64) +else() + set(OpenCV_ARCH x86) +endif() + +file(GLOB BIN_AND_LIB ${CURRENT_PACKAGES_DIR}/${OpenCV_ARCH}/${OpenCV_RUNTIME}/*) +file(COPY ${BIN_AND_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}) +file(GLOB DEBUG_BIN_AND_LIB ${CURRENT_PACKAGES_DIR}/debug/${OpenCV_ARCH}/${OpenCV_RUNTIME}/*) +file(COPY ${DEBUG_BIN_AND_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/${OpenCV_ARCH}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/${OpenCV_ARCH}) + +file(GLOB SHARE_LIB ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/*) +file(COPY ${SHARE_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/share/opencv) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}) + +file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVConfig.cmake OPENCV_CONFIG) +string(REPLACE "\${OpenCV_ARCH}/\${OpenCV_RUNTIME}/" + "" OPENCV_CONFIG "${OPENCV_CONFIG}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVConfig.cmake "${OPENCV_CONFIG}") + +file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVConfig.cmake OPENCV_CONFIG_LIB) +string(REPLACE "get_filename_component(OpenCV_INSTALL_PATH \"\${OpenCV_CONFIG_PATH}/../../../../../" + "get_filename_component(OpenCV_INSTALL_PATH \"\${OpenCV_CONFIG_PATH}/../../../" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVConfig.cmake "${OPENCV_CONFIG_LIB}") + +file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVModules.cmake OPENCV_MODULES) +string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\n" + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\n" OPENCV_MODULES "${OPENCV_MODULES}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVModules.cmake "${OPENCV_MODULES}") + +file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVModules-release.cmake OPENCV_MODULES_RELEASE) +string(REPLACE "${OpenCV_ARCH}/${OpenCV_RUNTIME}/" + "" OPENCV_MODULES_RELEASE "${OPENCV_MODULES_RELEASE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVModules-release.cmake "${OPENCV_MODULES_RELEASE}") + +file(READ ${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-debug.cmake OPENCV_MODULES_DEBUG) +string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" OPENCV_MODULES_DEBUG "${OPENCV_MODULES_DEBUG}") +string(REPLACE "${OpenCV_ARCH}/${OpenCV_RUNTIME}/" + "" OPENCV_MODULES_DEBUG "${OPENCV_MODULES_DEBUG}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVModules-debug.cmake "${OPENCV_MODULES_DEBUG}") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + vcpkg_copy_pdbs() -- cgit v1.2.3 From 400010c667fb899d5ddf953b4081b89141717bf1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 15 Aug 2017 19:29:03 -0700 Subject: fetchDependency.ps1: Don't print the Downloading message... --- scripts/fetchDependency.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 5eb0cc0db..01d7441c8 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -28,7 +28,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) return } - Write-Host "A suitable version of $Dependency was not found (required v$requiredVersion). Downloading portable $Dependency v$downloadVersion..." + # Write-Host "A suitable version of $Dependency was not found (required v$requiredVersion). Downloading portable $Dependency v$downloadVersion..." if (!(Test-Path $downloadDir)) { -- cgit v1.2.3 From 38a9b1bd218189cb9711284fba7b2854f8bc311d Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 16 Aug 2017 09:33:45 +0200 Subject: Upgrade to the ACE 6.4.4 micro release * ports/ace/portfile.cmake: --- ports/ace/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake index a6293fa24..6763cc370 100644 --- a/ports/ace/portfile.cmake +++ b/ports/ace/portfile.cmake @@ -5,9 +5,9 @@ endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ACE_wrappers/ace) vcpkg_download_distfile(ARCHIVE - URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.3.zip" - FILENAME "ACE-6.4.3.zip" - SHA512 1d700733ec617559f338e908b2343c66c0c856bfac7bd2230f18290970fe3bc25a394839a9d66fa74f6edd239a70f9d6cf5746585ed796fbe9f8aeca90eab84e + URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.4.zip" + FILENAME "ACE-6.4.4.zip" + SHA512 82628a73b736a14b3ee33fb859e26370ffd7df88bda4890fe490736160d3ce393f7e61183cd8cd7a91a83bc31c4bd263aa887168543f9f89fde080dc3650a4ed ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From e4523db1bebcde45b5458cdd26c449da11060582 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 16 Aug 2017 13:10:49 +0200 Subject: [pcre2] update to 10.30 --- ports/pcre2/CONTROL | 2 +- ports/pcre2/portfile.cmake | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ports/pcre2/CONTROL b/ports/pcre2/CONTROL index 8a118b3e7..b25e10d49 100644 --- a/ports/pcre2/CONTROL +++ b/ports/pcre2/CONTROL @@ -1,3 +1,3 @@ Source: pcre2 -Version: 10.23 +Version: 10.30 Description: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library diff --git a/ports/pcre2/portfile.cmake b/ports/pcre2/portfile.cmake index fa7bbcf4b..0f5bee964 100644 --- a/ports/pcre2/portfile.cmake +++ b/ports/pcre2/portfile.cmake @@ -1,9 +1,10 @@ +set(PCRE2_VERSION 10.30) include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pcre2-10.23) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pcre2-${PCRE2_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/pcre/files/pcre2/10.23/pcre2-10.23.zip/download" - FILENAME "pcre2-10.23.zip" - SHA512 0f0638ce28ce17e18425d499cc516a30dabbfa868180ea320361ffeaa26d4f6f6975f12bc20024f7457fe3c6eed686976a9e5c66c2785d1ea63bee38131ea0d2) + URLS "https://sourceforge.net/projects/pcre/files/pcre2/${PCRE2_VERSION}/pcre2-${PCRE2_VERSION}.zip/download" + FILENAME "pcre2-${PCRE2_VERSION}.zip" + SHA512 03e570b946ac29498a114b27e715a0fcf25702bfc9623f9fc085ee8a3214ab3c303baccb9c0af55da6916e8ce40d931d97f1ee9628690563041a943f0aa2bc54) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From f2482d3af9df693b59495c25910852daaf920b3d Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Wed, 16 Aug 2017 16:32:33 +0200 Subject: [gdal] fix linking to curl libraries --- ports/gdal/CONTROL | 2 +- ports/gdal/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index 2182a3d35..868a5e929 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,4 +1,4 @@ Source: gdal -Version: 1.11.3-4 +Version: 1.11.3-5 Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. Build-Depends: proj, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 96fa8fa6a..214ec2024 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -55,8 +55,8 @@ file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/expat.lib" EXPAT_LIBRARY # Setup curl libraries + include path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" CURL_INCLUDE_DIR) -file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libcurl_imp.lib" CURL_LIBRARY_REL) -file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl_imp.lib" CURL_LIBRARY_DBG) +file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libcurl.lib" CURL_LIBRARY_REL) +file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl.lib" CURL_LIBRARY_DBG) # Setup sqlite3 libraries + include path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" SQLITE_INCLUDE_DIR) -- cgit v1.2.3 From 1b7b8146891d6a0664cddc41c6b46e43052d0977 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 17 Aug 2017 00:05:05 +0900 Subject: Dynamic path convert Dynamic path convert of Kinect SDK directory in patch file. --- ports/openni2/portfile.cmake | 17 +++-- ports/openni2/replace_environment_variable.patch | 76 ---------------------- .../openni2/replace_environment_variable.patch.in | 76 ++++++++++++++++++++++ 3 files changed, 86 insertions(+), 83 deletions(-) delete mode 100644 ports/openni2/replace_environment_variable.patch create mode 100644 ports/openni2/replace_environment_variable.patch.in diff --git a/ports/openni2/portfile.cmake b/ports/openni2/portfile.cmake index 5b832eaa4..7c15b40ec 100644 --- a/ports/openni2/portfile.cmake +++ b/ports/openni2/portfile.cmake @@ -36,6 +36,15 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +get_filename_component(KINECTSDK10_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect;SDKInstallPath]" ABSOLUTE CACHE) +set(KINECTSDK10_INSTALLED FALSE) +if(EXISTS "${KINECTSDK10_DIR}") + set(KINECTSDK10_INSTALLED TRUE) +endif() + +file(TO_NATIVE_PATH ${KINECTSDK10_DIR} KINECTSDK10_DIR) +configure_file("${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch.in" "${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch" @ONLY) + vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/upgrade_projects.patch" @@ -43,12 +52,6 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch" ) -get_filename_component(KINECTSDK10_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect;SDKInstallPath]" ABSOLUTE CACHE) -set(KINECTSDK10_INSTALLED FALSE) -if(EXISTS "${KINECTSDK10_DIR}") - set(KINECTSDK10_INSTALLED TRUE) -endif() - if(NOT ${KINECTSDK10_INSTALLED}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} @@ -240,7 +243,7 @@ file( "${SOURCE_BIN_PATH_RELEASE}/PS1080Console.exe" "${SOURCE_BIN_PATH_RELEASE}/PSLinkConsole.exe" DESTINATION - ${CURRENT_PACKAGES_DIR}/tools/openni2/ + ${CURRENT_PACKAGES_DIR}/tools/openni2 ) # Handle copyright diff --git a/ports/openni2/replace_environment_variable.patch b/ports/openni2/replace_environment_variable.patch deleted file mode 100644 index a5bfe2a54..000000000 --- a/ports/openni2/replace_environment_variable.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj -index 08a49fe..7fd8620 100644 ---- a/Source/Drivers/Kinect/Kinect.vcxproj -+++ b/Source/Drivers/Kinect/Kinect.vcxproj -@@ -101,7 +101,7 @@ - - Level3 - Disabled -- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;C:\Program Files\Microsoft SDKs\Kinect\v1.8\inc; - _WINDLL;%(PreprocessorDefinitions);_WINDOWS - false - false -@@ -109,7 +109,7 @@ - - true - Kinect10.lib;XnLib.lib;%(AdditionalDependencies) -- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;C:\Program Files\Microsoft SDKs\Kinect\v1.8\lib\x86; - true - - -@@ -117,7 +117,7 @@ - - Level3 - Disabled -- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;C:\Program Files\Microsoft SDKs\Kinect\v1.8\inc; - _WINDLL;%(PreprocessorDefinitions);_WINDOWS - false - false -@@ -125,7 +125,7 @@ - - true - Kinect10.lib;XnLib.lib;%(AdditionalDependencies) -- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;C:\Program Files\Microsoft SDKs\Kinect\v1.8\lib\amd64; - - - -@@ -139,7 +139,7 @@ - MaxSpeed - true - true -- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;C:\Program Files\Microsoft SDKs\Kinect\v1.8\inc; - false - - -@@ -147,7 +147,7 @@ - true - true - Kinect10.lib;XnLib.lib;%(AdditionalDependencies) -- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;C:\Program Files\Microsoft SDKs\Kinect\v1.8\lib\x86; - true - - -@@ -157,7 +157,7 @@ - MaxSpeed - true - true -- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;C:\Program Files\Microsoft SDKs\Kinect\v1.8\inc; - false - - -@@ -165,7 +165,7 @@ - true - true - Kinect10.lib;XnLib.lib;%(AdditionalDependencies) -- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;C:\Program Files\Microsoft SDKs\Kinect\v1.8\lib\amd64; - true - - diff --git a/ports/openni2/replace_environment_variable.patch.in b/ports/openni2/replace_environment_variable.patch.in new file mode 100644 index 000000000..25abe7edf --- /dev/null +++ b/ports/openni2/replace_environment_variable.patch.in @@ -0,0 +1,76 @@ +diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj +index 08a49fe..7fd8620 100644 +--- a/Source/Drivers/Kinect/Kinect.vcxproj ++++ b/Source/Drivers/Kinect/Kinect.vcxproj +@@ -101,7 +101,7 @@ + + Level3 + Disabled +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@KINECTSDK10_DIR@\inc; + _WINDLL;%(PreprocessorDefinitions);_WINDOWS + false + false +@@ -109,7 +109,7 @@ + + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@KINECTSDK10_DIR@\lib\x86; + true + + +@@ -117,7 +117,7 @@ + + Level3 + Disabled +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@KINECTSDK10_DIR@\inc; + _WINDLL;%(PreprocessorDefinitions);_WINDOWS + false + false +@@ -125,7 +125,7 @@ + + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@KINECTSDK10_DIR@\lib\amd64; + + + +@@ -139,7 +139,7 @@ + MaxSpeed + true + true +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@KINECTSDK10_DIR@\inc; + false + + +@@ -147,7 +147,7 @@ + true + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@KINECTSDK10_DIR@\lib\x86; + true + + +@@ -157,7 +157,7 @@ + MaxSpeed + true + true +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@KINECTSDK10_DIR@\inc; + false + + +@@ -165,7 +165,7 @@ + true + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@KINECTSDK10_DIR@\lib\amd64; + true + + -- cgit v1.2.3 From 570cbccb7811e7edd94133e407f0de1d4d766fd6 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 16 Aug 2017 18:35:00 +0200 Subject: [libuv] update to 1.14.0 --- ports/libuv/CONTROL | 2 +- ports/libuv/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index bbfcda090..61f5711d1 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.13.1 +Version: 1.14.0 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. \ No newline at end of file diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index 47447df99..a75385132 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.13.1 - SHA512 5d4bbc90f353ea438e8eac3ea0c4e89c09d3f51629c1d06b52072f04d8cccfd7119189ba21ad13eb8df28575e0844fbb1b09ed903bd95f6ea806e6cba353ef1a + REF v1.14.0 + SHA512 a838f2e97250a78861b72458d9278935d9e8151d69de21de19499dfe9d7304d65ce578c007356b75cd4ce2c17735292d93cdb2fcc206d4e2430ee3f9a2fc7222 HEAD_REF v1.x) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From bd7cd7f56d5d9fdfeb1f57810a2ea77bf4d7e31a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 16 Aug 2017 13:11:50 -0700 Subject: Add explanation for not printing in fetchDependency.ps1 --- scripts/fetchDependency.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 01d7441c8..c9aeb0f77 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -28,6 +28,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) return } + # Can't print because vcpkg captures the output and expects only the path that is returned at the end of this script file # Write-Host "A suitable version of $Dependency was not found (required v$requiredVersion). Downloading portable $Dependency v$downloadVersion..." if (!(Test-Path $downloadDir)) -- cgit v1.2.3 From 307b761df4197bf9cf1b69652808530e6219a868 Mon Sep 17 00:00:00 2001 From: Daniel Shaw Date: Tue, 25 Jul 2017 21:29:31 -0700 Subject: partial end to end feature packages hdf5 added vcpkg feature package support to other commands remove comments change qualifier bracket to parens added features to qualified dependencies --- toolsrc/include/BinaryParagraph.h | 6 ++ toolsrc/include/Paragraphs.h | 2 +- toolsrc/include/SourceParagraph.h | 15 ++- toolsrc/include/StatusParagraphs.h | 3 + toolsrc/include/vcpkg_Commands.h | 2 +- toolsrc/include/vcpkg_Dependencies.h | 5 +- toolsrc/src/BinaryParagraph.cpp | 12 ++- toolsrc/src/Paragraphs.cpp | 16 ++- toolsrc/src/SourceParagraph.cpp | 57 +++++++++- toolsrc/src/StatusParagraphs.cpp | 26 ++++- toolsrc/src/commands_depends.cpp | 2 +- toolsrc/src/commands_install.cpp | 200 ++++++++++++++++++++++++++++++----- toolsrc/src/commands_remove.cpp | 27 +++-- toolsrc/src/commands_search.cpp | 2 +- toolsrc/src/test_install_plan.cpp | 50 ++++++++- toolsrc/src/tests_dependencies.cpp | 2 +- toolsrc/src/tests_paragraph.cpp | 28 +++-- toolsrc/src/vcpkg_Build.cpp | 46 +++++--- toolsrc/src/vcpkg_Dependencies.cpp | 52 ++++++--- toolsrc/src/vcpkglib.cpp | 2 +- 20 files changed, 459 insertions(+), 96 deletions(-) diff --git a/toolsrc/include/BinaryParagraph.h b/toolsrc/include/BinaryParagraph.h index 1e12dd8a6..61e03343a 100644 --- a/toolsrc/include/BinaryParagraph.h +++ b/toolsrc/include/BinaryParagraph.h @@ -31,5 +31,11 @@ namespace vcpkg std::vector depends; }; + struct BinaryControlFile + { + BinaryParagraph core_paragraph; + std::vector features; + }; + void serialize(const BinaryParagraph& pgh, std::string& out_str); } \ No newline at end of file diff --git a/toolsrc/include/Paragraphs.h b/toolsrc/include/Paragraphs.h index 60f509266..aae46f7da 100644 --- a/toolsrc/include/Paragraphs.h +++ b/toolsrc/include/Paragraphs.h @@ -20,7 +20,7 @@ namespace vcpkg::Paragraphs Parse::ParseExpected try_load_port(const Files::Filesystem& fs, const fs::path& control_path); - Expected try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec); + Expected try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec); struct LoadResults { diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 7ddf999cc..fee61c3e8 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -15,13 +15,24 @@ namespace vcpkg struct Triplet; - struct Dependency + struct Features { std::string name; + std::vector features; + }; + + Features parse_feature_list(const std::string& name); + + struct Dependency + { + Features depend; std::string qualifier; + + std::string name() const; + static Dependency parse_dependency(std::string name, std::string qualifier); }; - const std::string& to_string(const Dependency& dep); + const std::string to_string(const Dependency& dep); struct FeatureParagraph { diff --git a/toolsrc/include/StatusParagraphs.h b/toolsrc/include/StatusParagraphs.h index 2af177219..bf2ef2f3e 100644 --- a/toolsrc/include/StatusParagraphs.h +++ b/toolsrc/include/StatusParagraphs.h @@ -17,6 +17,9 @@ namespace vcpkg const_iterator find(const PackageSpec& spec) const { return find(spec.name(), spec.triplet()); } const_iterator find(const std::string& name, const Triplet& triplet) const; iterator find(const std::string& name, const Triplet& triplet); + std::vector*> StatusParagraphs::find_all(const std::string& name, + const Triplet& triplet); + iterator find(const std::string& name, const Triplet& triplet, const std::string& feature); const_iterator find_installed(const PackageSpec& spec) const { diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 8348a64e4..d5f316d69 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -59,7 +59,7 @@ namespace vcpkg::Commands const fs::path& source_dir, const InstallDir& dirs); void install_package(const VcpkgPaths& paths, - const BinaryParagraph& binary_paragraph, + const BinaryControlFile& binary_paragraph, StatusParagraphs* status_db); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index e3af0fd28..3fee8ef33 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -90,6 +90,7 @@ namespace vcpkg::Dependencies InstallPlanAction(InstallPlanAction&&) = default; InstallPlanAction& operator=(const InstallPlanAction&) = delete; InstallPlanAction& operator=(InstallPlanAction&&) = default; + std::string displayname() const; PackageSpec spec; AnyParagraph any_paragraph; @@ -205,7 +206,9 @@ namespace vcpkg::Dependencies std::unordered_map& pkg_to_cluster, GraphPlan& graph_plan); void mark_minus(Cluster& cluster, std::unordered_map& pkg_to_cluster, GraphPlan& graph_plan); - + void mark_plus_default(Cluster& cluster, + std::unordered_map& pkg_to_cluster, + GraphPlan& graph_plan); std::vector create_feature_install_plan(const std::unordered_map& map, const std::vector& specs, const StatusParagraphs& status_db); diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp index 49e9d58e5..9abd388b9 100644 --- a/toolsrc/src/BinaryParagraph.cpp +++ b/toolsrc/src/BinaryParagraph.cpp @@ -87,7 +87,17 @@ namespace vcpkg this->depends = filter_dependencies(fpgh.depends, triplet); } - std::string BinaryParagraph::displayname() const { return this->spec.to_string(); } + std::string BinaryParagraph::displayname() const + { + if (this->feature == "") + { + return this->spec.name() + "[core]:" + this->spec.triplet().to_string(); + } + else + { + return this->spec.name() + "[" + this->feature + "]:" + this->spec.triplet().to_string(); + } + } std::string BinaryParagraph::dir() const { return this->spec.dir(); } diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp index 3749e919e..3a30f66a3 100644 --- a/toolsrc/src/Paragraphs.cpp +++ b/toolsrc/src/Paragraphs.cpp @@ -3,6 +3,7 @@ #include "ParagraphParseResult.h" #include "Paragraphs.h" #include "vcpkg_Files.h" +#include "vcpkg_Util.h" using namespace vcpkg::Parse; @@ -226,14 +227,21 @@ namespace vcpkg::Paragraphs return error_info; } - Expected try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec) + Expected try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec) { - Expected> pghs = - get_single_paragraph(paths.get_filesystem(), paths.package_dir(spec) / "CONTROL"); + Expected>> pghs = + get_paragraphs(paths.get_filesystem(), paths.package_dir(spec) / "CONTROL"); if (auto p = pghs.get()) { - return BinaryParagraph(*p); + BinaryControlFile bcf; + bcf.core_paragraph = BinaryParagraph(p->front()); + p->erase(p->begin()); + + bcf.features = + Util::fmap(*p, [&](auto&& raw_feature) -> BinaryParagraph { return BinaryParagraph(raw_feature); }); + + return bcf; } return pghs.error(); diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index a37567f3a..2aab7c572 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -152,18 +152,61 @@ namespace vcpkg return std::move(control_file); } + Features parse_feature_list(const std::string& name) + { + Features f; + int end = (int)name.find(']'); + if (end != std::string::npos) + { + int start = (int)name.find('['); + + auto feature_name_list = name.substr(start + 1, end - start - 1); + f.name = name.substr(0, start); + f.features = parse_comma_list(feature_name_list); + } + else + { + f.name = name; + } + return f; + } + + Dependency Dependency::parse_dependency(std::string name, std::string qualifier) + { + Dependency dep; + dep.qualifier = qualifier; + dep.depend = parse_feature_list(name); + return dep; + } + + std::string Dependency::name() const + { + std::string str = this->depend.name; + if (this->depend.features.empty()) return str; + + str += "["; + for (auto&& s : this->depend.features) + { + str += s + ","; + } + str.pop_back(); + str += "]"; + return str; + } + std::vector vcpkg::expand_qualified_dependencies(const std::vector& depends) { return Util::fmap(depends, [&](const std::string& depend_string) -> Dependency { auto pos = depend_string.find(' '); - if (pos == std::string::npos) return {depend_string, ""}; + if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, ""); // expect of the form "\w+ \[\w+\]" Dependency dep; - dep.name = depend_string.substr(0, pos); + + dep.depend.name = depend_string.substr(0, pos); if (depend_string.c_str()[pos + 1] != '(' || depend_string[depend_string.size() - 1] != ')') { // Error, but for now just slurp the entire string. - return {depend_string, ""}; + return Dependency::parse_dependency(depend_string, ""); } dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3); return dep; @@ -210,13 +253,17 @@ namespace vcpkg { if (dep.qualifier.empty() || t.canonical_name().find(dep.qualifier) != std::string::npos) { - ret.push_back(dep.name); + ret.emplace_back(dep.name()); } } return ret; } - const std::string& to_string(const Dependency& dep) { return dep.name; } + const std::string to_string(const Dependency& dep) + { + std::string name = dep.name(); + return name; + } ExpectedT> Supports::parse(const std::vector& strs) { diff --git a/toolsrc/src/StatusParagraphs.cpp b/toolsrc/src/StatusParagraphs.cpp index 27f3c30a2..02ee61f75 100644 --- a/toolsrc/src/StatusParagraphs.cpp +++ b/toolsrc/src/StatusParagraphs.cpp @@ -27,6 +27,30 @@ namespace vcpkg }); } + std::vector*> StatusParagraphs::find_all(const std::string& name, + const Triplet& triplet) + { + std::vector*> spghs; + for (auto&& p : *this) + { + if (p->package.spec.name() == name && p->package.spec.triplet() == triplet) + { + spghs.emplace_back(&p); + } + } + return spghs; + } + + StatusParagraphs::iterator StatusParagraphs::find(const std::string& name, + const Triplet& triplet, + const std::string& feature) + { + return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { + const PackageSpec& spec = pgh->package.spec; + return spec.name() == name && spec.triplet() == triplet && pgh->package.feature == feature; + }); + } + StatusParagraphs::const_iterator StatusParagraphs::find_installed(const std::string& name, const Triplet& triplet) const { @@ -43,7 +67,7 @@ namespace vcpkg { Checks::check_exit(VCPKG_LINE_INFO, pgh != nullptr, "Inserted null paragraph"); const PackageSpec& spec = pgh->package.spec; - auto ptr = find(spec.name(), spec.triplet()); + auto ptr = find(spec.name(), spec.triplet(), pgh->package.feature); if (ptr == end()) { paragraphs.push_back(std::move(pgh)); diff --git a/toolsrc/src/commands_depends.cpp b/toolsrc/src/commands_depends.cpp index 2d1fb658b..b04af5282 100644 --- a/toolsrc/src/commands_depends.cpp +++ b/toolsrc/src/commands_depends.cpp @@ -46,7 +46,7 @@ namespace vcpkg::Commands::DependInfo for (auto&& source_control_file : source_control_files) { const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; - auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name; }); + auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name(); }); System::println("%s: %s", source_paragraph.name, s); } diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index 2ce5b6c62..2965d9025 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -211,10 +211,10 @@ namespace vcpkg::Commands::Install } } - void install_package(const VcpkgPaths& paths, const BinaryParagraph& binary_paragraph, StatusParagraphs* status_db) + void install_package(const VcpkgPaths& paths, const BinaryControlFile& bcf, StatusParagraphs* status_db) { - const fs::path package_dir = paths.package_dir(binary_paragraph.spec); - const Triplet& triplet = binary_paragraph.spec.triplet(); + const fs::path package_dir = paths.package_dir(bcf.core_paragraph.spec); + const Triplet& triplet = bcf.core_paragraph.spec.triplet(); const std::vector pgh_and_files = get_installed_files(paths, *status_db); const SortedVector package_files = @@ -234,7 +234,7 @@ namespace vcpkg::Commands::Install System::println(System::Color::error, "The following files are already installed in %s and are in conflict with %s", triplet_install_path.generic_string(), - binary_paragraph.spec); + bcf.core_paragraph.spec); System::print("\n "); System::println(Strings::join("\n ", intersection)); System::println(""); @@ -242,27 +242,42 @@ namespace vcpkg::Commands::Install } StatusParagraph source_paragraph; - source_paragraph.package = binary_paragraph; + source_paragraph.package = bcf.core_paragraph; source_paragraph.want = Want::INSTALL; source_paragraph.state = InstallState::HALF_INSTALLED; - for (auto&& dep : source_paragraph.package.depends) - { - if (status_db->find_installed(dep, source_paragraph.package.spec.triplet()) == status_db->end()) - { - Checks::unreachable(VCPKG_LINE_INFO); - } - } + write_update(paths, source_paragraph); status_db->insert(std::make_unique(source_paragraph)); + std::vector features_spghs; + for (auto&& feature : bcf.features) + { + features_spghs.emplace_back(); + + StatusParagraph& feature_paragraph = features_spghs.back(); + feature_paragraph.package = feature; + feature_paragraph.want = Want::INSTALL; + feature_paragraph.state = InstallState::HALF_INSTALLED; + + write_update(paths, feature_paragraph); + status_db->insert(std::make_unique(feature_paragraph)); + } + const InstallDir install_dir = InstallDir::from_destination_root( - paths.installed, triplet.to_string(), paths.listfile_path(binary_paragraph)); + paths.installed, triplet.to_string(), paths.listfile_path(bcf.core_paragraph)); install_files_and_write_listfile(paths.get_filesystem(), package_dir, install_dir); source_paragraph.state = InstallState::INSTALLED; write_update(paths, source_paragraph); status_db->insert(std::make_unique(source_paragraph)); + + for (auto&& feature_paragraph : features_spghs) + { + feature_paragraph.state = InstallState::INSTALLED; + write_update(paths, feature_paragraph); + status_db->insert(std::make_unique(feature_paragraph)); + } } using Build::BuildResult; @@ -312,8 +327,8 @@ namespace vcpkg::Commands::Install } System::println("Building package %s... done", display_name); - const BinaryParagraph bpgh = - Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); + const BinaryControlFile bpgh = + Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); System::println("Installing package %s... ", display_name); install_package(paths, bpgh, &status_db); System::println(System::Color::success, "Installing package %s... done", display_name); @@ -322,10 +337,11 @@ namespace vcpkg::Commands::Install if (plan_type == InstallPlanType::BUILD_AND_INSTALL && g_feature_packages) { + const std::string display_name_feature = action.displayname(); if (use_head_version) - System::println("Building package %s from HEAD... ", display_name); + System::println("Building package %s from HEAD... ", display_name_feature); else - System::println("Building package %s... ", display_name); + System::println("Building package %s... ", display_name_feature); const Build::BuildPackageConfig build_config{ *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), @@ -339,13 +355,13 @@ namespace vcpkg::Commands::Install System::println(System::Color::error, Build::create_error_message(result.code, action.spec)); return result.code; } - System::println("Building package %s... done", display_name); + System::println("Building package %s... done", display_name_feature); - const BinaryParagraph bpgh = - Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); - System::println("Installing package %s... ", display_name); - install_package(paths, bpgh, &status_db); - System::println(System::Color::success, "Installing package %s... done", display_name); + const BinaryControlFile bcf = + Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); + System::println("Installing package %s... ", display_name_feature); + install_package(paths, bcf, &status_db); + System::println(System::Color::success, "Installing package %s... done", display_name_feature); return BuildResult::SUCCEEDED; } @@ -357,7 +373,9 @@ namespace vcpkg::Commands::Install System::Color::warning, "Package %s is already built -- not building from HEAD", display_name); } System::println("Installing package %s... ", display_name); - install_package(paths, action.any_paragraph.binary_paragraph.value_or_exit(VCPKG_LINE_INFO), &status_db); + install_package(paths, + BinaryControlFile{action.any_paragraph.binary_paragraph.value_or_exit(VCPKG_LINE_INFO)}, + &status_db); System::println(System::Color::success, "Installing package %s... done", display_name); return BuildResult::SUCCEEDED; } @@ -365,11 +383,27 @@ namespace vcpkg::Commands::Install Checks::unreachable(VCPKG_LINE_INFO); } + static void print_plan(const std::vector rebuilt_plans, + const std::vector new_plans) + { + const std::string rebuilt_string = Strings::join("\n", rebuilt_plans, [](const InstallPlanAction* p) { + return Dependencies::to_output_string(p->request_type, p->displayname()); + }); + + const std::string new_string = Strings::join("\n", new_plans, [](const InstallPlanAction* p) { + return Dependencies::to_output_string(p->request_type, p->displayname()); + }); + + if (rebuilt_plans.size() > 0) System::println("The following packages will be rebuilt:\n%s", rebuilt_string); + if (new_plans.size() > 0) System::println("The following packages will be installed:\n%s", new_string); + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { static const std::string OPTION_DRY_RUN = "--dry-run"; static const std::string OPTION_USE_HEAD_VERSION = "--head"; static const std::string OPTION_NO_DOWNLOADS = "--no-downloads"; + static const std::string OPTION_RECURSE = "--recurse"; // input sanitization static const std::string example = @@ -383,14 +417,130 @@ namespace vcpkg::Commands::Install Input::check_triplet(spec.triplet(), paths); const std::unordered_set options = args.check_and_get_optional_command_arguments( - {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS}); + {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE}); const bool dryRun = options.find(OPTION_DRY_RUN) != options.cend(); const bool use_head_version = options.find(OPTION_USE_HEAD_VERSION) != options.cend(); const bool no_downloads = options.find(OPTION_NO_DOWNLOADS) != options.cend(); + const bool isRecursive = options.find(OPTION_RECURSE) != options.cend(); // create the plan StatusParagraphs status_db = database_load_check(paths); + if (g_feature_packages) + { + const std::vector full_specs = Util::fmap(args.command_arguments, [&](auto&& arg) { + return Input::check_and_get_full_package_spec(arg, default_triplet, example); + }); + + std::unordered_map scf_map; + auto all_ports = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); + for (auto&& port : all_ports.paragraphs) + { + auto pkg_spec = PackageSpec::from_name_and_triplet(port->core_paragraph->name, default_triplet) + .value_or_exit(VCPKG_LINE_INFO); + scf_map[pkg_spec] = std::move(*port); + } + std::vector action_plan = + Dependencies::create_feature_install_plan(scf_map, full_specs, status_db); + // install plan will be empty if it is already installed - need to change this at status paragraph part + Checks::check_exit( + VCPKG_LINE_INFO, !action_plan.empty(), "Install plan cannot be empty for feature packages"); + + const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version), + Build::to_allow_downloads(!no_downloads)}; + + std::vector remove_plans; + + std::vector rebuilt_plans; + std::vector new_plans; + + // removal will happen before install + for (auto&& action : action_plan) + { + if (auto install_action = action.install_plan.get()) + { + auto it = Util::find_if( + remove_plans, [&](const RemovePlanAction* plan) { return plan->spec == install_action->spec; }); + if (it != remove_plans.end()) + { + rebuilt_plans.emplace_back(install_action); + } + else + { + new_plans.emplace_back(install_action); + } + } + else if (auto remove_action = action.remove_plan.get()) + { + remove_plans.emplace_back(remove_action); + } + } + + print_plan(rebuilt_plans, new_plans); + + if (remove_plans.size() > 0 && !isRecursive) + { + System::println(System::Color::warning, + "If you are sure you want to rebuild the above packages, run the command with the " + "--recurse option"); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + // execute the plan + for (const Dependencies::AnyAction& any_action : action_plan) + { + if (auto install_action = any_action.install_plan.get()) + { + const BuildResult result = + perform_install_plan_action(paths, *install_action, install_plan_options, status_db); + if (result != BuildResult::SUCCEEDED) + { + System::println(Build::create_user_troubleshooting_message(install_action->spec)); + Checks::exit_fail(VCPKG_LINE_INFO); + } + } + else if (auto remove_action = any_action.remove_plan.get()) + { + static const std::string OPTION_PURGE = "--purge"; + static const std::string OPTION_NO_PURGE = "--no-purge"; + + const bool alsoRemoveFolderFromPackages = options.find(OPTION_NO_PURGE) == options.end(); + if (options.find(OPTION_PURGE) != options.end() && !alsoRemoveFolderFromPackages) + { + // User specified --purge and --no-purge + System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge."); + System::print(example); + Checks::exit_fail(VCPKG_LINE_INFO); + } + const std::string display_name = remove_action->spec.to_string(); + switch (remove_action->plan_type) + { + case RemovePlanType::NOT_INSTALLED: + System::println(System::Color::success, "Package %s is not installed", display_name); + break; + case RemovePlanType::REMOVE: + System::println("Removing package %s... ", display_name); + Commands::Remove::remove_package(paths, remove_action->spec, &status_db); + System::println(System::Color::success, "Removing package %s... done", display_name); + break; + case RemovePlanType::UNKNOWN: + default: Checks::unreachable(VCPKG_LINE_INFO); + } + + if (alsoRemoveFolderFromPackages) + { + System::println("Purging package %s... ", display_name); + Files::Filesystem& fs = paths.get_filesystem(); + std::error_code ec; + fs.remove_all(paths.packages / remove_action->spec.dir(), ec); + System::println(System::Color::success, "Purging package %s... done", display_name); + } + } + } + + Checks::exit_success(VCPKG_LINE_INFO); + } + Dependencies::PathsPortFile paths_port_file(paths); std::vector install_plan = Dependencies::create_install_plan(paths_port_file, specs, status_db); diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index eabf2b9ae..e480f02dd 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -17,13 +17,19 @@ namespace vcpkg::Commands::Remove void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db) { auto& fs = paths.get_filesystem(); - StatusParagraph& pkg = **status_db->find(spec.name(), spec.triplet()); + auto spghs = status_db->find_all(spec.name(), spec.triplet()); + auto core_pkg = **status_db->find(spec.name(), spec.triplet(), ""); - pkg.want = Want::PURGE; - pkg.state = InstallState::HALF_INSTALLED; - write_update(paths, pkg); + for (auto&& spgh : spghs) + { + StatusParagraph& pkg = **spgh; + if (pkg.state != InstallState::INSTALLED) continue; + pkg.want = Want::PURGE; + pkg.state = InstallState::HALF_INSTALLED; + write_update(paths, pkg); + } - auto maybe_lines = fs.read_lines(paths.listfile_path(pkg.package)); + auto maybe_lines = fs.read_lines(paths.listfile_path(core_pkg.package)); if (auto lines = maybe_lines.get()) { @@ -80,11 +86,16 @@ namespace vcpkg::Commands::Remove } } - fs.remove(paths.listfile_path(pkg.package)); + fs.remove(paths.listfile_path(core_pkg.package)); } - pkg.state = InstallState::NOT_INSTALLED; - write_update(paths, pkg); + for (auto&& spgh : spghs) + { + StatusParagraph& pkg = **spgh; + if (pkg.state != InstallState::HALF_INSTALLED) continue; + pkg.state = InstallState::NOT_INSTALLED; + write_update(paths, pkg); + } } static void print_plan(const std::map>& group_by_plan_type) diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index fee99a5db..f12c25fb6 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -39,7 +39,7 @@ namespace vcpkg::Commands::Search s.append(Strings::format("%s;", name)); for (const Dependency& d : source_paragraph.depends) { - const std::string dependency_name = replace_dashes_with_underscore(d.name); + const std::string dependency_name = replace_dashes_with_underscore(d.name()); s.append(Strings::format("%s -> %s;", name, dependency_name)); } } diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index d02af5662..347998723 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -347,13 +347,13 @@ namespace UnitTest1 spec_map.get_package_spec( {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", ""}}, {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", "b[1]"}}, - {{"Feature", "2"}, {"Description", "the first feature for a"}, {"Build-Depends", "b[2]"}}, - {{"Feature", "3"}, {"Description", "the first feature for a"}, {"Build-Depends", "a[2]"}}}), + {{"Feature", "2"}, {"Description", "the second feature for a"}, {"Build-Depends", "b[2]"}}, + {{"Feature", "3"}, {"Description", "the third feature for a"}, {"Build-Depends", "a[2]"}}}), {"3"}}; auto spec_b = FullPackageSpec{spec_map.get_package_spec({ {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, - {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}, - {{"Feature", "2"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}, + {{"Feature", "1"}, {"Description", "the first feature for b"}, {"Build-Depends", ""}}, + {{"Feature", "2"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}}, })}; auto install_plan = Dependencies::create_feature_install_plan( @@ -434,7 +434,7 @@ namespace UnitTest1 {"1"}}; auto install_plan = Dependencies::create_feature_install_plan( - spec_map.map, {spec_b, spec_x}, StatusParagraphs(std::move(status_paragraphs))); + spec_map.map, {spec_b}, StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(5), install_plan.size()); remove_plan_check(&install_plan[0], "x"); @@ -523,5 +523,45 @@ namespace UnitTest1 features_check(&install_plan[6], "a", {"one", "core"}); features_check(&install_plan[7], "c", {"core"}); } + + TEST_METHOD(default_features_test) + { + using Pgh = std::unordered_map; + + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + + auto spec_a = FullPackageSpec{ + spec_map.get_package_spec( + {{{"Source", "a"}, {"Version", "1.3"}, {"Default-Features", "1, 2"}, {"Build-Depends", ""}}, + {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", "b[2]"}}, + {{"Feature", "2"}, {"Description", "the second feature for a"}, {"Build-Depends", ""}}, + {{"Feature", "3"}, {"Description", "the third feature for a"}, {"Build-Depends", ""}}}), + {""}}; + auto spec_b = FullPackageSpec{ + spec_map.get_package_spec({ + {{"Source", "b"}, {"Version", "1.3"}, {"Default-Features", "1, 2"}, {"Build-Depends", ""}}, + {{"Feature", "1"}, {"Description", "the first feature for b"}, {"Build-Depends", "c[1]"}}, + {{"Feature", "2"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}}, + }), + {""}}; + + auto spec_c = FullPackageSpec{ + spec_map.get_package_spec({ + {{"Source", "c"}, {"Version", "1.3"}, {"Default-Features", "2"}, {"Build-Depends", ""}}, + {{"Feature", "1"}, {"Description", "the first feature for c"}, {"Build-Depends", ""}}, + {{"Feature", "2"}, {"Description", "the second feature for c"}, {"Build-Depends", ""}}, + }), + {""}}; + + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(3), install_plan.size()); + features_check(&install_plan[0], "c", {"core", "1", "2"}); + features_check(&install_plan[1], "b", {"core", "1", "2"}); + features_check(&install_plan[2], "a", {"core", "1", "2"}); + } }; } \ No newline at end of file diff --git a/toolsrc/src/tests_dependencies.cpp b/toolsrc/src/tests_dependencies.cpp index 7a49bdbd0..26cc1e22c 100644 --- a/toolsrc/src/tests_dependencies.cpp +++ b/toolsrc/src/tests_dependencies.cpp @@ -17,7 +17,7 @@ namespace UnitTest1 { auto v = expand_qualified_dependencies(parse_comma_list("libA (windows)")); Assert::AreEqual(size_t(1), v.size()); - Assert::AreEqual("libA", v[0].name.c_str()); + Assert::AreEqual("libA", v[0].depend.name.c_str()); Assert::AreEqual("windows", v[0].qualifier.c_str()); } diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests_paragraph.cpp index af4b55498..3f2760c22 100644 --- a/toolsrc/src/tests_paragraph.cpp +++ b/toolsrc/src/tests_paragraph.cpp @@ -60,7 +60,7 @@ namespace UnitTest1 Assert::AreEqual("m", pgh->core_paragraph->maintainer.c_str()); Assert::AreEqual("d", pgh->core_paragraph->description.c_str()); Assert::AreEqual(size_t(1), pgh->core_paragraph->depends.size()); - Assert::AreEqual("bd", pgh->core_paragraph->depends[0].name.c_str()); + Assert::AreEqual("bd", pgh->core_paragraph->depends[0].name().c_str()); Assert::AreEqual(size_t(1), pgh->core_paragraph->supports.size()); Assert::AreEqual("x64", pgh->core_paragraph->supports[0].c_str()); } @@ -77,8 +77,8 @@ namespace UnitTest1 auto& pgh = *m_pgh.get(); Assert::AreEqual(size_t(2), pgh->core_paragraph->depends.size()); - Assert::AreEqual("z", pgh->core_paragraph->depends[0].name.c_str()); - Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name.c_str()); + Assert::AreEqual("z", pgh->core_paragraph->depends[0].name().c_str()); + Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name().c_str()); } TEST_METHOD(SourceParagraph_Three_Depends) @@ -93,9 +93,9 @@ namespace UnitTest1 auto& pgh = *m_pgh.get(); Assert::AreEqual(size_t(3), pgh->core_paragraph->depends.size()); - Assert::AreEqual("z", pgh->core_paragraph->depends[0].name.c_str()); - Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name.c_str()); - Assert::AreEqual("xyz", pgh->core_paragraph->depends[2].name.c_str()); + Assert::AreEqual("z", pgh->core_paragraph->depends[0].name().c_str()); + Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name().c_str()); + Assert::AreEqual("xyz", pgh->core_paragraph->depends[2].name().c_str()); } TEST_METHOD(SourceParagraph_Three_Supports) @@ -131,9 +131,9 @@ namespace UnitTest1 Assert::AreEqual("", pgh->core_paragraph->maintainer.c_str()); Assert::AreEqual("", pgh->core_paragraph->description.c_str()); Assert::AreEqual(size_t(2), pgh->core_paragraph->depends.size()); - Assert::AreEqual("libA", pgh->core_paragraph->depends[0].name.c_str()); + Assert::AreEqual("libA", pgh->core_paragraph->depends[0].name().c_str()); Assert::AreEqual("windows", pgh->core_paragraph->depends[0].qualifier.c_str()); - Assert::AreEqual("libB", pgh->core_paragraph->depends[1].name.c_str()); + Assert::AreEqual("libB", pgh->core_paragraph->depends[1].name().c_str()); Assert::AreEqual("uwp", pgh->core_paragraph->depends[1].qualifier.c_str()); } @@ -411,6 +411,18 @@ namespace UnitTest1 Assert::AreEqual(vcpkg::PackageSpecParseResult::TOO_MANY_COLONS, ec); } + TEST_METHOD(package_spec_feature_parse_with_arch) + { + vcpkg::ExpectedT spec = + vcpkg::FullPackageSpec::from_string("zlib[feature]:x64-uwp", vcpkg::Triplet::X86_WINDOWS); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, spec.error()); + Assert::AreEqual("zlib", spec.get()->package_spec.name().c_str()); + Assert::IsTrue(spec.get()->features.size() == 1); + Assert::AreEqual("feature", spec.get()->features.front().c_str()); + Assert::AreEqual(vcpkg::Triplet::X64_UWP.canonical_name(), + spec.get()->package_spec.triplet().canonical_name()); + } + TEST_METHOD(utf8_to_utf16) { auto str = vcpkg::Strings::to_utf16("abc"); diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index a0d690f37..124efb7f2 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -88,29 +88,37 @@ namespace vcpkg::Build return Strings::wformat(LR"("%s" %s %s %s 2>&1)", toolset.vcvarsall.native(), arch, target, tonull); } - static void create_binary_control_file(const VcpkgPaths& paths, - const SourceParagraph& source_paragraph, + static void create_binary_feature_control_file(const SourceParagraph& source_paragraph, + const FeatureParagraph& feature_paragraph, + const Triplet& triplet, + BinaryControlFile& bcf) + { + BinaryParagraph bpgh(source_paragraph, feature_paragraph, triplet); + bcf.features.emplace_back(std::move(bpgh)); + } + + static void create_binary_control_file(const SourceParagraph& source_paragraph, const Triplet& triplet, - const BuildInfo& build_info) + const BuildInfo& build_info, + BinaryControlFile& bcf) { - BinaryParagraph bpgh = BinaryParagraph(source_paragraph, triplet); + BinaryParagraph bpgh(source_paragraph, triplet); if (auto p_ver = build_info.version.get()) { bpgh.version = *p_ver; } - const fs::path binary_control_file = paths.packages / bpgh.dir() / "CONTROL"; - paths.get_filesystem().write_contents(binary_control_file, Strings::serialize(bpgh)); + bcf.core_paragraph = std::move(bpgh); } - static void create_binary_feature_control_file(const VcpkgPaths& paths, - const SourceParagraph& source_paragraph, - const FeatureParagraph& feature_paragraph, - const Triplet& triplet, - const BuildInfo& build_info) + static void write_binary_control_file(const VcpkgPaths& paths, BinaryControlFile bcf) { - BinaryParagraph bpgh = BinaryParagraph(source_paragraph, feature_paragraph, triplet); - const fs::path binary_control_file = paths.packages / bpgh.dir() / "CONTROL"; - paths.get_filesystem().write_contents(binary_control_file, Strings::serialize(bpgh)); + std::string start = Strings::serialize(bcf.core_paragraph); + for (auto&& feature : bcf.features) + { + start += "\n" + Strings::serialize(feature); + } + const fs::path binary_control_file = paths.packages / bcf.core_paragraph.dir() / "CONTROL"; + paths.get_filesystem().write_contents(binary_control_file, start); } ExtendedBuildResult build_package(const VcpkgPaths& paths, @@ -196,6 +204,10 @@ namespace vcpkg::Build auto build_info = 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); + BinaryControlFile bcf; + + create_binary_control_file(config.src, triplet, build_info, bcf); + if (error_count != 0) { return {BuildResult::POST_BUILD_CHECKS_FAILED, {}}; @@ -209,13 +221,13 @@ namespace vcpkg::Build for (auto&& f_pgh : config.scf->feature_paragraphs) { if (f_pgh->name == feature) - create_binary_feature_control_file( - paths, *config.scf->core_paragraph, *f_pgh, triplet, build_info); + create_binary_feature_control_file(*config.scf->core_paragraph, *f_pgh, triplet, bcf); } } } } - create_binary_control_file(paths, config.src, triplet, build_info); + + write_binary_control_file(paths, bcf); // const fs::path port_buildtrees_dir = paths.buildtrees / spec.name; // delete_directory(port_buildtrees_dir); diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 820e51b33..c84ca73f3 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -101,6 +101,25 @@ namespace vcpkg::Dependencies this->plan_type = InstallPlanType::UNKNOWN; } + std::string InstallPlanAction::displayname() const + { + if (this->feature_list.empty()) + { + return this->spec.to_string(); + } + else + { + std::string features; + for (auto&& feature : this->feature_list) + { + features += feature + ","; + } + features.pop_back(); + + return this->spec.name() + "[" + features + "]:" + this->spec.triplet().to_string(); + } + } + bool InstallPlanAction::compare_by_name(const InstallPlanAction* left, const InstallPlanAction* right) { return left->spec.name() < right->spec.name(); @@ -319,9 +338,9 @@ namespace vcpkg::Dependencies ? RequestType::USER_REQUESTED : RequestType::AUTO_SELECTED; - Expected maybe_bpgh = Paragraphs::try_load_cached_package(paths, spec); - if (auto bpgh = maybe_bpgh.get()) - return ExportPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type}; + Expected maybe_bpgh = Paragraphs::try_load_cached_control_package(paths, spec); + if (auto bcf = maybe_bpgh.get()) + return ExportPlanAction{spec, {nullopt, bcf->core_paragraph, nullopt}, request_type}; auto maybe_scf = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); if (auto scf = maybe_scf.get()) @@ -366,6 +385,20 @@ namespace vcpkg::Dependencies return f_specs; } + void mark_plus_default(Cluster& cluster, + std::unordered_map& pkg_to_cluster, + GraphPlan& graph_plan) + { + mark_plus("core", cluster, pkg_to_cluster, graph_plan); + if (auto scf = cluster.source_control_file.get()) + { + for (auto&& default_feature : (*scf)->core_paragraph->default_features) + { + mark_plus(default_feature, cluster, pkg_to_cluster, graph_plan); + } + } + } + bool mark_plus(const std::string& feature, Cluster& cluster, std::unordered_map& pkg_to_cluster, @@ -404,21 +437,12 @@ namespace vcpkg::Dependencies graph_plan.install_graph.add_vertex({&cluster}); auto& tracked = cluster.to_install_features; tracked.insert(updated_feature); - if (tracked.find("core") == tracked.end() && tracked.find("") == tracked.end()) - { - cluster.to_install_features.insert("core"); - for (auto&& depend : cluster.edges["core"].build_edges) - { - auto& depend_cluster = pkg_to_cluster[depend.spec]; - mark_plus(depend.feature_name, depend_cluster, pkg_to_cluster, graph_plan); - graph_plan.install_graph.add_edge({&cluster}, {&depend_cluster}); - } - } for (auto&& depend : cluster.edges[updated_feature].build_edges) { auto& depend_cluster = pkg_to_cluster[depend.spec]; mark_plus(depend.feature_name, depend_cluster, pkg_to_cluster, graph_plan); + mark_plus_default(depend_cluster, pkg_to_cluster, graph_plan); if (&depend_cluster == &cluster) continue; graph_plan.install_graph.add_edge({&cluster}, {&depend_cluster}); } @@ -448,6 +472,7 @@ namespace vcpkg::Dependencies mark_plus(original_feature, cluster, pkg_to_cluster, graph_plan); } } + std::vector create_feature_install_plan(const std::unordered_map& map, const std::vector& specs, const StatusParagraphs& status_db) @@ -515,6 +540,7 @@ namespace vcpkg::Dependencies for (auto&& spec : specs) { Cluster& spec_cluster = pkg_spec_to_package_node[spec.package_spec]; + mark_plus_default(spec_cluster, pkg_spec_to_package_node, graph_plan); for (auto&& feature : spec.features) { mark_plus(feature, spec_cluster, pkg_spec_to_package_node, graph_plan); diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp index 6b180b532..428ae090d 100644 --- a/toolsrc/src/vcpkglib.cpp +++ b/toolsrc/src/vcpkglib.cpp @@ -191,7 +191,7 @@ namespace vcpkg for (const std::unique_ptr& pgh : status_db) { - if (pgh->state != InstallState::INSTALLED) + if (pgh->state != InstallState::INSTALLED || pgh->package.feature != "") { continue; } -- cgit v1.2.3 From 14c4ff0234ae10fa2237d85e29d155c29e6d17c1 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 16 Aug 2017 18:12:08 -0700 Subject: [libharu] Fixes #1652 --- ports/libharu/portfile.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/libharu/portfile.cmake b/ports/libharu/portfile.cmake index 1777b1c11..a1ae49816 100644 --- a/ports/libharu/portfile.cmake +++ b/ports/libharu/portfile.cmake @@ -9,7 +9,6 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS_DEBUG -DLIBHPDF_DEBUG=ON ) vcpkg_build_cmake() @@ -34,7 +33,7 @@ file(GLOB DEBUG_LIBS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" ) -file(GLOB HEADERS "${SOURCE_PATH}/include/*.h" "${CMAKE_BINARY_DIR}/include/*.h") +file(GLOB HEADERS "${SOURCE_PATH}/include/*.h" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/include/*.h") if(DLLS) file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -- cgit v1.2.3 From 779307a10e836640fb3cf1623e6fa8261b629115 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 18 Aug 2017 08:36:34 -0700 Subject: [ffmpeg] update to 3.3.3 --- ports/ffmpeg/CONTROL | 4 ++-- ports/ffmpeg/portfile.cmake | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 443003d92..658c4b1f2 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,4 +1,4 @@ Source: ffmpeg -Version: 3.2.4-3 +Version: 3.3.3 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. \ No newline at end of file + 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/portfile.cmake b/ports/ffmpeg/portfile.cmake index de17e2851..8bd7abab0 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -4,11 +4,11 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ffmpeg-3.2.4) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ffmpeg-3.3.3) vcpkg_download_distfile(ARCHIVE - URLS "http://ffmpeg.org/releases/ffmpeg-3.2.4.tar.bz2" - FILENAME "ffmpeg-3.2.4.tar.bz2" - SHA512 ba5004d0f2659faa139c7dbf2f0fc6bab1d4e017d919f4ac271a5d2e8e4a3478909176e3a4d1ad33ddf2f62ab28dd9e00ce9be1399efb7cb3276dde79134cdaa + URLS "http://ffmpeg.org/releases/ffmpeg-3.3.3.tar.bz2" + FILENAME "ffmpeg-3.3.3.tar.bz2" + SHA512 1cc63bf73356f4e618c0d3572a216bdf5689f10deff56b4262f6d740b0bee5a4b3eac234f45fca3d4d2da77903a507b4fba725b76d2d2070f31b6dae9e7a2dab ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 1b304fff8c3b2e450d244d668d2f68163bdbf0a0 Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 18 Aug 2017 20:05:55 +0200 Subject: [lz4] update to 1.8.0 --- ports/lz4/CMakeLists.txt | 2 +- ports/lz4/CONTROL | 2 +- ports/lz4/auto-define-import-macro.patch | 28 ---------------------------- ports/lz4/portfile.cmake | 29 +++++++++++++++-------------- 4 files changed, 17 insertions(+), 44 deletions(-) delete mode 100644 ports/lz4/auto-define-import-macro.patch diff --git a/ports/lz4/CMakeLists.txt b/ports/lz4/CMakeLists.txt index a5366f5ab..b082ab374 100644 --- a/ports/lz4/CMakeLists.txt +++ b/ports/lz4/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.0) -project(lz4) +project(lz4 C) if(BUILD_SHARED_LIBS) add_definitions(-DLZ4_DLL_EXPORT) diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL index b48ba5424..c6d730c2d 100644 --- a/ports/lz4/CONTROL +++ b/ports/lz4/CONTROL @@ -1,3 +1,3 @@ Source: lz4 -Version: 1.7.5 +Version: 1.8.0 Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core. diff --git a/ports/lz4/auto-define-import-macro.patch b/ports/lz4/auto-define-import-macro.patch deleted file mode 100644 index 314c228db..000000000 --- a/ports/lz4/auto-define-import-macro.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/lz4.h b/lz4.h -index 7420ad8..c1c3e56 100644 ---- a/lz4.h -+++ b/lz4.h -@@ -73,6 +73,9 @@ extern "C" { - * LZ4_DLL_EXPORT : - * Enable exporting of functions when building a Windows DLL - */ -+ -+#define LZ4_DLL_IMPORT 1 -+ - #if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) - # define LZ4LIB_API __declspec(dllexport) - #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) -diff --git a/lz4frame.h b/lz4frame.h -index 3104d2e..4442461 100644 ---- a/lz4frame.h -+++ b/lz4frame.h -@@ -55,6 +55,9 @@ extern "C" { - * LZ4_DLL_EXPORT : - * Enable exporting of functions when building a Windows DLL - */ -+ -+#define LZ4_DLL_IMPORT 1 -+ - #if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1) - # define LZ4FLIB_API __declspec(dllexport) - #elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1) diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake index dc6f80ed9..6664c2b79 100644 --- a/ports/lz4/portfile.cmake +++ b/ports/lz4/portfile.cmake @@ -1,12 +1,10 @@ - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lz4-1.7.5) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/lz4/lz4/archive/v1.7.5.zip" - FILENAME "lz4-1.7.5.zip" - SHA512 09968b67a5cd8555f6e1d95b99971a82d228c6d8d9f9dd9e9a33c9633bed9bcf1e370c2ff44e58c6ca72d103c149585b3e83061c690f3e857eb5f53d586f86a4) - -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lz4/lz4 + REF v1.8.0 + SHA512 aea46d4a900a3ede7dd7b498ee938ecd98397d3277c5b3a85b4236a44777cba85cd68a2f32c993b872afda96c5dafe0cb3dd391101fe8181e17c9f48884c1535 + HEAD_REF dev) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -19,12 +17,15 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/auto-define-import-macro.patch) -endif() +foreach(FILE lz4.h lz4frame.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/${FILE} LZ4_HEADER) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" "1" LZ4_HEADER "${LZ4_HEADER}") + else() + string(REPLACE "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" "0" LZ4_HEADER "${LZ4_HEADER}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/${FILE} "${LZ4_HEADER}") +endforeach() file(COPY ${SOURCE_PATH}/lib/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/lz4) file(RENAME ${CURRENT_PACKAGES_DIR}/share/lz4/LICENSE ${CURRENT_PACKAGES_DIR}/share/lz4/copyright) -- cgit v1.2.3 From aab0173509c89746f8988b000854d2ed8c9115e7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 18 Aug 2017 16:22:52 -0700 Subject: [vcpkg] Fix rebase build. --- toolsrc/src/commands_depends.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/commands_depends.cpp b/toolsrc/src/commands_depends.cpp index b04af5282..49e1c6c01 100644 --- a/toolsrc/src/commands_depends.cpp +++ b/toolsrc/src/commands_depends.cpp @@ -33,7 +33,7 @@ namespace vcpkg::Commands::DependInfo for (const Dependency& dependency : source_paragraph.depends) { - if (Strings::case_insensitive_ascii_contains(dependency.name, filter)) + if (Strings::case_insensitive_ascii_contains(dependency.name(), filter)) { return false; } -- cgit v1.2.3 From 4d34488649fe5d71b8a553706d960a3784c56bb1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 18 Aug 2017 20:32:35 -0700 Subject: [vcpkg] Consolidate specifier parsing --- toolsrc/include/PackageSpec.h | 9 ++++ toolsrc/include/vcpkg_Checks.h | 7 ++- toolsrc/src/PackageSpec.cpp | 101 +++++++++++++++++++++---------------- toolsrc/src/SourceParagraph.cpp | 30 ++++++----- toolsrc/src/tests_paragraph.cpp | 61 +++++++++++++--------- toolsrc/src/vcpkg_Dependencies.cpp | 26 +++++----- 6 files changed, 139 insertions(+), 95 deletions(-) diff --git a/toolsrc/include/PackageSpec.h b/toolsrc/include/PackageSpec.h index 15b5e5b9b..77a14e90e 100644 --- a/toolsrc/include/PackageSpec.h +++ b/toolsrc/include/PackageSpec.h @@ -6,6 +6,15 @@ namespace vcpkg { + struct ParsedSpecifier + { + std::string name; + std::vector features; + std::string triplet; + + static ExpectedT from_string(const std::string& input); + }; + struct PackageSpec { static std::string to_string(const std::string& name, const Triplet& triplet); diff --git a/toolsrc/include/vcpkg_Checks.h b/toolsrc/include/vcpkg_Checks.h index 6d8ff5711..754b44f75 100644 --- a/toolsrc/include/vcpkg_Checks.h +++ b/toolsrc/include/vcpkg_Checks.h @@ -5,18 +5,23 @@ namespace vcpkg::Checks { + // Indicate that an internal error has occurred and exit the tool. This should be used when invariants have been + // broken. [[noreturn]] void unreachable(const LineInfo& line_info); [[noreturn]] void exit_with_code(const LineInfo& line_info, const int exit_code); + // Exit the tool without an error message. [[noreturn]] inline void exit_fail(const LineInfo& line_info) { exit_with_code(line_info, EXIT_FAILURE); } + // Exit the tool successfully. [[noreturn]] inline void exit_success(const LineInfo& line_info) { exit_with_code(line_info, EXIT_SUCCESS); } - // Part of the reason these exist is to not include extra headers in this one to avoid circular #includes. + // Display an error message to the user and exit the tool. [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView errorMessage); template + // Display an error message to the user and exit the tool. [[noreturn]] void exit_with_message(const LineInfo& line_info, const char* errorMessageTemplate, const Arg1 errorMessageArg1, diff --git a/toolsrc/src/PackageSpec.cpp b/toolsrc/src/PackageSpec.cpp index a7e5648cd..e243f4d89 100644 --- a/toolsrc/src/PackageSpec.cpp +++ b/toolsrc/src/PackageSpec.cpp @@ -13,52 +13,16 @@ namespace vcpkg ExpectedT FullPackageSpec::from_string(const std::string& spec_as_string, const Triplet& default_triplet) { - auto pos = spec_as_string.find(':'); - auto pos_l_bracket = spec_as_string.find('['); - auto pos_r_bracket = spec_as_string.find(']'); - - FullPackageSpec f; - if (pos == std::string::npos && pos_l_bracket == std::string::npos) - { - f.package_spec = - PackageSpec::from_name_and_triplet(spec_as_string, default_triplet).value_or_exit(VCPKG_LINE_INFO); - return f; - } - else if (pos == std::string::npos) - { - if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket) - { - return PackageSpecParseResult::INVALID_CHARACTERS; - } - const std::string name = spec_as_string.substr(0, pos_l_bracket); - f.package_spec = PackageSpec::from_name_and_triplet(name, default_triplet).value_or_exit(VCPKG_LINE_INFO); - f.features = parse_comma_list(spec_as_string.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1)); - return f; - } - else if (pos_l_bracket == std::string::npos && pos_r_bracket == std::string::npos) - { - const std::string name = spec_as_string.substr(0, pos); - const Triplet triplet = Triplet::from_canonical_name(spec_as_string.substr(pos + 1)); - f.package_spec = PackageSpec::from_name_and_triplet(name, triplet).value_or_exit(VCPKG_LINE_INFO); - } - else + auto res = ParsedSpecifier::from_string(spec_as_string); + if (auto p = res.get()) { - if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket) - { - return PackageSpecParseResult::INVALID_CHARACTERS; - } - const std::string name = spec_as_string.substr(0, pos_l_bracket); - f.features = parse_comma_list(spec_as_string.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1)); - const Triplet triplet = Triplet::from_canonical_name(spec_as_string.substr(pos + 1)); - f.package_spec = PackageSpec::from_name_and_triplet(name, triplet).value_or_exit(VCPKG_LINE_INFO); + FullPackageSpec fspec; + Triplet t = p->triplet.empty() ? default_triplet : Triplet::from_canonical_name(p->triplet); + fspec.package_spec = PackageSpec::from_name_and_triplet(p->name, t).value_or_exit(VCPKG_LINE_INFO); + fspec.features = std::move(p->features); + return fspec; } - - auto pos2 = spec_as_string.find(':', pos + 1); - if (pos2 != std::string::npos) - { - return PackageSpecParseResult::TOO_MANY_COLONS; - } - return f; + return res.error(); } ExpectedT PackageSpec::from_name_and_triplet(const std::string& name, @@ -93,4 +57,53 @@ namespace vcpkg } bool operator!=(const PackageSpec& left, const PackageSpec& right) { return !(left == right); } + + ExpectedT ParsedSpecifier::from_string(const std::string& input) + { + auto pos = input.find(':'); + auto pos_l_bracket = input.find('['); + auto pos_r_bracket = input.find(']'); + + ParsedSpecifier f; + if (pos == std::string::npos && pos_l_bracket == std::string::npos) + { + f.name = input; + return f; + } + else if (pos == std::string::npos) + { + if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket) + { + return PackageSpecParseResult::INVALID_CHARACTERS; + } + const std::string name = input.substr(0, pos_l_bracket); + f.name = name; + f.features = parse_comma_list(input.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1)); + return f; + } + else if (pos_l_bracket == std::string::npos && pos_r_bracket == std::string::npos) + { + const std::string name = input.substr(0, pos); + f.triplet = input.substr(pos + 1); + f.name = name; + } + else + { + if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket) + { + return PackageSpecParseResult::INVALID_CHARACTERS; + } + const std::string name = input.substr(0, pos_l_bracket); + f.features = parse_comma_list(input.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1)); + f.triplet = input.substr(pos + 1); + f.name = name; + } + + auto pos2 = input.find(':', pos + 1); + if (pos2 != std::string::npos) + { + return PackageSpecParseResult::TOO_MANY_COLONS; + } + return f; + } } diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 2aab7c572..f9ae6854a 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -1,5 +1,6 @@ #include "pch.h" +#include "PackageSpec.h" #include "SourceParagraph.h" #include "Triplet.h" #include "vcpkg_Checks.h" @@ -28,7 +29,11 @@ namespace vcpkg static span get_list_of_valid_fields() { static const std::string valid_fields[] = { - Fields::SOURCE, Fields::VERSION, Fields::DESCRIPTION, Fields::MAINTAINER, Fields::BUILD_DEPENDS, + Fields::SOURCE, + Fields::VERSION, + Fields::DESCRIPTION, + Fields::MAINTAINER, + Fields::BUILD_DEPENDS, }; return valid_fields; @@ -154,21 +159,20 @@ namespace vcpkg Features parse_feature_list(const std::string& name) { - Features f; - int end = (int)name.find(']'); - if (end != std::string::npos) + auto maybe_spec = ParsedSpecifier::from_string(name); + if (auto spec = maybe_spec.get()) { - int start = (int)name.find('['); + Checks::check_exit( + VCPKG_LINE_INFO, spec->triplet.empty(), "error: triplet not allowed in specifier: %s", name); - auto feature_name_list = name.substr(start + 1, end - start - 1); - f.name = name.substr(0, start); - f.features = parse_comma_list(feature_name_list); + Features f; + f.name = spec->name; + f.features = spec->features; + return f; } - else - { - f.name = name; - } - return f; + + Checks::exit_with_message( + VCPKG_LINE_INFO, "error while parsing feature list: %s: %s", to_string(maybe_spec.error()), name); } Dependency Dependency::parse_dependency(std::string name, std::string qualifier) diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests_paragraph.cpp index 3f2760c22..1fd950e19 100644 --- a/toolsrc/src/tests_paragraph.cpp +++ b/toolsrc/src/tests_paragraph.cpp @@ -385,42 +385,53 @@ namespace UnitTest1 Assert::AreEqual("a, b, c", pghs[0]["Depends"].c_str()); } - TEST_METHOD(package_spec_parse) + TEST_METHOD(parsed_specifier_from_string) { - vcpkg::ExpectedT spec = - vcpkg::FullPackageSpec::from_string("zlib", vcpkg::Triplet::X86_WINDOWS); - Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, spec.error()); - Assert::AreEqual("zlib", spec.get()->package_spec.name().c_str()); - Assert::AreEqual(vcpkg::Triplet::X86_WINDOWS.canonical_name(), - spec.get()->package_spec.triplet().canonical_name()); + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::AreEqual(size_t(0), spec->features.size()); + Assert::AreEqual("", spec->triplet.c_str()); } - TEST_METHOD(package_spec_parse_with_arch) + TEST_METHOD(parsed_specifier_from_string_with_triplet) { - vcpkg::ExpectedT spec = - vcpkg::FullPackageSpec::from_string("zlib:x64-uwp", vcpkg::Triplet::X86_WINDOWS); - Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, spec.error()); - Assert::AreEqual("zlib", spec.get()->package_spec.name().c_str()); - Assert::AreEqual(vcpkg::Triplet::X64_UWP.canonical_name(), - spec.get()->package_spec.triplet().canonical_name()); + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib:x64-uwp"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::AreEqual("x64-uwp", spec->triplet.c_str()); } - TEST_METHOD(package_spec_parse_with_multiple_colon) + TEST_METHOD(parsed_specifier_from_string_with_colons) { - auto ec = vcpkg::FullPackageSpec::from_string("zlib:x86-uwp:", vcpkg::Triplet::X86_WINDOWS).error(); + auto ec = vcpkg::ParsedSpecifier::from_string("zlib:x86-uwp:").error(); Assert::AreEqual(vcpkg::PackageSpecParseResult::TOO_MANY_COLONS, ec); } - TEST_METHOD(package_spec_feature_parse_with_arch) + TEST_METHOD(parsed_specifier_from_string_with_feature) { - vcpkg::ExpectedT spec = - vcpkg::FullPackageSpec::from_string("zlib[feature]:x64-uwp", vcpkg::Triplet::X86_WINDOWS); - Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, spec.error()); - Assert::AreEqual("zlib", spec.get()->package_spec.name().c_str()); - Assert::IsTrue(spec.get()->features.size() == 1); - Assert::AreEqual("feature", spec.get()->features.front().c_str()); - Assert::AreEqual(vcpkg::Triplet::X64_UWP.canonical_name(), - spec.get()->package_spec.triplet().canonical_name()); + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[feature]:x64-uwp"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::IsTrue(spec->features.size() == 1); + Assert::AreEqual("feature", spec->features.front().c_str()); + Assert::AreEqual("x64-uwp", spec->triplet.c_str()); + } + + TEST_METHOD(parsed_specifier_from_string_with_many_features) + { + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[0, 1,2]"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::IsTrue(spec->features.size() == 3); + Assert::AreEqual("0", spec->features[0].c_str()); + Assert::AreEqual("1", spec->features[1].c_str()); + Assert::AreEqual("2", spec->features[2].c_str()); + Assert::AreEqual("", spec->triplet.c_str()); } TEST_METHOD(utf8_to_utf16) diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index c84ca73f3..799bca439 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -363,23 +363,25 @@ namespace vcpkg::Dependencies std::vector f_specs; for (auto&& depend : depends) { - int end = (int)depend.find(']'); - if (end != std::string::npos) + auto maybe_spec = ParsedSpecifier::from_string(depend); + if (auto spec = maybe_spec.get()) { - int start = (int)depend.find('['); + Checks::check_exit(VCPKG_LINE_INFO, + spec->triplet.empty(), + "error: triplets cannot currently be specified in this context: %s", + depend); + PackageSpec pspec = + PackageSpec::from_name_and_triplet(spec->name, triplet).value_or_exit(VCPKG_LINE_INFO); - auto feature_name = depend.substr(start + 1, end - start - 1); - auto package_name = depend.substr(0, start); - auto p_spec = PackageSpec::from_name_and_triplet(package_name, triplet).value_or_exit(VCPKG_LINE_INFO); - auto feature_spec = FeatureSpec{p_spec, feature_name}; - f_specs.emplace_back(std::move(feature_spec)); + for (auto&& feature : spec->features) + f_specs.push_back(FeatureSpec{pspec, feature}); + + if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, ""}); } else { - auto p_spec = PackageSpec::from_name_and_triplet(depend, triplet).value_or_exit(VCPKG_LINE_INFO); - - auto feature_spec = FeatureSpec{p_spec, ""}; - f_specs.emplace_back(std::move(feature_spec)); + Checks::exit_with_message( + VCPKG_LINE_INFO, "error while parsing feature list: %s: %s", to_string(maybe_spec.error()), depend); } } return f_specs; -- cgit v1.2.3 From 3d111fedeac82a36aff98d83b5a64834e5c1b671 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 19 Aug 2017 20:00:54 +0200 Subject: [spdlog] update to 0.14.0 --- ports/spdlog/CONTROL | 2 +- ports/spdlog/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/spdlog/CONTROL b/ports/spdlog/CONTROL index 540e4eb5e..e060a2665 100644 --- a/ports/spdlog/CONTROL +++ b/ports/spdlog/CONTROL @@ -1,4 +1,4 @@ Source: spdlog -Version: 0.13.0 +Version: 0.14.0 Description: Very fast, header only, C++ logging library Build-Depends: fmt diff --git a/ports/spdlog/portfile.cmake b/ports/spdlog/portfile.cmake index c0adbf457..8cd05f343 100644 --- a/ports/spdlog/portfile.cmake +++ b/ports/spdlog/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gabime/spdlog - REF v0.13.0 - SHA512 5bb89cbeb17a054832ce70f6013d54e7641c1aa36cbad08388b4a2e63f4851943edfe292551ff01de6de1ed6325617384325a67f3e1024f346c6d22a1148c80c + REF v0.14.0 + SHA512 f49b7f26f4fde57fe16f32ab89082f0c590645c627f5b4646f633a16f3eec2926b3465e742bc4899cb802e7b974978c547638205065e9955ed9696fbcaf0b444 HEAD_REF master ) -- cgit v1.2.3 From 73a02b9f70ac1cf27f7ab2aca023e0b0370a0762 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sat, 19 Aug 2017 23:29:24 +0300 Subject: [lcms] fix header file * fix header file * prefer ninja * use github --- ports/lcms/CMakeLists.txt | 5 +++++ ports/lcms/CONTROL | 2 +- ports/lcms/portfile.cmake | 25 +++++++++++-------------- ports/lcms/shared.patch | 2 +- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/ports/lcms/CMakeLists.txt b/ports/lcms/CMakeLists.txt index cd69bab3b..809fe505e 100644 --- a/ports/lcms/CMakeLists.txt +++ b/ports/lcms/CMakeLists.txt @@ -34,6 +34,11 @@ set(SRCS ) add_definitions(-DUNICODE -D_UNICODE) + +if(BUILD_SHARED_LIBS) + add_definitions(-DCMS_DLL_BUILD) +endif() + string(REPLACE "/utf-8" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") include_directories( diff --git a/ports/lcms/CONTROL b/ports/lcms/CONTROL index 2349503e9..b8c222333 100644 --- a/ports/lcms/CONTROL +++ b/ports/lcms/CONTROL @@ -1,4 +1,4 @@ Source: lcms -Version: 2.8-1 +Version: 2.8-2 Build-Depends: Description: Little CMS. \ No newline at end of file diff --git a/ports/lcms/portfile.cmake b/ports/lcms/portfile.cmake index 4487cce6a..600720858 100644 --- a/ports/lcms/portfile.cmake +++ b/ports/lcms/portfile.cmake @@ -1,26 +1,23 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lcms2-2.8) -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/lcms/files/lcms/2.8/lcms2-2.8.tar.gz/download" - FILENAME "lcms2-2.8.tar.gz" - SHA512 a9478885b4892c79314a2ef9ab560e6655ac8f2d17abae0805e8b871138bb190e21f0e5c805398449f9dad528dc50baaf9e3cce8b8158eb8ff74179be5733f8f -) -vcpkg_extract_source_archive(${ARCHIVE}) -message(STATUS ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mm2/Little-CMS + REF lcms2.8 + SHA512 ad904ce8acead6c8e255feb8386c1ab3fa432c3b36a3b521bc5c50993cb47ce4d42be0ad240dd8dd3bfeb3c0e884d8184f58797da5ef297b2f9a0e7da9788644 + HEAD_REF master +) -set(USE_SHARED_LIBRARY OFF) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(USE_SHARED_LIBRARY ON) -endif() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) +vcpkg_build_cmake() vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lcms RENAME copyright) @@ -32,4 +29,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) vcpkg_apply_patches( SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include PATCHES "${CMAKE_CURRENT_LIST_DIR}/shared.patch") -endif(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +endif() diff --git a/ports/lcms/shared.patch b/ports/lcms/shared.patch index b3e7bf75f..2d7506c52 100644 --- a/ports/lcms/shared.patch +++ b/ports/lcms/shared.patch @@ -4,7 +4,7 @@ #endif // CMS_USE_BIG_ENDIAN -+#define CMS_DLL_BUILD ++#define CMS_DLL // Calling convention -- this is hardly platform and compiler dependent #ifdef CMS_IS_WINDOWS_ -- cgit v1.2.3 From 7f9e9574a30bb2b2d9a2803d83eb7f80529b1b28 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 19 Aug 2017 18:55:40 -0700 Subject: [lcms] Remove vcpkg_build_cmake() --- ports/lcms/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/lcms/portfile.cmake b/ports/lcms/portfile.cmake index 600720858..7a043d1f2 100644 --- a/ports/lcms/portfile.cmake +++ b/ports/lcms/portfile.cmake @@ -17,7 +17,6 @@ vcpkg_configure_cmake( -DSKIP_INSTALL_HEADERS=ON ) -vcpkg_build_cmake() vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lcms RENAME copyright) -- cgit v1.2.3 From f219ce0b8c3e84e5fc1df21ad2f2c8b13f0fe413 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 19 Aug 2017 19:27:34 -0700 Subject: [vcpkg] Reorganize some parsing functions. --- toolsrc/include/PackageSpec.h | 11 ++++++-- toolsrc/include/SourceParagraph.h | 12 +------- toolsrc/include/vcpkg_Parse.h | 2 ++ toolsrc/src/PackageSpec.cpp | 26 +++++++++++++---- toolsrc/src/SourceParagraph.cpp | 57 ++++---------------------------------- toolsrc/src/tests_dependencies.cpp | 15 ++++++++-- toolsrc/src/vcpkg_Parse.cpp | 33 ++++++++++++++++++++++ 7 files changed, 84 insertions(+), 72 deletions(-) diff --git a/toolsrc/include/PackageSpec.h b/toolsrc/include/PackageSpec.h index 77a14e90e..8e986b4d6 100644 --- a/toolsrc/include/PackageSpec.h +++ b/toolsrc/include/PackageSpec.h @@ -1,6 +1,6 @@ #pragma once + #include "PackageSpecParseResult.h" -#include "SourceParagraph.h" #include "Triplet.h" #include "vcpkg_expected.h" @@ -17,7 +17,6 @@ namespace vcpkg struct PackageSpec { - static std::string to_string(const std::string& name, const Triplet& triplet); static ExpectedT from_name_and_triplet(const std::string& name, const Triplet& triplet); @@ -43,6 +42,14 @@ namespace vcpkg const Triplet& default_triplet); }; + struct Features + { + std::string name; + std::vector features; + + static ExpectedT from_string(const std::string& input); + }; + bool operator==(const PackageSpec& left, const PackageSpec& right); bool operator!=(const PackageSpec& left, const PackageSpec& right); } diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index fee61c3e8..d938e2e3b 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -1,5 +1,6 @@ #pragma once +#include "PackageSpec.h" #include "Span.h" #include "vcpkg_Parse.h" #include "vcpkg_System.h" @@ -13,16 +14,6 @@ namespace vcpkg { extern bool g_feature_packages; - struct Triplet; - - struct Features - { - std::string name; - std::vector features; - }; - - Features parse_feature_list(const std::string& name); - struct Dependency { Features depend; @@ -73,7 +64,6 @@ namespace vcpkg // zlib[uwp] becomes Dependency{"zlib", "uwp"} std::vector expand_qualified_dependencies(const std::vector& depends); - std::vector parse_comma_list(const std::string& str); struct Supports { diff --git a/toolsrc/include/vcpkg_Parse.h b/toolsrc/include/vcpkg_Parse.h index a2eb152dc..e663448b9 100644 --- a/toolsrc/include/vcpkg_Parse.h +++ b/toolsrc/include/vcpkg_Parse.h @@ -33,4 +33,6 @@ namespace vcpkg::Parse RawParagraph&& fields; std::vector missing_fields; }; + + std::vector parse_comma_list(const std::string& str); } diff --git a/toolsrc/src/PackageSpec.cpp b/toolsrc/src/PackageSpec.cpp index e243f4d89..475b3e3f6 100644 --- a/toolsrc/src/PackageSpec.cpp +++ b/toolsrc/src/PackageSpec.cpp @@ -1,8 +1,11 @@ #include "pch.h" #include "PackageSpec.h" +#include "vcpkg_Parse.h" #include "vcpkg_Util.h" +using vcpkg::Parse::parse_comma_list; + namespace vcpkg { static bool is_valid_package_spec_char(char c) @@ -45,11 +48,7 @@ namespace vcpkg std::string PackageSpec::dir() const { return Strings::format("%s_%s", this->m_name, this->m_triplet); } - std::string PackageSpec::to_string(const std::string& name, const Triplet& triplet) - { - return Strings::format("%s:%s", name, triplet); - } - std::string PackageSpec::to_string() const { return to_string(this->name(), this->triplet()); } + std::string PackageSpec::to_string() const { return Strings::format("%s:%s", this->name(), this->triplet()); } bool operator==(const PackageSpec& left, const PackageSpec& right) { @@ -106,4 +105,21 @@ namespace vcpkg } return f; } + + ExpectedT Features::from_string(const std::string& name) + { + auto maybe_spec = ParsedSpecifier::from_string(name); + if (auto spec = maybe_spec.get()) + { + Checks::check_exit( + VCPKG_LINE_INFO, spec->triplet.empty(), "error: triplet not allowed in specifier: %s", name); + + Features f; + f.name = spec->name; + f.features = spec->features; + return f; + } + + return maybe_spec.error(); + } } diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index f9ae6854a..76c5a2004 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -157,29 +157,15 @@ namespace vcpkg return std::move(control_file); } - Features parse_feature_list(const std::string& name) - { - auto maybe_spec = ParsedSpecifier::from_string(name); - if (auto spec = maybe_spec.get()) - { - Checks::check_exit( - VCPKG_LINE_INFO, spec->triplet.empty(), "error: triplet not allowed in specifier: %s", name); - - Features f; - f.name = spec->name; - f.features = spec->features; - return f; - } - - Checks::exit_with_message( - VCPKG_LINE_INFO, "error while parsing feature list: %s: %s", to_string(maybe_spec.error()), name); - } - Dependency Dependency::parse_dependency(std::string name, std::string qualifier) { Dependency dep; dep.qualifier = qualifier; - dep.depend = parse_feature_list(name); + if (auto maybe_features = Features::from_string(name)) + dep.depend = *maybe_features.get(); + else + Checks::exit_with_message( + VCPKG_LINE_INFO, "error while parsing dependency: %s: %s", to_string(maybe_features.error()), name); return dep; } @@ -217,39 +203,6 @@ namespace vcpkg }); } - std::vector parse_comma_list(const std::string& str) - { - if (str.empty()) - { - return {}; - } - - std::vector out; - - size_t cur = 0; - do - { - auto pos = str.find(',', cur); - if (pos == std::string::npos) - { - out.push_back(str.substr(cur)); - break; - } - out.push_back(str.substr(cur, pos - cur)); - - // skip comma and space - ++pos; - if (str[pos] == ' ') - { - ++pos; - } - - cur = pos; - } while (cur != std::string::npos); - - return out; - } - std::vector filter_dependencies(const std::vector& deps, const Triplet& t) { std::vector ret; diff --git a/toolsrc/src/tests_dependencies.cpp b/toolsrc/src/tests_dependencies.cpp index 26cc1e22c..6a6981d73 100644 --- a/toolsrc/src/tests_dependencies.cpp +++ b/toolsrc/src/tests_dependencies.cpp @@ -8,6 +8,7 @@ using namespace Microsoft::VisualStudio::CppUnitTestFramework; using namespace vcpkg; +using Parse::parse_comma_list; namespace UnitTest1 { @@ -41,7 +42,15 @@ namespace UnitTest1 TEST_METHOD(parse_supports_all) { auto v = Supports::parse({ - "x64", "x86", "arm", "windows", "uwp", "v140", "v141", "crt-static", "crt-dynamic", + "x64", + "x86", + "arm", + "windows", + "uwp", + "v140", + "v141", + "crt-static", + "crt-dynamic", }); Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get())); @@ -74,7 +83,9 @@ namespace UnitTest1 TEST_METHOD(parse_supports_some) { auto v = Supports::parse({ - "x64", "x86", "windows", + "x64", + "x86", + "windows", }); Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get())); diff --git a/toolsrc/src/vcpkg_Parse.cpp b/toolsrc/src/vcpkg_Parse.cpp index 659af2939..118cde900 100644 --- a/toolsrc/src/vcpkg_Parse.cpp +++ b/toolsrc/src/vcpkg_Parse.cpp @@ -44,4 +44,37 @@ namespace vcpkg::Parse } return nullptr; } + + std::vector parse_comma_list(const std::string& str) + { + if (str.empty()) + { + return {}; + } + + std::vector out; + + size_t cur = 0; + do + { + auto pos = str.find(',', cur); + if (pos == std::string::npos) + { + out.push_back(str.substr(cur)); + break; + } + out.push_back(str.substr(cur, pos - cur)); + + // skip comma and space + ++pos; + if (str[pos] == ' ') + { + ++pos; + } + + cur = pos; + } while (cur != std::string::npos); + + return out; + } } -- cgit v1.2.3 From e5ec89e10295744755358f0ba2b591a59315a6df Mon Sep 17 00:00:00 2001 From: Klaus Iglberger Date: Sun, 20 Aug 2017 05:56:02 +0200 Subject: [blaze] update to Blaze 3.2 --- ports/blaze/CONTROL | 2 +- ports/blaze/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/blaze/CONTROL b/ports/blaze/CONTROL index dd1b065ef..ca7923ffc 100644 --- a/ports/blaze/CONTROL +++ b/ports/blaze/CONTROL @@ -1,3 +1,3 @@ Source: blaze -Version: 3.1 +Version: 3.2 Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic. diff --git a/ports/blaze/portfile.cmake b/ports/blaze/portfile.cmake index cf268451c..3225e99d4 100644 --- a/ports/blaze/portfile.cmake +++ b/ports/blaze/portfile.cmake @@ -1,11 +1,11 @@ #header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/blaze-3.1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/blaze-3.2) vcpkg_download_distfile(ARCHIVE - URLS "https://bitbucket.org/blaze-lib/blaze/downloads/blaze-3.1.tar.gz" - FILENAME "blaze-3.1.tar.gz" - SHA512 fe03a7615d4105d6a869cfd69b3db3165b838eff53cdff7adbbd5ae9d753aa009bbab50925463c6704f9530a4c4ad5605e373b3cbaee96ca982a474a665ed756 + URLS "https://bitbucket.org/blaze-lib/blaze/downloads/blaze-3.2.tar.gz" + FILENAME "blaze-3.2.tar.gz" + SHA512 33d2bb0a49a33e71c88a45ab9e8418160c09b877b3ebe5ff7aa48ec0973e28e8a282374604d56f1b5cf2722946e4ca84aa2b401a341240a2ab9debd72505148e ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From c23e69b00895a7672d0f4fd4ccedcbb4d58d4c2a Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 20 Aug 2017 00:25:43 -0700 Subject: use vcpkg_from_github --- ports/opencv/CONTROL | 2 -- ports/opencv/portfile.cmake | 30 ++++++++++++++---------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 9360d64ed..8063511a7 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,6 +1,4 @@ Source: opencv Version: 3.3.0 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, vtk, protobuf, ceres -# Uncomment the following line if building without opencv_contrib is desired -# Build-Depends: zlib, libpng, libjpeg-turbo, tiff, vtk Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 8405f1e1a..ace4c9fa6 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -3,13 +3,14 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) set(VCPKG_LIBRARY_LINKAGE dynamic) endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/opencv-3.3.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/opencv/opencv/archive/3.3.0.zip" - FILENAME "opencv-3.3.0.zip" - SHA512 14430c6225926e5118daccb57c7276d9f9160c90a034b2c73a09b73ac90ba7ebd3ae78cccffb4a10b58bb0e5e16ebd03bf617030fa74cc67d9d18366bf6b4951 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO opencv/opencv + REF 3.3.0 + SHA512 b69923c9809d5533764b5db73db4f0be17f72b6d53643ee773824cfe8a98261d7dc5b4033895693bfd1454bc474c7f6152a5d0023a6f495324dd2b4b4a058e0d + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} @@ -19,15 +20,14 @@ vcpkg_apply_patches( ) file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libpng ${SOURCE_PATH}/3rdparty/zlib ${SOURCE_PATH}/3rdparty/libtiff) -# Uncomment the following lines and the lines under OPTIONS to build opencv_contrib -# Important: after uncommenting you've add protobuf dependency within CONTROL file -SET(CONTRIB_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/opencv_contrib-3.3.0) -vcpkg_download_distfile(CONTRIB_ARCHIVE - URLS "https://github.com/opencv/opencv_contrib/archive/3.3.0.zip" - FILENAME "opencv_contrib-3.3.0.zip" - SHA512 1c76d49689459708117acfbd0893cbfb915fbd0defff95702fb388a29d12b50fb53fbf246e64e68aa3adb347aa45ff478df5e2e8c6d9cfa57a628744bbb1bd04 +vcpkg_from_github( + OUT_SOURCE_PATH CONTRIB_SOURCE_PATH + REPO opencv/opencv_contrib + REF 3.3.0 + SHA512 ebe3dbe6c754c6fbaabbf6b0d2a4209964e625fd68e593f30ce043792740c8c1d4440d7870949b5b33f488fd7e2e05f3752287b7f50dd24c29202e268776520e + HEAD_REF master ) -vcpkg_extract_source_archive(${CONTRIB_ARCHIVE}) + vcpkg_apply_patches( SOURCE_PATH ${CONTRIB_SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/open_contrib-remove-waldboost.patch" @@ -61,8 +61,6 @@ vcpkg_configure_cmake( -DWITH_OPENCLAMDBLAS=OFF -DWITH_LAPACK=OFF -DBUILD_opencv_dnn=OFF - - # uncomment the following 3 lines to build opencv_contrib modules -DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules -DBUILD_PROTOBUF=OFF -DUPDATE_PROTO_FILES=ON -- cgit v1.2.3 From b501937942cd05db41b4b6f1fdf8e7d7ecd2139b Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 20 Aug 2017 00:37:08 -0700 Subject: build with ffmpeg --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 8063511a7..91efce30a 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,4 +1,4 @@ Source: opencv Version: 3.3.0 -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, vtk, protobuf, ceres +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, vtk, protobuf, ceres, ffmpeg Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index ace4c9fa6..5e4e1da1a 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -51,7 +51,7 @@ vcpkg_configure_cmake( -DBUILD_TESTS=OFF -DBUILD_WITH_DEBUG_INFO=ON -DOpenCV_DISABLE_ARCH_PATH=ON - -DWITH_FFMPEG=OFF + -DWITH_FFMPEG=ON -DINSTALL_FORCE_UNIX_PATHS=ON -DOPENCV_CONFIG_INSTALL_PATH=share/opencv -DOPENCV_OTHER_INSTALL_PATH=share/opencv -- cgit v1.2.3 From 2b178b3cb6e166cec2fa7fe3741017ac49a71d04 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 20 Aug 2017 10:33:39 -0700 Subject: fix dnn compilation --- ports/opencv/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 5e4e1da1a..989a43608 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -60,10 +60,11 @@ vcpkg_configure_cmake( -DWITH_CUBLAS=OFF -DWITH_OPENCLAMDBLAS=OFF -DWITH_LAPACK=OFF - -DBUILD_opencv_dnn=OFF + -DBUILD_opencv_dnn=ON -DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules -DBUILD_PROTOBUF=OFF -DUPDATE_PROTO_FILES=ON + -DPROTOBUF_UPDATE_FILES=ON OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -DINSTALL_OTHER=OFF -- cgit v1.2.3 From f11ee61fd6b93b311899f72a5e0b647fbdc12d54 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 20 Aug 2017 11:02:30 -0700 Subject: new port: sophus --- ports/sophus/CONTROL | 4 ++++ ports/sophus/portfile.cmake | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 ports/sophus/CONTROL create mode 100644 ports/sophus/portfile.cmake diff --git a/ports/sophus/CONTROL b/ports/sophus/CONTROL new file mode 100644 index 000000000..24c8a482b --- /dev/null +++ b/ports/sophus/CONTROL @@ -0,0 +1,4 @@ +Source: sophus +Version: 1.0.0 +Build-Depends:eigen3, ceres +Description: Lie group library for C++ diff --git a/ports/sophus/portfile.cmake b/ports/sophus/portfile.cmake new file mode 100644 index 000000000..dba573c54 --- /dev/null +++ b/ports/sophus/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO strasdat/Sophus + REF v1.0.0 + SHA512 569634a8be9237d2240cf30c01e2677ece75d55f1196030f1228baca62fa22460e8ceb2a63bd46afdf7f02d8eb79c59d6ed666228b852da78590de897b278fab + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Sophus") + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Put the license file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/Sophus/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/Sophus/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/Sophus/copyright) -- cgit v1.2.3 From 7fed53243cb7a51df1b333478078cfba482ff3bb Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 20 Aug 2017 11:03:45 -0700 Subject: new port pangolin --- ports/pangolin/CONTROL | 4 ++++ ports/pangolin/portfile.cmake | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 ports/pangolin/CONTROL create mode 100644 ports/pangolin/portfile.cmake diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL new file mode 100644 index 000000000..c792921f2 --- /dev/null +++ b/ports/pangolin/CONTROL @@ -0,0 +1,4 @@ +Source: pangolin +Version: v0.5 +Build-Depends:eigen3 +Description: Lightweight GUI Library \ No newline at end of file diff --git a/ports/pangolin/portfile.cmake b/ports/pangolin/portfile.cmake new file mode 100644 index 000000000..f2c17920c --- /dev/null +++ b/ports/pangolin/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stevenlovegrove/Pangolin + REF v0.5 + SHA512 7ebeec108f33f1aa8b1ad08e3ca128a837b22d33e3fc580021f981784043b023a1bf563bbfa8b51d46863db770b336d24fc84ee3d836b85e0da1848281b2a5b2 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Pangolin") + +vcpkg_copy_pdbs() + +file(GLOB EXE ${CURRENT_PACKAGES_DIR}/lib/*.dll) +file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE ${EXE}) + +file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) +file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE ${DEBUG_EXE}) + +file(READ ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-debug.cmake PANGOLIN_TARGETS) +string(REPLACE "lib/pangolin.dll" "bin/pangolin.dll" PANGOLIN_TARGETS "${PANGOLIN_TARGETS}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-debug.cmake "${PANGOLIN_TARGETS}") + +file(READ ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake PANGOLIN_TARGETS) +string(REPLACE "lib/pangolin.dll" "bin/pangolin.dll" PANGOLIN_TARGETS "${PANGOLIN_TARGETS}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake "${PANGOLIN_TARGETS}") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Put the license file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/Pangolin/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/Pangolin/LICENCE ${CURRENT_PACKAGES_DIR}/share/Pangolin/copyright) -- cgit v1.2.3 From bd222504abea410d77487e176649ae9b6989c4e0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 20 Aug 2017 19:09:39 -0700 Subject: [vcpkg] Refactor parsing together and flatten featurespec usages --- toolsrc/include/PackageSpec.h | 20 +++++ toolsrc/include/vcpkg_Dependencies.h | 9 +-- toolsrc/src/PackageSpec.cpp | 42 ++++++++++ toolsrc/src/commands_install.cpp | 6 +- toolsrc/src/test_install_plan.cpp | 56 ++++++++----- toolsrc/src/tests_package_spec.cpp | 119 ++++++++++++++++++++++++++++ toolsrc/src/tests_paragraph.cpp | 63 --------------- toolsrc/src/vcpkg_Dependencies.cpp | 56 +++---------- toolsrc/vcpkgtest/vcpkgtest.vcxproj | 1 + toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters | 3 + 10 files changed, 237 insertions(+), 138 deletions(-) create mode 100644 toolsrc/src/tests_package_spec.cpp diff --git a/toolsrc/include/PackageSpec.h b/toolsrc/include/PackageSpec.h index 8e986b4d6..8b485316f 100644 --- a/toolsrc/include/PackageSpec.h +++ b/toolsrc/include/PackageSpec.h @@ -33,11 +33,31 @@ namespace vcpkg Triplet m_triplet; }; + struct FeatureSpec + { + FeatureSpec(const PackageSpec& spec, const std::string& feature) : m_spec(spec), m_feature(feature) {} + + const std::string& name() const { return m_spec.name(); } + const std::string& feature() const { return m_feature; } + const Triplet& triplet() const { return m_spec.triplet(); } + + const PackageSpec& spec() const { return m_spec; } + + static std::vector from_strings_and_triplet(const std::vector& depends, + const Triplet& t); + + private: + PackageSpec m_spec; + std::string m_feature; + }; + struct FullPackageSpec { PackageSpec package_spec; std::vector features; + static std::vector to_feature_specs(const std::vector& specs); + static ExpectedT from_string(const std::string& spec_as_string, const Triplet& default_triplet); }; diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index 3fee8ef33..37d3a59e5 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -30,19 +30,12 @@ namespace vcpkg::Dependencies namespace vcpkg::Dependencies { - struct FeatureSpec - { - PackageSpec spec; - std::string feature_name; - }; - struct FeatureNodeEdges { std::vector remove_edges; std::vector build_edges; bool plus = false; }; - std::vector to_feature_specs(const std::vector& depends, const Triplet& t); struct Cluster { @@ -210,6 +203,6 @@ namespace vcpkg::Dependencies std::unordered_map& pkg_to_cluster, GraphPlan& graph_plan); std::vector create_feature_install_plan(const std::unordered_map& map, - const std::vector& specs, + const std::vector& specs, const StatusParagraphs& status_db); } diff --git a/toolsrc/src/PackageSpec.cpp b/toolsrc/src/PackageSpec.cpp index 475b3e3f6..a5d40e998 100644 --- a/toolsrc/src/PackageSpec.cpp +++ b/toolsrc/src/PackageSpec.cpp @@ -13,6 +13,48 @@ namespace vcpkg return (c == '-') || isdigit(c) || (isalpha(c) && islower(c)) || (c == '[') || (c == ']'); } + std::vector FeatureSpec::from_strings_and_triplet(const std::vector& depends, + const Triplet& triplet) + { + std::vector f_specs; + for (auto&& depend : depends) + { + auto maybe_spec = ParsedSpecifier::from_string(depend); + if (auto spec = maybe_spec.get()) + { + Checks::check_exit(VCPKG_LINE_INFO, + spec->triplet.empty(), + "error: triplets cannot currently be specified in this context: %s", + depend); + PackageSpec pspec = + PackageSpec::from_name_and_triplet(spec->name, triplet).value_or_exit(VCPKG_LINE_INFO); + + for (auto&& feature : spec->features) + f_specs.push_back(FeatureSpec{pspec, feature}); + + if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, ""}); + } + else + { + Checks::exit_with_message( + VCPKG_LINE_INFO, "error while parsing feature list: %s: %s", to_string(maybe_spec.error()), depend); + } + } + return f_specs; + } + + std::vector FullPackageSpec::to_feature_specs(const std::vector& specs) + { + std::vector ret; + for (auto&& spec : specs) + { + ret.emplace_back(spec.package_spec, ""); + for (auto&& feature : spec.features) + ret.emplace_back(spec.package_spec, feature); + } + return ret; + } + ExpectedT FullPackageSpec::from_string(const std::string& spec_as_string, const Triplet& default_triplet) { diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index 2965d9025..3fc0e2563 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -14,10 +14,10 @@ namespace vcpkg::Commands::Install { using Dependencies::InstallPlanAction; - using Dependencies::RequestType; using Dependencies::InstallPlanType; using Dependencies::RemovePlanAction; using Dependencies::RemovePlanType; + using Dependencies::RequestType; InstallDir InstallDir::from_destination_root(const fs::path& destination_root, const std::string& destination_subdirectory, @@ -440,8 +440,8 @@ namespace vcpkg::Commands::Install .value_or_exit(VCPKG_LINE_INFO); scf_map[pkg_spec] = std::move(*port); } - std::vector action_plan = - Dependencies::create_feature_install_plan(scf_map, full_specs, status_db); + std::vector action_plan = Dependencies::create_feature_install_plan( + scf_map, FullPackageSpec::to_feature_specs(full_specs), status_db); // install plan will be empty if it is already installed - need to change this at status paragraph part Checks::check_exit( VCPKG_LINE_INFO, !action_plan.empty(), "Install plan cannot be empty for feature packages"); diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index 347998723..e7c62813e 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -214,8 +214,10 @@ namespace UnitTest1 {{"Feature", "beefeaturethree"}, {"Description", "the third feature for b"}, {"Build-Depends", ""}}, })}; - auto install_plan = Dependencies::create_feature_install_plan( - spec_map.map, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(4), install_plan.size()); remove_plan_check(&install_plan[0], "a"); @@ -248,8 +250,10 @@ namespace UnitTest1 {{"Feature", "beefeaturethree"}, {"Description", "the third feature for b"}, {"Build-Depends", ""}}, })}; - auto install_plan = Dependencies::create_feature_install_plan( - spec_map.map, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(2), install_plan.size()); features_check(&install_plan[0], "b", {"beefeatureone", "beefeaturetwo", "core"}); @@ -284,8 +288,10 @@ namespace UnitTest1 }), {"core"}}; - auto install_plan = Dependencies::create_feature_install_plan( - spec_map.map, {spec_c, spec_a}, StatusParagraphs(std::move(status_paragraphs))); + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_c, spec_a}), + StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(4), install_plan.size()); remove_plan_check(&install_plan[0], "a"); @@ -328,8 +334,10 @@ namespace UnitTest1 }), {"core"}}; - auto install_plan = Dependencies::create_feature_install_plan( - spec_map.map, {spec_c}, StatusParagraphs(std::move(status_paragraphs))); + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_c}), + StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(1), install_plan.size()); features_check(&install_plan[0], "c", {"core"}); @@ -356,8 +364,10 @@ namespace UnitTest1 {{"Feature", "2"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}}, })}; - auto install_plan = Dependencies::create_feature_install_plan( - spec_map.map, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(2), install_plan.size()); features_check(&install_plan[0], "b", {"core", "2"}); @@ -389,8 +399,10 @@ namespace UnitTest1 }), {"1"}}; - auto install_plan = Dependencies::create_feature_install_plan( - spec_map.map, {spec_a, spec_b}, StatusParagraphs(std::move(status_paragraphs))); + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a, spec_b}), + StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(3), install_plan.size()); remove_plan_check(&install_plan[0], "b"); @@ -433,8 +445,10 @@ namespace UnitTest1 }), {"1"}}; - auto install_plan = Dependencies::create_feature_install_plan( - spec_map.map, {spec_b}, StatusParagraphs(std::move(status_paragraphs))); + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_b}), + StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(5), install_plan.size()); remove_plan_check(&install_plan[0], "x"); @@ -495,10 +509,10 @@ namespace UnitTest1 }), {"core"}}; - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - {spec_c_64, spec_a_86, spec_a_64, spec_c_86}, - StatusParagraphs(std::move(status_paragraphs))); + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({spec_c_64, spec_a_86, spec_a_64, spec_c_86}), + StatusParagraphs(std::move(status_paragraphs))); /*Assert::AreEqual(size_t(8), install_plan.size()); auto iterator_pos = [&](const PackageSpec& spec, size_t start) -> int { @@ -555,8 +569,10 @@ namespace UnitTest1 }), {""}}; - auto install_plan = Dependencies::create_feature_install_plan( - spec_map.map, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(3), install_plan.size()); features_check(&install_plan[0], "c", {"core", "1", "2"}); diff --git a/toolsrc/src/tests_package_spec.cpp b/toolsrc/src/tests_package_spec.cpp new file mode 100644 index 000000000..fa201b372 --- /dev/null +++ b/toolsrc/src/tests_package_spec.cpp @@ -0,0 +1,119 @@ +#include "BinaryParagraph.h" +#include "CppUnitTest.h" +#include "Paragraphs.h" +#include "vcpkg_Strings.h" + +#pragma comment(lib, "version") +#pragma comment(lib, "winhttp") + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +namespace Microsoft::VisualStudio::CppUnitTestFramework +{ + 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()); + } +} + +namespace Strings = vcpkg::Strings; + +namespace UnitTest1 +{ + using namespace vcpkg; + + class SpecifierConversion : public TestClass + { + TEST_METHOD(full_package_spec_to_feature_specs) + { + auto a_spec = PackageSpec::from_name_and_triplet("a", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); + auto b_spec = PackageSpec::from_name_and_triplet("b", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); + + auto fspecs = FullPackageSpec::to_feature_specs({{a_spec, {"0", "1"}}, {b_spec, {"2", "3"}}}); + + Assert::AreEqual(size_t(6), fspecs.size()); + + std::array features = {"", "0", "1", "", "2", "3"}; + std::array specs = {&a_spec, &a_spec, &a_spec, &b_spec, &b_spec, &b_spec}; + + for (int i = 0; i < features.size(); ++i) + { + Assert::AreEqual(features[i], fspecs[i].feature().c_str()); + Assert::AreEqual(*specs[i], fspecs[i].spec()); + } + } + }; + + class SpecifierParsing : public TestClass + { + TEST_METHOD(parsed_specifier_from_string) + { + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::AreEqual(size_t(0), spec->features.size()); + Assert::AreEqual("", spec->triplet.c_str()); + } + + TEST_METHOD(parsed_specifier_from_string_with_triplet) + { + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib:x64-uwp"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::AreEqual("x64-uwp", spec->triplet.c_str()); + } + + TEST_METHOD(parsed_specifier_from_string_with_colons) + { + auto ec = vcpkg::ParsedSpecifier::from_string("zlib:x86-uwp:").error(); + Assert::AreEqual(vcpkg::PackageSpecParseResult::TOO_MANY_COLONS, ec); + } + + TEST_METHOD(parsed_specifier_from_string_with_feature) + { + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[feature]:x64-uwp"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::IsTrue(spec->features.size() == 1); + Assert::AreEqual("feature", spec->features.front().c_str()); + Assert::AreEqual("x64-uwp", spec->triplet.c_str()); + } + + TEST_METHOD(parsed_specifier_from_string_with_many_features) + { + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[0, 1,2]"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::IsTrue(spec->features.size() == 3); + Assert::AreEqual("0", spec->features[0].c_str()); + Assert::AreEqual("1", spec->features[1].c_str()); + Assert::AreEqual("2", spec->features[2].c_str()); + Assert::AreEqual("", spec->triplet.c_str()); + } + + TEST_METHOD(utf8_to_utf16) + { + auto str = vcpkg::Strings::to_utf16("abc"); + Assert::AreEqual(L"abc", str.c_str()); + } + + TEST_METHOD(utf8_to_utf16_with_whitespace) + { + auto str = vcpkg::Strings::to_utf16("abc -x86-windows"); + Assert::AreEqual(L"abc -x86-windows", str.c_str()); + } + }; + + TEST_CLASS(Metrics){}; +} diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests_paragraph.cpp index 1fd950e19..47a07e12d 100644 --- a/toolsrc/src/tests_paragraph.cpp +++ b/toolsrc/src/tests_paragraph.cpp @@ -384,68 +384,5 @@ namespace UnitTest1 Assert::AreEqual(size_t(1), pghs.size()); Assert::AreEqual("a, b, c", pghs[0]["Depends"].c_str()); } - - TEST_METHOD(parsed_specifier_from_string) - { - auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib"); - Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); - auto spec = maybe_spec.get(); - Assert::AreEqual("zlib", spec->name.c_str()); - Assert::AreEqual(size_t(0), spec->features.size()); - Assert::AreEqual("", spec->triplet.c_str()); - } - - TEST_METHOD(parsed_specifier_from_string_with_triplet) - { - auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib:x64-uwp"); - Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); - auto spec = maybe_spec.get(); - Assert::AreEqual("zlib", spec->name.c_str()); - Assert::AreEqual("x64-uwp", spec->triplet.c_str()); - } - - TEST_METHOD(parsed_specifier_from_string_with_colons) - { - auto ec = vcpkg::ParsedSpecifier::from_string("zlib:x86-uwp:").error(); - Assert::AreEqual(vcpkg::PackageSpecParseResult::TOO_MANY_COLONS, ec); - } - - TEST_METHOD(parsed_specifier_from_string_with_feature) - { - auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[feature]:x64-uwp"); - Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); - auto spec = maybe_spec.get(); - Assert::AreEqual("zlib", spec->name.c_str()); - Assert::IsTrue(spec->features.size() == 1); - Assert::AreEqual("feature", spec->features.front().c_str()); - Assert::AreEqual("x64-uwp", spec->triplet.c_str()); - } - - TEST_METHOD(parsed_specifier_from_string_with_many_features) - { - auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[0, 1,2]"); - Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); - auto spec = maybe_spec.get(); - Assert::AreEqual("zlib", spec->name.c_str()); - Assert::IsTrue(spec->features.size() == 3); - Assert::AreEqual("0", spec->features[0].c_str()); - Assert::AreEqual("1", spec->features[1].c_str()); - Assert::AreEqual("2", spec->features[2].c_str()); - Assert::AreEqual("", spec->triplet.c_str()); - } - - TEST_METHOD(utf8_to_utf16) - { - auto str = vcpkg::Strings::to_utf16("abc"); - Assert::AreEqual(L"abc", str.c_str()); - } - - TEST_METHOD(utf8_to_utf16_with_whitespace) - { - auto str = vcpkg::Strings::to_utf16("abc -x86-windows"); - Assert::AreEqual(L"abc -x86-windows", str.c_str()); - } }; - - TEST_CLASS(Metrics){}; } diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 799bca439..5226fac24 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -358,35 +358,6 @@ namespace vcpkg::Dependencies return toposort; } - std::vector to_feature_specs(const std::vector& depends, const Triplet& triplet) - { - std::vector f_specs; - for (auto&& depend : depends) - { - auto maybe_spec = ParsedSpecifier::from_string(depend); - if (auto spec = maybe_spec.get()) - { - Checks::check_exit(VCPKG_LINE_INFO, - spec->triplet.empty(), - "error: triplets cannot currently be specified in this context: %s", - depend); - PackageSpec pspec = - PackageSpec::from_name_and_triplet(spec->name, triplet).value_or_exit(VCPKG_LINE_INFO); - - for (auto&& feature : spec->features) - f_specs.push_back(FeatureSpec{pspec, feature}); - - if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, ""}); - } - else - { - Checks::exit_with_message( - VCPKG_LINE_INFO, "error while parsing feature list: %s: %s", to_string(maybe_spec.error()), depend); - } - } - return f_specs; - } - void mark_plus_default(Cluster& cluster, std::unordered_map& pkg_to_cluster, GraphPlan& graph_plan) @@ -442,8 +413,8 @@ namespace vcpkg::Dependencies for (auto&& depend : cluster.edges[updated_feature].build_edges) { - auto& depend_cluster = pkg_to_cluster[depend.spec]; - mark_plus(depend.feature_name, depend_cluster, pkg_to_cluster, graph_plan); + auto& depend_cluster = pkg_to_cluster[depend.spec()]; + mark_plus(depend.feature(), depend_cluster, pkg_to_cluster, graph_plan); mark_plus_default(depend_cluster, pkg_to_cluster, graph_plan); if (&depend_cluster == &cluster) continue; graph_plan.install_graph.add_edge({&cluster}, {&depend_cluster}); @@ -462,7 +433,7 @@ namespace vcpkg::Dependencies auto& remove_edges_edges = pair.second.remove_edges; for (auto&& depend : remove_edges_edges) { - auto& depend_cluster = pkg_to_cluster[depend.spec]; + auto& depend_cluster = pkg_to_cluster[depend.spec()]; graph_plan.remove_graph.add_edge({&cluster}, {&depend_cluster}); depend_cluster.transient_uninstalled = true; mark_minus(depend_cluster, pkg_to_cluster, graph_plan); @@ -476,7 +447,7 @@ namespace vcpkg::Dependencies } std::vector create_feature_install_plan(const std::unordered_map& map, - const std::vector& specs, + const std::vector& specs, const StatusParagraphs& status_db) { std::unordered_map pkg_spec_to_package_node; @@ -488,14 +459,14 @@ namespace vcpkg::Dependencies node.spec = it.first; FeatureNodeEdges core_dependencies; auto core_depends = filter_dependencies(it.second.core_paragraph->depends, node.spec.triplet()); - core_dependencies.build_edges = to_feature_specs(core_depends, node.spec.triplet()); + core_dependencies.build_edges = FeatureSpec::from_strings_and_triplet(core_depends, node.spec.triplet()); node.edges["core"] = std::move(core_dependencies); for (const auto& feature : it.second.feature_paragraphs) { FeatureNodeEdges added_edges; auto depends = filter_dependencies(feature->depends, node.spec.triplet()); - added_edges.build_edges = to_feature_specs(depends, node.spec.triplet()); + added_edges.build_edges = FeatureSpec::from_strings_and_triplet(depends, node.spec.triplet()); node.edges.emplace(feature->name, std::move(added_edges)); } node.source_control_file = &it.second; @@ -508,13 +479,13 @@ namespace vcpkg::Dependencies Cluster& cluster = pkg_spec_to_package_node[spec]; cluster.transient_uninstalled = false; - auto reverse_edges = - to_feature_specs(status_paragraph->package.depends, status_paragraph->package.spec.triplet()); + auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends, + status_paragraph->package.spec.triplet()); for (auto&& dependency : reverse_edges) { - auto pkg_node = pkg_spec_to_package_node.find(dependency.spec); - auto depends_name = dependency.feature_name; + auto pkg_node = pkg_spec_to_package_node.find(dependency.spec()); + auto depends_name = dependency.feature(); if (depends_name == "") { for (auto&& default_feature : status_paragraph->package.default_features) @@ -541,12 +512,9 @@ namespace vcpkg::Dependencies GraphPlan graph_plan; for (auto&& spec : specs) { - Cluster& spec_cluster = pkg_spec_to_package_node[spec.package_spec]; + Cluster& spec_cluster = pkg_spec_to_package_node[spec.spec()]; mark_plus_default(spec_cluster, pkg_spec_to_package_node, graph_plan); - for (auto&& feature : spec.features) - { - mark_plus(feature, spec_cluster, pkg_spec_to_package_node, graph_plan); - } + mark_plus(spec.feature(), spec_cluster, pkg_spec_to_package_node, graph_plan); } Graphs::GraphAdjacencyProvider adjacency_remove_graph(graph_plan.remove_graph.adjacency_list()); diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index ca66260d4..041e74d31 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -21,6 +21,7 @@ + diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters index e376e59f4..b31dbd951 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters @@ -27,5 +27,8 @@ Source Files + + Source Files + \ No newline at end of file -- cgit v1.2.3 From 1ba7cef1f07e8fd8c0053694b306dcc3960f720e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 20 Aug 2017 19:36:43 -0700 Subject: [vcpkg] Remove incomplete default features implementation --- toolsrc/include/SourceParagraph.h | 11 ++-- toolsrc/include/vcpkg_Dependencies.h | 8 --- toolsrc/src/SourceParagraph.cpp | 5 ++ toolsrc/src/test_install_plan.cpp | 42 ------------- toolsrc/src/vcpkg_Dependencies.cpp | 114 +++++++++++++++++++---------------- 5 files changed, 74 insertions(+), 106 deletions(-) diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index d938e2e3b..05f18f940 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -23,6 +23,12 @@ namespace vcpkg static Dependency parse_dependency(std::string name, std::string qualifier); }; + std::vector filter_dependencies(const std::vector& deps, const Triplet& t); + std::vector filter_dependencies_to_specs(const std::vector& deps, const Triplet& t); + + // zlib[uwp] becomes Dependency{"zlib", "uwp"} + std::vector expand_qualified_dependencies(const std::vector& depends); + const std::string to_string(const Dependency& dep); struct FeatureParagraph @@ -60,11 +66,6 @@ namespace vcpkg return print_error_message({&error_info_list, 1}); } - std::vector filter_dependencies(const std::vector& deps, const Triplet& t); - - // zlib[uwp] becomes Dependency{"zlib", "uwp"} - std::vector expand_qualified_dependencies(const std::vector& depends); - struct Supports { static ExpectedT> parse(const std::vector& strs); diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index 37d3a59e5..3a81cf27b 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -194,14 +194,6 @@ namespace vcpkg::Dependencies Graphs::Graph remove_graph; Graphs::Graph install_graph; }; - bool mark_plus(const std::string& feature, - Cluster& cluster, - std::unordered_map& pkg_to_cluster, - GraphPlan& graph_plan); - void mark_minus(Cluster& cluster, std::unordered_map& pkg_to_cluster, GraphPlan& graph_plan); - void mark_plus_default(Cluster& cluster, - std::unordered_map& pkg_to_cluster, - GraphPlan& graph_plan); std::vector create_feature_install_plan(const std::unordered_map& map, const std::vector& specs, const StatusParagraphs& status_db); diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 76c5a2004..54f34cbd3 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -216,6 +216,11 @@ namespace vcpkg 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); + } + const std::string to_string(const Dependency& dep) { std::string name = dep.name(); diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index e7c62813e..f0884c063 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -537,47 +537,5 @@ namespace UnitTest1 features_check(&install_plan[6], "a", {"one", "core"}); features_check(&install_plan[7], "c", {"core"}); } - - TEST_METHOD(default_features_test) - { - using Pgh = std::unordered_map; - - std::vector> status_paragraphs; - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - - auto spec_a = FullPackageSpec{ - spec_map.get_package_spec( - {{{"Source", "a"}, {"Version", "1.3"}, {"Default-Features", "1, 2"}, {"Build-Depends", ""}}, - {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", "b[2]"}}, - {{"Feature", "2"}, {"Description", "the second feature for a"}, {"Build-Depends", ""}}, - {{"Feature", "3"}, {"Description", "the third feature for a"}, {"Build-Depends", ""}}}), - {""}}; - auto spec_b = FullPackageSpec{ - spec_map.get_package_spec({ - {{"Source", "b"}, {"Version", "1.3"}, {"Default-Features", "1, 2"}, {"Build-Depends", ""}}, - {{"Feature", "1"}, {"Description", "the first feature for b"}, {"Build-Depends", "c[1]"}}, - {{"Feature", "2"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}}, - }), - {""}}; - - auto spec_c = FullPackageSpec{ - spec_map.get_package_spec({ - {{"Source", "c"}, {"Version", "1.3"}, {"Default-Features", "2"}, {"Build-Depends", ""}}, - {{"Feature", "1"}, {"Description", "the first feature for c"}, {"Build-Depends", ""}}, - {{"Feature", "2"}, {"Description", "the second feature for c"}, {"Build-Depends", ""}}, - }), - {""}}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_a}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(3), install_plan.size()); - features_check(&install_plan[0], "c", {"core", "1", "2"}); - features_check(&install_plan[1], "b", {"core", "1", "2"}); - features_check(&install_plan[2], "a", {"core", "1", "2"}); - } }; } \ No newline at end of file diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 5226fac24..fa4876bd7 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -12,6 +12,10 @@ namespace vcpkg::Dependencies { + struct ClusterGraph; + void mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); + void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); + bool operator==(const ClusterPtr& l, const ClusterPtr& r) { return l.ptr == r.ptr; } std::vector AnyParagraph::dependencies(const Triplet& triplet) const @@ -358,71 +362,74 @@ namespace vcpkg::Dependencies return toposort; } - void mark_plus_default(Cluster& cluster, - std::unordered_map& pkg_to_cluster, - GraphPlan& graph_plan) + struct ClusterGraph { - mark_plus("core", cluster, pkg_to_cluster, graph_plan); - if (auto scf = cluster.source_control_file.get()) + explicit ClusterGraph(std::unordered_map&& graph) : m_graph(std::move(graph)) {} + ClusterGraph(ClusterGraph&&) = default; + + Cluster& get(const PackageSpec& spec) { - for (auto&& default_feature : (*scf)->core_paragraph->default_features) - { - mark_plus(default_feature, cluster, pkg_to_cluster, graph_plan); - } + auto it = m_graph.find(spec); + if (it == m_graph.end()) Checks::unreachable(VCPKG_LINE_INFO); + return it->second; } - } - bool mark_plus(const std::string& feature, - Cluster& cluster, - std::unordered_map& pkg_to_cluster, - GraphPlan& graph_plan) + private: + ClusterGraph(const ClusterGraph&) = delete; + std::unordered_map m_graph; + }; + + void mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) { - auto it = cluster.edges.find(feature); - std::string updated_feature = feature; - if (updated_feature == "") + if (feature == "") { - updated_feature = "core"; - it = cluster.edges.find("core"); + // Indicates that core was not specified in the reference + return mark_plus("core", cluster, graph, graph_plan); } + auto it = cluster.edges.find(feature); if (it == cluster.edges.end()) { Checks::unreachable(VCPKG_LINE_INFO); } - if (cluster.edges[updated_feature].plus) return true; + if (cluster.edges[feature].plus) return; - if (cluster.original_features.find(updated_feature) == cluster.original_features.end()) + if (cluster.original_features.find(feature) == cluster.original_features.end()) { cluster.transient_uninstalled = true; } if (!cluster.transient_uninstalled) { - return false; + return; } - cluster.edges[updated_feature].plus = true; + cluster.edges[feature].plus = true; if (!cluster.original_features.empty()) { - mark_minus(cluster, pkg_to_cluster, graph_plan); + mark_minus(cluster, graph, graph_plan); } graph_plan.install_graph.add_vertex({&cluster}); auto& tracked = cluster.to_install_features; - tracked.insert(updated_feature); + tracked.insert(feature); + + if (feature != "core") + { + // All features implicitly depend on core + mark_plus("core", cluster, graph, graph_plan); + } - for (auto&& depend : cluster.edges[updated_feature].build_edges) + for (auto&& depend : cluster.edges[feature].build_edges) { - auto& depend_cluster = pkg_to_cluster[depend.spec()]; - mark_plus(depend.feature(), depend_cluster, pkg_to_cluster, graph_plan); - mark_plus_default(depend_cluster, pkg_to_cluster, graph_plan); + auto& depend_cluster = graph.get(depend.spec()); + mark_plus(depend.feature(), depend_cluster, graph, graph_plan); if (&depend_cluster == &cluster) continue; graph_plan.install_graph.add_edge({&cluster}, {&depend_cluster}); } - return true; } - void mark_minus(Cluster& cluster, std::unordered_map& pkg_to_cluster, GraphPlan& graph_plan) + void mark_minus(Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) { if (cluster.will_remove) return; cluster.will_remove = true; @@ -433,40 +440,38 @@ namespace vcpkg::Dependencies auto& remove_edges_edges = pair.second.remove_edges; for (auto&& depend : remove_edges_edges) { - auto& depend_cluster = pkg_to_cluster[depend.spec()]; + auto& depend_cluster = graph.get(depend.spec()); graph_plan.remove_graph.add_edge({&cluster}, {&depend_cluster}); - depend_cluster.transient_uninstalled = true; - mark_minus(depend_cluster, pkg_to_cluster, graph_plan); + mark_minus(depend_cluster, graph, graph_plan); } } + + cluster.transient_uninstalled = true; for (auto&& original_feature : cluster.original_features) { - cluster.transient_uninstalled = true; - mark_plus(original_feature, cluster, pkg_to_cluster, graph_plan); + mark_plus(original_feature, cluster, graph, graph_plan); } } - std::vector create_feature_install_plan(const std::unordered_map& map, - const std::vector& specs, - const StatusParagraphs& status_db) + static ClusterGraph create_feature_install_graph(const std::unordered_map& map, + const StatusParagraphs& status_db) { - std::unordered_map pkg_spec_to_package_node; + std::unordered_map graph; for (const auto& it : map) { - Cluster& node = pkg_spec_to_package_node[it.first]; + Cluster& node = graph[it.first]; node.spec = it.first; FeatureNodeEdges core_dependencies; - auto core_depends = filter_dependencies(it.second.core_paragraph->depends, node.spec.triplet()); - core_dependencies.build_edges = FeatureSpec::from_strings_and_triplet(core_depends, node.spec.triplet()); - node.edges["core"] = std::move(core_dependencies); + core_dependencies.build_edges = + filter_dependencies_to_specs(it.second.core_paragraph->depends, node.spec.triplet()); + node.edges.emplace("core", std::move(core_dependencies)); for (const auto& feature : it.second.feature_paragraphs) { FeatureNodeEdges added_edges; - auto depends = filter_dependencies(feature->depends, node.spec.triplet()); - added_edges.build_edges = FeatureSpec::from_strings_and_triplet(depends, node.spec.triplet()); + added_edges.build_edges = filter_dependencies_to_specs(feature->depends, node.spec.triplet()); node.edges.emplace(feature->name, std::move(added_edges)); } node.source_control_file = &it.second; @@ -476,7 +481,7 @@ namespace vcpkg::Dependencies { auto& spec = status_paragraph->package.spec; auto& status_paragraph_feature = status_paragraph->package.feature; - Cluster& cluster = pkg_spec_to_package_node[spec]; + Cluster& cluster = graph[spec]; cluster.transient_uninstalled = false; auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends, @@ -484,7 +489,7 @@ namespace vcpkg::Dependencies for (auto&& dependency : reverse_edges) { - auto pkg_node = pkg_spec_to_package_node.find(dependency.spec()); + auto pkg_node = graph.find(dependency.spec()); auto depends_name = dependency.feature(); if (depends_name == "") { @@ -508,13 +513,20 @@ namespace vcpkg::Dependencies cluster.original_features.insert(status_paragraph_feature); } } + return ClusterGraph(std::move(graph)); + } + + std::vector create_feature_install_plan(const std::unordered_map& map, + const std::vector& specs, + const StatusParagraphs& status_db) + { + ClusterGraph graph = create_feature_install_graph(map, status_db); GraphPlan graph_plan; for (auto&& spec : specs) { - Cluster& spec_cluster = pkg_spec_to_package_node[spec.spec()]; - mark_plus_default(spec_cluster, pkg_spec_to_package_node, graph_plan); - mark_plus(spec.feature(), spec_cluster, pkg_spec_to_package_node, graph_plan); + Cluster& spec_cluster = graph.get(spec.spec()); + mark_plus(spec.feature(), spec_cluster, graph, graph_plan); } Graphs::GraphAdjacencyProvider adjacency_remove_graph(graph_plan.remove_graph.adjacency_list()); -- cgit v1.2.3 From c7de717cbc2b6ab89dc8056984c0a4685e9cf56e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 20 Aug 2017 20:06:21 -0700 Subject: [vcpkg] Refactor features implementation. Improve error handling. --- toolsrc/include/vcpkg_Dependencies.h | 48 ------------ toolsrc/src/vcpkg_Dependencies.cpp | 140 ++++++++++++++++++++++++----------- 2 files changed, 98 insertions(+), 90 deletions(-) diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index 3a81cf27b..9ac52490e 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -30,37 +30,6 @@ namespace vcpkg::Dependencies namespace vcpkg::Dependencies { - struct FeatureNodeEdges - { - std::vector remove_edges; - std::vector build_edges; - bool plus = false; - }; - - struct Cluster - { - std::vector status_paragraphs; - Optional source_control_file; - PackageSpec spec; - std::unordered_map edges; - std::unordered_set to_install_features; - std::unordered_set original_features; - bool will_remove = false; - bool transient_uninstalled = true; - Cluster() = default; - - private: - Cluster(const Cluster&) = delete; - Cluster& operator=(const Cluster&) = delete; - }; - - struct ClusterPtr - { - Cluster* ptr; - }; - - bool operator==(const ClusterPtr& l, const ClusterPtr& r); - enum class InstallPlanType { UNKNOWN, @@ -176,24 +145,7 @@ namespace vcpkg::Dependencies std::vector create_export_plan(const VcpkgPaths& paths, const std::vector& specs, const StatusParagraphs& status_db); -} -template<> -struct std::hash -{ - size_t operator()(const vcpkg::Dependencies::ClusterPtr& value) const - { - return std::hash()(value.ptr->spec); - } -}; - -namespace vcpkg::Dependencies -{ - struct GraphPlan - { - Graphs::Graph remove_graph; - Graphs::Graph install_graph; - }; std::vector create_feature_install_plan(const std::unordered_map& map, const std::vector& specs, const StatusParagraphs& status_db); diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index fa4876bd7..8f92179b5 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -12,11 +12,76 @@ namespace vcpkg::Dependencies { - struct ClusterGraph; - void mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); - void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); + struct FeatureNodeEdges + { + std::vector remove_edges; + std::vector build_edges; + bool plus = false; + }; + + struct Cluster + { + std::vector status_paragraphs; + Optional source_control_file; + PackageSpec spec; + std::unordered_map edges; + std::unordered_set to_install_features; + std::unordered_set original_features; + bool will_remove = false; + bool transient_uninstalled = true; + Cluster() = default; + + private: + Cluster(const Cluster&) = delete; + Cluster& operator=(const Cluster&) = delete; + }; + + struct ClusterPtr + { + Cluster* ptr; + }; bool operator==(const ClusterPtr& l, const ClusterPtr& r) { return l.ptr == r.ptr; } +} + +template<> +struct std::hash +{ + size_t operator()(const vcpkg::Dependencies::ClusterPtr& value) const + { + return std::hash()(value.ptr->spec); + } +}; + +namespace vcpkg::Dependencies +{ + struct GraphPlan + { + Graphs::Graph remove_graph; + Graphs::Graph install_graph; + }; + + struct ClusterGraph + { + explicit ClusterGraph(std::unordered_map&& graph) : m_graph(std::move(graph)) {} + ClusterGraph(ClusterGraph&&) = default; + + Cluster& get(const PackageSpec& spec) + { + if (auto p = try_get(spec)) return *p; + Checks::exit_with_message(VCPKG_LINE_INFO, "error: reference to missing package: %s", spec); + } + Cluster* try_get(const PackageSpec& spec) + { + auto it = m_graph.find(spec); + if (it == m_graph.end()) return nullptr; + return &it->second; + } + + private: + ClusterGraph(const ClusterGraph&) = delete; + std::unordered_map m_graph; + }; std::vector AnyParagraph::dependencies(const Triplet& triplet) const { @@ -362,22 +427,8 @@ namespace vcpkg::Dependencies return toposort; } - struct ClusterGraph - { - explicit ClusterGraph(std::unordered_map&& graph) : m_graph(std::move(graph)) {} - ClusterGraph(ClusterGraph&&) = default; - - Cluster& get(const PackageSpec& spec) - { - auto it = m_graph.find(spec); - if (it == m_graph.end()) Checks::unreachable(VCPKG_LINE_INFO); - return it->second; - } - - private: - ClusterGraph(const ClusterGraph&) = delete; - std::unordered_map m_graph; - }; + void mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); + void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); void mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) { @@ -477,33 +528,18 @@ namespace vcpkg::Dependencies node.source_control_file = &it.second; } - for (auto&& status_paragraph : get_installed_ports(status_db)) + auto installed_ports = get_installed_ports(status_db); + + for (auto&& status_paragraph : installed_ports) { - auto& spec = status_paragraph->package.spec; - auto& status_paragraph_feature = status_paragraph->package.feature; - Cluster& cluster = graph[spec]; + Cluster& cluster = graph[status_paragraph->package.spec]; cluster.transient_uninstalled = false; - auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends, - status_paragraph->package.spec.triplet()); - for (auto&& dependency : reverse_edges) - { - auto pkg_node = graph.find(dependency.spec()); - auto depends_name = dependency.feature(); - if (depends_name == "") - { - for (auto&& default_feature : status_paragraph->package.default_features) - { - auto& target_node = pkg_node->second.edges[default_feature]; - target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); - } - depends_name = "core"; - } - auto& target_node = pkg_node->second.edges[depends_name]; - target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); - } - cluster.status_paragraphs.emplace_back(*status_paragraph); + cluster.status_paragraphs.emplace_back(status_paragraph); + + auto& status_paragraph_feature = status_paragraph->package.feature; + // In this case, empty string indicates the "core" paragraph for a package. if (status_paragraph_feature == "") { cluster.original_features.insert("core"); @@ -513,6 +549,26 @@ namespace vcpkg::Dependencies cluster.original_features.insert(status_paragraph_feature); } } + + for (auto&& status_paragraph : installed_ports) + { + auto& spec = status_paragraph->package.spec; + auto& status_paragraph_feature = status_paragraph->package.feature; + auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends, + status_paragraph->package.spec.triplet()); + + for (auto&& dependency : reverse_edges) + { + auto dep_cluster = graph.find(dependency.spec()); + if (dep_cluster == graph.end()) Checks::unreachable(VCPKG_LINE_INFO); + + auto depends_name = dependency.feature(); + if (depends_name == "") depends_name = "core"; + + auto& target_node = dep_cluster->second.edges[depends_name]; + target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); + } + } return ClusterGraph(std::move(graph)); } -- cgit v1.2.3 From e96c0d6703af0d48266b950876ecf8ca2be352e0 Mon Sep 17 00:00:00 2001 From: veggiesaurus Date: Mon, 21 Aug 2017 13:11:29 +0200 Subject: ccfits port implemented for dynamic and static builds --- ports/ccfits/CONTROL | 4 + ports/ccfits/dll_exports.patch | 495 +++++++++++++++++++++++++++++++++++++++++ ports/ccfits/portfile.cmake | 56 +++++ 3 files changed, 555 insertions(+) create mode 100644 ports/ccfits/CONTROL create mode 100644 ports/ccfits/dll_exports.patch create mode 100644 ports/ccfits/portfile.cmake diff --git a/ports/ccfits/CONTROL b/ports/ccfits/CONTROL new file mode 100644 index 000000000..17083f9b2 --- /dev/null +++ b/ports/ccfits/CONTROL @@ -0,0 +1,4 @@ +Source: ccfits +Version: 2.5 +Description: CCfits is an object oriented interface to the cfitsio library. It is designed to make the capabilities of cfitsio available to programmers working in C++. +Build-Depends: cfitsio \ No newline at end of file diff --git a/ports/ccfits/dll_exports.patch b/ports/ccfits/dll_exports.patch new file mode 100644 index 000000000..4ec4a8284 --- /dev/null +++ b/ports/ccfits/dll_exports.patch @@ -0,0 +1,495 @@ +Index: FITS.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- FITS.h (date 1502267716000) ++++ FITS.h (revision ) +@@ -21,6 +21,8 @@ + #include "HDUCreator.h" + // FitsError + #include "FitsError.h" ++//DLL Exporting ++#include "ccfits_export.h" + + namespace CCfits { + class FITSBase; +@@ -665,9 +667,8 @@ + + + +- class FITS +- { +- ++ class CCFITS_EXPORT FITS ++ { + public: + + +Index: HDU.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- HDU.h (date 1502267716000) ++++ HDU.h (revision ) +@@ -568,7 +568,7 @@ + + + +- class HDU ++ class CCFITS_EXPORT HDU + { + + public: +Index: Table.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- Table.h (date 1502267716000) ++++ Table.h (revision ) +@@ -268,7 +268,7 @@ + + + +- class Table : public ExtHDU //## Inherits: %3804A126EB10 ++ class CCFITS_EXPORT Table : public ExtHDU //## Inherits: %3804A126EB10 + { + + public: +Index: Column.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- Column.h (date 1502267716000) ++++ Column.h (revision ) +@@ -838,14 +838,14 @@ + + + +- class Column ++ class CCFITS_EXPORT Column + { + + public: + + + +- class RangeError : public FitsException //## Inherits: %3946526D031A ++ class CCFITS_EXPORT RangeError : public FitsException //## Inherits: %3946526D031A + { + public: + RangeError (const String& msg, bool silent = true); +@@ -857,7 +857,7 @@ + + + +- class InvalidDataType : public FitsException //## Inherits: %3947CF30033E ++ class CCFITS_EXPORT InvalidDataType : public FitsException //## Inherits: %3947CF30033E + { + public: + InvalidDataType (const String& str = string(), bool silent = true); +@@ -869,7 +869,7 @@ + + + +- class InvalidRowParameter : public FitsException //## Inherits: %39B5310F01A0 ++ class CCFITS_EXPORT InvalidRowParameter : public FitsException //## Inherits: %39B5310F01A0 + { + public: + InvalidRowParameter (const String& diag, bool silent = true); +@@ -881,7 +881,7 @@ + + + +- class WrongColumnType : public FitsException //## Inherits: %39B545780082 ++ class CCFITS_EXPORT WrongColumnType : public FitsException //## Inherits: %39B545780082 + { + public: + WrongColumnType (const String& diag, bool silent = true); +@@ -893,7 +893,7 @@ + + + +- class UnspecifiedLengths : public FitsException //## Inherits: %3A018C9D007D ++ class CCFITS_EXPORT UnspecifiedLengths : public FitsException //## Inherits: %3A018C9D007D + { + public: + UnspecifiedLengths (const String& diag, bool silent = true); +@@ -905,7 +905,7 @@ + + + +- class InvalidRowNumber : public FitsException //## Inherits: %3B0A850F0307 ++ class CCFITS_EXPORT InvalidRowNumber : public FitsException //## Inherits: %3B0A850F0307 + { + public: + InvalidRowNumber (const String& diag, bool silent = true); +@@ -917,7 +917,7 @@ + + + +- class InsufficientElements : public FitsException //## Inherits: %3B0BE611010A ++ class CCFITS_EXPORT InsufficientElements : public FitsException //## Inherits: %3B0BE611010A + { + public: + InsufficientElements (const String& msg, bool silent = true); +@@ -929,7 +929,7 @@ + + + +- class NoNullValue : public FitsException //## Inherits: %3B0D589A0092 ++ class CCFITS_EXPORT NoNullValue : public FitsException //## Inherits: %3B0D589A0092 + { + public: + NoNullValue (const String& diag, bool silent = true); +@@ -941,7 +941,7 @@ + + + +- class InvalidNumberOfRows : public FitsException //## Inherits: %3B20EB8B0205 ++ class CCFITS_EXPORT InvalidNumberOfRows : public FitsException //## Inherits: %3B20EB8B0205 + { + public: + InvalidNumberOfRows (int number, bool silent = true); +Index: AsciiTable.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- AsciiTable.h (date 1502267716000) ++++ AsciiTable.h (revision ) +@@ -133,7 +133,7 @@ + + + +- class AsciiTable : public Table //## Inherits: %3804A75CE420 ++ class CCFITS_EXPORT AsciiTable : public Table //## Inherits: %3804A75CE420 + { + + public: +Index: CCfits.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- CCfits.h (date 1502267716000) ++++ CCfits.h (revision ) +@@ -23,7 +23,7 @@ + #include + #include "longnam.h" + #include "float.h" +- ++#include "ccfits_export.h" + + namespace CCfits { + /*! \namespace CCfits +@@ -32,8 +32,8 @@ + static const int BITPIX = -32; + static const int NAXIS = 2; + static const int MAXDIM = 99; +- extern const unsigned long USBASE; +- extern const unsigned long ULBASE; ++ extern const CCFITS_EXPORT unsigned long USBASE; ++ extern const CCFITS_EXPORT unsigned long ULBASE; + + extern char BSCALE[7]; + extern char BZERO[6]; +Index: FITSBase.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- FITSBase.h (date 1502267716000) ++++ FITSBase.h (revision ) +@@ -30,7 +30,7 @@ + + + +- class FITSBase ++ class CCFITS_EXPORT FITSBase + { + + public: +Index: Keyword.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- Keyword.h (date 1502267716000) ++++ Keyword.h (revision ) +@@ -195,7 +195,7 @@ + + + +- class Keyword ++ class CCFITS_EXPORT Keyword + { + + public: +Index: ExtHDU.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- ExtHDU.h (date 1502267716000) ++++ ExtHDU.h (revision ) +@@ -435,7 +435,7 @@ + + + +- class ExtHDU : public HDU //## Inherits: %38048213E7A8 ++ class CCFITS_EXPORT ExtHDU : public HDU //## Inherits: %38048213E7A8 + { + + public: +Index: PHDU.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- PHDU.h (date 1502267716000) ++++ PHDU.h (revision ) +@@ -264,7 +264,7 @@ + + + +- class PHDU : public HDU //## Inherits: %394E6F9800C3 ++ class CCFITS_EXPORT PHDU : public HDU //## Inherits: %394E6F9800C3 + { + + public: +Index: BinTable.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- BinTable.h (date 1502267716000) ++++ BinTable.h (revision ) +@@ -127,7 +127,7 @@ + + + +- class BinTable : public Table //## Inherits: %3804A7E75F10 ++ class CCFITS_EXPORT BinTable : public Table //## Inherits: %3804A7E75F10 + { + + public: +Index: Image.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- Image.h (date 1502267716000) ++++ Image.h (revision ) +@@ -32,7 +32,7 @@ + + + template +- class Image ++ class Image + { + + public: +Index: ColumnCreator.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- ColumnCreator.h (date 1502267716000) ++++ ColumnCreator.h (revision ) +@@ -28,7 +28,7 @@ + + + +- class ColumnCreator ++ class CCFITS_EXPORT ColumnCreator + { + + public: +Index: FitsError.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- FitsError.h (date 1502267716000) ++++ FitsError.h (revision ) +@@ -14,6 +14,7 @@ + //#include + //#include + #include ++#include "ccfits_export.h" + using std::string; + + +@@ -90,7 +91,7 @@ + + + +- class FitsException ++ class CCFITS_EXPORT FitsException + { + public: + FitsException (const string& msg, bool& silent); +@@ -109,7 +110,7 @@ + + + +- class FitsError : public FitsException //## Inherits: %399170BD017D ++ class CCFITS_EXPORT FitsError : public FitsException //## Inherits: %399170BD017D + { + public: + FitsError (int errornum, bool silent = true); +@@ -123,7 +124,7 @@ + + + +- class FitsFatal ++ class CCFITS_EXPORT FitsFatal + { + public: + FitsFatal (const string& diag); +Index: HDUCreator.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- HDUCreator.h (date 1502267716000) ++++ HDUCreator.h (revision ) +@@ -35,7 +35,7 @@ + + + +- class HDUCreator ++ class CCFITS_EXPORT HDUCreator + { + + public: +Index: ccfits_export.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- ccfits_export.h (revision ) ++++ ccfits_export.h (revision ) +@@ -0,0 +1,42 @@ ++ ++#ifndef CCFITS_EXPORT_H ++#define CCFITS_EXPORT_H ++ ++#ifdef CCFITS_STATIC_DEFINE ++# define CCFITS_EXPORT ++# define CCFITS_NO_EXPORT ++#else ++# ifndef CCFITS_EXPORT ++# ifdef CCfits_EXPORTS ++ /* We are building this library */ ++# define CCFITS_EXPORT __declspec(dllexport) ++# else ++ /* We are using this library */ ++# define CCFITS_EXPORT __declspec(dllimport) ++# endif ++# endif ++ ++# ifndef CCFITS_NO_EXPORT ++# define CCFITS_NO_EXPORT ++# endif ++#endif ++ ++#ifndef CCFITS_DEPRECATED ++# define CCFITS_DEPRECATED __declspec(deprecated) ++#endif ++ ++#ifndef CCFITS_DEPRECATED_EXPORT ++# define CCFITS_DEPRECATED_EXPORT CCFITS_EXPORT CCFITS_DEPRECATED ++#endif ++ ++#ifndef CCFITS_DEPRECATED_NO_EXPORT ++# define CCFITS_DEPRECATED_NO_EXPORT CCFITS_NO_EXPORT CCFITS_DEPRECATED ++#endif ++ ++#if 0 /* DEFINE_NO_DEPRECATED */ ++# ifndef CCFITS_NO_DEPRECATED ++# define CCFITS_NO_DEPRECATED ++# endif ++#endif ++ ++#endif +Index: FITSUtil.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- FITSUtil.h (date 1502267716000) ++++ FITSUtil.h (revision ) +@@ -22,6 +22,7 @@ + #include + // FitsError + #include "FitsError.h" ++#include "ccfits_export.h" + #include + + +@@ -287,21 +288,21 @@ + template + void swap(std::vector& left, std::vector& right); + +- string lowerCase(const string& inputString); ++ string CCFITS_EXPORT lowerCase(const string& inputString); + +- string upperCase(const string& inputString); ++ string CCFITS_EXPORT upperCase(const string& inputString); + + // Check if a file name includes an image compression specifier, + // and return its location if it exists. +- string::size_type checkForCompressString(const string& fileName); ++ string::size_type CCFITS_EXPORT checkForCompressString(const string& fileName); + +- struct InvalidConversion : public FitsException ++ struct CCFITS_EXPORT InvalidConversion : public FitsException + { + InvalidConversion(const string& diag, bool silent=false); + + }; + +- struct MatchStem : public std::binary_function ++ struct CCFITS_EXPORT MatchStem : public std::binary_function + { + bool operator()(const string& left, const string& right) const; + }; +@@ -323,7 +324,7 @@ + + char** CharArray(const std::vector& inArray); + +- string FITSType2String( int typeInt ); ++ string CCFITS_EXPORT FITSType2String( int typeInt ); + + + template +@@ -633,7 +634,7 @@ + + + +- class UnrecognizedType : public FitsException //## Inherits: %3CE143AB00C6 ++ class CCFITS_EXPORT UnrecognizedType : public FitsException //## Inherits: %3CE143AB00C6 + { + public: + UnrecognizedType (string diag, bool silent = true); +Index: KeywordCreator.h +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +--- KeywordCreator.h (date 1502267716000) ++++ KeywordCreator.h (revision ) +@@ -24,7 +24,7 @@ + + + +- class KeywordCreator ++ class CCFITS_EXPORT KeywordCreator + { + + public: diff --git a/ports/ccfits/portfile.cmake b/ports/ccfits/portfile.cmake new file mode 100644 index 000000000..6bd9bd170 --- /dev/null +++ b/ports/ccfits/portfile.cmake @@ -0,0 +1,56 @@ +# 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) +#removes current source to prevent static builds from using patched source code +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/CCfits) +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/CCfits-2.5.tar.gz.extracted) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CCfits) + +vcpkg_download_distfile(ARCHIVE + URLS "https://heasarc.gsfc.nasa.gov/fitsio/ccfits/CCfits-2.5.tar.gz" + FILENAME "CCfits-2.5.tar.gz" + SHA512 63ab4d153063960510cf60651d5c832824cf85f937f84adc5390c7c2fb46eb8e9f5d8cda2554d79d24c7a4f1b6cf0b7a6e20958fb69920b65d7c362c0a5f26b5 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CCfits + PATCHES "${CMAKE_CURRENT_LIST_DIR}/dll_exports.patch" + ) +endif() + + +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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/CCfits.dll ${CURRENT_PACKAGES_DIR}/bin/CCfits.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/CCfits.dll ${CURRENT_PACKAGES_DIR}/debug/bin/CCfits.dll) +endif() + +# Remove duplicate include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccfits RENAME copyright) -- cgit v1.2.3 From a8d69a697b4e4c98b8886d4ac4b2baf9a8a09283 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 20 Aug 2017 22:06:20 +0200 Subject: [zstd] update to 1.3.1 --- ports/zstd/CONTROL | 2 +- ports/zstd/portfile.cmake | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL index 52713f2b8..ba363a585 100644 --- a/ports/zstd/CONTROL +++ b/ports/zstd/CONTROL @@ -1,3 +1,3 @@ Source: zstd -Version: 1.3.0 +Version: 1.3.1 Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index ba60826e0..1f93cac74 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/zstd - REF v1.3.0 - SHA512 5eb9e001e14d3342e76eb57b672c636fd56839ba8fc0ba9a751484ea93389c72c494ad2125dc2f9be1f72481f3af34568477123f7e9d3c7504e061e4c083cb30 + REF v1.3.1 + SHA512 cc2ace7b2dd19a2bbf4c43a89d64a7ce121309f712bfb4940ccfd6f9353f1466612ef7096adcd852f54eaea8663d884acf681c83ae5b274b24c9b85f21367b7c HEAD_REF dev) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -14,6 +14,11 @@ else() set(ZSTD_SHARED 1) endif() +# Enable multithreaded mode. CMake build doesn't provide a multithreaded +# library target, but it is the default in Makefile and VS projects. +set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} /DZSTD_MULTITHREAD") +set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS}") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/build/cmake PREFER_NINJA @@ -38,4 +43,5 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) endif() file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/zstd) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/zstd/LICENSE ${CURRENT_PACKAGES_DIR}/share/zstd/copyright) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/zstd) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/zstd/copyright "ZSTD is dual licensed - see LICENSE and COPYING files\n") -- cgit v1.2.3 From 2083bb689a6fe3fc70065b950bbde1c1b867559e Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Mon, 21 Aug 2017 13:28:25 -0400 Subject: Generate pkg-config files --- ports/allegro5/fix-pdb-install.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ports/allegro5/fix-pdb-install.patch b/ports/allegro5/fix-pdb-install.patch index ef964b9f3..714c69cf5 100644 --- a/ports/allegro5/fix-pdb-install.patch +++ b/ports/allegro5/fix-pdb-install.patch @@ -1,3 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 72348fe..c6fbecb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1010,14 +1010,9 @@ else() + set(PKG_CONFIG_FILES allegro ${ADDON_PKG_CONFIG_FILES}) + endif(WANT_MONOLITH) + +-# Install pkg-config files on Unix, and when cross-compiling on Unix. ++# Install pkg-config files + +-if(UNIX AND NOT WANT_FRAMEWORKS AND NOT IPHONE) +- set(INSTALL_PKG_CONFIG_FILES true) +-endif() +-if(CMAKE_CROSSCOMPILING AND CMAKE_HOST_UNIX) +- set(INSTALL_PKG_CONFIG_FILES true) +-endif() ++set(INSTALL_PKG_CONFIG_FILES true) + + if(INSTALL_PKG_CONFIG_FILES) + append_lib_type_suffix(lib_type) diff --git a/cmake/Common.cmake b/cmake/Common.cmake index 782196f..de29535 100644 --- a/cmake/Common.cmake -- cgit v1.2.3 From 9d7943e18789faf8d3f14a699e6be193e8898a4d Mon Sep 17 00:00:00 2001 From: Marek Kwasecki Date: Mon, 21 Aug 2017 20:10:50 +0200 Subject: * fixed SHA512 sum of the package --- ports/jxrlib/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/jxrlib/portfile.cmake b/ports/jxrlib/portfile.cmake index 57c9dc1fe..ddd02c3c7 100644 --- a/ports/jxrlib/portfile.cmake +++ b/ports/jxrlib/portfile.cmake @@ -3,7 +3,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) vcpkg_download_distfile(ARCHIVE URLS "http://download-codeplex.sec.s-msft.com/Download/SourceControlFileDownload.ashx?ProjectName=jxrlib&changeSetId=e922fa50cdf9a58f40cad07553bcaa2883d3c5bf" FILENAME "jxrlib_1_1.zip" - SHA512 6e8b579108444e9bea8d01f57e2ac3b63963c084adb8e265cfd82bb1199b8bd168b8aa41319cf34b87e97db1d72d0f3cc2d3dac881fcd1a6f398fe808d55772d + SHA512 c4f42c690a2543b00ef9fe6e4f479b582e966b27c13e8b0efad39fa85d70b4edb60eac91a856c371a4e875e7a2769e0aba31b508ee61f7314150c6eb34a19c0b ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -26,4 +26,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) 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) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() -- cgit v1.2.3 From ed9ef70d3f83db8a4f0fb1705d79a14c1e9e986f Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Mon, 21 Aug 2017 17:52:09 -0400 Subject: Add opus support and update to latest revision --- ports/allegro5/CONTROL | 4 ++-- ports/allegro5/portfile.cmake | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ports/allegro5/CONTROL b/ports/allegro5/CONTROL index 2d3003935..4bb51ae4e 100644 --- a/ports/allegro5/CONTROL +++ b/ports/allegro5/CONTROL @@ -1,4 +1,4 @@ Source: allegro5 -Version: 5.2.1.0 +Version: 5.2.2.0 Description: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like. -Build-Depends: opengl, zlib, freetype, libogg, libvorbis, libflac, openal-soft, libpng, bzip2, physfs, libtheora \ No newline at end of file +Build-Depends: opengl, zlib, freetype, libogg, libvorbis, libflac, openal-soft, libpng, bzip2, physfs, libtheora, opus, opusfile \ No newline at end of file diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index d2801d5d4..7d9f8e062 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -11,19 +11,19 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-7d8892a9278c57f2d8bb1e555f9ec59cf9ed4f73) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-e8b209bc20a60224859eb8a0cae082bd20d32ed1) vcpkg_from_github( OUT_SOURCE_PATH ${SOURCE_PATH} REPO liballeg/allegro5 - REF 7d8892a9278c57f2d8bb1e555f9ec59cf9ed4f73 - SHA512 b1531fa2f22023ecd4e053d03d1c54bf0b94aa3af004a3a06245c4d8278fea64e9d354467873ebd665301903d954795fed88e2467c88441f39c273e7e0d87d6e + REF e8b209bc20a60224859eb8a0cae082bd20d32ed1 + SHA512 50b30d4b539bd4a2488d2b33e9fbfc6fdfd340039d9086993a5719bab3cb020ee6fe7f6d3578755a52c8aab9816d25cd74710ce93b0b374a2f97620b6138419d HEAD_REF master ) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(ALLEGRO_USE_STATIC -DSHARED=ON) + set(ALLEGRO_USE_STATIC ON) else() - set(ALLEGRO_USE_STATIC -DSHARED=OFF) + set(ALLEGRO_USE_STATIC OFF) endif() vcpkg_apply_patches( @@ -39,7 +39,7 @@ vcpkg_configure_cmake( -DWANT_DOCS=OFF -DALLEGRO_SDL=OFF -DWANT_DEMO=OFF - ${ALLEGRO_USE_STATIC} + -DSHARED=${ALLEGRO_USE_STATIC} -DWANT_EXAMPLES=OFF -DWANT_CURL_EXAMPLE=OFF -DWANT_TESTS=OFF @@ -63,7 +63,7 @@ vcpkg_configure_cmake( -DWANT_OPENAL=ON -DWANT_OPENGL=ON -DWANT_OPENSL=OFF # Not yet available on vcpkg - -DWANT_OPUS=OFF # opus is available on vcpkg, but opusfile isn't + -DWANT_OPUS=ON -DWANT_PHYSFS=ON -DWANT_POPUP_EXAMPLES=OFF -DWANT_PRIMITIVES=ON @@ -77,7 +77,7 @@ vcpkg_configure_cmake( -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/AL -DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON - OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF + OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF -DCMAKE_BUILD_TYPE=Debug ) vcpkg_install_cmake() -- cgit v1.2.3 From 91e8afaa1800bef50f393fa1f5210364aafd2d32 Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Mon, 21 Aug 2017 17:59:31 -0400 Subject: Update portfile.cmake --- ports/allegro5/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 7d9f8e062..d4f74a569 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -77,7 +77,7 @@ vcpkg_configure_cmake( -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/AL -DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON - OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF -DCMAKE_BUILD_TYPE=Debug + OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF ) vcpkg_install_cmake() -- cgit v1.2.3 From 27be8b5c7489ea52156669f8e556ad3db1fd11d1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 21 Aug 2017 17:16:14 -0700 Subject: [vcpkg] Fix feature packages for non-default triplets. Reduce duplication between normal installs and feature installs. --- toolsrc/include/VcpkgPaths.h | 1 + toolsrc/include/vcpkg_Dependencies.h | 17 ++- toolsrc/include/vcpkg_Util.h | 6 +- toolsrc/src/VcpkgPaths.cpp | 1 + toolsrc/src/commands_install.cpp | 269 ++++++++++++++++------------------- toolsrc/src/test_install_plan.cpp | 4 +- toolsrc/src/vcpkg_Dependencies.cpp | 118 ++++++++------- 7 files changed, 207 insertions(+), 209 deletions(-) diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h index 95cd4bc28..e4e7ba83d 100644 --- a/toolsrc/include/VcpkgPaths.h +++ b/toolsrc/include/VcpkgPaths.h @@ -21,6 +21,7 @@ namespace vcpkg 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/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index 9ac52490e..e6c3c55c9 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -86,6 +86,9 @@ namespace vcpkg::Dependencies struct AnyAction { + AnyAction(InstallPlanAction&& iplan) : install_plan(std::move(iplan)) {} + AnyAction(RemovePlanAction&& rplan) : remove_plan(std::move(rplan)) {} + Optional install_plan; Optional remove_plan; }; @@ -114,21 +117,21 @@ namespace vcpkg::Dependencies RequestType request_type; }; - __interface PortFileProvider { virtual const SourceControlFile& get_control_file(const PackageSpec& spec) const; }; + __interface PortFileProvider { virtual const SourceControlFile& get_control_file(const std::string& spec) const; }; struct MapPortFile : PortFileProvider { - const std::unordered_map& ports; - explicit MapPortFile(const std::unordered_map& map); - const SourceControlFile& get_control_file(const PackageSpec& spec) const override; + const std::unordered_map& ports; + explicit MapPortFile(const std::unordered_map& map); + const SourceControlFile& get_control_file(const std::string& spec) const override; }; struct PathsPortFile : PortFileProvider { const VcpkgPaths& ports; - mutable std::unordered_map cache; + mutable std::unordered_map cache; explicit PathsPortFile(const VcpkgPaths& paths); - const SourceControlFile& get_control_file(const PackageSpec& spec) const override; + const SourceControlFile& get_control_file(const std::string& spec) const override; private: PathsPortFile(const PathsPortFile&) = delete; @@ -146,7 +149,7 @@ namespace vcpkg::Dependencies 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_Util.h b/toolsrc/include/vcpkg_Util.h index 671997e7e..a62b48d54 100644 --- a/toolsrc/include/vcpkg_Util.h +++ b/toolsrc/include/vcpkg_Util.h @@ -7,12 +7,12 @@ namespace vcpkg::Util { template - using FmapOut = decltype(std::declval()(std::declval()[0])); + using FmapOut = decltype(std::declval()(*begin(std::declval()))); template> - std::vector fmap(const Cont& xs, Func&& f) + std::vector fmap(Cont&& xs, Func&& f) { - using O = decltype(f(xs[0])); + using O = decltype(f(*begin(xs))); std::vector ret; ret.reserve(xs.size()); diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 60204bcdd..4be636650 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -214,6 +214,7 @@ 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 { diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index 3fc0e2563..9e37dc057 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -13,11 +13,7 @@ namespace vcpkg::Commands::Install { - using Dependencies::InstallPlanAction; - using Dependencies::InstallPlanType; - using Dependencies::RemovePlanAction; - using Dependencies::RemovePlanType; - using Dependencies::RequestType; + using namespace Dependencies; InstallDir InstallDir::from_destination_root(const fs::path& destination_root, const std::string& destination_subdirectory, @@ -176,41 +172,6 @@ namespace vcpkg::Commands::Install return SortedVector(std::move(installed_files)); } - static void print_plan(const std::map>& group_by_plan_type) - { - static constexpr std::array order = { - InstallPlanType::ALREADY_INSTALLED, InstallPlanType::BUILD_AND_INSTALL, InstallPlanType::INSTALL}; - - for (const InstallPlanType plan_type : order) - { - auto it = group_by_plan_type.find(plan_type); - if (it == group_by_plan_type.cend()) - { - continue; - } - - std::vector cont = it->second; - std::sort(cont.begin(), cont.end(), &InstallPlanAction::compare_by_name); - const std::string as_string = Strings::join("\n", cont, [](const InstallPlanAction* p) { - return Dependencies::to_output_string(p->request_type, p->spec.to_string()); - }); - - switch (plan_type) - { - case InstallPlanType::ALREADY_INSTALLED: - System::println("The following packages are already installed:\n%s", as_string); - continue; - case InstallPlanType::BUILD_AND_INSTALL: - System::println("The following packages will be built and installed:\n%s", as_string); - continue; - case InstallPlanType::INSTALL: - System::println("The following packages will be installed:\n%s", as_string); - continue; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - } - void install_package(const VcpkgPaths& paths, const BinaryControlFile& bcf, StatusParagraphs* status_db) { const fs::path package_dir = paths.package_dir(bcf.core_paragraph.spec); @@ -383,19 +344,78 @@ namespace vcpkg::Commands::Install Checks::unreachable(VCPKG_LINE_INFO); } - static void print_plan(const std::vector rebuilt_plans, - const std::vector new_plans) + static void print_plan(const std::vector& action_plan, bool is_recursive) { + std::vector remove_plans; + std::vector rebuilt_plans; + std::vector only_install_plans; + std::vector new_plans; + + const bool has_non_user_requested_packages = Util::find_if(action_plan, [](const AnyAction& package) -> bool { + if (auto iplan = package.install_plan.get()) + return iplan->request_type != RequestType::USER_REQUESTED; + else + return false; + }) != action_plan.cend(); + + for (auto&& action : action_plan) + { + if (auto install_action = action.install_plan.get()) + { + // remove plans are guaranteed to come before install plans, so we know the plan will be contained if at + // all. + auto it = Util::find_if( + remove_plans, [&](const RemovePlanAction* plan) { return plan->spec == install_action->spec; }); + if (it != remove_plans.end()) + { + rebuilt_plans.emplace_back(install_action); + } + else + { + if (install_action->plan_type == InstallPlanType::INSTALL) + only_install_plans.emplace_back(install_action); + else + new_plans.emplace_back(install_action); + } + } + else if (auto remove_action = action.remove_plan.get()) + { + remove_plans.emplace_back(remove_action); + } + } + + std::sort(remove_plans.begin(), remove_plans.end(), &RemovePlanAction::compare_by_name); + std::sort(rebuilt_plans.begin(), rebuilt_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(only_install_plans.begin(), only_install_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(new_plans.begin(), new_plans.end(), &InstallPlanAction::compare_by_name); + const std::string rebuilt_string = Strings::join("\n", rebuilt_plans, [](const InstallPlanAction* p) { - return Dependencies::to_output_string(p->request_type, p->displayname()); + return to_output_string(p->request_type, p->displayname()); }); + if (rebuilt_plans.size() > 0) System::println("The following packages will be rebuilt:\n%s", rebuilt_string); const std::string new_string = Strings::join("\n", new_plans, [](const InstallPlanAction* p) { - return Dependencies::to_output_string(p->request_type, p->displayname()); + return to_output_string(p->request_type, p->displayname()); }); + if (new_plans.size() > 0) + System::println("The following packages will be built and installed:\n%s", new_string); - if (rebuilt_plans.size() > 0) System::println("The following packages will be rebuilt:\n%s", rebuilt_string); - if (new_plans.size() > 0) System::println("The following packages will be installed:\n%s", new_string); + const std::string only_install_string = Strings::join("\n", only_install_plans, [](const InstallPlanAction* p) { + return to_output_string(p->request_type, p->displayname()); + }); + if (only_install_plans.size() > 0) + System::println("The following packages will be directly installed:\n%s", only_install_string); + + if (has_non_user_requested_packages) + System::println("Additional packages (*) will be installed to complete this operation."); + + if (remove_plans.size() > 0 && !is_recursive) + { + System::println(System::Color::warning, + "If you are sure you want to rebuild the above packages, run the command with the " + "--recurse option"); + Checks::exit_fail(VCPKG_LINE_INFO); + } } void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) @@ -410,86 +430,81 @@ namespace vcpkg::Commands::Install Commands::Help::create_example_string("install zlib zlib:x64-windows curl boost"); args.check_min_arg_count(1, example); - const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, example); + const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { + return Input::check_and_get_full_package_spec(arg, default_triplet, example); }); + for (auto&& spec : specs) - Input::check_triplet(spec.triplet(), paths); + { + Input::check_triplet(spec.package_spec.triplet(), paths); + if (!spec.features.empty() && !g_feature_packages) + { + Checks::exit_with_message( + VCPKG_LINE_INFO, "Feature packages are experimentally available under the --featurepackages flag."); + } + } const std::unordered_set options = args.check_and_get_optional_command_arguments( {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE}); const bool dryRun = options.find(OPTION_DRY_RUN) != options.cend(); const bool use_head_version = options.find(OPTION_USE_HEAD_VERSION) != options.cend(); const bool no_downloads = options.find(OPTION_NO_DOWNLOADS) != options.cend(); - const bool isRecursive = options.find(OPTION_RECURSE) != options.cend(); + const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); // create the plan StatusParagraphs status_db = database_load_check(paths); + const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version), + Build::to_allow_downloads(!no_downloads)}; + + std::vector action_plan; + if (g_feature_packages) { - const std::vector full_specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_full_package_spec(arg, default_triplet, example); - }); - - std::unordered_map scf_map; + std::unordered_map scf_map; auto all_ports = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); for (auto&& port : all_ports.paragraphs) { - auto pkg_spec = PackageSpec::from_name_and_triplet(port->core_paragraph->name, default_triplet) - .value_or_exit(VCPKG_LINE_INFO); - scf_map[pkg_spec] = std::move(*port); + scf_map[port->core_paragraph->name] = std::move(*port); } - std::vector action_plan = Dependencies::create_feature_install_plan( - scf_map, FullPackageSpec::to_feature_specs(full_specs), status_db); - // install plan will be empty if it is already installed - need to change this at status paragraph part - Checks::check_exit( - VCPKG_LINE_INFO, !action_plan.empty(), "Install plan cannot be empty for feature packages"); - - const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version), - Build::to_allow_downloads(!no_downloads)}; + action_plan = create_feature_install_plan(scf_map, FullPackageSpec::to_feature_specs(specs), status_db); + } + else + { + Dependencies::PathsPortFile paths_port_file(paths); + auto install_plan = Dependencies::create_install_plan( + paths_port_file, Util::fmap(specs, [](auto&& spec) { return spec.package_spec; }), status_db); - std::vector remove_plans; + action_plan = Util::fmap( + install_plan, [](InstallPlanAction& install_action) { return AnyAction(std::move(install_action)); }); + } - std::vector rebuilt_plans; - std::vector new_plans; + // install plan will be empty if it is already installed - need to change this at status paragraph part + Checks::check_exit(VCPKG_LINE_INFO, !action_plan.empty(), "Install plan cannot be empty"); - // removal will happen before install - for (auto&& action : action_plan) - { - if (auto install_action = action.install_plan.get()) - { - auto it = Util::find_if( - remove_plans, [&](const RemovePlanAction* plan) { return plan->spec == install_action->spec; }); - if (it != remove_plans.end()) - { - rebuilt_plans.emplace_back(install_action); - } - else - { - new_plans.emplace_back(install_action); - } - } - else if (auto remove_action = action.remove_plan.get()) - { - remove_plans.emplace_back(remove_action); - } - } + // log the plan + const std::string specs_string = Strings::join(",", action_plan, [](const AnyAction& action) { + if (auto iaction = action.install_plan.get()) + return iaction->spec.to_string(); + else if (auto raction = action.remove_plan.get()) + return "R$" + raction->spec.to_string(); + Checks::unreachable(VCPKG_LINE_INFO); + }); + Metrics::track_property("installplan", specs_string); - print_plan(rebuilt_plans, new_plans); + print_plan(action_plan, is_recursive); - if (remove_plans.size() > 0 && !isRecursive) - { - System::println(System::Color::warning, - "If you are sure you want to rebuild the above packages, run the command with the " - "--recurse option"); - Checks::exit_fail(VCPKG_LINE_INFO); - } + if (dryRun) + { + Checks::exit_success(VCPKG_LINE_INFO); + } - // execute the plan - for (const Dependencies::AnyAction& any_action : action_plan) + // execute the plan + if (g_feature_packages) + { + for (const auto& action : action_plan) { - if (auto install_action = any_action.install_plan.get()) + if (auto install_action = action.install_plan.get()) { const BuildResult result = perform_install_plan_action(paths, *install_action, install_plan_options, status_db); @@ -499,7 +514,7 @@ namespace vcpkg::Commands::Install Checks::exit_fail(VCPKG_LINE_INFO); } } - else if (auto remove_action = any_action.remove_plan.get()) + else if (auto remove_action = action.remove_plan.get()) { static const std::string OPTION_PURGE = "--purge"; static const std::string OPTION_NO_PURGE = "--no-purge"; @@ -537,50 +552,18 @@ namespace vcpkg::Commands::Install } } } - - Checks::exit_success(VCPKG_LINE_INFO); - } - - Dependencies::PathsPortFile paths_port_file(paths); - std::vector install_plan = - Dependencies::create_install_plan(paths_port_file, specs, status_db); - Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); - - // log the plan - const std::string specs_string = - Strings::join(",", install_plan, [](const InstallPlanAction& plan) { return plan.spec.to_string(); }); - Metrics::track_property("installplan", specs_string); - - std::map> group_by_plan_type; - Util::group_by(install_plan, &group_by_plan_type, [](const InstallPlanAction& p) { return p.plan_type; }); - print_plan(group_by_plan_type); - - const bool has_non_user_requested_packages = - Util::find_if(install_plan, [](const InstallPlanAction& package) -> bool { - return package.request_type != RequestType::USER_REQUESTED; - }) != install_plan.cend(); - - if (has_non_user_requested_packages) - { - System::println("Additional packages (*) will be installed to complete this operation."); } - - if (dryRun) + else { - Checks::exit_success(VCPKG_LINE_INFO); - } - - const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version), - Build::to_allow_downloads(!no_downloads)}; - - // execute the plan - for (const InstallPlanAction& action : install_plan) - { - const BuildResult result = perform_install_plan_action(paths, action, install_plan_options, status_db); - if (result != BuildResult::SUCCEEDED) + for (const auto& action : action_plan) { - System::println(Build::create_user_troubleshooting_message(action.spec)); - Checks::exit_fail(VCPKG_LINE_INFO); + const auto& iaction = action.install_plan.value_or_exit(VCPKG_LINE_INFO); + const BuildResult result = perform_install_plan_action(paths, iaction, install_plan_options, status_db); + if (result != BuildResult::SUCCEEDED) + { + System::println(Build::create_user_troubleshooting_message(iaction.spec)); + Checks::exit_fail(VCPKG_LINE_INFO); + } } } diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index f0884c063..939351872 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -12,7 +12,7 @@ namespace UnitTest1 { struct PackageSpecMap { - std::unordered_map map; + std::unordered_map map; Triplet triplet; PackageSpecMap(const Triplet& t) { triplet = t; } @@ -24,7 +24,7 @@ namespace UnitTest1 auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, triplet); Assert::IsTrue(spec.has_value()); - map.emplace(*spec.get(), std::move(*scf.get())); + map.emplace(scf->core_paragraph->name, std::move(*scf.get())); return PackageSpec{*spec.get()}; } PackageSpec set_package_map(std::string source, std::string version, std::string build_depends) diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 8f92179b5..abab359bb 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -63,24 +63,51 @@ namespace vcpkg::Dependencies struct ClusterGraph { - explicit ClusterGraph(std::unordered_map&& graph) : m_graph(std::move(graph)) {} + explicit ClusterGraph(std::unordered_map&& ports) + : m_ports(std::move(ports)) + { + } ClusterGraph(ClusterGraph&&) = default; Cluster& get(const PackageSpec& spec) - { - if (auto p = try_get(spec)) return *p; - Checks::exit_with_message(VCPKG_LINE_INFO, "error: reference to missing package: %s", spec); - } - Cluster* try_get(const PackageSpec& spec) { auto it = m_graph.find(spec); - if (it == m_graph.end()) return nullptr; - return &it->second; + if (it == m_graph.end()) + { + // Load on-demand from m_ports + auto it_ports = m_ports.find(spec.name()); + if (it_ports != m_ports.end()) + { + auto& clust = m_graph[spec]; + clust.spec = spec; + cluster_from_scf(*it_ports->second, clust); + return clust; + } + return m_graph[spec]; + } + return it->second; } private: + void cluster_from_scf(const SourceControlFile& scf, Cluster& out_cluster) + { + FeatureNodeEdges core_dependencies; + core_dependencies.build_edges = + filter_dependencies_to_specs(scf.core_paragraph->depends, out_cluster.spec.triplet()); + out_cluster.edges.emplace("core", std::move(core_dependencies)); + + for (const auto& feature : scf.feature_paragraphs) + { + FeatureNodeEdges added_edges; + added_edges.build_edges = filter_dependencies_to_specs(feature->depends, out_cluster.spec.triplet()); + out_cluster.edges.emplace(feature->name, std::move(added_edges)); + } + out_cluster.source_control_file = &scf; + } + ClusterGraph(const ClusterGraph&) = delete; std::unordered_map m_graph; + std::unordered_map m_ports; }; std::vector AnyParagraph::dependencies(const Triplet& triplet) const @@ -243,9 +270,9 @@ namespace vcpkg::Dependencies return left->spec.name() < right->spec.name(); } - MapPortFile::MapPortFile(const std::unordered_map& map) : ports(map) {} + MapPortFile::MapPortFile(const std::unordered_map& map) : ports(map) {} - const SourceControlFile& MapPortFile::get_control_file(const PackageSpec& spec) const + const SourceControlFile& MapPortFile::get_control_file(const std::string& spec) const { auto scf = ports.find(spec); if (scf == ports.end()) @@ -257,9 +284,9 @@ namespace vcpkg::Dependencies PathsPortFile::PathsPortFile(const VcpkgPaths& paths) : ports(paths) {} - const SourceControlFile& PathsPortFile::get_control_file(const PackageSpec& spec) const + const SourceControlFile& PathsPortFile::get_control_file(const std::string& spec) const { - std::unordered_map::iterator cache_it = cache.find(spec); + auto cache_it = cache.find(spec); if (cache_it != cache.end()) { return cache_it->second; @@ -307,7 +334,9 @@ namespace vcpkg::Dependencies auto it = status_db.find_installed(spec); if (it != status_db.end()) return InstallPlanAction{spec, {*it->get(), nullopt, nullopt}, request_type}; return InstallPlanAction{ - spec, {nullopt, nullopt, *port_file_provider.get_control_file(spec).core_paragraph}, request_type}; + spec, + {nullopt, nullopt, *port_file_provider.get_control_file(spec.name()).core_paragraph}, + request_type}; } }; @@ -504,35 +533,19 @@ namespace vcpkg::Dependencies } } - static ClusterGraph create_feature_install_graph(const std::unordered_map& map, + static ClusterGraph create_feature_install_graph(const std::unordered_map& map, const StatusParagraphs& status_db) { - std::unordered_map graph; - - for (const auto& it : map) - { - Cluster& node = graph[it.first]; - - node.spec = it.first; - FeatureNodeEdges core_dependencies; - core_dependencies.build_edges = - filter_dependencies_to_specs(it.second.core_paragraph->depends, node.spec.triplet()); - node.edges.emplace("core", std::move(core_dependencies)); - - for (const auto& feature : it.second.feature_paragraphs) - { - FeatureNodeEdges added_edges; - added_edges.build_edges = filter_dependencies_to_specs(feature->depends, node.spec.triplet()); - node.edges.emplace(feature->name, std::move(added_edges)); - } - node.source_control_file = &it.second; - } + std::unordered_map ptr_map; + for (auto&& p : map) + ptr_map.emplace(p.first, &p.second); + ClusterGraph graph(std::move(ptr_map)); auto installed_ports = get_installed_ports(status_db); for (auto&& status_paragraph : installed_ports) { - Cluster& cluster = graph[status_paragraph->package.spec]; + Cluster& cluster = graph.get(status_paragraph->package.spec); cluster.transient_uninstalled = false; @@ -559,20 +572,19 @@ namespace vcpkg::Dependencies for (auto&& dependency : reverse_edges) { - auto dep_cluster = graph.find(dependency.spec()); - if (dep_cluster == graph.end()) Checks::unreachable(VCPKG_LINE_INFO); + auto& dep_cluster = graph.get(dependency.spec()); auto depends_name = dependency.feature(); if (depends_name == "") depends_name = "core"; - auto& target_node = dep_cluster->second.edges[depends_name]; + auto& target_node = dep_cluster.edges[depends_name]; target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); } } - return ClusterGraph(std::move(graph)); + return graph; } - 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) { @@ -598,15 +610,13 @@ namespace vcpkg::Dependencies for (auto&& like_cluster : remove_toposort) { auto scf = *like_cluster.ptr->source_control_file.get(); - - AnyAction any_plan; - any_plan.remove_plan = RemovePlanAction{ - PackageSpec::from_name_and_triplet(scf->core_paragraph->name, like_cluster.ptr->spec.triplet()) - .value_or_exit(VCPKG_LINE_INFO), + auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, like_cluster.ptr->spec.triplet()) + .value_or_exit(VCPKG_LINE_INFO); + install_plan.emplace_back(RemovePlanAction{ + std::move(spec), RemovePlanType::REMOVE, - RequestType::AUTO_SELECTED}; - - install_plan.emplace_back(std::move(any_plan)); + RequestType::AUTO_SELECTED, + }); } for (auto&& like_cluster : insert_toposort) @@ -617,12 +627,12 @@ namespace vcpkg::Dependencies auto pkg_spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, like_cluster.ptr->spec.triplet()) .value_or_exit(VCPKG_LINE_INFO); - auto action = - InstallPlanAction{pkg_spec, *scf, like_cluster.ptr->to_install_features, RequestType::AUTO_SELECTED}; - - AnyAction any_plan; - any_plan.install_plan = std::move(action); - install_plan.emplace_back(std::move(any_plan)); + install_plan.emplace_back(InstallPlanAction{ + pkg_spec, + *scf, + like_cluster.ptr->to_install_features, + RequestType::AUTO_SELECTED, + }); } return install_plan; -- cgit v1.2.3 From c0fdbfb2e813a9decd18b5f8373f09c85756d1c0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 21 Aug 2017 17:19:40 -0700 Subject: Fix detection of 64-bit VSCode --- toolsrc/src/commands_edit.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp index 4e83fcca8..12ddaad77 100644 --- a/toolsrc/src/commands_edit.cpp +++ b/toolsrc/src/commands_edit.cpp @@ -30,6 +30,15 @@ namespace vcpkg::Commands::Edit } } + if (env_EDITOR.empty()) + { + const fs::path CODE_EXE_PATH = System::get_ProgramFiles_platform_bitness() / "Microsoft VS Code/Code.exe"; + if (fs.exists(CODE_EXE_PATH)) + { + env_EDITOR = CODE_EXE_PATH; + } + } + if (env_EDITOR.empty()) { const fs::path CODE_EXE_PATH = System::get_ProgramFiles_32_bit() / "Microsoft VS Code/Code.exe"; -- cgit v1.2.3 From d708484077ef891c5a69e4d9211613dbcfacb91e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 21 Aug 2017 20:06:47 -0700 Subject: [vcpkg] Feature packages now include user requested packages even if they are already installed. --- toolsrc/include/vcpkg_Dependencies.h | 12 +++--- toolsrc/include/vcpkg_Util.h | 10 +++++ toolsrc/src/test_install_plan.cpp | 82 ++++++++++++++++++++++++++++++++++++ toolsrc/src/vcpkg_Dependencies.cpp | 81 +++++++++++++++++++---------------- 4 files changed, 144 insertions(+), 41 deletions(-) diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index e6c3c55c9..bfb452596 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -3,6 +3,7 @@ #include "StatusParagraphs.h" #include "VcpkgPaths.h" #include "vcpkg_Graphs.h" +#include "vcpkg_Util.h" #include "vcpkg_optional.h" #include @@ -38,20 +39,21 @@ namespace vcpkg::Dependencies ALREADY_INSTALLED }; - struct InstallPlanAction + struct InstallPlanAction : Util::MoveOnlyBase { static bool compare_by_name(const InstallPlanAction* left, const InstallPlanAction* right); InstallPlanAction(); + + InstallPlanAction::InstallPlanAction(const PackageSpec& spec, + const std::unordered_set& features, + const RequestType& request_type); InstallPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type); InstallPlanAction(const PackageSpec& spec, const SourceControlFile& any_paragraph, const std::unordered_set& features, const RequestType& request_type); - InstallPlanAction(const InstallPlanAction&) = delete; - InstallPlanAction(InstallPlanAction&&) = default; - InstallPlanAction& operator=(const InstallPlanAction&) = delete; - InstallPlanAction& operator=(InstallPlanAction&&) = default; + std::string displayname() const; PackageSpec spec; diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg_Util.h index a62b48d54..da2f8eb69 100644 --- a/toolsrc/include/vcpkg_Util.h +++ b/toolsrc/include/vcpkg_Util.h @@ -62,4 +62,14 @@ namespace vcpkg::Util (*output)[key].push_back(&element); } } + + struct MoveOnlyBase + { + MoveOnlyBase() = default; + MoveOnlyBase(const MoveOnlyBase&) = delete; + MoveOnlyBase(MoveOnlyBase&&) = default; + + MoveOnlyBase& operator=(const MoveOnlyBase&) = delete; + MoveOnlyBase& operator=(MoveOnlyBase&&) = default; + }; } \ No newline at end of file diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index 939351872..d7a5014a9 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -6,6 +6,34 @@ using namespace Microsoft::VisualStudio::CppUnitTestFramework; using namespace vcpkg; +namespace Microsoft::VisualStudio::CppUnitTestFramework +{ + template<> + inline std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t) + { + switch (t) + { + case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; + case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; + case Dependencies::InstallPlanType::INSTALL: return L"INSTALL"; + case Dependencies::InstallPlanType::UNKNOWN: return L"UNKNOWN"; + default: return ToString((int)t); + } + } + + template<> + inline std::wstring ToString(const vcpkg::Dependencies::RequestType& t) + { + switch (t) + { + case Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED"; + case Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED"; + case Dependencies::RequestType::UNKNOWN: return L"UNKNOWN"; + default: return ToString((int)t); + } + } +} + namespace UnitTest1 { class InstallPlanTests : public TestClass @@ -127,6 +155,60 @@ namespace UnitTest1 Assert::IsTrue(e_pos > g_pos); } + TEST_METHOD(existing_package_scheme) + { + using Pgh = std::unordered_map; + std::vector> status_paragraphs; + status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, + {"Version", "1"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Status", "install ok installed"}})); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = FullPackageSpec{spec_map.set_package_map("a", "1", ""), {""}}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(1), install_plan.size()); + auto p = install_plan[0].install_plan.get(); + Assert::IsNotNull(p); + Assert::AreEqual("a", p->spec.name().c_str()); + Assert::AreEqual(Dependencies::InstallPlanType::ALREADY_INSTALLED, p->plan_type); + Assert::AreEqual(Dependencies::RequestType::USER_REQUESTED, p->request_type); + } + + TEST_METHOD(user_requested_package_scheme) + { + using Pgh = std::unordered_map; + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = FullPackageSpec{spec_map.set_package_map("a", "1", "b"), {""}}; + auto spec_b = FullPackageSpec{spec_map.set_package_map("b", "1", ""), {""}}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(2), install_plan.size()); + auto p = install_plan[0].install_plan.get(); + Assert::IsNotNull(p); + Assert::AreEqual("b", p->spec.name().c_str()); + Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p->plan_type); + Assert::AreEqual(Dependencies::RequestType::AUTO_SELECTED, p->request_type); + + auto p2 = install_plan[1].install_plan.get(); + Assert::IsNotNull(p2); + Assert::AreEqual("a", p2->spec.name().c_str()); + Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p2->plan_type); + Assert::AreEqual(Dependencies::RequestType::USER_REQUESTED, p2->request_type); + } + TEST_METHOD(long_install_scheme) { using Pgh = std::unordered_map; diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index abab359bb..8741e520f 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -29,6 +29,7 @@ namespace vcpkg::Dependencies std::unordered_set original_features; bool will_remove = false; bool transient_uninstalled = true; + RequestType request_type = RequestType::AUTO_SELECTED; Cluster() = default; private: @@ -39,6 +40,8 @@ namespace vcpkg::Dependencies struct ClusterPtr { Cluster* ptr; + + Cluster* operator->() { return ptr; } }; bool operator==(const ClusterPtr& l, const ClusterPtr& r) { return l.ptr == r.ptr; } @@ -147,50 +150,44 @@ namespace vcpkg::Dependencies } } - InstallPlanAction::InstallPlanAction() - : spec(), any_paragraph(), plan_type(InstallPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) - { - } + InstallPlanAction::InstallPlanAction() : plan_type(InstallPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const SourceControlFile& any_paragraph, const std::unordered_set& features, const RequestType& request_type) - : InstallPlanAction() + : spec(spec), plan_type(InstallPlanType::BUILD_AND_INSTALL), request_type(request_type), feature_list(features) { - this->spec = spec; - this->request_type = request_type; - - this->plan_type = InstallPlanType::BUILD_AND_INSTALL; this->any_paragraph.source_control_file = &any_paragraph; - this->feature_list = features; + } + + InstallPlanAction::InstallPlanAction(const PackageSpec& spec, + const std::unordered_set& features, + const RequestType& request_type) + : spec(spec), plan_type(InstallPlanType::ALREADY_INSTALLED), request_type(request_type), feature_list(features) + { } InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type) - : InstallPlanAction() + : spec(spec), request_type(request_type), any_paragraph(any_paragraph) { - this->spec = spec; - this->request_type = request_type; if (auto p = any_paragraph.status_paragraph.get()) { this->plan_type = InstallPlanType::ALREADY_INSTALLED; - this->any_paragraph.status_paragraph = *p; return; } if (auto p = any_paragraph.binary_paragraph.get()) { this->plan_type = InstallPlanType::INSTALL; - this->any_paragraph.binary_paragraph = *p; return; } if (auto p = any_paragraph.source_paragraph.get()) { this->plan_type = InstallPlanType::BUILD_AND_INSTALL; - this->any_paragraph.source_paragraph = *p; return; } @@ -594,7 +591,9 @@ namespace vcpkg::Dependencies for (auto&& spec : specs) { Cluster& spec_cluster = graph.get(spec.spec()); + spec_cluster.request_type = RequestType::USER_REQUESTED; mark_plus(spec.feature(), spec_cluster, graph, graph_plan); + graph_plan.install_graph.add_vertex(ClusterPtr{&spec_cluster}); } Graphs::GraphAdjacencyProvider adjacency_remove_graph(graph_plan.remove_graph.adjacency_list()); @@ -605,36 +604,46 @@ namespace vcpkg::Dependencies auto insert_vertex_list = graph_plan.install_graph.vertex_list(); auto insert_toposort = Graphs::topological_sort(insert_vertex_list, adjacency_install_graph); - std::vector install_plan; + std::vector plan; - for (auto&& like_cluster : remove_toposort) + for (auto&& p_cluster : remove_toposort) { - auto scf = *like_cluster.ptr->source_control_file.get(); - auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, like_cluster.ptr->spec.triplet()) + auto scf = *p_cluster->source_control_file.get(); + auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, p_cluster->spec.triplet()) .value_or_exit(VCPKG_LINE_INFO); - install_plan.emplace_back(RemovePlanAction{ + plan.emplace_back(RemovePlanAction{ std::move(spec), RemovePlanType::REMOVE, - RequestType::AUTO_SELECTED, + p_cluster->request_type, }); } - for (auto&& like_cluster : insert_toposort) + for (auto&& p_cluster : insert_toposort) { - if (!like_cluster.ptr->transient_uninstalled) continue; - - auto scf = *like_cluster.ptr->source_control_file.get(); - auto pkg_spec = - PackageSpec::from_name_and_triplet(scf->core_paragraph->name, like_cluster.ptr->spec.triplet()) - .value_or_exit(VCPKG_LINE_INFO); - install_plan.emplace_back(InstallPlanAction{ - pkg_spec, - *scf, - like_cluster.ptr->to_install_features, - RequestType::AUTO_SELECTED, - }); + if (p_cluster->transient_uninstalled) + { + // If it will be transiently uninstalled, we need to issue a full installation command + auto pscf = p_cluster->source_control_file.value_or_exit(VCPKG_LINE_INFO); + Checks::check_exit(VCPKG_LINE_INFO, pscf != nullptr); + plan.emplace_back(InstallPlanAction{ + p_cluster->spec, + *pscf, + p_cluster->to_install_features, + p_cluster->request_type, + }); + } + else + { + // If the package isn't transitively installed, still include it if the user explicitly requested it + if (p_cluster->request_type != RequestType::USER_REQUESTED) continue; + plan.emplace_back(InstallPlanAction{ + p_cluster->spec, + p_cluster->original_features, + p_cluster->request_type, + }); + } } - return install_plan; + return plan; } } -- cgit v1.2.3 From ea4799847f4440fa25942fab8049a33c92ead6ce Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 21 Aug 2017 20:41:35 -0700 Subject: [boost] Update to 1.65 --- ports/boost/CONTROL | 2 +- ports/boost/portfile.cmake | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 964665b96..2a45ca1d8 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost -Version: 1.64-5 +Version: 1.65 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2 diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 8db544237..9f0390468 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -1,14 +1,15 @@ include(vcpkg_common_functions) -set(VERSION 1_64) +set(VERSION 1_65) +set(VERSION2 1.65.0) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/boost_${VERSION}_0) ###################### # Acquire and arrange sources ###################### vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_${VERSION}_0.tar.bz2" - FILENAME "boost_${VERSION}_0.tar.bz2" - SHA512 68477f148f61be617552ef48559c5c2cb90d42264cabd6d5e87215d0d5024b48fca27c4afcfc1f77e490c6220d44fb1abdf0a53703867a2e4132c2857f69fedf + URLS "https://sourceforge.net/projects/boost/files/boost/${VERSION2}/boost_${VERSION}_0.7z" "http://dl.bintray.com/boostorg/release/${VERSION2}/source/boost_${VERSION}_0.7z" + FILENAME "boost_${VERSION}_0.7z" + SHA512 41909136371b3aac53fc06ae92404bd52adde4cbda9337886433d197059105208b67331abf6ca8dc45e4d28679733b5c01fc701cba17516c7134c97785cc5f7e ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) @@ -61,7 +62,7 @@ file(MAKE_DIRECTORY if(NOT EXISTS ${SOURCE_PATH}/b2.exe) message(STATUS "Bootstrapping") vcpkg_execute_required_process( - COMMAND "${SOURCE_PATH}/bootstrap.bat" + COMMAND "${SOURCE_PATH}/bootstrap.bat" msvc WORKING_DIRECTORY ${SOURCE_PATH} LOGNAME bootstrap ) -- cgit v1.2.3 From 6784704638f46d89d01458b1004e588f535958aa Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 21 Aug 2017 21:08:43 -0700 Subject: [vcpkg] Improve error messages when a feature is requested that doesn't exist. --- toolsrc/include/PackageSpec.h | 2 ++ toolsrc/src/PackageSpec.cpp | 12 +++++++-- toolsrc/src/test_install_plan.cpp | 6 ++--- toolsrc/src/vcpkg_Dependencies.cpp | 53 +++++++++++++++++++++++++++++--------- 4 files changed, 56 insertions(+), 17 deletions(-) diff --git a/toolsrc/include/PackageSpec.h b/toolsrc/include/PackageSpec.h index 8b485316f..c5ce767f9 100644 --- a/toolsrc/include/PackageSpec.h +++ b/toolsrc/include/PackageSpec.h @@ -43,6 +43,8 @@ namespace vcpkg const PackageSpec& spec() const { return m_spec; } + std::string to_string() const; + static std::vector from_strings_and_triplet(const std::vector& depends, const Triplet& t); diff --git a/toolsrc/src/PackageSpec.cpp b/toolsrc/src/PackageSpec.cpp index a5d40e998..a43bc5ff5 100644 --- a/toolsrc/src/PackageSpec.cpp +++ b/toolsrc/src/PackageSpec.cpp @@ -13,6 +13,12 @@ namespace vcpkg return (c == '-') || isdigit(c) || (isalpha(c) && islower(c)) || (c == '[') || (c == ']'); } + std::string FeatureSpec::to_string() const + { + if (feature().empty()) return spec().to_string(); + return Strings::format("%s[%s]:%s", name(), feature(), triplet()); + } + std::vector FeatureSpec::from_strings_and_triplet(const std::vector& depends, const Triplet& triplet) { @@ -36,8 +42,10 @@ namespace vcpkg } else { - Checks::exit_with_message( - VCPKG_LINE_INFO, "error while parsing feature list: %s: %s", to_string(maybe_spec.error()), depend); + Checks::exit_with_message(VCPKG_LINE_INFO, + "error while parsing feature list: %s: %s", + vcpkg::to_string(maybe_spec.error()), + depend); } } return f_specs; diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index d7a5014a9..1c415f273 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -537,9 +537,9 @@ namespace UnitTest1 remove_plan_check(&install_plan[1], "b"); // TODO: order here may change but A < X, and B anywhere - features_check(&install_plan[2], "a", {"core"}); - features_check(&install_plan[3], "x", {"core"}); - features_check(&install_plan[4], "b", {"core", "1"}); + features_check(&install_plan[2], "b", {"core", "1"}); + features_check(&install_plan[3], "a", {"core"}); + features_check(&install_plan[4], "x", {"core"}); } TEST_METHOD(basic_feature_test_8) diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 8741e520f..512e65e28 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -453,23 +453,30 @@ namespace vcpkg::Dependencies return toposort; } - void mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); + enum class MarkPlusResult + { + FEATURE_NOT_FOUND, + SUCCESS, + }; + + MarkPlusResult mark_plus(const std::string& feature, + Cluster& cluster, + ClusterGraph& pkg_to_cluster, + GraphPlan& graph_plan); void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); - void mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) + MarkPlusResult mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) { if (feature == "") { // Indicates that core was not specified in the reference return mark_plus("core", cluster, graph, graph_plan); } + auto it = cluster.edges.find(feature); - if (it == cluster.edges.end()) - { - Checks::unreachable(VCPKG_LINE_INFO); - } + if (it == cluster.edges.end()) return MarkPlusResult::FEATURE_NOT_FOUND; - if (cluster.edges[feature].plus) return; + if (cluster.edges[feature].plus) return MarkPlusResult::SUCCESS; if (cluster.original_features.find(feature) == cluster.original_features.end()) { @@ -478,7 +485,7 @@ namespace vcpkg::Dependencies if (!cluster.transient_uninstalled) { - return; + return MarkPlusResult::SUCCESS; } cluster.edges[feature].plus = true; @@ -494,16 +501,28 @@ namespace vcpkg::Dependencies if (feature != "core") { // All features implicitly depend on core - mark_plus("core", cluster, graph, graph_plan); + auto res = mark_plus("core", cluster, graph, graph_plan); + + // Should be impossible for "core" to not exist + Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS); } for (auto&& depend : cluster.edges[feature].build_edges) { auto& depend_cluster = graph.get(depend.spec()); - mark_plus(depend.feature(), depend_cluster, graph, graph_plan); + auto res = mark_plus(depend.feature(), depend_cluster, graph, graph_plan); + + Checks::check_exit(VCPKG_LINE_INFO, + res == MarkPlusResult::SUCCESS, + "Error: Unable to satisfy dependency %s of %s", + depend, + FeatureSpec(cluster.spec, feature)); + if (&depend_cluster == &cluster) continue; graph_plan.install_graph.add_edge({&cluster}, {&depend_cluster}); } + + return MarkPlusResult::SUCCESS; } void mark_minus(Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) @@ -526,7 +545,13 @@ namespace vcpkg::Dependencies cluster.transient_uninstalled = true; for (auto&& original_feature : cluster.original_features) { - mark_plus(original_feature, cluster, graph, graph_plan); + auto res = mark_plus(original_feature, cluster, graph, graph_plan); + if (res != MarkPlusResult::SUCCESS) + { + System::println(System::Color::warning, + "Warning: could not reinstall feature %s", + FeatureSpec{cluster.spec, original_feature}); + } } } @@ -592,7 +617,11 @@ namespace vcpkg::Dependencies { Cluster& spec_cluster = graph.get(spec.spec()); spec_cluster.request_type = RequestType::USER_REQUESTED; - mark_plus(spec.feature(), spec_cluster, graph, graph_plan); + auto res = mark_plus(spec.feature(), spec_cluster, graph, graph_plan); + + Checks::check_exit( + VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); + graph_plan.install_graph.add_vertex(ClusterPtr{&spec_cluster}); } -- cgit v1.2.3 From 0e9dcc518f57a8fcef796ae6003e79b967a0cb62 Mon Sep 17 00:00:00 2001 From: glachancecmaisonneuve Date: Tue, 22 Aug 2017 01:21:54 -0400 Subject: [unrar] initial port --- ports/unrar/CONTROL | 3 +++ ports/unrar/portfile.cmake | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 ports/unrar/CONTROL create mode 100644 ports/unrar/portfile.cmake diff --git a/ports/unrar/CONTROL b/ports/unrar/CONTROL new file mode 100644 index 000000000..214fd2dbe --- /dev/null +++ b/ports/unrar/CONTROL @@ -0,0 +1,3 @@ +Source: unrar +Version: 5.5.6 +Description: rarlab's unrar libary diff --git a/ports/unrar/portfile.cmake b/ports/unrar/portfile.cmake new file mode 100644 index 000000000..5bb065c91 --- /dev/null +++ b/ports/unrar/portfile.cmake @@ -0,0 +1,50 @@ +include(vcpkg_common_functions) +set(UNRAR_VERSION "5.5.8") +set(UNRAR_SHA512 9eac83707fa47a03925e5f3e8adf47889064d748304b732d12a2d379ab525b441f1aa33216377d4ef445f45c4e8ad73d2cd0b560601ceac344c60571b77fd6aa) +set(UNRAR_FILENAME unrarsrc-${UNRAR_VERSION}.tar.gz) +set(UNRAR_URL http://www.rarlab.com/rar/${UNRAR_FILENAME}) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/unrar) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "A static build is included with the dynamic build. Try VCPKG INSTALL UNRAR:X86-WINDOWS UNRAR:X64-WINDOWS") +endif() + +#SRC +vcpkg_download_distfile(ARCHIVE + URLS ${UNRAR_URL} + FILENAME ${UNRAR_FILENAME} + SHA512 ${UNRAR_SHA512} +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_build_msbuild( + PROJECT_PATH "${SOURCE_PATH}/UnRARDll.vcxproj" + OPTIONS_DEBUG /p:OutDir=../../${TARGET_TRIPLET}-dbg/ + OPTIONS_RELEASE /p:OutDir=../../${TARGET_TRIPLET}-rel/ + OPTIONS /VERBOSITY:Diagnostic /DETAILEDSUMMARY +) + +#INCLUDE (named dll.hpp in source, and unrar.h in all rarlabs distributions) +file(INSTALL ${SOURCE_PATH}/dll.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME unrar.h) + +#DLL & LIB +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/unrar.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/unrar.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/unrar.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/unrar.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +#copy pdbs now, while filenames still match +vcpkg_copy_pdbs() + +#RarLabs has historically distributed it's x64 architecture unrar library as UnRAR64.dll +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/unrar.dll ${CURRENT_PACKAGES_DIR}/bin/UnRAR64.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/unrar.lib ${CURRENT_PACKAGES_DIR}/lib/UnRAR64.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/unrar.dll ${CURRENT_PACKAGES_DIR}/debug/bin/UnRAR64.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/unrar.lib ${CURRENT_PACKAGES_DIR}/debug/lib/UnRAR64.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/unrar.pdb ${CURRENT_PACKAGES_DIR}/bin/UnRAR64.pdb) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/unrar.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/UnRAR64.pdb) +endif() + +#COPYRIGHT +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/unrar RENAME copyright) -- cgit v1.2.3 From b38b4715735f2369e1f404dbea3e151c29c964c4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 22 Aug 2017 11:59:15 -0700 Subject: [sophus] PREFER_NINJA --- ports/sophus/CONTROL | 2 +- ports/sophus/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/sophus/CONTROL b/ports/sophus/CONTROL index 24c8a482b..8214c4e7e 100644 --- a/ports/sophus/CONTROL +++ b/ports/sophus/CONTROL @@ -1,4 +1,4 @@ Source: sophus Version: 1.0.0 -Build-Depends:eigen3, ceres +Build-Depends: eigen3, ceres Description: Lie group library for C++ diff --git a/ports/sophus/portfile.cmake b/ports/sophus/portfile.cmake index dba573c54..9a45e62b8 100644 --- a/ports/sophus/portfile.cmake +++ b/ports/sophus/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() -- cgit v1.2.3 From abd4b16e9e44418d7a4a82deef9e436861046371 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 22 Aug 2017 12:32:31 -0700 Subject: [libharu] Bump version --- ports/libharu/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libharu/CONTROL b/ports/libharu/CONTROL index 743224fc9..b32612433 100644 --- a/ports/libharu/CONTROL +++ b/ports/libharu/CONTROL @@ -1,4 +1,4 @@ Source: libharu -Version: 2017-08-15-d84867ebf9f +Version: 2017-08-15-d84867ebf9f-1 Description: libharu - free PDF library Build-Depends: zlib,libpng -- cgit v1.2.3 From ca5c3899b4bd4cbd480103c889363227e23ad2f7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 22 Aug 2017 12:42:43 -0700 Subject: Update CHANGELOG and bump version to v0.0.84 --- CHANGELOG.md | 33 +++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52357ed6f..0c625786b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,36 @@ +vcpkg (0.0.84) +-------------- + * Add ports: + - cfitsio 3.410 + - chmlib 0.40 + - gl2ps OpenGL to PostScript Printing Library + - libharu 2017-08-15-d84867ebf9f-1 + - mpfr 3.1.5 + - sophus 1.0.0 + * Update ports: + - allegro5 5.2.1.0 -> 5.2.2.0 + - blaze 3.1 -> 3.2 + - boost 1.64-5 -> 1.65 + - curl 7.51.0-3 -> 7.55.0 + - flann 1.9.1-4 -> 1.9.1-5 + - gdal 1.11.3-4 -> 1.11.3-5 + - glew 2.0.0-2 -> 2.1.0 + - lcms 2.8-1 -> 2.8-2 + - libogg 2017-07-27-cab46b19847 -> 1.3.2-cab46b1-2 + - libuv 1.13.1 -> 1.14.0 + - lz4 1.7.5 -> 1.8.0 + - pcre2 10.23 -> 10.30 + - spdlog 0.13.0 -> 0.14.0 + - zstd 1.3.0 -> 1.3.1 + * Bump required version & auto-downloaded version of `git` to 2.14.1 (due to a security vulnerability) + * Show more information when there are issues acquiring `vcpkg` tool dependencies (`git`, `cmake`, `nuget`) + * Remove download prompts for cmake/git. The prompts were causing a lot of issues for users and especially CI builds + * `vcpkg edit`: Fix detection of 64-bit VSCode + * Fixes and improvements in the `vcpkg` tool itself + +-- vcpkg team TUE, 22 Aug 2017 13:00:00 -0800 + + vcpkg (0.0.83) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 6320e715f..fef58cb81 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.83" \ No newline at end of file +"0.0.84" \ No newline at end of file -- cgit v1.2.3 From c50e9b4cfbf2e9be2806dfd45cfab45404e4cb56 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 22 Aug 2017 22:45:01 +0300 Subject: [libp7-baical] update to 4.4 --- ports/libp7-baical/CMakeLists.txt | 5 +++-- ports/libp7-baical/CONTROL | 2 +- ports/libp7-baical/portfile.cmake | 8 ++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ports/libp7-baical/CMakeLists.txt b/ports/libp7-baical/CMakeLists.txt index c4559c603..6b1044e43 100644 --- a/ports/libp7-baical/CMakeLists.txt +++ b/ports/libp7-baical/CMakeLists.txt @@ -3,13 +3,14 @@ cmake_minimum_required(VERSION 3.0) set(SOURCES "Sources/ClBaical.cpp" "Sources/ClFile.cpp" - "Sources/ClText.cpp" "Sources/Client.cpp" "Sources/ClNull.cpp" + "Sources/ClText.cpp" "Sources/CRC32.cpp" "Sources/Proxy.cpp" "Sources/Telemetry.cpp" - "Sources/Trace.cpp") + "Sources/Trace.cpp" +) if(WIN32) set(RESOURCES "Sources/P7Client.rc") diff --git a/ports/libp7-baical/CONTROL b/ports/libp7-baical/CONTROL index df6cf94b6..e117adea5 100644 --- a/ports/libp7-baical/CONTROL +++ b/ports/libp7-baical/CONTROL @@ -1,3 +1,3 @@ Source: libp7-baical -Version: 4.1 +Version: 4.4-1 Description: P7 is a library for high-speed sending telemetry & trace data from application diff --git a/ports/libp7-baical/portfile.cmake b/ports/libp7-baical/portfile.cmake index f298186e0..bb9b751f4 100644 --- a/ports/libp7-baical/portfile.cmake +++ b/ports/libp7-baical/portfile.cmake @@ -4,8 +4,12 @@ if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm) message(FATAL_ERROR "libP7 does not support ARM") endif() -set(LIBP7_VERSION 4.1) -set(LIBP7_HASH 6259416378f1fe60ad6097faf9facd2de1a3ea13e8015a5727d6a179caa88a7f6707b47273afceebc16b39883da4768f29feac199f7d6c354b744b643c2044ab) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "libP7 does not support UWP") +endif() + +set(LIBP7_VERSION 4.4) +set(LIBP7_HASH ce33db9a0c731e4dff95646703fe5fd96015f1c528377aa5dbe2e533529b0e8c45a4b74ee2b4616a811a7f9038c12edf106b08b3c21cec9cb6bdf85ad6e1d64f) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libP7_v${LIBP7_VERSION}) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From e4eee15ef96ee4a06f40256da8901b28833bf22c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 22 Aug 2017 13:41:32 -0700 Subject: Fix vcpkg_acquire_msys --- scripts/cmake/vcpkg_acquire_msys.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index 87c34c274..830022906 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -58,13 +58,13 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) set(URL "https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20161025.tar.xz/download") set(ARCHIVE "msys2-base-x86_64-20161025.tar.xz") set(HASH 6c4c18ec59db80b8269698d074866438a624f1ce735ee5005a01b148b02e8f2e966ae381aa1cb4c50f6226c3b7feb271e36907cf26580df084d695b3c9f5c0eb) - set(STAMP "initialized-msys2.stamp") + set(STAMP "initialized-msys2_64.stamp") else() set(TOOLSUBPATH msys32) set(URL "https://sourceforge.net/projects/msys2/files/Base/i686/msys2-base-i686-20161025.tar.xz/download") set(ARCHIVE "msys2-base-i686-20161025.tar.xz") set(HASH c9260a38e0c6bf963adeaea098c4e376449c1dd0afe07480741d6583a1ac4c138951ccb0c5388bd148e04255a5c1a23bf5ee2d58dcd6607c14f1eaa5639a7c85) - set(STAMP "initialized-msys2_x64.stamp") + set(STAMP "initialized-msys2_32.stamp") endif() set(PATH_TO_ROOT ${TOOLPATH}/${TOOLSUBPATH}) -- cgit v1.2.3 From e8253d27280bfca4d143daced42b715b6ef5fa58 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 22 Aug 2017 13:58:13 -0700 Subject: [pangolin] PREFER_NINJA, remove v from version --- ports/pangolin/CONTROL | 4 ++-- ports/pangolin/portfile.cmake | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL index c792921f2..5e110627b 100644 --- a/ports/pangolin/CONTROL +++ b/ports/pangolin/CONTROL @@ -1,4 +1,4 @@ Source: pangolin -Version: v0.5 -Build-Depends:eigen3 +Version: 0.5 +Build-Depends: eigen3 Description: Lightweight GUI Library \ No newline at end of file diff --git a/ports/pangolin/portfile.cmake b/ports/pangolin/portfile.cmake index f2c17920c..d93f9d7cd 100644 --- a/ports/pangolin/portfile.cmake +++ b/ports/pangolin/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ) -- cgit v1.2.3 From bee29497f9e210c2b8d33edccba0d1d95188d852 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 22 Aug 2017 15:03:42 -0700 Subject: [vcpkg] Compact tests for improved maintainability. --- toolsrc/src/test_install_plan.cpp | 421 +++++++++++++------------------------- 1 file changed, 142 insertions(+), 279 deletions(-) diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index 1c415f273..836ff09ae 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -38,28 +38,30 @@ namespace UnitTest1 { class InstallPlanTests : public TestClass { - struct PackageSpecMap + static std::unique_ptr make_control_file( + const char* name, + const char* depends, + const std::vector>& features = {}) { - std::unordered_map map; - Triplet triplet; - PackageSpecMap(const Triplet& t) { triplet = t; } - - PackageSpec get_package_spec(std::vector>&& fields) - { - auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(fields)); - Assert::IsTrue(m_pgh.has_value()); - auto& scf = *m_pgh.get(); - - 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.get())); - return PackageSpec{*spec.get()}; - } - PackageSpec set_package_map(std::string source, std::string version, std::string build_depends) + using Pgh = std::unordered_map; + std::vector scf_pghs; + scf_pghs.push_back(Pgh{ + {"Source", name}, + {"Version", "0"}, + {"Build-Depends", depends}, + }); + for (auto&& feature : features) { - return get_package_spec({{{"Source", source}, {"Version", version}, {"Build-Depends", build_depends}}}); + scf_pghs.push_back(Pgh{ + {"Feature", feature.first}, + {"Description", "feature"}, + {"Build-Depends", feature.second}, + }); } - }; + auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(scf_pghs)); + Assert::IsTrue(m_pgh.has_value()); + return std::move(*m_pgh.get()); + } static void features_check(Dependencies::AnyAction* install_action, std::string pkg_name, @@ -96,14 +98,58 @@ namespace UnitTest1 Assert::AreEqual(pkg_name.c_str(), plan.spec.name().c_str()); } + static std::unique_ptr make_status_pgh(const char* name, const char* depends = "") + { + using Pgh = std::unordered_map; + return std::make_unique(Pgh{{"Package", name}, + {"Version", "1"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", depends}, + {"Status", "install ok installed"}}); + } + static std::unique_ptr make_status_feature_pgh(const char* name, + const char* feature, + const char* depends = "") + { + using Pgh = std::unordered_map; + return std::make_unique(Pgh{{"Package", name}, + {"Version", "1"}, + {"Feature", feature}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", depends}, + {"Status", "install ok installed"}}); + } + struct PackageSpecMap + { + std::unordered_map map; + Triplet triplet; + PackageSpecMap(const Triplet& t) { triplet = t; } + + PackageSpec emplace(const char* name, + const char* depends = "", + const std::vector>& features = {}) + { + return emplace(std::move(*make_control_file(name, depends, features))); + } + PackageSpec emplace(vcpkg::SourceControlFile&& scf) + { + 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)); + return PackageSpec{*spec.get()}; + } + }; + TEST_METHOD(basic_install_scheme) { std::vector> status_paragraphs; PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = spec_map.set_package_map("a", "1.2.8", "b"); - auto spec_b = spec_map.set_package_map("b", "1.3", "c"); - auto spec_c = spec_map.set_package_map("c", "2.5.3", ""); + auto spec_a = spec_map.emplace("a", "b"); + auto spec_b = spec_map.emplace("b", "c"); + auto spec_c = spec_map.emplace("c"); auto map_port = Dependencies::MapPortFile(spec_map.map); auto install_plan = @@ -120,14 +166,14 @@ namespace UnitTest1 std::vector> status_paragraphs; PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = spec_map.set_package_map("a", "1.2.8", "d"); - auto spec_b = spec_map.set_package_map("b", "1.3", "d, e"); - auto spec_c = spec_map.set_package_map("c", "2.5.3", "e, h"); - auto spec_d = spec_map.set_package_map("d", "4.0", "f, g, h"); - auto spec_e = spec_map.set_package_map("e", "1.0", "g"); - auto spec_f = spec_map.set_package_map("f", "1.0", ""); - auto spec_g = spec_map.set_package_map("g", "1.0", ""); - auto spec_h = spec_map.set_package_map("h", "1.0", ""); + auto spec_a = spec_map.emplace("a", "d"); + auto spec_b = spec_map.emplace("b", "d, e"); + auto spec_c = spec_map.emplace("c", "e, h"); + auto spec_d = spec_map.emplace("d", "f, g, h"); + auto spec_e = spec_map.emplace("e", "g"); + auto spec_f = spec_map.emplace("f"); + auto spec_g = spec_map.emplace("g"); + auto spec_h = spec_map.emplace("h"); auto map_port = Dependencies::MapPortFile(spec_map.map); auto install_plan = Dependencies::create_install_plan( @@ -157,16 +203,11 @@ namespace UnitTest1 TEST_METHOD(existing_package_scheme) { - using Pgh = std::unordered_map; std::vector> status_paragraphs; - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, - {"Version", "1"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Status", "install ok installed"}})); + status_paragraphs.push_back(make_status_pgh("a")); PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{spec_map.set_package_map("a", "1", ""), {""}}; + auto spec_a = FullPackageSpec{spec_map.emplace("a")}; auto install_plan = Dependencies::create_feature_install_plan(spec_map.map, @@ -183,12 +224,11 @@ namespace UnitTest1 TEST_METHOD(user_requested_package_scheme) { - using Pgh = std::unordered_map; std::vector> status_paragraphs; PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{spec_map.set_package_map("a", "1", "b"), {""}}; - auto spec_b = FullPackageSpec{spec_map.set_package_map("b", "1", ""), {""}}; + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b")}; + auto spec_b = FullPackageSpec{spec_map.emplace("b")}; auto install_plan = Dependencies::create_feature_install_plan(spec_map.map, @@ -211,33 +251,22 @@ namespace UnitTest1 TEST_METHOD(long_install_scheme) { - using Pgh = std::unordered_map; std::vector> status_paragraphs; - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "j"}, - {"Version", "1.2.8"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", "k"}, - {"Status", "install ok installed"}})); - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "k"}, - {"Version", "1.2.8"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", ""}, - {"Status", "install ok installed"}})); + status_paragraphs.push_back(make_status_pgh("j", "k")); + status_paragraphs.push_back(make_status_pgh("k")); PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = spec_map.set_package_map("a", "1.2.8", "b, c, d, e, f, g, h, j, k"); - auto spec_b = spec_map.set_package_map("b", "1.2.8", "c, d, e, f, g, h, j, k"); - auto spec_c = spec_map.set_package_map("c", "1.2.8", "d, e, f, g, h, j, k"); - auto spec_d = spec_map.set_package_map("d", "1.2.8", "e, f, g, h, j, k"); - auto spec_e = spec_map.set_package_map("e", "1.2.8", "f, g, h, j, k"); - auto spec_f = spec_map.set_package_map("f", "1.2.8", "g, h, j, k"); - auto spec_g = spec_map.set_package_map("g", "1.2.8", "h, j, k"); - auto spec_h = spec_map.set_package_map("h", "1.2.8", "j, k"); - auto spec_j = spec_map.set_package_map("j", "1.2.8", "k"); - auto spec_k = spec_map.set_package_map("k", "1.2.8", ""); + auto spec_a = spec_map.emplace("a", "b, c, d, e, f, g, h, j, k"); + auto spec_b = spec_map.emplace("b", "c, d, e, f, g, h, j, k"); + auto spec_c = spec_map.emplace("c", "d, e, f, g, h, j, k"); + auto spec_d = spec_map.emplace("d", "e, f, g, h, j, k"); + auto spec_e = spec_map.emplace("e", "f, g, h, j, k"); + auto spec_f = spec_map.emplace("f", "g, h, j, k"); + auto spec_g = spec_map.emplace("g", "h, j, k"); + auto spec_h = spec_map.emplace("h", "j, k"); + auto spec_j = spec_map.emplace("j", "k"); + auto spec_k = spec_map.emplace("k"); auto map_port = Dependencies::MapPortFile(spec_map.map); auto install_plan = @@ -256,45 +285,14 @@ namespace UnitTest1 TEST_METHOD(basic_feature_test_1) { - using Pgh = std::unordered_map; - std::vector> status_paragraphs; - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, - {"Default-Features", ""}, - {"Version", "1.3.8"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", "b, b[beefeatureone]"}, - {"Status", "install ok installed"}})); - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "b"}, - {"Feature", "beefeatureone"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", ""}, - {"Status", "install ok installed"}})); - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "b"}, - {"Default-Features", "beefeatureone"}, - {"Version", "1.3"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", ""}, - {"Status", "install ok installed"}})); + status_paragraphs.push_back(make_status_pgh("a", "b, b[b1]")); + status_paragraphs.push_back(make_status_pgh("b")); + status_paragraphs.push_back(make_status_feature_pgh("b", "b1")); PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = - FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "a"}, {"Version", "1.3.8"}, {"Build-Depends", "b, b[beefeatureone]"}}, - {{"Feature", "featureone"}, - {"Description", "the first feature for a"}, - {"Build-Depends", "b[beefeaturetwo]"}}, - }), - {"featureone"}}; - auto spec_b = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, - {{"Feature", "beefeatureone"}, {"Description", "the first feature for b"}, {"Build-Depends", ""}}, - {{"Feature", "beefeaturetwo"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}}, - {{"Feature", "beefeaturethree"}, {"Description", "the third feature for b"}, {"Build-Depends", ""}}, - })}; + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b, b[b1]", {{"a1", "b[b2]"}}), {"a1"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})}; auto install_plan = Dependencies::create_feature_install_plan(spec_map.map, @@ -304,33 +302,18 @@ namespace UnitTest1 Assert::AreEqual(size_t(4), install_plan.size()); remove_plan_check(&install_plan[0], "a"); remove_plan_check(&install_plan[1], "b"); - features_check(&install_plan[2], "b", {"beefeatureone", "core", "beefeatureone"}); - features_check(&install_plan[3], "a", {"featureone", "core"}); + features_check(&install_plan[2], "b", {"b1", "core", "b1"}); + features_check(&install_plan[3], "a", {"a1", "core"}); } TEST_METHOD(basic_feature_test_2) { - using Pgh = std::unordered_map; - std::vector> status_paragraphs; PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = - FullPackageSpec{spec_map.get_package_spec( - {{{"Source", "a"}, {"Version", "1.3.8"}, {"Build-Depends", "b[beefeatureone]"}}, - {{"Feature", "featureone"}, - {"Description", "the first feature for a"}, - {"Build-Depends", "b[beefeaturetwo]"}} - - }), - {"featureone"}}; - auto spec_b = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, - {{"Feature", "beefeatureone"}, {"Description", "the first feature for b"}, {"Build-Depends", ""}}, - {{"Feature", "beefeaturetwo"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}}, - {{"Feature", "beefeaturethree"}, {"Description", "the third feature for b"}, {"Build-Depends", ""}}, - })}; + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[b1]", {{"a1", "b[b2]"}}), {"a1"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})}; auto install_plan = Dependencies::create_feature_install_plan(spec_map.map, @@ -338,37 +321,20 @@ namespace UnitTest1 StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(2), install_plan.size()); - features_check(&install_plan[0], "b", {"beefeatureone", "beefeaturetwo", "core"}); - features_check(&install_plan[1], "a", {"featureone", "core"}); + features_check(&install_plan[0], "b", {"b1", "b2", "core"}); + features_check(&install_plan[1], "a", {"a1", "core"}); } TEST_METHOD(basic_feature_test_3) { - using Pgh = std::unordered_map; - std::vector> status_paragraphs; - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, - {"Default-Features", ""}, - {"Version", "1.3"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", ""}, - {"Status", "install ok installed"}})); + status_paragraphs.push_back(make_status_pgh("a")); PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{ - spec_map.get_package_spec( - {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b"}}, - {{"Feature", "one"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}}), - {"core"}}; - auto spec_b = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, - })}; - auto spec_c = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "c"}, {"Version", "1.3"}, {"Build-Depends", "a[one]"}}, - }), - {"core"}}; + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b")}; + auto spec_c = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; auto install_plan = Dependencies::create_feature_install_plan(spec_map.map, @@ -378,43 +344,21 @@ namespace UnitTest1 Assert::AreEqual(size_t(4), install_plan.size()); remove_plan_check(&install_plan[0], "a"); features_check(&install_plan[1], "b", {"core"}); - features_check(&install_plan[2], "a", {"one", "core"}); + features_check(&install_plan[2], "a", {"a1", "core"}); features_check(&install_plan[3], "c", {"core"}); } TEST_METHOD(basic_feature_test_4) { - using Pgh = std::unordered_map; - std::vector> status_paragraphs; - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, - {"Default-Features", ""}, - {"Version", "1.3"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", ""}, - {"Status", "install ok installed"}})); - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, - {"Feature", "one"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", ""}, - {"Status", "install ok installed"}})); + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.push_back(make_status_feature_pgh("a", "a1", "")); PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{ - spec_map.get_package_spec( - {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b"}}, - {{"Feature", "one"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}}), - }; - auto spec_b = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, - })}; - auto spec_c = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "c"}, {"Version", "1.3"}, {"Build-Depends", "a[one]"}}, - }), - {"core"}}; + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}})}; + auto spec_b = FullPackageSpec{spec_map.emplace("b")}; + auto spec_c = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; auto install_plan = Dependencies::create_feature_install_plan(spec_map.map, @@ -427,24 +371,13 @@ namespace UnitTest1 TEST_METHOD(basic_feature_test_5) { - using Pgh = std::unordered_map; - std::vector> status_paragraphs; PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{ - spec_map.get_package_spec( - {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", ""}}, - {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", "b[1]"}}, - {{"Feature", "2"}, {"Description", "the second feature for a"}, {"Build-Depends", "b[2]"}}, - {{"Feature", "3"}, {"Description", "the third feature for a"}, {"Build-Depends", "a[2]"}}}), - {"3"}}; - auto spec_b = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, - {{"Feature", "1"}, {"Description", "the first feature for b"}, {"Build-Depends", ""}}, - {{"Feature", "2"}, {"Description", "the second feature for b"}, {"Build-Depends", ""}}, - })}; + auto spec_a = + FullPackageSpec{spec_map.emplace("a", "", {{"a1", "b[b1]"}, {"a2", "b[b2]"}, {"a3", "a[a2]"}}), {"a3"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}})}; auto install_plan = Dependencies::create_feature_install_plan(spec_map.map, @@ -452,34 +385,18 @@ namespace UnitTest1 StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(2), install_plan.size()); - features_check(&install_plan[0], "b", {"core", "2"}); - features_check(&install_plan[1], "a", {"core", "3", "2"}); + features_check(&install_plan[0], "b", {"core", "b2"}); + features_check(&install_plan[1], "a", {"core", "a3", "a2"}); } TEST_METHOD(basic_feature_test_6) { - using Pgh = std::unordered_map; - std::vector> status_paragraphs; - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "b"}, - {"Default-Features", ""}, - {"Version", "1.3"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", ""}, - {"Status", "install ok installed"}})); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + status_paragraphs.push_back(make_status_pgh("b")); - auto spec_a = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b[core]"}}, - }), - {"core"}}; - auto spec_b = FullPackageSpec{ - spec_map.get_package_spec({ - {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, - {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}, - }), - {"1"}}; + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[core]"), {"core"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}}), {"b1"}}; auto install_plan = Dependencies::create_feature_install_plan(spec_map.map, @@ -488,44 +405,21 @@ namespace UnitTest1 Assert::AreEqual(size_t(3), install_plan.size()); remove_plan_check(&install_plan[0], "b"); - features_check(&install_plan[1], "b", {"core", "1"}); + features_check(&install_plan[1], "b", {"core", "b1"}); features_check(&install_plan[2], "a", {"core"}); } TEST_METHOD(basic_feature_test_7) { - using Pgh = std::unordered_map; - std::vector> status_paragraphs; - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "x"}, - {"Default-Features", ""}, - {"Version", "1.3"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", "b"}, - {"Status", "install ok installed"}})); - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "b"}, - {"Default-Features", ""}, - {"Version", "1.3"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", ""}, - {"Status", "install ok installed"}})); + status_paragraphs.push_back(make_status_pgh("x", "b")); + status_paragraphs.push_back(make_status_pgh("b")); + PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", ""}}, - })}; - auto spec_x = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "x"}, {"Version", "1.3"}, {"Build-Depends", "a"}}, - }), - {"core"}}; - auto spec_b = FullPackageSpec{ - spec_map.get_package_spec({ - {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}, {"Default-Features", ""}}, - {{"Feature", "1"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}, - }), - {"1"}}; + auto spec_a = FullPackageSpec{spec_map.emplace("a")}; + auto spec_x = FullPackageSpec{spec_map.emplace("x", "a"), {"core"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}}), {"b1"}}; auto install_plan = Dependencies::create_feature_install_plan(spec_map.map, @@ -537,59 +431,28 @@ namespace UnitTest1 remove_plan_check(&install_plan[1], "b"); // TODO: order here may change but A < X, and B anywhere - features_check(&install_plan[2], "b", {"core", "1"}); + features_check(&install_plan[2], "b", {"core", "b1"}); features_check(&install_plan[3], "a", {"core"}); features_check(&install_plan[4], "x", {"core"}); } TEST_METHOD(basic_feature_test_8) { - using Pgh = std::unordered_map; - std::vector> status_paragraphs; - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, - {"Default-Features", ""}, - {"Version", "1.3"}, - {"Architecture", "x64-windows"}, - {"Multi-Arch", "same"}, - {"Depends", ""}, - {"Status", "install ok installed"}})); - status_paragraphs.push_back(std::make_unique(Pgh{{"Package", "a"}, - {"Default-Features", ""}, - {"Version", "1.3"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", ""}, - {"Status", "install ok installed"}})); + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.back()->package.spec = + PackageSpec::from_name_and_triplet("a", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); PackageSpecMap spec_map(Triplet::X64_WINDOWS); - - auto spec_a_64 = FullPackageSpec{ - spec_map.get_package_spec( - {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b"}}, - {{"Feature", "one"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}}), - {"core"}}; - auto spec_b_64 = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, - })}; - auto spec_c_64 = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "c"}, {"Version", "1.3"}, {"Build-Depends", "a[one]"}}, - }), - {"core"}}; + auto spec_a_64 = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; + auto spec_b_64 = FullPackageSpec{spec_map.emplace("b")}; + auto spec_c_64 = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; spec_map.triplet = Triplet::X86_WINDOWS; - auto spec_a_86 = FullPackageSpec{ - spec_map.get_package_spec( - {{{"Source", "a"}, {"Version", "1.3"}, {"Build-Depends", "b"}}, - {{"Feature", "one"}, {"Description", "the first feature for a"}, {"Build-Depends", ""}}}), - {"core"}}; - auto spec_b_86 = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "b"}, {"Version", "1.3"}, {"Build-Depends", ""}}, - })}; - auto spec_c_86 = FullPackageSpec{spec_map.get_package_spec({ - {{"Source", "c"}, {"Version", "1.3"}, {"Build-Depends", "a[one]"}}, - }), - {"core"}}; + auto spec_a_86 = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; + auto spec_b_86 = FullPackageSpec{spec_map.emplace("b")}; + auto spec_c_86 = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; auto install_plan = Dependencies::create_feature_install_plan( spec_map.map, @@ -613,10 +476,10 @@ namespace UnitTest1 remove_plan_check(&install_plan[0], "a", Triplet::X64_WINDOWS); remove_plan_check(&install_plan[1], "a"); features_check(&install_plan[2], "b", {"core"}, Triplet::X64_WINDOWS); - features_check(&install_plan[3], "a", {"one", "core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[3], "a", {"a1", "core"}, Triplet::X64_WINDOWS); features_check(&install_plan[4], "c", {"core"}, Triplet::X64_WINDOWS); features_check(&install_plan[5], "b", {"core"}); - features_check(&install_plan[6], "a", {"one", "core"}); + features_check(&install_plan[6], "a", {"a1", "core"}); features_check(&install_plan[7], "c", {"core"}); } }; -- cgit v1.2.3 From 92dd1b77ed043da376c86874aacc1233270fedae Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 22 Aug 2017 15:14:15 -0700 Subject: [vcpkg] Add Util::ResourceBase, use MoveOnlyBase --- toolsrc/include/vcpkg_Dependencies.h | 20 ++++---------------- toolsrc/include/vcpkg_Util.h | 10 ++++++++++ toolsrc/src/test_install_plan.cpp | 6 +++--- toolsrc/src/vcpkg_Dependencies.cpp | 11 ++--------- 4 files changed, 19 insertions(+), 28 deletions(-) diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index bfb452596..93719efe9 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -70,16 +70,12 @@ namespace vcpkg::Dependencies REMOVE }; - struct RemovePlanAction + struct RemovePlanAction : Util::MoveOnlyBase { static bool compare_by_name(const RemovePlanAction* left, const RemovePlanAction* right); RemovePlanAction(); RemovePlanAction(const PackageSpec& spec, const RemovePlanType& plan_type, const RequestType& request_type); - RemovePlanAction(const RemovePlanAction&) = delete; - RemovePlanAction(RemovePlanAction&&) = default; - RemovePlanAction& operator=(const RemovePlanAction&) = delete; - RemovePlanAction& operator=(RemovePlanAction&&) = default; PackageSpec spec; RemovePlanType plan_type; @@ -102,16 +98,12 @@ namespace vcpkg::Dependencies ALREADY_BUILT }; - struct ExportPlanAction + struct ExportPlanAction : Util::MoveOnlyBase { static bool compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right); ExportPlanAction(); ExportPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type); - ExportPlanAction(const ExportPlanAction&) = delete; - ExportPlanAction(ExportPlanAction&&) = default; - ExportPlanAction& operator=(const ExportPlanAction&) = delete; - ExportPlanAction& operator=(ExportPlanAction&&) = default; PackageSpec spec; AnyParagraph any_paragraph; @@ -121,23 +113,19 @@ namespace vcpkg::Dependencies __interface PortFileProvider { virtual const SourceControlFile& get_control_file(const std::string& spec) const; }; - struct MapPortFile : PortFileProvider + struct MapPortFile : Util::ResourceBase, PortFileProvider { const std::unordered_map& ports; explicit MapPortFile(const std::unordered_map& map); const SourceControlFile& get_control_file(const std::string& spec) const override; }; - struct PathsPortFile : PortFileProvider + struct PathsPortFile : Util::ResourceBase, PortFileProvider { const VcpkgPaths& ports; mutable std::unordered_map cache; explicit PathsPortFile(const VcpkgPaths& paths); const SourceControlFile& get_control_file(const std::string& spec) const override; - - private: - PathsPortFile(const PathsPortFile&) = delete; - PathsPortFile& operator=(const PathsPortFile&) = delete; }; std::vector create_install_plan(const PortFileProvider& port_file_provider, diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg_Util.h index da2f8eb69..4f45cd2c7 100644 --- a/toolsrc/include/vcpkg_Util.h +++ b/toolsrc/include/vcpkg_Util.h @@ -72,4 +72,14 @@ namespace vcpkg::Util MoveOnlyBase& operator=(const MoveOnlyBase&) = delete; MoveOnlyBase& operator=(MoveOnlyBase&&) = default; }; + + struct ResourceBase + { + ResourceBase() = default; + ResourceBase(const ResourceBase&) = delete; + ResourceBase(ResourceBase&&) = delete; + + ResourceBase& operator=(const ResourceBase&) = delete; + ResourceBase& operator=(ResourceBase&&) = delete; + }; } \ No newline at end of file diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp index 836ff09ae..6c9311264 100644 --- a/toolsrc/src/test_install_plan.cpp +++ b/toolsrc/src/test_install_plan.cpp @@ -151,7 +151,7 @@ namespace UnitTest1 auto spec_b = spec_map.emplace("b", "c"); auto spec_c = spec_map.emplace("c"); - auto map_port = Dependencies::MapPortFile(spec_map.map); + Dependencies::MapPortFile map_port(spec_map.map); auto install_plan = Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); @@ -175,7 +175,7 @@ namespace UnitTest1 auto spec_g = spec_map.emplace("g"); auto spec_h = spec_map.emplace("h"); - auto map_port = Dependencies::MapPortFile(spec_map.map); + Dependencies::MapPortFile map_port(spec_map.map); auto install_plan = Dependencies::create_install_plan( map_port, {spec_a, spec_b, spec_c}, StatusParagraphs(std::move(status_paragraphs))); @@ -268,7 +268,7 @@ namespace UnitTest1 auto spec_j = spec_map.emplace("j", "k"); auto spec_k = spec_map.emplace("k"); - auto map_port = Dependencies::MapPortFile(spec_map.map); + Dependencies::MapPortFile map_port(spec_map.map); auto install_plan = Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 512e65e28..188b0f444 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -19,7 +19,7 @@ namespace vcpkg::Dependencies bool plus = false; }; - struct Cluster + struct Cluster : Util::MoveOnlyBase { std::vector status_paragraphs; Optional source_control_file; @@ -30,11 +30,6 @@ namespace vcpkg::Dependencies bool will_remove = false; bool transient_uninstalled = true; RequestType request_type = RequestType::AUTO_SELECTED; - Cluster() = default; - - private: - Cluster(const Cluster&) = delete; - Cluster& operator=(const Cluster&) = delete; }; struct ClusterPtr @@ -64,13 +59,12 @@ namespace vcpkg::Dependencies Graphs::Graph install_graph; }; - struct ClusterGraph + struct ClusterGraph : Util::MoveOnlyBase { explicit ClusterGraph(std::unordered_map&& ports) : m_ports(std::move(ports)) { } - ClusterGraph(ClusterGraph&&) = default; Cluster& get(const PackageSpec& spec) { @@ -108,7 +102,6 @@ namespace vcpkg::Dependencies out_cluster.source_control_file = &scf; } - ClusterGraph(const ClusterGraph&) = delete; std::unordered_map m_graph; std::unordered_map m_ports; }; -- cgit v1.2.3 From 687ea82f89504520e2a4c60feeb5c0bf6260a4de Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 22 Aug 2017 15:59:27 -0700 Subject: [vcpkg] Improve formatting of search and list. Fix gl2ps version. --- ports/gl2ps/CONTROL | 4 ++-- toolsrc/include/vcpkglib.h | 2 +- toolsrc/src/commands_list.cpp | 10 +++++----- toolsrc/src/commands_search.cpp | 10 +++++----- toolsrc/src/vcpkglib.cpp | 5 +++-- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ports/gl2ps/CONTROL b/ports/gl2ps/CONTROL index 59c9bd770..16c52f64a 100644 --- a/ports/gl2ps/CONTROL +++ b/ports/gl2ps/CONTROL @@ -1,4 +1,4 @@ Source: gl2ps -Version: OpenGL to PostScript Printing Library -Description: +Version: 1.4.0 +Description: OpenGL to PostScript Printing Library Build-Depends: freeglut, zlib, libpng diff --git a/toolsrc/include/vcpkglib.h b/toolsrc/include/vcpkglib.h index bd2400b77..63b358d74 100644 --- a/toolsrc/include/vcpkglib.h +++ b/toolsrc/include/vcpkglib.h @@ -36,5 +36,5 @@ namespace vcpkg const fs::path& cmake_script, const std::vector& pass_variables); - std::string shorten_description(const std::string& desc); + std::string shorten_text(const std::string& desc, size_t length); } // namespace vcpkg diff --git a/toolsrc/src/commands_list.cpp b/toolsrc/src/commands_list.cpp index 9bc9bcc08..3cfa7e184 100644 --- a/toolsrc/src/commands_list.cpp +++ b/toolsrc/src/commands_list.cpp @@ -12,14 +12,14 @@ namespace vcpkg::Commands::List { if (FullDesc) { - System::println("%-27s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description); + System::println("%-30s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description); } else { - System::println("%-27s %-16s %s", - pgh.package.displayname(), - pgh.package.version, - vcpkg::shorten_description(pgh.package.description)); + System::println("%-30s %-16s %s", + vcpkg::shorten_text(pgh.package.displayname(), 30), + vcpkg::shorten_text(pgh.package.version, 16), + vcpkg::shorten_text(pgh.package.description, 71)); } } diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index f12c25fb6..b1bd7ea6f 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -57,9 +57,9 @@ namespace vcpkg::Commands::Search else { System::println("%-20s %-16s %s", - source_paragraph.name, - source_paragraph.version, - vcpkg::shorten_description(source_paragraph.description)); + vcpkg::shorten_text(source_paragraph.name, 20), + vcpkg::shorten_text(source_paragraph.version, 16), + vcpkg::shorten_text(source_paragraph.description, 81)); } } @@ -72,8 +72,8 @@ namespace vcpkg::Commands::Search else { System::println("%-37s %s", - name + "[" + feature_paragraph.name + "]", - vcpkg::shorten_description(feature_paragraph.description)); + vcpkg::shorten_text(name + "[" + feature_paragraph.name + "]", 37), + vcpkg::shorten_text(feature_paragraph.description, 81)); } } diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp index 428ae090d..6e90695de 100644 --- a/toolsrc/src/vcpkglib.cpp +++ b/toolsrc/src/vcpkglib.cpp @@ -240,9 +240,10 @@ namespace vcpkg LR"("%s" %s -P "%s")", cmake_exe.native(), cmd_cmake_pass_variables, cmake_script.generic_wstring()); } - std::string shorten_description(const std::string& desc) + std::string shorten_text(const std::string& desc, size_t length) { + Checks::check_exit(VCPKG_LINE_INFO, length >= 3); auto simple_desc = std::regex_replace(desc, std::regex("\\s+"), " "); - return simple_desc.size() <= 52 ? simple_desc : simple_desc.substr(0, 49) + "..."; + return simple_desc.size() <= length ? simple_desc : simple_desc.substr(0, length - 3) + "..."; } } -- cgit v1.2.3 From 57d078e8d1c5f5284d88e79600aa61fa06530ac4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 22 Aug 2017 18:25:35 -0700 Subject: [vcpkg edit] Add option --buildtrees --- toolsrc/src/commands_edit.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp index 12ddaad77..72005a461 100644 --- a/toolsrc/src/commands_edit.cpp +++ b/toolsrc/src/commands_edit.cpp @@ -8,11 +8,14 @@ namespace vcpkg::Commands::Edit { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { + static const std::string OPTION_BUILDTREES = "--buildtrees"; + auto& fs = paths.get_filesystem(); static const std::string example = Commands::Help::create_example_string("edit zlib"); args.check_exact_arg_count(1, example); - args.check_and_get_optional_command_arguments({}); + const std::unordered_set options = + args.check_and_get_optional_command_arguments({OPTION_BUILDTREES}); const std::string port_name = args.command_arguments.at(0); const fs::path portpath = paths.ports / port_name; @@ -84,6 +87,14 @@ namespace vcpkg::Commands::Edit VCPKG_LINE_INFO, "Visual Studio Code was not found and the environment variable EDITOR is not set"); } + if (options.find(OPTION_BUILDTREES) != options.cend()) + { + const auto buildtrees_current_dir = paths.buildtrees / port_name; + + std::wstring cmdLine = Strings::wformat(LR"("%s" "%s" -n)", env_EDITOR, buildtrees_current_dir.native()); + Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmdLine)); + } + std::wstring cmdLine = Strings::wformat( LR"("%s" "%s" "%s" -n)", env_EDITOR, portpath.native(), (portpath / "portfile.cmake").native()); Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmdLine)); -- cgit v1.2.3 From 3e6a19754bd56aa902583fde451110d3274ff5cd Mon Sep 17 00:00:00 2001 From: glachancecmaisonneuve Date: Tue, 22 Aug 2017 23:15:19 -0400 Subject: no more renaming control version number was wrong (thank you for spotting that) --- ports/unrar/CONTROL | 2 +- ports/unrar/portfile.cmake | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/ports/unrar/CONTROL b/ports/unrar/CONTROL index 214fd2dbe..ce6d4dab8 100644 --- a/ports/unrar/CONTROL +++ b/ports/unrar/CONTROL @@ -1,3 +1,3 @@ Source: unrar -Version: 5.5.6 +Version: 5.5.8 Description: rarlab's unrar libary diff --git a/ports/unrar/portfile.cmake b/ports/unrar/portfile.cmake index 5bb065c91..294fe9ac2 100644 --- a/ports/unrar/portfile.cmake +++ b/ports/unrar/portfile.cmake @@ -32,19 +32,7 @@ file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/unrar.dll DESTINAT file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/unrar.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/unrar.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/unrar.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -#copy pdbs now, while filenames still match vcpkg_copy_pdbs() -#RarLabs has historically distributed it's x64 architecture unrar library as UnRAR64.dll -if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/unrar.dll ${CURRENT_PACKAGES_DIR}/bin/UnRAR64.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/unrar.lib ${CURRENT_PACKAGES_DIR}/lib/UnRAR64.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/unrar.dll ${CURRENT_PACKAGES_DIR}/debug/bin/UnRAR64.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/unrar.lib ${CURRENT_PACKAGES_DIR}/debug/lib/UnRAR64.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/unrar.pdb ${CURRENT_PACKAGES_DIR}/bin/UnRAR64.pdb) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/unrar.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/UnRAR64.pdb) -endif() - #COPYRIGHT file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/unrar RENAME copyright) -- cgit v1.2.3 From 01cbf421ab151dfc4f0c1c18c9a2a1a88b627240 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 23 Aug 2017 16:07:57 +0200 Subject: [expat] update to 2.2.4 --- ports/expat/CONTROL | 2 +- ports/expat/portfile.cmake | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ports/expat/CONTROL b/ports/expat/CONTROL index 5987991c8..cee5c9edc 100644 --- a/ports/expat/CONTROL +++ b/ports/expat/CONTROL @@ -1,3 +1,3 @@ Source: expat -Version: 2.1.1-1 +Version: 2.2.4 Description: XML parser library written in C diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index a347ac2cb..3a7430db3 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -1,11 +1,10 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/expat-2.1.1) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://downloads.sourceforge.net/project/expat/expat/2.1.1/expat-2.1.1.tar.bz2" - FILENAME "expat-2.1.1.tar.bz2" - SHA512 088e2ef3434f2affd4fc79fe46f0e9826b9b4c3931ddc780cd18892f1cd1e11365169c6807f45916a56bb6abcc627dcd17a23f970be0bf464f048f5be2713628 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libexpat/libexpat + REF R_2_2_4 + SHA512 64f9deb2f75be70450a60a408ab867d1df800022e29000a31a801d85421178b400ebbf817864d1592ce998ada1012fa25fd896e5f25c6b314851ae62d94b45dc + HEAD_REF master) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(EXPAT_LINKAGE ON) @@ -14,7 +13,8 @@ else() endif() vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH}/expat + PREFER_NINJA OPTIONS -DBUILD_examples=OFF -DBUILD_tests=OFF @@ -25,7 +25,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/expat RENAME copyright) +file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/expat RENAME copyright) vcpkg_copy_pdbs() -- cgit v1.2.3 From b8f51a1cdb3a8f782224dfe45ae31bebd426c5cb Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 12 Aug 2017 13:47:52 +0200 Subject: [libraw] fix import macro, correct dependencies By default, libraw does not attempt to link to libjpeg, but does pick up jasper if present --- ports/libraw/CONTROL | 4 ++-- ports/libraw/portfile.cmake | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ports/libraw/CONTROL b/ports/libraw/CONTROL index 9d355533b..9d23b7740 100644 --- a/ports/libraw/CONTROL +++ b/ports/libraw/CONTROL @@ -1,4 +1,4 @@ Source: libraw -Version: 0.18.2-2 -Build-Depends: lcms, libjpeg-turbo +Version: 0.18.2-3 +Build-Depends: lcms, jasper Description: raw image decoder library diff --git a/ports/libraw/portfile.cmake b/ports/libraw/portfile.cmake index 0b13213ad..797ca5aa0 100644 --- a/ports/libraw/portfile.cmake +++ b/ports/libraw/portfile.cmake @@ -23,13 +23,21 @@ file(COPY ${LIBRAW_CMAKE_SOURCE_PATH}/cmake DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DINSTALL_CMAKE_MODULE_PATH=${CURRENT_PACKAGES_DIR}/share/libraw ) -vcpkg_build_cmake() vcpkg_install_cmake() +file(READ ${CURRENT_PACKAGES_DIR}/include/libraw/libraw_types.h LIBRAW_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "#ifdef LIBRAW_NODLL" "#if 1" LIBRAW_H "${LIBRAW_H}") +else() + string(REPLACE "#ifdef LIBRAW_NODLL" "#if 0" LIBRAW_H "${LIBRAW_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/libraw/libraw_types.h "${LIBRAW_H}") + # Rename thread-safe version to be "raw.lib". This is unfortunately needed # because otherwise libraries that build on top of libraw have to choose. file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/raw.lib ${CURRENT_PACKAGES_DIR}/debug/lib/raw.lib) -- cgit v1.2.3 From 79365783d04166cd1b463dd4142c992b496fbbd3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 23 Aug 2017 15:14:21 -0700 Subject: [boost] Fix uwp build by disabling stacktrace and fiber --- ports/boost/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 9f0390468..b7917576d 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -109,7 +109,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") # --without-date_time # --without-exception # --without-serialization - # --without-fiber # --without-context # --without-graph_parallel # --without-signals @@ -130,6 +129,8 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") --without-program_options # libs\program_options\src\parsers.cpp(194): error C2065: 'environ': undeclared identifier --without-test + --without-fiber + --without-stacktrace --without-filesystem # libs\filesystem\src\operations.cpp(178): error C2039: 'GetEnvironmentVariableW': is not a member of '`global namespace'' --without-thread --without-iostreams -- cgit v1.2.3 From 14a99b073059d4fcae149a9085254fcb2e78e443 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 23 Aug 2017 15:47:42 -0700 Subject: [vcpkg] Deduplicate code from feature packages --- toolsrc/include/vcpkg_Build.h | 1 + toolsrc/include/vcpkg_Commands.h | 12 +++- toolsrc/include/vcpkg_Dependencies.h | 2 +- toolsrc/include/vcpkg_Util.h | 19 ++++++- toolsrc/src/commands_export.cpp | 15 +++-- toolsrc/src/commands_install.cpp | 107 +++++++++++++++++------------------ toolsrc/src/vcpkg_Dependencies.cpp | 30 ++++------ 7 files changed, 99 insertions(+), 87 deletions(-) diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h index c4f3e6746..32909f4e1 100644 --- a/toolsrc/include/vcpkg_Build.h +++ b/toolsrc/include/vcpkg_Build.h @@ -52,6 +52,7 @@ namespace vcpkg::Build SUCCEEDED, BUILD_FAILED, POST_BUILD_CHECKS_FAILED, + FILE_CONFLICTS, CASCADED_DUE_TO_MISSING_DEPENDENCIES }; diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index d5f316d69..756a12f01 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -55,12 +55,18 @@ namespace vcpkg::Commands const Build::BuildPackageOptions& install_plan_options, StatusParagraphs& status_db); + enum class InstallResult + { + FILE_CONFLICTS, + SUCCESS, + }; + void install_files_and_write_listfile(Files::Filesystem& fs, const fs::path& source_dir, const InstallDir& dirs); - void install_package(const VcpkgPaths& paths, - const BinaryControlFile& binary_paragraph, - StatusParagraphs* status_db); + InstallResult install_package(const VcpkgPaths& paths, + const BinaryControlFile& binary_paragraph, + StatusParagraphs* status_db); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index 93719efe9..c1f6ad9a5 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -23,7 +23,7 @@ namespace vcpkg::Dependencies std::vector dependencies(const Triplet& triplet) const; Optional status_paragraph; - Optional binary_paragraph; + Optional binary_control_file; Optional source_paragraph; Optional source_control_file; }; diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg_Util.h index 4f45cd2c7..cfbd23020 100644 --- a/toolsrc/include/vcpkg_Util.h +++ b/toolsrc/include/vcpkg_Util.h @@ -12,9 +12,7 @@ namespace vcpkg::Util template> std::vector fmap(Cont&& xs, Func&& f) { - using O = decltype(f(*begin(xs))); - - std::vector ret; + std::vector ret; ret.reserve(xs.size()); for (auto&& x : xs) @@ -23,6 +21,21 @@ namespace vcpkg::Util return ret; } + template + using FmapFlattenOut = std::decay_t()(*begin(std::declval()))))>; + + template> + std::vector fmap_flatten(Cont&& xs, Func&& f) + { + std::vector ret; + + for (auto&& x : xs) + for (auto&& y : f(x)) + ret.push_back(std::move(y)); + + return ret; + } + template void unstable_keep_if(Container& cont, Pred pred) { diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index 4adfbc0f6..cbcb219b6 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -11,10 +11,10 @@ namespace vcpkg::Commands::Export { - using Install::InstallDir; using Dependencies::ExportPlanAction; - using Dependencies::RequestType; using Dependencies::ExportPlanType; + using Dependencies::RequestType; + using Install::InstallDir; static std::string create_nuspec_file_contents(const std::string& raw_exported_dir, const std::string& targets_redirect_path, @@ -235,10 +235,15 @@ namespace vcpkg::Commands::Export const auto options = args.check_and_get_optional_command_arguments( { - OPTION_DRY_RUN, OPTION_RAW, OPTION_NUGET, OPTION_ZIP, OPTION_7ZIP, + OPTION_DRY_RUN, + OPTION_RAW, + OPTION_NUGET, + OPTION_ZIP, + OPTION_7ZIP, }, { - OPTION_NUGET_ID, OPTION_NUGET_VERSION, + OPTION_NUGET_ID, + OPTION_NUGET_VERSION, }); const bool dryRun = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); const bool raw = options.switches.find(OPTION_RAW) != options.switches.cend(); @@ -323,7 +328,7 @@ namespace vcpkg::Commands::Export System::println("Exporting package %s... ", display_name); const BinaryParagraph& binary_paragraph = - action.any_paragraph.binary_paragraph.value_or_exit(VCPKG_LINE_INFO); + action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; const InstallDir dirs = InstallDir::from_destination_root( raw_exported_dir_path / "installed", action.spec.triplet().to_string(), diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index 9e37dc057..43d41bdf8 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -172,7 +172,7 @@ namespace vcpkg::Commands::Install return SortedVector(std::move(installed_files)); } - void install_package(const VcpkgPaths& paths, const BinaryControlFile& bcf, StatusParagraphs* status_db) + InstallResult install_package(const VcpkgPaths& paths, const BinaryControlFile& bcf, StatusParagraphs* status_db) { const fs::path package_dir = paths.package_dir(bcf.core_paragraph.spec); const Triplet& triplet = bcf.core_paragraph.spec.triplet(); @@ -199,7 +199,7 @@ namespace vcpkg::Commands::Install System::print("\n "); System::println(Strings::join("\n ", intersection)); System::println(""); - Checks::exit_fail(VCPKG_LINE_INFO); + return InstallResult::FILE_CONFLICTS; } StatusParagraph source_paragraph; @@ -239,6 +239,8 @@ namespace vcpkg::Commands::Install write_update(paths, feature_paragraph); status_db->insert(std::make_unique(feature_paragraph)); } + + return InstallResult::SUCCESS; } using Build::BuildResult; @@ -250,6 +252,7 @@ namespace vcpkg::Commands::Install { const InstallPlanType& plan_type = action.plan_type; const std::string display_name = action.spec.to_string(); + const std::string display_name_with_features = g_feature_packages ? action.displayname() : display_name; const bool is_user_requested = action.request_type == RequestType::USER_REQUESTED; const bool use_head_version = to_bool(build_package_options.use_head_version); @@ -257,76 +260,65 @@ namespace vcpkg::Commands::Install if (plan_type == InstallPlanType::ALREADY_INSTALLED) { if (use_head_version && is_user_requested) - { System::println( System::Color::warning, "Package %s is already installed -- not building from HEAD", display_name); - } else - { System::println(System::Color::success, "Package %s is already installed", display_name); - } return BuildResult::SUCCEEDED; } - if (plan_type == InstallPlanType::BUILD_AND_INSTALL && !g_feature_packages) + if (plan_type == InstallPlanType::BUILD_AND_INSTALL) { if (use_head_version) - System::println("Building package %s from HEAD... ", display_name); + System::println("Building package %s from HEAD... ", display_name_with_features); else - System::println("Building package %s... ", display_name); - - const Build::BuildPackageConfig build_config{ - action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO), - action.spec.triplet(), - paths.port_dir(action.spec), - build_package_options}; - const auto result = Build::build_package(paths, build_config, status_db); - if (result.code != Build::BuildResult::SUCCEEDED) - { - System::println(System::Color::error, Build::create_error_message(result.code, action.spec)); - return result.code; - } - System::println("Building package %s... done", display_name); + System::println("Building package %s... ", display_name_with_features); - const BinaryControlFile bpgh = - Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); - System::println("Installing package %s... ", display_name); - install_package(paths, bpgh, &status_db); - System::println(System::Color::success, "Installing package %s... done", display_name); - return BuildResult::SUCCEEDED; - } + const auto result = [&]() -> Build::ExtendedBuildResult { + if (g_feature_packages) + { + const Build::BuildPackageConfig build_config{ + *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), + action.spec.triplet(), + paths.port_dir(action.spec), + build_package_options, + action.feature_list}; + return Build::build_package(paths, build_config, status_db); + } + else + { + const Build::BuildPackageConfig build_config{ + action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO), + action.spec.triplet(), + paths.port_dir(action.spec), + build_package_options}; + return Build::build_package(paths, build_config, status_db); + } + }(); - if (plan_type == InstallPlanType::BUILD_AND_INSTALL && g_feature_packages) - { - const std::string display_name_feature = action.displayname(); - if (use_head_version) - System::println("Building package %s from HEAD... ", display_name_feature); - else - System::println("Building package %s... ", display_name_feature); - - const Build::BuildPackageConfig build_config{ - *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), - action.spec.triplet(), - paths.port_dir(action.spec), - build_package_options, - action.feature_list}; - const auto result = Build::build_package(paths, build_config, status_db); if (result.code != Build::BuildResult::SUCCEEDED) { System::println(System::Color::error, Build::create_error_message(result.code, action.spec)); return result.code; } - System::println("Building package %s... done", display_name_feature); + + System::println("Building package %s... done", display_name_with_features); const BinaryControlFile bcf = Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); - System::println("Installing package %s... ", display_name_feature); - install_package(paths, bcf, &status_db); - System::println(System::Color::success, "Installing package %s... done", display_name_feature); - return BuildResult::SUCCEEDED; + System::println("Installing package %s... ", display_name_with_features); + auto install_result = install_package(paths, bcf, &status_db); + switch (install_result) + { + case InstallResult::SUCCESS: + System::println(System::Color::success, "Installing package %s... done", display_name); + return BuildResult::SUCCEEDED; + case InstallResult::FILE_CONFLICTS: return BuildResult::FILE_CONFLICTS; + default: Checks::unreachable(VCPKG_LINE_INFO); + } } - if (plan_type == InstallPlanType::INSTALL && !g_feature_packages) + if (plan_type == InstallPlanType::INSTALL) { if (use_head_version && is_user_requested) { @@ -334,11 +326,16 @@ namespace vcpkg::Commands::Install System::Color::warning, "Package %s is already built -- not building from HEAD", display_name); } System::println("Installing package %s... ", display_name); - install_package(paths, - BinaryControlFile{action.any_paragraph.binary_paragraph.value_or_exit(VCPKG_LINE_INFO)}, - &status_db); - System::println(System::Color::success, "Installing package %s... done", display_name); - return BuildResult::SUCCEEDED; + auto install_result = install_package( + paths, action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO), &status_db); + switch (install_result) + { + case InstallResult::SUCCESS: + System::println(System::Color::success, "Installing package %s... done", display_name); + return BuildResult::SUCCEEDED; + case InstallResult::FILE_CONFLICTS: return BuildResult::FILE_CONFLICTS; + default: Checks::unreachable(VCPKG_LINE_INFO); + } } Checks::unreachable(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 188b0f444..4525fa02a 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -119,9 +119,11 @@ namespace vcpkg::Dependencies return to_package_specs(p->package.depends); } - if (auto p = this->binary_paragraph.get()) + if (auto p = this->binary_control_file.get()) { - return to_package_specs(p->depends); + auto deps = Util::fmap_flatten(p->features, [](const BinaryParagraph& pgh) { return pgh.depends; }); + deps.insert(deps.end(), p->core_paragraph.depends.begin(), p->core_paragraph.depends.end()); + return to_package_specs(deps); } if (auto p = this->source_paragraph.get()) @@ -164,7 +166,7 @@ namespace vcpkg::Dependencies InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type) - : spec(spec), request_type(request_type), any_paragraph(any_paragraph) + : spec(spec), request_type(request_type), plan_type(InstallPlanType::UNKNOWN), any_paragraph(any_paragraph) { if (auto p = any_paragraph.status_paragraph.get()) { @@ -172,7 +174,7 @@ namespace vcpkg::Dependencies return; } - if (auto p = any_paragraph.binary_paragraph.get()) + if (auto p = any_paragraph.binary_control_file.get()) { this->plan_type = InstallPlanType::INSTALL; return; @@ -183,8 +185,6 @@ namespace vcpkg::Dependencies this->plan_type = InstallPlanType::BUILD_AND_INSTALL; return; } - - this->plan_type = InstallPlanType::UNKNOWN; } std::string InstallPlanAction::displayname() const @@ -225,34 +225,24 @@ namespace vcpkg::Dependencies return left->spec.name() < right->spec.name(); } - ExportPlanAction::ExportPlanAction() - : spec(), any_paragraph(), plan_type(ExportPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) - { - } + ExportPlanAction::ExportPlanAction() : plan_type(ExportPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} ExportPlanAction::ExportPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type) - : ExportPlanAction() + : spec(spec), any_paragraph(any_paragraph), plan_type(ExportPlanType::UNKNOWN), request_type(request_type) { - this->spec = spec; - this->request_type = request_type; - - if (auto p = any_paragraph.binary_paragraph.get()) + if (auto p = any_paragraph.binary_control_file.get()) { this->plan_type = ExportPlanType::ALREADY_BUILT; - this->any_paragraph.binary_paragraph = *p; return; } if (auto p = any_paragraph.source_paragraph.get()) { this->plan_type = ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT; - this->any_paragraph.source_paragraph = *p; return; } - - this->plan_type = ExportPlanType::UNKNOWN; } bool RemovePlanAction::compare_by_name(const RemovePlanAction* left, const RemovePlanAction* right) @@ -428,7 +418,7 @@ namespace vcpkg::Dependencies Expected maybe_bpgh = Paragraphs::try_load_cached_control_package(paths, spec); if (auto bcf = maybe_bpgh.get()) - return ExportPlanAction{spec, {nullopt, bcf->core_paragraph, nullopt}, request_type}; + return ExportPlanAction{spec, AnyParagraph{nullopt, std::move(*bcf), nullopt}, request_type}; auto maybe_scf = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); if (auto scf = maybe_scf.get()) -- cgit v1.2.3 From 30d2cb9debccf0bcaa1d61cedefae400fdf07951 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 23 Aug 2017 15:58:05 -0700 Subject: [vcpkg] Install should not list already installed packages as "to be built" --- toolsrc/src/commands_install.cpp | 53 +++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index 43d41bdf8..bd14bf7e3 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -347,6 +347,7 @@ namespace vcpkg::Commands::Install std::vector rebuilt_plans; std::vector only_install_plans; std::vector new_plans; + std::vector already_installed_plans; const bool has_non_user_requested_packages = Util::find_if(action_plan, [](const AnyAction& package) -> bool { if (auto iplan = package.install_plan.get()) @@ -369,10 +370,16 @@ namespace vcpkg::Commands::Install } else { - if (install_action->plan_type == InstallPlanType::INSTALL) - only_install_plans.emplace_back(install_action); - else - new_plans.emplace_back(install_action); + switch (install_action->plan_type) + { + case InstallPlanType::INSTALL: only_install_plans.emplace_back(install_action); break; + case InstallPlanType::ALREADY_INSTALLED: + if (install_action->request_type == RequestType::USER_REQUESTED) + already_installed_plans.emplace_back(install_action); + break; + case InstallPlanType::BUILD_AND_INSTALL: new_plans.emplace_back(install_action); break; + default: Checks::unreachable(VCPKG_LINE_INFO); + } } } else if (auto remove_action = action.remove_plan.get()) @@ -385,23 +392,41 @@ namespace vcpkg::Commands::Install std::sort(rebuilt_plans.begin(), rebuilt_plans.end(), &InstallPlanAction::compare_by_name); std::sort(only_install_plans.begin(), only_install_plans.end(), &InstallPlanAction::compare_by_name); std::sort(new_plans.begin(), new_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(already_installed_plans.begin(), already_installed_plans.end(), &InstallPlanAction::compare_by_name); - const std::string rebuilt_string = Strings::join("\n", rebuilt_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - if (rebuilt_plans.size() > 0) System::println("The following packages will be rebuilt:\n%s", rebuilt_string); + if (already_installed_plans.size() > 0) + { + const std::string already_string = + Strings::join("\n", already_installed_plans, [](const InstallPlanAction* p) { + return to_output_string(p->request_type, p->displayname()); + }); + System::println("The following packages are already installed:\n%s", already_string); + } + + if (rebuilt_plans.size() > 0) + { + const std::string rebuilt_string = Strings::join("\n", rebuilt_plans, [](const InstallPlanAction* p) { + return to_output_string(p->request_type, p->displayname()); + }); + System::println("The following packages will be rebuilt:\n%s", rebuilt_string); + } - const std::string new_string = Strings::join("\n", new_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); if (new_plans.size() > 0) + { + const std::string new_string = Strings::join("\n", new_plans, [](const InstallPlanAction* p) { + return to_output_string(p->request_type, p->displayname()); + }); System::println("The following packages will be built and installed:\n%s", new_string); + } - const std::string only_install_string = Strings::join("\n", only_install_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); if (only_install_plans.size() > 0) + { + const std::string only_install_string = + Strings::join("\n", only_install_plans, [](const InstallPlanAction* p) { + return to_output_string(p->request_type, p->displayname()); + }); System::println("The following packages will be directly installed:\n%s", only_install_string); + } if (has_non_user_requested_packages) System::println("Additional packages (*) will be installed to complete this operation."); -- cgit v1.2.3 From 3c34cca36adfce1d3388b30e643294be58b3ec8f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 23 Aug 2017 16:16:31 -0700 Subject: [vcpkg] Fix typo --- toolsrc/src/commands_remove.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index e480f02dd..db5357514 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -151,7 +151,7 @@ namespace vcpkg::Commands::Remove if (specs.empty()) { - System::println(System::Color::success, "There are no oudated packages."); + System::println(System::Color::success, "There are no outdated packages."); Checks::exit_success(VCPKG_LINE_INFO); } } -- cgit v1.2.3 From 1081778b849da6c6412379b50ca66d049228c1e7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 23 Aug 2017 22:15:02 -0700 Subject: [openssl] Improve Windows SDK support (contract version detection) --- ports/openssl/fix-uwp-pathlib.patch | 13 ------- ports/openssl/make-openssl.bat | 9 ++--- ports/openssl/portfile-uwp.cmake | 67 ++++++++++++------------------------- 3 files changed, 23 insertions(+), 66 deletions(-) delete mode 100644 ports/openssl/fix-uwp-pathlib.patch diff --git a/ports/openssl/fix-uwp-pathlib.patch b/ports/openssl/fix-uwp-pathlib.patch deleted file mode 100644 index 17a1a4e10..000000000 --- a/ports/openssl/fix-uwp-pathlib.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git "a/ms/setVSvars.bat" "b/ms/setVSvars.bat" -index e6ebc0a7..cde9afb2 100644 ---- "a/ms/setVSvars.bat" -+++ "b/ms/setVSvars.bat" -@@ -179,7 +179,7 @@ exit /b - call:setVar _VS14VC VisualStudio14VC - call:setVar _WKITS10 WindowsKits10.0 - set PATH=%_VS14VCBin%;%PATH% -- set "LIBPATH=%_WKITS10%UnionMetadata\Facade;%_VS14VC%vcpackages;%_WKITS10%references\windows.foundation.foundationcontract\1.0.0.0\;%_WKITS10%references\windows.foundation.universalapicontract\1.0.0.0\" -+ set "LIBPATH=%_WKITS10%UnionMetadata\Facade;%_VS14VC%vcpackages;%_WKITS10%references\windows.foundation.foundationcontract\2.0.0.0\;%_WKITS10%references\windows.foundation.universalapicontract\3.0.0.0\" - goto :eof - - :end diff --git a/ports/openssl/make-openssl.bat b/ports/openssl/make-openssl.bat index 6f0afdf74..4f6488e8d 100644 --- a/ports/openssl/make-openssl.bat +++ b/ports/openssl/make-openssl.bat @@ -2,13 +2,8 @@ set build=%1 perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL -FS -FIWindows.h -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\3.0.0.0\ -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\2.0.0.0\ -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\1.0.0.0\ -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\4.0.0.0\ -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\3.0.0.0\ -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\2.0.0.0\ -set LibPath=%LibPath%;%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\1.0.0.0\ +for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\ +for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\ call ms\do_winuniversal.bat diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake index e1f7a7932..4f83f2eed 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl/portfile-uwp.cmake @@ -43,75 +43,50 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-uwp-pathlib.patch -) - file(REMOVE_RECURSE ${SOURCE_PATH}/tmp32dll) file(REMOVE_RECURSE ${SOURCE_PATH}/out32dll) file(REMOVE_RECURSE ${SOURCE_PATH}/inc32dll) -file(COPY -${CMAKE_CURRENT_LIST_DIR}/make-openssl.bat -DESTINATION ${SOURCE_PATH}) +file( + COPY ${CMAKE_CURRENT_LIST_DIR}/make-openssl.bat + DESTINATION ${SOURCE_PATH} +) message(STATUS "Build ${TARGET_TRIPLET}") - vcpkg_execute_required_process( - COMMAND ${SOURCE_PATH}/make-openssl.bat ${UWP_PLATFORM} + COMMAND ${SOURCE_PATH}/make-openssl.bat ${UWP_PLATFORM} WORKING_DIRECTORY ${SOURCE_PATH} LOGNAME make-openssl-${TARGET_TRIPLET} ) - - message(STATUS "Build ${TARGET_TRIPLET} done") - - file( COPY ${SOURCE_PATH}/inc32/openssl DESTINATION ${CURRENT_PACKAGES_DIR}/include ) -file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - -file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.pdb +file(INSTALL + ${SOURCE_PATH}/out32dll/libeay32.dll + ${SOURCE_PATH}/out32dll/libeay32.pdb + ${SOURCE_PATH}/out32dll/ssleay32.dll + ${SOURCE_PATH}/out32dll/ssleay32.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.lib +file(INSTALL + ${SOURCE_PATH}/out32dll/libeay32.lib + ${SOURCE_PATH}/out32dll/ssleay32.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - -file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - -file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - - - -file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - -file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - -file(INSTALL ${SOURCE_PATH}/out32dll/libeay32.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.dll +file(INSTALL + ${SOURCE_PATH}/out32dll/libeay32.dll + ${SOURCE_PATH}/out32dll/libeay32.pdb + ${SOURCE_PATH}/out32dll/ssleay32.dll + ${SOURCE_PATH}/out32dll/ssleay32.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - -file(INSTALL ${SOURCE_PATH}/out32dll/ssleay32.lib +file(INSTALL + ${SOURCE_PATH}/out32dll/libeay32.lib + ${SOURCE_PATH}/out32dll/ssleay32.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - - file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright) -- cgit v1.2.3 From bed70f54bc2dd7181a54bbbb94d2fe3a1a0b35cc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 23 Aug 2017 22:46:28 -0700 Subject: [vcpkg] Add stringify for BuildResult::FILE_CONFLICTS --- toolsrc/include/vcpkg_Build.h | 3 ++- toolsrc/src/vcpkg_Build.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h index 32909f4e1..e12ed3b1d 100644 --- a/toolsrc/include/vcpkg_Build.h +++ b/toolsrc/include/vcpkg_Build.h @@ -56,10 +56,11 @@ namespace vcpkg::Build CASCADED_DUE_TO_MISSING_DEPENDENCIES }; - static constexpr std::array BuildResult_values = { + static constexpr std::array BuildResult_values = { BuildResult::SUCCEEDED, BuildResult::BUILD_FAILED, BuildResult::POST_BUILD_CHECKS_FAILED, + BuildResult::FILE_CONFLICTS, BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES}; const std::string& to_string(const BuildResult build_result); diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index 124efb7f2..ca89ccf37 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -240,6 +240,7 @@ namespace vcpkg::Build static const std::string NULLVALUE_STRING = Enums::nullvalue_to_string("vcpkg::Commands::Build::BuildResult"); static const std::string SUCCEEDED_STRING = "SUCCEEDED"; static const std::string BUILD_FAILED_STRING = "BUILD_FAILED"; + static const std::string FILE_CONFLICTS_STRING = "FILE_CONFLICTS"; static const std::string POST_BUILD_CHECKS_FAILED_STRING = "POST_BUILD_CHECKS_FAILED"; static const std::string CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING = "CASCADED_DUE_TO_MISSING_DEPENDENCIES"; @@ -250,6 +251,7 @@ namespace vcpkg::Build case BuildResult::BUILD_FAILED: return BUILD_FAILED_STRING; case BuildResult::POST_BUILD_CHECKS_FAILED: return POST_BUILD_CHECKS_FAILED_STRING; case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: return CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING; + case BuildResult::FILE_CONFLICTS: return FILE_CONFLICTS_STRING; default: Checks::unreachable(VCPKG_LINE_INFO); } } -- cgit v1.2.3 From a3e607c8f1b759fee75ef5dd7b420ef7df48da1a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 24 Aug 2017 02:55:25 -0700 Subject: [assimp] Fix non-const-accepting WordIterator::operator!= --- ports/assimp/CONTROL | 2 +- ports/assimp/const-compare-worditerator.patch | 15 +++++++++++++++ ports/assimp/portfile.cmake | 5 +++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ports/assimp/const-compare-worditerator.patch diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index 2e2b88692..9e036df33 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 4.0.0 +Version: 4.0.0-1 Description: The Open Asset import library Build-Depends: zlib diff --git a/ports/assimp/const-compare-worditerator.patch b/ports/assimp/const-compare-worditerator.patch new file mode 100644 index 000000000..9b892ed82 --- /dev/null +++ b/ports/assimp/const-compare-worditerator.patch @@ -0,0 +1,15 @@ +diff --git a/code/X3DImporter.cpp b/code/X3DImporter.cpp +index 1117735..669f46f 100644 +--- a/code/X3DImporter.cpp ++++ b/code/X3DImporter.cpp +@@ -95,8 +95,8 @@ struct WordIterator: public std::iterator + end_ = other.end_; + return *this; + } +- bool operator==(WordIterator &other) const { return start_ == other.start_; } +- bool operator!=(WordIterator &other) const { return start_ != other.start_; } ++ bool operator==(const WordIterator &other) const { return start_ == other.start_; } ++ bool operator!=(const WordIterator &other) const { return start_ != other.start_; } + WordIterator &operator++() { + start_ += strcspn(start_, whitespace); + start_ += strspn(start_, whitespace); diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 0da9cc2a8..14564e65a 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -8,6 +8,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/const-compare-worditerator.patch +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DASSIMP_BUILD_TESTS=False -- cgit v1.2.3 From 7dd082cad7b1b8323fb5409399614e8e0f4cddf2 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Thu, 24 Aug 2017 13:26:42 +0300 Subject: [vcpkg] testing for architectures supported by toolset --- toolsrc/include/VcpkgPaths.h | 13 ++++++++++++ toolsrc/include/vcpkg_System.h | 2 ++ toolsrc/src/VcpkgPaths.cpp | 44 +++++++++++++++++++++++++++++++++++++--- toolsrc/src/vcpkg_Build.cpp | 46 +++++++++++++++++++----------------------- toolsrc/src/vcpkg_System.cpp | 14 +++++++++++++ 5 files changed, 91 insertions(+), 28 deletions(-) diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h index e4e7ba83d..7964129e5 100644 --- a/toolsrc/include/VcpkgPaths.h +++ b/toolsrc/include/VcpkgPaths.h @@ -8,11 +8,24 @@ namespace vcpkg { + struct ToolsetArchOption + { + CWStringView name; + System::CPUArchitecture host_arch; + System::CPUArchitecture target_arch; + + bool operator==(const ToolsetArchOption& a) const + { + return (name == a.name && host_arch == a.host_arch && target_arch == a.target_arch); + } + }; + struct Toolset { fs::path dumpbin; fs::path vcvarsall; CWStringView version; + std::vector supported_architectures; }; struct VcpkgPaths diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h index 2ea0241f6..32da6e39c 100644 --- a/toolsrc/include/vcpkg_System.h +++ b/toolsrc/include/vcpkg_System.h @@ -77,6 +77,8 @@ namespace vcpkg::System CPUArchitecture get_host_processor(); + std::vector get_supported_host_architectures(); + const fs::path& get_ProgramFiles_32_bit(); const fs::path& get_ProgramFiles_platform_bitness(); diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 4be636650..642ca6a9c 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -279,6 +279,8 @@ namespace vcpkg static std::vector find_toolset_instances(const VcpkgPaths& paths) { + using CPU = System::CPUArchitecture; + const auto& fs = paths.get_filesystem(); const std::vector vs2017_installation_instances = get_VS2017_installation_instances(paths); @@ -298,9 +300,27 @@ namespace vcpkg { const fs::path vs2015_dumpbin_exe = *v / "VC" / "bin" / "dumpbin.exe"; paths_examined.push_back(vs2015_dumpbin_exe); + + const fs::path vs2015_bin_dir = vs2015_vcvarsall_bat.parent_path() / "bin"; + std::vector supported_archictectures; + if(fs.exists(vs2015_bin_dir / "vcvars32.bat")) + supported_archictectures.push_back({L"x86", CPU::X86, CPU::X86}); + if (fs.exists(vs2015_bin_dir / "amd64\\vcvars64.bat")) + supported_archictectures.push_back({L"x64", CPU::X64, CPU::X64}); + if (fs.exists(vs2015_bin_dir / "arm\\vcvarsarm.bat")) + supported_archictectures.push_back({L"arm", CPU::ARM, CPU::ARM}); + if (fs.exists(vs2015_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) + supported_archictectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); + if (fs.exists(vs2015_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) + supported_archictectures.push_back({L"x86_arm" , CPU::X86, CPU::ARM}); + if (fs.exists(vs2015_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) + supported_archictectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); + if (fs.exists(vs2015_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) + supported_archictectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + if (fs.exists(vs2015_dumpbin_exe)) { - found_toolsets.push_back({vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140"}); + found_toolsets.push_back({vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140", supported_archictectures }); } } } @@ -312,10 +332,28 @@ namespace vcpkg const fs::path vc_dir = instance / "VC"; // Skip any instances that do not have vcvarsall. - const fs::path vcvarsall_bat = vc_dir / "Auxiliary" / "Build" / "vcvarsall.bat"; + const fs::path vcvarsall_dir = vc_dir / "Auxiliary" / "Build"; + const fs::path vcvarsall_bat = vcvarsall_dir / "vcvarsall.bat"; paths_examined.push_back(vcvarsall_bat); if (!fs.exists(vcvarsall_bat)) continue; + //Get all supported architecturs + std::vector supported_architectures; + if (fs.exists(vcvarsall_dir / "vcvars32.bat")) + supported_architectures.push_back({L"x86", CPU::X86,CPU::X86 }); + if (fs.exists(vcvarsall_dir / "vcvars64.bat")) + supported_architectures.push_back({L"amd64", CPU::X64,CPU::X64 }); + if (fs.exists(vcvarsall_dir / "vcvarsarm.bat")) + supported_architectures.push_back({L"arm", CPU::ARM,CPU::ARM }); + if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) + supported_architectures.push_back({L"x86_amd64",CPU::X86,CPU::X64 }); + if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) + supported_architectures.push_back({L"x86_arm", CPU::X86,CPU::ARM }); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) + supported_architectures.push_back({L"amd64_x86", CPU::X64,CPU::X86 }); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) + supported_architectures.push_back({L"amd64_arm", CPU::X64,CPU::ARM }); + // Locate the "best" MSVC toolchain version const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; std::vector msvc_subdirectories = fs.get_files_non_recursive(msvc_path); @@ -332,7 +370,7 @@ namespace vcpkg paths_examined.push_back(dumpbin_path); if (fs.exists(dumpbin_path)) { - vs2017_toolset = Toolset{dumpbin_path, vcvarsall_bat, L"v141"}; + vs2017_toolset = Toolset{dumpbin_path, vcvarsall_bat, L"v141", supported_architectures}; break; } } diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index ca89ccf37..2c9a147a4 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -36,39 +36,35 @@ namespace vcpkg::Build Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported vcvarsall target %s", cmake_system_name); } - CWStringView to_vcvarsall_toolchain(const std::string& target_architecture) + CWStringView to_vcvarsall_toolchain(const std::string& target_architecture, const Toolset& toolset) { using CPU = System::CPUArchitecture; - struct ArchOption - { - CWStringView name; - CPU host_arch; - CPU target_arch; - }; - - static constexpr ArchOption X86 = {L"x86", CPU::X86, CPU::X86}; - static constexpr ArchOption X86_X64 = {L"x86_x64", CPU::X86, CPU::X64}; - static constexpr ArchOption X86_ARM = {L"x86_arm", CPU::X86, CPU::ARM}; - static constexpr ArchOption X86_ARM64 = {L"x86_arm64", CPU::X86, CPU::ARM64}; - - static constexpr ArchOption X64 = {L"amd64", CPU::X64, CPU::X64}; - static constexpr ArchOption X64_X86 = {L"amd64_x86", CPU::X64, CPU::X86}; - static constexpr ArchOption X64_ARM = {L"amd64_arm", CPU::X64, CPU::ARM}; - static constexpr ArchOption X64_ARM64 = {L"amd64_arm64", CPU::X64, CPU::ARM64}; - - static constexpr std::array VALUES = { + static constexpr ToolsetArchOption X86 = {L"x86", CPU::X86, CPU::X86}; + static constexpr ToolsetArchOption X86_X64 = {L"x86_x64", CPU::X86, CPU::X64}; + static constexpr ToolsetArchOption X86_ARM = {L"x86_arm", CPU::X86, CPU::ARM}; + static constexpr ToolsetArchOption X86_ARM64 = {L"x86_arm64", CPU::X86, CPU::ARM64}; + + static constexpr ToolsetArchOption X64 = {L"amd64", CPU::X64, CPU::X64}; + static constexpr ToolsetArchOption X64_X86 = {L"amd64_x86", CPU::X64, CPU::X86}; + static constexpr ToolsetArchOption X64_ARM = {L"amd64_arm", CPU::X64, CPU::ARM}; + static constexpr ToolsetArchOption X64_ARM64 = {L"amd64_arm64", CPU::X64, CPU::ARM64}; + + static constexpr std::array VALUES = { X86, X86_X64, X86_ARM, X86_ARM64, X64, X64_X86, X64_ARM, X64_ARM64}; auto target_arch = System::to_cpu_architecture(target_architecture); - auto host_arch = System::get_host_processor(); + auto host_architectures = System::get_supported_host_architectures(); for (auto&& value : VALUES) { - if (target_arch == value.target_arch && host_arch == value.host_arch) - { - return value.name; - } + if (target_arch != value.target_arch || + std::find(host_architectures.begin(), host_architectures.end(), value.host_arch) == host_architectures.end() || + std::find(toolset.supported_architectures.begin(), toolset.supported_architectures.end(), value) == toolset.supported_architectures.end() + ) + continue; + + return value.name; } Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported toolchain combination %s", target_architecture); @@ -82,7 +78,7 @@ namespace vcpkg::Build tonull = L""; } - auto arch = to_vcvarsall_toolchain(pre_build_info.target_architecture); + auto arch = to_vcvarsall_toolchain(pre_build_info.target_architecture, toolset); auto target = to_vcvarsall_target(pre_build_info.cmake_system_name); return Strings::wformat(LR"("%s" %s %s %s 2>&1)", toolset.vcvarsall.native(), arch, target, tonull); diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 883fe6612..3288ec7a2 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -42,6 +42,20 @@ namespace vcpkg::System return to_cpu_architecture(Strings::to_utf8(procarch)).value_or_exit(VCPKG_LINE_INFO); } + std::vector get_supported_host_architectures() + { + std::vector supported_architectures; + supported_architectures.push_back(get_host_processor()); + + //AMD64 machines support to run x86 applications + if(supported_architectures.back()==CPUArchitecture::X64) + { + supported_architectures.push_back(CPUArchitecture::X86); + } + + return supported_architectures; + } + int cmd_execute_clean(const CWStringView cmd_line) { static const std::wstring system_root = get_environment_variable(L"SystemRoot").value_or_exit(VCPKG_LINE_INFO); -- cgit v1.2.3 From c4e4ba6418f4c2522f9d030ae0c64afe7e96f81a Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 24 Aug 2017 17:27:32 +0200 Subject: [rhash] new port --- ports/rhash/CMakeLists.txt | 15 +++++++++++++++ ports/rhash/CONTROL | 3 +++ ports/rhash/portfile.cmake | 25 +++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 ports/rhash/CMakeLists.txt create mode 100644 ports/rhash/CONTROL create mode 100644 ports/rhash/portfile.cmake diff --git a/ports/rhash/CMakeLists.txt b/ports/rhash/CMakeLists.txt new file mode 100644 index 000000000..b395b5c9a --- /dev/null +++ b/ports/rhash/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.5) +project(rhash C) + +file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/Makefile RHASH_SOURCES REGEX "^SOURCES = .*$") +string(REPLACE "SOURCES = " "" RHASH_SOURCES "${RHASH_SOURCES}") +string(REPLACE " " ";" RHASH_SOURCES "${RHASH_SOURCES}") + +add_library(rhash ${RHASH_SOURCES}) +set_target_properties(rhash PROPERTIES COMPILE_DEFINITIONS "IN_RHASH" DEFINE_SYMBOL "RHASH_EXPORTS") + +install(TARGETS rhash RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + +if(NOT RHASH_SKIP_HEADERS) + install(FILES rhash.h rhash_torrent.h DESTINATION include) +endif() diff --git a/ports/rhash/CONTROL b/ports/rhash/CONTROL new file mode 100644 index 000000000..cfa5c6cb0 --- /dev/null +++ b/ports/rhash/CONTROL @@ -0,0 +1,3 @@ +Source: rhash +Version: 1.3.5 +Description: C library for computing a wide variety of hash sums diff --git a/ports/rhash/portfile.cmake b/ports/rhash/portfile.cmake new file mode 100644 index 000000000..749501375 --- /dev/null +++ b/ports/rhash/portfile.cmake @@ -0,0 +1,25 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "UWP builds not supported") +endif() + +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rhash/RHash + REF v1.3.5 + SHA512 e8450aab0c16bfb975bf4aeee218740fb4d86d5514e426b70c3edb84e4d63865cd4051939aa95c24a87a78baaedc49e40bb509b2610e89ca3745930808b3ef6c + HEAD_REF master) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/librhash) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/librhash + PREFER_NINJA + OPTIONS_DEBUG + -DRHASH_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/rhash) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/rhash/COPYING ${CURRENT_PACKAGES_DIR}/share/rhash/copyright) -- cgit v1.2.3 From 2291214f1f65cee1df3a1abaf4131a0c16a9269a Mon Sep 17 00:00:00 2001 From: veggiesaurus Date: Thu, 24 Aug 2017 20:14:49 +0200 Subject: highfive header-only install --- ports/highfive/CONTROL | 4 ++++ ports/highfive/portfile.cmake | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 ports/highfive/CONTROL create mode 100644 ports/highfive/portfile.cmake diff --git a/ports/highfive/CONTROL b/ports/highfive/CONTROL new file mode 100644 index 000000000..17aa55c8f --- /dev/null +++ b/ports/highfive/CONTROL @@ -0,0 +1,4 @@ +Source: highfive +Version: 1.3 +Description: HighFive is a modern C++/C++11 friendly interface for libhdf5 +Build-Depends: hdf5, boost \ No newline at end of file diff --git a/ports/highfive/portfile.cmake b/ports/highfive/portfile.cmake new file mode 100644 index 000000000..8c2b63dee --- /dev/null +++ b/ports/highfive/portfile.cmake @@ -0,0 +1,26 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/HighFive-1.3) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/BlueBrain/HighFive/archive/v1.3.tar.gz" + FILENAME "highfive.v1.3.tar.gz" + SHA512 258efae1ef5eed45ac1cf93c21c79fab9ee3c340d49a36a4aa2b43c98df1c80db9167a40a0b6a59c4f99b7c190d41d545b53c0f2c5c59aabaffc4b2584b4390b +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Copy the highfive header files +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/highfive RENAME copyright) +vcpkg_copy_pdbs() -- cgit v1.2.3 From e4d0cb197642d1ca77abbb2ce46effb7aac2bcac Mon Sep 17 00:00:00 2001 From: veggiesaurus Date: Thu, 24 Aug 2017 20:18:00 +0200 Subject: cleanup portfile --- ports/highfive/portfile.cmake | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/ports/highfive/portfile.cmake b/ports/highfive/portfile.cmake index 8c2b63dee..34d41ac1e 100644 --- a/ports/highfive/portfile.cmake +++ b/ports/highfive/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) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/HighFive-1.3) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From 14f42a66d3e3eca8c2d917fc391a1f8e8bfa7de8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 24 Aug 2017 12:06:22 -0700 Subject: [Strings::format] Add overload for unisigned long --- toolsrc/include/vcpkg_Strings.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index 325a2cb4c..e94742c8f 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -19,10 +19,12 @@ namespace vcpkg::Strings::details inline long long to_printf_arg(const long long s) { return s; } - inline double to_printf_arg(const double s) { return s; } + inline unsigned long to_printf_arg(const unsigned long s) { return s; } inline size_t to_printf_arg(const size_t s) { return s; } + inline double to_printf_arg(const double s) { return s; } + std::string format_internal(const char* fmtstr, ...); inline const wchar_t* to_wprintf_arg(const std::wstring& s) { return s.c_str(); } -- cgit v1.2.3 From 52d606e6ac6650271fc2fd02718eb107dd33e797 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 24 Aug 2017 12:06:28 -0700 Subject: Use CreateProcess instead of _wspawnlpe --- toolsrc/src/vcpkg_System.cpp | 50 +++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 883fe6612..2ad120e4c 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -96,8 +96,7 @@ namespace vcpkg::System // Flush stdout before launching external process fflush(nullptr); - std::vector env_cstr; - env_cstr.reserve(env_wstrings.size() + 2); + std::wstring env_cstr; for (auto&& env_wstring : env_wstrings) { @@ -105,20 +104,47 @@ namespace vcpkg::System auto v = value.get(); if (!v || v->empty()) continue; - env_wstring.push_back(L'='); - env_wstring.append(*v); - env_cstr.push_back(env_wstring.c_str()); + env_cstr.append(env_wstring); + env_cstr.push_back(L'='); + env_cstr.append(*v); + env_cstr.push_back(L'\0'); } - env_cstr.push_back(new_PATH.c_str()); - env_cstr.push_back(nullptr); + env_cstr.append(new_PATH); + env_cstr.push_back(L'\0'); + + STARTUPINFOW startup_info; + memset(&startup_info, 0, sizeof(STARTUPINFOW)); + startup_info.cb = sizeof(STARTUPINFOW); + + PROCESS_INFORMATION process_info; + memset(&process_info, 0, sizeof(PROCESS_INFORMATION)); // Basically we are wrapping it in quotes - const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line); - Debug::println("_wspawnlpe(cmd.exe /c %s)", Strings::to_utf8(actual_cmd_line)); - auto exit_code = - _wspawnlpe(_P_WAIT, L"cmd.exe", L"cmd.exe", L"/c", actual_cmd_line.c_str(), nullptr, env_cstr.data()); - Debug::println("_wspawnlpe() returned %d", exit_code); + std::wstring actual_cmd_line = Strings::wformat(LR"###(cmd.exe /c "%s")###", cmd_line); + Debug::println("CreateProcessW(%s)", Strings::to_utf8(actual_cmd_line)); + bool succeeded = TRUE == CreateProcessW(nullptr, + actual_cmd_line.data(), + nullptr, + nullptr, + FALSE, + BELOW_NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT, + env_cstr.data(), + nullptr, + &startup_info, + &process_info); + + Checks::check_exit(VCPKG_LINE_INFO, succeeded, "Process creation failed with error code: %lu", GetLastError()); + + CloseHandle(process_info.hThread); + + DWORD result = WaitForSingleObject(process_info.hProcess, INFINITE); + Checks::check_exit(VCPKG_LINE_INFO, result != WAIT_FAILED, "WaitForSingleObject failed"); + + DWORD exit_code = 0; + GetExitCodeProcess(process_info.hProcess, &exit_code); + + Debug::println("CreateProcessW() returned %lu", exit_code); return static_cast(exit_code); } -- cgit v1.2.3 From 9a1618c8a554fb00282c94d657557c1d2b5a5193 Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 24 Aug 2017 21:45:00 +0200 Subject: [expat] drop debug suffix --- ports/expat/CONTROL | 2 +- ports/expat/portfile.cmake | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/expat/CONTROL b/ports/expat/CONTROL index cee5c9edc..f833c3cf0 100644 --- a/ports/expat/CONTROL +++ b/ports/expat/CONTROL @@ -1,3 +1,3 @@ Source: expat -Version: 2.2.4 +Version: 2.2.4-1 Description: XML parser library written in C diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index 3a7430db3..da6ddc429 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -29,6 +29,9 @@ file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/sh vcpkg_copy_pdbs() +# CMake's FindExpat currently doesn't look for expatd.lib +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/expat.lib) + file(READ ${CURRENT_PACKAGES_DIR}/include/expat_external.h EXPAT_EXTERNAL_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") string(REPLACE "!defined(XML_STATIC)" "/* vcpkg static build !defined(XML_STATIC) */ 0" EXPAT_EXTERNAL_H "${EXPAT_EXTERNAL_H}") -- cgit v1.2.3 From ceb54bae8754f707bec17ac6ff3e35a32b0966e3 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Fri, 25 Aug 2017 00:45:11 +0300 Subject: [vcpkg] prefer AMD64 host architecture --- 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 2c9a147a4..b0053766e 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -51,7 +51,7 @@ namespace vcpkg::Build static constexpr ToolsetArchOption X64_ARM64 = {L"amd64_arm64", CPU::X64, CPU::ARM64}; static constexpr std::array VALUES = { - X86, X86_X64, X86_ARM, X86_ARM64, X64, X64_X86, X64_ARM, X64_ARM64}; + X64, X64_X86, X64_ARM, X64_ARM64, X86, X86_X64, X86_ARM, X86_ARM64}; auto target_arch = System::to_cpu_architecture(target_architecture); auto host_architectures = System::get_supported_host_architectures(); -- cgit v1.2.3 From 8fc510e1f946208409bd8ba1159b2e19bf553909 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 24 Aug 2017 15:42:08 -0700 Subject: [highfive] Remove unneeded vcpkg_copy_pdbs() --- ports/highfive/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/highfive/portfile.cmake b/ports/highfive/portfile.cmake index 34d41ac1e..9fea72553 100644 --- a/ports/highfive/portfile.cmake +++ b/ports/highfive/portfile.cmake @@ -11,4 +11,3 @@ vcpkg_extract_source_archive(${ARCHIVE}) file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/highfive RENAME copyright) -vcpkg_copy_pdbs() -- cgit v1.2.3 From e237682cad4eaa582a10b5ad03a59ca6449e0795 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 23 Aug 2017 16:17:53 -0700 Subject: Introduce GlobalState struct --- toolsrc/include/SourceParagraph.h | 2 -- toolsrc/include/vcpkg_GlobalState.h | 13 +++++++++++++ toolsrc/include/vcpkglib.h | 2 -- toolsrc/src/Paragraphs.cpp | 3 ++- toolsrc/src/SourceParagraph.cpp | 1 - toolsrc/src/VcpkgCmdArguments.cpp | 3 ++- toolsrc/src/commands_search.cpp | 3 ++- toolsrc/src/vcpkg.cpp | 14 +++++++------- toolsrc/src/vcpkg_Build.cpp | 7 ++++--- toolsrc/src/vcpkg_GlobalState.cpp | 10 ++++++++++ toolsrc/src/vcpkg_System.cpp | 9 +++++---- toolsrc/src/vcpkglib.cpp | 2 -- toolsrc/vcpkglib/vcpkglib.vcxproj | 2 ++ toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 6 ++++++ 14 files changed, 53 insertions(+), 24 deletions(-) create mode 100644 toolsrc/include/vcpkg_GlobalState.h create mode 100644 toolsrc/src/vcpkg_GlobalState.cpp diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 05f18f940..8563d83b0 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -12,8 +12,6 @@ namespace vcpkg { - extern bool g_feature_packages; - struct Dependency { Features depend; diff --git a/toolsrc/include/vcpkg_GlobalState.h b/toolsrc/include/vcpkg_GlobalState.h new file mode 100644 index 000000000..15b8867f7 --- /dev/null +++ b/toolsrc/include/vcpkg_GlobalState.h @@ -0,0 +1,13 @@ +#pragma once + +#include + +namespace vcpkg +{ + struct GlobalState + { + static ElapsedTime timer; + static bool debugging; + static bool feature_packages; + }; +} \ No newline at end of file diff --git a/toolsrc/include/vcpkglib.h b/toolsrc/include/vcpkglib.h index 63b358d74..0bb75f9b5 100644 --- a/toolsrc/include/vcpkglib.h +++ b/toolsrc/include/vcpkglib.h @@ -6,8 +6,6 @@ namespace vcpkg { - extern bool g_debugging; - StatusParagraphs database_load_check(const VcpkgPaths& paths); void write_update(const VcpkgPaths& paths, const StatusParagraph& p); diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp index 3a30f66a3..a7dee4fd3 100644 --- a/toolsrc/src/Paragraphs.cpp +++ b/toolsrc/src/Paragraphs.cpp @@ -3,6 +3,7 @@ #include "ParagraphParseResult.h" #include "Paragraphs.h" #include "vcpkg_Files.h" +#include "vcpkg_GlobalState.h" #include "vcpkg_Util.h" using namespace vcpkg::Parse; @@ -210,7 +211,7 @@ namespace vcpkg::Paragraphs if (auto vector_pghs = pghs.get()) { auto csf = SourceControlFile::parse_control_file(std::move(*vector_pghs)); - if (!g_feature_packages) + if (!GlobalState::feature_packages) { if (auto ptr = csf.get()) { diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 54f34cbd3..c69770ae1 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -13,7 +13,6 @@ namespace vcpkg { using namespace vcpkg::Parse; - bool g_feature_packages = false; namespace Fields { static const std::string BUILD_DEPENDS = "Build-Depends"; diff --git a/toolsrc/src/VcpkgCmdArguments.cpp b/toolsrc/src/VcpkgCmdArguments.cpp index ebf4c5fc5..a72e5226f 100644 --- a/toolsrc/src/VcpkgCmdArguments.cpp +++ b/toolsrc/src/VcpkgCmdArguments.cpp @@ -3,6 +3,7 @@ #include "VcpkgCmdArguments.h" #include "metrics.h" #include "vcpkg_Commands.h" +#include "vcpkg_GlobalState.h" #include "vcpkg_System.h" namespace vcpkg @@ -119,7 +120,7 @@ namespace vcpkg } if (arg == "--featurepackages") { - g_feature_packages = true; + GlobalState::feature_packages = true; continue; } diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index b1bd7ea6f..529d52a8b 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -3,6 +3,7 @@ #include "Paragraphs.h" #include "SourceParagraph.h" #include "vcpkg_Commands.h" +#include "vcpkg_GlobalState.h" #include "vcpkg_System.h" #include "vcpkglib.h" @@ -90,7 +91,7 @@ namespace vcpkg::Commands::Search if (!sources_and_errors.errors.empty()) { - if (vcpkg::g_debugging) + if (GlobalState::debugging) { print_error_message(sources_and_errors.errors); } diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 738b7b284..3ccb33aad 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -6,6 +6,7 @@ #include "vcpkg_Chrono.h" #include "vcpkg_Commands.h" #include "vcpkg_Files.h" +#include "vcpkg_GlobalState.h" #include "vcpkg_Input.h" #include "vcpkg_Strings.h" #include "vcpkg_System.h" @@ -184,17 +185,16 @@ static std::string trim_path_from_command_line(const std::string& full_command_l return std::string(it, full_command_line.cend()); } -static ElapsedTime g_timer; - int wmain(const int argc, const wchar_t* const* const argv) { if (argc == 0) std::abort(); - g_timer = ElapsedTime::create_started(); + GlobalState::timer = ElapsedTime::create_started(); + atexit([]() { - auto elapsed_us = g_timer.microseconds(); + auto elapsed_us = GlobalState::timer.microseconds(); Metrics::track_metric("elapsed_us", elapsed_us); - g_debugging = false; + GlobalState::debugging = false; Metrics::flush(); }); @@ -209,9 +209,9 @@ int wmain(const int argc, const wchar_t* const* const argv) if (auto p = args.printmetrics.get()) Metrics::set_print_metrics(*p); if (auto p = args.sendmetrics.get()) Metrics::set_send_metrics(*p); - if (auto p = args.debug.get()) g_debugging = *p; + if (auto p = args.debug.get()) GlobalState::debugging = *p; - if (g_debugging) + if (GlobalState::debugging) { inner(args); Checks::exit_fail(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index ca89ccf37..d4632afaa 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -8,6 +8,7 @@ #include "vcpkg_Chrono.h" #include "vcpkg_Commands.h" #include "vcpkg_Enums.h" +#include "vcpkg_GlobalState.h" #include "vcpkg_System.h" #include "vcpkg_optional.h" #include "vcpkglib.h" @@ -77,7 +78,7 @@ namespace vcpkg::Build std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) { const wchar_t* tonull = L" >nul"; - if (g_debugging) + if (GlobalState::debugging) { tonull = L""; } @@ -155,7 +156,7 @@ namespace vcpkg::Build const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); std::string features; - if (g_feature_packages) + if (GlobalState::feature_packages) { if (config.feature_list) { @@ -212,7 +213,7 @@ namespace vcpkg::Build { return {BuildResult::POST_BUILD_CHECKS_FAILED, {}}; } - if (g_feature_packages) + if (GlobalState::feature_packages) { if (config.feature_list) { diff --git a/toolsrc/src/vcpkg_GlobalState.cpp b/toolsrc/src/vcpkg_GlobalState.cpp new file mode 100644 index 000000000..cae2b2f8e --- /dev/null +++ b/toolsrc/src/vcpkg_GlobalState.cpp @@ -0,0 +1,10 @@ +#include "pch.h" + +#include "vcpkg_GlobalState.h" + +namespace vcpkg +{ + ElapsedTime GlobalState::timer; + bool GlobalState::debugging = false; + bool GlobalState::feature_packages = false; +} diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 2ad120e4c..2d6246d19 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "vcpkg_Checks.h" +#include "vcpkg_GlobalState.h" #include "vcpkg_System.h" #include "vcpkglib.h" @@ -94,7 +95,7 @@ namespace vcpkg::System }; // Flush stdout before launching external process - fflush(nullptr); + fflush(nullptr); std::wstring env_cstr; @@ -151,7 +152,7 @@ namespace vcpkg::System int cmd_execute(const CWStringView cmd_line) { // Flush stdout before launching external process - fflush(nullptr); + fflush(nullptr); // Basically we are wrapping it in quotes const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line); @@ -302,7 +303,7 @@ namespace vcpkg::Debug { void println(const CStringView message) { - if (g_debugging) + if (GlobalState::debugging) { System::println("[DEBUG] %s", message); } @@ -310,7 +311,7 @@ namespace vcpkg::Debug void println(const System::Color c, const CStringView message) { - if (g_debugging) + if (GlobalState::debugging) { System::println(c, "[DEBUG] %s", message); } diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp index 6e90695de..b52f49d62 100644 --- a/toolsrc/src/vcpkglib.cpp +++ b/toolsrc/src/vcpkglib.cpp @@ -9,8 +9,6 @@ namespace vcpkg { - bool g_debugging = false; - static StatusParagraphs load_current_database(Files::Filesystem& fs, const fs::path& vcpkg_dir_status_file, const fs::path& vcpkg_dir_status_file_old) diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 200f91d1c..edecd7720 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -161,6 +161,7 @@ + @@ -227,6 +228,7 @@ + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 4f51dfa9a..2fbf3d929 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -177,6 +177,9 @@ Source Files + + Source Files + @@ -302,5 +305,8 @@ Header Files + + Header Files + \ No newline at end of file -- cgit v1.2.3 From 88d96a3699118cf21f6ec92284eb591db25d3a6a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 23 Aug 2017 16:47:54 -0700 Subject: Run cleanup before exiting instead of calling atexit --- toolsrc/include/vcpkg_Checks.h | 2 ++ toolsrc/src/vcpkg.cpp | 7 +------ toolsrc/src/vcpkg_Checks.cpp | 24 ++++++++++++++++++++++-- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/toolsrc/include/vcpkg_Checks.h b/toolsrc/include/vcpkg_Checks.h index 754b44f75..01cb7209b 100644 --- a/toolsrc/include/vcpkg_Checks.h +++ b/toolsrc/include/vcpkg_Checks.h @@ -5,6 +5,8 @@ namespace vcpkg::Checks { + void register_console_ctrl_handler(); + // Indicate that an internal error has occurred and exit the tool. This should be used when invariants have been // broken. [[noreturn]] void unreachable(const LineInfo& line_info); diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 3ccb33aad..7294d8692 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -191,12 +191,7 @@ int wmain(const int argc, const wchar_t* const* const argv) GlobalState::timer = ElapsedTime::create_started(); - atexit([]() { - auto elapsed_us = GlobalState::timer.microseconds(); - Metrics::track_metric("elapsed_us", elapsed_us); - GlobalState::debugging = false; - Metrics::flush(); - }); + // Checks::register_console_ctrl_handler(); Metrics::track_property("version", Commands::Version::version()); diff --git a/toolsrc/src/vcpkg_Checks.cpp b/toolsrc/src/vcpkg_Checks.cpp index 2674b889a..6ae595a54 100644 --- a/toolsrc/src/vcpkg_Checks.cpp +++ b/toolsrc/src/vcpkg_Checks.cpp @@ -1,11 +1,31 @@ #include "pch.h" +#include "metrics.h" #include "vcpkg_Checks.h" +#include "vcpkg_GlobalState.h" #include "vcpkg_System.h" #include "vcpkglib.h" namespace vcpkg::Checks { + [[noreturn]] static void cleanup_and_exit(const int exit_code) + { + auto elapsed_us = GlobalState::timer.microseconds(); + Metrics::track_metric("elapsed_us", elapsed_us); + GlobalState::debugging = false; + Metrics::flush(); + + ::exit(exit_code); + } + + static BOOL CtrlHandler(DWORD fdwCtrlType) + { + Metrics::track_metric("SignalCaptured", fdwCtrlType); + cleanup_and_exit(EXIT_FAILURE); + } + + void register_console_ctrl_handler() { SetConsoleCtrlHandler((PHANDLER_ROUTINE)CtrlHandler, TRUE); } + [[noreturn]] void unreachable(const LineInfo& line_info) { System::println(System::Color::error, "Error: Unreachable code was reached"); @@ -13,14 +33,14 @@ namespace vcpkg::Checks #ifndef NDEBUG std::abort(); #else - ::exit(EXIT_FAILURE); + cleanup_and_exit(EXIT_FAILURE); #endif } [[noreturn]] void exit_with_code(const LineInfo& line_info, const int exit_code) { Debug::println(System::Color::error, line_info.to_string()); - ::exit(exit_code); + cleanup_and_exit(exit_code); } [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView errorMessage) -- cgit v1.2.3 From 34bd87c9fcfb1ac9269c75db96852b64ed754d11 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 24 Aug 2017 16:32:06 -0700 Subject: Fix merge issues --- toolsrc/src/commands_install.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index bd14bf7e3..659418a38 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -6,6 +6,7 @@ #include "vcpkg_Commands.h" #include "vcpkg_Dependencies.h" #include "vcpkg_Files.h" +#include "vcpkg_GlobalState.h" #include "vcpkg_Input.h" #include "vcpkg_System.h" #include "vcpkg_Util.h" @@ -252,7 +253,8 @@ namespace vcpkg::Commands::Install { const InstallPlanType& plan_type = action.plan_type; const std::string display_name = action.spec.to_string(); - const std::string display_name_with_features = g_feature_packages ? action.displayname() : display_name; + const std::string display_name_with_features = + GlobalState::feature_packages ? action.displayname() : display_name; const bool is_user_requested = action.request_type == RequestType::USER_REQUESTED; const bool use_head_version = to_bool(build_package_options.use_head_version); @@ -275,7 +277,7 @@ namespace vcpkg::Commands::Install System::println("Building package %s... ", display_name_with_features); const auto result = [&]() -> Build::ExtendedBuildResult { - if (g_feature_packages) + if (GlobalState::feature_packages) { const Build::BuildPackageConfig build_config{ *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), @@ -459,7 +461,7 @@ namespace vcpkg::Commands::Install for (auto&& spec : specs) { Input::check_triplet(spec.package_spec.triplet(), paths); - if (!spec.features.empty() && !g_feature_packages) + if (!spec.features.empty() && !GlobalState::feature_packages) { Checks::exit_with_message( VCPKG_LINE_INFO, "Feature packages are experimentally available under the --featurepackages flag."); @@ -481,7 +483,7 @@ namespace vcpkg::Commands::Install std::vector action_plan; - if (g_feature_packages) + if (GlobalState::feature_packages) { std::unordered_map scf_map; auto all_ports = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); @@ -522,7 +524,7 @@ namespace vcpkg::Commands::Install } // execute the plan - if (g_feature_packages) + if (GlobalState::feature_packages) { for (const auto& action : action_plan) { -- cgit v1.2.3 From aa9780042275cde17994b67a088d872a1c5babbe Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Fri, 25 Aug 2017 14:43:08 +0900 Subject: Add WinPCAP Developer's Pack Add WinPCAP Developer's Pack --- ports/winpcap/CONTROL | 3 ++ ports/winpcap/portfile.cmake | 72 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 ports/winpcap/CONTROL create mode 100644 ports/winpcap/portfile.cmake diff --git a/ports/winpcap/CONTROL b/ports/winpcap/CONTROL new file mode 100644 index 000000000..f37e8223e --- /dev/null +++ b/ports/winpcap/CONTROL @@ -0,0 +1,3 @@ +Source: winpcap +Version: 4.1.2 +Description: WinPcap is the industry-standard tool for link-layer network access in Windows environments. diff --git a/ports/winpcap/portfile.cmake b/ports/winpcap/portfile.cmake new file mode 100644 index 000000000..b156b31ee --- /dev/null +++ b/ports/winpcap/portfile.cmake @@ -0,0 +1,72 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/WpdPack) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip" + FILENAME "WpdPack_4_1_2.zip" + SHA512 7a319dfcda779eb881eca43c83c5570c0e359da30464f981010d31615222b84f758c3a8ea96605e02dc3f0a294c4c36be447d22beb1e58cd40a73deb1ad128f0 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file( + INSTALL + "${SOURCE_PATH}/Include/bittypes.h" + "${SOURCE_PATH}/Include/ip6_misc.h" + "${SOURCE_PATH}/Include/Packet32.h" + "${SOURCE_PATH}/Include/pcap.h" + "${SOURCE_PATH}/Include/pcap-bpf.h" + "${SOURCE_PATH}/Include/pcap-namedb.h" + "${SOURCE_PATH}/Include/remote-ext.h" + "${SOURCE_PATH}/Include/Win32-Extensions.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include +) + +file( + INSTALL + "${SOURCE_PATH}/Include/pcap/bluetooth.h" + "${SOURCE_PATH}/Include/pcap/bpf.h" + "${SOURCE_PATH}/Include/pcap/namedb.h" + "${SOURCE_PATH}/Include/pcap/pcap.h" + "${SOURCE_PATH}/Include/pcap/sll.h" + "${SOURCE_PATH}/Include/pcap/usb.h" + "${SOURCE_PATH}/Include/pcap/vlan.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/pcap +) + +set(PCAP_LIBRARY_PATH "${SOURCE_PATH}/Lib") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(PCAP_LIBRARY_PATH "${PCAP_LIBRARY_PATH}/x64") +endif() + +file( + INSTALL + "${PCAP_LIBRARY_PATH}/Packet.lib" + "${PCAP_LIBRARY_PATH}/wpcap.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib +) + +file( + INSTALL + "${PCAP_LIBRARY_PATH}/Packet.lib" + "${PCAP_LIBRARY_PATH}/wpcap.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/lib +) + +# Handle copyright +file(DOWNLOAD "https://www.winpcap.org/misc/copyright.htm" ${SOURCE_PATH}/copyright.htm) +file(INSTALL ${SOURCE_PATH}/copyright.htm DESTINATION ${CURRENT_PACKAGES_DIR}/share/winpcap RENAME copyright) -- cgit v1.2.3 From 74f6077ec30df24ca692a13f019a07a87614f4f1 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sat, 26 Aug 2017 00:55:26 +0900 Subject: Build WinPCAP libraries from source code Build WinPCAP libraries from source code. --- ports/winpcap/CONTROL | 2 +- ports/winpcap/create_bin.bat | 20 ++ ports/winpcap/create_lib.patch | 19 ++ ports/winpcap/packetNtx.patch | 563 +++++++++++++++++++++++++++++++++++++++++ ports/winpcap/portfile.cmake | 136 ++++++++-- ports/winpcap/wpcap.patch | 180 +++++++++++++ 6 files changed, 899 insertions(+), 21 deletions(-) create mode 100644 ports/winpcap/create_bin.bat create mode 100644 ports/winpcap/create_lib.patch create mode 100644 ports/winpcap/packetNtx.patch create mode 100644 ports/winpcap/wpcap.patch diff --git a/ports/winpcap/CONTROL b/ports/winpcap/CONTROL index f37e8223e..7483c1f24 100644 --- a/ports/winpcap/CONTROL +++ b/ports/winpcap/CONTROL @@ -1,3 +1,3 @@ Source: winpcap -Version: 4.1.2 +Version: 4.1.3 Description: WinPcap is the industry-standard tool for link-layer network access in Windows environments. diff --git a/ports/winpcap/create_bin.bat b/ports/winpcap/create_bin.bat new file mode 100644 index 000000000..aa9e7f106 --- /dev/null +++ b/ports/winpcap/create_bin.bat @@ -0,0 +1,20 @@ +@echo off + +IF "%2"=="" (set WPDPACKDESTDIR=.\WpdPack\) ELSE (set WPDPACKDESTDIR=%2) + +IF ""=="%1" (set WINPCAPSOURCEDIR=.\) ELSE (set WINPCAPSOURCEDIR=%1) + +echo Creating \Lib folder +mkdir %WPDPACKDESTDIR% >nul 2>nul +mkdir %WPDPACKDESTDIR%\Bin >nul 2>nul +mkdir %WPDPACKDESTDIR%\Bin\x64 >nul 2>nul + +xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x86\wpcap.dll" %WPDPACKDESTDIR%\Bin\ >nul +xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x64\wpcap.dll" %WPDPACKDESTDIR%\Bin\x64 >nul +xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x86\packet.dll %WPDPACKDESTDIR%\Bin\ >nul +xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x64\packet.dll %WPDPACKDESTDIR%\Bin\x64 >nul + +echo Folder \Bin created successfully + +set WPDPACKDESTDIR= +set WINPCAPSOURCEDIR= \ No newline at end of file diff --git a/ports/winpcap/create_lib.patch b/ports/winpcap/create_lib.patch new file mode 100644 index 000000000..8e144fa3d --- /dev/null +++ b/ports/winpcap/create_lib.patch @@ -0,0 +1,19 @@ +diff --git a/create_lib.bat b/create_lib.bat +index dbe511c..d431b88 100644 +--- a/create_lib.bat ++++ b/create_lib.bat +@@ -9,12 +9,10 @@ mkdir %WPDPACKDESTDIR% >nul 2>nul + mkdir %WPDPACKDESTDIR%\Lib >nul 2>nul + mkdir %WPDPACKDESTDIR%\Lib\x64 >nul 2>nul + +-xcopy /v /Y %WINPCAPSOURCEDIR%\wpcap\PRJ\Release\x86\wpcap.lib %WPDPACKDESTDIR%\Lib\ >nul +-xcopy /v /Y %WINPCAPSOURCEDIR%\wpcap\PRJ\Release\x64\wpcap.lib %WPDPACKDESTDIR%\Lib\x64 >nul ++xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x86\wpcap.lib" %WPDPACKDESTDIR%\Lib\ >nul ++xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x64\wpcap.lib" %WPDPACKDESTDIR%\Lib\x64 >nul + xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x86\packet.lib %WPDPACKDESTDIR%\Lib\ >nul + xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x64\packet.lib %WPDPACKDESTDIR%\Lib\x64 >nul +-xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\libpacket.a %WPDPACKDESTDIR%\Lib\ >nul +-xcopy /v /Y %WINPCAPSOURCEDIR%\wpcap\LIB\libwpcap.a %WPDPACKDESTDIR%\Lib\ >nul + + echo Folder \Lib created successfully + diff --git a/ports/winpcap/packetNtx.patch b/ports/winpcap/packetNtx.patch new file mode 100644 index 000000000..5da9c6c16 --- /dev/null +++ b/ports/winpcap/packetNtx.patch @@ -0,0 +1,563 @@ +diff --git a/packetNtx/Dll/Project/Packet.dsp b/packetNtx/Dll/Project/Packet.dsp +index 6e69440..d7bcfe7 100644 +--- a/packetNtx/Dll/Project/Packet.dsp ++++ b/packetNtx/Dll/Project/Packet.dsp +@@ -55,8 +55,8 @@ RSC=rc.exe + # PROP Intermediate_Dir "Release" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_WANPACKET_API" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -87,8 +87,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Debug" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_WANPACKET_API" /YX /FD /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -120,8 +120,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "NT4_Debug" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /YX /FD /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -154,8 +154,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "NT4_Release" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -187,8 +187,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Debug_LOG_TO_FILE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /FR /YX /FD /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -221,8 +221,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Release_LOG_TO_FILE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c +-# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /FR /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c ++# ADD CPP /nologo /MD /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c + # SUBTRACT CPP /u + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +@@ -255,8 +255,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "NT4_Debug_LOG_TO_FILE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -289,8 +289,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "NT4_Release_LOG_TO_FILE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -323,8 +323,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Debug_No_AirPcap" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "WIN32" /D "_WINDOWS" /D "HAVE_AIRPCAP_API" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /YX /FD /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "WIN32" /D "_WINDOWS" /YX /FD /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -357,8 +357,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Release_No_AirPcap" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_AIRPCAP_API" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -390,8 +390,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Debug_No_NpfIm" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /D "_DBG" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /D "_DBG" /YX /FD /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -424,8 +424,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Release_No_NpfIm" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -457,8 +457,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Debug_Vista" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -491,8 +491,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Release_Vista" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -525,9 +525,9 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Release_Vista_LOG_TO_FILE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /FR /YX /FD /c ++# ADD BASE CPP /nologo /MD /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /FR /YX /FD /c + # SUBTRACT BASE CPP /u +-# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c ++# ADD CPP /nologo /MD /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c + # SUBTRACT CPP /u + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +diff --git a/packetNtx/Dll/Project/Packet.vcproj b/packetNtx/Dll/Project/Packet.vcproj +index 8be719e..dcb3701 100644 +--- a/packetNtx/Dll/Project/Packet.vcproj ++++ b/packetNtx/Dll/Project/Packet.vcproj +@@ -44,7 +44,7 @@ + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include" +- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_AIRPCAP_API;HAVE_AIRPCAP_API;HAVE_WANPACKET_API;HAVE_IPHELPER_API" ++ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_IPHELPER_API" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" +@@ -64,7 +64,7 @@ + /> + + + + + + + + + + + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + nul copy + # PROP Intermediate_Dir "Debug_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -173,8 +173,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -208,8 +208,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -243,8 +243,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE_NO_AIRPCAP" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -278,8 +278,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Debug_REMOTE_NO_AIRPCAP" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +diff --git a/wpcap/Win32-Extensions/version.rc b/wpcap/Win32-Extensions/version.rc +index 056db10..fc9b0ee 100644 +--- a/wpcap/Win32-Extensions/version.rc ++++ b/wpcap/Win32-Extensions/version.rc +@@ -6,7 +6,7 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#include "winres.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +@@ -34,7 +34,7 @@ END + + 2 TEXTINCLUDE + BEGIN +- "#include ""afxres.h""\r\n" ++ "#include ""winres.h""\r\n" + "\0" + END + +diff --git a/wpcap/libpcap/Win32/Prj/libpcap.dsp b/wpcap/libpcap/Win32/Prj/libpcap.dsp +index aa0c6fc..51e9049 100644 +--- a/wpcap/libpcap/Win32/Prj/libpcap.dsp ++++ b/wpcap/libpcap/Win32/Prj/libpcap.dsp +@@ -43,7 +43,7 @@ RSC=rc.exe + # PROP Intermediate_Dir "Release" + # PROP Target_Dir "" + # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_TC_API" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /D "HAVE_TC_API" /YX /FD /c + # ADD BASE RSC /l 0x409 /d "NDEBUG" + # ADD RSC /l 0x409 /d "NDEBUG" + BSC32=bscmake.exe +@@ -66,7 +66,7 @@ LIB32=link.exe -lib + # PROP Intermediate_Dir "Debug" + # PROP Target_Dir "" + # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_TC_API" /YX /FD /GZ /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /D "HAVE_TC_API" /YX /FD /GZ /c + # ADD BASE RSC /l 0x409 /d "_DEBUG" + # ADD RSC /l 0x409 /d "_DEBUG" + BSC32=bscmake.exe +@@ -88,8 +88,8 @@ LIB32=link.exe -lib + # PROP Output_Dir "Debug_REMOTE" + # PROP Intermediate_Dir "Debug_REMOTE" + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_TC_API" /YX /FD /GZ /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /YX /FD /GZ /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_TC_API" /YX /FD /GZ /c + # ADD BASE RSC /l 0x409 /d "_DEBUG" + # ADD RSC /l 0x409 /d "_DEBUG" + BSC32=bscmake.exe +@@ -111,8 +111,8 @@ LIB32=link.exe -lib + # PROP Output_Dir "Release_REMOTE" + # PROP Intermediate_Dir "Release_REMOTE" + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_TC_API" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_TC_API" /YX /FD /c + # ADD BASE RSC /l 0x409 /d "NDEBUG" + # ADD RSC /l 0x409 /d "NDEBUG" + BSC32=bscmake.exe +diff --git a/wpcap/libpcap/rpcapd/version.rc b/wpcap/libpcap/rpcapd/version.rc +index 056db10..fc9b0ee 100644 +--- a/wpcap/libpcap/rpcapd/version.rc ++++ b/wpcap/libpcap/rpcapd/version.rc +@@ -6,7 +6,7 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#include "winres.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +@@ -34,7 +34,7 @@ END + + 2 TEXTINCLUDE + BEGIN +- "#include ""afxres.h""\r\n" ++ "#include ""winres.h""\r\n" + "\0" + END + -- cgit v1.2.3 From 98ee8a949ad4bfdfa9bf0411b552a23c923eaff7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 25 Aug 2017 16:03:57 -0700 Subject: [vcpkg] Trap Ctrl-C, enable thread safety for global data structures --- toolsrc/include/metrics.h | 30 +++++++++++++++++++----------- toolsrc/include/pch.h | 2 ++ toolsrc/include/vcpkg_GlobalState.h | 11 +++++++---- toolsrc/include/vcpkg_Util.h | 31 +++++++++++++++++++++++++++++++ toolsrc/src/VcpkgCmdArguments.cpp | 8 ++++---- toolsrc/src/VcpkgPaths.cpp | 9 ++++++--- toolsrc/src/commands_install.cpp | 3 ++- toolsrc/src/metrics.cpp | 20 +++++++++++--------- toolsrc/src/vcpkg.cpp | 32 ++++++++++++++++++++------------ toolsrc/src/vcpkg_Build.cpp | 13 ++++++++----- toolsrc/src/vcpkg_Checks.cpp | 14 ++++++++++---- toolsrc/src/vcpkg_GlobalState.cpp | 6 +++--- toolsrc/src/vcpkg_Input.cpp | 2 +- toolsrc/src/vcpkg_metrics_uploader.cpp | 3 ++- toolsrc/src/vcpkglib.cpp | 2 +- 15 files changed, 127 insertions(+), 59 deletions(-) diff --git a/toolsrc/include/metrics.h b/toolsrc/include/metrics.h index 1f5ae2f32..8eae426de 100644 --- a/toolsrc/include/metrics.h +++ b/toolsrc/include/metrics.h @@ -2,19 +2,27 @@ #include +#include "vcpkg_Util.h" + namespace vcpkg::Metrics { - void set_send_metrics(bool should_send_metrics); - void set_print_metrics(bool should_print_metrics); - void set_user_information(const std::string& user_id, const std::string& first_use_time); - void init_user_information(std::string& user_id, std::string& first_use_time); + struct Metrics : Util::ResourceBase + { + void set_send_metrics(bool should_send_metrics); + void set_print_metrics(bool should_print_metrics); + void set_user_information(const std::string& user_id, const std::string& first_use_time); + void init_user_information(std::string& user_id, std::string& first_use_time); - void track_metric(const std::string& name, double value); - void track_property(const std::string& name, const std::string& value); - void track_property(const std::string& name, const std::wstring& value); - bool get_compiled_metrics_enabled(); - std::wstring get_SQM_user(); + void track_metric(const std::string& name, double value); + void track_property(const std::string& name, const std::string& value); + void track_property(const std::string& name, const std::wstring& value); + + void upload(const std::string& payload); + void flush(); + }; - void upload(const std::string& payload); - void flush(); + extern Util::LockGuarded g_metrics; + + std::wstring get_SQM_user(); + bool get_compiled_metrics_enabled(); } diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index 406d0741e..770bcf07a 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -22,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/toolsrc/include/vcpkg_GlobalState.h b/toolsrc/include/vcpkg_GlobalState.h index 15b8867f7..8f47fa00f 100644 --- a/toolsrc/include/vcpkg_GlobalState.h +++ b/toolsrc/include/vcpkg_GlobalState.h @@ -1,13 +1,16 @@ #pragma once -#include +#include + +#include "vcpkg_Chrono.h" +#include "vcpkg_Util.h" namespace vcpkg { struct GlobalState { - static ElapsedTime timer; - static bool debugging; - static bool feature_packages; + static Util::LockGuarded timer; + static std::atomic debugging; + static std::atomic feature_packages; }; } \ No newline at end of file diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg_Util.h index cfbd23020..c76ca01ac 100644 --- a/toolsrc/include/vcpkg_Util.h +++ b/toolsrc/include/vcpkg_Util.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include @@ -95,4 +96,34 @@ namespace vcpkg::Util ResourceBase& operator=(const ResourceBase&) = delete; ResourceBase& operator=(ResourceBase&&) = delete; }; + + template + struct LockGuardPtr; + + template + struct LockGuarded + { + friend struct LockGuardPtr; + + LockGuardPtr lock() { return *this; } + + private: + std::mutex m_mutex; + T m_t; + }; + + template + struct LockGuardPtr + { + T& operator*() { return m_ptr; } + T* operator->() { return &m_ptr; } + + T* get() { return &m_ptr; } + + LockGuardPtr(LockGuarded& sync) : m_lock(sync.m_mutex), m_ptr(sync.m_t) {} + + private: + std::unique_lock m_lock; + T& m_ptr; + }; } \ No newline at end of file diff --git a/toolsrc/src/VcpkgCmdArguments.cpp b/toolsrc/src/VcpkgCmdArguments.cpp index a72e5226f..cf6c7b562 100644 --- a/toolsrc/src/VcpkgCmdArguments.cpp +++ b/toolsrc/src/VcpkgCmdArguments.cpp @@ -16,7 +16,7 @@ namespace vcpkg if (arg_begin == arg_end) { System::println(System::Color::error, "Error: expected value after %s", option_name); - Metrics::track_property("error", "error option name"); + Metrics::g_metrics.lock()->track_property("error", "error option name"); Commands::Help::print_usage(); Checks::exit_fail(VCPKG_LINE_INFO); } @@ -24,7 +24,7 @@ namespace vcpkg if (option_field != nullptr) { System::println(System::Color::error, "Error: %s specified multiple times", option_name); - Metrics::track_property("error", "error option specified multiple times"); + Metrics::g_metrics.lock()->track_property("error", "error option specified multiple times"); Commands::Help::print_usage(); Checks::exit_fail(VCPKG_LINE_INFO); } @@ -37,7 +37,7 @@ namespace vcpkg if (option_field && option_field != new_setting) { System::println(System::Color::error, "Error: conflicting values specified for --%s", option_name); - Metrics::track_property("error", "error conflicting switches"); + Metrics::g_metrics.lock()->track_property("error", "error conflicting switches"); Commands::Help::print_usage(); Checks::exit_fail(VCPKG_LINE_INFO); } @@ -71,7 +71,7 @@ namespace vcpkg if (arg[0] == '-' && arg[1] != '-') { - Metrics::track_property("error", "error short options are not supported"); + Metrics::g_metrics.lock()->track_property("error", "error short options are not supported"); Checks::exit_with_message(VCPKG_LINE_INFO, "Error: short options are not supported: %s", arg); } diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 4be636650..1b76fdc24 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -87,8 +87,11 @@ namespace vcpkg "(No sufficient installed version was found)", Strings::to_utf8(tool_name), version_as_string); - Metrics::track_property("error", "powershell install failed"); - Metrics::track_property("installcmd", install_cmd); + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_property("error", "powershell install failed"); + locked_metrics->track_property("installcmd", install_cmd); + } Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); } @@ -186,7 +189,7 @@ namespace vcpkg if (paths.root.empty()) { - Metrics::track_property("error", "Invalid vcpkg root directory"); + Metrics::g_metrics.lock()->track_property("error", "Invalid vcpkg root directory"); Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid vcpkg root directory: %s", paths.root.string()); } diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index 659418a38..a2e95eb48 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -514,7 +514,8 @@ namespace vcpkg::Commands::Install return "R$" + raction->spec.to_string(); Checks::unreachable(VCPKG_LINE_INFO); }); - Metrics::track_property("installplan", specs_string); + + Metrics::g_metrics.lock()->track_property("installplan", specs_string); print_plan(action_plan, is_recursive); diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/metrics.cpp index 7992f3e51..6263c0fcb 100644 --- a/toolsrc/src/metrics.cpp +++ b/toolsrc/src/metrics.cpp @@ -8,6 +8,8 @@ namespace vcpkg::Metrics { + Util::LockGuarded g_metrics; + static std::string get_current_date_time() { struct tm newtime; @@ -223,25 +225,25 @@ namespace vcpkg::Metrics return hkcu_sqmclient.value_or(L"{}"); } - void set_user_information(const std::string& user_id, const std::string& first_use_time) + void Metrics::set_user_information(const std::string& user_id, const std::string& first_use_time) { g_metricmessage.user_id = user_id; g_metricmessage.user_timestamp = first_use_time; } - void init_user_information(std::string& user_id, std::string& first_use_time) + void Metrics::init_user_information(std::string& user_id, std::string& first_use_time) { user_id = generate_random_UUID(); first_use_time = get_current_date_time(); } - void set_send_metrics(bool should_send_metrics) { g_should_send_metrics = should_send_metrics; } + void Metrics::set_send_metrics(bool should_send_metrics) { g_should_send_metrics = should_send_metrics; } - void set_print_metrics(bool should_print_metrics) { g_should_print_metrics = should_print_metrics; } + void Metrics::set_print_metrics(bool should_print_metrics) { g_should_print_metrics = should_print_metrics; } - void track_metric(const std::string& name, double value) { g_metricmessage.TrackMetric(name, value); } + void Metrics::track_metric(const std::string& name, double value) { g_metricmessage.TrackMetric(name, value); } - void track_property(const std::string& name, const std::wstring& value) + void Metrics::track_property(const std::string& name, const std::wstring& value) { // Note: this is not valid UTF-16 -> UTF-8, it just yields a close enough approximation for our purposes. std::string converted_value; @@ -252,12 +254,12 @@ namespace vcpkg::Metrics g_metricmessage.TrackProperty(name, converted_value); } - void track_property(const std::string& name, const std::string& value) + void Metrics::track_property(const std::string& name, const std::string& value) { g_metricmessage.TrackProperty(name, value); } - void upload(const std::string& payload) + void Metrics::upload(const std::string& payload) { HINTERNET hSession = nullptr, hConnect = nullptr, hRequest = nullptr; BOOL bResults = FALSE; @@ -349,7 +351,7 @@ namespace vcpkg::Metrics return fs::path(buf, buf + bytes); } - void flush() + void Metrics::flush() { std::string payload = g_metricmessage.format_event_data_template(); if (g_should_print_metrics) std::cerr << payload << "\n"; diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 7294d8692..9da501ec0 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -27,7 +27,7 @@ void invalid_command(const std::string& cmd) static void inner(const VcpkgCmdArguments& args) { - Metrics::track_property("command", args.command); + Metrics::g_metrics.lock()->track_property("command", args.command); if (args.command.empty()) { Commands::Help::print_usage(); @@ -135,7 +135,7 @@ static void loadConfig() auto user_time = keys["User-Since"]; if (!user_id.empty() && !user_time.empty()) { - Metrics::set_user_information(user_id, user_time); + Metrics::g_metrics.lock()->set_user_information(user_id, user_time); return; } } @@ -146,8 +146,11 @@ static void loadConfig() // config file not found, could not be read, or invalid std::string user_id, user_time; - Metrics::init_user_information(user_id, user_time); - Metrics::set_user_information(user_id, user_time); + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->init_user_information(user_id, user_time); + locked_metrics->set_user_information(user_id, user_time); + } try { std::error_code ec; @@ -189,23 +192,28 @@ int wmain(const int argc, const wchar_t* const* const argv) { if (argc == 0) std::abort(); - GlobalState::timer = ElapsedTime::create_started(); + *GlobalState::timer.lock() = ElapsedTime::create_started(); // Checks::register_console_ctrl_handler(); - Metrics::track_property("version", Commands::Version::version()); - const std::string trimmed_command_line = trim_path_from_command_line(Strings::to_utf8(GetCommandLineW())); - Metrics::track_property("cmdline", trimmed_command_line); + + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_property("version", Commands::Version::version()); + locked_metrics->track_property("cmdline", trimmed_command_line); + } loadConfig(); - Metrics::track_property("sqmuser", Metrics::get_SQM_user()); + Metrics::g_metrics.lock()->track_property("sqmuser", Metrics::get_SQM_user()); const VcpkgCmdArguments args = VcpkgCmdArguments::create_from_command_line(argc, argv); - if (auto p = args.printmetrics.get()) Metrics::set_print_metrics(*p); - if (auto p = args.sendmetrics.get()) Metrics::set_send_metrics(*p); + if (auto p = args.printmetrics.get()) Metrics::g_metrics.lock()->set_print_metrics(*p); + if (auto p = args.sendmetrics.get()) Metrics::g_metrics.lock()->set_send_metrics(*p); if (auto p = args.debug.get()) GlobalState::debugging = *p; + vcpkg::Checks::register_console_ctrl_handler(); + if (GlobalState::debugging) { inner(args); @@ -226,7 +234,7 @@ int wmain(const int argc, const wchar_t* const* const argv) { exc_msg = "unknown error(...)"; } - Metrics::track_property("error", exc_msg); + Metrics::g_metrics.lock()->track_property("error", exc_msg); fflush(stdout); System::print("vcpkg.exe has crashed.\n" diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index d4632afaa..89f95ee9b 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -193,13 +193,16 @@ namespace vcpkg::Build int return_code = System::cmd_execute_clean(command); auto buildtimeus = timer.microseconds(); const auto spec_string = spec.to_string(); - Metrics::track_metric("buildtimeus-" + spec_string, buildtimeus); - if (return_code != 0) { - Metrics::track_property("error", "build failed"); - Metrics::track_property("build_error", spec_string); - return {BuildResult::BUILD_FAILED, {}}; + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_metric("buildtimeus-" + spec_string, buildtimeus); + if (return_code != 0) + { + locked_metrics->track_property("error", "build failed"); + locked_metrics->track_property("build_error", spec_string); + return {BuildResult::BUILD_FAILED, {}}; + } } auto build_info = read_build_info(paths.get_filesystem(), paths.build_info_file_path(spec)); diff --git a/toolsrc/src/vcpkg_Checks.cpp b/toolsrc/src/vcpkg_Checks.cpp index 6ae595a54..d8d857daa 100644 --- a/toolsrc/src/vcpkg_Checks.cpp +++ b/toolsrc/src/vcpkg_Checks.cpp @@ -10,17 +10,23 @@ namespace vcpkg::Checks { [[noreturn]] static void cleanup_and_exit(const int exit_code) { - auto elapsed_us = GlobalState::timer.microseconds(); - Metrics::track_metric("elapsed_us", elapsed_us); + auto elapsed_us = GlobalState::timer.lock()->microseconds(); + + auto metrics = Metrics::g_metrics.lock(); + metrics->track_metric("elapsed_us", elapsed_us); GlobalState::debugging = false; - Metrics::flush(); + metrics->flush(); ::exit(exit_code); } static BOOL CtrlHandler(DWORD fdwCtrlType) { - Metrics::track_metric("SignalCaptured", fdwCtrlType); + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_property("CtrlHandler", std::to_string(fdwCtrlType)); + locked_metrics->track_property("error", "CtrlHandler was fired."); + } cleanup_and_exit(EXIT_FAILURE); } diff --git a/toolsrc/src/vcpkg_GlobalState.cpp b/toolsrc/src/vcpkg_GlobalState.cpp index cae2b2f8e..c194da466 100644 --- a/toolsrc/src/vcpkg_GlobalState.cpp +++ b/toolsrc/src/vcpkg_GlobalState.cpp @@ -4,7 +4,7 @@ namespace vcpkg { - ElapsedTime GlobalState::timer; - bool GlobalState::debugging = false; - bool GlobalState::feature_packages = false; + Util::LockGuarded GlobalState::timer; + std::atomic GlobalState::debugging = false; + std::atomic GlobalState::feature_packages = false; } diff --git a/toolsrc/src/vcpkg_Input.cpp b/toolsrc/src/vcpkg_Input.cpp index f4e9a07c2..153e6a942 100644 --- a/toolsrc/src/vcpkg_Input.cpp +++ b/toolsrc/src/vcpkg_Input.cpp @@ -29,7 +29,7 @@ namespace vcpkg::Input if (!paths.is_valid_triplet(t)) { System::println(System::Color::error, "Error: invalid triplet: %s", t); - Metrics::track_property("error", "invalid triplet: " + t.to_string()); + Metrics::g_metrics.lock()->track_property("error", "invalid triplet: " + t.to_string()); Commands::Help::help_topic_valid_triplet(paths); Checks::exit_fail(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg_metrics_uploader.cpp b/toolsrc/src/vcpkg_metrics_uploader.cpp index 38bf7ff9c..c6670c625 100644 --- a/toolsrc/src/vcpkg_metrics_uploader.cpp +++ b/toolsrc/src/vcpkg_metrics_uploader.cpp @@ -11,5 +11,6 @@ int WINAPI WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPSTR, _In_ int) LPWSTR* szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount); Checks::check_exit(VCPKG_LINE_INFO, argCount == 2, "Requires exactly one argument, the path to the payload file"); - Metrics::upload(Files::get_real_filesystem().read_contents(szArgList[1]).value_or_exit(VCPKG_LINE_INFO)); + auto v = Files::get_real_filesystem().read_contents(szArgList[1]).value_or_exit(VCPKG_LINE_INFO); + Metrics::g_metrics.lock()->upload(v); } diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp index b52f49d62..96e9f05e1 100644 --- a/toolsrc/src/vcpkglib.cpp +++ b/toolsrc/src/vcpkglib.cpp @@ -117,7 +117,7 @@ namespace vcpkg if (!was_tracked) { was_tracked = true; - Metrics::track_property("listfile", "update to new format"); + Metrics::g_metrics.lock()->track_property("listfile", "update to new format"); } // The files are sorted such that directories are placed just before the files they contain -- cgit v1.2.3 From af017922974c4612517fe9c512df7cdd1ac79b43 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Wed, 23 Aug 2017 00:48:39 +0300 Subject: [vcpkg] use UTF-8 for console input/output --- toolsrc/src/vcpkg.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 9da501ec0..fc9b1a016 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -18,6 +18,30 @@ using namespace vcpkg; +UINT console_cp_input; +UINT console_cp_output; + +void console_cp_set() +{ + console_cp_input = GetConsoleCP(); + console_cp_output = GetConsoleOutputCP(); + + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); +} + +void console_cp_reset() +{ + SetConsoleCP(console_cp_input); + SetConsoleOutputCP(console_cp_output); +} + +BOOL console_ctrl_handler(DWORD fdwCtrlType) +{ + console_cp_reset(); + return TRUE; +} + void invalid_command(const std::string& cmd) { System::println(System::Color::error, "invalid command: %s", cmd); @@ -192,6 +216,10 @@ int wmain(const int argc, const wchar_t* const* const argv) { if (argc == 0) std::abort(); + console_cp_set(); + SetConsoleCtrlHandler(PHANDLER_ROUTINE(console_ctrl_handler), TRUE); + atexit(console_cp_reset); + *GlobalState::timer.lock() = ElapsedTime::create_started(); // Checks::register_console_ctrl_handler(); -- cgit v1.2.3 From 67b9475ef29496508640f73410a10ecf737389eb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 25 Aug 2017 16:55:14 -0700 Subject: [vcpkg] Set codepage to 65001, duplicate of #1682, fixes #1660 #1631 #1644 --- toolsrc/include/vcpkg_GlobalState.h | 3 +++ toolsrc/src/vcpkg.cpp | 36 ++++++------------------------------ toolsrc/src/vcpkg_Checks.cpp | 3 +++ toolsrc/src/vcpkg_GlobalState.cpp | 3 +++ 4 files changed, 15 insertions(+), 30 deletions(-) diff --git a/toolsrc/include/vcpkg_GlobalState.h b/toolsrc/include/vcpkg_GlobalState.h index 8f47fa00f..6522a25bf 100644 --- a/toolsrc/include/vcpkg_GlobalState.h +++ b/toolsrc/include/vcpkg_GlobalState.h @@ -12,5 +12,8 @@ namespace vcpkg static Util::LockGuarded timer; static std::atomic debugging; static std::atomic feature_packages; + + static std::atomic g_init_console_cp; + static std::atomic g_init_console_output_cp; }; } \ No newline at end of file diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index fc9b1a016..f37d079a6 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -18,30 +18,6 @@ using namespace vcpkg; -UINT console_cp_input; -UINT console_cp_output; - -void console_cp_set() -{ - console_cp_input = GetConsoleCP(); - console_cp_output = GetConsoleOutputCP(); - - SetConsoleCP(CP_UTF8); - SetConsoleOutputCP(CP_UTF8); -} - -void console_cp_reset() -{ - SetConsoleCP(console_cp_input); - SetConsoleOutputCP(console_cp_output); -} - -BOOL console_ctrl_handler(DWORD fdwCtrlType) -{ - console_cp_reset(); - return TRUE; -} - void invalid_command(const std::string& cmd) { System::println(System::Color::error, "invalid command: %s", cmd); @@ -216,13 +192,13 @@ int wmain(const int argc, const wchar_t* const* const argv) { if (argc == 0) std::abort(); - console_cp_set(); - SetConsoleCtrlHandler(PHANDLER_ROUTINE(console_ctrl_handler), TRUE); - atexit(console_cp_reset); + GlobalState::g_init_console_cp = GetConsoleCP(); + GlobalState::g_init_console_output_cp = GetConsoleOutputCP(); - *GlobalState::timer.lock() = ElapsedTime::create_started(); + SetConsoleCP(65001); + SetConsoleOutputCP(65001); - // Checks::register_console_ctrl_handler(); + *GlobalState::timer.lock() = ElapsedTime::create_started(); const std::string trimmed_command_line = trim_path_from_command_line(Strings::to_utf8(GetCommandLineW())); @@ -240,7 +216,7 @@ int wmain(const int argc, const wchar_t* const* const argv) if (auto p = args.sendmetrics.get()) Metrics::g_metrics.lock()->set_send_metrics(*p); if (auto p = args.debug.get()) GlobalState::debugging = *p; - vcpkg::Checks::register_console_ctrl_handler(); + Checks::register_console_ctrl_handler(); if (GlobalState::debugging) { diff --git a/toolsrc/src/vcpkg_Checks.cpp b/toolsrc/src/vcpkg_Checks.cpp index d8d857daa..2ad2d06ab 100644 --- a/toolsrc/src/vcpkg_Checks.cpp +++ b/toolsrc/src/vcpkg_Checks.cpp @@ -17,6 +17,9 @@ namespace vcpkg::Checks GlobalState::debugging = false; metrics->flush(); + SetConsoleCP(GlobalState::g_init_console_cp); + SetConsoleOutputCP(GlobalState::g_init_console_output_cp); + ::exit(exit_code); } diff --git a/toolsrc/src/vcpkg_GlobalState.cpp b/toolsrc/src/vcpkg_GlobalState.cpp index c194da466..2221222c0 100644 --- a/toolsrc/src/vcpkg_GlobalState.cpp +++ b/toolsrc/src/vcpkg_GlobalState.cpp @@ -7,4 +7,7 @@ namespace vcpkg Util::LockGuarded GlobalState::timer; std::atomic GlobalState::debugging = false; std::atomic GlobalState::feature_packages = false; + + std::atomic GlobalState::g_init_console_cp = 0; + std::atomic GlobalState::g_init_console_output_cp = 0; } -- cgit v1.2.3 From 3f88832110a780de991752323cf39b8f68b34c39 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 25 Aug 2017 23:20:57 -0700 Subject: [vcpkg] Add commit date to vcpkg version --- scripts/bootstrap.ps1 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index b7bc5afab..569bdbbc7 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -6,15 +6,21 @@ param( $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root +Write-Verbose("vcpkg Path " + $vcpkgRootDir) + +$env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.1-32-bit\cmd" $gitHash = "unknownhash" if (Get-Command "git" -ErrorAction SilentlyContinue) { - $gitHash = git rev-parse HEAD + $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short + if ($LASTEXITCODE -ne 0) + { + $gitHash = "unknownhash" + } } -Write-Verbose("Git hash is " + $gitHash) +Write-Verbose("Git repo version string is " + $gitHash) $vcpkgSourcesPath = "$vcpkgRootDir\toolsrc" -Write-Verbose("vcpkg Path " + $vcpkgSourcesPath) if (!(Test-Path $vcpkgSourcesPath)) { -- cgit v1.2.3 From 7a2a237e13da457bc672e27c03c492e128bdd11d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 25 Aug 2017 23:25:41 -0700 Subject: [vcpkg] Don't leak changes to the path in bootstrap --- scripts/bootstrap.ps1 | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 569bdbbc7..2dd6813a4 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -8,17 +8,25 @@ $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root Write-Verbose("vcpkg Path " + $vcpkgRootDir) -$env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.1-32-bit\cmd" $gitHash = "unknownhash" -if (Get-Command "git" -ErrorAction SilentlyContinue) +$oldpath = $env:path +try { - $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short - if ($LASTEXITCODE -ne 0) + $env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.1-32-bit\cmd" + if (Get-Command "git" -ListImported -ErrorAction SilentlyContinue) { - $gitHash = "unknownhash" + $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short + if ($LASTEXITCODE -ne 0) + { + $gitHash = "unknownhash" + } } } +finally +{ + $env:path = $oldpath +} Write-Verbose("Git repo version string is " + $gitHash) $vcpkgSourcesPath = "$vcpkgRootDir\toolsrc" @@ -27,7 +35,8 @@ if (!(Test-Path $vcpkgSourcesPath)) New-Item -ItemType directory -Path $vcpkgSourcesPath -force | Out-Null } -try{ +try +{ pushd $vcpkgSourcesPath $msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $msbuildExe = $msbuildExeWithPlatformToolset[0] @@ -40,6 +49,7 @@ try{ Copy-Item $vcpkgSourcesPath\Release\vcpkg.exe $vcpkgRootDir\vcpkg.exe | Out-Null Copy-Item $vcpkgSourcesPath\Release\vcpkgmetricsuploader.exe $vcpkgRootDir\scripts\vcpkgmetricsuploader.exe | Out-Null } -finally{ +finally +{ popd } -- cgit v1.2.3 From 581aea74fb9737ee1efb0ae5d662ede8268b8e49 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 25 Aug 2017 23:34:44 -0700 Subject: [vcpkg] Use fgetws instead of fgets to accomodate non-ascii results --- toolsrc/src/vcpkg_System.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 2d6246d19..140f7d1b0 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -170,24 +170,24 @@ namespace vcpkg::System const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s 2>&1")###", cmd_line); Debug::println("_wpopen(%s)", Strings::to_utf8(actual_cmd_line)); - std::string output; - char buf[1024]; + std::wstring output; + wchar_t buf[1024]; auto pipe = _wpopen(actual_cmd_line.c_str(), L"r"); if (pipe == nullptr) { - return {1, output}; + return {1, Strings::to_utf8(output)}; } - while (fgets(buf, 1024, pipe)) + while (fgetws(buf, 1024, pipe)) { output.append(buf); } if (!feof(pipe)) { - return {1, output}; + return {1, Strings::to_utf8(output)}; } auto ec = _pclose(pipe); - Debug::println("_wpopen() returned %d", ec); - return {ec, output}; + Debug::println("_pclose() returned %d", ec); + return {ec, Strings::to_utf8(output)}; } std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args) -- cgit v1.2.3 From 70949b0d814c469d76b8ddecc514ae0af6686347 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 26 Aug 2017 00:19:51 -0700 Subject: [vcpkg] Use vcvars argument strings from detected toolset. Avoid c-string pointer comparison. --- toolsrc/include/VcpkgPaths.h | 5 ----- toolsrc/src/VcpkgPaths.cpp | 37 +++++++++++++++++-------------------- toolsrc/src/vcpkg_Build.cpp | 33 +++++++++------------------------ 3 files changed, 26 insertions(+), 49 deletions(-) diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h index 7964129e5..d55c95fe1 100644 --- a/toolsrc/include/VcpkgPaths.h +++ b/toolsrc/include/VcpkgPaths.h @@ -13,11 +13,6 @@ namespace vcpkg CWStringView name; System::CPUArchitecture host_arch; System::CPUArchitecture target_arch; - - bool operator==(const ToolsetArchOption& a) const - { - return (name == a.name && host_arch == a.host_arch && target_arch == a.target_arch); - } }; struct Toolset diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 642ca6a9c..7e3e5c736 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -302,25 +302,24 @@ namespace vcpkg paths_examined.push_back(vs2015_dumpbin_exe); const fs::path vs2015_bin_dir = vs2015_vcvarsall_bat.parent_path() / "bin"; - std::vector supported_archictectures; - if(fs.exists(vs2015_bin_dir / "vcvars32.bat")) - supported_archictectures.push_back({L"x86", CPU::X86, CPU::X86}); + std::vector supported_architectures; + if (fs.exists(vs2015_bin_dir / "vcvars32.bat")) + supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); if (fs.exists(vs2015_bin_dir / "amd64\\vcvars64.bat")) - supported_archictectures.push_back({L"x64", CPU::X64, CPU::X64}); - if (fs.exists(vs2015_bin_dir / "arm\\vcvarsarm.bat")) - supported_archictectures.push_back({L"arm", CPU::ARM, CPU::ARM}); + supported_architectures.push_back({L"x64", CPU::X64, CPU::X64}); if (fs.exists(vs2015_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) - supported_archictectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); + supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); if (fs.exists(vs2015_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) - supported_archictectures.push_back({L"x86_arm" , CPU::X86, CPU::ARM}); + supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); if (fs.exists(vs2015_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) - supported_archictectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); + supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); if (fs.exists(vs2015_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) - supported_archictectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); if (fs.exists(vs2015_dumpbin_exe)) { - found_toolsets.push_back({vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140", supported_archictectures }); + found_toolsets.push_back( + {vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140", supported_architectures}); } } } @@ -337,22 +336,20 @@ namespace vcpkg paths_examined.push_back(vcvarsall_bat); if (!fs.exists(vcvarsall_bat)) continue; - //Get all supported architecturs + // Get all supported architectures std::vector supported_architectures; if (fs.exists(vcvarsall_dir / "vcvars32.bat")) - supported_architectures.push_back({L"x86", CPU::X86,CPU::X86 }); + supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); if (fs.exists(vcvarsall_dir / "vcvars64.bat")) - supported_architectures.push_back({L"amd64", CPU::X64,CPU::X64 }); - if (fs.exists(vcvarsall_dir / "vcvarsarm.bat")) - supported_architectures.push_back({L"arm", CPU::ARM,CPU::ARM }); + supported_architectures.push_back({L"amd64", CPU::X64, CPU::X64}); if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) - supported_architectures.push_back({L"x86_amd64",CPU::X86,CPU::X64 }); + supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) - supported_architectures.push_back({L"x86_arm", CPU::X86,CPU::ARM }); + supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) - supported_architectures.push_back({L"amd64_x86", CPU::X64,CPU::X86 }); + supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) - supported_architectures.push_back({L"amd64_arm", CPU::X64,CPU::ARM }); + supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); // Locate the "best" MSVC toolchain version const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index b0053766e..2b6950bc0 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -38,33 +38,18 @@ namespace vcpkg::Build CWStringView to_vcvarsall_toolchain(const std::string& target_architecture, const Toolset& toolset) { - using CPU = System::CPUArchitecture; - - static constexpr ToolsetArchOption X86 = {L"x86", CPU::X86, CPU::X86}; - static constexpr ToolsetArchOption X86_X64 = {L"x86_x64", CPU::X86, CPU::X64}; - static constexpr ToolsetArchOption X86_ARM = {L"x86_arm", CPU::X86, CPU::ARM}; - static constexpr ToolsetArchOption X86_ARM64 = {L"x86_arm64", CPU::X86, CPU::ARM64}; - - static constexpr ToolsetArchOption X64 = {L"amd64", CPU::X64, CPU::X64}; - static constexpr ToolsetArchOption X64_X86 = {L"amd64_x86", CPU::X64, CPU::X86}; - static constexpr ToolsetArchOption X64_ARM = {L"amd64_arm", CPU::X64, CPU::ARM}; - static constexpr ToolsetArchOption X64_ARM64 = {L"amd64_arm64", CPU::X64, CPU::ARM64}; - - static constexpr std::array VALUES = { - X64, X64_X86, X64_ARM, X64_ARM64, X86, X86_X64, X86_ARM, X86_ARM64}; - - auto target_arch = System::to_cpu_architecture(target_architecture); + auto maybe_target_arch = System::to_cpu_architecture(target_architecture); + Checks::check_exit( + VCPKG_LINE_INFO, maybe_target_arch.has_value(), "Invalid architecture string: %s", target_architecture); + auto target_arch = maybe_target_arch.value_or_exit(VCPKG_LINE_INFO); auto host_architectures = System::get_supported_host_architectures(); - for (auto&& value : VALUES) + for (auto&& host : host_architectures) { - if (target_arch != value.target_arch || - std::find(host_architectures.begin(), host_architectures.end(), value.host_arch) == host_architectures.end() || - std::find(toolset.supported_architectures.begin(), toolset.supported_architectures.end(), value) == toolset.supported_architectures.end() - ) - continue; - - return value.name; + auto it = Util::find_if(toolset.supported_architectures, [&](const ToolsetArchOption& opt) { + return host == opt.host_arch && target_arch == opt.target_arch; + }); + if (it != toolset.supported_architectures.end()) return it->name; } Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported toolchain combination %s", target_architecture); -- cgit v1.2.3 From 44c9b076f9fa2ce87a4f15e204ecae5e2321d101 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 26 Aug 2017 13:22:53 +0100 Subject: [speexdsp] Add port for speexdsp 1.2rc3 --- ports/speexdsp/CMakeLists.txt | 31 +++++++++++++++++++++++++++++++ ports/speexdsp/CONTROL | 4 ++++ ports/speexdsp/portfile.cmake | 24 ++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 ports/speexdsp/CMakeLists.txt create mode 100644 ports/speexdsp/CONTROL create mode 100644 ports/speexdsp/portfile.cmake diff --git a/ports/speexdsp/CMakeLists.txt b/ports/speexdsp/CMakeLists.txt new file mode 100644 index 000000000..76a3a9118 --- /dev/null +++ b/ports/speexdsp/CMakeLists.txt @@ -0,0 +1,31 @@ +# CMAKE project for libspeexdsp +cmake_minimum_required(VERSION 3.1) +option(SOURCE_PATH "Root directory.") +project (libspeexdsp) + +file(GLOB_RECURSE LIBSPEEXDSP_SOURCES "${SOURCE_PATH}/libspeexdsp/*.c") +list(REMOVE_ITEM LIBSPEEXDSP_SOURCES "${SOURCE_PATH}/libspeexdsp/testdenoise.c" + "${SOURCE_PATH}/libspeexdsp/testecho.c" + "${SOURCE_PATH}/libspeexdsp/testjitter.c" + "${SOURCE_PATH}/libspeexdsp/testresample.c") +file(GLOB_RECURSE LIBSPEEXDSP_HEADERS "${SOURCE_PATH}/libspeexdsp/*.h") +file(GLOB_RECURSE LIBSPEEXDSP_HEADERS_PUBLIC "${SOURCE_PATH}/include/**/*.h") + +if (BUILD_SHARED_LIBS) + add_definitions(-D_WINDOWS -D_USRDLL) + list(APPEND LIBSPEEXDSP_SOURCES "${SOURCE_PATH}/win32/libspeexdsp.def") +else () + add_definitions(-D_LIB) +endif () + +add_definitions(-D_USE_SSE -DHAVE_CONFIG_H -D_WIN32) +include_directories("${SOURCE_PATH}/include" + "${SOURCE_PATH}/win32") +add_library(libspeexdsp ${LIBSPEEXDSP_SOURCES} ${LIBSPEEXDSP_HEADERS}) + +set_target_properties(libspeexdsp PROPERTIES PUBLIC_HEADER "${LIBSPEEXDSP_HEADERS_PUBLIC}") + +install(TARGETS libspeexdsp + ARCHIVE DESTINATION "lib" + RUNTIME DESTINATION "bin" + PUBLIC_HEADER DESTINATION "include/speex") diff --git a/ports/speexdsp/CONTROL b/ports/speexdsp/CONTROL new file mode 100644 index 000000000..71144ecdd --- /dev/null +++ b/ports/speexdsp/CONTROL @@ -0,0 +1,4 @@ +Source: speexdsp +Version: 1.2rc3-1 +Description: A patent-free, Open Source/Free Software DSP library. +Build-Depends: diff --git a/ports/speexdsp/portfile.cmake b/ports/speexdsp/portfile.cmake new file mode 100644 index 000000000..7784b7313 --- /dev/null +++ b/ports/speexdsp/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/speexdsp-1.2rc3) +set(CMAKE_PATH ${CMAKE_CURRENT_LIST_DIR}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://downloads.xiph.org/releases/speex/speexdsp-1.2rc3.tar.gz" + FILENAME "speexdsp-1.2rc3.tar.xz" + SHA512 29dfa8345df025eeb076561648a9b5c0485692be699b6da3c2a3734b4329187a1c2eb181252f4df12b21f1309ecdf59797437dfb123d160fd723491ab216e858 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${CMAKE_PATH} + OPTIONS -DSOURCE_PATH=${SOURCE_PATH} +) + +vcpkg_install_cmake() + +# Remove debug include +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Copy copright information +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/speexdsp" RENAME "copyright") + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 330b29732c8b178639f78c6fad10b9ec84f7669b Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 26 Aug 2017 12:17:39 -0700 Subject: [vcpkg] free memory CommandLineToArgvW --- toolsrc/src/vcpkg_metrics_uploader.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toolsrc/src/vcpkg_metrics_uploader.cpp b/toolsrc/src/vcpkg_metrics_uploader.cpp index c6670c625..cef4f4756 100644 --- a/toolsrc/src/vcpkg_metrics_uploader.cpp +++ b/toolsrc/src/vcpkg_metrics_uploader.cpp @@ -13,4 +13,6 @@ int WINAPI WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPSTR, _In_ int) Checks::check_exit(VCPKG_LINE_INFO, argCount == 2, "Requires exactly one argument, the path to the payload file"); auto v = Files::get_real_filesystem().read_contents(szArgList[1]).value_or_exit(VCPKG_LINE_INFO); Metrics::g_metrics.lock()->upload(v); + LocalFree(szArgList); + return 0; } -- cgit v1.2.3 From d7d571cb3edd3d8d86110e480c515aa912727452 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 27 Aug 2017 04:17:41 +0300 Subject: [libccd/ccd] rename from libccd to ccd, refactor * use vcpkg_from_github * enable cmake-exports * rename from libccd to ccd (cmake-exports expects ccd as package name) * export additional symbols (fixes FCL) --- ports/ccd/0001_fix_symbols_export.patch | 39 +++++++++++++++++++++++++++++++ ports/ccd/CONTROL | 3 +++ ports/ccd/portfile.cmake | 30 ++++++++++++++++++++++++ ports/libccd/CONTROL | 3 --- ports/libccd/portfile.cmake | 41 --------------------------------- 5 files changed, 72 insertions(+), 44 deletions(-) create mode 100644 ports/ccd/0001_fix_symbols_export.patch create mode 100644 ports/ccd/CONTROL create mode 100644 ports/ccd/portfile.cmake delete mode 100644 ports/libccd/CONTROL delete mode 100644 ports/libccd/portfile.cmake diff --git a/ports/ccd/0001_fix_symbols_export.patch b/ports/ccd/0001_fix_symbols_export.patch new file mode 100644 index 000000000..f9c47d79b --- /dev/null +++ b/ports/ccd/0001_fix_symbols_export.patch @@ -0,0 +1,39 @@ +From 05b5718a364ac525c8766387bd74faf852f98589 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Sun, 27 Aug 2017 03:39:53 +0300 +Subject: [PATCH] win32: export additional symbols, fixes FCL build on MSVC + +--- + src/ccd/vec3.h | 2 +- + src/support.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/ccd/vec3.h b/src/ccd/vec3.h +index b0c1b33..014531c 100644 +--- a/src/ccd/vec3.h ++++ b/src/ccd/vec3.h +@@ -93,7 +93,7 @@ typedef struct _ccd_vec3_t ccd_vec3_t; + /** + * Holds origin (0,0,0) - this variable is meant to be read-only! + */ +-extern ccd_vec3_t *ccd_vec3_origin; ++extern _ccd_export ccd_vec3_t *ccd_vec3_origin; + + /** + * Array of points uniformly distributed on unit sphere. +diff --git a/src/support.h b/src/support.h +index 3372f5e..2e75df7 100644 +--- a/src/support.h ++++ b/src/support.h +@@ -37,7 +37,7 @@ _ccd_inline void ccdSupportCopy(ccd_support_t *, const ccd_support_t *s); + * Computes support point of obj1 and obj2 in direction dir. + * Support point is returned via supp. + */ +-void __ccdSupport(const void *obj1, const void *obj2, ++_ccd_export void __ccdSupport(const void *obj1, const void *obj2, + const ccd_vec3_t *dir, const ccd_t *ccd, + ccd_support_t *supp); + +-- +2.12.2.windows.2 + diff --git a/ports/ccd/CONTROL b/ports/ccd/CONTROL new file mode 100644 index 000000000..16f16ea0b --- /dev/null +++ b/ports/ccd/CONTROL @@ -0,0 +1,3 @@ +Source: ccd +Version: 2.0.0-1 +Description: Library for collision detection between two convex shapes diff --git a/ports/ccd/portfile.cmake b/ports/ccd/portfile.cmake new file mode 100644 index 000000000..0ce278220 --- /dev/null +++ b/ports/ccd/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO danfis/libccd + REF 64f02f741ac94fccd0fb660a5bffcbe6d01d9939 + SHA512 901b09d57e119e4661b3556bbefe5a4d58cb843bff5c76ee3952fe379ff183c878a04e86e6192006c11012309c6e93d42319e9d606abdf7ad723f6d8afeea47f + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001_fix_symbols_export.patch) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/ccd") + +file(INSTALL ${SOURCE_PATH}/BSD-LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccd RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) diff --git a/ports/libccd/CONTROL b/ports/libccd/CONTROL deleted file mode 100644 index 3a3a0252d..000000000 --- a/ports/libccd/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libccd -Version: 2.0.0 -Description: Library for collision detection between two convex shapes diff --git a/ports/libccd/portfile.cmake b/ports/libccd/portfile.cmake deleted file mode 100644 index 963000ec5..000000000 --- a/ports/libccd/portfile.cmake +++ /dev/null @@ -1,41 +0,0 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libccd-16b9379fb6e8610566fe5e1396166daf7106f165) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/danfis/libccd/archive/16b9379fb6e8610566fe5e1396166daf7106f165.zip" - FILENAME "libccd-16b9379fb6e8610566fe5e1396166daf7106f165.zip" - SHA512 6cb3ea713f1b1ac1bf48c9ee7e14cb85b3ec5c822ce239330913edc00cb84c846b49ec090cbfa226ef8de70bac97199eb2bf4c651225e3cfc6f6a9dd441aa7db -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 -) - -vcpkg_install_cmake() - -# Avoid a copy of file in debug -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/BSD-LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libccd RENAME copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) - -# Miscellaneous cleanup -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/ccd) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/ccd) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) - -vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 36d359679a6df150b3ed595da6c085732fff515d Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 27 Aug 2017 04:18:26 +0300 Subject: [FCL] add version 0.5.0 --- ports/fcl/0001_fix_package_detection.patch | 81 ++++++++++++++++++++++++++++++ ports/fcl/CONTROL | 4 ++ ports/fcl/portfile.cmake | 42 ++++++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 ports/fcl/0001_fix_package_detection.patch create mode 100644 ports/fcl/CONTROL create mode 100644 ports/fcl/portfile.cmake diff --git a/ports/fcl/0001_fix_package_detection.patch b/ports/fcl/0001_fix_package_detection.patch new file mode 100644 index 000000000..9ae1b60e5 --- /dev/null +++ b/ports/fcl/0001_fix_package_detection.patch @@ -0,0 +1,81 @@ +From c43e3771cc2ec314191e5d4a5b485aab258c1b18 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Sun, 27 Aug 2017 04:12:36 +0300 +Subject: [PATCH] use cmake-exports for package detection + +--- + CMakeLists.txt | 48 +++--------------------------------------------- + 1 file changed, 3 insertions(+), 45 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5a4a559..8978b61 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -65,32 +65,11 @@ if(FCL_COVERALLS) + endif() + + # Find Octomap (optional) +-find_package(PkgConfig QUIET) +- + option(FCL_WITH_OCTOMAP "octomap library support" ON) + set(FCL_HAVE_OCTOMAP 0) + if(FCL_WITH_OCTOMAP) +- if(PKG_CONFIG_FOUND) +- pkg_check_modules(OCTOMAP QUIET octomap) +- endif() +- if(NOT OCTOMAP_FOUND) +- # if pkgconfig is not installed, then fall back on more fragile detection +- # of octomap +- find_path(OCTOMAP_INCLUDE_DIRS octomap.h +- PATH_SUFFIXES octomap) +- find_library(OCTOMAP_LIBRARY_DIRS +- ${CMAKE_SHARED_LIBRARY_PREFIX}octomap${CMAKE_SHARED_LIBRARY_SUFFIX}) +- if(OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS) +- set(OCTOMAP_LIBRARIES "octomap;octomath") +- endif() +- endif() +- if (OCTOMAP_FOUND OR (OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS)) +- string(REPLACE "." ";" VERSION_LIST ${OCTOMAP_VERSION}) +- list(GET VERSION_LIST 0 OCTOMAP_MAJOR_VERSION) +- list(GET VERSION_LIST 1 OCTOMAP_MINOR_VERSION) +- list(GET VERSION_LIST 2 OCTOMAP_PATCH_VERSION) +- include_directories(${OCTOMAP_INCLUDE_DIRS}) +- link_directories(${OCTOMAP_LIBRARY_DIRS}) ++ find_package(OCTOMAP REQUIRED) ++ if (OCTOMAP_FOUND) + set(FCL_HAVE_OCTOMAP 1) + message(STATUS "FCL uses Octomap") + else() +@@ -116,28 +95,7 @@ endif() + include_directories(BEFORE "include") + include_directories("${CMAKE_CURRENT_BINARY_DIR}/include") + +-if(PKG_CONFIG_FOUND) +- pkg_check_modules(CCD ccd) +- # check to see if the pkg is installed under the libccd name +- if(NOT CCD_FOUND) +- pkg_check_modules(CCD libccd) +- endif() +-endif() +- +-if(NOT CCD_FOUND) +- # if pkgconfig is not installed, then fall back on more fragile detection +- # of ccd +- find_path(CCD_INCLUDE_DIRS ccd/ccd.h) +- find_library(CCD_LIBRARY +- ${CMAKE_SHARED_LIBRARY_PREFIX}ccd${CMAKE_SHARED_LIBRARY_SUFFIX}) +- if(CCD_INCLUDE_DIRS AND CCD_LIBRARY) +- set(CCD_LIBRARIES "${CCD_LIBRARY}") +- else() +- message(FATAL_ERROR "Libccd is required by FCL") +- endif() +-endif() +-include_directories(${CCD_INCLUDE_DIRS}) +-link_directories(${CCD_LIBRARY_DIRS}) ++find_package(CCD REQUIRED) + + add_subdirectory(include/fcl) + add_subdirectory(src) +-- +2.12.2.windows.2 + diff --git a/ports/fcl/CONTROL b/ports/fcl/CONTROL new file mode 100644 index 000000000..c83593cb3 --- /dev/null +++ b/ports/fcl/CONTROL @@ -0,0 +1,4 @@ +Source: fcl +Version: 0.5.0-1 +Description: a library for performing three types of proximity queries on a pair of geometric models composed of triangles +Build-Depends: boost, ccd, octomap \ No newline at end of file diff --git a/ports/fcl/portfile.cmake b/ports/fcl/portfile.cmake new file mode 100644 index 000000000..e0cee7e02 --- /dev/null +++ b/ports/fcl/portfile.cmake @@ -0,0 +1,42 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO flexible-collision-library/fcl + REF 54e9619bc2b084ee50e986ac3308160d663481c4 + SHA512 11bfa3fdeeda6766769a34d2248ca32b6b13ecb32b412c068aa1c7aa3495d55b3f7a82a93621965904f9813c3fd0f128a84f796ae5731d2ff15b85935a0e1261 + HEAD_REF fcl-0.5 +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001_fix_package_detection.patch) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(FCL_STATIC_LIBRARY ON) +else() + set(FCL_STATIC_LIBRARY OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFCL_STATIC_LIBRARY=${FCL_STATIC_LIBRARY} + -DFCL_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake/") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fcl RENAME copyright) -- cgit v1.2.3 From a1b92053f12c583260966a8e66e9552eb12a16ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sat, 26 Aug 2017 18:00:47 +0200 Subject: Update Catch to 1.10.0 --- ports/catch/CONTROL | 2 +- ports/catch/portfile.cmake | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ports/catch/CONTROL b/ports/catch/CONTROL index 3e1e1ebaf..af18c49de 100644 --- a/ports/catch/CONTROL +++ b/ports/catch/CONTROL @@ -1,3 +1,3 @@ Source: catch -Version: 1.9.7 +Version: 1.10.0 Description: C++ Automated Test Cases in Headers diff --git a/ports/catch/portfile.cmake b/ports/catch/portfile.cmake index 10360187b..2c45604ce 100644 --- a/ports/catch/portfile.cmake +++ b/ports/catch/portfile.cmake @@ -1,16 +1,17 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v1.9.7) +set(CATCH_VERSION v1.10.0) + vcpkg_download_distfile(HEADER URLS "https://github.com/philsquared/Catch/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-${CATCH_VERSION}.hpp" - SHA512 c61fc39d9388a45d9c601c05dafeeba0e7887476b3b28e30a6ab47cb00e062be626c12d9712caa49e0cbfa3fd7517874137a24e8c293d6dd23353ea87f9fbf5c + SHA512 275ab5b5d778cc8a91b5f3e8f241a37b680c81d1b8945ff64ad16a9708c98e6535b389746bf8cacbed07f874629f456b56bafbf1879c5a6f84fa87675c1361b6 ) vcpkg_download_distfile(LICENSE URLS "https://raw.githubusercontent.com/philsquared/Catch/${CATCH_VERSION}/LICENSE.txt" FILENAME "catch-LICENSE-${CATCH_VERSION}.txt" - SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 + SHA512 f1a8d21ccbb6436d289ecfae65b9019278e40552a2383aaf6c1dfed98affe6e7bbf364d67597a131642b62446a0c40495e66a7efca7e6dff72727c6fd3776407 ) file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME catch.hpp) -- cgit v1.2.3 From 079ef9785ad539e1484f876577913a7269021288 Mon Sep 17 00:00:00 2001 From: Tobias Date: Sun, 27 Aug 2017 12:21:33 +0200 Subject: Updated libsigcpp to version 2.99.9 --- ports/libsigcpp/CMakeLists.txt | 19 +++++++++++++------ ports/libsigcpp/CONTROL | 2 +- ports/libsigcpp/portfile.cmake | 8 ++++---- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/ports/libsigcpp/CMakeLists.txt b/ports/libsigcpp/CMakeLists.txt index 7a669a24e..30c3c610e 100644 --- a/ports/libsigcpp/CMakeLists.txt +++ b/ports/libsigcpp/CMakeLists.txt @@ -5,14 +5,14 @@ set(SIGCPP_API_VERSION 2.0) add_definitions(-DSIGC_BUILD) -include_directories(./MSVC_Net2013) # config file for windows is there +include_directories(./MSVC_Net2017) # config file for windows is there include_directories(.) + set(SICGPP_SOURCES sigc++/connection.cc sigc++/signal_base.cc sigc++/trackable.cc - sigc++/adaptors/lambda/lambda.cc sigc++/functors/slot_base.cc) add_library(sigc ${SICGPP_SOURCES}) @@ -20,12 +20,13 @@ set_target_properties(sigc PROPERTIES OUTPUT_NAME sigc-${SIGCPP_API_VERSION}) install(TARGETS sigc RUNTIME DESTINATION bin ARCHIVE DESTINATION lib) if(NOT SIGCPP_SKIP_HEADERS) - install(FILES MSVC_Net2013/sigc++config.h DESTINATION include) + install(FILES MSVC_Net2017/sigc++config.h DESTINATION include) install(FILES sigc++/sigc++.h DESTINATION include/sigc++) install(FILES sigc++/bind.h DESTINATION include/sigc++) install(FILES sigc++/bind_return.h DESTINATION include/sigc++) install(FILES sigc++/connection.h DESTINATION include/sigc++) install(FILES sigc++/limit_reference.h DESTINATION include/sigc++) + install(FILES sigc++/member_method_trait.h DESTINATION include/sigc++) install(FILES sigc++/reference_wrapper.h DESTINATION include/sigc++) install(FILES sigc++/retype_return.h DESTINATION include/sigc++) install(FILES sigc++/signal.h DESTINATION include/sigc++) @@ -34,24 +35,30 @@ if(NOT SIGCPP_SKIP_HEADERS) install(FILES sigc++/trackable.h DESTINATION include/sigc++) install(FILES sigc++/type_traits.h DESTINATION include/sigc++) install(FILES sigc++/visit_each.h DESTINATION include/sigc++) + install(FILES sigc++/weak_raw_ptr.h DESTINATION include/sigc++) install(FILES sigc++/adaptors/adaptors.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/adaptor_base.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/adaptor_trait.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/adapts.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/bind.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/bind_return.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/bound_argument.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/compose.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/deduce_result_type.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/exception_catch.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/hide.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/retype.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/retype_return.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/track_obj.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/lambda/base.h DESTINATION include/sigc++/adaptors/lambda) - install(FILES sigc++/adaptors/lambda/select.h DESTINATION include/sigc++/adaptors/lambda) + install(FILES sigc++/adaptors/tuple_visitor_visit_each.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/functors/functors.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/functor_trait.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/mem_fun.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/ptr_fun.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/slot.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/slot_base.h DESTINATION include/sigc++/functors) + install(FILES sigc++/tuple-utils/tuple_cdr.h DESTINATION include/sigc++/tuple-utils) + install(FILES sigc++/tuple-utils/tuple_end.h DESTINATION include/sigc++/tuple-utils) + install(FILES sigc++/tuple-utils/tuple_for_each.h DESTINATION include/sigc++/tuple-utils) + install(FILES sigc++/tuple-utils/tuple_start.h DESTINATION include/sigc++/tuple-utils) + install(FILES sigc++/tuple-utils/tuple_transform_each.h DESTINATION include/sigc++/tuple-utils) endif() diff --git a/ports/libsigcpp/CONTROL b/ports/libsigcpp/CONTROL index 02b2e4b83..da2338200 100644 --- a/ports/libsigcpp/CONTROL +++ b/ports/libsigcpp/CONTROL @@ -1,3 +1,3 @@ Source: libsigcpp -Version: 2.10 +Version: 2.99 Description: Typesafe callback framework for C++ diff --git a/ports/libsigcpp/portfile.cmake b/ports/libsigcpp/portfile.cmake index c98a26717..7525c1aae 100644 --- a/ports/libsigcpp/portfile.cmake +++ b/ports/libsigcpp/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsigc++-2.10.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsigc++-2.99.9) vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.10/libsigc++-2.10.0.tar.xz" - FILENAME "libsigc++-2.10.0.tar.xz" - SHA512 5b96df21d6bd6ba41520c7219e77695a86aabc60b7259262c7a9f4b8475ce0e2fd8dc37bcf7c17e24e818ff28c262d682b964c83e215b51bdbe000f3f58794ae) + URLS "http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.99/libsigc++-2.99.9.tar.xz" + FILENAME "libsigc++-2.99.9.tar.xz" + SHA512 3e8f8176a4618938a16b2367466415aff8ec10d83ef84de8973373a63fc0b9708d14115ad5c039c81b570385b205944651849a68e618c37c171cd748dd5b2403) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 3d42bc2be896ec04ddc35ca509967f22cb730f3d Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 27 Aug 2017 14:11:21 +0200 Subject: [libpng] update to 1.6.32 --- ports/libpng/CONTROL | 2 +- ports/libpng/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index c9b3dc2d2..3238eec3b 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.31 +Version: 1.6.32 Build-Depends: zlib 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 baa39a903..e012bb6dc 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(LIBPNG_VERSION 1.6.31) +set(LIBPNG_VERSION 1.6.32) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-${LIBPNG_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://downloads.sourceforge.net/project/libpng/libpng16/${LIBPNG_VERSION}/libpng-${LIBPNG_VERSION}.tar.xz" FILENAME "libpng-${LIBPNG_VERSION}.tar.xz" - SHA512 714da63e19d32eadeeb44edf7f2afeaf6ac59f2756e0951015313a98c0f3c1216296886301c5704958b56f4c96b00725791ba2efe9f26b4a92cd743410cc36a9 + SHA512 24cf4d38dc08d1db7721fc580d8bf6cee9a105afcea32f1245b7bb3727c8a8645ad733a24534782ef5dfb0d4315a5fd6b0eee9e7f0704e0c635350f80c19a708 ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( -- cgit v1.2.3 From 8b7298982a9d850fe8f45f820f2b3cba78af46f6 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 27 Aug 2017 14:20:14 +0200 Subject: [snappy] update to 1.1.7 --- ports/snappy/CONTROL | 2 +- ports/snappy/portfile.cmake | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/ports/snappy/CONTROL b/ports/snappy/CONTROL index 984b00882..287c9235e 100644 --- a/ports/snappy/CONTROL +++ b/ports/snappy/CONTROL @@ -1,3 +1,3 @@ Source: snappy -Version: 1.1.6-be6dc3d +Version: 1.1.7 Description: A fast compressor/decompressor. diff --git a/ports/snappy/portfile.cmake b/ports/snappy/portfile.cmake index 7e78a7f1b..f0169c8f2 100644 --- a/ports/snappy/portfile.cmake +++ b/ports/snappy/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/snappy - REF be6dc3db83c4701e3e79694dcbfd1c3da03b91dd - SHA512 1e01a925a2c0bab8b9a329d005384e4b620df118317fd8408ea6afdb22278a2710d26b8d51e2ef762798c757a9e01b47db55280ebb84ca290fb88ae5b18d63e3 + REF 1.1.7 + SHA512 32046f532606ba545a4e4825c0c66a19be449f2ca2ff760a6fa170a3603731479a7deadb683546e5f8b5033414c50f4a9a29f6d23b7a41f047e566e69eca7caf HEAD_REF master ) @@ -16,18 +16,6 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Snappy) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - foreach(CONF debug release) - file(READ ${CURRENT_PACKAGES_DIR}/share/snappy/SnappyTargets-${CONF}.cmake CONFIG_FILE) - string(REPLACE "lib/snappy.dll" "bin/snappy.dll" CONFIG_FILE "${CONFIG_FILE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/snappy/SnappyTargets-${CONF}.cmake "${CONFIG_FILE}") - endforeach() - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/snappy.dll ${CURRENT_PACKAGES_DIR}/bin/snappy.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/snappy.dll ${CURRENT_PACKAGES_DIR}/debug/bin/snappy.dll) -endif() - vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 19916e5ce1c0c7a048f1bca0b2cce3e0edb8af4b Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 27 Aug 2017 15:13:37 +0200 Subject: [curl] update to 7.55.1 --- 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 320d82afb..d7da6511c 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,4 +1,4 @@ Source: curl -Version: 7.55.0 +Version: 7.55.1 Build-Depends: zlib, openssl, libssh2 Description: A library for transferring data with URLs diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index c00f813b2..c770d3f25 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO curl/curl - REF curl-7_55_0 - SHA512 7b49e7761f5864589c6cd6eb14d8e6908797c986d8bc46a3d8dc32b7bcd12d5af464259cf3f9975a4792c8e2a504f04dd071d266d2340082a31f7ee508e17d08 + REF curl-7_55_1 + SHA512 b5c6dd6cca8d07c08d1760feff9822f1264359adde068afd1584fc3fdcfa50c68e0e1b5ecaa277298ad0923b61019943c181ee1f0870c312399038c4c4e0e327 HEAD_REF master ) -- cgit v1.2.3 From c2efba65164fc29df4e9ad63e22f3ff29599cab0 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sun, 27 Aug 2017 15:24:51 +0200 Subject: [jsoncpp] update to 1.8.1 --- ports/jsoncpp/CONTROL | 2 +- ports/jsoncpp/portfile.cmake | 30 +++++++++++------------------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/ports/jsoncpp/CONTROL b/ports/jsoncpp/CONTROL index d4ac63bd3..19f3e054a 100644 --- a/ports/jsoncpp/CONTROL +++ b/ports/jsoncpp/CONTROL @@ -1,3 +1,3 @@ Source: jsoncpp -Version: 1.7.7 +Version: 1.8.1 Description: jsoncpp is an implementation of a JSON reader and writer in C++. JSON (JavaScript Object Notation) is a lightweight data-interchange format that it is easy to parse and redeable for human. diff --git a/ports/jsoncpp/portfile.cmake b/ports/jsoncpp/portfile.cmake index f4b89adca..4f460fda7 100644 --- a/ports/jsoncpp/portfile.cmake +++ b/ports/jsoncpp/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/jsoncpp-1.7.7) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.zip" - FILENAME "jsoncpp-1.7.7.zip" - SHA512 3801faab0b1982bc41dac3049e0f7d24ea3dc759b77afc1ca7365b95a36460f87a74a0f5c6efd4c4a315ea2ca904b38f454b0a70133cda339c4a01ae8049cecb +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO open-source-parsers/jsoncpp + REF 1.8.1 + SHA512 4203826fca4c366b51d28ffc928399c914ffaba8be1cada64ff118b5742e6b469d3fc3e59344587d851447857b479794c5697d4fd11a9a55b32a3a7a801b745b + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(JSONCPP_STATIC OFF) @@ -17,29 +17,21 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DJSONCPP_WITH_CMAKE_PACKAGE:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=${JSONCPP_STATIC} -DBUILD_SHARED_LIBS:BOOL=${JSONCPP_DYNAMIC} + -DJSONCPP_WITH_PKGCONFIG_SUPPORT:BOOL=OFF + -DJSONCPP_WITH_TESTS:BOOL=OFF ) vcpkg_install_cmake() # Fix CMake files -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/jsoncpp ${CURRENT_PACKAGES_DIR}/share/jsoncpp) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(READ ${CURRENT_PACKAGES_DIR}/share/jsoncpp/jsoncppConfig.cmake _contents) -string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\n\n" "\n" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/jsoncpp/jsoncppConfig.cmake ${_contents}) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/jsoncpp) -file(READ ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/jsoncpp/jsoncppConfig-debug.cmake _contents) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/jsoncpp/jsoncppConfig-debug.cmake "${_contents}") - -# Remove useless files in debug +# Remove includes in debug file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jsoncpp) -- cgit v1.2.3 From 1006849f344a16e7948ecbcf78385d9d841db522 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 27 Aug 2017 08:30:37 -0700 Subject: [ctemplate] fixes google/glog#236 OlafvdSpek/ctemplate#127 #1514 --- ports/ctemplate/CMakeLists.txt | 2 +- ports/ctemplate/CONTROL | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/ctemplate/CMakeLists.txt b/ports/ctemplate/CMakeLists.txt index c7cc211f4..63e6fc6b3 100644 --- a/ports/ctemplate/CMakeLists.txt +++ b/ports/ctemplate/CMakeLists.txt @@ -92,5 +92,5 @@ install( ) if(NOT DISABLE_INSTALL_HEADERS) - install(DIRECTORY "${COMMON_INCLUDES}/" DESTINATION include FILES_MATCHING PATTERN "*.h") + install(DIRECTORY "${COMMON_INCLUDES}/ctemplate" DESTINATION include FILES_MATCHING PATTERN "*.h") endif() diff --git a/ports/ctemplate/CONTROL b/ports/ctemplate/CONTROL index eb78d4c0f..5e9e69753 100644 --- a/ports/ctemplate/CONTROL +++ b/ports/ctemplate/CONTROL @@ -1,3 +1,3 @@ Source: ctemplate -Version: 2017-06-23-44b7c5b918a08ad561c63e9d28beecb40c10ebca +Version: 2017-06-23-44b7c5-2 Description: C++ CTemplate system -- cgit v1.2.3 From 6c995f7396979168a6869ce024c1498344f9eb1f Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Mon, 28 Aug 2017 01:03:32 +0900 Subject: Add support to change linkage of CRT and library Add support to change linkage of CRT and library. --- ports/winpcap/packetNtx.patch | 563 ------------------------------ ports/winpcap/packetNtx.patch.in | 725 +++++++++++++++++++++++++++++++++++++++ ports/winpcap/portfile.cmake | 67 ++-- ports/winpcap/wpcap.patch | 180 ---------- ports/winpcap/wpcap.patch.in | 414 ++++++++++++++++++++++ 5 files changed, 1181 insertions(+), 768 deletions(-) delete mode 100644 ports/winpcap/packetNtx.patch create mode 100644 ports/winpcap/packetNtx.patch.in delete mode 100644 ports/winpcap/wpcap.patch create mode 100644 ports/winpcap/wpcap.patch.in diff --git a/ports/winpcap/packetNtx.patch b/ports/winpcap/packetNtx.patch deleted file mode 100644 index 5da9c6c16..000000000 --- a/ports/winpcap/packetNtx.patch +++ /dev/null @@ -1,563 +0,0 @@ -diff --git a/packetNtx/Dll/Project/Packet.dsp b/packetNtx/Dll/Project/Packet.dsp -index 6e69440..d7bcfe7 100644 ---- a/packetNtx/Dll/Project/Packet.dsp -+++ b/packetNtx/Dll/Project/Packet.dsp -@@ -55,8 +55,8 @@ RSC=rc.exe - # PROP Intermediate_Dir "Release" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c --# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_WANPACKET_API" /YX /FD /c -+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c - # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 - # ADD BASE RSC /l 0x410 /d "NDEBUG" -@@ -87,8 +87,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "Debug" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c --# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_WANPACKET_API" /YX /FD /c -+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c - # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 - # ADD BASE RSC /l 0x410 /d "_DEBUG" -@@ -120,8 +120,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "NT4_Debug" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /YX /FD /c --# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c -+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /YX /FD /c -+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c - # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "_DEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32 - # ADD BASE RSC /l 0x410 /d "_DEBUG" -@@ -154,8 +154,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "NT4_Release" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c --# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c -+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c -+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c - # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "NDEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32 - # ADD BASE RSC /l 0x410 /d "NDEBUG" -@@ -187,8 +187,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "Debug_LOG_TO_FILE" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c --# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /FR /YX /FD /c -+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c -+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c - # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 - # ADD BASE RSC /l 0x410 /d "_DEBUG" -@@ -221,8 +221,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "Release_LOG_TO_FILE" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c --# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /FR /YX /FD /c -+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c -+# ADD CPP /nologo /MD /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c - # SUBTRACT CPP /u - # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -@@ -255,8 +255,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "NT4_Debug_LOG_TO_FILE" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c --# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c -+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c -+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c - # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "_DEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32 - # ADD BASE RSC /l 0x410 /d "_DEBUG" -@@ -289,8 +289,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "NT4_Release_LOG_TO_FILE" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c --# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c -+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c -+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c - # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "NDEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32 - # ADD BASE RSC /l 0x410 /d "NDEBUG" -@@ -323,8 +323,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "Debug_No_AirPcap" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "WIN32" /D "_WINDOWS" /D "HAVE_AIRPCAP_API" /YX /FD /c --# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /YX /FD /c -+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "WIN32" /D "_WINDOWS" /YX /FD /c -+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c - # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 - # ADD BASE RSC /l 0x410 /d "_DEBUG" -@@ -357,8 +357,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "Release_No_AirPcap" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_AIRPCAP_API" /YX /FD /c --# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /YX /FD /c -+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c -+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c - # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 - # ADD BASE RSC /l 0x410 /d "NDEBUG" -@@ -390,8 +390,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "Debug_No_NpfIm" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /D "_DBG" /YX /FD /c --# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c -+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /D "_DBG" /YX /FD /c -+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c - # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 - # ADD BASE RSC /l 0x410 /d "_DEBUG" -@@ -424,8 +424,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "Release_No_NpfIm" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c --# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c -+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c -+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c - # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 - # ADD BASE RSC /l 0x410 /d "NDEBUG" -@@ -457,8 +457,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "Debug_Vista" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c --# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c -+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c -+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c - # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 - # ADD BASE RSC /l 0x410 /d "_DEBUG" -@@ -491,8 +491,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "Release_Vista" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c --# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c -+# ADD BASE CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c -+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c - # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 - # ADD BASE RSC /l 0x410 /d "NDEBUG" -@@ -525,9 +525,9 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . - # PROP Intermediate_Dir "Release_Vista_LOG_TO_FILE" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MT /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /FR /YX /FD /c -+# ADD BASE CPP /nologo /MD /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /FR /YX /FD /c - # SUBTRACT BASE CPP /u --# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c -+# ADD CPP /nologo /MD /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c - # SUBTRACT CPP /u - # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 - # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -diff --git a/packetNtx/Dll/Project/Packet.vcproj b/packetNtx/Dll/Project/Packet.vcproj -index 8be719e..dcb3701 100644 ---- a/packetNtx/Dll/Project/Packet.vcproj -+++ b/packetNtx/Dll/Project/Packet.vcproj -@@ -44,7 +44,7 @@ - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include" -- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_AIRPCAP_API;HAVE_AIRPCAP_API;HAVE_WANPACKET_API;HAVE_IPHELPER_API" -+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_IPHELPER_API" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="1" -@@ -64,7 +64,7 @@ - /> - - - - - - - - - - - - - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - + + + + +@@ -201,7 +201,7 @@ + + +@@ -280,7 +280,7 @@ + + + + + +@@ -573,7 +573,7 @@ + Name="Release NT4|x64" + OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64" + IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64" +- ConfigurationType="2" ++ ConfigurationType="@LIBRARY_LINKAGE@" + CharacterSet="1" + WholeProgramOptimization="1" + > +@@ -614,7 +614,7 @@ + /> + + + +@@ -833,7 +833,7 @@ + +@@ -913,7 +913,7 @@ + + +@@ -992,7 +992,7 @@ + + +@@ -1071,7 +1071,7 @@ + + +@@ -1149,7 +1149,7 @@ + +@@ -1229,7 +1229,7 @@ + + +@@ -1365,7 +1365,7 @@ + Name="Release NT4 LOG_TO_FILE|x64" + OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64" + IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64" +- ConfigurationType="2" ++ ConfigurationType="@LIBRARY_LINKAGE@" + CharacterSet="1" + WholeProgramOptimization="1" + > +@@ -1406,7 +1406,7 @@ + /> + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + nul copy - # PROP Intermediate_Dir "Debug_REMOTE_DAG" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c --# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c -+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c -+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c - # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 - # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 - # ADD BASE RSC /l 0x410 /d "_DEBUG" -@@ -173,8 +173,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy - # PROP Intermediate_Dir "Release_REMOTE" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c --# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c -+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c -+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c - # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 - # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 - # ADD BASE RSC /l 0x410 /d "NDEBUG" -@@ -208,8 +208,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy - # PROP Intermediate_Dir "Release_REMOTE_DAG" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c --# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c -+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c -+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c - # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 - # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 - # ADD BASE RSC /l 0x410 /d "NDEBUG" -@@ -243,8 +243,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy - # PROP Intermediate_Dir "Release_REMOTE_NO_AIRPCAP" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c --# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c -+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c -+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c - # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 - # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 - # ADD BASE RSC /l 0x410 /d "NDEBUG" -@@ -278,8 +278,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy - # PROP Intermediate_Dir "Debug_REMOTE_NO_AIRPCAP" - # PROP Ignore_Export_Lib 0 - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c --# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c -+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c -+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c - # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 - # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 - # ADD BASE RSC /l 0x410 /d "_DEBUG" -diff --git a/wpcap/Win32-Extensions/version.rc b/wpcap/Win32-Extensions/version.rc -index 056db10..fc9b0ee 100644 ---- a/wpcap/Win32-Extensions/version.rc -+++ b/wpcap/Win32-Extensions/version.rc -@@ -6,7 +6,7 @@ - // - // Generated from the TEXTINCLUDE 2 resource. - // --#include "afxres.h" -+#include "winres.h" - - ///////////////////////////////////////////////////////////////////////////// - #undef APSTUDIO_READONLY_SYMBOLS -@@ -34,7 +34,7 @@ END - - 2 TEXTINCLUDE - BEGIN -- "#include ""afxres.h""\r\n" -+ "#include ""winres.h""\r\n" - "\0" - END - -diff --git a/wpcap/libpcap/Win32/Prj/libpcap.dsp b/wpcap/libpcap/Win32/Prj/libpcap.dsp -index aa0c6fc..51e9049 100644 ---- a/wpcap/libpcap/Win32/Prj/libpcap.dsp -+++ b/wpcap/libpcap/Win32/Prj/libpcap.dsp -@@ -43,7 +43,7 @@ RSC=rc.exe - # PROP Intermediate_Dir "Release" - # PROP Target_Dir "" - # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c --# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_TC_API" /YX /FD /c -+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /D "HAVE_TC_API" /YX /FD /c - # ADD BASE RSC /l 0x409 /d "NDEBUG" - # ADD RSC /l 0x409 /d "NDEBUG" - BSC32=bscmake.exe -@@ -66,7 +66,7 @@ LIB32=link.exe -lib - # PROP Intermediate_Dir "Debug" - # PROP Target_Dir "" - # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c --# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_TC_API" /YX /FD /GZ /c -+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /D "HAVE_TC_API" /YX /FD /GZ /c - # ADD BASE RSC /l 0x409 /d "_DEBUG" - # ADD RSC /l 0x409 /d "_DEBUG" - BSC32=bscmake.exe -@@ -88,8 +88,8 @@ LIB32=link.exe -lib - # PROP Output_Dir "Debug_REMOTE" - # PROP Intermediate_Dir "Debug_REMOTE" - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /YX /FD /GZ /c --# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_TC_API" /YX /FD /GZ /c -+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /YX /FD /GZ /c -+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_TC_API" /YX /FD /GZ /c - # ADD BASE RSC /l 0x409 /d "_DEBUG" - # ADD RSC /l 0x409 /d "_DEBUG" - BSC32=bscmake.exe -@@ -111,8 +111,8 @@ LIB32=link.exe -lib - # PROP Output_Dir "Release_REMOTE" - # PROP Intermediate_Dir "Release_REMOTE" - # PROP Target_Dir "" --# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /YX /FD /c --# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_TC_API" /YX /FD /c -+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /YX /FD /c -+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_TC_API" /YX /FD /c - # ADD BASE RSC /l 0x409 /d "NDEBUG" - # ADD RSC /l 0x409 /d "NDEBUG" - BSC32=bscmake.exe -diff --git a/wpcap/libpcap/rpcapd/version.rc b/wpcap/libpcap/rpcapd/version.rc -index 056db10..fc9b0ee 100644 ---- a/wpcap/libpcap/rpcapd/version.rc -+++ b/wpcap/libpcap/rpcapd/version.rc -@@ -6,7 +6,7 @@ - // - // Generated from the TEXTINCLUDE 2 resource. - // --#include "afxres.h" -+#include "winres.h" - - ///////////////////////////////////////////////////////////////////////////// - #undef APSTUDIO_READONLY_SYMBOLS -@@ -34,7 +34,7 @@ END - - 2 TEXTINCLUDE - BEGIN -- "#include ""afxres.h""\r\n" -+ "#include ""winres.h""\r\n" - "\0" - END - diff --git a/ports/winpcap/wpcap.patch.in b/ports/winpcap/wpcap.patch.in new file mode 100644 index 000000000..01c8a38c8 --- /dev/null +++ b/ports/winpcap/wpcap.patch.in @@ -0,0 +1,414 @@ +diff --git a/wpcap/PRJ/wpcap.dsp b/wpcap/PRJ/wpcap.dsp +index e53a865..0e4ed19 100644 +--- a/wpcap/PRJ/wpcap.dsp ++++ b/wpcap/PRJ/wpcap.dsp +@@ -48,8 +48,8 @@ RSC=rc.exe + # PROP Intermediate_Dir "Release" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -75,8 +75,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Debug" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /GZ /c ++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -103,8 +103,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Debug_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -138,8 +138,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Debug_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -173,8 +173,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -208,8 +208,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -243,8 +243,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE_NO_AIRPCAP" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -278,8 +278,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Debug_REMOTE_NO_AIRPCAP" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +diff --git a/wpcap/PRJ/wpcap.vcproj b/wpcap/PRJ/wpcap.vcproj +index c1d56b4..40a8ce1 100644 +--- a/wpcap/PRJ/wpcap.vcproj ++++ b/wpcap/PRJ/wpcap.vcproj +@@ -22,7 +22,7 @@ + Name="Debug|Win32" + OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86" + IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86" +- ConfigurationType="2" ++ ConfigurationType="@LIBRARY_LINKAGE@" + CharacterSet="2" + > + + +@@ -205,7 +205,7 @@ + +@@ -285,7 +285,7 @@ + + + +@@ -525,7 +525,7 @@ + +@@ -605,7 +605,7 @@ + + + #if !defined(HAVE_SNPRINTF) +-#define snprintf pcap_snprintf +-extern int snprintf (char *, size_t, const char *, ...); ++#define snprintf _snprintf ++//#define snprintf pcap_snprintf ++//extern int snprintf (char *, size_t, const char *, ...); + #endif + + #if !defined(HAVE_VSNPRINTF) +diff --git a/wpcap/libpcap/rpcapd/rpcapd.dsp b/wpcap/libpcap/rpcapd/rpcapd.dsp +index f7c00af..1cd823e 100644 +--- a/wpcap/libpcap/rpcapd/rpcapd.dsp ++++ b/wpcap/libpcap/rpcapd/rpcapd.dsp +@@ -44,8 +44,8 @@ RSC=rc.exe + # PROP Intermediate_Dir "Debug_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c + # ADD BASE RSC /l 0x409 /d "_DEBUG" + # ADD RSC /l 0x409 /d "_DEBUG" + BSC32=bscmake.exe +@@ -69,8 +69,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Debug_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /FR /YX /FD /GZ /c + # ADD BASE RSC /l 0x409 /d "_DEBUG" + # ADD RSC /l 0x409 /d "_DEBUG" + BSC32=bscmake.exe +@@ -94,8 +94,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Release_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c ++# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c + # ADD BASE RSC /l 0x409 /d "NDEBUG" + # ADD RSC /l 0x409 /d "NDEBUG" + BSC32=bscmake.exe +@@ -120,8 +120,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Release_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /YX /FD /c ++# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /YX /FD /c + # ADD BASE RSC /l 0x409 /d "NDEBUG" + # ADD RSC /l 0x409 /d "NDEBUG" + BSC32=bscmake.exe +diff --git a/wpcap/libpcap/rpcapd/rpcapd.vcproj b/wpcap/libpcap/rpcapd/rpcapd.vcproj +index 882fbac..b89f1f9 100644 +--- a/wpcap/libpcap/rpcapd/rpcapd.vcproj ++++ b/wpcap/libpcap/rpcapd/rpcapd.vcproj +@@ -41,7 +41,7 @@ + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\;..\Win32\include;..\..\..\Common;.\Win32-pthreads;..\..\Win32-Extensions" +- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;WPCAP;_CRT_SECURE_NO_DEPRECATE;HAVE_TC_API" ++ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_VSNPRINTF;HAVE_REMOTE;WPCAP;_CRT_SECURE_NO_DEPRECATE;HAVE_TC_API" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" +@@ -119,7 +119,7 @@ + Date: Mon, 28 Aug 2017 05:00:10 +0200 Subject: Updated ecm to version 5.37.0 --- ports/ecm/CONTROL | 2 +- ports/ecm/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/ecm/CONTROL b/ports/ecm/CONTROL index e696bd7b9..e124c960e 100644 --- a/ports/ecm/CONTROL +++ b/ports/ecm/CONTROL @@ -1,3 +1,3 @@ Source: ecm -Version: 5.32.0 +Version: 5.37.0 Description: Extra CMake Modules (ECM), extra modules and scripts for CMake diff --git a/ports/ecm/portfile.cmake b/ports/ecm/portfile.cmake index 9fa648a1c..0e016418c 100644 --- a/ports/ecm/portfile.cmake +++ b/ports/ecm/portfile.cmake @@ -1,10 +1,10 @@ #cmake-only scripts include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/extra-cmake-modules-5.32.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/extra-cmake-modules-5.37.0) vcpkg_download_distfile(ARCHIVE - URLS "https://download.kde.org/stable/frameworks/5.32/extra-cmake-modules-5.32.0.zip" - FILENAME "extra-cmake-modules-5.32.0.zip" - SHA512 f966820e88fdbcdea7f20ff6b76ab8a6d2f7eaf78950bc690243b7201b9f646d92c83a998c19feab3bfe2ed528ec96ad1fa36e6ae320419d226cddd28cd433e5 + URLS "https://download.kde.org/stable/frameworks/5.37/extra-cmake-modules-5.37.0.zip" + FILENAME "extra-cmake-modules-5.37.0.zip" + SHA512 a9cd585fb5c63452fc45c955df62b6e7aca3d19e47ca2db33216f83951645f393271f37a04630e5c7f01899063562548c2b0dfe79d7afa8661bb0a8bca5ccfbf ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 7e521b080245dc8d1f5938d3cbf9f07455d2a915 Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Mon, 28 Aug 2017 05:22:40 +0200 Subject: [KF5] Initial port of KPlotting --- ports/kf5plotting/CONTROL | 4 ++++ ports/kf5plotting/portfile.cmake | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 ports/kf5plotting/CONTROL create mode 100644 ports/kf5plotting/portfile.cmake diff --git a/ports/kf5plotting/CONTROL b/ports/kf5plotting/CONTROL new file mode 100644 index 000000000..a24b8e352 --- /dev/null +++ b/ports/kf5plotting/CONTROL @@ -0,0 +1,4 @@ +Source: kf5plotting +Version: 5.37.0 +Description: Lightweight plotting framework +Build-Depends: ecm, qt5 diff --git a/ports/kf5plotting/portfile.cmake b/ports/kf5plotting/portfile.cmake new file mode 100644 index 000000000..39d6e8893 --- /dev/null +++ b/ports/kf5plotting/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/kplotting-5.37.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://download.kde.org/stable/frameworks/5.37/kplotting-5.37.0.zip" + FILENAME "kplotting-5.37.0.zip" + SHA512 3a1b3f993123dea7141d280cd53ae1b5e49b859e9df39a188bac216758576106efd8b744e8f10f96fac158f980d79ae94d2b27f3d85a48fcd5673263ffce3c4e +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Plotting) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/KF5plotting RENAME copyright) -- cgit v1.2.3 From 5e720f4dee4d629497e3ee7729c9fb73eb24e939 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 27 Aug 2017 21:24:37 -0700 Subject: [catch] Fix hash --- ports/catch/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/catch/portfile.cmake b/ports/catch/portfile.cmake index 2c45604ce..d78260cb8 100644 --- a/ports/catch/portfile.cmake +++ b/ports/catch/portfile.cmake @@ -11,7 +11,7 @@ vcpkg_download_distfile(HEADER vcpkg_download_distfile(LICENSE URLS "https://raw.githubusercontent.com/philsquared/Catch/${CATCH_VERSION}/LICENSE.txt" FILENAME "catch-LICENSE-${CATCH_VERSION}.txt" - SHA512 f1a8d21ccbb6436d289ecfae65b9019278e40552a2383aaf6c1dfed98affe6e7bbf364d67597a131642b62446a0c40495e66a7efca7e6dff72727c6fd3776407 + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 ) file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME catch.hpp) -- cgit v1.2.3 From 8a79566c645e4b2862d7b094d2e2c4a1fd889b7f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 27 Aug 2017 22:03:18 -0700 Subject: Update CHANGELOG and bump version to v0.0.85 --- CHANGELOG.md | 33 +++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c625786b..f591f4bae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,36 @@ +vcpkg (0.0.85) +-------------- + * Add ports: + - ccfits 2.5 + - highfive 1.3 + - lzfse 1.0 + - pangolin 0.5 + - rhash 1.3.5 + - speexdsp 1.2rc3-1 + - unrar 5.5.8 + * Update ports: + - assimp 4.0.0 -> 4.0.0-1 + - catch 1.9.7 -> 1.10.0 + - ctemplate 2017-06-23-44b7c5b918a08ad561c63e9d28beecb40c10ebca -> 2017-06-23-44b7c5-2 + - curl 7.55.0 -> 7.55.1 + - ecm 5.32.0 -> 5.37.0 + - expat 2.1.1-1 -> 2.2.4-1 + - ffmpeg 3.2.4-3 -> 3.3.3 + - gl2ps OpenGL to PostScript Printing Library -> 1.4.0 + - jsoncpp 1.7.7 -> 1.8.1 + - libp7-baical 4.1 -> 4.4-1 + - libpng 1.6.31 -> 1.6.32 + - libraw 0.18.2-2 -> 0.18.2-3 + - libsigcpp 2.10 -> 2.99 + - snappy 1.1.6-be6dc3d -> 1.1.7 + * `vcpkg edit`: Add new option `--builtrees`; opens editor in buildtrees directory for examining build issues + * Improve Windows SDK support (contract version detection) + * Improve handling for non-ascii environments + * Fixes and improvements in the `vcpkg` tool itself + +-- vcpkg team SUN, 27 Aug 2017 22:00:00 -0800 + + vcpkg (0.0.84) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index fef58cb81..d27b8ca83 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.84" \ No newline at end of file +"0.0.85" \ No newline at end of file -- cgit v1.2.3 From d7a313c5c356e1641f18cd14ad0ac0c3901bc0bf Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Mon, 28 Aug 2017 10:48:30 +0200 Subject: [vtk] improve portfile: - Use system libharu - Simplyfy enabling/disabling optional modules of VTK - Add options to build VTK python modules or all VTK modules --- ports/vtk/CONTROL | 4 +- ports/vtk/FindGDAL.cmake | 127 ++++++++++++++++++++++++++++++ ports/vtk/fix-find-libharu.patch | 18 +++++ ports/vtk/fix-find-mysql.patch | 10 +++ ports/vtk/fix-find-odbc.patch | 11 +++ ports/vtk/portfile.cmake | 162 ++++++++++++++++++++++++++++++++++----- 6 files changed, 310 insertions(+), 22 deletions(-) create mode 100644 ports/vtk/FindGDAL.cmake create mode 100644 ports/vtk/fix-find-libharu.patch create mode 100644 ports/vtk/fix-find-mysql.patch create mode 100644 ports/vtk/fix-find-odbc.patch diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 652c27700..13fb6fd7d 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,4 @@ Source: vtk -Version: 8.0.0-1 +Version: 8.0.0-2 Description: Software system for 3D computer graphics, image processing, and visualization -Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj, lz4, libtheora +Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj, lz4, libtheora, libharu diff --git a/ports/vtk/FindGDAL.cmake b/ports/vtk/FindGDAL.cmake new file mode 100644 index 000000000..e4f2f303b --- /dev/null +++ b/ports/vtk/FindGDAL.cmake @@ -0,0 +1,127 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#.rst: +# FindGDAL +# -------- +# +# +# +# Locate gdal +# +# This module accepts the following environment variables: +# +# :: +# +# GDAL_DIR or GDAL_ROOT - Specify the location of GDAL +# +# +# +# This module defines the following CMake variables: +# +# :: +# +# GDAL_FOUND - True if libgdal is found +# GDAL_LIBRARY - A variable pointing to the GDAL library +# GDAL_INCLUDE_DIR - Where to find the headers + +# +# $GDALDIR is an environment variable that would +# correspond to the ./configure --prefix=$GDAL_DIR +# used in building gdal. +# +# Created by Eric Wing. I'm not a gdal user, but OpenSceneGraph uses it +# for osgTerrain so I whipped this module together for completeness. +# I actually don't know the conventions or where files are typically +# placed in distros. +# Any real gdal users are encouraged to correct this (but please don't +# break the OS X framework stuff when doing so which is what usually seems +# to happen). + +# This makes the presumption that you are include gdal.h like +# +#include "gdal.h" + +find_path(GDAL_INCLUDE_DIR gdal.h + HINTS + ENV GDAL_DIR + ENV GDAL_ROOT + PATH_SUFFIXES + include/gdal + include/GDAL + include + PATHS + ~/Library/Frameworks/gdal.framework/Headers + /Library/Frameworks/gdal.framework/Headers + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt +) + +if(UNIX) + # Use gdal-config to obtain the library version (this should hopefully + # allow us to -lgdal1.x.y where x.y are correct version) + # For some reason, libgdal development packages do not contain + # libgdal.so... + find_program(GDAL_CONFIG gdal-config + HINTS + ENV GDAL_DIR + ENV GDAL_ROOT + PATH_SUFFIXES bin + PATHS + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + ) + + if(GDAL_CONFIG) + exec_program(${GDAL_CONFIG} ARGS --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS) + if(GDAL_CONFIG_LIBS) + string(REGEX MATCHALL "-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_LIBS}) + string(REPLACE "-l" "" _gdal_lib "${_gdal_dashl}") + string(REGEX MATCHALL "-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_LIBS}) + string(REPLACE "-L" "" _gdal_libpath "${_gdal_dashL}") + endif() + endif() +endif() + +find_library(GDAL_LIBRARY_RELEASE + NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL + HINTS + ENV GDAL_DIR + ENV GDAL_ROOT + ${_gdal_libpath} + PATH_SUFFIXES lib + PATHS + /sw + /opt/local + /opt/csw + /opt + /usr/freeware +) + +find_library(GDAL_LIBRARY_DEBUG + NAMES ${_gdal_lib} gdald gdald_i gdald1.5.0 gdald1.4.0 gdald1.3.2 GDALD + HINTS + ENV GDAL_DIR + ENV GDAL_ROOT + ${_gdal_libpath} + PATH_SUFFIXES lib + PATHS + /sw + /opt/local + /opt/csw + /opt + /usr/freeware +) + +include(SelectLibraryConfigurations) +select_library_configurations(GDAL) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL DEFAULT_MSG GDAL_LIBRARY GDAL_INCLUDE_DIR) + +set(GDAL_LIBRARIES ${GDAL_LIBRARY}) +set(GDAL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR}) diff --git a/ports/vtk/fix-find-libharu.patch b/ports/vtk/fix-find-libharu.patch new file mode 100644 index 000000000..683f7bae6 --- /dev/null +++ b/ports/vtk/fix-find-libharu.patch @@ -0,0 +1,18 @@ +--- a/CMake/FindLibHaru.cmake Mon Jun 26 15:29:04 2017 ++++ b/CMake/FindLibHaru.cmake Wed Aug 16 09:30:12 2017 +@@ -19,9 +19,13 @@ + + find_path(LIBHARU_INCLUDE_DIR hpdf.h) + +-find_library(LIBHARU_LIBRARY NAMES hpdf) ++find_library(LIBHARU_LIBRARY_RELEASE NAMES hpdf libhpdf) ++find_library(LIBHARU_LIBRARY_DEBUG NAMES hpdfd libhpdfd) + +-# handle the QUIETLY and REQUIRED arguments and set FONTCONFIG_FOUND to TRUE if ++include(SelectLibraryConfigurations) ++select_library_configurations(LIBHARU) ++ ++# handle the QUIETLY and REQUIRED arguments and set LIBHARU_FOUND to TRUE if + # all listed variables are TRUE + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(LibHaru DEFAULT_MSG diff --git a/ports/vtk/fix-find-mysql.patch b/ports/vtk/fix-find-mysql.patch new file mode 100644 index 000000000..d2f984cd5 --- /dev/null +++ b/ports/vtk/fix-find-mysql.patch @@ -0,0 +1,10 @@ +--- a/CMake/FindMySQL.cmake Mon Jun 26 15:29:04 2017 ++++ b/CMake/FindMySQL.cmake Wed Aug 16 11:21:58 2017 +@@ -28,6 +28,7 @@ + "C:/MySQL/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/include" ++ PATH_SUFFIXES mysql + DOC "Specify the directory containing mysql.h." + ) + diff --git a/ports/vtk/fix-find-odbc.patch b/ports/vtk/fix-find-odbc.patch new file mode 100644 index 000000000..0690ed0a9 --- /dev/null +++ b/ports/vtk/fix-find-odbc.patch @@ -0,0 +1,11 @@ +--- a/CMake/FindODBC.cmake Mon Jun 26 15:29:04 2017 ++++ b/CMake/FindODBC.cmake Wed Aug 16 12:58:11 2017 +@@ -30,7 +30,7 @@ + ) + + FIND_LIBRARY( ODBC_LIBRARY +- NAMES odbc iodbc unixodbc ++ NAMES odbc iodbc unixodbc odbc32 + PATHS + /usr/lib + /usr/lib/odbc diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index ff9d457f1..c5ea4c387 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -1,13 +1,26 @@ include(vcpkg_common_functions) +set(VTK_SHORT_VERSION "8.0") +set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0") + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "Kitware/VTK" - REF "v8.0.0" + REF "v${VTK_LONG_VERSION}" SHA512 1a328f24df0b1c40c623ae80c9d49f8b27570144b10af02aeed41b90b50b8d4e0dd83d1341961f6818cde36e2cd793c578ebc95a46950cebfc518f486f249791 HEAD_REF "master" ) +# ============================================================================= +# Options: These should be set by feature-packages when they become available +set(VTK_WITH_QT ON ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file +set(VTK_WITH_MPI ON ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file +set(VTK_WITH_PYTHON OFF) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file +set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5`, `mpi`, `python3`, `ffmpeg`, `gdal`, `fontconfig`, + # `libmysql` and `atlmfc` are listed as dependency in the CONTROL file + +# ============================================================================= +# Apply patches to the source code vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES @@ -28,33 +41,78 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch ${CMAKE_CURRENT_LIST_DIR}/fix-find-libproj4.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-find-libharu.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-find-mysql.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-find-odbc.patch ) -# Remove the FindGLEW.cmake that is distributed with VTK, since it does not -# detect the debug libraries correctly. -# The default file distributed with CMake should be superior by all means. +# Remove the FindGLEW.cmake and FindPythonLibs.cmake that are distributed with VTK, +# since they do not detect the debug libraries correctly. +# The default files distributed with CMake (>= 3.9) should be superior by all means. +# For GDAL, the one distributed with CMake does not detect the debug libraries correctly, +# so we provide an own one. file(REMOVE ${SOURCE_PATH}/CMake/FindGLEW.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/FindPythonLibs.cmake) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindGDAL.cmake DESTINATION ${SOURCE_PATH}/CMake) + +# ============================================================================= +# Collect CMake options for optional components +if(VTK_WITH_QT) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_Group_Qt=ON + -DVTK_QT_VERSION=5 + -DVTK_BUILD_QT_DESIGNER_PLUGIN=OFF + ) +endif() + +if(VTK_WITH_MPI) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_Group_MPI=ON + ) +endif() + +if(VTK_WITH_PYTHON) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_WRAP_PYTHON=ON + -DVTK_PYTHON_VERSION=3 + ) +endif() + +if(VTK_WITH_ALL_MODULES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_BUILD_ALL_MODULES=ON + -DVTK_USE_TK=OFF # TCL/TK currently not included in vcpkg + # -DVTK_USE_SYSTEM_AUTOBAHN=ON + # -DVTK_USE_SYSTEM_SIX=ON + # -DVTK_USE_SYSTEM_MPI4PY=ON + # -DVTK_USE_SYSTEM_CONSTANTLY=ON + # -DVTK_USE_SYSTEM_INCREMENTAL=ON + # -DVTK_USE_SYSTEM_TWISTED=ON + # -DVTK_USE_SYSTEM_XDMF2=ON + # -DVTK_USE_SYSTEM_XDMF3=ON + # -DVTK_USE_SYSTEM_ZFP=ON + # -DVTK_USE_SYSTEM_ZOPE=ON + ) +endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) list(APPEND ADDITIONAL_OPTIONS "-DVTK_EXTERNAL_HDF5_IS_SHARED=ON") endif() +# ============================================================================= +# Configure & Install vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DVTK_Group_Imaging=ON + -DVTK_Group_Views=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF - -DVTK_Group_MPI=ON - -DVTK_Group_Qt=ON - -DVTK_QT_VERSION=5 - -DVTK_BUILD_QT_DESIGNER_PLUGIN=OFF - # -DVTK_WRAP_PYTHON=ON - # -DVTK_PYTHON_VERSION=3 -DVTK_USE_SYSTEM_EXPAT=ON -DVTK_USE_SYSTEM_FREETYPE=ON # -DVTK_USE_SYSTEM_GL2PS=ON - # -DVTK_USE_SYSTEM_LIBHARU=ON + -DVTK_USE_SYSTEM_LIBHARU=ON -DVTK_USE_SYSTEM_JPEG=ON -DVTK_USE_SYSTEM_GLEW=ON -DVTK_USE_SYSTEM_HDF5=ON @@ -85,9 +143,29 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +# ============================================================================= +# Fixup target files vcpkg_fixup_cmake_targets() -# For VTK vcpkg_fixup_cmake_targets is not enough: +# For some reason the references to the XDMF libraries in the target files do not end up +# correctly, so we fix them here. +if(VTK_WITH_ALL_MODULES) + file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake VTK_TARGETS_RELEASE_CONTENT) + string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}") + string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}") + string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}") + string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake "${VTK_TARGETS_RELEASE_CONTENT}") + + file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake VTK_TARGETS_DEBUG_CONTENT) + string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}") + string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}") + string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}") + string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake "${VTK_TARGETS_DEBUG_CONTENT}") +endif() + +# For VTK `vcpkg_fixup_cmake_targets` is not enough: # Files for system third party dependencies are written to modules that # are located in the paths `share/vtk/Modules` and `debug/share/vtk/Modules`. # In the release folder, only the release libraries are referenced (e.g. "C:/vcpkg/installed/x64-windows/lib/zlib.lib"). @@ -158,8 +236,22 @@ set(SYSTEM_THIRD_PARTY_MODULES vtkpng vtktiff vtkzlib + # vtkgl2ps + vtklibharu ) +if(VTK_WITH_PYTHON OR VTK_WITH_ALL_MODULES) + list(APPEND SYSTEM_THIRD_PARTY_MODULES + vtkPython + ) +endif() + +if(VTK_WITH_ALL_MODULES) + list(APPEND SYSTEM_THIRD_PARTY_MODULES + AutobahnPython + ) +endif() + foreach(MODULE IN LISTS SYSTEM_THIRD_PARTY_MODULES) _vtk_combine_third_party_libraries("${MODULE}") endforeach() @@ -172,16 +264,45 @@ file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTE string(REGEX REPLACE "${CURRENT_INSTALLED_DIR}/lib/[^\\.]*\\.lib" "" VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}") file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}") -# Move executable to tools directory +# ============================================================================= +# Move executable to tools directory and clean-up other directories file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/vtk) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/vtkEncodeString-8.0.exe) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/vtkHashSource-8.0.exe) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkEncodeString-8.0.exe) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkHashSource-8.0.exe) -else() - # On static builds there should be no bin directory at all +function(_vtk_move_tool TOOL_NAME) + if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/${TOOL_NAME}.exe) + endif() + + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}.exe) +endfunction() + +set(VTK_TOOLS + vtkEncodeString-${VTK_SHORT_VERSION} + vtkHashSource-${VTK_SHORT_VERSION} + vtkWrapTclInit-${VTK_SHORT_VERSION} + vtkWrapTcl-${VTK_SHORT_VERSION} + vtkWrapPythonInit-${VTK_SHORT_VERSION} + vtkWrapPython-${VTK_SHORT_VERSION} + vtkWrapJava-${VTK_SHORT_VERSION} + vtkWrapHierarchy-${VTK_SHORT_VERSION} + vtkParseJava-${VTK_SHORT_VERSION} + vtkParseOGLExt-${VTK_SHORT_VERSION} + vtkpython + pvtkpython +) + +foreach(TOOL_NAME IN LISTS VTK_TOOLS) + _vtk_move_tool("${TOOL_NAME}") +endforeach() + +# ============================================================================= +# Remove other files and directories that are not valid for vcpkg +if(VTK_WITH_ALL_MODULES) + file(REMOVE ${CURRENT_PACKAGES_DIR}/XdmfConfig.cmake) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/XdmfConfig.cmake) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) endif() @@ -189,6 +310,7 @@ endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +# ============================================================================= # Handle copyright file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk) file(RENAME ${CURRENT_PACKAGES_DIR}/share/vtk/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/vtk/copyright) -- cgit v1.2.3 From 21402365061b454f525bbc2dfb1a2ae889eaa286 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 14:42:44 -0700 Subject: Fix /permissive- issue --- toolsrc/include/vcpkg_Dependencies.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index c1f6ad9a5..235abb839 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -45,9 +45,9 @@ namespace vcpkg::Dependencies InstallPlanAction(); - InstallPlanAction::InstallPlanAction(const PackageSpec& spec, - const std::unordered_set& features, - const RequestType& request_type); + InstallPlanAction(const PackageSpec& spec, + const std::unordered_set& features, + const RequestType& request_type); InstallPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type); InstallPlanAction(const PackageSpec& spec, const SourceControlFile& any_paragraph, -- cgit v1.2.3 From da299cb49cccd6cbcdcd18d66108311628337846 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 16:59:59 -0700 Subject: Add missing const keywords --- toolsrc/src/commands_export.cpp | 18 ++++++++---------- toolsrc/src/vcpkg.cpp | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index cbcb219b6..dbfb09aab 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -67,7 +67,7 @@ namespace vcpkg::Commands::Export for (const ExportPlanType plan_type : order) { - auto it = group_by_plan_type.find(plan_type); + const auto it = group_by_plan_type.find(plan_type); if (it == group_by_plan_type.cend()) { continue; @@ -205,11 +205,9 @@ namespace vcpkg::Commands::Export static Optional maybe_lookup(std::unordered_map const& m, std::string const& key) { - auto it = m.find(key); - if (it != m.end()) - return it->second; - else - return nullopt; + const auto it = m.find(key); + if (it != m.end()) return it->second; + return nullopt; } void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) @@ -266,7 +264,7 @@ namespace vcpkg::Commands::Export VCPKG_LINE_INFO, !maybe_nuget_version || nuget, "--nuget-version is only valid with --nuget"); // create the plan - StatusParagraphs status_db = database_load_check(paths); + const StatusParagraphs status_db = database_load_check(paths); std::vector export_plan = Dependencies::create_export_plan(paths, specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !export_plan.empty(), "Export plan cannot be empty"); @@ -285,7 +283,7 @@ namespace vcpkg::Commands::Export "Additional packages (*) need to be exported to complete this operation."); } - auto it = group_by_plan_type.find(ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT); + const auto it = group_by_plan_type.find(ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT); if (it != group_by_plan_type.cend() && !it->second.empty()) { System::println(System::Color::error, "There are packages that have not been built."); @@ -295,7 +293,7 @@ namespace vcpkg::Commands::Export Util::erase_remove_if( unbuilt, [](const ExportPlanAction* a) { return a->request_type != RequestType::USER_REQUESTED; }); - auto s = Strings::join(" ", unbuilt, [](const ExportPlanAction* a) { return a->spec.to_string(); }); + const auto s = Strings::join(" ", unbuilt, [](const ExportPlanAction* a) { return a->spec.to_string(); }); System::println("To build them, run:\n" " vcpkg install %s", s); @@ -360,7 +358,7 @@ namespace vcpkg::Commands::Export Checks::check_exit(VCPKG_LINE_INFO, !ec); } - auto print_next_step_info = [](const fs::path& prefix) { + const auto print_next_step_info = [](const fs::path& prefix) { const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; const CMakeVariable cmake_variable = CMakeVariable(L"CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index f37d079a6..781f03585 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -34,7 +34,7 @@ static void inner(const VcpkgCmdArguments& args) Checks::exit_fail(VCPKG_LINE_INFO); } - if (auto command_function = Commands::find(args.command, Commands::get_available_commands_type_c())) + if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_c())) { return command_function(args); } @@ -47,7 +47,7 @@ static void inner(const VcpkgCmdArguments& args) else { const Optional vcpkg_root_dir_env = System::get_environment_variable(L"VCPKG_ROOT"); - if (auto v = vcpkg_root_dir_env.get()) + if (const auto v = vcpkg_root_dir_env.get()) { vcpkg_root_dir = fs::stdfs::absolute(*v); } @@ -67,10 +67,10 @@ static void inner(const VcpkgCmdArguments& args) vcpkg_root_dir.string(), expected_paths.error().message()); const VcpkgPaths paths = expected_paths.value_or_exit(VCPKG_LINE_INFO); - int exit_code = _wchdir(paths.root.c_str()); + const int exit_code = _wchdir(paths.root.c_str()); Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed"); - if (auto command_function = Commands::find(args.command, Commands::get_available_commands_type_b())) + if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_b())) { return command_function(args, paths); } @@ -84,7 +84,7 @@ static void inner(const VcpkgCmdArguments& args) { const Optional vcpkg_default_triplet_env = System::get_environment_variable(L"VCPKG_DEFAULT_TRIPLET"); - if (auto v = vcpkg_default_triplet_env.get()) + if (const auto v = vcpkg_default_triplet_env.get()) { default_triplet = Triplet::from_canonical_name(Strings::to_utf8(*v)); } @@ -96,7 +96,7 @@ static void inner(const VcpkgCmdArguments& args) Input::check_triplet(default_triplet, paths); - if (auto command_function = Commands::find(args.command, Commands::get_available_commands_type_a())) + if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_a())) { return command_function(args, paths, default_triplet); } @@ -118,7 +118,7 @@ static void loadConfig() try { auto maybe_pghs = Paragraphs::get_paragraphs(Files::get_real_filesystem(), localappdata / "vcpkg" / "config"); - if (auto p_pghs = maybe_pghs.get()) + if (const auto p_pghs = maybe_pghs.get()) { const auto& pghs = *p_pghs; @@ -212,9 +212,9 @@ int wmain(const int argc, const wchar_t* const* const argv) const VcpkgCmdArguments args = VcpkgCmdArguments::create_from_command_line(argc, argv); - if (auto p = args.printmetrics.get()) Metrics::g_metrics.lock()->set_print_metrics(*p); - if (auto p = args.sendmetrics.get()) Metrics::g_metrics.lock()->set_send_metrics(*p); - if (auto p = args.debug.get()) GlobalState::debugging = *p; + if (const auto p = args.printmetrics.get()) Metrics::g_metrics.lock()->set_print_metrics(*p); + if (const auto p = args.sendmetrics.get()) Metrics::g_metrics.lock()->set_send_metrics(*p); + if (const auto p = args.debug.get()) GlobalState::debugging = *p; Checks::register_console_ctrl_handler(); -- cgit v1.2.3 From 75cc10b0f3351241588d307c625138aa358499fe Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 17:10:50 -0700 Subject: Add missing const --- toolsrc/include/vcpkg_Build.h | 2 +- toolsrc/include/vcpkg_Strings.h | 2 +- toolsrc/src/BinaryParagraph.cpp | 2 +- toolsrc/src/coff_file_reader.cpp | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h index e12ed3b1d..fc6f28e24 100644 --- a/toolsrc/include/vcpkg_Build.h +++ b/toolsrc/include/vcpkg_Build.h @@ -161,7 +161,7 @@ namespace vcpkg::Build inline bool is_enabled(BuildPolicy policy) const { - auto it = m_policies.find(policy); + const auto it = m_policies.find(policy); if (it != m_policies.cend()) return it->second; return false; } diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index e94742c8f..7cea63676 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -71,7 +71,7 @@ namespace vcpkg::Strings } std::basic_string output; - size_t size = v.size(); + const size_t size = v.size(); output.append(transformer(v[0])); diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp index 9abd388b9..97923c3c4 100644 --- a/toolsrc/src/BinaryParagraph.cpp +++ b/toolsrc/src/BinaryParagraph.cpp @@ -56,7 +56,7 @@ namespace vcpkg this->default_features = parse_comma_list(parser.optional_field(Fields::DEFAULTFEATURES)); } - if (auto err = parser.error_info(this->spec.to_string())) + if (const auto err = parser.error_info(this->spec.to_string())) { System::println( System::Color::error, "Error: while parsing the Binary Paragraph for %s", this->spec.to_string()); diff --git a/toolsrc/src/coff_file_reader.cpp b/toolsrc/src/coff_file_reader.cpp index 6c38c452b..10c1437c6 100644 --- a/toolsrc/src/coff_file_reader.cpp +++ b/toolsrc/src/coff_file_reader.cpp @@ -24,7 +24,7 @@ namespace vcpkg::COFFFileReader template static T peek_value_from_stream(fstream& fs) { - fpos_t original_pos = fs.tellg().seekpos(); + const fpos_t original_pos = fs.tellg().seekpos(); T data; fs.read(reinterpret_cast(&data), sizeof data); fs.seekg(original_pos); @@ -236,7 +236,7 @@ namespace vcpkg::COFFFileReader read_and_verify_PE_signature(fs); CoffFileHeader header = CoffFileHeader::read(fs); - MachineType machine = header.machine_type(); + const MachineType machine = header.machine_type(); return {machine}; } @@ -282,7 +282,7 @@ namespace vcpkg::COFFFileReader marker.advance_by(ArchiveMemberHeader::HEADER_SIZE + second_linker_member_header.member_size()); marker.seek_to_marker(fs); - bool hasLongnameMemberHeader = peek_value_from_stream(fs) == 0x2F2F; + const bool hasLongnameMemberHeader = peek_value_from_stream(fs) == 0x2F2F; if (hasLongnameMemberHeader) { const ArchiveMemberHeader longnames_member_header = ArchiveMemberHeader::read(fs); -- cgit v1.2.3 From 269c6b4d55192492d8ad254723b5883f13794314 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 17:12:42 -0700 Subject: Use const. Take str by reference --- toolsrc/src/commands_build.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index 4da9cede2..71cd1b845 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -29,8 +29,8 @@ namespace vcpkg::Commands::BuildCommand const PackageSpec& spec = full_spec.package_spec; if (options.find(OPTION_CHECKS_ONLY) != options.end()) { - auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, spec.triplet()); - auto build_info = Build::read_build_info(paths.get_filesystem(), paths.build_info_file_path(spec)); + 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); Checks::check_exit(VCPKG_LINE_INFO, error_count == 0); Checks::exit_success(VCPKG_LINE_INFO); @@ -45,7 +45,7 @@ namespace vcpkg::Commands::BuildCommand Checks::exit_fail(VCPKG_LINE_INFO); } - for (std::string str : full_spec.features) + for (const std::string& str : full_spec.features) { System::println("%s \n", str); } @@ -56,8 +56,8 @@ namespace vcpkg::Commands::BuildCommand scf->core_paragraph->name, spec.name()); - StatusParagraphs status_db = database_load_check(paths); - Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; + const StatusParagraphs status_db = database_load_check(paths); + const Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; const Build::BuildPackageConfig build_config{ *scf->core_paragraph, spec.triplet(), paths.port_dir(spec), build_package_options}; @@ -92,7 +92,7 @@ namespace vcpkg::Commands::BuildCommand static const std::string example = Commands::Help::create_example_string("build zlib:x64-windows"); args.check_exact_arg_count( 1, example); // Build only takes a single package and all dependencies must already be installed - std::string command_argument = args.command_arguments.at(0); + const std::string command_argument = args.command_arguments.at(0); const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, example); Input::check_triplet(spec.package_spec.triplet(), paths); const std::unordered_set options = -- cgit v1.2.3 From 4a43e3e7f954cb79a71ab05dde6b5345d011db83 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 17:16:38 -0700 Subject: Use const --- toolsrc/src/commands_cache.cpp | 2 +- toolsrc/src/commands_depends.cpp | 2 +- toolsrc/src/commands_edit.cpp | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/toolsrc/src/commands_cache.cpp b/toolsrc/src/commands_cache.cpp index 75de78461..fa0c62ee4 100644 --- a/toolsrc/src/commands_cache.cpp +++ b/toolsrc/src/commands_cache.cpp @@ -15,7 +15,7 @@ namespace vcpkg::Commands::Cache { const Expected> pghs = Paragraphs::get_single_paragraph(paths.get_filesystem(), path / "CONTROL"); - if (auto p = pghs.get()) + if (const auto p = pghs.get()) { const BinaryParagraph binary_paragraph = BinaryParagraph(*p); output.push_back(binary_paragraph); diff --git a/toolsrc/src/commands_depends.cpp b/toolsrc/src/commands_depends.cpp index 49e1c6c01..ffad91226 100644 --- a/toolsrc/src/commands_depends.cpp +++ b/toolsrc/src/commands_depends.cpp @@ -46,7 +46,7 @@ namespace vcpkg::Commands::DependInfo for (auto&& source_control_file : source_control_files) { const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; - auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name(); }); + const auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name(); }); System::println("%s: %s", source_paragraph.name, s); } diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp index 72005a461..c0fe27fde 100644 --- a/toolsrc/src/commands_edit.cpp +++ b/toolsrc/src/commands_edit.cpp @@ -27,7 +27,7 @@ namespace vcpkg::Commands::Edit if (env_EDITOR.empty()) { const Optional env_EDITOR_optional = System::get_environment_variable(L"EDITOR"); - if (auto e = env_EDITOR_optional.get()) + if (const auto e = env_EDITOR_optional.get()) { env_EDITOR = *e; } @@ -63,7 +63,7 @@ namespace vcpkg::Commands::Edit { const Optional code_installpath = System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, L"InstallLocation"); - if (auto c = code_installpath.get()) + if (const auto c = code_installpath.get()) { auto p = fs::path(*c) / "Code.exe"; if (fs.exists(p)) @@ -91,11 +91,12 @@ namespace vcpkg::Commands::Edit { const auto buildtrees_current_dir = paths.buildtrees / port_name; - std::wstring cmdLine = Strings::wformat(LR"("%s" "%s" -n)", env_EDITOR, buildtrees_current_dir.native()); + const std::wstring cmdLine = + Strings::wformat(LR"("%s" "%s" -n)", env_EDITOR, buildtrees_current_dir.native()); Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmdLine)); } - std::wstring cmdLine = Strings::wformat( + const std::wstring cmdLine = Strings::wformat( LR"("%s" "%s" "%s" -n)", env_EDITOR, portpath.native(), (portpath / "portfile.cmake").native()); Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmdLine)); } -- cgit v1.2.3 From 0404a51e4a13f37a280241812ccddd745a4ca129 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 17:20:29 -0700 Subject: [edit] Fix variable names to be consistence with vcpkg's convention --- toolsrc/src/commands_edit.cpp | 54 +++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp index c0fe27fde..e72931e63 100644 --- a/toolsrc/src/commands_edit.cpp +++ b/toolsrc/src/commands_edit.cpp @@ -12,8 +12,8 @@ namespace vcpkg::Commands::Edit auto& fs = paths.get_filesystem(); - static const std::string example = Commands::Help::create_example_string("edit zlib"); - args.check_exact_arg_count(1, example); + static const std::string EXAMPLE = Commands::Help::create_example_string("edit zlib"); + args.check_exact_arg_count(1, EXAMPLE); const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_BUILDTREES}); const std::string port_name = args.command_arguments.at(0); @@ -22,44 +22,44 @@ namespace vcpkg::Commands::Edit Checks::check_exit(VCPKG_LINE_INFO, fs.is_directory(portpath), R"(Could not find port named "%s")", port_name); // Find the user's selected editor - std::wstring env_EDITOR; + std::wstring env_editor; - if (env_EDITOR.empty()) + if (env_editor.empty()) { - const Optional env_EDITOR_optional = System::get_environment_variable(L"EDITOR"); - if (const auto e = env_EDITOR_optional.get()) + const Optional env_editor_optional = System::get_environment_variable(L"EDITOR"); + if (const auto e = env_editor_optional.get()) { - env_EDITOR = *e; + env_editor = *e; } } - if (env_EDITOR.empty()) + if (env_editor.empty()) { - const fs::path CODE_EXE_PATH = System::get_ProgramFiles_platform_bitness() / "Microsoft VS Code/Code.exe"; - if (fs.exists(CODE_EXE_PATH)) + const fs::path code_exe_path = System::get_ProgramFiles_platform_bitness() / "Microsoft VS Code/Code.exe"; + if (fs.exists(code_exe_path)) { - env_EDITOR = CODE_EXE_PATH; + env_editor = code_exe_path; } } - if (env_EDITOR.empty()) + if (env_editor.empty()) { - const fs::path CODE_EXE_PATH = System::get_ProgramFiles_32_bit() / "Microsoft VS Code/Code.exe"; - if (fs.exists(CODE_EXE_PATH)) + const fs::path code_exe_path = System::get_ProgramFiles_32_bit() / "Microsoft VS Code/Code.exe"; + if (fs.exists(code_exe_path)) { - env_EDITOR = CODE_EXE_PATH; + env_editor = code_exe_path; } } - if (env_EDITOR.empty()) + if (env_editor.empty()) { - static const std::array regkeys = { + static const std::array REGKEYS = { LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", }; - for (auto&& keypath : regkeys) + for (auto&& keypath : REGKEYS) { const Optional code_installpath = System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, L"InstallLocation"); @@ -68,20 +68,20 @@ namespace vcpkg::Commands::Edit auto p = fs::path(*c) / "Code.exe"; if (fs.exists(p)) { - env_EDITOR = p.native(); + env_editor = p.native(); break; } auto p_insiders = fs::path(*c) / "Code - Insiders.exe"; if (fs.exists(p_insiders)) { - env_EDITOR = p_insiders.native(); + env_editor = p_insiders.native(); break; } } } } - if (env_EDITOR.empty()) + if (env_editor.empty()) { Checks::exit_with_message( VCPKG_LINE_INFO, "Visual Studio Code was not found and the environment variable EDITOR is not set"); @@ -91,13 +91,13 @@ namespace vcpkg::Commands::Edit { const auto buildtrees_current_dir = paths.buildtrees / port_name; - const std::wstring cmdLine = - Strings::wformat(LR"("%s" "%s" -n)", env_EDITOR, buildtrees_current_dir.native()); - Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmdLine)); + const std::wstring cmd_line = + Strings::wformat(LR"("%s" "%s" -n)", env_editor, buildtrees_current_dir.native()); + Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); } - const std::wstring cmdLine = Strings::wformat( - LR"("%s" "%s" "%s" -n)", env_EDITOR, portpath.native(), (portpath / "portfile.cmake").native()); - Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmdLine)); + const std::wstring cmd_line = Strings::wformat( + LR"("%s" "%s" "%s" -n)", env_editor, portpath.native(), (portpath / "portfile.cmake").native()); + Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); } } -- cgit v1.2.3 From 98074f5a21717a851323019b75d9c0fdb599eaae Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 17:21:34 -0700 Subject: [commands_env.cpp] Use const. Naming scheme --- toolsrc/src/commands_env.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/commands_env.cpp b/toolsrc/src/commands_env.cpp index dd7172b89..073c501f5 100644 --- a/toolsrc/src/commands_env.cpp +++ b/toolsrc/src/commands_env.cpp @@ -8,12 +8,13 @@ namespace vcpkg::Commands::Env { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string example = Commands::Help::create_example_string(R"(env --Triplet x64-windows)"); - args.check_exact_arg_count(0, example); + static const std::string EXAMPLE = Commands::Help::create_example_string(R"(env --Triplet x64-windows)"); + args.check_exact_arg_count(0, EXAMPLE); args.check_and_get_optional_command_arguments({}); - auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); - System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, paths.get_toolset(pre_build_info.platform_toolset)) + L" && cmd"); + const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); + System::cmd_execute_clean( + Build::make_build_env_cmd(pre_build_info, paths.get_toolset(pre_build_info.platform_toolset)) + L" && cmd"); Checks::exit_success(VCPKG_LINE_INFO); } -- cgit v1.2.3 From 4d952a5e1d286e281a837f332fbac9e43866d933 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 17:22:40 -0700 Subject: [commands_hash.cpp] Use const. Naming scheme. --- toolsrc/src/commands_hash.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/toolsrc/src/commands_hash.cpp b/toolsrc/src/commands_hash.cpp index 0da2b031f..b3211b9f8 100644 --- a/toolsrc/src/commands_hash.cpp +++ b/toolsrc/src/commands_hash.cpp @@ -6,22 +6,22 @@ namespace vcpkg::Commands::Hash { - static void do_file_hash(fs::path const& path, std::wstring const& hashType) + static void do_file_hash(fs::path const& path, std::wstring const& hash_type) { - auto cmd_line = Strings::wformat(LR"(CertUtil.exe -hashfile "%s" %s)", path.c_str(), hashType); - auto ec_data = System::cmd_execute_and_capture_output(cmd_line); + const auto cmd_line = Strings::wformat(LR"(CertUtil.exe -hashfile "%s" %s)", path.c_str(), hash_type); + const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); Checks::check_exit( VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::to_utf8(cmd_line)); std::string const& output = ec_data.output; - auto start = output.find_first_of("\r\n"); + const auto start = output.find_first_of("\r\n"); Checks::check_exit(VCPKG_LINE_INFO, start != std::string::npos, "Unexpected output format from command: %s", Strings::to_utf8(cmd_line)); - auto end = output.find_first_of("\r\n", start + 1); + const auto end = output.find_first_of("\r\n", start + 1); Checks::check_exit(VCPKG_LINE_INFO, end != std::string::npos, "Unexpected output format from command: %s", @@ -34,11 +34,11 @@ namespace vcpkg::Commands::Hash void perform_and_exit(const VcpkgCmdArguments& args) { - static const std::string example = + static const std::string EXAMPLE = Strings::format("The argument should be a file path\n%s", Commands::Help::create_example_string("hash boost_1_62_0.tar.bz2")); - args.check_min_arg_count(1, example); - args.check_max_arg_count(2, example); + args.check_min_arg_count(1, EXAMPLE); + args.check_max_arg_count(2, EXAMPLE); args.check_and_get_optional_command_arguments({}); if (args.command_arguments.size() == 1) -- cgit v1.2.3 From 5b42ec9b5d7277d9a4452c4c3a109770d9437205 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 28 Aug 2017 17:26:01 -0700 Subject: [vcpkg] Hack to fix codepage problems -- root cause unknown --- toolsrc/src/VcpkgPaths.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 1b76fdc24..4bceff784 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -264,7 +264,14 @@ namespace vcpkg const std::wstring cmd = System::create_powershell_script_cmd(script); System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd); Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect VS 2017 instances"); - return Strings::split(ec_data.output, "\n"); + return Util::fmap(Strings::split(ec_data.output, "\n"), [](const std::string& line) { + auto colon_pos = line.find(':'); + if (colon_pos != std::string::npos && colon_pos > 0) + { + return line.substr(colon_pos - 1); + } + return line; + }); } static Optional get_VS2015_installation_instance() -- cgit v1.2.3 From b21bc7c11ae2e34efe2ef87c10dd41213bbd208b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 28 Aug 2017 17:33:03 -0700 Subject: [vcpkg] Don't use -ListImported in bootstrap. Fixes #1711 --- scripts/bootstrap.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 2dd6813a4..b874afd8c 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -14,7 +14,7 @@ $oldpath = $env:path try { $env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.1-32-bit\cmd" - if (Get-Command "git" -ListImported -ErrorAction SilentlyContinue) + if (Get-Command "git" -ErrorAction SilentlyContinue) { $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short if ($LASTEXITCODE -ne 0) -- cgit v1.2.3 From 265fb7e0b519694288ded6fa2abba7aa37450359 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 28 Aug 2017 19:29:47 -0700 Subject: [jxrlib] Fix hash. Fixes #1705. --- ports/jxrlib/CONTROL | 2 +- ports/jxrlib/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/jxrlib/CONTROL b/ports/jxrlib/CONTROL index 062850e06..a125cb176 100644 --- a/ports/jxrlib/CONTROL +++ b/ports/jxrlib/CONTROL @@ -1,3 +1,3 @@ Source: jxrlib -Version: 1.1-2 +Version: 1.1-3 Description: Open source implementation of the jpegxr image format standard. diff --git a/ports/jxrlib/portfile.cmake b/ports/jxrlib/portfile.cmake index ddd02c3c7..c7c089ff7 100644 --- a/ports/jxrlib/portfile.cmake +++ b/ports/jxrlib/portfile.cmake @@ -3,7 +3,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) vcpkg_download_distfile(ARCHIVE URLS "http://download-codeplex.sec.s-msft.com/Download/SourceControlFileDownload.ashx?ProjectName=jxrlib&changeSetId=e922fa50cdf9a58f40cad07553bcaa2883d3c5bf" FILENAME "jxrlib_1_1.zip" - SHA512 c4f42c690a2543b00ef9fe6e4f479b582e966b27c13e8b0efad39fa85d70b4edb60eac91a856c371a4e875e7a2769e0aba31b508ee61f7314150c6eb34a19c0b + SHA512 6e8b579108444e9bea8d01f57e2ac3b63963c084adb8e265cfd82bb1199b8bd168b8aa41319cf34b87e97db1d72d0f3cc2d3dac881fcd1a6f398fe808d55772d ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From f3156ae3e4b62159c178f12cdba58e6a661832d0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 18:01:24 -0700 Subject: [vcpkg_Build.cpp] USe const. Misc fixes --- toolsrc/src/vcpkg_Build.cpp | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index 0ae63d4e3..bec9c9ef7 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -64,8 +64,8 @@ namespace vcpkg::Build tonull = L""; } - auto arch = to_vcvarsall_toolchain(pre_build_info.target_architecture, toolset); - auto target = to_vcvarsall_target(pre_build_info.cmake_system_name); + const auto arch = to_vcvarsall_toolchain(pre_build_info.target_architecture, toolset); + const auto target = to_vcvarsall_target(pre_build_info.cmake_system_name); return Strings::wformat(LR"("%s" %s %s %s 2>&1)", toolset.vcvarsall.native(), arch, target, tonull); } @@ -85,7 +85,7 @@ namespace vcpkg::Build BinaryControlFile& bcf) { BinaryParagraph bpgh(source_paragraph, triplet); - if (auto p_ver = build_info.version.get()) + if (const auto p_ver = build_info.version.get()) { bpgh.version = *p_ver; } @@ -132,7 +132,7 @@ namespace vcpkg::Build const fs::path& git_exe_path = paths.get_git_exe(); const fs::path ports_cmake_script_path = paths.ports_cmake; - auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); + const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset); const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); @@ -171,8 +171,8 @@ namespace vcpkg::Build const ElapsedTime timer = ElapsedTime::create_started(); - int return_code = System::cmd_execute_clean(command); - auto buildtimeus = timer.microseconds(); + const int return_code = System::cmd_execute_clean(command); + const auto buildtimeus = timer.microseconds(); const auto spec_string = spec.to_string(); { @@ -186,7 +186,7 @@ namespace vcpkg::Build } } - auto build_info = read_build_info(paths.get_filesystem(), paths.build_info_file_path(spec)); + const BuildInfo build_info = 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); BinaryControlFile bcf; @@ -269,7 +269,7 @@ namespace vcpkg::Build parser.required_field(BuildInfoRequiredField::CRT_LINKAGE, crt_linkage_as_string); auto crtlinkage = to_linkage_type(crt_linkage_as_string); - if (auto p = crtlinkage.get()) + if (const auto p = crtlinkage.get()) build_info.crt_linkage = *p; else Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid crt linkage type: [%s]", crt_linkage_as_string); @@ -279,7 +279,7 @@ namespace vcpkg::Build std::string library_linkage_as_string; parser.required_field(BuildInfoRequiredField::LIBRARY_LINKAGE, library_linkage_as_string); auto liblinkage = to_linkage_type(library_linkage_as_string); - if (auto p = liblinkage.get()) + if (const auto p = liblinkage.get()) build_info.library_linkage = *p; else Checks::exit_with_message( @@ -292,9 +292,8 @@ namespace vcpkg::Build for (auto policy : g_all_policies) { const auto setting = parser.optional_field(to_string(policy)); - if (setting.empty()) - continue; - else if (setting == "enabled") + if (setting.empty()) continue; + if (setting == "enabled") policies.emplace(policy, true); else if (setting == "disabled") policies.emplace(policy, false); @@ -303,7 +302,7 @@ namespace vcpkg::Build VCPKG_LINE_INFO, "Unknown setting for policy '%s': %s", to_string(policy), setting); } - if (auto err = parser.error_info("PostBuildInformation")) + if (const auto err = parser.error_info("PostBuildInformation")) { print_error_message(err); Checks::exit_fail(VCPKG_LINE_INFO); @@ -337,14 +336,14 @@ namespace vcpkg::Build }); const std::wstring command = Strings::wformat(LR"(%s)", cmd_launch_cmake); - auto ec_data = System::cmd_execute_and_capture_output(command); + const auto ec_data = System::cmd_execute_and_capture_output(command); Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0); const std::vector lines = Strings::split(ec_data.output, "\n"); PreBuildInfo pre_build_info; - auto e = lines.cend(); + const auto e = lines.cend(); auto cur = std::find(lines.cbegin(), e, FLAG_GUID); if (cur != e) ++cur; -- cgit v1.2.3 From 63a9572ecfeccc143de6bc10a23c453823996dff Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 18:03:01 -0700 Subject: [vcpkg_Dependencies.cpp] Order of initialization --- toolsrc/src/vcpkg_Dependencies.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 4525fa02a..279f5f870 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -166,7 +166,7 @@ namespace vcpkg::Dependencies InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type) - : spec(spec), request_type(request_type), plan_type(InstallPlanType::UNKNOWN), any_paragraph(any_paragraph) + : spec(spec), any_paragraph(any_paragraph), plan_type(InstallPlanType::UNKNOWN), request_type(request_type) { if (auto p = any_paragraph.status_paragraph.get()) { -- cgit v1.2.3 From 174c264b449dc77ab71ae07aa78673239ebd0c48 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 18:03:43 -0700 Subject: [vcpkg_Dependencies.cpp] Remove redundant else --- toolsrc/src/vcpkg_Dependencies.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 279f5f870..2c619c3ac 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -193,17 +193,15 @@ namespace vcpkg::Dependencies { return this->spec.to_string(); } - else - { - std::string features; - for (auto&& feature : this->feature_list) - { - features += feature + ","; - } - features.pop_back(); - return this->spec.name() + "[" + features + "]:" + this->spec.triplet().to_string(); + std::string features; + for (auto&& feature : this->feature_list) + { + features += feature + ","; } + features.pop_back(); + + return this->spec.name() + "[" + features + "]:" + this->spec.triplet().to_string(); } bool InstallPlanAction::compare_by_name(const InstallPlanAction* left, const InstallPlanAction* right) -- cgit v1.2.3 From dc46f68f6a2e7a4079c6ad1e1545705d379b9a51 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 18:36:25 -0700 Subject: [Strings::join()] Modify to work for any container --- toolsrc/include/vcpkg_Strings.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index 7cea63676..a7c6148d7 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -65,20 +65,20 @@ namespace vcpkg::Strings template std::basic_string join(const CharType* delimiter, const Container& v, Transformer transformer) { - if (v.size() == 0) + const auto begin = v.begin(); + const auto end = v.end(); + + if (begin == end) { return std::basic_string(); } std::basic_string output; - const size_t size = v.size(); - - output.append(transformer(v[0])); - - for (size_t i = 1; i < size; ++i) + output.append(transformer(*begin)); + for (auto it = std::next(begin); it != end; ++it) { output.append(delimiter); - output.append(transformer(v[i])); + output.append(transformer(*it)); } return output; @@ -86,7 +86,7 @@ namespace vcpkg::Strings template std::basic_string join(const CharType* delimiter, const Container& v) { - using Element = decltype(v[0]); + using Element = decltype(*v.begin()); return join(delimiter, v, [](const Element& x) -> const Element& { return x; }); } -- cgit v1.2.3 From c2571cf8bca08bc6d1de7e23025a0dfdb1db4bb9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 18:37:36 -0700 Subject: Use Strings::join() and Strings::format() --- toolsrc/src/vcpkg_Dependencies.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 2c619c3ac..57f475df5 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -7,6 +7,7 @@ #include "vcpkg_Dependencies.h" #include "vcpkg_Files.h" #include "vcpkg_Graphs.h" +#include "vcpkg_Strings.h" #include "vcpkg_Util.h" #include "vcpkglib.h" @@ -194,14 +195,8 @@ namespace vcpkg::Dependencies return this->spec.to_string(); } - std::string features; - for (auto&& feature : this->feature_list) - { - features += feature + ","; - } - features.pop_back(); - - return this->spec.name() + "[" + features + "]:" + this->spec.triplet().to_string(); + const std::string features = Strings::join(",", this->feature_list); + return Strings::format("%s[%s]:%s", this->spec.name(), features, this->spec.triplet()); } bool InstallPlanAction::compare_by_name(const InstallPlanAction* left, const InstallPlanAction* right) -- cgit v1.2.3 From b1cebc0740765b90af905d6f1c90ea9830506e1b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 18:39:10 -0700 Subject: Make member functions const --- toolsrc/src/vcpkg_Dependencies.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 57f475df5..4d0c3c928 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -37,7 +37,7 @@ namespace vcpkg::Dependencies { Cluster* ptr; - Cluster* operator->() { return ptr; } + Cluster* operator->() const { return ptr; } }; bool operator==(const ClusterPtr& l, const ClusterPtr& r) { return l.ptr == r.ptr; } @@ -87,7 +87,7 @@ namespace vcpkg::Dependencies } private: - void cluster_from_scf(const SourceControlFile& scf, Cluster& out_cluster) + void cluster_from_scf(const SourceControlFile& scf, Cluster& out_cluster) const { FeatureNodeEdges core_dependencies; core_dependencies.build_edges = -- cgit v1.2.3 From 259d6f83b46da9b7127eb8c7907cdcb74ce5bdf4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 18:45:30 -0700 Subject: Introduce Strings::EMPTY --- toolsrc/include/vcpkg_Strings.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index a7c6148d7..5dd420232 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -36,6 +36,9 @@ namespace vcpkg::Strings::details namespace vcpkg::Strings { + static constexpr const CStringView EMPTY = ""; + static constexpr const CWStringView WEMPTY = L""; + template std::string format(const char* fmtstr, const Args&... args) { -- cgit v1.2.3 From 7d46adb47ca332a072ffb382e4a533aa68a17062 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 18:46:28 -0700 Subject: Use Strings::EMPTY --- toolsrc/include/vcpkg_System.h | 2 +- toolsrc/src/BinaryParagraph.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h index 32da6e39c..86bb24aad 100644 --- a/toolsrc/include/vcpkg_System.h +++ b/toolsrc/include/vcpkg_System.h @@ -23,7 +23,7 @@ namespace vcpkg::System ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line); - std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args = L""); + std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args = Strings::WEMPTY); enum class Color { diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp index 97923c3c4..783fa6ace 100644 --- a/toolsrc/src/BinaryParagraph.cpp +++ b/toolsrc/src/BinaryParagraph.cpp @@ -80,10 +80,10 @@ namespace vcpkg BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet) { this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO); - this->version = ""; + this->version = Strings::EMPTY; this->feature = fpgh.name; this->description = fpgh.description; - this->maintainer = ""; + this->maintainer = Strings::EMPTY; this->depends = filter_dependencies(fpgh.depends, triplet); } -- cgit v1.2.3 From f3d803addfb3d84d828786d2e6b0b8a34f2fc494 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 18:54:48 -0700 Subject: Introduce Strings::is_empty() --- toolsrc/include/vcpkg_Strings.h | 3 +++ toolsrc/src/vcpkg_Strings.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index 5dd420232..5af7c6f7c 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -39,6 +39,9 @@ namespace vcpkg::Strings static constexpr const CStringView EMPTY = ""; static constexpr const CWStringView WEMPTY = L""; + bool is_empty(const CStringView s); + bool is_empty(const CWStringView s); + template std::string format(const char* fmtstr, const Args&... args) { diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 0c1c1f9f9..b5ea338de 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -71,6 +71,9 @@ namespace vcpkg::Strings::details namespace vcpkg::Strings { + bool is_empty(const CStringView s) { return s == EMPTY; } + bool is_empty(const CWStringView s) { return s == WEMPTY; } + std::wstring to_utf16(const CStringView s) { std::wstring_convert, wchar_t> conversion; -- cgit v1.2.3 From 4a6b43c15a2b6c121686355f37443da6e2d05c9b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 18:55:27 -0700 Subject: Improve BinaryParagraph::displayname() --- toolsrc/src/BinaryParagraph.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp index 783fa6ace..1ab1aa63e 100644 --- a/toolsrc/src/BinaryParagraph.cpp +++ b/toolsrc/src/BinaryParagraph.cpp @@ -89,14 +89,8 @@ namespace vcpkg std::string BinaryParagraph::displayname() const { - if (this->feature == "") - { - return this->spec.name() + "[core]:" + this->spec.triplet().to_string(); - } - else - { - return this->spec.name() + "[" + this->feature + "]:" + this->spec.triplet().to_string(); - } + const auto f = Strings::is_empty(this->feature) ? "core" : this->feature; + return Strings::format("%s[%s]:%s", this->spec.name(), f, this->spec.triplet()); } std::string BinaryParagraph::dir() const { return this->spec.dir(); } -- cgit v1.2.3 From d02d44b0f12ae0603c5578bdcc4c0a51a3e309c7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 18:58:59 -0700 Subject: Use Strings::EMPTY instead of "" --- toolsrc/src/commands_build.cpp | 4 ++-- toolsrc/src/commands_install.cpp | 2 +- toolsrc/src/commands_version.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index 71cd1b845..421568ce5 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -68,12 +68,12 @@ namespace vcpkg::Commands::BuildCommand System::println(System::Color::error, "The build command requires all dependencies to be already installed."); System::println("The following dependencies are missing:"); - System::println(""); + System::println(Strings::EMPTY); for (const auto& p : result.unmet_dependencies) { System::println(" %s", p); } - System::println(""); + System::println(Strings::EMPTY); Checks::exit_fail(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index a2e95eb48..1c474f7b0 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -199,7 +199,7 @@ namespace vcpkg::Commands::Install bcf.core_paragraph.spec); System::print("\n "); System::println(Strings::join("\n ", intersection)); - System::println(""); + System::println(Strings::EMPTY); return InstallResult::FILE_CONFLICTS; } diff --git a/toolsrc/src/commands_version.cpp b/toolsrc/src/commands_version.cpp index cd21f2561..af81cd26e 100644 --- a/toolsrc/src/commands_version.cpp +++ b/toolsrc/src/commands_version.cpp @@ -20,7 +20,7 @@ namespace vcpkg::Commands::Version #ifndef NDEBUG + std::string("-debug") #endif - + std::string(Metrics::get_compiled_metrics_enabled() ? "" : "-external"); + + std::string(Metrics::get_compiled_metrics_enabled() ? Strings::EMPTY : "-external"); return s_version; } -- cgit v1.2.3 From 5b91a84230e85e8f560fb78de1fd4bf6b68e8756 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 19:27:32 -0700 Subject: Change Strings::EMPTY to char * --- toolsrc/include/vcpkg_Strings.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index 5af7c6f7c..2607caf4c 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -36,8 +36,8 @@ namespace vcpkg::Strings::details namespace vcpkg::Strings { - static constexpr const CStringView EMPTY = ""; - static constexpr const CWStringView WEMPTY = L""; + static constexpr const char* EMPTY = ""; + static constexpr const wchar_t* WEMPTY = L""; bool is_empty(const CStringView s); bool is_empty(const CWStringView s); -- cgit v1.2.3 From 992f192c5e937f22877117e64ff7a38a6447c4bc Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 19:29:12 -0700 Subject: Add System::println() with no args --- toolsrc/include/vcpkg_System.h | 1 + toolsrc/src/vcpkg_System.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h index 86bb24aad..9dd9ea8bd 100644 --- a/toolsrc/include/vcpkg_System.h +++ b/toolsrc/include/vcpkg_System.h @@ -32,6 +32,7 @@ namespace vcpkg::System warning = 14, }; + void println(); void print(const CStringView message); void println(const CStringView message); void print(const Color c, const CStringView message); diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 481f2431e..c48f719e1 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -48,8 +48,8 @@ namespace vcpkg::System std::vector supported_architectures; supported_architectures.push_back(get_host_processor()); - //AMD64 machines support to run x86 applications - if(supported_architectures.back()==CPUArchitecture::X64) + // AMD64 machines support to run x86 applications + if (supported_architectures.back() == CPUArchitecture::X64) { supported_architectures.push_back(CPUArchitecture::X86); } @@ -211,6 +211,8 @@ namespace vcpkg::System LR"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args); } + void println() { println(Strings::EMPTY); } + void print(const CStringView message) { fputs(message, stdout); } void println(const CStringView message) -- cgit v1.2.3 From 6684240090512f745bf7530b2fb4bcd31c3fb02e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 19:29:55 -0700 Subject: Use Strings::EMPTY --- toolsrc/src/PackageSpec.cpp | 4 ++-- toolsrc/src/commands_remove.cpp | 2 +- toolsrc/src/metrics.cpp | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/toolsrc/src/PackageSpec.cpp b/toolsrc/src/PackageSpec.cpp index a43bc5ff5..890de8899 100644 --- a/toolsrc/src/PackageSpec.cpp +++ b/toolsrc/src/PackageSpec.cpp @@ -38,7 +38,7 @@ namespace vcpkg for (auto&& feature : spec->features) f_specs.push_back(FeatureSpec{pspec, feature}); - if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, ""}); + if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, Strings::EMPTY}); } else { @@ -56,7 +56,7 @@ namespace vcpkg std::vector ret; for (auto&& spec : specs) { - ret.emplace_back(spec.package_spec, ""); + ret.emplace_back(spec.package_spec, Strings::EMPTY); for (auto&& feature : spec.features) ret.emplace_back(spec.package_spec, feature); } diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index db5357514..cca541c85 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -18,7 +18,7 @@ namespace vcpkg::Commands::Remove { auto& fs = paths.get_filesystem(); auto spghs = status_db->find_all(spec.name(), spec.triplet()); - auto core_pkg = **status_db->find(spec.name(), spec.triplet(), ""); + auto core_pkg = **status_db->find(spec.name(), spec.triplet(), Strings::EMPTY); for (auto&& spgh : spghs) { diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/metrics.cpp index 6263c0fcb..8a7d02a30 100644 --- a/toolsrc/src/metrics.cpp +++ b/toolsrc/src/metrics.cpp @@ -25,7 +25,7 @@ namespace vcpkg::Metrics errno_t err = gmtime_s(&newtime, &now); if (err) { - return ""; + return Strings::EMPTY; } strftime(&date[0], date.size(), "%Y-%m-%dT%H:%M:%S", &newtime); @@ -125,16 +125,16 @@ namespace vcpkg::Metrics path += L"\\kernel32.dll"; auto versz = GetFileVersionInfoSizeW(path.c_str(), nullptr); - if (versz == 0) return ""; + if (versz == 0) return Strings::EMPTY; std::vector verbuf; verbuf.resize(versz); - if (!GetFileVersionInfoW(path.c_str(), 0, static_cast(verbuf.size()), &verbuf[0])) return ""; + if (!GetFileVersionInfoW(path.c_str(), 0, static_cast(verbuf.size()), &verbuf[0])) return Strings::EMPTY; void* rootblock; UINT rootblocksize; - if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return ""; + if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return Strings::EMPTY; auto rootblock_ffi = static_cast(rootblock); @@ -377,7 +377,7 @@ namespace vcpkg::Metrics path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe"; if (fs.exists(path)) return path; - return L""; + return Strings::WEMPTY; }(); std::error_code ec; -- cgit v1.2.3 From 03c4c7f8c49d103f57fe12899526b27fc8ccc452 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 19:32:07 -0700 Subject: Use System::println() with no args --- toolsrc/src/PostBuildLint.cpp | 16 ++++++++-------- toolsrc/src/commands_build.cpp | 4 ++-- toolsrc/src/commands_install.cpp | 2 +- toolsrc/src/vcpkg_Files.cpp | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index a5d923ad2..473c81cfa 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -10,9 +10,9 @@ #include "vcpkg_System.h" #include "vcpkg_Util.h" -using vcpkg::Build::PreBuildInfo; using vcpkg::Build::BuildInfo; using vcpkg::Build::BuildPolicy; +using vcpkg::Build::PreBuildInfo; namespace vcpkg::PostBuildLint { @@ -369,12 +369,12 @@ namespace vcpkg::PostBuildLint std::vector binaries_with_invalid_architecture) { System::println(System::Color::warning, "The following files were built for an incorrect architecture:"); - System::println(""); + System::println(); for (const FileAndArch& b : binaries_with_invalid_architecture) { System::println(" %s", b.file.generic_string()); System::println("Expected %s, but was: %s", expected_architecture, b.actual_arch); - System::println(""); + System::println(); } } @@ -487,7 +487,7 @@ namespace vcpkg::PostBuildLint System::println(System::Color::warning, "Release binaries were not found"); } - System::println(""); + System::println(); return LintStatus::ERROR_DETECTED; } @@ -621,12 +621,12 @@ namespace vcpkg::PostBuildLint System::println(System::Color::warning, "Expected %s crt linkage, but the following libs had invalid crt linkage:", expected_build_type.to_string()); - System::println(""); + System::println(); for (const BuildType_and_file btf : libs_with_invalid_crt) { System::println(" %s: %s", btf.file.generic_string(), btf.build_type.to_string()); } - System::println(""); + System::println(); System::println(System::Color::warning, "To inspect the lib files, use:\n dumpbin.exe /directives mylibfile.lib"); @@ -675,12 +675,12 @@ namespace vcpkg::PostBuildLint if (!dlls_with_outdated_crt.empty()) { System::println(System::Color::warning, "Detected outdated dynamic CRT in the following files:"); - System::println(""); + System::println(); for (const OutdatedDynamicCrt_and_file btf : dlls_with_outdated_crt) { System::println(" %s: %s", btf.file.generic_string(), btf.outdated_crt.name); } - System::println(""); + System::println(); System::println(System::Color::warning, "To inspect the dll files, use:\n dumpbin.exe /dependents mydllfile.dll"); diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index 421568ce5..26a783a4b 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -68,12 +68,12 @@ namespace vcpkg::Commands::BuildCommand System::println(System::Color::error, "The build command requires all dependencies to be already installed."); System::println("The following dependencies are missing:"); - System::println(Strings::EMPTY); + System::println(); for (const auto& p : result.unmet_dependencies) { System::println(" %s", p); } - System::println(Strings::EMPTY); + System::println(); Checks::exit_fail(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index 1c474f7b0..8b1eec5eb 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -199,7 +199,7 @@ namespace vcpkg::Commands::Install bcf.core_paragraph.spec); System::print("\n "); System::println(Strings::join("\n ", intersection)); - System::println(Strings::EMPTY); + System::println(); return InstallResult::FILE_CONFLICTS; } diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg_Files.cpp index 29da7e684..24edb779f 100644 --- a/toolsrc/src/vcpkg_Files.cpp +++ b/toolsrc/src/vcpkg_Files.cpp @@ -186,11 +186,11 @@ namespace vcpkg::Files void print_paths(const std::vector& paths) { - System::println(""); + System::println(); for (const fs::path& p : paths) { System::println(" %s", p.generic_string()); } - System::println(""); + System::println(); } } -- cgit v1.2.3 From 28e581599e263e3f0b021ad5b6914d80fa9640f8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Aug 2017 19:39:33 -0700 Subject: Use Strings::EMPTY --- toolsrc/src/SourceParagraph.cpp | 4 ++-- toolsrc/src/VcpkgCmdArguments.cpp | 6 +++--- toolsrc/src/VcpkgPaths.cpp | 2 +- toolsrc/src/vcpkg_Build.cpp | 8 ++++---- toolsrc/src/vcpkg_Checks.cpp | 2 +- toolsrc/src/vcpkg_Parse.cpp | 2 +- toolsrc/src/vcpkg_Strings.cpp | 2 +- toolsrc/src/vcpkglib.cpp | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index c69770ae1..50d6ecf07 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -187,7 +187,7 @@ namespace vcpkg { return Util::fmap(depends, [&](const std::string& depend_string) -> Dependency { auto pos = depend_string.find(' '); - if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, ""); + if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, Strings::EMPTY); // expect of the form "\w+ \[\w+\]" Dependency dep; @@ -195,7 +195,7 @@ namespace vcpkg if (depend_string.c_str()[pos + 1] != '(' || depend_string[depend_string.size() - 1] != ')') { // Error, but for now just slurp the entire string. - return Dependency::parse_dependency(depend_string, ""); + return Dependency::parse_dependency(depend_string, Strings::EMPTY); } dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3); return dep; diff --git a/toolsrc/src/VcpkgCmdArguments.cpp b/toolsrc/src/VcpkgCmdArguments.cpp index cf6c7b562..e7a9b8057 100644 --- a/toolsrc/src/VcpkgCmdArguments.cpp +++ b/toolsrc/src/VcpkgCmdArguments.cpp @@ -222,17 +222,17 @@ namespace vcpkg void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count) const { - return check_max_arg_count(expected_arg_count, ""); + return check_max_arg_count(expected_arg_count, Strings::EMPTY); } void VcpkgCmdArguments::check_min_arg_count(const size_t expected_arg_count) const { - return check_min_arg_count(expected_arg_count, ""); + return check_min_arg_count(expected_arg_count, Strings::EMPTY); } void VcpkgCmdArguments::check_exact_arg_count(const size_t expected_arg_count) const { - return check_exact_arg_count(expected_arg_count, ""); + return check_exact_arg_count(expected_arg_count, Strings::EMPTY); } void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 17a11b1a9..94fbf9a93 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -133,7 +133,7 @@ namespace vcpkg fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { static constexpr std::array expected_version = {4, 1, 0}; - static const std::wstring version_check_arguments = L""; + static const std::wstring version_check_arguments = Strings::WEMPTY; const fs::path downloaded_copy = downloads_folder / "nuget-4.1.0" / "nuget.exe"; const std::vector from_path = find_from_PATH(L"nuget"); diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index bec9c9ef7..a2fa99ac8 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -30,8 +30,8 @@ namespace vcpkg::Build CWStringView to_vcvarsall_target(const std::string& cmake_system_name) { - if (cmake_system_name == "") return L""; - if (cmake_system_name == "Windows") return L""; + if (cmake_system_name == Strings::EMPTY) return Strings::WEMPTY; + if (cmake_system_name == "Windows") return Strings::WEMPTY; if (cmake_system_name == "WindowsStore") return L"store"; Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported vcvarsall target %s", cmake_system_name); @@ -61,7 +61,7 @@ namespace vcpkg::Build const wchar_t* tonull = L" >nul"; if (GlobalState::debugging) { - tonull = L""; + tonull = Strings::WEMPTY; } const auto arch = to_vcvarsall_toolchain(pre_build_info.target_architecture, toolset); @@ -359,7 +359,7 @@ namespace vcpkg::Build const bool variable_with_no_value = s.size() == 1; const std::string variable_name = s.at(0); - const std::string variable_value = variable_with_no_value ? "" : s.at(1); + const std::string variable_value = variable_with_no_value ? Strings::EMPTY : s.at(1); if (variable_name == "VCPKG_TARGET_ARCHITECTURE") { diff --git a/toolsrc/src/vcpkg_Checks.cpp b/toolsrc/src/vcpkg_Checks.cpp index 2ad2d06ab..b6a88a011 100644 --- a/toolsrc/src/vcpkg_Checks.cpp +++ b/toolsrc/src/vcpkg_Checks.cpp @@ -62,7 +62,7 @@ namespace vcpkg::Checks { if (!expression) { - exit_with_message(line_info, ""); + exit_with_message(line_info, Strings::EMPTY); } } diff --git a/toolsrc/src/vcpkg_Parse.cpp b/toolsrc/src/vcpkg_Parse.cpp index 118cde900..b54f7360b 100644 --- a/toolsrc/src/vcpkg_Parse.cpp +++ b/toolsrc/src/vcpkg_Parse.cpp @@ -30,7 +30,7 @@ namespace vcpkg::Parse } std::string ParagraphParser::optional_field(const std::string& fieldname) { - return remove_field(&fields, fieldname).value_or(""); + return remove_field(&fields, fieldname).value_or(Strings::EMPTY); } std::unique_ptr ParagraphParser::error_info(const std::string& name) const { diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index b5ea338de..d08898bce 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -133,7 +133,7 @@ namespace vcpkg::Strings trim(&s); } - Util::erase_remove_if(*strings, [](const std::string& s) { return s == ""; }); + Util::erase_remove_if(*strings, [](const std::string& s) { return Strings::is_empty(s); }); } std::vector split(const std::string& s, const std::string& delimiter) diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp index 96e9f05e1..9f47c9d61 100644 --- a/toolsrc/src/vcpkglib.cpp +++ b/toolsrc/src/vcpkglib.cpp @@ -189,7 +189,7 @@ namespace vcpkg for (const std::unique_ptr& pgh : status_db) { - if (pgh->state != InstallState::INSTALLED || pgh->package.feature != "") + if (pgh->state != InstallState::INSTALLED || !Strings::is_empty(pgh->package.feature)) { continue; } -- cgit v1.2.3 From ab78c3b6edc666d81bb4389cea70f8e8779f9e40 Mon Sep 17 00:00:00 2001 From: paercebal Date: Tue, 29 Aug 2017 17:56:11 +0200 Subject: Add doc on Vcpkg integration for custom config --- docs/about/faq.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/about/faq.md b/docs/about/faq.md index 85a0c14db..9178f9b9a 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -46,6 +46,20 @@ Yes. In the current preview, there is not yet a standardized global way to chang By saving the changes to the portfile (and checking them in), you'll get the same results even if you're rebuilding from scratch in the future and forgot what exact settings you used. +## Can I get Vcpkg integration for custom configurations? + +Yes. While Vcpkg will only produce the standard "Release" and "Debug" configurations when building a library, you can get integration support for your projects' custom configurations, in addition to your project's standard configurations. + +The MSBuild $(VcpkgConfiguration) macro, if not set in your project, will identify either the "Release" or the "Debug" configuration. You only need to override this macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration. + +For example, you can add support for your "MyRelease" configuration by adding in your project file: +``` + + Release + +``` +Of course, this will only produce viable binaries if your custom configuration is compatible with the target configuration (e.g. they should both link with the same runtime library). + ## How is CMake used internally by Vcpkg? Vcpkg uses CMake internally as a build scripting language. This is because CMake is already an extremely common build system for cross-platform open source libraries and is becoming very popular for C++ projects in general. It is easy to acquire on Windows, does not require system-wide installation, and legible for unfamiliar users. -- cgit v1.2.3 From 23649f58ec58196ff6e7f0b25f2d13f4b0c27cc9 Mon Sep 17 00:00:00 2001 From: paercebal Date: Tue, 29 Aug 2017 18:21:31 +0200 Subject: Add doc on Vcpkg integration per project --- docs/about/faq.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/about/faq.md b/docs/about/faq.md index 9178f9b9a..43039258f 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -60,6 +60,14 @@ For example, you can add support for your "MyRelease" configuration by adding in ``` Of course, this will only produce viable binaries if your custom configuration is compatible with the target configuration (e.g. they should both link with the same runtime library). +## I can't use user-wide integration. Can I use a per-project integration? + +Yes. The Visual Studio integration is actually enabled by the `\scripts\buildsystems\msbuild\vcpkg.targets` file. So all you need is to import it in your .vcxproj file, replacing `` with the path where you installed vcpkg: + +``` + +``` + ## How is CMake used internally by Vcpkg? Vcpkg uses CMake internally as a build scripting language. This is because CMake is already an extremely common build system for cross-platform open source libraries and is becoming very popular for C++ projects in general. It is easy to acquire on Windows, does not require system-wide installation, and legible for unfamiliar users. -- cgit v1.2.3 From 4fdcca314ab08d1cb53acdb87ff184967c621cec Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Wed, 30 Aug 2017 03:11:37 +0900 Subject: Apply Hotfix of Known Issues for Boost 1.65.0 Apply Hotfix of Known Issues for Boost 1.65.0. --- ports/boost/CONTROL | 2 +- ports/boost/portfile.cmake | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 2a45ca1d8..8200d54d1 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost -Version: 1.65 +Version: 1.65-1 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2 diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index b7917576d..1cab46cc1 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -13,6 +13,14 @@ vcpkg_download_distfile(ARCHIVE_FILE ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) +# apply boost combined hotfix +vcpkg_download_distfile(HOTFIX_PATCH + URLS "https://raw.githubusercontent.com/boostorg/website/master/patches/1_65_0/boost_1_65_0.patch" + FILENAME "boost_1_65_0.patch" + SHA512 8f9e654d0ee4d30b38b62b99ebfbbdeccd156c168656e1256b846bd21a3cb36d675396bd48d3f7a18d6cffba80932d40590d12e7ca1a4b51db343b3a0a39a3fd +) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${HOTFIX_PATCH}) + # apply boost range hotfix vcpkg_download_distfile(DIFF URLS "https://github.com/boostorg/range/commit/e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff" -- cgit v1.2.3 From 1362342f556087204eccd73fe39f5492090a3687 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 29 Aug 2017 11:41:08 -0700 Subject: [pthreads] init port --- ports/pthreads/CMakeLists.txt | 213 ++++++++++++++++++++++++++++++++++++++++++ ports/pthreads/CONTROL | 3 + ports/pthreads/portfile.cmake | 33 +++++++ 3 files changed, 249 insertions(+) create mode 100644 ports/pthreads/CMakeLists.txt create mode 100644 ports/pthreads/CONTROL create mode 100644 ports/pthreads/portfile.cmake diff --git a/ports/pthreads/CMakeLists.txt b/ports/pthreads/CMakeLists.txt new file mode 100644 index 000000000..d6eed5310 --- /dev/null +++ b/ports/pthreads/CMakeLists.txt @@ -0,0 +1,213 @@ +cmake_minimum_required(VERSION 3.9.0) + +project(pthreads) + +set(PTHREAD_PUBLIC_HEADERS pthread.h sched.h semaphore.h) +set(PTHREAD_PRIVATE_HEADERS config.h implement.h need_errno.h) + +set(PTHREAD_SHARED_SOURCES + autostatic.c + barrier.c + cancel.c + cleanup.c + condvar.c + create.c + dll.c + errno.c + exit.c + fork.c + global.c + misc.c + mutex.c + nonportable.c + private.c + rwlock.c + sched.c + semaphore.c + signal.c + spin.c + sync.c + tsd.c + attr.C +) +set(PTHREAD_STATIC_SOURCES + autostatic.c + cleanup.c + create.c + dll.c + errno.c + fork.c + global.c + pthread_attr_destroy.c + pthread_attr_getdetachstate.c + pthread_attr_getinheritsched.c + pthread_attr_getschedparam.c + pthread_attr_getschedpolicy.c + pthread_attr_getscope.c + pthread_attr_getstackaddr.c + pthread_attr_getstacksize.c + pthread_attr_init.c + pthread_attr_setdetachstate.c + pthread_attr_setinheritsched.c + pthread_attr_setschedparam.c + pthread_attr_setschedpolicy.c + pthread_attr_setscope.c + pthread_attr_setstackaddr.c + pthread_attr_setstacksize.c + pthread_barrier_destroy.c + pthread_barrier_init.c + pthread_barrier_wait.c + pthread_barrierattr_destroy.c + pthread_barrierattr_getpshared.c + pthread_barrierattr_init.c + pthread_barrierattr_setpshared.c + pthread_cancel.c + pthread_cond_destroy.c + pthread_cond_init.c + pthread_cond_signal.c + pthread_cond_wait.c + pthread_condattr_destroy.c + pthread_condattr_getpshared.c + pthread_condattr_init.c + pthread_condattr_setpshared.c + pthread_delay_np.c + pthread_detach.c + pthread_equal.c + pthread_exit.c + pthread_getconcurrency.c + pthread_getschedparam.c + pthread_getspecific.c + pthread_getunique_np.c + pthread_getw32threadhandle_np.c + pthread_join.c + pthread_key_create.c + pthread_key_delete.c + pthread_kill.c + pthread_mutex_consistent.c + pthread_mutex_destroy.c + pthread_mutex_init.c + pthread_mutex_lock.c + pthread_mutex_timedlock.c + pthread_mutex_trylock.c + pthread_mutex_unlock.c + pthread_mutexattr_destroy.c + pthread_mutexattr_getkind_np.c + pthread_mutexattr_getpshared.c + pthread_mutexattr_getrobust.c + pthread_mutexattr_gettype.c + pthread_mutexattr_init.c + pthread_mutexattr_setkind_np.c + pthread_mutexattr_setpshared.c + pthread_mutexattr_setrobust.c + pthread_mutexattr_settype.c + pthread_num_processors_np.c + pthread_once.c + pthread_rwlock_destroy.c + pthread_rwlock_init.c + pthread_rwlock_rdlock.c + pthread_rwlock_tryrdlock.c + pthread_rwlock_trywrlock.c + pthread_rwlock_unlock.c + pthread_rwlock_wrlock.c + pthread_rwlockattr_destroy.c + pthread_rwlockattr_getpshared.c + pthread_rwlockattr_init.c + pthread_rwlockattr_setpshared.c + pthread_self.c + pthread_setcancelstate.c + pthread_setcanceltype.c + pthread_setconcurrency.c + pthread_setschedparam.c + pthread_setspecific.c + pthread_spin_destroy.c + pthread_spin_init.c + pthread_spin_lock.c + pthread_spin_trylock.c + pthread_spin_unlock.c + pthread_testcancel.c + pthread_timechange_handler_np.c + pthread_win32_attach_detach_np.c + ptw32_calloc.c + ptw32_callUserDestroyRoutines.c + ptw32_cond_check_need_init.c + ptw32_getprocessors.c + ptw32_is_attr.c + ptw32_MCS_lock.c + ptw32_mutex_check_need_init.c + ptw32_new.c + ptw32_processInitialize.c + ptw32_processTerminate.c + ptw32_relmillisecs.c + ptw32_reuse.c + ptw32_rwlock_check_need_init.c + ptw32_semwait.c + ptw32_spinlock_check_need_init.c + ptw32_threadDestroy.c + ptw32_threadStart.c + ptw32_throw.c + ptw32_timespec.c + ptw32_tkAssocCreate.c + ptw32_tkAssocDestroy.c + sched_get_priority_max.c + sched_get_priority_min.c + sched_getscheduler.c + sched_setscheduler.c + sched_yield.c + sem_close.c + sem_destroy.c + sem_getvalue.c + sem_init.c + sem_open.c + sem_post_multiple.c + sem_post.c + sem_timedwait.c + sem_trywait.c + sem_unlink.c + sem_wait.c + signal.c + w32_CancelableWait.c +) + + + +option(PTW32_ARCH "x32") +add_definitions(-DPTW32_ARCH=${PTW32_ARCH} -DDPTW32_RC_MSC -DHAVE_PTW32_CONFIG_H -D_TIMESPEC_DEFINED) + +if(BUILD_SHARED_LIBS) + set(PTHREAD_SOURCES ${PTHREAD_SHARED_SOURCES}) + add_definitions(-DPTW32_BUILD) +else() + set(PTHREAD_SOURCES ${PTHREAD_STATIC_SOURCES}) + add_definitions(-DPTW32_STATIC_LIB) +endif() + + +if(PTHREADS_BUILD_CPP) + set(PTHREADS_EXCEPTION_SCHEME CE) + add_definitions(/__CLEANUP_CXX) +elseif(PTHREADS_BUILD_SEH) + set(PTHREADS_EXCEPTION_SCHEME SE) + add_definitions(/__CLEANUP_SEH) + set(PTHREADS_EXCEPTION_SCHEME C) +endif() + +set(PTHREADS_COMPATIBILITY_VERSION 2) +set(CMAKE_DEBUG_POSTFIX d) +set(PTHREADS_COMPILER V) + +set(PTHREADS_LIBRARY "pthreads${PTHREADS_COMPILER}${PTHREADS_EXCEPTION_SCHEME}${PTHREADS_COMPATIBILITY_VERSION}") + +include_directories(.) + +add_library(${PTHREADS_LIBRARY} ${PTHREAD_SOURCES}) + +install( + TARGETS ${PTHREADS_LIBRARY} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${PTHREAD_PUBLIC_HEADERS} DESTINATION include) +endif() diff --git a/ports/pthreads/CONTROL b/ports/pthreads/CONTROL new file mode 100644 index 000000000..81b97f70b --- /dev/null +++ b/ports/pthreads/CONTROL @@ -0,0 +1,3 @@ +Source: pthreads +Version: 2.9.1 +Description: pthreads for windows diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake new file mode 100644 index 000000000..813554a87 --- /dev/null +++ b/ports/pthreads/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pthreads-w32-2-9-1-release) +vcpkg_download_distfile(ARCHIVE + URLS "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz" + FILENAME "pthreads-w32-2-9-1-release.tar.gz" + SHA512 9c06e85310766834370c3dceb83faafd397da18a32411ca7645c8eb6b9495fea54ca2872f4a3e8d83cb5fdc5dea7f3f0464be5bb9af3222a6534574a184bd551 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DPTW32_ARCH=${VCPKG_TARGET_ARCHITECTURE} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/*.h") +foreach(HEADER ${HEADERS}) + file(READ "${HEADER}" _contents) + string(REPLACE "!defined(_TIMESPEC_DEFINED)" "0" _contents "${_contents}") + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "!defined(PTW32_STATIC_LIB)" "0" _contents "${_contents}") + endif() + file(WRITE "${HEADER}" "${_contents}") +endforeach() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads RENAME copyright) -- cgit v1.2.3 From adb8142329ad7cd53d21c311e414bf458bb46cd1 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Tue, 29 Aug 2017 12:15:35 -0700 Subject: [pthreads] Fix macros --- ports/pthreads/CMakeLists.txt | 4 ++-- ports/pthreads/portfile.cmake | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/pthreads/CMakeLists.txt b/ports/pthreads/CMakeLists.txt index d6eed5310..7ae6bcc34 100644 --- a/ports/pthreads/CMakeLists.txt +++ b/ports/pthreads/CMakeLists.txt @@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.9.0) project(pthreads) set(PTHREAD_PUBLIC_HEADERS pthread.h sched.h semaphore.h) -set(PTHREAD_PRIVATE_HEADERS config.h implement.h need_errno.h) set(PTHREAD_SHARED_SOURCES autostatic.c @@ -171,7 +170,7 @@ set(PTHREAD_STATIC_SOURCES option(PTW32_ARCH "x32") -add_definitions(-DPTW32_ARCH=${PTW32_ARCH} -DDPTW32_RC_MSC -DHAVE_PTW32_CONFIG_H -D_TIMESPEC_DEFINED) +add_definitions(-DPTW32_ARCH=${PTW32_ARCH} -DPTW32_RC_MSC -DHAVE_PTW32_CONFIG_H -D_TIMESPEC_DEFINED) if(BUILD_SHARED_LIBS) set(PTHREAD_SOURCES ${PTHREAD_SHARED_SOURCES}) @@ -188,6 +187,7 @@ if(PTHREADS_BUILD_CPP) elseif(PTHREADS_BUILD_SEH) set(PTHREADS_EXCEPTION_SCHEME SE) add_definitions(/__CLEANUP_SEH) +else() set(PTHREADS_EXCEPTION_SCHEME C) endif() diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index 813554a87..cabf8a39b 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -23,7 +23,8 @@ vcpkg_copy_pdbs() file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/*.h") foreach(HEADER ${HEADERS}) file(READ "${HEADER}" _contents) - string(REPLACE "!defined(_TIMESPEC_DEFINED)" "0" _contents "${_contents}") + string(REPLACE "defined(_TIMESPEC_DEFINED)" "1" _contents "${_contents}") + string(REPLACE "defined(PTW32_RC_MSC)" "1" _contents "${_contents}") if(VCPKG_LIBRARY_LINKAGE STREQUAL static) string(REPLACE "!defined(PTW32_STATIC_LIB)" "0" _contents "${_contents}") endif() -- cgit v1.2.3 From 27d5f57cdba744d8039b7bbf780efe5623ceaacb Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 29 Aug 2017 14:42:32 -0700 Subject: [boost] Use fixed commit for 1.65 patch --- ports/boost/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 1cab46cc1..3ed0ed9c5 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_extract_source_archive(${ARCHIVE_FILE}) # apply boost combined hotfix vcpkg_download_distfile(HOTFIX_PATCH - URLS "https://raw.githubusercontent.com/boostorg/website/master/patches/1_65_0/boost_1_65_0.patch" + URLS "https://raw.githubusercontent.com/boostorg/website/6c3b630f2c621b78d983e882cefae7ffdf8383b8/patches/1_65_0/boost_1_65_0.patch" FILENAME "boost_1_65_0.patch" SHA512 8f9e654d0ee4d30b38b62b99ebfbbdeccd156c168656e1256b846bd21a3cb36d675396bd48d3f7a18d6cffba80932d40590d12e7ca1a4b51db343b3a0a39a3fd ) -- cgit v1.2.3 From 97b04a0b959badbecdb7604ba1fd3058a23f8b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabien=20P=C3=A9an?= Date: Wed, 30 Aug 2017 00:12:23 +0200 Subject: Add CMake function vcpkg_from_bitbucket --- scripts/cmake/vcpkg_common_functions.cmake | 1 + scripts/cmake/vcpkg_from_bitbucket.cmake | 190 +++++++++++++++++++++++++++++ 2 files changed, 191 insertions(+) create mode 100644 scripts/cmake/vcpkg_from_bitbucket.cmake diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 29f0f8dff..81e8e5813 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -6,6 +6,7 @@ include(vcpkg_execute_required_process_repeat) include(vcpkg_find_acquire_program) include(vcpkg_fixup_cmake_targets) include(vcpkg_from_github) +include(vcpkg_from_bitbucket) include(vcpkg_build_cmake) include(vcpkg_build_msbuild) include(vcpkg_build_qmake) diff --git a/scripts/cmake/vcpkg_from_bitbucket.cmake b/scripts/cmake/vcpkg_from_bitbucket.cmake new file mode 100644 index 000000000..227de5141 --- /dev/null +++ b/scripts/cmake/vcpkg_from_bitbucket.cmake @@ -0,0 +1,190 @@ +## # vcpkg_from_bitbucket +## +## Download and extract a project from Bitbucket. +## Enables support for installing HEAD `vcpkg.exe install --head `. +## +## ## Usage: +## ```cmake +## vcpkg_from_bitbucket( +## OUT_SOURCE_PATH +## REPO +## [REF ] +## [SHA512 <45d0d7f8cc350...>] +## [HEAD_REF ] +## ) +## ``` +## +## ## Parameters: +## ### OUT_SOURCE_PATH +## Specifies the out-variable that will contain the extracted location. +## +## This should be set to `SOURCE_PATH` by convention. +## +## ### REPO +## The organization or user and repository on GitHub. +## +## ### REF +## A stable git commit-ish (ideally a tag) 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. +## +## If `REF` is specified, `SHA512` must also be specified. +## +## ### SHA512 +## The SHA512 hash that should match the archive (https://bitbucket.com/${REPO}/get/${REF}.tar.gz). +## +## This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. +## +## ### HEAD_REF +## The unstable git commit-ish (ideally a branch) to pull for `--head` builds. +## +## For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. +## +## ## Notes: +## At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. +## +## This exports the `VCPKG_HEAD_VERSION` variable during head builds. +## +## ## Examples: +## +## * [blaze](https://github.com/Microsoft/vcpkg/blob/master/ports/blaze/portfile.cmake) +function(vcpkg_from_bitbucket) + set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 HEAD_REF) + set(multipleValuesArgs) + cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + + if(NOT _vdud_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + endif() + + if((_vdud_REF AND NOT _vdud_SHA512) OR (NOT _vdud_REF AND _vdud_SHA512)) + message(FATAL_ERROR "SHA512 must be specified if REF is specified.") + endif() + + if(NOT _vdud_REPO) + message(FATAL_ERROR "The Bitbucket repository must be specified.") + endif() + + if(NOT _vdud_REF AND NOT _vdud_HEAD_REF) + message(FATAL_ERROR "At least one of REF and HEAD_REF must be specified.") + endif() + + string(REGEX REPLACE ".*/" "" REPO_NAME ${_vdud_REPO}) + string(REGEX REPLACE "/.*" "" ORG_NAME ${_vdud_REPO}) + + macro(set_SOURCE_PATH BASE BASEREF) + set(SOURCE_PATH "${BASE}/${ORG_NAME}-${REPO_NAME}-${BASEREF}") + if(EXISTS ${SOURCE_PATH}) + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + else() + # Sometimes GitHub strips a leading 'v' off the REF. + string(REGEX REPLACE "^v" "" REF ${BASEREF}) + set(SOURCE_PATH "${BASE}/${ORG_NAME}-${REPO_NAME}-${REF}") + if(EXISTS ${SOURCE_PATH}) + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + else() + message(FATAL_ERROR "Could not determine source path: '${BASE}/${ORG_NAME}-${REPO_NAME}-${BASEREF}' does not exist") + endif() + endif() + endmacro() + + if(VCPKG_USE_HEAD_VERSION AND NOT _vdud_HEAD_REF) + message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") + set(VCPKG_USE_HEAD_VERSION OFF) + endif() + + # Handle --no-head scenarios + if(NOT VCPKG_USE_HEAD_VERSION) + if(NOT _vdud_REF) + message(FATAL_ERROR "Package does not specify REF. It must built using --head.") + endif() + + set(URL "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz") + set(downloaded_file_path "${DOWNLOADS}/${ORG_NAME}-${REPO_NAME}-${_vdud_REF}.tar.gz") + + file(DOWNLOAD "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/tags/${_vdud_REF}" + ${downloaded_file_path}.version + STATUS download_status + ) + list(GET download_status 0 status_code) + if ("${status_code}" STREQUAL "0") + # Parse the github refs response with regex. + # TODO: use some JSON swiss-army-knife utility instead. + file(READ "${downloaded_file_path}.version" _contents) + string(REGEX MATCH "\"hash\": \"[a-f0-9]+\"" x "${_contents}") + string(REGEX REPLACE "\"hash\": \"([a-f0-9]+)\"" "\\1" _version ${x}) + string(SUBSTRING ${_version} 0 12 _version) # Get the 12 first numbers from commit hash + else() + set(_version ${_vdud_REF}) + endif() + + vcpkg_download_distfile(ARCHIVE + URLS "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz" + SHA512 "${_vdud_SHA512}" + FILENAME "${ORG_NAME}-${REPO_NAME}-${_vdud_REF}.tar.gz" + ) + vcpkg_extract_source_archive_ex(ARCHIVE "${ARCHIVE}") + set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src ${_version}) + return() + endif() + + # The following is for --head scenarios + set(URL "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_HEAD_REF}.tar.gz") + set(downloaded_file_path "${DOWNLOADS}/${ORG_NAME}-${REPO_NAME}-${_vdud_HEAD_REF}.tar.gz") + + if(_VCPKG_NO_DOWNLOADS) + if(NOT EXISTS ${downloaded_file_path} OR NOT EXISTS ${downloaded_file_path}.version) + message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") + endif() + message(STATUS "Using cached ${downloaded_file_path}") + else() + if(EXISTS ${downloaded_file_path}) + message(STATUS "Purging cached ${downloaded_file_path} to fetch latest (use --no-downloads to suppress)") + file(REMOVE ${downloaded_file_path}) + endif() + if(EXISTS ${downloaded_file_path}.version) + file(REMOVE ${downloaded_file_path}.version) + endif() + if(EXISTS ${CURRENT_BUILDTREES_DIR}/src/head) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/head) + endif() + + # Try to download the file and version information from bitbucket. + message(STATUS "Downloading ${URL}...") + file(DOWNLOAD "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/branches/${_vdud_HEAD_REF}" + ${downloaded_file_path}.version + STATUS download_status + ) + list(GET download_status 0 status_code) + if (NOT "${status_code}" STREQUAL "0") + file(REMOVE ${downloaded_file_path}.version) + message(FATAL_ERROR "Downloading version info for ${URL}... Failed. Status: ${download_status}") + endif() + + file(DOWNLOAD ${URL} ${downloaded_file_path} STATUS download_status) + list(GET download_status 0 status_code) + if (NOT "${status_code}" STREQUAL "0") + file(REMOVE ${downloaded_file_path}) + message(FATAL_ERROR "Downloading ${URL}... Failed. Status: ${download_status}") + else() + message(STATUS "Downloading ${URL}... OK") + endif() + endif() + + vcpkg_extract_source_archive_ex( + ARCHIVE "${downloaded_file_path}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/head" + ) + + # Parse the github refs response with regex. + # TODO: use some JSON swiss-army-knife utility instead. + file(READ "${downloaded_file_path}.version" _contents) + string(REGEX MATCH "\"hash\": \"[a-f0-9]+\"" x "${_contents}") + string(REGEX REPLACE "\"hash\": \"([a-f0-9]+)\"" "\\1" _version ${x}) + string(SUBSTRING ${_version} 0 12 _vdud_HEAD_REF) # Get the 12 first numbers from commit hash + + # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. + set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) + + set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/head ${_vdud_HEAD_REF}) +endfunction() -- cgit v1.2.3 From 6b5e39848a9b1bf2e4afd688863ebd50620caddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabien=20P=C3=A9an?= Date: Wed, 30 Aug 2017 00:15:28 +0200 Subject: [blaze] Use vcpkg_from_bitbucket in portfile --- ports/blaze/portfile.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/blaze/portfile.cmake b/ports/blaze/portfile.cmake index 3225e99d4..a8fc5ab1e 100644 --- a/ports/blaze/portfile.cmake +++ b/ports/blaze/portfile.cmake @@ -1,13 +1,13 @@ #header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/blaze-3.2) -vcpkg_download_distfile(ARCHIVE - URLS "https://bitbucket.org/blaze-lib/blaze/downloads/blaze-3.2.tar.gz" - FILENAME "blaze-3.2.tar.gz" - SHA512 33d2bb0a49a33e71c88a45ab9e8418160c09b877b3ebe5ff7aa48ec0973e28e8a282374604d56f1b5cf2722946e4ca84aa2b401a341240a2ab9debd72505148e +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO blaze-lib/blaze + REF v3.2 + SHA512 f9a50c454125fe194f0d1fb259c5440c82068d41880a228fbd15fe383b6ef4198557daa406a08809065eedf223fc0c55d2309cc00ef549a3fc1a2a89e6d4b445 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) # Copy the blaze header files file(COPY "${SOURCE_PATH}/blaze" -- cgit v1.2.3 From 5337adf1078f27c993f01662b7dadb8da2801356 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 29 Aug 2017 16:20:21 -0700 Subject: Remove Strings::is_empty(). Use std::string.empty() --- toolsrc/include/vcpkg_Strings.h | 3 --- toolsrc/src/BinaryParagraph.cpp | 2 +- toolsrc/src/vcpkg_Dependencies.cpp | 6 +++--- toolsrc/src/vcpkg_Strings.cpp | 5 +---- toolsrc/src/vcpkglib.cpp | 2 +- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index 2607caf4c..61f6fab61 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -39,9 +39,6 @@ namespace vcpkg::Strings static constexpr const char* EMPTY = ""; static constexpr const wchar_t* WEMPTY = L""; - bool is_empty(const CStringView s); - bool is_empty(const CWStringView s); - template std::string format(const char* fmtstr, const Args&... args) { diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp index 1ab1aa63e..1504912ab 100644 --- a/toolsrc/src/BinaryParagraph.cpp +++ b/toolsrc/src/BinaryParagraph.cpp @@ -89,7 +89,7 @@ namespace vcpkg std::string BinaryParagraph::displayname() const { - const auto f = Strings::is_empty(this->feature) ? "core" : this->feature; + const auto f = this->feature.empty() ? "core" : this->feature; return Strings::format("%s[%s]:%s", this->spec.name(), f, this->spec.triplet()); } diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 4d0c3c928..1a0f0a6ed 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -443,7 +443,7 @@ namespace vcpkg::Dependencies MarkPlusResult mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) { - if (feature == "") + if (feature.empty()) { // Indicates that core was not specified in the reference return mark_plus("core", cluster, graph, graph_plan); @@ -551,7 +551,7 @@ namespace vcpkg::Dependencies auto& status_paragraph_feature = status_paragraph->package.feature; // In this case, empty string indicates the "core" paragraph for a package. - if (status_paragraph_feature == "") + if (status_paragraph_feature.empty()) { cluster.original_features.insert("core"); } @@ -573,7 +573,7 @@ namespace vcpkg::Dependencies auto& dep_cluster = graph.get(dependency.spec()); auto depends_name = dependency.feature(); - if (depends_name == "") depends_name = "core"; + if (depends_name.empty()) depends_name = "core"; auto& target_node = dep_cluster.edges[depends_name]; target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index d08898bce..15851829d 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -71,9 +71,6 @@ namespace vcpkg::Strings::details namespace vcpkg::Strings { - bool is_empty(const CStringView s) { return s == EMPTY; } - bool is_empty(const CWStringView s) { return s == WEMPTY; } - std::wstring to_utf16(const CStringView s) { std::wstring_convert, wchar_t> conversion; @@ -133,7 +130,7 @@ namespace vcpkg::Strings trim(&s); } - Util::erase_remove_if(*strings, [](const std::string& s) { return Strings::is_empty(s); }); + Util::erase_remove_if(*strings, [](const std::string& s) { return s.empty(); }); } std::vector split(const std::string& s, const std::string& delimiter) diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp index 9f47c9d61..14d062468 100644 --- a/toolsrc/src/vcpkglib.cpp +++ b/toolsrc/src/vcpkglib.cpp @@ -189,7 +189,7 @@ namespace vcpkg for (const std::unique_ptr& pgh : status_db) { - if (pgh->state != InstallState::INSTALLED || !Strings::is_empty(pgh->package.feature)) + if (pgh->state != InstallState::INSTALLED || !pgh->package.feature.empty()) { continue; } -- cgit v1.2.3 From 526b1436a16b5c60760cbfc16a7f64e49cf13a01 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 29 Aug 2017 17:02:33 -0700 Subject: [vcpkg] Dependency instead of installcmd --- toolsrc/src/VcpkgPaths.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 94fbf9a93..1a8693efc 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -90,7 +90,7 @@ namespace vcpkg { auto locked_metrics = Metrics::g_metrics.lock(); locked_metrics->track_property("error", "powershell install failed"); - locked_metrics->track_property("installcmd", install_cmd); + locked_metrics->track_property("dependency", tool_name); } Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); } -- cgit v1.2.3 From 765068fa70259be5487db2ffc4ea3e6b6e4d73bd Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 29 Aug 2017 19:04:47 -0700 Subject: [vcpkg] Refactor workaround for issue #1712. This should be removed once the root cause is found. --- toolsrc/src/VcpkgPaths.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 1fe92014c..ef9209b78 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -10,6 +10,16 @@ namespace vcpkg { + static std::string WORKAROUND_ISSUE_1712(const std::string& line) + { + auto colon_pos = line.find(':'); + if (colon_pos != std::string::npos && colon_pos > 0) + { + return line.substr(colon_pos - 1); + } + return line; + } + static bool exists_and_has_equal_or_greater_version(const std::wstring& version_cmd, const std::array& expected_version) { @@ -95,7 +105,7 @@ namespace vcpkg Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); } - const fs::path actual_downloaded_path = Strings::trimmed(rc.output); + const fs::path actual_downloaded_path = WORKAROUND_ISSUE_1712(Strings::trimmed(rc.output)); std::error_code ec; auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); Checks::check_exit(VCPKG_LINE_INFO, @@ -264,14 +274,7 @@ namespace vcpkg const std::wstring cmd = System::create_powershell_script_cmd(script); System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd); Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect VS 2017 instances"); - return Util::fmap(Strings::split(ec_data.output, "\n"), [](const std::string& line) { - auto colon_pos = line.find(':'); - if (colon_pos != std::string::npos && colon_pos > 0) - { - return line.substr(colon_pos - 1); - } - return line; - }); + return Util::fmap(Strings::split(ec_data.output, "\n"), WORKAROUND_ISSUE_1712); } static Optional get_VS2015_installation_instance() -- cgit v1.2.3 From 673bb9e19e37efc62181e6d5e195053f9ee48886 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 29 Aug 2017 18:57:38 -0700 Subject: Add missing const --- toolsrc/src/vcpkg_System.cpp | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index db4dfec9b..b769d6d57 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -19,7 +19,7 @@ namespace vcpkg::System fs::path get_exe_path_of_current_process() { wchar_t buf[_MAX_PATH]; - int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); + const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); if (bytes == 0) std::abort(); return fs::path(buf, buf + bytes); } @@ -37,9 +37,9 @@ namespace vcpkg::System CPUArchitecture get_host_processor() { auto w6432 = get_environment_variable(L"PROCESSOR_ARCHITEW6432"); - if (auto p = w6432.get()) return to_cpu_architecture(Strings::to_utf8(*p)).value_or_exit(VCPKG_LINE_INFO); + if (const auto p = w6432.get()) return to_cpu_architecture(Strings::to_utf8(*p)).value_or_exit(VCPKG_LINE_INFO); - auto procarch = get_environment_variable(L"PROCESSOR_ARCHITECTURE").value_or_exit(VCPKG_LINE_INFO); + const auto procarch = get_environment_variable(L"PROCESSOR_ARCHITECTURE").value_or_exit(VCPKG_LINE_INFO); return to_cpu_architecture(Strings::to_utf8(procarch)).value_or_exit(VCPKG_LINE_INFO); } @@ -59,10 +59,10 @@ namespace vcpkg::System int cmd_execute_clean(const CWStringView cmd_line) { - static const std::wstring system_root = get_environment_variable(L"SystemRoot").value_or_exit(VCPKG_LINE_INFO); - static const std::wstring system_32 = system_root + LR"(\system32)"; - static const std::wstring new_PATH = Strings::wformat( - LR"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", system_32, system_root, system_32, system_32); + static const std::wstring SYSTEM_ROOT = get_environment_variable(L"SystemRoot").value_or_exit(VCPKG_LINE_INFO); + static const std::wstring SYSTEM_32 = SYSTEM_ROOT + LR"(\system32)"; + static const std::wstring NEW_PATH = Strings::wformat( + LR"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", SYSTEM_32, SYSTEM_ROOT, SYSTEM_32, SYSTEM_32); std::vector env_wstrings = { L"ALLUSERSPROFILE", @@ -116,7 +116,7 @@ namespace vcpkg::System for (auto&& env_wstring : env_wstrings) { const Optional value = System::get_environment_variable(env_wstring); - auto v = value.get(); + const auto v = value.get(); if (!v || v->empty()) continue; env_cstr.append(env_wstring); @@ -125,7 +125,7 @@ namespace vcpkg::System env_cstr.push_back(L'\0'); } - env_cstr.append(new_PATH); + env_cstr.append(NEW_PATH); env_cstr.push_back(L'\0'); STARTUPINFOW startup_info; @@ -153,7 +153,7 @@ namespace vcpkg::System CloseHandle(process_info.hThread); - DWORD result = WaitForSingleObject(process_info.hProcess, INFINITE); + const DWORD result = WaitForSingleObject(process_info.hProcess, INFINITE); Checks::check_exit(VCPKG_LINE_INFO, result != WAIT_FAILED, "WaitForSingleObject failed"); DWORD exit_code = 0; @@ -171,7 +171,7 @@ namespace vcpkg::System // Basically we are wrapping it in quotes const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line); Debug::println("_wsystem(%s)", Strings::to_utf8(actual_cmd_line)); - int exit_code = _wsystem(actual_cmd_line.c_str()); + const int exit_code = _wsystem(actual_cmd_line.c_str()); Debug::println("_wsystem() returned %d", exit_code); return exit_code; } @@ -186,7 +186,7 @@ namespace vcpkg::System Debug::println("_wpopen(%s)", Strings::to_utf8(actual_cmd_line)); std::wstring output; wchar_t buf[1024]; - auto pipe = _wpopen(actual_cmd_line.c_str(), L"r"); + const auto pipe = _wpopen(actual_cmd_line.c_str(), L"r"); if (pipe == nullptr) { return {1, Strings::to_utf8(output)}; @@ -199,7 +199,8 @@ namespace vcpkg::System { return {1, Strings::to_utf8(output)}; } - auto ec = _pclose(pipe); + + const auto ec = _pclose(pipe); Debug::println("_pclose() returned %d", ec); return {ec, Strings::to_utf8(output)}; } @@ -223,11 +224,11 @@ namespace vcpkg::System void print(const Color c, const CStringView message) { - HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); + const HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO consoleScreenBufferInfo{}; GetConsoleScreenBufferInfo(hConsole, &consoleScreenBufferInfo); - auto original_color = consoleScreenBufferInfo.wAttributes; + const auto original_color = consoleScreenBufferInfo.wAttributes; SetConsoleTextAttribute(hConsole, static_cast(c) | (original_color & 0xF0)); print(message); @@ -242,13 +243,13 @@ namespace vcpkg::System Optional get_environment_variable(const CWStringView varname) noexcept { - auto sz = GetEnvironmentVariableW(varname, nullptr, 0); + const auto sz = GetEnvironmentVariableW(varname, nullptr, 0); if (sz == 0) return nullopt; std::wstring ret(sz, L'\0'); Checks::check_exit(VCPKG_LINE_INFO, MAXDWORD >= ret.size()); - auto sz2 = GetEnvironmentVariableW(varname, ret.data(), static_cast(ret.size())); + const auto sz2 = GetEnvironmentVariableW(varname, ret.data(), static_cast(ret.size())); Checks::check_exit(VCPKG_LINE_INFO, sz2 + 1 == sz); ret.pop_back(); return ret; @@ -262,7 +263,7 @@ namespace vcpkg::System Optional get_registry_string(HKEY base, const CWStringView subKey, const CWStringView valuename) { HKEY k = nullptr; - LSTATUS ec = RegOpenKeyExW(base, subKey, NULL, KEY_READ, &k); + const LSTATUS ec = RegOpenKeyExW(base, subKey, NULL, KEY_READ, &k); if (ec != ERROR_SUCCESS) return nullopt; DWORD dwBufferSize = 0; -- cgit v1.2.3 From 130d9019dfddc491dafe762a0dde41f5d3ada87e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 29 Aug 2017 18:59:00 -0700 Subject: Naming convention fixes --- toolsrc/src/vcpkg_System.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index b769d6d57..f5106b25e 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -224,15 +224,15 @@ namespace vcpkg::System void print(const Color c, const CStringView message) { - const HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); + const HANDLE console_handle = GetStdHandle(STD_OUTPUT_HANDLE); - CONSOLE_SCREEN_BUFFER_INFO consoleScreenBufferInfo{}; - GetConsoleScreenBufferInfo(hConsole, &consoleScreenBufferInfo); - const auto original_color = consoleScreenBufferInfo.wAttributes; + CONSOLE_SCREEN_BUFFER_INFO console_screen_buffer_info{}; + GetConsoleScreenBufferInfo(console_handle, &console_screen_buffer_info); + const auto original_color = console_screen_buffer_info.wAttributes; - SetConsoleTextAttribute(hConsole, static_cast(c) | (original_color & 0xF0)); + SetConsoleTextAttribute(console_handle, static_cast(c) | (original_color & 0xF0)); print(message); - SetConsoleTextAttribute(hConsole, original_color); + SetConsoleTextAttribute(console_handle, original_color); } void println(const Color c, const CStringView message) @@ -260,23 +260,23 @@ namespace vcpkg::System return hkey_type == REG_SZ || hkey_type == REG_MULTI_SZ || hkey_type == REG_EXPAND_SZ; } - Optional get_registry_string(HKEY base, const CWStringView subKey, const CWStringView valuename) + Optional get_registry_string(HKEY base, const CWStringView sub_key, const CWStringView valuename) { HKEY k = nullptr; - const LSTATUS ec = RegOpenKeyExW(base, subKey, NULL, KEY_READ, &k); + const LSTATUS ec = RegOpenKeyExW(base, sub_key, NULL, KEY_READ, &k); if (ec != ERROR_SUCCESS) return nullopt; - DWORD dwBufferSize = 0; - DWORD dwType = 0; - auto rc = RegQueryValueExW(k, valuename, nullptr, &dwType, nullptr, &dwBufferSize); - if (rc != ERROR_SUCCESS || !is_string_keytype(dwType) || dwBufferSize == 0 || - dwBufferSize % sizeof(wchar_t) != 0) + DWORD dw_buffer_size = 0; + DWORD dw_type = 0; + auto rc = RegQueryValueExW(k, valuename, nullptr, &dw_type, nullptr, &dw_buffer_size); + if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size == 0 || + dw_buffer_size % sizeof(wchar_t) != 0) return nullopt; std::wstring ret; - ret.resize(dwBufferSize / sizeof(wchar_t)); + ret.resize(dw_buffer_size / sizeof(wchar_t)); - rc = RegQueryValueExW(k, valuename, nullptr, &dwType, reinterpret_cast(ret.data()), &dwBufferSize); - if (rc != ERROR_SUCCESS || !is_string_keytype(dwType) || dwBufferSize != sizeof(wchar_t) * ret.size()) + rc = RegQueryValueExW(k, valuename, nullptr, &dw_type, reinterpret_cast(ret.data()), &dw_buffer_size); + if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size != sizeof(wchar_t) * ret.size()) return nullopt; ret.pop_back(); // remove extra trailing null byte -- cgit v1.2.3 From 3063bf5be34f9a285e1a84fb9c70195933122d72 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 29 Aug 2017 19:02:22 -0700 Subject: Add missing const --- toolsrc/src/vcpkglib.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp index 14d062468..5cdafdbc8 100644 --- a/toolsrc/src/vcpkglib.cpp +++ b/toolsrc/src/vcpkglib.cpp @@ -39,7 +39,7 @@ namespace vcpkg { auto& fs = paths.get_filesystem(); - auto updates_dir = paths.vcpkg_dir_updates; + const auto updates_dir = paths.vcpkg_dir_updates; std::error_code ec; fs.create_directory(paths.installed, ec); @@ -90,9 +90,9 @@ namespace vcpkg static int update_id = 0; auto& fs = paths.get_filesystem(); - auto my_update_id = update_id++; - auto tmp_update_filename = paths.vcpkg_dir_updates / "incomplete"; - auto update_filename = paths.vcpkg_dir_updates / std::to_string(my_update_id); + const auto my_update_id = update_id++; + const auto tmp_update_filename = paths.vcpkg_dir_updates / "incomplete"; + const auto update_filename = paths.vcpkg_dir_updates / std::to_string(my_update_id); fs.write_contents(tmp_update_filename, Strings::serialize(p)); fs.rename(tmp_update_filename, update_filename); @@ -233,7 +233,7 @@ namespace vcpkg const fs::path& cmake_script, const std::vector& pass_variables) { - std::wstring cmd_cmake_pass_variables = Strings::join(L" ", pass_variables, [](auto&& v) { return v.s; }); + const std::wstring cmd_cmake_pass_variables = Strings::join(L" ", pass_variables, [](auto&& v) { return v.s; }); return Strings::wformat( LR"("%s" %s -P "%s")", cmake_exe.native(), cmd_cmake_pass_variables, cmake_script.generic_wstring()); } -- cgit v1.2.3 From 6b1fc769a64eb18ec25e289347ce2043968f706f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 29 Aug 2017 19:21:01 -0700 Subject: Add missing const --- toolsrc/src/VcpkgCmdArguments.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/VcpkgCmdArguments.cpp b/toolsrc/src/VcpkgCmdArguments.cpp index e7a9b8057..cb261930e 100644 --- a/toolsrc/src/VcpkgCmdArguments.cpp +++ b/toolsrc/src/VcpkgCmdArguments.cpp @@ -124,7 +124,7 @@ namespace vcpkg continue; } - auto eq_pos = arg.find('='); + 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)); @@ -158,7 +158,7 @@ namespace vcpkg auto options_copy = this->optional_command_arguments; for (const std::string& option : valid_switches) { - auto it = options_copy.find(option); + const auto it = options_copy.find(option); if (it != options_copy.end()) { if (it->second.has_value()) @@ -177,7 +177,7 @@ namespace vcpkg for (const std::string& option : valid_settings) { - auto it = options_copy.find(option); + const auto it = options_copy.find(option); if (it != options_copy.end()) { if (!it->second.has_value()) -- cgit v1.2.3 From 345527b3652aeb4b016dcf6cba030d5e316c62a1 Mon Sep 17 00:00:00 2001 From: Raynor Vliegendhart Date: Wed, 30 Aug 2017 07:19:34 +0200 Subject: [libxml2] Add http mirror On some networks, access to FTP sites is restricted. In order to still download, build and install libxml2, an http mirror has to be added to the cmake file. --- ports/libxml2/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake index de98368c9..d50183f1d 100644 --- a/ports/libxml2/portfile.cmake +++ b/ports/libxml2/portfile.cmake @@ -9,7 +9,7 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxml2-2.9.4) vcpkg_download_distfile(ARCHIVE - URLS "ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz" + URLS "ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz" "http://xmlsoft.org/sources/libxml2-2.9.4.tar.gz" FILENAME "libxml2-2.9.4.tar.gz" SHA512 f5174ab1a3a0ec0037a47f47aa47def36674e02bfb42b57f609563f84c6247c585dbbb133c056953a5adb968d328f18cbc102eb0d00d48eb7c95478389e5daf9 ) @@ -29,4 +29,4 @@ vcpkg_install_cmake() file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxml2) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libxml2/COPYING ${CURRENT_PACKAGES_DIR}/share/libxml2/copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() -- cgit v1.2.3 From 2e2c7e51b3d0419c87569e8aa5a42e3eb71b9aa7 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 12 Aug 2017 05:33:01 +0200 Subject: libmad: put "mad.h" header in include path --- ports/libmad/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libmad/CMakeLists.txt b/ports/libmad/CMakeLists.txt index 8e15017c0..522c0fbea 100644 --- a/ports/libmad/CMakeLists.txt +++ b/ports/libmad/CMakeLists.txt @@ -53,5 +53,5 @@ install( install( FILES mad.h - DESTINATION include/mad + DESTINATION include ) -- cgit v1.2.3 From 059e1e487f5e3b31a0a445484545a78300425d4c Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 30 Aug 2017 14:36:57 +0200 Subject: libmad: use the default floating point module --- ports/libmad/portfile.cmake | 5 +++++ ports/libmad/use_fpm_default.patch | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ports/libmad/use_fpm_default.patch diff --git a/ports/libmad/portfile.cmake b/ports/libmad/portfile.cmake index d9e20ecb5..65b926d55 100644 --- a/ports/libmad/portfile.cmake +++ b/ports/libmad/portfile.cmake @@ -7,6 +7,11 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/use_fpm_default.patch" +) + #The archive only contains a Visual Studio 6.0 era DSP project file, so use a custom CMakeLists.txt file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/libmad/use_fpm_default.patch b/ports/libmad/use_fpm_default.patch new file mode 100644 index 000000000..f20c8265e --- /dev/null +++ b/ports/libmad/use_fpm_default.patch @@ -0,0 +1,16 @@ +--- mad.h 2004-01-23 10:36:03.000000000 +0100 ++++ mad.h 2017-08-12 16:03:38.060392600 +0200 +@@ -24,7 +24,7 @@ + extern "C" { + # endif + +-# define FPM_INTEL ++# define FPM_DEFAULT +--- msvc++/mad.h 2017-08-12 16:04:30.678146600 +0200 ++++ msvc++/mad.h 2017-08-12 16:04:00.779378000 +0200 +@@ -24,7 +24,7 @@ + extern "C" { + # endif + +-# define FPM_INTEL ++# define FPM_DEFAULT -- cgit v1.2.3 From c0da7512640200578a97c1de6b4d3dd66a79112a Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 30 Aug 2017 15:08:46 +0200 Subject: [glib] update to 2.52.3 --- ports/glib/CONTROL | 2 +- ports/glib/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL index 9ae5ce296..2d67cd26d 100644 --- a/ports/glib/CONTROL +++ b/ports/glib/CONTROL @@ -1,4 +1,4 @@ Source: glib -Version: 2.52.2 +Version: 2.52.3 Description: Portable, general-purpose utility library. Build-Depends: zlib, pcre, libffi, gettext, libiconv diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake index e23f5dcb9..9482b4386 100644 --- a/ports/glib/portfile.cmake +++ b/ports/glib/portfile.cmake @@ -10,12 +10,12 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() include(vcpkg_common_functions) -set(GLIB_VERSION 2.52.2) +set(GLIB_VERSION 2.52.3) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glib-${GLIB_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://ftp.gnome.org/pub/gnome/sources/glib/2.52/glib-${GLIB_VERSION}.tar.xz" FILENAME "glib-${GLIB_VERSION}.tar.xz" - SHA512 3ea49b75b6f80d9974ebd3c40518d5aaffffd9d9d008c1ae3302690fa34899b91ae59c87f8235077129bbd8b01ef19211efb89bc7fdb08d0254b07735b1ba92d) + SHA512 a068f2519cfb82de8d4b7f004e7c1f15e841cad4046430a83b02b359d011e0c4077cdff447a1687ed7c68f1a11b4cf66b9ed9fc23ab5f0c7c6be84eb0ddc3017) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( -- cgit v1.2.3 From efc38c7192033240c7763c3b3c5da17ea7dbb7bd Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 30 Aug 2017 15:28:50 +0200 Subject: [pango] update to 1.40.11 --- ports/pango/CMakeLists.txt | 1 + ports/pango/CONTROL | 2 +- ports/pango/portfile.cmake | 5 ++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/pango/CMakeLists.txt b/ports/pango/CMakeLists.txt index 7dad7dbcf..9c7e7f182 100644 --- a/ports/pango/CMakeLists.txt +++ b/ports/pango/CMakeLists.txt @@ -81,6 +81,7 @@ pango_add_module(pango pango/pango-color.c pango/pango-context.c pango/pango-coverage.c + pango/pango-emoji.c pango/pango-engine.c pango/pango-fontmap.c pango/pango-fontset.c diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL index 011f33691..44c8c9b83 100644 --- a/ports/pango/CONTROL +++ b/ports/pango/CONTROL @@ -1,4 +1,4 @@ Source: pango -Version: 1.40.6 +Version: 1.40.11 Description: Text and font handling library. Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz diff --git a/ports/pango/portfile.cmake b/ports/pango/portfile.cmake index 7f28b8ca7..009953534 100644 --- a/ports/pango/portfile.cmake +++ b/ports/pango/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(PANGO_VERSION 1.40.6) +set(PANGO_VERSION 1.40.11) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pango-${PANGO_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-${PANGO_VERSION}.tar.xz" FILENAME "pango-${PANGO_VERSION}.tar.xz" - SHA512 d916b364a77de3e68779e6d841d95bca456daf89405b92eaf51dceef093a9761cbb6c48f4c2971dec47c0bbdb645a3f3f4fb9af425274bf1d1822b278575e1f7) + SHA512 e4ac40f8da9c326e1e4dfaf4b1d2070601b17f88f5a12991a9a8bbc58bb08640404e2a794a5c68c5ebb2e7e80d9c186d4b26cd417bb63a23f024ef8a38bb152a) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -20,7 +20,6 @@ vcpkg_configure_cmake( OPTIONS_DEBUG -DPANGO_SKIP_HEADERS=ON) -vcpkg_build_cmake() vcpkg_install_cmake() vcpkg_copy_pdbs() -- cgit v1.2.3 From 5ef20222d728c24c746a368eedd06e52e33e174c Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 30 Aug 2017 15:47:14 +0200 Subject: [gdk-pixbuf] update to 2.36.9 --- ports/gdk-pixbuf/CMakeLists.txt | 1 + ports/gdk-pixbuf/CONTROL | 2 +- ports/gdk-pixbuf/portfile.cmake | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/gdk-pixbuf/CMakeLists.txt b/ports/gdk-pixbuf/CMakeLists.txt index 06a6b7032..0d56b7fad 100644 --- a/ports/gdk-pixbuf/CMakeLists.txt +++ b/ports/gdk-pixbuf/CMakeLists.txt @@ -34,6 +34,7 @@ add_library(gdk-pixbuf gdk-pixbuf/gdk-pixbuf-util.c gdk-pixbuf/gdk-pixdata.c gdk-pixbuf/gdk-pixbuf-enum-types.c + gdk-pixbuf/gdk-pixbuf-marshal.c gdk-pixbuf/io-ani.c gdk-pixbuf/io-ani-animation.c gdk-pixbuf/io-icns.c diff --git a/ports/gdk-pixbuf/CONTROL b/ports/gdk-pixbuf/CONTROL index 23edca2e0..c12f67583 100644 --- a/ports/gdk-pixbuf/CONTROL +++ b/ports/gdk-pixbuf/CONTROL @@ -1,4 +1,4 @@ Source: gdk-pixbuf -Version: 2.36.6 +Version: 2.36.9 Description: Image loading library. Build-Depends: gettext, zlib, libpng, glib diff --git a/ports/gdk-pixbuf/portfile.cmake b/ports/gdk-pixbuf/portfile.cmake index 36b64a553..72469abff 100644 --- a/ports/gdk-pixbuf/portfile.cmake +++ b/ports/gdk-pixbuf/portfile.cmake @@ -4,13 +4,13 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() set(GDK_PIXBUF_VERSION 2.36) -set(GDK_PIXBUF_PATCH 6) +set(GDK_PIXBUF_PATCH 9) include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}) vcpkg_download_distfile(ARCHIVE URLS "http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/${GDK_PIXBUF_VERSION}/gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}.tar.xz" FILENAME "gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}.tar.xz" - SHA512 b963f01161b58463c83499079545aa946fd824ec5e7167e0898698ac46e0cc3fb3dcb0cac5afabd6b7d957391b9c9bba55f340294076433155fc91052d5403ec) + SHA512 ab8f2cda4490012936b094a1321e64b85e1fa1f8d070fae135a514f87f695201b845f4192e4a02954e2767d44314c0a95d727118853528182952d15890130261) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From fa8ce7af7e316bb9c775c0f9eb0d6dcc4dce882a Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 30 Aug 2017 16:01:33 +0200 Subject: [gtk] update to 3.22.19 --- ports/gtk/CONTROL | 2 +- ports/gtk/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/gtk/CONTROL b/ports/gtk/CONTROL index 6a5a0e8b7..a668ff3f5 100644 --- a/ports/gtk/CONTROL +++ b/ports/gtk/CONTROL @@ -1,4 +1,4 @@ Source: gtk -Version: 3.22.15 +Version: 3.22.19 Description: Portable library for creating graphical user interfaces. Build-Depends: glib, atk, gdk-pixbuf, pango, cairo, libepoxy, gettext diff --git a/ports/gtk/portfile.cmake b/ports/gtk/portfile.cmake index 29af53e58..b915ce5f3 100644 --- a/ports/gtk/portfile.cmake +++ b/ports/gtk/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(GTK_VERSION 3.22.15) +set(GTK_VERSION 3.22.19) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gtk+-${GTK_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://ftp.gnome.org/pub/gnome/sources/gtk+/3.22/gtk+-${GTK_VERSION}.tar.xz" FILENAME "gtk+-${GTK_VERSION}.tar.xz" - SHA512 c99c4a52bc447a21be20546bdc7808081abde076af9603424c1de20af031ac3f9bd121709d4c18705db8ba2f66ace0aae9b32741347788a8d81afa358d67e758) + SHA512 c83198794433ee6eb29f8740d59bd7056cd36808b4bff1a99563ab1a1742e6635dab4f2a8be33317f74d3b336f0d1adc28dd91410da056b50a08c215f184dce2) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From d35a5c98e48a32ef66fe2aaabe154edee2323d0e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 30 Aug 2017 12:34:12 -0700 Subject: Fix /permissive- issue --- toolsrc/include/StatusParagraphs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/toolsrc/include/StatusParagraphs.h b/toolsrc/include/StatusParagraphs.h index bf2ef2f3e..1a9ee6a03 100644 --- a/toolsrc/include/StatusParagraphs.h +++ b/toolsrc/include/StatusParagraphs.h @@ -17,8 +17,7 @@ namespace vcpkg const_iterator find(const PackageSpec& spec) const { return find(spec.name(), spec.triplet()); } const_iterator find(const std::string& name, const Triplet& triplet) const; iterator find(const std::string& name, const Triplet& triplet); - std::vector*> StatusParagraphs::find_all(const std::string& name, - const Triplet& triplet); + std::vector*> find_all(const std::string& name, const Triplet& triplet); iterator find(const std::string& name, const Triplet& triplet, const std::string& feature); const_iterator find_installed(const PackageSpec& spec) const -- cgit v1.2.3 From d0155a477e94bd860dbee57a16a19b675013c171 Mon Sep 17 00:00:00 2001 From: paercebal Date: Wed, 30 Aug 2017 22:18:58 +0200 Subject: Update xerces-c port files to retrieve it from github --- ports/xerces-c/portfile.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake index 1208c9787..e3fc9bb04 100644 --- a/ports/xerces-c/portfile.cmake +++ b/ports/xerces-c/portfile.cmake @@ -17,12 +17,12 @@ if (VCPKG_CRT_LINKAGE STREQUAL "static") endif() -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xerces-c-3.1.4) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xerces-c-Xerces-C_3_1_4) vcpkg_download_distfile(ARCHIVE - URLS "http://www-us.apache.org/dist//xerces/c/3/sources/xerces-c-3.1.4.zip" - FILENAME "xerces-c-3.1.4.zip" - SHA512 3ba1bf38875bda8a294990dba73143cfd6dbfa158b17f4db1fd0ee9a08a078af969103200eaf8957756f8363c8a661983cc95124b4978eb2162dc0344a85fff8 + URLS "https://github.com/apache/xerces-c/archive/Xerces-C_3_1_4.zip" + FILENAME "Xerces-C_3_1_4.zip" + SHA512 3471134dacc4b2a25dece3c6eeab1d8143ca090f3652998c3a12c581e0351593bc0905334dd09c13864465c05952ca78f212a63d1c6c78bcd322d7aec23733cd ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 3b8159bad00a0396a5eaac22f59e34ae96f2ea4d Mon Sep 17 00:00:00 2001 From: paercebal Date: Wed, 30 Aug 2017 23:57:27 +0200 Subject: use vcpkg_from_github instead --- ports/xerces-c/portfile.cmake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake index e3fc9bb04..526004b43 100644 --- a/ports/xerces-c/portfile.cmake +++ b/ports/xerces-c/portfile.cmake @@ -19,12 +19,13 @@ endif() set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xerces-c-Xerces-C_3_1_4) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/apache/xerces-c/archive/Xerces-C_3_1_4.zip" - FILENAME "Xerces-C_3_1_4.zip" - SHA512 3471134dacc4b2a25dece3c6eeab1d8143ca090f3652998c3a12c581e0351593bc0905334dd09c13864465c05952ca78f212a63d1c6c78bcd322d7aec23733cd +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/xerces-c + REF Xerces-C_3_1_4 + SHA512 6dc3e4bb68bc32a0e8ec6dcc7ec67e21239a79c909d08ccc16c96dc5de4e73800993d1c09f589606925507baf0b2a9bf6037d28c84dae826935bf1f7a151071e + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") set(BUILD_ARCH "Win32") -- cgit v1.2.3 From 38712f755b0e7db5c7ecf68976c25a9f6e0bf037 Mon Sep 17 00:00:00 2001 From: paercebal Date: Thu, 31 Aug 2017 00:56:49 +0200 Subject: Removing explicit setting of SOURCE_PATH --- ports/xerces-c/portfile.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake index 526004b43..5623e9518 100644 --- a/ports/xerces-c/portfile.cmake +++ b/ports/xerces-c/portfile.cmake @@ -16,9 +16,6 @@ if (VCPKG_CRT_LINKAGE STREQUAL "static") set(VCPKG_CRT_LINKAGE "dynamic") endif() - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xerces-c-Xerces-C_3_1_4) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/xerces-c -- cgit v1.2.3 From b966cdce678461e5497b01a25664ace0e76b51bf Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 30 Aug 2017 21:00:59 -0700 Subject: [vcpkg-docs] Add integrate project to faq section --- docs/about/faq.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/about/faq.md b/docs/about/faq.md index 43039258f..8234216e0 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -62,7 +62,9 @@ Of course, this will only produce viable binaries if your custom configuration i ## I can't use user-wide integration. Can I use a per-project integration? -Yes. The Visual Studio integration is actually enabled by the `\scripts\buildsystems\msbuild\vcpkg.targets` file. So all you need is to import it in your .vcxproj file, replacing `` with the path where you installed vcpkg: +Yes. A NuGet package suitable for per-project use can be generated via either the `vcpkg integrate project` command (lightweight linking) or the `vcpkg export --nuget` command (shrinkwrapped). + +A lower level mechanism to achieve the same as the `vcpkg integrate project` NuGet package is via the `\scripts\buildsystems\msbuild\vcpkg.targets` file. All you need is to import it in your .vcxproj file, replacing `` with the path where you installed vcpkg: ``` -- cgit v1.2.3 From 62cde6598ddbf30f6872895aaf9715fc87f7b7aa Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 30 Aug 2017 22:42:43 -0700 Subject: Move function to Files::find_from_PATH() --- toolsrc/include/vcpkg_Files.h | 2 ++ toolsrc/src/VcpkgPaths.cpp | 20 ++++---------------- toolsrc/src/vcpkg_Files.cpp | 13 +++++++++++++ 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/toolsrc/include/vcpkg_Files.h b/toolsrc/include/vcpkg_Files.h index ad29ffa14..855e8ea45 100644 --- a/toolsrc/include/vcpkg_Files.h +++ b/toolsrc/include/vcpkg_Files.h @@ -38,4 +38,6 @@ namespace vcpkg::Files bool has_invalid_chars_for_filesystem(const std::string& s); void print_paths(const std::vector& paths); + + std::vector find_from_PATH(const std::wstring& name); } diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index ef9209b78..865f2ce44 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -13,7 +13,7 @@ namespace vcpkg static std::string WORKAROUND_ISSUE_1712(const std::string& line) { auto colon_pos = line.find(':'); - if (colon_pos != std::string::npos && colon_pos > 0) + if (colon_pos != std::string::npos && colon_pos > 1) { return line.substr(colon_pos - 1); } @@ -68,18 +68,6 @@ namespace vcpkg return nullopt; } - static std::vector find_from_PATH(const std::wstring& name) - { - const std::wstring cmd = Strings::wformat(L"where.exe %s", name); - auto out = System::cmd_execute_and_capture_output(cmd); - if (out.exit_code != 0) - { - return {}; - } - - return Util::fmap(Strings::split(out.output, "\n"), [](auto&& s) { return fs::path(s); }); - } - static fs::path fetch_dependency(const fs::path& scripts_folder, const std::wstring& tool_name, const fs::path& expected_downloaded_path, @@ -122,7 +110,7 @@ namespace vcpkg static const std::wstring version_check_arguments = L"--version"; const fs::path downloaded_copy = downloads_folder / "cmake-3.9.1-win32-x86" / "bin" / "cmake.exe"; - const std::vector from_path = find_from_PATH(L"cmake"); + const std::vector from_path = Files::find_from_PATH(L"cmake"); std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); @@ -146,7 +134,7 @@ namespace vcpkg static const std::wstring version_check_arguments = Strings::WEMPTY; const fs::path downloaded_copy = downloads_folder / "nuget-4.1.0" / "nuget.exe"; - const std::vector from_path = find_from_PATH(L"nuget"); + const std::vector from_path = Files::find_from_PATH(L"nuget"); std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); @@ -167,7 +155,7 @@ namespace vcpkg static const std::wstring version_check_arguments = L"--version"; const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.1-32-bit" / "cmd" / "git.exe"; - const std::vector from_path = find_from_PATH(L"git"); + const std::vector from_path = Files::find_from_PATH(L"git"); std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg_Files.cpp index 24edb779f..ad1fcebc6 100644 --- a/toolsrc/src/vcpkg_Files.cpp +++ b/toolsrc/src/vcpkg_Files.cpp @@ -2,6 +2,7 @@ #include "vcpkg_Files.h" #include "vcpkg_System.h" +#include "vcpkg_Util.h" #include namespace vcpkg::Files @@ -193,4 +194,16 @@ namespace vcpkg::Files } System::println(); } + + std::vector find_from_PATH(const std::wstring& name) + { + const std::wstring cmd = Strings::wformat(L"where.exe %s", name); + auto out = System::cmd_execute_and_capture_output(cmd); + if (out.exit_code != 0) + { + return {}; + } + + return Util::fmap(Strings::split(out.output, "\n"), [](auto&& s) { return fs::path(s); }); + } } -- cgit v1.2.3 From aa1e928c79d78aad0086960bec971fcfec2d2133 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 30 Aug 2017 23:26:34 -0700 Subject: Improve `vcpkg edit` and feedback when no editor is found --- toolsrc/src/commands_edit.cpp | 101 +++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 61 deletions(-) diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp index e72931e63..f71d4d44c 100644 --- a/toolsrc/src/commands_edit.cpp +++ b/toolsrc/src/commands_edit.cpp @@ -6,6 +6,30 @@ namespace vcpkg::Commands::Edit { + static std::vector find_from_registry() + { + static const std::array REGKEYS = { + LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", + LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", + LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", + LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", + }; + + std::vector output; + for (auto&& keypath : REGKEYS) + { + const Optional code_installpath = + System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, L"InstallLocation"); + if (const auto c = code_installpath.get()) + { + const fs::path install_path = fs::path(*c); + output.push_back(install_path / "Code.exe"); + output.push_back(install_path / "Code - Insiders.exe"); + } + } + return output; + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { static const std::string OPTION_BUILDTREES = "--buildtrees"; @@ -21,72 +45,27 @@ namespace vcpkg::Commands::Edit const fs::path portpath = paths.ports / port_name; Checks::check_exit(VCPKG_LINE_INFO, fs.is_directory(portpath), R"(Could not find port named "%s")", port_name); - // Find the user's selected editor - std::wstring env_editor; + std::vector candidate_paths; + const std::vector from_path = Files::find_from_PATH(L"EDITOR"); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + candidate_paths.push_back(System::get_ProgramFiles_platform_bitness() / "Microsoft VS Code" / "Code.exe"); + candidate_paths.push_back(System::get_ProgramFiles_32_bit() / "Microsoft VS Code" / "Code.exe"); - if (env_editor.empty()) - { - const Optional env_editor_optional = System::get_environment_variable(L"EDITOR"); - if (const auto e = env_editor_optional.get()) - { - env_editor = *e; - } - } - - if (env_editor.empty()) - { - const fs::path code_exe_path = System::get_ProgramFiles_platform_bitness() / "Microsoft VS Code/Code.exe"; - if (fs.exists(code_exe_path)) - { - env_editor = code_exe_path; - } - } - - if (env_editor.empty()) - { - const fs::path code_exe_path = System::get_ProgramFiles_32_bit() / "Microsoft VS Code/Code.exe"; - if (fs.exists(code_exe_path)) - { - env_editor = code_exe_path; - } - } - - if (env_editor.empty()) - { - static const std::array REGKEYS = { - LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", - LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", - LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", - LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", - }; - for (auto&& keypath : REGKEYS) - { - const Optional code_installpath = - System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, L"InstallLocation"); - if (const auto c = code_installpath.get()) - { - auto p = fs::path(*c) / "Code.exe"; - if (fs.exists(p)) - { - env_editor = p.native(); - break; - } - auto p_insiders = fs::path(*c) / "Code - Insiders.exe"; - if (fs.exists(p_insiders)) - { - env_editor = p_insiders.native(); - break; - } - } - } - } + const std::vector from_registry = find_from_registry(); + candidate_paths.insert(candidate_paths.end(), from_registry.cbegin(), from_registry.cend()); - if (env_editor.empty()) + auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { return fs.exists(p); }); + if (it == candidate_paths.cend()) { - Checks::exit_with_message( - VCPKG_LINE_INFO, "Visual Studio Code was not found and the environment variable EDITOR is not set"); + System::println(System::Color::error, + "Error: Visual Studio Code was not found and the environment variable EDITOR is not set."); + System::println("The following paths were examined:"); + Files::print_paths(candidate_paths); + System::println("You can also set the environmental variable EDITOR to your editor of choice."); + Checks::exit_fail(VCPKG_LINE_INFO); } + const fs::path env_editor = *it; if (options.find(OPTION_BUILDTREES) != options.cend()) { const auto buildtrees_current_dir = paths.buildtrees / port_name; -- cgit v1.2.3 From f76244f700f3ae0fe353c53c19d209589e8cdaf7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 30 Aug 2017 23:32:41 -0700 Subject: Use ::TerminateProcess() instead of ::exit() --- toolsrc/src/vcpkg_Checks.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg_Checks.cpp b/toolsrc/src/vcpkg_Checks.cpp index b6a88a011..3692a0e9a 100644 --- a/toolsrc/src/vcpkg_Checks.cpp +++ b/toolsrc/src/vcpkg_Checks.cpp @@ -20,7 +20,9 @@ namespace vcpkg::Checks SetConsoleCP(GlobalState::g_init_console_cp); SetConsoleOutputCP(GlobalState::g_init_console_output_cp); - ::exit(exit_code); + fflush(nullptr); + + ::TerminateProcess(::GetCurrentProcess(), exit_code); } static BOOL CtrlHandler(DWORD fdwCtrlType) -- cgit v1.2.3 From 99a8d745495815916801003c744b845c2f9e278a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 12 Jul 2017 17:31:51 +0200 Subject: Use ICU in boost build --- ports/boost/0001-Fix-boost-ICU-support.patch | 166 +++++++++++++++++++++++++++ ports/boost/CONTROL | 2 +- ports/boost/desktop/user-config.jam | 28 +++++ ports/boost/portfile.cmake | 6 +- ports/boost/uwp/user-config.jam | 8 ++ 5 files changed, 208 insertions(+), 2 deletions(-) create mode 100644 ports/boost/0001-Fix-boost-ICU-support.patch diff --git a/ports/boost/0001-Fix-boost-ICU-support.patch b/ports/boost/0001-Fix-boost-ICU-support.patch new file mode 100644 index 000000000..1952f5a64 --- /dev/null +++ b/ports/boost/0001-Fix-boost-ICU-support.patch @@ -0,0 +1,166 @@ +--- + libs/locale/build/Jamfile.v2 | 63 ++++++-------------------------------- + libs/locale/build/has_icu_test.cpp | 4 --- + libs/regex/build/Jamfile.v2 | 47 +++++++--------------------- + 3 files changed, 20 insertions(+), 94 deletions(-) + +diff --git a/libs/locale/build/Jamfile.v2 b/libs/locale/build/Jamfile.v2 +index 578e722..5f25917 100644 +--- a/libs/locale/build/Jamfile.v2 ++++ b/libs/locale/build/Jamfile.v2 +@@ -70,62 +70,17 @@ if $(ICU_LINK) + } + else + { +- searched-lib icuuc : : icuuc +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuuc : : msvc +- debug +- icuucd +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuuc : : this_is_an_invalid_library_name ; +- +- searched-lib icudt : : $(ICU_PATH)/lib +- icudata +- shared +- shared ; +- +- searched-lib icudt : : $(ICU_PATH)/lib +- icudt +- msvc +- shared +- shared ; +- +- searched-lib icudt : : this_is_an_invalid_library_name ; +- +- searched-lib icuin : : $(ICU_PATH)/lib +- icui18n +- shared +- shared ; +- +- searched-lib icuin : : msvc +- debug +- icuind +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuin : : msvc +- release +- icuin +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuin : : this_is_an_invalid_library_name ; +- +- explicit icuuc icudt icuin ; ++ alias icuuc : /user-config//icuuc ; ++ alias icuin : /user-config//icuin ; ++ alias icudt : /user-config//icudt ; ++ ++ explicit icuuc icuin icudt ; + + ICU_OPTS = $(ICU_PATH)/include +- icuuc/shared/shared +- icudt/shared/shared +- icuin/shared/shared +- $(ICU_PATH)/bin +- shared ; ++ icuuc ++ icuin ++ icudt ++ $(ICU_PATH)/bin ; + + + +diff --git a/libs/locale/build/has_icu_test.cpp b/libs/locale/build/has_icu_test.cpp +index 9419b30..ed9be05 100644 +--- a/libs/locale/build/has_icu_test.cpp ++++ b/libs/locale/build/has_icu_test.cpp +@@ -15,10 +15,6 @@ + #include + #include + +-#if defined(_MSC_VER) && !defined(_DLL) +-#error "Mixing ICU with a static runtime doesn't work" +-#endif +- + int main() + { + icu::Locale loc; +diff --git a/libs/regex/build/Jamfile.v2 b/libs/regex/build/Jamfile.v2 +index 58fd1fb..76ee9f4 100644 +--- a/libs/regex/build/Jamfile.v2 ++++ b/libs/regex/build/Jamfile.v2 +@@ -48,50 +48,25 @@ if ! $(disable-icu) + } + else + { +- lib icuuc : : shared @path_options ; +- lib icuuc : : msvc debug icuucd shared @path_options ; +- lib icuuc : : intel windows debug icuucd shared @path_options ; +- lib icuuc : : sicuuc static @path_options ; +- lib icuuc : : msvc debug sicuucd static @path_options ; +- lib icuuc : : intel windows debug sicuucd static @path_options ; +- lib icuuc : : this_is_an_invalid_library_name ; +- +- lib icudt : : icudata shared @path_options ; +- lib icudt : : icudt msvc shared @path_options ; +- lib icudt : : icudt intel windows shared @path_options ; +- lib icudt : : sicudata static @path_options ; +- lib icudt : : sicudt msvc static @path_options ; +- lib icudt : : sicudt intel windows static @path_options ; +- lib icudt : : this_is_an_invalid_library_name ; +- +- lib icuin : : icui18n shared @path_options ; +- lib icuin : : msvc debug icuind shared @path_options ; +- lib icuin : : msvc icuin shared @path_options ; +- lib icuin : : intel windows debug icuind shared @path_options ; +- lib icuin : : intel windows icuin shared @path_options ; +- lib icuin : : sicui18n static @path_options ; +- lib icuin : : msvc debug sicuind static @path_options ; +- lib icuin : : msvc sicuin static @path_options ; +- lib icuin : : intel windows debug sicuind static @path_options ; +- lib icuin : : intel windows sicuin static @path_options ; +- lib icuin : : this_is_an_invalid_library_name ; ++ ++ alias icuuc : /user-config//icuuc ; ++ alias icuin : /user-config//icuin ; ++ alias icudt : /user-config//icudt ; ++ ++ explicit icuuc icuin icudt ; + + ICU_OPTS = + $(ICU_PATH)/include +- shared:icuuc/shared +- shared:icudt/shared +- shared:icuin/shared +- static:icuuc +- static:icudt +- static:icuin +- BOOST_HAS_ICU=1 +- static:U_STATIC_IMPLEMENTATION=1 ++ icuuc ++ icudt ++ icuin ++ BOOST_HAS_ICU=1 + ; + } + + } + +-unit-test has_icu : has_icu_test.cpp : $(ICU_OPTS) ; ++exe has_icu : has_icu_test.cpp : $(ICU_OPTS) ; + explicit has_icu ; + + alias icu_options : : : : [ check-target-builds has_icu : $(ICU_OPTS) : ] ; +-- +2.12.2.windows.2 + diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 8200d54d1..6c7732021 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost Version: 1.65-1 Description: Peer-reviewed portable C++ source libraries -Build-Depends: zlib, bzip2 +Build-Depends: zlib, bzip2, icu [windows] diff --git a/ports/boost/desktop/user-config.jam b/ports/boost/desktop/user-config.jam index 8faba6d72..212cd06b8 100644 --- a/ports/boost/desktop/user-config.jam +++ b/ports/boost/desktop/user-config.jam @@ -5,3 +5,31 @@ using msvc : 14.0 : cl.exe : using msvc : 14.1 : cl.exe : echo ; + +project user-config ; +lib advapi32 ; +lib icuuc : : @CURRENT_INSTALLED_DIR@/lib : : + @LIB_RUNTIME_LINK@ + advapi32 ; + +lib icuuc : : @CURRENT_INSTALLED_DIR@/debug/lib + debug + icuucd : : + @LIB_RUNTIME_LINK@ + advapi32 ; + +lib icuin : : @CURRENT_INSTALLED_DIR@/lib : : + @LIB_RUNTIME_LINK@ ; + +lib icuin : : @CURRENT_INSTALLED_DIR@/debug/lib + debug + icuind : : + @LIB_RUNTIME_LINK@ ; + +lib icudt : : @CURRENT_INSTALLED_DIR@/lib : : + @LIB_RUNTIME_LINK@ ; + +lib icudt : : @CURRENT_INSTALLED_DIR@/debug/lib + debug + icudtd : : + @LIB_RUNTIME_LINK@ ; \ No newline at end of file diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 3ed0ed9c5..74db8a524 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -32,7 +32,8 @@ FILE(READ "${DIFF}" content) STRING(REGEX REPLACE "include/" "" content "${content}") set(DIFF2 ${CURRENT_BUILDTREES_DIR}/src/boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff.fixed) FILE(WRITE ${DIFF2} "${content}") -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF2}) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF2} + ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-boost-ICU-support.patch) ###################### # Cleanup previous builds @@ -83,6 +84,7 @@ message(STATUS "Bootstrapping done") set(B2_OPTIONS -sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}\\include" -sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}\\include" + -sICU_PATH="${CURRENT_INSTALLED_DIR}" -j$ENV{NUMBER_OF_PROCESSORS} --debug-configuration --hash @@ -92,10 +94,12 @@ set(B2_OPTIONS threading=multi ) +set(LIB_RUNTIME_LINK "shared") if (VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND B2_OPTIONS runtime-link=shared) else() list(APPEND B2_OPTIONS runtime-link=static) + set(LIB_RUNTIME_LINK "static") endif() if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) diff --git a/ports/boost/uwp/user-config.jam b/ports/boost/uwp/user-config.jam index 88e7c5974..975b1d412 100644 --- a/ports/boost/uwp/user-config.jam +++ b/ports/boost/uwp/user-config.jam @@ -13,3 +13,11 @@ using msvc : 14.1 : cl.exe : RuntimeObject.lib ole32.lib ; + +project user-config ; + +lib icuuc : : dummy_lib_that_doesnt_exist ; + +lib icuin : : dummy_lib_that_doesnt_exist ; + +lib icudt : : dummy_lib_that_doesnt_exist ; \ No newline at end of file -- cgit v1.2.3 From 481128e9792d47343b3a5682350569ebcebc63f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 12 Jul 2017 19:12:01 +0200 Subject: Build boost.python --- ports/boost/CONTROL | 2 +- ports/boost/desktop/user-config.jam | 3 +++ ports/boost/portfile.cmake | 7 ++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 6c7732021..e2d9f7dba 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost Version: 1.65-1 Description: Peer-reviewed portable C++ source libraries -Build-Depends: zlib, bzip2, icu [windows] +Build-Depends: zlib, bzip2, icu [windows], python3 [windows] diff --git a/ports/boost/desktop/user-config.jam b/ports/boost/desktop/user-config.jam index 212cd06b8..83206c098 100644 --- a/ports/boost/desktop/user-config.jam +++ b/ports/boost/desktop/user-config.jam @@ -6,6 +6,9 @@ using msvc : 14.1 : cl.exe : echo ; +using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_RELEASE@ ; +using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_DEBUG@ : on ; + project user-config ; lib advapi32 ; lib icuuc : : @CURRENT_INSTALLED_DIR@/lib : : diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 74db8a524..8fd29a1f6 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -90,7 +90,6 @@ set(B2_OPTIONS --hash -q - --without-python threading=multi ) @@ -147,6 +146,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") --without-thread --without-iostreams --without-container + --without-python ) if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") find_path(PATH_TO_CL cl.exe) @@ -165,6 +165,11 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam ESCAPE_QUOTES @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam ESCAPE_QUOTES @ONLY) else() + # Find Python. Can't use find_package here, but we already know where everything is + file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") + set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") + set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") + string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) endif() -- cgit v1.2.3 From 1304b772024dc09227fea9242a867794f764f9f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 12 Jul 2017 19:16:26 +0200 Subject: Bump boost version --- ports/boost/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index e2d9f7dba..1743379fb 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost -Version: 1.65-1 +Version: 1.65-2 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2, icu [windows], python3 [windows] -- cgit v1.2.3 From d88f53de9c284cfc67ba21707d60a44ba41ede8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Fri, 14 Jul 2017 23:07:55 +0200 Subject: In debug configuration, link boost with debug Python libraries instead of release ones --- ports/boost/portfile.cmake | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 8fd29a1f6..530351c7e 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -93,6 +93,21 @@ set(B2_OPTIONS threading=multi ) +# Add build type specific options +set(B2_OPTIONS_DBG + -sZLIB_BINARY=zlibd + -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" + -sBZIP2_BINARY=bz2d + -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" +) + +set(B2_OPTIONS_REL + -sZLIB_BINARY=zlib + -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" + -sBZIP2_BINARY=bz2 + -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" +) + set(LIB_RUNTIME_LINK "shared") if (VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND B2_OPTIONS runtime-link=shared) @@ -172,6 +187,8 @@ else() string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) + list(APPEND B2_OPTIONS_DBG + python-debugging=on) endif() if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") @@ -182,21 +199,14 @@ else() message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'") endif() -# Add build type specific options set(B2_OPTIONS_DBG ${B2_OPTIONS} - -sZLIB_BINARY=zlibd - -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" - -sBZIP2_BINARY=bz2d - -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" + ${B2_OPTIONS_DBG} ) set(B2_OPTIONS_REL ${B2_OPTIONS} - -sZLIB_BINARY=zlib - -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" - -sBZIP2_BINARY=bz2 - -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" + ${B2_OPTIONS_REL} ) ###################### -- cgit v1.2.3 From e5861d356bf2b1874b74a321dcec9439a8d11ef5 Mon Sep 17 00:00:00 2001 From: paercebal Date: Thu, 31 Aug 2017 10:59:42 +0200 Subject: Updated the documentation to reflect the greater tolerance on configs --- docs/about/faq.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/about/faq.md b/docs/about/faq.md index 8234216e0..88f88bad0 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -50,7 +50,9 @@ By saving the changes to the portfile (and checking them in), you'll get the sam Yes. While Vcpkg will only produce the standard "Release" and "Debug" configurations when building a library, you can get integration support for your projects' custom configurations, in addition to your project's standard configurations. -The MSBuild $(VcpkgConfiguration) macro, if not set in your project, will identify either the "Release" or the "Debug" configuration. You only need to override this macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration. +First of all, Vcpkg will automatically assume any custom configuration starting with "Release" (resp. "Debug") as a configuration that is compatible with the standard "Release" (resp. "Debug") configuration and will act accordingly. + +For other configurations, you only need to override the MSBuild `$(VcpkgConfiguration)` macro in your project file (.vcxproj) to declare the compatibility between your configuration, and the target standard configuration. For example, you can add support for your "MyRelease" configuration by adding in your project file: ``` -- cgit v1.2.3 From 27a4067bdff0b6730695d0d3241e162c12bc413d Mon Sep 17 00:00:00 2001 From: vlj Date: Thu, 31 Aug 2017 19:39:49 +0200 Subject: set glslangdir and glslang lib interface_include_directories in shaderc cmakelist. --- ports/shaderc/CMakeLists.txt | 60 +++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/ports/shaderc/CMakeLists.txt b/ports/shaderc/CMakeLists.txt index 3dc7be973..f4e0830c6 100644 --- a/ports/shaderc/CMakeLists.txt +++ b/ports/shaderc/CMakeLists.txt @@ -1,29 +1,31 @@ -option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D}) -if(NOT ${SUFFIX_D}) - find_library(GLSLANG glslang) - find_library(OSDEPENDENT OSDependent) - find_library(OGLCOMPILER OGLCompiler) - find_library(HLSLLIB HLSL) - find_library(SPIRVLIB SPIRV) -ELSE() - find_library(GLSLANG glslangd) - find_library(OSDEPENDENT OSDependentd) - find_library(OGLCOMPILER OGLCompilerd) - find_library(HLSLLIB HLSLd) - find_library(SPIRVLIB SPIRVd) -ENDIF() - -add_library(glslang STATIC IMPORTED GLOBAL) -set_property(TARGET glslang PROPERTY IMPORTED_LOCATION "${GLSLANG}") - -add_library(OSDependent STATIC IMPORTED GLOBAL) -set_property(TARGET OSDependent PROPERTY IMPORTED_LOCATION "${OSDEPENDENT}") - -add_library(OGLCompiler STATIC IMPORTED GLOBAL) -set_property(TARGET OGLCompiler PROPERTY IMPORTED_LOCATION "${OGLCOMPILER}") - -add_library(HLSL STATIC IMPORTED GLOBAL) -set_property(TARGET HLSL PROPERTY IMPORTED_LOCATION "${HLSLLIB}") - -add_library(SPIRV STATIC IMPORTED GLOBAL) -set_property(TARGET SPIRV PROPERTY IMPORTED_LOCATION "${SPIRVLIB}") +option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D}) +if(NOT ${SUFFIX_D}) + find_library(GLSLANG glslang) + find_library(OSDEPENDENT OSDependent) + find_library(OGLCOMPILER OGLCompiler) + find_library(HLSLLIB HLSL) + find_library(SPIRVLIB SPIRV) +ELSE() + find_library(GLSLANG glslangd) + find_library(OSDEPENDENT OSDependentd) + find_library(OGLCOMPILER OGLCompilerd) + find_library(HLSLLIB HLSLd) + find_library(SPIRVLIB SPIRVd) +ENDIF() + +add_library(glslang STATIC IMPORTED GLOBAL) +set_property(TARGET glslang PROPERTY IMPORTED_LOCATION "${GLSLANG}") +set(glslang_SOURCE_DIR "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" CACHE STRING "glslang source dir") +set_property(TARGET glslang APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") + +add_library(OSDependent STATIC IMPORTED GLOBAL) +set_property(TARGET OSDependent PROPERTY IMPORTED_LOCATION "${OSDEPENDENT}") + +add_library(OGLCompiler STATIC IMPORTED GLOBAL) +set_property(TARGET OGLCompiler PROPERTY IMPORTED_LOCATION "${OGLCOMPILER}") + +add_library(HLSL STATIC IMPORTED GLOBAL) +set_property(TARGET HLSL PROPERTY IMPORTED_LOCATION "${HLSLLIB}") + +add_library(SPIRV STATIC IMPORTED GLOBAL) +set_property(TARGET SPIRV PROPERTY IMPORTED_LOCATION "${SPIRVLIB}") -- cgit v1.2.3 From d09e7fa2d9c6deb60566a2e30d10a2e1d4072af7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 14:51:39 -0700 Subject: [shaderc] Bump version --- ports/shaderc/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL index 6cab280a6..d9fe76beb 100644 --- a/ports/shaderc/CONTROL +++ b/ports/shaderc/CONTROL @@ -1,4 +1,4 @@ Source: shaderc -Version: 2df47b51d83ad83cbc2e7f8ff2b56776293e8958 +Version: 2df47b51d83ad83cbc2e7f8ff2b56776293e8958-1 Description: A collection of tools, libraries and tests for shader compilation. Build-Depends: glslang, spirv-tools -- cgit v1.2.3 From a1c3bd230a327e0ba7252a4e6be72f614ad90986 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Thu, 31 Aug 2017 16:06:18 -0700 Subject: [date] Howard HInnant date utils init --- ports/date/CMakeLists.txt | 13 +++++++++---- ports/date/portfile.cmake | 34 +++++++++++++++++++++++++--------- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/ports/date/CMakeLists.txt b/ports/date/CMakeLists.txt index 2f4771db1..91fcab1c7 100644 --- a/ports/date/CMakeLists.txt +++ b/ports/date/CMakeLists.txt @@ -5,14 +5,19 @@ if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) endif() -if(BUILD_SHARED_LIBS) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -endif() +add_definitions(-DNOMINMAX) + -include_directories(${PROJECT_SRC_DIR}) +include_directories(".") add_library(tz tz.cpp) +if(BUILD_SHARED_LIBS) + target_compile_definitions(tz PRIVATE -DDATE_BUILD_DLL) +else() + target_compile_definitions(tz PRIVATE -DDATE_BUILD_LIB) +endif() + install( TARGETS tz RUNTIME DESTINATION bin diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake index ef49b7d0a..f73c72b52 100644 --- a/ports/date/portfile.cmake +++ b/ports/date/portfile.cmake @@ -1,22 +1,38 @@ include(vcpkg_common_functions) +message(WARNING + "You will need to also install http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml into your install location" + "See https://howardhinnant.github.io/date/tz.html" +) + vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO HowardHinnant/date - REF v2.2 - SHA512 6889152acf1d0cc551d572eccaabd9f00ebecdb5723356949db2f1bd5f4b13e1ffad889082451cfb28254968a576b983116bc1a77e060426c9f33ca7774822cb - HEAD_REF master + OUT_SOURCE_PATH SOURCE_PATH + REPO HowardHinnant/date + REF 272d487b3d490126e520b67fe76bbb2e67226c07 + SHA512 59e8ff642d3eb82cb6116a77d4c5e14bbc2ae6bd4019e64a49609b6e46d679c2cb4ccae74807b72223aed18ae015596193919cdb58b011bfb774ff3e29a1d43b + HEAD_REF master ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) vcpkg_install_cmake() -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright) +vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +set(HEADER "${CURRENT_PACKAGES_DIR}/include/tz.h") +file(READ "${HEADER}" _contents) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "DATE_BUILD_DLL" "1" _contents "${_contents}") +else() + string(REPLACE "DATE_BUILD_LIB" "1" _contents "${_contents}") +endif() +file(WRITE "${HEADER}" "${_contents}") + + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright) -- cgit v1.2.3 From f1867a8e899748673b2696de4b837f3e9d94bd69 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:01:23 -0700 Subject: Naming scheme --- toolsrc/src/vcpkg_System.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index f5106b25e..5313d419e 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -283,36 +283,36 @@ namespace vcpkg::System return ret; } - static const fs::path& get_ProgramFiles() + static const fs::path& get_program_files() { - static const fs::path p = System::get_environment_variable(L"PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO); - return p; + static const fs::path PATH = System::get_environment_variable(L"PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO); + return PATH; } const fs::path& get_ProgramFiles_32_bit() { - static const fs::path p = []() -> fs::path { + static const fs::path PATH = []() -> fs::path { auto value = System::get_environment_variable(L"ProgramFiles(x86)"); if (auto v = value.get()) { return std::move(*v); } - return get_ProgramFiles(); + return get_program_files(); }(); - return p; + return PATH; } const fs::path& get_ProgramFiles_platform_bitness() { - static const fs::path p = []() -> fs::path { + static const fs::path PATH = []() -> fs::path { auto value = System::get_environment_variable(L"ProgramW6432"); if (auto v = value.get()) { return std::move(*v); } - return get_ProgramFiles(); + return get_program_files(); }(); - return p; + return PATH; } } -- cgit v1.2.3 From d86d9727f6802a5f642e550db13e97a9a2ea8a29 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:02:12 -0700 Subject: Function naming convention --- toolsrc/include/vcpkg_System.h | 2 +- toolsrc/src/VcpkgPaths.cpp | 4 ++-- toolsrc/src/commands_edit.cpp | 2 +- toolsrc/src/commands_integrate.cpp | 6 +++--- toolsrc/src/vcpkg_System.cpp | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h index 9dd9ea8bd..dc57e02df 100644 --- a/toolsrc/include/vcpkg_System.h +++ b/toolsrc/include/vcpkg_System.h @@ -80,7 +80,7 @@ namespace vcpkg::System std::vector get_supported_host_architectures(); - const fs::path& get_ProgramFiles_32_bit(); + const fs::path& get_program_files_32_bit(); const fs::path& get_ProgramFiles_platform_bitness(); } diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 865f2ce44..c08612df2 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -116,7 +116,7 @@ namespace vcpkg candidate_paths.push_back(downloaded_copy); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); candidate_paths.push_back(System::get_ProgramFiles_platform_bitness() / "CMake" / "bin" / "cmake.exe"); - candidate_paths.push_back(System::get_ProgramFiles_32_bit() / "CMake" / "bin"); + candidate_paths.push_back(System::get_program_files_32_bit() / "CMake" / "bin"); const Optional path = find_if_has_equal_or_greater_version(candidate_paths, version_check_arguments, expected_version); @@ -161,7 +161,7 @@ namespace vcpkg candidate_paths.push_back(downloaded_copy); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); candidate_paths.push_back(System::get_ProgramFiles_platform_bitness() / "git" / "cmd" / "git.exe"); - candidate_paths.push_back(System::get_ProgramFiles_32_bit() / "git" / "cmd" / "git.exe"); + candidate_paths.push_back(System::get_program_files_32_bit() / "git" / "cmd" / "git.exe"); const Optional path = find_if_has_equal_or_greater_version(candidate_paths, version_check_arguments, expected_version); diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp index f71d4d44c..c9886d82e 100644 --- a/toolsrc/src/commands_edit.cpp +++ b/toolsrc/src/commands_edit.cpp @@ -49,7 +49,7 @@ namespace vcpkg::Commands::Edit const std::vector from_path = Files::find_from_PATH(L"EDITOR"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); candidate_paths.push_back(System::get_ProgramFiles_platform_bitness() / "Microsoft VS Code" / "Code.exe"); - candidate_paths.push_back(System::get_ProgramFiles_32_bit() / "Microsoft VS Code" / "Code.exe"); + candidate_paths.push_back(System::get_program_files_32_bit() / "Microsoft VS Code" / "Code.exe"); const std::vector from_registry = find_from_registry(); candidate_paths.insert(candidate_paths.end(), from_registry.cbegin(), from_registry.cend()); diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/commands_integrate.cpp index c5942f9fc..fce9e4121 100644 --- a/toolsrc/src/commands_integrate.cpp +++ b/toolsrc/src/commands_integrate.cpp @@ -9,10 +9,10 @@ namespace vcpkg::Commands::Integrate { static const std::array old_system_target_files = { - System::get_ProgramFiles_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets", - System::get_ProgramFiles_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"}; + System::get_program_files_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets", + System::get_program_files_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"}; static const fs::path system_wide_targets_file = - System::get_ProgramFiles_32_bit() / "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props"; + System::get_program_files_32_bit() / "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props"; static std::string create_appdata_targets_shortcut(const std::string& target_path) noexcept { diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 5313d419e..d9d10f37b 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -289,7 +289,7 @@ namespace vcpkg::System return PATH; } - const fs::path& get_ProgramFiles_32_bit() + const fs::path& get_program_files_32_bit() { static const fs::path PATH = []() -> fs::path { auto value = System::get_environment_variable(L"ProgramFiles(x86)"); -- cgit v1.2.3 From 72394491b20753c3ee3987c5f15aedfc0742a0d8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:02:51 -0700 Subject: Naming convention --- toolsrc/include/vcpkg_System.h | 2 +- toolsrc/src/VcpkgPaths.cpp | 4 ++-- toolsrc/src/commands_edit.cpp | 2 +- toolsrc/src/vcpkg_System.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h index dc57e02df..65f80ae6d 100644 --- a/toolsrc/include/vcpkg_System.h +++ b/toolsrc/include/vcpkg_System.h @@ -82,7 +82,7 @@ namespace vcpkg::System const fs::path& get_program_files_32_bit(); - const fs::path& get_ProgramFiles_platform_bitness(); + const fs::path& get_program_files_platform_bitness(); } namespace vcpkg::Debug diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index c08612df2..e2004c67b 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -115,7 +115,7 @@ namespace vcpkg std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - candidate_paths.push_back(System::get_ProgramFiles_platform_bitness() / "CMake" / "bin" / "cmake.exe"); + candidate_paths.push_back(System::get_program_files_platform_bitness() / "CMake" / "bin" / "cmake.exe"); candidate_paths.push_back(System::get_program_files_32_bit() / "CMake" / "bin"); const Optional path = @@ -160,7 +160,7 @@ namespace vcpkg std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - candidate_paths.push_back(System::get_ProgramFiles_platform_bitness() / "git" / "cmd" / "git.exe"); + candidate_paths.push_back(System::get_program_files_platform_bitness() / "git" / "cmd" / "git.exe"); candidate_paths.push_back(System::get_program_files_32_bit() / "git" / "cmd" / "git.exe"); const Optional path = diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp index c9886d82e..dc28de737 100644 --- a/toolsrc/src/commands_edit.cpp +++ b/toolsrc/src/commands_edit.cpp @@ -48,7 +48,7 @@ namespace vcpkg::Commands::Edit std::vector candidate_paths; const std::vector from_path = Files::find_from_PATH(L"EDITOR"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - candidate_paths.push_back(System::get_ProgramFiles_platform_bitness() / "Microsoft VS Code" / "Code.exe"); + candidate_paths.push_back(System::get_program_files_platform_bitness() / "Microsoft VS Code" / "Code.exe"); candidate_paths.push_back(System::get_program_files_32_bit() / "Microsoft VS Code" / "Code.exe"); const std::vector from_registry = find_from_registry(); diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index d9d10f37b..beaa997b8 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -302,7 +302,7 @@ namespace vcpkg::System return PATH; } - const fs::path& get_ProgramFiles_platform_bitness() + const fs::path& get_program_files_platform_bitness() { static const fs::path PATH = []() -> fs::path { auto value = System::get_environment_variable(L"ProgramW6432"); -- cgit v1.2.3 From badecd4207902b5faebb07a2c2f807f345994040 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:03:54 -0700 Subject: CoffFileReader naming convention --- toolsrc/include/coff_file_reader.h | 2 +- toolsrc/src/PostBuildLint.cpp | 4 ++-- toolsrc/src/coff_file_reader.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/toolsrc/include/coff_file_reader.h b/toolsrc/include/coff_file_reader.h index 09f6447c2..7287211a1 100644 --- a/toolsrc/include/coff_file_reader.h +++ b/toolsrc/include/coff_file_reader.h @@ -3,7 +3,7 @@ #include "filesystem_fs.h" #include -namespace vcpkg::COFFFileReader +namespace vcpkg::CoffFileReader { struct DllInfo { diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 473c81cfa..8c04b94a0 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -389,7 +389,7 @@ namespace vcpkg::PostBuildLint file.extension() == ".dll", "The file extension was not .dll: %s", file.generic_string()); - COFFFileReader::DllInfo info = COFFFileReader::read_dll(file); + CoffFileReader::DllInfo info = CoffFileReader::read_dll(file); const std::string actual_architecture = get_actual_architecture(info.machine_type); if (expected_architecture != actual_architecture) @@ -418,7 +418,7 @@ namespace vcpkg::PostBuildLint file.extension() == ".lib", "The file extension was not .lib: %s", file.generic_string()); - COFFFileReader::LibInfo info = COFFFileReader::read_lib(file); + CoffFileReader::LibInfo info = CoffFileReader::read_lib(file); // This is zero for folly's debug library // TODO: Why? diff --git a/toolsrc/src/coff_file_reader.cpp b/toolsrc/src/coff_file_reader.cpp index 10c1437c6..bb3a6cefd 100644 --- a/toolsrc/src/coff_file_reader.cpp +++ b/toolsrc/src/coff_file_reader.cpp @@ -5,7 +5,7 @@ using namespace std; -namespace vcpkg::COFFFileReader +namespace vcpkg::CoffFileReader { template static T reinterpret_bytes(const char* data) -- cgit v1.2.3 From 07c963f36930a34050c57119c227cd95ea6d60aa Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:04:39 -0700 Subject: Add missing const --- toolsrc/src/PostBuildLint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 8c04b94a0..a30648163 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -389,7 +389,7 @@ namespace vcpkg::PostBuildLint file.extension() == ".dll", "The file extension was not .dll: %s", file.generic_string()); - CoffFileReader::DllInfo info = CoffFileReader::read_dll(file); + const CoffFileReader::DllInfo info = CoffFileReader::read_dll(file); const std::string actual_architecture = get_actual_architecture(info.machine_type); if (expected_architecture != actual_architecture) -- cgit v1.2.3 From b72c904719953c3b372c392c3a925609f4861f10 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:05:13 -0700 Subject: Naming convention fixes --- toolsrc/src/PostBuildLint.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index a30648163..1fd48d3ec 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -40,7 +40,7 @@ namespace vcpkg::PostBuildLint const std::vector& get_outdated_dynamic_crts() { - static const std::vector v_no_msvcrt = { + static const std::vector V_NO_MSVCRT = { {"msvcp100.dll", R"(msvcp100\.dll)"}, {"msvcp100d.dll", R"(msvcp100d\.dll)"}, {"msvcp110.dll", R"(msvcp110\.dll)"}, @@ -59,7 +59,7 @@ namespace vcpkg::PostBuildLint {"msvcrt20.dll", R"(msvcrt20\.dll)"}, {"msvcrt40.dll", R"(msvcrt40\.dll)"}}; - return v_no_msvcrt; + return V_NO_MSVCRT; } static LintStatus check_for_files_in_include_directory(const Files::Filesystem& fs, @@ -580,7 +580,7 @@ namespace vcpkg::PostBuildLint return LintStatus::SUCCESS; } - struct BuildType_and_file + struct BuildTypeAndFile { fs::path file; BuildType build_type; @@ -594,7 +594,7 @@ namespace vcpkg::PostBuildLint bad_build_types.erase(std::remove(bad_build_types.begin(), bad_build_types.end(), expected_build_type), bad_build_types.end()); - std::vector libs_with_invalid_crt; + std::vector libs_with_invalid_crt; for (const fs::path& lib : libs) { @@ -622,7 +622,7 @@ namespace vcpkg::PostBuildLint "Expected %s crt linkage, but the following libs had invalid crt linkage:", expected_build_type.to_string()); System::println(); - for (const BuildType_and_file btf : libs_with_invalid_crt) + for (const BuildTypeAndFile btf : libs_with_invalid_crt) { System::println(" %s: %s", btf.file.generic_string(), btf.build_type.to_string()); } @@ -636,12 +636,12 @@ namespace vcpkg::PostBuildLint return LintStatus::SUCCESS; } - struct OutdatedDynamicCrt_and_file + struct OutdatedDynamicCrtAndFile { fs::path file; OutdatedDynamicCrt outdated_crt; - OutdatedDynamicCrt_and_file() = delete; + OutdatedDynamicCrtAndFile() = delete; }; static LintStatus check_outdated_crt_linkage_of_dlls(const std::vector& dlls, @@ -650,7 +650,7 @@ namespace vcpkg::PostBuildLint { if (build_info.policies.is_enabled(BuildPolicy::ALLOW_OBSOLETE_MSVCRT)) return LintStatus::SUCCESS; - std::vector dlls_with_outdated_crt; + std::vector dlls_with_outdated_crt; for (const fs::path& dll : dlls) { @@ -676,7 +676,7 @@ namespace vcpkg::PostBuildLint { System::println(System::Color::warning, "Detected outdated dynamic CRT in the following files:"); System::println(); - for (const OutdatedDynamicCrt_and_file btf : dlls_with_outdated_crt) + for (const OutdatedDynamicCrtAndFile btf : dlls_with_outdated_crt) { System::println(" %s: %s", btf.file.generic_string(), btf.outdated_crt.name); } -- cgit v1.2.3 From 81c9445376e677aa04d33b125917a61020cafda9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:05:58 -0700 Subject: example -> EXAMPLE --- toolsrc/src/commands_build.cpp | 8 ++++---- toolsrc/src/commands_build_external.cpp | 7 +++---- toolsrc/src/commands_cache.cpp | 4 ++-- toolsrc/src/commands_ci.cpp | 6 +++--- toolsrc/src/commands_create.cpp | 6 +++--- toolsrc/src/commands_depends.cpp | 4 ++-- toolsrc/src/commands_export.cpp | 8 ++++---- toolsrc/src/commands_import.cpp | 4 ++-- toolsrc/src/commands_install.cpp | 8 ++++---- toolsrc/src/commands_integrate.cpp | 4 ++-- toolsrc/src/commands_list.cpp | 4 ++-- toolsrc/src/commands_owns.cpp | 4 ++-- toolsrc/src/commands_portsdiff.cpp | 6 +++--- toolsrc/src/commands_remove.cpp | 10 +++++----- toolsrc/src/commands_search.cpp | 4 ++-- 15 files changed, 43 insertions(+), 44 deletions(-) diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index 26a783a4b..a69958058 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -89,11 +89,11 @@ namespace vcpkg::Commands::BuildCommand void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string example = Commands::Help::create_example_string("build zlib:x64-windows"); - args.check_exact_arg_count( - 1, example); // Build only takes a single package and all dependencies must already be installed + static const std::string EXAMPLE = Commands::Help::create_example_string("build zlib:x64-windows"); + // Build only takes a single package and all dependencies must already be installed + args.check_exact_arg_count(1, EXAMPLE); const std::string command_argument = args.command_arguments.at(0); - const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, example); + const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, EXAMPLE); Input::check_triplet(spec.package_spec.triplet(), paths); const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}); diff --git a/toolsrc/src/commands_build_external.cpp b/toolsrc/src/commands_build_external.cpp index ff70e9cf2..7e85f2250 100644 --- a/toolsrc/src/commands_build_external.cpp +++ b/toolsrc/src/commands_build_external.cpp @@ -2,17 +2,16 @@ #include "vcpkg_Commands.h" #include "vcpkg_Input.h" -#include "vcpkg_System.h" namespace vcpkg::Commands::BuildExternal { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string example = + static const std::string EXAMPLE = Commands::Help::create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)"); - args.check_exact_arg_count(2, example); + args.check_exact_arg_count(2, EXAMPLE); const FullPackageSpec spec = - Input::check_and_get_full_package_spec(args.command_arguments.at(0), default_triplet, example); + Input::check_and_get_full_package_spec(args.command_arguments.at(0), default_triplet, EXAMPLE); Input::check_triplet(spec.package_spec.triplet(), paths); const std::unordered_set options = args.check_and_get_optional_command_arguments({}); diff --git a/toolsrc/src/commands_cache.cpp b/toolsrc/src/commands_cache.cpp index fa0c62ee4..5b65b197f 100644 --- a/toolsrc/src/commands_cache.cpp +++ b/toolsrc/src/commands_cache.cpp @@ -27,10 +27,10 @@ namespace vcpkg::Commands::Cache void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string example = Strings::format( + static const std::string EXAMPLE = Strings::format( "The argument should be a substring to search for, or no argument to display all cached libraries.\n%s", Commands::Help::create_example_string("cache png")); - args.check_max_arg_count(1, example); + args.check_max_arg_count(1, EXAMPLE); args.check_and_get_optional_command_arguments({}); const std::vector binary_paragraphs = read_all_binary_paragraphs(paths); diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp index f781adf69..ca5e8a9a9 100644 --- a/toolsrc/src/commands_ci.cpp +++ b/toolsrc/src/commands_ci.cpp @@ -13,9 +13,9 @@ namespace vcpkg::Commands::CI { + using Build::BuildResult; using Dependencies::InstallPlanAction; using Dependencies::InstallPlanType; - using Build::BuildResult; static std::vector load_all_package_specs(Files::Filesystem& fs, const fs::path& ports_directory, @@ -30,8 +30,8 @@ namespace vcpkg::Commands::CI void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string example = Commands::Help::create_example_string("ci x64-windows"); - args.check_max_arg_count(1, example); + static const std::string EXAMPLE = Commands::Help::create_example_string("ci x64-windows"); + args.check_max_arg_count(1, EXAMPLE); const Triplet triplet = args.command_arguments.size() == 1 ? Triplet::from_canonical_name(args.command_arguments.at(0)) : default_triplet; diff --git a/toolsrc/src/commands_create.cpp b/toolsrc/src/commands_create.cpp index 7f85b776a..99c1b7401 100644 --- a/toolsrc/src/commands_create.cpp +++ b/toolsrc/src/commands_create.cpp @@ -10,10 +10,10 @@ namespace vcpkg::Commands::Create { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string example = Commands::Help::create_example_string( + static const std::string EXAMPLE = Commands::Help::create_example_string( R"###(create zlib2 http://zlib.net/zlib1211.zip "zlib1211-2.zip")###"); - args.check_max_arg_count(3, example); - args.check_min_arg_count(2, example); + args.check_max_arg_count(3, EXAMPLE); + args.check_min_arg_count(2, EXAMPLE); args.check_and_get_optional_command_arguments({}); const std::string port_name = args.command_arguments.at(0); const std::string url = args.command_arguments.at(1); diff --git a/toolsrc/src/commands_depends.cpp b/toolsrc/src/commands_depends.cpp index ffad91226..17cd9c881 100644 --- a/toolsrc/src/commands_depends.cpp +++ b/toolsrc/src/commands_depends.cpp @@ -10,8 +10,8 @@ namespace vcpkg::Commands::DependInfo { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string example = Commands::Help::create_example_string(R"###(depend-info [pat])###"); - args.check_max_arg_count(1, example); + static const std::string EXAMPLE = Commands::Help::create_example_string(R"###(depend-info [pat])###"); + args.check_max_arg_count(1, EXAMPLE); args.check_and_get_optional_command_arguments({}); std::vector> source_control_files = diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index dbfb09aab..9e87d7b01 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -221,12 +221,12 @@ namespace vcpkg::Commands::Export static const std::string OPTION_NUGET_VERSION = "--nuget-version"; // input sanitization - static const std::string example = + static const std::string EXAMPLE = Commands::Help::create_example_string("export zlib zlib:x64-windows boost --nuget"); - args.check_min_arg_count(1, example); + args.check_min_arg_count(1, EXAMPLE); const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, example); + return Input::check_and_get_package_spec(arg, default_triplet, EXAMPLE); }); for (auto&& spec : specs) Input::check_triplet(spec.triplet(), paths); @@ -252,7 +252,7 @@ namespace vcpkg::Commands::Export if (!raw && !nuget && !zip && !_7zip && !dryRun) { System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --zip --7zip"); - System::print(example); + System::print(EXAMPLE); Checks::exit_fail(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/commands_import.cpp b/toolsrc/src/commands_import.cpp index 5db1885b2..007e8c204 100644 --- a/toolsrc/src/commands_import.cpp +++ b/toolsrc/src/commands_import.cpp @@ -93,9 +93,9 @@ namespace vcpkg::Commands::Import void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string example = Commands::Help::create_example_string( + static const std::string EXAMPLE = Commands::Help::create_example_string( R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)"); - args.check_exact_arg_count(3, example); + args.check_exact_arg_count(3, EXAMPLE); args.check_and_get_optional_command_arguments({}); const fs::path control_file_path(args.command_arguments[0]); diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index 8b1eec5eb..d7c14f39c 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -450,12 +450,12 @@ namespace vcpkg::Commands::Install static const std::string OPTION_RECURSE = "--recurse"; // input sanitization - static const std::string example = + static const std::string EXAMPLE = Commands::Help::create_example_string("install zlib zlib:x64-windows curl boost"); - args.check_min_arg_count(1, example); + args.check_min_arg_count(1, EXAMPLE); const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_full_package_spec(arg, default_triplet, example); + return Input::check_and_get_full_package_spec(arg, default_triplet, EXAMPLE); }); for (auto&& spec : specs) @@ -549,7 +549,7 @@ namespace vcpkg::Commands::Install { // User specified --purge and --no-purge System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge."); - System::print(example); + System::print(EXAMPLE); Checks::exit_fail(VCPKG_LINE_INFO); } const std::string display_name = remove_action->spec.to_string(); diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/commands_integrate.cpp index fce9e4121..b0ce5edee 100644 --- a/toolsrc/src/commands_integrate.cpp +++ b/toolsrc/src/commands_integrate.cpp @@ -317,10 +317,10 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string example = Strings::format("Commands:\n" + static const std::string EXAMPLE = Strings::format("Commands:\n" "%s", INTEGRATE_COMMAND_HELPSTRING); - args.check_exact_arg_count(1, example); + args.check_exact_arg_count(1, EXAMPLE); args.check_and_get_optional_command_arguments({}); if (args.command_arguments[0] == "install") diff --git a/toolsrc/src/commands_list.cpp b/toolsrc/src/commands_list.cpp index 3cfa7e184..98e26f3d0 100644 --- a/toolsrc/src/commands_list.cpp +++ b/toolsrc/src/commands_list.cpp @@ -25,10 +25,10 @@ namespace vcpkg::Commands::List void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string example = Strings::format( + static const std::string EXAMPLE = Strings::format( "The argument should be a substring to search for, or no argument to display all installed libraries.\n%s", Commands::Help::create_example_string("list png")); - args.check_max_arg_count(1, example); + args.check_max_arg_count(1, EXAMPLE); const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_FULLDESC}); diff --git a/toolsrc/src/commands_owns.cpp b/toolsrc/src/commands_owns.cpp index 757292e96..718a0277f 100644 --- a/toolsrc/src/commands_owns.cpp +++ b/toolsrc/src/commands_owns.cpp @@ -25,9 +25,9 @@ namespace vcpkg::Commands::Owns void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string example = Strings::format("The argument should be a pattern to search for. %s", + static const std::string EXAMPLE = Strings::format("The argument should be a pattern to search for. %s", Commands::Help::create_example_string("owns zlib.dll")); - args.check_exact_arg_count(1, example); + args.check_exact_arg_count(1, EXAMPLE); args.check_and_get_optional_command_arguments({}); StatusParagraphs status_db = database_load_check(paths); diff --git a/toolsrc/src/commands_portsdiff.cpp b/toolsrc/src/commands_portsdiff.cpp index 83d62896f..09299cb09 100644 --- a/toolsrc/src/commands_portsdiff.cpp +++ b/toolsrc/src/commands_portsdiff.cpp @@ -117,11 +117,11 @@ namespace vcpkg::Commands::PortsDiff void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string example = + static const std::string EXAMPLE = Strings::format("The argument should be a branch/tag/hash to checkout.\n%s", Commands::Help::create_example_string("portsdiff mybranchname")); - args.check_min_arg_count(1, example); - args.check_max_arg_count(2, example); + args.check_min_arg_count(1, EXAMPLE); + args.check_max_arg_count(2, EXAMPLE); args.check_and_get_optional_command_arguments({}); const fs::path& git_exe = paths.get_git_exe(); diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index cca541c85..2b5033166 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -136,7 +136,7 @@ namespace vcpkg::Commands::Remove static const std::string OPTION_RECURSE = "--recurse"; static const std::string OPTION_DRY_RUN = "--dry-run"; static const std::string OPTION_OUTDATED = "--outdated"; - static const std::string example = + static const std::string EXAMPLE = Commands::Help::create_example_string("remove zlib zlib:x64-windows curl boost"); const std::unordered_set options = args.check_and_get_optional_command_arguments( {OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED}); @@ -145,7 +145,7 @@ namespace vcpkg::Commands::Remove std::vector specs; if (options.find(OPTION_OUTDATED) != options.cend()) { - args.check_exact_arg_count(0, example); + args.check_exact_arg_count(0, EXAMPLE); specs = Util::fmap(Update::find_outdated_packages(paths, status_db), [](auto&& outdated) { return outdated.spec; }); @@ -157,9 +157,9 @@ namespace vcpkg::Commands::Remove } else { - args.check_min_arg_count(1, example); + args.check_min_arg_count(1, EXAMPLE); specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, example); + return Input::check_and_get_package_spec(arg, default_triplet, EXAMPLE); }); for (auto&& spec : specs) @@ -171,7 +171,7 @@ namespace vcpkg::Commands::Remove { // User specified --purge and --no-purge System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge."); - System::print(example); + System::print(EXAMPLE); Checks::exit_fail(VCPKG_LINE_INFO); } const bool isRecursive = options.find(OPTION_RECURSE) != options.cend(); diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index 529d52a8b..1ccec9fbe 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -80,10 +80,10 @@ namespace vcpkg::Commands::Search void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string example = Strings::format( + static const std::string EXAMPLE = Strings::format( "The argument should be a substring to search for, or no argument to display all libraries.\n%s", Commands::Help::create_example_string("search png")); - args.check_max_arg_count(1, example); + args.check_max_arg_count(1, EXAMPLE); const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}); -- cgit v1.2.3 From ef33eb96cf1b27bee88aa84b6f2cb3a8c43bb952 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:13:12 -0700 Subject: [vcpkg contact] Naming convention fix --- toolsrc/src/commands_contact.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/commands_contact.cpp b/toolsrc/src/commands_contact.cpp index 7f4161802..8374350ee 100644 --- a/toolsrc/src/commands_contact.cpp +++ b/toolsrc/src/commands_contact.cpp @@ -7,8 +7,8 @@ namespace vcpkg::Commands::Contact { const std::string& email() { - static const std::string s_email = R"(vcpkg@microsoft.com)"; - return s_email; + static const std::string S_EMAIL = R"(vcpkg@microsoft.com)"; + return S_EMAIL; } void perform_and_exit(const VcpkgCmdArguments& args) -- cgit v1.2.3 From 78cbe5d52fc7661e59126f322826e71e2c3e66cc Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:13:22 -0700 Subject: [vcpkg export] Naming convention fixes --- toolsrc/src/commands_export.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index 9e87d7b01..b416a6f3c 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -21,7 +21,7 @@ namespace vcpkg::Commands::Export const std::string& nuget_id, const std::string& nupkg_version) { - static constexpr auto content_template = R"( + static constexpr auto CONTENT_TEMPLATE = R"( @NUGET_ID@ @@ -40,7 +40,7 @@ namespace vcpkg::Commands::Export )"; - std::string nuspec_file_content = std::regex_replace(content_template, std::regex("@NUGET_ID@"), nuget_id); + std::string nuspec_file_content = std::regex_replace(CONTENT_TEMPLATE, std::regex("@NUGET_ID@"), nuget_id); nuspec_file_content = std::regex_replace(nuspec_file_content, std::regex("@VERSION@"), nupkg_version); nuspec_file_content = std::regex_replace(nuspec_file_content, std::regex("@RAW_EXPORTED_DIR@"), raw_exported_dir); @@ -62,10 +62,10 @@ namespace vcpkg::Commands::Export static void print_plan(const std::map>& group_by_plan_type) { - static constexpr std::array order = {ExportPlanType::ALREADY_BUILT, + static constexpr std::array ORDER = {ExportPlanType::ALREADY_BUILT, ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT}; - for (const ExportPlanType plan_type : order) + for (const ExportPlanType plan_type : ORDER) { const auto it = group_by_plan_type.find(plan_type); if (it == group_by_plan_type.cend()) @@ -151,7 +151,7 @@ namespace vcpkg::Commands::Export enum class BackingEnum { ZIP = 1, - _7ZIP, + SEVEN_ZIP, }; constexpr ArchiveFormat() = delete; @@ -174,7 +174,7 @@ namespace vcpkg::Commands::Export namespace ArchiveFormatC { constexpr const ArchiveFormat ZIP(ArchiveFormat::BackingEnum::ZIP, L"zip", L"zip"); - constexpr const ArchiveFormat _7ZIP(ArchiveFormat::BackingEnum::_7ZIP, L"7z", L"7zip"); + constexpr const ArchiveFormat SEVEN_ZIP(ArchiveFormat::BackingEnum::SEVEN_ZIP, L"7z", L"7zip"); } static fs::path do_archive_export(const VcpkgPaths& paths, @@ -216,7 +216,7 @@ namespace vcpkg::Commands::Export static const std::string OPTION_RAW = "--raw"; static const std::string OPTION_NUGET = "--nuget"; static const std::string OPTION_ZIP = "--zip"; - static const std::string OPTION_7ZIP = "--7zip"; + static const std::string OPTION_SEVEN_ZIP = "--7zip"; static const std::string OPTION_NUGET_ID = "--nuget-id"; static const std::string OPTION_NUGET_VERSION = "--nuget-version"; @@ -237,19 +237,19 @@ namespace vcpkg::Commands::Export OPTION_RAW, OPTION_NUGET, OPTION_ZIP, - OPTION_7ZIP, + OPTION_SEVEN_ZIP, }, { OPTION_NUGET_ID, OPTION_NUGET_VERSION, }); - const bool dryRun = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); + const bool dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); const bool raw = options.switches.find(OPTION_RAW) != options.switches.cend(); const bool nuget = options.switches.find(OPTION_NUGET) != options.switches.cend(); const bool zip = options.switches.find(OPTION_ZIP) != options.switches.cend(); - const bool _7zip = options.switches.find(OPTION_7ZIP) != options.switches.cend(); + const bool seven_zip = options.switches.find(OPTION_SEVEN_ZIP) != options.switches.cend(); - if (!raw && !nuget && !zip && !_7zip && !dryRun) + if (!raw && !nuget && !zip && !seven_zip && !dry_run) { System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --zip --7zip"); System::print(EXAMPLE); @@ -300,7 +300,7 @@ namespace vcpkg::Commands::Export Checks::exit_fail(VCPKG_LINE_INFO); } - if (dryRun) + if (dry_run) { Checks::exit_success(VCPKG_LINE_INFO); } @@ -407,11 +407,11 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console print_next_step_info("[...]"); } - if (_7zip) + if (seven_zip) { System::println("Creating 7zip archive... "); const fs::path output_path = - do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::_7ZIP); + do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::SEVEN_ZIP); System::println(System::Color::success, "Creating 7zip archive... done"); System::println(System::Color::success, "7zip archive exported at: %s", output_path.generic_string()); print_next_step_info("[...]"); -- cgit v1.2.3 From b17480b0b44ddab04b7036766b58c41faa59afa7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:13:30 -0700 Subject: Remove unused #include --- toolsrc/src/commands_create.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/toolsrc/src/commands_create.cpp b/toolsrc/src/commands_create.cpp index 99c1b7401..6898f7399 100644 --- a/toolsrc/src/commands_create.cpp +++ b/toolsrc/src/commands_create.cpp @@ -2,7 +2,6 @@ #include "vcpkg_Commands.h" #include "vcpkg_Files.h" -#include "vcpkg_Input.h" #include "vcpkg_System.h" #include "vcpkglib.h" -- cgit v1.2.3 From 170cfa3f39d969ed5ebab7693610ffff9a313530 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:20:52 -0700 Subject: Add missing const --- toolsrc/src/MachineType.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/MachineType.cpp b/toolsrc/src/MachineType.cpp index 2f44ce21a..af6378c88 100644 --- a/toolsrc/src/MachineType.cpp +++ b/toolsrc/src/MachineType.cpp @@ -7,7 +7,7 @@ namespace vcpkg { MachineType to_machine_type(const uint16_t value) { - MachineType t = static_cast(value); + const MachineType t = static_cast(value); switch (t) { case MachineType::UNKNOWN: -- cgit v1.2.3 From 03edddef2402d7a578c7714b6b28d3734e3d3940 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:22:02 -0700 Subject: [vcpkg list] Naming convention fix --- toolsrc/src/commands_list.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/commands_list.cpp b/toolsrc/src/commands_list.cpp index 98e26f3d0..640885860 100644 --- a/toolsrc/src/commands_list.cpp +++ b/toolsrc/src/commands_list.cpp @@ -8,9 +8,9 @@ namespace vcpkg::Commands::List { static const std::string OPTION_FULLDESC = "--x-full-desc"; // TODO: This should find a better home, eventually - static void do_print(const StatusParagraph& pgh, bool FullDesc) + static void do_print(const StatusParagraph& pgh, bool full_desc) { - if (FullDesc) + if (full_desc) { System::println("%-30s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description); } -- cgit v1.2.3 From 775dc8ce4017395406f9699676b1e8a117afcac5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:22:56 -0700 Subject: [vcpkg integrate] Naming convention fixes --- toolsrc/src/commands_integrate.cpp | 56 +++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/commands_integrate.cpp index b0ce5edee..abfb676da 100644 --- a/toolsrc/src/commands_integrate.cpp +++ b/toolsrc/src/commands_integrate.cpp @@ -8,10 +8,10 @@ namespace vcpkg::Commands::Integrate { - static const std::array old_system_target_files = { + static const std::array OLD_SYSTEM_TARGET_FILES = { System::get_program_files_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets", System::get_program_files_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"}; - static const fs::path system_wide_targets_file = + static const fs::path SYSTEM_WIDE_TARGETS_FILE = System::get_program_files_32_bit() / "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props"; static std::string create_appdata_targets_shortcut(const std::string& target_path) noexcept @@ -82,7 +82,7 @@ namespace vcpkg::Commands::Integrate const std::string& nuget_id, const std::string& nupkg_version) { - static constexpr auto content_template = R"( + static constexpr auto CONTENT_TEMPLATE = R"( @NUGET_ID@ @@ -99,7 +99,7 @@ namespace vcpkg::Commands::Integrate )"; - std::string content = std::regex_replace(content_template, std::regex("@NUGET_ID@"), nuget_id); + std::string content = std::regex_replace(CONTENT_TEMPLATE, std::regex("@NUGET_ID@"), nuget_id); content = std::regex_replace(content, std::regex("@VCPKG_DIR@"), vcpkg_root_dir.string()); content = std::regex_replace(content, std::regex("@VERSION@"), nupkg_version); return content; @@ -113,36 +113,36 @@ namespace vcpkg::Commands::Integrate static ElevationPromptChoice elevated_cmd_execute(const std::string& param) { - SHELLEXECUTEINFO shExInfo = {0}; - shExInfo.cbSize = sizeof(shExInfo); - shExInfo.fMask = SEE_MASK_NOCLOSEPROCESS; - shExInfo.hwnd = nullptr; - shExInfo.lpVerb = "runas"; - shExInfo.lpFile = "cmd"; // Application to start - - shExInfo.lpParameters = param.c_str(); // Additional parameters - shExInfo.lpDirectory = nullptr; - shExInfo.nShow = SW_HIDE; - shExInfo.hInstApp = nullptr; - - if (!ShellExecuteExA(&shExInfo)) + SHELLEXECUTEINFO sh_ex_info = {0}; + sh_ex_info.cbSize = sizeof(sh_ex_info); + sh_ex_info.fMask = SEE_MASK_NOCLOSEPROCESS; + sh_ex_info.hwnd = nullptr; + sh_ex_info.lpVerb = "runas"; + sh_ex_info.lpFile = "cmd"; // Application to start + + sh_ex_info.lpParameters = param.c_str(); // Additional parameters + sh_ex_info.lpDirectory = nullptr; + sh_ex_info.nShow = SW_HIDE; + sh_ex_info.hInstApp = nullptr; + + if (!ShellExecuteExA(&sh_ex_info)) { return ElevationPromptChoice::NO; } - if (shExInfo.hProcess == nullptr) + if (sh_ex_info.hProcess == nullptr) { return ElevationPromptChoice::NO; } - WaitForSingleObject(shExInfo.hProcess, INFINITE); - CloseHandle(shExInfo.hProcess); + WaitForSingleObject(sh_ex_info.hProcess, INFINITE); + CloseHandle(sh_ex_info.hProcess); return ElevationPromptChoice::YES; } static fs::path get_appdata_targets_path() { - static const fs::path local_app_data = + static const fs::path LOCAL_APP_DATA = fs::path(System::get_environment_variable(L"LOCALAPPDATA").value_or_exit(VCPKG_LINE_INFO)); - return local_app_data / "vcpkg" / "vcpkg.user.targets"; + return LOCAL_APP_DATA / "vcpkg" / "vcpkg.user.targets"; } static void integrate_install(const VcpkgPaths& paths) @@ -150,7 +150,7 @@ namespace vcpkg::Commands::Integrate auto& fs = paths.get_filesystem(); // TODO: This block of code should eventually be removed - for (auto&& old_system_wide_targets_file : old_system_target_files) + for (auto&& old_system_wide_targets_file : OLD_SYSTEM_TARGET_FILES) { if (fs.exists(old_system_wide_targets_file)) { @@ -174,7 +174,7 @@ namespace vcpkg::Commands::Integrate fs.create_directory(tmp_dir, ec); bool should_install_system = true; - const Expected system_wide_file_contents = fs.read_contents(system_wide_targets_file); + const Expected system_wide_file_contents = fs.read_contents(SYSTEM_WIDE_TARGETS_FILE); if (auto contents_data = system_wide_file_contents.get()) { std::regex re(R"###()###"); @@ -193,9 +193,9 @@ namespace vcpkg::Commands::Integrate fs.write_contents(sys_src_path, create_system_targets_shortcut()); const std::string param = Strings::format(R"(/c mkdir "%s" & copy "%s" "%s" /Y > nul)", - system_wide_targets_file.parent_path().string(), + SYSTEM_WIDE_TARGETS_FILE.parent_path().string(), sys_src_path.string(), - system_wide_targets_file.string()); + SYSTEM_WIDE_TARGETS_FILE.string()); ElevationPromptChoice user_choice = elevated_cmd_execute(param); switch (user_choice) { @@ -207,9 +207,9 @@ namespace vcpkg::Commands::Integrate } Checks::check_exit(VCPKG_LINE_INFO, - fs.exists(system_wide_targets_file), + fs.exists(SYSTEM_WIDE_TARGETS_FILE), "Error: failed to copy targets file to %s", - system_wide_targets_file.string()); + SYSTEM_WIDE_TARGETS_FILE.string()); } const fs::path appdata_src_path = tmp_dir / "vcpkg.user.targets"; -- cgit v1.2.3 From dff6b22b430d27fac6239076d7511aaa5df6c9ca Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:24:44 -0700 Subject: [vcpkg integrate] Change regex to static const, add missing consts --- toolsrc/src/commands_integrate.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/commands_integrate.cpp index abfb676da..1bf26910c 100644 --- a/toolsrc/src/commands_integrate.cpp +++ b/toolsrc/src/commands_integrate.cpp @@ -156,7 +156,7 @@ namespace vcpkg::Commands::Integrate { const std::string param = Strings::format(R"(/c DEL "%s" /Q > nul)", old_system_wide_targets_file.string()); - ElevationPromptChoice user_choice = elevated_cmd_execute(param); + const ElevationPromptChoice user_choice = elevated_cmd_execute(param); switch (user_choice) { case ElevationPromptChoice::YES: break; @@ -175,14 +175,14 @@ namespace vcpkg::Commands::Integrate bool should_install_system = true; const Expected system_wide_file_contents = fs.read_contents(SYSTEM_WIDE_TARGETS_FILE); - if (auto contents_data = system_wide_file_contents.get()) + static const std::regex RE(R"###()###"); + if (const auto contents_data = system_wide_file_contents.get()) { - std::regex re(R"###()###"); std::match_results match; - auto found = std::regex_search(*contents_data, match, re); + const auto found = std::regex_search(*contents_data, match, RE); if (found) { - int ver = atoi(match[1].str().c_str()); + const int ver = atoi(match[1].str().c_str()); if (ver >= 1) should_install_system = false; } } @@ -196,7 +196,7 @@ namespace vcpkg::Commands::Integrate SYSTEM_WIDE_TARGETS_FILE.parent_path().string(), sys_src_path.string(), SYSTEM_WIDE_TARGETS_FILE.string()); - ElevationPromptChoice user_choice = elevated_cmd_execute(param); + const ElevationPromptChoice user_choice = elevated_cmd_execute(param); switch (user_choice) { case ElevationPromptChoice::YES: break; @@ -217,7 +217,7 @@ namespace vcpkg::Commands::Integrate create_appdata_targets_shortcut(paths.buildsystems_msbuild_targets.string())); auto appdata_dst_path = get_appdata_targets_path(); - auto rc = fs.copy_file(appdata_src_path, appdata_dst_path, fs::copy_options::overwrite_existing, ec); + const auto rc = fs.copy_file(appdata_src_path, appdata_dst_path, fs::copy_options::overwrite_existing, ec); if (!rc || ec) { @@ -245,7 +245,7 @@ namespace vcpkg::Commands::Integrate const fs::path path = get_appdata_targets_path(); std::error_code ec; - bool was_deleted = fs.remove(path, ec); + const bool was_deleted = fs.remove(path, ec); Checks::check_exit(VCPKG_LINE_INFO, !ec, "Error: Unable to remove user-wide integration: %d", ec.message()); -- cgit v1.2.3 From 61e5b6980b41bb73daaac3c3e1e15f4b04f960d9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:27:10 -0700 Subject: [vcpkg import] Add missing consts --- toolsrc/src/commands_import.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/toolsrc/src/commands_import.cpp b/toolsrc/src/commands_import.cpp index 007e8c204..412a03d7f 100644 --- a/toolsrc/src/commands_import.cpp +++ b/toolsrc/src/commands_import.cpp @@ -28,7 +28,7 @@ namespace vcpkg::Commands::Import for (auto&& file : files) { if (fs.is_directory(file)) continue; - auto ext = file.extension(); + const auto ext = file.extension(); if (ext == ".dll") binaries.dlls.push_back(std::move(file)); else if (ext == ".lib") @@ -46,7 +46,7 @@ namespace vcpkg::Commands::Import for (auto const& src_path : files) { - fs::path dest_path = destination_folder / src_path.filename(); + const fs::path dest_path = destination_folder / src_path.filename(); fs.copy(src_path, dest_path, fs::copy_options::overwrite_existing); } } @@ -59,10 +59,10 @@ namespace vcpkg::Commands::Import check_is_directory(VCPKG_LINE_INFO, fs, include_directory); check_is_directory(VCPKG_LINE_INFO, fs, project_directory); check_is_directory(VCPKG_LINE_INFO, fs, destination_path); - Binaries debug_binaries = find_binaries_in_dir(fs, project_directory / "Debug"); - Binaries release_binaries = find_binaries_in_dir(fs, project_directory / "Release"); + const Binaries debug_binaries = find_binaries_in_dir(fs, project_directory / "Debug"); + const Binaries release_binaries = find_binaries_in_dir(fs, project_directory / "Release"); - fs::path destination_include_directory = destination_path / "include"; + const fs::path destination_include_directory = destination_path / "include"; fs.copy(include_directory, destination_include_directory, fs::copy_options::recursive | fs::copy_options::overwrite_existing); @@ -82,12 +82,12 @@ namespace vcpkg::Commands::Import const BinaryParagraph& control_file_data) { auto& fs = paths.get_filesystem(); - fs::path library_destination_path = paths.package_dir(control_file_data.spec); + const fs::path library_destination_path = paths.package_dir(control_file_data.spec); std::error_code ec; fs.create_directory(library_destination_path, ec); place_library_files_in(paths.get_filesystem(), include_directory, project_directory, library_destination_path); - fs::path control_file_path = library_destination_path / "CONTROL"; + const fs::path control_file_path = library_destination_path / "CONTROL"; fs.write_contents(control_file_path, Strings::serialize(control_file_data)); } -- cgit v1.2.3 From f0d5d94348a95c502688816c3ab360cd087aca95 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 31 Aug 2017 18:33:52 -0700 Subject: [vcpkg portsdiff] Add missing const, remove unused #include --- toolsrc/src/commands_portsdiff.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/commands_portsdiff.cpp b/toolsrc/src/commands_portsdiff.cpp index 09299cb09..32bc3de3c 100644 --- a/toolsrc/src/commands_portsdiff.cpp +++ b/toolsrc/src/commands_portsdiff.cpp @@ -2,7 +2,6 @@ #include "Paragraphs.h" #include "SortedVector.h" -#include "SourceParagraph.h" #include "vcpkg_Commands.h" #include "vcpkg_Maps.h" #include "vcpkg_System.h" @@ -139,8 +138,8 @@ namespace vcpkg::Commands::PortsDiff read_ports_from_commit(paths, git_commit_id_for_previous_snapshot); // Already sorted, so set_difference can work on std::vector too - std::vector current_ports = Maps::extract_keys(current_names_and_versions); - std::vector previous_ports = Maps::extract_keys(previous_names_and_versions); + const std::vector current_ports = Maps::extract_keys(current_names_and_versions); + const std::vector previous_ports = Maps::extract_keys(previous_names_and_versions); const SetElementPresence setp = SetElementPresence::create(current_ports, previous_ports); -- cgit v1.2.3 From a610f62587fa9caac9a70f5d17305284c441dad3 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Fri, 1 Sep 2017 13:42:51 +0200 Subject: protobuf: switching to 3.4 --- ports/protobuf/0001-fix-missing-export.patch | 13 ------------- ports/protobuf/001-add-compiler-flag.patch | 25 ++++++++++++++++--------- ports/protobuf/portfile.cmake | 9 ++++----- 3 files changed, 20 insertions(+), 27 deletions(-) delete mode 100644 ports/protobuf/0001-fix-missing-export.patch diff --git a/ports/protobuf/0001-fix-missing-export.patch b/ports/protobuf/0001-fix-missing-export.patch deleted file mode 100644 index c7d5ff6c8..000000000 --- a/ports/protobuf/0001-fix-missing-export.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/google/protobuf/generated_message_util.h b/src/google/protobuf/generated_message_util.h -index 4417446..a7154b4 100644 ---- a/src/google/protobuf/generated_message_util.h -+++ b/src/google/protobuf/generated_message_util.h -@@ -164,7 +164,7 @@ class ExplicitlyConstructed { - - // Default empty string object. Don't use this directly. Instead, call - // GetEmptyString() to get the reference. --extern ExplicitlyConstructed< ::std::string> fixed_address_empty_string; -+LIBPROTOBUF_EXPORT extern ExplicitlyConstructed< ::std::string> fixed_address_empty_string; - LIBPROTOBUF_EXPORT extern ProtobufOnceType empty_string_once_init_; - LIBPROTOBUF_EXPORT void InitEmptyString(); - diff --git a/ports/protobuf/001-add-compiler-flag.patch b/ports/protobuf/001-add-compiler-flag.patch index aec510f44..dd1285cea 100644 --- a/ports/protobuf/001-add-compiler-flag.patch +++ b/ports/protobuf/001-add-compiler-flag.patch @@ -1,14 +1,13 @@ diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index 7618ba21..bd92b09d 100644 +index 7618ba2..d282a60 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt -@@ -165,8 +165,11 @@ endif (protobuf_UNICODE) +@@ -165,8 +165,10 @@ endif (protobuf_UNICODE) include(libprotobuf-lite.cmake) include(libprotobuf.cmake) -include(libprotoc.cmake) -include(protoc.cmake) -+ +if(protobuf_BUILD_COMPILER) + include(libprotoc.cmake) + include(protoc.cmake) @@ -16,18 +15,26 @@ index 7618ba21..bd92b09d 100644 if (protobuf_BUILD_TESTS) include(tests.cmake) + diff --git a/cmake/install.cmake b/cmake/install.cmake -index 28dc90dc..52c1f721 100644 +index 441bf55..4158820 100644 --- a/cmake/install.cmake +++ b/cmake/install.cmake -@@ -1,9 +1,12 @@ +@@ -1,14 +1,17 @@ include(GNUInstallDirs) +-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf.pc.cmake +set(LIBRARIES_TO_SET_DEST libprotobuf-lite libprotobuf) +if(protobuf_BUILD_COMPILER) + list(APPEND LIBRARIES_TO_SET_DEST libprotoc) +endif() + ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libprotobuf.cmake + ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc @ONLY) +-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf-lite.pc.cmake ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libprotobuf-lite.cmake + ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc @ONLY) + foreach(_library - libprotobuf-lite - libprotobuf @@ -36,7 +43,7 @@ index 28dc90dc..52c1f721 100644 set_property(TARGET ${_library} PROPERTY INTERFACE_INCLUDE_DIRECTORIES $ -@@ -14,8 +17,10 @@ foreach(_library +@@ -19,8 +22,10 @@ foreach(_library ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library}) endforeach() @@ -47,9 +54,9 @@ index 28dc90dc..52c1f721 100644 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) +endif() - file(STRINGS extract_includes.bat.in _extract_strings - REGEX "^copy") -@@ -94,7 +99,12 @@ configure_file(protobuf-options.cmake + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + +@@ -101,7 +106,12 @@ configure_file(protobuf-options.cmake ${CMAKE_INSTALL_CMAKEDIR}/protobuf-options.cmake @ONLY) # Allows the build directory to be used as a find directory. diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index fa81e0542..daf72a495 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -1,16 +1,16 @@ include(vcpkg_common_functions) -set(PROTOBUF_VERSION 3.3.0) +set(PROTOBUF_VERSION 3.4.0) vcpkg_download_distfile(ARCHIVE_FILE URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-cpp-${PROTOBUF_VERSION}.tar.gz" FILENAME "protobuf-cpp-${PROTOBUF_VERSION}.tar.gz" - SHA512 ef01300bdda4a1a33a6056aea1d55e9d66ab1ca644aa2d9d5633cfc0bccfe4c24fdfa1015889b2c1c568e89ad053c701de1aca45196a6439130b7bb8f461595f + SHA512 ce9bd9bc818c4a8e8b08c83e8a4eba6fca008a64a5ad9d322b19683b1de2b5fa622ed99093323f3c9d0820ef23430f7ee07f6930f7f877d334e5d36df9b0be0e ) vcpkg_download_distfile(TOOL_ARCHIVE_FILE URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-win32.zip" FILENAME "protoc-${PROTOBUF_VERSION}-win32.zip" - SHA512 9b4902b3187fb978a8153aaf050314a3ca9ca161b0712a3672ccdfabb7f5a57035e71c2dfde9a0b99f9417e159dcbdedaf9a2b1917d712dc3d9d554bba0d4ee8 + SHA512 b874c3f47b39ac78f5675e05220318683004a365c248bf47ba50d8c66c8ed7763432451bab30524e131e1185a2bdaa6e6071b389eb61ad58b1b95974cf39d41b ) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}) @@ -23,8 +23,7 @@ vcpkg_extract_source_archive(${ARCHIVE_FILE}) # Add a flag that can be set to disable the protobuf compiler vcpkg_apply_patches( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-missing-export.patch" - "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch" + PATCHES "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch" ) -- cgit v1.2.3 From 256ce192a4580baed0793d01d40efb881a5e18eb Mon Sep 17 00:00:00 2001 From: juandent Date: Fri, 1 Sep 2017 12:16:53 -0600 Subject: This is my proposed new version of the port file the port file for cppwinrt, latest release --- portfile.cmake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 portfile.cmake diff --git a/portfile.cmake b/portfile.cmake new file mode 100644 index 000000000..b19d946b6 --- /dev/null +++ b/portfile.cmake @@ -0,0 +1,18 @@ +include(vcpkg_common_functions) +find_program(GIT git) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-spring_2017_creators_update_for_vs_15.3) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/Microsoft/cppwinrt/archive/spring_2017_creators_update_for_vs_15.3.tar.gz" + FILENAME "cppwinrt-spring_2017_creators_update_for_vs_15.3.tar.gz" + SHA512 6b8646270f69e3ebec13ed5fb46ed92236659d05 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright) + +# Copy the cppwinrt header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.14393.0/winrt/*) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt) -- cgit v1.2.3 From 97063965b06280025eb123347f0145d6d817a29f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 16:26:52 -0700 Subject: Remove #1712 workaround. Clean Byte-Order-Mark if present --- toolsrc/src/VcpkgPaths.cpp | 14 ++------------ toolsrc/src/vcpkg_System.cpp | 12 ++++++++++++ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index e2004c67b..64c4ae630 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -10,16 +10,6 @@ namespace vcpkg { - static std::string WORKAROUND_ISSUE_1712(const std::string& line) - { - auto colon_pos = line.find(':'); - if (colon_pos != std::string::npos && colon_pos > 1) - { - return line.substr(colon_pos - 1); - } - return line; - } - static bool exists_and_has_equal_or_greater_version(const std::wstring& version_cmd, const std::array& expected_version) { @@ -93,7 +83,7 @@ namespace vcpkg Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); } - const fs::path actual_downloaded_path = WORKAROUND_ISSUE_1712(Strings::trimmed(rc.output)); + const fs::path actual_downloaded_path = Strings::trimmed(rc.output); std::error_code ec; auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); Checks::check_exit(VCPKG_LINE_INFO, @@ -262,7 +252,7 @@ namespace vcpkg const std::wstring cmd = System::create_powershell_script_cmd(script); System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd); Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect VS 2017 instances"); - return Util::fmap(Strings::split(ec_data.output, "\n"), WORKAROUND_ISSUE_1712); + return Strings::split(ec_data.output, "\n"); } static Optional get_VS2015_installation_instance() diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index beaa997b8..40e335117 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -176,6 +176,17 @@ namespace vcpkg::System return exit_code; } + // On Win7, output from powershell calls contain a byte order mark, so we strip it out if it is present + static void remove_byte_order_mark(std::wstring* s) + { + const wchar_t* a = s->c_str(); + // This is the UTF-8 byte-order mark + if (a[0] == 0xEF && a[1] == 0xBB && a[2] == 0xBF) + { + s->erase(0, 3); + } + } + ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line) { // Flush stdout before launching external process @@ -202,6 +213,7 @@ namespace vcpkg::System const auto ec = _pclose(pipe); Debug::println("_pclose() returned %d", ec); + remove_byte_order_mark(&output); return {ec, Strings::to_utf8(output)}; } -- cgit v1.2.3 From 86dc3107ca03575519d020cdf3dcebbf45c5d462 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 16:55:26 -0700 Subject: [VcpkgPaths.cpp] Naming conventions and const fixes --- toolsrc/src/VcpkgPaths.cpp | 67 +++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 64c4ae630..50032b740 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -13,24 +13,24 @@ namespace vcpkg static bool exists_and_has_equal_or_greater_version(const std::wstring& version_cmd, const std::array& expected_version) { - static const std::regex re(R"###((\d+)\.(\d+)\.(\d+))###"); + static const std::regex RE(R"###((\d+)\.(\d+)\.(\d+))###"); - auto rc = System::cmd_execute_and_capture_output(Strings::wformat(LR"(%s)", version_cmd)); + const auto rc = System::cmd_execute_and_capture_output(Strings::wformat(LR"(%s)", version_cmd)); if (rc.exit_code != 0) { return false; } std::match_results match; - auto found = std::regex_search(rc.output, match, re); + const auto found = std::regex_search(rc.output, match, RE); if (!found) { return false; } - int d1 = atoi(match[1].str().c_str()); - int d2 = atoi(match[2].str().c_str()); - int d3 = atoi(match[3].str().c_str()); + const int d1 = atoi(match[1].str().c_str()); + const int d2 = atoi(match[2].str().c_str()); + const int d3 = atoi(match[3].str().c_str()); if (d1 > expected_version[0] || (d1 == expected_version[0] && d2 > expected_version[1]) || (d1 == expected_version[0] && d2 == expected_version[1] && d3 >= expected_version[2])) { @@ -64,8 +64,9 @@ namespace vcpkg const std::array& version) { const fs::path script = scripts_folder / "fetchDependency.ps1"; - auto install_cmd = System::create_powershell_script_cmd(script, Strings::wformat(L"-Dependency %s", tool_name)); - System::ExitCodeAndOutput rc = System::cmd_execute_and_capture_output(install_cmd); + const auto install_cmd = + System::create_powershell_script_cmd(script, Strings::wformat(L"-Dependency %s", tool_name)); + const System::ExitCodeAndOutput rc = System::cmd_execute_and_capture_output(install_cmd); if (rc.exit_code) { const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); @@ -85,7 +86,7 @@ namespace vcpkg const fs::path actual_downloaded_path = Strings::trimmed(rc.output); std::error_code ec; - auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); + const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); Checks::check_exit(VCPKG_LINE_INFO, eq && !ec, "Expected dependency downloaded path to be %s, but was %s", @@ -96,8 +97,8 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array expected_version = {3, 9, 1}; - static const std::wstring version_check_arguments = L"--version"; + static constexpr std::array EXPECTED_VERSION = {3, 9, 1}; + static const std::wstring VERSION_CHECK_ARGUMENTS = L"--version"; const fs::path downloaded_copy = downloads_folder / "cmake-3.9.1-win32-x86" / "bin" / "cmake.exe"; const std::vector from_path = Files::find_from_PATH(L"cmake"); @@ -109,19 +110,19 @@ namespace vcpkg candidate_paths.push_back(System::get_program_files_32_bit() / "CMake" / "bin"); const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, version_check_arguments, expected_version); - if (auto p = path.get()) + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); + if (const auto p = path.get()) { return *p; } - return fetch_dependency(scripts_folder, L"cmake", downloaded_copy, expected_version); + return fetch_dependency(scripts_folder, L"cmake", downloaded_copy, EXPECTED_VERSION); } fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array expected_version = {4, 1, 0}; - static const std::wstring version_check_arguments = Strings::WEMPTY; + static constexpr std::array EXPECTED_VERSION = {4, 1, 0}; + static const std::wstring VERSION_CHECK_ARGUMENTS = Strings::WEMPTY; const fs::path downloaded_copy = downloads_folder / "nuget-4.1.0" / "nuget.exe"; const std::vector from_path = Files::find_from_PATH(L"nuget"); @@ -130,19 +131,19 @@ namespace vcpkg candidate_paths.push_back(downloaded_copy); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - auto path = find_if_has_equal_or_greater_version(candidate_paths, version_check_arguments, expected_version); - if (auto p = path.get()) + auto path = find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); + if (const auto p = path.get()) { return *p; } - return fetch_dependency(scripts_folder, L"nuget", downloaded_copy, expected_version); + return fetch_dependency(scripts_folder, L"nuget", downloaded_copy, EXPECTED_VERSION); } fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array expected_version = {2, 14, 1}; - static const std::wstring version_check_arguments = L"--version"; + static constexpr std::array EXPECTED_VERSION = {2, 14, 1}; + static const std::wstring VERSION_CHECK_ARGUMENTS = L"--version"; const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.1-32-bit" / "cmd" / "git.exe"; const std::vector from_path = Files::find_from_PATH(L"git"); @@ -154,13 +155,13 @@ namespace vcpkg candidate_paths.push_back(System::get_program_files_32_bit() / "git" / "cmd" / "git.exe"); const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, version_check_arguments, expected_version); - if (auto p = path.get()) + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); + if (const auto p = path.get()) { return *p; } - return fetch_dependency(scripts_folder, L"git", downloaded_copy, expected_version); + return fetch_dependency(scripts_folder, L"git", downloaded_copy, EXPECTED_VERSION); } Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir) @@ -221,7 +222,7 @@ namespace vcpkg { for (auto&& path : get_filesystem().get_files_non_recursive(this->triplets)) { - std::string triplet_file_name = path.stem().generic_u8string(); + const std::string triplet_file_name = path.stem().generic_u8string(); if (t.canonical_name() == triplet_file_name) // TODO: fuzzy compare { // t.value = triplet_file_name; // NOTE: uncomment when implementing fuzzy compare @@ -246,19 +247,19 @@ namespace vcpkg return this->nuget_exe.get_lazy([this]() { return get_nuget_path(this->downloads, this->scripts); }); } - static std::vector get_VS2017_installation_instances(const VcpkgPaths& paths) + static std::vector get_vs2017_installation_instances(const VcpkgPaths& paths) { const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; const std::wstring cmd = System::create_powershell_script_cmd(script); - System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd); + const System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd); Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect VS 2017 instances"); return Strings::split(ec_data.output, "\n"); } - static Optional get_VS2015_installation_instance() + static Optional get_vs2015_installation_instance() { const Optional vs2015_cmntools_optional = System::get_environment_variable(L"VS140COMNTOOLS"); - if (auto v = vs2015_cmntools_optional.get()) + if (const auto v = vs2015_cmntools_optional.get()) { const fs::path vs2015_cmntools = fs::path(*v).parent_path(); // The call to parent_path() is needed because // the env variable has a trailing backslash @@ -274,15 +275,15 @@ namespace vcpkg const auto& fs = paths.get_filesystem(); - const std::vector vs2017_installation_instances = get_VS2017_installation_instances(paths); + const std::vector vs2017_installation_instances = get_vs2017_installation_instances(paths); // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations. std::vector paths_examined; std::vector found_toolsets; // VS2015 - const Optional vs_2015_installation_instance = get_VS2015_installation_instance(); - if (auto v = vs_2015_installation_instance.get()) + const Optional vs_2015_installation_instance = get_vs2015_installation_instance(); + if (const auto v = vs_2015_installation_instance.get()) { const fs::path vs2015_vcvarsall_bat = *v / "VC" / "vcvarsall.bat"; @@ -362,7 +363,7 @@ namespace vcpkg break; } } - if (auto value = vs2017_toolset.get()) + if (const auto value = vs2017_toolset.get()) { found_toolsets.push_back(*value); break; -- cgit v1.2.3 From 797c94caecc3df34e82a9d0a1d774551cdc8ff66 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 16:56:53 -0700 Subject: Remove uneeded else branch. Fix variable hiding --- toolsrc/src/VcpkgPaths.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 50032b740..7d574006e 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -393,15 +393,12 @@ namespace vcpkg { return vs_toolsets.back(); } - else - { - const auto toolset = Util::find_if(vs_toolsets, [&](const Toolset& toolset) { - return toolset_version == Strings::to_utf8(toolset.version); - }); - Checks::check_exit( - VCPKG_LINE_INFO, toolset != vs_toolsets.end(), "Could not find toolset '%s'", toolset_version); - return *toolset; - } + + const auto toolset = Util::find_if( + vs_toolsets, [&](const Toolset& t) { return toolset_version == Strings::to_utf8(t.version); }); + Checks::check_exit( + VCPKG_LINE_INFO, toolset != vs_toolsets.end(), "Could not find toolset '%s'", toolset_version); + return *toolset; } Files::Filesystem& VcpkgPaths::get_filesystem() const { return Files::get_real_filesystem(); } -- cgit v1.2.3 From 95eadb8ddd7dfb7f0899055a98fa91485ed74dc8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 16:58:51 -0700 Subject: [VcpkgPaths.cpp] Don't modify and ref on the fly --- toolsrc/src/VcpkgPaths.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 7d574006e..906a5e67f 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -318,9 +318,9 @@ namespace vcpkg // VS2017 Optional vs2017_toolset; - for (const fs::path& instance : vs2017_installation_instances) + for (const std::string& instance : vs2017_installation_instances) { - const fs::path vc_dir = instance / "VC"; + const fs::path vc_dir = fs::path{instance} / "VC"; // Skip any instances that do not have vcvarsall. const fs::path vcvarsall_dir = vc_dir / "Auxiliary" / "Build"; -- cgit v1.2.3 From c15c80e802f432f1b8d3775c7abff5e91531b641 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 17:01:02 -0700 Subject: [vcpkg_Parse] Add missing const --- toolsrc/include/vcpkg_Parse.h | 2 +- toolsrc/src/vcpkg_Parse.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/include/vcpkg_Parse.h b/toolsrc/include/vcpkg_Parse.h index e663448b9..2dda033b3 100644 --- a/toolsrc/include/vcpkg_Parse.h +++ b/toolsrc/include/vcpkg_Parse.h @@ -26,7 +26,7 @@ namespace vcpkg::Parse ParagraphParser(RawParagraph&& fields) : fields(std::move(fields)) {} void required_field(const std::string& fieldname, std::string& out); - std::string optional_field(const std::string& fieldname); + std::string optional_field(const std::string& fieldname) const; std::unique_ptr error_info(const std::string& name) const; private: diff --git a/toolsrc/src/vcpkg_Parse.cpp b/toolsrc/src/vcpkg_Parse.cpp index b54f7360b..e671a1a05 100644 --- a/toolsrc/src/vcpkg_Parse.cpp +++ b/toolsrc/src/vcpkg_Parse.cpp @@ -23,12 +23,12 @@ namespace vcpkg::Parse void ParagraphParser::required_field(const std::string& fieldname, std::string& out) { auto maybe_field = remove_field(&fields, fieldname); - if (auto field = maybe_field.get()) + if (const auto field = maybe_field.get()) out = std::move(*field); else missing_fields.push_back(fieldname); } - std::string ParagraphParser::optional_field(const std::string& fieldname) + std::string ParagraphParser::optional_field(const std::string& fieldname) const { return remove_field(&fields, fieldname).value_or(Strings::EMPTY); } -- cgit v1.2.3 From 3a43e190209719ea2789f1e50dc5a6a2a3e5d4b9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 17:02:12 -0700 Subject: [vcpkg_Input] Add missing const --- toolsrc/src/vcpkg_Input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg_Input.cpp b/toolsrc/src/vcpkg_Input.cpp index 153e6a942..f1cac9632 100644 --- a/toolsrc/src/vcpkg_Input.cpp +++ b/toolsrc/src/vcpkg_Input.cpp @@ -13,7 +13,7 @@ namespace vcpkg::Input { const std::string as_lowercase = Strings::ascii_to_lowercase(package_spec_as_string); auto expected_spec = FullPackageSpec::from_string(as_lowercase, default_triplet); - if (auto spec = expected_spec.get()) + if (const auto spec = expected_spec.get()) { return PackageSpec{spec->package_spec}; } @@ -41,7 +41,7 @@ namespace vcpkg::Input { const std::string as_lowercase = Strings::ascii_to_lowercase(full_package_spec_as_string); auto expected_spec = FullPackageSpec::from_string(as_lowercase, default_triplet); - if (auto spec = expected_spec.get()) + if (const auto spec = expected_spec.get()) { return *spec; } -- cgit v1.2.3 From 9e7275c5dfeb9400492ceb8bed6635208a3d3cda Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 17:03:23 -0700 Subject: [vcpkg_Chrono] Add missing consts --- toolsrc/src/vcpkg_Chrono.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/toolsrc/src/vcpkg_Chrono.cpp b/toolsrc/src/vcpkg_Chrono.cpp index d70f4a054..d96f30987 100644 --- a/toolsrc/src/vcpkg_Chrono.cpp +++ b/toolsrc/src/vcpkg_Chrono.cpp @@ -7,43 +7,43 @@ namespace vcpkg { static std::string format_time_userfriendly(const std::chrono::nanoseconds& nanos) { + using std::chrono::duration_cast; using std::chrono::hours; - using std::chrono::minutes; - using std::chrono::seconds; - using std::chrono::milliseconds; using std::chrono::microseconds; + using std::chrono::milliseconds; + using std::chrono::minutes; using std::chrono::nanoseconds; - using std::chrono::duration_cast; + using std::chrono::seconds; const double nanos_as_double = static_cast(nanos.count()); if (duration_cast(nanos) > hours()) { - auto t = nanos_as_double / duration_cast(hours(1)).count(); + const auto t = nanos_as_double / duration_cast(hours(1)).count(); return Strings::format("%.4g h", t); } if (duration_cast(nanos) > minutes()) { - auto t = nanos_as_double / duration_cast(minutes(1)).count(); + const auto t = nanos_as_double / duration_cast(minutes(1)).count(); return Strings::format("%.4g min", t); } if (duration_cast(nanos) > seconds()) { - auto t = nanos_as_double / duration_cast(seconds(1)).count(); + const auto t = nanos_as_double / duration_cast(seconds(1)).count(); return Strings::format("%.4g s", t); } if (duration_cast(nanos) > milliseconds()) { - auto t = nanos_as_double / duration_cast(milliseconds(1)).count(); + const auto t = nanos_as_double / duration_cast(milliseconds(1)).count(); return Strings::format("%.4g ms", t); } if (duration_cast(nanos) > microseconds()) { - auto t = nanos_as_double / duration_cast(microseconds(1)).count(); + const auto t = nanos_as_double / duration_cast(microseconds(1)).count(); return Strings::format("%.4g us", t); } -- cgit v1.2.3 From 2d758beea9d8068f189f79d79b4087e40d42154b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 17:05:22 -0700 Subject: [vcpkg_Checks] Naming convention fixes --- toolsrc/include/vcpkg_Checks.h | 22 ++++++++++++---------- toolsrc/src/vcpkg_Checks.cpp | 19 +++++++++++-------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/toolsrc/include/vcpkg_Checks.h b/toolsrc/include/vcpkg_Checks.h index 01cb7209b..ce486ac19 100644 --- a/toolsrc/include/vcpkg_Checks.h +++ b/toolsrc/include/vcpkg_Checks.h @@ -20,33 +20,35 @@ namespace vcpkg::Checks [[noreturn]] inline void exit_success(const LineInfo& line_info) { exit_with_code(line_info, EXIT_SUCCESS); } // Display an error message to the user and exit the tool. - [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView errorMessage); + [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView error_message); template // Display an error message to the user and exit the tool. [[noreturn]] void exit_with_message(const LineInfo& line_info, - const char* errorMessageTemplate, - const Arg1 errorMessageArg1, - const Args&... errorMessageArgs) + const char* error_message_template, + const Arg1 error_message_arg1, + const Args&... error_message_args) { - exit_with_message(line_info, Strings::format(errorMessageTemplate, errorMessageArg1, errorMessageArgs...)); + exit_with_message(line_info, + Strings::format(error_message_template, error_message_arg1, error_message_args...)); } void check_exit(const LineInfo& line_info, bool expression); - void check_exit(const LineInfo& line_info, bool expression, const CStringView errorMessage); + void check_exit(const LineInfo& line_info, bool expression, const CStringView error_message); template void check_exit(const LineInfo& line_info, Conditional&& expression, - const char* errorMessageTemplate, - const Arg1 errorMessageArg1, - const Args&... errorMessageArgs) + const char* error_message_template, + const Arg1 error_message_arg1, + const Args&... error_message_args) { if (!expression) { // Only create the string if the expression is false - exit_with_message(line_info, Strings::format(errorMessageTemplate, errorMessageArg1, errorMessageArgs...)); + exit_with_message(line_info, + Strings::format(error_message_template, error_message_arg1, error_message_args...)); } } } diff --git a/toolsrc/src/vcpkg_Checks.cpp b/toolsrc/src/vcpkg_Checks.cpp index 3692a0e9a..e7c9046a4 100644 --- a/toolsrc/src/vcpkg_Checks.cpp +++ b/toolsrc/src/vcpkg_Checks.cpp @@ -10,7 +10,7 @@ namespace vcpkg::Checks { [[noreturn]] static void cleanup_and_exit(const int exit_code) { - auto elapsed_us = GlobalState::timer.lock()->microseconds(); + const auto elapsed_us = GlobalState::timer.lock()->microseconds(); auto metrics = Metrics::g_metrics.lock(); metrics->track_metric("elapsed_us", elapsed_us); @@ -25,17 +25,20 @@ namespace vcpkg::Checks ::TerminateProcess(::GetCurrentProcess(), exit_code); } - static BOOL CtrlHandler(DWORD fdwCtrlType) + static BOOL ctrl_handler(DWORD fdw_ctrl_type) { { auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_property("CtrlHandler", std::to_string(fdwCtrlType)); + locked_metrics->track_property("CtrlHandler", std::to_string(fdw_ctrl_type)); locked_metrics->track_property("error", "CtrlHandler was fired."); } cleanup_and_exit(EXIT_FAILURE); } - void register_console_ctrl_handler() { SetConsoleCtrlHandler((PHANDLER_ROUTINE)CtrlHandler, TRUE); } + void register_console_ctrl_handler() + { + SetConsoleCtrlHandler(reinterpret_cast(ctrl_handler), TRUE); + } [[noreturn]] void unreachable(const LineInfo& line_info) { @@ -54,9 +57,9 @@ namespace vcpkg::Checks cleanup_and_exit(exit_code); } - [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView errorMessage) + [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView error_message) { - System::println(System::Color::error, errorMessage); + System::println(System::Color::error, error_message); exit_fail(line_info); } @@ -68,11 +71,11 @@ namespace vcpkg::Checks } } - void check_exit(const LineInfo& line_info, bool expression, const CStringView errorMessage) + void check_exit(const LineInfo& line_info, bool expression, const CStringView error_message) { if (!expression) { - exit_with_message(line_info, errorMessage); + exit_with_message(line_info, error_message); } } } -- cgit v1.2.3 From 66eeab0015866417f4386a3822127ce7d40c49f9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 17:08:21 -0700 Subject: [Triplet] Naming convention and missing const --- toolsrc/include/triplet.h | 4 ++-- toolsrc/src/triplet.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/toolsrc/include/triplet.h b/toolsrc/include/triplet.h index be3bcf5b3..46a52f8e6 100644 --- a/toolsrc/include/triplet.h +++ b/toolsrc/include/triplet.h @@ -9,7 +9,7 @@ namespace vcpkg struct Triplet { public: - constexpr Triplet() : m_instance(&default_instance) {} + constexpr Triplet() : m_instance(&DEFAULT_INSTANCE) {} static Triplet from_canonical_name(const std::string& triplet_as_string); @@ -26,7 +26,7 @@ namespace vcpkg bool operator==(const Triplet& other) const; private: - static const TripletInstance default_instance; + static const TripletInstance DEFAULT_INSTANCE; constexpr Triplet(const TripletInstance* ptr) : m_instance(ptr) {} diff --git a/toolsrc/src/triplet.cpp b/toolsrc/src/triplet.cpp index 451deb040..3b56da02a 100644 --- a/toolsrc/src/triplet.cpp +++ b/toolsrc/src/triplet.cpp @@ -15,7 +15,7 @@ namespace vcpkg bool operator==(const TripletInstance& o) const { return o.value == value; } }; - const TripletInstance Triplet::default_instance({}); + const TripletInstance Triplet::DEFAULT_INSTANCE({}); } template<> @@ -41,10 +41,10 @@ namespace vcpkg Triplet Triplet::from_canonical_name(const std::string& triplet_as_string) { std::string s(Strings::ascii_to_lowercase(triplet_as_string)); - auto it = std::find(s.cbegin(), s.cend(), '-'); + const auto it = std::find(s.cbegin(), s.cend(), '-'); Checks::check_exit(VCPKG_LINE_INFO, it != s.cend(), "Invalid triplet: %s", triplet_as_string); - auto p = g_triplet_instances.emplace(std::move(s)); + const auto p = g_triplet_instances.emplace(std::move(s)); return &*p.first; } -- cgit v1.2.3 From b76ac1da157c9c86cb451c871ea5ae0ddf74dbb9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 17:12:58 -0700 Subject: Add missing consts --- toolsrc/src/SourceParagraph.cpp | 6 +++--- toolsrc/src/StatusParagraphs.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 50d6ecf07..64b7bbad1 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -137,7 +137,7 @@ namespace vcpkg auto control_file = std::make_unique(); auto maybe_source = parse_source_paragraph(std::move(control_paragraphs.front())); - if (auto source = maybe_source.get()) + if (const auto source = maybe_source.get()) control_file->core_paragraph = std::move(*source); else return std::move(maybe_source).error(); @@ -147,7 +147,7 @@ namespace vcpkg for (auto&& feature_pgh : control_paragraphs) { auto maybe_feature = parse_feature_paragraph(std::move(feature_pgh)); - if (auto feature = maybe_feature.get()) + if (const auto feature = maybe_feature.get()) control_file->feature_paragraphs.emplace_back(std::move(*feature)); else return std::move(maybe_feature).error(); @@ -263,7 +263,7 @@ namespace vcpkg bool Supports::is_supported(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools) { - auto is_in_or_empty = [](auto v, auto&& c) -> bool { return c.empty() || c.end() != Util::find(c, v); }; + const auto is_in_or_empty = [](auto v, auto&& c) -> bool { return c.empty() || c.end() != Util::find(c, v); }; if (!is_in_or_empty(arch, architectures)) return false; if (!is_in_or_empty(plat, platforms)) return false; if (!is_in_or_empty(crt, crt_linkages)) return false; diff --git a/toolsrc/src/StatusParagraphs.cpp b/toolsrc/src/StatusParagraphs.cpp index 02ee61f75..aaba95eb9 100644 --- a/toolsrc/src/StatusParagraphs.cpp +++ b/toolsrc/src/StatusParagraphs.cpp @@ -67,7 +67,7 @@ namespace vcpkg { Checks::check_exit(VCPKG_LINE_INFO, pgh != nullptr, "Inserted null paragraph"); const PackageSpec& spec = pgh->package.spec; - auto ptr = find(spec.name(), spec.triplet(), pgh->package.feature); + const auto ptr = find(spec.name(), spec.triplet(), pgh->package.feature); if (ptr == end()) { paragraphs.push_back(std::move(pgh)); -- cgit v1.2.3 From e25a125d8540f13410008dff7281b5d679ac9fcb Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 17:13:45 -0700 Subject: Don't return by const copy --- toolsrc/include/SourceParagraph.h | 2 +- toolsrc/src/SourceParagraph.cpp | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 8563d83b0..3ee2138f1 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -27,7 +27,7 @@ namespace vcpkg // zlib[uwp] becomes Dependency{"zlib", "uwp"} std::vector expand_qualified_dependencies(const std::vector& depends); - const std::string to_string(const Dependency& dep); + std::string to_string(const Dependency& dep); struct FeatureParagraph { diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 64b7bbad1..d8fa37914 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -220,11 +220,7 @@ namespace vcpkg return FeatureSpec::from_strings_and_triplet(filter_dependencies(deps, t), t); } - const std::string to_string(const Dependency& dep) - { - std::string name = dep.name(); - return name; - } + std::string to_string(const Dependency& dep) { return dep.name(); } ExpectedT> Supports::parse(const std::vector& strs) { -- cgit v1.2.3 From 95fa51a12a6e01c08a6b39ac45ecf711c45841fa Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 17:14:26 -0700 Subject: Remove unused #include --- toolsrc/include/SourceParagraph.h | 1 - 1 file changed, 1 deletion(-) diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 3ee2138f1..1357b3769 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -7,7 +7,6 @@ #include "vcpkg_expected.h" #include -#include #include namespace vcpkg -- cgit v1.2.3 From db06c7fa69da2f8b84431b8b79b0ef64e0bf00bf Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 17:14:50 -0700 Subject: Add missing consts --- toolsrc/src/StatusParagraph.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/StatusParagraph.cpp b/toolsrc/src/StatusParagraph.cpp index 5b5c3978f..f8ae293c2 100644 --- a/toolsrc/src/StatusParagraph.cpp +++ b/toolsrc/src/StatusParagraph.cpp @@ -33,8 +33,8 @@ namespace vcpkg this->package = BinaryParagraph(std::move(fields)); auto b = status_field.begin(); - auto mark = b; - auto e = status_field.end(); + const auto mark = b; + const auto e = status_field.end(); // Todo: improve error handling while (b != e && *b != ' ') -- cgit v1.2.3 From 35a9d223bc14fb4b35d6ad876d208897c8ce590a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Sep 2017 17:22:55 -0700 Subject: Use Strings::join() and Strings::format() --- toolsrc/src/SourceParagraph.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index d8fa37914..171689ce7 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -170,17 +170,10 @@ namespace vcpkg std::string Dependency::name() const { - std::string str = this->depend.name; - if (this->depend.features.empty()) return str; + if (this->depend.features.empty()) return this->depend.name; - str += "["; - for (auto&& s : this->depend.features) - { - str += s + ","; - } - str.pop_back(); - str += "]"; - return str; + const std::string features = Strings::join(",", this->depend.features); + return Strings::format("%s[%s]", this->depend.name, features); } std::vector vcpkg::expand_qualified_dependencies(const std::vector& depends) -- cgit v1.2.3 From c167c70c272a417779e601fffcbdb72278da1848 Mon Sep 17 00:00:00 2001 From: martin-s Date: Sat, 2 Sep 2017 16:48:29 +0200 Subject: - Added support for VS2013 build chain tools. --- scripts/cmake/vcpkg_configure_cmake.cmake | 8 ++++ scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 39 +++++++++++++++--- toolsrc/include/VcpkgPaths.h | 2 +- toolsrc/src/PostBuildLint.cpp | 8 ++-- toolsrc/src/VcpkgPaths.cpp | 50 +++++++++++++++++++++++- 5 files changed, 96 insertions(+), 11 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 07acfc8ea..e43075961 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -61,6 +61,14 @@ function(vcpkg_configure_cmake) set(GENERATOR ${_csc_GENERATOR}) elseif(_csc_PREFER_NINJA AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT _csc_HOST_ARCHITECTURE STREQUAL "x86") set(GENERATOR "Ninja") + + elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") + set(GENERATOR "Visual Studio 12 2013") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") + set(GENERATOR "Visual Studio 12 2013 Win64") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") + set(GENERATOR "Visual Studio 12 2013 ARM") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index f72491e5d..82d9f7c16 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -4,12 +4,15 @@ param( [switch]$DisableVS2017 = $False, [Parameter(Mandatory=$False)] - [switch]$DisableVS2015 = $False + [switch]$DisableVS2015 = $False, + + [Parameter(Mandatory=$False)] + [switch]$DisableVS2013 = $False ) -if ($DisableVS2017 -and $DisableVS2015) +if ($DisableVS2017 -and $DisableVS2015 -and $DisableVS2013) { - throw "Both VS2015 and VS2017 were disabled." + throw "VS013, VS2015 and VS2017 were disabled." } function New-MSBuildInstance() @@ -23,7 +26,7 @@ function New-MSBuildInstance() return $instance } -Write-Verbose "Executing $($MyInvocation.MyCommand.Name) with DisableVS2017=$DisableVS2017, DisableVS2015=$DisableVS2015" +Write-Verbose "Executing $($MyInvocation.MyCommand.Name) with DisableVS2017=$DisableVS2017, DisableVS2015=$DisableVS2015, DisableVS2013=$DisableVS2013" $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $validInstances = New-Object System.Collections.ArrayList @@ -139,6 +142,27 @@ foreach ($pair in $registryPairs) $validInstances.Add($instance) > $null } +# VS2013 - in Program Files +Write-Verbose "`n`n" +Write-Verbose "Checking for MSBuild from VS2013 in Program Files..." +$CandidateProgramFiles = $(& $scriptsDir\getProgramFiles32bit.ps1), $(& $scriptsDir\getProgramFilesPlatformBitness.ps1) +Write-Verbose "Program Files Candidate locations: $([system.String]::Join(',', $CandidateProgramFiles))" +foreach ($ProgramFiles in $CandidateProgramFiles) +{ + $clExe= "$ProgramFiles\Microsoft Visual Studio 12.0\VC\bin\cl.exe" + + if (!(Test-Path $clExe)) + { + Write-Verbose "$clExe - Not Found" + continue + } + + Write-Verbose "$clExe - Found" + $instance = New-MSBuildInstance "$ProgramFiles\MSBuild\12.0\Bin\MSBuild.exe" "v120" + Write-Verbose "Found $instance" + $validInstances.Add($instance) > $null +} + Write-Verbose "`n`n`n" Write-Verbose "The following MSBuild instances were found:" foreach ($instance in $validInstances) @@ -158,7 +182,12 @@ foreach ($instance in $validInstances) { return $instance.msbuildExePath, $instance.toolsetVersion } + + if (!$DisableVS2013 -and $instance.toolsetVersion -eq "v120") + { + return $instance.msbuildExePath, $instance.toolsetVersion + } } -throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed." \ No newline at end of file +throw "Could not find MSBuild version with C++ support. VS2013, VS2015 or VS2017 (with C++) needs to be installed." \ No newline at end of file diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h index d55c95fe1..9b650bb6d 100644 --- a/toolsrc/include/VcpkgPaths.h +++ b/toolsrc/include/VcpkgPaths.h @@ -60,7 +60,7 @@ namespace vcpkg /// Retrieve a toolset matching a VS version /// - /// Valid version strings are "v140", "v141", and "". Empty string gets the latest. + /// Valid version strings are "v120", "v140", "v141", and "". Empty string gets the latest. /// const Toolset& get_toolset(const std::string& toolset_version) const; diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 1fd48d3ec..33dc446cf 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -45,8 +45,8 @@ namespace vcpkg::PostBuildLint {"msvcp100d.dll", R"(msvcp100d\.dll)"}, {"msvcp110.dll", R"(msvcp110\.dll)"}, {"msvcp110_win.dll", R"(msvcp110_win\.dll)"}, - {"msvcp120.dll", R"(msvcp120\.dll)"}, - {"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"}, + //{"msvcp120.dll", R"(msvcp120\.dll)"}, + //{"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"}, {"msvcp60.dll", R"(msvcp60\.dll)"}, {"msvcp60.dll", R"(msvcp60\.dll)"}, @@ -54,8 +54,8 @@ namespace vcpkg::PostBuildLint {"msvcr100d.dll", R"(msvcr100d\.dll)"}, {"msvcr100_clr0400.dll", R"(msvcr100_clr0400\.dll)"}, {"msvcr110.dll", R"(msvcr110\.dll)"}, - {"msvcr120.dll", R"(msvcr120\.dll)"}, - {"msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)"}, + //{"msvcr120.dll", R"(msvcr120\.dll)"}, + //{"msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)"}, {"msvcrt20.dll", R"(msvcrt20\.dll)"}, {"msvcrt40.dll", R"(msvcrt40\.dll)"}}; diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 906a5e67f..71a35d24c 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -268,6 +268,19 @@ namespace vcpkg return nullopt; } + + static Optional get_vs2013_installation_instance() + { + const Optional vs2013_cmntools_optional = System::get_environment_variable(L"VS120COMNTOOLS"); + if (const auto v = vs2013_cmntools_optional.get()) + { + const fs::path vs2013_cmntools = fs::path(*v).parent_path(); // The call to parent_path() is needed because + // the env variable has a trailing backslash + return vs2013_cmntools.parent_path().parent_path(); + } + + return nullopt; + } static std::vector find_toolset_instances(const VcpkgPaths& paths) { @@ -275,12 +288,46 @@ namespace vcpkg const auto& fs = paths.get_filesystem(); - const std::vector vs2017_installation_instances = get_vs2017_installation_instances(paths); // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations. std::vector paths_examined; std::vector found_toolsets; + // VS2013 + const Optional vs_2013_installation_instance = get_vs2013_installation_instance(); + if (const auto v = vs_2013_installation_instance.get()) + { + const fs::path vs2013_vcvarsall_bat = *v / "VC" / "vcvarsall.bat"; + + paths_examined.push_back(vs2013_vcvarsall_bat); + if (fs.exists(vs2013_vcvarsall_bat)) + { + const fs::path vs2013_dumpbin_exe = *v / "VC" / "bin" / "dumpbin.exe"; + paths_examined.push_back(vs2013_dumpbin_exe); + + const fs::path vs2013_bin_dir = vs2013_vcvarsall_bat.parent_path() / "bin"; + std::vector supported_architectures; + if (fs.exists(vs2013_bin_dir / "vcvars32.bat")) + supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); + if (fs.exists(3 / "amd64\\vcvars64.bat")) + supported_architectures.push_back({L"x64", CPU::X64, CPU::X64}); + if (fs.exists(vs2013_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) + supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); + if (fs.exists(vs2013_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) + supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); + if (fs.exists(vs2013_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) + supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); + if (fs.exists(vs2013_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) + supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + + if (fs.exists(vs2013_dumpbin_exe)) + { + found_toolsets.push_back( + {vs2013_dumpbin_exe, vs2013_vcvarsall_bat, L"v120", supported_architectures}); + } + } + } + // VS2015 const Optional vs_2015_installation_instance = get_vs2015_installation_instance(); if (const auto v = vs_2015_installation_instance.get()) @@ -318,6 +365,7 @@ namespace vcpkg // VS2017 Optional vs2017_toolset; + const std::vector vs2017_installation_instances = get_vs2017_installation_instances(paths); for (const std::string& instance : vs2017_installation_instances) { const fs::path vc_dir = fs::path{instance} / "VC"; -- cgit v1.2.3 From dd0a7bc1f7f03dfc35c7f1b7e6fd3d5679c6a0c4 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 2 Sep 2017 12:53:11 -0700 Subject: [libstemmer] init --- ports/libstemmer/CMakeLists.txt | 22 ++++++++++++++++++++++ ports/libstemmer/CONTROL | 3 +++ ports/libstemmer/LICENSE | 19 +++++++++++++++++++ ports/libstemmer/portfile.cmake | 24 ++++++++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 ports/libstemmer/CMakeLists.txt create mode 100644 ports/libstemmer/CONTROL create mode 100644 ports/libstemmer/LICENSE create mode 100644 ports/libstemmer/portfile.cmake diff --git a/ports/libstemmer/CMakeLists.txt b/ports/libstemmer/CMakeLists.txt new file mode 100644 index 000000000..787bb26ec --- /dev/null +++ b/ports/libstemmer/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.8.0) + +project(libstemmer) + +file(GLOB SNOWBALL_SOURCES + src_c/*.c + runtime/api.c + runtime/utilities.c + libstemmer/libstemmer.c +) + +add_library(stemmer ${SNOWBALL_SOURCES}) + +install( + TARGETS stemmer + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES include/libstemmer.h DESTINATION include) +endif() diff --git a/ports/libstemmer/CONTROL b/ports/libstemmer/CONTROL new file mode 100644 index 000000000..9341a0f32 --- /dev/null +++ b/ports/libstemmer/CONTROL @@ -0,0 +1,3 @@ +Source: libstemmer +Version: +Description: diff --git a/ports/libstemmer/LICENSE b/ports/libstemmer/LICENSE new file mode 100644 index 000000000..0c9e7c008 --- /dev/null +++ b/ports/libstemmer/LICENSE @@ -0,0 +1,19 @@ +Snowball - License +Except where explicitly noted, all the software given out on this Snowball site is covered by the 3-clause BSD License: + +Copyright (c) 2001, Dr Martin Porter, +Copyright (c) 2002, Richard Boulton. +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 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 HOLDER 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. +Essentially, all this means is that you can do what you like with the code, except claim another Copyright for it, or claim that it is issued under a different license. The software is also issued without warranties, which means that if anyone suffers through its use, they cannot come back and sue you. You also have to alert anyone to whom you give the Snowball software to the fact that it is covered by the BSD license. + +We have not bothered to insert the licensing arrangement into the text of the Snowball software. diff --git a/ports/libstemmer/portfile.cmake b/ports/libstemmer/portfile.cmake new file mode 100644 index 000000000..9a76c3a94 --- /dev/null +++ b/ports/libstemmer/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "Dynamic not supported building static") + set(VCPKG_LIBRARY_LINKAGE static) +endif() +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libstemmer_c) +vcpkg_download_distfile(ARCHIVE + URLS "http://snowball.tartarus.org/dist/libstemmer_c.tgz" + FILENAME "libstemmer_c.tgz" + SHA512 9ab5b8bfd5b4071dbbd63d769e09fae3971b49ee441ad970aa95d90b3297f5ffc9deed1613d99974d1485bf3b69292663591957f52bbeddcadbf9d9a4af432f2 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +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() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libstemmer RENAME copyright) -- cgit v1.2.3 From db6282e7884939c89dd26215cfd38b77c0e35994 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 2 Sep 2017 12:55:43 -0700 Subject: [libstemmer] add description --- ports/libstemmer/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libstemmer/CONTROL b/ports/libstemmer/CONTROL index 9341a0f32..f0a4db41c 100644 --- a/ports/libstemmer/CONTROL +++ b/ports/libstemmer/CONTROL @@ -1,3 +1,3 @@ Source: libstemmer -Version: -Description: +Version: 2017-9-02 +Description: Snowball is a small string processing language designed for creating stemming algorithms for use in Information Retrieval -- cgit v1.2.3 From 520b3b3907fc353b0f96452f9066176dd1f61a3d Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 2 Sep 2017 16:35:59 -0700 Subject: [gumbo] html parser init --- ports/gumbo/CMakeLists.txt | 32 ++++++++++++++++++++++++++++++++ ports/gumbo/CONTROL | 3 +++ ports/gumbo/portfile.cmake | 24 ++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 ports/gumbo/CMakeLists.txt create mode 100644 ports/gumbo/CONTROL create mode 100644 ports/gumbo/portfile.cmake diff --git a/ports/gumbo/CMakeLists.txt b/ports/gumbo/CMakeLists.txt new file mode 100644 index 000000000..9c06b6f98 --- /dev/null +++ b/ports/gumbo/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.8.0) + +project(gumbo) + +set(gumbo_srcs + src/attribute.c + src/char_ref.c + src/error.c + src/parser.c + src/string_buffer.c + src/string_piece.c + src/tag.c + src/tokenizer.c + src/utf8.c + src/util.c + src/vector.c +) + + +include_directories(visualc/include src) + +add_library(gumbo ${gumbo_srcs}) + +install( + TARGETS gumbo + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES src/gumbo.h DESTINATION include) +endif() diff --git a/ports/gumbo/CONTROL b/ports/gumbo/CONTROL new file mode 100644 index 000000000..b8e2e15d2 --- /dev/null +++ b/ports/gumbo/CONTROL @@ -0,0 +1,3 @@ +Source: gumbo +Version: 0.10.1 +Description: An HTML5 parsing library in pure C99 diff --git a/ports/gumbo/portfile.cmake b/ports/gumbo/portfile.cmake new file mode 100644 index 000000000..a4b0ded72 --- /dev/null +++ b/ports/gumbo/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "Dynamic not supported building static") + set(VCPKG_LIBRARY_LINKAGE static) +endif() +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/gumbo-parser + REF v0.10.1 + SHA512 bb1fb55cd07076ab6a9f38dc14db50397dbdca9a04ace4895dfba8b8cbc09038a96e26070c09c75fa929ada2e815affe233c1e2ecd8afe2aba6201647cf277d1 + HEAD_REF master +) + +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() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gumbo RENAME copyright) -- cgit v1.2.3 From 47f329089a41da61a45cb2eb6c0419d32738fb98 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 2 Sep 2017 17:09:07 -0700 Subject: [libunibreak] init port --- ports/libunibreak/CMakeLists.txt | 35 +++++++++++++++++++++++++++++++++++ ports/libunibreak/CONTROL | 3 +++ ports/libunibreak/portfile.cmake | 24 ++++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 ports/libunibreak/CMakeLists.txt create mode 100644 ports/libunibreak/CONTROL create mode 100644 ports/libunibreak/portfile.cmake diff --git a/ports/libunibreak/CMakeLists.txt b/ports/libunibreak/CMakeLists.txt new file mode 100644 index 000000000..9ee5437d3 --- /dev/null +++ b/ports/libunibreak/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.8.0) + +project(libunibreak) + +set(libunibreak_srcs + src/linebreakdata.c + src/linebreakdef.c + src/wordbreak.c + src/graphemebreak.c + src/unibreakbase.c + src/unibreakdef.c +) + + +include_directories(src) + +add_library(libunibreak ${libunibreak_srcs}) + +install( + TARGETS libunibreak + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES + src/linebreak.h + src/linebreakdef.h + src/wordbreak.h + src/wordbreakdef.h + DESTINATION include + ) +endif() diff --git a/ports/libunibreak/CONTROL b/ports/libunibreak/CONTROL new file mode 100644 index 000000000..b8a96abd4 --- /dev/null +++ b/ports/libunibreak/CONTROL @@ -0,0 +1,3 @@ +Source: libunibreak +Version: 4.0 +Description: an implementation of the line breaking and word breaking algorithms as described in [Unicode Standard Annex 14] 1 and [Unicode Standard Annex 29] 2. Check the project's [home page] 3 for up-to-date information. diff --git a/ports/libunibreak/portfile.cmake b/ports/libunibreak/portfile.cmake new file mode 100644 index 000000000..6ec8bdd74 --- /dev/null +++ b/ports/libunibreak/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "Dynamic not supported building static") + set(VCPKG_LIBRARY_LINKAGE static) +endif() +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO adah1972/libunibreak + REF libunibreak_4_0 + SHA512 f11295133a1c65f365a5287f7377f69ac7998f19b06d44818fb55c8a5ba3edabc36de8d1b7c0d38db9d982f0e443d0a751f6d51841865094122df4cd74c9af3b + HEAD_REF master +) + +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() + +file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libunibreak RENAME copyright) -- cgit v1.2.3 From 28c10b1a7a63c88035e99b79487a5cb28ed1a07a Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 2 Sep 2017 17:12:39 -0700 Subject: [gumbo] fix missing header --- ports/gumbo/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/gumbo/CMakeLists.txt b/ports/gumbo/CMakeLists.txt index 9c06b6f98..fe239cb8a 100644 --- a/ports/gumbo/CMakeLists.txt +++ b/ports/gumbo/CMakeLists.txt @@ -28,5 +28,5 @@ install( ARCHIVE DESTINATION lib ) if(NOT DISABLE_INSTALL_HEADERS) - install(FILES src/gumbo.h DESTINATION include) + install(FILES src/gumbo.h src/tag_enum.h DESTINATION include) endif() -- cgit v1.2.3 From a5c6f73d694c9be1e843b7a70bdda54932314af0 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 2 Sep 2017 19:39:25 -0700 Subject: [tinythread] init --- ports/tinythread/CMakeLists.txt | 25 +++++++++++++++++++++++++ ports/tinythread/CONTROL | 3 +++ ports/tinythread/portfile.cmake | 21 +++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 ports/tinythread/CMakeLists.txt create mode 100644 ports/tinythread/CONTROL create mode 100644 ports/tinythread/portfile.cmake diff --git a/ports/tinythread/CMakeLists.txt b/ports/tinythread/CMakeLists.txt new file mode 100644 index 000000000..ec8b3634c --- /dev/null +++ b/ports/tinythread/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.8.0) + +project(tinythread) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +include_directories(source) + +add_library(tinythread source/tinythread.cpp) + +install( + TARGETS tinythread + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES source/tinythread.h source/fast_mutex.h DESTINATION include) +endif() diff --git a/ports/tinythread/CONTROL b/ports/tinythread/CONTROL new file mode 100644 index 000000000..3c45f153e --- /dev/null +++ b/ports/tinythread/CONTROL @@ -0,0 +1,3 @@ +Source: tinythread +Version: 1.1 +Description: Implements a fairly compatible subset of the C++11 thread management classes diff --git a/ports/tinythread/portfile.cmake b/ports/tinythread/portfile.cmake new file mode 100644 index 000000000..23903e30e --- /dev/null +++ b/ports/tinythread/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/TinyThread++-1.1") +vcpkg_download_distfile(ARCHIVE + URLS "http://tinythreadpp.bitsnbites.eu/files/TinyThread%2B%2B-1.1-src.tar.bz2" + FILENAME "TinyThread++-1.1.tar.bz2" + SHA512 407f54fcf3f68dd7fec25e9e0749a1803dffa5d52d606905155714d29f519b5eae64ff654b11768fecc32c0123a78c48be37c47993e0caf157a63349a2f869c6 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +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() + +file(INSTALL "${SOURCE_PATH}/README.txt" DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinythread RENAME copyright) -- cgit v1.2.3 From 0ea1041e8d4b52ba9847c41dd533dfad5c555fd7 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 2 Sep 2017 20:11:30 -0700 Subject: [libmicrohttpd] init port --- ports/libmicrohttpd/CMakeLists.txt | 78 ++++++++++++++++++++++++++++++++++++++ ports/libmicrohttpd/CONTROL | 3 ++ ports/libmicrohttpd/portfile.cmake | 23 +++++++++++ 3 files changed, 104 insertions(+) create mode 100644 ports/libmicrohttpd/CMakeLists.txt create mode 100644 ports/libmicrohttpd/CONTROL create mode 100644 ports/libmicrohttpd/portfile.cmake diff --git a/ports/libmicrohttpd/CMakeLists.txt b/ports/libmicrohttpd/CMakeLists.txt new file mode 100644 index 000000000..d76c09122 --- /dev/null +++ b/ports/libmicrohttpd/CMakeLists.txt @@ -0,0 +1,78 @@ +cmake_minimum_required(VERSION 3.8) +project(libmicrohttpd C) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +set(MIN_SRC contrib/libmicrohttpd) + + +set(SRC + src/microhttpd/base64.c + src/microhttpd/basicauth.c + src/microhttpd/connection.c + src/microhttpd/daemon.c + src/microhttpd/digestauth.c + src/microhttpd/internal.c + src/microhttpd/md5.c + src/microhttpd/memorypool.c + src/microhttpd/mhd_mono_clock.c + src/microhttpd/postprocessor.c + src/microhttpd/reason_phrase.c + src/microhttpd/response.c + src/microhttpd/tsearch.c + src/microhttpd/sysfdsetsize.c + src/microhttpd/mhd_str.c + src/microhttpd/mhd_threads.c + src/microhttpd/mhd_sockets.c + src/microhttpd/mhd_itc.c + src/microhttpd/mhd_compat.c +) +set(HEADERS + src/microhttpd/base64.h + src/microhttpd/connection.h + src/microhttpd/internal.h + src/microhttpd/md5.h + src/microhttpd/memorypool.h + src/microhttpd/mhd_byteorder.h + src/microhttpd/mhd_limits.h + src/microhttpd/mhd_mono_clock.h + src/microhttpd/response.h + src/microhttpd/tsearch.h + src/microhttpd/sysfdsetsize.h + src/microhttpd/mhd_str.h + src/microhttpd/mhd_threads.h + src/microhttpd/mhd_locks.h + src/microhttpd/mhd_sockets.h + src/microhttpd/mhd_itc.h + src/microhttpd/mhd_itc_types.h + src/microhttpd/mhd_compat.h +) + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +include_directories(${HEADERS} src/include w32/common) + +add_library(libmicrohttpd ${SRC}) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(libmicrohttpd PRIVATE -DMHD_W32DLL) +else() + target_compile_definitions(libmicrohttpd PRIVATE -DMHD_W32LIB) +endif() + + target_link_libraries(libmicrohttpd ws2_32) + +install( + TARGETS libmicrohttpd + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES src/include/microhttpd.h DESTINATION include) +endif() diff --git a/ports/libmicrohttpd/CONTROL b/ports/libmicrohttpd/CONTROL new file mode 100644 index 000000000..a5b6730cf --- /dev/null +++ b/ports/libmicrohttpd/CONTROL @@ -0,0 +1,3 @@ +Source: libmicrohttpd +Version: 0.9.55 +Description: GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application diff --git a/ports/libmicrohttpd/portfile.cmake b/ports/libmicrohttpd/portfile.cmake new file mode 100644 index 000000000..8b11e3e9c --- /dev/null +++ b/ports/libmicrohttpd/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libmicrohttpd-0.9.55) +vcpkg_download_distfile(ARCHIVE + URLS "ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.55.tar.gz" + FILENAME "libmicrohttpd-0.9.55.tar.gz" + SHA512 b410e7253d7c98c40b5e8b8dcd1f93bcbb05c88717190e8dae73073d36465e8e5cfa53c6c5098de60051a5ec64dc423fd94f4b06537d8146b744aa99f5a0b173 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +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_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmicrohttpd RENAME copyright) -- cgit v1.2.3 From 819d2667a1533b03cf3c976da572ad7b2aa9506e Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 2 Sep 2017 20:28:16 -0700 Subject: [picosha2] init --- ports/picosha2/CONTROL | 3 +++ ports/picosha2/portfile.cmake | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 ports/picosha2/CONTROL create mode 100644 ports/picosha2/portfile.cmake diff --git a/ports/picosha2/CONTROL b/ports/picosha2/CONTROL new file mode 100644 index 000000000..3aa5919a4 --- /dev/null +++ b/ports/picosha2/CONTROL @@ -0,0 +1,3 @@ +Source: picosha2 +Version: 2017-09-01-c5ff159b6 +Description: PicoSHA2 - a C++ SHA256 hash generator diff --git a/ports/picosha2/portfile.cmake b/ports/picosha2/portfile.cmake new file mode 100644 index 000000000..2ce820928 --- /dev/null +++ b/ports/picosha2/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO okdshin/PicoSHA2 + REF c5ff159b60a7755f5601a18cf9c25388ad25e0ef + SHA512 8fa4045d73a921bbb9bf6de96e80272e1d54a52ddb8f7d05643785a3b582e8f7a069ccf901352af26db7788863717c0553f086f69578835d6a0512f0be04bae3 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/picosha2.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/picosha2 RENAME copyright) -- cgit v1.2.3 From e14e18a5e43a069301ffa7e4eed99c4b3c5f6a04 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 2 Sep 2017 20:38:27 -0700 Subject: [fadbad] init port --- ports/fadbad/CONTROL | 3 +++ ports/fadbad/portfile.cmake | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ports/fadbad/CONTROL create mode 100644 ports/fadbad/portfile.cmake diff --git a/ports/fadbad/CONTROL b/ports/fadbad/CONTROL new file mode 100644 index 000000000..ebf987962 --- /dev/null +++ b/ports/fadbad/CONTROL @@ -0,0 +1,3 @@ +Source: fadbad +Version: 2.1.0 +Description: FADBAD++ Templates for Automatic Differentiation diff --git a/ports/fadbad/portfile.cmake b/ports/fadbad/portfile.cmake new file mode 100644 index 000000000..af9721962 --- /dev/null +++ b/ports/fadbad/portfile.cmake @@ -0,0 +1,18 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FADBAD++) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.fadbad.com/download/FADBAD++-2.1.tar.gz" + FILENAME "FADBAD++-2.1.tar.gz" + SHA512 7a82c51c03acb0806d673853f391379ea974e304c831ee15ef05a90c30661736ff572481b5b8254b2646c63968043ee90a06cba88261b87fc34d01f92403360a +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(INSTALL + ${SOURCE_PATH}/tadiff.h + ${SOURCE_PATH}/fadbad.h + ${SOURCE_PATH}/fadiff.h + ${SOURCE_PATH}/badiff.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/fadbad RENAME copyright) -- cgit v1.2.3 From f86c8a73d79d4338fa537d0affb940dce8c53c4f Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 2 Sep 2017 21:12:35 -0700 Subject: [meschach] init --- ports/meschach/CMakeLists.txt | 89 +++++++++++++++++++++++++++++++++++++++++++ ports/meschach/CONTROL | 3 ++ ports/meschach/portfile.cmake | 21 ++++++++++ 3 files changed, 113 insertions(+) create mode 100644 ports/meschach/CMakeLists.txt create mode 100644 ports/meschach/CONTROL create mode 100644 ports/meschach/portfile.cmake diff --git a/ports/meschach/CMakeLists.txt b/ports/meschach/CMakeLists.txt new file mode 100644 index 000000000..648fe5af9 --- /dev/null +++ b/ports/meschach/CMakeLists.txt @@ -0,0 +1,89 @@ +cmake_minimum_required(VERSION 3.8.0) +project(meschach) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +set(meschach_srcs + bdfactor.c + bkpfacto.c + chfactor.c + copy.c + err.c + extras.c + fft.c + givens.c + hessen.c + hsehldr.c + init.c + iter0.c + iternsym.c + itersym.c + ivecop.c + lufactor.c + machine.c + matlab.c + matop.c + matrixio.c + meminfo.c + memory.c + memstat.c + mfunc.c + norm.c + otherio.c + pxop.c + qrfactor.c + schur.c + solve.c + sparse.c + sparseio.c + spbkp.c + spchfctr.c + splufctr.c + sprow.c + spswap.c + submat.c + svd.c + symmeig.c + update.c + vecop.c + version.c + zcopy.c + zfunc.c + zgivens.c + zhessen.c + zhsehldr.c + zlufctr.c + zmachine.c + zmatio.c + zmatlab.c + zmatop.c + zmemory.c + znorm.c + zqrfctr.c + zschur.c + zsolve.c + ztorture.c + zvecop.c +) +file(GLOB meschach_headers "*.h") + +include_directories(".") + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +add_library(meschach ${meschach_srcs}) +target_compile_definitions(meschach PRIVATE -DHAVE_MEMORY_H -DHAVE_COMPLEX_H) + +install( + TARGETS meschach + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${meschach_headers} DESTINATION include/meschach) +endif() diff --git a/ports/meschach/CONTROL b/ports/meschach/CONTROL new file mode 100644 index 000000000..acfaf2a4e --- /dev/null +++ b/ports/meschach/CONTROL @@ -0,0 +1,3 @@ +Source: meschach +Version: +Description: diff --git a/ports/meschach/portfile.cmake b/ports/meschach/portfile.cmake new file mode 100644 index 000000000..dd9d93085 --- /dev/null +++ b/ports/meschach/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) +vcpkg_download_distfile(ARCHIVE + URLS "http://homepage.math.uiowa.edu/~dstewart/meschach/mesch12b.tar.gz" + FILENAME "mesch12b.tar.gz" + SHA512 9051e1502b8c9741400c61fd6038e514887f305f267ba4e97d747423de3da1270f835f65b2d1f538f8938677060bc0fcfd7a94022d74fbfd31a0450116e9d79e +) +vcpkg_extract_source_archive(${ARCHIVE}) + +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_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/meschach) -- cgit v1.2.3 From 0d309cd25930d6aabc0e382d7fb60b642636614c Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 3 Sep 2017 07:32:34 -0700 Subject: [lodepng] init port --- ports/lodepng/CMakeLists.txt | 41 +++++++++++++++++++++++++++++++++++++++++ ports/lodepng/CONTROL | 3 +++ ports/lodepng/portfile.cmake | 28 ++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 ports/lodepng/CMakeLists.txt create mode 100644 ports/lodepng/CONTROL create mode 100644 ports/lodepng/portfile.cmake diff --git a/ports/lodepng/CMakeLists.txt b/ports/lodepng/CMakeLists.txt new file mode 100644 index 000000000..d4c8bc12a --- /dev/null +++ b/ports/lodepng/CMakeLists.txt @@ -0,0 +1,41 @@ +cmake_minimum_required(VERSION 3.8.0) +project(lodepng) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + + +include_directories(".") + +add_library(lodepng lodepng.cpp lodepng_util.cpp) + +add_executable(pngdetail pngdetail.cpp) + +target_link_libraries(pngdetail lodepng) + +install( + TARGETS lodepng + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS pngdetail + RUNTIME DESTINATION tools/lodepng + ) +endif() + +if(NOT DDISABLE_INSTALL_EXAMPLES) + install(DIRECTORY examples DESTINATION share/lodepng/) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES lodepng.h lodepng_util.h DESTINATION include) +endif() diff --git a/ports/lodepng/CONTROL b/ports/lodepng/CONTROL new file mode 100644 index 000000000..36d8c478c --- /dev/null +++ b/ports/lodepng/CONTROL @@ -0,0 +1,3 @@ +Source: lodepng +Version: 2017-09-01-8a0f16afe74a6a +Description: PNG encoder and decoder in C and C++ diff --git a/ports/lodepng/portfile.cmake b/ports/lodepng/portfile.cmake new file mode 100644 index 000000000..8611d5ea3 --- /dev/null +++ b/ports/lodepng/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lvandeve/lodepng + REF 8a0f16afe74a6abf85e3b45e9558283022021a59 + SHA512 189dde0a0982822b6dfc3f886d8035338ed200958eed8394c5c64aa97ddcf758b3989beae14ce8f26a78efa9fb4b94932bb02b41cacd62bd62a46ebf9b324def + HEAD_REF master +) + +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 + -DDDISABLE_INSTALL_EXAMPLES=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lodepng) + + +file(INSTALL ${SOURCE_PATH}/lodepng.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/lodepng RENAME copyright) -- cgit v1.2.3 From 8084f314a1701b6106c6bdda52b63170d742b44c Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 3 Sep 2017 08:09:39 -0700 Subject: [piex] init port --- ports/piex/CMakeLists.txt | 43 +++++++++++++++++++++++++++++++++++++++++++ ports/piex/CONTROL | 3 +++ ports/piex/portfile.cmake | 28 ++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 ports/piex/CMakeLists.txt create mode 100644 ports/piex/CONTROL create mode 100644 ports/piex/portfile.cmake diff --git a/ports/piex/CMakeLists.txt b/ports/piex/CMakeLists.txt new file mode 100644 index 000000000..35a881055 --- /dev/null +++ b/ports/piex/CMakeLists.txt @@ -0,0 +1,43 @@ +cmake_minimum_required(VERSION 3.8.0) +project(piex) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories(".") + +add_library(binary_parse + src/binary_parse/cached_paged_byte_array.cc + src/binary_parse/range_checked_byte_ptr.cc +) + +add_library(image_type_recognition + src/image_type_recognition/image_type_recognition_lite.cc +) + +target_link_libraries(image_type_recognition binary_parse) + +add_library(tiff_directory + src/tiff_directory/tiff_directory.cc +) + +target_link_libraries(tiff_directory binary_parse) + +add_library(piex + src/piex.cc + src/tiff_parser.cc +) + +target_link_libraries(piex tiff_directory image_type_recognition binary_parse) + +install( + TARGETS piex + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES src/piex.h src/piex_types.h DESTINATION include/src) +endif() diff --git a/ports/piex/CONTROL b/ports/piex/CONTROL new file mode 100644 index 000000000..187f253ef --- /dev/null +++ b/ports/piex/CONTROL @@ -0,0 +1,3 @@ +Source: piex +Version: 2017-09-01-473434f2dd974978b +Description: The Preview Image Extractor (PIEX) is designed to find and extract the largest diff --git a/ports/piex/portfile.cmake b/ports/piex/portfile.cmake new file mode 100644 index 000000000..2c99ad1c7 --- /dev/null +++ b/ports/piex/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "Dynamic not supported building static") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/piex + REF 473434f2dd974978b329faf5c87ae8aa09a2714d + SHA512 cb4a4107eb5e880673accac0f19965f3318e5e4c2fc24724afef5d15eab40d5866e17eb1a23af3b06b729d0e898ed99a6407d1f3000e94e3bbd71e1952d19627 + HEAD_REF master +) + +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_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/piex RENAME copyright) -- cgit v1.2.3 From 84dbcb72c0e19d811d12636f21d43408514e33f1 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 3 Sep 2017 08:50:17 -0700 Subject: [bigint] init port --- ports/bigint/CMakeLists.txt | 40 ++++++++++++++++++++++++++++++++++++++++ ports/bigint/CONTROL | 3 +++ ports/bigint/portfile.cmake | 27 +++++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 ports/bigint/CMakeLists.txt create mode 100644 ports/bigint/CONTROL create mode 100644 ports/bigint/portfile.cmake diff --git a/ports/bigint/CMakeLists.txt b/ports/bigint/CMakeLists.txt new file mode 100644 index 000000000..cb62597ef --- /dev/null +++ b/ports/bigint/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.8.0) +project(bigint) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories(".") + +set( + bigint_srcs + BigUnsigned.cc + BigInteger.cc + BigIntegerAlgorithms.cc + BigUnsignedInABase.cc + BigIntegerUtils.cc +) + +set( + bigint_hh + NumberlikeArray.hh + BigUnsigned.hh + BigInteger.hh + BigIntegerAlgorithms.hh + BigUnsignedInABase.hh + BigIntegerLibrary.hh +) + +add_library(bigint ${bigint_srcs}) + +install( + TARGETS bigint + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${bigint_hh} DESTINATION include/bigint) +endif() diff --git a/ports/bigint/CONTROL b/ports/bigint/CONTROL new file mode 100644 index 000000000..50f7bea65 --- /dev/null +++ b/ports/bigint/CONTROL @@ -0,0 +1,3 @@ +Source: bigint +Version: 2010.04.30 +Description: C++ Big Integer Library diff --git a/ports/bigint/portfile.cmake b/ports/bigint/portfile.cmake new file mode 100644 index 000000000..8a710aa54 --- /dev/null +++ b/ports/bigint/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "Dynamic not supported building static") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bigint-2010.04.30) +vcpkg_download_distfile(ARCHIVE + URLS "https://mattmccutchen.net/bigint/bigint-2010.04.30.tar.bz2" + FILENAME "bigint-2010.04.30.tar.bz2" + SHA512 bb64380e51991f97a2489c04801ab4372f795b5e23870ad12d71087f1a2afba9b32f74dcdbdcb5228ebf0dd74a37185285bac7653dd3c62d6118d63c298689af +) +vcpkg_extract_source_archive(${ARCHIVE}) + +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() + +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/bigint RENAME copyright) -- cgit v1.2.3 From eefd9c94d007e7baad99f901e5c173e9fb9e07f6 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 3 Sep 2017 10:41:00 -0700 Subject: [butteraugli] init port --- ports/butteraugli/CMakeLists.txt | 43 ++++++++++++++++++++++++++++++++++ ports/butteraugli/CONTROL | 4 ++++ ports/butteraugli/missing_header.patch | 12 ++++++++++ ports/butteraugli/portfile.cmake | 30 ++++++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 ports/butteraugli/CMakeLists.txt create mode 100644 ports/butteraugli/CONTROL create mode 100644 ports/butteraugli/missing_header.patch create mode 100644 ports/butteraugli/portfile.cmake diff --git a/ports/butteraugli/CMakeLists.txt b/ports/butteraugli/CMakeLists.txt new file mode 100644 index 000000000..f3a59069e --- /dev/null +++ b/ports/butteraugli/CMakeLists.txt @@ -0,0 +1,43 @@ +cmake_minimum_required(VERSION 3.8.0) +project(butteraugli) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX) +endif() + + + +find_package(JPEG REQUIRED) +find_package(PNG REQUIRED) + +include_directories("." ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS}) + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + + +add_library(butteraugli_lib butteraugli/butteraugli.cc) + +add_executable(butteraugli butteraugli/butteraugli_main.cc) + +target_link_libraries(butteraugli butteraugli_lib ${JPEG_LIBRARIES} ${PNG_LIBRARIES}) + + +install( + TARGETS butteraugli_lib + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS butteraugli + RUNTIME DESTINATION tools/butteraugli + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES butteraugli/butteraugli.h DESTINATION include) +endif() diff --git a/ports/butteraugli/CONTROL b/ports/butteraugli/CONTROL new file mode 100644 index 000000000..d31a94e09 --- /dev/null +++ b/ports/butteraugli/CONTROL @@ -0,0 +1,4 @@ +Source: butteraugli +Version: 2017-09-02-8c60a2aefa19adb +Description: butteraugli estimates the psychovisual difference between two images +Build-Depends: libpng, libjpeg-turbo diff --git a/ports/butteraugli/missing_header.patch b/ports/butteraugli/missing_header.patch new file mode 100644 index 000000000..11d314fad --- /dev/null +++ b/ports/butteraugli/missing_header.patch @@ -0,0 +1,12 @@ +diff --git "a/butteraugli/butteraugli_main.cc" "b/butteraugli/butteraugli_main.cc" +index f38af1d..ebf3197 100644 +--- "a/butteraugli/butteraugli_main.cc" ++++ "b/butteraugli/butteraugli_main.cc" +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + #include "butteraugli/butteraugli.h" + + extern "C" { diff --git a/ports/butteraugli/portfile.cmake b/ports/butteraugli/portfile.cmake new file mode 100644 index 000000000..a4b6fcfdd --- /dev/null +++ b/ports/butteraugli/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/butteraugli + REF 8c60a2aefa19adb40e457be5358d7cc93205c72f + SHA512 ff3d8fd952d291b51dab60cef6fa46b723c4a7b649c3df70f89c63febce865dc6a2e5f95ca165ea4424fed52a57c2d76c918eb31646c44ba34a0fa51a003c9dd + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/missing_header.patch" + ) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/butteraugli) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/butteraugli RENAME copyright) -- cgit v1.2.3 From a7299d457010cc734e2207405c5b974bedcb8da9 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 3 Sep 2017 11:14:33 -0700 Subject: [guetzli] init fixes #844 --- ports/butteraugli/CMakeLists.txt | 2 +- ports/guetzli/CMakeLists.txt | 46 ++++++++++++++++++++++++++++++++++++++++ ports/guetzli/CONTROL | 4 ++++ ports/guetzli/portfile.cmake | 24 +++++++++++++++++++++ 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 ports/guetzli/CMakeLists.txt create mode 100644 ports/guetzli/CONTROL create mode 100644 ports/guetzli/portfile.cmake diff --git a/ports/butteraugli/CMakeLists.txt b/ports/butteraugli/CMakeLists.txt index f3a59069e..3bd8a6c37 100644 --- a/ports/butteraugli/CMakeLists.txt +++ b/ports/butteraugli/CMakeLists.txt @@ -39,5 +39,5 @@ if(NOT DISABLE_INSTALL_TOOLS) endif() if(NOT DISABLE_INSTALL_HEADERS) - install(FILES butteraugli/butteraugli.h DESTINATION include) + install(FILES butteraugli/butteraugli.h DESTINATION include/butteraugli) endif() diff --git a/ports/guetzli/CMakeLists.txt b/ports/guetzli/CMakeLists.txt new file mode 100644 index 000000000..5d594aabd --- /dev/null +++ b/ports/guetzli/CMakeLists.txt @@ -0,0 +1,46 @@ +cmake_minimum_required(VERSION 3.8.0) +project(guetzli) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX) +endif() + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +find_path(butteraugli_include butteraugli/butteraugli.h) +find_library(butteraugli_library NAMES butteraugli_lib) +find_package(PNG REQUIRED) + +include_directories("." ${PNG_INCLUDE_DIRS} ${butteraugli_include}) + +file(GLOB guetzli_srcs "guetzli/*.cc") +file(GLOB guetzli_includes "guetzli/*.h") +list(REMOVE_ITEM guetzli_srcs "guetzli/guetzli.cc") + +add_library(guetzli_lib ${guetzli_srcs}) + +add_executable(guetzli guetzli/guetzli.cc) + +target_link_libraries(guetzli_lib ${butteraugli_library} ${PNG_LIBRARIES}) +target_link_libraries(guetzli guetzli_lib ${butteraugli_library} ${PNG_LIBRARIES}) + + +install( + TARGETS guetzli_lib + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS guetzli + RUNTIME DESTINATION tools/guetzli + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${guetzli_includes} DESTINATION include/guetzli) +endif() diff --git a/ports/guetzli/CONTROL b/ports/guetzli/CONTROL new file mode 100644 index 000000000..9dab9f18f --- /dev/null +++ b/ports/guetzli/CONTROL @@ -0,0 +1,4 @@ +Source: guetzli +Version: 2017-09-02-cb5e4a86f69628 +Description: Perceptual JPEG encoder +Build-Depends: libpng, butteraugli diff --git a/ports/guetzli/portfile.cmake b/ports/guetzli/portfile.cmake new file mode 100644 index 000000000..4fb0402ba --- /dev/null +++ b/ports/guetzli/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/guetzli + REF cb5e4a86f69628f685f2b78d7429e248ab83d8d7 + SHA512 695a87dc27573b8df74a7e7924e9b96a7bd375b1aae02e7b0fad800428d973cf17947d46ec7afefade2a86ebe3d39f3c3178aad1137b9dd013f5f85ee6569a75 + HEAD_REF master +) + +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 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/guetzli) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/guetzli RENAME copyright) -- cgit v1.2.3 From 2c4bc8c2dbdd04bd888413d98a9d60638afe2157 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 3 Sep 2017 22:23:07 +0300 Subject: [tinyxml] add version 2.6.2 --- ports/tinyxml/0001_use_stl.patch | 27 +++++++++++++++++++++++++++ ports/tinyxml/CMakeLists.txt | 25 +++++++++++++++++++++++++ ports/tinyxml/CONTROL | 3 +++ ports/tinyxml/License.txt | 20 ++++++++++++++++++++ ports/tinyxml/portfile.cmake | 30 ++++++++++++++++++++++++++++++ 5 files changed, 105 insertions(+) create mode 100644 ports/tinyxml/0001_use_stl.patch create mode 100644 ports/tinyxml/CMakeLists.txt create mode 100644 ports/tinyxml/CONTROL create mode 100644 ports/tinyxml/License.txt create mode 100644 ports/tinyxml/portfile.cmake diff --git a/ports/tinyxml/0001_use_stl.patch b/ports/tinyxml/0001_use_stl.patch new file mode 100644 index 000000000..a36f930ee --- /dev/null +++ b/ports/tinyxml/0001_use_stl.patch @@ -0,0 +1,27 @@ +From 5ca492fee93015411a0f10e0b2f1d3503bf962a1 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Sun, 3 Sep 2017 21:43:36 +0300 +Subject: [PATCH] enforce STL usage + +--- + tinyxml.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tinyxml.h b/tinyxml.h +index a3589e5..7195033 100644 +--- a/tinyxml.h ++++ b/tinyxml.h +@@ -43,6 +43,10 @@ distribution. + #define DEBUG + #endif + ++#ifndef TIXML_USE_STL ++#define TIXML_USE_STL ++#endif ++ + #ifdef TIXML_USE_STL + #include + #include +-- +2.12.2.windows.2 + diff --git a/ports/tinyxml/CMakeLists.txt b/ports/tinyxml/CMakeLists.txt new file mode 100644 index 000000000..9b55aa717 --- /dev/null +++ b/ports/tinyxml/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.4) +project(tinyxml) + +set(HEADERS "tinyxml.h") + +set(SOURCES "tinyxml.cpp" + "tinyxmlerror.cpp" + "tinyxmlparser.cpp" +) + +option(BUILD_SHARED_LIBS "Build shared libs" OFF) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + +add_library(tinyxml ${SOURCES}) +target_compile_definitions(tinyxml PRIVATE "-DTIXML_USE_STL") + +install( + TARGETS tinyxml + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +install(FILES ${HEADERS} DESTINATION include) diff --git a/ports/tinyxml/CONTROL b/ports/tinyxml/CONTROL new file mode 100644 index 000000000..3b1978208 --- /dev/null +++ b/ports/tinyxml/CONTROL @@ -0,0 +1,3 @@ +Source: tinyxml +Version: 2.6.2-1 +Description: A simple, small, minimal, C++ XML parser that can be easily integrating into other programs. diff --git a/ports/tinyxml/License.txt b/ports/tinyxml/License.txt new file mode 100644 index 000000000..2987cf75f --- /dev/null +++ b/ports/tinyxml/License.txt @@ -0,0 +1,20 @@ +TinyXML is released under the zlib license: + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. \ No newline at end of file diff --git a/ports/tinyxml/portfile.cmake b/ports/tinyxml/portfile.cmake new file mode 100644 index 000000000..54d462bb4 --- /dev/null +++ b/ports/tinyxml/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tinyxml) + +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/tinyxml/files/tinyxml/2.6.2/tinyxml_2_6_2.tar.gz" + FILENAME "tinyxml_2_6_2.tar.gz" + SHA512 133b5db06131a90ad0c2b39b0063f1c8e65e67288a7e5d67e1f7d9ba32af10dc5dfa0462f9723985ee27debe8f09a10a25d4b5a5aaff2ede979b1cebe8e59d56 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001_use_stl.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml RENAME copyright) -- cgit v1.2.3 From 000f11136d88167dcb643caa815f1f712c2dfb55 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 3 Sep 2017 12:44:15 -0700 Subject: [jsonnet] init fixes #869 --- ports/jsonnet/CMakeLists.txt | 53 ++++++++++++++++++++++++++++++++++++++++++++ ports/jsonnet/CONTROL | 3 +++ ports/jsonnet/portfile.cmake | 29 ++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 ports/jsonnet/CMakeLists.txt create mode 100644 ports/jsonnet/CONTROL create mode 100644 ports/jsonnet/portfile.cmake diff --git a/ports/jsonnet/CMakeLists.txt b/ports/jsonnet/CMakeLists.txt new file mode 100644 index 000000000..4f749e5b8 --- /dev/null +++ b/ports/jsonnet/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 3.5.1) +project(jsonnet) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +set( jsonnet_sources + core/desugarer.cpp + core/formatter.cpp + core/lexer.cpp + core/libjsonnet.cpp + core/parser.cpp + core/pass.cpp + core/static_analysis.cpp + core/string_utils.cpp + core/vm.cpp +) + +include_directories(third_party/md5 include cpp core stdlib) + +add_library(md5 STATIC third_party/md5/md5.cpp) + +add_library(libjsonnet ${jsonnet_sources}) +target_link_libraries(libjsonnet md5) + +add_library(libjsonnet++ cpp/libjsonnet++.cpp) +target_link_libraries(libjsonnet++ libjsonnet) + +add_executable(jsonnet cmd/jsonnet.cpp) +target_link_libraries(jsonnet libjsonnet) + + +install( + TARGETS libjsonnet libjsonnet++ + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS jsonnet + RUNTIME DESTINATION tools/jsonnet + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES include/libjsonnet++.h include/libjsonnet.h DESTINATION include) +endif() diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL new file mode 100644 index 000000000..0254fc14c --- /dev/null +++ b/ports/jsonnet/CONTROL @@ -0,0 +1,3 @@ +Source: jsonnet +Version: 2017-09-02-11cf9fa9f2fe8acbb14b096316006082564ca580 +Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake new file mode 100644 index 000000000..0fa1bf14d --- /dev/null +++ b/ports/jsonnet/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/jsonnet + REF 11cf9fa9f2fe8acbb14b096316006082564ca580 + SHA512 77d9c9e86c4c6501a00f089c72dea522dd818ac0c810b603d18bea111f8f8cf9a25039600a9ba158c5f02142e24d49074e7fe0ddf113665eedf4c3ef66bf421a + HEAD_REF master +) + +vcpkg_execute_required_process( + COMMAND Powershell -Command "((Get-Content -Encoding Byte ${SOURCE_PATH}/stdlib/std.jsonnet) -join ',') + ',0' > ${SOURCE_PATH}/core/std.jsonnet.h" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME "std.jsonnet" +) + + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/jsonnet) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jsonnet RENAME copyright) -- cgit v1.2.3 From 10f51972cb03ee07a282e44f25c665bce163590e Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Wed, 16 Aug 2017 18:08:15 +0300 Subject: [leptonica] Initial port --- ports/leptonica/CONTROL | 4 ++++ ports/leptonica/fix-cmakelists.patch | 34 ++++++++++++++++++++++++++++++++++ ports/leptonica/portfile.cmake | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 ports/leptonica/CONTROL create mode 100644 ports/leptonica/fix-cmakelists.patch create mode 100644 ports/leptonica/portfile.cmake diff --git a/ports/leptonica/CONTROL b/ports/leptonica/CONTROL new file mode 100644 index 000000000..d0e305c7b --- /dev/null +++ b/ports/leptonica/CONTROL @@ -0,0 +1,4 @@ +Source: leptonica +Version: 1.74.4 +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/fix-cmakelists.patch b/ports/leptonica/fix-cmakelists.patch new file mode 100644 index 000000000..18eb8cde5 --- /dev/null +++ b/ports/leptonica/fix-cmakelists.patch @@ -0,0 +1,34 @@ +--- a/src/CMakeLists.txt Sun Jun 11 23:04:50 2017 ++++ b/src/CMakeLists.txt Wed Aug 16 17:29:56 2017 +@@ -27,24 +27,31 @@ + endif() + + if (GIF_LIBRARY) ++ target_include_directories (leptonica PUBLIC ${GIF_INCLUDE_DIR}) + target_link_libraries (leptonica ${GIF_LIBRARY}) + endif() + if (JPEG_LIBRARY) ++ target_include_directories (leptonica PUBLIC ${JPEG_INCLUDE_DIR}) + target_link_libraries (leptonica ${JPEG_LIBRARY}) + endif() + if (JP2K_FOUND) ++ target_include_directories (leptonica PUBLIC ${JP2K_INCLUDE_DIR}) + target_link_libraries (leptonica ${JP2K_LIBRARIES}) + endif() + if (PNG_LIBRARY) ++ target_include_directories (leptonica PUBLIC ${PNG_INCLUDE_DIRS}) + target_link_libraries (leptonica ${PNG_LIBRARY}) + endif() + if (TIFF_LIBRARY) ++ target_include_directories (leptonica PUBLIC ${TIFF_INCLUDE_DIR}) + target_link_libraries (leptonica ${TIFF_LIBRARY}) + endif() + if (WEBP_FOUND) ++ target_include_directories (leptonica PUBLIC ${WEBP_INCLUDE_DIR}) + target_link_libraries (leptonica ${WEBP_LIBRARIES}) + endif() + if (ZLIB_LIBRARY) ++ target_include_directories (leptonica PUBLIC ${ZLIB_INCLUDE_DIR}) + target_link_libraries (leptonica ${ZLIB_LIBRARY}) + endif() + diff --git a/ports/leptonica/portfile.cmake b/ports/leptonica/portfile.cmake new file mode 100644 index 000000000..a5d4330fd --- /dev/null +++ b/ports/leptonica/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DanBloomberg/leptonica + REF 1.74.4 + SHA512 3b9d0be937883f733f72cbdf0b624ec245d9256a8b4622997f437d309efd7ad9695ad1cbe2224d543eb3ef8c44833567b3cc9a95e9a774ef9046b7acaf0ae744 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_REQUIRED_INCLUDES=${CURRENT_INSTALLED_DIR}/include # for check_include_file() +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") + +vcpkg_copy_pdbs() + +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) + +# Handle copyright +file(COPY ${SOURCE_PATH}/leptonica-license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/leptonica) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/leptonica/leptonica-license.txt ${CURRENT_PACKAGES_DIR}/share/leptonica/copyright) -- cgit v1.2.3 From 15b0c1a4b664ce2dbfbda100ca2b14adfabb10aa Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Thu, 17 Aug 2017 03:02:09 +0300 Subject: [tesseract] Initial port. Closes #465 --- ports/tesseract/CONTROL | 4 +++ ports/tesseract/portfile.cmake | 49 +++++++++++++++++++++++++++++++++++++ ports/tesseract/use-vcpkg-icu.patch | 11 +++++++++ 3 files changed, 64 insertions(+) create mode 100644 ports/tesseract/CONTROL create mode 100644 ports/tesseract/portfile.cmake create mode 100644 ports/tesseract/use-vcpkg-icu.patch diff --git a/ports/tesseract/CONTROL b/ports/tesseract/CONTROL new file mode 100644 index 000000000..5bbc7b7e5 --- /dev/null +++ b/ports/tesseract/CONTROL @@ -0,0 +1,4 @@ +Source: tesseract +Version: 3.05.01 +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 new file mode 100644 index 000000000..31ed2cd1f --- /dev/null +++ b/ports/tesseract/portfile.cmake @@ -0,0 +1,49 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tesseract-ocr/tesseract + REF 3.05.01 + SHA512 a49c20c98386684cd89582e57b772811204fad8e5ff18214fb0da109f73629c70845054985e31e8deeb49107fbcf56e546aff661f08eb5dd60fbf83dbe976e81 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-icu.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSTATIC=ON + -DUSE_SYSTEM_ICU=True +) + +vcpkg_install_cmake() + +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) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/tesseract) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tesseract) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/tesseract/LICENSE ${CURRENT_PACKAGES_DIR}/share/tesseract/copyright) diff --git a/ports/tesseract/use-vcpkg-icu.patch b/ports/tesseract/use-vcpkg-icu.patch new file mode 100644 index 000000000..9c75726e1 --- /dev/null +++ b/ports/tesseract/use-vcpkg-icu.patch @@ -0,0 +1,11 @@ +--- 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) -- cgit v1.2.3 From 1f5740e33b90662d0f7b0391ee9a63004d342a7d Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 3 Sep 2017 14:16:09 -0700 Subject: [paho-mqtt] update --- ports/paho-mqtt/CONTROL | 2 +- ports/paho-mqtt/disable_tests.patch | 16 +++++++ ports/paho-mqtt/portfile.cmake | 64 +++++++++++++++++---------- ports/paho-mqtt/remove_compiler_options.patch | 13 ++++++ 4 files changed, 71 insertions(+), 24 deletions(-) create mode 100644 ports/paho-mqtt/disable_tests.patch create mode 100644 ports/paho-mqtt/remove_compiler_options.patch diff --git a/ports/paho-mqtt/CONTROL b/ports/paho-mqtt/CONTROL index 7981a5195..8c751a868 100644 --- a/ports/paho-mqtt/CONTROL +++ b/ports/paho-mqtt/CONTROL @@ -1,4 +1,4 @@ Source: paho-mqtt -Version: Version 1.1.0 (Paho 1.2) +Version: 1.2.0 Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things Build-Depends: openssl diff --git a/ports/paho-mqtt/disable_tests.patch b/ports/paho-mqtt/disable_tests.patch new file mode 100644 index 000000000..ed9a644ff --- /dev/null +++ b/ports/paho-mqtt/disable_tests.patch @@ -0,0 +1,16 @@ +diff --git "a/CMakeLists.txt" "b/CMakeLists.txt" +index c041df0..2feb580 100644 +--- "a/CMakeLists.txt" ++++ "b/CMakeLists.txt" +@@ -94,7 +94,10 @@ SET(CPACK_PACKAGE_VERSION_MINOR ${PAHO_VERSION_MINOR}) + SET(CPACK_PACKAGE_VERSION_PATCH ${PAHO_VERSION_PATCH}) + INCLUDE(CPack) + ++if(BUILD_TESTS) + ENABLE_TESTING() + + INCLUDE_DIRECTORIES(test src) + ADD_SUBDIRECTORY(test) ++ ++endif() +\ No newline at end of file diff --git a/ports/paho-mqtt/portfile.cmake b/ports/paho-mqtt/portfile.cmake index 5fc6341f8..6e50f1238 100644 --- a/ports/paho-mqtt/portfile.cmake +++ b/ports/paho-mqtt/portfile.cmake @@ -1,56 +1,74 @@ include(vcpkg_common_functions) vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO eclipse/paho.mqtt.c - REF v1.1.0 - SHA512 49eebf258e15076048103ff79442ad0d21164b83f713eee7f226998106b5931d310871d3b372322d5ef1cb2801219a6e626400b6fe4198814150a6277d6bfd74 - HEAD_REF master + OUT_SOURCE_PATH SOURCE_PATH + REPO eclipse/paho.mqtt.c + REF v1.2.0 + SHA512 ffad01a8f9f41049dd008e163136e4ecb8c7c51f7b49917201593b0844b15a8d2a413ddec06fa5b2d77e432f0603b71664a23afbb7c215121cebd7d419ccacfa + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PAHO_BUILD_STATIC) + + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/disable_tests.patch" + "${CMAKE_CURRENT_LIST_DIR}/remove_compiler_options.patch" ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DPAHO_WITH_SSL=TRUE + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_STATIC=${PAHO_BUILD_STATIC} ) vcpkg_build_cmake() file(GLOB DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" ) file(GLOB LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" ) file(GLOB DEBUG_DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" ) file(GLOB DEBUG_LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" ) file(GLOB HEADERS "${SOURCE_PATH}/*/*.h") if(DLLS) - file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) endif() file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) endif() file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) vcpkg_copy_pdbs() +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + foreach(libname paho-mqtt3as-static paho-mqtt3cs-static paho-mqtt3a-static paho-mqtt3c-static) + foreach(foldername "lib" "debug/lib") + string(REPLACE "-static" "" outlibname ${libname}) + file(RENAME ${CURRENT_PACKAGES_DIR}/${foldername}/${libname}.lib ${CURRENT_PACKAGES_DIR}/${foldername}/${outlibname}.lib) + endforeach() + endforeach() +endif() -file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/paho-mqtt RENAME copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/paho-mqtt RENAME copyright) diff --git a/ports/paho-mqtt/remove_compiler_options.patch b/ports/paho-mqtt/remove_compiler_options.patch new file mode 100644 index 000000000..256d07a8f --- /dev/null +++ b/ports/paho-mqtt/remove_compiler_options.patch @@ -0,0 +1,13 @@ +diff --git "a/CMakeLists.txt" "b/CMakeLists.txt" +index 2feb580..796d08e 100644 +--- "a/CMakeLists.txt" ++++ "b/CMakeLists.txt" +@@ -55,7 +55,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux") + ENDIF() + + IF(WIN32) +- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -MD) ++ ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN) + ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + ADD_DEFINITIONS(-DOSX) + ENDIF() -- cgit v1.2.3 From aef3577672b469ed915a7b0680d5e1ccf36347ed Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Mon, 4 Sep 2017 00:33:41 +0300 Subject: [vcpkg] allow underscores in package name --- toolsrc/src/PackageSpec.cpp | 2 +- toolsrc/src/PackageSpecParseResult.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/PackageSpec.cpp b/toolsrc/src/PackageSpec.cpp index 890de8899..2baf3181b 100644 --- a/toolsrc/src/PackageSpec.cpp +++ b/toolsrc/src/PackageSpec.cpp @@ -10,7 +10,7 @@ namespace vcpkg { static bool is_valid_package_spec_char(char c) { - return (c == '-') || isdigit(c) || (isalpha(c) && islower(c)) || (c == '[') || (c == ']'); + return (c == '-') || (c == '_') || isdigit(c) || (isalpha(c) && islower(c)) || (c == '[') || (c == ']'); } std::string FeatureSpec::to_string() const diff --git a/toolsrc/src/PackageSpecParseResult.cpp b/toolsrc/src/PackageSpecParseResult.cpp index 838c788ba..34398cff9 100644 --- a/toolsrc/src/PackageSpecParseResult.cpp +++ b/toolsrc/src/PackageSpecParseResult.cpp @@ -12,8 +12,8 @@ namespace vcpkg case PackageSpecParseResult::SUCCESS: return "OK"; case PackageSpecParseResult::TOO_MANY_COLONS: return "Too many colons"; case PackageSpecParseResult::INVALID_CHARACTERS: - return "Contains invalid characters. Only alphanumeric lowercase ASCII characters and dashes are " - "allowed"; + return "Contains invalid characters. Only alphanumeric lowercase ASCII characters, dashes and" + "underscores are allowed"; default: Checks::unreachable(VCPKG_LINE_INFO); } } -- cgit v1.2.3 From f9eda00cdaca57f23f01d528b634465e5b3ecd70 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Mon, 4 Sep 2017 00:34:01 +0300 Subject: [urdfdom_headers] add version 1.0.0 --- ports/urdfdom_headers/CONTROL | 3 +++ ports/urdfdom_headers/portfile.cmake | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 ports/urdfdom_headers/CONTROL create mode 100644 ports/urdfdom_headers/portfile.cmake diff --git a/ports/urdfdom_headers/CONTROL b/ports/urdfdom_headers/CONTROL new file mode 100644 index 000000000..a389d162c --- /dev/null +++ b/ports/urdfdom_headers/CONTROL @@ -0,0 +1,3 @@ +Source: urdfdom_headers +Version: 1.0.0-1 +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 new file mode 100644 index 000000000..495328627 --- /dev/null +++ b/ports/urdfdom_headers/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ros/urdfdom_headers + REF 1.0.0 + SHA512 b1f63c1a13f062c987d6be4fcea5eea903577a710d44fdce077722b70d72eb65a265131beac1fdeba576bde189ebf51ac0eb19b2b06a34b0f9fb9dcbd437291a + HEAD_REF master + ) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/urdfdom_headers RENAME copyright) -- cgit v1.2.3 From eec908a7f6ddad82eb346c107e141b4a09b3d17c Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Mon, 4 Sep 2017 00:34:31 +0300 Subject: [console_bridge] add version 0.3.2 --- ports/console_bridge/CONTROL | 3 +++ ports/console_bridge/License.txt | 31 +++++++++++++++++++++++++++++++ ports/console_bridge/portfile.cmake | 23 +++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 ports/console_bridge/CONTROL create mode 100644 ports/console_bridge/License.txt create mode 100644 ports/console_bridge/portfile.cmake diff --git a/ports/console_bridge/CONTROL b/ports/console_bridge/CONTROL new file mode 100644 index 000000000..aa6fe0882 --- /dev/null +++ b/ports/console_bridge/CONTROL @@ -0,0 +1,3 @@ +Source: console_bridge +Version: 0.3.2-1 +Description: a ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages. diff --git a/ports/console_bridge/License.txt b/ports/console_bridge/License.txt new file mode 100644 index 000000000..affcb8568 --- /dev/null +++ b/ports/console_bridge/License.txt @@ -0,0 +1,31 @@ +Software License Agreement (BSD License) + +Copyright (c) 2008, Willow Garage, 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: + +* 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. +* Neither the name of the Willow Garage 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 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. \ No newline at end of file diff --git a/ports/console_bridge/portfile.cmake b/ports/console_bridge/portfile.cmake new file mode 100644 index 000000000..ca5502aa9 --- /dev/null +++ b/ports/console_bridge/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ros/console_bridge + REF 0.3.2 + SHA512 41fa5340d7ba79c887ef73eb4fda7b438ed91febd224934ae4658697e4c9e43357207e1b3e191ecce3c97cb9a87b0556372832735a268261bc798cc7683aa207 + HEAD_REF master + ) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/console_bridge RENAME copyright) -- cgit v1.2.3 From 5e73df3a02d82d948635ac4caa54657c0c193f2e Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Mon, 4 Sep 2017 00:34:47 +0300 Subject: [urdfdom] add version 1.0.0 --- ports/urdfdom/0001_use_math_defines.patch | 26 ++++++++++++++++ ports/urdfdom/0002_fix_exports.patch | 29 ++++++++++++++++++ ports/urdfdom/CONTROL | 4 +++ ports/urdfdom/portfile.cmake | 51 +++++++++++++++++++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 ports/urdfdom/0001_use_math_defines.patch create mode 100644 ports/urdfdom/0002_fix_exports.patch create mode 100644 ports/urdfdom/CONTROL create mode 100644 ports/urdfdom/portfile.cmake diff --git a/ports/urdfdom/0001_use_math_defines.patch b/ports/urdfdom/0001_use_math_defines.patch new file mode 100644 index 000000000..b791533aa --- /dev/null +++ b/ports/urdfdom/0001_use_math_defines.patch @@ -0,0 +1,26 @@ +From a374a5b04db27fde58a11cc2ba5ea10a0d0a7dad Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Sun, 3 Sep 2017 23:24:55 +0300 +Subject: [PATCH] define _USE_MATH_DEFINES + +--- + urdf_parser/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt +index 333226e..2158965 100644 +--- a/urdf_parser/CMakeLists.txt ++++ b/urdf_parser/CMakeLists.txt +@@ -1,5 +1,9 @@ + include_directories(include) + ++if(MSVC) ++add_definitions(-D_USE_MATH_DEFINES) ++endif() ++ + add_library(urdfdom_world SHARED src/pose.cpp src/model.cpp src/link.cpp src/joint.cpp src/world.cpp) + target_link_libraries(urdfdom_world ${TinyXML_LIBRARIES} ${console_bridge_LIBRARIES}) + set_target_properties(urdfdom_world PROPERTIES SOVERSION ${URDF_MAJOR_MINOR_VERSION}) +-- +2.12.2.windows.2 + diff --git a/ports/urdfdom/0002_fix_exports.patch b/ports/urdfdom/0002_fix_exports.patch new file mode 100644 index 000000000..727883f8d --- /dev/null +++ b/ports/urdfdom/0002_fix_exports.patch @@ -0,0 +1,29 @@ +From 06aa5a06ee543102bf1a4057601adba3490dad60 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Sun, 3 Sep 2017 23:55:11 +0300 +Subject: [PATCH] fix exports + +--- + urdf_parser/CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt +index 2158965..c209228 100644 +--- a/urdf_parser/CMakeLists.txt ++++ b/urdf_parser/CMakeLists.txt +@@ -15,10 +15,12 @@ set_target_properties(urdfdom_model PROPERTIES SOVERSION ${URDF_MAJOR_MINOR_VERS + add_library(urdfdom_sensor SHARED src/urdf_sensor.cpp) + target_link_libraries(urdfdom_sensor urdfdom_model ${TinyXML_LIBRARIES} ${console_bridge_LIBRARIES}) + set_target_properties(urdfdom_sensor PROPERTIES SOVERSION ${URDF_MAJOR_MINOR_VERSION}) ++set_target_properties(urdfdom_sensor PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) + + add_library(urdfdom_model_state SHARED src/urdf_model_state.cpp src/twist.cpp) + target_link_libraries(urdfdom_model_state ${TinyXML_LIBRARIES} ${console_bridge_LIBRARIES}) + set_target_properties(urdfdom_model_state PROPERTIES SOVERSION ${URDF_MAJOR_MINOR_VERSION}) ++set_target_properties(urdfdom_model_state PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) + + # -------------------------------- + +-- +2.12.2.windows.2 + diff --git a/ports/urdfdom/CONTROL b/ports/urdfdom/CONTROL new file mode 100644 index 000000000..76e8b86a5 --- /dev/null +++ b/ports/urdfdom/CONTROL @@ -0,0 +1,4 @@ +Source: urdfdom +Version: 1.0.0-1 +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 \ No newline at end of file diff --git a/ports/urdfdom/portfile.cmake b/ports/urdfdom/portfile.cmake new file mode 100644 index 000000000..bf0568f8c --- /dev/null +++ b/ports/urdfdom/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "urdfdom does not support static linkage. Building dynamically.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ros/urdfdom + REF 1.0.0 + SHA512 50a218e596bcc0cecff904db2fa626bebc3902c4fe1f5ff8e08195e462b4d9a8c416a41f4773cabbcc71490060d3feff7e8528a76b824569dc7fdb0bda01ec3f + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001_use_math_defines.patch + ${CMAKE_CURRENT_LIST_DIR}/0002_fix_exports.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/ ${CURRENT_PACKAGES_DIR}/tools/urdfdom/) + +file(GLOB URDFDOM_DLLS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) +foreach(URDFDOM_DLL_DEBUG ${URDFDOM_DLLS_DEBUG}) + file(COPY ${URDFDOM_DLL_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${URDFDOM_DLL_DEBUG}) +endforeach() + +file(GLOB URDFDOM_DLLS_RELEASE ${CURRENT_PACKAGES_DIR}/lib/*.dll) +foreach(URDFDOM_DLL_RELEASE ${URDFDOM_DLLS_RELEASE}) + file(COPY ${URDFDOM_DLL_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${URDFDOM_DLL_RELEASE}) +endforeach() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/urdfdom RENAME copyright) -- cgit v1.2.3 From f6a5f3532074feef5dbf2cdb74d54cd75d17e4b4 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Mon, 4 Sep 2017 01:22:43 +0300 Subject: [nlopt] add master 2017-08-24 --- ports/nlopt/0001_export_symbols.patch | 25 +++++++++++++++++++++++++ ports/nlopt/CONTROL | 3 +++ ports/nlopt/portfile.cmake | 30 ++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 ports/nlopt/0001_export_symbols.patch create mode 100644 ports/nlopt/CONTROL create mode 100644 ports/nlopt/portfile.cmake diff --git a/ports/nlopt/0001_export_symbols.patch b/ports/nlopt/0001_export_symbols.patch new file mode 100644 index 000000000..8db70a139 --- /dev/null +++ b/ports/nlopt/0001_export_symbols.patch @@ -0,0 +1,25 @@ +From a8ab743870873066a66b30d68907ccc4ade250a5 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Mon, 4 Sep 2017 01:25:38 +0300 +Subject: [PATCH] export symbols + +--- + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f630c18..c266b39 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,6 +20,8 @@ endif () + + project (nlopt) + ++set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) ++ + list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) + + option (WITH_CXX "enable cxx routines" OFF) +-- +2.12.2.windows.2 + diff --git a/ports/nlopt/CONTROL b/ports/nlopt/CONTROL new file mode 100644 index 000000000..1c3ab9915 --- /dev/null +++ b/ports/nlopt/CONTROL @@ -0,0 +1,3 @@ +Source: nlopt +Version: 2.4.2-c43afa08d~vcpkg1 +Description: a library for nonlinear local and global optimization, for functions with and without gradient information. diff --git a/ports/nlopt/portfile.cmake b/ports/nlopt/portfile.cmake new file mode 100644 index 000000000..f2370b0c0 --- /dev/null +++ b/ports/nlopt/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stevengj/nlopt + REF c43afa08d4fe086d9c00c37924a6bd4c9de71816 + SHA512 e063d748b040f081a648b33dadaf9b7deef63ff3be0cffd8988816701c18694202f5bcf06a18991f1f4b35014e3f406ffa4404d4036ff7625d3680bd5e24f8e4 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001_export_symbols.patch) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +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) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -- cgit v1.2.3 From 557f81f5dbb0a511ba05f8829a926b16567b3168 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 3 Sep 2017 18:09:03 -0700 Subject: [arrow] update --- ports/arrow/CONTROL | 4 +- ports/arrow/all.patch | 130 +++++++++++++++++++++++++++++++++++++++++++++ ports/arrow/portfile.cmake | 26 ++++++++- 3 files changed, 156 insertions(+), 4 deletions(-) create mode 100644 ports/arrow/all.patch diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL index 717360d12..78cbf2a18 100644 --- a/ports/arrow/CONTROL +++ b/ports/arrow/CONTROL @@ -1,4 +1,4 @@ Source: arrow -Version: apache-arrow-0.4.0-1 -Build-Depends: boost +Version: 0.6.0 +Build-Depends: boost, flatbuffers, rapidjson, zlib, lz4, brotli, zstd, snappy, gflags Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. diff --git a/ports/arrow/all.patch b/ports/arrow/all.patch new file mode 100644 index 000000000..6e0d175c3 --- /dev/null +++ b/ports/arrow/all.patch @@ -0,0 +1,130 @@ +diff --git a/cmake_modules/FindBrotli.cmake b/cmake_modules/FindBrotli.cmake +index f2e714c..2e475dc 100644 +--- a/cmake_modules/FindBrotli.cmake ++++ b/cmake_modules/FindBrotli.cmake +@@ -65,16 +65,13 @@ if (BROTLI_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR BROTLI_LIBRARIES)) + set(BROTLI_FOUND TRUE) + get_filename_component( BROTLI_LIBS ${BROTLI_LIBRARY_ENC} PATH ) + set(BROTLI_LIB_NAME brotli) +- if (MSVC AND NOT BROTLI_MSVC_STATIC_LIB_SUFFIX) +- set(BROTLI_MSVC_STATIC_LIB_SUFFIX _static) +- endif() + set(BROTLI_STATIC_LIB +- ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX} +- ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) +- set(BROTLI_STATIC_LIBRARY_ENC ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) +- set(BROTLI_STATIC_LIBRARY_DEC ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) +- set(BROTLI_STATIC_LIBRARY_COMMON ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${BROTLI_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) ++ ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${CMAKE_STATIC_LIBRARY_SUFFIX} ++ ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${CMAKE_STATIC_LIBRARY_SUFFIX} ++ ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${CMAKE_STATIC_LIBRARY_SUFFIX}) ++ set(BROTLI_STATIC_LIBRARY_ENC ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${CMAKE_STATIC_LIBRARY_SUFFIX}) ++ set(BROTLI_STATIC_LIBRARY_DEC ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${CMAKE_STATIC_LIBRARY_SUFFIX}) ++ set(BROTLI_STATIC_LIBRARY_COMMON ${BROTLI_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${BROTLI_LIB_NAME}common${CMAKE_STATIC_LIBRARY_SUFFIX}) + set(BROTLI_SHARED_LIB + ${BROTLI_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${BROTLI_LIB_NAME}enc${CMAKE_SHARED_LIBRARY_SUFFIX} + ${BROTLI_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${BROTLI_LIB_NAME}dec${CMAKE_SHARED_LIBRARY_SUFFIX} +diff --git a/cmake_modules/FindFlatbuffers.cmake b/cmake_modules/FindFlatbuffers.cmake +index 804f479..ff9bde1 100644 +--- a/cmake_modules/FindFlatbuffers.cmake ++++ b/cmake_modules/FindFlatbuffers.cmake +@@ -53,6 +53,7 @@ endif () + + find_program(FLATBUFFERS_COMPILER flatc + "${FLATBUFFERS_HOME}/bin" ++ "${FLATBUFFERS_HOME}/tools" + /usr/local/bin + /usr/bin + NO_DEFAULT_PATH +diff --git a/cmake_modules/FindLz4.cmake b/cmake_modules/FindLz4.cmake +index 07707cf..9cbf67d 100644 +--- a/cmake_modules/FindLz4.cmake ++++ b/cmake_modules/FindLz4.cmake +@@ -29,15 +29,7 @@ elseif ( Lz4_HOME ) + list( APPEND _lz4_roots ${Lz4_HOME} ) + endif() + +-if (MSVC AND NOT LZ4_MSVC_STATIC_LIB_SUFFIX) +- set(LZ4_MSVC_STATIC_LIB_SUFFIX "_static") +-endif() +- +-set(LZ4_STATIC_LIB_SUFFIX +- "${LZ4_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") +- +-set(LZ4_STATIC_LIB_NAME +- ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_STATIC_LIB_SUFFIX}) ++set(LZ4_STATIC_LIB_NAME lz4) + + find_path(LZ4_INCLUDE_DIR NAMES lz4.h + PATHS ${_lz4_roots} +diff --git a/cmake_modules/FindSnappy.cmake b/cmake_modules/FindSnappy.cmake +index 867963c..8a432db 100644 +--- a/cmake_modules/FindSnappy.cmake ++++ b/cmake_modules/FindSnappy.cmake +@@ -55,7 +55,7 @@ if (SNAPPY_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR SNAPPY_LIBRARIES)) + set(SNAPPY_HEADER_NAME snappy.h) + set(SNAPPY_HEADER ${SNAPPY_INCLUDE_DIR}/${SNAPPY_HEADER_NAME}) + set(SNAPPY_LIB_NAME snappy) +- set(SNAPPY_STATIC_LIB ${SNAPPY_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${SNAPPY_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) ++ set(SNAPPY_STATIC_LIB ${SNAPPY_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}) + set(SNAPPY_SHARED_LIB ${SNAPPY_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) + else () + set(SNAPPY_FOUND FALSE) +diff --git a/cmake_modules/FindZLIB.cmake b/cmake_modules/FindZLIB.cmake +index 78b84f2..eb09001 100644 +--- a/cmake_modules/FindZLIB.cmake ++++ b/cmake_modules/FindZLIB.cmake +@@ -62,11 +62,11 @@ if (ZLIB_INCLUDE_DIR AND (PARQUET_MINIMAL_DEPENDENCY OR ZLIB_LIBRARIES)) + set(ZLIB_LIB_NAME z) + if (MSVC) + if (NOT ZLIB_MSVC_STATIC_LIB_SUFFIX) +- set(ZLIB_MSVC_STATIC_LIB_SUFFIX libstatic) ++ set(ZLIB_MSVC_STATIC_LIB_SUFFIX lib) + endif() + set(ZLIB_MSVC_SHARED_LIB_SUFFIX lib) + endif() +- set(ZLIB_STATIC_LIB ${ZLIB_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${ZLIB_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) ++ set(ZLIB_STATIC_LIB ${ZLIB_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${ZLIB_MSVC_SHARED_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) + set(ZLIB_SHARED_LIB ${ZLIB_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${ZLIB_MSVC_SHARED_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}) + else () + set(ZLIB_FOUND FALSE) +diff --git a/cmake_modules/FindZSTD.cmake b/cmake_modules/FindZSTD.cmake +index 02a0c39..73c61b5 100644 +--- a/cmake_modules/FindZSTD.cmake ++++ b/cmake_modules/FindZSTD.cmake +@@ -29,21 +29,11 @@ elseif ( ZStd_HOME ) + list( APPEND _zstd_roots ${ZStd_HOME} ) + endif() + +-if (MSVC AND NOT ZSTD_MSVC_STATIC_LIB_SUFFIX) +- set(ZSTD_MSVC_STATIC_LIB_SUFFIX "_static") +-endif() +- +-set(ZSTD_STATIC_LIB_SUFFIX +- "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") +- +-set(ZSTD_STATIC_LIB_NAME +- ${CMAKE_STATIC_LIBRARY_PREFIX}zstd${ZSTD_STATIC_LIB_SUFFIX}) +- + find_path(ZSTD_INCLUDE_DIR NAMES zstd.h + PATHS ${_zstd_roots} + NO_DEFAULT_PATH + PATH_SUFFIXES "include" ) +-find_library(ZSTD_STATIC_LIB NAMES ${ZSTD_STATIC_LIB_NAME} lib${ZSTD_STATIC_LIB_NAME} ++find_library(ZSTD_STATIC_LIB NAMES libzstd libzstd_static zstd zstd_static + PATHS ${_zstd_roots} + NO_DEFAULT_PATH + PATH_SUFFIXES "lib" ) +diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake +index a888e92..0fe3629 100644 +--- a/cmake_modules/ThirdpartyToolchain.cmake ++++ b/cmake_modules/ThirdpartyToolchain.cmake +@@ -119,6 +119,7 @@ endif() + set(Boost_DEBUG TRUE) + set(Boost_USE_MULTITHREADED ON) + set(Boost_ADDITIONAL_VERSIONS ++ "1.65.0" "1.65" + "1.64.0" "1.64" + "1.63.0" "1.63" + "1.62.0" "1.61" diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index f5cdb1ae4..c70a3cdc3 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -7,17 +7,39 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/arrow - REF apache-arrow-0.4.0 - SHA512 cdd67a884528b088688d88c0627b9c13077215e234dd0772797f0bf63319ffc18533276d52110a37a0938d32f006023b74dce93e71d34b1e0003a86761cea6ee + REF apache-arrow-0.6.0 + SHA512 c0e89b959dfe75e895a3427edd4eee663be5ee542e9ea13f7311d0775fe7a00188eafa07ba524e3d3c0a71fc8e11213f10fe4ebfdf451754816062249ffa7f3d HEAD_REF master ) set(CPP_SOURCE_PATH "${SOURCE_PATH}/cpp") +vcpkg_apply_patches( + SOURCE_PATH ${CPP_SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/all.patch" +) + + +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_BUILD_SHARED) +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" ARROW_BUILD_STATIC) + vcpkg_configure_cmake( SOURCE_PATH ${CPP_SOURCE_PATH} OPTIONS -DARROW_BUILD_TESTS=off + -DRAPIDJSON_HOME=${CURRENT_INSTALLED_DIR} + -DFLATBUFFERS_HOME=${CURRENT_INSTALLED_DIR} + -DARROW_ZLIB_VENDORED=ON + -DBROTLI_HOME=${CURRENT_INSTALLED_DIR} + -DLZ4_HOME=${CURRENT_INSTALLED_DIR} + -DZSTD_HOME=${CURRENT_INSTALLED_DIR} + -DSNAPPY_HOME=${CURRENT_INSTALLED_DIR} + -DBOOST_ROOT=${CURRENT_INSTALLED_DIR} + -DGFLAGS_HOME=${CURRENT_INSTALLED_DIR} + -DZLIB_HOME=${CURRENT_INSTALLED_DIR} + -DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC} + -DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED} ) vcpkg_install_cmake() -- cgit v1.2.3 From a64bc4a8be6c8ce563f96eb5fffb829783ed91a4 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Mon, 4 Sep 2017 08:38:26 +0200 Subject: code review --- ports/protobuf/portfile.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index daf72a495..83f9e1e1d 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -18,8 +18,6 @@ set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32) vcpkg_extract_source_archive(${ARCHIVE_FILE}) -# Patch to fix the missing export of fixed_address_empty_string, -# see https://github.com/google/protobuf/pull/3216 # Add a flag that can be set to disable the protobuf compiler vcpkg_apply_patches( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION} -- cgit v1.2.3 From 3eb193938a953d0a6cc31dbd03c48079a0303c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20T=C3=A4schner?= Date: Mon, 4 Sep 2017 10:04:55 +0200 Subject: Update to version 1.15.8. Revert "Merge pull request #1277 from AlexanderTaeschner/CairoInitMutex". This reverts commit 2aa83904eac9d11b69f09e9f0af85350fea472d9, reversing changes made to 748e8b6e7495f06253eb21236bf3abf38b897b63. --- ports/cairo/CONTROL | 2 +- .../Initialize-mutexes-for-static-builds-for-win32.patch | 16 ---------------- ports/cairo/portfile.cmake | 7 +++---- 3 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 ports/cairo/Initialize-mutexes-for-static-builds-for-win32.patch diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index 9a6a550a6..a900f137d 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,4 +1,4 @@ Source: cairo -Version: 1.15.6 +Version: 1.15.8 Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig diff --git a/ports/cairo/Initialize-mutexes-for-static-builds-for-win32.patch b/ports/cairo/Initialize-mutexes-for-static-builds-for-win32.patch deleted file mode 100644 index 420d91e28..000000000 --- a/ports/cairo/Initialize-mutexes-for-static-builds-for-win32.patch +++ /dev/null @@ -1,16 +0,0 @@ - src/win32/cairo-win32-device.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/win32/cairo-win32-device.c b/src/win32/cairo-win32-device.c -index 741e49e..c60c494 100644 ---- a/src/win32/cairo-win32-device.c -+++ b/src/win32/cairo-win32-device.c -@@ -131,6 +131,8 @@ _cairo_win32_device_get (void) - { - cairo_win32_device_t *device; - -+ CAIRO_MUTEX_INITIALIZE (); -+ - if (__cairo_win32_device) - return cairo_device_reference (__cairo_win32_device); - diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake index 0ccf0c470..6fb0e7ce8 100644 --- a/ports/cairo/portfile.cmake +++ b/ports/cairo/portfile.cmake @@ -7,19 +7,18 @@ # include(vcpkg_common_functions) -set(CAIRO_VERSION 1.15.6) +set(CAIRO_VERSION 1.15.8) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cairo-${CAIRO_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "http://cairographics.org/snapshots/cairo-${CAIRO_VERSION}.tar.xz" FILENAME "cairo-${CAIRO_VERSION}.tar.xz" - SHA512 e4eccba745a03545001ebd6f1a7b87bee4b932f80a2d877a764500ad5c18011a5bac585f31eec6d0b65ccaa818de0df2b3b99f0792111363bd3554cfa7f688b6 + SHA512 5af1eebf432201dae0efaa5b6766b151d8273ea00dae48e104d56477005b4d423d64b5d11c512736a4cb076632fb2a572ec35becd922825a68d933bb5ff96ca1 ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/Initialize-mutexes-for-static-builds-for-win32.patch" - "${CMAKE_CURRENT_LIST_DIR}/export-only-in-shared-build.patch" + PATCHES "${CMAKE_CURRENT_LIST_DIR}/export-only-in-shared-build.patch" ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src) -- cgit v1.2.3 From 60c581b64e99905790b889d7c17b4c2c4e15b7d5 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 4 Sep 2017 10:22:06 +0200 Subject: Updated CONTROL file to list 6.4.4, portfile was updated some time ago already * ports/ace/CONTROL: --- ports/ace/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/ace/CONTROL b/ports/ace/CONTROL index 7a620f3c6..e32e827b3 100644 --- a/ports/ace/CONTROL +++ b/ports/ace/CONTROL @@ -1,3 +1,3 @@ Source: ace -Version: 6.4.3 +Version: 6.4.4 Description: The ADAPTIVE Communication Environment -- cgit v1.2.3 From 97104258a782630a1a0d9a2504a533a550c50b69 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 4 Sep 2017 02:11:41 -0700 Subject: Update CHANGELOG and bump version to v0.0.86 --- CHANGELOG.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f591f4bae..f02cd1bcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,49 @@ +vcpkg (0.0.86) +-------------- + * Add ports: + - bigint 2010.04.30 + - butteraugli 2017-09-02-8c60a2aefa19adb + - ccd 2.0.0-1 (Renamed from libccd) + - fadbad 2.1.0 + - fcl 0.5.0-1 + - guetzli 2017-09-02-cb5e4a86f69628 + - gumbo 0.10.1 + - libmicrohttpd 0.9.55 + - libstemmer 2017-9-02 + - libunibreak 4.0 + - lodepng 2017-09-01-8a0f16afe74a6a + - meschach + - nlopt 2.4.2-c43afa08d~vcpkg1 + - picosha2 2017-09-01-c5ff159b6 + - piex 2017-09-01-473434f2dd974978b + - pthreads 2.9.1 + - tinythread 1.1 + - tinyxml 2.6.2-1 + * Removed ports: + - libccd 2.0.0 (Renamed to ccd) + * Update ports: + - ace 6.4.3 -> 6.4.4 + - boost 1.65 -> 1.65-1 + - cairo 1.15.6 -> 1.15.8 + - gdk-pixbuf 2.36.6 -> 2.36.9 + - glib 2.52.2 -> 2.52.3 + - gtk 3.22.15 -> 3.22.19 + - jxrlib 1.1-2 -> 1.1-3 + - paho-mqtt Version 1.1.0 (Paho 1.2) -> 1.2.0 + - pango 1.40.6 -> 1.40.11 + - shaderc 2df47b51d83ad83cbc2e7f8ff2b56776293e8958 -> 2df47b51d83ad83cbc2e7f8ff2b56776293e8958-1 + * Fix warnings in bootstrap-vcpkg.ps1 + * Fix codepage related issues with ninja/cmake + * Improve handling for non-ascii environments + * Configurations names are now more tolerant: + - If a configuration name is prefixed with "Release", then it is compatible with "Release" + - If a configuration name is prefixed with "Debug", then it is compatible with "Debug" + * `vcpkg edit`: Improve detection of VSCode and add better messages when no path is found + * Fixes and improvements in the `vcpkg` tool itself + +-- vcpkg team MON, 04 Sep 2017 02:00:00 -0800 + + vcpkg (0.0.85) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index d27b8ca83..df2e96a41 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.85" \ No newline at end of file +"0.0.86" \ No newline at end of file -- cgit v1.2.3 From f1c220d7232f90ff5ac5f51dc384d0aed45c5c3f Mon Sep 17 00:00:00 2001 From: Olaf Date: Mon, 4 Sep 2017 11:49:03 +0200 Subject: Update ctemplate, use Python 3 --- ports/ctemplate/portfile.cmake | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/ports/ctemplate/portfile.cmake b/ports/ctemplate/portfile.cmake index af1f0532c..d22c3afa4 100644 --- a/ports/ctemplate/portfile.cmake +++ b/ports/ctemplate/portfile.cmake @@ -1,27 +1,20 @@ include(vcpkg_common_functions) -set(GIT_REF 44b7c5b918a08ad561c63e9d28beecb40c10ebca) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OlafvdSpek/ctemplate - REF 44b7c5b918a08ad561c63e9d28beecb40c10ebca - SHA512 b572f6d0d182e977d3a459e68bde6244dad7196c44c16407990dc1fb6a7a93bcd8d6851e515d50b6051c1d011f71695f895f6ab233664baadae0bf6a3d464305 + REF 4b7e6c52dc7cbb4d51c9abcebcbac91ec256a62b + SHA512 9317fb26f22892b0bc2ca17cbccb5b084091050aa88766b4ed673a690bc4cdb9cd882134fbcd7ed3ee156f6a6937218717765143796d7e98b532355867ed042b HEAD_REF master ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_find_acquire_program(PYTHON2) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-msvc.patch -) +vcpkg_find_acquire_program(PYTHON3) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DPYTHON_EXECUTABLE=${PYTHON2} + OPTIONS -DPYTHON_EXECUTABLE=${PYTHON3} OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) -- cgit v1.2.3 From 417fe6633f848e0690b314582b1548cc6b0adc32 Mon Sep 17 00:00:00 2001 From: juandent Date: Mon, 4 Sep 2017 17:43:37 -0600 Subject: These work correctly as far as I tested them... --- ports/cppwinrt/CONTROL | 2 +- ports/cppwinrt/portfile.cmake | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/cppwinrt/CONTROL b/ports/cppwinrt/CONTROL index e49eefe99..e470b2458 100644 --- a/ports/cppwinrt/CONTROL +++ b/ports/cppwinrt/CONTROL @@ -1,3 +1,3 @@ Source: cppwinrt -Version: feb2017_refresh-14393 +Version: spring_2017_creators_update_for_vs_15.3 Description: C++/WinRT is a standard C++ language projection for the Windows Runtime. diff --git a/ports/cppwinrt/portfile.cmake b/ports/cppwinrt/portfile.cmake index b0e808c84..c83465efe 100644 --- a/ports/cppwinrt/portfile.cmake +++ b/ports/cppwinrt/portfile.cmake @@ -1,18 +1,18 @@ include(vcpkg_common_functions) find_program(GIT git) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-february_2017_refresh) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-spring_2017_creators_update_for_vs_15.3) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/cppwinrt/archive/february_2017_refresh.tar.gz" - FILENAME "cppwinrt-february_2017_refresh.tar.gz" - SHA512 0e2ed94d65ae4c7297ae4d82d64a43fa59fac7b35fbe42ea939f135f0f6eb867f57fac70b6a9cc9a78912de75aa4482d48007f83a3781b147d237ae637fdaa0e + URLS "https://github.com/Microsoft/cppwinrt/archive/spring_2017_creators_update_for_vs_15.3.tar.gz" + FILENAME "cppwinrt-spring_2017_creators_update_for_vs_15.3.tar.gz" + SHA512 779586122552e49a79aff08f4476905e00c3b4ad3dbc502240e9a7cc59ec0e4ab6304149a66505923ab84d2b334059de9e18c84a5b0ed6bde106d19119ef911f ) vcpkg_extract_source_archive(${ARCHIVE}) # Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt) +file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt) file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright) # Copy the cppwinrt header files -file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.14393.0/winrt/*) +file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.15063.0/winrt/*) file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt) -- cgit v1.2.3 From 453a16d4e7a8d3996564b0a6c5b76d08d0d71187 Mon Sep 17 00:00:00 2001 From: pravic Date: Tue, 5 Sep 2017 19:57:06 +0300 Subject: [meschach] Add version and description. --- ports/meschach/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/meschach/CONTROL b/ports/meschach/CONTROL index acfaf2a4e..7e1d75b8a 100644 --- a/ports/meschach/CONTROL +++ b/ports/meschach/CONTROL @@ -1,3 +1,3 @@ Source: meschach -Version: -Description: +Version: 1.2b +Description: Matrix computations in C -- cgit v1.2.3 From 471d7e2ae7acc8a3016f095cda3b29c829bdcf60 Mon Sep 17 00:00:00 2001 From: Toby Chen Date: Tue, 5 Sep 2017 12:58:53 -0700 Subject: Update glslang shaderc spirv-tools Update those ports to the versions listed in https://github.com/google/shaderc/blob/known-good/known_good.json --- ports/glslang/CONTROL | 2 +- ports/glslang/portfile.cmake | 30 +++------------ ports/shaderc/CONTROL | 2 +- ports/shaderc/portfile.cmake | 43 ++++++--------------- ports/spirv-tools/CONTROL | 2 +- ports/spirv-tools/portfile.cmake | 80 ++++++++++++---------------------------- 6 files changed, 43 insertions(+), 116 deletions(-) diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL index ac6e6810b..ad11f7d81 100644 --- a/ports/glslang/CONTROL +++ b/ports/glslang/CONTROL @@ -1,3 +1,3 @@ Source: glslang -Version: 1c573fbcfba6b3d631008b1babc838501ca925d3-2 +Version: 3a21c880500eac21cdf79bef5b80f970a55ac6af Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake index 8dabcb390..e663d768d 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/glslang - REF 1c573fbcfba6b3d631008b1babc838501ca925d3 - SHA512 4f04dc39d9a70959ded1f4fe05ca5c7b0413c05bc3f049c11b5be7c8e1a70675f4221c9d8c712e7695f30eadb9bd7d0f1e71f431a6c9d4fea2cd2abbc73bd49a + REF 3a21c880500eac21cdf79bef5b80f970a55ac6af + SHA512 a6b2f589d432015d3830027dee377350529bec9c339a8de24aa52bab5ca52b3e17e2163d3bd1a7d91f7a08c446ebfe86d64bbbbae5a23af831d2e0cb724f7418 HEAD_REF master ) @@ -19,29 +19,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(COPY "${SOURCE_PATH}/glslang/Public" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang) -file(COPY "${SOURCE_PATH}/glslang/Include" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang) -file(COPY "${SOURCE_PATH}/glslang/MachineIndependent/Versions.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang/MachineIndependent) -file(COPY "${SOURCE_PATH}/SPIRV/Logger.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV) -file(COPY "${SOURCE_PATH}/SPIRV/spirv.hpp" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV) -file(COPY "${SOURCE_PATH}/SPIRV/GlslangToSpv.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/SPIRV) -file(COPY "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe" DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe") -file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/glslangValidator.exe") -file(COPY "${CURRENT_PACKAGES_DIR}/bin/spirv-remap.exe" DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/spirv-remap.exe") -file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/spirv-remap.exe") - -file(GLOB BIN_DIR "${CURRENT_PACKAGES_DIR}/bin/*") -list(LENGTH BIN_DIR BIN_DIR_SIZE) -if(${BIN_DIR_SIZE} EQUAL 0) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") -endif() -file(GLOB DEBUG_BIN_DIR "${CURRENT_PACKAGES_DIR}/debug/bin/*") -list(LENGTH DEBUG_BIN_DIR DEBUG_BIN_DIR_SIZE) -if(${DEBUG_BIN_DIR_SIZE} EQUAL 0) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") -endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") # Handle copyright file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/glslang) diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL index d9fe76beb..3bc872a10 100644 --- a/ports/shaderc/CONTROL +++ b/ports/shaderc/CONTROL @@ -1,4 +1,4 @@ Source: shaderc -Version: 2df47b51d83ad83cbc2e7f8ff2b56776293e8958-1 +Version: 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da Description: A collection of tools, libraries and tests for shader compilation. Build-Depends: glslang, spirv-tools diff --git a/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake index eb17aa827..2b925455b 100644 --- a/ports/shaderc/portfile.cmake +++ b/ports/shaderc/portfile.cmake @@ -7,35 +7,19 @@ # include(vcpkg_common_functions) -find_program(GIT git) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/shaderc + REF 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da + SHA512 6fb45a0b01e6709c44a11658648b9271fe06bd94023dcc5042c47b5f2a04889c2efb0ab4c166f18728594ac9b9aa9f8b354af46d88eb7f7c39c7246f52f5a933 + HEAD_REF master +) -set(SHADERC_GIT_URL "https://github.com/google/shaderc.git") -set(SHADERC_GIT_REF "2df47b51d83ad83cbc2e7f8ff2b56776293e8958") -if(NOT EXISTS "${DOWNLOADS}/shaderc.git") - message(STATUS "Cloning") - vcpkg_execute_required_process( - COMMAND ${GIT} clone --bare ${SHADERC_GIT_URL} ${DOWNLOADS}/shaderc.git - WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME clone - ) -endif() -if(NOT EXISTS "${SOURCE_PATH}/.git") - message(STATUS "Adding worktree and patching") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) - vcpkg_execute_required_process( - COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${SHADERC_GIT_REF} - WORKING_DIRECTORY ${DOWNLOADS}/shaderc.git - LOGNAME worktree - ) - message(STATUS "Patching") - vcpkg_execute_required_process( - COMMAND ${GIT} apply ${CMAKE_CURRENT_LIST_DIR}/0001-Do-not-generate-build-version.inc.patch --ignore-whitespace --whitespace=fix - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME patch - ) -endif() +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Do-not-generate-build-version.inc.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) @@ -69,10 +53,7 @@ file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) #Safe to remove as libs are static file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) - - -file(WRITE ${CURRENT_PACKAGES_DIR}/include/shaderc.txt) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shaderc) diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL index eacc40ff9..4f1ce502f 100644 --- a/ports/spirv-tools/CONTROL +++ b/ports/spirv-tools/CONTROL @@ -1,3 +1,3 @@ Source: spirv-tools -Version: 1.1-f72189c249ba143c6a89a4cf1e7d53337b2ddd40 +Version: v2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23 Description: API and commands for processing SPIR-V modules diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake index c9bb5f85f..08e35b7d3 100644 --- a/ports/spirv-tools/portfile.cmake +++ b/ports/spirv-tools/portfile.cmake @@ -1,68 +1,34 @@ -# 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) -find_program(GIT git) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) - -set(GIT_URL "https://github.com/KhronosGroup/SPIRV-Tools.git") -set(GIT_REF "f72189c249ba143c6a89a4cf1e7d53337b2ddd40") - -if(NOT EXISTS "${DOWNLOADS}/spirv-tools.git") - message(STATUS "Cloning") - vcpkg_execute_required_process( - COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/spirv-tools.git - WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME clone - ) -endif() -if(NOT EXISTS "${SOURCE_PATH}/.git") - message(STATUS "Adding worktree and patching") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) - vcpkg_execute_required_process( - COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH} ${GIT_REF} - WORKING_DIRECTORY ${DOWNLOADS}/spirv-tools.git - LOGNAME worktree - ) - message(STATUS "Patching") +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "Dynamic not supported. Building static") + set(VCPKG_LIBRARY_LINKAGE "static") endif() -set(SPIRVHEADERS_GIT_URL "https://github.com/KhronosGroup/SPIRV-Headers.git") -set(SPIRVHEADERS_GIT_REF "bd47a9abaefac00be692eae677daed1b977e625c") - -if(NOT EXISTS "${DOWNLOADS}/SPIRV-Headers.git") - message(STATUS "Cloning") - vcpkg_execute_required_process( - COMMAND ${GIT} clone --bare ${SPIRVHEADERS_GIT_URL} ${DOWNLOADS}/SPIRV-Headers.git - WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME clone - ) -endif() +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/SPIRV-Tools + REF 7e2d26c77b606b21af839b37fd21381c4a669f23 + SHA512 67e8fcdcb9748df1e7c86bb50358a89b656f80a96534bc5771afc4ce22e9ebcc8ca382f784fab7b856324d487f810c21abaaab2facee7453c0343a9b51d7e60b + HEAD_REF master +) -if(NOT EXISTS "${SOURCE_PATH}/external/spirv-headers/.git") - message(STATUS "Adding worktree and patching") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) - vcpkg_execute_required_process( - COMMAND ${GIT} worktree add -f --detach ${SOURCE_PATH}/external/spirv-headers ${SPIRVHEADERS_GIT_REF} - WORKING_DIRECTORY ${DOWNLOADS}/SPIRV-Headers.git - LOGNAME worktree - ) -endif() +vcpkg_from_github( + OUT_SOURCE_PATH SPIRV_HEADERS_PATH + REPO KhronosGroup/SPIRV-Headers + REF 2bb92e6fe2c6aa410152fc6c63443f452acb1a65 + SHA512 cdd1437a67c7e31e2062e5d0f25c767b99a3fadd64b91d00c3b07404e535bb4bfd78a43878ebbcd45e013a7153f1a2c969da99d50a99cc39efab940d0aab7cfd + HEAD_REF master +) -set(VCPKG_LIBRARY_LINKAGE "static") +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") vcpkg_configure_cmake( - SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src" - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DSPIRV-Headers_SOURCE_DIR=${SPIRV_HEADERS_PATH} ) vcpkg_install_cmake() -- cgit v1.2.3 From 46db0f03fcb42d9f738474885fda372160362e44 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 5 Sep 2017 15:31:36 -0700 Subject: disable vtk and cuda by default --- ports/opencv/CONTROL | 3 ++- ports/opencv/portfile.cmake | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 91efce30a..cb2762227 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,4 +1,5 @@ Source: opencv Version: 3.3.0 -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, vtk, protobuf, ceres, ffmpeg +# Optional: Add in vtk to build with VTK and cuda to build with CUDA +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf, ceres, ffmpeg Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 989a43608..ade8560a5 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -56,6 +56,7 @@ vcpkg_configure_cmake( -DOPENCV_CONFIG_INSTALL_PATH=share/opencv -DOPENCV_OTHER_INSTALL_PATH=share/opencv -DINSTALL_LICENSE=OFF + # Optional: change to ON to build with CUDA -DWITH_CUDA=OFF -DWITH_CUBLAS=OFF -DWITH_OPENCLAMDBLAS=OFF @@ -65,6 +66,8 @@ vcpkg_configure_cmake( -DBUILD_PROTOBUF=OFF -DUPDATE_PROTO_FILES=ON -DPROTOBUF_UPDATE_FILES=ON + # Optional: change to ON to build with VTK + -DWITH_VTK=OFF OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -DINSTALL_OTHER=OFF -- cgit v1.2.3 From cd8c8af8e85e2b077090c42f3ea9554d9f626023 Mon Sep 17 00:00:00 2001 From: Raynor Vliegendhart Date: Wed, 6 Sep 2017 07:54:32 +0200 Subject: [qt5] Do not link all .lib files This commit moves a few .lib files to subfolders to prevent them from automatically getting linked: Qt5Bootstrap (dbg): This lib is linked against a release version of the CRT and is only meant for release builds. For debug builds, this lib should not be linked at all. qtmain (rel), qtmaind (dbg), Qt5AxServer (rel), Qt5AxServerd (dbg): These libs are mutually exclusive. The user either links against qtmain(d) for desktop applications or against Qt5AxServer(d) for ActiveX servers. See https://github.com/Microsoft/vcpkg/issues/1442 for more information. --- ports/qt5/portfile.cmake | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake index 33709c528..4b852e95c 100644 --- a/ports/qt5/portfile.cmake +++ b/ports/qt5/portfile.cmake @@ -89,6 +89,55 @@ vcpkg_execute_required_process( vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +#--------------------------------------------------------------------------- +# Qt5Bootstrap: a release-only dependency +#--------------------------------------------------------------------------- +# Remove release-only Qt5Bootstrap.lib from debug folders: +#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) +#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) +# Above approach does not work: +# check_matching_debug_and_release_binaries(dbg_libs, rel_libs) +# requires the two sets to be of equal size! +# Alt. approach, create dummy folder instead: +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) +#--------------------------------------------------------------------------- + +#--------------------------------------------------------------------------- +# qtmain(d) vs. Qt5AxServer(d) +#--------------------------------------------------------------------------- +# Qt applications have to either link to qtmain(d) or to Qt5AxServer(d), +# never both. See http://doc.qt.io/qt-5/activeqt-server.html for more info. +# +# Create manual-link folders: +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +# +# Either have users explicitly link against qtmain.lib, qtmaind.lib: +file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl) +# +# ... or have users explicitly link against Qt5AxServer.lib, Qt5AxServerd.lib: +file(COPY ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.prl) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.prl) +#--------------------------------------------------------------------------- + file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5 RENAME copyright) if(EXISTS ${CURRENT_PACKAGES_DIR}/plugins) file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins) -- cgit v1.2.3 From 304a1561cb1763bec87ac5b8bf4ac67c00680e6f Mon Sep 17 00:00:00 2001 From: Raynor Vliegendhart Date: Wed, 6 Sep 2017 08:03:45 +0200 Subject: [qt5] Bump version to reflect change in which .libs are linked --- ports/qt5/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index 01c7a3a19..704bc9ca5 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 -Version: 5.8-4 +Version: 5.8-5 Description: Qt5 application framework main components. Webengine, examples and tests not included. Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre, harfbuzz, sqlite3, libpq, double-conversion -- cgit v1.2.3 From bafe4f2fe071503458b4f7c2bf1c645420dbc6ff Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 6 Sep 2017 10:33:51 -0700 Subject: an empty delimiter causes the split function to fail --- toolsrc/src/vcpkg_Strings.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 15851829d..5ad951399 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -136,6 +136,11 @@ namespace vcpkg::Strings std::vector split(const std::string& s, const std::string& delimiter) { std::vector output; + + if(delimiter.empty()){ + output.push_back(s); + return output; + } size_t i = 0; for (size_t pos = s.find(delimiter); pos != std::string::npos; pos = s.find(delimiter, pos)) -- cgit v1.2.3 From 1253ad0c6219a49d5012c6b23998adacecbd9a2c Mon Sep 17 00:00:00 2001 From: Alisa yang Date: Fri, 1 Sep 2017 06:51:27 +0000 Subject: [openblas] Add patch for whitespace --- ports/openblas/whitespace.patch | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ports/openblas/whitespace.patch diff --git a/ports/openblas/whitespace.patch b/ports/openblas/whitespace.patch new file mode 100644 index 000000000..4520fabe5 --- /dev/null +++ b/ports/openblas/whitespace.patch @@ -0,0 +1,31 @@ +diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake +index 02ab708..b51bd0b 100644 +--- a/cmake/prebuild.cmake ++++ b/cmake/prebuild.cmake +@@ -87,7 +87,7 @@ file(MAKE_DIRECTORY ${GETARCH_DIR}) + if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") + try_compile(GETARCH_RESULT ${GETARCH_DIR} + SOURCES ${GETARCH_SRC} +- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I${PROJECT_SOURCE_DIR} ++ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I"${PROJECT_SOURCE_DIR}" + OUTPUT_VARIABLE GETARCH_LOG + COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH_BIN} + ) +@@ -114,7 +114,7 @@ file(MAKE_DIRECTORY ${GETARCH2_DIR}) + if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") + try_compile(GETARCH2_RESULT ${GETARCH2_DIR} + SOURCES ${PROJECT_SOURCE_DIR}/getarch_2nd.c +- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I${PROJECT_SOURCE_DIR} ++ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I"${PROJECT_SOURCE_DIR}" + OUTPUT_VARIABLE GETARCH2_LOG + COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} + ) +@@ -141,7 +141,7 @@ file(MAKE_DIRECTORY ${GEN_CONFIG_H_DIR}) + if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") + try_compile(GEN_CONFIG_H_RESULT ${GEN_CONFIG_H_DIR} + SOURCES ${PROJECT_SOURCE_DIR}/gen_config_h.c +- COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GEN_CONFIG_H_FLAGS} -I${PROJECT_SOURCE_DIR} ++ COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GEN_CONFIG_H_FLAGS} -I"${PROJECT_SOURCE_DIR}" + OUTPUT_VARIABLE GEN_CONFIG_H_LOG + COPY_FILE ${PROJECT_BINARY_DIR}/${GEN_CONFIG_H_BIN} + ) -- cgit v1.2.3 From d440c5863f36a99f628073914581d2820a18079e Mon Sep 17 00:00:00 2001 From: Alisa yang Date: Wed, 6 Sep 2017 15:57:13 -0700 Subject: [openblas] Have the portfile apply the new patch --- ports/openblas/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index c437a8642..ca9a56cc9 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -31,7 +31,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/install-openblas.patch" + PATCHES "${CMAKE_CURRENT_LIST_DIR}/install-openblas.patch" "${CMAKE_CURRENT_LIST_DIR}/whitespace.patch" ) find_program(GIT NAMES git git.cmd) -- cgit v1.2.3 From cdff7ada17828cd68f21a2180b45c8ea2e885877 Mon Sep 17 00:00:00 2001 From: Alisa yang Date: Wed, 6 Sep 2017 15:58:36 -0700 Subject: [openblas] Bump version --- ports/openblas/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/openblas/CONTROL b/ports/openblas/CONTROL index a3a3f702f..7651436c1 100644 --- a/ports/openblas/CONTROL +++ b/ports/openblas/CONTROL @@ -1,3 +1,3 @@ Source: openblas -Version: v0.2.20 +Version: v0.2.20-1 Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. -- cgit v1.2.3 From 93ab504488eed81e62dd0080b993c5b7dcb49f4a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 6 Sep 2017 17:49:33 -0700 Subject: Revert "[vcpkg] allow underscores in package name" This reverts commit aef3577672b469ed915a7b0680d5e1ccf36347ed. --- toolsrc/src/PackageSpec.cpp | 2 +- toolsrc/src/PackageSpecParseResult.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/PackageSpec.cpp b/toolsrc/src/PackageSpec.cpp index 2baf3181b..890de8899 100644 --- a/toolsrc/src/PackageSpec.cpp +++ b/toolsrc/src/PackageSpec.cpp @@ -10,7 +10,7 @@ namespace vcpkg { static bool is_valid_package_spec_char(char c) { - return (c == '-') || (c == '_') || isdigit(c) || (isalpha(c) && islower(c)) || (c == '[') || (c == ']'); + return (c == '-') || isdigit(c) || (isalpha(c) && islower(c)) || (c == '[') || (c == ']'); } std::string FeatureSpec::to_string() const diff --git a/toolsrc/src/PackageSpecParseResult.cpp b/toolsrc/src/PackageSpecParseResult.cpp index 34398cff9..838c788ba 100644 --- a/toolsrc/src/PackageSpecParseResult.cpp +++ b/toolsrc/src/PackageSpecParseResult.cpp @@ -12,8 +12,8 @@ namespace vcpkg case PackageSpecParseResult::SUCCESS: return "OK"; case PackageSpecParseResult::TOO_MANY_COLONS: return "Too many colons"; case PackageSpecParseResult::INVALID_CHARACTERS: - return "Contains invalid characters. Only alphanumeric lowercase ASCII characters, dashes and" - "underscores are allowed"; + return "Contains invalid characters. Only alphanumeric lowercase ASCII characters and dashes are " + "allowed"; default: Checks::unreachable(VCPKG_LINE_INFO); } } -- cgit v1.2.3 From cc89fc78031073f697228aa3069410a5e1b51d7d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 6 Sep 2017 17:51:10 -0700 Subject: [urdfdom-headers] [console-bridge] Rename to remove underscores --- ports/console-bridge/CONTROL | 3 +++ ports/console-bridge/License.txt | 31 +++++++++++++++++++++++++++++++ ports/console-bridge/portfile.cmake | 23 +++++++++++++++++++++++ ports/console_bridge/CONTROL | 3 --- ports/console_bridge/License.txt | 31 ------------------------------- ports/console_bridge/portfile.cmake | 23 ----------------------- ports/urdfdom-headers/CONTROL | 3 +++ ports/urdfdom-headers/portfile.cmake | 22 ++++++++++++++++++++++ ports/urdfdom_headers/CONTROL | 3 --- ports/urdfdom_headers/portfile.cmake | 22 ---------------------- 10 files changed, 82 insertions(+), 82 deletions(-) create mode 100644 ports/console-bridge/CONTROL create mode 100644 ports/console-bridge/License.txt create mode 100644 ports/console-bridge/portfile.cmake delete mode 100644 ports/console_bridge/CONTROL delete mode 100644 ports/console_bridge/License.txt delete mode 100644 ports/console_bridge/portfile.cmake create mode 100644 ports/urdfdom-headers/CONTROL create mode 100644 ports/urdfdom-headers/portfile.cmake delete mode 100644 ports/urdfdom_headers/CONTROL delete mode 100644 ports/urdfdom_headers/portfile.cmake diff --git a/ports/console-bridge/CONTROL b/ports/console-bridge/CONTROL new file mode 100644 index 000000000..1f4ba275c --- /dev/null +++ b/ports/console-bridge/CONTROL @@ -0,0 +1,3 @@ +Source: console-bridge +Version: 0.3.2-1 +Description: a ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages. diff --git a/ports/console-bridge/License.txt b/ports/console-bridge/License.txt new file mode 100644 index 000000000..affcb8568 --- /dev/null +++ b/ports/console-bridge/License.txt @@ -0,0 +1,31 @@ +Software License Agreement (BSD License) + +Copyright (c) 2008, Willow Garage, 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: + +* 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. +* Neither the name of the Willow Garage 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 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. \ No newline at end of file diff --git a/ports/console-bridge/portfile.cmake b/ports/console-bridge/portfile.cmake new file mode 100644 index 000000000..ca5502aa9 --- /dev/null +++ b/ports/console-bridge/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ros/console_bridge + REF 0.3.2 + SHA512 41fa5340d7ba79c887ef73eb4fda7b438ed91febd224934ae4658697e4c9e43357207e1b3e191ecce3c97cb9a87b0556372832735a268261bc798cc7683aa207 + HEAD_REF master + ) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/console_bridge RENAME copyright) diff --git a/ports/console_bridge/CONTROL b/ports/console_bridge/CONTROL deleted file mode 100644 index aa6fe0882..000000000 --- a/ports/console_bridge/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: console_bridge -Version: 0.3.2-1 -Description: a ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages. diff --git a/ports/console_bridge/License.txt b/ports/console_bridge/License.txt deleted file mode 100644 index affcb8568..000000000 --- a/ports/console_bridge/License.txt +++ /dev/null @@ -1,31 +0,0 @@ -Software License Agreement (BSD License) - -Copyright (c) 2008, Willow Garage, 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: - -* 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. -* Neither the name of the Willow Garage 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 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. \ No newline at end of file diff --git a/ports/console_bridge/portfile.cmake b/ports/console_bridge/portfile.cmake deleted file mode 100644 index ca5502aa9..000000000 --- a/ports/console_bridge/portfile.cmake +++ /dev/null @@ -1,23 +0,0 @@ -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO ros/console_bridge - REF 0.3.2 - SHA512 41fa5340d7ba79c887ef73eb4fda7b438ed91febd224934ae4658697e4c9e43357207e1b3e191ecce3c97cb9a87b0556372832735a268261bc798cc7683aa207 - HEAD_REF master - ) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) - -vcpkg_install_cmake() -vcpkg_copy_pdbs() - -vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/console_bridge RENAME copyright) diff --git a/ports/urdfdom-headers/CONTROL b/ports/urdfdom-headers/CONTROL new file mode 100644 index 000000000..9c69bf975 --- /dev/null +++ b/ports/urdfdom-headers/CONTROL @@ -0,0 +1,3 @@ +Source: urdfdom-headers +Version: 1.0.0-1 +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 new file mode 100644 index 000000000..495328627 --- /dev/null +++ b/ports/urdfdom-headers/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ros/urdfdom_headers + REF 1.0.0 + SHA512 b1f63c1a13f062c987d6be4fcea5eea903577a710d44fdce077722b70d72eb65a265131beac1fdeba576bde189ebf51ac0eb19b2b06a34b0f9fb9dcbd437291a + HEAD_REF master + ) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/urdfdom_headers RENAME copyright) diff --git a/ports/urdfdom_headers/CONTROL b/ports/urdfdom_headers/CONTROL deleted file mode 100644 index a389d162c..000000000 --- a/ports/urdfdom_headers/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: urdfdom_headers -Version: 1.0.0-1 -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 deleted file mode 100644 index 495328627..000000000 --- a/ports/urdfdom_headers/portfile.cmake +++ /dev/null @@ -1,22 +0,0 @@ -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO ros/urdfdom_headers - REF 1.0.0 - SHA512 b1f63c1a13f062c987d6be4fcea5eea903577a710d44fdce077722b70d72eb65a265131beac1fdeba576bde189ebf51ac0eb19b2b06a34b0f9fb9dcbd437291a - HEAD_REF master - ) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/) - -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/urdfdom_headers RENAME copyright) -- cgit v1.2.3 From cd76396de38f80245f101f04549be3658822a7a6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 6 Sep 2017 18:02:18 -0700 Subject: [console-bridge] [urdfdom-headers] Move copyright location --- ports/console-bridge/portfile.cmake | 2 +- ports/urdfdom-headers/portfile.cmake | 2 +- ports/urdfdom/CONTROL | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/console-bridge/portfile.cmake b/ports/console-bridge/portfile.cmake index ca5502aa9..2e5b0872f 100644 --- a/ports/console-bridge/portfile.cmake +++ b/ports/console-bridge/portfile.cmake @@ -20,4 +20,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/console_bridge RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/console-bridge RENAME copyright) diff --git a/ports/urdfdom-headers/portfile.cmake b/ports/urdfdom-headers/portfile.cmake index 495328627..02a02d226 100644 --- a/ports/urdfdom-headers/portfile.cmake +++ b/ports/urdfdom-headers/portfile.cmake @@ -19,4 +19,4 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/urdfdom_headers RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers RENAME copyright) diff --git a/ports/urdfdom/CONTROL b/ports/urdfdom/CONTROL index 76e8b86a5..69e53f215 100644 --- a/ports/urdfdom/CONTROL +++ b/ports/urdfdom/CONTROL @@ -1,4 +1,4 @@ Source: urdfdom Version: 1.0.0-1 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 \ No newline at end of file +Build-Depends: console-bridge, tinyxml, urdfdom-headers \ No newline at end of file -- cgit v1.2.3 From 3413115a835e48f001fc39257815fdf0b40c6164 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 6 Sep 2017 18:25:42 -0700 Subject: [openblas] Use vcpkg_from_github() --- ports/openblas/portfile.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/openblas/portfile.cmake b/ports/openblas/portfile.cmake index ca9a56cc9..463db0f25 100644 --- a/ports/openblas/portfile.cmake +++ b/ports/openblas/portfile.cmake @@ -21,13 +21,13 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(VCPKG_LIBRARY_LINKAGE "dynamic") endif() -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openblas-0.2.20) -vcpkg_download_distfile(ARCHIVE - URLS "https://codeload.github.com/xianyi/OpenBLAS/zip/v0.2.20" - FILENAME "openblas-v0.2.20.zip" - SHA512 c9cd7397bb026e3bb06c9407ad5ac26bf936258da81ac22132ceceb53c0235677e18a6046f1db8a75c8a92a614b2d156a3da89d684421a24bd283430ce55db7d +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xianyi/OpenBLAS + REF v0.2.20 + SHA512 8dfc8e8c8d456b834d2e9544c8eadd9f4770e30db8b8dd76af601ec0735fd86c9cf63dd6a03ccd23fc02ec2e05069a09875b9073dfe29f99aadab3a958ae2634 + HEAD_REF develop ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 79838d1346ca019e0e49d7683aeec67f9559c3eb Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 7 Sep 2017 09:39:12 +0200 Subject: [ACE] 6.4.5 --- ports/ace/CONTROL | 2 +- ports/ace/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/ace/CONTROL b/ports/ace/CONTROL index e32e827b3..80af89d8a 100644 --- a/ports/ace/CONTROL +++ b/ports/ace/CONTROL @@ -1,3 +1,3 @@ Source: ace -Version: 6.4.4 +Version: 6.4.5 Description: The ADAPTIVE Communication Environment diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake index 6763cc370..fece3ebcc 100644 --- a/ports/ace/portfile.cmake +++ b/ports/ace/portfile.cmake @@ -5,9 +5,9 @@ endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ACE_wrappers/ace) vcpkg_download_distfile(ARCHIVE - URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.4.zip" - FILENAME "ACE-6.4.4.zip" - SHA512 82628a73b736a14b3ee33fb859e26370ffd7df88bda4890fe490736160d3ce393f7e61183cd8cd7a91a83bc31c4bd263aa887168543f9f89fde080dc3650a4ed + URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.5.zip" + FILENAME "ACE-6.4.5.zip" + SHA512 cce1681fc35efdefb8b88a49b743ffcaecfe8f146dcf6c78393aed29c8853e77b062bced4a2fb457eba74bf5834511611cc40da2320c6094793cb8c2b6df3d2a ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 4691924354ee34dd91d6d9291702e9676f9dda74 Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 7 Sep 2017 20:21:52 +0200 Subject: [libuv] update to 1.14.1 --- ports/libuv/CONTROL | 2 +- ports/libuv/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index 61f5711d1..034dd4f94 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.14.0 +Version: 1.14.1 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. \ No newline at end of file diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index a75385132..2e07ff607 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.14.0 - SHA512 a838f2e97250a78861b72458d9278935d9e8151d69de21de19499dfe9d7304d65ce578c007356b75cd4ce2c17735292d93cdb2fcc206d4e2430ee3f9a2fc7222 + REF v1.14.1 + SHA512 de78909e92757ce024a48d5a12a1aedd8015d7135cee374965dc38c07c29352ea411a31921910653728b3f73aca0275382cbf2130144da65e50a472b17849ade HEAD_REF v1.x) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From b7251606f02e36f543c0cd66dcacb371073ecf5b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 7 Sep 2017 11:42:01 -0700 Subject: [openblas] Move whitespace fixes to the whistespace.patch --- ports/openblas/install-openblas.patch | 37 ----------------------------------- ports/openblas/whitespace.patch | 33 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 37 deletions(-) diff --git a/ports/openblas/install-openblas.patch b/ports/openblas/install-openblas.patch index 354b593dc..ef9574cdd 100644 --- a/ports/openblas/install-openblas.patch +++ b/ports/openblas/install-openblas.patch @@ -22,40 +22,3 @@ index a379f549..f95a872b 100644 # TODO: Why is the config saved here? Is this necessary with CMake? #Save the config files for installation -diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake -index a7f98bfb..02ab7080 100644 ---- a/cmake/prebuild.cmake -+++ b/cmake/prebuild.cmake -@@ -37,6 +37,10 @@ - - # CPUIDEMU = ../../cpuid/table.o - -+if (NOT DEFINED BLASHELPER_BINARY_DIR) -+ set(BLASHELPER_BINARY_DIR "${PROJECT_BINARY_DIR}") -+endif () -+ - if (DEFINED CPUIDEMU) - set(EXFLAGS "-DCPUIDEMU -DVENDOR=99") - endif () -@@ -95,8 +99,8 @@ endif () - message(STATUS "Running getarch") - - # use the cmake binary w/ the -E param to run a shell command in a cross-platform way --execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT) --execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT) -+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT) -+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT) - - message(STATUS "GETARCH results:\n${GETARCH_MAKE_OUT}") - -@@ -121,8 +125,8 @@ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") - endif () - - # use the cmake binary w/ the -E param to run a shell command in a cross-platform way --execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT) --execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT) -+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT) -+execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT) - - # append config data from getarch_2nd to the TARGET file and read in CMake vars - file(APPEND ${TARGET_CONF} ${GETARCH2_CONF_OUT}) diff --git a/ports/openblas/whitespace.patch b/ports/openblas/whitespace.patch index 4520fabe5..410e81655 100644 --- a/ports/openblas/whitespace.patch +++ b/ports/openblas/whitespace.patch @@ -2,6 +2,17 @@ diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake index 02ab708..b51bd0b 100644 --- a/cmake/prebuild.cmake +++ b/cmake/prebuild.cmake +@@ -37,6 +37,10 @@ + + # CPUIDEMU = ../../cpuid/table.o + ++if (NOT DEFINED BLASHELPER_BINARY_DIR) ++ set(BLASHELPER_BINARY_DIR "${PROJECT_BINARY_DIR}") ++endif () ++ + if (DEFINED CPUIDEMU) + set(EXFLAGS "-DCPUIDEMU -DVENDOR=99") + endif () @@ -87,7 +87,7 @@ file(MAKE_DIRECTORY ${GETARCH_DIR}) if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") try_compile(GETARCH_RESULT ${GETARCH_DIR} @@ -11,6 +22,17 @@ index 02ab708..b51bd0b 100644 OUTPUT_VARIABLE GETARCH_LOG COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH_BIN} ) +@@ -95,8 +99,8 @@ endif () + message(STATUS "Running getarch") + + # use the cmake binary w/ the -E param to run a shell command in a cross-platform way +-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT) +-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT) ++execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT) ++execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH_BIN} 1 OUTPUT_VARIABLE GETARCH_CONF_OUT) + + message(STATUS "GETARCH results:\n${GETARCH_MAKE_OUT}") + @@ -114,7 +114,7 @@ file(MAKE_DIRECTORY ${GETARCH2_DIR}) if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") try_compile(GETARCH2_RESULT ${GETARCH2_DIR} @@ -20,6 +42,17 @@ index 02ab708..b51bd0b 100644 OUTPUT_VARIABLE GETARCH2_LOG COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} ) +@@ -121,8 +125,8 @@ if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") + endif () + + # use the cmake binary w/ the -E param to run a shell command in a cross-platform way +-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT) +-execute_process(COMMAND ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT) ++execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT) ++execute_process(COMMAND ${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN} 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT) + + # append config data from getarch_2nd to the TARGET file and read in CMake vars + file(APPEND ${TARGET_CONF} ${GETARCH2_CONF_OUT}) @@ -141,7 +141,7 @@ file(MAKE_DIRECTORY ${GEN_CONFIG_H_DIR}) if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") try_compile(GEN_CONFIG_H_RESULT ${GEN_CONFIG_H_DIR} -- cgit v1.2.3 From 92e30b10ec5fee6ba86ba766ce0d1685e642e0f1 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Thu, 7 Sep 2017 14:52:59 +0300 Subject: [protobuf] Fix problem with define PROTOBUF_USE_DLLS --- ports/protobuf/CONTROL | 2 +- ports/protobuf/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 192b57f96..83b672b3f 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,4 +1,4 @@ Source: protobuf -Version: 3.3.0-3 +Version: 3.4.0 Build-Depends: zlib Description: Protocol Buffers - Google's data interchange format \ No newline at end of file diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 83f9e1e1d..84e2c9b65 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -92,12 +92,12 @@ else() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe) endif() -foreach(FILE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/arena.h ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/port.h) +foreach(FILE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h) file(READ ${FILE} _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - string(REPLACE "defined(PROTOBUF_USE_DLLS)" "1" _contents "${_contents}") + string(REPLACE "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" "\#define PROTOBUF_USE_DLLS 1\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" _contents "${_contents}") else() - string(REPLACE "defined(PROTOBUF_USE_DLLS)" "0" _contents "${_contents}") + string(REPLACE "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" "\#define PROTOBUF_USE_DLLS 0\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" _contents "${_contents}") endif() file(WRITE ${FILE} "${_contents}") endforeach() -- cgit v1.2.3 From 1a178574df7aaa8fbd84f11da175d23a7d68c287 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Thu, 7 Sep 2017 14:53:36 +0300 Subject: [c-ares] Update version to 1.13.0 --- ports/c-ares/CONTROL | 2 +- ports/c-ares/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/c-ares/CONTROL b/ports/c-ares/CONTROL index db04bd3fa..97da33665 100644 --- a/ports/c-ares/CONTROL +++ b/ports/c-ares/CONTROL @@ -1,4 +1,4 @@ Source: c-ares -Version: 1.12.1-dev-40eb41f-1 +Version: 1.13.0 Description: A C library for asynchronous DNS requests Build-Depends: \ No newline at end of file diff --git a/ports/c-ares/portfile.cmake b/ports/c-ares/portfile.cmake index 86c4ba442..d78878857 100644 --- a/ports/c-ares/portfile.cmake +++ b/ports/c-ares/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO c-ares/c-ares - REF 40eb41f522eb9a86f9397352f10d1e63c89f2c54 - SHA512 901d7da97098f79d13ae8d72c85936bd15fbd6b65399c247462ad5367ac85ff32c90325998c21364f959e1bde2c8b7dbc9d9d7524ea34e6bc48dfb3854c199e1 + REF cares-1_13_0 + SHA512 0ee8a45772c64701d0e860cd84925cef8938a319b3004e02e86af900cbd9e07609940bc474a46bf4252b9b7e3815e1951de8f0eb16718074ec1d39c2105a2abe HEAD_REF master ) -- cgit v1.2.3 From cccbdacc47a27d103fe250a05de5f14ec5fa5161 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Thu, 7 Sep 2017 14:56:04 +0300 Subject: [grpc] Update version to 1.6.0 --- ports/grpc/CONTROL | 2 +- ports/grpc/disable-csharp-ext.patch | 22 ++++++++++------------ ports/grpc/portfile.cmake | 15 +++++++++++---- ports/grpc/revert-c019e05.patch | 18 ------------------ 4 files changed, 22 insertions(+), 35 deletions(-) delete mode 100644 ports/grpc/revert-c019e05.patch diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index d9654cddf..dca18735f 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.4.1 +Version: 1.6.0 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework \ No newline at end of file diff --git a/ports/grpc/disable-csharp-ext.patch b/ports/grpc/disable-csharp-ext.patch index 6cb9090ab..3b887c8b4 100644 --- a/ports/grpc/disable-csharp-ext.patch +++ b/ports/grpc/disable-csharp-ext.patch @@ -1,31 +1,29 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c85a20a..99b2897 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -3694,6 +3694,7 @@ target_link_libraries(qps +--- a/CMakeLists.txt Tue Aug 29 22:24:15 2017 ++++ b/CMakeLists.txt Mon Sep 04 00:43:56 2017 +@@ -4574,6 +4574,8 @@ endif (gRPC_BUILD_TESTS) +option(gRPC_INSTALL_CSHARP_EXT "" ON) ++ add_library(grpc_csharp_ext SHARED src/csharp/ext/grpc_csharp_ext.c ) -@@ -3702,7 +3703,7 @@ if(WIN32 AND MSVC) +@@ -4582,7 +4584,7 @@ set_target_properties(grpc_csharp_ext PROPERTIES COMPILE_PDB_NAME "grpc_csharp_ext" COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" ) - if (gRPC_INSTALL) + if (gRPC_INSTALL AND gRPC_INSTALL_CSHARP_EXT) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_csharp_ext.pdb - DESTINATION ${CMAKE_INSTALL_LIBDIR} OPTIONAL + DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL ) -@@ -3728,8 +3729,7 @@ target_link_libraries(grpc_csharp_ext - ) +@@ -4613,7 +4615,7 @@ + -- -if (gRPC_INSTALL) +if (gRPC_INSTALL AND gRPC_INSTALL_CSHARP_EXT) install(TARGETS grpc_csharp_ext EXPORT gRPCTargets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} + LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index e26c758d0..49d64b909 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -12,17 +12,24 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF v1.4.1 - SHA512 5028e4f881a41e4c4ddf770bd824d1d5de825f86d68dbbfab22e2a34ec0e46b27754b0f5b40cfc02b0d22a756b08056b100837b590745b5fdbdce9a803e59f8d + REF v1.6.0 + SHA512 70a68fecca43cfe8c94206fd39ad8f86e055eb2185ae8c90040cc35928f1102016775c66e83c3cc76690e44598764b215d884a206f8466d45b00e2c54593e682 HEAD_REF master ) +# fix from PR https://github.com/grpc/grpc/pull/12411 +vcpkg_download_distfile(CMAKE_ERROR_FIX_DIFF + URLS "https://github.com/grpc/grpc/commit/74c139a83987087f9e2d2e6b5d44c240d719061d.diff" + FILENAME "grpc-cmake-error-fix.diff" + SHA512 38cdff0e6db12276400cf4eec66aafdbfe34912a78a0604ced3b216d3a60e5b87464f9083fa5e5dfb4df1490ef10565cbe04d3f750f59c7e7e1a05334c0b528e +) + # Issue: https://github.com/grpc/grpc/issues/10759 vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/revert-c019e05.patch ${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext.patch + ${CMAKE_ERROR_FIX_DIFF} ) if(VCPKG_CRT_LINKAGE STREQUAL static) @@ -52,7 +59,7 @@ vcpkg_configure_cmake( set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/grpc") file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/grpc RENAME copyright) diff --git a/ports/grpc/revert-c019e05.patch b/ports/grpc/revert-c019e05.patch deleted file mode 100644 index afb5cfa71..000000000 --- a/ports/grpc/revert-c019e05.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b7555b1bc3..edbffea76c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -14204,6 +14204,13 @@ endif (gRPC_BUILD_TESTS) - - - -+if (gRPC_INSTALL) -+ install(EXPORT gRPCTargets -+ DESTINATION ${CMAKE_INSTALL_CMAKEDIR} -+ NAMESPACE gRPC:: -+ ) -+endif() -+ - foreach(_config gRPCConfig gRPCConfigVersion) - configure_file(tools/cmake/${_config}.cmake.in - ${_config}.cmake @ONLY) -- cgit v1.2.3 From 76f195dd85c9f3807849e92a89ca2290ab3c9645 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 7 Sep 2017 14:25:03 -0700 Subject: [console-bridge] [urdfdom-headers] Move copyright location. Move CMake config location --- ports/console-bridge/portfile.cmake | 1 + ports/urdfdom-headers/portfile.cmake | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ports/console-bridge/portfile.cmake b/ports/console-bridge/portfile.cmake index 2e5b0872f..d88308e5c 100644 --- a/ports/console-bridge/portfile.cmake +++ b/ports/console-bridge/portfile.cmake @@ -17,6 +17,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") +file(RENAME ${CURRENT_PACKAGES_DIR}/share/console-bridge ${CURRENT_PACKAGES_DIR}/share/console_bridge) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/urdfdom-headers/portfile.cmake b/ports/urdfdom-headers/portfile.cmake index 02a02d226..eb2c9020e 100644 --- a/ports/urdfdom-headers/portfile.cmake +++ b/ports/urdfdom-headers/portfile.cmake @@ -17,6 +17,9 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") +# The config files for this project use underscore +file(RENAME ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers ${CURRENT_PACKAGES_DIR}/share/urdfdom_headers) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers RENAME copyright) -- cgit v1.2.3 From d2de7d3e7d1a0bea3dba9a0a7f6cfff68ae513a0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 7 Sep 2017 16:16:30 -0700 Subject: [vcpkg_Build.h] Naming scheme, unneeded #include, unneeded inline --- toolsrc/include/vcpkg_Build.h | 7 +++---- toolsrc/src/commands_ci.cpp | 2 +- toolsrc/src/vcpkg_Build.cpp | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h index fc6f28e24..78e89d4de 100644 --- a/toolsrc/include/vcpkg_Build.h +++ b/toolsrc/include/vcpkg_Build.h @@ -9,7 +9,6 @@ #include #include -#include #include namespace vcpkg::Build @@ -56,7 +55,7 @@ namespace vcpkg::Build CASCADED_DUE_TO_MISSING_DEPENDENCIES }; - static constexpr std::array BuildResult_values = { + static constexpr std::array BUILD_RESULT_VALUES = { BuildResult::SUCCEEDED, BuildResult::BUILD_FAILED, BuildResult::POST_BUILD_CHECKS_FAILED, @@ -143,7 +142,7 @@ namespace vcpkg::Build COUNT, }; - constexpr std::array g_all_policies = { + constexpr std::array G_ALL_POLICIES = { BuildPolicy::EMPTY_PACKAGE, BuildPolicy::DLLS_WITHOUT_LIBS, BuildPolicy::ONLY_RELEASE_CRT, @@ -159,7 +158,7 @@ namespace vcpkg::Build BuildPolicies() = default; BuildPolicies(std::map&& map) : m_policies(std::move(map)) {} - inline bool is_enabled(BuildPolicy policy) const + bool is_enabled(BuildPolicy policy) const { const auto it = m_policies.find(policy); if (it != m_policies.cend()) return it->second; diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp index ca5e8a9a9..fda9f1716 100644 --- a/toolsrc/src/commands_ci.cpp +++ b/toolsrc/src/commands_ci.cpp @@ -77,7 +77,7 @@ namespace vcpkg::Commands::CI } std::map summary; - for (const BuildResult& v : Build::BuildResult_values) + for (const BuildResult& v : Build::BUILD_RESULT_VALUES) { summary[v] = 0; } diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index a2fa99ac8..d40140aca 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -289,7 +289,7 @@ namespace vcpkg::Build if (!version.empty()) build_info.version = std::move(version); std::map policies; - for (auto policy : g_all_policies) + for (auto policy : G_ALL_POLICIES) { const auto setting = parser.optional_field(to_string(policy)); if (setting.empty()) continue; -- cgit v1.2.3 From 5d82583cf9fa36c85e8770a082acacc9d1836e4d Mon Sep 17 00:00:00 2001 From: codicodi Date: Fri, 8 Sep 2017 16:16:07 +0200 Subject: [xxhash] update to 0.6.3 --- ports/xxhash/CONTROL | 2 +- ports/xxhash/portfile.cmake | 25 ++++++++++--------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/ports/xxhash/CONTROL b/ports/xxhash/CONTROL index 171a1b816..1228319b6 100644 --- a/ports/xxhash/CONTROL +++ b/ports/xxhash/CONTROL @@ -1,3 +1,3 @@ Source: xxhash -Version: 0.6.2 +Version: 0.6.3 Description: Extremely fast hash algorithm diff --git a/ports/xxhash/portfile.cmake b/ports/xxhash/portfile.cmake index e1b913a44..3330174b8 100644 --- a/ports/xxhash/portfile.cmake +++ b/ports/xxhash/portfile.cmake @@ -1,24 +1,15 @@ include(vcpkg_common_functions) -set(XXHASH_VERSION 0.6.2) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xxhash-${XXHASH_VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Cyan4973/xxHash/archive/v${XXHASH_VERSION}.zip" - FILENAME "xxhash-${XXHASH_VERSION}.zip" - SHA512 a2364421f46116a6e7f6bd686665fe4ee58670af6dad611ca626283c1b448fb1120ab3495903a5c8653d341ef22c0d244604edc20bf82a42734ffb4b871e2724) - -vcpkg_extract_source_archive(${ARCHIVE}) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(XXH_STATIC ON) -else() - set(XXH_STATIC OFF) -endif() +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Cyan4973/xxHash + REF v0.6.3 + SHA512 5b11009ecf142725c642be55e9072792709bd40d8674f30afdc13f9b9fd6936ea69e683c7b9df212b5126f9ba3925969fc0b65bb5518506b501bb339d3a29372 + HEAD_REF dev) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/cmake_unofficial PREFER_NINJA OPTIONS - -DBUILD_STATIC_LIBS=${XXH_STATIC} -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON) vcpkg_install_cmake() @@ -28,6 +19,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(READ ${CURRENT_PACKAGES_DIR}/include/xxhash.h XXHASH_H) string(REPLACE "# define XXH_PUBLIC_API /* do nothing */" "# define XXH_PUBLIC_API __declspec(dllimport)" XXHASH_H "${XXHASH_H}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/xxhash.h "${XXHASH_H}") + + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/xxhsum.exe ${CURRENT_PACKAGES_DIR}/debug/bin/xxhsum.exe) +else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 5ad0d8187584ee24f9b007821b033204f0746d35 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Sat, 9 Sep 2017 02:58:25 +0300 Subject: [protobuf] Fix define PROTOBUF_USE_DLLS with static linking. Closes #1798 --- ports/protobuf/CONTROL | 2 +- ports/protobuf/portfile.cmake | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 83b672b3f..68d305ce8 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,4 +1,4 @@ Source: protobuf -Version: 3.4.0 +Version: 3.4.0-1 Build-Depends: zlib Description: Protocol Buffers - Google's data interchange format \ No newline at end of file diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 84e2c9b65..804780ab4 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -92,15 +92,11 @@ else() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe) endif() -foreach(FILE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h) - file(READ ${FILE} _contents) - if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - string(REPLACE "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" "\#define PROTOBUF_USE_DLLS 1\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" _contents "${_contents}") - else() - string(REPLACE "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" "\#define PROTOBUF_USE_DLLS 0\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" _contents "${_contents}") - endif() - file(WRITE ${FILE} "${_contents}") -endforeach() +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 ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -- cgit v1.2.3 From 5a46f8e279f47229759dea9dd736d71ab74e04b9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 8 Sep 2017 17:24:25 -0700 Subject: [openssl] Use /Z7 to embed symbols in static libs --- ports/openssl/CONTROL | 2 +- ports/openssl/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index bb00f9cc3..5490766a6 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2l-1 +Version: 1.0.2l-2 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/portfile.cmake b/ports/openssl/portfile.cmake index 569de6c75..f8d399abc 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -28,6 +28,7 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/PerlScriptSpaceInPathFixes.patch ${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch ${CMAKE_CURRENT_LIST_DIR}/STRINGIFYPatch.patch + ${CMAKE_CURRENT_LIST_DIR}/EmbedSymbolsInStaticLibsZ7.patch ) set(CONFIGURE_COMMAND ${PERL} Configure -- cgit v1.2.3 From 5a920ef7601ba8ac98f14623be4d43a4e0fd4dee Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 8 Sep 2017 17:32:19 -0700 Subject: [zeromq] Update to latest master to take advantage of CMake improvements. --- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 99 ++++++++++++++++----------------------------- 2 files changed, 35 insertions(+), 66 deletions(-) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index 6b82f310a..ac4bef932 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 4.2.2 +Version: 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2 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 a530598eb..77d0da23d 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -1,75 +1,44 @@ -set(ZEROMQ_VERSION 4.2.2) -set(ZEROMQ_HASH 4069813374d4e8d4c0f8debbe85472d0bd24cf644fb1bce748920eadffb81c429d28f523ef424df84fcaa7082b984fab8da57192802585811d37cff066f4e40c) - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libzmq-${ZEROMQ_VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/zeromq/libzmq/archive/v${ZEROMQ_VERSION}.tar.gz" - FILENAME "libzmq-${ZEROMQ_VERSION}.tar.gz" - SHA512 ${ZEROMQ_HASH} -) -vcpkg_extract_source_archive(${ARCHIVE}) -# Map from triplet "x86" to "win32" as used in the vcxproj file. -if (TRIPLET_SYSTEM_ARCH MATCHES "x86") - set(MSBUILD_PLATFORM "Win32") -else () - set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH}) -endif() +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeromq/libzmq + REF 18498f620f0f6d4076981ea16eb5760fe4d28dc2 + SHA512 0c4a5c72455411f47283da3cad381600101be19a62437ad8e2c38e5f18fb6d621a3136e402c6eb9ba153f3d6333da9902335c2dacd8405094d4d1269df28d4af + HEAD_REF master +) -if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(MSVS_VERSION 2017) -else() - set(MSVS_VERSION 2015) -endif() +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${ARCHIVE} +) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/builds/msvc/vs${MSVS_VERSION}/libzmq/libzmq.vcxproj - RELEASE_CONFIGURATION ReleaseDLL - DEBUG_CONFIGURATION DebugDLL - ) - file(INSTALL - ${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Debug/${VCPKG_PLATFORM_TOOLSET}/dynamic/libzmq.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) - file(INSTALL - ${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Release/${VCPKG_PLATFORM_TOOLSET}/dynamic/libzmq.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) - file(INSTALL - ${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Debug/${VCPKG_PLATFORM_TOOLSET}/dynamic/libzmq.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) - file(INSTALL - ${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Release/${VCPKG_PLATFORM_TOOLSET}/dynamic/libzmq.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) - vcpkg_copy_pdbs() +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\"") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DZMQ_BUILD_TESTS=OFF + -DPOLLER=select + -DBUILD_STATIC=${BUILD_STATIC} + -DBUILD_SHARED=${BUILD_SHARED} + -DWITH_PERF_TOOL=OFF + OPTIONS_DEBUG + "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" +) -else() - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/builds/msvc/vs${MSVS_VERSION}/libzmq/libzmq.vcxproj - RELEASE_CONFIGURATION ReleaseLIB - DEBUG_CONFIGURATION DebugLIB - ) - file(INSTALL - ${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Debug/${VCPKG_PLATFORM_TOOLSET}/static/libzmq.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) - file(INSTALL - ${SOURCE_PATH}/bin/${MSBUILD_PLATFORM}/Release/${VCPKG_PLATFORM_TOOLSET}/static/libzmq.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) -endif() +vcpkg_install_cmake() +vcpkg_copy_pdbs() -file(INSTALL - ${SOURCE_PATH}/include/ - DESTINATION ${CURRENT_PACKAGES_DIR}/include -) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ) # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/zeromq) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/zeromq/COPYING ${CURRENT_PACKAGES_DIR}/share/zeromq/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) -- cgit v1.2.3 From f7b813dce8c8d67147e3b007e4c880f6a877f810 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 8 Sep 2017 18:33:24 -0700 Subject: [openssl] Actually include the patch for /Z7 --- ports/openssl/EmbedSymbolsInStaticLibsZ7.patch | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ports/openssl/EmbedSymbolsInStaticLibsZ7.patch diff --git a/ports/openssl/EmbedSymbolsInStaticLibsZ7.patch b/ports/openssl/EmbedSymbolsInStaticLibsZ7.patch new file mode 100644 index 000000000..1a8de2c4b --- /dev/null +++ b/ports/openssl/EmbedSymbolsInStaticLibsZ7.patch @@ -0,0 +1,25 @@ +diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl +index dba96cb..5722f6e 100644 +--- a/util/pl/VC-32.pl ++++ b/util/pl/VC-32.pl +@@ -154,9 +154,17 @@ else + $cflags=$opt_cflags.$base_cflags; + } + +-# generate symbols.pdb unconditionally +-$app_cflag.=" /Zi /Fd\$(TMP_D)/app"; +-$lib_cflag.=" /Zi /Fd\$(TMP_D)/lib"; ++# generate symbols.pdb when building dlls and embed symbols when building static libs ++if ($shlib) ++ { ++ $app_cflag.=" /Zi /Fd\$(TMP_D)/app.pdb"; ++ $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib.pdb"; ++ } ++else ++ { ++ $app_cflag.=" /Z7"; ++ $lib_cflag.=" /Z7"; ++ } + $lflags.=" /debug"; + + $obj='.obj'; -- cgit v1.2.3 From d2c045cc360d4f1d2e4ad2775287c9be8eea8e46 Mon Sep 17 00:00:00 2001 From: Kyle Macfarlan Date: Fri, 8 Sep 2017 21:48:10 -0500 Subject: Update pybind11 version to 2.2.0 --- ports/pybind11/CONTROL | 2 +- ports/pybind11/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/pybind11/CONTROL b/ports/pybind11/CONTROL index e5ca37eb4..28c9ca407 100644 --- a/ports/pybind11/CONTROL +++ b/ports/pybind11/CONTROL @@ -1,4 +1,4 @@ Source: pybind11 -Version: 2.1.0-1 +Version: 2.2.0 Description: pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. Build-Depends: python3 \ No newline at end of file diff --git a/ports/pybind11/portfile.cmake b/ports/pybind11/portfile.cmake index 668edb5d9..3e5802059 100644 --- a/ports/pybind11/portfile.cmake +++ b/ports/pybind11/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pybind/pybind11 - REF v2.1.0 - SHA512 2f74dcd2b82d8e41da7db36351284fe04511038bec66bdde820da9c0fce92f6d2c5aeb2e48264058a91a775a1a6a99bc757d26ebf001de3df4183d700d46efa1 + REF v2.2.0 + SHA512 65d8c2c9ba77b25577dd330356ef9cc8f9af924b1d578c28176f230c6f6a88cfd335cc01cc5e010bb8e641a000a78cfcaa1a1367b438e7c6e0d40ea511494a5a HEAD_REF master ) -- cgit v1.2.3 From c7589e76c0f3d2e266a5724ea57fd328d2ee44ad Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 8 Sep 2017 22:09:57 -0700 Subject: Update CHANGELOG and bump version to v0.0.87 --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f02cd1bcf..4437cec17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,31 @@ +vcpkg (0.0.87) +-------------- + * Add ports: + - console-bridge 0.3.2-1 + - leptonica 1.74.4 + - tesseract 3.05.01 + - urdfdom 1.0.0-1 + - urdfdom-headers 1.0.0-1 + * Update ports: + - ace 6.4.4 -> 6.4.5 + - c-ares 1.12.1-dev-40eb41f-1 -> 1.13.0 + - glslang 1c573fbcfba6b3d631008b1babc838501ca925d3-2 -> 3a21c880500eac21cdf79bef5b80f970a55ac6af + - grpc 1.4.1 -> 1.6.0 + - libuv 1.14.0 -> 1.14.1 + - meschach -> 1.2b + - openblas v0.2.20 -> v0.2.20-1 + - openssl 1.0.2l-1 -> 1.0.2l-2 + - protobuf 3.3.0-3 -> 3.4.0-1 + - qt5 5.8-4 -> 5.8-5 + - shaderc 2df47b51d83ad83cbc2e7f8ff2b56776293e8958-1 -> 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da + - spirv-tools 1.1-f72189c249ba143c6a89a4cf1e7d53337b2ddd40 -> v2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23 + - xxhash 0.6.2 -> 0.6.3 + - zeromq 4.2.2 -> 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2 + * Add new function `vcpkg_from_bitbucket` which the Bitbucket equivalent of `vcpkg_from_github` + +-- vcpkg team FRI, 08 Sep 2017 22:00:00 -0800 + + vcpkg (0.0.86) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index df2e96a41..422bb25f0 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.86" \ No newline at end of file +"0.0.87" \ No newline at end of file -- cgit v1.2.3 From 26516fe485b0e9048dd4809256a7e4526957c6e9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 9 Sep 2017 00:12:54 -0700 Subject: vcpkg_configure_cmake (and _meson) now embed debug symbols within static libs (/Z7) --- ports/alembic/CONTROL | 2 +- ports/allegro5/CONTROL | 4 ++-- ports/anax/CONTROL | 2 +- ports/angle/CONTROL | 2 +- ports/apr-util/CONTROL | 2 +- ports/apr/CONTROL | 2 +- ports/arrow/CONTROL | 2 +- ports/assimp/CONTROL | 2 +- ports/atk/CONTROL | 2 +- ports/aubio/CONTROL | 2 +- ports/aws-sdk-cpp/CONTROL | 2 +- ports/azure-storage-cpp/CONTROL | 4 ++-- ports/benchmark/CONTROL | 4 ++-- ports/bigint/CONTROL | 2 +- ports/bond/CONTROL | 2 +- ports/brotli/CONTROL | 2 +- ports/bullet3/CONTROL | 2 +- ports/butteraugli/CONTROL | 2 +- ports/bzip2/CONTROL | 2 +- ports/c-ares/CONTROL | 4 ++-- ports/cairo/CONTROL | 2 +- ports/cairomm/CONTROL | 4 ++-- ports/ccd/CONTROL | 2 +- ports/ccfits/CONTROL | 4 ++-- ports/cereal/CONTROL | 2 +- ports/ceres/CONTROL | 4 ++-- ports/cfitsio/CONTROL | 2 +- ports/charls/CONTROL | 4 ++-- ports/clapack/CONTROL | 2 +- ports/clockutils/CONTROL | 2 +- ports/console-bridge/CONTROL | 2 +- ports/corrade/CONTROL | 2 +- ports/cpp-redis/CONTROL | 2 +- ports/cppcms/CONTROL | 2 +- ports/cpprestsdk/CONTROL | 4 ++-- ports/cpr/CONTROL | 2 +- ports/cryptopp/CONTROL | 2 +- ports/ctemplate/CONTROL | 2 +- ports/cunit/CONTROL | 2 +- ports/curl/CONTROL | 2 +- ports/dimcli/CONTROL | 2 +- ports/dlfcn-win32/CONTROL | 2 +- ports/dlib/CONTROL | 2 +- ports/double-conversion/CONTROL | 2 +- ports/draco/CONTROL | 4 ++-- ports/duktape/CONTROL | 2 +- ports/ecm/CONTROL | 2 +- ports/eigen3/CONTROL | 2 +- ports/embree/CONTROL | 2 +- ports/entityx/CONTROL | 2 +- ports/evpp/CONTROL | 2 +- ports/expat/CONTROL | 2 +- ports/fastlz/CONTROL | 2 +- ports/fcl/CONTROL | 4 ++-- ports/fftw3/CONTROL | 2 +- ports/flann/CONTROL | 2 +- ports/flatbuffers/CONTROL | 4 ++-- ports/fltk/CONTROL | 4 ++-- ports/fmt/CONTROL | 2 +- ports/folly/CONTROL | 2 +- ports/fontconfig/CONTROL | 2 +- ports/freeglut/CONTROL | 4 ++-- ports/freeimage/CONTROL | 2 +- ports/freerdp/CONTROL | 4 ++-- ports/freetype/CONTROL | 4 ++-- ports/fuzzylite/CONTROL | 2 +- ports/g2o/CONTROL | 2 +- ports/gdcm2/CONTROL | 2 +- ports/gdk-pixbuf/CONTROL | 2 +- ports/geogram/CONTROL | 2 +- ports/geographiclib/CONTROL | 2 +- ports/geos/CONTROL | 2 +- ports/gettext/CONTROL | 2 +- ports/gflags/CONTROL | 2 +- ports/giflib/CONTROL | 2 +- ports/gl2ps/CONTROL | 2 +- ports/glbinding/CONTROL | 2 +- ports/glew/CONTROL | 4 ++-- ports/glfw3/CONTROL | 4 ++-- ports/glib/CONTROL | 2 +- ports/glm/CONTROL | 2 +- ports/globjects/CONTROL | 2 +- ports/glog/CONTROL | 2 +- ports/glslang/CONTROL | 2 +- ports/graphicsmagick/CONTROL | 2 +- ports/grpc/CONTROL | 4 ++-- ports/gsl/CONTROL | 2 +- ports/gtest/CONTROL | 4 ++-- ports/gtk/CONTROL | 2 +- ports/guetzli/CONTROL | 2 +- ports/gumbo/CONTROL | 2 +- ports/harfbuzz/CONTROL | 2 +- ports/hdf5/CONTROL | 4 ++-- ports/hpx/CONTROL | 2 +- ports/http-parser/CONTROL | 4 ++-- ports/hunspell/CONTROL | 2 +- ports/hwloc/CONTROL | 2 +- ports/hypre/CONTROL | 4 ++-- ports/ilmbase/CONTROL | 2 +- ports/jansson/CONTROL | 2 +- ports/jasper/CONTROL | 2 +- ports/jbigkit/CONTROL | 2 +- ports/jemalloc/CONTROL | 2 +- ports/jsoncpp/CONTROL | 2 +- ports/jxrlib/CONTROL | 2 +- ports/lcms/CONTROL | 4 ++-- ports/leptonica/CONTROL | 2 +- ports/libarchive/CONTROL | 2 +- ports/libbson/CONTROL | 4 ++-- ports/libconfig/CONTROL | 2 +- ports/libepoxy/CONTROL | 2 +- ports/libevent/CONTROL | 4 ++-- ports/libffi/CONTROL | 2 +- ports/libflac/CONTROL | 2 +- ports/libgd/CONTROL | 2 +- ports/libharu/CONTROL | 2 +- ports/libiconv/CONTROL | 2 +- ports/libjpeg-turbo/CONTROL | 2 +- ports/libkml/CONTROL | 2 +- ports/liblzma/CONTROL | 2 +- ports/libmad/CONTROL | 2 +- ports/libmariadb/CONTROL | 2 +- ports/libmicrohttpd/CONTROL | 2 +- ports/libmikmod/CONTROL | 4 ++-- ports/libmodplug/CONTROL | 2 +- ports/libmysql/CONTROL | 4 ++-- ports/libnice/CONTROL | 4 ++-- ports/libodb-pgsql/CONTROL | 4 ++-- ports/libodb-sqlite/CONTROL | 2 +- ports/libodb/CONTROL | 2 +- ports/libogg/CONTROL | 2 +- ports/libopusenc/CONTROL | 2 +- ports/libp7-baical/CONTROL | 2 +- ports/libpng/CONTROL | 2 +- ports/libpopt/CONTROL | 2 +- ports/libpq/CONTROL | 2 +- ports/libraw/CONTROL | 2 +- ports/libsigcpp/CONTROL | 2 +- ports/libsndfile/CONTROL | 2 +- ports/libssh/CONTROL | 2 +- ports/libssh2/CONTROL | 4 ++-- ports/libstemmer/CONTROL | 2 +- ports/libtheora/CONTROL | 2 +- ports/libtorrent/CONTROL | 2 +- ports/libunibreak/CONTROL | 2 +- ports/libusb-win32/CONTROL | 2 +- ports/libuv/CONTROL | 4 ++-- ports/libvorbis/CONTROL | 2 +- ports/libwebm/CONTROL | 2 +- ports/libwebp/CONTROL | 2 +- ports/libwebsockets/CONTROL | 4 ++-- ports/libxml2/CONTROL | 2 +- ports/libzip/CONTROL | 2 +- ports/live555/CONTROL | 2 +- ports/llvm/CONTROL | 2 +- ports/lmdb/CONTROL | 4 ++-- ports/lodepng/CONTROL | 2 +- ports/log4cplus/CONTROL | 2 +- ports/lpeg/CONTROL | 2 +- ports/lua/CONTROL | 2 +- ports/luafilesystem/CONTROL | 2 +- ports/lz4/CONTROL | 2 +- ports/lzfse/CONTROL | 2 +- ports/lzo/CONTROL | 2 +- ports/magnum-plugins/CONTROL | 2 +- ports/magnum/CONTROL | 2 +- ports/matio/CONTROL | 2 +- ports/meschach/CONTROL | 2 +- ports/metis/CONTROL | 2 +- ports/minizip/CONTROL | 2 +- ports/mongo-c-driver/CONTROL | 4 ++-- ports/mongo-cxx-driver/CONTROL | 4 ++-- ports/mpfr/CONTROL | 4 ++-- ports/msgpack/CONTROL | 2 +- ports/nana/CONTROL | 2 +- ports/nanodbc/CONTROL | 4 ++-- ports/netcdf-c/CONTROL | 2 +- ports/netcdf-cxx4/CONTROL | 2 +- ports/nlohmann-json/CONTROL | 2 +- ports/nlopt/CONTROL | 2 +- ports/octomap/CONTROL | 2 +- ports/ogre/CONTROL | 2 +- ports/openal-soft/CONTROL | 2 +- ports/openblas/CONTROL | 2 +- ports/opencv/CONTROL | 2 +- ports/openexr/CONTROL | 2 +- ports/openimageio/CONTROL | 4 ++-- ports/openjpeg/CONTROL | 2 +- ports/opusfile/CONTROL | 2 +- ports/osg/CONTROL | 2 +- ports/paho-mqtt/CONTROL | 2 +- ports/pango/CONTROL | 2 +- ports/pangolin/CONTROL | 4 ++-- ports/parmetis/CONTROL | 2 +- ports/pcl/CONTROL | 2 +- ports/pcre/CONTROL | 2 +- ports/pcre2/CONTROL | 2 +- ports/physfs/CONTROL | 2 +- ports/piex/CONTROL | 2 +- ports/pixman/CONTROL | 2 +- ports/plibsys/CONTROL | 2 +- ports/poco/CONTROL | 2 +- ports/podofo/CONTROL | 4 ++-- ports/portaudio/CONTROL | 2 +- ports/pqp/CONTROL | 2 +- ports/proj/CONTROL | 2 +- ports/protobuf/CONTROL | 4 ++-- ports/ptex/CONTROL | 2 +- ports/pthreads/CONTROL | 2 +- ports/pugixml/CONTROL | 2 +- ports/pybind11/CONTROL | 4 ++-- ports/pystring/CONTROL | 2 +- ports/qca/CONTROL | 2 +- ports/qhull/CONTROL | 2 +- ports/ragel/CONTROL | 2 +- ports/rhash/CONTROL | 2 +- ports/rocksdb/CONTROL | 2 +- ports/rtmidi/CONTROL | 2 +- ports/rttr/CONTROL | 2 +- ports/sdl2-gfx/CONTROL | 2 +- ports/sdl2-image/CONTROL | 2 +- ports/sdl2-mixer/CONTROL | 2 +- ports/sdl2-net/CONTROL | 2 +- ports/sdl2-ttf/CONTROL | 2 +- ports/sdl2/CONTROL | 2 +- ports/sery/CONTROL | 2 +- ports/sfml/CONTROL | 2 +- ports/shaderc/CONTROL | 2 +- ports/signalrclient/CONTROL | 4 ++-- ports/smpeg2/CONTROL | 2 +- ports/snappy/CONTROL | 2 +- ports/sobjectizer/CONTROL | 2 +- ports/soci/CONTROL | 2 +- ports/sophus/CONTROL | 2 +- ports/spdlog/CONTROL | 2 +- ports/speex/CONTROL | 2 +- ports/speexdsp/CONTROL | 2 +- ports/spirv-tools/CONTROL | 2 +- ports/sqlite3/CONTROL | 4 ++-- ports/suitesparse/CONTROL | 2 +- ports/sundials/CONTROL | 2 +- ports/szip/CONTROL | 2 +- ports/tacopie/CONTROL | 2 +- ports/taglib/CONTROL | 4 ++-- ports/tesseract/CONTROL | 2 +- ports/theia/CONTROL | 4 ++-- ports/thor/CONTROL | 2 +- ports/thrift/CONTROL | 2 +- ports/tiff/CONTROL | 2 +- ports/tinythread/CONTROL | 2 +- ports/tinyxml/CONTROL | 2 +- ports/tinyxml2/CONTROL | 2 +- ports/urdfdom-headers/CONTROL | 2 +- ports/urdfdom/CONTROL | 4 ++-- ports/uriparser/CONTROL | 2 +- ports/utf8proc/CONTROL | 2 +- ports/utfz/CONTROL | 2 +- ports/uwebsockets/CONTROL | 2 +- ports/vtk/CONTROL | 2 +- ports/wt/CONTROL | 2 +- ports/xlnt/CONTROL | 4 ++-- ports/xxhash/CONTROL | 2 +- ports/yaml-cpp/CONTROL | 2 +- ports/zeromq/CONTROL | 2 +- ports/zlib/CONTROL | 4 ++-- ports/zstd/CONTROL | 2 +- ports/zziplib/CONTROL | 2 +- scripts/cmake/vcpkg_configure_cmake.cmake | 16 ++++++++-------- scripts/cmake/vcpkg_configure_meson.cmake | 16 ++++++++-------- 269 files changed, 333 insertions(+), 333 deletions(-) diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index c12a59217..b9d6ed50d 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.1-3 +Version: 1.7.1-4 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. http://alembic.io/ diff --git a/ports/allegro5/CONTROL b/ports/allegro5/CONTROL index 4bb51ae4e..8f078909a 100644 --- a/ports/allegro5/CONTROL +++ b/ports/allegro5/CONTROL @@ -1,4 +1,4 @@ Source: allegro5 -Version: 5.2.2.0 +Version: 5.2.2.0-1 Description: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like. -Build-Depends: opengl, zlib, freetype, libogg, libvorbis, libflac, openal-soft, libpng, bzip2, physfs, libtheora, opus, opusfile \ No newline at end of file +Build-Depends: opengl, zlib, freetype, libogg, libvorbis, libflac, openal-soft, libpng, bzip2, physfs, libtheora, opus, opusfile diff --git a/ports/anax/CONTROL b/ports/anax/CONTROL index ce3da2f57..7eb71786b 100644 --- a/ports/anax/CONTROL +++ b/ports/anax/CONTROL @@ -1,3 +1,3 @@ Source: anax -Version: 2.1.0-1 +Version: 2.1.0-2 Description: An open source C++ entity system. diff --git a/ports/angle/CONTROL b/ports/angle/CONTROL index a7e261bb1..38f8c7c60 100644 --- a/ports/angle/CONTROL +++ b/ports/angle/CONTROL @@ -1,4 +1,4 @@ Source: angle -Version: 2017-06-14-8d471f-1 +Version: 2017-06-14-8d471f-2 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/apr-util/CONTROL b/ports/apr-util/CONTROL index e61eb3653..81814a2ca 100644 --- a/ports/apr-util/CONTROL +++ b/ports/apr-util/CONTROL @@ -1,4 +1,4 @@ Source: apr-util -Version: 1.6.0 +Version: 1.6.0-1 Description: Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation Build-Depends: expat, apr, openssl diff --git a/ports/apr/CONTROL b/ports/apr/CONTROL index ac1b7d5c3..94581eab0 100644 --- a/ports/apr/CONTROL +++ b/ports/apr/CONTROL @@ -1,3 +1,3 @@ Source: apr -Version: 1.6.2 +Version: 1.6.2-1 Description: The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems. diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL index 717360d12..bdfcfef24 100644 --- a/ports/arrow/CONTROL +++ b/ports/arrow/CONTROL @@ -1,4 +1,4 @@ Source: arrow -Version: apache-arrow-0.4.0-1 +Version: apache-arrow-0.4.0-2 Build-Depends: boost Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index 9e036df33..f13d2ee20 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 4.0.0-1 +Version: 4.0.0-2 Description: The Open Asset import library Build-Depends: zlib diff --git a/ports/atk/CONTROL b/ports/atk/CONTROL index 149c564a7..0af45eab4 100644 --- a/ports/atk/CONTROL +++ b/ports/atk/CONTROL @@ -1,4 +1,4 @@ Source: atk -Version: 2.24.0 +Version: 2.24.0-1 Description: GNOME Accessibility Toolkit Build-Depends: glib, gettext diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL index 55b20f655..34fcaa495 100644 --- a/ports/aubio/CONTROL +++ b/ports/aubio/CONTROL @@ -1,4 +1,4 @@ Source: aubio -Version: 0.46~alpha-2 +Version: 0.46~alpha-3 Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index 18de04d46..251e7bdf9 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,3 +1,3 @@ Source: aws-sdk-cpp -Version: 1.0.61 +Version: 1.0.61-1 Description: AWS SDK for C++ diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index 94126a366..1917bad6d 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp -Version: 3.0.0-2 +Version: 3.0.0-3 Build-Depends: cpprestsdk, atlmfc 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. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ \ No newline at end of file + 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. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ diff --git a/ports/benchmark/CONTROL b/ports/benchmark/CONTROL index 21f36fe43..9268d52dc 100644 --- a/ports/benchmark/CONTROL +++ b/ports/benchmark/CONTROL @@ -1,3 +1,3 @@ Source: benchmark -Version: 1.1.0 -Description: A library to support the benchmarking of functions, similar to unit-tests. \ No newline at end of file +Version: 1.1.0-1 +Description: A library to support the benchmarking of functions, similar to unit-tests. diff --git a/ports/bigint/CONTROL b/ports/bigint/CONTROL index 50f7bea65..4079363f1 100644 --- a/ports/bigint/CONTROL +++ b/ports/bigint/CONTROL @@ -1,3 +1,3 @@ Source: bigint -Version: 2010.04.30 +Version: 2010.04.30-1 Description: C++ Big Integer Library diff --git a/ports/bond/CONTROL b/ports/bond/CONTROL index 9007113f3..e69c925d6 100644 --- a/ports/bond/CONTROL +++ b/ports/bond/CONTROL @@ -1,5 +1,5 @@ Source: bond Maintainer: bond@microsoft.com -Version: 6.0.0 +Version: 6.0.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. Build-Depends: boost, rapidjson diff --git a/ports/brotli/CONTROL b/ports/brotli/CONTROL index 75a2973a0..25bc036a8 100644 --- a/ports/brotli/CONTROL +++ b/ports/brotli/CONTROL @@ -1,3 +1,3 @@ Source: brotli -Version: 0.6.0 +Version: 0.6.0-1 Description: a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling. diff --git a/ports/bullet3/CONTROL b/ports/bullet3/CONTROL index 6320c6578..92b55db2e 100644 --- a/ports/bullet3/CONTROL +++ b/ports/bullet3/CONTROL @@ -1,3 +1,3 @@ Source: bullet3 -Version: 2.86.1 +Version: 2.86.1-1 Description: Bullet Physics is a professional collision detection, rigid body, and soft body dynamics library diff --git a/ports/butteraugli/CONTROL b/ports/butteraugli/CONTROL index d31a94e09..fe951714b 100644 --- a/ports/butteraugli/CONTROL +++ b/ports/butteraugli/CONTROL @@ -1,4 +1,4 @@ Source: butteraugli -Version: 2017-09-02-8c60a2aefa19adb +Version: 2017-09-02-8c60a2aefa19adb-1 Description: butteraugli estimates the psychovisual difference between two images Build-Depends: libpng, libjpeg-turbo diff --git a/ports/bzip2/CONTROL b/ports/bzip2/CONTROL index 1c7303c22..613d3f251 100644 --- a/ports/bzip2/CONTROL +++ b/ports/bzip2/CONTROL @@ -1,3 +1,3 @@ Source: bzip2 -Version: 1.0.6-1 +Version: 1.0.6-2 Description: High-quality data compressor. diff --git a/ports/c-ares/CONTROL b/ports/c-ares/CONTROL index 97da33665..6b729a5d9 100644 --- a/ports/c-ares/CONTROL +++ b/ports/c-ares/CONTROL @@ -1,4 +1,4 @@ Source: c-ares -Version: 1.13.0 +Version: 1.13.0-1 Description: A C library for asynchronous DNS requests -Build-Depends: \ No newline at end of file +Build-Depends: diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index a900f137d..80269f5a7 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,4 +1,4 @@ Source: cairo -Version: 1.15.8 +Version: 1.15.8-1 Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig diff --git a/ports/cairomm/CONTROL b/ports/cairomm/CONTROL index d8eda4a53..c92877435 100644 --- a/ports/cairomm/CONTROL +++ b/ports/cairomm/CONTROL @@ -1,4 +1,4 @@ Source: cairomm -Version: 1.15.3-1 +Version: 1.15.3-2 Description: A C++ wrapper for the cairo graphics library -Build-Depends: cairo, libsigcpp \ No newline at end of file +Build-Depends: cairo, libsigcpp diff --git a/ports/ccd/CONTROL b/ports/ccd/CONTROL index 16f16ea0b..9246cec90 100644 --- a/ports/ccd/CONTROL +++ b/ports/ccd/CONTROL @@ -1,3 +1,3 @@ Source: ccd -Version: 2.0.0-1 +Version: 2.0.0-2 Description: Library for collision detection between two convex shapes diff --git a/ports/ccfits/CONTROL b/ports/ccfits/CONTROL index 17083f9b2..16b36bc8a 100644 --- a/ports/ccfits/CONTROL +++ b/ports/ccfits/CONTROL @@ -1,4 +1,4 @@ Source: ccfits -Version: 2.5 +Version: 2.5-1 Description: CCfits is an object oriented interface to the cfitsio library. It is designed to make the capabilities of cfitsio available to programmers working in C++. -Build-Depends: cfitsio \ No newline at end of file +Build-Depends: cfitsio diff --git a/ports/cereal/CONTROL b/ports/cereal/CONTROL index 77ca17835..fc3c7921a 100644 --- a/ports/cereal/CONTROL +++ b/ports/cereal/CONTROL @@ -1,3 +1,3 @@ Source: cereal -Version: 1.2.2 +Version: 1.2.2-1 Description: a header-only C++11 serialization library (built in support for binary, XML and JSon) diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL index e323c4593..4dde8c0bd 100644 --- a/ports/ceres/CONTROL +++ b/ports/ceres/CONTROL @@ -1,4 +1,4 @@ Source: ceres -Version: 1.13.0 +Version: 1.13.0-1 Build-Depends:suitesparse, eigen3, clapack, gflags, glog -Description: non-linear optimization package \ No newline at end of file +Description: non-linear optimization package diff --git a/ports/cfitsio/CONTROL b/ports/cfitsio/CONTROL index e45b8a8c2..b25eb8026 100644 --- a/ports/cfitsio/CONTROL +++ b/ports/cfitsio/CONTROL @@ -1,3 +1,3 @@ Source: cfitsio -Version: 3.410 +Version: 3.410-1 Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format diff --git a/ports/charls/CONTROL b/ports/charls/CONTROL index 8be1a5027..562a6f688 100644 --- a/ports/charls/CONTROL +++ b/ports/charls/CONTROL @@ -1,3 +1,3 @@ Source: charls -Version: 2.0.0 -Description: CharLS, a C++ JPEG-LS library implementation. \ No newline at end of file +Version: 2.0.0-1 +Description: CharLS, a C++ JPEG-LS library implementation. diff --git a/ports/clapack/CONTROL b/ports/clapack/CONTROL index cb470e4cd..503ddbac5 100644 --- a/ports/clapack/CONTROL +++ b/ports/clapack/CONTROL @@ -1,4 +1,4 @@ Source: clapack -Version: 3.2.1 +Version: 3.2.1-1 Description: CLAPACK (f2c'ed version of LAPACK) Build-Depends: openblas diff --git a/ports/clockutils/CONTROL b/ports/clockutils/CONTROL index 8f88e71ec..59950365d 100644 --- a/ports/clockutils/CONTROL +++ b/ports/clockutils/CONTROL @@ -1,3 +1,3 @@ Source: clockutils -Version: 1.1.1-3651f232c27074c4ceead169e223edf5f00247c5 +Version: 1.1.1-3651f232c27074c4ceead169e223edf5f00247c5-1 Description: A lightweight c++ library for commonly needed tasks. Optimized for simplicity and speed. diff --git a/ports/console-bridge/CONTROL b/ports/console-bridge/CONTROL index 1f4ba275c..ea6ebf3ba 100644 --- a/ports/console-bridge/CONTROL +++ b/ports/console-bridge/CONTROL @@ -1,3 +1,3 @@ Source: console-bridge -Version: 0.3.2-1 +Version: 0.3.2-2 Description: a ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages. diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL index d8fb3681a..2d262a0e0 100644 --- a/ports/corrade/CONTROL +++ b/ports/corrade/CONTROL @@ -1,3 +1,3 @@ Source: corrade -Version: jun2017-2 +Version: jun2017-3 Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php diff --git a/ports/cpp-redis/CONTROL b/ports/cpp-redis/CONTROL index 36b2e8b55..554755b57 100644 --- a/ports/cpp-redis/CONTROL +++ b/ports/cpp-redis/CONTROL @@ -1,4 +1,4 @@ Source: cpp-redis -Version: 3.5.2-1 +Version: 3.5.2-2 Build-Depends: tacopie Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining. diff --git a/ports/cppcms/CONTROL b/ports/cppcms/CONTROL index 74deb6633..8f8726ddc 100644 --- a/ports/cppcms/CONTROL +++ b/ports/cppcms/CONTROL @@ -1,4 +1,4 @@ Source: cppcms -Version: 1.1.0 +Version: 1.1.0-1 Description: CppCMS is a Free High Performance Web Development Framework (not a CMS) aimed at Rapid Web Application Development Build-Depends: icu, pcre, openssl, zlib diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index f34f1ad4a..f22ee9854 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,5 @@ Source: cpprestsdk -Version: 2.9.0-2 +Version: 2.9.0-3 Build-Depends: zlib (windows), openssl (windows), boost (windows), websocketpp (windows) Description: C++11 JSON, REST, and OAuth library - The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. \ No newline at end of file + The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. diff --git a/ports/cpr/CONTROL b/ports/cpr/CONTROL index 417850b75..f79ef823c 100644 --- a/ports/cpr/CONTROL +++ b/ports/cpr/CONTROL @@ -1,4 +1,4 @@ Source: cpr -Version: 1.3.0 +Version: 1.3.0-1 Description: C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project. Build-Depends: curl diff --git a/ports/cryptopp/CONTROL b/ports/cryptopp/CONTROL index 2a38d8910..00d14756a 100644 --- a/ports/cryptopp/CONTROL +++ b/ports/cryptopp/CONTROL @@ -1,3 +1,3 @@ Source: cryptopp -Version: 5.6.5 +Version: 5.6.5-1 Description: Crypto++ is a free C++ class library of cryptographic schemes. diff --git a/ports/ctemplate/CONTROL b/ports/ctemplate/CONTROL index 5e9e69753..1125efc18 100644 --- a/ports/ctemplate/CONTROL +++ b/ports/ctemplate/CONTROL @@ -1,3 +1,3 @@ Source: ctemplate -Version: 2017-06-23-44b7c5-2 +Version: 2017-06-23-44b7c5-3 Description: C++ CTemplate system diff --git a/ports/cunit/CONTROL b/ports/cunit/CONTROL index 3ef430092..4b43a0159 100644 --- a/ports/cunit/CONTROL +++ b/ports/cunit/CONTROL @@ -1,3 +1,3 @@ Source: cunit -Version: 2.1.3-1 +Version: 2.1.3-2 Description: CUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index d7da6511c..1193e114f 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,4 +1,4 @@ Source: curl -Version: 7.55.1 +Version: 7.55.1-1 Build-Depends: zlib, openssl, libssh2 Description: A library for transferring data with URLs diff --git a/ports/dimcli/CONTROL b/ports/dimcli/CONTROL index 295c1ecda..2b108239d 100644 --- a/ports/dimcli/CONTROL +++ b/ports/dimcli/CONTROL @@ -1,3 +1,3 @@ Source: dimcli -Version: 2.0.0 +Version: 2.0.0-1 Description: C++ command line parser toolkit diff --git a/ports/dlfcn-win32/CONTROL b/ports/dlfcn-win32/CONTROL index 2d73fc36c..c8fd02dce 100644 --- a/ports/dlfcn-win32/CONTROL +++ b/ports/dlfcn-win32/CONTROL @@ -1,3 +1,3 @@ Source: dlfcn-win32 -Version: 1.1.1 +Version: 1.1.1-1 Description: dlfcn-win32 is an implementation of dlfcn for Windows. diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index d9db5b99d..ce39fcb1b 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,4 +1,4 @@ Source: dlib -Version: 19.4-4 +Version: 19.4-5 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3 Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/double-conversion/CONTROL b/ports/double-conversion/CONTROL index 2ab2391e7..8ef2de918 100644 --- a/ports/double-conversion/CONTROL +++ b/ports/double-conversion/CONTROL @@ -1,3 +1,3 @@ Source: double-conversion -Version: 3.0.0 +Version: 3.0.0-1 Description: Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles. diff --git a/ports/draco/CONTROL b/ports/draco/CONTROL index f8ce4ba96..44fbde429 100644 --- a/ports/draco/CONTROL +++ b/ports/draco/CONTROL @@ -1,4 +1,4 @@ Source: draco -Version: 0.10.0 +Version: 0.10.0-1 Description: A library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics. -Build-Depends: \ No newline at end of file +Build-Depends: diff --git a/ports/duktape/CONTROL b/ports/duktape/CONTROL index 74b01d4cf..b0f599dd8 100644 --- a/ports/duktape/CONTROL +++ b/ports/duktape/CONTROL @@ -1,4 +1,4 @@ Source: duktape -Version: 2.0.3-3 +Version: 2.0.3-4 Description: Embeddable Javascript engine with a focus on portability and compact footprint. Build-Depends: diff --git a/ports/ecm/CONTROL b/ports/ecm/CONTROL index e124c960e..12a9fd8a9 100644 --- a/ports/ecm/CONTROL +++ b/ports/ecm/CONTROL @@ -1,3 +1,3 @@ Source: ecm -Version: 5.37.0 +Version: 5.37.0-1 Description: Extra CMake Modules (ECM), extra modules and scripts for CMake diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL index 9920801cf..1e61ce95f 100644 --- a/ports/eigen3/CONTROL +++ b/ports/eigen3/CONTROL @@ -1,3 +1,3 @@ Source: eigen3 -Version: 3.3.4 +Version: 3.3.4-1 Description: C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. diff --git a/ports/embree/CONTROL b/ports/embree/CONTROL index 3f4ff53a1..3c9ac0c7c 100644 --- a/ports/embree/CONTROL +++ b/ports/embree/CONTROL @@ -1,4 +1,4 @@ Source: embree -Version: 2.16.4-1 +Version: 2.16.4-2 Description: High Performance Ray Tracing Kernels. Build-Depends: tbb diff --git a/ports/entityx/CONTROL b/ports/entityx/CONTROL index f522fe702..cbf618e0a 100644 --- a/ports/entityx/CONTROL +++ b/ports/entityx/CONTROL @@ -1,3 +1,3 @@ Source: entityx -Version: 1.2.0 +Version: 1.2.0-1 Description: EntityX - A fast, type-safe C++ Entity-Component system. diff --git a/ports/evpp/CONTROL b/ports/evpp/CONTROL index 1f9f3a443..163052ae0 100644 --- a/ports/evpp/CONTROL +++ b/ports/evpp/CONTROL @@ -1,4 +1,4 @@ Source: evpp -Version: 0.6.1 +Version: 0.6.1-1 Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols. Build-Depends: glog, libevent diff --git a/ports/expat/CONTROL b/ports/expat/CONTROL index f833c3cf0..450b8e61d 100644 --- a/ports/expat/CONTROL +++ b/ports/expat/CONTROL @@ -1,3 +1,3 @@ Source: expat -Version: 2.2.4-1 +Version: 2.2.4-2 Description: XML parser library written in C diff --git a/ports/fastlz/CONTROL b/ports/fastlz/CONTROL index 089ba333e..51c95cec8 100644 --- a/ports/fastlz/CONTROL +++ b/ports/fastlz/CONTROL @@ -1,3 +1,3 @@ Source: fastlz -Version: 1.0 +Version: 1.0-1 Description: A lightning-fast lossless compression library diff --git a/ports/fcl/CONTROL b/ports/fcl/CONTROL index c83593cb3..daadff075 100644 --- a/ports/fcl/CONTROL +++ b/ports/fcl/CONTROL @@ -1,4 +1,4 @@ Source: fcl -Version: 0.5.0-1 +Version: 0.5.0-2 Description: a library for performing three types of proximity queries on a pair of geometric models composed of triangles -Build-Depends: boost, ccd, octomap \ No newline at end of file +Build-Depends: boost, ccd, octomap diff --git a/ports/fftw3/CONTROL b/ports/fftw3/CONTROL index b4fba283d..50513df27 100644 --- a/ports/fftw3/CONTROL +++ b/ports/fftw3/CONTROL @@ -1,3 +1,3 @@ Source: fftw3 -Version: 3.3.6-p12 +Version: 3.3.6-p12-1 Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL index f4a062981..b70472913 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,3 +1,3 @@ Source: flann -Version: 1.9.1-5 +Version: 1.9.1-6 Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flatbuffers/CONTROL b/ports/flatbuffers/CONTROL index e68024e91..5611e4945 100644 --- a/ports/flatbuffers/CONTROL +++ b/ports/flatbuffers/CONTROL @@ -1,4 +1,4 @@ Source: flatbuffers -Version: 1.7.1 +Version: 1.7.1-1 Description: Memory Efficient Serialization Library http://google.github.io/flatbuffers/ - 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. \ No newline at end of file + 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. diff --git a/ports/fltk/CONTROL b/ports/fltk/CONTROL index 2b4f00629..8261b63a5 100644 --- a/ports/fltk/CONTROL +++ b/ports/fltk/CONTROL @@ -1,4 +1,4 @@ Source: fltk -Version: 1.3.4-4 +Version: 1.3.4-5 Description: FLTK (pronounced fulltick) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its built-in GLUT emulation. -Build-Depends: zlib, libpng, libjpeg-turbo \ No newline at end of file +Build-Depends: zlib, libpng, libjpeg-turbo diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL index c4fd79f76..c0fd45c63 100644 --- a/ports/fmt/CONTROL +++ b/ports/fmt/CONTROL @@ -1,3 +1,3 @@ Source: fmt -Version: 4.0.0 +Version: 4.0.0-1 Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams. diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 489465d74..d8652e657 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,4 +1,4 @@ Source: folly -Version: v2017.07.17.01 +Version: v2017.07.17.01-1 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: zlib, openssl, boost, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy diff --git a/ports/fontconfig/CONTROL b/ports/fontconfig/CONTROL index 5fc4fcff2..f81a2ddd6 100644 --- a/ports/fontconfig/CONTROL +++ b/ports/fontconfig/CONTROL @@ -1,4 +1,4 @@ Source: fontconfig -Version: 2.12.4 +Version: 2.12.4-1 Description: Library for configuring and customizing font access. Build-Depends: freetype, expat, libiconv, dirent diff --git a/ports/freeglut/CONTROL b/ports/freeglut/CONTROL index 775f98938..82f0dc1f1 100644 --- a/ports/freeglut/CONTROL +++ b/ports/freeglut/CONTROL @@ -1,3 +1,3 @@ Source: freeglut -Version: 3.0.0-1 -Description: Open source implementation of GLUT with source and binary backwards compatibility. \ No newline at end of file +Version: 3.0.0-2 +Description: Open source implementation of GLUT with source and binary backwards compatibility. diff --git a/ports/freeimage/CONTROL b/ports/freeimage/CONTROL index 2d9fa1523..9d7c65b6f 100644 --- a/ports/freeimage/CONTROL +++ b/ports/freeimage/CONTROL @@ -1,4 +1,4 @@ Source: freeimage -Version: 3.17.0-2 +Version: 3.17.0-3 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp, libraw, jxrlib, openexr Description: Support library for graphics image formats diff --git a/ports/freerdp/CONTROL b/ports/freerdp/CONTROL index 849fd740b..5a730efb7 100644 --- a/ports/freerdp/CONTROL +++ b/ports/freerdp/CONTROL @@ -1,4 +1,4 @@ Source: freerdp -Version: 2.0.0-rc0~vcpkg1 +Version: 2.0.0-rc0~vcpkg1-1 Description: A free implementation of the Remote Desktop Protocol (RDP) -Build-Depends: openssl \ No newline at end of file +Build-Depends: openssl diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL index 541f8b024..bf65eb28f 100644 --- a/ports/freetype/CONTROL +++ b/ports/freetype/CONTROL @@ -1,4 +1,4 @@ Source: freetype -Version: 2.8 +Version: 2.8-1 Build-Depends: zlib, bzip2, libpng -Description: A library to render fonts. \ No newline at end of file +Description: A library to render fonts. diff --git a/ports/fuzzylite/CONTROL b/ports/fuzzylite/CONTROL index b278a1b8f..422a8af2e 100644 --- a/ports/fuzzylite/CONTROL +++ b/ports/fuzzylite/CONTROL @@ -1,3 +1,3 @@ Source: fuzzylite -Version: 6.0 +Version: 6.0-1 Description: A fuzzy logic control library in C++ diff --git a/ports/g2o/CONTROL b/ports/g2o/CONTROL index 00ec4d963..81e2b045d 100644 --- a/ports/g2o/CONTROL +++ b/ports/g2o/CONTROL @@ -1,4 +1,4 @@ Source: g2o -Version: 20170730_git-1 +Version: 20170730_git-2 Build-Depends: suitesparse, eigen3, clapack, ceres Description: g2o: A General Framework for Graph Optimization http://openslam.org/g2o.html diff --git a/ports/gdcm2/CONTROL b/ports/gdcm2/CONTROL index 32b92aca0..b39b3e19f 100644 --- a/ports/gdcm2/CONTROL +++ b/ports/gdcm2/CONTROL @@ -1,4 +1,4 @@ Source: gdcm2 -Version: 2.6.8 +Version: 2.6.8-1 Description: Grassroots DICOM library Build-Depends: zlib, expat diff --git a/ports/gdk-pixbuf/CONTROL b/ports/gdk-pixbuf/CONTROL index c12f67583..2a0fbfaf3 100644 --- a/ports/gdk-pixbuf/CONTROL +++ b/ports/gdk-pixbuf/CONTROL @@ -1,4 +1,4 @@ Source: gdk-pixbuf -Version: 2.36.9 +Version: 2.36.9-1 Description: Image loading library. Build-Depends: gettext, zlib, libpng, glib diff --git a/ports/geogram/CONTROL b/ports/geogram/CONTROL index 95690395b..f79aa5997 100644 --- a/ports/geogram/CONTROL +++ b/ports/geogram/CONTROL @@ -1,4 +1,4 @@ Source: geogram -Version: 1.4.9 +Version: 1.4.9-1 Description: Geogram is a programming library of geometric algorithms. Build-Depends: glfw3, openblas, clapack diff --git a/ports/geographiclib/CONTROL b/ports/geographiclib/CONTROL index 836049a66..993239b96 100644 --- a/ports/geographiclib/CONTROL +++ b/ports/geographiclib/CONTROL @@ -1,3 +1,3 @@ Source: geographiclib -Version: 1.47-patch1-3 +Version: 1.47-patch1-4 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/geos/CONTROL b/ports/geos/CONTROL index c0ec7b134..3e9d4d7c6 100644 --- a/ports/geos/CONTROL +++ b/ports/geos/CONTROL @@ -1,3 +1,3 @@ Source: geos -Version: 3.5.0 +Version: 3.5.0-1 Description: Geometry Engine Open Source diff --git a/ports/gettext/CONTROL b/ports/gettext/CONTROL index fad410359..882eb725f 100644 --- a/ports/gettext/CONTROL +++ b/ports/gettext/CONTROL @@ -1,3 +1,3 @@ Source: gettext -Version: 0.19-1 +Version: 0.19-2 Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index 9fab690ce..c673815f9 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.2.0-4 +Version: 2.2.0-5 Description: A C++ library that implements commandline flags processing diff --git a/ports/giflib/CONTROL b/ports/giflib/CONTROL index abac8f1cf..a79a8b0d4 100644 --- a/ports/giflib/CONTROL +++ b/ports/giflib/CONTROL @@ -1,3 +1,3 @@ Source: giflib -Version: 5.1.4 +Version: 5.1.4-1 Description: A library for reading and writing gif images. diff --git a/ports/gl2ps/CONTROL b/ports/gl2ps/CONTROL index 16c52f64a..052835a34 100644 --- a/ports/gl2ps/CONTROL +++ b/ports/gl2ps/CONTROL @@ -1,4 +1,4 @@ Source: gl2ps -Version: 1.4.0 +Version: 1.4.0-1 Description: OpenGL to PostScript Printing Library Build-Depends: freeglut, zlib, libpng diff --git a/ports/glbinding/CONTROL b/ports/glbinding/CONTROL index 5e7ec029c..b6eaf06bd 100644 --- a/ports/glbinding/CONTROL +++ b/ports/glbinding/CONTROL @@ -1,3 +1,3 @@ Source: glbinding -Version: 2.1.1-1 +Version: 2.1.1-2 Description: glbinding is an MIT licensed, cross-platform C++ binding for the OpenGL API diff --git a/ports/glew/CONTROL b/ports/glew/CONTROL index 1d7fc62f5..ecf948c5d 100644 --- a/ports/glew/CONTROL +++ b/ports/glew/CONTROL @@ -1,3 +1,3 @@ Source: glew -Version: 2.1.0 -Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. \ No newline at end of file +Version: 2.1.0-1 +Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. diff --git a/ports/glfw3/CONTROL b/ports/glfw3/CONTROL index d6493c968..9cb0cbdc6 100644 --- a/ports/glfw3/CONTROL +++ b/ports/glfw3/CONTROL @@ -1,3 +1,3 @@ Source: glfw3 -Version: 3.2.1-1 -Description: GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc. \ No newline at end of file +Version: 3.2.1-2 +Description: GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc. diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL index 2d67cd26d..a4e467bbc 100644 --- a/ports/glib/CONTROL +++ b/ports/glib/CONTROL @@ -1,4 +1,4 @@ Source: glib -Version: 2.52.3 +Version: 2.52.3-1 Description: Portable, general-purpose utility library. Build-Depends: zlib, pcre, libffi, gettext, libiconv diff --git a/ports/glm/CONTROL b/ports/glm/CONTROL index 2f7355c30..36a40e32d 100644 --- a/ports/glm/CONTROL +++ b/ports/glm/CONTROL @@ -1,3 +1,3 @@ Source: glm -Version: 0.9.8.4 +Version: 0.9.8.4-1 Description: OpenGL Mathematics (GLM) https://glm.g-truc.net diff --git a/ports/globjects/CONTROL b/ports/globjects/CONTROL index 7917bacac..df9c862dc 100644 --- a/ports/globjects/CONTROL +++ b/ports/globjects/CONTROL @@ -1,5 +1,5 @@ Source: globjects Maintainer: mattias@mattiascibien.net -Version: 1.0.0 +Version: 1.0.0-1 Build-Depends: glbinding, glm Description: C++ library strictly wrapping OpenGL objects. diff --git a/ports/glog/CONTROL b/ports/glog/CONTROL index 74653e8bc..fad754f7c 100644 --- a/ports/glog/CONTROL +++ b/ports/glog/CONTROL @@ -1,4 +1,4 @@ Source: glog -Version: 0.3.5 +Version: 0.3.5-1 Description: C++ implementation of the Google logging module Build-Depends: gflags diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL index ad11f7d81..03668b10a 100644 --- a/ports/glslang/CONTROL +++ b/ports/glslang/CONTROL @@ -1,3 +1,3 @@ Source: glslang -Version: 3a21c880500eac21cdf79bef5b80f970a55ac6af +Version: 3a21c880500eac21cdf79bef5b80f970a55ac6af-1 Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator diff --git a/ports/graphicsmagick/CONTROL b/ports/graphicsmagick/CONTROL index 13770197d..17f2a635d 100644 --- a/ports/graphicsmagick/CONTROL +++ b/ports/graphicsmagick/CONTROL @@ -1,4 +1,4 @@ Source: graphicsmagick -Version: 1.3.26-1 +Version: 1.3.26-2 Build-Depends: zlib, bzip2, freetype, libjpeg-turbo, libpng, tiff Description: Image processing library diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index dca18735f..449d58b6c 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.6.0 +Version: 1.6.0-1 Build-Depends: zlib, openssl, protobuf, c-ares -Description: An RPC library and framework \ No newline at end of file +Description: An RPC library and framework diff --git a/ports/gsl/CONTROL b/ports/gsl/CONTROL index 8ea4fdedd..b6dc858dc 100644 --- a/ports/gsl/CONTROL +++ b/ports/gsl/CONTROL @@ -1,3 +1,3 @@ Source: gsl -Version: 2.4-1 +Version: 2.4-2 Description: The GNU Scientific Library is a numerical library for C and C++ programmers diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index 07336b978..77082f5cb 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,3 +1,3 @@ Source: gtest -Version: 1.8 -Description: GoogleTest and GoogleMock testing frameworks. \ No newline at end of file +Version: 1.8-1 +Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtk/CONTROL b/ports/gtk/CONTROL index a668ff3f5..e5931156d 100644 --- a/ports/gtk/CONTROL +++ b/ports/gtk/CONTROL @@ -1,4 +1,4 @@ Source: gtk -Version: 3.22.19 +Version: 3.22.19-1 Description: Portable library for creating graphical user interfaces. Build-Depends: glib, atk, gdk-pixbuf, pango, cairo, libepoxy, gettext diff --git a/ports/guetzli/CONTROL b/ports/guetzli/CONTROL index 9dab9f18f..2ce631a2a 100644 --- a/ports/guetzli/CONTROL +++ b/ports/guetzli/CONTROL @@ -1,4 +1,4 @@ Source: guetzli -Version: 2017-09-02-cb5e4a86f69628 +Version: 2017-09-02-cb5e4a86f69628-1 Description: Perceptual JPEG encoder Build-Depends: libpng, butteraugli diff --git a/ports/gumbo/CONTROL b/ports/gumbo/CONTROL index b8e2e15d2..ceee95b5d 100644 --- a/ports/gumbo/CONTROL +++ b/ports/gumbo/CONTROL @@ -1,3 +1,3 @@ Source: gumbo -Version: 0.10.1 +Version: 0.10.1-1 Description: An HTML5 parsing library in pure C99 diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index acc0b6c7d..a99477b37 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.4.6-1 +Version: 1.4.6-2 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, glib (windows) diff --git a/ports/hdf5/CONTROL b/ports/hdf5/CONTROL index 70d1f9979..38a0b8382 100644 --- a/ports/hdf5/CONTROL +++ b/ports/hdf5/CONTROL @@ -1,4 +1,4 @@ Source: hdf5 -Version: 1.10.0-patch1-1 +Version: 1.10.0-patch1-2 Description: HDF5 is a data model, library, and file format for storing and managing data -Build-Depends: zlib, szip, msmpi \ No newline at end of file +Build-Depends: zlib, szip, msmpi diff --git a/ports/hpx/CONTROL b/ports/hpx/CONTROL index cfb599e51..a7f31fc42 100644 --- a/ports/hpx/CONTROL +++ b/ports/hpx/CONTROL @@ -1,5 +1,5 @@ Source: hpx -Version: 1.0.0-4 +Version: 1.0.0-5 Build-Depends: boost, hwloc Description: The C++ Standards Library for Concurrency and Parallelism HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case. diff --git a/ports/http-parser/CONTROL b/ports/http-parser/CONTROL index 605f3354c..a9edf4071 100644 --- a/ports/http-parser/CONTROL +++ b/ports/http-parser/CONTROL @@ -1,3 +1,3 @@ Source: http-parser -Version: 2.7.1-1 -Description: HTTP Parser. \ No newline at end of file +Version: 2.7.1-2 +Description: HTTP Parser. diff --git a/ports/hunspell/CONTROL b/ports/hunspell/CONTROL index ec7979e35..da62f205b 100644 --- a/ports/hunspell/CONTROL +++ b/ports/hunspell/CONTROL @@ -1,3 +1,3 @@ Source: hunspell -Version: 1.6.1-1 +Version: 1.6.1-2 Description: The most popular spellchecking library. diff --git a/ports/hwloc/CONTROL b/ports/hwloc/CONTROL index 1bd3af628..ef2564050 100644 --- a/ports/hwloc/CONTROL +++ b/ports/hwloc/CONTROL @@ -1,4 +1,4 @@ Source: hwloc -Version: 1.11.7-1 +Version: 1.11.7-2 Description: Portable Hardware Locality (hwloc) The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various system attributes such as cache and memory information as well as the locality of I/O devices such as network interfaces, InfiniBand HCAs or GPUs. diff --git a/ports/hypre/CONTROL b/ports/hypre/CONTROL index 9a96cb4d4..c41f30930 100644 --- a/ports/hypre/CONTROL +++ b/ports/hypre/CONTROL @@ -1,4 +1,4 @@ Source: hypre -Version: 2.11.2 +Version: 2.11.2-1 Description: SCALABLE LINEAR SOLVERS AND MULTIGRID METHODS -Build-Depends: msmpi \ No newline at end of file +Build-Depends: msmpi diff --git a/ports/ilmbase/CONTROL b/ports/ilmbase/CONTROL index 8bb022905..2060d94d5 100644 --- a/ports/ilmbase/CONTROL +++ b/ports/ilmbase/CONTROL @@ -1,3 +1,3 @@ Source: ilmbase -Version: 2.2.0 +Version: 2.2.0-1 Description: Base libraries from ILM for OpenEXR diff --git a/ports/jansson/CONTROL b/ports/jansson/CONTROL index c14e7d7d8..0cf311912 100644 --- a/ports/jansson/CONTROL +++ b/ports/jansson/CONTROL @@ -1,3 +1,3 @@ Source: jansson -Version: v2.10 +Version: v2.10-1 Description: Jansson is a C library for encoding, decoding and manipulating JSON data diff --git a/ports/jasper/CONTROL b/ports/jasper/CONTROL index 682501e49..70f3eda3c 100644 --- a/ports/jasper/CONTROL +++ b/ports/jasper/CONTROL @@ -1,4 +1,4 @@ Source: jasper -Version: 2.0.13 +Version: 2.0.13-1 Description: Open source implementation of the JPEG-2000 Part-1 standard Build-Depends: libjpeg-turbo diff --git a/ports/jbigkit/CONTROL b/ports/jbigkit/CONTROL index 01a9921e1..f0a7cc426 100644 --- a/ports/jbigkit/CONTROL +++ b/ports/jbigkit/CONTROL @@ -1,3 +1,3 @@ Source: jbigkit -Version: 2.1 +Version: 2.1-1 Description: A software implementation of the JBIG1 data compression standard (ITU-T T.82) diff --git a/ports/jemalloc/CONTROL b/ports/jemalloc/CONTROL index c867b4573..5bdca6c43 100644 --- a/ports/jemalloc/CONTROL +++ b/ports/jemalloc/CONTROL @@ -1,4 +1,4 @@ Source: jemalloc -Version: 4.3.1-1 +Version: 4.3.1-2 Description: jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support Build-Depends: diff --git a/ports/jsoncpp/CONTROL b/ports/jsoncpp/CONTROL index 19f3e054a..f04c231f8 100644 --- a/ports/jsoncpp/CONTROL +++ b/ports/jsoncpp/CONTROL @@ -1,3 +1,3 @@ Source: jsoncpp -Version: 1.8.1 +Version: 1.8.1-1 Description: jsoncpp is an implementation of a JSON reader and writer in C++. JSON (JavaScript Object Notation) is a lightweight data-interchange format that it is easy to parse and redeable for human. diff --git a/ports/jxrlib/CONTROL b/ports/jxrlib/CONTROL index a125cb176..9fcc36254 100644 --- a/ports/jxrlib/CONTROL +++ b/ports/jxrlib/CONTROL @@ -1,3 +1,3 @@ Source: jxrlib -Version: 1.1-3 +Version: 1.1-4 Description: Open source implementation of the jpegxr image format standard. diff --git a/ports/lcms/CONTROL b/ports/lcms/CONTROL index b8c222333..03efca607 100644 --- a/ports/lcms/CONTROL +++ b/ports/lcms/CONTROL @@ -1,4 +1,4 @@ Source: lcms -Version: 2.8-2 +Version: 2.8-3 Build-Depends: -Description: Little CMS. \ No newline at end of file +Description: Little CMS. diff --git a/ports/leptonica/CONTROL b/ports/leptonica/CONTROL index d0e305c7b..cd1c44cb4 100644 --- a/ports/leptonica/CONTROL +++ b/ports/leptonica/CONTROL @@ -1,4 +1,4 @@ Source: leptonica -Version: 1.74.4 +Version: 1.74.4-1 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/libarchive/CONTROL b/ports/libarchive/CONTROL index 3cd81ee5c..c17693807 100644 --- a/ports/libarchive/CONTROL +++ b/ports/libarchive/CONTROL @@ -1,4 +1,4 @@ Source: libarchive -Version: 3.3.2 +Version: 3.3.2-1 Description: Library for reading and writing streaming archives Build-Depends: zlib, bzip2, libxml2, lz4, liblzma, openssl diff --git a/ports/libbson/CONTROL b/ports/libbson/CONTROL index 141221ba4..263608bf6 100644 --- a/ports/libbson/CONTROL +++ b/ports/libbson/CONTROL @@ -1,3 +1,3 @@ Source: libbson -Version: 1.6.2-1 -Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. \ No newline at end of file +Version: 1.6.2-2 +Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. diff --git a/ports/libconfig/CONTROL b/ports/libconfig/CONTROL index 45bf1db9b..cd0469369 100644 --- a/ports/libconfig/CONTROL +++ b/ports/libconfig/CONTROL @@ -1,4 +1,4 @@ Source: libconfig -Version: 1.6.0 +Version: 1.6.0-1 Description: C/C++ library for processing configuration files Build-Depends: dirent diff --git a/ports/libepoxy/CONTROL b/ports/libepoxy/CONTROL index 95bc19474..79ffdbf46 100644 --- a/ports/libepoxy/CONTROL +++ b/ports/libepoxy/CONTROL @@ -1,3 +1,3 @@ Source: libepoxy -Version: 1.4.3 +Version: 1.4.3-1 Description: Epoxy is a library for handling OpenGL function pointer management for you diff --git a/ports/libevent/CONTROL b/ports/libevent/CONTROL index 87c0d0a64..f260b6d01 100644 --- a/ports/libevent/CONTROL +++ b/ports/libevent/CONTROL @@ -1,4 +1,4 @@ Source: libevent -Version: 2.1.8-2 +Version: 2.1.8-3 Build-Depends: openssl -Description: An event notification library \ No newline at end of file +Description: An event notification library diff --git a/ports/libffi/CONTROL b/ports/libffi/CONTROL index 83725f49c..ee1f0de9e 100644 --- a/ports/libffi/CONTROL +++ b/ports/libffi/CONTROL @@ -1,3 +1,3 @@ Source: libffi -Version: 3.1 +Version: 3.1-1 Description: Portable, high level programming interface to various calling conventions diff --git a/ports/libflac/CONTROL b/ports/libflac/CONTROL index b81ec3cd1..2a0572d2a 100644 --- a/ports/libflac/CONTROL +++ b/ports/libflac/CONTROL @@ -1,4 +1,4 @@ Source: libflac -Version: 1.3.2-2 +Version: 1.3.2-3 Description: Library for manipulating FLAC files Build-Depends: libogg diff --git a/ports/libgd/CONTROL b/ports/libgd/CONTROL index 4d9d5bd24..f86afe90f 100644 --- a/ports/libgd/CONTROL +++ b/ports/libgd/CONTROL @@ -1,4 +1,4 @@ Source: libgd -Version: 2.2.4-2 +Version: 2.2.4-3 Description: Open source code library for the dynamic creation of images by programmers. Build-Depends: freetype, libjpeg-turbo, libpng, libwebp, tiff, fontconfig diff --git a/ports/libharu/CONTROL b/ports/libharu/CONTROL index b32612433..4ca6f8c26 100644 --- a/ports/libharu/CONTROL +++ b/ports/libharu/CONTROL @@ -1,4 +1,4 @@ Source: libharu -Version: 2017-08-15-d84867ebf9f-1 +Version: 2017-08-15-d84867ebf9f-2 Description: libharu - free PDF library Build-Depends: zlib,libpng diff --git a/ports/libiconv/CONTROL b/ports/libiconv/CONTROL index c79f06bb8..851c8dd01 100644 --- a/ports/libiconv/CONTROL +++ b/ports/libiconv/CONTROL @@ -1,3 +1,3 @@ Source: libiconv -Version: 1.14 +Version: 1.14-1 Description: GNU Unicode text conversion diff --git a/ports/libjpeg-turbo/CONTROL b/ports/libjpeg-turbo/CONTROL index 14dd8ad9b..bf642bd1b 100644 --- a/ports/libjpeg-turbo/CONTROL +++ b/ports/libjpeg-turbo/CONTROL @@ -1,3 +1,3 @@ Source: libjpeg-turbo -Version: 1.5.2 +Version: 1.5.2-1 Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. diff --git a/ports/libkml/CONTROL b/ports/libkml/CONTROL index 1fe7086af..bc054e036 100644 --- a/ports/libkml/CONTROL +++ b/ports/libkml/CONTROL @@ -1,4 +1,4 @@ Source: libkml -Version: 1.3.0 +Version: 1.3.0-1 Description: Reference implementation of OGC KML 2.2 Build-Depends: zlib, boost, expat, minizip, uriparser diff --git a/ports/liblzma/CONTROL b/ports/liblzma/CONTROL index 3c4cbfb2b..c29002b9c 100644 --- a/ports/liblzma/CONTROL +++ b/ports/liblzma/CONTROL @@ -1,3 +1,3 @@ Source: liblzma -Version: 5.2.3-1 +Version: 5.2.3-2 Description: Compression library with an API similar to that of zlib. diff --git a/ports/libmad/CONTROL b/ports/libmad/CONTROL index 04cec21bf..daf25faa1 100644 --- a/ports/libmad/CONTROL +++ b/ports/libmad/CONTROL @@ -1,3 +1,3 @@ Source: libmad -Version: 0.15.1 +Version: 0.15.1-1 Description: high-quality MPEG audio decoder diff --git a/ports/libmariadb/CONTROL b/ports/libmariadb/CONTROL index 26e23810a..89f5647a7 100644 --- a/ports/libmariadb/CONTROL +++ b/ports/libmariadb/CONTROL @@ -1,3 +1,3 @@ Source: libmariadb -Version: 2.3.2 +Version: 2.3.2-1 Description: MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases diff --git a/ports/libmicrohttpd/CONTROL b/ports/libmicrohttpd/CONTROL index a5b6730cf..2c5815aed 100644 --- a/ports/libmicrohttpd/CONTROL +++ b/ports/libmicrohttpd/CONTROL @@ -1,3 +1,3 @@ Source: libmicrohttpd -Version: 0.9.55 +Version: 0.9.55-1 Description: GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application diff --git a/ports/libmikmod/CONTROL b/ports/libmikmod/CONTROL index b9f970959..c1dc45c3e 100644 --- a/ports/libmikmod/CONTROL +++ b/ports/libmikmod/CONTROL @@ -1,4 +1,4 @@ Source: libmikmod -Version: 3.3.11.1 +Version: 3.3.11.1-1 Description: Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm. -Build-Depends: openal-soft \ No newline at end of file +Build-Depends: openal-soft diff --git a/ports/libmodplug/CONTROL b/ports/libmodplug/CONTROL index 60614602a..e0cc81a3b 100644 --- a/ports/libmodplug/CONTROL +++ b/ports/libmodplug/CONTROL @@ -1,3 +1,3 @@ Source: libmodplug -Version: 0.8.9.0 +Version: 0.8.9.0-1 Description: The ModPlug mod file playing library. diff --git a/ports/libmysql/CONTROL b/ports/libmysql/CONTROL index 906249936..0c772e04e 100644 --- a/ports/libmysql/CONTROL +++ b/ports/libmysql/CONTROL @@ -1,3 +1,3 @@ Source: libmysql -Version: 5.7.17-1 -Description: A MySQL client library for C development. \ No newline at end of file +Version: 5.7.17-2 +Description: A MySQL client library for C development. diff --git a/ports/libnice/CONTROL b/ports/libnice/CONTROL index 7d16f4262..de7b0b67e 100644 --- a/ports/libnice/CONTROL +++ b/ports/libnice/CONTROL @@ -1,4 +1,4 @@ Source: libnice -Version: 0.1.13 +Version: 0.1.13-1 Description: Libnice is an implementation of the IETF's Interactive Connectivity Establishment (ICE) standard (RFC 5245) and the Session Traversal Utilities for NAT (STUN) standard (RFC 5389). -Build-Depends: glib \ No newline at end of file +Build-Depends: glib diff --git a/ports/libodb-pgsql/CONTROL b/ports/libodb-pgsql/CONTROL index a2daa777a..f89d1f37c 100644 --- a/ports/libodb-pgsql/CONTROL +++ b/ports/libodb-pgsql/CONTROL @@ -1,4 +1,4 @@ Source: libodb-pgsql -Version: 2.4.0 +Version: 2.4.0-1 Description: Description: PostgreSQL support for the ODB ORM library -Build-Depends: libodb, libpq \ No newline at end of file +Build-Depends: libodb, libpq diff --git a/ports/libodb-sqlite/CONTROL b/ports/libodb-sqlite/CONTROL index 5a87fb847..89be9ee88 100644 --- a/ports/libodb-sqlite/CONTROL +++ b/ports/libodb-sqlite/CONTROL @@ -1,4 +1,4 @@ Source: libodb-sqlite -Version: 2.4.0 +Version: 2.4.0-1 Description: Sqlite support for the ODB ORM library Build-Depends: libodb, sqlite3 diff --git a/ports/libodb/CONTROL b/ports/libodb/CONTROL index f9645d098..3d502effe 100644 --- a/ports/libodb/CONTROL +++ b/ports/libodb/CONTROL @@ -1,3 +1,3 @@ Source: libodb -Version: 2.4.0 +Version: 2.4.0-1 Description: ODB library, base runtime for the ODB ORM solution diff --git a/ports/libogg/CONTROL b/ports/libogg/CONTROL index 47fd8faab..39205bd71 100644 --- a/ports/libogg/CONTROL +++ b/ports/libogg/CONTROL @@ -1,3 +1,3 @@ Source: libogg -Version: 1.3.2-cab46b1-2 +Version: 1.3.2-cab46b1-3 Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs. diff --git a/ports/libopusenc/CONTROL b/ports/libopusenc/CONTROL index 8f1ebb9ed..93b2a7544 100644 --- a/ports/libopusenc/CONTROL +++ b/ports/libopusenc/CONTROL @@ -1,4 +1,4 @@ Source: libopusenc -Version: 0.1 +Version: 0.1-1 Description: Library for encoding .opus audio files and live streams. Build-Depends: opus diff --git a/ports/libp7-baical/CONTROL b/ports/libp7-baical/CONTROL index e117adea5..215810511 100644 --- a/ports/libp7-baical/CONTROL +++ b/ports/libp7-baical/CONTROL @@ -1,3 +1,3 @@ Source: libp7-baical -Version: 4.4-1 +Version: 4.4-2 Description: P7 is a library for high-speed sending telemetry & trace data from application diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index 3238eec3b..7899cbc8e 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.32 +Version: 1.6.32-1 Build-Depends: zlib Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. diff --git a/ports/libpopt/CONTROL b/ports/libpopt/CONTROL index 0065bf323..5ba1451b6 100644 --- a/ports/libpopt/CONTROL +++ b/ports/libpopt/CONTROL @@ -1,3 +1,3 @@ Source: libpopt -Version: 1.16-10~vcpkg1 +Version: 1.16-10~vcpkg1-1 Description: Library for parsing command line parameters diff --git a/ports/libpq/CONTROL b/ports/libpq/CONTROL index 580a06857..b91e08526 100644 --- a/ports/libpq/CONTROL +++ b/ports/libpq/CONTROL @@ -1,4 +1,4 @@ Source: libpq -Version: 9.6.1 +Version: 9.6.1-1 Description: The official database access API of postgresql Build-Depends: openssl diff --git a/ports/libraw/CONTROL b/ports/libraw/CONTROL index 9d23b7740..4860b0a6b 100644 --- a/ports/libraw/CONTROL +++ b/ports/libraw/CONTROL @@ -1,4 +1,4 @@ Source: libraw -Version: 0.18.2-3 +Version: 0.18.2-4 Build-Depends: lcms, jasper Description: raw image decoder library diff --git a/ports/libsigcpp/CONTROL b/ports/libsigcpp/CONTROL index da2338200..97667dd7d 100644 --- a/ports/libsigcpp/CONTROL +++ b/ports/libsigcpp/CONTROL @@ -1,3 +1,3 @@ Source: libsigcpp -Version: 2.99 +Version: 2.99-1 Description: Typesafe callback framework for C++ diff --git a/ports/libsndfile/CONTROL b/ports/libsndfile/CONTROL index c1949d8fc..9d3d9b423 100644 --- a/ports/libsndfile/CONTROL +++ b/ports/libsndfile/CONTROL @@ -1,4 +1,4 @@ Source: libsndfile -Version: libsndfile-1.0.29-6830c42 +Version: libsndfile-1.0.29-6830c42-1 Description: Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo Build-Depends: libogg, libflac, libvorbis diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL index 284d44091..9ae256937 100644 --- a/ports/libssh/CONTROL +++ b/ports/libssh/CONTROL @@ -1,4 +1,4 @@ Source: libssh -Version: 0.7.5 +Version: 0.7.5-1 Description:libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side Build-Depends: zlib, openssl diff --git a/ports/libssh2/CONTROL b/ports/libssh2/CONTROL index 715ffa0bd..5c68d2693 100644 --- a/ports/libssh2/CONTROL +++ b/ports/libssh2/CONTROL @@ -1,4 +1,4 @@ Source: libssh2 -Version: 1.8.0-1 +Version: 1.8.0-2 Build-Depends: zlib, openssl -Description: The SSH library \ No newline at end of file +Description: The SSH library diff --git a/ports/libstemmer/CONTROL b/ports/libstemmer/CONTROL index f0a4db41c..c09295b62 100644 --- a/ports/libstemmer/CONTROL +++ b/ports/libstemmer/CONTROL @@ -1,3 +1,3 @@ Source: libstemmer -Version: 2017-9-02 +Version: 2017-9-3 Description: Snowball is a small string processing language designed for creating stemming algorithms for use in Information Retrieval diff --git a/ports/libtheora/CONTROL b/ports/libtheora/CONTROL index b964eb8ef..7324f0526 100644 --- a/ports/libtheora/CONTROL +++ b/ports/libtheora/CONTROL @@ -1,4 +1,4 @@ Source: libtheora -Version: 1.2.0alpha1-20170719~vcpkg1 +Version: 1.2.0alpha1-20170719~vcpkg1-1 Description: Theora is a free and open video compression format from the Xiph.org Foundation. Build-Depends: libogg diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL index 3e2294cee..f2618a4ef 100644 --- a/ports/libtorrent/CONTROL +++ b/ports/libtorrent/CONTROL @@ -1,4 +1,4 @@ Source: libtorrent -Version: 1.1.4 +Version: 1.1.4-1 Description: An efficient feature complete C++ BitTorrent implementation Build-Depends: boost, openssl diff --git a/ports/libunibreak/CONTROL b/ports/libunibreak/CONTROL index b8a96abd4..a8df4119f 100644 --- a/ports/libunibreak/CONTROL +++ b/ports/libunibreak/CONTROL @@ -1,3 +1,3 @@ Source: libunibreak -Version: 4.0 +Version: 4.0-1 Description: an implementation of the line breaking and word breaking algorithms as described in [Unicode Standard Annex 14] 1 and [Unicode Standard Annex 29] 2. Check the project's [home page] 3 for up-to-date information. diff --git a/ports/libusb-win32/CONTROL b/ports/libusb-win32/CONTROL index f95a959f3..eba6e283d 100644 --- a/ports/libusb-win32/CONTROL +++ b/ports/libusb-win32/CONTROL @@ -1,3 +1,3 @@ Source: libusb-win32 -Version: 1.2.6.0 +Version: 1.2.6.0-1 Description: Allows user space applications to access many USB device on Windows. diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index 034dd4f94..ba5d7e85e 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.14.1 -Description: libuv is a multi-platform support library with a focus on asynchronous I/O. \ No newline at end of file +Version: 1.14.1-1 +Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/libvorbis/CONTROL b/ports/libvorbis/CONTROL index dec9363b2..20f8c6e29 100644 --- a/ports/libvorbis/CONTROL +++ b/ports/libvorbis/CONTROL @@ -1,4 +1,4 @@ Source: libvorbis -Version: 1.3.5-143caf4-2 +Version: 1.3.5-143caf4-3 Description: Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format. Build-Depends: libogg diff --git a/ports/libwebm/CONTROL b/ports/libwebm/CONTROL index ca76af460..eb19cf16a 100644 --- a/ports/libwebm/CONTROL +++ b/ports/libwebm/CONTROL @@ -1,3 +1,3 @@ Source: libwebm -Version: 1.0.0.27-1 +Version: 1.0.0.27-2 Description: WebM File Parser diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index 2b3c36554..e042390f4 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -1,3 +1,3 @@ Source: libwebp -Version: 0.6.0-1 +Version: 0.6.0-2 Description: Lossy compression of digital photographic images. diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL index 61a9cc449..816253a2c 100644 --- a/ports/libwebsockets/CONTROL +++ b/ports/libwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: libwebsockets -Version: 2.0.0-1 +Version: 2.0.0-2 Build-Depends: zlib, openssl -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. \ No newline at end of file +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/libxml2/CONTROL b/ports/libxml2/CONTROL index 9f1564226..ce430ceff 100644 --- a/ports/libxml2/CONTROL +++ b/ports/libxml2/CONTROL @@ -1,4 +1,4 @@ Source: libxml2 -Version: 2.9.4-1 +Version: 2.9.4-2 Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform) Build-Depends: zlib, libiconv, liblzma diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL index 2106a5f94..045030e95 100644 --- a/ports/libzip/CONTROL +++ b/ports/libzip/CONTROL @@ -1,4 +1,4 @@ Source: libzip -Version: 1.2.0-1 +Version: 1.2.0-2 Build-Depends: zlib Description: A library for reading, creating, and modifying zip archives. diff --git a/ports/live555/CONTROL b/ports/live555/CONTROL index 37048f268..d2ff15211 100644 --- a/ports/live555/CONTROL +++ b/ports/live555/CONTROL @@ -1,3 +1,3 @@ Source: live555 -Version: 2017.06.04 +Version: 2017.06.04-1 Description: A complete RTSP server application diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index 9b7936004..9b7629f42 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,3 +1,3 @@ Source: llvm -Version: 4.0.0 +Version: 4.0.0-1 Description: The LLVM Compiler Infrastructure diff --git a/ports/lmdb/CONTROL b/ports/lmdb/CONTROL index 13c648fa6..c926fd78f 100644 --- a/ports/lmdb/CONTROL +++ b/ports/lmdb/CONTROL @@ -1,3 +1,3 @@ Source: lmdb -Version: 0.9.18-2 -Description: LMDB is an extraordinarily fast, memory-efficient database \ No newline at end of file +Version: 0.9.18-3 +Description: LMDB is an extraordinarily fast, memory-efficient database diff --git a/ports/lodepng/CONTROL b/ports/lodepng/CONTROL index 36d8c478c..230e27252 100644 --- a/ports/lodepng/CONTROL +++ b/ports/lodepng/CONTROL @@ -1,3 +1,3 @@ Source: lodepng -Version: 2017-09-01-8a0f16afe74a6a +Version: 2017-09-01-8a0f16afe74a6a-1 Description: PNG encoder and decoder in C and C++ diff --git a/ports/log4cplus/CONTROL b/ports/log4cplus/CONTROL index d4af82051..882ee88b8 100644 --- a/ports/log4cplus/CONTROL +++ b/ports/log4cplus/CONTROL @@ -1,3 +1,3 @@ Source: log4cplus -Version: REL_1_2_1-RC2 +Version: REL_1_2_1-RC2-1 Description: A simple to use C++ logging API providing thread--safe, flexible, and arbitrarily granular control over log management and configuration diff --git a/ports/lpeg/CONTROL b/ports/lpeg/CONTROL index 5f2a3aff7..9896815b8 100644 --- a/ports/lpeg/CONTROL +++ b/ports/lpeg/CONTROL @@ -1,4 +1,4 @@ Source: lpeg -Version: 1.0.1-2 +Version: 1.0.1-3 Description: LPeg is a pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs). Build-Depends: lua diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL index 266bd153c..e34436ad0 100644 --- a/ports/lua/CONTROL +++ b/ports/lua/CONTROL @@ -1,3 +1,3 @@ Source: lua -Version: 5.3.4 +Version: 5.3.4-1 Description: a powerful, fast, lightweight, embeddable scripting language diff --git a/ports/luafilesystem/CONTROL b/ports/luafilesystem/CONTROL index f101b7cb3..149a899a6 100644 --- a/ports/luafilesystem/CONTROL +++ b/ports/luafilesystem/CONTROL @@ -1,4 +1,4 @@ Source: luafilesystem -Version: 1.6.3 +Version: 1.6.3-1 Description: LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution. Build-Depends: lua diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL index c6d730c2d..5e8b87bd2 100644 --- a/ports/lz4/CONTROL +++ b/ports/lz4/CONTROL @@ -1,3 +1,3 @@ Source: lz4 -Version: 1.8.0 +Version: 1.8.0-1 Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core. diff --git a/ports/lzfse/CONTROL b/ports/lzfse/CONTROL index 7559d661e..34276814f 100644 --- a/ports/lzfse/CONTROL +++ b/ports/lzfse/CONTROL @@ -1,3 +1,3 @@ Source: lzfse -Version: 1.0 +Version: 1.0-1 Description: Lempel-Ziv style data compressor using Finite State Entropy coding. diff --git a/ports/lzo/CONTROL b/ports/lzo/CONTROL index ba477b484..d124020b8 100644 --- a/ports/lzo/CONTROL +++ b/ports/lzo/CONTROL @@ -1,3 +1,3 @@ Source: lzo -Version: 2.10-1 +Version: 2.10-2 Description: Lossless data compression library diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index f6e194c9f..6c187f423 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017-4 +Version: jun2017-5 Build-Depends: stb, magnum Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index a040014da..382e39075 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-5 +Version: jun2017-6 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/matio/CONTROL b/ports/matio/CONTROL index f4dac30a1..7912440e3 100644 --- a/ports/matio/CONTROL +++ b/ports/matio/CONTROL @@ -1,4 +1,4 @@ Source: matio -Version: 1.5.10-1 +Version: 1.5.10-2 Description: MATLAB MAT File I/O Library Build-Depends: zlib, hdf5 diff --git a/ports/meschach/CONTROL b/ports/meschach/CONTROL index 7e1d75b8a..a8418b2b1 100644 --- a/ports/meschach/CONTROL +++ b/ports/meschach/CONTROL @@ -1,3 +1,3 @@ Source: meschach -Version: 1.2b +Version: 1.2b-1 Description: Matrix computations in C diff --git a/ports/metis/CONTROL b/ports/metis/CONTROL index cc604ce8f..f302a9ce4 100644 --- a/ports/metis/CONTROL +++ b/ports/metis/CONTROL @@ -1,3 +1,3 @@ Source: metis -Version: 5.1.0 +Version: 5.1.0-1 Description: Serial Graph Partitioning and Fill-reducing Matrix Ordering diff --git a/ports/minizip/CONTROL b/ports/minizip/CONTROL index b3023e990..135303129 100644 --- a/ports/minizip/CONTROL +++ b/ports/minizip/CONTROL @@ -1,4 +1,4 @@ Source: minizip -Version: 1.2.11-1 +Version: 1.2.11-2 Description: Build-Depends: bzip2, zlib diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL index a460b313c..4b100879a 100644 --- a/ports/mongo-c-driver/CONTROL +++ b/ports/mongo-c-driver/CONTROL @@ -1,4 +1,4 @@ Source: mongo-c-driver -Version: 1.6.2 +Version: 1.6.2-1 Build-Depends: libbson, openssl (uwp) -Description: Client library written in C for MongoDB. \ No newline at end of file +Description: Client library written in C for MongoDB. diff --git a/ports/mongo-cxx-driver/CONTROL b/ports/mongo-cxx-driver/CONTROL index 9b7e29ba3..306f6a96c 100644 --- a/ports/mongo-cxx-driver/CONTROL +++ b/ports/mongo-cxx-driver/CONTROL @@ -1,4 +1,4 @@ Source: mongo-cxx-driver -Version: 3.1.1 +Version: 3.1.1-1 Build-Depends: boost, libbson, mongo-c-driver -Description: MongoDB C++ Driver. \ No newline at end of file +Description: MongoDB C++ Driver. diff --git a/ports/mpfr/CONTROL b/ports/mpfr/CONTROL index 16224d73b..2d5d4fedd 100644 --- a/ports/mpfr/CONTROL +++ b/ports/mpfr/CONTROL @@ -1,4 +1,4 @@ Source: mpfr -Version: 3.1.5 +Version: 3.1.5-1 Description: The MPFR library is a C library for multiple-precision floating-point computations with correct rounding -Build-Depends: mpir \ No newline at end of file +Build-Depends: mpir diff --git a/ports/msgpack/CONTROL b/ports/msgpack/CONTROL index 1d0daba68..7c9933d27 100644 --- a/ports/msgpack/CONTROL +++ b/ports/msgpack/CONTROL @@ -1,3 +1,3 @@ Source: msgpack -Version: 2.1.5 +Version: 2.1.5-1 Description: MessagePack is an efficient binary serialization format, which lets you exchange data among multiple languages like JSON, except that it's faster and smaller. diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL index 680dec287..ae4168544 100644 --- a/ports/nana/CONTROL +++ b/ports/nana/CONTROL @@ -1,4 +1,4 @@ Source: nana -Version: 1.5.4 +Version: 1.5.4-1 Description: Cross-platform library for GUI programming in modern C++ style. Build-Depends: libpng, libjpeg-turbo diff --git a/ports/nanodbc/CONTROL b/ports/nanodbc/CONTROL index 2611bac80..0343119a0 100644 --- a/ports/nanodbc/CONTROL +++ b/ports/nanodbc/CONTROL @@ -1,3 +1,3 @@ Source: nanodbc -Version: 2.12.4 -Description: A small C++ wrapper for the native C ODBC API. \ No newline at end of file +Version: 2.12.4-1 +Description: A small C++ wrapper for the native C ODBC API. diff --git a/ports/netcdf-c/CONTROL b/ports/netcdf-c/CONTROL index 1303cb517..a7f3816ba 100644 --- a/ports/netcdf-c/CONTROL +++ b/ports/netcdf-c/CONTROL @@ -1,4 +1,4 @@ Source: netcdf-c -Version: 4.4.1.1-1 +Version: 4.4.1.1-2 Build-Depends: hdf5, curl 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-cxx4/CONTROL b/ports/netcdf-cxx4/CONTROL index 9fcda5468..a3b7278a6 100644 --- a/ports/netcdf-cxx4/CONTROL +++ b/ports/netcdf-cxx4/CONTROL @@ -1,4 +1,4 @@ Source: netcdf-cxx4 -Version: 4.3.0 +Version: 4.3.0-1 Build-Depends: netcdf-c Description: a set of machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. diff --git a/ports/nlohmann-json/CONTROL b/ports/nlohmann-json/CONTROL index 4e65a9d93..90b6e504e 100644 --- a/ports/nlohmann-json/CONTROL +++ b/ports/nlohmann-json/CONTROL @@ -1,3 +1,3 @@ Source: nlohmann-json -Version: 2.1.1 +Version: 2.1.1-1 Description: JSON for Modern C++ diff --git a/ports/nlopt/CONTROL b/ports/nlopt/CONTROL index 1c3ab9915..22d763b0b 100644 --- a/ports/nlopt/CONTROL +++ b/ports/nlopt/CONTROL @@ -1,3 +1,3 @@ Source: nlopt -Version: 2.4.2-c43afa08d~vcpkg1 +Version: 2.4.2-c43afa08d~vcpkg1-1 Description: a library for nonlinear local and global optimization, for functions with and without gradient information. diff --git a/ports/octomap/CONTROL b/ports/octomap/CONTROL index f54112669..6b26d7ef1 100644 --- a/ports/octomap/CONTROL +++ b/ports/octomap/CONTROL @@ -1,3 +1,3 @@ Source: octomap -Version: cefed0c1d79afafa5aeb05273cf1246b093b771c-1 +Version: cefed0c1d79afafa5aeb05273cf1246b093b771c-2 Description: An Efficient Probabilistic 3D Mapping Framework Based on Octrees diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL index 40d9e2416..a3a2460c4 100644 --- a/ports/ogre/CONTROL +++ b/ports/ogre/CONTROL @@ -1,4 +1,4 @@ Source: ogre -Version: 1.9.0 +Version: 1.9.0 -1 Build-Depends: freeimage, freetype, zlib, zziplib Description: 3D Object-Oriented Graphics Rendering Engine diff --git a/ports/openal-soft/CONTROL b/ports/openal-soft/CONTROL index 742bab3fe..094f5c188 100644 --- a/ports/openal-soft/CONTROL +++ b/ports/openal-soft/CONTROL @@ -1,3 +1,3 @@ Source: openal-soft -Version: 1.18.1 +Version: 1.18.1-1 Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. diff --git a/ports/openblas/CONTROL b/ports/openblas/CONTROL index 7651436c1..808d52ac9 100644 --- a/ports/openblas/CONTROL +++ b/ports/openblas/CONTROL @@ -1,3 +1,3 @@ Source: openblas -Version: v0.2.20-1 +Version: v0.2.20-2 Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 7dbaf64c2..1eb5b617c 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.2.0-3 +Version: 3.2.0-4 Build-Depends: zlib, libpng, libjpeg-turbo, tiff #Use the following line instead for optional features from OpenCV-contrib that require protobuf #Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf diff --git a/ports/openexr/CONTROL b/ports/openexr/CONTROL index 1ce905777..b50a48ae8 100644 --- a/ports/openexr/CONTROL +++ b/ports/openexr/CONTROL @@ -1,4 +1,4 @@ Source: openexr -Version: 2.2.0 +Version: 2.2.0-1 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, ilmbase diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index b04914c5c..1421e3acb 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -1,4 +1,4 @@ Source: openimageio -Version: 1.7.15 +Version: 1.7.15-1 Description: An library for reading and writing images, and a bunch of related classes, utilities, and application -Build-Depends: boost, libjpeg-turbo, tiff, libpng, openexr \ No newline at end of file +Build-Depends: boost, libjpeg-turbo, tiff, libpng, openexr diff --git a/ports/openjpeg/CONTROL b/ports/openjpeg/CONTROL index 7a1140c10..862d82ab8 100644 --- a/ports/openjpeg/CONTROL +++ b/ports/openjpeg/CONTROL @@ -1,3 +1,3 @@ Source: openjpeg -Version: 2.2.0 +Version: 2.2.0-1 Description: JPEG 2000 image library diff --git a/ports/opusfile/CONTROL b/ports/opusfile/CONTROL index fd8a652c8..5489cb4b2 100644 --- a/ports/opusfile/CONTROL +++ b/ports/opusfile/CONTROL @@ -1,4 +1,4 @@ Source: opusfile -Version: 0.9 +Version: 0.9-1 Description: Stand-alone decoder library for .opus streams Build-Depends: libogg, opus, openssl diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL index 867a8b4e0..df2af4bc1 100644 --- a/ports/osg/CONTROL +++ b/ports/osg/CONTROL @@ -1,4 +1,4 @@ Source: osg -Version: 3.5.6 +Version: 3.5.6-1 Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit. Build-Depends: freetype, jasper, openexr, zlib, gdal, giflib, libjpeg-turbo, libpng, tiff diff --git a/ports/paho-mqtt/CONTROL b/ports/paho-mqtt/CONTROL index 8c751a868..bd363be27 100644 --- a/ports/paho-mqtt/CONTROL +++ b/ports/paho-mqtt/CONTROL @@ -1,4 +1,4 @@ Source: paho-mqtt -Version: 1.2.0 +Version: 1.2.0-1 Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things Build-Depends: openssl diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL index 44c8c9b83..aa6c73e68 100644 --- a/ports/pango/CONTROL +++ b/ports/pango/CONTROL @@ -1,4 +1,4 @@ Source: pango -Version: 1.40.11 +Version: 1.40.11-1 Description: Text and font handling library. Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL index 5e110627b..79b7f6947 100644 --- a/ports/pangolin/CONTROL +++ b/ports/pangolin/CONTROL @@ -1,4 +1,4 @@ Source: pangolin -Version: 0.5 +Version: 0.5-1 Build-Depends: eigen3 -Description: Lightweight GUI Library \ No newline at end of file +Description: Lightweight GUI Library diff --git a/ports/parmetis/CONTROL b/ports/parmetis/CONTROL index 86a367cbd..bb2237654 100644 --- a/ports/parmetis/CONTROL +++ b/ports/parmetis/CONTROL @@ -1,4 +1,4 @@ Source: parmetis -Version: 4.0.3 +Version: 4.0.3-1 Description: Parallel Graph Partitioning and Fill-reducing Matrix Ordering Build-Depends: metis, msmpi diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index a92e912de..e9547c8cb 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,4 +1,4 @@ Source: pcl -Version: 1.8.1 +Version: 1.8.1-1 Build-Depends: boost, eigen3, flann, qhull, vtk, openni2, qt5 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. diff --git a/ports/pcre/CONTROL b/ports/pcre/CONTROL index 6a321d5d0..b230a2909 100644 --- a/ports/pcre/CONTROL +++ b/ports/pcre/CONTROL @@ -1,3 +1,3 @@ Source: pcre -Version: 8.41 +Version: 8.41-1 Description: Perl Compatible Regular Expresions diff --git a/ports/pcre2/CONTROL b/ports/pcre2/CONTROL index b25e10d49..06d683de4 100644 --- a/ports/pcre2/CONTROL +++ b/ports/pcre2/CONTROL @@ -1,3 +1,3 @@ Source: pcre2 -Version: 10.30 +Version: 10.30-1 Description: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library diff --git a/ports/physfs/CONTROL b/ports/physfs/CONTROL index 5eac58c36..20d973f18 100644 --- a/ports/physfs/CONTROL +++ b/ports/physfs/CONTROL @@ -1,4 +1,4 @@ Source: physfs -Version: 2.0.3-1 +Version: 2.0.3-2 Description: a library to provide abstract access to various archives Build-Depends: zlib diff --git a/ports/piex/CONTROL b/ports/piex/CONTROL index 187f253ef..2311bbbaf 100644 --- a/ports/piex/CONTROL +++ b/ports/piex/CONTROL @@ -1,3 +1,3 @@ Source: piex -Version: 2017-09-01-473434f2dd974978b +Version: 2017-09-01-473434f2dd974978b-1 Description: The Preview Image Extractor (PIEX) is designed to find and extract the largest diff --git a/ports/pixman/CONTROL b/ports/pixman/CONTROL index 3603242d0..940c30cc2 100644 --- a/ports/pixman/CONTROL +++ b/ports/pixman/CONTROL @@ -1,3 +1,3 @@ Source: pixman -Version: 0.34.0-1 +Version: 0.34.0-2 Description: Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization. diff --git a/ports/plibsys/CONTROL b/ports/plibsys/CONTROL index 5f099fc51..92d57ca47 100644 --- a/ports/plibsys/CONTROL +++ b/ports/plibsys/CONTROL @@ -1,3 +1,3 @@ Source: plibsys -Version: 0.0.3 +Version: 0.0.3-1 Description: Highly portable C system library: threads and synchronization, sockets, IPC, data structures and more. diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index 2762c6248..2c78b6c6e 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,4 +1,4 @@ Source: poco -Version: 1.7.8 +Version: 1.7.8-1 Build-Depends: zlib, pcre, sqlite3, expat Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. diff --git a/ports/podofo/CONTROL b/ports/podofo/CONTROL index dfb5446d1..55fa20a28 100644 --- a/ports/podofo/CONTROL +++ b/ports/podofo/CONTROL @@ -1,4 +1,4 @@ Source: podofo -Version: 0.9.5 +Version: 0.9.5-1 Description: PoDoFo is a library to work with the PDF file format -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl, freetype, fontconfig \ No newline at end of file +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl, freetype, fontconfig diff --git a/ports/portaudio/CONTROL b/ports/portaudio/CONTROL index 5e5ffc57c..829a87026 100644 --- a/ports/portaudio/CONTROL +++ b/ports/portaudio/CONTROL @@ -1,3 +1,3 @@ Source: portaudio -Version: 19.0.6.00-1 +Version: 19.0.6.00-2 Description: PortAudio Portable Cross-platform Audio I/O API PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O. diff --git a/ports/pqp/CONTROL b/ports/pqp/CONTROL index 8b9882631..69a72c33e 100644 --- a/ports/pqp/CONTROL +++ b/ports/pqp/CONTROL @@ -1,3 +1,3 @@ Source: pqp -Version: 1.3-1 +Version: 1.3-2 Description: a proximity query package diff --git a/ports/proj/CONTROL b/ports/proj/CONTROL index b706ca11a..695fa53ce 100644 --- a/ports/proj/CONTROL +++ b/ports/proj/CONTROL @@ -1,3 +1,3 @@ Source: proj -Version: 4.9.3 +Version: 4.9.3-1 Description: PROJ.4 library for cartographic projections diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 68d305ce8..9fe4bbb32 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,4 +1,4 @@ Source: protobuf -Version: 3.4.0-1 +Version: 3.4.0-2 Build-Depends: zlib -Description: Protocol Buffers - Google's data interchange format \ No newline at end of file +Description: Protocol Buffers - Google's data interchange format diff --git a/ports/ptex/CONTROL b/ports/ptex/CONTROL index b2e6bff27..e41db7678 100644 --- a/ports/ptex/CONTROL +++ b/ports/ptex/CONTROL @@ -1,4 +1,4 @@ Source: ptex -Version: 2.1.28 +Version: 2.1.28-1 Description: Per-Face Texture Mapping for Production Rendering. Build-Depends: zlib diff --git a/ports/pthreads/CONTROL b/ports/pthreads/CONTROL index 81b97f70b..ee9b7b5fa 100644 --- a/ports/pthreads/CONTROL +++ b/ports/pthreads/CONTROL @@ -1,3 +1,3 @@ Source: pthreads -Version: 2.9.1 +Version: 2.9.1-1 Description: pthreads for windows diff --git a/ports/pugixml/CONTROL b/ports/pugixml/CONTROL index 298d433b2..5fc5f1e4e 100644 --- a/ports/pugixml/CONTROL +++ b/ports/pugixml/CONTROL @@ -1,3 +1,3 @@ Source: pugixml -Version: 1.8.1 +Version: 1.8.1-1 Description: C++ XML processing library diff --git a/ports/pybind11/CONTROL b/ports/pybind11/CONTROL index e5ca37eb4..e18550cf2 100644 --- a/ports/pybind11/CONTROL +++ b/ports/pybind11/CONTROL @@ -1,4 +1,4 @@ Source: pybind11 -Version: 2.1.0-1 +Version: 2.1.0-2 Description: pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. -Build-Depends: python3 \ No newline at end of file +Build-Depends: python3 diff --git a/ports/pystring/CONTROL b/ports/pystring/CONTROL index 23980ef12..6b4f14035 100644 --- a/ports/pystring/CONTROL +++ b/ports/pystring/CONTROL @@ -1,3 +1,3 @@ Source: pystring -Version: 1.1.3 +Version: 1.1.3-1 Description: Pystring is a collection of C++ functions which match the interface and behavior of python's string class methods using std::string diff --git a/ports/qca/CONTROL b/ports/qca/CONTROL index cbe923bb4..7d757297c 100644 --- a/ports/qca/CONTROL +++ b/ports/qca/CONTROL @@ -1,4 +1,4 @@ Source: qca -Version: 2.2.0 +Version: 2.2.0-1 Description: Qt Cryptographic Architecture (QCA). Sources: https://cgit.kde.org/qca.git/ Build-Depends: qt5 diff --git a/ports/qhull/CONTROL b/ports/qhull/CONTROL index a36061285..ff0847781 100644 --- a/ports/qhull/CONTROL +++ b/ports/qhull/CONTROL @@ -1,3 +1,3 @@ Source: qhull -Version: 2015.2 +Version: 2015.2-1 Description: computes the convex hull, Delaunay triangulation, Voronoi diagram diff --git a/ports/ragel/CONTROL b/ports/ragel/CONTROL index bb83fa72f..bb6595ac5 100644 --- a/ports/ragel/CONTROL +++ b/ports/ragel/CONTROL @@ -1,3 +1,3 @@ Source: ragel -Version: 6.10 +Version: 6.10-1 Description: Ragel State Machine Compiler diff --git a/ports/rhash/CONTROL b/ports/rhash/CONTROL index cfa5c6cb0..16b50c945 100644 --- a/ports/rhash/CONTROL +++ b/ports/rhash/CONTROL @@ -1,3 +1,3 @@ Source: rhash -Version: 1.3.5 +Version: 1.3.5-1 Description: C library for computing a wide variety of hash sums diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 2efbda7c3..59850ff03 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,4 @@ Source: rocksdb -Version: 2017-06-28-18c63af6ef2b9f014c404b88488ae52e6fead03c +Version: 2017-06-28-18c63af6ef2b9f014c404b88488ae52e6fead03c-1 Description: A library that provides an embeddable, persistent key-value store for fast storage Build-Depends: snappy, lz4, gflags, zlib, gtest diff --git a/ports/rtmidi/CONTROL b/ports/rtmidi/CONTROL index 9057812a0..9eaad9735 100644 --- a/ports/rtmidi/CONTROL +++ b/ports/rtmidi/CONTROL @@ -1,3 +1,3 @@ Source: rtmidi -Version: 2.1.1-1 +Version: 2.1.1-2 Description: A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMidi & JACK) and Windows (Multimedia) diff --git a/ports/rttr/CONTROL b/ports/rttr/CONTROL index 950247999..e7ed99b8c 100644 --- a/ports/rttr/CONTROL +++ b/ports/rttr/CONTROL @@ -1,3 +1,3 @@ Source: rttr -Version: 0.9.5 +Version: 0.9.5-1 Description: an easy and intuitive way to use reflection in C++ diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL index 799306235..0e0b71aec 100644 --- a/ports/sdl2-gfx/CONTROL +++ b/ports/sdl2-gfx/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-gfx -Version: 1.0.3-1 +Version: 1.0.3-2 Build-Depends: sdl2 Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer. diff --git a/ports/sdl2-image/CONTROL b/ports/sdl2-image/CONTROL index 5ebec2f38..a5c41a334 100644 --- a/ports/sdl2-image/CONTROL +++ b/ports/sdl2-image/CONTROL @@ -1,5 +1,5 @@ Source: sdl2-image -Version: 2.0.1-1 +Version: 2.0.1-2 Build-Depends: sdl2, libpng, libjpeg-turbo, tiff, libwebp 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-mixer/CONTROL b/ports/sdl2-mixer/CONTROL index 88356b73f..756a7380d 100644 --- a/ports/sdl2-mixer/CONTROL +++ b/ports/sdl2-mixer/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-mixer -Version: 2.0.1-1 +Version: 2.0.1-2 Description: Multi-channel audio mixer library for SDL. Build-Depends: sdl2, libflac, smpeg2, libmodplug, libvorbis diff --git a/ports/sdl2-net/CONTROL b/ports/sdl2-net/CONTROL index 692bb7615..e64277b39 100644 --- a/ports/sdl2-net/CONTROL +++ b/ports/sdl2-net/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-net -Version: 2.0.1-1 +Version: 2.0.1-2 Description: Networking library for SDL Build-Depends: sdl2 diff --git a/ports/sdl2-ttf/CONTROL b/ports/sdl2-ttf/CONTROL index fe09831ee..7dbe06367 100644 --- a/ports/sdl2-ttf/CONTROL +++ b/ports/sdl2-ttf/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-ttf -Version: 2.0.14-1 +Version: 2.0.14-2 Description: A library for rendering TrueType fonts with SDL Build-Depends: sdl2, freetype diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index f22820579..ba795b93f 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.5-3 +Version: 2.0.5-4 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/sery/CONTROL b/ports/sery/CONTROL index 782452b2a..1a771771b 100644 --- a/ports/sery/CONTROL +++ b/ports/sery/CONTROL @@ -1,3 +1,3 @@ Source: sery -Version: 1.0.0 +Version: 1.0.0-1 Description: Simple binary (de)serialization library diff --git a/ports/sfml/CONTROL b/ports/sfml/CONTROL index e7fb08ecd..748e811f0 100644 --- a/ports/sfml/CONTROL +++ b/ports/sfml/CONTROL @@ -1,4 +1,4 @@ Source: sfml -Version: 2.4.2 +Version: 2.4.2-1 Description: Simple and fast multimedia library Build-Depends: freetype, libflac, libjpeg-turbo, libogg, libvorbis, openal-soft, stb diff --git a/ports/shaderc/CONTROL b/ports/shaderc/CONTROL index 3bc872a10..5a5c2c580 100644 --- a/ports/shaderc/CONTROL +++ b/ports/shaderc/CONTROL @@ -1,4 +1,4 @@ Source: shaderc -Version: 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da +Version: 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-1 Description: A collection of tools, libraries and tests for shader compilation. Build-Depends: glslang, spirv-tools diff --git a/ports/signalrclient/CONTROL b/ports/signalrclient/CONTROL index a5673e964..babcce692 100644 --- a/ports/signalrclient/CONTROL +++ b/ports/signalrclient/CONTROL @@ -1,4 +1,4 @@ Source: signalrclient -Version: 1.0.0-beta1 +Version: 1.0.0-beta1-1 Build-Depends: cpprestsdk -Description: C++ client for SignalR. \ No newline at end of file +Description: C++ client for SignalR. diff --git a/ports/smpeg2/CONTROL b/ports/smpeg2/CONTROL index 26c0b3904..9d00d9429 100644 --- a/ports/smpeg2/CONTROL +++ b/ports/smpeg2/CONTROL @@ -1,4 +1,4 @@ Source: smpeg2 -Version: 2.0.0-1 +Version: 2.0.0-2 Description: SDL MPEG Player Library Build-Depends: sdl2 diff --git a/ports/snappy/CONTROL b/ports/snappy/CONTROL index 287c9235e..230383955 100644 --- a/ports/snappy/CONTROL +++ b/ports/snappy/CONTROL @@ -1,3 +1,3 @@ Source: snappy -Version: 1.1.7 +Version: 1.1.7-1 Description: A fast compressor/decompressor. diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL index 9b9bd724e..95bcb751b 100644 --- a/ports/sobjectizer/CONTROL +++ b/ports/sobjectizer/CONTROL @@ -1,3 +1,3 @@ Source: sobjectizer -Version: 5.5.19.2 +Version: 5.5.19.2-1 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/soci/CONTROL b/ports/soci/CONTROL index 5480bb712..1d1708a64 100644 --- a/ports/soci/CONTROL +++ b/ports/soci/CONTROL @@ -1,3 +1,3 @@ Source: soci -Version: 2016.10.22 +Version: 2016.10.22-1 Description: SOCI database access library diff --git a/ports/sophus/CONTROL b/ports/sophus/CONTROL index 8214c4e7e..f6433e410 100644 --- a/ports/sophus/CONTROL +++ b/ports/sophus/CONTROL @@ -1,4 +1,4 @@ Source: sophus -Version: 1.0.0 +Version: 1.0.0-1 Build-Depends: eigen3, ceres Description: Lie group library for C++ diff --git a/ports/spdlog/CONTROL b/ports/spdlog/CONTROL index e060a2665..ac0b51be7 100644 --- a/ports/spdlog/CONTROL +++ b/ports/spdlog/CONTROL @@ -1,4 +1,4 @@ Source: spdlog -Version: 0.14.0 +Version: 0.14.0-1 Description: Very fast, header only, C++ logging library Build-Depends: fmt diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL index 680dcdf13..5d3fa10a2 100644 --- a/ports/speex/CONTROL +++ b/ports/speex/CONTROL @@ -1,3 +1,3 @@ Source: speex -Version: 1.2.0 +Version: 1.2.0-1 Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. diff --git a/ports/speexdsp/CONTROL b/ports/speexdsp/CONTROL index 71144ecdd..d7e8bac98 100644 --- a/ports/speexdsp/CONTROL +++ b/ports/speexdsp/CONTROL @@ -1,4 +1,4 @@ Source: speexdsp -Version: 1.2rc3-1 +Version: 1.2rc3-2 Description: A patent-free, Open Source/Free Software DSP library. Build-Depends: diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL index 4f1ce502f..da2e2f29b 100644 --- a/ports/spirv-tools/CONTROL +++ b/ports/spirv-tools/CONTROL @@ -1,3 +1,3 @@ Source: spirv-tools -Version: v2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23 +Version: v2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 Description: API and commands for processing SPIR-V modules diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index d833f02b9..e3a4470c7 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,3 +1,3 @@ Source: sqlite3 -Version: 3.19.1-1 -Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. \ No newline at end of file +Version: 3.19.1-2 +Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. diff --git a/ports/suitesparse/CONTROL b/ports/suitesparse/CONTROL index 000132c37..af5e1b631 100644 --- a/ports/suitesparse/CONTROL +++ b/ports/suitesparse/CONTROL @@ -1,4 +1,4 @@ Source: suitesparse -Version: 4.5.5-2 +Version: 4.5.5-3 Build-Depends: metis, clapack Description: algebra library diff --git a/ports/sundials/CONTROL b/ports/sundials/CONTROL index b1f0c349b..376a430fc 100644 --- a/ports/sundials/CONTROL +++ b/ports/sundials/CONTROL @@ -1,3 +1,3 @@ Source: sundials -Version: 2.7.0 +Version: 2.7.0-1 Description: SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers) diff --git a/ports/szip/CONTROL b/ports/szip/CONTROL index acc364810..c775581ad 100644 --- a/ports/szip/CONTROL +++ b/ports/szip/CONTROL @@ -1,3 +1,3 @@ Source: szip -Version: 2.1-1 +Version: 2.1-2 Description: Szip compression software, providing lossless compression of scientific data diff --git a/ports/tacopie/CONTROL b/ports/tacopie/CONTROL index accbf0291..c0464c02b 100644 --- a/ports/tacopie/CONTROL +++ b/ports/tacopie/CONTROL @@ -1,3 +1,3 @@ Source: tacopie -Version: 2.4.1-1 +Version: 2.4.1-2 Description: Tacopie is a TCP Client & Server C++11 library diff --git a/ports/taglib/CONTROL b/ports/taglib/CONTROL index dff921020..cc5fdb0f7 100644 --- a/ports/taglib/CONTROL +++ b/ports/taglib/CONTROL @@ -1,4 +1,4 @@ Source: taglib -Version: 1.11.1-3 +Version: 1.11.1-4 Description: TagLib Audio Meta-Data Library -Build-Depends: zlib \ No newline at end of file +Build-Depends: zlib diff --git a/ports/tesseract/CONTROL b/ports/tesseract/CONTROL index 5bbc7b7e5..8aee14808 100644 --- a/ports/tesseract/CONTROL +++ b/ports/tesseract/CONTROL @@ -1,4 +1,4 @@ Source: tesseract -Version: 3.05.01 +Version: 3.05.01-1 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/theia/CONTROL b/ports/theia/CONTROL index 554009d2d..56e2181a3 100644 --- a/ports/theia/CONTROL +++ b/ports/theia/CONTROL @@ -1,4 +1,4 @@ Source: theia -Version: 0.7-d15154a +Version: 0.7-d15154a-1 Build-Depends: flann, cereal, ceres, openimageio, glew, freeglut -Description: An open source library for multiview geometry and structure from motion \ No newline at end of file +Description: An open source library for multiview geometry and structure from motion diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL index 46396427b..9ad978099 100644 --- a/ports/thor/CONTROL +++ b/ports/thor/CONTROL @@ -1,4 +1,4 @@ Source: thor -Version: v2.0 +Version: v2.0-1 Description: Extends the multimedia library SFML with higher-level features Build-Depends: sfml, aurora diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index aef580f73..d7831632e 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 20172805-72ca60debae1d9fb35d9f0085118873669006d7f +Version: 20172805-72ca60debae1d9fb35d9f0085118873669006d7f-1 Build-Depends: boost, zlib, libevent, openssl 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. diff --git a/ports/tiff/CONTROL b/ports/tiff/CONTROL index f5727b475..0222fa809 100644 --- a/ports/tiff/CONTROL +++ b/ports/tiff/CONTROL @@ -1,4 +1,4 @@ Source: tiff -Version: 4.0.8 +Version: 4.0.8-1 Build-Depends: zlib, libjpeg-turbo, liblzma (windows) Description: A library that supports the manipulation of TIFF image files diff --git a/ports/tinythread/CONTROL b/ports/tinythread/CONTROL index 3c45f153e..d438e8721 100644 --- a/ports/tinythread/CONTROL +++ b/ports/tinythread/CONTROL @@ -1,3 +1,3 @@ Source: tinythread -Version: 1.1 +Version: 1.1-1 Description: Implements a fairly compatible subset of the C++11 thread management classes diff --git a/ports/tinyxml/CONTROL b/ports/tinyxml/CONTROL index 3b1978208..3d97a3312 100644 --- a/ports/tinyxml/CONTROL +++ b/ports/tinyxml/CONTROL @@ -1,3 +1,3 @@ Source: tinyxml -Version: 2.6.2-1 +Version: 2.6.2-2 Description: A simple, small, minimal, C++ XML parser that can be easily integrating into other programs. diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL index aaa9a7c4f..c2b75c438 100644 --- a/ports/tinyxml2/CONTROL +++ b/ports/tinyxml2/CONTROL @@ -1,3 +1,3 @@ Source: tinyxml2 -Version: 5.0.1 +Version: 5.0.1-1 Description: A simple, small, efficient, C++ XML parser diff --git a/ports/urdfdom-headers/CONTROL b/ports/urdfdom-headers/CONTROL index 9c69bf975..0b967f459 100644 --- a/ports/urdfdom-headers/CONTROL +++ b/ports/urdfdom-headers/CONTROL @@ -1,3 +1,3 @@ Source: urdfdom-headers -Version: 1.0.0-1 +Version: 1.0.0-2 Description: The URDF (U-Robot Description Format) headers provides core data structure headers for URDF. diff --git a/ports/urdfdom/CONTROL b/ports/urdfdom/CONTROL index 69e53f215..71e036251 100644 --- a/ports/urdfdom/CONTROL +++ b/ports/urdfdom/CONTROL @@ -1,4 +1,4 @@ Source: urdfdom -Version: 1.0.0-1 +Version: 1.0.0-2 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 \ No newline at end of file +Build-Depends: console-bridge, tinyxml, urdfdom-headers diff --git a/ports/uriparser/CONTROL b/ports/uriparser/CONTROL index 7bba4c357..76f975dad 100644 --- a/ports/uriparser/CONTROL +++ b/ports/uriparser/CONTROL @@ -1,3 +1,3 @@ Source: uriparser -Version: 0.8.4 +Version: 0.8.4-1 Description: uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C. uriparser is cross-platform, fast, supports Unicode diff --git a/ports/utf8proc/CONTROL b/ports/utf8proc/CONTROL index 1dcbbbef1..84acd8986 100644 --- a/ports/utf8proc/CONTROL +++ b/ports/utf8proc/CONTROL @@ -1,3 +1,3 @@ Source: utf8proc -Version: 2.1.0 +Version: 2.1.0-1 Description: Clean C library for processing UTF-8 Unicode data. diff --git a/ports/utfz/CONTROL b/ports/utfz/CONTROL index 26344d928..fd1854467 100644 --- a/ports/utfz/CONTROL +++ b/ports/utfz/CONTROL @@ -1,3 +1,3 @@ Source: utfz -Version: 1.2 +Version: 1.2-1 Description: A tiny C++ library for parsing and encoding utf-8 diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index 4faab5bfe..3e202f42b 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets -Version: 0.14.4 +Version: 0.14.4-1 Build-Depends: libuv, openssl, zlib, boost Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 652c27700..fdf8d42c4 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,4 @@ Source: vtk -Version: 8.0.0-1 +Version: 8.0.0-2 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj, lz4, libtheora diff --git a/ports/wt/CONTROL b/ports/wt/CONTROL index 5efc3e24c..43fa044ef 100644 --- a/ports/wt/CONTROL +++ b/ports/wt/CONTROL @@ -1,4 +1,4 @@ Source: wt -Version: 3.3.7-1 +Version: 3.3.7-2 Description: Wt is a C++ library for developing web applications Build-Depends: boost, openssl, sqlite3, libpq, pango diff --git a/ports/xlnt/CONTROL b/ports/xlnt/CONTROL index 0a9a86c0a..3a7d28006 100644 --- a/ports/xlnt/CONTROL +++ b/ports/xlnt/CONTROL @@ -1,4 +1,4 @@ Source: xlnt -Version: 0.9.4 +Version: 0.9.4-1 Description: Cross-platform user-friendly xlsx library for C++14 -Build-Depends: zlib, cryptopp, expat \ No newline at end of file +Build-Depends: zlib, cryptopp, expat diff --git a/ports/xxhash/CONTROL b/ports/xxhash/CONTROL index 1228319b6..3ca3cb512 100644 --- a/ports/xxhash/CONTROL +++ b/ports/xxhash/CONTROL @@ -1,3 +1,3 @@ Source: xxhash -Version: 0.6.3 +Version: 0.6.3-1 Description: Extremely fast hash algorithm diff --git a/ports/yaml-cpp/CONTROL b/ports/yaml-cpp/CONTROL index 02490ca3a..0a9823da9 100644 --- a/ports/yaml-cpp/CONTROL +++ b/ports/yaml-cpp/CONTROL @@ -1,3 +1,3 @@ Source: yaml-cpp -Version: 0.5.4-rc-1 +Version: 0.5.4-rc-2 Description: yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec. diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index ac4bef932..b850b71b9 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2 +Version: 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2-1 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/zlib/CONTROL b/ports/zlib/CONTROL index def1ef6be..68c7f1a13 100644 --- a/ports/zlib/CONTROL +++ b/ports/zlib/CONTROL @@ -1,3 +1,3 @@ Source: zlib -Version: 1.2.11 -Description: A compression library \ No newline at end of file +Version: 1.2.11-1 +Description: A compression library diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL index ba363a585..c6c5cc8e3 100644 --- a/ports/zstd/CONTROL +++ b/ports/zstd/CONTROL @@ -1,3 +1,3 @@ Source: zstd -Version: 1.3.1 +Version: 1.3.1-1 Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net diff --git a/ports/zziplib/CONTROL b/ports/zziplib/CONTROL index 235b72c63..2b7447609 100644 --- a/ports/zziplib/CONTROL +++ b/ports/zziplib/CONTROL @@ -1,4 +1,4 @@ Source: zziplib -Version: 0.13.62 +Version: 0.13.62-1 Build-Depends: zlib Description: library providing read access on ZIP-archives diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 07acfc8ea..fecea8f1c 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -141,22 +141,22 @@ function(vcpkg_configure_cmake) if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" + "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" + "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" ) list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_CXX_FLAGS_RELEASE}" - "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_C_FLAGS_RELEASE}" + "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" + "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" ) elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" + "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" + "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" ) list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_CXX_FLAGS_RELEASE}" - "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_C_FLAGS_RELEASE}" + "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" + "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" ) endif() diff --git a/scripts/cmake/vcpkg_configure_meson.cmake b/scripts/cmake/vcpkg_configure_meson.cmake index 277f91e11..143bb74de 100644 --- a/scripts/cmake/vcpkg_configure_meson.cmake +++ b/scripts/cmake/vcpkg_configure_meson.cmake @@ -9,17 +9,17 @@ function(vcpkg_configure_meson) set(MESON_COMMON_CXXFLAGS "${MESON_COMMON_CXXFLAGS} /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc") if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) - set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1") - set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1") + set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1") + set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1") - set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Zi") - set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Zi") + set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Z7") + set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MD /O2 /Oi /Gy /DNDEBUG /Z7") elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) - set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MTd /Zi /Ob0 /Od /RTC1") - set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MTd /Zi /Ob0 /Od /RTC1") + set(MESON_DEBUG_CFLAGS "${MESON_DEBUG_CFLAGS} /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1") + set(MESON_DEBUG_CXXFLAGS "${MESON_DEBUG_CXXFLAGS} /D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1") - set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Zi") - set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Zi") + set(MESON_RELEASE_CFLAGS "${MESON_RELEASE_CFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Z7") + set(MESON_RELEASE_CXXFLAGS "${MESON_RELEASE_CXXFLAGS} /MT /O2 /Oi /Gy /DNDEBUG /Z7") endif() set(MESON_COMMON_LDFLAGS "${MESON_COMMON_LDFLAGS} /DEBUG") -- cgit v1.2.3 From 3ef9df647299eeec7bcaf06aedb4281359e1a816 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 9 Sep 2017 00:20:16 -0700 Subject: Update CHANGELOG and bump version to v0.0.88 --- CHANGELOG.md | 8 ++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4437cec17..ed5ce7c89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +vcpkg (0.0.88) +-------------- + * `vcpkg_configure_cmake` has been modified to embed debug symbols within static libraries (using the /Z7 option). Most of the libraries in `vcpkg` had their versions bumped due to this. + * `vcpkg_configure_meson` has been modified in the same manner. + +-- vcpkg team SAT, 09 Sep 2017 00:30:00 -0800 + + vcpkg (0.0.87) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 422bb25f0..feb2033f0 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.87" \ No newline at end of file +"0.0.88" \ No newline at end of file -- cgit v1.2.3 From 3a6ad750c922cf8d2eec67ad90deb85646078a3e Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Sun, 10 Sep 2017 02:40:01 +0300 Subject: [boost] Update to version 1.65.1 --- ports/boost/CONTROL | 2 +- ports/boost/portfile.cmake | 19 ++++++------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 8200d54d1..4fc7efdec 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,4 +1,4 @@ Source: boost -Version: 1.65-1 +Version: 1.65.1 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2 diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 3ed0ed9c5..f153aaf69 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -1,26 +1,19 @@ include(vcpkg_common_functions) set(VERSION 1_65) -set(VERSION2 1.65.0) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/boost_${VERSION}_0) +set(VERSION_FULL 1_65_1) +set(VERSION2 1.65.1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/boost_${VERSION_FULL}) ###################### # Acquire and arrange sources ###################### vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://sourceforge.net/projects/boost/files/boost/${VERSION2}/boost_${VERSION}_0.7z" "http://dl.bintray.com/boostorg/release/${VERSION2}/source/boost_${VERSION}_0.7z" - FILENAME "boost_${VERSION}_0.7z" - SHA512 41909136371b3aac53fc06ae92404bd52adde4cbda9337886433d197059105208b67331abf6ca8dc45e4d28679733b5c01fc701cba17516c7134c97785cc5f7e + URLS "https://sourceforge.net/projects/boost/files/boost/${VERSION2}/boost_${VERSION_FULL}.7z" "http://dl.bintray.com/boostorg/release/${VERSION2}/source/boost_${VERSION_FULL}.7z" + FILENAME "boost_${VERSION_FULL}.7z" + SHA512 b1d9264ec74dd75c68176f5a2d2da33a2c1e3162842cc61a07ac8ed1ebb953855cece4faf72ce99b490b665e813b839e35c7fc8026f2f9cb31b106fb8bab2a9c ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) -# apply boost combined hotfix -vcpkg_download_distfile(HOTFIX_PATCH - URLS "https://raw.githubusercontent.com/boostorg/website/6c3b630f2c621b78d983e882cefae7ffdf8383b8/patches/1_65_0/boost_1_65_0.patch" - FILENAME "boost_1_65_0.patch" - SHA512 8f9e654d0ee4d30b38b62b99ebfbbdeccd156c168656e1256b846bd21a3cb36d675396bd48d3f7a18d6cffba80932d40590d12e7ca1a4b51db343b3a0a39a3fd -) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${HOTFIX_PATCH}) - # apply boost range hotfix vcpkg_download_distfile(DIFF URLS "https://github.com/boostorg/range/commit/e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff" -- cgit v1.2.3 From c867fc8587672ccd005133e523202c72ad69422e Mon Sep 17 00:00:00 2001 From: pravic Date: Mon, 11 Sep 2017 10:47:38 +0300 Subject: [sciter] Update to 4.0.3.5348 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index c41495b51..54d72ec3c 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.0.2-1 +Version: 4.0.3 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index c5cfad6ea..c10c54678 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,9 +12,9 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_VERSION 4.0.2-1) -set(SCITER_REVISION 2d1de5b6d9da55b50168cb9069c8b12490f39d60) -set(SCITER_SHA 3d33bd0f76474b76e2281b96517c26ac1bb4b8009847499c063c0066a8e69280019c133a10967be8aaed97bbd6186023728619233dea6e7bcf1567e45cd57017) +set(SCITER_VERSION 4.0.3) +set(SCITER_REVISION 1209528289b8c8369352d648f4ba0c67826cbd8b) +set(SCITER_SHA f82d4b06433b92acede3b47516ea963aca03e84ce9e0bfb61ab1c0b3d3105de782860e380338137d8ae292176285aa39af97b4d917c92498d6dfac2413e79fbd) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From 601661ec323808afad4c3588a5a2473eb86a0eb4 Mon Sep 17 00:00:00 2001 From: pravic Date: Mon, 11 Sep 2017 12:41:40 +0300 Subject: [sqlite3] update to 3.20.1 --- ports/sqlite3/CONTROL | 6 +++--- ports/sqlite3/portfile.cmake | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index e3a4470c7..b444a953a 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,3 +1,3 @@ -Source: sqlite3 -Version: 3.19.1-2 -Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. +Source: sqlite3 +Version: 3.20.1 +Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index 768cd83a6..4bb53ef80 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(SQLITE_VERSION 3190100) -set(SQLITE_HASH 14064707d9ca029131ec92863026748e184ad4d6ca9d25e941fc254d9ad24f1451fc5fae6516603a420925aab1736e3fb92085f03d8dc47ec913839e158652c4) +set(SQLITE_VERSION 3200100) +set(SQLITE_HASH 66c325fec1c13ed5360899aa3e3a7a67d2b79d24dde954df7df7179c4d07e7b20edf831cc7107df863f3f8b0f30d21b934fcd0f7ea7b74409abbc0060bc28f7b) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite-amalgamation-${SQLITE_VERSION}) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From 6a2d5adf6a2cda3a330f737cdb343b9465ebbf21 Mon Sep 17 00:00:00 2001 From: Guillaume Dumont Date: Tue, 12 Sep 2017 10:03:49 -0400 Subject: [caffe2] Added caffe2 port (CPU only, no OpenCV) --- ports/caffe2/CONTROL | 4 + ports/caffe2/msvc-fixes.patch | 396 ++++++++++++++++++++++++++++++++++++++++++ ports/caffe2/portfile.cmake | 118 +++++++++++++ 3 files changed, 518 insertions(+) create mode 100644 ports/caffe2/CONTROL create mode 100644 ports/caffe2/msvc-fixes.patch create mode 100644 ports/caffe2/portfile.cmake diff --git a/ports/caffe2/CONTROL b/ports/caffe2/CONTROL new file mode 100644 index 000000000..d09de8e6d --- /dev/null +++ b/ports/caffe2/CONTROL @@ -0,0 +1,4 @@ +Source: caffe2 +Version: 0.8.1 +Build-Depends: lmdb, gflags, glog, eigen3, protobuf +Description: Caffe2 is a lightweight, modular, and scalable deep learning framework. diff --git a/ports/caffe2/msvc-fixes.patch b/ports/caffe2/msvc-fixes.patch new file mode 100644 index 000000000..446dbd44e --- /dev/null +++ b/ports/caffe2/msvc-fixes.patch @@ -0,0 +1,396 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8054d98..35934f5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -56,6 +56,14 @@ option(USE_ROCKSDB "Use RocksDB" ON) + option(USE_SNPE "Use Qualcomm's SNPE library" OFF) + option(USE_THREADS "Use Threads" ON) + option(USE_ZMQ "Use ZMQ" OFF) ++if(MSVC) ++ if(BUILD_BUILD_SHARED_LIBS) ++ set(USE_STATIC_RUNTIME_DEFAULT OFF) ++ else() ++ set(USE_STATIC_RUNTIME_DEFAULT ON) ++ endif() ++ option(USE_STATIC_RUNTIME "Link to the static runtime (/MT) instead of dynamic (/MD)" ${USE_STATIC_RUNTIME_DEFAULT}) ++endif() + + # External projects + include(ExternalProject) +@@ -99,7 +107,7 @@ else() + foreach(flag_var + CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE + CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) +- if (NOT ${BUILD_SHARED_LIBS}) ++ if (USE_STATIC_RUNTIME) + if(${flag_var} MATCHES "/MD") + string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") + endif(${flag_var} MATCHES "/MD") +diff --git a/caffe2/core/logging.cc b/caffe2/core/logging.cc +index 1b4468e..1379f3a 100644 +--- a/caffe2/core/logging.cc ++++ b/caffe2/core/logging.cc +@@ -117,7 +117,7 @@ using fLB::FLAGS_logtostderr; + + #endif // CAFFE2_USE_GFLAGS + +-CAFFE2_DEFINE_int(caffe2_log_level, google::ERROR, ++CAFFE2_DEFINE_int(caffe2_log_level, google::GLOG_ERROR, + "The minimum log level that caffe2 will output."); + + // Google glog's api does not have an external function that allows one to check +@@ -134,15 +134,23 @@ bool IsGoogleLoggingInitialized(); + namespace caffe2 { + bool InitCaffeLogging(int* argc, char** argv) { + if (*argc == 0) return true; +- if (!::google::glog_internal_namespace_::IsGoogleLoggingInitialized()) { ++#if !(defined(_MSC_VER) && defined(GLOG_IS_A_DLL)) ++ // IsGoogleLoggingInitialized is not exported from the glog DLL ++ // so we can't call it. If our program calls InitGoogleLogging twice glog will ++ // abort it. ++ if (!::google::glog_internal_namespace_::IsGoogleLoggingInitialized()) ++#endif ++ { + ::google::InitGoogleLogging(argv[0]); ++#if !defined(_MSC_VER) + ::google::InstallFailureSignalHandler(); ++#endif + } + // If caffe2_log_level is set and is lower than the min log level by glog, + // we will transfer the caffe2_log_level setting to glog to override that. + FLAGS_minloglevel = std::min(FLAGS_caffe2_log_level, FLAGS_minloglevel); + // If caffe2_log_level is explicitly set, let's also turn on logtostderr. +- if (FLAGS_caffe2_log_level < google::ERROR) { ++ if (FLAGS_caffe2_log_level < google::GLOG_ERROR) { + FLAGS_logtostderr = 1; + } + // Also, transfer the caffe2_log_level verbose setting to glog. +@@ -154,7 +162,7 @@ bool InitCaffeLogging(int* argc, char** argv) { + + void ShowLogInfoToStderr() { + FLAGS_logtostderr = 1; +- FLAGS_minloglevel = std::min(FLAGS_minloglevel, google::INFO); ++ FLAGS_minloglevel = std::min(FLAGS_minloglevel, google::GLOG_INFO); + } + } // namespace caffe2 + +diff --git a/caffe2/core/logging_is_google_glog.h b/caffe2/core/logging_is_google_glog.h +index 7dd2b4f..2df4435 100644 +--- a/caffe2/core/logging_is_google_glog.h ++++ b/caffe2/core/logging_is_google_glog.h +@@ -8,7 +8,7 @@ + // it. Some mobile platforms do not like stl_logging, so we add an + // overload in that case as well. + +-#if !defined(__CUDACC__) && !defined(CAFFE2_USE_MINIMAL_GOOGLE_GLOG) ++#if !defined(__CUDARCH__) && !defined(CAFFE2_USE_MINIMAL_GOOGLE_GLOG) + #include + #else // !defined(__CUDACC__) && !!defined(CAFFE2_USE_MINIMAL_GOOGLE_GLOG) + +diff --git a/caffe2/image/image_input_op.h b/caffe2/image/image_input_op.h +index 9604e98..7d90014 100644 +--- a/caffe2/image/image_input_op.h ++++ b/caffe2/image/image_input_op.h +@@ -214,13 +214,13 @@ ImageInputOp::ImageInputOp( + + // hard-coded PCA eigenvectors and eigenvalues, based on RBG channel order + color_lighting_eigvecs_.push_back( +- std::vector{-144.7125, 183.396, 102.2295}); ++ std::vector{-144.7125f, 183.396f, 102.2295f}); + color_lighting_eigvecs_.push_back( +- std::vector{-148.104, -1.1475, -207.57}); ++ std::vector{-148.104f, -1.1475f, -207.57f}); + color_lighting_eigvecs_.push_back( +- std::vector{-148.818, -177.174, 107.1765}); ++ std::vector{-148.818f, -177.174f, 107.1765f}); + +- color_lighting_eigvals_ = std::vector{0.2175, 0.0188, 0.0045}; ++ color_lighting_eigvals_ = std::vector{0.2175f, 0.0188f, 0.0045f}; + + CAFFE_ENFORCE_GT(batch_size_, 0, "Batch size should be nonnegative."); + if (use_caffe_datum_) { +diff --git a/caffe2/operators/batch_matmul_op.cc b/caffe2/operators/batch_matmul_op.cc +index c2e578d..28cf030 100644 +--- a/caffe2/operators/batch_matmul_op.cc ++++ b/caffe2/operators/batch_matmul_op.cc +@@ -34,7 +34,7 @@ size (C x K x N) where C is the batch size and i ranges from 0 to C-1. + b_dim1 = in[1].dims(2); + } + return vector { +- CreateTensorShape(vector { ++ CreateTensorShape(vector { + in[0].dims(0), a_dim0, b_dim1}, + in[0].data_type()) + }; +diff --git a/caffe2/operators/layer_norm_op.cu b/caffe2/operators/layer_norm_op.cu +index df13fc3..68bbc97 100644 +--- a/caffe2/operators/layer_norm_op.cu ++++ b/caffe2/operators/layer_norm_op.cu +@@ -252,8 +252,8 @@ bool LayerNormGradientOp::DoRunWithType() { + auto* ginput = Output(0); + + const auto canonical_axis = norm_inputs.canonical_axis_index(axis_); +- const int left = norm_inputs.size_to_dim(canonical_axis); +- const int right = norm_inputs.size_from_dim(canonical_axis); ++ const TIndex left = norm_inputs.size_to_dim(canonical_axis); ++ const TIndex right = norm_inputs.size_from_dim(canonical_axis); + + ginput->ResizeLike(norm_inputs); + std::vector stats_dims( +@@ -261,7 +261,7 @@ bool LayerNormGradientOp::DoRunWithType() { + stats_dims.push_back(1); + dmean_.Resize(stats_dims); + dstdev_.Resize(stats_dims); +- gscratch_.Resize(std::vector{left, right}); ++ gscratch_.Resize(std::vector{left, right}); + + std::vector segs(left + 1); + std::iota(segs.begin(), segs.end(), 0); +@@ -291,7 +291,7 @@ bool LayerNormGradientOp::DoRunWithType() { + dout.data(), + gscratch_.mutable_data()); + +- dstdev_.Resize(vector{left, 1}); ++ dstdev_.Resize(vector{left, 1}); + // dstdev = reduce(temp1) + allocScratchAndReduce( + gscratch_.data(), +diff --git a/caffe2/operators/lengths_top_k_op.cc b/caffe2/operators/lengths_top_k_op.cc +index c871d53..bad741a 100644 +--- a/caffe2/operators/lengths_top_k_op.cc ++++ b/caffe2/operators/lengths_top_k_op.cc +@@ -14,7 +14,7 @@ bool LengthsTopKOp::RunOnDevice() { + + output_topk_values->Resize(N * k_); + output_topk_indices->Resize(N * k_); +- std::vector output_dims = std::vector({N, k_}); ++ std::vector output_dims = std::vector({N, k_}); + output_topk_values->Reshape(output_dims); + output_topk_indices->Reshape(output_dims); + T* output_topk_values_data = output_topk_values->template mutable_data(); +diff --git a/caffe2/operators/pool_op_cudnn.cu b/caffe2/operators/pool_op_cudnn.cu +index a380d8d..b0cd326 100644 +--- a/caffe2/operators/pool_op_cudnn.cu ++++ b/caffe2/operators/pool_op_cudnn.cu +@@ -467,6 +467,15 @@ class CuDNNPoolGradientOp : public ConvPoolOpBase { + cudnnPoolingDescriptor_t pooling_desc_; + cudnnPoolingMode_t mode_; + ++// MSVC defines IN and OUT in minwindef.h ++#ifdef IN ++#undef IN ++#endif ++ ++#ifdef OUT ++#undef OUT ++#endif ++ + // Input: X, Y, dY + // Output: dX + INPUT_TAGS(IN, OUT, OUT_GRAD); +diff --git a/caffe2/operators/recurrent_op_cudnn.cc b/caffe2/operators/recurrent_op_cudnn.cc +index 7777813..58bc8c3 100644 +--- a/caffe2/operators/recurrent_op_cudnn.cc ++++ b/caffe2/operators/recurrent_op_cudnn.cc +@@ -115,10 +115,11 @@ void RecurrentBaseOp::initialize( + + // RNN setup + { +- CUDNN_ENFORCE(cudnnSetRNNDescriptor( ++// Do not use #if condition inside CUDNN_ENFORCE ++// to avoid macro expansion errors. + #if CUDNN_MAJOR >= 7 ++CUDNN_ENFORCE(cudnnSetRNNDescriptor( + cudnn_wrapper_.inline_cudnn_handle(), +-#endif + rnnDesc_, + hiddenSize, + numLayers, +@@ -126,10 +127,19 @@ void RecurrentBaseOp::initialize( + rnnInput, + rnnDirection, + rnnMode, +-#if CUDNN_MAJOR >= 7 + CUDNN_RNN_ALGO_STANDARD, // TODO: verify correctness / efficiency. +-#endif + cudnnTypeWrapper::type)); ++#else ++ CUDNN_ENFORCE(cudnnSetRNNDescriptor( ++ rnnDesc_, ++ hiddenSize, ++ numLayers, ++ dropoutDesc_, ++ rnnInput, ++ rnnDirection, ++ rnnMode, ++ cudnnTypeWrapper::type)); ++#endif // CUDNN_MAJOR >= 7 + } + // X setup + { +diff --git a/caffe2/utils/CMakeLists.txt b/caffe2/utils/CMakeLists.txt +index f90af5a..919a638 100644 +--- a/caffe2/utils/CMakeLists.txt ++++ b/caffe2/utils/CMakeLists.txt +@@ -27,6 +27,10 @@ exclude(Caffe2_CPU_SRCS "${Caffe2_CPU_SRCS}" ${Caffe2_GPU_SRCS}) + # will directly link nnpack pthreadpool. + file(GLOB_RECURSE tmp pthreadpool*) + exclude(Caffe2_CPU_SRCS "${Caffe2_CPU_SRCS}" ${tmp}) ++if(MSVC) ++ file(GLOB_RECURSE tmp *ThreadPool.cc) ++ exclude(Caffe2_CPU_SRCS "${Caffe2_CPU_SRCS}" ${tmp}) ++endif() + + # ---[ GPU test files + file(GLOB_RECURSE tmp *_gpu_test.cc) +diff --git a/caffe2/utils/GpuBitonicSort.cuh b/caffe2/utils/GpuBitonicSort.cuh +index f52bb50..a199bcb 100644 +--- a/caffe2/utils/GpuBitonicSort.cuh ++++ b/caffe2/utils/GpuBitonicSort.cuh +@@ -39,9 +39,11 @@ __device__ inline void bitonicSort(K* keys, + // Assume the sort is taking place in shared memory + // static_assert(Power2SortSize * (sizeof(K) + sizeof(V)) < 32768, + // "sort data too large (>32768 bytes)"); +- static_assert(math::integerIsPowerOf2(Power2SortSize), ++ static_assert(math::integerIsPowerOf2( ++ std::integral_constant::value), + "sort size must be power of 2"); +- static_assert(math::integerIsPowerOf2(ThreadsPerBlock), ++ static_assert(math::integerIsPowerOf2( ++ std::integral_constant::value), + "threads in block must be power of 2"); + + // If what we are sorting is too small, then not all threads +@@ -107,7 +109,8 @@ __device__ inline void warpBitonicSort(K* keys, + // Smaller sorts should use a warp shuffle sort + static_assert(Power2SortSize > kWarpSize, + "sort not large enough"); +- static_assert(math::integerIsPowerOf2(Power2SortSize), ++ static_assert(math::integerIsPowerOf2( ++ std::integral_constant::value), + "sort size must be power of 2"); + static_assert(Power2SortSize <= kMaxBitonicSortSize, + "sort size <= 4096 only supported"); +diff --git a/caffe2/utils/math.h b/caffe2/utils/math.h +index 6c352dc..a1eda9d 100644 +--- a/caffe2/utils/math.h ++++ b/caffe2/utils/math.h +@@ -426,18 +426,10 @@ constexpr T roundUp(T a, T b) { + return divUp(a, b) * b; + } + +-// Returns true if the given integer type is a power-of-2 (positive only) +-// Note(jiayq): windows reported an error per +-// https://github.com/caffe2/caffe2/issues/997 +-// and as a result will make it a macro. +-#ifdef _MSC_VER +-#define integerIsPowerOf2(v) ((v) && !((v) & ((v) - 1))) +-#else // _MSC_VER + template + constexpr bool integerIsPowerOf2(T v) { + return (v && !(v & (v - 1))); + } +-#endif // _MSC_VER + + // Returns log2(n) for a positive integer type + template +diff --git a/cmake/Cuda.cmake b/cmake/Cuda.cmake +index df70e2f..ca1b123 100644 +--- a/cmake/Cuda.cmake ++++ b/cmake/Cuda.cmake +@@ -37,6 +37,10 @@ function(caffe2_detect_installed_gpus out_variable) + ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) + + if(__nvcc_res EQUAL 0) ++ # nvcc outputs text containing line breaks when building with MSVC. ++ # The line below prevents CMake from inserting a variable with line ++ # breaks in the cache ++ string(REGEX MATCH "([1-9].[0-9])" __nvcc_out "${__nvcc_out}") + string(REPLACE "2.1" "2.1(2.0)" __nvcc_out "${__nvcc_out}") + set(CUDA_gpu_detect_output ${__nvcc_out} CACHE INTERNAL "Returned GPU architetures from caffe_detect_gpus tool" FORCE) + endif() +@@ -249,7 +253,7 @@ endif() + # Debug and Release symbol support + if (MSVC) + if (${CMAKE_BUILD_TYPE} MATCHES "Release") +- if (${BUILD_SHARED_LIBS}) ++ if (NOT USE_STATIC_RUNTIME) + list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -MD") + else() + list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -MT") +@@ -259,7 +263,7 @@ if (MSVC) + "Caffe2 currently does not support the combination of MSVC, Cuda " + "and Debug mode. Either set USE_CUDA=OFF or set the build type " + "to Release") +- if (${BUILD_SHARED_LIBS}) ++ if (NOT USE_STATIC_RUNTIME) + list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -MDd") + else() + list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -MTd") +diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake +index afb6b68..bdad8b6 100644 +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -182,6 +182,15 @@ if(USE_OPENCV) + message(WARNING "Not compiling with OpenCV. Suppress this warning with -DUSE_OPENCV=OFF") + set(USE_OPENCV OFF) + endif() ++ if(USE_OPENCV AND VCPKG_TARGET_TRIPLET MATCHES static) ++ find_package(LibLZMA QUIET) ++ if(LIBLZMA_FOUND) ++ list(APPEND Caffe2_DEPENDENCY_LIBS ${LIBLZMA_LIBRARIES}) ++ else() ++ message(WARNING "Not compiling with OpenCV. Could not find liblzma. Suppress this warning with -DUSE_OPENCV=OFF") ++ set(USE_OPENCV OFF) ++ endif() ++ endif() + endif() + + # ---[ FFMPEG +diff --git a/cmake/Modules/FindGlog.cmake b/cmake/Modules/FindGlog.cmake +index 1167532..9780ba5 100644 +--- a/cmake/Modules/FindGlog.cmake ++++ b/cmake/Modules/FindGlog.cmake +@@ -27,6 +27,10 @@ if(MSVC) + endif() + if(TARGET ${GLOG_LIBRARY}) + get_target_property(GLOG_INCLUDE_DIR ${GLOG_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(GLOG_TYPE ${GLOG_LIBRARY} TYPE) ++ if("${GLOG_TYPE}" STREQUAL "SHARED_LIBRARY") ++ add_definitions(-DGLOG_IS_A_DLL=1) ++ endif() + endif() + else() + find_library(GLOG_LIBRARY glog +diff --git a/cmake/ProtoBuf.cmake b/cmake/ProtoBuf.cmake +index 89975c8..e37d6da 100644 +--- a/cmake/ProtoBuf.cmake ++++ b/cmake/ProtoBuf.cmake +@@ -13,6 +13,9 @@ function(custom_protobuf_find) + # so we turn it off here. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" PARENT_SCOPE) + endif() ++ if(MSVC) ++ set(protobuf_MSVC_STATIC_RUNTIME ${USE_STATIC_RUNTIME}) ++ endif() + add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/protobuf/cmake) + caffe2_include_directories(${PROJECT_SOURCE_DIR}/third_party/protobuf/src) + list(APPEND Caffe2_DEPENDENCY_LIBS libprotobuf) +diff --git a/cmake/Summary.cmake b/cmake/Summary.cmake +index b7423a6..2996484 100644 +--- a/cmake/Summary.cmake ++++ b/cmake/Summary.cmake +@@ -19,6 +19,13 @@ function (Caffe2_print_configuration_summary) + message(STATUS " System : ${CMAKE_SYSTEM_NAME}") + message(STATUS " C++ compiler : ${CMAKE_CXX_COMPILER}") + message(STATUS " C++ compiler version : ${CMAKE_CXX_COMPILER_VERSION}") ++ if(MSVC) ++ if(USE_STATIC_RUNTIME) ++ message(STATUS " Runtime : static (/MT)") ++ else() ++ message(STATUS " Runtime : dynamic (/MD)") ++ endif() ++ endif() + message(STATUS " Protobuf compiler : ${PROTOBUF_PROTOC_EXECUTABLE}") + message(STATUS " CXX flags : ${CMAKE_CXX_FLAGS}") + message(STATUS " Build type : ${CMAKE_BUILD_TYPE}") diff --git a/ports/caffe2/portfile.cmake b/ports/caffe2/portfile.cmake new file mode 100644 index 000000000..d2770f338 --- /dev/null +++ b/ports/caffe2/portfile.cmake @@ -0,0 +1,118 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + message(FATAL_ERROR "Caffe2 cannot be built for the x86 architecture") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO caffe2/caffe2 + REF eab13a2d5c807bf5d49efd4584787b639a981b79 + SHA512 505a8540b0c28329c4e2ce443ac8e198c1ee613eb6b932927ee9d04c8afdc95081f3c4581408b7097d567840427b31f6d7626ea80f27e56532f2f2e6acd87023 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/msvc-fixes.patch +) + +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(USE_STATIC_RUNTIME ON) +else() + set(USE_STATIC_RUNTIME OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_SHARED_LIBS=OFF + # Set to ON to use python + -DBUILD_PYTHON=OFF + -DUSE_STATIC_RUNTIME=${USE_STATIC_RUNTIME} + -DUSE_GFLAGS=ON + -DUSE_GLOG=ON + # Cannot use OpenCV without USE_CUDA=ON right now + -DUSE_OPENCV=OFF + -DUSE_THREADS=ON + # Uncomment to use MKL + # -DBLAS=MKL + -DUSE_CUDA=OFF + -DUSE_FFMPEG=OFF + -DUSE_GLOO=OFF + -DUSE_LEVELDB=OFF + -DUSE_LITE_PROTO=OFF + -DUSE_METAL=OFF + -DUSE_MOBILE_OPENGL=OFF + -DUSE_MPI=OFF + -DUSE_NCCL=OFF + -DUSE_NERVANA_GPU=OFF + -DUSE_NNPACK=OFF + -DUSE_OBSERVERS=OFF + -DUSE_OPENMP=ON + -DUSE_REDIS=OFF + -DUSE_ROCKSDB=OFF + -DUSE_SNPE=OFF + -DUSE_ZMQ=OFF + -DBUILD_TEST=OFF + -DPROTOBUF_PROTOC_EXECUTABLE:FILEPATH=${CURRENT_INSTALLED_DIR}/tools/protoc.exe +) + +vcpkg_install_cmake() + +# Remove folders from install +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/caffe) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/caffe2) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/caffe) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/caffe2) + +# Remove empty directories from include (should probably fix or +# patch caffe2 install script) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/test) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/python) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/experiments/python) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/contrib/opengl) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/contrib/nnpack) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/contrib/libopencl-stub) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/contrib/docker-ubuntu-14.04) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/binaries) + +# Move bin to tools +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) +file(GLOB BINARIES ${CURRENT_PACKAGES_DIR}/bin/*.exe) +foreach(binary ${BINARIES}) + get_filename_component(binary_name ${binary} NAME) + file(RENAME ${binary} ${CURRENT_PACKAGES_DIR}/tools/${binary_name}) +endforeach() + +# Remove bin directory +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +endif() + +# Remove headers and tools from debug build +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB BINARIES ${CURRENT_PACKAGES_DIR}/bin/*.exe) +foreach(binary ${BINARIES}) + get_filename_component(binary_name ${binary} NAME) + file(REMOVE ${binary}) +endforeach() + +# Remove bin directory +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# install license +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/caffe2) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/caffe2 RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From cb239b92c0064cf268650366fe8d56f2a89fa920 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 12 Sep 2017 13:32:26 -0700 Subject: Fix several port hashes due to github tar.gz change It looks like github changed the version (or the generally the way) they do tars, causing some hash mismatches. This fixes the affected ports. --- ports/angle/portfile.cmake | 2 +- ports/box2d/portfile.cmake | 2 +- ports/corrade/portfile.cmake | 4 ++-- ports/cpprestsdk/portfile.cmake | 2 +- ports/freerdp/portfile.cmake | 4 ++-- ports/lcms/portfile.cmake | 2 +- ports/magnum-plugins/portfile.cmake | 4 ++-- ports/sciter/portfile.cmake | 2 +- ports/tbb/portfile.cmake | 2 +- ports/theia/portfile.cmake | 2 +- ports/thrift/portfile.cmake | 2 +- ports/yaml-cpp/portfile.cmake | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ports/angle/portfile.cmake b/ports/angle/portfile.cmake index aebf528dd..ab7ebd828 100644 --- a/ports/angle/portfile.cmake +++ b/ports/angle/portfile.cmake @@ -13,7 +13,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/angle REF 8d471f907d8d4ec1d46bc9366493bd76c11c1870 - SHA512 b9235d2a98330bc8533c3fe871129e7235c680420eac16610eae4ca7224c5284313ab6377f30ddfb8a2da39b69f3ef0d16023fe1e7cec3fc2198f4eb4bdccb26 + SHA512 b4670caeeaa5d662bc82702eb5f620123812ea6b5d82f57a65df54ae25cdaa5c9ff0fdb592448b07569d9c09af3d3c51b0b2f135c5800d1845b425009656bf18 HEAD_REF master ) vcpkg_apply_patches( diff --git a/ports/box2d/portfile.cmake b/ports/box2d/portfile.cmake index c84c33387..122290251 100644 --- a/ports/box2d/portfile.cmake +++ b/ports/box2d/portfile.cmake @@ -21,7 +21,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO erincatto/Box2D REF 374664b2a4ce2e7c24fbad6e1ed34bebcc9ab6bc - SHA512 ae2bbee66644eea91d0e92156a4bece44053dfa8fd6b8630712a73b92210d4c75153df94e3386c64c49796b001af1ad7dee44868c16368b114567e1f6931d242 + SHA512 39074bab01b36104aa685bfe39b40eb903d9dfb54cc3ba8098125db5291f55a8a9e578fc59563b2e8743abbbb26f419be7ae1524e235e7bd759257f99ff96bda HEAD_REF master ) diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 3ae3710f6..88b27ab62 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -3,7 +3,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/corrade REF c182fe636894a998f241212d0205d0c126b7926f - SHA512 e62486368eab9c5f90ef9f4af91500f465d9e3baa6e5f6e9f2a49844d09676faefcb965a9d5b27a54eda19436af6b23dcda19504be6cd0dcd52dfad2ad4bfa21 + SHA512 d664c7884c0c6c7977261a851948b2b591ac0fbdbcfddab1d8e578e629a252f48fa786cf9f96525e10aa76c95919dfc3452ccbe5e930aa4a69e61269e4ee07ee HEAD_REF master ) @@ -44,4 +44,4 @@ endif() file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/corrade) file(RENAME ${CURRENT_PACKAGES_DIR}/share/corrade/COPYING ${CURRENT_PACKAGES_DIR}/share/corrade/copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index ea7d8d201..7482760d3 100644 --- a/ports/cpprestsdk/portfile.cmake +++ b/ports/cpprestsdk/portfile.cmake @@ -4,7 +4,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/cpprestsdk REF v2.9.0 - SHA512 c75de6ad33b3e8d2c6ba7c0955ed851d557f78652fb38a565de0cfbc99e7db89cb6fa405857512e5149df80356c51ae9335abd914c3c593fa6658ac50adf4e29 + SHA512 7f6af05e2aaf49fb5ba24f4fac43b7787345d46913831504925cefc60d1b62e38457e1d628d5de8b0db891b59716d2bfe63a494ca0b337d67fc9ca5447a5ba9b HEAD_REF master ) if(NOT VCPKG_USE_HEAD_VERSION) diff --git a/ports/freerdp/portfile.cmake b/ports/freerdp/portfile.cmake index 8ac9df315..6805c5a69 100644 --- a/ports/freerdp/portfile.cmake +++ b/ports/freerdp/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) set(FREERDP_VERSION 2.0.0-rc0) set(FREERDP_REVISION 2.0.0-rc0) -set(FREERDP_HASH 9bc9ee976c73f274a4258613409e242088bd077bcd1cc43f7941170374fc0f9deda7f2f7644506d0cdc2e029b6037abb21d848810dcce6aefa3c5f1642f19cb3) +set(FREERDP_HASH d3eb0d5d23aa2a4d0277414f13a984d40aba051102c5af1e5ade975cdb469ef3549b145cd4339415fc33f056044929cfac71884512ea77a1e718d70d5b21b9dd) string(REGEX REPLACE "\\+" "-" FREERDP_VERSION_ESCAPED ${FREERDP_VERSION}) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FreeRDP-${FREERDP_VERSION_ESCAPED}) @@ -76,4 +76,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/freerdp/cmake) \ No newline at end of file +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/freerdp/cmake) diff --git a/ports/lcms/portfile.cmake b/ports/lcms/portfile.cmake index 7a043d1f2..eeb12243c 100644 --- a/ports/lcms/portfile.cmake +++ b/ports/lcms/portfile.cmake @@ -4,7 +4,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mm2/Little-CMS REF lcms2.8 - SHA512 ad904ce8acead6c8e255feb8386c1ab3fa432c3b36a3b521bc5c50993cb47ce4d42be0ad240dd8dd3bfeb3c0e884d8184f58797da5ef297b2f9a0e7da9788644 + SHA512 22ee94aa3333db4248607d8aa84343d324e04b30c154c46672c6f668e14a369b9b72f2557b8465218b6e9a2676cf8fa37d617b4aa13a013dc2337197a599e63a HEAD_REF master ) diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index b26262490..289816b94 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -3,7 +3,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-plugins REF 34a3bc34335ca05097e735db19fe1fae81dbfbb5 - SHA512 918c3eeae246d1ac67e3595c50ff599872a0c1498e9a8a0386ad656f3d9d2209b048b53c25f198660e15201147795578c5c931b00116da46fd77d8e91c0826cb + SHA512 8d8998ed0f5a9361fd8a322f0c9ee8bb36b2255487e7198603f316a383a5dcb38160dcfa92759a2e2aa6d13d45f5fdae8f1165e39428d516823bc931d3097b83 HEAD_REF master ) @@ -72,4 +72,4 @@ endif() file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum-plugins) file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum-plugins/copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index c10c54678..063b318e3 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -14,7 +14,7 @@ set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) set(SCITER_VERSION 4.0.3) set(SCITER_REVISION 1209528289b8c8369352d648f4ba0c67826cbd8b) -set(SCITER_SHA f82d4b06433b92acede3b47516ea963aca03e84ce9e0bfb61ab1c0b3d3105de782860e380338137d8ae292176285aa39af97b4d917c92498d6dfac2413e79fbd) +set(SCITER_SHA 9fc72dd44b22c69715b4b08c5af7a65e0bb48d849191002b2ae45ca6f5ea058fb8c64cc7f6c176215afce682af6166a1579efd8cc2ca0fb9e844ceba1160f10f) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index d633a9b23..7bde0c416 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -14,7 +14,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO 01org/tbb REF 2017_U7 - SHA512 77fdd381eece8fb2fba4115af55d168e9d433bbdae3c21a53c35e7d5ed3397645fe75998ad10593b718f6959daaac05112401480cdb4fd2054f50b5f6f1a0df6 + SHA512 e4a6fcc3cace9b57061e8661b09af9cb2be721224889af52f4c1b4faec1a130512b7c960e21171ebb8105593a81bd9b80bef20cda91bfac174d535d0f7ccb680 HEAD_REF tbb_2017) if(TRIPLET_SYSTEM_ARCH STREQUAL x86) diff --git a/ports/theia/portfile.cmake b/ports/theia/portfile.cmake index a45089225..8ac920d57 100644 --- a/ports/theia/portfile.cmake +++ b/ports/theia/portfile.cmake @@ -9,7 +9,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO sweeneychris/TheiaSfM REF d15154a6c30ea48e7d135be126e2936802e476ad - SHA512 e3cb29b1806b6d2ed161c28432ad8788f756e03db55f883bfa2c4b389b506aa46909f0de57460e93e38926d8103382c54f51685bb9035688e4c7378f913c2de0 + SHA512 aaf6e9737d04499f0ffd453952380f2e1aa3aab2a75487d6806bfab60aa972719d7349730eab3d1b37088e99cf6c9076ae1cdea276f48532698226c69ac48977 HEAD_REF master ) diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 94e8201bf..3cb280462 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -16,7 +16,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift REF 72ca60debae1d9fb35d9f0085118873669006d7f - SHA512 6050c66b176ad596d9632b224b8fb49aa3b823c977dacad729dbcdefb0da60eb983d3a32d9326b4317bae6755fb1fc4cee2cc6c282b3e1636a4528844c0f5915 + SHA512 65023690ff04376e9e64c3e9a609640a6416a39a08bb26d31ec8799ec462bbf8631620edf9a10cdf13980b13813304263601598258cf27bbd5027f9f755c49fa HEAD_REF master ) diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake index 8d20458cb..82a0b3897 100644 --- a/ports/yaml-cpp/portfile.cmake +++ b/ports/yaml-cpp/portfile.cmake @@ -3,7 +3,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jbeder/yaml-cpp REF 380ecb404ef99ba132154ed43dd2b84136b30b14 - SHA512 36fa4432f1ee94049dc67c52c180efe1eddc7678bfc545437b0d751be1eecd94d541daabdbcb01acbb84a321f2c80d609ba2927c8458ad8499e007123ae25d4e + SHA512 30d344d271d15163be755c998b28750857355f26a3fdbaf620932b60e419a7f72884bc7fd65bf3076f4e5315e0f82aab6011406a8146e2c01ba3fc267723d5bc HEAD_REF master ) -- cgit v1.2.3 From e915ab0466956bb16985402ef51a6dace2897420 Mon Sep 17 00:00:00 2001 From: Jared Szechy Date: Tue, 12 Sep 2017 20:13:34 -0400 Subject: Update to latest python 3.5 patch --- scripts/cmake/vcpkg_find_acquire_program.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index fef62da53..e718fc7da 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -67,9 +67,9 @@ function(vcpkg_find_acquire_program VAR) elseif(VAR MATCHES "PYTHON3") set(PROGNAME python) set(PATHS ${DOWNLOADS}/tools/python) - set(URL "https://www.python.org/ftp/python/3.5.3/python-3.5.3-embed-win32.zip") - set(ARCHIVE "python-3.5.3-embed-win32.zip") - set(HASH c8cfdc09d052dc27e4380e8e4bf0d32a4c0def7e03896c1fa6cabc26dde78bb74dbb04e3673cc36e3e307d65a1ef284d69174f0cc80008c83bc6178f192ac5cf) + set(URL "https://www.python.org/ftp/python/3.5.4/python-3.5.4-embed-win32.zip") + set(ARCHIVE "python-3.5.4-embed-win32.zip") + set(HASH b5240fdc95088c2d7f65d2dd598650f8dd106b49589d94156bd4a078b108c6cabbe7a38ef73e2b2cf00e8312a93d2e587eac2c54ce85540d3c7a26cc60013156) elseif(VAR MATCHES "PYTHON2") find_program(PYTHON2 NAMES python2 python PATHS C:/python27 c:/Python27amd64 ENV PYTHON) if(NOT PYTHON2 MATCHES "NOTFOUND") -- cgit v1.2.3 From 43dde3f4892be55558b012b845d864e7be95c7b9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 13 Sep 2017 16:10:25 -0700 Subject: Refactor package removal code to eliminate its duplication --- toolsrc/include/vcpkg_Commands.h | 13 +++++++ toolsrc/src/commands_install.cpp | 73 ++++++++-------------------------------- toolsrc/src/commands_remove.cpp | 63 +++++++++++++++++++--------------- 3 files changed, 63 insertions(+), 86 deletions(-) diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 756a12f01..079388587 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -82,6 +82,19 @@ namespace vcpkg::Commands namespace Remove { + enum class Purge + { + NO = 0, + YES + }; + + inline Purge to_purge(const bool value) { return value ? Purge::YES : Purge::NO; } + + void perform_remove_plan_action(const VcpkgPaths& paths, + const Dependencies::RemovePlanAction& action, + const Purge purge, + StatusParagraphs& status_db); + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db); } diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index d7c14f39c..2473ad599 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -524,72 +524,27 @@ namespace vcpkg::Commands::Install Checks::exit_success(VCPKG_LINE_INFO); } - // execute the plan - if (GlobalState::feature_packages) - { - for (const auto& action : action_plan) - { - if (auto install_action = action.install_plan.get()) - { - const BuildResult result = - perform_install_plan_action(paths, *install_action, install_plan_options, status_db); - if (result != BuildResult::SUCCEEDED) - { - System::println(Build::create_user_troubleshooting_message(install_action->spec)); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - else if (auto remove_action = action.remove_plan.get()) - { - static const std::string OPTION_PURGE = "--purge"; - static const std::string OPTION_NO_PURGE = "--no-purge"; - - const bool alsoRemoveFolderFromPackages = options.find(OPTION_NO_PURGE) == options.end(); - if (options.find(OPTION_PURGE) != options.end() && !alsoRemoveFolderFromPackages) - { - // User specified --purge and --no-purge - System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge."); - System::print(EXAMPLE); - Checks::exit_fail(VCPKG_LINE_INFO); - } - const std::string display_name = remove_action->spec.to_string(); - switch (remove_action->plan_type) - { - case RemovePlanType::NOT_INSTALLED: - System::println(System::Color::success, "Package %s is not installed", display_name); - break; - case RemovePlanType::REMOVE: - System::println("Removing package %s... ", display_name); - Commands::Remove::remove_package(paths, remove_action->spec, &status_db); - System::println(System::Color::success, "Removing package %s... done", display_name); - break; - case RemovePlanType::UNKNOWN: - default: Checks::unreachable(VCPKG_LINE_INFO); - } - - if (alsoRemoveFolderFromPackages) - { - System::println("Purging package %s... ", display_name); - Files::Filesystem& fs = paths.get_filesystem(); - std::error_code ec; - fs.remove_all(paths.packages / remove_action->spec.dir(), ec); - System::println(System::Color::success, "Purging package %s... done", display_name); - } - } - } - } - else + for (const auto& action : action_plan) { - for (const auto& action : action_plan) + if (auto install_action = action.install_plan.get()) { - const auto& iaction = action.install_plan.value_or_exit(VCPKG_LINE_INFO); - const BuildResult result = perform_install_plan_action(paths, iaction, install_plan_options, status_db); + const BuildResult result = + perform_install_plan_action(paths, *install_action, install_plan_options, status_db); if (result != BuildResult::SUCCEEDED) { - System::println(Build::create_user_troubleshooting_message(iaction.spec)); + System::println(Build::create_user_troubleshooting_message(install_action->spec)); Checks::exit_fail(VCPKG_LINE_INFO); } } + else if (auto remove_action = action.remove_plan.get()) + { + Checks::check_exit(VCPKG_LINE_INFO, GlobalState::feature_packages); + Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, status_db); + } + else + { + Checks::unreachable(VCPKG_LINE_INFO); + } } Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index 2b5033166..453e0ec96 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -129,6 +129,37 @@ namespace vcpkg::Commands::Remove } } + void perform_remove_plan_action(const VcpkgPaths& paths, + const RemovePlanAction& action, + const Purge purge, + StatusParagraphs& status_db) + { + const std::string display_name = action.spec.to_string(); + + switch (action.plan_type) + { + case RemovePlanType::NOT_INSTALLED: + System::println(System::Color::success, "Package %s is not installed", display_name); + break; + case RemovePlanType::REMOVE: + System::println("Removing package %s... ", display_name); + remove_package(paths, action.spec, &status_db); + System::println(System::Color::success, "Removing package %s... done", display_name); + break; + case RemovePlanType::UNKNOWN: + default: Checks::unreachable(VCPKG_LINE_INFO); + } + + if (purge == Purge::YES) + { + System::println("Purging package %s... ", display_name); + Files::Filesystem& fs = paths.get_filesystem(); + std::error_code ec; + fs.remove_all(paths.packages / action.spec.dir(), ec); + System::println(System::Color::success, "Purging package %s... done", display_name); + } + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { static const std::string OPTION_PURGE = "--purge"; @@ -166,14 +197,15 @@ namespace vcpkg::Commands::Remove Input::check_triplet(spec.triplet(), paths); } - const bool alsoRemoveFolderFromPackages = options.find(OPTION_NO_PURGE) == options.end(); - if (options.find(OPTION_PURGE) != options.end() && !alsoRemoveFolderFromPackages) + const bool no_purge_was_passed = options.find(OPTION_NO_PURGE) != options.end(); + const bool purge_was_passed = options.find(OPTION_PURGE) != options.end(); + if (purge_was_passed && no_purge_was_passed) { - // User specified --purge and --no-purge System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge."); System::print(EXAMPLE); Checks::exit_fail(VCPKG_LINE_INFO); } + const Purge purge = to_purge(purge_was_passed || !no_purge_was_passed); const bool isRecursive = options.find(OPTION_RECURSE) != options.cend(); const bool dryRun = options.find(OPTION_DRY_RUN) != options.cend(); @@ -209,30 +241,7 @@ namespace vcpkg::Commands::Remove for (const RemovePlanAction& action : remove_plan) { - const std::string display_name = action.spec.to_string(); - - switch (action.plan_type) - { - case RemovePlanType::NOT_INSTALLED: - System::println(System::Color::success, "Package %s is not installed", display_name); - break; - case RemovePlanType::REMOVE: - System::println("Removing package %s... ", display_name); - remove_package(paths, action.spec, &status_db); - System::println(System::Color::success, "Removing package %s... done", display_name); - break; - case RemovePlanType::UNKNOWN: - default: Checks::unreachable(VCPKG_LINE_INFO); - } - - if (alsoRemoveFolderFromPackages) - { - System::println("Purging package %s... ", display_name); - Files::Filesystem& fs = paths.get_filesystem(); - std::error_code ec; - fs.remove_all(paths.packages / action.spec.dir(), ec); - System::println(System::Color::success, "Purging package %s... done", display_name); - } + perform_remove_plan_action(paths, action, purge, status_db); } Checks::exit_success(VCPKG_LINE_INFO); -- cgit v1.2.3 From 32a01e68516d51b998ec80878eb20c000f6c95ba Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 13 Sep 2017 16:12:08 -0700 Subject: [install] Naming scheme and const --- toolsrc/src/commands_install.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index 2473ad599..2e169e8af 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -59,7 +59,7 @@ namespace vcpkg::Commands::Install auto files = fs.get_files_recursive(source_dir); for (auto&& file : files) { - auto status = fs.status(file, ec); + const auto status = fs.status(file, ec); if (ec) { System::println(System::Color::error, "failed: %s: %s", file.u8string(), ec.message()); @@ -309,7 +309,7 @@ namespace vcpkg::Commands::Install const BinaryControlFile bcf = Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); System::println("Installing package %s... ", display_name_with_features); - auto install_result = install_package(paths, bcf, &status_db); + const auto install_result = install_package(paths, bcf, &status_db); switch (install_result) { case InstallResult::SUCCESS: @@ -328,7 +328,7 @@ namespace vcpkg::Commands::Install System::Color::warning, "Package %s is already built -- not building from HEAD", display_name); } System::println("Installing package %s... ", display_name); - auto install_result = install_package( + const auto install_result = install_package( paths, action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO), &status_db); switch (install_result) { @@ -470,7 +470,7 @@ namespace vcpkg::Commands::Install const std::unordered_set options = args.check_and_get_optional_command_arguments( {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE}); - const bool dryRun = options.find(OPTION_DRY_RUN) != options.cend(); + const bool dry_run = options.find(OPTION_DRY_RUN) != options.cend(); const bool use_head_version = options.find(OPTION_USE_HEAD_VERSION) != options.cend(); const bool no_downloads = options.find(OPTION_NO_DOWNLOADS) != options.cend(); const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); @@ -519,14 +519,14 @@ namespace vcpkg::Commands::Install print_plan(action_plan, is_recursive); - if (dryRun) + if (dry_run) { Checks::exit_success(VCPKG_LINE_INFO); } for (const auto& action : action_plan) { - if (auto install_action = action.install_plan.get()) + if (const auto install_action = action.install_plan.get()) { const BuildResult result = perform_install_plan_action(paths, *install_action, install_plan_options, status_db); @@ -536,7 +536,7 @@ namespace vcpkg::Commands::Install Checks::exit_fail(VCPKG_LINE_INFO); } } - else if (auto remove_action = action.remove_plan.get()) + else if (const auto remove_action = action.remove_plan.get()) { Checks::check_exit(VCPKG_LINE_INFO, GlobalState::feature_packages); Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, status_db); -- cgit v1.2.3 From d521d366b278e9e963c18d34a7c5f41f42ea9ec7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 13 Sep 2017 17:23:04 -0700 Subject: Rework vcpkg install (and vcpkg ci) - Refactor install-plan-execution code to reduce duplication - Add `vcpkg install --keep-going` option - Add elapsed time to each invidial package and total time - Add a counter to the install (e.g. Starting package 3/12: ) --- toolsrc/include/vcpkg_Commands.h | 24 ++++++++ toolsrc/include/vcpkg_Dependencies.h | 2 + toolsrc/src/commands_ci.cpp | 52 +++------------- toolsrc/src/commands_install.cpp | 112 ++++++++++++++++++++++++++++------- toolsrc/src/vcpkg_Dependencies.cpp | 15 +++++ 5 files changed, 137 insertions(+), 68 deletions(-) diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 079388587..070a8ec49 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -33,6 +33,22 @@ namespace vcpkg::Commands namespace Install { + enum class KeepGoing + { + NO = 0, + YES + }; + + inline KeepGoing to_keep_going(const bool value) { return value ? KeepGoing::YES : KeepGoing::NO; } + + enum class PrintSummary + { + NO = 0, + YES + }; + + inline PrintSummary to_print_summary(const bool value) { return value ? PrintSummary::YES : PrintSummary::NO; } + struct InstallDir { static InstallDir from_destination_root(const fs::path& destination_root, @@ -67,6 +83,14 @@ namespace vcpkg::Commands InstallResult install_package(const VcpkgPaths& paths, const BinaryControlFile& binary_paragraph, StatusParagraphs* status_db); + + void perform_and_exit(const std::vector& action_plan, + const Build::BuildPackageOptions& install_plan_options, + const KeepGoing keep_going, + const PrintSummary print_summary, + const VcpkgPaths& paths, + StatusParagraphs& status_db); + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index 235abb839..d67122e48 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -89,6 +89,8 @@ namespace vcpkg::Dependencies Optional install_plan; Optional remove_plan; + + const PackageSpec& spec() const; }; enum class ExportPlanType diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp index fda9f1716..75ff65556 100644 --- a/toolsrc/src/commands_ci.cpp +++ b/toolsrc/src/commands_ci.cpp @@ -41,57 +41,19 @@ namespace vcpkg::Commands::CI StatusParagraphs status_db = database_load_check(paths); const auto& paths_port_file = Dependencies::PathsPortFile(paths); - const std::vector install_plan = + std::vector install_plan = Dependencies::create_install_plan(paths_port_file, specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); - std::vector results; - std::vector timing; - const ElapsedTime timer = ElapsedTime::create_started(); - size_t counter = 0; - const size_t package_count = install_plan.size(); const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; - for (const InstallPlanAction& action : install_plan) - { - const ElapsedTime build_timer = ElapsedTime::create_started(); - counter++; - const std::string display_name = action.spec.to_string(); - System::println("Starting package %d/%d: %s", counter, package_count, display_name); + const std::vector action_plan = + Util::fmap(install_plan, [](InstallPlanAction& install_action) { + return Dependencies::AnyAction(std::move(install_action)); + }); - timing.push_back("0"); - results.push_back(BuildResult::NULLVALUE); - - const BuildResult result = - Install::perform_install_plan_action(paths, action, install_plan_options, status_db); - timing.back() = build_timer.to_string(); - results.back() = result; - System::println("Elapsed time for package %s: %s", action.spec, build_timer.to_string()); - } - - System::println("Total time taken: %s", timer.to_string()); - - for (size_t i = 0; i < results.size(); i++) - { - System::println("%s: %s: %s", install_plan[i].spec, Build::to_string(results[i]), timing[i]); - } - - std::map summary; - for (const BuildResult& v : Build::BUILD_RESULT_VALUES) - { - summary[v] = 0; - } - - for (const BuildResult& r : results) - { - summary[r]++; - } - - System::println("\n\nSUMMARY"); - for (const std::pair& entry : summary) - { - System::println(" %s: %d", Build::to_string(entry.first), entry.second); - } + Install::perform_and_exit( + action_plan, install_plan_options, Install::KeepGoing::YES, Install::PrintSummary::YES, paths, status_db); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index 2e169e8af..d4cb94775 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -442,12 +442,98 @@ namespace vcpkg::Commands::Install } } + void perform_and_exit(const std::vector& action_plan, + const Build::BuildPackageOptions& install_plan_options, + const KeepGoing keep_going, + const PrintSummary print_summary, + const VcpkgPaths& paths, + StatusParagraphs& status_db) + { + std::vector results; + std::vector timing; + const ElapsedTime timer = ElapsedTime::create_started(); + size_t counter = 0; + const size_t package_count = action_plan.size(); + + for (const auto& action : action_plan) + { + const ElapsedTime build_timer = ElapsedTime::create_started(); + counter++; + + if (counter > 2) + { + break; + } + + const std::string display_name = action.spec().to_string(); + System::println("Starting package %d/%d: %s", counter, package_count, display_name); + + timing.push_back("0"); + results.push_back(BuildResult::NULLVALUE); + + if (const auto install_action = action.install_plan.get()) + { + const BuildResult result = + perform_install_plan_action(paths, *install_action, install_plan_options, status_db); + if (result != BuildResult::SUCCEEDED && keep_going == KeepGoing::NO) + { + System::println(Build::create_user_troubleshooting_message(install_action->spec)); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + results.back() = result; + } + else if (const auto remove_action = action.remove_plan.get()) + { + Checks::check_exit(VCPKG_LINE_INFO, GlobalState::feature_packages); + Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, status_db); + } + else + { + Checks::unreachable(VCPKG_LINE_INFO); + } + + timing.back() = build_timer.to_string(); + System::println("Elapsed time for package %s: %s", display_name, build_timer.to_string()); + } + + System::println("Total time taken: %s", timer.to_string()); + + if (print_summary == PrintSummary::YES) + { + for (size_t i = 0; i < results.size(); i++) + { + System::println("%s: %s: %s", action_plan[i].spec(), Build::to_string(results[i]), timing[i]); + } + + std::map summary; + for (const BuildResult& v : Build::BUILD_RESULT_VALUES) + { + summary[v] = 0; + } + + for (const BuildResult& r : results) + { + summary[r]++; + } + + System::println("\n\nSUMMARY"); + for (const std::pair& entry : summary) + { + System::println(" %s: %d", Build::to_string(entry.first), entry.second); + } + } + + Checks::exit_success(VCPKG_LINE_INFO); + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { static const std::string OPTION_DRY_RUN = "--dry-run"; static const std::string OPTION_USE_HEAD_VERSION = "--head"; static const std::string OPTION_NO_DOWNLOADS = "--no-downloads"; static const std::string OPTION_RECURSE = "--recurse"; + static const std::string OPTION_KEEP_GOING = "--keep-going"; // input sanitization static const std::string EXAMPLE = @@ -469,11 +555,12 @@ namespace vcpkg::Commands::Install } const std::unordered_set options = args.check_and_get_optional_command_arguments( - {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE}); + {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE, OPTION_KEEP_GOING}); const bool dry_run = options.find(OPTION_DRY_RUN) != options.cend(); const bool use_head_version = options.find(OPTION_USE_HEAD_VERSION) != options.cend(); const bool no_downloads = options.find(OPTION_NO_DOWNLOADS) != options.cend(); const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); + const KeepGoing keep_going = to_keep_going(options.find(OPTION_KEEP_GOING) != options.cend()); // create the plan StatusParagraphs status_db = database_load_check(paths); @@ -524,28 +611,7 @@ namespace vcpkg::Commands::Install Checks::exit_success(VCPKG_LINE_INFO); } - for (const auto& action : action_plan) - { - if (const auto install_action = action.install_plan.get()) - { - const BuildResult result = - perform_install_plan_action(paths, *install_action, install_plan_options, status_db); - if (result != BuildResult::SUCCEEDED) - { - System::println(Build::create_user_troubleshooting_message(install_action->spec)); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - else if (const auto remove_action = action.remove_plan.get()) - { - Checks::check_exit(VCPKG_LINE_INFO, GlobalState::feature_packages); - Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, status_db); - } - else - { - Checks::unreachable(VCPKG_LINE_INFO); - } - } + perform_and_exit(action_plan, install_plan_options, keep_going, PrintSummary::NO, paths, status_db); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 1a0f0a6ed..8dd60a2eb 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -213,6 +213,21 @@ namespace vcpkg::Dependencies { } + const PackageSpec& AnyAction::spec() const + { + if (const auto p = install_plan.get()) + { + return p->spec; + } + + if (const auto p = remove_plan.get()) + { + return p->spec; + } + + Checks::exit_with_message(VCPKG_LINE_INFO, "Null action"); + } + bool ExportPlanAction::compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right) { return left->spec.name() < right->spec.name(); -- cgit v1.2.3 From ac55080e02eb1f6275f384ba60826751bddaef9c Mon Sep 17 00:00:00 2001 From: glachancecmaisonneuve Date: Thu, 14 Sep 2017 00:41:11 -0400 Subject: Fixed: debug and release versions in their proper folder (was reversed) Added: Tools included in that library Misc: portfile cleanup, chm.vcxproj optimization switches --- ports/chmlib/chm.vcxproj | 14 +++-- ports/chmlib/enum_chmLib.vcxproj | 109 ++++++++++++++++++++++++++++++++++++ ports/chmlib/enumdir_chmLib.vcxproj | 100 +++++++++++++++++++++++++++++++++ ports/chmlib/extract_chmLib.vcxproj | 100 +++++++++++++++++++++++++++++++++ ports/chmlib/portfile.cmake | 65 ++++++++++++--------- 5 files changed, 359 insertions(+), 29 deletions(-) create mode 100644 ports/chmlib/enum_chmLib.vcxproj create mode 100644 ports/chmlib/enumdir_chmLib.vcxproj create mode 100644 ports/chmlib/extract_chmLib.vcxproj diff --git a/ports/chmlib/chm.vcxproj b/ports/chmlib/chm.vcxproj index 61955291e..0cc2606fe 100644 --- a/ports/chmlib/chm.vcxproj +++ b/ports/chmlib/chm.vcxproj @@ -69,22 +69,22 @@ ..\..\..\x86-windows-static-dbg\ - ..\..\..\x86-windows-static-dbg\ + ..\..\..\x86-windows-static-dbg\$(ProjectName)\ ..\..\..\x86-windows-static-rel\ - ..\..\..\x86-windows-static-rel\ + ..\..\..\x86-windows-static-rel\$(ProjectName)\ ..\..\..\x64-windows-static-dbg\ - ..\..\..\x64-windows-static-dbg\ + ..\..\..\x64-windows-static-dbg\$(ProjectName)\ ..\..\..\x64-windows-static-rel\ - ..\..\..\x64-windows-static-rel\ + ..\..\..\x64-windows-static-rel\$(ProjectName)\ @@ -98,6 +98,7 @@ CompileAsC OldStyle false + true @@ -112,6 +113,7 @@ Windows true libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib + true @@ -126,6 +128,7 @@ CompileAsC OldStyle false + true @@ -138,6 +141,7 @@ Windows true libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib + true @@ -150,6 +154,7 @@ 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) MultiThreaded CompileAsC + Full true @@ -176,6 +181,7 @@ 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) MultiThreaded CompileAsC + Full true diff --git a/ports/chmlib/enum_chmLib.vcxproj b/ports/chmlib/enum_chmLib.vcxproj new file mode 100644 index 000000000..1b847a409 --- /dev/null +++ b/ports/chmlib/enum_chmLib.vcxproj @@ -0,0 +1,109 @@ + + + + + Release + Win32 + + + Release + x64 + + + + + + + 15.0 + {2c833145-059b-47d5-b0fe-b3ac6ff1ccb0} + enum_chmLib + 10.0.14393.0 + + + + Application + true + v141 + + + Application + false + v141 + true + MultiByte + + + Application + true + v141 + + + Application + false + v141 + true + MultiByte + + + + + + + + + + + + + + + ..\..\..\x86-windows-static-rel\ + ..\..\..\x86-windows-static-rel\$(ProjectName)\ + + + ..\..\..\x64-windows-static-rel\ + ..\..\..\x64-windows-static-rel\$(ProjectName)\ + + + + MaxSpeed + true + true + true + false + WIN32;_UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS + true + MultiThreaded + + + true + true + $(OutputPath)chm.lib + Console + LinkVerbose + libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib + + + + + true + true + true + false + WIN32;_UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS + true + MultiThreaded + + + true + true + $(OutputPath)chm.lib + Console + LinkVerbose + libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib + + + + + + \ No newline at end of file diff --git a/ports/chmlib/enumdir_chmLib.vcxproj b/ports/chmlib/enumdir_chmLib.vcxproj new file mode 100644 index 000000000..8b7d552c5 --- /dev/null +++ b/ports/chmlib/enumdir_chmLib.vcxproj @@ -0,0 +1,100 @@ + + + + + Release + Win32 + + + Release + x64 + + + + + + + 15.0 + {bb0bfe9a-7d13-44a0-b2b5-3b69a07a77e8} + enumdir_chmLib + 10.0.14393.0 + + + + Application + false + v141 + true + MultiByte + + + Application + false + v141 + true + MultiByte + + + + + + + + + + + + + + + ..\..\..\x86-windows-static-rel\ + ..\..\..\x86-windows-static-rel\$(ProjectName)\ + + + ..\..\..\x64-windows-static-rel\ + ..\..\..\x64-windows-static-rel\$(ProjectName)\ + + + + Level3 + MaxSpeed + true + true + true + false + WIN32;_CRT_SECURE_NO_WARNINGS + MultiThreaded + + + true + true + $(OutputPath)chm.lib + Console + LinkVerbose + libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib + + + + + Level3 + MaxSpeed + true + true + true + false + WIN32;_CRT_SECURE_NO_WARNINGS + MultiThreaded + + + true + true + $(OutputPath)chm.lib + Console + LinkVerbose + libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib + + + + + + \ No newline at end of file diff --git a/ports/chmlib/extract_chmLib.vcxproj b/ports/chmlib/extract_chmLib.vcxproj new file mode 100644 index 000000000..a4666ed64 --- /dev/null +++ b/ports/chmlib/extract_chmLib.vcxproj @@ -0,0 +1,100 @@ + + + + + Release + Win32 + + + Release + x64 + + + + 15.0 + {8F41248C-8E62-4822-9A85-4CAF00AACEEE} + extract_chmLib + 10.0.14393.0 + + + + Application + false + v141 + true + MultiByte + + + Application + false + v141 + true + MultiByte + + + + + + + + + + + + + + + ..\..\..\x86-windows-static-rel\ + ..\..\..\x86-windows-static-rel\$(ProjectName)\ + + + ..\..\..\x64-windows-static-rel\ + ..\..\..\x64-windows-static-rel\$(ProjectName)\ + + + + Level3 + MaxSpeed + true + true + true + false + WIN32;_CRT_SECURE_NO_WARNINGS + MultiThreaded + + + true + true + $(OutputPath)chm.lib + Console + LinkVerbose + libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib + + + + + Level3 + MaxSpeed + true + true + true + false + WIN32;_CRT_SECURE_NO_WARNINGS + MultiThreaded + + + true + true + $(OutputPath)chm.lib + Console + LinkVerbose + libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib + + + + + + + + + \ No newline at end of file diff --git a/ports/chmlib/portfile.cmake b/ports/chmlib/portfile.cmake index cb2f2cf96..febf6fc58 100644 --- a/ports/chmlib/portfile.cmake +++ b/ports/chmlib/portfile.cmake @@ -1,26 +1,5 @@ -# 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) -# - -#message("VCPKG_TARGET_ARCHITECTURE" ${VCPKG_TARGET_ARCHITECTURE}) -#if(NOT ${VCPKG_TARGET_ARCHITECTURE} STREQUAL "x86") -# message(FATAL_ERROR "chmlib only supports x86") -#endif() - -if(${VCPKG_CRT_LINKAGE} STREQUAL "dynamic") - message(FATAL_ERROR "chmlib supports static linking only.") -endif() - if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") - message(FATAL_ERROR "chmlib supports static linking only.") + message(FATAL_ERROR "CHMLIB SUPPORTS STATIC LINKING ONLY.") endif() set(CHMLIB_VERSION chmlib-0.40) @@ -37,21 +16,57 @@ vcpkg_download_distfile( ) vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY "${VCPKG_ROOT_DIR}/ports/${PORT}/chm.vcxproj" - DESTINATION ${CHMLIB_SRC}) +file(GLOB VCXPROJS "${VCPKG_ROOT_DIR}/ports/${PORT}/*.vcxproj") +file(COPY ${VCXPROJS} DESTINATION ${CHMLIB_SRC}) vcpkg_build_msbuild( PROJECT_PATH ${CHMLIB_SRC}/chm.vcxproj RELEASE_CONFIGURATION Release DEBUG_CONFIGURATION Debug + OPTIONS_DEBUG /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + OPTIONS_RELEASE /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + OPTIONS /v:diagnostic /p:SkipInvalidConfigurations=true +) + +#enum_chmLib RELEASE only +vcpkg_build_msbuild( + PROJECT_PATH ${CHMLIB_SRC}/enum_chmLib.vcxproj + RELEASE_CONFIGURATION Release + DEBUG_CONFIGURATION Release + TARGET Build + OPTIONS_DEBUG /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + OPTIONS_RELEASE /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + OPTIONS /v:diagnostic /p:SkipInvalidConfigurations=true +) + +#enumdir_chmLib RELEASE only +vcpkg_build_msbuild( + PROJECT_PATH ${CHMLIB_SRC}/enumdir_chmLib.vcxproj + RELEASE_CONFIGURATION Release + DEBUG_CONFIGURATION Release + TARGET Build + OPTIONS_DEBUG /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + OPTIONS_RELEASE /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + OPTIONS /v:diagnostic /p:SkipInvalidConfigurations=true +) + +#extract_chmLib RELEASE only +vcpkg_build_msbuild( + PROJECT_PATH ${CHMLIB_SRC}/extract_chmLib.vcxproj + RELEASE_CONFIGURATION Release + DEBUG_CONFIGURATION Release + TARGET Build OPTIONS_DEBUG /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - OPTIONS_RELEASE /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + OPTIONS_RELEASE /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" OPTIONS /v:diagnostic /p:SkipInvalidConfigurations=true ) file(INSTALL ${CHMLIB_SRC}/chm_lib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/enum_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/enumdir_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/extract_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) file(COPY ${CURRENT_BUILDTREES_DIR}/src/chmlib-0.40/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/chmlib) file(RENAME ${CURRENT_PACKAGES_DIR}/share/chmlib/COPYING ${CURRENT_PACKAGES_DIR}/share/chmlib/copyright) \ No newline at end of file -- cgit v1.2.3 From d080439ce408c4fd0312f0925f10543179e79b27 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 13 Sep 2017 21:46:48 -0700 Subject: [commands_remove.cpp] Naming scheme and missing const --- toolsrc/src/commands_remove.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index 453e0ec96..a9f1b2564 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -18,7 +18,7 @@ namespace vcpkg::Commands::Remove { auto& fs = paths.get_filesystem(); auto spghs = status_db->find_all(spec.name(), spec.triplet()); - auto core_pkg = **status_db->find(spec.name(), spec.triplet(), Strings::EMPTY); + const auto core_pkg = **status_db->find(spec.name(), spec.triplet(), Strings::EMPTY); for (auto&& spgh : spghs) { @@ -31,7 +31,7 @@ namespace vcpkg::Commands::Remove auto maybe_lines = fs.read_lines(paths.listfile_path(core_pkg.package)); - if (auto lines = maybe_lines.get()) + if (const auto lines = maybe_lines.get()) { std::vector dirs_touched; for (auto&& suffix : *lines) @@ -42,7 +42,7 @@ namespace vcpkg::Commands::Remove auto target = paths.installed / suffix; - auto status = fs.status(target, ec); + const auto status = fs.status(target, ec); if (ec) { System::println(System::Color::error, "failed: %s", ec.message()); @@ -72,7 +72,7 @@ namespace vcpkg::Commands::Remove } auto b = dirs_touched.rbegin(); - auto e = dirs_touched.rend(); + const auto e = dirs_touched.rend(); for (; b != e; ++b) { if (fs.is_empty(*b)) @@ -100,11 +100,11 @@ namespace vcpkg::Commands::Remove static void print_plan(const std::map>& group_by_plan_type) { - static constexpr std::array order = {RemovePlanType::NOT_INSTALLED, RemovePlanType::REMOVE}; + static constexpr std::array ORDER = {RemovePlanType::NOT_INSTALLED, RemovePlanType::REMOVE}; - for (const RemovePlanType plan_type : order) + for (const RemovePlanType plan_type : ORDER) { - auto it = group_by_plan_type.find(plan_type); + const auto it = group_by_plan_type.find(plan_type); if (it == group_by_plan_type.cend()) { continue; @@ -206,8 +206,8 @@ namespace vcpkg::Commands::Remove Checks::exit_fail(VCPKG_LINE_INFO); } const Purge purge = to_purge(purge_was_passed || !no_purge_was_passed); - const bool isRecursive = options.find(OPTION_RECURSE) != options.cend(); - const bool dryRun = options.find(OPTION_DRY_RUN) != options.cend(); + const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); + const bool dry_run = options.find(OPTION_DRY_RUN) != options.cend(); const std::vector remove_plan = Dependencies::create_remove_plan(specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !remove_plan.empty(), "Remove plan cannot be empty"); @@ -226,7 +226,7 @@ namespace vcpkg::Commands::Remove System::println(System::Color::warning, "Additional packages (*) need to be removed to complete this operation."); - if (!isRecursive) + if (!is_recursive) { System::println(System::Color::warning, "If you are sure you want to remove them, run the command with the --recurse option"); @@ -234,7 +234,7 @@ namespace vcpkg::Commands::Remove } } - if (dryRun) + if (dry_run) { Checks::exit_success(VCPKG_LINE_INFO); } -- cgit v1.2.3 From 2d1bee6bb5f776e6f7281d0245ef7f0030cb7412 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 13 Sep 2017 21:48:38 -0700 Subject: [vcpkg.cpp] Naming scheme --- toolsrc/src/vcpkg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 781f03585..75b61f952 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -104,7 +104,7 @@ static void inner(const VcpkgCmdArguments& args) return invalid_command(args.command); } -static void loadConfig() +static void load_config() { fs::path localappdata; { @@ -207,7 +207,7 @@ int wmain(const int argc, const wchar_t* const* const argv) locked_metrics->track_property("version", Commands::Version::version()); locked_metrics->track_property("cmdline", trimmed_command_line); } - loadConfig(); + load_config(); Metrics::g_metrics.lock()->track_property("sqmuser", Metrics::get_SQM_user()); const VcpkgCmdArguments args = VcpkgCmdArguments::create_from_command_line(argc, argv); -- cgit v1.2.3 From c6af9797fd5a4df5f3b709784c95e9590beb2d32 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 13 Sep 2017 23:08:01 -0700 Subject: [metrics.cpp] Naming scheme and missing const --- toolsrc/src/metrics.cpp | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/metrics.cpp index 8a7d02a30..3c352f1a6 100644 --- a/toolsrc/src/metrics.cpp +++ b/toolsrc/src/metrics.cpp @@ -20,9 +20,9 @@ namespace vcpkg::Metrics _ftime_s(&timebuffer); time_t now = timebuffer.time; - int milli = timebuffer.millitm; + const int milli = timebuffer.millitm; - errno_t err = gmtime_s(&newtime, &now); + const errno_t err = gmtime_s(&newtime, &now); if (err) { return Strings::EMPTY; @@ -34,7 +34,7 @@ namespace vcpkg::Metrics static std::string generate_random_UUID() { - int partSizes[] = {8, 4, 4, 4, 12}; + int part_sizes[] = {8, 4, 4, 4, 12}; char uuid[37]; memset(uuid, 0, sizeof(uuid)); int num; @@ -50,7 +50,7 @@ namespace vcpkg::Metrics // Generating UUID format version 4 // http://en.wikipedia.org/wiki/Universally_unique_identifier - for (int i = 0; i < partSizes[part]; i++, index++) + for (int i = 0; i < part_sizes[part]; i++, index++) { if (part == 2 && i == 0) { @@ -81,8 +81,8 @@ namespace vcpkg::Metrics static const std::string& get_session_id() { - static const std::string id = generate_random_UUID(); - return id; + static const std::string ID = generate_random_UUID(); + return ID; } static std::string to_json_string(const std::string& str) @@ -101,11 +101,11 @@ namespace vcpkg::Metrics else if (ch < 0x20 || ch >= 0x80) { // Note: this treats incoming Strings as Latin-1 - static constexpr const char hex[16] = { + static constexpr const char HEX[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; encoded.append("\\u00"); - encoded.push_back(hex[ch / 16]); - encoded.push_back(hex[ch % 16]); + encoded.push_back(HEX[ch / 16]); + encoded.push_back(HEX[ch % 16]); } else { @@ -120,7 +120,7 @@ namespace vcpkg::Metrics { std::wstring path; path.resize(MAX_PATH); - auto n = GetSystemDirectoryW(&path[0], static_cast(path.size())); + const auto n = GetSystemDirectoryW(&path[0], static_cast(path.size())); path.resize(n); path += L"\\kernel32.dll"; @@ -282,10 +282,11 @@ namespace vcpkg::Metrics { if (MAXDWORD <= payload.size()) abort(); std::wstring hdrs = L"Content-Type: application/json\r\n"; + std::string& p = const_cast(payload); bResults = WinHttpSendRequest(hRequest, hdrs.c_str(), static_cast(hdrs.size()), - (void*)&payload[0], + static_cast(&p[0]), static_cast(payload.size()), static_cast(payload.size()), 0); @@ -308,24 +309,24 @@ namespace vcpkg::Metrics WINHTTP_NO_HEADER_INDEX); } - std::vector responseBuffer; + std::vector response_buffer; if (bResults) { - DWORD availableData = 0, readData = 0, totalData = 0; - while ((bResults = WinHttpQueryDataAvailable(hRequest, &availableData)) == TRUE && availableData > 0) + DWORD available_data = 0, read_data = 0, total_data = 0; + while ((bResults = WinHttpQueryDataAvailable(hRequest, &available_data)) == TRUE && available_data > 0) { - responseBuffer.resize(responseBuffer.size() + availableData); + response_buffer.resize(response_buffer.size() + available_data); - bResults = WinHttpReadData(hRequest, &responseBuffer.data()[totalData], availableData, &readData); + bResults = WinHttpReadData(hRequest, &response_buffer.data()[total_data], available_data, &read_data); if (!bResults) { break; } - totalData += readData; + total_data += read_data; - responseBuffer.resize(totalData); + response_buffer.resize(total_data); } } @@ -388,8 +389,8 @@ namespace vcpkg::Metrics const fs::path vcpkg_metrics_txt_path = temp_folder_path / ("vcpkg" + generate_random_UUID() + ".txt"); fs.write_contents(vcpkg_metrics_txt_path, payload); - const std::wstring cmdLine = + const std::wstring cmd_line = Strings::wformat(L"start %s %s", temp_folder_path_exe.native(), vcpkg_metrics_txt_path.native()); - System::cmd_execute_clean(cmdLine); + System::cmd_execute_clean(cmd_line); } } -- cgit v1.2.3 From 263466642face5485d50bccb60b45e774fe31fd9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 13 Sep 2017 23:10:53 -0700 Subject: [metrics.cpp] More naming scheme and const fixes --- toolsrc/src/metrics.cpp | 95 ++++++++++++++++++++++++------------------------- 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/metrics.cpp index 3c352f1a6..8a0050bfc 100644 --- a/toolsrc/src/metrics.cpp +++ b/toolsrc/src/metrics.cpp @@ -124,7 +124,7 @@ namespace vcpkg::Metrics path.resize(n); path += L"\\kernel32.dll"; - auto versz = GetFileVersionInfoSizeW(path.c_str(), nullptr); + const auto versz = GetFileVersionInfoSizeW(path.c_str(), nullptr); if (versz == 0) return Strings::EMPTY; std::vector verbuf; @@ -152,7 +152,7 @@ namespace vcpkg::Metrics std::string properties; std::string measurements; - void TrackProperty(const std::string& name, const std::string& value) + void track_property(const std::string& name, const std::string& value) { if (properties.size() != 0) properties.push_back(','); properties.append(to_json_string(name)); @@ -160,7 +160,7 @@ namespace vcpkg::Metrics properties.append(to_json_string(value)); } - void TrackMetric(const std::string& name, double value) + void track_metric(const std::string& name, double value) { if (measurements.size() != 0) measurements.push_back(','); measurements.append(to_json_string(name)); @@ -241,7 +241,7 @@ namespace vcpkg::Metrics void Metrics::set_print_metrics(bool should_print_metrics) { g_should_print_metrics = should_print_metrics; } - void Metrics::track_metric(const std::string& name, double value) { g_metricmessage.TrackMetric(name, value); } + void Metrics::track_metric(const std::string& name, double value) { g_metricmessage.track_metric(name, value); } void Metrics::track_property(const std::string& name, const std::wstring& value) { @@ -251,75 +251,74 @@ namespace vcpkg::Metrics std::transform( value.begin(), value.end(), converted_value.begin(), [](wchar_t ch) { return static_cast(ch); }); - g_metricmessage.TrackProperty(name, converted_value); + g_metricmessage.track_property(name, converted_value); } void Metrics::track_property(const std::string& name, const std::string& value) { - g_metricmessage.TrackProperty(name, value); + g_metricmessage.track_property(name, value); } void Metrics::upload(const std::string& payload) { - HINTERNET hSession = nullptr, hConnect = nullptr, hRequest = nullptr; - BOOL bResults = FALSE; + HINTERNET connect = nullptr, request = nullptr; + BOOL results = FALSE; - hSession = WinHttpOpen( + const HINTERNET session = WinHttpOpen( L"vcpkg/1.0", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); - if (hSession) - hConnect = WinHttpConnect(hSession, L"dc.services.visualstudio.com", INTERNET_DEFAULT_HTTPS_PORT, 0); - - if (hConnect) - hRequest = WinHttpOpenRequest(hConnect, - L"POST", - L"/v2/track", - nullptr, - WINHTTP_NO_REFERER, - WINHTTP_DEFAULT_ACCEPT_TYPES, - WINHTTP_FLAG_SECURE); - - if (hRequest) + if (session) connect = WinHttpConnect(session, L"dc.services.visualstudio.com", INTERNET_DEFAULT_HTTPS_PORT, 0); + + if (connect) + request = WinHttpOpenRequest(connect, + L"POST", + L"/v2/track", + nullptr, + WINHTTP_NO_REFERER, + WINHTTP_DEFAULT_ACCEPT_TYPES, + WINHTTP_FLAG_SECURE); + + if (request) { if (MAXDWORD <= payload.size()) abort(); std::wstring hdrs = L"Content-Type: application/json\r\n"; std::string& p = const_cast(payload); - bResults = WinHttpSendRequest(hRequest, - hdrs.c_str(), - static_cast(hdrs.size()), - static_cast(&p[0]), - static_cast(payload.size()), - static_cast(payload.size()), - 0); + results = WinHttpSendRequest(request, + hdrs.c_str(), + static_cast(hdrs.size()), + static_cast(&p[0]), + static_cast(payload.size()), + static_cast(payload.size()), + 0); } - if (bResults) + if (results) { - bResults = WinHttpReceiveResponse(hRequest, nullptr); + results = WinHttpReceiveResponse(request, nullptr); } DWORD http_code = 0, junk = sizeof(DWORD); - if (bResults) + if (results) { - bResults = WinHttpQueryHeaders(hRequest, - WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, - nullptr, - &http_code, - &junk, - WINHTTP_NO_HEADER_INDEX); + results = WinHttpQueryHeaders(request, + WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, + nullptr, + &http_code, + &junk, + WINHTTP_NO_HEADER_INDEX); } std::vector response_buffer; - if (bResults) + if (results) { DWORD available_data = 0, read_data = 0, total_data = 0; - while ((bResults = WinHttpQueryDataAvailable(hRequest, &available_data)) == TRUE && available_data > 0) + while ((results = WinHttpQueryDataAvailable(request, &available_data)) == TRUE && available_data > 0) { response_buffer.resize(response_buffer.size() + available_data); - bResults = WinHttpReadData(hRequest, &response_buffer.data()[total_data], available_data, &read_data); + results = WinHttpReadData(request, &response_buffer.data()[total_data], available_data, &read_data); - if (!bResults) + if (!results) { break; } @@ -330,7 +329,7 @@ namespace vcpkg::Metrics } } - if (!bResults) + if (!results) { #ifndef NDEBUG __debugbreak(); @@ -339,22 +338,22 @@ namespace vcpkg::Metrics #endif } - if (hRequest) WinHttpCloseHandle(hRequest); - if (hConnect) WinHttpCloseHandle(hConnect); - if (hSession) WinHttpCloseHandle(hSession); + if (request) WinHttpCloseHandle(request); + if (connect) WinHttpCloseHandle(connect); + if (session) WinHttpCloseHandle(session); } static fs::path get_bindir() { wchar_t buf[_MAX_PATH]; - int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); + const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); if (bytes == 0) std::abort(); return fs::path(buf, buf + bytes); } void Metrics::flush() { - std::string payload = g_metricmessage.format_event_data_template(); + const std::string payload = g_metricmessage.format_event_data_template(); if (g_should_print_metrics) std::cerr << payload << "\n"; if (!g_should_send_metrics) return; -- cgit v1.2.3 From 2d6029e41c68fd44b22f8cef1b13fbaa44c8fad9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 14 Sep 2017 04:04:15 -0700 Subject: Introduce Version::warn_if_vcpkg_version_mismatch() --- toolsrc/include/vcpkg_Commands.h | 1 + toolsrc/src/commands_update.cpp | 28 ++-------------------------- toolsrc/src/commands_version.cpp | 32 ++++++++++++++++++++++++++++++-- 3 files changed, 33 insertions(+), 28 deletions(-) diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 070a8ec49..590f0208c 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -210,6 +210,7 @@ namespace vcpkg::Commands namespace Version { const std::string& version(); + void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths); void perform_and_exit(const VcpkgCmdArguments& args); } diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index 35f24af12..42a8333bd 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -2,7 +2,6 @@ #include "Paragraphs.h" #include "vcpkg_Commands.h" -#include "vcpkg_Files.h" #include "vcpkg_System.h" #include "vcpkglib.h" @@ -22,7 +21,7 @@ namespace vcpkg::Commands::Update std::vector output; for (const StatusParagraph* pgh : installed_packages) { - auto it = src_names_to_versions.find(pgh->package.spec.name()); + const auto it = src_names_to_versions.find(pgh->package.spec.name()); if (it == src_names_to_versions.end()) { // Package was not installed from portfile @@ -69,30 +68,7 @@ namespace vcpkg::Commands::Update install_line); } - auto version_file = paths.get_filesystem().read_contents(paths.root / "toolsrc" / "VERSION.txt"); - if (auto version_contents = version_file.get()) - { - int maj1, min1, rev1; - auto num1 = sscanf_s(version_contents->c_str(), "\"%d.%d.%d\"", &maj1, &min1, &rev1); - - int maj2, min2, rev2; - auto num2 = sscanf_s(Version::version().c_str(), "%d.%d.%d-", &maj2, &min2, &rev2); - - if (num1 == 3 && num2 == 3) - { - if (maj1 != maj2 || min1 != min2 || rev1 != rev2) - { - System::println("Different source is available for vcpkg (%d.%d.%d -> %d.%d.%d). Use " - ".\\bootstrap-vcpkg.bat to update.", - maj2, - min2, - rev2, - maj1, - min1, - rev1); - } - } - } + Version::warn_if_vcpkg_version_mismatch(paths); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/commands_version.cpp b/toolsrc/src/commands_version.cpp index af81cd26e..fdbe7b66c 100644 --- a/toolsrc/src/commands_version.cpp +++ b/toolsrc/src/commands_version.cpp @@ -13,7 +13,7 @@ namespace vcpkg::Commands::Version { const std::string& version() { - static const std::string s_version = + static const std::string S_VERSION = #include "../VERSION.txt" +std::string(VCPKG_VERSION_AS_STRING) @@ -21,7 +21,35 @@ namespace vcpkg::Commands::Version + std::string("-debug") #endif + std::string(Metrics::get_compiled_metrics_enabled() ? Strings::EMPTY : "-external"); - return s_version; + return S_VERSION; + } + + void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths) + { + auto version_file = paths.get_filesystem().read_contents(paths.root / "toolsrc" / "VERSION.txt"); + if (const auto version_contents = version_file.get()) + { + int maj1, min1, rev1; + const auto num1 = sscanf_s(version_contents->c_str(), "\"%d.%d.%d\"", &maj1, &min1, &rev1); + + int maj2, min2, rev2; + const auto num2 = sscanf_s(Version::version().c_str(), "%d.%d.%d-", &maj2, &min2, &rev2); + + if (num1 == 3 && num2 == 3) + { + if (maj1 != maj2 || min1 != min2 || rev1 != rev2) + { + System::println("Different source is available for vcpkg (%d.%d.%d -> %d.%d.%d). Use " + ".\\bootstrap-vcpkg.bat to update.", + maj2, + min2, + rev2, + maj1, + min1, + rev1); + } + } + } } void perform_and_exit(const VcpkgCmdArguments& args) -- cgit v1.2.3 From d55036a7978d122292f3e33c84ae49269ba5498b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 14 Sep 2017 04:12:13 -0700 Subject: Change message of version mismach to a warning --- toolsrc/src/commands_version.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/commands_version.cpp b/toolsrc/src/commands_version.cpp index fdbe7b66c..5744ea9ef 100644 --- a/toolsrc/src/commands_version.cpp +++ b/toolsrc/src/commands_version.cpp @@ -39,7 +39,8 @@ namespace vcpkg::Commands::Version { if (maj1 != maj2 || min1 != min2 || rev1 != rev2) { - System::println("Different source is available for vcpkg (%d.%d.%d -> %d.%d.%d). Use " + System::println(System::Color::warning, + "Warning: Different source is available for vcpkg (%d.%d.%d -> %d.%d.%d). Use " ".\\bootstrap-vcpkg.bat to update.", maj2, min2, -- cgit v1.2.3 From be27ae05f081997556b3273ba23c6e574d469854 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 14 Sep 2017 04:13:03 -0700 Subject: Version check is now performed before running any command (except vcpkg version/hash/contact) --- toolsrc/src/commands_update.cpp | 2 -- toolsrc/src/vcpkg.cpp | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index 42a8333bd..71ea4b063 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -68,8 +68,6 @@ namespace vcpkg::Commands::Update install_line); } - Version::warn_if_vcpkg_version_mismatch(paths); - Checks::exit_success(VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 75b61f952..f4300a73c 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -69,6 +69,7 @@ static void inner(const VcpkgCmdArguments& args) const VcpkgPaths paths = expected_paths.value_or_exit(VCPKG_LINE_INFO); const int exit_code = _wchdir(paths.root.c_str()); Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed"); + Commands::Version::warn_if_vcpkg_version_mismatch(paths); if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_b())) { -- cgit v1.2.3 From aa72ecc6a4ef205526c5e435a54e18ec042fe260 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 14 Sep 2017 08:14:41 -0700 Subject: [vcpkg] hotfix for ci/install merge Disables accidental testing statement that was left in during the commit. --- toolsrc/src/commands_install.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index d4cb94775..b530a394c 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -462,7 +462,7 @@ namespace vcpkg::Commands::Install if (counter > 2) { - break; + // break; } const std::string display_name = action.spec().to_string(); -- cgit v1.2.3 From e93b7aca655007efbcd715857f7cefaa617b8089 Mon Sep 17 00:00:00 2001 From: glachancecmaisonneuve Date: Thu, 14 Sep 2017 13:19:50 -0400 Subject: Dynamic build -> Static without failing the build --- ports/chmlib/portfile.cmake | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/ports/chmlib/portfile.cmake b/ports/chmlib/portfile.cmake index febf6fc58..74cc746d6 100644 --- a/ports/chmlib/portfile.cmake +++ b/ports/chmlib/portfile.cmake @@ -1,5 +1,5 @@ -if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") - message(FATAL_ERROR "CHMLIB SUPPORTS STATIC LINKING ONLY.") +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported. Building static.") endif() set(CHMLIB_VERSION chmlib-0.40) @@ -23,9 +23,8 @@ vcpkg_build_msbuild( PROJECT_PATH ${CHMLIB_SRC}/chm.vcxproj RELEASE_CONFIGURATION Release DEBUG_CONFIGURATION Debug - OPTIONS_DEBUG /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" - OPTIONS_RELEASE /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - OPTIONS /v:diagnostic /p:SkipInvalidConfigurations=true + TARGET Build + OPTIONS /v:diagnostic ) #enum_chmLib RELEASE only @@ -34,9 +33,7 @@ vcpkg_build_msbuild( RELEASE_CONFIGURATION Release DEBUG_CONFIGURATION Release TARGET Build - OPTIONS_DEBUG /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - OPTIONS_RELEASE /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - OPTIONS /v:diagnostic /p:SkipInvalidConfigurations=true + OPTIONS /v:diagnostic ) #enumdir_chmLib RELEASE only @@ -45,9 +42,7 @@ vcpkg_build_msbuild( RELEASE_CONFIGURATION Release DEBUG_CONFIGURATION Release TARGET Build - OPTIONS_DEBUG /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - OPTIONS_RELEASE /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - OPTIONS /v:diagnostic /p:SkipInvalidConfigurations=true + OPTIONS /v:diagnostic ) #extract_chmLib RELEASE only @@ -56,17 +51,15 @@ vcpkg_build_msbuild( RELEASE_CONFIGURATION Release DEBUG_CONFIGURATION Release TARGET Build - OPTIONS_DEBUG /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - OPTIONS_RELEASE /p:OutDirPath="${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" - OPTIONS /v:diagnostic /p:SkipInvalidConfigurations=true + OPTIONS /v:diagnostic ) file(INSTALL ${CHMLIB_SRC}/chm_lib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/enum_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/enumdir_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/extract_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-rel/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-dbg/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-rel/enum_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-rel/enumdir_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-rel/extract_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) file(COPY ${CURRENT_BUILDTREES_DIR}/src/chmlib-0.40/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/chmlib) file(RENAME ${CURRENT_PACKAGES_DIR}/share/chmlib/COPYING ${CURRENT_PACKAGES_DIR}/share/chmlib/copyright) \ No newline at end of file -- cgit v1.2.3 From 785d3959f4eb83d1423ceaa739671948d87998f9 Mon Sep 17 00:00:00 2001 From: glachancecmaisonneuve Date: Thu, 14 Sep 2017 13:22:27 -0400 Subject: bump subversion --- ports/chmlib/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/chmlib/CONTROL b/ports/chmlib/CONTROL index 22680db33..226a3be92 100644 --- a/ports/chmlib/CONTROL +++ b/ports/chmlib/CONTROL @@ -1,3 +1,3 @@ Source: chmlib -Version: 0.40 +Version: 0.40-1 Description: CHMLIB is a library for dealing with Microsoft ITSS/CHM format files. Right now, it is a very simple library, but sufficient for dealing with all of the .chm files I've come across. Due to the fairly well-designed indexing built into this particular file format, even a small library is able to gain reasonably good performance indexing into ITSS archives. \ No newline at end of file -- cgit v1.2.3 From 8339f29df5fb5657cdeeb2b8eaa4f48d7d08a0c2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 14 Sep 2017 13:41:07 -0700 Subject: Remove stray debugging code --- toolsrc/src/commands_install.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index b530a394c..aca25996e 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -460,11 +460,6 @@ namespace vcpkg::Commands::Install const ElapsedTime build_timer = ElapsedTime::create_started(); counter++; - if (counter > 2) - { - // break; - } - const std::string display_name = action.spec().to_string(); System::println("Starting package %d/%d: %s", counter, package_count, display_name); -- cgit v1.2.3 From 6363910319a082512179269fb6329ecbc367b3bc Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 14 Sep 2017 15:45:32 -0700 Subject: `vcpkg edit`: Improve detection for VSCode - Insiders. Prefer it if available --- toolsrc/src/commands_edit.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp index dc28de737..7f400f48b 100644 --- a/toolsrc/src/commands_edit.cpp +++ b/toolsrc/src/commands_edit.cpp @@ -8,11 +8,10 @@ namespace vcpkg::Commands::Edit { static std::vector find_from_registry() { - static const std::array REGKEYS = { + static const std::array REGKEYS = { LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", - LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", + LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1287CAD5-7C8D-410D-88B9-0D1EE4A83FF2}_is1)", LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", - LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", }; std::vector output; @@ -23,8 +22,8 @@ namespace vcpkg::Commands::Edit if (const auto c = code_installpath.get()) { const fs::path install_path = fs::path(*c); - output.push_back(install_path / "Code.exe"); output.push_back(install_path / "Code - Insiders.exe"); + output.push_back(install_path / "Code.exe"); } } return output; @@ -34,6 +33,9 @@ namespace vcpkg::Commands::Edit { static const std::string OPTION_BUILDTREES = "--buildtrees"; + static const fs::path VS_CODE_INSIDERS = fs::path{"Microsoft VS Code Insiders"} / "Code - Insiders.exe"; + static const fs::path VS_CODE = fs::path{"Microsoft VS Code Insiders"} / "Code - Insiders.exe"; + auto& fs = paths.get_filesystem(); static const std::string EXAMPLE = Commands::Help::create_example_string("edit zlib"); @@ -48,8 +50,10 @@ namespace vcpkg::Commands::Edit std::vector candidate_paths; const std::vector from_path = Files::find_from_PATH(L"EDITOR"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - candidate_paths.push_back(System::get_program_files_platform_bitness() / "Microsoft VS Code" / "Code.exe"); - candidate_paths.push_back(System::get_program_files_32_bit() / "Microsoft VS Code" / "Code.exe"); + candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE_INSIDERS); + candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE_INSIDERS); + candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE); + candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE); const std::vector from_registry = find_from_registry(); candidate_paths.insert(candidate_paths.end(), from_registry.cbegin(), from_registry.cend()); -- cgit v1.2.3 From fff093029f31f453682bef33da36c477e2e1755c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 14 Sep 2017 15:47:24 -0700 Subject: [chmblib] Also modify VCPKG_LIBRARY_LINKAGE --- ports/chmlib/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/chmlib/portfile.cmake b/ports/chmlib/portfile.cmake index 74cc746d6..60381bb1a 100644 --- a/ports/chmlib/portfile.cmake +++ b/ports/chmlib/portfile.cmake @@ -1,5 +1,6 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(STATUS "Warning: Dynamic building not supported. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) endif() set(CHMLIB_VERSION chmlib-0.40) -- cgit v1.2.3 From bff6bdb53f74f742ebb6e245732145da3a088d23 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 14 Sep 2017 15:57:00 -0700 Subject: Update CHANGELOG and bump version to v0.0.89 --- CHANGELOG.md | 19 +++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5ce7c89..8dedb66aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ +vcpkg (0.0.89) +-------------- + * Update ports: + - boost 1.65-1 -> 1.65.1 + - chmlib 0.40 -> 0.40-1 + - pybind11 2.1.0-2 -> 2.2.0 + - sciter 4.0.2-1 -> 4.0.3 + - sqlite3 3.19.1-2 -> 3.20.1 + * `vcpkg` now warns if the built version of the `vcpkg.exe` itself is outdated + * Update to latest python 3.5 + * `vcpkg install` improvements: + - Add `--keep-going` option to keep going if a package fails to install + - Add elapsed time to each invidial package as well as total time + - Add a counter to the install (e.g. Starting package 3/12: ) + * `vcpkg edit` now checks more location for VSCode Insiders + +-- vcpkg team SAT, 09 Sep 2017 00:30:00 -0800 + + vcpkg (0.0.88) -------------- * `vcpkg_configure_cmake` has been modified to embed debug symbols within static libraries (using the /Z7 option). Most of the libraries in `vcpkg` had their versions bumped due to this. diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index feb2033f0..7e1c0e952 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.88" \ No newline at end of file +"0.0.89" \ No newline at end of file -- cgit v1.2.3 From eb0591597e4cb93ddc94f5b738dd5f519bffc529 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 14 Sep 2017 16:00:02 -0700 Subject: Update CHANGELOG and bump version to v0.0.89 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dedb66aa..7cba05a1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ vcpkg (0.0.89) - Add a counter to the install (e.g. Starting package 3/12: ) * `vcpkg edit` now checks more location for VSCode Insiders --- vcpkg team SAT, 09 Sep 2017 00:30:00 -0800 +-- vcpkg team WED, 14 Sep 2017 16:00:00 -0800 vcpkg (0.0.88) -- cgit v1.2.3 From b1b72eaef599fadfe8cc74417b4a1f1220bdfebc Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 15 Sep 2017 11:00:36 +0200 Subject: updatedgoogle benchmark to current trunk due to problems with variadic templated benchmarks with visual studio --- ports/benchmark/CONTROL | 2 +- ports/benchmark/fix-cmakelists.patch | 33 +++++++++------------------------ ports/benchmark/portfile.cmake | 7 +++++-- 3 files changed, 15 insertions(+), 27 deletions(-) diff --git a/ports/benchmark/CONTROL b/ports/benchmark/CONTROL index 9268d52dc..7fcb5b7cb 100644 --- a/ports/benchmark/CONTROL +++ b/ports/benchmark/CONTROL @@ -1,3 +1,3 @@ Source: benchmark -Version: 1.1.0-1 +Version: 1.2.0-1 Description: A library to support the benchmarking of functions, similar to unit-tests. diff --git a/ports/benchmark/fix-cmakelists.patch b/ports/benchmark/fix-cmakelists.patch index f1d72fdc3..06430396e 100644 --- a/ports/benchmark/fix-cmakelists.patch +++ b/ports/benchmark/fix-cmakelists.patch @@ -1,27 +1,12 @@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 4038875..94d2aea 100644 +index 244484b..903dea4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -28,17 +28,20 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - endif() - - # Expose public API --target_include_directories(benchmark PUBLIC ${PROJECT_SOURCE_DIR}/include) -+target_include_directories(benchmark PRIVATE ${PROJECT_SOURCE_DIR}/include) - - # Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable) - install( - TARGETS benchmark -+ EXPORT benchmarkTargets - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin -- COMPONENT library) -+ INCLUDES DESTINATION include) - - install( - DIRECTORY "${PROJECT_SOURCE_DIR}/include/benchmark" - DESTINATION include - FILES_MATCHING PATTERN "*.*h") -+ -+install(EXPORT benchmarkTargets NAMESPACE benchmark:: DESTINATION share/benchmark) +@@ -37,7 +37,7 @@ endif() + set(include_install_dir "include") + set(lib_install_dir "lib/") + set(bin_install_dir "bin/") +-set(config_install_dir "lib/cmake/${PROJECT_NAME}") ++set(config_install_dir "share/${PROJECT_NAME}/cmake/") + + set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake index d8fc98a7e..4288be8c8 100644 --- a/ports/benchmark/portfile.cmake +++ b/ports/benchmark/portfile.cmake @@ -12,8 +12,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/benchmark - REF v1.1.0 - SHA512 533061531e6a37723a626addc9e779018c4c2cfc8634ae45860eec0d3800103b5b562f865ac1dc0c8dbe045579b81e59de887e1c48318cebf160f03c18321831 + REF 6d8339dd97afea4633e54ed4b42307aff4386040 + #REF 1.1.0 + SHA512 d9b67ad9876c99102668364e89041bda24090aca39335155624183412d8e8c9e7a9f0585af859c0380af39a3ce40f6db1601bb3397a584f20edca760b31188a2 + #SHA512 533061531e6a37723a626addc9e779018c4c2cfc8634ae45860eec0d3800103b5b562f865ac1dc0c8dbe045579b81e59de887e1c48318cebf160f03c18321831 HEAD_REF master ) @@ -36,6 +38,7 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets() 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/benchmark) -- cgit v1.2.3 From bfd37745f378a952ff44826e80d667e89c3ec428 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 15 Sep 2017 11:16:58 +0200 Subject: fix so that the cmake patch is applied correctly --- ports/benchmark/fix-cmakelists.patch | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/benchmark/fix-cmakelists.patch b/ports/benchmark/fix-cmakelists.patch index 06430396e..51eadde46 100644 --- a/ports/benchmark/fix-cmakelists.patch +++ b/ports/benchmark/fix-cmakelists.patch @@ -10,3 +10,4 @@ index 244484b..903dea4 100644 +set(config_install_dir "share/${PROJECT_NAME}/cmake/") set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") + -- cgit v1.2.3 From e1909d56a4ae3fe61d67554e2f4ea1579616ecd3 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 15 Sep 2017 11:19:16 +0200 Subject: Removed old hashes --- ports/benchmark/portfile.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake index 4288be8c8..58cdc8e0f 100644 --- a/ports/benchmark/portfile.cmake +++ b/ports/benchmark/portfile.cmake @@ -13,9 +13,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/benchmark REF 6d8339dd97afea4633e54ed4b42307aff4386040 - #REF 1.1.0 SHA512 d9b67ad9876c99102668364e89041bda24090aca39335155624183412d8e8c9e7a9f0585af859c0380af39a3ce40f6db1601bb3397a584f20edca760b31188a2 - #SHA512 533061531e6a37723a626addc9e779018c4c2cfc8634ae45860eec0d3800103b5b562f865ac1dc0c8dbe045579b81e59de887e1c48318cebf160f03c18321831 HEAD_REF master ) -- cgit v1.2.3 From cf516e08f3af31140dca548b63fd86ac1759bae3 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 15 Sep 2017 23:07:08 +0200 Subject: patch is no longer needed with changed CONFIG_PATH --- ports/benchmark/fix-cmakelists.patch | 13 ------------- ports/benchmark/portfile.cmake | 7 +------ 2 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 ports/benchmark/fix-cmakelists.patch diff --git a/ports/benchmark/fix-cmakelists.patch b/ports/benchmark/fix-cmakelists.patch deleted file mode 100644 index 51eadde46..000000000 --- a/ports/benchmark/fix-cmakelists.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 244484b..903dea4 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -37,7 +37,7 @@ endif() - set(include_install_dir "include") - set(lib_install_dir "lib/") - set(bin_install_dir "bin/") --set(config_install_dir "lib/cmake/${PROJECT_NAME}") -+set(config_install_dir "share/${PROJECT_NAME}/cmake/") - - set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") - diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake index 58cdc8e0f..621f3acc2 100644 --- a/ports/benchmark/portfile.cmake +++ b/ports/benchmark/portfile.cmake @@ -17,11 +17,6 @@ vcpkg_from_github( HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch" -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -33,7 +28,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/benchmark) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -- cgit v1.2.3 From cbc3050b44a14bdd252d174072911d1dadcd8eff Mon Sep 17 00:00:00 2001 From: glachancecmaisonneuve Date: Sun, 17 Sep 2017 02:33:41 -0400 Subject: find_acquire_program fix for python2 python2 version bump --- scripts/cmake/vcpkg_find_acquire_program.cmake | 30 ++++++++------------------ 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index e718fc7da..47fbc7801 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -66,31 +66,19 @@ function(vcpkg_find_acquire_program VAR) set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720) elseif(VAR MATCHES "PYTHON3") set(PROGNAME python) - set(PATHS ${DOWNLOADS}/tools/python) + set(SUBDIR "python3") + set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR}) set(URL "https://www.python.org/ftp/python/3.5.4/python-3.5.4-embed-win32.zip") set(ARCHIVE "python-3.5.4-embed-win32.zip") set(HASH b5240fdc95088c2d7f65d2dd598650f8dd106b49589d94156bd4a078b108c6cabbe7a38ef73e2b2cf00e8312a93d2e587eac2c54ce85540d3c7a26cc60013156) elseif(VAR MATCHES "PYTHON2") - find_program(PYTHON2 NAMES python2 python PATHS C:/python27 c:/Python27amd64 ENV PYTHON) - if(NOT PYTHON2 MATCHES "NOTFOUND") - execute_process( - COMMAND ${PYTHON2} --version - OUTPUT_VARIABLE PYTHON_VER_CHECK_OUT - ERROR_VARIABLE PYTHON_VER_CHECK_ERR - ) - set(PYTHON_VER_CHECK "${PYTHON_VER_CHECK_OUT}${PYTHON_VER_CHECK_ERR}") - debug_message("PYTHON_VER_CHECK=${PYTHON_VER_CHECK}") - if(NOT PYTHON_VER_CHECK MATCHES "Python 2.7") - set(PYTHON2 PYTHON2-NOTFOUND) - find_program(PYTHON2 NAMES python2 python PATHS C:/python27 ENV PYTHON NO_SYSTEM_ENVIRONMENT_PATH) - endif() - endif() - if(PYTHON2 MATCHES "NOTFOUND") - message(FATAL_ERROR "Python 2.7 was not found in the path or by searching inside C:\\Python27.\n" - "There is no portable redistributable for Python 2.7, so you will need to install the MSI located at:\n" - " https://www.python.org/ftp/python/2.7.13/python-2.7.13.msi\n" - ) - endif() + set(PROGNAME python) + set(SUBDIR "python2") + set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR}) + file(TO_NATIVE_PATH "${PATHS}" DESTINATION_NATIVE_PATH) + set(URL "https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi") + set(ARCHIVE "python2.msi") + set(HASH 8c3ad6e527742d99ba96dcfd1098861b14e7207b80d51a54e9b410ab2f36e44e05561ea1527d8e92b3e10808311536260bd9e82db0da3b513fb1be18e108510e) elseif(VAR MATCHES "RUBY") set(PROGNAME "ruby") set(PATHS ${DOWNLOADS}/tools/ruby/rubyinstaller-2.4.1-1-x86/bin) -- cgit v1.2.3 From a197e4d3534c1a05d0661912a8b98eb2039d99d1 Mon Sep 17 00:00:00 2001 From: "Stephen E. Baker" Date: Fri, 15 Sep 2017 21:53:23 -0400 Subject: Bump luafilesystem to 1.7.0.2 --- ports/luafilesystem/CONTROL | 2 +- ports/luafilesystem/lfs-def-fix.patch | 23 +++++++++++------------ ports/luafilesystem/portfile.cmake | 6 +++--- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/ports/luafilesystem/CONTROL b/ports/luafilesystem/CONTROL index 149a899a6..4ff18cda4 100644 --- a/ports/luafilesystem/CONTROL +++ b/ports/luafilesystem/CONTROL @@ -1,4 +1,4 @@ Source: luafilesystem -Version: 1.6.3-1 +Version: 1.7.0.2 Description: LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution. Build-Depends: lua diff --git a/ports/luafilesystem/lfs-def-fix.patch b/ports/luafilesystem/lfs-def-fix.patch index 62cea763e..34923427f 100644 --- a/ports/luafilesystem/lfs-def-fix.patch +++ b/ports/luafilesystem/lfs-def-fix.patch @@ -1,21 +1,20 @@ -From 644c9c32ca9053ced3d37ff76fc1fbc0389ddf53 Mon Sep 17 00:00:00 2001 -From: Alex -Date: Mon, 16 Feb 2015 08:15:41 +0300 -Subject: [PATCH] DEF file fixes (DESCRIPTION is deprecated; VERSION must - contain one or two numers) +From 92527d96199912f79b8046ddb32ff83a16771cb4 Mon Sep 17 00:00:00 2001 +From: "Stephen E. Baker" +Date: Fri, 15 Sep 2017 21:18:58 -0400 +Subject: [PATCH] Update version in lfs.def +Version number of current release is 1.7 --- - src/lfs.def | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) + src/lfs.def | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lfs.def b/src/lfs.def -index 7aa7a35..8a36d41 100644 +index 8a36d41..4055ff0 100644 --- a/src/lfs.def +++ b/src/lfs.def -@@ -1,5 +1,4 @@ +@@ -1,4 +1,4 @@ LIBRARY lfs.dll --DESCRIPTION "LuaFileSystem" --VERSION 1.5.0 -+VERSION 1.6 +-VERSION 1.6 ++VERSION 1.7 EXPORTS luaopen_lfs diff --git a/ports/luafilesystem/portfile.cmake b/ports/luafilesystem/portfile.cmake index e55d56881..74c3d116a 100644 --- a/ports/luafilesystem/portfile.cmake +++ b/ports/luafilesystem/portfile.cmake @@ -1,8 +1,8 @@ include(vcpkg_common_functions) -set(LUAFILESYSTEM_VERSION 1.6.3) -set(LUAFILESYSTEM_REVISION v_1_6_3) -set(LUAFILESYSTEM_HASH abfa1b3ac22ed80189560a1a025a7ea21a954defe14e5b539e08f266d180962a691262efc7eb2ddacc2d4aae14d6e356b1a276165b5bed46a13e4d6c61ab99f1) +set(LUAFILESYSTEM_VERSION 1.7.0.2) +set(LUAFILESYSTEM_REVISION v1_7_0_2) +set(LUAFILESYSTEM_HASH a1d4d077776e57cd878dbcd21656da141ea3686c587b5420a2b039aeaf086b7e7d05d531ee1cc2bbd7d06660d1315b09593e52143f6711f033ce8eecdc550511) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/luafilesystem-${LUAFILESYSTEM_VERSION}) vcpkg_from_github( -- cgit v1.2.3 From 0b10f30a99ec2c423125a8137b7c6caef93013ef Mon Sep 17 00:00:00 2001 From: Nic Holthaus Date: Mon, 18 Sep 2017 19:12:32 -0400 Subject: Add port for nholthaus/units --- ports/units/CONTROL | 3 +++ ports/units/portfile.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 ports/units/CONTROL create mode 100644 ports/units/portfile.cmake diff --git a/ports/units/CONTROL b/ports/units/CONTROL new file mode 100644 index 000000000..b66a3b828 --- /dev/null +++ b/ports/units/CONTROL @@ -0,0 +1,3 @@ +Source: units +Version: 2.3.0 +Description: A compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies. diff --git a/ports/units/portfile.cmake b/ports/units/portfile.cmake new file mode 100644 index 000000000..0c71a5287 --- /dev/null +++ b/ports/units/portfile.cmake @@ -0,0 +1,40 @@ +# 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 nholthaus/units + REF v2.3.0 + SHA512 1b9d7806e82d0f437574562e647077b6d22c0add81a19b5ec71f53ab608642db2d785a70d03d13cb2eeea2a8bc2d20f112b6bdf49acf0afce44e8e07bb6b7c39 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DBUILD_TESTS=OFF + # 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}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/units RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/units) +file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/unitsConfig.cmake ${CURRENT_PACKAGES_DIR}/share/units/unitsConfig.cmake) + +# remove uneeded directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) \ No newline at end of file -- cgit v1.2.3 From 2e6bb72599d3789ac7af530cde0d56afab0a76ff Mon Sep 17 00:00:00 2001 From: Nic Holthaus Date: Mon, 18 Sep 2017 19:15:16 -0400 Subject: git push clean-up of portfile --- ports/units/portfile.cmake | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/ports/units/portfile.cmake b/ports/units/portfile.cmake index 0c71a5287..910626f6d 100644 --- a/ports/units/portfile.cmake +++ b/ports/units/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_from_github( @@ -23,14 +11,11 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS -DBUILD_TESTS=OFF - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() -# Handle copyright +# Handle copyright/readme/package files file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/units RENAME copyright) file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/units) file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/unitsConfig.cmake ${CURRENT_PACKAGES_DIR}/share/units/unitsConfig.cmake) -- cgit v1.2.3 From e571a469f3d62bc59ae39633e1f6c1bed51c35c2 Mon Sep 17 00:00:00 2001 From: Steve Jemens Date: Tue, 19 Sep 2017 14:23:50 +0300 Subject: xlnt: update to 1.1.0 --- ports/xlnt/CONTROL | 3 +-- ports/xlnt/portfile.cmake | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ports/xlnt/CONTROL b/ports/xlnt/CONTROL index 3a7d28006..907b66b16 100644 --- a/ports/xlnt/CONTROL +++ b/ports/xlnt/CONTROL @@ -1,4 +1,3 @@ Source: xlnt -Version: 0.9.4-1 +Version: 1.1.0-1 Description: Cross-platform user-friendly xlsx library for C++14 -Build-Depends: zlib, cryptopp, expat diff --git a/ports/xlnt/portfile.cmake b/ports/xlnt/portfile.cmake index b4a0f5e62..e514cf8eb 100644 --- a/ports/xlnt/portfile.cmake +++ b/ports/xlnt/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(XLNT_REV 9dccde4bff34cfbafbdc3811fdd05326ac6bd0aa) -set(XLNT_HASH 85bb651e42e33a829672ee76d14504fcbab683bb6b468d728837f1163b5ca1395c9aa80b3bed91a243e065599cdbf23cad769375f77792f71c173b02061771af) -set(XLNT_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xlnt-${XLNT_REV}) +set(XLNT_VERSION 1.1.0) +set(XLNT_HASH f0c59a2b241c6b219fbd8bb39705847e2b31332e413bc4aff7e0a8d4d4b9ef6750c03ecc49a196f647fdf60c3bec9f06c800bdb53b56648d2ba9fab359623f95) +set(XLNT_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xlnt-${XLNT_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS https://github.com/tfussell/xlnt/archive/${XLNT_REV}.zip - FILENAME xlnt-${XLNT_REV}.zip + URLS https://github.com/tfussell/xlnt/archive/v${XLNT_VERSION}.zip + FILENAME xlnt-${XLNT_VERSION}.zip SHA512 ${XLNT_HASH} ) -- cgit v1.2.3 From 956ced64d3a5aec14f7b43a6891c8dfc327265d7 Mon Sep 17 00:00:00 2001 From: ShinNoNoir Date: Tue, 19 Sep 2017 17:24:06 +0200 Subject: [qt5] Update fixcmake.py for new manual-link directory --- ports/qt5/fixcmake.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ports/qt5/fixcmake.py b/ports/qt5/fixcmake.py index 93a535fa2..b081af58e 100644 --- a/ports/qt5/fixcmake.py +++ b/ports/qt5/fixcmake.py @@ -18,6 +18,10 @@ for f in files: builder += "\n " + line.replace("/bin/", "/debug/bin/") builder += " endif()\n" elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + # Qt5AxServer(d).lib has been moved to manual-link: + if '_qt5AxServer_install_prefix' in line: + line = line.replace('/lib/', '/lib/manual-link/') + builder += " if (${Configuration} STREQUAL \"RELEASE\")" builder += "\n " + line builder += " else()" @@ -30,7 +34,8 @@ for f in files: builder += "\n " + line.replace("/lib/", "/debug/lib/") builder += " endif()\n" elif "_install_prefix}/lib/qtmaind.lib" in line: - builder += line.replace("/lib/", "/debug/lib/") + # qtmaind.lib has been moved to manual-link: + builder += line.replace("/lib/", "/debug/lib/manual-link/") elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: builder += " if (${Configuration} STREQUAL \"RELEASE\")" builder += "\n " + line @@ -38,8 +43,9 @@ for f in files: builder += "\n " + line.replace("/plugins/", "/debug/plugins/") builder += " endif()\n" elif "_install_prefix}/lib/qtmain.lib" in line: - builder += line - builder += " set(imported_location_debug \"${_qt5Core_install_prefix}/debug/lib/qtmaind.lib\")\n" + # qtmain(d).lib has been moved to manual-link: + builder += line.replace("/lib/", "/lib/manual-link/") + builder += " set(imported_location_debug \"${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib\")\n" builder += "\n" builder += " set_target_properties(Qt5::WinMain PROPERTIES\n" builder += " IMPORTED_LOCATION_DEBUG ${imported_location_debug}\n" -- cgit v1.2.3 From 6d98ee5d9c76c7b62aed0b2825747fc516604f39 Mon Sep 17 00:00:00 2001 From: ShinNoNoir Date: Tue, 19 Sep 2017 17:25:06 +0200 Subject: [qt5] Bump version to reflect fixcmake.py fix --- ports/qt5/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index 704bc9ca5..ce46d249b 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 -Version: 5.8-5 +Version: 5.8-6 Description: Qt5 application framework main components. Webengine, examples and tests not included. Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre, harfbuzz, sqlite3, libpq, double-conversion -- cgit v1.2.3 From b08f2a02e73721cc63acecccc2c25f2c0f488d45 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 19 Sep 2017 12:45:37 -0700 Subject: [vcpkg edit] Fix VSCode path --- toolsrc/src/commands_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp index 7f400f48b..823c87534 100644 --- a/toolsrc/src/commands_edit.cpp +++ b/toolsrc/src/commands_edit.cpp @@ -34,7 +34,7 @@ namespace vcpkg::Commands::Edit static const std::string OPTION_BUILDTREES = "--buildtrees"; static const fs::path VS_CODE_INSIDERS = fs::path{"Microsoft VS Code Insiders"} / "Code - Insiders.exe"; - static const fs::path VS_CODE = fs::path{"Microsoft VS Code Insiders"} / "Code - Insiders.exe"; + static const fs::path VS_CODE = fs::path{"Microsoft VS Code"} / "Code.exe"; auto& fs = paths.get_filesystem(); -- cgit v1.2.3 From 39a96fc2f4a7d471ab3fa16c480fc0d9965605b1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 15 Sep 2017 16:47:07 -0700 Subject: Bump required version of CMake to 3.9.2 --- scripts/fetchDependency.ps1 | 12 ++++++------ toolsrc/src/VcpkgPaths.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index c9aeb0f77..4aca0c811 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -105,12 +105,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.9.1" - $downloadVersion = "3.9.1" - $url = "https://cmake.org/files/v3.9/cmake-3.9.1-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.9.1-win32-x86.zip" - $expectedDownloadedFileHash = "e0d9501bd34e3100e925dcb2e07f5f0ce8980bdbe5fce0ae950b21368d54c1a1" - $executableFromDownload = "$downloadsDir\cmake-3.9.1-win32-x86\bin\cmake.exe" + $requiredVersion = "3.9.2" + $downloadVersion = "3.9.2" + $url = "https://cmake.org/files/v3.9/cmake-3.9.2-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.9.2-win32-x86.zip" + $expectedDownloadedFileHash = "9fe68d50f065666cb2861f53751390f15c6363c440e86a07677689378bb8329f" + $executableFromDownload = "$downloadsDir\cmake-3.9.2-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP $extractionFolder = $downloadsDir } diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 906a5e67f..29edbb260 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -97,10 +97,10 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {3, 9, 1}; + static constexpr std::array EXPECTED_VERSION = {3, 9, 2}; static const std::wstring VERSION_CHECK_ARGUMENTS = L"--version"; - const fs::path downloaded_copy = downloads_folder / "cmake-3.9.1-win32-x86" / "bin" / "cmake.exe"; + const fs::path downloaded_copy = downloads_folder / "cmake-3.9.2-win32-x86" / "bin" / "cmake.exe"; const std::vector from_path = Files::find_from_PATH(L"cmake"); std::vector candidate_paths; -- cgit v1.2.3 From 437eb29cda5aaca31c03adb10a51314a35b94105 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sun, 9 Jul 2017 00:22:48 +0900 Subject: Add Kinect SDK v2.x port Add Kinect for Windows SDK v2.x port. --- ports/kinectsdk2/CONTROL | 3 +++ ports/kinectsdk2/portfile.cmake | 47 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 ports/kinectsdk2/CONTROL create mode 100644 ports/kinectsdk2/portfile.cmake diff --git a/ports/kinectsdk2/CONTROL b/ports/kinectsdk2/CONTROL new file mode 100644 index 000000000..85ccd7f0b --- /dev/null +++ b/ports/kinectsdk2/CONTROL @@ -0,0 +1,3 @@ +Source: kinectsdk2 +Version: 2.0 +Description: Kinect for Windows SDK for Kinect v2 sensor. diff --git a/ports/kinectsdk2/portfile.cmake b/ports/kinectsdk2/portfile.cmake new file mode 100644 index 000000000..5795825dd --- /dev/null +++ b/ports/kinectsdk2/portfile.cmake @@ -0,0 +1,47 @@ +# 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) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +get_filename_component(KINECTSDK20_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect\\v2.0;SDKInstallPath]" ABSOLUTE CACHE) +if(NOT EXISTS "${KINECTSDK20_DIR}") + message(FATAL_ERROR "Error: Could not find Kinect for Windows SDK v2.x. It can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=44561.") +endif() + +file( + INSTALL + "${KINECTSDK20_DIR}/inc/Kinect.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include +) + +file( + INSTALL + "${KINECTSDK20_DIR}/Lib/${VCPKG_TARGET_ARCHITECTURE}/Kinect20.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib +) + +file( + INSTALL + "${KINECTSDK20_DIR}/Lib/${VCPKG_TARGET_ARCHITECTURE}/Kinect20.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/lib +) + +# Handle copyright +file(COPY "${KINECTSDK20_DIR}/SDKEula.rtf" DESTINATION ${CURRENT_PACKAGES_DIR}/share/kinectsdk2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/kinectsdk2/SDKEula.rtf ${CURRENT_PACKAGES_DIR}/share/kinectsdk2/copyright) -- cgit v1.2.3 From 4353d848cce3a9c0e362b839310df87547c5e957 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 20 Sep 2017 20:00:57 -0700 Subject: [paho-mqtt] Remove duplicate libraries without SSL support. --- ports/paho-mqtt/CONTROL | 2 +- ports/paho-mqtt/portfile.cmake | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ports/paho-mqtt/CONTROL b/ports/paho-mqtt/CONTROL index bd363be27..cefd6bb87 100644 --- a/ports/paho-mqtt/CONTROL +++ b/ports/paho-mqtt/CONTROL @@ -1,4 +1,4 @@ Source: paho-mqtt -Version: 1.2.0-1 +Version: 1.2.0-2 Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things Build-Depends: openssl diff --git a/ports/paho-mqtt/portfile.cmake b/ports/paho-mqtt/portfile.cmake index 6e50f1238..27f9c8243 100644 --- a/ports/paho-mqtt/portfile.cmake +++ b/ports/paho-mqtt/portfile.cmake @@ -21,6 +21,7 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_STATIC=${PAHO_BUILD_STATIC} ) @@ -28,22 +29,22 @@ vcpkg_configure_cmake( vcpkg_build_cmake() file(GLOB DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/*.dll" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" ) file(GLOB LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/src/*.lib" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" ) file(GLOB DEBUG_DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/*.dll" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" ) file(GLOB DEBUG_LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/*.lib" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" ) @@ -58,8 +59,6 @@ endif() file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) -vcpkg_copy_pdbs() - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) foreach(libname paho-mqtt3as-static paho-mqtt3cs-static paho-mqtt3a-static paho-mqtt3c-static) @@ -70,5 +69,15 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endforeach() endif() +foreach(libname paho-mqtt3a paho-mqtt3c) + foreach(root "${CURRENT_PACKAGES_DIR}" "${CURRENT_PACKAGES_DIR}/debug") + file(REMOVE + ${root}/lib/${libname}.lib + ${root}/bin/${libname}.dll + ) + endforeach() +endforeach() + +vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/paho-mqtt RENAME copyright) -- cgit v1.2.3 From a3ab5251232ff571a6ec503ad936166eb2cb3953 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 21 Sep 2017 01:20:51 -0700 Subject: [benchmark] Reset to latest stable, pulling back important patch. --- ports/benchmark/CONTROL | 2 +- ports/benchmark/portfile.cmake | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ports/benchmark/CONTROL b/ports/benchmark/CONTROL index 7fcb5b7cb..03052ce7f 100644 --- a/ports/benchmark/CONTROL +++ b/ports/benchmark/CONTROL @@ -1,3 +1,3 @@ Source: benchmark -Version: 1.2.0-1 +Version: 1.2.0 Description: A library to support the benchmarking of functions, similar to unit-tests. diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake index 621f3acc2..c3159ef8b 100644 --- a/ports/benchmark/portfile.cmake +++ b/ports/benchmark/portfile.cmake @@ -12,16 +12,28 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/benchmark - REF 6d8339dd97afea4633e54ed4b42307aff4386040 - SHA512 d9b67ad9876c99102668364e89041bda24090aca39335155624183412d8e8c9e7a9f0585af859c0380af39a3ce40f6db1601bb3397a584f20edca760b31188a2 + REF v1.2.0 + SHA512 859063669fd84e847f04624013f0b2b734d75d90cada247682eaf345b86c88a9bc2320250e128f2361e37f402b3fb56a18c493ec6038973744a005a452d693ba HEAD_REF master ) +vcpkg_download_distfile(PATCH + URLS "https://github.com/efcs/benchmark/commit/536b0b82b8ec12fc7e17e6d243633618f294a739.diff" + FILENAME google-benchmark-1.2.0-536b0b82.patch + SHA512 ed42cc0014741c8039c0fca5b4317b2ed09d06a25c91f49a48be6dce921e39469b002c088794c1ea73dc759166e20cb685b47f809ba28dddd95b5f3263be03cd +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${PATCH}" +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DBENCHMARK_ENABLE_TESTING=OFF + -DBENCHMARK_ENABLE_TESTING=OFF ) vcpkg_install_cmake() -- cgit v1.2.3 From 04f6c516ccfa144b316b976f242d243df4bf7c6e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 21 Sep 2017 01:42:56 -0700 Subject: [cppwinrt] Remove portfile.cmake --- portfile.cmake | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 portfile.cmake diff --git a/portfile.cmake b/portfile.cmake deleted file mode 100644 index b19d946b6..000000000 --- a/portfile.cmake +++ /dev/null @@ -1,18 +0,0 @@ -include(vcpkg_common_functions) -find_program(GIT git) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-spring_2017_creators_update_for_vs_15.3) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/cppwinrt/archive/spring_2017_creators_update_for_vs_15.3.tar.gz" - FILENAME "cppwinrt-spring_2017_creators_update_for_vs_15.3.tar.gz" - SHA512 6b8646270f69e3ebec13ed5fb46ed92236659d05 -) -vcpkg_extract_source_archive(${ARCHIVE}) - -# Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright) - -# Copy the cppwinrt header files -file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.14393.0/winrt/*) -file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt) -- cgit v1.2.3 From d40f2a4a5d51e28b322c5c63771af3e8de302c45 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 21 Sep 2017 17:30:11 +0200 Subject: protobuf: update to 3.4.1 --- ports/protobuf/001-add-compiler-flag.patch | 8 +++----- ports/protobuf/CONTROL | 2 +- ports/protobuf/portfile.cmake | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ports/protobuf/001-add-compiler-flag.patch b/ports/protobuf/001-add-compiler-flag.patch index dd1285cea..ad545cad3 100644 --- a/ports/protobuf/001-add-compiler-flag.patch +++ b/ports/protobuf/001-add-compiler-flag.patch @@ -17,22 +17,20 @@ index 7618ba2..d282a60 100644 include(tests.cmake) diff --git a/cmake/install.cmake b/cmake/install.cmake -index 441bf55..4158820 100644 +index 441bf55..20b3aa0 100644 --- a/cmake/install.cmake +++ b/cmake/install.cmake @@ -1,14 +1,17 @@ include(GNUInstallDirs) --configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf.pc.cmake +set(LIBRARIES_TO_SET_DEST libprotobuf-lite libprotobuf) +if(protobuf_BUILD_COMPILER) + list(APPEND LIBRARIES_TO_SET_DEST libprotoc) +endif() + -+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libprotobuf.cmake + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc @ONLY) --configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf-lite.pc.cmake -+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libprotobuf-lite.cmake + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf-lite.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc @ONLY) foreach(_library diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 9fe4bbb32..b9d8b5b9e 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,4 +1,4 @@ Source: protobuf -Version: 3.4.0-2 +Version: 3.4.1-1 Build-Depends: zlib Description: Protocol Buffers - Google's data interchange format diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 804780ab4..5c3eaf5e7 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -1,15 +1,15 @@ include(vcpkg_common_functions) -set(PROTOBUF_VERSION 3.4.0) +set(PROTOBUF_VERSION 3.4.1) vcpkg_download_distfile(ARCHIVE_FILE URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-cpp-${PROTOBUF_VERSION}.tar.gz" FILENAME "protobuf-cpp-${PROTOBUF_VERSION}.tar.gz" - SHA512 ce9bd9bc818c4a8e8b08c83e8a4eba6fca008a64a5ad9d322b19683b1de2b5fa622ed99093323f3c9d0820ef23430f7ee07f6930f7f877d334e5d36df9b0be0e + SHA512 6189e23c7e381f62e971bd0e35ad9c3ed8effe584755357013887c6a582cb5a9a654c39affa2a073b658854138f31bfb70f89fa1df494e9386f1d64fd73d07d2 ) vcpkg_download_distfile(TOOL_ARCHIVE_FILE URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-win32.zip" - FILENAME "protoc-${PROTOBUF_VERSION}-win32.zip" + FILENAME "protoc-3.4.0-win32.zip" SHA512 b874c3f47b39ac78f5675e05220318683004a365c248bf47ba50d8c66c8ed7763432451bab30524e131e1185a2bdaa6e6071b389eb61ad58b1b95974cf39d41b ) -- cgit v1.2.3 From 5e2e32ac4b6791880fd7045a7abafc383d40e694 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 21 Sep 2017 13:12:50 -0700 Subject: [protobuf] Point to the correct url for protoc --- ports/protobuf/portfile.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 5c3eaf5e7..e3cae639c 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -1,6 +1,7 @@ include(vcpkg_common_functions) set(PROTOBUF_VERSION 3.4.1) +set(PROTOC_VERSION 3.4.0) vcpkg_download_distfile(ARCHIVE_FILE URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-cpp-${PROTOBUF_VERSION}.tar.gz" @@ -8,8 +9,8 @@ vcpkg_download_distfile(ARCHIVE_FILE SHA512 6189e23c7e381f62e971bd0e35ad9c3ed8effe584755357013887c6a582cb5a9a654c39affa2a073b658854138f31bfb70f89fa1df494e9386f1d64fd73d07d2 ) vcpkg_download_distfile(TOOL_ARCHIVE_FILE - URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-win32.zip" - FILENAME "protoc-3.4.0-win32.zip" + URLS "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-win32.zip" + FILENAME "protoc-${PROTOC_VERSION}-win32.zip" SHA512 b874c3f47b39ac78f5675e05220318683004a365c248bf47ba50d8c66c8ed7763432451bab30524e131e1185a2bdaa6e6071b389eb61ad58b1b95974cf39d41b ) -- cgit v1.2.3 From d0c33b4aa60b1698e8cb027d8df5b25c65efb0e1 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Fri, 22 Sep 2017 23:57:54 +0900 Subject: Add install pcap_stdinc.h file Add install pcap_stdinc.h file. --- ports/winpcap/CONTROL | 2 +- ports/winpcap/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/winpcap/CONTROL b/ports/winpcap/CONTROL index 7483c1f24..3a09db558 100644 --- a/ports/winpcap/CONTROL +++ b/ports/winpcap/CONTROL @@ -1,3 +1,3 @@ Source: winpcap -Version: 4.1.3 +Version: 4.1.3-1 Description: WinPcap is the industry-standard tool for link-layer network access in Windows environments. diff --git a/ports/winpcap/portfile.cmake b/ports/winpcap/portfile.cmake index 69effd8fe..05b0a2c83 100644 --- a/ports/winpcap/portfile.cmake +++ b/ports/winpcap/portfile.cmake @@ -105,6 +105,7 @@ file( "${SOURCE_PATH}/WpdPack/Include/pcap.h" "${SOURCE_PATH}/WpdPack/Include/pcap-bpf.h" "${SOURCE_PATH}/WpdPack/Include/pcap-namedb.h" + "${SOURCE_PATH}/WpdPack/Include/pcap-stdinc.h" "${SOURCE_PATH}/WpdPack/Include/remote-ext.h" "${SOURCE_PATH}/WpdPack/Include/Win32-Extensions.h" DESTINATION -- cgit v1.2.3 From 9989177fed607cdc9e20127ff7c22e3266e7c913 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 22 Sep 2017 08:16:06 -0700 Subject: fix opencv hash --- ports/opencv/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 989a43608..35df35fae 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -8,7 +8,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO opencv/opencv REF 3.3.0 - SHA512 b69923c9809d5533764b5db73db4f0be17f72b6d53643ee773824cfe8a98261d7dc5b4033895693bfd1454bc474c7f6152a5d0023a6f495324dd2b4b4a058e0d + SHA512 13dee5c1c5fec1dccdbb05879d299b93ef8ddeb87f561a6c4178e33a4cf5ae919765119068d0387a3efea0e09a625ca993cffac60a772159690fcbee4e8d70fb HEAD_REF master ) -- cgit v1.2.3 From 89f5e0866a7d43a922195fa63c4648da57ff46e7 Mon Sep 17 00:00:00 2001 From: Stephane Lajoie Date: Fri, 22 Sep 2017 12:22:49 -0400 Subject: Updated llvm to 5.0.0. --- ports/llvm/CONTROL | 2 +- ports/llvm/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index 9b7629f42..2f6b1ec93 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,3 +1,3 @@ Source: llvm -Version: 4.0.0-1 +Version: 5.0.0-1 Description: The LLVM Compiler Infrastructure diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 9edf7f2b1..b1f546f4f 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -3,11 +3,11 @@ set(VCPKG_LIBRARY_LINKAGE static) include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-4.0.0.src) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-5.0.0.src) vcpkg_download_distfile(ARCHIVE - URLS "http://releases.llvm.org/4.0.0/llvm-4.0.0.src.tar.xz" - FILENAME "llvm-4.0.0.src.tar.xz" - SHA512 cf681f0626ef6d568d951cdc3e143471a1d7715a0ba11e52aa273cf5d8d421e1357ef2645cc85879eaefcd577e99e74d07b01566825b3d0461171ef2cbfc7704 + URLS "http://releases.llvm.org/5.0.0/llvm-5.0.0.src.tar.xz" + FILENAME "llvm-5.0.0.src.tar.xz" + SHA512 e6d8fdcb5bf27bded814d02f39f69c6171bc3a512d5957c03e5ac2e231f903b7de87634b059bd5c5da670f7c3a8f7a538f6299225799f15f921857f1452f6b3a ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From e1b0f80946e3a06ebdc43b4149cb6757fb5cf6e9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 22 Sep 2017 10:46:14 -0700 Subject: [opencv] Remove ceres dependency --- ports/opencv/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index cb2762227..552a38bac 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.0 +Version: 3.3.0-1 # Optional: Add in vtk to build with VTK and cuda to build with CUDA -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf, ceres, ffmpeg +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf, ffmpeg Description: computer vision library -- cgit v1.2.3 From 3d90214259726d068af52df5dc8327d7d2140a53 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sat, 23 Sep 2017 04:41:44 +0900 Subject: Enable pcap option Enable pcap option. You can retrieve data from PCAP file using pcl::HDLGrabber/pcl::VLPGrabber. --- ports/pcl/CONTROL | 4 ++-- ports/pcl/portfile.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index e9547c8cb..d8c38a363 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,4 +1,4 @@ Source: pcl -Version: 1.8.1-1 -Build-Depends: boost, eigen3, flann, qhull, vtk, openni2, qt5 +Version: 1.8.1-2 +Build-Depends: boost, eigen3, flann, qhull, vtk, openni2, qt5, winpcap Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index 8010d9c70..cd5c5bedc 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -50,7 +50,7 @@ vcpkg_configure_cmake( -DWITH_CUDA=OFF -DWITH_LIBUSB=OFF -DWITH_OPENNI2=ON - -DWITH_PCAP=OFF + -DWITH_PCAP=ON -DWITH_PNG=OFF -DWITH_QHULL=ON -DWITH_QT=ON -- cgit v1.2.3 From 548b7f69197fad294f44b6e3ae5f587116220fae Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 22 Sep 2017 14:20:27 -0700 Subject: Bump required version of CMake to 3.9.3 3.9.3 contains this interesting change: FindBoost: Add support for Boost 1.65.0 and 1.65.1 to CMake 3.9 --- scripts/fetchDependency.ps1 | 12 ++++++------ toolsrc/src/VcpkgPaths.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 4aca0c811..2a23002a4 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -105,12 +105,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.9.2" - $downloadVersion = "3.9.2" - $url = "https://cmake.org/files/v3.9/cmake-3.9.2-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.9.2-win32-x86.zip" - $expectedDownloadedFileHash = "9fe68d50f065666cb2861f53751390f15c6363c440e86a07677689378bb8329f" - $executableFromDownload = "$downloadsDir\cmake-3.9.2-win32-x86\bin\cmake.exe" + $requiredVersion = "3.9.3" + $downloadVersion = "3.9.3" + $url = "https://cmake.org/files/v3.9/cmake-3.9.3-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.9.3-win32-x86.zip" + $expectedDownloadedFileHash = "47870e3d4c9a5aa019e71020cd85cc60b6f2d2569fb239eaec204cd991e512f1" + $executableFromDownload = "$downloadsDir\cmake-3.9.3-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP $extractionFolder = $downloadsDir } diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 29edbb260..02e238b3f 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -97,10 +97,10 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {3, 9, 2}; + static constexpr std::array EXPECTED_VERSION = {3, 9, 3}; static const std::wstring VERSION_CHECK_ARGUMENTS = L"--version"; - const fs::path downloaded_copy = downloads_folder / "cmake-3.9.2-win32-x86" / "bin" / "cmake.exe"; + const fs::path downloaded_copy = downloads_folder / "cmake-3.9.3-win32-x86" / "bin" / "cmake.exe"; const std::vector from_path = Files::find_from_PATH(L"cmake"); std::vector candidate_paths; -- cgit v1.2.3 From e79c36cb8d533f7e4675ea3b970ac0a935e5904c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 22 Sep 2017 16:51:44 -0700 Subject: [opencv] Address changes in opencv's CMake scripts in v3.3.0 --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 64 ++++++++++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 552a38bac..0a4c327cc 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.0-1 +Version: 3.3.0-2 # Optional: Add in vtk to build with VTK and cuda to build with CUDA Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf, ffmpeg Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index d5d1271ff..3a2771401 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -80,12 +80,12 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/opencv/LICENSE ${CURRENT_PACKAGES_DIR} file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) -if(${VCPKG_PLATFORM_TOOLSET} STREQUAL "v150") +if(VCPKG_PLATFORM_TOOLSET STREQUAL "v141") set(OpenCV_RUNTIME vc15) else() set(OpenCV_RUNTIME vc14) endif() -if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL "x64") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(OpenCV_ARCH x64) else() set(OpenCV_ARCH x86) @@ -98,35 +98,45 @@ file(COPY ${DEBUG_BIN_AND_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/${OpenCV_ARCH}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/${OpenCV_ARCH}) -file(GLOB SHARE_LIB ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/*) -file(COPY ${SHARE_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/share/opencv) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}) +file(GLOB STATICLIB ${CURRENT_PACKAGES_DIR}/staticlib/*) +if(STATICLIB) + file(COPY ${STATICLIB} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/staticlib) +endif() +file(GLOB STATICLIB ${CURRENT_PACKAGES_DIR}/debug/staticlib/*) +if(STATICLIB) + file(COPY ${STATICLIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/staticlib) +endif() file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVConfig.cmake OPENCV_CONFIG) -string(REPLACE "\${OpenCV_ARCH}/\${OpenCV_RUNTIME}/" - "" OPENCV_CONFIG "${OPENCV_CONFIG}") +string(REPLACE " vc15" + " ${OpenCV_RUNTIME}" OPENCV_CONFIG "${OPENCV_CONFIG}") +string(REPLACE " vc14" + " ${OpenCV_RUNTIME}" OPENCV_CONFIG "${OPENCV_CONFIG}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVConfig.cmake "${OPENCV_CONFIG}") -file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVConfig.cmake OPENCV_CONFIG_LIB) -string(REPLACE "get_filename_component(OpenCV_INSTALL_PATH \"\${OpenCV_CONFIG_PATH}/../../../../../" - "get_filename_component(OpenCV_INSTALL_PATH \"\${OpenCV_CONFIG_PATH}/../../../" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVConfig.cmake "${OPENCV_CONFIG_LIB}") - -file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVModules.cmake OPENCV_MODULES) -string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\n" - "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\n" OPENCV_MODULES "${OPENCV_MODULES}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVModules.cmake "${OPENCV_MODULES}") - -file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVModules-release.cmake OPENCV_MODULES_RELEASE) -string(REPLACE "${OpenCV_ARCH}/${OpenCV_RUNTIME}/" - "" OPENCV_MODULES_RELEASE "${OPENCV_MODULES_RELEASE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVModules-release.cmake "${OPENCV_MODULES_RELEASE}") - -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-debug.cmake OPENCV_MODULES_DEBUG) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" OPENCV_MODULES_DEBUG "${OPENCV_MODULES_DEBUG}") -string(REPLACE "${OpenCV_ARCH}/${OpenCV_RUNTIME}/" - "" OPENCV_MODULES_DEBUG "${OPENCV_MODULES_DEBUG}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/lib/OpenCVModules-debug.cmake "${OPENCV_MODULES_DEBUG}") +file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-release.cmake OPENCV_CONFIG_LIB) +string(REPLACE "/staticlib/" + "/lib/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") +string(REPLACE "/${OpenCV_ARCH}/${OpenCV_RUNTIME}/" + "/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") +string(REPLACE "${CURRENT_INSTALLED_DIR}" + "\${_IMPORT_PREFIX}" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-release.cmake "${OPENCV_CONFIG_LIB}") + +file(READ ${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-debug.cmake OPENCV_CONFIG_LIB) +string(REPLACE "/staticlib/" + "/lib/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") +string(REPLACE "/${OpenCV_ARCH}/${OpenCV_RUNTIME}/" + "/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") +string(REPLACE "PREFIX}/lib" + "PREFIX}/debug/lib" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") +string(REPLACE "PREFIX}/bin" + "PREFIX}/debug/bin" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") +string(REPLACE "${CURRENT_INSTALLED_DIR}" + "\${_IMPORT_PREFIX}" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-debug.cmake "${OPENCV_CONFIG_LIB}") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From b9f2d7b618a95af12131513214629f82449468c8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 22 Sep 2017 19:42:01 -0700 Subject: [opencv] Remove protobuf dependency for UWP --- ports/opencv/002-fix-uwp.patch | 13 ------------- ports/opencv/CONTROL | 4 ++-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/ports/opencv/002-fix-uwp.patch b/ports/opencv/002-fix-uwp.patch index d684141f5..22d006862 100644 --- a/ports/opencv/002-fix-uwp.patch +++ b/ports/opencv/002-fix-uwp.patch @@ -24,16 +24,3 @@ index c8242dd..97edd14 100644 # removing APPCONTAINER from modules to run from console # in case of usual starting of WinRT test apps output is missing # so starting of console version w/o APPCONTAINER is required to get test results -diff --git a/modules/highgui/src/window.cpp b/modules/highgui/src/window.cpp -index 9306f8e..69a814e 100644 ---- a/modules/highgui/src/window.cpp -+++ b/modules/highgui/src/window.cpp -@@ -209,7 +209,7 @@ int cv::waitKeyEx(int delay) - int cv::waitKey(int delay) - { - int code = waitKeyEx(delay); --#ifndef HAVE_WINRT -+#ifndef WINRT - static int use_legacy = -1; - if (use_legacy < 0) - { diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 0a4c327cc..8130ef3b4 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.0-2 +Version: 3.3.0-3 # Optional: Add in vtk to build with VTK and cuda to build with CUDA -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf, ffmpeg +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows), ffmpeg Description: computer vision library -- cgit v1.2.3 From b2ab8b48837a8cd9f266a8c8e7b2cfb9d9f414fe Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 22 Sep 2017 21:39:20 -0700 Subject: [opencv] Enable static CRT --- ports/opencv/portfile.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 3a2771401..07ab1e130 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -33,9 +33,12 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/open_contrib-remove-waldboost.patch" ) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS + -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT} -DBUILD_ZLIB=OFF -DBUILD_TIFF=OFF -DBUILD_JPEG=OFF -- cgit v1.2.3 From 79fc7f4de584ff61445693a325f48e15b01e1a97 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 22 Sep 2017 22:09:39 -0700 Subject: [opencv] Centralize download cache -- TODO: prevent opencv from performing downloads. Fix static builds. --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 8130ef3b4..c2814c9c2 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.0-3 +Version: 3.3.0-4 # Optional: Add in vtk to build with VTK and cuda to build with CUDA Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows), ffmpeg Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 07ab1e130..d21956108 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -1,7 +1,3 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() include(vcpkg_common_functions) vcpkg_from_github( @@ -38,6 +34,7 @@ string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS + "-DOPENCV_DOWNLOAD_PATH=${DOWNLOADS}/opencv-cache" -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT} -DBUILD_ZLIB=OFF -DBUILD_TIFF=OFF @@ -103,11 +100,13 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/${OpenCV_ARCH}) file(GLOB STATICLIB ${CURRENT_PACKAGES_DIR}/staticlib/*) if(STATICLIB) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib) file(COPY ${STATICLIB} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/staticlib) endif() file(GLOB STATICLIB ${CURRENT_PACKAGES_DIR}/debug/staticlib/*) if(STATICLIB) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib) file(COPY ${STATICLIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/staticlib) endif() @@ -119,6 +118,9 @@ string(REPLACE " vc14" " ${OpenCV_RUNTIME}" OPENCV_CONFIG "${OPENCV_CONFIG}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVConfig.cmake "${OPENCV_CONFIG}") +if(EXISTS "${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib") + file(RENAME ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib) +endif() file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-release.cmake OPENCV_CONFIG_LIB) string(REPLACE "/staticlib/" "/lib/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") @@ -128,6 +130,9 @@ string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-release.cmake "${OPENCV_CONFIG_LIB}") +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib ${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib) +endif() file(READ ${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-debug.cmake OPENCV_CONFIG_LIB) string(REPLACE "/staticlib/" "/lib/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") @@ -145,3 +150,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() + +set(VCPKG_LIBRARY_LINKAGE "dynamic") \ No newline at end of file -- cgit v1.2.3 From 67e876c76555c466e4faf49d6cd80a88b835f972 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 23 Sep 2017 00:00:55 -0700 Subject: [zlib] Add PREFER_NINJA option --- ports/zlib/CONTROL | 2 +- ports/zlib/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/zlib/CONTROL b/ports/zlib/CONTROL index 68c7f1a13..30fe58949 100644 --- a/ports/zlib/CONTROL +++ b/ports/zlib/CONTROL @@ -1,3 +1,3 @@ Source: zlib -Version: 1.2.11-1 +Version: 1.2.11-2 Description: A compression library diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index 0d53d9e89..f69c51bea 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_extract_source_archive(${ARCHIVE_FILE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DSKIP_INSTALL_FILES=ON OPTIONS_DEBUG -- cgit v1.2.3 From b7ebfdd20f5435632155b7df4e8f2a8a343f08ea Mon Sep 17 00:00:00 2001 From: alex85k Date: Sat, 23 Sep 2017 12:08:38 +0500 Subject: [shapelib] initial port --- ports/shapelib/CONTROL | 3 +++ ports/shapelib/portfile.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 ports/shapelib/CONTROL create mode 100644 ports/shapelib/portfile.cmake diff --git a/ports/shapelib/CONTROL b/ports/shapelib/CONTROL new file mode 100644 index 000000000..7d37eb8aa --- /dev/null +++ b/ports/shapelib/CONTROL @@ -0,0 +1,3 @@ +Source: shapelib +Version: 1.4.1 +Description: Shapefile C Library is simple C API for reading and writing ESRI Shapefiles diff --git a/ports/shapelib/portfile.cmake b/ports/shapelib/portfile.cmake new file mode 100644 index 000000000..0f2787689 --- /dev/null +++ b/ports/shapelib/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +set(SHAPELIB_VERSION 1.4.1) +set(SHAPELIB_HASH e3e02dde8006773fed25d630896e79fd79d2008a029cc86b157fe0d92c143a9fab930fdb93d9700d4e1397c3b23ae4b86e91db1dbaca1c5388d4e3aea0309341) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/shapelib-${SHAPELIB_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/shapelib/shapelib-${SHAPELIB_VERSION}.zip" + FILENAME "shapelib-${SHAPELIB_VERSION}.zip" + SHA512 ${SHAPELIB_HASH} +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_TEST=OFF) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") +file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/shapelib) +file(REMOVE ${EXES}) + +file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +file(REMOVE ${DEBUG_EXES}) + +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}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/shapelib) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/shapelib/COPYING ${CURRENT_PACKAGES_DIR}/share/shapelib/copyright) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/shapelib) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From fbd6295178604d84b743967f2bc400ce57e19457 Mon Sep 17 00:00:00 2001 From: "jonathan.r.paton@googlemail.com" Date: Sat, 23 Sep 2017 17:19:29 +0100 Subject: Updated SFML to use github --- ports/sfml/CONTROL | 2 +- ports/sfml/portfile.cmake | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ports/sfml/CONTROL b/ports/sfml/CONTROL index 748e811f0..778638482 100644 --- a/ports/sfml/CONTROL +++ b/ports/sfml/CONTROL @@ -1,4 +1,4 @@ Source: sfml -Version: 2.4.2-1 +Version: 2.4.2-2 Description: Simple and fast multimedia library Build-Depends: freetype, libflac, libjpeg-turbo, libogg, libvorbis, openal-soft, stb diff --git a/ports/sfml/portfile.cmake b/ports/sfml/portfile.cmake index 69f114ca5..ea4cfd138 100644 --- a/ports/sfml/portfile.cmake +++ b/ports/sfml/portfile.cmake @@ -1,12 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SFML-2.4.2) -vcpkg_download_distfile(ARCHIVE - URLS "http://www.sfml-dev.org/files/SFML-2.4.2-sources.zip" - FILENAME "SFML-2.4.2-sources.zip" - SHA512 14f2b9f244bbff681d1992581f20012f3073456e4baed0fb2bf2cf82538e9c5ddd8ce01b0cfb3874af47091ec19654aa23c426df04fe1ffcfa209623dc362f85) +vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH + REPO "sfml/sfml" + REF "2.4.2" + HEAD_REF master + SHA512 8acfdf320939c953a9a3413398f82d02d68a56a337f1366c2677c14ce032baa8ba059113ac3c91bb6e6fc22eef119369a265be7ef6894526e6a97a01f37e1972) -vcpkg_extract_source_archive(${ARCHIVE}) file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -30,5 +29,9 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib) -file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/sfml/license.txt ${CURRENT_PACKAGES_DIR}/share/sfml/copyright) +# At the time of writing, HEAD has license.md instead of license.txt +if (VCPKG_HEAD_VERSION) + file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright) +else() + file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright) +endif() \ No newline at end of file -- cgit v1.2.3 From 2c3def2f865188fd088f5f10ccffeb9e5464f815 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 24 Sep 2017 03:07:25 -0700 Subject: `vcpkg portsdiff` Make output format closer to the CHANGELOG formatting --- toolsrc/src/commands_portsdiff.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/toolsrc/src/commands_portsdiff.cpp b/toolsrc/src/commands_portsdiff.cpp index 32bc3de3c..2334b2270 100644 --- a/toolsrc/src/commands_portsdiff.cpp +++ b/toolsrc/src/commands_portsdiff.cpp @@ -68,7 +68,7 @@ namespace vcpkg::Commands::PortsDiff for (const std::string& name : ports_to_print) { const VersionT& version = names_and_versions.at(name); - System::println("%-20s %-16s", name, version); + System::println(" - %-14s %-16s", name, version); } } @@ -147,14 +147,14 @@ namespace vcpkg::Commands::PortsDiff const std::vector& added_ports = setp.only_left; if (!added_ports.empty()) { - System::println("\nThe following %d ports were added:\n", added_ports.size()); + System::println("\nThe following %d ports were added:", added_ports.size()); do_print_name_and_version(added_ports, current_names_and_versions); } const std::vector& removed_ports = setp.only_right; if (!removed_ports.empty()) { - System::println("\nThe following %d ports were removed:\n", removed_ports.size()); + System::println("\nThe following %d ports were removed:", removed_ports.size()); do_print_name_and_version(removed_ports, previous_names_and_versions); } @@ -164,10 +164,10 @@ namespace vcpkg::Commands::PortsDiff if (!updated_ports.empty()) { - System::println("\nThe following %d ports were updated:\n", updated_ports.size()); + System::println("\nThe following %d ports were updated:", updated_ports.size()); for (const UpdatedPort& p : updated_ports) { - System::println("%-20s %-16s", p.port, p.version_diff.to_string()); + System::println(" - %-14s %-16s", p.port, p.version_diff.to_string()); } } -- cgit v1.2.3 From 392a9adfca20a55a0952aa9a7720a70edc738e80 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 24 Sep 2017 03:30:31 -0700 Subject: Update CHANGELOG and bump version to v0.0.90 --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cba05a1e..75d89f6ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,33 @@ +vcpkg (0.0.90) +-------------- + * Add ports: + - caffe2 0.8.1 + - date 2.2 + - jsonnet 2017-09-02-11cf9fa9f2fe8acbb14b096316006082564ca580 + - kf5plotting 5.37.0 + - units 2.3.0 + - winpcap 4.1.3-1 + * Update ports: + - arrow apache-arrow-0.4.0-2 -> 0.6.0 + - benchmark 1.1.0-1 -> 1.2.0 + - cppwinrt feb2017_refresh-14393 -> spring_2017_creators_update_for_vs_15.3 + - llvm 4.0.0-1 -> 5.0.0-1 + - luafilesystem 1.6.3-1 -> 1.7.0.2 + - opencv 3.2.0-4 -> 3.3.0-4 + - paho-mqtt 1.2.0-1 -> 1.2.0-2 + - protobuf 3.4.0-2 -> 3.4.1-1 + - qt5 5.8-5 -> 5.8-6 + - sfml 2.4.2-1 -> 2.4.2-2 + - xlnt 0.9.4-1 -> 1.1.0-1 + - zlib 1.2.11-1 -> 1.2.11-2 + * Bump required version & auto-downloaded version of `cmake` to 3.9.3 (was 3.9.1). Noteable changes: + - Fix codepage issues + - FindBoost: Add support for Boost 1.65.0 and 1.65.1 + * `vcpkg edit`: Fix inspected locations for VSCode + +-- vcpkg team SUN, 24 Sep 2017 03:30:00 -0800 + + vcpkg (0.0.89) -------------- * Update ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 7e1c0e952..c47961221 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.89" \ No newline at end of file +"0.0.90" \ No newline at end of file -- cgit v1.2.3 From 98861e3ee636b60a58ad0945fe051407bf356bfb Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 24 Sep 2017 15:31:30 +0300 Subject: [sdl2] update to 2.0.6 - update to 2.0.6 - enable cmake-targets - fix export symbols patch - remove default library linkage patch (fixed in upstream) --- ports/sdl2/CONTROL | 2 +- ports/sdl2/dont-ignore-default-libs.patch | 22 ----------------- .../sdl2/export-symbols-only-in-shared-build.patch | 28 ++++++++++++++-------- ports/sdl2/portfile.cmake | 22 ++++++++--------- 4 files changed, 30 insertions(+), 44 deletions(-) delete mode 100644 ports/sdl2/dont-ignore-default-libs.patch diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index ba795b93f..e4d99f4ae 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.5-4 +Version: 2.0.6-1 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/dont-ignore-default-libs.patch b/ports/sdl2/dont-ignore-default-libs.patch deleted file mode 100644 index c9f4c6079..000000000 --- a/ports/sdl2/dont-ignore-default-libs.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 54a23f0..91c5736 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1549,7 +1549,7 @@ if(SDL_SHARED) - SOVERSION ${LT_REVISION} - OUTPUT_NAME "SDL2") - endif() -- if(MSVC) -+ if(MSVC AND NOT LIBC) - # Don't try to link with the default set of libraries. - set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB") - set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB") -@@ -1564,7 +1564,7 @@ if(SDL_STATIC) - add_library(SDL2-static STATIC ${SOURCE_FILES}) - set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2") - set_target_properties(SDL2-static PROPERTIES POSITION_INDEPENDENT_CODE ${SDL_STATIC_PIC}) -- if(MSVC) -+ if(MSVC AND NOT LIBC) - set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB") - set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB") - set_target_properties(SDL2-static PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB") diff --git a/ports/sdl2/export-symbols-only-in-shared-build.patch b/ports/sdl2/export-symbols-only-in-shared-build.patch index b442954d5..7e6d503e2 100644 --- a/ports/sdl2/export-symbols-only-in-shared-build.patch +++ b/ports/sdl2/export-symbols-only-in-shared-build.patch @@ -1,16 +1,24 @@ -diff --git a/include/begin_code.h b/include/begin_code.h -index 04e78c6..16464f5 100644 ---- a/include/begin_code.h -+++ b/include/begin_code.h +# HG changeset patch +# User Mikhail Paulyshka +# Date 1506252750 -10800 +# Sun Sep 24 14:32:30 2017 +0300 +# Branch SDL2-WIN-SYMBOLS_LEACKAGE +# Node ID 46ec9baae30cd4e0c584de125cae4a3cce2864ad +# Parent 8df7a59b55283aa09889522369a2b32674c048de +win32: fix symbols leakage for static libraries + +diff -r 8df7a59b5528 -r 46ec9baae30c include/begin_code.h +--- a/include/begin_code.h Fri Sep 22 11:25:52 2017 -0700 ++++ b/include/begin_code.h Sun Sep 24 14:32:30 2017 +0300 @@ -58,8 +58,10 @@ # else # define DECLSPEC __declspec(dllimport) # endif --# else -+# elif defined(SDL2_EXPORTS) - # define DECLSPEC __declspec(dllexport) -+# else ++# elif defined(_DLL) ++# define DECLSPEC __declspec(dllexport) + # else +-# define DECLSPEC __declspec(dllexport) +# define DECLSPEC # endif - # else - # if defined(__GNUC__) && __GNUC__ >= 4 + # elif defined(__OS2__) + # ifdef BUILD_SDL diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index 33123c1ba..a430b29f6 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -1,16 +1,19 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.5) + +set(SDL2_VERSION 2.0.6) +set(SDL2_HASH ad4dad5663834ee0ffbdca1b531d753449b260c9256df2c48da7261aacd9795d91eef1286525cf914f6b92ba5985de7798f041557574b5d978b8224f10041830) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-${SDL2_VERSION}) vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://libsdl.org/release/SDL2-2.0.5.tar.gz" - FILENAME "SDL2-2.0.5.tar.gz" - SHA512 6401f5df08c08316c09bc6ac5b28345c5184bb25770baa5c94c0a582ae130ddf73bb736e44bb31f4e427c1ddbbeec4755a6a5f530b6b4c3d0f13ebc78ddc1750 + URLS "http://libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz" + FILENAME "SDL2-${SDL2_VERSION}.tar.gz" + SHA512 ${SDL2_HASH} ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/dont-ignore-default-libs.patch ${CMAKE_CURRENT_LIST_DIR}/export-symbols-only-in-shared-build.patch ) @@ -58,14 +61,11 @@ else() ) vcpkg_install_cmake() - + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -endif() -file(COPY ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2main.lib) + vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") +endif() file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2 RENAME copyright) vcpkg_copy_pdbs() -- cgit v1.2.3 From ba04df32bb00dea1effdb08c7a1660bcdfa19970 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 24 Sep 2017 14:15:12 +0300 Subject: [openssl] install openssl tool --- ports/openssl/CONTROL | 2 +- ports/openssl/portfile.cmake | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index 5490766a6..f3f065c13 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2l-2 +Version: 1.0.2l-3 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/portfile.cmake b/ports/openssl/portfile.cmake index f8d399abc..8ad0ff197 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -127,11 +127,15 @@ message(STATUS "Build ${TARGET_TRIPLET}-dbg done") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe - ${CURRENT_PACKAGES_DIR}/bin/openssl.exe ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf ${CURRENT_PACKAGES_DIR}/openssl.cnf ) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/openssl.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/openssl.exe) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) -- cgit v1.2.3 From f4229f376205b681be8bdc0c58666c2aebc5d8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Mon, 25 Sep 2017 14:32:57 +0200 Subject: Use vcpkg's libraries for pangolin dependencies Also fixes missing header that doesn't get installed --- ports/pangolin/CONTROL | 2 +- ports/pangolin/portfile.cmake | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL index 79b7f6947..39d4cadc7 100644 --- a/ports/pangolin/CONTROL +++ b/ports/pangolin/CONTROL @@ -1,4 +1,4 @@ Source: pangolin Version: 0.5-1 -Build-Depends: eigen3 +Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg Description: Lightweight GUI Library diff --git a/ports/pangolin/portfile.cmake b/ports/pangolin/portfile.cmake index d93f9d7cd..e05acf5c6 100644 --- a/ports/pangolin/portfile.cmake +++ b/ports/pangolin/portfile.cmake @@ -13,6 +13,9 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON + -DBUILD_EXTERN_GLEW=OFF + -DBUILD_EXTERN_LIBPNG=OFF + -DBUILD_EXTERN_LIBJPEG=OFF ) vcpkg_install_cmake() @@ -39,6 +42,9 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Copy missing header file +file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/include/pangolin/pangolin_export.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/pangolin) + # Put the license file where vcpkg expects it file(COPY ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/Pangolin/) file(RENAME ${CURRENT_PACKAGES_DIR}/share/Pangolin/LICENCE ${CURRENT_PACKAGES_DIR}/share/Pangolin/copyright) -- cgit v1.2.3 From 06c028ce9a09f2a0ba509574bfc44371efaa4307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Mon, 25 Sep 2017 14:48:34 +0200 Subject: Enable static builds of pangolin --- ports/glew/portfile.cmake | 5 +++++ ports/pangolin/portfile.cmake | 32 +++++++++++++++++--------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake index 30f55451a..a18a8ceeb 100644 --- a/ports/glew/portfile.cmake +++ b/ports/glew/portfile.cmake @@ -36,6 +36,11 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/visualinfo.exe) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + foreach(FILE ${CURRENT_PACKAGES_DIR}/include/GL/glew.h ${CURRENT_PACKAGES_DIR}/include/GL/wglew.h ${CURRENT_PACKAGES_DIR}/include/GL/glxew.h) + file(READ ${FILE} _contents) + string(REPLACE "#ifdef GLEW_STATIC" "#if 1" _contents "${_contents}") + file(WRITE ${FILE} "${_contents}") + endforeach() endif() vcpkg_copy_pdbs() diff --git a/ports/pangolin/portfile.cmake b/ports/pangolin/portfile.cmake index e05acf5c6..3fe7ef8b6 100644 --- a/ports/pangolin/portfile.cmake +++ b/ports/pangolin/portfile.cmake @@ -24,21 +24,23 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Pangolin") vcpkg_copy_pdbs() -file(GLOB EXE ${CURRENT_PACKAGES_DIR}/lib/*.dll) -file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(REMOVE ${EXE}) - -file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) -file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(REMOVE ${DEBUG_EXE}) - -file(READ ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-debug.cmake PANGOLIN_TARGETS) -string(REPLACE "lib/pangolin.dll" "bin/pangolin.dll" PANGOLIN_TARGETS "${PANGOLIN_TARGETS}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-debug.cmake "${PANGOLIN_TARGETS}") - -file(READ ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake PANGOLIN_TARGETS) -string(REPLACE "lib/pangolin.dll" "bin/pangolin.dll" PANGOLIN_TARGETS "${PANGOLIN_TARGETS}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake "${PANGOLIN_TARGETS}") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB EXE ${CURRENT_PACKAGES_DIR}/lib/*.dll) + file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${EXE}) + + file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) + file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_EXE}) + + file(READ ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-debug.cmake PANGOLIN_TARGETS) + string(REPLACE "lib/pangolin.dll" "bin/pangolin.dll" PANGOLIN_TARGETS "${PANGOLIN_TARGETS}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-debug.cmake "${PANGOLIN_TARGETS}") + + file(READ ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake PANGOLIN_TARGETS) + string(REPLACE "lib/pangolin.dll" "bin/pangolin.dll" PANGOLIN_TARGETS "${PANGOLIN_TARGETS}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake "${PANGOLIN_TARGETS}") +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 89d2112fbe551e7ee39312b7c16c6cbc07fe2f06 Mon Sep 17 00:00:00 2001 From: Jim McGrath Date: Mon, 25 Sep 2017 10:39:06 -0500 Subject: update the hash to match the current github release (!) --- ports/libmysql/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake index 530732b71..81ffdfb98 100644 --- a/ports/libmysql/portfile.cmake +++ b/ports/libmysql/portfile.cmake @@ -8,7 +8,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mysql-server-mysql-5.7.17) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/mysql/mysql-server/archive/mysql-5.7.17.tar.gz" FILENAME "mysql-server-mysql-5.7.17.tar.gz" - SHA512 511027f28f0705f59a08ec369b1ebe5d9a77eb839d545898631f1ebbcb6b4b800f5b88511d3ae5d231c04e09a2d7b2b2d178264d36aeb2bc602cc1b0b248cfba + SHA512 31488972e08a6b83f88e6e3f7923aca91e01eac702f4942fdae92e13f66d92ac86c24dfe7a65a001db836c900147d1c3871b36af8cbb281a0e6c555617cac12c ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 06798b6528b777ba2e2a9af59774309db5cf5e52 Mon Sep 17 00:00:00 2001 From: glachancecmaisonneuve Date: Mon, 25 Sep 2017 13:05:32 -0400 Subject: Fix for BUILD_ARGS being always added in non ninja build --- scripts/cmake/vcpkg_build_cmake.cmake | 30 +++++++++++++++++++++++++++++- scripts/cmake/vcpkg_install_cmake.cmake | 6 ++++-- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 18e2a8b00..546071a36 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -1,3 +1,29 @@ +## # vcpkg_build_cmake +## +## Build a cmake project. +## +## ## Usage: +## ```cmake +## vcpkg_build_cmake([MSVC_64_TOOLSET] [DISABLE_PARALLEL]) +## ``` +## +## ## Parameters: +## ### MSVC_64_TOOLSET +## This adds the `/p:PreferredToolArchitecture=x64` switch to the underlying buildsystem parameters. Some large projects can run out of memory when linking if they use the 32-bit hosted tools. +## +## ### DISABLE_PARALLEL +## The /m parameter will not be added to the underlying buildsystem parameters +## +## ## Notes: +## This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). +## Use [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the "install" target +## +## ## Examples: +## +## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +## * [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_build_cmake) cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN}) @@ -19,7 +45,9 @@ function(vcpkg_build_cmake) if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/build.ninja) set(BUILD_ARGS -v) # verbose output - else() + endif() + + if(_bc_MSVC_64_TOOLSET) set(BUILD_ARGS ${MSVC_EXTRA_ARGS}) endif() diff --git a/scripts/cmake/vcpkg_install_cmake.cmake b/scripts/cmake/vcpkg_install_cmake.cmake index f778007ef..34ac15fe6 100644 --- a/scripts/cmake/vcpkg_install_cmake.cmake +++ b/scripts/cmake/vcpkg_install_cmake.cmake @@ -9,7 +9,7 @@ ## ## ## Parameters: ## ### MSVC_64_TOOLSET -## This adds the `/p:PreferredToolArchitecture=x64` switch if the underlying buildsystem is MSBuild. Some large projects can run out of memory when linking if they use the 32-bit hosted tools. +## This adds the `/p:PreferredToolArchitecture=x64` switch to the underlying buildsystem parameters. Some large projects can run out of memory when linking if they use the 32-bit hosted tools. ## ## ## Notes: ## This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). @@ -41,7 +41,9 @@ function(vcpkg_install_cmake) if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/build.ninja) set(BUILD_ARGS -v) # verbose output - else() + endif() + + if(_bc_MSVC_64_TOOLSET) set(BUILD_ARGS ${MSVC_EXTRA_ARGS}) endif() -- cgit v1.2.3 From da5e24224a6f1d068d7ea6d44d86b0e9a14b34fb Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 25 Sep 2017 13:05:24 -0700 Subject: [pangolin] Bump version --- ports/pangolin/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL index 39d4cadc7..a4d670b74 100644 --- a/ports/pangolin/CONTROL +++ b/ports/pangolin/CONTROL @@ -1,4 +1,4 @@ Source: pangolin -Version: 0.5-1 +Version: 0.5-2 Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg Description: Lightweight GUI Library -- cgit v1.2.3 From fe92af4ddd6ab409e013208ce131a40e333c0ba8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 25 Sep 2017 15:10:21 -0700 Subject: Fix more port hashes due to github tar.gz change Related: cb239b92 It looks like github changed the version (or the generally the way) they do tars, causing some hash mismatches. This fixes the affected ports. --- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- ports/signalrclient/portfile.cmake | 4 ++-- ports/tinyexr/portfile.cmake | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 93c7a7265..3a8f9b464 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,7 +3,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.61) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/aws/aws-sdk-cpp/archive/1.0.61.tar.gz" FILENAME "aws-sdk-cpp-1.0.61.tar.gz" - SHA512 aef0a85a32db24dc4fba0fc49c2533074580f3df628e787ff0808f03deea5dac42e19b1edc966706784e98cfed17a350c3eff4f222df7cc756065be56d1fc6a6 + SHA512 75f3570d8e8c08624b69d8254e156829030a36a7c4aa4b783d895e7c209b2a46b6b9ce822e6d9e9f649b171cf64988f0ad18ce0a55eb39c50d68a7880568078a ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -50,4 +50,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-sdk-cpp RENAME copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-sdk-cpp RENAME copyright) diff --git a/ports/signalrclient/portfile.cmake b/ports/signalrclient/portfile.cmake index 22e91acab..ad7f4fd58 100644 --- a/ports/signalrclient/portfile.cmake +++ b/ports/signalrclient/portfile.cmake @@ -4,7 +4,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SignalR-Client-Cpp-1.0.0-beta1) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/aspnet/SignalR-Client-Cpp/archive/1.0.0-beta1.tar.gz" FILENAME "SignalR-Client-Cpp-1.0.0-beta1.tar.gz" - SHA512 e0090415aa724087dbe2a317a4642d6359b134e00e836ea70c71bc9186dc8d6bba097666711ab18d9b0a390e1e5f59be2f55279b6859ac20d558b901bf5fe2f2 + SHA512 b38f6f946f1499080071949cbcf574405118f9acfb469441e5b5b0df3e5f0d277a83b30e0d613dc5e54732b9071e3273dac1ee65129f994d5a60eef0e45bdf6c ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -31,4 +31,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # copy license file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/signalrclient) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/signalrclient/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/signalrclient/copyright) \ No newline at end of file +file(RENAME ${CURRENT_PACKAGES_DIR}/share/signalrclient/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/signalrclient/copyright) diff --git a/ports/tinyexr/portfile.cmake b/ports/tinyexr/portfile.cmake index bf725cddd..6ef6439d5 100644 --- a/ports/tinyexr/portfile.cmake +++ b/ports/tinyexr/portfile.cmake @@ -4,7 +4,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tinyexr-d16ea6347ae78bcee984fb57ca vcpkg_download_distfile(ARCHIVE URLS "https://github.com/syoyo/tinyexr/archive/d16ea6347ae78bcee984fb57cab1f023aeda4fb0.tar.gz" FILENAME "tinyexr-v0.9.5-d16ea6.tar.gz" - SHA512 189ab04f6c5fb50c20ac0515a83ee16cba4b0f1bca004db2926281077868d1384e0c54f81768a54b76286a17c1b0c45a0b82acaf22b7ee843dc87c654b09e950 + SHA512 63399688d7894f9ac4b893b2142202b36108b5029b11c40c3f9ad0f0135625fb0c8e0d54cec88d92c016774648dc829a946d9575c5f19afea56542c00759546e ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 084b1afe9af1690916fab95bbb80c6891109f0fc Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 25 Sep 2017 15:35:41 -0700 Subject: [anax] Use vcpkg_from_github(). Add missing vcpkg_copy_pdbs() --- ports/anax/CONTROL | 2 +- ports/anax/portfile.cmake | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ports/anax/CONTROL b/ports/anax/CONTROL index 7eb71786b..12be38d11 100644 --- a/ports/anax/CONTROL +++ b/ports/anax/CONTROL @@ -1,3 +1,3 @@ Source: anax -Version: 2.1.0-2 +Version: 2.1.0-3 Description: An open source C++ entity system. diff --git a/ports/anax/portfile.cmake b/ports/anax/portfile.cmake index ef14f7264..8881957fc 100644 --- a/ports/anax/portfile.cmake +++ b/ports/anax/portfile.cmake @@ -8,13 +8,13 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/anax-2.1.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/miguelmartin75/anax/archive/v2.1.0.zip" - FILENAME "anax-2.1.0.zip" - SHA512 89f2df64add676ab48a19953b95d8eae1da9c8c5f3c0f6bc757a3bc99af6e4360c56c12d27d12c672ccd754b1f53a5e271533b381641f20e8cf3ca8ddda6cd1a +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO miguelmartin75/anax + REF v2.1.0 + SHA512 b573733b5f9634bf8cfc5b0715074f9a8ee29ecb48dc981d9371254a1f6ff8afbbb9ba6aa0877d53e518e5486ecc398a6d331fb9b5dbfd17d8707679216e11a3 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} @@ -23,8 +23,8 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON + OPTIONS + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON ) vcpkg_install_cmake() @@ -34,3 +34,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/anax) file(RENAME ${CURRENT_PACKAGES_DIR}/share/anax/LICENSE ${CURRENT_PACKAGES_DIR}/share/anax/copyright) + +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From a4673fce890b5e38a12dffed0d9974c01d0a3d57 Mon Sep 17 00:00:00 2001 From: "jonathan.r.paton@googlemail.com" Date: Tue, 26 Sep 2017 13:08:27 +0100 Subject: Initial enet port --- ports/enet/CMakeLists.txt | 81 +++++++++++++++++++++++++++++++++++++++++++++++ ports/enet/CONTROL | 4 +++ ports/enet/portfile.cmake | 38 ++++++++++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 ports/enet/CMakeLists.txt create mode 100644 ports/enet/CONTROL create mode 100644 ports/enet/portfile.cmake diff --git a/ports/enet/CMakeLists.txt b/ports/enet/CMakeLists.txt new file mode 100644 index 000000000..012e21d64 --- /dev/null +++ b/ports/enet/CMakeLists.txt @@ -0,0 +1,81 @@ +cmake_minimum_required(VERSION 2.6) + +project(enet) + +# The "configure" step. +include(CheckFunctionExists) +include(CheckStructHasMember) +include(CheckTypeSize) +check_function_exists("fcntl" HAS_FCNTL) +check_function_exists("poll" HAS_POLL) +check_function_exists("getaddrinfo" HAS_GETADDRINFO) +check_function_exists("getnameinfo" HAS_GETNAMEINFO) +check_function_exists("gethostbyname_r" HAS_GETHOSTBYNAME_R) +check_function_exists("gethostbyaddr_r" HAS_GETHOSTBYADDR_R) +check_function_exists("inet_pton" HAS_INET_PTON) +check_function_exists("inet_ntop" HAS_INET_NTOP) +check_struct_has_member("struct msghdr" "msg_flags" "sys/types.h;sys/socket.h" HAS_MSGHDR_FLAGS) +set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h" "sys/socket.h") +check_type_size("socklen_t" HAS_SOCKLEN_T BUILTIN_TYPES_ONLY) +unset(CMAKE_EXTRA_INCLUDE_FILES) +if(MSVC) + add_definitions(-W3) +else() + add_definitions(-Wno-error) +endif() + +if(HAS_FCNTL) + add_definitions(-DHAS_FCNTL=1) +endif() +if(HAS_POLL) + add_definitions(-DHAS_POLL=1) +endif() +if(HAS_GETNAMEINFO) + add_definitions(-DHAS_GETNAMEINFO=1) +endif() +if(HAS_GETADDRINFO) + add_definitions(-DHAS_GETADDRINFO=1) +endif() +if(HAS_GETHOSTBYNAME_R) + add_definitions(-DHAS_GETHOSTBYNAME_R=1) +endif() +if(HAS_GETHOSTBYADDR_R) + add_definitions(-DHAS_GETHOSTBYADDR_R=1) +endif() +if(HAS_INET_PTON) + add_definitions(-DHAS_INET_PTON=1) +endif() +if(HAS_INET_NTOP) + add_definitions(-DHAS_INET_NTOP=1) +endif() +if(HAS_MSGHDR_FLAGS) + add_definitions(-DHAS_MSGHDR_FLAGS=1) +endif() +if(HAS_SOCKLEN_T) + add_definitions(-DHAS_SOCKLEN_T=1) +endif() + +include_directories(${PROJECT_SOURCE_DIR}/include) + +add_library(enet STATIC + callbacks.c + compress.c + host.c + list.c + packet.c + peer.c + protocol.c + unix.c + win32.c + ) + +if (WIN32) + target_link_libraries(enet winmm ws2_32) +endif() + +install(TARGETS enet ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin) + +install(DIRECTORY include/ + DESTINATION include) \ No newline at end of file diff --git a/ports/enet/CONTROL b/ports/enet/CONTROL new file mode 100644 index 000000000..f75b49de9 --- /dev/null +++ b/ports/enet/CONTROL @@ -0,0 +1,4 @@ +Source: enet +Version: 1.3.13 +Description: Reliable UDP networking library + diff --git a/ports/enet/portfile.cmake b/ports/enet/portfile.cmake new file mode 100644 index 000000000..2a7fa4585 --- /dev/null +++ b/ports/enet/portfile.cmake @@ -0,0 +1,38 @@ +# 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 "lsalzman/enet" + REF f7c46f03fd8d883ac2811948aa71c7623069d070 + HEAD_REF master + SHA512 2d5593ea56473b38479921fd0849318bf3ecb233f92fa487ba395a0bb7e6a3997109287867a67c66721f761a30cceab4ba4709080a93ed977b7650b10cab1936 +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +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() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/enet RENAME copyright) + +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 626d2f8162542bb7d86cdf484d62c0482921fde3 Mon Sep 17 00:00:00 2001 From: "jonathan.r.paton@googlemail.com" Date: Tue, 26 Sep 2017 15:04:49 +0100 Subject: Initial GTS port --- ports/gts/CONTROL | 4 ++++ ports/gts/portfile.cmake | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 ports/gts/CONTROL create mode 100644 ports/gts/portfile.cmake diff --git a/ports/gts/CONTROL b/ports/gts/CONTROL new file mode 100644 index 000000000..faa409619 --- /dev/null +++ b/ports/gts/CONTROL @@ -0,0 +1,4 @@ +Source: gts +Version: 0.7.6 +Description: A Library intended to provide a set of useful functions to deal with 3D surfaces meshed with interconnected triangles +Build-Depends: glib diff --git a/ports/gts/portfile.cmake b/ports/gts/portfile.cmake new file mode 100644 index 000000000..d55f5dc66 --- /dev/null +++ b/ports/gts/portfile.cmake @@ -0,0 +1,36 @@ +# 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 "finetjul/gts" + REF c4da61ae075f355d9ecc9f2d4767acf777f54c2b + HEAD_REF master + SHA512 e53d11213c26cbda08ae62e6388aee0a14d2884de72268ad25d10a23e77baa53a2b1151c5cc7643b059ded82b8edf0da79144c3108949fdc515168cac13ffca9 +) + +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() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gts RENAME copyright) + +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 6df1629d4dccb5a580e7d3de407cc9d932bfd5e7 Mon Sep 17 00:00:00 2001 From: Mateusz Loskot Date: Tue, 26 Sep 2017 19:13:28 +0200 Subject: [gdal] Update port to latest GDAL 2.2.2 * Bump GDAL version wherever necessary * Update download package and checksum. * Remove 0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch no longer necessary. * Recalculate 000N prefix in patche filenames after the removal. * Update 0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch * Patch pushed upstream https://trac.osgeo.org/gdal/ticket/7055 and should no longer be necessary in GDAL 2.2.3 or later * Update 0003-Fix-openjpeg-include.patch --- ...upport-for-MSVC1900-backported-from-GDAL2.patch | 70 ---------------------- ...e-CXX_CRT_FLAGS-to-allow-for-selection-of.patch | 37 ++++++++++++ ...e-CXX_CRT_FLAGS-to-allow-for-selection-of.patch | 50 ---------------- ...lusion-of-PDB-in-release-dll-if-so-reques.patch | 14 +++++ ...lusion-of-PDB-in-release-dll-if-so-reques.patch | 26 -------- ports/gdal/0003-Fix-openjpeg-include.patch | 20 +++++++ ports/gdal/0004-Fix-openjpeg-include.patch | 19 ------ ports/gdal/CONTROL | 2 +- ports/gdal/portfile.cmake | 23 ++++--- 9 files changed, 83 insertions(+), 178 deletions(-) delete mode 100644 ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch create mode 100644 ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch delete mode 100644 ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch create mode 100644 ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch delete mode 100644 ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch create mode 100644 ports/gdal/0003-Fix-openjpeg-include.patch delete mode 100644 ports/gdal/0004-Fix-openjpeg-include.patch diff --git a/ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch b/ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch deleted file mode 100644 index e29cc5b8e..000000000 --- a/ports/gdal/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 823171a129401d226ac4821fb997ce585045170c Mon Sep 17 00:00:00 2001 -From: Manuel Massing -Date: Wed, 23 Nov 2016 23:50:12 +0100 -Subject: [PATCH] Add support for MSVC1900 (backported from GDAL2) - ---- - nmake.opt | 6 ++++++ - port/cpl_config.h.vc | 8 +++++--- - 2 files changed, 11 insertions(+), 3 deletions(-) - -diff --git a/nmake.opt b/nmake.opt -index 8900135..4d1c4fa 100644 ---- a/nmake.opt -+++ b/nmake.opt -@@ -31,6 +31,7 @@ - # Check version of Visual C++ compiler: - # nmake -f makefile.vc MSVC_VER=xxxx - # where xxxx is one of following: -+# 1900 = 14.0(2015) - # 1800 = 12.0(2013) - # 1700 = 11.0(2012) - # 1600 = 10.0(2010) -@@ -627,8 +628,13 @@ GDALLIB = $(GDAL_ROOT)/gdal.lib - !ENDIF - - !IFDEF ODBC_SUPPORTED -+!IF $(MSVC_VER) >= 1900 -+# legacy_stdio_definitions.lib : https://connect.microsoft.com/VisualStudio/feedback/details/1134693/vs-2015-ctp-5-c-vsnwprintf-s-and-other-functions-are-not-exported-in-appcrt140-dll-breaking-linkage-of-static-libraries -+ODBCLIB = legacy_stdio_definitions.lib odbc32.lib odbccp32.lib user32.lib -+!ELSE - ODBCLIB = odbc32.lib odbccp32.lib user32.lib - !ENDIF -+!ENDIF - - !IF DEFINED(MRSID_DIR) || DEFINED(MRSID_RASTER_DIR) || DEFINED(MRSID_LIDAR_DIR) - !IF "$(MRSID_PLUGIN)" != "YES" -diff --git a/port/cpl_config.h.vc b/port/cpl_config.h.vc -index bfff8f6..fe7b82a 100644 ---- a/port/cpl_config.h.vc -+++ b/port/cpl_config.h.vc -@@ -1,5 +1,5 @@ - --/* We define this here in general so that a VC++ build will publically -+/* We define this here in general so that a VC++ build will publicly - declare STDCALL interfaces even if an application is built against it - using MinGW */ - -@@ -17,7 +17,9 @@ - #if defined(_MSC_VER) && (_MSC_VER < 1500) - # define vsnprintf _vsnprintf - #endif --#define snprintf _snprintf -+#if defined(_MSC_VER) && (_MSC_VER < 1900) -+# define snprintf _snprintf -+#endif - - #define HAVE_GETCWD 1 - /* gmt_notunix.h from GMT project also redefines getcwd. See #3138 */ -@@ -86,7 +88,7 @@ - /* Set the native cpu bit order */ - #define HOST_FILLORDER FILLORDER_LSB2MSB - --/* Define as 0 or 1 according to the floating point format suported by the -+/* Define as 0 or 1 according to the floating point format supported by the - machine */ - #define HAVE_IEEEFP 1 - --- -2.10.1.windows.1 - diff --git a/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch b/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch new file mode 100644 index 000000000..7817c4a38 --- /dev/null +++ b/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch @@ -0,0 +1,37 @@ +diff --git a/nmake.opt b/nmake.opt +index bd5719c2d1..f6101ccd59 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -127,18 +127,28 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb + CXX_PDB_FLAGS= + !ENDIF + ++# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) ++# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well ++!IFNDEF CXX_CRT_FLAGS ++!IFNDEF DEBUG ++CXX_CRT_FLAGS=/MD ++!ELSE ++CXX_CRT_FLAGS=/MDd ++!ENDIF ++!ENDIF ++ + !IFNDEF OPTFLAGS + !IF $(MSVC_VER) >= 1400 + !IFNDEF DEBUG +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG + !ELSE +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG + !ENDIF + !ELSE + !IFNDEF DEBUG +-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /Ox /FC /DNDEBUG ++OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /Ox /DNDEBUG + !ELSE +-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /FC /DDEBUG ++OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /DDEBUG + !ENDIF + !ENDIF #MSVC_VER + !ENDIF # OPTFLAGS diff --git a/ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch b/ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch deleted file mode 100644 index 0ffcac5fb..000000000 --- a/ports/gdal/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch +++ /dev/null @@ -1,50 +0,0 @@ -From b25c3dc49ca1bcf9a789cf64c9fa8694e35127f0 Mon Sep 17 00:00:00 2001 -From: Manuel Massing -Date: Sun, 27 Nov 2016 09:57:04 +0100 -Subject: [PATCH 2/2] Add variable CXX_CRT_FLAGS to allow for selection of C - runtime linkage in nmake build. - ---- - nmake.opt | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/nmake.opt b/nmake.opt -index 4d1c4fa..47c2df8 100644 ---- a/nmake.opt -+++ b/nmake.opt -@@ -125,18 +125,28 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb - CXX_PDB_FLAGS= - !ENDIF - -+# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) -+# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well -+!IFNDEF CXX_CRT_FLAGS -+!IFNDEF DEBUG -+CXX_CRT_FLAGS=/MD -+!ELSE -+CXX_CRT_FLAGS=/MDd -+!ENDIF -+!ENDIF -+ - !IFNDEF OPTFLAGS - !IF $(MSVC_VER) >= 1400 - !IFNDEF DEBUG --OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MD /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG -+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG - !ELSE --OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MD /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG -+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG - !ENDIF - !ELSE - !IFNDEF DEBUG --OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /Ox /DNDEBUG -+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /Ox /DNDEBUG - !ELSE --OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /DDEBUG -+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /DDEBUG - !ENDIF - !ENDIF #MSVC_VER - !ENDIF # OPTFLAGS --- -2.10.1.windows.1 - diff --git a/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch b/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch new file mode 100644 index 000000000..57030b99b --- /dev/null +++ b/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch @@ -0,0 +1,14 @@ +diff --git a/nmake.opt b/nmake.opt +index bd5719c2d1..c0ca442cbe 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -195,6 +205,9 @@ SOFTWARNFLAGS= /wd4244 /wd4702 /wd4701 /wd4013 /wd4706 /wd4057 /wd4210 /wd4305 + # Linker debug options + !IFDEF DEBUG + LDEBUG= /debug ++!ELSEIFDEF WITH_PDB ++# Ensures that PDB is included in release DLL if so requested ++LDEBUG= /debug /opt:ref /opt:icf + !ENDIF + + # Uncomment the following if you are building for 64-bit windows diff --git a/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch b/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch deleted file mode 100644 index 1065a2982..000000000 --- a/ports/gdal/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 9da0cb6eed442ebf3eea232cd85e26c155c963ef Mon Sep 17 00:00:00 2001 -From: Manuel Massing -Date: Tue, 29 Nov 2016 12:43:58 +0100 -Subject: [PATCH 3/4] - Ensures inclusion of PDB in release dll if so requested - ---- - gdal/nmake.opt | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/nmake.opt b/nmake.opt -index 47c2df8..4844d22 100644 ---- a/nmake.opt -+++ b/nmake.opt -@@ -174,6 +174,9 @@ SOFTWARNFLAGS= /wd4244 /wd4702 /wd4701 /wd4013 /wd4706 /wd4057 /wd4210 /wd4305 - # Linker debug options - !IFDEF DEBUG - LDEBUG= /debug -+!ELSEIFDEF WITH_PDB -+# Ensures that PDB is included in release DLL if so requested -+LDEBUG= /debug /opt:ref /opt:icf - !ENDIF - - # Uncomment the following if you are building for 64-bit windows --- -2.10.1.windows.1 - diff --git a/ports/gdal/0003-Fix-openjpeg-include.patch b/ports/gdal/0003-Fix-openjpeg-include.patch new file mode 100644 index 000000000..4ea72690c --- /dev/null +++ b/ports/gdal/0003-Fix-openjpeg-include.patch @@ -0,0 +1,20 @@ +diff --git a/frmts/openjpeg/openjpegdataset.cpp b/frmts/openjpeg/openjpegdataset.cpp +index 5978882bc9..72cc7b9559 100644 +--- a/frmts/openjpeg/openjpegdataset.cpp ++++ b/frmts/openjpeg/openjpegdataset.cpp +@@ -34,14 +34,8 @@ + #pragma clang diagnostic ignored "-Wdocumentation" + #endif + +-#if defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20200 +-#include +-#elif defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20100 +-#include +-#else + #include /* openjpeg.h needs FILE* */ +-#include +-#endif ++#include + + #ifdef __clang__ + #pragma clang diagnostic pop diff --git a/ports/gdal/0004-Fix-openjpeg-include.patch b/ports/gdal/0004-Fix-openjpeg-include.patch deleted file mode 100644 index 2865455d8..000000000 --- a/ports/gdal/0004-Fix-openjpeg-include.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/frmts/openjpeg/openjpegdataset.cpp b/frmts/openjpeg/openjpegdataset.cpp -index 1fd4f4f..417f7a8 100644 ---- a/frmts/openjpeg/openjpegdataset.cpp -+++ b/frmts/openjpeg/openjpegdataset.cpp -@@ -29,12 +29,8 @@ - - /* This file is to be used with openjpeg 2.0 */ - --#if defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20100 --#include --#else --#include /* openjpeg.h needs FILE* */ --#include --#endif -+#include -+#include - #include - - #include "gdaljp2abstractdataset.h" diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index 868a5e929..18aa7f631 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,4 +1,4 @@ Source: gdal -Version: 1.11.3-5 +Version: 2.2.2 Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. Build-Depends: proj, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 214ec2024..9bfb92362 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -5,25 +5,24 @@ endif() include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE - URLS "http://download.osgeo.org/gdal/1.11.3/gdal1113.zip" - FILENAME "gdal1113.zip" - SHA512 42feb98a54019d3b6ac54f598f299a57e117db500c662d39faa9d5f5090f03c1b8d7680242e1abd8035738edc4fc3197ae118a0ce50733691a76a5cf377bcd46 -) + URLS "http://download.osgeo.org/gdal/2.2.2/gdal222.zip" + FILENAME "gdal222.zip" + SHA512 b886238a7915c97f4acec5920dabe959d1ab15a8be0bc31ba0d05ad69d1d7d96f864faf0aa82921fa1a1b40b733744202b86f2f45ff63d6518cd18a53f3544a8 + ) # Extract source into archictecture specific directory, because GDALs' nmake based build currently does not # support out of source builds. -set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-1.11.3) -set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-1.11.3) +set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-2.2.2) +set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-2.2.2) foreach(BUILD_TYPE debug release) vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-1.11.3 + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-2.2.2 PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch - ${CMAKE_CURRENT_LIST_DIR}/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch - ${CMAKE_CURRENT_LIST_DIR}/0004-Fix-openjpeg-include.patch + ${CMAKE_CURRENT_LIST_DIR}/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch + ${CMAKE_CURRENT_LIST_DIR}/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch + ${CMAKE_CURRENT_LIST_DIR}/0003-Fix-openjpeg-include.patch ) endforeach() @@ -211,7 +210,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) else() file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(REMOVE ${EXE_FILES} ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) - file(COPY ${SOURCE_PATH_DEBUG}/gdal111.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${SOURCE_PATH_DEBUG}/gdal202.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) -- cgit v1.2.3 From eacabe5c4641c2f95507a4c513fa35552937f6ab Mon Sep 17 00:00:00 2001 From: Mateusz Loskot Date: Tue, 26 Sep 2017 22:29:24 +0200 Subject: [geos] Update port to latest GEOS 3.6.2 * Bump GEOS version wherever necessary * Update download package and checksum. * Replace download from SVN with official release source package. * Remove generating of geos_svn_revision.h as unnecessary - released source package includes the header. * Explain status of the missing CMake modules. * Remove CMake option -DBUILD_TESTING as unused. GEOS is important dependency of GDAL (updated in #1879; GDAL 2.2.2 can still work with GEOS earlier than 3.6.2). --- ports/geos/CONTROL | 2 +- ports/geos/portfile.cmake | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ports/geos/CONTROL b/ports/geos/CONTROL index 3e9d4d7c6..fbf31661f 100644 --- a/ports/geos/CONTROL +++ b/ports/geos/CONTROL @@ -1,3 +1,3 @@ Source: geos -Version: 3.5.0-1 +Version: 3.6.2 Description: Geometry Engine Open Source diff --git a/ports/geos/portfile.cmake b/ports/geos/portfile.cmake index 7cd50db58..b391a9fce 100644 --- a/ports/geos/portfile.cmake +++ b/ports/geos/portfile.cmake @@ -7,25 +7,26 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/3.5) -#downloading 3.5 from their SVN repo and not the release tarball -#because the 3.5 release did not build on windows, and fixes were backported -#without generating a new release tarball (I don't think very many GIS people use win) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/geos-3.6.2) + vcpkg_download_distfile(ARCHIVE - URLS "https://trac.osgeo.org/geos/browser/branches/3.5?rev=4261&format=zip" - FILENAME "geos-3.5.0.zip" - SHA512 3b91e8992f60b99a3f01069d955b71bce425ae5e5c599252fa26a337494e1a5a8ea796be124766d054710d6c03806f56dc1c63539b4660e2bb894d7ef779d4b9 + URLS "http://download.osgeo.org/geos/geos-3.6.2.tar.bz2" + FILENAME "geos-3.6.2.tar.bz2" + SHA512 515d8700b8a28282678e481faee355e3a43d7b70160472a63335b8d7225d9ba10437be782378f18f31a15288118126d411a2d862f01ce35d27c96f6bc0a73016 ) vcpkg_extract_source_archive(${ARCHIVE}) -#we need to do this because GEOS deploy process is totally broken for cmake -#file(DOWNLOAD http://svn.osgeo.org/geos/tags/3.5.0/cmake/modules/GenerateSourceGroups.cmake -# ${SOURCE_PATH}/cmake/modules/GenerateSourceGroups.cmake) -file(WRITE ${SOURCE_PATH}/geos_svn_revision.h "#define GEOS_SVN_REVISION 4261") +# NOTE: GEOS provides CMake as optional build configuration, it might not be actively +# maintained, so CMake build issues may happen between releases. + +# Pull modules referred in the main CMakeLists.txt but missing from the released package. +# TODO: GEOS 3.6.3 or later will include the missing script in release package. +file(DOWNLOAD http://svn.osgeo.org/geos/branches/3.6/cmake/modules/GenerateSourceGroups.cmake + ${SOURCE_PATH}/cmake/modules/GenerateSourceGroups.cmake) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DGEOS_ENABLE_TESTS=False - -DBUILD_TESTING=False ) vcpkg_build_cmake() -- cgit v1.2.3 From 050a8bf6179ed046508b8a97e62894475a46dfbc Mon Sep 17 00:00:00 2001 From: jasjuang Date: Wed, 27 Sep 2017 00:23:27 -0700 Subject: new port libfreenect2 --- ports/libfreenect2/CONTROL | 4 ++++ ports/libfreenect2/portfile.cmake | 41 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 ports/libfreenect2/CONTROL create mode 100644 ports/libfreenect2/portfile.cmake diff --git a/ports/libfreenect2/CONTROL b/ports/libfreenect2/CONTROL new file mode 100644 index 000000000..90c53db6d --- /dev/null +++ b/ports/libfreenect2/CONTROL @@ -0,0 +1,4 @@ +Source: libfreenect2 +Version: 0.2.0 +Build-Depends:libusb +Description: Open source drivers for the Kinect for Windows v2 device diff --git a/ports/libfreenect2/portfile.cmake b/ports/libfreenect2/portfile.cmake new file mode 100644 index 000000000..ba41bb904 --- /dev/null +++ b/ports/libfreenect2/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenKinect/libfreenect2 + REF v0.2.0 + SHA512 3525e3f21462cecd3b198f64545786ffddc2cafdfd8146e5a46f0300b83f29f1ad0739618a07ab195c276149d7e2e909f7662e2d379a2880593cac75942b0666 + HEAD_REF master +) + +file(READ ${SOURCE_PATH}/cmake_modules/FindLibUSB.cmake FINDLIBUSB) +string(REPLACE "(WIN32)" + "(WIN32_DISABLE)" FINDLIBUSB "${FINDLIBUSB}") +file(WRITE ${SOURCE_PATH}/cmake_modules/FindLibUSB.cmake "${FINDLIBUSB}") + +file(READ ${SOURCE_PATH}/examples/CMakeLists.txt EXAMPLECMAKE) +string(REPLACE "(WIN32)" + "(WIN32_DISABLE)" EXAMPLECMAKE "${EXAMPLECMAKE}") +file(WRITE ${SOURCE_PATH}/examples/CMakeLists.txt "${EXAMPLECMAKE}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DENABLE_CUDA=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/freenect2") + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# The cmake config is actually called freenect2Config.cmake instead of libfreenect2Config.cmake ... +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libfreenect2 ${CURRENT_PACKAGES_DIR}/share/freenect2) + +# license file needs to be in share/libfreenect2 otherwise vcpkg will complain +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/libfreenect2/) +file(COPY ${SOURCE_PATH}/GPL2 DESTINATION ${CURRENT_PACKAGES_DIR}/share/libfreenect2/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libfreenect2/GPL2 ${CURRENT_PACKAGES_DIR}/share/libfreenect2/copyright) -- cgit v1.2.3 From ba0cc3f1d7edb7e2fee271761b2f37d0c740604f Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Mon, 28 Aug 2017 13:54:19 +0300 Subject: WIP: Export IFW Add export to binary crossplatform repository/installer with GUI based on QtIFW: http://doc.qt.io/qtinstallerframework/ifw-overview.html For correct operation of these changes, you must use the corrected QtIFW: https://codereview.qt-project.org/#/c/203958 --- toolsrc/include/vcpkg_Commands_Export_IFW.h | 13 ++ toolsrc/src/commands_export.cpp | 57 ++++- toolsrc/src/commands_export_ifw.cpp | 319 ++++++++++++++++++++++++++++ toolsrc/vcpkglib/vcpkglib.vcxproj | 2 + toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 6 + 5 files changed, 390 insertions(+), 7 deletions(-) create mode 100644 toolsrc/include/vcpkg_Commands_Export_IFW.h create mode 100644 toolsrc/src/commands_export_ifw.cpp diff --git a/toolsrc/include/vcpkg_Commands_Export_IFW.h b/toolsrc/include/vcpkg_Commands_Export_IFW.h new file mode 100644 index 000000000..b25e943eb --- /dev/null +++ b/toolsrc/include/vcpkg_Commands_Export_IFW.h @@ -0,0 +1,13 @@ +#pragma once + +#include "vcpkg_Files.h" +#include "vcpkg_Dependencies.h" + +namespace vcpkg::Commands::Export::IFW +{ + fs::path export_real_package(const fs::path &raw_exported_dir_path, const Dependencies::ExportPlanAction& action, Files::Filesystem& fs); + void export_unique_packages(const fs::path &raw_exported_dir_path, std::map unique_packages, Files::Filesystem& fs); + void export_unique_triplets(const fs::path &raw_exported_dir_path, std::set unique_triplets, Files::Filesystem& fs); + void export_integration(const fs::path &raw_exported_dir_path, Files::Filesystem& fs); + void export_config(const fs::path &raw_exported_dir_path, const std::string ifw_repository_url, Files::Filesystem& fs); +} diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index b416a6f3c..139f19026 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -2,6 +2,7 @@ #include "Paragraphs.h" #include "vcpkg_Commands.h" +#include "vcpkg_Commands_Export_IFW.h" #include "vcpkg_Dependencies.h" #include "vcpkg_Input.h" #include "vcpkg_System.h" @@ -215,10 +216,12 @@ namespace vcpkg::Commands::Export static const std::string OPTION_DRY_RUN = "--dry-run"; static const std::string OPTION_RAW = "--raw"; static const std::string OPTION_NUGET = "--nuget"; + static const std::string OPTION_IFW = "--ifw"; static const std::string OPTION_ZIP = "--zip"; static const std::string OPTION_SEVEN_ZIP = "--7zip"; static const std::string OPTION_NUGET_ID = "--nuget-id"; static const std::string OPTION_NUGET_VERSION = "--nuget-version"; + static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; // input sanitization static const std::string EXAMPLE = @@ -236,22 +239,25 @@ namespace vcpkg::Commands::Export OPTION_DRY_RUN, OPTION_RAW, OPTION_NUGET, + OPTION_IFW, OPTION_ZIP, OPTION_SEVEN_ZIP, }, { OPTION_NUGET_ID, OPTION_NUGET_VERSION, + OPTION_IFW_REPOSITORY_URL, }); const bool dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); const bool raw = options.switches.find(OPTION_RAW) != options.switches.cend(); const bool nuget = options.switches.find(OPTION_NUGET) != options.switches.cend(); + const bool ifw = options.switches.find(OPTION_IFW) != options.switches.cend(); const bool zip = options.switches.find(OPTION_ZIP) != options.switches.cend(); const bool seven_zip = options.switches.find(OPTION_SEVEN_ZIP) != options.switches.cend(); - if (!raw && !nuget && !zip && !seven_zip && !dry_run) + if (!raw && !nuget && !ifw && !zip && !seven_zip && !dry_run) { - System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --zip --7zip"); + System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --ifw --zip --7zip"); System::print(EXAMPLE); Checks::exit_fail(VCPKG_LINE_INFO); } @@ -263,6 +269,10 @@ namespace vcpkg::Commands::Export Checks::check_exit( VCPKG_LINE_INFO, !maybe_nuget_version || nuget, "--nuget-version is only valid with --nuget"); + auto maybe_ifw_repository_url = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_URL); + + Checks::check_exit(VCPKG_LINE_INFO, !maybe_ifw_repository_url || ifw, "--ifw-repository-url is only valid with --ifw"); + // create the plan const StatusParagraphs status_db = database_load_check(paths); std::vector export_plan = Dependencies::create_export_plan(paths, specs, status_db); @@ -305,7 +315,11 @@ namespace vcpkg::Commands::Export Checks::exit_success(VCPKG_LINE_INFO); } - const std::string export_id = create_export_id(); + std::string export_id = create_export_id(); + if (ifw) + { + export_id = "vcpkg-export"; // TODO: Remove after debugging + } Files::Filesystem& fs = paths.get_filesystem(); const fs::path export_to_path = paths.root; @@ -315,6 +329,8 @@ namespace vcpkg::Commands::Export fs.create_directory(raw_exported_dir_path, ec); // execute the plan + std::map unique_packages; + std::set unique_triplets; for (const ExportPlanAction& action : export_plan) { if (action.plan_type != ExportPlanType::ALREADY_BUILT) @@ -327,10 +343,21 @@ namespace vcpkg::Commands::Export const BinaryParagraph& binary_paragraph = action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + + unique_packages[action.spec.name()] = &action; + unique_triplets.insert(action.spec.triplet().canonical_name()); + + fs::path spec_exported_dir_path = raw_exported_dir_path / "installed"; + if (ifw) + { + // Export real package and return data dir for installation + spec_exported_dir_path = IFW::export_real_package(raw_exported_dir_path, action, fs); + } + const InstallDir dirs = InstallDir::from_destination_root( - raw_exported_dir_path / "installed", + spec_exported_dir_path, action.spec.triplet().to_string(), - raw_exported_dir_path / "installed" / "vcpkg" / "info" / (binary_paragraph.fullstem() + ".list")); + spec_exported_dir_path / "vcpkg" / "info" / (binary_paragraph.fullstem() + ".list")); Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); System::println(System::Color::success, "Exporting package %s... done", display_name); @@ -351,13 +378,29 @@ namespace vcpkg::Commands::Export for (const fs::path& file : integration_files_relative_to_root) { const fs::path source = paths.root / file; - const fs::path destination = raw_exported_dir_path / file; + fs::path destination = raw_exported_dir_path / file; + if (ifw) + { + destination = raw_exported_dir_path / "integration" / "data" / file; + } fs.create_directories(destination.parent_path(), ec); Checks::check_exit(VCPKG_LINE_INFO, !ec); fs.copy_file(source, destination, fs::copy_options::overwrite_existing, ec); Checks::check_exit(VCPKG_LINE_INFO, !ec); } + if (ifw) + { + // Unigue packages + IFW::export_unique_packages(raw_exported_dir_path, unique_packages, fs); + // Unigue triplets + IFW::export_unique_triplets(raw_exported_dir_path, unique_triplets, fs); + // Integration + IFW::export_integration(raw_exported_dir_path, fs); + // Configuration + IFW::export_config(raw_exported_dir_path, maybe_ifw_repository_url.value_or(""), fs); + } + const auto print_next_step_info = [](const fs::path& prefix) { const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; const CMakeVariable cmake_variable = @@ -417,7 +460,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console print_next_step_info("[...]"); } - if (!raw) + if (!raw && !ifw) { fs.remove_all(raw_exported_dir_path, ec); } diff --git a/toolsrc/src/commands_export_ifw.cpp b/toolsrc/src/commands_export_ifw.cpp new file mode 100644 index 000000000..ceedac9a3 --- /dev/null +++ b/toolsrc/src/commands_export_ifw.cpp @@ -0,0 +1,319 @@ +#include "pch.h" + +#include "vcpkg_Commands_Export_IFW.h" + +namespace vcpkg::Commands::Export::IFW +{ + using Dependencies::ExportPlanAction; + + fs::path export_real_package(const fs::path &raw_exported_dir_path, const ExportPlanAction& action, Files::Filesystem& fs) + { + std::error_code ec; + + const BinaryParagraph& binary_paragraph = + action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + + // Prepare meta dir + const fs::path package_xml_file_path = raw_exported_dir_path / Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "meta" / "package.xml"; + const fs::path package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); + std::vector lines; + std::string line; std::string skip = " "; + line = ""; + lines.push_back(line); line.clear(); + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += action.spec.to_string(); + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += binary_paragraph.version; // TODO: Check IFW version format + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "2017-08-31"; // TODO: Get real package release date + line += ""; + //if (!binary_paragraph.depends.empty()) + //{ + // lines.push_back(line); line = skip; + // line += ""; + //// line += Strings::format("triplets.%s:", action.spec.triplet().canonical_name()); + // line += Strings::format("packages.%s.%s:", binary_paragraph.depends[0], action.spec.triplet().canonical_name()); + // for (size_t i = 1; i < binary_paragraph.depends.size(); ++i) + // { + // line += Strings::format(",packages.%s.%s:", binary_paragraph.depends[i], action.spec.triplet().canonical_name()); + // } + // line += ""; + //} + lines.push_back(line); line = skip; + line += ""; + line += Strings::format("packages.%s:,triplets.%s:", action.spec.name(), action.spec.triplet().canonical_name()); + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "true"; // NOTE: hide real package + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "true"; + line += ""; + lines.push_back(line); line.clear(); + line = ""; + lines.push_back(line); line.clear(); + fs.write_lines(package_xml_file_path, lines); + + // Return dir path for export package data + return raw_exported_dir_path / Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "data" / "installed"; + } + + void export_unique_packages(const fs::path &raw_exported_dir_path, std::map unique_packages, Files::Filesystem& fs) + { + std::error_code ec; + + // packages + + fs::path package_xml_file_path = raw_exported_dir_path / "packages" / "meta" / "package.xml"; + fs::path package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); + std::vector lines; + std::string line; std::string skip = " "; + line = ""; + lines.push_back(line); line.clear(); + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "Packages"; + line += ""; + lines.push_back(line); line = skip; + line = ""; + line += "1.0.0"; // TODO: Get real packages package version + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "2017-08-31"; // TODO: Get real package release date + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "true"; + line += ""; + lines.push_back(line); line.clear(); + line = ""; + lines.push_back(line); line.clear(); + fs.write_lines(package_xml_file_path, lines); + + for (auto package = unique_packages.begin(); package != unique_packages.end(); ++package) + { + const ExportPlanAction& action = *(package->second); + const BinaryParagraph& binary_paragraph = + action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + + package_xml_file_path = raw_exported_dir_path / Strings::format("packages.%s", package->first) / "meta" / "package.xml"; + package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); + lines.clear(); + line.clear(); + skip = " "; + line = ""; + lines.push_back(line); line.clear(); + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += action.spec.name(); + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += binary_paragraph.description; + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += binary_paragraph.version; // TODO: Check IFW version format + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "2017-08-31"; // TODO: Get real package release date + line += ""; + if (!binary_paragraph.depends.empty()) + { + lines.push_back(line); line = skip; + line += ""; + line += Strings::format("packages.%s:", binary_paragraph.depends[0]); + for (size_t i = 1; i < binary_paragraph.depends.size(); ++i) + { + line += Strings::format(",packages.%s:", binary_paragraph.depends[i]); + } + line += ""; + } + lines.push_back(line); line = skip; + line += ""; + line += "true"; + line += ""; + lines.push_back(line); line.clear(); + line = ""; + lines.push_back(line); line.clear(); + fs.write_lines(package_xml_file_path, lines); + } + } + + void export_unique_triplets(const fs::path &raw_exported_dir_path, std::set unique_triplets, Files::Filesystem& fs) + { + std::error_code ec; + + // triplets + + fs::path package_xml_file_path = raw_exported_dir_path / "triplets" / "meta" / "package.xml"; + fs::path package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); + std::vector lines; + std::string line; std::string skip = " "; + line = ""; + lines.push_back(line); line.clear(); + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "Triplets"; + line += ""; + lines.push_back(line); line = skip; + line = ""; + line += "1.0.0"; // TODO: Get real triplits package version + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "2017-08-31"; // TODO: Get real package release date + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "true"; + line += ""; + lines.push_back(line); line.clear(); + line = ""; + lines.push_back(line); line.clear(); + fs.write_lines(package_xml_file_path, lines); + + for (const std::string &triplet : unique_triplets) + { + package_xml_file_path = raw_exported_dir_path / Strings::format("triplets.%s", triplet) / "meta" / "package.xml"; + package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); + lines.clear(); + line.clear(); + skip = " "; + line = ""; + lines.push_back(line); line.clear(); + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += triplet; + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "1.0.0"; // TODO: Get real package version + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "2017-08-31"; // TODO: Get real package release date + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "true"; + line += ""; + lines.push_back(line); line.clear(); + line = ""; + lines.push_back(line); line.clear(); + fs.write_lines(package_xml_file_path, lines); + } + } + + void export_integration(const fs::path &raw_exported_dir_path, Files::Filesystem& fs) + { + std::error_code ec; + + // integration + fs::path package_xml_file_path = raw_exported_dir_path / "integration" / "meta" / "package.xml"; + fs::path package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); + std::vector lines; + std::string line; std::string skip = " "; + line = ""; + lines.push_back(line); line.clear(); + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "Integration"; + line += ""; + lines.push_back(line); line = skip; + line = ""; + line += "1.0.0"; // TODO: Get real integration package version + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "2017-08-31"; // TODO: Get real package release date + line += ""; + lines.push_back(line); line.clear(); + line = ""; + lines.push_back(line); line.clear(); + fs.write_lines(package_xml_file_path, lines); + } + + void export_config(const fs::path &raw_exported_dir_path, const std::string ifw_repository_url, Files::Filesystem& fs) + { + std::error_code ec; + + // config.xml + fs::path config_xml_file_path = raw_exported_dir_path / "config.xml"; + fs::path config_xml_dir_path = config_xml_file_path.parent_path(); + fs.create_directories(config_xml_dir_path, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not create directory for configuration file %s", config_xml_file_path.generic_string()); + std::vector lines; + std::string line; std::string skip = " "; + line = ""; + lines.push_back(line); line.clear(); + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "vcpkg"; + line += ""; + lines.push_back(line); line = skip; + line += ""; + line += "1.0.0"; // TODO: Get real vcpkg installer version + line += ""; + //lines.push_back(line); line = skip; + //line += "true"; + lines.push_back(line); line = skip; + line += ""; + line += "@RootDir@/src/vcpkg"; + line += ""; + if (!ifw_repository_url.empty()) + { + lines.push_back(line); line = skip; + line += ""; + lines.push_back(line); line = skip + skip; + line += ""; + lines.push_back(line); line = skip + skip + skip; + line += ""; + line += ifw_repository_url; + line += ""; + lines.push_back(line); line = skip + skip; + line += ""; + lines.push_back(line); line = skip; + line += ""; + } + lines.push_back(line); line.clear(); + line = ""; + lines.push_back(line); line.clear(); + fs.write_lines(config_xml_file_path, lines); + } +} diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index edecd7720..3f17ecb3c 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -166,6 +166,7 @@ + @@ -185,6 +186,7 @@ + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 2fbf3d929..7eb077019 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -165,6 +165,9 @@ Source Files + + Source Files + Source Files @@ -218,6 +221,9 @@ Header Files + + Header Files + Header Files -- cgit v1.2.3 From 5199507a5892ab997b1beee2f1b7d2a6c7e75115 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 21 Sep 2017 02:27:00 -0700 Subject: [vcpkg-export-ifw] Use template approach for xml instead of line-by-line --- toolsrc/src/commands_export.cpp | 18 +- toolsrc/src/commands_export_ifw.cpp | 397 ++++++++++++++---------------------- 2 files changed, 161 insertions(+), 254 deletions(-) diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index 139f19026..c143fb9c7 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -257,7 +257,8 @@ namespace vcpkg::Commands::Export if (!raw && !nuget && !ifw && !zip && !seven_zip && !dry_run) { - System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --ifw --zip --7zip"); + System::println(System::Color::error, + "Must provide at least one export type: --raw --nuget --ifw --zip --7zip"); System::print(EXAMPLE); Checks::exit_fail(VCPKG_LINE_INFO); } @@ -271,7 +272,8 @@ namespace vcpkg::Commands::Export auto maybe_ifw_repository_url = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_URL); - Checks::check_exit(VCPKG_LINE_INFO, !maybe_ifw_repository_url || ifw, "--ifw-repository-url is only valid with --ifw"); + Checks::check_exit( + VCPKG_LINE_INFO, !maybe_ifw_repository_url || ifw, "--ifw-repository-url is only valid with --ifw"); // create the plan const StatusParagraphs status_db = database_load_check(paths); @@ -354,10 +356,10 @@ namespace vcpkg::Commands::Export spec_exported_dir_path = IFW::export_real_package(raw_exported_dir_path, action, fs); } - const InstallDir dirs = InstallDir::from_destination_root( - spec_exported_dir_path, - action.spec.triplet().to_string(), - spec_exported_dir_path / "vcpkg" / "info" / (binary_paragraph.fullstem() + ".list")); + const InstallDir dirs = InstallDir::from_destination_root(spec_exported_dir_path, + action.spec.triplet().to_string(), + spec_exported_dir_path / "vcpkg" / "info" / + (binary_paragraph.fullstem() + ".list")); Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); System::println(System::Color::success, "Exporting package %s... done", display_name); @@ -391,9 +393,9 @@ namespace vcpkg::Commands::Export if (ifw) { - // Unigue packages + // Unique packages IFW::export_unique_packages(raw_exported_dir_path, unique_packages, fs); - // Unigue triplets + // Unique triplets IFW::export_unique_triplets(raw_exported_dir_path, unique_triplets, fs); // Integration IFW::export_integration(raw_exported_dir_path, fs); diff --git a/toolsrc/src/commands_export_ifw.cpp b/toolsrc/src/commands_export_ifw.cpp index ceedac9a3..4b5bdb902 100644 --- a/toolsrc/src/commands_export_ifw.cpp +++ b/toolsrc/src/commands_export_ifw.cpp @@ -6,7 +6,9 @@ namespace vcpkg::Commands::Export::IFW { using Dependencies::ExportPlanAction; - fs::path export_real_package(const fs::path &raw_exported_dir_path, const ExportPlanAction& action, Files::Filesystem& fs) + fs::path export_real_package(const fs::path& raw_exported_dir_path, + const ExportPlanAction& action, + Files::Filesystem& fs) { std::error_code ec; @@ -14,97 +16,64 @@ namespace vcpkg::Commands::Export::IFW action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; // Prepare meta dir - const fs::path package_xml_file_path = raw_exported_dir_path / Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "meta" / "package.xml"; + const fs::path package_xml_file_path = + raw_exported_dir_path / + Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "meta" / + "package.xml"; const fs::path package_xml_dir_path = package_xml_file_path.parent_path(); fs.create_directories(package_xml_dir_path, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); - std::vector lines; - std::string line; std::string skip = " "; - line = ""; - lines.push_back(line); line.clear(); - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += action.spec.to_string(); - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += binary_paragraph.version; // TODO: Check IFW version format - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "2017-08-31"; // TODO: Get real package release date - line += ""; - //if (!binary_paragraph.depends.empty()) - //{ - // lines.push_back(line); line = skip; - // line += ""; - //// line += Strings::format("triplets.%s:", action.spec.triplet().canonical_name()); - // line += Strings::format("packages.%s.%s:", binary_paragraph.depends[0], action.spec.triplet().canonical_name()); - // for (size_t i = 1; i < binary_paragraph.depends.size(); ++i) - // { - // line += Strings::format(",packages.%s.%s:", binary_paragraph.depends[i], action.spec.triplet().canonical_name()); - // } - // line += ""; - //} - lines.push_back(line); line = skip; - line += ""; - line += Strings::format("packages.%s:,triplets.%s:", action.spec.name(), action.spec.triplet().canonical_name()); - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "true"; // NOTE: hide real package - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "true"; - line += ""; - lines.push_back(line); line.clear(); - line = ""; - lines.push_back(line); line.clear(); - fs.write_lines(package_xml_file_path, lines); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + + fs.write_contents(package_xml_file_path, + Strings::format(R"###( + + + %s + %s + 2017-08-31 + packages.%s:,triplets.%s: + true + true + +)###", + action.spec.to_string(), + binary_paragraph.version, + action.spec.name(), + action.spec.triplet().canonical_name())); // Return dir path for export package data - return raw_exported_dir_path / Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "data" / "installed"; + return raw_exported_dir_path / + Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "data" / + "installed"; } - void export_unique_packages(const fs::path &raw_exported_dir_path, std::map unique_packages, Files::Filesystem& fs) - { - std::error_code ec; - + void export_unique_packages(const fs::path& raw_exported_dir_path, + std::map unique_packages, + Files::Filesystem& fs) + { + std::error_code ec; + // packages fs::path package_xml_file_path = raw_exported_dir_path / "packages" / "meta" / "package.xml"; fs::path package_xml_dir_path = package_xml_file_path.parent_path(); fs.create_directories(package_xml_dir_path, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); - std::vector lines; - std::string line; std::string skip = " "; - line = ""; - lines.push_back(line); line.clear(); - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "Packages"; - line += ""; - lines.push_back(line); line = skip; - line = ""; - line += "1.0.0"; // TODO: Get real packages package version - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "2017-08-31"; // TODO: Get real package release date - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "true"; - line += ""; - lines.push_back(line); line.clear(); - line = ""; - lines.push_back(line); line.clear(); - fs.write_lines(package_xml_file_path, lines); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + fs.write_contents(package_xml_file_path, R"###( + + + Packages + 1.0.0 + 2017-08-31 + true + +)###"); for (auto package = unique_packages.begin(); package != unique_packages.end(); ++package) { @@ -112,56 +81,41 @@ namespace vcpkg::Commands::Export::IFW const BinaryParagraph& binary_paragraph = action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; - package_xml_file_path = raw_exported_dir_path / Strings::format("packages.%s", package->first) / "meta" / "package.xml"; + package_xml_file_path = + raw_exported_dir_path / Strings::format("packages.%s", package->first) / "meta" / "package.xml"; package_xml_dir_path = package_xml_file_path.parent_path(); fs.create_directories(package_xml_dir_path, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); - lines.clear(); - line.clear(); - skip = " "; - line = ""; - lines.push_back(line); line.clear(); - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += action.spec.name(); - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += binary_paragraph.description; - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += binary_paragraph.version; // TODO: Check IFW version format - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "2017-08-31"; // TODO: Get real package release date - line += ""; - if (!binary_paragraph.depends.empty()) - { - lines.push_back(line); line = skip; - line += ""; - line += Strings::format("packages.%s:", binary_paragraph.depends[0]); - for (size_t i = 1; i < binary_paragraph.depends.size(); ++i) - { - line += Strings::format(",packages.%s:", binary_paragraph.depends[i]); - } - line += ""; - } - lines.push_back(line); line = skip; - line += ""; - line += "true"; - line += ""; - lines.push_back(line); line.clear(); - line = ""; - lines.push_back(line); line.clear(); - fs.write_lines(package_xml_file_path, lines); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + + auto deps = Strings::join( + ",", binary_paragraph.depends, [](const std::string& dep) { return "packages." + dep + ":"; }); + + if (!deps.empty()) deps = "\n " + deps; + + fs.write_contents(package_xml_file_path, + Strings::format(R"###( + + + %s + %s + %s + 2017-08-31%s + true + +)###", + action.spec.name(), + binary_paragraph.description, + binary_paragraph.version, + deps)); } } - void export_unique_triplets(const fs::path &raw_exported_dir_path, std::set unique_triplets, Files::Filesystem& fs) + void export_unique_triplets(const fs::path& raw_exported_dir_path, + std::set unique_triplets, + Files::Filesystem& fs) { std::error_code ec; @@ -170,71 +124,43 @@ namespace vcpkg::Commands::Export::IFW fs::path package_xml_file_path = raw_exported_dir_path / "triplets" / "meta" / "package.xml"; fs::path package_xml_dir_path = package_xml_file_path.parent_path(); fs.create_directories(package_xml_dir_path, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); - std::vector lines; - std::string line; std::string skip = " "; - line = ""; - lines.push_back(line); line.clear(); - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "Triplets"; - line += ""; - lines.push_back(line); line = skip; - line = ""; - line += "1.0.0"; // TODO: Get real triplits package version - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "2017-08-31"; // TODO: Get real package release date - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "true"; - line += ""; - lines.push_back(line); line.clear(); - line = ""; - lines.push_back(line); line.clear(); - fs.write_lines(package_xml_file_path, lines); - - for (const std::string &triplet : unique_triplets) + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + fs.write_contents(package_xml_file_path, R"###( + + + Triplets + 1.0.0 + 2017-08-31 + true + +)###"); + + for (const std::string& triplet : unique_triplets) { - package_xml_file_path = raw_exported_dir_path / Strings::format("triplets.%s", triplet) / "meta" / "package.xml"; + package_xml_file_path = + raw_exported_dir_path / Strings::format("triplets.%s", triplet) / "meta" / "package.xml"; package_xml_dir_path = package_xml_file_path.parent_path(); fs.create_directories(package_xml_dir_path, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); - lines.clear(); - line.clear(); - skip = " "; - line = ""; - lines.push_back(line); line.clear(); - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += triplet; - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "1.0.0"; // TODO: Get real package version - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "2017-08-31"; // TODO: Get real package release date - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "true"; - line += ""; - lines.push_back(line); line.clear(); - line = ""; - lines.push_back(line); line.clear(); - fs.write_lines(package_xml_file_path, lines); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + fs.write_contents(package_xml_file_path, Strings::format(R"###( + + + %s + 1.0.0 + 2017-08-31 + true + +)###", triplet)); } } - void export_integration(const fs::path &raw_exported_dir_path, Files::Filesystem& fs) + void export_integration(const fs::path& raw_exported_dir_path, Files::Filesystem& fs) { std::error_code ec; @@ -242,32 +168,25 @@ namespace vcpkg::Commands::Export::IFW fs::path package_xml_file_path = raw_exported_dir_path / "integration" / "meta" / "package.xml"; fs::path package_xml_dir_path = package_xml_file_path.parent_path(); fs.create_directories(package_xml_dir_path, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); - std::vector lines; - std::string line; std::string skip = " "; - line = ""; - lines.push_back(line); line.clear(); - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "Integration"; - line += ""; - lines.push_back(line); line = skip; - line = ""; - line += "1.0.0"; // TODO: Get real integration package version - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "2017-08-31"; // TODO: Get real package release date - line += ""; - lines.push_back(line); line.clear(); - line = ""; - lines.push_back(line); line.clear(); - fs.write_lines(package_xml_file_path, lines); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + + fs.write_contents(package_xml_file_path, R"###( + + + Integration + 1.0.0 + 2017-08-31 + true + +)###"); } - void export_config(const fs::path &raw_exported_dir_path, const std::string ifw_repository_url, Files::Filesystem& fs) + void export_config(const fs::path& raw_exported_dir_path, + const std::string ifw_repository_url, + Files::Filesystem& fs) { std::error_code ec; @@ -275,45 +194,31 @@ namespace vcpkg::Commands::Export::IFW fs::path config_xml_file_path = raw_exported_dir_path / "config.xml"; fs::path config_xml_dir_path = config_xml_file_path.parent_path(); fs.create_directories(config_xml_dir_path, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not create directory for configuration file %s", config_xml_file_path.generic_string()); - std::vector lines; - std::string line; std::string skip = " "; - line = ""; - lines.push_back(line); line.clear(); - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "vcpkg"; - line += ""; - lines.push_back(line); line = skip; - line += ""; - line += "1.0.0"; // TODO: Get real vcpkg installer version - line += ""; - //lines.push_back(line); line = skip; - //line += "true"; - lines.push_back(line); line = skip; - line += ""; - line += "@RootDir@/src/vcpkg"; - line += ""; + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for configuration file %s", + config_xml_file_path.generic_string()); + std::string formatted_repo_url; if (!ifw_repository_url.empty()) { - lines.push_back(line); line = skip; - line += ""; - lines.push_back(line); line = skip + skip; - line += ""; - lines.push_back(line); line = skip + skip + skip; - line += ""; - line += ifw_repository_url; - line += ""; - lines.push_back(line); line = skip + skip; - line += ""; - lines.push_back(line); line = skip; - line += ""; + formatted_repo_url = Strings::format(R"###( + + + %s + + +)###", + formatted_repo_url); } - lines.push_back(line); line.clear(); - line = ""; - lines.push_back(line); line.clear(); - fs.write_lines(config_xml_file_path, lines); + + fs.write_contents(config_xml_file_path, Strings::format(R"###( + + + vcpkg + 1.0.0 + 2017-08-31 + @RootDir@/src/vcpkg%s + +)###", formatted_repo_url)); } } -- cgit v1.2.3 From 68b9c2d8b9119acb48643447a7561a5c2b733d25 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Fri, 22 Sep 2017 02:16:14 +0300 Subject: [vcpkg-export-ifw] Separate IFW loop Separate IFW loop compatible with main export loop Fixed mistakes in templates Set current date to ReleaseDate tag --- toolsrc/include/vcpkg_Commands_Export.h | 14 ++ toolsrc/include/vcpkg_Commands_Export_IFW.h | 13 +- toolsrc/src/commands_export.cpp | 253 ++++++++++++++-------------- toolsrc/src/commands_export_ifw.cpp | 183 +++++++++++++++----- toolsrc/vcpkglib/vcpkglib.vcxproj | 1 + toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 3 + 6 files changed, 294 insertions(+), 173 deletions(-) create mode 100644 toolsrc/include/vcpkg_Commands_Export.h diff --git a/toolsrc/include/vcpkg_Commands_Export.h b/toolsrc/include/vcpkg_Commands_Export.h new file mode 100644 index 000000000..31003422d --- /dev/null +++ b/toolsrc/include/vcpkg_Commands_Export.h @@ -0,0 +1,14 @@ +#pragma once + +#include "StatusParagraphs.h" +#include "VcpkgCmdArguments.h" +#include "VcpkgPaths.h" +#include "VersionT.h" +#include "vcpkg_Build.h" +#include "vcpkg_Dependencies.h" +#include + +namespace vcpkg::Commands::Export +{ + void export_integration_files(const fs::path &raw_exported_dir_path, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg_Commands_Export_IFW.h b/toolsrc/include/vcpkg_Commands_Export_IFW.h index b25e943eb..881bbaf63 100644 --- a/toolsrc/include/vcpkg_Commands_Export_IFW.h +++ b/toolsrc/include/vcpkg_Commands_Export_IFW.h @@ -5,9 +5,12 @@ namespace vcpkg::Commands::Export::IFW { - fs::path export_real_package(const fs::path &raw_exported_dir_path, const Dependencies::ExportPlanAction& action, Files::Filesystem& fs); - void export_unique_packages(const fs::path &raw_exported_dir_path, std::map unique_packages, Files::Filesystem& fs); - void export_unique_triplets(const fs::path &raw_exported_dir_path, std::set unique_triplets, Files::Filesystem& fs); - void export_integration(const fs::path &raw_exported_dir_path, Files::Filesystem& fs); - void export_config(const fs::path &raw_exported_dir_path, const std::string ifw_repository_url, Files::Filesystem& fs); + struct Options + { + Optional maybe_repository_url; + Optional maybe_packages_dir_path; + Optional maybe_config_file_path; + }; + + void do_export(const std::vector &export_plan, const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths); } diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index c143fb9c7..6632dfe67 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -211,6 +211,32 @@ namespace vcpkg::Commands::Export return nullopt; } + void export_integration_files(const fs::path &raw_exported_dir_path, const VcpkgPaths& paths) + { + const std::vector integration_files_relative_to_root = { + { ".vcpkg-root" }, + { fs::path{ "scripts" } / "buildsystems" / "msbuild" / "applocal.ps1" }, + { fs::path{ "scripts" } / "buildsystems" / "msbuild" / "vcpkg.targets" }, + { fs::path{ "scripts" } / "buildsystems" / "vcpkg.cmake" }, + { fs::path{ "scripts" } / "cmake" / "vcpkg_get_windows_sdk.cmake" }, + { fs::path{ "scripts" } / "getWindowsSDK.ps1" }, + { fs::path{ "scripts" } / "getProgramFilesPlatformBitness.ps1" }, + { fs::path{ "scripts" } / "getProgramFiles32bit.ps1" }, + }; + + for (const fs::path& file : integration_files_relative_to_root) + { + const fs::path source = paths.root / file; + fs::path destination = raw_exported_dir_path / file; + Files::Filesystem& fs = paths.get_filesystem(); + std::error_code ec; + fs.create_directories(destination.parent_path(), ec); + Checks::check_exit(VCPKG_LINE_INFO, !ec); + fs.copy_file(source, destination, fs::copy_options::overwrite_existing, ec); + Checks::check_exit(VCPKG_LINE_INFO, !ec); + } + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { static const std::string OPTION_DRY_RUN = "--dry-run"; @@ -222,6 +248,8 @@ namespace vcpkg::Commands::Export static const std::string OPTION_NUGET_ID = "--nuget-id"; static const std::string OPTION_NUGET_VERSION = "--nuget-version"; static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; + static const std::string OPTION_IFW_PACKAGES_DIR_PATH = "--ifw-packages-directory-path"; + static const std::string OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path"; // input sanitization static const std::string EXAMPLE = @@ -247,6 +275,8 @@ namespace vcpkg::Commands::Export OPTION_NUGET_ID, OPTION_NUGET_VERSION, OPTION_IFW_REPOSITORY_URL, + OPTION_IFW_PACKAGES_DIR_PATH, + OPTION_IFW_CONFIG_FILE_PATH }); const bool dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); const bool raw = options.switches.find(OPTION_RAW) != options.switches.cend(); @@ -270,10 +300,19 @@ namespace vcpkg::Commands::Export Checks::check_exit( VCPKG_LINE_INFO, !maybe_nuget_version || nuget, "--nuget-version is only valid with --nuget"); - auto maybe_ifw_repository_url = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_URL); + IFW::Options ifw_options; + + ifw_options.maybe_repository_url = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_URL); + Checks::check_exit( + VCPKG_LINE_INFO, !ifw_options.maybe_repository_url || ifw, "--ifw-repository-url is only valid with --ifw"); + + ifw_options.maybe_packages_dir_path = maybe_lookup(options.settings, OPTION_IFW_PACKAGES_DIR_PATH); + Checks::check_exit( + VCPKG_LINE_INFO, !ifw_options.maybe_packages_dir_path || ifw, "--ifw-packages-directory-path is only valid with --ifw"); + ifw_options.maybe_config_file_path = maybe_lookup(options.settings, OPTION_IFW_CONFIG_FILE_PATH); Checks::check_exit( - VCPKG_LINE_INFO, !maybe_ifw_repository_url || ifw, "--ifw-repository-url is only valid with --ifw"); + VCPKG_LINE_INFO, !ifw_options.maybe_config_file_path || ifw, "--ifw-configuration-file-path is only valid with --ifw"); // create the plan const StatusParagraphs status_db = database_load_check(paths); @@ -318,153 +357,117 @@ namespace vcpkg::Commands::Export } std::string export_id = create_export_id(); - if (ifw) - { - export_id = "vcpkg-export"; // TODO: Remove after debugging - } - 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; - std::error_code ec; - fs.remove_all(raw_exported_dir_path, ec); - fs.create_directory(raw_exported_dir_path, ec); + const auto print_next_step_info = [](const fs::path& prefix) { + const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; + const CMakeVariable cmake_variable = + CMakeVariable(L"CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); + System::println("\n" + "To use the exported libraries in CMake projects use:" + "\n" + " %s" + "\n", + Strings::to_utf8(cmake_variable.s)); + }; - // execute the plan - std::map unique_packages; - std::set unique_triplets; - for (const ExportPlanAction& action : export_plan) + // Main loop + if (raw || nuget || zip || seven_zip) { - if (action.plan_type != ExportPlanType::ALREADY_BUILT) + 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; + std::error_code ec; + fs.remove_all(raw_exported_dir_path, ec); + fs.create_directory(raw_exported_dir_path, ec); + + // execute the plan + for (const ExportPlanAction& action : export_plan) { - Checks::unreachable(VCPKG_LINE_INFO); - } + if (action.plan_type != ExportPlanType::ALREADY_BUILT) + { + Checks::unreachable(VCPKG_LINE_INFO); + } - const std::string display_name = action.spec.to_string(); - System::println("Exporting package %s... ", display_name); + const std::string display_name = action.spec.to_string(); + System::println("Exporting package %s... ", display_name); - const BinaryParagraph& binary_paragraph = - action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + const BinaryParagraph& binary_paragraph = + action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; - unique_packages[action.spec.name()] = &action; - unique_triplets.insert(action.spec.triplet().canonical_name()); + const InstallDir dirs = InstallDir::from_destination_root( + raw_exported_dir_path / "installed", + action.spec.triplet().to_string(), + raw_exported_dir_path / "installed" / "vcpkg" / "info" / (binary_paragraph.fullstem() + ".list")); - fs::path spec_exported_dir_path = raw_exported_dir_path / "installed"; - if (ifw) - { - // Export real package and return data dir for installation - spec_exported_dir_path = IFW::export_real_package(raw_exported_dir_path, action, fs); + Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); + System::println(System::Color::success, "Exporting package %s... done", display_name); } - const InstallDir dirs = InstallDir::from_destination_root(spec_exported_dir_path, - action.spec.triplet().to_string(), - spec_exported_dir_path / "vcpkg" / "info" / - (binary_paragraph.fullstem() + ".list")); - - Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); - System::println(System::Color::success, "Exporting package %s... done", display_name); - } - - // Copy files needed for integration - const std::vector integration_files_relative_to_root = { - {".vcpkg-root"}, - {fs::path{"scripts"} / "buildsystems" / "msbuild" / "applocal.ps1"}, - {fs::path{"scripts"} / "buildsystems" / "msbuild" / "vcpkg.targets"}, - {fs::path{"scripts"} / "buildsystems" / "vcpkg.cmake"}, - {fs::path{"scripts"} / "cmake" / "vcpkg_get_windows_sdk.cmake"}, - {fs::path{"scripts"} / "getWindowsSDK.ps1"}, - {fs::path{"scripts"} / "getProgramFilesPlatformBitness.ps1"}, - {fs::path{"scripts"} / "getProgramFiles32bit.ps1"}, - }; + // Copy files needed for integration + export_integration_files(raw_exported_dir_path, paths); - for (const fs::path& file : integration_files_relative_to_root) - { - const fs::path source = paths.root / file; - fs::path destination = raw_exported_dir_path / file; - if (ifw) + if (raw) { - destination = raw_exported_dir_path / "integration" / "data" / file; + System::println( + System::Color::success, R"(Files exported at: "%s")", raw_exported_dir_path.generic_string()); + print_next_step_info(export_to_path); } - fs.create_directories(destination.parent_path(), ec); - Checks::check_exit(VCPKG_LINE_INFO, !ec); - fs.copy_file(source, destination, fs::copy_options::overwrite_existing, ec); - Checks::check_exit(VCPKG_LINE_INFO, !ec); - } - if (ifw) - { - // Unique packages - IFW::export_unique_packages(raw_exported_dir_path, unique_packages, fs); - // Unique triplets - IFW::export_unique_triplets(raw_exported_dir_path, unique_triplets, fs); - // Integration - IFW::export_integration(raw_exported_dir_path, fs); - // Configuration - IFW::export_config(raw_exported_dir_path, maybe_ifw_repository_url.value_or(""), fs); - } - - const auto print_next_step_info = [](const fs::path& prefix) { - const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; - const CMakeVariable cmake_variable = - CMakeVariable(L"CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); - System::println("\n" - "To use the exported libraries in CMake projects use:" - "\n" - " %s" - "\n", - Strings::to_utf8(cmake_variable.s)); - }; - - if (raw) - { - System::println( - System::Color::success, R"(Files exported at: "%s")", raw_exported_dir_path.generic_string()); - print_next_step_info(export_to_path); - } - - if (nuget) - { - System::println("Creating nuget package... "); + if (nuget) + { + System::println("Creating nuget package... "); - const std::string nuget_id = maybe_nuget_id.value_or(raw_exported_dir_path.filename().string()); - const std::string nuget_version = maybe_nuget_version.value_or("1.0.0"); - const fs::path output_path = - do_nuget_export(paths, nuget_id, nuget_version, raw_exported_dir_path, export_to_path); - System::println(System::Color::success, "Creating nuget package... done"); - System::println(System::Color::success, "NuGet package exported at: %s", output_path.generic_string()); + const std::string nuget_id = maybe_nuget_id.value_or(raw_exported_dir_path.filename().string()); + const std::string nuget_version = maybe_nuget_version.value_or("1.0.0"); + const fs::path output_path = + do_nuget_export(paths, nuget_id, nuget_version, raw_exported_dir_path, export_to_path); + System::println(System::Color::success, "Creating nuget package... done"); + System::println(System::Color::success, "NuGet package exported at: %s", output_path.generic_string()); - System::println(R"( + System::println(R"( With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: Install-Package %s -Source "%s" )" - "\n", - nuget_id, - output_path.parent_path().u8string()); - } + "\n", + nuget_id, + output_path.parent_path().u8string()); + } - if (zip) - { - System::println("Creating zip archive... "); - const fs::path output_path = - do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::ZIP); - System::println(System::Color::success, "Creating zip archive... done"); - System::println(System::Color::success, "Zip archive exported at: %s", output_path.generic_string()); - print_next_step_info("[...]"); - } + if (zip) + { + System::println("Creating zip archive... "); + const fs::path output_path = + do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::ZIP); + System::println(System::Color::success, "Creating zip archive... done"); + System::println(System::Color::success, "Zip archive exported at: %s", output_path.generic_string()); + print_next_step_info("[...]"); + } - if (seven_zip) - { - System::println("Creating 7zip archive... "); - const fs::path output_path = - do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::SEVEN_ZIP); - System::println(System::Color::success, "Creating 7zip archive... done"); - System::println(System::Color::success, "7zip archive exported at: %s", output_path.generic_string()); - print_next_step_info("[...]"); + if (seven_zip) + { + System::println("Creating 7zip archive... "); + const fs::path output_path = + do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::SEVEN_ZIP); + System::println(System::Color::success, "Creating 7zip archive... done"); + System::println(System::Color::success, "7zip archive exported at: %s", output_path.generic_string()); + print_next_step_info("[...]"); + } + + if (!raw) + { + fs.remove_all(raw_exported_dir_path, ec); + } } - if (!raw && !ifw) + // IFW loop + if (ifw) { - fs.remove_all(raw_exported_dir_path, ec); + IFW::do_export(export_plan, export_id, ifw_options, paths); + + // TODO: Download corrected QtIFW tools and automate installer creation + System::println("Use corrected QtIFW tools (for more info see: https://codereview.qt-project.org/#/c/203958) to create installer..."); + + print_next_step_info("[...]"); } Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/commands_export_ifw.cpp b/toolsrc/src/commands_export_ifw.cpp index 4b5bdb902..e2499b75d 100644 --- a/toolsrc/src/commands_export_ifw.cpp +++ b/toolsrc/src/commands_export_ifw.cpp @@ -1,10 +1,30 @@ #include "pch.h" +#include "vcpkg_Commands.h" +#include "vcpkg_Commands_Export.h" #include "vcpkg_Commands_Export_IFW.h" namespace vcpkg::Commands::Export::IFW { using Dependencies::ExportPlanAction; + using Dependencies::ExportPlanType; + using Install::InstallDir; + + static std::string create_release_date() + { + const tm date_time = System::get_current_date_time(); + + // Format is: YYYY-mm-dd + // 10 characters + 1 null terminating character will be written for a total of 11 chars + char mbstr[11]; + const size_t bytes_written = std::strftime(mbstr, sizeof(mbstr), "%Y-%m-%d", &date_time); + Checks::check_exit(VCPKG_LINE_INFO, + bytes_written == 10, + "Expected 10 bytes to be written, but %u were written", + bytes_written); + const std::string date_time_as_string(mbstr); + return date_time_as_string; + } fs::path export_real_package(const fs::path& raw_exported_dir_path, const ExportPlanAction& action, @@ -28,19 +48,19 @@ namespace vcpkg::Commands::Export::IFW package_xml_file_path.generic_string()); fs.write_contents(package_xml_file_path, - Strings::format(R"###( - + Strings::format( +R"###( %s %s - 2017-08-31 - packages.%s:,triplets.%s: + %s + packages.%s:,triplets.%s: true - true )###", action.spec.to_string(), binary_paragraph.version, + create_release_date(), action.spec.name(), action.spec.triplet().canonical_name())); @@ -65,15 +85,15 @@ namespace vcpkg::Commands::Export::IFW !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); - fs.write_contents(package_xml_file_path, R"###( - + fs.write_contents(package_xml_file_path, Strings::format( +R"###( Packages 1.0.0 - 2017-08-31 - true + %s -)###"); +)###", + create_release_date())); for (auto package = unique_packages.begin(); package != unique_packages.end(); ++package) { @@ -93,22 +113,22 @@ namespace vcpkg::Commands::Export::IFW auto deps = Strings::join( ",", binary_paragraph.depends, [](const std::string& dep) { return "packages." + dep + ":"; }); - if (!deps.empty()) deps = "\n " + deps; + if (!deps.empty()) deps = "\n " + deps + ""; fs.write_contents(package_xml_file_path, - Strings::format(R"###( - + Strings::format( +R"###( %s %s %s - 2017-08-31%s - true + %s%s )###", action.spec.name(), binary_paragraph.description, binary_paragraph.version, + create_release_date(), deps)); } } @@ -128,15 +148,15 @@ namespace vcpkg::Commands::Export::IFW !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); - fs.write_contents(package_xml_file_path, R"###( - + fs.write_contents(package_xml_file_path, Strings::format( +R"###( Triplets 1.0.0 - 2017-08-31 - true + %s -)###"); +)###", + create_release_date())); for (const std::string& triplet : unique_triplets) { @@ -148,15 +168,16 @@ namespace vcpkg::Commands::Export::IFW !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); - fs.write_contents(package_xml_file_path, Strings::format(R"###( - + fs.write_contents(package_xml_file_path, Strings::format( +R"###( %s 1.0.0 - 2017-08-31 - true + %s -)###", triplet)); +)###", + triplet, + create_release_date())); } } @@ -173,52 +194,128 @@ namespace vcpkg::Commands::Export::IFW "Could not create directory for package file %s", package_xml_file_path.generic_string()); - fs.write_contents(package_xml_file_path, R"###( - + fs.write_contents(package_xml_file_path, Strings::format( +R"###( Integration 1.0.0 - 2017-08-31 - true + %s -)###"); +)###", + create_release_date())); } - void export_config(const fs::path& raw_exported_dir_path, - const std::string ifw_repository_url, - Files::Filesystem& fs) + void export_config(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) { std::error_code ec; + Files::Filesystem& fs = paths.get_filesystem(); + + const fs::path config_xml_file_path = ifw_options.maybe_config_file_path.has_value() ? + fs::path(ifw_options.maybe_config_file_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-configuration") / "config.xml"; - // config.xml - fs::path config_xml_file_path = raw_exported_dir_path / "config.xml"; fs::path config_xml_dir_path = config_xml_file_path.parent_path(); fs.create_directories(config_xml_dir_path, ec); Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not create directory for configuration file %s", config_xml_file_path.generic_string()); + std::string formatted_repo_url; - if (!ifw_repository_url.empty()) + std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); + if (!ifw_repo_url.empty()) { formatted_repo_url = Strings::format(R"###( %s - -)###", - formatted_repo_url); + )###", + ifw_repo_url); } - fs.write_contents(config_xml_file_path, Strings::format(R"###( - + fs.write_contents(config_xml_file_path, Strings::format( +R"###( vcpkg 1.0.0 - 2017-08-31 @RootDir@/src/vcpkg%s -)###", formatted_repo_url)); +)###", + formatted_repo_url)); + + System::println("Created ifw configuration file: %s", config_xml_file_path.generic_string()); + } + + void do_export(const std::vector &export_plan, const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + { + System::println("Creating ifw packages... "); + + std::error_code ec; + Files::Filesystem& fs = paths.get_filesystem(); + + const fs::path ifw_packages_dir_path = ifw_options.maybe_packages_dir_path.has_value() ? + fs::path(ifw_options.maybe_packages_dir_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-packages"); + + fs.remove_all(ifw_packages_dir_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not remove outdated packages directory %s", + ifw_packages_dir_path.generic_string()); + + fs.create_directory(ifw_packages_dir_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create packages directory %s", + ifw_packages_dir_path.generic_string()); + + // execute the plan + std::map unique_packages; + std::set unique_triplets; + for (const ExportPlanAction& action : export_plan) + { + if (action.plan_type != ExportPlanType::ALREADY_BUILT) + { + Checks::unreachable(VCPKG_LINE_INFO); + } + + const std::string display_name = action.spec.to_string(); + System::println("Exporting package %s... ", display_name); + + const BinaryParagraph& binary_paragraph = + action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + + unique_packages[action.spec.name()] = &action; + unique_triplets.insert(action.spec.triplet().canonical_name()); + + // Export real package and return data dir for installation + fs::path ifw_package_dir_path = export_real_package(ifw_packages_dir_path, action, fs); + + // Copy package data + const InstallDir dirs = InstallDir::from_destination_root(ifw_package_dir_path, + action.spec.triplet().to_string(), + ifw_package_dir_path / "vcpkg" / "info" / + (binary_paragraph.fullstem() + ".list")); + + Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); + System::println(System::Color::success, "Exporting package %s... done", display_name); + } + + // Unique packages + export_unique_packages(ifw_packages_dir_path, unique_packages, fs); + + // Unique triplets + export_unique_triplets(ifw_packages_dir_path, unique_triplets, fs); + + // Copy files needed for integration + export_integration_files(ifw_packages_dir_path / "integration" / "data", paths); + // Integration + export_integration(ifw_packages_dir_path, fs); + + System::println("Created ifw packages directory: %s", ifw_packages_dir_path.generic_string()); + + // Configuration + export_config(export_id, ifw_options, paths); } } diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 3f17ecb3c..7c5537e15 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -166,6 +166,7 @@ + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 7eb077019..cc82198ee 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -221,6 +221,9 @@ Header Files + + Header Files + Header Files -- cgit v1.2.3 From c6149fae2f9f33d9ed363650aee6aea642574b0a Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Wed, 27 Sep 2017 02:57:51 +0300 Subject: [vcpkg-export-ifw] Usage QtIFW tools Download and use tools to make repository and installer --- scripts/fetchDependency.ps1 | 11 +++ toolsrc/include/VcpkgPaths.h | 6 ++ toolsrc/include/vcpkg_Commands_Export_IFW.h | 2 + toolsrc/src/VcpkgPaths.cpp | 40 ++++++++ toolsrc/src/commands_export.cpp | 19 +++- toolsrc/src/commands_export_ifw.cpp | 145 +++++++++++++++++++++++----- 6 files changed, 193 insertions(+), 30 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 2a23002a4..25447c19b 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -137,6 +137,17 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $extractionType = $ExtractionType_ZIP $extractionFolder = "$downloadsDir\MinGit-2.14.1-32-bit" } + elseif($Dependency -eq "installerbase") + { + $requiredVersion = "3.1.81" + $downloadVersion = "3.1.81" + $url = "https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip" + $downloadPath = "$downloadsDir\QtInstallerFramework-win-x86.zip" + $expectedDownloadedFileHash = "f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8" + $executableFromDownload = "$downloadsDir\QtInstallerFramework-win-x86\bin\installerbase.exe" + $extractionType = $ExtractionType_ZIP + $extractionFolder = $downloadsDir + } else { throw "Unknown program requested" diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h index d55c95fe1..e7893ba15 100644 --- a/toolsrc/include/VcpkgPaths.h +++ b/toolsrc/include/VcpkgPaths.h @@ -57,6 +57,9 @@ namespace vcpkg const fs::path& get_cmake_exe() const; const fs::path& get_git_exe() const; const fs::path& get_nuget_exe() const; + const fs::path& get_ifw_installerbase_exe() const; + const fs::path& get_ifw_binarycreator_exe() const; + const fs::path& get_ifw_repogen_exe() const; /// Retrieve a toolset matching a VS version /// @@ -70,6 +73,9 @@ namespace vcpkg Lazy cmake_exe; Lazy git_exe; Lazy nuget_exe; + Lazy ifw_installerbase_exe; + Lazy ifw_binarycreator_exe; + Lazy ifw_repogen_exe; Lazy> toolsets; }; } diff --git a/toolsrc/include/vcpkg_Commands_Export_IFW.h b/toolsrc/include/vcpkg_Commands_Export_IFW.h index 881bbaf63..c066ca021 100644 --- a/toolsrc/include/vcpkg_Commands_Export_IFW.h +++ b/toolsrc/include/vcpkg_Commands_Export_IFW.h @@ -9,7 +9,9 @@ namespace vcpkg::Commands::Export::IFW { Optional maybe_repository_url; Optional maybe_packages_dir_path; + Optional maybe_repository_dir_path; Optional maybe_config_file_path; + Optional maybe_installer_file_path; }; void do_export(const std::vector &export_plan, const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths); diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 02e238b3f..89435cd38 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -164,6 +164,31 @@ namespace vcpkg return fetch_dependency(scripts_folder, L"git", downloaded_copy, EXPECTED_VERSION); } + static fs::path get_ifw_installerbase_path(const fs::path& downloads_folder, const fs::path& scripts_folder) + { + static constexpr std::array EXPECTED_VERSION = { 3, 1, 81 }; + static const std::wstring VERSION_CHECK_ARGUMENTS = L"--framework-version"; + + const fs::path downloaded_copy = downloads_folder / "QtInstallerFramework-win-x86" / "bin" / "installerbase.exe"; + + std::vector candidate_paths; + candidate_paths.push_back(downloaded_copy); + // TODO: Uncomment later + //const std::vector from_path = Files::find_from_PATH(L"installerbase"); + //candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + //candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe"); + //candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / "QtIFW-3.1.0" / "bin" / "installerbase.exe"); + + const Optional path = + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); + if (const auto p = path.get()) + { + return *p; + } + + return fetch_dependency(scripts_folder, L"installerbase", downloaded_copy, EXPECTED_VERSION); + } + Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir) { std::error_code ec; @@ -247,6 +272,21 @@ namespace vcpkg return this->nuget_exe.get_lazy([this]() { return get_nuget_path(this->downloads, this->scripts); }); } + const fs::path& VcpkgPaths::get_ifw_installerbase_exe() const + { + return this->ifw_installerbase_exe.get_lazy([this]() { return get_ifw_installerbase_path(this->downloads, this->scripts); }); + } + + const fs::path& VcpkgPaths::get_ifw_binarycreator_exe() const + { + return this->ifw_binarycreator_exe.get_lazy([this]() { return get_ifw_installerbase_exe().parent_path() / "binarycreator.exe"; }); + } + + const fs::path& VcpkgPaths::get_ifw_repogen_exe() const + { + return this->ifw_repogen_exe.get_lazy([this]() { return get_ifw_installerbase_exe().parent_path() / "repogen.exe"; }); + } + static std::vector get_vs2017_installation_instances(const VcpkgPaths& paths) { const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index 6632dfe67..3662a46d8 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -249,7 +249,9 @@ namespace vcpkg::Commands::Export static const std::string OPTION_NUGET_VERSION = "--nuget-version"; static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; static const std::string OPTION_IFW_PACKAGES_DIR_PATH = "--ifw-packages-directory-path"; + static const std::string OPTION_IFW_REPOSITORY_DIR_PATH = "--ifw-repository-directory-path"; static const std::string OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path"; + static const std::string OPTION_IFW_INSTALLER_FILE_PATH = "--ifw-installer-file-path"; // input sanitization static const std::string EXAMPLE = @@ -276,7 +278,9 @@ namespace vcpkg::Commands::Export OPTION_NUGET_VERSION, OPTION_IFW_REPOSITORY_URL, OPTION_IFW_PACKAGES_DIR_PATH, - OPTION_IFW_CONFIG_FILE_PATH + OPTION_IFW_REPOSITORY_DIR_PATH, + OPTION_IFW_CONFIG_FILE_PATH, + OPTION_IFW_INSTALLER_FILE_PATH }); const bool dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); const bool raw = options.switches.find(OPTION_RAW) != options.switches.cend(); @@ -310,10 +314,18 @@ namespace vcpkg::Commands::Export Checks::check_exit( VCPKG_LINE_INFO, !ifw_options.maybe_packages_dir_path || ifw, "--ifw-packages-directory-path is only valid with --ifw"); + ifw_options.maybe_repository_dir_path = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_DIR_PATH); + Checks::check_exit( + VCPKG_LINE_INFO, !ifw_options.maybe_repository_dir_path || ifw, "--ifw-repository-directory-path is only valid with --ifw"); + ifw_options.maybe_config_file_path = maybe_lookup(options.settings, OPTION_IFW_CONFIG_FILE_PATH); Checks::check_exit( VCPKG_LINE_INFO, !ifw_options.maybe_config_file_path || ifw, "--ifw-configuration-file-path is only valid with --ifw"); + ifw_options.maybe_installer_file_path = maybe_lookup(options.settings, OPTION_IFW_INSTALLER_FILE_PATH); + Checks::check_exit( + VCPKG_LINE_INFO, !ifw_options.maybe_installer_file_path || ifw, "--ifw-installer-file-path is only valid with --ifw"); + // create the plan const StatusParagraphs status_db = database_load_check(paths); std::vector export_plan = Dependencies::create_export_plan(paths, specs, status_db); @@ -464,10 +476,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console { IFW::do_export(export_plan, export_id, ifw_options, paths); - // TODO: Download corrected QtIFW tools and automate installer creation - System::println("Use corrected QtIFW tools (for more info see: https://codereview.qt-project.org/#/c/203958) to create installer..."); - - print_next_step_info("[...]"); + print_next_step_info("@RootDir@/src/vcpkg"); } Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/commands_export_ifw.cpp b/toolsrc/src/commands_export_ifw.cpp index e2499b75d..d1428f5d1 100644 --- a/toolsrc/src/commands_export_ifw.cpp +++ b/toolsrc/src/commands_export_ifw.cpp @@ -26,7 +26,35 @@ namespace vcpkg::Commands::Export::IFW return date_time_as_string; } - fs::path export_real_package(const fs::path& raw_exported_dir_path, + fs::path get_packages_dir_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + { + return ifw_options.maybe_packages_dir_path.has_value() ? + fs::path(ifw_options.maybe_packages_dir_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-packages"); + } + + fs::path get_repository_dir_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + { + return ifw_options.maybe_packages_dir_path.has_value() ? + fs::path(ifw_options.maybe_repository_dir_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-repository"); + } + + fs::path get_config_file_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + { + return ifw_options.maybe_config_file_path.has_value() ? + fs::path(ifw_options.maybe_config_file_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-configuration.xml"); + } + + fs::path get_installer_file_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + { + return ifw_options.maybe_config_file_path.has_value() ? + fs::path(ifw_options.maybe_installer_file_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-installer.exe"); + } + + fs::path export_real_package(const fs::path& ifw_packages_dir_path, const ExportPlanAction& action, Files::Filesystem& fs) { @@ -37,7 +65,7 @@ namespace vcpkg::Commands::Export::IFW // Prepare meta dir const fs::path package_xml_file_path = - raw_exported_dir_path / + ifw_packages_dir_path / Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "meta" / "package.xml"; const fs::path package_xml_dir_path = package_xml_file_path.parent_path(); @@ -47,6 +75,11 @@ namespace vcpkg::Commands::Export::IFW "Could not create directory for package file %s", package_xml_file_path.generic_string()); + auto deps = Strings::join( + ",", binary_paragraph.depends, [](const std::string& dep) { return "packages." + dep + ":"; }); + + if (!deps.empty()) deps = "\n " + deps + ""; + fs.write_contents(package_xml_file_path, Strings::format( R"###( @@ -54,7 +87,7 @@ R"###( %s %s %s - packages.%s:,triplets.%s: + packages.%s:,triplets.%s:%s true )###", @@ -62,10 +95,11 @@ R"###( binary_paragraph.version, create_release_date(), action.spec.name(), - action.spec.triplet().canonical_name())); + action.spec.triplet().canonical_name(), + deps)); // Return dir path for export package data - return raw_exported_dir_path / + return ifw_packages_dir_path / Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "data" / "installed"; } @@ -110,11 +144,6 @@ R"###( "Could not create directory for package file %s", package_xml_file_path.generic_string()); - auto deps = Strings::join( - ",", binary_paragraph.depends, [](const std::string& dep) { return "packages." + dep + ":"; }); - - if (!deps.empty()) deps = "\n " + deps + ""; - fs.write_contents(package_xml_file_path, Strings::format( R"###( @@ -122,14 +151,13 @@ R"###( %s %s %s - %s%s + %s )###", action.spec.name(), binary_paragraph.description, binary_paragraph.version, - create_release_date(), - deps)); + create_release_date())); } } @@ -210,9 +238,7 @@ R"###( std::error_code ec; Files::Filesystem& fs = paths.get_filesystem(); - const fs::path config_xml_file_path = ifw_options.maybe_config_file_path.has_value() ? - fs::path(ifw_options.maybe_config_file_path.value_or_exit(VCPKG_LINE_INFO)) - : paths.root / (export_id + "-ifw-configuration") / "config.xml"; + const fs::path config_xml_file_path = get_config_file_path(export_id, ifw_options, paths); fs::path config_xml_dir_path = config_xml_file_path.parent_path(); fs.create_directories(config_xml_dir_path, ec); @@ -243,21 +269,76 @@ R"###( )###", formatted_repo_url)); + } + + void do_repository(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + { + const fs::path& repogen_exe = paths.get_ifw_repogen_exe(); + const fs::path packages_dir = get_packages_dir_path(export_id, ifw_options, paths); + const fs::path repository_dir = get_repository_dir_path(export_id, ifw_options, paths); + + System::println("Generating repository %s...", repository_dir.generic_string()); - System::println("Created ifw configuration file: %s", config_xml_file_path.generic_string()); + const std::wstring cmd_line = + Strings::wformat(LR"("%s" --packages "%s" "%s" > nul)", + repogen_exe.native(), + packages_dir.native(), + repository_dir.native()); + + const int exit_code = System::cmd_execute_clean(cmd_line); + Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: IFW repository generating failed"); + + System::println(System::Color::success, "Generating repository %s... done.", repository_dir.generic_string()); + } + + void do_installer(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + { + const fs::path& binarycreator_exe = paths.get_ifw_binarycreator_exe(); + const fs::path config_file = get_config_file_path(export_id, ifw_options, paths); + const fs::path packages_dir = get_packages_dir_path(export_id, ifw_options, paths); + const fs::path repository_dir = get_repository_dir_path(export_id, ifw_options, paths); + const fs::path installer_file = get_installer_file_path(export_id, ifw_options, paths); + + System::println("Generating installer %s...", installer_file.generic_string()); + + std::wstring cmd_line; + + std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); + if (!ifw_repo_url.empty()) + { + cmd_line = + Strings::wformat(LR"("%s" --online-only --config "%s" --repository "%s" "%s" > nul)", + binarycreator_exe.native(), + config_file.native(), + repository_dir.native(), + installer_file.native()); + } + else + { + cmd_line = + Strings::wformat(LR"("%s" --config "%s" --packages "%s" "%s" > nul)", + binarycreator_exe.native(), + config_file.native(), + packages_dir.native(), + installer_file.native()); + } + + const int exit_code = System::cmd_execute_clean(cmd_line); + Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: IFW installer generating failed"); + + System::println(System::Color::success, "Generating installer %s... done.", installer_file.generic_string()); } void do_export(const std::vector &export_plan, const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) { - System::println("Creating ifw packages... "); + const fs::path ifw_packages_dir_path = get_packages_dir_path(export_id, ifw_options, paths); + const fs::path config_file = get_config_file_path(export_id, ifw_options, paths); + + System::println("Exporting packages %s... ", ifw_packages_dir_path.generic_string()); std::error_code ec; Files::Filesystem& fs = paths.get_filesystem(); - const fs::path ifw_packages_dir_path = ifw_options.maybe_packages_dir_path.has_value() ? - fs::path(ifw_options.maybe_packages_dir_path.value_or_exit(VCPKG_LINE_INFO)) - : paths.root / (export_id + "-ifw-packages"); - fs.remove_all(ifw_packages_dir_path, ec); Checks::check_exit(VCPKG_LINE_INFO, !ec, @@ -299,9 +380,13 @@ R"###( (binary_paragraph.fullstem() + ".list")); Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); - System::println(System::Color::success, "Exporting package %s... done", display_name); + System::println("Exporting package %s... done", display_name); } + System::println("Exporting packages %s... done", ifw_packages_dir_path.generic_string()); + + System::println("Generating configuration %s...", config_file.generic_string()); + // Unique packages export_unique_packages(ifw_packages_dir_path, unique_packages, fs); @@ -313,9 +398,19 @@ R"###( // Integration export_integration(ifw_packages_dir_path, fs); - System::println("Created ifw packages directory: %s", ifw_packages_dir_path.generic_string()); - // Configuration export_config(export_id, ifw_options, paths); + + System::println("Generating configuration %s... done.", config_file.generic_string()); + + // Do repository (optional) + std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); + if (!ifw_repo_url.empty()) + { + do_repository(export_id, ifw_options, paths); + } + + // Do installer + do_installer(export_id, ifw_options, paths); } } -- cgit v1.2.3 From d25fd5c7b3b0f21581dd9c44a915c9156683877a Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Thu, 28 Sep 2017 01:00:40 +0300 Subject: [vcpkg-export-ifw] Some improvements Improvements: - fix typos; - remove outdated repository directory. --- toolsrc/src/commands_export_ifw.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/commands_export_ifw.cpp b/toolsrc/src/commands_export_ifw.cpp index d1428f5d1..a0692c11e 100644 --- a/toolsrc/src/commands_export_ifw.cpp +++ b/toolsrc/src/commands_export_ifw.cpp @@ -35,7 +35,7 @@ namespace vcpkg::Commands::Export::IFW fs::path get_repository_dir_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) { - return ifw_options.maybe_packages_dir_path.has_value() ? + return ifw_options.maybe_repository_dir_path.has_value() ? fs::path(ifw_options.maybe_repository_dir_path.value_or_exit(VCPKG_LINE_INFO)) : paths.root / (export_id + "-ifw-repository"); } @@ -49,7 +49,7 @@ namespace vcpkg::Commands::Export::IFW fs::path get_installer_file_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) { - return ifw_options.maybe_config_file_path.has_value() ? + return ifw_options.maybe_installer_file_path.has_value() ? fs::path(ifw_options.maybe_installer_file_path.value_or_exit(VCPKG_LINE_INFO)) : paths.root / (export_id + "-ifw-installer.exe"); } @@ -279,6 +279,15 @@ R"###( System::println("Generating repository %s...", repository_dir.generic_string()); + std::error_code ec; + Files::Filesystem& fs = paths.get_filesystem(); + + fs.remove_all(repository_dir, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not remove outdated repository directory %s", + repository_dir.generic_string()); + const std::wstring cmd_line = Strings::wformat(LR"("%s" --packages "%s" "%s" > nul)", repogen_exe.native(), -- cgit v1.2.3 From eca068e4c5673b888d6470b42d6b5b44b21c4007 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 27 Sep 2017 17:22:40 -0700 Subject: Extract function for duplicated code --- toolsrc/src/VcpkgPaths.cpp | 51 ++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 02e238b3f..00f4691cd 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -269,10 +269,29 @@ namespace vcpkg return nullopt; } - static std::vector find_toolset_instances(const VcpkgPaths& paths) + static std::vector detect_supported_architectures(const Files::Filesystem& fs, + const fs::path& vcvarsall_dir) { using CPU = System::CPUArchitecture; + std::vector supported_architectures; + + if (fs.exists(vcvarsall_dir / "vcvars32.bat")) supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); + if (fs.exists(vcvarsall_dir / "vcvars64.bat")) + supported_architectures.push_back({L"amd64", CPU::X64, CPU::X64}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) + supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) + supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) + supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) + supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + + return supported_architectures; + } + static std::vector find_toolset_instances(const VcpkgPaths& paths) + { const auto& fs = paths.get_filesystem(); const std::vector vs2017_installation_instances = get_vs2017_installation_instances(paths); @@ -294,19 +313,8 @@ namespace vcpkg paths_examined.push_back(vs2015_dumpbin_exe); const fs::path vs2015_bin_dir = vs2015_vcvarsall_bat.parent_path() / "bin"; - std::vector supported_architectures; - if (fs.exists(vs2015_bin_dir / "vcvars32.bat")) - supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); - if (fs.exists(vs2015_bin_dir / "amd64\\vcvars64.bat")) - supported_architectures.push_back({L"x64", CPU::X64, CPU::X64}); - if (fs.exists(vs2015_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) - supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); - if (fs.exists(vs2015_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) - supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); - if (fs.exists(vs2015_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) - supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); - if (fs.exists(vs2015_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) - supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + const std::vector supported_architectures = + detect_supported_architectures(fs, vs2015_bin_dir); if (fs.exists(vs2015_dumpbin_exe)) { @@ -329,19 +337,8 @@ namespace vcpkg if (!fs.exists(vcvarsall_bat)) continue; // Get all supported architectures - std::vector supported_architectures; - if (fs.exists(vcvarsall_dir / "vcvars32.bat")) - supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); - if (fs.exists(vcvarsall_dir / "vcvars64.bat")) - supported_architectures.push_back({L"amd64", CPU::X64, CPU::X64}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) - supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) - supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) - supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) - supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + const std::vector supported_architectures = + detect_supported_architectures(fs, vcvarsall_dir); // Locate the "best" MSVC toolchain version const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; -- cgit v1.2.3 From 712491c8223616803220b7f8b807ecb5a3e64ece Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 27 Sep 2017 17:48:51 -0700 Subject: Place line closer to usage --- toolsrc/src/VcpkgPaths.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 00f4691cd..b831b6f46 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -294,7 +294,6 @@ namespace vcpkg { const auto& fs = paths.get_filesystem(); - const std::vector vs2017_installation_instances = get_vs2017_installation_instances(paths); // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations. std::vector paths_examined; @@ -324,6 +323,8 @@ namespace vcpkg } } + const std::vector vs2017_installation_instances = get_vs2017_installation_instances(paths); + // VS2017 Optional vs2017_toolset; for (const std::string& instance : vs2017_installation_instances) -- cgit v1.2.3 From 493d94e2964b3c52d285d90c066d26157441b2dc Mon Sep 17 00:00:00 2001 From: "Stephen E. Baker" Date: Wed, 27 Sep 2017 21:24:38 -0400 Subject: Dynamically link lua.dll to lua.exe For lua.exe to load C modules which are linked against lua, it must itself be linked against lua, otherwise loading the module fails. --- ports/lua/CMakeLists.txt | 5 +++-- ports/lua/CONTROL | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/lua/CMakeLists.txt b/ports/lua/CMakeLists.txt index faef8018b..fc2e27e08 100644 --- a/ports/lua/CMakeLists.txt +++ b/ports/lua/CMakeLists.txt @@ -56,9 +56,10 @@ INSTALL ( TARGETS lua IF (NOT DEFINED SKIP_INSTALL_TOOLS) ADD_EXECUTABLE ( luac src/luac.c ${SRC_LIBLUA} ) # compiler - ADD_EXECUTABLE ( luai src/lua.c ${SRC_LIBLUA} ) # interpreter + ADD_EXECUTABLE ( luai src/lua.c ) # interpreter + TARGET_LINK_LIBRARIES ( luai lua ) SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai ) - INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools ) + INSTALL ( TARGETS luai luac lua RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools ) ENDIF () IF (NOT DEFINED SKIP_INSTALL_HEADERS) diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL index e34436ad0..cf49dafe5 100644 --- a/ports/lua/CONTROL +++ b/ports/lua/CONTROL @@ -1,3 +1,3 @@ Source: lua -Version: 5.3.4-1 +Version: 5.3.4-2 Description: a powerful, fast, lightweight, embeddable scripting language -- cgit v1.2.3 From f617a711ec4c3d5527911c32340238053901269d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 27 Sep 2017 18:41:28 -0700 Subject: Fix: Don't break before finding all VS2017 instances --- toolsrc/src/VcpkgPaths.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index b831b6f46..8ce4df3df 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -364,7 +364,6 @@ namespace vcpkg if (const auto value = vs2017_toolset.get()) { found_toolsets.push_back(*value); - break; } } -- cgit v1.2.3 From 0ccea4f3677d92a20935e03c2cb301d8300b43d1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 27 Sep 2017 18:55:09 -0700 Subject: [Toolset selection] Use VS2017 vcvarsall for v140 if available --- toolsrc/include/VcpkgPaths.h | 2 ++ toolsrc/src/VcpkgPaths.cpp | 59 +++++++++++++++++++++++++++++++++++++++----- toolsrc/src/vcpkg_Build.cpp | 7 +++++- 3 files changed, 61 insertions(+), 7 deletions(-) diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h index d55c95fe1..3c1955204 100644 --- a/toolsrc/include/VcpkgPaths.h +++ b/toolsrc/include/VcpkgPaths.h @@ -19,6 +19,7 @@ namespace vcpkg { fs::path dumpbin; fs::path vcvarsall; + std::vector vcvarsall_options; CWStringView version; std::vector supported_architectures; }; @@ -71,5 +72,6 @@ namespace vcpkg Lazy git_exe; Lazy nuget_exe; Lazy> toolsets; + Lazy> toolsets_vs2017_v140; }; } diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 8ce4df3df..8892207bd 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -10,6 +10,10 @@ namespace vcpkg { + // Intentionally wstring so we can easily use operator== with CWStringView. + static const std::wstring V_140 = L"v140"; + static const std::wstring V_141 = L"v141"; + static bool exists_and_has_equal_or_greater_version(const std::wstring& version_cmd, const std::array& expected_version) { @@ -318,7 +322,7 @@ namespace vcpkg if (fs.exists(vs2015_dumpbin_exe)) { found_toolsets.push_back( - {vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140", supported_architectures}); + {vs2015_dumpbin_exe, vs2015_vcvarsall_bat, {}, V_140, supported_architectures}); } } } @@ -357,7 +361,7 @@ namespace vcpkg paths_examined.push_back(dumpbin_path); if (fs.exists(dumpbin_path)) { - vs2017_toolset = Toolset{dumpbin_path, vcvarsall_bat, L"v141", supported_architectures}; + vs2017_toolset = Toolset{dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}; break; } } @@ -381,20 +385,63 @@ namespace vcpkg return found_toolsets; } + static std::vector create_vs2017_v140_toolset_instances(const std::vector& vs_toolsets) + { + std::vector vs2017_v140_toolsets; + + // In constrast to v141 and above, there can only be a single instance of v140 (VS2017 vs VS2015). + const auto it = Util::find_if(vs_toolsets, [&](const Toolset& t) { return t.version == V_140; }); + + // If v140 is not available, then VS2017 cant use them. Return empty. + if (it == vs_toolsets.cend()) + { + return vs2017_v140_toolsets; + } + + // If it does exist, then create a matching v140 toolset for each v141 toolset + const Toolset v140_toolset = *it; + for (const Toolset& toolset : vs_toolsets) + { + if (toolset.version != V_141) + { + continue; + } + + Toolset t = Toolset{ + toolset.dumpbin, toolset.vcvarsall, {L"-vcvars_ver=14.0"}, V_140, toolset.supported_architectures}; + vs2017_v140_toolsets.push_back(std::move(t)); + } + + return vs2017_v140_toolsets; + } + const Toolset& VcpkgPaths::get_toolset(const std::string& toolset_version) const { + const std::wstring& w_toolset_version = Strings::to_utf16(toolset_version); + // Invariant: toolsets are non-empty and sorted with newest at back() - const auto& vs_toolsets = this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); }); + const std::vector& vs_toolsets = + this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); }); - if (toolset_version.empty()) + if (w_toolset_version.empty()) { return vs_toolsets.back(); } - const auto toolset = Util::find_if( - vs_toolsets, [&](const Toolset& t) { return toolset_version == Strings::to_utf8(t.version); }); + const auto toolset = + Util::find_if(vs_toolsets, [&](const Toolset& t) { return w_toolset_version == t.version; }); Checks::check_exit( VCPKG_LINE_INFO, toolset != vs_toolsets.end(), "Could not find toolset '%s'", toolset_version); + + // If v140 is the selected toolset and VS2017 is available, then use VS2017's vcvarsall with the + // -vcvars_ver=14.0 option + const std::vector& vs2017_v140_toolsets = this->toolsets_vs2017_v140.get_lazy( + [&vs_toolsets]() { return create_vs2017_v140_toolset_instances(vs_toolsets); }); + if (w_toolset_version == V_140 && !vs2017_v140_toolsets.empty()) + { + return vs2017_v140_toolsets.back(); + } + return *toolset; } diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index d40140aca..5ac13c6c6 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -67,7 +67,12 @@ namespace vcpkg::Build const auto arch = to_vcvarsall_toolchain(pre_build_info.target_architecture, toolset); const auto target = to_vcvarsall_target(pre_build_info.cmake_system_name); - return Strings::wformat(LR"("%s" %s %s %s 2>&1)", toolset.vcvarsall.native(), arch, target, tonull); + return Strings::wformat(LR"("%s" %s %s %s %s 2>&1)", + toolset.vcvarsall.native(), + Strings::join(L" ", toolset.vcvarsall_options), + arch, + target, + tonull); } static void create_binary_feature_control_file(const SourceParagraph& source_paragraph, -- cgit v1.2.3 From c9573312516172f095046e2fe7e9a1ae3a2631b8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 28 Sep 2017 11:38:37 -0700 Subject: [abseil] Initial commit. Highly experimental. --- ports/abseil/CMakeLists.txt | 77 +++++++++++++++++++++++++++++++++++++++++++ ports/abseil/CONTROL | 6 ++++ ports/abseil/fix-intrin.patch | 12 +++++++ ports/abseil/portfile.cmake | 37 +++++++++++++++++++++ 4 files changed, 132 insertions(+) create mode 100644 ports/abseil/CMakeLists.txt create mode 100644 ports/abseil/CONTROL create mode 100644 ports/abseil/fix-intrin.patch create mode 100644 ports/abseil/portfile.cmake diff --git a/ports/abseil/CMakeLists.txt b/ports/abseil/CMakeLists.txt new file mode 100644 index 000000000..34b69817a --- /dev/null +++ b/ports/abseil/CMakeLists.txt @@ -0,0 +1,77 @@ +cmake_minimum_required(VERSION 3.8) +project(abseil CXX) + +add_definitions(-DNOMINMAX) + +set(CMAKE_DEBUG_POSTFIX d) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + +option(INSTALL_HEADERS "Install header files" ON) + +function(add_sublibrary LIB) + file(GLOB_RECURSE SOURCES "absl/${LIB}/*.cc") + list(FILTER SOURCES EXCLUDE REGEX "_test") + file(GLOB HEADERS "absl/${LIB}/*.h") + file(GLOB INTERNAL_HEADERS "absl/${LIB}/internal/*.h") + + if(SOURCES) + add_library(${LIB} ${SOURCES}) + 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) + install(FILES ${HEADERS} DESTINATION "include/absl/${LIB}") + endif() + if(INTERNAL_HEADERS) + install(FILES ${INTERNAL_HEADERS} DESTINATION "include/absl/${LIB}/internal") + 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(base) +add_sublibrary(meta) +add_sublibrary(algorithm) +add_sublibrary(container) +add_sublibrary(memory) +add_sublibrary(strings) +add_sublibrary(debugging) +add_sublibrary(numeric) +add_sublibrary(types) +add_sublibrary(utility) + +target_link_public_libraries(algorithm base meta) +target_link_public_libraries(container algorithm base memory) +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) + +install( + EXPORT unofficial-abseil-targets + FILE unofficial-abseil-config.cmake + NAMESPACE unofficial::abseil:: + DESTINATION share/unofficial-abseil +) \ No newline at end of file diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL new file mode 100644 index 000000000..fb37a8cae --- /dev/null +++ b/ports/abseil/CONTROL @@ -0,0 +1,6 @@ +Source: abseil +Version: 2017-09-28 +Description: an open-source collection designed to augment the C++ standard library. + Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. + In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. + Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole. diff --git a/ports/abseil/fix-intrin.patch b/ports/abseil/fix-intrin.patch new file mode 100644 index 000000000..285adde0f --- /dev/null +++ b/ports/abseil/fix-intrin.patch @@ -0,0 +1,12 @@ +diff --git a/absl/base/optimization.h b/absl/base/optimization.h +index db8beaf..aaaffa4 100644 +--- a/absl/base/optimization.h ++++ b/absl/base/optimization.h +@@ -46,6 +46,7 @@ + // GCC will not tail call given inline volatile assembly. + #define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __asm__ __volatile__("") + #elif defined(_MSC_VER) ++#include + // The __nop() intrinsic blocks the optimisation. + #define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __nop() + #else diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake new file mode 100644 index 000000000..8f9096cbf --- /dev/null +++ b/ports/abseil/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "Abseil currently only supports being built for desktop") +endif() + +message("NOTE: THIS PORT IS USING AN UNOFFICIAL BUILDSYSTEM AND THE EXACT BINARY LAYOUT WILL CHANGE IN THE FUTURE.") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO abseil/abseil-cpp + REF cdf20caa491f59c0a35a8d8fbec0d948e4bc7e4c + SHA512 04889e7804b644821d0bf5d1b13f15a072e748bf0465442c64528e014c71f415544e9146c9518f9fe7bb14a295b18f293c3f7b672f6a51dba9909f3b74667fae + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-intrin.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-abseil) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/abseil ${CURRENT_PACKAGES_DIR}/share/unofficial-abseil) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/abseil RENAME copyright) -- cgit v1.2.3 From 9f9b4bc5c85755af8eb5c2f74bec1d3b840eb781 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 28 Sep 2017 11:42:36 -0700 Subject: [abseil] Improve warning messages. --- ports/abseil/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 8f9096cbf..8c9e81aa3 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -4,7 +4,8 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "Abseil currently only supports being built for desktop") endif() -message("NOTE: THIS PORT IS USING AN UNOFFICIAL BUILDSYSTEM AND THE EXACT BINARY LAYOUT WILL CHANGE IN THE FUTURE.") +message("NOTE: THIS PORT IS USING AN UNOFFICIAL BUILDSYSTEM. THE BINARY LAYOUT AND CMAKE INTEGRATION WILL CHANGE IN THE FUTURE.") +message("To use from cmake:\n find_package(unofficial-abseil REQUIRED)\n link_libraries(unofficial::abseil::strings)") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH -- cgit v1.2.3 From 450cb8591a5023f762b4b928cb36ca632d0fe7b3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 28 Sep 2017 19:39:11 -0700 Subject: Revert "Extract function for duplicated code" This reverts commit eca068e4c5673b888d6470b42d6b5b44b21c4007. --- toolsrc/src/VcpkgPaths.cpp | 51 ++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 8892207bd..4634a87c0 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -273,29 +273,10 @@ namespace vcpkg return nullopt; } - static std::vector detect_supported_architectures(const Files::Filesystem& fs, - const fs::path& vcvarsall_dir) + static std::vector find_toolset_instances(const VcpkgPaths& paths) { using CPU = System::CPUArchitecture; - std::vector supported_architectures; - - if (fs.exists(vcvarsall_dir / "vcvars32.bat")) supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); - if (fs.exists(vcvarsall_dir / "vcvars64.bat")) - supported_architectures.push_back({L"amd64", CPU::X64, CPU::X64}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) - supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) - supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) - supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) - supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); - - return supported_architectures; - } - static std::vector find_toolset_instances(const VcpkgPaths& paths) - { const auto& fs = paths.get_filesystem(); // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations. @@ -316,8 +297,19 @@ namespace vcpkg paths_examined.push_back(vs2015_dumpbin_exe); const fs::path vs2015_bin_dir = vs2015_vcvarsall_bat.parent_path() / "bin"; - const std::vector supported_architectures = - detect_supported_architectures(fs, vs2015_bin_dir); + std::vector supported_architectures; + if (fs.exists(vs2015_bin_dir / "vcvars32.bat")) + supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); + if (fs.exists(vs2015_bin_dir / "amd64\\vcvars64.bat")) + supported_architectures.push_back({L"x64", CPU::X64, CPU::X64}); + if (fs.exists(vs2015_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) + supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); + if (fs.exists(vs2015_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) + supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); + if (fs.exists(vs2015_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) + supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); + if (fs.exists(vs2015_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) + supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); if (fs.exists(vs2015_dumpbin_exe)) { @@ -342,8 +334,19 @@ namespace vcpkg if (!fs.exists(vcvarsall_bat)) continue; // Get all supported architectures - const std::vector supported_architectures = - detect_supported_architectures(fs, vcvarsall_dir); + std::vector supported_architectures; + if (fs.exists(vcvarsall_dir / "vcvars32.bat")) + supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); + if (fs.exists(vcvarsall_dir / "vcvars64.bat")) + supported_architectures.push_back({L"amd64", CPU::X64, CPU::X64}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) + supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) + supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) + supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) + supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); // Locate the "best" MSVC toolchain version const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; -- cgit v1.2.3 From 3035c780b29f88ef177413924921f5adff688fde Mon Sep 17 00:00:00 2001 From: jasjuang Date: Thu, 28 Sep 2017 21:34:08 -0700 Subject: update to 1.2.4 and fix cmake exports --- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 41 ++++++++++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index 251e7bdf9..a36263e7a 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,3 +1,3 @@ Source: aws-sdk-cpp -Version: 1.0.61-1 +Version: 1.2.4 Description: AWS SDK for C++ diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 3a8f9b464..4e0e8bdfe 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -1,11 +1,12 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aws-sdk-cpp-1.0.61) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/aws/aws-sdk-cpp/archive/1.0.61.tar.gz" - FILENAME "aws-sdk-cpp-1.0.61.tar.gz" - SHA512 75f3570d8e8c08624b69d8254e156829030a36a7c4aa4b783d895e7c209b2a46b6b9ce822e6d9e9f649b171cf64988f0ad18ce0a55eb39c50d68a7880568078a + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aws/aws-sdk-cpp + REF 1.2.4 + SHA512 dc96e40fe72e4b115607245f536cd13414e33a8f754153fd137f1391af14b9793fc8a07f9f984490e0783e385c2c7b9a421878b63ea793012f53fefe7ec4d368 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} @@ -30,6 +31,34 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +file(GLOB CMAKE_FILES ${CURRENT_PACKAGES_DIR}/lib/cmake/*) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) + +file(COPY ${CMAKE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share) + +vcpkg_copy_pdbs() + +file(GLOB AWS_TARGETS "${CURRENT_PACKAGES_DIR}/share/aws-cpp-sdk-*/aws-cpp-sdk-*targets.cmake") +foreach(AWS_TARGETS ${AWS_TARGETS}) + file(READ ${AWS_TARGETS} _contents) + string(REGEX REPLACE + "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + _contents "${_contents}") + file(WRITE ${AWS_TARGETS} "${_contents}") +endforeach() + +file(GLOB AWS_TARGETS_RELEASE "${CURRENT_PACKAGES_DIR}/share/aws-cpp-sdk-*/aws-cpp-sdk-*targets-release.cmake") +foreach(AWS_TARGETS_RELEASE ${AWS_TARGETS_RELEASE}) + file(READ ${AWS_TARGETS_RELEASE} _contents) + string(REGEX REPLACE + "bin\\/([A-Za-z0-9_.-]+lib)" + "lib/\\1" + _contents "${_contents}") + file(WRITE ${AWS_TARGETS_RELEASE} "${_contents}") +endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/lib/cmake -- cgit v1.2.3 From fcbb90b9a4e06b7c09925c4826f8c46794de3564 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 29 Sep 2017 17:45:41 -0700 Subject: Add winsock2 as a port --- ports/winsock2/CONTROL | 3 +++ ports/winsock2/portfile.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 ports/winsock2/CONTROL create mode 100644 ports/winsock2/portfile.cmake diff --git a/ports/winsock2/CONTROL b/ports/winsock2/CONTROL new file mode 100644 index 000000000..4b56e50bf --- /dev/null +++ b/ports/winsock2/CONTROL @@ -0,0 +1,3 @@ +Source: winsock2 +Version: 0.0 +Description: Windows Sockets. \ No newline at end of file diff --git a/ports/winsock2/portfile.cmake b/ports/winsock2/portfile.cmake new file mode 100644 index 000000000..81fd38992 --- /dev/null +++ b/ports/winsock2/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) +vcpkg_get_windows_sdk(WINDOWS_SDK) + +if (WINDOWS_SDK MATCHES "10.") + set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib") + set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf") + set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") +elseif(WINDOWS_SDK MATCHES "8.") + set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib") + set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um") +else() + message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") +endif() + +if (NOT EXISTS "${LIBFILEPATH}") + message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}") +endif() + +file(MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/include + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug/lib + ${CURRENT_PACKAGES_DIR}/share/winsock2 +) + +file(COPY + "${HEADERSPATH}\\Winsock2.h" + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +if (DEFINED LICENSEPATH) + file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/winsock2) + file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See the accompanying sdk_license.rtf") +else() + file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") +endif() \ No newline at end of file -- cgit v1.2.3 From 901014edfce6b7c73f44daad835d8acab85af686 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 29 Sep 2017 17:51:24 -0700 Subject: Add wincrypt as a port --- ports/wincrypt/CONTROL | 3 +++ ports/wincrypt/portfile.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 ports/wincrypt/CONTROL create mode 100644 ports/wincrypt/portfile.cmake diff --git a/ports/wincrypt/CONTROL b/ports/wincrypt/CONTROL new file mode 100644 index 000000000..78803229c --- /dev/null +++ b/ports/wincrypt/CONTROL @@ -0,0 +1,3 @@ +Source: wincrypt +Version: 0.0 +Description: Windows Cryptography. \ No newline at end of file diff --git a/ports/wincrypt/portfile.cmake b/ports/wincrypt/portfile.cmake new file mode 100644 index 000000000..8ded1cdc4 --- /dev/null +++ b/ports/wincrypt/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) +vcpkg_get_windows_sdk(WINDOWS_SDK) + +if (WINDOWS_SDK MATCHES "10.") + set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib") + set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf") + set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") +elseif(WINDOWS_SDK MATCHES "8.") + set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib") + set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um") +else() + message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") +endif() + +if (NOT EXISTS "${LIBFILEPATH}") + message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}") +endif() + +file(MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/include + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug/lib + ${CURRENT_PACKAGES_DIR}/share/wincrypt +) + +file(COPY + "${HEADERSPATH}\\Wincrypt.h" + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +if (DEFINED LICENSEPATH) + file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/wincrypt) + file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See the accompanying sdk_license.rtf") +else() + file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") +endif() \ No newline at end of file -- cgit v1.2.3 From 9569e69b7cd1e2a1ba36edd0c8ca52544d470d17 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 29 Sep 2017 18:02:20 -0700 Subject: [opengl] Rename portfile variable --- ports/opengl/portfile.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/opengl/portfile.cmake b/ports/opengl/portfile.cmake index 2af9e6e3b..36622393b 100644 --- a/ports/opengl/portfile.cmake +++ b/ports/opengl/portfile.cmake @@ -4,18 +4,18 @@ vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) vcpkg_get_windows_sdk(WINDOWS_SDK) if (WINDOWS_SDK MATCHES "10.") - set(OPENGLPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") + set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf") set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") elseif(WINDOWS_SDK MATCHES "8.") - set(OPENGLPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") + set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um") else() message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") endif() -if (NOT EXISTS "${OPENGLPATH}") - message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${OPENGLPATH}") +if (NOT EXISTS "${LIBFILEPATH}") + message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}") endif() file(MAKE_DIRECTORY @@ -30,8 +30,8 @@ file(COPY "${HEADERSPATH}\\gl\\GLU.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/gl ) -file(COPY ${OPENGLPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${OPENGLPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) if (DEFINED LICENSEPATH) file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/opengl) -- cgit v1.2.3 From 911581200694946463226a873034848efa0bdb58 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sat, 30 Sep 2017 15:43:10 -0700 Subject: new port: exiv2 --- ports/exiv2/CONTROL | 4 ++++ ports/exiv2/portfile.cmake | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 ports/exiv2/CONTROL create mode 100644 ports/exiv2/portfile.cmake diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL new file mode 100644 index 000000000..eb21c9898 --- /dev/null +++ b/ports/exiv2/CONTROL @@ -0,0 +1,4 @@ +Source: exiv2 +Version: 327b3f6c4de4ffda82818367fc870640d2ae8820 +Build-Depends:zlib +Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake new file mode 100644 index 000000000..d5ed9a625 --- /dev/null +++ b/ports/exiv2/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Exiv2/exiv2 + REF 327b3f6c4de4ffda82818367fc870640d2ae8820 + SHA512 a7b2eb812bbbf30a6f2b0e76284d81e10b4d4e30adf7cc45efe6d9b8f59f2338497c94540199bcec62bef3f27cd79f9ce43ddf345f6b718ceb1d900d7479158c + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +# Clean +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/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(COPY ${SOURCE_PATH}/ABOUT-NLS DESTINATION ${CURRENT_PACKAGES_DIR}/share/exiv2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/exiv2/ABOUT-NLS ${CURRENT_PACKAGES_DIR}/share/exiv2/copyright) -- cgit v1.2.3 From d75b20ba3cea5ed4da15212446f88d463853b2ae Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sun, 1 Oct 2017 13:37:14 -0400 Subject: Add a port for spirit-po - It's header-only, so this makes installation easy --- ports/spirit-po/CONTROL | 4 ++++ ports/spirit-po/portfile.cmake | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 ports/spirit-po/CONTROL create mode 100644 ports/spirit-po/portfile.cmake diff --git a/ports/spirit-po/CONTROL b/ports/spirit-po/CONTROL new file mode 100644 index 000000000..0ad8fb8a3 --- /dev/null +++ b/ports/spirit-po/CONTROL @@ -0,0 +1,4 @@ +Source: spirit-po +Version: 1.1.2 +Description: A header-obly C++ library for localization using GNU gettext po files, based on Boost.Spirit. +Build-Depends: boost diff --git a/ports/spirit-po/portfile.cmake b/ports/spirit-po/portfile.cmake new file mode 100644 index 000000000..3fa1cb23b --- /dev/null +++ b/ports/spirit-po/portfile.cmake @@ -0,0 +1,16 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/spirit-po-1.1.2) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/cbeck88/spirit-po/archive/v1.1.2.zip" + FILENAME "spirit-po-1.1.2.zip" + SHA512 8a33126c199765b91e832c64e546f240d532858e051b217189778ad01ef584c67f0f4b2f9674cb7b4a877ec2a2b21b5eda35dc24a12da8eb7a7990bf63a4a774 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(INSTALL ${SOURCE_PATH}/include/spirit_po + DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# spirit-po is header-only, so no vcpkg_{configure,install}_cmake + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spirit-po RENAME copyright) -- cgit v1.2.3 From 99a7b186a018e260150f089218ef52073e0393de Mon Sep 17 00:00:00 2001 From: Jesse Talavera-Greenberg Date: Sun, 1 Oct 2017 13:38:12 -0400 Subject: Crap --- ports/spirit-po/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/spirit-po/CONTROL b/ports/spirit-po/CONTROL index 0ad8fb8a3..b9857cea0 100644 --- a/ports/spirit-po/CONTROL +++ b/ports/spirit-po/CONTROL @@ -1,4 +1,4 @@ Source: spirit-po Version: 1.1.2 -Description: A header-obly C++ library for localization using GNU gettext po files, based on Boost.Spirit. +Description: A header-only C++ library for localization using GNU gettext po files, based on Boost.Spirit. Build-Depends: boost -- cgit v1.2.3 From 3af00c8a1e598a38b3376c4dbd96aa10ff766fb8 Mon Sep 17 00:00:00 2001 From: Amin Cheloh Date: Mon, 2 Oct 2017 00:45:00 +0700 Subject: [vcpkg-docs] Update CONTROL file Build-Depends change qualifier from brackets to parentheses. see #1582 --- docs/maintainers/control-files.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/maintainers/control-files.md b/docs/maintainers/control-files.md index e446fe6fa..17cb50311 100644 --- a/docs/maintainers/control-files.md +++ b/docs/maintainers/control-files.md @@ -42,10 +42,10 @@ Unlike dpkg, Vcpkg does not distinguish between build-only dependencies and runt *For example: websocketpp is a header only library, and thus does not require any dependencies at install time. However, downstream users need boost and openssl to make use of the library. Therefore, websocketpp lists boost and openssl as dependencies* -Dependencies can be filtered based on the target triplet to support different requirements on Windows Desktop versus the Universal Windows Platform. Currently, the string inside brackets is substring-compared against the triplet name. __This will change in a future version to not depend on the triplet name.__ +Dependencies can be filtered based on the target triplet to support different requirements on Windows Desktop versus the Universal Windows Platform. Currently, the string inside parentheses is substring-compared against the triplet name. __This will change in a future version to not depend on the triplet name.__ Example: ```no-highlight -Build-Depends: zlib [windows], openssl [windows], boost [windows], websocketpp [windows] +Build-Depends: zlib (windows), openssl (windows), boost (windows), websocketpp (windows) ``` -- cgit v1.2.3 From 53d5076f64daa08c18802fda1b7bf8e100109103 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 1 Oct 2017 13:04:10 -0700 Subject: size_t instead of int --- toolsrc/src/tests_package_spec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/tests_package_spec.cpp b/toolsrc/src/tests_package_spec.cpp index fa201b372..a6b9d5b13 100644 --- a/toolsrc/src/tests_package_spec.cpp +++ b/toolsrc/src/tests_package_spec.cpp @@ -43,7 +43,7 @@ namespace UnitTest1 std::array features = {"", "0", "1", "", "2", "3"}; std::array specs = {&a_spec, &a_spec, &a_spec, &b_spec, &b_spec, &b_spec}; - for (int i = 0; i < features.size(); ++i) + for (size_t i = 0; i < features.size(); ++i) { Assert::AreEqual(features[i], fspecs[i].feature().c_str()); Assert::AreEqual(*specs[i], fspecs[i].spec()); -- cgit v1.2.3 From 2de9f83ff22774d0f70e3ee8158b26c494f5ea30 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 1 Oct 2017 13:22:29 -0700 Subject: Introduce Strings::case_insensitive_ascii_starts_with(); --- toolsrc/include/vcpkg_Strings.h | 2 ++ toolsrc/src/vcpkg_Strings.cpp | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h index 61f6fab61..c44ce2b99 100644 --- a/toolsrc/include/vcpkg_Strings.h +++ b/toolsrc/include/vcpkg_Strings.h @@ -65,6 +65,8 @@ namespace vcpkg::Strings std::string ascii_to_lowercase(const std::string& input); + bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern); + template std::basic_string join(const CharType* delimiter, const Container& v, Transformer transformer) { diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 5ad951399..1bd96fc12 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -110,6 +110,11 @@ namespace vcpkg::Strings return output; } + bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern) + { + return _strnicmp(s.c_str(), pattern.c_str(), pattern.size()) == 0; + } + void trim(std::string* s) { s->erase(std::find_if_not(s->rbegin(), s->rend(), details::isspace).base(), s->end()); @@ -136,8 +141,9 @@ namespace vcpkg::Strings std::vector split(const std::string& s, const std::string& delimiter) { std::vector output; - - if(delimiter.empty()){ + + if (delimiter.empty()) + { output.push_back(s); return output; } -- cgit v1.2.3 From b3e06443eab560d5de848f2a066e1baa477fa57b Mon Sep 17 00:00:00 2001 From: Maria Tavlaki Date: Sun, 1 Oct 2017 22:17:33 +0300 Subject: Create stub autocomplete function --- toolsrc/include/vcpkg_Commands.h | 5 +++++ toolsrc/src/commands_autocomplete.cpp | 22 ++++++++++++++++++++++ toolsrc/src/commands_available_commands.cpp | 2 +- toolsrc/vcpkglib/vcpkglib.vcxproj | 1 + toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 3 +++ 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 toolsrc/src/commands_autocomplete.cpp diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 590f0208c..7cfa2760e 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -194,6 +194,11 @@ namespace vcpkg::Commands void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } + namespace Autocomplete + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + namespace Help { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); diff --git a/toolsrc/src/commands_autocomplete.cpp b/toolsrc/src/commands_autocomplete.cpp new file mode 100644 index 000000000..71154445d --- /dev/null +++ b/toolsrc/src/commands_autocomplete.cpp @@ -0,0 +1,22 @@ +#include "pch.h" + +#include "Paragraphs.h" +#include "SortedVector.h" +#include "vcpkg_Commands.h" +#include "vcpkg_Maps.h" +#include "vcpkg_System.h" + +namespace vcpkg::Commands::Autocomplete +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + static const std::string EXAMPLE = + Strings::format("The argument should be a command line to autocomplete.\n%s", + Commands::Help::create_example_string("autocomplete install z")); + + args.check_max_arg_count(1, EXAMPLE); + args.check_and_get_optional_command_arguments({}); + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/commands_available_commands.cpp b/toolsrc/src/commands_available_commands.cpp index 87cc43dca..d3280e6d7 100644 --- a/toolsrc/src/commands_available_commands.cpp +++ b/toolsrc/src/commands_available_commands.cpp @@ -34,7 +34,7 @@ namespace vcpkg::Commands {"import", &Import::perform_and_exit}, {"cache", &Cache::perform_and_exit}, {"portsdiff", &PortsDiff::perform_and_exit}, - }; + {"autocomplete", &Autocomplete::perform_and_exit}}; return t; } diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index edecd7720..0c3c7105d 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -181,6 +181,7 @@ + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 2fbf3d929..668aa48d6 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -180,6 +180,9 @@ Source Files + + Source Files + -- cgit v1.2.3 From fe89e72e9565f0515834b925f015fe19324c38da Mon Sep 17 00:00:00 2001 From: Maria Tavlaki Date: Sun, 1 Oct 2017 23:26:36 +0300 Subject: Autocomplete: handle arguments --- toolsrc/src/commands_autocomplete.cpp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/commands_autocomplete.cpp b/toolsrc/src/commands_autocomplete.cpp index 71154445d..a67113aff 100644 --- a/toolsrc/src/commands_autocomplete.cpp +++ b/toolsrc/src/commands_autocomplete.cpp @@ -14,9 +14,34 @@ namespace vcpkg::Commands::Autocomplete Strings::format("The argument should be a command line to autocomplete.\n%s", Commands::Help::create_example_string("autocomplete install z")); - args.check_max_arg_count(1, EXAMPLE); + args.check_min_arg_count(1, EXAMPLE); + args.check_max_arg_count(2, EXAMPLE); args.check_and_get_optional_command_arguments({}); + const std::string requested_command = args.command_arguments.at(0); + const std::string start_with = + args.command_arguments.size() > 1 ? args.command_arguments.at(1) : Strings::EMPTY; + + auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); + auto& source_paragraphs = sources_and_errors.paragraphs; + + const auto& istartswith = Strings::case_insensitive_ascii_starts_with; + + std::vector results; + for (const auto& source_control_file : source_paragraphs) + { + auto&& sp = *source_control_file->core_paragraph; + + if (istartswith(sp.name, start_with)) + { + results.push_back(sp.name); + } + } + + System::println(Strings::join(" ", results)); + + auto all_ports = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); + Checks::exit_success(VCPKG_LINE_INFO); } } -- cgit v1.2.3 From 7c2239f980197096a13e8fb4b96297b08616eb78 Mon Sep 17 00:00:00 2001 From: Maria Tavlaki Date: Mon, 2 Oct 2017 00:03:39 +0300 Subject: Autocomplete: check if first argument is "install" --- toolsrc/src/commands_autocomplete.cpp | 37 ++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/toolsrc/src/commands_autocomplete.cpp b/toolsrc/src/commands_autocomplete.cpp index a67113aff..013cea320 100644 --- a/toolsrc/src/commands_autocomplete.cpp +++ b/toolsrc/src/commands_autocomplete.cpp @@ -8,6 +8,23 @@ namespace vcpkg::Commands::Autocomplete { + std::vector autocomplete_install( + const std::vector>& source_paragraphs, const std::string& start_with) + { + std::vector results; + const auto& istartswith = Strings::case_insensitive_ascii_starts_with; + + for (const auto& source_control_file : source_paragraphs) + { + auto&& sp = *source_control_file->core_paragraph; + + if (istartswith(sp.name, start_with)) + { + results.push_back(sp.name); + } + } + return results; + } void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { static const std::string EXAMPLE = @@ -21,27 +38,15 @@ namespace vcpkg::Commands::Autocomplete const std::string requested_command = args.command_arguments.at(0); const std::string start_with = args.command_arguments.size() > 1 ? args.command_arguments.at(1) : Strings::EMPTY; - - auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); - auto& source_paragraphs = sources_and_errors.paragraphs; - - const auto& istartswith = Strings::case_insensitive_ascii_starts_with; - std::vector results; - for (const auto& source_control_file : source_paragraphs) + if (requested_command == "install") { - auto&& sp = *source_control_file->core_paragraph; + auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); + auto& source_paragraphs = sources_and_errors.paragraphs; - if (istartswith(sp.name, start_with)) - { - results.push_back(sp.name); - } + results = autocomplete_install(source_paragraphs, start_with); } - System::println(Strings::join(" ", results)); - - auto all_ports = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); - Checks::exit_success(VCPKG_LINE_INFO); } } -- cgit v1.2.3 From 016c53e231f353bdfa35f8e265b281e8d56031ed Mon Sep 17 00:00:00 2001 From: Maria Tavlaki Date: Mon, 2 Oct 2017 00:38:53 +0300 Subject: Autocomplete: remove --- toolsrc/src/commands_autocomplete.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/toolsrc/src/commands_autocomplete.cpp b/toolsrc/src/commands_autocomplete.cpp index 013cea320..3963f904b 100644 --- a/toolsrc/src/commands_autocomplete.cpp +++ b/toolsrc/src/commands_autocomplete.cpp @@ -5,6 +5,7 @@ #include "vcpkg_Commands.h" #include "vcpkg_Maps.h" #include "vcpkg_System.h" +#include "vcpkglib.h" namespace vcpkg::Commands::Autocomplete { @@ -25,6 +26,25 @@ namespace vcpkg::Commands::Autocomplete } return results; } + + std::vector autocomplete_remove(std::vector installed_packages, + const std::string& start_with) + { + std::vector results; + const auto& istartswith = Strings::case_insensitive_ascii_starts_with; + + for (const auto& installed_package : installed_packages) + { + auto sp = installed_package->package.displayname(); + + if (istartswith(sp, start_with)) + { + results.push_back(sp); + } + } + return results; + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { static const std::string EXAMPLE = @@ -46,6 +66,13 @@ namespace vcpkg::Commands::Autocomplete results = autocomplete_install(source_paragraphs, start_with); } + else if (requested_command == "remove") + { + const StatusParagraphs status_db = database_load_check(paths); + std::vector installed_packages = get_installed_ports(status_db); + results = autocomplete_remove(installed_packages, start_with); + } + System::println(Strings::join(" ", results)); Checks::exit_success(VCPKG_LINE_INFO); } -- cgit v1.2.3 From f7a437a66243aca2800928d432d611ae0c290304 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Mon, 2 Oct 2017 02:06:12 +0300 Subject: [libexif] add version 0.6.21 --- ports/libexif/CMakeLists.txt | 142 +++++++++++++++++++++++++++++++++++++++++++ ports/libexif/CONTROL | 3 + ports/libexif/config.h.cmake | 96 +++++++++++++++++++++++++++++ ports/libexif/libexif.def | 130 +++++++++++++++++++++++++++++++++++++++ ports/libexif/portfile.cmake | 31 ++++++++++ 5 files changed, 402 insertions(+) create mode 100644 ports/libexif/CMakeLists.txt create mode 100644 ports/libexif/CONTROL create mode 100644 ports/libexif/config.h.cmake create mode 100644 ports/libexif/libexif.def create mode 100644 ports/libexif/portfile.cmake diff --git a/ports/libexif/CMakeLists.txt b/ports/libexif/CMakeLists.txt new file mode 100644 index 000000000..ac32e82eb --- /dev/null +++ b/ports/libexif/CMakeLists.txt @@ -0,0 +1,142 @@ +cmake_minimum_required(VERSION 3.0) +project(libexif LANGUAGES C) + +set(PACKAGE "libexif") + +option(ENABLE_NLS "Enable NLS" OFF) + +set(HEADERS + libexif/_stdint.h + libexif/exif.h + libexif/exif-byte-order.h + libexif/exif-content.h + libexif/exif-data.h + libexif/exif-data-type.h + libexif/exif-entry.h + libexif/exif-format.h + libexif/exif-ifd.h + libexif/exif-loader.h + libexif/exif-log.h + libexif/exif-mem.h + libexif/exif-mnote-data.h + libexif/exif-mnote-data-priv.h + libexif/exif-system.h + libexif/exif-tag.h + libexif/exif-utils.h +) + +set(SOURCES + libexif/exif-byte-order.c + libexif/exif-content.c + libexif/exif-data.c + libexif/exif-entry.c + libexif/exif-format.c + libexif/exif-ifd.c + libexif/exif-loader.c + libexif/exif-log.c + libexif/exif-mem.c + libexif/exif-mnote-data.c + libexif/exif-tag.c + libexif/exif-utils.c +) + +set(HEADERS_CANON + libexif/canon/exif-mnote-data-canon.h + libexif/canon/mnote-canon-entry.h + libexif/canon/mnote-canon-tag.h +) + +set(SOURCES_CANON + libexif/canon/exif-mnote-data-canon.c + libexif/canon/mnote-canon-entry.c + libexif/canon/mnote-canon-tag.c +) + +set(HEADERS_FUJI + libexif/fuji/exif-mnote-data-fuji.h + libexif/fuji/mnote-fuji-entry.h + libexif/fuji/mnote-fuji-tag.h +) + +set(SOURCES_FUJI + libexif/fuji/exif-mnote-data-fuji.c + libexif/fuji/mnote-fuji-entry.c + libexif/fuji/mnote-fuji-tag.c +) + +set(HEADERS_OLYMPUS + libexif/olympus/exif-mnote-data-olympus.h + libexif/olympus/mnote-olympus-entry.h + libexif/olympus/mnote-olympus-tag.h +) + +set(SOURCES_OLYMPUS + libexif/olympus/exif-mnote-data-olympus.c + libexif/olympus/mnote-olympus-entry.c + libexif/olympus/mnote-olympus-tag.c +) + +set(HEADERS_PENTAX + libexif/pentax/exif-mnote-data-pentax.h + libexif/pentax/mnote-pentax-entry.h + libexif/pentax/mnote-pentax-tag.h +) + +set(SOURCES_PENTAX + libexif/pentax/exif-mnote-data-pentax.c + libexif/pentax/mnote-pentax-entry.c + libexif/pentax/mnote-pentax-tag.c +) + +if(MSVC) + set(SOURCES_MSVC "libexif.def") +endif() + +add_library(libexif + ${SOURCES} + ${SOURCES_CANON} + ${SOURCES_FUJI} + ${SOURCES_OLYMPUS} + ${SOURCES_PENTAX} + ${SOURCES_MSVC} +) + +target_include_directories(libexif PRIVATE .) +target_include_directories(libexif PRIVATE ${CMAKE_BINARY_DIR}) +target_compile_definitions(libexif PRIVATE -D_CRT_SECURE_NO_WARNINGS) +target_compile_definitions(libexif PRIVATE -DGETTEXT_PACKAGE="${PACKAGE}") + +include(CheckFunctionExists) +include(CheckIncludeFile) + +check_function_exists(dcgettext HAVE_DCGETTEXT) +check_function_exists(gettext HAVE_DCGETTEXT) +check_function_exists(iconv HAVE_DCGETTEXT) +check_function_exists(localtime_r HAVE_DCGETTEXT) + +check_include_file(dlfcn.h HAVE_DLFCN_H) +check_include_file(inttypes.h HAVE_INTTYPES_H) +check_include_file(memory.h HAVE_MEMORY_H) +check_include_file(stdint.h HAVE_STDINT_H) +check_include_file(stdlib.h HAVE_STDLIB_H) +check_include_file(strings.h HAVE_STRINGS_H) +check_include_file(string.h HAVE_STRING_H) +check_include_file(sys/stat.h HAVE_SYS_STAT_H) +check_include_file(sys/stat.h HAVE_SYS_STAT_H) +check_include_file(sys/types.h HAVE_SYS_TYPES_H) +check_include_file(unistd.h HAVE_UNISTD_H) + +configure_file(config.h.cmake config.h) + +install( + TARGETS libexif + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(FILES ${HEADERS} DESTINATION include/libexif) +install(FILES ${HEADERS_CANON} DESTINATION include/libexif/canon) +install(FILES ${HEADERS_FUJI} DESTINATION include/libexif/fuji) +install(FILES ${HEADERS_OLYMPUS} DESTINATION include/libexif/olympus) +install(FILES ${HEADERS_PENTAX} DESTINATION include/libexif/pentax) diff --git a/ports/libexif/CONTROL b/ports/libexif/CONTROL new file mode 100644 index 000000000..427d907f2 --- /dev/null +++ b/ports/libexif/CONTROL @@ -0,0 +1,3 @@ +Source: libexif +Version: 0.6.21-1 +Description: a library for parsing, editing, and saving EXIF data diff --git a/ports/libexif/config.h.cmake b/ports/libexif/config.h.cmake new file mode 100644 index 000000000..4dfbdb1b0 --- /dev/null +++ b/ports/libexif/config.h.cmake @@ -0,0 +1,96 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#cmakedefine ENABLE_NLS + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#cmakedefine HAVE_DCGETTEXT + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_DLFCN_H + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#cmakedefine HAVE_GETTEXT + +/* Define if you have the iconv() function. */ +#cmakedefine HAVE_ICONV + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_INTTYPES_H + +/* Define to 1 if you have the `localtime_r' function. */ +#cmakedefine HAVE_LOCALTIME_R + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H + +/* Define as const if the declaration of iconv() needs const. */ +#cmakedefine ICONV_CONST + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#cmakedefine LT_OBJDIR + +/* Name of package */ +#cmakedefine PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#cmakedefine PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#cmakedefine PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#cmakedefine PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#cmakedefine PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#cmakedefine PACKAGE_URL + +/* Define to the version of this package. */ +#cmakedefine PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#cmakedefine STDC_HEADERS + +/* Version number of package */ +#cmakedefine VERSION + +/* Define to empty if `const' does not conform to ANSI C. */ +#cmakedefine const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#cmakedefine inline +#endif + +#ifdef _MSC_VER +#include +typedef SSIZE_T ssize_t; +#endif \ No newline at end of file diff --git a/ports/libexif/libexif.def b/ports/libexif/libexif.def new file mode 100644 index 000000000..6bd0ca424 --- /dev/null +++ b/ports/libexif/libexif.def @@ -0,0 +1,130 @@ +EXPORTS + exif_array_set_byte_order + exif_byte_order_get_name + exif_content_add_entry + exif_content_dump + exif_content_fix + exif_content_foreach_entry + exif_content_free + exif_content_get_entry + exif_content_get_ifd + exif_content_log + exif_content_new + exif_content_new_mem + exif_content_ref + exif_content_remove_entry + exif_content_unref + exif_data_dump + exif_data_fix + exif_data_foreach_content + exif_data_free + exif_data_get_byte_order + exif_data_get_data_type + exif_data_get_log + exif_data_get_mnote_data + exif_data_load_data + exif_data_log + exif_data_new + exif_data_new_from_data + exif_data_new_from_file + exif_data_new_mem + exif_data_option_get_description + exif_data_option_get_name + exif_data_ref + exif_data_save_data + exif_data_set_byte_order + exif_data_set_data_type + exif_data_set_option + exif_data_unref + exif_data_unset_option + exif_entry_dump + exif_entry_fix + exif_entry_free + exif_entry_get_value + exif_entry_initialize + exif_entry_new + exif_entry_new_mem + exif_entry_ref + exif_entry_unref + exif_format_get_name + exif_format_get_size + exif_get_long + exif_get_rational + exif_get_short + exif_get_slong + exif_get_srational + exif_get_sshort + exif_ifd_get_name + exif_loader_get_buf + exif_loader_get_data + exif_loader_log + exif_loader_new + exif_loader_new_mem + exif_loader_ref + exif_loader_reset + exif_loader_unref + exif_loader_write + exif_loader_write_file + exif_log + exif_log_code_get_message + exif_log_code_get_title + exif_log_free + exif_log_new + exif_log_new_mem + exif_log_ref + exif_log_set_func + exif_log_unref + exif_logv + exif_mem_alloc + exif_mem_free + exif_mem_new + exif_mem_new_default + exif_mem_realloc + exif_mem_ref + exif_mem_unref + exif_mnote_data_canon_new + exif_mnote_data_construct + exif_mnote_data_count + exif_mnote_data_get_description + exif_mnote_data_get_id + exif_mnote_data_get_name + exif_mnote_data_get_title + exif_mnote_data_get_value + exif_mnote_data_load + exif_mnote_data_log + exif_mnote_data_olympus_new + exif_mnote_data_pentax_new + exif_mnote_data_ref + exif_mnote_data_save + exif_mnote_data_set_byte_order + exif_mnote_data_set_offset + exif_mnote_data_unref + exif_set_long + exif_set_rational + exif_set_short + exif_set_slong + exif_set_srational + exif_set_sshort + exif_tag_from_name + exif_tag_get_description + exif_tag_get_description_in_ifd + exif_tag_get_name + exif_tag_get_name_in_ifd + exif_tag_get_support_level_in_ifd + exif_tag_get_title + exif_tag_get_title_in_ifd + exif_tag_table_count + exif_tag_table_get_name + exif_tag_table_get_tag + mnote_canon_entry_get_value + mnote_canon_tag_get_description + mnote_canon_tag_get_name + mnote_canon_tag_get_title + mnote_olympus_entry_get_value + mnote_olympus_tag_get_description + mnote_olympus_tag_get_name + mnote_olympus_tag_get_title + mnote_pentax_entry_get_value + mnote_pentax_tag_get_description + mnote_pentax_tag_get_name + mnote_pentax_tag_get_title \ No newline at end of file diff --git a/ports/libexif/portfile.cmake b/ports/libexif/portfile.cmake new file mode 100644 index 000000000..0442d8c15 --- /dev/null +++ b/ports/libexif/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "libexif currently only supports being built for desktop") +endif() + +set(LIBEXIF_VERSION 0.6.21) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libexif-${LIBEXIF_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "https://freefr.dl.sourceforge.net/project/libexif/libexif/${LIBEXIF_VERSION}/libexif-${LIBEXIF_VERSION}.tar.bz2" + FILENAME "libexif-${LIBEXIF_VERSION}.tar.bz2" + SHA512 4e0fe2abe85d1c95b41cb3abe1f6333dc3a9eb69dba106a674a78d74a4d5b9c5a19647118fa1cc2d72b98a29853394f1519eda9e2889eb28d3be26b21c7cfc35 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/libexif.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libexif RENAME copyright) -- cgit v1.2.3 From ba255e11bb043a5f36d3e5745bc6f18a40baf5c3 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 1 Oct 2017 21:50:09 -0700 Subject: add in expat dependency --- ports/exiv2/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index eb21c9898..460b82008 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 Version: 327b3f6c4de4ffda82818367fc870640d2ae8820 -Build-Depends:zlib +Build-Depends:zlib, expat Description: Image metadata library and tools http://www.exiv2.org -- cgit v1.2.3 From e67007e632a7406e5e8ec5619aa1cec4947fffb4 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 1 Oct 2017 22:50:43 -0700 Subject: update commit to master for cmake config support --- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 460b82008..4db8e73ee 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 327b3f6c4de4ffda82818367fc870640d2ae8820 +Version: 4f4add2cdcbe73af7098122a509dff0739d15908 Build-Depends:zlib, expat Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index d5ed9a625..f9aff3e93 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF 327b3f6c4de4ffda82818367fc870640d2ae8820 - SHA512 a7b2eb812bbbf30a6f2b0e76284d81e10b4d4e30adf7cc45efe6d9b8f59f2338497c94540199bcec62bef3f27cd79f9ce43ddf345f6b718ceb1d900d7479158c + REF 4f4add2cdcbe73af7098122a509dff0739d15908 + SHA512 32207cfd7ac932942562e062e851d7ba9be5586f33c2d924fb2a908a78f0c53f0d2973108c49bc865a3e7697a04a4b65d991441e4b89baca82b51b61affd4fa3 HEAD_REF master ) -- cgit v1.2.3 From 973b0e534622e010b7591efb7db65ca823ac99ef Mon Sep 17 00:00:00 2001 From: Raynor Vliegendhart Date: Mon, 2 Oct 2017 14:31:06 +0200 Subject: [ffmpeg] Deal with case-sensitive env vars When behind a corporate proxy, one often needs to specify `HTTP_PROXY` and `HTTPS_PROXY` for some command line tools to work properly. However, `pacman` seems to rely on the lowercase equivalent environment variables. In a Windows command prompt environment, it is not possible to set both since Windows environment variables are not case-sensitive. As a workaround, this build script checks for the existence of HTTP_PROXY and HTTPS_PROXY. If they exist, they are exported as lowercase variables. --- ports/ffmpeg/build.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/ffmpeg/build.sh b/ports/ffmpeg/build.sh index 3474a111e..eea05c959 100644 --- a/ports/ffmpeg/build.sh +++ b/ports/ffmpeg/build.sh @@ -1,6 +1,13 @@ #!/usr/bin/bash set -e export PATH=/usr/bin:$PATH +# Export HTTP(S)_PROXY as http(s)_proxy: +if [ "$HTTP_PROXY" ]; then + export http_proxy=$HTTP_PROXY +fi +if [ "$HTTPS_PROXY" ]; then + export https_proxy=$HTTPS_PROXY +fi pacman -Sy --noconfirm --needed diffutils make PATH_TO_BUILD_DIR="`cygpath "$1"`" -- cgit v1.2.3 From 49cd339fd34a65abab6992d340fd13e6425924a3 Mon Sep 17 00:00:00 2001 From: Ghabry Date: Mon, 2 Oct 2017 14:59:38 +0200 Subject: Add xmplite 4.4.1 --- ports/libxmp-lite/0001-msvc-buildfix.patch | 23 ++++++++++++ ports/libxmp-lite/0002-fix-symbols.patch | 44 +++++++++++++++++++++++ ports/libxmp-lite/CMakeLists.txt | 58 ++++++++++++++++++++++++++++++ ports/libxmp-lite/CONTROL | 3 ++ ports/libxmp-lite/portfile.cmake | 29 +++++++++++++++ 5 files changed, 157 insertions(+) create mode 100644 ports/libxmp-lite/0001-msvc-buildfix.patch create mode 100644 ports/libxmp-lite/0002-fix-symbols.patch create mode 100644 ports/libxmp-lite/CMakeLists.txt create mode 100644 ports/libxmp-lite/CONTROL create mode 100644 ports/libxmp-lite/portfile.cmake diff --git a/ports/libxmp-lite/0001-msvc-buildfix.patch b/ports/libxmp-lite/0001-msvc-buildfix.patch new file mode 100644 index 000000000..dfd548186 --- /dev/null +++ b/ports/libxmp-lite/0001-msvc-buildfix.patch @@ -0,0 +1,23 @@ +diff -Naur .\libxmp-lite-4.4.1/src/common.h .\libxmp-lite-4.4.1-orig/src/common.h +--- a/src/common.h 2016-07-16 13:37:36 +0200 ++++ b/src/common.h 2017-05-23 00:52:17 +0200 +@@ -77,19 +77,12 @@ + #ifndef CLIB_DECL + #define CLIB_DECL + #endif +-#ifdef DEBUG +-#ifndef ATTR_PRINTF +-#define ATTR_PRINTF(x,y) +-#endif +-void CLIB_DECL D_(const char *text, ...) ATTR_PRINTF(1,2); +-#else + // VS prior to VC7.1 does not support variadic macros. VC8.0 does not optimize unused parameters passing + #if _MSC_VER < 1400 + void __inline CLIB_DECL D_(const char *text, ...) { do {} while (0); } + #else + #define D_(args, ...) do {} while (0) + #endif +-#endif + + #elif defined __ANDROID__ + diff --git a/ports/libxmp-lite/0002-fix-symbols.patch b/ports/libxmp-lite/0002-fix-symbols.patch new file mode 100644 index 000000000..f765a7bf0 --- /dev/null +++ b/ports/libxmp-lite/0002-fix-symbols.patch @@ -0,0 +1,44 @@ +diff --git a/lite/src/format.c b/lite/src/format.c +--- a/src/format.c ++++ b/src/format.c +@@ -27,20 +27,20 @@ + #endif + #include "format.h" + +-extern const struct format_loader xm_loader; +-extern const struct format_loader mod_loader; +-extern const struct format_loader it_loader; +-extern const struct format_loader s3m_loader; ++extern const struct format_loader libxmp_loader_xm; ++extern const struct format_loader libxmp_loader_mod; ++extern const struct format_loader libxmp_loader_it; ++extern const struct format_loader libxmp_loader_s3m; + + extern const struct pw_format *const pw_format[]; + + const struct format_loader *const format_loader[5] = { +- &xm_loader, +- &mod_loader, ++ &libxmp_loader_xm, ++ &libxmp_loader_mod, + #ifndef LIBXMP_CORE_DISABLE_IT +- &it_loader, ++ &libxmp_loader_it, + #endif +- &s3m_loader, ++ &libxmp_loader_s3m, + NULL + }; + +diff --git a/lite/src/loaders/mod_load.c b/lite/src/loaders/mod_load.c +--- a/src/loaders/mod_load.c ++++ b/src/loaders/mod_load.c +@@ -36,7 +36,7 @@ + static int mod_test (HIO_HANDLE *, char *, const int); + static int mod_load (struct module_data *, HIO_HANDLE *, const int); + +-const struct format_loader mod_loader = { ++const struct format_loader libxmp_loader_mod = { + "Protracker", + mod_test, + mod_load diff --git a/ports/libxmp-lite/CMakeLists.txt b/ports/libxmp-lite/CMakeLists.txt new file mode 100644 index 000000000..09323bf25 --- /dev/null +++ b/ports/libxmp-lite/CMakeLists.txt @@ -0,0 +1,58 @@ +cmake_minimum_required(VERSION 3.4) +project(libxmp-lite) + +set(HEADERS "include/libxmp-lite/xmp.h") + +set(SOURCES src/virtual.c + src/format.c + src/period.c + src/player.c + src/read_event.c + src/dataio.c + src/lfo.c + src/scan.c + src/control.c + src/filter.c + src/effects.c + src/mixer.c + src/mix_all.c + src/load_helpers.c + src/load.c + src/hio.c + src/smix.c + src/memio.c + src/loaders/common.c + src/loaders/itsex.c + src/loaders/sample.c + src/loaders/xm_load.c + src/loaders/mod_load.c + src/loaders/s3m_load.c + src/loaders/it_load.c +) + +include_directories(include/libxmp-lite src) + +option(BUILD_SHARED_LIBS "Build shared libs" OFF) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + +add_library(libxmp-lite ${SOURCES}) +target_compile_definitions(libxmp-lite PRIVATE + LIBXMP_CORE_PLAYER=1 + inline=__inline + _USE_MATH_DEFINES=1 +) + +# Fix UWP /sdl compile errors +# Disable C4703: Not initialized +# Disable C4996: Deprecated +set_target_properties(libxmp-lite PROPERTIES COMPILE_FLAGS "/wd4703 /wd4996") + +install( + TARGETS libxmp-lite + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +install(FILES ${HEADERS} DESTINATION include) diff --git a/ports/libxmp-lite/CONTROL b/ports/libxmp-lite/CONTROL new file mode 100644 index 000000000..1f7e8dded --- /dev/null +++ b/ports/libxmp-lite/CONTROL @@ -0,0 +1,3 @@ +Source: libxmp-lite +Version: 4.4.1 +Description: Lightweight version of libxmp that supports MOD, S3M, XM and IT modules. diff --git a/ports/libxmp-lite/portfile.cmake b/ports/libxmp-lite/portfile.cmake new file mode 100644 index 000000000..2d91f20b0 --- /dev/null +++ b/ports/libxmp-lite/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxmp-lite-4.4.1) +vcpkg_download_distfile(ARCHIVE + URLS "http://sourceforge.net/projects/xmp/files/libxmp/4.4.1/libxmp-lite-4.4.1.tar.gz" + FILENAME "libxmp-lite-4.4.1.tar.gz" + SHA512 f27e3f9fb79ff15ce90b51fb29641c01cadf7455150da57cde6860c2ba075ed497650eb44ec9143bdd3538288228c609f7db6d862c9d73f007f686eccb05543e +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-msvc-buildfix.patch + ${CMAKE_CURRENT_LIST_DIR}/0002-fix-symbols.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_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxmp-lite RENAME copyright) -- cgit v1.2.3 From bb9265b676568723e60e978b98e1683a923a0ab2 Mon Sep 17 00:00:00 2001 From: Ghabry Date: Mon, 2 Oct 2017 16:10:33 +0200 Subject: Add Wildmidi 0.4.1 --- ports/wildmidi/0001-add-install-target.patch | 30 ++++++++++++++++ ports/wildmidi/0002-use-ansi.patch | 22 ++++++++++++ ports/wildmidi/CONTROL | 3 ++ ports/wildmidi/portfile.cmake | 51 ++++++++++++++++++++++++++++ 4 files changed, 106 insertions(+) create mode 100644 ports/wildmidi/0001-add-install-target.patch create mode 100644 ports/wildmidi/0002-use-ansi.patch create mode 100644 ports/wildmidi/CONTROL create mode 100644 ports/wildmidi/portfile.cmake diff --git a/ports/wildmidi/0001-add-install-target.patch b/ports/wildmidi/0001-add-install-target.patch new file mode 100644 index 000000000..8270cd9ea --- /dev/null +++ b/ports/wildmidi/0001-add-install-target.patch @@ -0,0 +1,30 @@ +--- a/src/CMakeLists.txt 2017-10-02 14:06:57.163881000 +0000 ++++ b/src/CMakeLists.txt 2017-10-02 14:08:52.815977600 +0000 +@@ -313,6 +313,27 @@ + ENDIF (WIN32 AND CMAKE_COMPILER_IS_MINGW) + + IF (WIN32 AND MSVC) ++ # install our libraries ++ IF (WANT_STATIC) ++ INSTALL(TARGETS libwildmidi_static DESTINATION ${WILDMIDILIB_INSTALLDIR}) ++ IF (WANT_PLAYERSTATIC) ++ INSTALL(TARGETS wildmidi-static DESTINATION bin) ++ ENDIF () ++ ENDIF (WANT_STATIC) ++ ++ IF (BUILD_SHARED_LIBS) ++ INSTALL(TARGETS libwildmidi_dynamic ++ ARCHIVE DESTINATION ${WILDMIDILIB_INSTALLDIR} ++ LIBRARY DESTINATION ${WILDMIDILIB_INSTALLDIR} ++ RUNTIME DESTINATION ${WILDMIDIDLL_INSTALLDIR} ++ ) ++ IF (WANT_PLAYER) ++ INSTALL(TARGETS wildmidi DESTINATION bin) ++ ENDIF () ++ ENDIF () ++ ++ INSTALL(FILES ${CMAKE_SOURCE_DIR}/include/wildmidi_lib.h DESTINATION include) ++ + IF (WANT_MP_BUILD) + SET(MT_BUILD "/MP") + ENDIF () diff --git a/ports/wildmidi/0002-use-ansi.patch b/ports/wildmidi/0002-use-ansi.patch new file mode 100644 index 000000000..68acb7b34 --- /dev/null +++ b/ports/wildmidi/0002-use-ansi.patch @@ -0,0 +1,22 @@ +diff --git a/src/file_io.c b/src/file_io.c +index 9db9759..7110e8b 100644 +--- a/src/file_io.c ++++ b/src/file_io.c +@@ -118,7 +118,7 @@ void *_WM_BufferFile(const char *filename, uint32_t *size) { + #elif defined(_WIN32) + int buffer_fd; + HANDLE h; +- WIN32_FIND_DATA wfd; ++ WIN32_FIND_DATAA wfd; + #elif defined(__OS2__) || defined(__EMX__) + int buffer_fd; + HDIR h = HDIR_CREATE; +@@ -186,7 +186,7 @@ void *_WM_BufferFile(const char *filename, uint32_t *size) { + } + *size = f.ff_fsize; + #elif defined(_WIN32) +- if ((h = FindFirstFile(buffer_file, &wfd)) == INVALID_HANDLE_VALUE) { ++ if ((h = FindFirstFileA(buffer_file, &wfd)) == INVALID_HANDLE_VALUE) { + _WM_GLOBAL_ERROR(__FUNCTION__, __LINE__, WM_ERR_STAT, filename, ENOENT); + free(buffer_file); + return NULL; diff --git a/ports/wildmidi/CONTROL b/ports/wildmidi/CONTROL new file mode 100644 index 000000000..116333ec1 --- /dev/null +++ b/ports/wildmidi/CONTROL @@ -0,0 +1,3 @@ +Source: wildmidi +Version: 0.4.1 +Description: MIDI software synthesizer library. diff --git a/ports/wildmidi/portfile.cmake b/ports/wildmidi/portfile.cmake new file mode 100644 index 000000000..d82895de4 --- /dev/null +++ b/ports/wildmidi/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/wildmidi-wildmidi-0.4.1) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/Mindwerks/wildmidi/archive/wildmidi-0.4.1.zip" + FILENAME "wildmidi-0.4.1.zip" + SHA512 ebfbb16b57c0d39f1402f91df4dd205d80f5632f6afbe5fa99af6f06279582f0676bb247cd64ec472cdf272f6a1a2917827ed98f9cc24166aa41f050b9f7d396 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-add-install-target.patch + ${CMAKE_CURRENT_LIST_DIR}/0002-use-ansi.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_SHARED_LIBS "ON") + set(WANT_STATIC "OFF") +else() + set(BUILD_SHARED_LIBS "OFF") + set(WANT_STATIC "ON") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMSVC=ON + -DWANT_PLAYER=OFF + -DWANT_STATIC=${WANT_STATIC} + -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Rename library to get rid of _dynamic and _static suffix +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/wildmidi_dynamic.lib ${CURRENT_PACKAGES_DIR}/lib/wildmidi.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi_dynamic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/wildmidi_dynamic.dll ${CURRENT_PACKAGES_DIR}/bin/wildmidi.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/wildmidi_dynamic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/wildmidi.dll) +else() + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/wildmidi_static.lib ${CURRENT_PACKAGES_DIR}/lib/wildmidi.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi.lib) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/docs/license/LGPLv3.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wildmidi RENAME copyright) -- cgit v1.2.3 From 58418e73736d267bb921d6b4568e39710fcfdacb Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Tue, 3 Oct 2017 00:55:54 +0900 Subject: Add Dark support Add Dark support to vcpkg_find_acquire_program(). --- scripts/cmake/vcpkg_find_acquire_program.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index e718fc7da..69e439001 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -152,6 +152,13 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/36bacb4cba27003c572e5bf7a9c4dfe3c9a8d40d/gas-preprocessor.pl") set(ARCHIVE "gas-preprocessor.pl") set(HASH a25caadccd1457a0fd2abb5a0da9aca1713b2c351d76daf87a4141e52021f51aa09e95a62942c6f0764f79cc1fa65bf71584955b09e62ee7da067b5c82baf6b3) + elseif(VAR MATCHES "DARK") + set(PROGNAME dark) + set(SUBDIR "wix311-binaries") + set(PATHS ${DOWNLOADS}/tools/dark/${SUBDIR}) + set(URL "https://github.com/wixtoolset/wix3/releases/download/wix311rtm/wix311-binaries.zip") + set(ARCHIVE "wix311-binaries.zip") + set(HASH 74f0fa29b5991ca655e34a9d1000d47d4272e071113fada86727ee943d913177ae96dc3d435eaf494d2158f37560cd4c2c5274176946ebdb17bf2354ced1c516) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() -- cgit v1.2.3 From d4f992a08ea0a84fdaa2fda3ba5ed95ab592478d Mon Sep 17 00:00:00 2001 From: alex85k Date: Mon, 2 Oct 2017 22:54:00 +0500 Subject: [FreeXL] initial port --- ports/freexl/CONTROL | 5 +++ ports/freexl/fix-makefiles.patch | 43 +++++++++++++++++++++ ports/freexl/fix-sources.patch | 35 +++++++++++++++++ ports/freexl/portfile.cmake | 82 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 165 insertions(+) create mode 100644 ports/freexl/CONTROL create mode 100644 ports/freexl/fix-makefiles.patch create mode 100644 ports/freexl/fix-sources.patch create mode 100644 ports/freexl/portfile.cmake diff --git a/ports/freexl/CONTROL b/ports/freexl/CONTROL new file mode 100644 index 000000000..8e0c8da93 --- /dev/null +++ b/ports/freexl/CONTROL @@ -0,0 +1,5 @@ +Source: freexl +Version: 1.0.4 +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/fix-makefiles.patch b/ports/freexl/fix-makefiles.patch new file mode 100644 index 000000000..5cf2c470f --- /dev/null +++ b/ports/freexl/fix-makefiles.patch @@ -0,0 +1,43 @@ +diff --git a/makefile.vc b/makefile.vc +index 0aacbc7..d95d859 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -7,7 +7,7 @@ + LIBOBJ = freexl.obj + FREEXL_DLL = freexl$(VERSION).dll + +-CFLAGS = /nologo -IC:\OSGeo4W\include -I. -Iheaders $(OPTFLAGS) ++CFLAGS = /nologo -I$(INSTALLED_ROOT)\include -I. -Iheaders $(OPTFLAGS) + + default: all + +@@ -23,9 +23,9 @@ freexl.lib: $(LIBOBJ) + $(FREEXL_DLL): freexl_i.lib + + freexl_i.lib: $(LIBOBJ) +- link /debug /dll /out:$(FREEXL_DLL) \ ++ link $(LINK_FLAGS) /dll /out:$(FREEXL_DLL) \ + /implib:freexl_i.lib $(LIBOBJ) \ +- C:\OSGeo4w\lib\iconv.lib ++ $(LIBS_ALL) + if exist $(FREEXL_DLL).manifest mt -manifest \ + $(FREEXL_DLL).manifest -outputresource:$(FREEXL_DLL);2 + +diff --git a/nmake.opt b/nmake.opt +index 35f9242..efb6f77 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -1,10 +1,10 @@ + # Directory tree where FreeXL will be installed. +-INSTDIR=C:\OSGeo4W ++INSTDIR=$(INST_DIR) + + # Uncomment the first for an optimized build, or the second for debug. +-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \ ++OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \ + /DDLL_EXPORT +-#OPTFLAGS= /nologo /Zi /MD /Fdfreexl.pdb /DDLL_EXPORT ++#OPTFLAGS= /nologo $(CL_FLAGS) /Fdfreexl.pdb /DDLL_EXPORT + + # Set the version number for the DLL. Normally we leave this blank since + # we want software that is dynamically loading the DLL to have no problem diff --git a/ports/freexl/fix-sources.patch b/ports/freexl/fix-sources.patch new file mode 100644 index 000000000..89a36f3b3 --- /dev/null +++ b/ports/freexl/fix-sources.patch @@ -0,0 +1,35 @@ +diff --git a/config-msvc.h b/config-msvc.h +index a39d4e7..37f1c0b 100644 +--- a/config-msvc.h ++++ b/config-msvc.h +@@ -66,7 +66,7 @@ + #define HAVE_SYS_TYPES_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_UNISTD_H 1 ++#undef HAVE_UNISTD_H + + /* Define to 1 if `lstat' dereferences a symlink specified with a trailing + slash. */ +diff --git a/src/freexl.c b/src/freexl.c +index a0b255a..92163a9 100644 +--- a/src/freexl.c ++++ b/src/freexl.c +@@ -92,7 +92,7 @@ freexl_version (void) + #if defined(_WIN32) && !defined(__MINGW32__) + /* MSVC compiler doesn't support lround() at all */ + static double +-round (double num) ++round_old (double num) + { + double integer = ceil (num); + if (num > 0) +@@ -101,7 +101,7 @@ round (double num) + } + + static long +-lround (double num) ++lround_old (double num) + { + long integer = (long) round (num); + return integer; diff --git a/ports/freexl/portfile.cmake b/ports/freexl/portfile.cmake new file mode 100644 index 000000000..726b56db2 --- /dev/null +++ b/ports/freexl/portfile.cmake @@ -0,0 +1,82 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freexl-1.0.4) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.gaia-gis.it/gaia-sins/freexl-1.0.4.tar.gz" + FILENAME "freexl-1.0.4.tar.gz" + SHA512 d72561f7b82e0281cb211fbf249e5e45411a7cdd009cfb58da3696f0a0341ea7df210883bfde794be28738486aeb4ffc67ec2c98fd2acde5280e246e204ce788 +) +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) + +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 +################ +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() + +################ +# Release build +################ +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") + +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) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib) +endif() + + +message(STATUS "Packaging ${TARGET_TRIPLET} done") -- cgit v1.2.3 From c856dc482deb940803378e9a3c98e8ac462a54dc Mon Sep 17 00:00:00 2001 From: alex85k Date: Mon, 2 Oct 2017 23:19:59 +0500 Subject: [ReadOSM] initial port --- ports/readosm/CONTROL | 4 ++ ports/readosm/fix-makefiles.patch | 49 ++++++++++++++++++++++ ports/readosm/fix-version-macro.patch | 13 ++++++ ports/readosm/portfile.cmake | 78 +++++++++++++++++++++++++++++++++++ 4 files changed, 144 insertions(+) create mode 100644 ports/readosm/CONTROL create mode 100644 ports/readosm/fix-makefiles.patch create mode 100644 ports/readosm/fix-version-macro.patch create mode 100644 ports/readosm/portfile.cmake diff --git a/ports/readosm/CONTROL b/ports/readosm/CONTROL new file mode 100644 index 000000000..bc2853daf --- /dev/null +++ b/ports/readosm/CONTROL @@ -0,0 +1,4 @@ +Source: readosm +Version: 1.1.0 +Description: ReadOSM is an open source library to extract valid data from within an Open Street Map input file (.osm or .osm.pbf) +Build-Depends: expat, zlib diff --git a/ports/readosm/fix-makefiles.patch b/ports/readosm/fix-makefiles.patch new file mode 100644 index 000000000..3904b5136 --- /dev/null +++ b/ports/readosm/fix-makefiles.patch @@ -0,0 +1,49 @@ +diff --git a/makefile.vc b/makefile.vc +index 791aedf..d294548 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -8,7 +8,7 @@ LIBOBJ = src\readosm.obj src\osmxml.obj \ + src\protobuf.obj src\osm_objects.obj + READOSM_DLL = readosm$(VERSION).dll + +-CFLAGS = /nologo -IC:\OSGeo4W\include -Iheaders $(OPTFLAGS) ++CFLAGS = /nologo -I$(INSTALLED_ROOT)\include -Iheaders $(OPTFLAGS) + + default: all + +@@ -21,9 +21,9 @@ readosm.lib: $(LIBOBJ) + $(READOSM_DLL): readosm_i.lib + + readosm_i.lib: $(LIBOBJ) +- link /debug /dll /out:$(READOSM_DLL) \ ++ link $(LINK_FLAGS) /dll /out:$(READOSM_DLL) \ + /implib:readosm_i.lib $(LIBOBJ) \ +- C:\OSGeo4w\lib\libexpat.lib C:\OSGeo4w\lib\zlib.lib ++ $(LIBS_ALL) + if exist $(READOSM_DLL).manifest mt -manifest \ + $(READOSM_DLL).manifest -outputresource:$(READOSM_DLL);2 + +@@ -35,7 +35,7 @@ clean: + del *.exp + del *.manifest + del *.lib +- del *.obj ++ del src\*.obj + del *.pdb + + install: all +diff --git a/nmake.opt b/nmake.opt +index 5e45c0e..61c44f9 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -1,8 +1,8 @@ + # Directory tree where ReadOSM will be installed. +-INSTDIR=C:\OSGeo4W ++INSTDIR=$(INST_DIR) + + # Uncomment the first for an optimized build, or the second for debug. +-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \ ++OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \ + /DDLL_EXPORT + #OPTFLAGS= /nologo /Zi /MD /Fdreadosm.pdb /DDLL_EXPORT + diff --git a/ports/readosm/fix-version-macro.patch b/ports/readosm/fix-version-macro.patch new file mode 100644 index 000000000..b091b3359 --- /dev/null +++ b/ports/readosm/fix-version-macro.patch @@ -0,0 +1,13 @@ +diff --git a/src/readosm.c b/src/readosm.c +index e1dda27..7977339 100644 +--- a/src/readosm.c ++++ b/src/readosm.c +@@ -50,7 +50,7 @@ + + #if defined(_WIN32) && !defined(__MINGW32__) + /* MSVC: avoiding to include at all config.h */ +-#define VERSION 1.1.0 ++#define VERSION "1.1.0" + #else + #include "config.h" + #endif diff --git a/ports/readosm/portfile.cmake b/ports/readosm/portfile.cmake new file mode 100644 index 000000000..b3870d80e --- /dev/null +++ b/ports/readosm/portfile.cmake @@ -0,0 +1,78 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/readosm-1.1.0) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.gaia-gis.it/gaia-sins/readosm-1.1.0.tar.gz" + FILENAME "readosm-1.1.0.tar.gz" + SHA512 d3581f564c4461c6a1a3d5fd7d18a262c884b2ac935530064bfaebd6c05d692fb92cc600fb40e87e03f7160ebf0eeeb05f51a0e257935d056b233fe28fc01a11 +) +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-version-macro.patch +) + +find_program(NMAKE nmake) + +set(LIBS_ALL_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/expat.lib ${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib") +set(LIBS_ALL_REL "${CURRENT_INSTALLED_DIR}/lib/expat.lib ${CURRENT_INSTALLED_DIR}/lib/zlib.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 +################ +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 +) +vcpkg_copy_pdbs() +message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + +################ +# Release build +################ +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") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/readosm 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/readosm_i.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/readosm.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/lib/readosm.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib) +endif() + + +message(STATUS "Packaging ${TARGET_TRIPLET} done") -- cgit v1.2.3 From 5f29b0aad767c70d7aaa210f451d2e553ec5df1e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 2 Oct 2017 13:53:59 -0700 Subject: [libxmp-lite] Add INSTALL_HEADERS cmake macro --- ports/libxmp-lite/CMakeLists.txt | 9 ++++++++- ports/libxmp-lite/portfile.cmake | 2 -- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ports/libxmp-lite/CMakeLists.txt b/ports/libxmp-lite/CMakeLists.txt index 09323bf25..9495e0eb4 100644 --- a/ports/libxmp-lite/CMakeLists.txt +++ b/ports/libxmp-lite/CMakeLists.txt @@ -33,6 +33,11 @@ set(SOURCES src/virtual.c include_directories(include/libxmp-lite src) option(BUILD_SHARED_LIBS "Build shared libs" OFF) +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + option(INSTALL_HEADERS "Install header files" OFF) +else() + option(INSTALL_HEADERS "Install header files" ON) +endif() set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) @@ -55,4 +60,6 @@ install( RUNTIME DESTINATION bin ) -install(FILES ${HEADERS} DESTINATION include) +if(INSTALL_HEADERS) + install(FILES ${HEADERS} DESTINATION include) +endif() diff --git a/ports/libxmp-lite/portfile.cmake b/ports/libxmp-lite/portfile.cmake index 2d91f20b0..ac67940a1 100644 --- a/ports/libxmp-lite/portfile.cmake +++ b/ports/libxmp-lite/portfile.cmake @@ -23,7 +23,5 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - # Handle copyright file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxmp-lite RENAME copyright) -- cgit v1.2.3 From 20d911a91508c16bd01272ae94a3ca239a4d984e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 2 Oct 2017 13:57:55 -0700 Subject: [vcpkg] Fix use of UNICODE-sensitive Windows APIs --- toolsrc/src/commands_integrate.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/commands_integrate.cpp index 1bf26910c..fd2f11294 100644 --- a/toolsrc/src/commands_integrate.cpp +++ b/toolsrc/src/commands_integrate.cpp @@ -113,19 +113,20 @@ namespace vcpkg::Commands::Integrate static ElevationPromptChoice elevated_cmd_execute(const std::string& param) { - SHELLEXECUTEINFO sh_ex_info = {0}; + SHELLEXECUTEINFOW sh_ex_info = {0}; sh_ex_info.cbSize = sizeof(sh_ex_info); sh_ex_info.fMask = SEE_MASK_NOCLOSEPROCESS; sh_ex_info.hwnd = nullptr; - sh_ex_info.lpVerb = "runas"; - sh_ex_info.lpFile = "cmd"; // Application to start + sh_ex_info.lpVerb = L"runas"; + sh_ex_info.lpFile = L"cmd"; // Application to start - sh_ex_info.lpParameters = param.c_str(); // Additional parameters + auto wparam = Strings::to_utf16(param); + sh_ex_info.lpParameters = wparam.c_str(); // Additional parameters sh_ex_info.lpDirectory = nullptr; sh_ex_info.nShow = SW_HIDE; sh_ex_info.hInstApp = nullptr; - if (!ShellExecuteExA(&sh_ex_info)) + if (!ShellExecuteExW(&sh_ex_info)) { return ElevationPromptChoice::NO; } -- cgit v1.2.3 From bdbf00c7ab6f7dc5ca096391c913a0af5e291d19 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 2 Oct 2017 14:44:41 -0700 Subject: Add message when downloading cmake/git/nuget --- toolsrc/src/VcpkgPaths.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 4634a87c0..f227f9114 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -67,14 +67,18 @@ namespace vcpkg const fs::path& expected_downloaded_path, const std::array& version) { + const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); + System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", + Strings::to_utf8(tool_name), + version_as_string, + Strings::to_utf8(tool_name), + version_as_string); const fs::path script = scripts_folder / "fetchDependency.ps1"; const auto install_cmd = System::create_powershell_script_cmd(script, Strings::wformat(L"-Dependency %s", tool_name)); const System::ExitCodeAndOutput rc = System::cmd_execute_and_capture_output(install_cmd); if (rc.exit_code) { - const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); - System::println(System::Color::error, "Launching powershell failed or was denied when trying to fetch %s version %s.\n" "(No sufficient installed version was found)", -- cgit v1.2.3 From e4e5298911059837652824d47bce1e964305c72d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 24 Sep 2017 00:03:34 -0700 Subject: [zlib] Patch to not build more things than needed --- ports/zlib/CONTROL | 2 +- ports/zlib/cmake_dont_build_more_than_needed.patch | 42 ++++++++++++++++++++++ ports/zlib/portfile.cmake | 13 ++++--- 3 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 ports/zlib/cmake_dont_build_more_than_needed.patch diff --git a/ports/zlib/CONTROL b/ports/zlib/CONTROL index 30fe58949..c55963783 100644 --- a/ports/zlib/CONTROL +++ b/ports/zlib/CONTROL @@ -1,3 +1,3 @@ Source: zlib -Version: 1.2.11-2 +Version: 1.2.11-3 Description: A compression library diff --git a/ports/zlib/cmake_dont_build_more_than_needed.patch b/ports/zlib/cmake_dont_build_more_than_needed.patch new file mode 100644 index 000000000..229a2d055 --- /dev/null +++ b/ports/zlib/cmake_dont_build_more_than_needed.patch @@ -0,0 +1,42 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0fe939d..8d2f5f1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,6 +7,7 @@ set(VERSION "1.2.11") + + option(ASM686 "Enable building i686 assembly implementation") + option(AMD64 "Enable building amd64 assembly implementation") ++option(SKIP_BUILD_EXAMPLES "Skip build of the examples" OFF) + + set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") + set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") +@@ -211,7 +212,15 @@ elseif(BUILD_SHARED_LIBS AND WIN32) + endif() + + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) +- install(TARGETS zlib zlibstatic ++ if (BUILD_SHARED_LIBS) ++ set(ZLIB_TARGETS zlib) ++ set_target_properties(zlibstatic PROPERTIES EXCLUDE_FROM_ALL ON) ++ else() ++ set(ZLIB_TARGETS zlibstatic) ++ set_target_properties(zlib PROPERTIES EXCLUDE_FROM_ALL ON) ++ endif() ++ ++ install(TARGETS ${ZLIB_TARGETS} + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) +@@ -230,6 +239,7 @@ endif() + # Example binaries + #============================================================================ + ++if (NOT SKIP_BUILD_EXAMPLES) + add_executable(example test/example.c) + target_link_libraries(example zlib) + add_test(example example) +@@ -247,3 +257,4 @@ if(HAVE_OFF64_T) + target_link_libraries(minigzip64 zlib) + set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + endif() ++endif() diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index f69c51bea..c41d61bda 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -7,11 +7,18 @@ vcpkg_download_distfile(ARCHIVE_FILE ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/cmake_dont_build_more_than_needed.patch +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DSKIP_INSTALL_FILES=ON + -DSKIP_BUILD_EXAMPLES=ON OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) @@ -19,11 +26,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Both dynamic and static are built, so keep only the one needed -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib) -else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/zlib.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zlibd.lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib ${CURRENT_PACKAGES_DIR}/lib/zlib.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zlibd.lib) endif() -- cgit v1.2.3 From d25a072c76ff81934813f20116788140621619ba Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 2 Oct 2017 14:57:52 -0700 Subject: Show warning instead of failing if port cannot be parsed --- toolsrc/src/Paragraphs.cpp | 18 +++++++++++++++--- toolsrc/src/commands_install.cpp | 4 ++-- toolsrc/src/commands_search.cpp | 21 +-------------------- 3 files changed, 18 insertions(+), 25 deletions(-) diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp index a7dee4fd3..6a6f191df 100644 --- a/toolsrc/src/Paragraphs.cpp +++ b/toolsrc/src/Paragraphs.cpp @@ -254,7 +254,7 @@ namespace vcpkg::Paragraphs for (auto&& path : fs.get_files_non_recursive(ports_dir)) { auto maybe_spgh = try_load_port(fs, path); - if (auto spgh = maybe_spgh.get()) + if (const auto spgh = maybe_spgh.get()) { ret.paragraphs.emplace_back(std::move(*spgh)); } @@ -272,8 +272,20 @@ namespace vcpkg::Paragraphs auto results = try_load_all_ports(fs, ports_dir); if (!results.errors.empty()) { - print_error_message(results.errors); - Checks::exit_fail(VCPKG_LINE_INFO); + if (GlobalState::debugging) + { + print_error_message(results.errors); + } + else + { + for (auto&& error : results.errors) + { + System::println( + System::Color::warning, "Warning: an error occurred while parsing '%s'", error->name); + } + System::println(System::Color::warning, + "Use '--debug' to get more information about the parse failures.\n"); + } } return std::move(results.paragraphs); } diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index aca25996e..d815332fe 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -568,8 +568,8 @@ namespace vcpkg::Commands::Install if (GlobalState::feature_packages) { std::unordered_map scf_map; - auto all_ports = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); - for (auto&& port : all_ports.paragraphs) + auto all_ports = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + for (auto&& port : all_ports) { scf_map[port->core_paragraph->name] = std::move(*port); } diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp index 1ccec9fbe..d35a546c4 100644 --- a/toolsrc/src/commands_search.cpp +++ b/toolsrc/src/commands_search.cpp @@ -87,27 +87,8 @@ namespace vcpkg::Commands::Search const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}); - auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); + auto source_paragraphs = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - if (!sources_and_errors.errors.empty()) - { - if (GlobalState::debugging) - { - print_error_message(sources_and_errors.errors); - } - else - { - for (auto&& error : sources_and_errors.errors) - { - System::println( - System::Color::warning, "Warning: an error occurred while parsing '%s'", error->name); - } - System::println(System::Color::warning, - "Use '--debug' to get more information about the parse failures.\n"); - } - } - - auto& source_paragraphs = sources_and_errors.paragraphs; if (options.find(OPTION_GRAPH) != options.cend()) { const std::string graph_as_string = create_graph_as_string(source_paragraphs); -- cgit v1.2.3 From 1130cc378442abd033bb99fa6dede812a5dc2825 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 2 Oct 2017 15:54:35 -0700 Subject: [proj][proj4] Rename proj to proj4. Leave empty forwarder behind. --- ports/gdal/CONTROL | 2 +- ...etection-of-recent-visual-studio-versions.patch | 26 ------ ...rror-by-only-setting-properties-for-targe.patch | 52 ------------ ...onfigurable-cmake-config-install-location.patch | 98 ---------------------- ports/proj/CONTROL | 5 +- ports/proj/portfile.cmake | 58 +------------ ...etection-of-recent-visual-studio-versions.patch | 26 ++++++ ...rror-by-only-setting-properties-for-targe.patch | 52 ++++++++++++ ...onfigurable-cmake-config-install-location.patch | 98 ++++++++++++++++++++++ ports/proj4/CONTROL | 3 + ports/proj4/portfile.cmake | 68 +++++++++++++++ ports/vtk/CONTROL | 2 +- 12 files changed, 253 insertions(+), 237 deletions(-) delete mode 100644 ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch delete mode 100644 ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch delete mode 100644 ports/proj/0003-CMake-configurable-cmake-config-install-location.patch create mode 100644 ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch create mode 100644 ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch create mode 100644 ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch create mode 100644 ports/proj4/CONTROL create mode 100644 ports/proj4/portfile.cmake diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index 868a5e929..083a52800 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,4 +1,4 @@ Source: gdal Version: 1.11.3-5 Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. -Build-Depends: proj, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma +Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma diff --git a/ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch b/ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch deleted file mode 100644 index 9be5438aa..000000000 --- a/ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ca8bb14234091ab7b1ada2b9e5abb04f40d459cb Mon Sep 17 00:00:00 2001 -From: Manuel Massing -Date: Tue, 22 Nov 2016 12:00:39 +0100 -Subject: [PATCH 1/3] CMake: add detection of recent visual studio versions - ---- - cmake/Proj4SystemInfo.cmake | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/cmake/Proj4SystemInfo.cmake b/cmake/Proj4SystemInfo.cmake -index 294a50b..c7fb6bf 100644 ---- a/cmake/Proj4SystemInfo.cmake -+++ b/cmake/Proj4SystemInfo.cmake -@@ -50,6 +50,9 @@ if(WIN32) - if(MSVC_VERSION EQUAL 1800) - set(PROJ_COMPILER_NAME "msvc-12.0") #Visual Studio 2013 - endif() -+ if(MSVC_VERSION EQUAL 1900) -+ set(PROJ_COMPILER_NAME "msvc-14.0") #Visual Studio 2015 -+ endif() - endif(MSVC) - - if(MINGW) --- -2.9.2.windows.1 - diff --git a/ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch b/ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch deleted file mode 100644 index 2c470570e..000000000 --- a/ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 1265d13f29259be05535241e9bcbfcf16857dc06 Mon Sep 17 00:00:00 2001 -From: Manuel Massing -Date: Tue, 22 Nov 2016 12:04:10 +0100 -Subject: [PATCH 2/3] CMake: fix error by only setting properties for targets - which are actually defined - ---- - src/CMakeLists.txt | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 8d7e7d1..59ad00a 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -22,25 +22,30 @@ if(NOT MSVC) - endif () - endif () - -+ - if(BUILD_CS2CS) -- include(bin_cs2cs.cmake) -+ list(APPEND BINARY_TARGETS cs2cs) -+ include(bin_cs2cs.cmake) - endif(BUILD_CS2CS) - - if(BUILD_PROJ) -+ list(APPEND BINARY_TARGETS proj) - include(bin_proj.cmake) - endif(BUILD_PROJ) - - if(BUILD_GEOD) -+ list(APPEND BINARY_TARGETS geod) - include(bin_geod.cmake) - include(bin_geodtest.cmake) - endif(BUILD_GEOD) - - if(BUILD_NAD2BIN) -+ list(APPEND BINARY_TARGETS nad2bin) - include(bin_nad2bin.cmake) - endif(BUILD_NAD2BIN) - --if (MSVC OR CMAKE_CONFIGURATION_TYPES) -+if ((MSVC OR CMAKE_CONFIGURATION_TYPES) AND BINARY_TARGETS) - # Add _d suffix for your debug versions of the tools -- set_target_properties (cs2cs binproj geod nad2bin PROPERTIES -- DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) -+ set_target_properties(${BINARY_TARGETS} PROPERTIES -+ DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) - endif () --- -2.9.2.windows.1 - diff --git a/ports/proj/0003-CMake-configurable-cmake-config-install-location.patch b/ports/proj/0003-CMake-configurable-cmake-config-install-location.patch deleted file mode 100644 index 5870e12ea..000000000 --- a/ports/proj/0003-CMake-configurable-cmake-config-install-location.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 0be627798d943558c674d4d92767ca255d847631 Mon Sep 17 00:00:00 2001 -From: Manuel Massing -Date: Tue, 22 Nov 2016 12:26:39 +0100 -Subject: [PATCH 3/3] CMake: configurable cmake config install location - ---- - CMakeLists.txt | 1 + - cmake/CMakeLists.txt | 14 +++++++------- - cmake/Proj4InstallPath.cmake | 12 +++++++++--- - 3 files changed, 17 insertions(+), 10 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cde21f0..1b1f892 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -106,6 +106,7 @@ set(LIBDIR "${DEFAULT_LIBDIR}" CACHE PATH "The directory to install libraries in - set(DATADIR "${DEFAULT_DATADIR}" CACHE PATH "The directory to install data files into.") - set(DOCDIR "${DEFAULT_DOCDIR}" CACHE PATH "The directory to install doc files into.") - set(INCLUDEDIR "${DEFAULT_INCLUDEDIR}" CACHE PATH "The directory to install includes into.") -+set(CMAKEDIR "${DEFAULT_CMAKE_CONFIGDIR}" CACHE PATH "The directory to install cmake files into.") - - ################################################################################# - # Build configured components -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index 742da0e..2bdef0d 100644 ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -2,13 +2,13 @@ - # ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative - # path to the root from there. (Note that the whole install tree can - # be relocated.) --if (NOT WIN32) -- set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") -- set (PROJECT_ROOT_DIR "../../..") --else () -- set (INSTALL_CMAKE_DIR "cmake") -- set (PROJECT_ROOT_DIR "..") --endif () -+ -+set (INSTALL_CMAKE_DIR ${CMAKEDIR}) -+if(NOT IS_ABSOLUTE ${INSTALL_CMAKE_DIR}) -+ set(INSTALL_CMAKE_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKEDIR}") -+endif() -+ -+file(RELATIVE_PATH PROJECT_ROOT_DIR ${INSTALL_CMAKE_DIR} ${CMAKE_INSTALL_PREFIX}) - - string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER) - configure_file (project-config.cmake.in project-config.cmake @ONLY) -diff --git a/cmake/Proj4InstallPath.cmake b/cmake/Proj4InstallPath.cmake -index da1491c..826fb29 100644 ---- a/cmake/Proj4InstallPath.cmake -+++ b/cmake/Proj4InstallPath.cmake -@@ -28,13 +28,15 @@ if(WIN32) - set(DEFAULT_DATA_SUBDIR share) - set(DEFAULT_INCLUDE_SUBDIR local/include) - set(DEFAULT_DOC_SUBDIR share/doc/proj) -+ set(DEFAULT_CMAKE_CONFIG_SUBDIR "cmake") - else() -- # Common locatoins for Unix and Mac OS X -+ # Common locations for Unix and Mac OS X - set(DEFAULT_BIN_SUBDIR bin) - set(DEFAULT_LIB_SUBDIR lib) - set(DEFAULT_DATA_SUBDIR share/proj) - set(DEFAULT_DOC_SUBDIR doc/proj) - set(DEFAULT_INCLUDE_SUBDIR include) -+ set(DEFAULT_CMAKE_CONFIG_SUBDIR "share/cmake/${PROJECT_NAME}") - endif() - - # Locations are changeable by user to customize layout of PDAL installation -@@ -49,19 +51,23 @@ set(PROJ_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING - "Subdirectory where data will be installed") - set(PROJ_DOC_SUBDIR ${DEFAULT_DOC_SUBDIR} CACHE STRING - "Subdirectory where data will be installed") -- -+set(PROJ_CMAKE_CONFIG_SUBDIR ${DEFAULT_CMAKE_CONFIG_SUBDIR} CACHE STRING -+ "Subdirectory where cmake configuration files will be installed") -+ - # Mark *DIR variables as advanced and dedicated to use by power-users only. - mark_as_advanced(PROJ_ROOT_DIR - PROJ_BIN_SUBDIR - PROJ_LIB_SUBDIR - PROJ_INCLUDE_SUBDIR - PROJ_DATA_SUBDIR -- PROJ_DOC_SUBDIR ) -+ PROJ_DOC_SUBDIR -+ PROJ_CMAKE_CONFIG_SUBDIR) - - set(DEFAULT_BINDIR "${PROJ_BIN_SUBDIR}") - set(DEFAULT_LIBDIR "${PROJ_LIB_SUBDIR}") - set(DEFAULT_DATADIR "${PROJ_DATA_SUBDIR}") - set(DEFAULT_DOCDIR "${PROJ_DOC_SUBDIR}") - set(DEFAULT_INCLUDEDIR "${PROJ_INCLUDE_SUBDIR}") -+set(DEFAULT_CMAKE_CONFIGDIR "${PROJ_CMAKE_CONFIG_SUBDIR}") - - --- -2.9.2.windows.1 - diff --git a/ports/proj/CONTROL b/ports/proj/CONTROL index 695fa53ce..d6c204fda 100644 --- a/ports/proj/CONTROL +++ b/ports/proj/CONTROL @@ -1,3 +1,4 @@ Source: proj -Version: 4.9.3-1 -Description: PROJ.4 library for cartographic projections +Version: 0 +Description: a stub package that pulls in proj4. Do not depend on this package. +Build-Depends: proj4 diff --git a/ports/proj/portfile.cmake b/ports/proj/portfile.cmake index 6007ab62a..cc6e26fcb 100644 --- a/ports/proj/portfile.cmake +++ b/ports/proj/portfile.cmake @@ -1,57 +1 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/proj-4.9.3) -vcpkg_download_distfile(ARCHIVE - URLS "http://download.osgeo.org/proj/proj-4.9.3.zip" - FILENAME "proj-4.9.3.zip" - SHA512 c9703008cd1f75fe1239b180158e560b9b88ae2ffd900b72923c716908eb86d1abbc4230647af5e3131f8c34481bdc66b03826d669620161ffcfbe67801cb631 -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH}/ - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-CMake-add-detection-of-recent-visual-studio-versions.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch - ${CMAKE_CURRENT_LIST_DIR}/0003-CMake-configurable-cmake-config-install-location.patch -) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=YES") -else() - list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=NO") -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS ${CMAKE_OPTIONS} - -DPROJ_LIB_SUBDIR=lib - -DPROJ_INCLUDE_SUBDIR=include - -DPROJ_DATA_SUBDIR=share/proj - -DPROJ_CMAKE_CONFIG_SUBDIR=share/proj - -DBUILD_CS2CS=NO - -DBUILD_PROJ=NO - -DBUILD_GEOD=NO - -DBUILD_NAD2BIN=NO - -DPROJ4_TESTS=NO -) - -vcpkg_install_cmake() - - -# Rename library and adapt cmake configuration -# N.B. debug cmake export is not copied, as it's not relocatable -file(READ ${CURRENT_PACKAGES_DIR}/share/proj/proj4-targets-release.cmake PROJ4_TARGETS_RELEASE) -string(REPLACE "proj_4_9.lib" "proj.lib" PROJ4_TARGETS_RELEASE ${PROJ4_TARGETS_RELEASE}) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj/proj4-targets-release.cmake ${PROJ4_TARGETS_RELEASE}) - -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib) - -# Remove duplicate headers installed from debug build -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Remove data installed from debug build -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/proj) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/proj/COPYING ${CURRENT_PACKAGES_DIR}/share/proj/copyright) +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch b/ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch new file mode 100644 index 000000000..9be5438aa --- /dev/null +++ b/ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch @@ -0,0 +1,26 @@ +From ca8bb14234091ab7b1ada2b9e5abb04f40d459cb Mon Sep 17 00:00:00 2001 +From: Manuel Massing +Date: Tue, 22 Nov 2016 12:00:39 +0100 +Subject: [PATCH 1/3] CMake: add detection of recent visual studio versions + +--- + cmake/Proj4SystemInfo.cmake | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/cmake/Proj4SystemInfo.cmake b/cmake/Proj4SystemInfo.cmake +index 294a50b..c7fb6bf 100644 +--- a/cmake/Proj4SystemInfo.cmake ++++ b/cmake/Proj4SystemInfo.cmake +@@ -50,6 +50,9 @@ if(WIN32) + if(MSVC_VERSION EQUAL 1800) + set(PROJ_COMPILER_NAME "msvc-12.0") #Visual Studio 2013 + endif() ++ if(MSVC_VERSION EQUAL 1900) ++ set(PROJ_COMPILER_NAME "msvc-14.0") #Visual Studio 2015 ++ endif() + endif(MSVC) + + if(MINGW) +-- +2.9.2.windows.1 + diff --git a/ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch b/ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch new file mode 100644 index 000000000..2c470570e --- /dev/null +++ b/ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch @@ -0,0 +1,52 @@ +From 1265d13f29259be05535241e9bcbfcf16857dc06 Mon Sep 17 00:00:00 2001 +From: Manuel Massing +Date: Tue, 22 Nov 2016 12:04:10 +0100 +Subject: [PATCH 2/3] CMake: fix error by only setting properties for targets + which are actually defined + +--- + src/CMakeLists.txt | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 8d7e7d1..59ad00a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -22,25 +22,30 @@ if(NOT MSVC) + endif () + endif () + ++ + if(BUILD_CS2CS) +- include(bin_cs2cs.cmake) ++ list(APPEND BINARY_TARGETS cs2cs) ++ include(bin_cs2cs.cmake) + endif(BUILD_CS2CS) + + if(BUILD_PROJ) ++ list(APPEND BINARY_TARGETS proj) + include(bin_proj.cmake) + endif(BUILD_PROJ) + + if(BUILD_GEOD) ++ list(APPEND BINARY_TARGETS geod) + include(bin_geod.cmake) + include(bin_geodtest.cmake) + endif(BUILD_GEOD) + + if(BUILD_NAD2BIN) ++ list(APPEND BINARY_TARGETS nad2bin) + include(bin_nad2bin.cmake) + endif(BUILD_NAD2BIN) + +-if (MSVC OR CMAKE_CONFIGURATION_TYPES) ++if ((MSVC OR CMAKE_CONFIGURATION_TYPES) AND BINARY_TARGETS) + # Add _d suffix for your debug versions of the tools +- set_target_properties (cs2cs binproj geod nad2bin PROPERTIES +- DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) ++ set_target_properties(${BINARY_TARGETS} PROPERTIES ++ DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) + endif () +-- +2.9.2.windows.1 + diff --git a/ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch b/ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch new file mode 100644 index 000000000..5870e12ea --- /dev/null +++ b/ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch @@ -0,0 +1,98 @@ +From 0be627798d943558c674d4d92767ca255d847631 Mon Sep 17 00:00:00 2001 +From: Manuel Massing +Date: Tue, 22 Nov 2016 12:26:39 +0100 +Subject: [PATCH 3/3] CMake: configurable cmake config install location + +--- + CMakeLists.txt | 1 + + cmake/CMakeLists.txt | 14 +++++++------- + cmake/Proj4InstallPath.cmake | 12 +++++++++--- + 3 files changed, 17 insertions(+), 10 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cde21f0..1b1f892 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -106,6 +106,7 @@ set(LIBDIR "${DEFAULT_LIBDIR}" CACHE PATH "The directory to install libraries in + set(DATADIR "${DEFAULT_DATADIR}" CACHE PATH "The directory to install data files into.") + set(DOCDIR "${DEFAULT_DOCDIR}" CACHE PATH "The directory to install doc files into.") + set(INCLUDEDIR "${DEFAULT_INCLUDEDIR}" CACHE PATH "The directory to install includes into.") ++set(CMAKEDIR "${DEFAULT_CMAKE_CONFIGDIR}" CACHE PATH "The directory to install cmake files into.") + + ################################################################################# + # Build configured components +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 742da0e..2bdef0d 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -2,13 +2,13 @@ + # ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative + # path to the root from there. (Note that the whole install tree can + # be relocated.) +-if (NOT WIN32) +- set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") +- set (PROJECT_ROOT_DIR "../../..") +-else () +- set (INSTALL_CMAKE_DIR "cmake") +- set (PROJECT_ROOT_DIR "..") +-endif () ++ ++set (INSTALL_CMAKE_DIR ${CMAKEDIR}) ++if(NOT IS_ABSOLUTE ${INSTALL_CMAKE_DIR}) ++ set(INSTALL_CMAKE_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKEDIR}") ++endif() ++ ++file(RELATIVE_PATH PROJECT_ROOT_DIR ${INSTALL_CMAKE_DIR} ${CMAKE_INSTALL_PREFIX}) + + string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER) + configure_file (project-config.cmake.in project-config.cmake @ONLY) +diff --git a/cmake/Proj4InstallPath.cmake b/cmake/Proj4InstallPath.cmake +index da1491c..826fb29 100644 +--- a/cmake/Proj4InstallPath.cmake ++++ b/cmake/Proj4InstallPath.cmake +@@ -28,13 +28,15 @@ if(WIN32) + set(DEFAULT_DATA_SUBDIR share) + set(DEFAULT_INCLUDE_SUBDIR local/include) + set(DEFAULT_DOC_SUBDIR share/doc/proj) ++ set(DEFAULT_CMAKE_CONFIG_SUBDIR "cmake") + else() +- # Common locatoins for Unix and Mac OS X ++ # Common locations for Unix and Mac OS X + set(DEFAULT_BIN_SUBDIR bin) + set(DEFAULT_LIB_SUBDIR lib) + set(DEFAULT_DATA_SUBDIR share/proj) + set(DEFAULT_DOC_SUBDIR doc/proj) + set(DEFAULT_INCLUDE_SUBDIR include) ++ set(DEFAULT_CMAKE_CONFIG_SUBDIR "share/cmake/${PROJECT_NAME}") + endif() + + # Locations are changeable by user to customize layout of PDAL installation +@@ -49,19 +51,23 @@ set(PROJ_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING + "Subdirectory where data will be installed") + set(PROJ_DOC_SUBDIR ${DEFAULT_DOC_SUBDIR} CACHE STRING + "Subdirectory where data will be installed") +- ++set(PROJ_CMAKE_CONFIG_SUBDIR ${DEFAULT_CMAKE_CONFIG_SUBDIR} CACHE STRING ++ "Subdirectory where cmake configuration files will be installed") ++ + # Mark *DIR variables as advanced and dedicated to use by power-users only. + mark_as_advanced(PROJ_ROOT_DIR + PROJ_BIN_SUBDIR + PROJ_LIB_SUBDIR + PROJ_INCLUDE_SUBDIR + PROJ_DATA_SUBDIR +- PROJ_DOC_SUBDIR ) ++ PROJ_DOC_SUBDIR ++ PROJ_CMAKE_CONFIG_SUBDIR) + + set(DEFAULT_BINDIR "${PROJ_BIN_SUBDIR}") + set(DEFAULT_LIBDIR "${PROJ_LIB_SUBDIR}") + set(DEFAULT_DATADIR "${PROJ_DATA_SUBDIR}") + set(DEFAULT_DOCDIR "${PROJ_DOC_SUBDIR}") + set(DEFAULT_INCLUDEDIR "${PROJ_INCLUDE_SUBDIR}") ++set(DEFAULT_CMAKE_CONFIGDIR "${PROJ_CMAKE_CONFIG_SUBDIR}") + + +-- +2.9.2.windows.1 + diff --git a/ports/proj4/CONTROL b/ports/proj4/CONTROL new file mode 100644 index 000000000..cf2519b12 --- /dev/null +++ b/ports/proj4/CONTROL @@ -0,0 +1,3 @@ +Source: proj4 +Version: 4.9.3-1 +Description: PROJ.4 library for cartographic projections diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake new file mode 100644 index 000000000..626d6b2e4 --- /dev/null +++ b/ports/proj4/portfile.cmake @@ -0,0 +1,68 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/proj-4.9.3) +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/proj/proj-4.9.3.zip" + FILENAME "proj-4.9.3.zip" + SHA512 c9703008cd1f75fe1239b180158e560b9b88ae2ffd900b72923c716908eb86d1abbc4230647af5e3131f8c34481bdc66b03826d669620161ffcfbe67801cb631 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH}/ + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-CMake-add-detection-of-recent-visual-studio-versions.patch + ${CMAKE_CURRENT_LIST_DIR}/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch + ${CMAKE_CURRENT_LIST_DIR}/0003-CMake-configurable-cmake-config-install-location.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=YES") +else() + list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=NO") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${CMAKE_OPTIONS} + -DPROJ_LIB_SUBDIR=lib + -DPROJ_INCLUDE_SUBDIR=include + -DPROJ_DATA_SUBDIR=share/proj4 + -DPROJ_CMAKE_CONFIG_SUBDIR=share/proj4 + -DBUILD_CS2CS=NO + -DBUILD_PROJ=NO + -DBUILD_GEOD=NO + -DBUILD_NAD2BIN=NO + -DPROJ4_TESTS=NO +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/proj4) + +# Rename library and adapt cmake configuration +file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake _contents) +string(REPLACE "proj_4_9.lib" "proj.lib" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake "${_contents}") + +file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake _contents) +string(REPLACE "proj_4_9_d.lib" "projd.lib" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake "${_contents}") + +file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake _contents) +string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")" + "set(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}\")\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + _contents "${_contents}" +) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake "${_contents}") + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib) + +# Remove duplicate headers installed from debug build +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Remove data installed from debug build +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/proj4) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/proj4/COPYING ${CURRENT_PACKAGES_DIR}/share/proj4/copyright) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index fdf8d42c4..284ccecd3 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,4 @@ Source: vtk Version: 8.0.0-2 Description: Software system for 3D computer graphics, image processing, and visualization -Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj, lz4, libtheora +Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj4, lz4, libtheora -- cgit v1.2.3 From 4c4e6c7c7af52732de07ca247cf62e2a3c5d2f25 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 2 Oct 2017 16:00:45 -0700 Subject: Extract local variable --- toolsrc/src/VcpkgPaths.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index f227f9114..d491cb7fb 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -67,11 +67,12 @@ namespace vcpkg const fs::path& expected_downloaded_path, const std::array& version) { + const std::string tool_name_utf8 = Strings::to_utf8(tool_name); const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", - Strings::to_utf8(tool_name), + tool_name_utf8, version_as_string, - Strings::to_utf8(tool_name), + tool_name_utf8, version_as_string); const fs::path script = scripts_folder / "fetchDependency.ps1"; const auto install_cmd = @@ -82,7 +83,7 @@ namespace vcpkg System::println(System::Color::error, "Launching powershell failed or was denied when trying to fetch %s version %s.\n" "(No sufficient installed version was found)", - Strings::to_utf8(tool_name), + tool_name_utf8, version_as_string); { auto locked_metrics = Metrics::g_metrics.lock(); -- cgit v1.2.3 From ca692e52cee55da2f9d65d66e5f3997f3a335743 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 2 Oct 2017 16:40:18 -0700 Subject: Replace deprecated std::codecvt/std::wstring_convert. Fixes building with v141 --- toolsrc/src/vcpkg_Strings.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 1bd96fc12..964ed73d0 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -73,14 +73,20 @@ namespace vcpkg::Strings { std::wstring to_utf16(const CStringView s) { - std::wstring_convert, wchar_t> conversion; - return conversion.from_bytes(s); + const size_t size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); + std::wstring output; + output.resize(size - 1); + MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, output.data(), size - 1); + return output; } std::string to_utf8(const CWStringView w) { - std::wstring_convert, wchar_t> conversion; - return conversion.to_bytes(w); + const size_t size = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, nullptr, 0, nullptr, nullptr); + std::string output; + output.resize(size - 1); + WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, output.data(), size - 1, nullptr, nullptr); + return output; } std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern) -- cgit v1.2.3 From f72cf87ab21c1b6966c09ec3e7fd5d7f9052ea0a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 2 Oct 2017 16:41:52 -0700 Subject: Change size_t to int (which is the actual return type) --- toolsrc/src/vcpkg_Strings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 964ed73d0..07147862f 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -73,7 +73,7 @@ namespace vcpkg::Strings { std::wstring to_utf16(const CStringView s) { - const size_t size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); + const int size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); std::wstring output; output.resize(size - 1); MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, output.data(), size - 1); @@ -82,7 +82,7 @@ namespace vcpkg::Strings std::string to_utf8(const CWStringView w) { - const size_t size = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, nullptr, 0, nullptr, nullptr); + const int size = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, nullptr, 0, nullptr, nullptr); std::string output; output.resize(size - 1); WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, output.data(), size - 1, nullptr, nullptr); -- cgit v1.2.3 From e25a31eca8550780ce96586ef27063728441b2e2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 2 Oct 2017 16:55:06 -0700 Subject: Suppress 4768 warning from shlobj.h --- toolsrc/include/pch.h | 7 +++++-- toolsrc/src/vcpkg.cpp | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index 770bcf07a..0f34063f8 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -2,7 +2,7 @@ #define NOMINMAX #define WIN32_LEAN_AND_MEAN - +#pragma warning(suppress : 4768) #include #include @@ -28,7 +28,10 @@ #include #include #include -#include +#pragma warning(push) +#pragma warning(disable : 4768) +#include +#pragma warning(pop) #include #include #include diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index f4300a73c..706c641fb 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -11,7 +11,10 @@ #include "vcpkg_Strings.h" #include "vcpkg_System.h" #include "vcpkglib.h" +#pragma warning(push) +#pragma warning(disable : 4768) #include +#pragma warning(pop) #include #include #include -- cgit v1.2.3 From 6e6c2c99485902c593f3b7a21ef265d2db03c1f2 Mon Sep 17 00:00:00 2001 From: Matt Powley Date: Tue, 3 Oct 2017 11:58:22 +0100 Subject: [telnetpp] Initial port for 'Telnet++', a C++ 14 implementation of the Telnet Session Layer protocol * Initial commit for a port of Telnet++ (telnetpp) * Upstream source: https://github.com/KazDragon/telnetpp * Depends on Boost and Zlib (Additional dependency on GTest due to upstream authoring error) --- ports/telnetpp/CONTROL | 4 ++++ ports/telnetpp/portfile.cmake | 47 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 ports/telnetpp/CONTROL create mode 100644 ports/telnetpp/portfile.cmake diff --git a/ports/telnetpp/CONTROL b/ports/telnetpp/CONTROL new file mode 100644 index 000000000..595e1cd88 --- /dev/null +++ b/ports/telnetpp/CONTROL @@ -0,0 +1,4 @@ +Source: telnetpp +Version: 1.2.4 +Description: Telnet++ is an implementation of the Telnet Session Layer protocol using C++14 +Build-Depends: boost, gtest, zlib diff --git a/ports/telnetpp/portfile.cmake b/ports/telnetpp/portfile.cmake new file mode 100644 index 000000000..e52d69877 --- /dev/null +++ b/ports/telnetpp/portfile.cmake @@ -0,0 +1,47 @@ +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Telnetpp does not currently support UWP") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KazDragon/telnetpp + REF v1.2.4 + SHA512 16879fd377a7d13aac497bc9989c026acc1ed5b4eb9338d151d3d827c7c4c44fab84dd06c5fe55be4efe49a98ea46e62e80bbc51c8503d6ba1bf5534fee16c84 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Remove duplicate header files and CMake input file +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/telnetpp/version.hpp.in) + +# The install target in the upstream package does not install the binary output +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/telnetpp.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/telnetpp.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Move CMake installed configuration files and adjust for vcpkg debug location +file(COPY ${CURRENT_PACKAGES_DIR}/lib/telnetpp/telnetpp-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/telnetpp/telnetpp-config-release.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/telnetpp/telnetpp-config-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/telnetpp) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/telnetpp) + +file(READ ${CURRENT_PACKAGES_DIR}/share/telnetpp/telnetpp-config-debug.cmake DEBUG_CONFIG) +string(REPLACE "\${_IMPORT_PREFIX}/lib/telnetpp.lib" + "\${_IMPORT_PREFIX}/debug/lib/telnetpp.lib" DEBUG_CONFIG ${DEBUG_CONFIG}) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/telnetpp/telnetpp-config-debug.cmake "${DEBUG_CONFIG}") + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp RENAME COPYRIGHT) -- cgit v1.2.3 From 4e6801093986e53d2e88cc02a8875585e4e418b0 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Tue, 3 Oct 2017 22:31:21 +0900 Subject: Extract WiX installer using Dark Extract WiX installer using Dark. It will be standalone extract files from installer of Kinect SDK 2.x even if Kinect SDK 2.x is not installed in user system. --- ports/kinectsdk2/portfile.cmake | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/ports/kinectsdk2/portfile.cmake b/ports/kinectsdk2/portfile.cmake index 5795825dd..05aa1fd2e 100644 --- a/ports/kinectsdk2/portfile.cmake +++ b/ports/kinectsdk2/portfile.cmake @@ -16,10 +16,35 @@ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() -get_filename_component(KINECTSDK20_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect\\v2.0;SDKInstallPath]" ABSOLUTE CACHE) -if(NOT EXISTS "${KINECTSDK20_DIR}") - message(FATAL_ERROR "Error: Could not find Kinect for Windows SDK v2.x. It can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=44561.") -endif() +set(KINECTSDK20_VERSION "v2.0_1409") +vcpkg_download_distfile(KINECTSDK20_INSTALLER + URLS "https://download.microsoft.com/download/F/2/D/F2D1012E-3BC6-49C5-B8B3-5ACFF58AF7B8/KinectSDK-${KINECTSDK20_VERSION}-Setup.exe" + FILENAME "KinectSDK-${KINECTSDK20_VERSION}-Setup.exe" + SHA512 ae3b00f45282ab2ed6ea36c09e42e1b274074f41546ecfbe00facf1fffa2e5a762ffeffb9ba2194f716e8122e0fbd9a8ef63c62be68d2b50a40e4f8c5a821f5f +) + +vcpkg_find_acquire_program(DARK) + +set(KINECTSDK20_WIX_INSTALLER "${KINECTSDK20_INSTALLER}") +set(KINECTSDK20_WIX_EXTRACT_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/wix") +vcpkg_execute_required_process( + COMMAND ${DARK} -x ${KINECTSDK20_WIX_EXTRACT_DIR} ${KINECTSDK20_WIX_INSTALLER} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME extract_wix_installer +) + +file(TO_NATIVE_PATH "${KINECTSDK20_WIX_EXTRACT_DIR}/AttachedContainer/KinectSDK-${KINECTSDK20_VERSION}-x64.msi" KINECTSDK20_MSI_INSTALLER) +file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/src/installer/msi" KINECTSDK20_MSI_EXTRACT_DIR) +file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/msiexec.log" MSIEXEC_LOG_PATH) +set(BATCH_FILE ${CURRENT_BUILDTREES_DIR}/msiextract-msmpi.bat) +file(WRITE ${BATCH_FILE} "msiexec.exe /a \"${KINECTSDK20_MSI_INSTALLER}\" /qn /log \"${MSIEXEC_LOG_PATH}\" TARGETDIR=\"${KINECTSDK20_MSI_EXTRACT_DIR}\"") +vcpkg_execute_required_process( + COMMAND ${BATCH_FILE} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME extract_msi_installer +) + +set(KINECTSDK20_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/msi/Microsoft SDKs/Kinect/${KINECTSDK20_VERSION}") file( INSTALL -- cgit v1.2.3 From 4ad9ae8560d7132e9dc83dbfbfedc9d625c40366 Mon Sep 17 00:00:00 2001 From: alex85k Date: Tue, 3 Oct 2017 23:31:12 +0500 Subject: [ReadOsm][FreeXL] fix spacebar-in-path problems --- ports/freexl/portfile.cmake | 12 ++++++------ ports/readosm/portfile.cmake | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ports/freexl/portfile.cmake b/ports/freexl/portfile.cmake index 726b56db2..b808d2a60 100644 --- a/ports/freexl/portfile.cmake +++ b/ports/freexl/portfile.cmake @@ -16,12 +16,12 @@ vcpkg_apply_patches( find_program(NMAKE nmake) set(LIBS_ALL_DBG - "${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib \ - ${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib" + "\"${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" + "\"${CURRENT_INSTALLED_DIR}/lib/libiconv.lib\" \ + \"${CURRENT_INSTALLED_DIR}/lib/libcharset.lib\"" ) @@ -42,7 +42,7 @@ 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}" + 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 ) @@ -57,7 +57,7 @@ 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}" + 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 ) diff --git a/ports/readosm/portfile.cmake b/ports/readosm/portfile.cmake index b3870d80e..40af755eb 100644 --- a/ports/readosm/portfile.cmake +++ b/ports/readosm/portfile.cmake @@ -16,8 +16,8 @@ vcpkg_apply_patches( find_program(NMAKE nmake) -set(LIBS_ALL_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/expat.lib ${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib") -set(LIBS_ALL_REL "${CURRENT_INSTALLED_DIR}/lib/expat.lib ${CURRENT_INSTALLED_DIR}/lib/zlib.lib") +set(LIBS_ALL_DBG "\"${CURRENT_INSTALLED_DIR}/debug/lib/expat.lib\" \"${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib\"") +set(LIBS_ALL_REL "\"${CURRENT_INSTALLED_DIR}/lib/expat.lib\" \"${CURRENT_INSTALLED_DIR}/lib/zlib.lib\"") if(VCPKG_CRT_LINKAGE STREQUAL dynamic) set(CL_FLAGS_DBG "/MDd /Zi") @@ -36,7 +36,7 @@ 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}" + 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 @@ -52,7 +52,7 @@ 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}" + 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 -- cgit v1.2.3 From 07b22f187167f5d54842e544e73ff3bf911eb1fe Mon Sep 17 00:00:00 2001 From: alex85k Date: Tue, 3 Oct 2017 23:37:23 +0500 Subject: [geos] allow geos_c static library cretation (libgeos_c.lib) v2 --- ports/geos/geos_c-static-support.patch | 110 +++++++++++++++++++++++++++++++++ ports/geos/portfile.cmake | 5 ++ 2 files changed, 115 insertions(+) create mode 100644 ports/geos/geos_c-static-support.patch diff --git a/ports/geos/geos_c-static-support.patch b/ports/geos/geos_c-static-support.patch new file mode 100644 index 000000000..148e63057 --- /dev/null +++ b/ports/geos/geos_c-static-support.patch @@ -0,0 +1,110 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 927a0fe..8e6c3ea 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -66,11 +66,7 @@ if(NOT MSVC) + "Set to ON|OFF (default) to build GEOS with assert() macro enabled" OFF) + endif() + +-option(GEOS_BUILD_STATIC +- "Set to OFF|ON (default) to build GEOS static libraries" ON) +- +-option(GEOS_BUILD_SHARED +- "Set to OFF|ON (default) to build GEOS shared libraries" ON) ++option(BUILD_SHARED_LIBS "Build GEOS as a shared library" ON) + + if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + option(GEOS_ENABLE_FLOATSTORE +diff --git a/capi/CMakeLists.txt b/capi/CMakeLists.txt +index 859722b..b6e44b6 100644 +--- a/capi/CMakeLists.txt ++++ b/capi/CMakeLists.txt +@@ -23,15 +23,23 @@ file(GLOB geos_capi_HEADERS ${CMAKE_BINARY_DIR}/capi/*.h) # fix source_group iss + + if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK) + # if building OS X framework, CAPI built into C++ library +- add_library(geos_c SHARED ${geos_c_SOURCES}) ++ add_library(geos_c ${geos_c_SOURCES}) + + target_link_libraries(geos_c geos) + + if (WIN32) +- set_target_properties(geos_c +- PROPERTIES +- VERSION ${CAPI_VERSION} +- CLEAN_DIRECT_OUTPUT 1) ++ if(BUILD_SHARED_LIBS) ++ set_target_properties(geos_c ++ PROPERTIES ++ VERSION ${CAPI_VERSION} ++ CLEAN_DIRECT_OUTPUT 1) ++ else() ++ set_target_properties(geos_c ++ PROPERTIES ++ OUTPUT_NAME "geos_c" ++ PREFIX "lib" ++ CLEAN_DIRECT_OUTPUT 1) ++ endif() + else() + set_target_properties(geos_c + PROPERTIES +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 4a1e688..a33b5f6 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -23,7 +23,7 @@ if(GEOS_ENABLE_MACOSX_FRAMEWORK) + ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_c.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_ts_c.cpp) + +- add_library(GEOS SHARED ${geos_SOURCES} ${geos_c_SOURCES}) ++ add_library(GEOS ${geos_SOURCES} ${geos_c_SOURCES}) + + math(EXPR CVERSION "${VERSION_MAJOR} + 1") + # VERSION = current version, SOVERSION = compatibility version +@@ -61,37 +61,27 @@ if(GEOS_ENABLE_MACOSX_FRAMEWORK) + + else() + +- if(GEOS_BUILD_SHARED) +- add_library(geos SHARED ${geos_SOURCES} ${geos_ALL_HEADERS}) ++ add_library(geos ${geos_SOURCES} ${geos_ALL_HEADERS}) + ++ if(BUILD_SHARED_LIBS) + set_target_properties(geos + PROPERTIES + DEFINE_SYMBOL GEOS_DLL_EXPORT + VERSION ${VERSION} + CLEAN_DIRECT_OUTPUT 1) +- +- install(TARGETS geos +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) +- endif() +- +- if(GEOS_BUILD_STATIC) +- add_library(geos-static STATIC ${geos_SOURCES} ${geos_ALL_HEADERS}) +- +- set_target_properties(geos-static ++ else() ++ set_target_properties(geos + PROPERTIES + OUTPUT_NAME "geos" + PREFIX "lib" + CLEAN_DIRECT_OUTPUT 1) +- +- install(TARGETS geos-static +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) +- + endif() + ++ install(TARGETS geos ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ + endif() # (GEOS_ENABLE_MACOSX_FRAMEWORK) + + # if(APPLE) diff --git a/ports/geos/portfile.cmake b/ports/geos/portfile.cmake index b391a9fce..ec88a0f57 100644 --- a/ports/geos/portfile.cmake +++ b/ports/geos/portfile.cmake @@ -15,6 +15,11 @@ vcpkg_download_distfile(ARCHIVE SHA512 515d8700b8a28282678e481faee355e3a43d7b70160472a63335b8d7225d9ba10437be782378f18f31a15288118126d411a2d862f01ce35d27c96f6bc0a73016 ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + +SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/geos_c-static-support.patch +) # NOTE: GEOS provides CMake as optional build configuration, it might not be actively # maintained, so CMake build issues may happen between releases. -- cgit v1.2.3 From 587186430dbb8ef5b4d81bd509cfca668f667684 Mon Sep 17 00:00:00 2001 From: alex85k Date: Wed, 4 Oct 2017 00:20:50 +0500 Subject: [libspatialite] initial port --- ports/libspatialite/CONTROL | 5 ++ ports/libspatialite/fix-makefiles.patch | 61 +++++++++++++++++++ ports/libspatialite/fix-sources.patch | 32 ++++++++++ ports/libspatialite/portfile.cmake | 105 ++++++++++++++++++++++++++++++++ 4 files changed, 203 insertions(+) create mode 100644 ports/libspatialite/CONTROL create mode 100644 ports/libspatialite/fix-makefiles.patch create mode 100644 ports/libspatialite/fix-sources.patch create mode 100644 ports/libspatialite/portfile.cmake diff --git a/ports/libspatialite/CONTROL b/ports/libspatialite/CONTROL new file mode 100644 index 000000000..1f7917a36 --- /dev/null +++ b/ports/libspatialite/CONTROL @@ -0,0 +1,5 @@ +Source: libspatialite +Version: 4.3.0a +Description: SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities. +Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv + diff --git a/ports/libspatialite/fix-makefiles.patch b/ports/libspatialite/fix-makefiles.patch new file mode 100644 index 000000000..9372739bb --- /dev/null +++ b/ports/libspatialite/fix-makefiles.patch @@ -0,0 +1,61 @@ +diff --git a/makefile.vc b/makefile.vc +index 9b9e8ee..b524a27 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -59,7 +59,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \ + src\versioninfo\version.obj src\virtualtext\virtualtext.obj + SPATIALITE_DLL = spatialite$(VERSION).dll + +-CFLAGS = /nologo -I.\src\headers -I. -IC:\OSGeo4W\include $(OPTFLAGS) ++CFLAGS = /nologo -I.\src\headers -I. -I$(INSTALLED_ROOT)\include $(OPTFLAGS) + + default: all + +@@ -73,12 +73,9 @@ spatialite.lib: $(LIBOBJ) + $(SPATIALITE_DLL): spatialite_i.lib + + spatialite_i.lib: $(LIBOBJ) +- link /debug /dll /out:$(SPATIALITE_DLL) \ ++ link $(LINK_FLAGS) /dll /out:$(SPATIALITE_DLL) \ + /implib:spatialite_i.lib $(LIBOBJ) \ +- C:\OSGeo4W\lib\proj_i.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4w\lib\freexl_i.lib C:\OSGeo4w\lib\iconv.lib \ +- C:\OSGeo4W\lib\sqlite3_i.lib C:\OSGeo4W\lib\zlib.lib \ +- C:\OSGeo4W\lib\libxml2.lib ++ $(LIBS_ALL) + if exist $(SPATIALITE_DLL).manifest mt -manifest \ + $(SPATIALITE_DLL).manifest -outputresource:$(SPATIALITE_DLL);2 + +@@ -90,16 +87,7 @@ clean: + del *.exp + del *.manifest + del *.lib +- del src\gaiaaux\*.obj +- del src\gaiaexif\*.obj +- del src\gaiageo\*.obj +- del src\spatialite\*.obj +- del src\srsinit\*.obj +- del src\versioninfo\*.obj +- del src\virtualtext\*.obj +- del src\wfs\*.obj +- del src\dxf\*.obj +- del src\md5\*.obj ++ forfiles /m *.obj* /s /c "cmd /c del @path" & exit 0 + del *.pdb + + install: all +diff --git a/nmake.opt b/nmake.opt +index 0960ec1..276bc84 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -1,8 +1,8 @@ + # Directory tree where SpatiaLite will be installed. +-INSTDIR=C:\OSGeo4W ++INSTDIR=$(INST_DIR) + + # Uncomment the first for an optimized build, or the second for debug. +-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \ ++OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \ + /DDLL_EXPORT /DYY_NO_UNISTD_H + #OPTFLAGS= /nologo /Zi /MD /Fdspatialite.pdb /DDLL_EXPORT + diff --git a/ports/libspatialite/fix-sources.patch b/ports/libspatialite/fix-sources.patch new file mode 100644 index 000000000..63def0d3c --- /dev/null +++ b/ports/libspatialite/fix-sources.patch @@ -0,0 +1,32 @@ +diff --git a/config-msvc.h b/config-msvc.h +index 9c7f477..a812546 100644 +--- a/config-msvc.h ++++ b/config-msvc.h +@@ -143,7 +143,7 @@ + #define HAVE_SYS_TYPES_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_UNISTD_H 1 ++#undef HAVE_UNISTD_H + + /* Define to 1 if you have the header file. */ + #define HAVE_ZLIB_H 1 +diff --git a/src/gaiageo/gg_extras.c b/src/gaiageo/gg_extras.c +index ff3dd7c..49ec986 100644 +--- a/src/gaiageo/gg_extras.c ++++ b/src/gaiageo/gg_extras.c +@@ -59,14 +59,6 @@ the terms of any one of the MPL, the GPL or the LGPL. + #include + #include + +-#if defined(_WIN32) && !defined(__MINGW32__) +-static double +-rint (double x) +-{ +- return floor (x + 0.5); +-} +-#endif +- + static void + auxGridSnapPoint (int dimension_model, gaiaPointPtr pt, gaiaGeomCollPtr result, + double origin_x, double origin_y, double origin_z, diff --git a/ports/libspatialite/portfile.cmake b/ports/libspatialite/portfile.cmake new file mode 100644 index 000000000..6517c1d55 --- /dev/null +++ b/ports/libspatialite/portfile.cmake @@ -0,0 +1,105 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libspatialite-4.3.0a) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.gaia-gis.it/gaia-sins/libspatialite-4.3.0a.tar.gz" + FILENAME "libspatialite-4.3.0a.tar.gz" + SHA512 adfd63e8dde0f370b07e4e7bb557647d2bfb5549205b60bdcaaca69ff81298a3d885e7c1ca515ef56dd0aca152ae940df8b5dbcb65bb61ae0a9337499895c3c0 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +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 +) + +# fix most of the problems when spacebar is in the path +set(CURRENT_INSTALLED_DIR "\"${CURRENT_INSTALLED_DIR}\"") + +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(CL_FLAGS_DBG "/MDd /Zi") + set(CL_FLAGS_REL "/MD /Ox") + set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_c.lib") + set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib") + set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib") +else() + set(CL_FLAGS_DBG "/MTd /Zi") + set(CL_FLAGS_REL "/MT /Ox") + set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libgeos_c.lib ${CURRENT_INSTALLED_DIR}/lib/libgeos.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libgeos_c.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libgeos.lib") + set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib") + set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzma.lib ws2_32.lib") +endif() + +set(LIBS_ALL_DBG + "${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/freexl.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib \ + ${LIBXML2_LIBS_DBG} \ + ${GEOS_LIBS_DBG} \ + ${CURRENT_INSTALLED_DIR}/debug/lib/projd.lib" + ) +set(LIBS_ALL_REL + "${CURRENT_INSTALLED_DIR}/lib/libiconv.lib \ + ${CURRENT_INSTALLED_DIR}/lib/libcharset.lib \ + ${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib \ + ${CURRENT_INSTALLED_DIR}/lib/freexl.lib \ + ${CURRENT_INSTALLED_DIR}/lib/zlib.lib \ + ${LIBXML2_LIBS_REL} \ + ${GEOS_LIBS_REL} \ + ${CURRENT_INSTALLED_DIR}/lib/proj.lib" + ) + +################ +# Debug build +################ +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() + +################ +# Release build +################ +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") + + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libspatialite 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/spatialite_i.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) +endif() + +message(STATUS "Packaging ${TARGET_TRIPLET} done") -- cgit v1.2.3 From 85f0a060db8be34f4fce134be450bd1e4bd2b06f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 3 Oct 2017 15:00:16 -0700 Subject: [geos] Bump version for previous PR --- ports/geos/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/geos/CONTROL b/ports/geos/CONTROL index fbf31661f..3d2ed4565 100644 --- a/ports/geos/CONTROL +++ b/ports/geos/CONTROL @@ -1,3 +1,3 @@ Source: geos -Version: 3.6.2 +Version: 3.6.2-1 Description: Geometry Engine Open Source -- cgit v1.2.3 From 3838d5880470fdc884f035ed3d1c67d3bdd1e16e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 3 Oct 2017 15:51:04 -0700 Subject: [vcpkg] Add more operator== to CStringView. Uppercase Span to follow naming convention. --- toolsrc/include/CStringView.h | 44 ++++++++++++++++++++++++++++++++++++++- toolsrc/include/SourceParagraph.h | 2 +- toolsrc/include/Span.h | 28 ++++++++++++++++++------- toolsrc/src/PostBuildLint.cpp | 4 ++-- toolsrc/src/SourceParagraph.cpp | 4 ++-- toolsrc/src/VcpkgPaths.cpp | 6 +++--- toolsrc/src/vcpkg_Build.cpp | 2 +- toolsrc/src/vcpkg_Strings.cpp | 2 +- toolsrc/src/vcpkg_System.cpp | 13 ++++++------ 9 files changed, 80 insertions(+), 25 deletions(-) diff --git a/toolsrc/include/CStringView.h b/toolsrc/include/CStringView.h index 282caad3a..c1810b4f1 100644 --- a/toolsrc/include/CStringView.h +++ b/toolsrc/include/CStringView.h @@ -11,13 +11,36 @@ namespace vcpkg constexpr BasicCStringView(const BasicCStringView&) = default; BasicCStringView(const std::basic_string& str) : cstr(str.c_str()) {} - constexpr operator const CharType*() const { return cstr; } constexpr const CharType* c_str() const { return cstr; } private: const CharType* cstr; }; + namespace details + { + inline bool vcpkg_strcmp(const char* l, const char* r) { return strcmp(l, r) == 0; } + inline bool vcpkg_strcmp(const wchar_t* l, const wchar_t* r) { return wcscmp(l, r) == 0; } + } + + template + bool operator==(const BasicCStringView& l, const BasicCStringView& r) + { + return details::vcpkg_strcmp(l.c_str(), r.c_str()); + } + + template + bool operator==(const CharType* l, const BasicCStringView& r) + { + return details::vcpkg_strcmp(l, r.c_str()); + } + + template + bool operator==(const BasicCStringView& r, const CharType* l) + { + return details::vcpkg_strcmp(l, r.c_str()); + } + template bool operator==(const std::basic_string& l, const BasicCStringView& r) { @@ -30,6 +53,25 @@ namespace vcpkg return l == r.c_str(); } + // notequals + template + bool operator!=(const BasicCStringView& l, const BasicCStringView& r) + { + return !details::vcpkg_strcmp(l.c_str(), r.c_str()); + } + + template + bool operator!=(const CharType* l, const BasicCStringView& r) + { + return !details::vcpkg_strcmp(l, r.c_str()); + } + + template + bool operator!=(const BasicCStringView& r, const CharType* l) + { + return !details::vcpkg_strcmp(l, r.c_str()); + } + template bool operator!=(const BasicCStringView& r, const std::basic_string& l) { diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h index 1357b3769..ccf9faf4f 100644 --- a/toolsrc/include/SourceParagraph.h +++ b/toolsrc/include/SourceParagraph.h @@ -57,7 +57,7 @@ namespace vcpkg std::vector> feature_paragraphs; }; - void print_error_message(span> error_info_list); + void print_error_message(Span> error_info_list); inline void print_error_message(const std::unique_ptr& error_info_list) { return print_error_message({&error_info_list, 1}); diff --git a/toolsrc/include/Span.h b/toolsrc/include/Span.h index b16af2cef..b2c9acdbc 100644 --- a/toolsrc/include/Span.h +++ b/toolsrc/include/Span.h @@ -5,7 +5,7 @@ #include template -struct span +struct Span { public: using element_type = T; @@ -13,18 +13,18 @@ public: using reference = T&; using iterator = T*; - constexpr span() noexcept : m_ptr(nullptr), m_count(0) {} - constexpr span(std::nullptr_t) noexcept : span() {} - constexpr span(T* ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {} - constexpr span(T* ptr_begin, T* ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {} + constexpr Span() noexcept : m_ptr(nullptr), m_count(0) {} + constexpr Span(std::nullptr_t) noexcept : Span() {} + constexpr Span(T* ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {} + constexpr Span(T* ptr_begin, T* ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {} template - constexpr span(T (&arr)[N]) noexcept : span(arr, N) + constexpr Span(T (&arr)[N]) noexcept : Span(arr, N) { } - span(std::vector& v) noexcept : span(v.data(), v.size()) {} - span(const std::vector>& v) noexcept : span(v.data(), v.size()) {} + Span(std::vector& v) noexcept : Span(v.data(), v.size()) {} + Span(const std::vector>& v) noexcept : Span(v.data(), v.size()) {} constexpr iterator begin() const { return m_ptr; } constexpr iterator end() const { return m_ptr + m_count; } @@ -36,3 +36,15 @@ private: pointer m_ptr; size_t m_count; }; + +template +Span make_span(std::vector& v) +{ + return {v.data(), v.size()}; +} + +template +Span make_span(const std::vector& v) +{ + return {v.data(), v.size()}; +} diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 1fd48d3ec..416d4a636 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -38,7 +38,7 @@ namespace vcpkg::PostBuildLint } }; - const std::vector& get_outdated_dynamic_crts() + Span get_outdated_dynamic_crts(CStringView toolset) { static const std::vector V_NO_MSVCRT = { {"msvcp100.dll", R"(msvcp100\.dll)"}, @@ -662,7 +662,7 @@ namespace vcpkg::PostBuildLint "Running command:\n %s\n failed", Strings::to_utf8(cmd_line)); - for (const OutdatedDynamicCrt& outdated_crt : get_outdated_dynamic_crts()) + for (const OutdatedDynamicCrt& outdated_crt : get_outdated_dynamic_crts("v141")) { if (std::regex_search(ec_data.output.cbegin(), ec_data.output.cend(), outdated_crt.regex)) { diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp index 171689ce7..0f1a38d19 100644 --- a/toolsrc/src/SourceParagraph.cpp +++ b/toolsrc/src/SourceParagraph.cpp @@ -25,7 +25,7 @@ namespace vcpkg static const std::string VERSION = "Version"; } - static span get_list_of_valid_fields() + static Span get_list_of_valid_fields() { static const std::string valid_fields[] = { Fields::SOURCE, @@ -38,7 +38,7 @@ namespace vcpkg return valid_fields; } - void print_error_message(span> error_info_list) + void print_error_message(Span> error_info_list) { Checks::check_exit(VCPKG_LINE_INFO, error_info_list.size() > 0); diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index d491cb7fb..cb00183fd 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -10,9 +10,9 @@ namespace vcpkg { - // Intentionally wstring so we can easily use operator== with CWStringView. - static const std::wstring V_140 = L"v140"; - static const std::wstring V_141 = L"v141"; + static constexpr CWStringView V_120 = L"v120"; + static constexpr CWStringView V_140 = L"v140"; + static constexpr CWStringView V_141 = L"v141"; static bool exists_and_has_equal_or_greater_version(const std::wstring& version_cmd, const std::array& expected_version) diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index 5ac13c6c6..853f84998 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -165,7 +165,7 @@ namespace vcpkg::Build {L"PORT", config.src.name}, {L"CURRENT_PORT_DIR", config.port_dir / "/."}, {L"TARGET_TRIPLET", triplet.canonical_name()}, - {L"VCPKG_PLATFORM_TOOLSET", toolset.version}, + {L"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, {L"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? L"1" : L"0"}, {L"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? L"1" : L"0"}, {L"GIT", git_exe_path}, diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 07147862f..21df2c309 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -106,7 +106,7 @@ namespace vcpkg::Strings int case_insensitive_ascii_compare(const CStringView left, const CStringView right) { - return _stricmp(left, right); + return _stricmp(left.c_str(), right.c_str()); } std::string ascii_to_lowercase(const std::string& input) diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 40e335117..4d2e88b73 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -226,7 +226,7 @@ namespace vcpkg::System void println() { println(Strings::EMPTY); } - void print(const CStringView message) { fputs(message, stdout); } + void print(const CStringView message) { fputs(message.c_str(), stdout); } void println(const CStringView message) { @@ -255,13 +255,13 @@ namespace vcpkg::System Optional get_environment_variable(const CWStringView varname) noexcept { - const auto sz = GetEnvironmentVariableW(varname, nullptr, 0); + const auto sz = GetEnvironmentVariableW(varname.c_str(), nullptr, 0); if (sz == 0) return nullopt; std::wstring ret(sz, L'\0'); Checks::check_exit(VCPKG_LINE_INFO, MAXDWORD >= ret.size()); - const auto sz2 = GetEnvironmentVariableW(varname, ret.data(), static_cast(ret.size())); + const auto sz2 = GetEnvironmentVariableW(varname.c_str(), ret.data(), static_cast(ret.size())); Checks::check_exit(VCPKG_LINE_INFO, sz2 + 1 == sz); ret.pop_back(); return ret; @@ -275,19 +275,20 @@ namespace vcpkg::System Optional get_registry_string(HKEY base, const CWStringView sub_key, const CWStringView valuename) { HKEY k = nullptr; - const LSTATUS ec = RegOpenKeyExW(base, sub_key, NULL, KEY_READ, &k); + const LSTATUS ec = RegOpenKeyExW(base, sub_key.c_str(), NULL, KEY_READ, &k); if (ec != ERROR_SUCCESS) return nullopt; DWORD dw_buffer_size = 0; DWORD dw_type = 0; - auto rc = RegQueryValueExW(k, valuename, nullptr, &dw_type, nullptr, &dw_buffer_size); + auto rc = RegQueryValueExW(k, valuename.c_str(), nullptr, &dw_type, nullptr, &dw_buffer_size); if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size == 0 || dw_buffer_size % sizeof(wchar_t) != 0) return nullopt; std::wstring ret; ret.resize(dw_buffer_size / sizeof(wchar_t)); - rc = RegQueryValueExW(k, valuename, nullptr, &dw_type, reinterpret_cast(ret.data()), &dw_buffer_size); + rc = RegQueryValueExW( + k, valuename.c_str(), nullptr, &dw_type, reinterpret_cast(ret.data()), &dw_buffer_size); if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size != sizeof(wchar_t) * ret.size()) return nullopt; -- cgit v1.2.3 From 433c505e32ec38b8a3395e1f0fe3fca0e9c12cad Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 3 Oct 2017 15:58:10 -0700 Subject: [vcpkg] Revert attempt to build vcpkg.exe with VS2013 --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 39 +++--------------------- 1 file changed, 5 insertions(+), 34 deletions(-) diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index 82d9f7c16..f72491e5d 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -4,15 +4,12 @@ param( [switch]$DisableVS2017 = $False, [Parameter(Mandatory=$False)] - [switch]$DisableVS2015 = $False, - - [Parameter(Mandatory=$False)] - [switch]$DisableVS2013 = $False + [switch]$DisableVS2015 = $False ) -if ($DisableVS2017 -and $DisableVS2015 -and $DisableVS2013) +if ($DisableVS2017 -and $DisableVS2015) { - throw "VS013, VS2015 and VS2017 were disabled." + throw "Both VS2015 and VS2017 were disabled." } function New-MSBuildInstance() @@ -26,7 +23,7 @@ function New-MSBuildInstance() return $instance } -Write-Verbose "Executing $($MyInvocation.MyCommand.Name) with DisableVS2017=$DisableVS2017, DisableVS2015=$DisableVS2015, DisableVS2013=$DisableVS2013" +Write-Verbose "Executing $($MyInvocation.MyCommand.Name) with DisableVS2017=$DisableVS2017, DisableVS2015=$DisableVS2015" $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $validInstances = New-Object System.Collections.ArrayList @@ -142,27 +139,6 @@ foreach ($pair in $registryPairs) $validInstances.Add($instance) > $null } -# VS2013 - in Program Files -Write-Verbose "`n`n" -Write-Verbose "Checking for MSBuild from VS2013 in Program Files..." -$CandidateProgramFiles = $(& $scriptsDir\getProgramFiles32bit.ps1), $(& $scriptsDir\getProgramFilesPlatformBitness.ps1) -Write-Verbose "Program Files Candidate locations: $([system.String]::Join(',', $CandidateProgramFiles))" -foreach ($ProgramFiles in $CandidateProgramFiles) -{ - $clExe= "$ProgramFiles\Microsoft Visual Studio 12.0\VC\bin\cl.exe" - - if (!(Test-Path $clExe)) - { - Write-Verbose "$clExe - Not Found" - continue - } - - Write-Verbose "$clExe - Found" - $instance = New-MSBuildInstance "$ProgramFiles\MSBuild\12.0\Bin\MSBuild.exe" "v120" - Write-Verbose "Found $instance" - $validInstances.Add($instance) > $null -} - Write-Verbose "`n`n`n" Write-Verbose "The following MSBuild instances were found:" foreach ($instance in $validInstances) @@ -182,12 +158,7 @@ foreach ($instance in $validInstances) { return $instance.msbuildExePath, $instance.toolsetVersion } - - if (!$DisableVS2013 -and $instance.toolsetVersion -eq "v120") - { - return $instance.msbuildExePath, $instance.toolsetVersion - } } -throw "Could not find MSBuild version with C++ support. VS2013, VS2015 or VS2017 (with C++) needs to be installed." \ No newline at end of file +throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed." \ No newline at end of file -- cgit v1.2.3 From 63753e86a60ef508760d9f4dd98b7f2336cd089c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 3 Oct 2017 16:00:23 -0700 Subject: [vcpkg] Split toolset searches based on triplet's specification (don't pick v120 if it's blank). --- toolsrc/include/VcpkgPaths.h | 1 + toolsrc/src/PostBuildLint.cpp | 31 +++++++++++++------ toolsrc/src/VcpkgPaths.cpp | 71 ++++++++++++++++++++++++++++--------------- 3 files changed, 68 insertions(+), 35 deletions(-) diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h index 9914c6f35..9f55dc5ac 100644 --- a/toolsrc/include/VcpkgPaths.h +++ b/toolsrc/include/VcpkgPaths.h @@ -73,5 +73,6 @@ namespace vcpkg Lazy nuget_exe; Lazy> toolsets; Lazy> toolsets_vs2017_v140; + Lazy> toolsets_vs2013; }; } diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 69008fab3..58d6f987b 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -40,26 +40,36 @@ namespace vcpkg::PostBuildLint Span get_outdated_dynamic_crts(CStringView toolset) { - static const std::vector V_NO_MSVCRT = { + static const std::vector V_NO_120 = { {"msvcp100.dll", R"(msvcp100\.dll)"}, {"msvcp100d.dll", R"(msvcp100d\.dll)"}, {"msvcp110.dll", R"(msvcp110\.dll)"}, {"msvcp110_win.dll", R"(msvcp110_win\.dll)"}, - //{"msvcp120.dll", R"(msvcp120\.dll)"}, - //{"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"}, {"msvcp60.dll", R"(msvcp60\.dll)"}, {"msvcp60.dll", R"(msvcp60\.dll)"}, + {"msvcrt.dll", R"(msvcrt\.dll)"}, {"msvcr100.dll", R"(msvcr100\.dll)"}, {"msvcr100d.dll", R"(msvcr100d\.dll)"}, {"msvcr100_clr0400.dll", R"(msvcr100_clr0400\.dll)"}, {"msvcr110.dll", R"(msvcr110\.dll)"}, - //{"msvcr120.dll", R"(msvcr120\.dll)"}, - //{"msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)"}, {"msvcrt20.dll", R"(msvcrt20\.dll)"}, - {"msvcrt40.dll", R"(msvcrt40\.dll)"}}; + {"msvcrt40.dll", R"(msvcrt40\.dll)"}, + }; - return V_NO_MSVCRT; + static const std::vector V = [&]() { + auto ret = V_NO_120; + ret.push_back({"msvcp120.dll", R"(msvcp120\.dll)"}); + ret.push_back({"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"}); + ret.push_back({"msvcr120.dll", R"(msvcr120\.dll)"}); + ret.push_back({"msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)"}); + return ret; + }(); + + if (toolset == "v120") + return V_NO_120; + else + return V; } static LintStatus check_for_files_in_include_directory(const Files::Filesystem& fs, @@ -646,7 +656,8 @@ namespace vcpkg::PostBuildLint static LintStatus check_outdated_crt_linkage_of_dlls(const std::vector& dlls, const fs::path dumpbin_exe, - const BuildInfo& build_info) + const BuildInfo& build_info, + const PreBuildInfo& pre_build_info) { if (build_info.policies.is_enabled(BuildPolicy::ALLOW_OBSOLETE_MSVCRT)) return LintStatus::SUCCESS; @@ -662,7 +673,7 @@ namespace vcpkg::PostBuildLint "Running command:\n %s\n failed", Strings::to_utf8(cmd_line)); - for (const OutdatedDynamicCrt& outdated_crt : get_outdated_dynamic_crts("v141")) + for (const OutdatedDynamicCrt& outdated_crt : get_outdated_dynamic_crts(pre_build_info.platform_toolset)) { if (std::regex_search(ec_data.output.cbegin(), ec_data.output.cend(), outdated_crt.regex)) { @@ -788,7 +799,7 @@ namespace vcpkg::PostBuildLint error_count += check_uwp_bit_of_dlls(pre_build_info.cmake_system_name, dlls, toolset.dumpbin); error_count += check_dll_architecture(pre_build_info.target_architecture, dlls); - error_count += check_outdated_crt_linkage_of_dlls(dlls, toolset.dumpbin, build_info); + error_count += check_outdated_crt_linkage_of_dlls(dlls, toolset.dumpbin, build_info, pre_build_info); break; } case Build::LinkageType::STATIC: diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 651d4d834..e8eb4f01c 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -277,48 +277,38 @@ namespace vcpkg return nullopt; } - - static Optional get_vs2013_installation_instance() - { - const Optional vs2013_cmntools_optional = System::get_environment_variable(L"VS120COMNTOOLS"); - if (const auto v = vs2013_cmntools_optional.get()) - { - const fs::path vs2013_cmntools = fs::path(*v).parent_path(); // The call to parent_path() is needed because - // the env variable has a trailing backslash - return vs2013_cmntools.parent_path().parent_path(); - } - return nullopt; - } - - static std::vector find_toolset_instances(const VcpkgPaths& paths) + static std::vector find_v120_toolset_instances(const Files::Filesystem& fs) { using CPU = System::CPUArchitecture; - const auto& fs = paths.get_filesystem(); - // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations. std::vector paths_examined; std::vector found_toolsets; // VS2013 - const Optional vs_2013_installation_instance = get_vs2013_installation_instance(); - if (const auto v = vs_2013_installation_instance.get()) + const Optional vs2013_cmntools_optional = System::get_environment_variable(L"VS120COMNTOOLS"); + if (const auto vs120comntools = vs2013_cmntools_optional.get()) { - const fs::path vs2013_vcvarsall_bat = *v / "VC" / "vcvarsall.bat"; + const fs::path vs2013_cmntools = + fs::path(*vs120comntools).parent_path(); // The call to parent_path() is needed because + // the env variable has a trailing backslash + auto v = vs2013_cmntools.parent_path().parent_path(); + + const fs::path vs2013_vcvarsall_bat = v / "VC" / "vcvarsall.bat"; paths_examined.push_back(vs2013_vcvarsall_bat); if (fs.exists(vs2013_vcvarsall_bat)) { - const fs::path vs2013_dumpbin_exe = *v / "VC" / "bin" / "dumpbin.exe"; + const fs::path vs2013_dumpbin_exe = v / "VC" / "bin" / "dumpbin.exe"; paths_examined.push_back(vs2013_dumpbin_exe); const fs::path vs2013_bin_dir = vs2013_vcvarsall_bat.parent_path() / "bin"; std::vector supported_architectures; if (fs.exists(vs2013_bin_dir / "vcvars32.bat")) supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); - if (fs.exists(3 / "amd64\\vcvars64.bat")) + if (fs.exists(vs2013_bin_dir / "amd64\\vcvars64.bat")) supported_architectures.push_back({L"x64", CPU::X64, CPU::X64}); if (fs.exists(vs2013_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); @@ -332,11 +322,36 @@ namespace vcpkg if (fs.exists(vs2013_dumpbin_exe)) { found_toolsets.push_back( - {vs2013_dumpbin_exe, vs2013_vcvarsall_bat, L"v120", supported_architectures}); + {vs2013_dumpbin_exe, vs2013_vcvarsall_bat, {}, V_120, supported_architectures}); } } } - + + if (found_toolsets.empty()) + { + System::println(System::Color::error, "Could not locate a complete toolset."); + System::println("The following paths were examined:"); + for (const fs::path& path : paths_examined) + { + System::println(" %s", path.u8string()); + } + Checks::exit_fail(VCPKG_LINE_INFO); + } + + return found_toolsets; + } + + static std::vector find_toolset_instances(const VcpkgPaths& paths) + { + using CPU = System::CPUArchitecture; + + const auto& fs = paths.get_filesystem(); + + // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations. + std::vector paths_examined; + + std::vector found_toolsets; + // VS2015 const Optional vs_2015_installation_instance = get_vs2015_installation_instance(); if (const auto v = vs_2015_installation_instance.get()) @@ -372,8 +387,6 @@ namespace vcpkg } } - const std::vector vs2017_installation_instances = get_vs2017_installation_instances(paths); - // VS2017 Optional vs2017_toolset; const std::vector vs2017_installation_instances = get_vs2017_installation_instances(paths); @@ -476,6 +489,14 @@ namespace vcpkg { const std::wstring& w_toolset_version = Strings::to_utf16(toolset_version); + if (w_toolset_version == V_120) + { + const auto& v120_toolsets = this->toolsets_vs2013.get_lazy( + [this]() { return find_v120_toolset_instances(this->get_filesystem()); }); + Checks::check_exit(VCPKG_LINE_INFO, v120_toolsets.size() > 0); + return v120_toolsets.back(); + } + // Invariant: toolsets are non-empty and sorted with newest at back() const std::vector& vs_toolsets = this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); }); -- cgit v1.2.3 From 322e9254c1c4362ea30e1106fb44c087cbbe62e8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 3 Oct 2017 17:03:17 -0700 Subject: [gtest] Silence TR1 deprecation warning --- ports/gtest/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index 0bfe4e60c..333dc8ae3 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -28,6 +28,8 @@ vcpkg_configure_cmake( OPTIONS -Dgtest_force_shared_crt=${gtest_force_shared_crt} ) +set(ENV{_CL_} "/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING") + vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 0ba3c166d76a4484fd4d378dc7367f2794577a20 Mon Sep 17 00:00:00 2001 From: Jens Frederich Date: Wed, 4 Oct 2017 08:19:57 +0200 Subject: Get proxy credentials behind web proxy --- scripts/bootstrap.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index b7bc5afab..fa51de404 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -4,6 +4,10 @@ param( [string]$disableMetrics = "0" ) +$webclient=New-Object System.Net.WebClient +$creds=Get-Credential +$webclient.Proxy.Credentials=$creds + $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root -- cgit v1.2.3 From bf84f929d818c21d004b6f8a67a926adce9f4d87 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 4 Oct 2017 05:36:30 -0700 Subject: [geos] remove build_cmake --- ports/geos/portfile.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ports/geos/portfile.cmake b/ports/geos/portfile.cmake index ec88a0f57..68b4ab9f7 100644 --- a/ports/geos/portfile.cmake +++ b/ports/geos/portfile.cmake @@ -33,8 +33,6 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DGEOS_ENABLE_TESTS=False ) - -vcpkg_build_cmake() vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright @@ -49,4 +47,4 @@ else() endif() -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() -- cgit v1.2.3 From 66fdeb47760420f2de14d2fbcb72d44afc8c3f83 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Wed, 4 Oct 2017 05:39:16 -0700 Subject: [geos] bump version --- ports/geos/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/geos/CONTROL b/ports/geos/CONTROL index 3d2ed4565..2b192d088 100644 --- a/ports/geos/CONTROL +++ b/ports/geos/CONTROL @@ -1,3 +1,3 @@ Source: geos -Version: 3.6.2-1 +Version: 3.6.2-2 Description: Geometry Engine Open Source -- cgit v1.2.3 From c6ac9bd7f0bb229ec1107ad45ecae9cfbdb048d5 Mon Sep 17 00:00:00 2001 From: alex85k Date: Wed, 4 Oct 2017 20:34:13 +0500 Subject: [spatialite-tools] initial port (spatialite.exe and other tools) --- ports/spatialite-tools/CONTROL | 4 + ports/spatialite-tools/fix-makefiles.patch | 128 +++++++++++++++++++++++++++++ ports/spatialite-tools/portfile.cmake | 118 ++++++++++++++++++++++++++ 3 files changed, 250 insertions(+) create mode 100644 ports/spatialite-tools/CONTROL create mode 100644 ports/spatialite-tools/fix-makefiles.patch create mode 100644 ports/spatialite-tools/portfile.cmake diff --git a/ports/spatialite-tools/CONTROL b/ports/spatialite-tools/CONTROL new file mode 100644 index 000000000..ecbf681c6 --- /dev/null +++ b/ports/spatialite-tools/CONTROL @@ -0,0 +1,4 @@ +Source: spatialite-tools +Version: 4.3.0 +Description: Contains spatialite.exe and other command line tools to work with SpatiaLite databases (import, export, SQL queries) +Build-Depends: sqlite3, libspatialite, geos, readosm, proj4, zlib, libiconv, expat diff --git a/ports/spatialite-tools/fix-makefiles.patch b/ports/spatialite-tools/fix-makefiles.patch new file mode 100644 index 000000000..ff6e0ad0d --- /dev/null +++ b/ports/spatialite-tools/fix-makefiles.patch @@ -0,0 +1,128 @@ +diff --git a/makefile.vc b/makefile.vc +index 33c85d2..c811e7d 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -15,7 +15,7 @@ SPATIALITE_OSM_RAW_EXE = spatialite_osm_raw.exe + SPATIALITE_OSM_FILTER_EXE = spatialite_osm_filter.exe + SPATIALITE_GML_EXE = spatialite_gml.exe + +-CFLAGS = /nologo -IC:\OSGeo4W\include $(OPTFLAGS) ++CFLAGS = /nologo -I$(INSTALLED_ROOT)\include $(OPTFLAGS) + + default: all + +@@ -26,89 +26,58 @@ all: $(SPATIALITE_EXE) $(SHP_DOCTOR_EXE) $(SPATIALITE_TOOL_EXE) \ + $(SPATIALITE_OSM_FILTER_EXE) + + $(SPATIALITE_EXE): shell.obj +- cl shell.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib \ +- /Fe$(SPATIALITE_EXE) ++ cl shell.obj $(LIBS_ALL) /Fe$(SPATIALITE_EXE) + if exist $(SPATIALITE_EXE).manifest mt -manifest \ + $(SPATIALITE_EXE).manifest -outputresource:$(SPATIALITE_EXE);1 + + $(EXIF_LOADER_EXE): exif_loader.obj +- cl exif_loader.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl exif_loader.obj $(LIBS_ALL) + if exist $(EXIF_LOADER_EXE).manifest mt -manifest \ + $(EXIF_LOADER_EXE).manifest -outputresource:$(EXIF_LOADER_EXE);1 + + $(SHP_DOCTOR_EXE): shp_doctor.obj +- cl shp_doctor.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl shp_doctor.obj $(LIBS_ALL) + if exist $(SHP_DOCTOR_EXE).manifest mt -manifest \ + $(SHP_DOCTOR_EXE).manifest -outputresource:$(SHP_DOCTOR_EXE);1 + + $(SPATIALITE_NETWORK_EXE): spatialite_network.obj +- cl spatialite_network.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_network.obj $(LIBS_ALL) + if exist $(SPATIALITE_NETWORK_EXE).manifest mt -manifest \ + $(SPATIALITE_TOOL_EXE).manifest \ + -outputresource:$(SPATIALITE_TOOL_EXE);1 + + $(SPATIALITE_TOOL_EXE): spatialite_tool.obj +- cl spatialite_tool.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_tool.obj $(LIBS_ALL) + if exist $(SPATIALITE_TOOL_EXE).manifest mt -manifest \ + $(SPATIALITE_TOOL_EXE).manifest \ + -outputresource:$(SPATIALITE_TOOL_EXE);1 + + $(SPATIALITE_OSM_NET_EXE): spatialite_osm_net.obj +- cl spatialite_osm_net.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib \ +- C:\OSGeo4W\lib\readosm_i.lib \ +- C:\OSGeo4W\lib\libexpat.lib \ +- C:\OSGeo4W\lib\zlib.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_osm_net.obj $(LIBS_ALL) + if exist $(SPATIALITE_OSM_EXE).manifest mt -manifest \ + $(SPATIALITE_OSM_EXE).manifest \ + -outputresource:$(SPATIALITE_OSM_NET_EXE);1 + + $(SPATIALITE_OSM_MAP_EXE): spatialite_osm_map.obj +- cl spatialite_osm_map.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib \ +- C:\OSGeo4W\lib\readosm_i.lib \ +- C:\OSGeo4W\lib\libexpat.lib \ +- C:\OSGeo4W\lib\zlib.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_osm_map.obj $(LIBS_ALL) + if exist $(SPATIALITE_OSM_MAP_EXE).manifest mt -manifest \ + $(SPATIALITE_OSM_MAP_EXE).manifest \ + -outputresource:$(SPATIALITE_OSM_MAP_EXE);1 + + $(SPATIALITE_GML_EXE): spatialite_gml.obj +- cl spatialite_gml.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib \ +- C:\OSGeo4W\lib\libexpat.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_gml.obj $(LIBS_ALL) + if exist $(SPATIALITE_GML_EXE).manifest mt -manifest \ + $(SPATIALITE_GML_EXE).manifest \ + -outputresource:$(SPATIALITE_GML_EXE);1 + + $(SPATIALITE_OSM_RAW_EXE): spatialite_osm_raw.obj +- cl spatialite_osm_raw.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib \ +- C:\OSGeo4W\lib\readosm_i.lib \ +- C:\OSGeo4W\lib\libexpat.lib \ +- C:\OSGeo4W\lib\zlib.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_osm_raw.obj $(LIBS_ALL) + if exist $(SPATIALITE_OSM_RAW_EXE).manifest mt -manifest \ + $(SPATIALITE_OSM_RAW_EXE).manifest \ + -outputresource:$(SPATIALITE_OSM_RAW_EXE);1 + + $(SPATIALITE_OSM_FILTER_EXE): spatialite_osm_filter.obj +- cl spatialite_osm_filter.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_osm_filter.obj $(LIBS_ALL) + if exist $(SPATIALITE_OSM_FILTER_EXE).manifest mt -manifest \ + $(SPATIALITE_OSM_FILTER_EXE).manifest \ + -outputresource:$(SPATIALITE_OSM_FILTER_EXE);1 +diff --git a/nmake.opt b/nmake.opt +index 4f4a953..d9efecf 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -1,8 +1,8 @@ + # Directory tree where SpatiaLite will be installed. +-INSTDIR=C:\OSGeo4W ++INSTDIR=$(INST_DIR) + + # Uncomment the first for an optimized build, or the second for debug. +-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \ ++OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \ + /D_LARGE_FILE=1 /D_FILE_OFFSET_BITS=64 /D_LARGEFILE_SOURCE=1 + #OPTFLAGS= /nologo /Zi /MD /Fdspatialite.pdb + diff --git a/ports/spatialite-tools/portfile.cmake b/ports/spatialite-tools/portfile.cmake new file mode 100644 index 000000000..f42227a12 --- /dev/null +++ b/ports/spatialite-tools/portfile.cmake @@ -0,0 +1,118 @@ +include(vcpkg_common_functions) + +option(BUILD_DEBUG_TOOLS "Build debug version of tools" OFF) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/spatialite-tools-4.3.0) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.gaia-gis.it/gaia-sins/spatialite-tools-4.3.0.tar.gz" + FILENAME "spatialite-tools-4.3.0.tar.gz" + SHA512 e1de27c1c65ff2ff0b08583113517bea74edf33fff59ad6e9c77492ea3ae87d9c0f17d7670ee6602b32eea73ad3678bb5410ef2c6fac6e213bf2e341a907db88 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +find_program(NMAKE nmake) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch +) + +set(LDIR "\"${CURRENT_INSTALLED_DIR}\"") + +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(CL_FLAGS_DBG "/MDd /Zi") + set(CL_FLAGS_REL "/MD /Ox") + set(GEOS_LIBS_REL "${LDIR}/lib/geos_c.lib") + set(GEOS_LIBS_DBG "${LDIR}/debug/lib/geos_c.lib") + set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib") + set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib") + set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib") + set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib") + set(ICONV_LIBS_REL "${LDIR}/lib/libiconv.lib") + set(ICONV_LIBS_DBG "${LDIR}/debug/lib/libiconv.lib") +else() + set(CL_FLAGS_DBG "/MTd /Zi") + set(CL_FLAGS_REL "/MT /Ox") + set(GEOS_LIBS_REL "${LDIR}/lib/libgeos_c.lib ${LDIR}/lib/libgeos.lib") + set(GEOS_LIBS_DBG "${LDIR}/debug/lib/libgeos_c.lib ${LDIR}/debug/lib/libgeos.lib") + set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib ${LDIR}/lib/lzma.lib ws2_32.lib") + set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib ${LDIR}/debug/lib/lzma.lib ws2_32.lib") + set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib ${LDIR}/lib/freexl.lib") + set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib ${LDIR}/debug/lib/freexl.lib") + set(ICONV_LIBS_REL "${LDIR}/lib/libiconv.lib ${LDIR}/lib/libcharset.lib") + set(ICONV_LIBS_DBG "${LDIR}/debug/lib/libiconv.lib ${LDIR}/debug/lib/libcharset.lib ") +endif() + +set(LIBS_ALL_DBG + "${ICONV_LIBS_DBG} \ + ${LDIR}/debug/lib/sqlite3.lib \ + ${SPATIALITE_LIBS_DBG} \ + ${LIBXML2_LIBS_DBG} \ + ${GEOS_LIBS_DBG} \ + ${LDIR}/debug/lib/readosm.lib \ + ${LDIR}/debug/lib/expat.lib \ + ${LDIR}/debug/lib/zlibd.lib \ + ${LDIR}/debug/lib/projd.lib" + ) +set(LIBS_ALL_REL + "${ICONV_LIBS_REL} \ + ${LDIR}/lib/sqlite3.lib \ + ${SPATIALITE_LIBS_REL} \ + ${LIBXML2_LIBS_REL} \ + ${GEOS_LIBS_REL} \ + ${LDIR}/lib/readosm.lib \ + ${LDIR}/lib/expat.lib \ + ${LDIR}/lib/zlib.lib \ + ${LDIR}/lib/proj.lib" + ) + +if(BUILD_DEBUG_TOOLS) + ################ + # Debug build + ################ + message(STATUS "Building ${TARGET_TRIPLET}-dgb") + + 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=${LDIR}" "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") + set(EXE_FOLDER ${CURRENT_PACKAGES_DIR}/bin/) +else() + ################ + # Release build + ################ + 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=${LDIR}" "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") + set(EXE_FOLDER ${CURRENT_PACKAGES_DIR}/bin/) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/) +file(GLOB EXES "${EXE_FOLDER}/*.exe") +file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(REMOVE ${EXES}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) + +if(NOT BUILD_DEBUG_TOOLS AND VCPKG_CRT_LINKAGE STREQUAL dynamic) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +message(STATUS "Packaging ${TARGET_TRIPLET} done") + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) -- cgit v1.2.3 From 81a72bbfbb23ff4a95366cfc486ca4db0035d7a3 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 5 Oct 2017 00:50:13 +0900 Subject: Extract WiX installer using Dark Extract WiX installer using Dark. It will be standalone extract files from installer of Kinect SDK 1.x even if Kinect SDK 1.x is not installed in user system. --- ports/kinectsdk1/CONTROL | 2 +- ports/kinectsdk1/portfile.cmake | 35 ++++++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/ports/kinectsdk1/CONTROL b/ports/kinectsdk1/CONTROL index 3d4c83fd2..9764fb69a 100644 --- a/ports/kinectsdk1/CONTROL +++ b/ports/kinectsdk1/CONTROL @@ -1,3 +1,3 @@ Source: kinectsdk1 -Version: 1.8-1 +Version: 1.8-2 Description: Kinect for Windows SDK for Kinect v1 sensor. diff --git a/ports/kinectsdk1/portfile.cmake b/ports/kinectsdk1/portfile.cmake index aef4cd1c2..5aec50119 100644 --- a/ports/kinectsdk1/portfile.cmake +++ b/ports/kinectsdk1/portfile.cmake @@ -1,10 +1,39 @@ include(vcpkg_common_functions) -get_filename_component(KINECTSDK10_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect;SDKInstallPath]" ABSOLUTE CACHE) -if(NOT EXISTS "${KINECTSDK10_DIR}") - message(FATAL_ERROR "Error: Could not find Kinect for Windows SDK v1.x. It can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=40278.") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() +set(KINECTSDK10_VERSION "v1.8") +vcpkg_download_distfile(KINECTSDK10_INSTALLER + URLS "https://download.microsoft.com/download/E/1/D/E1DEC243-0389-4A23-87BF-F47DE869FC1A/KinectSDK-${KINECTSDK10_VERSION}-Setup.exe" + FILENAME "KinectSDK-${KINECTSDK10_VERSION}-Setup.exe" + SHA512 ee8a0f70c86aad80fe214108e315e4550a90ed39f278ce00a7137532174ee5bf3bdeb1d0b499fc5ffdb5e176adecfd68963ee3731e1d2f00d69d32d1b8a3c555 +) + +vcpkg_find_acquire_program(DARK) + +set(KINECTSDK10_WIX_INSTALLER "${KINECTSDK10_INSTALLER}") +set(KINECTSDK10_WIX_EXTRACT_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/wix") +vcpkg_execute_required_process( + COMMAND ${DARK} -x ${KINECTSDK10_WIX_EXTRACT_DIR} ${KINECTSDK10_WIX_INSTALLER} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME extract_wix_installer +) + +file(TO_NATIVE_PATH "${KINECTSDK10_WIX_EXTRACT_DIR}/AttachedContainer/KinectSDK-${KINECTSDK10_VERSION}-${VCPKG_TARGET_ARCHITECTURE}.msi" KINECTSDK10_MSI_INSTALLER) +file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/src/installer/msi/${VCPKG_TARGET_ARCHITECTURE}" KINECTSDK10_MSI_EXTRACT_DIR) +file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/msiexec.log" MSIEXEC_LOG_PATH) +set(BATCH_FILE ${CURRENT_BUILDTREES_DIR}/msiextract-msmpi.bat) +file(WRITE ${BATCH_FILE} "msiexec.exe /a \"${KINECTSDK10_MSI_INSTALLER}\" /qn /log \"${MSIEXEC_LOG_PATH}\" TARGETDIR=\"${KINECTSDK10_MSI_EXTRACT_DIR}\"") +vcpkg_execute_required_process( + COMMAND ${BATCH_FILE} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME extract_msi_installer_${VCPKG_TARGET_ARCHITECTURE} +) + +set(KINECTSDK10_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/msi/${VCPKG_TARGET_ARCHITECTURE}/Microsoft SDKs/Kinect/${KINECTSDK10_VERSION}") + file( INSTALL "${KINECTSDK10_DIR}/inc/NuiApi.h" -- cgit v1.2.3 From 6f0f196a1a675823de3dae25bdc46978b29dcd68 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 5 Oct 2017 01:02:36 +0900 Subject: Change to refer Kinect SDK 1.x that installed using vcpkg port Fix according to changes of Kinect SDK 1.x port. Change to refer Kinect SDK 1.x that installed using vcpkg port. It will be always generate the Kinect SDK 1.x driver, even when Kinect SDK 1.x is not installed in user system. --- ports/openni2/CONTROL | 3 +- ports/openni2/portfile.cmake | 47 +++------------------- .../openni2/replace_environment_variable.patch.in | 16 ++++---- ports/openni2/upgrade_projects.patch | 11 ++++- 4 files changed, 25 insertions(+), 52 deletions(-) diff --git a/ports/openni2/CONTROL b/ports/openni2/CONTROL index 2f0e010e0..72de4e877 100644 --- a/ports/openni2/CONTROL +++ b/ports/openni2/CONTROL @@ -1,3 +1,4 @@ Source: openni2 -Version: 2.2.0.33-1 +Version: 2.2.0.33-2 +Build-Depends: kinectsdk1 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 7c15b40ec..2e91bac3f 100644 --- a/ports/openni2/portfile.cmake +++ b/ports/openni2/portfile.cmake @@ -36,13 +36,7 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -get_filename_component(KINECTSDK10_DIR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Kinect;SDKInstallPath]" ABSOLUTE CACHE) -set(KINECTSDK10_INSTALLED FALSE) -if(EXISTS "${KINECTSDK10_DIR}") - set(KINECTSDK10_INSTALLED TRUE) -endif() - -file(TO_NATIVE_PATH ${KINECTSDK10_DIR} KINECTSDK10_DIR) +file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR) configure_file("${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch.in" "${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch" @ONLY) vcpkg_apply_patches( @@ -52,13 +46,6 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch" ) -if(NOT ${KINECTSDK10_INSTALLED}) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable_kinect.patch" - ) -endif() - # Build OpenNI2 vcpkg_build_msbuild( PROJECT_PATH "${SOURCE_PATH}/OpenNI.sln" @@ -154,6 +141,7 @@ file( file( INSTALL + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll" "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/OniFile.dll" "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PS1080.dll" "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini" @@ -163,15 +151,6 @@ file( ${CURRENT_PACKAGES_DIR}/bin/OpenNI2/Drivers ) -if(${KINECTSDK10_INSTALLED}) - file( - INSTALL - "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll" - DESTINATION - ${CURRENT_PACKAGES_DIR}/bin/OpenNI2/Drivers - ) -endif() - file( INSTALL "${SOURCE_CONFIG_PATH}/OpenNI.ini" @@ -182,6 +161,7 @@ file( file( INSTALL + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/Kinect.dll" "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/OniFile.dll" "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/PS1080.dll" "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini" @@ -191,15 +171,6 @@ file( ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2/Drivers ) -if(${KINECTSDK10_INSTALLED}) - file( - INSTALL - "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/Kinect.dll" - DESTINATION - ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2/Drivers - ) -endif() - file( INSTALL "${SOURCE_CONFIG_PATH}/OpenNI.ini" @@ -210,6 +181,7 @@ file( file( INSTALL + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll" "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/OniFile.dll" "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PS1080.dll" "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini" @@ -219,15 +191,6 @@ file( ${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers ) -if(${KINECTSDK10_INSTALLED}) - file( - INSTALL - "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll" - DESTINATION - ${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers - ) -endif() - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(NUMBEROFBIT 32) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") @@ -248,4 +211,4 @@ file( # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openni2) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/openni2/LICENSE ${CURRENT_PACKAGES_DIR}/share/openni2/copyright) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/openni2/LICENSE ${CURRENT_PACKAGES_DIR}/share/openni2/copyright) \ No newline at end of file diff --git a/ports/openni2/replace_environment_variable.patch.in b/ports/openni2/replace_environment_variable.patch.in index 25abe7edf..ac5cf017c 100644 --- a/ports/openni2/replace_environment_variable.patch.in +++ b/ports/openni2/replace_environment_variable.patch.in @@ -7,7 +7,7 @@ index 08a49fe..7fd8620 100644 Level3 Disabled - ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@KINECTSDK10_DIR@\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x86-windows\include _WINDLL;%(PreprocessorDefinitions);_WINDOWS false false @@ -16,7 +16,7 @@ index 08a49fe..7fd8620 100644 true Kinect10.lib;XnLib.lib;%(AdditionalDependencies) - $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@KINECTSDK10_DIR@\lib\x86; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x86-windows\debug\lib true @@ -25,7 +25,7 @@ index 08a49fe..7fd8620 100644 Level3 Disabled - ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@KINECTSDK10_DIR@\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x64-windows\include _WINDLL;%(PreprocessorDefinitions);_WINDOWS false false @@ -34,7 +34,7 @@ index 08a49fe..7fd8620 100644 true Kinect10.lib;XnLib.lib;%(AdditionalDependencies) - $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@KINECTSDK10_DIR@\lib\amd64; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x64-windows\debug\lib @@ -43,7 +43,7 @@ index 08a49fe..7fd8620 100644 true true - ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@KINECTSDK10_DIR@\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x86-windows\include false @@ -52,7 +52,7 @@ index 08a49fe..7fd8620 100644 true Kinect10.lib;XnLib.lib;%(AdditionalDependencies) - $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@KINECTSDK10_DIR@\lib\x86; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x86-windows\lib true @@ -61,7 +61,7 @@ index 08a49fe..7fd8620 100644 true true - ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@KINECTSDK10_DIR@\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x64-windows\include false @@ -70,7 +70,7 @@ index 08a49fe..7fd8620 100644 true Kinect10.lib;XnLib.lib;%(AdditionalDependencies) - $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@KINECTSDK10_DIR@\lib\amd64; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x64-windows\lib true diff --git a/ports/openni2/upgrade_projects.patch b/ports/openni2/upgrade_projects.patch index 1a44381b0..86dee5794 100644 --- a/ports/openni2/upgrade_projects.patch +++ b/ports/openni2/upgrade_projects.patch @@ -837,7 +837,7 @@ index 56c5944..0401f3d 100644 AnySuitable Speed diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj -index f54e8b2..7f54d04 100644 +index f54e8b2..6ea2656 100644 --- a/Source/Drivers/Kinect/Kinect.vcxproj +++ b/Source/Drivers/Kinect/Kinect.vcxproj @@ -2,4 +2,4 @@ @@ -895,6 +895,15 @@ index f54e8b2..7f54d04 100644 true +@@ -125,7 +129,7 @@ + + + +- true ++ false + + + @@ -135,7 +139,7 @@ true true -- cgit v1.2.3 From ddbd57f5058b78e7df27497af844a41a1c79b986 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 4 Oct 2017 15:58:05 -0700 Subject: [vcpkg] Reformat and fix headers. --- toolsrc/include/vcpkg_Commands_Export.h | 8 +------- toolsrc/include/vcpkg_Commands_Export_IFW.h | 11 +++++++++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/toolsrc/include/vcpkg_Commands_Export.h b/toolsrc/include/vcpkg_Commands_Export.h index 31003422d..6e698c1b4 100644 --- a/toolsrc/include/vcpkg_Commands_Export.h +++ b/toolsrc/include/vcpkg_Commands_Export.h @@ -1,14 +1,8 @@ #pragma once -#include "StatusParagraphs.h" -#include "VcpkgCmdArguments.h" #include "VcpkgPaths.h" -#include "VersionT.h" -#include "vcpkg_Build.h" -#include "vcpkg_Dependencies.h" -#include namespace vcpkg::Commands::Export { - void export_integration_files(const fs::path &raw_exported_dir_path, const VcpkgPaths& paths); + void export_integration_files(const fs::path& raw_exported_dir_path, const VcpkgPaths& paths); } diff --git a/toolsrc/include/vcpkg_Commands_Export_IFW.h b/toolsrc/include/vcpkg_Commands_Export_IFW.h index c066ca021..7bee45eaf 100644 --- a/toolsrc/include/vcpkg_Commands_Export_IFW.h +++ b/toolsrc/include/vcpkg_Commands_Export_IFW.h @@ -1,7 +1,11 @@ #pragma once -#include "vcpkg_Files.h" +#include "VcpkgPaths.h" #include "vcpkg_Dependencies.h" +#include "vcpkg_Files.h" + +#include +#include namespace vcpkg::Commands::Export::IFW { @@ -14,5 +18,8 @@ namespace vcpkg::Commands::Export::IFW Optional maybe_installer_file_path; }; - void do_export(const std::vector &export_plan, const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths); + void do_export(const std::vector& export_plan, + const std::string& export_id, + const Options& ifw_options, + const VcpkgPaths& paths); } -- cgit v1.2.3 From 1b71053ad9954ffb0cb3c2955f42a86f62f66372 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 4 Oct 2017 16:01:29 -0700 Subject: [vcpkg] Reformat and refactor to reduce function size --- toolsrc/src/VcpkgPaths.cpp | 24 ++- toolsrc/src/commands_export.cpp | 324 ++++++++++++++++++++---------------- toolsrc/src/commands_export_ifw.cpp | 167 ++++++++++--------- 3 files changed, 278 insertions(+), 237 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 19210facf..9f85992be 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -175,18 +175,21 @@ namespace vcpkg static fs::path get_ifw_installerbase_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = { 3, 1, 81 }; + static constexpr std::array EXPECTED_VERSION = {3, 1, 81}; static const std::wstring VERSION_CHECK_ARGUMENTS = L"--framework-version"; - const fs::path downloaded_copy = downloads_folder / "QtInstallerFramework-win-x86" / "bin" / "installerbase.exe"; + const fs::path downloaded_copy = + downloads_folder / "QtInstallerFramework-win-x86" / "bin" / "installerbase.exe"; std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); // TODO: Uncomment later - //const std::vector from_path = Files::find_from_PATH(L"installerbase"); - //candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - //candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe"); - //candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / "QtIFW-3.1.0" / "bin" / "installerbase.exe"); + // const std::vector from_path = Files::find_from_PATH(L"installerbase"); + // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + // candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / + // "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe"); + // candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / + // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); const Optional path = find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); @@ -283,17 +286,20 @@ namespace vcpkg const fs::path& VcpkgPaths::get_ifw_installerbase_exe() const { - return this->ifw_installerbase_exe.get_lazy([this]() { return get_ifw_installerbase_path(this->downloads, this->scripts); }); + return this->ifw_installerbase_exe.get_lazy( + [this]() { return get_ifw_installerbase_path(this->downloads, this->scripts); }); } const fs::path& VcpkgPaths::get_ifw_binarycreator_exe() const { - return this->ifw_binarycreator_exe.get_lazy([this]() { return get_ifw_installerbase_exe().parent_path() / "binarycreator.exe"; }); + return this->ifw_binarycreator_exe.get_lazy( + [this]() { return get_ifw_installerbase_exe().parent_path() / "binarycreator.exe"; }); } const fs::path& VcpkgPaths::get_ifw_repogen_exe() const { - return this->ifw_repogen_exe.get_lazy([this]() { return get_ifw_installerbase_exe().parent_path() / "repogen.exe"; }); + return this->ifw_repogen_exe.get_lazy( + [this]() { return get_ifw_installerbase_exe().parent_path() / "repogen.exe"; }); } static std::vector get_vs2017_installation_instances(const VcpkgPaths& paths) diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index 3662a46d8..a24f2eac7 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -211,17 +211,17 @@ namespace vcpkg::Commands::Export return nullopt; } - void export_integration_files(const fs::path &raw_exported_dir_path, const VcpkgPaths& paths) + void export_integration_files(const fs::path& raw_exported_dir_path, const VcpkgPaths& paths) { const std::vector integration_files_relative_to_root = { - { ".vcpkg-root" }, - { fs::path{ "scripts" } / "buildsystems" / "msbuild" / "applocal.ps1" }, - { fs::path{ "scripts" } / "buildsystems" / "msbuild" / "vcpkg.targets" }, - { fs::path{ "scripts" } / "buildsystems" / "vcpkg.cmake" }, - { fs::path{ "scripts" } / "cmake" / "vcpkg_get_windows_sdk.cmake" }, - { fs::path{ "scripts" } / "getWindowsSDK.ps1" }, - { fs::path{ "scripts" } / "getProgramFilesPlatformBitness.ps1" }, - { fs::path{ "scripts" } / "getProgramFiles32bit.ps1" }, + {".vcpkg-root"}, + {fs::path{"scripts"} / "buildsystems" / "msbuild" / "applocal.ps1"}, + {fs::path{"scripts"} / "buildsystems" / "msbuild" / "vcpkg.targets"}, + {fs::path{"scripts"} / "buildsystems" / "vcpkg.cmake"}, + {fs::path{"scripts"} / "cmake" / "vcpkg_get_windows_sdk.cmake"}, + {fs::path{"scripts"} / "getWindowsSDK.ps1"}, + {fs::path{"scripts"} / "getProgramFilesPlatformBitness.ps1"}, + {fs::path{"scripts"} / "getProgramFiles32bit.ps1"}, }; for (const fs::path& file : integration_files_relative_to_root) @@ -237,8 +237,27 @@ namespace vcpkg::Commands::Export } } - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + struct ExportArguments + { + bool dry_run; + bool raw; + bool nuget; + bool ifw; + bool zip; + bool seven_zip; + + Optional maybe_nuget_id; + Optional maybe_nuget_version; + + IFW::Options ifw_options; + std::vector specs; + }; + + static ExportArguments handle_export_command_arguments(const VcpkgCmdArguments& args, + const Triplet& default_triplet) { + ExportArguments ret; + static const std::string OPTION_DRY_RUN = "--dry-run"; static const std::string OPTION_RAW = "--raw"; static const std::string OPTION_NUGET = "--nuget"; @@ -258,11 +277,9 @@ namespace vcpkg::Commands::Export Commands::Help::create_example_string("export zlib zlib:x64-windows boost --nuget"); args.check_min_arg_count(1, EXAMPLE); - const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { + ret.specs = Util::fmap(args.command_arguments, [&](auto&& arg) { return Input::check_and_get_package_spec(arg, default_triplet, EXAMPLE); }); - for (auto&& spec : specs) - Input::check_triplet(spec.triplet(), paths); const auto options = args.check_and_get_optional_command_arguments( { @@ -280,16 +297,16 @@ namespace vcpkg::Commands::Export OPTION_IFW_PACKAGES_DIR_PATH, OPTION_IFW_REPOSITORY_DIR_PATH, OPTION_IFW_CONFIG_FILE_PATH, - OPTION_IFW_INSTALLER_FILE_PATH + OPTION_IFW_INSTALLER_FILE_PATH, }); - const bool dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); - const bool raw = options.switches.find(OPTION_RAW) != options.switches.cend(); - const bool nuget = options.switches.find(OPTION_NUGET) != options.switches.cend(); - const bool ifw = options.switches.find(OPTION_IFW) != options.switches.cend(); - const bool zip = options.switches.find(OPTION_ZIP) != options.switches.cend(); - const bool seven_zip = options.switches.find(OPTION_SEVEN_ZIP) != options.switches.cend(); - - if (!raw && !nuget && !ifw && !zip && !seven_zip && !dry_run) + ret.dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); + ret.raw = options.switches.find(OPTION_RAW) != options.switches.cend(); + ret.nuget = options.switches.find(OPTION_NUGET) != options.switches.cend(); + ret.ifw = options.switches.find(OPTION_IFW) != options.switches.cend(); + ret.zip = options.switches.find(OPTION_ZIP) != options.switches.cend(); + ret.seven_zip = options.switches.find(OPTION_SEVEN_ZIP) != options.switches.cend(); + + if (!ret.raw && !ret.nuget && !ret.ifw && !ret.zip && !ret.seven_zip && !ret.dry_run) { System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --ifw --zip --7zip"); @@ -297,38 +314,152 @@ namespace vcpkg::Commands::Export Checks::exit_fail(VCPKG_LINE_INFO); } - auto maybe_nuget_id = maybe_lookup(options.settings, OPTION_NUGET_ID); - auto maybe_nuget_version = maybe_lookup(options.settings, OPTION_NUGET_VERSION); + ret.maybe_nuget_id = maybe_lookup(options.settings, OPTION_NUGET_ID); + ret.maybe_nuget_version = maybe_lookup(options.settings, OPTION_NUGET_VERSION); - Checks::check_exit(VCPKG_LINE_INFO, !maybe_nuget_id || nuget, "--nuget-id is only valid with --nuget"); + Checks::check_exit(VCPKG_LINE_INFO, !ret.maybe_nuget_id || ret.nuget, "--nuget-id is only valid with --nuget"); Checks::check_exit( - VCPKG_LINE_INFO, !maybe_nuget_version || nuget, "--nuget-version is only valid with --nuget"); + VCPKG_LINE_INFO, !ret.maybe_nuget_version || ret.nuget, "--nuget-version is only valid with --nuget"); - IFW::Options ifw_options; + ret.ifw_options.maybe_repository_url = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_URL); + Checks::check_exit(VCPKG_LINE_INFO, + !ret.ifw_options.maybe_repository_url || ret.ifw, + "--ifw-repository-url is only valid with --ifw"); - ifw_options.maybe_repository_url = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_URL); - Checks::check_exit( - VCPKG_LINE_INFO, !ifw_options.maybe_repository_url || ifw, "--ifw-repository-url is only valid with --ifw"); + ret.ifw_options.maybe_packages_dir_path = maybe_lookup(options.settings, OPTION_IFW_PACKAGES_DIR_PATH); + Checks::check_exit(VCPKG_LINE_INFO, + !ret.ifw_options.maybe_packages_dir_path || ret.ifw, + "--ifw-packages-directory-path is only valid with --ifw"); - ifw_options.maybe_packages_dir_path = maybe_lookup(options.settings, OPTION_IFW_PACKAGES_DIR_PATH); - Checks::check_exit( - VCPKG_LINE_INFO, !ifw_options.maybe_packages_dir_path || ifw, "--ifw-packages-directory-path is only valid with --ifw"); + ret.ifw_options.maybe_repository_dir_path = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_DIR_PATH); + Checks::check_exit(VCPKG_LINE_INFO, + !ret.ifw_options.maybe_repository_dir_path || ret.ifw, + "--ifw-repository-directory-path is only valid with --ifw"); - ifw_options.maybe_repository_dir_path = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_DIR_PATH); - Checks::check_exit( - VCPKG_LINE_INFO, !ifw_options.maybe_repository_dir_path || ifw, "--ifw-repository-directory-path is only valid with --ifw"); + ret.ifw_options.maybe_config_file_path = maybe_lookup(options.settings, OPTION_IFW_CONFIG_FILE_PATH); + Checks::check_exit(VCPKG_LINE_INFO, + !ret.ifw_options.maybe_config_file_path || ret.ifw, + "--ifw-configuration-file-path is only valid with --ifw"); - ifw_options.maybe_config_file_path = maybe_lookup(options.settings, OPTION_IFW_CONFIG_FILE_PATH); - Checks::check_exit( - VCPKG_LINE_INFO, !ifw_options.maybe_config_file_path || ifw, "--ifw-configuration-file-path is only valid with --ifw"); + ret.ifw_options.maybe_installer_file_path = maybe_lookup(options.settings, OPTION_IFW_INSTALLER_FILE_PATH); + Checks::check_exit(VCPKG_LINE_INFO, + !ret.ifw_options.maybe_installer_file_path || ret.ifw, + "--ifw-installer-file-path is only valid with --ifw"); + return ret; + } - ifw_options.maybe_installer_file_path = maybe_lookup(options.settings, OPTION_IFW_INSTALLER_FILE_PATH); - Checks::check_exit( - VCPKG_LINE_INFO, !ifw_options.maybe_installer_file_path || ifw, "--ifw-installer-file-path is only valid with --ifw"); + static void print_next_step_info(const fs::path& prefix) + { + const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; + const CMakeVariable cmake_variable = CMakeVariable(L"CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); + System::println("\n" + "To use the exported libraries in CMake projects use:" + "\n" + " %s" + "\n", + Strings::to_utf8(cmake_variable.s)); + }; + + static void handle_raw_based_export(Span export_plan, + const ExportArguments& opts, + const std::string& export_id, + const VcpkgPaths& paths) + { + 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; + std::error_code ec; + fs.remove_all(raw_exported_dir_path, ec); + fs.create_directory(raw_exported_dir_path, ec); + + // execute the plan + for (const ExportPlanAction& action : export_plan) + { + if (action.plan_type != ExportPlanType::ALREADY_BUILT) + { + Checks::unreachable(VCPKG_LINE_INFO); + } + + const std::string display_name = action.spec.to_string(); + System::println("Exporting package %s... ", display_name); + + const BinaryParagraph& binary_paragraph = + action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + + const InstallDir dirs = InstallDir::from_destination_root( + raw_exported_dir_path / "installed", + action.spec.triplet().to_string(), + raw_exported_dir_path / "installed" / "vcpkg" / "info" / (binary_paragraph.fullstem() + ".list")); + + Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); + System::println(System::Color::success, "Exporting package %s... done", display_name); + } + + // Copy files needed for integration + export_integration_files(raw_exported_dir_path, paths); + + if (opts.raw) + { + System::println( + System::Color::success, R"(Files exported at: "%s")", raw_exported_dir_path.generic_string()); + print_next_step_info(export_to_path); + } + + if (opts.nuget) + { + System::println("Creating nuget package... "); + + const std::string nuget_id = opts.maybe_nuget_id.value_or(raw_exported_dir_path.filename().string()); + const std::string nuget_version = opts.maybe_nuget_version.value_or("1.0.0"); + const fs::path output_path = + do_nuget_export(paths, nuget_id, nuget_version, raw_exported_dir_path, export_to_path); + System::println(System::Color::success, "Creating nuget package... done"); + System::println(System::Color::success, "NuGet package exported at: %s", output_path.generic_string()); + + System::println(R"( +With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: + Install-Package %s -Source "%s" +)" + "\n", + nuget_id, + output_path.parent_path().u8string()); + } + + if (opts.zip) + { + System::println("Creating zip archive... "); + const fs::path output_path = + do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::ZIP); + System::println(System::Color::success, "Creating zip archive... done"); + System::println(System::Color::success, "Zip archive exported at: %s", output_path.generic_string()); + print_next_step_info("[...]"); + } + + if (opts.seven_zip) + { + System::println("Creating 7zip archive... "); + const fs::path output_path = + do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::SEVEN_ZIP); + System::println(System::Color::success, "Creating 7zip archive... done"); + System::println(System::Color::success, "7zip archive exported at: %s", output_path.generic_string()); + print_next_step_info("[...]"); + } + + if (!opts.raw) + { + fs.remove_all(raw_exported_dir_path, ec); + } + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + { + const auto opts = handle_export_command_arguments(args, default_triplet); + for (auto&& spec : opts.specs) + Input::check_triplet(spec.triplet(), paths); // create the plan const StatusParagraphs status_db = database_load_check(paths); - std::vector export_plan = Dependencies::create_export_plan(paths, specs, status_db); + std::vector export_plan = Dependencies::create_export_plan(paths, opts.specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !export_plan.empty(), "Export plan cannot be empty"); std::map> group_by_plan_type; @@ -363,118 +494,21 @@ namespace vcpkg::Commands::Export Checks::exit_fail(VCPKG_LINE_INFO); } - if (dry_run) + if (opts.dry_run) { Checks::exit_success(VCPKG_LINE_INFO); } std::string export_id = create_export_id(); - const auto print_next_step_info = [](const fs::path& prefix) { - const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; - const CMakeVariable cmake_variable = - CMakeVariable(L"CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); - System::println("\n" - "To use the exported libraries in CMake projects use:" - "\n" - " %s" - "\n", - Strings::to_utf8(cmake_variable.s)); - }; - - // Main loop - if (raw || nuget || zip || seven_zip) + if (opts.raw || opts.nuget || opts.zip || opts.seven_zip) { - 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; - std::error_code ec; - fs.remove_all(raw_exported_dir_path, ec); - fs.create_directory(raw_exported_dir_path, ec); - - // execute the plan - for (const ExportPlanAction& action : export_plan) - { - if (action.plan_type != ExportPlanType::ALREADY_BUILT) - { - Checks::unreachable(VCPKG_LINE_INFO); - } - - const std::string display_name = action.spec.to_string(); - System::println("Exporting package %s... ", display_name); - - const BinaryParagraph& binary_paragraph = - action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; - - const InstallDir dirs = InstallDir::from_destination_root( - raw_exported_dir_path / "installed", - action.spec.triplet().to_string(), - raw_exported_dir_path / "installed" / "vcpkg" / "info" / (binary_paragraph.fullstem() + ".list")); - - Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); - System::println(System::Color::success, "Exporting package %s... done", display_name); - } - - // Copy files needed for integration - export_integration_files(raw_exported_dir_path, paths); - - if (raw) - { - System::println( - System::Color::success, R"(Files exported at: "%s")", raw_exported_dir_path.generic_string()); - print_next_step_info(export_to_path); - } - - if (nuget) - { - System::println("Creating nuget package... "); - - const std::string nuget_id = maybe_nuget_id.value_or(raw_exported_dir_path.filename().string()); - const std::string nuget_version = maybe_nuget_version.value_or("1.0.0"); - const fs::path output_path = - do_nuget_export(paths, nuget_id, nuget_version, raw_exported_dir_path, export_to_path); - System::println(System::Color::success, "Creating nuget package... done"); - System::println(System::Color::success, "NuGet package exported at: %s", output_path.generic_string()); - - System::println(R"( -With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: - Install-Package %s -Source "%s" -)" - "\n", - nuget_id, - output_path.parent_path().u8string()); - } - - if (zip) - { - System::println("Creating zip archive... "); - const fs::path output_path = - do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::ZIP); - System::println(System::Color::success, "Creating zip archive... done"); - System::println(System::Color::success, "Zip archive exported at: %s", output_path.generic_string()); - print_next_step_info("[...]"); - } - - if (seven_zip) - { - System::println("Creating 7zip archive... "); - const fs::path output_path = - do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::SEVEN_ZIP); - System::println(System::Color::success, "Creating 7zip archive... done"); - System::println(System::Color::success, "7zip archive exported at: %s", output_path.generic_string()); - print_next_step_info("[...]"); - } - - if (!raw) - { - fs.remove_all(raw_exported_dir_path, ec); - } + handle_raw_based_export(export_plan, opts, export_id, paths); } - // IFW loop - if (ifw) + if (opts.ifw) { - IFW::do_export(export_plan, export_id, ifw_options, paths); + IFW::do_export(export_plan, export_id, opts.ifw_options, paths); print_next_step_info("@RootDir@/src/vcpkg"); } diff --git a/toolsrc/src/commands_export_ifw.cpp b/toolsrc/src/commands_export_ifw.cpp index a0692c11e..0dc8a7d31 100644 --- a/toolsrc/src/commands_export_ifw.cpp +++ b/toolsrc/src/commands_export_ifw.cpp @@ -19,39 +19,39 @@ namespace vcpkg::Commands::Export::IFW char mbstr[11]; const size_t bytes_written = std::strftime(mbstr, sizeof(mbstr), "%Y-%m-%d", &date_time); Checks::check_exit(VCPKG_LINE_INFO, - bytes_written == 10, - "Expected 10 bytes to be written, but %u were written", - bytes_written); + bytes_written == 10, + "Expected 10 bytes to be written, but %u were written", + bytes_written); const std::string date_time_as_string(mbstr); return date_time_as_string; } - fs::path get_packages_dir_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + fs::path get_packages_dir_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) { - return ifw_options.maybe_packages_dir_path.has_value() ? - fs::path(ifw_options.maybe_packages_dir_path.value_or_exit(VCPKG_LINE_INFO)) - : paths.root / (export_id + "-ifw-packages"); + return ifw_options.maybe_packages_dir_path.has_value() + ? fs::path(ifw_options.maybe_packages_dir_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-packages"); } - fs::path get_repository_dir_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + fs::path get_repository_dir_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) { - return ifw_options.maybe_repository_dir_path.has_value() ? - fs::path(ifw_options.maybe_repository_dir_path.value_or_exit(VCPKG_LINE_INFO)) - : paths.root / (export_id + "-ifw-repository"); + return ifw_options.maybe_repository_dir_path.has_value() + ? fs::path(ifw_options.maybe_repository_dir_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-repository"); } - fs::path get_config_file_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + fs::path get_config_file_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) { - return ifw_options.maybe_config_file_path.has_value() ? - fs::path(ifw_options.maybe_config_file_path.value_or_exit(VCPKG_LINE_INFO)) - : paths.root / (export_id + "-ifw-configuration.xml"); + return ifw_options.maybe_config_file_path.has_value() + ? fs::path(ifw_options.maybe_config_file_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-configuration.xml"); } - fs::path get_installer_file_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + fs::path get_installer_file_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) { - return ifw_options.maybe_installer_file_path.has_value() ? - fs::path(ifw_options.maybe_installer_file_path.value_or_exit(VCPKG_LINE_INFO)) - : paths.root / (export_id + "-ifw-installer.exe"); + return ifw_options.maybe_installer_file_path.has_value() + ? fs::path(ifw_options.maybe_installer_file_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-installer.exe"); } fs::path export_real_package(const fs::path& ifw_packages_dir_path, @@ -82,7 +82,7 @@ namespace vcpkg::Commands::Export::IFW fs.write_contents(package_xml_file_path, Strings::format( -R"###( + R"###( %s %s @@ -91,12 +91,12 @@ R"###( true )###", - action.spec.to_string(), - binary_paragraph.version, - create_release_date(), - action.spec.name(), - action.spec.triplet().canonical_name(), - deps)); + action.spec.to_string(), + binary_paragraph.version, + create_release_date(), + action.spec.name(), + action.spec.triplet().canonical_name(), + deps)); // Return dir path for export package data return ifw_packages_dir_path / @@ -119,15 +119,16 @@ R"###( !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); - fs.write_contents(package_xml_file_path, Strings::format( -R"###( + fs.write_contents(package_xml_file_path, + Strings::format( + R"###( Packages 1.0.0 %s )###", - create_release_date())); + create_release_date())); for (auto package = unique_packages.begin(); package != unique_packages.end(); ++package) { @@ -146,7 +147,7 @@ R"###( fs.write_contents(package_xml_file_path, Strings::format( -R"###( + R"###( %s %s @@ -154,10 +155,10 @@ R"###( %s )###", - action.spec.name(), - binary_paragraph.description, - binary_paragraph.version, - create_release_date())); + action.spec.name(), + binary_paragraph.description, + binary_paragraph.version, + create_release_date())); } } @@ -176,15 +177,16 @@ R"###( !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); - fs.write_contents(package_xml_file_path, Strings::format( -R"###( + fs.write_contents(package_xml_file_path, + Strings::format( + R"###( Triplets 1.0.0 %s )###", - create_release_date())); + create_release_date())); for (const std::string& triplet : unique_triplets) { @@ -196,16 +198,17 @@ R"###( !ec, "Could not create directory for package file %s", package_xml_file_path.generic_string()); - fs.write_contents(package_xml_file_path, Strings::format( -R"###( + fs.write_contents(package_xml_file_path, + Strings::format( + R"###( %s 1.0.0 %s )###", - triplet, - create_release_date())); + triplet, + create_release_date())); } } @@ -222,18 +225,19 @@ R"###( "Could not create directory for package file %s", package_xml_file_path.generic_string()); - fs.write_contents(package_xml_file_path, Strings::format( -R"###( + fs.write_contents(package_xml_file_path, + Strings::format( + R"###( Integration 1.0.0 %s )###", - create_release_date())); + create_release_date())); } - void export_config(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + void export_config(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) { std::error_code ec; Files::Filesystem& fs = paths.get_filesystem(); @@ -257,21 +261,22 @@ R"###( %s )###", - ifw_repo_url); + ifw_repo_url); } - fs.write_contents(config_xml_file_path, Strings::format( -R"###( + fs.write_contents(config_xml_file_path, + Strings::format( + R"###( vcpkg 1.0.0 @RootDir@/src/vcpkg%s )###", - formatted_repo_url)); + formatted_repo_url)); } - void do_repository(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + void do_repository(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) { const fs::path& repogen_exe = paths.get_ifw_repogen_exe(); const fs::path packages_dir = get_packages_dir_path(export_id, ifw_options, paths); @@ -283,16 +288,13 @@ R"###( Files::Filesystem& fs = paths.get_filesystem(); fs.remove_all(repository_dir, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not remove outdated repository directory %s", - repository_dir.generic_string()); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not remove outdated repository directory %s", repository_dir.generic_string()); - const std::wstring cmd_line = - Strings::wformat(LR"("%s" --packages "%s" "%s" > nul)", - repogen_exe.native(), - packages_dir.native(), - repository_dir.native()); + const std::wstring cmd_line = Strings::wformat(LR"("%s" --packages "%s" "%s" > nul)", + repogen_exe.native(), + packages_dir.native(), + repository_dir.native()); const int exit_code = System::cmd_execute_clean(cmd_line); Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: IFW repository generating failed"); @@ -300,7 +302,7 @@ R"###( System::println(System::Color::success, "Generating repository %s... done.", repository_dir.generic_string()); } - void do_installer(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + void do_installer(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) { const fs::path& binarycreator_exe = paths.get_ifw_binarycreator_exe(); const fs::path config_file = get_config_file_path(export_id, ifw_options, paths); @@ -315,21 +317,19 @@ R"###( std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); if (!ifw_repo_url.empty()) { - cmd_line = - Strings::wformat(LR"("%s" --online-only --config "%s" --repository "%s" "%s" > nul)", - binarycreator_exe.native(), - config_file.native(), - repository_dir.native(), - installer_file.native()); + cmd_line = Strings::wformat(LR"("%s" --online-only --config "%s" --repository "%s" "%s" > nul)", + binarycreator_exe.native(), + config_file.native(), + repository_dir.native(), + installer_file.native()); } else { - cmd_line = - Strings::wformat(LR"("%s" --config "%s" --packages "%s" "%s" > nul)", - binarycreator_exe.native(), - config_file.native(), - packages_dir.native(), - installer_file.native()); + cmd_line = Strings::wformat(LR"("%s" --config "%s" --packages "%s" "%s" > nul)", + binarycreator_exe.native(), + config_file.native(), + packages_dir.native(), + installer_file.native()); } const int exit_code = System::cmd_execute_clean(cmd_line); @@ -338,7 +338,10 @@ R"###( System::println(System::Color::success, "Generating installer %s... done.", installer_file.generic_string()); } - void do_export(const std::vector &export_plan, const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) + void do_export(const std::vector& export_plan, + const std::string& export_id, + const Options& ifw_options, + const VcpkgPaths& paths) { const fs::path ifw_packages_dir_path = get_packages_dir_path(export_id, ifw_options, paths); const fs::path config_file = get_config_file_path(export_id, ifw_options, paths); @@ -350,15 +353,13 @@ R"###( fs.remove_all(ifw_packages_dir_path, ec); Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not remove outdated packages directory %s", - ifw_packages_dir_path.generic_string()); + !ec, + "Could not remove outdated packages directory %s", + ifw_packages_dir_path.generic_string()); fs.create_directory(ifw_packages_dir_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not create packages directory %s", - ifw_packages_dir_path.generic_string()); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not create packages directory %s", ifw_packages_dir_path.generic_string()); // execute the plan std::map unique_packages; @@ -384,9 +385,9 @@ R"###( // Copy package data const InstallDir dirs = InstallDir::from_destination_root(ifw_package_dir_path, - action.spec.triplet().to_string(), - ifw_package_dir_path / "vcpkg" / "info" / - (binary_paragraph.fullstem() + ".list")); + action.spec.triplet().to_string(), + ifw_package_dir_path / "vcpkg" / "info" / + (binary_paragraph.fullstem() + ".list")); Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); System::println("Exporting package %s... done", display_name); -- cgit v1.2.3 From c98db7541594eadccf6823d4fdde2ff8c53c5fe9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 4 Oct 2017 16:24:03 -0700 Subject: [vcpkg] Refactor out implication in option parsing for export --- toolsrc/include/Span.h | 2 ++ toolsrc/src/commands_export.cpp | 70 +++++++++++++++++++++++------------------ 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/toolsrc/include/Span.h b/toolsrc/include/Span.h index b2c9acdbc..a43e8f992 100644 --- a/toolsrc/include/Span.h +++ b/toolsrc/include/Span.h @@ -2,6 +2,7 @@ #include #include +#include #include template @@ -17,6 +18,7 @@ public: constexpr Span(std::nullptr_t) noexcept : Span() {} constexpr Span(T* ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {} constexpr Span(T* ptr_begin, T* ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {} + constexpr Span(std::initializer_list l) noexcept : m_ptr(l.begin()), m_count(l.size()) {} template constexpr Span(T (&arr)[N]) noexcept : Span(arr, N) diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp index a24f2eac7..20838f5a5 100644 --- a/toolsrc/src/commands_export.cpp +++ b/toolsrc/src/commands_export.cpp @@ -314,37 +314,45 @@ namespace vcpkg::Commands::Export Checks::exit_fail(VCPKG_LINE_INFO); } - ret.maybe_nuget_id = maybe_lookup(options.settings, OPTION_NUGET_ID); - ret.maybe_nuget_version = maybe_lookup(options.settings, OPTION_NUGET_VERSION); - - Checks::check_exit(VCPKG_LINE_INFO, !ret.maybe_nuget_id || ret.nuget, "--nuget-id is only valid with --nuget"); - Checks::check_exit( - VCPKG_LINE_INFO, !ret.maybe_nuget_version || ret.nuget, "--nuget-version is only valid with --nuget"); - - ret.ifw_options.maybe_repository_url = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_URL); - Checks::check_exit(VCPKG_LINE_INFO, - !ret.ifw_options.maybe_repository_url || ret.ifw, - "--ifw-repository-url is only valid with --ifw"); - - ret.ifw_options.maybe_packages_dir_path = maybe_lookup(options.settings, OPTION_IFW_PACKAGES_DIR_PATH); - Checks::check_exit(VCPKG_LINE_INFO, - !ret.ifw_options.maybe_packages_dir_path || ret.ifw, - "--ifw-packages-directory-path is only valid with --ifw"); - - ret.ifw_options.maybe_repository_dir_path = maybe_lookup(options.settings, OPTION_IFW_REPOSITORY_DIR_PATH); - Checks::check_exit(VCPKG_LINE_INFO, - !ret.ifw_options.maybe_repository_dir_path || ret.ifw, - "--ifw-repository-directory-path is only valid with --ifw"); - - ret.ifw_options.maybe_config_file_path = maybe_lookup(options.settings, OPTION_IFW_CONFIG_FILE_PATH); - Checks::check_exit(VCPKG_LINE_INFO, - !ret.ifw_options.maybe_config_file_path || ret.ifw, - "--ifw-configuration-file-path is only valid with --ifw"); - - ret.ifw_options.maybe_installer_file_path = maybe_lookup(options.settings, OPTION_IFW_INSTALLER_FILE_PATH); - Checks::check_exit(VCPKG_LINE_INFO, - !ret.ifw_options.maybe_installer_file_path || ret.ifw, - "--ifw-installer-file-path is only valid with --ifw"); + struct OptionPair + { + const std::string& name; + Optional& out_opt; + }; + const auto options_implies = + [&](const std::string& main_opt_name, bool main_opt, Span implying_opts) { + if (main_opt) + { + for (auto&& opt : implying_opts) + opt.out_opt = maybe_lookup(options.settings, opt.name); + } + else + { + for (auto&& opt : implying_opts) + Checks::check_exit(VCPKG_LINE_INFO, + !maybe_lookup(options.settings, opt.name), + "%s is only valid with %s", + opt.name, + main_opt_name); + } + }; + + options_implies(OPTION_NUGET, + ret.nuget, + { + {OPTION_NUGET_ID, ret.maybe_nuget_id}, + {OPTION_NUGET_VERSION, ret.maybe_nuget_version}, + }); + + options_implies(OPTION_IFW, + ret.ifw, + { + {OPTION_IFW_REPOSITORY_URL, ret.ifw_options.maybe_repository_url}, + {OPTION_IFW_PACKAGES_DIR_PATH, ret.ifw_options.maybe_packages_dir_path}, + {OPTION_IFW_REPOSITORY_DIR_PATH, ret.ifw_options.maybe_repository_dir_path}, + {OPTION_IFW_CONFIG_FILE_PATH, ret.ifw_options.maybe_config_file_path}, + {OPTION_IFW_INSTALLER_FILE_PATH, ret.ifw_options.maybe_installer_file_path}, + }); return ret; } -- cgit v1.2.3 From 887466dfc1ff8ed20d3b9268f76da987f7d53635 Mon Sep 17 00:00:00 2001 From: LazyHamster Date: Thu, 5 Oct 2017 15:56:49 +0300 Subject: Added port for librtmp 2.3 --- ports/librtmp/CMakeLists.txt | 57 ++++++++++++++++++ ports/librtmp/CONTROL | 4 ++ ports/librtmp/fix_strncasecmp.patch | 16 ++++++ ports/librtmp/hide_netstackdump.patch | 22 +++++++ ports/librtmp/librtmp.def | 105 ++++++++++++++++++++++++++++++++++ ports/librtmp/portfile.cmake | 36 ++++++++++++ 6 files changed, 240 insertions(+) create mode 100644 ports/librtmp/CMakeLists.txt create mode 100644 ports/librtmp/CONTROL create mode 100644 ports/librtmp/fix_strncasecmp.patch create mode 100644 ports/librtmp/hide_netstackdump.patch create mode 100644 ports/librtmp/librtmp.def create mode 100644 ports/librtmp/portfile.cmake diff --git a/ports/librtmp/CMakeLists.txt b/ports/librtmp/CMakeLists.txt new file mode 100644 index 000000000..c12ddc0ef --- /dev/null +++ b/ports/librtmp/CMakeLists.txt @@ -0,0 +1,57 @@ +cmake_minimum_required(VERSION 3.8) + +project(librtmp C) + +find_package(zlib REQUIRED) +find_package(openssl REQUIRED) + +include_directories(${ZLIB_INCLUDE_DIRS}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +set(CMAKE_DEBUG_POSTFIX "d") + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS) +endif() + +add_definitions(-DLIBRTMP_ONLY) + +# List the header files +set(HEADERS librtmp/amf.h + librtmp/bytes.h + librtmp/dh.h + librtmp/dhgroups.h + librtmp/handshake.h + librtmp/http.h + librtmp/log.h + librtmp/rtmp.h + librtmp/rtmp_sys.h +) + +# List the source files +set(SRCS librtmp/amf.c + librtmp/hashswf.c + librtmp/log.c + librtmp/parseurl.c + librtmp/rtmp.c + librtmp/librtmp.def +) + +if(MSVC) + set(SRCS_MSVC "librtmp/librtmp.def") +endif() + +add_library(librtmp ${SRCS} ${HEADERS} ${SRCS_MSVC}) + +target_include_directories(librtmp PRIVATE ./librtmp) +target_link_libraries(librtmp PRIVATE ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES}) +target_link_libraries(librtmp PRIVATE Ws2_32.lib Winmm.lib) + +install(TARGETS librtmp + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES librtmp/rtmp.h librtmp/amf.h DESTINATION include/librtmp) \ No newline at end of file diff --git a/ports/librtmp/CONTROL b/ports/librtmp/CONTROL new file mode 100644 index 000000000..d26541d91 --- /dev/null +++ b/ports/librtmp/CONTROL @@ -0,0 +1,4 @@ +Source: librtmp +Version: 2.3 +Build-Depends: zlib, openssl +Description: RTMPDump Real-Time Messaging Protocol API diff --git a/ports/librtmp/fix_strncasecmp.patch b/ports/librtmp/fix_strncasecmp.patch new file mode 100644 index 000000000..c1cadc4ac --- /dev/null +++ b/ports/librtmp/fix_strncasecmp.patch @@ -0,0 +1,16 @@ +diff --git a/librtmp/rtmp_sys.h b/librtmp/rtmp_sys.h +index 0874cbe..b43d587 100644 +--- a/librtmp/rtmp_sys.h ++++ b/librtmp/rtmp_sys.h +@@ -37,6 +37,11 @@ + #include + #endif + ++#ifdef _MSC_VER ++#define strncasecmp _strnicmp ++#define strcasecmp _stricmp ++#endif ++ + #define GetSockError() WSAGetLastError() + #define SetSockError(e) WSASetLastError(e) + #define setsockopt(a,b,c,d,e) (setsockopt)(a,b,c,(const char *)d,(int)e) diff --git a/ports/librtmp/hide_netstackdump.patch b/ports/librtmp/hide_netstackdump.patch new file mode 100644 index 000000000..e2a5e4207 --- /dev/null +++ b/ports/librtmp/hide_netstackdump.patch @@ -0,0 +1,22 @@ +diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c +index f152648..0bf3f7d 100644 +--- a/librtmp/rtmp.c ++++ b/librtmp/rtmp.c +@@ -1316,7 +1316,7 @@ ReadN(RTMP *r, char *buffer, int n) + SendBytesReceived(r); + } + /*RTMP_Log(RTMP_LOGDEBUG, "%s: %d bytes\n", __FUNCTION__, nBytes); */ +-#ifdef _DEBUG ++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY) + fwrite(ptr, 1, nBytes, netstackdump_read); + #endif + +@@ -3527,7 +3527,7 @@ RTMPSockBuf_Send(RTMPSockBuf *sb, const char *buf, int len) + { + int rc; + +-#ifdef _DEBUG ++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY) + fwrite(buf, 1, len, netstackdump); + #endif + diff --git a/ports/librtmp/librtmp.def b/ports/librtmp/librtmp.def new file mode 100644 index 000000000..d9f8b9136 --- /dev/null +++ b/ports/librtmp/librtmp.def @@ -0,0 +1,105 @@ +EXPORTS + AMF_AddProp + AMF_CountProp + AMF_Decode + AMF_DecodeArray + AMF_DecodeBoolean + AMF_DecodeInt16 + AMF_DecodeInt24 + AMF_DecodeInt32 + AMF_DecodeLongString + AMF_DecodeNumber + AMF_DecodeString + AMF_Dump + AMF_Encode + AMF_EncodeBoolean + AMF_EncodeInt16 + AMF_EncodeInt24 + AMF_EncodeInt32 + AMF_EncodeNamedBoolean + AMF_EncodeNamedNumber + AMF_EncodeNamedString + AMF_EncodeNumber + AMF_EncodeString + AMF_GetProp + AMF_Reset + + AMF3_Decode + AMF3CD_AddProp + AMF3CD_GetProp + AMF3Prop_Decode + AMF3ReadInteger + AMF3ReadString + + AMFProp_Decode + AMFProp_Dump + AMFProp_Encode + AMFProp_GetBoolean + AMFProp_GetName + AMFProp_GetNumber + AMFProp_GetObject + AMFProp_GetString + AMFProp_GetType + AMFProp_IsValid + AMFProp_Reset + AMFProp_SetName + + RTMP_Alloc + RTMP_ClientPacket + RTMP_Close + RTMP_Connect + RTMP_Connect0 + RTMP_Connect1 + RTMP_ConnectStream + RTMP_ctrlC + RTMP_debuglevel + RTMP_DefaultFlashVer + RTMP_DeleteStream + RTMP_DropRequest + RTMP_EnableWrite + RTMP_FindFirstMatchingProperty + RTMP_FindPrefixProperty + RTMP_Free + RTMP_GetDuration + RTMP_GetNextMediaPacket + RTMP_GetTime + RTMP_HashSWF + RTMP_Init + RTMP_IsConnected + RTMP_IsTimedout + RTMP_LibVersion + RTMP_Log + RTMP_LogGetLevel + RTMP_LogHex + RTMP_LogHexString + RTMP_LogPrintf + RTMP_LogSetCallback + RTMP_LogSetLevel + RTMP_LogSetOutput + RTMP_LogStatus + RTMP_ParsePlaypath + RTMP_ParseURL + RTMP_Pause + RTMP_Read + RTMP_ReadPacket + RTMP_ReconnectStream + RTMP_SendChunk + RTMP_SendClientBW + RTMP_SendCreateStream + RTMP_SendCtrl + RTMP_SendPacket + RTMP_SendPause + RTMP_SendSeek + RTMP_SendServerBW + RTMP_Serve + RTMP_SetBufferMS + RTMP_SetOpt + RTMP_SetupStream + RTMP_SetupURL + RTMP_Socket + RTMP_TLS_ctx + RTMP_TLS_Init + RTMP_ToggleStream + RTMP_UpdateBufferMS + RTMP_UserInterrupt + RTMP_Write diff --git a/ports/librtmp/portfile.cmake b/ports/librtmp/portfile.cmake new file mode 100644 index 000000000..18423f152 --- /dev/null +++ b/ports/librtmp/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +set(RTMPDUMP_VERSION 2.3) +set(RTMPDUMP_FILENAME rtmpdump-${RTMPDUMP_VERSION}.tgz) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rtmpdump-${RTMPDUMP_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "http://rtmpdump.mplayerhq.hu/download/${RTMPDUMP_FILENAME}" + FILENAME "${RTMPDUMP_FILENAME}" + SHA512 d8240ba372a704231286b81bbf75716d8b76874840538c4e1527f7f8b6ca66eeaba6b03167fe6fab06bf80f20f07d89ecb84cc428b3196234174a43f3328ec2a +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/librtmp.def DESTINATION ${SOURCE_PATH}/librtmp) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix_strncasecmp.patch + ${CMAKE_CURRENT_LIST_DIR}/hide_netstackdump.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# License and man +file(INSTALL ${SOURCE_PATH}/librtmp/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/librtmp RENAME copyright) +file(INSTALL ${SOURCE_PATH}/librtmp/librtmp.3.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/librtmp) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 13a225c6ab4c20e7f62c3463be64b3075ffb9c50 Mon Sep 17 00:00:00 2001 From: glachancecmaisonneuve Date: Thu, 5 Oct 2017 12:15:42 -0400 Subject: mozjpeg initial port --- ports/mozjpeg/CONTROL | 3 +++ ports/mozjpeg/portfile.cmake | 49 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 ports/mozjpeg/CONTROL create mode 100644 ports/mozjpeg/portfile.cmake diff --git a/ports/mozjpeg/CONTROL b/ports/mozjpeg/CONTROL new file mode 100644 index 000000000..8afc065b3 --- /dev/null +++ b/ports/mozjpeg/CONTROL @@ -0,0 +1,3 @@ +Source: mozjpeg +Version: 3.2 +Description: MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world's deployed decoders. It's compatible with libjpeg API and ABI, and can be used as a drop-in replacement for libjpeg. diff --git a/ports/mozjpeg/portfile.cmake b/ports/mozjpeg/portfile.cmake new file mode 100644 index 000000000..d95f83ff8 --- /dev/null +++ b/ports/mozjpeg/portfile.cmake @@ -0,0 +1,49 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mozjpeg-3.2) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/mozilla/mozjpeg/archive/v3.2.zip" + FILENAME "mozjpeg.zip" + SHA512 a1ba53dea3e04add46616918b5e96f2c8102ef65856596f1794df29c8be27db3d9fb13e7ffc864d23626f98dff5a6b47315903cae9ae41f9905aef2cc91af0c5 +) + +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") + +vcpkg_extract_source_archive(${ARCHIVE}) + +if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static) + set(OPTIONS "-DENABLE_SHARED=FALSE") +else() + set(OPTIONS "-DENABLE_STATIC=FALSE") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${OPTIONS} +) + +vcpkg_install_cmake() + +#remove extra debug files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) +file(GLOB DEBUGEXES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE ${DEBUGEXES}) + +#move exes to tools +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) +file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(REMOVE ${EXES}) + +#remove empty fodlers after static build +if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/mozjpeg RENAME copyright) +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 6f763c5ca830c9e461e106c63959a60d33eb5e5b Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Thu, 5 Oct 2017 21:24:32 +0300 Subject: [vcpkg-export-ifw] Maintenance Tool Install maintenance tool and create Start menu shortcuts to manage, update and uninstall packages. --- scripts/ifw/maintenance.qs | 46 +++++++++++++++++++++++++ toolsrc/src/commands_export_ifw.cpp | 69 ++++++++++++++++++++++++++++++++++--- 2 files changed, 110 insertions(+), 5 deletions(-) create mode 100644 scripts/ifw/maintenance.qs diff --git a/scripts/ifw/maintenance.qs b/scripts/ifw/maintenance.qs new file mode 100644 index 000000000..5cdad7225 --- /dev/null +++ b/scripts/ifw/maintenance.qs @@ -0,0 +1,46 @@ +// constructor +function Component() +{ + installer.installationStarted.connect(this, Component.prototype.onInstallationStarted); +} + +Component.prototype.onInstallationStarted = function() +{ + if (component.updateRequested() || component.installationRequested()) { + if (installer.value("os") == "win") + component.installerbaseBinaryPath = "@TargetDir@/tempmaintenancetool.exe"; + installer.setInstallerBaseBinary(component.installerbaseBinaryPath); + } +} + +Component.prototype.createOperations = function() +{ + // call the base createOperations + component.createOperations(); + + // only for windows online installer + if ( installer.value("os") == "win" && !installer.isOfflineOnly() ) + { + // shortcut to add or remove packages + component.addOperation( "CreateShortcut", + "@TargetDir@/maintenancetool.exe", + "@StartMenuDir@/Manage vcpkg.lnk", + " --manage-packages"); + // shortcut to update packages + component.addOperation( "CreateShortcut", + "@TargetDir@/maintenancetool.exe", + "@StartMenuDir@/Update vcpkg.lnk", + " --updater"); + } + + // create uninstall link only for windows + if (installer.value("os") == "win") + { + // shortcut to uninstaller + component.addOperation( "CreateShortcut", + "@TargetDir@/maintenancetool.exe", + "@StartMenuDir@/Uninstall vcpkg.lnk", + " --uninstall"); + } +} + diff --git a/toolsrc/src/commands_export_ifw.cpp b/toolsrc/src/commands_export_ifw.cpp index 0dc8a7d31..4ab0ae537 100644 --- a/toolsrc/src/commands_export_ifw.cpp +++ b/toolsrc/src/commands_export_ifw.cpp @@ -270,12 +270,66 @@ namespace vcpkg::Commands::Export::IFW vcpkg 1.0.0 + vcpkg @RootDir@/src/vcpkg%s )###", formatted_repo_url)); } + void export_maintenance_tool(const fs::path& ifw_packages_dir_path, const VcpkgPaths& paths) + { + System::println("Exporting maintenance tool... "); + + std::error_code ec; + Files::Filesystem& fs = paths.get_filesystem(); + + const fs::path& installerbase_exe = paths.get_ifw_installerbase_exe(); + fs::path tempmaintenancetool = ifw_packages_dir_path / "maintenance" / "data" / "tempmaintenancetool.exe"; + fs.create_directories(tempmaintenancetool.parent_path(), ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + tempmaintenancetool.generic_string()); + fs.copy_file(installerbase_exe, tempmaintenancetool, fs::copy_options::overwrite_existing, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not write package file %s", + tempmaintenancetool.generic_string()); + + fs::path package_xml_file_path = ifw_packages_dir_path / "maintenance" / "meta" / "package.xml"; + fs::path package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + fs.write_contents(package_xml_file_path, + Strings::format( + R"###( + + Maintenance Tool + Maintenance Tool + 1.0.0 + %s + + true + true + true + +)###", +create_release_date())); + const fs::path script_source = paths.root / "scripts" / "ifw" / "maintenance.qs"; + const fs::path script_destination = ifw_packages_dir_path / "maintenance" / "meta" / "maintenance.qs"; + fs.copy_file(script_source, script_destination, fs::copy_options::overwrite_existing, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not write package file %s", + script_destination.generic_string()); + + System::println("Exporting maintenance tool... done"); + } + void do_repository(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) { const fs::path& repogen_exe = paths.get_ifw_repogen_exe(); @@ -343,14 +397,12 @@ namespace vcpkg::Commands::Export::IFW const Options& ifw_options, const VcpkgPaths& paths) { - const fs::path ifw_packages_dir_path = get_packages_dir_path(export_id, ifw_options, paths); - const fs::path config_file = get_config_file_path(export_id, ifw_options, paths); - - System::println("Exporting packages %s... ", ifw_packages_dir_path.generic_string()); - std::error_code ec; 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); Checks::check_exit(VCPKG_LINE_INFO, !ec, @@ -361,6 +413,11 @@ namespace vcpkg::Commands::Export::IFW Checks::check_exit( VCPKG_LINE_INFO, !ec, "Could not create packages directory %s", ifw_packages_dir_path.generic_string()); + // Export maintenance tool + export_maintenance_tool(ifw_packages_dir_path, paths); + + System::println("Exporting packages %s... ", ifw_packages_dir_path.generic_string()); + // execute the plan std::map unique_packages; std::set unique_triplets; @@ -395,6 +452,8 @@ namespace vcpkg::Commands::Export::IFW System::println("Exporting packages %s... done", ifw_packages_dir_path.generic_string()); + const fs::path config_file = get_config_file_path(export_id, ifw_options, paths); + System::println("Generating configuration %s...", config_file.generic_string()); // Unique packages -- cgit v1.2.3 From a518ded266259141edd278e3f4025a3ab3211215 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 5 Oct 2017 14:36:29 -0700 Subject: [vcpkg] Check size and don't perform stripping if string is too small. --- toolsrc/src/vcpkg_System.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 4d2e88b73..7a6e7f028 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -179,6 +179,7 @@ namespace vcpkg::System // On Win7, output from powershell calls contain a byte order mark, so we strip it out if it is present static void remove_byte_order_mark(std::wstring* s) { + if (s->size() < 3) return; const wchar_t* a = s->c_str(); // This is the UTF-8 byte-order mark if (a[0] == 0xEF && a[1] == 0xBB && a[2] == 0xBF) -- cgit v1.2.3 From 2c9ee072da34a925f0faf22596e532d378930582 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 5 Oct 2017 17:49:28 -0700 Subject: [vcpkg_build_cmake] Refactor _build_ and _install_ into a single cmake script. Regenerate documentation. Remove MSVC_64_TOOLSET option because it's obsolete. --- docs/maintainers/portfile-functions.md | 2 + docs/maintainers/vcpkg_acquire_msys.md | 2 +- docs/maintainers/vcpkg_build_cmake.md | 31 ++++++++++++ docs/maintainers/vcpkg_find_acquire_program.md | 2 +- docs/maintainers/vcpkg_from_bitbucket.md | 53 +++++++++++++++++++++ docs/maintainers/vcpkg_from_github.md | 6 ++- docs/maintainers/vcpkg_install_cmake.md | 8 ++-- ports/folly/portfile.cmake | 2 +- ports/protobuf/portfile.cmake | 3 +- scripts/cmake/vcpkg_build_cmake.cmake | 65 ++++++++++++++------------ scripts/cmake/vcpkg_configure_cmake.cmake | 2 + scripts/cmake/vcpkg_install_cmake.cmake | 50 ++------------------ 12 files changed, 141 insertions(+), 85 deletions(-) create mode 100644 docs/maintainers/vcpkg_build_cmake.md create mode 100644 docs/maintainers/vcpkg_from_bitbucket.md diff --git a/docs/maintainers/portfile-functions.md b/docs/maintainers/portfile-functions.md index 705d65b7e..e16147f7d 100644 --- a/docs/maintainers/portfile-functions.md +++ b/docs/maintainers/portfile-functions.md @@ -3,6 +3,7 @@ # Portfile helper functions - [vcpkg\_acquire\_msys](vcpkg_acquire_msys.md) - [vcpkg\_apply\_patches](vcpkg_apply_patches.md) +- [vcpkg\_build\_cmake](vcpkg_build_cmake.md) - [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md) - [vcpkg\_configure\_cmake](vcpkg_configure_cmake.md) - [vcpkg\_copy\_pdbs](vcpkg_copy_pdbs.md) @@ -11,5 +12,6 @@ - [vcpkg\_execute\_required\_process](vcpkg_execute_required_process.md) - [vcpkg\_extract\_source\_archive](vcpkg_extract_source_archive.md) - [vcpkg\_find\_acquire\_program](vcpkg_find_acquire_program.md) +- [vcpkg\_from\_bitbucket](vcpkg_from_bitbucket.md) - [vcpkg\_from\_github](vcpkg_from_github.md) - [vcpkg\_install\_cmake](vcpkg_install_cmake.md) diff --git a/docs/maintainers/vcpkg_acquire_msys.md b/docs/maintainers/vcpkg_acquire_msys.md index 46cda81fd..53aa6532e 100644 --- a/docs/maintainers/vcpkg_acquire_msys.md +++ b/docs/maintainers/vcpkg_acquire_msys.md @@ -32,7 +32,7 @@ message(STATUS "Installing MSYS Packages") vcpkg_execute_required_process( COMMAND ${BASH} --noprofile --norc -c - "pacman -Sy --noconfirm --needed make" + 'PATH=/usr/bin:\$PATH pacman -Sy --noconfirm --needed make' WORKING_DIRECTORY ${MSYS_ROOT} LOGNAME pacman-${TARGET_TRIPLET}) ``` diff --git a/docs/maintainers/vcpkg_build_cmake.md b/docs/maintainers/vcpkg_build_cmake.md new file mode 100644 index 000000000..ddfa46f6b --- /dev/null +++ b/docs/maintainers/vcpkg_build_cmake.md @@ -0,0 +1,31 @@ +# vcpkg_build_cmake + +Build a cmake project. + +## Usage: +```cmake +vcpkg_build_cmake([DISABLE_PARALLEL] [TARGET ]) +``` + +## Parameters: +### DISABLE_PARALLEL +The underlying buildsystem will be instructed to not parallelize + +### TARGET +The target passed to the cmake build command (`cmake --build . --target `). If not specified, no target will +be passed. + +## Notes: +This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). +You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the +"install" target + +## Examples: + +* [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +* [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +* [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) +* [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_build_cmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_cmake.cmake) diff --git a/docs/maintainers/vcpkg_find_acquire_program.md b/docs/maintainers/vcpkg_find_acquire_program.md index bc50ef4c8..8107c8dd2 100644 --- a/docs/maintainers/vcpkg_find_acquire_program.md +++ b/docs/maintainers/vcpkg_find_acquire_program.md @@ -16,6 +16,7 @@ The current list of programs includes: - 7Z - BISON - FLEX +- GASPREPROCESSOR - PERL - PYTHON2 - PYTHON3 @@ -24,7 +25,6 @@ The current list of programs includes: - NASM - NINJA - YASM -- GASPREPROCESSOR Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md). diff --git a/docs/maintainers/vcpkg_from_bitbucket.md b/docs/maintainers/vcpkg_from_bitbucket.md new file mode 100644 index 000000000..c8850b725 --- /dev/null +++ b/docs/maintainers/vcpkg_from_bitbucket.md @@ -0,0 +1,53 @@ +# vcpkg_from_bitbucket + +Download and extract a project from Bitbucket. +Enables support for installing HEAD `vcpkg.exe install --head `. + +## Usage: +```cmake +vcpkg_from_bitbucket( + OUT_SOURCE_PATH + REPO + [REF ] + [SHA512 <45d0d7f8cc350...>] + [HEAD_REF ] +) +``` + +## Parameters: +### OUT_SOURCE_PATH +Specifies the out-variable that will contain the extracted location. + +This should be set to `SOURCE_PATH` by convention. + +### REPO +The organization or user and repository on GitHub. + +### REF +A stable git commit-ish (ideally a tag) 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. + +If `REF` is specified, `SHA512` must also be specified. + +### SHA512 +The SHA512 hash that should match the archive (https://bitbucket.com/${REPO}/get/${REF}.tar.gz). + +This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. + +### HEAD_REF +The unstable git commit-ish (ideally a branch) to pull for `--head` builds. + +For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. + +## Notes: +At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. + +This exports the `VCPKG_HEAD_VERSION` variable during head builds. + +## Examples: + +* [blaze](https://github.com/Microsoft/vcpkg/blob/master/ports/blaze/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_from_bitbucket.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_from_bitbucket.cmake) diff --git a/docs/maintainers/vcpkg_from_github.md b/docs/maintainers/vcpkg_from_github.md index cb7849fcc..cf50dc445 100644 --- a/docs/maintainers/vcpkg_from_github.md +++ b/docs/maintainers/vcpkg_from_github.md @@ -23,7 +23,9 @@ This should be set to `SOURCE_PATH` by convention. The organization or user and repository on GitHub. ### REF -A stable git commit-ish (ideally a tag) that will not change contents. +A stable git commit-ish (ideally a tag) 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. If `REF` is specified, `SHA512` must also be specified. @@ -38,7 +40,7 @@ The unstable git commit-ish (ideally a branch) to pull for `--head` builds. For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. ## Notes: -At least one of `REF` and `HEAD_REF` must be specified. +At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. This exports the `VCPKG_HEAD_VERSION` variable during head builds. diff --git a/docs/maintainers/vcpkg_install_cmake.md b/docs/maintainers/vcpkg_install_cmake.md index e199d1292..1b132b4f1 100644 --- a/docs/maintainers/vcpkg_install_cmake.md +++ b/docs/maintainers/vcpkg_install_cmake.md @@ -4,15 +4,15 @@ Build and install a cmake project. ## Usage: ```cmake -vcpkg_install_cmake([MSVC_64_TOOLSET]) +vcpkg_install_cmake(...) ``` ## Parameters: -### MSVC_64_TOOLSET -This adds the `/p:PreferredToolArchitecture=x64` switch if the underlying buildsystem is MSBuild. Some large projects can run out of memory when linking if they use the 32-bit hosted tools. +See [`vcpkg_build_cmake()`](vcpkg_build_cmake.md). ## Notes: -This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). +This command transparently forwards to [`vcpkg_build_cmake()`](vcpkg_build_cmake.md), adding a `TARGET install` +parameter. ## Examples: diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 919e799d5..1b30ad86c 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -38,7 +38,7 @@ vcpkg_configure_cmake( # Folly runs built executables during the build, so they need access to the installed DLLs. set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") -vcpkg_install_cmake(MSVC_64_TOOLSET) +vcpkg_install_cmake() vcpkg_copy_pdbs() diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index e3cae639c..e7f45c36c 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -58,8 +58,7 @@ vcpkg_configure_cmake( -DCMAKE_INSTALL_CMAKEDIR=share/protobuf ) -# Using 64-bit toolset to avoid occassional Linker Out-of-Memory issues. -vcpkg_install_cmake(MSVC_64_TOOLSET) +vcpkg_install_cmake() # It appears that at this point the build hasn't actually finished. There is probably # a process spawned by the build, therefore we need to wait a bit. diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 546071a36..5dc81ec09 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -4,19 +4,21 @@ ## ## ## Usage: ## ```cmake -## vcpkg_build_cmake([MSVC_64_TOOLSET] [DISABLE_PARALLEL]) +## vcpkg_build_cmake([DISABLE_PARALLEL] [TARGET ]) ## ``` ## ## ## Parameters: -## ### MSVC_64_TOOLSET -## This adds the `/p:PreferredToolArchitecture=x64` switch to the underlying buildsystem parameters. Some large projects can run out of memory when linking if they use the 32-bit hosted tools. -## ## ### DISABLE_PARALLEL -## The /m parameter will not be added to the underlying buildsystem parameters +## The underlying buildsystem will be instructed to not parallelize +## +## ### TARGET +## The target passed to the cmake build command (`cmake --build . --target `). If not specified, no target will +## be passed. ## ## ## Notes: ## This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). -## Use [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the "install" target +## You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the +## "install" target ## ## ## Examples: ## @@ -25,45 +27,50 @@ ## * [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_build_cmake) - cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN}) - - set(MSVC_EXTRA_ARGS - "/p:VCPkgLocalAppDataDisabled=true" - "/p:UseIntelMKL=No" - ) + cmake_parse_arguments(_bc "DISABLE_PARALLEL" "TARGET;LOGFILE_ROOT" "" ${ARGN}) - # Specifies the architecture of the toolset, NOT the architecture of the produced binary - # This can help libraries that cause the linker to run out of memory. - # https://support.microsoft.com/en-us/help/2891057/linker-fatal-error-lnk1102-out-of-memory - if (_bc_MSVC_64_TOOLSET) - list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64") + if(NOT _bc_LOGFILE_ROOT) + set(_bc_LOGFILE_ROOT "build") endif() - if (NOT _bc_DISABLE_PARALLEL) - list(APPEND MSVC_EXTRA_ARGS "/m") + if(_VCPKG_CMAKE_GENERATOR MATCHES "Ninja") + set(BUILD_ARGS "-v") # verbose output + if (_bc_DISABLE_PARALLEL) + list(APPEND BUILD_ARGS "-j1") + endif() + elseif(_VCPKG_CMAKE_GENERATOR MATCHES "Visual Studio") + set(BUILD_ARGS + "/p:VCPkgLocalAppDataDisabled=true" + "/p:UseIntelMKL=No" + ) + if (NOT _bc_DISABLE_PARALLEL) + list(APPEND BUILD_ARGS "/m") + endif() + elseif(_VCPKG_CMAKE_GENERATOR MATCHES "NMake") + # No options are currently added for nmake builds + else() + message(FATAL_ERROR "Unrecognized GENERATOR setting from vcpkg_configure_cmake(). Valid generators are: Ninja, Visual Studio, and NMake Makefiles") endif() - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/build.ninja) - set(BUILD_ARGS -v) # verbose output - endif() - - if(_bc_MSVC_64_TOOLSET) - set(BUILD_ARGS ${MSVC_EXTRA_ARGS}) + if(_bc_TARGET) + set(TARGET_PARAM "--target" ${_bc_TARGET}) + else() + set(TARGET_PARAM) endif() message(STATUS "Build ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release -- ${BUILD_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Release ${TARGET_PARAM} -- ${BUILD_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME build-${TARGET_TRIPLET}-rel + LOGNAME ${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-rel ) message(STATUS "Build ${TARGET_TRIPLET}-rel done") message(STATUS "Build ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug -- ${BUILD_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Debug ${TARGET_PARAM} -- ${BUILD_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME build-${TARGET_TRIPLET}-dbg + LOGNAME ${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-dbg ) message(STATUS "Build ${TARGET_TRIPLET}-dbg done") endfunction() diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index fecea8f1c..fe8c97c52 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -188,4 +188,6 @@ function(vcpkg_configure_cmake) LOGNAME config-${TARGET_TRIPLET}-dbg ) message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + + set(_VCPKG_CMAKE_GENERATOR "${GENERATOR}" PARENT_SCOPE) endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_install_cmake.cmake b/scripts/cmake/vcpkg_install_cmake.cmake index 34ac15fe6..ab72d054e 100644 --- a/scripts/cmake/vcpkg_install_cmake.cmake +++ b/scripts/cmake/vcpkg_install_cmake.cmake @@ -4,15 +4,15 @@ ## ## ## Usage: ## ```cmake -## vcpkg_install_cmake([MSVC_64_TOOLSET]) +## vcpkg_install_cmake(...) ## ``` ## ## ## Parameters: -## ### MSVC_64_TOOLSET -## This adds the `/p:PreferredToolArchitecture=x64` switch to the underlying buildsystem parameters. Some large projects can run out of memory when linking if they use the 32-bit hosted tools. +## See [`vcpkg_build_cmake()`](vcpkg_build_cmake.md). ## ## ## Notes: -## This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). +## This command transparently forwards to [`vcpkg_build_cmake()`](vcpkg_build_cmake.md), adding a `TARGET install` +## parameter. ## ## ## Examples: ## @@ -21,45 +21,5 @@ ## * [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_install_cmake) - cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN}) - - set(MSVC_EXTRA_ARGS - "/p:VCPkgLocalAppDataDisabled=true" - "/p:UseIntelMKL=No" - ) - - # Specifies the architecture of the toolset, NOT the architecture of the produced binary - # This can help libraries that cause the linker to run out of memory. - # https://support.microsoft.com/en-us/help/2891057/linker-fatal-error-lnk1102-out-of-memory - if (_bc_MSVC_64_TOOLSET) - list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64") - endif() - - if (NOT _bc_DISABLE_PARALLEL) - list(APPEND MSVC_EXTRA_ARGS "/m") - endif() - - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/build.ninja) - set(BUILD_ARGS -v) # verbose output - endif() - - if(_bc_MSVC_64_TOOLSET) - set(BUILD_ARGS ${MSVC_EXTRA_ARGS}) - endif() - - message(STATUS "Package ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release --target install -- ${BUILD_ARGS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME package-${TARGET_TRIPLET}-rel - ) - message(STATUS "Package ${TARGET_TRIPLET}-rel done") - - message(STATUS "Package ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug --target install -- ${BUILD_ARGS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME package-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Package ${TARGET_TRIPLET}-dbg done") + vcpkg_build_cmake(LOGFILE_ROOT install TARGET install ${ARGN}) endfunction() -- cgit v1.2.3 From 9b0c2cb2524ef3fa1e8e7e8f2512c32e40eb5815 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 5 Oct 2017 18:07:29 -0700 Subject: [vcpkg] Remove multiple byte order marks --- toolsrc/src/vcpkg_System.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 7a6e7f028..3b4c440d8 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -177,12 +177,11 @@ namespace vcpkg::System } // On Win7, output from powershell calls contain a byte order mark, so we strip it out if it is present - static void remove_byte_order_mark(std::wstring* s) + static void remove_byte_order_marks(std::wstring* s) { - if (s->size() < 3) return; const wchar_t* a = s->c_str(); // This is the UTF-8 byte-order mark - if (a[0] == 0xEF && a[1] == 0xBB && a[2] == 0xBF) + while (s->size() >= 3 && a[0] == 0xEF && a[1] == 0xBB && a[2] == 0xBF) { s->erase(0, 3); } @@ -214,7 +213,7 @@ namespace vcpkg::System const auto ec = _pclose(pipe); Debug::println("_pclose() returned %d", ec); - remove_byte_order_mark(&output); + remove_byte_order_marks(&output); return {ec, Strings::to_utf8(output)}; } -- cgit v1.2.3 From 13385293e62561166c490671630e92458e630b1b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 5 Oct 2017 18:14:08 -0700 Subject: [vcpkg] Clang-format on commands_export_ifw --- toolsrc/src/commands_export_ifw.cpp | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/toolsrc/src/commands_export_ifw.cpp b/toolsrc/src/commands_export_ifw.cpp index 4ab0ae537..191dbb763 100644 --- a/toolsrc/src/commands_export_ifw.cpp +++ b/toolsrc/src/commands_export_ifw.cpp @@ -288,25 +288,23 @@ namespace vcpkg::Commands::Export::IFW fs::path tempmaintenancetool = ifw_packages_dir_path / "maintenance" / "data" / "tempmaintenancetool.exe"; fs.create_directories(tempmaintenancetool.parent_path(), ec); Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not create directory for package file %s", - tempmaintenancetool.generic_string()); + !ec, + "Could not create directory for package file %s", + tempmaintenancetool.generic_string()); fs.copy_file(installerbase_exe, tempmaintenancetool, fs::copy_options::overwrite_existing, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not write package file %s", - tempmaintenancetool.generic_string()); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not write package file %s", tempmaintenancetool.generic_string()); fs::path package_xml_file_path = ifw_packages_dir_path / "maintenance" / "meta" / "package.xml"; fs::path package_xml_dir_path = package_xml_file_path.parent_path(); fs.create_directories(package_xml_dir_path, ec); Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not create directory for package file %s", - package_xml_file_path.generic_string()); + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); fs.write_contents(package_xml_file_path, - Strings::format( - R"###( + Strings::format( + R"###( Maintenance Tool Maintenance Tool @@ -318,14 +316,12 @@ namespace vcpkg::Commands::Export::IFW true )###", -create_release_date())); + create_release_date())); const fs::path script_source = paths.root / "scripts" / "ifw" / "maintenance.qs"; const fs::path script_destination = ifw_packages_dir_path / "maintenance" / "meta" / "maintenance.qs"; fs.copy_file(script_source, script_destination, fs::copy_options::overwrite_existing, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not write package file %s", - script_destination.generic_string()); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not write package file %s", script_destination.generic_string()); System::println("Exporting maintenance tool... done"); } -- cgit v1.2.3 From 7f68aa6630f96f474e85cd332dbbdc1ce6226d50 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Oct 2017 15:50:48 -0700 Subject: Introduce Util::stable_keep_if() --- toolsrc/include/vcpkg_Util.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg_Util.h index c76ca01ac..e5ead6d3a 100644 --- a/toolsrc/include/vcpkg_Util.h +++ b/toolsrc/include/vcpkg_Util.h @@ -37,6 +37,12 @@ namespace vcpkg::Util return ret; } + template + void stable_keep_if(Container& cont, Pred pred) + { + cont.erase(std::stable_partition(cont.begin(), cont.end(), pred), cont.end()); + } + template void unstable_keep_if(Container& cont, Pred pred) { -- cgit v1.2.3 From 9a963f7eff1981d4e894ea8b297d092cda60b764 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Oct 2017 13:51:28 -0700 Subject: Overhaul VS selection. Add triplet option to specify VS instance --- scripts/get_triplet_environment.cmake | 3 +- toolsrc/include/VcpkgPaths.h | 5 +- toolsrc/include/vcpkg_Build.h | 3 +- toolsrc/include/vcpkg_Util.h | 15 +++++ toolsrc/src/PostBuildLint.cpp | 2 +- toolsrc/src/VcpkgPaths.cpp | 120 ++++++++++++++++++---------------- toolsrc/src/commands_env.cpp | 4 +- toolsrc/src/vcpkg_Build.cpp | 12 +++- 8 files changed, 97 insertions(+), 67 deletions(-) diff --git a/scripts/get_triplet_environment.cmake b/scripts/get_triplet_environment.cmake index 69e06bf97..b32f840d2 100644 --- a/scripts/get_triplet_environment.cmake +++ b/scripts/get_triplet_environment.cmake @@ -5,4 +5,5 @@ message("c35112b6-d1ba-415b-aa5d-81de856ef8eb") message("VCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}") message("VCPKG_CMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") message("VCPKG_CMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") -message("VCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}") \ No newline at end of file +message("VCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}") +message("VCPKG_VISUAL_STUDIO_PATH=${VCPKG_VISUAL_STUDIO_PATH}") \ No newline at end of file diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h index 4b4527434..d4640fba2 100644 --- a/toolsrc/include/VcpkgPaths.h +++ b/toolsrc/include/VcpkgPaths.h @@ -17,6 +17,7 @@ namespace vcpkg struct Toolset { + fs::path visual_studio_root_path; fs::path dumpbin; fs::path vcvarsall; std::vector vcvarsall_options; @@ -66,7 +67,8 @@ namespace vcpkg /// /// Valid version strings are "v140", "v141", and "". Empty string gets the latest. /// - const Toolset& get_toolset(const std::string& toolset_version) const; + const Toolset& VcpkgPaths::get_toolset(const Optional& toolset_version, + const Optional& visual_studio_path) const; Files::Filesystem& get_filesystem() const; @@ -78,6 +80,5 @@ namespace vcpkg Lazy ifw_binarycreator_exe; Lazy ifw_repogen_exe; Lazy> toolsets; - Lazy> toolsets_vs2017_v140; }; } diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h index 78e89d4de..5ba675757 100644 --- a/toolsrc/include/vcpkg_Build.h +++ b/toolsrc/include/vcpkg_Build.h @@ -79,7 +79,8 @@ namespace vcpkg::Build std::string target_architecture; std::string cmake_system_name; std::string cmake_system_version; - std::string platform_toolset; + Optional platform_toolset; + Optional visual_studio_path; }; std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg_Util.h index e5ead6d3a..a87045d73 100644 --- a/toolsrc/include/vcpkg_Util.h +++ b/toolsrc/include/vcpkg_Util.h @@ -67,6 +67,21 @@ namespace vcpkg::Util return std::find_if(cont.cbegin(), cont.cend(), pred); } + template + using ToVectorOfConstPointersT = std::decay_t()))>; + + template> + std::vector to_vector_of_const_pointers(const Container& cont) + { + std::vector output; + for (auto i = cont.cbegin(), cend = cont.end(); i != cend; ++i) + { + output.push_back(&(*i)); + } + + return output; + } + template auto find_if_not(const Container& cont, Pred pred) { diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 416d4a636..a0699e15c 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -722,7 +722,7 @@ namespace vcpkg::PostBuildLint const auto& fs = paths.get_filesystem(); // for dumpbin - const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset); + const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); const fs::path package_dir = paths.package_dir(spec); size_t error_count = 0; diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 9f85992be..f080783c4 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -337,14 +337,14 @@ namespace vcpkg // VS2015 const Optional vs_2015_installation_instance = get_vs2015_installation_instance(); - if (const auto v = vs_2015_installation_instance.get()) + if (const auto vs_2015_root_path = vs_2015_installation_instance.get()) { - const fs::path vs2015_vcvarsall_bat = *v / "VC" / "vcvarsall.bat"; + const fs::path vs2015_vcvarsall_bat = *vs_2015_root_path / "VC" / "vcvarsall.bat"; paths_examined.push_back(vs2015_vcvarsall_bat); if (fs.exists(vs2015_vcvarsall_bat)) { - const fs::path vs2015_dumpbin_exe = *v / "VC" / "bin" / "dumpbin.exe"; + const fs::path vs2015_dumpbin_exe = *vs_2015_root_path / "VC" / "bin" / "dumpbin.exe"; paths_examined.push_back(vs2015_dumpbin_exe); const fs::path vs2015_bin_dir = vs2015_vcvarsall_bat.parent_path() / "bin"; @@ -364,19 +364,25 @@ namespace vcpkg if (fs.exists(vs2015_dumpbin_exe)) { - found_toolsets.push_back( - {vs2015_dumpbin_exe, vs2015_vcvarsall_bat, {}, V_140, supported_architectures}); + found_toolsets.push_back({*vs_2015_root_path, + vs2015_dumpbin_exe, + vs2015_vcvarsall_bat, + {}, + V_140, + supported_architectures}); } } } + const bool v140_is_available = !found_toolsets.empty(); + const std::vector vs2017_installation_instances = get_vs2017_installation_instances(paths); // VS2017 - Optional vs2017_toolset; for (const std::string& instance : vs2017_installation_instances) { - const fs::path vc_dir = fs::path{instance} / "VC"; + const fs::path vs_root_path = fs::path{instance}; + const fs::path vc_dir = vs_root_path / "VC"; // Skip any instances that do not have vcvarsall. const fs::path vcvarsall_dir = vc_dir / "Auxiliary" / "Build"; @@ -415,14 +421,22 @@ namespace vcpkg paths_examined.push_back(dumpbin_path); if (fs.exists(dumpbin_path)) { - vs2017_toolset = Toolset{dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}; + found_toolsets.push_back( + Toolset{vs_root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}); + + if (v140_is_available) + { + found_toolsets.push_back(Toolset{vs_root_path, + dumpbin_path, + vcvarsall_bat, + {L"-vcvars_ver=14.0"}, + V_140, + supported_architectures}); + } + break; } } - if (const auto value = vs2017_toolset.get()) - { - found_toolsets.push_back(*value); - } } if (found_toolsets.empty()) @@ -439,64 +453,54 @@ namespace vcpkg return found_toolsets; } - static std::vector create_vs2017_v140_toolset_instances(const std::vector& vs_toolsets) - { - std::vector vs2017_v140_toolsets; - - // In constrast to v141 and above, there can only be a single instance of v140 (VS2017 vs VS2015). - const auto it = Util::find_if(vs_toolsets, [&](const Toolset& t) { return t.version == V_140; }); - - // If v140 is not available, then VS2017 cant use them. Return empty. - if (it == vs_toolsets.cend()) - { - return vs2017_v140_toolsets; - } - - // If it does exist, then create a matching v140 toolset for each v141 toolset - const Toolset v140_toolset = *it; - for (const Toolset& toolset : vs_toolsets) - { - if (toolset.version != V_141) - { - continue; - } - - Toolset t = Toolset{ - toolset.dumpbin, toolset.vcvarsall, {L"-vcvars_ver=14.0"}, V_140, toolset.supported_architectures}; - vs2017_v140_toolsets.push_back(std::move(t)); - } - - return vs2017_v140_toolsets; - } - - const Toolset& VcpkgPaths::get_toolset(const std::string& toolset_version) const + const Toolset& VcpkgPaths::get_toolset(const Optional& toolset_version, + const Optional& visual_studio_path) const { - const std::wstring& w_toolset_version = Strings::to_utf16(toolset_version); - // Invariant: toolsets are non-empty and sorted with newest at back() const std::vector& vs_toolsets = this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); }); - if (w_toolset_version.empty()) + std::vector candidates = Util::to_vector_of_const_pointers(vs_toolsets); + const auto tsv = toolset_version.get(); + const auto vsp = visual_studio_path.get(); + + if (tsv && vsp) { - return vs_toolsets.back(); + const std::wstring w_toolset_version = Strings::to_utf16(*tsv); + const fs::path vs_root_path = *vsp; + Util::stable_keep_if(candidates, [&](const Toolset* t) { + return w_toolset_version == t->version && vs_root_path == t->visual_studio_root_path; + }); + Checks::check_exit(VCPKG_LINE_INFO, + !candidates.empty(), + "Could not find Visual Studio instace at %s with %s toolset.", + vs_root_path.generic_string(), + *tsv); + + Checks::check_exit(VCPKG_LINE_INFO, candidates.size() == 1); + return *candidates.back(); } - const auto toolset = - Util::find_if(vs_toolsets, [&](const Toolset& t) { return w_toolset_version == t.version; }); - Checks::check_exit( - VCPKG_LINE_INFO, toolset != vs_toolsets.end(), "Could not find toolset '%s'", toolset_version); + if (tsv) + { + const std::wstring w_toolset_version = Strings::to_utf16(*tsv); + Util::stable_keep_if(candidates, [&](const Toolset* t) { return w_toolset_version == t->version; }); + Checks::check_exit( + VCPKG_LINE_INFO, !candidates.empty(), "Could not find Visual Studio instace with %s toolset.", *tsv); + } - // If v140 is the selected toolset and VS2017 is available, then use VS2017's vcvarsall with the - // -vcvars_ver=14.0 option - const std::vector& vs2017_v140_toolsets = this->toolsets_vs2017_v140.get_lazy( - [&vs_toolsets]() { return create_vs2017_v140_toolset_instances(vs_toolsets); }); - if (w_toolset_version == V_140 && !vs2017_v140_toolsets.empty()) + if (vsp) { - return vs2017_v140_toolsets.back(); + const fs::path vs_root_path = *vsp; + Util::stable_keep_if(candidates, + [&](const Toolset* t) { return vs_root_path == t->visual_studio_root_path; }); + Checks::check_exit(VCPKG_LINE_INFO, + !candidates.empty(), + "Could not find Visual Studio instace at %s.", + vs_root_path.generic_string()); } - return *toolset; + return *candidates.back(); } Files::Filesystem& VcpkgPaths::get_filesystem() const { return Files::get_real_filesystem(); } diff --git a/toolsrc/src/commands_env.cpp b/toolsrc/src/commands_env.cpp index 073c501f5..6dad3e882 100644 --- a/toolsrc/src/commands_env.cpp +++ b/toolsrc/src/commands_env.cpp @@ -13,8 +13,8 @@ namespace vcpkg::Commands::Env args.check_and_get_optional_command_arguments({}); const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); - System::cmd_execute_clean( - Build::make_build_env_cmd(pre_build_info, paths.get_toolset(pre_build_info.platform_toolset)) + L" && cmd"); + const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); + System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, toolset) + L" && cmd"); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp index 853f84998..9be20629d 100644 --- a/toolsrc/src/vcpkg_Build.cpp +++ b/toolsrc/src/vcpkg_Build.cpp @@ -138,7 +138,7 @@ namespace vcpkg::Build const fs::path ports_cmake_script_path = paths.ports_cmake; const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); - const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset); + const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); std::string features; @@ -386,7 +386,15 @@ namespace vcpkg::Build if (variable_name == "VCPKG_PLATFORM_TOOLSET") { - pre_build_info.platform_toolset = variable_value; + 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; } -- cgit v1.2.3 From eca5a8b8d48d24c1a50fac58797af45dc5e83110 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Oct 2017 14:27:36 -0700 Subject: Add vswhere in fetchDependency.ps1 --- scripts/fetchDependency.ps1 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 25447c19b..80d6d2abb 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -119,11 +119,21 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $requiredVersion = "4.1.0" $downloadVersion = "4.1.0" $url = "https://dist.nuget.org/win-x86-commandline/v4.1.0/nuget.exe" - $downloadPath = "$downloadsDir\nuget-4.1.0\nuget.exe" + $downloadPath = "$downloadsDir\nuget-$downloadVersion\nuget.exe" $expectedDownloadedFileHash = "4c1de9b026e0c4ab087302ff75240885742c0faa62bd2554f913bbe1f6cb63a0" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } + elseif($Dependency -eq "vswhere") + { + $requiredVersion = "2.1.4" + $downloadVersion = "2.1.4" + $url = "https://github.com/Microsoft/vswhere/releases/download/2.1.4/vswhere.exe" + $downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe" + $expectedDownloadedFileHash = "548fb9dfeed59bc4ddcce739a5729e9c8dd5932cd60ff6f74727ee069e7da458" + $executableFromDownload = $downloadPath + $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED + } elseif($Dependency -eq "git") { $requiredVersion = "2.14.1" -- cgit v1.2.3 From 86f3a9dbbdc360db3716b878dd37f2dbec8e983c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Oct 2017 18:12:17 -0700 Subject: Fix Strings::split() to handle delimiters of arbitrary size --- toolsrc/src/vcpkg_Strings.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 21df2c309..bbe6b29cd 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -154,11 +154,13 @@ namespace vcpkg::Strings return output; } + const size_t delimiter_length = delimiter.length(); size_t i = 0; for (size_t pos = s.find(delimiter); pos != std::string::npos; pos = s.find(delimiter, pos)) { output.push_back(s.substr(i, pos - i)); - i = ++pos; + pos += delimiter_length; + i = pos; } // Add the rest of the string after the last delimiter, unless there is nothing after it -- cgit v1.2.3 From f0c23aeb6b238ee0ba2dc272ee4c193f2f777460 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Oct 2017 18:25:34 -0700 Subject: Completely rework Visual Studio detection - Now using vswhere.exe to detect all VS instance (2015 + 2017) - Default version preference order is now: stable, prerelease, legacy - Within each preference weight, the latest one is chosen - findVisualStudioInstallationInstances.ps1 now has a parameter to choose VS instance --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 172 +++--------------- scripts/findVisualStudioInstallationInstances.ps1 | 49 ++--- toolsrc/include/vcpkg_Util.h | 14 +- toolsrc/src/VcpkgPaths.cpp | 209 ++++++++++++---------- 4 files changed, 172 insertions(+), 272 deletions(-) diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index f72491e5d..632cc2cdf 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -1,164 +1,50 @@ [CmdletBinding()] param( [Parameter(Mandatory=$False)] - [switch]$DisableVS2017 = $False, - - [Parameter(Mandatory=$False)] - [switch]$DisableVS2015 = $False + [string]$explicitlyRequestedVSPath = "" ) -if ($DisableVS2017 -and $DisableVS2015) -{ - throw "Both VS2015 and VS2017 were disabled." -} - -function New-MSBuildInstance() -{ - param ($msbuildExePath, $toolsetVersion) - - $instance = new-object PSObject - $instance | add-member -type NoteProperty -Name msbuildExePath -Value $msbuildExePath - $instance | add-member -type NoteProperty -Name toolsetVersion -Value $toolsetVersion +$explicitlyRequestedVSPath = $explicitlyRequestedVSPath -replace "\\$" # Remove potential trailing backslash - return $instance -} - -Write-Verbose "Executing $($MyInvocation.MyCommand.Name) with DisableVS2017=$DisableVS2017, DisableVS2015=$DisableVS2015" $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition - -$validInstances = New-Object System.Collections.ArrayList - -# VS2017 -Write-Verbose "`n`n" -Write-Verbose "Checking for MSBuild from VS2017 instances..." -$VisualStudio2017InstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 -Write-Verbose "VS2017 Candidates: $([system.String]::Join(',', $VisualStudio2017InstallationInstances))" -foreach ($instanceCandidate in $VisualStudio2017InstallationInstances) -{ - $VCFolder= "$instanceCandidate\VC\Tools\MSVC\" - - if (Test-Path $VCFolder) - { - $instance = New-MSBuildInstance "$instanceCandidate\MSBuild\15.0\Bin\MSBuild.exe" "v141" - Write-Verbose "Found $instance" - $validInstances.Add($instance) > $null - } -} - -# VS2015 - in Program Files -Write-Verbose "`n`n" -Write-Verbose "Checking for MSBuild from VS2015 in Program Files..." -$CandidateProgramFiles = $(& $scriptsDir\getProgramFiles32bit.ps1), $(& $scriptsDir\getProgramFilesPlatformBitness.ps1) -Write-Verbose "Program Files Candidate locations: $([system.String]::Join(',', $CandidateProgramFiles))" -foreach ($ProgramFiles in $CandidateProgramFiles) -{ - $clExe= "$ProgramFiles\Microsoft Visual Studio 14.0\VC\bin\cl.exe" - - if (!(Test-Path $clExe)) - { - Write-Verbose "$clExe - Not Found" - continue - } - - Write-Verbose "$clExe - Found" - $instance = New-MSBuildInstance "$ProgramFiles\MSBuild\14.0\Bin\MSBuild.exe" "v140" - Write-Verbose "Found $instance" - $validInstances.Add($instance) > $null -} - -# VS2015 - through the registry -function NewCppRegistryPair() -{ - param ($visualStudioEntry, $msBuildEntry) - - $instance = new-object PSObject - $instance | add-member -type NoteProperty -Name visualStudioEntry -Value $visualStudioEntry - $instance | add-member -type NoteProperty -Name msBuildEntry -Value $msBuildEntry - - return $instance -} - -Write-Verbose "`n`n" -Write-Verbose "Checking for MSBuild from VS2015 through the registry..." - -$registryPairs = -$(NewCppRegistryPair "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\visualstudio\14.0" "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\msbuild\toolsversions\14.0"), -$(NewCppRegistryPair "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\visualstudio\14.0" "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\msbuild\toolsversions\14.0") - -foreach ($pair in $registryPairs) +$VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 +Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstallationInstances))" +foreach ($instanceCandidate in $VisualStudioInstallationInstances) { - $vsEntry = $pair.visualStudioEntry - try - { - $VS14InstallDir = $(gp $vsEntry InstallDir -erroraction Stop | % { $_.InstallDir }) - Write-Verbose "$vsEntry\InstallDir - Found" - } - catch - { - Write-Verbose "$vsEntry\InstallDir - Not Found" - continue - } - - Write-Verbose "$VS14InstallDir - Obtained from registry" - # We want "${VS14InstallDir}..\..\VC\bin\cl.exe" - # Doing Split-path to avoid the ..\.. from appearing in the output - $clExePath = Split-path $VS14InstallDir -Parent - $clExePath = Split-path $clExePath -Parent - $clExePath = "$clExePath\VC\bin\cl.exe" - - if (!(Test-Path $clExePath)) - { - Write-Verbose "$clExePath - Not Found" - continue - } + Write-Verbose "Inspecting: $instanceCandidate" + $split = $instanceCandidate -split "::" + # $preferenceWeight = $split[0] + # $releaseType = $split[1] + $version = $split[2] + $path = $split[3] - Write-Verbose "$clExePath - Found" - - $msbuildEntry = $pair.msBuildEntry - try - { - $MSBuild14 = $(gp $msbuildEntry MSBuildToolsPath -erroraction Stop | % { $_.MSBuildToolsPath }) - Write-Verbose "$msbuildEntry\MSBuildToolsPath - Found" - } - catch - { - Write-Verbose "$msbuildEntry\MSBuildToolsPath - Not Found" - continue - } - - Write-Verbose "${MSBuild14} - Obtained from registry" - $msbuildPath = "${MSBuild14}MSBuild.exe" - if (!(Test-Path $msbuildPath)) + if ($explicitlyRequestedVSPath -ne "" -and $explicitlyRequestedVSPath -ne $path) { - Write-Verbose "$msbuildPath - Not Found" + Write-Verbose "Skipping: $instanceCandidate" continue } - $instance = New-MSBuildInstance $msbuildPath "v140" - Write-Verbose "Found $instance" - $validInstances.Add($instance) > $null -} - -Write-Verbose "`n`n`n" -Write-Verbose "The following MSBuild instances were found:" -foreach ($instance in $validInstances) -{ - Write-Verbose $instance -} - -# Selecting -foreach ($instance in $validInstances) -{ - if (!$DisableVS2017 -and $instance.toolsetVersion -eq "v141") + $majorVersion = $version.Substring(0,2); + if ($majorVersion -eq "15") { - return $instance.msbuildExePath, $instance.toolsetVersion + $VCFolder= "$path\VC\Tools\MSVC\" + if (Test-Path $VCFolder) + { + Write-Verbose "Picking: $instanceCandidate" + return "$path\MSBuild\15.0\Bin\MSBuild.exe", "v141" + } } - if (!$DisableVS2015 -and $instance.toolsetVersion -eq "v140") + if ($majorVersion -eq "14") { - return $instance.msbuildExePath, $instance.toolsetVersion + $clExe= "$path\VC\bin\cl.exe" + if (Test-Path $clExe) + { + Write-Verbose "Picking: $instanceCandidate" + $programFilesPath = split-path -parent $path + return "$programFilesPath\MSBuild\14.0\Bin\MSBuild.exe", "v140" + } } } - throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed." \ No newline at end of file diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index ca807980c..8c67ef6d6 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -4,32 +4,35 @@ param( ) $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -$vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root +$vswhereExe = & $scriptsDir\fetchDependency.ps1 "vswhere" -$downloadsDir = "$vcpkgRootDir\downloads" +$output = & $vswhereExe -prerelease -legacy -format xml +[xml]$asXml = $output -$nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget" -$nugetPackageDir = "$downloadsDir\nuget-packages" - -$SetupAPIVersion = "1.8.24" -Write-Verbose "Fetching Microsoft.VisualStudio.Setup.Configuration.Native@$SetupAPIVersion from NuGet." -$nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Version $SetupAPIVersion -OutputDirectory $nugetPackageDir -Source "https://api.nuget.org/v3/index.json" -nocache 2>&1 -Write-Verbose "Fetching Microsoft.VisualStudio.Setup.Configuration.Native@$SetupAPIVersion from NuGet. Done." - -$SetupConsoleExe = "$nugetPackageDir\Microsoft.VisualStudio.Setup.Configuration.Native.$SetupAPIVersion\tools\x86\Microsoft.VisualStudio.Setup.Configuration.Console.exe" - -if (!(Test-Path $SetupConsoleExe)) +$results = New-Object System.Collections.ArrayList +foreach ($instance in $asXml.instances.instance) { - throw $nugetOutput + $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash + $installationVersion = $instance.InstallationVersion + $isPrerelease = $instance.IsPrerelease + if ($isPrerelease -eq 0) + { + $releaseType = "PreferenceWeight3::StableRelease" + } + elseif ($isPrerelease -eq 1) + { + $releaseType = "PreferenceWeight2::PreRelease" + } + else + { + $releaseType = "PreferenceWeight1::Legacy" + } + + # Placed like that for easy sorting according to preference + $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null } -$instances = & $SetupConsoleExe -nologo -value InstallationPath 2>&1 -$instanceCount = $instances.Length - -# The last item can be empty -if ($instanceCount -gt 0 -and $instances[$instanceCount - 1] -eq "") -{ - $instances = $instances[0..($instanceCount - 2)] -} +$results.Sort() +$results.Reverse() -return $instances +return $results \ No newline at end of file diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg_Util.h index a87045d73..facb7dd26 100644 --- a/toolsrc/include/vcpkg_Util.h +++ b/toolsrc/include/vcpkg_Util.h @@ -68,18 +68,12 @@ namespace vcpkg::Util } template - using ToVectorOfConstPointersT = std::decay_t()))>; + using ElementT = std::remove_reference_t()))>; - template> - std::vector to_vector_of_const_pointers(const Container& cont) + template> + std::vector element_pointers(Container&& cont) { - std::vector output; - for (auto i = cont.cbegin(), cend = cont.end(); i != cend; ++i) - { - output.push_back(&(*i)); - } - - return output; + return fmap(cont, [](auto&& x) { return &x; }); } template diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index f080783c4..8264ec293 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -302,26 +302,33 @@ namespace vcpkg [this]() { return get_ifw_installerbase_exe().parent_path() / "repogen.exe"; }); } - static std::vector get_vs2017_installation_instances(const VcpkgPaths& paths) + struct VisualStudioInstance + { + fs::path root_path; + std::string version; + std::string release_type; + std::string preference_weight; // Mostly unused, just for verification that order is as intended + + std::string major_version() const { return version.substr(0, 2); } + }; + + static std::vector get_visual_studio_instances(const VcpkgPaths& paths) { const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; const std::wstring cmd = System::create_powershell_script_cmd(script); const System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd); - Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect VS 2017 instances"); - return Strings::split(ec_data.output, "\n"); - } + Checks::check_exit( + VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances"); - static Optional get_vs2015_installation_instance() - { - const Optional vs2015_cmntools_optional = System::get_environment_variable(L"VS140COMNTOOLS"); - if (const auto v = vs2015_cmntools_optional.get()) + const std::vector instances_as_strings = Strings::split(ec_data.output, "\n"); + std::vector output; + for (const std::string& instance_as_string : instances_as_strings) { - const fs::path vs2015_cmntools = fs::path(*v).parent_path(); // The call to parent_path() is needed because - // the env variable has a trailing backslash - return vs2015_cmntools.parent_path().parent_path(); + const std::vector split = Strings::split(instance_as_string, "::"); + output.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); } - return nullopt; + return output; } static std::vector find_toolset_instances(const VcpkgPaths& paths) @@ -335,108 +342,118 @@ namespace vcpkg std::vector found_toolsets; - // VS2015 - const Optional vs_2015_installation_instance = get_vs2015_installation_instance(); - if (const auto vs_2015_root_path = vs_2015_installation_instance.get()) - { - const fs::path vs2015_vcvarsall_bat = *vs_2015_root_path / "VC" / "vcvarsall.bat"; + const std::vector vs_instances = get_visual_studio_instances(paths); + const bool v140_is_available = Util::find_if(vs_instances, [&](const VisualStudioInstance& vs_instance) { + return vs_instance.major_version() == "14"; + }) != vs_instances.cend(); - paths_examined.push_back(vs2015_vcvarsall_bat); - if (fs.exists(vs2015_vcvarsall_bat)) + // VS2017 + for (const VisualStudioInstance& vs_instance : vs_instances) + { + const std::string major_version = vs_instance.major_version(); + if (major_version == "15") { - const fs::path vs2015_dumpbin_exe = *vs_2015_root_path / "VC" / "bin" / "dumpbin.exe"; - paths_examined.push_back(vs2015_dumpbin_exe); + const fs::path vc_dir = vs_instance.root_path / "VC"; + + // Skip any instances that do not have vcvarsall. + const fs::path vcvarsall_dir = vc_dir / "Auxiliary" / "Build"; + const fs::path vcvarsall_bat = vcvarsall_dir / "vcvarsall.bat"; + paths_examined.push_back(vcvarsall_bat); + if (!fs.exists(vcvarsall_bat)) continue; - const fs::path vs2015_bin_dir = vs2015_vcvarsall_bat.parent_path() / "bin"; + // Get all supported architectures std::vector supported_architectures; - if (fs.exists(vs2015_bin_dir / "vcvars32.bat")) + if (fs.exists(vcvarsall_dir / "vcvars32.bat")) supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); - if (fs.exists(vs2015_bin_dir / "amd64\\vcvars64.bat")) - supported_architectures.push_back({L"x64", CPU::X64, CPU::X64}); - if (fs.exists(vs2015_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) + if (fs.exists(vcvarsall_dir / "vcvars64.bat")) + supported_architectures.push_back({L"amd64", CPU::X64, CPU::X64}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); - if (fs.exists(vs2015_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) + if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); - if (fs.exists(vs2015_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) + if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); - if (fs.exists(vs2015_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) + if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); - if (fs.exists(vs2015_dumpbin_exe)) + // Locate the "best" MSVC toolchain version + const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; + std::vector msvc_subdirectories = fs.get_files_non_recursive(msvc_path); + Util::unstable_keep_if(msvc_subdirectories, + [&fs](const fs::path& path) { return fs.is_directory(path); }); + + // Sort them so that latest comes first + std::sort( + msvc_subdirectories.begin(), + msvc_subdirectories.end(), + [](const fs::path& left, const fs::path& right) { return left.filename() > right.filename(); }); + + for (const fs::path& subdir : msvc_subdirectories) { - found_toolsets.push_back({*vs_2015_root_path, - vs2015_dumpbin_exe, - vs2015_vcvarsall_bat, - {}, - V_140, - supported_architectures}); + const fs::path dumpbin_path = subdir / "bin" / "HostX86" / "x86" / "dumpbin.exe"; + paths_examined.push_back(dumpbin_path); + if (fs.exists(dumpbin_path)) + { + found_toolsets.push_back(Toolset{ + vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}); + + if (v140_is_available) + { + found_toolsets.push_back(Toolset{vs_instance.root_path, + dumpbin_path, + vcvarsall_bat, + {L"-vcvars_ver=14.0"}, + V_140, + supported_architectures}); + } + + break; + } } - } - } - const bool v140_is_available = !found_toolsets.empty(); - - const std::vector vs2017_installation_instances = get_vs2017_installation_instances(paths); + continue; + } - // VS2017 - for (const std::string& instance : vs2017_installation_instances) - { - const fs::path vs_root_path = fs::path{instance}; - const fs::path vc_dir = vs_root_path / "VC"; - - // Skip any instances that do not have vcvarsall. - const fs::path vcvarsall_dir = vc_dir / "Auxiliary" / "Build"; - const fs::path vcvarsall_bat = vcvarsall_dir / "vcvarsall.bat"; - paths_examined.push_back(vcvarsall_bat); - if (!fs.exists(vcvarsall_bat)) continue; - - // Get all supported architectures - std::vector supported_architectures; - if (fs.exists(vcvarsall_dir / "vcvars32.bat")) - supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); - if (fs.exists(vcvarsall_dir / "vcvars64.bat")) - supported_architectures.push_back({L"amd64", CPU::X64, CPU::X64}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) - supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) - supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) - supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) - supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); - - // Locate the "best" MSVC toolchain version - const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; - std::vector msvc_subdirectories = fs.get_files_non_recursive(msvc_path); - Util::unstable_keep_if(msvc_subdirectories, [&fs](const fs::path& path) { return fs.is_directory(path); }); - - // Sort them so that latest comes first - std::sort(msvc_subdirectories.begin(), - msvc_subdirectories.end(), - [](const fs::path& left, const fs::path& right) { return left.filename() > right.filename(); }); - - for (const fs::path& subdir : msvc_subdirectories) + if (major_version == "14") { - const fs::path dumpbin_path = subdir / "bin" / "HostX86" / "x86" / "dumpbin.exe"; - paths_examined.push_back(dumpbin_path); - if (fs.exists(dumpbin_path)) - { - found_toolsets.push_back( - Toolset{vs_root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}); + const fs::path vcvarsall_bat = vs_instance.root_path / "VC" / "vcvarsall.bat"; - if (v140_is_available) + paths_examined.push_back(vcvarsall_bat); + if (fs.exists(vcvarsall_bat)) + { + const fs::path vs2015_dumpbin_exe = vs_instance.root_path / "VC" / "bin" / "dumpbin.exe"; + paths_examined.push_back(vs2015_dumpbin_exe); + + const fs::path vs2015_bin_dir = vcvarsall_bat.parent_path() / "bin"; + std::vector supported_architectures; + if (fs.exists(vs2015_bin_dir / "vcvars32.bat")) + supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); + if (fs.exists(vs2015_bin_dir / "amd64\\vcvars64.bat")) + supported_architectures.push_back({L"x64", CPU::X64, CPU::X64}); + if (fs.exists(vs2015_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) + supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); + if (fs.exists(vs2015_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) + supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); + if (fs.exists(vs2015_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) + supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); + if (fs.exists(vs2015_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) + supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + + if (fs.exists(vs2015_dumpbin_exe)) { - found_toolsets.push_back(Toolset{vs_root_path, - dumpbin_path, - vcvarsall_bat, - {L"-vcvars_ver=14.0"}, - V_140, - supported_architectures}); + found_toolsets.push_back({vs_instance.root_path, + vs2015_dumpbin_exe, + vcvarsall_bat, + {}, + V_140, + supported_architectures}); } - - break; } + + continue; } + + Checks::exit_with_message(VCPKG_LINE_INFO, "Expected major version 14 or 15 but got: %s", major_version); } if (found_toolsets.empty()) @@ -460,7 +477,7 @@ namespace vcpkg const std::vector& vs_toolsets = this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); }); - std::vector candidates = Util::to_vector_of_const_pointers(vs_toolsets); + std::vector candidates = Util::element_pointers(vs_toolsets); const auto tsv = toolset_version.get(); const auto vsp = visual_studio_path.get(); @@ -500,7 +517,7 @@ namespace vcpkg vs_root_path.generic_string()); } - return *candidates.back(); + return *candidates.front(); } Files::Filesystem& VcpkgPaths::get_filesystem() const { return Files::get_real_filesystem(); } -- cgit v1.2.3 From 9ae4b9f885c6bb3ede212d42c51f2b96fbfc86dd Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Oct 2017 19:01:48 -0700 Subject: Update CHANGELOG and bump version to v0.0.91 --- CHANGELOG.md | 42 ++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75d89f6ac..5a2b0e336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,45 @@ +vcpkg (0.0.91) +-------------- + * Add ports: + - abseil 2017-09-28 + - enet 1.3.13 + - exiv2 4f4add2cdcbe73af7098122a509dff0739d15908 + - freexl 1.0.4 + - gts 0.7.6 + - kinectsdk2 2.0 + - libexif 0.6.21-1 + - libfreenect2 0.2.0 + - librtmp 2.3 + - libspatialite 4.3.0a + - libxmp-lite 4.4.1 + - proj4 4.9.3-1 + - readosm 1.1.0 + - spirit-po 1.1.2 + - telnetpp 1.2.4 + - wildmidi 0.4.1 + * Update ports: + - anax 2.1.0-2 -> 2.1.0-3 + - aws-sdk-cpp 1.0.61-1 -> 1.2.4 + - geos 3.5.0-1 -> 3.6.2-2 + - kinectsdk1 1.8-1 -> 1.8-2 + - lua 5.3.4-1 -> 5.3.4-2 + - openni2 2.2.0.33 -> 2.2.0.33-2 + - openssl 1.0.2l-2 -> 1.0.2l-3 + - pangolin 0.5-1 -> 0.5-2 + - proj 4.9.3-1 -> 0 + - sdl2 2.0.5-4 -> 2.0.6-1 + - zlib 1.2.11-2 -> 1.2.11-3 + * `vcpkg export`: Add new option `--ifw` which creates a standalone GUI installer for the exported packages. More information and screenshots [here](https://github.com/Microsoft/vcpkg/pull/1734) + * Complete rework of Visual Studio detection & selection: + - Use [`vswhere.exe`](https://github.com/Microsoft/vswhere) to detect Visual Studio installation instances + - Add the ability to specify the Visual Studio instance to use in the triplet file with the `VCPKG_VISUAL_STUDIO_PATH` variable + - Automatic selection now picks instances in order: stable, prerelease, legacy. Within each group, newer versions are preferred over old versions + - Fix issue where v140 toolset would not work if VS2017 (with v140) was installed but VS2015 was not installed + * Add message when downloading a `vcpkg` dependency (e.g. `cmake`) + +-- vcpkg team THU, 05 Oct 2017 19:00:00 -0800 + + vcpkg (0.0.90) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index c47961221..04ab0d2c9 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.90" \ No newline at end of file +"0.0.91" \ No newline at end of file -- cgit v1.2.3 From 0643bd6581182a537b23c885b1c6b27e33e61dc4 Mon Sep 17 00:00:00 2001 From: Daniel Strommen Date: Thu, 5 Oct 2017 19:47:41 -0700 Subject: Fix Win10SDK detection during Bootstrap When multiple Win10 SDK's are installed, like Insider previews, depending on the SDK installation, it may not contain the um headers. There is already a loop for trying to find the newest Win10 SDK that has full headers, but it's returning at the first failure, rather than continuing the loop to the next iteration. Also, use Join-Path instead of manual path appending, to normalize the extra \ at the end of the sdk root value. In some cases paths with double backslashes can be interpreted as a fallback syntax for UNC paths. Join-Path normalizes the path appropriately. --- scripts/getWindowsSDK.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 index 9aebae8e3..f4537ddc3 100644 --- a/scripts/getWindowsSDK.ps1 +++ b/scripts/getWindowsSDK.ps1 @@ -20,7 +20,7 @@ $validInstances = New-Object System.Collections.ArrayList # Windows 10 SDK function CheckWindows10SDK($path) { - $folder = "$path\Include" + $folder = (Join-Path $path "Include") if (!(Test-Path $folder)) { Write-Verbose "$folder - Not Found" @@ -37,7 +37,7 @@ function CheckWindows10SDK($path) if (!(Test-Path $windowsheader)) { Write-Verbose "$windowsheader - Not Found" - return + continue } Write-Verbose "$windowsheader - Found" @@ -45,7 +45,7 @@ function CheckWindows10SDK($path) if (!(Test-Path $ddkheader)) { Write-Verbose "$ddkheader - Not Found" - return + continue } Write-Verbose "$ddkheader - Found" @@ -106,4 +106,4 @@ foreach ($instance in $validInstances) } } -throw "Could not detect a Windows SDK / TargetPlatformVersion" \ No newline at end of file +throw "Could not detect a Windows SDK / TargetPlatformVersion" -- cgit v1.2.3 From 540046b564f95d262f5e4d2a4f988485e6469742 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 5 Oct 2017 22:16:43 -0700 Subject: [vcpkg] Remove assert that vswhere returns only 14 or 15. --- toolsrc/src/VcpkgPaths.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 8264ec293..d84a2d281 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -452,8 +452,6 @@ namespace vcpkg continue; } - - Checks::exit_with_message(VCPKG_LINE_INFO, "Expected major version 14 or 15 but got: %s", major_version); } if (found_toolsets.empty()) -- cgit v1.2.3 From e3527b23ea291489fae1363528ecde07c9191f95 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Oct 2017 22:44:49 -0700 Subject: Don't assume VS2015 is in C:\Program Files (x86)\ --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index 632cc2cdf..e9fb60cb2 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -41,7 +41,7 @@ foreach ($instanceCandidate in $VisualStudioInstallationInstances) if (Test-Path $clExe) { Write-Verbose "Picking: $instanceCandidate" - $programFilesPath = split-path -parent $path + $programFilesPath = & $scriptsDir\getProgramFiles32bit.ps1 return "$programFilesPath\MSBuild\14.0\Bin\MSBuild.exe", "v140" } } -- cgit v1.2.3 From 3a6e34804a878ce0c3f74b208f9a5c0bdc75ec7b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Oct 2017 22:46:55 -0700 Subject: Remove stray comment --- toolsrc/src/VcpkgPaths.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index d84a2d281..08f21df34 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -347,7 +347,6 @@ namespace vcpkg return vs_instance.major_version() == "14"; }) != vs_instances.cend(); - // VS2017 for (const VisualStudioInstance& vs_instance : vs_instances) { const std::string major_version = vs_instance.major_version(); -- cgit v1.2.3 From 03c17e20268bb8bdbfec8710be80fd1310d38dff Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Oct 2017 22:47:45 -0700 Subject: Remove unneeded "continue" --- toolsrc/src/VcpkgPaths.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index 08f21df34..e3e83af30 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -448,8 +448,6 @@ namespace vcpkg supported_architectures}); } } - - continue; } } -- cgit v1.2.3 From cf7762a82ea044b33ddadd6b1d01a4035af3bf9d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 6 Oct 2017 00:49:41 -0700 Subject: [vcpkg-internal-ci] Remove chakracore due to dependency on cor.h --- scripts/internalCI.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1 index 67871acc1..887eb7bea 100644 --- a/scripts/internalCI.ps1 +++ b/scripts/internalCI.ps1 @@ -14,7 +14,7 @@ if (-not $?) { throw $? } ./vcpkg.exe install azure-storage-cpp cpprestsdk:x64-windows-static cpprestsdk:x86-uwp if (-not $?) { throw $? } -./vcpkg.exe install bond chakracore cryptopp zlib expat sdl2 curl sqlite3 libuv protobuf:x64-windows sfml opencv:x64-windows uwebsockets uwebsockets:x64-windows-static +./vcpkg.exe install bond cryptopp zlib expat sdl2 curl sqlite3 libuv protobuf:x64-windows sfml opencv:x64-windows uwebsockets uwebsockets:x64-windows-static if (-not $?) { throw $? } ./vcpkg.exe install opencv:x86-uwp boost:x86-uwp -- cgit v1.2.3 From f0f25b1cb714e07766b998bb205314498f891416 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Oct 2017 02:04:04 -0700 Subject: Remove unused variable --- scripts/getWindowsSDK.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 index f4537ddc3..8ef26a436 100644 --- a/scripts/getWindowsSDK.ps1 +++ b/scripts/getWindowsSDK.ps1 @@ -13,7 +13,6 @@ if ($DisableWin10SDK -and $DisableWin81SDK) } Write-Verbose "Executing $($MyInvocation.MyCommand.Name)" -$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $validInstances = New-Object System.Collections.ArrayList -- cgit v1.2.3 From 3a7a18a53db623c970887b325b53005660df0ede Mon Sep 17 00:00:00 2001 From: John Farrier Date: Fri, 6 Oct 2017 13:53:48 -0400 Subject: #1930 Celero Initial Port --- ports/celero/CONTROL | 3 +++ ports/celero/portfile.cmake | 49 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 ports/celero/CONTROL create mode 100644 ports/celero/portfile.cmake diff --git a/ports/celero/CONTROL b/ports/celero/CONTROL new file mode 100644 index 000000000..852e9b4f9 --- /dev/null +++ b/ports/celero/CONTROL @@ -0,0 +1,3 @@ +Source: celero +Version: 2.1.0 +Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++. diff --git a/ports/celero/portfile.cmake b/ports/celero/portfile.cmake new file mode 100644 index 000000000..6fdb04285 --- /dev/null +++ b/ports/celero/portfile.cmake @@ -0,0 +1,49 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Celero-master) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/DigitalInBlue/Celero/archive/master.zip" + FILENAME "celero-v2.1.0.zip" + SHA512 d3971b102bd1785cf21712bcf2e39193e47d5faaa39421cb1cc788340bb67aed4c32343d3b45042813fcf503d48068bc2a2d26808e2e12d8515e29c60ef40c5c +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Disable building of the examples +set(CELEROExperiment_celeroDemoDoNotOptizeAway OFF) +set(CELEROExperiment_celeroDemoFileWrite OFF) +set(CELEROExperiment_celeroDemoMultithread OFF) +set(CELEROExperiment_celeroDemoSimple OFF) +set(CELEROExperiment_celeroDemoSimpleJUnit OFF) +set(CELEROExperiment_celeroDemoSleep OFF) +set(CELEROExperiment_celeroDemoToString OFF) +set(CELEROExperiment_celeroDemoTransform OFF) +set(CELEROExperiment_celeroExperimentCompressBools OFF) +set(CELEROExperiment_celeroExperimentCostOfPimpl OFF) +set(CELEROExperiment_celeroExperimentParameterPassing OFF) +set(CELEROExperiment_celeroExperimentParticles OFF) +set(CELEROExperiment_celeroExperimentSimpleComparison OFF) +set(CELEROExperiment_celeroExperimentSortingRandomInts OFF) + +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() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/celero RENAME copyright) -- cgit v1.2.3 From 52352d25e6164cc2cab6d1a03e44eb22ef2e8b98 Mon Sep 17 00:00:00 2001 From: John Farrier Date: Fri, 6 Oct 2017 14:18:02 -0400 Subject: #1930 Improved build control to exclude demo applications. --- ports/celero/portfile.cmake | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/ports/celero/portfile.cmake b/ports/celero/portfile.cmake index 6fdb04285..ef66131e7 100644 --- a/ports/celero/portfile.cmake +++ b/ports/celero/portfile.cmake @@ -20,20 +20,9 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) # Disable building of the examples -set(CELEROExperiment_celeroDemoDoNotOptizeAway OFF) -set(CELEROExperiment_celeroDemoFileWrite OFF) -set(CELEROExperiment_celeroDemoMultithread OFF) -set(CELEROExperiment_celeroDemoSimple OFF) -set(CELEROExperiment_celeroDemoSimpleJUnit OFF) -set(CELEROExperiment_celeroDemoSleep OFF) -set(CELEROExperiment_celeroDemoToString OFF) -set(CELEROExperiment_celeroDemoTransform OFF) -set(CELEROExperiment_celeroExperimentCompressBools OFF) -set(CELEROExperiment_celeroExperimentCostOfPimpl OFF) -set(CELEROExperiment_celeroExperimentParameterPassing OFF) -set(CELEROExperiment_celeroExperimentParticles OFF) -set(CELEROExperiment_celeroExperimentSimpleComparison OFF) -set(CELEROExperiment_celeroExperimentSortingRandomInts OFF) +set(CELERO_ENABLE_EXPERIMENTS OFF) +set(CELERO_ENABLE_TESTS OFF) +set(CELERO_RUN_EXAMPLE_ON_BUILD OFF) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From cd4142d3cac144c6f4e558cdfe8403e1987ff833 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Oct 2017 14:06:02 -0700 Subject: Bump version of nuget to 4.3.0 (was 4.1.0) --- scripts/fetchDependency.ps1 | 8 ++++---- toolsrc/src/VcpkgPaths.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 80d6d2abb..665376baf 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -116,11 +116,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "nuget") { - $requiredVersion = "4.1.0" - $downloadVersion = "4.1.0" - $url = "https://dist.nuget.org/win-x86-commandline/v4.1.0/nuget.exe" + $requiredVersion = "4.3.0" + $downloadVersion = "4.3.0" + $url = "https://dist.nuget.org/win-x86-commandline/v4.3.0/nuget.exe" $downloadPath = "$downloadsDir\nuget-$downloadVersion\nuget.exe" - $expectedDownloadedFileHash = "4c1de9b026e0c4ab087302ff75240885742c0faa62bd2554f913bbe1f6cb63a0" + $expectedDownloadedFileHash = "386da77a8cf2b63d1260b7020feeedabfe3b65ab31d20e6a313a530865972f3a" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index e3e83af30..d14002e47 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -130,10 +130,10 @@ namespace vcpkg fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {4, 1, 0}; + static constexpr std::array EXPECTED_VERSION = {4, 3, 0}; static const std::wstring VERSION_CHECK_ARGUMENTS = Strings::WEMPTY; - const fs::path downloaded_copy = downloads_folder / "nuget-4.1.0" / "nuget.exe"; + const fs::path downloaded_copy = downloads_folder / "nuget-4.3.0" / "nuget.exe"; const std::vector from_path = Files::find_from_PATH(L"nuget"); std::vector candidate_paths; -- cgit v1.2.3 From 049ad42779176fba38a79ec4c1344fcd2d058dbc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 6 Oct 2017 14:06:43 -0700 Subject: [mozjpeg] Use vcpkg_from_github and vcpkg_copy_tool_dependencies --- ports/mozjpeg/CONTROL | 2 +- ports/mozjpeg/portfile.cmake | 33 +++++++++++++++++++-------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/ports/mozjpeg/CONTROL b/ports/mozjpeg/CONTROL index 8afc065b3..9e3f19b4c 100644 --- a/ports/mozjpeg/CONTROL +++ b/ports/mozjpeg/CONTROL @@ -1,3 +1,3 @@ Source: mozjpeg -Version: 3.2 +Version: 3.2-1 Description: MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world's deployed decoders. It's compatible with libjpeg API and ABI, and can be used as a drop-in replacement for libjpeg. diff --git a/ports/mozjpeg/portfile.cmake b/ports/mozjpeg/portfile.cmake index d95f83ff8..52011d394 100644 --- a/ports/mozjpeg/portfile.cmake +++ b/ports/mozjpeg/portfile.cmake @@ -1,27 +1,30 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mozjpeg-3.2) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mozilla/mozjpeg/archive/v3.2.zip" - FILENAME "mozjpeg.zip" - SHA512 a1ba53dea3e04add46616918b5e96f2c8102ef65856596f1794df29c8be27db3d9fb13e7ffc864d23626f98dff5a6b47315903cae9ae41f9905aef2cc91af0c5 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mozilla/mozjpeg + REF v3.2 + SHA512 d14789827a9f4f78139a3945d3169d37eb891758b5ab40ef19e99ebebb2fb6d7c3a05495de245bba54cfd913b153af352159aa9fc0218127f97819137e0f1ab8 + HEAD_REF master ) vcpkg_find_acquire_program(NASM) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") -vcpkg_extract_source_archive(${ARCHIVE}) - -if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(OPTIONS "-DENABLE_SHARED=FALSE") else() set(OPTIONS "-DENABLE_STATIC=FALSE") endif() +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_CRT_DLL) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS ${OPTIONS} + OPTIONS + ${OPTIONS} + -DWITH_CRT_DLL=${WITH_CRT_DLL} ) vcpkg_install_cmake() @@ -34,12 +37,14 @@ file(REMOVE ${DEBUGEXES}) #move exes to tools file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) -file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/mozjpeg) +file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/mozjpeg) file(REMOVE ${EXES}) -#remove empty fodlers after static build -if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/mozjpeg) + +#remove empty folders after static build +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -- cgit v1.2.3 From bc18ea6622a852e9bd883051cd8503b9640cab59 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Oct 2017 18:23:11 -0700 Subject: [cpprestsdk] Patch to allow building with openssl 1.1.0 --- ports/cpprestsdk/0003_openssl_110.patch | 14 ++++++++++++++ ports/cpprestsdk/CONTROL | 2 +- ports/cpprestsdk/portfile.cmake | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 ports/cpprestsdk/0003_openssl_110.patch diff --git a/ports/cpprestsdk/0003_openssl_110.patch b/ports/cpprestsdk/0003_openssl_110.patch new file mode 100644 index 000000000..b2b361187 --- /dev/null +++ b/ports/cpprestsdk/0003_openssl_110.patch @@ -0,0 +1,14 @@ +diff --git a/Release/src/websockets/client/ws_client_wspp.cpp b/Release/src/websockets/client/ws_client_wspp.cpp +index 9f91d68..4b5d506 100644 +--- a/Release/src/websockets/client/ws_client_wspp.cpp ++++ b/Release/src/websockets/client/ws_client_wspp.cpp +@@ -76,7 +76,9 @@ static struct ASIO_SSL_memory_leak_suppress + { + ~ASIO_SSL_memory_leak_suppress() + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + ::SSL_COMP_free_compression_methods(); ++#endif + } + } ASIO_SSL_memory_leak_suppressor; + diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index f22ee9854..9831af585 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,5 @@ Source: cpprestsdk -Version: 2.9.0-3 +Version: 2.9.0-4 Build-Depends: zlib (windows), openssl (windows), boost (windows), websocketpp (windows) Description: C++11 JSON, REST, and OAuth library The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index 7482760d3..83b38a92d 100644 --- a/ports/cpprestsdk/portfile.cmake +++ b/ports/cpprestsdk/portfile.cmake @@ -13,6 +13,7 @@ if(NOT VCPKG_USE_HEAD_VERSION) PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch ${CMAKE_CURRENT_LIST_DIR}/0002_no_websocketpp_in_uwp.patch + ${CMAKE_CURRENT_LIST_DIR}/0003_openssl_110.patch ) endif() -- cgit v1.2.3 From 1fb5313a881fe0fcfd90dff5255045c8367ee00b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Oct 2017 18:32:59 -0700 Subject: [websocketpp] Add patch for openssl 1.1.0 compatibility --- ports/websocketpp/CONTROL | 2 +- ports/websocketpp/openssl_110.patch | 19 +++++++++++++++++++ ports/websocketpp/portfile.cmake | 6 ++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 ports/websocketpp/openssl_110.patch diff --git a/ports/websocketpp/CONTROL b/ports/websocketpp/CONTROL index f812dc565..f15164de2 100644 --- a/ports/websocketpp/CONTROL +++ b/ports/websocketpp/CONTROL @@ -1,4 +1,4 @@ Source: websocketpp -Version: 0.7.0 +Version: 0.7.0-1 Build-Depends: zlib, openssl, boost Description: Library that implements RFC6455 The WebSocket Protocol \ No newline at end of file diff --git a/ports/websocketpp/openssl_110.patch b/ports/websocketpp/openssl_110.patch new file mode 100644 index 000000000..93f4302e0 --- /dev/null +++ b/ports/websocketpp/openssl_110.patch @@ -0,0 +1,19 @@ +diff --git a/websocketpp/transport/asio/security/tls.hpp b/websocketpp/transport/asio/security/tls.hpp +index 7b32db8..37173b7 100644 +--- a/websocketpp/transport/asio/security/tls.hpp ++++ b/websocketpp/transport/asio/security/tls.hpp +@@ -355,7 +355,13 @@ protected: + template + lib::error_code translate_ec(ErrorCodeType ec) { + if (ec.category() == lib::asio::error::get_ssl_category()) { +- if (ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ) { ++ if ( ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++ ERR_GET_REASON(ec.value()) == SSL_R_SHORT_READ ++#else ++ false ++#endif ++ ) { + return make_error_code(transport::error::tls_short_read); + } else { + // We know it is a TLS related error, but otherwise don't know diff --git a/ports/websocketpp/portfile.cmake b/ports/websocketpp/portfile.cmake index 98a4d52e6..8531edd7d 100644 --- a/ports/websocketpp/portfile.cmake +++ b/ports/websocketpp/portfile.cmake @@ -9,6 +9,12 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/openssl_110.patch +) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) # Put the license file where vcpkg expects it -- cgit v1.2.3 From e30466b08cff9749a197774390e2cd00f62eb9b2 Mon Sep 17 00:00:00 2001 From: pravic Date: Wed, 4 Oct 2017 07:12:43 +0300 Subject: [sciter] Update to 4.0.4.5413 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 54d72ec3c..5583c626d 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.0.3 +Version: 4.0.4 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 063b318e3..1622379ac 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,9 +12,9 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_VERSION 4.0.3) -set(SCITER_REVISION 1209528289b8c8369352d648f4ba0c67826cbd8b) -set(SCITER_SHA 9fc72dd44b22c69715b4b08c5af7a65e0bb48d849191002b2ae45ca6f5ea058fb8c64cc7f6c176215afce682af6166a1579efd8cc2ca0fb9e844ceba1160f10f) +set(SCITER_VERSION 4.0.4) +set(SCITER_REVISION 172e04dc1b8527a6f7ea8b6e9388238f9568cc93) +set(SCITER_SHA 07db84fe560450b32477a35fd63d6d9ba5a5df1cc4bccba6e0f74cde56f16a2708f58b7f27482a97e4264e7069096128a591c886f19e56fc2fd8d16ddcbcf73e) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From a958a8b50a1eacbf2d908d4428da6637f375a8bd Mon Sep 17 00:00:00 2001 From: pravic Date: Sun, 8 Oct 2017 07:32:30 +0300 Subject: [sciter] Update to 4.0.4.5428 --- ports/sciter/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 1622379ac..ac3020144 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -13,8 +13,8 @@ include(vcpkg_common_functions) set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) set(SCITER_VERSION 4.0.4) -set(SCITER_REVISION 172e04dc1b8527a6f7ea8b6e9388238f9568cc93) -set(SCITER_SHA 07db84fe560450b32477a35fd63d6d9ba5a5df1cc4bccba6e0f74cde56f16a2708f58b7f27482a97e4264e7069096128a591c886f19e56fc2fd8d16ddcbcf73e) +set(SCITER_REVISION 9b5954df34ac0094e6037ac8aa6e00fb883185f9) +set(SCITER_SHA a87b05aec6c99f56926b005eb1303b2b68f901fe2658433ca11d704b50308e6d291026404b86320fae0f1b12ca257a35338464f21d94ebeaa6e40cfec64a9201) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From 86f6485078b2eac0999c8eef631862afc863c3d3 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sat, 7 Oct 2017 00:24:59 +0900 Subject: Add support custom triplets Add support custom triplets. --- ports/openni2/CONTROL | 2 +- ports/openni2/replace_environment_variable.patch.in | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ports/openni2/CONTROL b/ports/openni2/CONTROL index 72de4e877..bf012ff8e 100644 --- a/ports/openni2/CONTROL +++ b/ports/openni2/CONTROL @@ -1,4 +1,4 @@ Source: openni2 -Version: 2.2.0.33-2 +Version: 2.2.0.33-3 Build-Depends: kinectsdk1 Description: OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera. diff --git a/ports/openni2/replace_environment_variable.patch.in b/ports/openni2/replace_environment_variable.patch.in index ac5cf017c..31e7cb951 100644 --- a/ports/openni2/replace_environment_variable.patch.in +++ b/ports/openni2/replace_environment_variable.patch.in @@ -7,7 +7,7 @@ index 08a49fe..7fd8620 100644 Level3 Disabled - ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x86-windows\include ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\include _WINDLL;%(PreprocessorDefinitions);_WINDOWS false false @@ -16,7 +16,7 @@ index 08a49fe..7fd8620 100644 true Kinect10.lib;XnLib.lib;%(AdditionalDependencies) - $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x86-windows\debug\lib ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\debug\lib true @@ -25,7 +25,7 @@ index 08a49fe..7fd8620 100644 Level3 Disabled - ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x64-windows\include ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\include _WINDLL;%(PreprocessorDefinitions);_WINDOWS false false @@ -34,7 +34,7 @@ index 08a49fe..7fd8620 100644 true Kinect10.lib;XnLib.lib;%(AdditionalDependencies) - $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x64-windows\debug\lib ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\debug\lib @@ -43,7 +43,7 @@ index 08a49fe..7fd8620 100644 true true - ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x86-windows\include ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\include false @@ -52,7 +52,7 @@ index 08a49fe..7fd8620 100644 true Kinect10.lib;XnLib.lib;%(AdditionalDependencies) - $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x86-windows\lib ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\lib true @@ -61,7 +61,7 @@ index 08a49fe..7fd8620 100644 true true - ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x64-windows\include ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\include false @@ -70,7 +70,7 @@ index 08a49fe..7fd8620 100644 true Kinect10.lib;XnLib.lib;%(AdditionalDependencies) - $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x64-windows\lib ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\lib true -- cgit v1.2.3 From a3f68f5d01deb65becea0e93b95512559f47d31a Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Fri, 6 Oct 2017 23:17:35 -0700 Subject: [string_theory] Initial port --- ports/string-theory/CONTROL | 3 +++ ports/string-theory/portfile.cmake | 42 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 ports/string-theory/CONTROL create mode 100644 ports/string-theory/portfile.cmake diff --git a/ports/string-theory/CONTROL b/ports/string-theory/CONTROL new file mode 100644 index 000000000..63bc5b656 --- /dev/null +++ b/ports/string-theory/CONTROL @@ -0,0 +1,3 @@ +Source: string-theory +Version: 1.6 +Description: Flexible C++11 string library with type-safe formatting. diff --git a/ports/string-theory/portfile.cmake b/ports/string-theory/portfile.cmake new file mode 100644 index 000000000..8a6cb1fd1 --- /dev/null +++ b/ports/string-theory/portfile.cmake @@ -0,0 +1,42 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zrax/string_theory + REF 1.6 + SHA512 5bc99b6dfc2ab43d2812ee47dfbbeeb68106da39b2349799ab924f009270166ebb5508f87a37e634fbfa5495dd263697a582404650eedc5393722761c5ce2028 + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(ST_BUILD_STATIC ON) +else() + set(ST_BUILD_STATIC OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DST_BUILD_STATIC=${ST_BUILD_STATIC} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/string_theory") + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/string-theory ${CURRENT_PACKAGES_DIR}/share/string_theory) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/string-theory) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/string-theory/LICENSE ${CURRENT_PACKAGES_DIR}/share/string-theory/copyright) +file(COPY ${CURRENT_PACKAGES_DIR}/share/string-theory/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/string_theory/copyright) -- cgit v1.2.3 From 3e4b7edb79073719b7cb6115279ce5150b7c761a Mon Sep 17 00:00:00 2001 From: Fabian Parzefall Date: Mon, 9 Oct 2017 12:48:44 +0200 Subject: Add port for imgui library --- ports/imgui/CMakeLists.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ ports/imgui/CONTROL | 4 ++++ ports/imgui/portfile.cmake | 23 +++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 ports/imgui/CMakeLists.txt create mode 100644 ports/imgui/CONTROL create mode 100644 ports/imgui/portfile.cmake diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt new file mode 100644 index 000000000..e0f524f02 --- /dev/null +++ b/ports/imgui/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.8) +project(imgui CXX) + +find_path(STB_INCLUDE_DIR stb_rect_pack.h stb_textedit.h stb_truetype.h) + +set(IMGUI_INCLUDES_PUBLIC + imgui.h + imconfig.h +) + +set(IMGUI_INCLUDES_PRIVATE + imgui_internal.h +) + +set(IMGUI_SOURCES + imgui.cpp + imgui_demo.cpp + imgui_draw.cpp +) + +add_library(imgui STATIC + ${IMGUI_INCLUDES_PUBLIC} + ${IMGUI_INCLUDES_PRIVATE} + ${IMGUI_SOURCES} +) + +target_include_directories(imgui + PRIVATE + ${IMGUI_INCLUDES_PRIVATE} + ${STB_INCLUDE_DIR} + + PUBLIC + ${IMGUI_INCLUDES_PUBLIC} +) + +install(TARGETS imgui + ARCHIVE DESTINATION lib +) + +if(NOT IMGUI_SKIP_HEADERS) + install( + FILES ${IMGUI_INCLUDES_PUBLIC} + DESTINATION include + ) +endif() diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL new file mode 100644 index 000000000..d0baa98db --- /dev/null +++ b/ports/imgui/CONTROL @@ -0,0 +1,4 @@ +Source: imgui +Version: 1.51 +Build-Depends: stb (windows) +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 new file mode 100644 index 000000000..022efd8ce --- /dev/null +++ b/ports/imgui/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/imgui-1.51) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/ocornut/imgui/archive/v1.51.zip" + FILENAME "imgui-1.51.zip" + SHA512 a3c77887396991f8371c0cf5b42d781d758877cdb194a7c6ea8b34939f4b300f55f176d601dd0e167ea2a20bd8a47b958ad1bca16864a19c1cc9b2c7a889ab29 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DIMGUI_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/imgui) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/imgui/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/imgui/copyright) -- cgit v1.2.3 From ab7a1abc93473dc1b7fcb341a4d104e3a77afd87 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 9 Oct 2017 16:38:21 -0700 Subject: [VS detection] Add -products * flag to vswhere. This includes Express and BuildTools SKUs --- scripts/findVisualStudioInstallationInstances.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 8c67ef6d6..b2f186478 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -6,7 +6,7 @@ param( $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $vswhereExe = & $scriptsDir\fetchDependency.ps1 "vswhere" -$output = & $vswhereExe -prerelease -legacy -format xml +$output = & $vswhereExe -prerelease -legacy -products * -format xml [xml]$asXml = $output $results = New-Object System.Collections.ArrayList -- cgit v1.2.3 From b6512bace19d6c28cce71a0c2e8e28ab77d3ef56 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 9 Oct 2017 16:40:13 -0700 Subject: [vswhere.exe] Update to vesrion 2.2.3 (was 2.1.4) --- scripts/fetchDependency.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 665376baf..bc58f4436 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -126,11 +126,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "vswhere") { - $requiredVersion = "2.1.4" - $downloadVersion = "2.1.4" - $url = "https://github.com/Microsoft/vswhere/releases/download/2.1.4/vswhere.exe" + $requiredVersion = "2.2.3" + $downloadVersion = "2.2.3" + $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.3/vswhere.exe" $downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe" - $expectedDownloadedFileHash = "548fb9dfeed59bc4ddcce739a5729e9c8dd5932cd60ff6f74727ee069e7da458" + $expectedDownloadedFileHash = "5f19066ac91635ad17d33fe0f79fc63c672a46f98c0358589a90163bcb2733e8" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } -- cgit v1.2.3 From 40bec91c0b19e90e63aec104178c14076259a233 Mon Sep 17 00:00:00 2001 From: Eric Mittelette Date: Mon, 9 Oct 2017 17:00:03 -0700 Subject: adding tiny-dnn port files --- ports/tiny-dnn/CONTROL | 3 +++ ports/tiny-dnn/portfile.cmake | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 ports/tiny-dnn/CONTROL create mode 100644 ports/tiny-dnn/portfile.cmake diff --git a/ports/tiny-dnn/CONTROL b/ports/tiny-dnn/CONTROL new file mode 100644 index 000000000..1423a8695 --- /dev/null +++ b/ports/tiny-dnn/CONTROL @@ -0,0 +1,3 @@ +Source: tiny-dnn +Version: 1.10.8 +Description:a C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource. diff --git a/ports/tiny-dnn/portfile.cmake b/ports/tiny-dnn/portfile.cmake new file mode 100644 index 000000000..423b92aa6 --- /dev/null +++ b/ports/tiny-dnn/portfile.cmake @@ -0,0 +1,16 @@ +#header-only library +include(vcpkg_common_functions) +SET(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tiny-dnn-dd906fed8c8aff8dc837657c42f9d55f8b793b0e) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/tiny-dnn/tiny-dnn/archive/dd906fed8c8aff8dc837657c42f9d55f8b793b0e.zip" + FILENAME "tiny-dnn-1.zip" + SHA512 9881d5a10215e3e2e5fe0e3df6b061ebf4e5c064883bdcff5578f1b635c6a41e8f03bfbcf7e07922f3c477c3bdfb5dea85d616e2cd9d42f07d7ae78e601ffded +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Copy the asio header files +file(INSTALL ${SOURCE_PATH}/tiny_dnn DESTINATION ${CURRENT_PACKAGES_DIR}/include) + + +file(COPY ${CURRENT_BUILDTREES_DIR}/src/tiny-dnn-dd906fed8c8aff8dc837657c42f9d55f8b793b0e/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiny-dnn) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/tiny-dnn/LICENSE ${CURRENT_PACKAGES_DIR}/share/tiny-dnn/copyright) \ No newline at end of file -- cgit v1.2.3 From d3c45b0668e00703facc86aee998cbfb40fde2ff Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 9 Oct 2017 17:11:34 -0700 Subject: [tiny-dnn] Use vcpkg_from_github() and fix version --- ports/tiny-dnn/CONTROL | 4 ++-- ports/tiny-dnn/portfile.cmake | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ports/tiny-dnn/CONTROL b/ports/tiny-dnn/CONTROL index 1423a8695..f12cc076f 100644 --- a/ports/tiny-dnn/CONTROL +++ b/ports/tiny-dnn/CONTROL @@ -1,3 +1,3 @@ Source: tiny-dnn -Version: 1.10.8 -Description:a C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource. +Version: 2017-10-09-dd906fed8c8aff8dc837657c42f9d55f8b793b0e +Description: A C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource. diff --git a/ports/tiny-dnn/portfile.cmake b/ports/tiny-dnn/portfile.cmake index 423b92aa6..7e3baa92a 100644 --- a/ports/tiny-dnn/portfile.cmake +++ b/ports/tiny-dnn/portfile.cmake @@ -1,14 +1,13 @@ #header-only library include(vcpkg_common_functions) -SET(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tiny-dnn-dd906fed8c8aff8dc837657c42f9d55f8b793b0e) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/tiny-dnn/tiny-dnn/archive/dd906fed8c8aff8dc837657c42f9d55f8b793b0e.zip" - FILENAME "tiny-dnn-1.zip" - SHA512 9881d5a10215e3e2e5fe0e3df6b061ebf4e5c064883bdcff5578f1b635c6a41e8f03bfbcf7e07922f3c477c3bdfb5dea85d616e2cd9d42f07d7ae78e601ffded +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tiny-dnn/tiny-dnn + REF dd906fed8c8aff8dc837657c42f9d55f8b793b0e + SHA512 d853db7f49af1bece55337b93631c41191f3abd8287969f230330662fecc612e4e53ab789535fc6f9770ae0c8623d8e020e6036c2c804783d08f176a08c05d1b + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) -# Copy the asio header files file(INSTALL ${SOURCE_PATH}/tiny_dnn DESTINATION ${CURRENT_PACKAGES_DIR}/include) -- cgit v1.2.3 From c7914d34de76b0d45cc0db6019d3331b59340346 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 10 Oct 2017 23:06:14 -0700 Subject: update mpfr to 3.1.6 --- ports/mpfr/CONTROL | 2 +- ports/mpfr/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/mpfr/CONTROL b/ports/mpfr/CONTROL index 2d5d4fedd..bec54417d 100644 --- a/ports/mpfr/CONTROL +++ b/ports/mpfr/CONTROL @@ -1,4 +1,4 @@ Source: mpfr -Version: 3.1.5-1 +Version: 3.1.6 Description: The MPFR library is a C library for multiple-precision floating-point computations with correct rounding Build-Depends: mpir diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake index 6a61d4038..b71aa0505 100644 --- a/ports/mpfr/portfile.cmake +++ b/ports/mpfr/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpfr-3.1.5) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpfr-3.1.6) vcpkg_download_distfile(ARCHIVE - URLS "http://www.mpfr.org/mpfr-current/mpfr-3.1.5.tar.xz" - FILENAME "mpfr-3.1.5.tar.xz" - SHA512 3643469b9099b31e41d6ec9158196cd1c30894030c8864ee5b1b1e91b488bccbf7c263c951b03fe9f4ae6f9d29279e157a7dfed0885467d875f107a3d964f032 + URLS "http://www.mpfr.org/mpfr-current/mpfr-3.1.6.tar.xz" + FILENAME "mpfr-3.1.6.tar.xz" + SHA512 746ee74d5026f267f74ab352d850ed30ff627d530aa840c71b24793e44875f8503946bd7399905dea2b2dd5744326254d7889337fe94cfe58d03c4066e9d8054 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 7cd465b8897bd9487db6d990e58dcac472b3d4d6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 11 Oct 2017 17:56:01 -0700 Subject: `vcpkg install` Print summary when using the --keep-going flag --- toolsrc/src/commands_install.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp index d815332fe..4411dd3ae 100644 --- a/toolsrc/src/commands_install.cpp +++ b/toolsrc/src/commands_install.cpp @@ -556,6 +556,7 @@ namespace vcpkg::Commands::Install const bool no_downloads = options.find(OPTION_NO_DOWNLOADS) != options.cend(); const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); const KeepGoing keep_going = to_keep_going(options.find(OPTION_KEEP_GOING) != options.cend()); + const PrintSummary print_summary = to_print_summary(keep_going == KeepGoing::YES); // create the plan StatusParagraphs status_db = database_load_check(paths); @@ -606,7 +607,7 @@ namespace vcpkg::Commands::Install Checks::exit_success(VCPKG_LINE_INFO); } - perform_and_exit(action_plan, install_plan_options, keep_going, PrintSummary::NO, paths, status_db); + perform_and_exit(action_plan, install_plan_options, keep_going, print_summary, paths, status_db); Checks::exit_success(VCPKG_LINE_INFO); } -- cgit v1.2.3 From 00d89dbd66a658174233920d6be2a85f282ef29f Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 24 Sep 2017 16:01:37 +0300 Subject: vcpkg: initial ARM64 support --- scripts/cmake/vcpkg_configure_cmake.cmake | 16 ++++++++++++++-- toolsrc/src/PostBuildLint.cpp | 1 + toolsrc/src/VcpkgPaths.cpp | 4 ++++ triplets/arm64-uwp.cmake | 6 ++++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 triplets/arm64-uwp.cmake diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index fe8c97c52..bfb6a19fd 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -78,14 +78,20 @@ function(vcpkg_configure_cmake) set(GENERATOR "Visual Studio 15 2017") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 ARM") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017") + set(ARCH "ARM64") elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(TRIPLET_SYSTEM_ARCH STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 ARM") + elseif(TRIPLET_SYSTEM_ARCH STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017") + set(ARCH "ARM64") endif() # If we use Ninja, make sure it's on PATH @@ -139,6 +145,12 @@ function(vcpkg_configure_cmake) "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" ) + if(DEFINED ARCH) + list(APPEND _csc_OPTIONS + "-A${ARCH}" + ) + endif() + if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND _csc_OPTIONS_DEBUG "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index a0699e15c..6d9a0da73 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -361,6 +361,7 @@ namespace vcpkg::PostBuildLint case MachineType::I386: return "x86"; case MachineType::ARM: case MachineType::ARMNT: return "arm"; + case MachineType::ARM64: return "arm64"; default: return "Machine Type Code = " + std::to_string(static_cast(machine_type)); } } diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp index d14002e47..dac9e40e7 100644 --- a/toolsrc/src/VcpkgPaths.cpp +++ b/toolsrc/src/VcpkgPaths.cpp @@ -370,10 +370,14 @@ namespace vcpkg supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_arm64.bat")) + supported_architectures.push_back({L"x86_arm64", CPU::X86, CPU::ARM64}); if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm64.bat")) + supported_architectures.push_back({L"amd64_arm64", CPU::X64, CPU::ARM64}); // Locate the "best" MSVC toolchain version const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; diff --git a/triplets/arm64-uwp.cmake b/triplets/arm64-uwp.cmake new file mode 100644 index 000000000..b37c34e87 --- /dev/null +++ b/triplets/arm64-uwp.cmake @@ -0,0 +1,6 @@ +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + +set(VCPKG_CMAKE_SYSTEM_NAME WindowsStore) +set(VCPKG_CMAKE_SYSTEM_VERSION 10.0) -- cgit v1.2.3 From 88761e1b2fcd0a8c6fd153e589bc6f28c5bb0812 Mon Sep 17 00:00:00 2001 From: LazyHamster Date: Thu, 12 Oct 2017 12:56:58 +0300 Subject: [libidn2] initial port --- ports/libidn2/CMakeLists.txt | 105 +++++ ports/libidn2/CONTROL | 4 + ports/libidn2/config.h | 995 +++++++++++++++++++++++++++++++++++++++++++ ports/libidn2/portfile.cmake | 56 +++ ports/libidn2/string.h | 10 + 5 files changed, 1170 insertions(+) create mode 100644 ports/libidn2/CMakeLists.txt create mode 100644 ports/libidn2/CONTROL create mode 100644 ports/libidn2/config.h create mode 100644 ports/libidn2/portfile.cmake create mode 100644 ports/libidn2/string.h diff --git a/ports/libidn2/CMakeLists.txt b/ports/libidn2/CMakeLists.txt new file mode 100644 index 000000000..9fbe1bcdd --- /dev/null +++ b/ports/libidn2/CMakeLists.txt @@ -0,0 +1,105 @@ +cmake_minimum_required(VERSION 3.8) + +project(libidn2 C) + +find_path(ICONV_INCLUDE_DIR iconv.h) +find_library(ICONV NAMES libiconv) +find_library(ICONV_CHARSET NAMES libcharset) + +set(CMAKE_DEBUG_POSTFIX "d") + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + +add_definitions(-DIDN2_BUILDING) + +if(NOT BUILD_SHARED_LIBS) + add_definitions(-DIDN2_STATIC) +endif() + +# List the source files +set(LIB_SRC lib/bidi.c + lib/context.c + lib/data.c + lib/decode.c + lib/error.c + lib/free.c + lib/idna.c + lib/lookup.c + lib/puny_decode.c + lib/puny_encode.c + lib/register.c + lib/tables.c + lib/tr46map.c + lib/tr46map_data.c + lib/version.c +) + +# List the libunistring source files +set(UNISTR_SRC unistring/c-ctype.c + unistring/c-strcasecmp.c + unistring/c-strncasecmp.c + unistring/malloca.c + unistring/striconveh.c + unistring/striconveha.c + unistring/uniconv/u8-conv-from-enc.c + unistring/uniconv/u8-strconv-from-enc.c + unistring/uniconv/u8-strconv-from-locale.c + unistring/uniconv/u8-strconv-to-enc.c + unistring/uniconv/u8-strconv-to-locale.c + unistring/unistr/u32-cpy.c + unistring/unistr/u32-cpy-alloc.c + unistring/unistr/u32-mbtouc-unsafe.c + unistring/unistr/u32-strlen.c + unistring/unistr/u32-to-u8.c + unistring/unistr/u32-uctomb.c + unistring/unistr/u8-check.c + unistring/unistr/u8-mblen.c + unistring/unistr/u8-mbtouc.c + unistring/unistr/u8-mbtouc-aux.c + unistring/unistr/u8-mbtouc-unsafe.c + unistring/unistr/u8-mbtouc-unsafe-aux.c + unistring/unistr/u8-mbtoucr.c + unistring/unistr/u8-prev.c + unistring/unistr/u8-strlen.c + unistring/unistr/u8-to-u32.c + unistring/unistr/u8-uctomb.c + unistring/unistr/u8-uctomb-aux.c + unistring/uninorm/canonical-decomposition.c + unistring/uninorm/composition.c + unistring/uninorm/decompose-internal.c + unistring/uninorm/decomposition-table.c + unistring/uninorm/nfc.c + unistring/uninorm/nfd.c + unistring/uninorm/u32-normalize.c + unistring/unictype/bidi_of.c + unistring/unictype/categ_M.c + unistring/unictype/categ_none.c + unistring/unictype/categ_of.c + unistring/unictype/categ_test.c + unistring/unictype/combiningclass.c + unistring/unictype/joiningtype_of.c + unistring/unictype/scripts.c +) + +# List the gnulib source files +set(GL_SRC gl/rawmemchr.c + gl/strchrnul.c + gl/strverscmp.c + gl/msvc-inval.c + gl/msvc-nothrow.c +) + +add_library(libidn2 ${LIB_SRC} ${UNISTR_SRC} ${GL_SRC}) + +target_include_directories(libidn2 PRIVATE . ./unistring ./gl ${ICONV_INCLUDE_DIR}) +target_link_libraries(libidn2 PRIVATE ${ICONV} ${ICONV_CHARSET}) + +install(TARGETS libidn2 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES lib/idn2.h DESTINATION include) diff --git a/ports/libidn2/CONTROL b/ports/libidn2/CONTROL new file mode 100644 index 000000000..46e81c7bf --- /dev/null +++ b/ports/libidn2/CONTROL @@ -0,0 +1,4 @@ +Source: libidn2 +Version: 2.0.4 +Build-Depends: libiconv +Description: GNU Libidn is an implementation of the Stringprep, Punycode and IDNA 2003 specifications. Libidn's purpose is to encode and decode internationalized domain names. diff --git a/ports/libidn2/config.h b/ports/libidn2/config.h new file mode 100644 index 000000000..9e61bc8f2 --- /dev/null +++ b/ports/libidn2/config.h @@ -0,0 +1,995 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to the number of bits in type 'ptrdiff_t'. */ +/* #undef BITSIZEOF_PTRDIFF_T */ + +/* Define to the number of bits in type 'sig_atomic_t'. */ +/* #undef BITSIZEOF_SIG_ATOMIC_T */ + +/* Define to the number of bits in type 'size_t'. */ +/* #undef BITSIZEOF_SIZE_T */ + +/* Define to the number of bits in type 'wchar_t'. */ +/* #undef BITSIZEOF_WCHAR_T */ + +/* Define to the number of bits in type 'wint_t'. */ +/* #undef BITSIZEOF_WINT_T */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 if // is a file system root distinct from /. */ +/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fscanf shall be considered present. */ +#define GNULIB_FSCANF 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module msvc-nothrow shall be considered present. */ +#define GNULIB_MSVC_NOTHROW 1 + +/* Define to 1 if printf and friends should be labeled with attribute + "__gnu_printf__" instead of "__printf__" */ +#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module scanf shall be considered present. */ +#define GNULIB_SCANF 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module strerror shall be considered present. */ +#define GNULIB_STRERROR 1 + +/* Define to 1 when the gnulib module getdelim should be tested. */ +/* #undef GNULIB_TEST_GETDELIM */ + +/* Define to 1 when the gnulib module getline should be tested. */ +/* #undef GNULIB_TEST_GETLINE */ + +/* Define to 1 when the gnulib module malloc-posix should be tested. */ +/* #undef GNULIB_TEST_MALLOC_POSIX */ + +/* Define to 1 when the gnulib module rawmemchr should be tested. */ +/* #undef GNULIB_TEST_RAWMEMCHR */ + +/* Define to 1 when the gnulib module strchrnul should be tested. */ +/* #undef GNULIB_TEST_STRCHRNUL */ + +/* Define to 1 when the gnulib module strerror should be tested. */ +/* #undef GNULIB_TEST_STRERROR */ + +/* Define to 1 when the gnulib module strverscmp should be tested. */ +/* #undef GNULIB_TEST_STRVERSCMP */ + +/* Define to 1 when the gnulib module uninorm/u32-normalize should be tested. + */ +/* #undef GNULIB_TEST_UNINORM_U32_NORMALIZE */ + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u32-mbtouc-unsafe shall be considered + present. */ +#define GNULIB_UNISTR_U32_MBTOUC_UNSAFE 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u32-uctomb shall be considered present. */ +#define GNULIB_UNISTR_U32_UCTOMB 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-mbtouc shall be considered present. */ +#define GNULIB_UNISTR_U8_MBTOUC 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ +#define GNULIB_UNISTR_U8_MBTOUCR 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-mbtouc-unsafe shall be considered + present. */ +#define GNULIB_UNISTR_U8_MBTOUC_UNSAFE 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-uctomb shall be considered present. */ +#define GNULIB_UNISTR_U8_UCTOMB 1 + +/* Define to 1 if you have 'alloca' after including , a header that + may be supplied by this distribution. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#define HAVE_DCGETTEXT 1 + +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_GETC_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `getdelim', and to 0 if you + don't. */ +#define HAVE_DECL_GETDELIM 0 + +/* Define to 1 if you have the declaration of `getline', and to 0 if you + don't. */ +#define HAVE_DECL_GETLINE 0 + +/* Define to 1 if you have the declaration of `program_invocation_name', and + to 0 if you don't. */ +#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 + +/* Define to 1 if you have the declaration of `program_invocation_short_name', + and to 0 if you don't. */ +#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_R 0 + +/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. + */ +#define HAVE_DECL___ARGV 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the `flockfile' function. */ +/* #undef HAVE_FLOCKFILE */ + +/* Define to 1 if you have the `funlockfile' function. */ +/* #undef HAVE_FUNLOCKFILE */ + +/* Define to 1 if you have the 'getdelim' function. */ +/* #undef HAVE_GETDELIM */ + +/* Define to 1 if you have the 'getexecname' function. */ +/* #undef HAVE_GETEXECNAME */ + +/* Define to 1 if you have the 'getprogname' function. */ +/* #undef HAVE_GETPROGNAME */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#define HAVE_GETTEXT 1 + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ICONV_H 1 + +/* Define to 1 if the compiler supports one of the keywords 'inline', + '__inline__', '__inline' and effectively inlines functions marked as such. + */ +#define HAVE_INLINE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if you have and nl_langinfo(CODESET). */ +/* #undef HAVE_LANGINFO_CODESET */ + +/* Define if you have the libunistring library. */ +/* #undef HAVE_LIBUNISTRING */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if the system has the type 'long long int'. */ +#define HAVE_LONG_LONG_INT 1 + +/* Define if the 'malloc' function is POSIX compliant. */ +/* #undef HAVE_MALLOC_POSIX */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 on MSVC platforms that have the "invalid parameter handler" + concept. */ +#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 + +/* Define to 1 if you have the `rawmemchr' function. */ +/* #undef HAVE_RAWMEMCHR */ + +/* Define to 1 if atoll is declared even after undefining macros. */ +#define HAVE_RAW_DECL_ATOLL 1 + +/* Define to 1 if canonicalize_file_name is declared even after undefining + macros. */ +/* #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME */ + +/* Define to 1 if chdir is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_CHDIR */ + +/* Define to 1 if chown is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_CHOWN */ + +/* Define to 1 if dprintf is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_DPRINTF */ + +/* Define to 1 if dup is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_DUP */ + +/* Define to 1 if dup2 is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_DUP2 */ + +/* Define to 1 if dup3 is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_DUP3 */ + +/* Define to 1 if endusershell is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_ENDUSERSHELL */ + +/* Define to 1 if environ is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_ENVIRON */ + +/* Define to 1 if euidaccess is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_EUIDACCESS */ + +/* Define to 1 if faccessat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FACCESSAT */ + +/* Define to 1 if fchdir is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FCHDIR */ + +/* Define to 1 if fchownat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FCHOWNAT */ + +/* Define to 1 if fdatasync is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FDATASYNC */ + +/* Define to 1 if ffsl is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FFSL */ + +/* Define to 1 if ffsll is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FFSLL */ + +/* Define to 1 if fpurge is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FPURGE */ + +/* Define to 1 if fseeko is declared even after undefining macros. */ +#define HAVE_RAW_DECL_FSEEKO 1 + +/* Define to 1 if fsync is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FSYNC */ + +/* Define to 1 if ftello is declared even after undefining macros. */ +#define HAVE_RAW_DECL_FTELLO 1 + +/* Define to 1 if ftruncate is declared even after undefining macros. */ +#define HAVE_RAW_DECL_FTRUNCATE 1 + +/* Define to 1 if getcwd is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETCWD */ + +/* Define to 1 if getdelim is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETDELIM */ + +/* Define to 1 if getdomainname is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETDOMAINNAME */ + +/* Define to 1 if getdtablesize is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETDTABLESIZE */ + +/* Define to 1 if getgroups is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETGROUPS */ + +/* Define to 1 if gethostname is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETHOSTNAME */ + +/* Define to 1 if getline is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETLINE */ + +/* Define to 1 if getloadavg is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETLOADAVG */ + +/* Define to 1 if getlogin is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETLOGIN */ + +/* Define to 1 if getlogin_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETLOGIN_R */ + +/* Define to 1 if getpagesize is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETPAGESIZE */ + +/* Define to 1 if gets is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETS */ + +/* Define to 1 if getsubopt is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETSUBOPT */ + +/* Define to 1 if getusershell is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETUSERSHELL */ + +/* Define to 1 if grantpt is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GRANTPT */ + +/* Define to 1 if group_member is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GROUP_MEMBER */ + +/* Define to 1 if initstate is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_INITSTATE */ + +/* Define to 1 if initstate_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_INITSTATE_R */ + +/* Define to 1 if isatty is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_ISATTY */ + +/* Define to 1 if lchown is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_LCHOWN */ + +/* Define to 1 if link is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_LINK */ + +/* Define to 1 if linkat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_LINKAT */ + +/* Define to 1 if lseek is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_LSEEK */ + +/* Define to 1 if memmem is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MEMMEM */ + +/* Define to 1 if mempcpy is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MEMPCPY */ + +/* Define to 1 if memrchr is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MEMRCHR */ + +/* Define to 1 if mkdtemp is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKDTEMP */ + +/* Define to 1 if mkostemp is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKOSTEMP */ + +/* Define to 1 if mkostemps is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKOSTEMPS */ + +/* Define to 1 if mkstemp is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKSTEMP */ + +/* Define to 1 if mkstemps is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKSTEMPS */ + +/* Define to 1 if pclose is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PCLOSE */ + +/* Define to 1 if pipe is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PIPE */ + +/* Define to 1 if pipe2 is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PIPE2 */ + +/* Define to 1 if popen is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_POPEN */ + +/* Define to 1 if posix_openpt is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_POSIX_OPENPT */ + +/* Define to 1 if pread is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PREAD */ + +/* Define to 1 if ptsname is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PTSNAME */ + +/* Define to 1 if ptsname_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PTSNAME_R */ + +/* Define to 1 if pwrite is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PWRITE */ + +/* Define to 1 if qsort_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_QSORT_R */ + +/* Define to 1 if random is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RANDOM */ + +/* Define to 1 if random_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RANDOM_R */ + +/* Define to 1 if rawmemchr is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RAWMEMCHR */ + +/* Define to 1 if readlink is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_READLINK */ + +/* Define to 1 if readlinkat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_READLINKAT */ + +/* Define to 1 if realpath is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_REALPATH */ + +/* Define to 1 if renameat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RENAMEAT */ + +/* Define to 1 if rmdir is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RMDIR */ + +/* Define to 1 if rpmatch is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RPMATCH */ + +/* Define to 1 if secure_getenv is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SECURE_GETENV */ + +/* Define to 1 if setenv is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETENV */ + +/* Define to 1 if sethostname is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETHOSTNAME */ + +/* Define to 1 if setstate is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETSTATE */ + +/* Define to 1 if setstate_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETSTATE_R */ + +/* Define to 1 if setusershell is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETUSERSHELL */ + +/* Define to 1 if sleep is declared even after undefining macros. */ +#define HAVE_RAW_DECL_SLEEP 1 + +/* Define to 1 if snprintf is declared even after undefining macros. */ +#define HAVE_RAW_DECL_SNPRINTF 1 + +/* Define to 1 if srandom is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SRANDOM */ + +/* Define to 1 if srandom_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SRANDOM_R */ + +/* Define to 1 if stpcpy is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STPCPY */ + +/* Define to 1 if stpncpy is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STPNCPY */ + +/* Define to 1 if strcasestr is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRCASESTR */ + +/* Define to 1 if strchrnul is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRCHRNUL */ + +/* Define to 1 if strdup is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRDUP 1 + +/* Define to 1 if strerror_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRERROR_R */ + +/* Define to 1 if strncat is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRNCAT 1 + +/* Define to 1 if strndup is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRNDUP */ + +/* Define to 1 if strnlen is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRNLEN 1 + +/* Define to 1 if strpbrk is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRPBRK */ + +/* Define to 1 if strsep is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRSEP */ + +/* Define to 1 if strsignal is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRSIGNAL */ + +/* Define to 1 if strtod is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRTOD 1 + +/* Define to 1 if strtok_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRTOK_R */ + +/* Define to 1 if strtoll is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRTOLL */ + +/* Define to 1 if strtoull is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRTOULL */ + +/* Define to 1 if strverscmp is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRVERSCMP */ + +/* Define to 1 if symlink is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SYMLINK */ + +/* Define to 1 if symlinkat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SYMLINKAT */ + +/* Define to 1 if tmpfile is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_TMPFILE */ + +/* Define to 1 if truncate is declared even after undefining macros. */ +#define HAVE_RAW_DECL_TRUNCATE 1 + +/* Define to 1 if ttyname_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_TTYNAME_R */ + +/* Define to 1 if unlink is declared even after undefining macros. */ +#define HAVE_RAW_DECL_UNLINK 1 + +/* Define to 1 if unlinkat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_UNLINKAT */ + +/* Define to 1 if unlockpt is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_UNLOCKPT */ + +/* Define to 1 if unsetenv is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_UNSETENV */ + +/* Define to 1 if usleep is declared even after undefining macros. */ +#define HAVE_RAW_DECL_USLEEP 1 + +/* Define to 1 if vdprintf is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_VDPRINTF */ + +/* Define to 1 if vsnprintf is declared even after undefining macros. */ +#define HAVE_RAW_DECL_VSNPRINTF 1 + +/* Define to 1 if _Exit is declared even after undefining macros. */ +#define HAVE_RAW_DECL__EXIT 1 + +/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ + +/* Define to 1 if 'wchar_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WCHAR_T */ + +/* Define to 1 if 'wint_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WINT_T */ + +/* 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 `strchrnul' function. */ +/* #undef HAVE_STRCHRNUL */ + +/* Define to 1 if you have the `strerror_r' function. */ +/* #undef HAVE_STRERROR_R */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STRINGS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strverscmp' function. */ +/* #undef HAVE_STRVERSCMP */ + +/* Define to 1 if you have the 'symlink' function. */ +/* #undef HAVE_SYMLINK */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BITYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INTTYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SOCKET_H */ + +/* 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. */ +/* #undef HAVE_UNISTD_H */ + +/* Define to 1 if the system has the type 'unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_INT 1 + +/* Define if you have a global __progname variable */ +/* #undef HAVE_VAR___PROGNAME */ + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +/* #undef HAVE_VISIBILITY */ + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you have the 'wchar_t' type. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WINSOCK2_H 1 + +/* Define if you have the 'wint_t' type. */ +#define HAVE_WINT_T 1 + +/* Define to 1 if O_NOATIME works. */ +#define HAVE_WORKING_O_NOATIME 0 + +/* Define to 1 if O_NOFOLLOW works. */ +#define HAVE_WORKING_O_NOFOLLOW 0 + +/* Define to 1 if the system has the type `_Bool'. */ +#define HAVE__BOOL 1 + +/* Define to 1 if you have the '_set_invalid_parameter_handler' function. */ +#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* Define to a symbolic name denoting the flavor of iconv_open() + implementation. */ +/* #undef ICONV_FLAVOR */ + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ +#define MALLOC_0_IS_NONNULL 1 + +/* Use GNU style printf and scanf. */ +#ifndef __USE_MINGW_ANSI_STDIO +# define __USE_MINGW_ANSI_STDIO 1 +#endif + + +/* Name of package */ +#define PACKAGE "libidn2" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "help-libidn@gnu.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libidn2" + +/* String identifying the packager of this software */ +/* #undef PACKAGE_PACKAGER */ + +/* Packager info for bug reports (URL/e-mail/...) */ +/* #undef PACKAGE_PACKAGER_BUG_REPORTS */ + +/* Packager-specific version information */ +/* #undef PACKAGE_PACKAGER_VERSION */ + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libidn2 2.0.4" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libidn2" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://www.gnu.org/software/libidn/#libidn2" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.0.4" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'ptrdiff_t'. */ +/* #undef PTRDIFF_T_SUFFIX */ + +/* Define to 1 if strerror(0) does not return a message implying success. */ +/* #undef REPLACE_STRERROR_0 */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'sig_atomic_t'. */ +/* #undef SIG_ATOMIC_T_SUFFIX */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'size_t'. */ +/* #undef SIZE_T_SUFFIX */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if strerror_r returns char *. */ +/* #undef STRERROR_R_CHAR_P */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.0.4" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wchar_t'. */ +/* #undef WCHAR_T_SUFFIX */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wint_t'. */ +/* #undef WINT_T_SUFFIX */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ +/* #undef _NETBSD_SOURCE */ + +/* The _Noreturn keyword of C11. */ +#if ! (defined _Noreturn \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for 'stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* For standard stat data types on VMS. */ +#define _USE_STD_STAT 1 + +/* Define to 1 if the system predates C++11. */ +/* #undef __STDC_CONSTANT_MACROS */ + +/* Define to 1 if the system predates C++11. */ +/* #undef __STDC_LIMIT_MACROS */ + +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions. This bug is known to occur on: + + OS X 10.8 and earlier; see: + http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log + + FreeBSD; see: + http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined __header_inline \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG +#endif +#if ((__GNUC__ \ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE static _GL_UNUSED +# define _GL_EXTERN_INLINE static _GL_UNUSED +#endif + +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif + +/* A replacement for va_copy, if needed. */ +#define gl_va_copy(a,b) ((a) = (b)) + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. + __APPLE__ && __MACH__ test for Mac OS X. + __APPLE_CC__ tests for the Apple compiler and its version. + __STDC_VERSION__ tests for the C99 mode. */ +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ +# define __GNUC_STDC_INLINE__ 1 +#endif + +/* Define to `int' if does not define. */ +/* #undef mode_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#define restrict __restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define as a signed type of the same size as size_t. */ +#define ssize_t intptr_t + +/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ +#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED __attribute__ ((__unused__)) +#else +# define _GL_UNUSED +#endif +/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name + is a misnomer outside of parameter lists. */ +#define _UNUSED_PARAMETER_ _GL_UNUSED + +/* gcc supports the "unused" attribute on possibly unused labels, and + g++ has since version 4.5. Note to support C++ as well as C, + _GL_UNUSED_LABEL should be used with a trailing ; */ +#if !defined __cplusplus || __GNUC__ > 4 \ + || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +# define _GL_UNUSED_LABEL _GL_UNUSED +#else +# define _GL_UNUSED_LABEL +#endif + +/* The __pure__ attribute was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* The __const__ attribute was added in gcc 2.95. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +#else +# define _GL_ATTRIBUTE_CONST /* empty */ +#endif + + +/* Define as a macro for copying va_list variables. */ +/* #undef va_copy */ diff --git a/ports/libidn2/portfile.cmake b/ports/libidn2/portfile.cmake new file mode 100644 index 000000000..41d79e3b1 --- /dev/null +++ b/ports/libidn2/portfile.cmake @@ -0,0 +1,56 @@ +include(vcpkg_common_functions) + +set(IDN2_VERSION 2.0.4) +set(IDN2_FILENAME libidn2-${IDN2_VERSION}.tar.gz) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libidn2-${IDN2_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnu.org/gnu/libidn/${IDN2_FILENAME}" + FILENAME "${IDN2_FILENAME}" + SHA512 1e51bd4b8f8907531576291f1c2a8865d17429b4105418b4c98754eb982cd1cbb3adbeab4ec0c1c561d2dba11d876c7c09e5dc5b315c55a2c24986d7a2a3b4d2 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/string.h DESTINATION ${SOURCE_PATH}/gl) + +function(simple_copy_template_header FILE_PATH BASE_NAME) + if(NOT EXISTS ${FILE_PATH}/${BASE_NAME}.h) + if(EXISTS ${FILE_PATH}/${BASE_NAME}.in.h) + configure_file(${FILE_PATH}/${BASE_NAME}.in.h ${FILE_PATH}/${BASE_NAME}.h) + endif() + endif() +endfunction() + +# There seems to be no difference between source and destination files after 'configure' +# apart from auto-generated notification at the top. So why not just do a simple copy. +simple_copy_template_header(${SOURCE_PATH}/unistring uniconv) +simple_copy_template_header(${SOURCE_PATH}/unistring unictype) +simple_copy_template_header(${SOURCE_PATH}/unistring uninorm) +simple_copy_template_header(${SOURCE_PATH}/unistring unistr) +simple_copy_template_header(${SOURCE_PATH}/unistring unitypes) +simple_copy_template_header(${SOURCE_PATH}/unistring alloca) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(IDN2_BUILD_SHARED_LIBS ON) +else() + set(IDN2_BUILD_SHARED_LIBS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_SHARED_LIBS=${IDN2_BUILD_SHARED_LIBS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# License and man +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2 RENAME copyright) +file(INSTALL ${SOURCE_PATH}/doc/libidn2.pdf DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2) + +vcpkg_copy_pdbs() diff --git a/ports/libidn2/string.h b/ports/libidn2/string.h new file mode 100644 index 000000000..7ed5f5fdc --- /dev/null +++ b/ports/libidn2/string.h @@ -0,0 +1,10 @@ +#ifndef _GL_STRING_H +#define _GL_STRING_H + +char * strchrnul (const char *s, int c_in); +int strverscmp (const char *s1, const char *s2); +void * rawmemchr (const void *s, int c_in); + +#include <../ucrt/string.h> + +#endif /* _GL_STRING_H */ -- cgit v1.2.3 From dcfb9d45c13ba3adc22a47d62642f6acd2ee239b Mon Sep 17 00:00:00 2001 From: jasjuang Date: Thu, 12 Oct 2017 04:09:52 -0700 Subject: add NVCUDASAMPLES_ROOT to whitelist --- toolsrc/src/vcpkg_System.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp index 3b4c440d8..5293638e3 100644 --- a/toolsrc/src/vcpkg_System.cpp +++ b/toolsrc/src/vcpkg_System.cpp @@ -106,6 +106,8 @@ namespace vcpkg::System L"HTTPS_PROXY", // Enables find_package(CUDA) in CMake L"CUDA_PATH", + // Environmental variable generated automatically by CUDA after installation + L"NVCUDASAMPLES_ROOT", }; // Flush stdout before launching external process -- cgit v1.2.3 From d2c728e0bca834e9d30fe1d21c8921cdd4d188b8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 12 Oct 2017 07:52:48 -0700 Subject: [several ports] Remove CMake double expansions inside if() directives --- ports/antlr4/portfile.cmake | 4 ++-- ports/bond/portfile.cmake | 4 ++-- ports/freeimage/CMakeLists.txt | 6 +++--- ports/libnice/CMakeLists.txt | 2 +- ports/libtheora/CMakeLists.txt | 2 +- ports/msmpi/portfile.cmake | 10 +++++----- ports/shaderc/CMakeLists.txt | 2 +- ports/shaderc/CMakeLists_spirv.txt | 2 +- ports/zziplib/CMakeLists.txt | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ports/antlr4/portfile.cmake b/ports/antlr4/portfile.cmake index 78266b6eb..868efcdbe 100644 --- a/ports/antlr4/portfile.cmake +++ b/ports/antlr4/portfile.cmake @@ -24,7 +24,7 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/Fix-building-in-Visual-Studio-2017.patch ) -if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(DEBUG_CONFIG "Debug Static") set(RELEASE_CONFIG "Release Static") else() @@ -53,7 +53,7 @@ file(COPY ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${DEBUG_CONFIG file(COPY ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${RELEASE_CONFIG}/antlr4-runtime.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") vcpkg_apply_patches( SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include PATCHES ${CMAKE_CURRENT_LIST_DIR}/static.patch diff --git a/ports/bond/portfile.cmake b/ports/bond/portfile.cmake index f3664da8c..147ebeea8 100644 --- a/ports/bond/portfile.cmake +++ b/ports/bond/portfile.cmake @@ -1,4 +1,4 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") message(STATUS "Warning: Dynamic building not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) endif() @@ -23,7 +23,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_extract_source_archive(${GBC_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/tools/) set(FETCHED_GBC_PATH ${CURRENT_BUILDTREES_DIR}/tools/gbc-6.0.0-amd64.exe) -if (NOT EXISTS ${FETCHED_GBC_PATH}) +if (NOT EXISTS "${FETCHED_GBC_PATH}") message(FATAL_ERROR "Fetching GBC failed. Expected '${FETCHED_GBC_PATH}' to exists, but it doesn't.") endif() diff --git a/ports/freeimage/CMakeLists.txt b/ports/freeimage/CMakeLists.txt index f385f508c..9f4f1677b 100644 --- a/ports/freeimage/CMakeLists.txt +++ b/ports/freeimage/CMakeLists.txt @@ -72,7 +72,7 @@ set(SRCS ${DEPRECATION_SRCS} # define (to nothing instead of _declspec(dllimport) ) the DLL_API macro. # For this purpouse we include (depending on the BUILD_SHARED_LIBS ) # the appropriate FreeImageConfig.h . -if(${BUILD_SHARED_LIBS}) +if(BUILD_SHARED_LIBS) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-dynamic.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) else() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-static.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) @@ -81,7 +81,7 @@ list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) add_library(FreeImage ${SRCS} ${PRIVATE_HEADERS} ${PUBLIC_HEADERS}) -if(${BUILD_SHARED_LIBS}) +if(BUILD_SHARED_LIBS) target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_EXPORTS) else() target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_LIB) @@ -119,7 +119,7 @@ add_library(FreeImagePlus ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.rc) -if(${BUILD_SHARED_LIBS}) +if(BUILD_SHARED_LIBS) target_compile_definitions(FreeImagePlus PRIVATE -DFIP_EXPORTS) else() target_compile_definitions(FreeImagePlus PRIVATE -DFREEIMAGE_LIB) diff --git a/ports/libnice/CMakeLists.txt b/ports/libnice/CMakeLists.txt index c631d3317..7454a0046 100644 --- a/ports/libnice/CMakeLists.txt +++ b/ports/libnice/CMakeLists.txt @@ -119,7 +119,7 @@ RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) -if (${CMAKE_BUILD_TYPE} STREQUAL "Release") +if (CMAKE_BUILD_TYPE STREQUAL "Release") install(FILES agent/address.h DESTINATION include/nice) install(FILES agent/agent.h DESTINATION include/nice) install(FILES agent/candidate.h DESTINATION include/nice) diff --git a/ports/libtheora/CMakeLists.txt b/ports/libtheora/CMakeLists.txt index 24ecbccf4..cf8799e5d 100644 --- a/ports/libtheora/CMakeLists.txt +++ b/ports/libtheora/CMakeLists.txt @@ -66,7 +66,7 @@ if(USE_X86) add_definitions(-DOC_X86_ASM) endif() -if (${BUILD_SHARED_LIBS}) +if (BUILD_SHARED_LIBS) add_definitions(-DLIBTHEORA_EXPORTS) endif() diff --git a/ports/msmpi/portfile.cmake b/ports/msmpi/portfile.cmake index ca841313e..893e6f124 100644 --- a/ports/msmpi/portfile.cmake +++ b/ports/msmpi/portfile.cmake @@ -22,7 +22,7 @@ vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS) set(SYSTEM_MPIEXEC_FILEPATH "${PROGRAM_FILES_PLATFORM_BITNESS}/Microsoft MPI/Bin/mpiexec.exe") set(MSMPI_EXPECTED_FULL_VERSION "8.1.12438.1084") -if(EXISTS ${SYSTEM_MPIEXEC_FILEPATH}) +if(EXISTS "${SYSTEM_MPIEXEC_FILEPATH}") set(MPIEXEC_VERSION_LOGNAME "mpiexec-version") vcpkg_execute_required_process( COMMAND ${SYSTEM_MPIEXEC_FILEPATH} @@ -31,8 +31,8 @@ if(EXISTS ${SYSTEM_MPIEXEC_FILEPATH}) ) file(READ ${CURRENT_BUILDTREES_DIR}/${MPIEXEC_VERSION_LOGNAME}-out.log MPIEXEC_OUTPUT) - if(${MPIEXEC_OUTPUT} MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)\\]") - if(NOT ${CMAKE_MATCH_1} STREQUAL ${MSMPI_EXPECTED_FULL_VERSION}) + if(MPIEXEC_OUTPUT MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)\\]") + if(NOT CMAKE_MATCH_1 STREQUAL MSMPI_EXPECTED_FULL_VERSION) download_msmpi_redistributable_package() message(FATAL_ERROR @@ -102,7 +102,7 @@ file(INSTALL DESTINATION ${CURRENT_PACKAGES_DIR}/lib ) -if(${TRIPLET_SYSTEM_ARCH} STREQUAL "x86") +if(TRIPLET_SYSTEM_ARCH STREQUAL "x86") file(INSTALL "${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifes.lib" "${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifms.lib" @@ -121,7 +121,7 @@ file(INSTALL DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) -if(${TRIPLET_SYSTEM_ARCH} STREQUAL "x86") +if(TRIPLET_SYSTEM_ARCH STREQUAL "x86") file(INSTALL "${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifes.lib" "${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifms.lib" diff --git a/ports/shaderc/CMakeLists.txt b/ports/shaderc/CMakeLists.txt index f4e0830c6..580ffa1d1 100644 --- a/ports/shaderc/CMakeLists.txt +++ b/ports/shaderc/CMakeLists.txt @@ -1,5 +1,5 @@ option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D}) -if(NOT ${SUFFIX_D}) +if(NOT SUFFIX_D) find_library(GLSLANG glslang) find_library(OSDEPENDENT OSDependent) find_library(OGLCOMPILER OGLCompiler) diff --git a/ports/shaderc/CMakeLists_spirv.txt b/ports/shaderc/CMakeLists_spirv.txt index 6aa738b1f..618177fa6 100644 --- a/ports/shaderc/CMakeLists_spirv.txt +++ b/ports/shaderc/CMakeLists_spirv.txt @@ -1,5 +1,5 @@ option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D}) -if(NOT ${SUFFIX_D}) +if(NOT SUFFIX_D) find_library(SPIRVTOOLSOPT spirv-tools-opt) find_library(SPIRVTOOLS spirv-tools) ELSE() diff --git a/ports/zziplib/CMakeLists.txt b/ports/zziplib/CMakeLists.txt index 7f46079e9..c99bc0ddd 100644 --- a/ports/zziplib/CMakeLists.txt +++ b/ports/zziplib/CMakeLists.txt @@ -55,7 +55,7 @@ set(SRCS zzip/dir.c add_library(zziplib ${SRCS} ${HEADERS}) -if(${BUILD_SHARED_LIBS}) +if(BUILD_SHARED_LIBS) target_compile_definitions(zziplib PRIVATE -DZZIPLIB_EXPORTS) endif() -- cgit v1.2.3 From 5c66f301b9d7aa27a11059cee970e579f039c66c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 12 Oct 2017 08:22:50 -0700 Subject: [vcpkg-scripts] Remove double expansions --- scripts/cmake/vcpkg_acquire_depot_tools.cmake | 2 +- scripts/cmake/vcpkg_download_distfile.cmake | 2 +- scripts/cmake/vcpkg_find_acquire_program.cmake | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/cmake/vcpkg_acquire_depot_tools.cmake b/scripts/cmake/vcpkg_acquire_depot_tools.cmake index 1cc375725..009ba40f1 100644 --- a/scripts/cmake/vcpkg_acquire_depot_tools.cmake +++ b/scripts/cmake/vcpkg_acquire_depot_tools.cmake @@ -26,7 +26,7 @@ function(vcpkg_acquire_depot_tools PATH_TO_ROOT_OUT) set(download_success 1) endif() - if (NOT ${download_success}) + if (NOT download_success) message(FATAL_ERROR "\n" " Failed to download file.\n" diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 006570195..b8acfc823 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -78,7 +78,7 @@ function(vcpkg_download_distfile VAR) endif() endforeach(url) - if (NOT ${download_success}) + if (NOT download_success) message(FATAL_ERROR "\n" " Failed to download file.\n" diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 3c6dfae08..8d167e1c2 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -34,7 +34,8 @@ ## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) ## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) function(vcpkg_find_acquire_program VAR) - if(${VAR} AND NOT ${VAR} MATCHES "-NOTFOUND") + set(EXPANDED_VAR ${${VAR}}) + if(EXPANDED_VAR) return() endif() @@ -153,7 +154,8 @@ function(vcpkg_find_acquire_program VAR) macro(do_find) if(NOT DEFINED REQUIRED_INTERPRETER) - find_program(${VAR} ${PROGNAME} PATHS ${PATHS}) + find_program(FOUND_PROG ${PROGNAME} PATHS ${PATHS}) + set(${VAR} ${FOUND_PROG}) else() vcpkg_find_acquire_program(${REQUIRED_INTERPRETER}) find_file(SCRIPT ${SCRIPTNAME} PATHS ${PATHS}) @@ -162,7 +164,8 @@ function(vcpkg_find_acquire_program VAR) endmacro() do_find() - if(${VAR} MATCHES "-NOTFOUND") + set(FOUND_PROG ${${VAR}}) + if(FOUND_PROG MATCHES "-NOTFOUND") file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE} EXPECTED_HASH SHA512=${HASH} SHOW_PROGRESS @@ -173,7 +176,7 @@ function(vcpkg_find_acquire_program VAR) else() get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT) string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) - if(${ARCHIVE_EXTENSION} STREQUAL ".msi") + if(ARCHIVE_EXTENSION STREQUAL ".msi") file(TO_NATIVE_PATH "${DOWNLOADS}/${ARCHIVE}" ARCHIVE_NATIVE_PATH) file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}" DESTINATION_NATIVE_PATH) execute_process( -- cgit v1.2.3 From bc141aa2c7e9e9adb81c16353d6de7e44c6136a1 Mon Sep 17 00:00:00 2001 From: LazyHamster Date: Thu, 12 Oct 2017 20:06:28 +0300 Subject: [libidn2] Remove redundant cmake option. --- ports/libidn2/portfile.cmake | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ports/libidn2/portfile.cmake b/ports/libidn2/portfile.cmake index 41d79e3b1..bbe8f7bbe 100644 --- a/ports/libidn2/portfile.cmake +++ b/ports/libidn2/portfile.cmake @@ -33,16 +33,8 @@ simple_copy_template_header(${SOURCE_PATH}/unistring unistr) simple_copy_template_header(${SOURCE_PATH}/unistring unitypes) simple_copy_template_header(${SOURCE_PATH}/unistring alloca) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(IDN2_BUILD_SHARED_LIBS ON) -else() - set(IDN2_BUILD_SHARED_LIBS OFF) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_SHARED_LIBS=${IDN2_BUILD_SHARED_LIBS} ) vcpkg_install_cmake() -- cgit v1.2.3 From ae0b277ae3162a99852df9c8ac016394cb506257 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 12 Oct 2017 10:18:29 -0700 Subject: [celero] Update to use vcpkg_from_github and Ninja --- ports/celero/CONTROL | 2 +- ports/celero/portfile.cmake | 45 ++++++++++++++++++--------------------------- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/ports/celero/CONTROL b/ports/celero/CONTROL index 852e9b4f9..d40c93783 100644 --- a/ports/celero/CONTROL +++ b/ports/celero/CONTROL @@ -1,3 +1,3 @@ Source: celero -Version: 2.1.0 +Version: 2.1.0-1 Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++. diff --git a/ports/celero/portfile.cmake b/ports/celero/portfile.cmake index ef66131e7..c942ca5d8 100644 --- a/ports/celero/portfile.cmake +++ b/ports/celero/portfile.cmake @@ -1,35 +1,26 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Celero-master) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/DigitalInBlue/Celero/archive/master.zip" - FILENAME "celero-v2.1.0.zip" - SHA512 d3971b102bd1785cf21712bcf2e39193e47d5faaa39421cb1cc788340bb67aed4c32343d3b45042813fcf503d48068bc2a2d26808e2e12d8515e29c60ef40c5c -) -vcpkg_extract_source_archive(${ARCHIVE}) -# Disable building of the examples -set(CELERO_ENABLE_EXPERIMENTS OFF) -set(CELERO_ENABLE_TESTS OFF) -set(CELERO_RUN_EXAMPLE_ON_BUILD OFF) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(STATUS "Celero currently can only be built statically") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DigitalInBlue/Celero + REF v2.1.0 + SHA512 30563567255b09a2c810d97896839589ed99d45b6c8d075fd16d1a0068457d70195a199f5c982c84784c2e03284c1eaac565253fa72b81d9e2d4102721b80221 + HEAD_REF master +) 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 + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DCELERO_ENABLE_EXPERIMENTS=OFF + -DCELERO_ENABLE_TESTS=OFF + -DCELERO_RUN_EXAMPLE_ON_BUILD=OFF ) vcpkg_install_cmake() -- cgit v1.2.3 From 57b37aac65eb863e485c8f36a4b4eb95487799b4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 12 Oct 2017 10:37:14 -0700 Subject: [openni2] Use separate copy of sources to enable building multiple triplets. Use vcpkg_from_github. --- ports/openni2/CONTROL | 2 +- ports/openni2/portfile.cmake | 38 +++++------ .../openni2/replace_environment_variable.patch.in | 76 ---------------------- 3 files changed, 18 insertions(+), 98 deletions(-) delete mode 100644 ports/openni2/replace_environment_variable.patch.in diff --git a/ports/openni2/CONTROL b/ports/openni2/CONTROL index bf012ff8e..b1d60d860 100644 --- a/ports/openni2/CONTROL +++ b/ports/openni2/CONTROL @@ -1,4 +1,4 @@ Source: openni2 -Version: 2.2.0.33-3 +Version: 2.2.0.33-4 Build-Depends: kinectsdk1 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 2e91bac3f..cc428ddb7 100644 --- a/ports/openni2/portfile.cmake +++ b/ports/openni2/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) -# - # UWP Not Support if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "Error: UWP builds are currently not supported.") @@ -28,16 +16,13 @@ endif() # Download Source Code include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/OpenNI2-2.2-beta2) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/OpenNI/OpenNI2/archive/2.2-beta2.zip" - FILENAME "OpenNI2-2.2-beta.zip" - SHA512 9779161493114265745c9eb8b15db95a3ed2322cd75504931d0fb7b6214d7abc8a9eb2ea5f35e309bc4d2748f015eee27ada4974a2e9568b5ecb9d98099c84e9 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenNI/OpenNI2 + REF 2.2-beta2 + SHA512 60a3a3043679f3069aea869e92dc5881328ce4393d4140ea8d089027321ac501ae27d283657214e2834d216d0d49bf4f29a4b3d3e43df27a6ed21f889cd0083f + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) - -file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR) -configure_file("${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch.in" "${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch" @ONLY) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} @@ -46,6 +31,17 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch" ) +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +file(COPY ${SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +get_filename_component(SOURCE_DIR_NAME "${SOURCE_PATH}" NAME) + +# Use fresh copy of sources for building and modification +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${SOURCE_DIR_NAME}") + +file(TO_NATIVE_PATH ${CURRENT_INSTALLED_DIR} NATIVE_INSTALLED_DIR) +configure_file("${SOURCE_PATH}/Source/Drivers/Kinect/Kinect.vcxproj" "${SOURCE_PATH}/Source/Drivers/Kinect/Kinect.vcxproj" @ONLY) + # Build OpenNI2 vcpkg_build_msbuild( PROJECT_PATH "${SOURCE_PATH}/OpenNI.sln" diff --git a/ports/openni2/replace_environment_variable.patch.in b/ports/openni2/replace_environment_variable.patch.in deleted file mode 100644 index 31e7cb951..000000000 --- a/ports/openni2/replace_environment_variable.patch.in +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj -index 08a49fe..7fd8620 100644 ---- a/Source/Drivers/Kinect/Kinect.vcxproj -+++ b/Source/Drivers/Kinect/Kinect.vcxproj -@@ -101,7 +101,7 @@ - - Level3 - Disabled -- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\include - _WINDLL;%(PreprocessorDefinitions);_WINDOWS - false - false -@@ -109,7 +109,7 @@ - - true - Kinect10.lib;XnLib.lib;%(AdditionalDependencies) -- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\debug\lib - true - - -@@ -117,7 +117,7 @@ - - Level3 - Disabled -- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\include - _WINDLL;%(PreprocessorDefinitions);_WINDOWS - false - false -@@ -125,7 +125,7 @@ - - true - Kinect10.lib;XnLib.lib;%(AdditionalDependencies) -- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\debug\lib - - - -@@ -139,7 +139,7 @@ - MaxSpeed - true - true -- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\include - false - - -@@ -147,7 +147,7 @@ - true - true - Kinect10.lib;XnLib.lib;%(AdditionalDependencies) -- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\lib - true - - -@@ -157,7 +157,7 @@ - MaxSpeed - true - true -- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; -+ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\include - false - - -@@ -165,7 +165,7 @@ - true - true - Kinect10.lib;XnLib.lib;%(AdditionalDependencies) -- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; -+ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_@TARGET_TRIPLET@\lib - true - - -- cgit v1.2.3 From 9ddc98988fb8d7c886963fa7568395ecd5785eaa Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 12 Oct 2017 10:52:00 -0700 Subject: [vcpkg-scripts] Detect and prompt for proxy in more cases --- scripts/bootstrap.ps1 | 4 ---- scripts/fetchDependency.ps1 | 20 +++++++++++--------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index fa51de404..b7bc5afab 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -4,10 +4,6 @@ param( [string]$disableMetrics = "0" ) -$webclient=New-Object System.Net.WebClient -$creds=Get-Credential -$webclient.Proxy.Credentials=$creds - $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index b6144d581..2ee87bcff 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -82,17 +82,19 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) New-Item -ItemType directory -Path $downloadDir | Out-Null } + $WC = New-Object System.Net.WebClient + $ProxyAuth = !$WC.Proxy.IsBypassed($url) + if ($ProxyAuth) + { + $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred) + $WC.Proxy.Credentials=$ProxyCred + } + if (($PSVersionTable.PSEdition -ne "Core") -and ($Dependency -ne "git")) # git fails with BITS { try { - $WC = New-Object System.Net.WebClient - $ProxyAuth = !$WC.Proxy.IsBypassed($url) - If($ProxyAuth){ - $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred) - } - Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop } catch [System.Exception] { @@ -106,7 +108,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if (!(Test-Path $downloadPath)) { Write-Verbose("Downloading $Dependency...") - (New-Object System.Net.WebClient).DownloadFile($url, $downloadPath) + $WC.DownloadFile($url, $downloadPath) } } -- cgit v1.2.3 From 0179bc051ea1c5d60547b283e8e8c60472b1d2e7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 12 Oct 2017 10:52:55 -0700 Subject: [openni2] Fixup forgot to commit renamed patch file. --- ports/openni2/replace_environment_variable.patch | 76 ++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 ports/openni2/replace_environment_variable.patch diff --git a/ports/openni2/replace_environment_variable.patch b/ports/openni2/replace_environment_variable.patch new file mode 100644 index 000000000..48978e869 --- /dev/null +++ b/ports/openni2/replace_environment_variable.patch @@ -0,0 +1,76 @@ +diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj +index 08a49fe..7fd8620 100644 +--- a/Source/Drivers/Kinect/Kinect.vcxproj ++++ b/Source/Drivers/Kinect/Kinect.vcxproj +@@ -101,7 +101,7 @@ + + Level3 + Disabled +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include + _WINDLL;%(PreprocessorDefinitions);_WINDOWS + false + false +@@ -109,7 +109,7 @@ + + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\debug\lib + true + + +@@ -117,7 +117,7 @@ + + Level3 + Disabled +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include + _WINDLL;%(PreprocessorDefinitions);_WINDOWS + false + false +@@ -125,7 +125,7 @@ + + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\debug\lib + + + +@@ -139,7 +139,7 @@ + MaxSpeed + true + true +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include + false + + +@@ -147,7 +147,7 @@ + true + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\lib + true + + +@@ -157,7 +157,7 @@ + MaxSpeed + true + true +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include + false + + +@@ -165,7 +165,7 @@ + true + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\lib + true + + -- cgit v1.2.3 From 3efcc3d377750b753d516fd21b9009bfcd6e3877 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 12 Oct 2017 11:45:08 -0700 Subject: Fix #1963 (permissive- issue) --- toolsrc/include/VcpkgPaths.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h index d4640fba2..a38865a3f 100644 --- a/toolsrc/include/VcpkgPaths.h +++ b/toolsrc/include/VcpkgPaths.h @@ -67,8 +67,8 @@ namespace vcpkg /// /// Valid version strings are "v140", "v141", and "". Empty string gets the latest. /// - const Toolset& VcpkgPaths::get_toolset(const Optional& toolset_version, - const Optional& visual_studio_path) const; + const Toolset& get_toolset(const Optional& toolset_version, + const Optional& visual_studio_path) const; Files::Filesystem& get_filesystem() const; -- cgit v1.2.3 From 53ad1402514481c581a7b3bd1b0ffbcea9aaa902 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 12 Oct 2017 11:54:47 -0700 Subject: [vcpkg-scripts] Hotpatch revert changes to vcpkg_find_acquire_program.cmake. --- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 8d167e1c2..51e394bf1 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -154,8 +154,7 @@ function(vcpkg_find_acquire_program VAR) macro(do_find) if(NOT DEFINED REQUIRED_INTERPRETER) - find_program(FOUND_PROG ${PROGNAME} PATHS ${PATHS}) - set(${VAR} ${FOUND_PROG}) + find_program(${VAR} ${PROGNAME} PATHS ${PATHS}) else() vcpkg_find_acquire_program(${REQUIRED_INTERPRETER}) find_file(SCRIPT ${SCRIPTNAME} PATHS ${PATHS}) @@ -164,8 +163,7 @@ function(vcpkg_find_acquire_program VAR) endmacro() do_find() - set(FOUND_PROG ${${VAR}}) - if(FOUND_PROG MATCHES "-NOTFOUND") + if("${${VAR}}" MATCHES "-NOTFOUND") file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE} EXPECTED_HASH SHA512=${HASH} SHOW_PROGRESS @@ -194,5 +192,5 @@ function(vcpkg_find_acquire_program VAR) do_find() endif() - set(${VAR} ${${VAR}} PARENT_SCOPE) + set(${VAR} "${${VAR}}" PARENT_SCOPE) endfunction() -- cgit v1.2.3 From 9e19c24d2911ff1ef648aeed0c596e3987eafebf Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 12 Oct 2017 14:03:01 -0700 Subject: `vcpkg autocomplete` More work on autocomplete --- toolsrc/src/commands_autocomplete.cpp | 83 +++++++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 22 deletions(-) diff --git a/toolsrc/src/commands_autocomplete.cpp b/toolsrc/src/commands_autocomplete.cpp index 3963f904b..abad19df7 100644 --- a/toolsrc/src/commands_autocomplete.cpp +++ b/toolsrc/src/commands_autocomplete.cpp @@ -1,9 +1,8 @@ #include "pch.h" #include "Paragraphs.h" -#include "SortedVector.h" +#include "metrics.h" #include "vcpkg_Commands.h" -#include "vcpkg_Maps.h" #include "vcpkg_System.h" #include "vcpkglib.h" @@ -35,7 +34,7 @@ namespace vcpkg::Commands::Autocomplete for (const auto& installed_package : installed_packages) { - auto sp = installed_package->package.displayname(); + const auto sp = installed_package->package.displayname(); if (istartswith(sp, start_with)) { @@ -47,33 +46,73 @@ namespace vcpkg::Commands::Autocomplete void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = - Strings::format("The argument should be a command line to autocomplete.\n%s", - Commands::Help::create_example_string("autocomplete install z")); + Metrics::g_metrics.lock()->set_send_metrics(false); - args.check_min_arg_count(1, EXAMPLE); - args.check_max_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + if (args.command_arguments.size() != 1) + { + Checks::exit_success(VCPKG_LINE_INFO); + } - const std::string requested_command = args.command_arguments.at(0); - const std::string start_with = - args.command_arguments.size() > 1 ? args.command_arguments.at(1) : Strings::EMPTY; - std::vector results; - if (requested_command == "install") + const std::string to_autocomplete = args.command_arguments.at(0); + const std::vector tokens = Strings::split(to_autocomplete, " "); + if (tokens.size() == 1) { - auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); - auto& source_paragraphs = sources_and_errors.paragraphs; + const std::string requested_command = tokens[0]; + + std::vector valid_commands = {"install", + "search", + "remove", + "list", + "update", + "hash", + "help", + "integrate", + "export", + "edit", + "create", + "owns", + "cache", + "version", + "contact"}; + + Util::unstable_keep_if(valid_commands, [&](const std::string& s) { + return Strings::case_insensitive_ascii_starts_with(s, requested_command); + }); - results = autocomplete_install(source_paragraphs, start_with); + if (valid_commands.size() == 1) + { + System::println(valid_commands[0] + " "); + } + else + { + System::println(Strings::join("\n", valid_commands)); + } + + Checks::exit_success(VCPKG_LINE_INFO); } - else if (requested_command == "remove") + + if (tokens.size() == 2) { - const StatusParagraphs status_db = database_load_check(paths); - std::vector installed_packages = get_installed_ports(status_db); - results = autocomplete_remove(installed_packages, start_with); + const std::string requested_command = tokens[0]; + const std::string start_with = tokens[1]; + std::vector results; + if (requested_command == "install") + { + auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); + auto& source_paragraphs = sources_and_errors.paragraphs; + + results = autocomplete_install(source_paragraphs, start_with); + } + else if (requested_command == "remove") + { + const StatusParagraphs status_db = database_load_check(paths); + const std::vector installed_packages = get_installed_ports(status_db); + results = autocomplete_remove(installed_packages, start_with); + } + + System::println(Strings::join("\n", results)); } - System::println(Strings::join(" ", results)); Checks::exit_success(VCPKG_LINE_INFO); } } -- cgit v1.2.3 From 37fba399ef5c57573a1218206cb2c55f5f6bc13c Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Fri, 13 Oct 2017 05:33:32 +0300 Subject: [vcpkg-export-ifw] Safe description QtIFW support rich text for component description, bu some port has not safe ampersand symbol in description text (for example 'openexr' package), that should be replaced to '&' symbol name --- toolsrc/src/commands_export_ifw.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/commands_export_ifw.cpp b/toolsrc/src/commands_export_ifw.cpp index 191dbb763..c001a93ed 100644 --- a/toolsrc/src/commands_export_ifw.cpp +++ b/toolsrc/src/commands_export_ifw.cpp @@ -26,6 +26,14 @@ namespace vcpkg::Commands::Export::IFW return date_time_as_string; } + std::string safe_rich_from_plain_text(const std::string& text) + { + // match standalone ampersand, no HTML number or name + std::regex standalone_ampersand(R"###(&(?!(#[0-9]+|\w+);))###"); + + return std::regex_replace(text, standalone_ampersand, "&"); + } + fs::path get_packages_dir_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) { return ifw_options.maybe_packages_dir_path.has_value() @@ -156,7 +164,7 @@ namespace vcpkg::Commands::Export::IFW )###", action.spec.name(), - binary_paragraph.description, + safe_rich_from_plain_text(binary_paragraph.description), binary_paragraph.version, create_release_date())); } -- cgit v1.2.3 From f6a0d78c82789af482eb3c885cbbb73aba7dfb38 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 13 Oct 2017 14:54:31 -0700 Subject: `autocomplete` Rework command, fixing a lot of corner cases in the process --- toolsrc/include/vcpkg_Commands.h | 8 ++--- toolsrc/src/commands_autocomplete.cpp | 66 ++++++++++++++++------------------- 2 files changed, 34 insertions(+), 40 deletions(-) diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 7cfa2760e..c9a33a8f4 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -194,10 +194,10 @@ namespace vcpkg::Commands void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } - namespace Autocomplete - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } + namespace Autocomplete + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } namespace Help { diff --git a/toolsrc/src/commands_autocomplete.cpp b/toolsrc/src/commands_autocomplete.cpp index abad19df7..478a3c478 100644 --- a/toolsrc/src/commands_autocomplete.cpp +++ b/toolsrc/src/commands_autocomplete.cpp @@ -5,6 +5,7 @@ #include "vcpkg_Commands.h" #include "vcpkg_System.h" #include "vcpkglib.h" +#include namespace vcpkg::Commands::Autocomplete { @@ -44,20 +45,26 @@ namespace vcpkg::Commands::Autocomplete return results; } + [[noreturn]] static void output_sorted_results_and_exit(const LineInfo& line_info, + std::vector&& results) + { + const SortedVector sorted_results(results); + System::println(Strings::join("\n", sorted_results)); + Checks::exit_success(line_info); + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { Metrics::g_metrics.lock()->set_send_metrics(false); + const std::string to_autocomplete = Strings::join(" ", args.command_arguments); + const std::vector tokens = Strings::split(to_autocomplete, " "); - if (args.command_arguments.size() != 1) - { - Checks::exit_success(VCPKG_LINE_INFO); - } + std::smatch match; - const std::string to_autocomplete = args.command_arguments.at(0); - const std::vector tokens = Strings::split(to_autocomplete, " "); - if (tokens.size() == 1) + // Handles vcpkg + if (std::regex_match(to_autocomplete, match, std::regex{R"###(^(\S*)$)###"})) { - const std::string requested_command = tokens[0]; + const std::string requested_command = match[1].str(); std::vector valid_commands = {"install", "search", @@ -79,38 +86,25 @@ namespace vcpkg::Commands::Autocomplete return Strings::case_insensitive_ascii_starts_with(s, requested_command); }); - if (valid_commands.size() == 1) - { - System::println(valid_commands[0] + " "); - } - else - { - System::println(Strings::join("\n", valid_commands)); - } - - Checks::exit_success(VCPKG_LINE_INFO); + output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(valid_commands)); } - if (tokens.size() == 2) + // Handles vcpkg install + if (std::regex_match(to_autocomplete, match, std::regex{R"###(^install.* (\S*)$)###"})) { - const std::string requested_command = tokens[0]; - const std::string start_with = tokens[1]; - std::vector results; - if (requested_command == "install") - { - auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); - auto& source_paragraphs = sources_and_errors.paragraphs; - - results = autocomplete_install(source_paragraphs, start_with); - } - else if (requested_command == "remove") - { - const StatusParagraphs status_db = database_load_check(paths); - const std::vector installed_packages = get_installed_ports(status_db); - results = autocomplete_remove(installed_packages, start_with); - } + const std::string start_with = match[1].str(); + auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); + auto& source_paragraphs = sources_and_errors.paragraphs; + output_sorted_results_and_exit(VCPKG_LINE_INFO, autocomplete_install(source_paragraphs, start_with)); + } - System::println(Strings::join("\n", results)); + // Handles vcpkg remove + if (std::regex_match(to_autocomplete, match, std::regex{R"###(^remove.* (\S*)$)###"})) + { + const std::string start_with = match[1].str(); + const StatusParagraphs status_db = database_load_check(paths); + const std::vector installed_packages = get_installed_ports(status_db); + output_sorted_results_and_exit(VCPKG_LINE_INFO, autocomplete_remove(installed_packages, start_with)); } Checks::exit_success(VCPKG_LINE_INFO); -- cgit v1.2.3 From d46a992b3cbbbf3479ad3906aecd07e73174cd40 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 13 Oct 2017 15:17:11 -0700 Subject: Don't do function "aliasing" --- toolsrc/src/commands_autocomplete.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/commands_autocomplete.cpp b/toolsrc/src/commands_autocomplete.cpp index 478a3c478..6ded74f9b 100644 --- a/toolsrc/src/commands_autocomplete.cpp +++ b/toolsrc/src/commands_autocomplete.cpp @@ -13,13 +13,12 @@ namespace vcpkg::Commands::Autocomplete const std::vector>& source_paragraphs, const std::string& start_with) { std::vector results; - const auto& istartswith = Strings::case_insensitive_ascii_starts_with; for (const auto& source_control_file : source_paragraphs) { auto&& sp = *source_control_file->core_paragraph; - if (istartswith(sp.name, start_with)) + if (Strings::case_insensitive_ascii_starts_with(sp.name, start_with)) { results.push_back(sp.name); } @@ -31,13 +30,12 @@ namespace vcpkg::Commands::Autocomplete const std::string& start_with) { std::vector results; - const auto& istartswith = Strings::case_insensitive_ascii_starts_with; for (const auto& installed_package : installed_packages) { const auto sp = installed_package->package.displayname(); - if (istartswith(sp, start_with)) + if (Strings::case_insensitive_ascii_starts_with(sp, start_with)) { results.push_back(sp); } -- cgit v1.2.3 From 3dfffcd5fd913aeff9fd3a0e9b0efdf40b6ff49b Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 13 Oct 2017 15:55:20 -0700 Subject: fix ceres VS2017 compilation error --- ports/ceres/CONTROL | 2 +- ports/ceres/portfile.cmake | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL index 4dde8c0bd..300b106da 100644 --- a/ports/ceres/CONTROL +++ b/ports/ceres/CONTROL @@ -1,4 +1,4 @@ Source: ceres -Version: 1.13.0-1 +Version: 1.13.0-2 Build-Depends:suitesparse, eigen3, clapack, gflags, glog Description: non-linear optimization package diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index 2f9d9d6e9..49353205e 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -1,24 +1,9 @@ -# 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) -# - if(VCPKG_CRT_LINKAGE STREQUAL "static") message(FATAL_ERROR "Ceres does not currently support static CRT linkage") endif() include(vcpkg_common_functions) -set(VCPKG_PLATFORM_TOOLSET "v140") # Force VS2015 because VS2017 compiler return internal error -# eigen3\eigen\src\core\redux.h(237): fatal error C1001: An internal error has occurred in the compiler. [internal\ceres\ceres.vcxproj] - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ceres-solver/ceres-solver -- cgit v1.2.3 From e17de99599a2f114faab1bb4821fbaad4d266c95 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 13 Oct 2017 18:37:41 -0700 Subject: [vcpkg] Re-layout all files using new organization scheme. All filenames and directories are lowercase. Use dots for namespace separation. --- toolsrc/include/BinaryParagraph.h | 41 - toolsrc/include/CStringView.h | 96 --- toolsrc/include/LineInfo.h | 19 - toolsrc/include/MachineType.h | 36 - toolsrc/include/PackageSpec.h | 95 --- toolsrc/include/PackageSpecParseResult.h | 32 - toolsrc/include/ParagraphParseResult.h | 32 - toolsrc/include/Paragraphs.h | 38 - toolsrc/include/PostBuildLint.h | 12 - toolsrc/include/PostBuildLint_BuildType.h | 66 -- toolsrc/include/SortedVector.h | 50 -- toolsrc/include/SourceParagraph.h | 96 --- toolsrc/include/Span.h | 52 -- toolsrc/include/StatusParagraph.h | 44 -- toolsrc/include/StatusParagraphs.h | 46 -- toolsrc/include/VcpkgCmdArguments.h | 49 -- toolsrc/include/VcpkgPaths.h | 84 -- toolsrc/include/VersionT.h | 29 - toolsrc/include/coff_file_reader.h | 21 - toolsrc/include/filesystem_fs.h | 16 - toolsrc/include/lazy.h | 26 - toolsrc/include/metrics.h | 28 - toolsrc/include/pch.h | 8 +- toolsrc/include/triplet.h | 43 -- toolsrc/include/vcpkg/base/checks.h | 55 ++ toolsrc/include/vcpkg/base/chrono.h | 28 + toolsrc/include/vcpkg/base/cofffilereader.h | 23 + toolsrc/include/vcpkg/base/cstringview.h | 97 +++ toolsrc/include/vcpkg/base/enums.h | 12 + toolsrc/include/vcpkg/base/expected.h | 115 +++ toolsrc/include/vcpkg/base/files.h | 57 ++ toolsrc/include/vcpkg/base/graphs.h | 161 ++++ toolsrc/include/vcpkg/base/lazy.h | 26 + toolsrc/include/vcpkg/base/lineinfo.h | 19 + toolsrc/include/vcpkg/base/machinetype.h | 37 + toolsrc/include/vcpkg/base/optional.h | 99 +++ toolsrc/include/vcpkg/base/sortedvector.h | 50 ++ toolsrc/include/vcpkg/base/span.h | 60 ++ toolsrc/include/vcpkg/base/strings.h | 114 +++ toolsrc/include/vcpkg/base/system.h | 108 +++ toolsrc/include/vcpkg/base/util.h | 156 ++++ toolsrc/include/vcpkg/binaryparagraph.h | 42 + toolsrc/include/vcpkg/build.h | 205 +++++ toolsrc/include/vcpkg/commands.h | 134 ++++ toolsrc/include/vcpkg/dependencies.h | 149 ++++ toolsrc/include/vcpkg/export.h | 10 + toolsrc/include/vcpkg/export.ifw.h | 26 + toolsrc/include/vcpkg/globalstate.h | 19 + toolsrc/include/vcpkg/help.h | 19 + toolsrc/include/vcpkg/input.h | 15 + toolsrc/include/vcpkg/install.h | 69 ++ toolsrc/include/vcpkg/metrics.h | 28 + toolsrc/include/vcpkg/packagespec.h | 95 +++ toolsrc/include/vcpkg/packagespecparseresult.h | 33 + toolsrc/include/vcpkg/paragraphparseresult.h | 33 + toolsrc/include/vcpkg/paragraphs.h | 38 + toolsrc/include/vcpkg/parse.h | 38 + toolsrc/include/vcpkg/postbuildlint.buildtype.h | 68 ++ toolsrc/include/vcpkg/postbuildlint.h | 13 + toolsrc/include/vcpkg/remove.h | 24 + toolsrc/include/vcpkg/sourceparagraph.h | 97 +++ toolsrc/include/vcpkg/statusparagraph.h | 45 ++ toolsrc/include/vcpkg/statusparagraphs.h | 47 ++ toolsrc/include/vcpkg/triplet.h | 43 ++ toolsrc/include/vcpkg/update.h | 21 + toolsrc/include/vcpkg/vcpkgcmdarguments.h | 50 ++ toolsrc/include/vcpkg/vcpkglib.h | 38 + toolsrc/include/vcpkg/vcpkgpaths.h | 85 +++ toolsrc/include/vcpkg/versiont.h | 29 + toolsrc/include/vcpkg_Build.h | 192 ----- toolsrc/include/vcpkg_Checks.h | 54 -- toolsrc/include/vcpkg_Chrono.h | 28 - toolsrc/include/vcpkg_Commands.h | 258 ------- toolsrc/include/vcpkg_Commands_Export.h | 8 - toolsrc/include/vcpkg_Commands_Export_IFW.h | 25 - toolsrc/include/vcpkg_Dependencies.h | 147 ---- toolsrc/include/vcpkg_Enums.h | 10 - toolsrc/include/vcpkg_Files.h | 43 -- toolsrc/include/vcpkg_GlobalState.h | 19 - toolsrc/include/vcpkg_Graphs.h | 159 ---- toolsrc/include/vcpkg_Input.h | 14 - toolsrc/include/vcpkg_Maps.h | 30 - toolsrc/include/vcpkg_Parse.h | 38 - toolsrc/include/vcpkg_Strings.h | 113 --- toolsrc/include/vcpkg_System.h | 107 --- toolsrc/include/vcpkg_Util.h | 144 ---- toolsrc/include/vcpkg_expected.h | 114 --- toolsrc/include/vcpkg_optional.h | 98 --- toolsrc/include/vcpkglib.h | 38 - toolsrc/src/BinaryParagraph.cpp | 123 --- toolsrc/src/LineInfo.cpp | 9 - toolsrc/src/MachineType.cpp | 41 - toolsrc/src/PackageSpec.cpp | 175 ----- toolsrc/src/PackageSpecParseResult.cpp | 20 - toolsrc/src/ParagraphParseResult.cpp | 34 - toolsrc/src/Paragraphs.cpp | 304 -------- toolsrc/src/PostBuildLint.cpp | 846 --------------------- toolsrc/src/PostBuildLint_BuildType.cpp | 70 -- toolsrc/src/SourceParagraph.cpp | 262 ------- toolsrc/src/StatusParagraph.cpp | 86 --- toolsrc/src/StatusParagraphs.cpp | 90 --- toolsrc/src/VcpkgCmdArguments.cpp | 283 ------- toolsrc/src/VcpkgPaths.cpp | 519 ------------- toolsrc/src/VersionT.cpp | 19 - toolsrc/src/coff_file_reader.cpp | 308 -------- toolsrc/src/commands_autocomplete.cpp | 79 -- toolsrc/src/commands_available_commands.cpp | 50 -- toolsrc/src/commands_build.cpp | 102 --- toolsrc/src/commands_build_external.cpp | 21 - toolsrc/src/commands_cache.cpp | 68 -- toolsrc/src/commands_ci.cpp | 60 -- toolsrc/src/commands_contact.cpp | 22 - toolsrc/src/commands_create.cpp | 38 - toolsrc/src/commands_depends.cpp | 55 -- toolsrc/src/commands_edit.cpp | 86 --- toolsrc/src/commands_env.cpp | 21 - toolsrc/src/commands_export.cpp | 526 ------------- toolsrc/src/commands_export_ifw.cpp | 481 ------------ toolsrc/src/commands_hash.cpp | 55 -- toolsrc/src/commands_help.cpp | 131 ---- toolsrc/src/commands_import.cpp | 119 --- toolsrc/src/commands_install.cpp | 613 --------------- toolsrc/src/commands_integrate.cpp | 342 --------- toolsrc/src/commands_list.cpp | 74 -- toolsrc/src/commands_owns.cpp | 37 - toolsrc/src/commands_portsdiff.cpp | 181 ----- toolsrc/src/commands_remove.cpp | 249 ------ toolsrc/src/commands_search.cpp | 145 ---- toolsrc/src/commands_update.cpp | 73 -- toolsrc/src/commands_version.cpp | 67 -- toolsrc/src/metrics.cpp | 395 ---------- toolsrc/src/test_install_plan.cpp | 486 ------------ toolsrc/src/tests.arguments.cpp | 58 ++ toolsrc/src/tests.dependencies.cpp | 110 +++ toolsrc/src/tests.installplan.cpp | 487 ++++++++++++ toolsrc/src/tests.packagespec.cpp | 120 +++ toolsrc/src/tests.paragraph.cpp | 389 ++++++++++ toolsrc/src/tests_arguments.cpp | 58 -- toolsrc/src/tests_dependencies.cpp | 110 --- toolsrc/src/tests_package_spec.cpp | 119 --- toolsrc/src/tests_paragraph.cpp | 388 ---------- toolsrc/src/triplet.cpp | 55 -- toolsrc/src/vcpkg.cpp | 56 +- toolsrc/src/vcpkg/base/checks.cpp | 81 ++ toolsrc/src/vcpkg/base/chrono.cpp | 61 ++ toolsrc/src/vcpkg/base/cofffilereader.cpp | 308 ++++++++ toolsrc/src/vcpkg/base/enums.cpp | 14 + toolsrc/src/vcpkg/base/files.cpp | 208 +++++ toolsrc/src/vcpkg/base/lineinfo.cpp | 9 + toolsrc/src/vcpkg/base/machinetype.cpp | 41 + toolsrc/src/vcpkg/base/strings.cpp | 174 +++++ toolsrc/src/vcpkg/base/system.cpp | 350 +++++++++ toolsrc/src/vcpkg/binaryparagraph.cpp | 123 +++ toolsrc/src/vcpkg/build.cpp | 533 +++++++++++++ toolsrc/src/vcpkg/commands.autocomplete.cpp | 78 ++ toolsrc/src/vcpkg/commands.buildexternal.cpp | 23 + toolsrc/src/vcpkg/commands.cache.cpp | 69 ++ toolsrc/src/vcpkg/commands.ci.cpp | 62 ++ toolsrc/src/vcpkg/commands.contact.cpp | 22 + toolsrc/src/vcpkg/commands.cpp | 56 ++ toolsrc/src/vcpkg/commands.create.cpp | 39 + toolsrc/src/vcpkg/commands.dependinfo.cpp | 56 ++ toolsrc/src/vcpkg/commands.edit.cpp | 87 +++ toolsrc/src/vcpkg/commands.env.cpp | 22 + toolsrc/src/vcpkg/commands.exportifw.cpp | 482 ++++++++++++ toolsrc/src/vcpkg/commands.hash.cpp | 55 ++ toolsrc/src/vcpkg/commands.import.cpp | 120 +++ toolsrc/src/vcpkg/commands.integrate.cpp | 342 +++++++++ toolsrc/src/vcpkg/commands.list.cpp | 75 ++ toolsrc/src/vcpkg/commands.owns.cpp | 38 + toolsrc/src/vcpkg/commands.portsdiff.cpp | 182 +++++ toolsrc/src/vcpkg/commands.search.cpp | 146 ++++ toolsrc/src/vcpkg/commands.version.cpp | 67 ++ toolsrc/src/vcpkg/dependencies.cpp | 669 ++++++++++++++++ toolsrc/src/vcpkg/export.cpp | 528 +++++++++++++ toolsrc/src/vcpkg/globalstate.cpp | 13 + toolsrc/src/vcpkg/help.cpp | 131 ++++ toolsrc/src/vcpkg/input.cpp | 55 ++ toolsrc/src/vcpkg/install.cpp | 615 +++++++++++++++ toolsrc/src/vcpkg/metrics.cpp | 398 ++++++++++ toolsrc/src/vcpkg/packagespec.cpp | 175 +++++ toolsrc/src/vcpkg/packagespecparseresult.cpp | 21 + toolsrc/src/vcpkg/paragraphparseresult.cpp | 34 + toolsrc/src/vcpkg/paragraphs.cpp | 304 ++++++++ toolsrc/src/vcpkg/parse.cpp | 81 ++ toolsrc/src/vcpkg/postbuildlint.buildtype.cpp | 70 ++ toolsrc/src/vcpkg/postbuildlint.cpp | 846 +++++++++++++++++++++ toolsrc/src/vcpkg/remove.cpp | 251 ++++++ toolsrc/src/vcpkg/sourceparagraph.cpp | 264 +++++++ toolsrc/src/vcpkg/statusparagraph.cpp | 86 +++ toolsrc/src/vcpkg/statusparagraphs.cpp | 89 +++ toolsrc/src/vcpkg/triplet.cpp | 55 ++ toolsrc/src/vcpkg/update.cpp | 75 ++ toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 284 +++++++ toolsrc/src/vcpkg/vcpkglib.cpp | 247 ++++++ toolsrc/src/vcpkg/vcpkgpaths.cpp | 519 +++++++++++++ toolsrc/src/vcpkg/versiont.cpp | 19 + toolsrc/src/vcpkg_Build.cpp | 406 ---------- toolsrc/src/vcpkg_Build_BuildPolicy.cpp | 40 - toolsrc/src/vcpkg_Checks.cpp | 81 -- toolsrc/src/vcpkg_Chrono.cpp | 61 -- toolsrc/src/vcpkg_Dependencies.cpp | 669 ---------------- toolsrc/src/vcpkg_Enums.cpp | 14 - toolsrc/src/vcpkg_Files.cpp | 209 ----- toolsrc/src/vcpkg_GlobalState.cpp | 13 - toolsrc/src/vcpkg_Input.cpp | 54 -- toolsrc/src/vcpkg_Parse.cpp | 80 -- toolsrc/src/vcpkg_Strings.cpp | 174 ----- toolsrc/src/vcpkg_System.cpp | 349 --------- toolsrc/src/vcpkg_metrics_uploader.cpp | 18 - toolsrc/src/vcpkglib.cpp | 247 ------ toolsrc/src/vcpkgmetricsuploader.cpp | 20 + toolsrc/vcpkglib/vcpkglib.vcxproj | 198 ++--- toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 416 +++++----- .../vcpkgmetricsuploader.vcxproj | 2 +- .../vcpkgmetricsuploader.vcxproj.filters | 2 +- toolsrc/vcpkgtest/vcpkgtest.vcxproj | 10 +- toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters | 10 +- 218 files changed, 14032 insertions(+), 13936 deletions(-) delete mode 100644 toolsrc/include/BinaryParagraph.h delete mode 100644 toolsrc/include/CStringView.h delete mode 100644 toolsrc/include/LineInfo.h delete mode 100644 toolsrc/include/MachineType.h delete mode 100644 toolsrc/include/PackageSpec.h delete mode 100644 toolsrc/include/PackageSpecParseResult.h delete mode 100644 toolsrc/include/ParagraphParseResult.h delete mode 100644 toolsrc/include/Paragraphs.h delete mode 100644 toolsrc/include/PostBuildLint.h delete mode 100644 toolsrc/include/PostBuildLint_BuildType.h delete mode 100644 toolsrc/include/SortedVector.h delete mode 100644 toolsrc/include/SourceParagraph.h delete mode 100644 toolsrc/include/Span.h delete mode 100644 toolsrc/include/StatusParagraph.h delete mode 100644 toolsrc/include/StatusParagraphs.h delete mode 100644 toolsrc/include/VcpkgCmdArguments.h delete mode 100644 toolsrc/include/VcpkgPaths.h delete mode 100644 toolsrc/include/VersionT.h delete mode 100644 toolsrc/include/coff_file_reader.h delete mode 100644 toolsrc/include/filesystem_fs.h delete mode 100644 toolsrc/include/lazy.h delete mode 100644 toolsrc/include/metrics.h delete mode 100644 toolsrc/include/triplet.h create mode 100644 toolsrc/include/vcpkg/base/checks.h create mode 100644 toolsrc/include/vcpkg/base/chrono.h create mode 100644 toolsrc/include/vcpkg/base/cofffilereader.h create mode 100644 toolsrc/include/vcpkg/base/cstringview.h create mode 100644 toolsrc/include/vcpkg/base/enums.h create mode 100644 toolsrc/include/vcpkg/base/expected.h create mode 100644 toolsrc/include/vcpkg/base/files.h create mode 100644 toolsrc/include/vcpkg/base/graphs.h create mode 100644 toolsrc/include/vcpkg/base/lazy.h create mode 100644 toolsrc/include/vcpkg/base/lineinfo.h create mode 100644 toolsrc/include/vcpkg/base/machinetype.h create mode 100644 toolsrc/include/vcpkg/base/optional.h create mode 100644 toolsrc/include/vcpkg/base/sortedvector.h create mode 100644 toolsrc/include/vcpkg/base/span.h create mode 100644 toolsrc/include/vcpkg/base/strings.h create mode 100644 toolsrc/include/vcpkg/base/system.h create mode 100644 toolsrc/include/vcpkg/base/util.h create mode 100644 toolsrc/include/vcpkg/binaryparagraph.h create mode 100644 toolsrc/include/vcpkg/build.h create mode 100644 toolsrc/include/vcpkg/commands.h create mode 100644 toolsrc/include/vcpkg/dependencies.h create mode 100644 toolsrc/include/vcpkg/export.h create mode 100644 toolsrc/include/vcpkg/export.ifw.h create mode 100644 toolsrc/include/vcpkg/globalstate.h create mode 100644 toolsrc/include/vcpkg/help.h create mode 100644 toolsrc/include/vcpkg/input.h create mode 100644 toolsrc/include/vcpkg/install.h create mode 100644 toolsrc/include/vcpkg/metrics.h create mode 100644 toolsrc/include/vcpkg/packagespec.h create mode 100644 toolsrc/include/vcpkg/packagespecparseresult.h create mode 100644 toolsrc/include/vcpkg/paragraphparseresult.h create mode 100644 toolsrc/include/vcpkg/paragraphs.h create mode 100644 toolsrc/include/vcpkg/parse.h create mode 100644 toolsrc/include/vcpkg/postbuildlint.buildtype.h create mode 100644 toolsrc/include/vcpkg/postbuildlint.h create mode 100644 toolsrc/include/vcpkg/remove.h create mode 100644 toolsrc/include/vcpkg/sourceparagraph.h create mode 100644 toolsrc/include/vcpkg/statusparagraph.h create mode 100644 toolsrc/include/vcpkg/statusparagraphs.h create mode 100644 toolsrc/include/vcpkg/triplet.h create mode 100644 toolsrc/include/vcpkg/update.h create mode 100644 toolsrc/include/vcpkg/vcpkgcmdarguments.h create mode 100644 toolsrc/include/vcpkg/vcpkglib.h create mode 100644 toolsrc/include/vcpkg/vcpkgpaths.h create mode 100644 toolsrc/include/vcpkg/versiont.h delete mode 100644 toolsrc/include/vcpkg_Build.h delete mode 100644 toolsrc/include/vcpkg_Checks.h delete mode 100644 toolsrc/include/vcpkg_Chrono.h delete mode 100644 toolsrc/include/vcpkg_Commands.h delete mode 100644 toolsrc/include/vcpkg_Commands_Export.h delete mode 100644 toolsrc/include/vcpkg_Commands_Export_IFW.h delete mode 100644 toolsrc/include/vcpkg_Dependencies.h delete mode 100644 toolsrc/include/vcpkg_Enums.h delete mode 100644 toolsrc/include/vcpkg_Files.h delete mode 100644 toolsrc/include/vcpkg_GlobalState.h delete mode 100644 toolsrc/include/vcpkg_Graphs.h delete mode 100644 toolsrc/include/vcpkg_Input.h delete mode 100644 toolsrc/include/vcpkg_Maps.h delete mode 100644 toolsrc/include/vcpkg_Parse.h delete mode 100644 toolsrc/include/vcpkg_Strings.h delete mode 100644 toolsrc/include/vcpkg_System.h delete mode 100644 toolsrc/include/vcpkg_Util.h delete mode 100644 toolsrc/include/vcpkg_expected.h delete mode 100644 toolsrc/include/vcpkg_optional.h delete mode 100644 toolsrc/include/vcpkglib.h delete mode 100644 toolsrc/src/BinaryParagraph.cpp delete mode 100644 toolsrc/src/LineInfo.cpp delete mode 100644 toolsrc/src/MachineType.cpp delete mode 100644 toolsrc/src/PackageSpec.cpp delete mode 100644 toolsrc/src/PackageSpecParseResult.cpp delete mode 100644 toolsrc/src/ParagraphParseResult.cpp delete mode 100644 toolsrc/src/Paragraphs.cpp delete mode 100644 toolsrc/src/PostBuildLint.cpp delete mode 100644 toolsrc/src/PostBuildLint_BuildType.cpp delete mode 100644 toolsrc/src/SourceParagraph.cpp delete mode 100644 toolsrc/src/StatusParagraph.cpp delete mode 100644 toolsrc/src/StatusParagraphs.cpp delete mode 100644 toolsrc/src/VcpkgCmdArguments.cpp delete mode 100644 toolsrc/src/VcpkgPaths.cpp delete mode 100644 toolsrc/src/VersionT.cpp delete mode 100644 toolsrc/src/coff_file_reader.cpp delete mode 100644 toolsrc/src/commands_autocomplete.cpp delete mode 100644 toolsrc/src/commands_available_commands.cpp delete mode 100644 toolsrc/src/commands_build.cpp delete mode 100644 toolsrc/src/commands_build_external.cpp delete mode 100644 toolsrc/src/commands_cache.cpp delete mode 100644 toolsrc/src/commands_ci.cpp delete mode 100644 toolsrc/src/commands_contact.cpp delete mode 100644 toolsrc/src/commands_create.cpp delete mode 100644 toolsrc/src/commands_depends.cpp delete mode 100644 toolsrc/src/commands_edit.cpp delete mode 100644 toolsrc/src/commands_env.cpp delete mode 100644 toolsrc/src/commands_export.cpp delete mode 100644 toolsrc/src/commands_export_ifw.cpp delete mode 100644 toolsrc/src/commands_hash.cpp delete mode 100644 toolsrc/src/commands_help.cpp delete mode 100644 toolsrc/src/commands_import.cpp delete mode 100644 toolsrc/src/commands_install.cpp delete mode 100644 toolsrc/src/commands_integrate.cpp delete mode 100644 toolsrc/src/commands_list.cpp delete mode 100644 toolsrc/src/commands_owns.cpp delete mode 100644 toolsrc/src/commands_portsdiff.cpp delete mode 100644 toolsrc/src/commands_remove.cpp delete mode 100644 toolsrc/src/commands_search.cpp delete mode 100644 toolsrc/src/commands_update.cpp delete mode 100644 toolsrc/src/commands_version.cpp delete mode 100644 toolsrc/src/metrics.cpp delete mode 100644 toolsrc/src/test_install_plan.cpp create mode 100644 toolsrc/src/tests.arguments.cpp create mode 100644 toolsrc/src/tests.dependencies.cpp create mode 100644 toolsrc/src/tests.installplan.cpp create mode 100644 toolsrc/src/tests.packagespec.cpp create mode 100644 toolsrc/src/tests.paragraph.cpp delete mode 100644 toolsrc/src/tests_arguments.cpp delete mode 100644 toolsrc/src/tests_dependencies.cpp delete mode 100644 toolsrc/src/tests_package_spec.cpp delete mode 100644 toolsrc/src/tests_paragraph.cpp delete mode 100644 toolsrc/src/triplet.cpp create mode 100644 toolsrc/src/vcpkg/base/checks.cpp create mode 100644 toolsrc/src/vcpkg/base/chrono.cpp create mode 100644 toolsrc/src/vcpkg/base/cofffilereader.cpp create mode 100644 toolsrc/src/vcpkg/base/enums.cpp create mode 100644 toolsrc/src/vcpkg/base/files.cpp create mode 100644 toolsrc/src/vcpkg/base/lineinfo.cpp create mode 100644 toolsrc/src/vcpkg/base/machinetype.cpp create mode 100644 toolsrc/src/vcpkg/base/strings.cpp create mode 100644 toolsrc/src/vcpkg/base/system.cpp create mode 100644 toolsrc/src/vcpkg/binaryparagraph.cpp create mode 100644 toolsrc/src/vcpkg/build.cpp create mode 100644 toolsrc/src/vcpkg/commands.autocomplete.cpp create mode 100644 toolsrc/src/vcpkg/commands.buildexternal.cpp create mode 100644 toolsrc/src/vcpkg/commands.cache.cpp create mode 100644 toolsrc/src/vcpkg/commands.ci.cpp create mode 100644 toolsrc/src/vcpkg/commands.contact.cpp create mode 100644 toolsrc/src/vcpkg/commands.cpp create mode 100644 toolsrc/src/vcpkg/commands.create.cpp create mode 100644 toolsrc/src/vcpkg/commands.dependinfo.cpp create mode 100644 toolsrc/src/vcpkg/commands.edit.cpp create mode 100644 toolsrc/src/vcpkg/commands.env.cpp create mode 100644 toolsrc/src/vcpkg/commands.exportifw.cpp create mode 100644 toolsrc/src/vcpkg/commands.hash.cpp create mode 100644 toolsrc/src/vcpkg/commands.import.cpp create mode 100644 toolsrc/src/vcpkg/commands.integrate.cpp create mode 100644 toolsrc/src/vcpkg/commands.list.cpp create mode 100644 toolsrc/src/vcpkg/commands.owns.cpp create mode 100644 toolsrc/src/vcpkg/commands.portsdiff.cpp create mode 100644 toolsrc/src/vcpkg/commands.search.cpp create mode 100644 toolsrc/src/vcpkg/commands.version.cpp create mode 100644 toolsrc/src/vcpkg/dependencies.cpp create mode 100644 toolsrc/src/vcpkg/export.cpp create mode 100644 toolsrc/src/vcpkg/globalstate.cpp create mode 100644 toolsrc/src/vcpkg/help.cpp create mode 100644 toolsrc/src/vcpkg/input.cpp create mode 100644 toolsrc/src/vcpkg/install.cpp create mode 100644 toolsrc/src/vcpkg/metrics.cpp create mode 100644 toolsrc/src/vcpkg/packagespec.cpp create mode 100644 toolsrc/src/vcpkg/packagespecparseresult.cpp create mode 100644 toolsrc/src/vcpkg/paragraphparseresult.cpp create mode 100644 toolsrc/src/vcpkg/paragraphs.cpp create mode 100644 toolsrc/src/vcpkg/parse.cpp create mode 100644 toolsrc/src/vcpkg/postbuildlint.buildtype.cpp create mode 100644 toolsrc/src/vcpkg/postbuildlint.cpp create mode 100644 toolsrc/src/vcpkg/remove.cpp create mode 100644 toolsrc/src/vcpkg/sourceparagraph.cpp create mode 100644 toolsrc/src/vcpkg/statusparagraph.cpp create mode 100644 toolsrc/src/vcpkg/statusparagraphs.cpp create mode 100644 toolsrc/src/vcpkg/triplet.cpp create mode 100644 toolsrc/src/vcpkg/update.cpp create mode 100644 toolsrc/src/vcpkg/vcpkgcmdarguments.cpp create mode 100644 toolsrc/src/vcpkg/vcpkglib.cpp create mode 100644 toolsrc/src/vcpkg/vcpkgpaths.cpp create mode 100644 toolsrc/src/vcpkg/versiont.cpp delete mode 100644 toolsrc/src/vcpkg_Build.cpp delete mode 100644 toolsrc/src/vcpkg_Build_BuildPolicy.cpp delete mode 100644 toolsrc/src/vcpkg_Checks.cpp delete mode 100644 toolsrc/src/vcpkg_Chrono.cpp delete mode 100644 toolsrc/src/vcpkg_Dependencies.cpp delete mode 100644 toolsrc/src/vcpkg_Enums.cpp delete mode 100644 toolsrc/src/vcpkg_Files.cpp delete mode 100644 toolsrc/src/vcpkg_GlobalState.cpp delete mode 100644 toolsrc/src/vcpkg_Input.cpp delete mode 100644 toolsrc/src/vcpkg_Parse.cpp delete mode 100644 toolsrc/src/vcpkg_Strings.cpp delete mode 100644 toolsrc/src/vcpkg_System.cpp delete mode 100644 toolsrc/src/vcpkg_metrics_uploader.cpp delete mode 100644 toolsrc/src/vcpkglib.cpp create mode 100644 toolsrc/src/vcpkgmetricsuploader.cpp diff --git a/toolsrc/include/BinaryParagraph.h b/toolsrc/include/BinaryParagraph.h deleted file mode 100644 index 61e03343a..000000000 --- a/toolsrc/include/BinaryParagraph.h +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -#include "PackageSpec.h" -#include "SourceParagraph.h" -#include - -namespace vcpkg -{ - /// - /// Built package metadata - /// - struct BinaryParagraph - { - BinaryParagraph(); - explicit BinaryParagraph(std::unordered_map fields); - BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet); - BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet); - - std::string displayname() const; - - std::string fullstem() const; - - std::string dir() const; - - PackageSpec spec; - std::string version; - std::string description; - std::string maintainer; - std::string feature; - std::vector default_features; - std::vector depends; - }; - - struct BinaryControlFile - { - BinaryParagraph core_paragraph; - std::vector features; - }; - - void serialize(const BinaryParagraph& pgh, std::string& out_str); -} \ No newline at end of file diff --git a/toolsrc/include/CStringView.h b/toolsrc/include/CStringView.h deleted file mode 100644 index c1810b4f1..000000000 --- a/toolsrc/include/CStringView.h +++ /dev/null @@ -1,96 +0,0 @@ -#pragma once -#include - -namespace vcpkg -{ - template - struct BasicCStringView - { - constexpr BasicCStringView() : cstr(nullptr) {} - constexpr BasicCStringView(const CharType* cstr) : cstr(cstr) {} - constexpr BasicCStringView(const BasicCStringView&) = default; - BasicCStringView(const std::basic_string& str) : cstr(str.c_str()) {} - - constexpr const CharType* c_str() const { return cstr; } - - private: - const CharType* cstr; - }; - - namespace details - { - inline bool vcpkg_strcmp(const char* l, const char* r) { return strcmp(l, r) == 0; } - inline bool vcpkg_strcmp(const wchar_t* l, const wchar_t* r) { return wcscmp(l, r) == 0; } - } - - template - bool operator==(const BasicCStringView& l, const BasicCStringView& r) - { - return details::vcpkg_strcmp(l.c_str(), r.c_str()); - } - - template - bool operator==(const CharType* l, const BasicCStringView& r) - { - return details::vcpkg_strcmp(l, r.c_str()); - } - - template - bool operator==(const BasicCStringView& r, const CharType* l) - { - return details::vcpkg_strcmp(l, r.c_str()); - } - - template - bool operator==(const std::basic_string& l, const BasicCStringView& r) - { - return l == r.c_str(); - } - - template - bool operator==(const BasicCStringView& r, const std::basic_string& l) - { - return l == r.c_str(); - } - - // notequals - template - bool operator!=(const BasicCStringView& l, const BasicCStringView& r) - { - return !details::vcpkg_strcmp(l.c_str(), r.c_str()); - } - - template - bool operator!=(const CharType* l, const BasicCStringView& r) - { - return !details::vcpkg_strcmp(l, r.c_str()); - } - - template - bool operator!=(const BasicCStringView& r, const CharType* l) - { - return !details::vcpkg_strcmp(l, r.c_str()); - } - - template - bool operator!=(const BasicCStringView& r, const std::basic_string& l) - { - return l != r.c_str(); - } - - template - bool operator!=(const std::basic_string& l, const BasicCStringView& r) - { - return l != r.c_str(); - } - - using CStringView = BasicCStringView; - using CWStringView = BasicCStringView; - - inline const char* to_printf_arg(const CStringView string_view) { return string_view.c_str(); } - - inline const wchar_t* to_wprintf_arg(const CWStringView string_view) { return string_view.c_str(); } - - static_assert(sizeof(CStringView) == sizeof(void*), "CStringView must be a simple wrapper around char*"); - static_assert(sizeof(CWStringView) == sizeof(void*), "CWStringView must be a simple wrapper around wchar_t*"); -} diff --git a/toolsrc/include/LineInfo.h b/toolsrc/include/LineInfo.h deleted file mode 100644 index 62973462a..000000000 --- a/toolsrc/include/LineInfo.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include - -namespace vcpkg -{ - struct LineInfo - { - int line_number; - const char* file_name; - - constexpr LineInfo() : line_number(0), file_name(nullptr) {} - constexpr LineInfo(const int lineno, const char* filename) : line_number(lineno), file_name(filename) {} - - std::string to_string() const; - }; -} - -#define VCPKG_LINE_INFO vcpkg::LineInfo(__LINE__, __FILE__) diff --git a/toolsrc/include/MachineType.h b/toolsrc/include/MachineType.h deleted file mode 100644 index 6f61bbd53..000000000 --- a/toolsrc/include/MachineType.h +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once -#include - -namespace vcpkg -{ - enum class MachineType : uint16_t - { - UNKNOWN = 0x0, // The contents of this field are assumed to be applicable to any machine type - AM33 = 0x1d3, // Matsushita AM33 - AMD64 = 0x8664, // x64 - ARM = 0x1c0, // ARM little endian - ARM64 = 0xaa64, // ARM64 little endian - ARMNT = 0x1c4, // ARM Thumb-2 little endian - EBC = 0xebc, // EFI byte code - I386 = 0x14c, // Intel 386 or later processors and compatible processors - IA64 = 0x200, // Intel Itanium processor family - M32R = 0x9041, // Mitsubishi M32R little endian - MIPS16 = 0x266, // MIPS16 - MIPSFPU = 0x366, // MIPS with FPU - MIPSFPU16 = 0x466, // MIPS16 with FPU - POWERPC = 0x1f0, // Power PC little endian - POWERPCFP = 0x1f1, // Power PC with floating point support - R4000 = 0x166, // MIPS little endian - RISCV32 = 0x5032, // RISC-V 32-bit address space - RISCV64 = 0x5064, // RISC-V 64-bit address space - RISCV128 = 0x5128, // RISC-V 128-bit address space - SH3 = 0x1a2, // Hitachi SH3 - SH3DSP = 0x1a3, // Hitachi SH3 DSP - SH4 = 0x1a6, // Hitachi SH4 - SH5 = 0x1a8, // Hitachi SH5 - THUMB = 0x1c2, // Thumb - WCEMIPSV2 = 0x169, // MIPS little-endian WCE v2 - }; - - MachineType to_machine_type(const uint16_t value); -} diff --git a/toolsrc/include/PackageSpec.h b/toolsrc/include/PackageSpec.h deleted file mode 100644 index c5ce767f9..000000000 --- a/toolsrc/include/PackageSpec.h +++ /dev/null @@ -1,95 +0,0 @@ -#pragma once - -#include "PackageSpecParseResult.h" -#include "Triplet.h" -#include "vcpkg_expected.h" - -namespace vcpkg -{ - struct ParsedSpecifier - { - std::string name; - std::vector features; - std::string triplet; - - static ExpectedT from_string(const std::string& input); - }; - - struct PackageSpec - { - static ExpectedT from_name_and_triplet(const std::string& name, - const Triplet& triplet); - - const std::string& name() const; - - const Triplet& triplet() const; - - std::string dir() const; - - std::string to_string() const; - - private: - std::string m_name; - Triplet m_triplet; - }; - - struct FeatureSpec - { - FeatureSpec(const PackageSpec& spec, const std::string& feature) : m_spec(spec), m_feature(feature) {} - - const std::string& name() const { return m_spec.name(); } - const std::string& feature() const { return m_feature; } - const Triplet& triplet() const { return m_spec.triplet(); } - - const PackageSpec& spec() const { return m_spec; } - - std::string to_string() const; - - static std::vector from_strings_and_triplet(const std::vector& depends, - const Triplet& t); - - private: - PackageSpec m_spec; - std::string m_feature; - }; - - struct FullPackageSpec - { - PackageSpec package_spec; - std::vector features; - - static std::vector to_feature_specs(const std::vector& specs); - - static ExpectedT from_string(const std::string& spec_as_string, - const Triplet& default_triplet); - }; - - struct Features - { - std::string name; - std::vector features; - - static ExpectedT from_string(const std::string& input); - }; - - bool operator==(const PackageSpec& left, const PackageSpec& right); - bool operator!=(const PackageSpec& left, const PackageSpec& right); -} - -template<> -struct std::hash -{ - size_t operator()(const vcpkg::PackageSpec& value) const - { - size_t hash = 17; - hash = hash * 31 + std::hash()(value.name()); - hash = hash * 31 + std::hash()(value.triplet()); - return hash; - } -}; - -template<> -struct std::equal_to -{ - bool operator()(const vcpkg::PackageSpec& left, const vcpkg::PackageSpec& right) const { return left == right; } -}; diff --git a/toolsrc/include/PackageSpecParseResult.h b/toolsrc/include/PackageSpecParseResult.h deleted file mode 100644 index 1462b8073..000000000 --- a/toolsrc/include/PackageSpecParseResult.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include "vcpkg_expected.h" - -namespace vcpkg -{ - enum class PackageSpecParseResult - { - SUCCESS = 0, - TOO_MANY_COLONS, - INVALID_CHARACTERS - }; - - CStringView to_string(PackageSpecParseResult ev) noexcept; - - template<> - struct ErrorHolder - { - ErrorHolder() : m_err(PackageSpecParseResult::SUCCESS) {} - ErrorHolder(PackageSpecParseResult err) : m_err(err) {} - - constexpr bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; } - - const PackageSpecParseResult& error() const { return m_err; } - PackageSpecParseResult& error() { return m_err; } - - CStringView to_string() const { return vcpkg::to_string(m_err); } - - private: - PackageSpecParseResult m_err; - }; -} diff --git a/toolsrc/include/ParagraphParseResult.h b/toolsrc/include/ParagraphParseResult.h deleted file mode 100644 index eaa7e6327..000000000 --- a/toolsrc/include/ParagraphParseResult.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once -#include - -namespace vcpkg -{ - enum class ParagraphParseResult - { - SUCCESS = 0, - EXPECTED_ONE_PARAGRAPH - }; - - struct ParagraphParseResultCategoryImpl final : std::error_category - { - virtual const char* name() const noexcept override; - - virtual std::string message(int ev) const noexcept override; - }; - - const std::error_category& paragraph_parse_result_category(); - - std::error_code make_error_code(ParagraphParseResult e); - - ParagraphParseResult to_paragraph_parse_result(int i); - - ParagraphParseResult to_paragraph_parse_result(std::error_code ec); -} - -// Enable implicit conversion to std::error_code -template<> -struct std::is_error_code_enum : ::std::true_type -{ -}; diff --git a/toolsrc/include/Paragraphs.h b/toolsrc/include/Paragraphs.h deleted file mode 100644 index aae46f7da..000000000 --- a/toolsrc/include/Paragraphs.h +++ /dev/null @@ -1,38 +0,0 @@ -#pragma once - -#include - -#include "BinaryParagraph.h" -#include "VcpkgPaths.h" -#include "VersionT.h" -#include "filesystem_fs.h" -#include "vcpkg_Parse.h" -#include "vcpkg_expected.h" - -namespace vcpkg::Paragraphs -{ - using RawParagraph = Parse::RawParagraph; - - Expected get_single_paragraph(const Files::Filesystem& fs, const fs::path& control_path); - Expected> get_paragraphs(const Files::Filesystem& fs, const fs::path& control_path); - Expected parse_single_paragraph(const std::string& str); - Expected> parse_paragraphs(const std::string& str); - - Parse::ParseExpected try_load_port(const Files::Filesystem& fs, const fs::path& control_path); - - Expected try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec); - - struct LoadResults - { - std::vector> paragraphs; - std::vector> errors; - }; - - LoadResults try_load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); - - std::vector> load_all_ports(const Files::Filesystem& fs, - const fs::path& ports_dir); - - std::map load_all_port_names_and_versions(const Files::Filesystem& fs, - const fs::path& ports_dir); -} diff --git a/toolsrc/include/PostBuildLint.h b/toolsrc/include/PostBuildLint.h deleted file mode 100644 index 69fafc9f7..000000000 --- a/toolsrc/include/PostBuildLint.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once -#include "PackageSpec.h" -#include "VcpkgPaths.h" -#include "vcpkg_Build.h" - -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); -} diff --git a/toolsrc/include/PostBuildLint_BuildType.h b/toolsrc/include/PostBuildLint_BuildType.h deleted file mode 100644 index 38ad3084e..000000000 --- a/toolsrc/include/PostBuildLint_BuildType.h +++ /dev/null @@ -1,66 +0,0 @@ -#pragma once -#include "CStringView.h" -#include "vcpkg_Build.h" -#include -#include - -namespace vcpkg::PostBuildLint -{ - enum class ConfigurationType - { - DEBUG, - RELEASE, - }; - - struct BuildType - { - enum class BackingEnum - { - DEBUG_STATIC = 1, - DEBUG_DYNAMIC, - RELEASE_STATIC, - RELEASE_DYNAMIC - }; - - static BuildType value_of(const ConfigurationType& config, const Build::LinkageType& linkage); - - BuildType() = delete; - - constexpr BuildType(const BackingEnum backing_enum, - const ConfigurationType config, - const Build::LinkageType linkage) - : backing_enum(backing_enum), m_config(config), m_linkage(linkage) - { - } - - constexpr operator BackingEnum() const { return backing_enum; } - - const ConfigurationType& config() const; - const Build::LinkageType& linkage() const; - const std::regex& crt_regex() const; - const std::string& to_string() const; - - private: - BackingEnum backing_enum; - ConfigurationType m_config; - Build::LinkageType m_linkage; - }; - - namespace BuildTypeC - { - using Build::LinkageType; - using BE = BuildType::BackingEnum; - - static constexpr CStringView ENUM_NAME = "vcpkg::PostBuildLint::BuildType"; - - static constexpr BuildType DEBUG_STATIC = {BE::DEBUG_STATIC, ConfigurationType::DEBUG, LinkageType::STATIC}; - static constexpr BuildType DEBUG_DYNAMIC = {BE::DEBUG_DYNAMIC, ConfigurationType::DEBUG, LinkageType::DYNAMIC}; - static constexpr BuildType RELEASE_STATIC = { - BE::RELEASE_STATIC, ConfigurationType::RELEASE, LinkageType::STATIC}; - static constexpr BuildType RELEASE_DYNAMIC = { - BE::RELEASE_DYNAMIC, ConfigurationType::RELEASE, LinkageType::DYNAMIC}; - - static constexpr std::array VALUES = { - DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC}; - } -} diff --git a/toolsrc/include/SortedVector.h b/toolsrc/include/SortedVector.h deleted file mode 100644 index 62808cc2f..000000000 --- a/toolsrc/include/SortedVector.h +++ /dev/null @@ -1,50 +0,0 @@ -#pragma once - -#include -#include - -// Add more forwarding functions to the m_data std::vector as needed. -namespace vcpkg -{ - template - class SortedVector - { - public: - using size_type = typename std::vector::size_type; - using iterator = typename std::vector::const_iterator; - - SortedVector() : m_data() {} - - explicit SortedVector(std::vector v) : m_data(std::move(v)) - { - if (!std::is_sorted(m_data.begin(), m_data.end())) - { - std::sort(m_data.begin(), m_data.end()); - } - } - - template - SortedVector(std::vector v, Compare comp) : m_data(std::move(v)) - { - if (!std::is_sorted(m_data.cbegin(), m_data.cend(), comp)) - { - std::sort(m_data.begin(), m_data.end(), comp); - } - } - - iterator begin() const { return this->m_data.cbegin(); } - - iterator end() const { return this->m_data.cend(); } - - iterator cbegin() const { return this->m_data.cbegin(); } - - iterator cend() const { return this->m_data.cend(); } - - bool empty() const { return this->m_data.empty(); } - - size_type size() const { return this->m_data.size(); } - - private: - std::vector m_data; - }; -} diff --git a/toolsrc/include/SourceParagraph.h b/toolsrc/include/SourceParagraph.h deleted file mode 100644 index ccf9faf4f..000000000 --- a/toolsrc/include/SourceParagraph.h +++ /dev/null @@ -1,96 +0,0 @@ -#pragma once - -#include "PackageSpec.h" -#include "Span.h" -#include "vcpkg_Parse.h" -#include "vcpkg_System.h" -#include "vcpkg_expected.h" - -#include -#include - -namespace vcpkg -{ - struct Dependency - { - Features depend; - std::string qualifier; - - std::string name() const; - static Dependency parse_dependency(std::string name, std::string qualifier); - }; - - std::vector filter_dependencies(const std::vector& deps, const Triplet& t); - std::vector filter_dependencies_to_specs(const std::vector& deps, const Triplet& t); - - // zlib[uwp] becomes Dependency{"zlib", "uwp"} - std::vector expand_qualified_dependencies(const std::vector& depends); - - std::string to_string(const Dependency& dep); - - struct FeatureParagraph - { - std::string name; - std::string description; - std::vector depends; - }; - - /// - /// Port metadata (CONTROL file) - /// - struct SourceParagraph - { - std::string name; - std::string version; - std::string description; - std::string maintainer; - std::vector supports; - std::vector depends; - std::vector default_features; - }; - struct SourceControlFile - { - static Parse::ParseExpected parse_control_file( - std::vector&& control_paragraphs); - - std::unique_ptr core_paragraph; - std::vector> feature_paragraphs; - }; - - void print_error_message(Span> error_info_list); - inline void print_error_message(const std::unique_ptr& error_info_list) - { - return print_error_message({&error_info_list, 1}); - } - - struct Supports - { - static ExpectedT> parse(const std::vector& strs); - - using Architecture = System::CPUArchitecture; - - enum class Platform - { - WINDOWS, - UWP, - }; - enum class Linkage - { - DYNAMIC, - STATIC, - }; - enum class ToolsetVersion - { - V140, - V141, - }; - - bool is_supported(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools); - - private: - std::vector architectures; - std::vector platforms; - std::vector crt_linkages; - std::vector toolsets; - }; -} diff --git a/toolsrc/include/Span.h b/toolsrc/include/Span.h deleted file mode 100644 index a43e8f992..000000000 --- a/toolsrc/include/Span.h +++ /dev/null @@ -1,52 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -template -struct Span -{ -public: - using element_type = T; - using pointer = T*; - using reference = T&; - using iterator = T*; - - constexpr Span() noexcept : m_ptr(nullptr), m_count(0) {} - constexpr Span(std::nullptr_t) noexcept : Span() {} - constexpr Span(T* ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {} - constexpr Span(T* ptr_begin, T* ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {} - constexpr Span(std::initializer_list l) noexcept : m_ptr(l.begin()), m_count(l.size()) {} - - template - constexpr Span(T (&arr)[N]) noexcept : Span(arr, N) - { - } - - Span(std::vector& v) noexcept : Span(v.data(), v.size()) {} - Span(const std::vector>& v) noexcept : Span(v.data(), v.size()) {} - - constexpr iterator begin() const { return m_ptr; } - constexpr iterator end() const { return m_ptr + m_count; } - - constexpr reference operator[](size_t i) const { return m_ptr[i]; } - constexpr size_t size() const { return m_count; } - -private: - pointer m_ptr; - size_t m_count; -}; - -template -Span make_span(std::vector& v) -{ - return {v.data(), v.size()}; -} - -template -Span make_span(const std::vector& v) -{ - return {v.data(), v.size()}; -} diff --git a/toolsrc/include/StatusParagraph.h b/toolsrc/include/StatusParagraph.h deleted file mode 100644 index b56533d65..000000000 --- a/toolsrc/include/StatusParagraph.h +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#include "BinaryParagraph.h" -#include - -namespace vcpkg -{ - enum class InstallState - { - ERROR_STATE, - NOT_INSTALLED, - HALF_INSTALLED, - INSTALLED, - }; - - enum class Want - { - ERROR_STATE, - UNKNOWN, - INSTALL, - HOLD, - DEINSTALL, - PURGE - }; - - /// - /// Installed package metadata - /// - struct StatusParagraph - { - StatusParagraph(); - explicit StatusParagraph(std::unordered_map&& fields); - - BinaryParagraph package; - Want want; - InstallState state; - }; - - void serialize(const StatusParagraph& pgh, std::string& out_str); - - std::string to_string(InstallState f); - - std::string to_string(Want f); -} diff --git a/toolsrc/include/StatusParagraphs.h b/toolsrc/include/StatusParagraphs.h deleted file mode 100644 index 1a9ee6a03..000000000 --- a/toolsrc/include/StatusParagraphs.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once -#include "StatusParagraph.h" -#include -#include - -namespace vcpkg -{ - struct StatusParagraphs - { - StatusParagraphs(); - explicit StatusParagraphs(std::vector>&& ps); - - using container = std::vector>; - using iterator = container::reverse_iterator; - using const_iterator = container::const_reverse_iterator; - - const_iterator find(const PackageSpec& spec) const { return find(spec.name(), spec.triplet()); } - const_iterator find(const std::string& name, const Triplet& triplet) const; - iterator find(const std::string& name, const Triplet& triplet); - std::vector*> find_all(const std::string& name, const Triplet& triplet); - iterator find(const std::string& name, const Triplet& triplet, const std::string& feature); - - const_iterator find_installed(const PackageSpec& spec) const - { - return find_installed(spec.name(), spec.triplet()); - } - const_iterator find_installed(const std::string& name, const Triplet& triplet) const; - - iterator insert(std::unique_ptr); - - friend void serialize(const StatusParagraphs& pgh, std::string& out_str); - - iterator end() { return paragraphs.rend(); } - - const_iterator end() const { return paragraphs.rend(); } - - iterator begin() { return paragraphs.rbegin(); } - - const_iterator begin() const { return paragraphs.rbegin(); } - - private: - std::vector> paragraphs; - }; - - void serialize(const StatusParagraphs& pgh, std::string& out_str); -} diff --git a/toolsrc/include/VcpkgCmdArguments.h b/toolsrc/include/VcpkgCmdArguments.h deleted file mode 100644 index 0de5747b1..000000000 --- a/toolsrc/include/VcpkgCmdArguments.h +++ /dev/null @@ -1,49 +0,0 @@ -#pragma once - -#include "vcpkg_optional.h" -#include -#include -#include -#include - -namespace vcpkg -{ - struct ParsedArguments - { - std::unordered_set switches; - std::unordered_map settings; - }; - - struct VcpkgCmdArguments - { - static VcpkgCmdArguments create_from_command_line(const int argc, const wchar_t* const* const argv); - 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 triplet; - Optional debug = nullopt; - Optional sendmetrics = nullopt; - Optional printmetrics = nullopt; - - std::string command; - std::vector command_arguments; - std::unordered_set check_and_get_optional_command_arguments( - const std::vector& valid_options) const - { - return std::move(check_and_get_optional_command_arguments(valid_options, {}).switches); - } - - ParsedArguments check_and_get_optional_command_arguments(const std::vector& valid_switches, - const std::vector& valid_settings) const; - - void check_max_arg_count(const size_t expected_arg_count) const; - void check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const; - void check_min_arg_count(const size_t expected_arg_count) const; - void check_min_arg_count(const size_t expected_arg_count, const std::string& example_text) const; - void check_exact_arg_count(const size_t expected_arg_count) const; - void check_exact_arg_count(const size_t expected_arg_count, const std::string& example_text) const; - - private: - std::unordered_map> optional_command_arguments; - }; -} diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h deleted file mode 100644 index d4640fba2..000000000 --- a/toolsrc/include/VcpkgPaths.h +++ /dev/null @@ -1,84 +0,0 @@ -#pragma once -#include "BinaryParagraph.h" -#include "Lazy.h" -#include "PackageSpec.h" -#include "filesystem_fs.h" -#include "vcpkg_Files.h" -#include "vcpkg_expected.h" - -namespace vcpkg -{ - struct ToolsetArchOption - { - CWStringView name; - System::CPUArchitecture host_arch; - System::CPUArchitecture target_arch; - }; - - struct Toolset - { - fs::path visual_studio_root_path; - fs::path dumpbin; - fs::path vcvarsall; - std::vector vcvarsall_options; - CWStringView version; - std::vector supported_architectures; - }; - - struct VcpkgPaths - { - static Expected create(const fs::path& vcpkg_root_dir); - - 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; - - bool is_valid_triplet(const Triplet& t) const; - - fs::path root; - fs::path packages; - fs::path buildtrees; - fs::path downloads; - fs::path ports; - fs::path installed; - fs::path triplets; - fs::path scripts; - - fs::path buildsystems; - fs::path buildsystems_msbuild_targets; - - fs::path vcpkg_dir; - fs::path vcpkg_dir_status_file; - fs::path vcpkg_dir_info; - fs::path vcpkg_dir_updates; - - fs::path ports_cmake; - - const fs::path& get_cmake_exe() const; - const fs::path& get_git_exe() const; - const fs::path& get_nuget_exe() const; - const fs::path& get_ifw_installerbase_exe() const; - const fs::path& get_ifw_binarycreator_exe() const; - const fs::path& get_ifw_repogen_exe() const; - - /// Retrieve a toolset matching a VS version - /// - /// Valid version strings are "v140", "v141", and "". Empty string gets the latest. - /// - const Toolset& VcpkgPaths::get_toolset(const Optional& toolset_version, - const Optional& visual_studio_path) const; - - Files::Filesystem& get_filesystem() const; - - private: - Lazy cmake_exe; - Lazy git_exe; - Lazy nuget_exe; - Lazy ifw_installerbase_exe; - Lazy ifw_binarycreator_exe; - Lazy ifw_repogen_exe; - Lazy> toolsets; - }; -} diff --git a/toolsrc/include/VersionT.h b/toolsrc/include/VersionT.h deleted file mode 100644 index 67efd8da3..000000000 --- a/toolsrc/include/VersionT.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once -#include - -namespace vcpkg -{ - struct VersionT - { - VersionT(); - VersionT(const std::string& value); - - std::string to_string() const; - - std::string value; - }; - - bool operator==(const VersionT& left, const VersionT& right); - bool operator!=(const VersionT& left, const VersionT& right); - - struct VersionDiff - { - VersionT left; - VersionT right; - - VersionDiff(); - VersionDiff(const VersionT& left, const VersionT& right); - - std::string to_string() const; - }; -} diff --git a/toolsrc/include/coff_file_reader.h b/toolsrc/include/coff_file_reader.h deleted file mode 100644 index 7287211a1..000000000 --- a/toolsrc/include/coff_file_reader.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once -#include "MachineType.h" -#include "filesystem_fs.h" -#include - -namespace vcpkg::CoffFileReader -{ - struct DllInfo - { - MachineType machine_type; - }; - - struct LibInfo - { - std::vector machine_types; - }; - - DllInfo read_dll(const fs::path& path); - - LibInfo read_lib(const fs::path& path); -} diff --git a/toolsrc/include/filesystem_fs.h b/toolsrc/include/filesystem_fs.h deleted file mode 100644 index 0651ebf25..000000000 --- a/toolsrc/include/filesystem_fs.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include - -namespace fs -{ - namespace stdfs = std::experimental::filesystem; - - using stdfs::path; - using stdfs::copy_options; - using stdfs::file_status; - - 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 status_known(file_status s) { return stdfs::status_known(s); } -} \ No newline at end of file diff --git a/toolsrc/include/lazy.h b/toolsrc/include/lazy.h deleted file mode 100644 index 58c11c002..000000000 --- a/toolsrc/include/lazy.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -namespace vcpkg -{ - template - class Lazy - { - public: - Lazy() : value(T()), initialized(false) {} - - template - T const& get_lazy(const F& f) const - { - if (!initialized) - { - value = f(); - initialized = true; - } - return value; - } - - private: - mutable T value; - mutable bool initialized; - }; -} diff --git a/toolsrc/include/metrics.h b/toolsrc/include/metrics.h deleted file mode 100644 index 8eae426de..000000000 --- a/toolsrc/include/metrics.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include - -#include "vcpkg_Util.h" - -namespace vcpkg::Metrics -{ - struct Metrics : Util::ResourceBase - { - void set_send_metrics(bool should_send_metrics); - void set_print_metrics(bool should_print_metrics); - void set_user_information(const std::string& user_id, const std::string& first_use_time); - void init_user_information(std::string& user_id, std::string& first_use_time); - - void track_metric(const std::string& name, double value); - void track_property(const std::string& name, const std::string& value); - void track_property(const std::string& name, const std::wstring& value); - - void upload(const std::string& payload); - void flush(); - }; - - extern Util::LockGuarded g_metrics; - - std::wstring get_SQM_user(); - bool get_compiled_metrics_enabled(); -} diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index 0f34063f8..8333eb927 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -2,9 +2,13 @@ #define NOMINMAX #define WIN32_LEAN_AND_MEAN + #pragma warning(suppress : 4768) #include +#pragma warning(suppress : 4768) +#include + #include #include #include @@ -28,10 +32,6 @@ #include #include #include -#pragma warning(push) -#pragma warning(disable : 4768) -#include -#pragma warning(pop) #include #include #include diff --git a/toolsrc/include/triplet.h b/toolsrc/include/triplet.h deleted file mode 100644 index 46a52f8e6..000000000 --- a/toolsrc/include/triplet.h +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once - -#include - -namespace vcpkg -{ - struct TripletInstance; - - struct Triplet - { - public: - constexpr Triplet() : m_instance(&DEFAULT_INSTANCE) {} - - static Triplet from_canonical_name(const std::string& triplet_as_string); - - static const Triplet X86_WINDOWS; - static const Triplet X64_WINDOWS; - static const Triplet X86_UWP; - static const Triplet X64_UWP; - static const Triplet ARM_UWP; - - const std::string& canonical_name() const; - const std::string& to_string() const; - size_t hash_code() const; - - bool operator==(const Triplet& other) const; - - private: - static const TripletInstance DEFAULT_INSTANCE; - - constexpr Triplet(const TripletInstance* ptr) : m_instance(ptr) {} - - const TripletInstance* m_instance; - }; - - bool operator!=(const Triplet& left, const Triplet& right); -} - -template<> -struct std::hash -{ - size_t operator()(const vcpkg::Triplet& t) const { return t.hash_code(); } -}; diff --git a/toolsrc/include/vcpkg/base/checks.h b/toolsrc/include/vcpkg/base/checks.h new file mode 100644 index 000000000..fb162c897 --- /dev/null +++ b/toolsrc/include/vcpkg/base/checks.h @@ -0,0 +1,55 @@ +#pragma once + +#include +#include +#include + +namespace vcpkg::Checks +{ + void register_console_ctrl_handler(); + + // Indicate that an internal error has occurred and exit the tool. This should be used when invariants have been + // broken. + [[noreturn]] void unreachable(const LineInfo& line_info); + + [[noreturn]] void exit_with_code(const LineInfo& line_info, const int exit_code); + + // Exit the tool without an error message. + [[noreturn]] inline void exit_fail(const LineInfo& line_info) { exit_with_code(line_info, EXIT_FAILURE); } + + // Exit the tool successfully. + [[noreturn]] inline void exit_success(const LineInfo& line_info) { exit_with_code(line_info, EXIT_SUCCESS); } + + // Display an error message to the user and exit the tool. + [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView error_message); + + template + // Display an error message to the user and exit the tool. + [[noreturn]] void exit_with_message(const LineInfo& line_info, + const char* error_message_template, + const Arg1 error_message_arg1, + const Args&... error_message_args) + { + exit_with_message(line_info, + Strings::format(error_message_template, error_message_arg1, error_message_args...)); + } + + void check_exit(const LineInfo& line_info, bool expression); + + void check_exit(const LineInfo& line_info, bool expression, const CStringView error_message); + + template + void check_exit(const LineInfo& line_info, + Conditional&& expression, + const char* error_message_template, + const Arg1 error_message_arg1, + const Args&... error_message_args) + { + if (!expression) + { + // Only create the string if the expression is false + exit_with_message(line_info, + Strings::format(error_message_template, error_message_arg1, error_message_args...)); + } + } +} diff --git a/toolsrc/include/vcpkg/base/chrono.h b/toolsrc/include/vcpkg/base/chrono.h new file mode 100644 index 000000000..b525852f2 --- /dev/null +++ b/toolsrc/include/vcpkg/base/chrono.h @@ -0,0 +1,28 @@ +#pragma once + +#include +#include + +namespace vcpkg::Chrono +{ + class ElapsedTime + { + public: + static ElapsedTime create_started(); + + constexpr ElapsedTime() : m_start_tick() {} + + template + TimeUnit elapsed() const + { + return std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - this->m_start_tick); + } + + double microseconds() const { return elapsed>().count(); } + + std::string to_string() const; + + private: + std::chrono::high_resolution_clock::time_point m_start_tick; + }; +} diff --git a/toolsrc/include/vcpkg/base/cofffilereader.h b/toolsrc/include/vcpkg/base/cofffilereader.h new file mode 100644 index 000000000..ad2cc7b12 --- /dev/null +++ b/toolsrc/include/vcpkg/base/cofffilereader.h @@ -0,0 +1,23 @@ +#pragma once + +#include +#include + +#include + +namespace vcpkg::CoffFileReader +{ + struct DllInfo + { + MachineType machine_type; + }; + + struct LibInfo + { + std::vector machine_types; + }; + + DllInfo read_dll(const fs::path& path); + + LibInfo read_lib(const fs::path& path); +} diff --git a/toolsrc/include/vcpkg/base/cstringview.h b/toolsrc/include/vcpkg/base/cstringview.h new file mode 100644 index 000000000..341830f05 --- /dev/null +++ b/toolsrc/include/vcpkg/base/cstringview.h @@ -0,0 +1,97 @@ +#pragma once + +#include + +namespace vcpkg +{ + template + struct BasicCStringView + { + constexpr BasicCStringView() : cstr(nullptr) {} + constexpr BasicCStringView(const CharType* cstr) : cstr(cstr) {} + constexpr BasicCStringView(const BasicCStringView&) = default; + BasicCStringView(const std::basic_string& str) : cstr(str.c_str()) {} + + constexpr const CharType* c_str() const { return cstr; } + + private: + const CharType* cstr; + }; + + namespace details + { + inline bool vcpkg_strcmp(const char* l, const char* r) { return strcmp(l, r) == 0; } + inline bool vcpkg_strcmp(const wchar_t* l, const wchar_t* r) { return wcscmp(l, r) == 0; } + } + + template + bool operator==(const BasicCStringView& l, const BasicCStringView& r) + { + return details::vcpkg_strcmp(l.c_str(), r.c_str()); + } + + template + bool operator==(const CharType* l, const BasicCStringView& r) + { + return details::vcpkg_strcmp(l, r.c_str()); + } + + template + bool operator==(const BasicCStringView& r, const CharType* l) + { + return details::vcpkg_strcmp(l, r.c_str()); + } + + template + bool operator==(const std::basic_string& l, const BasicCStringView& r) + { + return l == r.c_str(); + } + + template + bool operator==(const BasicCStringView& r, const std::basic_string& l) + { + return l == r.c_str(); + } + + // notequals + template + bool operator!=(const BasicCStringView& l, const BasicCStringView& r) + { + return !details::vcpkg_strcmp(l.c_str(), r.c_str()); + } + + template + bool operator!=(const CharType* l, const BasicCStringView& r) + { + return !details::vcpkg_strcmp(l, r.c_str()); + } + + template + bool operator!=(const BasicCStringView& r, const CharType* l) + { + return !details::vcpkg_strcmp(l, r.c_str()); + } + + template + bool operator!=(const BasicCStringView& r, const std::basic_string& l) + { + return l != r.c_str(); + } + + template + bool operator!=(const std::basic_string& l, const BasicCStringView& r) + { + return l != r.c_str(); + } + + using CStringView = BasicCStringView; + using CWStringView = BasicCStringView; + + inline const char* to_printf_arg(const CStringView string_view) { return string_view.c_str(); } + + inline const wchar_t* to_wprintf_arg(const CWStringView string_view) { return string_view.c_str(); } + + static_assert(sizeof(CStringView) == sizeof(void*), "CStringView must be a simple wrapper around char*"); + static_assert(sizeof(CWStringView) == sizeof(void*), "CWStringView must be a simple wrapper around wchar_t*"); +} diff --git a/toolsrc/include/vcpkg/base/enums.h b/toolsrc/include/vcpkg/base/enums.h new file mode 100644 index 000000000..6eca2cfe1 --- /dev/null +++ b/toolsrc/include/vcpkg/base/enums.h @@ -0,0 +1,12 @@ +#pragma once + +#include + +#include + +namespace vcpkg::Enums +{ + std::string nullvalue_to_string(const CStringView enum_name); + + [[noreturn]] void nullvalue_used(const LineInfo& line_info, const CStringView enum_name); +} diff --git a/toolsrc/include/vcpkg/base/expected.h b/toolsrc/include/vcpkg/base/expected.h new file mode 100644 index 000000000..a946c442e --- /dev/null +++ b/toolsrc/include/vcpkg/base/expected.h @@ -0,0 +1,115 @@ +#pragma once + +#include + +#include + +namespace vcpkg +{ + template + struct ErrorHolder + { + ErrorHolder() : m_is_error(false) {} + template + ErrorHolder(U&& err) : m_is_error(true), m_err(std::forward(err)) + { + } + + constexpr bool has_error() const { return m_is_error; } + + const Err& error() const { return m_err; } + Err& error() { return m_err; } + + CStringView to_string() const { return "value was error"; } + + private: + bool m_is_error; + Err m_err; + }; + + template<> + struct ErrorHolder + { + ErrorHolder() = default; + ErrorHolder(const std::error_code& err) : m_err(err) {} + + constexpr bool has_error() const { return bool(m_err); } + + const std::error_code& error() const { return m_err; } + std::error_code& error() { return m_err; } + + CStringView to_string() const { return "value was error"; } + + private: + std::error_code m_err; + }; + + template + class ExpectedT + { + public: + constexpr ExpectedT() = default; + + // Constructors are intentionally implicit + + ExpectedT(const S& s) : m_s(s) {} + ExpectedT(S&& s) : m_s(std::move(s)) {} + + ExpectedT(const T& t) : m_t(t) {} + ExpectedT(T&& t) : m_t(std::move(t)) {} + + ExpectedT(const ExpectedT&) = default; + ExpectedT(ExpectedT&&) = default; + ExpectedT& operator=(const ExpectedT&) = default; + ExpectedT& operator=(ExpectedT&&) = default; + + explicit constexpr operator bool() const noexcept { return !m_s.has_error(); } + constexpr bool has_value() const noexcept { return !m_s.has_error(); } + + T&& value_or_exit(const LineInfo& line_info) && + { + exit_if_error(line_info); + return std::move(this->m_t); + } + + const T& value_or_exit(const LineInfo& line_info) const& + { + exit_if_error(line_info); + return this->m_t; + } + + const S& error() const& { return this->m_s.error(); } + + S&& error() && { return std::move(this->m_s.error()); } + + const T* get() const + { + if (!this->has_value()) + { + return nullptr; + } + return &this->m_t; + } + + T* get() + { + if (!this->has_value()) + { + return nullptr; + } + return &this->m_t; + } + + private: + void exit_if_error(const LineInfo& line_info) const + { + Checks::check_exit(line_info, !m_s.has_error(), m_s.to_string()); + } + + ErrorHolder m_s; + T m_t; + }; + + template + using Expected = ExpectedT; +} diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h new file mode 100644 index 000000000..f4bcf742c --- /dev/null +++ b/toolsrc/include/vcpkg/base/files.h @@ -0,0 +1,57 @@ +#pragma once + +#include + +#include + +namespace fs +{ + namespace stdfs = std::experimental::filesystem; + + using stdfs::copy_options; + using stdfs::file_status; + using stdfs::path; + + 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 status_known(file_status s) { return stdfs::status_known(s); } +} + +namespace vcpkg::Files +{ + __interface Filesystem + { + virtual Expected read_contents(const fs::path& file_path) const = 0; + virtual Expected> read_lines(const fs::path& file_path) const = 0; + virtual fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename) const = 0; + virtual std::vector get_files_recursive(const fs::path& dir) const = 0; + virtual std::vector get_files_non_recursive(const fs::path& dir) const = 0; + + virtual void write_lines(const fs::path& file_path, const std::vector& lines) = 0; + virtual void write_contents(const fs::path& file_path, const std::string& data) = 0; + virtual void rename(const fs::path& oldpath, const fs::path& newpath) = 0; + virtual bool remove(const fs::path& path) = 0; + 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 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; + virtual bool is_empty(const fs::path& path) const = 0; + virtual bool create_directory(const fs::path& path, std::error_code& ec) = 0; + virtual bool create_directories(const fs::path& path, std::error_code& ec) = 0; + virtual void copy(const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts) = 0; + virtual bool copy_file( + const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts, std::error_code& ec) = 0; + virtual fs::file_status status(const fs::path& path, std::error_code& ec) const = 0; + }; + + Filesystem& get_real_filesystem(); + + static const char* FILESYSTEM_INVALID_CHARACTERS = R"(\/:*?"<>|)"; + + bool has_invalid_chars_for_filesystem(const std::string& s); + + void print_paths(const std::vector& paths); + + std::vector find_from_PATH(const std::wstring& name); +} diff --git a/toolsrc/include/vcpkg/base/graphs.h b/toolsrc/include/vcpkg/base/graphs.h new file mode 100644 index 000000000..ff56cb298 --- /dev/null +++ b/toolsrc/include/vcpkg/base/graphs.h @@ -0,0 +1,161 @@ +#pragma once + +#include +#include + +#include + +namespace vcpkg::Graphs +{ + enum class ExplorationStatus + { + // We have not visited this vertex + NOT_EXPLORED, + + // We have visited this vertex but haven't visited all vertices in its subtree + PARTIALLY_EXPLORED, + + // We have visited this vertex and all vertices in its subtree + FULLY_EXPLORED + }; + + template + __interface AdjacencyProvider + { + std::vector adjacency_list(const U& vertex) const; + + U load_vertex_data(const V& vertex) const; + }; + + template + static void topological_sort_internal(const V& vertex, + const AdjacencyProvider& f, + std::unordered_map& exploration_status, + std::vector& sorted) + { + ExplorationStatus& status = exploration_status[vertex]; + switch (status) + { + case ExplorationStatus::FULLY_EXPLORED: return; + case ExplorationStatus::PARTIALLY_EXPLORED: Checks::exit_with_message(VCPKG_LINE_INFO, "cycle in graph"); + case ExplorationStatus::NOT_EXPLORED: + { + status = ExplorationStatus::PARTIALLY_EXPLORED; + U vertex_data = f.load_vertex_data(vertex); + for (const V& neighbour : f.adjacency_list(vertex_data)) + topological_sort_internal(neighbour, f, exploration_status, sorted); + + sorted.push_back(std::move(vertex_data)); + status = ExplorationStatus::FULLY_EXPLORED; + return; + } + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + + template + std::vector topological_sort(const std::vector& starting_vertices, const AdjacencyProvider& f) + { + std::vector sorted; + std::unordered_map exploration_status; + + for (auto& vertex : starting_vertices) + { + topological_sort_internal(vertex, f, exploration_status, sorted); + } + + return sorted; + } + + template + struct GraphAdjacencyProvider final : AdjacencyProvider + { + const std::unordered_map>& vertices; + + GraphAdjacencyProvider(const std::unordered_map>& vertices) : vertices(vertices) {} + + std::vector adjacency_list(const V& vertex) const override + { + const std::unordered_set& as_set = this->vertices.at(vertex); + return std::vector(as_set.cbegin(), as_set.cend()); // TODO: Avoid redundant copy + } + + V load_vertex_data(const V& vertex) const override { return vertex; } + }; + + template + struct Graph + { + public: + void add_vertex(V v) { this->vertices[v]; } + + // TODO: Change with iterators + void add_vertices(const std::vector& vs) + { + for (const V& v : vs) + { + this->vertices[v]; + } + } + + void add_edge(V u, V v) + { + this->vertices[v]; + this->vertices[u].insert(v); + } + + std::vector topological_sort() const + { + GraphAdjacencyProvider adjacency_provider{this->vertices}; + std::unordered_map indegrees = count_indegrees(); + + std::vector sorted; + sorted.reserve(indegrees.size()); + + std::unordered_map exploration_status; + exploration_status.reserve(indegrees.size()); + + for (auto& pair : indegrees) + { + if (pair.second == 0) // Starting from vertices with indegree == 0. Not required. + { + V vertex = pair.first; + topological_sort_internal(vertex, adjacency_provider, exploration_status, sorted); + } + } + + return sorted; + } + + std::unordered_map count_indegrees() const + { + std::unordered_map indegrees; + + for (auto& pair : this->vertices) + { + indegrees[pair.first]; + for (V neighbour : pair.second) + { + ++indegrees[neighbour]; + } + } + + return indegrees; + } + + const std::unordered_map>& adjacency_list() const { return this->vertices; } + std::vector vertex_list() const + { + // why no &? it returns 0 + std::vector vertex_list; + for (const auto& vertex : this->vertices) + { + vertex_list.emplace_back(vertex.first); + } + return vertex_list; + } + + private: + std::unordered_map> vertices; + }; +} diff --git a/toolsrc/include/vcpkg/base/lazy.h b/toolsrc/include/vcpkg/base/lazy.h new file mode 100644 index 000000000..58c11c002 --- /dev/null +++ b/toolsrc/include/vcpkg/base/lazy.h @@ -0,0 +1,26 @@ +#pragma once + +namespace vcpkg +{ + template + class Lazy + { + public: + Lazy() : value(T()), initialized(false) {} + + template + T const& get_lazy(const F& f) const + { + if (!initialized) + { + value = f(); + initialized = true; + } + return value; + } + + private: + mutable T value; + mutable bool initialized; + }; +} diff --git a/toolsrc/include/vcpkg/base/lineinfo.h b/toolsrc/include/vcpkg/base/lineinfo.h new file mode 100644 index 000000000..62973462a --- /dev/null +++ b/toolsrc/include/vcpkg/base/lineinfo.h @@ -0,0 +1,19 @@ +#pragma once + +#include + +namespace vcpkg +{ + struct LineInfo + { + int line_number; + const char* file_name; + + constexpr LineInfo() : line_number(0), file_name(nullptr) {} + constexpr LineInfo(const int lineno, const char* filename) : line_number(lineno), file_name(filename) {} + + std::string to_string() const; + }; +} + +#define VCPKG_LINE_INFO vcpkg::LineInfo(__LINE__, __FILE__) diff --git a/toolsrc/include/vcpkg/base/machinetype.h b/toolsrc/include/vcpkg/base/machinetype.h new file mode 100644 index 000000000..b85cdbb0b --- /dev/null +++ b/toolsrc/include/vcpkg/base/machinetype.h @@ -0,0 +1,37 @@ +#pragma once + +#include + +namespace vcpkg +{ + enum class MachineType : uint16_t + { + UNKNOWN = 0x0, // The contents of this field are assumed to be applicable to any machine type + AM33 = 0x1d3, // Matsushita AM33 + AMD64 = 0x8664, // x64 + ARM = 0x1c0, // ARM little endian + ARM64 = 0xaa64, // ARM64 little endian + ARMNT = 0x1c4, // ARM Thumb-2 little endian + EBC = 0xebc, // EFI byte code + I386 = 0x14c, // Intel 386 or later processors and compatible processors + IA64 = 0x200, // Intel Itanium processor family + M32R = 0x9041, // Mitsubishi M32R little endian + MIPS16 = 0x266, // MIPS16 + MIPSFPU = 0x366, // MIPS with FPU + MIPSFPU16 = 0x466, // MIPS16 with FPU + POWERPC = 0x1f0, // Power PC little endian + POWERPCFP = 0x1f1, // Power PC with floating point support + R4000 = 0x166, // MIPS little endian + RISCV32 = 0x5032, // RISC-V 32-bit address space + RISCV64 = 0x5064, // RISC-V 64-bit address space + RISCV128 = 0x5128, // RISC-V 128-bit address space + SH3 = 0x1a2, // Hitachi SH3 + SH3DSP = 0x1a3, // Hitachi SH3 DSP + SH4 = 0x1a6, // Hitachi SH4 + SH5 = 0x1a8, // Hitachi SH5 + THUMB = 0x1c2, // Thumb + WCEMIPSV2 = 0x169, // MIPS little-endian WCE v2 + }; + + MachineType to_machine_type(const uint16_t value); +} diff --git a/toolsrc/include/vcpkg/base/optional.h b/toolsrc/include/vcpkg/base/optional.h new file mode 100644 index 000000000..ff7a210c7 --- /dev/null +++ b/toolsrc/include/vcpkg/base/optional.h @@ -0,0 +1,99 @@ +#pragma once + +#include + +namespace vcpkg +{ + struct NullOpt + { + explicit constexpr NullOpt(int) {} + }; + + const static constexpr NullOpt nullopt{0}; + + template + class Optional + { + public: + constexpr Optional() : m_is_present(false), m_t() {} + + // Constructors are intentionally implicit + constexpr Optional(NullOpt) : m_is_present(false), m_t() {} + + Optional(const T& t) : m_is_present(true), m_t(t) {} + + Optional(T&& t) : m_is_present(true), m_t(std::move(t)) {} + + T&& value_or_exit(const LineInfo& line_info) && + { + this->exit_if_null(line_info); + return std::move(this->m_t); + } + + const T& value_or_exit(const LineInfo& line_info) const& + { + this->exit_if_null(line_info); + return this->m_t; + } + + constexpr explicit operator bool() const { return this->m_is_present; } + + constexpr bool has_value() const { return m_is_present; } + + template + T value_or(U&& default_value) const& + { + return bool(*this) ? this->m_t : static_cast(std::forward(default_value)); + } + + template + T value_or(U&& default_value) && + { + return bool(*this) ? std::move(this->m_t) : static_cast(std::forward(default_value)); + } + + const T* get() const { return bool(*this) ? &this->m_t : nullptr; } + + T* get() { return bool(*this) ? &this->m_t : nullptr; } + + private: + void exit_if_null(const LineInfo& line_info) const + { + Checks::check_exit(line_info, this->m_is_present, "Value was null"); + } + + bool m_is_present; + T m_t; + }; + + template + Optional> make_optional(U&& u) + { + return Optional>(std::forward(u)); + } + + template + bool operator==(const Optional& o, const T& t) + { + if (auto p = o.get()) return *p == t; + return false; + } + template + bool operator==(const T& t, const Optional& o) + { + if (auto p = o.get()) return t == *p; + return false; + } + template + bool operator!=(const Optional& o, const T& t) + { + if (auto p = o.get()) return *p != t; + return true; + } + template + bool operator!=(const T& t, const Optional& o) + { + if (auto p = o.get()) return t != *p; + return true; + } +} diff --git a/toolsrc/include/vcpkg/base/sortedvector.h b/toolsrc/include/vcpkg/base/sortedvector.h new file mode 100644 index 000000000..62808cc2f --- /dev/null +++ b/toolsrc/include/vcpkg/base/sortedvector.h @@ -0,0 +1,50 @@ +#pragma once + +#include +#include + +// Add more forwarding functions to the m_data std::vector as needed. +namespace vcpkg +{ + template + class SortedVector + { + public: + using size_type = typename std::vector::size_type; + using iterator = typename std::vector::const_iterator; + + SortedVector() : m_data() {} + + explicit SortedVector(std::vector v) : m_data(std::move(v)) + { + if (!std::is_sorted(m_data.begin(), m_data.end())) + { + std::sort(m_data.begin(), m_data.end()); + } + } + + template + SortedVector(std::vector v, Compare comp) : m_data(std::move(v)) + { + if (!std::is_sorted(m_data.cbegin(), m_data.cend(), comp)) + { + std::sort(m_data.begin(), m_data.end(), comp); + } + } + + iterator begin() const { return this->m_data.cbegin(); } + + iterator end() const { return this->m_data.cend(); } + + iterator cbegin() const { return this->m_data.cbegin(); } + + iterator cend() const { return this->m_data.cend(); } + + bool empty() const { return this->m_data.empty(); } + + size_type size() const { return this->m_data.size(); } + + private: + std::vector m_data; + }; +} diff --git a/toolsrc/include/vcpkg/base/span.h b/toolsrc/include/vcpkg/base/span.h new file mode 100644 index 000000000..6be546351 --- /dev/null +++ b/toolsrc/include/vcpkg/base/span.h @@ -0,0 +1,60 @@ +#pragma once + +#include +#include +#include +#include + +namespace vcpkg +{ + template + struct Span + { + public: + using element_type = T; + using pointer = T*; + using reference = T&; + using iterator = T*; + + constexpr Span() noexcept : m_ptr(nullptr), m_count(0) {} + constexpr Span(std::nullptr_t) noexcept : Span() {} + constexpr Span(T* ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {} + constexpr Span(T* ptr_begin, T* ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {} + constexpr Span(std::initializer_list l) noexcept : m_ptr(l.begin()), m_count(l.size()) {} + + template + constexpr Span(T (&arr)[N]) noexcept : Span(arr, N) + { + } + + template + constexpr Span(const std::array, N>& arr) noexcept : Span(arr.data(), arr.size()) + { + } + + Span(std::vector& v) noexcept : Span(v.data(), v.size()) {} + Span(const std::vector>& v) noexcept : Span(v.data(), v.size()) {} + + constexpr iterator begin() const { return m_ptr; } + constexpr iterator end() const { return m_ptr + m_count; } + + constexpr reference operator[](size_t i) const { return m_ptr[i]; } + constexpr size_t size() const { return m_count; } + + private: + pointer m_ptr; + size_t m_count; + }; + + template + Span make_span(std::vector& v) + { + return {v.data(), v.size()}; + } + + template + Span make_span(const std::vector& v) + { + return {v.data(), v.size()}; + } +} \ No newline at end of file diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h new file mode 100644 index 000000000..59823deb8 --- /dev/null +++ b/toolsrc/include/vcpkg/base/strings.h @@ -0,0 +1,114 @@ +#pragma once + +#include + +#include + +namespace vcpkg::Strings::details +{ + template + auto to_printf_arg(const T& t) -> decltype(t.to_string()) + { + return t.to_string(); + } + + inline const char* to_printf_arg(const std::string& s) { return s.c_str(); } + + inline const char* to_printf_arg(const char* s) { return s; } + + inline int to_printf_arg(const int s) { return s; } + + inline long long to_printf_arg(const long long s) { return s; } + + inline unsigned long to_printf_arg(const unsigned long s) { return s; } + + inline size_t to_printf_arg(const size_t s) { return s; } + + inline double to_printf_arg(const double s) { return s; } + + std::string format_internal(const char* fmtstr, ...); + + inline const wchar_t* to_wprintf_arg(const std::wstring& s) { return s.c_str(); } + + inline const wchar_t* to_wprintf_arg(const wchar_t* s) { return s; } + + std::wstring wformat_internal(const wchar_t* fmtstr, ...); +} + +namespace vcpkg::Strings +{ + static constexpr const char* EMPTY = ""; + static constexpr const wchar_t* WEMPTY = L""; + + template + std::string format(const char* fmtstr, const Args&... args) + { + using vcpkg::Strings::details::to_printf_arg; + return details::format_internal(fmtstr, to_printf_arg(to_printf_arg(args))...); + } + + template + std::wstring wformat(const wchar_t* fmtstr, const Args&... args) + { + using vcpkg::Strings::details::to_wprintf_arg; + return details::wformat_internal(fmtstr, to_wprintf_arg(to_wprintf_arg(args))...); + } + + std::wstring to_utf16(const CStringView s); + + std::string to_utf8(const CWStringView w); + + std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern); + + bool case_insensitive_ascii_contains(const std::string& s, const std::string& pattern); + + bool case_insensitive_ascii_compare(const CStringView left, const CStringView right); + + std::string ascii_to_lowercase(const std::string& input); + + bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern); + + template + std::basic_string join(const CharType* delimiter, const Container& v, Transformer transformer) + { + const auto begin = v.begin(); + const auto end = v.end(); + + if (begin == end) + { + return std::basic_string(); + } + + std::basic_string output; + output.append(transformer(*begin)); + for (auto it = std::next(begin); it != end; ++it) + { + output.append(delimiter); + output.append(transformer(*it)); + } + + return output; + } + template + std::basic_string join(const CharType* delimiter, const Container& v) + { + using Element = decltype(*v.begin()); + return join(delimiter, v, [](const Element& x) -> const Element& { return x; }); + } + + void trim(std::string* s); + + std::string trimmed(const std::string& s); + + void trim_all_and_remove_whitespace_strings(std::vector* strings); + + std::vector split(const std::string& s, const std::string& delimiter); + + template + std::string serialize(const T& t) + { + std::string ret; + serialize(t, ret); + return ret; + } +} diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h new file mode 100644 index 000000000..a2e8f3f45 --- /dev/null +++ b/toolsrc/include/vcpkg/base/system.h @@ -0,0 +1,108 @@ +#pragma once + +#include +#include +#include + +#include + +namespace vcpkg::System +{ + tm get_current_date_time(); + + fs::path get_exe_path_of_current_process(); + + struct ExitCodeAndOutput + { + int exit_code; + std::string output; + }; + + int cmd_execute_clean(const CWStringView cmd_line); + + int cmd_execute(const CWStringView cmd_line); + + ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line); + + std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args = Strings::WEMPTY); + + enum class Color + { + success = 10, + error = 12, + warning = 14, + }; + + void println(); + void print(const CStringView message); + void println(const CStringView message); + void print(const Color c, const CStringView message); + void println(const Color c, const CStringView message); + + template + void print(const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + { + return System::print(Strings::format(messageTemplate, messageArg1, messageArgs...)); + } + + template + void print(const Color c, const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + { + return System::print(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); + } + + template + void println(const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + { + return System::println(Strings::format(messageTemplate, messageArg1, messageArgs...)); + } + + template + void println(const Color c, const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + { + return System::println(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); + } + + Optional get_environment_variable(const CWStringView varname) noexcept; + + Optional get_registry_string(HKEY base, const CWStringView subkey, const CWStringView valuename); + + enum class CPUArchitecture + { + X86, + X64, + ARM, + ARM64, + }; + + Optional to_cpu_architecture(CStringView arch); + + CPUArchitecture get_host_processor(); + + std::vector get_supported_host_architectures(); + + const fs::path& get_program_files_32_bit(); + + const fs::path& get_program_files_platform_bitness(); +} + +namespace vcpkg::Debug +{ + void println(const CStringView message); + void println(const System::Color c, const CStringView message); + + template + void println(const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + { + return Debug::println(Strings::format(messageTemplate, messageArg1, messageArgs...)); + } + + template + void println(const System::Color c, + const char* messageTemplate, + const Arg1& messageArg1, + const Args&... messageArgs) + { + return Debug::println(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); + } +} diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h new file mode 100644 index 000000000..3834580b6 --- /dev/null +++ b/toolsrc/include/vcpkg/base/util.h @@ -0,0 +1,156 @@ +#pragma once + +#include +#include +#include +#include + +namespace vcpkg::Util +{ + template + using FmapOut = decltype(std::declval()(*begin(std::declval()))); + + template> + std::vector fmap(Cont&& xs, Func&& f) + { + std::vector ret; + ret.reserve(xs.size()); + + for (auto&& x : xs) + ret.push_back(f(x)); + + return ret; + } + + template + using FmapFlattenOut = std::decay_t()(*begin(std::declval()))))>; + + template> + std::vector fmap_flatten(Cont&& xs, Func&& f) + { + std::vector ret; + + for (auto&& x : xs) + for (auto&& y : f(x)) + ret.push_back(std::move(y)); + + return ret; + } + + template + void stable_keep_if(Container& cont, Pred pred) + { + cont.erase(std::stable_partition(cont.begin(), cont.end(), pred), cont.end()); + } + + template + void unstable_keep_if(Container& cont, Pred pred) + { + cont.erase(std::partition(cont.begin(), cont.end(), pred), cont.end()); + } + + template + void erase_remove_if(Container& cont, Pred pred) + { + cont.erase(std::remove_if(cont.begin(), cont.end(), pred), cont.end()); + } + + template + auto find(Container&& cont, V&& v) + { + using std::begin; + using std::end; + return std::find(begin(cont), end(cont), v); + } + + template + auto find_if(Container&& cont, Pred pred) + { + using std::begin; + using std::end; + return std::find_if(begin(cont), end(cont), pred); + } + + template + using ElementT = std::remove_reference_t()))>; + + template> + std::vector element_pointers(Container&& cont) + { + return fmap(cont, [](auto&& x) { return &x; }); + } + + template + auto find_if_not(Container&& cont, Pred pred) + { + using std::begin; + using std::end; + return std::find_if_not(begin(cont), end(cont), pred); + } + + template + void group_by(const Container& cont, _Inout_ std::map>* output, Func&& f) + { + for (const V& element : cont) + { + K key = f(element); + (*output)[key].push_back(&element); + } + } + + template())->first)>> + std::vector extract_keys(AssocContainer&& input_map) + { + return fmap(input_map, [](auto&& p) { return p.first; }); + } + + struct MoveOnlyBase + { + MoveOnlyBase() = default; + MoveOnlyBase(const MoveOnlyBase&) = delete; + MoveOnlyBase(MoveOnlyBase&&) = default; + + MoveOnlyBase& operator=(const MoveOnlyBase&) = delete; + MoveOnlyBase& operator=(MoveOnlyBase&&) = default; + }; + + struct ResourceBase + { + ResourceBase() = default; + ResourceBase(const ResourceBase&) = delete; + ResourceBase(ResourceBase&&) = delete; + + ResourceBase& operator=(const ResourceBase&) = delete; + ResourceBase& operator=(ResourceBase&&) = delete; + }; + + template + struct LockGuardPtr; + + template + struct LockGuarded + { + friend struct LockGuardPtr; + + LockGuardPtr lock() { return *this; } + + private: + std::mutex m_mutex; + T m_t; + }; + + template + struct LockGuardPtr + { + T& operator*() { return m_ptr; } + T* operator->() { return &m_ptr; } + + T* get() { return &m_ptr; } + + LockGuardPtr(LockGuarded& sync) : m_lock(sync.m_mutex), m_ptr(sync.m_t) {} + + private: + std::unique_lock m_lock; + T& m_ptr; + }; +} \ No newline at end of file diff --git a/toolsrc/include/vcpkg/binaryparagraph.h b/toolsrc/include/vcpkg/binaryparagraph.h new file mode 100644 index 000000000..7eb50a6d7 --- /dev/null +++ b/toolsrc/include/vcpkg/binaryparagraph.h @@ -0,0 +1,42 @@ +#pragma once + +#include +#include + +#include + +namespace vcpkg +{ + /// + /// Built package metadata + /// + struct BinaryParagraph + { + BinaryParagraph(); + explicit BinaryParagraph(std::unordered_map fields); + BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet); + BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet); + + std::string displayname() const; + + std::string fullstem() const; + + std::string dir() const; + + PackageSpec spec; + std::string version; + std::string description; + std::string maintainer; + std::string feature; + std::vector default_features; + std::vector depends; + }; + + struct BinaryControlFile + { + BinaryParagraph core_paragraph; + std::vector features; + }; + + void serialize(const BinaryParagraph& pgh, std::string& out_str); +} \ No newline at end of file diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h new file mode 100644 index 000000000..f146e9951 --- /dev/null +++ b/toolsrc/include/vcpkg/build.h @@ -0,0 +1,205 @@ +#pragma once + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +namespace vcpkg::Build +{ + namespace Command + { + void perform_and_exit(const FullPackageSpec& full_spec, + const fs::path& port_dir, + const std::unordered_set& options, + const VcpkgPaths& paths); + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); + } + + enum class UseHeadVersion + { + NO = 0, + YES + }; + + inline UseHeadVersion to_use_head_version(const bool value) + { + return value ? UseHeadVersion::YES : UseHeadVersion::NO; + } + + inline bool to_bool(const UseHeadVersion value) { return value == UseHeadVersion::YES; } + + enum class AllowDownloads + { + NO = 0, + YES + }; + + inline AllowDownloads to_allow_downloads(const bool value) + { + return value ? AllowDownloads::YES : AllowDownloads::NO; + } + + inline bool to_bool(const AllowDownloads value) { return value == AllowDownloads::YES; } + + struct BuildPackageOptions + { + UseHeadVersion use_head_version; + AllowDownloads allow_downloads; + }; + + enum class BuildResult + { + NULLVALUE = 0, + SUCCEEDED, + BUILD_FAILED, + POST_BUILD_CHECKS_FAILED, + FILE_CONFLICTS, + CASCADED_DUE_TO_MISSING_DEPENDENCIES + }; + + static constexpr std::array BUILD_RESULT_VALUES = { + BuildResult::SUCCEEDED, + BuildResult::BUILD_FAILED, + BuildResult::POST_BUILD_CHECKS_FAILED, + BuildResult::FILE_CONFLICTS, + BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES}; + + const std::string& to_string(const BuildResult build_result); + std::string create_error_message(const BuildResult build_result, const PackageSpec& spec); + std::string create_user_troubleshooting_message(const PackageSpec& spec); + + /// + /// 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 target_architecture; + std::string cmake_system_name; + std::string cmake_system_version; + Optional platform_toolset; + Optional visual_studio_path; + }; + + std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); + + struct ExtendedBuildResult + { + BuildResult code; + std::vector unmet_dependencies; + }; + + struct BuildPackageConfig + { + BuildPackageConfig(const SourceParagraph& src, + const Triplet& triplet, + fs::path&& port_dir, + const BuildPackageOptions& build_package_options) + : src(src) + , scf(nullptr) + , triplet(triplet) + , port_dir(std::move(port_dir)) + , build_package_options(build_package_options) + , feature_list(nullptr) + { + } + + BuildPackageConfig(const SourceControlFile& src, + const Triplet& triplet, + fs::path&& port_dir, + const BuildPackageOptions& build_package_options, + const std::unordered_set& feature_list) + : src(*src.core_paragraph) + , scf(&src) + , triplet(triplet) + , port_dir(std::move(port_dir)) + , build_package_options(build_package_options) + , feature_list(&feature_list) + { + } + + const SourceParagraph& src; + const SourceControlFile* scf; + const Triplet& triplet; + fs::path port_dir; + const BuildPackageOptions& build_package_options; + const std::unordered_set* feature_list; + }; + + ExtendedBuildResult build_package(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const StatusParagraphs& status_db); + + enum class BuildPolicy + { + EMPTY_PACKAGE, + DLLS_WITHOUT_LIBS, + ONLY_RELEASE_CRT, + EMPTY_INCLUDE_FOLDER, + ALLOW_OBSOLETE_MSVCRT, + // Must be last + COUNT, + }; + + constexpr std::array G_ALL_POLICIES = { + BuildPolicy::EMPTY_PACKAGE, + BuildPolicy::DLLS_WITHOUT_LIBS, + BuildPolicy::ONLY_RELEASE_CRT, + BuildPolicy::EMPTY_INCLUDE_FOLDER, + BuildPolicy::ALLOW_OBSOLETE_MSVCRT, + }; + + const std::string& to_string(BuildPolicy policy); + CStringView to_cmake_variable(BuildPolicy policy); + + struct BuildPolicies + { + BuildPolicies() = default; + BuildPolicies(std::map&& map) : m_policies(std::move(map)) {} + + bool is_enabled(BuildPolicy policy) const + { + const auto it = m_policies.find(policy); + if (it != m_policies.cend()) return it->second; + return false; + } + + private: + std::map m_policies; + }; + + enum class LinkageType : char + { + DYNAMIC, + STATIC, + }; + + Optional to_linkage_type(const std::string& str); + + struct BuildInfo + { + LinkageType crt_linkage; + LinkageType library_linkage; + + Optional version; + + BuildPolicies policies; + }; + + BuildInfo read_build_info(const Files::Filesystem& fs, const fs::path& filepath); +} diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h new file mode 100644 index 000000000..64b2118ce --- /dev/null +++ b/toolsrc/include/vcpkg/commands.h @@ -0,0 +1,134 @@ +#pragma once + +#include +#include +#include +#include +#include + +#include + +namespace vcpkg::Commands +{ + using CommandTypeA = void (*)(const VcpkgCmdArguments& args, + const VcpkgPaths& paths, + const Triplet& default_triplet); + using CommandTypeB = void (*)(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + using CommandTypeC = void (*)(const VcpkgCmdArguments& args); + + namespace BuildExternal + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); + } + + namespace CI + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); + } + + namespace Env + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); + } + + namespace Create + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + + namespace Edit + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + + namespace DependInfo + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + + namespace Search + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + + namespace List + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + + namespace Owns + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + + namespace Cache + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + + namespace Import + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + + namespace Integrate + { + extern const char* const INTEGRATE_COMMAND_HELPSTRING; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + + namespace PortsDiff + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + + namespace Autocomplete + { + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + + namespace Version + { + const std::string& version(); + void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths); + void perform_and_exit(const VcpkgCmdArguments& args); + } + + namespace Contact + { + const std::string& email(); + void perform_and_exit(const VcpkgCmdArguments& args); + } + + namespace Hash + { + void perform_and_exit(const VcpkgCmdArguments& args); + } + + template + struct PackageNameAndFunction + { + std::string name; + T function; + }; + + Span> get_available_commands_type_a(); + Span> get_available_commands_type_b(); + Span> get_available_commands_type_c(); + + template + T find(const std::string& command_name, const std::vector> available_commands) + { + for (const PackageNameAndFunction& cmd : available_commands) + { + if (cmd.name == command_name) + { + return cmd.function; + } + } + + // not found + return nullptr; + } +} diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h new file mode 100644 index 000000000..2301dbc36 --- /dev/null +++ b/toolsrc/include/vcpkg/dependencies.h @@ -0,0 +1,149 @@ +#pragma once + +#include +#include +#include +#include +#include +#include + +#include + +namespace vcpkg::Dependencies +{ + enum class RequestType + { + UNKNOWN, + USER_REQUESTED, + AUTO_SELECTED + }; + + std::string to_output_string(RequestType request_type, const CStringView s); + + struct AnyParagraph + { + std::vector dependencies(const Triplet& triplet) const; + + Optional status_paragraph; + Optional binary_control_file; + Optional source_paragraph; + Optional source_control_file; + }; +} + +namespace vcpkg::Dependencies +{ + enum class InstallPlanType + { + UNKNOWN, + BUILD_AND_INSTALL, + INSTALL, + ALREADY_INSTALLED + }; + + struct InstallPlanAction : Util::MoveOnlyBase + { + static bool compare_by_name(const InstallPlanAction* left, const InstallPlanAction* right); + + InstallPlanAction(); + + InstallPlanAction(const PackageSpec& spec, + const std::unordered_set& features, + const RequestType& request_type); + InstallPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type); + InstallPlanAction(const PackageSpec& spec, + const SourceControlFile& any_paragraph, + const std::unordered_set& features, + const RequestType& request_type); + + std::string displayname() const; + + PackageSpec spec; + AnyParagraph any_paragraph; + InstallPlanType plan_type; + RequestType request_type; + std::unordered_set feature_list; + }; + + enum class RemovePlanType + { + UNKNOWN, + NOT_INSTALLED, + REMOVE + }; + + struct RemovePlanAction : Util::MoveOnlyBase + { + static bool compare_by_name(const RemovePlanAction* left, const RemovePlanAction* right); + + RemovePlanAction(); + RemovePlanAction(const PackageSpec& spec, const RemovePlanType& plan_type, const RequestType& request_type); + + PackageSpec spec; + RemovePlanType plan_type; + RequestType request_type; + }; + + struct AnyAction + { + AnyAction(InstallPlanAction&& iplan) : install_plan(std::move(iplan)) {} + AnyAction(RemovePlanAction&& rplan) : remove_plan(std::move(rplan)) {} + + Optional install_plan; + Optional remove_plan; + + const PackageSpec& spec() const; + }; + + enum class ExportPlanType + { + UNKNOWN, + PORT_AVAILABLE_BUT_NOT_BUILT, + ALREADY_BUILT + }; + + struct ExportPlanAction : Util::MoveOnlyBase + { + static bool compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right); + + ExportPlanAction(); + ExportPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type); + + PackageSpec spec; + AnyParagraph any_paragraph; + ExportPlanType plan_type; + RequestType request_type; + }; + + __interface PortFileProvider { virtual const SourceControlFile& get_control_file(const std::string& spec) const; }; + + struct MapPortFile : Util::ResourceBase, PortFileProvider + { + const std::unordered_map& ports; + explicit MapPortFile(const std::unordered_map& map); + const SourceControlFile& get_control_file(const std::string& spec) const override; + }; + + struct PathsPortFile : Util::ResourceBase, PortFileProvider + { + const VcpkgPaths& ports; + mutable std::unordered_map cache; + explicit PathsPortFile(const VcpkgPaths& paths); + const SourceControlFile& get_control_file(const std::string& spec) const override; + }; + + std::vector create_install_plan(const PortFileProvider& port_file_provider, + const std::vector& specs, + const StatusParagraphs& status_db); + + std::vector create_remove_plan(const std::vector& specs, + const StatusParagraphs& status_db); + + std::vector create_export_plan(const VcpkgPaths& paths, + const std::vector& specs, + const StatusParagraphs& status_db); + + 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/export.h b/toolsrc/include/vcpkg/export.h new file mode 100644 index 000000000..f3285e187 --- /dev/null +++ b/toolsrc/include/vcpkg/export.h @@ -0,0 +1,10 @@ +#pragma once + +#include + +namespace vcpkg::Export +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); + + void export_integration_files(const fs::path& raw_exported_dir_path, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/export.ifw.h b/toolsrc/include/vcpkg/export.ifw.h new file mode 100644 index 000000000..d28a4436d --- /dev/null +++ b/toolsrc/include/vcpkg/export.ifw.h @@ -0,0 +1,26 @@ +#pragma once + +#include +#include + +#include + +#include +#include + +namespace vcpkg::Export::IFW +{ + struct Options + { + Optional maybe_repository_url; + Optional maybe_packages_dir_path; + Optional maybe_repository_dir_path; + Optional maybe_config_file_path; + Optional maybe_installer_file_path; + }; + + void do_export(const std::vector& export_plan, + const std::string& export_id, + const Options& ifw_options, + const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/globalstate.h b/toolsrc/include/vcpkg/globalstate.h new file mode 100644 index 000000000..7cea361cf --- /dev/null +++ b/toolsrc/include/vcpkg/globalstate.h @@ -0,0 +1,19 @@ +#pragma once + +#include +#include + +#include + +namespace vcpkg +{ + struct GlobalState + { + static Util::LockGuarded timer; + static std::atomic debugging; + static std::atomic feature_packages; + + static std::atomic g_init_console_cp; + static std::atomic g_init_console_output_cp; + }; +} \ No newline at end of file diff --git a/toolsrc/include/vcpkg/help.h b/toolsrc/include/vcpkg/help.h new file mode 100644 index 000000000..39ad6912d --- /dev/null +++ b/toolsrc/include/vcpkg/help.h @@ -0,0 +1,19 @@ +#pragma once + +#include +#include + +#include + +namespace vcpkg::Help +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + + void help_topic_valid_triplet(const VcpkgPaths& paths); + + void print_usage(); + + void print_example(const std::string& command_and_arguments); + + std::string create_example_string(const std::string& command_and_arguments); +} diff --git a/toolsrc/include/vcpkg/input.h b/toolsrc/include/vcpkg/input.h new file mode 100644 index 000000000..621139427 --- /dev/null +++ b/toolsrc/include/vcpkg/input.h @@ -0,0 +1,15 @@ +#pragma once + +#include + +namespace vcpkg::Input +{ + PackageSpec check_and_get_package_spec(const std::string& package_spec_as_string, + const Triplet& default_triplet, + CStringView example_text); + FullPackageSpec check_and_get_full_package_spec(const std::string& full_package_spec_as_string, + const Triplet& default_triplet, + CStringView example_text); + + void check_triplet(const Triplet& t, const VcpkgPaths& paths); +} diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h new file mode 100644 index 000000000..02600b7f5 --- /dev/null +++ b/toolsrc/include/vcpkg/install.h @@ -0,0 +1,69 @@ +#pragma once + +#include +#include +#include +#include + +#include + +namespace vcpkg::Install +{ + enum class KeepGoing + { + NO = 0, + YES + }; + + inline KeepGoing to_keep_going(const bool value) { return value ? KeepGoing::YES : KeepGoing::NO; } + + enum class PrintSummary + { + NO = 0, + YES + }; + + inline PrintSummary to_print_summary(const bool value) { return value ? PrintSummary::YES : PrintSummary::NO; } + + struct InstallDir + { + static InstallDir from_destination_root(const fs::path& destination_root, + const std::string& destination_subdirectory, + const fs::path& listfile); + + private: + fs::path m_destination; + std::string m_destination_subdirectory; + fs::path m_listfile; + + public: + const fs::path& destination() const; + const std::string& destination_subdirectory() const; + const fs::path& listfile() const; + }; + + Build::BuildResult perform_install_plan_action(const VcpkgPaths& paths, + const Dependencies::InstallPlanAction& action, + const Build::BuildPackageOptions& install_plan_options, + StatusParagraphs& status_db); + + enum class InstallResult + { + FILE_CONFLICTS, + SUCCESS, + }; + + void install_files_and_write_listfile(Files::Filesystem& fs, const fs::path& source_dir, const InstallDir& dirs); + InstallResult install_package(const VcpkgPaths& paths, + const BinaryControlFile& binary_paragraph, + StatusParagraphs* status_db); + + void perform_and_exit_ex(const std::vector& action_plan, + const Build::BuildPackageOptions& install_plan_options, + const KeepGoing keep_going, + const PrintSummary print_summary, + const VcpkgPaths& paths, + StatusParagraphs& status_db); + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); +} diff --git a/toolsrc/include/vcpkg/metrics.h b/toolsrc/include/vcpkg/metrics.h new file mode 100644 index 000000000..41be5002d --- /dev/null +++ b/toolsrc/include/vcpkg/metrics.h @@ -0,0 +1,28 @@ +#pragma once + +#include + +#include + +namespace vcpkg::Metrics +{ + struct Metrics : Util::ResourceBase + { + void set_send_metrics(bool should_send_metrics); + void set_print_metrics(bool should_print_metrics); + void set_user_information(const std::string& user_id, const std::string& first_use_time); + void init_user_information(std::string& user_id, std::string& first_use_time); + + void track_metric(const std::string& name, double value); + void track_property(const std::string& name, const std::string& value); + void track_property(const std::string& name, const std::wstring& value); + + void upload(const std::string& payload); + void flush(); + }; + + extern Util::LockGuarded g_metrics; + + std::wstring get_SQM_user(); + bool get_compiled_metrics_enabled(); +} diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h new file mode 100644 index 000000000..ee34f14a3 --- /dev/null +++ b/toolsrc/include/vcpkg/packagespec.h @@ -0,0 +1,95 @@ +#pragma once + +#include +#include +#include + +namespace vcpkg +{ + struct ParsedSpecifier + { + std::string name; + std::vector features; + std::string triplet; + + static ExpectedT from_string(const std::string& input); + }; + + struct PackageSpec + { + static ExpectedT from_name_and_triplet(const std::string& name, + const Triplet& triplet); + + const std::string& name() const; + + const Triplet& triplet() const; + + std::string dir() const; + + std::string to_string() const; + + private: + std::string m_name; + Triplet m_triplet; + }; + + struct FeatureSpec + { + FeatureSpec(const PackageSpec& spec, const std::string& feature) : m_spec(spec), m_feature(feature) {} + + const std::string& name() const { return m_spec.name(); } + const std::string& feature() const { return m_feature; } + const Triplet& triplet() const { return m_spec.triplet(); } + + const PackageSpec& spec() const { return m_spec; } + + std::string to_string() const; + + static std::vector from_strings_and_triplet(const std::vector& depends, + const Triplet& t); + + private: + PackageSpec m_spec; + std::string m_feature; + }; + + struct FullPackageSpec + { + PackageSpec package_spec; + std::vector features; + + static std::vector to_feature_specs(const std::vector& specs); + + static ExpectedT from_string(const std::string& spec_as_string, + const Triplet& default_triplet); + }; + + struct Features + { + std::string name; + std::vector features; + + static ExpectedT from_string(const std::string& input); + }; + + bool operator==(const PackageSpec& left, const PackageSpec& right); + bool operator!=(const PackageSpec& left, const PackageSpec& right); +} + +template<> +struct std::hash +{ + size_t operator()(const vcpkg::PackageSpec& value) const + { + size_t hash = 17; + hash = hash * 31 + std::hash()(value.name()); + hash = hash * 31 + std::hash()(value.triplet()); + return hash; + } +}; + +template<> +struct std::equal_to +{ + bool operator()(const vcpkg::PackageSpec& left, const vcpkg::PackageSpec& right) const { return left == right; } +}; diff --git a/toolsrc/include/vcpkg/packagespecparseresult.h b/toolsrc/include/vcpkg/packagespecparseresult.h new file mode 100644 index 000000000..8a56574fd --- /dev/null +++ b/toolsrc/include/vcpkg/packagespecparseresult.h @@ -0,0 +1,33 @@ +#pragma once + +#include +#include + +namespace vcpkg +{ + enum class PackageSpecParseResult + { + SUCCESS = 0, + TOO_MANY_COLONS, + INVALID_CHARACTERS + }; + + CStringView to_string(PackageSpecParseResult ev) noexcept; + + template<> + struct ErrorHolder + { + ErrorHolder() : m_err(PackageSpecParseResult::SUCCESS) {} + ErrorHolder(PackageSpecParseResult err) : m_err(err) {} + + constexpr bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; } + + const PackageSpecParseResult& error() const { return m_err; } + PackageSpecParseResult& error() { return m_err; } + + CStringView to_string() const { return vcpkg::to_string(m_err); } + + private: + PackageSpecParseResult m_err; + }; +} diff --git a/toolsrc/include/vcpkg/paragraphparseresult.h b/toolsrc/include/vcpkg/paragraphparseresult.h new file mode 100644 index 000000000..abdd9eecd --- /dev/null +++ b/toolsrc/include/vcpkg/paragraphparseresult.h @@ -0,0 +1,33 @@ +#pragma once + +#include + +namespace vcpkg +{ + enum class ParagraphParseResult + { + SUCCESS = 0, + EXPECTED_ONE_PARAGRAPH + }; + + struct ParagraphParseResultCategoryImpl final : std::error_category + { + virtual const char* name() const noexcept override; + + virtual std::string message(int ev) const noexcept override; + }; + + const std::error_category& paragraph_parse_result_category(); + + std::error_code make_error_code(ParagraphParseResult e); + + ParagraphParseResult to_paragraph_parse_result(int i); + + ParagraphParseResult to_paragraph_parse_result(std::error_code ec); +} + +// Enable implicit conversion to std::error_code +template<> +struct std::is_error_code_enum : ::std::true_type +{ +}; diff --git a/toolsrc/include/vcpkg/paragraphs.h b/toolsrc/include/vcpkg/paragraphs.h new file mode 100644 index 000000000..c8dbea646 --- /dev/null +++ b/toolsrc/include/vcpkg/paragraphs.h @@ -0,0 +1,38 @@ +#pragma once + +#include +#include +#include +#include + +#include + +#include + +namespace vcpkg::Paragraphs +{ + using RawParagraph = Parse::RawParagraph; + + Expected get_single_paragraph(const Files::Filesystem& fs, const fs::path& control_path); + Expected> get_paragraphs(const Files::Filesystem& fs, const fs::path& control_path); + Expected parse_single_paragraph(const std::string& str); + Expected> parse_paragraphs(const std::string& str); + + Parse::ParseExpected try_load_port(const Files::Filesystem& fs, const fs::path& control_path); + + Expected try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec); + + struct LoadResults + { + std::vector> paragraphs; + std::vector> errors; + }; + + LoadResults try_load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); + + std::vector> load_all_ports(const Files::Filesystem& fs, + const fs::path& ports_dir); + + std::map load_all_port_names_and_versions(const Files::Filesystem& fs, + const fs::path& ports_dir); +} diff --git a/toolsrc/include/vcpkg/parse.h b/toolsrc/include/vcpkg/parse.h new file mode 100644 index 000000000..4b33e302e --- /dev/null +++ b/toolsrc/include/vcpkg/parse.h @@ -0,0 +1,38 @@ +#pragma once + +#include +#include + +#include +#include + +namespace vcpkg::Parse +{ + struct ParseControlErrorInfo + { + std::string name; + std::vector missing_fields; + std::vector extra_fields; + std::error_code error; + }; + + template + using ParseExpected = ExpectedT, std::unique_ptr>; + + using RawParagraph = std::unordered_map; + + struct ParagraphParser + { + ParagraphParser(RawParagraph&& fields) : fields(std::move(fields)) {} + + void required_field(const std::string& fieldname, std::string& out); + std::string optional_field(const std::string& fieldname) const; + std::unique_ptr error_info(const std::string& name) const; + + private: + RawParagraph&& fields; + std::vector missing_fields; + }; + + std::vector parse_comma_list(const std::string& str); +} diff --git a/toolsrc/include/vcpkg/postbuildlint.buildtype.h b/toolsrc/include/vcpkg/postbuildlint.buildtype.h new file mode 100644 index 000000000..ff651fd7a --- /dev/null +++ b/toolsrc/include/vcpkg/postbuildlint.buildtype.h @@ -0,0 +1,68 @@ +#pragma once + +#include +#include + +#include +#include + +namespace vcpkg::PostBuildLint +{ + enum class ConfigurationType + { + DEBUG, + RELEASE, + }; + + struct BuildType + { + enum class BackingEnum + { + DEBUG_STATIC = 1, + DEBUG_DYNAMIC, + RELEASE_STATIC, + RELEASE_DYNAMIC + }; + + static BuildType value_of(const ConfigurationType& config, const Build::LinkageType& linkage); + + BuildType() = delete; + + constexpr BuildType(const BackingEnum backing_enum, + const ConfigurationType config, + const Build::LinkageType linkage) + : backing_enum(backing_enum), m_config(config), m_linkage(linkage) + { + } + + constexpr operator BackingEnum() const { return backing_enum; } + + const ConfigurationType& config() const; + const Build::LinkageType& linkage() const; + const std::regex& crt_regex() const; + const std::string& to_string() const; + + private: + BackingEnum backing_enum; + ConfigurationType m_config; + Build::LinkageType m_linkage; + }; + + namespace BuildTypeC + { + using Build::LinkageType; + using BE = BuildType::BackingEnum; + + static constexpr CStringView ENUM_NAME = "vcpkg::PostBuildLint::BuildType"; + + static constexpr BuildType DEBUG_STATIC = {BE::DEBUG_STATIC, ConfigurationType::DEBUG, LinkageType::STATIC}; + static constexpr BuildType DEBUG_DYNAMIC = {BE::DEBUG_DYNAMIC, ConfigurationType::DEBUG, LinkageType::DYNAMIC}; + static constexpr BuildType RELEASE_STATIC = { + BE::RELEASE_STATIC, ConfigurationType::RELEASE, LinkageType::STATIC}; + static constexpr BuildType RELEASE_DYNAMIC = { + BE::RELEASE_DYNAMIC, ConfigurationType::RELEASE, LinkageType::DYNAMIC}; + + static constexpr std::array VALUES = { + DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC}; + } +} diff --git a/toolsrc/include/vcpkg/postbuildlint.h b/toolsrc/include/vcpkg/postbuildlint.h new file mode 100644 index 000000000..5dcfeb8df --- /dev/null +++ b/toolsrc/include/vcpkg/postbuildlint.h @@ -0,0 +1,13 @@ +#pragma once + +#include +#include +#include + +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); +} diff --git a/toolsrc/include/vcpkg/remove.h b/toolsrc/include/vcpkg/remove.h new file mode 100644 index 000000000..f4d381ca3 --- /dev/null +++ b/toolsrc/include/vcpkg/remove.h @@ -0,0 +1,24 @@ +#pragma once + +#include +#include +#include + +namespace vcpkg::Remove +{ + enum class Purge + { + NO = 0, + YES + }; + + inline Purge to_purge(const bool value) { return value ? Purge::YES : Purge::NO; } + + void perform_remove_plan_action(const VcpkgPaths& paths, + const Dependencies::RemovePlanAction& action, + const Purge purge, + StatusParagraphs& status_db); + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); + void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db); +} diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h new file mode 100644 index 000000000..0a02e4cda --- /dev/null +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -0,0 +1,97 @@ +#pragma once + +#include +#include + +#include +#include +#include + +#include +#include + +namespace vcpkg +{ + struct Dependency + { + Features depend; + std::string qualifier; + + std::string name() const; + static Dependency parse_dependency(std::string name, std::string qualifier); + }; + + std::vector filter_dependencies(const std::vector& deps, const Triplet& t); + std::vector filter_dependencies_to_specs(const std::vector& deps, const Triplet& t); + + // zlib[uwp] becomes Dependency{"zlib", "uwp"} + std::vector expand_qualified_dependencies(const std::vector& depends); + + std::string to_string(const Dependency& dep); + + struct FeatureParagraph + { + std::string name; + std::string description; + std::vector depends; + }; + + /// + /// Port metadata (CONTROL file) + /// + struct SourceParagraph + { + std::string name; + std::string version; + std::string description; + std::string maintainer; + std::vector supports; + std::vector depends; + std::vector default_features; + }; + struct SourceControlFile + { + static Parse::ParseExpected parse_control_file( + std::vector&& control_paragraphs); + + std::unique_ptr core_paragraph; + std::vector> feature_paragraphs; + }; + + void print_error_message(Span> error_info_list); + inline void print_error_message(const std::unique_ptr& error_info_list) + { + return print_error_message({&error_info_list, 1}); + } + + struct Supports + { + static ExpectedT> parse(const std::vector& strs); + + using Architecture = System::CPUArchitecture; + + enum class Platform + { + WINDOWS, + UWP, + }; + enum class Linkage + { + DYNAMIC, + STATIC, + }; + enum class ToolsetVersion + { + V140, + V141, + }; + + bool is_supported(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools); + + private: + std::vector architectures; + std::vector platforms; + std::vector crt_linkages; + std::vector toolsets; + }; +} diff --git a/toolsrc/include/vcpkg/statusparagraph.h b/toolsrc/include/vcpkg/statusparagraph.h new file mode 100644 index 000000000..ca84b1bb7 --- /dev/null +++ b/toolsrc/include/vcpkg/statusparagraph.h @@ -0,0 +1,45 @@ +#pragma once + +#include + +#include + +namespace vcpkg +{ + enum class InstallState + { + ERROR_STATE, + NOT_INSTALLED, + HALF_INSTALLED, + INSTALLED, + }; + + enum class Want + { + ERROR_STATE, + UNKNOWN, + INSTALL, + HOLD, + DEINSTALL, + PURGE + }; + + /// + /// Installed package metadata + /// + struct StatusParagraph + { + StatusParagraph(); + explicit StatusParagraph(std::unordered_map&& fields); + + BinaryParagraph package; + Want want; + InstallState state; + }; + + void serialize(const StatusParagraph& pgh, std::string& out_str); + + std::string to_string(InstallState f); + + std::string to_string(Want f); +} diff --git a/toolsrc/include/vcpkg/statusparagraphs.h b/toolsrc/include/vcpkg/statusparagraphs.h new file mode 100644 index 000000000..c2f3b7b8e --- /dev/null +++ b/toolsrc/include/vcpkg/statusparagraphs.h @@ -0,0 +1,47 @@ +#pragma once +#include + +#include +#include + +namespace vcpkg +{ + struct StatusParagraphs + { + StatusParagraphs(); + explicit StatusParagraphs(std::vector>&& ps); + + using container = std::vector>; + using iterator = container::reverse_iterator; + using const_iterator = container::const_reverse_iterator; + + const_iterator find(const PackageSpec& spec) const { return find(spec.name(), spec.triplet()); } + const_iterator find(const std::string& name, const Triplet& triplet) const; + iterator find(const std::string& name, const Triplet& triplet); + std::vector*> find_all(const std::string& name, const Triplet& triplet); + iterator find(const std::string& name, const Triplet& triplet, const std::string& feature); + + const_iterator find_installed(const PackageSpec& spec) const + { + return find_installed(spec.name(), spec.triplet()); + } + const_iterator find_installed(const std::string& name, const Triplet& triplet) const; + + iterator insert(std::unique_ptr); + + friend void serialize(const StatusParagraphs& pgh, std::string& out_str); + + iterator end() { return paragraphs.rend(); } + + const_iterator end() const { return paragraphs.rend(); } + + iterator begin() { return paragraphs.rbegin(); } + + const_iterator begin() const { return paragraphs.rbegin(); } + + private: + std::vector> paragraphs; + }; + + void serialize(const StatusParagraphs& pgh, std::string& out_str); +} diff --git a/toolsrc/include/vcpkg/triplet.h b/toolsrc/include/vcpkg/triplet.h new file mode 100644 index 000000000..46a52f8e6 --- /dev/null +++ b/toolsrc/include/vcpkg/triplet.h @@ -0,0 +1,43 @@ +#pragma once + +#include + +namespace vcpkg +{ + struct TripletInstance; + + struct Triplet + { + public: + constexpr Triplet() : m_instance(&DEFAULT_INSTANCE) {} + + static Triplet from_canonical_name(const std::string& triplet_as_string); + + static const Triplet X86_WINDOWS; + static const Triplet X64_WINDOWS; + static const Triplet X86_UWP; + static const Triplet X64_UWP; + static const Triplet ARM_UWP; + + const std::string& canonical_name() const; + const std::string& to_string() const; + size_t hash_code() const; + + bool operator==(const Triplet& other) const; + + private: + static const TripletInstance DEFAULT_INSTANCE; + + constexpr Triplet(const TripletInstance* ptr) : m_instance(ptr) {} + + const TripletInstance* m_instance; + }; + + bool operator!=(const Triplet& left, const Triplet& right); +} + +template<> +struct std::hash +{ + size_t operator()(const vcpkg::Triplet& t) const { return t.hash_code(); } +}; diff --git a/toolsrc/include/vcpkg/update.h b/toolsrc/include/vcpkg/update.h new file mode 100644 index 000000000..e7303d1b0 --- /dev/null +++ b/toolsrc/include/vcpkg/update.h @@ -0,0 +1,21 @@ +#pragma once + +#include +#include +#include +#include +#include + +namespace vcpkg::Update +{ + struct OutdatedPackage + { + static bool compare_by_name(const OutdatedPackage& left, const OutdatedPackage& right); + + PackageSpec spec; + VersionDiff version_diff; + }; + + std::vector find_outdated_packages(const VcpkgPaths& paths, const StatusParagraphs& status_db); + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); +} \ No newline at end of file diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h new file mode 100644 index 000000000..6c47b98f6 --- /dev/null +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -0,0 +1,50 @@ +#pragma once + +#include + +#include +#include +#include +#include + +namespace vcpkg +{ + struct ParsedArguments + { + std::unordered_set switches; + std::unordered_map settings; + }; + + struct VcpkgCmdArguments + { + static VcpkgCmdArguments create_from_command_line(const int argc, const wchar_t* const* const argv); + 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 triplet; + Optional debug = nullopt; + Optional sendmetrics = nullopt; + Optional printmetrics = nullopt; + + std::string command; + std::vector command_arguments; + std::unordered_set check_and_get_optional_command_arguments( + const std::vector& valid_options) const + { + return std::move(check_and_get_optional_command_arguments(valid_options, {}).switches); + } + + ParsedArguments check_and_get_optional_command_arguments(const std::vector& valid_switches, + const std::vector& valid_settings) const; + + void check_max_arg_count(const size_t expected_arg_count) const; + void check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const; + void check_min_arg_count(const size_t expected_arg_count) const; + void check_min_arg_count(const size_t expected_arg_count, const std::string& example_text) const; + void check_exact_arg_count(const size_t expected_arg_count) const; + void check_exact_arg_count(const size_t expected_arg_count, const std::string& example_text) const; + + private: + std::unordered_map> optional_command_arguments; + }; +} diff --git a/toolsrc/include/vcpkg/vcpkglib.h b/toolsrc/include/vcpkg/vcpkglib.h new file mode 100644 index 000000000..b2aad8d7b --- /dev/null +++ b/toolsrc/include/vcpkg/vcpkglib.h @@ -0,0 +1,38 @@ +#pragma once + +#include +#include +#include + +namespace vcpkg +{ + StatusParagraphs database_load_check(const VcpkgPaths& paths); + + void write_update(const VcpkgPaths& paths, const StatusParagraph& p); + + struct StatusParagraphAndAssociatedFiles + { + StatusParagraph pgh; + SortedVector files; + }; + + std::vector get_installed_ports(const StatusParagraphs& status_db); + std::vector get_installed_files(const VcpkgPaths& paths, + const StatusParagraphs& status_db); + + struct CMakeVariable + { + CMakeVariable(const CWStringView varname, const wchar_t* varvalue); + CMakeVariable(const CWStringView varname, const std::string& varvalue); + CMakeVariable(const CWStringView varname, const std::wstring& varvalue); + CMakeVariable(const CWStringView varname, const fs::path& path); + + std::wstring s; + }; + + std::wstring make_cmake_cmd(const fs::path& cmake_exe, + const fs::path& cmake_script, + const std::vector& pass_variables); + + std::string shorten_text(const std::string& desc, size_t length); +} // namespace vcpkg diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h new file mode 100644 index 000000000..df4adfd83 --- /dev/null +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -0,0 +1,85 @@ +#pragma once + +#include +#include + +#include +#include +#include + +namespace vcpkg +{ + struct ToolsetArchOption + { + CWStringView name; + System::CPUArchitecture host_arch; + System::CPUArchitecture target_arch; + }; + + struct Toolset + { + fs::path visual_studio_root_path; + fs::path dumpbin; + fs::path vcvarsall; + std::vector vcvarsall_options; + CWStringView version; + std::vector supported_architectures; + }; + + struct VcpkgPaths + { + static Expected create(const fs::path& vcpkg_root_dir); + + 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; + + bool is_valid_triplet(const Triplet& t) const; + + fs::path root; + fs::path packages; + fs::path buildtrees; + fs::path downloads; + fs::path ports; + fs::path installed; + fs::path triplets; + fs::path scripts; + + fs::path buildsystems; + fs::path buildsystems_msbuild_targets; + + fs::path vcpkg_dir; + fs::path vcpkg_dir_status_file; + fs::path vcpkg_dir_info; + fs::path vcpkg_dir_updates; + + fs::path ports_cmake; + + const fs::path& get_cmake_exe() const; + const fs::path& get_git_exe() const; + const fs::path& get_nuget_exe() const; + const fs::path& get_ifw_installerbase_exe() const; + const fs::path& get_ifw_binarycreator_exe() const; + const fs::path& get_ifw_repogen_exe() const; + + /// Retrieve a toolset matching a VS version + /// + /// Valid version strings are "v140", "v141", and "". Empty string gets the latest. + /// + const Toolset& VcpkgPaths::get_toolset(const Optional& toolset_version, + const Optional& visual_studio_path) const; + + Files::Filesystem& get_filesystem() const; + + private: + Lazy cmake_exe; + Lazy git_exe; + Lazy nuget_exe; + Lazy ifw_installerbase_exe; + Lazy ifw_binarycreator_exe; + Lazy ifw_repogen_exe; + Lazy> toolsets; + }; +} diff --git a/toolsrc/include/vcpkg/versiont.h b/toolsrc/include/vcpkg/versiont.h new file mode 100644 index 000000000..67efd8da3 --- /dev/null +++ b/toolsrc/include/vcpkg/versiont.h @@ -0,0 +1,29 @@ +#pragma once +#include + +namespace vcpkg +{ + struct VersionT + { + VersionT(); + VersionT(const std::string& value); + + std::string to_string() const; + + std::string value; + }; + + bool operator==(const VersionT& left, const VersionT& right); + bool operator!=(const VersionT& left, const VersionT& right); + + struct VersionDiff + { + VersionT left; + VersionT right; + + VersionDiff(); + VersionDiff(const VersionT& left, const VersionT& right); + + std::string to_string() const; + }; +} diff --git a/toolsrc/include/vcpkg_Build.h b/toolsrc/include/vcpkg_Build.h deleted file mode 100644 index 5ba675757..000000000 --- a/toolsrc/include/vcpkg_Build.h +++ /dev/null @@ -1,192 +0,0 @@ -#pragma once - -#include "CStringView.h" -#include "PackageSpec.h" -#include "StatusParagraphs.h" -#include "VcpkgPaths.h" -#include "vcpkg_Files.h" -#include "vcpkg_optional.h" - -#include -#include -#include - -namespace vcpkg::Build -{ - enum class UseHeadVersion - { - NO = 0, - YES - }; - - inline UseHeadVersion to_use_head_version(const bool value) - { - return value ? UseHeadVersion::YES : UseHeadVersion::NO; - } - - inline bool to_bool(const UseHeadVersion value) { return value == UseHeadVersion::YES; } - - enum class AllowDownloads - { - NO = 0, - YES - }; - - inline AllowDownloads to_allow_downloads(const bool value) - { - return value ? AllowDownloads::YES : AllowDownloads::NO; - } - - inline bool to_bool(const AllowDownloads value) { return value == AllowDownloads::YES; } - - struct BuildPackageOptions - { - UseHeadVersion use_head_version; - AllowDownloads allow_downloads; - }; - - enum class BuildResult - { - NULLVALUE = 0, - SUCCEEDED, - BUILD_FAILED, - POST_BUILD_CHECKS_FAILED, - FILE_CONFLICTS, - CASCADED_DUE_TO_MISSING_DEPENDENCIES - }; - - static constexpr std::array BUILD_RESULT_VALUES = { - BuildResult::SUCCEEDED, - BuildResult::BUILD_FAILED, - BuildResult::POST_BUILD_CHECKS_FAILED, - BuildResult::FILE_CONFLICTS, - BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES}; - - const std::string& to_string(const BuildResult build_result); - std::string create_error_message(const BuildResult build_result, const PackageSpec& spec); - std::string create_user_troubleshooting_message(const PackageSpec& spec); - - /// - /// 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 target_architecture; - std::string cmake_system_name; - std::string cmake_system_version; - Optional platform_toolset; - Optional visual_studio_path; - }; - - std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); - - struct ExtendedBuildResult - { - BuildResult code; - std::vector unmet_dependencies; - }; - - struct BuildPackageConfig - { - BuildPackageConfig(const SourceParagraph& src, - const Triplet& triplet, - fs::path&& port_dir, - const BuildPackageOptions& build_package_options) - : src(src) - , scf(nullptr) - , triplet(triplet) - , port_dir(std::move(port_dir)) - , build_package_options(build_package_options) - , feature_list(nullptr) - { - } - - BuildPackageConfig(const SourceControlFile& src, - const Triplet& triplet, - fs::path&& port_dir, - const BuildPackageOptions& build_package_options, - const std::unordered_set& feature_list) - : src(*src.core_paragraph) - , scf(&src) - , triplet(triplet) - , port_dir(std::move(port_dir)) - , build_package_options(build_package_options) - , feature_list(&feature_list) - { - } - - const SourceParagraph& src; - const SourceControlFile* scf; - const Triplet& triplet; - fs::path port_dir; - const BuildPackageOptions& build_package_options; - const std::unordered_set* feature_list; - }; - - ExtendedBuildResult build_package(const VcpkgPaths& paths, - const BuildPackageConfig& config, - const StatusParagraphs& status_db); - - enum class BuildPolicy - { - EMPTY_PACKAGE, - DLLS_WITHOUT_LIBS, - ONLY_RELEASE_CRT, - EMPTY_INCLUDE_FOLDER, - ALLOW_OBSOLETE_MSVCRT, - // Must be last - COUNT, - }; - - constexpr std::array G_ALL_POLICIES = { - BuildPolicy::EMPTY_PACKAGE, - BuildPolicy::DLLS_WITHOUT_LIBS, - BuildPolicy::ONLY_RELEASE_CRT, - BuildPolicy::EMPTY_INCLUDE_FOLDER, - BuildPolicy::ALLOW_OBSOLETE_MSVCRT, - }; - - const std::string& to_string(BuildPolicy policy); - CStringView to_cmake_variable(BuildPolicy policy); - - struct BuildPolicies - { - BuildPolicies() = default; - BuildPolicies(std::map&& map) : m_policies(std::move(map)) {} - - bool is_enabled(BuildPolicy policy) const - { - const auto it = m_policies.find(policy); - if (it != m_policies.cend()) return it->second; - return false; - } - - private: - std::map m_policies; - }; - - enum class LinkageType : char - { - DYNAMIC, - STATIC, - }; - - Optional to_linkage_type(const std::string& str); - - struct BuildInfo - { - LinkageType crt_linkage; - LinkageType library_linkage; - - Optional version; - - BuildPolicies policies; - }; - - BuildInfo read_build_info(const Files::Filesystem& fs, const fs::path& filepath); -} diff --git a/toolsrc/include/vcpkg_Checks.h b/toolsrc/include/vcpkg_Checks.h deleted file mode 100644 index ce486ac19..000000000 --- a/toolsrc/include/vcpkg_Checks.h +++ /dev/null @@ -1,54 +0,0 @@ -#pragma once - -#include "LineInfo.h" -#include "vcpkg_Strings.h" - -namespace vcpkg::Checks -{ - void register_console_ctrl_handler(); - - // Indicate that an internal error has occurred and exit the tool. This should be used when invariants have been - // broken. - [[noreturn]] void unreachable(const LineInfo& line_info); - - [[noreturn]] void exit_with_code(const LineInfo& line_info, const int exit_code); - - // Exit the tool without an error message. - [[noreturn]] inline void exit_fail(const LineInfo& line_info) { exit_with_code(line_info, EXIT_FAILURE); } - - // Exit the tool successfully. - [[noreturn]] inline void exit_success(const LineInfo& line_info) { exit_with_code(line_info, EXIT_SUCCESS); } - - // Display an error message to the user and exit the tool. - [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView error_message); - - template - // Display an error message to the user and exit the tool. - [[noreturn]] void exit_with_message(const LineInfo& line_info, - const char* error_message_template, - const Arg1 error_message_arg1, - const Args&... error_message_args) - { - exit_with_message(line_info, - Strings::format(error_message_template, error_message_arg1, error_message_args...)); - } - - void check_exit(const LineInfo& line_info, bool expression); - - void check_exit(const LineInfo& line_info, bool expression, const CStringView error_message); - - template - void check_exit(const LineInfo& line_info, - Conditional&& expression, - const char* error_message_template, - const Arg1 error_message_arg1, - const Args&... error_message_args) - { - if (!expression) - { - // Only create the string if the expression is false - exit_with_message(line_info, - Strings::format(error_message_template, error_message_arg1, error_message_args...)); - } - } -} diff --git a/toolsrc/include/vcpkg_Chrono.h b/toolsrc/include/vcpkg_Chrono.h deleted file mode 100644 index c14019ff9..000000000 --- a/toolsrc/include/vcpkg_Chrono.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include -#include - -namespace vcpkg -{ - class ElapsedTime - { - public: - static ElapsedTime create_started(); - - constexpr ElapsedTime() : m_start_tick() {} - - template - TimeUnit elapsed() const - { - return std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - this->m_start_tick); - } - - double microseconds() const { return elapsed>().count(); } - - std::string to_string() const; - - private: - std::chrono::high_resolution_clock::time_point m_start_tick; - }; -} diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h deleted file mode 100644 index 7cfa2760e..000000000 --- a/toolsrc/include/vcpkg_Commands.h +++ /dev/null @@ -1,258 +0,0 @@ -#pragma once - -#include "StatusParagraphs.h" -#include "VcpkgCmdArguments.h" -#include "VcpkgPaths.h" -#include "VersionT.h" -#include "vcpkg_Build.h" -#include "vcpkg_Dependencies.h" -#include - -namespace vcpkg::Commands -{ - using CommandTypeA = void (*)(const VcpkgCmdArguments& args, - const VcpkgPaths& paths, - const Triplet& default_triplet); - using CommandTypeB = void (*)(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - using CommandTypeC = void (*)(const VcpkgCmdArguments& args); - - namespace BuildCommand - { - void perform_and_exit(const FullPackageSpec& full_spec, - const fs::path& port_dir, - const std::unordered_set& options, - const VcpkgPaths& paths); - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); - } - - namespace BuildExternal - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); - } - - namespace Install - { - enum class KeepGoing - { - NO = 0, - YES - }; - - inline KeepGoing to_keep_going(const bool value) { return value ? KeepGoing::YES : KeepGoing::NO; } - - enum class PrintSummary - { - NO = 0, - YES - }; - - inline PrintSummary to_print_summary(const bool value) { return value ? PrintSummary::YES : PrintSummary::NO; } - - struct InstallDir - { - static InstallDir from_destination_root(const fs::path& destination_root, - const std::string& destination_subdirectory, - const fs::path& listfile); - - private: - fs::path m_destination; - std::string m_destination_subdirectory; - fs::path m_listfile; - - public: - const fs::path& destination() const; - const std::string& destination_subdirectory() const; - const fs::path& listfile() const; - }; - - Build::BuildResult perform_install_plan_action(const VcpkgPaths& paths, - const Dependencies::InstallPlanAction& action, - const Build::BuildPackageOptions& install_plan_options, - StatusParagraphs& status_db); - - enum class InstallResult - { - FILE_CONFLICTS, - SUCCESS, - }; - - void install_files_and_write_listfile(Files::Filesystem& fs, - const fs::path& source_dir, - const InstallDir& dirs); - InstallResult install_package(const VcpkgPaths& paths, - const BinaryControlFile& binary_paragraph, - StatusParagraphs* status_db); - - void perform_and_exit(const std::vector& action_plan, - const Build::BuildPackageOptions& install_plan_options, - const KeepGoing keep_going, - const PrintSummary print_summary, - const VcpkgPaths& paths, - StatusParagraphs& status_db); - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); - } - - namespace Export - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); - } - - namespace CI - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); - } - - namespace Remove - { - enum class Purge - { - NO = 0, - YES - }; - - inline Purge to_purge(const bool value) { return value ? Purge::YES : Purge::NO; } - - void perform_remove_plan_action(const VcpkgPaths& paths, - const Dependencies::RemovePlanAction& action, - const Purge purge, - StatusParagraphs& status_db); - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); - void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db); - } - - namespace Update - { - struct OutdatedPackage - { - static bool compare_by_name(const OutdatedPackage& left, const OutdatedPackage& right); - - PackageSpec spec; - VersionDiff version_diff; - }; - - std::vector find_outdated_packages(const VcpkgPaths& paths, const StatusParagraphs& status_db); - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Env - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); - } - - namespace Create - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Edit - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace DependInfo - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Search - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace List - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Owns - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Cache - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Import - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Integrate - { - extern const char* const INTEGRATE_COMMAND_HELPSTRING; - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace PortsDiff - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Autocomplete - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - } - - namespace Help - { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - - void help_topic_valid_triplet(const VcpkgPaths& paths); - - void print_usage(); - - void print_example(const std::string& command_and_arguments); - - std::string create_example_string(const std::string& command_and_arguments); - } - - namespace Version - { - const std::string& version(); - void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths); - void perform_and_exit(const VcpkgCmdArguments& args); - } - - namespace Contact - { - const std::string& email(); - void perform_and_exit(const VcpkgCmdArguments& args); - } - - namespace Hash - { - void perform_and_exit(const VcpkgCmdArguments& args); - } - - template - struct PackageNameAndFunction - { - std::string name; - T function; - }; - - const std::vector>& get_available_commands_type_a(); - const std::vector>& get_available_commands_type_b(); - const std::vector>& get_available_commands_type_c(); - - template - T find(const std::string& command_name, const std::vector> available_commands) - { - for (const PackageNameAndFunction& cmd : available_commands) - { - if (cmd.name == command_name) - { - return cmd.function; - } - } - - // not found - return nullptr; - } -} diff --git a/toolsrc/include/vcpkg_Commands_Export.h b/toolsrc/include/vcpkg_Commands_Export.h deleted file mode 100644 index 6e698c1b4..000000000 --- a/toolsrc/include/vcpkg_Commands_Export.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include "VcpkgPaths.h" - -namespace vcpkg::Commands::Export -{ - void export_integration_files(const fs::path& raw_exported_dir_path, const VcpkgPaths& paths); -} diff --git a/toolsrc/include/vcpkg_Commands_Export_IFW.h b/toolsrc/include/vcpkg_Commands_Export_IFW.h deleted file mode 100644 index 7bee45eaf..000000000 --- a/toolsrc/include/vcpkg_Commands_Export_IFW.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include "VcpkgPaths.h" -#include "vcpkg_Dependencies.h" -#include "vcpkg_Files.h" - -#include -#include - -namespace vcpkg::Commands::Export::IFW -{ - struct Options - { - Optional maybe_repository_url; - Optional maybe_packages_dir_path; - Optional maybe_repository_dir_path; - Optional maybe_config_file_path; - Optional maybe_installer_file_path; - }; - - void do_export(const std::vector& export_plan, - const std::string& export_id, - const Options& ifw_options, - const VcpkgPaths& paths); -} diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h deleted file mode 100644 index d67122e48..000000000 --- a/toolsrc/include/vcpkg_Dependencies.h +++ /dev/null @@ -1,147 +0,0 @@ -#pragma once -#include "PackageSpec.h" -#include "StatusParagraphs.h" -#include "VcpkgPaths.h" -#include "vcpkg_Graphs.h" -#include "vcpkg_Util.h" -#include "vcpkg_optional.h" -#include - -namespace vcpkg::Dependencies -{ - enum class RequestType - { - UNKNOWN, - USER_REQUESTED, - AUTO_SELECTED - }; - - std::string to_output_string(RequestType request_type, const CStringView s); - - struct AnyParagraph - { - std::vector dependencies(const Triplet& triplet) const; - - Optional status_paragraph; - Optional binary_control_file; - Optional source_paragraph; - Optional source_control_file; - }; -} - -namespace vcpkg::Dependencies -{ - enum class InstallPlanType - { - UNKNOWN, - BUILD_AND_INSTALL, - INSTALL, - ALREADY_INSTALLED - }; - - struct InstallPlanAction : Util::MoveOnlyBase - { - static bool compare_by_name(const InstallPlanAction* left, const InstallPlanAction* right); - - InstallPlanAction(); - - InstallPlanAction(const PackageSpec& spec, - const std::unordered_set& features, - const RequestType& request_type); - InstallPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type); - InstallPlanAction(const PackageSpec& spec, - const SourceControlFile& any_paragraph, - const std::unordered_set& features, - const RequestType& request_type); - - std::string displayname() const; - - PackageSpec spec; - AnyParagraph any_paragraph; - InstallPlanType plan_type; - RequestType request_type; - std::unordered_set feature_list; - }; - - enum class RemovePlanType - { - UNKNOWN, - NOT_INSTALLED, - REMOVE - }; - - struct RemovePlanAction : Util::MoveOnlyBase - { - static bool compare_by_name(const RemovePlanAction* left, const RemovePlanAction* right); - - RemovePlanAction(); - RemovePlanAction(const PackageSpec& spec, const RemovePlanType& plan_type, const RequestType& request_type); - - PackageSpec spec; - RemovePlanType plan_type; - RequestType request_type; - }; - - struct AnyAction - { - AnyAction(InstallPlanAction&& iplan) : install_plan(std::move(iplan)) {} - AnyAction(RemovePlanAction&& rplan) : remove_plan(std::move(rplan)) {} - - Optional install_plan; - Optional remove_plan; - - const PackageSpec& spec() const; - }; - - enum class ExportPlanType - { - UNKNOWN, - PORT_AVAILABLE_BUT_NOT_BUILT, - ALREADY_BUILT - }; - - struct ExportPlanAction : Util::MoveOnlyBase - { - static bool compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right); - - ExportPlanAction(); - ExportPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type); - - PackageSpec spec; - AnyParagraph any_paragraph; - ExportPlanType plan_type; - RequestType request_type; - }; - - __interface PortFileProvider { virtual const SourceControlFile& get_control_file(const std::string& spec) const; }; - - struct MapPortFile : Util::ResourceBase, PortFileProvider - { - const std::unordered_map& ports; - explicit MapPortFile(const std::unordered_map& map); - const SourceControlFile& get_control_file(const std::string& spec) const override; - }; - - struct PathsPortFile : Util::ResourceBase, PortFileProvider - { - const VcpkgPaths& ports; - mutable std::unordered_map cache; - explicit PathsPortFile(const VcpkgPaths& paths); - const SourceControlFile& get_control_file(const std::string& spec) const override; - }; - - std::vector create_install_plan(const PortFileProvider& port_file_provider, - const std::vector& specs, - const StatusParagraphs& status_db); - - std::vector create_remove_plan(const std::vector& specs, - const StatusParagraphs& status_db); - - std::vector create_export_plan(const VcpkgPaths& paths, - const std::vector& specs, - const StatusParagraphs& status_db); - - 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_Enums.h b/toolsrc/include/vcpkg_Enums.h deleted file mode 100644 index c75feaa1f..000000000 --- a/toolsrc/include/vcpkg_Enums.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once -#include "LineInfo.h" -#include - -namespace vcpkg::Enums -{ - std::string nullvalue_to_string(const CStringView enum_name); - - [[noreturn]] void nullvalue_used(const LineInfo& line_info, const CStringView enum_name); -} diff --git a/toolsrc/include/vcpkg_Files.h b/toolsrc/include/vcpkg_Files.h deleted file mode 100644 index 855e8ea45..000000000 --- a/toolsrc/include/vcpkg_Files.h +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once - -#include "filesystem_fs.h" -#include "vcpkg_expected.h" - -namespace vcpkg::Files -{ - __interface Filesystem - { - virtual Expected read_contents(const fs::path& file_path) const = 0; - virtual Expected> read_lines(const fs::path& file_path) const = 0; - virtual fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename) const = 0; - virtual std::vector get_files_recursive(const fs::path& dir) const = 0; - virtual std::vector get_files_non_recursive(const fs::path& dir) const = 0; - - virtual void write_lines(const fs::path& file_path, const std::vector& lines) = 0; - virtual void write_contents(const fs::path& file_path, const std::string& data) = 0; - virtual void rename(const fs::path& oldpath, const fs::path& newpath) = 0; - virtual bool remove(const fs::path& path) = 0; - 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 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; - virtual bool is_empty(const fs::path& path) const = 0; - virtual bool create_directory(const fs::path& path, std::error_code& ec) = 0; - virtual bool create_directories(const fs::path& path, std::error_code& ec) = 0; - virtual void copy(const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts) = 0; - virtual bool copy_file( - const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts, std::error_code& ec) = 0; - virtual fs::file_status status(const fs::path& path, std::error_code& ec) const = 0; - }; - - Filesystem& get_real_filesystem(); - - static const char* FILESYSTEM_INVALID_CHARACTERS = R"(\/:*?"<>|)"; - - bool has_invalid_chars_for_filesystem(const std::string& s); - - void print_paths(const std::vector& paths); - - std::vector find_from_PATH(const std::wstring& name); -} diff --git a/toolsrc/include/vcpkg_GlobalState.h b/toolsrc/include/vcpkg_GlobalState.h deleted file mode 100644 index 6522a25bf..000000000 --- a/toolsrc/include/vcpkg_GlobalState.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include - -#include "vcpkg_Chrono.h" -#include "vcpkg_Util.h" - -namespace vcpkg -{ - struct GlobalState - { - static Util::LockGuarded timer; - static std::atomic debugging; - static std::atomic feature_packages; - - static std::atomic g_init_console_cp; - static std::atomic g_init_console_output_cp; - }; -} \ No newline at end of file diff --git a/toolsrc/include/vcpkg_Graphs.h b/toolsrc/include/vcpkg_Graphs.h deleted file mode 100644 index 13c0a7136..000000000 --- a/toolsrc/include/vcpkg_Graphs.h +++ /dev/null @@ -1,159 +0,0 @@ -#pragma once - -#include -#include - -namespace vcpkg::Graphs -{ - enum class ExplorationStatus - { - // We have not visited this vertex - NOT_EXPLORED, - - // We have visited this vertex but haven't visited all vertices in its subtree - PARTIALLY_EXPLORED, - - // We have visited this vertex and all vertices in its subtree - FULLY_EXPLORED - }; - - template - __interface AdjacencyProvider - { - std::vector adjacency_list(const U& vertex) const; - - U load_vertex_data(const V& vertex) const; - }; - - template - static void topological_sort_internal(const V& vertex, - const AdjacencyProvider& f, - std::unordered_map& exploration_status, - std::vector& sorted) - { - ExplorationStatus& status = exploration_status[vertex]; - switch (status) - { - case ExplorationStatus::FULLY_EXPLORED: return; - case ExplorationStatus::PARTIALLY_EXPLORED: Checks::exit_with_message(VCPKG_LINE_INFO, "cycle in graph"); - case ExplorationStatus::NOT_EXPLORED: - { - status = ExplorationStatus::PARTIALLY_EXPLORED; - U vertex_data = f.load_vertex_data(vertex); - for (const V& neighbour : f.adjacency_list(vertex_data)) - topological_sort_internal(neighbour, f, exploration_status, sorted); - - sorted.push_back(std::move(vertex_data)); - status = ExplorationStatus::FULLY_EXPLORED; - return; - } - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - - template - std::vector topological_sort(const std::vector& starting_vertices, const AdjacencyProvider& f) - { - std::vector sorted; - std::unordered_map exploration_status; - - for (auto& vertex : starting_vertices) - { - topological_sort_internal(vertex, f, exploration_status, sorted); - } - - return sorted; - } - - template - struct GraphAdjacencyProvider final : AdjacencyProvider - { - const std::unordered_map>& vertices; - - GraphAdjacencyProvider(const std::unordered_map>& vertices) : vertices(vertices) {} - - std::vector adjacency_list(const V& vertex) const override - { - const std::unordered_set& as_set = this->vertices.at(vertex); - return std::vector(as_set.cbegin(), as_set.cend()); // TODO: Avoid redundant copy - } - - V load_vertex_data(const V& vertex) const override { return vertex; } - }; - - template - struct Graph - { - public: - void add_vertex(V v) { this->vertices[v]; } - - // TODO: Change with iterators - void add_vertices(const std::vector& vs) - { - for (const V& v : vs) - { - this->vertices[v]; - } - } - - void add_edge(V u, V v) - { - this->vertices[v]; - this->vertices[u].insert(v); - } - - std::vector topological_sort() const - { - GraphAdjacencyProvider adjacency_provider{this->vertices}; - std::unordered_map indegrees = count_indegrees(); - - std::vector sorted; - sorted.reserve(indegrees.size()); - - std::unordered_map exploration_status; - exploration_status.reserve(indegrees.size()); - - for (auto& pair : indegrees) - { - if (pair.second == 0) // Starting from vertices with indegree == 0. Not required. - { - V vertex = pair.first; - topological_sort_internal(vertex, adjacency_provider, exploration_status, sorted); - } - } - - return sorted; - } - - std::unordered_map count_indegrees() const - { - std::unordered_map indegrees; - - for (auto& pair : this->vertices) - { - indegrees[pair.first]; - for (V neighbour : pair.second) - { - ++indegrees[neighbour]; - } - } - - return indegrees; - } - - const std::unordered_map>& adjacency_list() const { return this->vertices; } - std::vector vertex_list() const - { - // why no &? it returns 0 - std::vector vertex_list; - for (const auto& vertex : this->vertices) - { - vertex_list.emplace_back(vertex.first); - } - return vertex_list; - } - - private: - std::unordered_map> vertices; - }; -} diff --git a/toolsrc/include/vcpkg_Input.h b/toolsrc/include/vcpkg_Input.h deleted file mode 100644 index fa568207a..000000000 --- a/toolsrc/include/vcpkg_Input.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once -#include "PackageSpec.h" - -namespace vcpkg::Input -{ - PackageSpec check_and_get_package_spec(const std::string& package_spec_as_string, - const Triplet& default_triplet, - CStringView example_text); - FullPackageSpec check_and_get_full_package_spec(const std::string& full_package_spec_as_string, - const Triplet& default_triplet, - CStringView example_text); - - void check_triplet(const Triplet& t, const VcpkgPaths& paths); -} diff --git a/toolsrc/include/vcpkg_Maps.h b/toolsrc/include/vcpkg_Maps.h deleted file mode 100644 index aadd81c2b..000000000 --- a/toolsrc/include/vcpkg_Maps.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#include -#include -#include - -namespace vcpkg::Maps -{ - template - std::vector extract_keys(const std::unordered_map& input_map) - { - std::vector key_set; - for (auto const& element : input_map) - { - key_set.push_back(element.first); - } - return key_set; - } - - template - std::vector extract_keys(const std::map& input_map) - { - std::vector key_set; - for (auto const& element : input_map) - { - key_set.push_back(element.first); - } - return key_set; - } -} diff --git a/toolsrc/include/vcpkg_Parse.h b/toolsrc/include/vcpkg_Parse.h deleted file mode 100644 index 2dda033b3..000000000 --- a/toolsrc/include/vcpkg_Parse.h +++ /dev/null @@ -1,38 +0,0 @@ -#pragma once - -#include -#include - -#include "vcpkg_expected.h" -#include "vcpkg_optional.h" - -namespace vcpkg::Parse -{ - struct ParseControlErrorInfo - { - std::string name; - std::vector missing_fields; - std::vector extra_fields; - std::error_code error; - }; - - template - using ParseExpected = ExpectedT, std::unique_ptr>; - - using RawParagraph = std::unordered_map; - - struct ParagraphParser - { - ParagraphParser(RawParagraph&& fields) : fields(std::move(fields)) {} - - void required_field(const std::string& fieldname, std::string& out); - std::string optional_field(const std::string& fieldname) const; - std::unique_ptr error_info(const std::string& name) const; - - private: - RawParagraph&& fields; - std::vector missing_fields; - }; - - std::vector parse_comma_list(const std::string& str); -} diff --git a/toolsrc/include/vcpkg_Strings.h b/toolsrc/include/vcpkg_Strings.h deleted file mode 100644 index c44ce2b99..000000000 --- a/toolsrc/include/vcpkg_Strings.h +++ /dev/null @@ -1,113 +0,0 @@ -#pragma once - -#include "CStringView.h" -#include - -namespace vcpkg::Strings::details -{ - template - auto to_printf_arg(const T& t) -> decltype(t.to_string()) - { - return t.to_string(); - } - - inline const char* to_printf_arg(const std::string& s) { return s.c_str(); } - - inline const char* to_printf_arg(const char* s) { return s; } - - inline int to_printf_arg(const int s) { return s; } - - inline long long to_printf_arg(const long long s) { return s; } - - inline unsigned long to_printf_arg(const unsigned long s) { return s; } - - inline size_t to_printf_arg(const size_t s) { return s; } - - inline double to_printf_arg(const double s) { return s; } - - std::string format_internal(const char* fmtstr, ...); - - inline const wchar_t* to_wprintf_arg(const std::wstring& s) { return s.c_str(); } - - inline const wchar_t* to_wprintf_arg(const wchar_t* s) { return s; } - - std::wstring wformat_internal(const wchar_t* fmtstr, ...); -} - -namespace vcpkg::Strings -{ - static constexpr const char* EMPTY = ""; - static constexpr const wchar_t* WEMPTY = L""; - - template - std::string format(const char* fmtstr, const Args&... args) - { - using vcpkg::Strings::details::to_printf_arg; - return details::format_internal(fmtstr, to_printf_arg(to_printf_arg(args))...); - } - - template - std::wstring wformat(const wchar_t* fmtstr, const Args&... args) - { - using vcpkg::Strings::details::to_wprintf_arg; - return details::wformat_internal(fmtstr, to_wprintf_arg(to_wprintf_arg(args))...); - } - - std::wstring to_utf16(const CStringView s); - - std::string to_utf8(const CWStringView w); - - std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern); - - bool case_insensitive_ascii_contains(const std::string& s, const std::string& pattern); - - int case_insensitive_ascii_compare(const CStringView left, const CStringView right); - - std::string ascii_to_lowercase(const std::string& input); - - bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern); - - template - std::basic_string join(const CharType* delimiter, const Container& v, Transformer transformer) - { - const auto begin = v.begin(); - const auto end = v.end(); - - if (begin == end) - { - return std::basic_string(); - } - - std::basic_string output; - output.append(transformer(*begin)); - for (auto it = std::next(begin); it != end; ++it) - { - output.append(delimiter); - output.append(transformer(*it)); - } - - return output; - } - template - std::basic_string join(const CharType* delimiter, const Container& v) - { - using Element = decltype(*v.begin()); - return join(delimiter, v, [](const Element& x) -> const Element& { return x; }); - } - - void trim(std::string* s); - - std::string trimmed(const std::string& s); - - void trim_all_and_remove_whitespace_strings(std::vector* strings); - - std::vector split(const std::string& s, const std::string& delimiter); - - template - std::string serialize(const T& t) - { - std::string ret; - serialize(t, ret); - return ret; - } -} diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h deleted file mode 100644 index 65f80ae6d..000000000 --- a/toolsrc/include/vcpkg_System.h +++ /dev/null @@ -1,107 +0,0 @@ -#pragma once - -#include "filesystem_fs.h" -#include "vcpkg_Strings.h" -#include "vcpkg_optional.h" -#include - -namespace vcpkg::System -{ - tm get_current_date_time(); - - fs::path get_exe_path_of_current_process(); - - struct ExitCodeAndOutput - { - int exit_code; - std::string output; - }; - - int cmd_execute_clean(const CWStringView cmd_line); - - int cmd_execute(const CWStringView cmd_line); - - ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line); - - std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args = Strings::WEMPTY); - - enum class Color - { - success = 10, - error = 12, - warning = 14, - }; - - void println(); - void print(const CStringView message); - void println(const CStringView message); - void print(const Color c, const CStringView message); - void println(const Color c, const CStringView message); - - template - void print(const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) - { - return System::print(Strings::format(messageTemplate, messageArg1, messageArgs...)); - } - - template - void print(const Color c, const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) - { - return System::print(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); - } - - template - void println(const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) - { - return System::println(Strings::format(messageTemplate, messageArg1, messageArgs...)); - } - - template - void println(const Color c, const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) - { - return System::println(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); - } - - Optional get_environment_variable(const CWStringView varname) noexcept; - - Optional get_registry_string(HKEY base, const CWStringView subkey, const CWStringView valuename); - - enum class CPUArchitecture - { - X86, - X64, - ARM, - ARM64, - }; - - Optional to_cpu_architecture(CStringView arch); - - CPUArchitecture get_host_processor(); - - std::vector get_supported_host_architectures(); - - const fs::path& get_program_files_32_bit(); - - const fs::path& get_program_files_platform_bitness(); -} - -namespace vcpkg::Debug -{ - void println(const CStringView message); - void println(const System::Color c, const CStringView message); - - template - void println(const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) - { - return Debug::println(Strings::format(messageTemplate, messageArg1, messageArgs...)); - } - - template - void println(const System::Color c, - const char* messageTemplate, - const Arg1& messageArg1, - const Args&... messageArgs) - { - return Debug::println(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); - } -} diff --git a/toolsrc/include/vcpkg_Util.h b/toolsrc/include/vcpkg_Util.h deleted file mode 100644 index facb7dd26..000000000 --- a/toolsrc/include/vcpkg_Util.h +++ /dev/null @@ -1,144 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -namespace vcpkg::Util -{ - template - using FmapOut = decltype(std::declval()(*begin(std::declval()))); - - template> - std::vector fmap(Cont&& xs, Func&& f) - { - std::vector ret; - ret.reserve(xs.size()); - - for (auto&& x : xs) - ret.push_back(f(x)); - - return ret; - } - - template - using FmapFlattenOut = std::decay_t()(*begin(std::declval()))))>; - - template> - std::vector fmap_flatten(Cont&& xs, Func&& f) - { - std::vector ret; - - for (auto&& x : xs) - for (auto&& y : f(x)) - ret.push_back(std::move(y)); - - return ret; - } - - template - void stable_keep_if(Container& cont, Pred pred) - { - cont.erase(std::stable_partition(cont.begin(), cont.end(), pred), cont.end()); - } - - template - void unstable_keep_if(Container& cont, Pred pred) - { - cont.erase(std::partition(cont.begin(), cont.end(), pred), cont.end()); - } - - template - void erase_remove_if(Container& cont, Pred pred) - { - cont.erase(std::remove_if(cont.begin(), cont.end(), pred), cont.end()); - } - - template - auto find(const Container& cont, V&& v) - { - return std::find(cont.cbegin(), cont.cend(), v); - } - - template - auto find_if(const Container& cont, Pred pred) - { - return std::find_if(cont.cbegin(), cont.cend(), pred); - } - - template - using ElementT = std::remove_reference_t()))>; - - template> - std::vector element_pointers(Container&& cont) - { - return fmap(cont, [](auto&& x) { return &x; }); - } - - template - auto find_if_not(const Container& cont, Pred pred) - { - return std::find_if_not(cont.cbegin(), cont.cend(), pred); - } - - template - void group_by(const Container& cont, std::map>* output, Func f) - { - for (const V& element : cont) - { - K key = f(element); - (*output)[key].push_back(&element); - } - } - - struct MoveOnlyBase - { - MoveOnlyBase() = default; - MoveOnlyBase(const MoveOnlyBase&) = delete; - MoveOnlyBase(MoveOnlyBase&&) = default; - - MoveOnlyBase& operator=(const MoveOnlyBase&) = delete; - MoveOnlyBase& operator=(MoveOnlyBase&&) = default; - }; - - struct ResourceBase - { - ResourceBase() = default; - ResourceBase(const ResourceBase&) = delete; - ResourceBase(ResourceBase&&) = delete; - - ResourceBase& operator=(const ResourceBase&) = delete; - ResourceBase& operator=(ResourceBase&&) = delete; - }; - - template - struct LockGuardPtr; - - template - struct LockGuarded - { - friend struct LockGuardPtr; - - LockGuardPtr lock() { return *this; } - - private: - std::mutex m_mutex; - T m_t; - }; - - template - struct LockGuardPtr - { - T& operator*() { return m_ptr; } - T* operator->() { return &m_ptr; } - - T* get() { return &m_ptr; } - - LockGuardPtr(LockGuarded& sync) : m_lock(sync.m_mutex), m_ptr(sync.m_t) {} - - private: - std::unique_lock m_lock; - T& m_ptr; - }; -} \ No newline at end of file diff --git a/toolsrc/include/vcpkg_expected.h b/toolsrc/include/vcpkg_expected.h deleted file mode 100644 index 9637ec087..000000000 --- a/toolsrc/include/vcpkg_expected.h +++ /dev/null @@ -1,114 +0,0 @@ -#pragma once - -#include "vcpkg_Checks.h" -#include - -namespace vcpkg -{ - template - struct ErrorHolder - { - ErrorHolder() : m_is_error(false) {} - template - ErrorHolder(U&& err) : m_is_error(true), m_err(std::forward(err)) - { - } - - constexpr bool has_error() const { return m_is_error; } - - const Err& error() const { return m_err; } - Err& error() { return m_err; } - - CStringView to_string() const { return "value was error"; } - - private: - bool m_is_error; - Err m_err; - }; - - template<> - struct ErrorHolder - { - ErrorHolder() = default; - ErrorHolder(const std::error_code& err) : m_err(err) {} - - constexpr bool has_error() const { return bool(m_err); } - - const std::error_code& error() const { return m_err; } - std::error_code& error() { return m_err; } - - CStringView to_string() const { return "value was error"; } - - private: - std::error_code m_err; - }; - - template - class ExpectedT - { - public: - constexpr ExpectedT() = default; - - // Constructors are intentionally implicit - - ExpectedT(const S& s) : m_s(s) {} - ExpectedT(S&& s) : m_s(std::move(s)) {} - - ExpectedT(const T& t) : m_t(t) {} - ExpectedT(T&& t) : m_t(std::move(t)) {} - - ExpectedT(const ExpectedT&) = default; - ExpectedT(ExpectedT&&) = default; - ExpectedT& operator=(const ExpectedT&) = default; - ExpectedT& operator=(ExpectedT&&) = default; - - explicit constexpr operator bool() const noexcept { return !m_s.has_error(); } - constexpr bool has_value() const noexcept { return !m_s.has_error(); } - - T&& value_or_exit(const LineInfo& line_info) && - { - exit_if_error(line_info); - return std::move(this->m_t); - } - - const T& value_or_exit(const LineInfo& line_info) const & - { - exit_if_error(line_info); - return this->m_t; - } - - const S& error() const & { return this->m_s.error(); } - - S&& error() && { return std::move(this->m_s.error()); } - - const T* get() const - { - if (!this->has_value()) - { - return nullptr; - } - return &this->m_t; - } - - T* get() - { - if (!this->has_value()) - { - return nullptr; - } - return &this->m_t; - } - - private: - void exit_if_error(const LineInfo& line_info) const - { - Checks::check_exit(line_info, !m_s.has_error(), m_s.to_string()); - } - - ErrorHolder m_s; - T m_t; - }; - - template - using Expected = ExpectedT; -} diff --git a/toolsrc/include/vcpkg_optional.h b/toolsrc/include/vcpkg_optional.h deleted file mode 100644 index 31a2d3e88..000000000 --- a/toolsrc/include/vcpkg_optional.h +++ /dev/null @@ -1,98 +0,0 @@ -#pragma once -#include "vcpkg_Checks.h" - -namespace vcpkg -{ - struct NullOpt - { - explicit constexpr NullOpt(int) {} - }; - - const static constexpr NullOpt nullopt{0}; - - template - class Optional - { - public: - constexpr Optional() : m_is_present(false), m_t() {} - - // Constructors are intentionally implicit - constexpr Optional(NullOpt) : m_is_present(false), m_t() {} - - Optional(const T& t) : m_is_present(true), m_t(t) {} - - Optional(T&& t) : m_is_present(true), m_t(std::move(t)) {} - - T&& value_or_exit(const LineInfo& line_info) && - { - this->exit_if_null(line_info); - return std::move(this->m_t); - } - - const T& value_or_exit(const LineInfo& line_info) const & - { - this->exit_if_null(line_info); - return this->m_t; - } - - constexpr explicit operator bool() const { return this->m_is_present; } - - constexpr bool has_value() const { return m_is_present; } - - template - T value_or(U&& default_value) const & - { - return bool(*this) ? this->m_t : static_cast(std::forward(default_value)); - } - - template - T value_or(U&& default_value) && - { - return bool(*this) ? std::move(this->m_t) : static_cast(std::forward(default_value)); - } - - const T* get() const { return bool(*this) ? &this->m_t : nullptr; } - - T* get() { return bool(*this) ? &this->m_t : nullptr; } - - private: - void exit_if_null(const LineInfo& line_info) const - { - Checks::check_exit(line_info, this->m_is_present, "Value was null"); - } - - bool m_is_present; - T m_t; - }; - - template - Optional> make_optional(U&& u) - { - return Optional>(std::forward(u)); - } - - template - bool operator==(const Optional& o, const T& t) - { - if (auto p = o.get()) return *p == t; - return false; - } - template - bool operator==(const T& t, const Optional& o) - { - if (auto p = o.get()) return t == *p; - return false; - } - template - bool operator!=(const Optional& o, const T& t) - { - if (auto p = o.get()) return *p != t; - return true; - } - template - bool operator!=(const T& t, const Optional& o) - { - if (auto p = o.get()) return t != *p; - return true; - } -} diff --git a/toolsrc/include/vcpkglib.h b/toolsrc/include/vcpkglib.h deleted file mode 100644 index 0bb75f9b5..000000000 --- a/toolsrc/include/vcpkglib.h +++ /dev/null @@ -1,38 +0,0 @@ -#pragma once - -#include "SortedVector.h" -#include "StatusParagraphs.h" -#include "VcpkgPaths.h" - -namespace vcpkg -{ - StatusParagraphs database_load_check(const VcpkgPaths& paths); - - void write_update(const VcpkgPaths& paths, const StatusParagraph& p); - - struct StatusParagraphAndAssociatedFiles - { - StatusParagraph pgh; - SortedVector files; - }; - - std::vector get_installed_ports(const StatusParagraphs& status_db); - std::vector get_installed_files(const VcpkgPaths& paths, - const StatusParagraphs& status_db); - - struct CMakeVariable - { - CMakeVariable(const CWStringView varname, const wchar_t* varvalue); - CMakeVariable(const CWStringView varname, const std::string& varvalue); - CMakeVariable(const CWStringView varname, const std::wstring& varvalue); - CMakeVariable(const CWStringView varname, const fs::path& path); - - std::wstring s; - }; - - std::wstring make_cmake_cmd(const fs::path& cmake_exe, - const fs::path& cmake_script, - const std::vector& pass_variables); - - std::string shorten_text(const std::string& desc, size_t length); -} // namespace vcpkg diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp deleted file mode 100644 index 1504912ab..000000000 --- a/toolsrc/src/BinaryParagraph.cpp +++ /dev/null @@ -1,123 +0,0 @@ -#include "pch.h" - -#include "BinaryParagraph.h" -#include "vcpkg_Checks.h" -#include "vcpkg_Parse.h" - -namespace vcpkg -{ - namespace Fields - { - static const std::string PACKAGE = "Package"; - static const std::string VERSION = "Version"; - static const std::string ARCHITECTURE = "Architecture"; - static const std::string MULTI_ARCH = "Multi-Arch"; - } - - namespace Fields - { - static const std::string FEATURE = "Feature"; - static const std::string DESCRIPTION = "Description"; - static const std::string MAINTAINER = "Maintainer"; - static const std::string DEPENDS = "Depends"; - static const std::string DEFAULTFEATURES = "Default-Features"; - } - - BinaryParagraph::BinaryParagraph() = default; - - BinaryParagraph::BinaryParagraph(std::unordered_map fields) - { - using namespace vcpkg::Parse; - - ParagraphParser parser(std::move(fields)); - - { - std::string name; - parser.required_field(Fields::PACKAGE, name); - std::string architecture; - parser.required_field(Fields::ARCHITECTURE, architecture); - this->spec = PackageSpec::from_name_and_triplet(name, Triplet::from_canonical_name(architecture)) - .value_or_exit(VCPKG_LINE_INFO); - } - - // one or the other - this->version = parser.optional_field(Fields::VERSION); - this->feature = parser.optional_field(Fields::FEATURE); - - this->description = parser.optional_field(Fields::DESCRIPTION); - this->maintainer = parser.optional_field(Fields::MAINTAINER); - - std::string multi_arch; - parser.required_field(Fields::MULTI_ARCH, multi_arch); - - this->depends = parse_comma_list(parser.optional_field(Fields::DEPENDS)); - if (this->feature.empty()) - { - this->default_features = parse_comma_list(parser.optional_field(Fields::DEFAULTFEATURES)); - } - - if (const auto err = parser.error_info(this->spec.to_string())) - { - System::println( - System::Color::error, "Error: while parsing the Binary Paragraph for %s", this->spec.to_string()); - print_error_message(err); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - // prefer failing above when possible because it gives better information - Checks::check_exit(VCPKG_LINE_INFO, multi_arch == "same", "Multi-Arch must be 'same' but was %s", multi_arch); - } - - BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet) - { - this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO); - this->version = spgh.version; - this->description = spgh.description; - this->maintainer = spgh.maintainer; - this->depends = filter_dependencies(spgh.depends, triplet); - } - - BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet) - { - this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO); - this->version = Strings::EMPTY; - this->feature = fpgh.name; - this->description = fpgh.description; - this->maintainer = Strings::EMPTY; - this->depends = filter_dependencies(fpgh.depends, triplet); - } - - std::string BinaryParagraph::displayname() const - { - const auto f = this->feature.empty() ? "core" : this->feature; - return Strings::format("%s[%s]:%s", this->spec.name(), f, this->spec.triplet()); - } - - std::string BinaryParagraph::dir() const { return this->spec.dir(); } - - std::string BinaryParagraph::fullstem() const - { - return Strings::format("%s_%s_%s", this->spec.name(), this->version, this->spec.triplet()); - } - - void serialize(const BinaryParagraph& pgh, std::string& out_str) - { - out_str.append("Package: ").append(pgh.spec.name()).push_back('\n'); - if (!pgh.version.empty()) - out_str.append("Version: ").append(pgh.version).push_back('\n'); - else if (!pgh.feature.empty()) - out_str.append("Feature: ").append(pgh.feature).push_back('\n'); - if (!pgh.depends.empty()) - { - out_str.append("Depends: "); - out_str.append(Strings::join(", ", pgh.depends)); - out_str.push_back('\n'); - } - - out_str.append("Architecture: ").append(pgh.spec.triplet().to_string()).push_back('\n'); - out_str.append("Multi-Arch: same\n"); - - if (!pgh.maintainer.empty()) out_str.append("Maintainer: ").append(pgh.maintainer).push_back('\n'); - if (!pgh.description.empty()) out_str.append("Description: ").append(pgh.description).push_back('\n'); - } -} diff --git a/toolsrc/src/LineInfo.cpp b/toolsrc/src/LineInfo.cpp deleted file mode 100644 index d1bf9a4b1..000000000 --- a/toolsrc/src/LineInfo.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "pch.h" - -#include "LineInfo.h" -#include "vcpkg_Strings.h" - -namespace vcpkg -{ - std::string LineInfo::to_string() const { return Strings::format("%s(%d)", this->file_name, this->line_number); } -} diff --git a/toolsrc/src/MachineType.cpp b/toolsrc/src/MachineType.cpp deleted file mode 100644 index af6378c88..000000000 --- a/toolsrc/src/MachineType.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "pch.h" - -#include "MachineType.h" -#include "vcpkg_Checks.h" - -namespace vcpkg -{ - MachineType to_machine_type(const uint16_t value) - { - const MachineType t = static_cast(value); - switch (t) - { - case MachineType::UNKNOWN: - case MachineType::AM33: - case MachineType::AMD64: - case MachineType::ARM: - case MachineType::ARM64: - case MachineType::ARMNT: - case MachineType::EBC: - case MachineType::I386: - case MachineType::IA64: - case MachineType::M32R: - case MachineType::MIPS16: - case MachineType::MIPSFPU: - case MachineType::MIPSFPU16: - case MachineType::POWERPC: - case MachineType::POWERPCFP: - case MachineType::R4000: - case MachineType::RISCV32: - case MachineType::RISCV64: - case MachineType::RISCV128: - case MachineType::SH3: - case MachineType::SH3DSP: - case MachineType::SH4: - case MachineType::SH5: - case MachineType::THUMB: - case MachineType::WCEMIPSV2: return t; - default: Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown machine type code 0x%x", value); - } - } -} diff --git a/toolsrc/src/PackageSpec.cpp b/toolsrc/src/PackageSpec.cpp deleted file mode 100644 index 890de8899..000000000 --- a/toolsrc/src/PackageSpec.cpp +++ /dev/null @@ -1,175 +0,0 @@ -#include "pch.h" - -#include "PackageSpec.h" -#include "vcpkg_Parse.h" -#include "vcpkg_Util.h" - -using vcpkg::Parse::parse_comma_list; - -namespace vcpkg -{ - static bool is_valid_package_spec_char(char c) - { - return (c == '-') || isdigit(c) || (isalpha(c) && islower(c)) || (c == '[') || (c == ']'); - } - - std::string FeatureSpec::to_string() const - { - if (feature().empty()) return spec().to_string(); - return Strings::format("%s[%s]:%s", name(), feature(), triplet()); - } - - std::vector FeatureSpec::from_strings_and_triplet(const std::vector& depends, - const Triplet& triplet) - { - std::vector f_specs; - for (auto&& depend : depends) - { - auto maybe_spec = ParsedSpecifier::from_string(depend); - if (auto spec = maybe_spec.get()) - { - Checks::check_exit(VCPKG_LINE_INFO, - spec->triplet.empty(), - "error: triplets cannot currently be specified in this context: %s", - depend); - PackageSpec pspec = - PackageSpec::from_name_and_triplet(spec->name, triplet).value_or_exit(VCPKG_LINE_INFO); - - for (auto&& feature : spec->features) - f_specs.push_back(FeatureSpec{pspec, feature}); - - if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, Strings::EMPTY}); - } - else - { - Checks::exit_with_message(VCPKG_LINE_INFO, - "error while parsing feature list: %s: %s", - vcpkg::to_string(maybe_spec.error()), - depend); - } - } - return f_specs; - } - - std::vector FullPackageSpec::to_feature_specs(const std::vector& specs) - { - std::vector ret; - for (auto&& spec : specs) - { - ret.emplace_back(spec.package_spec, Strings::EMPTY); - for (auto&& feature : spec.features) - ret.emplace_back(spec.package_spec, feature); - } - return ret; - } - - ExpectedT FullPackageSpec::from_string(const std::string& spec_as_string, - const Triplet& default_triplet) - { - auto res = ParsedSpecifier::from_string(spec_as_string); - if (auto p = res.get()) - { - FullPackageSpec fspec; - Triplet t = p->triplet.empty() ? default_triplet : Triplet::from_canonical_name(p->triplet); - fspec.package_spec = PackageSpec::from_name_and_triplet(p->name, t).value_or_exit(VCPKG_LINE_INFO); - fspec.features = std::move(p->features); - return fspec; - } - return res.error(); - } - - ExpectedT PackageSpec::from_name_and_triplet(const std::string& name, - const Triplet& triplet) - { - if (Util::find_if_not(name, is_valid_package_spec_char) != name.end()) - { - return PackageSpecParseResult::INVALID_CHARACTERS; - } - - PackageSpec p; - p.m_name = name; - p.m_triplet = triplet; - return p; - } - - const std::string& PackageSpec::name() const { return this->m_name; } - - const Triplet& PackageSpec::triplet() const { return this->m_triplet; } - - std::string PackageSpec::dir() const { return Strings::format("%s_%s", this->m_name, this->m_triplet); } - - std::string PackageSpec::to_string() const { return Strings::format("%s:%s", this->name(), this->triplet()); } - - bool operator==(const PackageSpec& left, const PackageSpec& right) - { - return left.name() == right.name() && left.triplet() == right.triplet(); - } - - bool operator!=(const PackageSpec& left, const PackageSpec& right) { return !(left == right); } - - ExpectedT ParsedSpecifier::from_string(const std::string& input) - { - auto pos = input.find(':'); - auto pos_l_bracket = input.find('['); - auto pos_r_bracket = input.find(']'); - - ParsedSpecifier f; - if (pos == std::string::npos && pos_l_bracket == std::string::npos) - { - f.name = input; - return f; - } - else if (pos == std::string::npos) - { - if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket) - { - return PackageSpecParseResult::INVALID_CHARACTERS; - } - const std::string name = input.substr(0, pos_l_bracket); - f.name = name; - f.features = parse_comma_list(input.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1)); - return f; - } - else if (pos_l_bracket == std::string::npos && pos_r_bracket == std::string::npos) - { - const std::string name = input.substr(0, pos); - f.triplet = input.substr(pos + 1); - f.name = name; - } - else - { - if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket) - { - return PackageSpecParseResult::INVALID_CHARACTERS; - } - const std::string name = input.substr(0, pos_l_bracket); - f.features = parse_comma_list(input.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1)); - f.triplet = input.substr(pos + 1); - f.name = name; - } - - auto pos2 = input.find(':', pos + 1); - if (pos2 != std::string::npos) - { - return PackageSpecParseResult::TOO_MANY_COLONS; - } - return f; - } - - ExpectedT Features::from_string(const std::string& name) - { - auto maybe_spec = ParsedSpecifier::from_string(name); - if (auto spec = maybe_spec.get()) - { - Checks::check_exit( - VCPKG_LINE_INFO, spec->triplet.empty(), "error: triplet not allowed in specifier: %s", name); - - Features f; - f.name = spec->name; - f.features = spec->features; - return f; - } - - return maybe_spec.error(); - } -} diff --git a/toolsrc/src/PackageSpecParseResult.cpp b/toolsrc/src/PackageSpecParseResult.cpp deleted file mode 100644 index 838c788ba..000000000 --- a/toolsrc/src/PackageSpecParseResult.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "pch.h" - -#include "PackageSpecParseResult.h" -#include "vcpkg_Checks.h" - -namespace vcpkg -{ - CStringView to_string(PackageSpecParseResult ev) noexcept - { - switch (ev) - { - case PackageSpecParseResult::SUCCESS: return "OK"; - case PackageSpecParseResult::TOO_MANY_COLONS: return "Too many colons"; - case PackageSpecParseResult::INVALID_CHARACTERS: - return "Contains invalid characters. Only alphanumeric lowercase ASCII characters and dashes are " - "allowed"; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } -} diff --git a/toolsrc/src/ParagraphParseResult.cpp b/toolsrc/src/ParagraphParseResult.cpp deleted file mode 100644 index 5c8c1d59d..000000000 --- a/toolsrc/src/ParagraphParseResult.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "pch.h" - -#include "ParagraphParseResult.h" -#include "vcpkg_Checks.h" - -namespace vcpkg -{ - const char* ParagraphParseResultCategoryImpl::name() const noexcept { return "ParagraphParseResult"; } - - std::string ParagraphParseResultCategoryImpl::message(int ev) const noexcept - { - switch (static_cast(ev)) - { - case ParagraphParseResult::SUCCESS: return "OK"; - case ParagraphParseResult::EXPECTED_ONE_PARAGRAPH: return "There should be exactly one paragraph"; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - - const std::error_category& paragraph_parse_result_category() - { - static ParagraphParseResultCategoryImpl instance; - return instance; - } - - std::error_code make_error_code(ParagraphParseResult e) - { - return std::error_code(static_cast(e), paragraph_parse_result_category()); - } - - ParagraphParseResult to_paragraph_parse_result(int i) { return static_cast(i); } - - ParagraphParseResult to_paragraph_parse_result(std::error_code ec) { return to_paragraph_parse_result(ec.value()); } -} diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp deleted file mode 100644 index 6a6f191df..000000000 --- a/toolsrc/src/Paragraphs.cpp +++ /dev/null @@ -1,304 +0,0 @@ -#include "pch.h" - -#include "ParagraphParseResult.h" -#include "Paragraphs.h" -#include "vcpkg_Files.h" -#include "vcpkg_GlobalState.h" -#include "vcpkg_Util.h" - -using namespace vcpkg::Parse; - -namespace vcpkg::Paragraphs -{ - struct Parser - { - Parser(const char* c, const char* e) : cur(c), end(e) {} - - private: - const char* cur; - const char* const end; - - void peek(char& ch) const - { - if (cur == end) - ch = 0; - else - ch = *cur; - } - - void next(char& ch) - { - if (cur == end) - ch = 0; - else - { - ++cur; - peek(ch); - } - } - - void skip_comment(char& ch) - { - while (ch != '\r' && ch != '\n' && ch != '\0') - next(ch); - if (ch == '\r') next(ch); - if (ch == '\n') next(ch); - } - - void skip_spaces(char& ch) - { - while (ch == ' ' || ch == '\t') - next(ch); - } - - static bool is_alphanum(char ch) - { - return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9'); - } - - static bool is_comment(char ch) { return (ch == '#'); } - - static bool is_lineend(char ch) { return ch == '\r' || ch == '\n' || ch == 0; } - - void get_fieldvalue(char& ch, std::string& fieldvalue) - { - fieldvalue.clear(); - - auto beginning_of_line = cur; - do - { - // scan to end of current line (it is part of the field value) - while (!is_lineend(ch)) - next(ch); - - fieldvalue.append(beginning_of_line, cur); - - if (ch == '\r') next(ch); - if (ch == '\n') next(ch); - - if (is_alphanum(ch) || is_comment(ch)) - { - // Line begins a new field. - return; - } - - beginning_of_line = cur; - - // Line may continue the current field with data or terminate the paragraph, - // depending on first nonspace character. - skip_spaces(ch); - - if (is_lineend(ch)) - { - // Line was whitespace or empty. - // This terminates the field and the paragraph. - // We leave the blank line's whitespace consumed, because it doesn't matter. - return; - } - - // First nonspace is not a newline. This continues the current field value. - // We forcibly convert all newlines into single '\n' for ease of text handling later on. - fieldvalue.push_back('\n'); - } while (true); - } - - void get_fieldname(char& ch, std::string& fieldname) - { - auto begin_fieldname = cur; - while (is_alphanum(ch) || ch == '-') - next(ch); - Checks::check_exit(VCPKG_LINE_INFO, ch == ':', "Expected ':'"); - fieldname = std::string(begin_fieldname, cur); - - // skip ': ' - next(ch); - skip_spaces(ch); - } - - void get_paragraph(char& ch, std::unordered_map& fields) - { - fields.clear(); - std::string fieldname; - std::string fieldvalue; - do - { - if (is_comment(ch)) - { - skip_comment(ch); - continue; - } - - get_fieldname(ch, fieldname); - - auto it = fields.find(fieldname); - Checks::check_exit(VCPKG_LINE_INFO, it == fields.end(), "Duplicate field"); - - get_fieldvalue(ch, fieldvalue); - - fields.emplace(fieldname, fieldvalue); - } while (!is_lineend(ch)); - } - - public: - std::vector> get_paragraphs() - { - std::vector> paragraphs; - - char ch; - peek(ch); - - while (ch != 0) - { - if (ch == '\n' || ch == '\r' || ch == ' ' || ch == '\t') - { - next(ch); - continue; - } - - paragraphs.emplace_back(); - get_paragraph(ch, paragraphs.back()); - } - - return paragraphs; - } - }; - - Expected> get_single_paragraph(const Files::Filesystem& fs, - const fs::path& control_path) - { - const Expected contents = fs.read_contents(control_path); - if (auto spgh = contents.get()) - { - return parse_single_paragraph(*spgh); - } - - return contents.error(); - } - - Expected>> get_paragraphs(const Files::Filesystem& fs, - const fs::path& control_path) - { - const Expected contents = fs.read_contents(control_path); - if (auto spgh = contents.get()) - { - return parse_paragraphs(*spgh); - } - - return contents.error(); - } - - Expected> parse_single_paragraph(const std::string& str) - { - const std::vector> p = - Parser(str.c_str(), str.c_str() + str.size()).get_paragraphs(); - - if (p.size() == 1) - { - return p.at(0); - } - - return std::error_code(ParagraphParseResult::EXPECTED_ONE_PARAGRAPH); - } - - Expected>> parse_paragraphs(const std::string& str) - { - return Parser(str.c_str(), str.c_str() + str.size()).get_paragraphs(); - } - - ParseExpected try_load_port(const Files::Filesystem& fs, const fs::path& path) - { - Expected>> pghs = get_paragraphs(fs, path / "CONTROL"); - if (auto vector_pghs = pghs.get()) - { - auto csf = SourceControlFile::parse_control_file(std::move(*vector_pghs)); - if (!GlobalState::feature_packages) - { - if (auto ptr = csf.get()) - { - Checks::check_exit(VCPKG_LINE_INFO, ptr->get() != nullptr); - ptr->get()->core_paragraph->default_features.clear(); - ptr->get()->feature_paragraphs.clear(); - } - } - return csf; - } - auto error_info = std::make_unique(); - error_info->name = path.filename().generic_u8string(); - error_info->error = pghs.error(); - return error_info; - } - - Expected try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec) - { - Expected>> pghs = - get_paragraphs(paths.get_filesystem(), paths.package_dir(spec) / "CONTROL"); - - if (auto p = pghs.get()) - { - BinaryControlFile bcf; - bcf.core_paragraph = BinaryParagraph(p->front()); - p->erase(p->begin()); - - bcf.features = - Util::fmap(*p, [&](auto&& raw_feature) -> BinaryParagraph { return BinaryParagraph(raw_feature); }); - - return bcf; - } - - return pghs.error(); - } - - LoadResults try_load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir) - { - LoadResults ret; - for (auto&& path : fs.get_files_non_recursive(ports_dir)) - { - auto maybe_spgh = try_load_port(fs, path); - if (const auto spgh = maybe_spgh.get()) - { - ret.paragraphs.emplace_back(std::move(*spgh)); - } - else - { - ret.errors.emplace_back(std::move(maybe_spgh).error()); - } - } - return ret; - } - - std::vector> load_all_ports(const Files::Filesystem& fs, - const fs::path& ports_dir) - { - auto results = try_load_all_ports(fs, ports_dir); - if (!results.errors.empty()) - { - if (GlobalState::debugging) - { - print_error_message(results.errors); - } - else - { - for (auto&& error : results.errors) - { - System::println( - System::Color::warning, "Warning: an error occurred while parsing '%s'", error->name); - } - System::println(System::Color::warning, - "Use '--debug' to get more information about the parse failures.\n"); - } - } - return std::move(results.paragraphs); - } - - std::map load_all_port_names_and_versions(const Files::Filesystem& fs, - const fs::path& ports_dir) - { - auto all_ports = load_all_ports(fs, ports_dir); - - std::map names_and_versions; - for (auto&& port : all_ports) - names_and_versions.emplace(port->core_paragraph->name, port->core_paragraph->version); - - return names_and_versions; - } -} diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp deleted file mode 100644 index a0699e15c..000000000 --- a/toolsrc/src/PostBuildLint.cpp +++ /dev/null @@ -1,846 +0,0 @@ -#include "pch.h" - -#include "PackageSpec.h" -#include "PostBuildLint.h" -#include "PostBuildLint_BuildType.h" -#include "VcpkgPaths.h" -#include "coff_file_reader.h" -#include "vcpkg_Build.h" -#include "vcpkg_Files.h" -#include "vcpkg_System.h" -#include "vcpkg_Util.h" - -using vcpkg::Build::BuildInfo; -using vcpkg::Build::BuildPolicy; -using vcpkg::Build::PreBuildInfo; - -namespace vcpkg::PostBuildLint -{ - static auto has_extension_pred(const Files::Filesystem& fs, const std::string& ext) - { - return [&fs, ext](const fs::path& path) { return !fs.is_directory(path) && path.extension() == ext; }; - } - - enum class LintStatus - { - SUCCESS = 0, - ERROR_DETECTED = 1 - }; - - struct OutdatedDynamicCrt - { - std::string name; - std::regex regex; - - OutdatedDynamicCrt(const std::string& name, const std::string& regex_as_string) - : name(name), regex(std::regex(regex_as_string, std::regex_constants::icase)) - { - } - }; - - Span get_outdated_dynamic_crts(CStringView toolset) - { - static const std::vector V_NO_MSVCRT = { - {"msvcp100.dll", R"(msvcp100\.dll)"}, - {"msvcp100d.dll", R"(msvcp100d\.dll)"}, - {"msvcp110.dll", R"(msvcp110\.dll)"}, - {"msvcp110_win.dll", R"(msvcp110_win\.dll)"}, - {"msvcp120.dll", R"(msvcp120\.dll)"}, - {"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"}, - {"msvcp60.dll", R"(msvcp60\.dll)"}, - {"msvcp60.dll", R"(msvcp60\.dll)"}, - - {"msvcr100.dll", R"(msvcr100\.dll)"}, - {"msvcr100d.dll", R"(msvcr100d\.dll)"}, - {"msvcr100_clr0400.dll", R"(msvcr100_clr0400\.dll)"}, - {"msvcr110.dll", R"(msvcr110\.dll)"}, - {"msvcr120.dll", R"(msvcr120\.dll)"}, - {"msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)"}, - {"msvcrt20.dll", R"(msvcrt20\.dll)"}, - {"msvcrt40.dll", R"(msvcrt40\.dll)"}}; - - return V_NO_MSVCRT; - } - - static LintStatus check_for_files_in_include_directory(const Files::Filesystem& fs, - const Build::BuildPolicies& policies, - const fs::path& package_dir) - { - if (policies.is_enabled(BuildPolicy::EMPTY_INCLUDE_FOLDER)) - { - return LintStatus::SUCCESS; - } - - const fs::path include_dir = package_dir / "include"; - if (!fs.exists(include_dir) || fs.is_empty(include_dir)) - { - System::println(System::Color::warning, - "The folder /include is empty. This indicates the library was not correctly installed."); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static LintStatus check_for_files_in_debug_include_directory(const Files::Filesystem& fs, - const fs::path& package_dir) - { - const fs::path debug_include_dir = package_dir / "debug" / "include"; - - std::vector files_found = fs.get_files_recursive(debug_include_dir); - - Util::unstable_keep_if( - files_found, [&fs](const fs::path& path) { return !fs.is_directory(path) && path.extension() != ".ifc"; }); - - if (!files_found.empty()) - { - System::println(System::Color::warning, - "Include files should not be duplicated into the /debug/include directory. If this cannot " - "be disabled in the project cmake, use\n" - " file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)"); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static LintStatus check_for_files_in_debug_share_directory(const Files::Filesystem& fs, const fs::path& package_dir) - { - const fs::path debug_share = package_dir / "debug" / "share"; - - if (fs.exists(debug_share)) - { - System::println(System::Color::warning, - "/debug/share should not exist. Please reorganize any important files, then use\n" - " file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)"); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static LintStatus check_folder_lib_cmake(const Files::Filesystem& fs, - const fs::path& package_dir, - const PackageSpec& spec) - { - const fs::path lib_cmake = package_dir / "lib" / "cmake"; - if (fs.exists(lib_cmake)) - { - System::println( - System::Color::warning, - "The /lib/cmake folder should be merged with /debug/lib/cmake and moved to /share/%s/cmake.", - spec.name()); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static LintStatus check_for_misplaced_cmake_files(const Files::Filesystem& fs, - const fs::path& package_dir, - const PackageSpec& spec) - { - std::vector dirs = { - package_dir / "cmake", - package_dir / "debug" / "cmake", - package_dir / "lib" / "cmake", - package_dir / "debug" / "lib" / "cmake", - }; - - std::vector misplaced_cmake_files; - for (auto&& dir : dirs) - { - auto files = fs.get_files_recursive(dir); - for (auto&& file : files) - { - if (!fs.is_directory(file) && file.extension() == ".cmake") - misplaced_cmake_files.push_back(std::move(file)); - } - } - - if (!misplaced_cmake_files.empty()) - { - System::println( - System::Color::warning, - "The following cmake files were found outside /share/%s. Please place cmake files in /share/%s.", - spec.name(), - spec.name()); - Files::print_paths(misplaced_cmake_files); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static LintStatus check_folder_debug_lib_cmake(const Files::Filesystem& fs, - const fs::path& package_dir, - const PackageSpec& spec) - { - const fs::path lib_cmake_debug = package_dir / "debug" / "lib" / "cmake"; - if (fs.exists(lib_cmake_debug)) - { - System::println(System::Color::warning, - "The /debug/lib/cmake folder should be merged with /lib/cmake into /share/%s", - spec.name()); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static LintStatus check_for_dlls_in_lib_dir(const Files::Filesystem& fs, const fs::path& package_dir) - { - std::vector dlls = fs.get_files_recursive(package_dir / "lib"); - Util::unstable_keep_if(dlls, has_extension_pred(fs, ".dll")); - - if (!dlls.empty()) - { - System::println(System::Color::warning, - "\nThe following dlls were found in /lib or /debug/lib. Please move them to /bin or " - "/debug/bin, respectively."); - Files::print_paths(dlls); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static LintStatus check_for_copyright_file(const Files::Filesystem& fs, - const PackageSpec& spec, - const VcpkgPaths& paths) - { - const fs::path packages_dir = paths.packages / spec.dir(); - const fs::path copyright_file = packages_dir / "share" / spec.name() / "copyright"; - if (fs.exists(copyright_file)) - { - return LintStatus::SUCCESS; - } - const fs::path current_buildtrees_dir = paths.buildtrees / spec.name(); - const fs::path current_buildtrees_dir_src = current_buildtrees_dir / "src"; - - std::vector potential_copyright_files; - // We only search in the root of each unpacked source archive to reduce false positives - auto src_dirs = fs.get_files_non_recursive(current_buildtrees_dir_src); - for (auto&& src_dir : src_dirs) - { - if (!fs.is_directory(src_dir)) continue; - - for (auto&& src_file : fs.get_files_non_recursive(src_dir)) - { - const std::string filename = src_file.filename().string(); - - if (filename == "LICENSE" || filename == "LICENSE.txt" || filename == "COPYING") - { - potential_copyright_files.push_back(src_file); - } - } - } - - System::println(System::Color::warning, - "The software license must be available at ${CURRENT_PACKAGES_DIR}/share/%s/copyright", - spec.name()); - if (potential_copyright_files.size() == - 1) // if there is only one candidate, provide the cmake lines needed to place it in the proper location - { - const fs::path found_file = potential_copyright_files[0]; - const fs::path relative_path = found_file.string().erase( - 0, current_buildtrees_dir.string().size() + 1); // The +1 is needed to remove the "/" - System::println( - "\n file(COPY ${CURRENT_BUILDTREES_DIR}/%s DESTINATION ${CURRENT_PACKAGES_DIR}/share/%s)\n" - " file(RENAME ${CURRENT_PACKAGES_DIR}/share/%s/%s ${CURRENT_PACKAGES_DIR}/share/%s/copyright)", - relative_path.generic_string(), - spec.name(), - spec.name(), - found_file.filename().generic_string(), - spec.name()); - } - else if (potential_copyright_files.size() > 1) - { - System::println(System::Color::warning, "The following files are potential copyright files:"); - Files::print_paths(potential_copyright_files); - } - return LintStatus::ERROR_DETECTED; - } - - static LintStatus check_for_exes(const Files::Filesystem& fs, const fs::path& package_dir) - { - std::vector exes = fs.get_files_recursive(package_dir / "bin"); - Util::unstable_keep_if(exes, has_extension_pred(fs, ".exe")); - - if (!exes.empty()) - { - System::println( - System::Color::warning, - "The following EXEs were found in /bin or /debug/bin. EXEs are not valid distribution targets."); - Files::print_paths(exes); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static LintStatus check_exports_of_dlls(const std::vector& dlls, const fs::path& dumpbin_exe) - { - std::vector dlls_with_no_exports; - for (const fs::path& dll : dlls) - { - const std::wstring cmd_line = - Strings::wformat(LR"("%s" /exports "%s")", dumpbin_exe.native(), dll.native()); - System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Running command:\n %s\n failed", - Strings::to_utf8(cmd_line)); - - if (ec_data.output.find("ordinal hint RVA name") == std::string::npos) - { - dlls_with_no_exports.push_back(dll); - } - } - - if (!dlls_with_no_exports.empty()) - { - System::println(System::Color::warning, "The following DLLs have no exports:"); - Files::print_paths(dlls_with_no_exports); - System::println(System::Color::warning, "DLLs without any exports are likely a bug in the build script."); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static LintStatus check_uwp_bit_of_dlls(const std::string& expected_system_name, - const std::vector& dlls, - const fs::path dumpbin_exe) - { - if (expected_system_name != "WindowsStore") - { - return LintStatus::SUCCESS; - } - - std::vector dlls_with_improper_uwp_bit; - for (const fs::path& dll : dlls) - { - const std::wstring cmd_line = - Strings::wformat(LR"("%s" /headers "%s")", dumpbin_exe.native(), dll.native()); - System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Running command:\n %s\n failed", - Strings::to_utf8(cmd_line)); - - if (ec_data.output.find("App Container") == std::string::npos) - { - dlls_with_improper_uwp_bit.push_back(dll); - } - } - - if (!dlls_with_improper_uwp_bit.empty()) - { - System::println(System::Color::warning, "The following DLLs do not have the App Container bit set:"); - Files::print_paths(dlls_with_improper_uwp_bit); - System::println(System::Color::warning, "This bit is required for Windows Store apps."); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - struct FileAndArch - { - fs::path file; - std::string actual_arch; - }; - - static std::string get_actual_architecture(const MachineType& machine_type) - { - switch (machine_type) - { - case MachineType::AMD64: - case MachineType::IA64: return "x64"; - case MachineType::I386: return "x86"; - case MachineType::ARM: - case MachineType::ARMNT: return "arm"; - default: return "Machine Type Code = " + std::to_string(static_cast(machine_type)); - } - } - - static void print_invalid_architecture_files(const std::string& expected_architecture, - std::vector binaries_with_invalid_architecture) - { - System::println(System::Color::warning, "The following files were built for an incorrect architecture:"); - System::println(); - for (const FileAndArch& b : binaries_with_invalid_architecture) - { - System::println(" %s", b.file.generic_string()); - System::println("Expected %s, but was: %s", expected_architecture, b.actual_arch); - System::println(); - } - } - - static LintStatus check_dll_architecture(const std::string& expected_architecture, - const std::vector& files) - { - std::vector binaries_with_invalid_architecture; - - for (const fs::path& file : files) - { - Checks::check_exit(VCPKG_LINE_INFO, - file.extension() == ".dll", - "The file extension was not .dll: %s", - file.generic_string()); - const CoffFileReader::DllInfo info = CoffFileReader::read_dll(file); - const std::string actual_architecture = get_actual_architecture(info.machine_type); - - if (expected_architecture != actual_architecture) - { - binaries_with_invalid_architecture.push_back({file, actual_architecture}); - } - } - - if (!binaries_with_invalid_architecture.empty()) - { - print_invalid_architecture_files(expected_architecture, binaries_with_invalid_architecture); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static LintStatus check_lib_architecture(const std::string& expected_architecture, - const std::vector& files) - { - std::vector binaries_with_invalid_architecture; - - for (const fs::path& file : files) - { - Checks::check_exit(VCPKG_LINE_INFO, - file.extension() == ".lib", - "The file extension was not .lib: %s", - file.generic_string()); - CoffFileReader::LibInfo info = CoffFileReader::read_lib(file); - - // This is zero for folly's debug library - // TODO: Why? - if (info.machine_types.size() == 0) return LintStatus::SUCCESS; - - Checks::check_exit(VCPKG_LINE_INFO, - info.machine_types.size() == 1, - "Found more than 1 architecture in file %s", - file.generic_string()); - - const std::string actual_architecture = get_actual_architecture(info.machine_types.at(0)); - if (expected_architecture != actual_architecture) - { - binaries_with_invalid_architecture.push_back({file, actual_architecture}); - } - } - - if (!binaries_with_invalid_architecture.empty()) - { - print_invalid_architecture_files(expected_architecture, binaries_with_invalid_architecture); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static LintStatus check_no_dlls_present(const std::vector& dlls) - { - if (dlls.empty()) - { - return LintStatus::SUCCESS; - } - - System::println(System::Color::warning, - "DLLs should not be present in a static build, but the following DLLs were found:"); - Files::print_paths(dlls); - return LintStatus::ERROR_DETECTED; - } - - static LintStatus check_matching_debug_and_release_binaries(const std::vector& debug_binaries, - const std::vector& release_binaries) - { - const size_t debug_count = debug_binaries.size(); - const size_t release_count = release_binaries.size(); - if (debug_count == release_count) - { - return LintStatus::SUCCESS; - } - - System::println(System::Color::warning, - "Mismatching number of debug and release binaries. Found %d for debug but %d for release.", - debug_count, - release_count); - System::println("Debug binaries"); - Files::print_paths(debug_binaries); - - System::println("Release binaries"); - Files::print_paths(release_binaries); - - if (debug_count == 0) - { - System::println(System::Color::warning, "Debug binaries were not found"); - } - if (release_count == 0) - { - System::println(System::Color::warning, "Release binaries were not found"); - } - - System::println(); - - return LintStatus::ERROR_DETECTED; - } - - static LintStatus check_lib_files_are_available_if_dlls_are_available(const Build::BuildPolicies& policies, - const size_t lib_count, - const size_t dll_count, - const fs::path& lib_dir) - { - if (policies.is_enabled(BuildPolicy::DLLS_WITHOUT_LIBS)) return LintStatus::SUCCESS; - - if (lib_count == 0 && dll_count != 0) - { - System::println(System::Color::warning, "Import libs were not present in %s", lib_dir.u8string()); - System::println(System::Color::warning, - "If this is intended, add the following line in the portfile:\n" - " SET(%s enabled)", - to_cmake_variable(BuildPolicy::DLLS_WITHOUT_LIBS)); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static LintStatus check_bin_folders_are_not_present_in_static_build(const Files::Filesystem& fs, - const fs::path& package_dir) - { - const fs::path bin = package_dir / "bin"; - const fs::path debug_bin = package_dir / "debug" / "bin"; - - if (!fs.exists(bin) && !fs.exists(debug_bin)) - { - return LintStatus::SUCCESS; - } - - if (fs.exists(bin)) - { - System::println(System::Color::warning, - R"(There should be no bin\ directory in a static build, but %s is present.)", - bin.u8string()); - } - - if (fs.exists(debug_bin)) - { - System::println(System::Color::warning, - R"(There should be no debug\bin\ directory in a static build, but %s is present.)", - debug_bin.u8string()); - } - - System::println( - System::Color::warning, - R"(If the creation of bin\ and/or debug\bin\ cannot be disabled, use this in the portfile to remove them)" - "\n" - "\n" - R"###( if(VCPKG_LIBRARY_LINKAGE STREQUAL static))###" - "\n" - R"###( file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin))###" - "\n" - R"###( endif())###" - "\n"); - - return LintStatus::ERROR_DETECTED; - } - - static LintStatus check_no_empty_folders(const Files::Filesystem& fs, const fs::path& dir) - { - std::vector empty_directories = fs.get_files_recursive(dir); - - Util::unstable_keep_if(empty_directories, [&fs](const fs::path& current) { - return fs.is_directory(current) && fs.is_empty(current); - }); - - if (!empty_directories.empty()) - { - System::println(System::Color::warning, "There should be no empty directories in %s", dir.generic_string()); - System::println("The following empty directories were found: "); - Files::print_paths(empty_directories); - System::println( - System::Color::warning, - "If a directory should be populated but is not, this might indicate an error in the portfile.\n" - "If the directories are not needed and their creation cannot be disabled, use something like this in " - "the portfile to remove them:\n" - "\n" - R"###( file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/a/dir ${CURRENT_PACKAGES_DIR}/some/other/dir))###" - "\n" - "\n"); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - struct BuildTypeAndFile - { - fs::path file; - BuildType build_type; - }; - - static LintStatus check_crt_linkage_of_libs(const BuildType& expected_build_type, - const std::vector& libs, - const fs::path dumpbin_exe) - { - std::vector bad_build_types(BuildTypeC::VALUES.cbegin(), BuildTypeC::VALUES.cend()); - bad_build_types.erase(std::remove(bad_build_types.begin(), bad_build_types.end(), expected_build_type), - bad_build_types.end()); - - std::vector libs_with_invalid_crt; - - for (const fs::path& lib : libs) - { - const std::wstring cmd_line = - Strings::wformat(LR"("%s" /directives "%s")", dumpbin_exe.native(), lib.native()); - System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Running command:\n %s\n failed", - Strings::to_utf8(cmd_line)); - - for (const BuildType& bad_build_type : bad_build_types) - { - if (std::regex_search(ec_data.output.cbegin(), ec_data.output.cend(), bad_build_type.crt_regex())) - { - libs_with_invalid_crt.push_back({lib, bad_build_type}); - break; - } - } - } - - if (!libs_with_invalid_crt.empty()) - { - System::println(System::Color::warning, - "Expected %s crt linkage, but the following libs had invalid crt linkage:", - expected_build_type.to_string()); - System::println(); - for (const BuildTypeAndFile btf : libs_with_invalid_crt) - { - System::println(" %s: %s", btf.file.generic_string(), btf.build_type.to_string()); - } - System::println(); - - System::println(System::Color::warning, - "To inspect the lib files, use:\n dumpbin.exe /directives mylibfile.lib"); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - struct OutdatedDynamicCrtAndFile - { - fs::path file; - OutdatedDynamicCrt outdated_crt; - - OutdatedDynamicCrtAndFile() = delete; - }; - - static LintStatus check_outdated_crt_linkage_of_dlls(const std::vector& dlls, - const fs::path dumpbin_exe, - const BuildInfo& build_info) - { - if (build_info.policies.is_enabled(BuildPolicy::ALLOW_OBSOLETE_MSVCRT)) return LintStatus::SUCCESS; - - std::vector dlls_with_outdated_crt; - - for (const fs::path& dll : dlls) - { - const std::wstring cmd_line = - Strings::wformat(LR"("%s" /dependents "%s")", dumpbin_exe.native(), dll.native()); - System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Running command:\n %s\n failed", - Strings::to_utf8(cmd_line)); - - for (const OutdatedDynamicCrt& outdated_crt : get_outdated_dynamic_crts("v141")) - { - if (std::regex_search(ec_data.output.cbegin(), ec_data.output.cend(), outdated_crt.regex)) - { - dlls_with_outdated_crt.push_back({dll, outdated_crt}); - break; - } - } - } - - if (!dlls_with_outdated_crt.empty()) - { - System::println(System::Color::warning, "Detected outdated dynamic CRT in the following files:"); - System::println(); - for (const OutdatedDynamicCrtAndFile btf : dlls_with_outdated_crt) - { - System::println(" %s: %s", btf.file.generic_string(), btf.outdated_crt.name); - } - System::println(); - - System::println(System::Color::warning, - "To inspect the dll files, use:\n dumpbin.exe /dependents mydllfile.dll"); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static LintStatus check_no_files_in_dir(const Files::Filesystem& fs, const fs::path& dir) - { - std::vector misplaced_files = fs.get_files_non_recursive(dir); - Util::unstable_keep_if(misplaced_files, [&fs](const fs::path& path) { - const std::string filename = path.filename().generic_string(); - if (Strings::case_insensitive_ascii_compare(filename.c_str(), "CONTROL") == 0 || - Strings::case_insensitive_ascii_compare(filename.c_str(), "BUILD_INFO") == 0) - return false; - return !fs.is_directory(path); - }); - - if (!misplaced_files.empty()) - { - System::println(System::Color::warning, "The following files are placed in\n%s: ", dir.u8string()); - Files::print_paths(misplaced_files); - System::println(System::Color::warning, "Files cannot be present in those directories.\n"); - return LintStatus::ERROR_DETECTED; - } - - return LintStatus::SUCCESS; - } - - static void operator+=(size_t& left, const LintStatus& right) { left += static_cast(right); } - - static size_t perform_all_checks_and_return_error_count(const PackageSpec& spec, - const VcpkgPaths& paths, - const PreBuildInfo& pre_build_info, - const BuildInfo& build_info) - { - const auto& fs = paths.get_filesystem(); - - // for dumpbin - const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); - const fs::path package_dir = paths.package_dir(spec); - - size_t error_count = 0; - - if (build_info.policies.is_enabled(BuildPolicy::EMPTY_PACKAGE)) - { - return error_count; - } - - error_count += check_for_files_in_include_directory(fs, build_info.policies, package_dir); - error_count += check_for_files_in_debug_include_directory(fs, package_dir); - error_count += check_for_files_in_debug_share_directory(fs, package_dir); - error_count += check_folder_lib_cmake(fs, package_dir, spec); - error_count += check_for_misplaced_cmake_files(fs, package_dir, spec); - error_count += check_folder_debug_lib_cmake(fs, package_dir, spec); - error_count += check_for_dlls_in_lib_dir(fs, package_dir); - error_count += check_for_dlls_in_lib_dir(fs, package_dir / "debug"); - error_count += check_for_copyright_file(fs, spec, paths); - error_count += check_for_exes(fs, package_dir); - error_count += check_for_exes(fs, package_dir / "debug"); - - const fs::path debug_lib_dir = package_dir / "debug" / "lib"; - const fs::path release_lib_dir = package_dir / "lib"; - const fs::path debug_bin_dir = package_dir / "debug" / "bin"; - const fs::path release_bin_dir = package_dir / "bin"; - - std::vector debug_libs = fs.get_files_recursive(debug_lib_dir); - Util::unstable_keep_if(debug_libs, has_extension_pred(fs, ".lib")); - std::vector release_libs = fs.get_files_recursive(release_lib_dir); - Util::unstable_keep_if(release_libs, has_extension_pred(fs, ".lib")); - - error_count += check_matching_debug_and_release_binaries(debug_libs, release_libs); - - { - std::vector libs; - libs.insert(libs.cend(), debug_libs.cbegin(), debug_libs.cend()); - libs.insert(libs.cend(), release_libs.cbegin(), release_libs.cend()); - - error_count += check_lib_architecture(pre_build_info.target_architecture, libs); - } - - std::vector debug_dlls = fs.get_files_recursive(debug_bin_dir); - Util::unstable_keep_if(debug_dlls, has_extension_pred(fs, ".dll")); - std::vector release_dlls = fs.get_files_recursive(release_bin_dir); - Util::unstable_keep_if(release_dlls, has_extension_pred(fs, ".dll")); - - switch (build_info.library_linkage) - { - case Build::LinkageType::DYNAMIC: - { - error_count += check_matching_debug_and_release_binaries(debug_dlls, release_dlls); - - error_count += check_lib_files_are_available_if_dlls_are_available( - build_info.policies, debug_libs.size(), debug_dlls.size(), debug_lib_dir); - error_count += check_lib_files_are_available_if_dlls_are_available( - build_info.policies, release_libs.size(), release_dlls.size(), release_lib_dir); - - std::vector dlls; - dlls.insert(dlls.cend(), debug_dlls.cbegin(), debug_dlls.cend()); - dlls.insert(dlls.cend(), release_dlls.cbegin(), release_dlls.cend()); - - error_count += check_exports_of_dlls(dlls, toolset.dumpbin); - error_count += check_uwp_bit_of_dlls(pre_build_info.cmake_system_name, dlls, toolset.dumpbin); - error_count += check_dll_architecture(pre_build_info.target_architecture, dlls); - - error_count += check_outdated_crt_linkage_of_dlls(dlls, toolset.dumpbin, build_info); - break; - } - case Build::LinkageType::STATIC: - { - auto dlls = release_dlls; - dlls.insert(dlls.end(), debug_dlls.begin(), debug_dlls.end()); - error_count += check_no_dlls_present(dlls); - - error_count += check_bin_folders_are_not_present_in_static_build(fs, package_dir); - - if (!build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT)) - { - error_count += - check_crt_linkage_of_libs(BuildType::value_of(ConfigurationType::DEBUG, build_info.crt_linkage), - debug_libs, - toolset.dumpbin); - } - error_count += - check_crt_linkage_of_libs(BuildType::value_of(ConfigurationType::RELEASE, build_info.crt_linkage), - release_libs, - toolset.dumpbin); - break; - } - default: Checks::unreachable(VCPKG_LINE_INFO); - } - - error_count += check_no_empty_folders(fs, package_dir); - error_count += check_no_files_in_dir(fs, package_dir); - error_count += check_no_files_in_dir(fs, package_dir / "debug"); - - return error_count; - } - - size_t perform_all_checks(const PackageSpec& spec, - const VcpkgPaths& paths, - const PreBuildInfo& pre_build_info, - const BuildInfo& build_info) - { - System::println("-- Performing post-build validation"); - 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"; - System::println(System::Color::error, - "Found %u error(s). Please correct the portfile:\n %s", - error_count, - portfile.string()); - } - - System::println("-- Performing post-build validation done"); - - return error_count; - } -} diff --git a/toolsrc/src/PostBuildLint_BuildType.cpp b/toolsrc/src/PostBuildLint_BuildType.cpp deleted file mode 100644 index 649f0ccca..000000000 --- a/toolsrc/src/PostBuildLint_BuildType.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include "pch.h" - -#include "PostBuildLint_BuildType.h" -#include "vcpkg_Checks.h" - -namespace vcpkg::PostBuildLint -{ - BuildType BuildType::value_of(const ConfigurationType& config, const Build::LinkageType& linkage) - { - if (config == ConfigurationType::DEBUG && linkage == Build::LinkageType::STATIC) - { - return BuildTypeC::DEBUG_STATIC; - } - - if (config == ConfigurationType::DEBUG && linkage == Build::LinkageType::DYNAMIC) - { - return BuildTypeC::DEBUG_DYNAMIC; - } - - if (config == ConfigurationType::RELEASE && linkage == Build::LinkageType::STATIC) - { - return BuildTypeC::RELEASE_STATIC; - } - - if (config == ConfigurationType::RELEASE && linkage == Build::LinkageType::DYNAMIC) - { - return BuildTypeC::RELEASE_DYNAMIC; - } - - Checks::unreachable(VCPKG_LINE_INFO); - } - - const ConfigurationType& BuildType::config() const { return this->m_config; } - - const Build::LinkageType& BuildType::linkage() const { return this->m_linkage; } - - const std::regex& BuildType::crt_regex() const - { - static const std::regex REGEX_DEBUG_STATIC(R"(/DEFAULTLIB:LIBCMTD)", std::regex_constants::icase); - static const std::regex REGEX_DEBUG_DYNAMIC(R"(/DEFAULTLIB:MSVCRTD)", std::regex_constants::icase); - static const std::regex REGEX_RELEASE_STATIC(R"(/DEFAULTLIB:LIBCMT[^D])", std::regex_constants::icase); - static const std::regex REGEX_RELEASE_DYNAMIC(R"(/DEFAULTLIB:MSVCRT[^D])", std::regex_constants::icase); - - switch (backing_enum) - { - case BuildTypeC::DEBUG_STATIC: return REGEX_DEBUG_STATIC; - case BuildTypeC::DEBUG_DYNAMIC: return REGEX_DEBUG_DYNAMIC; - case BuildTypeC::RELEASE_STATIC: return REGEX_RELEASE_STATIC; - case BuildTypeC::RELEASE_DYNAMIC: return REGEX_RELEASE_DYNAMIC; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - - const std::string& BuildType::to_string() const - { - static const std::string NAME_DEBUG_STATIC("Debug,Static"); - static const std::string NAME_DEBUG_DYNAMIC("Debug,Dynamic"); - static const std::string NAME_RELEASE_STATIC("Release,Static"); - static const std::string NAME_RELEASE_DYNAMIC("Release,Dynamic"); - - switch (backing_enum) - { - case BuildTypeC::DEBUG_STATIC: return NAME_DEBUG_STATIC; - case BuildTypeC::DEBUG_DYNAMIC: return NAME_DEBUG_DYNAMIC; - case BuildTypeC::RELEASE_STATIC: return NAME_RELEASE_STATIC; - case BuildTypeC::RELEASE_DYNAMIC: return NAME_RELEASE_DYNAMIC; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } -} diff --git a/toolsrc/src/SourceParagraph.cpp b/toolsrc/src/SourceParagraph.cpp deleted file mode 100644 index 0f1a38d19..000000000 --- a/toolsrc/src/SourceParagraph.cpp +++ /dev/null @@ -1,262 +0,0 @@ -#include "pch.h" - -#include "PackageSpec.h" -#include "SourceParagraph.h" -#include "Triplet.h" -#include "vcpkg_Checks.h" -#include "vcpkg_Maps.h" -#include "vcpkg_System.h" -#include "vcpkg_Util.h" -#include "vcpkg_expected.h" - -namespace vcpkg -{ - using namespace vcpkg::Parse; - - namespace Fields - { - static const std::string BUILD_DEPENDS = "Build-Depends"; - static const std::string DEFAULTFEATURES = "Default-Features"; - static const std::string DESCRIPTION = "Description"; - static const std::string FEATURE = "Feature"; - static const std::string MAINTAINER = "Maintainer"; - static const std::string SOURCE = "Source"; - static const std::string SUPPORTS = "Supports"; - static const std::string VERSION = "Version"; - } - - static Span get_list_of_valid_fields() - { - static const std::string valid_fields[] = { - Fields::SOURCE, - Fields::VERSION, - Fields::DESCRIPTION, - Fields::MAINTAINER, - Fields::BUILD_DEPENDS, - }; - - return valid_fields; - } - - void print_error_message(Span> error_info_list) - { - Checks::check_exit(VCPKG_LINE_INFO, error_info_list.size() > 0); - - for (auto&& error_info : error_info_list) - { - Checks::check_exit(VCPKG_LINE_INFO, error_info != nullptr); - if (error_info->error) - { - System::println( - System::Color::error, "Error: while loading %s: %s", error_info->name, error_info->error.message()); - } - } - - bool have_remaining_fields = false; - for (auto&& error_info : error_info_list) - { - if (!error_info->extra_fields.empty()) - { - System::println(System::Color::error, - "Error: There are invalid fields in the control file of %s", - error_info->name); - System::println("The following fields were not expected:\n\n %s\n", - Strings::join("\n ", error_info->extra_fields)); - have_remaining_fields = true; - } - } - - if (have_remaining_fields) - { - System::println("This is the list of valid fields (case-sensitive): \n\n %s\n", - Strings::join("\n ", get_list_of_valid_fields())); - System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n"); - } - - for (auto&& error_info : error_info_list) - { - if (!error_info->missing_fields.empty()) - { - System::println(System::Color::error, - "Error: There are missing fields in the control file of %s", - error_info->name); - System::println("The following fields were missing:\n\n %s\n", - Strings::join("\n ", error_info->missing_fields)); - } - } - } - - static ParseExpected parse_source_paragraph(RawParagraph&& fields) - { - ParagraphParser parser(std::move(fields)); - - auto spgh = std::make_unique(); - - parser.required_field(Fields::SOURCE, spgh->name); - parser.required_field(Fields::VERSION, spgh->version); - - spgh->description = parser.optional_field(Fields::DESCRIPTION); - spgh->maintainer = parser.optional_field(Fields::MAINTAINER); - spgh->depends = expand_qualified_dependencies(parse_comma_list(parser.optional_field(Fields::BUILD_DEPENDS))); - spgh->supports = parse_comma_list(parser.optional_field(Fields::SUPPORTS)); - spgh->default_features = parse_comma_list(parser.optional_field(Fields::DEFAULTFEATURES)); - - auto err = parser.error_info(spgh->name); - if (err) - return std::move(err); - else - return std::move(spgh); - } - - static ParseExpected parse_feature_paragraph(RawParagraph&& fields) - { - ParagraphParser parser(std::move(fields)); - - auto fpgh = std::make_unique(); - - parser.required_field(Fields::FEATURE, fpgh->name); - parser.required_field(Fields::DESCRIPTION, fpgh->description); - - fpgh->depends = expand_qualified_dependencies(parse_comma_list(parser.optional_field(Fields::BUILD_DEPENDS))); - - auto err = parser.error_info(fpgh->name); - if (err) - return std::move(err); - else - return std::move(fpgh); - } - - ParseExpected SourceControlFile::parse_control_file( - std::vector>&& control_paragraphs) - { - if (control_paragraphs.size() == 0) - { - return std::make_unique(); - } - - auto control_file = std::make_unique(); - - auto maybe_source = parse_source_paragraph(std::move(control_paragraphs.front())); - if (const auto source = maybe_source.get()) - control_file->core_paragraph = std::move(*source); - else - return std::move(maybe_source).error(); - - control_paragraphs.erase(control_paragraphs.begin()); - - for (auto&& feature_pgh : control_paragraphs) - { - auto maybe_feature = parse_feature_paragraph(std::move(feature_pgh)); - if (const auto feature = maybe_feature.get()) - control_file->feature_paragraphs.emplace_back(std::move(*feature)); - else - return std::move(maybe_feature).error(); - } - - return std::move(control_file); - } - - Dependency Dependency::parse_dependency(std::string name, std::string qualifier) - { - Dependency dep; - dep.qualifier = qualifier; - if (auto maybe_features = Features::from_string(name)) - dep.depend = *maybe_features.get(); - else - Checks::exit_with_message( - VCPKG_LINE_INFO, "error while parsing dependency: %s: %s", to_string(maybe_features.error()), name); - return dep; - } - - std::string Dependency::name() const - { - if (this->depend.features.empty()) return this->depend.name; - - const std::string features = Strings::join(",", this->depend.features); - return Strings::format("%s[%s]", this->depend.name, features); - } - - std::vector vcpkg::expand_qualified_dependencies(const std::vector& depends) - { - return Util::fmap(depends, [&](const std::string& depend_string) -> Dependency { - auto pos = depend_string.find(' '); - if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, Strings::EMPTY); - // expect of the form "\w+ \[\w+\]" - Dependency dep; - - dep.depend.name = depend_string.substr(0, pos); - if (depend_string.c_str()[pos + 1] != '(' || depend_string[depend_string.size() - 1] != ')') - { - // Error, but for now just slurp the entire string. - return Dependency::parse_dependency(depend_string, Strings::EMPTY); - } - dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3); - return dep; - }); - } - - std::vector filter_dependencies(const std::vector& deps, const Triplet& t) - { - std::vector ret; - for (auto&& dep : deps) - { - if (dep.qualifier.empty() || t.canonical_name().find(dep.qualifier) != std::string::npos) - { - ret.emplace_back(dep.name()); - } - } - 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); - } - - std::string to_string(const Dependency& dep) { return dep.name(); } - - ExpectedT> Supports::parse(const std::vector& strs) - { - Supports ret; - std::vector unrecognized; - - for (auto&& str : strs) - { - if (str == "x64") - ret.architectures.push_back(Architecture::X64); - else if (str == "x86") - ret.architectures.push_back(Architecture::X86); - else if (str == "arm") - ret.architectures.push_back(Architecture::ARM); - else if (str == "windows") - ret.platforms.push_back(Platform::WINDOWS); - else if (str == "uwp") - ret.platforms.push_back(Platform::UWP); - else if (str == "v140") - ret.toolsets.push_back(ToolsetVersion::V140); - else if (str == "v141") - ret.toolsets.push_back(ToolsetVersion::V141); - else if (str == "crt-static") - ret.crt_linkages.push_back(Linkage::STATIC); - else if (str == "crt-dynamic") - ret.crt_linkages.push_back(Linkage::DYNAMIC); - else - unrecognized.push_back(str); - } - - if (unrecognized.empty()) - return std::move(ret); - else - return std::move(unrecognized); - } - - bool Supports::is_supported(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools) - { - const auto is_in_or_empty = [](auto v, auto&& c) -> bool { return c.empty() || c.end() != Util::find(c, v); }; - if (!is_in_or_empty(arch, architectures)) return false; - if (!is_in_or_empty(plat, platforms)) return false; - if (!is_in_or_empty(crt, crt_linkages)) return false; - if (!is_in_or_empty(tools, toolsets)) return false; - return true; - } -} diff --git a/toolsrc/src/StatusParagraph.cpp b/toolsrc/src/StatusParagraph.cpp deleted file mode 100644 index f8ae293c2..000000000 --- a/toolsrc/src/StatusParagraph.cpp +++ /dev/null @@ -1,86 +0,0 @@ -#include "pch.h" - -#include "StatusParagraph.h" - -using namespace vcpkg::Parse; - -namespace vcpkg -{ - namespace BinaryParagraphRequiredField - { - static const std::string STATUS = "Status"; - } - - StatusParagraph::StatusParagraph() : want(Want::ERROR_STATE), state(InstallState::ERROR_STATE) {} - - void serialize(const StatusParagraph& pgh, std::string& out_str) - { - serialize(pgh.package, out_str); - out_str.append("Status: ") - .append(to_string(pgh.want)) - .append(" ok ") - .append(to_string(pgh.state)) - .push_back('\n'); - } - - StatusParagraph::StatusParagraph(std::unordered_map&& fields) - { - auto status_it = fields.find(BinaryParagraphRequiredField::STATUS); - Checks::check_exit(VCPKG_LINE_INFO, status_it != fields.end(), "Expected 'Status' field in status paragraph"); - std::string status_field = std::move(status_it->second); - fields.erase(status_it); - - this->package = BinaryParagraph(std::move(fields)); - - auto b = status_field.begin(); - const auto mark = b; - const auto e = status_field.end(); - - // Todo: improve error handling - while (b != e && *b != ' ') - ++b; - - want = [](const std::string& text) { - if (text == "unknown") return Want::UNKNOWN; - if (text == "install") return Want::INSTALL; - if (text == "hold") return Want::HOLD; - if (text == "deinstall") return Want::DEINSTALL; - if (text == "purge") return Want::PURGE; - return Want::ERROR_STATE; - }(std::string(mark, b)); - - if (std::distance(b, e) < 4) return; - b += 4; - - state = [](const std::string& text) { - if (text == "not-installed") return InstallState::NOT_INSTALLED; - if (text == "installed") return InstallState::INSTALLED; - if (text == "half-installed") return InstallState::HALF_INSTALLED; - return InstallState::ERROR_STATE; - }(std::string(b, e)); - } - - std::string to_string(InstallState f) - { - switch (f) - { - case InstallState::HALF_INSTALLED: return "half-installed"; - case InstallState::INSTALLED: return "installed"; - case InstallState::NOT_INSTALLED: return "not-installed"; - default: return "error"; - } - } - - std::string to_string(Want f) - { - switch (f) - { - case Want::DEINSTALL: return "deinstall"; - case Want::HOLD: return "hold"; - case Want::INSTALL: return "install"; - case Want::PURGE: return "purge"; - case Want::UNKNOWN: return "unknown"; - default: return "error"; - } - } -} diff --git a/toolsrc/src/StatusParagraphs.cpp b/toolsrc/src/StatusParagraphs.cpp deleted file mode 100644 index aaba95eb9..000000000 --- a/toolsrc/src/StatusParagraphs.cpp +++ /dev/null @@ -1,90 +0,0 @@ -#include "pch.h" - -#include "StatusParagraphs.h" -#include "vcpkg_Checks.h" -#include - -namespace vcpkg -{ - StatusParagraphs::StatusParagraphs() = default; - - StatusParagraphs::StatusParagraphs(std::vector>&& ps) - : paragraphs(std::move(ps)){}; - - StatusParagraphs::const_iterator StatusParagraphs::find(const std::string& name, const Triplet& triplet) const - { - return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { - const PackageSpec& spec = pgh->package.spec; - return spec.name() == name && spec.triplet() == triplet; - }); - } - - StatusParagraphs::iterator StatusParagraphs::find(const std::string& name, const Triplet& triplet) - { - return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { - const PackageSpec& spec = pgh->package.spec; - return spec.name() == name && spec.triplet() == triplet; - }); - } - - std::vector*> StatusParagraphs::find_all(const std::string& name, - const Triplet& triplet) - { - std::vector*> spghs; - for (auto&& p : *this) - { - if (p->package.spec.name() == name && p->package.spec.triplet() == triplet) - { - spghs.emplace_back(&p); - } - } - return spghs; - } - - StatusParagraphs::iterator StatusParagraphs::find(const std::string& name, - const Triplet& triplet, - const std::string& feature) - { - return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { - const PackageSpec& spec = pgh->package.spec; - return spec.name() == name && spec.triplet() == triplet && pgh->package.feature == feature; - }); - } - - StatusParagraphs::const_iterator StatusParagraphs::find_installed(const std::string& name, - const Triplet& triplet) const - { - const const_iterator it = find(name, triplet); - if (it != end() && (*it)->want == Want::INSTALL && (*it)->state == InstallState::INSTALLED) - { - return it; - } - - return end(); - } - - StatusParagraphs::iterator StatusParagraphs::insert(std::unique_ptr pgh) - { - Checks::check_exit(VCPKG_LINE_INFO, pgh != nullptr, "Inserted null paragraph"); - const PackageSpec& spec = pgh->package.spec; - const auto ptr = find(spec.name(), spec.triplet(), pgh->package.feature); - if (ptr == end()) - { - paragraphs.push_back(std::move(pgh)); - return paragraphs.rbegin(); - } - - // consume data from provided pgh. - **ptr = std::move(*pgh); - return ptr; - } - - void serialize(const StatusParagraphs& pghs, std::string& out_str) - { - for (auto& pgh : pghs.paragraphs) - { - serialize(*pgh, out_str); - out_str.push_back('\n'); - } - } -} diff --git a/toolsrc/src/VcpkgCmdArguments.cpp b/toolsrc/src/VcpkgCmdArguments.cpp deleted file mode 100644 index cb261930e..000000000 --- a/toolsrc/src/VcpkgCmdArguments.cpp +++ /dev/null @@ -1,283 +0,0 @@ -#include "pch.h" - -#include "VcpkgCmdArguments.h" -#include "metrics.h" -#include "vcpkg_Commands.h" -#include "vcpkg_GlobalState.h" -#include "vcpkg_System.h" - -namespace vcpkg -{ - static void parse_value(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::println(System::Color::error, "Error: expected value after %s", option_name); - Metrics::g_metrics.lock()->track_property("error", "error option name"); - Commands::Help::print_usage(); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - if (option_field != nullptr) - { - System::println(System::Color::error, "Error: %s specified multiple times", option_name); - Metrics::g_metrics.lock()->track_property("error", "error option specified multiple times"); - Commands::Help::print_usage(); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - option_field = std::make_unique(*arg_begin); - } - - static void parse_switch(bool new_setting, const std::string& option_name, Optional& option_field) - { - if (option_field && option_field != new_setting) - { - System::println(System::Color::error, "Error: conflicting values specified for --%s", option_name); - Metrics::g_metrics.lock()->track_property("error", "error conflicting switches"); - Commands::Help::print_usage(); - Checks::exit_fail(VCPKG_LINE_INFO); - } - option_field = new_setting; - } - - VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, const wchar_t* const* const argv) - { - std::vector v; - for (int i = 1; i < argc; ++i) - { - v.push_back(Strings::to_utf8(argv[i])); - } - - return VcpkgCmdArguments::create_from_arg_sequence(v.data(), v.data() + v.size()); - } - - VcpkgCmdArguments VcpkgCmdArguments::create_from_arg_sequence(const std::string* arg_begin, - const std::string* arg_end) - { - VcpkgCmdArguments args; - - for (; arg_begin != arg_end; ++arg_begin) - { - std::string arg = *arg_begin; - - if (arg.empty()) - { - continue; - } - - if (arg[0] == '-' && arg[1] != '-') - { - Metrics::g_metrics.lock()->track_property("error", "error short options are not supported"); - Checks::exit_with_message(VCPKG_LINE_INFO, "Error: short options are not supported: %s", arg); - } - - if (arg[0] == '-' && arg[1] == '-') - { - // make argument case insensitive - auto& f = std::use_facet>(std::locale()); - f.tolower(&arg[0], &arg[0] + arg.size()); - // command switch - if (arg == "--vcpkg-root") - { - ++arg_begin; - parse_value(arg_begin, arg_end, "--vcpkg-root", args.vcpkg_root_dir); - continue; - } - if (arg == "--triplet") - { - ++arg_begin; - parse_value(arg_begin, arg_end, "--triplet", args.triplet); - continue; - } - if (arg == "--debug") - { - parse_switch(true, "debug", args.debug); - continue; - } - if (arg == "--sendmetrics") - { - parse_switch(true, "sendmetrics", args.sendmetrics); - continue; - } - if (arg == "--printmetrics") - { - parse_switch(true, "printmetrics", args.printmetrics); - continue; - } - if (arg == "--no-sendmetrics") - { - parse_switch(false, "sendmetrics", args.sendmetrics); - continue; - } - if (arg == "--no-printmetrics") - { - parse_switch(false, "printmetrics", args.printmetrics); - continue; - } - if (arg == "--featurepackages") - { - GlobalState::feature_packages = true; - continue; - } - - 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)); - } - else - { - args.optional_command_arguments.emplace(arg, nullopt); - } - continue; - } - - if (args.command.empty()) - { - args.command = arg; - } - else - { - args.command_arguments.push_back(arg); - } - } - - return args; - } - - ParsedArguments VcpkgCmdArguments::check_and_get_optional_command_arguments( - const std::vector& valid_switches, const std::vector& valid_settings) const - { - bool failed = false; - ParsedArguments output; - - auto options_copy = this->optional_command_arguments; - for (const std::string& option : valid_switches) - { - const auto it = options_copy.find(option); - if (it != options_copy.end()) - { - if (it->second.has_value()) - { - // Having a string value indicates it was passed like '--a=xyz' - System::println(System::Color::error, "The option '%s' does not accept an argument.", option); - failed = true; - } - else - { - output.switches.insert(option); - options_copy.erase(it); - } - } - } - - for (const std::string& option : valid_settings) - { - const auto it = options_copy.find(option); - if (it != options_copy.end()) - { - if (!it->second.has_value()) - { - // Not having a string value indicates it was passed like '--a' - System::println(System::Color::error, "The option '%s' must be passed an argument.", option); - failed = true; - } - else - { - output.settings.emplace(option, it->second.value_or_exit(VCPKG_LINE_INFO)); - options_copy.erase(it); - } - } - } - - if (!options_copy.empty()) - { - System::println(System::Color::error, "Unknown option(s) for command '%s':", this->command); - for (auto&& option : options_copy) - { - System::println(" %s", option.first); - } - System::println("\nValid options are:", this->command); - for (auto&& option : valid_switches) - { - System::println(" %s", option); - } - for (auto&& option : valid_settings) - { - System::println(" %s=...", option); - } - System::println(" --triplet "); - System::println(" --vcpkg-root "); - - Checks::exit_fail(VCPKG_LINE_INFO); - } - if (failed) Checks::exit_fail(VCPKG_LINE_INFO); - - return output; - } - - void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count) const - { - return check_max_arg_count(expected_arg_count, Strings::EMPTY); - } - - void VcpkgCmdArguments::check_min_arg_count(const size_t expected_arg_count) const - { - return check_min_arg_count(expected_arg_count, Strings::EMPTY); - } - - void VcpkgCmdArguments::check_exact_arg_count(const size_t expected_arg_count) const - { - return check_exact_arg_count(expected_arg_count, Strings::EMPTY); - } - - void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const - { - const size_t actual_arg_count = command_arguments.size(); - if (actual_arg_count > expected_arg_count) - { - System::println(System::Color::error, - "Error: `%s` requires at most %u arguments, but %u were provided", - this->command, - expected_arg_count, - actual_arg_count); - System::print(example_text); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - - void VcpkgCmdArguments::check_min_arg_count(const size_t expected_arg_count, const std::string& example_text) const - { - const size_t actual_arg_count = command_arguments.size(); - if (actual_arg_count < expected_arg_count) - { - System::println(System::Color::error, - "Error: `%s` requires at least %u arguments, but %u were provided", - this->command, - expected_arg_count, - actual_arg_count); - System::print(example_text); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - - void VcpkgCmdArguments::check_exact_arg_count(const size_t expected_arg_count, - const std::string& example_text) const - { - const size_t actual_arg_count = command_arguments.size(); - if (actual_arg_count != expected_arg_count) - { - System::println(System::Color::error, - "Error: `%s` requires %u arguments, but %u were provided", - this->command, - expected_arg_count, - actual_arg_count); - System::print(example_text); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } -} diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp deleted file mode 100644 index d14002e47..000000000 --- a/toolsrc/src/VcpkgPaths.cpp +++ /dev/null @@ -1,519 +0,0 @@ -#include "pch.h" - -#include "PackageSpec.h" -#include "VcpkgPaths.h" -#include "metrics.h" -#include "vcpkg_Files.h" -#include "vcpkg_System.h" -#include "vcpkg_Util.h" -#include "vcpkg_expected.h" - -namespace vcpkg -{ - static constexpr CWStringView V_120 = L"v120"; - static constexpr CWStringView V_140 = L"v140"; - static constexpr CWStringView V_141 = L"v141"; - - static bool exists_and_has_equal_or_greater_version(const std::wstring& version_cmd, - const std::array& expected_version) - { - static const std::regex RE(R"###((\d+)\.(\d+)\.(\d+))###"); - - const auto rc = System::cmd_execute_and_capture_output(Strings::wformat(LR"(%s)", version_cmd)); - if (rc.exit_code != 0) - { - return false; - } - - std::match_results match; - const auto found = std::regex_search(rc.output, match, RE); - if (!found) - { - return false; - } - - const int d1 = atoi(match[1].str().c_str()); - const int d2 = atoi(match[2].str().c_str()); - const int d3 = atoi(match[3].str().c_str()); - if (d1 > expected_version[0] || (d1 == expected_version[0] && d2 > expected_version[1]) || - (d1 == expected_version[0] && d2 == expected_version[1] && d3 >= expected_version[2])) - { - // satisfactory version found - return true; - } - - return false; - } - - static Optional find_if_has_equal_or_greater_version(const std::vector& candidate_paths, - const std::wstring& version_check_arguments, - const std::array& expected_version) - { - auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { - const std::wstring cmd = Strings::wformat(LR"("%s" %s)", p.native(), version_check_arguments); - return exists_and_has_equal_or_greater_version(cmd, expected_version); - }); - - if (it != candidate_paths.cend()) - { - return std::move(*it); - } - - return nullopt; - } - - static fs::path fetch_dependency(const fs::path& scripts_folder, - const std::wstring& tool_name, - const fs::path& expected_downloaded_path, - const std::array& version) - { - const std::string tool_name_utf8 = Strings::to_utf8(tool_name); - const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); - System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", - tool_name_utf8, - version_as_string, - tool_name_utf8, - version_as_string); - const fs::path script = scripts_folder / "fetchDependency.ps1"; - const auto install_cmd = - System::create_powershell_script_cmd(script, Strings::wformat(L"-Dependency %s", tool_name)); - const System::ExitCodeAndOutput rc = System::cmd_execute_and_capture_output(install_cmd); - if (rc.exit_code) - { - System::println(System::Color::error, - "Launching powershell failed or was denied when trying to fetch %s version %s.\n" - "(No sufficient installed version was found)", - tool_name_utf8, - version_as_string); - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_property("error", "powershell install failed"); - locked_metrics->track_property("dependency", tool_name); - } - Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); - } - - const fs::path actual_downloaded_path = Strings::trimmed(rc.output); - std::error_code ec; - const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - eq && !ec, - "Expected dependency downloaded path to be %s, but was %s", - expected_downloaded_path.u8string(), - actual_downloaded_path.u8string()); - return actual_downloaded_path; - } - - static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) - { - static constexpr std::array EXPECTED_VERSION = {3, 9, 3}; - static const std::wstring VERSION_CHECK_ARGUMENTS = L"--version"; - - const fs::path downloaded_copy = downloads_folder / "cmake-3.9.3-win32-x86" / "bin" / "cmake.exe"; - const std::vector from_path = Files::find_from_PATH(L"cmake"); - - std::vector candidate_paths; - candidate_paths.push_back(downloaded_copy); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - candidate_paths.push_back(System::get_program_files_platform_bitness() / "CMake" / "bin" / "cmake.exe"); - candidate_paths.push_back(System::get_program_files_32_bit() / "CMake" / "bin"); - - const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_dependency(scripts_folder, L"cmake", downloaded_copy, EXPECTED_VERSION); - } - - fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder) - { - static constexpr std::array EXPECTED_VERSION = {4, 3, 0}; - static const std::wstring VERSION_CHECK_ARGUMENTS = Strings::WEMPTY; - - const fs::path downloaded_copy = downloads_folder / "nuget-4.3.0" / "nuget.exe"; - const std::vector from_path = Files::find_from_PATH(L"nuget"); - - std::vector candidate_paths; - candidate_paths.push_back(downloaded_copy); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - - auto path = find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_dependency(scripts_folder, L"nuget", downloaded_copy, EXPECTED_VERSION); - } - - fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) - { - static constexpr std::array EXPECTED_VERSION = {2, 14, 1}; - static const std::wstring VERSION_CHECK_ARGUMENTS = L"--version"; - - const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.1-32-bit" / "cmd" / "git.exe"; - const std::vector from_path = Files::find_from_PATH(L"git"); - - std::vector candidate_paths; - candidate_paths.push_back(downloaded_copy); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - candidate_paths.push_back(System::get_program_files_platform_bitness() / "git" / "cmd" / "git.exe"); - candidate_paths.push_back(System::get_program_files_32_bit() / "git" / "cmd" / "git.exe"); - - const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_dependency(scripts_folder, L"git", downloaded_copy, EXPECTED_VERSION); - } - - static fs::path get_ifw_installerbase_path(const fs::path& downloads_folder, const fs::path& scripts_folder) - { - static constexpr std::array EXPECTED_VERSION = {3, 1, 81}; - static const std::wstring VERSION_CHECK_ARGUMENTS = L"--framework-version"; - - const fs::path downloaded_copy = - downloads_folder / "QtInstallerFramework-win-x86" / "bin" / "installerbase.exe"; - - std::vector candidate_paths; - candidate_paths.push_back(downloaded_copy); - // TODO: Uncomment later - // const std::vector from_path = Files::find_from_PATH(L"installerbase"); - // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - // candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / - // "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe"); - // candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / - // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); - - const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_dependency(scripts_folder, L"installerbase", downloaded_copy, EXPECTED_VERSION); - } - - Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir) - { - std::error_code ec; - const fs::path canonical_vcpkg_root_dir = fs::stdfs::canonical(vcpkg_root_dir, ec); - if (ec) - { - return ec; - } - - VcpkgPaths paths; - paths.root = canonical_vcpkg_root_dir; - - if (paths.root.empty()) - { - Metrics::g_metrics.lock()->track_property("error", "Invalid vcpkg root directory"); - Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid vcpkg root directory: %s", paths.root.string()); - } - - paths.packages = paths.root / "packages"; - paths.buildtrees = paths.root / "buildtrees"; - paths.downloads = paths.root / "downloads"; - paths.ports = paths.root / "ports"; - paths.installed = paths.root / "installed"; - paths.triplets = paths.root / "triplets"; - paths.scripts = paths.root / "scripts"; - - paths.buildsystems = paths.scripts / "buildsystems"; - paths.buildsystems_msbuild_targets = paths.buildsystems / "msbuild" / "vcpkg.targets"; - - paths.vcpkg_dir = paths.installed / "vcpkg"; - paths.vcpkg_dir_status_file = paths.vcpkg_dir / "status"; - paths.vcpkg_dir_info = paths.vcpkg_dir / "info"; - paths.vcpkg_dir_updates = paths.vcpkg_dir / "updates"; - - paths.ports_cmake = paths.scripts / "ports.cmake"; - - return paths; - } - - 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"; - } - - fs::path VcpkgPaths::listfile_path(const BinaryParagraph& pgh) const - { - return this->vcpkg_dir_info / (pgh.fullstem() + ".list"); - } - - bool VcpkgPaths::is_valid_triplet(const Triplet& t) const - { - for (auto&& path : get_filesystem().get_files_non_recursive(this->triplets)) - { - const std::string triplet_file_name = path.stem().generic_u8string(); - if (t.canonical_name() == triplet_file_name) // TODO: fuzzy compare - { - // t.value = triplet_file_name; // NOTE: uncomment when implementing fuzzy compare - return true; - } - } - return false; - } - - const fs::path& VcpkgPaths::get_cmake_exe() const - { - return this->cmake_exe.get_lazy([this]() { return get_cmake_path(this->downloads, this->scripts); }); - } - - const fs::path& VcpkgPaths::get_git_exe() const - { - return this->git_exe.get_lazy([this]() { return get_git_path(this->downloads, this->scripts); }); - } - - const fs::path& VcpkgPaths::get_nuget_exe() const - { - return this->nuget_exe.get_lazy([this]() { return get_nuget_path(this->downloads, this->scripts); }); - } - - const fs::path& VcpkgPaths::get_ifw_installerbase_exe() const - { - return this->ifw_installerbase_exe.get_lazy( - [this]() { return get_ifw_installerbase_path(this->downloads, this->scripts); }); - } - - const fs::path& VcpkgPaths::get_ifw_binarycreator_exe() const - { - return this->ifw_binarycreator_exe.get_lazy( - [this]() { return get_ifw_installerbase_exe().parent_path() / "binarycreator.exe"; }); - } - - const fs::path& VcpkgPaths::get_ifw_repogen_exe() const - { - return this->ifw_repogen_exe.get_lazy( - [this]() { return get_ifw_installerbase_exe().parent_path() / "repogen.exe"; }); - } - - struct VisualStudioInstance - { - fs::path root_path; - std::string version; - std::string release_type; - std::string preference_weight; // Mostly unused, just for verification that order is as intended - - std::string major_version() const { return version.substr(0, 2); } - }; - - static std::vector get_visual_studio_instances(const VcpkgPaths& paths) - { - const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; - const std::wstring cmd = System::create_powershell_script_cmd(script); - const System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd); - Checks::check_exit( - VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances"); - - const std::vector instances_as_strings = Strings::split(ec_data.output, "\n"); - std::vector output; - for (const std::string& instance_as_string : instances_as_strings) - { - const std::vector split = Strings::split(instance_as_string, "::"); - output.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); - } - - return output; - } - - static std::vector find_toolset_instances(const VcpkgPaths& paths) - { - using CPU = System::CPUArchitecture; - - const auto& fs = paths.get_filesystem(); - - // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations. - std::vector paths_examined; - - std::vector found_toolsets; - - const std::vector vs_instances = get_visual_studio_instances(paths); - const bool v140_is_available = Util::find_if(vs_instances, [&](const VisualStudioInstance& vs_instance) { - return vs_instance.major_version() == "14"; - }) != vs_instances.cend(); - - for (const VisualStudioInstance& vs_instance : vs_instances) - { - const std::string major_version = vs_instance.major_version(); - if (major_version == "15") - { - const fs::path vc_dir = vs_instance.root_path / "VC"; - - // Skip any instances that do not have vcvarsall. - const fs::path vcvarsall_dir = vc_dir / "Auxiliary" / "Build"; - const fs::path vcvarsall_bat = vcvarsall_dir / "vcvarsall.bat"; - paths_examined.push_back(vcvarsall_bat); - if (!fs.exists(vcvarsall_bat)) continue; - - // Get all supported architectures - std::vector supported_architectures; - if (fs.exists(vcvarsall_dir / "vcvars32.bat")) - supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); - if (fs.exists(vcvarsall_dir / "vcvars64.bat")) - supported_architectures.push_back({L"amd64", CPU::X64, CPU::X64}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) - supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) - supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) - supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) - supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); - - // Locate the "best" MSVC toolchain version - const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; - std::vector msvc_subdirectories = fs.get_files_non_recursive(msvc_path); - Util::unstable_keep_if(msvc_subdirectories, - [&fs](const fs::path& path) { return fs.is_directory(path); }); - - // Sort them so that latest comes first - std::sort( - msvc_subdirectories.begin(), - msvc_subdirectories.end(), - [](const fs::path& left, const fs::path& right) { return left.filename() > right.filename(); }); - - for (const fs::path& subdir : msvc_subdirectories) - { - const fs::path dumpbin_path = subdir / "bin" / "HostX86" / "x86" / "dumpbin.exe"; - paths_examined.push_back(dumpbin_path); - if (fs.exists(dumpbin_path)) - { - found_toolsets.push_back(Toolset{ - vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}); - - if (v140_is_available) - { - found_toolsets.push_back(Toolset{vs_instance.root_path, - dumpbin_path, - vcvarsall_bat, - {L"-vcvars_ver=14.0"}, - V_140, - supported_architectures}); - } - - break; - } - } - - continue; - } - - if (major_version == "14") - { - const fs::path vcvarsall_bat = vs_instance.root_path / "VC" / "vcvarsall.bat"; - - paths_examined.push_back(vcvarsall_bat); - if (fs.exists(vcvarsall_bat)) - { - const fs::path vs2015_dumpbin_exe = vs_instance.root_path / "VC" / "bin" / "dumpbin.exe"; - paths_examined.push_back(vs2015_dumpbin_exe); - - const fs::path vs2015_bin_dir = vcvarsall_bat.parent_path() / "bin"; - std::vector supported_architectures; - if (fs.exists(vs2015_bin_dir / "vcvars32.bat")) - supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); - if (fs.exists(vs2015_bin_dir / "amd64\\vcvars64.bat")) - supported_architectures.push_back({L"x64", CPU::X64, CPU::X64}); - if (fs.exists(vs2015_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) - supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); - if (fs.exists(vs2015_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) - supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); - if (fs.exists(vs2015_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) - supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); - if (fs.exists(vs2015_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) - supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); - - if (fs.exists(vs2015_dumpbin_exe)) - { - found_toolsets.push_back({vs_instance.root_path, - vs2015_dumpbin_exe, - vcvarsall_bat, - {}, - V_140, - supported_architectures}); - } - } - } - } - - if (found_toolsets.empty()) - { - System::println(System::Color::error, "Could not locate a complete toolset."); - System::println("The following paths were examined:"); - for (const fs::path& path : paths_examined) - { - System::println(" %s", path.u8string()); - } - Checks::exit_fail(VCPKG_LINE_INFO); - } - - return found_toolsets; - } - - const Toolset& VcpkgPaths::get_toolset(const Optional& toolset_version, - const Optional& visual_studio_path) const - { - // Invariant: toolsets are non-empty and sorted with newest at back() - const std::vector& vs_toolsets = - this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); }); - - std::vector candidates = Util::element_pointers(vs_toolsets); - const auto tsv = toolset_version.get(); - const auto vsp = visual_studio_path.get(); - - if (tsv && vsp) - { - const std::wstring w_toolset_version = Strings::to_utf16(*tsv); - const fs::path vs_root_path = *vsp; - Util::stable_keep_if(candidates, [&](const Toolset* t) { - return w_toolset_version == t->version && vs_root_path == t->visual_studio_root_path; - }); - Checks::check_exit(VCPKG_LINE_INFO, - !candidates.empty(), - "Could not find Visual Studio instace at %s with %s toolset.", - vs_root_path.generic_string(), - *tsv); - - Checks::check_exit(VCPKG_LINE_INFO, candidates.size() == 1); - return *candidates.back(); - } - - if (tsv) - { - const std::wstring w_toolset_version = Strings::to_utf16(*tsv); - Util::stable_keep_if(candidates, [&](const Toolset* t) { return w_toolset_version == t->version; }); - Checks::check_exit( - VCPKG_LINE_INFO, !candidates.empty(), "Could not find Visual Studio instace with %s toolset.", *tsv); - } - - if (vsp) - { - const fs::path vs_root_path = *vsp; - Util::stable_keep_if(candidates, - [&](const Toolset* t) { return vs_root_path == t->visual_studio_root_path; }); - Checks::check_exit(VCPKG_LINE_INFO, - !candidates.empty(), - "Could not find Visual Studio instace at %s.", - vs_root_path.generic_string()); - } - - return *candidates.front(); - } - - Files::Filesystem& VcpkgPaths::get_filesystem() const { return Files::get_real_filesystem(); } -} diff --git a/toolsrc/src/VersionT.cpp b/toolsrc/src/VersionT.cpp deleted file mode 100644 index 738d2ce88..000000000 --- a/toolsrc/src/VersionT.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "pch.h" - -#include "VersionT.h" -#include "vcpkg_Strings.h" - -namespace vcpkg -{ - VersionT::VersionT() : value("0.0.0") {} - VersionT::VersionT(const std::string& value) : value(value) {} - std::string VersionT::to_string() const { return value; } - bool operator==(const VersionT& left, const VersionT& right) { return left.value == right.value; } - bool operator!=(const VersionT& left, const VersionT& right) { return left.value != right.value; } - std::string to_printf_arg(const VersionT& version) { return version.value; } - - VersionDiff::VersionDiff() : left(), right() {} - VersionDiff::VersionDiff(const VersionT& left, const VersionT& right) : left(left), right(right) {} - - std::string VersionDiff::to_string() const { return Strings::format("%s -> %s", left.value, right.value); } -} diff --git a/toolsrc/src/coff_file_reader.cpp b/toolsrc/src/coff_file_reader.cpp deleted file mode 100644 index bb3a6cefd..000000000 --- a/toolsrc/src/coff_file_reader.cpp +++ /dev/null @@ -1,308 +0,0 @@ -#include "pch.h" - -#include "coff_file_reader.h" -#include "vcpkg_Checks.h" - -using namespace std; - -namespace vcpkg::CoffFileReader -{ - template - static T reinterpret_bytes(const char* data) - { - return (*reinterpret_cast(&data[0])); - } - - template - static T read_value_from_stream(fstream& fs) - { - T data; - fs.read(reinterpret_cast(&data), sizeof data); - return data; - } - - template - static T peek_value_from_stream(fstream& fs) - { - const fpos_t original_pos = fs.tellg().seekpos(); - T data; - fs.read(reinterpret_cast(&data), sizeof data); - fs.seekg(original_pos); - return data; - } - - static void verify_equal_strings( - const LineInfo& line_info, const char* expected, const char* actual, int size, const char* label) - { - Checks::check_exit(line_info, - memcmp(expected, actual, size) == 0, - "Incorrect string (%s) found. Expected: (%s) but found (%s)", - label, - expected, - actual); - } - - static void read_and_verify_PE_signature(fstream& fs) - { - static const size_t OFFSET_TO_PE_SIGNATURE_OFFSET = 0x3c; - - static const char* PE_SIGNATURE = "PE\0\0"; - static const size_t PE_SIGNATURE_SIZE = 4; - - fs.seekg(OFFSET_TO_PE_SIGNATURE_OFFSET, ios_base::beg); - const int32_t offset_to_PE_signature = read_value_from_stream(fs); - - fs.seekg(offset_to_PE_signature); - char signature[PE_SIGNATURE_SIZE]; - fs.read(signature, PE_SIGNATURE_SIZE); - verify_equal_strings(VCPKG_LINE_INFO, PE_SIGNATURE, signature, PE_SIGNATURE_SIZE, "PE_SIGNATURE"); - fs.seekg(offset_to_PE_signature + PE_SIGNATURE_SIZE, ios_base::beg); - } - - static fpos_t align_to_size(const uint64_t unaligned, const uint64_t alignment_size) - { - fpos_t aligned = unaligned - 1; - aligned /= alignment_size; - aligned += 1; - aligned *= alignment_size; - return aligned; - } - - struct CoffFileHeader - { - static const size_t HEADER_SIZE = 20; - - static CoffFileHeader read(fstream& fs) - { - CoffFileHeader ret; - ret.data.resize(HEADER_SIZE); - fs.read(&ret.data[0], HEADER_SIZE); - return ret; - } - - MachineType machine_type() const - { - static const size_t MACHINE_TYPE_OFFSET = 0; - static const size_t MACHINE_TYPE_SIZE = 2; - - std::string machine_field_as_string = data.substr(MACHINE_TYPE_OFFSET, MACHINE_TYPE_SIZE); - const uint16_t machine = reinterpret_bytes(machine_field_as_string.c_str()); - return to_machine_type(machine); - } - - private: - std::string data; - }; - - struct ArchiveMemberHeader - { - static const size_t HEADER_SIZE = 60; - - static ArchiveMemberHeader read(fstream& fs) - { - static const size_t HEADER_END_OFFSET = 58; - static const char* HEADER_END = "`\n"; - static const size_t HEADER_END_SIZE = 2; - - ArchiveMemberHeader ret; - ret.data.resize(HEADER_SIZE); - fs.read(&ret.data[0], HEADER_SIZE); - - if (ret.data[0] != '\0') // Due to freeglut. github issue #223 - { - const std::string header_end = ret.data.substr(HEADER_END_OFFSET, HEADER_END_SIZE); - verify_equal_strings( - VCPKG_LINE_INFO, HEADER_END, header_end.c_str(), HEADER_END_SIZE, "LIB HEADER_END"); - } - - return ret; - } - - std::string name() const - { - static const size_t HEADER_NAME_OFFSET = 0; - static const size_t HEADER_NAME_SIZE = 16; - return data.substr(HEADER_NAME_OFFSET, HEADER_NAME_SIZE); - } - - uint64_t member_size() const - { - static const size_t ALIGNMENT_SIZE = 2; - - static const size_t HEADER_SIZE_OFFSET = 48; - static const size_t HEADER_SIZE_FIELD_SIZE = 10; - const std::string as_string = data.substr(HEADER_SIZE_OFFSET, HEADER_SIZE_FIELD_SIZE); - // This is in ASCII decimal representation - const uint64_t value = std::strtoull(as_string.c_str(), nullptr, 10); - - const uint64_t aligned = align_to_size(value, ALIGNMENT_SIZE); - return aligned; - } - - std::string data; - }; - - struct OffsetsArray - { - static OffsetsArray read(fstream& fs, const uint32_t offset_count) - { - static const size_t OFFSET_WIDTH = 4; - - std::string raw_offsets; - const size_t raw_offset_size = offset_count * OFFSET_WIDTH; - raw_offsets.resize(raw_offset_size); - fs.read(&raw_offsets[0], raw_offset_size); - - OffsetsArray ret; - for (uint32_t i = 0; i < offset_count; ++i) - { - const std::string value_as_string = raw_offsets.substr(OFFSET_WIDTH * i, OFFSET_WIDTH * (i + 1)); - const uint32_t value = reinterpret_bytes(value_as_string.c_str()); - - // Ignore offsets that point to offset 0. See vcpkg github #223 #288 #292 - if (value != 0) - { - ret.data.push_back(value); - } - } - - // Sort the offsets, because it is possible for them to be unsorted. See vcpkg github #292 - std::sort(ret.data.begin(), ret.data.end()); - return ret; - } - - std::vector data; - }; - - struct ImportHeader - { - static const size_t HEADER_SIZE = 20; - - static ImportHeader read(fstream& fs) - { - static const size_t SIG1_OFFSET = 0; - static const uint16_t SIG1 = static_cast(MachineType::UNKNOWN); - static const size_t SIG1_SIZE = 2; - - static const size_t SIG2_OFFSET = 2; - static const uint16_t SIG2 = 0xFFFF; - static const size_t SIG2_SIZE = 2; - - ImportHeader ret; - ret.data.resize(HEADER_SIZE); - fs.read(&ret.data[0], HEADER_SIZE); - - const std::string sig1_as_string = ret.data.substr(SIG1_OFFSET, SIG1_SIZE); - const uint16_t sig1 = reinterpret_bytes(sig1_as_string.c_str()); - Checks::check_exit(VCPKG_LINE_INFO, sig1 == SIG1, "Sig1 was incorrect. Expected %s but got %s", SIG1, sig1); - - const std::string sig2_as_string = ret.data.substr(SIG2_OFFSET, SIG2_SIZE); - const uint16_t sig2 = reinterpret_bytes(sig2_as_string.c_str()); - Checks::check_exit(VCPKG_LINE_INFO, sig2 == SIG2, "Sig2 was incorrect. Expected %s but got %s", SIG2, sig2); - - return ret; - } - - MachineType machine_type() const - { - static const size_t MACHINE_TYPE_OFFSET = 6; - static const size_t MACHINE_TYPE_SIZE = 2; - - std::string machine_field_as_string = data.substr(MACHINE_TYPE_OFFSET, MACHINE_TYPE_SIZE); - const uint16_t machine = reinterpret_bytes(machine_field_as_string.c_str()); - return to_machine_type(machine); - } - - private: - std::string data; - }; - - static void read_and_verify_archive_file_signature(fstream& fs) - { - static const char* FILE_START = "!\n"; - static const size_t FILE_START_SIZE = 8; - - fs.seekg(fs.beg); - - char file_start[FILE_START_SIZE]; - fs.read(file_start, FILE_START_SIZE); - verify_equal_strings(VCPKG_LINE_INFO, FILE_START, file_start, FILE_START_SIZE, "LIB FILE_START"); - } - - DllInfo read_dll(const fs::path& path) - { - std::fstream fs(path, std::ios::in | std::ios::binary | std::ios::ate); - Checks::check_exit(VCPKG_LINE_INFO, fs.is_open(), "Could not open file %s for reading", path.generic_string()); - - read_and_verify_PE_signature(fs); - CoffFileHeader header = CoffFileHeader::read(fs); - const MachineType machine = header.machine_type(); - return {machine}; - } - - struct Marker - { - void set_to_offset(const fpos_t position) { this->m_absolute_position = position; } - - void set_to_current_pos(fstream& fs) { this->m_absolute_position = fs.tellg().seekpos(); } - - void seek_to_marker(fstream& fs) const { fs.seekg(this->m_absolute_position, ios_base::beg); } - - void advance_by(const uint64_t offset) { this->m_absolute_position += offset; } - - private: - fpos_t m_absolute_position = 0; - }; - - LibInfo read_lib(const fs::path& path) - { - std::fstream fs(path, std::ios::in | std::ios::binary | std::ios::ate); - Checks::check_exit(VCPKG_LINE_INFO, fs.is_open(), "Could not open file %s for reading", path.generic_string()); - - read_and_verify_archive_file_signature(fs); - - Marker marker; - marker.set_to_current_pos(fs); - - // First Linker Member - const ArchiveMemberHeader first_linker_member_header = ArchiveMemberHeader::read(fs); - Checks::check_exit(VCPKG_LINE_INFO, - first_linker_member_header.name().substr(0, 2) == "/ ", - "Could not find proper first linker member"); - marker.advance_by(ArchiveMemberHeader::HEADER_SIZE + first_linker_member_header.member_size()); - marker.seek_to_marker(fs); - - const ArchiveMemberHeader second_linker_member_header = ArchiveMemberHeader::read(fs); - Checks::check_exit(VCPKG_LINE_INFO, - second_linker_member_header.name().substr(0, 2) == "/ ", - "Could not find proper second linker member"); - // The first 4 bytes contains the number of archive members - const uint32_t archive_member_count = read_value_from_stream(fs); - const OffsetsArray offsets = OffsetsArray::read(fs, archive_member_count); - marker.advance_by(ArchiveMemberHeader::HEADER_SIZE + second_linker_member_header.member_size()); - marker.seek_to_marker(fs); - - const bool hasLongnameMemberHeader = peek_value_from_stream(fs) == 0x2F2F; - if (hasLongnameMemberHeader) - { - const ArchiveMemberHeader longnames_member_header = ArchiveMemberHeader::read(fs); - marker.advance_by(ArchiveMemberHeader::HEADER_SIZE + longnames_member_header.member_size()); - marker.seek_to_marker(fs); - } - - std::set machine_types; - // Next we have the obj and pseudo-object files - for (const uint32_t offset : offsets.data) - { - marker.set_to_offset(offset + ArchiveMemberHeader::HEADER_SIZE); // Skip the header, no need to read it. - marker.seek_to_marker(fs); - const uint16_t first_two_bytes = peek_value_from_stream(fs); - const bool isImportHeader = to_machine_type(first_two_bytes) == MachineType::UNKNOWN; - const MachineType machine = - isImportHeader ? ImportHeader::read(fs).machine_type() : CoffFileHeader::read(fs).machine_type(); - machine_types.insert(machine); - } - - return {std::vector(machine_types.cbegin(), machine_types.cend())}; - } -} diff --git a/toolsrc/src/commands_autocomplete.cpp b/toolsrc/src/commands_autocomplete.cpp deleted file mode 100644 index 3963f904b..000000000 --- a/toolsrc/src/commands_autocomplete.cpp +++ /dev/null @@ -1,79 +0,0 @@ -#include "pch.h" - -#include "Paragraphs.h" -#include "SortedVector.h" -#include "vcpkg_Commands.h" -#include "vcpkg_Maps.h" -#include "vcpkg_System.h" -#include "vcpkglib.h" - -namespace vcpkg::Commands::Autocomplete -{ - std::vector autocomplete_install( - const std::vector>& source_paragraphs, const std::string& start_with) - { - std::vector results; - const auto& istartswith = Strings::case_insensitive_ascii_starts_with; - - for (const auto& source_control_file : source_paragraphs) - { - auto&& sp = *source_control_file->core_paragraph; - - if (istartswith(sp.name, start_with)) - { - results.push_back(sp.name); - } - } - return results; - } - - std::vector autocomplete_remove(std::vector installed_packages, - const std::string& start_with) - { - std::vector results; - const auto& istartswith = Strings::case_insensitive_ascii_starts_with; - - for (const auto& installed_package : installed_packages) - { - auto sp = installed_package->package.displayname(); - - if (istartswith(sp, start_with)) - { - results.push_back(sp); - } - } - return results; - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - static const std::string EXAMPLE = - Strings::format("The argument should be a command line to autocomplete.\n%s", - Commands::Help::create_example_string("autocomplete install z")); - - args.check_min_arg_count(1, EXAMPLE); - args.check_max_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}); - - const std::string requested_command = args.command_arguments.at(0); - const std::string start_with = - args.command_arguments.size() > 1 ? args.command_arguments.at(1) : Strings::EMPTY; - std::vector results; - if (requested_command == "install") - { - auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); - auto& source_paragraphs = sources_and_errors.paragraphs; - - results = autocomplete_install(source_paragraphs, start_with); - } - else if (requested_command == "remove") - { - const StatusParagraphs status_db = database_load_check(paths); - std::vector installed_packages = get_installed_ports(status_db); - results = autocomplete_remove(installed_packages, start_with); - } - - System::println(Strings::join(" ", results)); - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_available_commands.cpp b/toolsrc/src/commands_available_commands.cpp deleted file mode 100644 index d3280e6d7..000000000 --- a/toolsrc/src/commands_available_commands.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Commands.h" - -namespace vcpkg::Commands -{ - const std::vector>& get_available_commands_type_a() - { - static std::vector> t = { - {"install", &Install::perform_and_exit}, - {"ci", &CI::perform_and_exit}, - {"remove", &Remove::perform_and_exit}, - {"build", &BuildCommand::perform_and_exit}, - {"env", &Env::perform_and_exit}, - {"build-external", &BuildExternal::perform_and_exit}, - {"export", &Export::perform_and_exit}, - }; - return t; - } - - const std::vector>& get_available_commands_type_b() - { - static std::vector> t = { - {"/?", &Help::perform_and_exit}, - {"help", &Help::perform_and_exit}, - {"search", &Search::perform_and_exit}, - {"list", &List::perform_and_exit}, - {"integrate", &Integrate::perform_and_exit}, - {"owns", &Owns::perform_and_exit}, - {"update", &Update::perform_and_exit}, - {"depend-info", &DependInfo::perform_and_exit}, - {"edit", &Edit::perform_and_exit}, - {"create", &Create::perform_and_exit}, - {"import", &Import::perform_and_exit}, - {"cache", &Cache::perform_and_exit}, - {"portsdiff", &PortsDiff::perform_and_exit}, - {"autocomplete", &Autocomplete::perform_and_exit}}; - return t; - } - - const std::vector>& get_available_commands_type_c() - { - static std::vector> t = { - {"version", &Version::perform_and_exit}, - {"contact", &Contact::perform_and_exit}, - {"hash", &Hash::perform_and_exit}, - }; - return t; - } -} diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp deleted file mode 100644 index a69958058..000000000 --- a/toolsrc/src/commands_build.cpp +++ /dev/null @@ -1,102 +0,0 @@ -#include "pch.h" - -#include "Paragraphs.h" -#include "PostBuildLint.h" -#include "StatusParagraphs.h" -#include "vcpkg_Commands.h" -#include "vcpkg_Dependencies.h" -#include "vcpkg_Enums.h" -#include "vcpkg_Input.h" -#include "vcpkg_System.h" -#include "vcpkglib.h" - -using vcpkg::Build::BuildResult; -using vcpkg::Parse::ParseControlErrorInfo; -using vcpkg::Parse::ParseExpected; - -namespace vcpkg::Commands::BuildCommand -{ - using Dependencies::InstallPlanAction; - using Dependencies::InstallPlanType; - - static const std::string OPTION_CHECKS_ONLY = "--checks-only"; - - void perform_and_exit(const FullPackageSpec& full_spec, - const fs::path& port_dir, - const std::unordered_set& options, - const VcpkgPaths& paths) - { - const PackageSpec& spec = full_spec.package_spec; - if (options.find(OPTION_CHECKS_ONLY) != options.end()) - { - 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); - 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); - } - - for (const std::string& str : full_spec.features) - { - System::println("%s \n", str); - } - const auto& scf = source_control_file.value_or_exit(VCPKG_LINE_INFO); - Checks::check_exit(VCPKG_LINE_INFO, - spec.name() == scf->core_paragraph->name, - "The Name: field inside the CONTROL does not match the port directory: '%s' != '%s'", - 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}; - - const Build::BuildPackageConfig build_config{ - *scf->core_paragraph, spec.triplet(), paths.port_dir(spec), build_package_options}; - - const auto result = Build::build_package(paths, build_config, status_db); - if (result.code == BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES) - { - System::println(System::Color::error, - "The build command requires all dependencies to be already installed."); - System::println("The following dependencies are missing:"); - System::println(); - for (const auto& p : result.unmet_dependencies) - { - System::println(" %s", p); - } - System::println(); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - if (result.code != BuildResult::SUCCEEDED) - { - System::println(System::Color::error, Build::create_error_message(result.code, spec)); - System::println(Build::create_user_troubleshooting_message(spec)); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - Checks::exit_success(VCPKG_LINE_INFO); - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) - { - static const std::string EXAMPLE = Commands::Help::create_example_string("build zlib:x64-windows"); - // Build only takes a single package and all dependencies must already be installed - args.check_exact_arg_count(1, EXAMPLE); - const std::string command_argument = args.command_arguments.at(0); - const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, EXAMPLE); - Input::check_triplet(spec.package_spec.triplet(), paths); - const std::unordered_set options = - args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}); - perform_and_exit(spec, paths.port_dir(spec.package_spec), options, paths); - } -} diff --git a/toolsrc/src/commands_build_external.cpp b/toolsrc/src/commands_build_external.cpp deleted file mode 100644 index 7e85f2250..000000000 --- a/toolsrc/src/commands_build_external.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Commands.h" -#include "vcpkg_Input.h" - -namespace vcpkg::Commands::BuildExternal -{ - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) - { - static const std::string EXAMPLE = - Commands::Help::create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)"); - args.check_exact_arg_count(2, EXAMPLE); - const FullPackageSpec spec = - Input::check_and_get_full_package_spec(args.command_arguments.at(0), default_triplet, EXAMPLE); - Input::check_triplet(spec.package_spec.triplet(), paths); - const std::unordered_set options = args.check_and_get_optional_command_arguments({}); - - const fs::path port_dir = args.command_arguments.at(1); - BuildCommand::perform_and_exit(spec, port_dir, options, paths); - } -} diff --git a/toolsrc/src/commands_cache.cpp b/toolsrc/src/commands_cache.cpp deleted file mode 100644 index 5b65b197f..000000000 --- a/toolsrc/src/commands_cache.cpp +++ /dev/null @@ -1,68 +0,0 @@ -#include "pch.h" - -#include "BinaryParagraph.h" -#include "Paragraphs.h" -#include "vcpkg_Commands.h" -#include "vcpkg_Files.h" -#include "vcpkg_System.h" - -namespace vcpkg::Commands::Cache -{ - static std::vector read_all_binary_paragraphs(const VcpkgPaths& paths) - { - std::vector output; - for (auto&& path : paths.get_filesystem().get_files_non_recursive(paths.packages)) - { - const Expected> pghs = - Paragraphs::get_single_paragraph(paths.get_filesystem(), path / "CONTROL"); - if (const auto p = pghs.get()) - { - const BinaryParagraph binary_paragraph = BinaryParagraph(*p); - output.push_back(binary_paragraph); - } - } - - return output; - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - static const std::string EXAMPLE = Strings::format( - "The argument should be a substring to search for, or no argument to display all cached libraries.\n%s", - Commands::Help::create_example_string("cache png")); - args.check_max_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}); - - const std::vector binary_paragraphs = read_all_binary_paragraphs(paths); - if (binary_paragraphs.empty()) - { - System::println("No packages are cached."); - Checks::exit_success(VCPKG_LINE_INFO); - } - - if (args.command_arguments.size() == 0) - { - for (const BinaryParagraph& binary_paragraph : binary_paragraphs) - { - const std::string displayname = binary_paragraph.displayname(); - System::println(displayname); - } - } - else - { - // At this point there is 1 argument - for (const BinaryParagraph& binary_paragraph : binary_paragraphs) - { - const std::string displayname = binary_paragraph.displayname(); - if (Strings::case_insensitive_ascii_find(displayname, args.command_arguments[0]) == displayname.end()) - { - continue; - } - - System::println(displayname); - } - } - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_ci.cpp b/toolsrc/src/commands_ci.cpp deleted file mode 100644 index 75ff65556..000000000 --- a/toolsrc/src/commands_ci.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "pch.h" - -#include "Paragraphs.h" -#include "vcpkg_Build.h" -#include "vcpkg_Chrono.h" -#include "vcpkg_Commands.h" -#include "vcpkg_Dependencies.h" -#include "vcpkg_Files.h" -#include "vcpkg_Input.h" -#include "vcpkg_System.h" -#include "vcpkg_Util.h" -#include "vcpkglib.h" - -namespace vcpkg::Commands::CI -{ - using Build::BuildResult; - using Dependencies::InstallPlanAction; - using Dependencies::InstallPlanType; - - static std::vector load_all_package_specs(Files::Filesystem& fs, - const fs::path& ports_directory, - const Triplet& triplet) - { - auto ports = Paragraphs::load_all_ports(fs, ports_directory); - return Util::fmap(ports, [&](auto&& control_file) -> PackageSpec { - return PackageSpec::from_name_and_triplet(control_file->core_paragraph->name, triplet) - .value_or_exit(VCPKG_LINE_INFO); - }); - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) - { - static const std::string EXAMPLE = Commands::Help::create_example_string("ci x64-windows"); - args.check_max_arg_count(1, EXAMPLE); - const Triplet triplet = args.command_arguments.size() == 1 - ? Triplet::from_canonical_name(args.command_arguments.at(0)) - : default_triplet; - Input::check_triplet(triplet, paths); - args.check_and_get_optional_command_arguments({}); - const std::vector specs = load_all_package_specs(paths.get_filesystem(), paths.ports, triplet); - - StatusParagraphs status_db = database_load_check(paths); - const auto& paths_port_file = Dependencies::PathsPortFile(paths); - std::vector install_plan = - Dependencies::create_install_plan(paths_port_file, specs, status_db); - Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); - - const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; - - const std::vector action_plan = - Util::fmap(install_plan, [](InstallPlanAction& install_action) { - return Dependencies::AnyAction(std::move(install_action)); - }); - - Install::perform_and_exit( - action_plan, install_plan_options, Install::KeepGoing::YES, Install::PrintSummary::YES, paths, status_db); - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_contact.cpp b/toolsrc/src/commands_contact.cpp deleted file mode 100644 index 8374350ee..000000000 --- a/toolsrc/src/commands_contact.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Commands.h" -#include "vcpkg_System.h" - -namespace vcpkg::Commands::Contact -{ - const std::string& email() - { - static const std::string S_EMAIL = R"(vcpkg@microsoft.com)"; - return S_EMAIL; - } - - void perform_and_exit(const VcpkgCmdArguments& args) - { - args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}); - - System::println("Send an email to %s with any feedback.", email()); - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_create.cpp b/toolsrc/src/commands_create.cpp deleted file mode 100644 index 6898f7399..000000000 --- a/toolsrc/src/commands_create.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Commands.h" -#include "vcpkg_Files.h" -#include "vcpkg_System.h" -#include "vcpkglib.h" - -namespace vcpkg::Commands::Create -{ - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - static const std::string EXAMPLE = Commands::Help::create_example_string( - R"###(create zlib2 http://zlib.net/zlib1211.zip "zlib1211-2.zip")###"); - args.check_max_arg_count(3, EXAMPLE); - args.check_min_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}); - const std::string port_name = args.command_arguments.at(0); - const std::string url = args.command_arguments.at(1); - - const fs::path& cmake_exe = paths.get_cmake_exe(); - - std::vector cmake_args{{L"CMD", L"CREATE"}, {L"PORT", port_name}, {L"URL", url}}; - - if (args.command_arguments.size() >= 3) - { - const std::string& zip_file_name = args.command_arguments.at(2); - Checks::check_exit(VCPKG_LINE_INFO, - !Files::has_invalid_chars_for_filesystem(zip_file_name), - R"(Filename cannot contain invalid chars %s, but was %s)", - Files::FILESYSTEM_INVALID_CHARACTERS, - zip_file_name); - cmake_args.push_back({L"FILENAME", zip_file_name}); - } - - const std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args); - Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute_clean(cmd_launch_cmake)); - } -} diff --git a/toolsrc/src/commands_depends.cpp b/toolsrc/src/commands_depends.cpp deleted file mode 100644 index 17cd9c881..000000000 --- a/toolsrc/src/commands_depends.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include "pch.h" - -#include "Paragraphs.h" -#include "vcpkg_Commands.h" -#include "vcpkg_Strings.h" -#include "vcpkg_System.h" -#include "vcpkg_Util.h" - -namespace vcpkg::Commands::DependInfo -{ - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - static const std::string EXAMPLE = Commands::Help::create_example_string(R"###(depend-info [pat])###"); - args.check_max_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}); - - std::vector> source_control_files = - Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - - if (args.command_arguments.size() == 1) - { - const std::string filter = args.command_arguments.at(0); - - Util::erase_remove_if(source_control_files, - [&](const std::unique_ptr& source_control_file) { - - const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; - - if (Strings::case_insensitive_ascii_contains(source_paragraph.name, filter)) - { - return false; - } - - for (const Dependency& dependency : source_paragraph.depends) - { - if (Strings::case_insensitive_ascii_contains(dependency.name(), filter)) - { - return false; - } - } - - return true; - }); - } - - for (auto&& source_control_file : source_control_files) - { - const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; - const auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name(); }); - System::println("%s: %s", source_paragraph.name, s); - } - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp deleted file mode 100644 index 823c87534..000000000 --- a/toolsrc/src/commands_edit.cpp +++ /dev/null @@ -1,86 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Commands.h" -#include "vcpkg_Input.h" -#include "vcpkg_System.h" - -namespace vcpkg::Commands::Edit -{ - static std::vector find_from_registry() - { - static const std::array REGKEYS = { - LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", - LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1287CAD5-7C8D-410D-88B9-0D1EE4A83FF2}_is1)", - LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", - }; - - std::vector output; - for (auto&& keypath : REGKEYS) - { - const Optional code_installpath = - System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, L"InstallLocation"); - if (const auto c = code_installpath.get()) - { - const fs::path install_path = fs::path(*c); - output.push_back(install_path / "Code - Insiders.exe"); - output.push_back(install_path / "Code.exe"); - } - } - return output; - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - static const std::string OPTION_BUILDTREES = "--buildtrees"; - - static const fs::path VS_CODE_INSIDERS = fs::path{"Microsoft VS Code Insiders"} / "Code - Insiders.exe"; - static const fs::path VS_CODE = fs::path{"Microsoft VS Code"} / "Code.exe"; - - auto& fs = paths.get_filesystem(); - - static const std::string EXAMPLE = Commands::Help::create_example_string("edit zlib"); - args.check_exact_arg_count(1, EXAMPLE); - const std::unordered_set options = - args.check_and_get_optional_command_arguments({OPTION_BUILDTREES}); - const std::string port_name = args.command_arguments.at(0); - - const fs::path portpath = paths.ports / port_name; - Checks::check_exit(VCPKG_LINE_INFO, fs.is_directory(portpath), R"(Could not find port named "%s")", port_name); - - std::vector candidate_paths; - const std::vector from_path = Files::find_from_PATH(L"EDITOR"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE_INSIDERS); - candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE_INSIDERS); - candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE); - candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE); - - const std::vector from_registry = find_from_registry(); - candidate_paths.insert(candidate_paths.end(), from_registry.cbegin(), from_registry.cend()); - - auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { return fs.exists(p); }); - if (it == candidate_paths.cend()) - { - System::println(System::Color::error, - "Error: Visual Studio Code was not found and the environment variable EDITOR is not set."); - System::println("The following paths were examined:"); - Files::print_paths(candidate_paths); - System::println("You can also set the environmental variable EDITOR to your editor of choice."); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - const fs::path env_editor = *it; - if (options.find(OPTION_BUILDTREES) != options.cend()) - { - const auto buildtrees_current_dir = paths.buildtrees / port_name; - - const std::wstring cmd_line = - Strings::wformat(LR"("%s" "%s" -n)", env_editor, buildtrees_current_dir.native()); - Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); - } - - const std::wstring cmd_line = Strings::wformat( - LR"("%s" "%s" "%s" -n)", env_editor, portpath.native(), (portpath / "portfile.cmake").native()); - Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); - } -} diff --git a/toolsrc/src/commands_env.cpp b/toolsrc/src/commands_env.cpp deleted file mode 100644 index 6dad3e882..000000000 --- a/toolsrc/src/commands_env.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Build.h" -#include "vcpkg_Commands.h" -#include "vcpkg_System.h" - -namespace vcpkg::Commands::Env -{ - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) - { - static const std::string EXAMPLE = Commands::Help::create_example_string(R"(env --Triplet x64-windows)"); - args.check_exact_arg_count(0, EXAMPLE); - args.check_and_get_optional_command_arguments({}); - - const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); - const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); - System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, toolset) + L" && cmd"); - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_export.cpp b/toolsrc/src/commands_export.cpp deleted file mode 100644 index 20838f5a5..000000000 --- a/toolsrc/src/commands_export.cpp +++ /dev/null @@ -1,526 +0,0 @@ -#include "pch.h" - -#include "Paragraphs.h" -#include "vcpkg_Commands.h" -#include "vcpkg_Commands_Export_IFW.h" -#include "vcpkg_Dependencies.h" -#include "vcpkg_Input.h" -#include "vcpkg_System.h" -#include "vcpkg_Util.h" -#include "vcpkglib.h" -#include - -namespace vcpkg::Commands::Export -{ - using Dependencies::ExportPlanAction; - using Dependencies::ExportPlanType; - using Dependencies::RequestType; - using Install::InstallDir; - - static std::string create_nuspec_file_contents(const std::string& raw_exported_dir, - const std::string& targets_redirect_path, - const std::string& nuget_id, - const std::string& nupkg_version) - { - static constexpr auto CONTENT_TEMPLATE = R"( - - - @NUGET_ID@ - @VERSION@ - vcpkg - - Vcpkg NuGet export - - - - - - - - - -)"; - - std::string nuspec_file_content = std::regex_replace(CONTENT_TEMPLATE, std::regex("@NUGET_ID@"), nuget_id); - nuspec_file_content = std::regex_replace(nuspec_file_content, std::regex("@VERSION@"), nupkg_version); - nuspec_file_content = - std::regex_replace(nuspec_file_content, std::regex("@RAW_EXPORTED_DIR@"), raw_exported_dir); - nuspec_file_content = - std::regex_replace(nuspec_file_content, std::regex("@TARGETS_REDIRECT_PATH@"), targets_redirect_path); - return nuspec_file_content; - } - - static std::string create_targets_redirect(const std::string& target_path) noexcept - { - return Strings::format(R"###( - - - -)###", - target_path, - target_path); - } - - static void print_plan(const std::map>& group_by_plan_type) - { - static constexpr std::array ORDER = {ExportPlanType::ALREADY_BUILT, - ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT}; - - for (const ExportPlanType plan_type : ORDER) - { - const auto it = group_by_plan_type.find(plan_type); - if (it == group_by_plan_type.cend()) - { - continue; - } - - std::vector cont = it->second; - std::sort(cont.begin(), cont.end(), &ExportPlanAction::compare_by_name); - const std::string as_string = Strings::join("\n", cont, [](const ExportPlanAction* p) { - return Dependencies::to_output_string(p->request_type, p->spec.to_string()); - }); - - switch (plan_type) - { - case ExportPlanType::ALREADY_BUILT: - System::println("The following packages are already built and will be exported:\n%s", as_string); - continue; - case ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT: - System::println("The following packages need to be built:\n%s", as_string); - continue; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - } - - static std::string create_export_id() - { - const tm date_time = System::get_current_date_time(); - - // Format is: YYYYmmdd-HHMMSS - // 15 characters + 1 null terminating character will be written for a total of 16 chars - char mbstr[16]; - const size_t bytes_written = std::strftime(mbstr, sizeof(mbstr), "%Y%m%d-%H%M%S", &date_time); - Checks::check_exit(VCPKG_LINE_INFO, - bytes_written == 15, - "Expected 15 bytes to be written, but %u were written", - bytes_written); - const std::string date_time_as_string(mbstr); - return ("vcpkg-export-" + date_time_as_string); - } - - static fs::path do_nuget_export(const VcpkgPaths& paths, - const std::string& nuget_id, - const std::string& nuget_version, - const fs::path& raw_exported_dir, - const fs::path& output_dir) - { - Files::Filesystem& fs = paths.get_filesystem(); - const fs::path& nuget_exe = paths.get_nuget_exe(); - - // This file will be placed in "build\native" in the nuget package. Therefore, go up two dirs. - const std::string targets_redirect_content = - create_targets_redirect("../../scripts/buildsystems/msbuild/vcpkg.targets"); - const fs::path targets_redirect = paths.buildsystems / "tmp" / "vcpkg.export.nuget.targets"; - - std::error_code ec; - fs.create_directories(paths.buildsystems / "tmp", ec); - - fs.write_contents(targets_redirect, targets_redirect_content); - - const std::string nuspec_file_content = - create_nuspec_file_contents(raw_exported_dir.string(), targets_redirect.string(), nuget_id, nuget_version); - const fs::path nuspec_file_path = paths.buildsystems / "tmp" / "vcpkg.export.nuspec"; - fs.write_contents(nuspec_file_path, nuspec_file_content); - - // -NoDefaultExcludes is needed for ".vcpkg-root" - const std::wstring cmd_line = - Strings::wformat(LR"("%s" pack -OutputDirectory "%s" "%s" -NoDefaultExcludes > nul)", - nuget_exe.native(), - output_dir.native(), - nuspec_file_path.native()); - - const int exit_code = System::cmd_execute_clean(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: NuGet package creation failed"); - - const fs::path output_path = output_dir / (nuget_id + ".nupkg"); - return output_path; - } - - struct ArchiveFormat final - { - enum class BackingEnum - { - ZIP = 1, - SEVEN_ZIP, - }; - - constexpr ArchiveFormat() = delete; - - constexpr ArchiveFormat(BackingEnum backing_enum, const wchar_t* extension, const wchar_t* cmake_option) - : backing_enum(backing_enum), m_extension(extension), m_cmake_option(cmake_option) - { - } - - constexpr operator BackingEnum() const { return backing_enum; } - constexpr CWStringView extension() const { return this->m_extension; } - constexpr CWStringView cmake_option() const { return this->m_cmake_option; } - - private: - BackingEnum backing_enum; - const wchar_t* m_extension; - const wchar_t* m_cmake_option; - }; - - namespace ArchiveFormatC - { - constexpr const ArchiveFormat ZIP(ArchiveFormat::BackingEnum::ZIP, L"zip", L"zip"); - constexpr const ArchiveFormat SEVEN_ZIP(ArchiveFormat::BackingEnum::SEVEN_ZIP, L"7z", L"7zip"); - } - - static fs::path do_archive_export(const VcpkgPaths& paths, - const fs::path& raw_exported_dir, - const fs::path& output_dir, - const ArchiveFormat& format) - { - const fs::path& cmake_exe = paths.get_cmake_exe(); - - const std::wstring exported_dir_filename = raw_exported_dir.filename().native(); - const std::wstring exported_archive_filename = - Strings::wformat(L"%s.%s", exported_dir_filename, format.extension()); - const fs::path exported_archive_path = (output_dir / exported_archive_filename); - - // -NoDefaultExcludes is needed for ".vcpkg-root" - const std::wstring cmd_line = Strings::wformat(LR"("%s" -E tar "cf" "%s" --format=%s -- "%s")", - cmake_exe.native(), - exported_archive_path.native(), - format.cmake_option(), - raw_exported_dir.native()); - - const int exit_code = System::cmd_execute_clean(cmd_line); - Checks::check_exit( - VCPKG_LINE_INFO, exit_code == 0, "Error: %s creation failed", exported_archive_path.generic_string()); - return exported_archive_path; - } - - static Optional maybe_lookup(std::unordered_map const& m, - std::string const& key) - { - const auto it = m.find(key); - if (it != m.end()) return it->second; - return nullopt; - } - - void export_integration_files(const fs::path& raw_exported_dir_path, const VcpkgPaths& paths) - { - const std::vector integration_files_relative_to_root = { - {".vcpkg-root"}, - {fs::path{"scripts"} / "buildsystems" / "msbuild" / "applocal.ps1"}, - {fs::path{"scripts"} / "buildsystems" / "msbuild" / "vcpkg.targets"}, - {fs::path{"scripts"} / "buildsystems" / "vcpkg.cmake"}, - {fs::path{"scripts"} / "cmake" / "vcpkg_get_windows_sdk.cmake"}, - {fs::path{"scripts"} / "getWindowsSDK.ps1"}, - {fs::path{"scripts"} / "getProgramFilesPlatformBitness.ps1"}, - {fs::path{"scripts"} / "getProgramFiles32bit.ps1"}, - }; - - for (const fs::path& file : integration_files_relative_to_root) - { - const fs::path source = paths.root / file; - fs::path destination = raw_exported_dir_path / file; - Files::Filesystem& fs = paths.get_filesystem(); - std::error_code ec; - fs.create_directories(destination.parent_path(), ec); - Checks::check_exit(VCPKG_LINE_INFO, !ec); - fs.copy_file(source, destination, fs::copy_options::overwrite_existing, ec); - Checks::check_exit(VCPKG_LINE_INFO, !ec); - } - } - - struct ExportArguments - { - bool dry_run; - bool raw; - bool nuget; - bool ifw; - bool zip; - bool seven_zip; - - Optional maybe_nuget_id; - Optional maybe_nuget_version; - - IFW::Options ifw_options; - std::vector specs; - }; - - static ExportArguments handle_export_command_arguments(const VcpkgCmdArguments& args, - const Triplet& default_triplet) - { - ExportArguments ret; - - static const std::string OPTION_DRY_RUN = "--dry-run"; - static const std::string OPTION_RAW = "--raw"; - static const std::string OPTION_NUGET = "--nuget"; - static const std::string OPTION_IFW = "--ifw"; - static const std::string OPTION_ZIP = "--zip"; - static const std::string OPTION_SEVEN_ZIP = "--7zip"; - static const std::string OPTION_NUGET_ID = "--nuget-id"; - static const std::string OPTION_NUGET_VERSION = "--nuget-version"; - static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; - static const std::string OPTION_IFW_PACKAGES_DIR_PATH = "--ifw-packages-directory-path"; - static const std::string OPTION_IFW_REPOSITORY_DIR_PATH = "--ifw-repository-directory-path"; - static const std::string OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path"; - static const std::string OPTION_IFW_INSTALLER_FILE_PATH = "--ifw-installer-file-path"; - - // input sanitization - static const std::string EXAMPLE = - Commands::Help::create_example_string("export zlib zlib:x64-windows boost --nuget"); - args.check_min_arg_count(1, EXAMPLE); - - ret.specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, EXAMPLE); - }); - - const auto options = args.check_and_get_optional_command_arguments( - { - OPTION_DRY_RUN, - OPTION_RAW, - OPTION_NUGET, - OPTION_IFW, - OPTION_ZIP, - OPTION_SEVEN_ZIP, - }, - { - OPTION_NUGET_ID, - OPTION_NUGET_VERSION, - OPTION_IFW_REPOSITORY_URL, - OPTION_IFW_PACKAGES_DIR_PATH, - OPTION_IFW_REPOSITORY_DIR_PATH, - OPTION_IFW_CONFIG_FILE_PATH, - OPTION_IFW_INSTALLER_FILE_PATH, - }); - ret.dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); - ret.raw = options.switches.find(OPTION_RAW) != options.switches.cend(); - ret.nuget = options.switches.find(OPTION_NUGET) != options.switches.cend(); - ret.ifw = options.switches.find(OPTION_IFW) != options.switches.cend(); - ret.zip = options.switches.find(OPTION_ZIP) != options.switches.cend(); - ret.seven_zip = options.switches.find(OPTION_SEVEN_ZIP) != options.switches.cend(); - - if (!ret.raw && !ret.nuget && !ret.ifw && !ret.zip && !ret.seven_zip && !ret.dry_run) - { - System::println(System::Color::error, - "Must provide at least one export type: --raw --nuget --ifw --zip --7zip"); - System::print(EXAMPLE); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - struct OptionPair - { - const std::string& name; - Optional& out_opt; - }; - const auto options_implies = - [&](const std::string& main_opt_name, bool main_opt, Span implying_opts) { - if (main_opt) - { - for (auto&& opt : implying_opts) - opt.out_opt = maybe_lookup(options.settings, opt.name); - } - else - { - for (auto&& opt : implying_opts) - Checks::check_exit(VCPKG_LINE_INFO, - !maybe_lookup(options.settings, opt.name), - "%s is only valid with %s", - opt.name, - main_opt_name); - } - }; - - options_implies(OPTION_NUGET, - ret.nuget, - { - {OPTION_NUGET_ID, ret.maybe_nuget_id}, - {OPTION_NUGET_VERSION, ret.maybe_nuget_version}, - }); - - options_implies(OPTION_IFW, - ret.ifw, - { - {OPTION_IFW_REPOSITORY_URL, ret.ifw_options.maybe_repository_url}, - {OPTION_IFW_PACKAGES_DIR_PATH, ret.ifw_options.maybe_packages_dir_path}, - {OPTION_IFW_REPOSITORY_DIR_PATH, ret.ifw_options.maybe_repository_dir_path}, - {OPTION_IFW_CONFIG_FILE_PATH, ret.ifw_options.maybe_config_file_path}, - {OPTION_IFW_INSTALLER_FILE_PATH, ret.ifw_options.maybe_installer_file_path}, - }); - return ret; - } - - static void print_next_step_info(const fs::path& prefix) - { - const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; - const CMakeVariable cmake_variable = CMakeVariable(L"CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); - System::println("\n" - "To use the exported libraries in CMake projects use:" - "\n" - " %s" - "\n", - Strings::to_utf8(cmake_variable.s)); - }; - - static void handle_raw_based_export(Span export_plan, - const ExportArguments& opts, - const std::string& export_id, - const VcpkgPaths& paths) - { - 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; - std::error_code ec; - fs.remove_all(raw_exported_dir_path, ec); - fs.create_directory(raw_exported_dir_path, ec); - - // execute the plan - for (const ExportPlanAction& action : export_plan) - { - if (action.plan_type != ExportPlanType::ALREADY_BUILT) - { - Checks::unreachable(VCPKG_LINE_INFO); - } - - const std::string display_name = action.spec.to_string(); - System::println("Exporting package %s... ", display_name); - - const BinaryParagraph& binary_paragraph = - action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; - - const InstallDir dirs = InstallDir::from_destination_root( - raw_exported_dir_path / "installed", - action.spec.triplet().to_string(), - raw_exported_dir_path / "installed" / "vcpkg" / "info" / (binary_paragraph.fullstem() + ".list")); - - Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); - System::println(System::Color::success, "Exporting package %s... done", display_name); - } - - // Copy files needed for integration - export_integration_files(raw_exported_dir_path, paths); - - if (opts.raw) - { - System::println( - System::Color::success, R"(Files exported at: "%s")", raw_exported_dir_path.generic_string()); - print_next_step_info(export_to_path); - } - - if (opts.nuget) - { - System::println("Creating nuget package... "); - - const std::string nuget_id = opts.maybe_nuget_id.value_or(raw_exported_dir_path.filename().string()); - const std::string nuget_version = opts.maybe_nuget_version.value_or("1.0.0"); - const fs::path output_path = - do_nuget_export(paths, nuget_id, nuget_version, raw_exported_dir_path, export_to_path); - System::println(System::Color::success, "Creating nuget package... done"); - System::println(System::Color::success, "NuGet package exported at: %s", output_path.generic_string()); - - System::println(R"( -With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: - Install-Package %s -Source "%s" -)" - "\n", - nuget_id, - output_path.parent_path().u8string()); - } - - if (opts.zip) - { - System::println("Creating zip archive... "); - const fs::path output_path = - do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::ZIP); - System::println(System::Color::success, "Creating zip archive... done"); - System::println(System::Color::success, "Zip archive exported at: %s", output_path.generic_string()); - print_next_step_info("[...]"); - } - - if (opts.seven_zip) - { - System::println("Creating 7zip archive... "); - const fs::path output_path = - do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::SEVEN_ZIP); - System::println(System::Color::success, "Creating 7zip archive... done"); - System::println(System::Color::success, "7zip archive exported at: %s", output_path.generic_string()); - print_next_step_info("[...]"); - } - - if (!opts.raw) - { - fs.remove_all(raw_exported_dir_path, ec); - } - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) - { - const auto opts = handle_export_command_arguments(args, default_triplet); - for (auto&& spec : opts.specs) - Input::check_triplet(spec.triplet(), paths); - - // create the plan - const StatusParagraphs status_db = database_load_check(paths); - std::vector export_plan = Dependencies::create_export_plan(paths, opts.specs, status_db); - Checks::check_exit(VCPKG_LINE_INFO, !export_plan.empty(), "Export plan cannot be empty"); - - std::map> group_by_plan_type; - Util::group_by(export_plan, &group_by_plan_type, [](const ExportPlanAction& p) { return p.plan_type; }); - print_plan(group_by_plan_type); - - const bool has_non_user_requested_packages = - Util::find_if(export_plan, [](const ExportPlanAction& package) -> bool { - return package.request_type != RequestType::USER_REQUESTED; - }) != export_plan.cend(); - - if (has_non_user_requested_packages) - { - System::println(System::Color::warning, - "Additional packages (*) need to be exported to complete this operation."); - } - - const auto it = group_by_plan_type.find(ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT); - if (it != group_by_plan_type.cend() && !it->second.empty()) - { - System::println(System::Color::error, "There are packages that have not been built."); - - // No need to show all of them, just the user-requested ones. Dependency resolution will handle the rest. - std::vector unbuilt = it->second; - Util::erase_remove_if( - unbuilt, [](const ExportPlanAction* a) { return a->request_type != RequestType::USER_REQUESTED; }); - - const auto s = Strings::join(" ", unbuilt, [](const ExportPlanAction* a) { return a->spec.to_string(); }); - System::println("To build them, run:\n" - " vcpkg install %s", - s); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - if (opts.dry_run) - { - Checks::exit_success(VCPKG_LINE_INFO); - } - - std::string export_id = create_export_id(); - - if (opts.raw || opts.nuget || opts.zip || opts.seven_zip) - { - handle_raw_based_export(export_plan, opts, export_id, paths); - } - - if (opts.ifw) - { - IFW::do_export(export_plan, export_id, opts.ifw_options, paths); - - print_next_step_info("@RootDir@/src/vcpkg"); - } - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_export_ifw.cpp b/toolsrc/src/commands_export_ifw.cpp deleted file mode 100644 index 191dbb763..000000000 --- a/toolsrc/src/commands_export_ifw.cpp +++ /dev/null @@ -1,481 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Commands.h" -#include "vcpkg_Commands_Export.h" -#include "vcpkg_Commands_Export_IFW.h" - -namespace vcpkg::Commands::Export::IFW -{ - using Dependencies::ExportPlanAction; - using Dependencies::ExportPlanType; - using Install::InstallDir; - - static std::string create_release_date() - { - const tm date_time = System::get_current_date_time(); - - // Format is: YYYY-mm-dd - // 10 characters + 1 null terminating character will be written for a total of 11 chars - char mbstr[11]; - const size_t bytes_written = std::strftime(mbstr, sizeof(mbstr), "%Y-%m-%d", &date_time); - Checks::check_exit(VCPKG_LINE_INFO, - bytes_written == 10, - "Expected 10 bytes to be written, but %u were written", - bytes_written); - const std::string date_time_as_string(mbstr); - return date_time_as_string; - } - - fs::path get_packages_dir_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) - { - return ifw_options.maybe_packages_dir_path.has_value() - ? fs::path(ifw_options.maybe_packages_dir_path.value_or_exit(VCPKG_LINE_INFO)) - : paths.root / (export_id + "-ifw-packages"); - } - - fs::path get_repository_dir_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) - { - return ifw_options.maybe_repository_dir_path.has_value() - ? fs::path(ifw_options.maybe_repository_dir_path.value_or_exit(VCPKG_LINE_INFO)) - : paths.root / (export_id + "-ifw-repository"); - } - - fs::path get_config_file_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) - { - return ifw_options.maybe_config_file_path.has_value() - ? fs::path(ifw_options.maybe_config_file_path.value_or_exit(VCPKG_LINE_INFO)) - : paths.root / (export_id + "-ifw-configuration.xml"); - } - - fs::path get_installer_file_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) - { - return ifw_options.maybe_installer_file_path.has_value() - ? fs::path(ifw_options.maybe_installer_file_path.value_or_exit(VCPKG_LINE_INFO)) - : paths.root / (export_id + "-ifw-installer.exe"); - } - - fs::path export_real_package(const fs::path& ifw_packages_dir_path, - const ExportPlanAction& action, - Files::Filesystem& fs) - { - std::error_code ec; - - const BinaryParagraph& binary_paragraph = - action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; - - // Prepare meta dir - const fs::path package_xml_file_path = - ifw_packages_dir_path / - Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "meta" / - "package.xml"; - const fs::path package_xml_dir_path = package_xml_file_path.parent_path(); - fs.create_directories(package_xml_dir_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not create directory for package file %s", - package_xml_file_path.generic_string()); - - auto deps = Strings::join( - ",", binary_paragraph.depends, [](const std::string& dep) { return "packages." + dep + ":"; }); - - if (!deps.empty()) deps = "\n " + deps + ""; - - fs.write_contents(package_xml_file_path, - Strings::format( - R"###( - - %s - %s - %s - packages.%s:,triplets.%s:%s - true - -)###", - action.spec.to_string(), - binary_paragraph.version, - create_release_date(), - action.spec.name(), - action.spec.triplet().canonical_name(), - deps)); - - // Return dir path for export package data - return ifw_packages_dir_path / - Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "data" / - "installed"; - } - - void export_unique_packages(const fs::path& raw_exported_dir_path, - std::map unique_packages, - Files::Filesystem& fs) - { - std::error_code ec; - - // packages - - fs::path package_xml_file_path = raw_exported_dir_path / "packages" / "meta" / "package.xml"; - fs::path package_xml_dir_path = package_xml_file_path.parent_path(); - fs.create_directories(package_xml_dir_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not create directory for package file %s", - package_xml_file_path.generic_string()); - fs.write_contents(package_xml_file_path, - Strings::format( - R"###( - - Packages - 1.0.0 - %s - -)###", - create_release_date())); - - for (auto package = unique_packages.begin(); package != unique_packages.end(); ++package) - { - const ExportPlanAction& action = *(package->second); - const BinaryParagraph& binary_paragraph = - action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; - - package_xml_file_path = - raw_exported_dir_path / Strings::format("packages.%s", package->first) / "meta" / "package.xml"; - package_xml_dir_path = package_xml_file_path.parent_path(); - fs.create_directories(package_xml_dir_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not create directory for package file %s", - package_xml_file_path.generic_string()); - - fs.write_contents(package_xml_file_path, - Strings::format( - R"###( - - %s - %s - %s - %s - -)###", - action.spec.name(), - binary_paragraph.description, - binary_paragraph.version, - create_release_date())); - } - } - - void export_unique_triplets(const fs::path& raw_exported_dir_path, - std::set unique_triplets, - Files::Filesystem& fs) - { - std::error_code ec; - - // triplets - - fs::path package_xml_file_path = raw_exported_dir_path / "triplets" / "meta" / "package.xml"; - fs::path package_xml_dir_path = package_xml_file_path.parent_path(); - fs.create_directories(package_xml_dir_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not create directory for package file %s", - package_xml_file_path.generic_string()); - fs.write_contents(package_xml_file_path, - Strings::format( - R"###( - - Triplets - 1.0.0 - %s - -)###", - create_release_date())); - - for (const std::string& triplet : unique_triplets) - { - package_xml_file_path = - raw_exported_dir_path / Strings::format("triplets.%s", triplet) / "meta" / "package.xml"; - package_xml_dir_path = package_xml_file_path.parent_path(); - fs.create_directories(package_xml_dir_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not create directory for package file %s", - package_xml_file_path.generic_string()); - fs.write_contents(package_xml_file_path, - Strings::format( - R"###( - - %s - 1.0.0 - %s - -)###", - triplet, - create_release_date())); - } - } - - void export_integration(const fs::path& raw_exported_dir_path, Files::Filesystem& fs) - { - std::error_code ec; - - // integration - fs::path package_xml_file_path = raw_exported_dir_path / "integration" / "meta" / "package.xml"; - fs::path package_xml_dir_path = package_xml_file_path.parent_path(); - fs.create_directories(package_xml_dir_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not create directory for package file %s", - package_xml_file_path.generic_string()); - - fs.write_contents(package_xml_file_path, - Strings::format( - R"###( - - Integration - 1.0.0 - %s - -)###", - create_release_date())); - } - - void export_config(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) - { - std::error_code ec; - Files::Filesystem& fs = paths.get_filesystem(); - - const fs::path config_xml_file_path = get_config_file_path(export_id, ifw_options, paths); - - fs::path config_xml_dir_path = config_xml_file_path.parent_path(); - fs.create_directories(config_xml_dir_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not create directory for configuration file %s", - config_xml_file_path.generic_string()); - - std::string formatted_repo_url; - std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); - if (!ifw_repo_url.empty()) - { - formatted_repo_url = Strings::format(R"###( - - - %s - - )###", - ifw_repo_url); - } - - fs.write_contents(config_xml_file_path, - Strings::format( - R"###( - - vcpkg - 1.0.0 - vcpkg - @RootDir@/src/vcpkg%s - -)###", - formatted_repo_url)); - } - - void export_maintenance_tool(const fs::path& ifw_packages_dir_path, const VcpkgPaths& paths) - { - System::println("Exporting maintenance tool... "); - - std::error_code ec; - Files::Filesystem& fs = paths.get_filesystem(); - - const fs::path& installerbase_exe = paths.get_ifw_installerbase_exe(); - fs::path tempmaintenancetool = ifw_packages_dir_path / "maintenance" / "data" / "tempmaintenancetool.exe"; - fs.create_directories(tempmaintenancetool.parent_path(), ec); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not create directory for package file %s", - tempmaintenancetool.generic_string()); - fs.copy_file(installerbase_exe, tempmaintenancetool, fs::copy_options::overwrite_existing, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not write package file %s", tempmaintenancetool.generic_string()); - - fs::path package_xml_file_path = ifw_packages_dir_path / "maintenance" / "meta" / "package.xml"; - fs::path package_xml_dir_path = package_xml_file_path.parent_path(); - fs.create_directories(package_xml_dir_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not create directory for package file %s", - package_xml_file_path.generic_string()); - fs.write_contents(package_xml_file_path, - Strings::format( - R"###( - - Maintenance Tool - Maintenance Tool - 1.0.0 - %s - - true - true - true - -)###", - create_release_date())); - const fs::path script_source = paths.root / "scripts" / "ifw" / "maintenance.qs"; - const fs::path script_destination = ifw_packages_dir_path / "maintenance" / "meta" / "maintenance.qs"; - fs.copy_file(script_source, script_destination, fs::copy_options::overwrite_existing, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not write package file %s", script_destination.generic_string()); - - System::println("Exporting maintenance tool... done"); - } - - void do_repository(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) - { - const fs::path& repogen_exe = paths.get_ifw_repogen_exe(); - const fs::path packages_dir = get_packages_dir_path(export_id, ifw_options, paths); - const fs::path repository_dir = get_repository_dir_path(export_id, ifw_options, paths); - - System::println("Generating repository %s...", repository_dir.generic_string()); - - std::error_code ec; - Files::Filesystem& fs = paths.get_filesystem(); - - fs.remove_all(repository_dir, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not remove outdated repository directory %s", repository_dir.generic_string()); - - const std::wstring cmd_line = Strings::wformat(LR"("%s" --packages "%s" "%s" > nul)", - repogen_exe.native(), - packages_dir.native(), - repository_dir.native()); - - const int exit_code = System::cmd_execute_clean(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: IFW repository generating failed"); - - System::println(System::Color::success, "Generating repository %s... done.", repository_dir.generic_string()); - } - - void do_installer(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) - { - const fs::path& binarycreator_exe = paths.get_ifw_binarycreator_exe(); - const fs::path config_file = get_config_file_path(export_id, ifw_options, paths); - const fs::path packages_dir = get_packages_dir_path(export_id, ifw_options, paths); - const fs::path repository_dir = get_repository_dir_path(export_id, ifw_options, paths); - const fs::path installer_file = get_installer_file_path(export_id, ifw_options, paths); - - System::println("Generating installer %s...", installer_file.generic_string()); - - std::wstring cmd_line; - - std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); - if (!ifw_repo_url.empty()) - { - cmd_line = Strings::wformat(LR"("%s" --online-only --config "%s" --repository "%s" "%s" > nul)", - binarycreator_exe.native(), - config_file.native(), - repository_dir.native(), - installer_file.native()); - } - else - { - cmd_line = Strings::wformat(LR"("%s" --config "%s" --packages "%s" "%s" > nul)", - binarycreator_exe.native(), - config_file.native(), - packages_dir.native(), - installer_file.native()); - } - - const int exit_code = System::cmd_execute_clean(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: IFW installer generating failed"); - - System::println(System::Color::success, "Generating installer %s... done.", installer_file.generic_string()); - } - - void do_export(const std::vector& export_plan, - const std::string& export_id, - const Options& ifw_options, - const VcpkgPaths& paths) - { - std::error_code ec; - 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); - Checks::check_exit(VCPKG_LINE_INFO, - !ec, - "Could not remove outdated packages directory %s", - ifw_packages_dir_path.generic_string()); - - fs.create_directory(ifw_packages_dir_path, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not create packages directory %s", ifw_packages_dir_path.generic_string()); - - // Export maintenance tool - export_maintenance_tool(ifw_packages_dir_path, paths); - - System::println("Exporting packages %s... ", ifw_packages_dir_path.generic_string()); - - // execute the plan - std::map unique_packages; - std::set unique_triplets; - for (const ExportPlanAction& action : export_plan) - { - if (action.plan_type != ExportPlanType::ALREADY_BUILT) - { - Checks::unreachable(VCPKG_LINE_INFO); - } - - const std::string display_name = action.spec.to_string(); - System::println("Exporting package %s... ", display_name); - - const BinaryParagraph& binary_paragraph = - action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; - - unique_packages[action.spec.name()] = &action; - unique_triplets.insert(action.spec.triplet().canonical_name()); - - // Export real package and return data dir for installation - fs::path ifw_package_dir_path = export_real_package(ifw_packages_dir_path, action, fs); - - // Copy package data - const InstallDir dirs = InstallDir::from_destination_root(ifw_package_dir_path, - action.spec.triplet().to_string(), - ifw_package_dir_path / "vcpkg" / "info" / - (binary_paragraph.fullstem() + ".list")); - - Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); - System::println("Exporting package %s... done", display_name); - } - - System::println("Exporting packages %s... done", ifw_packages_dir_path.generic_string()); - - const fs::path config_file = get_config_file_path(export_id, ifw_options, paths); - - System::println("Generating configuration %s...", config_file.generic_string()); - - // Unique packages - export_unique_packages(ifw_packages_dir_path, unique_packages, fs); - - // Unique triplets - export_unique_triplets(ifw_packages_dir_path, unique_triplets, fs); - - // Copy files needed for integration - export_integration_files(ifw_packages_dir_path / "integration" / "data", paths); - // Integration - export_integration(ifw_packages_dir_path, fs); - - // Configuration - export_config(export_id, ifw_options, paths); - - System::println("Generating configuration %s... done.", config_file.generic_string()); - - // Do repository (optional) - std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); - if (!ifw_repo_url.empty()) - { - do_repository(export_id, ifw_options, paths); - } - - // Do installer - do_installer(export_id, ifw_options, paths); - } -} diff --git a/toolsrc/src/commands_hash.cpp b/toolsrc/src/commands_hash.cpp deleted file mode 100644 index b3211b9f8..000000000 --- a/toolsrc/src/commands_hash.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Commands.h" -#include "vcpkg_System.h" -#include "vcpkg_Util.h" - -namespace vcpkg::Commands::Hash -{ - static void do_file_hash(fs::path const& path, std::wstring const& hash_type) - { - const auto cmd_line = Strings::wformat(LR"(CertUtil.exe -hashfile "%s" %s)", path.c_str(), hash_type); - const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit( - VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::to_utf8(cmd_line)); - - std::string const& output = ec_data.output; - - const auto start = output.find_first_of("\r\n"); - Checks::check_exit(VCPKG_LINE_INFO, - start != std::string::npos, - "Unexpected output format from command: %s", - Strings::to_utf8(cmd_line)); - - const auto end = output.find_first_of("\r\n", start + 1); - Checks::check_exit(VCPKG_LINE_INFO, - end != std::string::npos, - "Unexpected output format from command: %s", - Strings::to_utf8(cmd_line)); - - auto hash = output.substr(start, end - start); - Util::erase_remove_if(hash, isspace); - System::println(hash); - } - - void perform_and_exit(const VcpkgCmdArguments& args) - { - static const std::string EXAMPLE = - Strings::format("The argument should be a file path\n%s", - Commands::Help::create_example_string("hash boost_1_62_0.tar.bz2")); - args.check_min_arg_count(1, EXAMPLE); - args.check_max_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}); - - if (args.command_arguments.size() == 1) - { - do_file_hash(args.command_arguments[0], L"SHA512"); - } - if (args.command_arguments.size() == 2) - { - do_file_hash(args.command_arguments[0], Strings::to_utf16(args.command_arguments[1])); - } - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_help.cpp b/toolsrc/src/commands_help.cpp deleted file mode 100644 index a12f9003d..000000000 --- a/toolsrc/src/commands_help.cpp +++ /dev/null @@ -1,131 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Commands.h" -#include "vcpkg_System.h" - -namespace vcpkg::Commands::Help -{ - void help_topics() - { - System::println("Available help topics:\n" - " triplet\n" - " integrate\n" - " export"); - } - - void help_topic_valid_triplet(const VcpkgPaths& paths) - { - System::println("Available architecture triplets:"); - for (auto&& path : paths.get_filesystem().get_files_non_recursive(paths.triplets)) - { - System::println(" %s", path.stem().filename().string()); - } - } - - void help_topic_export() - { - System::println("Summary:\n" - " vcpkg export [options] ...\n" - "\n" - "Options:\n" - " --7zip Export to a 7zip (.7z) file\n" - " --dry-run Do not actually export\n" - " --nuget Export a NuGet package\n" - " --nuget-id= Specify the id for the exported NuGet package\n" - " --nuget-version= Specify the version for the exported NuGet package\n" - " --raw Export to an uncompressed directory\n" - " --zip Export to a zip file"); - } - - void print_usage() - { - System::println( - "Commands:\n" - " vcpkg search [pat] Search for packages available to be built\n" - " vcpkg install ... Install a package\n" - " vcpkg remove ... Uninstall a package\n" - " vcpkg remove --outdated Uninstall all out-of-date packages\n" - " vcpkg list List installed packages\n" - " vcpkg update Display list of packages for updating\n" - " vcpkg hash [alg] Hash a file by specific algorithm, default SHA512\n" - " vcpkg help topics Display the list of help topics\n" - " vcpkg help Display help for a specific topic\n" - "\n" - "%s" // Integration help - "\n" - " vcpkg export ... [opt]... Exports a package\n" - " vcpkg edit Open up a port for editing (uses %%EDITOR%%, default 'code')\n" - " vcpkg import Import a pre-built library\n" - " vcpkg create \n" - " [archivename] Create a new package\n" - " vcpkg owns Search for files in installed packages\n" - " vcpkg cache List cached compiled packages\n" - " vcpkg version Display version information\n" - " vcpkg contact Display contact information to send feedback\n" - "\n" - //"internal commands:\n" - //" --check-build-deps \n" - //" --create-binary-control \n" - //"\n" - "Options:\n" - " --triplet Specify the target architecture triplet.\n" - " (default: %%VCPKG_DEFAULT_TRIPLET%%, see 'vcpkg help triplet')\n" - "\n" - " --vcpkg-root Specify the vcpkg root directory\n" - " (default: %%VCPKG_ROOT%%)\n" - "\n" - "For more help (including examples) see the accompanying README.md.", - Integrate::INTEGRATE_COMMAND_HELPSTRING); - } - - std::string create_example_string(const std::string& command_and_arguments) - { - std::string cs = Strings::format("Example:\n" - " vcpkg %s\n", - command_and_arguments); - return cs; - } - - void print_example(const std::string& command_and_arguments) - { - System::println(create_example_string(command_and_arguments)); - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - args.check_max_arg_count(1); - args.check_and_get_optional_command_arguments({}); - - if (args.command_arguments.empty()) - { - print_usage(); - Checks::exit_success(VCPKG_LINE_INFO); - } - const auto& topic = args.command_arguments[0]; - if (topic == "triplet" || topic == "triplets" || topic == "triple") - { - help_topic_valid_triplet(paths); - } - else if (topic == "export") - { - help_topic_export(); - } - else if (topic == "integrate") - { - System::print("Commands:\n" - "%s", - Integrate::INTEGRATE_COMMAND_HELPSTRING); - } - else if (topic == "topics") - { - help_topics(); - } - else - { - System::println(System::Color::error, "Error: unknown topic %s", topic); - help_topics(); - Checks::exit_fail(VCPKG_LINE_INFO); - } - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_import.cpp b/toolsrc/src/commands_import.cpp deleted file mode 100644 index 412a03d7f..000000000 --- a/toolsrc/src/commands_import.cpp +++ /dev/null @@ -1,119 +0,0 @@ -#include "pch.h" - -#include "Paragraphs.h" -#include "StatusParagraph.h" -#include "vcpkg_Commands.h" -#include "vcpkg_Files.h" - -namespace vcpkg::Commands::Import -{ - struct Binaries - { - std::vector dlls; - std::vector libs; - }; - - static void check_is_directory(const LineInfo& line_info, const Files::Filesystem& fs, const fs::path& dirpath) - { - Checks::check_exit(line_info, fs.is_directory(dirpath), "The path %s is not a directory", dirpath.string()); - } - - static Binaries find_binaries_in_dir(const Files::Filesystem& fs, const fs::path& path) - { - auto files = fs.get_files_recursive(path); - - check_is_directory(VCPKG_LINE_INFO, fs, path); - - Binaries binaries; - for (auto&& file : files) - { - if (fs.is_directory(file)) continue; - const auto ext = file.extension(); - if (ext == ".dll") - binaries.dlls.push_back(std::move(file)); - else if (ext == ".lib") - binaries.libs.push_back(std::move(file)); - } - return binaries; - } - - static void copy_files_into_directory(Files::Filesystem& fs, - const std::vector& files, - const fs::path& destination_folder) - { - std::error_code ec; - fs.create_directory(destination_folder, ec); - - for (auto const& src_path : files) - { - const fs::path dest_path = destination_folder / src_path.filename(); - fs.copy(src_path, dest_path, fs::copy_options::overwrite_existing); - } - } - - static void place_library_files_in(Files::Filesystem& fs, - const fs::path& include_directory, - const fs::path& project_directory, - const fs::path& destination_path) - { - check_is_directory(VCPKG_LINE_INFO, fs, include_directory); - check_is_directory(VCPKG_LINE_INFO, fs, project_directory); - check_is_directory(VCPKG_LINE_INFO, fs, destination_path); - const Binaries debug_binaries = find_binaries_in_dir(fs, project_directory / "Debug"); - const Binaries release_binaries = find_binaries_in_dir(fs, project_directory / "Release"); - - const fs::path destination_include_directory = destination_path / "include"; - fs.copy(include_directory, - destination_include_directory, - fs::copy_options::recursive | fs::copy_options::overwrite_existing); - - copy_files_into_directory(fs, release_binaries.dlls, destination_path / "bin"); - copy_files_into_directory(fs, release_binaries.libs, destination_path / "lib"); - - std::error_code ec; - fs.create_directory(destination_path / "debug", ec); - copy_files_into_directory(fs, debug_binaries.dlls, destination_path / "debug" / "bin"); - copy_files_into_directory(fs, debug_binaries.libs, destination_path / "debug" / "lib"); - } - - static void do_import(const VcpkgPaths& paths, - const fs::path& include_directory, - const fs::path& project_directory, - const BinaryParagraph& control_file_data) - { - auto& fs = paths.get_filesystem(); - const fs::path library_destination_path = paths.package_dir(control_file_data.spec); - std::error_code ec; - fs.create_directory(library_destination_path, ec); - place_library_files_in(paths.get_filesystem(), include_directory, project_directory, library_destination_path); - - const fs::path control_file_path = library_destination_path / "CONTROL"; - fs.write_contents(control_file_path, Strings::serialize(control_file_data)); - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - static const std::string EXAMPLE = Commands::Help::create_example_string( - R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)"); - args.check_exact_arg_count(3, EXAMPLE); - args.check_and_get_optional_command_arguments({}); - - const fs::path control_file_path(args.command_arguments[0]); - const fs::path include_directory(args.command_arguments[1]); - const fs::path project_directory(args.command_arguments[2]); - - const Expected> pghs = - Paragraphs::get_single_paragraph(paths.get_filesystem(), control_file_path); - Checks::check_exit(VCPKG_LINE_INFO, - pghs.get() != nullptr, - "Invalid control file %s for package", - control_file_path.generic_string()); - - StatusParagraph spgh; - spgh.package = BinaryParagraph(*pghs.get()); - auto& control_file_data = spgh.package; - - do_import(paths, include_directory, project_directory, control_file_data); - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp deleted file mode 100644 index d815332fe..000000000 --- a/toolsrc/src/commands_install.cpp +++ /dev/null @@ -1,613 +0,0 @@ -#include "pch.h" - -#include "Paragraphs.h" -#include "metrics.h" -#include "vcpkg_Build.h" -#include "vcpkg_Commands.h" -#include "vcpkg_Dependencies.h" -#include "vcpkg_Files.h" -#include "vcpkg_GlobalState.h" -#include "vcpkg_Input.h" -#include "vcpkg_System.h" -#include "vcpkg_Util.h" -#include "vcpkglib.h" - -namespace vcpkg::Commands::Install -{ - using namespace Dependencies; - - InstallDir InstallDir::from_destination_root(const fs::path& destination_root, - const std::string& destination_subdirectory, - const fs::path& listfile) - { - InstallDir dirs; - dirs.m_destination = destination_root / destination_subdirectory; - dirs.m_destination_subdirectory = destination_subdirectory; - dirs.m_listfile = listfile; - return dirs; - } - - const fs::path& InstallDir::destination() const { return this->m_destination; } - - const std::string& InstallDir::destination_subdirectory() const { return this->m_destination_subdirectory; } - - const fs::path& InstallDir::listfile() const { return this->m_listfile; } - - void install_files_and_write_listfile(Files::Filesystem& fs, - const fs::path& source_dir, - const InstallDir& destination_dir) - { - std::vector output; - std::error_code ec; - - const size_t prefix_length = source_dir.native().size(); - const fs::path& destination = destination_dir.destination(); - const std::string& destination_subdirectory = destination_dir.destination_subdirectory(); - const fs::path& listfile = destination_dir.listfile(); - - Checks::check_exit( - VCPKG_LINE_INFO, fs.exists(source_dir), "Source directory %s does not exist", source_dir.generic_string()); - fs.create_directories(destination, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not create destination directory %s", destination.generic_string()); - const fs::path listfile_parent = listfile.parent_path(); - fs.create_directories(listfile_parent, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "Could not create directory for listfile %s", listfile.generic_string()); - - output.push_back(Strings::format(R"(%s/)", destination_subdirectory)); - auto files = fs.get_files_recursive(source_dir); - for (auto&& file : files) - { - const auto status = fs.status(file, ec); - if (ec) - { - System::println(System::Color::error, "failed: %s: %s", file.u8string(), ec.message()); - continue; - } - - const std::string filename = file.filename().generic_string(); - if (fs::is_regular_file(status) && - (Strings::case_insensitive_ascii_compare(filename.c_str(), "CONTROL") == 0 || - Strings::case_insensitive_ascii_compare(filename.c_str(), "BUILD_INFO") == 0)) - { - // Do not copy the control file - continue; - } - - const std::string suffix = file.generic_u8string().substr(prefix_length + 1); - const fs::path target = destination / suffix; - - if (fs::is_directory(status)) - { - fs.create_directory(target, ec); - if (ec) - { - System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); - } - - // Trailing backslash for directories - output.push_back(Strings::format(R"(%s/%s/)", destination_subdirectory, suffix)); - continue; - } - - if (fs::is_regular_file(status)) - { - if (fs.exists(target)) - { - System::println(System::Color::warning, - "File %s was already present and will be overwritten", - target.u8string(), - ec.message()); - } - fs.copy_file(file, target, fs::copy_options::overwrite_existing, ec); - if (ec) - { - System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); - } - output.push_back(Strings::format(R"(%s/%s)", destination_subdirectory, suffix)); - continue; - } - - if (!fs::status_known(status)) - { - System::println(System::Color::error, "failed: %s: unknown status", file.u8string()); - continue; - } - - System::println(System::Color::error, "failed: %s: cannot handle file type", file.u8string()); - } - - std::sort(output.begin(), output.end()); - - fs.write_lines(listfile, output); - } - - static void remove_first_n_chars(std::vector* strings, const size_t n) - { - for (std::string& s : *strings) - { - s.erase(0, n); - } - }; - - static std::vector extract_files_in_triplet( - const std::vector& pgh_and_files, const Triplet& triplet) - { - std::vector output; - for (const StatusParagraphAndAssociatedFiles& t : pgh_and_files) - { - if (t.pgh.package.spec.triplet() != triplet) - { - continue; - } - - output.insert(output.end(), t.files.begin(), t.files.end()); - } - - std::sort(output.begin(), output.end()); - return output; - } - - static SortedVector build_list_of_package_files(const Files::Filesystem& fs, - const fs::path& package_dir) - { - const std::vector package_file_paths = fs.get_files_recursive(package_dir); - const size_t package_remove_char_count = package_dir.generic_string().size() + 1; // +1 for the slash - auto package_files = Util::fmap(package_file_paths, [package_remove_char_count](const fs::path& path) { - std::string as_string = path.generic_string(); - as_string.erase(0, package_remove_char_count); - return std::move(as_string); - }); - - return SortedVector(std::move(package_files)); - } - - static SortedVector build_list_of_installed_files( - const std::vector& pgh_and_files, const Triplet& triplet) - { - std::vector installed_files = extract_files_in_triplet(pgh_and_files, triplet); - const size_t installed_remove_char_count = triplet.canonical_name().size() + 1; // +1 for the slash - remove_first_n_chars(&installed_files, installed_remove_char_count); - - return SortedVector(std::move(installed_files)); - } - - InstallResult install_package(const VcpkgPaths& paths, const BinaryControlFile& bcf, StatusParagraphs* status_db) - { - const fs::path package_dir = paths.package_dir(bcf.core_paragraph.spec); - const Triplet& triplet = bcf.core_paragraph.spec.triplet(); - const std::vector pgh_and_files = get_installed_files(paths, *status_db); - - const SortedVector package_files = - build_list_of_package_files(paths.get_filesystem(), package_dir); - const SortedVector installed_files = build_list_of_installed_files(pgh_and_files, triplet); - - std::vector intersection; - std::set_intersection(package_files.begin(), - package_files.end(), - installed_files.begin(), - installed_files.end(), - std::back_inserter(intersection)); - - if (!intersection.empty()) - { - const fs::path triplet_install_path = paths.installed / triplet.canonical_name(); - System::println(System::Color::error, - "The following files are already installed in %s and are in conflict with %s", - triplet_install_path.generic_string(), - bcf.core_paragraph.spec); - System::print("\n "); - System::println(Strings::join("\n ", intersection)); - System::println(); - return InstallResult::FILE_CONFLICTS; - } - - StatusParagraph source_paragraph; - source_paragraph.package = bcf.core_paragraph; - source_paragraph.want = Want::INSTALL; - source_paragraph.state = InstallState::HALF_INSTALLED; - - write_update(paths, source_paragraph); - status_db->insert(std::make_unique(source_paragraph)); - - std::vector features_spghs; - for (auto&& feature : bcf.features) - { - features_spghs.emplace_back(); - - StatusParagraph& feature_paragraph = features_spghs.back(); - feature_paragraph.package = feature; - feature_paragraph.want = Want::INSTALL; - feature_paragraph.state = InstallState::HALF_INSTALLED; - - write_update(paths, feature_paragraph); - status_db->insert(std::make_unique(feature_paragraph)); - } - - const InstallDir install_dir = InstallDir::from_destination_root( - paths.installed, triplet.to_string(), paths.listfile_path(bcf.core_paragraph)); - - install_files_and_write_listfile(paths.get_filesystem(), package_dir, install_dir); - - source_paragraph.state = InstallState::INSTALLED; - write_update(paths, source_paragraph); - status_db->insert(std::make_unique(source_paragraph)); - - for (auto&& feature_paragraph : features_spghs) - { - feature_paragraph.state = InstallState::INSTALLED; - write_update(paths, feature_paragraph); - status_db->insert(std::make_unique(feature_paragraph)); - } - - return InstallResult::SUCCESS; - } - - using Build::BuildResult; - - BuildResult perform_install_plan_action(const VcpkgPaths& paths, - const InstallPlanAction& action, - const Build::BuildPackageOptions& build_package_options, - StatusParagraphs& status_db) - { - const InstallPlanType& plan_type = action.plan_type; - const std::string display_name = action.spec.to_string(); - const std::string display_name_with_features = - GlobalState::feature_packages ? action.displayname() : display_name; - - const bool is_user_requested = action.request_type == RequestType::USER_REQUESTED; - const bool use_head_version = to_bool(build_package_options.use_head_version); - - if (plan_type == InstallPlanType::ALREADY_INSTALLED) - { - if (use_head_version && is_user_requested) - System::println( - System::Color::warning, "Package %s is already installed -- not building from HEAD", display_name); - else - System::println(System::Color::success, "Package %s is already installed", display_name); - return BuildResult::SUCCEEDED; - } - - if (plan_type == InstallPlanType::BUILD_AND_INSTALL) - { - if (use_head_version) - System::println("Building package %s from HEAD... ", display_name_with_features); - else - System::println("Building package %s... ", display_name_with_features); - - const auto result = [&]() -> Build::ExtendedBuildResult { - if (GlobalState::feature_packages) - { - const Build::BuildPackageConfig build_config{ - *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), - action.spec.triplet(), - paths.port_dir(action.spec), - build_package_options, - action.feature_list}; - return Build::build_package(paths, build_config, status_db); - } - else - { - const Build::BuildPackageConfig build_config{ - action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO), - action.spec.triplet(), - paths.port_dir(action.spec), - build_package_options}; - return Build::build_package(paths, build_config, status_db); - } - }(); - - if (result.code != Build::BuildResult::SUCCEEDED) - { - System::println(System::Color::error, Build::create_error_message(result.code, action.spec)); - return result.code; - } - - System::println("Building package %s... done", display_name_with_features); - - const BinaryControlFile bcf = - Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); - System::println("Installing package %s... ", display_name_with_features); - const auto install_result = install_package(paths, bcf, &status_db); - switch (install_result) - { - case InstallResult::SUCCESS: - System::println(System::Color::success, "Installing package %s... done", display_name); - return BuildResult::SUCCEEDED; - case InstallResult::FILE_CONFLICTS: return BuildResult::FILE_CONFLICTS; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - - if (plan_type == InstallPlanType::INSTALL) - { - if (use_head_version && is_user_requested) - { - System::println( - System::Color::warning, "Package %s is already built -- not building from HEAD", display_name); - } - System::println("Installing package %s... ", display_name); - const auto install_result = install_package( - paths, action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO), &status_db); - switch (install_result) - { - case InstallResult::SUCCESS: - System::println(System::Color::success, "Installing package %s... done", display_name); - return BuildResult::SUCCEEDED; - case InstallResult::FILE_CONFLICTS: return BuildResult::FILE_CONFLICTS; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - - Checks::unreachable(VCPKG_LINE_INFO); - } - - static void print_plan(const std::vector& action_plan, bool is_recursive) - { - std::vector remove_plans; - std::vector rebuilt_plans; - std::vector only_install_plans; - std::vector new_plans; - std::vector already_installed_plans; - - const bool has_non_user_requested_packages = Util::find_if(action_plan, [](const AnyAction& package) -> bool { - if (auto iplan = package.install_plan.get()) - return iplan->request_type != RequestType::USER_REQUESTED; - else - return false; - }) != action_plan.cend(); - - for (auto&& action : action_plan) - { - if (auto install_action = action.install_plan.get()) - { - // remove plans are guaranteed to come before install plans, so we know the plan will be contained if at - // all. - auto it = Util::find_if( - remove_plans, [&](const RemovePlanAction* plan) { return plan->spec == install_action->spec; }); - if (it != remove_plans.end()) - { - rebuilt_plans.emplace_back(install_action); - } - else - { - switch (install_action->plan_type) - { - case InstallPlanType::INSTALL: only_install_plans.emplace_back(install_action); break; - case InstallPlanType::ALREADY_INSTALLED: - if (install_action->request_type == RequestType::USER_REQUESTED) - already_installed_plans.emplace_back(install_action); - break; - case InstallPlanType::BUILD_AND_INSTALL: new_plans.emplace_back(install_action); break; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - } - else if (auto remove_action = action.remove_plan.get()) - { - remove_plans.emplace_back(remove_action); - } - } - - std::sort(remove_plans.begin(), remove_plans.end(), &RemovePlanAction::compare_by_name); - std::sort(rebuilt_plans.begin(), rebuilt_plans.end(), &InstallPlanAction::compare_by_name); - std::sort(only_install_plans.begin(), only_install_plans.end(), &InstallPlanAction::compare_by_name); - std::sort(new_plans.begin(), new_plans.end(), &InstallPlanAction::compare_by_name); - std::sort(already_installed_plans.begin(), already_installed_plans.end(), &InstallPlanAction::compare_by_name); - - if (already_installed_plans.size() > 0) - { - const std::string already_string = - Strings::join("\n", already_installed_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages are already installed:\n%s", already_string); - } - - if (rebuilt_plans.size() > 0) - { - const std::string rebuilt_string = Strings::join("\n", rebuilt_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages will be rebuilt:\n%s", rebuilt_string); - } - - if (new_plans.size() > 0) - { - const std::string new_string = Strings::join("\n", new_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages will be built and installed:\n%s", new_string); - } - - if (only_install_plans.size() > 0) - { - const std::string only_install_string = - Strings::join("\n", only_install_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages will be directly installed:\n%s", only_install_string); - } - - if (has_non_user_requested_packages) - System::println("Additional packages (*) will be installed to complete this operation."); - - if (remove_plans.size() > 0 && !is_recursive) - { - System::println(System::Color::warning, - "If you are sure you want to rebuild the above packages, run the command with the " - "--recurse option"); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - - void perform_and_exit(const std::vector& action_plan, - const Build::BuildPackageOptions& install_plan_options, - const KeepGoing keep_going, - const PrintSummary print_summary, - const VcpkgPaths& paths, - StatusParagraphs& status_db) - { - std::vector results; - std::vector timing; - const ElapsedTime timer = ElapsedTime::create_started(); - size_t counter = 0; - const size_t package_count = action_plan.size(); - - for (const auto& action : action_plan) - { - const ElapsedTime build_timer = ElapsedTime::create_started(); - counter++; - - const std::string display_name = action.spec().to_string(); - System::println("Starting package %d/%d: %s", counter, package_count, display_name); - - timing.push_back("0"); - results.push_back(BuildResult::NULLVALUE); - - if (const auto install_action = action.install_plan.get()) - { - const BuildResult result = - perform_install_plan_action(paths, *install_action, install_plan_options, status_db); - if (result != BuildResult::SUCCEEDED && keep_going == KeepGoing::NO) - { - System::println(Build::create_user_troubleshooting_message(install_action->spec)); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - results.back() = result; - } - else if (const auto remove_action = action.remove_plan.get()) - { - Checks::check_exit(VCPKG_LINE_INFO, GlobalState::feature_packages); - Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, status_db); - } - else - { - Checks::unreachable(VCPKG_LINE_INFO); - } - - timing.back() = build_timer.to_string(); - System::println("Elapsed time for package %s: %s", display_name, build_timer.to_string()); - } - - System::println("Total time taken: %s", timer.to_string()); - - if (print_summary == PrintSummary::YES) - { - for (size_t i = 0; i < results.size(); i++) - { - System::println("%s: %s: %s", action_plan[i].spec(), Build::to_string(results[i]), timing[i]); - } - - std::map summary; - for (const BuildResult& v : Build::BUILD_RESULT_VALUES) - { - summary[v] = 0; - } - - for (const BuildResult& r : results) - { - summary[r]++; - } - - System::println("\n\nSUMMARY"); - for (const std::pair& entry : summary) - { - System::println(" %s: %d", Build::to_string(entry.first), entry.second); - } - } - - Checks::exit_success(VCPKG_LINE_INFO); - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) - { - static const std::string OPTION_DRY_RUN = "--dry-run"; - static const std::string OPTION_USE_HEAD_VERSION = "--head"; - static const std::string OPTION_NO_DOWNLOADS = "--no-downloads"; - static const std::string OPTION_RECURSE = "--recurse"; - static const std::string OPTION_KEEP_GOING = "--keep-going"; - - // input sanitization - static const std::string EXAMPLE = - Commands::Help::create_example_string("install zlib zlib:x64-windows curl boost"); - args.check_min_arg_count(1, EXAMPLE); - - const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_full_package_spec(arg, default_triplet, EXAMPLE); - }); - - for (auto&& spec : specs) - { - Input::check_triplet(spec.package_spec.triplet(), paths); - if (!spec.features.empty() && !GlobalState::feature_packages) - { - Checks::exit_with_message( - VCPKG_LINE_INFO, "Feature packages are experimentally available under the --featurepackages flag."); - } - } - - const std::unordered_set options = args.check_and_get_optional_command_arguments( - {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE, OPTION_KEEP_GOING}); - const bool dry_run = options.find(OPTION_DRY_RUN) != options.cend(); - const bool use_head_version = options.find(OPTION_USE_HEAD_VERSION) != options.cend(); - const bool no_downloads = options.find(OPTION_NO_DOWNLOADS) != options.cend(); - const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); - const KeepGoing keep_going = to_keep_going(options.find(OPTION_KEEP_GOING) != options.cend()); - - // create the plan - StatusParagraphs status_db = database_load_check(paths); - - const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version), - Build::to_allow_downloads(!no_downloads)}; - - std::vector action_plan; - - if (GlobalState::feature_packages) - { - std::unordered_map scf_map; - auto all_ports = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - for (auto&& port : all_ports) - { - scf_map[port->core_paragraph->name] = std::move(*port); - } - action_plan = create_feature_install_plan(scf_map, FullPackageSpec::to_feature_specs(specs), status_db); - } - else - { - Dependencies::PathsPortFile paths_port_file(paths); - auto install_plan = Dependencies::create_install_plan( - paths_port_file, Util::fmap(specs, [](auto&& spec) { return spec.package_spec; }), status_db); - - action_plan = Util::fmap( - install_plan, [](InstallPlanAction& install_action) { return AnyAction(std::move(install_action)); }); - } - - // install plan will be empty if it is already installed - need to change this at status paragraph part - Checks::check_exit(VCPKG_LINE_INFO, !action_plan.empty(), "Install plan cannot be empty"); - - // log the plan - const std::string specs_string = Strings::join(",", action_plan, [](const AnyAction& action) { - if (auto iaction = action.install_plan.get()) - return iaction->spec.to_string(); - else if (auto raction = action.remove_plan.get()) - return "R$" + raction->spec.to_string(); - Checks::unreachable(VCPKG_LINE_INFO); - }); - - Metrics::g_metrics.lock()->track_property("installplan", specs_string); - - print_plan(action_plan, is_recursive); - - if (dry_run) - { - Checks::exit_success(VCPKG_LINE_INFO); - } - - perform_and_exit(action_plan, install_plan_options, keep_going, PrintSummary::NO, paths, status_db); - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/commands_integrate.cpp deleted file mode 100644 index fd2f11294..000000000 --- a/toolsrc/src/commands_integrate.cpp +++ /dev/null @@ -1,342 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Checks.h" -#include "vcpkg_Commands.h" -#include "vcpkg_Files.h" -#include "vcpkg_System.h" -#include "vcpkg_Util.h" - -namespace vcpkg::Commands::Integrate -{ - static const std::array OLD_SYSTEM_TARGET_FILES = { - System::get_program_files_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets", - System::get_program_files_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"}; - static const fs::path SYSTEM_WIDE_TARGETS_FILE = - System::get_program_files_32_bit() / "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props"; - - static std::string create_appdata_targets_shortcut(const std::string& target_path) noexcept - { - return Strings::format(R"###( - - - -)###", - target_path, - target_path); - } - - static std::string create_system_targets_shortcut() noexcept - { - return R"###( - - - - $(LOCALAPPDATA)\vcpkg\vcpkg.user - - - -)###"; - } - - static std::string create_nuget_targets_file_contents(const fs::path& msbuild_vcpkg_targets_file) noexcept - { - const std::string as_string = msbuild_vcpkg_targets_file.string(); - - return Strings::format(R"###( - - - - - - -)###", - as_string, - as_string); - } - - static std::string create_nuget_props_file_contents() noexcept - { - return R"###( - - - true - - -)###"; - } - - static std::string get_nuget_id(const fs::path& vcpkg_root_dir) - { - std::string dir_id = vcpkg_root_dir.generic_string(); - std::replace(dir_id.begin(), dir_id.end(), '/', '.'); - dir_id.erase(1, 1); // Erasing the ":" - - // NuGet id cannot have invalid characters. We will only use alphanumeric and dot. - Util::erase_remove_if(dir_id, [](char c) { return !isalnum(c) && (c != '.'); }); - - const std::string nuget_id = "vcpkg." + dir_id; - return nuget_id; - } - - static std::string create_nuspec_file_contents(const fs::path& vcpkg_root_dir, - const std::string& nuget_id, - const std::string& nupkg_version) - { - static constexpr auto CONTENT_TEMPLATE = R"( - - - @NUGET_ID@ - @VERSION@ - vcpkg - - This package imports all libraries currently installed in @VCPKG_DIR@. This package does not contain any libraries and instead refers to the folder directly (like a symlink). - - - - - - - -)"; - - std::string content = std::regex_replace(CONTENT_TEMPLATE, std::regex("@NUGET_ID@"), nuget_id); - content = std::regex_replace(content, std::regex("@VCPKG_DIR@"), vcpkg_root_dir.string()); - content = std::regex_replace(content, std::regex("@VERSION@"), nupkg_version); - return content; - } - - enum class ElevationPromptChoice - { - YES, - NO - }; - - static ElevationPromptChoice elevated_cmd_execute(const std::string& param) - { - SHELLEXECUTEINFOW sh_ex_info = {0}; - sh_ex_info.cbSize = sizeof(sh_ex_info); - sh_ex_info.fMask = SEE_MASK_NOCLOSEPROCESS; - sh_ex_info.hwnd = nullptr; - sh_ex_info.lpVerb = L"runas"; - sh_ex_info.lpFile = L"cmd"; // Application to start - - auto wparam = Strings::to_utf16(param); - sh_ex_info.lpParameters = wparam.c_str(); // Additional parameters - sh_ex_info.lpDirectory = nullptr; - sh_ex_info.nShow = SW_HIDE; - sh_ex_info.hInstApp = nullptr; - - if (!ShellExecuteExW(&sh_ex_info)) - { - return ElevationPromptChoice::NO; - } - if (sh_ex_info.hProcess == nullptr) - { - return ElevationPromptChoice::NO; - } - WaitForSingleObject(sh_ex_info.hProcess, INFINITE); - CloseHandle(sh_ex_info.hProcess); - return ElevationPromptChoice::YES; - } - - static fs::path get_appdata_targets_path() - { - static const fs::path LOCAL_APP_DATA = - fs::path(System::get_environment_variable(L"LOCALAPPDATA").value_or_exit(VCPKG_LINE_INFO)); - return LOCAL_APP_DATA / "vcpkg" / "vcpkg.user.targets"; - } - - static void integrate_install(const VcpkgPaths& paths) - { - auto& fs = paths.get_filesystem(); - - // TODO: This block of code should eventually be removed - for (auto&& old_system_wide_targets_file : OLD_SYSTEM_TARGET_FILES) - { - if (fs.exists(old_system_wide_targets_file)) - { - const std::string param = - Strings::format(R"(/c DEL "%s" /Q > nul)", old_system_wide_targets_file.string()); - const ElevationPromptChoice user_choice = elevated_cmd_execute(param); - switch (user_choice) - { - case ElevationPromptChoice::YES: break; - case ElevationPromptChoice::NO: - System::println(System::Color::warning, "Warning: Previous integration file was not removed"); - Checks::exit_fail(VCPKG_LINE_INFO); - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - } - - std::error_code ec; - const fs::path tmp_dir = paths.buildsystems / "tmp"; - fs.create_directory(paths.buildsystems, ec); - fs.create_directory(tmp_dir, ec); - - bool should_install_system = true; - const Expected system_wide_file_contents = fs.read_contents(SYSTEM_WIDE_TARGETS_FILE); - static const std::regex RE(R"###()###"); - if (const auto contents_data = system_wide_file_contents.get()) - { - std::match_results match; - const auto found = std::regex_search(*contents_data, match, RE); - if (found) - { - const int ver = atoi(match[1].str().c_str()); - if (ver >= 1) should_install_system = false; - } - } - - if (should_install_system) - { - const fs::path sys_src_path = tmp_dir / "vcpkg.system.targets"; - fs.write_contents(sys_src_path, create_system_targets_shortcut()); - - const std::string param = Strings::format(R"(/c mkdir "%s" & copy "%s" "%s" /Y > nul)", - SYSTEM_WIDE_TARGETS_FILE.parent_path().string(), - sys_src_path.string(), - SYSTEM_WIDE_TARGETS_FILE.string()); - const ElevationPromptChoice user_choice = elevated_cmd_execute(param); - switch (user_choice) - { - case ElevationPromptChoice::YES: break; - case ElevationPromptChoice::NO: - System::println(System::Color::warning, "Warning: integration was not applied"); - Checks::exit_fail(VCPKG_LINE_INFO); - default: Checks::unreachable(VCPKG_LINE_INFO); - } - - Checks::check_exit(VCPKG_LINE_INFO, - fs.exists(SYSTEM_WIDE_TARGETS_FILE), - "Error: failed to copy targets file to %s", - SYSTEM_WIDE_TARGETS_FILE.string()); - } - - const fs::path appdata_src_path = tmp_dir / "vcpkg.user.targets"; - fs.write_contents(appdata_src_path, - create_appdata_targets_shortcut(paths.buildsystems_msbuild_targets.string())); - auto appdata_dst_path = get_appdata_targets_path(); - - const auto rc = fs.copy_file(appdata_src_path, appdata_dst_path, fs::copy_options::overwrite_existing, ec); - - if (!rc || ec) - { - System::println(System::Color::error, - "Error: Failed to copy file: %s -> %s", - appdata_src_path.string(), - appdata_dst_path.string()); - Checks::exit_fail(VCPKG_LINE_INFO); - } - System::println(System::Color::success, "Applied user-wide integration for this vcpkg root."); - const fs::path cmake_toolchain = paths.buildsystems / "vcpkg.cmake"; - System::println("\n" - "All MSBuild C++ projects can now #include any installed libraries.\n" - "Linking will be handled automatically.\n" - "Installing new libraries will make them instantly available.\n" - "\n" - "CMake projects should use -DCMAKE_TOOLCHAIN_FILE=%s", - cmake_toolchain.generic_string()); - - Checks::exit_success(VCPKG_LINE_INFO); - } - - static void integrate_remove(Files::Filesystem& fs) - { - const fs::path path = get_appdata_targets_path(); - - std::error_code ec; - const bool was_deleted = fs.remove(path, ec); - - Checks::check_exit(VCPKG_LINE_INFO, !ec, "Error: Unable to remove user-wide integration: %d", ec.message()); - - if (was_deleted) - { - System::println(System::Color::success, "User-wide integration was removed"); - } - else - { - System::println(System::Color::success, "User-wide integration is not installed"); - } - - Checks::exit_success(VCPKG_LINE_INFO); - } - - static void integrate_project(const VcpkgPaths& paths) - { - auto& fs = paths.get_filesystem(); - - const fs::path& nuget_exe = paths.get_nuget_exe(); - - const fs::path& buildsystems_dir = paths.buildsystems; - const fs::path tmp_dir = buildsystems_dir / "tmp"; - std::error_code ec; - fs.create_directory(buildsystems_dir, ec); - fs.create_directory(tmp_dir, ec); - - const fs::path targets_file_path = tmp_dir / "vcpkg.nuget.targets"; - const fs::path props_file_path = tmp_dir / "vcpkg.nuget.props"; - const fs::path nuspec_file_path = tmp_dir / "vcpkg.nuget.nuspec"; - const std::string nuget_id = get_nuget_id(paths.root); - const std::string nupkg_version = "1.0.0"; - - fs.write_contents(targets_file_path, create_nuget_targets_file_contents(paths.buildsystems_msbuild_targets)); - fs.write_contents(props_file_path, create_nuget_props_file_contents()); - fs.write_contents(nuspec_file_path, create_nuspec_file_contents(paths.root, nuget_id, nupkg_version)); - - // Using all forward slashes for the command line - const std::wstring cmd_line = Strings::wformat(LR"("%s" pack -OutputDirectory "%s" "%s" > nul)", - nuget_exe.native(), - buildsystems_dir.native(), - nuspec_file_path.native()); - - const int exit_code = System::cmd_execute_clean(cmd_line); - - const fs::path nuget_package = buildsystems_dir / Strings::format("%s.%s.nupkg", nuget_id, nupkg_version); - Checks::check_exit( - VCPKG_LINE_INFO, exit_code == 0 && fs.exists(nuget_package), "Error: NuGet package creation failed"); - System::println(System::Color::success, "Created nupkg: %s", nuget_package.string()); - - auto source_path = buildsystems_dir.u8string(); - source_path = std::regex_replace(source_path, std::regex("`"), "``"); - - System::println(R"( -With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: - Install-Package %s -Source "%s" -)", - nuget_id, - source_path); - - Checks::exit_success(VCPKG_LINE_INFO); - } - - const char* const INTEGRATE_COMMAND_HELPSTRING = - " vcpkg integrate install Make installed packages available user-wide. Requires admin privileges on " - "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"; - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - static const std::string EXAMPLE = Strings::format("Commands:\n" - "%s", - INTEGRATE_COMMAND_HELPSTRING); - args.check_exact_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}); - - if (args.command_arguments[0] == "install") - { - return integrate_install(paths); - } - if (args.command_arguments[0] == "remove") - { - return integrate_remove(paths.get_filesystem()); - } - if (args.command_arguments[0] == "project") - { - return integrate_project(paths); - } - - Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown parameter %s for integrate", args.command_arguments[0]); - } -} diff --git a/toolsrc/src/commands_list.cpp b/toolsrc/src/commands_list.cpp deleted file mode 100644 index 640885860..000000000 --- a/toolsrc/src/commands_list.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Commands.h" -#include "vcpkg_System.h" -#include "vcpkglib.h" - -namespace vcpkg::Commands::List -{ - static const std::string OPTION_FULLDESC = "--x-full-desc"; // TODO: This should find a better home, eventually - - static void do_print(const StatusParagraph& pgh, bool full_desc) - { - if (full_desc) - { - System::println("%-30s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description); - } - else - { - System::println("%-30s %-16s %s", - vcpkg::shorten_text(pgh.package.displayname(), 30), - vcpkg::shorten_text(pgh.package.version, 16), - vcpkg::shorten_text(pgh.package.description, 71)); - } - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - static const std::string EXAMPLE = Strings::format( - "The argument should be a substring to search for, or no argument to display all installed libraries.\n%s", - Commands::Help::create_example_string("list png")); - args.check_max_arg_count(1, EXAMPLE); - const std::unordered_set options = - args.check_and_get_optional_command_arguments({OPTION_FULLDESC}); - - const StatusParagraphs status_paragraphs = database_load_check(paths); - std::vector installed_packages = get_installed_ports(status_paragraphs); - - if (installed_packages.empty()) - { - System::println("No packages are installed. Did you mean `search`?"); - Checks::exit_success(VCPKG_LINE_INFO); - } - - std::sort(installed_packages.begin(), - installed_packages.end(), - [](const StatusParagraph* lhs, const StatusParagraph* rhs) -> bool { - return lhs->package.displayname() < rhs->package.displayname(); - }); - - if (args.command_arguments.size() == 0) - { - for (const StatusParagraph* status_paragraph : installed_packages) - { - do_print(*status_paragraph, options.find(OPTION_FULLDESC) != options.cend()); - } - } - else - { - // At this point there is 1 argument - for (const StatusParagraph* status_paragraph : installed_packages) - { - const std::string displayname = status_paragraph->package.displayname(); - if (Strings::case_insensitive_ascii_find(displayname, args.command_arguments[0]) == displayname.end()) - { - continue; - } - - do_print(*status_paragraph, options.find(OPTION_FULLDESC) != options.cend()); - } - } - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_owns.cpp b/toolsrc/src/commands_owns.cpp deleted file mode 100644 index 718a0277f..000000000 --- a/toolsrc/src/commands_owns.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Commands.h" -#include "vcpkg_System.h" -#include "vcpkglib.h" - -namespace vcpkg::Commands::Owns -{ - static void search_file(const VcpkgPaths& paths, const std::string& file_substr, const StatusParagraphs& status_db) - { - const std::vector installed_files = get_installed_files(paths, status_db); - for (const StatusParagraphAndAssociatedFiles& pgh_and_file : installed_files) - { - const StatusParagraph& pgh = pgh_and_file.pgh; - - for (const std::string& file : pgh_and_file.files) - { - if (file.find(file_substr) != std::string::npos) - { - System::println("%s: %s", pgh.package.displayname(), file); - } - } - } - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - static const std::string EXAMPLE = Strings::format("The argument should be a pattern to search for. %s", - Commands::Help::create_example_string("owns zlib.dll")); - args.check_exact_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}); - - StatusParagraphs status_db = database_load_check(paths); - search_file(paths, args.command_arguments[0], status_db); - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_portsdiff.cpp b/toolsrc/src/commands_portsdiff.cpp deleted file mode 100644 index 2334b2270..000000000 --- a/toolsrc/src/commands_portsdiff.cpp +++ /dev/null @@ -1,181 +0,0 @@ -#include "pch.h" - -#include "Paragraphs.h" -#include "SortedVector.h" -#include "vcpkg_Commands.h" -#include "vcpkg_Maps.h" -#include "vcpkg_System.h" - -namespace vcpkg::Commands::PortsDiff -{ - struct UpdatedPort - { - static bool compare_by_name(const UpdatedPort& left, const UpdatedPort& right) - { - return left.port < right.port; - } - - std::string port; - VersionDiff version_diff; - }; - - template - struct SetElementPresence - { - static SetElementPresence create(std::vector left, std::vector right) - { - // TODO: This can be done with one pass instead of three passes - SetElementPresence output; - std::set_difference( - left.cbegin(), left.cend(), right.cbegin(), right.cend(), std::back_inserter(output.only_left)); - std::set_intersection( - left.cbegin(), left.cend(), right.cbegin(), right.cend(), std::back_inserter(output.both)); - std::set_difference( - right.cbegin(), right.cend(), left.cbegin(), left.cend(), std::back_inserter(output.only_right)); - - return output; - } - - std::vector only_left; - std::vector both; - std::vector only_right; - }; - - static std::vector find_updated_ports( - const std::vector& ports, - const std::map& previous_names_and_versions, - const std::map& current_names_and_versions) - { - std::vector output; - for (const std::string& name : ports) - { - const VersionT& previous_version = previous_names_and_versions.at(name); - const VersionT& current_version = current_names_and_versions.at(name); - if (previous_version == current_version) - { - continue; - } - - output.push_back({name, VersionDiff(previous_version, current_version)}); - } - - return output; - } - - static void do_print_name_and_version(const std::vector& ports_to_print, - const std::map& names_and_versions) - { - for (const std::string& name : ports_to_print) - { - const VersionT& version = names_and_versions.at(name); - System::println(" - %-14s %-16s", name, version); - } - } - - static std::map read_ports_from_commit(const VcpkgPaths& paths, - const std::wstring& git_commit_id) - { - std::error_code ec; - auto& fs = paths.get_filesystem(); - const fs::path& git_exe = paths.get_git_exe(); - const fs::path dot_git_dir = paths.root / ".git"; - const std::wstring ports_dir_name_as_string = paths.ports.filename().native(); - const fs::path temp_checkout_path = - paths.root / Strings::wformat(L"%s-%s", ports_dir_name_as_string, git_commit_id); - fs.create_directory(temp_checkout_path, ec); - const std::wstring checkout_this_dir = - Strings::wformat(LR"(.\%s)", ports_dir_name_as_string); // Must be relative to the root of the repository - - const std::wstring cmd = - Strings::wformat(LR"("%s" --git-dir="%s" --work-tree="%s" checkout %s -f -q -- %s %s & "%s" reset >NUL)", - git_exe.native(), - dot_git_dir.native(), - temp_checkout_path.native(), - git_commit_id, - checkout_this_dir, - L".vcpkg-root", - git_exe.native()); - System::cmd_execute_clean(cmd); - const std::map names_and_versions = Paragraphs::load_all_port_names_and_versions( - paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string); - fs.remove_all(temp_checkout_path, ec); - return names_and_versions; - } - - static void check_commit_exists(const fs::path& git_exe, const std::wstring& git_commit_id) - { - static const std::string VALID_COMMIT_OUTPUT = "commit\n"; - - const std::wstring cmd = Strings::wformat(LR"("%s" cat-file -t %s)", git_exe.native(), git_commit_id); - const System::ExitCodeAndOutput output = System::cmd_execute_and_capture_output(cmd); - Checks::check_exit(VCPKG_LINE_INFO, - output.output == VALID_COMMIT_OUTPUT, - "Invalid commit id %s", - Strings::to_utf8(git_commit_id)); - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - static const std::string EXAMPLE = - Strings::format("The argument should be a branch/tag/hash to checkout.\n%s", - Commands::Help::create_example_string("portsdiff mybranchname")); - args.check_min_arg_count(1, EXAMPLE); - args.check_max_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}); - - const fs::path& git_exe = paths.get_git_exe(); - - const std::wstring git_commit_id_for_previous_snapshot = Strings::to_utf16(args.command_arguments.at(0)); - const std::wstring git_commit_id_for_current_snapshot = - args.command_arguments.size() < 2 ? L"HEAD" : Strings::to_utf16(args.command_arguments.at(1)); - - check_commit_exists(git_exe, git_commit_id_for_current_snapshot); - check_commit_exists(git_exe, git_commit_id_for_previous_snapshot); - - const std::map current_names_and_versions = - read_ports_from_commit(paths, git_commit_id_for_current_snapshot); - const std::map previous_names_and_versions = - read_ports_from_commit(paths, git_commit_id_for_previous_snapshot); - - // Already sorted, so set_difference can work on std::vector too - const std::vector current_ports = Maps::extract_keys(current_names_and_versions); - const std::vector previous_ports = Maps::extract_keys(previous_names_and_versions); - - const SetElementPresence setp = - SetElementPresence::create(current_ports, previous_ports); - - const std::vector& added_ports = setp.only_left; - if (!added_ports.empty()) - { - System::println("\nThe following %d ports were added:", added_ports.size()); - do_print_name_and_version(added_ports, current_names_and_versions); - } - - const std::vector& removed_ports = setp.only_right; - if (!removed_ports.empty()) - { - System::println("\nThe following %d ports were removed:", removed_ports.size()); - do_print_name_and_version(removed_ports, previous_names_and_versions); - } - - const std::vector& common_ports = setp.both; - const std::vector updated_ports = - find_updated_ports(common_ports, previous_names_and_versions, current_names_and_versions); - - if (!updated_ports.empty()) - { - System::println("\nThe following %d ports were updated:", updated_ports.size()); - for (const UpdatedPort& p : updated_ports) - { - System::println(" - %-14s %-16s", p.port, p.version_diff.to_string()); - } - } - - if (added_ports.empty() && removed_ports.empty() && updated_ports.empty()) - { - System::println("There were no changes in the ports between the two commits."); - } - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp deleted file mode 100644 index a9f1b2564..000000000 --- a/toolsrc/src/commands_remove.cpp +++ /dev/null @@ -1,249 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Commands.h" -#include "vcpkg_Dependencies.h" -#include "vcpkg_Input.h" -#include "vcpkg_System.h" -#include "vcpkg_Util.h" -#include "vcpkglib.h" - -namespace vcpkg::Commands::Remove -{ - using Dependencies::RemovePlanAction; - using Dependencies::RemovePlanType; - using Dependencies::RequestType; - using Update::OutdatedPackage; - - void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db) - { - auto& fs = paths.get_filesystem(); - auto spghs = status_db->find_all(spec.name(), spec.triplet()); - const auto core_pkg = **status_db->find(spec.name(), spec.triplet(), Strings::EMPTY); - - for (auto&& spgh : spghs) - { - StatusParagraph& pkg = **spgh; - if (pkg.state != InstallState::INSTALLED) continue; - pkg.want = Want::PURGE; - pkg.state = InstallState::HALF_INSTALLED; - write_update(paths, pkg); - } - - auto maybe_lines = fs.read_lines(paths.listfile_path(core_pkg.package)); - - if (const auto lines = maybe_lines.get()) - { - std::vector dirs_touched; - for (auto&& suffix : *lines) - { - if (!suffix.empty() && suffix.back() == '\r') suffix.pop_back(); - - std::error_code ec; - - auto target = paths.installed / suffix; - - const auto status = fs.status(target, ec); - if (ec) - { - System::println(System::Color::error, "failed: %s", ec.message()); - continue; - } - - if (fs::is_directory(status)) - { - dirs_touched.push_back(target); - } - else if (fs::is_regular_file(status)) - { - fs.remove(target, ec); - if (ec) - { - System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); - } - } - else if (!fs::status_known(status)) - { - System::println(System::Color::warning, "Warning: unknown status: %s", target.u8string()); - } - else - { - System::println(System::Color::warning, "Warning: %s: cannot handle file type", target.u8string()); - } - } - - auto b = dirs_touched.rbegin(); - const auto e = dirs_touched.rend(); - for (; b != e; ++b) - { - if (fs.is_empty(*b)) - { - std::error_code ec; - fs.remove(*b, ec); - if (ec) - { - System::println(System::Color::error, "failed: %s", ec.message()); - } - } - } - - fs.remove(paths.listfile_path(core_pkg.package)); - } - - for (auto&& spgh : spghs) - { - StatusParagraph& pkg = **spgh; - if (pkg.state != InstallState::HALF_INSTALLED) continue; - pkg.state = InstallState::NOT_INSTALLED; - write_update(paths, pkg); - } - } - - static void print_plan(const std::map>& group_by_plan_type) - { - static constexpr std::array ORDER = {RemovePlanType::NOT_INSTALLED, RemovePlanType::REMOVE}; - - for (const RemovePlanType plan_type : ORDER) - { - const auto it = group_by_plan_type.find(plan_type); - if (it == group_by_plan_type.cend()) - { - continue; - } - - std::vector cont = it->second; - std::sort(cont.begin(), cont.end(), &RemovePlanAction::compare_by_name); - const std::string as_string = Strings::join("\n", cont, [](const RemovePlanAction* p) { - return Dependencies::to_output_string(p->request_type, p->spec.to_string()); - }); - - switch (plan_type) - { - case RemovePlanType::NOT_INSTALLED: - System::println("The following packages are not installed, so not removed:\n%s", as_string); - continue; - case RemovePlanType::REMOVE: - System::println("The following packages will be removed:\n%s", as_string); - continue; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - } - - void perform_remove_plan_action(const VcpkgPaths& paths, - const RemovePlanAction& action, - const Purge purge, - StatusParagraphs& status_db) - { - const std::string display_name = action.spec.to_string(); - - switch (action.plan_type) - { - case RemovePlanType::NOT_INSTALLED: - System::println(System::Color::success, "Package %s is not installed", display_name); - break; - case RemovePlanType::REMOVE: - System::println("Removing package %s... ", display_name); - remove_package(paths, action.spec, &status_db); - System::println(System::Color::success, "Removing package %s... done", display_name); - break; - case RemovePlanType::UNKNOWN: - default: Checks::unreachable(VCPKG_LINE_INFO); - } - - if (purge == Purge::YES) - { - System::println("Purging package %s... ", display_name); - Files::Filesystem& fs = paths.get_filesystem(); - std::error_code ec; - fs.remove_all(paths.packages / action.spec.dir(), ec); - System::println(System::Color::success, "Purging package %s... done", display_name); - } - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) - { - static const std::string OPTION_PURGE = "--purge"; - static const std::string OPTION_NO_PURGE = "--no-purge"; - static const std::string OPTION_RECURSE = "--recurse"; - static const std::string OPTION_DRY_RUN = "--dry-run"; - static const std::string OPTION_OUTDATED = "--outdated"; - static const std::string EXAMPLE = - Commands::Help::create_example_string("remove zlib zlib:x64-windows curl boost"); - const std::unordered_set options = args.check_and_get_optional_command_arguments( - {OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED}); - - StatusParagraphs status_db = database_load_check(paths); - std::vector specs; - if (options.find(OPTION_OUTDATED) != options.cend()) - { - args.check_exact_arg_count(0, EXAMPLE); - specs = Util::fmap(Update::find_outdated_packages(paths, status_db), - [](auto&& outdated) { return outdated.spec; }); - - if (specs.empty()) - { - System::println(System::Color::success, "There are no outdated packages."); - Checks::exit_success(VCPKG_LINE_INFO); - } - } - else - { - args.check_min_arg_count(1, EXAMPLE); - specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, EXAMPLE); - }); - - for (auto&& spec : specs) - Input::check_triplet(spec.triplet(), paths); - } - - const bool no_purge_was_passed = options.find(OPTION_NO_PURGE) != options.end(); - const bool purge_was_passed = options.find(OPTION_PURGE) != options.end(); - if (purge_was_passed && no_purge_was_passed) - { - System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge."); - System::print(EXAMPLE); - Checks::exit_fail(VCPKG_LINE_INFO); - } - const Purge purge = to_purge(purge_was_passed || !no_purge_was_passed); - const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); - const bool dry_run = options.find(OPTION_DRY_RUN) != options.cend(); - - const std::vector remove_plan = Dependencies::create_remove_plan(specs, status_db); - Checks::check_exit(VCPKG_LINE_INFO, !remove_plan.empty(), "Remove plan cannot be empty"); - - std::map> group_by_plan_type; - Util::group_by(remove_plan, &group_by_plan_type, [](const RemovePlanAction& p) { return p.plan_type; }); - print_plan(group_by_plan_type); - - const bool has_non_user_requested_packages = - Util::find_if(remove_plan, [](const RemovePlanAction& package) -> bool { - return package.request_type != RequestType::USER_REQUESTED; - }) != remove_plan.cend(); - - if (has_non_user_requested_packages) - { - System::println(System::Color::warning, - "Additional packages (*) need to be removed to complete this operation."); - - if (!is_recursive) - { - System::println(System::Color::warning, - "If you are sure you want to remove them, run the command with the --recurse option"); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - - if (dry_run) - { - Checks::exit_success(VCPKG_LINE_INFO); - } - - for (const RemovePlanAction& action : remove_plan) - { - perform_remove_plan_action(paths, action, purge, status_db); - } - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_search.cpp b/toolsrc/src/commands_search.cpp deleted file mode 100644 index d35a546c4..000000000 --- a/toolsrc/src/commands_search.cpp +++ /dev/null @@ -1,145 +0,0 @@ -#include "pch.h" - -#include "Paragraphs.h" -#include "SourceParagraph.h" -#include "vcpkg_Commands.h" -#include "vcpkg_GlobalState.h" -#include "vcpkg_System.h" -#include "vcpkglib.h" - -namespace vcpkg::Commands::Search -{ - static const std::string OPTION_GRAPH = "--graph"; // TODO: This should find a better home, eventually - static const std::string OPTION_FULLDESC = "--x-full-desc"; // TODO: This should find a better home, eventually - - static std::string replace_dashes_with_underscore(const std::string& input) - { - std::string output = input; - std::replace(output.begin(), output.end(), '-', '_'); - return output; - } - - static std::string create_graph_as_string( - const std::vector>& source_control_files) - { - int empty_node_count = 0; - - std::string s; - s.append("digraph G{ rankdir=LR; edge [minlen=3]; overlap=false;"); - - for (const auto& source_control_file : source_control_files) - { - const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; - if (source_paragraph.depends.empty()) - { - empty_node_count++; - continue; - } - - const std::string name = replace_dashes_with_underscore(source_paragraph.name); - s.append(Strings::format("%s;", name)); - for (const Dependency& d : source_paragraph.depends) - { - const std::string dependency_name = replace_dashes_with_underscore(d.name()); - s.append(Strings::format("%s -> %s;", name, dependency_name)); - } - } - - s.append(Strings::format("empty [label=\"%d singletons...\"]; }", empty_node_count)); - return s; - } - static void do_print(const SourceParagraph& source_paragraph, bool full_desc) - { - if (full_desc) - { - System::println( - "%-20s %-16s %s", source_paragraph.name, source_paragraph.version, source_paragraph.description); - } - else - { - System::println("%-20s %-16s %s", - vcpkg::shorten_text(source_paragraph.name, 20), - vcpkg::shorten_text(source_paragraph.version, 16), - vcpkg::shorten_text(source_paragraph.description, 81)); - } - } - - static void do_print(const std::string& name, const FeatureParagraph& feature_paragraph, bool full_desc) - { - if (full_desc) - { - System::println("%-37s %s", name + "[" + feature_paragraph.name + "]", feature_paragraph.description); - } - else - { - System::println("%-37s %s", - vcpkg::shorten_text(name + "[" + feature_paragraph.name + "]", 37), - vcpkg::shorten_text(feature_paragraph.description, 81)); - } - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - static const std::string EXAMPLE = Strings::format( - "The argument should be a substring to search for, or no argument to display all libraries.\n%s", - Commands::Help::create_example_string("search png")); - args.check_max_arg_count(1, EXAMPLE); - const std::unordered_set options = - args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}); - - auto source_paragraphs = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - - if (options.find(OPTION_GRAPH) != options.cend()) - { - const std::string graph_as_string = create_graph_as_string(source_paragraphs); - System::println(graph_as_string); - Checks::exit_success(VCPKG_LINE_INFO); - } - - if (args.command_arguments.empty()) - { - for (const auto& source_control_file : source_paragraphs) - { - do_print(*source_control_file->core_paragraph, options.find(OPTION_FULLDESC) != options.cend()); - for (auto&& feature_paragraph : source_control_file->feature_paragraphs) - { - do_print(source_control_file->core_paragraph->name, - *feature_paragraph, - options.find(OPTION_FULLDESC) != options.cend()); - } - } - } - else - { - const auto& icontains = Strings::case_insensitive_ascii_contains; - - // At this point there is 1 argument - auto&& args_zero = args.command_arguments[0]; - for (const auto& source_control_file : source_paragraphs) - { - auto&& sp = *source_control_file->core_paragraph; - - bool contains_name = icontains(sp.name, args_zero); - if (contains_name || icontains(sp.description, args_zero)) - { - do_print(sp, options.find(OPTION_FULLDESC) != options.cend()); - } - - for (auto&& feature_paragraph : source_control_file->feature_paragraphs) - { - if (contains_name || icontains(feature_paragraph->name, args_zero) || - icontains(feature_paragraph->description, args_zero)) - { - do_print(sp.name, *feature_paragraph, options.find(OPTION_FULLDESC) != options.cend()); - } - } - } - } - - System::println( - "\nIf your library is not listed, please open an issue at and/or consider making a pull request:\n" - " https://github.com/Microsoft/vcpkg/issues"); - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp deleted file mode 100644 index 71ea4b063..000000000 --- a/toolsrc/src/commands_update.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#include "pch.h" - -#include "Paragraphs.h" -#include "vcpkg_Commands.h" -#include "vcpkg_System.h" -#include "vcpkglib.h" - -namespace vcpkg::Commands::Update -{ - bool OutdatedPackage::compare_by_name(const OutdatedPackage& left, const OutdatedPackage& right) - { - return left.spec.name() < right.spec.name(); - } - - std::vector find_outdated_packages(const VcpkgPaths& paths, const StatusParagraphs& status_db) - { - const std::map src_names_to_versions = - Paragraphs::load_all_port_names_and_versions(paths.get_filesystem(), paths.ports); - const std::vector installed_packages = get_installed_ports(status_db); - - std::vector output; - for (const StatusParagraph* pgh : installed_packages) - { - const auto it = src_names_to_versions.find(pgh->package.spec.name()); - if (it == src_names_to_versions.end()) - { - // Package was not installed from portfile - continue; - } - if (it->second != pgh->package.version) - { - output.push_back({pgh->package.spec, VersionDiff(pgh->package.version, it->second)}); - } - } - - return output; - } - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) - { - args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}); - System::println("Using local portfile versions. To update the local portfiles, use `git pull`."); - - const StatusParagraphs status_db = database_load_check(paths); - - const auto outdated_packages = - SortedVector(find_outdated_packages(paths, status_db), &OutdatedPackage::compare_by_name); - - if (outdated_packages.empty()) - { - System::println("No packages need updating."); - } - else - { - std::string install_line; - System::println("The following packages differ from their port versions:"); - for (auto&& package : outdated_packages) - { - install_line += package.spec.to_string(); - install_line += " "; - System::println(" %-32s %s", package.spec, package.version_diff.to_string()); - } - System::println("\n" - "To update these packages, run\n" - " .\\vcpkg remove --outdated\n" - " .\\vcpkg install " + - install_line); - } - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/commands_version.cpp b/toolsrc/src/commands_version.cpp deleted file mode 100644 index 5744ea9ef..000000000 --- a/toolsrc/src/commands_version.cpp +++ /dev/null @@ -1,67 +0,0 @@ -#include "pch.h" - -#include "metrics.h" -#include "vcpkg_Commands.h" -#include "vcpkg_System.h" - -#define STRINGIFY(...) #__VA_ARGS__ -#define MACRO_TO_STRING(X) STRINGIFY(X) - -#define VCPKG_VERSION_AS_STRING MACRO_TO_STRING(VCPKG_VERSION) - -namespace vcpkg::Commands::Version -{ - const std::string& version() - { - static const std::string S_VERSION = -#include "../VERSION.txt" - - +std::string(VCPKG_VERSION_AS_STRING) -#ifndef NDEBUG - + std::string("-debug") -#endif - + std::string(Metrics::get_compiled_metrics_enabled() ? Strings::EMPTY : "-external"); - return S_VERSION; - } - - void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths) - { - auto version_file = paths.get_filesystem().read_contents(paths.root / "toolsrc" / "VERSION.txt"); - if (const auto version_contents = version_file.get()) - { - int maj1, min1, rev1; - const auto num1 = sscanf_s(version_contents->c_str(), "\"%d.%d.%d\"", &maj1, &min1, &rev1); - - int maj2, min2, rev2; - const auto num2 = sscanf_s(Version::version().c_str(), "%d.%d.%d-", &maj2, &min2, &rev2); - - if (num1 == 3 && num2 == 3) - { - if (maj1 != maj2 || min1 != min2 || rev1 != rev2) - { - System::println(System::Color::warning, - "Warning: Different source is available for vcpkg (%d.%d.%d -> %d.%d.%d). Use " - ".\\bootstrap-vcpkg.bat to update.", - maj2, - min2, - rev2, - maj1, - min1, - rev1); - } - } - } - } - - void perform_and_exit(const VcpkgCmdArguments& args) - { - args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}); - - System::println("Vcpkg package management program version %s\n" - "\n" - "See LICENSE.txt for license information.", - version()); - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/metrics.cpp deleted file mode 100644 index 8a0050bfc..000000000 --- a/toolsrc/src/metrics.cpp +++ /dev/null @@ -1,395 +0,0 @@ -#include "pch.h" - -#include "filesystem_fs.h" -#include "metrics.h" -#include "vcpkg_Files.h" -#include "vcpkg_Strings.h" -#include "vcpkg_System.h" - -namespace vcpkg::Metrics -{ - Util::LockGuarded g_metrics; - - static std::string get_current_date_time() - { - struct tm newtime; - std::array date; - date.fill(0); - - struct _timeb timebuffer; - - _ftime_s(&timebuffer); - time_t now = timebuffer.time; - const int milli = timebuffer.millitm; - - const errno_t err = gmtime_s(&newtime, &now); - if (err) - { - return Strings::EMPTY; - } - - strftime(&date[0], date.size(), "%Y-%m-%dT%H:%M:%S", &newtime); - return std::string(&date[0]) + "." + std::to_string(milli) + "Z"; - } - - static std::string generate_random_UUID() - { - int part_sizes[] = {8, 4, 4, 4, 12}; - char uuid[37]; - memset(uuid, 0, sizeof(uuid)); - int num; - srand(static_cast(time(nullptr))); - int index = 0; - for (int part = 0; part < 5; part++) - { - if (part > 0) - { - uuid[index] = '-'; - index++; - } - - // Generating UUID format version 4 - // http://en.wikipedia.org/wiki/Universally_unique_identifier - for (int i = 0; i < part_sizes[part]; i++, index++) - { - if (part == 2 && i == 0) - { - num = 4; - } - else if (part == 4 && i == 0) - { - num = (rand() % 4) + 8; - } - else - { - num = rand() % 16; - } - - if (num < 10) - { - uuid[index] = static_cast('0' + num); - } - else - { - uuid[index] = static_cast('a' + (num - 10)); - } - } - } - - return uuid; - } - - static const std::string& get_session_id() - { - static const std::string ID = generate_random_UUID(); - return ID; - } - - static std::string to_json_string(const std::string& str) - { - std::string encoded = "\""; - for (auto&& ch : str) - { - if (ch == '\\') - { - encoded.append("\\\\"); - } - else if (ch == '"') - { - encoded.append("\\\""); - } - else if (ch < 0x20 || ch >= 0x80) - { - // Note: this treats incoming Strings as Latin-1 - static constexpr const char HEX[16] = { - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; - encoded.append("\\u00"); - encoded.push_back(HEX[ch / 16]); - encoded.push_back(HEX[ch % 16]); - } - else - { - encoded.push_back(ch); - } - } - encoded.push_back('"'); - return encoded; - } - - static std::string get_os_version_string() - { - std::wstring path; - path.resize(MAX_PATH); - const auto n = GetSystemDirectoryW(&path[0], static_cast(path.size())); - path.resize(n); - path += L"\\kernel32.dll"; - - const auto versz = GetFileVersionInfoSizeW(path.c_str(), nullptr); - if (versz == 0) return Strings::EMPTY; - - std::vector verbuf; - verbuf.resize(versz); - - if (!GetFileVersionInfoW(path.c_str(), 0, static_cast(verbuf.size()), &verbuf[0])) return Strings::EMPTY; - - void* rootblock; - UINT rootblocksize; - if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return Strings::EMPTY; - - auto rootblock_ffi = static_cast(rootblock); - - return Strings::format("%d.%d.%d", - static_cast(HIWORD(rootblock_ffi->dwProductVersionMS)), - static_cast(LOWORD(rootblock_ffi->dwProductVersionMS)), - static_cast(HIWORD(rootblock_ffi->dwProductVersionLS))); - } - - struct MetricMessage - { - std::string user_id = generate_random_UUID(); - std::string user_timestamp; - std::string timestamp = get_current_date_time(); - std::string properties; - std::string measurements; - - void track_property(const std::string& name, const std::string& value) - { - if (properties.size() != 0) properties.push_back(','); - properties.append(to_json_string(name)); - properties.push_back(':'); - properties.append(to_json_string(value)); - } - - void track_metric(const std::string& name, double value) - { - if (measurements.size() != 0) measurements.push_back(','); - measurements.append(to_json_string(name)); - measurements.push_back(':'); - measurements.append(std::to_string(value)); - } - - std::string format_event_data_template() const - { - const std::string& session_id = get_session_id(); - return Strings::format(R"([{ - "ver": 1, - "name": "Microsoft.ApplicationInsights.Event", - "time": "%s", - "sampleRate": 100.000000, - "seq": "0:0", - "iKey": "b4e88960-4393-4dd9-ab8e-97e8fe6d7603", - "flags": 0.000000, - "tags": { - "ai.device.os": "Windows", - "ai.device.osVersion": "%s", - "ai.session.id": "%s", - "ai.user.id": "%s", - "ai.user.accountAcquisitionDate": "%s" - }, - "data": { - "baseType": "EventData", - "baseData": { - "ver": 2, - "name": "commandline_test7", - "properties": { %s }, - "measurements": { %s } - } - } -}])", - timestamp, - get_os_version_string(), - session_id, - user_id, - user_timestamp, - properties, - measurements); - } - }; - - static MetricMessage g_metricmessage; - static bool g_should_send_metrics = -#if defined(NDEBUG) && (DISABLE_METRICS == 0) - true -#else - false -#endif - ; - static bool g_should_print_metrics = false; - - bool get_compiled_metrics_enabled() { return DISABLE_METRICS == 0; } - - std::wstring get_SQM_user() - { - auto hkcu_sqmclient = - System::get_registry_string(HKEY_CURRENT_USER, LR"(Software\Microsoft\SQMClient)", L"UserId"); - return hkcu_sqmclient.value_or(L"{}"); - } - - void Metrics::set_user_information(const std::string& user_id, const std::string& first_use_time) - { - g_metricmessage.user_id = user_id; - g_metricmessage.user_timestamp = first_use_time; - } - - void Metrics::init_user_information(std::string& user_id, std::string& first_use_time) - { - user_id = generate_random_UUID(); - first_use_time = get_current_date_time(); - } - - void Metrics::set_send_metrics(bool should_send_metrics) { g_should_send_metrics = should_send_metrics; } - - void Metrics::set_print_metrics(bool should_print_metrics) { g_should_print_metrics = should_print_metrics; } - - void Metrics::track_metric(const std::string& name, double value) { g_metricmessage.track_metric(name, value); } - - void Metrics::track_property(const std::string& name, const std::wstring& value) - { - // Note: this is not valid UTF-16 -> UTF-8, it just yields a close enough approximation for our purposes. - std::string converted_value; - converted_value.resize(value.size()); - std::transform( - value.begin(), value.end(), converted_value.begin(), [](wchar_t ch) { return static_cast(ch); }); - - g_metricmessage.track_property(name, converted_value); - } - - void Metrics::track_property(const std::string& name, const std::string& value) - { - g_metricmessage.track_property(name, value); - } - - void Metrics::upload(const std::string& payload) - { - HINTERNET connect = nullptr, request = nullptr; - BOOL results = FALSE; - - const HINTERNET session = WinHttpOpen( - L"vcpkg/1.0", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); - if (session) connect = WinHttpConnect(session, L"dc.services.visualstudio.com", INTERNET_DEFAULT_HTTPS_PORT, 0); - - if (connect) - request = WinHttpOpenRequest(connect, - L"POST", - L"/v2/track", - nullptr, - WINHTTP_NO_REFERER, - WINHTTP_DEFAULT_ACCEPT_TYPES, - WINHTTP_FLAG_SECURE); - - if (request) - { - if (MAXDWORD <= payload.size()) abort(); - std::wstring hdrs = L"Content-Type: application/json\r\n"; - std::string& p = const_cast(payload); - results = WinHttpSendRequest(request, - hdrs.c_str(), - static_cast(hdrs.size()), - static_cast(&p[0]), - static_cast(payload.size()), - static_cast(payload.size()), - 0); - } - - if (results) - { - results = WinHttpReceiveResponse(request, nullptr); - } - - DWORD http_code = 0, junk = sizeof(DWORD); - - if (results) - { - results = WinHttpQueryHeaders(request, - WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, - nullptr, - &http_code, - &junk, - WINHTTP_NO_HEADER_INDEX); - } - - std::vector response_buffer; - if (results) - { - DWORD available_data = 0, read_data = 0, total_data = 0; - while ((results = WinHttpQueryDataAvailable(request, &available_data)) == TRUE && available_data > 0) - { - response_buffer.resize(response_buffer.size() + available_data); - - results = WinHttpReadData(request, &response_buffer.data()[total_data], available_data, &read_data); - - if (!results) - { - break; - } - - total_data += read_data; - - response_buffer.resize(total_data); - } - } - - if (!results) - { -#ifndef NDEBUG - __debugbreak(); - auto err = GetLastError(); - std::cerr << "[DEBUG] failed to connect to server: " << err << "\n"; -#endif - } - - if (request) WinHttpCloseHandle(request); - if (connect) WinHttpCloseHandle(connect); - if (session) WinHttpCloseHandle(session); - } - - static fs::path get_bindir() - { - wchar_t buf[_MAX_PATH]; - const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); - if (bytes == 0) std::abort(); - return fs::path(buf, buf + bytes); - } - - void Metrics::flush() - { - const std::string payload = g_metricmessage.format_event_data_template(); - if (g_should_print_metrics) std::cerr << payload << "\n"; - if (!g_should_send_metrics) return; - - // upload(payload); - - wchar_t temp_folder[MAX_PATH]; - GetTempPathW(MAX_PATH, temp_folder); - - const fs::path temp_folder_path = temp_folder; - const fs::path temp_folder_path_exe = temp_folder_path / "vcpkgmetricsuploader.exe"; - - auto& fs = Files::get_real_filesystem(); - - if (true) - { - const fs::path exe_path = [&fs]() -> fs::path { - auto vcpkgdir = get_bindir().parent_path(); - auto path = vcpkgdir / "vcpkgmetricsuploader.exe"; - if (fs.exists(path)) return path; - - path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe"; - if (fs.exists(path)) return path; - - return Strings::WEMPTY; - }(); - - std::error_code ec; - fs.copy_file(exe_path, temp_folder_path_exe, fs::copy_options::skip_existing, ec); - if (ec) return; - } - - const fs::path vcpkg_metrics_txt_path = temp_folder_path / ("vcpkg" + generate_random_UUID() + ".txt"); - fs.write_contents(vcpkg_metrics_txt_path, payload); - - const std::wstring cmd_line = - Strings::wformat(L"start %s %s", temp_folder_path_exe.native(), vcpkg_metrics_txt_path.native()); - System::cmd_execute_clean(cmd_line); - } -} diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp deleted file mode 100644 index 6c9311264..000000000 --- a/toolsrc/src/test_install_plan.cpp +++ /dev/null @@ -1,486 +0,0 @@ -#include "CppUnitTest.h" -#include "vcpkg_Dependencies.h" -#include "vcpkg_Util.h" - -using namespace Microsoft::VisualStudio::CppUnitTestFramework; - -using namespace vcpkg; - -namespace Microsoft::VisualStudio::CppUnitTestFramework -{ - template<> - inline std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t) - { - switch (t) - { - case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; - case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; - case Dependencies::InstallPlanType::INSTALL: return L"INSTALL"; - case Dependencies::InstallPlanType::UNKNOWN: return L"UNKNOWN"; - default: return ToString((int)t); - } - } - - template<> - inline std::wstring ToString(const vcpkg::Dependencies::RequestType& t) - { - switch (t) - { - case Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED"; - case Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED"; - case Dependencies::RequestType::UNKNOWN: return L"UNKNOWN"; - default: return ToString((int)t); - } - } -} - -namespace UnitTest1 -{ - class InstallPlanTests : public TestClass - { - static std::unique_ptr make_control_file( - const char* name, - const char* depends, - const std::vector>& features = {}) - { - using Pgh = std::unordered_map; - std::vector scf_pghs; - scf_pghs.push_back(Pgh{ - {"Source", name}, - {"Version", "0"}, - {"Build-Depends", depends}, - }); - for (auto&& feature : features) - { - scf_pghs.push_back(Pgh{ - {"Feature", feature.first}, - {"Description", "feature"}, - {"Build-Depends", feature.second}, - }); - } - auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(scf_pghs)); - Assert::IsTrue(m_pgh.has_value()); - return std::move(*m_pgh.get()); - } - - static void features_check(Dependencies::AnyAction* install_action, - std::string pkg_name, - std::vector vec, - const Triplet& triplet = Triplet::X86_WINDOWS) - { - const auto& plan = install_action->install_plan.value_or_exit(VCPKG_LINE_INFO); - const auto& feature_list = plan.feature_list; - - Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); - - Assert::AreEqual(pkg_name.c_str(), - (*plan.any_paragraph.source_control_file.get())->core_paragraph->name.c_str()); - Assert::AreEqual(size_t(vec.size()), feature_list.size()); - - for (auto&& feature_name : vec) - { - if (feature_name == "core" || feature_name == "") - { - Assert::IsTrue(Util::find(feature_list, "core") != feature_list.end() || - Util::find(feature_list, "") != feature_list.end()); - continue; - } - Assert::IsTrue(Util::find(feature_list, feature_name) != feature_list.end()); - } - } - - static void remove_plan_check(Dependencies::AnyAction* remove_action, - std::string pkg_name, - const Triplet& triplet = Triplet::X86_WINDOWS) - { - const auto& plan = remove_action->remove_plan.value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); - Assert::AreEqual(pkg_name.c_str(), plan.spec.name().c_str()); - } - - static std::unique_ptr make_status_pgh(const char* name, const char* depends = "") - { - using Pgh = std::unordered_map; - return std::make_unique(Pgh{{"Package", name}, - {"Version", "1"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", depends}, - {"Status", "install ok installed"}}); - } - static std::unique_ptr make_status_feature_pgh(const char* name, - const char* feature, - const char* depends = "") - { - using Pgh = std::unordered_map; - return std::make_unique(Pgh{{"Package", name}, - {"Version", "1"}, - {"Feature", feature}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", depends}, - {"Status", "install ok installed"}}); - } - struct PackageSpecMap - { - std::unordered_map map; - Triplet triplet; - PackageSpecMap(const Triplet& t) { triplet = t; } - - PackageSpec emplace(const char* name, - const char* depends = "", - const std::vector>& features = {}) - { - return emplace(std::move(*make_control_file(name, depends, features))); - } - PackageSpec emplace(vcpkg::SourceControlFile&& scf) - { - 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)); - return PackageSpec{*spec.get()}; - } - }; - - TEST_METHOD(basic_install_scheme) - { - std::vector> status_paragraphs; - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = spec_map.emplace("a", "b"); - auto spec_b = spec_map.emplace("b", "c"); - auto spec_c = spec_map.emplace("c"); - - Dependencies::MapPortFile map_port(spec_map.map); - auto install_plan = - Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(3), install_plan.size()); - Assert::AreEqual("c", install_plan[0].spec.name().c_str()); - Assert::AreEqual("b", install_plan[1].spec.name().c_str()); - Assert::AreEqual("a", install_plan[2].spec.name().c_str()); - } - - TEST_METHOD(multiple_install_scheme) - { - std::vector> status_paragraphs; - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = spec_map.emplace("a", "d"); - auto spec_b = spec_map.emplace("b", "d, e"); - auto spec_c = spec_map.emplace("c", "e, h"); - auto spec_d = spec_map.emplace("d", "f, g, h"); - auto spec_e = spec_map.emplace("e", "g"); - auto spec_f = spec_map.emplace("f"); - auto spec_g = spec_map.emplace("g"); - auto spec_h = spec_map.emplace("h"); - - Dependencies::MapPortFile map_port(spec_map.map); - auto install_plan = Dependencies::create_install_plan( - map_port, {spec_a, spec_b, spec_c}, StatusParagraphs(std::move(status_paragraphs))); - - auto iterator_pos = [&](const PackageSpec& spec) -> int { - auto it = std::find_if( - install_plan.begin(), install_plan.end(), [&](auto& action) { return action.spec == spec; }); - Assert::IsTrue(it != install_plan.end()); - return (int)(it - install_plan.begin()); - }; - - int a_pos = iterator_pos(spec_a), b_pos = iterator_pos(spec_b), c_pos = iterator_pos(spec_c), - d_pos = iterator_pos(spec_d), e_pos = iterator_pos(spec_e), f_pos = iterator_pos(spec_f), - g_pos = iterator_pos(spec_g), h_pos = iterator_pos(spec_h); - - Assert::IsTrue(a_pos > d_pos); - Assert::IsTrue(b_pos > e_pos); - Assert::IsTrue(b_pos > d_pos); - Assert::IsTrue(c_pos > e_pos); - Assert::IsTrue(c_pos > h_pos); - Assert::IsTrue(d_pos > f_pos); - Assert::IsTrue(d_pos > g_pos); - Assert::IsTrue(d_pos > h_pos); - Assert::IsTrue(e_pos > g_pos); - } - - TEST_METHOD(existing_package_scheme) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("a")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{spec_map.emplace("a")}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_a}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(1), install_plan.size()); - auto p = install_plan[0].install_plan.get(); - Assert::IsNotNull(p); - Assert::AreEqual("a", p->spec.name().c_str()); - Assert::AreEqual(Dependencies::InstallPlanType::ALREADY_INSTALLED, p->plan_type); - Assert::AreEqual(Dependencies::RequestType::USER_REQUESTED, p->request_type); - } - - TEST_METHOD(user_requested_package_scheme) - { - std::vector> status_paragraphs; - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{spec_map.emplace("a", "b")}; - auto spec_b = FullPackageSpec{spec_map.emplace("b")}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_a}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(2), install_plan.size()); - auto p = install_plan[0].install_plan.get(); - Assert::IsNotNull(p); - Assert::AreEqual("b", p->spec.name().c_str()); - Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p->plan_type); - Assert::AreEqual(Dependencies::RequestType::AUTO_SELECTED, p->request_type); - - auto p2 = install_plan[1].install_plan.get(); - Assert::IsNotNull(p2); - Assert::AreEqual("a", p2->spec.name().c_str()); - Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p2->plan_type); - Assert::AreEqual(Dependencies::RequestType::USER_REQUESTED, p2->request_type); - } - - TEST_METHOD(long_install_scheme) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("j", "k")); - status_paragraphs.push_back(make_status_pgh("k")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - - auto spec_a = spec_map.emplace("a", "b, c, d, e, f, g, h, j, k"); - auto spec_b = spec_map.emplace("b", "c, d, e, f, g, h, j, k"); - auto spec_c = spec_map.emplace("c", "d, e, f, g, h, j, k"); - auto spec_d = spec_map.emplace("d", "e, f, g, h, j, k"); - auto spec_e = spec_map.emplace("e", "f, g, h, j, k"); - auto spec_f = spec_map.emplace("f", "g, h, j, k"); - auto spec_g = spec_map.emplace("g", "h, j, k"); - auto spec_h = spec_map.emplace("h", "j, k"); - auto spec_j = spec_map.emplace("j", "k"); - auto spec_k = spec_map.emplace("k"); - - Dependencies::MapPortFile map_port(spec_map.map); - auto install_plan = - Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(8), install_plan.size()); - Assert::AreEqual("h", install_plan[0].spec.name().c_str()); - Assert::AreEqual("g", install_plan[1].spec.name().c_str()); - Assert::AreEqual("f", install_plan[2].spec.name().c_str()); - Assert::AreEqual("e", install_plan[3].spec.name().c_str()); - Assert::AreEqual("d", install_plan[4].spec.name().c_str()); - Assert::AreEqual("c", install_plan[5].spec.name().c_str()); - Assert::AreEqual("b", install_plan[6].spec.name().c_str()); - Assert::AreEqual("a", install_plan[7].spec.name().c_str()); - } - - TEST_METHOD(basic_feature_test_1) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("a", "b, b[b1]")); - status_paragraphs.push_back(make_status_pgh("b")); - status_paragraphs.push_back(make_status_feature_pgh("b", "b1")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{spec_map.emplace("a", "b, b[b1]", {{"a1", "b[b2]"}}), {"a1"}}; - auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_a}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(4), install_plan.size()); - remove_plan_check(&install_plan[0], "a"); - remove_plan_check(&install_plan[1], "b"); - features_check(&install_plan[2], "b", {"b1", "core", "b1"}); - features_check(&install_plan[3], "a", {"a1", "core"}); - } - - TEST_METHOD(basic_feature_test_2) - { - std::vector> status_paragraphs; - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - - auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[b1]", {{"a1", "b[b2]"}}), {"a1"}}; - auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_a}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(2), install_plan.size()); - features_check(&install_plan[0], "b", {"b1", "b2", "core"}); - features_check(&install_plan[1], "a", {"a1", "core"}); - } - - TEST_METHOD(basic_feature_test_3) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("a")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - - auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; - auto spec_b = FullPackageSpec{spec_map.emplace("b")}; - auto spec_c = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_c, spec_a}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(4), install_plan.size()); - remove_plan_check(&install_plan[0], "a"); - features_check(&install_plan[1], "b", {"core"}); - features_check(&install_plan[2], "a", {"a1", "core"}); - features_check(&install_plan[3], "c", {"core"}); - } - - TEST_METHOD(basic_feature_test_4) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("a")); - status_paragraphs.push_back(make_status_feature_pgh("a", "a1", "")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - - auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}})}; - auto spec_b = FullPackageSpec{spec_map.emplace("b")}; - auto spec_c = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_c}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(1), install_plan.size()); - features_check(&install_plan[0], "c", {"core"}); - } - - TEST_METHOD(basic_feature_test_5) - { - std::vector> status_paragraphs; - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - - auto spec_a = - FullPackageSpec{spec_map.emplace("a", "", {{"a1", "b[b1]"}, {"a2", "b[b2]"}, {"a3", "a[a2]"}}), {"a3"}}; - auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}})}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_a}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(2), install_plan.size()); - features_check(&install_plan[0], "b", {"core", "b2"}); - features_check(&install_plan[1], "a", {"core", "a3", "a2"}); - } - - TEST_METHOD(basic_feature_test_6) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("b")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[core]"), {"core"}}; - auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}}), {"b1"}}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_a, spec_b}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(3), install_plan.size()); - remove_plan_check(&install_plan[0], "b"); - features_check(&install_plan[1], "b", {"core", "b1"}); - features_check(&install_plan[2], "a", {"core"}); - } - - TEST_METHOD(basic_feature_test_7) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("x", "b")); - status_paragraphs.push_back(make_status_pgh("b")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - - auto spec_a = FullPackageSpec{spec_map.emplace("a")}; - auto spec_x = FullPackageSpec{spec_map.emplace("x", "a"), {"core"}}; - auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}}), {"b1"}}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_b}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(5), install_plan.size()); - remove_plan_check(&install_plan[0], "x"); - remove_plan_check(&install_plan[1], "b"); - - // TODO: order here may change but A < X, and B anywhere - features_check(&install_plan[2], "b", {"core", "b1"}); - features_check(&install_plan[3], "a", {"core"}); - features_check(&install_plan[4], "x", {"core"}); - } - - TEST_METHOD(basic_feature_test_8) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("a")); - status_paragraphs.push_back(make_status_pgh("a")); - status_paragraphs.back()->package.spec = - PackageSpec::from_name_and_triplet("a", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); - - PackageSpecMap spec_map(Triplet::X64_WINDOWS); - auto spec_a_64 = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; - auto spec_b_64 = FullPackageSpec{spec_map.emplace("b")}; - auto spec_c_64 = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; - - spec_map.triplet = Triplet::X86_WINDOWS; - auto spec_a_86 = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; - auto spec_b_86 = FullPackageSpec{spec_map.emplace("b")}; - auto spec_c_86 = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; - - auto install_plan = Dependencies::create_feature_install_plan( - spec_map.map, - FullPackageSpec::to_feature_specs({spec_c_64, spec_a_86, spec_a_64, spec_c_86}), - StatusParagraphs(std::move(status_paragraphs))); - - /*Assert::AreEqual(size_t(8), install_plan.size()); - auto iterator_pos = [&](const PackageSpec& spec, size_t start) -> int { - auto it = std::find_if(install_plan.begin() + start, install_plan.end(), [&](auto& action) { - return action.spec == spec; - }); - Assert::IsTrue(it != install_plan.end()); - return (int)(it - install_plan.begin()); - }; - int a_64_1 = iterator_pos(spec_a_64.package_spec, 0), a_86_1 = iterator_pos(spec_a_86.package_spec, 0), - b_64 = iterator_pos(spec_b_64.package_spec, 0), b_86 = iterator_pos(spec_b_86.package_spec, 0), - c_64 = iterator_pos(spec_c_64.package_spec, 0), c_86 = iterator_pos(spec_c_86.package_spec, 0), - a_64_2 = iterator_pos(spec_a_64.package_spec, a_64_1 + 1), - a_86_2 = iterator_pos(spec_a_86.package_spec, a_86_1 + 1);*/ - - remove_plan_check(&install_plan[0], "a", Triplet::X64_WINDOWS); - remove_plan_check(&install_plan[1], "a"); - features_check(&install_plan[2], "b", {"core"}, Triplet::X64_WINDOWS); - features_check(&install_plan[3], "a", {"a1", "core"}, Triplet::X64_WINDOWS); - features_check(&install_plan[4], "c", {"core"}, Triplet::X64_WINDOWS); - features_check(&install_plan[5], "b", {"core"}); - features_check(&install_plan[6], "a", {"a1", "core"}); - features_check(&install_plan[7], "c", {"core"}); - } - }; -} \ No newline at end of file diff --git a/toolsrc/src/tests.arguments.cpp b/toolsrc/src/tests.arguments.cpp new file mode 100644 index 000000000..25bf0f085 --- /dev/null +++ b/toolsrc/src/tests.arguments.cpp @@ -0,0 +1,58 @@ +#include +#include + +#pragma comment(lib, "version") +#pragma comment(lib, "winhttp") + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +using namespace vcpkg; + +namespace UnitTest1 +{ + class ArgumentTests : public TestClass + { + TEST_METHOD(create_from_arg_sequence_options_lower) + { + std::vector t = {"--vcpkg-root", "C:\\vcpkg", "--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::IsTrue(v.debug && *v.debug.get()); + Assert::IsTrue(v.sendmetrics && v.sendmetrics.get()); + Assert::IsTrue(v.printmetrics && *v.printmetrics.get()); + } + + TEST_METHOD(create_from_arg_sequence_options_upper) + { + std::vector t = {"--VCPKG-ROOT", "C:\\vcpkg", "--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::IsTrue(v.debug && *v.debug.get()); + Assert::IsTrue(v.sendmetrics && v.sendmetrics.get()); + Assert::IsTrue(v.printmetrics && *v.printmetrics.get()); + } + + TEST_METHOD(create_from_arg_sequence_valued_options) + { + std::vector t = {"--a=b", "command", "argument"}; + auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); + auto opts = v.check_and_get_optional_command_arguments({}, {"--a"}); + Assert::AreEqual("b", opts.settings["--a"].c_str()); + Assert::AreEqual(size_t{1}, v.command_arguments.size()); + Assert::AreEqual("argument", v.command_arguments[0].c_str()); + Assert::AreEqual("command", v.command.c_str()); + } + + TEST_METHOD(create_from_arg_sequence_valued_options2) + { + std::vector t = {"--a", "--b=c"}; + auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); + auto opts = v.check_and_get_optional_command_arguments({"--a", "--c"}, {"--b", "--d"}); + Assert::AreEqual("c", opts.settings["--b"].c_str()); + Assert::IsTrue(opts.settings.find("--d") == opts.settings.end()); + Assert::IsTrue(opts.switches.find("--a") != opts.switches.end()); + Assert::IsTrue(opts.settings.find("--c") == opts.settings.end()); + Assert::AreEqual(size_t{0}, v.command_arguments.size()); + } + }; +} \ No newline at end of file diff --git a/toolsrc/src/tests.dependencies.cpp b/toolsrc/src/tests.dependencies.cpp new file mode 100644 index 000000000..3f6e0dd10 --- /dev/null +++ b/toolsrc/src/tests.dependencies.cpp @@ -0,0 +1,110 @@ +#include +#include +#include + +#pragma comment(lib, "version") +#pragma comment(lib, "winhttp") + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +using namespace vcpkg; +using Parse::parse_comma_list; + +namespace UnitTest1 +{ + class DependencyTests : public TestClass + { + TEST_METHOD(parse_depends_one) + { + auto v = expand_qualified_dependencies(parse_comma_list("libA (windows)")); + Assert::AreEqual(size_t(1), v.size()); + Assert::AreEqual("libA", v[0].depend.name.c_str()); + Assert::AreEqual("windows", v[0].qualifier.c_str()); + } + + TEST_METHOD(filter_depends) + { + auto deps = expand_qualified_dependencies(parse_comma_list("libA (windows), libB, libC (uwp)")); + auto v = filter_dependencies(deps, Triplet::X64_WINDOWS); + Assert::AreEqual(size_t(2), v.size()); + Assert::AreEqual("libA", v[0].c_str()); + Assert::AreEqual("libB", v[1].c_str()); + + auto v2 = filter_dependencies(deps, Triplet::ARM_UWP); + Assert::AreEqual(size_t(2), v.size()); + Assert::AreEqual("libB", v2[0].c_str()); + Assert::AreEqual("libC", v2[1].c_str()); + } + }; + + class SupportsTests : public TestClass + { + TEST_METHOD(parse_supports_all) + { + auto v = Supports::parse({ + "x64", + "x86", + "arm", + "windows", + "uwp", + "v140", + "v141", + "crt-static", + "crt-dynamic", + }); + Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get())); + + Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::X64, + Supports::Platform::UWP, + Supports::Linkage::DYNAMIC, + Supports::ToolsetVersion::V140)); + Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::ARM, + Supports::Platform::WINDOWS, + Supports::Linkage::STATIC, + Supports::ToolsetVersion::V141)); + } + + TEST_METHOD(parse_supports_invalid) + { + auto v = Supports::parse({"arm64"}); + Assert::AreEqual(uintptr_t(0), uintptr_t(v.get())); + Assert::AreEqual(size_t(1), v.error().size()); + Assert::AreEqual("arm64", v.error()[0].c_str()); + } + + TEST_METHOD(parse_supports_case_sensitive) + { + auto v = Supports::parse({"Windows"}); + Assert::AreEqual(uintptr_t(0), uintptr_t(v.get())); + Assert::AreEqual(size_t(1), v.error().size()); + Assert::AreEqual("Windows", v.error()[0].c_str()); + } + + TEST_METHOD(parse_supports_some) + { + auto v = Supports::parse({ + "x64", + "x86", + "windows", + }); + Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get())); + + Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::X64, + Supports::Platform::WINDOWS, + Supports::Linkage::DYNAMIC, + Supports::ToolsetVersion::V140)); + Assert::IsFalse(v.get()->is_supported(System::CPUArchitecture::ARM, + Supports::Platform::WINDOWS, + Supports::Linkage::DYNAMIC, + Supports::ToolsetVersion::V140)); + Assert::IsFalse(v.get()->is_supported(System::CPUArchitecture::X64, + Supports::Platform::UWP, + Supports::Linkage::DYNAMIC, + Supports::ToolsetVersion::V140)); + Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::X64, + Supports::Platform::WINDOWS, + Supports::Linkage::STATIC, + Supports::ToolsetVersion::V141)); + } + }; +} diff --git a/toolsrc/src/tests.installplan.cpp b/toolsrc/src/tests.installplan.cpp new file mode 100644 index 000000000..120009db5 --- /dev/null +++ b/toolsrc/src/tests.installplan.cpp @@ -0,0 +1,487 @@ +#include +#include + +#include + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +using namespace vcpkg; + +namespace Microsoft::VisualStudio::CppUnitTestFramework +{ + template<> + inline std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t) + { + switch (t) + { + case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; + case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; + case Dependencies::InstallPlanType::INSTALL: return L"INSTALL"; + case Dependencies::InstallPlanType::UNKNOWN: return L"UNKNOWN"; + default: return ToString((int)t); + } + } + + template<> + inline std::wstring ToString(const vcpkg::Dependencies::RequestType& t) + { + switch (t) + { + case Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED"; + case Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED"; + case Dependencies::RequestType::UNKNOWN: return L"UNKNOWN"; + default: return ToString((int)t); + } + } +} + +namespace UnitTest1 +{ + class InstallPlanTests : public TestClass + { + static std::unique_ptr make_control_file( + const char* name, + const char* depends, + const std::vector>& features = {}) + { + using Pgh = std::unordered_map; + std::vector scf_pghs; + scf_pghs.push_back(Pgh{ + {"Source", name}, + {"Version", "0"}, + {"Build-Depends", depends}, + }); + for (auto&& feature : features) + { + scf_pghs.push_back(Pgh{ + {"Feature", feature.first}, + {"Description", "feature"}, + {"Build-Depends", feature.second}, + }); + } + auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(scf_pghs)); + Assert::IsTrue(m_pgh.has_value()); + return std::move(*m_pgh.get()); + } + + static void features_check(Dependencies::AnyAction* install_action, + std::string pkg_name, + std::vector vec, + const Triplet& triplet = Triplet::X86_WINDOWS) + { + const auto& plan = install_action->install_plan.value_or_exit(VCPKG_LINE_INFO); + const auto& feature_list = plan.feature_list; + + Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); + + Assert::AreEqual(pkg_name.c_str(), + (*plan.any_paragraph.source_control_file.get())->core_paragraph->name.c_str()); + Assert::AreEqual(size_t(vec.size()), feature_list.size()); + + for (auto&& feature_name : vec) + { + if (feature_name == "core" || feature_name == "") + { + Assert::IsTrue(Util::find(feature_list, "core") != feature_list.end() || + Util::find(feature_list, "") != feature_list.end()); + continue; + } + Assert::IsTrue(Util::find(feature_list, feature_name) != feature_list.end()); + } + } + + static void remove_plan_check(Dependencies::AnyAction* remove_action, + std::string pkg_name, + const Triplet& triplet = Triplet::X86_WINDOWS) + { + const auto& plan = remove_action->remove_plan.value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); + Assert::AreEqual(pkg_name.c_str(), plan.spec.name().c_str()); + } + + static std::unique_ptr make_status_pgh(const char* name, const char* depends = "") + { + using Pgh = std::unordered_map; + return std::make_unique(Pgh{{"Package", name}, + {"Version", "1"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", depends}, + {"Status", "install ok installed"}}); + } + static std::unique_ptr make_status_feature_pgh(const char* name, + const char* feature, + const char* depends = "") + { + using Pgh = std::unordered_map; + return std::make_unique(Pgh{{"Package", name}, + {"Version", "1"}, + {"Feature", feature}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", depends}, + {"Status", "install ok installed"}}); + } + struct PackageSpecMap + { + std::unordered_map map; + Triplet triplet; + PackageSpecMap(const Triplet& t) { triplet = t; } + + PackageSpec emplace(const char* name, + const char* depends = "", + const std::vector>& features = {}) + { + return emplace(std::move(*make_control_file(name, depends, features))); + } + PackageSpec emplace(vcpkg::SourceControlFile&& scf) + { + 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)); + return PackageSpec{*spec.get()}; + } + }; + + TEST_METHOD(basic_install_scheme) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a", "b"); + auto spec_b = spec_map.emplace("b", "c"); + auto spec_c = spec_map.emplace("c"); + + Dependencies::MapPortFile map_port(spec_map.map); + auto install_plan = + Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(3), install_plan.size()); + Assert::AreEqual("c", install_plan[0].spec.name().c_str()); + Assert::AreEqual("b", install_plan[1].spec.name().c_str()); + Assert::AreEqual("a", install_plan[2].spec.name().c_str()); + } + + TEST_METHOD(multiple_install_scheme) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a", "d"); + auto spec_b = spec_map.emplace("b", "d, e"); + auto spec_c = spec_map.emplace("c", "e, h"); + auto spec_d = spec_map.emplace("d", "f, g, h"); + auto spec_e = spec_map.emplace("e", "g"); + auto spec_f = spec_map.emplace("f"); + auto spec_g = spec_map.emplace("g"); + auto spec_h = spec_map.emplace("h"); + + Dependencies::MapPortFile map_port(spec_map.map); + auto install_plan = Dependencies::create_install_plan( + map_port, {spec_a, spec_b, spec_c}, StatusParagraphs(std::move(status_paragraphs))); + + auto iterator_pos = [&](const PackageSpec& spec) -> int { + auto it = std::find_if( + install_plan.begin(), install_plan.end(), [&](auto& action) { return action.spec == spec; }); + Assert::IsTrue(it != install_plan.end()); + return (int)(it - install_plan.begin()); + }; + + int a_pos = iterator_pos(spec_a), b_pos = iterator_pos(spec_b), c_pos = iterator_pos(spec_c), + d_pos = iterator_pos(spec_d), e_pos = iterator_pos(spec_e), f_pos = iterator_pos(spec_f), + g_pos = iterator_pos(spec_g), h_pos = iterator_pos(spec_h); + + Assert::IsTrue(a_pos > d_pos); + Assert::IsTrue(b_pos > e_pos); + Assert::IsTrue(b_pos > d_pos); + Assert::IsTrue(c_pos > e_pos); + Assert::IsTrue(c_pos > h_pos); + Assert::IsTrue(d_pos > f_pos); + Assert::IsTrue(d_pos > g_pos); + Assert::IsTrue(d_pos > h_pos); + Assert::IsTrue(e_pos > g_pos); + } + + TEST_METHOD(existing_package_scheme) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = FullPackageSpec{spec_map.emplace("a")}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(1), install_plan.size()); + auto p = install_plan[0].install_plan.get(); + Assert::IsNotNull(p); + Assert::AreEqual("a", p->spec.name().c_str()); + Assert::AreEqual(Dependencies::InstallPlanType::ALREADY_INSTALLED, p->plan_type); + Assert::AreEqual(Dependencies::RequestType::USER_REQUESTED, p->request_type); + } + + TEST_METHOD(user_requested_package_scheme) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b")}; + auto spec_b = FullPackageSpec{spec_map.emplace("b")}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(2), install_plan.size()); + auto p = install_plan[0].install_plan.get(); + Assert::IsNotNull(p); + Assert::AreEqual("b", p->spec.name().c_str()); + Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p->plan_type); + Assert::AreEqual(Dependencies::RequestType::AUTO_SELECTED, p->request_type); + + auto p2 = install_plan[1].install_plan.get(); + Assert::IsNotNull(p2); + Assert::AreEqual("a", p2->spec.name().c_str()); + Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p2->plan_type); + Assert::AreEqual(Dependencies::RequestType::USER_REQUESTED, p2->request_type); + } + + TEST_METHOD(long_install_scheme) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("j", "k")); + status_paragraphs.push_back(make_status_pgh("k")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + + auto spec_a = spec_map.emplace("a", "b, c, d, e, f, g, h, j, k"); + auto spec_b = spec_map.emplace("b", "c, d, e, f, g, h, j, k"); + auto spec_c = spec_map.emplace("c", "d, e, f, g, h, j, k"); + auto spec_d = spec_map.emplace("d", "e, f, g, h, j, k"); + auto spec_e = spec_map.emplace("e", "f, g, h, j, k"); + auto spec_f = spec_map.emplace("f", "g, h, j, k"); + auto spec_g = spec_map.emplace("g", "h, j, k"); + auto spec_h = spec_map.emplace("h", "j, k"); + auto spec_j = spec_map.emplace("j", "k"); + auto spec_k = spec_map.emplace("k"); + + Dependencies::MapPortFile map_port(spec_map.map); + auto install_plan = + Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(8), install_plan.size()); + Assert::AreEqual("h", install_plan[0].spec.name().c_str()); + Assert::AreEqual("g", install_plan[1].spec.name().c_str()); + Assert::AreEqual("f", install_plan[2].spec.name().c_str()); + Assert::AreEqual("e", install_plan[3].spec.name().c_str()); + Assert::AreEqual("d", install_plan[4].spec.name().c_str()); + Assert::AreEqual("c", install_plan[5].spec.name().c_str()); + Assert::AreEqual("b", install_plan[6].spec.name().c_str()); + Assert::AreEqual("a", install_plan[7].spec.name().c_str()); + } + + TEST_METHOD(basic_feature_test_1) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a", "b, b[b1]")); + status_paragraphs.push_back(make_status_pgh("b")); + status_paragraphs.push_back(make_status_feature_pgh("b", "b1")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b, b[b1]", {{"a1", "b[b2]"}}), {"a1"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(4), install_plan.size()); + remove_plan_check(&install_plan[0], "a"); + remove_plan_check(&install_plan[1], "b"); + features_check(&install_plan[2], "b", {"b1", "core", "b1"}); + features_check(&install_plan[3], "a", {"a1", "core"}); + } + + TEST_METHOD(basic_feature_test_2) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[b1]", {{"a1", "b[b2]"}}), {"a1"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(2), install_plan.size()); + features_check(&install_plan[0], "b", {"b1", "b2", "core"}); + features_check(&install_plan[1], "a", {"a1", "core"}); + } + + TEST_METHOD(basic_feature_test_3) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b")}; + auto spec_c = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_c, spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(4), install_plan.size()); + remove_plan_check(&install_plan[0], "a"); + features_check(&install_plan[1], "b", {"core"}); + features_check(&install_plan[2], "a", {"a1", "core"}); + features_check(&install_plan[3], "c", {"core"}); + } + + TEST_METHOD(basic_feature_test_4) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.push_back(make_status_feature_pgh("a", "a1", "")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}})}; + auto spec_b = FullPackageSpec{spec_map.emplace("b")}; + auto spec_c = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_c}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(1), install_plan.size()); + features_check(&install_plan[0], "c", {"core"}); + } + + TEST_METHOD(basic_feature_test_5) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + + auto spec_a = + FullPackageSpec{spec_map.emplace("a", "", {{"a1", "b[b1]"}, {"a2", "b[b2]"}, {"a3", "a[a2]"}}), {"a3"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}})}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(2), install_plan.size()); + features_check(&install_plan[0], "b", {"core", "b2"}); + features_check(&install_plan[1], "a", {"core", "a3", "a2"}); + } + + TEST_METHOD(basic_feature_test_6) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("b")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[core]"), {"core"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}}), {"b1"}}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a, spec_b}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(3), install_plan.size()); + remove_plan_check(&install_plan[0], "b"); + features_check(&install_plan[1], "b", {"core", "b1"}); + features_check(&install_plan[2], "a", {"core"}); + } + + TEST_METHOD(basic_feature_test_7) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("x", "b")); + status_paragraphs.push_back(make_status_pgh("b")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + + auto spec_a = FullPackageSpec{spec_map.emplace("a")}; + auto spec_x = FullPackageSpec{spec_map.emplace("x", "a"), {"core"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}}), {"b1"}}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_b}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(5), install_plan.size()); + remove_plan_check(&install_plan[0], "x"); + remove_plan_check(&install_plan[1], "b"); + + // TODO: order here may change but A < X, and B anywhere + features_check(&install_plan[2], "b", {"core", "b1"}); + features_check(&install_plan[3], "a", {"core"}); + features_check(&install_plan[4], "x", {"core"}); + } + + TEST_METHOD(basic_feature_test_8) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.back()->package.spec = + PackageSpec::from_name_and_triplet("a", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); + + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_a_64 = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; + auto spec_b_64 = FullPackageSpec{spec_map.emplace("b")}; + auto spec_c_64 = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; + + spec_map.triplet = Triplet::X86_WINDOWS; + auto spec_a_86 = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; + auto spec_b_86 = FullPackageSpec{spec_map.emplace("b")}; + auto spec_c_86 = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; + + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({spec_c_64, spec_a_86, spec_a_64, spec_c_86}), + StatusParagraphs(std::move(status_paragraphs))); + + /*Assert::AreEqual(size_t(8), install_plan.size()); + auto iterator_pos = [&](const PackageSpec& spec, size_t start) -> int { + auto it = std::find_if(install_plan.begin() + start, install_plan.end(), [&](auto& action) { + return action.spec == spec; + }); + Assert::IsTrue(it != install_plan.end()); + return (int)(it - install_plan.begin()); + }; + int a_64_1 = iterator_pos(spec_a_64.package_spec, 0), a_86_1 = iterator_pos(spec_a_86.package_spec, 0), + b_64 = iterator_pos(spec_b_64.package_spec, 0), b_86 = iterator_pos(spec_b_86.package_spec, 0), + c_64 = iterator_pos(spec_c_64.package_spec, 0), c_86 = iterator_pos(spec_c_86.package_spec, 0), + a_64_2 = iterator_pos(spec_a_64.package_spec, a_64_1 + 1), + a_86_2 = iterator_pos(spec_a_86.package_spec, a_86_1 + 1);*/ + + remove_plan_check(&install_plan[0], "a", Triplet::X64_WINDOWS); + remove_plan_check(&install_plan[1], "a"); + features_check(&install_plan[2], "b", {"core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[3], "a", {"a1", "core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[4], "c", {"core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[5], "b", {"core"}); + features_check(&install_plan[6], "a", {"a1", "core"}); + features_check(&install_plan[7], "c", {"core"}); + } + }; +} \ No newline at end of file diff --git a/toolsrc/src/tests.packagespec.cpp b/toolsrc/src/tests.packagespec.cpp new file mode 100644 index 000000000..cb5c41af0 --- /dev/null +++ b/toolsrc/src/tests.packagespec.cpp @@ -0,0 +1,120 @@ +#include +#include +#include + +#include + +#pragma comment(lib, "version") +#pragma comment(lib, "winhttp") + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +namespace Microsoft::VisualStudio::CppUnitTestFramework +{ + 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()); + } +} + +namespace Strings = vcpkg::Strings; + +namespace UnitTest1 +{ + using namespace vcpkg; + + class SpecifierConversion : public TestClass + { + TEST_METHOD(full_package_spec_to_feature_specs) + { + auto a_spec = PackageSpec::from_name_and_triplet("a", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); + auto b_spec = PackageSpec::from_name_and_triplet("b", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); + + auto fspecs = FullPackageSpec::to_feature_specs({{a_spec, {"0", "1"}}, {b_spec, {"2", "3"}}}); + + Assert::AreEqual(size_t(6), fspecs.size()); + + std::array features = {"", "0", "1", "", "2", "3"}; + std::array specs = {&a_spec, &a_spec, &a_spec, &b_spec, &b_spec, &b_spec}; + + for (size_t i = 0; i < features.size(); ++i) + { + Assert::AreEqual(features[i], fspecs[i].feature().c_str()); + Assert::AreEqual(*specs[i], fspecs[i].spec()); + } + } + }; + + class SpecifierParsing : public TestClass + { + TEST_METHOD(parsed_specifier_from_string) + { + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::AreEqual(size_t(0), spec->features.size()); + Assert::AreEqual("", spec->triplet.c_str()); + } + + TEST_METHOD(parsed_specifier_from_string_with_triplet) + { + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib:x64-uwp"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::AreEqual("x64-uwp", spec->triplet.c_str()); + } + + TEST_METHOD(parsed_specifier_from_string_with_colons) + { + auto ec = vcpkg::ParsedSpecifier::from_string("zlib:x86-uwp:").error(); + Assert::AreEqual(vcpkg::PackageSpecParseResult::TOO_MANY_COLONS, ec); + } + + TEST_METHOD(parsed_specifier_from_string_with_feature) + { + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[feature]:x64-uwp"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::IsTrue(spec->features.size() == 1); + Assert::AreEqual("feature", spec->features.front().c_str()); + Assert::AreEqual("x64-uwp", spec->triplet.c_str()); + } + + TEST_METHOD(parsed_specifier_from_string_with_many_features) + { + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[0, 1,2]"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::IsTrue(spec->features.size() == 3); + Assert::AreEqual("0", spec->features[0].c_str()); + Assert::AreEqual("1", spec->features[1].c_str()); + Assert::AreEqual("2", spec->features[2].c_str()); + Assert::AreEqual("", spec->triplet.c_str()); + } + + TEST_METHOD(utf8_to_utf16) + { + auto str = vcpkg::Strings::to_utf16("abc"); + Assert::AreEqual(L"abc", str.c_str()); + } + + TEST_METHOD(utf8_to_utf16_with_whitespace) + { + auto str = vcpkg::Strings::to_utf16("abc -x86-windows"); + Assert::AreEqual(L"abc -x86-windows", str.c_str()); + } + }; + + TEST_CLASS(Metrics){}; +} diff --git a/toolsrc/src/tests.paragraph.cpp b/toolsrc/src/tests.paragraph.cpp new file mode 100644 index 000000000..d9301abd0 --- /dev/null +++ b/toolsrc/src/tests.paragraph.cpp @@ -0,0 +1,389 @@ +#include +#include +#include + +#include + +#pragma comment(lib, "version") +#pragma comment(lib, "winhttp") + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +namespace Microsoft::VisualStudio::CppUnitTestFramework +{ + template<> + inline std::wstring ToString(const vcpkg::PackageSpecParseResult& t) + { + return ToString(static_cast(t)); + } +} + +namespace Strings = vcpkg::Strings; + +namespace UnitTest1 +{ + class ControlParsing : public TestClass + { + TEST_METHOD(SourceParagraph_Construct_Minimum) + { + auto m_pgh = + vcpkg::SourceControlFile::parse_control_file(std::vector>{{ + {"Source", "zlib"}, + {"Version", "1.2.8"}, + }}); + + Assert::IsTrue(m_pgh.has_value()); + auto& pgh = *m_pgh.get(); + + Assert::AreEqual("zlib", pgh->core_paragraph->name.c_str()); + Assert::AreEqual("1.2.8", pgh->core_paragraph->version.c_str()); + Assert::AreEqual("", pgh->core_paragraph->maintainer.c_str()); + Assert::AreEqual("", pgh->core_paragraph->description.c_str()); + Assert::AreEqual(size_t(0), pgh->core_paragraph->depends.size()); + } + + TEST_METHOD(SourceParagraph_Construct_Maximum) + { + auto m_pgh = + vcpkg::SourceControlFile::parse_control_file(std::vector>{{ + {"Source", "s"}, + {"Version", "v"}, + {"Maintainer", "m"}, + {"Description", "d"}, + {"Build-Depends", "bd"}, + {"Supports", "x64"}, + }}); + Assert::IsTrue(m_pgh.has_value()); + auto& pgh = *m_pgh.get(); + + Assert::AreEqual("s", pgh->core_paragraph->name.c_str()); + Assert::AreEqual("v", pgh->core_paragraph->version.c_str()); + Assert::AreEqual("m", pgh->core_paragraph->maintainer.c_str()); + Assert::AreEqual("d", pgh->core_paragraph->description.c_str()); + Assert::AreEqual(size_t(1), pgh->core_paragraph->depends.size()); + Assert::AreEqual("bd", pgh->core_paragraph->depends[0].name().c_str()); + Assert::AreEqual(size_t(1), pgh->core_paragraph->supports.size()); + Assert::AreEqual("x64", pgh->core_paragraph->supports[0].c_str()); + } + + TEST_METHOD(SourceParagraph_Two_Depends) + { + auto m_pgh = + vcpkg::SourceControlFile::parse_control_file(std::vector>{{ + {"Source", "zlib"}, + {"Version", "1.2.8"}, + {"Build-Depends", "z, openssl"}, + }}); + Assert::IsTrue(m_pgh.has_value()); + auto& pgh = *m_pgh.get(); + + Assert::AreEqual(size_t(2), pgh->core_paragraph->depends.size()); + Assert::AreEqual("z", pgh->core_paragraph->depends[0].name().c_str()); + Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name().c_str()); + } + + TEST_METHOD(SourceParagraph_Three_Depends) + { + auto m_pgh = + vcpkg::SourceControlFile::parse_control_file(std::vector>{{ + {"Source", "zlib"}, + {"Version", "1.2.8"}, + {"Build-Depends", "z, openssl, xyz"}, + }}); + Assert::IsTrue(m_pgh.has_value()); + auto& pgh = *m_pgh.get(); + + Assert::AreEqual(size_t(3), pgh->core_paragraph->depends.size()); + Assert::AreEqual("z", pgh->core_paragraph->depends[0].name().c_str()); + Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name().c_str()); + Assert::AreEqual("xyz", pgh->core_paragraph->depends[2].name().c_str()); + } + + TEST_METHOD(SourceParagraph_Three_Supports) + { + auto m_pgh = + vcpkg::SourceControlFile::parse_control_file(std::vector>{{ + {"Source", "zlib"}, + {"Version", "1.2.8"}, + {"Supports", "x64, windows, uwp"}, + }}); + Assert::IsTrue(m_pgh.has_value()); + auto& pgh = *m_pgh.get(); + + Assert::AreEqual(size_t(3), pgh->core_paragraph->supports.size()); + Assert::AreEqual("x64", pgh->core_paragraph->supports[0].c_str()); + Assert::AreEqual("windows", pgh->core_paragraph->supports[1].c_str()); + Assert::AreEqual("uwp", pgh->core_paragraph->supports[2].c_str()); + } + + TEST_METHOD(SourceParagraph_Construct_Qualified_Depends) + { + auto m_pgh = + vcpkg::SourceControlFile::parse_control_file(std::vector>{{ + {"Source", "zlib"}, + {"Version", "1.2.8"}, + {"Build-Depends", "libA (windows), libB (uwp)"}, + }}); + Assert::IsTrue(m_pgh.has_value()); + auto& pgh = *m_pgh.get(); + + Assert::AreEqual("zlib", pgh->core_paragraph->name.c_str()); + Assert::AreEqual("1.2.8", pgh->core_paragraph->version.c_str()); + Assert::AreEqual("", pgh->core_paragraph->maintainer.c_str()); + Assert::AreEqual("", pgh->core_paragraph->description.c_str()); + Assert::AreEqual(size_t(2), pgh->core_paragraph->depends.size()); + Assert::AreEqual("libA", pgh->core_paragraph->depends[0].name().c_str()); + Assert::AreEqual("windows", pgh->core_paragraph->depends[0].qualifier.c_str()); + Assert::AreEqual("libB", pgh->core_paragraph->depends[1].name().c_str()); + Assert::AreEqual("uwp", pgh->core_paragraph->depends[1].qualifier.c_str()); + } + + TEST_METHOD(BinaryParagraph_Construct_Minimum) + { + vcpkg::BinaryParagraph pgh({ + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + }); + + Assert::AreEqual("zlib", pgh.spec.name().c_str()); + Assert::AreEqual("1.2.8", pgh.version.c_str()); + Assert::AreEqual("", pgh.maintainer.c_str()); + Assert::AreEqual("", pgh.description.c_str()); + Assert::AreEqual("x86-windows", pgh.spec.triplet().canonical_name().c_str()); + Assert::AreEqual(size_t(0), pgh.depends.size()); + } + + TEST_METHOD(BinaryParagraph_Construct_Maximum) + { + vcpkg::BinaryParagraph pgh({ + {"Package", "s"}, + {"Version", "v"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Maintainer", "m"}, + {"Description", "d"}, + {"Depends", "bd"}, + }); + Assert::AreEqual("s", pgh.spec.name().c_str()); + Assert::AreEqual("v", pgh.version.c_str()); + Assert::AreEqual("m", pgh.maintainer.c_str()); + Assert::AreEqual("d", pgh.description.c_str()); + Assert::AreEqual(size_t(1), pgh.depends.size()); + Assert::AreEqual("bd", pgh.depends[0].c_str()); + } + + TEST_METHOD(BinaryParagraph_Three_Depends) + { + vcpkg::BinaryParagraph pgh({ + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", "a, b, c"}, + }); + + Assert::AreEqual(size_t(3), pgh.depends.size()); + Assert::AreEqual("a", pgh.depends[0].c_str()); + Assert::AreEqual("b", pgh.depends[1].c_str()); + Assert::AreEqual("c", pgh.depends[2].c_str()); + } + + TEST_METHOD(parse_paragraphs_empty) + { + const char* str = ""; + auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); + Assert::IsTrue(pghs.empty()); + } + + TEST_METHOD(parse_paragraphs_one_field) + { + const char* str = "f1: v1"; + auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(1), pghs.size()); + Assert::AreEqual(size_t(1), pghs[0].size()); + Assert::AreEqual("v1", pghs[0]["f1"].c_str()); + } + + TEST_METHOD(parse_paragraphs_one_pgh) + { + const char* str = "f1: v1\n" + "f2: v2"; + auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(1), pghs.size()); + Assert::AreEqual(size_t(2), pghs[0].size()); + Assert::AreEqual("v1", pghs[0]["f1"].c_str()); + Assert::AreEqual("v2", pghs[0]["f2"].c_str()); + } + + TEST_METHOD(parse_paragraphs_two_pgh) + { + const char* str = "f1: v1\n" + "f2: v2\n" + "\n" + "f3: v3\n" + "f4: v4"; + auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(2), pghs.size()); + Assert::AreEqual(size_t(2), pghs[0].size()); + Assert::AreEqual("v1", pghs[0]["f1"].c_str()); + Assert::AreEqual("v2", pghs[0]["f2"].c_str()); + Assert::AreEqual(size_t(2), pghs[1].size()); + Assert::AreEqual("v3", pghs[1]["f3"].c_str()); + Assert::AreEqual("v4", pghs[1]["f4"].c_str()); + } + + TEST_METHOD(parse_paragraphs_field_names) + { + const char* str = "1:\n" + "f:\n" + "F:\n" + "0:\n" + "F-2:\n"; + auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(1), pghs.size()); + Assert::AreEqual(size_t(5), pghs[0].size()); + } + + TEST_METHOD(parse_paragraphs_multiple_blank_lines) + { + const char* str = "f1: v1\n" + "f2: v2\n" + "\n" + "\n" + "f3: v3\n" + "f4: v4"; + auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(2), pghs.size()); + } + + TEST_METHOD(parse_paragraphs_empty_fields) + { + const char* str = "f1:\n" + "f2: "; + auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(1), pghs.size()); + Assert::AreEqual(size_t(2), pghs[0].size()); + Assert::AreEqual("", pghs[0]["f1"].c_str()); + Assert::AreEqual("", pghs[0]["f2"].c_str()); + Assert::AreEqual(size_t(2), pghs[0].size()); + } + + TEST_METHOD(parse_paragraphs_multiline_fields) + { + const char* str = "f1: simple\n" + " f1\r\n" + "f2:\r\n" + " f2\r\n" + " continue\r\n"; + auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(1), pghs.size()); + Assert::AreEqual("simple\n f1", pghs[0]["f1"].c_str()); + Assert::AreEqual("\n f2\n continue", pghs[0]["f2"].c_str()); + } + + TEST_METHOD(parse_paragraphs_crlfs) + { + const char* str = "f1: v1\r\n" + "f2: v2\r\n" + "\r\n" + "f3: v3\r\n" + "f4: v4"; + auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(2), pghs.size()); + Assert::AreEqual(size_t(2), pghs[0].size()); + Assert::AreEqual("v1", pghs[0]["f1"].c_str()); + Assert::AreEqual("v2", pghs[0]["f2"].c_str()); + Assert::AreEqual(size_t(2), pghs[1].size()); + Assert::AreEqual("v3", pghs[1]["f3"].c_str()); + Assert::AreEqual("v4", pghs[1]["f4"].c_str()); + } + + TEST_METHOD(parse_paragraphs_comment) + { + const char* str = "f1: v1\r\n" + "#comment\r\n" + "f2: v2\r\n" + "#comment\r\n" + "\r\n" + "#comment\r\n" + "f3: v3\r\n" + "#comment\r\n" + "f4: v4"; + auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(2), pghs.size()); + Assert::AreEqual(size_t(2), pghs[0].size()); + Assert::AreEqual("v1", pghs[0]["f1"].c_str()); + Assert::AreEqual("v2", pghs[0]["f2"].c_str()); + Assert::AreEqual(size_t(2), pghs[1].size()); + Assert::AreEqual("v3", pghs[1]["f3"].c_str()); + Assert::AreEqual("v4", pghs[1]["f4"].c_str()); + } + + TEST_METHOD(parse_comment_before_single_slashN) + { + const char* str = "f1: v1\r\n" + "#comment\n"; + auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(1), pghs[0].size()); + Assert::AreEqual("v1", pghs[0]["f1"].c_str()); + } + + TEST_METHOD(BinaryParagraph_serialize_min) + { + vcpkg::BinaryParagraph pgh({ + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + }); + std::string ss = Strings::serialize(pgh); + auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(1), pghs.size()); + Assert::AreEqual(size_t(4), pghs[0].size()); + Assert::AreEqual("zlib", pghs[0]["Package"].c_str()); + Assert::AreEqual("1.2.8", pghs[0]["Version"].c_str()); + Assert::AreEqual("x86-windows", pghs[0]["Architecture"].c_str()); + Assert::AreEqual("same", pghs[0]["Multi-Arch"].c_str()); + } + + TEST_METHOD(BinaryParagraph_serialize_max) + { + vcpkg::BinaryParagraph pgh({ + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Description", "first line\n second line"}, + {"Maintainer", "abc "}, + {"Depends", "dep"}, + {"Multi-Arch", "same"}, + }); + std::string ss = Strings::serialize(pgh); + auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(1), pghs.size()); + Assert::AreEqual(size_t(7), pghs[0].size()); + Assert::AreEqual("zlib", pghs[0]["Package"].c_str()); + Assert::AreEqual("1.2.8", pghs[0]["Version"].c_str()); + Assert::AreEqual("x86-windows", pghs[0]["Architecture"].c_str()); + Assert::AreEqual("same", pghs[0]["Multi-Arch"].c_str()); + Assert::AreEqual("first line\n second line", pghs[0]["Description"].c_str()); + Assert::AreEqual("dep", pghs[0]["Depends"].c_str()); + } + + TEST_METHOD(BinaryParagraph_serialize_multiple_deps) + { + vcpkg::BinaryParagraph pgh({ + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", "a, b, c"}, + }); + std::string ss = Strings::serialize(pgh); + auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(1), pghs.size()); + Assert::AreEqual("a, b, c", pghs[0]["Depends"].c_str()); + } + }; +} diff --git a/toolsrc/src/tests_arguments.cpp b/toolsrc/src/tests_arguments.cpp deleted file mode 100644 index 14b3c3d4f..000000000 --- a/toolsrc/src/tests_arguments.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include "CppUnitTest.h" -#include "VcpkgCmdArguments.h" - -#pragma comment(lib, "version") -#pragma comment(lib, "winhttp") - -using namespace Microsoft::VisualStudio::CppUnitTestFramework; - -using namespace vcpkg; - -namespace UnitTest1 -{ - class ArgumentTests : public TestClass - { - TEST_METHOD(create_from_arg_sequence_options_lower) - { - std::vector t = {"--vcpkg-root", "C:\\vcpkg", "--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::IsTrue(v.debug && *v.debug.get()); - Assert::IsTrue(v.sendmetrics && v.sendmetrics.get()); - Assert::IsTrue(v.printmetrics && *v.printmetrics.get()); - } - - TEST_METHOD(create_from_arg_sequence_options_upper) - { - std::vector t = {"--VCPKG-ROOT", "C:\\vcpkg", "--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::IsTrue(v.debug && *v.debug.get()); - Assert::IsTrue(v.sendmetrics && v.sendmetrics.get()); - Assert::IsTrue(v.printmetrics && *v.printmetrics.get()); - } - - TEST_METHOD(create_from_arg_sequence_valued_options) - { - std::vector t = {"--a=b", "command", "argument"}; - auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); - auto opts = v.check_and_get_optional_command_arguments({}, {"--a"}); - Assert::AreEqual("b", opts.settings["--a"].c_str()); - Assert::AreEqual(size_t{1}, v.command_arguments.size()); - Assert::AreEqual("argument", v.command_arguments[0].c_str()); - Assert::AreEqual("command", v.command.c_str()); - } - - TEST_METHOD(create_from_arg_sequence_valued_options2) - { - std::vector t = {"--a", "--b=c"}; - auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); - auto opts = v.check_and_get_optional_command_arguments({"--a", "--c"}, {"--b", "--d"}); - Assert::AreEqual("c", opts.settings["--b"].c_str()); - Assert::IsTrue(opts.settings.find("--d") == opts.settings.end()); - Assert::IsTrue(opts.switches.find("--a") != opts.switches.end()); - Assert::IsTrue(opts.settings.find("--c") == opts.settings.end()); - Assert::AreEqual(size_t{0}, v.command_arguments.size()); - } - }; -} \ No newline at end of file diff --git a/toolsrc/src/tests_dependencies.cpp b/toolsrc/src/tests_dependencies.cpp deleted file mode 100644 index 6a6981d73..000000000 --- a/toolsrc/src/tests_dependencies.cpp +++ /dev/null @@ -1,110 +0,0 @@ -#include "CppUnitTest.h" -#include "SourceParagraph.h" -#include "Triplet.h" - -#pragma comment(lib, "version") -#pragma comment(lib, "winhttp") - -using namespace Microsoft::VisualStudio::CppUnitTestFramework; - -using namespace vcpkg; -using Parse::parse_comma_list; - -namespace UnitTest1 -{ - class DependencyTests : public TestClass - { - TEST_METHOD(parse_depends_one) - { - auto v = expand_qualified_dependencies(parse_comma_list("libA (windows)")); - Assert::AreEqual(size_t(1), v.size()); - Assert::AreEqual("libA", v[0].depend.name.c_str()); - Assert::AreEqual("windows", v[0].qualifier.c_str()); - } - - TEST_METHOD(filter_depends) - { - auto deps = expand_qualified_dependencies(parse_comma_list("libA (windows), libB, libC (uwp)")); - auto v = filter_dependencies(deps, Triplet::X64_WINDOWS); - Assert::AreEqual(size_t(2), v.size()); - Assert::AreEqual("libA", v[0].c_str()); - Assert::AreEqual("libB", v[1].c_str()); - - auto v2 = filter_dependencies(deps, Triplet::ARM_UWP); - Assert::AreEqual(size_t(2), v.size()); - Assert::AreEqual("libB", v2[0].c_str()); - Assert::AreEqual("libC", v2[1].c_str()); - } - }; - - class SupportsTests : public TestClass - { - TEST_METHOD(parse_supports_all) - { - auto v = Supports::parse({ - "x64", - "x86", - "arm", - "windows", - "uwp", - "v140", - "v141", - "crt-static", - "crt-dynamic", - }); - Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get())); - - Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::X64, - Supports::Platform::UWP, - Supports::Linkage::DYNAMIC, - Supports::ToolsetVersion::V140)); - Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::ARM, - Supports::Platform::WINDOWS, - Supports::Linkage::STATIC, - Supports::ToolsetVersion::V141)); - } - - TEST_METHOD(parse_supports_invalid) - { - auto v = Supports::parse({"arm64"}); - Assert::AreEqual(uintptr_t(0), uintptr_t(v.get())); - Assert::AreEqual(size_t(1), v.error().size()); - Assert::AreEqual("arm64", v.error()[0].c_str()); - } - - TEST_METHOD(parse_supports_case_sensitive) - { - auto v = Supports::parse({"Windows"}); - Assert::AreEqual(uintptr_t(0), uintptr_t(v.get())); - Assert::AreEqual(size_t(1), v.error().size()); - Assert::AreEqual("Windows", v.error()[0].c_str()); - } - - TEST_METHOD(parse_supports_some) - { - auto v = Supports::parse({ - "x64", - "x86", - "windows", - }); - Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get())); - - Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::X64, - Supports::Platform::WINDOWS, - Supports::Linkage::DYNAMIC, - Supports::ToolsetVersion::V140)); - Assert::IsFalse(v.get()->is_supported(System::CPUArchitecture::ARM, - Supports::Platform::WINDOWS, - Supports::Linkage::DYNAMIC, - Supports::ToolsetVersion::V140)); - Assert::IsFalse(v.get()->is_supported(System::CPUArchitecture::X64, - Supports::Platform::UWP, - Supports::Linkage::DYNAMIC, - Supports::ToolsetVersion::V140)); - Assert::IsTrue(v.get()->is_supported(System::CPUArchitecture::X64, - Supports::Platform::WINDOWS, - Supports::Linkage::STATIC, - Supports::ToolsetVersion::V141)); - } - }; -} diff --git a/toolsrc/src/tests_package_spec.cpp b/toolsrc/src/tests_package_spec.cpp deleted file mode 100644 index a6b9d5b13..000000000 --- a/toolsrc/src/tests_package_spec.cpp +++ /dev/null @@ -1,119 +0,0 @@ -#include "BinaryParagraph.h" -#include "CppUnitTest.h" -#include "Paragraphs.h" -#include "vcpkg_Strings.h" - -#pragma comment(lib, "version") -#pragma comment(lib, "winhttp") - -using namespace Microsoft::VisualStudio::CppUnitTestFramework; - -namespace Microsoft::VisualStudio::CppUnitTestFramework -{ - 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()); - } -} - -namespace Strings = vcpkg::Strings; - -namespace UnitTest1 -{ - using namespace vcpkg; - - class SpecifierConversion : public TestClass - { - TEST_METHOD(full_package_spec_to_feature_specs) - { - auto a_spec = PackageSpec::from_name_and_triplet("a", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); - auto b_spec = PackageSpec::from_name_and_triplet("b", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); - - auto fspecs = FullPackageSpec::to_feature_specs({{a_spec, {"0", "1"}}, {b_spec, {"2", "3"}}}); - - Assert::AreEqual(size_t(6), fspecs.size()); - - std::array features = {"", "0", "1", "", "2", "3"}; - std::array specs = {&a_spec, &a_spec, &a_spec, &b_spec, &b_spec, &b_spec}; - - for (size_t i = 0; i < features.size(); ++i) - { - Assert::AreEqual(features[i], fspecs[i].feature().c_str()); - Assert::AreEqual(*specs[i], fspecs[i].spec()); - } - } - }; - - class SpecifierParsing : public TestClass - { - TEST_METHOD(parsed_specifier_from_string) - { - auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib"); - Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); - auto spec = maybe_spec.get(); - Assert::AreEqual("zlib", spec->name.c_str()); - Assert::AreEqual(size_t(0), spec->features.size()); - Assert::AreEqual("", spec->triplet.c_str()); - } - - TEST_METHOD(parsed_specifier_from_string_with_triplet) - { - auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib:x64-uwp"); - Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); - auto spec = maybe_spec.get(); - Assert::AreEqual("zlib", spec->name.c_str()); - Assert::AreEqual("x64-uwp", spec->triplet.c_str()); - } - - TEST_METHOD(parsed_specifier_from_string_with_colons) - { - auto ec = vcpkg::ParsedSpecifier::from_string("zlib:x86-uwp:").error(); - Assert::AreEqual(vcpkg::PackageSpecParseResult::TOO_MANY_COLONS, ec); - } - - TEST_METHOD(parsed_specifier_from_string_with_feature) - { - auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[feature]:x64-uwp"); - Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); - auto spec = maybe_spec.get(); - Assert::AreEqual("zlib", spec->name.c_str()); - Assert::IsTrue(spec->features.size() == 1); - Assert::AreEqual("feature", spec->features.front().c_str()); - Assert::AreEqual("x64-uwp", spec->triplet.c_str()); - } - - TEST_METHOD(parsed_specifier_from_string_with_many_features) - { - auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[0, 1,2]"); - Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); - auto spec = maybe_spec.get(); - Assert::AreEqual("zlib", spec->name.c_str()); - Assert::IsTrue(spec->features.size() == 3); - Assert::AreEqual("0", spec->features[0].c_str()); - Assert::AreEqual("1", spec->features[1].c_str()); - Assert::AreEqual("2", spec->features[2].c_str()); - Assert::AreEqual("", spec->triplet.c_str()); - } - - TEST_METHOD(utf8_to_utf16) - { - auto str = vcpkg::Strings::to_utf16("abc"); - Assert::AreEqual(L"abc", str.c_str()); - } - - TEST_METHOD(utf8_to_utf16_with_whitespace) - { - auto str = vcpkg::Strings::to_utf16("abc -x86-windows"); - Assert::AreEqual(L"abc -x86-windows", str.c_str()); - } - }; - - TEST_CLASS(Metrics){}; -} diff --git a/toolsrc/src/tests_paragraph.cpp b/toolsrc/src/tests_paragraph.cpp deleted file mode 100644 index 47a07e12d..000000000 --- a/toolsrc/src/tests_paragraph.cpp +++ /dev/null @@ -1,388 +0,0 @@ -#include "BinaryParagraph.h" -#include "CppUnitTest.h" -#include "Paragraphs.h" -#include "vcpkg_Strings.h" - -#pragma comment(lib, "version") -#pragma comment(lib, "winhttp") - -using namespace Microsoft::VisualStudio::CppUnitTestFramework; - -namespace Microsoft::VisualStudio::CppUnitTestFramework -{ - template<> - inline std::wstring ToString(const vcpkg::PackageSpecParseResult& t) - { - return ToString(static_cast(t)); - } -} - -namespace Strings = vcpkg::Strings; - -namespace UnitTest1 -{ - class ControlParsing : public TestClass - { - TEST_METHOD(SourceParagraph_Construct_Minimum) - { - auto m_pgh = - vcpkg::SourceControlFile::parse_control_file(std::vector>{{ - {"Source", "zlib"}, - {"Version", "1.2.8"}, - }}); - - Assert::IsTrue(m_pgh.has_value()); - auto& pgh = *m_pgh.get(); - - Assert::AreEqual("zlib", pgh->core_paragraph->name.c_str()); - Assert::AreEqual("1.2.8", pgh->core_paragraph->version.c_str()); - Assert::AreEqual("", pgh->core_paragraph->maintainer.c_str()); - Assert::AreEqual("", pgh->core_paragraph->description.c_str()); - Assert::AreEqual(size_t(0), pgh->core_paragraph->depends.size()); - } - - TEST_METHOD(SourceParagraph_Construct_Maximum) - { - auto m_pgh = - vcpkg::SourceControlFile::parse_control_file(std::vector>{{ - {"Source", "s"}, - {"Version", "v"}, - {"Maintainer", "m"}, - {"Description", "d"}, - {"Build-Depends", "bd"}, - {"Supports", "x64"}, - }}); - Assert::IsTrue(m_pgh.has_value()); - auto& pgh = *m_pgh.get(); - - Assert::AreEqual("s", pgh->core_paragraph->name.c_str()); - Assert::AreEqual("v", pgh->core_paragraph->version.c_str()); - Assert::AreEqual("m", pgh->core_paragraph->maintainer.c_str()); - Assert::AreEqual("d", pgh->core_paragraph->description.c_str()); - Assert::AreEqual(size_t(1), pgh->core_paragraph->depends.size()); - Assert::AreEqual("bd", pgh->core_paragraph->depends[0].name().c_str()); - Assert::AreEqual(size_t(1), pgh->core_paragraph->supports.size()); - Assert::AreEqual("x64", pgh->core_paragraph->supports[0].c_str()); - } - - TEST_METHOD(SourceParagraph_Two_Depends) - { - auto m_pgh = - vcpkg::SourceControlFile::parse_control_file(std::vector>{{ - {"Source", "zlib"}, - {"Version", "1.2.8"}, - {"Build-Depends", "z, openssl"}, - }}); - Assert::IsTrue(m_pgh.has_value()); - auto& pgh = *m_pgh.get(); - - Assert::AreEqual(size_t(2), pgh->core_paragraph->depends.size()); - Assert::AreEqual("z", pgh->core_paragraph->depends[0].name().c_str()); - Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name().c_str()); - } - - TEST_METHOD(SourceParagraph_Three_Depends) - { - auto m_pgh = - vcpkg::SourceControlFile::parse_control_file(std::vector>{{ - {"Source", "zlib"}, - {"Version", "1.2.8"}, - {"Build-Depends", "z, openssl, xyz"}, - }}); - Assert::IsTrue(m_pgh.has_value()); - auto& pgh = *m_pgh.get(); - - Assert::AreEqual(size_t(3), pgh->core_paragraph->depends.size()); - Assert::AreEqual("z", pgh->core_paragraph->depends[0].name().c_str()); - Assert::AreEqual("openssl", pgh->core_paragraph->depends[1].name().c_str()); - Assert::AreEqual("xyz", pgh->core_paragraph->depends[2].name().c_str()); - } - - TEST_METHOD(SourceParagraph_Three_Supports) - { - auto m_pgh = - vcpkg::SourceControlFile::parse_control_file(std::vector>{{ - {"Source", "zlib"}, - {"Version", "1.2.8"}, - {"Supports", "x64, windows, uwp"}, - }}); - Assert::IsTrue(m_pgh.has_value()); - auto& pgh = *m_pgh.get(); - - Assert::AreEqual(size_t(3), pgh->core_paragraph->supports.size()); - Assert::AreEqual("x64", pgh->core_paragraph->supports[0].c_str()); - Assert::AreEqual("windows", pgh->core_paragraph->supports[1].c_str()); - Assert::AreEqual("uwp", pgh->core_paragraph->supports[2].c_str()); - } - - TEST_METHOD(SourceParagraph_Construct_Qualified_Depends) - { - auto m_pgh = - vcpkg::SourceControlFile::parse_control_file(std::vector>{{ - {"Source", "zlib"}, - {"Version", "1.2.8"}, - {"Build-Depends", "libA (windows), libB (uwp)"}, - }}); - Assert::IsTrue(m_pgh.has_value()); - auto& pgh = *m_pgh.get(); - - Assert::AreEqual("zlib", pgh->core_paragraph->name.c_str()); - Assert::AreEqual("1.2.8", pgh->core_paragraph->version.c_str()); - Assert::AreEqual("", pgh->core_paragraph->maintainer.c_str()); - Assert::AreEqual("", pgh->core_paragraph->description.c_str()); - Assert::AreEqual(size_t(2), pgh->core_paragraph->depends.size()); - Assert::AreEqual("libA", pgh->core_paragraph->depends[0].name().c_str()); - Assert::AreEqual("windows", pgh->core_paragraph->depends[0].qualifier.c_str()); - Assert::AreEqual("libB", pgh->core_paragraph->depends[1].name().c_str()); - Assert::AreEqual("uwp", pgh->core_paragraph->depends[1].qualifier.c_str()); - } - - TEST_METHOD(BinaryParagraph_Construct_Minimum) - { - vcpkg::BinaryParagraph pgh({ - {"Package", "zlib"}, - {"Version", "1.2.8"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - }); - - Assert::AreEqual("zlib", pgh.spec.name().c_str()); - Assert::AreEqual("1.2.8", pgh.version.c_str()); - Assert::AreEqual("", pgh.maintainer.c_str()); - Assert::AreEqual("", pgh.description.c_str()); - Assert::AreEqual("x86-windows", pgh.spec.triplet().canonical_name().c_str()); - Assert::AreEqual(size_t(0), pgh.depends.size()); - } - - TEST_METHOD(BinaryParagraph_Construct_Maximum) - { - vcpkg::BinaryParagraph pgh({ - {"Package", "s"}, - {"Version", "v"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Maintainer", "m"}, - {"Description", "d"}, - {"Depends", "bd"}, - }); - Assert::AreEqual("s", pgh.spec.name().c_str()); - Assert::AreEqual("v", pgh.version.c_str()); - Assert::AreEqual("m", pgh.maintainer.c_str()); - Assert::AreEqual("d", pgh.description.c_str()); - Assert::AreEqual(size_t(1), pgh.depends.size()); - Assert::AreEqual("bd", pgh.depends[0].c_str()); - } - - TEST_METHOD(BinaryParagraph_Three_Depends) - { - vcpkg::BinaryParagraph pgh({ - {"Package", "zlib"}, - {"Version", "1.2.8"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", "a, b, c"}, - }); - - Assert::AreEqual(size_t(3), pgh.depends.size()); - Assert::AreEqual("a", pgh.depends[0].c_str()); - Assert::AreEqual("b", pgh.depends[1].c_str()); - Assert::AreEqual("c", pgh.depends[2].c_str()); - } - - TEST_METHOD(parse_paragraphs_empty) - { - const char* str = ""; - auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); - Assert::IsTrue(pghs.empty()); - } - - TEST_METHOD(parse_paragraphs_one_field) - { - const char* str = "f1: v1"; - auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(size_t(1), pghs.size()); - Assert::AreEqual(size_t(1), pghs[0].size()); - Assert::AreEqual("v1", pghs[0]["f1"].c_str()); - } - - TEST_METHOD(parse_paragraphs_one_pgh) - { - const char* str = "f1: v1\n" - "f2: v2"; - auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(size_t(1), pghs.size()); - Assert::AreEqual(size_t(2), pghs[0].size()); - Assert::AreEqual("v1", pghs[0]["f1"].c_str()); - Assert::AreEqual("v2", pghs[0]["f2"].c_str()); - } - - TEST_METHOD(parse_paragraphs_two_pgh) - { - const char* str = "f1: v1\n" - "f2: v2\n" - "\n" - "f3: v3\n" - "f4: v4"; - auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(size_t(2), pghs.size()); - Assert::AreEqual(size_t(2), pghs[0].size()); - Assert::AreEqual("v1", pghs[0]["f1"].c_str()); - Assert::AreEqual("v2", pghs[0]["f2"].c_str()); - Assert::AreEqual(size_t(2), pghs[1].size()); - Assert::AreEqual("v3", pghs[1]["f3"].c_str()); - Assert::AreEqual("v4", pghs[1]["f4"].c_str()); - } - - TEST_METHOD(parse_paragraphs_field_names) - { - const char* str = "1:\n" - "f:\n" - "F:\n" - "0:\n" - "F-2:\n"; - auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(size_t(1), pghs.size()); - Assert::AreEqual(size_t(5), pghs[0].size()); - } - - TEST_METHOD(parse_paragraphs_multiple_blank_lines) - { - const char* str = "f1: v1\n" - "f2: v2\n" - "\n" - "\n" - "f3: v3\n" - "f4: v4"; - auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(size_t(2), pghs.size()); - } - - TEST_METHOD(parse_paragraphs_empty_fields) - { - const char* str = "f1:\n" - "f2: "; - auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(size_t(1), pghs.size()); - Assert::AreEqual(size_t(2), pghs[0].size()); - Assert::AreEqual("", pghs[0]["f1"].c_str()); - Assert::AreEqual("", pghs[0]["f2"].c_str()); - Assert::AreEqual(size_t(2), pghs[0].size()); - } - - TEST_METHOD(parse_paragraphs_multiline_fields) - { - const char* str = "f1: simple\n" - " f1\r\n" - "f2:\r\n" - " f2\r\n" - " continue\r\n"; - auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(size_t(1), pghs.size()); - Assert::AreEqual("simple\n f1", pghs[0]["f1"].c_str()); - Assert::AreEqual("\n f2\n continue", pghs[0]["f2"].c_str()); - } - - TEST_METHOD(parse_paragraphs_crlfs) - { - const char* str = "f1: v1\r\n" - "f2: v2\r\n" - "\r\n" - "f3: v3\r\n" - "f4: v4"; - auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(size_t(2), pghs.size()); - Assert::AreEqual(size_t(2), pghs[0].size()); - Assert::AreEqual("v1", pghs[0]["f1"].c_str()); - Assert::AreEqual("v2", pghs[0]["f2"].c_str()); - Assert::AreEqual(size_t(2), pghs[1].size()); - Assert::AreEqual("v3", pghs[1]["f3"].c_str()); - Assert::AreEqual("v4", pghs[1]["f4"].c_str()); - } - - TEST_METHOD(parse_paragraphs_comment) - { - const char* str = "f1: v1\r\n" - "#comment\r\n" - "f2: v2\r\n" - "#comment\r\n" - "\r\n" - "#comment\r\n" - "f3: v3\r\n" - "#comment\r\n" - "f4: v4"; - auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(size_t(2), pghs.size()); - Assert::AreEqual(size_t(2), pghs[0].size()); - Assert::AreEqual("v1", pghs[0]["f1"].c_str()); - Assert::AreEqual("v2", pghs[0]["f2"].c_str()); - Assert::AreEqual(size_t(2), pghs[1].size()); - Assert::AreEqual("v3", pghs[1]["f3"].c_str()); - Assert::AreEqual("v4", pghs[1]["f4"].c_str()); - } - - TEST_METHOD(parse_comment_before_single_slashN) - { - const char* str = "f1: v1\r\n" - "#comment\n"; - auto pghs = vcpkg::Paragraphs::parse_paragraphs(str).value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(size_t(1), pghs[0].size()); - Assert::AreEqual("v1", pghs[0]["f1"].c_str()); - } - - TEST_METHOD(BinaryParagraph_serialize_min) - { - vcpkg::BinaryParagraph pgh({ - {"Package", "zlib"}, - {"Version", "1.2.8"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - }); - std::string ss = Strings::serialize(pgh); - auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(size_t(1), pghs.size()); - Assert::AreEqual(size_t(4), pghs[0].size()); - Assert::AreEqual("zlib", pghs[0]["Package"].c_str()); - Assert::AreEqual("1.2.8", pghs[0]["Version"].c_str()); - Assert::AreEqual("x86-windows", pghs[0]["Architecture"].c_str()); - Assert::AreEqual("same", pghs[0]["Multi-Arch"].c_str()); - } - - TEST_METHOD(BinaryParagraph_serialize_max) - { - vcpkg::BinaryParagraph pgh({ - {"Package", "zlib"}, - {"Version", "1.2.8"}, - {"Architecture", "x86-windows"}, - {"Description", "first line\n second line"}, - {"Maintainer", "abc "}, - {"Depends", "dep"}, - {"Multi-Arch", "same"}, - }); - std::string ss = Strings::serialize(pgh); - auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(size_t(1), pghs.size()); - Assert::AreEqual(size_t(7), pghs[0].size()); - Assert::AreEqual("zlib", pghs[0]["Package"].c_str()); - Assert::AreEqual("1.2.8", pghs[0]["Version"].c_str()); - Assert::AreEqual("x86-windows", pghs[0]["Architecture"].c_str()); - Assert::AreEqual("same", pghs[0]["Multi-Arch"].c_str()); - Assert::AreEqual("first line\n second line", pghs[0]["Description"].c_str()); - Assert::AreEqual("dep", pghs[0]["Depends"].c_str()); - } - - TEST_METHOD(BinaryParagraph_serialize_multiple_deps) - { - vcpkg::BinaryParagraph pgh({ - {"Package", "zlib"}, - {"Version", "1.2.8"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", "a, b, c"}, - }); - std::string ss = Strings::serialize(pgh); - auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(size_t(1), pghs.size()); - Assert::AreEqual("a, b, c", pghs[0]["Depends"].c_str()); - } - }; -} diff --git a/toolsrc/src/triplet.cpp b/toolsrc/src/triplet.cpp deleted file mode 100644 index 3b56da02a..000000000 --- a/toolsrc/src/triplet.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include "pch.h" - -#include "Triplet.h" -#include "vcpkg_Checks.h" -#include "vcpkg_Strings.h" - -namespace vcpkg -{ - struct TripletInstance - { - TripletInstance(std::string&& s) : value(std::move(s)), hash(std::hash()(value)) {} - - const std::string value; - const size_t hash = 0; - - bool operator==(const TripletInstance& o) const { return o.value == value; } - }; - const TripletInstance Triplet::DEFAULT_INSTANCE({}); -} - -template<> -struct std::hash -{ - size_t operator()(const vcpkg::TripletInstance& t) const { return t.hash; } -}; - -namespace vcpkg -{ - static std::unordered_set g_triplet_instances; - - const Triplet Triplet::X86_WINDOWS = from_canonical_name("x86-windows"); - const Triplet Triplet::X64_WINDOWS = from_canonical_name("x64-windows"); - const Triplet Triplet::X86_UWP = from_canonical_name("x86-uwp"); - const Triplet Triplet::X64_UWP = from_canonical_name("x64-uwp"); - const Triplet Triplet::ARM_UWP = from_canonical_name("arm-uwp"); - - bool Triplet::operator==(const Triplet& other) const { return this->m_instance == other.m_instance; } - - bool operator!=(const Triplet& left, const Triplet& right) { return !(left == right); } - - Triplet Triplet::from_canonical_name(const std::string& triplet_as_string) - { - std::string s(Strings::ascii_to_lowercase(triplet_as_string)); - const auto it = std::find(s.cbegin(), s.cend(), '-'); - Checks::check_exit(VCPKG_LINE_INFO, it != s.cend(), "Invalid triplet: %s", triplet_as_string); - - const auto p = g_triplet_instances.emplace(std::move(s)); - return &*p.first; - } - - const std::string& Triplet::canonical_name() const { return this->m_instance->value; } - - const std::string& Triplet::to_string() const { return this->canonical_name(); } - size_t Triplet::hash_code() const { return m_instance->hash; } -} diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 706c641fb..748b4f0ee 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -1,16 +1,18 @@ #define WIN32_LEAN_AND_MEAN #include -#include "Paragraphs.h" -#include "metrics.h" -#include "vcpkg_Chrono.h" -#include "vcpkg_Commands.h" -#include "vcpkg_Files.h" -#include "vcpkg_GlobalState.h" -#include "vcpkg_Input.h" -#include "vcpkg_Strings.h" -#include "vcpkg_System.h" -#include "vcpkglib.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #pragma warning(push) #pragma warning(disable : 4768) #include @@ -19,12 +21,15 @@ #include #include +#pragma comment(lib, "ole32") +#pragma comment(lib, "shell32") + using namespace vcpkg; void invalid_command(const std::string& cmd) { System::println(System::Color::error, "invalid command: %s", cmd); - Commands::Help::print_usage(); + Help::print_usage(); Checks::exit_fail(VCPKG_LINE_INFO); } @@ -33,13 +38,26 @@ static void inner(const VcpkgCmdArguments& args) Metrics::g_metrics.lock()->track_property("command", args.command); if (args.command.empty()) { - Commands::Help::print_usage(); + Help::print_usage(); Checks::exit_fail(VCPKG_LINE_INFO); } - if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_c())) + static const auto find_command = [&](auto&& commands) { + auto it = Util::find_if(commands, [&](auto&& commandc) { + return Strings::case_insensitive_ascii_compare(commandc.name, args.command); + }); + using std::end; + if (it != end(commands)) + { + return &*it; + } + else + return static_cast(nullptr); + }; + + if (const auto command_function = find_command(Commands::get_available_commands_type_c())) { - return command_function(args); + return command_function->function(args); } fs::path vcpkg_root_dir; @@ -74,9 +92,9 @@ static void inner(const VcpkgCmdArguments& args) Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed"); Commands::Version::warn_if_vcpkg_version_mismatch(paths); - if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_b())) + if (const auto command_function = find_command(Commands::get_available_commands_type_b())) { - return command_function(args, paths); + return command_function->function(args, paths); } Triplet default_triplet; @@ -100,9 +118,9 @@ static void inner(const VcpkgCmdArguments& args) Input::check_triplet(default_triplet, paths); - if (const auto command_function = Commands::find(args.command, Commands::get_available_commands_type_a())) + if (const auto command_function = find_command(Commands::get_available_commands_type_a())) { - return command_function(args, paths, default_triplet); + return command_function->function(args, paths, default_triplet); } return invalid_command(args.command); @@ -202,7 +220,7 @@ int wmain(const int argc, const wchar_t* const* const argv) SetConsoleCP(65001); SetConsoleOutputCP(65001); - *GlobalState::timer.lock() = ElapsedTime::create_started(); + *GlobalState::timer.lock() = Chrono::ElapsedTime::create_started(); const std::string trimmed_command_line = trim_path_from_command_line(Strings::to_utf8(GetCommandLineW())); diff --git a/toolsrc/src/vcpkg/base/checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp new file mode 100644 index 000000000..73c7b9b1a --- /dev/null +++ b/toolsrc/src/vcpkg/base/checks.cpp @@ -0,0 +1,81 @@ +#include "pch.h" + +#include +#include + +#include +#include + +namespace vcpkg::Checks +{ + [[noreturn]] static void cleanup_and_exit(const int exit_code) + { + const auto elapsed_us = GlobalState::timer.lock()->microseconds(); + + auto metrics = Metrics::g_metrics.lock(); + metrics->track_metric("elapsed_us", elapsed_us); + GlobalState::debugging = false; + metrics->flush(); + + SetConsoleCP(GlobalState::g_init_console_cp); + SetConsoleOutputCP(GlobalState::g_init_console_output_cp); + + fflush(nullptr); + + ::TerminateProcess(::GetCurrentProcess(), exit_code); + } + + static BOOL ctrl_handler(DWORD fdw_ctrl_type) + { + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_property("CtrlHandler", std::to_string(fdw_ctrl_type)); + locked_metrics->track_property("error", "CtrlHandler was fired."); + } + cleanup_and_exit(EXIT_FAILURE); + } + + void register_console_ctrl_handler() + { + SetConsoleCtrlHandler(reinterpret_cast(ctrl_handler), TRUE); + } + + [[noreturn]] void unreachable(const LineInfo& line_info) + { + System::println(System::Color::error, "Error: Unreachable code was reached"); + System::println(System::Color::error, line_info.to_string()); // Always print line_info here +#ifndef NDEBUG + std::abort(); +#else + cleanup_and_exit(EXIT_FAILURE); +#endif + } + + [[noreturn]] void exit_with_code(const LineInfo& line_info, const int exit_code) + { + Debug::println(System::Color::error, line_info.to_string()); + cleanup_and_exit(exit_code); + } + + [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView error_message) + { + System::println(System::Color::error, error_message); + exit_fail(line_info); + } + + void check_exit(const LineInfo& line_info, bool expression) + { + if (!expression) + { + exit_with_message(line_info, Strings::EMPTY); + } + } + + void check_exit(const LineInfo& line_info, bool expression, const CStringView error_message) + { + if (!expression) + { + exit_with_message(line_info, error_message); + } + } +} diff --git a/toolsrc/src/vcpkg/base/chrono.cpp b/toolsrc/src/vcpkg/base/chrono.cpp new file mode 100644 index 000000000..5d28909fc --- /dev/null +++ b/toolsrc/src/vcpkg/base/chrono.cpp @@ -0,0 +1,61 @@ +#include "pch.h" + +#include +#include + +namespace vcpkg::Chrono +{ + static std::string format_time_userfriendly(const std::chrono::nanoseconds& nanos) + { + using std::chrono::duration_cast; + using std::chrono::hours; + using std::chrono::microseconds; + using std::chrono::milliseconds; + using std::chrono::minutes; + using std::chrono::nanoseconds; + using std::chrono::seconds; + + const double nanos_as_double = static_cast(nanos.count()); + + if (duration_cast(nanos) > hours()) + { + const auto t = nanos_as_double / duration_cast(hours(1)).count(); + return Strings::format("%.4g h", t); + } + + if (duration_cast(nanos) > minutes()) + { + const auto t = nanos_as_double / duration_cast(minutes(1)).count(); + return Strings::format("%.4g min", t); + } + + if (duration_cast(nanos) > seconds()) + { + const auto t = nanos_as_double / duration_cast(seconds(1)).count(); + return Strings::format("%.4g s", t); + } + + if (duration_cast(nanos) > milliseconds()) + { + const auto t = nanos_as_double / duration_cast(milliseconds(1)).count(); + return Strings::format("%.4g ms", t); + } + + if (duration_cast(nanos) > microseconds()) + { + const auto t = nanos_as_double / duration_cast(microseconds(1)).count(); + return Strings::format("%.4g us", t); + } + + return Strings::format("%.4g ns", nanos_as_double); + } + + ElapsedTime ElapsedTime::create_started() + { + ElapsedTime t; + t.m_start_tick = std::chrono::high_resolution_clock::now(); + return t; + } + + std::string ElapsedTime::to_string() const { return format_time_userfriendly(elapsed()); } +} diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp new file mode 100644 index 000000000..5e9c86998 --- /dev/null +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -0,0 +1,308 @@ +#include "pch.h" + +#include +#include + +using namespace std; + +namespace vcpkg::CoffFileReader +{ + template + static T reinterpret_bytes(const char* data) + { + return (*reinterpret_cast(&data[0])); + } + + template + static T read_value_from_stream(fstream& fs) + { + T data; + fs.read(reinterpret_cast(&data), sizeof data); + return data; + } + + template + static T peek_value_from_stream(fstream& fs) + { + const fpos_t original_pos = fs.tellg().seekpos(); + T data; + fs.read(reinterpret_cast(&data), sizeof data); + fs.seekg(original_pos); + return data; + } + + static void verify_equal_strings( + const LineInfo& line_info, const char* expected, const char* actual, int size, const char* label) + { + Checks::check_exit(line_info, + memcmp(expected, actual, size) == 0, + "Incorrect string (%s) found. Expected: (%s) but found (%s)", + label, + expected, + actual); + } + + static void read_and_verify_PE_signature(fstream& fs) + { + static const size_t OFFSET_TO_PE_SIGNATURE_OFFSET = 0x3c; + + static const char* PE_SIGNATURE = "PE\0\0"; + static const size_t PE_SIGNATURE_SIZE = 4; + + fs.seekg(OFFSET_TO_PE_SIGNATURE_OFFSET, ios_base::beg); + const int32_t offset_to_PE_signature = read_value_from_stream(fs); + + fs.seekg(offset_to_PE_signature); + char signature[PE_SIGNATURE_SIZE]; + fs.read(signature, PE_SIGNATURE_SIZE); + verify_equal_strings(VCPKG_LINE_INFO, PE_SIGNATURE, signature, PE_SIGNATURE_SIZE, "PE_SIGNATURE"); + fs.seekg(offset_to_PE_signature + PE_SIGNATURE_SIZE, ios_base::beg); + } + + static fpos_t align_to_size(const uint64_t unaligned, const uint64_t alignment_size) + { + fpos_t aligned = unaligned - 1; + aligned /= alignment_size; + aligned += 1; + aligned *= alignment_size; + return aligned; + } + + struct CoffFileHeader + { + static const size_t HEADER_SIZE = 20; + + static CoffFileHeader read(fstream& fs) + { + CoffFileHeader ret; + ret.data.resize(HEADER_SIZE); + fs.read(&ret.data[0], HEADER_SIZE); + return ret; + } + + MachineType machine_type() const + { + static const size_t MACHINE_TYPE_OFFSET = 0; + static const size_t MACHINE_TYPE_SIZE = 2; + + std::string machine_field_as_string = data.substr(MACHINE_TYPE_OFFSET, MACHINE_TYPE_SIZE); + const uint16_t machine = reinterpret_bytes(machine_field_as_string.c_str()); + return to_machine_type(machine); + } + + private: + std::string data; + }; + + struct ArchiveMemberHeader + { + static const size_t HEADER_SIZE = 60; + + static ArchiveMemberHeader read(fstream& fs) + { + static const size_t HEADER_END_OFFSET = 58; + static const char* HEADER_END = "`\n"; + static const size_t HEADER_END_SIZE = 2; + + ArchiveMemberHeader ret; + ret.data.resize(HEADER_SIZE); + fs.read(&ret.data[0], HEADER_SIZE); + + if (ret.data[0] != '\0') // Due to freeglut. github issue #223 + { + const std::string header_end = ret.data.substr(HEADER_END_OFFSET, HEADER_END_SIZE); + verify_equal_strings( + VCPKG_LINE_INFO, HEADER_END, header_end.c_str(), HEADER_END_SIZE, "LIB HEADER_END"); + } + + return ret; + } + + std::string name() const + { + static const size_t HEADER_NAME_OFFSET = 0; + static const size_t HEADER_NAME_SIZE = 16; + return data.substr(HEADER_NAME_OFFSET, HEADER_NAME_SIZE); + } + + uint64_t member_size() const + { + static const size_t ALIGNMENT_SIZE = 2; + + static const size_t HEADER_SIZE_OFFSET = 48; + static const size_t HEADER_SIZE_FIELD_SIZE = 10; + const std::string as_string = data.substr(HEADER_SIZE_OFFSET, HEADER_SIZE_FIELD_SIZE); + // This is in ASCII decimal representation + const uint64_t value = std::strtoull(as_string.c_str(), nullptr, 10); + + const uint64_t aligned = align_to_size(value, ALIGNMENT_SIZE); + return aligned; + } + + std::string data; + }; + + struct OffsetsArray + { + static OffsetsArray read(fstream& fs, const uint32_t offset_count) + { + static const size_t OFFSET_WIDTH = 4; + + std::string raw_offsets; + const size_t raw_offset_size = offset_count * OFFSET_WIDTH; + raw_offsets.resize(raw_offset_size); + fs.read(&raw_offsets[0], raw_offset_size); + + OffsetsArray ret; + for (uint32_t i = 0; i < offset_count; ++i) + { + const std::string value_as_string = raw_offsets.substr(OFFSET_WIDTH * i, OFFSET_WIDTH * (i + 1)); + const uint32_t value = reinterpret_bytes(value_as_string.c_str()); + + // Ignore offsets that point to offset 0. See vcpkg github #223 #288 #292 + if (value != 0) + { + ret.data.push_back(value); + } + } + + // Sort the offsets, because it is possible for them to be unsorted. See vcpkg github #292 + std::sort(ret.data.begin(), ret.data.end()); + return ret; + } + + std::vector data; + }; + + struct ImportHeader + { + static const size_t HEADER_SIZE = 20; + + static ImportHeader read(fstream& fs) + { + static const size_t SIG1_OFFSET = 0; + static const uint16_t SIG1 = static_cast(MachineType::UNKNOWN); + static const size_t SIG1_SIZE = 2; + + static const size_t SIG2_OFFSET = 2; + static const uint16_t SIG2 = 0xFFFF; + static const size_t SIG2_SIZE = 2; + + ImportHeader ret; + ret.data.resize(HEADER_SIZE); + fs.read(&ret.data[0], HEADER_SIZE); + + const std::string sig1_as_string = ret.data.substr(SIG1_OFFSET, SIG1_SIZE); + const uint16_t sig1 = reinterpret_bytes(sig1_as_string.c_str()); + Checks::check_exit(VCPKG_LINE_INFO, sig1 == SIG1, "Sig1 was incorrect. Expected %s but got %s", SIG1, sig1); + + const std::string sig2_as_string = ret.data.substr(SIG2_OFFSET, SIG2_SIZE); + const uint16_t sig2 = reinterpret_bytes(sig2_as_string.c_str()); + Checks::check_exit(VCPKG_LINE_INFO, sig2 == SIG2, "Sig2 was incorrect. Expected %s but got %s", SIG2, sig2); + + return ret; + } + + MachineType machine_type() const + { + static const size_t MACHINE_TYPE_OFFSET = 6; + static const size_t MACHINE_TYPE_SIZE = 2; + + std::string machine_field_as_string = data.substr(MACHINE_TYPE_OFFSET, MACHINE_TYPE_SIZE); + const uint16_t machine = reinterpret_bytes(machine_field_as_string.c_str()); + return to_machine_type(machine); + } + + private: + std::string data; + }; + + static void read_and_verify_archive_file_signature(fstream& fs) + { + static const char* FILE_START = "!\n"; + static const size_t FILE_START_SIZE = 8; + + fs.seekg(fs.beg); + + char file_start[FILE_START_SIZE]; + fs.read(file_start, FILE_START_SIZE); + verify_equal_strings(VCPKG_LINE_INFO, FILE_START, file_start, FILE_START_SIZE, "LIB FILE_START"); + } + + DllInfo read_dll(const fs::path& path) + { + std::fstream fs(path, std::ios::in | std::ios::binary | std::ios::ate); + Checks::check_exit(VCPKG_LINE_INFO, fs.is_open(), "Could not open file %s for reading", path.generic_string()); + + read_and_verify_PE_signature(fs); + CoffFileHeader header = CoffFileHeader::read(fs); + const MachineType machine = header.machine_type(); + return {machine}; + } + + struct Marker + { + void set_to_offset(const fpos_t position) { this->m_absolute_position = position; } + + void set_to_current_pos(fstream& fs) { this->m_absolute_position = fs.tellg().seekpos(); } + + void seek_to_marker(fstream& fs) const { fs.seekg(this->m_absolute_position, ios_base::beg); } + + void advance_by(const uint64_t offset) { this->m_absolute_position += offset; } + + private: + fpos_t m_absolute_position = 0; + }; + + LibInfo read_lib(const fs::path& path) + { + std::fstream fs(path, std::ios::in | std::ios::binary | std::ios::ate); + Checks::check_exit(VCPKG_LINE_INFO, fs.is_open(), "Could not open file %s for reading", path.generic_string()); + + read_and_verify_archive_file_signature(fs); + + Marker marker; + marker.set_to_current_pos(fs); + + // First Linker Member + const ArchiveMemberHeader first_linker_member_header = ArchiveMemberHeader::read(fs); + Checks::check_exit(VCPKG_LINE_INFO, + first_linker_member_header.name().substr(0, 2) == "/ ", + "Could not find proper first linker member"); + marker.advance_by(ArchiveMemberHeader::HEADER_SIZE + first_linker_member_header.member_size()); + marker.seek_to_marker(fs); + + const ArchiveMemberHeader second_linker_member_header = ArchiveMemberHeader::read(fs); + Checks::check_exit(VCPKG_LINE_INFO, + second_linker_member_header.name().substr(0, 2) == "/ ", + "Could not find proper second linker member"); + // The first 4 bytes contains the number of archive members + const uint32_t archive_member_count = read_value_from_stream(fs); + const OffsetsArray offsets = OffsetsArray::read(fs, archive_member_count); + marker.advance_by(ArchiveMemberHeader::HEADER_SIZE + second_linker_member_header.member_size()); + marker.seek_to_marker(fs); + + const bool hasLongnameMemberHeader = peek_value_from_stream(fs) == 0x2F2F; + if (hasLongnameMemberHeader) + { + const ArchiveMemberHeader longnames_member_header = ArchiveMemberHeader::read(fs); + marker.advance_by(ArchiveMemberHeader::HEADER_SIZE + longnames_member_header.member_size()); + marker.seek_to_marker(fs); + } + + std::set machine_types; + // Next we have the obj and pseudo-object files + for (const uint32_t offset : offsets.data) + { + marker.set_to_offset(offset + ArchiveMemberHeader::HEADER_SIZE); // Skip the header, no need to read it. + marker.seek_to_marker(fs); + const uint16_t first_two_bytes = peek_value_from_stream(fs); + const bool isImportHeader = to_machine_type(first_two_bytes) == MachineType::UNKNOWN; + const MachineType machine = + isImportHeader ? ImportHeader::read(fs).machine_type() : CoffFileHeader::read(fs).machine_type(); + machine_types.insert(machine); + } + + return {std::vector(machine_types.cbegin(), machine_types.cend())}; + } +} diff --git a/toolsrc/src/vcpkg/base/enums.cpp b/toolsrc/src/vcpkg/base/enums.cpp new file mode 100644 index 000000000..aa124f3aa --- /dev/null +++ b/toolsrc/src/vcpkg/base/enums.cpp @@ -0,0 +1,14 @@ +#include "pch.h" + +#include +#include + +namespace vcpkg::Enums +{ + std::string nullvalue_to_string(const CStringView enum_name) { return Strings::format("%s_NULLVALUE", enum_name); } + + [[noreturn]] void nullvalue_used(const LineInfo& line_info, const CStringView enum_name) + { + Checks::exit_with_message(line_info, "NULLVALUE of enum %s was used", enum_name); + } +} diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp new file mode 100644 index 000000000..f8b239eaa --- /dev/null +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -0,0 +1,208 @@ +#include "pch.h" + +#include +#include +#include + +namespace vcpkg::Files +{ + static const std::regex FILESYSTEM_INVALID_CHARACTERS_REGEX = std::regex(R"([\/:*?"<>|])"); + + struct RealFilesystem final : Filesystem + { + virtual Expected read_contents(const fs::path& file_path) const override + { + std::fstream file_stream(file_path, std::ios_base::in | std::ios_base::binary); + if (file_stream.fail()) + { + return std::make_error_code(std::errc::no_such_file_or_directory); + } + + file_stream.seekg(0, file_stream.end); + auto length = file_stream.tellg(); + file_stream.seekg(0, file_stream.beg); + + if (length > SIZE_MAX) + { + return std::make_error_code(std::errc::file_too_large); + } + + std::string output; + output.resize(static_cast(length)); + file_stream.read(&output[0], length); + file_stream.close(); + + return std::move(output); + } + virtual Expected> read_lines(const fs::path& file_path) const override + { + std::fstream file_stream(file_path, std::ios_base::in | std::ios_base::binary); + if (file_stream.fail()) + { + return std::make_error_code(std::errc::no_such_file_or_directory); + } + + std::vector output; + std::string line; + while (std::getline(file_stream, line)) + { + output.push_back(line); + } + file_stream.close(); + + return std::move(output); + } + virtual fs::path find_file_recursively_up(const fs::path& starting_dir, + const std::string& filename) const override + { + fs::path current_dir = starting_dir; + for (; !current_dir.empty(); current_dir = current_dir.parent_path()) + { + const fs::path candidate = current_dir / filename; + if (exists(candidate)) + { + break; + } + } + + return current_dir; + } + + virtual std::vector get_files_recursive(const fs::path& dir) const override + { + std::vector ret; + + fs::stdfs::recursive_directory_iterator b(dir), e{}; + for (; b != e; ++b) + { + ret.push_back(b->path()); + } + + return ret; + } + + virtual std::vector get_files_non_recursive(const fs::path& dir) const override + { + std::vector ret; + + fs::stdfs::directory_iterator b(dir), e{}; + for (; b != e; ++b) + { + ret.push_back(b->path()); + } + + return ret; + } + + virtual void write_lines(const fs::path& file_path, const std::vector& lines) override + { + std::fstream output(file_path, std::ios_base::out | std::ios_base::binary | std::ios_base::trunc); + for (const std::string& line : lines) + { + output << line << "\n"; + } + output.close(); + } + + virtual void rename(const fs::path& oldpath, const fs::path& newpath) override + { + fs::stdfs::rename(oldpath, newpath); + } + virtual bool remove(const fs::path& path) override { return fs::stdfs::remove(path); } + 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); + + 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); + } + + if (this->exists(path)) + { + System::println(System::Color::warning, + "Some files in %s were unable to be removed. Close any editors operating in this " + "directory and retry.", + path.string()); + } + + return out; + } + 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); } + virtual bool is_regular_file(const fs::path& path) const override { return fs::stdfs::is_regular_file(path); } + virtual bool is_empty(const fs::path& path) const override { return fs::stdfs::is_empty(path); } + virtual bool create_directory(const fs::path& path, std::error_code& ec) override + { + return fs::stdfs::create_directory(path, ec); + } + virtual bool create_directories(const fs::path& path, std::error_code& ec) override + { + return fs::stdfs::create_directories(path, ec); + } + virtual void copy(const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts) override + { + fs::stdfs::copy(oldpath, newpath, opts); + } + virtual bool copy_file(const fs::path& oldpath, + const fs::path& newpath, + fs::copy_options opts, + std::error_code& ec) override + { + return fs::stdfs::copy_file(oldpath, newpath, opts, ec); + } + + virtual fs::file_status status(const fs::path& path, std::error_code& ec) const override + { + return fs::stdfs::status(path, ec); + } + virtual void write_contents(const fs::path& file_path, const std::string& data) override + { + FILE* f = nullptr; + auto ec = _wfopen_s(&f, file_path.native().c_str(), L"wb"); + Checks::check_exit( + VCPKG_LINE_INFO, ec == 0, "Error: Could not open file for writing: %s", file_path.u8string().c_str()); + auto count = fwrite(data.data(), sizeof(data[0]), data.size(), f); + fclose(f); + + Checks::check_exit(VCPKG_LINE_INFO, count == data.size()); + } + }; + + Filesystem& get_real_filesystem() + { + static RealFilesystem real_fs; + return real_fs; + } + + bool has_invalid_chars_for_filesystem(const std::string& s) + { + return std::regex_search(s, FILESYSTEM_INVALID_CHARACTERS_REGEX); + } + + void print_paths(const std::vector& paths) + { + System::println(); + for (const fs::path& p : paths) + { + System::println(" %s", p.generic_string()); + } + System::println(); + } + + std::vector find_from_PATH(const std::wstring& name) + { + const std::wstring cmd = Strings::wformat(L"where.exe %s", name); + auto out = System::cmd_execute_and_capture_output(cmd); + if (out.exit_code != 0) + { + return {}; + } + + return Util::fmap(Strings::split(out.output, "\n"), [](auto&& s) { return fs::path(s); }); + } +} diff --git a/toolsrc/src/vcpkg/base/lineinfo.cpp b/toolsrc/src/vcpkg/base/lineinfo.cpp new file mode 100644 index 000000000..7435ed666 --- /dev/null +++ b/toolsrc/src/vcpkg/base/lineinfo.cpp @@ -0,0 +1,9 @@ +#include "pch.h" + +#include +#include + +namespace vcpkg +{ + std::string LineInfo::to_string() const { return Strings::format("%s(%d)", this->file_name, this->line_number); } +} diff --git a/toolsrc/src/vcpkg/base/machinetype.cpp b/toolsrc/src/vcpkg/base/machinetype.cpp new file mode 100644 index 000000000..2b7bd5e3a --- /dev/null +++ b/toolsrc/src/vcpkg/base/machinetype.cpp @@ -0,0 +1,41 @@ +#include "pch.h" + +#include +#include + +namespace vcpkg +{ + MachineType to_machine_type(const uint16_t value) + { + const MachineType t = static_cast(value); + switch (t) + { + case MachineType::UNKNOWN: + case MachineType::AM33: + case MachineType::AMD64: + case MachineType::ARM: + case MachineType::ARM64: + case MachineType::ARMNT: + case MachineType::EBC: + case MachineType::I386: + case MachineType::IA64: + case MachineType::M32R: + case MachineType::MIPS16: + case MachineType::MIPSFPU: + case MachineType::MIPSFPU16: + case MachineType::POWERPC: + case MachineType::POWERPCFP: + case MachineType::R4000: + case MachineType::RISCV32: + case MachineType::RISCV64: + case MachineType::RISCV128: + case MachineType::SH3: + case MachineType::SH3DSP: + case MachineType::SH4: + case MachineType::SH5: + case MachineType::THUMB: + case MachineType::WCEMIPSV2: return t; + default: Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown machine type code 0x%x", value); + } + } +} diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp new file mode 100644 index 000000000..2a6d3dff2 --- /dev/null +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -0,0 +1,174 @@ +#include "pch.h" + +#include +#include +#include + +namespace vcpkg::Strings::details +{ + // To disambiguate between two overloads + static const auto isspace = [](const char c) { return std::isspace(c); }; + + // Avoids C4244 warnings because of char<->int conversion that occur when using std::tolower() + static char tolower_char(const char c) { return static_cast(std::tolower(c)); } + +#if defined(_WIN32) + static _locale_t& c_locale() + { + static _locale_t c_locale_impl = _create_locale(LC_ALL, "C"); + return c_locale_impl; + } +#endif + + std::string format_internal(const char* fmtstr, ...) + { + va_list args; + va_start(args, fmtstr); + +#if defined(_WIN32) + const int sz = _vscprintf_l(fmtstr, c_locale(), args); +#else + const int sz = vsnprintf(nullptr, 0, fmtstr, args); +#endif + Checks::check_exit(VCPKG_LINE_INFO, sz > 0); + + std::string output(sz, '\0'); + +#if defined(_WIN32) + _vsnprintf_s_l(&output.at(0), output.size() + 1, output.size(), fmtstr, c_locale(), args); +#else + vsnprintf(&output.at(0), output.size() + 1, fmtstr, args); +#endif + va_end(args); + + return output; + } + + std::wstring wformat_internal(const wchar_t* fmtstr, ...) + { + va_list args; + va_start(args, fmtstr); + +#if defined(_WIN32) + const int sz = _vscwprintf_l(fmtstr, c_locale(), args); +#else + const int sz = vswprintf(nullptr, 0, fmtstr, args); +#endif + Checks::check_exit(VCPKG_LINE_INFO, sz > 0); + + std::wstring output(sz, L'\0'); + +#if defined(_WIN32) + _vsnwprintf_s_l(&output.at(0), output.size() + 1, output.size(), fmtstr, c_locale(), args); +#else + vswprintf(&output.at(0), output.size() + 1, fmtstr, args); +#endif + va_end(args); + + return output; + } +} + +namespace vcpkg::Strings +{ + std::wstring to_utf16(const CStringView s) + { + const int size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); + std::wstring output; + output.resize(size - 1); + MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, output.data(), size - 1); + return output; + } + + std::string to_utf8(const CWStringView w) + { + const int size = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, nullptr, 0, nullptr, nullptr); + std::string output; + output.resize(size - 1); + WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, output.data(), size - 1, nullptr, nullptr); + return output; + } + + std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern) + { + const std::string pattern_as_lower_case(ascii_to_lowercase(pattern)); + return search(s.begin(), + s.end(), + pattern_as_lower_case.begin(), + pattern_as_lower_case.end(), + [](const char a, const char b) { return details::tolower_char(a) == b; }); + } + + bool case_insensitive_ascii_contains(const std::string& s, const std::string& pattern) + { + return case_insensitive_ascii_find(s, pattern) != s.end(); + } + + bool case_insensitive_ascii_compare(const CStringView left, const CStringView right) + { + return _stricmp(left.c_str(), right.c_str()) == 0; + } + + std::string ascii_to_lowercase(const std::string& input) + { + std::string output(input); + std::transform(output.begin(), output.end(), output.begin(), &details::tolower_char); + return output; + } + + bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern) + { + return _strnicmp(s.c_str(), pattern.c_str(), pattern.size()) == 0; + } + + void trim(std::string* s) + { + s->erase(std::find_if_not(s->rbegin(), s->rend(), details::isspace).base(), s->end()); + s->erase(s->begin(), std::find_if_not(s->begin(), s->end(), details::isspace)); + } + + std::string trimmed(const std::string& s) + { + auto whitespace_back = std::find_if_not(s.rbegin(), s.rend(), details::isspace).base(); + auto whitespace_front = std::find_if_not(s.begin(), whitespace_back, details::isspace); + return std::string(whitespace_front, whitespace_back); + } + + void trim_all_and_remove_whitespace_strings(std::vector* strings) + { + for (std::string& s : *strings) + { + trim(&s); + } + + Util::erase_remove_if(*strings, [](const std::string& s) { return s.empty(); }); + } + + std::vector split(const std::string& s, const std::string& delimiter) + { + std::vector output; + + if (delimiter.empty()) + { + output.push_back(s); + return output; + } + + const size_t delimiter_length = delimiter.length(); + size_t i = 0; + for (size_t pos = s.find(delimiter); pos != std::string::npos; pos = s.find(delimiter, pos)) + { + output.push_back(s.substr(i, pos - i)); + pos += delimiter_length; + i = pos; + } + + // Add the rest of the string after the last delimiter, unless there is nothing after it + if (i != s.length()) + { + output.push_back(s.substr(i, s.length())); + } + + return output; + } +} diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp new file mode 100644 index 000000000..716c2a6a6 --- /dev/null +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -0,0 +1,350 @@ +#include "pch.h" + +#include +#include +#include + +#pragma comment(lib, "Advapi32") + +namespace vcpkg::System +{ + tm get_current_date_time() + { + using std::chrono::system_clock; + std::time_t now_time = system_clock::to_time_t(system_clock::now()); + tm parts; + localtime_s(&parts, &now_time); + return parts; + } + + fs::path get_exe_path_of_current_process() + { + wchar_t buf[_MAX_PATH]; + const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); + if (bytes == 0) std::abort(); + return fs::path(buf, buf + bytes); + } + + Optional to_cpu_architecture(CStringView arch) + { + if (Strings::case_insensitive_ascii_compare(arch, "x86")) return CPUArchitecture::X86; + if (Strings::case_insensitive_ascii_compare(arch, "x64")) return CPUArchitecture::X64; + if (Strings::case_insensitive_ascii_compare(arch, "amd64")) return CPUArchitecture::X64; + if (Strings::case_insensitive_ascii_compare(arch, "arm")) return CPUArchitecture::ARM; + if (Strings::case_insensitive_ascii_compare(arch, "arm64")) return CPUArchitecture::ARM64; + return nullopt; + } + + CPUArchitecture get_host_processor() + { + auto w6432 = get_environment_variable(L"PROCESSOR_ARCHITEW6432"); + if (const auto p = w6432.get()) return to_cpu_architecture(Strings::to_utf8(*p)).value_or_exit(VCPKG_LINE_INFO); + + const auto procarch = get_environment_variable(L"PROCESSOR_ARCHITECTURE").value_or_exit(VCPKG_LINE_INFO); + return to_cpu_architecture(Strings::to_utf8(procarch)).value_or_exit(VCPKG_LINE_INFO); + } + + std::vector get_supported_host_architectures() + { + std::vector supported_architectures; + supported_architectures.push_back(get_host_processor()); + + // AMD64 machines support to run x86 applications + if (supported_architectures.back() == CPUArchitecture::X64) + { + supported_architectures.push_back(CPUArchitecture::X86); + } + + return supported_architectures; + } + + int cmd_execute_clean(const CWStringView cmd_line) + { + static const std::wstring SYSTEM_ROOT = get_environment_variable(L"SystemRoot").value_or_exit(VCPKG_LINE_INFO); + static const std::wstring SYSTEM_32 = SYSTEM_ROOT + LR"(\system32)"; + static const std::wstring NEW_PATH = Strings::wformat( + LR"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", SYSTEM_32, SYSTEM_ROOT, SYSTEM_32, SYSTEM_32); + + std::vector env_wstrings = { + L"ALLUSERSPROFILE", + L"APPDATA", + L"CommonProgramFiles", + L"CommonProgramFiles(x86)", + L"CommonProgramW6432", + L"COMPUTERNAME", + L"ComSpec", + L"HOMEDRIVE", + L"HOMEPATH", + L"LOCALAPPDATA", + L"LOGONSERVER", + L"NUMBER_OF_PROCESSORS", + L"OS", + L"PATHEXT", + L"PROCESSOR_ARCHITECTURE", + L"PROCESSOR_ARCHITEW6432", + L"PROCESSOR_IDENTIFIER", + L"PROCESSOR_LEVEL", + L"PROCESSOR_REVISION", + L"ProgramData", + L"ProgramFiles", + L"ProgramFiles(x86)", + L"ProgramW6432", + L"PROMPT", + L"PSModulePath", + L"PUBLIC", + L"SystemDrive", + L"SystemRoot", + L"TEMP", + L"TMP", + L"USERDNSDOMAIN", + L"USERDOMAIN", + L"USERDOMAIN_ROAMINGPROFILE", + L"USERNAME", + L"USERPROFILE", + L"windir", + // Enables proxy information to be passed to Curl, the underlying download library in cmake.exe + L"HTTP_PROXY", + L"HTTPS_PROXY", + // Enables find_package(CUDA) in CMake + L"CUDA_PATH", + }; + + // Flush stdout before launching external process + fflush(nullptr); + + std::wstring env_cstr; + + for (auto&& env_wstring : env_wstrings) + { + const Optional value = System::get_environment_variable(env_wstring); + const auto v = value.get(); + if (!v || v->empty()) continue; + + env_cstr.append(env_wstring); + env_cstr.push_back(L'='); + env_cstr.append(*v); + env_cstr.push_back(L'\0'); + } + + env_cstr.append(NEW_PATH); + env_cstr.push_back(L'\0'); + + STARTUPINFOW startup_info; + memset(&startup_info, 0, sizeof(STARTUPINFOW)); + startup_info.cb = sizeof(STARTUPINFOW); + + PROCESS_INFORMATION process_info; + memset(&process_info, 0, sizeof(PROCESS_INFORMATION)); + + // Basically we are wrapping it in quotes + std::wstring actual_cmd_line = Strings::wformat(LR"###(cmd.exe /c "%s")###", cmd_line); + Debug::println("CreateProcessW(%s)", Strings::to_utf8(actual_cmd_line)); + bool succeeded = TRUE == CreateProcessW(nullptr, + actual_cmd_line.data(), + nullptr, + nullptr, + FALSE, + BELOW_NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT, + env_cstr.data(), + nullptr, + &startup_info, + &process_info); + + Checks::check_exit(VCPKG_LINE_INFO, succeeded, "Process creation failed with error code: %lu", GetLastError()); + + CloseHandle(process_info.hThread); + + const DWORD result = WaitForSingleObject(process_info.hProcess, INFINITE); + Checks::check_exit(VCPKG_LINE_INFO, result != WAIT_FAILED, "WaitForSingleObject failed"); + + DWORD exit_code = 0; + GetExitCodeProcess(process_info.hProcess, &exit_code); + + Debug::println("CreateProcessW() returned %lu", exit_code); + return static_cast(exit_code); + } + + int cmd_execute(const CWStringView cmd_line) + { + // Flush stdout before launching external process + fflush(nullptr); + + // Basically we are wrapping it in quotes + const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line); + Debug::println("_wsystem(%s)", Strings::to_utf8(actual_cmd_line)); + const int exit_code = _wsystem(actual_cmd_line.c_str()); + Debug::println("_wsystem() returned %d", exit_code); + return exit_code; + } + + // On Win7, output from powershell calls contain a byte order mark, so we strip it out if it is present + static void remove_byte_order_marks(std::wstring* s) + { + const wchar_t* a = s->c_str(); + // This is the UTF-8 byte-order mark + while (s->size() >= 3 && a[0] == 0xEF && a[1] == 0xBB && a[2] == 0xBF) + { + s->erase(0, 3); + } + } + + ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line) + { + // Flush stdout before launching external process + fflush(stdout); + + const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s 2>&1")###", cmd_line); + + Debug::println("_wpopen(%s)", Strings::to_utf8(actual_cmd_line)); + std::wstring output; + wchar_t buf[1024]; + const auto pipe = _wpopen(actual_cmd_line.c_str(), L"r"); + if (pipe == nullptr) + { + return {1, Strings::to_utf8(output)}; + } + while (fgetws(buf, 1024, pipe)) + { + output.append(buf); + } + if (!feof(pipe)) + { + return {1, Strings::to_utf8(output)}; + } + + const auto ec = _pclose(pipe); + Debug::println("_pclose() returned %d", ec); + remove_byte_order_marks(&output); + return {ec, Strings::to_utf8(output)}; + } + + std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args) + { + // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned + return Strings::wformat( + LR"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args); + } + + void println() { println(Strings::EMPTY); } + + void print(const CStringView message) { fputs(message.c_str(), stdout); } + + void println(const CStringView message) + { + print(message); + putchar('\n'); + } + + void print(const Color c, const CStringView message) + { + const HANDLE console_handle = GetStdHandle(STD_OUTPUT_HANDLE); + + CONSOLE_SCREEN_BUFFER_INFO console_screen_buffer_info{}; + GetConsoleScreenBufferInfo(console_handle, &console_screen_buffer_info); + const auto original_color = console_screen_buffer_info.wAttributes; + + SetConsoleTextAttribute(console_handle, static_cast(c) | (original_color & 0xF0)); + print(message); + SetConsoleTextAttribute(console_handle, original_color); + } + + void println(const Color c, const CStringView message) + { + print(c, message); + putchar('\n'); + } + + Optional get_environment_variable(const CWStringView varname) noexcept + { + const auto sz = GetEnvironmentVariableW(varname.c_str(), nullptr, 0); + if (sz == 0) return nullopt; + + std::wstring ret(sz, L'\0'); + + Checks::check_exit(VCPKG_LINE_INFO, MAXDWORD >= ret.size()); + const auto sz2 = GetEnvironmentVariableW(varname.c_str(), ret.data(), static_cast(ret.size())); + Checks::check_exit(VCPKG_LINE_INFO, sz2 + 1 == sz); + ret.pop_back(); + return ret; + } + + static bool is_string_keytype(DWORD hkey_type) + { + return hkey_type == REG_SZ || hkey_type == REG_MULTI_SZ || hkey_type == REG_EXPAND_SZ; + } + + Optional get_registry_string(HKEY base, const CWStringView sub_key, const CWStringView valuename) + { + HKEY k = nullptr; + const LSTATUS ec = RegOpenKeyExW(base, sub_key.c_str(), NULL, KEY_READ, &k); + if (ec != ERROR_SUCCESS) return nullopt; + + DWORD dw_buffer_size = 0; + DWORD dw_type = 0; + auto rc = RegQueryValueExW(k, valuename.c_str(), nullptr, &dw_type, nullptr, &dw_buffer_size); + if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size == 0 || + dw_buffer_size % sizeof(wchar_t) != 0) + return nullopt; + std::wstring ret; + ret.resize(dw_buffer_size / sizeof(wchar_t)); + + rc = RegQueryValueExW( + k, valuename.c_str(), nullptr, &dw_type, reinterpret_cast(ret.data()), &dw_buffer_size); + if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size != sizeof(wchar_t) * ret.size()) + return nullopt; + + ret.pop_back(); // remove extra trailing null byte + return ret; + } + + static const fs::path& get_program_files() + { + static const fs::path PATH = System::get_environment_variable(L"PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO); + return PATH; + } + + const fs::path& get_program_files_32_bit() + { + static const fs::path PATH = []() -> fs::path { + auto value = System::get_environment_variable(L"ProgramFiles(x86)"); + if (auto v = value.get()) + { + return std::move(*v); + } + return get_program_files(); + }(); + return PATH; + } + + const fs::path& get_program_files_platform_bitness() + { + static const fs::path PATH = []() -> fs::path { + auto value = System::get_environment_variable(L"ProgramW6432"); + if (auto v = value.get()) + { + return std::move(*v); + } + return get_program_files(); + }(); + return PATH; + } +} + +namespace vcpkg::Debug +{ + void println(const CStringView message) + { + if (GlobalState::debugging) + { + System::println("[DEBUG] %s", message); + } + } + + void println(const System::Color c, const CStringView message) + { + if (GlobalState::debugging) + { + System::println(c, "[DEBUG] %s", message); + } + } +} diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp new file mode 100644 index 000000000..ef943011f --- /dev/null +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -0,0 +1,123 @@ +#include "pch.h" + +#include +#include +#include + +namespace vcpkg +{ + namespace Fields + { + static const std::string PACKAGE = "Package"; + static const std::string VERSION = "Version"; + static const std::string ARCHITECTURE = "Architecture"; + static const std::string MULTI_ARCH = "Multi-Arch"; + } + + namespace Fields + { + static const std::string FEATURE = "Feature"; + static const std::string DESCRIPTION = "Description"; + static const std::string MAINTAINER = "Maintainer"; + static const std::string DEPENDS = "Depends"; + static const std::string DEFAULTFEATURES = "Default-Features"; + } + + BinaryParagraph::BinaryParagraph() = default; + + BinaryParagraph::BinaryParagraph(std::unordered_map fields) + { + using namespace vcpkg::Parse; + + ParagraphParser parser(std::move(fields)); + + { + std::string name; + parser.required_field(Fields::PACKAGE, name); + std::string architecture; + parser.required_field(Fields::ARCHITECTURE, architecture); + this->spec = PackageSpec::from_name_and_triplet(name, Triplet::from_canonical_name(architecture)) + .value_or_exit(VCPKG_LINE_INFO); + } + + // one or the other + this->version = parser.optional_field(Fields::VERSION); + this->feature = parser.optional_field(Fields::FEATURE); + + this->description = parser.optional_field(Fields::DESCRIPTION); + this->maintainer = parser.optional_field(Fields::MAINTAINER); + + std::string multi_arch; + parser.required_field(Fields::MULTI_ARCH, multi_arch); + + this->depends = parse_comma_list(parser.optional_field(Fields::DEPENDS)); + if (this->feature.empty()) + { + this->default_features = parse_comma_list(parser.optional_field(Fields::DEFAULTFEATURES)); + } + + if (const auto err = parser.error_info(this->spec.to_string())) + { + System::println( + System::Color::error, "Error: while parsing the Binary Paragraph for %s", this->spec.to_string()); + print_error_message(err); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + // prefer failing above when possible because it gives better information + Checks::check_exit(VCPKG_LINE_INFO, multi_arch == "same", "Multi-Arch must be 'same' but was %s", multi_arch); + } + + BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet) + { + this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO); + this->version = spgh.version; + this->description = spgh.description; + this->maintainer = spgh.maintainer; + this->depends = filter_dependencies(spgh.depends, triplet); + } + + BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet) + { + this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO); + this->version = Strings::EMPTY; + this->feature = fpgh.name; + this->description = fpgh.description; + this->maintainer = Strings::EMPTY; + this->depends = filter_dependencies(fpgh.depends, triplet); + } + + std::string BinaryParagraph::displayname() const + { + const auto f = this->feature.empty() ? "core" : this->feature; + return Strings::format("%s[%s]:%s", this->spec.name(), f, this->spec.triplet()); + } + + std::string BinaryParagraph::dir() const { return this->spec.dir(); } + + std::string BinaryParagraph::fullstem() const + { + return Strings::format("%s_%s_%s", this->spec.name(), this->version, this->spec.triplet()); + } + + void serialize(const BinaryParagraph& pgh, std::string& out_str) + { + out_str.append("Package: ").append(pgh.spec.name()).push_back('\n'); + if (!pgh.version.empty()) + out_str.append("Version: ").append(pgh.version).push_back('\n'); + else if (!pgh.feature.empty()) + out_str.append("Feature: ").append(pgh.feature).push_back('\n'); + if (!pgh.depends.empty()) + { + out_str.append("Depends: "); + out_str.append(Strings::join(", ", pgh.depends)); + out_str.push_back('\n'); + } + + out_str.append("Architecture: ").append(pgh.spec.triplet().to_string()).push_back('\n'); + out_str.append("Multi-Arch: same\n"); + + if (!pgh.maintainer.empty()) out_str.append("Maintainer: ").append(pgh.maintainer).push_back('\n'); + if (!pgh.description.empty()) out_str.append("Description: ").append(pgh.description).push_back('\n'); + } +} diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp new file mode 100644 index 000000000..99ec541c1 --- /dev/null +++ b/toolsrc/src/vcpkg/build.cpp @@ -0,0 +1,533 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using vcpkg::Build::BuildResult; +using vcpkg::Parse::ParseControlErrorInfo; +using vcpkg::Parse::ParseExpected; + +namespace vcpkg::Build::Command +{ + using Dependencies::InstallPlanAction; + using Dependencies::InstallPlanType; + + static const std::string OPTION_CHECKS_ONLY = "--checks-only"; + + void perform_and_exit(const FullPackageSpec& full_spec, + const fs::path& port_dir, + const std::unordered_set& options, + const VcpkgPaths& paths) + { + const PackageSpec& spec = full_spec.package_spec; + if (options.find(OPTION_CHECKS_ONLY) != options.end()) + { + 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); + 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); + } + + for (const std::string& str : full_spec.features) + { + System::println("%s \n", str); + } + const auto& scf = source_control_file.value_or_exit(VCPKG_LINE_INFO); + Checks::check_exit(VCPKG_LINE_INFO, + spec.name() == scf->core_paragraph->name, + "The Name: field inside the CONTROL does not match the port directory: '%s' != '%s'", + 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}; + + const Build::BuildPackageConfig build_config{ + *scf->core_paragraph, spec.triplet(), paths.port_dir(spec), build_package_options}; + + const auto result = Build::build_package(paths, build_config, status_db); + if (result.code == BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES) + { + System::println(System::Color::error, + "The build command requires all dependencies to be already installed."); + System::println("The following dependencies are missing:"); + System::println(); + for (const auto& p : result.unmet_dependencies) + { + System::println(" %s", p); + } + System::println(); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + if (result.code != BuildResult::SUCCEEDED) + { + System::println(System::Color::error, Build::create_error_message(result.code, spec)); + System::println(Build::create_user_troubleshooting_message(spec)); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + Checks::exit_success(VCPKG_LINE_INFO); + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + { + static const std::string EXAMPLE = Help::create_example_string("build zlib:x64-windows"); + // Build only takes a single package and all dependencies must already be installed + args.check_exact_arg_count(1, EXAMPLE); + const std::string command_argument = args.command_arguments.at(0); + const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, EXAMPLE); + Input::check_triplet(spec.package_spec.triplet(), paths); + const std::unordered_set options = + args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}); + perform_and_exit(spec, paths.port_dir(spec.package_spec), options, paths); + } +} + +namespace vcpkg::Build +{ + static const std::string NAME_EMPTY_PACKAGE = "PolicyEmptyPackage"; + static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs"; + static const std::string NAME_ONLY_RELEASE_CRT = "PolicyOnlyReleaseCRT"; + static const std::string NAME_EMPTY_INCLUDE_FOLDER = "PolicyEmptyIncludeFolder"; + static const std::string NAME_ALLOW_OBSOLETE_MSVCRT = "PolicyAllowObsoleteMsvcrt"; + + const std::string& to_string(BuildPolicy policy) + { + switch (policy) + { + case BuildPolicy::EMPTY_PACKAGE: return NAME_EMPTY_PACKAGE; + case BuildPolicy::DLLS_WITHOUT_LIBS: return NAME_DLLS_WITHOUT_LIBS; + case BuildPolicy::ONLY_RELEASE_CRT: return NAME_ONLY_RELEASE_CRT; + case BuildPolicy::EMPTY_INCLUDE_FOLDER: return NAME_EMPTY_INCLUDE_FOLDER; + case BuildPolicy::ALLOW_OBSOLETE_MSVCRT: return NAME_ALLOW_OBSOLETE_MSVCRT; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + + CStringView to_cmake_variable(BuildPolicy policy) + { + switch (policy) + { + case BuildPolicy::EMPTY_PACKAGE: return "VCPKG_POLICY_EMPTY_PACKAGE"; + case BuildPolicy::DLLS_WITHOUT_LIBS: return "VCPKG_POLICY_DLLS_WITHOUT_LIBS"; + case BuildPolicy::ONLY_RELEASE_CRT: return "VCPKG_POLICY_ONLY_RELEASE_CRT"; + case BuildPolicy::EMPTY_INCLUDE_FOLDER: return "VCPKG_POLICY_EMPTY_INCLUDE_FOLDER"; + case BuildPolicy::ALLOW_OBSOLETE_MSVCRT: return "VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT"; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + + Optional to_linkage_type(const std::string& str) + { + if (str == "dynamic") return LinkageType::DYNAMIC; + if (str == "static") return LinkageType::STATIC; + return nullopt; + } + + namespace BuildInfoRequiredField + { + static const std::string CRT_LINKAGE = "CRTLinkage"; + static const std::string LIBRARY_LINKAGE = "LibraryLinkage"; + } + + CWStringView to_vcvarsall_target(const std::string& cmake_system_name) + { + if (cmake_system_name == Strings::EMPTY) return Strings::WEMPTY; + if (cmake_system_name == "Windows") return Strings::WEMPTY; + if (cmake_system_name == "WindowsStore") return L"store"; + + Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported vcvarsall target %s", cmake_system_name); + } + + CWStringView to_vcvarsall_toolchain(const std::string& target_architecture, const Toolset& toolset) + { + auto maybe_target_arch = System::to_cpu_architecture(target_architecture); + Checks::check_exit( + VCPKG_LINE_INFO, maybe_target_arch.has_value(), "Invalid architecture string: %s", target_architecture); + auto target_arch = maybe_target_arch.value_or_exit(VCPKG_LINE_INFO); + auto host_architectures = System::get_supported_host_architectures(); + + for (auto&& host : host_architectures) + { + auto it = Util::find_if(toolset.supported_architectures, [&](const ToolsetArchOption& opt) { + return host == opt.host_arch && target_arch == opt.target_arch; + }); + if (it != toolset.supported_architectures.end()) return it->name; + } + + Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported toolchain combination %s", target_architecture); + } + + std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) + { + const wchar_t* tonull = L" >nul"; + if (GlobalState::debugging) + { + tonull = Strings::WEMPTY; + } + + const auto arch = to_vcvarsall_toolchain(pre_build_info.target_architecture, toolset); + const auto target = to_vcvarsall_target(pre_build_info.cmake_system_name); + + return Strings::wformat(LR"("%s" %s %s %s %s 2>&1)", + toolset.vcvarsall.native(), + Strings::join(L" ", toolset.vcvarsall_options), + arch, + target, + tonull); + } + + static void create_binary_feature_control_file(const SourceParagraph& source_paragraph, + const FeatureParagraph& feature_paragraph, + const Triplet& triplet, + BinaryControlFile& bcf) + { + BinaryParagraph bpgh(source_paragraph, feature_paragraph, triplet); + bcf.features.emplace_back(std::move(bpgh)); + } + + static void create_binary_control_file(const SourceParagraph& source_paragraph, + const Triplet& triplet, + const BuildInfo& build_info, + BinaryControlFile& bcf) + { + BinaryParagraph bpgh(source_paragraph, triplet); + if (const auto p_ver = build_info.version.get()) + { + bpgh.version = *p_ver; + } + bcf.core_paragraph = std::move(bpgh); + } + + static void write_binary_control_file(const VcpkgPaths& paths, BinaryControlFile bcf) + { + std::string start = Strings::serialize(bcf.core_paragraph); + for (auto&& feature : bcf.features) + { + start += "\n" + Strings::serialize(feature); + } + const fs::path binary_control_file = paths.packages / bcf.core_paragraph.dir() / "CONTROL"; + paths.get_filesystem().write_contents(binary_control_file, start); + } + + ExtendedBuildResult build_package(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const StatusParagraphs& status_db) + { + const PackageSpec spec = + PackageSpec::from_name_and_triplet(config.src.name, config.triplet).value_or_exit(VCPKG_LINE_INFO); + + const Triplet& triplet = config.triplet; + { + std::vector missing_specs; + for (auto&& dep : filter_dependencies(config.src.depends, triplet)) + { + if (status_db.find_installed(dep, triplet) == status_db.end()) + { + missing_specs.push_back( + PackageSpec::from_name_and_triplet(dep, triplet).value_or_exit(VCPKG_LINE_INFO)); + } + } + // Fail the build if any dependencies were missing + if (!missing_specs.empty()) + { + return {BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES, std::move(missing_specs)}; + } + } + + const fs::path& cmake_exe_path = paths.get_cmake_exe(); + const fs::path& git_exe_path = paths.get_git_exe(); + + const fs::path ports_cmake_script_path = paths.ports_cmake; + const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); + const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); + const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); + + std::string features; + if (GlobalState::feature_packages) + { + if (config.feature_list) + { + for (auto&& feature : *config.feature_list) + { + features.append(feature + ";"); + } + if (features.size() > 0) + { + features.pop_back(); + } + } + } + + const std::wstring cmd_launch_cmake = make_cmake_cmd( + cmake_exe_path, + ports_cmake_script_path, + { + {L"CMD", L"BUILD"}, + {L"PORT", config.src.name}, + {L"CURRENT_PORT_DIR", config.port_dir / "/."}, + {L"TARGET_TRIPLET", triplet.canonical_name()}, + {L"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, + {L"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? L"1" : L"0"}, + {L"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? L"1" : L"0"}, + {L"GIT", git_exe_path}, + {L"FEATURES", features}, + }); + + const std::wstring command = Strings::wformat(LR"(%s && %s)", cmd_set_environment, cmd_launch_cmake); + + const auto timer = Chrono::ElapsedTime::create_started(); + + const int return_code = System::cmd_execute_clean(command); + const auto buildtimeus = timer.microseconds(); + const auto spec_string = spec.to_string(); + + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_metric("buildtimeus-" + spec_string, buildtimeus); + if (return_code != 0) + { + locked_metrics->track_property("error", "build failed"); + locked_metrics->track_property("build_error", spec_string); + return {BuildResult::BUILD_FAILED, {}}; + } + } + + const BuildInfo build_info = 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); + + BinaryControlFile bcf; + + create_binary_control_file(config.src, triplet, build_info, bcf); + + if (error_count != 0) + { + return {BuildResult::POST_BUILD_CHECKS_FAILED, {}}; + } + if (GlobalState::feature_packages) + { + if (config.feature_list) + { + for (auto&& feature : *config.feature_list) + { + for (auto&& f_pgh : config.scf->feature_paragraphs) + { + if (f_pgh->name == feature) + create_binary_feature_control_file(*config.scf->core_paragraph, *f_pgh, triplet, bcf); + } + } + } + } + + write_binary_control_file(paths, bcf); + + // const fs::path port_buildtrees_dir = paths.buildtrees / spec.name; + // delete_directory(port_buildtrees_dir); + + return {BuildResult::SUCCEEDED, {}}; + } + + const std::string& to_string(const BuildResult build_result) + { + static const std::string NULLVALUE_STRING = Enums::nullvalue_to_string("vcpkg::Commands::Build::BuildResult"); + static const std::string SUCCEEDED_STRING = "SUCCEEDED"; + static const std::string BUILD_FAILED_STRING = "BUILD_FAILED"; + static const std::string FILE_CONFLICTS_STRING = "FILE_CONFLICTS"; + static const std::string POST_BUILD_CHECKS_FAILED_STRING = "POST_BUILD_CHECKS_FAILED"; + static const std::string CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING = "CASCADED_DUE_TO_MISSING_DEPENDENCIES"; + + switch (build_result) + { + case BuildResult::NULLVALUE: return NULLVALUE_STRING; + case BuildResult::SUCCEEDED: return SUCCEEDED_STRING; + case BuildResult::BUILD_FAILED: return BUILD_FAILED_STRING; + case BuildResult::POST_BUILD_CHECKS_FAILED: return POST_BUILD_CHECKS_FAILED_STRING; + case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: return CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING; + case BuildResult::FILE_CONFLICTS: return FILE_CONFLICTS_STRING; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + + std::string create_error_message(const BuildResult build_result, const PackageSpec& spec) + { + return Strings::format("Error: Building package %s failed with: %s", spec, Build::to_string(build_result)); + } + + std::string create_user_troubleshooting_message(const PackageSpec& spec) + { + return Strings::format("Please ensure you're using the latest portfiles with `.\\vcpkg update`, then\n" + "submit an issue at https://github.com/Microsoft/vcpkg/issues including:\n" + " Package: %s\n" + " Vcpkg version: %s\n" + "\n" + "Additionally, attach any relevant sections from the log files above.", + spec, + Commands::Version::version()); + } + + static BuildInfo inner_create_buildinfo(std::unordered_map pgh) + { + Parse::ParagraphParser parser(std::move(pgh)); + + BuildInfo build_info; + + { + std::string crt_linkage_as_string; + parser.required_field(BuildInfoRequiredField::CRT_LINKAGE, crt_linkage_as_string); + + auto crtlinkage = to_linkage_type(crt_linkage_as_string); + if (const auto p = crtlinkage.get()) + build_info.crt_linkage = *p; + else + Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid crt linkage type: [%s]", crt_linkage_as_string); + } + + { + std::string library_linkage_as_string; + parser.required_field(BuildInfoRequiredField::LIBRARY_LINKAGE, library_linkage_as_string); + auto liblinkage = to_linkage_type(library_linkage_as_string); + if (const auto p = liblinkage.get()) + build_info.library_linkage = *p; + else + Checks::exit_with_message( + VCPKG_LINE_INFO, "Invalid library linkage type: [%s]", library_linkage_as_string); + } + std::string version = parser.optional_field("Version"); + if (!version.empty()) build_info.version = std::move(version); + + std::map policies; + for (auto policy : G_ALL_POLICIES) + { + const auto setting = parser.optional_field(to_string(policy)); + if (setting.empty()) continue; + if (setting == "enabled") + policies.emplace(policy, true); + else if (setting == "disabled") + policies.emplace(policy, false); + else + Checks::exit_with_message( + VCPKG_LINE_INFO, "Unknown setting for policy '%s': %s", to_string(policy), setting); + } + + if (const auto err = parser.error_info("PostBuildInformation")) + { + print_error_message(err); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + build_info.policies = BuildPolicies(std::move(policies)); + + return build_info; + } + + BuildInfo read_build_info(const Files::Filesystem& fs, const fs::path& filepath) + { + const Expected> pghs = + Paragraphs::get_single_paragraph(fs, filepath); + Checks::check_exit(VCPKG_LINE_INFO, pghs.get() != nullptr, "Invalid BUILD_INFO file for package"); + return inner_create_buildinfo(*pghs.get()); + } + + PreBuildInfo PreBuildInfo::from_triplet_file(const VcpkgPaths& paths, const Triplet& triplet) + { + static constexpr CStringView FLAG_GUID = "c35112b6-d1ba-415b-aa5d-81de856ef8eb"; + + const fs::path& cmake_exe_path = paths.get_cmake_exe(); + 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 std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe_path, + ports_cmake_script_path, + { + {L"CMAKE_TRIPLET_FILE", triplet_file_path}, + }); + + const std::wstring command = Strings::wformat(LR"(%s)", cmd_launch_cmake); + const auto ec_data = System::cmd_execute_and_capture_output(command); + Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0); + + const std::vector lines = Strings::split(ec_data.output, "\n"); + + PreBuildInfo pre_build_info; + + const auto e = lines.cend(); + auto cur = std::find(lines.cbegin(), e, FLAG_GUID); + if (cur != e) ++cur; + + for (; cur != e; ++cur) + { + auto&& line = *cur; + + const std::vector s = Strings::split(line, "="); + Checks::check_exit(VCPKG_LINE_INFO, + s.size() == 1 || s.size() == 2, + "Expected format is [VARIABLE_NAME=VARIABLE_VALUE], but was [%s]", + line); + + const bool variable_with_no_value = s.size() == 1; + const std::string variable_name = s.at(0); + const std::string variable_value = variable_with_no_value ? Strings::EMPTY : s.at(1); + + if (variable_name == "VCPKG_TARGET_ARCHITECTURE") + { + pre_build_info.target_architecture = variable_value; + continue; + } + + if (variable_name == "VCPKG_CMAKE_SYSTEM_NAME") + { + pre_build_info.cmake_system_name = variable_value; + continue; + } + + 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; + } + + Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown variable name %s", line); + } + + return pre_build_info; + } +} diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp new file mode 100644 index 000000000..ad2a5b227 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -0,0 +1,78 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Commands::Autocomplete +{ + std::vector autocomplete_install( + const std::vector>& source_paragraphs, const std::string& start_with) + { + std::vector results; + const auto& istartswith = Strings::case_insensitive_ascii_starts_with; + + for (const auto& source_control_file : source_paragraphs) + { + auto&& sp = *source_control_file->core_paragraph; + + if (istartswith(sp.name, start_with)) + { + results.push_back(sp.name); + } + } + return results; + } + + std::vector autocomplete_remove(std::vector installed_packages, + const std::string& start_with) + { + std::vector results; + const auto& istartswith = Strings::case_insensitive_ascii_starts_with; + + for (const auto& installed_package : installed_packages) + { + auto sp = installed_package->package.displayname(); + + if (istartswith(sp, start_with)) + { + results.push_back(sp); + } + } + return results; + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + static const std::string EXAMPLE = Strings::format("The argument should be a command line to autocomplete.\n%s", + Help::create_example_string("autocomplete install z")); + + args.check_min_arg_count(1, EXAMPLE); + args.check_max_arg_count(2, EXAMPLE); + args.check_and_get_optional_command_arguments({}); + + const std::string requested_command = args.command_arguments.at(0); + const std::string start_with = + args.command_arguments.size() > 1 ? args.command_arguments.at(1) : Strings::EMPTY; + std::vector results; + if (requested_command == "install") + { + auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); + auto& source_paragraphs = sources_and_errors.paragraphs; + + results = autocomplete_install(source_paragraphs, start_with); + } + else if (requested_command == "remove") + { + const StatusParagraphs status_db = database_load_check(paths); + std::vector installed_packages = get_installed_ports(status_db); + results = autocomplete_remove(installed_packages, start_with); + } + + System::println(Strings::join(" ", results)); + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.buildexternal.cpp b/toolsrc/src/vcpkg/commands.buildexternal.cpp new file mode 100644 index 000000000..3991beb62 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.buildexternal.cpp @@ -0,0 +1,23 @@ +#include "pch.h" + +#include +#include +#include +#include + +namespace vcpkg::Commands::BuildExternal +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + { + static const std::string EXAMPLE = + Help::create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)"); + args.check_exact_arg_count(2, EXAMPLE); + const FullPackageSpec spec = + Input::check_and_get_full_package_spec(args.command_arguments.at(0), default_triplet, EXAMPLE); + Input::check_triplet(spec.package_spec.triplet(), paths); + const std::unordered_set options = args.check_and_get_optional_command_arguments({}); + + const fs::path port_dir = args.command_arguments.at(1); + Build::Command::perform_and_exit(spec, port_dir, options, paths); + } +} diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp new file mode 100644 index 000000000..77f0a20f6 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -0,0 +1,69 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Commands::Cache +{ + static std::vector read_all_binary_paragraphs(const VcpkgPaths& paths) + { + std::vector output; + for (auto&& path : paths.get_filesystem().get_files_non_recursive(paths.packages)) + { + const Expected> pghs = + Paragraphs::get_single_paragraph(paths.get_filesystem(), path / "CONTROL"); + if (const auto p = pghs.get()) + { + const BinaryParagraph binary_paragraph = BinaryParagraph(*p); + output.push_back(binary_paragraph); + } + } + + return output; + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + static const std::string EXAMPLE = Strings::format( + "The argument should be a substring to search for, or no argument to display all cached libraries.\n%s", + Help::create_example_string("cache png")); + args.check_max_arg_count(1, EXAMPLE); + args.check_and_get_optional_command_arguments({}); + + const std::vector binary_paragraphs = read_all_binary_paragraphs(paths); + if (binary_paragraphs.empty()) + { + System::println("No packages are cached."); + Checks::exit_success(VCPKG_LINE_INFO); + } + + if (args.command_arguments.size() == 0) + { + for (const BinaryParagraph& binary_paragraph : binary_paragraphs) + { + const std::string displayname = binary_paragraph.displayname(); + System::println(displayname); + } + } + else + { + // At this point there is 1 argument + for (const BinaryParagraph& binary_paragraph : binary_paragraphs) + { + const std::string displayname = binary_paragraph.displayname(); + if (Strings::case_insensitive_ascii_find(displayname, args.command_arguments[0]) == displayname.end()) + { + continue; + } + + System::println(displayname); + } + } + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp new file mode 100644 index 000000000..1c98d1d83 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -0,0 +1,62 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Commands::CI +{ + using Build::BuildResult; + using Dependencies::InstallPlanAction; + using Dependencies::InstallPlanType; + + static std::vector load_all_package_specs(Files::Filesystem& fs, + const fs::path& ports_directory, + const Triplet& triplet) + { + auto ports = Paragraphs::load_all_ports(fs, ports_directory); + return Util::fmap(ports, [&](auto&& control_file) -> PackageSpec { + return PackageSpec::from_name_and_triplet(control_file->core_paragraph->name, triplet) + .value_or_exit(VCPKG_LINE_INFO); + }); + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + { + static const std::string EXAMPLE = Help::create_example_string("ci x64-windows"); + args.check_max_arg_count(1, EXAMPLE); + const Triplet triplet = args.command_arguments.size() == 1 + ? Triplet::from_canonical_name(args.command_arguments.at(0)) + : default_triplet; + Input::check_triplet(triplet, paths); + args.check_and_get_optional_command_arguments({}); + const std::vector specs = load_all_package_specs(paths.get_filesystem(), paths.ports, triplet); + + StatusParagraphs status_db = database_load_check(paths); + const auto& paths_port_file = Dependencies::PathsPortFile(paths); + std::vector install_plan = + Dependencies::create_install_plan(paths_port_file, specs, status_db); + Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); + + const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; + + const std::vector action_plan = + Util::fmap(install_plan, [](InstallPlanAction& install_action) { + return Dependencies::AnyAction(std::move(install_action)); + }); + + Install::perform_and_exit_ex( + action_plan, install_plan_options, Install::KeepGoing::YES, Install::PrintSummary::YES, paths, status_db); + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.contact.cpp b/toolsrc/src/vcpkg/commands.contact.cpp new file mode 100644 index 000000000..421b8a230 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.contact.cpp @@ -0,0 +1,22 @@ +#include "pch.h" + +#include +#include + +namespace vcpkg::Commands::Contact +{ + const std::string& email() + { + static const std::string S_EMAIL = R"(vcpkg@microsoft.com)"; + return S_EMAIL; + } + + void perform_and_exit(const VcpkgCmdArguments& args) + { + args.check_exact_arg_count(0); + args.check_and_get_optional_command_arguments({}); + + System::println("Send an email to %s with any feedback.", email()); + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp new file mode 100644 index 000000000..9d969ea28 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.cpp @@ -0,0 +1,56 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Commands +{ + Span> get_available_commands_type_a() + { + static std::vector> t = { + {"install", &Install::perform_and_exit}, + {"ci", &CI::perform_and_exit}, + {"remove", &Remove::perform_and_exit}, + {"build", &Build::Command::perform_and_exit}, + {"env", &Env::perform_and_exit}, + {"build-external", &BuildExternal::perform_and_exit}, + {"export", &Export::perform_and_exit}, + }; + return t; + } + + Span> get_available_commands_type_b() + { + static std::vector> t = { + {"/?", &Help::perform_and_exit}, + {"help", &Help::perform_and_exit}, + {"search", &Search::perform_and_exit}, + {"list", &List::perform_and_exit}, + {"integrate", &Integrate::perform_and_exit}, + {"owns", &Owns::perform_and_exit}, + {"update", &Update::perform_and_exit}, + {"depend-info", &DependInfo::perform_and_exit}, + {"edit", &Edit::perform_and_exit}, + {"create", &Create::perform_and_exit}, + {"import", &Import::perform_and_exit}, + {"cache", &Cache::perform_and_exit}, + {"portsdiff", &PortsDiff::perform_and_exit}, + {"autocomplete", &Autocomplete::perform_and_exit}}; + return t; + } + + Span> get_available_commands_type_c() + { + static std::vector> t = { + {"version", &Version::perform_and_exit}, + {"contact", &Contact::perform_and_exit}, + {"hash", &Hash::perform_and_exit}, + }; + return t; + } +} diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp new file mode 100644 index 000000000..d923cf555 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -0,0 +1,39 @@ +#include "pch.h" + +#include +#include +#include +#include +#include + +namespace vcpkg::Commands::Create +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + static const std::string EXAMPLE = Help::create_example_string( + R"###(create zlib2 http://zlib.net/zlib1211.zip "zlib1211-2.zip")###"); + args.check_max_arg_count(3, EXAMPLE); + args.check_min_arg_count(2, EXAMPLE); + args.check_and_get_optional_command_arguments({}); + const std::string port_name = args.command_arguments.at(0); + const std::string url = args.command_arguments.at(1); + + const fs::path& cmake_exe = paths.get_cmake_exe(); + + std::vector cmake_args{{L"CMD", L"CREATE"}, {L"PORT", port_name}, {L"URL", url}}; + + if (args.command_arguments.size() >= 3) + { + const std::string& zip_file_name = args.command_arguments.at(2); + Checks::check_exit(VCPKG_LINE_INFO, + !Files::has_invalid_chars_for_filesystem(zip_file_name), + R"(Filename cannot contain invalid chars %s, but was %s)", + Files::FILESYSTEM_INVALID_CHARACTERS, + zip_file_name); + cmake_args.push_back({L"FILENAME", zip_file_name}); + } + + const std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args); + Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute_clean(cmd_launch_cmake)); + } +} diff --git a/toolsrc/src/vcpkg/commands.dependinfo.cpp b/toolsrc/src/vcpkg/commands.dependinfo.cpp new file mode 100644 index 000000000..89c7e0c7f --- /dev/null +++ b/toolsrc/src/vcpkg/commands.dependinfo.cpp @@ -0,0 +1,56 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Commands::DependInfo +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + static const std::string EXAMPLE = Help::create_example_string(R"###(depend-info [pat])###"); + args.check_max_arg_count(1, EXAMPLE); + args.check_and_get_optional_command_arguments({}); + + std::vector> source_control_files = + Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + + if (args.command_arguments.size() == 1) + { + const std::string filter = args.command_arguments.at(0); + + Util::erase_remove_if(source_control_files, + [&](const std::unique_ptr& source_control_file) { + + const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; + + if (Strings::case_insensitive_ascii_contains(source_paragraph.name, filter)) + { + return false; + } + + for (const Dependency& dependency : source_paragraph.depends) + { + if (Strings::case_insensitive_ascii_contains(dependency.name(), filter)) + { + return false; + } + } + + return true; + }); + } + + for (auto&& source_control_file : source_control_files) + { + const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; + const auto s = Strings::join(", ", source_paragraph.depends, [](const Dependency& d) { return d.name(); }); + System::println("%s: %s", source_paragraph.name, s); + } + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp new file mode 100644 index 000000000..9497bd76e --- /dev/null +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -0,0 +1,87 @@ +#include "pch.h" + +#include +#include +#include +#include + +namespace vcpkg::Commands::Edit +{ + static std::vector find_from_registry() + { + static const std::array REGKEYS = { + LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", + LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1287CAD5-7C8D-410D-88B9-0D1EE4A83FF2}_is1)", + LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", + }; + + std::vector output; + for (auto&& keypath : REGKEYS) + { + const Optional code_installpath = + System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, L"InstallLocation"); + if (const auto c = code_installpath.get()) + { + const fs::path install_path = fs::path(*c); + output.push_back(install_path / "Code - Insiders.exe"); + output.push_back(install_path / "Code.exe"); + } + } + return output; + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + static const std::string OPTION_BUILDTREES = "--buildtrees"; + + static const fs::path VS_CODE_INSIDERS = fs::path{"Microsoft VS Code Insiders"} / "Code - Insiders.exe"; + static const fs::path VS_CODE = fs::path{"Microsoft VS Code"} / "Code.exe"; + + auto& fs = paths.get_filesystem(); + + static const std::string EXAMPLE = Help::create_example_string("edit zlib"); + args.check_exact_arg_count(1, EXAMPLE); + const std::unordered_set options = + args.check_and_get_optional_command_arguments({OPTION_BUILDTREES}); + const std::string port_name = args.command_arguments.at(0); + + const fs::path portpath = paths.ports / port_name; + Checks::check_exit(VCPKG_LINE_INFO, fs.is_directory(portpath), R"(Could not find port named "%s")", port_name); + + std::vector candidate_paths; + const std::vector from_path = Files::find_from_PATH(L"EDITOR"); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE_INSIDERS); + candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE_INSIDERS); + candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE); + candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE); + + const std::vector from_registry = find_from_registry(); + candidate_paths.insert(candidate_paths.end(), from_registry.cbegin(), from_registry.cend()); + + auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { return fs.exists(p); }); + if (it == candidate_paths.cend()) + { + System::println(System::Color::error, + "Error: Visual Studio Code was not found and the environment variable EDITOR is not set."); + System::println("The following paths were examined:"); + Files::print_paths(candidate_paths); + System::println("You can also set the environmental variable EDITOR to your editor of choice."); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + const fs::path env_editor = *it; + if (options.find(OPTION_BUILDTREES) != options.cend()) + { + const auto buildtrees_current_dir = paths.buildtrees / port_name; + + const std::wstring cmd_line = + Strings::wformat(LR"("%s" "%s" -n)", env_editor, buildtrees_current_dir.native()); + Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); + } + + const std::wstring cmd_line = Strings::wformat( + LR"("%s" "%s" "%s" -n)", env_editor, portpath.native(), (portpath / "portfile.cmake").native()); + Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); + } +} diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp new file mode 100644 index 000000000..089881588 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -0,0 +1,22 @@ +#include "pch.h" + +#include +#include +#include +#include + +namespace vcpkg::Commands::Env +{ + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + { + static const std::string EXAMPLE = Help::create_example_string(R"(env --triplet x64-windows)"); + args.check_exact_arg_count(0, EXAMPLE); + args.check_and_get_optional_command_arguments({}); + + const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); + const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); + System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, toolset) + L" && cmd"); + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp new file mode 100644 index 000000000..35a3c97a7 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.exportifw.cpp @@ -0,0 +1,482 @@ +#include "pch.h" + +#include +#include +#include +#include + +namespace vcpkg::Export::IFW +{ + using Dependencies::ExportPlanAction; + using Dependencies::ExportPlanType; + using Install::InstallDir; + + static std::string create_release_date() + { + const tm date_time = System::get_current_date_time(); + + // Format is: YYYY-mm-dd + // 10 characters + 1 null terminating character will be written for a total of 11 chars + char mbstr[11]; + const size_t bytes_written = std::strftime(mbstr, sizeof(mbstr), "%Y-%m-%d", &date_time); + Checks::check_exit(VCPKG_LINE_INFO, + bytes_written == 10, + "Expected 10 bytes to be written, but %u were written", + bytes_written); + const std::string date_time_as_string(mbstr); + return date_time_as_string; + } + + fs::path get_packages_dir_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) + { + return ifw_options.maybe_packages_dir_path.has_value() + ? fs::path(ifw_options.maybe_packages_dir_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-packages"); + } + + fs::path get_repository_dir_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) + { + return ifw_options.maybe_repository_dir_path.has_value() + ? fs::path(ifw_options.maybe_repository_dir_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-repository"); + } + + fs::path get_config_file_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) + { + return ifw_options.maybe_config_file_path.has_value() + ? fs::path(ifw_options.maybe_config_file_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-configuration.xml"); + } + + fs::path get_installer_file_path(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) + { + return ifw_options.maybe_installer_file_path.has_value() + ? fs::path(ifw_options.maybe_installer_file_path.value_or_exit(VCPKG_LINE_INFO)) + : paths.root / (export_id + "-ifw-installer.exe"); + } + + fs::path export_real_package(const fs::path& ifw_packages_dir_path, + const ExportPlanAction& action, + Files::Filesystem& fs) + { + std::error_code ec; + + const BinaryParagraph& binary_paragraph = + action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + + // Prepare meta dir + const fs::path package_xml_file_path = + ifw_packages_dir_path / + Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "meta" / + "package.xml"; + const fs::path package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + + auto deps = Strings::join( + ",", binary_paragraph.depends, [](const std::string& dep) { return "packages." + dep + ":"; }); + + if (!deps.empty()) deps = "\n " + deps + ""; + + fs.write_contents(package_xml_file_path, + Strings::format( + R"###( + + %s + %s + %s + packages.%s:,triplets.%s:%s + true + +)###", + action.spec.to_string(), + binary_paragraph.version, + create_release_date(), + action.spec.name(), + action.spec.triplet().canonical_name(), + deps)); + + // Return dir path for export package data + return ifw_packages_dir_path / + Strings::format("packages.%s.%s", action.spec.name(), action.spec.triplet().canonical_name()) / "data" / + "installed"; + } + + void export_unique_packages(const fs::path& raw_exported_dir_path, + std::map unique_packages, + Files::Filesystem& fs) + { + std::error_code ec; + + // packages + + fs::path package_xml_file_path = raw_exported_dir_path / "packages" / "meta" / "package.xml"; + fs::path package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + fs.write_contents(package_xml_file_path, + Strings::format( + R"###( + + Packages + 1.0.0 + %s + +)###", + create_release_date())); + + for (auto package = unique_packages.begin(); package != unique_packages.end(); ++package) + { + const ExportPlanAction& action = *(package->second); + const BinaryParagraph& binary_paragraph = + action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + + package_xml_file_path = + raw_exported_dir_path / Strings::format("packages.%s", package->first) / "meta" / "package.xml"; + package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + + fs.write_contents(package_xml_file_path, + Strings::format( + R"###( + + %s + %s + %s + %s + +)###", + action.spec.name(), + binary_paragraph.description, + binary_paragraph.version, + create_release_date())); + } + } + + void export_unique_triplets(const fs::path& raw_exported_dir_path, + std::set unique_triplets, + Files::Filesystem& fs) + { + std::error_code ec; + + // triplets + + fs::path package_xml_file_path = raw_exported_dir_path / "triplets" / "meta" / "package.xml"; + fs::path package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + fs.write_contents(package_xml_file_path, + Strings::format( + R"###( + + Triplets + 1.0.0 + %s + +)###", + create_release_date())); + + for (const std::string& triplet : unique_triplets) + { + package_xml_file_path = + raw_exported_dir_path / Strings::format("triplets.%s", triplet) / "meta" / "package.xml"; + package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + fs.write_contents(package_xml_file_path, + Strings::format( + R"###( + + %s + 1.0.0 + %s + +)###", + triplet, + create_release_date())); + } + } + + void export_integration(const fs::path& raw_exported_dir_path, Files::Filesystem& fs) + { + std::error_code ec; + + // integration + fs::path package_xml_file_path = raw_exported_dir_path / "integration" / "meta" / "package.xml"; + fs::path package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + + fs.write_contents(package_xml_file_path, + Strings::format( + R"###( + + Integration + 1.0.0 + %s + +)###", + create_release_date())); + } + + void export_config(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) + { + std::error_code ec; + Files::Filesystem& fs = paths.get_filesystem(); + + const fs::path config_xml_file_path = get_config_file_path(export_id, ifw_options, paths); + + fs::path config_xml_dir_path = config_xml_file_path.parent_path(); + fs.create_directories(config_xml_dir_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for configuration file %s", + config_xml_file_path.generic_string()); + + std::string formatted_repo_url; + std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); + if (!ifw_repo_url.empty()) + { + formatted_repo_url = Strings::format(R"###( + + + %s + + )###", + ifw_repo_url); + } + + fs.write_contents(config_xml_file_path, + Strings::format( + R"###( + + vcpkg + 1.0.0 + vcpkg + @RootDir@/src/vcpkg%s + +)###", + formatted_repo_url)); + } + + void export_maintenance_tool(const fs::path& ifw_packages_dir_path, const VcpkgPaths& paths) + { + System::println("Exporting maintenance tool... "); + + std::error_code ec; + Files::Filesystem& fs = paths.get_filesystem(); + + const fs::path& installerbase_exe = paths.get_ifw_installerbase_exe(); + fs::path tempmaintenancetool = ifw_packages_dir_path / "maintenance" / "data" / "tempmaintenancetool.exe"; + fs.create_directories(tempmaintenancetool.parent_path(), ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + tempmaintenancetool.generic_string()); + fs.copy_file(installerbase_exe, tempmaintenancetool, fs::copy_options::overwrite_existing, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not write package file %s", tempmaintenancetool.generic_string()); + + fs::path package_xml_file_path = ifw_packages_dir_path / "maintenance" / "meta" / "package.xml"; + fs::path package_xml_dir_path = package_xml_file_path.parent_path(); + fs.create_directories(package_xml_dir_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not create directory for package file %s", + package_xml_file_path.generic_string()); + fs.write_contents(package_xml_file_path, + Strings::format( + R"###( + + Maintenance Tool + Maintenance Tool + 1.0.0 + %s + + true + true + true + +)###", + create_release_date())); + const fs::path script_source = paths.root / "scripts" / "ifw" / "maintenance.qs"; + const fs::path script_destination = ifw_packages_dir_path / "maintenance" / "meta" / "maintenance.qs"; + fs.copy_file(script_source, script_destination, fs::copy_options::overwrite_existing, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not write package file %s", script_destination.generic_string()); + + System::println("Exporting maintenance tool... done"); + } + + void do_repository(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) + { + const fs::path& repogen_exe = paths.get_ifw_repogen_exe(); + const fs::path packages_dir = get_packages_dir_path(export_id, ifw_options, paths); + const fs::path repository_dir = get_repository_dir_path(export_id, ifw_options, paths); + + System::println("Generating repository %s...", repository_dir.generic_string()); + + std::error_code ec; + Files::Filesystem& fs = paths.get_filesystem(); + + fs.remove_all(repository_dir, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not remove outdated repository directory %s", repository_dir.generic_string()); + + const std::wstring cmd_line = Strings::wformat(LR"("%s" --packages "%s" "%s" > nul)", + repogen_exe.native(), + packages_dir.native(), + repository_dir.native()); + + const int exit_code = System::cmd_execute_clean(cmd_line); + Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: IFW repository generating failed"); + + System::println(System::Color::success, "Generating repository %s... done.", repository_dir.generic_string()); + } + + void do_installer(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) + { + const fs::path& binarycreator_exe = paths.get_ifw_binarycreator_exe(); + const fs::path config_file = get_config_file_path(export_id, ifw_options, paths); + const fs::path packages_dir = get_packages_dir_path(export_id, ifw_options, paths); + const fs::path repository_dir = get_repository_dir_path(export_id, ifw_options, paths); + const fs::path installer_file = get_installer_file_path(export_id, ifw_options, paths); + + System::println("Generating installer %s...", installer_file.generic_string()); + + std::wstring cmd_line; + + std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); + if (!ifw_repo_url.empty()) + { + cmd_line = Strings::wformat(LR"("%s" --online-only --config "%s" --repository "%s" "%s" > nul)", + binarycreator_exe.native(), + config_file.native(), + repository_dir.native(), + installer_file.native()); + } + else + { + cmd_line = Strings::wformat(LR"("%s" --config "%s" --packages "%s" "%s" > nul)", + binarycreator_exe.native(), + config_file.native(), + packages_dir.native(), + installer_file.native()); + } + + const int exit_code = System::cmd_execute_clean(cmd_line); + Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: IFW installer generating failed"); + + System::println(System::Color::success, "Generating installer %s... done.", installer_file.generic_string()); + } + + void do_export(const std::vector& export_plan, + const std::string& export_id, + const Options& ifw_options, + const VcpkgPaths& paths) + { + std::error_code ec; + 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); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not remove outdated packages directory %s", + ifw_packages_dir_path.generic_string()); + + fs.create_directory(ifw_packages_dir_path, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not create packages directory %s", ifw_packages_dir_path.generic_string()); + + // Export maintenance tool + export_maintenance_tool(ifw_packages_dir_path, paths); + + System::println("Exporting packages %s... ", ifw_packages_dir_path.generic_string()); + + // execute the plan + std::map unique_packages; + std::set unique_triplets; + for (const ExportPlanAction& action : export_plan) + { + if (action.plan_type != ExportPlanType::ALREADY_BUILT) + { + Checks::unreachable(VCPKG_LINE_INFO); + } + + const std::string display_name = action.spec.to_string(); + System::println("Exporting package %s... ", display_name); + + const BinaryParagraph& binary_paragraph = + action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + + unique_packages[action.spec.name()] = &action; + unique_triplets.insert(action.spec.triplet().canonical_name()); + + // Export real package and return data dir for installation + fs::path ifw_package_dir_path = export_real_package(ifw_packages_dir_path, action, fs); + + // Copy package data + const InstallDir dirs = InstallDir::from_destination_root(ifw_package_dir_path, + action.spec.triplet().to_string(), + ifw_package_dir_path / "vcpkg" / "info" / + (binary_paragraph.fullstem() + ".list")); + + Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); + System::println("Exporting package %s... done", display_name); + } + + System::println("Exporting packages %s... done", ifw_packages_dir_path.generic_string()); + + const fs::path config_file = get_config_file_path(export_id, ifw_options, paths); + + System::println("Generating configuration %s...", config_file.generic_string()); + + // Unique packages + export_unique_packages(ifw_packages_dir_path, unique_packages, fs); + + // Unique triplets + export_unique_triplets(ifw_packages_dir_path, unique_triplets, fs); + + // Copy files needed for integration + export_integration_files(ifw_packages_dir_path / "integration" / "data", paths); + // Integration + export_integration(ifw_packages_dir_path, fs); + + // Configuration + export_config(export_id, ifw_options, paths); + + System::println("Generating configuration %s... done.", config_file.generic_string()); + + // Do repository (optional) + std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); + if (!ifw_repo_url.empty()) + { + do_repository(export_id, ifw_options, paths); + } + + // Do installer + do_installer(export_id, ifw_options, paths); + } +} diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp new file mode 100644 index 000000000..394a02e23 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -0,0 +1,55 @@ +#include "pch.h" + +#include +#include +#include +#include + +namespace vcpkg::Commands::Hash +{ + static void do_file_hash(fs::path const& path, std::wstring const& hash_type) + { + const auto cmd_line = Strings::wformat(LR"(CertUtil.exe -hashfile "%s" %s)", path.c_str(), hash_type); + const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); + Checks::check_exit( + VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::to_utf8(cmd_line)); + + std::string const& output = ec_data.output; + + const auto start = output.find_first_of("\r\n"); + Checks::check_exit(VCPKG_LINE_INFO, + start != std::string::npos, + "Unexpected output format from command: %s", + Strings::to_utf8(cmd_line)); + + const auto end = output.find_first_of("\r\n", start + 1); + Checks::check_exit(VCPKG_LINE_INFO, + end != std::string::npos, + "Unexpected output format from command: %s", + Strings::to_utf8(cmd_line)); + + auto hash = output.substr(start, end - start); + Util::erase_remove_if(hash, isspace); + System::println(hash); + } + + void perform_and_exit(const VcpkgCmdArguments& args) + { + static const std::string EXAMPLE = Strings::format("The argument should be a file path\n%s", + Help::create_example_string("hash boost_1_62_0.tar.bz2")); + args.check_min_arg_count(1, EXAMPLE); + args.check_max_arg_count(2, EXAMPLE); + args.check_and_get_optional_command_arguments({}); + + if (args.command_arguments.size() == 1) + { + do_file_hash(args.command_arguments[0], L"SHA512"); + } + if (args.command_arguments.size() == 2) + { + do_file_hash(args.command_arguments[0], Strings::to_utf16(args.command_arguments[1])); + } + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.import.cpp b/toolsrc/src/vcpkg/commands.import.cpp new file mode 100644 index 000000000..119aee022 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.import.cpp @@ -0,0 +1,120 @@ +#include "pch.h" + +#include +#include +#include +#include +#include + +namespace vcpkg::Commands::Import +{ + struct Binaries + { + std::vector dlls; + std::vector libs; + }; + + static void check_is_directory(const LineInfo& line_info, const Files::Filesystem& fs, const fs::path& dirpath) + { + Checks::check_exit(line_info, fs.is_directory(dirpath), "The path %s is not a directory", dirpath.string()); + } + + static Binaries find_binaries_in_dir(const Files::Filesystem& fs, const fs::path& path) + { + auto files = fs.get_files_recursive(path); + + check_is_directory(VCPKG_LINE_INFO, fs, path); + + Binaries binaries; + for (auto&& file : files) + { + if (fs.is_directory(file)) continue; + const auto ext = file.extension(); + if (ext == ".dll") + binaries.dlls.push_back(std::move(file)); + else if (ext == ".lib") + binaries.libs.push_back(std::move(file)); + } + return binaries; + } + + static void copy_files_into_directory(Files::Filesystem& fs, + const std::vector& files, + const fs::path& destination_folder) + { + std::error_code ec; + fs.create_directory(destination_folder, ec); + + for (auto const& src_path : files) + { + const fs::path dest_path = destination_folder / src_path.filename(); + fs.copy(src_path, dest_path, fs::copy_options::overwrite_existing); + } + } + + static void place_library_files_in(Files::Filesystem& fs, + const fs::path& include_directory, + const fs::path& project_directory, + const fs::path& destination_path) + { + check_is_directory(VCPKG_LINE_INFO, fs, include_directory); + check_is_directory(VCPKG_LINE_INFO, fs, project_directory); + check_is_directory(VCPKG_LINE_INFO, fs, destination_path); + const Binaries debug_binaries = find_binaries_in_dir(fs, project_directory / "Debug"); + const Binaries release_binaries = find_binaries_in_dir(fs, project_directory / "Release"); + + const fs::path destination_include_directory = destination_path / "include"; + fs.copy(include_directory, + destination_include_directory, + fs::copy_options::recursive | fs::copy_options::overwrite_existing); + + copy_files_into_directory(fs, release_binaries.dlls, destination_path / "bin"); + copy_files_into_directory(fs, release_binaries.libs, destination_path / "lib"); + + std::error_code ec; + fs.create_directory(destination_path / "debug", ec); + copy_files_into_directory(fs, debug_binaries.dlls, destination_path / "debug" / "bin"); + copy_files_into_directory(fs, debug_binaries.libs, destination_path / "debug" / "lib"); + } + + static void do_import(const VcpkgPaths& paths, + const fs::path& include_directory, + const fs::path& project_directory, + const BinaryParagraph& control_file_data) + { + auto& fs = paths.get_filesystem(); + const fs::path library_destination_path = paths.package_dir(control_file_data.spec); + std::error_code ec; + fs.create_directory(library_destination_path, ec); + place_library_files_in(paths.get_filesystem(), include_directory, project_directory, library_destination_path); + + const fs::path control_file_path = library_destination_path / "CONTROL"; + fs.write_contents(control_file_path, Strings::serialize(control_file_data)); + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + static const std::string EXAMPLE = Help::create_example_string( + R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)"); + args.check_exact_arg_count(3, EXAMPLE); + args.check_and_get_optional_command_arguments({}); + + const fs::path control_file_path(args.command_arguments[0]); + const fs::path include_directory(args.command_arguments[1]); + const fs::path project_directory(args.command_arguments[2]); + + const Expected> pghs = + Paragraphs::get_single_paragraph(paths.get_filesystem(), control_file_path); + Checks::check_exit(VCPKG_LINE_INFO, + pghs.get() != nullptr, + "Invalid control file %s for package", + control_file_path.generic_string()); + + StatusParagraph spgh; + spgh.package = BinaryParagraph(*pghs.get()); + auto& control_file_data = spgh.package; + + do_import(paths, include_directory, project_directory, control_file_data); + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp new file mode 100644 index 000000000..7f6639222 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -0,0 +1,342 @@ +#include "pch.h" + +#include +#include +#include +#include +#include + +namespace vcpkg::Commands::Integrate +{ + static const std::array OLD_SYSTEM_TARGET_FILES = { + System::get_program_files_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets", + System::get_program_files_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"}; + static const fs::path SYSTEM_WIDE_TARGETS_FILE = + System::get_program_files_32_bit() / "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props"; + + static std::string create_appdata_targets_shortcut(const std::string& target_path) noexcept + { + return Strings::format(R"###( + + + +)###", + target_path, + target_path); + } + + static std::string create_system_targets_shortcut() noexcept + { + return R"###( + + + + $(LOCALAPPDATA)\vcpkg\vcpkg.user + + + +)###"; + } + + static std::string create_nuget_targets_file_contents(const fs::path& msbuild_vcpkg_targets_file) noexcept + { + const std::string as_string = msbuild_vcpkg_targets_file.string(); + + return Strings::format(R"###( + + + + + + +)###", + as_string, + as_string); + } + + static std::string create_nuget_props_file_contents() noexcept + { + return R"###( + + + true + + +)###"; + } + + static std::string get_nuget_id(const fs::path& vcpkg_root_dir) + { + std::string dir_id = vcpkg_root_dir.generic_string(); + std::replace(dir_id.begin(), dir_id.end(), '/', '.'); + dir_id.erase(1, 1); // Erasing the ":" + + // NuGet id cannot have invalid characters. We will only use alphanumeric and dot. + Util::erase_remove_if(dir_id, [](char c) { return !isalnum(c) && (c != '.'); }); + + const std::string nuget_id = "vcpkg." + dir_id; + return nuget_id; + } + + static std::string create_nuspec_file_contents(const fs::path& vcpkg_root_dir, + const std::string& nuget_id, + const std::string& nupkg_version) + { + static constexpr auto CONTENT_TEMPLATE = R"( + + + @NUGET_ID@ + @VERSION@ + vcpkg + + This package imports all libraries currently installed in @VCPKG_DIR@. This package does not contain any libraries and instead refers to the folder directly (like a symlink). + + + + + + + +)"; + + std::string content = std::regex_replace(CONTENT_TEMPLATE, std::regex("@NUGET_ID@"), nuget_id); + content = std::regex_replace(content, std::regex("@VCPKG_DIR@"), vcpkg_root_dir.string()); + content = std::regex_replace(content, std::regex("@VERSION@"), nupkg_version); + return content; + } + + enum class ElevationPromptChoice + { + YES, + NO + }; + + static ElevationPromptChoice elevated_cmd_execute(const std::string& param) + { + SHELLEXECUTEINFOW sh_ex_info = {0}; + sh_ex_info.cbSize = sizeof(sh_ex_info); + sh_ex_info.fMask = SEE_MASK_NOCLOSEPROCESS; + sh_ex_info.hwnd = nullptr; + sh_ex_info.lpVerb = L"runas"; + sh_ex_info.lpFile = L"cmd"; // Application to start + + auto wparam = Strings::to_utf16(param); + sh_ex_info.lpParameters = wparam.c_str(); // Additional parameters + sh_ex_info.lpDirectory = nullptr; + sh_ex_info.nShow = SW_HIDE; + sh_ex_info.hInstApp = nullptr; + + if (!ShellExecuteExW(&sh_ex_info)) + { + return ElevationPromptChoice::NO; + } + if (sh_ex_info.hProcess == nullptr) + { + return ElevationPromptChoice::NO; + } + WaitForSingleObject(sh_ex_info.hProcess, INFINITE); + CloseHandle(sh_ex_info.hProcess); + return ElevationPromptChoice::YES; + } + + static fs::path get_appdata_targets_path() + { + static const fs::path LOCAL_APP_DATA = + fs::path(System::get_environment_variable(L"LOCALAPPDATA").value_or_exit(VCPKG_LINE_INFO)); + return LOCAL_APP_DATA / "vcpkg" / "vcpkg.user.targets"; + } + + static void integrate_install(const VcpkgPaths& paths) + { + auto& fs = paths.get_filesystem(); + + // TODO: This block of code should eventually be removed + for (auto&& old_system_wide_targets_file : OLD_SYSTEM_TARGET_FILES) + { + if (fs.exists(old_system_wide_targets_file)) + { + const std::string param = + Strings::format(R"(/c DEL "%s" /Q > nul)", old_system_wide_targets_file.string()); + const ElevationPromptChoice user_choice = elevated_cmd_execute(param); + switch (user_choice) + { + case ElevationPromptChoice::YES: break; + case ElevationPromptChoice::NO: + System::println(System::Color::warning, "Warning: Previous integration file was not removed"); + Checks::exit_fail(VCPKG_LINE_INFO); + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + } + + std::error_code ec; + const fs::path tmp_dir = paths.buildsystems / "tmp"; + fs.create_directory(paths.buildsystems, ec); + fs.create_directory(tmp_dir, ec); + + bool should_install_system = true; + const Expected system_wide_file_contents = fs.read_contents(SYSTEM_WIDE_TARGETS_FILE); + static const std::regex RE(R"###()###"); + if (const auto contents_data = system_wide_file_contents.get()) + { + std::match_results match; + const auto found = std::regex_search(*contents_data, match, RE); + if (found) + { + const int ver = atoi(match[1].str().c_str()); + if (ver >= 1) should_install_system = false; + } + } + + if (should_install_system) + { + const fs::path sys_src_path = tmp_dir / "vcpkg.system.targets"; + fs.write_contents(sys_src_path, create_system_targets_shortcut()); + + const std::string param = Strings::format(R"(/c mkdir "%s" & copy "%s" "%s" /Y > nul)", + SYSTEM_WIDE_TARGETS_FILE.parent_path().string(), + sys_src_path.string(), + SYSTEM_WIDE_TARGETS_FILE.string()); + const ElevationPromptChoice user_choice = elevated_cmd_execute(param); + switch (user_choice) + { + case ElevationPromptChoice::YES: break; + case ElevationPromptChoice::NO: + System::println(System::Color::warning, "Warning: integration was not applied"); + Checks::exit_fail(VCPKG_LINE_INFO); + default: Checks::unreachable(VCPKG_LINE_INFO); + } + + Checks::check_exit(VCPKG_LINE_INFO, + fs.exists(SYSTEM_WIDE_TARGETS_FILE), + "Error: failed to copy targets file to %s", + SYSTEM_WIDE_TARGETS_FILE.string()); + } + + const fs::path appdata_src_path = tmp_dir / "vcpkg.user.targets"; + fs.write_contents(appdata_src_path, + create_appdata_targets_shortcut(paths.buildsystems_msbuild_targets.string())); + auto appdata_dst_path = get_appdata_targets_path(); + + const auto rc = fs.copy_file(appdata_src_path, appdata_dst_path, fs::copy_options::overwrite_existing, ec); + + if (!rc || ec) + { + System::println(System::Color::error, + "Error: Failed to copy file: %s -> %s", + appdata_src_path.string(), + appdata_dst_path.string()); + Checks::exit_fail(VCPKG_LINE_INFO); + } + System::println(System::Color::success, "Applied user-wide integration for this vcpkg root."); + const fs::path cmake_toolchain = paths.buildsystems / "vcpkg.cmake"; + System::println("\n" + "All MSBuild C++ projects can now #include any installed libraries.\n" + "Linking will be handled automatically.\n" + "Installing new libraries will make them instantly available.\n" + "\n" + "CMake projects should use -DCMAKE_TOOLCHAIN_FILE=%s", + cmake_toolchain.generic_string()); + + Checks::exit_success(VCPKG_LINE_INFO); + } + + static void integrate_remove(Files::Filesystem& fs) + { + const fs::path path = get_appdata_targets_path(); + + std::error_code ec; + const bool was_deleted = fs.remove(path, ec); + + Checks::check_exit(VCPKG_LINE_INFO, !ec, "Error: Unable to remove user-wide integration: %d", ec.message()); + + if (was_deleted) + { + System::println(System::Color::success, "User-wide integration was removed"); + } + else + { + System::println(System::Color::success, "User-wide integration is not installed"); + } + + Checks::exit_success(VCPKG_LINE_INFO); + } + + static void integrate_project(const VcpkgPaths& paths) + { + auto& fs = paths.get_filesystem(); + + const fs::path& nuget_exe = paths.get_nuget_exe(); + + const fs::path& buildsystems_dir = paths.buildsystems; + const fs::path tmp_dir = buildsystems_dir / "tmp"; + std::error_code ec; + fs.create_directory(buildsystems_dir, ec); + fs.create_directory(tmp_dir, ec); + + const fs::path targets_file_path = tmp_dir / "vcpkg.nuget.targets"; + const fs::path props_file_path = tmp_dir / "vcpkg.nuget.props"; + const fs::path nuspec_file_path = tmp_dir / "vcpkg.nuget.nuspec"; + const std::string nuget_id = get_nuget_id(paths.root); + const std::string nupkg_version = "1.0.0"; + + fs.write_contents(targets_file_path, create_nuget_targets_file_contents(paths.buildsystems_msbuild_targets)); + fs.write_contents(props_file_path, create_nuget_props_file_contents()); + fs.write_contents(nuspec_file_path, create_nuspec_file_contents(paths.root, nuget_id, nupkg_version)); + + // Using all forward slashes for the command line + const std::wstring cmd_line = Strings::wformat(LR"("%s" pack -OutputDirectory "%s" "%s" > nul)", + nuget_exe.native(), + buildsystems_dir.native(), + nuspec_file_path.native()); + + const int exit_code = System::cmd_execute_clean(cmd_line); + + const fs::path nuget_package = buildsystems_dir / Strings::format("%s.%s.nupkg", nuget_id, nupkg_version); + Checks::check_exit( + VCPKG_LINE_INFO, exit_code == 0 && fs.exists(nuget_package), "Error: NuGet package creation failed"); + System::println(System::Color::success, "Created nupkg: %s", nuget_package.string()); + + auto source_path = buildsystems_dir.u8string(); + source_path = std::regex_replace(source_path, std::regex("`"), "``"); + + System::println(R"( +With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: + Install-Package %s -Source "%s" +)", + nuget_id, + source_path); + + Checks::exit_success(VCPKG_LINE_INFO); + } + + const char* const INTEGRATE_COMMAND_HELPSTRING = + " vcpkg integrate install Make installed packages available user-wide. Requires admin privileges on " + "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"; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + static const std::string EXAMPLE = Strings::format("Commands:\n" + "%s", + INTEGRATE_COMMAND_HELPSTRING); + args.check_exact_arg_count(1, EXAMPLE); + args.check_and_get_optional_command_arguments({}); + + if (args.command_arguments[0] == "install") + { + return integrate_install(paths); + } + if (args.command_arguments[0] == "remove") + { + return integrate_remove(paths.get_filesystem()); + } + if (args.command_arguments[0] == "project") + { + return integrate_project(paths); + } + + Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown parameter %s for integrate", args.command_arguments[0]); + } +} diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp new file mode 100644 index 000000000..d0e8e00b4 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -0,0 +1,75 @@ +#include "pch.h" + +#include +#include +#include +#include + +namespace vcpkg::Commands::List +{ + static const std::string OPTION_FULLDESC = "--x-full-desc"; // TODO: This should find a better home, eventually + + static void do_print(const StatusParagraph& pgh, bool full_desc) + { + if (full_desc) + { + System::println("%-30s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description); + } + else + { + System::println("%-30s %-16s %s", + vcpkg::shorten_text(pgh.package.displayname(), 30), + vcpkg::shorten_text(pgh.package.version, 16), + vcpkg::shorten_text(pgh.package.description, 71)); + } + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + static const std::string EXAMPLE = Strings::format( + "The argument should be a substring to search for, or no argument to display all installed libraries.\n%s", + Help::create_example_string("list png")); + args.check_max_arg_count(1, EXAMPLE); + const std::unordered_set options = + args.check_and_get_optional_command_arguments({OPTION_FULLDESC}); + + const StatusParagraphs status_paragraphs = database_load_check(paths); + std::vector installed_packages = get_installed_ports(status_paragraphs); + + if (installed_packages.empty()) + { + System::println("No packages are installed. Did you mean `search`?"); + Checks::exit_success(VCPKG_LINE_INFO); + } + + std::sort(installed_packages.begin(), + installed_packages.end(), + [](const StatusParagraph* lhs, const StatusParagraph* rhs) -> bool { + return lhs->package.displayname() < rhs->package.displayname(); + }); + + if (args.command_arguments.size() == 0) + { + for (const StatusParagraph* status_paragraph : installed_packages) + { + do_print(*status_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + } + } + else + { + // At this point there is 1 argument + for (const StatusParagraph* status_paragraph : installed_packages) + { + const std::string displayname = status_paragraph->package.displayname(); + if (Strings::case_insensitive_ascii_find(displayname, args.command_arguments[0]) == displayname.end()) + { + continue; + } + + do_print(*status_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + } + } + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.owns.cpp b/toolsrc/src/vcpkg/commands.owns.cpp new file mode 100644 index 000000000..69079e829 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.owns.cpp @@ -0,0 +1,38 @@ +#include "pch.h" + +#include +#include +#include +#include + +namespace vcpkg::Commands::Owns +{ + static void search_file(const VcpkgPaths& paths, const std::string& file_substr, const StatusParagraphs& status_db) + { + const std::vector installed_files = get_installed_files(paths, status_db); + for (const StatusParagraphAndAssociatedFiles& pgh_and_file : installed_files) + { + const StatusParagraph& pgh = pgh_and_file.pgh; + + for (const std::string& file : pgh_and_file.files) + { + if (file.find(file_substr) != std::string::npos) + { + System::println("%s: %s", pgh.package.displayname(), file); + } + } + } + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + static const std::string EXAMPLE = Strings::format("The argument should be a pattern to search for. %s", + Help::create_example_string("owns zlib.dll")); + args.check_exact_arg_count(1, EXAMPLE); + args.check_and_get_optional_command_arguments({}); + + StatusParagraphs status_db = database_load_check(paths); + search_file(paths, args.command_arguments[0], status_db); + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp new file mode 100644 index 000000000..b70ad2b80 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -0,0 +1,182 @@ +#include "pch.h" + +#include +#include +#include + +#include +#include +#include + +namespace vcpkg::Commands::PortsDiff +{ + struct UpdatedPort + { + static bool compare_by_name(const UpdatedPort& left, const UpdatedPort& right) + { + return left.port < right.port; + } + + std::string port; + VersionDiff version_diff; + }; + + template + struct SetElementPresence + { + static SetElementPresence create(std::vector left, std::vector right) + { + // TODO: This can be done with one pass instead of three passes + SetElementPresence output; + std::set_difference( + left.cbegin(), left.cend(), right.cbegin(), right.cend(), std::back_inserter(output.only_left)); + std::set_intersection( + left.cbegin(), left.cend(), right.cbegin(), right.cend(), std::back_inserter(output.both)); + std::set_difference( + right.cbegin(), right.cend(), left.cbegin(), left.cend(), std::back_inserter(output.only_right)); + + return output; + } + + std::vector only_left; + std::vector both; + std::vector only_right; + }; + + static std::vector find_updated_ports( + const std::vector& ports, + const std::map& previous_names_and_versions, + const std::map& current_names_and_versions) + { + std::vector output; + for (const std::string& name : ports) + { + const VersionT& previous_version = previous_names_and_versions.at(name); + const VersionT& current_version = current_names_and_versions.at(name); + if (previous_version == current_version) + { + continue; + } + + output.push_back({name, VersionDiff(previous_version, current_version)}); + } + + return output; + } + + static void do_print_name_and_version(const std::vector& ports_to_print, + const std::map& names_and_versions) + { + for (const std::string& name : ports_to_print) + { + const VersionT& version = names_and_versions.at(name); + System::println(" - %-14s %-16s", name, version); + } + } + + static std::map read_ports_from_commit(const VcpkgPaths& paths, + const std::wstring& git_commit_id) + { + std::error_code ec; + auto& fs = paths.get_filesystem(); + const fs::path& git_exe = paths.get_git_exe(); + const fs::path dot_git_dir = paths.root / ".git"; + const std::wstring ports_dir_name_as_string = paths.ports.filename().native(); + const fs::path temp_checkout_path = + paths.root / Strings::wformat(L"%s-%s", ports_dir_name_as_string, git_commit_id); + fs.create_directory(temp_checkout_path, ec); + const std::wstring checkout_this_dir = + Strings::wformat(LR"(.\%s)", ports_dir_name_as_string); // Must be relative to the root of the repository + + const std::wstring cmd = + Strings::wformat(LR"("%s" --git-dir="%s" --work-tree="%s" checkout %s -f -q -- %s %s & "%s" reset >NUL)", + git_exe.native(), + dot_git_dir.native(), + temp_checkout_path.native(), + git_commit_id, + checkout_this_dir, + L".vcpkg-root", + git_exe.native()); + System::cmd_execute_clean(cmd); + const std::map names_and_versions = Paragraphs::load_all_port_names_and_versions( + paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string); + fs.remove_all(temp_checkout_path, ec); + return names_and_versions; + } + + static void check_commit_exists(const fs::path& git_exe, const std::wstring& git_commit_id) + { + static const std::string VALID_COMMIT_OUTPUT = "commit\n"; + + const std::wstring cmd = Strings::wformat(LR"("%s" cat-file -t %s)", git_exe.native(), git_commit_id); + const System::ExitCodeAndOutput output = System::cmd_execute_and_capture_output(cmd); + Checks::check_exit(VCPKG_LINE_INFO, + output.output == VALID_COMMIT_OUTPUT, + "Invalid commit id %s", + Strings::to_utf8(git_commit_id)); + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + static const std::string EXAMPLE = Strings::format("The argument should be a branch/tag/hash to checkout.\n%s", + Help::create_example_string("portsdiff mybranchname")); + args.check_min_arg_count(1, EXAMPLE); + args.check_max_arg_count(2, EXAMPLE); + args.check_and_get_optional_command_arguments({}); + + const fs::path& git_exe = paths.get_git_exe(); + + const std::wstring git_commit_id_for_previous_snapshot = Strings::to_utf16(args.command_arguments.at(0)); + const std::wstring git_commit_id_for_current_snapshot = + args.command_arguments.size() < 2 ? L"HEAD" : Strings::to_utf16(args.command_arguments.at(1)); + + check_commit_exists(git_exe, git_commit_id_for_current_snapshot); + check_commit_exists(git_exe, git_commit_id_for_previous_snapshot); + + const std::map current_names_and_versions = + read_ports_from_commit(paths, git_commit_id_for_current_snapshot); + const std::map previous_names_and_versions = + read_ports_from_commit(paths, git_commit_id_for_previous_snapshot); + + // Already sorted, so set_difference can work on std::vector too + const std::vector current_ports = Util::extract_keys(current_names_and_versions); + const std::vector previous_ports = Util::extract_keys(previous_names_and_versions); + + const SetElementPresence setp = + SetElementPresence::create(current_ports, previous_ports); + + const std::vector& added_ports = setp.only_left; + if (!added_ports.empty()) + { + System::println("\nThe following %d ports were added:", added_ports.size()); + do_print_name_and_version(added_ports, current_names_and_versions); + } + + const std::vector& removed_ports = setp.only_right; + if (!removed_ports.empty()) + { + System::println("\nThe following %d ports were removed:", removed_ports.size()); + do_print_name_and_version(removed_ports, previous_names_and_versions); + } + + const std::vector& common_ports = setp.both; + const std::vector updated_ports = + find_updated_ports(common_ports, previous_names_and_versions, current_names_and_versions); + + if (!updated_ports.empty()) + { + System::println("\nThe following %d ports were updated:", updated_ports.size()); + for (const UpdatedPort& p : updated_ports) + { + System::println(" - %-14s %-16s", p.port, p.version_diff.to_string()); + } + } + + if (added_ports.empty() && removed_ports.empty() && updated_ports.empty()) + { + System::println("There were no changes in the ports between the two commits."); + } + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.search.cpp b/toolsrc/src/vcpkg/commands.search.cpp new file mode 100644 index 000000000..3ba8707de --- /dev/null +++ b/toolsrc/src/vcpkg/commands.search.cpp @@ -0,0 +1,146 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Commands::Search +{ + static const std::string OPTION_GRAPH = "--graph"; // TODO: This should find a better home, eventually + static const std::string OPTION_FULLDESC = "--x-full-desc"; // TODO: This should find a better home, eventually + + static std::string replace_dashes_with_underscore(const std::string& input) + { + std::string output = input; + std::replace(output.begin(), output.end(), '-', '_'); + return output; + } + + static std::string create_graph_as_string( + const std::vector>& source_control_files) + { + int empty_node_count = 0; + + std::string s; + s.append("digraph G{ rankdir=LR; edge [minlen=3]; overlap=false;"); + + for (const auto& source_control_file : source_control_files) + { + const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; + if (source_paragraph.depends.empty()) + { + empty_node_count++; + continue; + } + + const std::string name = replace_dashes_with_underscore(source_paragraph.name); + s.append(Strings::format("%s;", name)); + for (const Dependency& d : source_paragraph.depends) + { + const std::string dependency_name = replace_dashes_with_underscore(d.name()); + s.append(Strings::format("%s -> %s;", name, dependency_name)); + } + } + + s.append(Strings::format("empty [label=\"%d singletons...\"]; }", empty_node_count)); + return s; + } + static void do_print(const SourceParagraph& source_paragraph, bool full_desc) + { + if (full_desc) + { + System::println( + "%-20s %-16s %s", source_paragraph.name, source_paragraph.version, source_paragraph.description); + } + else + { + System::println("%-20s %-16s %s", + vcpkg::shorten_text(source_paragraph.name, 20), + vcpkg::shorten_text(source_paragraph.version, 16), + vcpkg::shorten_text(source_paragraph.description, 81)); + } + } + + static void do_print(const std::string& name, const FeatureParagraph& feature_paragraph, bool full_desc) + { + if (full_desc) + { + System::println("%-37s %s", name + "[" + feature_paragraph.name + "]", feature_paragraph.description); + } + else + { + System::println("%-37s %s", + vcpkg::shorten_text(name + "[" + feature_paragraph.name + "]", 37), + vcpkg::shorten_text(feature_paragraph.description, 81)); + } + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + static const std::string EXAMPLE = Strings::format( + "The argument should be a substring to search for, or no argument to display all libraries.\n%s", + Help::create_example_string("search png")); + args.check_max_arg_count(1, EXAMPLE); + const std::unordered_set options = + args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}); + + auto source_paragraphs = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + + if (options.find(OPTION_GRAPH) != options.cend()) + { + const std::string graph_as_string = create_graph_as_string(source_paragraphs); + System::println(graph_as_string); + Checks::exit_success(VCPKG_LINE_INFO); + } + + if (args.command_arguments.empty()) + { + for (const auto& source_control_file : source_paragraphs) + { + do_print(*source_control_file->core_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + for (auto&& feature_paragraph : source_control_file->feature_paragraphs) + { + do_print(source_control_file->core_paragraph->name, + *feature_paragraph, + options.find(OPTION_FULLDESC) != options.cend()); + } + } + } + else + { + const auto& icontains = Strings::case_insensitive_ascii_contains; + + // At this point there is 1 argument + auto&& args_zero = args.command_arguments[0]; + for (const auto& source_control_file : source_paragraphs) + { + auto&& sp = *source_control_file->core_paragraph; + + bool contains_name = icontains(sp.name, args_zero); + if (contains_name || icontains(sp.description, args_zero)) + { + do_print(sp, options.find(OPTION_FULLDESC) != options.cend()); + } + + for (auto&& feature_paragraph : source_control_file->feature_paragraphs) + { + if (contains_name || icontains(feature_paragraph->name, args_zero) || + icontains(feature_paragraph->description, args_zero)) + { + do_print(sp.name, *feature_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + } + } + } + } + + System::println( + "\nIf your library is not listed, please open an issue at and/or consider making a pull request:\n" + " https://github.com/Microsoft/vcpkg/issues"); + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp new file mode 100644 index 000000000..c6cc82d1f --- /dev/null +++ b/toolsrc/src/vcpkg/commands.version.cpp @@ -0,0 +1,67 @@ +#include "pch.h" + +#include +#include +#include + +#define STRINGIFY(...) #__VA_ARGS__ +#define MACRO_TO_STRING(X) STRINGIFY(X) + +#define VCPKG_VERSION_AS_STRING MACRO_TO_STRING(VCPKG_VERSION) + +namespace vcpkg::Commands::Version +{ + const std::string& version() + { + static const std::string S_VERSION = +#include "../VERSION.txt" + + +std::string(VCPKG_VERSION_AS_STRING) +#ifndef NDEBUG + + std::string("-debug") +#endif + + std::string(Metrics::get_compiled_metrics_enabled() ? Strings::EMPTY : "-external"); + return S_VERSION; + } + + void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths) + { + auto version_file = paths.get_filesystem().read_contents(paths.root / "toolsrc" / "VERSION.txt"); + if (const auto version_contents = version_file.get()) + { + int maj1, min1, rev1; + const auto num1 = sscanf_s(version_contents->c_str(), "\"%d.%d.%d\"", &maj1, &min1, &rev1); + + int maj2, min2, rev2; + const auto num2 = sscanf_s(Version::version().c_str(), "%d.%d.%d-", &maj2, &min2, &rev2); + + if (num1 == 3 && num2 == 3) + { + if (maj1 != maj2 || min1 != min2 || rev1 != rev2) + { + System::println(System::Color::warning, + "Warning: Different source is available for vcpkg (%d.%d.%d -> %d.%d.%d). Use " + ".\\bootstrap-vcpkg.bat to update.", + maj2, + min2, + rev2, + maj1, + min1, + rev1); + } + } + } + } + + void perform_and_exit(const VcpkgCmdArguments& args) + { + args.check_exact_arg_count(0); + args.check_and_get_optional_command_arguments({}); + + System::println("Vcpkg package management program version %s\n" + "\n" + "See LICENSE.txt for license information.", + version()); + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp new file mode 100644 index 000000000..da8f1e178 --- /dev/null +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -0,0 +1,669 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Dependencies +{ + struct FeatureNodeEdges + { + std::vector remove_edges; + std::vector build_edges; + bool plus = false; + }; + + struct Cluster : Util::MoveOnlyBase + { + std::vector status_paragraphs; + Optional source_control_file; + PackageSpec spec; + std::unordered_map edges; + std::unordered_set to_install_features; + std::unordered_set original_features; + bool will_remove = false; + bool transient_uninstalled = true; + RequestType request_type = RequestType::AUTO_SELECTED; + }; + + struct ClusterPtr + { + Cluster* ptr; + + Cluster* operator->() const { return ptr; } + }; + + bool operator==(const ClusterPtr& l, const ClusterPtr& r) { return l.ptr == r.ptr; } +} + +template<> +struct std::hash +{ + size_t operator()(const vcpkg::Dependencies::ClusterPtr& value) const + { + return std::hash()(value.ptr->spec); + } +}; + +namespace vcpkg::Dependencies +{ + struct GraphPlan + { + Graphs::Graph remove_graph; + Graphs::Graph install_graph; + }; + + struct ClusterGraph : Util::MoveOnlyBase + { + explicit ClusterGraph(std::unordered_map&& ports) + : m_ports(std::move(ports)) + { + } + + Cluster& get(const PackageSpec& spec) + { + auto it = m_graph.find(spec); + if (it == m_graph.end()) + { + // Load on-demand from m_ports + auto it_ports = m_ports.find(spec.name()); + if (it_ports != m_ports.end()) + { + auto& clust = m_graph[spec]; + clust.spec = spec; + cluster_from_scf(*it_ports->second, clust); + return clust; + } + return m_graph[spec]; + } + return it->second; + } + + private: + void cluster_from_scf(const SourceControlFile& scf, Cluster& out_cluster) const + { + FeatureNodeEdges core_dependencies; + core_dependencies.build_edges = + filter_dependencies_to_specs(scf.core_paragraph->depends, out_cluster.spec.triplet()); + out_cluster.edges.emplace("core", std::move(core_dependencies)); + + for (const auto& feature : scf.feature_paragraphs) + { + FeatureNodeEdges added_edges; + added_edges.build_edges = filter_dependencies_to_specs(feature->depends, out_cluster.spec.triplet()); + out_cluster.edges.emplace(feature->name, std::move(added_edges)); + } + out_cluster.source_control_file = &scf; + } + + std::unordered_map m_graph; + std::unordered_map m_ports; + }; + + std::vector AnyParagraph::dependencies(const Triplet& triplet) const + { + auto to_package_specs = [&](const std::vector& dependencies_as_string) { + return Util::fmap(dependencies_as_string, [&](const std::string s) { + return PackageSpec::from_name_and_triplet(s, triplet).value_or_exit(VCPKG_LINE_INFO); + }); + }; + + if (auto p = this->status_paragraph.get()) + { + return to_package_specs(p->package.depends); + } + + if (auto p = this->binary_control_file.get()) + { + auto deps = Util::fmap_flatten(p->features, [](const BinaryParagraph& pgh) { return pgh.depends; }); + deps.insert(deps.end(), p->core_paragraph.depends.begin(), p->core_paragraph.depends.end()); + return to_package_specs(deps); + } + + if (auto p = this->source_paragraph.get()) + { + return to_package_specs(filter_dependencies(p->depends, triplet)); + } + + Checks::exit_with_message(VCPKG_LINE_INFO, + "Cannot get dependencies because there was none of: source/binary/status paragraphs"); + } + + std::string to_output_string(RequestType request_type, const CStringView s) + { + switch (request_type) + { + case RequestType::AUTO_SELECTED: return Strings::format(" * %s", s); + case RequestType::USER_REQUESTED: return Strings::format(" %s", s); + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + + InstallPlanAction::InstallPlanAction() : plan_type(InstallPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} + + InstallPlanAction::InstallPlanAction(const PackageSpec& spec, + const SourceControlFile& any_paragraph, + const std::unordered_set& features, + const RequestType& request_type) + : spec(spec), plan_type(InstallPlanType::BUILD_AND_INSTALL), request_type(request_type), feature_list(features) + { + this->any_paragraph.source_control_file = &any_paragraph; + } + + InstallPlanAction::InstallPlanAction(const PackageSpec& spec, + const std::unordered_set& features, + const RequestType& request_type) + : spec(spec), plan_type(InstallPlanType::ALREADY_INSTALLED), request_type(request_type), feature_list(features) + { + } + + InstallPlanAction::InstallPlanAction(const PackageSpec& spec, + const AnyParagraph& any_paragraph, + const RequestType& request_type) + : spec(spec), any_paragraph(any_paragraph), plan_type(InstallPlanType::UNKNOWN), request_type(request_type) + { + if (auto p = any_paragraph.status_paragraph.get()) + { + this->plan_type = InstallPlanType::ALREADY_INSTALLED; + return; + } + + if (auto p = any_paragraph.binary_control_file.get()) + { + this->plan_type = InstallPlanType::INSTALL; + return; + } + + if (auto p = any_paragraph.source_paragraph.get()) + { + this->plan_type = InstallPlanType::BUILD_AND_INSTALL; + return; + } + } + + std::string InstallPlanAction::displayname() const + { + if (this->feature_list.empty()) + { + return this->spec.to_string(); + } + + const std::string features = Strings::join(",", this->feature_list); + return Strings::format("%s[%s]:%s", this->spec.name(), features, this->spec.triplet()); + } + + bool InstallPlanAction::compare_by_name(const InstallPlanAction* left, const InstallPlanAction* right) + { + return left->spec.name() < right->spec.name(); + } + + RemovePlanAction::RemovePlanAction() : plan_type(RemovePlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} + + RemovePlanAction::RemovePlanAction(const PackageSpec& spec, + const RemovePlanType& plan_type, + const RequestType& request_type) + : spec(spec), plan_type(plan_type), request_type(request_type) + { + } + + const PackageSpec& AnyAction::spec() const + { + if (const auto p = install_plan.get()) + { + return p->spec; + } + + if (const auto p = remove_plan.get()) + { + return p->spec; + } + + Checks::exit_with_message(VCPKG_LINE_INFO, "Null action"); + } + + bool ExportPlanAction::compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right) + { + return left->spec.name() < right->spec.name(); + } + + ExportPlanAction::ExportPlanAction() : plan_type(ExportPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} + + ExportPlanAction::ExportPlanAction(const PackageSpec& spec, + const AnyParagraph& any_paragraph, + const RequestType& request_type) + : spec(spec), any_paragraph(any_paragraph), plan_type(ExportPlanType::UNKNOWN), request_type(request_type) + { + if (auto p = any_paragraph.binary_control_file.get()) + { + this->plan_type = ExportPlanType::ALREADY_BUILT; + return; + } + + if (auto p = any_paragraph.source_paragraph.get()) + { + this->plan_type = ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT; + return; + } + } + + bool RemovePlanAction::compare_by_name(const RemovePlanAction* left, const RemovePlanAction* right) + { + return left->spec.name() < right->spec.name(); + } + + MapPortFile::MapPortFile(const std::unordered_map& map) : ports(map) {} + + const SourceControlFile& MapPortFile::get_control_file(const std::string& spec) const + { + auto scf = ports.find(spec); + if (scf == ports.end()) + { + Checks::exit_fail(VCPKG_LINE_INFO); + } + return scf->second; + } + + PathsPortFile::PathsPortFile(const VcpkgPaths& paths) : ports(paths) {} + + const SourceControlFile& PathsPortFile::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()) + { + auto it = cache.emplace(spec, std::move(*scf->get())); + return it.first->second; + } + print_error_message(source_control_file.error()); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + std::vector create_install_plan(const PortFileProvider& port_file_provider, + const std::vector& specs, + const StatusParagraphs& status_db) + { + struct InstallAdjacencyProvider final : Graphs::AdjacencyProvider + { + const PortFileProvider& port_file_provider; + const StatusParagraphs& status_db; + const std::unordered_set& specs_as_set; + + InstallAdjacencyProvider(const PortFileProvider& port_file_provider, + const StatusParagraphs& s, + const std::unordered_set& specs_as_set) + : port_file_provider(port_file_provider), status_db(s), specs_as_set(specs_as_set) + { + } + + std::vector adjacency_list(const InstallPlanAction& plan) const override + { + if (plan.any_paragraph.status_paragraph.get()) return std::vector{}; + return plan.any_paragraph.dependencies(plan.spec.triplet()); + } + + InstallPlanAction load_vertex_data(const PackageSpec& spec) const override + { + const RequestType request_type = specs_as_set.find(spec) != specs_as_set.end() + ? RequestType::USER_REQUESTED + : RequestType::AUTO_SELECTED; + auto it = status_db.find_installed(spec); + if (it != status_db.end()) return InstallPlanAction{spec, {*it->get(), nullopt, nullopt}, request_type}; + return InstallPlanAction{ + spec, + {nullopt, nullopt, *port_file_provider.get_control_file(spec.name()).core_paragraph}, + request_type}; + } + }; + + const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); + std::vector toposort = + Graphs::topological_sort(specs, InstallAdjacencyProvider{port_file_provider, status_db, specs_as_set}); + Util::erase_remove_if(toposort, [](const InstallPlanAction& plan) { + return plan.request_type == RequestType::AUTO_SELECTED && + plan.plan_type == InstallPlanType::ALREADY_INSTALLED; + }); + + return toposort; + } + + std::vector create_remove_plan(const std::vector& specs, + const StatusParagraphs& status_db) + { + struct RemoveAdjacencyProvider final : Graphs::AdjacencyProvider + { + const StatusParagraphs& status_db; + const std::vector& installed_ports; + const std::unordered_set& specs_as_set; + + RemoveAdjacencyProvider(const StatusParagraphs& status_db, + const std::vector& installed_ports, + const std::unordered_set& specs_as_set) + : status_db(status_db), installed_ports(installed_ports), specs_as_set(specs_as_set) + { + } + + std::vector adjacency_list(const RemovePlanAction& plan) const override + { + if (plan.plan_type == RemovePlanType::NOT_INSTALLED) + { + return {}; + } + + const PackageSpec& spec = plan.spec; + std::vector dependents; + for (const StatusParagraph* an_installed_package : installed_ports) + { + if (an_installed_package->package.spec.triplet() != spec.triplet()) continue; + + const std::vector& deps = an_installed_package->package.depends; + if (std::find(deps.begin(), deps.end(), spec.name()) == deps.end()) continue; + + dependents.push_back(an_installed_package->package.spec); + } + + return dependents; + } + + RemovePlanAction load_vertex_data(const PackageSpec& spec) const override + { + const RequestType request_type = specs_as_set.find(spec) != specs_as_set.end() + ? RequestType::USER_REQUESTED + : RequestType::AUTO_SELECTED; + const StatusParagraphs::const_iterator it = status_db.find_installed(spec); + if (it == status_db.end()) + { + return RemovePlanAction{spec, RemovePlanType::NOT_INSTALLED, request_type}; + } + return RemovePlanAction{spec, RemovePlanType::REMOVE, request_type}; + } + }; + + const std::vector& installed_ports = get_installed_ports(status_db); + const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); + return Graphs::topological_sort(specs, RemoveAdjacencyProvider{status_db, installed_ports, specs_as_set}); + } + + std::vector create_export_plan(const VcpkgPaths& paths, + const std::vector& specs, + const StatusParagraphs& status_db) + { + struct ExportAdjacencyProvider final : Graphs::AdjacencyProvider + { + const VcpkgPaths& paths; + const StatusParagraphs& status_db; + const std::unordered_set& specs_as_set; + + ExportAdjacencyProvider(const VcpkgPaths& p, + const StatusParagraphs& s, + const std::unordered_set& specs_as_set) + : paths(p), status_db(s), specs_as_set(specs_as_set) + { + } + + std::vector adjacency_list(const ExportPlanAction& plan) const override + { + return plan.any_paragraph.dependencies(plan.spec.triplet()); + } + + ExportPlanAction load_vertex_data(const PackageSpec& spec) const override + { + const RequestType request_type = specs_as_set.find(spec) != specs_as_set.end() + ? RequestType::USER_REQUESTED + : RequestType::AUTO_SELECTED; + + Expected maybe_bpgh = Paragraphs::try_load_cached_control_package(paths, spec); + if (auto bcf = maybe_bpgh.get()) + return ExportPlanAction{spec, AnyParagraph{nullopt, std::move(*bcf), nullopt}, request_type}; + + auto maybe_scf = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); + if (auto scf = maybe_scf.get()) + return ExportPlanAction{spec, {nullopt, nullopt, *scf->get()->core_paragraph}, request_type}; + else + print_error_message(maybe_scf.error()); + + Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec); + } + }; + + const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); + std::vector toposort = + Graphs::topological_sort(specs, ExportAdjacencyProvider{paths, status_db, specs_as_set}); + return toposort; + } + + enum class MarkPlusResult + { + FEATURE_NOT_FOUND, + SUCCESS, + }; + + MarkPlusResult mark_plus(const std::string& feature, + Cluster& cluster, + ClusterGraph& pkg_to_cluster, + GraphPlan& graph_plan); + void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); + + MarkPlusResult mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) + { + if (feature.empty()) + { + // Indicates that core was not specified in the reference + return mark_plus("core", cluster, graph, graph_plan); + } + + auto it = cluster.edges.find(feature); + if (it == cluster.edges.end()) return MarkPlusResult::FEATURE_NOT_FOUND; + + if (cluster.edges[feature].plus) return MarkPlusResult::SUCCESS; + + if (cluster.original_features.find(feature) == cluster.original_features.end()) + { + cluster.transient_uninstalled = true; + } + + if (!cluster.transient_uninstalled) + { + return MarkPlusResult::SUCCESS; + } + cluster.edges[feature].plus = true; + + if (!cluster.original_features.empty()) + { + mark_minus(cluster, graph, graph_plan); + } + + graph_plan.install_graph.add_vertex({&cluster}); + auto& tracked = cluster.to_install_features; + tracked.insert(feature); + + if (feature != "core") + { + // All features implicitly depend on core + auto res = mark_plus("core", cluster, graph, graph_plan); + + // Should be impossible for "core" to not exist + Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS); + } + + for (auto&& depend : cluster.edges[feature].build_edges) + { + auto& depend_cluster = graph.get(depend.spec()); + auto res = mark_plus(depend.feature(), depend_cluster, graph, graph_plan); + + Checks::check_exit(VCPKG_LINE_INFO, + res == MarkPlusResult::SUCCESS, + "Error: Unable to satisfy dependency %s of %s", + depend, + FeatureSpec(cluster.spec, feature)); + + if (&depend_cluster == &cluster) continue; + graph_plan.install_graph.add_edge({&cluster}, {&depend_cluster}); + } + + return MarkPlusResult::SUCCESS; + } + + void mark_minus(Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) + { + if (cluster.will_remove) return; + cluster.will_remove = true; + + graph_plan.remove_graph.add_vertex({&cluster}); + for (auto&& pair : cluster.edges) + { + auto& remove_edges_edges = pair.second.remove_edges; + for (auto&& depend : remove_edges_edges) + { + auto& depend_cluster = graph.get(depend.spec()); + graph_plan.remove_graph.add_edge({&cluster}, {&depend_cluster}); + mark_minus(depend_cluster, graph, graph_plan); + } + } + + cluster.transient_uninstalled = true; + for (auto&& original_feature : cluster.original_features) + { + auto res = mark_plus(original_feature, cluster, graph, graph_plan); + if (res != MarkPlusResult::SUCCESS) + { + System::println(System::Color::warning, + "Warning: could not reinstall feature %s", + FeatureSpec{cluster.spec, original_feature}); + } + } + } + + static ClusterGraph create_feature_install_graph(const std::unordered_map& map, + const StatusParagraphs& status_db) + { + std::unordered_map ptr_map; + for (auto&& p : map) + ptr_map.emplace(p.first, &p.second); + ClusterGraph graph(std::move(ptr_map)); + + auto installed_ports = get_installed_ports(status_db); + + for (auto&& status_paragraph : installed_ports) + { + Cluster& cluster = graph.get(status_paragraph->package.spec); + + cluster.transient_uninstalled = false; + + cluster.status_paragraphs.emplace_back(status_paragraph); + + auto& status_paragraph_feature = status_paragraph->package.feature; + // In this case, empty string indicates the "core" paragraph for a package. + if (status_paragraph_feature.empty()) + { + cluster.original_features.insert("core"); + } + else + { + cluster.original_features.insert(status_paragraph_feature); + } + } + + for (auto&& status_paragraph : installed_ports) + { + auto& spec = status_paragraph->package.spec; + auto& status_paragraph_feature = status_paragraph->package.feature; + auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends, + status_paragraph->package.spec.triplet()); + + for (auto&& dependency : reverse_edges) + { + auto& dep_cluster = graph.get(dependency.spec()); + + auto depends_name = dependency.feature(); + if (depends_name.empty()) depends_name = "core"; + + auto& target_node = dep_cluster.edges[depends_name]; + target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); + } + } + return graph; + } + + std::vector create_feature_install_plan(const std::unordered_map& map, + const std::vector& specs, + const StatusParagraphs& status_db) + { + ClusterGraph graph = create_feature_install_graph(map, status_db); + + GraphPlan graph_plan; + for (auto&& spec : specs) + { + Cluster& spec_cluster = graph.get(spec.spec()); + spec_cluster.request_type = RequestType::USER_REQUESTED; + auto res = mark_plus(spec.feature(), spec_cluster, graph, graph_plan); + + Checks::check_exit( + VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); + + graph_plan.install_graph.add_vertex(ClusterPtr{&spec_cluster}); + } + + Graphs::GraphAdjacencyProvider adjacency_remove_graph(graph_plan.remove_graph.adjacency_list()); + auto remove_vertex_list = graph_plan.remove_graph.vertex_list(); + auto remove_toposort = Graphs::topological_sort(remove_vertex_list, adjacency_remove_graph); + + Graphs::GraphAdjacencyProvider adjacency_install_graph(graph_plan.install_graph.adjacency_list()); + auto insert_vertex_list = graph_plan.install_graph.vertex_list(); + auto insert_toposort = Graphs::topological_sort(insert_vertex_list, adjacency_install_graph); + + std::vector plan; + + for (auto&& p_cluster : remove_toposort) + { + auto scf = *p_cluster->source_control_file.get(); + auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, p_cluster->spec.triplet()) + .value_or_exit(VCPKG_LINE_INFO); + plan.emplace_back(RemovePlanAction{ + std::move(spec), + RemovePlanType::REMOVE, + p_cluster->request_type, + }); + } + + for (auto&& p_cluster : insert_toposort) + { + if (p_cluster->transient_uninstalled) + { + // If it will be transiently uninstalled, we need to issue a full installation command + auto pscf = p_cluster->source_control_file.value_or_exit(VCPKG_LINE_INFO); + Checks::check_exit(VCPKG_LINE_INFO, pscf != nullptr); + plan.emplace_back(InstallPlanAction{ + p_cluster->spec, + *pscf, + p_cluster->to_install_features, + p_cluster->request_type, + }); + } + else + { + // If the package isn't transitively installed, still include it if the user explicitly requested it + if (p_cluster->request_type != RequestType::USER_REQUESTED) continue; + plan.emplace_back(InstallPlanAction{ + p_cluster->spec, + p_cluster->original_features, + p_cluster->request_type, + }); + } + } + + return plan; + } +} diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp new file mode 100644 index 000000000..de6464c87 --- /dev/null +++ b/toolsrc/src/vcpkg/export.cpp @@ -0,0 +1,528 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace vcpkg::Export +{ + using Dependencies::ExportPlanAction; + using Dependencies::ExportPlanType; + using Dependencies::RequestType; + using Install::InstallDir; + + static std::string create_nuspec_file_contents(const std::string& raw_exported_dir, + const std::string& targets_redirect_path, + const std::string& nuget_id, + const std::string& nupkg_version) + { + static constexpr auto CONTENT_TEMPLATE = R"( + + + @NUGET_ID@ + @VERSION@ + vcpkg + + Vcpkg NuGet export + + + + + + + + + +)"; + + std::string nuspec_file_content = std::regex_replace(CONTENT_TEMPLATE, std::regex("@NUGET_ID@"), nuget_id); + nuspec_file_content = std::regex_replace(nuspec_file_content, std::regex("@VERSION@"), nupkg_version); + nuspec_file_content = + std::regex_replace(nuspec_file_content, std::regex("@RAW_EXPORTED_DIR@"), raw_exported_dir); + nuspec_file_content = + std::regex_replace(nuspec_file_content, std::regex("@TARGETS_REDIRECT_PATH@"), targets_redirect_path); + return nuspec_file_content; + } + + static std::string create_targets_redirect(const std::string& target_path) noexcept + { + return Strings::format(R"###( + + + +)###", + target_path, + target_path); + } + + static void print_plan(const std::map>& group_by_plan_type) + { + static constexpr std::array ORDER = {ExportPlanType::ALREADY_BUILT, + ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT}; + + for (const ExportPlanType plan_type : ORDER) + { + const auto it = group_by_plan_type.find(plan_type); + if (it == group_by_plan_type.cend()) + { + continue; + } + + std::vector cont = it->second; + std::sort(cont.begin(), cont.end(), &ExportPlanAction::compare_by_name); + const std::string as_string = Strings::join("\n", cont, [](const ExportPlanAction* p) { + return Dependencies::to_output_string(p->request_type, p->spec.to_string()); + }); + + switch (plan_type) + { + case ExportPlanType::ALREADY_BUILT: + System::println("The following packages are already built and will be exported:\n%s", as_string); + continue; + case ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT: + System::println("The following packages need to be built:\n%s", as_string); + continue; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + } + + static std::string create_export_id() + { + const tm date_time = System::get_current_date_time(); + + // Format is: YYYYmmdd-HHMMSS + // 15 characters + 1 null terminating character will be written for a total of 16 chars + char mbstr[16]; + const size_t bytes_written = std::strftime(mbstr, sizeof(mbstr), "%Y%m%d-%H%M%S", &date_time); + Checks::check_exit(VCPKG_LINE_INFO, + bytes_written == 15, + "Expected 15 bytes to be written, but %u were written", + bytes_written); + const std::string date_time_as_string(mbstr); + return ("vcpkg-export-" + date_time_as_string); + } + + static fs::path do_nuget_export(const VcpkgPaths& paths, + const std::string& nuget_id, + const std::string& nuget_version, + const fs::path& raw_exported_dir, + const fs::path& output_dir) + { + Files::Filesystem& fs = paths.get_filesystem(); + const fs::path& nuget_exe = paths.get_nuget_exe(); + + // This file will be placed in "build\native" in the nuget package. Therefore, go up two dirs. + const std::string targets_redirect_content = + create_targets_redirect("../../scripts/buildsystems/msbuild/vcpkg.targets"); + const fs::path targets_redirect = paths.buildsystems / "tmp" / "vcpkg.export.nuget.targets"; + + std::error_code ec; + fs.create_directories(paths.buildsystems / "tmp", ec); + + fs.write_contents(targets_redirect, targets_redirect_content); + + const std::string nuspec_file_content = + create_nuspec_file_contents(raw_exported_dir.string(), targets_redirect.string(), nuget_id, nuget_version); + const fs::path nuspec_file_path = paths.buildsystems / "tmp" / "vcpkg.export.nuspec"; + fs.write_contents(nuspec_file_path, nuspec_file_content); + + // -NoDefaultExcludes is needed for ".vcpkg-root" + const std::wstring cmd_line = + Strings::wformat(LR"("%s" pack -OutputDirectory "%s" "%s" -NoDefaultExcludes > nul)", + nuget_exe.native(), + output_dir.native(), + nuspec_file_path.native()); + + const int exit_code = System::cmd_execute_clean(cmd_line); + Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: NuGet package creation failed"); + + const fs::path output_path = output_dir / (nuget_id + ".nupkg"); + return output_path; + } + + struct ArchiveFormat final + { + enum class BackingEnum + { + ZIP = 1, + SEVEN_ZIP, + }; + + constexpr ArchiveFormat() = delete; + + constexpr ArchiveFormat(BackingEnum backing_enum, const wchar_t* extension, const wchar_t* cmake_option) + : backing_enum(backing_enum), m_extension(extension), m_cmake_option(cmake_option) + { + } + + constexpr operator BackingEnum() const { return backing_enum; } + constexpr CWStringView extension() const { return this->m_extension; } + constexpr CWStringView cmake_option() const { return this->m_cmake_option; } + + private: + BackingEnum backing_enum; + const wchar_t* m_extension; + const wchar_t* m_cmake_option; + }; + + namespace ArchiveFormatC + { + constexpr const ArchiveFormat ZIP(ArchiveFormat::BackingEnum::ZIP, L"zip", L"zip"); + constexpr const ArchiveFormat SEVEN_ZIP(ArchiveFormat::BackingEnum::SEVEN_ZIP, L"7z", L"7zip"); + } + + static fs::path do_archive_export(const VcpkgPaths& paths, + const fs::path& raw_exported_dir, + const fs::path& output_dir, + const ArchiveFormat& format) + { + const fs::path& cmake_exe = paths.get_cmake_exe(); + + const std::wstring exported_dir_filename = raw_exported_dir.filename().native(); + const std::wstring exported_archive_filename = + Strings::wformat(L"%s.%s", exported_dir_filename, format.extension()); + const fs::path exported_archive_path = (output_dir / exported_archive_filename); + + // -NoDefaultExcludes is needed for ".vcpkg-root" + const std::wstring cmd_line = Strings::wformat(LR"("%s" -E tar "cf" "%s" --format=%s -- "%s")", + cmake_exe.native(), + exported_archive_path.native(), + format.cmake_option(), + raw_exported_dir.native()); + + const int exit_code = System::cmd_execute_clean(cmd_line); + Checks::check_exit( + VCPKG_LINE_INFO, exit_code == 0, "Error: %s creation failed", exported_archive_path.generic_string()); + return exported_archive_path; + } + + static Optional maybe_lookup(std::unordered_map const& m, + std::string const& key) + { + const auto it = m.find(key); + if (it != m.end()) return it->second; + return nullopt; + } + + void export_integration_files(const fs::path& raw_exported_dir_path, const VcpkgPaths& paths) + { + const std::vector integration_files_relative_to_root = { + {".vcpkg-root"}, + {fs::path{"scripts"} / "buildsystems" / "msbuild" / "applocal.ps1"}, + {fs::path{"scripts"} / "buildsystems" / "msbuild" / "vcpkg.targets"}, + {fs::path{"scripts"} / "buildsystems" / "vcpkg.cmake"}, + {fs::path{"scripts"} / "cmake" / "vcpkg_get_windows_sdk.cmake"}, + {fs::path{"scripts"} / "getWindowsSDK.ps1"}, + {fs::path{"scripts"} / "getProgramFilesPlatformBitness.ps1"}, + {fs::path{"scripts"} / "getProgramFiles32bit.ps1"}, + }; + + for (const fs::path& file : integration_files_relative_to_root) + { + const fs::path source = paths.root / file; + fs::path destination = raw_exported_dir_path / file; + Files::Filesystem& fs = paths.get_filesystem(); + std::error_code ec; + fs.create_directories(destination.parent_path(), ec); + Checks::check_exit(VCPKG_LINE_INFO, !ec); + fs.copy_file(source, destination, fs::copy_options::overwrite_existing, ec); + Checks::check_exit(VCPKG_LINE_INFO, !ec); + } + } + + struct ExportArguments + { + bool dry_run; + bool raw; + bool nuget; + bool ifw; + bool zip; + bool seven_zip; + + Optional maybe_nuget_id; + Optional maybe_nuget_version; + + IFW::Options ifw_options; + std::vector specs; + }; + + static ExportArguments handle_export_command_arguments(const VcpkgCmdArguments& args, + const Triplet& default_triplet) + { + ExportArguments ret; + + static const std::string OPTION_DRY_RUN = "--dry-run"; + static const std::string OPTION_RAW = "--raw"; + static const std::string OPTION_NUGET = "--nuget"; + static const std::string OPTION_IFW = "--ifw"; + static const std::string OPTION_ZIP = "--zip"; + static const std::string OPTION_SEVEN_ZIP = "--7zip"; + static const std::string OPTION_NUGET_ID = "--nuget-id"; + static const std::string OPTION_NUGET_VERSION = "--nuget-version"; + static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; + static const std::string OPTION_IFW_PACKAGES_DIR_PATH = "--ifw-packages-directory-path"; + static const std::string OPTION_IFW_REPOSITORY_DIR_PATH = "--ifw-repository-directory-path"; + static const std::string OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path"; + static const std::string OPTION_IFW_INSTALLER_FILE_PATH = "--ifw-installer-file-path"; + + // input sanitization + static const std::string EXAMPLE = Help::create_example_string("export zlib zlib:x64-windows boost --nuget"); + args.check_min_arg_count(1, EXAMPLE); + + ret.specs = Util::fmap(args.command_arguments, [&](auto&& arg) { + return Input::check_and_get_package_spec(arg, default_triplet, EXAMPLE); + }); + + const auto options = args.check_and_get_optional_command_arguments( + { + OPTION_DRY_RUN, + OPTION_RAW, + OPTION_NUGET, + OPTION_IFW, + OPTION_ZIP, + OPTION_SEVEN_ZIP, + }, + { + OPTION_NUGET_ID, + OPTION_NUGET_VERSION, + OPTION_IFW_REPOSITORY_URL, + OPTION_IFW_PACKAGES_DIR_PATH, + OPTION_IFW_REPOSITORY_DIR_PATH, + OPTION_IFW_CONFIG_FILE_PATH, + OPTION_IFW_INSTALLER_FILE_PATH, + }); + ret.dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); + ret.raw = options.switches.find(OPTION_RAW) != options.switches.cend(); + ret.nuget = options.switches.find(OPTION_NUGET) != options.switches.cend(); + ret.ifw = options.switches.find(OPTION_IFW) != options.switches.cend(); + ret.zip = options.switches.find(OPTION_ZIP) != options.switches.cend(); + ret.seven_zip = options.switches.find(OPTION_SEVEN_ZIP) != options.switches.cend(); + + if (!ret.raw && !ret.nuget && !ret.ifw && !ret.zip && !ret.seven_zip && !ret.dry_run) + { + System::println(System::Color::error, + "Must provide at least one export type: --raw --nuget --ifw --zip --7zip"); + System::print(EXAMPLE); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + struct OptionPair + { + const std::string& name; + Optional& out_opt; + }; + const auto options_implies = + [&](const std::string& main_opt_name, bool main_opt, Span implying_opts) { + if (main_opt) + { + for (auto&& opt : implying_opts) + opt.out_opt = maybe_lookup(options.settings, opt.name); + } + else + { + for (auto&& opt : implying_opts) + Checks::check_exit(VCPKG_LINE_INFO, + !maybe_lookup(options.settings, opt.name), + "%s is only valid with %s", + opt.name, + main_opt_name); + } + }; + + options_implies(OPTION_NUGET, + ret.nuget, + { + {OPTION_NUGET_ID, ret.maybe_nuget_id}, + {OPTION_NUGET_VERSION, ret.maybe_nuget_version}, + }); + + options_implies(OPTION_IFW, + ret.ifw, + { + {OPTION_IFW_REPOSITORY_URL, ret.ifw_options.maybe_repository_url}, + {OPTION_IFW_PACKAGES_DIR_PATH, ret.ifw_options.maybe_packages_dir_path}, + {OPTION_IFW_REPOSITORY_DIR_PATH, ret.ifw_options.maybe_repository_dir_path}, + {OPTION_IFW_CONFIG_FILE_PATH, ret.ifw_options.maybe_config_file_path}, + {OPTION_IFW_INSTALLER_FILE_PATH, ret.ifw_options.maybe_installer_file_path}, + }); + return ret; + } + + static void print_next_step_info(const fs::path& prefix) + { + const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; + const CMakeVariable cmake_variable = CMakeVariable(L"CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); + System::println("\n" + "To use the exported libraries in CMake projects use:" + "\n" + " %s" + "\n", + Strings::to_utf8(cmake_variable.s)); + }; + + static void handle_raw_based_export(Span export_plan, + const ExportArguments& opts, + const std::string& export_id, + const VcpkgPaths& paths) + { + 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; + std::error_code ec; + fs.remove_all(raw_exported_dir_path, ec); + fs.create_directory(raw_exported_dir_path, ec); + + // execute the plan + for (const ExportPlanAction& action : export_plan) + { + if (action.plan_type != ExportPlanType::ALREADY_BUILT) + { + Checks::unreachable(VCPKG_LINE_INFO); + } + + const std::string display_name = action.spec.to_string(); + System::println("Exporting package %s... ", display_name); + + const BinaryParagraph& binary_paragraph = + action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + + const InstallDir dirs = InstallDir::from_destination_root( + raw_exported_dir_path / "installed", + action.spec.triplet().to_string(), + raw_exported_dir_path / "installed" / "vcpkg" / "info" / (binary_paragraph.fullstem() + ".list")); + + Install::install_files_and_write_listfile(paths.get_filesystem(), paths.package_dir(action.spec), dirs); + System::println(System::Color::success, "Exporting package %s... done", display_name); + } + + // Copy files needed for integration + export_integration_files(raw_exported_dir_path, paths); + + if (opts.raw) + { + System::println( + System::Color::success, R"(Files exported at: "%s")", raw_exported_dir_path.generic_string()); + print_next_step_info(export_to_path); + } + + if (opts.nuget) + { + System::println("Creating nuget package... "); + + const std::string nuget_id = opts.maybe_nuget_id.value_or(raw_exported_dir_path.filename().string()); + const std::string nuget_version = opts.maybe_nuget_version.value_or("1.0.0"); + const fs::path output_path = + do_nuget_export(paths, nuget_id, nuget_version, raw_exported_dir_path, export_to_path); + System::println(System::Color::success, "Creating nuget package... done"); + System::println(System::Color::success, "NuGet package exported at: %s", output_path.generic_string()); + + System::println(R"( +With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: + Install-Package %s -Source "%s" +)" + "\n", + nuget_id, + output_path.parent_path().u8string()); + } + + if (opts.zip) + { + System::println("Creating zip archive... "); + const fs::path output_path = + do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::ZIP); + System::println(System::Color::success, "Creating zip archive... done"); + System::println(System::Color::success, "Zip archive exported at: %s", output_path.generic_string()); + print_next_step_info("[...]"); + } + + if (opts.seven_zip) + { + System::println("Creating 7zip archive... "); + const fs::path output_path = + do_archive_export(paths, raw_exported_dir_path, export_to_path, ArchiveFormatC::SEVEN_ZIP); + System::println(System::Color::success, "Creating 7zip archive... done"); + System::println(System::Color::success, "7zip archive exported at: %s", output_path.generic_string()); + print_next_step_info("[...]"); + } + + if (!opts.raw) + { + fs.remove_all(raw_exported_dir_path, ec); + } + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + { + const auto opts = handle_export_command_arguments(args, default_triplet); + for (auto&& spec : opts.specs) + Input::check_triplet(spec.triplet(), paths); + + // create the plan + const StatusParagraphs status_db = database_load_check(paths); + std::vector export_plan = Dependencies::create_export_plan(paths, opts.specs, status_db); + Checks::check_exit(VCPKG_LINE_INFO, !export_plan.empty(), "Export plan cannot be empty"); + + std::map> group_by_plan_type; + Util::group_by(export_plan, &group_by_plan_type, [](const ExportPlanAction& p) { return p.plan_type; }); + print_plan(group_by_plan_type); + + const bool has_non_user_requested_packages = + Util::find_if(export_plan, [](const ExportPlanAction& package) -> bool { + return package.request_type != RequestType::USER_REQUESTED; + }) != export_plan.cend(); + + if (has_non_user_requested_packages) + { + System::println(System::Color::warning, + "Additional packages (*) need to be exported to complete this operation."); + } + + const auto it = group_by_plan_type.find(ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT); + if (it != group_by_plan_type.cend() && !it->second.empty()) + { + System::println(System::Color::error, "There are packages that have not been built."); + + // No need to show all of them, just the user-requested ones. Dependency resolution will handle the rest. + std::vector unbuilt = it->second; + Util::erase_remove_if( + unbuilt, [](const ExportPlanAction* a) { return a->request_type != RequestType::USER_REQUESTED; }); + + const auto s = Strings::join(" ", unbuilt, [](const ExportPlanAction* a) { return a->spec.to_string(); }); + System::println("To build them, run:\n" + " vcpkg install %s", + s); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + if (opts.dry_run) + { + Checks::exit_success(VCPKG_LINE_INFO); + } + + std::string export_id = create_export_id(); + + if (opts.raw || opts.nuget || opts.zip || opts.seven_zip) + { + handle_raw_based_export(export_plan, opts, export_id, paths); + } + + if (opts.ifw) + { + IFW::do_export(export_plan, export_id, opts.ifw_options, paths); + + print_next_step_info("@RootDir@/src/vcpkg"); + } + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/globalstate.cpp b/toolsrc/src/vcpkg/globalstate.cpp new file mode 100644 index 000000000..de564d357 --- /dev/null +++ b/toolsrc/src/vcpkg/globalstate.cpp @@ -0,0 +1,13 @@ +#include "pch.h" + +#include + +namespace vcpkg +{ + Util::LockGuarded GlobalState::timer; + std::atomic GlobalState::debugging = false; + std::atomic GlobalState::feature_packages = false; + + std::atomic GlobalState::g_init_console_cp = 0; + std::atomic GlobalState::g_init_console_output_cp = 0; +} diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp new file mode 100644 index 000000000..7867f71d2 --- /dev/null +++ b/toolsrc/src/vcpkg/help.cpp @@ -0,0 +1,131 @@ +#include "pch.h" + +#include +#include + +namespace vcpkg::Help +{ + void help_topics() + { + System::println("Available help topics:\n" + " triplet\n" + " integrate\n" + " export"); + } + + void help_topic_valid_triplet(const VcpkgPaths& paths) + { + System::println("Available architecture triplets:"); + for (auto&& path : paths.get_filesystem().get_files_non_recursive(paths.triplets)) + { + System::println(" %s", path.stem().filename().string()); + } + } + + void help_topic_export() + { + System::println("Summary:\n" + " vcpkg export [options] ...\n" + "\n" + "Options:\n" + " --7zip Export to a 7zip (.7z) file\n" + " --dry-run Do not actually export\n" + " --nuget Export a NuGet package\n" + " --nuget-id= Specify the id for the exported NuGet package\n" + " --nuget-version= Specify the version for the exported NuGet package\n" + " --raw Export to an uncompressed directory\n" + " --zip Export to a zip file"); + } + + void print_usage() + { + System::println( + "Commands:\n" + " vcpkg search [pat] Search for packages available to be built\n" + " vcpkg install ... Install a package\n" + " vcpkg remove ... Uninstall a package\n" + " vcpkg remove --outdated Uninstall all out-of-date packages\n" + " vcpkg list List installed packages\n" + " vcpkg update Display list of packages for updating\n" + " vcpkg hash [alg] Hash a file by specific algorithm, default SHA512\n" + " vcpkg help topics Display the list of help topics\n" + " vcpkg help Display help for a specific topic\n" + "\n" + "%s" // Integration help + "\n" + " vcpkg export ... [opt]... Exports a package\n" + " vcpkg edit Open up a port for editing (uses %%EDITOR%%, default 'code')\n" + " vcpkg import Import a pre-built library\n" + " vcpkg create \n" + " [archivename] Create a new package\n" + " vcpkg owns Search for files in installed packages\n" + " vcpkg cache List cached compiled packages\n" + " vcpkg version Display version information\n" + " vcpkg contact Display contact information to send feedback\n" + "\n" + //"internal commands:\n" + //" --check-build-deps \n" + //" --create-binary-control \n" + //"\n" + "Options:\n" + " --triplet Specify the target architecture triplet.\n" + " (default: %%VCPKG_DEFAULT_TRIPLET%%, see 'vcpkg help triplet')\n" + "\n" + " --vcpkg-root Specify the vcpkg root directory\n" + " (default: %%VCPKG_ROOT%%)\n" + "\n" + "For more help (including examples) see the accompanying README.md.", + Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING); + } + + std::string create_example_string(const std::string& command_and_arguments) + { + std::string cs = Strings::format("Example:\n" + " vcpkg %s\n", + command_and_arguments); + return cs; + } + + void print_example(const std::string& command_and_arguments) + { + System::println(create_example_string(command_and_arguments)); + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + args.check_max_arg_count(1); + args.check_and_get_optional_command_arguments({}); + + if (args.command_arguments.empty()) + { + print_usage(); + Checks::exit_success(VCPKG_LINE_INFO); + } + const auto& topic = args.command_arguments[0]; + if (topic == "triplet" || topic == "triplets" || topic == "triple") + { + help_topic_valid_triplet(paths); + } + else if (topic == "export") + { + help_topic_export(); + } + else if (topic == "integrate") + { + System::print("Commands:\n" + "%s", + Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING); + } + else if (topic == "topics") + { + help_topics(); + } + else + { + System::println(System::Color::error, "Error: unknown topic %s", topic); + help_topics(); + Checks::exit_fail(VCPKG_LINE_INFO); + } + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/input.cpp b/toolsrc/src/vcpkg/input.cpp new file mode 100644 index 000000000..aee0fac7f --- /dev/null +++ b/toolsrc/src/vcpkg/input.cpp @@ -0,0 +1,55 @@ +#include "pch.h" + +#include +#include +#include +#include +#include + +namespace vcpkg::Input +{ + PackageSpec check_and_get_package_spec(const std::string& package_spec_as_string, + const Triplet& default_triplet, + CStringView example_text) + { + const std::string as_lowercase = Strings::ascii_to_lowercase(package_spec_as_string); + auto expected_spec = FullPackageSpec::from_string(as_lowercase, default_triplet); + if (const auto spec = expected_spec.get()) + { + return PackageSpec{spec->package_spec}; + } + + // Intentionally show the lowercased string + System::println(System::Color::error, "Error: %s: %s", vcpkg::to_string(expected_spec.error()), as_lowercase); + System::print(example_text); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + void check_triplet(const Triplet& t, const VcpkgPaths& paths) + { + if (!paths.is_valid_triplet(t)) + { + System::println(System::Color::error, "Error: invalid triplet: %s", t); + Metrics::g_metrics.lock()->track_property("error", "invalid triplet: " + t.to_string()); + Help::help_topic_valid_triplet(paths); + Checks::exit_fail(VCPKG_LINE_INFO); + } + } + + FullPackageSpec check_and_get_full_package_spec(const std::string& full_package_spec_as_string, + const Triplet& default_triplet, + CStringView example_text) + { + const std::string as_lowercase = Strings::ascii_to_lowercase(full_package_spec_as_string); + auto expected_spec = FullPackageSpec::from_string(as_lowercase, default_triplet); + if (const auto spec = expected_spec.get()) + { + return *spec; + } + + // Intentionally show the lowercased string + System::println(System::Color::error, "Error: %s: %s", vcpkg::to_string(expected_spec.error()), as_lowercase); + System::print(example_text); + Checks::exit_fail(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp new file mode 100644 index 000000000..74bea0d5f --- /dev/null +++ b/toolsrc/src/vcpkg/install.cpp @@ -0,0 +1,615 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Install +{ + using namespace Dependencies; + + InstallDir InstallDir::from_destination_root(const fs::path& destination_root, + const std::string& destination_subdirectory, + const fs::path& listfile) + { + InstallDir dirs; + dirs.m_destination = destination_root / destination_subdirectory; + dirs.m_destination_subdirectory = destination_subdirectory; + dirs.m_listfile = listfile; + return dirs; + } + + const fs::path& InstallDir::destination() const { return this->m_destination; } + + const std::string& InstallDir::destination_subdirectory() const { return this->m_destination_subdirectory; } + + const fs::path& InstallDir::listfile() const { return this->m_listfile; } + + void install_files_and_write_listfile(Files::Filesystem& fs, + const fs::path& source_dir, + const InstallDir& destination_dir) + { + std::vector output; + std::error_code ec; + + const size_t prefix_length = source_dir.native().size(); + const fs::path& destination = destination_dir.destination(); + const std::string& destination_subdirectory = destination_dir.destination_subdirectory(); + const fs::path& listfile = destination_dir.listfile(); + + Checks::check_exit( + VCPKG_LINE_INFO, fs.exists(source_dir), "Source directory %s does not exist", source_dir.generic_string()); + fs.create_directories(destination, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not create destination directory %s", destination.generic_string()); + const fs::path listfile_parent = listfile.parent_path(); + fs.create_directories(listfile_parent, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !ec, "Could not create directory for listfile %s", listfile.generic_string()); + + output.push_back(Strings::format(R"(%s/)", destination_subdirectory)); + auto files = fs.get_files_recursive(source_dir); + for (auto&& file : files) + { + const auto status = fs.status(file, ec); + if (ec) + { + System::println(System::Color::error, "failed: %s: %s", file.u8string(), ec.message()); + continue; + } + + const std::string filename = file.filename().generic_string(); + if (fs::is_regular_file(status) && + (Strings::case_insensitive_ascii_compare(filename.c_str(), "CONTROL") || + Strings::case_insensitive_ascii_compare(filename.c_str(), "BUILD_INFO"))) + { + // Do not copy the control file + continue; + } + + const std::string suffix = file.generic_u8string().substr(prefix_length + 1); + const fs::path target = destination / suffix; + + if (fs::is_directory(status)) + { + fs.create_directory(target, ec); + if (ec) + { + System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); + } + + // Trailing backslash for directories + output.push_back(Strings::format(R"(%s/%s/)", destination_subdirectory, suffix)); + continue; + } + + if (fs::is_regular_file(status)) + { + if (fs.exists(target)) + { + System::println(System::Color::warning, + "File %s was already present and will be overwritten", + target.u8string(), + ec.message()); + } + fs.copy_file(file, target, fs::copy_options::overwrite_existing, ec); + if (ec) + { + System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); + } + output.push_back(Strings::format(R"(%s/%s)", destination_subdirectory, suffix)); + continue; + } + + if (!fs::status_known(status)) + { + System::println(System::Color::error, "failed: %s: unknown status", file.u8string()); + continue; + } + + System::println(System::Color::error, "failed: %s: cannot handle file type", file.u8string()); + } + + std::sort(output.begin(), output.end()); + + fs.write_lines(listfile, output); + } + + static void remove_first_n_chars(std::vector* strings, const size_t n) + { + for (std::string& s : *strings) + { + s.erase(0, n); + } + }; + + static std::vector extract_files_in_triplet( + const std::vector& pgh_and_files, const Triplet& triplet) + { + std::vector output; + for (const StatusParagraphAndAssociatedFiles& t : pgh_and_files) + { + if (t.pgh.package.spec.triplet() != triplet) + { + continue; + } + + output.insert(output.end(), t.files.begin(), t.files.end()); + } + + std::sort(output.begin(), output.end()); + return output; + } + + static SortedVector build_list_of_package_files(const Files::Filesystem& fs, + const fs::path& package_dir) + { + const std::vector package_file_paths = fs.get_files_recursive(package_dir); + const size_t package_remove_char_count = package_dir.generic_string().size() + 1; // +1 for the slash + auto package_files = Util::fmap(package_file_paths, [package_remove_char_count](const fs::path& path) { + std::string as_string = path.generic_string(); + as_string.erase(0, package_remove_char_count); + return std::move(as_string); + }); + + return SortedVector(std::move(package_files)); + } + + static SortedVector build_list_of_installed_files( + const std::vector& pgh_and_files, const Triplet& triplet) + { + std::vector installed_files = extract_files_in_triplet(pgh_and_files, triplet); + const size_t installed_remove_char_count = triplet.canonical_name().size() + 1; // +1 for the slash + remove_first_n_chars(&installed_files, installed_remove_char_count); + + return SortedVector(std::move(installed_files)); + } + + InstallResult install_package(const VcpkgPaths& paths, const BinaryControlFile& bcf, StatusParagraphs* status_db) + { + const fs::path package_dir = paths.package_dir(bcf.core_paragraph.spec); + const Triplet& triplet = bcf.core_paragraph.spec.triplet(); + const std::vector pgh_and_files = get_installed_files(paths, *status_db); + + const SortedVector package_files = + build_list_of_package_files(paths.get_filesystem(), package_dir); + const SortedVector installed_files = build_list_of_installed_files(pgh_and_files, triplet); + + std::vector intersection; + std::set_intersection(package_files.begin(), + package_files.end(), + installed_files.begin(), + installed_files.end(), + std::back_inserter(intersection)); + + if (!intersection.empty()) + { + const fs::path triplet_install_path = paths.installed / triplet.canonical_name(); + System::println(System::Color::error, + "The following files are already installed in %s and are in conflict with %s", + triplet_install_path.generic_string(), + bcf.core_paragraph.spec); + System::print("\n "); + System::println(Strings::join("\n ", intersection)); + System::println(); + return InstallResult::FILE_CONFLICTS; + } + + StatusParagraph source_paragraph; + source_paragraph.package = bcf.core_paragraph; + source_paragraph.want = Want::INSTALL; + source_paragraph.state = InstallState::HALF_INSTALLED; + + write_update(paths, source_paragraph); + status_db->insert(std::make_unique(source_paragraph)); + + std::vector features_spghs; + for (auto&& feature : bcf.features) + { + features_spghs.emplace_back(); + + StatusParagraph& feature_paragraph = features_spghs.back(); + feature_paragraph.package = feature; + feature_paragraph.want = Want::INSTALL; + feature_paragraph.state = InstallState::HALF_INSTALLED; + + write_update(paths, feature_paragraph); + status_db->insert(std::make_unique(feature_paragraph)); + } + + const InstallDir install_dir = InstallDir::from_destination_root( + paths.installed, triplet.to_string(), paths.listfile_path(bcf.core_paragraph)); + + install_files_and_write_listfile(paths.get_filesystem(), package_dir, install_dir); + + source_paragraph.state = InstallState::INSTALLED; + write_update(paths, source_paragraph); + status_db->insert(std::make_unique(source_paragraph)); + + for (auto&& feature_paragraph : features_spghs) + { + feature_paragraph.state = InstallState::INSTALLED; + write_update(paths, feature_paragraph); + status_db->insert(std::make_unique(feature_paragraph)); + } + + return InstallResult::SUCCESS; + } + + using Build::BuildResult; + + BuildResult perform_install_plan_action(const VcpkgPaths& paths, + const InstallPlanAction& action, + const Build::BuildPackageOptions& build_package_options, + StatusParagraphs& status_db) + { + const InstallPlanType& plan_type = action.plan_type; + const std::string display_name = action.spec.to_string(); + const std::string display_name_with_features = + GlobalState::feature_packages ? action.displayname() : display_name; + + const bool is_user_requested = action.request_type == RequestType::USER_REQUESTED; + const bool use_head_version = to_bool(build_package_options.use_head_version); + + if (plan_type == InstallPlanType::ALREADY_INSTALLED) + { + if (use_head_version && is_user_requested) + System::println( + System::Color::warning, "Package %s is already installed -- not building from HEAD", display_name); + else + System::println(System::Color::success, "Package %s is already installed", display_name); + return BuildResult::SUCCEEDED; + } + + if (plan_type == InstallPlanType::BUILD_AND_INSTALL) + { + if (use_head_version) + System::println("Building package %s from HEAD... ", display_name_with_features); + else + System::println("Building package %s... ", display_name_with_features); + + const auto result = [&]() -> Build::ExtendedBuildResult { + if (GlobalState::feature_packages) + { + const Build::BuildPackageConfig build_config{ + *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), + action.spec.triplet(), + paths.port_dir(action.spec), + build_package_options, + action.feature_list}; + return Build::build_package(paths, build_config, status_db); + } + else + { + const Build::BuildPackageConfig build_config{ + action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO), + action.spec.triplet(), + paths.port_dir(action.spec), + build_package_options}; + return Build::build_package(paths, build_config, status_db); + } + }(); + + if (result.code != Build::BuildResult::SUCCEEDED) + { + System::println(System::Color::error, Build::create_error_message(result.code, action.spec)); + return result.code; + } + + System::println("Building package %s... done", display_name_with_features); + + const BinaryControlFile bcf = + Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); + System::println("Installing package %s... ", display_name_with_features); + const auto install_result = install_package(paths, bcf, &status_db); + switch (install_result) + { + case InstallResult::SUCCESS: + System::println(System::Color::success, "Installing package %s... done", display_name); + return BuildResult::SUCCEEDED; + case InstallResult::FILE_CONFLICTS: return BuildResult::FILE_CONFLICTS; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + + if (plan_type == InstallPlanType::INSTALL) + { + if (use_head_version && is_user_requested) + { + System::println( + System::Color::warning, "Package %s is already built -- not building from HEAD", display_name); + } + System::println("Installing package %s... ", display_name); + const auto install_result = install_package( + paths, action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO), &status_db); + switch (install_result) + { + case InstallResult::SUCCESS: + System::println(System::Color::success, "Installing package %s... done", display_name); + return BuildResult::SUCCEEDED; + case InstallResult::FILE_CONFLICTS: return BuildResult::FILE_CONFLICTS; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + + Checks::unreachable(VCPKG_LINE_INFO); + } + + static void print_plan(const std::vector& action_plan, bool is_recursive) + { + std::vector remove_plans; + std::vector rebuilt_plans; + std::vector only_install_plans; + std::vector new_plans; + std::vector already_installed_plans; + + const bool has_non_user_requested_packages = Util::find_if(action_plan, [](const AnyAction& package) -> bool { + if (auto iplan = package.install_plan.get()) + return iplan->request_type != RequestType::USER_REQUESTED; + else + return false; + }) != action_plan.cend(); + + for (auto&& action : action_plan) + { + if (auto install_action = action.install_plan.get()) + { + // remove plans are guaranteed to come before install plans, so we know the plan will be contained if at + // all. + auto it = Util::find_if( + remove_plans, [&](const RemovePlanAction* plan) { return plan->spec == install_action->spec; }); + if (it != remove_plans.end()) + { + rebuilt_plans.emplace_back(install_action); + } + else + { + switch (install_action->plan_type) + { + case InstallPlanType::INSTALL: only_install_plans.emplace_back(install_action); break; + case InstallPlanType::ALREADY_INSTALLED: + if (install_action->request_type == RequestType::USER_REQUESTED) + already_installed_plans.emplace_back(install_action); + break; + case InstallPlanType::BUILD_AND_INSTALL: new_plans.emplace_back(install_action); break; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + } + else if (auto remove_action = action.remove_plan.get()) + { + remove_plans.emplace_back(remove_action); + } + } + + std::sort(remove_plans.begin(), remove_plans.end(), &RemovePlanAction::compare_by_name); + std::sort(rebuilt_plans.begin(), rebuilt_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(only_install_plans.begin(), only_install_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(new_plans.begin(), new_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(already_installed_plans.begin(), already_installed_plans.end(), &InstallPlanAction::compare_by_name); + + if (already_installed_plans.size() > 0) + { + const std::string already_string = + Strings::join("\n", already_installed_plans, [](const InstallPlanAction* p) { + return to_output_string(p->request_type, p->displayname()); + }); + System::println("The following packages are already installed:\n%s", already_string); + } + + if (rebuilt_plans.size() > 0) + { + const std::string rebuilt_string = Strings::join("\n", rebuilt_plans, [](const InstallPlanAction* p) { + return to_output_string(p->request_type, p->displayname()); + }); + System::println("The following packages will be rebuilt:\n%s", rebuilt_string); + } + + if (new_plans.size() > 0) + { + const std::string new_string = Strings::join("\n", new_plans, [](const InstallPlanAction* p) { + return to_output_string(p->request_type, p->displayname()); + }); + System::println("The following packages will be built and installed:\n%s", new_string); + } + + if (only_install_plans.size() > 0) + { + const std::string only_install_string = + Strings::join("\n", only_install_plans, [](const InstallPlanAction* p) { + return to_output_string(p->request_type, p->displayname()); + }); + System::println("The following packages will be directly installed:\n%s", only_install_string); + } + + if (has_non_user_requested_packages) + System::println("Additional packages (*) will be installed to complete this operation."); + + if (remove_plans.size() > 0 && !is_recursive) + { + System::println(System::Color::warning, + "If you are sure you want to rebuild the above packages, run the command with the " + "--recurse option"); + Checks::exit_fail(VCPKG_LINE_INFO); + } + } + + void perform_and_exit_ex(const std::vector& action_plan, + const Build::BuildPackageOptions& install_plan_options, + const KeepGoing keep_going, + const PrintSummary print_summary, + const VcpkgPaths& paths, + StatusParagraphs& status_db) + { + std::vector results; + std::vector timing; + const auto timer = Chrono::ElapsedTime::create_started(); + size_t counter = 0; + const size_t package_count = action_plan.size(); + + for (const auto& action : action_plan) + { + const auto build_timer = Chrono::ElapsedTime::create_started(); + counter++; + + const std::string display_name = action.spec().to_string(); + System::println("Starting package %d/%d: %s", counter, package_count, display_name); + + timing.push_back("0"); + results.push_back(BuildResult::NULLVALUE); + + if (const auto install_action = action.install_plan.get()) + { + const BuildResult result = + perform_install_plan_action(paths, *install_action, install_plan_options, status_db); + if (result != BuildResult::SUCCEEDED && keep_going == KeepGoing::NO) + { + System::println(Build::create_user_troubleshooting_message(install_action->spec)); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + results.back() = result; + } + else if (const auto remove_action = action.remove_plan.get()) + { + Checks::check_exit(VCPKG_LINE_INFO, GlobalState::feature_packages); + Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, status_db); + } + else + { + Checks::unreachable(VCPKG_LINE_INFO); + } + + timing.back() = build_timer.to_string(); + System::println("Elapsed time for package %s: %s", display_name, build_timer.to_string()); + } + + System::println("Total time taken: %s", timer.to_string()); + + if (print_summary == PrintSummary::YES) + { + for (size_t i = 0; i < results.size(); i++) + { + System::println("%s: %s: %s", action_plan[i].spec(), Build::to_string(results[i]), timing[i]); + } + + std::map summary; + for (const BuildResult& v : Build::BUILD_RESULT_VALUES) + { + summary[v] = 0; + } + + for (const BuildResult& r : results) + { + summary[r]++; + } + + System::println("\n\nSUMMARY"); + for (const std::pair& entry : summary) + { + System::println(" %s: %d", Build::to_string(entry.first), entry.second); + } + } + + Checks::exit_success(VCPKG_LINE_INFO); + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + { + static const std::string OPTION_DRY_RUN = "--dry-run"; + static const std::string OPTION_USE_HEAD_VERSION = "--head"; + static const std::string OPTION_NO_DOWNLOADS = "--no-downloads"; + static const std::string OPTION_RECURSE = "--recurse"; + static const std::string OPTION_KEEP_GOING = "--keep-going"; + + // input sanitization + static const std::string EXAMPLE = Help::create_example_string("install zlib zlib:x64-windows curl boost"); + args.check_min_arg_count(1, EXAMPLE); + + const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { + return Input::check_and_get_full_package_spec(arg, default_triplet, EXAMPLE); + }); + + for (auto&& spec : specs) + { + Input::check_triplet(spec.package_spec.triplet(), paths); + if (!spec.features.empty() && !GlobalState::feature_packages) + { + Checks::exit_with_message( + VCPKG_LINE_INFO, "Feature packages are experimentally available under the --featurepackages flag."); + } + } + + const std::unordered_set options = args.check_and_get_optional_command_arguments( + {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE, OPTION_KEEP_GOING}); + const bool dry_run = options.find(OPTION_DRY_RUN) != options.cend(); + const bool use_head_version = options.find(OPTION_USE_HEAD_VERSION) != options.cend(); + const bool no_downloads = options.find(OPTION_NO_DOWNLOADS) != options.cend(); + const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); + const KeepGoing keep_going = to_keep_going(options.find(OPTION_KEEP_GOING) != options.cend()); + + // create the plan + StatusParagraphs status_db = database_load_check(paths); + + const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version), + Build::to_allow_downloads(!no_downloads)}; + + std::vector action_plan; + + if (GlobalState::feature_packages) + { + std::unordered_map scf_map; + auto all_ports = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); + for (auto&& port : all_ports) + { + scf_map[port->core_paragraph->name] = std::move(*port); + } + action_plan = create_feature_install_plan(scf_map, FullPackageSpec::to_feature_specs(specs), status_db); + } + else + { + Dependencies::PathsPortFile paths_port_file(paths); + auto install_plan = Dependencies::create_install_plan( + paths_port_file, Util::fmap(specs, [](auto&& spec) { return spec.package_spec; }), status_db); + + action_plan = Util::fmap( + install_plan, [](InstallPlanAction& install_action) { return AnyAction(std::move(install_action)); }); + } + + // install plan will be empty if it is already installed - need to change this at status paragraph part + Checks::check_exit(VCPKG_LINE_INFO, !action_plan.empty(), "Install plan cannot be empty"); + + // log the plan + const std::string specs_string = Strings::join(",", action_plan, [](const AnyAction& action) { + if (auto iaction = action.install_plan.get()) + return iaction->spec.to_string(); + else if (auto raction = action.remove_plan.get()) + return "R$" + raction->spec.to_string(); + Checks::unreachable(VCPKG_LINE_INFO); + }); + + Metrics::g_metrics.lock()->track_property("installplan", specs_string); + + print_plan(action_plan, is_recursive); + + if (dry_run) + { + Checks::exit_success(VCPKG_LINE_INFO); + } + + perform_and_exit_ex(action_plan, install_plan_options, keep_going, PrintSummary::NO, paths, status_db); + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp new file mode 100644 index 000000000..84c1ee208 --- /dev/null +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -0,0 +1,398 @@ +#include "pch.h" + +#include + +#include +#include +#include + +#pragma comment(lib, "version") +#pragma comment(lib, "winhttp") + +namespace vcpkg::Metrics +{ + Util::LockGuarded g_metrics; + + static std::string get_current_date_time() + { + struct tm newtime; + std::array date; + date.fill(0); + + struct _timeb timebuffer; + + _ftime_s(&timebuffer); + time_t now = timebuffer.time; + const int milli = timebuffer.millitm; + + const errno_t err = gmtime_s(&newtime, &now); + if (err) + { + return Strings::EMPTY; + } + + strftime(&date[0], date.size(), "%Y-%m-%dT%H:%M:%S", &newtime); + return std::string(&date[0]) + "." + std::to_string(milli) + "Z"; + } + + static std::string generate_random_UUID() + { + int part_sizes[] = {8, 4, 4, 4, 12}; + char uuid[37]; + memset(uuid, 0, sizeof(uuid)); + int num; + srand(static_cast(time(nullptr))); + int index = 0; + for (int part = 0; part < 5; part++) + { + if (part > 0) + { + uuid[index] = '-'; + index++; + } + + // Generating UUID format version 4 + // http://en.wikipedia.org/wiki/Universally_unique_identifier + for (int i = 0; i < part_sizes[part]; i++, index++) + { + if (part == 2 && i == 0) + { + num = 4; + } + else if (part == 4 && i == 0) + { + num = (rand() % 4) + 8; + } + else + { + num = rand() % 16; + } + + if (num < 10) + { + uuid[index] = static_cast('0' + num); + } + else + { + uuid[index] = static_cast('a' + (num - 10)); + } + } + } + + return uuid; + } + + static const std::string& get_session_id() + { + static const std::string ID = generate_random_UUID(); + return ID; + } + + static std::string to_json_string(const std::string& str) + { + std::string encoded = "\""; + for (auto&& ch : str) + { + if (ch == '\\') + { + encoded.append("\\\\"); + } + else if (ch == '"') + { + encoded.append("\\\""); + } + else if (ch < 0x20 || ch >= 0x80) + { + // Note: this treats incoming Strings as Latin-1 + static constexpr const char HEX[16] = { + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; + encoded.append("\\u00"); + encoded.push_back(HEX[ch / 16]); + encoded.push_back(HEX[ch % 16]); + } + else + { + encoded.push_back(ch); + } + } + encoded.push_back('"'); + return encoded; + } + + static std::string get_os_version_string() + { + std::wstring path; + path.resize(MAX_PATH); + const auto n = GetSystemDirectoryW(&path[0], static_cast(path.size())); + path.resize(n); + path += L"\\kernel32.dll"; + + const auto versz = GetFileVersionInfoSizeW(path.c_str(), nullptr); + if (versz == 0) return Strings::EMPTY; + + std::vector verbuf; + verbuf.resize(versz); + + if (!GetFileVersionInfoW(path.c_str(), 0, static_cast(verbuf.size()), &verbuf[0])) return Strings::EMPTY; + + void* rootblock; + UINT rootblocksize; + if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return Strings::EMPTY; + + auto rootblock_ffi = static_cast(rootblock); + + return Strings::format("%d.%d.%d", + static_cast(HIWORD(rootblock_ffi->dwProductVersionMS)), + static_cast(LOWORD(rootblock_ffi->dwProductVersionMS)), + static_cast(HIWORD(rootblock_ffi->dwProductVersionLS))); + } + + struct MetricMessage + { + std::string user_id = generate_random_UUID(); + std::string user_timestamp; + std::string timestamp = get_current_date_time(); + std::string properties; + std::string measurements; + + void track_property(const std::string& name, const std::string& value) + { + if (properties.size() != 0) properties.push_back(','); + properties.append(to_json_string(name)); + properties.push_back(':'); + properties.append(to_json_string(value)); + } + + void track_metric(const std::string& name, double value) + { + if (measurements.size() != 0) measurements.push_back(','); + measurements.append(to_json_string(name)); + measurements.push_back(':'); + measurements.append(std::to_string(value)); + } + + std::string format_event_data_template() const + { + const std::string& session_id = get_session_id(); + return Strings::format(R"([{ + "ver": 1, + "name": "Microsoft.ApplicationInsights.Event", + "time": "%s", + "sampleRate": 100.000000, + "seq": "0:0", + "iKey": "b4e88960-4393-4dd9-ab8e-97e8fe6d7603", + "flags": 0.000000, + "tags": { + "ai.device.os": "Windows", + "ai.device.osVersion": "%s", + "ai.session.id": "%s", + "ai.user.id": "%s", + "ai.user.accountAcquisitionDate": "%s" + }, + "data": { + "baseType": "EventData", + "baseData": { + "ver": 2, + "name": "commandline_test7", + "properties": { %s }, + "measurements": { %s } + } + } +}])", + timestamp, + get_os_version_string(), + session_id, + user_id, + user_timestamp, + properties, + measurements); + } + }; + + static MetricMessage g_metricmessage; + static bool g_should_send_metrics = +#if defined(NDEBUG) && (DISABLE_METRICS == 0) + true +#else + false +#endif + ; + static bool g_should_print_metrics = false; + + bool get_compiled_metrics_enabled() { return DISABLE_METRICS == 0; } + + std::wstring get_SQM_user() + { + auto hkcu_sqmclient = + System::get_registry_string(HKEY_CURRENT_USER, LR"(Software\Microsoft\SQMClient)", L"UserId"); + return hkcu_sqmclient.value_or(L"{}"); + } + + void Metrics::set_user_information(const std::string& user_id, const std::string& first_use_time) + { + g_metricmessage.user_id = user_id; + g_metricmessage.user_timestamp = first_use_time; + } + + void Metrics::init_user_information(std::string& user_id, std::string& first_use_time) + { + user_id = generate_random_UUID(); + first_use_time = get_current_date_time(); + } + + void Metrics::set_send_metrics(bool should_send_metrics) { g_should_send_metrics = should_send_metrics; } + + void Metrics::set_print_metrics(bool should_print_metrics) { g_should_print_metrics = should_print_metrics; } + + void Metrics::track_metric(const std::string& name, double value) { g_metricmessage.track_metric(name, value); } + + void Metrics::track_property(const std::string& name, const std::wstring& value) + { + // Note: this is not valid UTF-16 -> UTF-8, it just yields a close enough approximation for our purposes. + std::string converted_value; + converted_value.resize(value.size()); + std::transform( + value.begin(), value.end(), converted_value.begin(), [](wchar_t ch) { return static_cast(ch); }); + + g_metricmessage.track_property(name, converted_value); + } + + void Metrics::track_property(const std::string& name, const std::string& value) + { + g_metricmessage.track_property(name, value); + } + + void Metrics::upload(const std::string& payload) + { + HINTERNET connect = nullptr, request = nullptr; + BOOL results = FALSE; + + const HINTERNET session = WinHttpOpen( + L"vcpkg/1.0", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); + if (session) connect = WinHttpConnect(session, L"dc.services.visualstudio.com", INTERNET_DEFAULT_HTTPS_PORT, 0); + + if (connect) + request = WinHttpOpenRequest(connect, + L"POST", + L"/v2/track", + nullptr, + WINHTTP_NO_REFERER, + WINHTTP_DEFAULT_ACCEPT_TYPES, + WINHTTP_FLAG_SECURE); + + if (request) + { + if (MAXDWORD <= payload.size()) abort(); + std::wstring hdrs = L"Content-Type: application/json\r\n"; + std::string& p = const_cast(payload); + results = WinHttpSendRequest(request, + hdrs.c_str(), + static_cast(hdrs.size()), + static_cast(&p[0]), + static_cast(payload.size()), + static_cast(payload.size()), + 0); + } + + if (results) + { + results = WinHttpReceiveResponse(request, nullptr); + } + + DWORD http_code = 0, junk = sizeof(DWORD); + + if (results) + { + results = WinHttpQueryHeaders(request, + WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, + nullptr, + &http_code, + &junk, + WINHTTP_NO_HEADER_INDEX); + } + + std::vector response_buffer; + if (results) + { + DWORD available_data = 0, read_data = 0, total_data = 0; + while ((results = WinHttpQueryDataAvailable(request, &available_data)) == TRUE && available_data > 0) + { + response_buffer.resize(response_buffer.size() + available_data); + + results = WinHttpReadData(request, &response_buffer.data()[total_data], available_data, &read_data); + + if (!results) + { + break; + } + + total_data += read_data; + + response_buffer.resize(total_data); + } + } + + if (!results) + { +#ifndef NDEBUG + __debugbreak(); + auto err = GetLastError(); + std::cerr << "[DEBUG] failed to connect to server: " << err << "\n"; +#endif + } + + if (request) WinHttpCloseHandle(request); + if (connect) WinHttpCloseHandle(connect); + if (session) WinHttpCloseHandle(session); + } + + static fs::path get_bindir() + { + wchar_t buf[_MAX_PATH]; + const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); + if (bytes == 0) std::abort(); + return fs::path(buf, buf + bytes); + } + + void Metrics::flush() + { + const std::string payload = g_metricmessage.format_event_data_template(); + if (g_should_print_metrics) std::cerr << payload << "\n"; + if (!g_should_send_metrics) return; + + // upload(payload); + + wchar_t temp_folder[MAX_PATH]; + GetTempPathW(MAX_PATH, temp_folder); + + const fs::path temp_folder_path = temp_folder; + const fs::path temp_folder_path_exe = temp_folder_path / "vcpkgmetricsuploader.exe"; + + auto& fs = Files::get_real_filesystem(); + + if (true) + { + const fs::path exe_path = [&fs]() -> fs::path { + auto vcpkgdir = get_bindir().parent_path(); + auto path = vcpkgdir / "vcpkgmetricsuploader.exe"; + if (fs.exists(path)) return path; + + path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe"; + if (fs.exists(path)) return path; + + return Strings::WEMPTY; + }(); + + std::error_code ec; + fs.copy_file(exe_path, temp_folder_path_exe, fs::copy_options::skip_existing, ec); + if (ec) return; + } + + const fs::path vcpkg_metrics_txt_path = temp_folder_path / ("vcpkg" + generate_random_UUID() + ".txt"); + fs.write_contents(vcpkg_metrics_txt_path, payload); + + const std::wstring cmd_line = + Strings::wformat(L"start %s %s", temp_folder_path_exe.native(), vcpkg_metrics_txt_path.native()); + System::cmd_execute_clean(cmd_line); + } +} diff --git a/toolsrc/src/vcpkg/packagespec.cpp b/toolsrc/src/vcpkg/packagespec.cpp new file mode 100644 index 000000000..01a09618d --- /dev/null +++ b/toolsrc/src/vcpkg/packagespec.cpp @@ -0,0 +1,175 @@ +#include "pch.h" + +#include +#include +#include + +using vcpkg::Parse::parse_comma_list; + +namespace vcpkg +{ + static bool is_valid_package_spec_char(char c) + { + return (c == '-') || isdigit(c) || (isalpha(c) && islower(c)) || (c == '[') || (c == ']'); + } + + std::string FeatureSpec::to_string() const + { + if (feature().empty()) return spec().to_string(); + return Strings::format("%s[%s]:%s", name(), feature(), triplet()); + } + + std::vector FeatureSpec::from_strings_and_triplet(const std::vector& depends, + const Triplet& triplet) + { + std::vector f_specs; + for (auto&& depend : depends) + { + auto maybe_spec = ParsedSpecifier::from_string(depend); + if (auto spec = maybe_spec.get()) + { + Checks::check_exit(VCPKG_LINE_INFO, + spec->triplet.empty(), + "error: triplets cannot currently be specified in this context: %s", + depend); + PackageSpec pspec = + PackageSpec::from_name_and_triplet(spec->name, triplet).value_or_exit(VCPKG_LINE_INFO); + + for (auto&& feature : spec->features) + f_specs.push_back(FeatureSpec{pspec, feature}); + + if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, Strings::EMPTY}); + } + else + { + Checks::exit_with_message(VCPKG_LINE_INFO, + "error while parsing feature list: %s: %s", + vcpkg::to_string(maybe_spec.error()), + depend); + } + } + return f_specs; + } + + std::vector FullPackageSpec::to_feature_specs(const std::vector& specs) + { + std::vector ret; + for (auto&& spec : specs) + { + ret.emplace_back(spec.package_spec, Strings::EMPTY); + for (auto&& feature : spec.features) + ret.emplace_back(spec.package_spec, feature); + } + return ret; + } + + ExpectedT FullPackageSpec::from_string(const std::string& spec_as_string, + const Triplet& default_triplet) + { + auto res = ParsedSpecifier::from_string(spec_as_string); + if (auto p = res.get()) + { + FullPackageSpec fspec; + Triplet t = p->triplet.empty() ? default_triplet : Triplet::from_canonical_name(p->triplet); + fspec.package_spec = PackageSpec::from_name_and_triplet(p->name, t).value_or_exit(VCPKG_LINE_INFO); + fspec.features = std::move(p->features); + return fspec; + } + return res.error(); + } + + ExpectedT PackageSpec::from_name_and_triplet(const std::string& name, + const Triplet& triplet) + { + if (Util::find_if_not(name, is_valid_package_spec_char) != name.end()) + { + return PackageSpecParseResult::INVALID_CHARACTERS; + } + + PackageSpec p; + p.m_name = name; + p.m_triplet = triplet; + return p; + } + + const std::string& PackageSpec::name() const { return this->m_name; } + + const Triplet& PackageSpec::triplet() const { return this->m_triplet; } + + std::string PackageSpec::dir() const { return Strings::format("%s_%s", this->m_name, this->m_triplet); } + + std::string PackageSpec::to_string() const { return Strings::format("%s:%s", this->name(), this->triplet()); } + + bool operator==(const PackageSpec& left, const PackageSpec& right) + { + return left.name() == right.name() && left.triplet() == right.triplet(); + } + + bool operator!=(const PackageSpec& left, const PackageSpec& right) { return !(left == right); } + + ExpectedT ParsedSpecifier::from_string(const std::string& input) + { + auto pos = input.find(':'); + auto pos_l_bracket = input.find('['); + auto pos_r_bracket = input.find(']'); + + ParsedSpecifier f; + if (pos == std::string::npos && pos_l_bracket == std::string::npos) + { + f.name = input; + return f; + } + else if (pos == std::string::npos) + { + if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket) + { + return PackageSpecParseResult::INVALID_CHARACTERS; + } + const std::string name = input.substr(0, pos_l_bracket); + f.name = name; + f.features = parse_comma_list(input.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1)); + return f; + } + else if (pos_l_bracket == std::string::npos && pos_r_bracket == std::string::npos) + { + const std::string name = input.substr(0, pos); + f.triplet = input.substr(pos + 1); + f.name = name; + } + else + { + if (pos_r_bracket == std::string::npos || pos_l_bracket >= pos_r_bracket) + { + return PackageSpecParseResult::INVALID_CHARACTERS; + } + const std::string name = input.substr(0, pos_l_bracket); + f.features = parse_comma_list(input.substr(pos_l_bracket + 1, pos_r_bracket - pos_l_bracket - 1)); + f.triplet = input.substr(pos + 1); + f.name = name; + } + + auto pos2 = input.find(':', pos + 1); + if (pos2 != std::string::npos) + { + return PackageSpecParseResult::TOO_MANY_COLONS; + } + return f; + } + + ExpectedT Features::from_string(const std::string& name) + { + auto maybe_spec = ParsedSpecifier::from_string(name); + if (auto spec = maybe_spec.get()) + { + Checks::check_exit( + VCPKG_LINE_INFO, spec->triplet.empty(), "error: triplet not allowed in specifier: %s", name); + + Features f; + f.name = spec->name; + f.features = spec->features; + return f; + } + + return maybe_spec.error(); + } +} diff --git a/toolsrc/src/vcpkg/packagespecparseresult.cpp b/toolsrc/src/vcpkg/packagespecparseresult.cpp new file mode 100644 index 000000000..b12bd12d0 --- /dev/null +++ b/toolsrc/src/vcpkg/packagespecparseresult.cpp @@ -0,0 +1,21 @@ +#include "pch.h" + +#include + +#include + +namespace vcpkg +{ + CStringView to_string(PackageSpecParseResult ev) noexcept + { + switch (ev) + { + case PackageSpecParseResult::SUCCESS: return "OK"; + case PackageSpecParseResult::TOO_MANY_COLONS: return "Too many colons"; + case PackageSpecParseResult::INVALID_CHARACTERS: + return "Contains invalid characters. Only alphanumeric lowercase ASCII characters and dashes are " + "allowed"; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } +} diff --git a/toolsrc/src/vcpkg/paragraphparseresult.cpp b/toolsrc/src/vcpkg/paragraphparseresult.cpp new file mode 100644 index 000000000..920a4b16b --- /dev/null +++ b/toolsrc/src/vcpkg/paragraphparseresult.cpp @@ -0,0 +1,34 @@ +#include "pch.h" + +#include +#include + +namespace vcpkg +{ + const char* ParagraphParseResultCategoryImpl::name() const noexcept { return "ParagraphParseResult"; } + + std::string ParagraphParseResultCategoryImpl::message(int ev) const noexcept + { + switch (static_cast(ev)) + { + case ParagraphParseResult::SUCCESS: return "OK"; + case ParagraphParseResult::EXPECTED_ONE_PARAGRAPH: return "There should be exactly one paragraph"; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + + const std::error_category& paragraph_parse_result_category() + { + static ParagraphParseResultCategoryImpl instance; + return instance; + } + + std::error_code make_error_code(ParagraphParseResult e) + { + return std::error_code(static_cast(e), paragraph_parse_result_category()); + } + + ParagraphParseResult to_paragraph_parse_result(int i) { return static_cast(i); } + + ParagraphParseResult to_paragraph_parse_result(std::error_code ec) { return to_paragraph_parse_result(ec.value()); } +} diff --git a/toolsrc/src/vcpkg/paragraphs.cpp b/toolsrc/src/vcpkg/paragraphs.cpp new file mode 100644 index 000000000..b93de190c --- /dev/null +++ b/toolsrc/src/vcpkg/paragraphs.cpp @@ -0,0 +1,304 @@ +#include "pch.h" + +#include +#include +#include +#include +#include + +using namespace vcpkg::Parse; + +namespace vcpkg::Paragraphs +{ + struct Parser + { + Parser(const char* c, const char* e) : cur(c), end(e) {} + + private: + const char* cur; + const char* const end; + + void peek(char& ch) const + { + if (cur == end) + ch = 0; + else + ch = *cur; + } + + void next(char& ch) + { + if (cur == end) + ch = 0; + else + { + ++cur; + peek(ch); + } + } + + void skip_comment(char& ch) + { + while (ch != '\r' && ch != '\n' && ch != '\0') + next(ch); + if (ch == '\r') next(ch); + if (ch == '\n') next(ch); + } + + void skip_spaces(char& ch) + { + while (ch == ' ' || ch == '\t') + next(ch); + } + + static bool is_alphanum(char ch) + { + return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9'); + } + + static bool is_comment(char ch) { return (ch == '#'); } + + static bool is_lineend(char ch) { return ch == '\r' || ch == '\n' || ch == 0; } + + void get_fieldvalue(char& ch, std::string& fieldvalue) + { + fieldvalue.clear(); + + auto beginning_of_line = cur; + do + { + // scan to end of current line (it is part of the field value) + while (!is_lineend(ch)) + next(ch); + + fieldvalue.append(beginning_of_line, cur); + + if (ch == '\r') next(ch); + if (ch == '\n') next(ch); + + if (is_alphanum(ch) || is_comment(ch)) + { + // Line begins a new field. + return; + } + + beginning_of_line = cur; + + // Line may continue the current field with data or terminate the paragraph, + // depending on first nonspace character. + skip_spaces(ch); + + if (is_lineend(ch)) + { + // Line was whitespace or empty. + // This terminates the field and the paragraph. + // We leave the blank line's whitespace consumed, because it doesn't matter. + return; + } + + // First nonspace is not a newline. This continues the current field value. + // We forcibly convert all newlines into single '\n' for ease of text handling later on. + fieldvalue.push_back('\n'); + } while (true); + } + + void get_fieldname(char& ch, std::string& fieldname) + { + auto begin_fieldname = cur; + while (is_alphanum(ch) || ch == '-') + next(ch); + Checks::check_exit(VCPKG_LINE_INFO, ch == ':', "Expected ':'"); + fieldname = std::string(begin_fieldname, cur); + + // skip ': ' + next(ch); + skip_spaces(ch); + } + + void get_paragraph(char& ch, std::unordered_map& fields) + { + fields.clear(); + std::string fieldname; + std::string fieldvalue; + do + { + if (is_comment(ch)) + { + skip_comment(ch); + continue; + } + + get_fieldname(ch, fieldname); + + auto it = fields.find(fieldname); + Checks::check_exit(VCPKG_LINE_INFO, it == fields.end(), "Duplicate field"); + + get_fieldvalue(ch, fieldvalue); + + fields.emplace(fieldname, fieldvalue); + } while (!is_lineend(ch)); + } + + public: + std::vector> get_paragraphs() + { + std::vector> paragraphs; + + char ch; + peek(ch); + + while (ch != 0) + { + if (ch == '\n' || ch == '\r' || ch == ' ' || ch == '\t') + { + next(ch); + continue; + } + + paragraphs.emplace_back(); + get_paragraph(ch, paragraphs.back()); + } + + return paragraphs; + } + }; + + Expected> get_single_paragraph(const Files::Filesystem& fs, + const fs::path& control_path) + { + const Expected contents = fs.read_contents(control_path); + if (auto spgh = contents.get()) + { + return parse_single_paragraph(*spgh); + } + + return contents.error(); + } + + Expected>> get_paragraphs(const Files::Filesystem& fs, + const fs::path& control_path) + { + const Expected contents = fs.read_contents(control_path); + if (auto spgh = contents.get()) + { + return parse_paragraphs(*spgh); + } + + return contents.error(); + } + + Expected> parse_single_paragraph(const std::string& str) + { + const std::vector> p = + Parser(str.c_str(), str.c_str() + str.size()).get_paragraphs(); + + if (p.size() == 1) + { + return p.at(0); + } + + return std::error_code(ParagraphParseResult::EXPECTED_ONE_PARAGRAPH); + } + + Expected>> parse_paragraphs(const std::string& str) + { + return Parser(str.c_str(), str.c_str() + str.size()).get_paragraphs(); + } + + ParseExpected try_load_port(const Files::Filesystem& fs, const fs::path& path) + { + Expected>> pghs = get_paragraphs(fs, path / "CONTROL"); + if (auto vector_pghs = pghs.get()) + { + auto csf = SourceControlFile::parse_control_file(std::move(*vector_pghs)); + if (!GlobalState::feature_packages) + { + if (auto ptr = csf.get()) + { + Checks::check_exit(VCPKG_LINE_INFO, ptr->get() != nullptr); + ptr->get()->core_paragraph->default_features.clear(); + ptr->get()->feature_paragraphs.clear(); + } + } + return csf; + } + auto error_info = std::make_unique(); + error_info->name = path.filename().generic_u8string(); + error_info->error = pghs.error(); + return error_info; + } + + Expected try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec) + { + Expected>> pghs = + get_paragraphs(paths.get_filesystem(), paths.package_dir(spec) / "CONTROL"); + + if (auto p = pghs.get()) + { + BinaryControlFile bcf; + bcf.core_paragraph = BinaryParagraph(p->front()); + p->erase(p->begin()); + + bcf.features = + Util::fmap(*p, [&](auto&& raw_feature) -> BinaryParagraph { return BinaryParagraph(raw_feature); }); + + return bcf; + } + + return pghs.error(); + } + + LoadResults try_load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir) + { + LoadResults ret; + for (auto&& path : fs.get_files_non_recursive(ports_dir)) + { + auto maybe_spgh = try_load_port(fs, path); + if (const auto spgh = maybe_spgh.get()) + { + ret.paragraphs.emplace_back(std::move(*spgh)); + } + else + { + ret.errors.emplace_back(std::move(maybe_spgh).error()); + } + } + return ret; + } + + std::vector> load_all_ports(const Files::Filesystem& fs, + const fs::path& ports_dir) + { + auto results = try_load_all_ports(fs, ports_dir); + if (!results.errors.empty()) + { + if (GlobalState::debugging) + { + print_error_message(results.errors); + } + else + { + for (auto&& error : results.errors) + { + System::println( + System::Color::warning, "Warning: an error occurred while parsing '%s'", error->name); + } + System::println(System::Color::warning, + "Use '--debug' to get more information about the parse failures.\n"); + } + } + return std::move(results.paragraphs); + } + + std::map load_all_port_names_and_versions(const Files::Filesystem& fs, + const fs::path& ports_dir) + { + auto all_ports = load_all_ports(fs, ports_dir); + + std::map names_and_versions; + for (auto&& port : all_ports) + names_and_versions.emplace(port->core_paragraph->name, port->core_paragraph->version); + + return names_and_versions; + } +} diff --git a/toolsrc/src/vcpkg/parse.cpp b/toolsrc/src/vcpkg/parse.cpp new file mode 100644 index 000000000..116a7f5c8 --- /dev/null +++ b/toolsrc/src/vcpkg/parse.cpp @@ -0,0 +1,81 @@ +#include "pch.h" + +#include + +#include +#include + +namespace vcpkg::Parse +{ + static Optional remove_field(std::unordered_map* fields, + const std::string& fieldname) + { + auto it = fields->find(fieldname); + if (it == fields->end()) + { + return nullopt; + } + + const std::string value = std::move(it->second); + fields->erase(it); + return value; + } + + void ParagraphParser::required_field(const std::string& fieldname, std::string& out) + { + auto maybe_field = remove_field(&fields, fieldname); + if (const auto field = maybe_field.get()) + out = std::move(*field); + else + missing_fields.push_back(fieldname); + } + std::string ParagraphParser::optional_field(const std::string& fieldname) const + { + return remove_field(&fields, fieldname).value_or(Strings::EMPTY); + } + std::unique_ptr ParagraphParser::error_info(const std::string& name) const + { + if (!fields.empty() || !missing_fields.empty()) + { + auto err = std::make_unique(); + err->name = name; + err->extra_fields = Util::extract_keys(fields); + err->missing_fields = std::move(missing_fields); + return err; + } + return nullptr; + } + + std::vector parse_comma_list(const std::string& str) + { + if (str.empty()) + { + return {}; + } + + std::vector out; + + size_t cur = 0; + do + { + auto pos = str.find(',', cur); + if (pos == std::string::npos) + { + out.push_back(str.substr(cur)); + break; + } + out.push_back(str.substr(cur, pos - cur)); + + // skip comma and space + ++pos; + if (str[pos] == ' ') + { + ++pos; + } + + cur = pos; + } while (cur != std::string::npos); + + return out; + } +} diff --git a/toolsrc/src/vcpkg/postbuildlint.buildtype.cpp b/toolsrc/src/vcpkg/postbuildlint.buildtype.cpp new file mode 100644 index 000000000..2baaddb5e --- /dev/null +++ b/toolsrc/src/vcpkg/postbuildlint.buildtype.cpp @@ -0,0 +1,70 @@ +#include "pch.h" + +#include +#include + +namespace vcpkg::PostBuildLint +{ + BuildType BuildType::value_of(const ConfigurationType& config, const Build::LinkageType& linkage) + { + if (config == ConfigurationType::DEBUG && linkage == Build::LinkageType::STATIC) + { + return BuildTypeC::DEBUG_STATIC; + } + + if (config == ConfigurationType::DEBUG && linkage == Build::LinkageType::DYNAMIC) + { + return BuildTypeC::DEBUG_DYNAMIC; + } + + if (config == ConfigurationType::RELEASE && linkage == Build::LinkageType::STATIC) + { + return BuildTypeC::RELEASE_STATIC; + } + + if (config == ConfigurationType::RELEASE && linkage == Build::LinkageType::DYNAMIC) + { + return BuildTypeC::RELEASE_DYNAMIC; + } + + Checks::unreachable(VCPKG_LINE_INFO); + } + + const ConfigurationType& BuildType::config() const { return this->m_config; } + + const Build::LinkageType& BuildType::linkage() const { return this->m_linkage; } + + const std::regex& BuildType::crt_regex() const + { + static const std::regex REGEX_DEBUG_STATIC(R"(/DEFAULTLIB:LIBCMTD)", std::regex_constants::icase); + static const std::regex REGEX_DEBUG_DYNAMIC(R"(/DEFAULTLIB:MSVCRTD)", std::regex_constants::icase); + static const std::regex REGEX_RELEASE_STATIC(R"(/DEFAULTLIB:LIBCMT[^D])", std::regex_constants::icase); + static const std::regex REGEX_RELEASE_DYNAMIC(R"(/DEFAULTLIB:MSVCRT[^D])", std::regex_constants::icase); + + switch (backing_enum) + { + case BuildTypeC::DEBUG_STATIC: return REGEX_DEBUG_STATIC; + case BuildTypeC::DEBUG_DYNAMIC: return REGEX_DEBUG_DYNAMIC; + case BuildTypeC::RELEASE_STATIC: return REGEX_RELEASE_STATIC; + case BuildTypeC::RELEASE_DYNAMIC: return REGEX_RELEASE_DYNAMIC; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + + const std::string& BuildType::to_string() const + { + static const std::string NAME_DEBUG_STATIC("Debug,Static"); + static const std::string NAME_DEBUG_DYNAMIC("Debug,Dynamic"); + static const std::string NAME_RELEASE_STATIC("Release,Static"); + static const std::string NAME_RELEASE_DYNAMIC("Release,Dynamic"); + + switch (backing_enum) + { + case BuildTypeC::DEBUG_STATIC: return NAME_DEBUG_STATIC; + case BuildTypeC::DEBUG_DYNAMIC: return NAME_DEBUG_DYNAMIC; + case BuildTypeC::RELEASE_STATIC: return NAME_RELEASE_STATIC; + case BuildTypeC::RELEASE_DYNAMIC: return NAME_RELEASE_DYNAMIC; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } +} diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp new file mode 100644 index 000000000..5f55249df --- /dev/null +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -0,0 +1,846 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using vcpkg::Build::BuildInfo; +using vcpkg::Build::BuildPolicy; +using vcpkg::Build::PreBuildInfo; + +namespace vcpkg::PostBuildLint +{ + static auto has_extension_pred(const Files::Filesystem& fs, const std::string& ext) + { + return [&fs, ext](const fs::path& path) { return !fs.is_directory(path) && path.extension() == ext; }; + } + + enum class LintStatus + { + SUCCESS = 0, + ERROR_DETECTED = 1 + }; + + struct OutdatedDynamicCrt + { + std::string name; + std::regex regex; + + OutdatedDynamicCrt(const std::string& name, const std::string& regex_as_string) + : name(name), regex(std::regex(regex_as_string, std::regex_constants::icase)) + { + } + }; + + Span get_outdated_dynamic_crts(CStringView toolset) + { + static const std::vector V_NO_MSVCRT = { + {"msvcp100.dll", R"(msvcp100\.dll)"}, + {"msvcp100d.dll", R"(msvcp100d\.dll)"}, + {"msvcp110.dll", R"(msvcp110\.dll)"}, + {"msvcp110_win.dll", R"(msvcp110_win\.dll)"}, + {"msvcp120.dll", R"(msvcp120\.dll)"}, + {"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"}, + {"msvcp60.dll", R"(msvcp60\.dll)"}, + {"msvcp60.dll", R"(msvcp60\.dll)"}, + + {"msvcr100.dll", R"(msvcr100\.dll)"}, + {"msvcr100d.dll", R"(msvcr100d\.dll)"}, + {"msvcr100_clr0400.dll", R"(msvcr100_clr0400\.dll)"}, + {"msvcr110.dll", R"(msvcr110\.dll)"}, + {"msvcr120.dll", R"(msvcr120\.dll)"}, + {"msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)"}, + {"msvcrt20.dll", R"(msvcrt20\.dll)"}, + {"msvcrt40.dll", R"(msvcrt40\.dll)"}}; + + return V_NO_MSVCRT; + } + + static LintStatus check_for_files_in_include_directory(const Files::Filesystem& fs, + const Build::BuildPolicies& policies, + const fs::path& package_dir) + { + if (policies.is_enabled(BuildPolicy::EMPTY_INCLUDE_FOLDER)) + { + return LintStatus::SUCCESS; + } + + const fs::path include_dir = package_dir / "include"; + if (!fs.exists(include_dir) || fs.is_empty(include_dir)) + { + System::println(System::Color::warning, + "The folder /include is empty. This indicates the library was not correctly installed."); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static LintStatus check_for_files_in_debug_include_directory(const Files::Filesystem& fs, + const fs::path& package_dir) + { + const fs::path debug_include_dir = package_dir / "debug" / "include"; + + std::vector files_found = fs.get_files_recursive(debug_include_dir); + + Util::unstable_keep_if( + files_found, [&fs](const fs::path& path) { return !fs.is_directory(path) && path.extension() != ".ifc"; }); + + if (!files_found.empty()) + { + System::println(System::Color::warning, + "Include files should not be duplicated into the /debug/include directory. If this cannot " + "be disabled in the project cmake, use\n" + " file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)"); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static LintStatus check_for_files_in_debug_share_directory(const Files::Filesystem& fs, const fs::path& package_dir) + { + const fs::path debug_share = package_dir / "debug" / "share"; + + if (fs.exists(debug_share)) + { + System::println(System::Color::warning, + "/debug/share should not exist. Please reorganize any important files, then use\n" + " file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)"); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static LintStatus check_folder_lib_cmake(const Files::Filesystem& fs, + const fs::path& package_dir, + const PackageSpec& spec) + { + const fs::path lib_cmake = package_dir / "lib" / "cmake"; + if (fs.exists(lib_cmake)) + { + System::println( + System::Color::warning, + "The /lib/cmake folder should be merged with /debug/lib/cmake and moved to /share/%s/cmake.", + spec.name()); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static LintStatus check_for_misplaced_cmake_files(const Files::Filesystem& fs, + const fs::path& package_dir, + const PackageSpec& spec) + { + std::vector dirs = { + package_dir / "cmake", + package_dir / "debug" / "cmake", + package_dir / "lib" / "cmake", + package_dir / "debug" / "lib" / "cmake", + }; + + std::vector misplaced_cmake_files; + for (auto&& dir : dirs) + { + auto files = fs.get_files_recursive(dir); + for (auto&& file : files) + { + if (!fs.is_directory(file) && file.extension() == ".cmake") + misplaced_cmake_files.push_back(std::move(file)); + } + } + + if (!misplaced_cmake_files.empty()) + { + System::println( + System::Color::warning, + "The following cmake files were found outside /share/%s. Please place cmake files in /share/%s.", + spec.name(), + spec.name()); + Files::print_paths(misplaced_cmake_files); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static LintStatus check_folder_debug_lib_cmake(const Files::Filesystem& fs, + const fs::path& package_dir, + const PackageSpec& spec) + { + const fs::path lib_cmake_debug = package_dir / "debug" / "lib" / "cmake"; + if (fs.exists(lib_cmake_debug)) + { + System::println(System::Color::warning, + "The /debug/lib/cmake folder should be merged with /lib/cmake into /share/%s", + spec.name()); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static LintStatus check_for_dlls_in_lib_dir(const Files::Filesystem& fs, const fs::path& package_dir) + { + std::vector dlls = fs.get_files_recursive(package_dir / "lib"); + Util::unstable_keep_if(dlls, has_extension_pred(fs, ".dll")); + + if (!dlls.empty()) + { + System::println(System::Color::warning, + "\nThe following dlls were found in /lib or /debug/lib. Please move them to /bin or " + "/debug/bin, respectively."); + Files::print_paths(dlls); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static LintStatus check_for_copyright_file(const Files::Filesystem& fs, + const PackageSpec& spec, + const VcpkgPaths& paths) + { + const fs::path packages_dir = paths.packages / spec.dir(); + const fs::path copyright_file = packages_dir / "share" / spec.name() / "copyright"; + if (fs.exists(copyright_file)) + { + return LintStatus::SUCCESS; + } + const fs::path current_buildtrees_dir = paths.buildtrees / spec.name(); + const fs::path current_buildtrees_dir_src = current_buildtrees_dir / "src"; + + std::vector potential_copyright_files; + // We only search in the root of each unpacked source archive to reduce false positives + auto src_dirs = fs.get_files_non_recursive(current_buildtrees_dir_src); + for (auto&& src_dir : src_dirs) + { + if (!fs.is_directory(src_dir)) continue; + + for (auto&& src_file : fs.get_files_non_recursive(src_dir)) + { + const std::string filename = src_file.filename().string(); + + if (filename == "LICENSE" || filename == "LICENSE.txt" || filename == "COPYING") + { + potential_copyright_files.push_back(src_file); + } + } + } + + System::println(System::Color::warning, + "The software license must be available at ${CURRENT_PACKAGES_DIR}/share/%s/copyright", + spec.name()); + if (potential_copyright_files.size() == + 1) // if there is only one candidate, provide the cmake lines needed to place it in the proper location + { + const fs::path found_file = potential_copyright_files[0]; + const fs::path relative_path = found_file.string().erase( + 0, current_buildtrees_dir.string().size() + 1); // The +1 is needed to remove the "/" + System::println( + "\n file(COPY ${CURRENT_BUILDTREES_DIR}/%s DESTINATION ${CURRENT_PACKAGES_DIR}/share/%s)\n" + " file(RENAME ${CURRENT_PACKAGES_DIR}/share/%s/%s ${CURRENT_PACKAGES_DIR}/share/%s/copyright)", + relative_path.generic_string(), + spec.name(), + spec.name(), + found_file.filename().generic_string(), + spec.name()); + } + else if (potential_copyright_files.size() > 1) + { + System::println(System::Color::warning, "The following files are potential copyright files:"); + Files::print_paths(potential_copyright_files); + } + return LintStatus::ERROR_DETECTED; + } + + static LintStatus check_for_exes(const Files::Filesystem& fs, const fs::path& package_dir) + { + std::vector exes = fs.get_files_recursive(package_dir / "bin"); + Util::unstable_keep_if(exes, has_extension_pred(fs, ".exe")); + + if (!exes.empty()) + { + System::println( + System::Color::warning, + "The following EXEs were found in /bin or /debug/bin. EXEs are not valid distribution targets."); + Files::print_paths(exes); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static LintStatus check_exports_of_dlls(const std::vector& dlls, const fs::path& dumpbin_exe) + { + std::vector dlls_with_no_exports; + for (const fs::path& dll : dlls) + { + const std::wstring cmd_line = + Strings::wformat(LR"("%s" /exports "%s")", dumpbin_exe.native(), dll.native()); + System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); + Checks::check_exit(VCPKG_LINE_INFO, + ec_data.exit_code == 0, + "Running command:\n %s\n failed", + Strings::to_utf8(cmd_line)); + + if (ec_data.output.find("ordinal hint RVA name") == std::string::npos) + { + dlls_with_no_exports.push_back(dll); + } + } + + if (!dlls_with_no_exports.empty()) + { + System::println(System::Color::warning, "The following DLLs have no exports:"); + Files::print_paths(dlls_with_no_exports); + System::println(System::Color::warning, "DLLs without any exports are likely a bug in the build script."); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static LintStatus check_uwp_bit_of_dlls(const std::string& expected_system_name, + const std::vector& dlls, + const fs::path dumpbin_exe) + { + if (expected_system_name != "WindowsStore") + { + return LintStatus::SUCCESS; + } + + std::vector dlls_with_improper_uwp_bit; + for (const fs::path& dll : dlls) + { + const std::wstring cmd_line = + Strings::wformat(LR"("%s" /headers "%s")", dumpbin_exe.native(), dll.native()); + System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); + Checks::check_exit(VCPKG_LINE_INFO, + ec_data.exit_code == 0, + "Running command:\n %s\n failed", + Strings::to_utf8(cmd_line)); + + if (ec_data.output.find("App Container") == std::string::npos) + { + dlls_with_improper_uwp_bit.push_back(dll); + } + } + + if (!dlls_with_improper_uwp_bit.empty()) + { + System::println(System::Color::warning, "The following DLLs do not have the App Container bit set:"); + Files::print_paths(dlls_with_improper_uwp_bit); + System::println(System::Color::warning, "This bit is required for Windows Store apps."); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + struct FileAndArch + { + fs::path file; + std::string actual_arch; + }; + + static std::string get_actual_architecture(const MachineType& machine_type) + { + switch (machine_type) + { + case MachineType::AMD64: + case MachineType::IA64: return "x64"; + case MachineType::I386: return "x86"; + case MachineType::ARM: + case MachineType::ARMNT: return "arm"; + default: return "Machine Type Code = " + std::to_string(static_cast(machine_type)); + } + } + + static void print_invalid_architecture_files(const std::string& expected_architecture, + std::vector binaries_with_invalid_architecture) + { + System::println(System::Color::warning, "The following files were built for an incorrect architecture:"); + System::println(); + for (const FileAndArch& b : binaries_with_invalid_architecture) + { + System::println(" %s", b.file.generic_string()); + System::println("Expected %s, but was: %s", expected_architecture, b.actual_arch); + System::println(); + } + } + + static LintStatus check_dll_architecture(const std::string& expected_architecture, + const std::vector& files) + { + std::vector binaries_with_invalid_architecture; + + for (const fs::path& file : files) + { + Checks::check_exit(VCPKG_LINE_INFO, + file.extension() == ".dll", + "The file extension was not .dll: %s", + file.generic_string()); + const CoffFileReader::DllInfo info = CoffFileReader::read_dll(file); + const std::string actual_architecture = get_actual_architecture(info.machine_type); + + if (expected_architecture != actual_architecture) + { + binaries_with_invalid_architecture.push_back({file, actual_architecture}); + } + } + + if (!binaries_with_invalid_architecture.empty()) + { + print_invalid_architecture_files(expected_architecture, binaries_with_invalid_architecture); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static LintStatus check_lib_architecture(const std::string& expected_architecture, + const std::vector& files) + { + std::vector binaries_with_invalid_architecture; + + for (const fs::path& file : files) + { + Checks::check_exit(VCPKG_LINE_INFO, + file.extension() == ".lib", + "The file extension was not .lib: %s", + file.generic_string()); + CoffFileReader::LibInfo info = CoffFileReader::read_lib(file); + + // This is zero for folly's debug library + // TODO: Why? + if (info.machine_types.size() == 0) return LintStatus::SUCCESS; + + Checks::check_exit(VCPKG_LINE_INFO, + info.machine_types.size() == 1, + "Found more than 1 architecture in file %s", + file.generic_string()); + + const std::string actual_architecture = get_actual_architecture(info.machine_types.at(0)); + if (expected_architecture != actual_architecture) + { + binaries_with_invalid_architecture.push_back({file, actual_architecture}); + } + } + + if (!binaries_with_invalid_architecture.empty()) + { + print_invalid_architecture_files(expected_architecture, binaries_with_invalid_architecture); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static LintStatus check_no_dlls_present(const std::vector& dlls) + { + if (dlls.empty()) + { + return LintStatus::SUCCESS; + } + + System::println(System::Color::warning, + "DLLs should not be present in a static build, but the following DLLs were found:"); + Files::print_paths(dlls); + return LintStatus::ERROR_DETECTED; + } + + static LintStatus check_matching_debug_and_release_binaries(const std::vector& debug_binaries, + const std::vector& release_binaries) + { + const size_t debug_count = debug_binaries.size(); + const size_t release_count = release_binaries.size(); + if (debug_count == release_count) + { + return LintStatus::SUCCESS; + } + + System::println(System::Color::warning, + "Mismatching number of debug and release binaries. Found %d for debug but %d for release.", + debug_count, + release_count); + System::println("Debug binaries"); + Files::print_paths(debug_binaries); + + System::println("Release binaries"); + Files::print_paths(release_binaries); + + if (debug_count == 0) + { + System::println(System::Color::warning, "Debug binaries were not found"); + } + if (release_count == 0) + { + System::println(System::Color::warning, "Release binaries were not found"); + } + + System::println(); + + return LintStatus::ERROR_DETECTED; + } + + static LintStatus check_lib_files_are_available_if_dlls_are_available(const Build::BuildPolicies& policies, + const size_t lib_count, + const size_t dll_count, + const fs::path& lib_dir) + { + if (policies.is_enabled(BuildPolicy::DLLS_WITHOUT_LIBS)) return LintStatus::SUCCESS; + + if (lib_count == 0 && dll_count != 0) + { + System::println(System::Color::warning, "Import libs were not present in %s", lib_dir.u8string()); + System::println(System::Color::warning, + "If this is intended, add the following line in the portfile:\n" + " SET(%s enabled)", + to_cmake_variable(BuildPolicy::DLLS_WITHOUT_LIBS)); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static LintStatus check_bin_folders_are_not_present_in_static_build(const Files::Filesystem& fs, + const fs::path& package_dir) + { + const fs::path bin = package_dir / "bin"; + const fs::path debug_bin = package_dir / "debug" / "bin"; + + if (!fs.exists(bin) && !fs.exists(debug_bin)) + { + return LintStatus::SUCCESS; + } + + if (fs.exists(bin)) + { + System::println(System::Color::warning, + R"(There should be no bin\ directory in a static build, but %s is present.)", + bin.u8string()); + } + + if (fs.exists(debug_bin)) + { + System::println(System::Color::warning, + R"(There should be no debug\bin\ directory in a static build, but %s is present.)", + debug_bin.u8string()); + } + + System::println( + System::Color::warning, + R"(If the creation of bin\ and/or debug\bin\ cannot be disabled, use this in the portfile to remove them)" + "\n" + "\n" + R"###( if(VCPKG_LIBRARY_LINKAGE STREQUAL static))###" + "\n" + R"###( file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin))###" + "\n" + R"###( endif())###" + "\n"); + + return LintStatus::ERROR_DETECTED; + } + + static LintStatus check_no_empty_folders(const Files::Filesystem& fs, const fs::path& dir) + { + std::vector empty_directories = fs.get_files_recursive(dir); + + Util::unstable_keep_if(empty_directories, [&fs](const fs::path& current) { + return fs.is_directory(current) && fs.is_empty(current); + }); + + if (!empty_directories.empty()) + { + System::println(System::Color::warning, "There should be no empty directories in %s", dir.generic_string()); + System::println("The following empty directories were found: "); + Files::print_paths(empty_directories); + System::println( + System::Color::warning, + "If a directory should be populated but is not, this might indicate an error in the portfile.\n" + "If the directories are not needed and their creation cannot be disabled, use something like this in " + "the portfile to remove them:\n" + "\n" + R"###( file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/a/dir ${CURRENT_PACKAGES_DIR}/some/other/dir))###" + "\n" + "\n"); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + struct BuildTypeAndFile + { + fs::path file; + BuildType build_type; + }; + + static LintStatus check_crt_linkage_of_libs(const BuildType& expected_build_type, + const std::vector& libs, + const fs::path dumpbin_exe) + { + std::vector bad_build_types(BuildTypeC::VALUES.cbegin(), BuildTypeC::VALUES.cend()); + bad_build_types.erase(std::remove(bad_build_types.begin(), bad_build_types.end(), expected_build_type), + bad_build_types.end()); + + std::vector libs_with_invalid_crt; + + for (const fs::path& lib : libs) + { + const std::wstring cmd_line = + Strings::wformat(LR"("%s" /directives "%s")", dumpbin_exe.native(), lib.native()); + System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); + Checks::check_exit(VCPKG_LINE_INFO, + ec_data.exit_code == 0, + "Running command:\n %s\n failed", + Strings::to_utf8(cmd_line)); + + for (const BuildType& bad_build_type : bad_build_types) + { + if (std::regex_search(ec_data.output.cbegin(), ec_data.output.cend(), bad_build_type.crt_regex())) + { + libs_with_invalid_crt.push_back({lib, bad_build_type}); + break; + } + } + } + + if (!libs_with_invalid_crt.empty()) + { + System::println(System::Color::warning, + "Expected %s crt linkage, but the following libs had invalid crt linkage:", + expected_build_type.to_string()); + System::println(); + for (const BuildTypeAndFile btf : libs_with_invalid_crt) + { + System::println(" %s: %s", btf.file.generic_string(), btf.build_type.to_string()); + } + System::println(); + + System::println(System::Color::warning, + "To inspect the lib files, use:\n dumpbin.exe /directives mylibfile.lib"); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + struct OutdatedDynamicCrtAndFile + { + fs::path file; + OutdatedDynamicCrt outdated_crt; + + OutdatedDynamicCrtAndFile() = delete; + }; + + static LintStatus check_outdated_crt_linkage_of_dlls(const std::vector& dlls, + const fs::path dumpbin_exe, + const BuildInfo& build_info) + { + if (build_info.policies.is_enabled(BuildPolicy::ALLOW_OBSOLETE_MSVCRT)) return LintStatus::SUCCESS; + + std::vector dlls_with_outdated_crt; + + for (const fs::path& dll : dlls) + { + const std::wstring cmd_line = + Strings::wformat(LR"("%s" /dependents "%s")", dumpbin_exe.native(), dll.native()); + System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); + Checks::check_exit(VCPKG_LINE_INFO, + ec_data.exit_code == 0, + "Running command:\n %s\n failed", + Strings::to_utf8(cmd_line)); + + for (const OutdatedDynamicCrt& outdated_crt : get_outdated_dynamic_crts("v141")) + { + if (std::regex_search(ec_data.output.cbegin(), ec_data.output.cend(), outdated_crt.regex)) + { + dlls_with_outdated_crt.push_back({dll, outdated_crt}); + break; + } + } + } + + if (!dlls_with_outdated_crt.empty()) + { + System::println(System::Color::warning, "Detected outdated dynamic CRT in the following files:"); + System::println(); + for (const OutdatedDynamicCrtAndFile btf : dlls_with_outdated_crt) + { + System::println(" %s: %s", btf.file.generic_string(), btf.outdated_crt.name); + } + System::println(); + + System::println(System::Color::warning, + "To inspect the dll files, use:\n dumpbin.exe /dependents mydllfile.dll"); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static LintStatus check_no_files_in_dir(const Files::Filesystem& fs, const fs::path& dir) + { + std::vector misplaced_files = fs.get_files_non_recursive(dir); + Util::unstable_keep_if(misplaced_files, [&fs](const fs::path& path) { + const std::string filename = path.filename().generic_string(); + if (Strings::case_insensitive_ascii_compare(filename.c_str(), "CONTROL") || + Strings::case_insensitive_ascii_compare(filename.c_str(), "BUILD_INFO")) + return false; + return !fs.is_directory(path); + }); + + if (!misplaced_files.empty()) + { + System::println(System::Color::warning, "The following files are placed in\n%s: ", dir.u8string()); + Files::print_paths(misplaced_files); + System::println(System::Color::warning, "Files cannot be present in those directories.\n"); + return LintStatus::ERROR_DETECTED; + } + + return LintStatus::SUCCESS; + } + + static void operator+=(size_t& left, const LintStatus& right) { left += static_cast(right); } + + static size_t perform_all_checks_and_return_error_count(const PackageSpec& spec, + const VcpkgPaths& paths, + const PreBuildInfo& pre_build_info, + const BuildInfo& build_info) + { + const auto& fs = paths.get_filesystem(); + + // for dumpbin + const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); + const fs::path package_dir = paths.package_dir(spec); + + size_t error_count = 0; + + if (build_info.policies.is_enabled(BuildPolicy::EMPTY_PACKAGE)) + { + return error_count; + } + + error_count += check_for_files_in_include_directory(fs, build_info.policies, package_dir); + error_count += check_for_files_in_debug_include_directory(fs, package_dir); + error_count += check_for_files_in_debug_share_directory(fs, package_dir); + error_count += check_folder_lib_cmake(fs, package_dir, spec); + error_count += check_for_misplaced_cmake_files(fs, package_dir, spec); + error_count += check_folder_debug_lib_cmake(fs, package_dir, spec); + error_count += check_for_dlls_in_lib_dir(fs, package_dir); + error_count += check_for_dlls_in_lib_dir(fs, package_dir / "debug"); + error_count += check_for_copyright_file(fs, spec, paths); + error_count += check_for_exes(fs, package_dir); + error_count += check_for_exes(fs, package_dir / "debug"); + + const fs::path debug_lib_dir = package_dir / "debug" / "lib"; + const fs::path release_lib_dir = package_dir / "lib"; + const fs::path debug_bin_dir = package_dir / "debug" / "bin"; + const fs::path release_bin_dir = package_dir / "bin"; + + std::vector debug_libs = fs.get_files_recursive(debug_lib_dir); + Util::unstable_keep_if(debug_libs, has_extension_pred(fs, ".lib")); + std::vector release_libs = fs.get_files_recursive(release_lib_dir); + Util::unstable_keep_if(release_libs, has_extension_pred(fs, ".lib")); + + error_count += check_matching_debug_and_release_binaries(debug_libs, release_libs); + + { + std::vector libs; + libs.insert(libs.cend(), debug_libs.cbegin(), debug_libs.cend()); + libs.insert(libs.cend(), release_libs.cbegin(), release_libs.cend()); + + error_count += check_lib_architecture(pre_build_info.target_architecture, libs); + } + + std::vector debug_dlls = fs.get_files_recursive(debug_bin_dir); + Util::unstable_keep_if(debug_dlls, has_extension_pred(fs, ".dll")); + std::vector release_dlls = fs.get_files_recursive(release_bin_dir); + Util::unstable_keep_if(release_dlls, has_extension_pred(fs, ".dll")); + + switch (build_info.library_linkage) + { + case Build::LinkageType::DYNAMIC: + { + error_count += check_matching_debug_and_release_binaries(debug_dlls, release_dlls); + + error_count += check_lib_files_are_available_if_dlls_are_available( + build_info.policies, debug_libs.size(), debug_dlls.size(), debug_lib_dir); + error_count += check_lib_files_are_available_if_dlls_are_available( + build_info.policies, release_libs.size(), release_dlls.size(), release_lib_dir); + + std::vector dlls; + dlls.insert(dlls.cend(), debug_dlls.cbegin(), debug_dlls.cend()); + dlls.insert(dlls.cend(), release_dlls.cbegin(), release_dlls.cend()); + + error_count += check_exports_of_dlls(dlls, toolset.dumpbin); + error_count += check_uwp_bit_of_dlls(pre_build_info.cmake_system_name, dlls, toolset.dumpbin); + error_count += check_dll_architecture(pre_build_info.target_architecture, dlls); + + error_count += check_outdated_crt_linkage_of_dlls(dlls, toolset.dumpbin, build_info); + break; + } + case Build::LinkageType::STATIC: + { + auto dlls = release_dlls; + dlls.insert(dlls.end(), debug_dlls.begin(), debug_dlls.end()); + error_count += check_no_dlls_present(dlls); + + error_count += check_bin_folders_are_not_present_in_static_build(fs, package_dir); + + if (!build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT)) + { + error_count += + check_crt_linkage_of_libs(BuildType::value_of(ConfigurationType::DEBUG, build_info.crt_linkage), + debug_libs, + toolset.dumpbin); + } + error_count += + check_crt_linkage_of_libs(BuildType::value_of(ConfigurationType::RELEASE, build_info.crt_linkage), + release_libs, + toolset.dumpbin); + break; + } + default: Checks::unreachable(VCPKG_LINE_INFO); + } + + error_count += check_no_empty_folders(fs, package_dir); + error_count += check_no_files_in_dir(fs, package_dir); + error_count += check_no_files_in_dir(fs, package_dir / "debug"); + + return error_count; + } + + size_t perform_all_checks(const PackageSpec& spec, + const VcpkgPaths& paths, + const PreBuildInfo& pre_build_info, + const BuildInfo& build_info) + { + System::println("-- Performing post-build validation"); + 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"; + System::println(System::Color::error, + "Found %u error(s). Please correct the portfile:\n %s", + error_count, + portfile.string()); + } + + System::println("-- Performing post-build validation done"); + + return error_count; + } +} diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp new file mode 100644 index 000000000..3751566f7 --- /dev/null +++ b/toolsrc/src/vcpkg/remove.cpp @@ -0,0 +1,251 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Remove +{ + using Dependencies::RemovePlanAction; + using Dependencies::RemovePlanType; + using Dependencies::RequestType; + using Update::OutdatedPackage; + + void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db) + { + auto& fs = paths.get_filesystem(); + auto spghs = status_db->find_all(spec.name(), spec.triplet()); + const auto core_pkg = **status_db->find(spec.name(), spec.triplet(), Strings::EMPTY); + + for (auto&& spgh : spghs) + { + StatusParagraph& pkg = **spgh; + if (pkg.state != InstallState::INSTALLED) continue; + pkg.want = Want::PURGE; + pkg.state = InstallState::HALF_INSTALLED; + write_update(paths, pkg); + } + + auto maybe_lines = fs.read_lines(paths.listfile_path(core_pkg.package)); + + if (const auto lines = maybe_lines.get()) + { + std::vector dirs_touched; + for (auto&& suffix : *lines) + { + if (!suffix.empty() && suffix.back() == '\r') suffix.pop_back(); + + std::error_code ec; + + auto target = paths.installed / suffix; + + const auto status = fs.status(target, ec); + if (ec) + { + System::println(System::Color::error, "failed: %s", ec.message()); + continue; + } + + if (fs::is_directory(status)) + { + dirs_touched.push_back(target); + } + else if (fs::is_regular_file(status)) + { + fs.remove(target, ec); + if (ec) + { + System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); + } + } + else if (!fs::status_known(status)) + { + System::println(System::Color::warning, "Warning: unknown status: %s", target.u8string()); + } + else + { + System::println(System::Color::warning, "Warning: %s: cannot handle file type", target.u8string()); + } + } + + auto b = dirs_touched.rbegin(); + const auto e = dirs_touched.rend(); + for (; b != e; ++b) + { + if (fs.is_empty(*b)) + { + std::error_code ec; + fs.remove(*b, ec); + if (ec) + { + System::println(System::Color::error, "failed: %s", ec.message()); + } + } + } + + fs.remove(paths.listfile_path(core_pkg.package)); + } + + for (auto&& spgh : spghs) + { + StatusParagraph& pkg = **spgh; + if (pkg.state != InstallState::HALF_INSTALLED) continue; + pkg.state = InstallState::NOT_INSTALLED; + write_update(paths, pkg); + } + } + + static void print_plan(const std::map>& group_by_plan_type) + { + static constexpr std::array ORDER = {RemovePlanType::NOT_INSTALLED, RemovePlanType::REMOVE}; + + for (const RemovePlanType plan_type : ORDER) + { + const auto it = group_by_plan_type.find(plan_type); + if (it == group_by_plan_type.cend()) + { + continue; + } + + std::vector cont = it->second; + std::sort(cont.begin(), cont.end(), &RemovePlanAction::compare_by_name); + const std::string as_string = Strings::join("\n", cont, [](const RemovePlanAction* p) { + return Dependencies::to_output_string(p->request_type, p->spec.to_string()); + }); + + switch (plan_type) + { + case RemovePlanType::NOT_INSTALLED: + System::println("The following packages are not installed, so not removed:\n%s", as_string); + continue; + case RemovePlanType::REMOVE: + System::println("The following packages will be removed:\n%s", as_string); + continue; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + } + + void perform_remove_plan_action(const VcpkgPaths& paths, + const RemovePlanAction& action, + const Purge purge, + StatusParagraphs& status_db) + { + const std::string display_name = action.spec.to_string(); + + switch (action.plan_type) + { + case RemovePlanType::NOT_INSTALLED: + System::println(System::Color::success, "Package %s is not installed", display_name); + break; + case RemovePlanType::REMOVE: + System::println("Removing package %s... ", display_name); + remove_package(paths, action.spec, &status_db); + System::println(System::Color::success, "Removing package %s... done", display_name); + break; + case RemovePlanType::UNKNOWN: + default: Checks::unreachable(VCPKG_LINE_INFO); + } + + if (purge == Purge::YES) + { + System::println("Purging package %s... ", display_name); + Files::Filesystem& fs = paths.get_filesystem(); + std::error_code ec; + fs.remove_all(paths.packages / action.spec.dir(), ec); + System::println(System::Color::success, "Purging package %s... done", display_name); + } + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + { + static const std::string OPTION_PURGE = "--purge"; + static const std::string OPTION_NO_PURGE = "--no-purge"; + static const std::string OPTION_RECURSE = "--recurse"; + static const std::string OPTION_DRY_RUN = "--dry-run"; + static const std::string OPTION_OUTDATED = "--outdated"; + static const std::string EXAMPLE = Help::create_example_string("remove zlib zlib:x64-windows curl boost"); + const std::unordered_set options = args.check_and_get_optional_command_arguments( + {OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED}); + + StatusParagraphs status_db = database_load_check(paths); + std::vector specs; + if (options.find(OPTION_OUTDATED) != options.cend()) + { + args.check_exact_arg_count(0, EXAMPLE); + specs = Util::fmap(Update::find_outdated_packages(paths, status_db), + [](auto&& outdated) { return outdated.spec; }); + + if (specs.empty()) + { + System::println(System::Color::success, "There are no outdated packages."); + Checks::exit_success(VCPKG_LINE_INFO); + } + } + else + { + args.check_min_arg_count(1, EXAMPLE); + specs = Util::fmap(args.command_arguments, [&](auto&& arg) { + return Input::check_and_get_package_spec(arg, default_triplet, EXAMPLE); + }); + + for (auto&& spec : specs) + Input::check_triplet(spec.triplet(), paths); + } + + const bool no_purge_was_passed = options.find(OPTION_NO_PURGE) != options.end(); + const bool purge_was_passed = options.find(OPTION_PURGE) != options.end(); + if (purge_was_passed && no_purge_was_passed) + { + System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge."); + System::print(EXAMPLE); + Checks::exit_fail(VCPKG_LINE_INFO); + } + const Purge purge = to_purge(purge_was_passed || !no_purge_was_passed); + const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); + const bool dry_run = options.find(OPTION_DRY_RUN) != options.cend(); + + const std::vector remove_plan = Dependencies::create_remove_plan(specs, status_db); + Checks::check_exit(VCPKG_LINE_INFO, !remove_plan.empty(), "Remove plan cannot be empty"); + + std::map> group_by_plan_type; + Util::group_by(remove_plan, &group_by_plan_type, [](const RemovePlanAction& p) { return p.plan_type; }); + print_plan(group_by_plan_type); + + const bool has_non_user_requested_packages = + Util::find_if(remove_plan, [](const RemovePlanAction& package) -> bool { + return package.request_type != RequestType::USER_REQUESTED; + }) != remove_plan.cend(); + + if (has_non_user_requested_packages) + { + System::println(System::Color::warning, + "Additional packages (*) need to be removed to complete this operation."); + + if (!is_recursive) + { + System::println(System::Color::warning, + "If you are sure you want to remove them, run the command with the --recurse option"); + Checks::exit_fail(VCPKG_LINE_INFO); + } + } + + if (dry_run) + { + Checks::exit_success(VCPKG_LINE_INFO); + } + + for (const RemovePlanAction& action : remove_plan) + { + perform_remove_plan_action(paths, action, purge, status_db); + } + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp new file mode 100644 index 000000000..d766dcb72 --- /dev/null +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -0,0 +1,264 @@ +#include "pch.h" + +#include +#include +#include + +#include +#include +#include +#include + +namespace vcpkg +{ + using namespace vcpkg::Parse; + + namespace SourceParagraphFields + { + static const std::string BUILD_DEPENDS = "Build-Depends"; + static const std::string DEFAULTFEATURES = "Default-Features"; + static const std::string DESCRIPTION = "Description"; + static const std::string FEATURE = "Feature"; + static const std::string MAINTAINER = "Maintainer"; + static const std::string SOURCE = "Source"; + static const std::string SUPPORTS = "Supports"; + static const std::string VERSION = "Version"; + } + + static Span get_list_of_valid_fields() + { + static const std::string valid_fields[] = { + SourceParagraphFields::SOURCE, + SourceParagraphFields::VERSION, + SourceParagraphFields::DESCRIPTION, + SourceParagraphFields::MAINTAINER, + SourceParagraphFields::BUILD_DEPENDS, + }; + + return valid_fields; + } + + void print_error_message(Span> error_info_list) + { + Checks::check_exit(VCPKG_LINE_INFO, error_info_list.size() > 0); + + for (auto&& error_info : error_info_list) + { + Checks::check_exit(VCPKG_LINE_INFO, error_info != nullptr); + if (error_info->error) + { + System::println( + System::Color::error, "Error: while loading %s: %s", error_info->name, error_info->error.message()); + } + } + + bool have_remaining_fields = false; + for (auto&& error_info : error_info_list) + { + if (!error_info->extra_fields.empty()) + { + System::println(System::Color::error, + "Error: There are invalid fields in the control file of %s", + error_info->name); + System::println("The following fields were not expected:\n\n %s\n", + Strings::join("\n ", error_info->extra_fields)); + have_remaining_fields = true; + } + } + + if (have_remaining_fields) + { + System::println("This is the list of valid fields (case-sensitive): \n\n %s\n", + Strings::join("\n ", get_list_of_valid_fields())); + System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n"); + } + + for (auto&& error_info : error_info_list) + { + if (!error_info->missing_fields.empty()) + { + System::println(System::Color::error, + "Error: There are missing fields in the control file of %s", + error_info->name); + System::println("The following fields were missing:\n\n %s\n", + Strings::join("\n ", error_info->missing_fields)); + } + } + } + + static ParseExpected parse_source_paragraph(RawParagraph&& fields) + { + ParagraphParser parser(std::move(fields)); + + auto spgh = std::make_unique(); + + parser.required_field(SourceParagraphFields::SOURCE, spgh->name); + parser.required_field(SourceParagraphFields::VERSION, spgh->version); + + spgh->description = parser.optional_field(SourceParagraphFields::DESCRIPTION); + spgh->maintainer = parser.optional_field(SourceParagraphFields::MAINTAINER); + spgh->depends = expand_qualified_dependencies( + 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)); + + auto err = parser.error_info(spgh->name); + if (err) + return std::move(err); + else + return std::move(spgh); + } + + static ParseExpected parse_feature_paragraph(RawParagraph&& fields) + { + ParagraphParser parser(std::move(fields)); + + auto fpgh = std::make_unique(); + + parser.required_field(SourceParagraphFields::FEATURE, fpgh->name); + parser.required_field(SourceParagraphFields::DESCRIPTION, fpgh->description); + + fpgh->depends = expand_qualified_dependencies( + parse_comma_list(parser.optional_field(SourceParagraphFields::BUILD_DEPENDS))); + + auto err = parser.error_info(fpgh->name); + if (err) + return std::move(err); + else + return std::move(fpgh); + } + + ParseExpected SourceControlFile::parse_control_file( + std::vector>&& control_paragraphs) + { + if (control_paragraphs.size() == 0) + { + return std::make_unique(); + } + + auto control_file = std::make_unique(); + + auto maybe_source = parse_source_paragraph(std::move(control_paragraphs.front())); + if (const auto source = maybe_source.get()) + control_file->core_paragraph = std::move(*source); + else + return std::move(maybe_source).error(); + + control_paragraphs.erase(control_paragraphs.begin()); + + for (auto&& feature_pgh : control_paragraphs) + { + auto maybe_feature = parse_feature_paragraph(std::move(feature_pgh)); + if (const auto feature = maybe_feature.get()) + control_file->feature_paragraphs.emplace_back(std::move(*feature)); + else + return std::move(maybe_feature).error(); + } + + return std::move(control_file); + } + + Dependency Dependency::parse_dependency(std::string name, std::string qualifier) + { + Dependency dep; + dep.qualifier = qualifier; + if (auto maybe_features = Features::from_string(name)) + dep.depend = *maybe_features.get(); + else + Checks::exit_with_message( + VCPKG_LINE_INFO, "error while parsing dependency: %s: %s", to_string(maybe_features.error()), name); + return dep; + } + + std::string Dependency::name() const + { + if (this->depend.features.empty()) return this->depend.name; + + const std::string features = Strings::join(",", this->depend.features); + return Strings::format("%s[%s]", this->depend.name, features); + } + + std::vector vcpkg::expand_qualified_dependencies(const std::vector& depends) + { + return Util::fmap(depends, [&](const std::string& depend_string) -> Dependency { + auto pos = depend_string.find(' '); + if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, Strings::EMPTY); + // expect of the form "\w+ \[\w+\]" + Dependency dep; + + dep.depend.name = depend_string.substr(0, pos); + if (depend_string.c_str()[pos + 1] != '(' || depend_string[depend_string.size() - 1] != ')') + { + // Error, but for now just slurp the entire string. + return Dependency::parse_dependency(depend_string, Strings::EMPTY); + } + dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3); + return dep; + }); + } + + std::vector filter_dependencies(const std::vector& deps, const Triplet& t) + { + std::vector ret; + for (auto&& dep : deps) + { + if (dep.qualifier.empty() || t.canonical_name().find(dep.qualifier) != std::string::npos) + { + ret.emplace_back(dep.name()); + } + } + 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); + } + + std::string to_string(const Dependency& dep) { return dep.name(); } + + ExpectedT> Supports::parse(const std::vector& strs) + { + Supports ret; + std::vector unrecognized; + + for (auto&& str : strs) + { + if (str == "x64") + ret.architectures.push_back(Architecture::X64); + else if (str == "x86") + ret.architectures.push_back(Architecture::X86); + else if (str == "arm") + ret.architectures.push_back(Architecture::ARM); + else if (str == "windows") + ret.platforms.push_back(Platform::WINDOWS); + else if (str == "uwp") + ret.platforms.push_back(Platform::UWP); + else if (str == "v140") + ret.toolsets.push_back(ToolsetVersion::V140); + else if (str == "v141") + ret.toolsets.push_back(ToolsetVersion::V141); + else if (str == "crt-static") + ret.crt_linkages.push_back(Linkage::STATIC); + else if (str == "crt-dynamic") + ret.crt_linkages.push_back(Linkage::DYNAMIC); + else + unrecognized.push_back(str); + } + + if (unrecognized.empty()) + return std::move(ret); + else + return std::move(unrecognized); + } + + bool Supports::is_supported(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools) + { + const auto is_in_or_empty = [](auto v, auto&& c) -> bool { return c.empty() || c.end() != Util::find(c, v); }; + if (!is_in_or_empty(arch, architectures)) return false; + if (!is_in_or_empty(plat, platforms)) return false; + if (!is_in_or_empty(crt, crt_linkages)) return false; + if (!is_in_or_empty(tools, toolsets)) return false; + return true; + } +} diff --git a/toolsrc/src/vcpkg/statusparagraph.cpp b/toolsrc/src/vcpkg/statusparagraph.cpp new file mode 100644 index 000000000..5f00825e1 --- /dev/null +++ b/toolsrc/src/vcpkg/statusparagraph.cpp @@ -0,0 +1,86 @@ +#include "pch.h" + +#include + +using namespace vcpkg::Parse; + +namespace vcpkg +{ + namespace BinaryParagraphRequiredField + { + static const std::string STATUS = "Status"; + } + + StatusParagraph::StatusParagraph() : want(Want::ERROR_STATE), state(InstallState::ERROR_STATE) {} + + void serialize(const StatusParagraph& pgh, std::string& out_str) + { + serialize(pgh.package, out_str); + out_str.append("Status: ") + .append(to_string(pgh.want)) + .append(" ok ") + .append(to_string(pgh.state)) + .push_back('\n'); + } + + StatusParagraph::StatusParagraph(std::unordered_map&& fields) + { + auto status_it = fields.find(BinaryParagraphRequiredField::STATUS); + Checks::check_exit(VCPKG_LINE_INFO, status_it != fields.end(), "Expected 'Status' field in status paragraph"); + std::string status_field = std::move(status_it->second); + fields.erase(status_it); + + this->package = BinaryParagraph(std::move(fields)); + + auto b = status_field.begin(); + const auto mark = b; + const auto e = status_field.end(); + + // Todo: improve error handling + while (b != e && *b != ' ') + ++b; + + want = [](const std::string& text) { + if (text == "unknown") return Want::UNKNOWN; + if (text == "install") return Want::INSTALL; + if (text == "hold") return Want::HOLD; + if (text == "deinstall") return Want::DEINSTALL; + if (text == "purge") return Want::PURGE; + return Want::ERROR_STATE; + }(std::string(mark, b)); + + if (std::distance(b, e) < 4) return; + b += 4; + + state = [](const std::string& text) { + if (text == "not-installed") return InstallState::NOT_INSTALLED; + if (text == "installed") return InstallState::INSTALLED; + if (text == "half-installed") return InstallState::HALF_INSTALLED; + return InstallState::ERROR_STATE; + }(std::string(b, e)); + } + + std::string to_string(InstallState f) + { + switch (f) + { + case InstallState::HALF_INSTALLED: return "half-installed"; + case InstallState::INSTALLED: return "installed"; + case InstallState::NOT_INSTALLED: return "not-installed"; + default: return "error"; + } + } + + std::string to_string(Want f) + { + switch (f) + { + case Want::DEINSTALL: return "deinstall"; + case Want::HOLD: return "hold"; + case Want::INSTALL: return "install"; + case Want::PURGE: return "purge"; + case Want::UNKNOWN: return "unknown"; + default: return "error"; + } + } +} diff --git a/toolsrc/src/vcpkg/statusparagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp new file mode 100644 index 000000000..647ed6d3f --- /dev/null +++ b/toolsrc/src/vcpkg/statusparagraphs.cpp @@ -0,0 +1,89 @@ +#include "pch.h" + +#include +#include + +namespace vcpkg +{ + StatusParagraphs::StatusParagraphs() = default; + + StatusParagraphs::StatusParagraphs(std::vector>&& ps) + : paragraphs(std::move(ps)){}; + + StatusParagraphs::const_iterator StatusParagraphs::find(const std::string& name, const Triplet& triplet) const + { + return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { + const PackageSpec& spec = pgh->package.spec; + return spec.name() == name && spec.triplet() == triplet; + }); + } + + StatusParagraphs::iterator StatusParagraphs::find(const std::string& name, const Triplet& triplet) + { + return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { + const PackageSpec& spec = pgh->package.spec; + return spec.name() == name && spec.triplet() == triplet; + }); + } + + std::vector*> StatusParagraphs::find_all(const std::string& name, + const Triplet& triplet) + { + std::vector*> spghs; + for (auto&& p : *this) + { + if (p->package.spec.name() == name && p->package.spec.triplet() == triplet) + { + spghs.emplace_back(&p); + } + } + return spghs; + } + + StatusParagraphs::iterator StatusParagraphs::find(const std::string& name, + const Triplet& triplet, + const std::string& feature) + { + return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { + const PackageSpec& spec = pgh->package.spec; + return spec.name() == name && spec.triplet() == triplet && pgh->package.feature == feature; + }); + } + + StatusParagraphs::const_iterator StatusParagraphs::find_installed(const std::string& name, + const Triplet& triplet) const + { + const const_iterator it = find(name, triplet); + if (it != end() && (*it)->want == Want::INSTALL && (*it)->state == InstallState::INSTALLED) + { + return it; + } + + return end(); + } + + StatusParagraphs::iterator StatusParagraphs::insert(std::unique_ptr pgh) + { + Checks::check_exit(VCPKG_LINE_INFO, pgh != nullptr, "Inserted null paragraph"); + const PackageSpec& spec = pgh->package.spec; + const auto ptr = find(spec.name(), spec.triplet(), pgh->package.feature); + if (ptr == end()) + { + paragraphs.push_back(std::move(pgh)); + return paragraphs.rbegin(); + } + + // consume data from provided pgh. + **ptr = std::move(*pgh); + return ptr; + } + + void serialize(const StatusParagraphs& pghs, std::string& out_str) + { + for (auto& pgh : pghs.paragraphs) + { + serialize(*pgh, out_str); + out_str.push_back('\n'); + } + } +} diff --git a/toolsrc/src/vcpkg/triplet.cpp b/toolsrc/src/vcpkg/triplet.cpp new file mode 100644 index 000000000..8a84ee2b2 --- /dev/null +++ b/toolsrc/src/vcpkg/triplet.cpp @@ -0,0 +1,55 @@ +#include "pch.h" + +#include +#include +#include + +namespace vcpkg +{ + struct TripletInstance + { + TripletInstance(std::string&& s) : value(std::move(s)), hash(std::hash()(value)) {} + + const std::string value; + const size_t hash = 0; + + bool operator==(const TripletInstance& o) const { return o.value == value; } + }; + const TripletInstance Triplet::DEFAULT_INSTANCE({}); +} + +template<> +struct std::hash +{ + size_t operator()(const vcpkg::TripletInstance& t) const { return t.hash; } +}; + +namespace vcpkg +{ + static std::unordered_set g_triplet_instances; + + const Triplet Triplet::X86_WINDOWS = from_canonical_name("x86-windows"); + const Triplet Triplet::X64_WINDOWS = from_canonical_name("x64-windows"); + const Triplet Triplet::X86_UWP = from_canonical_name("x86-uwp"); + const Triplet Triplet::X64_UWP = from_canonical_name("x64-uwp"); + const Triplet Triplet::ARM_UWP = from_canonical_name("arm-uwp"); + + bool Triplet::operator==(const Triplet& other) const { return this->m_instance == other.m_instance; } + + bool operator!=(const Triplet& left, const Triplet& right) { return !(left == right); } + + Triplet Triplet::from_canonical_name(const std::string& triplet_as_string) + { + std::string s(Strings::ascii_to_lowercase(triplet_as_string)); + const auto it = std::find(s.cbegin(), s.cend(), '-'); + Checks::check_exit(VCPKG_LINE_INFO, it != s.cend(), "Invalid triplet: %s", triplet_as_string); + + const auto p = g_triplet_instances.emplace(std::move(s)); + return &*p.first; + } + + const std::string& Triplet::canonical_name() const { return this->m_instance->value; } + + const std::string& Triplet::to_string() const { return this->canonical_name(); } + size_t Triplet::hash_code() const { return m_instance->hash; } +} diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp new file mode 100644 index 000000000..168949bc1 --- /dev/null +++ b/toolsrc/src/vcpkg/update.cpp @@ -0,0 +1,75 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Update +{ + bool OutdatedPackage::compare_by_name(const OutdatedPackage& left, const OutdatedPackage& right) + { + return left.spec.name() < right.spec.name(); + } + + std::vector find_outdated_packages(const VcpkgPaths& paths, const StatusParagraphs& status_db) + { + const std::map src_names_to_versions = + Paragraphs::load_all_port_names_and_versions(paths.get_filesystem(), paths.ports); + const std::vector installed_packages = get_installed_ports(status_db); + + std::vector output; + for (const StatusParagraph* pgh : installed_packages) + { + const auto it = src_names_to_versions.find(pgh->package.spec.name()); + if (it == src_names_to_versions.end()) + { + // Package was not installed from portfile + continue; + } + if (it->second != pgh->package.version) + { + output.push_back({pgh->package.spec, VersionDiff(pgh->package.version, it->second)}); + } + } + + return output; + } + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + args.check_exact_arg_count(0); + args.check_and_get_optional_command_arguments({}); + System::println("Using local portfile versions. To update the local portfiles, use `git pull`."); + + const StatusParagraphs status_db = database_load_check(paths); + + const auto outdated_packages = + SortedVector(find_outdated_packages(paths, status_db), &OutdatedPackage::compare_by_name); + + if (outdated_packages.empty()) + { + System::println("No packages need updating."); + } + else + { + std::string install_line; + System::println("The following packages differ from their port versions:"); + for (auto&& package : outdated_packages) + { + install_line += package.spec.to_string(); + install_line += " "; + System::println(" %-32s %s", package.spec, package.version_diff.to_string()); + } + System::println("\n" + "To update these packages, run\n" + " .\\vcpkg remove --outdated\n" + " .\\vcpkg install " + + install_line); + } + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp new file mode 100644 index 000000000..522961693 --- /dev/null +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -0,0 +1,284 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include + +namespace vcpkg +{ + static void parse_value(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::println(System::Color::error, "Error: expected value after %s", option_name); + Metrics::g_metrics.lock()->track_property("error", "error option name"); + Help::print_usage(); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + if (option_field != nullptr) + { + System::println(System::Color::error, "Error: %s specified multiple times", 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(*arg_begin); + } + + static void parse_switch(bool new_setting, const std::string& option_name, Optional& option_field) + { + if (option_field && option_field != new_setting) + { + System::println(System::Color::error, "Error: conflicting values specified for --%s", option_name); + Metrics::g_metrics.lock()->track_property("error", "error conflicting switches"); + Help::print_usage(); + Checks::exit_fail(VCPKG_LINE_INFO); + } + option_field = new_setting; + } + + VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, const wchar_t* const* const argv) + { + std::vector v; + for (int i = 1; i < argc; ++i) + { + v.push_back(Strings::to_utf8(argv[i])); + } + + return VcpkgCmdArguments::create_from_arg_sequence(v.data(), v.data() + v.size()); + } + + VcpkgCmdArguments VcpkgCmdArguments::create_from_arg_sequence(const std::string* arg_begin, + const std::string* arg_end) + { + VcpkgCmdArguments args; + + for (; arg_begin != arg_end; ++arg_begin) + { + std::string arg = *arg_begin; + + if (arg.empty()) + { + continue; + } + + if (arg[0] == '-' && arg[1] != '-') + { + Metrics::g_metrics.lock()->track_property("error", "error short options are not supported"); + Checks::exit_with_message(VCPKG_LINE_INFO, "Error: short options are not supported: %s", arg); + } + + if (arg[0] == '-' && arg[1] == '-') + { + // make argument case insensitive + auto& f = std::use_facet>(std::locale()); + f.tolower(&arg[0], &arg[0] + arg.size()); + // command switch + if (arg == "--vcpkg-root") + { + ++arg_begin; + parse_value(arg_begin, arg_end, "--vcpkg-root", args.vcpkg_root_dir); + continue; + } + if (arg == "--triplet") + { + ++arg_begin; + parse_value(arg_begin, arg_end, "--triplet", args.triplet); + continue; + } + if (arg == "--debug") + { + parse_switch(true, "debug", args.debug); + continue; + } + if (arg == "--sendmetrics") + { + parse_switch(true, "sendmetrics", args.sendmetrics); + continue; + } + if (arg == "--printmetrics") + { + parse_switch(true, "printmetrics", args.printmetrics); + continue; + } + if (arg == "--no-sendmetrics") + { + parse_switch(false, "sendmetrics", args.sendmetrics); + continue; + } + if (arg == "--no-printmetrics") + { + parse_switch(false, "printmetrics", args.printmetrics); + continue; + } + if (arg == "--featurepackages") + { + GlobalState::feature_packages = true; + continue; + } + + 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)); + } + else + { + args.optional_command_arguments.emplace(arg, nullopt); + } + continue; + } + + if (args.command.empty()) + { + args.command = arg; + } + else + { + args.command_arguments.push_back(arg); + } + } + + return args; + } + + ParsedArguments VcpkgCmdArguments::check_and_get_optional_command_arguments( + const std::vector& valid_switches, const std::vector& valid_settings) const + { + bool failed = false; + ParsedArguments output; + + auto options_copy = this->optional_command_arguments; + for (const std::string& option : valid_switches) + { + const auto it = options_copy.find(option); + if (it != options_copy.end()) + { + if (it->second.has_value()) + { + // Having a string value indicates it was passed like '--a=xyz' + System::println(System::Color::error, "The option '%s' does not accept an argument.", option); + failed = true; + } + else + { + output.switches.insert(option); + options_copy.erase(it); + } + } + } + + for (const std::string& option : valid_settings) + { + const auto it = options_copy.find(option); + if (it != options_copy.end()) + { + if (!it->second.has_value()) + { + // Not having a string value indicates it was passed like '--a' + System::println(System::Color::error, "The option '%s' must be passed an argument.", option); + failed = true; + } + else + { + output.settings.emplace(option, it->second.value_or_exit(VCPKG_LINE_INFO)); + options_copy.erase(it); + } + } + } + + if (!options_copy.empty()) + { + System::println(System::Color::error, "Unknown option(s) for command '%s':", this->command); + for (auto&& option : options_copy) + { + System::println(" %s", option.first); + } + System::println("\nValid options are:", this->command); + for (auto&& option : valid_switches) + { + System::println(" %s", option); + } + for (auto&& option : valid_settings) + { + System::println(" %s=...", option); + } + System::println(" --triplet "); + System::println(" --vcpkg-root "); + + Checks::exit_fail(VCPKG_LINE_INFO); + } + if (failed) Checks::exit_fail(VCPKG_LINE_INFO); + + return output; + } + + void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count) const + { + return check_max_arg_count(expected_arg_count, Strings::EMPTY); + } + + void VcpkgCmdArguments::check_min_arg_count(const size_t expected_arg_count) const + { + return check_min_arg_count(expected_arg_count, Strings::EMPTY); + } + + void VcpkgCmdArguments::check_exact_arg_count(const size_t expected_arg_count) const + { + return check_exact_arg_count(expected_arg_count, Strings::EMPTY); + } + + void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const + { + const size_t actual_arg_count = command_arguments.size(); + if (actual_arg_count > expected_arg_count) + { + System::println(System::Color::error, + "Error: `%s` requires at most %u arguments, but %u were provided", + this->command, + expected_arg_count, + actual_arg_count); + System::print(example_text); + Checks::exit_fail(VCPKG_LINE_INFO); + } + } + + void VcpkgCmdArguments::check_min_arg_count(const size_t expected_arg_count, const std::string& example_text) const + { + const size_t actual_arg_count = command_arguments.size(); + if (actual_arg_count < expected_arg_count) + { + System::println(System::Color::error, + "Error: `%s` requires at least %u arguments, but %u were provided", + this->command, + expected_arg_count, + actual_arg_count); + System::print(example_text); + Checks::exit_fail(VCPKG_LINE_INFO); + } + } + + void VcpkgCmdArguments::check_exact_arg_count(const size_t expected_arg_count, + const std::string& example_text) const + { + const size_t actual_arg_count = command_arguments.size(); + if (actual_arg_count != expected_arg_count) + { + System::println(System::Color::error, + "Error: `%s` requires %u arguments, but %u were provided", + this->command, + expected_arg_count, + actual_arg_count); + System::print(example_text); + Checks::exit_fail(VCPKG_LINE_INFO); + } + } +} diff --git a/toolsrc/src/vcpkg/vcpkglib.cpp b/toolsrc/src/vcpkg/vcpkglib.cpp new file mode 100644 index 000000000..23c774210 --- /dev/null +++ b/toolsrc/src/vcpkg/vcpkglib.cpp @@ -0,0 +1,247 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include + +namespace vcpkg +{ + static StatusParagraphs load_current_database(Files::Filesystem& fs, + const fs::path& vcpkg_dir_status_file, + const fs::path& vcpkg_dir_status_file_old) + { + if (!fs.exists(vcpkg_dir_status_file)) + { + if (!fs.exists(vcpkg_dir_status_file_old)) + { + // no status file, use empty db + return StatusParagraphs(); + } + + fs.rename(vcpkg_dir_status_file_old, vcpkg_dir_status_file); + } + + auto pghs = Paragraphs::get_paragraphs(fs, vcpkg_dir_status_file).value_or_exit(VCPKG_LINE_INFO); + + std::vector> status_pghs; + for (auto&& p : pghs) + { + status_pghs.push_back(std::make_unique(std::move(p))); + } + + return StatusParagraphs(std::move(status_pghs)); + } + + StatusParagraphs database_load_check(const VcpkgPaths& paths) + { + auto& fs = paths.get_filesystem(); + + const auto updates_dir = paths.vcpkg_dir_updates; + + std::error_code ec; + fs.create_directory(paths.installed, ec); + fs.create_directory(paths.vcpkg_dir, ec); + fs.create_directory(paths.vcpkg_dir_info, ec); + fs.create_directory(updates_dir, ec); + + const fs::path& status_file = paths.vcpkg_dir_status_file; + const fs::path status_file_old = status_file.parent_path() / "status-old"; + const fs::path status_file_new = status_file.parent_path() / "status-new"; + + StatusParagraphs current_status_db = load_current_database(fs, status_file, status_file_old); + + auto update_files = fs.get_files_non_recursive(updates_dir); + if (update_files.empty()) + { + // updates directory is empty, control file is up-to-date. + return current_status_db; + } + for (auto&& file : update_files) + { + if (!fs.is_regular_file(file)) continue; + if (file.filename() == "incomplete") continue; + + auto pghs = Paragraphs::get_paragraphs(fs, file).value_or_exit(VCPKG_LINE_INFO); + for (auto&& p : pghs) + { + current_status_db.insert(std::make_unique(std::move(p))); + } + } + + fs.write_contents(status_file_new, Strings::serialize(current_status_db)); + + fs.rename(status_file_new, status_file); + + for (auto&& file : update_files) + { + if (!fs.is_regular_file(file)) continue; + + fs.remove(file); + } + + return current_status_db; + } + + void write_update(const VcpkgPaths& paths, const StatusParagraph& p) + { + static int update_id = 0; + auto& fs = paths.get_filesystem(); + + const auto my_update_id = update_id++; + const auto tmp_update_filename = paths.vcpkg_dir_updates / "incomplete"; + const auto update_filename = paths.vcpkg_dir_updates / std::to_string(my_update_id); + + fs.write_contents(tmp_update_filename, Strings::serialize(p)); + fs.rename(tmp_update_filename, update_filename); + } + + static void upgrade_to_slash_terminated_sorted_format(Files::Filesystem& fs, + std::vector* lines, + const fs::path& listfile_path) + { + static bool was_tracked = false; + + if (lines->empty()) + { + return; + } + + if (lines->at(0).back() == '/') + { + return; // File already in the new format + } + + if (!was_tracked) + { + was_tracked = true; + Metrics::g_metrics.lock()->track_property("listfile", "update to new format"); + } + + // The files are sorted such that directories are placed just before the files they contain + // (They are not necessarily sorted alphabetically, e.g. libflac) + // Therefore we can detect the entries that represent directories by comparing every element with the next one + // and checking if the next has a slash immediately after the current one's length + for (size_t i = 0; i < lines->size() - 1; i++) + { + std::string& current_string = lines->at(i); + const std::string& next_string = lines->at(i + 1); + + const size_t potential_slash_char_index = current_string.length(); + // Make sure the index exists first + if (next_string.size() > potential_slash_char_index && next_string.at(potential_slash_char_index) == '/') + { + current_string += '/'; // Mark as a directory + } + } + + // After suffixing the directories with a slash, we can now sort. + // We cannot sort before adding the suffixes because the following (actual example): + /* + x86-windows/include/FLAC <<<<<< This would be separated from its group due to sorting + x86-windows/include/FLAC/all.h + x86-windows/include/FLAC/assert.h + x86-windows/include/FLAC/callback.h + x86-windows/include/FLAC++ + x86-windows/include/FLAC++/all.h + x86-windows/include/FLAC++/decoder.h + x86-windows/include/FLAC++/encoder.h + * + x86-windows/include/FLAC/ <<<<<< This will now be kept with its group when sorting + x86-windows/include/FLAC/all.h + x86-windows/include/FLAC/assert.h + x86-windows/include/FLAC/callback.h + x86-windows/include/FLAC++/ + x86-windows/include/FLAC++/all.h + x86-windows/include/FLAC++/decoder.h + x86-windows/include/FLAC++/encoder.h + */ + // Note that after sorting, the FLAC++/ group will be placed before the FLAC/ group + // The new format is lexicographically sorted + std::sort(lines->begin(), lines->end()); + + // Replace the listfile on disk + const fs::path updated_listfile_path = listfile_path.generic_string() + "_updated"; + fs.write_lines(updated_listfile_path, *lines); + fs.rename(updated_listfile_path, listfile_path); + } + + std::vector get_installed_ports(const StatusParagraphs& status_db) + { + std::vector installed_packages; + for (auto&& pgh : status_db) + { + if (pgh->state != InstallState::INSTALLED || pgh->want != Want::INSTALL) continue; + installed_packages.push_back(pgh.get()); + } + + return installed_packages; + } + + std::vector get_installed_files(const VcpkgPaths& paths, + const StatusParagraphs& status_db) + { + auto& fs = paths.get_filesystem(); + + std::vector installed_files; + + for (const std::unique_ptr& pgh : status_db) + { + if (pgh->state != InstallState::INSTALLED || !pgh->package.feature.empty()) + { + continue; + } + + const fs::path listfile_path = paths.listfile_path(pgh->package); + std::vector installed_files_of_current_pgh = + fs.read_lines(listfile_path).value_or_exit(VCPKG_LINE_INFO); + Strings::trim_all_and_remove_whitespace_strings(&installed_files_of_current_pgh); + upgrade_to_slash_terminated_sorted_format(fs, &installed_files_of_current_pgh, listfile_path); + + // Remove the directories + Util::erase_remove_if(installed_files_of_current_pgh, + [](const std::string& file) { return file.back() == '/'; }); + + StatusParagraphAndAssociatedFiles pgh_and_files = { + *pgh, SortedVector(std::move(installed_files_of_current_pgh))}; + installed_files.push_back(std::move(pgh_and_files)); + } + + return installed_files; + } + + CMakeVariable::CMakeVariable(const CWStringView varname, const wchar_t* varvalue) + : s(Strings::wformat(LR"("-D%s=%s")", varname, varvalue)) + { + } + CMakeVariable::CMakeVariable(const CWStringView varname, const std::string& varvalue) + : CMakeVariable(varname, Strings::to_utf16(varvalue).c_str()) + { + } + CMakeVariable::CMakeVariable(const CWStringView varname, const std::wstring& varvalue) + : CMakeVariable(varname, varvalue.c_str()) + { + } + CMakeVariable::CMakeVariable(const CWStringView varname, const fs::path& path) + : CMakeVariable(varname, path.generic_wstring()) + { + } + + std::wstring make_cmake_cmd(const fs::path& cmake_exe, + const fs::path& cmake_script, + const std::vector& pass_variables) + { + const std::wstring cmd_cmake_pass_variables = Strings::join(L" ", pass_variables, [](auto&& v) { return v.s; }); + return Strings::wformat( + LR"("%s" %s -P "%s")", cmake_exe.native(), cmd_cmake_pass_variables, cmake_script.generic_wstring()); + } + + std::string shorten_text(const std::string& desc, size_t length) + { + Checks::check_exit(VCPKG_LINE_INFO, length >= 3); + auto simple_desc = std::regex_replace(desc, std::regex("\\s+"), " "); + return simple_desc.size() <= length ? simple_desc : simple_desc.substr(0, length - 3) + "..."; + } +} diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp new file mode 100644 index 000000000..e1a4acd69 --- /dev/null +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -0,0 +1,519 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace vcpkg +{ + static constexpr CWStringView V_120 = L"v120"; + static constexpr CWStringView V_140 = L"v140"; + static constexpr CWStringView V_141 = L"v141"; + + static bool exists_and_has_equal_or_greater_version(const std::wstring& version_cmd, + const std::array& expected_version) + { + static const std::regex RE(R"###((\d+)\.(\d+)\.(\d+))###"); + + const auto rc = System::cmd_execute_and_capture_output(Strings::wformat(LR"(%s)", version_cmd)); + if (rc.exit_code != 0) + { + return false; + } + + std::match_results match; + const auto found = std::regex_search(rc.output, match, RE); + if (!found) + { + return false; + } + + const int d1 = atoi(match[1].str().c_str()); + const int d2 = atoi(match[2].str().c_str()); + const int d3 = atoi(match[3].str().c_str()); + if (d1 > expected_version[0] || (d1 == expected_version[0] && d2 > expected_version[1]) || + (d1 == expected_version[0] && d2 == expected_version[1] && d3 >= expected_version[2])) + { + // satisfactory version found + return true; + } + + return false; + } + + static Optional find_if_has_equal_or_greater_version(const std::vector& candidate_paths, + const std::wstring& version_check_arguments, + const std::array& expected_version) + { + auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { + const std::wstring cmd = Strings::wformat(LR"("%s" %s)", p.native(), version_check_arguments); + return exists_and_has_equal_or_greater_version(cmd, expected_version); + }); + + if (it != candidate_paths.cend()) + { + return std::move(*it); + } + + return nullopt; + } + + static fs::path fetch_dependency(const fs::path& scripts_folder, + const std::wstring& tool_name, + const fs::path& expected_downloaded_path, + const std::array& version) + { + const std::string tool_name_utf8 = Strings::to_utf8(tool_name); + const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); + System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", + tool_name_utf8, + version_as_string, + tool_name_utf8, + version_as_string); + const fs::path script = scripts_folder / "fetchDependency.ps1"; + const auto install_cmd = + System::create_powershell_script_cmd(script, Strings::wformat(L"-Dependency %s", tool_name)); + const System::ExitCodeAndOutput rc = System::cmd_execute_and_capture_output(install_cmd); + if (rc.exit_code) + { + System::println(System::Color::error, + "Launching powershell failed or was denied when trying to fetch %s version %s.\n" + "(No sufficient installed version was found)", + tool_name_utf8, + version_as_string); + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_property("error", "powershell install failed"); + locked_metrics->track_property("dependency", tool_name); + } + Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); + } + + const fs::path actual_downloaded_path = Strings::trimmed(rc.output); + std::error_code ec; + const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + eq && !ec, + "Expected dependency downloaded path to be %s, but was %s", + expected_downloaded_path.u8string(), + actual_downloaded_path.u8string()); + return actual_downloaded_path; + } + + static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) + { + static constexpr std::array EXPECTED_VERSION = {3, 9, 3}; + static const std::wstring VERSION_CHECK_ARGUMENTS = L"--version"; + + const fs::path downloaded_copy = downloads_folder / "cmake-3.9.3-win32-x86" / "bin" / "cmake.exe"; + const std::vector from_path = Files::find_from_PATH(L"cmake"); + + std::vector candidate_paths; + candidate_paths.push_back(downloaded_copy); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + candidate_paths.push_back(System::get_program_files_platform_bitness() / "CMake" / "bin" / "cmake.exe"); + candidate_paths.push_back(System::get_program_files_32_bit() / "CMake" / "bin"); + + const Optional path = + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); + if (const auto p = path.get()) + { + return *p; + } + + return fetch_dependency(scripts_folder, L"cmake", downloaded_copy, EXPECTED_VERSION); + } + + fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder) + { + static constexpr std::array EXPECTED_VERSION = {4, 3, 0}; + static const std::wstring VERSION_CHECK_ARGUMENTS = Strings::WEMPTY; + + const fs::path downloaded_copy = downloads_folder / "nuget-4.3.0" / "nuget.exe"; + const std::vector from_path = Files::find_from_PATH(L"nuget"); + + std::vector candidate_paths; + candidate_paths.push_back(downloaded_copy); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + + auto path = find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); + if (const auto p = path.get()) + { + return *p; + } + + return fetch_dependency(scripts_folder, L"nuget", downloaded_copy, EXPECTED_VERSION); + } + + fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) + { + static constexpr std::array EXPECTED_VERSION = {2, 14, 1}; + static const std::wstring VERSION_CHECK_ARGUMENTS = L"--version"; + + const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.1-32-bit" / "cmd" / "git.exe"; + const std::vector from_path = Files::find_from_PATH(L"git"); + + std::vector candidate_paths; + candidate_paths.push_back(downloaded_copy); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + candidate_paths.push_back(System::get_program_files_platform_bitness() / "git" / "cmd" / "git.exe"); + candidate_paths.push_back(System::get_program_files_32_bit() / "git" / "cmd" / "git.exe"); + + const Optional path = + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); + if (const auto p = path.get()) + { + return *p; + } + + return fetch_dependency(scripts_folder, L"git", downloaded_copy, EXPECTED_VERSION); + } + + static fs::path get_ifw_installerbase_path(const fs::path& downloads_folder, const fs::path& scripts_folder) + { + static constexpr std::array EXPECTED_VERSION = {3, 1, 81}; + static const std::wstring VERSION_CHECK_ARGUMENTS = L"--framework-version"; + + const fs::path downloaded_copy = + downloads_folder / "QtInstallerFramework-win-x86" / "bin" / "installerbase.exe"; + + std::vector candidate_paths; + candidate_paths.push_back(downloaded_copy); + // TODO: Uncomment later + // const std::vector from_path = Files::find_from_PATH(L"installerbase"); + // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + // candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / + // "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe"); + // candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / + // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); + + const Optional path = + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); + if (const auto p = path.get()) + { + return *p; + } + + return fetch_dependency(scripts_folder, L"installerbase", downloaded_copy, EXPECTED_VERSION); + } + + Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir) + { + std::error_code ec; + const fs::path canonical_vcpkg_root_dir = fs::stdfs::canonical(vcpkg_root_dir, ec); + if (ec) + { + return ec; + } + + VcpkgPaths paths; + paths.root = canonical_vcpkg_root_dir; + + if (paths.root.empty()) + { + Metrics::g_metrics.lock()->track_property("error", "Invalid vcpkg root directory"); + Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid vcpkg root directory: %s", paths.root.string()); + } + + paths.packages = paths.root / "packages"; + paths.buildtrees = paths.root / "buildtrees"; + paths.downloads = paths.root / "downloads"; + paths.ports = paths.root / "ports"; + paths.installed = paths.root / "installed"; + paths.triplets = paths.root / "triplets"; + paths.scripts = paths.root / "scripts"; + + paths.buildsystems = paths.scripts / "buildsystems"; + paths.buildsystems_msbuild_targets = paths.buildsystems / "msbuild" / "vcpkg.targets"; + + paths.vcpkg_dir = paths.installed / "vcpkg"; + paths.vcpkg_dir_status_file = paths.vcpkg_dir / "status"; + paths.vcpkg_dir_info = paths.vcpkg_dir / "info"; + paths.vcpkg_dir_updates = paths.vcpkg_dir / "updates"; + + paths.ports_cmake = paths.scripts / "ports.cmake"; + + return paths; + } + + 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"; + } + + fs::path VcpkgPaths::listfile_path(const BinaryParagraph& pgh) const + { + return this->vcpkg_dir_info / (pgh.fullstem() + ".list"); + } + + bool VcpkgPaths::is_valid_triplet(const Triplet& t) const + { + for (auto&& path : get_filesystem().get_files_non_recursive(this->triplets)) + { + const std::string triplet_file_name = path.stem().generic_u8string(); + if (t.canonical_name() == triplet_file_name) // TODO: fuzzy compare + { + // t.value = triplet_file_name; // NOTE: uncomment when implementing fuzzy compare + return true; + } + } + return false; + } + + const fs::path& VcpkgPaths::get_cmake_exe() const + { + return this->cmake_exe.get_lazy([this]() { return get_cmake_path(this->downloads, this->scripts); }); + } + + const fs::path& VcpkgPaths::get_git_exe() const + { + return this->git_exe.get_lazy([this]() { return get_git_path(this->downloads, this->scripts); }); + } + + const fs::path& VcpkgPaths::get_nuget_exe() const + { + return this->nuget_exe.get_lazy([this]() { return get_nuget_path(this->downloads, this->scripts); }); + } + + const fs::path& VcpkgPaths::get_ifw_installerbase_exe() const + { + return this->ifw_installerbase_exe.get_lazy( + [this]() { return get_ifw_installerbase_path(this->downloads, this->scripts); }); + } + + const fs::path& VcpkgPaths::get_ifw_binarycreator_exe() const + { + return this->ifw_binarycreator_exe.get_lazy( + [this]() { return get_ifw_installerbase_exe().parent_path() / "binarycreator.exe"; }); + } + + const fs::path& VcpkgPaths::get_ifw_repogen_exe() const + { + return this->ifw_repogen_exe.get_lazy( + [this]() { return get_ifw_installerbase_exe().parent_path() / "repogen.exe"; }); + } + + struct VisualStudioInstance + { + fs::path root_path; + std::string version; + std::string release_type; + std::string preference_weight; // Mostly unused, just for verification that order is as intended + + std::string major_version() const { return version.substr(0, 2); } + }; + + static std::vector get_visual_studio_instances(const VcpkgPaths& paths) + { + const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; + const std::wstring cmd = System::create_powershell_script_cmd(script); + const System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd); + Checks::check_exit( + VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances"); + + const std::vector instances_as_strings = Strings::split(ec_data.output, "\n"); + std::vector output; + for (const std::string& instance_as_string : instances_as_strings) + { + const std::vector split = Strings::split(instance_as_string, "::"); + output.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); + } + + return output; + } + + static std::vector find_toolset_instances(const VcpkgPaths& paths) + { + using CPU = System::CPUArchitecture; + + const auto& fs = paths.get_filesystem(); + + // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations. + std::vector paths_examined; + + std::vector found_toolsets; + + const std::vector vs_instances = get_visual_studio_instances(paths); + const bool v140_is_available = Util::find_if(vs_instances, [&](const VisualStudioInstance& vs_instance) { + return vs_instance.major_version() == "14"; + }) != vs_instances.cend(); + + for (const VisualStudioInstance& vs_instance : vs_instances) + { + const std::string major_version = vs_instance.major_version(); + if (major_version == "15") + { + const fs::path vc_dir = vs_instance.root_path / "VC"; + + // Skip any instances that do not have vcvarsall. + const fs::path vcvarsall_dir = vc_dir / "Auxiliary" / "Build"; + const fs::path vcvarsall_bat = vcvarsall_dir / "vcvarsall.bat"; + paths_examined.push_back(vcvarsall_bat); + if (!fs.exists(vcvarsall_bat)) continue; + + // Get all supported architectures + std::vector supported_architectures; + if (fs.exists(vcvarsall_dir / "vcvars32.bat")) + supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); + if (fs.exists(vcvarsall_dir / "vcvars64.bat")) + supported_architectures.push_back({L"amd64", CPU::X64, CPU::X64}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) + supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) + supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) + supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) + supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + + // Locate the "best" MSVC toolchain version + const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; + std::vector msvc_subdirectories = fs.get_files_non_recursive(msvc_path); + Util::unstable_keep_if(msvc_subdirectories, + [&fs](const fs::path& path) { return fs.is_directory(path); }); + + // Sort them so that latest comes first + std::sort( + msvc_subdirectories.begin(), + msvc_subdirectories.end(), + [](const fs::path& left, const fs::path& right) { return left.filename() > right.filename(); }); + + for (const fs::path& subdir : msvc_subdirectories) + { + const fs::path dumpbin_path = subdir / "bin" / "HostX86" / "x86" / "dumpbin.exe"; + paths_examined.push_back(dumpbin_path); + if (fs.exists(dumpbin_path)) + { + found_toolsets.push_back(Toolset{ + vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}); + + if (v140_is_available) + { + found_toolsets.push_back(Toolset{vs_instance.root_path, + dumpbin_path, + vcvarsall_bat, + {L"-vcvars_ver=14.0"}, + V_140, + supported_architectures}); + } + + break; + } + } + + continue; + } + + if (major_version == "14") + { + const fs::path vcvarsall_bat = vs_instance.root_path / "VC" / "vcvarsall.bat"; + + paths_examined.push_back(vcvarsall_bat); + if (fs.exists(vcvarsall_bat)) + { + const fs::path vs2015_dumpbin_exe = vs_instance.root_path / "VC" / "bin" / "dumpbin.exe"; + paths_examined.push_back(vs2015_dumpbin_exe); + + const fs::path vs2015_bin_dir = vcvarsall_bat.parent_path() / "bin"; + std::vector supported_architectures; + if (fs.exists(vs2015_bin_dir / "vcvars32.bat")) + supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); + if (fs.exists(vs2015_bin_dir / "amd64\\vcvars64.bat")) + supported_architectures.push_back({L"x64", CPU::X64, CPU::X64}); + if (fs.exists(vs2015_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) + supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); + if (fs.exists(vs2015_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) + supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); + if (fs.exists(vs2015_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) + supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); + if (fs.exists(vs2015_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) + supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + + if (fs.exists(vs2015_dumpbin_exe)) + { + found_toolsets.push_back({vs_instance.root_path, + vs2015_dumpbin_exe, + vcvarsall_bat, + {}, + V_140, + supported_architectures}); + } + } + } + } + + if (found_toolsets.empty()) + { + System::println(System::Color::error, "Could not locate a complete toolset."); + System::println("The following paths were examined:"); + for (const fs::path& path : paths_examined) + { + System::println(" %s", path.u8string()); + } + Checks::exit_fail(VCPKG_LINE_INFO); + } + + return found_toolsets; + } + + const Toolset& VcpkgPaths::get_toolset(const Optional& toolset_version, + const Optional& visual_studio_path) const + { + // Invariant: toolsets are non-empty and sorted with newest at back() + const std::vector& vs_toolsets = + this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); }); + + std::vector candidates = Util::element_pointers(vs_toolsets); + const auto tsv = toolset_version.get(); + const auto vsp = visual_studio_path.get(); + + if (tsv && vsp) + { + const std::wstring w_toolset_version = Strings::to_utf16(*tsv); + const fs::path vs_root_path = *vsp; + Util::stable_keep_if(candidates, [&](const Toolset* t) { + return w_toolset_version == t->version && vs_root_path == t->visual_studio_root_path; + }); + Checks::check_exit(VCPKG_LINE_INFO, + !candidates.empty(), + "Could not find Visual Studio instace at %s with %s toolset.", + vs_root_path.generic_string(), + *tsv); + + Checks::check_exit(VCPKG_LINE_INFO, candidates.size() == 1); + return *candidates.back(); + } + + if (tsv) + { + const std::wstring w_toolset_version = Strings::to_utf16(*tsv); + Util::stable_keep_if(candidates, [&](const Toolset* t) { return w_toolset_version == t->version; }); + Checks::check_exit( + VCPKG_LINE_INFO, !candidates.empty(), "Could not find Visual Studio instace with %s toolset.", *tsv); + } + + if (vsp) + { + const fs::path vs_root_path = *vsp; + Util::stable_keep_if(candidates, + [&](const Toolset* t) { return vs_root_path == t->visual_studio_root_path; }); + Checks::check_exit(VCPKG_LINE_INFO, + !candidates.empty(), + "Could not find Visual Studio instace at %s.", + vs_root_path.generic_string()); + } + + return *candidates.front(); + } + + Files::Filesystem& VcpkgPaths::get_filesystem() const { return Files::get_real_filesystem(); } +} diff --git a/toolsrc/src/vcpkg/versiont.cpp b/toolsrc/src/vcpkg/versiont.cpp new file mode 100644 index 000000000..1c52d674a --- /dev/null +++ b/toolsrc/src/vcpkg/versiont.cpp @@ -0,0 +1,19 @@ +#include "pch.h" + +#include +#include + +namespace vcpkg +{ + VersionT::VersionT() : value("0.0.0") {} + VersionT::VersionT(const std::string& value) : value(value) {} + std::string VersionT::to_string() const { return value; } + bool operator==(const VersionT& left, const VersionT& right) { return left.value == right.value; } + bool operator!=(const VersionT& left, const VersionT& right) { return left.value != right.value; } + std::string to_printf_arg(const VersionT& version) { return version.value; } + + VersionDiff::VersionDiff() : left(), right() {} + VersionDiff::VersionDiff(const VersionT& left, const VersionT& right) : left(left), right(right) {} + + std::string VersionDiff::to_string() const { return Strings::format("%s -> %s", left.value, right.value); } +} diff --git a/toolsrc/src/vcpkg_Build.cpp b/toolsrc/src/vcpkg_Build.cpp deleted file mode 100644 index 9be20629d..000000000 --- a/toolsrc/src/vcpkg_Build.cpp +++ /dev/null @@ -1,406 +0,0 @@ -#include "pch.h" - -#include "Paragraphs.h" -#include "PostBuildLint.h" -#include "metrics.h" -#include "vcpkg_Build.h" -#include "vcpkg_Checks.h" -#include "vcpkg_Chrono.h" -#include "vcpkg_Commands.h" -#include "vcpkg_Enums.h" -#include "vcpkg_GlobalState.h" -#include "vcpkg_System.h" -#include "vcpkg_optional.h" -#include "vcpkglib.h" - -namespace vcpkg::Build -{ - Optional to_linkage_type(const std::string& str) - { - if (str == "dynamic") return LinkageType::DYNAMIC; - if (str == "static") return LinkageType::STATIC; - return nullopt; - } - - namespace BuildInfoRequiredField - { - static const std::string CRT_LINKAGE = "CRTLinkage"; - static const std::string LIBRARY_LINKAGE = "LibraryLinkage"; - } - - CWStringView to_vcvarsall_target(const std::string& cmake_system_name) - { - if (cmake_system_name == Strings::EMPTY) return Strings::WEMPTY; - if (cmake_system_name == "Windows") return Strings::WEMPTY; - if (cmake_system_name == "WindowsStore") return L"store"; - - Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported vcvarsall target %s", cmake_system_name); - } - - CWStringView to_vcvarsall_toolchain(const std::string& target_architecture, const Toolset& toolset) - { - auto maybe_target_arch = System::to_cpu_architecture(target_architecture); - Checks::check_exit( - VCPKG_LINE_INFO, maybe_target_arch.has_value(), "Invalid architecture string: %s", target_architecture); - auto target_arch = maybe_target_arch.value_or_exit(VCPKG_LINE_INFO); - auto host_architectures = System::get_supported_host_architectures(); - - for (auto&& host : host_architectures) - { - auto it = Util::find_if(toolset.supported_architectures, [&](const ToolsetArchOption& opt) { - return host == opt.host_arch && target_arch == opt.target_arch; - }); - if (it != toolset.supported_architectures.end()) return it->name; - } - - Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported toolchain combination %s", target_architecture); - } - - std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) - { - const wchar_t* tonull = L" >nul"; - if (GlobalState::debugging) - { - tonull = Strings::WEMPTY; - } - - const auto arch = to_vcvarsall_toolchain(pre_build_info.target_architecture, toolset); - const auto target = to_vcvarsall_target(pre_build_info.cmake_system_name); - - return Strings::wformat(LR"("%s" %s %s %s %s 2>&1)", - toolset.vcvarsall.native(), - Strings::join(L" ", toolset.vcvarsall_options), - arch, - target, - tonull); - } - - static void create_binary_feature_control_file(const SourceParagraph& source_paragraph, - const FeatureParagraph& feature_paragraph, - const Triplet& triplet, - BinaryControlFile& bcf) - { - BinaryParagraph bpgh(source_paragraph, feature_paragraph, triplet); - bcf.features.emplace_back(std::move(bpgh)); - } - - static void create_binary_control_file(const SourceParagraph& source_paragraph, - const Triplet& triplet, - const BuildInfo& build_info, - BinaryControlFile& bcf) - { - BinaryParagraph bpgh(source_paragraph, triplet); - if (const auto p_ver = build_info.version.get()) - { - bpgh.version = *p_ver; - } - bcf.core_paragraph = std::move(bpgh); - } - - static void write_binary_control_file(const VcpkgPaths& paths, BinaryControlFile bcf) - { - std::string start = Strings::serialize(bcf.core_paragraph); - for (auto&& feature : bcf.features) - { - start += "\n" + Strings::serialize(feature); - } - const fs::path binary_control_file = paths.packages / bcf.core_paragraph.dir() / "CONTROL"; - paths.get_filesystem().write_contents(binary_control_file, start); - } - - ExtendedBuildResult build_package(const VcpkgPaths& paths, - const BuildPackageConfig& config, - const StatusParagraphs& status_db) - { - const PackageSpec spec = - PackageSpec::from_name_and_triplet(config.src.name, config.triplet).value_or_exit(VCPKG_LINE_INFO); - - const Triplet& triplet = config.triplet; - { - std::vector missing_specs; - for (auto&& dep : filter_dependencies(config.src.depends, triplet)) - { - if (status_db.find_installed(dep, triplet) == status_db.end()) - { - missing_specs.push_back( - PackageSpec::from_name_and_triplet(dep, triplet).value_or_exit(VCPKG_LINE_INFO)); - } - } - // Fail the build if any dependencies were missing - if (!missing_specs.empty()) - { - return {BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES, std::move(missing_specs)}; - } - } - - const fs::path& cmake_exe_path = paths.get_cmake_exe(); - const fs::path& git_exe_path = paths.get_git_exe(); - - const fs::path ports_cmake_script_path = paths.ports_cmake; - const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); - const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); - const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); - - std::string features; - if (GlobalState::feature_packages) - { - if (config.feature_list) - { - for (auto&& feature : *config.feature_list) - { - features.append(feature + ";"); - } - if (features.size() > 0) - { - features.pop_back(); - } - } - } - - const std::wstring cmd_launch_cmake = make_cmake_cmd( - cmake_exe_path, - ports_cmake_script_path, - { - {L"CMD", L"BUILD"}, - {L"PORT", config.src.name}, - {L"CURRENT_PORT_DIR", config.port_dir / "/."}, - {L"TARGET_TRIPLET", triplet.canonical_name()}, - {L"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, - {L"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? L"1" : L"0"}, - {L"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? L"1" : L"0"}, - {L"GIT", git_exe_path}, - {L"FEATURES", features}, - }); - - const std::wstring command = Strings::wformat(LR"(%s && %s)", cmd_set_environment, cmd_launch_cmake); - - const ElapsedTime timer = ElapsedTime::create_started(); - - const int return_code = System::cmd_execute_clean(command); - const auto buildtimeus = timer.microseconds(); - const auto spec_string = spec.to_string(); - - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_metric("buildtimeus-" + spec_string, buildtimeus); - if (return_code != 0) - { - locked_metrics->track_property("error", "build failed"); - locked_metrics->track_property("build_error", spec_string); - return {BuildResult::BUILD_FAILED, {}}; - } - } - - const BuildInfo build_info = 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); - - BinaryControlFile bcf; - - create_binary_control_file(config.src, triplet, build_info, bcf); - - if (error_count != 0) - { - return {BuildResult::POST_BUILD_CHECKS_FAILED, {}}; - } - if (GlobalState::feature_packages) - { - if (config.feature_list) - { - for (auto&& feature : *config.feature_list) - { - for (auto&& f_pgh : config.scf->feature_paragraphs) - { - if (f_pgh->name == feature) - create_binary_feature_control_file(*config.scf->core_paragraph, *f_pgh, triplet, bcf); - } - } - } - } - - write_binary_control_file(paths, bcf); - - // const fs::path port_buildtrees_dir = paths.buildtrees / spec.name; - // delete_directory(port_buildtrees_dir); - - return {BuildResult::SUCCEEDED, {}}; - } - - const std::string& to_string(const BuildResult build_result) - { - static const std::string NULLVALUE_STRING = Enums::nullvalue_to_string("vcpkg::Commands::Build::BuildResult"); - static const std::string SUCCEEDED_STRING = "SUCCEEDED"; - static const std::string BUILD_FAILED_STRING = "BUILD_FAILED"; - static const std::string FILE_CONFLICTS_STRING = "FILE_CONFLICTS"; - static const std::string POST_BUILD_CHECKS_FAILED_STRING = "POST_BUILD_CHECKS_FAILED"; - static const std::string CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING = "CASCADED_DUE_TO_MISSING_DEPENDENCIES"; - - switch (build_result) - { - case BuildResult::NULLVALUE: return NULLVALUE_STRING; - case BuildResult::SUCCEEDED: return SUCCEEDED_STRING; - case BuildResult::BUILD_FAILED: return BUILD_FAILED_STRING; - case BuildResult::POST_BUILD_CHECKS_FAILED: return POST_BUILD_CHECKS_FAILED_STRING; - case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: return CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING; - case BuildResult::FILE_CONFLICTS: return FILE_CONFLICTS_STRING; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - - std::string create_error_message(const BuildResult build_result, const PackageSpec& spec) - { - return Strings::format("Error: Building package %s failed with: %s", spec, Build::to_string(build_result)); - } - - std::string create_user_troubleshooting_message(const PackageSpec& spec) - { - return Strings::format("Please ensure you're using the latest portfiles with `.\\vcpkg update`, then\n" - "submit an issue at https://github.com/Microsoft/vcpkg/issues including:\n" - " Package: %s\n" - " Vcpkg version: %s\n" - "\n" - "Additionally, attach any relevant sections from the log files above.", - spec, - Commands::Version::version()); - } - - static BuildInfo inner_create_buildinfo(std::unordered_map pgh) - { - Parse::ParagraphParser parser(std::move(pgh)); - - BuildInfo build_info; - - { - std::string crt_linkage_as_string; - parser.required_field(BuildInfoRequiredField::CRT_LINKAGE, crt_linkage_as_string); - - auto crtlinkage = to_linkage_type(crt_linkage_as_string); - if (const auto p = crtlinkage.get()) - build_info.crt_linkage = *p; - else - Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid crt linkage type: [%s]", crt_linkage_as_string); - } - - { - std::string library_linkage_as_string; - parser.required_field(BuildInfoRequiredField::LIBRARY_LINKAGE, library_linkage_as_string); - auto liblinkage = to_linkage_type(library_linkage_as_string); - if (const auto p = liblinkage.get()) - build_info.library_linkage = *p; - else - Checks::exit_with_message( - VCPKG_LINE_INFO, "Invalid library linkage type: [%s]", library_linkage_as_string); - } - std::string version = parser.optional_field("Version"); - if (!version.empty()) build_info.version = std::move(version); - - std::map policies; - for (auto policy : G_ALL_POLICIES) - { - const auto setting = parser.optional_field(to_string(policy)); - if (setting.empty()) continue; - if (setting == "enabled") - policies.emplace(policy, true); - else if (setting == "disabled") - policies.emplace(policy, false); - else - Checks::exit_with_message( - VCPKG_LINE_INFO, "Unknown setting for policy '%s': %s", to_string(policy), setting); - } - - if (const auto err = parser.error_info("PostBuildInformation")) - { - print_error_message(err); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - build_info.policies = BuildPolicies(std::move(policies)); - - return build_info; - } - - BuildInfo read_build_info(const Files::Filesystem& fs, const fs::path& filepath) - { - const Expected> pghs = - Paragraphs::get_single_paragraph(fs, filepath); - Checks::check_exit(VCPKG_LINE_INFO, pghs.get() != nullptr, "Invalid BUILD_INFO file for package"); - return inner_create_buildinfo(*pghs.get()); - } - - PreBuildInfo PreBuildInfo::from_triplet_file(const VcpkgPaths& paths, const Triplet& triplet) - { - static constexpr CStringView FLAG_GUID = "c35112b6-d1ba-415b-aa5d-81de856ef8eb"; - - const fs::path& cmake_exe_path = paths.get_cmake_exe(); - 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 std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe_path, - ports_cmake_script_path, - { - {L"CMAKE_TRIPLET_FILE", triplet_file_path}, - }); - - const std::wstring command = Strings::wformat(LR"(%s)", cmd_launch_cmake); - const auto ec_data = System::cmd_execute_and_capture_output(command); - Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0); - - const std::vector lines = Strings::split(ec_data.output, "\n"); - - PreBuildInfo pre_build_info; - - const auto e = lines.cend(); - auto cur = std::find(lines.cbegin(), e, FLAG_GUID); - if (cur != e) ++cur; - - for (; cur != e; ++cur) - { - auto&& line = *cur; - - const std::vector s = Strings::split(line, "="); - Checks::check_exit(VCPKG_LINE_INFO, - s.size() == 1 || s.size() == 2, - "Expected format is [VARIABLE_NAME=VARIABLE_VALUE], but was [%s]", - line); - - const bool variable_with_no_value = s.size() == 1; - const std::string variable_name = s.at(0); - const std::string variable_value = variable_with_no_value ? Strings::EMPTY : s.at(1); - - if (variable_name == "VCPKG_TARGET_ARCHITECTURE") - { - pre_build_info.target_architecture = variable_value; - continue; - } - - if (variable_name == "VCPKG_CMAKE_SYSTEM_NAME") - { - pre_build_info.cmake_system_name = variable_value; - continue; - } - - 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; - } - - Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown variable name %s", line); - } - - return pre_build_info; - } -} diff --git a/toolsrc/src/vcpkg_Build_BuildPolicy.cpp b/toolsrc/src/vcpkg_Build_BuildPolicy.cpp deleted file mode 100644 index b3bb778dc..000000000 --- a/toolsrc/src/vcpkg_Build_BuildPolicy.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Build.h" -#include "vcpkg_Checks.h" -#include "vcpkg_Enums.h" - -namespace vcpkg::Build -{ - static const std::string NAME_EMPTY_PACKAGE = "PolicyEmptyPackage"; - static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs"; - static const std::string NAME_ONLY_RELEASE_CRT = "PolicyOnlyReleaseCRT"; - static const std::string NAME_EMPTY_INCLUDE_FOLDER = "PolicyEmptyIncludeFolder"; - static const std::string NAME_ALLOW_OBSOLETE_MSVCRT = "PolicyAllowObsoleteMsvcrt"; - - const std::string& to_string(BuildPolicy policy) - { - switch (policy) - { - case BuildPolicy::EMPTY_PACKAGE: return NAME_EMPTY_PACKAGE; - case BuildPolicy::DLLS_WITHOUT_LIBS: return NAME_DLLS_WITHOUT_LIBS; - case BuildPolicy::ONLY_RELEASE_CRT: return NAME_ONLY_RELEASE_CRT; - case BuildPolicy::EMPTY_INCLUDE_FOLDER: return NAME_EMPTY_INCLUDE_FOLDER; - case BuildPolicy::ALLOW_OBSOLETE_MSVCRT: return NAME_ALLOW_OBSOLETE_MSVCRT; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - - CStringView to_cmake_variable(BuildPolicy policy) - { - switch (policy) - { - case BuildPolicy::EMPTY_PACKAGE: return "VCPKG_POLICY_EMPTY_PACKAGE"; - case BuildPolicy::DLLS_WITHOUT_LIBS: return "VCPKG_POLICY_DLLS_WITHOUT_LIBS"; - case BuildPolicy::ONLY_RELEASE_CRT: return "VCPKG_POLICY_ONLY_RELEASE_CRT"; - case BuildPolicy::EMPTY_INCLUDE_FOLDER: return "VCPKG_POLICY_EMPTY_INCLUDE_FOLDER"; - case BuildPolicy::ALLOW_OBSOLETE_MSVCRT: return "VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT"; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } -} diff --git a/toolsrc/src/vcpkg_Checks.cpp b/toolsrc/src/vcpkg_Checks.cpp deleted file mode 100644 index e7c9046a4..000000000 --- a/toolsrc/src/vcpkg_Checks.cpp +++ /dev/null @@ -1,81 +0,0 @@ -#include "pch.h" - -#include "metrics.h" -#include "vcpkg_Checks.h" -#include "vcpkg_GlobalState.h" -#include "vcpkg_System.h" -#include "vcpkglib.h" - -namespace vcpkg::Checks -{ - [[noreturn]] static void cleanup_and_exit(const int exit_code) - { - const auto elapsed_us = GlobalState::timer.lock()->microseconds(); - - auto metrics = Metrics::g_metrics.lock(); - metrics->track_metric("elapsed_us", elapsed_us); - GlobalState::debugging = false; - metrics->flush(); - - SetConsoleCP(GlobalState::g_init_console_cp); - SetConsoleOutputCP(GlobalState::g_init_console_output_cp); - - fflush(nullptr); - - ::TerminateProcess(::GetCurrentProcess(), exit_code); - } - - static BOOL ctrl_handler(DWORD fdw_ctrl_type) - { - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_property("CtrlHandler", std::to_string(fdw_ctrl_type)); - locked_metrics->track_property("error", "CtrlHandler was fired."); - } - cleanup_and_exit(EXIT_FAILURE); - } - - void register_console_ctrl_handler() - { - SetConsoleCtrlHandler(reinterpret_cast(ctrl_handler), TRUE); - } - - [[noreturn]] void unreachable(const LineInfo& line_info) - { - System::println(System::Color::error, "Error: Unreachable code was reached"); - System::println(System::Color::error, line_info.to_string()); // Always print line_info here -#ifndef NDEBUG - std::abort(); -#else - cleanup_and_exit(EXIT_FAILURE); -#endif - } - - [[noreturn]] void exit_with_code(const LineInfo& line_info, const int exit_code) - { - Debug::println(System::Color::error, line_info.to_string()); - cleanup_and_exit(exit_code); - } - - [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView error_message) - { - System::println(System::Color::error, error_message); - exit_fail(line_info); - } - - void check_exit(const LineInfo& line_info, bool expression) - { - if (!expression) - { - exit_with_message(line_info, Strings::EMPTY); - } - } - - void check_exit(const LineInfo& line_info, bool expression, const CStringView error_message) - { - if (!expression) - { - exit_with_message(line_info, error_message); - } - } -} diff --git a/toolsrc/src/vcpkg_Chrono.cpp b/toolsrc/src/vcpkg_Chrono.cpp deleted file mode 100644 index d96f30987..000000000 --- a/toolsrc/src/vcpkg_Chrono.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Checks.h" -#include "vcpkg_Chrono.h" - -namespace vcpkg -{ - static std::string format_time_userfriendly(const std::chrono::nanoseconds& nanos) - { - using std::chrono::duration_cast; - using std::chrono::hours; - using std::chrono::microseconds; - using std::chrono::milliseconds; - using std::chrono::minutes; - using std::chrono::nanoseconds; - using std::chrono::seconds; - - const double nanos_as_double = static_cast(nanos.count()); - - if (duration_cast(nanos) > hours()) - { - const auto t = nanos_as_double / duration_cast(hours(1)).count(); - return Strings::format("%.4g h", t); - } - - if (duration_cast(nanos) > minutes()) - { - const auto t = nanos_as_double / duration_cast(minutes(1)).count(); - return Strings::format("%.4g min", t); - } - - if (duration_cast(nanos) > seconds()) - { - const auto t = nanos_as_double / duration_cast(seconds(1)).count(); - return Strings::format("%.4g s", t); - } - - if (duration_cast(nanos) > milliseconds()) - { - const auto t = nanos_as_double / duration_cast(milliseconds(1)).count(); - return Strings::format("%.4g ms", t); - } - - if (duration_cast(nanos) > microseconds()) - { - const auto t = nanos_as_double / duration_cast(microseconds(1)).count(); - return Strings::format("%.4g us", t); - } - - return Strings::format("%.4g ns", nanos_as_double); - } - - ElapsedTime ElapsedTime::create_started() - { - ElapsedTime t; - t.m_start_tick = std::chrono::high_resolution_clock::now(); - return t; - } - - std::string ElapsedTime::to_string() const { return format_time_userfriendly(elapsed()); } -} diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp deleted file mode 100644 index 8dd60a2eb..000000000 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ /dev/null @@ -1,669 +0,0 @@ -#include "pch.h" - -#include "PackageSpec.h" -#include "Paragraphs.h" -#include "StatusParagraphs.h" -#include "VcpkgPaths.h" -#include "vcpkg_Dependencies.h" -#include "vcpkg_Files.h" -#include "vcpkg_Graphs.h" -#include "vcpkg_Strings.h" -#include "vcpkg_Util.h" -#include "vcpkglib.h" - -namespace vcpkg::Dependencies -{ - struct FeatureNodeEdges - { - std::vector remove_edges; - std::vector build_edges; - bool plus = false; - }; - - struct Cluster : Util::MoveOnlyBase - { - std::vector status_paragraphs; - Optional source_control_file; - PackageSpec spec; - std::unordered_map edges; - std::unordered_set to_install_features; - std::unordered_set original_features; - bool will_remove = false; - bool transient_uninstalled = true; - RequestType request_type = RequestType::AUTO_SELECTED; - }; - - struct ClusterPtr - { - Cluster* ptr; - - Cluster* operator->() const { return ptr; } - }; - - bool operator==(const ClusterPtr& l, const ClusterPtr& r) { return l.ptr == r.ptr; } -} - -template<> -struct std::hash -{ - size_t operator()(const vcpkg::Dependencies::ClusterPtr& value) const - { - return std::hash()(value.ptr->spec); - } -}; - -namespace vcpkg::Dependencies -{ - struct GraphPlan - { - Graphs::Graph remove_graph; - Graphs::Graph install_graph; - }; - - struct ClusterGraph : Util::MoveOnlyBase - { - explicit ClusterGraph(std::unordered_map&& ports) - : m_ports(std::move(ports)) - { - } - - Cluster& get(const PackageSpec& spec) - { - auto it = m_graph.find(spec); - if (it == m_graph.end()) - { - // Load on-demand from m_ports - auto it_ports = m_ports.find(spec.name()); - if (it_ports != m_ports.end()) - { - auto& clust = m_graph[spec]; - clust.spec = spec; - cluster_from_scf(*it_ports->second, clust); - return clust; - } - return m_graph[spec]; - } - return it->second; - } - - private: - void cluster_from_scf(const SourceControlFile& scf, Cluster& out_cluster) const - { - FeatureNodeEdges core_dependencies; - core_dependencies.build_edges = - filter_dependencies_to_specs(scf.core_paragraph->depends, out_cluster.spec.triplet()); - out_cluster.edges.emplace("core", std::move(core_dependencies)); - - for (const auto& feature : scf.feature_paragraphs) - { - FeatureNodeEdges added_edges; - added_edges.build_edges = filter_dependencies_to_specs(feature->depends, out_cluster.spec.triplet()); - out_cluster.edges.emplace(feature->name, std::move(added_edges)); - } - out_cluster.source_control_file = &scf; - } - - std::unordered_map m_graph; - std::unordered_map m_ports; - }; - - std::vector AnyParagraph::dependencies(const Triplet& triplet) const - { - auto to_package_specs = [&](const std::vector& dependencies_as_string) { - return Util::fmap(dependencies_as_string, [&](const std::string s) { - return PackageSpec::from_name_and_triplet(s, triplet).value_or_exit(VCPKG_LINE_INFO); - }); - }; - - if (auto p = this->status_paragraph.get()) - { - return to_package_specs(p->package.depends); - } - - if (auto p = this->binary_control_file.get()) - { - auto deps = Util::fmap_flatten(p->features, [](const BinaryParagraph& pgh) { return pgh.depends; }); - deps.insert(deps.end(), p->core_paragraph.depends.begin(), p->core_paragraph.depends.end()); - return to_package_specs(deps); - } - - if (auto p = this->source_paragraph.get()) - { - return to_package_specs(filter_dependencies(p->depends, triplet)); - } - - Checks::exit_with_message(VCPKG_LINE_INFO, - "Cannot get dependencies because there was none of: source/binary/status paragraphs"); - } - - std::string to_output_string(RequestType request_type, const CStringView s) - { - switch (request_type) - { - case RequestType::AUTO_SELECTED: return Strings::format(" * %s", s); - case RequestType::USER_REQUESTED: return Strings::format(" %s", s); - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - - InstallPlanAction::InstallPlanAction() : plan_type(InstallPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} - - InstallPlanAction::InstallPlanAction(const PackageSpec& spec, - const SourceControlFile& any_paragraph, - const std::unordered_set& features, - const RequestType& request_type) - : spec(spec), plan_type(InstallPlanType::BUILD_AND_INSTALL), request_type(request_type), feature_list(features) - { - this->any_paragraph.source_control_file = &any_paragraph; - } - - InstallPlanAction::InstallPlanAction(const PackageSpec& spec, - const std::unordered_set& features, - const RequestType& request_type) - : spec(spec), plan_type(InstallPlanType::ALREADY_INSTALLED), request_type(request_type), feature_list(features) - { - } - - InstallPlanAction::InstallPlanAction(const PackageSpec& spec, - const AnyParagraph& any_paragraph, - const RequestType& request_type) - : spec(spec), any_paragraph(any_paragraph), plan_type(InstallPlanType::UNKNOWN), request_type(request_type) - { - if (auto p = any_paragraph.status_paragraph.get()) - { - this->plan_type = InstallPlanType::ALREADY_INSTALLED; - return; - } - - if (auto p = any_paragraph.binary_control_file.get()) - { - this->plan_type = InstallPlanType::INSTALL; - return; - } - - if (auto p = any_paragraph.source_paragraph.get()) - { - this->plan_type = InstallPlanType::BUILD_AND_INSTALL; - return; - } - } - - std::string InstallPlanAction::displayname() const - { - if (this->feature_list.empty()) - { - return this->spec.to_string(); - } - - const std::string features = Strings::join(",", this->feature_list); - return Strings::format("%s[%s]:%s", this->spec.name(), features, this->spec.triplet()); - } - - bool InstallPlanAction::compare_by_name(const InstallPlanAction* left, const InstallPlanAction* right) - { - return left->spec.name() < right->spec.name(); - } - - RemovePlanAction::RemovePlanAction() : plan_type(RemovePlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} - - RemovePlanAction::RemovePlanAction(const PackageSpec& spec, - const RemovePlanType& plan_type, - const RequestType& request_type) - : spec(spec), plan_type(plan_type), request_type(request_type) - { - } - - const PackageSpec& AnyAction::spec() const - { - if (const auto p = install_plan.get()) - { - return p->spec; - } - - if (const auto p = remove_plan.get()) - { - return p->spec; - } - - Checks::exit_with_message(VCPKG_LINE_INFO, "Null action"); - } - - bool ExportPlanAction::compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right) - { - return left->spec.name() < right->spec.name(); - } - - ExportPlanAction::ExportPlanAction() : plan_type(ExportPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} - - ExportPlanAction::ExportPlanAction(const PackageSpec& spec, - const AnyParagraph& any_paragraph, - const RequestType& request_type) - : spec(spec), any_paragraph(any_paragraph), plan_type(ExportPlanType::UNKNOWN), request_type(request_type) - { - if (auto p = any_paragraph.binary_control_file.get()) - { - this->plan_type = ExportPlanType::ALREADY_BUILT; - return; - } - - if (auto p = any_paragraph.source_paragraph.get()) - { - this->plan_type = ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT; - return; - } - } - - bool RemovePlanAction::compare_by_name(const RemovePlanAction* left, const RemovePlanAction* right) - { - return left->spec.name() < right->spec.name(); - } - - MapPortFile::MapPortFile(const std::unordered_map& map) : ports(map) {} - - const SourceControlFile& MapPortFile::get_control_file(const std::string& spec) const - { - auto scf = ports.find(spec); - if (scf == ports.end()) - { - Checks::exit_fail(VCPKG_LINE_INFO); - } - return scf->second; - } - - PathsPortFile::PathsPortFile(const VcpkgPaths& paths) : ports(paths) {} - - const SourceControlFile& PathsPortFile::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()) - { - auto it = cache.emplace(spec, std::move(*scf->get())); - return it.first->second; - } - print_error_message(source_control_file.error()); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - std::vector create_install_plan(const PortFileProvider& port_file_provider, - const std::vector& specs, - const StatusParagraphs& status_db) - { - struct InstallAdjacencyProvider final : Graphs::AdjacencyProvider - { - const PortFileProvider& port_file_provider; - const StatusParagraphs& status_db; - const std::unordered_set& specs_as_set; - - InstallAdjacencyProvider(const PortFileProvider& port_file_provider, - const StatusParagraphs& s, - const std::unordered_set& specs_as_set) - : port_file_provider(port_file_provider), status_db(s), specs_as_set(specs_as_set) - { - } - - std::vector adjacency_list(const InstallPlanAction& plan) const override - { - if (plan.any_paragraph.status_paragraph.get()) return std::vector{}; - return plan.any_paragraph.dependencies(plan.spec.triplet()); - } - - InstallPlanAction load_vertex_data(const PackageSpec& spec) const override - { - const RequestType request_type = specs_as_set.find(spec) != specs_as_set.end() - ? RequestType::USER_REQUESTED - : RequestType::AUTO_SELECTED; - auto it = status_db.find_installed(spec); - if (it != status_db.end()) return InstallPlanAction{spec, {*it->get(), nullopt, nullopt}, request_type}; - return InstallPlanAction{ - spec, - {nullopt, nullopt, *port_file_provider.get_control_file(spec.name()).core_paragraph}, - request_type}; - } - }; - - const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); - std::vector toposort = - Graphs::topological_sort(specs, InstallAdjacencyProvider{port_file_provider, status_db, specs_as_set}); - Util::erase_remove_if(toposort, [](const InstallPlanAction& plan) { - return plan.request_type == RequestType::AUTO_SELECTED && - plan.plan_type == InstallPlanType::ALREADY_INSTALLED; - }); - - return toposort; - } - - std::vector create_remove_plan(const std::vector& specs, - const StatusParagraphs& status_db) - { - struct RemoveAdjacencyProvider final : Graphs::AdjacencyProvider - { - const StatusParagraphs& status_db; - const std::vector& installed_ports; - const std::unordered_set& specs_as_set; - - RemoveAdjacencyProvider(const StatusParagraphs& status_db, - const std::vector& installed_ports, - const std::unordered_set& specs_as_set) - : status_db(status_db), installed_ports(installed_ports), specs_as_set(specs_as_set) - { - } - - std::vector adjacency_list(const RemovePlanAction& plan) const override - { - if (plan.plan_type == RemovePlanType::NOT_INSTALLED) - { - return {}; - } - - const PackageSpec& spec = plan.spec; - std::vector dependents; - for (const StatusParagraph* an_installed_package : installed_ports) - { - if (an_installed_package->package.spec.triplet() != spec.triplet()) continue; - - const std::vector& deps = an_installed_package->package.depends; - if (std::find(deps.begin(), deps.end(), spec.name()) == deps.end()) continue; - - dependents.push_back(an_installed_package->package.spec); - } - - return dependents; - } - - RemovePlanAction load_vertex_data(const PackageSpec& spec) const override - { - const RequestType request_type = specs_as_set.find(spec) != specs_as_set.end() - ? RequestType::USER_REQUESTED - : RequestType::AUTO_SELECTED; - const StatusParagraphs::const_iterator it = status_db.find_installed(spec); - if (it == status_db.end()) - { - return RemovePlanAction{spec, RemovePlanType::NOT_INSTALLED, request_type}; - } - return RemovePlanAction{spec, RemovePlanType::REMOVE, request_type}; - } - }; - - const std::vector& installed_ports = get_installed_ports(status_db); - const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); - return Graphs::topological_sort(specs, RemoveAdjacencyProvider{status_db, installed_ports, specs_as_set}); - } - - std::vector create_export_plan(const VcpkgPaths& paths, - const std::vector& specs, - const StatusParagraphs& status_db) - { - struct ExportAdjacencyProvider final : Graphs::AdjacencyProvider - { - const VcpkgPaths& paths; - const StatusParagraphs& status_db; - const std::unordered_set& specs_as_set; - - ExportAdjacencyProvider(const VcpkgPaths& p, - const StatusParagraphs& s, - const std::unordered_set& specs_as_set) - : paths(p), status_db(s), specs_as_set(specs_as_set) - { - } - - std::vector adjacency_list(const ExportPlanAction& plan) const override - { - return plan.any_paragraph.dependencies(plan.spec.triplet()); - } - - ExportPlanAction load_vertex_data(const PackageSpec& spec) const override - { - const RequestType request_type = specs_as_set.find(spec) != specs_as_set.end() - ? RequestType::USER_REQUESTED - : RequestType::AUTO_SELECTED; - - Expected maybe_bpgh = Paragraphs::try_load_cached_control_package(paths, spec); - if (auto bcf = maybe_bpgh.get()) - return ExportPlanAction{spec, AnyParagraph{nullopt, std::move(*bcf), nullopt}, request_type}; - - auto maybe_scf = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); - if (auto scf = maybe_scf.get()) - return ExportPlanAction{spec, {nullopt, nullopt, *scf->get()->core_paragraph}, request_type}; - else - print_error_message(maybe_scf.error()); - - Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec); - } - }; - - const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); - std::vector toposort = - Graphs::topological_sort(specs, ExportAdjacencyProvider{paths, status_db, specs_as_set}); - return toposort; - } - - enum class MarkPlusResult - { - FEATURE_NOT_FOUND, - SUCCESS, - }; - - MarkPlusResult mark_plus(const std::string& feature, - Cluster& cluster, - ClusterGraph& pkg_to_cluster, - GraphPlan& graph_plan); - void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); - - MarkPlusResult mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) - { - if (feature.empty()) - { - // Indicates that core was not specified in the reference - return mark_plus("core", cluster, graph, graph_plan); - } - - auto it = cluster.edges.find(feature); - if (it == cluster.edges.end()) return MarkPlusResult::FEATURE_NOT_FOUND; - - if (cluster.edges[feature].plus) return MarkPlusResult::SUCCESS; - - if (cluster.original_features.find(feature) == cluster.original_features.end()) - { - cluster.transient_uninstalled = true; - } - - if (!cluster.transient_uninstalled) - { - return MarkPlusResult::SUCCESS; - } - cluster.edges[feature].plus = true; - - if (!cluster.original_features.empty()) - { - mark_minus(cluster, graph, graph_plan); - } - - graph_plan.install_graph.add_vertex({&cluster}); - auto& tracked = cluster.to_install_features; - tracked.insert(feature); - - if (feature != "core") - { - // All features implicitly depend on core - auto res = mark_plus("core", cluster, graph, graph_plan); - - // Should be impossible for "core" to not exist - Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS); - } - - for (auto&& depend : cluster.edges[feature].build_edges) - { - auto& depend_cluster = graph.get(depend.spec()); - auto res = mark_plus(depend.feature(), depend_cluster, graph, graph_plan); - - Checks::check_exit(VCPKG_LINE_INFO, - res == MarkPlusResult::SUCCESS, - "Error: Unable to satisfy dependency %s of %s", - depend, - FeatureSpec(cluster.spec, feature)); - - if (&depend_cluster == &cluster) continue; - graph_plan.install_graph.add_edge({&cluster}, {&depend_cluster}); - } - - return MarkPlusResult::SUCCESS; - } - - void mark_minus(Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) - { - if (cluster.will_remove) return; - cluster.will_remove = true; - - graph_plan.remove_graph.add_vertex({&cluster}); - for (auto&& pair : cluster.edges) - { - auto& remove_edges_edges = pair.second.remove_edges; - for (auto&& depend : remove_edges_edges) - { - auto& depend_cluster = graph.get(depend.spec()); - graph_plan.remove_graph.add_edge({&cluster}, {&depend_cluster}); - mark_minus(depend_cluster, graph, graph_plan); - } - } - - cluster.transient_uninstalled = true; - for (auto&& original_feature : cluster.original_features) - { - auto res = mark_plus(original_feature, cluster, graph, graph_plan); - if (res != MarkPlusResult::SUCCESS) - { - System::println(System::Color::warning, - "Warning: could not reinstall feature %s", - FeatureSpec{cluster.spec, original_feature}); - } - } - } - - static ClusterGraph create_feature_install_graph(const std::unordered_map& map, - const StatusParagraphs& status_db) - { - std::unordered_map ptr_map; - for (auto&& p : map) - ptr_map.emplace(p.first, &p.second); - ClusterGraph graph(std::move(ptr_map)); - - auto installed_ports = get_installed_ports(status_db); - - for (auto&& status_paragraph : installed_ports) - { - Cluster& cluster = graph.get(status_paragraph->package.spec); - - cluster.transient_uninstalled = false; - - cluster.status_paragraphs.emplace_back(status_paragraph); - - auto& status_paragraph_feature = status_paragraph->package.feature; - // In this case, empty string indicates the "core" paragraph for a package. - if (status_paragraph_feature.empty()) - { - cluster.original_features.insert("core"); - } - else - { - cluster.original_features.insert(status_paragraph_feature); - } - } - - for (auto&& status_paragraph : installed_ports) - { - auto& spec = status_paragraph->package.spec; - auto& status_paragraph_feature = status_paragraph->package.feature; - auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends, - status_paragraph->package.spec.triplet()); - - for (auto&& dependency : reverse_edges) - { - auto& dep_cluster = graph.get(dependency.spec()); - - auto depends_name = dependency.feature(); - if (depends_name.empty()) depends_name = "core"; - - auto& target_node = dep_cluster.edges[depends_name]; - target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); - } - } - return graph; - } - - std::vector create_feature_install_plan(const std::unordered_map& map, - const std::vector& specs, - const StatusParagraphs& status_db) - { - ClusterGraph graph = create_feature_install_graph(map, status_db); - - GraphPlan graph_plan; - for (auto&& spec : specs) - { - Cluster& spec_cluster = graph.get(spec.spec()); - spec_cluster.request_type = RequestType::USER_REQUESTED; - auto res = mark_plus(spec.feature(), spec_cluster, graph, graph_plan); - - Checks::check_exit( - VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); - - graph_plan.install_graph.add_vertex(ClusterPtr{&spec_cluster}); - } - - Graphs::GraphAdjacencyProvider adjacency_remove_graph(graph_plan.remove_graph.adjacency_list()); - auto remove_vertex_list = graph_plan.remove_graph.vertex_list(); - auto remove_toposort = Graphs::topological_sort(remove_vertex_list, adjacency_remove_graph); - - Graphs::GraphAdjacencyProvider adjacency_install_graph(graph_plan.install_graph.adjacency_list()); - auto insert_vertex_list = graph_plan.install_graph.vertex_list(); - auto insert_toposort = Graphs::topological_sort(insert_vertex_list, adjacency_install_graph); - - std::vector plan; - - for (auto&& p_cluster : remove_toposort) - { - auto scf = *p_cluster->source_control_file.get(); - auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, p_cluster->spec.triplet()) - .value_or_exit(VCPKG_LINE_INFO); - plan.emplace_back(RemovePlanAction{ - std::move(spec), - RemovePlanType::REMOVE, - p_cluster->request_type, - }); - } - - for (auto&& p_cluster : insert_toposort) - { - if (p_cluster->transient_uninstalled) - { - // If it will be transiently uninstalled, we need to issue a full installation command - auto pscf = p_cluster->source_control_file.value_or_exit(VCPKG_LINE_INFO); - Checks::check_exit(VCPKG_LINE_INFO, pscf != nullptr); - plan.emplace_back(InstallPlanAction{ - p_cluster->spec, - *pscf, - p_cluster->to_install_features, - p_cluster->request_type, - }); - } - else - { - // If the package isn't transitively installed, still include it if the user explicitly requested it - if (p_cluster->request_type != RequestType::USER_REQUESTED) continue; - plan.emplace_back(InstallPlanAction{ - p_cluster->spec, - p_cluster->original_features, - p_cluster->request_type, - }); - } - } - - return plan; - } -} diff --git a/toolsrc/src/vcpkg_Enums.cpp b/toolsrc/src/vcpkg_Enums.cpp deleted file mode 100644 index 51ba9d5dc..000000000 --- a/toolsrc/src/vcpkg_Enums.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Checks.h" -#include "vcpkg_Enums.h" - -namespace vcpkg::Enums -{ - std::string nullvalue_to_string(const CStringView enum_name) { return Strings::format("%s_NULLVALUE", enum_name); } - - [[noreturn]] void nullvalue_used(const LineInfo& line_info, const CStringView enum_name) - { - Checks::exit_with_message(line_info, "NULLVALUE of enum %s was used", enum_name); - } -} diff --git a/toolsrc/src/vcpkg_Files.cpp b/toolsrc/src/vcpkg_Files.cpp deleted file mode 100644 index ad1fcebc6..000000000 --- a/toolsrc/src/vcpkg_Files.cpp +++ /dev/null @@ -1,209 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Files.h" -#include "vcpkg_System.h" -#include "vcpkg_Util.h" -#include - -namespace vcpkg::Files -{ - static const std::regex FILESYSTEM_INVALID_CHARACTERS_REGEX = std::regex(R"([\/:*?"<>|])"); - - struct RealFilesystem final : Filesystem - { - virtual Expected read_contents(const fs::path& file_path) const override - { - std::fstream file_stream(file_path, std::ios_base::in | std::ios_base::binary); - if (file_stream.fail()) - { - return std::make_error_code(std::errc::no_such_file_or_directory); - } - - file_stream.seekg(0, file_stream.end); - auto length = file_stream.tellg(); - file_stream.seekg(0, file_stream.beg); - - if (length > SIZE_MAX) - { - return std::make_error_code(std::errc::file_too_large); - } - - std::string output; - output.resize(static_cast(length)); - file_stream.read(&output[0], length); - file_stream.close(); - - return std::move(output); - } - virtual Expected> read_lines(const fs::path& file_path) const override - { - std::fstream file_stream(file_path, std::ios_base::in | std::ios_base::binary); - if (file_stream.fail()) - { - return std::make_error_code(std::errc::no_such_file_or_directory); - } - - std::vector output; - std::string line; - while (std::getline(file_stream, line)) - { - output.push_back(line); - } - file_stream.close(); - - return std::move(output); - } - virtual fs::path find_file_recursively_up(const fs::path& starting_dir, - const std::string& filename) const override - { - fs::path current_dir = starting_dir; - for (; !current_dir.empty(); current_dir = current_dir.parent_path()) - { - const fs::path candidate = current_dir / filename; - if (exists(candidate)) - { - break; - } - } - - return current_dir; - } - - virtual std::vector get_files_recursive(const fs::path& dir) const override - { - std::vector ret; - - fs::stdfs::recursive_directory_iterator b(dir), e{}; - for (; b != e; ++b) - { - ret.push_back(b->path()); - } - - return ret; - } - - virtual std::vector get_files_non_recursive(const fs::path& dir) const override - { - std::vector ret; - - fs::stdfs::directory_iterator b(dir), e{}; - for (; b != e; ++b) - { - ret.push_back(b->path()); - } - - return ret; - } - - virtual void write_lines(const fs::path& file_path, const std::vector& lines) override - { - std::fstream output(file_path, std::ios_base::out | std::ios_base::binary | std::ios_base::trunc); - for (const std::string& line : lines) - { - output << line << "\n"; - } - output.close(); - } - - virtual void rename(const fs::path& oldpath, const fs::path& newpath) override - { - fs::stdfs::rename(oldpath, newpath); - } - virtual bool remove(const fs::path& path) override { return fs::stdfs::remove(path); } - 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); - - 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); - } - - if (this->exists(path)) - { - System::println(System::Color::warning, - "Some files in %s were unable to be removed. Close any editors operating in this " - "directory and retry.", - path.string()); - } - - return out; - } - 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); } - virtual bool is_regular_file(const fs::path& path) const override { return fs::stdfs::is_regular_file(path); } - virtual bool is_empty(const fs::path& path) const override { return fs::stdfs::is_empty(path); } - virtual bool create_directory(const fs::path& path, std::error_code& ec) override - { - return fs::stdfs::create_directory(path, ec); - } - virtual bool create_directories(const fs::path& path, std::error_code& ec) override - { - return fs::stdfs::create_directories(path, ec); - } - virtual void copy(const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts) override - { - fs::stdfs::copy(oldpath, newpath, opts); - } - virtual bool copy_file(const fs::path& oldpath, - const fs::path& newpath, - fs::copy_options opts, - std::error_code& ec) override - { - return fs::stdfs::copy_file(oldpath, newpath, opts, ec); - } - - virtual fs::file_status status(const fs::path& path, std::error_code& ec) const override - { - return fs::stdfs::status(path, ec); - } - virtual void write_contents(const fs::path& file_path, const std::string& data) override - { - FILE* f = nullptr; - auto ec = _wfopen_s(&f, file_path.native().c_str(), L"wb"); - Checks::check_exit( - VCPKG_LINE_INFO, ec == 0, "Error: Could not open file for writing: %s", file_path.u8string().c_str()); - auto count = fwrite(data.data(), sizeof(data[0]), data.size(), f); - fclose(f); - - Checks::check_exit(VCPKG_LINE_INFO, count == data.size()); - } - }; - - Filesystem& get_real_filesystem() - { - static RealFilesystem real_fs; - return real_fs; - } - - bool has_invalid_chars_for_filesystem(const std::string& s) - { - return std::regex_search(s, FILESYSTEM_INVALID_CHARACTERS_REGEX); - } - - void print_paths(const std::vector& paths) - { - System::println(); - for (const fs::path& p : paths) - { - System::println(" %s", p.generic_string()); - } - System::println(); - } - - std::vector find_from_PATH(const std::wstring& name) - { - const std::wstring cmd = Strings::wformat(L"where.exe %s", name); - auto out = System::cmd_execute_and_capture_output(cmd); - if (out.exit_code != 0) - { - return {}; - } - - return Util::fmap(Strings::split(out.output, "\n"), [](auto&& s) { return fs::path(s); }); - } -} diff --git a/toolsrc/src/vcpkg_GlobalState.cpp b/toolsrc/src/vcpkg_GlobalState.cpp deleted file mode 100644 index 2221222c0..000000000 --- a/toolsrc/src/vcpkg_GlobalState.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "pch.h" - -#include "vcpkg_GlobalState.h" - -namespace vcpkg -{ - Util::LockGuarded GlobalState::timer; - std::atomic GlobalState::debugging = false; - std::atomic GlobalState::feature_packages = false; - - std::atomic GlobalState::g_init_console_cp = 0; - std::atomic GlobalState::g_init_console_output_cp = 0; -} diff --git a/toolsrc/src/vcpkg_Input.cpp b/toolsrc/src/vcpkg_Input.cpp deleted file mode 100644 index f1cac9632..000000000 --- a/toolsrc/src/vcpkg_Input.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "pch.h" - -#include "metrics.h" -#include "vcpkg_Commands.h" -#include "vcpkg_Input.h" -#include "vcpkg_System.h" - -namespace vcpkg::Input -{ - PackageSpec check_and_get_package_spec(const std::string& package_spec_as_string, - const Triplet& default_triplet, - CStringView example_text) - { - const std::string as_lowercase = Strings::ascii_to_lowercase(package_spec_as_string); - auto expected_spec = FullPackageSpec::from_string(as_lowercase, default_triplet); - if (const auto spec = expected_spec.get()) - { - return PackageSpec{spec->package_spec}; - } - - // Intentionally show the lowercased string - System::println(System::Color::error, "Error: %s: %s", vcpkg::to_string(expected_spec.error()), as_lowercase); - System::print(example_text); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - void check_triplet(const Triplet& t, const VcpkgPaths& paths) - { - if (!paths.is_valid_triplet(t)) - { - System::println(System::Color::error, "Error: invalid triplet: %s", t); - Metrics::g_metrics.lock()->track_property("error", "invalid triplet: " + t.to_string()); - Commands::Help::help_topic_valid_triplet(paths); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - - FullPackageSpec check_and_get_full_package_spec(const std::string& full_package_spec_as_string, - const Triplet& default_triplet, - CStringView example_text) - { - const std::string as_lowercase = Strings::ascii_to_lowercase(full_package_spec_as_string); - auto expected_spec = FullPackageSpec::from_string(as_lowercase, default_triplet); - if (const auto spec = expected_spec.get()) - { - return *spec; - } - - // Intentionally show the lowercased string - System::println(System::Color::error, "Error: %s: %s", vcpkg::to_string(expected_spec.error()), as_lowercase); - System::print(example_text); - Checks::exit_fail(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/vcpkg_Parse.cpp b/toolsrc/src/vcpkg_Parse.cpp deleted file mode 100644 index e671a1a05..000000000 --- a/toolsrc/src/vcpkg_Parse.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Checks.h" -#include "vcpkg_Maps.h" -#include "vcpkg_Parse.h" - -namespace vcpkg::Parse -{ - static Optional remove_field(std::unordered_map* fields, - const std::string& fieldname) - { - auto it = fields->find(fieldname); - if (it == fields->end()) - { - return nullopt; - } - - const std::string value = std::move(it->second); - fields->erase(it); - return value; - } - - void ParagraphParser::required_field(const std::string& fieldname, std::string& out) - { - auto maybe_field = remove_field(&fields, fieldname); - if (const auto field = maybe_field.get()) - out = std::move(*field); - else - missing_fields.push_back(fieldname); - } - std::string ParagraphParser::optional_field(const std::string& fieldname) const - { - return remove_field(&fields, fieldname).value_or(Strings::EMPTY); - } - std::unique_ptr ParagraphParser::error_info(const std::string& name) const - { - if (!fields.empty() || !missing_fields.empty()) - { - auto err = std::make_unique(); - err->name = name; - err->extra_fields = Maps::extract_keys(fields); - err->missing_fields = std::move(missing_fields); - return err; - } - return nullptr; - } - - std::vector parse_comma_list(const std::string& str) - { - if (str.empty()) - { - return {}; - } - - std::vector out; - - size_t cur = 0; - do - { - auto pos = str.find(',', cur); - if (pos == std::string::npos) - { - out.push_back(str.substr(cur)); - break; - } - out.push_back(str.substr(cur, pos - cur)); - - // skip comma and space - ++pos; - if (str[pos] == ' ') - { - ++pos; - } - - cur = pos; - } while (cur != std::string::npos); - - return out; - } -} diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp deleted file mode 100644 index bbe6b29cd..000000000 --- a/toolsrc/src/vcpkg_Strings.cpp +++ /dev/null @@ -1,174 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Checks.h" -#include "vcpkg_Strings.h" -#include "vcpkg_Util.h" - -namespace vcpkg::Strings::details -{ - // To disambiguate between two overloads - static const auto isspace = [](const char c) { return std::isspace(c); }; - - // Avoids C4244 warnings because of char<->int conversion that occur when using std::tolower() - static char tolower_char(const char c) { return static_cast(std::tolower(c)); } - -#if defined(_WIN32) - static _locale_t& c_locale() - { - static _locale_t c_locale_impl = _create_locale(LC_ALL, "C"); - return c_locale_impl; - } -#endif - - std::string format_internal(const char* fmtstr, ...) - { - va_list args; - va_start(args, fmtstr); - -#if defined(_WIN32) - const int sz = _vscprintf_l(fmtstr, c_locale(), args); -#else - const int sz = vsnprintf(nullptr, 0, fmtstr, args); -#endif - Checks::check_exit(VCPKG_LINE_INFO, sz > 0); - - std::string output(sz, '\0'); - -#if defined(_WIN32) - _vsnprintf_s_l(&output.at(0), output.size() + 1, output.size(), fmtstr, c_locale(), args); -#else - vsnprintf(&output.at(0), output.size() + 1, fmtstr, args); -#endif - va_end(args); - - return output; - } - - std::wstring wformat_internal(const wchar_t* fmtstr, ...) - { - va_list args; - va_start(args, fmtstr); - -#if defined(_WIN32) - const int sz = _vscwprintf_l(fmtstr, c_locale(), args); -#else - const int sz = vswprintf(nullptr, 0, fmtstr, args); -#endif - Checks::check_exit(VCPKG_LINE_INFO, sz > 0); - - std::wstring output(sz, L'\0'); - -#if defined(_WIN32) - _vsnwprintf_s_l(&output.at(0), output.size() + 1, output.size(), fmtstr, c_locale(), args); -#else - vswprintf(&output.at(0), output.size() + 1, fmtstr, args); -#endif - va_end(args); - - return output; - } -} - -namespace vcpkg::Strings -{ - std::wstring to_utf16(const CStringView s) - { - const int size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); - std::wstring output; - output.resize(size - 1); - MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, output.data(), size - 1); - return output; - } - - std::string to_utf8(const CWStringView w) - { - const int size = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, nullptr, 0, nullptr, nullptr); - std::string output; - output.resize(size - 1); - WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, output.data(), size - 1, nullptr, nullptr); - return output; - } - - std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern) - { - const std::string pattern_as_lower_case(ascii_to_lowercase(pattern)); - return search(s.begin(), - s.end(), - pattern_as_lower_case.begin(), - pattern_as_lower_case.end(), - [](const char a, const char b) { return details::tolower_char(a) == b; }); - } - - bool case_insensitive_ascii_contains(const std::string& s, const std::string& pattern) - { - return case_insensitive_ascii_find(s, pattern) != s.end(); - } - - int case_insensitive_ascii_compare(const CStringView left, const CStringView right) - { - return _stricmp(left.c_str(), right.c_str()); - } - - std::string ascii_to_lowercase(const std::string& input) - { - std::string output(input); - std::transform(output.begin(), output.end(), output.begin(), &details::tolower_char); - return output; - } - - bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern) - { - return _strnicmp(s.c_str(), pattern.c_str(), pattern.size()) == 0; - } - - void trim(std::string* s) - { - s->erase(std::find_if_not(s->rbegin(), s->rend(), details::isspace).base(), s->end()); - s->erase(s->begin(), std::find_if_not(s->begin(), s->end(), details::isspace)); - } - - std::string trimmed(const std::string& s) - { - auto whitespace_back = std::find_if_not(s.rbegin(), s.rend(), details::isspace).base(); - auto whitespace_front = std::find_if_not(s.begin(), whitespace_back, details::isspace); - return std::string(whitespace_front, whitespace_back); - } - - void trim_all_and_remove_whitespace_strings(std::vector* strings) - { - for (std::string& s : *strings) - { - trim(&s); - } - - Util::erase_remove_if(*strings, [](const std::string& s) { return s.empty(); }); - } - - std::vector split(const std::string& s, const std::string& delimiter) - { - std::vector output; - - if (delimiter.empty()) - { - output.push_back(s); - return output; - } - - const size_t delimiter_length = delimiter.length(); - size_t i = 0; - for (size_t pos = s.find(delimiter); pos != std::string::npos; pos = s.find(delimiter, pos)) - { - output.push_back(s.substr(i, pos - i)); - pos += delimiter_length; - i = pos; - } - - // Add the rest of the string after the last delimiter, unless there is nothing after it - if (i != s.length()) - { - output.push_back(s.substr(i, s.length())); - } - - return output; - } -} diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp deleted file mode 100644 index 3b4c440d8..000000000 --- a/toolsrc/src/vcpkg_System.cpp +++ /dev/null @@ -1,349 +0,0 @@ -#include "pch.h" - -#include "vcpkg_Checks.h" -#include "vcpkg_GlobalState.h" -#include "vcpkg_System.h" -#include "vcpkglib.h" - -namespace vcpkg::System -{ - tm get_current_date_time() - { - using std::chrono::system_clock; - std::time_t now_time = system_clock::to_time_t(system_clock::now()); - tm parts; - localtime_s(&parts, &now_time); - return parts; - } - - fs::path get_exe_path_of_current_process() - { - wchar_t buf[_MAX_PATH]; - const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); - if (bytes == 0) std::abort(); - return fs::path(buf, buf + bytes); - } - - Optional to_cpu_architecture(CStringView arch) - { - if (Strings::case_insensitive_ascii_compare(arch, "x86") == 0) return CPUArchitecture::X86; - if (Strings::case_insensitive_ascii_compare(arch, "x64") == 0) return CPUArchitecture::X64; - if (Strings::case_insensitive_ascii_compare(arch, "amd64") == 0) return CPUArchitecture::X64; - if (Strings::case_insensitive_ascii_compare(arch, "arm") == 0) return CPUArchitecture::ARM; - if (Strings::case_insensitive_ascii_compare(arch, "arm64") == 0) return CPUArchitecture::ARM64; - return nullopt; - } - - CPUArchitecture get_host_processor() - { - auto w6432 = get_environment_variable(L"PROCESSOR_ARCHITEW6432"); - if (const auto p = w6432.get()) return to_cpu_architecture(Strings::to_utf8(*p)).value_or_exit(VCPKG_LINE_INFO); - - const auto procarch = get_environment_variable(L"PROCESSOR_ARCHITECTURE").value_or_exit(VCPKG_LINE_INFO); - return to_cpu_architecture(Strings::to_utf8(procarch)).value_or_exit(VCPKG_LINE_INFO); - } - - std::vector get_supported_host_architectures() - { - std::vector supported_architectures; - supported_architectures.push_back(get_host_processor()); - - // AMD64 machines support to run x86 applications - if (supported_architectures.back() == CPUArchitecture::X64) - { - supported_architectures.push_back(CPUArchitecture::X86); - } - - return supported_architectures; - } - - int cmd_execute_clean(const CWStringView cmd_line) - { - static const std::wstring SYSTEM_ROOT = get_environment_variable(L"SystemRoot").value_or_exit(VCPKG_LINE_INFO); - static const std::wstring SYSTEM_32 = SYSTEM_ROOT + LR"(\system32)"; - static const std::wstring NEW_PATH = Strings::wformat( - LR"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", SYSTEM_32, SYSTEM_ROOT, SYSTEM_32, SYSTEM_32); - - std::vector env_wstrings = { - L"ALLUSERSPROFILE", - L"APPDATA", - L"CommonProgramFiles", - L"CommonProgramFiles(x86)", - L"CommonProgramW6432", - L"COMPUTERNAME", - L"ComSpec", - L"HOMEDRIVE", - L"HOMEPATH", - L"LOCALAPPDATA", - L"LOGONSERVER", - L"NUMBER_OF_PROCESSORS", - L"OS", - L"PATHEXT", - L"PROCESSOR_ARCHITECTURE", - L"PROCESSOR_ARCHITEW6432", - L"PROCESSOR_IDENTIFIER", - L"PROCESSOR_LEVEL", - L"PROCESSOR_REVISION", - L"ProgramData", - L"ProgramFiles", - L"ProgramFiles(x86)", - L"ProgramW6432", - L"PROMPT", - L"PSModulePath", - L"PUBLIC", - L"SystemDrive", - L"SystemRoot", - L"TEMP", - L"TMP", - L"USERDNSDOMAIN", - L"USERDOMAIN", - L"USERDOMAIN_ROAMINGPROFILE", - L"USERNAME", - L"USERPROFILE", - L"windir", - // Enables proxy information to be passed to Curl, the underlying download library in cmake.exe - L"HTTP_PROXY", - L"HTTPS_PROXY", - // Enables find_package(CUDA) in CMake - L"CUDA_PATH", - }; - - // Flush stdout before launching external process - fflush(nullptr); - - std::wstring env_cstr; - - for (auto&& env_wstring : env_wstrings) - { - const Optional value = System::get_environment_variable(env_wstring); - const auto v = value.get(); - if (!v || v->empty()) continue; - - env_cstr.append(env_wstring); - env_cstr.push_back(L'='); - env_cstr.append(*v); - env_cstr.push_back(L'\0'); - } - - env_cstr.append(NEW_PATH); - env_cstr.push_back(L'\0'); - - STARTUPINFOW startup_info; - memset(&startup_info, 0, sizeof(STARTUPINFOW)); - startup_info.cb = sizeof(STARTUPINFOW); - - PROCESS_INFORMATION process_info; - memset(&process_info, 0, sizeof(PROCESS_INFORMATION)); - - // Basically we are wrapping it in quotes - std::wstring actual_cmd_line = Strings::wformat(LR"###(cmd.exe /c "%s")###", cmd_line); - Debug::println("CreateProcessW(%s)", Strings::to_utf8(actual_cmd_line)); - bool succeeded = TRUE == CreateProcessW(nullptr, - actual_cmd_line.data(), - nullptr, - nullptr, - FALSE, - BELOW_NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT, - env_cstr.data(), - nullptr, - &startup_info, - &process_info); - - Checks::check_exit(VCPKG_LINE_INFO, succeeded, "Process creation failed with error code: %lu", GetLastError()); - - CloseHandle(process_info.hThread); - - const DWORD result = WaitForSingleObject(process_info.hProcess, INFINITE); - Checks::check_exit(VCPKG_LINE_INFO, result != WAIT_FAILED, "WaitForSingleObject failed"); - - DWORD exit_code = 0; - GetExitCodeProcess(process_info.hProcess, &exit_code); - - Debug::println("CreateProcessW() returned %lu", exit_code); - return static_cast(exit_code); - } - - int cmd_execute(const CWStringView cmd_line) - { - // Flush stdout before launching external process - fflush(nullptr); - - // Basically we are wrapping it in quotes - const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line); - Debug::println("_wsystem(%s)", Strings::to_utf8(actual_cmd_line)); - const int exit_code = _wsystem(actual_cmd_line.c_str()); - Debug::println("_wsystem() returned %d", exit_code); - return exit_code; - } - - // On Win7, output from powershell calls contain a byte order mark, so we strip it out if it is present - static void remove_byte_order_marks(std::wstring* s) - { - const wchar_t* a = s->c_str(); - // This is the UTF-8 byte-order mark - while (s->size() >= 3 && a[0] == 0xEF && a[1] == 0xBB && a[2] == 0xBF) - { - s->erase(0, 3); - } - } - - ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line) - { - // Flush stdout before launching external process - fflush(stdout); - - const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s 2>&1")###", cmd_line); - - Debug::println("_wpopen(%s)", Strings::to_utf8(actual_cmd_line)); - std::wstring output; - wchar_t buf[1024]; - const auto pipe = _wpopen(actual_cmd_line.c_str(), L"r"); - if (pipe == nullptr) - { - return {1, Strings::to_utf8(output)}; - } - while (fgetws(buf, 1024, pipe)) - { - output.append(buf); - } - if (!feof(pipe)) - { - return {1, Strings::to_utf8(output)}; - } - - const auto ec = _pclose(pipe); - Debug::println("_pclose() returned %d", ec); - remove_byte_order_marks(&output); - return {ec, Strings::to_utf8(output)}; - } - - std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args) - { - // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned - return Strings::wformat( - LR"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args); - } - - void println() { println(Strings::EMPTY); } - - void print(const CStringView message) { fputs(message.c_str(), stdout); } - - void println(const CStringView message) - { - print(message); - putchar('\n'); - } - - void print(const Color c, const CStringView message) - { - const HANDLE console_handle = GetStdHandle(STD_OUTPUT_HANDLE); - - CONSOLE_SCREEN_BUFFER_INFO console_screen_buffer_info{}; - GetConsoleScreenBufferInfo(console_handle, &console_screen_buffer_info); - const auto original_color = console_screen_buffer_info.wAttributes; - - SetConsoleTextAttribute(console_handle, static_cast(c) | (original_color & 0xF0)); - print(message); - SetConsoleTextAttribute(console_handle, original_color); - } - - void println(const Color c, const CStringView message) - { - print(c, message); - putchar('\n'); - } - - Optional get_environment_variable(const CWStringView varname) noexcept - { - const auto sz = GetEnvironmentVariableW(varname.c_str(), nullptr, 0); - if (sz == 0) return nullopt; - - std::wstring ret(sz, L'\0'); - - Checks::check_exit(VCPKG_LINE_INFO, MAXDWORD >= ret.size()); - const auto sz2 = GetEnvironmentVariableW(varname.c_str(), ret.data(), static_cast(ret.size())); - Checks::check_exit(VCPKG_LINE_INFO, sz2 + 1 == sz); - ret.pop_back(); - return ret; - } - - static bool is_string_keytype(DWORD hkey_type) - { - return hkey_type == REG_SZ || hkey_type == REG_MULTI_SZ || hkey_type == REG_EXPAND_SZ; - } - - Optional get_registry_string(HKEY base, const CWStringView sub_key, const CWStringView valuename) - { - HKEY k = nullptr; - const LSTATUS ec = RegOpenKeyExW(base, sub_key.c_str(), NULL, KEY_READ, &k); - if (ec != ERROR_SUCCESS) return nullopt; - - DWORD dw_buffer_size = 0; - DWORD dw_type = 0; - auto rc = RegQueryValueExW(k, valuename.c_str(), nullptr, &dw_type, nullptr, &dw_buffer_size); - if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size == 0 || - dw_buffer_size % sizeof(wchar_t) != 0) - return nullopt; - std::wstring ret; - ret.resize(dw_buffer_size / sizeof(wchar_t)); - - rc = RegQueryValueExW( - k, valuename.c_str(), nullptr, &dw_type, reinterpret_cast(ret.data()), &dw_buffer_size); - if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size != sizeof(wchar_t) * ret.size()) - return nullopt; - - ret.pop_back(); // remove extra trailing null byte - return ret; - } - - static const fs::path& get_program_files() - { - static const fs::path PATH = System::get_environment_variable(L"PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO); - return PATH; - } - - const fs::path& get_program_files_32_bit() - { - static const fs::path PATH = []() -> fs::path { - auto value = System::get_environment_variable(L"ProgramFiles(x86)"); - if (auto v = value.get()) - { - return std::move(*v); - } - return get_program_files(); - }(); - return PATH; - } - - const fs::path& get_program_files_platform_bitness() - { - static const fs::path PATH = []() -> fs::path { - auto value = System::get_environment_variable(L"ProgramW6432"); - if (auto v = value.get()) - { - return std::move(*v); - } - return get_program_files(); - }(); - return PATH; - } -} - -namespace vcpkg::Debug -{ - void println(const CStringView message) - { - if (GlobalState::debugging) - { - System::println("[DEBUG] %s", message); - } - } - - void println(const System::Color c, const CStringView message) - { - if (GlobalState::debugging) - { - System::println(c, "[DEBUG] %s", message); - } - } -} diff --git a/toolsrc/src/vcpkg_metrics_uploader.cpp b/toolsrc/src/vcpkg_metrics_uploader.cpp deleted file mode 100644 index cef4f4756..000000000 --- a/toolsrc/src/vcpkg_metrics_uploader.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "metrics.h" -#include "vcpkg_Checks.h" -#include "vcpkg_Files.h" -#include - -using namespace vcpkg; - -int WINAPI WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPSTR, _In_ int) -{ - int argCount; - LPWSTR* szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount); - - Checks::check_exit(VCPKG_LINE_INFO, argCount == 2, "Requires exactly one argument, the path to the payload file"); - auto v = Files::get_real_filesystem().read_contents(szArgList[1]).value_or_exit(VCPKG_LINE_INFO); - Metrics::g_metrics.lock()->upload(v); - LocalFree(szArgList); - return 0; -} diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp deleted file mode 100644 index 5cdafdbc8..000000000 --- a/toolsrc/src/vcpkglib.cpp +++ /dev/null @@ -1,247 +0,0 @@ -#include "pch.h" - -#include "Paragraphs.h" -#include "metrics.h" -#include "vcpkg_Files.h" -#include "vcpkg_Strings.h" -#include "vcpkg_Util.h" -#include "vcpkglib.h" - -namespace vcpkg -{ - static StatusParagraphs load_current_database(Files::Filesystem& fs, - const fs::path& vcpkg_dir_status_file, - const fs::path& vcpkg_dir_status_file_old) - { - if (!fs.exists(vcpkg_dir_status_file)) - { - if (!fs.exists(vcpkg_dir_status_file_old)) - { - // no status file, use empty db - return StatusParagraphs(); - } - - fs.rename(vcpkg_dir_status_file_old, vcpkg_dir_status_file); - } - - auto pghs = Paragraphs::get_paragraphs(fs, vcpkg_dir_status_file).value_or_exit(VCPKG_LINE_INFO); - - std::vector> status_pghs; - for (auto&& p : pghs) - { - status_pghs.push_back(std::make_unique(std::move(p))); - } - - return StatusParagraphs(std::move(status_pghs)); - } - - StatusParagraphs database_load_check(const VcpkgPaths& paths) - { - auto& fs = paths.get_filesystem(); - - const auto updates_dir = paths.vcpkg_dir_updates; - - std::error_code ec; - fs.create_directory(paths.installed, ec); - fs.create_directory(paths.vcpkg_dir, ec); - fs.create_directory(paths.vcpkg_dir_info, ec); - fs.create_directory(updates_dir, ec); - - const fs::path& status_file = paths.vcpkg_dir_status_file; - const fs::path status_file_old = status_file.parent_path() / "status-old"; - const fs::path status_file_new = status_file.parent_path() / "status-new"; - - StatusParagraphs current_status_db = load_current_database(fs, status_file, status_file_old); - - auto update_files = fs.get_files_non_recursive(updates_dir); - if (update_files.empty()) - { - // updates directory is empty, control file is up-to-date. - return current_status_db; - } - for (auto&& file : update_files) - { - if (!fs.is_regular_file(file)) continue; - if (file.filename() == "incomplete") continue; - - auto pghs = Paragraphs::get_paragraphs(fs, file).value_or_exit(VCPKG_LINE_INFO); - for (auto&& p : pghs) - { - current_status_db.insert(std::make_unique(std::move(p))); - } - } - - fs.write_contents(status_file_new, Strings::serialize(current_status_db)); - - fs.rename(status_file_new, status_file); - - for (auto&& file : update_files) - { - if (!fs.is_regular_file(file)) continue; - - fs.remove(file); - } - - return current_status_db; - } - - void write_update(const VcpkgPaths& paths, const StatusParagraph& p) - { - static int update_id = 0; - auto& fs = paths.get_filesystem(); - - const auto my_update_id = update_id++; - const auto tmp_update_filename = paths.vcpkg_dir_updates / "incomplete"; - const auto update_filename = paths.vcpkg_dir_updates / std::to_string(my_update_id); - - fs.write_contents(tmp_update_filename, Strings::serialize(p)); - fs.rename(tmp_update_filename, update_filename); - } - - static void upgrade_to_slash_terminated_sorted_format(Files::Filesystem& fs, - std::vector* lines, - const fs::path& listfile_path) - { - static bool was_tracked = false; - - if (lines->empty()) - { - return; - } - - if (lines->at(0).back() == '/') - { - return; // File already in the new format - } - - if (!was_tracked) - { - was_tracked = true; - Metrics::g_metrics.lock()->track_property("listfile", "update to new format"); - } - - // The files are sorted such that directories are placed just before the files they contain - // (They are not necessarily sorted alphabetically, e.g. libflac) - // Therefore we can detect the entries that represent directories by comparing every element with the next one - // and checking if the next has a slash immediately after the current one's length - for (size_t i = 0; i < lines->size() - 1; i++) - { - std::string& current_string = lines->at(i); - const std::string& next_string = lines->at(i + 1); - - const size_t potential_slash_char_index = current_string.length(); - // Make sure the index exists first - if (next_string.size() > potential_slash_char_index && next_string.at(potential_slash_char_index) == '/') - { - current_string += '/'; // Mark as a directory - } - } - - // After suffixing the directories with a slash, we can now sort. - // We cannot sort before adding the suffixes because the following (actual example): - /* - x86-windows/include/FLAC <<<<<< This would be separated from its group due to sorting - x86-windows/include/FLAC/all.h - x86-windows/include/FLAC/assert.h - x86-windows/include/FLAC/callback.h - x86-windows/include/FLAC++ - x86-windows/include/FLAC++/all.h - x86-windows/include/FLAC++/decoder.h - x86-windows/include/FLAC++/encoder.h - * - x86-windows/include/FLAC/ <<<<<< This will now be kept with its group when sorting - x86-windows/include/FLAC/all.h - x86-windows/include/FLAC/assert.h - x86-windows/include/FLAC/callback.h - x86-windows/include/FLAC++/ - x86-windows/include/FLAC++/all.h - x86-windows/include/FLAC++/decoder.h - x86-windows/include/FLAC++/encoder.h - */ - // Note that after sorting, the FLAC++/ group will be placed before the FLAC/ group - // The new format is lexicographically sorted - std::sort(lines->begin(), lines->end()); - - // Replace the listfile on disk - const fs::path updated_listfile_path = listfile_path.generic_string() + "_updated"; - fs.write_lines(updated_listfile_path, *lines); - fs.rename(updated_listfile_path, listfile_path); - } - - std::vector get_installed_ports(const StatusParagraphs& status_db) - { - std::vector installed_packages; - for (auto&& pgh : status_db) - { - if (pgh->state != InstallState::INSTALLED || pgh->want != Want::INSTALL) continue; - installed_packages.push_back(pgh.get()); - } - - return installed_packages; - } - - std::vector get_installed_files(const VcpkgPaths& paths, - const StatusParagraphs& status_db) - { - auto& fs = paths.get_filesystem(); - - std::vector installed_files; - - for (const std::unique_ptr& pgh : status_db) - { - if (pgh->state != InstallState::INSTALLED || !pgh->package.feature.empty()) - { - continue; - } - - const fs::path listfile_path = paths.listfile_path(pgh->package); - std::vector installed_files_of_current_pgh = - fs.read_lines(listfile_path).value_or_exit(VCPKG_LINE_INFO); - Strings::trim_all_and_remove_whitespace_strings(&installed_files_of_current_pgh); - upgrade_to_slash_terminated_sorted_format(fs, &installed_files_of_current_pgh, listfile_path); - - // Remove the directories - Util::erase_remove_if(installed_files_of_current_pgh, - [](const std::string& file) { return file.back() == '/'; }); - - StatusParagraphAndAssociatedFiles pgh_and_files = { - *pgh, SortedVector(std::move(installed_files_of_current_pgh))}; - installed_files.push_back(std::move(pgh_and_files)); - } - - return installed_files; - } - - CMakeVariable::CMakeVariable(const CWStringView varname, const wchar_t* varvalue) - : s(Strings::wformat(LR"("-D%s=%s")", varname, varvalue)) - { - } - CMakeVariable::CMakeVariable(const CWStringView varname, const std::string& varvalue) - : CMakeVariable(varname, Strings::to_utf16(varvalue).c_str()) - { - } - CMakeVariable::CMakeVariable(const CWStringView varname, const std::wstring& varvalue) - : CMakeVariable(varname, varvalue.c_str()) - { - } - CMakeVariable::CMakeVariable(const CWStringView varname, const fs::path& path) - : CMakeVariable(varname, path.generic_wstring()) - { - } - - std::wstring make_cmake_cmd(const fs::path& cmake_exe, - const fs::path& cmake_script, - const std::vector& pass_variables) - { - const std::wstring cmd_cmake_pass_variables = Strings::join(L" ", pass_variables, [](auto&& v) { return v.s; }); - return Strings::wformat( - LR"("%s" %s -P "%s")", cmake_exe.native(), cmd_cmake_pass_variables, cmake_script.generic_wstring()); - } - - std::string shorten_text(const std::string& desc, size_t length) - { - Checks::check_exit(VCPKG_LINE_INFO, length >= 3); - auto simple_desc = std::regex_replace(desc, std::regex("\\s+"), " "); - return simple_desc.size() <= length ? simple_desc : simple_desc.substr(0, length - 3) + "..."; - } -} diff --git a/toolsrc/src/vcpkgmetricsuploader.cpp b/toolsrc/src/vcpkgmetricsuploader.cpp new file mode 100644 index 000000000..2239fe750 --- /dev/null +++ b/toolsrc/src/vcpkgmetricsuploader.cpp @@ -0,0 +1,20 @@ +#include + +#include +#include + +#include + +using namespace vcpkg; + +int WINAPI WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPSTR, _In_ int) +{ + int argCount; + LPWSTR* szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount); + + Checks::check_exit(VCPKG_LINE_INFO, argCount == 2, "Requires exactly one argument, the path to the payload file"); + auto v = Files::get_real_filesystem().read_contents(szArgList[1]).value_or_exit(VCPKG_LINE_INFO); + Metrics::g_metrics.lock()->upload(v); + LocalFree(szArgList); + return 0; +} diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 3bb945e85..ae332e015 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -136,114 +136,114 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create Create Create Create - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 918f83b0a..e902bffbb 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -13,312 +13,324 @@ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + {69f6b6e6-5ac4-4419-a256-b8a6b0392720} + + + {4a229410-0d09-4dab-953b-f434d6483f96} + + + {75592043-ab63-4905-beee-568a6ab8bf93} + + + {fa1f10e7-58d2-4f7c-ac26-a979baa70061} + - + Source Files - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg - - Source Files + + Source Files\vcpkg\base - - Source Files + + Source Files\vcpkg\base - - Source Files + + Source Files\vcpkg\base - - Source Files + + Source Files\vcpkg\base - - Source Files + + Source Files\vcpkg\base - - Source Files - - - Source Files + + Source Files\vcpkg\base - - Source Files + + Source Files\vcpkg\base - - Source Files - - - Source Files + + Source Files\vcpkg\base - - Source Files + + Source Files\vcpkg\base - + Header Files - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg\base - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg - - Header Files + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg \ No newline at end of file diff --git a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj index 472d74e30..4b59c5ace 100644 --- a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj +++ b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj @@ -131,7 +131,7 @@ - + diff --git a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj.filters b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj.filters index a50df7250..847921000 100644 --- a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj.filters +++ b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj.filters @@ -15,7 +15,7 @@ - + Source Files diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index 041e74d31..d25748124 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -19,11 +19,11 @@ - - - - - + + + + + diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters index b31dbd951..42691c614 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters @@ -15,19 +15,19 @@ - + Source Files - + Source Files - + Source Files - + Source Files - + Source Files -- cgit v1.2.3 From bea4c2ff4936f22b4024c2afef5e403533c7b291 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 13 Oct 2017 20:58:00 -0700 Subject: [vcpkg] Begin refactor to use CommandStructure to represent command parsing --- toolsrc/include/vcpkg/install.h | 2 + toolsrc/include/vcpkg/remove.h | 2 + toolsrc/include/vcpkg/vcpkgcmdarguments.h | 17 +++++++ toolsrc/src/vcpkg/commands.autocomplete.cpp | 77 ++++++++++++++++++----------- toolsrc/src/vcpkg/install.cpp | 38 +++++++++++--- toolsrc/src/vcpkg/remove.cpp | 37 ++++++++++++-- 6 files changed, 133 insertions(+), 40 deletions(-) diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index 02600b7f5..72643ff37 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -65,5 +65,7 @@ namespace vcpkg::Install const VcpkgPaths& paths, StatusParagraphs& status_db); + extern const CommandStructure INSTALL_COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } diff --git a/toolsrc/include/vcpkg/remove.h b/toolsrc/include/vcpkg/remove.h index f4d381ca3..04f2461be 100644 --- a/toolsrc/include/vcpkg/remove.h +++ b/toolsrc/include/vcpkg/remove.h @@ -19,6 +19,8 @@ namespace vcpkg::Remove const Purge purge, StatusParagraphs& status_db); + extern const CommandStructure REMOVE_COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db); } diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index 6c47b98f6..8b1d766b6 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -1,6 +1,8 @@ #pragma once +#include #include +#include #include #include @@ -47,4 +49,19 @@ namespace vcpkg private: std::unordered_map> optional_command_arguments; }; + + struct VcpkgPaths; + + struct CommandStructure + { + CStringView example_text; + + size_t minimum_arity; + size_t maximum_arity; + + Span switches; + Span settings; + + std::vector (*valid_arguments)(const VcpkgPaths& paths); + }; } diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index b8c633142..2e191b428 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -2,8 +2,10 @@ #include #include +#include #include #include +#include #include namespace vcpkg::Commands::Autocomplete @@ -47,6 +49,7 @@ namespace vcpkg::Commands::Autocomplete { const SortedVector sorted_results(results); System::println(Strings::join("\n", sorted_results)); + Checks::exit_success(line_info); } @@ -63,21 +66,23 @@ namespace vcpkg::Commands::Autocomplete { const std::string requested_command = match[1].str(); - std::vector valid_commands = {"install", - "search", - "remove", - "list", - "update", - "hash", - "help", - "integrate", - "export", - "edit", - "create", - "owns", - "cache", - "version", - "contact"}; + std::vector valid_commands = { + "install", + "search", + "remove", + "list", + "update", + "hash", + "help", + "integrate", + "export", + "edit", + "create", + "owns", + "cache", + "version", + "contact", + }; Util::unstable_keep_if(valid_commands, [&](const std::string& s) { return Strings::case_insensitive_ascii_starts_with(s, requested_command); @@ -86,22 +91,36 @@ namespace vcpkg::Commands::Autocomplete output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(valid_commands)); } - // Handles vcpkg install - if (std::regex_match(to_autocomplete, match, std::regex{R"###(^install.* (\S*)$)###"})) + struct CommandEntry { - const std::string start_with = match[1].str(); - auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); - auto& source_paragraphs = sources_and_errors.paragraphs; - output_sorted_results_and_exit(VCPKG_LINE_INFO, autocomplete_install(source_paragraphs, start_with)); - } - - // Handles vcpkg remove - if (std::regex_match(to_autocomplete, match, std::regex{R"###(^remove.* (\S*)$)###"})) + CStringView regex; + const CommandStructure& structure; + }; + static constexpr CommandEntry commands[] = { + {R"###(^install\s(.*\s|)(\S*)$)###", Install::INSTALL_COMMAND_STRUCTURE}, + {R"###(^remove\s(.*\s|)(\S*)$)###", Remove::REMOVE_COMMAND_STRUCTURE}, + }; + + for (auto&& command : commands) { - const std::string start_with = match[1].str(); - const StatusParagraphs status_db = database_load_check(paths); - const std::vector installed_packages = get_installed_ports(status_db); - output_sorted_results_and_exit(VCPKG_LINE_INFO, autocomplete_remove(installed_packages, start_with)); + if (std::regex_match(to_autocomplete, match, std::regex{command.regex.c_str()})) + { + auto prefix = match[2].str(); + std::vector v; + if (Strings::case_insensitive_ascii_starts_with(prefix, "-")) + { + v = Util::fmap(command.structure.switches, [](auto&& s) -> std::string { return s; }); + } + else + { + v = command.structure.valid_arguments(paths); + } + + Util::unstable_keep_if( + v, [&](const std::string& s) { return Strings::case_insensitive_ascii_starts_with(s, prefix); }); + + output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(v)); + } } Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 28d6d1cc6..6a564b00c 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -525,14 +525,40 @@ namespace vcpkg::Install Checks::exit_success(VCPKG_LINE_INFO); } - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + static const std::string OPTION_DRY_RUN = "--dry-run"; + static const std::string OPTION_USE_HEAD_VERSION = "--head"; + static const std::string OPTION_NO_DOWNLOADS = "--no-downloads"; + static const std::string OPTION_RECURSE = "--recurse"; + static const std::string OPTION_KEEP_GOING = "--keep-going"; + + static const std::array INSTALL_SWITCHES = { + OPTION_DRY_RUN, + OPTION_USE_HEAD_VERSION, + OPTION_NO_DOWNLOADS, + OPTION_RECURSE, + OPTION_KEEP_GOING, + }; + static const std::array INSTALL_SETTINGS; + + static std::vector valid_arguments(const VcpkgPaths& paths) { - static const std::string OPTION_DRY_RUN = "--dry-run"; - static const std::string OPTION_USE_HEAD_VERSION = "--head"; - static const std::string OPTION_NO_DOWNLOADS = "--no-downloads"; - static const std::string OPTION_RECURSE = "--recurse"; - static const std::string OPTION_KEEP_GOING = "--keep-going"; + auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); + + return Util::fmap(sources_and_errors.paragraphs, + [](auto&& pgh) -> std::string { return pgh->core_paragraph->name; }); + } + const CommandStructure INSTALL_COMMAND_STRUCTURE = { + "install zlib zlib:x64-windows curl boost", + 1, + SIZE_MAX, + INSTALL_SWITCHES, + INSTALL_SETTINGS, + &valid_arguments, + }; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + { // input sanitization static const std::string EXAMPLE = Help::create_example_string("install zlib zlib:x64-windows curl boost"); args.check_min_arg_count(1, EXAMPLE); diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 3751566f7..30b3d6cd8 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -163,13 +163,40 @@ namespace vcpkg::Remove } } + static const std::string OPTION_PURGE = "--purge"; + static const std::string OPTION_NO_PURGE = "--no-purge"; + static const std::string OPTION_RECURSE = "--recurse"; + static const std::string OPTION_DRY_RUN = "--dry-run"; + static const std::string OPTION_OUTDATED = "--outdated"; + + static const std::array REMOVE_SWITCHES = { + OPTION_PURGE, + OPTION_NO_PURGE, + OPTION_RECURSE, + OPTION_DRY_RUN, + OPTION_OUTDATED, + }; + static const std::array REMOVE_SETTINGS; + + static std::vector valid_arguments(const VcpkgPaths& paths) + { + const StatusParagraphs status_db = database_load_check(paths); + const std::vector installed_packages = get_installed_ports(status_db); + + return Util::fmap(installed_packages, [](auto&& pgh) -> std::string { return pgh->package.spec.to_string(); }); + } + + const CommandStructure REMOVE_COMMAND_STRUCTURE = { + "remove zlib zlib:x64-windows curl boost", + 1, + SIZE_MAX, + REMOVE_SWITCHES, + REMOVE_SETTINGS, + &valid_arguments, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string OPTION_PURGE = "--purge"; - static const std::string OPTION_NO_PURGE = "--no-purge"; - static const std::string OPTION_RECURSE = "--recurse"; - static const std::string OPTION_DRY_RUN = "--dry-run"; - static const std::string OPTION_OUTDATED = "--outdated"; static const std::string EXAMPLE = Help::create_example_string("remove zlib zlib:x64-windows curl boost"); const std::unordered_set options = args.check_and_get_optional_command_arguments( {OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED}); -- cgit v1.2.3 From 4ce8f0aa31da63f84fc81dfd895faaeb03d5c7b1 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 13 Oct 2017 21:25:18 -0700 Subject: new port: cgal --- ports/cgal/CONTROL | 4 ++++ ports/cgal/portfile.cmake | 26 ++++++++++++++++++++++++++ scripts/cmake/vcpkg_from_github.cmake | 1 + 3 files changed, 31 insertions(+) create mode 100644 ports/cgal/CONTROL create mode 100644 ports/cgal/portfile.cmake diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL new file mode 100644 index 000000000..d6d01956d --- /dev/null +++ b/ports/cgal/CONTROL @@ -0,0 +1,4 @@ +Source: cgal +Version: 4.11 +Build-Depends:mpfr, mpir, zlib, boost, qt5 +Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry. diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake new file mode 100644 index 000000000..c55d0ba3e --- /dev/null +++ b/ports/cgal/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CGAL/cgal + REF releases/CGAL-4.11 + SHA512 91e555d5988bee387afa31331e1e3a8990206468fd8c774fd82979d9ff169e9c4835ecc6ba3d576cda617b6cb2cd52d27657d2434e38b29ce0e7e643436810ab + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/CGAL") + +vcpkg_copy_pdbs() + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright of suitesparse and metis +file(COPY ${SOURCE_PATH}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal) diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index 645690353..d14077410 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -80,6 +80,7 @@ function(vcpkg_from_github) else() # Sometimes GitHub strips a leading 'v' off the REF. string(REGEX REPLACE "^v" "" REF ${BASEREF}) + string(REPLACE "/" "-" REF ${REF}) set(SOURCE_PATH "${BASE}/${REPO_NAME}-${REF}") if(EXISTS ${SOURCE_PATH}) set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) -- cgit v1.2.3 From fc1a24ad8bb3187d17341c967353c3cc9742317a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 14 Oct 2017 01:45:28 -0700 Subject: [vcpkg] Initial commit of powershell integration --- scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd1 | 31 +++++++++++++++++++++++++ scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1 | 39 ++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd1 create mode 100644 scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1 diff --git a/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd1 b/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd1 new file mode 100644 index 000000000..3fb94fe7d --- /dev/null +++ b/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd1 @@ -0,0 +1,31 @@ +@{ + +# Script module or binary module file associated with this manifest. +ModuleToProcess = 'posh-vcpkg.psm1' + +# Version number of this module. +ModuleVersion = '0.0.1' + +# ID used to uniquely identify this module +GUID = '948f02ab-fc99-4a53-8335-b6556eef129b' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '5.0' + +FunctionsToExport = @('TabExpansion') +CmdletsToExport = @() +VariablesToExport = @() +AliasesToExport = @() + +# Private data to pass to the module specified in RootModule/ModuleToProcess. +# This may also contain a PSData hashtable with additional module metadata used by PowerShell. +PrivateData = +@{ + PSData = + @{ + # Tags applied to this module. These help with module discovery in online galleries. + Tags = @('vcpkg', 'tab', 'tab-completion', 'tab-expansion', 'tabexpansion') + } +} + +} diff --git a/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1 b/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1 new file mode 100644 index 000000000..25ef99609 --- /dev/null +++ b/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1 @@ -0,0 +1,39 @@ +param() + +if (Get-Module posh-vcpkg) { return } + +if ($PSVersionTable.PSVersion.Major -lt 5) { + Write-Warning ("posh-vcpkg does not support PowerShell versions before 5.0.") + return +} + +if (Test-Path Function:\TabExpansion) { + Rename-Item Function:\TabExpansion VcpkgTabExpansionBackup +} + +function TabExpansion($line, $lastWord) { + $lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart() + + switch -regex ($lastBlock) { + "^(?(\./|\.\\|)vcpkg(\.exe|)) (?.*)$" + { + & $matches['vcpkgexe'] autocomplete $matches['remaining'] + return + } + + # Fall back on existing tab expansion + default { + if (Test-Path Function:\VcpkgTabExpansionBackup) { + VcpkgTabExpansionBackup $line $lastWord + } + } + } +} + +$exportModuleMemberParams = @{ + Function = @( + 'TabExpansion' + ) +} + +Export-ModuleMember @exportModuleMemberParams -- cgit v1.2.3 From bf41a93b9de45f5d407fd03a36096f2cd37902b4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 14 Oct 2017 02:07:42 -0700 Subject: [vcpkg] Prefer the current vcpkg directory over the one the vcpkg.exe is located in --- toolsrc/src/vcpkg.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 748b4f0ee..f1a86ae22 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -74,8 +74,14 @@ static void inner(const VcpkgCmdArguments& args) } else { - vcpkg_root_dir = Files::get_real_filesystem().find_file_recursively_up( - fs::stdfs::absolute(System::get_exe_path_of_current_process()), ".vcpkg-root"); + const fs::path current_path = fs::stdfs::current_path(); + vcpkg_root_dir = Files::get_real_filesystem().find_file_recursively_up(current_path, ".vcpkg-root"); + + if (vcpkg_root_dir.empty()) + { + vcpkg_root_dir = Files::get_real_filesystem().find_file_recursively_up( + fs::stdfs::absolute(System::get_exe_path_of_current_process()), ".vcpkg-root"); + } } } @@ -88,6 +94,7 @@ static void inner(const VcpkgCmdArguments& args) vcpkg_root_dir.string(), expected_paths.error().message()); const VcpkgPaths paths = expected_paths.value_or_exit(VCPKG_LINE_INFO); + const int exit_code = _wchdir(paths.root.c_str()); Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed"); Commands::Version::warn_if_vcpkg_version_mismatch(paths); -- cgit v1.2.3 From b73327558ba79354769961a8c3f68e61fe9b673e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 14 Oct 2017 02:07:56 -0700 Subject: `integrate` Fix quotes in command (in case of space in the path) --- toolsrc/src/vcpkg/commands.integrate.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 7f6639222..85b567adb 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -230,13 +230,14 @@ namespace vcpkg::Commands::Integrate } System::println(System::Color::success, "Applied user-wide integration for this vcpkg root."); const fs::path cmake_toolchain = paths.buildsystems / "vcpkg.cmake"; - System::println("\n" - "All MSBuild C++ projects can now #include any installed libraries.\n" - "Linking will be handled automatically.\n" - "Installing new libraries will make them instantly available.\n" - "\n" - "CMake projects should use -DCMAKE_TOOLCHAIN_FILE=%s", - cmake_toolchain.generic_string()); + System::println( + R"( +All MSBuild C++ projects can now #include any installed libraries. +Linking will be handled automatically. +Installing new libraries will make them instantly available. + +CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", + cmake_toolchain.generic_string()); Checks::exit_success(VCPKG_LINE_INFO); } -- cgit v1.2.3 From 58fd38c8200ce4c96ebe1aae3f85b324456b0ff7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 14 Oct 2017 02:16:55 -0700 Subject: [vcpkg-autocomplete] Add edit completion --- toolsrc/include/vcpkg/commands.h | 1 + toolsrc/include/vcpkg/install.h | 2 +- toolsrc/include/vcpkg/remove.h | 2 +- toolsrc/src/vcpkg/commands.autocomplete.cpp | 5 +++-- toolsrc/src/vcpkg/commands.edit.cpp | 27 +++++++++++++++++++++++++-- toolsrc/src/vcpkg/install.cpp | 2 +- toolsrc/src/vcpkg/remove.cpp | 2 +- 7 files changed, 33 insertions(+), 8 deletions(-) diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 64b2118ce..e00812c98 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -38,6 +38,7 @@ namespace vcpkg::Commands namespace Edit { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index 72643ff37..db6055f4f 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -65,7 +65,7 @@ namespace vcpkg::Install const VcpkgPaths& paths, StatusParagraphs& status_db); - extern const CommandStructure INSTALL_COMMAND_STRUCTURE; + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } diff --git a/toolsrc/include/vcpkg/remove.h b/toolsrc/include/vcpkg/remove.h index 04f2461be..6d8a3ebe9 100644 --- a/toolsrc/include/vcpkg/remove.h +++ b/toolsrc/include/vcpkg/remove.h @@ -19,7 +19,7 @@ namespace vcpkg::Remove const Purge purge, StatusParagraphs& status_db); - extern const CommandStructure REMOVE_COMMAND_STRUCTURE; + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db); diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index 2e191b428..23c2c2f7e 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -97,8 +97,9 @@ namespace vcpkg::Commands::Autocomplete const CommandStructure& structure; }; static constexpr CommandEntry commands[] = { - {R"###(^install\s(.*\s|)(\S*)$)###", Install::INSTALL_COMMAND_STRUCTURE}, - {R"###(^remove\s(.*\s|)(\S*)$)###", Remove::REMOVE_COMMAND_STRUCTURE}, + {R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, + {R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, + {R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, }; for (auto&& command : commands) diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index 9497bd76e..a90ae1bc3 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace vcpkg::Commands::Edit { @@ -30,10 +31,32 @@ namespace vcpkg::Commands::Edit return output; } - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + static const std::string OPTION_BUILDTREES = "--buildtrees"; + + static const std::array SWITCHES = { + OPTION_BUILDTREES, + }; + static const std::array SETTINGS; + + static std::vector valid_arguments(const VcpkgPaths& paths) { - static const std::string OPTION_BUILDTREES = "--buildtrees"; + auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); + + return Util::fmap(sources_and_errors.paragraphs, + [](auto&& pgh) -> std::string { return pgh->core_paragraph->name; }); + } + + const CommandStructure COMMAND_STRUCTURE = { + "edit zlib", + 1, + 1, + SWITCHES, + SETTINGS, + &valid_arguments, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { static const fs::path VS_CODE_INSIDERS = fs::path{"Microsoft VS Code Insiders"} / "Code - Insiders.exe"; static const fs::path VS_CODE = fs::path{"Microsoft VS Code"} / "Code.exe"; diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 6a564b00c..26f729a57 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -548,7 +548,7 @@ namespace vcpkg::Install [](auto&& pgh) -> std::string { return pgh->core_paragraph->name; }); } - const CommandStructure INSTALL_COMMAND_STRUCTURE = { + const CommandStructure COMMAND_STRUCTURE = { "install zlib zlib:x64-windows curl boost", 1, SIZE_MAX, diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 30b3d6cd8..04ddba1e4 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -186,7 +186,7 @@ namespace vcpkg::Remove return Util::fmap(installed_packages, [](auto&& pgh) -> std::string { return pgh->package.spec.to_string(); }); } - const CommandStructure REMOVE_COMMAND_STRUCTURE = { + const CommandStructure COMMAND_STRUCTURE = { "remove zlib zlib:x64-windows curl boost", 1, SIZE_MAX, -- cgit v1.2.3 From ab48a71c9af25041ab29a0d8e62a3cdf380638a5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 14 Oct 2017 05:38:43 -0700 Subject: [cctz][abseil] Initial commit of cctz, improvement of abseil to build synch and time. --- ports/abseil/CMakeLists.txt | 32 ++++++++++++++++++++++++-------- ports/abseil/CONTROL | 3 ++- ports/abseil/portfile.cmake | 5 ++--- ports/cctz/CMakeLists.txt | 36 ++++++++++++++++++++++++++++++++++++ ports/cctz/CONTROL | 3 +++ ports/cctz/portfile.cmake | 24 ++++++++++++++++++++++++ 6 files changed, 91 insertions(+), 12 deletions(-) create mode 100644 ports/cctz/CMakeLists.txt create mode 100644 ports/cctz/CONTROL create mode 100644 ports/cctz/portfile.cmake diff --git a/ports/abseil/CMakeLists.txt b/ports/abseil/CMakeLists.txt index 34b69817a..4a96b3fde 100644 --- a/ports/abseil/CMakeLists.txt +++ b/ports/abseil/CMakeLists.txt @@ -1,21 +1,29 @@ cmake_minimum_required(VERSION 3.8) project(abseil CXX) -add_definitions(-DNOMINMAX) +add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN) set(CMAKE_DEBUG_POSTFIX d) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -option(INSTALL_HEADERS "Install header files" ON) +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") + list(FILTER SOURCES EXCLUDE REGEX "_test(_.+)?.cc$|_nonprod.cc$") file(GLOB HEADERS "absl/${LIB}/*.h") file(GLOB INTERNAL_HEADERS "absl/${LIB}/internal/*.h") if(SOURCES) - add_library(${LIB} ${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() @@ -49,14 +57,17 @@ function(target_link_public_libraries A) endif() endfunction() -add_sublibrary(base) -add_sublibrary(meta) add_sublibrary(algorithm) +add_sublibrary(base) add_sublibrary(container) -add_sublibrary(memory) -add_sublibrary(strings) add_sublibrary(debugging) +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) @@ -68,6 +79,11 @@ 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) + +find_package(unofficial-cctz REQUIRED) +targeT_link_libraries(time PUBLIC unofficial::cctz) install( EXPORT unofficial-abseil-targets diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index fb37a8cae..44684b6b8 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,6 +1,7 @@ Source: abseil -Version: 2017-09-28 +Version: 2017-10-14 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole. +Build-Depends: cctz diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 8c9e81aa3..8273f80e3 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -10,8 +10,8 @@ message("To use from cmake:\n find_package(unofficial-abseil REQUIRED)\n link_ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF cdf20caa491f59c0a35a8d8fbec0d948e4bc7e4c - SHA512 04889e7804b644821d0bf5d1b13f15a072e748bf0465442c64528e014c71f415544e9146c9518f9fe7bb14a295b18f293c3f7b672f6a51dba9909f3b74667fae + REF 1a9ba5e2e5a14413704f0c913fac53359576d3b6 + SHA512 756e494c30324c937ca655d91afdee9acb923c7ee837a7c685441305bea2d54a75b3b21be7355abe416660984ba51ace9d234d70168fb029c601b7442397e8ff HEAD_REF master ) @@ -25,7 +25,6 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS_DEBUG -DINSTALL_HEADERS=OFF ) vcpkg_install_cmake() diff --git a/ports/cctz/CMakeLists.txt b/ports/cctz/CMakeLists.txt new file mode 100644 index 000000000..99322d05e --- /dev/null +++ b/ports/cctz/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.8) +project(cctz CXX) + +set(CMAKE_DEBUG_POSTFIX d) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + +if(CMAKE_BUILD_TYPE STREQUAL "Release") + option(INSTALL_HEADERS "Install header files" ON) +else() + option(INSTALL_HEADERS "Install header files" OFF) +endif() + +file(GLOB SOURCES src/*.cc) +list(FILTER SOURCES EXCLUDE REGEX "_test.cc$|benchmarks|_tool.cc$") + +file(GLOB HEADERS include/cctz/*.h) + +add_library(cctz ${SOURCES}) +target_include_directories(cctz PUBLIC $ $) + +if(INSTALL_HEADERS) + install(FILES ${HEADERS} DESTINATION "include/cctz") +endif() + +install(TARGETS cctz EXPORT unofficial-cctz-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT unofficial-cctz-targets + FILE unofficial-cctz-config.cmake + NAMESPACE unofficial:: + DESTINATION share/unofficial-cctz +) diff --git a/ports/cctz/CONTROL b/ports/cctz/CONTROL new file mode 100644 index 000000000..fb125fa13 --- /dev/null +++ b/ports/cctz/CONTROL @@ -0,0 +1,3 @@ +Source: cctz +Version: v2.1 +Description: two libraries that cooperate with to give C++ programmers all the necessary tools for computing with dates, times, and time zones in a simple and correct manner. diff --git a/ports/cctz/portfile.cmake b/ports/cctz/portfile.cmake new file mode 100644 index 000000000..11955b365 --- /dev/null +++ b/ports/cctz/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/cctz + REF v2.1 + SHA512 b6531ce64fdd8581944457cdeff7f9ff9c00958af51ddb262c74e08fcc076466c59c7bef1ce7edccc9512a7f4cb204e04581d287c4a9a684057fe39421c3fbc6 + 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-cctz) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cctz ${CURRENT_PACKAGES_DIR}/share/unofficial-cctz) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cctz RENAME copyright) -- cgit v1.2.3 From 561cfe89e653aef903488f7af7d4d17cfb11a26c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 14 Oct 2017 05:45:57 -0700 Subject: [eastl] Initial commit --- ports/eastl/CONTROL | 4 ++++ ports/eastl/portfile.cmake | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 ports/eastl/CONTROL create mode 100644 ports/eastl/portfile.cmake diff --git a/ports/eastl/CONTROL b/ports/eastl/CONTROL new file mode 100644 index 000000000..d43d7203e --- /dev/null +++ b/ports/eastl/CONTROL @@ -0,0 +1,4 @@ +Source: eastl +Version: 3.05.08 +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/portfile.cmake b/ports/eastl/portfile.cmake new file mode 100644 index 000000000..19fb6e51c --- /dev/null +++ b/ports/eastl/portfile.cmake @@ -0,0 +1,29 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported by EASTL. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eastl) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO electronicarts/EASTL + REF 3.05.08 + SHA512 7b9e87d967252026a660a648688a19e7b88d4eca7f373ba7427b315103a6f8cea555a85b2ef74557cf7e8a486b847589cac4b622b4ab88cab7c0f0a22355ab66 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/eastl RENAME copyright) +file(INSTALL ${SOURCE_PATH}/3RDPARTYLICENSES.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/eastl) -- cgit v1.2.3 From 630bcd84b8325217c440def11681e375f5ef4652 Mon Sep 17 00:00:00 2001 From: martin-s Date: Sat, 14 Oct 2017 18:31:53 +0200 Subject: - Updated naming of msvcrt vector. --- toolsrc/src/PostBuildLint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp index 58d6f987b..5de1078cd 100644 --- a/toolsrc/src/PostBuildLint.cpp +++ b/toolsrc/src/PostBuildLint.cpp @@ -57,7 +57,7 @@ namespace vcpkg::PostBuildLint {"msvcrt40.dll", R"(msvcrt40\.dll)"}, }; - static const std::vector V = [&]() { + static const std::vector V_NO_MSVCRT = [&]() { auto ret = V_NO_120; ret.push_back({"msvcp120.dll", R"(msvcp120\.dll)"}); ret.push_back({"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"}); @@ -69,7 +69,7 @@ namespace vcpkg::PostBuildLint if (toolset == "v120") return V_NO_120; else - return V; + return V_NO_MSVCRT; } static LintStatus check_for_files_in_include_directory(const Files::Filesystem& fs, -- cgit v1.2.3 From c6d69fac625706c52fc8e48615bc0c6d7b8dad25 Mon Sep 17 00:00:00 2001 From: martin-s Date: Sun, 15 Oct 2017 02:13:36 +0200 Subject: - Fixed formatting. --- toolsrc/src/vcpkg/postbuildlint.cpp | 16 ++++++++-------- toolsrc/src/vcpkg/vcpkgpaths.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp index b2422b4b2..548093c6f 100644 --- a/toolsrc/src/vcpkg/postbuildlint.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -66,14 +66,14 @@ namespace vcpkg::PostBuildLint return ret; }(); - const auto tsv = toolset_version.get(); - if (tsv && (*tsv) == "v120") - { - return V_NO_120; - } - - // Default case for all version >= VS 2015. - return V_NO_MSVCRT; + const auto tsv = toolset_version.get(); + if (tsv && (*tsv) == "v120") + { + return V_NO_120; + } + + // Default case for all version >= VS 2015. + return V_NO_MSVCRT; } static LintStatus check_for_files_in_include_directory(const Files::Filesystem& fs, diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index f0e02db8a..b6ec2cb52 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -448,7 +448,7 @@ namespace vcpkg vs_dumpbin_exe, vcvarsall_bat, {}, - major_version == "14" ? V_140 : V_120, + major_version == "14" ? V_140 : V_120, supported_architectures}); } } -- cgit v1.2.3 From 1f84970219822f8cf124925f7e8923c797a7d883 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 14 Oct 2017 21:57:18 -0700 Subject: [abseil] Remove patch that has already been upstreamed. Fixes #1977 --- ports/abseil/fix-intrin.patch | 12 ------------ ports/abseil/portfile.cmake | 5 ----- 2 files changed, 17 deletions(-) delete mode 100644 ports/abseil/fix-intrin.patch diff --git a/ports/abseil/fix-intrin.patch b/ports/abseil/fix-intrin.patch deleted file mode 100644 index 285adde0f..000000000 --- a/ports/abseil/fix-intrin.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/absl/base/optimization.h b/absl/base/optimization.h -index db8beaf..aaaffa4 100644 ---- a/absl/base/optimization.h -+++ b/absl/base/optimization.h -@@ -46,6 +46,7 @@ - // GCC will not tail call given inline volatile assembly. - #define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __asm__ __volatile__("") - #elif defined(_MSC_VER) -+#include - // The __nop() intrinsic blocks the optimisation. - #define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __nop() - #else diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 8273f80e3..d74369951 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -15,11 +15,6 @@ vcpkg_from_github( HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-intrin.patch" -) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( -- cgit v1.2.3 From a607ad686033e455286986934ad57cebdf0a84f5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 14 Oct 2017 22:26:06 -0700 Subject: [imgui] Use vcpkg_from_github, use stb from vcpkg. --- ports/imgui/CMakeLists.txt | 16 +++++++--------- ports/imgui/CONTROL | 4 ++-- ports/imgui/portfile.cmake | 22 ++++++++++++++++------ 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt index e0f524f02..a4c49a337 100644 --- a/ports/imgui/CMakeLists.txt +++ b/ports/imgui/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 3.8) project(imgui CXX) +set(CMAKE_DEBUG_POSTFIX d) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + find_path(STB_INCLUDE_DIR stb_rect_pack.h stb_textedit.h stb_truetype.h) set(IMGUI_INCLUDES_PUBLIC @@ -18,22 +21,17 @@ set(IMGUI_SOURCES imgui_draw.cpp ) -add_library(imgui STATIC +add_library(imgui ${IMGUI_INCLUDES_PUBLIC} ${IMGUI_INCLUDES_PRIVATE} ${IMGUI_SOURCES} ) -target_include_directories(imgui - PRIVATE - ${IMGUI_INCLUDES_PRIVATE} - ${STB_INCLUDE_DIR} - - PUBLIC - ${IMGUI_INCLUDES_PUBLIC} -) +target_include_directories(imgui PUBLIC ${STB_INCLUDE_DIR}) install(TARGETS imgui + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL index d0baa98db..35e041de1 100644 --- a/ports/imgui/CONTROL +++ b/ports/imgui/CONTROL @@ -1,4 +1,4 @@ Source: imgui -Version: 1.51 -Build-Depends: stb (windows) +Version: 1.51-1 +Build-Depends: stb 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 022efd8ce..587a4cf19 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -1,13 +1,23 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/imgui-1.51) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/ocornut/imgui/archive/v1.51.zip" - FILENAME "imgui-1.51.zip" - SHA512 a3c77887396991f8371c0cf5b42d781d758877cdb194a7c6ea8b34939f4b300f55f176d601dd0e167ea2a20bd8a47b958ad1bca16864a19c1cc9b2c7a889ab29 + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ocornut/imgui + REF v1.51 + SHA512 33aea46d0ab8419fcd4af765c9f1a88dfb1b80ad466276b655a67f40ffedabe399db6b0d76a2ece74e551928bd6f842ae3fa42998e0b1a2206157a3852e002d6 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(GLOB STB_HEADERS ${SOURCE_PATH}/stb_*.h) +if(STB_HEADERS) + file(REMOVE ${STB_HEADERS}) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 2a94ee4c62ad8b3468ae10fa5c0f02dc92e0c1be Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Sun, 15 Oct 2017 22:22:17 +1100 Subject: qt5 base --- ports/qt5base/CONTROL | 4 ++ ports/qt5base/configure_qt.cmake | 63 ++++++++++++++++++++ ports/qt5base/fix-system-pcre2.patch | 18 ++++++ ports/qt5base/fixcmake.py | 48 +++++++++++++++ ports/qt5base/install_qt.cmake | 45 +++++++++++++++ ports/qt5base/portfile.cmake | 109 +++++++++++++++++++++++++++++++++++ 6 files changed, 287 insertions(+) create mode 100644 ports/qt5base/CONTROL create mode 100644 ports/qt5base/configure_qt.cmake create mode 100644 ports/qt5base/fix-system-pcre2.patch create mode 100644 ports/qt5base/fixcmake.py create mode 100644 ports/qt5base/install_qt.cmake create mode 100644 ports/qt5base/portfile.cmake diff --git a/ports/qt5base/CONTROL b/ports/qt5base/CONTROL new file mode 100644 index 000000000..0b9e4792a --- /dev/null +++ b/ports/qt5base/CONTROL @@ -0,0 +1,4 @@ +Source: qt5base +Version: 5.9.2-0 +Description: Qt5 application framework base components. Webengine, examples and tests not included. +Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion diff --git a/ports/qt5base/configure_qt.cmake b/ports/qt5base/configure_qt.cmake new file mode 100644 index 000000000..fea8de923 --- /dev/null +++ b/ports/qt5base/configure_qt.cmake @@ -0,0 +1,63 @@ +function(configure_qt) + cmake_parse_arguments(_csc "" "SOURCE_PATH;PLATFORM" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + + if (_csc_PLATFORM) + set(PLATFORM ${_csc_PLATFORM}) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") + set(PLATFORM "win32-msvc2015") + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(PLATFORM "win32-msvc2017") + endif() + + vcpkg_find_acquire_program(PERL) + get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") + + if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) + list(APPEND _csc_OPTIONS + "-static" + "-static-runtime" + ) + endif() + + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + vcpkg_execute_required_process( + COMMAND "${_csc_SOURCE_PATH}/configure.bat" ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} + -debug + -prefix ${CURRENT_PACKAGES_DIR}/debug + -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 + -archdatadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5 + -datadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5 + -plugindir ${CURRENT_PACKAGES_DIR}/debug/plugins + -qmldir ${CURRENT_PACKAGES_DIR}/debug/qml + -I ${CURRENT_INSTALLED_DIR}/include + -L ${CURRENT_INSTALLED_DIR}/debug/lib + -platform ${PLATFORM} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + vcpkg_execute_required_process( + COMMAND "${_csc_SOURCE_PATH}/configure.bat" ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} + -release + -prefix ${CURRENT_PACKAGES_DIR} + -hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5 + -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5 + -datadir ${CURRENT_PACKAGES_DIR}/share/qt5 + -plugindir ${CURRENT_PACKAGES_DIR}/plugins + -qmldir ${CURRENT_PACKAGES_DIR}/qml + -I ${CURRENT_INSTALLED_DIR}/include + -L ${CURRENT_INSTALLED_DIR}/lib + -platform ${PLATFORM} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + +endfunction() \ No newline at end of file diff --git a/ports/qt5base/fix-system-pcre2.patch b/ports/qt5base/fix-system-pcre2.patch new file mode 100644 index 000000000..be401d448 --- /dev/null +++ b/ports/qt5base/fix-system-pcre2.patch @@ -0,0 +1,18 @@ +diff --git a/src/corelib/configure.json b/src/corelib/configure.json +index a5b69a2..01c5cde 100644 +--- a/src/corelib/configure.json ++++ b/src/corelib/configure.json +@@ -159,7 +159,12 @@ + ] + }, + "sources": [ +- "-lpcre2-16" ++ { ++ "builds": { ++ "debug": "-lpcre2-16d", ++ "release": "-lpcre2-16" ++ } ++ } + ] + }, + "pps": { diff --git a/ports/qt5base/fixcmake.py b/ports/qt5base/fixcmake.py new file mode 100644 index 000000000..d55ca7754 --- /dev/null +++ b/ports/qt5base/fixcmake.py @@ -0,0 +1,48 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + for line in openedfile: + if "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5base/install_qt.cmake b/ports/qt5base/install_qt.cmake new file mode 100644 index 000000000..1b0bec935 --- /dev/null +++ b/ports/qt5base/install_qt.cmake @@ -0,0 +1,45 @@ +function(install_qt) + cmake_parse_arguments(_bc "DISABLE_PARALLEL" "" "" ${ARGN}) + + if (_bc_DISABLE_PARALLEL) + set(JOBS "1") + else() + set(JOBS "$ENV{NUMBER_OF_PROCESSORS}") + endif() + + vcpkg_find_acquire_program(JOM) + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) + + set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") + set(_path "$ENV{PATH}") + + message(STATUS "Package ${TARGET_TRIPLET}-rel") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${_path}") + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME build-${TARGET_TRIPLET}-rel + ) + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME package-${TARGET_TRIPLET}-rel + ) + message(STATUS "Package ${TARGET_TRIPLET}-rel done") + + message(STATUS "Package ${TARGET_TRIPLET}-dbg") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/bin;${_path}") + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME package-${TARGET_TRIPLET}-dbg + ) + set(ENV{PATH} "${_path}") + message(STATUS "Package ${TARGET_TRIPLET}-dbg done") +endfunction() \ No newline at end of file diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake new file mode 100644 index 000000000..9e2efeac7 --- /dev/null +++ b/ports/qt5base/portfile.cmake @@ -0,0 +1,109 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +include(configure_qt) +include(install_qt) + +set(SRCDIR_NAME "qt-5.9.2") +set(ARCHIVE_NAME "qtbase-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 a2f965871645256f3d019f71f3febb875455a29d03fccc7a3371ddfeb193b0af12394e779df05adf69fd10fe7b0d966f3915a24528ec7eb3bc36c2db6af2b6e7 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2.patch" +) + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +configure_qt( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -confirm-license + -opensource + -system-zlib + -system-libjpeg + -system-libpng + -system-freetype + -system-pcre + -system-harfbuzz + -system-doubleconversion + -system-sqlite + -sql-sqlite + -sql-psql + -feature-freetype + -nomake examples -nomake tests + -opengl desktop # other options are "-no-opengl" and "-opengl angle" + -mp + LIBJPEG_LIBS="-ljpeg" + OPTIONS_RELEASE + ZLIB_LIBS="-lzlib" + LIBPNG_LIBS="-llibpng16" + OPTIONS_DEBUG + ZLIB_LIBS="-lzlibd" + LIBPNG_LIBS="-llibpng16d" + PSQL_LIBS="-llibpqd" + FREETYPE_LIBS="-lfreetyped" +) + +install_qt() + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) +file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +file(REMOVE ${BINARY_TOOLS}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cmake + LOGNAME fix-cmake +) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +#--------------------------------------------------------------------------- +# Qt5Bootstrap: a release-only dependency +#--------------------------------------------------------------------------- +# Remove release-only Qt5Bootstrap.lib from debug folders: +#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) +#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) +# Above approach does not work: +# check_matching_debug_and_release_binaries(dbg_libs, rel_libs) +# requires the two sets to be of equal size! +# Alt. approach, create dummy folder instead: +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) +#--------------------------------------------------------------------------- + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5base RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From 459ac9f2e17340e10e3cb8a66f956c59541d5fdd Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 16 Oct 2017 00:40:25 +1100 Subject: qt5tools package --- ports/qt5base/portfile.cmake | 2 +- ports/qt5tools/CONTROL | 4 +++ ports/qt5tools/portfile.cmake | 51 +++++++++++++++++++++++++++++++++++ scripts/cmake/vcpkg_build_qmake.cmake | 11 ++++---- 4 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 ports/qt5tools/CONTROL create mode 100644 ports/qt5tools/portfile.cmake diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake index 9e2efeac7..359c81990 100644 --- a/ports/qt5base/portfile.cmake +++ b/ports/qt5base/portfile.cmake @@ -15,7 +15,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) include(configure_qt) include(install_qt) -set(SRCDIR_NAME "qt-5.9.2") +set(SRCDIR_NAME "qtbase-5.9.2") set(ARCHIVE_NAME "qtbase-opensource-src-5.9.2") set(ARCHIVE_EXTENSION ".tar.xz") diff --git a/ports/qt5tools/CONTROL b/ports/qt5tools/CONTROL new file mode 100644 index 000000000..7bdb5c1db --- /dev/null +++ b/ports/qt5tools/CONTROL @@ -0,0 +1,4 @@ +Source: qt5tools +Version: 5.9.2-0 +Description: Qt5 tools +Build-Depends: qt5base diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake new file mode 100644 index 000000000..6d01d6333 --- /dev/null +++ b/ports/qt5tools/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qttools-5.9.2") +set(ARCHIVE_NAME "qttools-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 afce063e167de96dfa264cfd27dc8d80c23ef091a30f4f8119575cae83f39716c3b332427630b340f518b82d6396cca1893f28e00f3c667ba201d7e4fc2aefe1 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +#Clean up build directories +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + +vcpkg_configure_qmake( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} + OPTIONS "CONFIG+=release" +) + +vcpkg_build_qmake() + +file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright) + +#touch an empty include file - qt tools does not create any and this is an error in vcpkg +file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty) \ No newline at end of file diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake index 1c6358654..bee5da7c9 100644 --- a/scripts/cmake/vcpkg_build_qmake.cmake +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -15,18 +15,17 @@ function(vcpkg_build_qmake) vcpkg_find_acquire_program(JOM) # Make sure that the linker finds the libraries used - set(ENV_LIB_BACKUP ENV{LIB}) - set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/debug/lib;$ENV{LIB}") + set(ENV_PATH_BACKUP ENV{PATH}) + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/debug/lib;${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin;${CURRENT_INSTALLED_DIR}/tools/qt5;$ENV{PATH}") message(STATUS "Package ${TARGET_TRIPLET}") - vcpkg_execute_required_process_repeat( - COUNT 2 + vcpkg_execute_required_process( COMMAND ${JOM} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} LOGNAME package-${TARGET_TRIPLET} ) message(STATUS "Package ${TARGET_TRIPLET} done") - # Restore the original value of ENV{LIB} - set(ENV{LIB} ENV_LIB_BACKUP) + # Restore the original value of ENV{PATH} + set(ENV{PATH} ENV_PATH_BACKUP) endfunction() -- cgit v1.2.3 From 890a81bebc3642454e3833c789a35ba9a7989c9d Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 16 Oct 2017 00:41:48 +1100 Subject: remove old qt5 --- ports/qt5/CONTROL | 4 - ports/qt5/add-private-header-paths.patch | 801 ------------------------------ ports/qt5/configure_qt.cmake | 62 --- ports/qt5/fix-commandline-overrides.patch | 149 ------ ports/qt5/fix-qalgorithms-vs2017.patch | 138 ----- ports/qt5/fixcmake.py | 63 --- ports/qt5/install_qt.cmake | 45 -- ports/qt5/portfile.cmake | 147 ------ ports/qt5/qtdeploy.ps1 | 68 --- 9 files changed, 1477 deletions(-) delete mode 100644 ports/qt5/CONTROL delete mode 100644 ports/qt5/add-private-header-paths.patch delete mode 100644 ports/qt5/configure_qt.cmake delete mode 100644 ports/qt5/fix-commandline-overrides.patch delete mode 100644 ports/qt5/fix-qalgorithms-vs2017.patch delete mode 100644 ports/qt5/fixcmake.py delete mode 100644 ports/qt5/install_qt.cmake delete mode 100644 ports/qt5/portfile.cmake delete mode 100644 ports/qt5/qtdeploy.ps1 diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL deleted file mode 100644 index ce46d249b..000000000 --- a/ports/qt5/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5 -Version: 5.8-6 -Description: Qt5 application framework main components. Webengine, examples and tests not included. -Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre, harfbuzz, sqlite3, libpq, double-conversion diff --git a/ports/qt5/add-private-header-paths.patch b/ports/qt5/add-private-header-paths.patch deleted file mode 100644 index c6e233710..000000000 --- a/ports/qt5/add-private-header-paths.patch +++ /dev/null @@ -1,801 +0,0 @@ -diff --git a/Qt53DCore/Qt53DCoreConfig.cmake b/Qt53DCore/Qt53DCoreConfig.cmake -index 80fc091..4fbaf5e 100644 ---- a/Qt53DCore/Qt53DCoreConfig.cmake -+++ b/Qt53DCore/Qt53DCoreConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DCore) - - set(_Qt53DCore_OWN_INCLUDE_DIRS "${_qt53DCore_install_prefix}/include/" "${_qt53DCore_install_prefix}/include/Qt3DCore") -- set(Qt53DCore_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DCore_PRIVATE_INCLUDE_DIRS -+ "${_qt53DCore_install_prefix}/include/Qt3DCore/5.8.0" -+ "${_qt53DCore_install_prefix}/include/Qt3DCore/5.8.0/Qt3DCore" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DCore_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DExtras/Qt53DExtrasConfig.cmake b/Qt53DExtras/Qt53DExtrasConfig.cmake -index 61de455..5f00da8 100644 ---- a/Qt53DExtras/Qt53DExtrasConfig.cmake -+++ b/Qt53DExtras/Qt53DExtrasConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DExtras) - - set(_Qt53DExtras_OWN_INCLUDE_DIRS "${_qt53DExtras_install_prefix}/include/" "${_qt53DExtras_install_prefix}/include/Qt3DExtras") -- set(Qt53DExtras_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DExtras_PRIVATE_INCLUDE_DIRS -+ "${_qt53DExtras_install_prefix}/include/Qt3DExtras/5.8.0" -+ "${_qt53DExtras_install_prefix}/include/Qt3DExtras/5.8.0/Qt3DExtras" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DExtras_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DInput/Qt53DInputConfig.cmake b/Qt53DInput/Qt53DInputConfig.cmake -index 1526967..089441e 100644 ---- a/Qt53DInput/Qt53DInputConfig.cmake -+++ b/Qt53DInput/Qt53DInputConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DInput) - - set(_Qt53DInput_OWN_INCLUDE_DIRS "${_qt53DInput_install_prefix}/include/" "${_qt53DInput_install_prefix}/include/Qt3DInput") -- set(Qt53DInput_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DInput_PRIVATE_INCLUDE_DIRS -+ "${_qt53DInput_install_prefix}/include/Qt3DInput/5.8.0" -+ "${_qt53DInput_install_prefix}/include/Qt3DInput/5.8.0/Qt3DInput" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DInput_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DLogic/Qt53DLogicConfig.cmake b/Qt53DLogic/Qt53DLogicConfig.cmake -index 336f0dc..963be42 100644 ---- a/Qt53DLogic/Qt53DLogicConfig.cmake -+++ b/Qt53DLogic/Qt53DLogicConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DLogic) - - set(_Qt53DLogic_OWN_INCLUDE_DIRS "${_qt53DLogic_install_prefix}/include/" "${_qt53DLogic_install_prefix}/include/Qt3DLogic") -- set(Qt53DLogic_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DLogic_PRIVATE_INCLUDE_DIRS -+ "${_qt53DLogic_install_prefix}/include/Qt3DLogic/5.8.0" -+ "${_qt53DLogic_install_prefix}/include/Qt3DLogic/5.8.0/Qt3DLogic" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DLogic_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DQuick/Qt53DQuickConfig.cmake b/Qt53DQuick/Qt53DQuickConfig.cmake -index cf510c9..0277c0c 100644 ---- a/Qt53DQuick/Qt53DQuickConfig.cmake -+++ b/Qt53DQuick/Qt53DQuickConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DQuick) - - set(_Qt53DQuick_OWN_INCLUDE_DIRS "${_qt53DQuick_install_prefix}/include/" "${_qt53DQuick_install_prefix}/include/Qt3DQuick") -- set(Qt53DQuick_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DQuick_PRIVATE_INCLUDE_DIRS -+ "${_qt53DQuick_install_prefix}/include/Qt3DQuick/5.8.0" -+ "${_qt53DQuick_install_prefix}/include/Qt3DQuick/5.8.0/Qt3DQuick" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DQuick_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DQuickInput/Qt53DQuickInputConfig.cmake b/Qt53DQuickInput/Qt53DQuickInputConfig.cmake -index 06fe217..f935824 100644 ---- a/Qt53DQuickInput/Qt53DQuickInputConfig.cmake -+++ b/Qt53DQuickInput/Qt53DQuickInputConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DQuickInput) - - set(_Qt53DQuickInput_OWN_INCLUDE_DIRS "${_qt53DQuickInput_install_prefix}/include/" "${_qt53DQuickInput_install_prefix}/include/Qt3DQuickInput") -- set(Qt53DQuickInput_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DQuickInput_PRIVATE_INCLUDE_DIRS -+ "${_qt53DQuickInput_install_prefix}/include/Qt3DQuickInput/5.8.0" -+ "${_qt53DQuickInput_install_prefix}/include/Qt3DQuickInput/5.8.0/Qt3DQuickInput" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DQuickInput_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake b/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake -index dd5472b..ef728fd 100644 ---- a/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake -+++ b/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DQuickRender) - - set(_Qt53DQuickRender_OWN_INCLUDE_DIRS "${_qt53DQuickRender_install_prefix}/include/" "${_qt53DQuickRender_install_prefix}/include/Qt3DQuickRender") -- set(Qt53DQuickRender_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DQuickRender_PRIVATE_INCLUDE_DIRS -+ "${_qt53DQuickRender_install_prefix}/include/Qt3DQuickRender/5.8.0" -+ "${_qt53DQuickRender_install_prefix}/include/Qt3DQuickRender/5.8.0/Qt3DQuickRender" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DQuickRender_OWN_INCLUDE_DIRS}) -diff --git a/Qt53DRender/Qt53DRenderConfig.cmake b/Qt53DRender/Qt53DRenderConfig.cmake -index 70eff4b..271463b 100644 ---- a/Qt53DRender/Qt53DRenderConfig.cmake -+++ b/Qt53DRender/Qt53DRenderConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::3DRender) - - set(_Qt53DRender_OWN_INCLUDE_DIRS "${_qt53DRender_install_prefix}/include/" "${_qt53DRender_install_prefix}/include/Qt3DRender") -- set(Qt53DRender_PRIVATE_INCLUDE_DIRS "") -+ set(Qt53DRender_PRIVATE_INCLUDE_DIRS -+ "${_qt53DRender_install_prefix}/include/Qt3DRender/5.8.0" -+ "${_qt53DRender_install_prefix}/include/Qt3DRender/5.8.0/Qt3DRender" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt53DRender_OWN_INCLUDE_DIRS}) -diff --git a/Qt5AxBase/Qt5AxBaseConfig.cmake b/Qt5AxBase/Qt5AxBaseConfig.cmake -index 48966d5..63afee8 100644 ---- a/Qt5AxBase/Qt5AxBaseConfig.cmake -+++ b/Qt5AxBase/Qt5AxBaseConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::AxBase) - - set(_Qt5AxBase_OWN_INCLUDE_DIRS "${_qt5AxBase_install_prefix}/include/" "${_qt5AxBase_install_prefix}/include/ActiveQt") -- set(Qt5AxBase_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5AxBase_PRIVATE_INCLUDE_DIRS -+ "${_qt5AxBase_install_prefix}/include/ActiveQt/5.8.0" -+ "${_qt5AxBase_install_prefix}/include/ActiveQt/5.8.0/ActiveQt" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5AxBase_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Bluetooth/Qt5BluetoothConfig.cmake b/Qt5Bluetooth/Qt5BluetoothConfig.cmake -index 9d2f7c4..1223caf 100644 ---- a/Qt5Bluetooth/Qt5BluetoothConfig.cmake -+++ b/Qt5Bluetooth/Qt5BluetoothConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Bluetooth) - - set(_Qt5Bluetooth_OWN_INCLUDE_DIRS "${_qt5Bluetooth_install_prefix}/include/" "${_qt5Bluetooth_install_prefix}/include/QtBluetooth") -- set(Qt5Bluetooth_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Bluetooth_PRIVATE_INCLUDE_DIRS -+ "${_qt5Bluetooth_install_prefix}/include/QtBluetooth/5.8.0" -+ "${_qt5Bluetooth_install_prefix}/include/QtBluetooth/5.8.0/QtBluetooth" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Bluetooth_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Charts/Qt5ChartsConfig.cmake b/Qt5Charts/Qt5ChartsConfig.cmake -index fef4b13..52e458d 100644 ---- a/Qt5Charts/Qt5ChartsConfig.cmake -+++ b/Qt5Charts/Qt5ChartsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Charts) - - set(_Qt5Charts_OWN_INCLUDE_DIRS "${_qt5Charts_install_prefix}/include/" "${_qt5Charts_install_prefix}/include/QtCharts") -- set(Qt5Charts_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Charts_PRIVATE_INCLUDE_DIRS -+ "${_qt5Charts_install_prefix}/include/QtCharts/5.8.0" -+ "${_qt5Charts_install_prefix}/include/QtCharts/5.8.0/QtCharts" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Charts_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Core/Qt5CoreConfig.cmake b/Qt5Core/Qt5CoreConfig.cmake -index 4232dc7..c35d103 100644 ---- a/Qt5Core/Qt5CoreConfig.cmake -+++ b/Qt5Core/Qt5CoreConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Core) - - set(_Qt5Core_OWN_INCLUDE_DIRS "${_qt5Core_install_prefix}/include/" "${_qt5Core_install_prefix}/include/QtCore") -- set(Qt5Core_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Core_PRIVATE_INCLUDE_DIRS -+ "${_qt5Core_install_prefix}/include/QtCore/5.8.0" -+ "${_qt5Core_install_prefix}/include/QtCore/5.8.0/QtCore" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Core_OWN_INCLUDE_DIRS}) -diff --git a/Qt5DBus/Qt5DBusConfig.cmake b/Qt5DBus/Qt5DBusConfig.cmake -index d5e3ac6..472b928 100644 ---- a/Qt5DBus/Qt5DBusConfig.cmake -+++ b/Qt5DBus/Qt5DBusConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::DBus) - - set(_Qt5DBus_OWN_INCLUDE_DIRS "${_qt5DBus_install_prefix}/include/" "${_qt5DBus_install_prefix}/include/QtDBus") -- set(Qt5DBus_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5DBus_PRIVATE_INCLUDE_DIRS -+ "${_qt5DBus_install_prefix}/include/QtDBus/5.8.0" -+ "${_qt5DBus_install_prefix}/include/QtDBus/5.8.0/QtDBus" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5DBus_OWN_INCLUDE_DIRS}) -diff --git a/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake b/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake -index b518994..91559aa 100644 ---- a/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake -+++ b/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::DataVisualization) - - set(_Qt5DataVisualization_OWN_INCLUDE_DIRS "${_qt5DataVisualization_install_prefix}/include/" "${_qt5DataVisualization_install_prefix}/include/QtDataVisualization") -- set(Qt5DataVisualization_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5DataVisualization_PRIVATE_INCLUDE_DIRS -+ "${_qt5DataVisualization_install_prefix}/include/QtDataVisualization/5.8.0" -+ "${_qt5DataVisualization_install_prefix}/include/QtDataVisualization/5.8.0/QtDataVisualization" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5DataVisualization_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Designer/Qt5DesignerConfig.cmake b/Qt5Designer/Qt5DesignerConfig.cmake -index 69ea6dc..7b76032 100644 ---- a/Qt5Designer/Qt5DesignerConfig.cmake -+++ b/Qt5Designer/Qt5DesignerConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Designer) - - set(_Qt5Designer_OWN_INCLUDE_DIRS "${_qt5Designer_install_prefix}/include/" "${_qt5Designer_install_prefix}/include/QtDesigner") -- set(Qt5Designer_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Designer_PRIVATE_INCLUDE_DIRS -+ "${_qt5Designer_install_prefix}/include/QtDesigner/5.8.0" -+ "${_qt5Designer_install_prefix}/include/QtDesigner/5.8.0/QtDesigner" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Designer_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Gamepad/Qt5GamepadConfig.cmake b/Qt5Gamepad/Qt5GamepadConfig.cmake -index 66db87f..987ae8f 100644 ---- a/Qt5Gamepad/Qt5GamepadConfig.cmake -+++ b/Qt5Gamepad/Qt5GamepadConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Gamepad) - - set(_Qt5Gamepad_OWN_INCLUDE_DIRS "${_qt5Gamepad_install_prefix}/include/" "${_qt5Gamepad_install_prefix}/include/QtGamepad") -- set(Qt5Gamepad_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Gamepad_PRIVATE_INCLUDE_DIRS -+ "${_qt5Gamepad_install_prefix}/include/QtGamepad/5.8.0" -+ "${_qt5Gamepad_install_prefix}/include/QtGamepad/5.8.0/QtGamepad" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Gamepad_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Gui/Qt5GuiConfig.cmake b/Qt5Gui/Qt5GuiConfig.cmake -index 4718ba9..56888c1 100644 ---- a/Qt5Gui/Qt5GuiConfig.cmake -+++ b/Qt5Gui/Qt5GuiConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Gui) - - set(_Qt5Gui_OWN_INCLUDE_DIRS "${_qt5Gui_install_prefix}/include/" "${_qt5Gui_install_prefix}/include/QtGui") -- set(Qt5Gui_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Gui_PRIVATE_INCLUDE_DIRS -+ "${_qt5Gui_install_prefix}/include/QtGui/5.8.0" -+ "${_qt5Gui_install_prefix}/include/QtGui/5.8.0/QtGui" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Gui_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Help/Qt5HelpConfig.cmake b/Qt5Help/Qt5HelpConfig.cmake -index e84511c..0da7c20 100644 ---- a/Qt5Help/Qt5HelpConfig.cmake -+++ b/Qt5Help/Qt5HelpConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Help) - - set(_Qt5Help_OWN_INCLUDE_DIRS "${_qt5Help_install_prefix}/include/" "${_qt5Help_install_prefix}/include/QtHelp") -- set(Qt5Help_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Help_PRIVATE_INCLUDE_DIRS -+ "${_qt5Help_install_prefix}/include/QtHelp/5.8.0" -+ "${_qt5Help_install_prefix}/include/QtHelp/5.8.0/QtHelp" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Help_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Location/Qt5LocationConfig.cmake b/Qt5Location/Qt5LocationConfig.cmake -index a8bdf0a..f5348c2 100644 ---- a/Qt5Location/Qt5LocationConfig.cmake -+++ b/Qt5Location/Qt5LocationConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Location) - - set(_Qt5Location_OWN_INCLUDE_DIRS "${_qt5Location_install_prefix}/include/" "${_qt5Location_install_prefix}/include/QtLocation") -- set(Qt5Location_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Location_PRIVATE_INCLUDE_DIRS -+ "${_qt5Location_install_prefix}/include/QtLocation/5.8.0" -+ "${_qt5Location_install_prefix}/include/QtLocation/5.8.0/QtLocation" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Location_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Multimedia/Qt5MultimediaConfig.cmake b/Qt5Multimedia/Qt5MultimediaConfig.cmake -index 69f353f..67fa08b 100644 ---- a/Qt5Multimedia/Qt5MultimediaConfig.cmake -+++ b/Qt5Multimedia/Qt5MultimediaConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Multimedia) - - set(_Qt5Multimedia_OWN_INCLUDE_DIRS "${_qt5Multimedia_install_prefix}/include/" "${_qt5Multimedia_install_prefix}/include/QtMultimedia") -- set(Qt5Multimedia_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Multimedia_PRIVATE_INCLUDE_DIRS -+ "${_qt5Multimedia_install_prefix}/include/QtMultimedia/5.8.0" -+ "${_qt5Multimedia_install_prefix}/include/QtMultimedia/5.8.0/QtMultimedia" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Multimedia_OWN_INCLUDE_DIRS}) -diff --git a/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake b/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake -index 88162f8..1dcf69e 100644 ---- a/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake -+++ b/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::MultimediaWidgets) - - set(_Qt5MultimediaWidgets_OWN_INCLUDE_DIRS "${_qt5MultimediaWidgets_install_prefix}/include/" "${_qt5MultimediaWidgets_install_prefix}/include/QtMultimediaWidgets") -- set(Qt5MultimediaWidgets_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5MultimediaWidgets_PRIVATE_INCLUDE_DIRS -+ "${_qt5MultimediaWidgets_install_prefix}/include/QtMultimediaWidgets/5.8.0" -+ "${_qt5MultimediaWidgets_install_prefix}/include/QtMultimediaWidgets/5.8.0/QtMultimediaWidgets" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5MultimediaWidgets_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Network/Qt5NetworkConfig.cmake b/Qt5Network/Qt5NetworkConfig.cmake -index 1778278..6a5d7f3 100644 ---- a/Qt5Network/Qt5NetworkConfig.cmake -+++ b/Qt5Network/Qt5NetworkConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Network) - - set(_Qt5Network_OWN_INCLUDE_DIRS "${_qt5Network_install_prefix}/include/" "${_qt5Network_install_prefix}/include/QtNetwork") -- set(Qt5Network_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Network_PRIVATE_INCLUDE_DIRS -+ "${_qt5Network_install_prefix}/include/QtNetwork/5.8.0" -+ "${_qt5Network_install_prefix}/include/QtNetwork/5.8.0/QtNetwork" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Network_OWN_INCLUDE_DIRS}) -diff --git a/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake b/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake -index 50f56e0..821080c 100644 ---- a/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake -+++ b/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::NetworkAuth) - - set(_Qt5NetworkAuth_OWN_INCLUDE_DIRS "${_qt5NetworkAuth_install_prefix}/include/" "${_qt5NetworkAuth_install_prefix}/include/QtNetworkAuth") -- set(Qt5NetworkAuth_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5NetworkAuth_PRIVATE_INCLUDE_DIRS -+ "${_qt5NetworkAuth_install_prefix}/include/QtNetworkAuth/5.8.0" -+ "${_qt5NetworkAuth_install_prefix}/include/QtNetworkAuth/5.8.0/QtNetworkAuth" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5NetworkAuth_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Nfc/Qt5NfcConfig.cmake b/Qt5Nfc/Qt5NfcConfig.cmake -index 83ffddd..d8a5ba9 100644 ---- a/Qt5Nfc/Qt5NfcConfig.cmake -+++ b/Qt5Nfc/Qt5NfcConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Nfc) - - set(_Qt5Nfc_OWN_INCLUDE_DIRS "${_qt5Nfc_install_prefix}/include/" "${_qt5Nfc_install_prefix}/include/QtNfc") -- set(Qt5Nfc_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Nfc_PRIVATE_INCLUDE_DIRS -+ "${_qt5Nfc_install_prefix}/include/QtNfc/5.8.0" -+ "${_qt5Nfc_install_prefix}/include/QtNfc/5.8.0/QtNfc" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Nfc_OWN_INCLUDE_DIRS}) -diff --git a/Qt5OpenGL/Qt5OpenGLConfig.cmake b/Qt5OpenGL/Qt5OpenGLConfig.cmake -index 6c874ac..3ac408a 100644 ---- a/Qt5OpenGL/Qt5OpenGLConfig.cmake -+++ b/Qt5OpenGL/Qt5OpenGLConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::OpenGL) - - set(_Qt5OpenGL_OWN_INCLUDE_DIRS "${_qt5OpenGL_install_prefix}/include/" "${_qt5OpenGL_install_prefix}/include/QtOpenGL") -- set(Qt5OpenGL_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5OpenGL_PRIVATE_INCLUDE_DIRS -+ "${_qt5OpenGL_install_prefix}/include/QtOpenGL/5.8.0" -+ "${_qt5OpenGL_install_prefix}/include/QtOpenGL/5.8.0/QtOpenGL" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5OpenGL_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Positioning/Qt5PositioningConfig.cmake b/Qt5Positioning/Qt5PositioningConfig.cmake -index 1aa3128..a6a2f24 100644 ---- a/Qt5Positioning/Qt5PositioningConfig.cmake -+++ b/Qt5Positioning/Qt5PositioningConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Positioning) - - set(_Qt5Positioning_OWN_INCLUDE_DIRS "${_qt5Positioning_install_prefix}/include/" "${_qt5Positioning_install_prefix}/include/QtPositioning") -- set(Qt5Positioning_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Positioning_PRIVATE_INCLUDE_DIRS -+ "${_qt5Positioning_install_prefix}/include/QtPositioning/5.8.0" -+ "${_qt5Positioning_install_prefix}/include/QtPositioning/5.8.0/QtPositioning" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Positioning_OWN_INCLUDE_DIRS}) -diff --git a/Qt5PrintSupport/Qt5PrintSupportConfig.cmake b/Qt5PrintSupport/Qt5PrintSupportConfig.cmake -index d7c6765..9a24e99 100644 ---- a/Qt5PrintSupport/Qt5PrintSupportConfig.cmake -+++ b/Qt5PrintSupport/Qt5PrintSupportConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::PrintSupport) - - set(_Qt5PrintSupport_OWN_INCLUDE_DIRS "${_qt5PrintSupport_install_prefix}/include/" "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport") -- set(Qt5PrintSupport_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5PrintSupport_PRIVATE_INCLUDE_DIRS -+ "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport/5.8.0" -+ "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport/5.8.0/QtPrintSupport" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5PrintSupport_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Purchasing/Qt5PurchasingConfig.cmake b/Qt5Purchasing/Qt5PurchasingConfig.cmake -index b0cf03d..d0b527d 100644 ---- a/Qt5Purchasing/Qt5PurchasingConfig.cmake -+++ b/Qt5Purchasing/Qt5PurchasingConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Purchasing) - - set(_Qt5Purchasing_OWN_INCLUDE_DIRS "${_qt5Purchasing_install_prefix}/include/" "${_qt5Purchasing_install_prefix}/include/QtPurchasing") -- set(Qt5Purchasing_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Purchasing_PRIVATE_INCLUDE_DIRS -+ "${_qt5Purchasing_install_prefix}/include/QtPurchasing/5.8.0" -+ "${_qt5Purchasing_install_prefix}/include/QtPurchasing/5.8.0/QtPurchasing" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Purchasing_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Qml/Qt5QmlConfig.cmake b/Qt5Qml/Qt5QmlConfig.cmake -index 966e3ff..c59d5d1 100644 ---- a/Qt5Qml/Qt5QmlConfig.cmake -+++ b/Qt5Qml/Qt5QmlConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Qml) - - set(_Qt5Qml_OWN_INCLUDE_DIRS "${_qt5Qml_install_prefix}/include/" "${_qt5Qml_install_prefix}/include/QtQml") -- set(Qt5Qml_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Qml_PRIVATE_INCLUDE_DIRS -+ "${_qt5Qml_install_prefix}/include/QtQml/5.8.0" -+ "${_qt5Qml_install_prefix}/include/QtQml/5.8.0/QtQml" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Qml_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Quick/Qt5QuickConfig.cmake b/Qt5Quick/Qt5QuickConfig.cmake -index e1e2d05..def9557 100644 ---- a/Qt5Quick/Qt5QuickConfig.cmake -+++ b/Qt5Quick/Qt5QuickConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Quick) - - set(_Qt5Quick_OWN_INCLUDE_DIRS "${_qt5Quick_install_prefix}/include/" "${_qt5Quick_install_prefix}/include/QtQuick") -- set(Qt5Quick_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Quick_PRIVATE_INCLUDE_DIRS -+ "${_qt5Quick_install_prefix}/include/QtQuick/5.8.0" -+ "${_qt5Quick_install_prefix}/include/QtQuick/5.8.0/QtQuick" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Quick_OWN_INCLUDE_DIRS}) -diff --git a/Qt5QuickControls2/Qt5QuickControls2Config.cmake b/Qt5QuickControls2/Qt5QuickControls2Config.cmake -index cf34ce5..6f0ec96 100644 ---- a/Qt5QuickControls2/Qt5QuickControls2Config.cmake -+++ b/Qt5QuickControls2/Qt5QuickControls2Config.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::QuickControls2) - - set(_Qt5QuickControls2_OWN_INCLUDE_DIRS "${_qt5QuickControls2_install_prefix}/include/" "${_qt5QuickControls2_install_prefix}/include/QtQuickControls2") -- set(Qt5QuickControls2_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5QuickControls2_PRIVATE_INCLUDE_DIRS -+ "${_qt5QuickControls2_install_prefix}/include/QtQuickControls2/5.8.0" -+ "${_qt5QuickControls2_install_prefix}/include/QtQuickControls2/5.8.0/QtQuickControls2" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5QuickControls2_OWN_INCLUDE_DIRS}) -diff --git a/Qt5QuickTest/Qt5QuickTestConfig.cmake b/Qt5QuickTest/Qt5QuickTestConfig.cmake -index 9b2b8b2..6e1ea1d 100644 ---- a/Qt5QuickTest/Qt5QuickTestConfig.cmake -+++ b/Qt5QuickTest/Qt5QuickTestConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::QuickTest) - - set(_Qt5QuickTest_OWN_INCLUDE_DIRS "${_qt5QuickTest_install_prefix}/include/" "${_qt5QuickTest_install_prefix}/include/QtQuickTest") -- set(Qt5QuickTest_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5QuickTest_PRIVATE_INCLUDE_DIRS -+ "${_qt5QuickTest_install_prefix}/include/QtQuickTest/5.8.0" -+ "${_qt5QuickTest_install_prefix}/include/QtQuickTest/5.8.0/QtQuickTest" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5QuickTest_OWN_INCLUDE_DIRS}) -diff --git a/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake b/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake -index b0b8988..559b2f0 100644 ---- a/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake -+++ b/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::QuickWidgets) - - set(_Qt5QuickWidgets_OWN_INCLUDE_DIRS "${_qt5QuickWidgets_install_prefix}/include/" "${_qt5QuickWidgets_install_prefix}/include/QtQuickWidgets") -- set(Qt5QuickWidgets_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5QuickWidgets_PRIVATE_INCLUDE_DIRS -+ "${_qt5QuickWidgets_install_prefix}/include/QtQuickWidgets/5.8.0" -+ "${_qt5QuickWidgets_install_prefix}/include/QtQuickWidgets/5.8.0/QtQuickWidgets" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5QuickWidgets_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Script/Qt5ScriptConfig.cmake b/Qt5Script/Qt5ScriptConfig.cmake -index da053f8..b2b34d6 100644 ---- a/Qt5Script/Qt5ScriptConfig.cmake -+++ b/Qt5Script/Qt5ScriptConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Script) - - set(_Qt5Script_OWN_INCLUDE_DIRS "${_qt5Script_install_prefix}/include/" "${_qt5Script_install_prefix}/include/QtScript") -- set(Qt5Script_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Script_PRIVATE_INCLUDE_DIRS -+ "${_qt5Script_install_prefix}/include/QtScript/5.8.0" -+ "${_qt5Script_install_prefix}/include/QtScript/5.8.0/QtScript" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Script_OWN_INCLUDE_DIRS}) -diff --git a/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake b/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake -index e4bf959..959ac50 100644 ---- a/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake -+++ b/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::ScriptTools) - - set(_Qt5ScriptTools_OWN_INCLUDE_DIRS "${_qt5ScriptTools_install_prefix}/include/" "${_qt5ScriptTools_install_prefix}/include/QtScriptTools") -- set(Qt5ScriptTools_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5ScriptTools_PRIVATE_INCLUDE_DIRS -+ "${_qt5ScriptTools_install_prefix}/include/QtScriptTools/5.8.0" -+ "${_qt5ScriptTools_install_prefix}/include/QtScriptTools/5.8.0/QtScriptTools" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5ScriptTools_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Scxml/Qt5ScxmlConfig.cmake b/Qt5Scxml/Qt5ScxmlConfig.cmake -index 90ac06b..e78c552 100644 ---- a/Qt5Scxml/Qt5ScxmlConfig.cmake -+++ b/Qt5Scxml/Qt5ScxmlConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Scxml) - - set(_Qt5Scxml_OWN_INCLUDE_DIRS "${_qt5Scxml_install_prefix}/include/" "${_qt5Scxml_install_prefix}/include/QtScxml") -- set(Qt5Scxml_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Scxml_PRIVATE_INCLUDE_DIRS -+ "${_qt5Scxml_install_prefix}/include/QtScxml/5.8.0" -+ "${_qt5Scxml_install_prefix}/include/QtScxml/5.8.0/QtScxml" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Scxml_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Sensors/Qt5SensorsConfig.cmake b/Qt5Sensors/Qt5SensorsConfig.cmake -index 9e53e4d..2096beb 100644 ---- a/Qt5Sensors/Qt5SensorsConfig.cmake -+++ b/Qt5Sensors/Qt5SensorsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Sensors) - - set(_Qt5Sensors_OWN_INCLUDE_DIRS "${_qt5Sensors_install_prefix}/include/" "${_qt5Sensors_install_prefix}/include/QtSensors") -- set(Qt5Sensors_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Sensors_PRIVATE_INCLUDE_DIRS -+ "${_qt5Sensors_install_prefix}/include/QtSensors/5.8.0" -+ "${_qt5Sensors_install_prefix}/include/QtSensors/5.8.0/QtSensors" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Sensors_OWN_INCLUDE_DIRS}) -diff --git a/Qt5SerialBus/Qt5SerialBusConfig.cmake b/Qt5SerialBus/Qt5SerialBusConfig.cmake -index f2e4d69..8ba391c 100644 ---- a/Qt5SerialBus/Qt5SerialBusConfig.cmake -+++ b/Qt5SerialBus/Qt5SerialBusConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::SerialBus) - - set(_Qt5SerialBus_OWN_INCLUDE_DIRS "${_qt5SerialBus_install_prefix}/include/" "${_qt5SerialBus_install_prefix}/include/QtSerialBus") -- set(Qt5SerialBus_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5SerialBus_PRIVATE_INCLUDE_DIRS -+ "${_qt5SerialBus_install_prefix}/include/QtSerialBus/5.8.0" -+ "${_qt5SerialBus_install_prefix}/include/QtSerialBus/5.8.0/QtSerialBus" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5SerialBus_OWN_INCLUDE_DIRS}) -diff --git a/Qt5SerialPort/Qt5SerialPortConfig.cmake b/Qt5SerialPort/Qt5SerialPortConfig.cmake -index fa15de5..4ec1024 100644 ---- a/Qt5SerialPort/Qt5SerialPortConfig.cmake -+++ b/Qt5SerialPort/Qt5SerialPortConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::SerialPort) - - set(_Qt5SerialPort_OWN_INCLUDE_DIRS "${_qt5SerialPort_install_prefix}/include/" "${_qt5SerialPort_install_prefix}/include/QtSerialPort") -- set(Qt5SerialPort_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5SerialPort_PRIVATE_INCLUDE_DIRS -+ "${_qt5SerialPort_install_prefix}/include/QtSerialPort/5.8.0" -+ "${_qt5SerialPort_install_prefix}/include/QtSerialPort/5.8.0/QtSerialPort" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5SerialPort_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Sql/Qt5SqlConfig.cmake b/Qt5Sql/Qt5SqlConfig.cmake -index 0e5d50c..baf3f66 100644 ---- a/Qt5Sql/Qt5SqlConfig.cmake -+++ b/Qt5Sql/Qt5SqlConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Sql) - - set(_Qt5Sql_OWN_INCLUDE_DIRS "${_qt5Sql_install_prefix}/include/" "${_qt5Sql_install_prefix}/include/QtSql") -- set(Qt5Sql_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Sql_PRIVATE_INCLUDE_DIRS -+ "${_qt5Sql_install_prefix}/include/QtSql/5.8.0" -+ "${_qt5Sql_install_prefix}/include/QtSql/5.8.0/QtSql" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Sql_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Svg/Qt5SvgConfig.cmake b/Qt5Svg/Qt5SvgConfig.cmake -index 5d6ad04..b0d1aaa 100644 ---- a/Qt5Svg/Qt5SvgConfig.cmake -+++ b/Qt5Svg/Qt5SvgConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Svg) - - set(_Qt5Svg_OWN_INCLUDE_DIRS "${_qt5Svg_install_prefix}/include/" "${_qt5Svg_install_prefix}/include/QtSvg") -- set(Qt5Svg_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Svg_PRIVATE_INCLUDE_DIRS -+ "${_qt5Svg_install_prefix}/include/QtSvg/5.8.0" -+ "${_qt5Svg_install_prefix}/include/QtSvg/5.8.0/QtSvg" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Svg_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Test/Qt5TestConfig.cmake b/Qt5Test/Qt5TestConfig.cmake -index 8183efd..f15979f 100644 ---- a/Qt5Test/Qt5TestConfig.cmake -+++ b/Qt5Test/Qt5TestConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Test) - - set(_Qt5Test_OWN_INCLUDE_DIRS "${_qt5Test_install_prefix}/include/" "${_qt5Test_install_prefix}/include/QtTest") -- set(Qt5Test_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Test_PRIVATE_INCLUDE_DIRS -+ "${_qt5Test_install_prefix}/include/QtTest/5.8.0" -+ "${_qt5Test_install_prefix}/include/QtTest/5.8.0/QtTest" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Test_OWN_INCLUDE_DIRS}) -diff --git a/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake b/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake -index 2577e82..aa4bf39 100644 ---- a/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake -+++ b/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::TextToSpeech) - - set(_Qt5TextToSpeech_OWN_INCLUDE_DIRS "${_qt5TextToSpeech_install_prefix}/include/" "${_qt5TextToSpeech_install_prefix}/include/QtTextToSpeech") -- set(Qt5TextToSpeech_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5TextToSpeech_PRIVATE_INCLUDE_DIRS -+ "${_qt5TextToSpeech_install_prefix}/include/QtTextToSpeech/5.8.0" -+ "${_qt5TextToSpeech_install_prefix}/include/QtTextToSpeech/5.8.0/QtTextToSpeech" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5TextToSpeech_OWN_INCLUDE_DIRS}) -diff --git a/Qt5UiTools/Qt5UiToolsConfig.cmake b/Qt5UiTools/Qt5UiToolsConfig.cmake -index f217198..1bfa8b2 100644 ---- a/Qt5UiTools/Qt5UiToolsConfig.cmake -+++ b/Qt5UiTools/Qt5UiToolsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::UiTools) - - set(_Qt5UiTools_OWN_INCLUDE_DIRS "${_qt5UiTools_install_prefix}/include/" "${_qt5UiTools_install_prefix}/include/QtUiTools") -- set(Qt5UiTools_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5UiTools_PRIVATE_INCLUDE_DIRS -+ "${_qt5UiTools_install_prefix}/include/QtUiTools/5.8.0" -+ "${_qt5UiTools_install_prefix}/include/QtUiTools/5.8.0/QtUiTools" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5UiTools_OWN_INCLUDE_DIRS}) -diff --git a/Qt5WebChannel/Qt5WebChannelConfig.cmake b/Qt5WebChannel/Qt5WebChannelConfig.cmake -index ce8949c..c056b9d 100644 ---- a/Qt5WebChannel/Qt5WebChannelConfig.cmake -+++ b/Qt5WebChannel/Qt5WebChannelConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::WebChannel) - - set(_Qt5WebChannel_OWN_INCLUDE_DIRS "${_qt5WebChannel_install_prefix}/include/" "${_qt5WebChannel_install_prefix}/include/QtWebChannel") -- set(Qt5WebChannel_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5WebChannel_PRIVATE_INCLUDE_DIRS -+ "${_qt5WebChannel_install_prefix}/include/QtWebChannel/5.8.0" -+ "${_qt5WebChannel_install_prefix}/include/QtWebChannel/5.8.0/QtWebChannel" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5WebChannel_OWN_INCLUDE_DIRS}) -diff --git a/Qt5WebSockets/Qt5WebSocketsConfig.cmake b/Qt5WebSockets/Qt5WebSocketsConfig.cmake -index c2609da..42e21b8 100644 ---- a/Qt5WebSockets/Qt5WebSocketsConfig.cmake -+++ b/Qt5WebSockets/Qt5WebSocketsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::WebSockets) - - set(_Qt5WebSockets_OWN_INCLUDE_DIRS "${_qt5WebSockets_install_prefix}/include/" "${_qt5WebSockets_install_prefix}/include/QtWebSockets") -- set(Qt5WebSockets_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5WebSockets_PRIVATE_INCLUDE_DIRS -+ "${_qt5WebSockets_install_prefix}/include/QtWebSockets/5.8.0" -+ "${_qt5WebSockets_install_prefix}/include/QtWebSockets/5.8.0/QtWebSockets" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5WebSockets_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Widgets/Qt5WidgetsConfig.cmake b/Qt5Widgets/Qt5WidgetsConfig.cmake -index 44c7aed..658e29a 100644 ---- a/Qt5Widgets/Qt5WidgetsConfig.cmake -+++ b/Qt5Widgets/Qt5WidgetsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Widgets) - - set(_Qt5Widgets_OWN_INCLUDE_DIRS "${_qt5Widgets_install_prefix}/include/" "${_qt5Widgets_install_prefix}/include/QtWidgets") -- set(Qt5Widgets_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Widgets_PRIVATE_INCLUDE_DIRS -+ "${_qt5Widgets_install_prefix}/include/QtWidgets/5.8.0" -+ "${_qt5Widgets_install_prefix}/include/QtWidgets/5.8.0/QtWidgets" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Widgets_OWN_INCLUDE_DIRS}) -diff --git a/Qt5WinExtras/Qt5WinExtrasConfig.cmake b/Qt5WinExtras/Qt5WinExtrasConfig.cmake -index c63cee3..f9ea776 100644 ---- a/Qt5WinExtras/Qt5WinExtrasConfig.cmake -+++ b/Qt5WinExtras/Qt5WinExtrasConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::WinExtras) - - set(_Qt5WinExtras_OWN_INCLUDE_DIRS "${_qt5WinExtras_install_prefix}/include/" "${_qt5WinExtras_install_prefix}/include/QtWinExtras") -- set(Qt5WinExtras_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5WinExtras_PRIVATE_INCLUDE_DIRS -+ "${_qt5WinExtras_install_prefix}/include/QtWinExtras/5.8.0" -+ "${_qt5WinExtras_install_prefix}/include/QtWinExtras/5.8.0/QtWinExtras" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5WinExtras_OWN_INCLUDE_DIRS}) -diff --git a/Qt5Xml/Qt5XmlConfig.cmake b/Qt5Xml/Qt5XmlConfig.cmake -index fee861c..31dc6f7 100644 ---- a/Qt5Xml/Qt5XmlConfig.cmake -+++ b/Qt5Xml/Qt5XmlConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::Xml) - - set(_Qt5Xml_OWN_INCLUDE_DIRS "${_qt5Xml_install_prefix}/include/" "${_qt5Xml_install_prefix}/include/QtXml") -- set(Qt5Xml_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5Xml_PRIVATE_INCLUDE_DIRS -+ "${_qt5Xml_install_prefix}/include/QtXml/5.8.0" -+ "${_qt5Xml_install_prefix}/include/QtXml/5.8.0/QtXml" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5Xml_OWN_INCLUDE_DIRS}) -diff --git a/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake b/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake -index 662a612..45cfe8b 100644 ---- a/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake -+++ b/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake -@@ -56,7 +56,10 @@ endmacro() - if (NOT TARGET Qt5::XmlPatterns) - - set(_Qt5XmlPatterns_OWN_INCLUDE_DIRS "${_qt5XmlPatterns_install_prefix}/include/" "${_qt5XmlPatterns_install_prefix}/include/QtXmlPatterns") -- set(Qt5XmlPatterns_PRIVATE_INCLUDE_DIRS "") -+ set(Qt5XmlPatterns_PRIVATE_INCLUDE_DIRS -+ "${_qt5XmlPatterns_install_prefix}/include/QtXmlPatterns/5.8.0" -+ "${_qt5XmlPatterns_install_prefix}/include/QtXmlPatterns/5.8.0/QtXmlPatterns" -+ ) - include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL) - - foreach(_dir ${_Qt5XmlPatterns_OWN_INCLUDE_DIRS}) - diff --git a/ports/qt5/configure_qt.cmake b/ports/qt5/configure_qt.cmake deleted file mode 100644 index 21e3384c1..000000000 --- a/ports/qt5/configure_qt.cmake +++ /dev/null @@ -1,62 +0,0 @@ -function(configure_qt) - cmake_parse_arguments(_csc "" "SOURCE_PATH;PLATFORM" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) - - if (_csc_PLATFORM) - set(PLATFORM ${_csc_PLATFORM}) - elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") - set(PLATFORM "win32-msvc2015") - elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(PLATFORM "win32-msvc2017") - endif() - - vcpkg_find_acquire_program(PERL) - get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) - - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") - - if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) - list(APPEND _csc_OPTIONS - "-static" - "-static-runtime" - ) - endif() - - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - vcpkg_execute_required_process( - COMMAND "${_csc_SOURCE_PATH}/configure.bat" ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} - -release - -prefix ${CURRENT_PACKAGES_DIR} - -hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5 - -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5 - -datadir ${CURRENT_PACKAGES_DIR}/share/qt5 - -plugindir ${CURRENT_PACKAGES_DIR}/plugins - -qmldir ${CURRENT_PACKAGES_DIR}/qml - -I ${CURRENT_INSTALLED_DIR}/include - -L ${CURRENT_INSTALLED_DIR}/lib - -platform ${PLATFORM} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME config-${TARGET_TRIPLET}-rel - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - vcpkg_execute_required_process( - COMMAND "${_csc_SOURCE_PATH}/configure.bat" ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} - -debug - -prefix ${CURRENT_PACKAGES_DIR}/debug - -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 - -archdatadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5 - -datadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5 - -plugindir ${CURRENT_PACKAGES_DIR}/debug/plugins - -qmldir ${CURRENT_PACKAGES_DIR}/debug/qml - -I ${CURRENT_INSTALLED_DIR}/include - -L ${CURRENT_INSTALLED_DIR}/debug/lib - -platform ${PLATFORM} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME config-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") -endfunction() \ No newline at end of file diff --git a/ports/qt5/fix-commandline-overrides.patch b/ports/qt5/fix-commandline-overrides.patch deleted file mode 100644 index 08f627740..000000000 --- a/ports/qt5/fix-commandline-overrides.patch +++ /dev/null @@ -1,149 +0,0 @@ -diff --git a/qtbase/configure.json b/qtbase/configure.json -index f774291..8903df0 100644 ---- a/qtbase/configure.json -+++ b/qtbase/configure.json -@@ -19,8 +19,7 @@ - "commandline": { - "assignments": { - "DBUS_HOST_PATH": "host_dbus.prefix", -- "DBUS_PATH": "dbus.prefix", -- "ZLIB_LIBS": "zlib.libs" -+ "DBUS_PATH": "dbus.prefix" - }, - "custom": "qmakeArgs", - "options": { -diff --git a/qtbase/mkspecs/features/qt_configure.prf b/qtbase/mkspecs/features/qt_configure.prf -index eaaa161..fdec8ea 100644 ---- a/qtbase/mkspecs/features/qt_configure.prf -+++ b/qtbase/mkspecs/features/qt_configure.prf -@@ -401,6 +401,7 @@ defineReplace(qtConfPrepareArgs) { - } - - defineTest(qtConfSetupLibraries) { -+ asspfx = $${currentConfig}.commandline.assignments - for (l, $${currentConfig}.libraries._KEYS_) { - lpfx = $${currentConfig}.libraries.$${l} - # 'export' may be omitted, in which case it falls back to the library's name -@@ -408,6 +409,15 @@ defineTest(qtConfSetupLibraries) { - $${lpfx}.export = $$l - export($${lpfx}.export) - } -+ # 'export' may also be empty, but we need a derived identifier -+ alias = $$eval($${lpfx}.export) -+ isEmpty(alias): alias = $$l -+ $${lpfx}.alias = $$alias -+ export($${lpfx}.alias) -+ # make it easy to refer to the library by its export name. -+ $${currentConfig}.exports._KEYS_ += $$alias -+ $${currentConfig}.exports.$$alias += $$l -+ export($${currentConfig}.exports.$$alias) - isEmpty($${lpfx}.sources._KEYS_): \ - error("Library $$l defines no sources") - for (s, $${lpfx}.sources._KEYS_) { -@@ -427,10 +437,35 @@ defineTest(qtConfSetupLibraries) { - } - } - } -+ -+ $${currentConfig}.exports._KEYS_ = $$unique($${currentConfig}.exports._KEYS_) -+ export($${currentConfig}.exports._KEYS_) -+ -+ for (alias, $${currentConfig}.exports._KEYS_) { -+ ua = $$upper($$alias) -+ $${asspfx}._KEYS_ += \ -+ $${ua}_PREFIX $${ua}_INCDIR $${ua}_LIBDIR \ -+ $${ua}_LIBS $${ua}_LIBS_DEBUG $${ua}_LIBS_RELEASE -+ uapfx = $${asspfx}.$${ua} -+ $${uapfx}_PREFIX = $${alias}.prefix -+ $${uapfx}_INCDIR = $${alias}.incdir -+ $${uapfx}_LIBDIR = $${alias}.libdir -+ $${uapfx}_LIBS = $${alias}.libs -+ $${uapfx}_LIBS_DEBUG = $${alias}.libs.debug -+ $${uapfx}_LIBS_RELEASE = $${alias}.libs.release -+ export($${uapfx}_PREFIX) -+ export($${uapfx}_INCDIR) -+ export($${uapfx}_LIBDIR) -+ export($${uapfx}_LIBS) -+ export($${uapfx}_LIBS_DEBUG) -+ export($${uapfx}_LIBS_RELEASE) -+ } -+ export($${asspfx}._KEYS_) -+ - - # reverse mapping for assignments on command line. -- for (a, $${currentConfig}.commandline.assignments._KEYS_) { -- apfx = $${currentConfig}.commandline.assignments.$${a} -+ for (a, $${asspfx}._KEYS_) { -+ apfx = $${asspfx}.$${a} - ra = config.commandline.rev_assignments.$$eval($$apfx) - $$ra = $$a - export($$ra) -@@ -479,6 +514,18 @@ defineTest(qtConfLibrary_inline) { - export($${1}.libs) - } - -+ incdir = $$val_escape(config.input.$${input}.incdir) -+ !isEmpty(incdir) { -+ $${1}.includedir = $$incdir -+ export($${1}.includedir) -+ } -+ -+ libdir = $$val_escape(config.input.$${input}.libdir) -+ !isEmpty(libdir) { -+ $${1}.libs = "-L$$libdir $$eval($${1}.libs)" -+ export($${1}.libs) -+ } -+ - return(true) - } - -diff --git a/qtbase/src/gui/configure.json b/qtbase/src/gui/configure.json -index 1f50116..af03362 100644 ---- a/qtbase/src/gui/configure.json -+++ b/qtbase/src/gui/configure.json -@@ -100,7 +100,7 @@ - "test": "unix/freetype", - "sources": [ - { "type": "pkgConfig", "args": "freetype2" }, -- { "type": "freetype", "libs": "-lfreetype" } -+ { "libs": "-lfreetype" } - ] - }, - "fontconfig": { -diff --git a/qtbase/src/network/configure.json b/qtbase/src/network/configure.json -index 1e08aa7..314970e 100644 ---- a/qtbase/src/network/configure.json -+++ b/qtbase/src/network/configure.json -@@ -7,9 +7,6 @@ - - "commandline": { - "assignments": { -- "OPENSSL_LIBS": "openssl.libs", -- "OPENSSL_LIBS_DEBUG": "openssl.libs.debug", -- "OPENSSL_LIBS_RELEASE": "openssl.libs.release", - "OPENSSL_PATH": "openssl.prefix" - }, - "options": { -diff --git a/qtbase/src/sql/configure.json b/qtbase/src/sql/configure.json -index 96c82e8..51a7e51 100644 ---- a/qtbase/src/sql/configure.json -+++ b/qtbase/src/sql/configure.json -@@ -8,7 +8,6 @@ - "commandline": { - "assignments": { - "MYSQL_PATH": "mysql.prefix", -- "PSQL_LIBS": "psql.libs", - "SYBASE": "tds.prefix", - "SYBASE_LIBS": "tds.libs" - }, -@@ -71,8 +70,8 @@ - "sources": [ - { "type": "pkgConfig", "args": "libpq" }, - { "type": "psqlConfig" }, -- { "type": "psqlEnv", "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" }, -- { "type": "psqlEnv", "libs": "-lpq", "condition": "!config.win32" } -+ { "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" }, -+ { "libs": "-lpq", "condition": "!config.win32" } - ] - }, - "tds": { diff --git a/ports/qt5/fix-qalgorithms-vs2017.patch b/ports/qt5/fix-qalgorithms-vs2017.patch deleted file mode 100644 index eab41c0c3..000000000 --- a/ports/qt5/fix-qalgorithms-vs2017.patch +++ /dev/null @@ -1,138 +0,0 @@ -diff --git a/qtbase/src/corelib/tools/qalgorithms.h b/qtbase/src/corelib/tools/qalgorithms.h -index 303374b..7e84695 100644 ---- a/qtbase/src/corelib/tools/qalgorithms.h -+++ b/qtbase/src/corelib/tools/qalgorithms.h -@@ -589,15 +589,16 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NO - return __builtin_popcountll(v); - } - #elif defined(Q_CC_MSVC) && !defined(Q_OS_WINCE) && !defined(Q_PROCESSOR_ARM) -+#define QT_POPCOUNT_CONSTEXPR - #define QT_HAS_BUILTIN_CTZ --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_ctz(quint32 val) -+Q_ALWAYS_INLINE unsigned long qt_builtin_ctz(quint32 val) - { - unsigned long result; - _BitScanForward(&result, val); - return result; - } - #define QT_HAS_BUILTIN_CLZ --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val) -+Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val) - { - unsigned long result; - _BitScanReverse(&result, val); -@@ -610,7 +611,7 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clz(quint32 val) - #if Q_PROCESSOR_WORDSIZE == 8 - // These are only defined for 64bit builds. - #define QT_HAS_BUILTIN_CTZLL --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_ctzll(quint64 val) -+Q_ALWAYS_INLINE unsigned long qt_builtin_ctzll(quint64 val) - { - unsigned long result; - _BitScanForward64(&result, val); -@@ -618,7 +619,7 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_ctzll(quint64 val) - } - // MSVC calls it _BitScanReverse and returns the carry flag, which we don't need - #define QT_HAS_BUILTIN_CLZLL --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clzll(quint64 val) -+Q_ALWAYS_INLINE unsigned long qt_builtin_clzll(quint64 val) - { - unsigned long result; - _BitScanReverse64(&result, val); -@@ -628,31 +629,31 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE unsigned long qt_builtin_clzll(quint64 val) - } - #endif // MSVC 64bit - # define QT_HAS_BUILTIN_CTZS --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_ctzs(quint16 v) Q_DECL_NOTHROW -+Q_ALWAYS_INLINE uint qt_builtin_ctzs(quint16 v) Q_DECL_NOTHROW - { - return qt_builtin_ctz(v); - } - #define QT_HAS_BUILTIN_CLZS --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_clzs(quint16 v) Q_DECL_NOTHROW -+Q_ALWAYS_INLINE uint qt_builtin_clzs(quint16 v) Q_DECL_NOTHROW - { - return qt_builtin_clz(v) - 16U; - } - #define QALGORITHMS_USE_BUILTIN_POPCOUNT --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint32 v) Q_DECL_NOTHROW -+Q_ALWAYS_INLINE uint qt_builtin_popcount(quint32 v) Q_DECL_NOTHROW - { - return __popcnt(v); - } --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint8 v) Q_DECL_NOTHROW -+Q_ALWAYS_INLINE uint qt_builtin_popcount(quint8 v) Q_DECL_NOTHROW - { - return __popcnt16(v); - } --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcount(quint16 v) Q_DECL_NOTHROW -+Q_ALWAYS_INLINE uint qt_builtin_popcount(quint16 v) Q_DECL_NOTHROW - { - return __popcnt16(v); - } - #if Q_PROCESSOR_WORDSIZE == 8 - #define QALGORITHMS_USE_BUILTIN_POPCOUNTLL --Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NOTHROW -+Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NOTHROW - { - return __popcnt64(v); - } -@@ -660,9 +661,13 @@ Q_DECL_CONSTEXPR Q_ALWAYS_INLINE uint qt_builtin_popcountll(quint64 v) Q_DECL_NO - #endif // MSVC - #endif // QT_HAS_CONSTEXPR_BUILTINS - -+#ifndef QT_POPCOUNT_CONSTEXPR -+#define QT_POPCOUNT_CONSTEXPR Q_DECL_CONSTEXPR -+#endif -+ - } //namespace QAlgorithmsPrivate - --Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint32 v) Q_DECL_NOTHROW -+Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint32 v) Q_DECL_NOTHROW - { - #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT - return QAlgorithmsPrivate::qt_builtin_popcount(v); -@@ -675,7 +680,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint32 v) Q - #endif - } - --Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_DECL_NOTHROW -+Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_DECL_NOTHROW - { - #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT - return QAlgorithmsPrivate::qt_builtin_popcount(v); -@@ -685,7 +690,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_ - #endif - } - --Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint16 v) Q_DECL_NOTHROW -+Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint16 v) Q_DECL_NOTHROW - { - #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT - return QAlgorithmsPrivate::qt_builtin_popcount(v); -@@ -696,7 +701,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint16 v) Q - #endif - } - --Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint64 v) Q_DECL_NOTHROW -+Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(quint64 v) Q_DECL_NOTHROW - { - #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNTLL - return QAlgorithmsPrivate::qt_builtin_popcountll(v); -@@ -711,7 +716,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint64 v) Q - #endif - } - --Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(long unsigned int v) Q_DECL_NOTHROW -+Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR inline uint qPopulationCount(long unsigned int v) Q_DECL_NOTHROW - { - return qPopulationCount(static_cast(v)); - } -@@ -719,6 +724,7 @@ Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(long unsigne - #if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) - #undef QALGORITHMS_USE_BUILTIN_POPCOUNT - #endif -+#undef QT_POPCOUNT_CONSTEXPR - - Q_DECL_RELAXED_CONSTEXPR inline uint qCountTrailingZeroBits(quint32 v) Q_DECL_NOTHROW - { diff --git a/ports/qt5/fixcmake.py b/ports/qt5/fixcmake.py deleted file mode 100644 index b081af58e..000000000 --- a/ports/qt5/fixcmake.py +++ /dev/null @@ -1,63 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - for line in openedfile: - if "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - # Qt5AxServer(d).lib has been moved to manual-link: - if '_qt5AxServer_install_prefix' in line: - line = line.replace('/lib/', '/lib/manual-link/') - - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/qtmaind.lib" in line: - # qtmaind.lib has been moved to manual-link: - builder += line.replace("/lib/", "/debug/lib/manual-link/") - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif "_install_prefix}/lib/qtmain.lib" in line: - # qtmain(d).lib has been moved to manual-link: - builder += line.replace("/lib/", "/lib/manual-link/") - builder += " set(imported_location_debug \"${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib\")\n" - builder += "\n" - builder += " set_target_properties(Qt5::WinMain PROPERTIES\n" - builder += " IMPORTED_LOCATION_DEBUG ${imported_location_debug}\n" - builder += " )\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5/install_qt.cmake b/ports/qt5/install_qt.cmake deleted file mode 100644 index 1b0bec935..000000000 --- a/ports/qt5/install_qt.cmake +++ /dev/null @@ -1,45 +0,0 @@ -function(install_qt) - cmake_parse_arguments(_bc "DISABLE_PARALLEL" "" "" ${ARGN}) - - if (_bc_DISABLE_PARALLEL) - set(JOBS "1") - else() - set(JOBS "$ENV{NUMBER_OF_PROCESSORS}") - endif() - - vcpkg_find_acquire_program(JOM) - vcpkg_find_acquire_program(PYTHON3) - get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) - - set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") - set(_path "$ENV{PATH}") - - message(STATUS "Package ${TARGET_TRIPLET}-rel") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${_path}") - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME build-${TARGET_TRIPLET}-rel - ) - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME package-${TARGET_TRIPLET}-rel - ) - message(STATUS "Package ${TARGET_TRIPLET}-rel done") - - message(STATUS "Package ${TARGET_TRIPLET}-dbg") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/bin;${_path}") - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME build-${TARGET_TRIPLET}-dbg - ) - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME package-${TARGET_TRIPLET}-dbg - ) - set(ENV{PATH} "${_path}") - message(STATUS "Package ${TARGET_TRIPLET}-dbg done") -endfunction() \ No newline at end of file diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake deleted file mode 100644 index 4b852e95c..000000000 --- a/ports/qt5/portfile.cmake +++ /dev/null @@ -1,147 +0,0 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) - message(WARNING "Qt5'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() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) -include(configure_qt) -include(install_qt) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/qt-5.8.0) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.8/5.8.0/single/qt-everywhere-opensource-src-5.8.0.7z" - FILENAME "qt-5.8.0.7z" - SHA512 4c8e7931f0c48318871242c12c2d6f5406be40e037f18690017198a79ef40a72d4319ecb1b8fb5f97c080dbe30174ceb5fd604b3fab22489f977cbeee3e8abe7 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.8.0) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/qt-everywhere-opensource-src-5.8.0 ${CURRENT_BUILDTREES_DIR}/src/qt-5.8.0) -endif() - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-qalgorithms-vs2017.patch" "${CMAKE_CURRENT_LIST_DIR}/fix-commandline-overrides.patch" -) - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -configure_qt( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -confirm-license - -opensource - -system-zlib - -system-libjpeg - -system-libpng - -system-freetype - -system-pcre - -system-harfbuzz - -system-doubleconversion - -system-sqlite - -sql-sqlite - -sql-psql - -nomake examples -nomake tests - -skip webengine - -opengl desktop # other options are "-no-opengl" and "-opengl angle" - -mp - LIBJPEG_LIBS="-ljpeg" - OPTIONS_RELEASE - ZLIB_LIBS="-lzlib" - LIBPNG_LIBS="-llibpng16" - OPTIONS_DEBUG - ZLIB_LIBS="-lzlibd" - LIBPNG_LIBS="-llibpng16d" - PCRE_LIBS="-lpcre16d" - PSQL_LIBS="-llibpqd" - FREETYPE_LIBS="-lfreetyped" -) -install_qt() - -vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/lib/cmake - PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-private-header-paths.patch" -) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) -file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") -file(REMOVE ${BINARY_TOOLS}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cmake - LOGNAME fix-cmake -) - -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - - -#--------------------------------------------------------------------------- -# Qt5Bootstrap: a release-only dependency -#--------------------------------------------------------------------------- -# Remove release-only Qt5Bootstrap.lib from debug folders: -#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) -#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) -# Above approach does not work: -# check_matching_debug_and_release_binaries(dbg_libs, rel_libs) -# requires the two sets to be of equal size! -# Alt. approach, create dummy folder instead: -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) -#--------------------------------------------------------------------------- - -#--------------------------------------------------------------------------- -# qtmain(d) vs. Qt5AxServer(d) -#--------------------------------------------------------------------------- -# Qt applications have to either link to qtmain(d) or to Qt5AxServer(d), -# never both. See http://doc.qt.io/qt-5/activeqt-server.html for more info. -# -# Create manual-link folders: -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -# -# Either have users explicitly link against qtmain.lib, qtmaind.lib: -file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl) -# -# ... or have users explicitly link against Qt5AxServer.lib, Qt5AxServerd.lib: -file(COPY ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(COPY ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Qt5AxServer.prl) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5AxServerd.prl) -#--------------------------------------------------------------------------- - -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5 RENAME copyright) -if(EXISTS ${CURRENT_PACKAGES_DIR}/plugins) - file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins) -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/plugins) - file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins) -endif() diff --git a/ports/qt5/qtdeploy.ps1 b/ports/qt5/qtdeploy.ps1 deleted file mode 100644 index 9d514e411..000000000 --- a/ports/qt5/qtdeploy.ps1 +++ /dev/null @@ -1,68 +0,0 @@ -# This script is based on the implementation of windeployqt for qt5.7.1 -# -# Qt's plugin deployment strategy is that each main Qt Module has a hardcoded -# set of plugin subdirectories. Each of these subdirectories is deployed in -# full if that Module is referenced. -# -# This hardcoded list is found inside qttools\src\windeployqt\main.cpp. For -# updating, inspect the symbols qtModuleEntries and qtModuleForPlugin. - -# Note: this function signature and behavior is depended upon by applocal.ps1 -function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [string]$targetBinaryName) { - - function deployPlugins([string]$pluginSubdirName) { - if (Test-Path "$QtPluginsDir\$pluginSubdirName") { - Write-Verbose " Deploying plugins directory '$pluginSubdirName'" - New-Item "$targetBinaryDir\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null - Get-ChildItem "$QtPluginsDir\$pluginSubdirName\*.dll" | % { - deployBinary "$targetBinaryDir\$pluginSubdirName" "$QtPluginsDir\$pluginSubdirName" $_.Name - } - } else { - Write-Verbose " Skipping plugins directory '$pluginSubdirName': doesn't exist" - } - } - - # We detect Qt modules in use via the DLLs themselves. See qtModuleEntries in Qt to find the mapping. - if ($targetBinaryName -like "Qt5Gui*.dll") { - Write-Verbose " Deploying platforms" - New-Item "$targetBinaryDir\platforms" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null - Get-ChildItem "$QtPluginsDir\platforms\qwindows*.dll" | % { - deployBinary "$targetBinaryDir\platforms" "$QtPluginsDir\platforms" $_.Name - } - - deployPlugins "accessible" - deployPlugins "imageformats" - deployPlugins "iconengines" - deployPlugins "platforminputcontexts" - } elseif ($targetBinaryName -like "Qt5Network*.dll") { - deployPlugins "bearer" - } elseif ($targetBinaryName -like "Qt5Sql*.dll") { - deployPlugins "sqldrivers" - } elseif ($targetBinaryName -like "Qt5Multimedia*.dll") { - deployPlugins "audio" - deployPlugins "mediaservice" - deployPlugins "playlistformats" - } elseif ($targetBinaryName -like "Qt5PrintSupport*.dll") { - deployPlugins "printsupport" - } elseif ($targetBinaryName -like "Qt5Quick*.dll") { - deployPlugins "scenegraph" - deployPlugins "qmltooling" - } elseif ($targetBinaryName -like "Qt5Declarative*.dll") { - deployPlugins "qml1tooling" - } elseif ($targetBinaryName -like "Qt5Positioning*.dll") { - deployPlugins "position" - } elseif ($targetBinaryName -like "Qt5Location*.dll") { - deployPlugins "geoservices" - } elseif ($targetBinaryName -like "Qt5Sensors*.dll") { - deployPlugins "sensors" - deployPlugins "sensorgestures" - } elseif ($targetBinaryName -like "Qt5WebEngineCore*.dll") { - deployPlugins "qtwebengine" - } elseif ($targetBinaryName -like "Qt53DRenderer*.dll") { - deployPlugins "sceneparsers" - } elseif ($targetBinaryName -like "Qt5TextToSpeech*.dll") { - deployPlugins "texttospeech" - } elseif ($targetBinaryName -like "Qt5SerialBus*.dll") { - deployPlugins "canbus" - } -} -- cgit v1.2.3 From 93497f5eab0c1628cc5b1a3a9a671c069c8f8533 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 15 Oct 2017 22:16:46 -0700 Subject: Casing and specification correctness --- toolsrc/src/vcpkg/commands.autocomplete.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index 23c2c2f7e..3901566d9 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -93,16 +93,21 @@ namespace vcpkg::Commands::Autocomplete struct CommandEntry { + constexpr CommandEntry(const CStringView& regex, const CommandStructure& structure) + : regex(regex), structure(structure) + { + } + CStringView regex; const CommandStructure& structure; }; - static constexpr CommandEntry commands[] = { - {R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, - {R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, - {R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, + static constexpr CommandEntry COMMANDS[] = { + CommandEntry{R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, + CommandEntry{R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, + CommandEntry{R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, }; - for (auto&& command : commands) + for (auto&& command : COMMANDS) { if (std::regex_match(to_autocomplete, match, std::regex{command.regex.c_str()})) { -- cgit v1.2.3 From 6942c00a453c9fa4f9fbde7ba821974110b43d57 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 15 Oct 2017 23:23:39 -0700 Subject: [triplet] Remove obsolete check about dash in the name Triplets haven't required that for a while now --- toolsrc/src/vcpkg/triplet.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/toolsrc/src/vcpkg/triplet.cpp b/toolsrc/src/vcpkg/triplet.cpp index 8a84ee2b2..4ebb97a9b 100644 --- a/toolsrc/src/vcpkg/triplet.cpp +++ b/toolsrc/src/vcpkg/triplet.cpp @@ -41,9 +41,6 @@ namespace vcpkg Triplet Triplet::from_canonical_name(const std::string& triplet_as_string) { std::string s(Strings::ascii_to_lowercase(triplet_as_string)); - const auto it = std::find(s.cbegin(), s.cend(), '-'); - Checks::check_exit(VCPKG_LINE_INFO, it != s.cend(), "Invalid triplet: %s", triplet_as_string); - const auto p = g_triplet_instances.emplace(std::move(s)); return &*p.first; } -- cgit v1.2.3 From b486be5eb3b12c0a6fa0a81992768340317ec5c2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 15 Oct 2017 23:24:34 -0700 Subject: Introduce VcpkgPaths::get_available_triplets() --- toolsrc/include/vcpkg/vcpkgpaths.h | 2 ++ toolsrc/src/vcpkg/help.cpp | 4 ++-- toolsrc/src/vcpkg/vcpkgpaths.cpp | 25 ++++++++++++++++--------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index fb9285a84..32dd2e833 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -36,6 +36,7 @@ namespace vcpkg 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; fs::path root; @@ -74,6 +75,7 @@ namespace vcpkg Files::Filesystem& get_filesystem() const; private: + Lazy> available_triplets; Lazy cmake_exe; Lazy git_exe; Lazy nuget_exe; diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index 7867f71d2..2a0578211 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -16,9 +16,9 @@ namespace vcpkg::Help void help_topic_valid_triplet(const VcpkgPaths& paths) { System::println("Available architecture triplets:"); - for (auto&& path : paths.get_filesystem().get_files_non_recursive(paths.triplets)) + for (auto&& triplet : paths.get_available_triplets()) { - System::println(" %s", path.stem().filename().string()); + System::println(" %s", triplet); } } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 07ce5c961..c57077eaa 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -255,18 +255,25 @@ namespace vcpkg return this->vcpkg_dir_info / (pgh.fullstem() + ".list"); } - bool VcpkgPaths::is_valid_triplet(const Triplet& t) const + const std::vector& VcpkgPaths::get_available_triplets() const { - for (auto&& path : get_filesystem().get_files_non_recursive(this->triplets)) - { - const std::string triplet_file_name = path.stem().generic_u8string(); - if (t.canonical_name() == triplet_file_name) // TODO: fuzzy compare + return this->available_triplets.get_lazy([this]() -> std::vector { + + std::vector output; + for (auto&& path : this->get_filesystem().get_files_non_recursive(this->triplets)) { - // t.value = triplet_file_name; // NOTE: uncomment when implementing fuzzy compare - return true; + output.push_back(path.stem().filename().string()); } - } - return false; + + return output; + }); + } + + bool VcpkgPaths::is_valid_triplet(const Triplet& t) const + { + auto it = Util::find_if(this->get_available_triplets(), + [&](auto&& available_triplet) { return t.canonical_name() == available_triplet; }); + return it != this->get_available_triplets().cend(); } const fs::path& VcpkgPaths::get_cmake_exe() const -- cgit v1.2.3 From e46ec5369318f84f359af9f88cb3d517329bf088 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 15 Oct 2017 23:33:52 -0700 Subject: Remove unused functions --- toolsrc/src/vcpkg/commands.autocomplete.cpp | 34 ----------------------------- 1 file changed, 34 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index 3901566d9..feca75dcd 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -10,40 +10,6 @@ namespace vcpkg::Commands::Autocomplete { - std::vector autocomplete_install( - const std::vector>& source_paragraphs, const std::string& start_with) - { - std::vector results; - - for (const auto& source_control_file : source_paragraphs) - { - auto&& sp = *source_control_file->core_paragraph; - - if (Strings::case_insensitive_ascii_starts_with(sp.name, start_with)) - { - results.push_back(sp.name); - } - } - return results; - } - - std::vector autocomplete_remove(std::vector installed_packages, - const std::string& start_with) - { - std::vector results; - - for (const auto& installed_package : installed_packages) - { - const auto sp = installed_package->package.displayname(); - - if (Strings::case_insensitive_ascii_starts_with(sp, start_with)) - { - results.push_back(sp); - } - } - return results; - } - [[noreturn]] static void output_sorted_results_and_exit(const LineInfo& line_info, std::vector&& results) { -- cgit v1.2.3 From 798f8a91e43bfdeda8113639ff262f42e5ab6f84 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 15 Oct 2017 23:53:35 -0700 Subject: Introduce Vectors::concatenate() --- toolsrc/include/vcpkg/base/util.h | 17 +++++++++++++---- toolsrc/src/vcpkg/install.cpp | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 3834580b6..4f06a8231 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -7,6 +7,18 @@ namespace vcpkg::Util { + template + using ElementT = std::remove_reference_t()))>; + + namespace Vectors + { + template> + void concatenate(std::vector* augend, const Container& addend) + { + augend->insert(augend->end(), addend.begin(), addend.end()); + } + } + template using FmapOut = decltype(std::declval()(*begin(std::declval()))); @@ -71,9 +83,6 @@ namespace vcpkg::Util return std::find_if(begin(cont), end(cont), pred); } - template - using ElementT = std::remove_reference_t()))>; - template> std::vector element_pointers(Container&& cont) { @@ -153,4 +162,4 @@ namespace vcpkg::Util std::unique_lock m_lock; T& m_ptr; }; -} \ No newline at end of file +} diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 26f729a57..4a1e5537b 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -145,7 +145,7 @@ namespace vcpkg::Install continue; } - output.insert(output.end(), t.files.begin(), t.files.end()); + Util::Vectors::concatenate(&output, t.files); } std::sort(output.begin(), output.end()); -- cgit v1.2.3 From 01f47f5823b0c0db4a7e3e5b690dbc809429da56 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 01:14:04 -0700 Subject: [autocomplete] Add triplet completion for `vcpkg install` --- toolsrc/src/vcpkg/commands.autocomplete.cpp | 65 +++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index feca75dcd..addb9edaf 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -19,6 +19,13 @@ namespace vcpkg::Commands::Autocomplete Checks::exit_success(line_info); } + std::vector combine_port_with_triplets(const std::string& port, + const std::vector& triplets) + { + return Util::fmap(triplets, + [&](const std::string& triplet) { return Strings::format("%s:%s", port, triplet); }); + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { Metrics::g_metrics.lock()->set_send_metrics(false); @@ -57,41 +64,75 @@ namespace vcpkg::Commands::Autocomplete output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(valid_commands)); } + // Handles vcpkg install package: + if (std::regex_match(to_autocomplete, match, std::regex{R"###(^install(.*|)\s([^:]+):(\S*)$)###"})) + { + 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)); + if (maybe_port.error()) + { + Checks::exit_success(VCPKG_LINE_INFO); + } + + std::vector triplets = paths.get_available_triplets(); + Util::unstable_keep_if(triplets, [&](const std::string& s) { + return Strings::case_insensitive_ascii_starts_with(s, triplet_prefix); + }); + + auto result = combine_port_with_triplets(port_name, triplets); + + output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(result)); + } + struct CommandEntry { - constexpr CommandEntry(const CStringView& regex, const CommandStructure& structure) - : regex(regex), structure(structure) + constexpr CommandEntry(const CStringView& name, const CStringView& regex, const CommandStructure& structure) + : name(name), regex(regex), structure(structure) { } + CStringView name; CStringView regex; const CommandStructure& structure; }; + static constexpr CommandEntry COMMANDS[] = { - CommandEntry{R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, - CommandEntry{R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, - CommandEntry{R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, + CommandEntry{"install", R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, + CommandEntry{"install", R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, + CommandEntry{"edit", R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, + CommandEntry{"remove", R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, }; for (auto&& command : COMMANDS) { if (std::regex_match(to_autocomplete, match, std::regex{command.regex.c_str()})) { - auto prefix = match[2].str(); - std::vector v; + const auto prefix = match[2].str(); + std::vector results; + if (Strings::case_insensitive_ascii_starts_with(prefix, "-")) { - v = Util::fmap(command.structure.switches, [](auto&& s) -> std::string { return s; }); + results = Util::fmap(command.structure.switches, [](auto&& s) -> std::string { return s; }); } else { - v = command.structure.valid_arguments(paths); + results = command.structure.valid_arguments(paths); } - Util::unstable_keep_if( - v, [&](const std::string& s) { return Strings::case_insensitive_ascii_starts_with(s, prefix); }); + Util::unstable_keep_if(results, [&](const std::string& s) { + return Strings::case_insensitive_ascii_starts_with(s, prefix); + }); + + if (command.name == "install" && results.size() == 1) + { + const auto port_at_each_triplet = + combine_port_with_triplets(results[0], paths.get_available_triplets()); + Util::Vectors::concatenate(&results, port_at_each_triplet); + } - output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(v)); + output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(results)); } } -- cgit v1.2.3 From 3ba22c17540fc761c4fb3410ccd75cecb0f1f8b5 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 16 Oct 2017 23:04:16 +1100 Subject: working qt tools build --- ports/qt5base/configure_qt.cmake | 5 +- ports/qt5base/fix-debug-qmakespecs.patch | 62 +++++++++++++++++++++++ ports/qt5base/portfile.cmake | 27 +++------- ports/qt5declarative/CONTROL | 4 ++ ports/qt5declarative/portfile.cmake | 44 ++++++++++++++++ ports/qt5doc/CONTROL | 4 ++ ports/qt5doc/portfile.cmake | 44 ++++++++++++++++ ports/qt5tools/portfile.cmake | 19 ++++--- ports/qt5winextras/CONTROL | 4 ++ ports/qt5winextras/portfile.cmake | 44 ++++++++++++++++ scripts/cmake/vcpkg_build_qmake.cmake | 4 +- scripts/cmake/vcpkg_build_qmake_debug.cmake | 29 +++++++++++ scripts/cmake/vcpkg_build_qmake_release.cmake | 29 +++++++++++ scripts/cmake/vcpkg_common_functions.cmake | 4 ++ scripts/cmake/vcpkg_configure_qmake_debug.cmake | 41 +++++++++++++++ scripts/cmake/vcpkg_configure_qmake_release.cmake | 43 ++++++++++++++++ 16 files changed, 377 insertions(+), 30 deletions(-) create mode 100644 ports/qt5base/fix-debug-qmakespecs.patch create mode 100644 ports/qt5declarative/CONTROL create mode 100644 ports/qt5declarative/portfile.cmake create mode 100644 ports/qt5doc/CONTROL create mode 100644 ports/qt5doc/portfile.cmake create mode 100644 ports/qt5winextras/CONTROL create mode 100644 ports/qt5winextras/portfile.cmake create mode 100644 scripts/cmake/vcpkg_build_qmake_debug.cmake create mode 100644 scripts/cmake/vcpkg_build_qmake_release.cmake create mode 100644 scripts/cmake/vcpkg_configure_qmake_debug.cmake create mode 100644 scripts/cmake/vcpkg_configure_qmake_release.cmake diff --git a/ports/qt5base/configure_qt.cmake b/ports/qt5base/configure_qt.cmake index fea8de923..315c48bdf 100644 --- a/ports/qt5base/configure_qt.cmake +++ b/ports/qt5base/configure_qt.cmake @@ -29,10 +29,11 @@ function(configure_qt) -debug -prefix ${CURRENT_PACKAGES_DIR}/debug -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 - -archdatadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5 - -datadir ${CURRENT_PACKAGES_DIR}/debug/share/qt5 + -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug + -datadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug -plugindir ${CURRENT_PACKAGES_DIR}/debug/plugins -qmldir ${CURRENT_PACKAGES_DIR}/debug/qml + -headerdir ${CURRENT_PACKAGES_DIR}/share/qt5/debug/include -I ${CURRENT_INSTALLED_DIR}/include -L ${CURRENT_INSTALLED_DIR}/debug/lib -platform ${PLATFORM} diff --git a/ports/qt5base/fix-debug-qmakespecs.patch b/ports/qt5base/fix-debug-qmakespecs.patch new file mode 100644 index 000000000..2e069cfeb --- /dev/null +++ b/ports/qt5base/fix-debug-qmakespecs.patch @@ -0,0 +1,62 @@ +diff --git a/mkspecs/modules/qt_lib_gui_private.pri b/mkspecs/modules/qt_lib_gui_private.pri +index 5473e78..c5e7448 100644 +--- a/mkspecs/modules/qt_lib_gui_private.pri ++++ b/mkspecs/modules/qt_lib_gui_private.pri +@@ -11,4 +11,9 @@ QT.gui_private.enabled_features = direct2d directwrite directwrite2 freetype gif + QT.gui_private.disabled_features = xcb accessibility-atspi-bridge angle_d3d11_qdtd directfb egl egl_x11 eglfs eglfs_brcm eglfs_egldevice eglfs_gbm eglfs_mali eglfs_viv eglfs_viv_wl evdev fontconfig integrityfb integrityhid kms libinput libinput-axis-api linuxfb mirclient mtdev system-freetype system-xcb tslib vnc xkbcommon-evdev xlib + QMAKE_LIBS_HARFBUZZ = -lharfbuzz + QMAKE_LIBS_LIBJPEG = -ljpeg +-QMAKE_LIBS_LIBPNG = -llibpng16 ++CONFIG(release, debug|release) { ++ QMAKE_LIBS_LIBPNG = -llibpng16 ++} ++CONFIG(debug, debug|release) { ++ QMAKE_LIBS_LIBPNG = -llibpng16d ++} +diff --git a/mkspecs/qconfig.pri b/mkspecs/qconfig.pri +index 2af37df..646b8e5 100644 +--- a/mkspecs/qconfig.pri ++++ b/mkspecs/qconfig.pri +@@ -2,8 +2,14 @@ QT_ARCH = x86_64 + QT_BUILDABI = x86_64-little_endian-lp64 + QT.global.enabled_features = shared c++11 concurrent + QT.global.disabled_features = cross_compile framework rpath appstore-compliant debug_and_release simulator_and_device build_all c++14 c++1z pkg-config force_asserts separate_debug_info static +-QT_CONFIG += shared release c++11 concurrent dbus no-pkg-config stl +-CONFIG += shared release no_plugin_manifest ++CONFIG(release, debug|release) { ++ QT_CONFIG += shared release c++11 concurrent dbus no-pkg-config stl ++ CONFIG += shared release no_plugin_manifest ++} ++CONFIG(debug, debug|release) { ++ QT_CONFIG += shared debug c++11 concurrent dbus no-pkg-config release_tools stl ++ CONFIG += shared debug no_plugin_manifest ++} + QT_VERSION = 5.9.2 + QT_MAJOR_VERSION = 5 + QT_MINOR_VERSION = 9 +diff --git a/mkspecs/qmodule.pri b/mkspecs/qmodule.pri +index 3e213d4..00a37ca 100644 +--- a/mkspecs/qmodule.pri ++++ b/mkspecs/qmodule.pri +@@ -1,10 +1,17 @@ + EXTRA_INCLUDEPATH += C:/vcpkg/installed/x64-windows/include +-EXTRA_LIBDIR += C:/vcpkg/installed/x64-windows/lib ++CONFIG(release, debug|release) { ++ EXTRA_LIBDIR += C:/vcpkg/installed/x64-windows/lib ++ QT.global_private.enabled_features = alloca_malloc_h alloca sse2 dbus gui network qml-debug sql system-zlib testlib widgets xml ++ QT.global_private.disabled_features = alloca_h android-style-assets private_tests dbus-linked libudev posix_fallocate reduce_exports reduce_relocations release_tools stack-protector-strong ++ QMAKE_LIBS_ZLIB = -lzlib ++} ++CONFIG(debug, debug|release) { ++ QT.global_private.enabled_features = alloca_malloc_h alloca sse2 dbus gui network qml-debug release_tools sql system-zlib testlib widgets xml ++ QT.global_private.disabled_features = alloca_h android-style-assets private_tests dbus-linked libudev posix_fallocate reduce_exports reduce_relocations stack-protector-strong ++ QMAKE_LIBS_ZLIB = -lzlibd ++} + QT_CPU_FEATURES.x86_64 = sse sse2 +-QT.global_private.enabled_features = alloca_malloc_h alloca sse2 dbus gui network qml-debug sql system-zlib testlib widgets xml +-QT.global_private.disabled_features = alloca_h android-style-assets private_tests dbus-linked libudev posix_fallocate reduce_exports reduce_relocations release_tools stack-protector-strong + QT_COORD_TYPE = double +-QMAKE_LIBS_ZLIB = -lzlib + CONFIG += sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 compile_examples f16c largefile msvc_mp precompile_header + QT_BUILD_PARTS += libs tools + QT_HOST_CFLAGS_DBUS += diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake index 359c81990..047f167fb 100644 --- a/ports/qt5base/portfile.cmake +++ b/ports/qt5base/portfile.cmake @@ -70,16 +70,22 @@ configure_qt( install_qt() +#vcpkg_apply_patches( +# SOURCE_PATH ${CURRENT_PACKAGES_DIR}/share/qt5 +# PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-debug-qmakespecs.patch" +#) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) file(REMOVE ${BINARY_TOOLS}) file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) file(REMOVE ${BINARY_TOOLS}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) vcpkg_execute_required_process( COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py @@ -89,21 +95,4 @@ vcpkg_execute_required_process( vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) -#--------------------------------------------------------------------------- -# Qt5Bootstrap: a release-only dependency -#--------------------------------------------------------------------------- -# Remove release-only Qt5Bootstrap.lib from debug folders: -#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) -#file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) -# Above approach does not work: -# check_matching_debug_and_release_binaries(dbg_libs, rel_libs) -# requires the two sets to be of equal size! -# Alt. approach, create dummy folder instead: -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/dont-use) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5Bootstrap.prl) -#--------------------------------------------------------------------------- - file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5base RENAME copyright) \ No newline at end of file diff --git a/ports/qt5declarative/CONTROL b/ports/qt5declarative/CONTROL new file mode 100644 index 000000000..67ffc3212 --- /dev/null +++ b/ports/qt5declarative/CONTROL @@ -0,0 +1,4 @@ +Source: qt5declarative +Version: 5.9.2-0 +Description: Qt5 Declarative (Quick 2) +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5declarative/portfile.cmake b/ports/qt5declarative/portfile.cmake new file mode 100644 index 000000000..b6a24946b --- /dev/null +++ b/ports/qt5declarative/portfile.cmake @@ -0,0 +1,44 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtdeclarative-5.9.2") +set(ARCHIVE_NAME "qtdeclarative-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 49b8b50932b73ea39da14ac3425044193dfd64eabceadba379aa01cf2fc141177f9870c387caf1cf93ce09e8b197828a54b8d9fcefc4d9cdf400a6c6dd9a9e90 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) + +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") + +vcpkg_configure_qmake( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} + OPTIONS "CONFIG+=debug_and_release" +) + +vcpkg_build_qmake() diff --git a/ports/qt5doc/CONTROL b/ports/qt5doc/CONTROL new file mode 100644 index 000000000..aef693586 --- /dev/null +++ b/ports/qt5doc/CONTROL @@ -0,0 +1,4 @@ +Source: qt5doc +Version: 5.9.2-0 +Description: Qt5 Document Creation Module +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5doc/portfile.cmake b/ports/qt5doc/portfile.cmake new file mode 100644 index 000000000..9cacc8166 --- /dev/null +++ b/ports/qt5doc/portfile.cmake @@ -0,0 +1,44 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtdoc-5.9.2") +set(ARCHIVE_NAME "qtdoc-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 9352856d5ef48afa28771f05cbf5bc7b3a49181b4696bd018a8294cbfc3a6d25de6625830f0ba776689deb098d7eb549dd19b362cbb5ecfda1b2d6d2e15ef43f +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake index 6d01d6333..2a2e5cd4d 100644 --- a/ports/qt5tools/portfile.cmake +++ b/ports/qt5tools/portfile.cmake @@ -31,19 +31,24 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") -#Clean up build directories -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() -vcpkg_configure_qmake( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} - OPTIONS "CONFIG+=release" +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) -vcpkg_build_qmake() +vcpkg_build_qmake_release() -file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/bin/*.exe") +file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe") file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) file(REMOVE ${BINARY_TOOLS}) +file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright) diff --git a/ports/qt5winextras/CONTROL b/ports/qt5winextras/CONTROL new file mode 100644 index 000000000..67117a9fa --- /dev/null +++ b/ports/qt5winextras/CONTROL @@ -0,0 +1,4 @@ +Source: qt5winextras +Version: 5.9.2-0 +Description: Qt5 Windows extras +Build-Depends: qt5base, atlmfc \ No newline at end of file diff --git a/ports/qt5winextras/portfile.cmake b/ports/qt5winextras/portfile.cmake new file mode 100644 index 000000000..678a8a214 --- /dev/null +++ b/ports/qt5winextras/portfile.cmake @@ -0,0 +1,44 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtwinextras-5.9.2") +set(ARCHIVE_NAME "qtwinextras-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 dbfb89833cc291fade8e9fe2ad9c7b7a78c2032de8dcbca1049d637f829811b99e1852ae39ca73a6eac2960df168765bee28023bb723e69c87e2f3bb50b7ef02 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake index bee5da7c9..693f7841e 100644 --- a/scripts/cmake/vcpkg_build_qmake.cmake +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -15,7 +15,7 @@ function(vcpkg_build_qmake) vcpkg_find_acquire_program(JOM) # Make sure that the linker finds the libraries used - set(ENV_PATH_BACKUP ENV{PATH}) + set(ENV_PATH_BACKUP "$ENV{PATH}") set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/debug/lib;${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin;${CURRENT_INSTALLED_DIR}/tools/qt5;$ENV{PATH}") message(STATUS "Package ${TARGET_TRIPLET}") @@ -27,5 +27,5 @@ function(vcpkg_build_qmake) message(STATUS "Package ${TARGET_TRIPLET} done") # Restore the original value of ENV{PATH} - set(ENV{PATH} ENV_PATH_BACKUP) + set(ENV{PATH} "${ENV_PATH_BACKUP}") endfunction() diff --git a/scripts/cmake/vcpkg_build_qmake_debug.cmake b/scripts/cmake/vcpkg_build_qmake_debug.cmake new file mode 100644 index 000000000..7e5625850 --- /dev/null +++ b/scripts/cmake/vcpkg_build_qmake_debug.cmake @@ -0,0 +1,29 @@ +#.rst: +# .. command:: vcpkg_build_qmake_debug +# +# Build a qmake-based project, previously configured using vcpkg_configure_qmake_debug. +# +# :: +# vcpkg_build_qmake_debug() +# +# +# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html + +function(vcpkg_build_qmake_debug) + vcpkg_find_acquire_program(JOM) + + # Make sure that the linker finds the libraries used + set(ENV_PATH_BACKUP "$ENV{PATH}") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/lib;${CURRENT_INSTALLED_DIR}/debug/bin;${CURRENT_INSTALLED_DIR}/debug/tools/qt5;$ENV{PATH}") + + message(STATUS "Package ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${JOM} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME package-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Package ${TARGET_TRIPLET}-dbg done") + + # Restore the original value of ENV{PATH} + set(ENV{PATH} "${ENV_PATH_BACKUP}") +endfunction() diff --git a/scripts/cmake/vcpkg_build_qmake_release.cmake b/scripts/cmake/vcpkg_build_qmake_release.cmake new file mode 100644 index 000000000..6cfbcdc91 --- /dev/null +++ b/scripts/cmake/vcpkg_build_qmake_release.cmake @@ -0,0 +1,29 @@ +#.rst: +# .. command:: vcpkg_build_qmake_release +# +# Build a qmake-based project, previously configured using vcpkg_configure_qmake_release. +# +# :: +# vcpkg_build_qmake_release() +# +# +# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html + +function(vcpkg_build_qmake_release) + vcpkg_find_acquire_program(JOM) + + # Make sure that the linker finds the libraries used + set(ENV_PATH_BACKUP "$ENV{PATH}") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/tools/qt5;$ENV{PATH}") + + message(STATUS "Package ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${JOM} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME package-${TARGET_TRIPLET}-rel + ) + message(STATUS "Package ${TARGET_TRIPLET}-rel done") + + # Restore the original value of ENV{PATH} + set(ENV{PATH} "${ENV_PATH_BACKUP}") +endfunction() diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 81e8e5813..5dabd446e 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -10,11 +10,15 @@ include(vcpkg_from_bitbucket) include(vcpkg_build_cmake) include(vcpkg_build_msbuild) include(vcpkg_build_qmake) +include(vcpkg_build_qmake_debug) +include(vcpkg_build_qmake_release) include(vcpkg_install_cmake) include(vcpkg_install_meson) include(vcpkg_configure_cmake) include(vcpkg_configure_meson) include(vcpkg_configure_qmake) +include(vcpkg_configure_qmake_debug) +include(vcpkg_configure_qmake_release) include(vcpkg_apply_patches) include(vcpkg_copy_pdbs) include(vcpkg_copy_tool_dependencies) diff --git a/scripts/cmake/vcpkg_configure_qmake_debug.cmake b/scripts/cmake/vcpkg_configure_qmake_debug.cmake new file mode 100644 index 000000000..0166973d2 --- /dev/null +++ b/scripts/cmake/vcpkg_configure_qmake_debug.cmake @@ -0,0 +1,41 @@ +#.rst: +# .. command:: vcpkg_configure_qmake_debug +# +# Configure a qmake-based project. +# This sets the config variable to debug and outputs to +# a debug triplet directory. +# +# :: +# vcpkg_configure_qmake_debug(SOURCE_PATH +# [OPTIONS arg1 [arg2 ...]] +# ) +# +# ``SOURCE_PATH`` +# The path to the *.pro qmake project file. +# ``OPTIONS`` +# The options passed to qmake. +# +# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html + +function(vcpkg_configure_qmake_debug) + cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) + + # Find qmake exectuable + find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/debug/tools/qt5) + + if(NOT QMAKE_COMMAND) + message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") + endif() + + # Cleanup build directories + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + vcpkg_execute_required_process( + COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") +endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_qmake_release.cmake b/scripts/cmake/vcpkg_configure_qmake_release.cmake new file mode 100644 index 000000000..67bdbdfb0 --- /dev/null +++ b/scripts/cmake/vcpkg_configure_qmake_release.cmake @@ -0,0 +1,43 @@ +#.rst: +# .. command:: vcpkg_configure_qmake_release +# +# Configure a qmake-based project. +# This sets the config variable to release and outputs to +# a release triplet directory. +# +# :: +# vcpkg_configure_qmake_release(SOURCE_PATH +# [OPTIONS arg1 [arg2 ...]] +# ) +# +# ``SOURCE_PATH`` +# The path to the *.pro qmake project file. +# ``OPTIONS`` +# The options passed to qmake. +# +# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html + +function(vcpkg_configure_qmake_release) + cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) + + # Find qmake exectuable + find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) + + if(NOT QMAKE_COMMAND) + message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") + endif() + + # Cleanup build directories + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + vcpkg_execute_required_process( + COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + unset(QMAKE_COMMAND PARENT_SCOPE) + unset(QMAKE_COMMAND CACHE) +endfunction() \ No newline at end of file -- cgit v1.2.3 From d28de4a13edca249086e3ccf8d34e92ecb10006d Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 16 Oct 2017 23:56:47 +1100 Subject: qt5winextras --- ports/qt5base/fix-debug-qmakespecs.patch | 62 ----------------------- ports/qt5base/install_qt.cmake | 1 - ports/qt5base/portfile.cmake | 7 --- ports/qt5winextras/fixcmake.py | 48 ++++++++++++++++++ ports/qt5winextras/portfile.cmake | 41 +++++++++++++-- scripts/cmake/vcpkg_configure_qmake_debug.cmake | 3 ++ scripts/cmake/vcpkg_configure_qmake_release.cmake | 1 + 7 files changed, 90 insertions(+), 73 deletions(-) delete mode 100644 ports/qt5base/fix-debug-qmakespecs.patch create mode 100644 ports/qt5winextras/fixcmake.py diff --git a/ports/qt5base/fix-debug-qmakespecs.patch b/ports/qt5base/fix-debug-qmakespecs.patch deleted file mode 100644 index 2e069cfeb..000000000 --- a/ports/qt5base/fix-debug-qmakespecs.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff --git a/mkspecs/modules/qt_lib_gui_private.pri b/mkspecs/modules/qt_lib_gui_private.pri -index 5473e78..c5e7448 100644 ---- a/mkspecs/modules/qt_lib_gui_private.pri -+++ b/mkspecs/modules/qt_lib_gui_private.pri -@@ -11,4 +11,9 @@ QT.gui_private.enabled_features = direct2d directwrite directwrite2 freetype gif - QT.gui_private.disabled_features = xcb accessibility-atspi-bridge angle_d3d11_qdtd directfb egl egl_x11 eglfs eglfs_brcm eglfs_egldevice eglfs_gbm eglfs_mali eglfs_viv eglfs_viv_wl evdev fontconfig integrityfb integrityhid kms libinput libinput-axis-api linuxfb mirclient mtdev system-freetype system-xcb tslib vnc xkbcommon-evdev xlib - QMAKE_LIBS_HARFBUZZ = -lharfbuzz - QMAKE_LIBS_LIBJPEG = -ljpeg --QMAKE_LIBS_LIBPNG = -llibpng16 -+CONFIG(release, debug|release) { -+ QMAKE_LIBS_LIBPNG = -llibpng16 -+} -+CONFIG(debug, debug|release) { -+ QMAKE_LIBS_LIBPNG = -llibpng16d -+} -diff --git a/mkspecs/qconfig.pri b/mkspecs/qconfig.pri -index 2af37df..646b8e5 100644 ---- a/mkspecs/qconfig.pri -+++ b/mkspecs/qconfig.pri -@@ -2,8 +2,14 @@ QT_ARCH = x86_64 - QT_BUILDABI = x86_64-little_endian-lp64 - QT.global.enabled_features = shared c++11 concurrent - QT.global.disabled_features = cross_compile framework rpath appstore-compliant debug_and_release simulator_and_device build_all c++14 c++1z pkg-config force_asserts separate_debug_info static --QT_CONFIG += shared release c++11 concurrent dbus no-pkg-config stl --CONFIG += shared release no_plugin_manifest -+CONFIG(release, debug|release) { -+ QT_CONFIG += shared release c++11 concurrent dbus no-pkg-config stl -+ CONFIG += shared release no_plugin_manifest -+} -+CONFIG(debug, debug|release) { -+ QT_CONFIG += shared debug c++11 concurrent dbus no-pkg-config release_tools stl -+ CONFIG += shared debug no_plugin_manifest -+} - QT_VERSION = 5.9.2 - QT_MAJOR_VERSION = 5 - QT_MINOR_VERSION = 9 -diff --git a/mkspecs/qmodule.pri b/mkspecs/qmodule.pri -index 3e213d4..00a37ca 100644 ---- a/mkspecs/qmodule.pri -+++ b/mkspecs/qmodule.pri -@@ -1,10 +1,17 @@ - EXTRA_INCLUDEPATH += C:/vcpkg/installed/x64-windows/include --EXTRA_LIBDIR += C:/vcpkg/installed/x64-windows/lib -+CONFIG(release, debug|release) { -+ EXTRA_LIBDIR += C:/vcpkg/installed/x64-windows/lib -+ QT.global_private.enabled_features = alloca_malloc_h alloca sse2 dbus gui network qml-debug sql system-zlib testlib widgets xml -+ QT.global_private.disabled_features = alloca_h android-style-assets private_tests dbus-linked libudev posix_fallocate reduce_exports reduce_relocations release_tools stack-protector-strong -+ QMAKE_LIBS_ZLIB = -lzlib -+} -+CONFIG(debug, debug|release) { -+ QT.global_private.enabled_features = alloca_malloc_h alloca sse2 dbus gui network qml-debug release_tools sql system-zlib testlib widgets xml -+ QT.global_private.disabled_features = alloca_h android-style-assets private_tests dbus-linked libudev posix_fallocate reduce_exports reduce_relocations stack-protector-strong -+ QMAKE_LIBS_ZLIB = -lzlibd -+} - QT_CPU_FEATURES.x86_64 = sse sse2 --QT.global_private.enabled_features = alloca_malloc_h alloca sse2 dbus gui network qml-debug sql system-zlib testlib widgets xml --QT.global_private.disabled_features = alloca_h android-style-assets private_tests dbus-linked libudev posix_fallocate reduce_exports reduce_relocations release_tools stack-protector-strong - QT_COORD_TYPE = double --QMAKE_LIBS_ZLIB = -lzlib - CONFIG += sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 compile_examples f16c largefile msvc_mp precompile_header - QT_BUILD_PARTS += libs tools - QT_HOST_CFLAGS_DBUS += diff --git a/ports/qt5base/install_qt.cmake b/ports/qt5base/install_qt.cmake index 1b0bec935..922303aba 100644 --- a/ports/qt5base/install_qt.cmake +++ b/ports/qt5base/install_qt.cmake @@ -10,7 +10,6 @@ function(install_qt) vcpkg_find_acquire_program(JOM) vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) - set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") set(_path "$ENV{PATH}") diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake index 047f167fb..5368c3a4a 100644 --- a/ports/qt5base/portfile.cmake +++ b/ports/qt5base/portfile.cmake @@ -70,15 +70,8 @@ configure_qt( install_qt() -#vcpkg_apply_patches( -# SOURCE_PATH ${CURRENT_PACKAGES_DIR}/share/qt5 -# PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-debug-qmakespecs.patch" -#) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -#file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) diff --git a/ports/qt5winextras/fixcmake.py b/ports/qt5winextras/fixcmake.py new file mode 100644 index 000000000..d55ca7754 --- /dev/null +++ b/ports/qt5winextras/fixcmake.py @@ -0,0 +1,48 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + for line in openedfile: + if "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5winextras/portfile.cmake b/ports/qt5winextras/portfile.cmake index 678a8a214..800e3490b 100644 --- a/ports/qt5winextras/portfile.cmake +++ b/ports/qt5winextras/portfile.cmake @@ -31,14 +31,49 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) vcpkg_build_qmake_release() -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake ) -vcpkg_build_qmake_debug() \ No newline at end of file +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5winextras RENAME copyright) \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_qmake_debug.cmake b/scripts/cmake/vcpkg_configure_qmake_debug.cmake index 0166973d2..e3dfb0777 100644 --- a/scripts/cmake/vcpkg_configure_qmake_debug.cmake +++ b/scripts/cmake/vcpkg_configure_qmake_debug.cmake @@ -38,4 +38,7 @@ function(vcpkg_configure_qmake_debug) LOGNAME config-${TARGET_TRIPLET}-dbg ) message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + unset(QMAKE_COMMAND) + unset(QMAKE_COMMAND PARENT_SCOPE) + unset(QMAKE_COMMAND CACHE) endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_qmake_release.cmake b/scripts/cmake/vcpkg_configure_qmake_release.cmake index 67bdbdfb0..8ab5340e9 100644 --- a/scripts/cmake/vcpkg_configure_qmake_release.cmake +++ b/scripts/cmake/vcpkg_configure_qmake_release.cmake @@ -38,6 +38,7 @@ function(vcpkg_configure_qmake_release) LOGNAME config-${TARGET_TRIPLET}-rel ) message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + unset(QMAKE_COMMAND) unset(QMAKE_COMMAND PARENT_SCOPE) unset(QMAKE_COMMAND CACHE) endfunction() \ No newline at end of file -- cgit v1.2.3 From c147fc78c919d6084e5f98a574484346d590f00d Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 17 Oct 2017 03:15:30 +1100 Subject: further fixes --- ports/qt5base/qt_debug.conf | 13 +++++++ ports/qt5base/qt_release.conf | 13 +++++++ ports/qt5declarative/fixcmake.py | 48 ++++++++++++++++++++++++++ ports/qt5declarative/portfile.cmake | 49 ++++++++++++++++++++++++--- ports/qt5doc/CONTROL | 4 --- ports/qt5doc/portfile.cmake | 44 ------------------------ ports/qt5docs/CONTROL | 4 +++ ports/qt5docs/portfile.cmake | 40 ++++++++++++++++++++++ ports/qt5tools/fixcmake.py | 48 ++++++++++++++++++++++++++ ports/qt5tools/portfile.cmake | 32 +++++++++++++++++ ports/qt5winextras/portfile.cmake | 6 ++-- scripts/cmake/vcpkg_build_qmake_debug.cmake | 3 +- scripts/cmake/vcpkg_build_qmake_release.cmake | 5 +-- 13 files changed, 251 insertions(+), 58 deletions(-) create mode 100644 ports/qt5base/qt_debug.conf create mode 100644 ports/qt5base/qt_release.conf create mode 100644 ports/qt5declarative/fixcmake.py delete mode 100644 ports/qt5doc/CONTROL delete mode 100644 ports/qt5doc/portfile.cmake create mode 100644 ports/qt5docs/CONTROL create mode 100644 ports/qt5docs/portfile.cmake create mode 100644 ports/qt5tools/fixcmake.py diff --git a/ports/qt5base/qt_debug.conf b/ports/qt5base/qt_debug.conf new file mode 100644 index 000000000..96e4a2a4d --- /dev/null +++ b/ports/qt5base/qt_debug.conf @@ -0,0 +1,13 @@ +[Paths] +Prefix = C:/vcpkg/installed/x64-windows +Documentation = share/qt5/debug/doc +Headers = share/qt5/debug/include +Libraries = debug/lib +Binaries = debug/tools/qt5 +LibraryExecutables = debug/tools/qt5 +Plugins = debug/plugins +Qml2Imports = qml +Data = share/qt5/debug +ArchData = share/qt5/debug +HostData = share/qt5/debug +HostBinaries = debug/tools/qt5 \ No newline at end of file diff --git a/ports/qt5base/qt_release.conf b/ports/qt5base/qt_release.conf new file mode 100644 index 000000000..ddd9d1880 --- /dev/null +++ b/ports/qt5base/qt_release.conf @@ -0,0 +1,13 @@ +[Paths] +Prefix = C:/vcpkg/installed/x64-windows +Documentation = share/qt5/doc +Headers = include +Libraries = lib +Binaries = tools/qt5 +LibraryExecutables = tools/qt5 +Plugins = plugins +Qml2Imports = qml +Data = share/qt5 +ArchData = share/qt5 +HostData = share/qt5 +HostBinaries = tools/qt5 \ No newline at end of file diff --git a/ports/qt5declarative/fixcmake.py b/ports/qt5declarative/fixcmake.py new file mode 100644 index 000000000..d55ca7754 --- /dev/null +++ b/ports/qt5declarative/fixcmake.py @@ -0,0 +1,48 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + for line in openedfile: + if "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5declarative/portfile.cmake b/ports/qt5declarative/portfile.cmake index b6a24946b..48ab900ce 100644 --- a/ports/qt5declarative/portfile.cmake +++ b/ports/qt5declarative/portfile.cmake @@ -33,12 +33,53 @@ set(ENV{_CL_} "/utf-8") vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) - set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -vcpkg_configure_qmake( +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} - OPTIONS "CONFIG+=debug_and_release" ) -vcpkg_build_qmake() +vcpkg_build_qmake_release() + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) +file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5declarative RENAME copyright) \ No newline at end of file diff --git a/ports/qt5doc/CONTROL b/ports/qt5doc/CONTROL deleted file mode 100644 index aef693586..000000000 --- a/ports/qt5doc/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5doc -Version: 5.9.2-0 -Description: Qt5 Document Creation Module -Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5doc/portfile.cmake b/ports/qt5doc/portfile.cmake deleted file mode 100644 index 9cacc8166..000000000 --- a/ports/qt5doc/portfile.cmake +++ /dev/null @@ -1,44 +0,0 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) - message(WARNING "Qt5'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() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtdoc-5.9.2") -set(ARCHIVE_NAME "qtdoc-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 9352856d5ef48afa28771f05cbf5bc7b3a49181b4696bd018a8294cbfc3a6d25de6625830f0ba776689deb098d7eb549dd19b362cbb5ecfda1b2d6d2e15ef43f -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -vcpkg_build_qmake_debug() - -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -vcpkg_build_qmake_release() diff --git a/ports/qt5docs/CONTROL b/ports/qt5docs/CONTROL new file mode 100644 index 000000000..32d85ef37 --- /dev/null +++ b/ports/qt5docs/CONTROL @@ -0,0 +1,4 @@ +Source: qt5docs +Version: 5.9.2-0 +Description: Qt5 Documentation +Build-Depends: qt5base, qt5tools \ No newline at end of file diff --git a/ports/qt5docs/portfile.cmake b/ports/qt5docs/portfile.cmake new file mode 100644 index 000000000..6b177dda1 --- /dev/null +++ b/ports/qt5docs/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtdoc-5.9.2") +set(ARCHIVE_NAME "qtdoc-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 9352856d5ef48afa28771f05cbf5bc7b3a49181b4696bd018a8294cbfc3a6d25de6625830f0ba776689deb098d7eb549dd19b362cbb5ecfda1b2d6d2e15ef43f +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release( + TARGETS docs +) diff --git a/ports/qt5tools/fixcmake.py b/ports/qt5tools/fixcmake.py new file mode 100644 index 000000000..d55ca7754 --- /dev/null +++ b/ports/qt5tools/fixcmake.py @@ -0,0 +1,48 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + for line in openedfile: + if "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake index 2a2e5cd4d..ebcdb6b12 100644 --- a/ports/qt5tools/portfile.cmake +++ b/ports/qt5tools/portfile.cmake @@ -43,6 +43,21 @@ vcpkg_configure_qmake_release( vcpkg_build_qmake_release() +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe") file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) file(REMOVE ${BINARY_TOOLS}) @@ -50,6 +65,23 @@ file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.ex file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) file(REMOVE ${BINARY_TOOLS}) +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright) #touch an empty include file - qt tools does not create any and this is an error in vcpkg diff --git a/ports/qt5winextras/portfile.cmake b/ports/qt5winextras/portfile.cmake index 800e3490b..5d7b85909 100644 --- a/ports/qt5winextras/portfile.cmake +++ b/ports/qt5winextras/portfile.cmake @@ -43,14 +43,14 @@ vcpkg_configure_qmake_release( vcpkg_build_qmake_release() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") set(_path "$ENV{PATH}") +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake diff --git a/scripts/cmake/vcpkg_build_qmake_debug.cmake b/scripts/cmake/vcpkg_build_qmake_debug.cmake index 7e5625850..a734e63cf 100644 --- a/scripts/cmake/vcpkg_build_qmake_debug.cmake +++ b/scripts/cmake/vcpkg_build_qmake_debug.cmake @@ -10,6 +10,7 @@ # [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html function(vcpkg_build_qmake_debug) + cmake_parse_arguments(_csc "" "" "TARGETS" ${ARGN}) vcpkg_find_acquire_program(JOM) # Make sure that the linker finds the libraries used @@ -18,7 +19,7 @@ function(vcpkg_build_qmake_debug) message(STATUS "Package ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${JOM} + COMMAND ${JOM} ${_csc_TARGETS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME package-${TARGET_TRIPLET}-dbg ) diff --git a/scripts/cmake/vcpkg_build_qmake_release.cmake b/scripts/cmake/vcpkg_build_qmake_release.cmake index 6cfbcdc91..3daf9201b 100644 --- a/scripts/cmake/vcpkg_build_qmake_release.cmake +++ b/scripts/cmake/vcpkg_build_qmake_release.cmake @@ -10,15 +10,16 @@ # [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html function(vcpkg_build_qmake_release) + cmake_parse_arguments(_csc "" "" "TARGETS" ${ARGN}) vcpkg_find_acquire_program(JOM) - + # Make sure that the linker finds the libraries used set(ENV_PATH_BACKUP "$ENV{PATH}") set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/tools/qt5;$ENV{PATH}") message(STATUS "Package ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${JOM} + COMMAND ${JOM} ${_csc_TARGETS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME package-${TARGET_TRIPLET}-rel ) -- cgit v1.2.3 From 81613fa0ff506852fbb90757fc27f87ffe591fee Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 16 Oct 2017 11:22:21 -0700 Subject: [vcpkg-toolchain] Improvements; add VCPKG_CHAINLOAD_TOOLCHAIN_FILE --- ports/butteraugli/CMakeLists.txt | 24 +-- ports/libjpeg-turbo/portfile.cmake | 15 +- scripts/buildsystems/vcpkg.cmake | 267 ++++++++++++++++-------------- scripts/cmake/vcpkg_configure_cmake.cmake | 106 +++++++----- 4 files changed, 219 insertions(+), 193 deletions(-) diff --git a/ports/butteraugli/CMakeLists.txt b/ports/butteraugli/CMakeLists.txt index 3bd8a6c37..0b5373c5a 100644 --- a/ports/butteraugli/CMakeLists.txt +++ b/ports/butteraugli/CMakeLists.txt @@ -1,29 +1,19 @@ cmake_minimum_required(VERSION 3.8.0) -project(butteraugli) +project(butteraugli CXX) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +add_compile_options(-D_CRT_SECURE_NO_WARNINGS -DNOMINMAX) if(MSVC) - add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018) endif() - - find_package(JPEG REQUIRED) find_package(PNG REQUIRED) -include_directories("." ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS}) - -if(BUILD_SHARED_LIBS) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -endif() - +include_directories(".") add_library(butteraugli_lib butteraugli/butteraugli.cc) -add_executable(butteraugli butteraugli/butteraugli_main.cc) - -target_link_libraries(butteraugli butteraugli_lib ${JPEG_LIBRARIES} ${PNG_LIBRARIES}) - - install( TARGETS butteraugli_lib RUNTIME DESTINATION bin @@ -32,6 +22,10 @@ install( ) if(NOT DISABLE_INSTALL_TOOLS) + add_executable(butteraugli butteraugli/butteraugli_main.cc) + target_include_directories(butteraugli PRIVATE ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS}) + target_link_libraries(butteraugli PRIVATE butteraugli_lib ${JPEG_LIBRARIES} ${PNG_LIBRARIES}) + install ( TARGETS butteraugli RUNTIME DESTINATION tools/butteraugli diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index d1138dbbf..a5d09fda2 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -16,12 +16,12 @@ vcpkg_find_acquire_program(NASM) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(BUILD_STATIC OFF) - set(NOT_BUILD_STATIC ON) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(ENABLE_STATIC OFF) + set(ENABLE_SHARED ON) else() - set(BUILD_STATIC ON) - set(NOT_BUILD_STATIC OFF) + set(ENABLE_STATIC ON) + set(ENABLE_SHARED OFF) endif() if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") @@ -32,9 +32,8 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DENABLE_STATIC=${BUILD_STATIC} - -DENABLE_SHARED=${NOT_BUILD_STATIC} - -DWITH_CRT_DLL=ON + -DENABLE_STATIC=${ENABLE_STATIC} + -DENABLE_SHARED=${ENABLE_SHARED} -DENABLE_EXECUTABLES=OFF -DINSTALL_DOCS=OFF ${LIBJPEGTURBO_SIMD} diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index d8c7ee6b8..19fc99af7 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -1,156 +1,175 @@ # Mark variables as used so cmake doesn't complain about them -set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE}) -if(NOT VCPKG_TOOLCHAIN) - if(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") +mark_as_advanced(CMAKE_TOOLCHAIN_FILE) + +if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") +endif() + +if(VCPKG_TOOLCHAIN) + return() +endif() + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if( _CMAKE_IN_TRY_COMPILE ) + include( "${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL ) +endif() + +if(VCPKG_TARGET_TRIPLET) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") + set(_VCPKG_TARGET_TRIPLET_ARCH x86) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$") + set(_VCPKG_TARGET_TRIPLET_ARCH x64) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm) +else() + if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$") + set(_VCPKG_TARGET_TRIPLET_ARCH x64) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) - elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$") + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$") set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$") + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM") set(_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017") + set(_VCPKG_TARGET_TRIPLET_ARCH x86) else() - if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$") + find_program(_VCPKG_CL cl) + if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$") + elseif(_VCPKG_CL MATCHES "arm/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH arm) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015$") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM") - set(_VCPKG_TARGET_TRIPLET_ARCH arm) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017") + elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) else() - find_program(_VCPKG_CL cl) - if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(_VCPKG_CL MATCHES "arm/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH arm) - elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) - else() - message(FATAL_ERROR "Unable to determine target architecture.") - endif() + message(FATAL_ERROR "Unable to determine target architecture.") endif() endif() +endif() - if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") - set(_VCPKG_TARGET_TRIPLET_PLAT uwp) - else() - set(_VCPKG_TARGET_TRIPLET_PLAT windows) - endif() +if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") + set(_VCPKG_TARGET_TRIPLET_PLAT uwp) +else() + set(_VCPKG_TARGET_TRIPLET_PLAT windows) +endif() - set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)") - set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR}) +set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)") +set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR}) - #Detect .vcpkg-root to figure VCPKG_ROOT_DIR - SET(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR}) - while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root") - get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY) - if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive - message(FATAL_ERROR "Could not find .vcpkg-root") - else() - SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP}) - endif() - endwhile() - set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE}) - set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed) - - if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) - list(APPEND CMAKE_PREFIX_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug - ) - list(APPEND CMAKE_LIBRARY_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link - ) +# Detect .vcpkg-root to figure VCPKG_ROOT_DIR +set(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR}) +while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root") + get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY) + if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive + message(FATAL_ERROR "Could not find .vcpkg-root") + else() + SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP}) endif() +endwhile() +set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE}) +set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed) + +if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) list(APPEND CMAKE_PREFIX_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ) list(APPEND CMAKE_LIBRARY_PATH - ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link ) +endif() +list(APPEND CMAKE_PREFIX_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} +) +list(APPEND CMAKE_LIBRARY_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link +) - set(Boost_COMPILER "-vc140") +set(Boost_COMPILER "-vc140") - if (NOT DEFINED CMAKE_SYSTEM_VERSION) - include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake) - # This is used as an implicit parameter for vcpkg_get_windows_sdk - set(VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR}) - vcpkg_get_windows_sdk(WINDOWS_SDK_VERSION) - unset(VCPKG_ROOT_DIR) - set(CMAKE_SYSTEM_VERSION ${WINDOWS_SDK_VERSION}) - endif() +if (NOT DEFINED CMAKE_SYSTEM_VERSION) + include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake) + # This is used as an implicit parameter for vcpkg_get_windows_sdk + set(VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR}) + vcpkg_get_windows_sdk(WINDOWS_SDK_VERSION) + unset(VCPKG_ROOT_DIR) + set(CMAKE_SYSTEM_VERSION ${WINDOWS_SDK_VERSION} CACHE STRING "Windows SDK version") +endif() - file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) - set(CMAKE_SYSTEM_IGNORE_PATH - "${_programfiles}/OpenSSL" - "${_programfiles}/OpenSSL-Win32" - "${_programfiles}/OpenSSL-Win64" - "${_programfiles}/OpenSSL-Win32/lib/VC" - "${_programfiles}/OpenSSL-Win64/lib/VC" - "${_programfiles}/OpenSSL-Win32/lib/VC/static" - "${_programfiles}/OpenSSL-Win64/lib/VC/static" - "C:/OpenSSL/" - "C:/OpenSSL-Win32/" - "C:/OpenSSL-Win64/" - "C:/OpenSSL-Win32/lib/VC" - "C:/OpenSSL-Win64/lib/VC" - "C:/OpenSSL-Win32/lib/VC/static" - "C:/OpenSSL-Win64/lib/VC/static" - ) +file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) +set(CMAKE_SYSTEM_IGNORE_PATH + "${_programfiles}/OpenSSL" + "${_programfiles}/OpenSSL-Win32" + "${_programfiles}/OpenSSL-Win64" + "${_programfiles}/OpenSSL-Win32/lib/VC" + "${_programfiles}/OpenSSL-Win64/lib/VC" + "${_programfiles}/OpenSSL-Win32/lib/VC/static" + "${_programfiles}/OpenSSL-Win64/lib/VC/static" + "C:/OpenSSL/" + "C:/OpenSSL-Win32/" + "C:/OpenSSL-Win64/" + "C:/OpenSSL-Win32/lib/VC" + "C:/OpenSSL-Win64/lib/VC" + "C:/OpenSSL-Win32/lib/VC/static" + "C:/OpenSSL-Win64/lib/VC/static" +) - set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools) - file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*) - foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS}) - if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR}) - set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_TOOLS_DIR}) - endif() - endforeach() - - option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON) - function(add_executable name) - _add_executable(${ARGV}) - list(FIND ARGV "IMPORTED" IMPORTED_IDX) - list(FIND ARGV "ALIAS" ALIAS_IDX) - if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) - if(VCPKG_APPLOCAL_DEPS) - add_custom_command(TARGET ${name} POST_BUILD - COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 - -targetBinary $ - -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/bin" - -OutVariable out - ) - endif() - set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) - set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) - endif() - endfunction() - - function(add_library name) - _add_library(${ARGV}) - list(FIND ARGV "IMPORTED" IMPORTED_IDX) - list(FIND ARGV "INTERFACE" INTERFACE_IDX) - list(FIND ARGV "ALIAS" ALIAS_IDX) - if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) - set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) - set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) - endif() - endfunction() +set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools) +file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*) +foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS}) + if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR}) + set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_TOOLS_DIR}) + endif() +endforeach() - macro(find_package name) - if(name STREQUAL "Boost") - unset(Boost_USE_STATIC_LIBS) +option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON) +function(add_executable name) + _add_executable(${ARGV}) + list(FIND ARGV "IMPORTED" IMPORTED_IDX) + list(FIND ARGV "ALIAS" ALIAS_IDX) + if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) + if(VCPKG_APPLOCAL_DEPS) + add_custom_command(TARGET ${name} POST_BUILD + COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 + -targetBinary $ + -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/bin" + -OutVariable out + ) endif() - _find_package(${ARGV}) - endmacro() + set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) + set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) + endif() +endfunction() - set(VCPKG_TOOLCHAIN ON) -endif() +function(add_library name) + _add_library(${ARGV}) + list(FIND ARGV "IMPORTED" IMPORTED_IDX) + list(FIND ARGV "INTERFACE" INTERFACE_IDX) + list(FIND ARGV "ALIAS" ALIAS_IDX) + if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) + set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) + set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) + endif() +endfunction() + +macro(find_package name) + if(name STREQUAL "Boost") + unset(Boost_USE_STATIC_LIBS) + endif() + _find_package(${ARGV}) +endmacro() -set(_UNUSED ${CMAKE_TOOLCHAIN_FILE}) +set(VCPKG_TOOLCHAIN ON) set(_UNUSED ${CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION}) set(_UNUSED ${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}) set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY}) set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY}) set(_UNUSED ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP}) + +if(NOT _CMAKE_IN_TRY_COMPILE) + file(TO_CMAKE_PATH "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" _chainload_file) + file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vcpkg.config.cmake" + "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")\n" + "set(VCPKG_APPLOCAL_DEPS \"${VCPKG_APPLOCAL_DEPS}\" CACHE STRING \"\")\n" + "set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE \"${_chainload_file}\" CACHE STRING \"\")\n") +endif() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index bfb6a19fd..b979245aa 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -61,37 +61,39 @@ function(vcpkg_configure_cmake) set(GENERATOR ${_csc_GENERATOR}) elseif(_csc_PREFER_NINJA AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT _csc_HOST_ARCHITECTURE STREQUAL "x86") set(GENERATOR "Ninja") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 ARM") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 ARM") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 ARM") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") set(ARCH "ARM64") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(TRIPLET_SYSTEM_ARCH STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017 ARM") - elseif(TRIPLET_SYSTEM_ARCH STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") set(ARCH "ARM64") + else() + 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 @@ -104,15 +106,18 @@ function(vcpkg_configure_cmake) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) if(DEFINED VCPKG_CMAKE_SYSTEM_NAME) - list(APPEND _csc_OPTIONS -DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}) + list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") endif() if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION) - list(APPEND _csc_OPTIONS -DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}) + list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") endif() - if(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=ON) - elseif(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL static) + 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 @@ -131,10 +136,45 @@ function(vcpkg_configure_cmake) message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS and VCPKG_C_FLAGS") endif() + if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + else() + set(VCPKG_CXX_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}") + set(VCPKG_C_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}") + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + list(APPEND _csc_OPTIONS_DEBUG + "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" + "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" + ) + list(APPEND _csc_OPTIONS_RELEASE + "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" + "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" + ) + elseif(VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND _csc_OPTIONS_DEBUG + "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" + "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" + ) + list(APPEND _csc_OPTIONS_RELEASE + "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" + "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" + ) + else() + message(FATAL_ERROR "Invalid setting for VCPKG_CRT_LINKAGE: \"${VCPKG_CRT_LINKAGE}\". It must be \"static\" or \"dynamic\"") + endif() + + list(APPEND _csc_OPTIONS_RELEASE + "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" + "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" + ) + list(APPEND _csc_OPTIONS + "-DCMAKE_CXX_FLAGS=${VCPKG_CXX_FLAGS}" + "-DCMAKE_C_FLAGS=${VCPKG_C_FLAGS}" + ) + endif() + list(APPEND _csc_OPTIONS "-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}" - "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}" - "-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" @@ -151,32 +191,6 @@ function(vcpkg_configure_cmake) ) endif() - if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) - list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" - ) - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" - "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" - ) - - elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) - list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" - ) - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" - "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" - ) - endif() - - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" - "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) vcpkg_execute_required_process( -- cgit v1.2.3 From 7214c3583bdf569bc873305908ec109a6c8716cc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 16 Oct 2017 11:44:04 -0700 Subject: [vcpkg] Push use of UTF-16 to only around Win32 call boundaries. --- toolsrc/include/pch.h | 18 ++- toolsrc/include/vcpkg/base/cstringview.h | 1 + toolsrc/include/vcpkg/base/expected.h | 2 +- toolsrc/include/vcpkg/base/files.h | 14 ++- toolsrc/include/vcpkg/base/graphs.h | 6 +- toolsrc/include/vcpkg/base/strings.h | 19 +-- toolsrc/include/vcpkg/base/system.h | 15 +-- toolsrc/include/vcpkg/base/util.h | 3 +- toolsrc/include/vcpkg/build.h | 2 +- toolsrc/include/vcpkg/dependencies.h | 5 +- toolsrc/include/vcpkg/packagespec.h | 33 +++--- toolsrc/include/vcpkg/packagespecparseresult.h | 2 +- toolsrc/include/vcpkg/paragraphparseresult.h | 11 +- toolsrc/include/vcpkg/sourceparagraph.h | 2 +- toolsrc/include/vcpkg/triplet.h | 11 +- toolsrc/include/vcpkg/vcpkgcmdarguments.h | 4 + toolsrc/include/vcpkg/vcpkglib.h | 15 ++- toolsrc/include/vcpkg/vcpkgpaths.h | 8 +- toolsrc/src/vcpkg.cpp | 46 ++++++-- toolsrc/src/vcpkg/base/checks.cpp | 12 +- toolsrc/src/vcpkg/base/cofffilereader.cpp | 7 +- toolsrc/src/vcpkg/base/files.cpp | 13 +- toolsrc/src/vcpkg/base/strings.cpp | 21 +++- toolsrc/src/vcpkg/base/system.cpp | 157 ++++++++++++++++++------- toolsrc/src/vcpkg/binaryparagraph.cpp | 4 +- toolsrc/src/vcpkg/build.cpp | 72 ++++++------ toolsrc/src/vcpkg/commands.create.cpp | 6 +- toolsrc/src/vcpkg/commands.edit.cpp | 15 ++- toolsrc/src/vcpkg/commands.env.cpp | 2 +- toolsrc/src/vcpkg/commands.exportifw.cpp | 32 ++--- toolsrc/src/vcpkg/commands.hash.cpp | 23 ++-- toolsrc/src/vcpkg/commands.integrate.cpp | 33 ++++-- toolsrc/src/vcpkg/commands.portsdiff.cpp | 46 ++++---- toolsrc/src/vcpkg/commands.version.cpp | 15 ++- toolsrc/src/vcpkg/dependencies.cpp | 15 ++- toolsrc/src/vcpkg/export.cpp | 43 ++++--- toolsrc/src/vcpkg/globalstate.cpp | 8 +- toolsrc/src/vcpkg/install.cpp | 5 +- toolsrc/src/vcpkg/metrics.cpp | 44 ++++--- toolsrc/src/vcpkg/packagespec.cpp | 4 +- toolsrc/src/vcpkg/parse.cpp | 2 +- toolsrc/src/vcpkg/postbuildlint.cpp | 39 ++---- toolsrc/src/vcpkg/remove.cpp | 2 +- toolsrc/src/vcpkg/sourceparagraph.cpp | 6 +- toolsrc/src/vcpkg/triplet.cpp | 11 +- toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 14 ++- toolsrc/src/vcpkg/vcpkglib.cpp | 26 ++-- toolsrc/src/vcpkg/vcpkgpaths.cpp | 102 ++++++++-------- 48 files changed, 592 insertions(+), 404 deletions(-) diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index 8333eb927..5c31fbbd1 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -1,5 +1,6 @@ #pragma once +#if defined(_WIN32) #define NOMINMAX #define WIN32_LEAN_AND_MEAN @@ -9,6 +10,13 @@ #pragma warning(suppress : 4768) #include +#include +#include +#include +#else +#include +#endif + #include #include #include @@ -19,7 +27,12 @@ #include #include #include +#if defined(_WIN32) #include +#else +#include +#endif +#include #include #include #include @@ -28,18 +41,17 @@ #include #include #include -#include #include #include -#include #include #include #include +#include #include +#include #include #include #include #include #include #include -#include diff --git a/toolsrc/include/vcpkg/base/cstringview.h b/toolsrc/include/vcpkg/base/cstringview.h index 341830f05..eac204f97 100644 --- a/toolsrc/include/vcpkg/base/cstringview.h +++ b/toolsrc/include/vcpkg/base/cstringview.h @@ -1,5 +1,6 @@ #pragma once +#include #include namespace vcpkg diff --git a/toolsrc/include/vcpkg/base/expected.h b/toolsrc/include/vcpkg/base/expected.h index a946c442e..b3b81ae81 100644 --- a/toolsrc/include/vcpkg/base/expected.h +++ b/toolsrc/include/vcpkg/base/expected.h @@ -33,7 +33,7 @@ namespace vcpkg ErrorHolder() = default; ErrorHolder(const std::error_code& err) : m_err(err) {} - constexpr bool has_error() const { return bool(m_err); } + bool has_error() const { return bool(m_err); } const std::error_code& error() const { return m_err; } std::error_code& error() { return m_err; } diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index f4bcf742c..63cf3c6fd 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -2,7 +2,11 @@ #include +#if defined(_WIN32) #include +#else +#include +#endif namespace fs { @@ -19,7 +23,7 @@ namespace fs namespace vcpkg::Files { - __interface Filesystem + struct Filesystem { virtual Expected read_contents(const fs::path& file_path) const = 0; virtual Expected> read_lines(const fs::path& file_path) const = 0; @@ -40,8 +44,10 @@ namespace vcpkg::Files virtual bool create_directory(const fs::path& path, std::error_code& ec) = 0; virtual bool create_directories(const fs::path& path, std::error_code& ec) = 0; virtual void copy(const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts) = 0; - virtual bool copy_file( - const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts, std::error_code& ec) = 0; + virtual bool copy_file(const fs::path& oldpath, + const fs::path& newpath, + fs::copy_options opts, + std::error_code& ec) = 0; virtual fs::file_status status(const fs::path& path, std::error_code& ec) const = 0; }; @@ -53,5 +59,5 @@ namespace vcpkg::Files void print_paths(const std::vector& paths); - std::vector find_from_PATH(const std::wstring& name); + std::vector find_from_PATH(const std::string& name); } diff --git a/toolsrc/include/vcpkg/base/graphs.h b/toolsrc/include/vcpkg/base/graphs.h index ff56cb298..b585d2bb9 100644 --- a/toolsrc/include/vcpkg/base/graphs.h +++ b/toolsrc/include/vcpkg/base/graphs.h @@ -20,11 +20,11 @@ namespace vcpkg::Graphs }; template - __interface AdjacencyProvider + struct AdjacencyProvider { - std::vector adjacency_list(const U& vertex) const; + virtual std::vector adjacency_list(const U& vertex) const = 0; - U load_vertex_data(const V& vertex) const; + virtual U load_vertex_data(const V& vertex) const = 0; }; template diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 59823deb8..93b36a29d 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -16,15 +16,11 @@ namespace vcpkg::Strings::details inline const char* to_printf_arg(const char* s) { return s; } - inline int to_printf_arg(const int s) { return s; } - - inline long long to_printf_arg(const long long s) { return s; } - - inline unsigned long to_printf_arg(const unsigned long s) { return s; } - - inline size_t to_printf_arg(const size_t s) { return s; } - - inline double to_printf_arg(const double s) { return s; } + template::value>> + inline T to_printf_arg(T s) + { + return s; + } std::string format_internal(const char* fmtstr, ...); @@ -37,9 +33,6 @@ namespace vcpkg::Strings::details namespace vcpkg::Strings { - static constexpr const char* EMPTY = ""; - static constexpr const wchar_t* WEMPTY = L""; - template std::string format(const char* fmtstr, const Args&... args) { @@ -62,7 +55,7 @@ namespace vcpkg::Strings bool case_insensitive_ascii_contains(const std::string& s, const std::string& pattern); - bool case_insensitive_ascii_compare(const CStringView left, const CStringView right); + bool case_insensitive_ascii_equals(const CStringView left, const CStringView right); std::string ascii_to_lowercase(const std::string& input); diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index a2e8f3f45..f2344c919 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -4,7 +4,6 @@ #include #include -#include namespace vcpkg::System { @@ -18,13 +17,13 @@ namespace vcpkg::System std::string output; }; - int cmd_execute_clean(const CWStringView cmd_line); + int cmd_execute_clean(const CStringView cmd_line); - int cmd_execute(const CWStringView cmd_line); + int cmd_execute(const CStringView cmd_line); - ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line); + ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line); - std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args = Strings::WEMPTY); + std::string create_powershell_script_cmd(const fs::path& script_path, const CStringView args = ""); enum class Color { @@ -63,9 +62,11 @@ namespace vcpkg::System return System::println(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); } - Optional get_environment_variable(const CWStringView varname) noexcept; + Optional get_environment_variable(const CStringView varname) noexcept; - Optional get_registry_string(HKEY base, const CWStringView subkey, const CWStringView valuename); + Optional get_registry_string(void* base_hkey, + const CWStringView subkey, + const CWStringView valuename); enum class CPUArchitecture { diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 4f06a8231..d5db6b6ee 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -98,7 +99,7 @@ namespace vcpkg::Util } template - void group_by(const Container& cont, _Inout_ std::map>* output, Func&& f) + void group_by(const Container& cont, std::map>* output, Func&& f) { for (const V& element : cont) { diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index f146e9951..774e25922 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -96,7 +96,7 @@ namespace vcpkg::Build Optional visual_studio_path; }; - std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); + std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); struct ExtendedBuildResult { diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 2301dbc36..585338ae2 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -115,7 +115,10 @@ namespace vcpkg::Dependencies RequestType request_type; }; - __interface PortFileProvider { virtual const SourceControlFile& get_control_file(const std::string& spec) const; }; + struct PortFileProvider + { + virtual const SourceControlFile& get_control_file(const std::string& spec) const = 0; + }; struct MapPortFile : Util::ResourceBase, PortFileProvider { diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index ee34f14a3..60c99782e 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -76,20 +76,23 @@ namespace vcpkg bool operator!=(const PackageSpec& left, const PackageSpec& right); } -template<> -struct std::hash +namespace std { - size_t operator()(const vcpkg::PackageSpec& value) const + template<> + struct hash { - size_t hash = 17; - hash = hash * 31 + std::hash()(value.name()); - hash = hash * 31 + std::hash()(value.triplet()); - return hash; - } -}; - -template<> -struct std::equal_to -{ - bool operator()(const vcpkg::PackageSpec& left, const vcpkg::PackageSpec& right) const { return left == right; } -}; + size_t operator()(const vcpkg::PackageSpec& value) const + { + size_t hash = 17; + hash = hash * 31 + std::hash()(value.name()); + hash = hash * 31 + std::hash()(value.triplet()); + return hash; + } + }; + + template<> + struct equal_to + { + bool operator()(const vcpkg::PackageSpec& left, const vcpkg::PackageSpec& right) const { return left == right; } + }; +} diff --git a/toolsrc/include/vcpkg/packagespecparseresult.h b/toolsrc/include/vcpkg/packagespecparseresult.h index 8a56574fd..dd91c9a67 100644 --- a/toolsrc/include/vcpkg/packagespecparseresult.h +++ b/toolsrc/include/vcpkg/packagespecparseresult.h @@ -20,7 +20,7 @@ namespace vcpkg ErrorHolder() : m_err(PackageSpecParseResult::SUCCESS) {} ErrorHolder(PackageSpecParseResult err) : m_err(err) {} - constexpr bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; } + bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; } const PackageSpecParseResult& error() const { return m_err; } PackageSpecParseResult& error() { return m_err; } diff --git a/toolsrc/include/vcpkg/paragraphparseresult.h b/toolsrc/include/vcpkg/paragraphparseresult.h index abdd9eecd..558715bbc 100644 --- a/toolsrc/include/vcpkg/paragraphparseresult.h +++ b/toolsrc/include/vcpkg/paragraphparseresult.h @@ -26,8 +26,11 @@ namespace vcpkg ParagraphParseResult to_paragraph_parse_result(std::error_code ec); } -// Enable implicit conversion to std::error_code -template<> -struct std::is_error_code_enum : ::std::true_type +namespace std { -}; + // Enable implicit conversion to std::error_code + template<> + struct is_error_code_enum : ::std::true_type + { + }; +} \ No newline at end of file diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h index 0a02e4cda..dcbbc1c3b 100644 --- a/toolsrc/include/vcpkg/sourceparagraph.h +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -3,8 +3,8 @@ #include #include -#include #include +#include #include #include diff --git a/toolsrc/include/vcpkg/triplet.h b/toolsrc/include/vcpkg/triplet.h index 46a52f8e6..50d731593 100644 --- a/toolsrc/include/vcpkg/triplet.h +++ b/toolsrc/include/vcpkg/triplet.h @@ -36,8 +36,11 @@ namespace vcpkg bool operator!=(const Triplet& left, const Triplet& right); } -template<> -struct std::hash +namespace std { - size_t operator()(const vcpkg::Triplet& t) const { return t.hash_code(); } -}; + template<> + struct hash + { + size_t operator()(const vcpkg::Triplet& t) const { return t.hash_code(); } + }; +} \ No newline at end of file diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index 8b1d766b6..d9895f4b8 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -19,7 +19,11 @@ namespace vcpkg struct VcpkgCmdArguments { +#if defined(_WIN32) static VcpkgCmdArguments create_from_command_line(const int argc, const wchar_t* const* const argv); +#else + static VcpkgCmdArguments create_from_command_line(const int argc, const char* const* const argv); +#endif static VcpkgCmdArguments create_from_arg_sequence(const std::string* arg_begin, const std::string* arg_end); std::unique_ptr vcpkg_root_dir; diff --git a/toolsrc/include/vcpkg/vcpkglib.h b/toolsrc/include/vcpkg/vcpkglib.h index b2aad8d7b..9a7fdb861 100644 --- a/toolsrc/include/vcpkg/vcpkglib.h +++ b/toolsrc/include/vcpkg/vcpkglib.h @@ -22,17 +22,16 @@ namespace vcpkg struct CMakeVariable { - CMakeVariable(const CWStringView varname, const wchar_t* varvalue); - CMakeVariable(const CWStringView varname, const std::string& varvalue); - CMakeVariable(const CWStringView varname, const std::wstring& varvalue); - CMakeVariable(const CWStringView varname, const fs::path& path); + CMakeVariable(const CStringView varname, const char* varvalue); + CMakeVariable(const CStringView varname, const std::string& varvalue); + CMakeVariable(const CStringView varname, const fs::path& path); - std::wstring s; + std::string s; }; - std::wstring make_cmake_cmd(const fs::path& cmake_exe, - const fs::path& cmake_script, - const std::vector& pass_variables); + std::string make_cmake_cmd(const fs::path& cmake_exe, + const fs::path& cmake_script, + const std::vector& pass_variables); std::string shorten_text(const std::string& desc, size_t length); } // namespace vcpkg diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 32dd2e833..781dabd1a 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -3,15 +3,15 @@ #include #include -#include #include #include +#include namespace vcpkg { struct ToolsetArchOption { - CWStringView name; + CStringView name; System::CPUArchitecture host_arch; System::CPUArchitecture target_arch; }; @@ -21,8 +21,8 @@ namespace vcpkg fs::path visual_studio_root_path; fs::path dumpbin; fs::path vcvarsall; - std::vector vcvarsall_options; - CWStringView version; + std::vector vcvarsall_options; + CStringView version; std::vector supported_architectures; }; diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index f1a86ae22..e1e2240e7 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -1,6 +1,15 @@ +#if defined(_WIN32) #define WIN32_LEAN_AND_MEAN #include +#pragma warning(push) +#pragma warning(disable : 4768) +#include +#pragma warning(pop) +#else +#include +#endif + #include #include #include @@ -13,10 +22,6 @@ #include #include -#pragma warning(push) -#pragma warning(disable : 4768) -#include -#pragma warning(pop) #include #include #include @@ -44,7 +49,7 @@ static void inner(const VcpkgCmdArguments& args) static const auto find_command = [&](auto&& commands) { auto it = Util::find_if(commands, [&](auto&& commandc) { - return Strings::case_insensitive_ascii_compare(commandc.name, args.command); + return Strings::case_insensitive_ascii_equals(commandc.name, args.command); }); using std::end; if (it != end(commands)) @@ -67,7 +72,7 @@ static void inner(const VcpkgCmdArguments& args) } else { - const Optional vcpkg_root_dir_env = System::get_environment_variable(L"VCPKG_ROOT"); + const auto vcpkg_root_dir_env = System::get_environment_variable("VCPKG_ROOT"); if (const auto v = vcpkg_root_dir_env.get()) { vcpkg_root_dir = fs::stdfs::absolute(*v); @@ -95,7 +100,11 @@ static void inner(const VcpkgCmdArguments& args) expected_paths.error().message()); const VcpkgPaths paths = expected_paths.value_or_exit(VCPKG_LINE_INFO); +#if defined(_WIN32) const int exit_code = _wchdir(paths.root.c_str()); +#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"); Commands::Version::warn_if_vcpkg_version_mismatch(paths); @@ -111,11 +120,10 @@ static void inner(const VcpkgCmdArguments& args) } else { - const Optional vcpkg_default_triplet_env = - System::get_environment_variable(L"VCPKG_DEFAULT_TRIPLET"); + const auto vcpkg_default_triplet_env = System::get_environment_variable("VCPKG_DEFAULT_TRIPLET"); if (const auto v = vcpkg_default_triplet_env.get()) { - default_triplet = Triplet::from_canonical_name(Strings::to_utf8(*v)); + default_triplet = Triplet::from_canonical_name(*v); } else { @@ -135,6 +143,7 @@ static void inner(const VcpkgCmdArguments& args) static void load_config() { +#if defined(_WIN32) fs::path localappdata; { // Config path in AppDataLocal @@ -194,6 +203,7 @@ static void load_config() catch (...) { } +#endif } static std::string trim_path_from_command_line(const std::string& full_command_line) @@ -217,24 +227,32 @@ static std::string trim_path_from_command_line(const std::string& full_command_l return std::string(it, full_command_line.cend()); } +#if defined(_WIN32) int wmain(const int argc, const wchar_t* const* const argv) +#else +int main(const int argc, const char* const* const argv) +#endif { if (argc == 0) std::abort(); + *GlobalState::timer.lock() = Chrono::ElapsedTime::create_started(); + +#if defined(_WIN32) GlobalState::g_init_console_cp = GetConsoleCP(); GlobalState::g_init_console_output_cp = GetConsoleOutputCP(); SetConsoleCP(65001); SetConsoleOutputCP(65001); - *GlobalState::timer.lock() = Chrono::ElapsedTime::create_started(); - const std::string trimmed_command_line = trim_path_from_command_line(Strings::to_utf8(GetCommandLineW())); +#endif { auto locked_metrics = Metrics::g_metrics.lock(); locked_metrics->track_property("version", Commands::Version::version()); +#if defined(_WIN32) locked_metrics->track_property("cmdline", trimmed_command_line); +#endif } load_config(); Metrics::g_metrics.lock()->track_property("sqmuser", Metrics::get_SQM_user()); @@ -283,6 +301,12 @@ int wmain(const int argc, const wchar_t* const* const argv) exc_msg); fflush(stdout); for (int x = 0; x < argc; ++x) + { +#if defined(_WIN32) System::println("%s|", Strings::to_utf8(argv[x])); +#else + System::println("%s|", argv[x]); +#endif + } fflush(stdout); } diff --git a/toolsrc/src/vcpkg/base/checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp index 73c7b9b1a..ed28d6e2b 100644 --- a/toolsrc/src/vcpkg/base/checks.cpp +++ b/toolsrc/src/vcpkg/base/checks.cpp @@ -17,14 +17,21 @@ namespace vcpkg::Checks GlobalState::debugging = false; metrics->flush(); +#if defined(_WIN32) SetConsoleCP(GlobalState::g_init_console_cp); SetConsoleOutputCP(GlobalState::g_init_console_output_cp); +#endif fflush(nullptr); +#if defined(_WIN32) ::TerminateProcess(::GetCurrentProcess(), exit_code); +#else + ::exit(exit_code); +#endif } +#if defined(_WIN32) static BOOL ctrl_handler(DWORD fdw_ctrl_type) { { @@ -39,6 +46,9 @@ namespace vcpkg::Checks { SetConsoleCtrlHandler(reinterpret_cast(ctrl_handler), TRUE); } +#else + void register_console_ctrl_handler() {} +#endif [[noreturn]] void unreachable(const LineInfo& line_info) { @@ -67,7 +77,7 @@ namespace vcpkg::Checks { if (!expression) { - exit_with_message(line_info, Strings::EMPTY); + exit_with_message(line_info, ""); } } diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp index 5e9c86998..1927e0b5e 100644 --- a/toolsrc/src/vcpkg/base/cofffilereader.cpp +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -7,6 +7,7 @@ using namespace std; namespace vcpkg::CoffFileReader { +#if defined(_WIN32) template static T reinterpret_bytes(const char* data) { @@ -24,7 +25,7 @@ namespace vcpkg::CoffFileReader template static T peek_value_from_stream(fstream& fs) { - const fpos_t original_pos = fs.tellg().seekpos(); + const std::streampos original_pos = fs.tellg(); T data; fs.read(reinterpret_cast(&data), sizeof data); fs.seekg(original_pos); @@ -305,4 +306,8 @@ namespace vcpkg::CoffFileReader return {std::vector(machine_types.cbegin(), machine_types.cend())}; } +#else + DllInfo read_dll(const fs::path& path) { exit(-1); } + LibInfo read_lib(const fs::path& path) { exit(-1); } +#endif } diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index f8b239eaa..6e43debb1 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -163,7 +163,12 @@ namespace vcpkg::Files virtual void write_contents(const fs::path& file_path, const std::string& data) override { FILE* f = nullptr; +#if defined(_WIN32) auto ec = _wfopen_s(&f, file_path.native().c_str(), L"wb"); +#else + f = fopen(file_path.native().c_str(), "wb"); + int ec = f != nullptr ? 0 : 1; +#endif Checks::check_exit( VCPKG_LINE_INFO, ec == 0, "Error: Could not open file for writing: %s", file_path.u8string().c_str()); auto count = fwrite(data.data(), sizeof(data[0]), data.size(), f); @@ -194,9 +199,13 @@ namespace vcpkg::Files System::println(); } - std::vector find_from_PATH(const std::wstring& name) + std::vector find_from_PATH(const std::string& name) { - const std::wstring cmd = Strings::wformat(L"where.exe %s", name); +#if defined(_WIN32) + const std::string cmd = Strings::format("where.exe %s", name); +#else + const std::string cmd = Strings::format("which %s", name); +#endif auto out = System::cmd_execute_and_capture_output(cmd); if (out.exit_code != 0) { diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 2a6d3dff2..fa04279b9 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -37,7 +37,8 @@ namespace vcpkg::Strings::details #if defined(_WIN32) _vsnprintf_s_l(&output.at(0), output.size() + 1, output.size(), fmtstr, c_locale(), args); #else - vsnprintf(&output.at(0), output.size() + 1, fmtstr, args); + va_start(args, fmtstr); + auto res = vsnprintf(&output.at(0), output.size() + 1, fmtstr, args); #endif va_end(args); @@ -73,20 +74,28 @@ namespace vcpkg::Strings { std::wstring to_utf16(const CStringView s) { +#if defined(_WIN32) const int size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); std::wstring output; output.resize(size - 1); MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, output.data(), size - 1); return output; +#else + Checks::unreachable(VCPKG_LINE_INFO); +#endif } std::string to_utf8(const CWStringView w) { +#if defined(_WIN32) const int size = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, nullptr, 0, nullptr, nullptr); std::string output; output.resize(size - 1); WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, output.data(), size - 1, nullptr, nullptr); return output; +#else + Checks::unreachable(VCPKG_LINE_INFO); +#endif } std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern) @@ -104,9 +113,13 @@ namespace vcpkg::Strings return case_insensitive_ascii_find(s, pattern) != s.end(); } - bool case_insensitive_ascii_compare(const CStringView left, const CStringView right) + bool case_insensitive_ascii_equals(const CStringView left, const CStringView right) { +#if defined(_WIN32) return _stricmp(left.c_str(), right.c_str()) == 0; +#else + return strcasecmp(left.c_str(), right.c_str()) == 0; +#endif } std::string ascii_to_lowercase(const std::string& input) @@ -118,7 +131,11 @@ namespace vcpkg::Strings bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern) { +#if defined(_WIN32) return _strnicmp(s.c_str(), pattern.c_str(), pattern.size()) == 0; +#else + return strncasecmp(s.c_str(), pattern.c_str(), pattern.size()) == 0; +#endif } void trim(std::string* s) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index d5d39461c..e92d06f6e 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -4,6 +4,8 @@ #include #include +#include + #pragma comment(lib, "Advapi32") namespace vcpkg::System @@ -13,35 +15,46 @@ namespace vcpkg::System using std::chrono::system_clock; std::time_t now_time = system_clock::to_time_t(system_clock::now()); tm parts; +#if defined(_WIN32) localtime_s(&parts, &now_time); +#else + parts = *localtime(&now_time); +#endif return parts; } fs::path get_exe_path_of_current_process() { +#if defined(_WIN32) wchar_t buf[_MAX_PATH]; const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); if (bytes == 0) std::abort(); return fs::path(buf, buf + bytes); +#else + std::array buf; + auto written = readlink("/proc/self/exe", buf.data(), buf.size()); + Checks::check_exit(VCPKG_LINE_INFO, written != -1, "Could not determine current executable path."); + return fs::path(buf.data(), buf.data() + written); +#endif } Optional to_cpu_architecture(CStringView arch) { - if (Strings::case_insensitive_ascii_compare(arch, "x86")) return CPUArchitecture::X86; - if (Strings::case_insensitive_ascii_compare(arch, "x64")) return CPUArchitecture::X64; - if (Strings::case_insensitive_ascii_compare(arch, "amd64")) return CPUArchitecture::X64; - if (Strings::case_insensitive_ascii_compare(arch, "arm")) return CPUArchitecture::ARM; - if (Strings::case_insensitive_ascii_compare(arch, "arm64")) return CPUArchitecture::ARM64; + if (Strings::case_insensitive_ascii_equals(arch, "x86")) return CPUArchitecture::X86; + if (Strings::case_insensitive_ascii_equals(arch, "x64")) return CPUArchitecture::X64; + if (Strings::case_insensitive_ascii_equals(arch, "amd64")) return CPUArchitecture::X64; + if (Strings::case_insensitive_ascii_equals(arch, "arm")) return CPUArchitecture::ARM; + if (Strings::case_insensitive_ascii_equals(arch, "arm64")) return CPUArchitecture::ARM64; return nullopt; } CPUArchitecture get_host_processor() { - auto w6432 = get_environment_variable(L"PROCESSOR_ARCHITEW6432"); - if (const auto p = w6432.get()) return to_cpu_architecture(Strings::to_utf8(*p)).value_or_exit(VCPKG_LINE_INFO); + auto w6432 = get_environment_variable("PROCESSOR_ARCHITEW6432"); + if (const auto p = w6432.get()) return to_cpu_architecture(*p).value_or_exit(VCPKG_LINE_INFO); - const auto procarch = get_environment_variable(L"PROCESSOR_ARCHITECTURE").value_or_exit(VCPKG_LINE_INFO); - return to_cpu_architecture(Strings::to_utf8(procarch)).value_or_exit(VCPKG_LINE_INFO); + const auto procarch = get_environment_variable("PROCESSOR_ARCHITECTURE").value_or_exit(VCPKG_LINE_INFO); + return to_cpu_architecture(procarch).value_or_exit(VCPKG_LINE_INFO); } std::vector get_supported_host_architectures() @@ -58,12 +71,13 @@ namespace vcpkg::System return supported_architectures; } - int cmd_execute_clean(const CWStringView cmd_line) + int cmd_execute_clean(const CStringView cmd_line) { - static const std::wstring SYSTEM_ROOT = get_environment_variable(L"SystemRoot").value_or_exit(VCPKG_LINE_INFO); - static const std::wstring SYSTEM_32 = SYSTEM_ROOT + LR"(\system32)"; - static const std::wstring NEW_PATH = Strings::wformat( - LR"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", SYSTEM_32, SYSTEM_ROOT, SYSTEM_32, SYSTEM_32); +#if defined(_WIN32) + 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)"; + static const 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::vector env_wstrings = { L"ALLUSERSPROFILE", @@ -118,17 +132,17 @@ namespace vcpkg::System for (auto&& env_wstring : env_wstrings) { - const Optional value = System::get_environment_variable(env_wstring); + const Optional value = System::get_environment_variable(Strings::to_utf8(env_wstring)); const auto v = value.get(); if (!v || v->empty()) continue; env_cstr.append(env_wstring); env_cstr.push_back(L'='); - env_cstr.append(*v); + env_cstr.append(Strings::to_utf16(*v)); env_cstr.push_back(L'\0'); } - env_cstr.append(NEW_PATH); + env_cstr.append(Strings::to_utf16(NEW_PATH)); env_cstr.push_back(L'\0'); STARTUPINFOW startup_info; @@ -139,10 +153,10 @@ namespace vcpkg::System memset(&process_info, 0, sizeof(PROCESS_INFORMATION)); // Basically we are wrapping it in quotes - std::wstring actual_cmd_line = Strings::wformat(LR"###(cmd.exe /c "%s")###", cmd_line); - Debug::println("CreateProcessW(%s)", Strings::to_utf8(actual_cmd_line)); + std::string actual_cmd_line = Strings::format(R"###(cmd.exe /c "%s")###", cmd_line); + Debug::println("CreateProcessW(%s)", actual_cmd_line); bool succeeded = TRUE == CreateProcessW(nullptr, - actual_cmd_line.data(), + Strings::to_utf16(actual_cmd_line).data(), nullptr, nullptr, FALSE, @@ -164,18 +178,28 @@ namespace vcpkg::System Debug::println("CreateProcessW() returned %lu", exit_code); return static_cast(exit_code); +#else + fflush(nullptr); + return system(cmd_line.c_str()); +#endif } - int cmd_execute(const CWStringView cmd_line) + int cmd_execute(const CStringView cmd_line) { // Flush stdout before launching external process fflush(nullptr); // Basically we are wrapping it in quotes - const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s")###", cmd_line); - Debug::println("_wsystem(%s)", Strings::to_utf8(actual_cmd_line)); - const int exit_code = _wsystem(actual_cmd_line.c_str()); + const std::string& actual_cmd_line = Strings::format(R"###("%s")###", cmd_line); +#if defined(_WIN32) + Debug::println("_wsystem(%s)", actual_cmd_line); + const int exit_code = _wsystem(Strings::to_utf16(actual_cmd_line).c_str()); Debug::println("_wsystem() returned %d", exit_code); +#else + Debug::println("_system(%s)", actual_cmd_line); + const int exit_code = system(actual_cmd_line.c_str()); + Debug::println("_system() returned %d", exit_code); +#endif return exit_code; } @@ -190,17 +214,18 @@ namespace vcpkg::System } } - ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line) + ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line) { // Flush stdout before launching external process fflush(stdout); - const std::wstring& actual_cmd_line = Strings::wformat(LR"###("%s 2>&1")###", cmd_line); +#if defined(_WIN32) + const auto actual_cmd_line = Strings::format(R"###("%s 2>&1")###", cmd_line); - Debug::println("_wpopen(%s)", Strings::to_utf8(actual_cmd_line)); + Debug::println("_wpopen(%s)", actual_cmd_line); std::wstring output; wchar_t buf[1024]; - const auto pipe = _wpopen(actual_cmd_line.c_str(), L"r"); + const auto pipe = _wpopen(Strings::to_utf16(actual_cmd_line).c_str(), L"r"); if (pipe == nullptr) { return {1, Strings::to_utf8(output)}; @@ -218,27 +243,52 @@ namespace vcpkg::System Debug::println("_pclose() returned %d", ec); remove_byte_order_marks(&output); return {ec, Strings::to_utf8(output)}; +#else + const auto actual_cmd_line = Strings::format(R"###(%s 2>&1)###", cmd_line); + + Debug::println("popen(%s)", actual_cmd_line); + std::string output; + char buf[1024]; + const auto pipe = popen(actual_cmd_line.c_str(), "r"); + if (pipe == nullptr) + { + return {1, output}; + } + while (fgets(buf, 1024, pipe)) + { + output.append(buf); + } + if (!feof(pipe)) + { + return {1, output}; + } + + const auto ec = pclose(pipe); + Debug::println("pclose() returned %d", ec); + return {ec, output}; +#endif } - std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args) + std::string create_powershell_script_cmd(const fs::path& script_path, const CStringView args) { // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned - return Strings::wformat( - LR"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args); + return Strings::format( + R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), args); } - void println() { println(Strings::EMPTY); } + void println() { putchar('\n'); } void print(const CStringView message) { fputs(message.c_str(), stdout); } void println(const CStringView message) { print(message); - putchar('\n'); + println(); } void print(const Color c, const CStringView message) { +#if defined(_WIN32) const HANDLE console_handle = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO console_screen_buffer_info{}; @@ -248,37 +298,50 @@ namespace vcpkg::System SetConsoleTextAttribute(console_handle, static_cast(c) | (original_color & 0xF0)); print(message); SetConsoleTextAttribute(console_handle, original_color); +#else + print(message); +#endif } void println(const Color c, const CStringView message) { print(c, message); - putchar('\n'); + println(); } - Optional get_environment_variable(const CWStringView varname) noexcept + Optional get_environment_variable(const CStringView varname) noexcept { - const auto sz = GetEnvironmentVariableW(varname.c_str(), nullptr, 0); +#if defined(_WIN32) + const auto w_varname = Strings::to_utf16(varname); + const auto sz = GetEnvironmentVariableW(w_varname.c_str(), nullptr, 0); if (sz == 0) return nullopt; std::wstring ret(sz, L'\0'); Checks::check_exit(VCPKG_LINE_INFO, MAXDWORD >= ret.size()); - const auto sz2 = GetEnvironmentVariableW(varname.c_str(), ret.data(), static_cast(ret.size())); + const auto sz2 = GetEnvironmentVariableW(w_varname.c_str(), ret.data(), static_cast(ret.size())); Checks::check_exit(VCPKG_LINE_INFO, sz2 + 1 == sz); ret.pop_back(); - return ret; + return Strings::to_utf8(ret); +#else + auto v = getenv(varname.c_str()); + if (!v) return nullopt; + return std::string(v); +#endif } +#if defined(_WIN32) static bool is_string_keytype(DWORD hkey_type) { return hkey_type == REG_SZ || hkey_type == REG_MULTI_SZ || hkey_type == REG_EXPAND_SZ; } - Optional get_registry_string(HKEY base, const CWStringView sub_key, const CWStringView valuename) + Optional get_registry_string(void* base_hkey, + const CWStringView sub_key, + const CWStringView valuename) { HKEY k = nullptr; - const LSTATUS ec = RegOpenKeyExW(base, sub_key.c_str(), NULL, KEY_READ, &k); + const LSTATUS ec = RegOpenKeyExW(reinterpret_cast(base_hkey), sub_key.c_str(), NULL, KEY_READ, &k); if (ec != ERROR_SUCCESS) return nullopt; DWORD dw_buffer_size = 0; @@ -298,17 +361,25 @@ namespace vcpkg::System ret.pop_back(); // remove extra trailing null byte return ret; } +#else + Optional get_registry_string(void* base_hkey, + const CWStringView sub_key, + const CWStringView valuename) + { + return nullopt; + } +#endif static const fs::path& get_program_files() { - static const fs::path PATH = System::get_environment_variable(L"PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO); + static const fs::path PATH = System::get_environment_variable("PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO); return PATH; } const fs::path& get_program_files_32_bit() { static const fs::path PATH = []() -> fs::path { - auto value = System::get_environment_variable(L"ProgramFiles(x86)"); + auto value = System::get_environment_variable("ProgramFiles(x86)"); if (auto v = value.get()) { return std::move(*v); @@ -321,7 +392,7 @@ namespace vcpkg::System const fs::path& get_program_files_platform_bitness() { static const fs::path PATH = []() -> fs::path { - auto value = System::get_environment_variable(L"ProgramW6432"); + auto value = System::get_environment_variable("ProgramW6432"); if (auto v = value.get()) { return std::move(*v); diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index ef943011f..3a493eb4c 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -80,10 +80,10 @@ namespace vcpkg BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet) { this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO); - this->version = Strings::EMPTY; + this->version = ""; this->feature = fpgh.name; this->description = fpgh.description; - this->maintainer = Strings::EMPTY; + this->maintainer = ""; this->depends = filter_dependencies(fpgh.depends, triplet); } diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 99ec541c1..3d3bcb5fe 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -155,16 +155,16 @@ namespace vcpkg::Build static const std::string LIBRARY_LINKAGE = "LibraryLinkage"; } - CWStringView to_vcvarsall_target(const std::string& cmake_system_name) + CStringView to_vcvarsall_target(const std::string& cmake_system_name) { - if (cmake_system_name == Strings::EMPTY) return Strings::WEMPTY; - if (cmake_system_name == "Windows") return Strings::WEMPTY; - if (cmake_system_name == "WindowsStore") return L"store"; + if (cmake_system_name.empty()) return ""; + if (cmake_system_name == "Windows") return ""; + if (cmake_system_name == "WindowsStore") return "store"; Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported vcvarsall target %s", cmake_system_name); } - CWStringView to_vcvarsall_toolchain(const std::string& target_architecture, const Toolset& toolset) + CStringView to_vcvarsall_toolchain(const std::string& target_architecture, const Toolset& toolset) { auto maybe_target_arch = System::to_cpu_architecture(target_architecture); Checks::check_exit( @@ -183,23 +183,23 @@ namespace vcpkg::Build Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported toolchain combination %s", target_architecture); } - std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) + std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) { - const wchar_t* tonull = L" >nul"; + const char* tonull = " >nul"; if (GlobalState::debugging) { - tonull = Strings::WEMPTY; + tonull = ""; } const auto arch = to_vcvarsall_toolchain(pre_build_info.target_architecture, toolset); const auto target = to_vcvarsall_target(pre_build_info.cmake_system_name); - return Strings::wformat(LR"("%s" %s %s %s %s 2>&1)", - toolset.vcvarsall.native(), - Strings::join(L" ", toolset.vcvarsall_options), - arch, - target, - tonull); + return Strings::format(R"("%s" %s %s %s %s 2>&1)", + toolset.vcvarsall.u8string(), + Strings::join(" ", toolset.vcvarsall_options), + arch, + target, + tonull); } static void create_binary_feature_control_file(const SourceParagraph& source_paragraph, @@ -265,8 +265,6 @@ namespace vcpkg::Build const fs::path ports_cmake_script_path = paths.ports_cmake; const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); - const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); - const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); std::string features; if (GlobalState::feature_packages) @@ -284,22 +282,26 @@ namespace vcpkg::Build } } - const std::wstring cmd_launch_cmake = make_cmake_cmd( + const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); + + const std::string cmd_launch_cmake = make_cmake_cmd( cmake_exe_path, ports_cmake_script_path, { - {L"CMD", L"BUILD"}, - {L"PORT", config.src.name}, - {L"CURRENT_PORT_DIR", config.port_dir / "/."}, - {L"TARGET_TRIPLET", triplet.canonical_name()}, - {L"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, - {L"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? L"1" : L"0"}, - {L"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? L"1" : L"0"}, - {L"GIT", git_exe_path}, - {L"FEATURES", features}, + {"CMD", "BUILD"}, + {"PORT", config.src.name}, + {"CURRENT_PORT_DIR", config.port_dir / "/."}, + {"TARGET_TRIPLET", triplet.canonical_name()}, + {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, + {"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, + {"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, + {"GIT", git_exe_path}, + {"FEATURES", features}, }); - const std::wstring command = Strings::wformat(LR"(%s && %s)", cmd_set_environment, cmd_launch_cmake); + std::string command; + const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); + command = Strings::format(R"(%s && %s)", cmd_set_environment, cmd_launch_cmake); const auto timer = Chrono::ElapsedTime::create_started(); @@ -461,14 +463,12 @@ namespace vcpkg::Build 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 std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe_path, - ports_cmake_script_path, - { - {L"CMAKE_TRIPLET_FILE", triplet_file_path}, - }); - - const std::wstring command = Strings::wformat(LR"(%s)", cmd_launch_cmake); - const auto ec_data = System::cmd_execute_and_capture_output(command); + const auto cmd_launch_cmake = make_cmake_cmd(cmake_exe_path, + ports_cmake_script_path, + { + {"CMAKE_TRIPLET_FILE", triplet_file_path}, + }); + const auto ec_data = System::cmd_execute_and_capture_output(cmd_launch_cmake); Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0); const std::vector lines = Strings::split(ec_data.output, "\n"); @@ -491,7 +491,7 @@ namespace vcpkg::Build const bool variable_with_no_value = s.size() == 1; const std::string variable_name = s.at(0); - const std::string variable_value = variable_with_no_value ? Strings::EMPTY : s.at(1); + const std::string variable_value = variable_with_no_value ? "" : s.at(1); if (variable_name == "VCPKG_TARGET_ARCHITECTURE") { diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index d923cf555..85763f25e 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -20,7 +20,7 @@ namespace vcpkg::Commands::Create const fs::path& cmake_exe = paths.get_cmake_exe(); - std::vector cmake_args{{L"CMD", L"CREATE"}, {L"PORT", port_name}, {L"URL", url}}; + std::vector cmake_args{{"CMD", "CREATE"}, {"PORT", port_name}, {"URL", url}}; if (args.command_arguments.size() >= 3) { @@ -30,10 +30,10 @@ namespace vcpkg::Commands::Create R"(Filename cannot contain invalid chars %s, but was %s)", Files::FILESYSTEM_INVALID_CHARACTERS, zip_file_name); - cmake_args.push_back({L"FILENAME", zip_file_name}); + cmake_args.push_back({"FILENAME", zip_file_name}); } - const std::wstring cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args); + const std::string cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args); Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute_clean(cmd_launch_cmake)); } } diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index a90ae1bc3..fe6f76bd2 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -17,6 +17,7 @@ namespace vcpkg::Commands::Edit }; std::vector output; +#if defined(_WIN32) for (auto&& keypath : REGKEYS) { const Optional code_installpath = @@ -28,6 +29,7 @@ namespace vcpkg::Commands::Edit output.push_back(install_path / "Code.exe"); } } +#endif return output; } @@ -72,7 +74,7 @@ namespace vcpkg::Commands::Edit Checks::check_exit(VCPKG_LINE_INFO, fs.is_directory(portpath), R"(Could not find port named "%s")", port_name); std::vector candidate_paths; - const std::vector from_path = Files::find_from_PATH(L"EDITOR"); + const std::vector from_path = Files::find_from_PATH("EDITOR"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE_INSIDERS); candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE_INSIDERS); @@ -98,13 +100,16 @@ namespace vcpkg::Commands::Edit { const auto buildtrees_current_dir = paths.buildtrees / port_name; - const std::wstring cmd_line = - Strings::wformat(LR"("%s" "%s" -n)", env_editor, buildtrees_current_dir.native()); + const auto cmd_line = + Strings::format(R"("%s" "%s" -n)", env_editor.u8string(), buildtrees_current_dir.u8string()); Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); } - const std::wstring cmd_line = Strings::wformat( - LR"("%s" "%s" "%s" -n)", env_editor, portpath.native(), (portpath / "portfile.cmake").native()); + const auto cmd_line = Strings::format( + R"("%s" "%s" "%s" -n)", + env_editor.u8string(), + portpath.u8string(), + (portpath / "portfile.cmake").u8string()); Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); } } diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp index 089881588..9f8ae5207 100644 --- a/toolsrc/src/vcpkg/commands.env.cpp +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -15,7 +15,7 @@ namespace vcpkg::Commands::Env const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); - System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, toolset) + L" && cmd"); + System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, toolset) + " && cmd"); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp index fbf3beb8c..682267acb 100644 --- a/toolsrc/src/vcpkg/commands.exportifw.cpp +++ b/toolsrc/src/vcpkg/commands.exportifw.cpp @@ -29,7 +29,7 @@ namespace vcpkg::Export::IFW std::string safe_rich_from_plain_text(const std::string& text) { - // match standalone ampersand, no HTML number or name + // match standalone ampersand, no HTML number or name std::regex standalone_ampersand(R"###(&(?!(#[0-9]+|\w+);))###"); return std::regex_replace(text, standalone_ampersand, "&"); @@ -350,10 +350,10 @@ namespace vcpkg::Export::IFW Checks::check_exit( VCPKG_LINE_INFO, !ec, "Could not remove outdated repository directory %s", repository_dir.generic_string()); - const std::wstring cmd_line = Strings::wformat(LR"("%s" --packages "%s" "%s" > nul)", - repogen_exe.native(), - packages_dir.native(), - repository_dir.native()); + const auto cmd_line = Strings::format(R"("%s" --packages "%s" "%s" > nul)", + repogen_exe.u8string(), + packages_dir.u8string(), + repository_dir.u8string()); const int exit_code = System::cmd_execute_clean(cmd_line); Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: IFW repository generating failed"); @@ -371,24 +371,24 @@ namespace vcpkg::Export::IFW System::println("Generating installer %s...", installer_file.generic_string()); - std::wstring cmd_line; + std::string cmd_line; std::string ifw_repo_url = ifw_options.maybe_repository_url.value_or(""); if (!ifw_repo_url.empty()) { - cmd_line = Strings::wformat(LR"("%s" --online-only --config "%s" --repository "%s" "%s" > nul)", - binarycreator_exe.native(), - config_file.native(), - repository_dir.native(), - installer_file.native()); + cmd_line = Strings::format(R"("%s" --online-only --config "%s" --repository "%s" "%s" > nul)", + binarycreator_exe.u8string(), + config_file.u8string(), + repository_dir.u8string(), + installer_file.u8string()); } else { - cmd_line = Strings::wformat(LR"("%s" --config "%s" --packages "%s" "%s" > nul)", - binarycreator_exe.native(), - config_file.native(), - packages_dir.native(), - installer_file.native()); + cmd_line = Strings::format(R"("%s" --config "%s" --packages "%s" "%s" > nul)", + binarycreator_exe.u8string(), + config_file.u8string(), + packages_dir.u8string(), + installer_file.u8string()); } const int exit_code = System::cmd_execute_clean(cmd_line); diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 394a02e23..4bc58b509 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -7,26 +7,21 @@ namespace vcpkg::Commands::Hash { - static void do_file_hash(fs::path const& path, std::wstring const& hash_type) + static void do_file_hash(fs::path const& path, std::string const& hash_type) { - const auto cmd_line = Strings::wformat(LR"(CertUtil.exe -hashfile "%s" %s)", path.c_str(), hash_type); + const auto cmd_line = Strings::format(R"(CertUtil.exe -hashfile "%s" %s)", path.u8string().c_str(), hash_type); const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit( - VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", Strings::to_utf8(cmd_line)); + Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); std::string const& output = ec_data.output; const auto start = output.find_first_of("\r\n"); - Checks::check_exit(VCPKG_LINE_INFO, - start != std::string::npos, - "Unexpected output format from command: %s", - Strings::to_utf8(cmd_line)); + Checks::check_exit( + VCPKG_LINE_INFO, start != std::string::npos, "Unexpected output format from command: %s", cmd_line); const auto end = output.find_first_of("\r\n", start + 1); - Checks::check_exit(VCPKG_LINE_INFO, - end != std::string::npos, - "Unexpected output format from command: %s", - Strings::to_utf8(cmd_line)); + Checks::check_exit( + VCPKG_LINE_INFO, end != std::string::npos, "Unexpected output format from command: %s", cmd_line); auto hash = output.substr(start, end - start); Util::erase_remove_if(hash, isspace); @@ -43,11 +38,11 @@ namespace vcpkg::Commands::Hash if (args.command_arguments.size() == 1) { - do_file_hash(args.command_arguments[0], L"SHA512"); + do_file_hash(args.command_arguments[0], "SHA512"); } if (args.command_arguments.size() == 2) { - do_file_hash(args.command_arguments[0], Strings::to_utf16(args.command_arguments[1])); + do_file_hash(args.command_arguments[0], args.command_arguments[1]); } Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 85b567adb..0d185476e 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -8,12 +8,6 @@ namespace vcpkg::Commands::Integrate { - static const std::array OLD_SYSTEM_TARGET_FILES = { - System::get_program_files_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets", - System::get_program_files_32_bit() / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"}; - static const fs::path SYSTEM_WIDE_TARGETS_FILE = - System::get_program_files_32_bit() / "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props"; - static std::string create_appdata_targets_shortcut(const std::string& target_path) noexcept { return Strings::format(R"###( @@ -111,6 +105,7 @@ namespace vcpkg::Commands::Integrate NO }; +#if defined(_WIN32) static ElevationPromptChoice elevated_cmd_execute(const std::string& param) { SHELLEXECUTEINFOW sh_ex_info = {0}; @@ -138,16 +133,29 @@ namespace vcpkg::Commands::Integrate CloseHandle(sh_ex_info.hProcess); return ElevationPromptChoice::YES; } +#endif +#if defined(_WIN32) static fs::path get_appdata_targets_path() { static const fs::path LOCAL_APP_DATA = - fs::path(System::get_environment_variable(L"LOCALAPPDATA").value_or_exit(VCPKG_LINE_INFO)); + fs::path(System::get_environment_variable("LOCALAPPDATA").value_or_exit(VCPKG_LINE_INFO)); return LOCAL_APP_DATA / "vcpkg" / "vcpkg.user.targets"; } +#endif +#if defined(_WIN32) static void integrate_install(const VcpkgPaths& paths) { + static const std::array OLD_SYSTEM_TARGET_FILES = { + System::get_program_files_32_bit() / + "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets", + System::get_program_files_32_bit() / + "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"}; + static const fs::path SYSTEM_WIDE_TARGETS_FILE = + System::get_program_files_32_bit() / + "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props"; + auto& fs = paths.get_filesystem(); // TODO: This block of code should eventually be removed @@ -262,6 +270,7 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", Checks::exit_success(VCPKG_LINE_INFO); } +#endif static void integrate_project(const VcpkgPaths& paths) { @@ -286,10 +295,10 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", fs.write_contents(nuspec_file_path, create_nuspec_file_contents(paths.root, nuget_id, nupkg_version)); // Using all forward slashes for the command line - const std::wstring cmd_line = Strings::wformat(LR"("%s" pack -OutputDirectory "%s" "%s" > nul)", - nuget_exe.native(), - buildsystems_dir.native(), - nuspec_file_path.native()); + const std::string cmd_line = Strings::format(R"("%s" pack -OutputDirectory "%s" "%s" > nul)", + nuget_exe.u8string(), + buildsystems_dir.u8string(), + nuspec_file_path.u8string()); const int exit_code = System::cmd_execute_clean(cmd_line); @@ -325,6 +334,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console args.check_exact_arg_count(1, EXAMPLE); args.check_and_get_optional_command_arguments({}); +#if defined(_WIN32) if (args.command_arguments[0] == "install") { return integrate_install(paths); @@ -337,6 +347,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console { return integrate_project(paths); } +#endif Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown parameter %s for integrate", args.command_arguments[0]); } diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index b70ad2b80..a8c043751 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -75,28 +75,28 @@ namespace vcpkg::Commands::PortsDiff } static std::map read_ports_from_commit(const VcpkgPaths& paths, - const std::wstring& git_commit_id) + const std::string& git_commit_id) { std::error_code ec; auto& fs = paths.get_filesystem(); const fs::path& git_exe = paths.get_git_exe(); const fs::path dot_git_dir = paths.root / ".git"; - const std::wstring ports_dir_name_as_string = paths.ports.filename().native(); + const std::string ports_dir_name_as_string = paths.ports.filename().u8string(); const fs::path temp_checkout_path = - paths.root / Strings::wformat(L"%s-%s", ports_dir_name_as_string, git_commit_id); + paths.root / Strings::format("%s-%s", ports_dir_name_as_string, git_commit_id); fs.create_directory(temp_checkout_path, ec); - const std::wstring checkout_this_dir = - Strings::wformat(LR"(.\%s)", ports_dir_name_as_string); // Must be relative to the root of the repository - - const std::wstring cmd = - Strings::wformat(LR"("%s" --git-dir="%s" --work-tree="%s" checkout %s -f -q -- %s %s & "%s" reset >NUL)", - git_exe.native(), - dot_git_dir.native(), - temp_checkout_path.native(), - git_commit_id, - checkout_this_dir, - L".vcpkg-root", - git_exe.native()); + const auto checkout_this_dir = + Strings::format(R"(.\%s)", ports_dir_name_as_string); // Must be relative to the root of the repository + + const std::string cmd = + Strings::format(R"("%s" --git-dir="%s" --work-tree="%s" checkout %s -f -q -- %s %s & "%s" reset >NUL)", + git_exe.u8string(), + dot_git_dir.u8string(), + temp_checkout_path.u8string(), + git_commit_id, + checkout_this_dir, + ".vcpkg-root", + git_exe.u8string()); System::cmd_execute_clean(cmd); const std::map names_and_versions = Paragraphs::load_all_port_names_and_versions( paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string); @@ -104,16 +104,14 @@ namespace vcpkg::Commands::PortsDiff return names_and_versions; } - static void check_commit_exists(const fs::path& git_exe, const std::wstring& git_commit_id) + static void check_commit_exists(const fs::path& git_exe, const std::string& git_commit_id) { static const std::string VALID_COMMIT_OUTPUT = "commit\n"; - const std::wstring cmd = Strings::wformat(LR"("%s" cat-file -t %s)", git_exe.native(), git_commit_id); + const auto cmd = Strings::format(R"("%s" cat-file -t %s)", git_exe.u8string(), git_commit_id); const System::ExitCodeAndOutput output = System::cmd_execute_and_capture_output(cmd); - Checks::check_exit(VCPKG_LINE_INFO, - output.output == VALID_COMMIT_OUTPUT, - "Invalid commit id %s", - Strings::to_utf8(git_commit_id)); + Checks::check_exit( + VCPKG_LINE_INFO, output.output == VALID_COMMIT_OUTPUT, "Invalid commit id %s", git_commit_id); } void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) @@ -126,9 +124,9 @@ namespace vcpkg::Commands::PortsDiff const fs::path& git_exe = paths.get_git_exe(); - const std::wstring git_commit_id_for_previous_snapshot = Strings::to_utf16(args.command_arguments.at(0)); - const std::wstring git_commit_id_for_current_snapshot = - args.command_arguments.size() < 2 ? L"HEAD" : Strings::to_utf16(args.command_arguments.at(1)); + const std::string git_commit_id_for_previous_snapshot = args.command_arguments.at(0); + const std::string git_commit_id_for_current_snapshot = + args.command_arguments.size() < 2 ? "HEAD" : args.command_arguments.at(1); check_commit_exists(git_exe, git_commit_id_for_current_snapshot); check_commit_exists(git_exe, git_commit_id_for_previous_snapshot); diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp index c6cc82d1f..403c355b5 100644 --- a/toolsrc/src/vcpkg/commands.version.cpp +++ b/toolsrc/src/vcpkg/commands.version.cpp @@ -20,20 +20,29 @@ namespace vcpkg::Commands::Version #ifndef NDEBUG + std::string("-debug") #endif - + std::string(Metrics::get_compiled_metrics_enabled() ? Strings::EMPTY : "-external"); + + std::string(Metrics::get_compiled_metrics_enabled() ? "" : "-external"); return S_VERSION; } + static int scan3(const char* input, const char* pattern, int* a, int* b, int* c) + { +#if defined(_WIN32) + return sscanf_s(input, pattern, a, b, c); +#else + return sscanf(input, pattern, a, b, c); +#endif + } + void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths) { auto version_file = paths.get_filesystem().read_contents(paths.root / "toolsrc" / "VERSION.txt"); if (const auto version_contents = version_file.get()) { int maj1, min1, rev1; - const auto num1 = sscanf_s(version_contents->c_str(), "\"%d.%d.%d\"", &maj1, &min1, &rev1); + const auto num1 = scan3(version_contents->c_str(), "\"%d.%d.%d\"", &maj1, &min1, &rev1); int maj2, min2, rev2; - const auto num2 = sscanf_s(Version::version().c_str(), "%d.%d.%d-", &maj2, &min2, &rev2); + const auto num2 = scan3(Version::version().c_str(), "%d.%d.%d-", &maj2, &min2, &rev2); if (num1 == 3 && num2 == 3) { diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index da8f1e178..02b2ec785 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -43,14 +43,17 @@ namespace vcpkg::Dependencies bool operator==(const ClusterPtr& l, const ClusterPtr& r) { return l.ptr == r.ptr; } } -template<> -struct std::hash +namespace std { - size_t operator()(const vcpkg::Dependencies::ClusterPtr& value) const + template<> + struct hash { - return std::hash()(value.ptr->spec); - } -}; + size_t operator()(const vcpkg::Dependencies::ClusterPtr& value) const + { + return std::hash()(value.ptr->spec); + } + }; +} namespace vcpkg::Dependencies { diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index de6464c87..5e27d4126 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -137,11 +137,10 @@ namespace vcpkg::Export fs.write_contents(nuspec_file_path, nuspec_file_content); // -NoDefaultExcludes is needed for ".vcpkg-root" - const std::wstring cmd_line = - Strings::wformat(LR"("%s" pack -OutputDirectory "%s" "%s" -NoDefaultExcludes > nul)", - nuget_exe.native(), - output_dir.native(), - nuspec_file_path.native()); + const auto cmd_line = Strings::format(R"("%s" pack -OutputDirectory "%s" "%s" -NoDefaultExcludes > nul)", + nuget_exe.u8string(), + output_dir.u8string(), + nuspec_file_path.u8string()); const int exit_code = System::cmd_execute_clean(cmd_line); Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Error: NuGet package creation failed"); @@ -160,25 +159,25 @@ namespace vcpkg::Export constexpr ArchiveFormat() = delete; - constexpr ArchiveFormat(BackingEnum backing_enum, const wchar_t* extension, const wchar_t* cmake_option) + constexpr ArchiveFormat(BackingEnum backing_enum, const char* extension, const char* cmake_option) : backing_enum(backing_enum), m_extension(extension), m_cmake_option(cmake_option) { } constexpr operator BackingEnum() const { return backing_enum; } - constexpr CWStringView extension() const { return this->m_extension; } - constexpr CWStringView cmake_option() const { return this->m_cmake_option; } + constexpr CStringView extension() const { return this->m_extension; } + constexpr CStringView cmake_option() const { return this->m_cmake_option; } private: BackingEnum backing_enum; - const wchar_t* m_extension; - const wchar_t* m_cmake_option; + const char* m_extension; + const char* m_cmake_option; }; namespace ArchiveFormatC { - constexpr const ArchiveFormat ZIP(ArchiveFormat::BackingEnum::ZIP, L"zip", L"zip"); - constexpr const ArchiveFormat SEVEN_ZIP(ArchiveFormat::BackingEnum::SEVEN_ZIP, L"7z", L"7zip"); + constexpr const ArchiveFormat ZIP(ArchiveFormat::BackingEnum::ZIP, "zip", "zip"); + constexpr const ArchiveFormat SEVEN_ZIP(ArchiveFormat::BackingEnum::SEVEN_ZIP, "7z", "7zip"); } static fs::path do_archive_export(const VcpkgPaths& paths, @@ -188,17 +187,17 @@ namespace vcpkg::Export { const fs::path& cmake_exe = paths.get_cmake_exe(); - const std::wstring exported_dir_filename = raw_exported_dir.filename().native(); - const std::wstring exported_archive_filename = - Strings::wformat(L"%s.%s", exported_dir_filename, format.extension()); + const std::string exported_dir_filename = raw_exported_dir.filename().u8string(); + const std::string exported_archive_filename = + Strings::format("%s.%s", exported_dir_filename, format.extension()); const fs::path exported_archive_path = (output_dir / exported_archive_filename); // -NoDefaultExcludes is needed for ".vcpkg-root" - const std::wstring cmd_line = Strings::wformat(LR"("%s" -E tar "cf" "%s" --format=%s -- "%s")", - cmake_exe.native(), - exported_archive_path.native(), - format.cmake_option(), - raw_exported_dir.native()); + const auto cmd_line = Strings::format(R"("%s" -E tar "cf" "%s" --format=%s -- "%s")", + cmake_exe.u8string(), + exported_archive_path.u8string(), + format.cmake_option(), + raw_exported_dir.u8string()); const int exit_code = System::cmd_execute_clean(cmd_line); Checks::check_exit( @@ -361,13 +360,13 @@ namespace vcpkg::Export static void print_next_step_info(const fs::path& prefix) { const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; - const CMakeVariable cmake_variable = CMakeVariable(L"CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); + const CMakeVariable cmake_variable = CMakeVariable("CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); System::println("\n" "To use the exported libraries in CMake projects use:" "\n" " %s" "\n", - Strings::to_utf8(cmake_variable.s)); + cmake_variable.s); }; static void handle_raw_based_export(Span export_plan, diff --git a/toolsrc/src/vcpkg/globalstate.cpp b/toolsrc/src/vcpkg/globalstate.cpp index de564d357..43230fa4b 100644 --- a/toolsrc/src/vcpkg/globalstate.cpp +++ b/toolsrc/src/vcpkg/globalstate.cpp @@ -5,9 +5,9 @@ namespace vcpkg { Util::LockGuarded GlobalState::timer; - std::atomic GlobalState::debugging = false; - std::atomic GlobalState::feature_packages = false; + std::atomic GlobalState::debugging(false); + std::atomic GlobalState::feature_packages(false); - std::atomic GlobalState::g_init_console_cp = 0; - std::atomic GlobalState::g_init_console_output_cp = 0; + std::atomic GlobalState::g_init_console_cp(0); + std::atomic GlobalState::g_init_console_output_cp(0); } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 4a1e5537b..adbd8c943 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -70,9 +70,8 @@ namespace vcpkg::Install } const std::string filename = file.filename().generic_string(); - if (fs::is_regular_file(status) && - (Strings::case_insensitive_ascii_compare(filename.c_str(), "CONTROL") || - Strings::case_insensitive_ascii_compare(filename.c_str(), "BUILD_INFO"))) + if (fs::is_regular_file(status) && (Strings::case_insensitive_ascii_equals(filename.c_str(), "CONTROL") || + Strings::case_insensitive_ascii_equals(filename.c_str(), "BUILD_INFO"))) { // Do not copy the control file continue; diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 84c1ee208..854baa0ca 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -19,6 +19,7 @@ namespace vcpkg::Metrics std::array date; date.fill(0); +#if defined(_WIN32) struct _timeb timebuffer; _ftime_s(&timebuffer); @@ -26,10 +27,17 @@ namespace vcpkg::Metrics const int milli = timebuffer.millitm; const errno_t err = gmtime_s(&newtime, &now); + if (err) { - return Strings::EMPTY; + return ""; } +#else + time_t now; + time(&now); + gmtime_r(&now, &newtime); + const int milli = 0; +#endif strftime(&date[0], date.size(), "%Y-%m-%dT%H:%M:%S", &newtime); return std::string(&date[0]) + "." + std::to_string(milli) + "Z"; @@ -121,6 +129,7 @@ namespace vcpkg::Metrics static std::string get_os_version_string() { +#if defined(_WIN32) std::wstring path; path.resize(MAX_PATH); const auto n = GetSystemDirectoryW(&path[0], static_cast(path.size())); @@ -128,16 +137,16 @@ namespace vcpkg::Metrics path += L"\\kernel32.dll"; const auto versz = GetFileVersionInfoSizeW(path.c_str(), nullptr); - if (versz == 0) return Strings::EMPTY; + if (versz == 0) return ""; std::vector verbuf; verbuf.resize(versz); - if (!GetFileVersionInfoW(path.c_str(), 0, static_cast(verbuf.size()), &verbuf[0])) return Strings::EMPTY; + if (!GetFileVersionInfoW(path.c_str(), 0, static_cast(verbuf.size()), &verbuf[0])) return ""; void* rootblock; UINT rootblocksize; - if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return Strings::EMPTY; + if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return ""; auto rootblock_ffi = static_cast(rootblock); @@ -145,6 +154,9 @@ namespace vcpkg::Metrics static_cast(HIWORD(rootblock_ffi->dwProductVersionMS)), static_cast(LOWORD(rootblock_ffi->dwProductVersionMS)), static_cast(HIWORD(rootblock_ffi->dwProductVersionLS))); +#else + return "unknown"; +#endif } struct MetricMessage @@ -223,9 +235,13 @@ namespace vcpkg::Metrics std::wstring get_SQM_user() { +#if defined(_WIN32) auto hkcu_sqmclient = System::get_registry_string(HKEY_CURRENT_USER, LR"(Software\Microsoft\SQMClient)", L"UserId"); return hkcu_sqmclient.value_or(L"{}"); +#else + return L"{}"; +#endif } void Metrics::set_user_information(const std::string& user_id, const std::string& first_use_time) @@ -264,6 +280,7 @@ namespace vcpkg::Metrics void Metrics::upload(const std::string& payload) { +#if defined(_WIN32) HINTERNET connect = nullptr, request = nullptr; BOOL results = FALSE; @@ -344,18 +361,12 @@ namespace vcpkg::Metrics if (request) WinHttpCloseHandle(request); if (connect) WinHttpCloseHandle(connect); if (session) WinHttpCloseHandle(session); - } - - static fs::path get_bindir() - { - wchar_t buf[_MAX_PATH]; - const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); - if (bytes == 0) std::abort(); - return fs::path(buf, buf + bytes); +#endif } void Metrics::flush() { +#if defined(_WIN32) const std::string payload = g_metricmessage.format_event_data_template(); if (g_should_print_metrics) std::cerr << payload << "\n"; if (!g_should_send_metrics) return; @@ -373,14 +384,14 @@ namespace vcpkg::Metrics if (true) { const fs::path exe_path = [&fs]() -> fs::path { - auto vcpkgdir = get_bindir().parent_path(); + auto vcpkgdir = System::get_exe_path_of_current_process().parent_path(); auto path = vcpkgdir / "vcpkgmetricsuploader.exe"; if (fs.exists(path)) return path; path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe"; if (fs.exists(path)) return path; - return Strings::WEMPTY; + return ""; }(); std::error_code ec; @@ -391,8 +402,9 @@ namespace vcpkg::Metrics const fs::path vcpkg_metrics_txt_path = temp_folder_path / ("vcpkg" + generate_random_UUID() + ".txt"); fs.write_contents(vcpkg_metrics_txt_path, payload); - const std::wstring cmd_line = - Strings::wformat(L"start %s %s", temp_folder_path_exe.native(), vcpkg_metrics_txt_path.native()); + const std::string cmd_line = + Strings::format("start %s %s", temp_folder_path_exe.u8string(), vcpkg_metrics_txt_path.u8string()); System::cmd_execute_clean(cmd_line); +#endif } } diff --git a/toolsrc/src/vcpkg/packagespec.cpp b/toolsrc/src/vcpkg/packagespec.cpp index 01a09618d..6e40d70f5 100644 --- a/toolsrc/src/vcpkg/packagespec.cpp +++ b/toolsrc/src/vcpkg/packagespec.cpp @@ -38,7 +38,7 @@ namespace vcpkg for (auto&& feature : spec->features) f_specs.push_back(FeatureSpec{pspec, feature}); - if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, Strings::EMPTY}); + if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, ""}); } else { @@ -56,7 +56,7 @@ namespace vcpkg std::vector ret; for (auto&& spec : specs) { - ret.emplace_back(spec.package_spec, Strings::EMPTY); + ret.emplace_back(spec.package_spec, ""); for (auto&& feature : spec.features) ret.emplace_back(spec.package_spec, feature); } diff --git a/toolsrc/src/vcpkg/parse.cpp b/toolsrc/src/vcpkg/parse.cpp index 116a7f5c8..c2670f561 100644 --- a/toolsrc/src/vcpkg/parse.cpp +++ b/toolsrc/src/vcpkg/parse.cpp @@ -31,7 +31,7 @@ namespace vcpkg::Parse } std::string ParagraphParser::optional_field(const std::string& fieldname) const { - return remove_field(&fields, fieldname).value_or(Strings::EMPTY); + return remove_field(&fields, fieldname).value_or(""); } std::unique_ptr ParagraphParser::error_info(const std::string& name) const { diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp index 22cf67e86..0063f8d98 100644 --- a/toolsrc/src/vcpkg/postbuildlint.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -284,13 +284,10 @@ namespace vcpkg::PostBuildLint std::vector dlls_with_no_exports; for (const fs::path& dll : dlls) { - const std::wstring cmd_line = - Strings::wformat(LR"("%s" /exports "%s")", dumpbin_exe.native(), dll.native()); + const std::string cmd_line = + Strings::format(R"("%s" /exports "%s")", dumpbin_exe.u8string(), dll.u8string()); System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Running command:\n %s\n failed", - Strings::to_utf8(cmd_line)); + Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); if (ec_data.output.find("ordinal hint RVA name") == std::string::npos) { @@ -321,13 +318,10 @@ namespace vcpkg::PostBuildLint std::vector dlls_with_improper_uwp_bit; for (const fs::path& dll : dlls) { - const std::wstring cmd_line = - Strings::wformat(LR"("%s" /headers "%s")", dumpbin_exe.native(), dll.native()); + const std::string cmd_line = + Strings::format(R"("%s" /headers "%s")", dumpbin_exe.u8string(), dll.u8string()); System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Running command:\n %s\n failed", - Strings::to_utf8(cmd_line)); + Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); if (ec_data.output.find("App Container") == std::string::npos) { @@ -599,13 +593,10 @@ namespace vcpkg::PostBuildLint for (const fs::path& lib : libs) { - const std::wstring cmd_line = - Strings::wformat(LR"("%s" /directives "%s")", dumpbin_exe.native(), lib.native()); + const std::string cmd_line = + Strings::format(R"("%s" /directives "%s")", dumpbin_exe.u8string(), lib.u8string()); System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Running command:\n %s\n failed", - Strings::to_utf8(cmd_line)); + Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); for (const BuildType& bad_build_type : bad_build_types) { @@ -655,13 +646,9 @@ namespace vcpkg::PostBuildLint for (const fs::path& dll : dlls) { - const std::wstring cmd_line = - Strings::wformat(LR"("%s" /dependents "%s")", dumpbin_exe.native(), dll.native()); + const auto cmd_line = Strings::format(R"("%s" /dependents "%s")", dumpbin_exe.u8string(), dll.u8string()); System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Running command:\n %s\n failed", - Strings::to_utf8(cmd_line)); + Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); for (const OutdatedDynamicCrt& outdated_crt : get_outdated_dynamic_crts("v141")) { @@ -696,8 +683,8 @@ namespace vcpkg::PostBuildLint std::vector misplaced_files = fs.get_files_non_recursive(dir); Util::unstable_keep_if(misplaced_files, [&fs](const fs::path& path) { const std::string filename = path.filename().generic_string(); - if (Strings::case_insensitive_ascii_compare(filename.c_str(), "CONTROL") || - Strings::case_insensitive_ascii_compare(filename.c_str(), "BUILD_INFO")) + if (Strings::case_insensitive_ascii_equals(filename.c_str(), "CONTROL") || + Strings::case_insensitive_ascii_equals(filename.c_str(), "BUILD_INFO")) return false; return !fs.is_directory(path); }); diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 04ddba1e4..2ec32855a 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -21,7 +21,7 @@ namespace vcpkg::Remove { auto& fs = paths.get_filesystem(); auto spghs = status_db->find_all(spec.name(), spec.triplet()); - const auto core_pkg = **status_db->find(spec.name(), spec.triplet(), Strings::EMPTY); + const auto core_pkg = **status_db->find(spec.name(), spec.triplet(), ""); for (auto&& spgh : spghs) { diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index d766dcb72..2a9480538 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -178,11 +178,11 @@ namespace vcpkg return Strings::format("%s[%s]", this->depend.name, features); } - std::vector vcpkg::expand_qualified_dependencies(const std::vector& depends) + std::vector expand_qualified_dependencies(const std::vector& depends) { return Util::fmap(depends, [&](const std::string& depend_string) -> Dependency { auto pos = depend_string.find(' '); - if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, Strings::EMPTY); + if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, ""); // expect of the form "\w+ \[\w+\]" Dependency dep; @@ -190,7 +190,7 @@ namespace vcpkg if (depend_string.c_str()[pos + 1] != '(' || depend_string[depend_string.size() - 1] != ')') { // Error, but for now just slurp the entire string. - return Dependency::parse_dependency(depend_string, Strings::EMPTY); + return Dependency::parse_dependency(depend_string, ""); } dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3); return dep; diff --git a/toolsrc/src/vcpkg/triplet.cpp b/toolsrc/src/vcpkg/triplet.cpp index 4ebb97a9b..4cba1523d 100644 --- a/toolsrc/src/vcpkg/triplet.cpp +++ b/toolsrc/src/vcpkg/triplet.cpp @@ -18,11 +18,14 @@ namespace vcpkg const TripletInstance Triplet::DEFAULT_INSTANCE({}); } -template<> -struct std::hash +namespace std { - size_t operator()(const vcpkg::TripletInstance& t) const { return t.hash; } -}; + template<> + struct hash + { + size_t operator()(const vcpkg::TripletInstance& t) const { return t.hash; } + }; +} namespace vcpkg { diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 522961693..209f6a3f2 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -45,12 +45,20 @@ namespace vcpkg option_field = new_setting; } +#if defined(_WIN32) VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, const wchar_t* const* const argv) +#else + VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, const char* const* const argv) +#endif { std::vector v; for (int i = 1; i < argc; ++i) { +#if defined(_WIN32) v.push_back(Strings::to_utf8(argv[i])); +#else + v.push_back(argv[i]); +#endif } return VcpkgCmdArguments::create_from_arg_sequence(v.data(), v.data() + v.size()); @@ -223,17 +231,17 @@ namespace vcpkg void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count) const { - return check_max_arg_count(expected_arg_count, Strings::EMPTY); + return check_max_arg_count(expected_arg_count, ""); } void VcpkgCmdArguments::check_min_arg_count(const size_t expected_arg_count) const { - return check_min_arg_count(expected_arg_count, Strings::EMPTY); + return check_min_arg_count(expected_arg_count, ""); } void VcpkgCmdArguments::check_exact_arg_count(const size_t expected_arg_count) const { - return check_exact_arg_count(expected_arg_count, Strings::EMPTY); + return check_exact_arg_count(expected_arg_count, ""); } void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const diff --git a/toolsrc/src/vcpkg/vcpkglib.cpp b/toolsrc/src/vcpkg/vcpkglib.cpp index 23c774210..38b130f6f 100644 --- a/toolsrc/src/vcpkg/vcpkglib.cpp +++ b/toolsrc/src/vcpkg/vcpkglib.cpp @@ -212,30 +212,26 @@ namespace vcpkg return installed_files; } - CMakeVariable::CMakeVariable(const CWStringView varname, const wchar_t* varvalue) - : s(Strings::wformat(LR"("-D%s=%s")", varname, varvalue)) + CMakeVariable::CMakeVariable(const CStringView varname, const char* varvalue) + : s(Strings::format(R"("-D%s=%s")", varname, varvalue)) { } - CMakeVariable::CMakeVariable(const CWStringView varname, const std::string& varvalue) - : CMakeVariable(varname, Strings::to_utf16(varvalue).c_str()) - { - } - CMakeVariable::CMakeVariable(const CWStringView varname, const std::wstring& varvalue) + CMakeVariable::CMakeVariable(const CStringView varname, const std::string& varvalue) : CMakeVariable(varname, varvalue.c_str()) { } - CMakeVariable::CMakeVariable(const CWStringView varname, const fs::path& path) - : CMakeVariable(varname, path.generic_wstring()) + CMakeVariable::CMakeVariable(const CStringView varname, const fs::path& path) + : CMakeVariable(varname, path.generic_u8string()) { } - std::wstring make_cmake_cmd(const fs::path& cmake_exe, - const fs::path& cmake_script, - const std::vector& pass_variables) + std::string make_cmake_cmd(const fs::path& cmake_exe, + const fs::path& cmake_script, + const std::vector& pass_variables) { - const std::wstring cmd_cmake_pass_variables = Strings::join(L" ", pass_variables, [](auto&& v) { return v.s; }); - return Strings::wformat( - LR"("%s" %s -P "%s")", cmake_exe.native(), cmd_cmake_pass_variables, cmake_script.generic_wstring()); + const std::string cmd_cmake_pass_variables = Strings::join(" ", pass_variables, [](auto&& v) { return v.s; }); + return Strings::format( + R"("%s" %s -P "%s")", cmake_exe.u8string(), cmd_cmake_pass_variables, cmake_script.generic_u8string()); } std::string shorten_text(const std::string& desc, size_t length) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index c57077eaa..90f9cb00b 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -10,16 +10,16 @@ namespace vcpkg { - static constexpr CWStringView V_120 = L"v120"; - static constexpr CWStringView V_140 = L"v140"; - static constexpr CWStringView V_141 = L"v141"; + static constexpr CStringView V_120 = "v120"; + static constexpr CStringView V_140 = "v140"; + static constexpr CStringView V_141 = "v141"; - static bool exists_and_has_equal_or_greater_version(const std::wstring& version_cmd, + static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd, const std::array& expected_version) { static const std::regex RE(R"###((\d+)\.(\d+)\.(\d+))###"); - const auto rc = System::cmd_execute_and_capture_output(Strings::wformat(LR"(%s)", version_cmd)); + const auto rc = System::cmd_execute_and_capture_output(Strings::format(R"(%s)", version_cmd)); if (rc.exit_code != 0) { return false; @@ -46,11 +46,11 @@ namespace vcpkg } static Optional find_if_has_equal_or_greater_version(const std::vector& candidate_paths, - const std::wstring& version_check_arguments, + const std::string& version_check_arguments, const std::array& expected_version) { auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { - const std::wstring cmd = Strings::wformat(LR"("%s" %s)", p.native(), version_check_arguments); + const std::string cmd = Strings::format(R"("%s" %s)", p.u8string(), version_check_arguments); return exists_and_has_equal_or_greater_version(cmd, expected_version); }); @@ -63,27 +63,26 @@ namespace vcpkg } static fs::path fetch_dependency(const fs::path& scripts_folder, - const std::wstring& tool_name, + const std::string& tool_name, const fs::path& expected_downloaded_path, const std::array& version) { - const std::string tool_name_utf8 = Strings::to_utf8(tool_name); const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", - tool_name_utf8, + tool_name, version_as_string, - tool_name_utf8, + tool_name, version_as_string); const fs::path script = scripts_folder / "fetchDependency.ps1"; const auto install_cmd = - System::create_powershell_script_cmd(script, Strings::wformat(L"-Dependency %s", tool_name)); + System::create_powershell_script_cmd(script, Strings::format("-Dependency %s", tool_name)); const System::ExitCodeAndOutput rc = System::cmd_execute_and_capture_output(install_cmd); if (rc.exit_code) { System::println(System::Color::error, "Launching powershell failed or was denied when trying to fetch %s version %s.\n" "(No sufficient installed version was found)", - tool_name_utf8, + tool_name, version_as_string); { auto locked_metrics = Metrics::g_metrics.lock(); @@ -107,16 +106,18 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { static constexpr std::array EXPECTED_VERSION = {3, 9, 3}; - static const std::wstring VERSION_CHECK_ARGUMENTS = L"--version"; + static const std::string VERSION_CHECK_ARGUMENTS = "--version"; const fs::path downloaded_copy = downloads_folder / "cmake-3.9.3-win32-x86" / "bin" / "cmake.exe"; - const std::vector from_path = Files::find_from_PATH(L"cmake"); + const std::vector from_path = Files::find_from_PATH("cmake"); std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); +#if defined(_WIN32) candidate_paths.push_back(System::get_program_files_platform_bitness() / "CMake" / "bin" / "cmake.exe"); candidate_paths.push_back(System::get_program_files_32_bit() / "CMake" / "bin"); +#endif const Optional path = find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); @@ -125,43 +126,44 @@ namespace vcpkg return *p; } - return fetch_dependency(scripts_folder, L"cmake", downloaded_copy, EXPECTED_VERSION); + return fetch_dependency(scripts_folder, "cmake", downloaded_copy, EXPECTED_VERSION); } fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { static constexpr std::array EXPECTED_VERSION = {4, 3, 0}; - static const std::wstring VERSION_CHECK_ARGUMENTS = Strings::WEMPTY; const fs::path downloaded_copy = downloads_folder / "nuget-4.3.0" / "nuget.exe"; - const std::vector from_path = Files::find_from_PATH(L"nuget"); + const std::vector from_path = Files::find_from_PATH("nuget"); std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - auto path = find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); + auto path = find_if_has_equal_or_greater_version(candidate_paths, "", EXPECTED_VERSION); if (const auto p = path.get()) { return *p; } - return fetch_dependency(scripts_folder, L"nuget", downloaded_copy, EXPECTED_VERSION); + return fetch_dependency(scripts_folder, "nuget", downloaded_copy, EXPECTED_VERSION); } fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { static constexpr std::array EXPECTED_VERSION = {2, 14, 1}; - static const std::wstring VERSION_CHECK_ARGUMENTS = L"--version"; + static const std::string VERSION_CHECK_ARGUMENTS = "--version"; const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.1-32-bit" / "cmd" / "git.exe"; - const std::vector from_path = Files::find_from_PATH(L"git"); + const std::vector from_path = Files::find_from_PATH("git"); std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); +#if defined(_WIN32) candidate_paths.push_back(System::get_program_files_platform_bitness() / "git" / "cmd" / "git.exe"); candidate_paths.push_back(System::get_program_files_32_bit() / "git" / "cmd" / "git.exe"); +#endif const Optional path = find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); @@ -170,13 +172,13 @@ namespace vcpkg return *p; } - return fetch_dependency(scripts_folder, L"git", downloaded_copy, EXPECTED_VERSION); + return fetch_dependency(scripts_folder, "git", downloaded_copy, EXPECTED_VERSION); } static fs::path get_ifw_installerbase_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { static constexpr std::array EXPECTED_VERSION = {3, 1, 81}; - static const std::wstring VERSION_CHECK_ARGUMENTS = L"--framework-version"; + static const std::string VERSION_CHECK_ARGUMENTS = "--framework-version"; const fs::path downloaded_copy = downloads_folder / "QtInstallerFramework-win-x86" / "bin" / "installerbase.exe"; @@ -184,11 +186,11 @@ namespace vcpkg std::vector candidate_paths; candidate_paths.push_back(downloaded_copy); // TODO: Uncomment later - // const std::vector from_path = Files::find_from_PATH(L"installerbase"); + // const std::vector from_path = Files::find_from_PATH("installerbase"); // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - // candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / + // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / // "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe"); - // candidate_paths.push_back(fs::path(System::get_environment_variable(L"HOMEDRIVE").value_or("C:")) / "Qt" / + // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); const Optional path = @@ -198,7 +200,7 @@ namespace vcpkg return *p; } - return fetch_dependency(scripts_folder, L"installerbase", downloaded_copy, EXPECTED_VERSION); + return fetch_dependency(scripts_folder, "installerbase", downloaded_copy, EXPECTED_VERSION); } Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir) @@ -322,7 +324,7 @@ namespace vcpkg static std::vector get_visual_studio_instances(const VcpkgPaths& paths) { const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; - const std::wstring cmd = System::create_powershell_script_cmd(script); + const std::string cmd = System::create_powershell_script_cmd(script); const System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd); Checks::check_exit( VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances"); @@ -370,21 +372,21 @@ namespace vcpkg // Get all supported architectures std::vector supported_architectures; if (fs.exists(vcvarsall_dir / "vcvars32.bat")) - supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); + supported_architectures.push_back({"x86", CPU::X86, CPU::X86}); if (fs.exists(vcvarsall_dir / "vcvars64.bat")) - supported_architectures.push_back({L"amd64", CPU::X64, CPU::X64}); + supported_architectures.push_back({"amd64", CPU::X64, CPU::X64}); if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) - supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); + supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64}); if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) - supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); + supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM}); if (fs.exists(vcvarsall_dir / "vcvarsx86_arm64.bat")) - supported_architectures.push_back({L"x86_arm64", CPU::X86, CPU::ARM64}); + supported_architectures.push_back({"x86_arm64", CPU::X86, CPU::ARM64}); if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) - supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); + supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86}); if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) - supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM}); if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm64.bat")) - supported_architectures.push_back({L"amd64_arm64", CPU::X64, CPU::ARM64}); + supported_architectures.push_back({"amd64_arm64", CPU::X64, CPU::ARM64}); // Locate the "best" MSVC toolchain version const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; @@ -412,7 +414,7 @@ namespace vcpkg found_toolsets.push_back(Toolset{vs_instance.root_path, dumpbin_path, vcvarsall_bat, - {L"-vcvars_ver=14.0"}, + {"-vcvars_ver=14.0"}, V_140, supported_architectures}); } @@ -437,17 +439,17 @@ namespace vcpkg const fs::path vs2015_bin_dir = vcvarsall_bat.parent_path() / "bin"; std::vector supported_architectures; if (fs.exists(vs2015_bin_dir / "vcvars32.bat")) - supported_architectures.push_back({L"x86", CPU::X86, CPU::X86}); + supported_architectures.push_back({"x86", CPU::X86, CPU::X86}); if (fs.exists(vs2015_bin_dir / "amd64\\vcvars64.bat")) - supported_architectures.push_back({L"x64", CPU::X64, CPU::X64}); + supported_architectures.push_back({"x64", CPU::X64, CPU::X64}); if (fs.exists(vs2015_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) - supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64}); + supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64}); if (fs.exists(vs2015_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) - supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM}); + supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM}); if (fs.exists(vs2015_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) - supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86}); + supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86}); if (fs.exists(vs2015_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) - supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM}); + supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM}); if (fs.exists(vs2015_dumpbin_exe)) { @@ -489,15 +491,12 @@ namespace vcpkg if (tsv && vsp) { - const std::wstring w_toolset_version = Strings::to_utf16(*tsv); - const fs::path vs_root_path = *vsp; - Util::stable_keep_if(candidates, [&](const Toolset* t) { - return w_toolset_version == t->version && vs_root_path == t->visual_studio_root_path; - }); + Util::stable_keep_if( + candidates, [&](const Toolset* t) { return *tsv == t->version && *vsp == t->visual_studio_root_path; }); Checks::check_exit(VCPKG_LINE_INFO, !candidates.empty(), "Could not find Visual Studio instace at %s with %s toolset.", - vs_root_path.generic_string(), + vsp->u8string(), *tsv); Checks::check_exit(VCPKG_LINE_INFO, candidates.size() == 1); @@ -506,8 +505,7 @@ namespace vcpkg if (tsv) { - const std::wstring w_toolset_version = Strings::to_utf16(*tsv); - Util::stable_keep_if(candidates, [&](const Toolset* t) { return w_toolset_version == t->version; }); + Util::stable_keep_if(candidates, [&](const Toolset* t) { return *tsv == t->version; }); Checks::check_exit( VCPKG_LINE_INFO, !candidates.empty(), "Could not find Visual Studio instace with %s toolset.", *tsv); } -- cgit v1.2.3 From ced047ad78734aed239669a0fd9eca9e81718966 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 13:50:28 -0700 Subject: Remove usages of CWStringView, except in Strings::to_utf8() --- toolsrc/include/vcpkg/base/cstringview.h | 89 +++++++++++--------------------- toolsrc/include/vcpkg/base/strings.h | 4 +- toolsrc/include/vcpkg/base/system.h | 7 +-- toolsrc/include/vcpkg/metrics.h | 2 +- toolsrc/src/vcpkg/base/strings.cpp | 4 +- toolsrc/src/vcpkg/base/system.cpp | 26 ++++++---- toolsrc/src/vcpkg/commands.edit.cpp | 13 +++-- toolsrc/src/vcpkg/metrics.cpp | 8 +-- 8 files changed, 62 insertions(+), 91 deletions(-) diff --git a/toolsrc/include/vcpkg/base/cstringview.h b/toolsrc/include/vcpkg/base/cstringview.h index eac204f97..342455402 100644 --- a/toolsrc/include/vcpkg/base/cstringview.h +++ b/toolsrc/include/vcpkg/base/cstringview.h @@ -5,94 +5,65 @@ namespace vcpkg { - template - struct BasicCStringView + struct CStringView { - constexpr BasicCStringView() : cstr(nullptr) {} - constexpr BasicCStringView(const CharType* cstr) : cstr(cstr) {} - constexpr BasicCStringView(const BasicCStringView&) = default; - BasicCStringView(const std::basic_string& str) : cstr(str.c_str()) {} + constexpr CStringView() : cstr(nullptr) {} + constexpr CStringView(const char* cstr) : cstr(cstr) {} + constexpr CStringView(const CStringView&) = default; + CStringView(const std::string& str) : cstr(str.c_str()) {} - constexpr const CharType* c_str() const { return cstr; } + constexpr const char* c_str() const { return cstr; } private: - const CharType* cstr; + const char* cstr; + }; + + struct CWStringView + { + constexpr CWStringView() : cstr(nullptr) {} + constexpr CWStringView(const wchar_t* cstr) : cstr(cstr) {} + constexpr CWStringView(const CWStringView&) = default; + CWStringView(const std::wstring& str) : cstr(str.c_str()) {} + + constexpr const wchar_t* c_str() const { return cstr; } + + private: + const wchar_t* cstr; }; namespace details { inline bool vcpkg_strcmp(const char* l, const char* r) { return strcmp(l, r) == 0; } - inline bool vcpkg_strcmp(const wchar_t* l, const wchar_t* r) { return wcscmp(l, r) == 0; } } - template - bool operator==(const BasicCStringView& l, const BasicCStringView& r) + inline bool operator==(const CStringView& l, const CStringView& r) { return details::vcpkg_strcmp(l.c_str(), r.c_str()); } - template - bool operator==(const CharType* l, const BasicCStringView& r) - { - return details::vcpkg_strcmp(l, r.c_str()); - } + inline bool operator==(const char* l, const CStringView& r) { return details::vcpkg_strcmp(l, r.c_str()); } - template - bool operator==(const BasicCStringView& r, const CharType* l) - { - return details::vcpkg_strcmp(l, r.c_str()); - } + inline bool operator==(const CStringView& r, const char* l) { return details::vcpkg_strcmp(l, r.c_str()); } - template - bool operator==(const std::basic_string& l, const BasicCStringView& r) - { - return l == r.c_str(); - } + inline bool operator==(const std::string& l, const CStringView& r) { return l == r.c_str(); } - template - bool operator==(const BasicCStringView& r, const std::basic_string& l) - { - return l == r.c_str(); - } + inline bool operator==(const CStringView& r, const std::string& l) { return l == r.c_str(); } // notequals - template - bool operator!=(const BasicCStringView& l, const BasicCStringView& r) + inline bool operator!=(const CStringView& l, const CStringView& r) { return !details::vcpkg_strcmp(l.c_str(), r.c_str()); } - template - bool operator!=(const CharType* l, const BasicCStringView& r) - { - return !details::vcpkg_strcmp(l, r.c_str()); - } - - template - bool operator!=(const BasicCStringView& r, const CharType* l) - { - return !details::vcpkg_strcmp(l, r.c_str()); - } + inline bool operator!=(const char* l, const CStringView& r) { return !details::vcpkg_strcmp(l, r.c_str()); } - template - bool operator!=(const BasicCStringView& r, const std::basic_string& l) - { - return l != r.c_str(); - } + inline bool operator!=(const CStringView& r, const char* l) { return !details::vcpkg_strcmp(l, r.c_str()); } - template - bool operator!=(const std::basic_string& l, const BasicCStringView& r) - { - return l != r.c_str(); - } + inline bool operator!=(const CStringView& r, const std::string& l) { return l != r.c_str(); } - using CStringView = BasicCStringView; - using CWStringView = BasicCStringView; + inline bool operator!=(const std::string& l, const CStringView& r) { return l != r.c_str(); } inline const char* to_printf_arg(const CStringView string_view) { return string_view.c_str(); } - inline const wchar_t* to_wprintf_arg(const CWStringView string_view) { return string_view.c_str(); } - static_assert(sizeof(CStringView) == sizeof(void*), "CStringView must be a simple wrapper around char*"); - static_assert(sizeof(CWStringView) == sizeof(void*), "CWStringView must be a simple wrapper around wchar_t*"); } diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 93b36a29d..4adcadb0d 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -47,9 +47,9 @@ namespace vcpkg::Strings return details::wformat_internal(fmtstr, to_wprintf_arg(to_wprintf_arg(args))...); } - std::wstring to_utf16(const CStringView s); + std::wstring to_utf16(const CStringView& s); - std::string to_utf8(const CWStringView w); + std::string to_utf8(const CWStringView& w); std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern); diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index f2344c919..b396ef293 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -4,7 +4,6 @@ #include #include - namespace vcpkg::System { tm get_current_date_time(); @@ -64,9 +63,7 @@ namespace vcpkg::System Optional get_environment_variable(const CStringView varname) noexcept; - Optional get_registry_string(void* base_hkey, - const CWStringView subkey, - const CWStringView valuename); + Optional get_registry_string(void* base_hkey, const CStringView subkey, const CStringView valuename); enum class CPUArchitecture { @@ -76,7 +73,7 @@ namespace vcpkg::System ARM64, }; - Optional to_cpu_architecture(CStringView arch); + Optional to_cpu_architecture(const CStringView& arch); CPUArchitecture get_host_processor(); diff --git a/toolsrc/include/vcpkg/metrics.h b/toolsrc/include/vcpkg/metrics.h index 41be5002d..d570624eb 100644 --- a/toolsrc/include/vcpkg/metrics.h +++ b/toolsrc/include/vcpkg/metrics.h @@ -23,6 +23,6 @@ namespace vcpkg::Metrics extern Util::LockGuarded g_metrics; - std::wstring get_SQM_user(); + std::string get_SQM_user(); bool get_compiled_metrics_enabled(); } diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index fa04279b9..160aa98e9 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -72,7 +72,7 @@ namespace vcpkg::Strings::details namespace vcpkg::Strings { - std::wstring to_utf16(const CStringView s) + std::wstring to_utf16(const CStringView& s) { #if defined(_WIN32) const int size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); @@ -85,7 +85,7 @@ namespace vcpkg::Strings #endif } - std::string to_utf8(const CWStringView w) + std::string to_utf8(const CWStringView& w) { #if defined(_WIN32) const int size = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, nullptr, 0, nullptr, nullptr); diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index e92d06f6e..730b22c43 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -38,7 +38,7 @@ namespace vcpkg::System #endif } - Optional to_cpu_architecture(CStringView arch) + Optional to_cpu_architecture(const CStringView& arch) { if (Strings::case_insensitive_ascii_equals(arch, "x86")) return CPUArchitecture::X86; if (Strings::case_insensitive_ascii_equals(arch, "x64")) return CPUArchitecture::X64; @@ -153,7 +153,7 @@ namespace vcpkg::System memset(&process_info, 0, sizeof(PROCESS_INFORMATION)); // Basically we are wrapping it in quotes - std::string actual_cmd_line = Strings::format(R"###(cmd.exe /c "%s")###", cmd_line); + const std::string actual_cmd_line = Strings::format(R"###(cmd.exe /c "%s")###", cmd_line); Debug::println("CreateProcessW(%s)", actual_cmd_line); bool succeeded = TRUE == CreateProcessW(nullptr, Strings::to_utf16(actual_cmd_line).data(), @@ -331,35 +331,39 @@ namespace vcpkg::System } #if defined(_WIN32) - static bool is_string_keytype(DWORD hkey_type) + static bool is_string_keytype(const DWORD hkey_type) { return hkey_type == REG_SZ || hkey_type == REG_MULTI_SZ || hkey_type == REG_EXPAND_SZ; } - Optional get_registry_string(void* base_hkey, - const CWStringView sub_key, - const CWStringView valuename) + Optional get_registry_string(void* base_hkey, const CStringView sub_key, const CStringView valuename) { HKEY k = nullptr; - const LSTATUS ec = RegOpenKeyExW(reinterpret_cast(base_hkey), sub_key.c_str(), NULL, KEY_READ, &k); + const LSTATUS ec = + RegOpenKeyExW(reinterpret_cast(base_hkey), Strings::to_utf16(sub_key).c_str(), NULL, KEY_READ, &k); if (ec != ERROR_SUCCESS) return nullopt; DWORD dw_buffer_size = 0; DWORD dw_type = 0; - auto rc = RegQueryValueExW(k, valuename.c_str(), nullptr, &dw_type, nullptr, &dw_buffer_size); + auto rc = + RegQueryValueExW(k, Strings::to_utf16(valuename).c_str(), nullptr, &dw_type, nullptr, &dw_buffer_size); if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size == 0 || dw_buffer_size % sizeof(wchar_t) != 0) return nullopt; std::wstring ret; ret.resize(dw_buffer_size / sizeof(wchar_t)); - rc = RegQueryValueExW( - k, valuename.c_str(), nullptr, &dw_type, reinterpret_cast(ret.data()), &dw_buffer_size); + rc = RegQueryValueExW(k, + Strings::to_utf16(valuename).c_str(), + nullptr, + &dw_type, + reinterpret_cast(ret.data()), + &dw_buffer_size); if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size != sizeof(wchar_t) * ret.size()) return nullopt; ret.pop_back(); // remove extra trailing null byte - return ret; + return Strings::to_utf8(ret); } #else Optional get_registry_string(void* base_hkey, diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index fe6f76bd2..668ec9b1a 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -3,25 +3,24 @@ #include #include #include -#include #include namespace vcpkg::Commands::Edit { static std::vector find_from_registry() { - static const std::array REGKEYS = { - LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", - LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1287CAD5-7C8D-410D-88B9-0D1EE4A83FF2}_is1)", - LR"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", + static const std::array REGKEYS = { + R"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", + R"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1287CAD5-7C8D-410D-88B9-0D1EE4A83FF2}_is1)", + R"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", }; std::vector output; #if defined(_WIN32) for (auto&& keypath : REGKEYS) { - const Optional code_installpath = - System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, L"InstallLocation"); + const Optional code_installpath = + System::get_registry_string(HKEY_LOCAL_MACHINE, keypath, "InstallLocation"); if (const auto c = code_installpath.get()) { const fs::path install_path = fs::path(*c); diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 854baa0ca..c93d47d6e 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -233,14 +233,14 @@ namespace vcpkg::Metrics bool get_compiled_metrics_enabled() { return DISABLE_METRICS == 0; } - std::wstring get_SQM_user() + std::string get_SQM_user() { #if defined(_WIN32) auto hkcu_sqmclient = - System::get_registry_string(HKEY_CURRENT_USER, LR"(Software\Microsoft\SQMClient)", L"UserId"); - return hkcu_sqmclient.value_or(L"{}"); + System::get_registry_string(HKEY_CURRENT_USER, R"(Software\Microsoft\SQMClient)", "UserId"); + return hkcu_sqmclient.value_or("{}"); #else - return L"{}"; + return "{}"; #endif } -- cgit v1.2.3 From c797ab4794b022f9f2a53f9a80bd6a451bd6d1ee Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 13:52:35 -0700 Subject: Remove Strings::wformat() --- toolsrc/include/vcpkg/base/strings.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 4adcadb0d..6a4d4ef08 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -17,18 +17,12 @@ namespace vcpkg::Strings::details inline const char* to_printf_arg(const char* s) { return s; } template::value>> - inline T to_printf_arg(T s) + T to_printf_arg(T s) { return s; } std::string format_internal(const char* fmtstr, ...); - - inline const wchar_t* to_wprintf_arg(const std::wstring& s) { return s.c_str(); } - - inline const wchar_t* to_wprintf_arg(const wchar_t* s) { return s; } - - std::wstring wformat_internal(const wchar_t* fmtstr, ...); } namespace vcpkg::Strings @@ -40,13 +34,6 @@ namespace vcpkg::Strings return details::format_internal(fmtstr, to_printf_arg(to_printf_arg(args))...); } - template - std::wstring wformat(const wchar_t* fmtstr, const Args&... args) - { - using vcpkg::Strings::details::to_wprintf_arg; - return details::wformat_internal(fmtstr, to_wprintf_arg(to_wprintf_arg(args))...); - } - std::wstring to_utf16(const CStringView& s); std::string to_utf8(const CWStringView& w); -- cgit v1.2.3 From 61777425db2c5f59eb3a44f4439b734c27932cba Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 13:54:38 -0700 Subject: Remove CharType template paramter from Strings::join() --- toolsrc/include/vcpkg/base/strings.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 6a4d4ef08..d263e3b6b 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -48,18 +48,18 @@ namespace vcpkg::Strings bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern); - template - std::basic_string join(const CharType* delimiter, const Container& v, Transformer transformer) + template + std::string join(const char* delimiter, const Container& v, Transformer transformer) { const auto begin = v.begin(); const auto end = v.end(); if (begin == end) { - return std::basic_string(); + return std::string(); } - std::basic_string output; + std::string output; output.append(transformer(*begin)); for (auto it = std::next(begin); it != end; ++it) { @@ -69,8 +69,8 @@ namespace vcpkg::Strings return output; } - template - std::basic_string join(const CharType* delimiter, const Container& v) + template + std::string join(const char* delimiter, const Container& v) { using Element = decltype(*v.begin()); return join(delimiter, v, [](const Element& x) -> const Element& { return x; }); -- cgit v1.2.3 From 70b458f5d97d5c189379b3d6b8913b27a2878661 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 13:56:05 -0700 Subject: Remove Metrics::track_property(std::wstring) --- toolsrc/include/vcpkg/metrics.h | 1 - toolsrc/src/vcpkg/metrics.cpp | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/toolsrc/include/vcpkg/metrics.h b/toolsrc/include/vcpkg/metrics.h index d570624eb..f73c636cf 100644 --- a/toolsrc/include/vcpkg/metrics.h +++ b/toolsrc/include/vcpkg/metrics.h @@ -15,7 +15,6 @@ namespace vcpkg::Metrics void track_metric(const std::string& name, double value); void track_property(const std::string& name, const std::string& value); - void track_property(const std::string& name, const std::wstring& value); void upload(const std::string& payload); void flush(); diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index c93d47d6e..8f2575886 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -262,17 +262,6 @@ namespace vcpkg::Metrics void Metrics::track_metric(const std::string& name, double value) { g_metricmessage.track_metric(name, value); } - void Metrics::track_property(const std::string& name, const std::wstring& value) - { - // Note: this is not valid UTF-16 -> UTF-8, it just yields a close enough approximation for our purposes. - std::string converted_value; - converted_value.resize(value.size()); - std::transform( - value.begin(), value.end(), converted_value.begin(), [](wchar_t ch) { return static_cast(ch); }); - - g_metricmessage.track_property(name, converted_value); - } - void Metrics::track_property(const std::string& name, const std::string& value) { g_metricmessage.track_property(name, value); -- cgit v1.2.3 From fdc6b1ea1a59910df19962e0161b593c948abe98 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 13:57:07 -0700 Subject: Remove wformat_internal() --- toolsrc/src/vcpkg/base/strings.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 160aa98e9..af41eed9a 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -44,30 +44,6 @@ namespace vcpkg::Strings::details return output; } - - std::wstring wformat_internal(const wchar_t* fmtstr, ...) - { - va_list args; - va_start(args, fmtstr); - -#if defined(_WIN32) - const int sz = _vscwprintf_l(fmtstr, c_locale(), args); -#else - const int sz = vswprintf(nullptr, 0, fmtstr, args); -#endif - Checks::check_exit(VCPKG_LINE_INFO, sz > 0); - - std::wstring output(sz, L'\0'); - -#if defined(_WIN32) - _vsnwprintf_s_l(&output.at(0), output.size() + 1, output.size(), fmtstr, c_locale(), args); -#else - vswprintf(&output.at(0), output.size() + 1, fmtstr, args); -#endif - va_end(args); - - return output; - } } namespace vcpkg::Strings -- cgit v1.2.3 From dfe1f880d4e2a7f23d3b43d42a5d6ac2d68dc135 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 14:22:20 -0700 Subject: [system.cpp] Remove usage of std::wstring. Convert at the last step --- toolsrc/src/vcpkg/base/system.cpp | 102 +++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 52 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 730b22c43..ac527f9fc 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -79,71 +79,71 @@ namespace vcpkg::System static const 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::vector env_wstrings = { - L"ALLUSERSPROFILE", - L"APPDATA", - L"CommonProgramFiles", - L"CommonProgramFiles(x86)", - L"CommonProgramW6432", - L"COMPUTERNAME", - L"ComSpec", - L"HOMEDRIVE", - L"HOMEPATH", - L"LOCALAPPDATA", - L"LOGONSERVER", - L"NUMBER_OF_PROCESSORS", - L"OS", - L"PATHEXT", - L"PROCESSOR_ARCHITECTURE", - L"PROCESSOR_ARCHITEW6432", - L"PROCESSOR_IDENTIFIER", - L"PROCESSOR_LEVEL", - L"PROCESSOR_REVISION", - L"ProgramData", - L"ProgramFiles", - L"ProgramFiles(x86)", - L"ProgramW6432", - L"PROMPT", - L"PSModulePath", - L"PUBLIC", - L"SystemDrive", - L"SystemRoot", - L"TEMP", - L"TMP", - L"USERDNSDOMAIN", - L"USERDOMAIN", - L"USERDOMAIN_ROAMINGPROFILE", - L"USERNAME", - L"USERPROFILE", - L"windir", + std::vector env_wstrings = { + "ALLUSERSPROFILE", + "APPDATA", + "CommonProgramFiles", + "CommonProgramFiles(x86)", + "CommonProgramW6432", + "COMPUTERNAME", + "ComSpec", + "HOMEDRIVE", + "HOMEPATH", + "LOCALAPPDATA", + "LOGONSERVER", + "NUMBER_OF_PROCESSORS", + "OS", + "PATHEXT", + "PROCESSOR_ARCHITECTURE", + "PROCESSOR_ARCHITEW6432", + "PROCESSOR_IDENTIFIER", + "PROCESSOR_LEVEL", + "PROCESSOR_REVISION", + "ProgramData", + "ProgramFiles", + "ProgramFiles(x86)", + "ProgramW6432", + "PROMPT", + "PSModulePath", + "PUBLIC", + "SystemDrive", + "SystemRoot", + "TEMP", + "TMP", + "USERDNSDOMAIN", + "USERDOMAIN", + "USERDOMAIN_ROAMINGPROFILE", + "USERNAME", + "USERPROFILE", + "windir", // Enables proxy information to be passed to Curl, the underlying download library in cmake.exe - L"HTTP_PROXY", - L"HTTPS_PROXY", + "HTTP_PROXY", + "HTTPS_PROXY", // Enables find_package(CUDA) in CMake - L"CUDA_PATH", + "CUDA_PATH", // Environmental variable generated automatically by CUDA after installation - L"NVCUDASAMPLES_ROOT", + "NVCUDASAMPLES_ROOT", }; // Flush stdout before launching external process fflush(nullptr); - std::wstring env_cstr; + std::string env_cstr; for (auto&& env_wstring : env_wstrings) { - const Optional value = System::get_environment_variable(Strings::to_utf8(env_wstring)); + const Optional value = System::get_environment_variable(env_wstring); const auto v = value.get(); if (!v || v->empty()) continue; env_cstr.append(env_wstring); - env_cstr.push_back(L'='); - env_cstr.append(Strings::to_utf16(*v)); - env_cstr.push_back(L'\0'); + env_cstr.push_back('='); + env_cstr.append(*v); + env_cstr.push_back('\0'); } - env_cstr.append(Strings::to_utf16(NEW_PATH)); - env_cstr.push_back(L'\0'); + env_cstr.append(NEW_PATH); + env_cstr.push_back('\0'); STARTUPINFOW startup_info; memset(&startup_info, 0, sizeof(STARTUPINFOW)); @@ -161,7 +161,7 @@ namespace vcpkg::System nullptr, FALSE, BELOW_NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT, - env_cstr.data(), + Strings::to_utf16(env_cstr).data(), nullptr, &startup_info, &process_info); @@ -366,9 +366,7 @@ namespace vcpkg::System return Strings::to_utf8(ret); } #else - Optional get_registry_string(void* base_hkey, - const CWStringView sub_key, - const CWStringView valuename) + Optional get_registry_string(void* base_hkey, const CStringView sub_key, const CStringView valuename) { return nullopt; } -- cgit v1.2.3 From 558dcb32ca4ef43c35570794bf4cc4fc46f4af6c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 15:09:02 -0700 Subject: Revert "[system.cpp] Remove usage of std::wstring. Convert at the last step" This reverts commit dfe1f880d4e2a7f23d3b43d42a5d6ac2d68dc135. --- toolsrc/src/vcpkg/base/system.cpp | 102 +++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index ac527f9fc..730b22c43 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -79,71 +79,71 @@ namespace vcpkg::System static const 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::vector env_wstrings = { - "ALLUSERSPROFILE", - "APPDATA", - "CommonProgramFiles", - "CommonProgramFiles(x86)", - "CommonProgramW6432", - "COMPUTERNAME", - "ComSpec", - "HOMEDRIVE", - "HOMEPATH", - "LOCALAPPDATA", - "LOGONSERVER", - "NUMBER_OF_PROCESSORS", - "OS", - "PATHEXT", - "PROCESSOR_ARCHITECTURE", - "PROCESSOR_ARCHITEW6432", - "PROCESSOR_IDENTIFIER", - "PROCESSOR_LEVEL", - "PROCESSOR_REVISION", - "ProgramData", - "ProgramFiles", - "ProgramFiles(x86)", - "ProgramW6432", - "PROMPT", - "PSModulePath", - "PUBLIC", - "SystemDrive", - "SystemRoot", - "TEMP", - "TMP", - "USERDNSDOMAIN", - "USERDOMAIN", - "USERDOMAIN_ROAMINGPROFILE", - "USERNAME", - "USERPROFILE", - "windir", + std::vector env_wstrings = { + L"ALLUSERSPROFILE", + L"APPDATA", + L"CommonProgramFiles", + L"CommonProgramFiles(x86)", + L"CommonProgramW6432", + L"COMPUTERNAME", + L"ComSpec", + L"HOMEDRIVE", + L"HOMEPATH", + L"LOCALAPPDATA", + L"LOGONSERVER", + L"NUMBER_OF_PROCESSORS", + L"OS", + L"PATHEXT", + L"PROCESSOR_ARCHITECTURE", + L"PROCESSOR_ARCHITEW6432", + L"PROCESSOR_IDENTIFIER", + L"PROCESSOR_LEVEL", + L"PROCESSOR_REVISION", + L"ProgramData", + L"ProgramFiles", + L"ProgramFiles(x86)", + L"ProgramW6432", + L"PROMPT", + L"PSModulePath", + L"PUBLIC", + L"SystemDrive", + L"SystemRoot", + L"TEMP", + L"TMP", + L"USERDNSDOMAIN", + L"USERDOMAIN", + L"USERDOMAIN_ROAMINGPROFILE", + L"USERNAME", + L"USERPROFILE", + L"windir", // Enables proxy information to be passed to Curl, the underlying download library in cmake.exe - "HTTP_PROXY", - "HTTPS_PROXY", + L"HTTP_PROXY", + L"HTTPS_PROXY", // Enables find_package(CUDA) in CMake - "CUDA_PATH", + L"CUDA_PATH", // Environmental variable generated automatically by CUDA after installation - "NVCUDASAMPLES_ROOT", + L"NVCUDASAMPLES_ROOT", }; // Flush stdout before launching external process fflush(nullptr); - std::string env_cstr; + std::wstring env_cstr; for (auto&& env_wstring : env_wstrings) { - const Optional value = System::get_environment_variable(env_wstring); + const Optional value = System::get_environment_variable(Strings::to_utf8(env_wstring)); const auto v = value.get(); if (!v || v->empty()) continue; env_cstr.append(env_wstring); - env_cstr.push_back('='); - env_cstr.append(*v); - env_cstr.push_back('\0'); + env_cstr.push_back(L'='); + env_cstr.append(Strings::to_utf16(*v)); + env_cstr.push_back(L'\0'); } - env_cstr.append(NEW_PATH); - env_cstr.push_back('\0'); + env_cstr.append(Strings::to_utf16(NEW_PATH)); + env_cstr.push_back(L'\0'); STARTUPINFOW startup_info; memset(&startup_info, 0, sizeof(STARTUPINFOW)); @@ -161,7 +161,7 @@ namespace vcpkg::System nullptr, FALSE, BELOW_NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT, - Strings::to_utf16(env_cstr).data(), + env_cstr.data(), nullptr, &startup_info, &process_info); @@ -366,7 +366,9 @@ namespace vcpkg::System return Strings::to_utf8(ret); } #else - Optional get_registry_string(void* base_hkey, const CStringView sub_key, const CStringView valuename) + Optional get_registry_string(void* base_hkey, + const CWStringView sub_key, + const CWStringView valuename) { return nullopt; } -- cgit v1.2.3 From e5867d1d63606cef5c53a764e31ce05385f36497 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 15:26:28 -0700 Subject: CWStringView->CStringView, std::wstring->std::string --- toolsrc/src/vcpkg/base/system.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 730b22c43..b04f79414 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -366,9 +366,7 @@ namespace vcpkg::System return Strings::to_utf8(ret); } #else - Optional get_registry_string(void* base_hkey, - const CWStringView sub_key, - const CWStringView valuename) + Optional get_registry_string(void* base_hkey, const CStringView sub_key, const CStringView valuename) { return nullopt; } -- cgit v1.2.3 From fb1f5f87fb0cbb666882586271581d57c5e0ef76 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 15:37:14 -0700 Subject: Add timer to `vcpkg build` --- toolsrc/src/vcpkg/build.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 3d3bcb5fe..cf16c8f9c 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -69,7 +69,10 @@ namespace vcpkg::Build::Command const Build::BuildPackageConfig build_config{ *scf->core_paragraph, spec.triplet(), paths.port_dir(spec), build_package_options}; + const auto build_timer = Chrono::ElapsedTime::create_started(); const auto result = Build::build_package(paths, build_config, status_db); + System::println("Elapsed time for package %s: %s", spec.to_string(), build_timer.to_string()); + if (result.code == BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES) { System::println(System::Color::error, -- cgit v1.2.3 From 374253cb1b12a60925693130132f1a6ab6c3a83a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 15:39:41 -0700 Subject: [ninja] Update to 1.8.2 --- 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 51e394bf1..b81675c13 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -101,11 +101,11 @@ function(vcpkg_find_acquire_program VAR) set(HASH 556f95f7566fe23704d136239e4cf5e2a26f939ab43b44145c91b70d031a088d553e5c21301f1242a2295dcde3143b356211f0108c68e65eef8572407618326d) elseif(VAR MATCHES "NINJA") set(PROGNAME ninja) - set(SUBDIR "ninja-1.7.2") + set(SUBDIR "ninja-1.8.2") set(PATHS ${DOWNLOADS}/tools/ninja/${SUBDIR}) - set(URL "https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip") - set(ARCHIVE "ninja-win.zip") - set(HASH cccab9281b274c564f9ad77a2115be1f19be67d7b2ee14a55d1db1b27f3b68db8e76076e4f804b61eb8e573e26a8ecc9985675a8dcf03fd7a77b7f57234f1393) + 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 "MESON") set(PROGNAME meson) set(REQUIRED_INTERPRETER PYTHON3) -- cgit v1.2.3 From e8f64049cf5d4b2f1b76bab49d5134bdd0dff1ea Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 17:02:59 -0700 Subject: Fix getWindowsSDK.ps1 error when $path is $null --- scripts/getWindowsSDK.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 index 8ef26a436..ed2fd11c7 100644 --- a/scripts/getWindowsSDK.ps1 +++ b/scripts/getWindowsSDK.ps1 @@ -19,6 +19,11 @@ $validInstances = New-Object System.Collections.ArrayList # Windows 10 SDK function CheckWindows10SDK($path) { + if ($path -eq $null) + { + return + } + $folder = (Join-Path $path "Include") if (!(Test-Path $folder)) { @@ -64,6 +69,11 @@ CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") # Windows 8.1 SDK function CheckWindows81SDK($path) { + if ($path -eq $null) + { + return + } + $folder = "$path\Include" if (!(Test-Path $folder)) { -- cgit v1.2.3 From 0051e7477be15c9746e9fb2babe15aaec47a7eef Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 17:04:55 -0700 Subject: [findVS] Add detection for VS2015 Build Tools --- scripts/findVisualStudioInstallationInstances.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index b2f186478..8a2adca10 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -32,6 +32,21 @@ foreach ($instance in $asXml.instances.instance) $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null } +# If nothing is found, attempt to find VS2015 Build Tools (not detected by vswhere.exe) +if ($results.Count -eq 0) +{ + $programFiles = & $scriptsDir\getProgramFiles32bit.ps1 + $installationPath = "$programFiles\Microsoft Visual Studio 14.0" + $clExe = "$installationPath\VC\bin\cl.exe" + $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + + if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) + { + return "PreferenceWeight1::Legacy::14.0::$installationPath" + } +} + + $results.Sort() $results.Reverse() -- cgit v1.2.3 From 7ed8d4f75e903fdad4c02b4e784f2f4bcb30a3b0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Oct 2017 17:24:17 -0700 Subject: Don't warn for outdated vcpkg if command is autocomplete --- toolsrc/src/vcpkg.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index e1e2240e7..b4c2d0fe2 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -106,7 +106,11 @@ static void inner(const VcpkgCmdArguments& args) const int exit_code = chdir(paths.root.c_str()); #endif Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed"); - Commands::Version::warn_if_vcpkg_version_mismatch(paths); + + if (args.command != "autocomplete") + { + Commands::Version::warn_if_vcpkg_version_mismatch(paths); + } if (const auto command_function = find_command(Commands::get_available_commands_type_b())) { -- cgit v1.2.3 From dd56066e291545e6885cecb06ef29d6474824fc3 Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 16 Oct 2017 19:31:06 -0500 Subject: FIX: pthreads: also install "pthreads.lib" --- ports/pthreads/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index cabf8a39b..5d7daa792 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -32,3 +32,8 @@ foreach(HEADER ${HEADERS}) endforeach() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads RENAME copyright) +file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/pthreadsVC2.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + RENAME pthreads.lib +) -- cgit v1.2.3 From ea30f9a378a6b9fd04bb03aa298ef80d6bff9b65 Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 16 Oct 2017 19:33:14 -0500 Subject: FIX: typo --- ports/pthreads/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index 5d7daa792..0ed6f672a 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -32,7 +32,7 @@ foreach(HEADER ${HEADERS}) endforeach() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads RENAME copyright) -file(RENAME +file(COPY ${CURRENT_PACKAGES_DIR}/lib/pthreadsVC2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME pthreads.lib -- cgit v1.2.3 From 9153ac76be6654aae436ec0b35942ebb84c6d4e3 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Fri, 13 Oct 2017 17:19:31 +0300 Subject: [folly] Update to version v2017.10.02.00 --- ports/folly/CONTROL | 2 +- ports/folly/fix-MSG_ERRQUEUE.diff | 22 ++++++++++++++++++++++ ports/folly/fix-histogram.diff | 11 +++++++++++ ports/folly/fix-malloc.diff | 12 ++++++++++++ ports/folly/portfile.cmake | 17 +++++++++++++++-- 5 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 ports/folly/fix-MSG_ERRQUEUE.diff create mode 100644 ports/folly/fix-histogram.diff create mode 100644 ports/folly/fix-malloc.diff diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index d8652e657..3bff7ba88 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,4 +1,4 @@ Source: folly -Version: v2017.07.17.01-1 +Version: v2017.10.02.00 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: zlib, openssl, boost, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy diff --git a/ports/folly/fix-MSG_ERRQUEUE.diff b/ports/folly/fix-MSG_ERRQUEUE.diff new file mode 100644 index 000000000..ee3a1215a --- /dev/null +++ b/ports/folly/fix-MSG_ERRQUEUE.diff @@ -0,0 +1,22 @@ +diff --git a/folly/io/async/AsyncSocket.cpp b/folly/io/async/AsyncSocket.cpp +index 7f8c5f13..f77adbc0 100644 +--- a/folly/io/async/AsyncSocket.cpp ++++ b/folly/io/async/AsyncSocket.cpp +@@ -41,7 +41,7 @@ namespace fsp = folly::portability::sockets; + namespace folly { + + static constexpr bool msgErrQueueSupported = +-#ifdef MSG_ERRQUEUE ++#if defined(MSG_ERRQUEUE) && !defined(_WIN32) + true; + #else + false; +@@ -1551,7 +1551,7 @@ void AsyncSocket::handleErrMessages() noexcept { + return; + } + +-#ifdef MSG_ERRQUEUE ++#if defined(MSG_ERRQUEUE) && !defined(_WIN32) + uint8_t ctrl[1024]; + unsigned char data; + struct msghdr msg; diff --git a/ports/folly/fix-histogram.diff b/ports/folly/fix-histogram.diff new file mode 100644 index 000000000..ca92a891e --- /dev/null +++ b/ports/folly/fix-histogram.diff @@ -0,0 +1,11 @@ +--- a/folly/stats/Histogram.h ++++ b/folly/stats/Histogram.h +@@ -485,7 +485,7 @@ + // with /permissive- (the default for the CMake build), so we directly include + // the -defs as if it were -inl, and don't provide the explicit instantiations. + // https://developercommunity.visualstudio.com/content/problem/81223/incorrect-error-c5037-with-permissive.html +-#if defined(_MSC_VER) && _MSC_FULL_VER >= 191125506 && _MSC_FULL_VER < 191125542 ++#if defined(_MSC_VER) && _MSC_FULL_VER >= 191125506 && _MSC_FULL_VER <= 191125547 + #define FOLLY_MSVC_USE_WORKAROUND_FOR_C5037 1 + #else + #define FOLLY_MSVC_USE_WORKAROUND_FOR_C5037 0 diff --git a/ports/folly/fix-malloc.diff b/ports/folly/fix-malloc.diff new file mode 100644 index 000000000..db7a23063 --- /dev/null +++ b/ports/folly/fix-malloc.diff @@ -0,0 +1,12 @@ +--- a/folly/Malloc.h Mon Oct 09 04:35:09 2017 ++++ b/folly/Malloc.h Fri Oct 13 15:31:36 2017 +@@ -189,9 +189,6 @@ + return false; + } + +- /* Avoid optimizing away the malloc. */ +- asm volatile("" ::"m"(ptr) : "memory"); +- + return (origAllocated != *counter); + }(); + diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 1b30ad86c..ba6fcf240 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -2,6 +2,10 @@ if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x64) message(FATAL_ERROR "Folly only supports the x64 architecture.") endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Folly can't link with static libraries.") +endif() + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(STATUS "Warning: Dynamic building not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) @@ -17,11 +21,20 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2017.07.17.01 - SHA512 1529941ebcc9ee3502e4ab07463bb5bc6a397259cbbf1817ac64fd186fd4cd964ffe8b473fe6a432e80632ffa553106a0d3fe2962e860eb409e3391029ed5584 + REF v2017.10.02.00 + SHA512 4fc7840c7a6c528c8ba6a21817bc75f15f5cd5f781d104a1f0622fe1085a6cb26ff9749616b164afff0ea46be6d16877457a98f417e6dbe1044db7605650a6d3 HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH + ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-malloc.diff + ${CMAKE_CURRENT_LIST_DIR}/fix-MSG_ERRQUEUE.diff + ${CMAKE_CURRENT_LIST_DIR}/fix-histogram.diff +) + if(VCPKG_CRT_LINKAGE STREQUAL static) set(MSVC_USE_STATIC_RUNTIME ON) else() -- cgit v1.2.3 From c9d3512088240ab7f8ce15eb89f9e1ea8808e207 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Tue, 17 Oct 2017 03:56:14 +0300 Subject: [folly] Fix static linking gflags and glog --- ports/folly/fix-static-linking.diff | 98 +++++++++++++++++++++++++++++++++++++ ports/folly/portfile.cmake | 5 +- 2 files changed, 99 insertions(+), 4 deletions(-) create mode 100644 ports/folly/fix-static-linking.diff diff --git a/ports/folly/fix-static-linking.diff b/ports/folly/fix-static-linking.diff new file mode 100644 index 000000000..80434faca --- /dev/null +++ b/ports/folly/fix-static-linking.diff @@ -0,0 +1,98 @@ +diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake +index 211c6fbf..fbcbddf0 100755 +--- a/CMake/folly-deps.cmake ++++ b/CMake/folly-deps.cmake +@@ -10,9 +10,26 @@ find_package(Boost 1.55.0 MODULE + thread + REQUIRED + ) ++ + find_package(DoubleConversion MODULE REQUIRED) +-find_package(GFlags MODULE REQUIRED) +-find_package(GLog MODULE REQUIRED) +-find_package(LibEvent MODULE REQUIRED) ++ ++find_package(gflags CONFIG) ++if(NOT TARGET gflags) ++ message(STATUS "MODULE: GFlags") ++ find_package(GFlags MODULE REQUIRED) ++endif() ++ ++find_package(glog CONFIG) ++if(NOT TARGET glog::glog) ++ message(STATUS "MODULE: GLog") ++ find_package(GLog MODULE REQUIRED) ++endif() ++ ++find_package(Libevent CONFIG) ++if(NOT TARGET event) ++ message(STATUS "MODULE: Libevent") ++ find_package(LibEvent MODULE REQUIRED) ++endif() ++ + find_package(OpenSSL MODULE REQUIRED) + find_package(PThread MODULE) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cdc992a8..c0231402 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -141,9 +141,38 @@ set(FOLLY_SHINY_DEPENDENCIES + + set(FOLLY_LINK_LIBRARIES + ${DOUBLE_CONVERSION_LIBRARY} +- ${LIBEVENT_LIB} +- ${LIBGFLAGS_LIBRARY} +- ${LIBGLOG_LIBRARY} ++) ++ ++set(FOLLY_INCLUDE_DIRECTORIES ++ ${DOUBLE_CONVERSION_INCLUDE_DIR} ++) ++ ++if(TARGET gflags_static) ++ set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} gflags_static) ++elseif(TARGET gflags) ++ set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} gflags) ++else() ++ set(FOLLY_LINK_LIBRARIES ${FOLLY_LINK_LIBRARIES} ${LIBGFLAGS_LIBRARY}) ++ set(FOLLY_INCLUDE_DIRECTORIES ${FOLLY_INCLUDE_DIRECTORIES} ${LIBGFLAGS_INCLUDE_DIR}) ++endif() ++ ++if(TARGET glog::glog) ++ set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} glog::glog) ++else() ++ set(FOLLY_LINK_LIBRARIES ${FOLLY_LINK_LIBRARIES} ${LIBGLOG_LIBRARY}) ++ set(FOLLY_INCLUDE_DIRECTORIES ${FOLLY_INCLUDE_DIRECTORIES} ${LIBGLOG_INCLUDE_DIR}) ++endif() ++ ++if(TARGET event) ++ set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} event) ++else() ++ set(FOLLY_LINK_LIBRARIES ${FOLLY_LINK_LIBRARIES} ${LIBEVENT_LIB}) ++ set(FOLLY_INCLUDE_DIRECTORIES ${FOLLY_INCLUDE_DIRECTORIES} ${LIBEVENT_INCLUDE_DIR}) ++endif() ++ ++ ++set(FOLLY_LINK_LIBRARIES ++ ${FOLLY_LINK_LIBRARIES} + Iphlpapi.lib + Ws2_32.lib + +@@ -152,15 +181,12 @@ set(FOLLY_LINK_LIBRARIES + + target_include_directories(folly_base + PUBLIC +- ${DOUBLE_CONVERSION_INCLUDE_DIR} +- ${LIBGFLAGS_INCLUDE_DIR} +- ${LIBGLOG_INCLUDE_DIR} +- ${LIBEVENT_INCLUDE_DIR} +- $ ++ ${FOLLY_INCLUDE_DIRECTORIES} + ) + + foreach (LIB ${FOLLY_SHINY_DEPENDENCIES}) + target_include_directories(folly_base PUBLIC $) ++ target_compile_definitions(folly_base PUBLIC $) + endforeach() + + if (FOLLY_HAVE_PTHREAD) diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index ba6fcf240..8a48ee85d 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -2,10 +2,6 @@ if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x64) message(FATAL_ERROR "Folly only supports the x64 architecture.") endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Folly can't link with static libraries.") -endif() - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(STATUS "Warning: Dynamic building not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) @@ -30,6 +26,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-static-linking.diff ${CMAKE_CURRENT_LIST_DIR}/fix-malloc.diff ${CMAKE_CURRENT_LIST_DIR}/fix-MSG_ERRQUEUE.diff ${CMAKE_CURRENT_LIST_DIR}/fix-histogram.diff -- cgit v1.2.3 From bc959ccd8b8277acdbad869a753f074f8f8a0a4d Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 16 Oct 2017 20:44:37 -0500 Subject: FIX: switch to install --- ports/pthreads/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index 0ed6f672a..d07e23ef4 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -32,7 +32,7 @@ foreach(HEADER ${HEADERS}) endforeach() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads RENAME copyright) -file(COPY +file(INSTALL ${CURRENT_PACKAGES_DIR}/lib/pthreadsVC2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME pthreads.lib -- cgit v1.2.3 From 4259fc14849d5671c56d0ecb030d69feee1cee70 Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 16 Oct 2017 20:49:13 -0500 Subject: FIX: also install the debug library --- ports/pthreads/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index d07e23ef4..cda6efb32 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -37,3 +37,8 @@ file(INSTALL DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME pthreads.lib ) +file(INSTALL + ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadsVC2d.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + RENAME pthreads.lib +) -- cgit v1.2.3 From 62b62d9f35cfb1e81971f56d4f33f369ed9af53c Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 17 Oct 2017 20:02:26 +1100 Subject: minor clean up and configuration --- ports/qt5base/install_qt.cmake | 30 +++++++++-------- ports/qt5base/portfile.cmake | 5 +++ ports/qt5base/qt_debug.conf | 2 +- ports/qt5base/qt_release.conf | 2 +- ports/qt5docs/CONTROL | 4 --- ports/qt5docs/portfile.cmake | 40 ----------------------- ports/qt5tools/portfile.cmake | 5 +-- scripts/cmake/vcpkg_configure_qmake_release.cmake | 1 - 8 files changed, 24 insertions(+), 65 deletions(-) delete mode 100644 ports/qt5docs/CONTROL delete mode 100644 ports/qt5docs/portfile.cmake diff --git a/ports/qt5base/install_qt.cmake b/ports/qt5base/install_qt.cmake index 922303aba..37528e4e6 100644 --- a/ports/qt5base/install_qt.cmake +++ b/ports/qt5base/install_qt.cmake @@ -13,6 +13,20 @@ function(install_qt) set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") set(_path "$ENV{PATH}") + message(STATUS "Package ${TARGET_TRIPLET}-dbg") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/bin;${_path}") + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME package-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Package ${TARGET_TRIPLET}-dbg done") + message(STATUS "Package ${TARGET_TRIPLET}-rel") set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${_path}") vcpkg_execute_required_process( @@ -26,19 +40,7 @@ function(install_qt) LOGNAME package-${TARGET_TRIPLET}-rel ) message(STATUS "Package ${TARGET_TRIPLET}-rel done") - - message(STATUS "Package ${TARGET_TRIPLET}-dbg") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/bin;${_path}") - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME build-${TARGET_TRIPLET}-dbg - ) - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME package-${TARGET_TRIPLET}-dbg - ) + set(ENV{PATH} "${_path}") - message(STATUS "Package ${TARGET_TRIPLET}-dbg done") + endfunction() \ No newline at end of file diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake index 5368c3a4a..623ff29c2 100644 --- a/ports/qt5base/portfile.cmake +++ b/ports/qt5base/portfile.cmake @@ -80,6 +80,11 @@ file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) file(REMOVE ${BINARY_TOOLS}) +set(QT_DEBUG_PREFIX_PATH ${CURRENT_INSTALLED_DIR}) +set(QT_RELEASE_PREFIX_PATH ${CURRENT_INSTALLED_DIR}) +configure_file(${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/qt.conf) +configure_file(${CMAKE_CURRENT_LIST_DIR}/qt_release.conf ${CURRENT_PACKAGES_DIR}/tools/qt5/qt.conf) + vcpkg_execute_required_process( COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cmake diff --git a/ports/qt5base/qt_debug.conf b/ports/qt5base/qt_debug.conf index 96e4a2a4d..3bed4b725 100644 --- a/ports/qt5base/qt_debug.conf +++ b/ports/qt5base/qt_debug.conf @@ -1,5 +1,5 @@ [Paths] -Prefix = C:/vcpkg/installed/x64-windows +Prefix = ${QT_DEBUG_PREFIX_PATH} Documentation = share/qt5/debug/doc Headers = share/qt5/debug/include Libraries = debug/lib diff --git a/ports/qt5base/qt_release.conf b/ports/qt5base/qt_release.conf index ddd9d1880..99356fc26 100644 --- a/ports/qt5base/qt_release.conf +++ b/ports/qt5base/qt_release.conf @@ -1,5 +1,5 @@ [Paths] -Prefix = C:/vcpkg/installed/x64-windows +Prefix = ${QT_RELEASE_PREFIX_PATH} Documentation = share/qt5/doc Headers = include Libraries = lib diff --git a/ports/qt5docs/CONTROL b/ports/qt5docs/CONTROL deleted file mode 100644 index 32d85ef37..000000000 --- a/ports/qt5docs/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5docs -Version: 5.9.2-0 -Description: Qt5 Documentation -Build-Depends: qt5base, qt5tools \ No newline at end of file diff --git a/ports/qt5docs/portfile.cmake b/ports/qt5docs/portfile.cmake deleted file mode 100644 index 6b177dda1..000000000 --- a/ports/qt5docs/portfile.cmake +++ /dev/null @@ -1,40 +0,0 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) - message(WARNING "Qt5'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() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtdoc-5.9.2") -set(ARCHIVE_NAME "qtdoc-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 9352856d5ef48afa28771f05cbf5bc7b3a49181b4696bd018a8294cbfc3a6d25de6625830f0ba776689deb098d7eb549dd19b362cbb5ecfda1b2d6d2e15ef43f -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -vcpkg_build_qmake_release( - TARGETS docs -) diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake index ebcdb6b12..84c00d0c8 100644 --- a/ports/qt5tools/portfile.cmake +++ b/ports/qt5tools/portfile.cmake @@ -82,7 +82,4 @@ file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright) - -#touch an empty include file - qt tools does not create any and this is an error in vcpkg -file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright) \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_qmake_release.cmake b/scripts/cmake/vcpkg_configure_qmake_release.cmake index 8ab5340e9..cf9eacbd5 100644 --- a/scripts/cmake/vcpkg_configure_qmake_release.cmake +++ b/scripts/cmake/vcpkg_configure_qmake_release.cmake @@ -22,7 +22,6 @@ function(vcpkg_configure_qmake_release) # Find qmake exectuable find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) - if(NOT QMAKE_COMMAND) message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") endif() -- cgit v1.2.3 From ddc421acbc8bc9dd1d448190ac173b9d11e942dd Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 17 Oct 2017 20:23:20 +1100 Subject: update descriptions --- ports/qt5base/CONTROL | 2 +- ports/qt5declarative/CONTROL | 2 +- ports/qt5tools/CONTROL | 2 +- ports/qt5winextras/CONTROL | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/qt5base/CONTROL b/ports/qt5base/CONTROL index 0b9e4792a..79523a21f 100644 --- a/ports/qt5base/CONTROL +++ b/ports/qt5base/CONTROL @@ -1,4 +1,4 @@ Source: qt5base Version: 5.9.2-0 -Description: Qt5 application framework base components. Webengine, examples and tests not included. +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 diff --git a/ports/qt5declarative/CONTROL b/ports/qt5declarative/CONTROL index 67ffc3212..cd86bb413 100644 --- a/ports/qt5declarative/CONTROL +++ b/ports/qt5declarative/CONTROL @@ -1,4 +1,4 @@ Source: qt5declarative Version: 5.9.2-0 -Description: Qt5 Declarative (Quick 2) +Description: Qt5 Declarative (Quick 2) Module. Includes QtQuick, QtQuickParticles, QtQuickWidgets, QtQml, and QtPacketProtocol. Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5tools/CONTROL b/ports/qt5tools/CONTROL index 7bdb5c1db..20c100ce9 100644 --- a/ports/qt5tools/CONTROL +++ b/ports/qt5tools/CONTROL @@ -1,4 +1,4 @@ Source: qt5tools Version: 5.9.2-0 -Description: Qt5 tools +Description: Qt5 Tools Module. Includes deployment tools and helpers, Qt Designer, Assistant, and other applications Build-Depends: qt5base diff --git a/ports/qt5winextras/CONTROL b/ports/qt5winextras/CONTROL index 67117a9fa..1c212d9b5 100644 --- a/ports/qt5winextras/CONTROL +++ b/ports/qt5winextras/CONTROL @@ -1,4 +1,4 @@ Source: qt5winextras Version: 5.9.2-0 -Description: Qt5 Windows extras +Description: Qt5 Windows Extras Module. Provides platform-specific APIs for Windows. Build-Depends: qt5base, atlmfc \ No newline at end of file -- cgit v1.2.3 From 947c6cac332cabb58452178d563a2a0c26def35e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 02:30:27 -0700 Subject: `autocomplete` Consider private commands if no public commands match --- toolsrc/src/vcpkg/commands.autocomplete.cpp | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index addb9edaf..fcbe73835 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -39,7 +39,8 @@ namespace vcpkg::Commands::Autocomplete { const std::string requested_command = match[1].str(); - std::vector valid_commands = { + // First try public commands + std::vector public_commands = { "install", "search", "remove", @@ -57,11 +58,31 @@ namespace vcpkg::Commands::Autocomplete "contact", }; - Util::unstable_keep_if(valid_commands, [&](const std::string& s) { + Util::unstable_keep_if(public_commands, [&](const std::string& s) { return Strings::case_insensitive_ascii_starts_with(s, requested_command); }); - output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(valid_commands)); + if (!public_commands.empty()) + { + output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(public_commands)); + } + + // If no public commands match, try private commands + std::vector private_commands = { + "build", + "buildexternal", + "ci", + "depend-info", + "env", + "import", + "portsdiff", + }; + + Util::unstable_keep_if(private_commands, [&](const std::string& s) { + return Strings::case_insensitive_ascii_starts_with(s, requested_command); + }); + + output_sorted_results_and_exit(VCPKG_LINE_INFO, std::move(private_commands)); } // Handles vcpkg install package: -- cgit v1.2.3 From 3c4f620dbc7ef0005c694ab758c6c7d5e42dbe93 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 02:59:55 -0700 Subject: `autocomplete` Add autocompletion for `vcpkg integrate` --- toolsrc/include/vcpkg/commands.h | 1 + toolsrc/src/vcpkg/commands.autocomplete.cpp | 1 + toolsrc/src/vcpkg/commands.integrate.cpp | 33 ++++++++++++++++++++++++++--- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index e00812c98..d9ebad2c4 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -75,6 +75,7 @@ namespace vcpkg::Commands namespace Integrate { extern const char* const INTEGRATE_COMMAND_HELPSTRING; + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index fcbe73835..e36bf8430 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -124,6 +124,7 @@ namespace vcpkg::Commands::Autocomplete CommandEntry{"install", R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, CommandEntry{"edit", R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, CommandEntry{"remove", R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, + CommandEntry{"integrate", R"###(^integrate(\s+)(\S*)$)###", Integrate::COMMAND_STRUCTURE}, }; for (auto&& command : COMMANDS) diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 0d185476e..c8fa275ab 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -326,6 +326,33 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console " vcpkg integrate remove Remove user-wide integration\n" " vcpkg integrate project Generate a referencing nuget package for individual VS project use\n"; + namespace Subcommand + { + static const std::string INSTALL = "install"; + static const std::string REMOVE = "remove"; + static const std::string PROJECT = "project"; + } + + static const std::array INSTALL_SWITCHES; + + static const std::array INSTALL_SETTINGS; + + static std::vector valid_arguments(const VcpkgPaths&) + { + return {Subcommand::INSTALL, Subcommand::REMOVE, Subcommand::PROJECT}; + } + + const CommandStructure COMMAND_STRUCTURE = { + Strings::format("Commands:\n" + "%s", + INTEGRATE_COMMAND_HELPSTRING), + 1, + 1, + INSTALL_SWITCHES, + INSTALL_SETTINGS, + &valid_arguments, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { static const std::string EXAMPLE = Strings::format("Commands:\n" @@ -335,15 +362,15 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console args.check_and_get_optional_command_arguments({}); #if defined(_WIN32) - if (args.command_arguments[0] == "install") + if (args.command_arguments[0] == Subcommand::INSTALL) { return integrate_install(paths); } - if (args.command_arguments[0] == "remove") + if (args.command_arguments[0] == Subcommand::REMOVE) { return integrate_remove(paths.get_filesystem()); } - if (args.command_arguments[0] == "project") + if (args.command_arguments[0] == Subcommand::PROJECT) { return integrate_project(paths); } -- cgit v1.2.3 From a536a4630261684370cd1b43b88e8121fe50f9ad Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 03:07:39 -0700 Subject: `remove`: Consistency renames --- toolsrc/src/vcpkg/remove.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 2ec32855a..6f555b9b8 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -169,14 +169,14 @@ namespace vcpkg::Remove static const std::string OPTION_DRY_RUN = "--dry-run"; static const std::string OPTION_OUTDATED = "--outdated"; - static const std::array REMOVE_SWITCHES = { + static const std::array SWITCHES = { OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED, }; - static const std::array REMOVE_SETTINGS; + static const std::array SETTINGS; static std::vector valid_arguments(const VcpkgPaths& paths) { @@ -190,8 +190,8 @@ namespace vcpkg::Remove "remove zlib zlib:x64-windows curl boost", 1, SIZE_MAX, - REMOVE_SWITCHES, - REMOVE_SETTINGS, + SWITCHES, + SETTINGS, &valid_arguments, }; -- cgit v1.2.3 From f30df21cd9191009d8761e5bde4ddb5363e0fd2c Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Tue, 17 Oct 2017 15:24:49 +0300 Subject: Fix extra whitespace in version --- ports/ogre/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL index a3a2460c4..588c6413b 100644 --- a/ports/ogre/CONTROL +++ b/ports/ogre/CONTROL @@ -1,4 +1,4 @@ Source: ogre -Version: 1.9.0 -1 +Version: 1.9.0-1 Build-Depends: freeimage, freetype, zlib, zziplib Description: 3D Object-Oriented Graphics Rendering Engine -- cgit v1.2.3 From 48e380f3ea2a5fab62c2a4e1f012e007541a2c86 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Tue, 17 Oct 2017 15:28:18 +0300 Subject: Fill Description for minizip --- ports/minizip/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/minizip/CONTROL b/ports/minizip/CONTROL index 135303129..cc37b5f8c 100644 --- a/ports/minizip/CONTROL +++ b/ports/minizip/CONTROL @@ -1,4 +1,4 @@ Source: minizip Version: 1.2.11-2 -Description: +Description: Zip compression library Build-Depends: bzip2, zlib -- cgit v1.2.3 From 3c0feb549c6cfa062254c5a691a8cad445a8bcf7 Mon Sep 17 00:00:00 2001 From: bjornpiltz Date: Tue, 17 Oct 2017 16:15:37 +0200 Subject: Enable building openssl with custom triplet. --- ports/openssl/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 8ad0ff197..9763f740e 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -37,14 +37,14 @@ set(CONFIGURE_COMMAND ${PERL} Configure no-ssl2 ) -if(TARGET_TRIPLET MATCHES "x86-windows") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(OPENSSL_ARCH VC-WIN32) set(OPENSSL_DO "ms\\do_nasm.bat") -elseif(TARGET_TRIPLET MATCHES "x64-windows") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(OPENSSL_ARCH VC-WIN64A) set(OPENSSL_DO "ms\\do_win64a.bat") else() - message(FATAL_ERROR "Unsupported target triplet: ${TARGET_TRIPLET}") + message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) -- cgit v1.2.3 From 14b08e1a8d423e327c24e4271f1aeba51fbb01a5 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Tue, 17 Oct 2017 17:26:12 +0300 Subject: Fix Version, "v" is not part of it. --- ports/jansson/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/jansson/CONTROL b/ports/jansson/CONTROL index 0cf311912..15a18d7e2 100644 --- a/ports/jansson/CONTROL +++ b/ports/jansson/CONTROL @@ -1,3 +1,3 @@ Source: jansson -Version: v2.10-1 +Version: 2.10-1 Description: Jansson is a C library for encoding, decoding and manipulating JSON data -- cgit v1.2.3 From 6fb6abba22faf36bca31fcfdb05d84c08cfc9a58 Mon Sep 17 00:00:00 2001 From: alex85k Date: Tue, 17 Oct 2017 22:29:34 +0500 Subject: [lua] fix static build --- ports/lua/CMakeLists.txt | 2 +- ports/lua/CONTROL | 2 +- ports/lua/portfile.cmake | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/lua/CMakeLists.txt b/ports/lua/CMakeLists.txt index fc2e27e08..a96718953 100644 --- a/ports/lua/CMakeLists.txt +++ b/ports/lua/CMakeLists.txt @@ -59,7 +59,7 @@ IF (NOT DEFINED SKIP_INSTALL_TOOLS) ADD_EXECUTABLE ( luai src/lua.c ) # interpreter TARGET_LINK_LIBRARIES ( luai lua ) SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai ) - INSTALL ( TARGETS luai luac lua RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools ) + INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools ) ENDIF () IF (NOT DEFINED SKIP_INSTALL_HEADERS) diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL index cf49dafe5..fa26bb00b 100644 --- a/ports/lua/CONTROL +++ b/ports/lua/CONTROL @@ -1,3 +1,3 @@ Source: lua -Version: 5.3.4-2 +Version: 5.3.4-3 Description: a powerful, fast, lightweight, embeddable scripting language diff --git a/ports/lua/portfile.cmake b/ports/lua/portfile.cmake index beda8362e..3b7e8779c 100644 --- a/ports/lua/portfile.cmake +++ b/ports/lua/portfile.cmake @@ -33,6 +33,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(READ ${CURRENT_PACKAGES_DIR}/include/luaconf.h LUA_CONF_H) string(REPLACE "defined(LUA_BUILD_AS_DLL)" "1" LUA_CONF_H "${LUA_CONF_H}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/luaconf.h "${LUA_CONF_H}") + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools) endif() # Handle copyright -- cgit v1.2.3 From 87296823ac9cc939c233caf7c02585b5fe6d3df7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 12:41:34 -0700 Subject: [cmake] Update to 3.9.4 (was 3.9.3) --- README.md | 2 +- scripts/fetchDependency.ps1 | 12 ++++++------ toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6b4deaff5..e2c076977 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Prerequisites: - Windows 10, 8.1, or 7 - Visual Studio 2017 or Visual Studio 2015 Update 3 - Git -- *Optional: CMake 3.9.1* +- *Optional: CMake 3.9.4* Clone this repository, then run ``` diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 773ebeac4..b43fd0cb5 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -107,12 +107,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.9.3" - $downloadVersion = "3.9.3" - $url = "https://cmake.org/files/v3.9/cmake-3.9.3-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.9.3-win32-x86.zip" - $expectedDownloadedFileHash = "47870e3d4c9a5aa019e71020cd85cc60b6f2d2569fb239eaec204cd991e512f1" - $executableFromDownload = "$downloadsDir\cmake-3.9.3-win32-x86\bin\cmake.exe" + $requiredVersion = "3.9.4" + $downloadVersion = "3.9.4" + $url = "https://cmake.org/files/v3.9/cmake-3.9.4-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.9.4-win32-x86.zip" + $expectedDownloadedFileHash = "8214df1ff51f9a6a1f0e27f9bd18f402b1749c5b645fbf6e401bcb00047171cd" + $executableFromDownload = "$downloadsDir\cmake-3.9.4-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP $extractionFolder = $downloadsDir } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 90f9cb00b..486fff40e 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -105,10 +105,10 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {3, 9, 3}; + static constexpr std::array EXPECTED_VERSION = {3, 9, 4}; static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const fs::path downloaded_copy = downloads_folder / "cmake-3.9.3-win32-x86" / "bin" / "cmake.exe"; + const fs::path downloaded_copy = downloads_folder / "cmake-3.9.4-win32-x86" / "bin" / "cmake.exe"; const std::vector from_path = Files::find_from_PATH("cmake"); std::vector candidate_paths; -- cgit v1.2.3 From edb718e21b56ab62a6544a26c1bba450d952b32d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:19:14 -0700 Subject: [fetchDependency] Introduce Test-Command function --- scripts/fetchDependency.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index b43fd0cb5..ac4ab5f46 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -14,6 +14,11 @@ $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" +function Test-Command($commandName) +{ + return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) +} + function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { function performDownload( [Parameter(Mandatory=$true)][string]$Dependency, -- cgit v1.2.3 From 147cde8bfda4e7283e4d47cd8a55c5bd0c689081 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:19:42 -0700 Subject: [fetchDependency] Use Expand-Archive if it exists, otherwise fallback to cmd --- ports/winpcap/wpcap.patch | 414 ++++++++++++++++++++++++++++++++++++++++++++ scripts/fetchDependency.ps1 | 17 +- 2 files changed, 426 insertions(+), 5 deletions(-) create mode 100644 ports/winpcap/wpcap.patch diff --git a/ports/winpcap/wpcap.patch b/ports/winpcap/wpcap.patch new file mode 100644 index 000000000..6296bbd39 --- /dev/null +++ b/ports/winpcap/wpcap.patch @@ -0,0 +1,414 @@ +diff --git a/wpcap/PRJ/wpcap.dsp b/wpcap/PRJ/wpcap.dsp +index e53a865..0e4ed19 100644 +--- a/wpcap/PRJ/wpcap.dsp ++++ b/wpcap/PRJ/wpcap.dsp +@@ -48,8 +48,8 @@ RSC=rc.exe + # PROP Intermediate_Dir "Release" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -75,8 +75,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Debug" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBPCAP_EXPORTS" /YX /FD /GZ /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -103,8 +103,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Debug_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -138,8 +138,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Debug_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -173,8 +173,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -208,8 +208,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -243,8 +243,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE_NO_AIRPCAP" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c ++# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c ++# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -278,8 +278,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Debug_REMOTE_NO_AIRPCAP" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +diff --git a/wpcap/PRJ/wpcap.vcproj b/wpcap/PRJ/wpcap.vcproj +index c1d56b4..40a8ce1 100644 +--- a/wpcap/PRJ/wpcap.vcproj ++++ b/wpcap/PRJ/wpcap.vcproj +@@ -22,7 +22,7 @@ + Name="Debug|Win32" + OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86" + IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86" +- ConfigurationType="2" ++ ConfigurationType="2" + CharacterSet="2" + > + + +@@ -205,7 +205,7 @@ + +@@ -285,7 +285,7 @@ + + + +@@ -525,7 +525,7 @@ + +@@ -605,7 +605,7 @@ + + + #if !defined(HAVE_SNPRINTF) +-#define snprintf pcap_snprintf +-extern int snprintf (char *, size_t, const char *, ...); ++#define snprintf _snprintf ++//#define snprintf pcap_snprintf ++//extern int snprintf (char *, size_t, const char *, ...); + #endif + + #if !defined(HAVE_VSNPRINTF) +diff --git a/wpcap/libpcap/rpcapd/rpcapd.dsp b/wpcap/libpcap/rpcapd/rpcapd.dsp +index f7c00af..1cd823e 100644 +--- a/wpcap/libpcap/rpcapd/rpcapd.dsp ++++ b/wpcap/libpcap/rpcapd/rpcapd.dsp +@@ -44,8 +44,8 @@ RSC=rc.exe + # PROP Intermediate_Dir "Debug_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c + # ADD BASE RSC /l 0x409 /d "_DEBUG" + # ADD RSC /l 0x409 /d "_DEBUG" + BSC32=bscmake.exe +@@ -69,8 +69,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Debug_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /FR /YX /FD /GZ /c + # ADD BASE RSC /l 0x409 /d "_DEBUG" + # ADD RSC /l 0x409 /d "_DEBUG" + BSC32=bscmake.exe +@@ -94,8 +94,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Release_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c ++# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c + # ADD BASE RSC /l 0x409 /d "NDEBUG" + # ADD RSC /l 0x409 /d "NDEBUG" + BSC32=bscmake.exe +@@ -120,8 +120,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Release_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /YX /FD /c ++# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /YX /FD /c + # ADD BASE RSC /l 0x409 /d "NDEBUG" + # ADD RSC /l 0x409 /d "NDEBUG" + BSC32=bscmake.exe +diff --git a/wpcap/libpcap/rpcapd/rpcapd.vcproj b/wpcap/libpcap/rpcapd/rpcapd.vcproj +index 882fbac..b89f1f9 100644 +--- a/wpcap/libpcap/rpcapd/rpcapd.vcproj ++++ b/wpcap/libpcap/rpcapd/rpcapd.vcproj +@@ -41,7 +41,7 @@ + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\;..\Win32\include;..\..\..\Common;.\Win32-pthreads;..\..\Win32-Extensions" +- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;WPCAP;_CRT_SECURE_NO_DEPRECATE;HAVE_TC_API" ++ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_VSNPRINTF;HAVE_REMOTE;WPCAP;_CRT_SECURE_NO_DEPRECATE;HAVE_TC_API" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" +@@ -119,7 +119,7 @@ + Date: Tue, 17 Oct 2017 13:40:01 -0700 Subject: [fetchDependency] Add Test-Module function --- scripts/fetchDependency.ps1 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6024895ae..2ba98ab23 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -3,6 +3,16 @@ param( [string]$Dependency ) +function Test-Command($commandName) +{ + return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) +} + +function Test-Module($moduleName) +{ + return [bool](Get-Module -ListAvailable -Name $moduleName) +} + if ($PSVersionTable.PSEdition -ne "Core") { Import-Module BitsTransfer -Verbose:$false } @@ -14,11 +24,6 @@ $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" -function Test-Command($commandName) -{ - return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) -} - function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { function performDownload( [Parameter(Mandatory=$true)][string]$Dependency, -- cgit v1.2.3 From 451c1c96be2407da0e590344c655a8df838d3f99 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:42:58 -0700 Subject: [fetchDependency] Use Test-Module for BitsTransfer module check --- scripts/fetchDependency.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 2ba98ab23..58f64b626 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -13,7 +13,8 @@ function Test-Module($moduleName) return [bool](Get-Module -ListAvailable -Name $moduleName) } -if ($PSVersionTable.PSEdition -ne "Core") { +if (Test-Module -moduleName 'BitsTransfer') +{ Import-Module BitsTransfer -Verbose:$false } -- cgit v1.2.3 From d6d5540cc54c5d3dcbb43bdc6d0fd5b2d6271d21 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:45:41 -0700 Subject: [fetchDependency] Call Start-BitsTransfer if available, otherwise fallback --- scripts/fetchDependency.ps1 | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 58f64b626..d2e2b89fd 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -57,12 +57,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $WC.Proxy.Credentials=$ProxyCred } - if (($PSVersionTable.PSEdition -ne "Core") -and ($Dependency -ne "git")) # git fails with BITS + # git and installerbase fail with Start-BitsTransfer + if ((Test-Command -commandName 'Start-BitsTransfer') -and ($Dependency -ne "git")-and ($Dependency -ne "installerbase")) { - try { + try + { Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop + return } - catch [System.Exception] { + catch [System.Exception] + { # If BITS fails for any reason, delete any potentially partially downloaded files and continue if (Test-Path $downloadPath) { @@ -70,11 +74,9 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } } } - if (!(Test-Path $downloadPath)) - { - Write-Verbose("Downloading $Dependency...") - $WC.DownloadFile($url, $downloadPath) - } + + Write-Verbose("Downloading $Dependency...") + $WC.DownloadFile($url, $downloadPath) } # Enums (without resorting to C#) are only available on powershell 5+. -- cgit v1.2.3 From ffd91c0c1d071378d383ad94ba915e2c10dff06b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 13:58:36 -0700 Subject: [fetchDependency] Call Get-FileHash if available, otherwise fallback --- scripts/fetchDependency.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index d2e2b89fd..e8c66c84d 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -194,17 +194,17 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) performDownload $Dependency $url $downloadsDir $downloadPath $downloadVersion $requiredVersion #calculating the hash - if ($PSVersionTable.PSEdition -ne "Core") + if (Test-Command -commandName 'Get-FileHash') + { + $downloadedFileHash = (Get-FileHash -Path $downloadPath -Algorithm SHA256).Hash + } + else { $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256") $fileAsByteArray = [io.File]::ReadAllBytes($downloadPath) $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) $downloadedFileHash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) } - else - { - $downloadedFileHash = (Get-FileHash -Path $downloadPath -Algorithm SHA256).Hash - } if ($expectedDownloadedFileHash -ne $downloadedFileHash) { -- cgit v1.2.3 From fa4e54a37356ad0200ce6387541ef78997b8a87e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 14:05:55 -0700 Subject: [git] Update to 2.14.2.3 (was 2.14.1) --- scripts/fetchDependency.ps1 | 14 +++++++------- toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index e8c66c84d..86bf103a8 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -158,16 +158,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "git") { - $requiredVersion = "2.14.1" - $downloadVersion = "2.14.1" - $url = "https://github.com/git-for-windows/git/releases/download/v2.14.1.windows.1/MinGit-2.14.1-32-bit.zip" # We choose the 32-bit version - $downloadPath = "$downloadsDir\MinGit-2.14.1-32-bit.zip" - $expectedDownloadedFileHash = "77b468e0ead1e7da4cb3a1cf35dabab5210bf10457b4142f5e9430318217cdef" + $requiredVersion = "2.14.2" + $downloadVersion = "2.14.2" + $url = "https://github.com/git-for-windows/git/releases/download/v2.14.2.windows.3/MinGit-2.14.2.3-32-bit.zip" # We choose the 32-bit version + $downloadPath = "$downloadsDir\MinGit-2.14.2.3-32-bit.zip" + $expectedDownloadedFileHash = "7cc1f27e1cfe79381e1a504a5fc7bc33951ac9031cd14c3bf478769d21a26cce" # There is another copy of git.exe in MinGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. - $executableFromDownload = "$downloadsDir\MinGit-2.14.1-32-bit\cmd\git.exe" + $executableFromDownload = "$downloadsDir\MinGit-2.14.2.3-32-bit\cmd\git.exe" $extractionType = $ExtractionType_ZIP - $extractionFolder = "$downloadsDir\MinGit-2.14.1-32-bit" + $extractionFolder = "$downloadsDir\MinGit-2.14.2.3-32-bit" } elseif($Dependency -eq "installerbase") { diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 486fff40e..8da718e87 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -151,10 +151,10 @@ namespace vcpkg fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {2, 14, 1}; + static constexpr std::array EXPECTED_VERSION = {2, 14, 2}; static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.1-32-bit" / "cmd" / "git.exe"; + const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.2.3-32-bit" / "cmd" / "git.exe"; const std::vector from_path = Files::find_from_PATH("git"); std::vector candidate_paths; -- cgit v1.2.3 From 508c21a6f8dece3c2793b302a926d1e663eb8526 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 14:08:30 -0700 Subject: [vswhere] Update to 2.2.7 (was 2.2.3) --- scripts/fetchDependency.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 86bf103a8..1677cb869 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -148,11 +148,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "vswhere") { - $requiredVersion = "2.2.3" - $downloadVersion = "2.2.3" - $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.3/vswhere.exe" + $requiredVersion = "2.2.7" + $downloadVersion = "2.2.7" + $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.7/vswhere.exe" $downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe" - $expectedDownloadedFileHash = "5f19066ac91635ad17d33fe0f79fc63c672a46f98c0358589a90163bcb2733e8" + $expectedDownloadedFileHash = "f50303881da706132516d9decfd5314d524a0044daf49c0cfd21dc39c1261ec3" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } -- cgit v1.2.3 From e9ba8b0ecbe5c49cda2710acaae0983dfe2552f9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 14:19:48 -0700 Subject: [nuget] Update to 4.4.0 (was 4.3.0) --- scripts/fetchDependency.ps1 | 8 ++++---- toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 1677cb869..df03878eb 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -138,11 +138,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "nuget") { - $requiredVersion = "4.3.0" - $downloadVersion = "4.3.0" - $url = "https://dist.nuget.org/win-x86-commandline/v4.3.0/nuget.exe" + $requiredVersion = "4.4.0" + $downloadVersion = "4.4.0" + $url = "https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe" $downloadPath = "$downloadsDir\nuget-$downloadVersion\nuget.exe" - $expectedDownloadedFileHash = "386da77a8cf2b63d1260b7020feeedabfe3b65ab31d20e6a313a530865972f3a" + $expectedDownloadedFileHash = "2cf9b118937eef825464e548f0c44f7f64090047746de295d75ac3dcffa3e1f6" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 8da718e87..34c661afd 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -131,9 +131,9 @@ namespace vcpkg fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {4, 3, 0}; + static constexpr std::array EXPECTED_VERSION = {4, 4, 0}; - const fs::path downloaded_copy = downloads_folder / "nuget-4.3.0" / "nuget.exe"; + const fs::path downloaded_copy = downloads_folder / "nuget-4.4.0" / "nuget.exe"; const std::vector from_path = Files::find_from_PATH("nuget"); std::vector candidate_paths; -- cgit v1.2.3 From ae3fe7cd16c82b794d5074104cf078afc1a12c7d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Oct 2017 14:42:05 -0700 Subject: [boost] Add feature packages for regex-icu, locale-icu, and python --- ports/boost/CONTROL | 20 ++++++++++++++------ ports/boost/portfile.cmake | 31 ++++++++++++++++++++++++------- toolsrc/src/vcpkg/install.cpp | 3 ++- 3 files changed, 40 insertions(+), 14 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 7001c968a..a5da89a5a 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,8 +1,16 @@ Source: boost -<<<<<<< HEAD -Version: 1.65-2 -======= -Version: 1.65.1 ->>>>>>> master +Version: 1.65.1-1 Description: Peer-reviewed portable C++ source libraries -Build-Depends: zlib, bzip2, icu [windows], python3 [windows] +Build-Depends: zlib, bzip2 + +Feature: locale-icu +Description: ICU backend for Boost.Locale +Build-Depends: icu + +Feature: regex-icu +Description: ICU support for Boost.Regex +Build-Depends: icu + +Feature: python +Description: a C++ library which enables seamless interoperability between C++ and the Python programming language. +Build-Depends: python3 diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 4d2d06aae..b0699eaa2 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -119,6 +119,30 @@ if(TRIPLET_SYSTEM_ARCH MATCHES "x64") list(APPEND B2_OPTIONS address-model=64) endif() +if("python" IN_LIST FEATURES) + # Find Python. Can't use find_package here, but we already know where everything is + file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") + set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") + set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") + string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) + list(APPEND B2_OPTIONS_DBG python-debugging=on) +else() + list(APPEND B2_OPTIONS --without-python) +endif() + +if("locale-icu" IN_LIST FEATURES) + list(APPEND B2_OPTIONS boost.locale.icu=on) +else() + list(APPEND B2_OPTIONS boost.locale.icu=off) +endif() + +if("regex-icu" IN_LIST FEATURES) + list(APPEND B2_OPTIONS --enable-icu) +else() + list(APPEND B2_OPTIONS --disable-icu) +endif() + + if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") list(APPEND B2_OPTIONS windows-api=store @@ -173,15 +197,8 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam ESCAPE_QUOTES @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam ESCAPE_QUOTES @ONLY) else() - # Find Python. Can't use find_package here, but we already know where everything is - file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") - set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") - set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") - string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) - list(APPEND B2_OPTIONS_DBG - python-debugging=on) endif() if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index adbd8c943..70757ff38 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -591,11 +591,12 @@ namespace vcpkg::Install const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version), Build::to_allow_downloads(!no_downloads)}; + // Note: action_plan will hold raw pointers to SourceControlFiles from this map + std::unordered_map scf_map; std::vector action_plan; if (GlobalState::feature_packages) { - std::unordered_map scf_map; auto all_ports = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); for (auto&& port : all_ports) { -- cgit v1.2.3 From 1211c777663c4716caa0e3a58f3ea84dab1ab714 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Oct 2017 15:08:30 -0700 Subject: [lua] Move tools to /tools/lua --- ports/lua/CMakeLists.txt | 6 +++--- ports/lua/CONTROL | 2 +- ports/lua/portfile.cmake | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ports/lua/CMakeLists.txt b/ports/lua/CMakeLists.txt index a96718953..3fa62fe2c 100644 --- a/ports/lua/CMakeLists.txt +++ b/ports/lua/CMakeLists.txt @@ -45,7 +45,7 @@ ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS ) ADD_LIBRARY ( lua ${SRC_LIBLUA} ) IF (BUILD_SHARED_LIBS) - TARGET_COMPILE_DEFINITIONS (lua PRIVATE -DLUA_BUILD_AS_DLL ) + TARGET_COMPILE_DEFINITIONS (lua PUBLIC -DLUA_BUILD_AS_DLL ) ENDIF () INSTALL ( TARGETS lua @@ -55,11 +55,11 @@ INSTALL ( TARGETS lua ) IF (NOT DEFINED SKIP_INSTALL_TOOLS) - ADD_EXECUTABLE ( luac src/luac.c ${SRC_LIBLUA} ) # compiler + ADD_EXECUTABLE ( luac src/luac.c ${SRC_LIBLUA} ) # compiler uses non-exported APIs, so must include sources directly. ADD_EXECUTABLE ( luai src/lua.c ) # interpreter TARGET_LINK_LIBRARIES ( luai lua ) SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai ) - INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools ) + INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools/lua ) ENDIF () IF (NOT DEFINED SKIP_INSTALL_HEADERS) diff --git a/ports/lua/CONTROL b/ports/lua/CONTROL index fa26bb00b..836ae345a 100644 --- a/ports/lua/CONTROL +++ b/ports/lua/CONTROL @@ -1,3 +1,3 @@ Source: lua -Version: 5.3.4-3 +Version: 5.3.4-4 Description: a powerful, fast, lightweight, embeddable scripting language diff --git a/ports/lua/portfile.cmake b/ports/lua/portfile.cmake index 3b7e8779c..a1dcbd379 100644 --- a/ports/lua/portfile.cmake +++ b/ports/lua/portfile.cmake @@ -33,9 +33,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(READ ${CURRENT_PACKAGES_DIR}/include/luaconf.h LUA_CONF_H) string(REPLACE "defined(LUA_BUILD_AS_DLL)" "1" LUA_CONF_H "${LUA_CONF_H}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/luaconf.h "${LUA_CONF_H}") - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools) endif() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lua) + # Handle copyright file(COPY ${CMAKE_CURRENT_LIST_DIR}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/lua) vcpkg_copy_pdbs() -- cgit v1.2.3 From 50402e91cb46a619b06a2c63d23c693a7b4f563c Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 17:31:24 -0500 Subject: FIX: use alias folder --- ports/pthreads/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index cda6efb32..cddb3f411 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -34,11 +34,11 @@ endforeach() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads RENAME copyright) file(INSTALL ${CURRENT_PACKAGES_DIR}/lib/pthreadsVC2.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link RENAME pthreads.lib ) file(INSTALL ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadsVC2d.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link RENAME pthreads.lib ) -- cgit v1.2.3 From d7f6a7e4a8e09ce54c18f16dea9f6d3fe9d0ac77 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Oct 2017 16:12:35 -0700 Subject: Update CHANGELOG and bump version to v0.0.92 --- CHANGELOG.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a2b0e336..10e1d531a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,47 @@ +vcpkg (0.0.92) +-------------- + * Add ports: + - cctz v2.1 + - celero 2.1.0-1 + - eastl 3.05.08 + - imgui 1.51-1 + - libidn2 2.0.4 + - mozjpeg 3.2-1 + - spatialite-tools 4.3.0 + - string-theory 1.6 + - tiny-dnn 2017-10-09-dd906fed8c8aff8dc837657c42f9d55f8b793b0e + - wincrypt 0.0 + - winsock2 0.0 + * Update ports: + - abseil 2017-09-28 -> 2017-10-14 + - boost 1.65.1 -> 1.65.1-1 + - cpprestsdk 2.9.0-3 -> 2.9.0-4 + - gdal 1.11.3-5 -> 2.2.2 + - jansson v2.10-1 -> 2.10-1 + - lua 5.3.4-2 -> 5.3.4-4 + - mpfr 3.1.5-1 -> 3.1.6 + - ogre 1.9.0 -1 -> 1.9.0-1 + - openni2 2.2.0.33-2 -> 2.2.0.33-4 + - pcl 1.8.1-1 -> 1.8.1-2 + - sciter 4.0.3 -> 4.0.4 + - vtk 8.0.0-2 -> 8.0.0-3 + - websocketpp 0.7.0 -> 0.7.0-1 + * Initial support for autocomplete/tab-completion for powershell (still experimental) + * Add `VCPKG_CHAINLOAD_TOOLCHAIN_FILE variable`. As the name suggests, you can chainload your own toolchain file along with the `vcpkg` toolchain file. + * Fix issues with the new Visual Studio detection ([`vswhere.exe`](https://github.com/Microsoft/vswhere)). Notably: + - Detect VS2015 BuildTools, VS2017 BuildTools and VS Express Edition + * Fix issues with Windows SDK detection + * Rework acquisition of `vcpkg` dependencies (e.g. `cmake`, `git`). It is now more robust and should be faster on modern Operating Systems while still having fallback functions for older ones. + * Bump required version & auto-downloaded version of `cmake` to 3.9.4 + * Bump required version & auto-downloaded version of `nuget` to 4.4.0 + * Bump required version & auto-downloaded version of `vswhere` to 2.2.7 + * Bump required version & auto-downloaded version of `git` to 2.4.2(.3) + * Bump ninja to version 1.8.0 + + +-- vcpkg team TUE, 17 Oct 2017 16:00:00 -0800 + + vcpkg (0.0.91) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 04ab0d2c9..af0276f0b 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.91" \ No newline at end of file +"0.0.92" \ No newline at end of file -- cgit v1.2.3 From 4451a745a0f3beb6e8e034422185ef86df098a77 Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 18:15:52 -0500 Subject: ENH: sodium: add control --- ports/libsodium/CONTROL | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ports/libsodium/CONTROL diff --git a/ports/libsodium/CONTROL b/ports/libsodium/CONTROL new file mode 100644 index 000000000..185718572 --- /dev/null +++ b/ports/libsodium/CONTROL @@ -0,0 +1,3 @@ +Source: libsodium +Version: 1.0.15 +Description: A modern and easy-to-use crypto library -- cgit v1.2.3 From b3f123fdd0acd3eff443a5d709c6a223d380ea36 Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 18:25:58 -0500 Subject: ENH: add portfile --- ports/libsodium/portfile.cmake | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ports/libsodium/portfile.cmake diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake new file mode 100644 index 000000000..593c173e9 --- /dev/null +++ b/ports/libsodium/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +set(LIBSODIUM_VERSION 1.0.15) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsodium-${LIBSODIUM_VERSION}) + +vcpkg_from_github( + OUT_SOURCE_PATH ${SOURCE_PATH} + REPO jedisct1/libsodium + REF ${LIBSODIUM_VERSION} + SHA512 ec497cb0007597efaeae0aecaa7484d6dcc53367607ec3fd28a98c6209f0cdecd5a6f560c15badd3a69b8da7d63676b11fb395ef4ed4da9b80467dbdc5f65a72 + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj + RELEASE_CONFIGURATION ReleaseDLL + DEBUG_CONFIGURATION DebugDLL + ) +else() + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj + ) +endif() + + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsodium + RENAME copyright +) -- cgit v1.2.3 From 9642423f1df8f071678c4c78f10175b1b450e87d Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 18:43:54 -0500 Subject: ENH: libsodium: Copy necessary files --- ports/libsodium/portfile.cmake | 55 +++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index 593c173e9..731d63e9b 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -12,20 +12,53 @@ vcpkg_from_github( ) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj - RELEASE_CONFIGURATION ReleaseDLL - DEBUG_CONFIGURATION DebugDLL - ) + set(LIBSODIUM_RELEASE_CONFIGURATION ReleaseDLL) + set(LIBSODIUM_DEBUG_CONFIGURATION DebugDLL) else() - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj - ) + set(LIBSODIUM_RELEASE_CONFIGURATION Release) + set(LIBSODIUM_DEBUG_CONFIGURATION Debug) endif() +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj + RELEASE_CONFIGURATION ${LIBSODIUM_RELEASE_CONFIGURATION} + DEBUG_CONFIGURATION ${LIBSODIUM_DEBUG_CONFIGURATION} +) + +IF(VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + SET(BUILD_ARCH "Win32") +ELSE() + SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) +ENDIF() + + +file(GLOB LIBSODIUM_HEADERS "${SOURCE_PATH}/src/libsodium/include/sodium/*.h") +file(INSTALL + ${LIBSODIUM_HEADERS} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/sodium +) + +file(INSTALL + Build\${LIBSODIUM_RELEASE_CONFIGURATION}\${BUILD_ARCH}\libsodium.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file(INSTALL + Build\${LIBSODIUM_RELEASE_CONFIGURATION}\${BUILD_ARCH}\libsodium.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file(INSTALL + Build\${LIBSODIUM_DEBUG_CONFIGURATION}\${BUILD_ARCH}\libsodium.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin/debug +) +file(INSTALL + Build\${LIBSODIUM_DEBUG_CONFIGURATION}\${BUILD_ARCH}\libsodium.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib/debug +) + +vcpkg_copy_pdbs() file(INSTALL - ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsodium - RENAME copyright + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsodium + RENAME copyright ) -- cgit v1.2.3 From 1af22993871d64089b2e96a82c61f9d8c86c2bb4 Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 18:47:20 -0500 Subject: FIX: use forward slashes --- ports/libsodium/portfile.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index 731d63e9b..2c3f1e0f6 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -39,19 +39,19 @@ file(INSTALL ) file(INSTALL - Build\${LIBSODIUM_RELEASE_CONFIGURATION}\${BUILD_ARCH}\libsodium.dll + Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin ) file(INSTALL - Build\${LIBSODIUM_RELEASE_CONFIGURATION}\${BUILD_ARCH}\libsodium.lib + Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib ) file(INSTALL - Build\${LIBSODIUM_DEBUG_CONFIGURATION}\${BUILD_ARCH}\libsodium.dll + Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin/debug ) file(INSTALL - Build\${LIBSODIUM_DEBUG_CONFIGURATION}\${BUILD_ARCH}\libsodium.lib + Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/debug ) -- cgit v1.2.3 From 62f665010d80fefbbe9655506943f72a73b7a2b9 Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 18:49:05 -0500 Subject: FIX: use correct source path --- ports/libsodium/portfile.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index 2c3f1e0f6..5909ef871 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -39,19 +39,19 @@ file(INSTALL ) file(INSTALL - Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll + ${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin ) file(INSTALL - Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib + ${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib ) file(INSTALL - Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll + ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin/debug ) file(INSTALL - Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib + ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/debug ) -- cgit v1.2.3 From ab2dc2cae3dfaf10cde197e2bd5cf711c718033b Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 17 Oct 2017 18:53:18 -0500 Subject: FIX: use the correct paths --- ports/libsodium/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index 5909ef871..b2329d248 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -48,11 +48,11 @@ file(INSTALL ) file(INSTALL ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin/debug + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin ) file(INSTALL ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib/debug + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) vcpkg_copy_pdbs() -- cgit v1.2.3 From 8bac6ea3bf3e6621be7936bce509223ce1478bd8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Oct 2017 17:38:38 -0700 Subject: [pthreads] Version bump for PR #1990 --- ports/pthreads/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/pthreads/CONTROL b/ports/pthreads/CONTROL index ee9b7b5fa..ab02fb415 100644 --- a/ports/pthreads/CONTROL +++ b/ports/pthreads/CONTROL @@ -1,3 +1,3 @@ Source: pthreads -Version: 2.9.1-1 +Version: 2.9.1-2 Description: pthreads for windows -- cgit v1.2.3 From 71d516b6dd26c633dbb790591ddcc3a37786934a Mon Sep 17 00:00:00 2001 From: kypp Date: Wed, 18 Oct 2017 09:39:08 +0200 Subject: [assimp] fix static linkage --- ports/assimp/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 14564e65a..ee0d192b3 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -19,6 +19,7 @@ vcpkg_configure_cmake( -DASSIMP_BUILD_ASSIMP_VIEW=False -DASSIMP_BUILD_ZLIB=False -DASSIMP_BUILD_ASSIMP_TOOLS=False + -DASSIMP_INSTALL_PDB=False ) vcpkg_install_cmake() -- cgit v1.2.3 From bef18205d74d78b831ceb629c71b61836a012bf9 Mon Sep 17 00:00:00 2001 From: kypp Date: Wed, 18 Oct 2017 09:39:38 +0200 Subject: [assimp] update to version 4.0.1 --- ports/assimp/CONTROL | 2 +- ports/assimp/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index f13d2ee20..170d727a8 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 4.0.0-2 +Version: 4.0.1 Description: The Open Asset import library Build-Depends: zlib diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index ee0d192b3..0642fb701 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO assimp/assimp - REF v4.0.0 - SHA512 ab2b376c6323fc8579fe3a4b3dbe92c44d753747464a14d6e2be70d2a855c208df882ad84487a7b96f364afb175938b5f6a1111d767450b01e0b8b7f0f36ba62 + REF v4.0.1 + SHA512 260b4c7e738f857d8364c4878ea4e789ca676180821943f6d9bff8f56e5f9377ea29660dca4e130c681a8aa12fc32f155adb1d78ca260ba242e68b8afa6cc1bb HEAD_REF master ) -- cgit v1.2.3 From fc80d72089e1a12b1f8447dc91bbb0018437b141 Mon Sep 17 00:00:00 2001 From: Aaron Clauson Date: Wed, 18 Oct 2017 21:18:08 +1100 Subject: Port (cmake) for secp256k1 crypto project. --- ports/secp256k1/CMakeLists.txt | 26 ++++++++++++++++++++++++++ ports/secp256k1/CONTROL | 3 +++ ports/secp256k1/libsecp256k1-config.h | 29 +++++++++++++++++++++++++++++ ports/secp256k1/portfile.cmake | 31 +++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 ports/secp256k1/CMakeLists.txt create mode 100644 ports/secp256k1/CONTROL create mode 100644 ports/secp256k1/libsecp256k1-config.h create mode 100644 ports/secp256k1/portfile.cmake diff --git a/ports/secp256k1/CMakeLists.txt b/ports/secp256k1/CMakeLists.txt new file mode 100644 index 000000000..708ff68fa --- /dev/null +++ b/ports/secp256k1/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.8) +project(secp256k1 C) + +option(INSTALL_HEADERS "Install header files" ON) + +add_definitions( + -DENABLE_MODULE_ECDH + -DENABLE_MODULE_RECOVERY + -DHAVE_CONFIG_H +) + +file(GLOB SOURCES src/secp256k1.c) +add_library(secp256k1 ${SOURCES}) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +install(TARGETS secp256k1 + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(INSTALL_HEADERS) + file(GLOB HEADERS include/*.h) + install(FILES ${HEADERS} DESTINATION include) +endif() \ No newline at end of file diff --git a/ports/secp256k1/CONTROL b/ports/secp256k1/CONTROL new file mode 100644 index 000000000..0198cf1b8 --- /dev/null +++ b/ports/secp256k1/CONTROL @@ -0,0 +1,3 @@ +Source: secp256k1 +Version: +Description: Optimized C library for EC operations on curve diff --git a/ports/secp256k1/libsecp256k1-config.h b/ports/secp256k1/libsecp256k1-config.h new file mode 100644 index 000000000..693d3ed25 --- /dev/null +++ b/ports/secp256k1/libsecp256k1-config.h @@ -0,0 +1,29 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_BASIC_CONFIG_H +#define SECP256K1_BASIC_CONFIG_H + +#undef USE_ASM_X86_64 +#undef USE_ENDOMORPHISM +#undef USE_FIELD_10X26 +#undef USE_FIELD_5X52 +#undef USE_FIELD_INV_BUILTIN +#undef USE_FIELD_INV_NUM +#undef USE_NUM_GMP +#undef USE_NUM_NONE +#undef USE_SCALAR_4X64 +#undef USE_SCALAR_8X32 +#undef USE_SCALAR_INV_BUILTIN +#undef USE_SCALAR_INV_NUM + +#define USE_NUM_NONE 1 +#define USE_FIELD_INV_BUILTIN 1 +#define USE_SCALAR_INV_BUILTIN 1 +#define USE_FIELD_10X26 1 +#define USE_SCALAR_8X32 1 + +#endif /* SECP256K1_BASIC_CONFIG_H */ diff --git a/ports/secp256k1/portfile.cmake b/ports/secp256k1/portfile.cmake new file mode 100644 index 000000000..9ff3fff8f --- /dev/null +++ b/ports/secp256k1/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/secp256k1-0b7024185045a49a1a6a4c5615bf31c94f63d9c4/) + +vcpkg_from_github( + OUT_SOURCE_PATH "secp256k1" + REPO "bitcoin-core/secp256k1" + REF "0b7024185045a49a1a6a4c5615bf31c94f63d9c4" + SHA512 54e0c446ae63105800dfaf23dc934734f196c91f275db0455e58a36926c29ecc51a13d9b1eb2e45bc86199120c3c472ec7b39086787a49ce388a4df462a870bc +) + +message("Copying config header to " ${SOURCE_PATH}) + +file(COPY ${CURRENT_PORT_DIR}/libsecp256k1-config.h DESTINATION ${SOURCE_PATH}) + +message(STATUS "Building") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF + OPTIONS_DEBUG +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/secp256k1 RENAME copyright) -- cgit v1.2.3 From 11fdd415dd21f85292260a64fa9d52d872697e7c Mon Sep 17 00:00:00 2001 From: bahaki386 Date: Wed, 18 Oct 2017 19:38:25 +0900 Subject: Update Meson to 0.43.0 Upedate Meson to 0.43.0. It will fix Issue #2006. --- 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 b81675c13..fdee0cb1f 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -110,10 +110,10 @@ function(vcpkg_find_acquire_program VAR) set(PROGNAME meson) set(REQUIRED_INTERPRETER PYTHON3) set(SCRIPTNAME meson.py) - set(PATHS ${DOWNLOADS}/tools/meson/meson-0.40.1) - set(URL "https://github.com/mesonbuild/meson/archive/0.40.1.zip") - set(ARCHIVE "meson-0.40.1.zip") - set(HASH 4c1d07f32d527859f762c34de74d31d569573fc833335ab9652ed38d1f9e64b49869e826527c28a6a07cb8e594fd5c647b34aa95e626236a2707f75df0a2d435) + set(PATHS ${DOWNLOADS}/tools/meson/meson-0.43.0) + set(URL "https://github.com/mesonbuild/meson/archive/0.43.0.zip") + set(ARCHIVE "meson-0.43.0.zip") + set(HASH dde4de72eff37046731224f32aa5f4618d45bdf148cec2d1af6e25e7522ebc2b04aedc9eceed483dfa93823a0ea7ea472d0c0c9380061bf3ee2f16b87dd1425e) elseif(VAR MATCHES "FLEX") set(PROGNAME win_flex) set(PATHS ${DOWNLOADS}/tools/win_flex) -- cgit v1.2.3 From c51f82bb6d29e59b430b088b5ad9c9da78da9d6c Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Wed, 18 Oct 2017 14:18:52 +0300 Subject: Strip 'v' prefixes which are not really version parts --- ports/cctz/CONTROL | 2 +- ports/folly/CONTROL | 2 +- ports/openblas/CONTROL | 2 +- ports/spirv-tools/CONTROL | 2 +- ports/thor/CONTROL | 2 +- ports/tinyexr/CONTROL | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/cctz/CONTROL b/ports/cctz/CONTROL index fb125fa13..6ed9a0ce1 100644 --- a/ports/cctz/CONTROL +++ b/ports/cctz/CONTROL @@ -1,3 +1,3 @@ Source: cctz -Version: v2.1 +Version: 2.1 Description: two libraries that cooperate with to give C++ programmers all the necessary tools for computing with dates, times, and time zones in a simple and correct manner. diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 3bff7ba88..027979146 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,4 +1,4 @@ Source: folly -Version: v2017.10.02.00 +Version: 2017.10.02.00 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: zlib, openssl, boost, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy diff --git a/ports/openblas/CONTROL b/ports/openblas/CONTROL index 808d52ac9..78617d700 100644 --- a/ports/openblas/CONTROL +++ b/ports/openblas/CONTROL @@ -1,3 +1,3 @@ Source: openblas -Version: v0.2.20-2 +Version: 0.2.20-2 Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL index da2e2f29b..33c43d628 100644 --- a/ports/spirv-tools/CONTROL +++ b/ports/spirv-tools/CONTROL @@ -1,3 +1,3 @@ Source: spirv-tools -Version: v2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 +Version: 2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 Description: API and commands for processing SPIR-V modules diff --git a/ports/thor/CONTROL b/ports/thor/CONTROL index 9ad978099..cdb393f38 100644 --- a/ports/thor/CONTROL +++ b/ports/thor/CONTROL @@ -1,4 +1,4 @@ Source: thor -Version: v2.0-1 +Version: 2.0-1 Description: Extends the multimedia library SFML with higher-level features Build-Depends: sfml, aurora diff --git a/ports/tinyexr/CONTROL b/ports/tinyexr/CONTROL index 8ac085f68..54b459b49 100644 --- a/ports/tinyexr/CONTROL +++ b/ports/tinyexr/CONTROL @@ -1,3 +1,3 @@ Source: tinyexr -Version: v0.9.5-d16ea6 +Version: 0.9.5-d16ea6 Description: Library to load and save OpenEXR(.exr) images -- cgit v1.2.3 From 7a4023f1dcb3686d7d8deaf9e40cc0283e508b08 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 18 Oct 2017 14:47:04 -0700 Subject: [autocomplete] Don't try to autocomplete triplets to --options --- toolsrc/src/vcpkg/commands.autocomplete.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index e36bf8430..410bfcd0d 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -134,7 +134,8 @@ namespace vcpkg::Commands::Autocomplete const auto prefix = match[2].str(); std::vector results; - if (Strings::case_insensitive_ascii_starts_with(prefix, "-")) + const bool is_option = Strings::case_insensitive_ascii_starts_with(prefix, "-"); + if (is_option) { results = Util::fmap(command.structure.switches, [](auto&& s) -> std::string { return s; }); } @@ -147,7 +148,7 @@ namespace vcpkg::Commands::Autocomplete return Strings::case_insensitive_ascii_starts_with(s, prefix); }); - if (command.name == "install" && results.size() == 1) + if (command.name == "install" && results.size() == 1 && !is_option) { const auto port_at_each_triplet = combine_port_with_triplets(results[0], paths.get_available_triplets()); -- cgit v1.2.3 From ecdfd3c8e3a4b924bfad5b70f6557dd9f337bd1c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 18 Oct 2017 19:04:14 -0700 Subject: ci now accepts multiple triplets. Refactoring to accomodate --- toolsrc/include/vcpkg/install.h | 28 +++++++----- toolsrc/src/vcpkg/commands.ci.cpp | 49 +++++++++++++++++---- toolsrc/src/vcpkg/install.cpp | 93 +++++++++++++++++++++------------------ 3 files changed, 108 insertions(+), 62 deletions(-) diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index db6055f4f..809befb16 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -17,13 +17,22 @@ namespace vcpkg::Install inline KeepGoing to_keep_going(const bool value) { return value ? KeepGoing::YES : KeepGoing::NO; } - enum class PrintSummary + struct SpecSummary { - NO = 0, - YES + explicit SpecSummary(const PackageSpec& spec); + + PackageSpec spec; + Build::BuildResult result; + std::string timing; }; - inline PrintSummary to_print_summary(const bool value) { return value ? PrintSummary::YES : PrintSummary::NO; } + struct InstallSummary + { + std::vector results; + std::string total_elapsed_time; + + void print() const; + }; struct InstallDir { @@ -58,12 +67,11 @@ namespace vcpkg::Install const BinaryControlFile& binary_paragraph, StatusParagraphs* status_db); - void perform_and_exit_ex(const std::vector& action_plan, - const Build::BuildPackageOptions& install_plan_options, - const KeepGoing keep_going, - const PrintSummary print_summary, - const VcpkgPaths& paths, - StatusParagraphs& status_db); + InstallSummary perform(const std::vector& action_plan, + const Build::BuildPackageOptions& install_plan_options, + const KeepGoing keep_going, + const VcpkgPaths& paths, + StatusParagraphs& status_db); extern const CommandStructure COMMAND_STRUCTURE; diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 1c98d1d83..ffeaad790 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -30,15 +30,10 @@ namespace vcpkg::Commands::CI }); } - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + static Install::InstallSummary run_ci_on_triplet(const Triplet& triplet, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Help::create_example_string("ci x64-windows"); - args.check_max_arg_count(1, EXAMPLE); - const Triplet triplet = args.command_arguments.size() == 1 - ? Triplet::from_canonical_name(args.command_arguments.at(0)) - : default_triplet; Input::check_triplet(triplet, paths); - args.check_and_get_optional_command_arguments({}); + const std::vector specs = load_all_package_specs(paths.get_filesystem(), paths.ports, triplet); StatusParagraphs status_db = database_load_check(paths); @@ -54,8 +49,44 @@ namespace vcpkg::Commands::CI return Dependencies::AnyAction(std::move(install_action)); }); - Install::perform_and_exit_ex( - action_plan, install_plan_options, Install::KeepGoing::YES, Install::PrintSummary::YES, paths, status_db); + return Install::perform(action_plan, install_plan_options, Install::KeepGoing::YES, paths, status_db); + } + + struct TripletAndSummary + { + Triplet triplet; + Install::InstallSummary summary; + }; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + { + static const std::string EXAMPLE = Help::create_example_string("ci x64-windows"); + args.check_and_get_optional_command_arguments({}); + + std::vector triplets; + for (const std::string& triplet : args.command_arguments) + { + triplets.push_back(Triplet::from_canonical_name(triplet)); + } + + if (triplets.empty()) + { + triplets.push_back(default_triplet); + } + + std::vector results; + for (const Triplet& triplet : triplets) + { + Install::InstallSummary summary = run_ci_on_triplet(triplet, paths); + results.push_back({triplet, std::move(summary)}); + } + + for (auto&& result : results) + { + System::println("\nTriplet: %s", result.triplet); + System::println("Total elapsed time: %s", result.summary.total_elapsed_time); + result.summary.print(); + } Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 70757ff38..bd924fcba 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -444,15 +444,41 @@ namespace vcpkg::Install } } - void perform_and_exit_ex(const std::vector& action_plan, - const Build::BuildPackageOptions& install_plan_options, - const KeepGoing keep_going, - const PrintSummary print_summary, - const VcpkgPaths& paths, - StatusParagraphs& status_db) + void InstallSummary::print() const { - std::vector results; - std::vector timing; + System::println("RESULTS"); + + for (const SpecSummary& result : this->results) + { + System::println(" %s: %s: %s", result.spec, Build::to_string(result.result), result.timing); + } + + std::map summary; + for (const BuildResult& v : Build::BUILD_RESULT_VALUES) + { + summary[v] = 0; + } + + for (const SpecSummary& r : this->results) + { + summary[r.result]++; + } + + System::println("\nSUMMARY"); + for (const std::pair& entry : summary) + { + System::println(" %s: %d", Build::to_string(entry.first), entry.second); + } + } + + InstallSummary perform(const std::vector& action_plan, + const Build::BuildPackageOptions& install_plan_options, + const KeepGoing keep_going, + const VcpkgPaths& paths, + StatusParagraphs& status_db) + { + std::vector results; + const auto timer = Chrono::ElapsedTime::create_started(); size_t counter = 0; const size_t package_count = action_plan.size(); @@ -462,11 +488,11 @@ namespace vcpkg::Install const auto build_timer = Chrono::ElapsedTime::create_started(); counter++; - const std::string display_name = action.spec().to_string(); + const PackageSpec& spec = action.spec(); + const std::string display_name = spec.to_string(); System::println("Starting package %d/%d: %s", counter, package_count, display_name); - timing.push_back("0"); - results.push_back(BuildResult::NULLVALUE); + results.push_back(SpecSummary{spec}); if (const auto install_action = action.install_plan.get()) { @@ -478,7 +504,7 @@ namespace vcpkg::Install Checks::exit_fail(VCPKG_LINE_INFO); } - results.back() = result; + results.back().result = result; } else if (const auto remove_action = action.remove_plan.get()) { @@ -490,38 +516,11 @@ namespace vcpkg::Install Checks::unreachable(VCPKG_LINE_INFO); } - timing.back() = build_timer.to_string(); + results.back().timing = build_timer.to_string(); System::println("Elapsed time for package %s: %s", display_name, build_timer.to_string()); } - System::println("Total time taken: %s", timer.to_string()); - - if (print_summary == PrintSummary::YES) - { - for (size_t i = 0; i < results.size(); i++) - { - System::println("%s: %s: %s", action_plan[i].spec(), Build::to_string(results[i]), timing[i]); - } - - std::map summary; - for (const BuildResult& v : Build::BUILD_RESULT_VALUES) - { - summary[v] = 0; - } - - for (const BuildResult& r : results) - { - summary[r]++; - } - - System::println("\n\nSUMMARY"); - for (const std::pair& entry : summary) - { - System::println(" %s: %d", Build::to_string(entry.first), entry.second); - } - } - - Checks::exit_success(VCPKG_LINE_INFO); + return InstallSummary{results, timer.to_string()}; } static const std::string OPTION_DRY_RUN = "--dry-run"; @@ -583,7 +582,6 @@ namespace vcpkg::Install const bool no_downloads = options.find(OPTION_NO_DOWNLOADS) != options.cend(); const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); const KeepGoing keep_going = to_keep_going(options.find(OPTION_KEEP_GOING) != options.cend()); - const PrintSummary print_summary = to_print_summary(keep_going == KeepGoing::YES); // create the plan StatusParagraphs status_db = database_load_check(paths); @@ -635,8 +633,17 @@ namespace vcpkg::Install Checks::exit_success(VCPKG_LINE_INFO); } - perform_and_exit_ex(action_plan, install_plan_options, keep_going, print_summary, paths, status_db); + const InstallSummary summary = perform(action_plan, install_plan_options, keep_going, paths, status_db); + + System::println("\nTotal elapsed time: %s", summary.total_elapsed_time); + + if (keep_going == KeepGoing::YES) + { + summary.print(); + } Checks::exit_success(VCPKG_LINE_INFO); } + + SpecSummary::SpecSummary(const PackageSpec& spec) : spec(spec), result(BuildResult::NULLVALUE), timing("0") {} } -- cgit v1.2.3 From 9964d84b53442ef4f555cfe090ed22503b90d213 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 18 Oct 2017 19:20:11 -0700 Subject: Add extra checks on the return Visual Studio instances --- toolsrc/src/vcpkg/vcpkgpaths.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 34c661afd..2f2dd877e 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -330,10 +330,19 @@ namespace vcpkg VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances"); const std::vector instances_as_strings = Strings::split(ec_data.output, "\n"); + Checks::check_exit( + VCPKG_LINE_INFO, !instances_as_strings.empty(), "Could not detect any Visual Studio instances"); + std::vector output; for (const std::string& instance_as_string : instances_as_strings) { const std::vector split = Strings::split(instance_as_string, "::"); + Checks::check_exit(VCPKG_LINE_INFO, + split.size() == 4, + "Invalid Visual Studio instance format.\n" + "Expected: PreferenceWeight::ReleaseType::Version::PathToVisualStudio\n" + "Actual : %s", + instance_as_string); output.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); } -- cgit v1.2.3 From a127ba1f2f27300a085e446e99fc1714da648416 Mon Sep 17 00:00:00 2001 From: Aaron Clauson Date: Thu, 19 Oct 2017 14:25:25 +1100 Subject: Port for Berkeley DB v4.8.30 --- ports/berkeleydb/CMakeLists.txt | 276 ++++++++++++++++++++++++++++++++++++++++ ports/berkeleydb/CONTROL | 3 + ports/berkeleydb/portfile.cmake | 29 +++++ 3 files changed, 308 insertions(+) create mode 100644 ports/berkeleydb/CMakeLists.txt create mode 100644 ports/berkeleydb/CONTROL create mode 100644 ports/berkeleydb/portfile.cmake diff --git a/ports/berkeleydb/CMakeLists.txt b/ports/berkeleydb/CMakeLists.txt new file mode 100644 index 000000000..1eb130c3e --- /dev/null +++ b/ports/berkeleydb/CMakeLists.txt @@ -0,0 +1,276 @@ +cmake_minimum_required(VERSION 3.8) +project(berkeleydb C CXX) + +option(INSTALL_HEADERS "Install header files" ON) + +add_definitions( + -DWIN32 + -D_WINDOWS + -D_CRT_SECURE_NO_DEPRECATE + -D_CRT_NONSTDC_NO_DEPRECATE + -D_LIB +) + +if (BUILD_SHARED_LIBS) + add_definitions( + -D_LIB + ) +else() + add_definitions( + -DDB_CREATE_DLL + -D_USRDLL + ) +endif() + +add_library(libdb48 + btree/bt_compact.c + btree/bt_compare.c + btree/bt_compress.c + btree/bt_conv.c + btree/bt_curadj.c + btree/bt_cursor.c + btree/bt_delete.c + btree/bt_method.c + btree/bt_open.c + btree/bt_put.c + btree/bt_rec.c + btree/bt_reclaim.c + btree/bt_recno.c + btree/bt_rsearch.c + btree/bt_search.c + btree/bt_split.c + btree/bt_stat.c + btree/bt_upgrade.c + btree/bt_verify.c + btree/btree_auto.c + db/crdel_auto.c + db/crdel_rec.c + common/crypto_stub.c + cxx/cxx_db.cpp + cxx/cxx_dbc.cpp + cxx/cxx_dbt.cpp + cxx/cxx_env.cpp + cxx/cxx_except.cpp + cxx/cxx_lock.cpp + cxx/cxx_logc.cpp + cxx/cxx_mpool.cpp + cxx/cxx_multi.cpp + cxx/cxx_seq.cpp + cxx/cxx_txn.cpp + db/db.c + db/db_am.c + db/db_auto.c + common/db_byteorder.c + db/db_cam.c + db/db_cds.c + db/db_conv.c + db/db_dispatch.c + db/db_dup.c + common/db_err.c + common/db_getlong.c + common/db_idspace.c + common/db_compint.c + db/db_iface.c + db/db_join.c + common/db_log2.c + db/db_meta.c + db/db_method.c + db/db_open.c + db/db_overflow.c + db/db_ovfl_vrfy.c + db/db_pr.c + db/db_rec.c + db/db_reclaim.c + db/db_remove.c + db/db_rename.c + db/db_ret.c + db/db_setid.c + db/db_setlsn.c + common/db_shash.c + db/db_sort_multiple.c + db/db_stati.c + db/db_truncate.c + db/db_upg.c + db/db_upg_opd.c + db/db_vrfy.c + db/db_vrfyutil.c + db/partition.c + dbm/dbm.c + dbreg/dbreg.c + dbreg/dbreg_auto.c + dbreg/dbreg_rec.c + dbreg/dbreg_stat.c + dbreg/dbreg_util.c + common/dbt.c + env/env_alloc.c + env/env_config.c + env/env_failchk.c + env/env_file.c + env/env_globals.c + env/env_method.c + env/env_name.c + env/env_open.c + env/env_recover.c + env/env_region.c + env/env_register.c + env/env_sig.c + env/env_stat.c + fileops/fileops_auto.c + fileops/fop_basic.c + fileops/fop_rec.c + fileops/fop_util.c + hash/hash.c + hash/hash_auto.c + hash/hash_conv.c + hash/hash_dup.c + hash/hash_func.c + hash/hash_meta.c + hash/hash_method.c + hash/hash_open.c + hash/hash_page.c + hash/hash_rec.c + hash/hash_reclaim.c + hash/hash_stat.c + hash/hash_upgrade.c + hash/hash_verify.c + hmac/hmac.c + hsearch/hsearch.c + build_windows/libdb.def + lock/lock.c + lock/lock_deadlock.c + lock/lock_failchk.c + lock/lock_id.c + lock/lock_list.c + lock/lock_method.c + lock/lock_region.c + lock/lock_stat.c + lock/lock_timer.c + lock/lock_util.c + log/log.c + log/log_archive.c + log/log_compare.c + log/log_debug.c + log/log_get.c + log/log_method.c + log/log_put.c + log/log_stat.c + common/mkpath.c + mp/mp_alloc.c + mp/mp_bh.c + mp/mp_fget.c + mp/mp_fmethod.c + mp/mp_fopen.c + mp/mp_fput.c + mp/mp_fset.c + mp/mp_method.c + mp/mp_mvcc.c + mp/mp_region.c + mp/mp_register.c + mp/mp_resize.c + mp/mp_stat.c + mp/mp_sync.c + mp/mp_trickle.c + mutex/mut_alloc.c + mutex/mut_failchk.c + mutex/mut_method.c + mutex/mut_region.c + mutex/mut_stat.c + mutex/mut_win32.c + common/openflags.c + os/os_abort.c + os/os_addrinfo.c + os_windows/os_abs.c + os/os_alloc.c + os_windows/os_clock.c + os_windows/os_config.c + os_windows/os_cpu.c + os/os_ctime.c + os_windows/os_dir.c + os_windows/os_errno.c + os_windows/os_fid.c + os_windows/os_flock.c + os_windows/os_fsync.c + os_windows/os_getenv.c + os_windows/os_handle.c + os_windows/os_map.c + os_windows/os_mkdir.c + os_windows/os_open.c + os/os_pid.c + os_windows/os_rename.c + os/os_root.c + os/os_rpath.c + os_windows/os_rw.c + os_windows/os_seek.c + os/os_stack.c + os_windows/os_stat.c + os/os_tmpdir.c + os_windows/os_truncate.c + os/os_uid.c + os_windows/os_unlink.c + os_windows/os_yield.c + qam/qam.c + qam/qam_auto.c + qam/qam_conv.c + qam/qam_files.c + qam/qam_method.c + qam/qam_open.c + qam/qam_rec.c + qam/qam_stat.c + qam/qam_upgrade.c + qam/qam_verify.c + rep/rep_auto.c + rep/rep_backup.c + rep/rep_elect.c + rep/rep_lease.c + rep/rep_log.c + rep/rep_method.c + rep/rep_record.c + rep/rep_region.c + rep/rep_stat.c + rep/rep_util.c + rep/rep_verify.c + repmgr/repmgr_auto.c + repmgr/repmgr_elect.c + repmgr/repmgr_method.c + repmgr/repmgr_msg.c + repmgr/repmgr_net.c + repmgr/repmgr_queue.c + repmgr/repmgr_sel.c + repmgr/repmgr_stat.c + repmgr/repmgr_util.c + repmgr/repmgr_windows.c + sequence/seq_stat.c + sequence/sequence.c + hmac/sha1.c + clib/strsep.c + txn/txn.c + txn/txn_auto.c + txn/txn_chkpt.c + txn/txn_failchk.c + txn/txn_method.c + txn/txn_rec.c + txn/txn_recover.c + txn/txn_region.c + txn/txn_stat.c + txn/txn_util.c + common/os_method.c + common/util_cache.c + common/util_log.c + common/util_sig.c + common/zerofill.c +) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} build_windows dbinc) + +target_link_libraries(libdb48 PUBLIC ws2_32.lib) + +install(TARGETS libdb48 + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(INSTALL_HEADERS) + file(GLOB HEADERS build_windows/*.h) + install(FILES ${HEADERS} DESTINATION include) +endif() \ No newline at end of file diff --git a/ports/berkeleydb/CONTROL b/ports/berkeleydb/CONTROL new file mode 100644 index 000000000..a0ac528b7 --- /dev/null +++ b/ports/berkeleydb/CONTROL @@ -0,0 +1,3 @@ +Source: berkeleydb +Version: 4.8.30 +Description: A high-performance embedded database for key/value data. diff --git a/ports/berkeleydb/portfile.cmake b/ports/berkeleydb/portfile.cmake new file mode 100644 index 000000000..614b89409 --- /dev/null +++ b/ports/berkeleydb/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/db-4.8.30.NC) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.oracle.com/berkeley-db/db-4.8.30.NC.zip" + FILENAME "db-4.8.30.NC.zip" + SHA512 59c1d2d5a3551f988ab1dc063900572b67ad087537e0d71760de34601f9ebd4d5c070a49b809bec4a599a62417e9a162683ce0f6442deb1a0dadb80764bf6eab +) +vcpkg_extract_source_archive(${ARCHIVE}) + +#message("CURRENT_PORT_DIR=${CURRENT_PORT_DIR}") + +message(STATUS "Building") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF + OPTIONS_DEBUG +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/berkeleydb RENAME copyright) -- cgit v1.2.3 From 2f02ebd8209abe011d91e9ad5dac66f88aca70de Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 18 Oct 2017 20:44:46 -0700 Subject: [berkeleydb] Remove debugging messages, use LF endings --- ports/berkeleydb/portfile.cmake | 52 ++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/ports/berkeleydb/portfile.cmake b/ports/berkeleydb/portfile.cmake index 614b89409..6a7e30a05 100644 --- a/ports/berkeleydb/portfile.cmake +++ b/ports/berkeleydb/portfile.cmake @@ -1,29 +1,23 @@ -include(vcpkg_common_functions) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/db-4.8.30.NC) - -vcpkg_download_distfile(ARCHIVE - URLS "http://download.oracle.com/berkeley-db/db-4.8.30.NC.zip" - FILENAME "db-4.8.30.NC.zip" - SHA512 59c1d2d5a3551f988ab1dc063900572b67ad087537e0d71760de34601f9ebd4d5c070a49b809bec4a599a62417e9a162683ce0f6442deb1a0dadb80764bf6eab -) -vcpkg_extract_source_archive(${ARCHIVE}) - -#message("CURRENT_PORT_DIR=${CURRENT_PORT_DIR}") - -message(STATUS "Building") - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG - -DINSTALL_HEADERS=OFF - OPTIONS_DEBUG -) - -vcpkg_install_cmake() - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/berkeleydb RENAME copyright) +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/db-4.8.30.NC) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.oracle.com/berkeley-db/db-4.8.30.NC.zip" + FILENAME "db-4.8.30.NC.zip" + SHA512 59c1d2d5a3551f988ab1dc063900572b67ad087537e0d71760de34601f9ebd4d5c070a49b809bec4a599a62417e9a162683ce0f6442deb1a0dadb80764bf6eab +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/berkeleydb RENAME copyright) -- cgit v1.2.3 From 405d34b4a0af89ccb87000015656572cff19b7da Mon Sep 17 00:00:00 2001 From: LazyHamster Date: Thu, 19 Oct 2017 15:19:29 +0300 Subject: [GMime] Initial port. --- ports/gmime/CMakeLists.txt | 179 ++++++++++++++ ports/gmime/CONTROL | 4 + ports/gmime/config.h | 184 ++++++++++++++ ports/gmime/gmime.def | 589 +++++++++++++++++++++++++++++++++++++++++++++ ports/gmime/idna.h | 3 + ports/gmime/portfile.cmake | 36 +++ 6 files changed, 995 insertions(+) create mode 100644 ports/gmime/CMakeLists.txt create mode 100644 ports/gmime/CONTROL create mode 100644 ports/gmime/config.h create mode 100644 ports/gmime/gmime.def create mode 100644 ports/gmime/idna.h create mode 100644 ports/gmime/portfile.cmake diff --git a/ports/gmime/CMakeLists.txt b/ports/gmime/CMakeLists.txt new file mode 100644 index 000000000..18ec89518 --- /dev/null +++ b/ports/gmime/CMakeLists.txt @@ -0,0 +1,179 @@ +cmake_minimum_required(VERSION 3.8) + +project(gmime C) + +set(GLIB_LIB_SUFFIX 2.0) +set(GMIME_DLL_SUFFIX 3) +set(GMIME_LIB_SUFFIX 3.0) + +# Find glib +find_path(GLIB_INCLUDE_DIR glib.h) +find_library(GLIB_GLIB_LIBRARY glib-${GLIB_LIB_SUFFIX}) +find_library(GLIB_GIO_LIBRARY gio-${GLIB_LIB_SUFFIX}) +find_library(GLIB_GOBJECT_LIBRARY gobject-${GLIB_LIB_SUFFIX}) +set(GLIB_LIBRARIES ${GLIB_GLIB_LIBRARY} ${GLIB_GIO_LIBRARY} ${GLIB_GOBJECT_LIBRARY}) + +# Find other deps +find_path(ICONV_INCLUDE_DIR iconv.h) +find_library(ICONV_LIBRARY NAMES iconv libiconv) + +find_library(IDN_LIBRARY NAMES libidn2 libidn) + +find_package(zlib REQUIRED) + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + +add_definitions(-DHAVE_CONFIG_H) +add_definitions(-DG_LOG_DOMAIN="GMime") + +# List the source files +set(LIB_SRC gmime/gmime.c + gmime/gmime-application-pkcs7-mime.c + gmime/gmime-certificate.c + gmime/gmime-charset.c + gmime/gmime-common.c + gmime/gmime-content-type.c + gmime/gmime-crypto-context.c + gmime/gmime-data-wrapper.c + gmime/gmime-disposition.c + gmime/gmime-encodings.c + gmime/gmime-events.c + gmime/gmime-filter.c + gmime/gmime-filter-basic.c + gmime/gmime-filter-best.c + gmime/gmime-filter-charset.c + gmime/gmime-filter-checksum.c + gmime/gmime-filter-dos2unix.c + gmime/gmime-filter-enriched.c + gmime/gmime-filter-from.c + gmime/gmime-filter-gzip.c + gmime/gmime-filter-html.c + gmime/gmime-filter-smtp-data.c + gmime/gmime-filter-strip.c + gmime/gmime-filter-unix2dos.c + gmime/gmime-filter-windows.c + gmime/gmime-filter-yenc.c + gmime/gmime-format-options.c + gmime/gmime-gpg-context.c + gmime/gmime-gpgme-utils.c + gmime/gmime-header.c + gmime/gmime-iconv.c + gmime/gmime-iconv-utils.c + gmime/gmime-message.c + gmime/gmime-message-part.c + gmime/gmime-message-partial.c + gmime/gmime-multipart.c + gmime/gmime-multipart-encrypted.c + gmime/gmime-multipart-signed.c + gmime/gmime-object.c + gmime/gmime-param.c + gmime/gmime-parse-utils.c + gmime/gmime-parser.c + gmime/gmime-parser-options.c + gmime/gmime-part.c + gmime/gmime-part-iter.c + gmime/gmime-pkcs7-context.c + gmime/gmime-references.c + gmime/gmime-signature.c + gmime/gmime-stream.c + gmime/gmime-stream-buffer.c + gmime/gmime-stream-cat.c + gmime/gmime-stream-file.c + gmime/gmime-stream-filter.c + gmime/gmime-stream-fs.c + gmime/gmime-stream-gio.c + gmime/gmime-stream-mem.c + gmime/gmime-stream-mmap.c + gmime/gmime-stream-null.c + gmime/gmime-stream-pipe.c + gmime/gmime-text-part.c + gmime/gmime-utils.c + gmime/internet-address.c + util/packed.c + util/url-scanner.c + util/gtrie.c +) + +set (LIB_HEADERS gmime/gmime.h + gmime/gmime-version.h + gmime/gmime-error.h + gmime/gmime-charset.h + gmime/gmime-iconv.h + gmime/gmime-iconv-utils.h + gmime/gmime-param.h + gmime/gmime-content-type.h + gmime/gmime-disposition.h + gmime/gmime-data-wrapper.h + gmime/gmime-object.h + gmime/gmime-part.h + gmime/gmime-text-part.h + gmime/gmime-part-iter.h + gmime/gmime-application-pkcs7-mime.h + gmime/gmime-multipart.h + gmime/gmime-multipart-encrypted.h + gmime/gmime-multipart-signed.h + gmime/gmime-message.h + gmime/gmime-message-part.h + gmime/gmime-message-partial.h + gmime/internet-address.h + gmime/gmime-encodings.h + gmime/gmime-format-options.h + gmime/gmime-parser-options.h + gmime/gmime-parser.h + gmime/gmime-utils.h + gmime/gmime-references.h + gmime/gmime-stream.h + gmime/gmime-stream-buffer.h + gmime/gmime-stream-cat.h + gmime/gmime-stream-file.h + gmime/gmime-stream-filter.h + gmime/gmime-stream-fs.h + gmime/gmime-stream-gio.h + gmime/gmime-stream-mem.h + gmime/gmime-stream-mmap.h + gmime/gmime-stream-null.h + gmime/gmime-stream-pipe.h + gmime/gmime-filter.h + gmime/gmime-filter-basic.h + gmime/gmime-filter-best.h + gmime/gmime-filter-charset.h + gmime/gmime-filter-checksum.h + gmime/gmime-filter-dos2unix.h + gmime/gmime-filter-enriched.h + gmime/gmime-filter-from.h + gmime/gmime-filter-gzip.h + gmime/gmime-filter-html.h + gmime/gmime-filter-smtp-data.h + gmime/gmime-filter-strip.h + gmime/gmime-filter-unix2dos.h + gmime/gmime-filter-windows.h + gmime/gmime-filter-yenc.h + gmime/gmime-crypto-context.h + gmime/gmime-pkcs7-context.h + gmime/gmime-gpg-context.h +) + +if(MSVC AND BUILD_SHARED_LIBS) + set(MSVC_SRC gmime.def) +endif() + +add_library(${PROJECT_NAME} ${LIB_SRC} ${MSVC_SRC}) + +set_target_properties(${PROJECT_NAME} PROPERTIES + OUTPUT_NAME ${PROJECT_NAME}-${GMIME_DLL_SUFFIX} + ARCHIVE_OUTPUT_NAME ${PROJECT_NAME}-${GMIME_LIB_SUFFIX} +) + +target_include_directories(${PROJECT_NAME} PRIVATE . ./util ${GLIB_INCLUDE_DIR} ${ICONV_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}) +target_link_libraries(${PROJECT_NAME} PRIVATE ${GLIB_LIBRARIES} ${ICONV_LIBRARY} ${ZLIB_LIBRARIES} ${IDN_LIBRARY}) +target_link_libraries(${PROJECT_NAME} PRIVATE Ws2_32.lib) + +install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES ${LIB_HEADERS} DESTINATION include/gmime) diff --git a/ports/gmime/CONTROL b/ports/gmime/CONTROL new file mode 100644 index 000000000..215df5995 --- /dev/null +++ b/ports/gmime/CONTROL @@ -0,0 +1,4 @@ +Source: gmime +Version: 3.0.2 +Build-Depends: zlib, glib, libiconv, libidn2 +Description: GMime is a C/C++ library which may be used for the creation and parsing of messages using the Multipurpose Internet Mail Extension (MIME). diff --git a/ports/gmime/config.h b/ports/gmime/config.h new file mode 100644 index 000000000..578223e20 --- /dev/null +++ b/ports/gmime/config.h @@ -0,0 +1,184 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if GMime should enable GpgME PGP and S/MIME support. */ +/* #undef ENABLE_CRYPTO */ + +/* Define if GMime should enable warning output. */ +/* #undef ENABLE_WARNINGS */ + +/* Define to the GMime version */ +#define GMIME_VERSION "3.0.2" + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the `fsync' function. */ +/* #undef HAVE_FSYNC */ + +/* Define to 1 if you have the `getaddrinfo' function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getdomainname' function. */ +/* #undef HAVE_GETDOMAINNAME */ + +/* Define to 1 if you have the `gethostname' function. */ +#define HAVE_GETHOSTNAME 1 + +/* Define to 1 if you have the header with the GNU `getopt_long' + function. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 to use auto-detected iconv-friendly charset names. */ +/* #undef HAVE_ICONV_DETECT_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have a working `mmap' system call. */ +/* #undef HAVE_MMAP */ + +/* Define to 1 if you have the `msync' function. */ +/* #undef HAVE_MSYNC */ + +/* Define to 1 if you have the `munmap' function. */ +/* #undef HAVE_MUNMAP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETDB_H */ + +/* Define to 1 if you have the `poll' function. */ +/* #undef HAVE_POLL */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_POLL_H */ + +/* Define to 1 if you have the `select' function. */ +/* #undef HAVE_SELECT */ + +/* 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. */ +/* #undef HAVE_STRINGS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_MMAN_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PARAM_H */ + +/* 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_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if struct utsname has a domainname member */ +/* #undef HAVE_UTSNAME_DOMAINNAME */ + +/* Define to 1 if you have the header file. */ +#define HAVE_WINSOCK2_H 1 + +/* Define to 1 if GNU Libidn should be used. */ +#define LIBIDN 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define with a value if your does not define MAXHOSTNAMELEN */ +/* #undef MAXHOSTNAMELEN */ + +/* Define to 0 if your system does not have the O_LARGEFILE flag */ +/* #undef O_LARGEFILE */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://github.com/jstedfast/gmime/issues" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "gmime" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "gmime 3.0.2" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "gmime" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "3.0.2" + +/* The size of `off_t', as computed by sizeof. */ +#define SIZEOF_OFF_T 8 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + +/* The size of `ssize_t', as computed by sizeof. */ +#define SIZEOF_SSIZE_T 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Using GNU libiconv */ +/* #undef USE_LIBICONV_GNU */ + +/* Using a native implementation of iconv in a separate library */ +#define USE_LIBICONV_NATIVE 1 + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#define inline __inline +#endif + +/* Define to `int' if does not define. */ +/* #undef mode_t */ + +/* Define to `unsigned long int' if does not define. */ +/* #undef nfds_t */ + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to `int' if does not define. */ +#define ssize_t intptr_t + +#ifdef _MSC_VER +#pragma warning(disable: 4018) +#pragma warning(disable: 4101) +#endif diff --git a/ports/gmime/gmime.def b/ports/gmime/gmime.def new file mode 100644 index 000000000..463dda27e --- /dev/null +++ b/ports/gmime/gmime.def @@ -0,0 +1,589 @@ +EXPORTS + +g_mime_application_pkcs7_mime_decrypt +g_mime_application_pkcs7_mime_encrypt +g_mime_application_pkcs7_mime_get_smime_type +g_mime_application_pkcs7_mime_get_type +g_mime_application_pkcs7_mime_new +g_mime_application_pkcs7_mime_sign +g_mime_application_pkcs7_mime_verify +g_mime_certificate_get_created +g_mime_certificate_get_digest_algo +g_mime_certificate_get_email +g_mime_certificate_get_expires +g_mime_certificate_get_fingerprint +g_mime_certificate_get_issuer_name +g_mime_certificate_get_issuer_serial +g_mime_certificate_get_key_id +g_mime_certificate_get_name +g_mime_certificate_get_pubkey_algo +g_mime_certificate_get_trust +g_mime_certificate_get_type +g_mime_certificate_list_add +g_mime_certificate_list_clear +g_mime_certificate_list_contains +g_mime_certificate_list_get_certificate +g_mime_certificate_list_get_type +g_mime_certificate_list_index_of +g_mime_certificate_list_insert +g_mime_certificate_list_length +g_mime_certificate_list_new +g_mime_certificate_list_remove +g_mime_certificate_list_remove_at +g_mime_certificate_list_set_certificate +g_mime_certificate_new +g_mime_certificate_set_created +g_mime_certificate_set_digest_algo +g_mime_certificate_set_email +g_mime_certificate_set_expires +g_mime_certificate_set_fingerprint +g_mime_certificate_set_issuer_name +g_mime_certificate_set_issuer_serial +g_mime_certificate_set_key_id +g_mime_certificate_set_name +g_mime_certificate_set_pubkey_algo +g_mime_certificate_set_trust +g_mime_charset_best +g_mime_charset_best_name +g_mime_charset_can_encode +g_mime_charset_canon_name +g_mime_charset_iconv_name +g_mime_charset_init +g_mime_charset_iso_to_windows +g_mime_charset_language +g_mime_charset_locale_name +g_mime_charset_map_init +g_mime_charset_map_shutdown +g_mime_charset_name +g_mime_charset_step +g_mime_check_version +g_mime_content_disposition_encode +g_mime_content_disposition_get_disposition +g_mime_content_disposition_get_parameter +g_mime_content_disposition_get_parameters +g_mime_content_disposition_get_type +g_mime_content_disposition_is_attachment +g_mime_content_disposition_new +g_mime_content_disposition_parse +g_mime_content_disposition_set_disposition +g_mime_content_disposition_set_parameter +g_mime_content_encoding_from_string +g_mime_content_encoding_to_string +g_mime_content_type_encode +g_mime_content_type_get_media_subtype +g_mime_content_type_get_media_type +g_mime_content_type_get_mime_type +g_mime_content_type_get_parameter +g_mime_content_type_get_parameters +g_mime_content_type_get_type +g_mime_content_type_is_type +g_mime_content_type_new +g_mime_content_type_parse +g_mime_content_type_set_media_subtype +g_mime_content_type_set_media_type +g_mime_content_type_set_parameter +g_mime_crypto_context_decrypt +g_mime_crypto_context_digest_id +g_mime_crypto_context_digest_name +g_mime_crypto_context_encrypt +g_mime_crypto_context_export_keys +g_mime_crypto_context_get_encryption_protocol +g_mime_crypto_context_get_key_exchange_protocol +g_mime_crypto_context_get_request_password +g_mime_crypto_context_get_signature_protocol +g_mime_crypto_context_get_type +g_mime_crypto_context_import_keys +g_mime_crypto_context_new +g_mime_crypto_context_register +g_mime_crypto_context_set_request_password +g_mime_crypto_context_shutdown +g_mime_crypto_context_sign +g_mime_crypto_context_verify +g_mime_data_wrapper_get_encoding +g_mime_data_wrapper_get_stream +g_mime_data_wrapper_get_type +g_mime_data_wrapper_new +g_mime_data_wrapper_new_with_stream +g_mime_data_wrapper_set_encoding +g_mime_data_wrapper_set_stream +g_mime_data_wrapper_write_to_stream +g_mime_decrypt_result_get_cipher +g_mime_decrypt_result_get_mdc +g_mime_decrypt_result_get_recipients +g_mime_decrypt_result_get_session_key +g_mime_decrypt_result_get_signatures +g_mime_decrypt_result_get_type +g_mime_decrypt_result_new +g_mime_decrypt_result_set_cipher +g_mime_decrypt_result_set_mdc +g_mime_decrypt_result_set_recipients +g_mime_decrypt_result_set_session_key +g_mime_decrypt_result_set_signatures +g_mime_encoding_base64_decode_step +g_mime_encoding_base64_encode_close +g_mime_encoding_base64_encode_step +g_mime_encoding_flush +g_mime_encoding_init_decode +g_mime_encoding_init_encode +g_mime_encoding_outlen +g_mime_encoding_quoted_decode_step +g_mime_encoding_quoted_encode_close +g_mime_encoding_quoted_encode_step +g_mime_encoding_reset +g_mime_encoding_step +g_mime_encoding_uudecode_step +g_mime_encoding_uuencode_close +g_mime_encoding_uuencode_step +g_mime_filter_backup +g_mime_filter_basic_get_type +g_mime_filter_basic_new +g_mime_filter_best_charset +g_mime_filter_best_encoding +g_mime_filter_best_get_type +g_mime_filter_best_new +g_mime_filter_charset_get_type +g_mime_filter_charset_new +g_mime_filter_checksum_get_digest +g_mime_filter_checksum_get_type +g_mime_filter_checksum_new +g_mime_filter_complete +g_mime_filter_copy +g_mime_filter_dos2unix_get_type +g_mime_filter_dos2unix_new +g_mime_filter_enriched_get_type +g_mime_filter_enriched_new +g_mime_filter_filter +g_mime_filter_from_get_type +g_mime_filter_from_new +g_mime_filter_get_type +g_mime_filter_gzip_get_type +g_mime_filter_gzip_new +g_mime_filter_html_get_type +g_mime_filter_html_new +g_mime_filter_reset +g_mime_filter_set_size +g_mime_filter_smtp_data_get_type +g_mime_filter_smtp_data_new +g_mime_filter_strip_get_type +g_mime_filter_strip_new +g_mime_filter_unix2dos_get_type +g_mime_filter_unix2dos_new +g_mime_filter_windows_get_type +g_mime_filter_windows_is_windows_charset +g_mime_filter_windows_new +g_mime_filter_windows_real_charset +g_mime_filter_yenc_get_crc +g_mime_filter_yenc_get_pcrc +g_mime_filter_yenc_get_type +g_mime_filter_yenc_new +g_mime_filter_yenc_set_crc +g_mime_filter_yenc_set_state +g_mime_format_options_add_hidden_header +g_mime_format_options_clear_hidden_headers +g_mime_format_options_clone +g_mime_format_options_create_newline_filter +g_mime_format_options_free +g_mime_format_options_get_default +g_mime_format_options_get_newline +g_mime_format_options_get_newline_format +g_mime_format_options_get_param_encoding_method +g_mime_format_options_get_type +g_mime_format_options_is_hidden_header +g_mime_format_options_new +g_mime_format_options_remove_hidden_header +g_mime_format_options_set_newline_format +g_mime_format_options_set_param_encoding_method +g_mime_gpg_context_get_type +g_mime_gpg_context_new +g_mime_header_format_addrlist +g_mime_header_format_content_disposition +g_mime_header_format_content_type +g_mime_header_format_default +g_mime_header_format_message_id +g_mime_header_format_received +g_mime_header_format_references +g_mime_header_get_name +g_mime_header_get_offset +g_mime_header_get_raw_name +g_mime_header_get_raw_value +g_mime_header_get_type +g_mime_header_get_value +g_mime_header_list_append +g_mime_header_list_clear +g_mime_header_list_contains +g_mime_header_list_get_count +g_mime_header_list_get_header +g_mime_header_list_get_header_at +g_mime_header_list_get_type +g_mime_header_list_new +g_mime_header_list_prepend +g_mime_header_list_remove +g_mime_header_list_remove_at +g_mime_header_list_set +g_mime_header_list_to_string +g_mime_header_list_write_to_stream +g_mime_header_set_raw_value +g_mime_header_set_value +g_mime_header_write_to_stream +g_mime_iconv_close +g_mime_iconv_locale_to_utf8 +g_mime_iconv_locale_to_utf8_length +g_mime_iconv_open +g_mime_iconv_strdup +g_mime_iconv_strndup +g_mime_iconv_utf8_to_locale +g_mime_iconv_utf8_to_locale_length +g_mime_init +g_mime_locale_charset +g_mime_locale_language +g_mime_message_add_mailbox +g_mime_message_foreach +g_mime_message_get_addresses +g_mime_message_get_all_recipients +g_mime_message_get_bcc +g_mime_message_get_body +g_mime_message_get_cc +g_mime_message_get_date +g_mime_message_get_from +g_mime_message_get_message_id +g_mime_message_get_mime_part +g_mime_message_get_reply_to +g_mime_message_get_sender +g_mime_message_get_subject +g_mime_message_get_to +g_mime_message_get_type +g_mime_message_new +g_mime_message_part_get_message +g_mime_message_part_get_type +g_mime_message_part_new +g_mime_message_part_new_with_message +g_mime_message_part_set_message +g_mime_message_partial_get_id +g_mime_message_partial_get_number +g_mime_message_partial_get_total +g_mime_message_partial_get_type +g_mime_message_partial_new +g_mime_message_partial_reconstruct_message +g_mime_message_partial_split_message +g_mime_message_set_date +g_mime_message_set_message_id +g_mime_message_set_mime_part +g_mime_message_set_subject +g_mime_multipart_add +g_mime_multipart_clear +g_mime_multipart_contains +g_mime_multipart_encrypted_decrypt +g_mime_multipart_encrypted_encrypt +g_mime_multipart_encrypted_get_type +g_mime_multipart_encrypted_new +g_mime_multipart_foreach +g_mime_multipart_get_boundary +g_mime_multipart_get_count +g_mime_multipart_get_epilogue +g_mime_multipart_get_part +g_mime_multipart_get_prologue +g_mime_multipart_get_subpart_from_content_id +g_mime_multipart_get_type +g_mime_multipart_index_of +g_mime_multipart_insert +g_mime_multipart_new +g_mime_multipart_new_with_subtype +g_mime_multipart_remove +g_mime_multipart_remove_at +g_mime_multipart_replace +g_mime_multipart_set_boundary +g_mime_multipart_set_epilogue +g_mime_multipart_set_prologue +g_mime_multipart_signed_get_type +g_mime_multipart_signed_new +g_mime_multipart_signed_sign +g_mime_multipart_signed_verify +g_mime_object_append_header +g_mime_object_encode +g_mime_object_get_content_disposition +g_mime_object_get_content_disposition_parameter +g_mime_object_get_content_id +g_mime_object_get_content_type +g_mime_object_get_content_type_parameter +g_mime_object_get_disposition +g_mime_object_get_header +g_mime_object_get_header_list +g_mime_object_get_headers +g_mime_object_get_type +g_mime_object_new +g_mime_object_new_type +g_mime_object_prepend_header +g_mime_object_register_type +g_mime_object_remove_header +g_mime_object_set_content_disposition +g_mime_object_set_content_disposition_parameter +g_mime_object_set_content_id +g_mime_object_set_content_type +g_mime_object_set_content_type_parameter +g_mime_object_set_disposition +g_mime_object_set_header +g_mime_object_to_string +g_mime_object_write_to_stream +g_mime_param_get_charset +g_mime_param_get_encoding_method +g_mime_param_get_lang +g_mime_param_get_name +g_mime_param_get_type +g_mime_param_get_value +g_mime_param_list_clear +g_mime_param_list_encode +g_mime_param_list_get_parameter +g_mime_param_list_get_parameter_at +g_mime_param_list_get_type +g_mime_param_list_length +g_mime_param_list_new +g_mime_param_list_parse +g_mime_param_list_remove +g_mime_param_list_remove_at +g_mime_param_list_set_parameter +g_mime_param_set_charset +g_mime_param_set_encoding_method +g_mime_param_set_lang +g_mime_param_set_value +g_mime_parser_construct_message +g_mime_parser_construct_part +g_mime_parser_eos +g_mime_parser_get_format +g_mime_parser_get_headers_begin +g_mime_parser_get_headers_end +g_mime_parser_get_mbox_marker +g_mime_parser_get_mbox_marker_offset +g_mime_parser_get_persist_stream +g_mime_parser_get_respect_content_length +g_mime_parser_get_type +g_mime_parser_init_with_stream +g_mime_parser_new +g_mime_parser_new_with_stream +g_mime_parser_options_clone +g_mime_parser_options_free +g_mime_parser_options_get_address_compliance_mode +g_mime_parser_options_get_allow_addresses_without_domain +g_mime_parser_options_get_default +g_mime_parser_options_get_fallback_charsets +g_mime_parser_options_get_parameter_compliance_mode +g_mime_parser_options_get_rfc2047_compliance_mode +g_mime_parser_options_get_type +g_mime_parser_options_new +g_mime_parser_options_set_address_compliance_mode +g_mime_parser_options_set_allow_addresses_without_domain +g_mime_parser_options_set_fallback_charsets +g_mime_parser_options_set_parameter_compliance_mode +g_mime_parser_options_set_rfc2047_compliance_mode +g_mime_parser_set_format +g_mime_parser_set_header_regex +g_mime_parser_set_persist_stream +g_mime_parser_set_respect_content_length +g_mime_parser_tell +g_mime_part_get_best_content_encoding +g_mime_part_get_content +g_mime_part_get_content_description +g_mime_part_get_content_encoding +g_mime_part_get_content_id +g_mime_part_get_content_location +g_mime_part_get_content_md5 +g_mime_part_get_filename +g_mime_part_get_openpgp_data +g_mime_part_get_type +g_mime_part_is_attachment +g_mime_part_iter_clone +g_mime_part_iter_free +g_mime_part_iter_get_current +g_mime_part_iter_get_parent +g_mime_part_iter_get_path +g_mime_part_iter_get_toplevel +g_mime_part_iter_get_type +g_mime_part_iter_is_valid +g_mime_part_iter_jump_to +g_mime_part_iter_new +g_mime_part_iter_next +g_mime_part_iter_prev +g_mime_part_iter_remove +g_mime_part_iter_replace +g_mime_part_iter_reset +g_mime_part_new +g_mime_part_new_with_type +g_mime_part_openpgp_decrypt +g_mime_part_openpgp_encrypt +g_mime_part_openpgp_sign +g_mime_part_openpgp_verify +g_mime_part_set_content +g_mime_part_set_content_description +g_mime_part_set_content_encoding +g_mime_part_set_content_id +g_mime_part_set_content_location +g_mime_part_set_content_md5 +g_mime_part_set_filename +g_mime_part_set_openpgp_data +g_mime_part_verify_content_md5 +g_mime_pkcs7_context_get_type +g_mime_pkcs7_context_new +g_mime_references_append +g_mime_references_clear +g_mime_references_copy +g_mime_references_free +g_mime_references_get_message_id +g_mime_references_get_type +g_mime_references_length +g_mime_references_new +g_mime_references_parse +g_mime_references_set_message_id +g_mime_shutdown +g_mime_signature_get_certificate +g_mime_signature_get_created +g_mime_signature_get_expires +g_mime_signature_get_status +g_mime_signature_get_type +g_mime_signature_list_add +g_mime_signature_list_clear +g_mime_signature_list_contains +g_mime_signature_list_get_signature +g_mime_signature_list_get_type +g_mime_signature_list_index_of +g_mime_signature_list_insert +g_mime_signature_list_length +g_mime_signature_list_new +g_mime_signature_list_remove +g_mime_signature_list_remove_at +g_mime_signature_list_set_signature +g_mime_signature_new +g_mime_signature_set_certificate +g_mime_signature_set_created +g_mime_signature_set_expires +g_mime_signature_set_status +g_mime_stream_buffer_get_type +g_mime_stream_buffer_gets +g_mime_stream_buffer_new +g_mime_stream_buffer_readln +g_mime_stream_cat_add_source +g_mime_stream_cat_get_type +g_mime_stream_cat_new +g_mime_stream_close +g_mime_stream_construct +g_mime_stream_eos +g_mime_stream_file_get_owner +g_mime_stream_file_get_type +g_mime_stream_file_new +g_mime_stream_file_new_with_bounds +g_mime_stream_file_open +g_mime_stream_file_set_owner +g_mime_stream_filter_add +g_mime_stream_filter_get_owner +g_mime_stream_filter_get_type +g_mime_stream_filter_new +g_mime_stream_filter_remove +g_mime_stream_filter_set_owner +g_mime_stream_flush +g_mime_stream_fs_get_owner +g_mime_stream_fs_get_type +g_mime_stream_fs_new +g_mime_stream_fs_new_with_bounds +g_mime_stream_fs_open +g_mime_stream_fs_set_owner +g_mime_stream_get_type +g_mime_stream_gio_get_owner +g_mime_stream_gio_get_type +g_mime_stream_gio_new +g_mime_stream_gio_new_with_bounds +g_mime_stream_gio_set_owner +g_mime_stream_length +g_mime_stream_mem_get_byte_array +g_mime_stream_mem_get_owner +g_mime_stream_mem_get_type +g_mime_stream_mem_new +g_mime_stream_mem_new_with_buffer +g_mime_stream_mem_new_with_byte_array +g_mime_stream_mem_set_byte_array +g_mime_stream_mem_set_owner +g_mime_stream_mmap_get_type +g_mime_stream_mmap_new +g_mime_stream_mmap_new_with_bounds +g_mime_stream_null_count_newlines +g_mime_stream_null_get_count_newlines +g_mime_stream_null_get_type +g_mime_stream_null_new +g_mime_stream_pipe_get_owner +g_mime_stream_pipe_get_type +g_mime_stream_pipe_new +g_mime_stream_pipe_set_owner +g_mime_stream_printf +g_mime_stream_read +g_mime_stream_reset +g_mime_stream_seek +g_mime_stream_set_bounds +g_mime_stream_substream +g_mime_stream_tell +g_mime_stream_write +g_mime_stream_write_string +g_mime_stream_write_to_stream +g_mime_stream_writev +g_mime_text_part_get_charset +g_mime_text_part_get_text +g_mime_text_part_get_type +g_mime_text_part_new +g_mime_text_part_new_with_subtype +g_mime_text_part_set_charset +g_mime_text_part_set_text +g_mime_utils_best_encoding +g_mime_utils_decode_8bit +g_mime_utils_decode_message_id +g_mime_utils_generate_message_id +g_mime_utils_header_decode_date +g_mime_utils_header_decode_phrase +g_mime_utils_header_decode_text +g_mime_utils_header_encode_phrase +g_mime_utils_header_encode_text +g_mime_utils_header_format_date +g_mime_utils_header_printf +g_mime_utils_quote_string +g_mime_utils_structured_header_fold +g_mime_utils_text_is_8bit +g_mime_utils_unquote_string +g_mime_utils_unstructured_header_fold +g_mime_ydecode_step +g_mime_yencode_close +g_mime_yencode_step +gmime_binary_age +gmime_error_quark +gmime_gpgme_error_quark +gmime_interface_age +gmime_major_version +gmime_micro_version +gmime_minor_version +internet_address_get_charset +internet_address_get_name +internet_address_get_type +internet_address_group_add_member +internet_address_group_get_members +internet_address_group_get_type +internet_address_group_new +internet_address_group_set_members +internet_address_list_add +internet_address_list_append +internet_address_list_clear +internet_address_list_contains +internet_address_list_encode +internet_address_list_get_address +internet_address_list_get_type +internet_address_list_index_of +internet_address_list_insert +internet_address_list_length +internet_address_list_new +internet_address_list_parse +internet_address_list_prepend +internet_address_list_remove +internet_address_list_remove_at +internet_address_list_set_address +internet_address_list_to_string +internet_address_mailbox_get_addr +internet_address_mailbox_get_idn_addr +internet_address_mailbox_get_type +internet_address_mailbox_new +internet_address_mailbox_set_addr +internet_address_set_charset +internet_address_set_name +internet_address_to_string diff --git a/ports/gmime/idna.h b/ports/gmime/idna.h new file mode 100644 index 000000000..3313cdbc7 --- /dev/null +++ b/ports/gmime/idna.h @@ -0,0 +1,3 @@ +// Redirects header from libidn to libidn2 +// Created to avoid sources patching +#include diff --git a/ports/gmime/portfile.cmake b/ports/gmime/portfile.cmake new file mode 100644 index 000000000..98b3a104f --- /dev/null +++ b/ports/gmime/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +set(LIB_NAME gmime) +set(LIB_VERSION 3.0.2) + +set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.xz) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "https://download.gnome.org/sources/gmime/3.0/${LIB_FILENAME}" + FILENAME "${LIB_FILENAME}" + SHA512 246f489c168ce7e04fab664b7e9ae7772ae52f0063fb0eac9153460d84fa5d9712457d81fbd1bdcdadb7e03007cf71ed3bad5287f1639214f54167427c9209ca +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +# We can use file supplied with original sources +configure_file(${SOURCE_PATH}/build/vs2010/unistd.h ${SOURCE_PATH} COPYONLY) + +configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h ${SOURCE_PATH} COPYONLY) +configure_file(${CMAKE_CURRENT_LIST_DIR}/idna.h ${SOURCE_PATH} COPYONLY) +configure_file(${CMAKE_CURRENT_LIST_DIR}/gmime.def ${SOURCE_PATH} COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# License and man +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${LIB_NAME} RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 039e795567edd2fc6a2c8597f150e68d71920f5b Mon Sep 17 00:00:00 2001 From: Albert Bezzina Date: Thu, 19 Oct 2017 15:52:59 +0200 Subject: FIX: Project did not build successfully when building as static. --- ports/pugixml/CONTROL | 2 +- ports/pugixml/portfile.cmake | 27 ++++++++++++++++----------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ports/pugixml/CONTROL b/ports/pugixml/CONTROL index 5fc5f1e4e..01679ea6e 100644 --- a/ports/pugixml/CONTROL +++ b/ports/pugixml/CONTROL @@ -1,3 +1,3 @@ Source: pugixml -Version: 1.8.1-1 +Version: 1.8.1-2 Description: C++ XML processing library diff --git a/ports/pugixml/portfile.cmake b/ports/pugixml/portfile.cmake index 4fcbec84b..0d5123974 100644 --- a/ports/pugixml/portfile.cmake +++ b/ports/pugixml/portfile.cmake @@ -7,17 +7,22 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/pugixmlapi.patch -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_DEFINES="PUGIXML_API=__declspec\(dllexport\)" -) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + ) +else() + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/pugixmlapi.patch + ) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_DEFINES="PUGIXML_API=__declspec\(dllexport\)" + ) +endif() vcpkg_install_cmake() vcpkg_copy_pdbs() -- cgit v1.2.3 From f527812e9e7f6436aa11c9f01b7f70e4c4893270 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Oct 2017 08:53:59 -0700 Subject: [grpc] Fix absolute paths in installed cmake files. --- ports/grpc/CONTROL | 2 +- ports/grpc/portfile.cmake | 7 +++++-- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 449d58b6c..958ab7723 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.6.0-1 +Version: 1.6.0-2 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 49d64b909..791470bc2 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -52,14 +52,17 @@ vcpkg_configure_cmake( -DgRPC_GFLAGS_PROVIDER=none -DgRPC_BENCHMARK_PROVIDER=none -DgRPC_INSTALL_CSHARP_EXT=OFF - -DCMAKE_INSTALL_CMAKEDIR=share/grpc + -DgRPC_INSTALL_BINDIR:STRING=bin + -DgRPC_INSTALL_LIBDIR:STRING=lib + -DgRPC_INSTALL_INCLUDEDIR:STRING=include + -DgRPC_INSTALL_CMAKEDIR:STRING=share/grpc ) # gRPC runs built executables during the build, so they need access to the installed DLLs. set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/grpc") +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/grpc") file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/grpc RENAME copyright) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index eaf3bb966..40ed0225f 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -83,6 +83,7 @@ function(vcpkg_fixup_cmake_targets) ) foreach(RELEASE_TARGET ${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}") file(WRITE ${RELEASE_TARGET} "${_contents}") endforeach() @@ -95,6 +96,7 @@ function(vcpkg_fixup_cmake_targets) get_filename_component(DEBUG_TARGET_NAME ${DEBUG_TARGET} NAME) 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(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" _contents "${_contents}") -- cgit v1.2.3 From 222f59ed84d67f54f1768d59dd3a481ad6a64b15 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Fri, 20 Oct 2017 09:56:54 +1100 Subject: add qt5speech, fix plugin installation, fix dlls paths in cmake --- ports/qt5base/fixcmake.py | 11 ++++++++++- ports/qt5declarative/fixcmake.py | 11 ++++++++++- ports/qt5declarative/portfile.cmake | 2 ++ ports/qt5tools/fixcmake.py | 11 ++++++++++- ports/qt5winextras/fixcmake.py | 11 ++++++++++- 5 files changed, 42 insertions(+), 4 deletions(-) diff --git a/ports/qt5base/fixcmake.py b/ports/qt5base/fixcmake.py index d55ca7754..923e600bc 100644 --- a/ports/qt5base/fixcmake.py +++ b/ports/qt5base/fixcmake.py @@ -10,8 +10,15 @@ for f in files: dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") for line in openedfile: - if "_install_prefix}/bin/${LIB_LOCATION}" in line: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: builder += " if (${Configuration} STREQUAL \"RELEASE\")" builder += "\n " + line builder += " else()" @@ -39,6 +46,8 @@ for f in files: builder += line.replace("/bin/", "/debug/bin/") elif libpattern.search(line) != None: builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") elif exepattern.search(line) != None: builder += line.replace("/bin/", "/tools/qt5/") else: diff --git a/ports/qt5declarative/fixcmake.py b/ports/qt5declarative/fixcmake.py index d55ca7754..923e600bc 100644 --- a/ports/qt5declarative/fixcmake.py +++ b/ports/qt5declarative/fixcmake.py @@ -10,8 +10,15 @@ for f in files: dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") for line in openedfile: - if "_install_prefix}/bin/${LIB_LOCATION}" in line: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: builder += " if (${Configuration} STREQUAL \"RELEASE\")" builder += "\n " + line builder += " else()" @@ -39,6 +46,8 @@ for f in files: builder += line.replace("/bin/", "/debug/bin/") elif libpattern.search(line) != None: builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") elif exepattern.search(line) != None: builder += line.replace("/bin/", "/tools/qt5/") else: diff --git a/ports/qt5declarative/portfile.cmake b/ports/qt5declarative/portfile.cmake index 48ab900ce..614eecd37 100644 --- a/ports/qt5declarative/portfile.cmake +++ b/ports/qt5declarative/portfile.cmake @@ -67,11 +67,13 @@ file(REMOVE ${BINARY_TOOLS}) file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) diff --git a/ports/qt5tools/fixcmake.py b/ports/qt5tools/fixcmake.py index d55ca7754..923e600bc 100644 --- a/ports/qt5tools/fixcmake.py +++ b/ports/qt5tools/fixcmake.py @@ -10,8 +10,15 @@ for f in files: dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") for line in openedfile: - if "_install_prefix}/bin/${LIB_LOCATION}" in line: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: builder += " if (${Configuration} STREQUAL \"RELEASE\")" builder += "\n " + line builder += " else()" @@ -39,6 +46,8 @@ for f in files: builder += line.replace("/bin/", "/debug/bin/") elif libpattern.search(line) != None: builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") elif exepattern.search(line) != None: builder += line.replace("/bin/", "/tools/qt5/") else: diff --git a/ports/qt5winextras/fixcmake.py b/ports/qt5winextras/fixcmake.py index d55ca7754..923e600bc 100644 --- a/ports/qt5winextras/fixcmake.py +++ b/ports/qt5winextras/fixcmake.py @@ -10,8 +10,15 @@ for f in files: dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") for line in openedfile: - if "_install_prefix}/bin/${LIB_LOCATION}" in line: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: builder += " if (${Configuration} STREQUAL \"RELEASE\")" builder += "\n " + line builder += " else()" @@ -39,6 +46,8 @@ for f in files: builder += line.replace("/bin/", "/debug/bin/") elif libpattern.search(line) != None: builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") elif exepattern.search(line) != None: builder += line.replace("/bin/", "/tools/qt5/") else: -- cgit v1.2.3 From dba0884fb4a45d99e513f0538da20f5b895bead2 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Fri, 20 Oct 2017 09:57:25 +1100 Subject: add qt5speech --- ports/qt5speech/CONTROL | 4 +++ ports/qt5speech/fixcmake.py | 57 +++++++++++++++++++++++++++++ ports/qt5speech/portfile.cmake | 81 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+) create mode 100644 ports/qt5speech/CONTROL create mode 100644 ports/qt5speech/fixcmake.py create mode 100644 ports/qt5speech/portfile.cmake diff --git a/ports/qt5speech/CONTROL b/ports/qt5speech/CONTROL new file mode 100644 index 000000000..0013556d7 --- /dev/null +++ b/ports/qt5speech/CONTROL @@ -0,0 +1,4 @@ +Source: qt5speech +Version: 5.9.2-0 +Description: Qt5 Speech Module +Build-Depends: qt5base, atlmfc \ No newline at end of file diff --git a/ports/qt5speech/fixcmake.py b/ports/qt5speech/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5speech/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5speech/portfile.cmake b/ports/qt5speech/portfile.cmake new file mode 100644 index 000000000..fab35389e --- /dev/null +++ b/ports/qt5speech/portfile.cmake @@ -0,0 +1,81 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtspeech-5.9.2") +set(ARCHIVE_NAME "qtspeech-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 8213ad13d33732fee3fc5b5e408b870970a3003d461be24195222e1d1209210039d1d0cd2f3c537a0db62629fb297d88b33ed4734ecb6c8d74f5406a87e7e0c0 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5speech RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From b3172b1784ed15d4c310793474e285222fc669a4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Oct 2017 18:01:33 -0700 Subject: [azure-storage-cpp] Support latest HEAD of cpprestsdk --- ports/azure-storage-cpp/CONTROL | 2 +- ports/azure-storage-cpp/portfile.cmake | 1 + .../support-cpprest-findpackage.patch | 32 ++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 ports/azure-storage-cpp/support-cpprest-findpackage.patch diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index 1917bad6d..bf4e9f9f2 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp -Version: 3.0.0-3 +Version: 3.0.0-4 Build-Depends: cpprestsdk, atlmfc 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. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index 150c4aafc..7359f3bc7 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch ${CMAKE_CURRENT_LIST_DIR}/static-builds.patch + ${CMAKE_CURRENT_LIST_DIR}/support-cpprest-findpackage.patch ) vcpkg_configure_cmake( diff --git a/ports/azure-storage-cpp/support-cpprest-findpackage.patch b/ports/azure-storage-cpp/support-cpprest-findpackage.patch new file mode 100644 index 000000000..5cd805208 --- /dev/null +++ b/ports/azure-storage-cpp/support-cpprest-findpackage.patch @@ -0,0 +1,32 @@ +diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt +index 3b4d1c0..d8818ac 100644 +--- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt ++++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt +@@ -1,5 +1,5 @@ + set(CMAKE_LEGACY_CYGWIN_WIN32 0) +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.8) + project(azurestorage) + + enable_testing() +diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake +index da66eb4..40e1767 100644 +--- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake ++++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake +@@ -23,6 +23,16 @@ find_path(CASABLANCA_INCLUDE_DIR + include + ) + ++find_package(cpprestsdk) ++ ++if(cpprestsdk_FOUND) ++ set(CASABLANCA_LIBRARY cpprestsdk::cpprest) ++ set(CASABLANCA_PROCESS_LIBS CASABLANCA_LIBRARY) ++ set(CASABLANCA_PROCESS_INCLUDES CASABLANCA_INCLUDE_DIR) ++ libfind_process(CASABLANCA) ++ return() ++endif() ++ + # Library + find_library(CASABLANCA_LIBRARY + NAMES -- cgit v1.2.3 From deee8c1743af2d851d48d42b7ac91558c8fefb5a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Oct 2017 19:24:49 -0700 Subject: [sdl2-gfx][sdl2-image][sdl2-mixer][sdl2-net][sdl2-ttf] Fix accidental link of release libs in debug mode. --- ports/sdl2-gfx/CMakeLists.txt | 2 +- ports/sdl2-gfx/CONTROL | 2 +- ports/sdl2-image/CMakeLists.txt | 2 +- ports/sdl2-image/CONTROL | 2 +- ports/sdl2-mixer/CMakeLists.txt | 2 +- ports/sdl2-mixer/CONTROL | 2 +- ports/sdl2-net/CMakeLists.txt | 2 +- ports/sdl2-net/CONTROL | 2 +- ports/sdl2-ttf/CMakeLists.txt | 2 +- ports/sdl2-ttf/CONTROL | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ports/sdl2-gfx/CMakeLists.txt b/ports/sdl2-gfx/CMakeLists.txt index d0a9f0c82..6a0ecf24e 100644 --- a/ports/sdl2-gfx/CMakeLists.txt +++ b/ports/sdl2-gfx/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0) project(SDL2_GFX C) find_path(SDL_INCLUDE_DIR SDL2/SDL.h) -find_library(SDL_LIBRARY SDL2) +find_library(SDL_LIBRARY NAMES SDL2d SDL2) # builtin formats set(SDL_GFX_DEFINES WIN32) diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL index 0e0b71aec..a06c8abcb 100644 --- a/ports/sdl2-gfx/CONTROL +++ b/ports/sdl2-gfx/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-gfx -Version: 1.0.3-2 +Version: 1.0.3-3 Build-Depends: sdl2 Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer. diff --git a/ports/sdl2-image/CMakeLists.txt b/ports/sdl2-image/CMakeLists.txt index 8b5f7131f..d04b3f7b6 100644 --- a/ports/sdl2-image/CMakeLists.txt +++ b/ports/sdl2-image/CMakeLists.txt @@ -51,7 +51,7 @@ endforeach(FORMAT) # SDL find_path(SDL_INCLUDE_DIR SDL2/SDL.h) -find_library(SDL_LIBRARY SDL2) +find_library(SDL_LIBRARY NAMES SDL2d SDL2) include_directories(${SDL_INCLUDE_DIR}) include_directories(${SDL_INCLUDE_DIR}/SDL2) diff --git a/ports/sdl2-image/CONTROL b/ports/sdl2-image/CONTROL index a5c41a334..aff048d9a 100644 --- a/ports/sdl2-image/CONTROL +++ b/ports/sdl2-image/CONTROL @@ -1,5 +1,5 @@ Source: sdl2-image -Version: 2.0.1-2 +Version: 2.0.1-3 Build-Depends: sdl2, libpng, libjpeg-turbo, tiff, libwebp 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-mixer/CMakeLists.txt b/ports/sdl2-mixer/CMakeLists.txt index 6d1cb28c0..014923628 100644 --- a/ports/sdl2-mixer/CMakeLists.txt +++ b/ports/sdl2-mixer/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0) project(SDL2_MIXER C) find_path(SDL_INCLUDE_DIR SDL.h PATH_SUFFIXES SDL2) -find_library(SDL_LIBRARY SDL2) +find_library(SDL_LIBRARY NAMES SDL2d SDL2) set(SDL_MIXER_INCLUDES ${SDL_INCLUDE_DIR}) set(SDL_MIXER_LIBRARIES ${SDL_LIBRARY}) diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL index 756a7380d..f0ef29fbd 100644 --- a/ports/sdl2-mixer/CONTROL +++ b/ports/sdl2-mixer/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-mixer -Version: 2.0.1-2 +Version: 2.0.1-3 Description: Multi-channel audio mixer library for SDL. Build-Depends: sdl2, libflac, smpeg2, libmodplug, libvorbis diff --git a/ports/sdl2-net/CMakeLists.txt b/ports/sdl2-net/CMakeLists.txt index 9b81f8d42..4127262d7 100644 --- a/ports/sdl2-net/CMakeLists.txt +++ b/ports/sdl2-net/CMakeLists.txt @@ -4,7 +4,7 @@ project(SDL2_NET C) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") find_path(SDL_INCLUDE_DIR SDL2/SDL.h) -find_library(SDL_LIBRARY SDL2) +find_library(SDL_LIBRARY NAMES SDL2d SDL2) add_library(SDL2_net SDLnet.c SDLnetselect.c SDLnetTCP.c SDLnetUDP.c) diff --git a/ports/sdl2-net/CONTROL b/ports/sdl2-net/CONTROL index e64277b39..6b2793449 100644 --- a/ports/sdl2-net/CONTROL +++ b/ports/sdl2-net/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-net -Version: 2.0.1-2 +Version: 2.0.1-3 Description: Networking library for SDL Build-Depends: sdl2 diff --git a/ports/sdl2-ttf/CMakeLists.txt b/ports/sdl2-ttf/CMakeLists.txt index 133616479..7e3a180f9 100644 --- a/ports/sdl2-ttf/CMakeLists.txt +++ b/ports/sdl2-ttf/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0) project(SDL2_TTF C) find_path(SDL_INCLUDE_DIR SDL2/SDL.h) -find_library(SDL_LIBRARY SDL2) +find_library(SDL_LIBRARY NAMES SDL2d SDL2) find_package(FreeType REQUIRED) add_library(SDL2_ttf SDL_ttf.c) diff --git a/ports/sdl2-ttf/CONTROL b/ports/sdl2-ttf/CONTROL index 7dbe06367..18773dd21 100644 --- a/ports/sdl2-ttf/CONTROL +++ b/ports/sdl2-ttf/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-ttf -Version: 2.0.14-2 +Version: 2.0.14-3 Description: A library for rendering TrueType fonts with SDL Build-Depends: sdl2, freetype -- cgit v1.2.3 From 976195245f6336632da22df5a5682dc824c6b48c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Oct 2017 19:56:05 -0700 Subject: [secp256k1] Only install the single public header. Always build statically. --- ports/secp256k1/CMakeLists.txt | 10 +++---- ports/secp256k1/CONTROL | 6 ++--- ports/secp256k1/portfile.cmake | 59 ++++++++++++++++++++---------------------- 3 files changed, 36 insertions(+), 39 deletions(-) diff --git a/ports/secp256k1/CMakeLists.txt b/ports/secp256k1/CMakeLists.txt index 708ff68fa..d439053bc 100644 --- a/ports/secp256k1/CMakeLists.txt +++ b/ports/secp256k1/CMakeLists.txt @@ -4,9 +4,9 @@ project(secp256k1 C) option(INSTALL_HEADERS "Install header files" ON) add_definitions( - -DENABLE_MODULE_ECDH - -DENABLE_MODULE_RECOVERY - -DHAVE_CONFIG_H + -DENABLE_MODULE_ECDH + -DENABLE_MODULE_RECOVERY + -DHAVE_CONFIG_H ) file(GLOB SOURCES src/secp256k1.c) @@ -21,6 +21,6 @@ install(TARGETS secp256k1 ) if(INSTALL_HEADERS) - file(GLOB HEADERS include/*.h) - install(FILES ${HEADERS} DESTINATION include) + file(GLOB HEADERS include/secp256k1.h) + install(FILES ${HEADERS} DESTINATION include) endif() \ No newline at end of file diff --git a/ports/secp256k1/CONTROL b/ports/secp256k1/CONTROL index 0198cf1b8..181a4a7e6 100644 --- a/ports/secp256k1/CONTROL +++ b/ports/secp256k1/CONTROL @@ -1,3 +1,3 @@ -Source: secp256k1 -Version: -Description: Optimized C library for EC operations on curve +Source: secp256k1 +Version: 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4 +Description: Optimized C library for EC operations on curve diff --git a/ports/secp256k1/portfile.cmake b/ports/secp256k1/portfile.cmake index 9ff3fff8f..2012c4827 100644 --- a/ports/secp256k1/portfile.cmake +++ b/ports/secp256k1/portfile.cmake @@ -1,31 +1,28 @@ -include(vcpkg_common_functions) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/secp256k1-0b7024185045a49a1a6a4c5615bf31c94f63d9c4/) - -vcpkg_from_github( - OUT_SOURCE_PATH "secp256k1" - REPO "bitcoin-core/secp256k1" - REF "0b7024185045a49a1a6a4c5615bf31c94f63d9c4" - SHA512 54e0c446ae63105800dfaf23dc934734f196c91f275db0455e58a36926c29ecc51a13d9b1eb2e45bc86199120c3c472ec7b39086787a49ce388a4df462a870bc -) - -message("Copying config header to " ${SOURCE_PATH}) - -file(COPY ${CURRENT_PORT_DIR}/libsecp256k1-config.h DESTINATION ${SOURCE_PATH}) - -message(STATUS "Building") - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG - -DINSTALL_HEADERS=OFF - OPTIONS_DEBUG -) - -vcpkg_install_cmake() - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/secp256k1 RENAME copyright) +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "bitcoin-core/secp256k1" + REF "0b7024185045a49a1a6a4c5615bf31c94f63d9c4" + SHA512 54e0c446ae63105800dfaf23dc934734f196c91f275db0455e58a36926c29ecc51a13d9b1eb2e45bc86199120c3c472ec7b39086787a49ce388a4df462a870bc +) + +file(COPY ${CURRENT_PORT_DIR}/libsecp256k1-config.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/secp256k1 RENAME copyright) -- cgit v1.2.3 From b1d5d8e8baf4bd5132de4415a0168432600ce998 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 19 Oct 2017 19:38:23 -0700 Subject: Introduce Strings::replace_all() --- toolsrc/include/vcpkg/base/strings.h | 2 ++ toolsrc/src/vcpkg/base/strings.cpp | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index d263e3b6b..5b03286de 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -76,6 +76,8 @@ namespace vcpkg::Strings return join(delimiter, v, [](const Element& x) -> const Element& { return x; }); } + std::string replace_all(std::string&& s, const std::string& search, const std::string& rep); + void trim(std::string* s); std::string trimmed(const std::string& s); diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index af41eed9a..36efc3adc 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -114,6 +114,17 @@ namespace vcpkg::Strings #endif } + std::string replace_all(std::string&& s, const std::string& search, const std::string& rep) + { + size_t pos = 0; + while ((pos = s.find(search, pos)) != std::string::npos) + { + s.replace(pos, search.size(), rep); + pos += rep.size(); + } + return std::move(s); + } + void trim(std::string* s) { s->erase(std::find_if_not(s->rbegin(), s->rend(), details::isspace).base(), s->end()); -- cgit v1.2.3 From 8cefb25bcb7edaedd20d8aa170b2e1b945fd1762 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 19 Oct 2017 19:48:46 -0700 Subject: Use Strings::replace_all() instead of std::regex_replace() --- toolsrc/src/vcpkg/commands.integrate.cpp | 8 ++++---- toolsrc/src/vcpkg/export.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index c8fa275ab..27e563cfa 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -93,9 +93,9 @@ namespace vcpkg::Commands::Integrate )"; - std::string content = std::regex_replace(CONTENT_TEMPLATE, std::regex("@NUGET_ID@"), nuget_id); - content = std::regex_replace(content, std::regex("@VCPKG_DIR@"), vcpkg_root_dir.string()); - content = std::regex_replace(content, std::regex("@VERSION@"), nupkg_version); + std::string content = Strings::replace_all(CONTENT_TEMPLATE, "@NUGET_ID@", nuget_id); + content = Strings::replace_all(std::move(content), "@VCPKG_DIR@", vcpkg_root_dir.string()); + content = Strings::replace_all(std::move(content), "@VERSION@", nupkg_version); return content; } @@ -308,7 +308,7 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", System::println(System::Color::success, "Created nupkg: %s", nuget_package.string()); auto source_path = buildsystems_dir.u8string(); - source_path = std::regex_replace(source_path, std::regex("`"), "``"); + source_path = Strings::replace_all(std::move(source_path), "`", "``"); System::println(R"( With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 5e27d4126..f0a3b23d0 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -44,12 +44,12 @@ namespace vcpkg::Export )"; - std::string nuspec_file_content = std::regex_replace(CONTENT_TEMPLATE, std::regex("@NUGET_ID@"), nuget_id); - nuspec_file_content = std::regex_replace(nuspec_file_content, std::regex("@VERSION@"), nupkg_version); + std::string nuspec_file_content = Strings::replace_all(CONTENT_TEMPLATE, "@NUGET_ID@", nuget_id); + nuspec_file_content = Strings::replace_all(std::move(nuspec_file_content), "@VERSION@", nupkg_version); nuspec_file_content = - std::regex_replace(nuspec_file_content, std::regex("@RAW_EXPORTED_DIR@"), raw_exported_dir); + Strings::replace_all(std::move(nuspec_file_content), "@RAW_EXPORTED_DIR@", raw_exported_dir); nuspec_file_content = - std::regex_replace(nuspec_file_content, std::regex("@TARGETS_REDIRECT_PATH@"), targets_redirect_path); + Strings::replace_all(std::move(nuspec_file_content), "@TARGETS_REDIRECT_PATH@", targets_redirect_path); return nuspec_file_content; } -- cgit v1.2.3 From 50ae9eec872a0802d2450b4ae2d640475d0d7889 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 19 Oct 2017 19:50:23 -0700 Subject: Do not depend on newlines when getting output from powershell --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 3 ++- scripts/findVisualStudioInstallationInstances.ps1 | 4 ++-- toolsrc/include/vcpkg/base/system.h | 2 +- toolsrc/src/vcpkg/base/system.cpp | 16 ++++++++++++++-- toolsrc/src/vcpkg/vcpkgpaths.cpp | 14 ++++++-------- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index e9fb60cb2..3269562dc 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -9,8 +9,9 @@ $explicitlyRequestedVSPath = $explicitlyRequestedVSPath -replace "\\$" # Remove $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstallationInstances))" -foreach ($instanceCandidate in $VisualStudioInstallationInstances) +foreach ($instanceCandidateWithEOL in $VisualStudioInstallationInstances) { + $instanceCandidate = $instanceCandidateWithEOL -replace "::" Write-Verbose "Inspecting: $instanceCandidate" $split = $instanceCandidate -split "::" # $preferenceWeight = $split[0] diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 8a2adca10..566560cdb 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -29,7 +29,7 @@ foreach ($instance in $asXml.instances.instance) } # Placed like that for easy sorting according to preference - $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null + $results.Add("${releaseType}::${installationVersion}::${installationPath}::") > $null } # If nothing is found, attempt to find VS2015 Build Tools (not detected by vswhere.exe) @@ -42,7 +42,7 @@ if ($results.Count -eq 0) if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) { - return "PreferenceWeight1::Legacy::14.0::$installationPath" + return "PreferenceWeight1::Legacy::14.0::$installationPath::" } } diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index b396ef293..e0d3264e2 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -22,7 +22,7 @@ namespace vcpkg::System ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line); - std::string create_powershell_script_cmd(const fs::path& script_path, const CStringView args = ""); + ExitCodeAndOutput powershell_execute_and_capture_output(const fs::path& script_path, const CStringView args = ""); enum class Color { diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index b04f79414..a1bc9daf6 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -269,11 +269,23 @@ namespace vcpkg::System #endif } - std::string create_powershell_script_cmd(const fs::path& script_path, const CStringView args) + ExitCodeAndOutput powershell_execute_and_capture_output(const fs::path& script_path, const CStringView args) { // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned - return Strings::format( + const std::string cmd = Strings::format( R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), args); + + auto rc = System::cmd_execute_and_capture_output(cmd); + + // Remove newline from all output. + // Powershell returns newlines when it hits the column count of the console. + // For example, this is 80 in cmd on Windows 7. If the expected output is longer than 80 lines, we get + // newlines in-between the data. + // To solve this, we design our interaction with powershell to not depend on newlines, + // and then strip all newlines here. + rc.output = Strings::replace_all(std::move(rc.output), "\n", ""); + + return rc; } void println() { putchar('\n'); } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 2f2dd877e..ef9e383bc 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -74,9 +74,8 @@ namespace vcpkg tool_name, version_as_string); const fs::path script = scripts_folder / "fetchDependency.ps1"; - const auto install_cmd = - System::create_powershell_script_cmd(script, Strings::format("-Dependency %s", tool_name)); - const System::ExitCodeAndOutput rc = System::cmd_execute_and_capture_output(install_cmd); + const System::ExitCodeAndOutput rc = + System::powershell_execute_and_capture_output(script, Strings::format("-Dependency %s", tool_name)); if (rc.exit_code) { System::println(System::Color::error, @@ -324,14 +323,13 @@ namespace vcpkg static std::vector get_visual_studio_instances(const VcpkgPaths& paths) { const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; - const std::string cmd = System::create_powershell_script_cmd(script); - const System::ExitCodeAndOutput ec_data = System::cmd_execute_and_capture_output(cmd); + const System::ExitCodeAndOutput ec_data = System::powershell_execute_and_capture_output(script); Checks::check_exit( VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances"); - const std::vector instances_as_strings = Strings::split(ec_data.output, "\n"); + const std::vector instances_as_strings = Strings::split(ec_data.output, "::"); Checks::check_exit( - VCPKG_LINE_INFO, !instances_as_strings.empty(), "Could not detect any Visual Studio instances"); + VCPKG_LINE_INFO, !instances_as_strings.empty(), "Could not detect any Visual Studio instances.\n"); std::vector output; for (const std::string& instance_as_string : instances_as_strings) @@ -341,7 +339,7 @@ namespace vcpkg split.size() == 4, "Invalid Visual Studio instance format.\n" "Expected: PreferenceWeight::ReleaseType::Version::PathToVisualStudio\n" - "Actual : %s", + "Actual : %s\n", instance_as_string); output.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); } -- cgit v1.2.3 From 7c0b541cfd892dd0264273dbdfea8bda48bddcd1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 19 Oct 2017 21:30:12 -0700 Subject: Update CHANGELOG and bump version to v0.0.93 --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10e1d531a..d612fb4f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,31 @@ +vcpkg (0.0.93) +-------------- + * Add ports: + - berkeleydb 4.8.30 + - libsodium 1.0.15 + - secp256k1 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4 + * Update ports: + - assimp 4.0.0-2 -> 4.0.1 + - azure-storage-cpp 3.0.0-3 -> 3.0.0-4 + - cctz v2.1 -> 2.1 + - folly v2017.07.17.01-1 -> 2017.10.02.00 + - grpc 1.6.0-1 -> 1.6.0-2 + - openblas v0.2.20-2 -> 0.2.20-2 + - pthreads 2.9.1-1 -> 2.9.1-2 + - sdl2-gfx 1.0.3-2 -> 1.0.3-3 + - sdl2-image 2.0.1-2 -> 2.0.1-3 + - sdl2-mixer 2.0.1-2 -> 2.0.1-3 + - sdl2-net 2.0.1-2 -> 2.0.1-3 + - sdl2-ttf 2.0.14-2 -> 2.0.14-3 + - spirv-tools v2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 -> 2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 + - thor v2.0-1 -> 2.0-1 + - tinyexr v0.9.5-d16ea6 -> 0.9.5-d16ea6 + * Fix issue where `vcpkg` was getting output from powershell scripts. Powershell adds newlines when the console width is reached; the extra newlines was causing `vcpkg`'s parsing to fail. + * Improve autocomplete/tab-completion for powershell (still experimental) + + +-- vcpkg team THU, 19 Oct 2017 21:30:00 -0800 + vcpkg (0.0.92) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index af0276f0b..f439c6467 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.92" \ No newline at end of file +"0.0.93" \ No newline at end of file -- cgit v1.2.3 From 7fb0342b8a16b43ce9887fcc879a2321954646be Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 19 Oct 2017 21:34:58 -0700 Subject: [system.h] Naming scheme fixes --- toolsrc/include/vcpkg/base/system.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index e0d3264e2..a696bf3ae 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -38,27 +38,27 @@ namespace vcpkg::System void println(const Color c, const CStringView message); template - void print(const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + void print(const char* message_template, const Arg1& message_arg1, const Args&... message_args) { - return System::print(Strings::format(messageTemplate, messageArg1, messageArgs...)); + return System::print(Strings::format(message_template, message_arg1, message_args...)); } template - void print(const Color c, const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + void print(const Color c, const char* message_template, const Arg1& message_arg1, const Args&... message_args) { - return System::print(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); + return System::print(c, Strings::format(message_template, message_arg1, message_args...)); } template - void println(const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + void println(const char* message_template, const Arg1& message_arg1, const Args&... message_args) { - return System::println(Strings::format(messageTemplate, messageArg1, messageArgs...)); + return System::println(Strings::format(message_template, message_arg1, message_args...)); } template - void println(const Color c, const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + void println(const Color c, const char* message_template, const Arg1& message_arg1, const Args&... message_args) { - return System::println(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); + return System::println(c, Strings::format(message_template, message_arg1, message_args...)); } Optional get_environment_variable(const CStringView varname) noexcept; @@ -90,17 +90,17 @@ namespace vcpkg::Debug void println(const System::Color c, const CStringView message); template - void println(const char* messageTemplate, const Arg1& messageArg1, const Args&... messageArgs) + void println(const char* message_template, const Arg1& message_arg1, const Args&... message_args) { - return Debug::println(Strings::format(messageTemplate, messageArg1, messageArgs...)); + return Debug::println(Strings::format(message_template, message_arg1, message_args...)); } template void println(const System::Color c, - const char* messageTemplate, - const Arg1& messageArg1, - const Args&... messageArgs) + const char* message_template, + const Arg1& message_arg1, + const Args&... message_args) { - return Debug::println(c, Strings::format(messageTemplate, messageArg1, messageArgs...)); + return Debug::println(c, Strings::format(message_template, message_arg1, message_args...)); } } -- cgit v1.2.3 From bc2781bb3c639cd48e50c1874ef778154129d4e5 Mon Sep 17 00:00:00 2001 From: Christophe Guebert Date: Fri, 20 Oct 2017 07:48:54 +0200 Subject: [libmariadb] Update to 3.0.2 --- ports/libmariadb/CONTROL | 2 +- ports/libmariadb/portfile.cmake | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ports/libmariadb/CONTROL b/ports/libmariadb/CONTROL index 89f5647a7..b9cfcbbef 100644 --- a/ports/libmariadb/CONTROL +++ b/ports/libmariadb/CONTROL @@ -1,3 +1,3 @@ Source: libmariadb -Version: 2.3.2-1 +Version: 3.0.2 Description: MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases diff --git a/ports/libmariadb/portfile.cmake b/ports/libmariadb/portfile.cmake index 3dba9c7d1..4a81792ac 100644 --- a/ports/libmariadb/portfile.cmake +++ b/ports/libmariadb/portfile.cmake @@ -4,17 +4,19 @@ if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mariadb-connector-c-2.3.2) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mariadb-connector-c-3.0.2) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/MariaDB/mariadb-connector-c/archive/v2.3.2.tar.gz" - FILENAME "mariadb-connector-c-2.3.2.tar.gz" - SHA512 f5574756ffce69e3dd15b7f7c14cfd0b4d69e3203ae4b383f05a110918916279ba7c0b9149d0dcb9ec93bbfc0927dfaf88bb40979ba1de710ce148d1fbe033af + URLS "https://github.com/MariaDB/mariadb-connector-c/archive/v3.0.2.tar.gz" + FILENAME "mariadb-connector-c-3.0.2.tar.gz" + SHA512 a5086ff149b1ca0e1b652013475c5f3793824416a60ec35018b6dcd502bd38b50fa040271ff8d308520dadecc9601671fccf67046fcda2425f1d7c59e1c6c52f ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DWITH_UNITTEST=OFF ) vcpkg_install_cmake() -- cgit v1.2.3 From 48670cbe2abf4f45e39ef1a85076647cd1423084 Mon Sep 17 00:00:00 2001 From: Christophe Guebert Date: Fri, 20 Oct 2017 08:21:18 +0200 Subject: Fix static build. --- ports/libmariadb/portfile.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/libmariadb/portfile.cmake b/ports/libmariadb/portfile.cmake index 4a81792ac..3aca7afb3 100644 --- a/ports/libmariadb/portfile.cmake +++ b/ports/libmariadb/portfile.cmake @@ -16,7 +16,9 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DWITH_UNITTEST=OFF + -DWITH_UNITTEST=OFF + -DWITH_SSL=OFF + -DWITH_CURL=OFF ) vcpkg_install_cmake() -- cgit v1.2.3 From f24c1c6ccd8617246d395be1d58abf3dfffcc931 Mon Sep 17 00:00:00 2001 From: Roelf-Jilling Date: Fri, 20 Oct 2017 21:35:29 +0200 Subject: [CppWinRT] Update to October 2017 release --- ports/cppwinrt/CONTROL | 2 +- ports/cppwinrt/portfile.cmake | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ports/cppwinrt/CONTROL b/ports/cppwinrt/CONTROL index e470b2458..aa481439e 100644 --- a/ports/cppwinrt/CONTROL +++ b/ports/cppwinrt/CONTROL @@ -1,3 +1,3 @@ Source: cppwinrt -Version: spring_2017_creators_update_for_vs_15.3 +Version: Fall_2017_Creators_Update_for_VS_15.3 Description: C++/WinRT is a standard C++ language projection for the Windows Runtime. diff --git a/ports/cppwinrt/portfile.cmake b/ports/cppwinrt/portfile.cmake index c83465efe..e093ecdfa 100644 --- a/ports/cppwinrt/portfile.cmake +++ b/ports/cppwinrt/portfile.cmake @@ -1,18 +1,22 @@ include(vcpkg_common_functions) -find_program(GIT git) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-spring_2017_creators_update_for_vs_15.3) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-fall_2017_creators_update_for_vs_15.3) + vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/cppwinrt/archive/spring_2017_creators_update_for_vs_15.3.tar.gz" - FILENAME "cppwinrt-spring_2017_creators_update_for_vs_15.3.tar.gz" - SHA512 779586122552e49a79aff08f4476905e00c3b4ad3dbc502240e9a7cc59ec0e4ab6304149a66505923ab84d2b334059de9e18c84a5b0ed6bde106d19119ef911f + URLS "https://github.com/Microsoft/cppwinrt/archive/fall_2017_creators_update_for_vs_15.3.tar.gz" + FILENAME "cppwinrt-fall_2017_creators_update_for_vs_15.3.tar.gz" + SHA512 e3f987ed3f3dce019b8bf9f5451e53b42357473a003b8c14f9009e1848ee0463286bd46fdc3c739c8f7c2d232707e8018f5c087ffae784c745d51a8143f9a294 ) vcpkg_extract_source_archive(${ARCHIVE}) # Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/LICENSE ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright) # Copy the cppwinrt header files -file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.15063.0/winrt/*) -file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt) +file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.16299.0/winrt/*) +file( + COPY ${HEADER_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt + REGEX "\.(gitattributes|gitignore)$" EXCLUDE +) -- cgit v1.2.3 From 35722330be76f3d692672f83ebcc1503cff1766b Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 20 Oct 2017 21:38:25 -0700 Subject: [eigen3] use vcpkg_from_github to enable install from --head --- ports/eigen3/CONTROL | 2 +- ports/eigen3/portfile.cmake | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ports/eigen3/CONTROL b/ports/eigen3/CONTROL index 1e61ce95f..fe0641a98 100644 --- a/ports/eigen3/CONTROL +++ b/ports/eigen3/CONTROL @@ -1,3 +1,3 @@ Source: eigen3 -Version: 3.3.4-1 +Version: 3.3.4-2 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 a4922f008..1e08d5ddf 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -1,12 +1,12 @@ -#header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eigen-eigen-5a0156e40feb) -vcpkg_download_distfile(ARCHIVE - URLS "http://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2" - FILENAME "eigen-3.3.4.tar.bz2" - SHA512 d67a3fd8f7ce811af65fc1d43ec347dadf9c643a49135f7e455fc303773bad09e80a125282c7dfca7a1993b79e1f66576ac92418119fbb0fa50c1a581b957c0d + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO RLovelett/eigen + REF 3.3.4 + SHA512 b9f6bc74d79aaa7c4cb0c97739ba08c9b0570386f87c4225c06326e734fc27b9a7347a257079cae7954b6dbf599acb47d65037863b01ef5b1ff4ef7a09e3e674 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From c37124be6348fafae5fb0722702bbb47ef20f252 Mon Sep 17 00:00:00 2001 From: Shinya Onogi Date: Sat, 21 Oct 2017 19:28:27 +0900 Subject: Update GDCM --- ports/gdcm2/CONTROL | 2 +- ports/gdcm2/gdcmSystem.patch | 11 ----------- ports/gdcm2/portfile.cmake | 7 +++---- ports/gdcm2/socketxx.patch | 11 +++++++++++ 4 files changed, 15 insertions(+), 16 deletions(-) delete mode 100644 ports/gdcm2/gdcmSystem.patch create mode 100644 ports/gdcm2/socketxx.patch diff --git a/ports/gdcm2/CONTROL b/ports/gdcm2/CONTROL index b39b3e19f..eacb3a839 100644 --- a/ports/gdcm2/CONTROL +++ b/ports/gdcm2/CONTROL @@ -1,4 +1,4 @@ Source: gdcm2 -Version: 2.6.8-1 +Version: 2.8.3 Description: Grassroots DICOM library Build-Depends: zlib, expat diff --git a/ports/gdcm2/gdcmSystem.patch b/ports/gdcm2/gdcmSystem.patch deleted file mode 100644 index 63722c4f1..000000000 --- a/ports/gdcm2/gdcmSystem.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Source/Common/gdcmSystem.cxx -+++ b/Source/Common/gdcmSystem.cxx -@@ -977,7 +977,7 @@ - } - } - // We need to tell the user... -- gdcmWarningMacro( "Could not find Charset from alias: " + alias ); -+ gdcmWarningMacro( std::string("Could not find Charset from alias: ") + alias ); - return NULL; - } - #endif //_WIN32 diff --git a/ports/gdcm2/portfile.cmake b/ports/gdcm2/portfile.cmake index 0293ea714..7f7ba930b 100644 --- a/ports/gdcm2/portfile.cmake +++ b/ports/gdcm2/portfile.cmake @@ -14,15 +14,14 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO malaterre/GDCM - REF v2.6.8 - SHA512 f3b571f7e00b42b444acd6d696ba1979b6ef83e84744ecddb05ad09d8d2443027145c50cb67c6bc25d6b8e009833b643e575ab988106cb981f529cf455a9b0bc - HEAD_REF master + REF v2.8.3 + SHA512 f8c3d600f067c9b60a32ff5fb7e751c06088e1e4a8e8d0f5e25d9fc7d49e8fab1f0242b10433f522d2043777cddace78c5a9c2cb25bac75a8e84fee554370f62 ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/gdcmSystem.patch + ${CMAKE_CURRENT_LIST_DIR}/socketxx.patch ) diff --git a/ports/gdcm2/socketxx.patch b/ports/gdcm2/socketxx.patch new file mode 100644 index 000000000..0142910b1 --- /dev/null +++ b/ports/gdcm2/socketxx.patch @@ -0,0 +1,11 @@ +--- a/Utilities/socketxx/socket++/CMakeLists.txt ++++ b/Utilities/socketxx/socket++/CMakeLists.txt +@@ -76,7 +76,7 @@ + endif() + set_target_properties(${SOCKETXX_LIBRARY_NAME} PROPERTIES ${SOCKETXX_LIBRARY_PROPERTIES}) + if(BUILD_SHARED_LIBS) +- set_target_properties(${SOCKETXX_LIBRARY_NAME} PROPERTIES INTERFACE_LINK_LIBRARIES "" LINK_INTERFACE_LIBRARIES "") ++ set_target_properties(${SOCKETXX_LIBRARY_NAME} PROPERTIES INTERFACE_LINK_LIBRARIES "") + endif() + + # Install library -- cgit v1.2.3 From 3c89015da2711dce5c96e39be66aa86c2c8ee6a1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 21 Oct 2017 04:04:17 -0700 Subject: [cpprestsdk] Update to 2.10.0 --- ports/cpprestsdk/0001_cmake.patch | 96 ----------------------- ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch | 13 --- ports/cpprestsdk/0003_openssl_110.patch | 14 ---- ports/cpprestsdk/CONTROL | 4 +- ports/cpprestsdk/portfile.cmake | 18 +---- 5 files changed, 5 insertions(+), 140 deletions(-) delete mode 100644 ports/cpprestsdk/0001_cmake.patch delete mode 100644 ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch delete mode 100644 ports/cpprestsdk/0003_openssl_110.patch diff --git a/ports/cpprestsdk/0001_cmake.patch b/ports/cpprestsdk/0001_cmake.patch deleted file mode 100644 index be8f2cff7..000000000 --- a/ports/cpprestsdk/0001_cmake.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff --git a/Release/CMakeLists.txt b/Release/CMakeLists.txt -index 1274102..fe245e6 100644 ---- a/Release/CMakeLists.txt -+++ b/Release/CMakeLists.txt -@@ -89,15 +89,6 @@ elseif(UNIX) # This includes OSX - - option(BUILD_SHARED_LIBS "Build shared Libraries." ON) - option(BUILD_SAMPLES "Build samples." ON) -- option(CASA_INSTALL_HEADERS "Install header files." ON) -- if(CASA_INSTALL_HEADERS) -- file(GLOB CASA_HEADERS_CPPREST include/cpprest/*.hpp include/cpprest/*.h include/cpprest/*.dat) -- install(FILES ${CASA_HEADERS_CPPREST} DESTINATION include/cpprest) -- file(GLOB CASA_HEADERS_PPLX include/pplx/*.hpp include/pplx/*.h) -- install(FILES ${CASA_HEADERS_PPLX} DESTINATION include/pplx) -- file(GLOB CASA_HEADERS_DETAILS include/cpprest/details/*.hpp include/cpprest/details/*.h include/cpprest/details/*.dat) -- install(FILES ${CASA_HEADERS_DETAILS} DESTINATION include/cpprest/details) -- endif() - elseif(WIN32) - option(BUILD_SHARED_LIBS "Build shared Libraries." ON) - option(BUILD_SAMPLES "Build samples." ON) -@@ -113,37 +104,25 @@ elseif(WIN32) - set(Casablanca_DEFINITIONS "" CACHE INTERNAL "Definitions for consume casablanca library") - endif() - add_definitions(${Casablanca_DEFINITIONS} -D_WINSOCK_DEPRECATED_NO_WARNINGS -DWIN32) -- -- if (NOT CPPREST_EXCLUDE_WEBSOCKETS) -- set(NUGET_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../packages") -- set(PACKAGE_PATHS) -- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost.1.58.0.0/") -- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost_system-vc140.1.58.0-vs140rc/") -- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost_date_time-vc140.1.58.0-vs140rc/") -- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost_regex-vc140.1.58.0-vs140rc/") -- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/openssl.v140.windesktop.msvcstl.static.rt-dyn.x64.1.0.2.1/") -- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/zlib.v140.windesktop.msvcstl.static.rt-dyn.1.2.8.8/") -- -- if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE) -- find_library(Boost_SYSTEM_LIBRARY libboost_system-vc140-mt-gd-1_58.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/address-model-64/lib) -- find_library(Boost_DATE_TIME_LIBRARY libboost_date_time-vc140-mt-gd-1_58.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/address-model-64/lib) -- find_library(Boost_REGEX_LIBRARY libboost_regex-vc140-mt-gd-1_58.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/address-model-64/lib) -- set(Boost_LIBRARIES ${Boost_REGEX_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_DATE_TIME_LIBRARY}) -- -- find_library(OpenSSL_libeay_LIBRARY libeay32.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/v140/windesktop/msvcstl/static/rt-dyn/x64/debug) -- find_library(OpenSSL_ssleay_LIBRARY ssleay32.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/v140/windesktop/msvcstl/static/rt-dyn/x64/debug) -- find_library(ZLIB_LIBRARY zlibstaticd.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/v140/windesktop/msvcstl/static/rt-dyn/x64/debug) -- set(OPENSSL_LIBRARIES ${OpenSSL_ssleay_LIBRARY} ${OpenSSL_libeay_LIBRARY} ${ZLIB_LIBRARY}) -- -- set(OPENSSL_INCLUDE_DIR "${NUGET_PATH}/openssl.v140.windesktop.msvcstl.static.rt-dyn.x64.1.0.2.1/build/native/include") -- endif() -- -- set(Boost_INCLUDE_DIR "${NUGET_PATH}/boost.1.58.0.0/lib/native/include") -- endif() -+ if (NOT CPPREST_EXCLUDE_WEBSOCKETS AND NOT WINDOWS_STORE) -+ find_package(ZLIB REQUIRED) -+ find_package(OpenSSL REQUIRED) -+ find_package(Boost REQUIRED COMPONENTS regex system date_time) -+ endif() - else() - message(FATAL_ERROR "-- Unsupported Build Platform.") - endif() - -+option(CASA_INSTALL_HEADERS "Install header files." ON) -+if(CASA_INSTALL_HEADERS) -+ file(GLOB CASA_HEADERS_CPPREST include/cpprest/*.hpp include/cpprest/*.h include/cpprest/*.dat) -+ install(FILES ${CASA_HEADERS_CPPREST} DESTINATION include/cpprest) -+ file(GLOB CASA_HEADERS_PPLX include/pplx/*.hpp include/pplx/*.h) -+ install(FILES ${CASA_HEADERS_PPLX} DESTINATION include/pplx) -+ file(GLOB CASA_HEADERS_DETAILS include/cpprest/details/*.hpp include/cpprest/details/*.h include/cpprest/details/*.dat) -+ install(FILES ${CASA_HEADERS_DETAILS} DESTINATION include/cpprest/details) -+endif() -+ - # Compiler (not platform) specific settings - if(ANDROID) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing") -diff --git a/Release/src/CMakeLists.txt b/Release/src/CMakeLists.txt -index 4074905..da907e5 100644 ---- a/Release/src/CMakeLists.txt -+++ b/Release/src/CMakeLists.txt -@@ -144,10 +144,11 @@ elseif(ANDROID) - else() - set_target_properties(cpprest PROPERTIES - SOVERSION ${CPPREST_VERSION_MAJOR}.${CPPREST_VERSION_MINOR}) -- -- install( -- TARGETS cpprest -- LIBRARY DESTINATION lib -- ARCHIVE DESTINATION lib -- ) - endif() -+ -+install( -+ TARGETS cpprest -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib -+ ) -\ No newline at end of file diff --git a/ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch b/ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch deleted file mode 100644 index ab54baf01..000000000 --- a/ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/release/CMakeLists.txt b/release/CMakeLists.txt -index fe245e6..94a5c57 100644 ---- a/release/CMakeLists.txt -+++ b/release/CMakeLists.txt -@@ -177,7 +177,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) - - # These settings can be used by the test targets - set(Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include) --if (NOT CPPREST_EXCLUDE_WEBSOCKETS) -+if (NOT CPPREST_EXCLUDE_WEBSOCKETS AND NOT WINDOWS_STORE AND NOT WINDOWS_PHONE) - find_path(WEBSOCKETPP_CONFIG websocketpp-config.cmake - HINTS /usr/lib/cmake/websocketpp) - find_path(WEBSOCKETPP_CONFIG_VERSION websocketpp-configVersion.cmake diff --git a/ports/cpprestsdk/0003_openssl_110.patch b/ports/cpprestsdk/0003_openssl_110.patch deleted file mode 100644 index b2b361187..000000000 --- a/ports/cpprestsdk/0003_openssl_110.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/Release/src/websockets/client/ws_client_wspp.cpp b/Release/src/websockets/client/ws_client_wspp.cpp -index 9f91d68..4b5d506 100644 ---- a/Release/src/websockets/client/ws_client_wspp.cpp -+++ b/Release/src/websockets/client/ws_client_wspp.cpp -@@ -76,7 +76,9 @@ static struct ASIO_SSL_memory_leak_suppress - { - ~ASIO_SSL_memory_leak_suppress() - { -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - ::SSL_COMP_free_compression_methods(); -+#endif - } - } ASIO_SSL_memory_leak_suppressor; - diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index 9831af585..48b7a26e0 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,5 @@ Source: cpprestsdk -Version: 2.9.0-4 -Build-Depends: zlib (windows), openssl (windows), boost (windows), websocketpp (windows) +Version: 2.10.0 +Build-Depends: zlib, openssl (windows), boost (windows), websocketpp (windows) Description: C++11 JSON, REST, and OAuth library The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index 83b38a92d..6f339c48a 100644 --- a/ports/cpprestsdk/portfile.cmake +++ b/ports/cpprestsdk/portfile.cmake @@ -3,19 +3,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/cpprestsdk - REF v2.9.0 - SHA512 7f6af05e2aaf49fb5ba24f4fac43b7787345d46913831504925cefc60d1b62e38457e1d628d5de8b0db891b59716d2bfe63a494ca0b337d67fc9ca5447a5ba9b + REF v2.10.0 + SHA512 78e7a38c21db5b563d08cb082bfa96360ac44c66f2189a614d3d2bb71655fd82d931f138590d2dba2d6a4c0884ae37a5be34ea3b753c3517bd68ce490daf60b4 HEAD_REF master ) -if(NOT VCPKG_USE_HEAD_VERSION) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch - ${CMAKE_CURRENT_LIST_DIR}/0002_no_websocketpp_in_uwp.patch - ${CMAKE_CURRENT_LIST_DIR}/0003_openssl_110.patch - ) -endif() set(OPTIONS) if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") @@ -35,15 +26,12 @@ vcpkg_configure_cmake( -DCPPREST_EXCLUDE_WEBSOCKETS=OFF -DCPPREST_EXPORT_DIR=share/cpprestsdk OPTIONS_DEBUG - -DCASA_INSTALL_HEADERS=OFF -DCPPREST_INSTALL_HEADERS=OFF ) vcpkg_install_cmake() -if(VCPKG_USE_HEAD_VERSION) - vcpkg_fixup_cmake_targets() -endif() +vcpkg_fixup_cmake_targets() file(INSTALL ${SOURCE_PATH}/license.txt -- cgit v1.2.3 From 0f66824fd8b8d28bf7a519e5db1e1bd3ce08f1dd Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sat, 21 Oct 2017 08:15:05 -0700 Subject: use vcpkg_from_bitbucket --- ports/eigen3/portfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/eigen3/portfile.cmake b/ports/eigen3/portfile.cmake index 1e08d5ddf..7cae703ad 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -vcpkg_from_github( +vcpkg_from_bitbucket( OUT_SOURCE_PATH SOURCE_PATH - REPO RLovelett/eigen + REPO eigen/eigen REF 3.3.4 - SHA512 b9f6bc74d79aaa7c4cb0c97739ba08c9b0570386f87c4225c06326e734fc27b9a7347a257079cae7954b6dbf599acb47d65037863b01ef5b1ff4ef7a09e3e674 + SHA512 4077a5c3b95e3573774ccd3fe6c7233cb4b83db2358c19b43ea796925bd0201451d8632bddc5d68b1b57bbf67c5473a8908926eed065a745689a2acec9711d5c HEAD_REF master ) -- cgit v1.2.3 From fe842b31d411ed3c14117ca77b65997e671d3a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Here=C3=B1=C3=BA?= Date: Sat, 21 Oct 2017 22:39:01 +0200 Subject: Minor fix --- docs/about/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/about/faq.md b/docs/about/faq.md index 88f88bad0..cb711e384 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -78,7 +78,7 @@ Vcpkg uses CMake internally as a build scripting language. This is because CMake ## Will Vcpkg support downloading compiled binaries from a public or private server? We would like to eventually support downloading precompiled binaries, similar to other system package managers. -In a corporate scenario, we currently recommend building the libraries once and distributing the entire vcpkg root directory to everyone else on the project through some raw file transport such as a network share or HTTP host. See [the `export` command](../users/integration.md#export). +In a corporate scenario, we currently recommend building the libraries once and distributing the entire vcpkg root directory to everyone else on the project through some raw file transport such as a network share or HTTP host. See the [`export`](../users/integration.md#export) command. ## What Visual C++ toolsets are supported? We support Visual Studio 2015 Update 3 and above. -- cgit v1.2.3 From 08e447439dedd6527a745df8008e7b25adbaae0c Mon Sep 17 00:00:00 2001 From: Lowell Smith Date: Sat, 21 Oct 2017 21:38:40 -0400 Subject: fix smpeg2 to use SDL2d in debug mode --- ports/smpeg2/CMakeLists.txt | 2 +- ports/smpeg2/CONTROL | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/smpeg2/CMakeLists.txt b/ports/smpeg2/CMakeLists.txt index 7cda2840a..aa36bbb21 100644 --- a/ports/smpeg2/CMakeLists.txt +++ b/ports/smpeg2/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6) project(SMPEG2 CXX) find_path(SDL_INCLUDE_DIR SDL2/SDL.h) -find_library(SDL_LIBRARY SDL2) +find_library(SDL_LIBRARY NAMES SDL2d SDL2) include_directories(${SDL_INCLUDE_DIR}) include_directories(${SDL_INCLUDE_DIR}/SDL2) diff --git a/ports/smpeg2/CONTROL b/ports/smpeg2/CONTROL index 9d00d9429..0b0bee21e 100644 --- a/ports/smpeg2/CONTROL +++ b/ports/smpeg2/CONTROL @@ -1,4 +1,4 @@ Source: smpeg2 -Version: 2.0.0-2 +Version: 2.0.0-3 Description: SDL MPEG Player Library Build-Depends: sdl2 -- cgit v1.2.3 From 7913033b00d3067e0e8f24087737d89d177ff056 Mon Sep 17 00:00:00 2001 From: Scott Greenlay Date: Sun, 22 Oct 2017 13:12:58 -0700 Subject: Update cppwinrt to Fall Creators --- ports/cppwinrt/CONTROL | 2 +- ports/cppwinrt/portfile.cmake | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/cppwinrt/CONTROL b/ports/cppwinrt/CONTROL index e470b2458..89c6133bd 100644 --- a/ports/cppwinrt/CONTROL +++ b/ports/cppwinrt/CONTROL @@ -1,3 +1,3 @@ Source: cppwinrt -Version: spring_2017_creators_update_for_vs_15.3 +Version: fall_2017_creators_update_for_vs_15.3 Description: C++/WinRT is a standard C++ language projection for the Windows Runtime. diff --git a/ports/cppwinrt/portfile.cmake b/ports/cppwinrt/portfile.cmake index c83465efe..98a483ad2 100644 --- a/ports/cppwinrt/portfile.cmake +++ b/ports/cppwinrt/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) find_program(GIT git) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-spring_2017_creators_update_for_vs_15.3) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-fall_2017_creators_update_for_vs_15.3) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/cppwinrt/archive/spring_2017_creators_update_for_vs_15.3.tar.gz" - FILENAME "cppwinrt-spring_2017_creators_update_for_vs_15.3.tar.gz" - SHA512 779586122552e49a79aff08f4476905e00c3b4ad3dbc502240e9a7cc59ec0e4ab6304149a66505923ab84d2b334059de9e18c84a5b0ed6bde106d19119ef911f + URLS "https://github.com/Microsoft/cppwinrt/archive/fall_2017_creators_update_for_vs_15.3.tar.gz" + FILENAME "fall_2017_creators_update_for_vs_15.3.tar.gz" + SHA512 e3f987ed3f3dce019b8bf9f5451e53b42357473a003b8c14f9009e1848ee0463286bd46fdc3c739c8f7c2d232707e8018f5c087ffae784c745d51a8143f9a294 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -14,5 +14,5 @@ file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwi file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright) # Copy the cppwinrt header files -file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.15063.0/winrt/*) +file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.16299.0/winrt/*) file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt) -- cgit v1.2.3 From 2a617103266e8cc391197126fa16c29f65f13ca5 Mon Sep 17 00:00:00 2001 From: Sean Warren Date: Mon, 23 Oct 2017 11:01:40 +1100 Subject: Remove non-numeric characters from Windows SDK version string See issue #1836, #2019 --- scripts/cmake/vcpkg_get_windows_sdk.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake index 64d8838e7..a8aad64a9 100644 --- a/scripts/cmake/vcpkg_get_windows_sdk.cmake +++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake @@ -10,7 +10,7 @@ function(vcpkg_get_windows_sdk ret) message(FATAL_ERROR "Could not find Windows SDK") endif() - # Remove trailing newline - string(REGEX REPLACE "\n$" "" WINDOWS_SDK "${WINDOWS_SDK}") + # Remove trailing newline and non-numeric characters + string(REGEX REPLACE "[^0-9.]" "" WINDOWS_SDK "${WINDOWS_SDK}") set(${ret} ${WINDOWS_SDK} PARENT_SCOPE) endfunction() \ No newline at end of file -- cgit v1.2.3 From d0d135489eafd2619a5a41cbd5b23725deeb17ec Mon Sep 17 00:00:00 2001 From: pravic Date: Mon, 23 Oct 2017 16:21:19 +0300 Subject: [sciter] Update to 4.0.5.5482 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 5583c626d..df095e29e 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.0.4 +Version: 4.0.5 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index ac3020144..73ba4a91a 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,9 +12,9 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_VERSION 4.0.4) -set(SCITER_REVISION 9b5954df34ac0094e6037ac8aa6e00fb883185f9) -set(SCITER_SHA a87b05aec6c99f56926b005eb1303b2b68f901fe2658433ca11d704b50308e6d291026404b86320fae0f1b12ca257a35338464f21d94ebeaa6e40cfec64a9201) +set(SCITER_VERSION 4.0.5) +set(SCITER_REVISION 4f42e19b81312c1ca87494897d2e7e0461a5aa29) +set(SCITER_SHA 9f2cc6bd3bac6437cb26cb4993e1516276119fac451109da509ea781786825769acdca8dda8111d0ae09f987dc38d747504fb601fae227b2ee606433e4d0fcd4) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From b6e82b55c117477095dfc16126f4c5f64937c9de Mon Sep 17 00:00:00 2001 From: James Chang Date: Tue, 24 Oct 2017 00:04:00 +0800 Subject: [cppzmq] Update to 4.2.2 --- ports/cppzmq/CONTROL | 2 +- ports/cppzmq/portfile.cmake | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ports/cppzmq/CONTROL b/ports/cppzmq/CONTROL index bbf80d29a..39928046d 100644 --- a/ports/cppzmq/CONTROL +++ b/ports/cppzmq/CONTROL @@ -1,4 +1,4 @@ Source: cppzmq -Version: 4.2.1 +Version: 4.2.2 Build-Depends: zeromq Description: lightweight messaging kernel, C++ bindings diff --git a/ports/cppzmq/portfile.cmake b/ports/cppzmq/portfile.cmake index fdfc86257..4f0701c59 100644 --- a/ports/cppzmq/portfile.cmake +++ b/ports/cppzmq/portfile.cmake @@ -1,12 +1,13 @@ #header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppzmq-4.2.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/zeromq/cppzmq/archive/v4.2.1.zip" - FILENAME "cppzmq-4.2.1.zip" - SHA512 ee75ce4bd28ecb5ef660d1ed6f5522654eced6ded8745dc0c61df351f4ff0ff8980d1bd848b2649fcce4aa539a457e56e55b0a59cb49f44b0a29875d0ea28dce + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeromq/cppzmq + REF v4.2.2 + SHA512 5f61ea4a16987c1363c3029cf46b3e83ddd86d65e8d639b0332d691f8fdb5cee121b5d72a9b8c89221daf52ea5892219e0bc4ea4e761bb1e7deb1659011dd3c9 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) # cppzmq is a single header library, so we just need to copy that file in the include directory file(INSTALL ${SOURCE_PATH}/zmq.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -- cgit v1.2.3 From 17baff12b3a3e91cb155a04cb3b4f513e679b436 Mon Sep 17 00:00:00 2001 From: Daniel Olivier Date: Mon, 23 Oct 2017 13:06:32 -0400 Subject: Adding Capstone port --- ports/capstone/CONTROL | 3 +++ ports/capstone/portfile.cmake | 56 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 ports/capstone/CONTROL create mode 100644 ports/capstone/portfile.cmake diff --git a/ports/capstone/CONTROL b/ports/capstone/CONTROL new file mode 100644 index 000000000..c207a5622 --- /dev/null +++ b/ports/capstone/CONTROL @@ -0,0 +1,3 @@ +Source: capstone +Version: +Description: diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake new file mode 100644 index 000000000..4e99b9077 --- /dev/null +++ b/ports/capstone/portfile.cmake @@ -0,0 +1,56 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/capstone) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REF 3.0.5-rc3 + REPO "aquynh/capstone" + SHA512 1327fc570fc2310f71c4d7329528c05e30b9ad68ea50254b9a8c4b3b113f5165c2e0474ec99bbe1e6e46f2820379f388e4c2082c156027e117d88a8f1908acfe + HEAD_REF master +) + +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 + -DCAPSTONE_STATIC=ON + -DCAPSTONE_BUILD_SHARED=OFF + + #-DCAPSTONE_ARCHS="x86" + -DCAPSTONE_X86_SUPPORT=ON + -DCAPSTONE_ARM_SUPPORT=OFF + -DCAPSTONE_ARM64_SUPPORT=OFF + -DCAPSTONE_MIPS_SUPPORT=OFF + -DCAPSTONE_PPC_SUPPORT=OFF + -DCAPSTONE_SPARC_SUPPORT=OFF + -DCAPSTONE_SYSZ_SUPPORT=OFF + -DCAPSTONE_XCORE_SUPPORT=OFF + + -DCAPSTONE_BUILD_TESTS=OFF + OPTIONS_RELEASE + -DCAPSTONE_BUILD_DIET=ON + -DCAPSTONE_X86_REDUCE=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/capstone + RENAME copyright) -- cgit v1.2.3 From 5172654b3ca053108d33cb33f851b709d5526663 Mon Sep 17 00:00:00 2001 From: Daniel Olivier Date: Mon, 23 Oct 2017 13:08:42 -0400 Subject: Adding Freetype-GL port --- .../0001-Use-external-Glew-and-Freetype.patch | 24 +++++++++ ports/freetype-gl/CONTROL | 4 ++ ports/freetype-gl/portfile.cmake | 63 ++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 ports/freetype-gl/0001-Use-external-Glew-and-Freetype.patch create mode 100644 ports/freetype-gl/CONTROL create mode 100644 ports/freetype-gl/portfile.cmake diff --git a/ports/freetype-gl/0001-Use-external-Glew-and-Freetype.patch b/ports/freetype-gl/0001-Use-external-Glew-and-Freetype.patch new file mode 100644 index 000000000..6c33f9e0e --- /dev/null +++ b/ports/freetype-gl/0001-Use-external-Glew-and-Freetype.patch @@ -0,0 +1,24 @@ +From 653dae652bac66e4e96a94ba8ebfabb2227738b7 Mon Sep 17 00:00:00 2001 +From: Daniel Olivier +Date: Thu, 19 Oct 2017 21:26:09 -0400 +Subject: [PATCH] Use external Glew and Freetype + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4eb55e9..2546de6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -74,13 +74,6 @@ if(NOT HAVE_M_PI) + endif() + endif() + +-if(NOT MINGW AND (WIN32 OR WIN64)) +- set(GLEW_ROOT_DIR +- ${CMAKE_CURRENT_SOURCE_DIR}/windows/glew) +- set(ENV{FREETYPE_DIR} +- ${CMAKE_CURRENT_SOURCE_DIR}/windows/freetype) +-endif() +- + find_package(OpenGL REQUIRED) + find_package(Freetype REQUIRED) + \ No newline at end of file diff --git a/ports/freetype-gl/CONTROL b/ports/freetype-gl/CONTROL new file mode 100644 index 000000000..e8b324f20 --- /dev/null +++ b/ports/freetype-gl/CONTROL @@ -0,0 +1,4 @@ +Source: freetype-gl +Version: +Description: +Build-Depends: glew, freetype diff --git a/ports/freetype-gl/portfile.cmake b/ports/freetype-gl/portfile.cmake new file mode 100644 index 000000000..2cf27c447 --- /dev/null +++ b/ports/freetype-gl/portfile.cmake @@ -0,0 +1,63 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freetype-gl) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rougier/freetype-gl + REF 82fb152a74f01b1483ac80d15935fbdfaf3ed836 + SHA512 4842d9e66fd25dbb3a4e3f4bf597a0c1fc3c3c30e0cb1baae1c3306ddcb663ff9108d8fc01bde539fea7cb03a6329054f66166d9e448086358ab7b05953f5884 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Use-external-Glew-and-Freetype.patch" +) + +# make sure that no "internal" libraries are used by removing them +file(REMOVE_RECURSE ${SOURCE_PATH}/windows/freetype) +file(REMOVE_RECURSE ${SOURCE_PATH}/windows/AntTweakBar) +file(REMOVE_RECURSE ${SOURCE_PATH}/windows/glew) +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindGLEW.cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + #PREFER_NINJA + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 + OPTIONS + -Dfreetype-gl_BUILD_APIDOC=OFF + -Dfreetype-gl_BUILD_DEMOS=OFF + -Dfreetype-gl_BUILD_TESTS=OFF +) + +# We may soon install using a modified cmake process with install target +#vcpkg_install_cmake() +vcpkg_build_cmake(LOGFILE_ROOT install) + +file(GLOB HEADER_FILES "${SOURCE_PATH}/*.h") +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/freetype-gl) + +# DLL & LIB +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/freetype-gl.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/freetype-gl.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +#file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/makefont.exe DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +#file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/makefont.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype-gl RENAME copyright) -- cgit v1.2.3 From 7f0dcbc15dbf8e0cb202f8a197f5582c36b4b546 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 23 Oct 2017 11:43:36 -0700 Subject: [cppwinrt] Use vcpkg_from_github --- ports/cppwinrt/CONTROL | 2 +- ports/cppwinrt/portfile.cmake | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ports/cppwinrt/CONTROL b/ports/cppwinrt/CONTROL index 89c6133bd..4f160a6e0 100644 --- a/ports/cppwinrt/CONTROL +++ b/ports/cppwinrt/CONTROL @@ -1,3 +1,3 @@ Source: cppwinrt -Version: fall_2017_creators_update_for_vs_15.3 +Version: fall_2017_creators_update_for_vs_15.3-1 Description: C++/WinRT is a standard C++ language projection for the Windows Runtime. diff --git a/ports/cppwinrt/portfile.cmake b/ports/cppwinrt/portfile.cmake index 98a483ad2..703f9b6a1 100644 --- a/ports/cppwinrt/portfile.cmake +++ b/ports/cppwinrt/portfile.cmake @@ -1,13 +1,12 @@ include(vcpkg_common_functions) -find_program(GIT git) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cppwinrt-fall_2017_creators_update_for_vs_15.3) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/cppwinrt/archive/fall_2017_creators_update_for_vs_15.3.tar.gz" - FILENAME "fall_2017_creators_update_for_vs_15.3.tar.gz" - SHA512 e3f987ed3f3dce019b8bf9f5451e53b42357473a003b8c14f9009e1848ee0463286bd46fdc3c739c8f7c2d232707e8018f5c087ffae784c745d51a8143f9a294 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/cppwinrt + REF fall_2017_creators_update_for_vs_15.3 + SHA512 e3f987ed3f3dce019b8bf9f5451e53b42357473a003b8c14f9009e1848ee0463286bd46fdc3c739c8f7c2d232707e8018f5c087ffae784c745d51a8143f9a294 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) # Put the licence file where vcpkg expects it file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt) -- cgit v1.2.3 From 92d1a53215b2cc23dc090368d5218d42e195c478 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 20 Oct 2017 16:43:05 -0700 Subject: [LineInfo] Store empty string instead of null in default construction --- toolsrc/include/vcpkg/base/lineinfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/include/vcpkg/base/lineinfo.h b/toolsrc/include/vcpkg/base/lineinfo.h index 62973462a..e7e8c3031 100644 --- a/toolsrc/include/vcpkg/base/lineinfo.h +++ b/toolsrc/include/vcpkg/base/lineinfo.h @@ -9,7 +9,7 @@ namespace vcpkg int line_number; const char* file_name; - constexpr LineInfo() : line_number(0), file_name(nullptr) {} + constexpr LineInfo() : line_number(0), file_name("") {} constexpr LineInfo(const int lineno, const char* filename) : line_number(lineno), file_name(filename) {} std::string to_string() const; -- cgit v1.2.3 From 23702360ce912b1827afe5559de936cc9a24cd0c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 20 Oct 2017 16:43:44 -0700 Subject: Merge trim() and trimmed() functions --- toolsrc/include/vcpkg/base/strings.h | 4 +--- toolsrc/src/vcpkg/base/strings.cpp | 16 +++++----------- toolsrc/src/vcpkg/vcpkgpaths.cpp | 2 +- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 5b03286de..ee1b2fc28 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -78,9 +78,7 @@ namespace vcpkg::Strings std::string replace_all(std::string&& s, const std::string& search, const std::string& rep); - void trim(std::string* s); - - std::string trimmed(const std::string& s); + std::string trim(std::string&& s); void trim_all_and_remove_whitespace_strings(std::vector* strings); diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 36efc3adc..27cfcbe71 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -125,24 +125,18 @@ namespace vcpkg::Strings return std::move(s); } - void trim(std::string* s) + std::string trim(std::string&& s) { - s->erase(std::find_if_not(s->rbegin(), s->rend(), details::isspace).base(), s->end()); - s->erase(s->begin(), std::find_if_not(s->begin(), s->end(), details::isspace)); - } - - std::string trimmed(const std::string& s) - { - auto whitespace_back = std::find_if_not(s.rbegin(), s.rend(), details::isspace).base(); - auto whitespace_front = std::find_if_not(s.begin(), whitespace_back, details::isspace); - return std::string(whitespace_front, whitespace_back); + s.erase(std::find_if_not(s.rbegin(), s.rend(), details::isspace).base(), s.end()); + s.erase(s.begin(), std::find_if_not(s.begin(), s.end(), details::isspace)); + return std::move(s); } void trim_all_and_remove_whitespace_strings(std::vector* strings) { for (std::string& s : *strings) { - trim(&s); + s = trim(std::move(s)); } Util::erase_remove_if(*strings, [](const std::string& s) { return s.empty(); }); diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index ef9e383bc..363319767 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -91,7 +91,7 @@ namespace vcpkg Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); } - const fs::path actual_downloaded_path = Strings::trimmed(rc.output); + const fs::path actual_downloaded_path = Strings::trim(std::string{rc.output}); std::error_code ec; const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); Checks::check_exit(VCPKG_LINE_INFO, -- cgit v1.2.3 From aec9215800a42e7e4ec28aad756695a8ced8876c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Oct 2017 17:08:24 -0700 Subject: [InternalCI.ps1] Fix error when buildtrees/ does not exist --- scripts/internalCI.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1 index 887eb7bea..16ce4fc7a 100644 --- a/scripts/internalCI.ps1 +++ b/scripts/internalCI.ps1 @@ -5,7 +5,10 @@ New-Item -type directory downloads -errorAction SilentlyContinue | Out-Null if (-not $?) { throw $? } # Clear out any intermediate files from the previous build -Get-ChildItem buildtrees/*/* | ? { $_.Name -ne "src" -and $_.Extension -ne ".log"} | Remove-Item -Recurse -Force +if (Test-Path buildtrees) +{ + Get-ChildItem buildtrees/*/* | ? { $_.Name -ne "src" -and $_.Extension -ne ".log"} | Remove-Item -Recurse -Force +} # Purge any outdated packages ./vcpkg remove --outdated --recurse -- cgit v1.2.3 From 75746d0b1fabeb4f86a3fa69645e8e5933de3d29 Mon Sep 17 00:00:00 2001 From: Aaron Clauson Date: Wed, 25 Oct 2017 23:05:17 +1100 Subject: Port for leveldb --- ports/leveldb/CMakeLists.txt | 75 ++++++++++++++++++++++++++++++++++++++++ ports/leveldb/CONTROL | 3 ++ ports/leveldb/msvc_code_fix.diff | 63 +++++++++++++++++++++++++++++++++ ports/leveldb/portfile.cmake | 35 +++++++++++++++++++ 4 files changed, 176 insertions(+) create mode 100644 ports/leveldb/CMakeLists.txt create mode 100644 ports/leveldb/CONTROL create mode 100644 ports/leveldb/msvc_code_fix.diff create mode 100644 ports/leveldb/portfile.cmake diff --git a/ports/leveldb/CMakeLists.txt b/ports/leveldb/CMakeLists.txt new file mode 100644 index 000000000..73b082c4a --- /dev/null +++ b/ports/leveldb/CMakeLists.txt @@ -0,0 +1,75 @@ +cmake_minimum_required(VERSION 3.8) +project(leveldb C CXX) + +option(INSTALL_HEADERS "Install header files" ON) + +add_definitions( + -DWIN32 + -D_CRT_NONSTDC_NO_DEPRECATE + -D_SCL_SECURE_NO_WARNINGS + -D_CRT_SECURE_NO_WARNINGS + -DNOMINMAX + -DLEVELDB_ATOMIC_PRESENT + -DLEVELDB_PLATFORM_WINDOWS +) + +add_library(libleveldb + db/builder.cc + db/c.cc + db/dbformat.cc + db/db_impl.cc + db/db_iter.cc + db/dumpfile.cc + db/filename.cc + db/log_reader.cc + db/log_writer.cc + db/memtable.cc + db/repair.cc + db/table_cache.cc + db/version_edit.cc + db/version_set.cc + db/write_batch.cc + helpers/memenv/memenv.cc + port/port_posix_sse.cc + port/port_win.cc + table/block.cc + table/block_builder.cc + table/filter_block.cc + table/format.cc + table/iterator.cc + table/merger.cc + table/table.cc + table/table_builder.cc + table/two_level_iterator.cc + util/arena.cc + util/bloom.cc + util/cache.cc + util/coding.cc + util/comparator.cc + util/crc32c.cc + util/env.cc + util/env_posix.cc + util/env_win.cc + util/filter_policy.cc + util/hash.cc + util/histogram.cc + util/logging.cc + util/options.cc + util/status.cc +) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} include) + +target_link_libraries(libleveldb PUBLIC Iphlpapi.lib Shlwapi.lib) + +install(TARGETS libleveldb + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(INSTALL_HEADERS) + file(GLOB HEADERS include/leveldb/*.h) + install(FILES ${HEADERS} DESTINATION include/leveldb) + install(FILES helpers/memenv/memenv.h DESTINATION include) +endif() \ No newline at end of file diff --git a/ports/leveldb/CONTROL b/ports/leveldb/CONTROL new file mode 100644 index 000000000..b953e540c --- /dev/null +++ b/ports/leveldb/CONTROL @@ -0,0 +1,3 @@ +Source: leveldb +Version: 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73 +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/msvc_code_fix.diff b/ports/leveldb/msvc_code_fix.diff new file mode 100644 index 000000000..6cab006d3 --- /dev/null +++ b/ports/leveldb/msvc_code_fix.diff @@ -0,0 +1,63 @@ + db/c.cc | 2 ++ + port/port_win.h | 7 +++++++ + util/env_win.cc | 6 ++++-- + 3 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/db/c.cc b/db/c.cc +index 08ff0ad..b23e3dc 100644 +--- a/db/c.cc ++++ b/db/c.cc +@@ -5,7 +5,9 @@ + #include "leveldb/c.h" + + #include ++#ifndef WIN32 + #include ++#endif + #include "leveldb/cache.h" + #include "leveldb/comparator.h" + #include "leveldb/db.h" +diff --git a/port/port_win.h b/port/port_win.h +index e8bf46e..989c15c 100644 +--- a/port/port_win.h ++++ b/port/port_win.h +@@ -32,9 +32,16 @@ + #define STORAGE_LEVELDB_PORT_PORT_WIN_H_ + + #ifdef _MSC_VER ++#if !(_MSC_VER >= 1900) + #define snprintf _snprintf ++#endif + #define close _close + #define fread_unlocked _fread_nolock ++#ifdef _WIN64 ++#define ssize_t int64_t ++#else ++#define ssize_t int32_t ++#endif + #endif + + #include +diff --git a/util/env_win.cc b/util/env_win.cc +index d32c4e6..3b4c92b 100644 +--- a/util/env_win.cc ++++ b/util/env_win.cc +@@ -761,14 +761,16 @@ uint64_t Win32Env::NowMicros() + static Status CreateDirInner( const std::string& dirname ) + { + Status sRet; +- DWORD attr = ::GetFileAttributes(dirname.c_str()); ++ std::wstring dirnameW; ++ ToWidePath(dirname, dirnameW); ++ DWORD attr = ::GetFileAttributesW(dirnameW.c_str()); + if (attr == INVALID_FILE_ATTRIBUTES) { // doesn't exist: + std::size_t slash = dirname.find_last_of("\\"); + if (slash != std::string::npos){ + sRet = CreateDirInner(dirname.substr(0, slash)); + if (!sRet.ok()) return sRet; + } +- BOOL result = ::CreateDirectory(dirname.c_str(), NULL); ++ BOOL result = ::CreateDirectoryW(dirnameW.c_str(), NULL); + if (result == FALSE) { + sRet = Status::IOError(dirname, "Could not create directory."); + return sRet; diff --git a/ports/leveldb/portfile.cmake b/ports/leveldb/portfile.cmake new file mode 100644 index 000000000..8a32c8392 --- /dev/null +++ b/ports/leveldb/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(FATAL_ERROR "leveldb doesn't currently support dynamic buildsas there are no export symbols defined.") +endif() + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/leveldb-8b1cd3753b184341e837b30383832645135d3d73) + +vcpkg_from_github( + OUT_SOURCE_PATH "leveldb" + BRANCH "bitcoin-fork" + REPO "bitcoin-core/leveldb" + REF "8b1cd3753b184341e837b30383832645135d3d73" + SHA512 f5ad5fd21fb28ee052a4f3873abd58dab508c71621bcd482ab9e6ef4b57eca182c81502ddfe59736f5b2a54f2d05b397dd15982b3bd5d9039cd481eae3c7b958 +) + +message(STATUS "Patching") + +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/msvc_code_fix.diff) + +message(STATUS "Building") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/leveldb RENAME copyright) -- cgit v1.2.3 From ae48463360d4394a9c55e91f46f6f103dd046ab3 Mon Sep 17 00:00:00 2001 From: pravic Date: Wed, 25 Oct 2017 17:32:38 +0300 Subject: [sqlite3] update to 3.21.0 --- ports/sqlite3/CONTROL | 2 +- ports/sqlite3/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index b444a953a..ccb3a3745 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,3 +1,3 @@ Source: sqlite3 -Version: 3.20.1 +Version: 3.21.0 Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index 4bb53ef80..fc06850e2 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(SQLITE_VERSION 3200100) -set(SQLITE_HASH 66c325fec1c13ed5360899aa3e3a7a67d2b79d24dde954df7df7179c4d07e7b20edf831cc7107df863f3f8b0f30d21b934fcd0f7ea7b74409abbc0060bc28f7b) +set(SQLITE_VERSION 3210000) +set(SQLITE_HASH 0a272b00825d07528c3842ccd483d81e5e719ab56737eec0972f7f8191dfbe92e35777ab8d1b37c95fde9320bbfa3c365a4b30253af876340f55517ea96bf665) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite-amalgamation-${SQLITE_VERSION}) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From d1627a0a8056453a7b777e5108756c935b0eeec0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 11:28:27 -0700 Subject: [libjpeg-turbo] Fix CRT linkage --- ports/libjpeg-turbo/CONTROL | 2 +- ports/libjpeg-turbo/portfile.cmake | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ports/libjpeg-turbo/CONTROL b/ports/libjpeg-turbo/CONTROL index bf642bd1b..d63d15db9 100644 --- a/ports/libjpeg-turbo/CONTROL +++ b/ports/libjpeg-turbo/CONTROL @@ -1,3 +1,3 @@ Source: libjpeg-turbo -Version: 1.5.2-1 +Version: 1.5.2-2 Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index a5d09fda2..225b23353 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -16,13 +16,9 @@ vcpkg_find_acquire_program(NASM) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(ENABLE_STATIC OFF) - set(ENABLE_SHARED ON) -else() - set(ENABLE_STATIC ON) - set(ENABLE_SHARED OFF) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_CRT_DLL) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") set(LIBJPEGTURBO_SIMD -DWITH_SIMD=OFF) @@ -36,6 +32,7 @@ vcpkg_configure_cmake( -DENABLE_SHARED=${ENABLE_SHARED} -DENABLE_EXECUTABLES=OFF -DINSTALL_DOCS=OFF + -DWITH_CRT_DLL=${WITH_CRT_DLL} ${LIBJPEGTURBO_SIMD} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF ) -- cgit v1.2.3 From 2735cea57197b9b5f93faf2e586643dea952bf1e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 11:51:21 -0700 Subject: [libmysql] Disable /MT. Convert portfile tabs to spaces and CRLF to LF. --- ports/libmysql/CONTROL | 6 +- ports/libmysql/portfile.cmake | 173 +++++++++++++++++++++--------------------- 2 files changed, 90 insertions(+), 89 deletions(-) diff --git a/ports/libmysql/CONTROL b/ports/libmysql/CONTROL index 0c772e04e..8350014e4 100644 --- a/ports/libmysql/CONTROL +++ b/ports/libmysql/CONTROL @@ -1,3 +1,3 @@ -Source: libmysql -Version: 5.7.17-2 -Description: A MySQL client library for C development. +Source: libmysql +Version: 5.7.17-3 +Description: A MySQL client library for C development. diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake index 81ffdfb98..707d10149 100644 --- a/ports/libmysql/portfile.cmake +++ b/ports/libmysql/portfile.cmake @@ -1,87 +1,88 @@ -if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h") - message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.") -endif() - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mysql-server-mysql-5.7.17) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mysql/mysql-server/archive/mysql-5.7.17.tar.gz" - FILENAME "mysql-server-mysql-5.7.17.tar.gz" - SHA512 31488972e08a6b83f88e6e3f7923aca91e01eac702f4942fdae92e13f66d92ac86c24dfe7a65a001db836c900147d1c3871b36af8cbb281a0e6c555617cac12c -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/boost_and_build.patch -) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DWITHOUT_SERVER=ON - -DWITH_UNIT_TESTS=OFF - -DENABLED_PROFILING=OFF - -DWIX_DIR=OFF -) - -vcpkg_install_cmake() - -# delete debug headers -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include) - -# switch mysql into /mysql -file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/include2) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) -file(RENAME ${CURRENT_PACKAGES_DIR}/include2 ${CURRENT_PACKAGES_DIR}/include/mysql) - -## delete useless vcruntime/scripts/bin/msg file -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/share - ${CURRENT_PACKAGES_DIR}/debug/share - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin - ${CURRENT_PACKAGES_DIR}/docs - ${CURRENT_PACKAGES_DIR}/debug/docs - ${CURRENT_PACKAGES_DIR}/lib/debug) - -# remove misc files -file(REMOVE - ${CURRENT_PACKAGES_DIR}/COPYING - ${CURRENT_PACKAGES_DIR}/README - ${CURRENT_PACKAGES_DIR}/debug/COPYING - ${CURRENT_PACKAGES_DIR}/debug/README) - -# remove not-related libs -file (REMOVE - ${CURRENT_PACKAGES_DIR}/lib/mysqlservices.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mysqlservices.lib) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE - ${CURRENT_PACKAGES_DIR}/lib/libmysql.lib - ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll - ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb - ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll - ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb) -else() - file(REMOVE - ${CURRENT_PACKAGES_DIR}/lib/mysqlclient.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mysqlclient.lib) - - # correct the dll directory - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/bin/libmysql.dll) - file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/bin/libmysql.pdb) - file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.dll) - file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.pdb) -endif() - -# copy license -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmysql) +if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h") + message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.") +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mysql-server-mysql-5.7.17) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/mysql/mysql-server/archive/mysql-5.7.17.tar.gz" + FILENAME "mysql-server-mysql-5.7.17.tar.gz" + SHA512 31488972e08a6b83f88e6e3f7923aca91e01eac702f4942fdae92e13f66d92ac86c24dfe7a65a001db836c900147d1c3871b36af8cbb281a0e6c555617cac12c +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/boost_and_build.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DWITHOUT_SERVER=ON + -DWITH_UNIT_TESTS=OFF + -DENABLED_PROFILING=OFF + -DWIX_DIR=OFF + -DWINDOWS_RUNTIME_MD=ON # Note: this disables _replacement_ of /MD with /MT. If /MT is specified, it will be preserved. +) + +vcpkg_install_cmake() + +# delete debug headers +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include) + +# switch mysql into /mysql +file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/include2) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/include2 ${CURRENT_PACKAGES_DIR}/include/mysql) + +## delete useless vcruntime/scripts/bin/msg file +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/share + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/docs + ${CURRENT_PACKAGES_DIR}/debug/docs + ${CURRENT_PACKAGES_DIR}/lib/debug) + +# remove misc files +file(REMOVE + ${CURRENT_PACKAGES_DIR}/COPYING + ${CURRENT_PACKAGES_DIR}/README + ${CURRENT_PACKAGES_DIR}/debug/COPYING + ${CURRENT_PACKAGES_DIR}/debug/README) + +# remove not-related libs +file (REMOVE + ${CURRENT_PACKAGES_DIR}/lib/mysqlservices.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/mysqlservices.lib) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE + ${CURRENT_PACKAGES_DIR}/lib/libmysql.lib + ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll + ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb + ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll + ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb) +else() + file(REMOVE + ${CURRENT_PACKAGES_DIR}/lib/mysqlclient.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/mysqlclient.lib) + + # correct the dll directory + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/bin/libmysql.dll) + file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/bin/libmysql.pdb) + file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.dll) + file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.pdb) +endif() + +# copy license +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmysql) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmysql/COPYING ${CURRENT_PACKAGES_DIR}/share/libmysql/copyright) \ No newline at end of file -- cgit v1.2.3 From 0cbaaac8fc8ec97974e94a681ecf9be75238b41c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 12:44:44 -0700 Subject: [mpir] Reformat to LF+spaces. Add early error detection for UWP and /MT. --- ports/mpir/CONTROL | 6 +- ports/mpir/portfile.cmake | 170 ++++++++++++++++++++++++---------------------- 2 files changed, 92 insertions(+), 84 deletions(-) diff --git a/ports/mpir/CONTROL b/ports/mpir/CONTROL index fc15d9b41..e80853a7d 100644 --- a/ports/mpir/CONTROL +++ b/ports/mpir/CONTROL @@ -1,3 +1,3 @@ -Source: mpir -Version: 3.0.0-2 -Description: Multiple Precision Integers and Rationals. \ No newline at end of file +Source: mpir +Version: 3.0.0-2 +Description: Multiple Precision Integers and Rationals. diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake index 1595a6533..97f8898e5 100644 --- a/ports/mpir/portfile.cmake +++ b/ports/mpir/portfile.cmake @@ -1,81 +1,89 @@ -include(vcpkg_common_functions) - -set(MPIR_VERSION 3.0.0) -set(MPIR_HASH "c735105db8b86db739fd915bf16064e6bc82d0565ad8858059e4e93f62c9d72d9a1c02a5ca9859b184346a8dc64fa714d4d61404cff1e405dc548cbd54d0a88e") -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpir-${MPIR_VERSION}) - -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://mpir.org/mpir-${MPIR_VERSION}.tar.bz2" - FILENAME "mpir-${MPIR_VERSION}.tar.bz2" - SHA512 ${MPIR_HASH} -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) - -if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(MSVC_VERSION 15) -else() - set(MSVC_VERSION 14) -endif() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_mpir_gc/dll_mpir_gc.vcxproj - ) -else() - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_mpir_gc/lib_mpir_gc.vcxproj - ) -endif() - -IF (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") - SET(BUILD_ARCH "Win32") -ELSE() - SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) -ENDIF() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/gmp.h - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/gmpxx.h - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.h - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpirxx.h - DESTINATION ${CURRENT_PACKAGES_DIR}/include - ) - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) - file(INSTALL - ${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) - file(INSTALL ${SOURCE_PATH}/COPYING.lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpir RENAME copyright) - vcpkg_copy_pdbs() -else() - file(INSTALL - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/gmp.h - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/gmpxx.h - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpir.h - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpirxx.h - DESTINATION ${CURRENT_PACKAGES_DIR}/include - ) - file(INSTALL - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpir.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - ) - file(INSTALL - ${SOURCE_PATH}/lib/${BUILD_ARCH}/Release/mpir.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - ) - file(INSTALL ${SOURCE_PATH}/COPYING.lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpir RENAME copyright) -endif() - -message(STATUS "Installing done") +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "MPIR currently can only be built for desktop") +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "MPIR currently can only be built using the dynamic CRT") +endif() + +set(MPIR_VERSION 3.0.0) +set(MPIR_HASH "c735105db8b86db739fd915bf16064e6bc82d0565ad8858059e4e93f62c9d72d9a1c02a5ca9859b184346a8dc64fa714d4d61404cff1e405dc548cbd54d0a88e") +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpir-${MPIR_VERSION}) + +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://mpir.org/mpir-${MPIR_VERSION}.tar.bz2" + FILENAME "mpir-${MPIR_VERSION}.tar.bz2" + SHA512 ${MPIR_HASH} +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(MSVC_VERSION 15) +else() + set(MSVC_VERSION 14) +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_mpir_gc/dll_mpir_gc.vcxproj + ) +else() + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_mpir_gc/lib_mpir_gc.vcxproj + ) +endif() + +IF (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + SET(BUILD_ARCH "Win32") +ELSE() + SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) +ENDIF() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(INSTALL + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/gmp.h + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/gmpxx.h + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.h + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpirxx.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) + file(INSTALL + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Debug/mpir.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/mpir.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +else() + file(INSTALL + ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/gmp.h + ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/gmpxx.h + ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpir.h + ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpirxx.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) + file(INSTALL + ${SOURCE_PATH}/lib/${BUILD_ARCH}/Debug/mpir.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/lib/${BUILD_ARCH}/Release/mpir.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING.lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpir RENAME copyright) +vcpkg_copy_pdbs() + +message(STATUS "Installing done") -- cgit v1.2.3 From e45fb7498d4a373669bf8aaa26dea284bc31b7a5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 13:15:41 -0700 Subject: [mpir] Improve error handling; allow dyn/dyn-rt or lib/lib-rt but not cross --- ports/mpir/portfile.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake index 97f8898e5..cc5cab8b8 100644 --- a/ports/mpir/portfile.cmake +++ b/ports/mpir/portfile.cmake @@ -4,8 +4,10 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "MPIR currently can only be built for desktop") endif() -if(VCPKG_CRT_LINKAGE STREQUAL "static") - message(FATAL_ERROR "MPIR currently can only be built using the dynamic CRT") +if(VCPKG_CRT_LINKAGE STREQUAL "static" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "MPIR currently can only be built using the dynamic CRT when building DLLs") +elseif(VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(FATAL_ERROR "MPIR currently can only be built using the static CRT when building LIBs") endif() set(MPIR_VERSION 3.0.0) -- cgit v1.2.3 From 1cdcb7904084484ccfa75f32ba581d9e2dda45c8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 13:31:02 -0700 Subject: [mpir] Enable lib/md. --- ports/mpir/CONTROL | 2 +- ports/mpir/enable-runtimelibrary-toggle.patch | 26 ++++++++++++++++++++++++++ ports/mpir/portfile.cmake | 14 ++++++++++++-- 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 ports/mpir/enable-runtimelibrary-toggle.patch diff --git a/ports/mpir/CONTROL b/ports/mpir/CONTROL index e80853a7d..b9d1b2d74 100644 --- a/ports/mpir/CONTROL +++ b/ports/mpir/CONTROL @@ -1,3 +1,3 @@ Source: mpir -Version: 3.0.0-2 +Version: 3.0.0-3 Description: Multiple Precision Integers and Rationals. diff --git a/ports/mpir/enable-runtimelibrary-toggle.patch b/ports/mpir/enable-runtimelibrary-toggle.patch new file mode 100644 index 000000000..d0260e869 --- /dev/null +++ b/ports/mpir/enable-runtimelibrary-toggle.patch @@ -0,0 +1,26 @@ +diff --git a/build.vc/mpir_debug_lib.props b/build.vc/mpir_debug_lib.props +index b2fd57b..3937570 100644 +--- a/build.vc/mpir_debug_lib.props ++++ b/build.vc/mpir_debug_lib.props +@@ -9,7 +9,7 @@ + + + $(IntDir)dum\my\%(RelativeDir) +- MultiThreadedDebug ++ $(RuntimeLibrary) + $(TargetDir)$(TargetName).pdb + + +diff --git a/build.vc/mpir_release_lib.props b/build.vc/mpir_release_lib.props +index 6cdff3e..3937570 100644 +--- a/build.vc/mpir_release_lib.props ++++ b/build.vc/mpir_release_lib.props +@@ -9,7 +9,7 @@ + + + $(IntDir)dum\my\%(RelativeDir) +- MultiThreaded ++ $(RuntimeLibrary) + $(TargetDir)$(TargetName).pdb + + diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake index cc5cab8b8..c56cfa545 100644 --- a/ports/mpir/portfile.cmake +++ b/ports/mpir/portfile.cmake @@ -6,8 +6,6 @@ endif() if(VCPKG_CRT_LINKAGE STREQUAL "static" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") message(FATAL_ERROR "MPIR currently can only be built using the dynamic CRT when building DLLs") -elseif(VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message(FATAL_ERROR "MPIR currently can only be built using the static CRT when building LIBs") endif() set(MPIR_VERSION 3.0.0) @@ -21,6 +19,11 @@ vcpkg_download_distfile(ARCHIVE_FILE ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/enable-runtimelibrary-toggle.patch" +) + if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(MSVC_VERSION 15) else() @@ -32,8 +35,15 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_mpir_gc/dll_mpir_gc.vcxproj ) else() + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(RuntimeLibraryExt "") + else() + set(RuntimeLibraryExt "DLL") + endif() vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_mpir_gc/lib_mpir_gc.vcxproj + OPTIONS_DEBUG "/p:RuntimeLibrary=MultiThreadedDebug${RuntimeLibraryExt}" + OPTIONS_RELEASE "/p:RuntimeLibrary=MultiThreaded${RuntimeLibraryExt}" ) endif() -- cgit v1.2.3 From e3dcfcb4031903387cd7bdf29de2832759d969ba Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 13:57:28 -0700 Subject: [boost] Fix manual-links. Fixes #2057. --- ports/boost/CONTROL | 2 +- ports/boost/portfile.cmake | 35 +++++++++++++++++++++-------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index a5da89a5a..55c32a280 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,5 +1,5 @@ Source: boost -Version: 1.65.1-1 +Version: 1.65.1-2 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2 diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index b0699eaa2..57dc081da 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -303,14 +303,8 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) FILES_MATCHING PATTERN "*.dll") endif() file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*.lib) + boost_rename_libs(RELEASE_LIBS) -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/boost_test_exec_monitor-vc140-mt-${VERSION}.lib) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/boost_test_exec_monitor-vc140-mt-${VERSION}.lib - ${CURRENT_PACKAGES_DIR}/lib/manual-link/boost_test_exec_monitor-vc140-mt-${VERSION}.lib - ) -endif() message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") @@ -324,13 +318,26 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) endif() file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*.lib) boost_rename_libs(DEBUG_LIBS) -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/boost_test_exec_monitor-vc140-mt-gd-${VERSION}.lib) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/boost_test_exec_monitor-vc140-mt-gd-${VERSION}.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/boost_test_exec_monitor-vc140-mt-gd-${VERSION}.lib - ) -endif() message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") +macro(move_to_manual_link LIBNAME) + if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/${LIBNAME}-vc140-mt-${VERSION_FULL}.lib) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/${LIBNAME}-vc140-mt-${VERSION_FULL}.lib + ${CURRENT_PACKAGES_DIR}/lib/manual-link/${LIBNAME}-vc140-mt-${VERSION_FULL}.lib + ) + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/${LIBNAME}-vc140-mt-gd-${VERSION_FULL}.lib) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/${LIBNAME}-vc140-mt-gd-${VERSION_FULL}.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/${LIBNAME}-vc140-mt-gd-${VERSION_FULL}.lib + ) + endif() +endmacro() + +move_to_manual_link(boost_test_exec_monitor) +move_to_manual_link(boost_prg_exec_monitor) + vcpkg_copy_pdbs() -- cgit v1.2.3 From 0245c2ac64d13ba9f5684d2d4fa82c26d2762183 Mon Sep 17 00:00:00 2001 From: Aaron Clauson Date: Thu, 26 Oct 2017 08:57:02 +1100 Subject: Fix for secp256k1 and missing headers --- ports/secp256k1/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/secp256k1/CMakeLists.txt b/ports/secp256k1/CMakeLists.txt index d439053bc..2e6b46198 100644 --- a/ports/secp256k1/CMakeLists.txt +++ b/ports/secp256k1/CMakeLists.txt @@ -21,6 +21,6 @@ install(TARGETS secp256k1 ) if(INSTALL_HEADERS) - file(GLOB HEADERS include/secp256k1.h) + file(GLOB HEADERS include/*.h) install(FILES ${HEADERS} DESTINATION include) endif() \ No newline at end of file -- cgit v1.2.3 From 26ba18606f2ea46bb2b5ddd64c42ed0ee9966fb1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 16:23:09 -0700 Subject: [secp256k1] Bump version --- ports/secp256k1/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/secp256k1/CONTROL b/ports/secp256k1/CONTROL index 181a4a7e6..be37f1693 100644 --- a/ports/secp256k1/CONTROL +++ b/ports/secp256k1/CONTROL @@ -1,3 +1,3 @@ Source: secp256k1 -Version: 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4 +Version: 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4-1 Description: Optimized C library for EC operations on curve -- cgit v1.2.3 From f1dc231bc835f30dca1838d2ffc8646cc6ba0786 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 16:51:18 -0700 Subject: [capstone] Add version. Support shared builds --- ports/capstone/CONTROL | 2 +- ports/capstone/portfile.cmake | 37 ++++++++++++++++--------------------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/ports/capstone/CONTROL b/ports/capstone/CONTROL index c207a5622..b442eccd9 100644 --- a/ports/capstone/CONTROL +++ b/ports/capstone/CONTROL @@ -1,3 +1,3 @@ Source: capstone -Version: +Version: 3.0.5-rc3 Description: diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index 4e99b9077..430638322 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -1,17 +1,4 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/capstone) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REF 3.0.5-rc3 @@ -20,20 +7,20 @@ vcpkg_from_github( HEAD_REF master ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CAPSTONE_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CAPSTONE_BUILD_SHARED) + 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 + PREFER_NINJA OPTIONS - -DCAPSTONE_STATIC=ON - -DCAPSTONE_BUILD_SHARED=OFF + -DCAPSTONE_BUILD_STATIC=${CAPSTONE_BUILD_STATIC} + -DCAPSTONE_BUILD_SHARED=${CAPSTONE_BUILD_SHARED} #-DCAPSTONE_ARCHS="x86" -DCAPSTONE_X86_SUPPORT=ON - -DCAPSTONE_ARM_SUPPORT=OFF - -DCAPSTONE_ARM64_SUPPORT=OFF + -DCAPSTONE_ARM_SUPPORT=ON + -DCAPSTONE_ARM64_SUPPORT=ON -DCAPSTONE_MIPS_SUPPORT=OFF -DCAPSTONE_PPC_SUPPORT=OFF -DCAPSTONE_SPARC_SUPPORT=OFF @@ -47,8 +34,16 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(EXES) + file(REMOVE ${EXES}) +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE.txt -- cgit v1.2.3 From 29e4c5302e61c8fe927da2f79c278dd70fa03d85 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Oct 2017 16:57:12 -0700 Subject: [gmime] Prefer ninja --- ports/gmime/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/gmime/portfile.cmake b/ports/gmime/portfile.cmake index 98b3a104f..1fa50063c 100644 --- a/ports/gmime/portfile.cmake +++ b/ports/gmime/portfile.cmake @@ -24,6 +24,7 @@ configure_file(${CMAKE_CURRENT_LIST_DIR}/gmime.def ${SOURCE_PATH} COPYONLY) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() -- cgit v1.2.3 From 133099fa2c46152474cfab052d0d1bcbc83749f2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 25 Oct 2017 18:31:00 -0700 Subject: [pangolin] Fix glew dependency and fix usage of the crt --- ports/pangolin/CONTROL | 2 +- ports/pangolin/portfile.cmake | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/pangolin/CONTROL b/ports/pangolin/CONTROL index a4d670b74..a515ba50e 100644 --- a/ports/pangolin/CONTROL +++ b/ports/pangolin/CONTROL @@ -1,4 +1,4 @@ Source: pangolin -Version: 0.5-2 +Version: 0.5-3 Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg Description: Lightweight GUI Library diff --git a/ports/pangolin/portfile.cmake b/ports/pangolin/portfile.cmake index 3fe7ef8b6..19763f0d6 100644 --- a/ports/pangolin/portfile.cmake +++ b/ports/pangolin/portfile.cmake @@ -8,6 +8,10 @@ vcpkg_from_github( HEAD_REF master ) +file(REMOVE ${SOURCE_PATH}/CMakeModules/FindGLEW.cmake) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" MSVC_USE_STATIC_CRT) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -16,6 +20,7 @@ vcpkg_configure_cmake( -DBUILD_EXTERN_GLEW=OFF -DBUILD_EXTERN_LIBPNG=OFF -DBUILD_EXTERN_LIBJPEG=OFF + -DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT} ) vcpkg_install_cmake() -- cgit v1.2.3 From 0028cbc23fef82c3a36de771f990f0dfea407bb0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 26 Oct 2017 18:16:36 -0700 Subject: [rpclib] Initial commit of 2.2.0 --- ports/rpclib/CONTROL | 3 +++ ports/rpclib/portfile.cmake | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 ports/rpclib/CONTROL create mode 100644 ports/rpclib/portfile.cmake diff --git a/ports/rpclib/CONTROL b/ports/rpclib/CONTROL new file mode 100644 index 000000000..160f4651c --- /dev/null +++ b/ports/rpclib/CONTROL @@ -0,0 +1,3 @@ +Source: rpclib +Version: 2.2.0 +Description: a RPC library for C++, providing both a client and server implementation. It is built using modern C++14. diff --git a/ports/rpclib/portfile.cmake b/ports/rpclib/portfile.cmake new file mode 100644 index 000000000..5f4ac6a57 --- /dev/null +++ b/ports/rpclib/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rpclib/rpclib + REF v2.2.0 + SHA512 73d2344debb3a6ced6a045ba3bf8839a6f91d8f43dfac8760c65d19d1fc7960e778457a20fddbd771d7dd4b12e32d8a925f1fc008d11ccc5654dbeb08ba0f50a + 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/rpclib) + +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/rpclib) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/rpclib/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/rpclib/copyright) -- cgit v1.2.3 From 286625e09eb4e2334062b65cf45fc1dee5fedb66 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 26 Oct 2017 18:33:17 -0700 Subject: [rttr] Disable unit tests during build. Not bumping version because the output files are unaffected. --- ports/rttr/disable-unit-tests.patch | 14 ++++++++++++++ ports/rttr/portfile.cmake | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 ports/rttr/disable-unit-tests.patch diff --git a/ports/rttr/disable-unit-tests.patch b/ports/rttr/disable-unit-tests.patch new file mode 100644 index 000000000..b27f01661 --- /dev/null +++ b/ports/rttr/disable-unit-tests.patch @@ -0,0 +1,14 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b9fd698..bcaebfe 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -31,7 +31,9 @@ + ############################################# + + add_subdirectory (rttr) ++if(UNIT_TESTS) + add_subdirectory (unit_tests) ++endif() + + if (${BUILD_BENCHMARKS}) + add_subdirectory (benchmarks) diff --git a/ports/rttr/portfile.cmake b/ports/rttr/portfile.cmake index b590b7873..f3b3eafb9 100644 --- a/ports/rttr/portfile.cmake +++ b/ports/rttr/portfile.cmake @@ -14,7 +14,9 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rttr-0.9.5-src - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch" + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch" + "${CMAKE_CURRENT_LIST_DIR}/disable-unit-tests.patch" ) vcpkg_configure_cmake( -- cgit v1.2.3 From 8a952743a3a3f856f6be6b985158ea1c1ffb2c6f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 26 Oct 2017 18:59:11 -0700 Subject: Introduce Util::Sets::contains() --- toolsrc/include/vcpkg/base/util.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index d5db6b6ee..7ffd027f0 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -20,6 +20,15 @@ namespace vcpkg::Util } } + namespace Sets + { + template> + bool contains(const Container& container, const T& item) + { + return container.find(item) != container.cend(); + } + } + template using FmapOut = decltype(std::declval()(*begin(std::declval()))); -- cgit v1.2.3 From 2c9536ce4fe0ac755e188617ce61076b26646100 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 26 Oct 2017 19:00:30 -0700 Subject: [vcpkg ci] Introduce --exclude option --- toolsrc/include/vcpkg/build.h | 8 +++++--- toolsrc/include/vcpkg/dependencies.h | 3 ++- toolsrc/include/vcpkg/install.h | 2 ++ toolsrc/include/vcpkg/packagespec.h | 2 ++ toolsrc/src/tests.installplan.cpp | 7 ++++--- toolsrc/src/vcpkg/build.cpp | 6 +++++- toolsrc/src/vcpkg/commands.ci.cpp | 39 ++++++++++++++++++++---------------- toolsrc/src/vcpkg/dependencies.cpp | 22 ++++++++------------ toolsrc/src/vcpkg/install.cpp | 21 +++++++++++++++++-- toolsrc/src/vcpkg/packagespec.cpp | 8 ++++++++ 10 files changed, 77 insertions(+), 41 deletions(-) diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 774e25922..bf52e54b2 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -65,15 +65,17 @@ namespace vcpkg::Build BUILD_FAILED, POST_BUILD_CHECKS_FAILED, FILE_CONFLICTS, - CASCADED_DUE_TO_MISSING_DEPENDENCIES + CASCADED_DUE_TO_MISSING_DEPENDENCIES, + EXCLUDED, }; - static constexpr std::array BUILD_RESULT_VALUES = { + static constexpr std::array BUILD_RESULT_VALUES = { BuildResult::SUCCEEDED, BuildResult::BUILD_FAILED, BuildResult::POST_BUILD_CHECKS_FAILED, BuildResult::FILE_CONFLICTS, - BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES}; + BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES, + BuildResult::EXCLUDED}; const std::string& to_string(const BuildResult build_result); std::string create_error_message(const BuildResult build_result, const PackageSpec& spec); diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 585338ae2..60c83fcca 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -38,7 +38,8 @@ namespace vcpkg::Dependencies UNKNOWN, BUILD_AND_INSTALL, INSTALL, - ALREADY_INSTALLED + ALREADY_INSTALLED, + EXCLUDED }; struct InstallPlanAction : Util::MoveOnlyBase diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index 809befb16..895028865 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -62,6 +62,8 @@ namespace vcpkg::Install SUCCESS, }; + std::vector get_all_port_names(const VcpkgPaths& paths); + void install_files_and_write_listfile(Files::Filesystem& fs, const fs::path& source_dir, const InstallDir& dirs); InstallResult install_package(const VcpkgPaths& paths, const BinaryControlFile& binary_paragraph, diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index 60c99782e..99aaaf0d7 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -20,6 +20,8 @@ namespace vcpkg static ExpectedT from_name_and_triplet(const std::string& name, const Triplet& triplet); + static std::vector to_package_specs(const std::vector& ports, const Triplet& triplet); + const std::string& name() const; const Triplet& triplet() const; diff --git a/toolsrc/src/tests.installplan.cpp b/toolsrc/src/tests.installplan.cpp index 120009db5..347612abd 100644 --- a/toolsrc/src/tests.installplan.cpp +++ b/toolsrc/src/tests.installplan.cpp @@ -17,8 +17,9 @@ namespace Microsoft::VisualStudio::CppUnitTestFramework case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; case Dependencies::InstallPlanType::INSTALL: return L"INSTALL"; + case Dependencies::InstallPlanType::EXCLUDED: return L"EXCLUDED"; case Dependencies::InstallPlanType::UNKNOWN: return L"UNKNOWN"; - default: return ToString((int)t); + default: return ToString(static_cast(t)); } } @@ -30,7 +31,7 @@ namespace Microsoft::VisualStudio::CppUnitTestFramework case Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED"; case Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED"; case Dependencies::RequestType::UNKNOWN: return L"UNKNOWN"; - default: return ToString((int)t); + default: return ToString(static_cast(t)); } } } @@ -484,4 +485,4 @@ namespace UnitTest1 features_check(&install_plan[7], "c", {"core"}); } }; -} \ No newline at end of file +} diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index cf16c8f9c..c26dcc591 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -87,6 +87,8 @@ namespace vcpkg::Build::Command Checks::exit_fail(VCPKG_LINE_INFO); } + Checks::check_exit(VCPKG_LINE_INFO, result.code != BuildResult::EXCLUDED); + if (result.code != BuildResult::SUCCEEDED) { System::println(System::Color::error, Build::create_error_message(result.code, spec)); @@ -365,6 +367,7 @@ namespace vcpkg::Build static const std::string FILE_CONFLICTS_STRING = "FILE_CONFLICTS"; static const std::string POST_BUILD_CHECKS_FAILED_STRING = "POST_BUILD_CHECKS_FAILED"; static const std::string CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING = "CASCADED_DUE_TO_MISSING_DEPENDENCIES"; + static const std::string EXCLUDED_STRING = "EXCLUDED"; switch (build_result) { @@ -372,8 +375,9 @@ namespace vcpkg::Build case BuildResult::SUCCEEDED: return SUCCEEDED_STRING; case BuildResult::BUILD_FAILED: return BUILD_FAILED_STRING; case BuildResult::POST_BUILD_CHECKS_FAILED: return POST_BUILD_CHECKS_FAILED_STRING; - case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: return CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING; case BuildResult::FILE_CONFLICTS: return FILE_CONFLICTS_STRING; + case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: return CASCADED_DUE_TO_MISSING_DEPENDENCIES_STRING; + case BuildResult::EXCLUDED: return EXCLUDED_STRING; default: Checks::unreachable(VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index ffeaad790..559dc4541 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -1,6 +1,5 @@ #include "pch.h" -#include #include #include #include @@ -10,7 +9,6 @@ #include #include #include -#include #include namespace vcpkg::Commands::CI @@ -19,27 +17,28 @@ namespace vcpkg::Commands::CI using Dependencies::InstallPlanAction; using Dependencies::InstallPlanType; - static std::vector load_all_package_specs(Files::Filesystem& fs, - const fs::path& ports_directory, - const Triplet& triplet) - { - auto ports = Paragraphs::load_all_ports(fs, ports_directory); - return Util::fmap(ports, [&](auto&& control_file) -> PackageSpec { - return PackageSpec::from_name_and_triplet(control_file->core_paragraph->name, triplet) - .value_or_exit(VCPKG_LINE_INFO); - }); - } - - static Install::InstallSummary run_ci_on_triplet(const Triplet& triplet, const VcpkgPaths& paths) + static Install::InstallSummary run_ci_on_triplet(const Triplet& triplet, + const VcpkgPaths& paths, + const std::vector& ports, + const std::set& exclusions_set) { Input::check_triplet(triplet, paths); - const std::vector specs = load_all_package_specs(paths.get_filesystem(), paths.ports, triplet); + const std::vector specs = PackageSpec::to_package_specs(ports, triplet); StatusParagraphs status_db = database_load_check(paths); const auto& paths_port_file = Dependencies::PathsPortFile(paths); std::vector install_plan = Dependencies::create_install_plan(paths_port_file, specs, status_db); + + for (InstallPlanAction& plan : install_plan) + { + if (Util::Sets::contains(exclusions_set, plan.spec.name())) + { + plan.plan_type = InstallPlanType::EXCLUDED; + } + } + Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; @@ -60,8 +59,13 @@ namespace vcpkg::Commands::CI void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { + static const std::string OPTION_EXCLUDE = "--exclude"; + static const std::string EXAMPLE = Help::create_example_string("ci x64-windows"); - args.check_and_get_optional_command_arguments({}); + + const ParsedArguments options = args.check_and_get_optional_command_arguments({}, {OPTION_EXCLUDE}); + const std::vector exclusions = Strings::split(options.settings.at(OPTION_EXCLUDE), ","); + const std::set exclusions_set(exclusions.cbegin(), exclusions.cend()); std::vector triplets; for (const std::string& triplet : args.command_arguments) @@ -74,10 +78,11 @@ namespace vcpkg::Commands::CI triplets.push_back(default_triplet); } + const std::vector ports = Install::get_all_port_names(paths); std::vector results; for (const Triplet& triplet : triplets) { - Install::InstallSummary summary = run_ci_on_triplet(triplet, paths); + Install::InstallSummary summary = run_ci_on_triplet(triplet, paths, ports, exclusions_set); results.push_back({triplet, std::move(summary)}); } diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 02b2ec785..9d264baa2 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -112,27 +112,21 @@ namespace vcpkg::Dependencies std::vector AnyParagraph::dependencies(const Triplet& triplet) const { - auto to_package_specs = [&](const std::vector& dependencies_as_string) { - return Util::fmap(dependencies_as_string, [&](const std::string s) { - return PackageSpec::from_name_and_triplet(s, triplet).value_or_exit(VCPKG_LINE_INFO); - }); - }; - - if (auto p = this->status_paragraph.get()) + if (const auto p = this->status_paragraph.get()) { - return to_package_specs(p->package.depends); + return PackageSpec::to_package_specs(p->package.depends, triplet); } - if (auto p = this->binary_control_file.get()) + if (const auto p = this->binary_control_file.get()) { auto deps = Util::fmap_flatten(p->features, [](const BinaryParagraph& pgh) { return pgh.depends; }); - deps.insert(deps.end(), p->core_paragraph.depends.begin(), p->core_paragraph.depends.end()); - return to_package_specs(deps); + deps.insert(deps.end(), p->core_paragraph.depends.cbegin(), p->core_paragraph.depends.cend()); + return PackageSpec::to_package_specs(deps, triplet); } - if (auto p = this->source_paragraph.get()) + if (const auto p = this->source_paragraph.get()) { - return to_package_specs(filter_dependencies(p->depends, triplet)); + return PackageSpec::to_package_specs(filter_dependencies(p->depends, triplet), triplet); } Checks::exit_with_message(VCPKG_LINE_INFO, @@ -163,7 +157,7 @@ namespace vcpkg::Dependencies InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const std::unordered_set& features, const RequestType& request_type) - : spec(spec), plan_type(InstallPlanType::ALREADY_INSTALLED), request_type(request_type), feature_list(features) + : spec(spec), plan_type(InstallPlanType::UNKNOWN), request_type(request_type), feature_list(features) { } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index bd924fcba..76e943e8c 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -342,6 +342,12 @@ namespace vcpkg::Install } } + if (plan_type == InstallPlanType::EXCLUDED) + { + System::println(System::Color::warning, "Package %s is excluded", display_name); + return BuildResult::EXCLUDED; + } + Checks::unreachable(VCPKG_LINE_INFO); } @@ -352,6 +358,7 @@ namespace vcpkg::Install std::vector only_install_plans; std::vector new_plans; std::vector already_installed_plans; + std::vector excluded; const bool has_non_user_requested_packages = Util::find_if(action_plan, [](const AnyAction& package) -> bool { if (auto iplan = package.install_plan.get()) @@ -382,6 +389,7 @@ namespace vcpkg::Install already_installed_plans.emplace_back(install_action); break; case InstallPlanType::BUILD_AND_INSTALL: new_plans.emplace_back(install_action); break; + case InstallPlanType::EXCLUDED: excluded.emplace_back(install_action); break; default: Checks::unreachable(VCPKG_LINE_INFO); } } @@ -397,6 +405,15 @@ namespace vcpkg::Install std::sort(only_install_plans.begin(), only_install_plans.end(), &InstallPlanAction::compare_by_name); std::sort(new_plans.begin(), new_plans.end(), &InstallPlanAction::compare_by_name); std::sort(already_installed_plans.begin(), already_installed_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(excluded.begin(), excluded.end(), &InstallPlanAction::compare_by_name); + + if (excluded.size() > 0) + { + const std::string excluded_string = Strings::join("\n", excluded, [](const InstallPlanAction* p) { + return to_output_string(p->request_type, p->displayname()); + }); + System::println("The following packages are excluded:\n%s", excluded_string); + } if (already_installed_plans.size() > 0) { @@ -538,7 +555,7 @@ namespace vcpkg::Install }; static const std::array INSTALL_SETTINGS; - static std::vector valid_arguments(const VcpkgPaths& paths) + std::vector get_all_port_names(const VcpkgPaths& paths) { auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); @@ -552,7 +569,7 @@ namespace vcpkg::Install SIZE_MAX, INSTALL_SWITCHES, INSTALL_SETTINGS, - &valid_arguments, + &get_all_port_names, }; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) diff --git a/toolsrc/src/vcpkg/packagespec.cpp b/toolsrc/src/vcpkg/packagespec.cpp index 6e40d70f5..eeb9981af 100644 --- a/toolsrc/src/vcpkg/packagespec.cpp +++ b/toolsrc/src/vcpkg/packagespec.cpp @@ -92,6 +92,14 @@ namespace vcpkg return p; } + std::vector PackageSpec::to_package_specs(const std::vector& ports, + const Triplet& triplet) + { + return Util::fmap(ports, [&](const std::string s) { + return PackageSpec::from_name_and_triplet(s, triplet).value_or_exit(VCPKG_LINE_INFO); + }); + } + const std::string& PackageSpec::name() const { return this->m_name; } const Triplet& PackageSpec::triplet() const { return this->m_triplet; } -- cgit v1.2.3 From 79ebd26605e0f621f848206000a5b1c7239d5f37 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 26 Oct 2017 19:14:32 -0700 Subject: Remove VcpkgCmdArguments.check_and_get_optional_command_arguments() overload Also, use Util::Sets::contains() where possible. --- toolsrc/include/vcpkg/build.h | 2 +- toolsrc/include/vcpkg/vcpkgcmdarguments.h | 5 ----- toolsrc/src/vcpkg/build.cpp | 7 +++---- toolsrc/src/vcpkg/commands.buildexternal.cpp | 2 +- toolsrc/src/vcpkg/commands.cache.cpp | 2 +- toolsrc/src/vcpkg/commands.contact.cpp | 2 +- toolsrc/src/vcpkg/commands.create.cpp | 2 +- toolsrc/src/vcpkg/commands.dependinfo.cpp | 2 +- toolsrc/src/vcpkg/commands.edit.cpp | 5 ++--- toolsrc/src/vcpkg/commands.env.cpp | 2 +- toolsrc/src/vcpkg/commands.hash.cpp | 2 +- toolsrc/src/vcpkg/commands.import.cpp | 2 +- toolsrc/src/vcpkg/commands.integrate.cpp | 2 +- toolsrc/src/vcpkg/commands.list.cpp | 7 +++---- toolsrc/src/vcpkg/commands.owns.cpp | 4 ++-- toolsrc/src/vcpkg/commands.portsdiff.cpp | 2 +- toolsrc/src/vcpkg/commands.search.cpp | 19 +++++++++---------- toolsrc/src/vcpkg/commands.version.cpp | 2 +- toolsrc/src/vcpkg/help.cpp | 2 +- toolsrc/src/vcpkg/install.cpp | 16 ++++++++-------- toolsrc/src/vcpkg/remove.cpp | 14 +++++++------- toolsrc/src/vcpkg/update.cpp | 2 +- 22 files changed, 48 insertions(+), 57 deletions(-) diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index bf52e54b2..94d9fddf5 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -20,7 +20,7 @@ namespace vcpkg::Build { void perform_and_exit(const FullPackageSpec& full_spec, const fs::path& port_dir, - const std::unordered_set& options, + const ParsedArguments& options, const VcpkgPaths& paths); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index d9895f4b8..e59979ad1 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -34,11 +34,6 @@ namespace vcpkg std::string command; std::vector command_arguments; - std::unordered_set check_and_get_optional_command_arguments( - const std::vector& valid_options) const - { - return std::move(check_and_get_optional_command_arguments(valid_options, {}).switches); - } ParsedArguments check_and_get_optional_command_arguments(const std::vector& valid_switches, const std::vector& valid_settings) const; diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index c26dcc591..30a6a791c 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -30,11 +30,11 @@ namespace vcpkg::Build::Command void perform_and_exit(const FullPackageSpec& full_spec, const fs::path& port_dir, - const std::unordered_set& options, + const ParsedArguments& options, const VcpkgPaths& paths) { const PackageSpec& spec = full_spec.package_spec; - if (options.find(OPTION_CHECKS_ONLY) != options.end()) + 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)); @@ -107,8 +107,7 @@ namespace vcpkg::Build::Command const std::string command_argument = args.command_arguments.at(0); const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, EXAMPLE); Input::check_triplet(spec.package_spec.triplet(), paths); - const std::unordered_set options = - args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}); + const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}, {}); perform_and_exit(spec, paths.port_dir(spec.package_spec), options, paths); } } diff --git a/toolsrc/src/vcpkg/commands.buildexternal.cpp b/toolsrc/src/vcpkg/commands.buildexternal.cpp index 3991beb62..2cc7aabde 100644 --- a/toolsrc/src/vcpkg/commands.buildexternal.cpp +++ b/toolsrc/src/vcpkg/commands.buildexternal.cpp @@ -15,7 +15,7 @@ namespace vcpkg::Commands::BuildExternal const FullPackageSpec spec = Input::check_and_get_full_package_spec(args.command_arguments.at(0), default_triplet, EXAMPLE); Input::check_triplet(spec.package_spec.triplet(), paths); - const std::unordered_set options = args.check_and_get_optional_command_arguments({}); + const ParsedArguments options = args.check_and_get_optional_command_arguments({}, {}); const fs::path port_dir = args.command_arguments.at(1); Build::Command::perform_and_exit(spec, port_dir, options, paths); diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index 77f0a20f6..64a3169b1 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -32,7 +32,7 @@ namespace vcpkg::Commands::Cache "The argument should be a substring to search for, or no argument to display all cached libraries.\n%s", Help::create_example_string("cache png")); args.check_max_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); const std::vector binary_paragraphs = read_all_binary_paragraphs(paths); if (binary_paragraphs.empty()) diff --git a/toolsrc/src/vcpkg/commands.contact.cpp b/toolsrc/src/vcpkg/commands.contact.cpp index 421b8a230..5694c1fa6 100644 --- a/toolsrc/src/vcpkg/commands.contact.cpp +++ b/toolsrc/src/vcpkg/commands.contact.cpp @@ -14,7 +14,7 @@ namespace vcpkg::Commands::Contact void perform_and_exit(const VcpkgCmdArguments& args) { args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); System::println("Send an email to %s with any feedback.", email()); Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index 85763f25e..f1acacd14 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -14,7 +14,7 @@ namespace vcpkg::Commands::Create R"###(create zlib2 http://zlib.net/zlib1211.zip "zlib1211-2.zip")###"); args.check_max_arg_count(3, EXAMPLE); args.check_min_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); const std::string port_name = args.command_arguments.at(0); const std::string url = args.command_arguments.at(1); diff --git a/toolsrc/src/vcpkg/commands.dependinfo.cpp b/toolsrc/src/vcpkg/commands.dependinfo.cpp index 89c7e0c7f..e5554f7e2 100644 --- a/toolsrc/src/vcpkg/commands.dependinfo.cpp +++ b/toolsrc/src/vcpkg/commands.dependinfo.cpp @@ -13,7 +13,7 @@ namespace vcpkg::Commands::DependInfo { static const std::string EXAMPLE = Help::create_example_string(R"###(depend-info [pat])###"); args.check_max_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); std::vector> source_control_files = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index 668ec9b1a..bf618e256 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -65,8 +65,7 @@ namespace vcpkg::Commands::Edit static const std::string EXAMPLE = Help::create_example_string("edit zlib"); args.check_exact_arg_count(1, EXAMPLE); - const std::unordered_set options = - args.check_and_get_optional_command_arguments({OPTION_BUILDTREES}); + const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_BUILDTREES}, {}); const std::string port_name = args.command_arguments.at(0); const fs::path portpath = paths.ports / port_name; @@ -95,7 +94,7 @@ namespace vcpkg::Commands::Edit } const fs::path env_editor = *it; - if (options.find(OPTION_BUILDTREES) != options.cend()) + if (Util::Sets::contains(options.switches, OPTION_BUILDTREES)) { const auto buildtrees_current_dir = paths.buildtrees / port_name; diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp index 9f8ae5207..c0d26dac2 100644 --- a/toolsrc/src/vcpkg/commands.env.cpp +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -11,7 +11,7 @@ namespace vcpkg::Commands::Env { static const std::string EXAMPLE = Help::create_example_string(R"(env --triplet x64-windows)"); args.check_exact_arg_count(0, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 4bc58b509..51f6b9ad0 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -34,7 +34,7 @@ namespace vcpkg::Commands::Hash Help::create_example_string("hash boost_1_62_0.tar.bz2")); args.check_min_arg_count(1, EXAMPLE); args.check_max_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); if (args.command_arguments.size() == 1) { diff --git a/toolsrc/src/vcpkg/commands.import.cpp b/toolsrc/src/vcpkg/commands.import.cpp index 119aee022..5e74b6d94 100644 --- a/toolsrc/src/vcpkg/commands.import.cpp +++ b/toolsrc/src/vcpkg/commands.import.cpp @@ -97,7 +97,7 @@ namespace vcpkg::Commands::Import static const std::string EXAMPLE = Help::create_example_string( R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)"); args.check_exact_arg_count(3, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); const fs::path control_file_path(args.command_arguments[0]); const fs::path include_directory(args.command_arguments[1]); diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 27e563cfa..604bd2c6e 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -359,7 +359,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console "%s", INTEGRATE_COMMAND_HELPSTRING); args.check_exact_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); #if defined(_WIN32) if (args.command_arguments[0] == Subcommand::INSTALL) diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index d0e8e00b4..145d4c931 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -30,8 +30,7 @@ namespace vcpkg::Commands::List "The argument should be a substring to search for, or no argument to display all installed libraries.\n%s", Help::create_example_string("list png")); args.check_max_arg_count(1, EXAMPLE); - const std::unordered_set options = - args.check_and_get_optional_command_arguments({OPTION_FULLDESC}); + const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_FULLDESC}, {}); const StatusParagraphs status_paragraphs = database_load_check(paths); std::vector installed_packages = get_installed_ports(status_paragraphs); @@ -52,7 +51,7 @@ namespace vcpkg::Commands::List { for (const StatusParagraph* status_paragraph : installed_packages) { - do_print(*status_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + do_print(*status_paragraph, Util::Sets::contains(options.switches, OPTION_FULLDESC)); } } else @@ -66,7 +65,7 @@ namespace vcpkg::Commands::List continue; } - do_print(*status_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + do_print(*status_paragraph, Util::Sets::contains(options.switches, OPTION_FULLDESC)); } } diff --git a/toolsrc/src/vcpkg/commands.owns.cpp b/toolsrc/src/vcpkg/commands.owns.cpp index 69079e829..b2db966e1 100644 --- a/toolsrc/src/vcpkg/commands.owns.cpp +++ b/toolsrc/src/vcpkg/commands.owns.cpp @@ -29,9 +29,9 @@ namespace vcpkg::Commands::Owns static const std::string EXAMPLE = Strings::format("The argument should be a pattern to search for. %s", Help::create_example_string("owns zlib.dll")); args.check_exact_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); - StatusParagraphs status_db = database_load_check(paths); + const StatusParagraphs status_db = database_load_check(paths); search_file(paths, args.command_arguments[0], status_db); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index a8c043751..5008f3e8a 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -120,7 +120,7 @@ namespace vcpkg::Commands::PortsDiff Help::create_example_string("portsdiff mybranchname")); args.check_min_arg_count(1, EXAMPLE); args.check_max_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); const fs::path& git_exe = paths.get_git_exe(); diff --git a/toolsrc/src/vcpkg/commands.search.cpp b/toolsrc/src/vcpkg/commands.search.cpp index 3ba8707de..ad3046e6d 100644 --- a/toolsrc/src/vcpkg/commands.search.cpp +++ b/toolsrc/src/vcpkg/commands.search.cpp @@ -85,12 +85,13 @@ namespace vcpkg::Commands::Search "The argument should be a substring to search for, or no argument to display all libraries.\n%s", Help::create_example_string("search png")); args.check_max_arg_count(1, EXAMPLE); - const std::unordered_set options = - args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}); + const ParsedArguments options = + args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}, {}); + const bool full_description = Util::Sets::contains(options.switches, OPTION_FULLDESC); auto source_paragraphs = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - if (options.find(OPTION_GRAPH) != options.cend()) + if (Util::Sets::contains(options.switches, OPTION_GRAPH)) { const std::string graph_as_string = create_graph_as_string(source_paragraphs); System::println(graph_as_string); @@ -101,12 +102,10 @@ namespace vcpkg::Commands::Search { for (const auto& source_control_file : source_paragraphs) { - do_print(*source_control_file->core_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + do_print(*source_control_file->core_paragraph, full_description); for (auto&& feature_paragraph : source_control_file->feature_paragraphs) { - do_print(source_control_file->core_paragraph->name, - *feature_paragraph, - options.find(OPTION_FULLDESC) != options.cend()); + do_print(source_control_file->core_paragraph->name, *feature_paragraph, full_description); } } } @@ -120,10 +119,10 @@ namespace vcpkg::Commands::Search { auto&& sp = *source_control_file->core_paragraph; - bool contains_name = icontains(sp.name, args_zero); + const bool contains_name = icontains(sp.name, args_zero); if (contains_name || icontains(sp.description, args_zero)) { - do_print(sp, options.find(OPTION_FULLDESC) != options.cend()); + do_print(sp, full_description); } for (auto&& feature_paragraph : source_control_file->feature_paragraphs) @@ -131,7 +130,7 @@ namespace vcpkg::Commands::Search if (contains_name || icontains(feature_paragraph->name, args_zero) || icontains(feature_paragraph->description, args_zero)) { - do_print(sp.name, *feature_paragraph, options.find(OPTION_FULLDESC) != options.cend()); + do_print(sp.name, *feature_paragraph, full_description); } } } diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp index 403c355b5..e8756a77d 100644 --- a/toolsrc/src/vcpkg/commands.version.cpp +++ b/toolsrc/src/vcpkg/commands.version.cpp @@ -65,7 +65,7 @@ namespace vcpkg::Commands::Version void perform_and_exit(const VcpkgCmdArguments& args) { args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); System::println("Vcpkg package management program version %s\n" "\n" diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index 2a0578211..8783833f2 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -94,7 +94,7 @@ namespace vcpkg::Help void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { args.check_max_arg_count(1); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); if (args.command_arguments.empty()) { diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 76e943e8c..7bab740be 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -351,7 +351,7 @@ namespace vcpkg::Install Checks::unreachable(VCPKG_LINE_INFO); } - static void print_plan(const std::vector& action_plan, bool is_recursive) + static void print_plan(const std::vector& action_plan, const bool is_recursive) { std::vector remove_plans; std::vector rebuilt_plans; @@ -592,13 +592,13 @@ namespace vcpkg::Install } } - const std::unordered_set options = args.check_and_get_optional_command_arguments( - {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE, OPTION_KEEP_GOING}); - const bool dry_run = options.find(OPTION_DRY_RUN) != options.cend(); - const bool use_head_version = options.find(OPTION_USE_HEAD_VERSION) != options.cend(); - const bool no_downloads = options.find(OPTION_NO_DOWNLOADS) != options.cend(); - const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); - const KeepGoing keep_going = to_keep_going(options.find(OPTION_KEEP_GOING) != options.cend()); + const ParsedArguments options = args.check_and_get_optional_command_arguments( + {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE, OPTION_KEEP_GOING}, {}); + const bool dry_run = Util::Sets::contains(options.switches, OPTION_DRY_RUN); + const bool use_head_version = Util::Sets::contains(options.switches, (OPTION_USE_HEAD_VERSION)); + const bool no_downloads = Util::Sets::contains(options.switches, (OPTION_NO_DOWNLOADS)); + const bool is_recursive = Util::Sets::contains(options.switches, (OPTION_RECURSE)); + const KeepGoing keep_going = to_keep_going(Util::Sets::contains(options.switches, OPTION_KEEP_GOING)); // create the plan StatusParagraphs status_db = database_load_check(paths); diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 6f555b9b8..156f23003 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -198,12 +198,12 @@ namespace vcpkg::Remove void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { static const std::string EXAMPLE = Help::create_example_string("remove zlib zlib:x64-windows curl boost"); - const std::unordered_set options = args.check_and_get_optional_command_arguments( - {OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED}); + const ParsedArguments options = args.check_and_get_optional_command_arguments( + {OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED}, {}); StatusParagraphs status_db = database_load_check(paths); std::vector specs; - if (options.find(OPTION_OUTDATED) != options.cend()) + if (Util::Sets::contains(options.switches, OPTION_OUTDATED)) { args.check_exact_arg_count(0, EXAMPLE); specs = Util::fmap(Update::find_outdated_packages(paths, status_db), @@ -226,8 +226,8 @@ namespace vcpkg::Remove Input::check_triplet(spec.triplet(), paths); } - const bool no_purge_was_passed = options.find(OPTION_NO_PURGE) != options.end(); - const bool purge_was_passed = options.find(OPTION_PURGE) != options.end(); + const bool no_purge_was_passed = Util::Sets::contains(options.switches, OPTION_NO_PURGE); + const bool purge_was_passed = Util::Sets::contains(options.switches, OPTION_PURGE); if (purge_was_passed && no_purge_was_passed) { System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge."); @@ -235,8 +235,8 @@ namespace vcpkg::Remove Checks::exit_fail(VCPKG_LINE_INFO); } const Purge purge = to_purge(purge_was_passed || !no_purge_was_passed); - const bool is_recursive = options.find(OPTION_RECURSE) != options.cend(); - const bool dry_run = options.find(OPTION_DRY_RUN) != options.cend(); + const bool is_recursive = Util::Sets::contains(options.switches, OPTION_RECURSE); + const bool dry_run = Util::Sets::contains(options.switches, OPTION_DRY_RUN); const std::vector remove_plan = Dependencies::create_remove_plan(specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !remove_plan.empty(), "Remove plan cannot be empty"); diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index 168949bc1..7d565251e 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -41,7 +41,7 @@ namespace vcpkg::Update void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}); + args.check_and_get_optional_command_arguments({}, {}); System::println("Using local portfile versions. To update the local portfiles, use `git pull`."); const StatusParagraphs status_db = database_load_check(paths); -- cgit v1.2.3 From 29f62852bda546248a2f3c8cb0f8cbbc7d6acc9f Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 27 Oct 2017 00:08:00 -0500 Subject: New port: MIT gettimeofday implementation (#2063) * [gettimeofday] create CONTROL * [gettimeofday] add source file * [gettimeofday] add header * [gettimeofday] create portfile * [gettimeofday] add cmakelists.txt * [gettimeofday/portfile] require static * [gettimeofday/portfile] set source path * [gettimeofday] create license * [gettimeofday] remove duplicate headers --- ports/gettimeofday/CMakeLists.txt | 14 ++++++++ ports/gettimeofday/CONTROL | 3 ++ ports/gettimeofday/LICENSE | 33 ++++++++++++++++++ ports/gettimeofday/gettimeofday.c | 67 +++++++++++++++++++++++++++++++++++++ ports/gettimeofday/gettimeofday.def | 2 ++ ports/gettimeofday/gettimeofday.h | 16 +++++++++ ports/gettimeofday/portfile.cmake | 11 ++++++ 7 files changed, 146 insertions(+) create mode 100644 ports/gettimeofday/CMakeLists.txt create mode 100644 ports/gettimeofday/CONTROL create mode 100644 ports/gettimeofday/LICENSE create mode 100644 ports/gettimeofday/gettimeofday.c create mode 100644 ports/gettimeofday/gettimeofday.def create mode 100644 ports/gettimeofday/gettimeofday.h create mode 100644 ports/gettimeofday/portfile.cmake diff --git a/ports/gettimeofday/CMakeLists.txt b/ports/gettimeofday/CMakeLists.txt new file mode 100644 index 000000000..4ec5b43a0 --- /dev/null +++ b/ports/gettimeofday/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.8) +project(gettimeofday C) + +add_library(gettimeofday gettimeofday.c gettimeofday.def) + +install(TARGETS gettimeofday + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(CMAKE_BUILD_TYPE STREQUAL "Release") + install(FILES gettimeofday.h DESTINATION include) +endif() diff --git a/ports/gettimeofday/CONTROL b/ports/gettimeofday/CONTROL new file mode 100644 index 000000000..2ec81c8a0 --- /dev/null +++ b/ports/gettimeofday/CONTROL @@ -0,0 +1,3 @@ +Source: gettimeofday +Version: 2017-10-14-1 +Description: An implementation of gettimeofday for WIN32 diff --git a/ports/gettimeofday/LICENSE b/ports/gettimeofday/LICENSE new file mode 100644 index 000000000..57c986d30 --- /dev/null +++ b/ports/gettimeofday/LICENSE @@ -0,0 +1,33 @@ +/* + * Copied from PostgreSQL source: + * http://doxygen.postgresql.org/gettimeofday_8c_source.html + * + */ + +/* + * gettimeofday.c + * Win32 gettimeofday() replacement + * + * src/port/gettimeofday.c + * + * Copyright (c) 2003 SRA, Inc. + * Copyright (c) 2003 SKC, Inc. + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose, without fee, and without a + * written agreement is hereby granted, provided that the above + * copyright notice and this paragraph and the following two + * paragraphs appear in all copies. + * + * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, + * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING + * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS + * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS + * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, + * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ diff --git a/ports/gettimeofday/gettimeofday.c b/ports/gettimeofday/gettimeofday.c new file mode 100644 index 000000000..62abf344a --- /dev/null +++ b/ports/gettimeofday/gettimeofday.c @@ -0,0 +1,67 @@ +/* + * Copied from PostgreSQL source: + * http://doxygen.postgresql.org/gettimeofday_8c_source.html + * + */ + +/* + * gettimeofday.c + * Win32 gettimeofday() replacement + * + * src/port/gettimeofday.c + * + * Copyright (c) 2003 SRA, Inc. + * Copyright (c) 2003 SKC, Inc. + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose, without fee, and without a + * written agreement is hereby granted, provided that the above + * copyright notice and this paragraph and the following two + * paragraphs appear in all copies. + * + * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, + * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING + * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS + * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS + * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, + * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ + +#ifdef _MSC_VER + +#include + + +/* FILETIME of Jan 1 1970 00:00:00. */ +static const unsigned __int64 epoch = 116444736000000000Ui64; + +/* + * timezone information is stored outside the kernel so tzp isn't used anymore. + * + * Note: this function is not for Win32 high precision timing purpose. See + * elapsed_time(). + */ +int +gettimeofday(struct timeval * tp, struct timezone * tzp) +{ + FILETIME file_time; + SYSTEMTIME system_time; + ULARGE_INTEGER ularge; + + GetSystemTime(&system_time); + SystemTimeToFileTime(&system_time, &file_time); + ularge.LowPart = file_time.dwLowDateTime; + ularge.HighPart = file_time.dwHighDateTime; + + tp->tv_sec = (long) ((ularge.QuadPart - epoch) / 10000000L); + tp->tv_usec = (long) (system_time.wMilliseconds * 1000); + + return 0; +} + +#endif /* _MSC_VER */ diff --git a/ports/gettimeofday/gettimeofday.def b/ports/gettimeofday/gettimeofday.def new file mode 100644 index 000000000..7a46b866b --- /dev/null +++ b/ports/gettimeofday/gettimeofday.def @@ -0,0 +1,2 @@ +EXPORTS + gettimeofday diff --git a/ports/gettimeofday/gettimeofday.h b/ports/gettimeofday/gettimeofday.h new file mode 100644 index 000000000..94c58ea73 --- /dev/null +++ b/ports/gettimeofday/gettimeofday.h @@ -0,0 +1,16 @@ +#ifndef _MY_GETTIMEOFDAY_H_ +#define _MY_GETTIMEOFDAY_H_ + +#ifdef _MSC_VER + +#include +int gettimeofday(struct timeval * tp, struct timezone * tzp); + +struct timespec { + time_t tv_sec; + time_t tv_nsec; +}; + +#endif /* _MSC_VER */ + +#endif /* _MY_GETTIMEOFDAY_H_ */ diff --git a/ports/gettimeofday/portfile.cmake b/ports/gettimeofday/portfile.cmake new file mode 100644 index 000000000..51c88c989 --- /dev/null +++ b/ports/gettimeofday/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) + +vcpkg_configure_cmake( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gettimeofday RENAME copyright) -- cgit v1.2.3 From 4b66571c9d12cf718e3175203a867d5014208fdb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 26 Oct 2017 22:34:54 -0700 Subject: [blaze] Add dependencies and install *-config.cmake files. --- ports/blaze/CONTROL | 3 ++- ports/blaze/no-absolute-paths-in-install.patch | 33 ++++++++++++++++++++++++++ ports/blaze/portfile.cmake | 22 +++++++++++++---- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 14 +++++++---- 4 files changed, 61 insertions(+), 11 deletions(-) create mode 100644 ports/blaze/no-absolute-paths-in-install.patch diff --git a/ports/blaze/CONTROL b/ports/blaze/CONTROL index ca7923ffc..5161b924f 100644 --- a/ports/blaze/CONTROL +++ b/ports/blaze/CONTROL @@ -1,3 +1,4 @@ Source: blaze -Version: 3.2 +Version: 3.2-1 +Build-Depends: boost, clapack Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic. diff --git a/ports/blaze/no-absolute-paths-in-install.patch b/ports/blaze/no-absolute-paths-in-install.patch new file mode 100644 index 000000000..a601a37e7 --- /dev/null +++ b/ports/blaze/no-absolute-paths-in-install.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0d102ab..5d918b8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,7 +36,7 @@ cmake_minimum_required(VERSION 3.5) + add_library(blaze INTERFACE) + target_include_directories(blaze INTERFACE + $ +- $ ++ $ + ) + + target_compile_options(blaze INTERFACE +@@ -48,8 +48,8 @@ target_compile_options(blaze INTERFACE + #================================================================================================== + + find_package(LAPACK REQUIRED) +-target_link_libraries(blaze INTERFACE ${LAPACK_LIBRARIES}) +-target_compile_options(blaze INTERFACE ${LAPACK_LINKER_FLAGS}) ++target_link_libraries(blaze INTERFACE $) ++target_compile_options(blaze INTERFACE $) + + + #================================================================================================== +@@ -57,7 +57,7 @@ target_compile_options(blaze INTERFACE ${LAPACK_LINKER_FLAGS}) + #================================================================================================== + + find_package(Boost 1.54.0 REQUIRED) +-target_include_directories(blaze INTERFACE ${Boost_INCLUDE_DIRS}) ++target_include_directories(blaze INTERFACE $) + + + #================================================================================================== diff --git a/ports/blaze/portfile.cmake b/ports/blaze/portfile.cmake index a8fc5ab1e..7bbb58afc 100644 --- a/ports/blaze/portfile.cmake +++ b/ports/blaze/portfile.cmake @@ -1,4 +1,3 @@ -#header-only library include(vcpkg_common_functions) vcpkg_from_bitbucket( @@ -9,10 +8,23 @@ vcpkg_from_bitbucket( HEAD_REF master ) -# Copy the blaze header files -file(COPY "${SOURCE_PATH}/blaze" - DESTINATION "${CURRENT_PACKAGES_DIR}/include" - FILES_MATCHING PATTERN "*.h") +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/no-absolute-paths-in-install.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBLAZE_SMP_THREADS=C++11 +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/blaze/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/blaze) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 40ed0225f..069672b71 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -23,7 +23,7 @@ function(vcpkg_fixup_cmake_targets) set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/share/${PORT}) set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/share/${PORT}) - if(_vfct_CONFIG_PATH) + if(_vfct_CONFIG_PATH AND NOT RELEASE_SHARE STREQUAL "${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}") set(DEBUG_CONFIG ${CURRENT_PACKAGES_DIR}/debug/${_vfct_CONFIG_PATH}) set(RELEASE_CONFIG ${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}) @@ -31,10 +31,14 @@ function(vcpkg_fixup_cmake_targets) message(FATAL_ERROR "'${DEBUG_CONFIG}' does not exist.") endif() - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/share) - file(RENAME ${DEBUG_CONFIG} ${DEBUG_SHARE}) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) - file(RENAME ${RELEASE_CONFIG} ${RELEASE_SHARE}) + file(MAKE_DIRECTORY ${DEBUG_SHARE}) + file(GLOB FILES ${DEBUG_CONFIG}/*) + file(COPY ${FILES} DESTINATION ${DEBUG_SHARE}) + file(REMOVE_RECURSE ${DEBUG_CONFIG}) + + file(GLOB FILES ${RELEASE_CONFIG}/*) + file(COPY ${FILES} DESTINATION ${RELEASE_SHARE}) + file(REMOVE_RECURSE ${RELEASE_CONFIG}) get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG} NAME) string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) -- cgit v1.2.3 From e859751cd940c47874ddd2c75281c85b190c8368 Mon Sep 17 00:00:00 2001 From: ebraminio Date: Fri, 27 Oct 2017 01:33:15 +0330 Subject: [harfbuzz] 1.6.3 --- ports/harfbuzz/0001-fix-uwp-build.patch | 6 +++--- ports/harfbuzz/portfile.cmake | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/harfbuzz/0001-fix-uwp-build.patch b/ports/harfbuzz/0001-fix-uwp-build.patch index 532ce668e..8605d5a93 100644 --- a/ports/harfbuzz/0001-fix-uwp-build.patch +++ b/ports/harfbuzz/0001-fix-uwp-build.patch @@ -1,7 +1,7 @@ -diff --git "a/harfbuzz-1.4.6/src/hb-ft.cc" "b/harfbuzz-1.4.6/src/hb-ft.cc" +diff --git "a/harfbuzz-1.6.3/src/hb-ft.cc" "b/harfbuzz-1.6.3/src/hb-ft.cc" index 48d6a0ef..f4ce6608 100644 ---- "a/harfbuzz-1.4.6/src/hb-ft.cc" -+++ "b/harfbuzz-1.4.6/src/hb-ft.cc" +--- "a/harfbuzz-1.6.3/src/hb-ft.cc" ++++ "b/harfbuzz-1.6.3/src/hb-ft.cc" @@ -31,6 +31,10 @@ #include "hb-ft.h" diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 798743d45..3b951dcdf 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.4.6) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.6.3) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/behdad/harfbuzz/releases/download/1.4.6/harfbuzz-1.4.6.tar.bz2" - FILENAME "harfbuzz-1.4.6.tar.bz2" - SHA512 aade3902adadf3a8339ba1d05279e639da7cb53981adc64e2a2d32a5d49335a6a9782a62cdf80beca569ec8a639792bf0368c0b6ecad08f35bc85878678aa096 + URLS "https://github.com/behdad/harfbuzz/releases/download/1.6.3/harfbuzz-1.6.3.tar.bz2" + FILENAME "harfbuzz-1.6.3.tar.bz2" + SHA512 37d1a161d9074e9898d9ef6cca6dffffc725005828d700744553b0145373b69bcd3b08f507d49f4c2e05850d9275a54f15983356c547c86e5e3c202cc7cbfbe8 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From eb6860b193876e00dae02e4115f94e50d48a2a9d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 13:26:23 -0700 Subject: [harfbuzz] Bump version --- ports/harfbuzz/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index a99477b37..961d59291 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.4.6-2 +Version: 1.6.3 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, glib (windows) -- cgit v1.2.3 From 80953867e88f88ca65e0e6d4ddc69009ee11a038 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 14:00:17 -0700 Subject: [harfbuzz] Fix patch and apply it relative to SOURCE_PATH The latter is done so it doesn't have to be modified if only the version is changed --- ports/harfbuzz/0001-fix-uwp-build.patch | 10 +++++----- ports/harfbuzz/CONTROL | 2 +- ports/harfbuzz/portfile.cmake | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/harfbuzz/0001-fix-uwp-build.patch b/ports/harfbuzz/0001-fix-uwp-build.patch index 8605d5a93..24b5bf894 100644 --- a/ports/harfbuzz/0001-fix-uwp-build.patch +++ b/ports/harfbuzz/0001-fix-uwp-build.patch @@ -1,7 +1,7 @@ -diff --git "a/harfbuzz-1.6.3/src/hb-ft.cc" "b/harfbuzz-1.6.3/src/hb-ft.cc" -index 48d6a0ef..f4ce6608 100644 ---- "a/harfbuzz-1.6.3/src/hb-ft.cc" -+++ "b/harfbuzz-1.6.3/src/hb-ft.cc" +diff --git a/src/hb-ft.cc b/src/hb-ft.cc +index f578e9d..f224c07 100644 +--- a/src/hb-ft.cc ++++ b/src/hb-ft.cc @@ -31,6 +31,10 @@ #include "hb-ft.h" @@ -12,4 +12,4 @@ index 48d6a0ef..f4ce6608 100644 + #include "hb-font-private.hh" - #include "hb-cache-private.hh" // Maybe use in the future? + #include FT_ADVANCES_H diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 961d59291..9dad59be5 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.6.3 +Version: 1.6.3-1 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, glib (windows) diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 3b951dcdf..f9fa05555 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -8,7 +8,7 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ + SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch" ) -- cgit v1.2.3 From 83c29df043ce91d37a0c463ed854e78caba53984 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 14:45:08 -0700 Subject: [fetchDependency] Fix compat with Powershell 2 --- scripts/fetchDependency.ps1 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index df03878eb..90de17717 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -8,6 +8,11 @@ function Test-Command($commandName) return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) } +function Test-CommandParameter($commandName, $parameterName) +{ + return (Get-Command $commandName).Parameters.Keys -contains $parameterName +} + function Test-Module($moduleName) { return [bool](Get-Module -ListAvailable -Name $moduleName) @@ -51,7 +56,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $ProxyAuth = !$WC.Proxy.IsBypassed($url) if ($ProxyAuth) { - $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" + if (Test-CommandParameter -commandName 'Get-Credential' -parameterName 'Message') + { + $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" + } + else + { + "Enter credentials for Proxy Authentication" + $ProxyCred = Get-Credential + } + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred) $WC.Proxy.Credentials=$ProxyCred -- cgit v1.2.3 From adea63389aeff0d466b77edf7d588b1342d49508 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 15:27:21 -0700 Subject: [live555] Update to 2017.09.12. Resolves #2066 --- ports/live555/CONTROL | 2 +- ports/live555/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/live555/CONTROL b/ports/live555/CONTROL index d2ff15211..a2354fad1 100644 --- a/ports/live555/CONTROL +++ b/ports/live555/CONTROL @@ -1,3 +1,3 @@ Source: live555 -Version: 2017.06.04-1 +Version: 2017.09.12 Description: A complete RTSP server application diff --git a/ports/live555/portfile.cmake b/ports/live555/portfile.cmake index 7e2fcf14b..e8b41371a 100644 --- a/ports/live555/portfile.cmake +++ b/ports/live555/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/live) vcpkg_download_distfile(ARCHIVE - URLS "http://www.live555.com/liveMedia/public/live.2017.06.04.tar.gz" - FILENAME "live.2017.06.04.tar.gz" - SHA512 89eb3854c2ef7d0a1f443b4ca46c66040dfcc586ffd1e3e08c1b9e831eae6ade1c16e628c0ed0e7804c4e7430993f662e3fe8df2f09903024153d188276c3088 + URLS "http://www.live555.com/liveMedia/public/live.2017.09.12.tar.gz" + FILENAME "live.2017.09.12.tar.gz" + SHA512 09b18b5f5dce28519b6c7cd8d52eb3448711939df051f84c8d6dce0b88d05c982711059f2ce13efccd326b2dbfeb93b88c4e03fe4a88bbd8fcefcb25e51d107d ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From b7a91127b55076437934816837e53c8ff41f836a Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 27 Oct 2017 17:51:38 -0700 Subject: [alembic] update to 1.7.4 --- ports/alembic/CONTROL | 2 +- ports/alembic/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index b9d6ed50d..b2246c9c0 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.1-4 +Version: 1.7.4 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. http://alembic.io/ diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index 0d7b67dda..3c1242010 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alembic/alembic - REF 1.7.1 - SHA512 89e30b681a76eaf79b20ebeff62c495971b0eb64b28f249a14bbcf3bdb40df7eda93b0ede299dd5511bd4587a2cc2d4ebd851fb89bf999fdccc31fee3cffbba2 + REF 1.7.4 + SHA512 8e752d6d85bea3b6a53582d35a589fc40824456098d950974effe0a6a0e359fec1e056af1ea1379f7e23b7ffed2c05c7f5269fa4b64757631b7d57fb60ee98b0 HEAD_REF master ) -- cgit v1.2.3 From 2149fbdf596eb9aa427c4d72cf0e4185e8d64d47 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 27 Oct 2017 17:41:59 -0700 Subject: [opencv] update to 3.3.1 --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index c2814c9c2..5c931b765 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.0-4 +Version: 3.3.1 # Optional: Add in vtk to build with VTK and cuda to build with CUDA Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows), ffmpeg Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index d21956108..2b612d0e8 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO opencv/opencv - REF 3.3.0 - SHA512 13dee5c1c5fec1dccdbb05879d299b93ef8ddeb87f561a6c4178e33a4cf5ae919765119068d0387a3efea0e09a625ca993cffac60a772159690fcbee4e8d70fb + REF 3.3.1 + SHA512 ee228953b621be022c203e3d60b06be524bd134ba6188c447216ee89e14dfddeac7d6aaf85c5a0b0008b010254e2aa711813bfdb691a77b0bdba33682c6ca68c HEAD_REF master ) @@ -19,8 +19,8 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libp vcpkg_from_github( OUT_SOURCE_PATH CONTRIB_SOURCE_PATH REPO opencv/opencv_contrib - REF 3.3.0 - SHA512 ebe3dbe6c754c6fbaabbf6b0d2a4209964e625fd68e593f30ce043792740c8c1d4440d7870949b5b33f488fd7e2e05f3752287b7f50dd24c29202e268776520e + REF 3.3.1 + SHA512 b5f35f68faab811a440b6af6b33c766dcdf4cc8547c0a4ed3a6a3da80ca8ae77618039d94bee6d249e96899765bdbb34c997bd7ee53d864c43427eff92f7ea34 HEAD_REF master ) -- cgit v1.2.3 From 7ed6466a9dce1d00769214ac8e9548977e835963 Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 27 Oct 2017 15:22:44 -0500 Subject: [gettimeofday] use timespec from msvc --- ports/gettimeofday/gettimeofday.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ports/gettimeofday/gettimeofday.h b/ports/gettimeofday/gettimeofday.h index 94c58ea73..227317524 100644 --- a/ports/gettimeofday/gettimeofday.h +++ b/ports/gettimeofday/gettimeofday.h @@ -4,12 +4,9 @@ #ifdef _MSC_VER #include -int gettimeofday(struct timeval * tp, struct timezone * tzp); +#include -struct timespec { - time_t tv_sec; - time_t tv_nsec; -}; +int gettimeofday(struct timeval * tp, struct timezone * tzp); #endif /* _MSC_VER */ -- cgit v1.2.3 From 39830efc4f1b9c9c41f6ad9c8cfbac5f408303be Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 18:24:26 -0700 Subject: [gettimeofday] Bump version --- ports/gettimeofday/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/gettimeofday/CONTROL b/ports/gettimeofday/CONTROL index 2ec81c8a0..3ae7e0682 100644 --- a/ports/gettimeofday/CONTROL +++ b/ports/gettimeofday/CONTROL @@ -1,3 +1,3 @@ Source: gettimeofday -Version: 2017-10-14-1 +Version: 2017-10-14-2 Description: An implementation of gettimeofday for WIN32 -- cgit v1.2.3 From 0796a9df0e4d171ef2c7ab4d0c16ef4dc496ee5c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 18:53:36 -0700 Subject: [git] Update to 2.14.3 (was 2.14.2.3) --- scripts/bootstrap.ps1 | 2 +- scripts/fetchDependency.ps1 | 14 +++++++------- toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index b874afd8c..4488d9b95 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -13,7 +13,7 @@ $gitHash = "unknownhash" $oldpath = $env:path try { - $env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.1-32-bit\cmd" + $env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.3-32-bit\cmd" if (Get-Command "git" -ErrorAction SilentlyContinue) { $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 90de17717..89e37c428 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -172,16 +172,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "git") { - $requiredVersion = "2.14.2" - $downloadVersion = "2.14.2" - $url = "https://github.com/git-for-windows/git/releases/download/v2.14.2.windows.3/MinGit-2.14.2.3-32-bit.zip" # We choose the 32-bit version - $downloadPath = "$downloadsDir\MinGit-2.14.2.3-32-bit.zip" - $expectedDownloadedFileHash = "7cc1f27e1cfe79381e1a504a5fc7bc33951ac9031cd14c3bf478769d21a26cce" + $requiredVersion = "2.14.3" + $downloadVersion = "2.14.3" + $url = "https://github.com/git-for-windows/git/releases/download/v2.14.3.windows.1/MinGit-2.14.3-32-bit.zip" + $downloadPath = "$downloadsDir\MinGit-2.14.3-32-bit.zip" + $expectedDownloadedFileHash = "a91385acb1da220612790807c41d0f304b41093c474b9d7342230ec194a3398e" # There is another copy of git.exe in MinGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. - $executableFromDownload = "$downloadsDir\MinGit-2.14.2.3-32-bit\cmd\git.exe" + $executableFromDownload = "$downloadsDir\MinGit-2.14.3-32-bit\cmd\git.exe" $extractionType = $ExtractionType_ZIP - $extractionFolder = "$downloadsDir\MinGit-2.14.2.3-32-bit" + $extractionFolder = "$downloadsDir\MinGit-2.14.3-32-bit" } elseif($Dependency -eq "installerbase") { diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 363319767..c6a92f813 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -150,10 +150,10 @@ namespace vcpkg fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {2, 14, 2}; + static constexpr std::array EXPECTED_VERSION = {2, 14, 3}; static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.2.3-32-bit" / "cmd" / "git.exe"; + const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.3-32-bit" / "cmd" / "git.exe"; const std::vector from_path = Files::find_from_PATH("git"); std::vector candidate_paths; -- cgit v1.2.3 From a7f3ab84f024fbf3a1f0c66fd1c5915bdcb5cd2e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Oct 2017 19:20:33 -0700 Subject: Update CHANGELOG and bump version to v0.0.94 --- CHANGELOG.md | 39 +++++++++++++++++++++++++++++++++++++-- toolsrc/VERSION.txt | 2 +- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d612fb4f3..25c0688b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,39 @@ +vcpkg (0.0.94) +-------------- + * Add ports: + - capstone 3.0.5-rc3 + - cgal 4.11 + - gettimeofday 2017-10-14-2 + - gmime 3.0.2 + - leveldb 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73 + - rpclib 2.2.0 + * Update ports: + - alembic 1.7.1-4 -> 1.7.4 + - blaze 3.2 -> 3.2-1 + - boost 1.65.1-1 -> 1.65.1-2 + - ceres 1.13.0-1 -> 1.13.0-2 + - cpprestsdk 2.9.0-4 -> 2.10.0 + - cppwinrt spring_2017_creators_update_for_vs_15.3 -> fall_2017_creators_update_for_vs_15.3-2 + - cppzmq 4.2.1 -> 4.2.2 + - eigen3 3.3.4-1 -> 3.3.4-2 + - gdcm2 2.6.8-1 -> 2.8.3 + - harfbuzz 1.4.6-2 -> 1.6.3-1 + - libjpeg-turbo 1.5.2-1 -> 1.5.2-2 + - libmariadb 2.3.2-1 -> 3.0.2 + - libmysql 5.7.17-2 -> 5.7.17-3 + - live555 2017.06.04-1 -> 2017.09.12 + - mpir 3.0.0-2 -> 3.0.0-3 + - opencv 3.3.0-4 -> 3.3.1 + - pangolin 0.5-2 -> 0.5-3 + - pugixml 1.8.1-1 -> 1.8.1-2 + - secp256k1 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4 -> 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4-1 + - smpeg2 2.0.0-2 -> 2.0.0-3 + - sqlite3 3.20.1 -> 3.21.0 + * Bump required version & auto-downloaded version of `git` to 2.4.3 + +-- vcpkg team FRI, 27 Oct 2017 19:30:00 -0800 + + vcpkg (0.0.93) -------------- * Add ports: @@ -23,9 +59,9 @@ vcpkg (0.0.93) * Fix issue where `vcpkg` was getting output from powershell scripts. Powershell adds newlines when the console width is reached; the extra newlines was causing `vcpkg`'s parsing to fail. * Improve autocomplete/tab-completion for powershell (still experimental) - -- vcpkg team THU, 19 Oct 2017 21:30:00 -0800 + vcpkg (0.0.92) -------------- * Add ports: @@ -66,7 +102,6 @@ vcpkg (0.0.92) * Bump required version & auto-downloaded version of `git` to 2.4.2(.3) * Bump ninja to version 1.8.0 - -- vcpkg team TUE, 17 Oct 2017 16:00:00 -0800 diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index f439c6467..ac2866fef 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.93" \ No newline at end of file +"0.0.94" \ No newline at end of file -- cgit v1.2.3 From da04e942f2878b360f146a2751480c3133e3b817 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 27 Oct 2017 23:55:48 -0700 Subject: [boost] Only define BOOST_ALL_NO_LIB if not already defined. Fixes #2061. --- ports/boost/CONTROL | 2 +- ports/boost/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 55c32a280..c07369e2e 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,5 +1,5 @@ Source: boost -Version: 1.65.1-2 +Version: 1.65.1-3 Description: Peer-reviewed portable C++ source libraries Build-Depends: zlib, bzip2 diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 57dc081da..a14172452 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -258,7 +258,7 @@ file( # Disable Boost auto-link. file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp - "\n#define BOOST_ALL_NO_LIB\n" + "\n#ifndef BOOST_ALL_NO_LIB\n#define BOOST_ALL_NO_LIB\n#endif\n" ) file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#undef BOOST_ALL_DYN_LINK\n" -- cgit v1.2.3 From 5cdc61bf75a82015a67e8f2ed74578652263a4e8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 28 Oct 2017 01:59:43 -0700 Subject: [libharu] Stamp output headers with shared/static build information. --- ports/libharu/CONTROL | 4 +-- ports/libharu/portfile.cmake | 68 +++++++++++++++++++++----------------------- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/ports/libharu/CONTROL b/ports/libharu/CONTROL index 4ca6f8c26..5919acef0 100644 --- a/ports/libharu/CONTROL +++ b/ports/libharu/CONTROL @@ -1,4 +1,4 @@ Source: libharu -Version: 2017-08-15-d84867ebf9f-2 +Version: 2017-08-15-d84867ebf9f-3 Description: libharu - free PDF library -Build-Depends: zlib,libpng +Build-Depends: zlib, libpng diff --git a/ports/libharu/portfile.cmake b/ports/libharu/portfile.cmake index a1ae49816..7896d7659 100644 --- a/ports/libharu/portfile.cmake +++ b/ports/libharu/portfile.cmake @@ -7,52 +7,50 @@ vcpkg_from_github( HEAD_REF master ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LIBHPDF_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "shared" LIBHPDF_SHARED) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLIBHPDF_STATIC=${LIBHPDF_STATIC} + -DLIBHPDF_SHARED=${LIBHPDF_SHARED} ) -vcpkg_build_cmake() +vcpkg_install_cmake() -file(GLOB DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" -) -file(GLOB LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" -) -file(GLOB DEBUG_DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" -) -file(GLOB DEBUG_LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + 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) +endif() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/README + ${CURRENT_PACKAGES_DIR}/debug/CHANGES + ${CURRENT_PACKAGES_DIR}/debug/INSTALL + ${CURRENT_PACKAGES_DIR}/README + ${CURRENT_PACKAGES_DIR}/CHANGES + ${CURRENT_PACKAGES_DIR}/INSTALL ) -file(GLOB HEADERS "${SOURCE_PATH}/include/*.h" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/include/*.h") -if(DLLS) - file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf.h" _contents) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "#ifdef HPDF_DLL" "#if 1" _contents "${_contents}") +else() + string(REPLACE "#ifdef HPDF_DLL" "#if 0" _contents "${_contents}") endif() -file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf.h" "${_contents}") -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" _contents) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "#ifdef HPDF_DLL" "#if 1" _contents "${_contents}") +else() + string(REPLACE "#ifdef HPDF_DLL" "#if 0" _contents "${_contents}") endif() -file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - -file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" "${_contents}") file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libharu RENAME copyright) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - 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) -endif() - vcpkg_copy_pdbs() -- cgit v1.2.3 From 555d030445c1e5cde349daeec3d86f4238a43a02 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 28 Oct 2017 03:07:18 -0700 Subject: [opencv] Fix UWP build. --- ports/opencv/CONTROL | 2 +- ports/opencv/no-double-expand-enable-pylint.patch | 13 +++++++++++++ ports/opencv/portfile.cmake | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 ports/opencv/no-double-expand-enable-pylint.patch diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 5c931b765..5d9f184b1 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.1 +Version: 3.3.1-1 # Optional: Add in vtk to build with VTK and cuda to build with CUDA Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows), ffmpeg Description: computer vision library diff --git a/ports/opencv/no-double-expand-enable-pylint.patch b/ports/opencv/no-double-expand-enable-pylint.patch new file mode 100644 index 000000000..9eb5563d8 --- /dev/null +++ b/ports/opencv/no-double-expand-enable-pylint.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c46fc17..07507b6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -314,7 +314,7 @@ OCV_OPTION(CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON ) + OCV_OPTION(CV_DISABLE_OPTIMIZATION "Disable explicit optimized code (dispatched code/intrinsics/loop unrolling/etc)" OFF ) + OCV_OPTION(CV_TRACE "Enable OpenCV code trace" ON) + +-OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (${BUILD_DOCS} OR ${BUILD_EXAMPLES}) ) ++OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (BUILD_DOCS OR BUILD_EXAMPLES) ) + + if(ENABLE_IMPL_COLLECTION) + add_definitions(-DCV_COLLECT_IMPL_DATA) diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 2b612d0e8..be542e912 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/opencv-installation-options.patch" "${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch" "${CMAKE_CURRENT_LIST_DIR}/002-fix-uwp.patch" + "${CMAKE_CURRENT_LIST_DIR}/no-double-expand-enable-pylint.patch" ) file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libpng ${SOURCE_PATH}/3rdparty/zlib ${SOURCE_PATH}/3rdparty/libtiff) @@ -40,12 +41,14 @@ vcpkg_configure_cmake( -DBUILD_TIFF=OFF -DBUILD_JPEG=OFF -DBUILD_PNG=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_opencv_flann=ON -DBUILD_opencv_apps=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF + -DENABLE_PYLINT=OFF -DBUILD_PACKAGE=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -- cgit v1.2.3 From 32727f26bace1ee693e40f813f7a20b55ca129c4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 28 Oct 2017 03:54:49 -0700 Subject: [boost] --ignore-site-config, thanks @vinniefalco and @swatanabe! --- ports/boost/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index a14172452..c15f7c312 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -80,6 +80,7 @@ set(B2_OPTIONS -sICU_PATH="${CURRENT_INSTALLED_DIR}" -j$ENV{NUMBER_OF_PROCESSORS} --debug-configuration + --ignore-site-config --hash -q -- cgit v1.2.3 From 7c3f469568c884562d74753d7640da3e723c6c43 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 28 Oct 2017 08:50:58 -0700 Subject: [signalrclient] Update to handle cpprestsdk 2.10 --- ports/signalrclient/CONTROL | 2 +- ports/signalrclient/portfile.cmake | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/signalrclient/CONTROL b/ports/signalrclient/CONTROL index babcce692..ae3ae47c1 100644 --- a/ports/signalrclient/CONTROL +++ b/ports/signalrclient/CONTROL @@ -1,4 +1,4 @@ Source: signalrclient -Version: 1.0.0-beta1-1 +Version: 1.0.0-beta1-2 Build-Depends: cpprestsdk Description: C++ client for SignalR. diff --git a/ports/signalrclient/portfile.cmake b/ports/signalrclient/portfile.cmake index ad7f4fd58..bf2669569 100644 --- a/ports/signalrclient/portfile.cmake +++ b/ports/signalrclient/portfile.cmake @@ -11,17 +11,17 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch + ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS_DEBUG - -DCPPREST_SO=${CURRENT_INSTALLED_DIR}/debug/lib/cpprest_2_9.lib - OPTIONS_RELEASE - -DCPPREST_SO=${CURRENT_INSTALLED_DIR}/lib/cpprest_2_9.lib + OPTIONS_DEBUG + -DCPPREST_SO=${CURRENT_INSTALLED_DIR}/debug/lib/cpprest_2_10.lib + OPTIONS_RELEASE + -DCPPREST_SO=${CURRENT_INSTALLED_DIR}/lib/cpprest_2_10.lib OPTIONS - -DCPPREST_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DCPPREST_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include -DDISABLE_TESTS=ON ) -- cgit v1.2.3 From eba3e2d4058afed4e2b90219209137876b1aa007 Mon Sep 17 00:00:00 2001 From: Amin Cheloh Date: Sun, 29 Oct 2017 12:25:50 +0700 Subject: [opencv] remove ffmpeg depenency OpenCV has own prebuilt ffmpeg library --- ports/opencv/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 5d9f184b1..6e0afd6c0 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.1-1 +Version: 3.3.1-2 # Optional: Add in vtk to build with VTK and cuda to build with CUDA -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows), ffmpeg +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library -- cgit v1.2.3 From 1993a5eae610b877c7ed865040eaa3fb92e731c4 Mon Sep 17 00:00:00 2001 From: "Stephen E. Baker" Date: Sun, 29 Oct 2017 22:21:41 -0400 Subject: LuaSocket port for vcpkg Port is based off the last commit, as the last release version does not work with 64 bit Windows, and there have been a number of critical bug fixes since the last release candidate from 2013. --- ports/luasocket/CMakeLists.txt | 65 ++++++++++++++++++++++++++++++++++++++++++ ports/luasocket/CONTROL | 4 +++ ports/luasocket/portfile.cmake | 48 +++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+) create mode 100644 ports/luasocket/CMakeLists.txt create mode 100644 ports/luasocket/CONTROL create mode 100644 ports/luasocket/portfile.cmake diff --git a/ports/luasocket/CMakeLists.txt b/ports/luasocket/CMakeLists.txt new file mode 100644 index 000000000..3ab763deb --- /dev/null +++ b/ports/luasocket/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required(VERSION 3.0.2) +project(luasocket) + +if(NOT WIN32) + message(FATAL_ERROR "Written for windows only") +endif() + +find_path(LUA_INCLUDE_DIR lua.h PATH_SUFFIXES lua) +find_library(LUA_LIBRARY lua) +set(LUASOCKET_INCLUDES ${LUA_INCLUDE_DIR} src) +set(LUASOCKET_LIBRARIES ${LUA_LIBRARY} ws2_32) + +add_library(socket.core + src/luasocket.c + src/timeout.c + src/buffer.c + src/io.c + src/auxiliar.c + src/options.c + src/inet.c + src/except.c + src/select.c + src/tcp.c + src/udp.c + src/compat.c + src/wsocket.c) + +add_library(mime.core + src/mime.c + src/compat.c) + +target_include_directories(socket.core PRIVATE ${LUASOCKET_INCLUDES}) +target_link_libraries(socket.core PRIVATE ${LUASOCKET_LIBRARIES}) + +target_include_directories(mime.core PRIVATE ${LUASOCKET_INCLUDES}) +target_link_libraries(mime.core PRIVATE ${LUASOCKET_LIBRARIES}) + +add_definitions( + "-DLUASOCKET_API=__declspec(dllexport)" + "-DMIME_API=__declspec(dllexport)") + +install(TARGETS socket.core + RUNTIME DESTINATION bin/socket + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(TARGETS mime.core + RUNTIME DESTINATION bin/mime + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES + src/ltn12.lua + src/socket.lua + src/mime.lua + DESTINATION share/lua) + +install(FILES + src/http.lua + src/url.lua + src/tp.lua + src/ftp.lua + src/headers.lua + src/smtp.lua + DESTINATION share/lua/socket) diff --git a/ports/luasocket/CONTROL b/ports/luasocket/CONTROL new file mode 100644 index 000000000..09d6fabeb --- /dev/null +++ b/ports/luasocket/CONTROL @@ -0,0 +1,4 @@ +Source: luasocket +Version: 2017.05.25.5a17f79b0301f0a1b4c7f1c73388757a7e2ed309 +Description: LuaSocket is a Lua extension library that is composed by two parts: a C core that provides support for the TCP and UDP transport layers, and a set of Lua modules that add support for functionality commonly needed by applications that deal with the Internet. +Build-Depends: lua diff --git a/ports/luasocket/portfile.cmake b/ports/luasocket/portfile.cmake new file mode 100644 index 000000000..48ac43168 --- /dev/null +++ b/ports/luasocket/portfile.cmake @@ -0,0 +1,48 @@ +include(vcpkg_common_functions) + +set(LUASOCKET_VERSION 2017.05.25.5a17f79b0301f0a1b4c7f1c73388757a7e2ed309) +set(LUASOCKET_REVISION 5a17f79b0301f0a1b4c7f1c73388757a7e2ed309) +set(LUASOCKET_HASH 82a827956d992c7d67a3e9aed18db0cdce34f32e5b49c44976c1d19cb96ff1c10121abb2130d306cf51125fdc5eb3be0cc491a3862e5a8fde3d944ba3b4a94b7) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/luasocket-${LUASOCKET_VERSION}) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO diegonehab/luasocket + REF ${LUASOCKET_REVISION} + SHA512 ${LUASOCKET_HASH} + HEAD_REF master) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Remove debug share +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/luasocket) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/luasocket/LICENSE ${CURRENT_PACKAGES_DIR}/share/luasocket/copyright) + +# Handle socket dll name +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/socket/socket.core.dll ${CURRENT_PACKAGES_DIR}/bin/socket/core.dll) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/socket/socket.core.pdb ${CURRENT_PACKAGES_DIR}/bin/socket/core.pdb) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/socket/socket.core.dll ${CURRENT_PACKAGES_DIR}/debug/bin/socket/core.dll) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/socket/socket.core.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/socket/core.pdb) + +# Handle mime dll name +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mime/mime.core.dll ${CURRENT_PACKAGES_DIR}/bin/mime/core.dll) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mime/mime.core.pdb ${CURRENT_PACKAGES_DIR}/bin/mime/core.pdb) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/mime/mime.core.dll ${CURRENT_PACKAGES_DIR}/debug/bin/mime/core.dll) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/mime/mime.core.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/mime/core.pdb) + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) -- cgit v1.2.3 From 31bbb8be379239c8402026091ebdcd02cc016f27 Mon Sep 17 00:00:00 2001 From: Lyrex Date: Mon, 30 Oct 2017 04:50:29 +0100 Subject: Add DevIL port --- ports/devil/0001_fix-encoding.patch | 173 ++++++++++++++++++++++++ ports/devil/0002_fix-missing-mfc-includes.patch | 102 ++++++++++++++ ports/devil/CONTROL | 4 + ports/devil/portfile.cmake | 53 ++++++++ 4 files changed, 332 insertions(+) create mode 100644 ports/devil/0001_fix-encoding.patch create mode 100644 ports/devil/0002_fix-missing-mfc-includes.patch create mode 100644 ports/devil/CONTROL create mode 100644 ports/devil/portfile.cmake diff --git a/ports/devil/0001_fix-encoding.patch b/ports/devil/0001_fix-encoding.patch new file mode 100644 index 000000000..395171e71 --- /dev/null +++ b/ports/devil/0001_fix-encoding.patch @@ -0,0 +1,173 @@ +diff --git a/src-ILU/include/ilu_error/ilu_err-french.h b/src-ILU/include/ilu_error/ilu_err-french.h +index d3b280d..445440e 100644 +--- a/src-ILU/include/ilu_error/ilu_err-french.h ++++ b/src-ILU/include/ilu_error/ilu_err-french.h +@@ -17,19 +17,19 @@ + #include "ilu_internal.h" + + ILconst_string iluErrorStringsFrench[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { +- IL_TEXT("énumération invalide"), +- IL_TEXT("dépassement de mémoire"), +- IL_TEXT("format non supporté"), ++ IL_TEXT("énumération invalide"), ++ IL_TEXT("dépassement de mémoire"), ++ IL_TEXT("format non supporté"), + IL_TEXT("erreur interne"), +- IL_TEXT("valeur illégale"), +- IL_TEXT("opération illégale"), +- IL_TEXT("valeur de fichier illégale"), +- IL_TEXT("en-tête de fichier invalide"), +- IL_TEXT("paramètre invalide"), ++ IL_TEXT("valeur illégale"), ++ IL_TEXT("opération illégale"), ++ IL_TEXT("valeur de fichier illégale"), ++ IL_TEXT("en-tête de fichier invalide"), ++ IL_TEXT("paramètre invalide"), + IL_TEXT("ne peut pas ouvrir le fichier"), + IL_TEXT("extension invalide"), +- IL_TEXT("fichier déjà existant"), +- IL_TEXT("équivalent hors-format"), ++ IL_TEXT("fichier déjà existant"), ++ IL_TEXT("équivalent hors-format"), + IL_TEXT("stack overflow"), //often used like this in French, so no need to translate + IL_TEXT("stack underflow"), + IL_TEXT("conversion invalide"), +@@ -38,7 +38,7 @@ ILconst_string iluErrorStringsFrench[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = + }; + + ILconst_string iluLibErrorStringsFrench[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { +- IL_TEXT("gif : erreur dans la librairie"), //or: gif : erreur dans la bibliothèque (but less used) ++ IL_TEXT("gif : erreur dans la librairie"), //or: gif : erreur dans la bibliothèque (but less used) + IL_TEXT("jpeg : erreur dans la librairie"), + IL_TEXT("png : erreur dans la librairie"), + IL_TEXT("tiff : erreur dans la librairie"), +diff --git a/src-ILU/include/ilu_error/ilu_err-german.h b/src-ILU/include/ilu_error/ilu_err-german.h +index bf3f05c..acdbe8a 100644 +--- a/src-ILU/include/ilu_error/ilu_err-german.h ++++ b/src-ILU/include/ilu_error/ilu_err-german.h +@@ -6,7 +6,7 @@ + // + // Filename: src-ILU/include/ilu_error/ilu_err_German.h + // +-// Description: Error functions in German, translated by Andreas Stöckel. ++// Description: Error functions in German, translated by Andreas Stöckel. + // + //----------------------------------------------------------------------------- + +@@ -17,23 +17,23 @@ + #include "ilu_internal.h" + + ILconst_string iluErrorStringsGerman[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { +- IL_TEXT("Ungültiger Enumerator"), +- IL_TEXT("Kein Speicher verfügbar"), +- IL_TEXT("Das Format wird noch nicht unterstützt"), ++ IL_TEXT("Ungültiger Enumerator"), ++ IL_TEXT("Kein Speicher verfügbar"), ++ IL_TEXT("Das Format wird noch nicht unterstützt"), + IL_TEXT("Interner Fehler"), +- IL_TEXT("Ungültiger Wert"), +- IL_TEXT("Unzulässige Operation"), +- IL_TEXT("Unzulässiger Datei-Wert"), +- IL_TEXT("Unzulässiger Datei-Header"), +- IL_TEXT("Unzulässiger Parameter"), +- IL_TEXT("Datei konnte nicht geöffnet werden"), +- IL_TEXT("Ungültiger Erweiterung"), ++ IL_TEXT("Ungültiger Wert"), ++ IL_TEXT("Unzulässige Operation"), ++ IL_TEXT("Unzulässiger Datei-Wert"), ++ IL_TEXT("Unzulässiger Datei-Header"), ++ IL_TEXT("Unzulässiger Parameter"), ++ IL_TEXT("Datei konnte nicht geöffnet werden"), ++ IL_TEXT("Ungültiger Erweiterung"), + IL_TEXT("Die Datei existiert bereits"), + IL_TEXT("out format equivalent"), +- IL_TEXT("Stack Überlauf"), ++ IL_TEXT("Stack Überlauf"), + IL_TEXT("Stack Unterlauf"), +- IL_TEXT("Ungültige Konvertierung"), +- IL_TEXT("Unzulässige Abmessungen"), ++ IL_TEXT("Ungültige Konvertierung"), ++ IL_TEXT("Unzulässige Abmessungen"), + IL_TEXT("Fehler beim Lesen der Datei") + }; + +diff --git a/src-ILU/include/ilu_error/ilu_err-italian.h b/src-ILU/include/ilu_error/ilu_err-italian.h +index 09d7bd1..d34b23f 100644 +--- a/src-ILU/include/ilu_error/ilu_err-italian.h ++++ b/src-ILU/include/ilu_error/ilu_err-italian.h +@@ -22,13 +22,13 @@ ILconst_string iluErrorStringsItalian[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] + IL_TEXT("configuri non sostenne"), + IL_TEXT("erreur interne"), + IL_TEXT("errore interno"), +- IL_TEXT("opération illégale"), ++ IL_TEXT("opération illégale"), + IL_TEXT("operazione illegale"), + IL_TEXT("inebri archivio nullo"), + IL_TEXT("parametro nullo"), +- IL_TEXT("non può aprire l'archivio"), ++ IL_TEXT("non può aprire l'archivio"), + IL_TEXT("dilazione nulla"), +- IL_TEXT("archivi già esistendo"), ++ IL_TEXT("archivi già esistendo"), + IL_TEXT("equivalente fuori-configuri"), + IL_TEXT("inondi di batteria"), + IL_TEXT("insufficienza di batteria"), +diff --git a/src-ILU/include/ilu_error/ilu_err-spanish.h b/src-ILU/include/ilu_error/ilu_err-spanish.h +index 77b5a24..0945fdf 100644 +--- a/src-ILU/include/ilu_error/ilu_err-spanish.h ++++ b/src-ILU/include/ilu_error/ilu_err-spanish.h +@@ -6,7 +6,7 @@ + // + // Filename: src-ILU/include/ilu_error/ilu_err-spanish.h + // +-// Description: Error functions in Spanish, translated by Carlos Aragonés ++// Description: Error functions in Spanish, translated by Carlos Aragonés + // + //----------------------------------------------------------------------------- + +@@ -19,32 +19,32 @@ + ILconst_string iluErrorStringsSpanish[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { + IL_TEXT("enumerador incorrecto"), + IL_TEXT("no queda memoria disponible"), +- IL_TEXT("formato no soportado todavía"), ++ IL_TEXT("formato no soportado todavía"), + IL_TEXT("error interno"), + IL_TEXT("valor incorrecto"), +- IL_TEXT("operación ilegaIL_TEXT("), ++ IL_TEXT("operación ilegaIL_TEXT("), + IL_TEXT("valor de fichero ilegaIL_TEXT("), + IL_TEXT("cabecera incorrecta"), +- IL_TEXT("parámetro incorrecto"), ++ IL_TEXT("parámetro incorrecto"), + IL_TEXT("no se puede abrir el fichero"), +- IL_TEXT("extensión desconocida"), ++ IL_TEXT("extensión desconocida"), + IL_TEXT("el fichero ya existe"), + IL_TEXT("formato de salida equivalente"), + IL_TEXT("desbordamiento superior de pila"), + IL_TEXT("desbordamiento inferior de pila"), +- IL_TEXT("conversión incorrecta"), +- IL_TEXT("número de dimensiones incorrecto"), ++ IL_TEXT("conversión incorrecta"), ++ IL_TEXT("número de dimensiones incorrecto"), + IL_TEXT("error de lectura en el fichero") + }; + + ILconst_string iluLibErrorStringsSpanish[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { +- IL_TEXT("error en la librería gif"), // the correct translation will be 'error en la biblioteca gif', but nobody in spain uses the word 'biblioteca' for the translation the word 'library'. Almost all Spanish programmers translate 'library' incorrectly to 'librería'. +- IL_TEXT("error en la librería jpeg"), +- IL_TEXT("error en la librería png"), +- IL_TEXT("error en la librería tiff"), +- IL_TEXT("error en la librería mng"), +- IL_TEXT("error en la librería jp2"), +- IL_TEXT("error en la librería exr"), ++ IL_TEXT("error en la librería gif"), // the correct translation will be 'error en la biblioteca gif', but nobody in spain uses the word 'biblioteca' for the translation the word 'library'. Almost all Spanish programmers translate 'library' incorrectly to 'librería'. ++ IL_TEXT("error en la librería jpeg"), ++ IL_TEXT("error en la librería png"), ++ IL_TEXT("error en la librería tiff"), ++ IL_TEXT("error en la librería mng"), ++ IL_TEXT("error en la librería jp2"), ++ IL_TEXT("error en la librería exr"), + }; + + ILconst_string iluMiscErrorStringsSpanish[2] = { diff --git a/ports/devil/0002_fix-missing-mfc-includes.patch b/ports/devil/0002_fix-missing-mfc-includes.patch new file mode 100644 index 000000000..a456c0116 --- /dev/null +++ b/ports/devil/0002_fix-missing-mfc-includes.patch @@ -0,0 +1,102 @@ +diff --git a/src-IL/msvc/IL Unicode.rc b/src-IL/msvc/IL Unicode.rc +index 346758f..298a207 100644 +--- a/src-IL/msvc/IL Unicode.rc ++++ b/src-IL/msvc/IL Unicode.rc +@@ -7,7 +7,11 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" ++ + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS + +diff --git a/src-IL/msvc/IL.rc b/src-IL/msvc/IL.rc +index 8bfadf9..0b8289f 100644 +--- a/src-IL/msvc/IL.rc ++++ b/src-IL/msvc/IL.rc +@@ -7,10 +7,13 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + +-///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS ++///////////////////////////////////////////////////////////////////////////// + + ///////////////////////////////////////////////////////////////////////////// + // English (United States) resources +diff --git a/src-IL/msvc8/IL Unicode.rc b/src-IL/msvc8/IL Unicode.rc +index 026ee49..66ca4bf 100644 +--- a/src-IL/msvc8/IL Unicode.rc ++++ b/src-IL/msvc8/IL Unicode.rc +@@ -7,7 +7,10 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +diff --git a/src-IL/msvc8/IL.rc b/src-IL/msvc8/IL.rc +index 9301d41..3ad52c0 100644 +--- a/src-IL/msvc8/IL.rc ++++ b/src-IL/msvc8/IL.rc +@@ -7,7 +7,10 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +diff --git a/src-IL/msvc9/IL Unicode.rc b/src-IL/msvc9/IL Unicode.rc +index d0dff4f..c9cf51f 100644 +--- a/src-IL/msvc9/IL Unicode.rc ++++ b/src-IL/msvc9/IL Unicode.rc +@@ -7,7 +7,10 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +diff --git a/src-IL/msvc9/IL.rc b/src-IL/msvc9/IL.rc +index 9f5c795..6b8c891 100644 +--- a/src-IL/msvc9/IL.rc ++++ b/src-IL/msvc9/IL.rc +@@ -7,7 +7,10 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS + \ No newline at end of file diff --git a/ports/devil/CONTROL b/ports/devil/CONTROL new file mode 100644 index 000000000..8e6d08a70 --- /dev/null +++ b/ports/devil/CONTROL @@ -0,0 +1,4 @@ +Source: devil +Version: 1.8.0 +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp, libraw, jxrlib, openexr, jasper, liblzma +Description: A full featured cross-platform image library diff --git a/ports/devil/portfile.cmake b/ports/devil/portfile.cmake new file mode 100644 index 000000000..71f2f1c82 --- /dev/null +++ b/ports/devil/portfile.cmake @@ -0,0 +1,53 @@ +# Common Ambient Variables: +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = +# + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building not supported yet. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +include(vcpkg_common_functions) + +set(DEVIL_VERSION 1.8.0) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DentonW/DevIL + REF v${DEVIL_VERSION} + SHA512 4aed5e50a730ece8b1eb6b2f6204374c6fb6f5334cf7c880d84c0f79645ea7c6b5118f57a7868a487510fc59c452f51472b272215d4c852f265f58b5857e17c7 + HEAD_REF master +) + +set(DEVIL_SHARED OFF) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(DEVIL_SHARED ON) +else() + set(DEVIL_SHARED OFF) +endif() + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH}/DevIL + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001_fix-encoding.patch + ${CMAKE_CURRENT_LIST_DIR}/0002_fix-missing-mfc-includes.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/DevIL + PREFER_NINJA + OPTIONS + -DBUILD_SHARED_LIBS=${DEVIL_SHARED} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/devil RENAME copyright) -- cgit v1.2.3 From 0764c7a671226529f21899449b66d653781db6b4 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Mon, 30 Oct 2017 15:24:46 +0300 Subject: Fix version, package name is not a part of it --- ports/libsndfile/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libsndfile/CONTROL b/ports/libsndfile/CONTROL index 9d3d9b423..67e058991 100644 --- a/ports/libsndfile/CONTROL +++ b/ports/libsndfile/CONTROL @@ -1,4 +1,4 @@ Source: libsndfile -Version: libsndfile-1.0.29-6830c42-1 +Version: 1.0.29-6830c42-1 Description: Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo Build-Depends: libogg, libflac, libvorbis -- cgit v1.2.3 From 2d021f6561d277f23107c3c9ce19ad3a68237201 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Mon, 30 Oct 2017 22:13:25 +0900 Subject: Add support build option to PCL port Add support build options (pcap, qt) to PCL port. --- ports/pcl/CONTROL | 12 ++++++++++-- ports/pcl/portfile.cmake | 14 ++++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index d8c38a363..dcaa884eb 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,4 +1,12 @@ Source: pcl -Version: 1.8.1-2 -Build-Depends: boost, eigen3, flann, qhull, vtk, openni2, qt5, winpcap +Version: 1.8.1-3 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. +Build-Depends: boost, eigen3, flann, qhull, vtk, openni2 + +Feature: qt +Description: Qt support for PCL +Build-Depends: vtk[qt] + +Feature: pcap +Description: PCAP support for PCL +Build-Depends: winpcap \ No newline at end of file diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index cd5c5bedc..92c554df9 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -35,6 +35,16 @@ elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") set(LIBRARY_LINKAGE OFF) endif() +set(WITH_QT OFF) +if("qt" IN_LIST FEATURES) + set(WITH_QT ON) +endif() + +set(WITH_PCAP OFF) +if("pcap" IN_LIST FEATURES) + set(WITH_PCAP ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -50,10 +60,10 @@ vcpkg_configure_cmake( -DWITH_CUDA=OFF -DWITH_LIBUSB=OFF -DWITH_OPENNI2=ON - -DWITH_PCAP=ON + -DWITH_PCAP=${WITH_PCAP} -DWITH_PNG=OFF -DWITH_QHULL=ON - -DWITH_QT=ON + -DWITH_QT=${WITH_QT} -DWITH_VTK=ON ) -- cgit v1.2.3 From f8a4d55053561d8ba7e82fa79c45d30ebcb24621 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Mon, 30 Oct 2017 03:37:06 +0900 Subject: Update VTK to 8.0.1 Update VTK to 8.0.1. --- ports/vtk/CONTROL | 2 +- ports/vtk/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 22d1b1376..1c9095d34 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,4 @@ Source: vtk -Version: 8.0.0-3 +Version: 8.0.1 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj4, lz4, libtheora, libharu diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index c5ea4c387..463ce6981 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -1,13 +1,13 @@ include(vcpkg_common_functions) set(VTK_SHORT_VERSION "8.0") -set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0") +set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.1") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "Kitware/VTK" REF "v${VTK_LONG_VERSION}" - SHA512 1a328f24df0b1c40c623ae80c9d49f8b27570144b10af02aeed41b90b50b8d4e0dd83d1341961f6818cde36e2cd793c578ebc95a46950cebfc518f486f249791 + SHA512 3a70fa704d791d21a1e2421e6799ccc8238da5bc1fc0ab1925fb7956ccaebb7748c452faba1e7f4a2eafbc8612ed644f46f84b0cb3fe16ce539a823165feb29f HEAD_REF "master" ) -- cgit v1.2.3 From 5f4221420701ff7d78e02b11622a00ee12a8e64a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 30 Oct 2017 23:06:04 -0700 Subject: [vcpkg] Enable pkg[*] as alias for all features. --- toolsrc/include/vcpkg/base/util.h | 16 ++++++++++++++++ toolsrc/include/vcpkg/packagespec.h | 16 ++++++++++++++++ toolsrc/include/vcpkg/triplet.h | 1 + toolsrc/src/tests.installplan.cpp | 33 +++++++++++++++++++-------------- toolsrc/src/tests.packagespec.cpp | 34 ++++++++++++++++++++++++++++++++++ toolsrc/src/vcpkg/dependencies.cpp | 36 ++++++++++++++++++++++++++++++++---- 6 files changed, 118 insertions(+), 18 deletions(-) diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 7ffd027f0..e67d38ad8 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -117,6 +117,22 @@ namespace vcpkg::Util } } + template + void sort(Range& cont) + { + using std::begin; + using std::end; + std::sort(begin(cont), end(cont)); + } + + template + bool all_equal(const Range1& r1, const Range2& r2) + { + using std::begin; + using std::end; + return std::equal(begin(r1), end(r1), begin(r2), end(r2)); + } + template())->first)>> std::vector extract_keys(AssocContainer&& input_map) { diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index 99aaaf0d7..0487ae6b8 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -50,6 +50,22 @@ namespace vcpkg static std::vector from_strings_and_triplet(const std::vector& depends, const Triplet& t); + bool operator<(const FeatureSpec& other) const + { + if (name() < other.name()) return true; + if (name() > other.name()) return false; + if (feature() < other.feature()) return true; + if (feature() > other.feature()) return false; + return triplet() < other.triplet(); + } + + bool operator==(const FeatureSpec& other) const + { + return triplet() == other.triplet() && name() == other.name() && feature() == other.feature(); + } + + bool operator!=(const FeatureSpec& other) const { return !(*this == other); } + private: PackageSpec m_spec; std::string m_feature; diff --git a/toolsrc/include/vcpkg/triplet.h b/toolsrc/include/vcpkg/triplet.h index 50d731593..2cfc2d02a 100644 --- a/toolsrc/include/vcpkg/triplet.h +++ b/toolsrc/include/vcpkg/triplet.h @@ -24,6 +24,7 @@ namespace vcpkg size_t hash_code() const; bool operator==(const Triplet& other) const; + bool operator<(const Triplet& other) const { return canonical_name() < other.canonical_name(); } private: static const TripletInstance DEFAULT_INSTANCE; diff --git a/toolsrc/src/tests.installplan.cpp b/toolsrc/src/tests.installplan.cpp index 347612abd..129926317 100644 --- a/toolsrc/src/tests.installplan.cpp +++ b/toolsrc/src/tests.installplan.cpp @@ -461,20 +461,6 @@ namespace UnitTest1 FullPackageSpec::to_feature_specs({spec_c_64, spec_a_86, spec_a_64, spec_c_86}), StatusParagraphs(std::move(status_paragraphs))); - /*Assert::AreEqual(size_t(8), install_plan.size()); - auto iterator_pos = [&](const PackageSpec& spec, size_t start) -> int { - auto it = std::find_if(install_plan.begin() + start, install_plan.end(), [&](auto& action) { - return action.spec == spec; - }); - Assert::IsTrue(it != install_plan.end()); - return (int)(it - install_plan.begin()); - }; - int a_64_1 = iterator_pos(spec_a_64.package_spec, 0), a_86_1 = iterator_pos(spec_a_86.package_spec, 0), - b_64 = iterator_pos(spec_b_64.package_spec, 0), b_86 = iterator_pos(spec_b_86.package_spec, 0), - c_64 = iterator_pos(spec_c_64.package_spec, 0), c_86 = iterator_pos(spec_c_86.package_spec, 0), - a_64_2 = iterator_pos(spec_a_64.package_spec, a_64_1 + 1), - a_86_2 = iterator_pos(spec_a_86.package_spec, a_86_1 + 1);*/ - remove_plan_check(&install_plan[0], "a", Triplet::X64_WINDOWS); remove_plan_check(&install_plan[1], "a"); features_check(&install_plan[2], "b", {"core"}, Triplet::X64_WINDOWS); @@ -484,5 +470,24 @@ namespace UnitTest1 features_check(&install_plan[6], "a", {"a1", "core"}); features_check(&install_plan[7], "c", {"core"}); } + + TEST_METHOD(install_all_features_test) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_a_64 = FullPackageSpec{spec_map.emplace("a", "", {{"0", ""}, {"1", ""}}), {"core"}}; + + auto install_specs = FullPackageSpec::from_string("a[*]", Triplet::X64_WINDOWS); + Assert::IsTrue(install_specs.has_value()); + if (!install_specs.has_value()) return; + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::IsTrue(install_plan.size() == 1); + features_check(&install_plan[0], "a", {"0", "1", "core"}, Triplet::X64_WINDOWS); + } }; } diff --git a/toolsrc/src/tests.packagespec.cpp b/toolsrc/src/tests.packagespec.cpp index cb5c41af0..25498a799 100644 --- a/toolsrc/src/tests.packagespec.cpp +++ b/toolsrc/src/tests.packagespec.cpp @@ -3,6 +3,7 @@ #include #include +#include #pragma comment(lib, "version") #pragma comment(lib, "winhttp") @@ -103,6 +104,39 @@ namespace UnitTest1 Assert::AreEqual("", spec->triplet.c_str()); } + TEST_METHOD(parsed_specifier_wildcard_feature) + { + auto maybe_spec = vcpkg::ParsedSpecifier::from_string("zlib[*]"); + Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, maybe_spec.error()); + auto spec = maybe_spec.get(); + Assert::AreEqual("zlib", spec->name.c_str()); + Assert::IsTrue(spec->features.size() == 1); + Assert::AreEqual("*", spec->features[0].c_str()); + Assert::AreEqual("", spec->triplet.c_str()); + } + + TEST_METHOD(expand_wildcards) + { + auto zlib = + vcpkg::FullPackageSpec::from_string("zlib[0,1]", Triplet::X86_UWP).value_or_exit(VCPKG_LINE_INFO); + auto openssl = + vcpkg::FullPackageSpec::from_string("openssl[*]", Triplet::X86_UWP).value_or_exit(VCPKG_LINE_INFO); + auto specs = FullPackageSpec::to_feature_specs({zlib, openssl}); + Util::sort(specs); + auto spectargets = FeatureSpec::from_strings_and_triplet( + { + "openssl", + "zlib", + "openssl[*]", + "zlib[0]", + "zlib[1]", + }, + Triplet::X86_UWP); + Util::sort(spectargets); + Assert::IsTrue(specs.size() == spectargets.size()); + Assert::IsTrue(Util::all_equal(specs, spectargets)); + } + TEST_METHOD(utf8_to_utf16) { auto str = vcpkg::Strings::to_utf16("abc"); diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 9d264baa2..4c4a8a31c 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -157,7 +157,7 @@ namespace vcpkg::Dependencies InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const std::unordered_set& features, const RequestType& request_type) - : spec(spec), plan_type(InstallPlanType::UNKNOWN), request_type(request_type), feature_list(features) + : spec(spec), plan_type(InstallPlanType::ALREADY_INSTALLED), request_type(request_type), feature_list(features) { } @@ -605,10 +605,38 @@ namespace vcpkg::Dependencies { Cluster& spec_cluster = graph.get(spec.spec()); spec_cluster.request_type = RequestType::USER_REQUESTED; - auto res = mark_plus(spec.feature(), spec_cluster, graph, graph_plan); + if (spec.feature() == "*") + { + if (auto p_scf = spec_cluster.source_control_file.value_or(nullptr)) + { + for (auto&& feature : p_scf->feature_paragraphs) + { + auto res = mark_plus(feature->name, spec_cluster, graph, graph_plan); + + Checks::check_exit(VCPKG_LINE_INFO, + res == MarkPlusResult::SUCCESS, + "Error: Unable to locate feature %s", + spec); + } + + auto res = mark_plus("core", spec_cluster, graph, graph_plan); - Checks::check_exit( - VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); + Checks::check_exit( + VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); + } + else + { + Checks::exit_with_message( + VCPKG_LINE_INFO, "Error: Unable to handle '*' because can't find CONTROL for %s", spec.spec()); + } + } + else + { + auto res = mark_plus(spec.feature(), spec_cluster, graph, graph_plan); + + Checks::check_exit( + VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); + } graph_plan.install_graph.add_vertex(ClusterPtr{&spec_cluster}); } -- cgit v1.2.3 From 3457d89d41f19e933929cf4df88892f47cef297c Mon Sep 17 00:00:00 2001 From: sdcb Date: Tue, 31 Oct 2017 10:17:47 +0800 Subject: Using CP_UTF8 macro instead of magic numbers. --- toolsrc/src/vcpkg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index b4c2d0fe2..2a73c5b0f 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -245,8 +245,8 @@ int main(const int argc, const char* const* const argv) GlobalState::g_init_console_cp = GetConsoleCP(); GlobalState::g_init_console_output_cp = GetConsoleOutputCP(); - SetConsoleCP(65001); - SetConsoleOutputCP(65001); + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); const std::string trimmed_command_line = trim_path_from_command_line(Strings::to_utf8(GetCommandLineW())); #endif -- cgit v1.2.3 From 33fc44a0e3ade2c7e9369723b2ee4965ee8795e6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 31 Oct 2017 02:13:49 -0700 Subject: [vcpkg] Add optional Abi field to BinaryParagraph for future use. --- toolsrc/include/vcpkg/binaryparagraph.h | 1 + toolsrc/src/tests.paragraph.cpp | 30 ++++++++++++++++++++++++++++++ toolsrc/src/vcpkg/binaryparagraph.cpp | 4 ++++ 3 files changed, 35 insertions(+) diff --git a/toolsrc/include/vcpkg/binaryparagraph.h b/toolsrc/include/vcpkg/binaryparagraph.h index 7eb50a6d7..f59bf693a 100644 --- a/toolsrc/include/vcpkg/binaryparagraph.h +++ b/toolsrc/include/vcpkg/binaryparagraph.h @@ -30,6 +30,7 @@ namespace vcpkg std::string feature; std::vector default_features; std::vector depends; + std::string abi; }; struct BinaryControlFile diff --git a/toolsrc/src/tests.paragraph.cpp b/toolsrc/src/tests.paragraph.cpp index d9301abd0..13052610f 100644 --- a/toolsrc/src/tests.paragraph.cpp +++ b/toolsrc/src/tests.paragraph.cpp @@ -190,6 +190,20 @@ namespace UnitTest1 Assert::AreEqual("c", pgh.depends[2].c_str()); } + TEST_METHOD(BinaryParagraph_Abi) + { + vcpkg::BinaryParagraph pgh({ + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Abi", "abcd123"}, + }); + + Assert::AreEqual(size_t(0), pgh.depends.size()); + Assert::IsTrue(pgh.abi == "abcd123"); + } + TEST_METHOD(parse_paragraphs_empty) { const char* str = ""; @@ -385,5 +399,21 @@ namespace UnitTest1 Assert::AreEqual(size_t(1), pghs.size()); Assert::AreEqual("a, b, c", pghs[0]["Depends"].c_str()); } + + TEST_METHOD(BinaryParagraph_serialize_abi) + { + vcpkg::BinaryParagraph pgh({ + {"Package", "zlib"}, + {"Version", "1.2.8"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Depends", "a, b, c"}, + {"Abi", "123abc"}, + }); + std::string ss = Strings::serialize(pgh); + auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(size_t(1), pghs.size()); + Assert::AreEqual("123abc", pghs[0]["Abi"].c_str()); + } }; } diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index 3a493eb4c..c7136b713 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -16,6 +16,7 @@ namespace vcpkg namespace Fields { + static const std::string ABI = "Abi"; static const std::string FEATURE = "Feature"; static const std::string DESCRIPTION = "Description"; static const std::string MAINTAINER = "Maintainer"; @@ -47,6 +48,8 @@ namespace vcpkg this->description = parser.optional_field(Fields::DESCRIPTION); this->maintainer = parser.optional_field(Fields::MAINTAINER); + this->abi = parser.optional_field(Fields::ABI); + std::string multi_arch; parser.required_field(Fields::MULTI_ARCH, multi_arch); @@ -118,6 +121,7 @@ namespace vcpkg out_str.append("Multi-Arch: same\n"); 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'); } } -- cgit v1.2.3 From 912c38d466a7edf5a9d8727e3f6143f294e2f9fc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 31 Oct 2017 02:14:39 -0700 Subject: [double-conversion] Fix --head builds --- ports/double-conversion/portfile.cmake | 46 ++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index 7bf2f6a63..cbb67bfb6 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -23,28 +23,30 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Rename exported target files into something vcpkg_fixup_cmake_targets expects -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake - ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionTargets-debug.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends-release.cmake - ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets-release.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends.cmake - ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake) - -file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake TARGETS_FILE) -string(REPLACE "double-conversionLibraryDepends" "double-conversionTargets" TARGETS_FILE "${TARGETS_FILE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake "${TARGETS_FILE}") - -# Remove hardcoded paths from config file -file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake CONFIG_FILE) -string(REPLACE "${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion/double-conversionLibraryDepends.cmake" - "\${double-conversion_CMAKE_DIR}/double-conversionTargets.cmake" CONFIG_FILE "${CONFIG_FILE}") -string(REPLACE "${CURRENT_PACKAGES_DIR}" - "\${double-conversion_CMAKE_DIR}/../.." CONFIG_FILE "${CONFIG_FILE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake "${CONFIG_FILE}") - -vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +if(NOT VCPKG_USE_HEAD_VERSION) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake + ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionTargets-debug.cmake) + file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends-release.cmake + ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets-release.cmake) + file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends.cmake + ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake) + + file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake TARGETS_FILE) + string(REPLACE "double-conversionLibraryDepends" "double-conversionTargets" TARGETS_FILE "${TARGETS_FILE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake "${TARGETS_FILE}") + + # Remove hardcoded paths from config file + file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake CONFIG_FILE) + string(REPLACE "${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion/double-conversionLibraryDepends.cmake" + "\${double-conversion_CMAKE_DIR}/double-conversionTargets.cmake" CONFIG_FILE "${CONFIG_FILE}") + string(REPLACE "${CURRENT_PACKAGES_DIR}" + "\${double-conversion_CMAKE_DIR}/../.." CONFIG_FILE "${CONFIG_FILE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake "${CONFIG_FILE}") + + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion) +endif() vcpkg_copy_pdbs() -- cgit v1.2.3 From 925fab565a76c23e76329193bc25158608bc9fc6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 31 Oct 2017 03:04:28 -0700 Subject: [vcpkg] --head should only apply to USER_REQUESTED packages. --- toolsrc/include/vcpkg/dependencies.h | 5 +++ toolsrc/include/vcpkg/install.h | 2 -- toolsrc/src/vcpkg/commands.ci.cpp | 5 +-- toolsrc/src/vcpkg/dependencies.cpp | 14 +++++++++ toolsrc/src/vcpkg/export.cpp | 4 ++- toolsrc/src/vcpkg/install.cpp | 59 ++++++++++++++++++------------------ 6 files changed, 54 insertions(+), 35 deletions(-) diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 60c83fcca..5411ee166 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -18,6 +19,9 @@ namespace vcpkg::Dependencies AUTO_SELECTED }; + std::string to_output_string(RequestType request_type, + const CStringView s, + const Build::BuildPackageOptions& options); std::string to_output_string(RequestType request_type, const CStringView s); struct AnyParagraph @@ -63,6 +67,7 @@ namespace vcpkg::Dependencies AnyParagraph any_paragraph; InstallPlanType plan_type; RequestType request_type; + Build::BuildPackageOptions build_options; std::unordered_set feature_list; }; diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index 895028865..7bf823e99 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -53,7 +53,6 @@ namespace vcpkg::Install Build::BuildResult perform_install_plan_action(const VcpkgPaths& paths, const Dependencies::InstallPlanAction& action, - const Build::BuildPackageOptions& install_plan_options, StatusParagraphs& status_db); enum class InstallResult @@ -70,7 +69,6 @@ namespace vcpkg::Install StatusParagraphs* status_db); InstallSummary perform(const std::vector& action_plan, - const Build::BuildPackageOptions& install_plan_options, const KeepGoing keep_going, const VcpkgPaths& paths, StatusParagraphs& status_db); diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 559dc4541..d012ff6dc 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -44,11 +44,12 @@ namespace vcpkg::Commands::CI const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; const std::vector action_plan = - Util::fmap(install_plan, [](InstallPlanAction& install_action) { + Util::fmap(install_plan, [&install_plan_options](InstallPlanAction& install_action) { + install_action.build_options = install_plan_options; return Dependencies::AnyAction(std::move(install_action)); }); - return Install::perform(action_plan, install_plan_options, Install::KeepGoing::YES, paths, status_db); + return Install::perform(action_plan, Install::KeepGoing::YES, paths, status_db); } struct TripletAndSummary diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 4c4a8a31c..6f599afd4 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -133,6 +133,20 @@ namespace vcpkg::Dependencies "Cannot get dependencies because there was none of: source/binary/status paragraphs"); } + std::string to_output_string(RequestType request_type, + const CStringView s, + const Build::BuildPackageOptions& options) + { + 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, from_head); + case RequestType::USER_REQUESTED: return Strings::format(" %s%s", s, from_head); + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + std::string to_output_string(RequestType request_type, const CStringView s) { switch (request_type) diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index f0a3b23d0..eb4f5db3c 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -68,6 +68,8 @@ namespace vcpkg::Export { static constexpr std::array ORDER = {ExportPlanType::ALREADY_BUILT, ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT}; + static constexpr Build::BuildPackageOptions build_options = {Build::UseHeadVersion::NO, + Build::AllowDownloads::YES}; for (const ExportPlanType plan_type : ORDER) { @@ -80,7 +82,7 @@ namespace vcpkg::Export std::vector cont = it->second; std::sort(cont.begin(), cont.end(), &ExportPlanAction::compare_by_name); const std::string as_string = Strings::join("\n", cont, [](const ExportPlanAction* p) { - return Dependencies::to_output_string(p->request_type, p->spec.to_string()); + return Dependencies::to_output_string(p->request_type, p->spec.to_string(), build_options); }); switch (plan_type) diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 7bab740be..b1f722d59 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -250,7 +250,6 @@ namespace vcpkg::Install BuildResult perform_install_plan_action(const VcpkgPaths& paths, const InstallPlanAction& action, - const Build::BuildPackageOptions& build_package_options, StatusParagraphs& status_db) { const InstallPlanType& plan_type = action.plan_type; @@ -259,7 +258,7 @@ namespace vcpkg::Install GlobalState::feature_packages ? action.displayname() : display_name; const bool is_user_requested = action.request_type == RequestType::USER_REQUESTED; - const bool use_head_version = to_bool(build_package_options.use_head_version); + const bool use_head_version = to_bool(action.build_options.use_head_version); if (plan_type == InstallPlanType::ALREADY_INSTALLED) { @@ -285,7 +284,7 @@ namespace vcpkg::Install *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), action.spec.triplet(), paths.port_dir(action.spec), - build_package_options, + action.build_options, action.feature_list}; return Build::build_package(paths, build_config, status_db); } @@ -295,7 +294,7 @@ namespace vcpkg::Install action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO), action.spec.triplet(), paths.port_dir(action.spec), - build_package_options}; + action.build_options}; return Build::build_package(paths, build_config, status_db); } }(); @@ -407,46 +406,38 @@ namespace vcpkg::Install 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) { + return to_output_string(p->request_type, p->displayname(), p->build_options); + }); + }; + if (excluded.size() > 0) { - const std::string excluded_string = Strings::join("\n", excluded, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages are excluded:\n%s", excluded_string); + System::println("The following packages are excluded:\n%s", actions_to_output_string(excluded)); } if (already_installed_plans.size() > 0) { - const std::string already_string = - Strings::join("\n", already_installed_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages are already installed:\n%s", already_string); + System::println("The following packages are already installed:\n%s", + actions_to_output_string(already_installed_plans)); } if (rebuilt_plans.size() > 0) { - const std::string rebuilt_string = Strings::join("\n", rebuilt_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages will be rebuilt:\n%s", rebuilt_string); + System::println("The following packages will be rebuilt:\n%s", actions_to_output_string(rebuilt_plans)); } if (new_plans.size() > 0) { - const std::string new_string = Strings::join("\n", new_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages will be built and installed:\n%s", new_string); + System::println("The following packages will be built and installed:\n%s", + actions_to_output_string(new_plans)); } if (only_install_plans.size() > 0) { - const std::string only_install_string = - Strings::join("\n", only_install_plans, [](const InstallPlanAction* p) { - return to_output_string(p->request_type, p->displayname()); - }); - System::println("The following packages will be directly installed:\n%s", only_install_string); + System::println("The following packages will be directly installed:\n%s", + actions_to_output_string(only_install_plans)); } if (has_non_user_requested_packages) @@ -489,7 +480,6 @@ namespace vcpkg::Install } InstallSummary perform(const std::vector& action_plan, - const Build::BuildPackageOptions& install_plan_options, const KeepGoing keep_going, const VcpkgPaths& paths, StatusParagraphs& status_db) @@ -513,8 +503,7 @@ namespace vcpkg::Install if (const auto install_action = action.install_plan.get()) { - const BuildResult result = - perform_install_plan_action(paths, *install_action, install_plan_options, status_db); + const BuildResult result = perform_install_plan_action(paths, *install_action, status_db); if (result != BuildResult::SUCCEEDED && keep_going == KeepGoing::NO) { System::println(Build::create_user_troubleshooting_message(install_action->spec)); @@ -629,6 +618,16 @@ namespace vcpkg::Install install_plan, [](InstallPlanAction& install_action) { return AnyAction(std::move(install_action)); }); } + for (auto&& action : action_plan) + { + if (auto p_install = action.install_plan.get()) + { + p_install->build_options = install_plan_options; + if (p_install->request_type != RequestType::USER_REQUESTED) + p_install->build_options.use_head_version = Build::UseHeadVersion::NO; + } + } + // install plan will be empty if it is already installed - need to change this at status paragraph part Checks::check_exit(VCPKG_LINE_INFO, !action_plan.empty(), "Install plan cannot be empty"); @@ -650,7 +649,7 @@ namespace vcpkg::Install Checks::exit_success(VCPKG_LINE_INFO); } - const InstallSummary summary = perform(action_plan, install_plan_options, keep_going, paths, status_db); + const InstallSummary summary = perform(action_plan, keep_going, paths, status_db); System::println("\nTotal elapsed time: %s", summary.total_elapsed_time); -- cgit v1.2.3 From a705df80b0f8db81b201492b4012e23e08a53694 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 31 Oct 2017 03:47:35 -0700 Subject: [vcpkg] Fix bug where packages with uninstalled features appear to be uninstalled. --- toolsrc/include/vcpkg/statusparagraphs.h | 6 +- toolsrc/src/tests.statusparagraphs.cpp | 85 +++++++++++++++++++++++++++++ toolsrc/src/vcpkg/statusparagraphs.cpp | 26 ++++----- toolsrc/vcpkgtest/vcpkgtest.vcxproj | 1 + toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters | 3 + 5 files changed, 102 insertions(+), 19 deletions(-) create mode 100644 toolsrc/src/tests.statusparagraphs.cpp diff --git a/toolsrc/include/vcpkg/statusparagraphs.h b/toolsrc/include/vcpkg/statusparagraphs.h index c2f3b7b8e..747a0c1ab 100644 --- a/toolsrc/include/vcpkg/statusparagraphs.h +++ b/toolsrc/include/vcpkg/statusparagraphs.h @@ -16,10 +16,10 @@ namespace vcpkg using const_iterator = container::const_reverse_iterator; const_iterator find(const PackageSpec& spec) const { return find(spec.name(), spec.triplet()); } - const_iterator find(const std::string& name, const Triplet& triplet) const; - iterator find(const std::string& name, const Triplet& triplet); + iterator find(const std::string& name, const Triplet& triplet, const std::string& feature = ""); + const_iterator find(const std::string& name, const Triplet& triplet, const std::string& feature = "") const; + std::vector*> find_all(const std::string& name, const Triplet& triplet); - iterator find(const std::string& name, const Triplet& triplet, const std::string& feature); const_iterator find_installed(const PackageSpec& spec) const { diff --git a/toolsrc/src/tests.statusparagraphs.cpp b/toolsrc/src/tests.statusparagraphs.cpp new file mode 100644 index 000000000..4cc1130b1 --- /dev/null +++ b/toolsrc/src/tests.statusparagraphs.cpp @@ -0,0 +1,85 @@ +#include + +#include +#include +#include +#include + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +using namespace vcpkg; +using namespace vcpkg::Paragraphs; + +namespace UnitTest1 +{ + class StatusParagraphsTests : public TestClass + { + TEST_METHOD(find_installed) + { + auto pghs = parse_paragraphs(R"( +Package: ffmpeg +Version: 3.3.3 +Architecture: x64-windows +Multi-Arch: same +Description: +Status: install ok installed +)"); + Assert::IsTrue(!!pghs); + if (!pghs) return; + + StatusParagraphs status_db(Util::fmap( + *pghs.get(), [](RawParagraph& rpgh) { return std::make_unique(std::move(rpgh)); })); + + auto it = status_db.find_installed("ffmpeg", Triplet::X64_WINDOWS); + Assert::IsTrue(it != status_db.end()); + } + + TEST_METHOD(find_not_installed) + { + auto pghs = parse_paragraphs(R"( +Package: ffmpeg +Version: 3.3.3 +Architecture: x64-windows +Multi-Arch: same +Description: +Status: purge ok not-installed +)"); + Assert::IsTrue(!!pghs); + if (!pghs) return; + + StatusParagraphs status_db(Util::fmap( + *pghs.get(), [](RawParagraph& rpgh) { return std::make_unique(std::move(rpgh)); })); + + auto it = status_db.find_installed("ffmpeg", Triplet::X64_WINDOWS); + Assert::IsTrue(it == status_db.end()); + } + + TEST_METHOD(find_with_feature_packages) + { + auto pghs = parse_paragraphs(R"( +Package: ffmpeg +Version: 3.3.3 +Architecture: x64-windows +Multi-Arch: same +Description: +Status: install ok installed + +Package: ffmpeg +Feature: openssl +Depends: openssl +Architecture: x64-windows +Multi-Arch: same +Description: +Status: purge ok not-installed +)"); + Assert::IsTrue(!!pghs); + if (!pghs) return; + + StatusParagraphs status_db(Util::fmap( + *pghs.get(), [](RawParagraph& rpgh) { return std::make_unique(std::move(rpgh)); })); + + auto it = status_db.find_installed("ffmpeg", Triplet::X64_WINDOWS); + Assert::IsTrue(it != status_db.end()); + } + }; +} \ No newline at end of file diff --git a/toolsrc/src/vcpkg/statusparagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp index 647ed6d3f..d4afc0427 100644 --- a/toolsrc/src/vcpkg/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg/statusparagraphs.cpp @@ -10,22 +10,6 @@ namespace vcpkg StatusParagraphs::StatusParagraphs(std::vector>&& ps) : paragraphs(std::move(ps)){}; - StatusParagraphs::const_iterator StatusParagraphs::find(const std::string& name, const Triplet& triplet) const - { - return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { - const PackageSpec& spec = pgh->package.spec; - return spec.name() == name && spec.triplet() == triplet; - }); - } - - StatusParagraphs::iterator StatusParagraphs::find(const std::string& name, const Triplet& triplet) - { - return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { - const PackageSpec& spec = pgh->package.spec; - return spec.name() == name && spec.triplet() == triplet; - }); - } - std::vector*> StatusParagraphs::find_all(const std::string& name, const Triplet& triplet) { @@ -50,6 +34,16 @@ namespace vcpkg }); } + StatusParagraphs::const_iterator StatusParagraphs::find(const std::string& name, + const Triplet& triplet, + const std::string& feature) const + { + return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { + const PackageSpec& spec = pgh->package.spec; + return spec.name() == name && spec.triplet() == triplet && pgh->package.feature == feature; + }); + } + StatusParagraphs::const_iterator StatusParagraphs::find_installed(const std::string& name, const Triplet& triplet) const { diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index d25748124..766b4bf67 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -24,6 +24,7 @@ + diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters index 42691c614..b6f1ced06 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters @@ -30,5 +30,8 @@ Source Files + + Source Files + \ No newline at end of file -- cgit v1.2.3 From f4b09f5782eeeb336d5f5a558aa0006e2cc40327 Mon Sep 17 00:00:00 2001 From: LazyHamster Date: Tue, 31 Oct 2017 12:50:23 +0300 Subject: [ogre] Update port to Ogre version 1.10.8. --- ports/ogre/0001-use-vcpkg-freeimage.patch | 17 ----- ports/ogre/0002-ogre-cmake-dir-as-option.patch | 19 ----- ports/ogre/0003-use-flat-installation.patch | 41 ---------- ports/ogre/CONTROL | 12 ++- ports/ogre/OGREConfig.cmake | 37 --------- ports/ogre/portfile.cmake | 101 +++++++++++++++---------- 6 files changed, 73 insertions(+), 154 deletions(-) delete mode 100644 ports/ogre/0001-use-vcpkg-freeimage.patch delete mode 100644 ports/ogre/0002-ogre-cmake-dir-as-option.patch delete mode 100644 ports/ogre/0003-use-flat-installation.patch delete mode 100644 ports/ogre/OGREConfig.cmake diff --git a/ports/ogre/0001-use-vcpkg-freeimage.patch b/ports/ogre/0001-use-vcpkg-freeimage.patch deleted file mode 100644 index 0266e5e89..000000000 --- a/ports/ogre/0001-use-vcpkg-freeimage.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/OgreMain/CMakeLists.txt b/OgreMain/CMakeLists.txt -index 6a43378..22f950e 100644 ---- a/OgreMain/CMakeLists.txt -+++ b/OgreMain/CMakeLists.txt -@@ -220,7 +220,11 @@ endif () - list(APPEND HEADER_FILES ${THREAD_HEADER_FILES}) - - # Add needed definitions and nedmalloc include dir --add_definitions(-DOGRE_NONCLIENT_BUILD -DFREEIMAGE_LIB -D_MT -D_USRDLL) -+# vcpkg specific patch: we removed -DFREEIMAGE_LIB -+# from the defines, because vcpkg's freeimage can -+# be both static or dynamic, and FREEIMAGE_LIB -+# remove all the symbol exporting declaration from FreeImage.h -+add_definitions(-DOGRE_NONCLIENT_BUILD -D_MT -D_USRDLL) - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/nedmalloc) - - set(LIBRARIES ${PLATFORM_LIBS}) diff --git a/ports/ogre/0002-ogre-cmake-dir-as-option.patch b/ports/ogre/0002-ogre-cmake-dir-as-option.patch deleted file mode 100644 index c5d75e20c..000000000 --- a/ports/ogre/0002-ogre-cmake-dir-as-option.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt -index 4c496b7..feb4017 100644 ---- a/CMake/CMakeLists.txt -+++ b/CMake/CMakeLists.txt -@@ -14,10 +14,12 @@ - ############################################################# - - if(WIN32 OR APPLE) -- set(OGRE_CMAKE_DIR "CMake") -+ set(OGRE_DEFAULT_CMAKE_DIR "CMake") - else() -- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") -+ set(OGRE_DEFAULT_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") - endif() -+set(OGRE_CMAKE_DIR ${OGRE_DEFAULT_CMAKE_DIR} CACHE STRING "Install directory for CMake files.") -+mark_as_advanced(OGRE_DEFAULT_CMAKE_DIR) - - set(INST_FILES - Packages/FindOIS.cmake diff --git a/ports/ogre/0003-use-flat-installation.patch b/ports/ogre/0003-use-flat-installation.patch deleted file mode 100644 index c5a382c1f..000000000 --- a/ports/ogre/0003-use-flat-installation.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/CMake/Utils/OgreConfigTargets.cmake b/CMake/Utils/OgreConfigTargets.cmake -index c6b3b40..2da7ebf 100644 ---- a/CMake/Utils/OgreConfigTargets.cmake -+++ b/CMake/Utils/OgreConfigTargets.cmake -@@ -41,15 +41,28 @@ if (NOT OGRE_RUNTIME_OUTPUT) - set(OGRE_RUNTIME_OUTPUT ${OGRE_BINARY_DIR}/bin) - endif () - -+option(OGRE_NO_INSTALLATION_SUFFIXES_ON_WIN32 "Do not install in configuration-specific directories in Windows" FALSE) -+ - if (WIN32) -- set(OGRE_RELEASE_PATH "/Release") -- set(OGRE_RELWDBG_PATH "/RelWithDebInfo") -- set(OGRE_MINSIZE_PATH "/MinSizeRel") -- set(OGRE_DEBUG_PATH "/Debug") -- set(OGRE_LIB_RELEASE_PATH "/Release") -- set(OGRE_LIB_RELWDBG_PATH "/RelWithDebInfo") -- set(OGRE_LIB_MINSIZE_PATH "/MinSizeRel") -- set(OGRE_LIB_DEBUG_PATH "/Debug") -+ if (OGRE_NO_INSTALLATION_SUFFIXES_ON_WIN32) -+ set(OGRE_RELEASE_PATH "") -+ set(OGRE_RELWDBG_PATH "") -+ set(OGRE_MINSIZE_PATH "") -+ set(OGRE_DEBUG_PATH "") -+ set(OGRE_LIB_RELEASE_PATH "") -+ set(OGRE_LIB_RELWDBG_PATH "") -+ set(OGRE_LIB_MINSIZE_PATH "") -+ set(OGRE_LIB_DEBUG_PATH "/") -+ else () -+ set(OGRE_RELEASE_PATH "/Release") -+ set(OGRE_RELWDBG_PATH "/RelWithDebInfo") -+ set(OGRE_MINSIZE_PATH "/MinSizeRel") -+ set(OGRE_DEBUG_PATH "/Debug") -+ set(OGRE_LIB_RELEASE_PATH "/Release") -+ set(OGRE_LIB_RELWDBG_PATH "/RelWithDebInfo") -+ set(OGRE_LIB_MINSIZE_PATH "/MinSizeRel") -+ set(OGRE_LIB_DEBUG_PATH "/Debug") -+ endif () - set(OGRE_PLUGIN_PATH "/opt") - set(OGRE_SAMPLE_PATH "/opt/samples") - elseif (UNIX) diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL index 588c6413b..98d68abf0 100644 --- a/ports/ogre/CONTROL +++ b/ports/ogre/CONTROL @@ -1,4 +1,14 @@ Source: ogre -Version: 1.9.0-1 +Version: 1.10.8 Build-Depends: freeimage, freetype, zlib, zziplib Description: 3D Object-Oriented Graphics Rendering Engine + +Feature: d3d9 +Description: Build Direct3D9 RenderSystem + +Feature: java +Description: Build Java (JNI) bindings + +Feature: python +Description: Build Python bindings +Build-Depends: python3 diff --git a/ports/ogre/OGREConfig.cmake b/ports/ogre/OGREConfig.cmake deleted file mode 100644 index a20544431..000000000 --- a/ports/ogre/OGREConfig.cmake +++ /dev/null @@ -1,37 +0,0 @@ -#.rst: -# OGREConfig -# ------------ -# -# Dummy OGREConfig to simplify use of OGRE-provided FindOGRE module. -# -# This file is provided as part of the vcpkg port of OGRE . -# It is meant to be found automatically by find_package(OGRE), -# but then offloads all the real work to the FindOGRE module by temporarly -# adding its directory to CMAKE_MODULE_PATH -# -# See the FindOGRE module to see the defined variables:: -# - -# Temporarly add the directory in which OGREConfig.cmake is contained to -# get access to the FindOGRE module -get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -set(ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) -list(APPEND CMAKE_MODULE_PATH ${SELF_DIR}) -find_package(OGRE MODULE) - -# Leave CMAKE_MODULE_PATH as we found it -set(CMAKE_MODULE_PATH ${ORIGINAL_CMAKE_MODULE_PATH}) - -# Handle components -# imported from https://github.com/Kitware/CMake/blob/v3.7.1/Modules/CMakePackageConfigHelpers.cmake#L300 -macro(check_required_components _NAME) - foreach(comp ${${_NAME}_FIND_COMPONENTS}) - if(NOT ${_NAME}_${comp}_FOUND) - if(${_NAME}_FIND_REQUIRED_${comp}) - set(${_NAME}_FOUND FALSE) - endif() - endif() - endforeach() -endmacro() - -check_required_components(OGRE) \ No newline at end of file diff --git a/ports/ogre/portfile.cmake b/ports/ogre/portfile.cmake index a0989a4a2..9c380f79e 100644 --- a/ports/ogre/portfile.cmake +++ b/ports/ogre/portfile.cmake @@ -1,60 +1,83 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sinbad-ogre-dd30349ea667) + +set(OGRE_VERSION 1.10.8) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ogre-${OGRE_VERSION}) + vcpkg_download_distfile(ARCHIVE - URLS "https://bitbucket.org/sinbad/ogre/get/v1-9-0.zip" - FILENAME "ogre-v1-9-0.zip" - SHA512 de7315a2450ecf0d9073e6a8f0c54737e041016f7ad820556d10701c7d23eefab9d3473476a8e95447c30ab21518b8e4cfb0271db72494ea67a3dea284c9a3d3 + URLS "https://github.com/OGRECave/ogre/archive/v1.10.8.zip" + FILENAME "ogre-1.10.8.zip" + SHA512 c7d962fe7fb8c46a4e15bb6e2bb68c67f0cc2a0d04a8f53e03fb9572c76df3679dcd117137c6624f2f56a8eda108723817dbaa616ecb7dc4cfd6a644a6bc4356 ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-use-vcpkg-freeimage.patch" - "${CMAKE_CURRENT_LIST_DIR}/0002-ogre-cmake-dir-as-option.patch" - "${CMAKE_CURRENT_LIST_DIR}/0003-use-flat-installation.patch" -) - if (VCPKG_LIBRARY_LINKAGE STREQUAL static) set(OGRE_STATIC ON) else() set(OGRE_STATIC OFF) endif() +# Configure features + +if("d3d9" IN_LIST FEATURES) + set(WITH_D3D9 ON) +else() + set(WITH_D3D9 OFF) +endif() + +if("java" IN_LIST FEATURES) + set(WITH_JAVA ON) +else() + set(WITH_JAVA OFF) +endif() + +if("python" IN_LIST FEATURES) + set(WITH_PYTHON ON) +else() + set(WITH_PYTHON OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DOGRE_USE_BOOST:BOOL=OFF - -DOGRE_BUILD_RENDERSYSTEM_D3D9:BOOL=OFF - -DOGRE_INSTALL_DEPENDENCIES:BOOL=OFF - -DOGRE_COPY_DEPENDENCIES:BOOL=OFF - -DOGRE_BUILD_TOOLS:BOOL=OFF - -DOGRE_CMAKE_DIR:STRING=share/ogre - -DOGRE_STATIC:BOOL=${OGRE_STATIC} - -DOGRE_INSTALL_SAMPLES:BOOL=OFF - -DOGRE_INSTALL_TOOLS:BOOL=OFF - # We disable this option because it is broken and we rely on vcpkg_copy_pdbs - -DOGRE_INSTALL_PDB:BOOL=OFF - -DOGRE_BUILD_DOCS:BOOL=OFF - -DOGRE_INSTALL_DOCS:BOOL=OFF - -DOGRE_INSTALL_SAMPLES_SOURCE:BOOL=OFF - -DOGRE_NO_INSTALLATION_SUFFIXES_ON_WIN32:BOOL=ON + PREFER_NINJA + OPTIONS + -DOGRE_BUILD_DEPENDENCIES=OFF + -DOGRE_BUILD_SAMPLES=OFF + -DOGRE_BUILD_TESTS=OFF + -DOGRE_BUILD_TOOLS=OFF + -DOGRE_BUILD_MSVC_MP=ON + -DOGRE_BUILD_MSVC_ZM=ON + -DOGRE_INSTALL_DEPENDENCIES=OFF + -DOGRE_INSTALL_DOCS=OFF + -DOGRE_INSTALL_PDB=OFF + -DOGRE_INSTALL_SAMPLES=OFF + -DOGRE_INSTALL_TOOLS=OFF + -DOGRE_INSTALL_CMAKE=ON + -DOGRE_INSTALL_VSPROPS=OFF + -DOGRE_STATIC=${OGRE_STATIC} + -DOGRE_UNITY_BUILD=OFF + -DOGRE_USE_STD11=ON + -DOGRE_NODE_STORAGE_LEGACY=OFF + -DOGRE_BUILD_RENDERSYSTEM_D3D11=ON + -DOGRE_BUILD_RENDERSYSTEM_GL=ON + -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=ON + -DOGRE_BUILD_RENDERSYSTEM_GLES=OFF + -DOGRE_BUILD_RENDERSYSTEM_GLES2=OFF +# Optional stuff + -DOGRE_BUILD_COMPONENT_JAVA=${WITH_JAVA} + -DOGRE_BUILD_COMPONENT_PYTHON=${WITH_PYTHON} + -DOGRE_BUILD_RENDERSYSTEM_D3D9=${WITH_D3D9} ) vcpkg_install_cmake() -# Add a OGREConfig.cmake to simplify the process of finding vcpkg OGRE -file(COPY ${CMAKE_CURRENT_LIST_DIR}/OGREConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre) - -# Remove debug includes +# Remove unwanted files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -# Remove debug CMake files -# Note that at the moment OGRE do not export imported targets, -# so we do not need to copy the debug imported targets in the -# release CMake path -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMake) # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/ogre/COPYING ${CURRENT_PACKAGES_DIR}/share/ogre/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre RENAME copyright) + +# Move installed CMake scripts to share folder +file(RENAME ${CURRENT_PACKAGES_DIR}/CMake ${CURRENT_PACKAGES_DIR}/share/ogre/CMake) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() -- cgit v1.2.3 From 161244188d91550cff07503e0fd66c884ca7a992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Tue, 31 Oct 2017 13:57:37 +0100 Subject: Update Catch to 1.11.0 --- ports/catch/CONTROL | 2 +- ports/catch/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/catch/CONTROL b/ports/catch/CONTROL index af18c49de..1229bc936 100644 --- a/ports/catch/CONTROL +++ b/ports/catch/CONTROL @@ -1,3 +1,3 @@ Source: catch -Version: 1.10.0 +Version: 1.11.0 Description: C++ Automated Test Cases in Headers diff --git a/ports/catch/portfile.cmake b/ports/catch/portfile.cmake index 2c45604ce..e2adbe187 100644 --- a/ports/catch/portfile.cmake +++ b/ports/catch/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v1.10.0) +set(CATCH_VERSION v1.11.0) vcpkg_download_distfile(HEADER URLS "https://github.com/philsquared/Catch/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-${CATCH_VERSION}.hpp" - SHA512 275ab5b5d778cc8a91b5f3e8f241a37b680c81d1b8945ff64ad16a9708c98e6535b389746bf8cacbed07f874629f456b56bafbf1879c5a6f84fa87675c1361b6 + SHA512 8ce490cfa433ec1c6b6460d76e1d9a6502966ada96fec7290fe9827a965751f3d572e97b93bbbb5e2bc97ffcf70bb547a050405b80a1a816054bd6afd1208cbe ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From eb7e1e481bbebc13d277d6a89f0a270767962286 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 30 Oct 2017 18:51:55 -0700 Subject: Fix proxy usage in Win7 (powershell 2.0) --- scripts/fetchDependency.ps1 | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 89e37c428..6cd28ad8e 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -18,6 +18,19 @@ function Test-Module($moduleName) return [bool](Get-Module -ListAvailable -Name $moduleName) } +function Get-Credential-Backwards-Compatible() +{ + if (Test-CommandParameter -commandName 'Get-Credential' -parameterName 'Message') + { + return Get-Credential -Message "Enter credentials for Proxy Authentication" + } + else + { + Write-Host "Enter credentials for Proxy Authentication" + return Get-Credential + } +} + if (Test-Module -moduleName 'BitsTransfer') { Import-Module BitsTransfer -Verbose:$false @@ -54,28 +67,18 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $WC = New-Object System.Net.WebClient $ProxyAuth = !$WC.Proxy.IsBypassed($url) - if ($ProxyAuth) - { - if (Test-CommandParameter -commandName 'Get-Credential' -parameterName 'Message') - { - $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication" - } - else - { - "Enter credentials for Proxy Authentication" - $ProxyCred = Get-Credential - } - - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred) - $WC.Proxy.Credentials=$ProxyCred - } # git and installerbase fail with Start-BitsTransfer if ((Test-Command -commandName 'Start-BitsTransfer') -and ($Dependency -ne "git")-and ($Dependency -ne "installerbase")) { try { + if ($ProxyAuth) + { + $ProxyCred = Get-Credential-Backwards-Compatible + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential", $ProxyCred) + } Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop return } @@ -89,6 +92,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } } + if ($ProxyAuth) + { + $WC.Proxy.Credentials = Get-Credential-Backwards-Compatible + } + Write-Verbose("Downloading $Dependency...") $WC.DownloadFile($url, $downloadPath) } -- cgit v1.2.3 From 7d0bcceaf028f28b0bc5ae666689f26d8de743a9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 31 Oct 2017 17:06:07 -0700 Subject: [findVSInstances] Data lines are now placed within tags. Text outside these tags is ignored This means we can print text in powershell now and it won't break vcpkg. --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 2 +- scripts/findVisualStudioInstallationInstances.ps1 | 4 ++-- toolsrc/src/vcpkg/vcpkgpaths.cpp | 25 ++++++++++++++++++++--- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index 3269562dc..d9ffbd32a 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -11,7 +11,7 @@ $VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationI Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstallationInstances))" foreach ($instanceCandidateWithEOL in $VisualStudioInstallationInstances) { - $instanceCandidate = $instanceCandidateWithEOL -replace "::" + $instanceCandidate = $instanceCandidateWithEOL -replace "::" -replace "::" Write-Verbose "Inspecting: $instanceCandidate" $split = $instanceCandidate -split "::" # $preferenceWeight = $split[0] diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 566560cdb..5470b57c0 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -29,7 +29,7 @@ foreach ($instance in $asXml.instances.instance) } # Placed like that for easy sorting according to preference - $results.Add("${releaseType}::${installationVersion}::${installationPath}::") > $null + $results.Add("::${releaseType}::${installationVersion}::${installationPath}::") > $null } # If nothing is found, attempt to find VS2015 Build Tools (not detected by vswhere.exe) @@ -42,7 +42,7 @@ if ($results.Count -eq 0) if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) { - return "PreferenceWeight1::Legacy::14.0::$installationPath::" + return "::PreferenceWeight1::Legacy::14.0::$installationPath::" } } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index c6a92f813..8b9e6c598 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -320,6 +320,23 @@ namespace vcpkg std::string major_version() const { return version.substr(0, 2); } }; + static std::vector keep_data_lines(const std::string& data_blob) + { + static const std::regex DATA_LINE_REGEX(R"(::(.+?)(?=::))"); + + std::vector data_lines; + + const std::sregex_iterator it(data_blob.cbegin(), data_blob.cend(), DATA_LINE_REGEX); + const std::sregex_iterator end; + for (std::sregex_iterator i = it; i != end; ++i) + { + const std::smatch match = *i; + data_lines.push_back(match[1].str()); + } + + return data_lines; + } + static std::vector get_visual_studio_instances(const VcpkgPaths& paths) { const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; @@ -327,9 +344,11 @@ namespace vcpkg Checks::check_exit( VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances"); - const std::vector instances_as_strings = Strings::split(ec_data.output, "::"); - Checks::check_exit( - VCPKG_LINE_INFO, !instances_as_strings.empty(), "Could not detect any Visual Studio instances.\n"); + const std::vector instances_as_strings = keep_data_lines(ec_data.output); + Checks::check_exit(VCPKG_LINE_INFO, + !instances_as_strings.empty(), + "Could not detect any Visual Studio instances. Powershell returned: %s\n", + ec_data.output); std::vector output; for (const std::string& instance_as_string : instances_as_strings) -- cgit v1.2.3 From 47bf4b6b5caf44adeaf582e5137377fb9d2cc5c4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 31 Oct 2017 17:23:09 -0700 Subject: [fetchDependency] Now also returns output in the form data --- scripts/fetchDependency.ps1 | 4 +-- scripts/findVisualStudioInstallationInstances.ps1 | 2 +- toolsrc/src/vcpkg/vcpkgpaths.cpp | 40 +++++++++++++---------- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6cd28ad8e..aec05457a 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -265,6 +265,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) return $executableFromDownload } -SelectProgram $Dependency - +$path = SelectProgram $Dependency Write-Verbose "Fetching dependency: $Dependency. Done." +return "::$path::" diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 5470b57c0..e3bc67ff6 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -4,7 +4,7 @@ param( ) $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -$vswhereExe = & $scriptsDir\fetchDependency.ps1 "vswhere" +$vswhereExe = (& $scriptsDir\fetchDependency.ps1 "vswhere") -replace "::" -replace "::" $output = & $vswhereExe -prerelease -legacy -products * -format xml [xml]$asXml = $output diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 8b9e6c598..40f52af73 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -62,6 +62,23 @@ namespace vcpkg return nullopt; } + static std::vector keep_data_lines(const std::string& data_blob) + { + static const std::regex DATA_LINE_REGEX(R"(::(.+?)(?=::))"); + + std::vector data_lines; + + const std::sregex_iterator it(data_blob.cbegin(), data_blob.cend(), DATA_LINE_REGEX); + const std::sregex_iterator end; + for (std::sregex_iterator i = it; i != end; ++i) + { + const std::smatch match = *i; + data_lines.push_back(match[1].str()); + } + + return data_lines; + } + static fs::path fetch_dependency(const fs::path& scripts_folder, const std::string& tool_name, const fs::path& expected_downloaded_path, @@ -91,7 +108,11 @@ namespace vcpkg Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); } - const fs::path actual_downloaded_path = Strings::trim(std::string{rc.output}); + const std::vector dependency_path = keep_data_lines(rc.output); + Checks::check_exit( + VCPKG_LINE_INFO, dependency_path.size() == 1, "Expected dependency path, but got %s", rc.output); + + const fs::path actual_downloaded_path = Strings::trim(std::string{dependency_path.at(0)}); std::error_code ec; const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); Checks::check_exit(VCPKG_LINE_INFO, @@ -320,23 +341,6 @@ namespace vcpkg std::string major_version() const { return version.substr(0, 2); } }; - static std::vector keep_data_lines(const std::string& data_blob) - { - static const std::regex DATA_LINE_REGEX(R"(::(.+?)(?=::))"); - - std::vector data_lines; - - const std::sregex_iterator it(data_blob.cbegin(), data_blob.cend(), DATA_LINE_REGEX); - const std::sregex_iterator end; - for (std::sregex_iterator i = it; i != end; ++i) - { - const std::smatch match = *i; - data_lines.push_back(match[1].str()); - } - - return data_lines; - } - static std::vector get_visual_studio_instances(const VcpkgPaths& paths) { const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; -- cgit v1.2.3 From a5b54588eca1d57366f7052ee9ab30da4ba68066 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 31 Oct 2017 17:30:29 -0700 Subject: [git] Update to 2.15.0 (was 2.14.3) --- scripts/bootstrap.ps1 | 2 +- scripts/fetchDependency.ps1 | 14 +++++++------- toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 4488d9b95..f44a7dea1 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -13,7 +13,7 @@ $gitHash = "unknownhash" $oldpath = $env:path try { - $env:path += ";$vcpkgRootDir\downloads\MinGit-2.14.3-32-bit\cmd" + $env:path += ";$vcpkgRootDir\downloads\MinGit-2.15.0-32-bit\cmd" if (Get-Command "git" -ErrorAction SilentlyContinue) { $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index aec05457a..4ef3a1f17 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -180,16 +180,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "git") { - $requiredVersion = "2.14.3" - $downloadVersion = "2.14.3" - $url = "https://github.com/git-for-windows/git/releases/download/v2.14.3.windows.1/MinGit-2.14.3-32-bit.zip" - $downloadPath = "$downloadsDir\MinGit-2.14.3-32-bit.zip" - $expectedDownloadedFileHash = "a91385acb1da220612790807c41d0f304b41093c474b9d7342230ec194a3398e" + $requiredVersion = "2.15.0" + $downloadVersion = "2.15.0" + $url = "https://github.com/git-for-windows/git/releases/download/v2.15.0.windows.1/MinGit-2.15.0-32-bit.zip" + $downloadPath = "$downloadsDir\MinGit-2.15.0-32-bit.zip" + $expectedDownloadedFileHash = "69c035ab7b75c42ce5dd99e8927d2624ab618fab73c5ad84c9412bd74c343537" # There is another copy of git.exe in MinGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. - $executableFromDownload = "$downloadsDir\MinGit-2.14.3-32-bit\cmd\git.exe" + $executableFromDownload = "$downloadsDir\MinGit-2.15.0-32-bit\cmd\git.exe" $extractionType = $ExtractionType_ZIP - $extractionFolder = "$downloadsDir\MinGit-2.14.3-32-bit" + $extractionFolder = "$downloadsDir\MinGit-2.15.0-32-bit" } elseif($Dependency -eq "installerbase") { diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 40f52af73..5e43ee4c7 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -171,10 +171,10 @@ namespace vcpkg fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {2, 14, 3}; + static constexpr std::array EXPECTED_VERSION = {2, 15, 0}; static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const fs::path downloaded_copy = downloads_folder / "MinGit-2.14.3-32-bit" / "cmd" / "git.exe"; + const fs::path downloaded_copy = downloads_folder / "MinGit-2.15.0-32-bit" / "cmd" / "git.exe"; const std::vector from_path = Files::find_from_PATH("git"); std::vector candidate_paths; -- cgit v1.2.3 From 516c42bdc4a5443e0f78fae559c187823e6326d1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 31 Oct 2017 23:41:24 -0700 Subject: [bootstrap-vcpkg] Added better diagnostics in case of MSBuild failure. --- scripts/bootstrap.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index f44a7dea1..b14dbbe4a 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -32,7 +32,8 @@ $vcpkgSourcesPath = "$vcpkgRootDir\toolsrc" if (!(Test-Path $vcpkgSourcesPath)) { - New-Item -ItemType directory -Path $vcpkgSourcesPath -force | Out-Null + Write-Error "Unable to determine vcpkg sources directory. '$vcpkgSourcesPath' does not exist." + return } try @@ -43,6 +44,11 @@ try $platformToolset = $msbuildExeWithPlatformToolset[1] $windowsSDK = & $scriptsDir\getWindowsSDK.ps1 & $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /p:TargetPlatformVersion=$windowsSDK /m dirs.proj + if ($LASTEXITCODE -ne 0) + { + Write-Error "Building vcpkg.exe failed. Please ensure you have installed the Desktop C++ workload and the Windows SDK for Desktop C++." + return + } Write-Verbose("Placing vcpkg.exe in the correct location") -- cgit v1.2.3 From 4ff90ec4309df1d5937d62c52683e1147066445a Mon Sep 17 00:00:00 2001 From: James Chang Date: Wed, 1 Nov 2017 16:27:12 +0800 Subject: [poco] build with MySQL support (#2088) * [poco] build with MySQL support Set proper variables to enable MySQL support if libmysql port is installed * [poco] Move Mysql support to a feature. Enable CMake config files. --- ports/poco/CONTROL | 6 +++++- ports/poco/portfile.cmake | 19 +++++++++++++------ scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 3 +++ 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index 2c78b6c6e..4eb60a07d 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,4 +1,8 @@ Source: poco -Version: 1.7.8-1 +Version: 1.7.8-2 Build-Depends: zlib, pcre, sqlite3, expat Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. + +Feature: mysql +Build-Depends: libmysql +Description: Mysql support for POCO diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 3ef0af921..315eaf2e5 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -16,10 +16,13 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/foundation-public-include-pcre.patch ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(POCO_STATIC ON) -else() - set(POCO_STATIC OFF) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" POCO_STATIC) + +if("mysql" IN_LIST FEATURES) + # enabling MySQL support + set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql") + set(MYSQL_LIB "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib") + set(MYSQL_LIB_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib") endif() vcpkg_configure_cmake( @@ -30,6 +33,11 @@ vcpkg_configure_cmake( -DENABLE_SEVENZIP=ON -DENABLE_TESTS=OFF -DPOCO_UNBUNDLED=ON # OFF means: using internal copy of sqlite, libz, pcre, expat, ... + -DMYSQL_INCLUDE_DIR=${MYSQL_INCLUDE_DIR} + OPTIONS_RELEASE + -DMYSQL_LIB=${MYSQL_LIB} + OPTIONS_DEBUG + -DMYSQL_LIB=${MYSQL_LIB_DEBUG} ) vcpkg_install_cmake() @@ -53,8 +61,7 @@ else() endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/poco) # copy license file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/poco) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 069672b71..ca228b2a4 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -116,6 +116,9 @@ function(vcpkg_fixup_cmake_targets) "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" _contents "${_contents}") + string(REPLACE "${CURRENT_INSTALLED_DIR}" "_INVALID_ROOT_" _contents "${_contents}") + string(REGEX REPLACE ";_INVALID_ROOT_/[^\";]*" "" _contents "${_contents}") + string(REGEX REPLACE "_INVALID_ROOT_/[^\";]*;" "" _contents "${_contents}") file(WRITE ${MAIN_TARGET} "${_contents}") endforeach() -- cgit v1.2.3 From e663b69a1d7ebd2135d51af8176fc0eddd5f5481 Mon Sep 17 00:00:00 2001 From: Jim McGrath Date: Tue, 31 Oct 2017 10:50:23 -0500 Subject: help assimp find vcpkg's copy of zlib so it does not build its own --- ports/assimp/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 0642fb701..660c9d40e 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -20,6 +20,7 @@ vcpkg_configure_cmake( -DASSIMP_BUILD_ZLIB=False -DASSIMP_BUILD_ASSIMP_TOOLS=False -DASSIMP_INSTALL_PDB=False + -DZLIB_HOME=${CURRENT_INSTALLED_DIR} ) vcpkg_install_cmake() -- cgit v1.2.3 From 7435624eece6ff3e58a8c3fa6f0dc563317c7bf3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 1 Nov 2017 01:47:53 -0700 Subject: [assimp] Bump revision --- ports/assimp/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index 170d727a8..bae5c7fb2 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 4.0.1 +Version: 4.0.1-1 Description: The Open Asset import library Build-Depends: zlib -- cgit v1.2.3 From 0a4b09d9c57954b3a55d893134cde1ab7eafcbdb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 01:54:16 -0700 Subject: [assimp] Fix assimp overwriting CMAKE_PREFIX_PATH. --- ports/assimp/CONTROL | 2 +- ports/assimp/dont-overwrite-prefix-path.patch | 12 ++++++++++++ ports/assimp/portfile.cmake | 19 ++++++++++--------- 3 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 ports/assimp/dont-overwrite-prefix-path.patch diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index bae5c7fb2..9666a06b3 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 4.0.1-1 +Version: 4.0.1-2 Description: The Open Asset import library Build-Depends: zlib diff --git a/ports/assimp/dont-overwrite-prefix-path.patch b/ports/assimp/dont-overwrite-prefix-path.patch new file mode 100644 index 000000000..fc58a99c5 --- /dev/null +++ b/ports/assimp/dont-overwrite-prefix-path.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d781d1f..0d64d50 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -92,7 +92,6 @@ if (WIN32) + endif() + + IF(MSVC) +- set (CMAKE_PREFIX_PATH "D:\\libs\\devil") + OPTION( ASSIMP_INSTALL_PDB + "Install MSVC debug files." + ON diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 660c9d40e..496300240 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -10,17 +10,20 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/const-compare-worditerator.patch + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/const-compare-worditerator.patch" + "${CMAKE_CURRENT_LIST_DIR}/dont-overwrite-prefix-path.patch" ) +file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DASSIMP_BUILD_TESTS=False - -DASSIMP_BUILD_ASSIMP_VIEW=False - -DASSIMP_BUILD_ZLIB=False - -DASSIMP_BUILD_ASSIMP_TOOLS=False - -DASSIMP_INSTALL_PDB=False - -DZLIB_HOME=${CURRENT_INSTALLED_DIR} + OPTIONS -DASSIMP_BUILD_TESTS=OFF + -DASSIMP_BUILD_ASSIMP_VIEW=OFF + -DASSIMP_BUILD_ZLIB=OFF + -DASSIMP_BUILD_ASSIMP_TOOLS=OFF + -DASSIMP_INSTALL_PDB=OFF ) vcpkg_install_cmake() @@ -30,8 +33,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/assimp-4.0") vcpkg_copy_pdbs() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/assimp-config.cmake ASSIMP_CONFIG) -- cgit v1.2.3 From ec4eec1f714d6bc64c4c3b2534e34b86249c873a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 05:04:44 -0700 Subject: [boost] Handle spaces in vcpkg path. --- ports/boost/desktop/user-config.jam | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/ports/boost/desktop/user-config.jam b/ports/boost/desktop/user-config.jam index 83206c098..311cc8951 100644 --- a/ports/boost/desktop/user-config.jam +++ b/ports/boost/desktop/user-config.jam @@ -6,33 +6,33 @@ using msvc : 14.1 : cl.exe : echo ; -using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_RELEASE@ ; -using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_DEBUG@ : on ; +using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_RELEASE@" ; +using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_DEBUG@" : on ; project user-config ; lib advapi32 ; -lib icuuc : : @CURRENT_INSTALLED_DIR@/lib : : - @LIB_RUNTIME_LINK@ +lib icuuc : : "@CURRENT_INSTALLED_DIR@/lib" : : + "@LIB_RUNTIME_LINK@" advapi32 ; - -lib icuuc : : @CURRENT_INSTALLED_DIR@/debug/lib + +lib icuuc : : "@CURRENT_INSTALLED_DIR@/debug/lib" debug icuucd : : - @LIB_RUNTIME_LINK@ + "@LIB_RUNTIME_LINK@" advapi32 ; - -lib icuin : : @CURRENT_INSTALLED_DIR@/lib : : - @LIB_RUNTIME_LINK@ ; - -lib icuin : : @CURRENT_INSTALLED_DIR@/debug/lib + +lib icuin : : "@CURRENT_INSTALLED_DIR@/lib" : : + "@LIB_RUNTIME_LINK@" ; + +lib icuin : : "@CURRENT_INSTALLED_DIR@/debug/lib" debug icuind : : - @LIB_RUNTIME_LINK@ ; - -lib icudt : : @CURRENT_INSTALLED_DIR@/lib : : - @LIB_RUNTIME_LINK@ ; - -lib icudt : : @CURRENT_INSTALLED_DIR@/debug/lib + "@LIB_RUNTIME_LINK@" ; + +lib icudt : : "@CURRENT_INSTALLED_DIR@/lib" : : + "@LIB_RUNTIME_LINK@" ; + +lib icudt : : "@CURRENT_INSTALLED_DIR@/debug/lib" debug - icudtd : : - @LIB_RUNTIME_LINK@ ; \ No newline at end of file + icudtd : : + "@LIB_RUNTIME_LINK@" ; \ No newline at end of file -- cgit v1.2.3 From 47090e68b8deeb5a38b638934b59fe3ddef0fa9f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 06:03:10 -0700 Subject: [vcpkg] Fix use of features in undocumented build command --- toolsrc/src/vcpkg/build.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 30a6a791c..c59b6f7d1 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -52,22 +52,20 @@ namespace vcpkg::Build::Command Checks::exit_fail(VCPKG_LINE_INFO); } - for (const std::string& str : full_spec.features) - { - System::println("%s \n", str); - } const auto& scf = source_control_file.value_or_exit(VCPKG_LINE_INFO); Checks::check_exit(VCPKG_LINE_INFO, spec.name() == scf->core_paragraph->name, - "The Name: field inside the CONTROL does not match the port directory: '%s' != '%s'", + "The Source field inside the CONTROL file does not match the port directory: '%s' != '%s'", 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}; + const std::unordered_set features_as_set(full_spec.features.begin(), full_spec.features.end()); + const Build::BuildPackageConfig build_config{ - *scf->core_paragraph, spec.triplet(), paths.port_dir(spec), build_package_options}; + *scf, spec.triplet(), fs::path{port_dir}, build_package_options, features_as_set}; const auto build_timer = Chrono::ElapsedTime::create_started(); const auto result = Build::build_package(paths, build_config, status_db); @@ -107,6 +105,11 @@ namespace vcpkg::Build::Command const std::string command_argument = args.command_arguments.at(0); const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, EXAMPLE); Input::check_triplet(spec.package_spec.triplet(), paths); + if (!spec.features.empty() && !GlobalState::feature_packages) + { + Checks::exit_with_message( + VCPKG_LINE_INFO, "Feature packages are experimentally available under the --featurepackages flag."); + } const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}, {}); perform_and_exit(spec, paths.port_dir(spec.package_spec), options, paths); } -- cgit v1.2.3 From 13e2621d02fa8405582ab74b8e1cbc7eaf809a5a Mon Sep 17 00:00:00 2001 From: Steve Jemens Date: Wed, 1 Nov 2017 12:03:33 +0200 Subject: Update to v1.2.0. Remove man pages --- ports/xlnt/CONTROL | 2 +- ports/xlnt/portfile.cmake | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ports/xlnt/CONTROL b/ports/xlnt/CONTROL index 907b66b16..25b4ce010 100644 --- a/ports/xlnt/CONTROL +++ b/ports/xlnt/CONTROL @@ -1,3 +1,3 @@ Source: xlnt -Version: 1.1.0-1 +Version: 1.2.0-1 Description: Cross-platform user-friendly xlsx library for C++14 diff --git a/ports/xlnt/portfile.cmake b/ports/xlnt/portfile.cmake index e514cf8eb..f0cb9425d 100644 --- a/ports/xlnt/portfile.cmake +++ b/ports/xlnt/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(XLNT_VERSION 1.1.0) -set(XLNT_HASH f0c59a2b241c6b219fbd8bb39705847e2b31332e413bc4aff7e0a8d4d4b9ef6750c03ecc49a196f647fdf60c3bec9f06c800bdb53b56648d2ba9fab359623f95) +set(XLNT_VERSION 1.2.0) +set(XLNT_HASH 359ff1e99531513d7b1228ff07f137531be99d7a95bbc5b399168a6c609f56dba2e030464f8203db92db137ab80dbe10f71de71a62b0bcb96eaafc0f09256339) set(XLNT_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xlnt-${XLNT_VERSION}) vcpkg_download_distfile(ARCHIVE @@ -26,6 +26,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) file(INSTALL ${XLNT_SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright) vcpkg_copy_pdbs() -- cgit v1.2.3 From 5bfb7dd74cda07046372e8d5f1778ad9f34e1fd8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 07:08:10 -0700 Subject: [opencv] Remove ffmpeg from dependencies -- it is not currently possible to use an external ffmpeg with opencv. Add features for cuda and vtk. --- ports/opencv/CONTROL | 18 ++++++++++++++++-- ports/opencv/portfile.cmake | 41 +++++++++++++++++++++++++++++++---------- 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 6e0afd6c0..d6718f080 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,19 @@ Source: opencv -Version: 3.3.1-2 -# Optional: Add in vtk to build with VTK and cuda to build with CUDA +Version: 3.3.1-3 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library + +Feature: ffmpeg +Description: prebuilt ffmpeg support for opencv + +Feature: vtk +Build-Depends: vtk +Description: vtk support for opencv + +Feature: cuda +Build-Depends: cuda +Description: CUDA support for opencv + +Feature: sfm +Build-Depends: eigen3, glog, gflags +Description: opencv_sfm module diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index be542e912..f3da28948 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -32,6 +32,26 @@ vcpkg_apply_patches( string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) +set(WITH_FFMPEG OFF) +if("ffmpeg" IN_LIST FEATURES) + set(WITH_FFMPEG ON) +endif() + +set(WITH_CUDA OFF) +if("cuda" IN_LIST FEATURES) + set(WITH_CUDA ON) +endif() + +set(WITH_VTK OFF) +if("vtk" IN_LIST FEATURES) + set(WITH_VTK ON) +endif() + +set(BUILD_opencv_sfm OFF) +if("sfm" IN_LIST FEATURES) + set(BUILD_opencv_sfm ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -42,10 +62,6 @@ vcpkg_configure_cmake( -DBUILD_JPEG=OFF -DBUILD_PNG=OFF -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON - -DBUILD_opencv_python2=OFF - -DBUILD_opencv_python3=OFF - -DBUILD_opencv_flann=ON - -DBUILD_opencv_apps=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DENABLE_PYLINT=OFF @@ -54,23 +70,28 @@ vcpkg_configure_cmake( -DBUILD_TESTS=OFF -DBUILD_WITH_DEBUG_INFO=ON -DOpenCV_DISABLE_ARCH_PATH=ON - -DWITH_FFMPEG=ON -DINSTALL_FORCE_UNIX_PATHS=ON -DOPENCV_CONFIG_INSTALL_PATH=share/opencv -DOPENCV_OTHER_INSTALL_PATH=share/opencv -DINSTALL_LICENSE=OFF - # Optional: change to ON to build with CUDA - -DWITH_CUDA=OFF -DWITH_CUBLAS=OFF -DWITH_OPENCLAMDBLAS=OFF -DWITH_LAPACK=OFF - -DBUILD_opencv_dnn=ON -DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules -DBUILD_PROTOBUF=OFF -DUPDATE_PROTO_FILES=ON -DPROTOBUF_UPDATE_FILES=ON - # Optional: change to ON to build with VTK - -DWITH_VTK=OFF + + -DBUILD_opencv_dnn=ON + -DBUILD_opencv_python2=OFF + -DBUILD_opencv_python3=OFF + -DBUILD_opencv_flann=ON + -DBUILD_opencv_apps=OFF + -DBUILD_opencv_sfm=${BUILD_opencv_sfm} + + -DWITH_FFMPEG=${WITH_FFMPEG} + -DWITH_CUDA=${WITH_CUDA} + -DWITH_VTK=${WITH_VTK} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -DINSTALL_OTHER=OFF -- cgit v1.2.3 From 51661ed675177530a4ab27756fedb20a22c71358 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 2 Nov 2017 01:03:34 +0900 Subject: Enable OpenGL support for GUI Enable OpenGL support for GUI. --- ports/opencv/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index f3da28948..470cac005 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -91,6 +91,7 @@ vcpkg_configure_cmake( -DWITH_FFMPEG=${WITH_FFMPEG} -DWITH_CUDA=${WITH_CUDA} + -DWITH_OPENGL=ON -DWITH_VTK=${WITH_VTK} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -- cgit v1.2.3 From 2b60cb12c9dec496c96a725b4ce3e0fcf9a956d8 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Wed, 1 Nov 2017 21:04:18 +0300 Subject: [protobuf] Add feature packages for zlib ZLib based features like Gzip streams. --- ports/protobuf/CONTROL | 7 +++++-- ports/protobuf/portfile.cmake | 8 +++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index b9d8b5b9e..88904f315 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,4 +1,7 @@ Source: protobuf -Version: 3.4.1-1 -Build-Depends: zlib +Version: 3.4.1-2 Description: Protocol Buffers - Google's data interchange format + +Feature: zlib +Description: ZLib based features like Gzip streams +Build-Depends: zlib diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index e7f45c36c..3a5ac2c17 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -47,12 +47,18 @@ else() set(protobuf_MSVC_STATIC_RUNTIME OFF) endif() +if("zlib" IN_LIST FEATURES) + set(protobuf_WITH_ZLIB ON) +else() + set(protobuf_WITH_ZLIB OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/cmake OPTIONS -Dprotobuf_BUILD_SHARED_LIBS=${protobuf_BUILD_SHARED_LIBS} -Dprotobuf_MSVC_STATIC_RUNTIME=${protobuf_MSVC_STATIC_RUNTIME} - -Dprotobuf_WITH_ZLIB=ON + -Dprotobuf_WITH_ZLIB=${protobuf_WITH_ZLIB} -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_COMPILER=${protobuf_BUILD_COMPILER} -DCMAKE_INSTALL_CMAKEDIR=share/protobuf -- cgit v1.2.3 From 2de9c9bea335b4b57ce29e2b02715d70bf25d445 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Oct 2017 05:26:47 -0700 Subject: [llvm] Require Python3 --- ports/llvm/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index b1f546f4f..55a23f802 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -16,6 +16,10 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-cmake-modules-to-share.patch ) +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA -- cgit v1.2.3 From b54f4f26ae6c2b0944590d0de5c7fbf0d9ed38d7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 11:41:51 -0700 Subject: [blaze] Fix remaining stray _INVALID_ROOT_ --- ports/blaze/CONTROL | 2 +- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/blaze/CONTROL b/ports/blaze/CONTROL index 5161b924f..3355159f4 100644 --- a/ports/blaze/CONTROL +++ b/ports/blaze/CONTROL @@ -1,4 +1,4 @@ Source: blaze -Version: 3.2-1 +Version: 3.2-2 Build-Depends: boost, clapack Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic. diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index ca228b2a4..22c2245c8 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -119,6 +119,7 @@ function(vcpkg_fixup_cmake_targets) string(REPLACE "${CURRENT_INSTALLED_DIR}" "_INVALID_ROOT_" _contents "${_contents}") string(REGEX REPLACE ";_INVALID_ROOT_/[^\";]*" "" _contents "${_contents}") string(REGEX REPLACE "_INVALID_ROOT_/[^\";]*;" "" _contents "${_contents}") + string(REGEX REPLACE "\"_INVALID_ROOT_/[^\";]*\"" "\"\"" _contents "${_contents}") file(WRITE ${MAIN_TARGET} "${_contents}") endforeach() -- cgit v1.2.3 From 5a9662c2bedae2e67b528aec616b2644c07051b1 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 2 Nov 2017 01:07:26 +0900 Subject: Add option to enable Qt GUI support Add option to enable Qt GUI support. --- ports/opencv/CONTROL | 4 ++++ ports/opencv/portfile.cmake | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index d6718f080..dbe13b238 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -14,6 +14,10 @@ Feature: cuda Build-Depends: cuda Description: CUDA support for opencv +Feature: qt +Build-Depends: qt5 +Description: Qt GUI support for opencv + Feature: sfm Build-Depends: eigen3, glog, gflags Description: opencv_sfm module diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 470cac005..64f644c35 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -42,6 +42,11 @@ if("cuda" IN_LIST FEATURES) set(WITH_CUDA ON) endif() +set(WITH_QT OFF) +if("qt" IN_LIST FEATURES) + set(WITH_QT ON) +endif() + set(WITH_VTK OFF) if("vtk" IN_LIST FEATURES) set(WITH_VTK ON) @@ -92,6 +97,7 @@ vcpkg_configure_cmake( -DWITH_FFMPEG=${WITH_FFMPEG} -DWITH_CUDA=${WITH_CUDA} -DWITH_OPENGL=ON + -DWITH_QT=${WITH_QT} -DWITH_VTK=${WITH_VTK} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -- cgit v1.2.3 From 726ed9738d3731f77b0b180ae02645908ea1f3dc Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 2 Nov 2017 01:30:07 +0900 Subject: Sorting CMake options for maintainability Sorting CMake options based on grouped of CMake-GUI for maintainability. --- ports/opencv/CONTROL | 20 ++++++------- ports/opencv/portfile.cmake | 71 ++++++++++++++++++++++++--------------------- 2 files changed, 48 insertions(+), 43 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index dbe13b238..f442e0cca 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,23 +1,23 @@ Source: opencv -Version: 3.3.1-3 +Version: 3.3.1-4 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library -Feature: ffmpeg -Description: prebuilt ffmpeg support for opencv - -Feature: vtk -Build-Depends: vtk -Description: vtk support for opencv +Feature: sfm +Build-Depends: eigen3, glog, gflags +Description: opencv_sfm module Feature: cuda Build-Depends: cuda Description: CUDA support for opencv +Feature: ffmpeg +Description: prebuilt ffmpeg support for opencv + Feature: qt Build-Depends: qt5 Description: Qt GUI support for opencv -Feature: sfm -Build-Depends: eigen3, glog, gflags -Description: opencv_sfm module +Feature: vtk +Build-Depends: vtk +Description: vtk support for opencv diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 64f644c35..d712ce65e 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -32,9 +32,9 @@ vcpkg_apply_patches( string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) -set(WITH_FFMPEG OFF) -if("ffmpeg" IN_LIST FEATURES) - set(WITH_FFMPEG ON) +set(BUILD_opencv_sfm OFF) +if("sfm" IN_LIST FEATURES) + set(BUILD_opencv_sfm ON) endif() set(WITH_CUDA OFF) @@ -42,6 +42,11 @@ if("cuda" IN_LIST FEATURES) set(WITH_CUDA ON) endif() +set(WITH_FFMPEG OFF) +if("ffmpeg" IN_LIST FEATURES) + set(WITH_FFMPEG ON) +endif() + set(WITH_QT OFF) if("qt" IN_LIST FEATURES) set(WITH_QT ON) @@ -52,50 +57,50 @@ if("vtk" IN_LIST FEATURES) set(WITH_VTK ON) endif() -set(BUILD_opencv_sfm OFF) -if("sfm" IN_LIST FEATURES) - set(BUILD_opencv_sfm ON) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - "-DOPENCV_DOWNLOAD_PATH=${DOWNLOADS}/opencv-cache" - -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT} - -DBUILD_ZLIB=OFF - -DBUILD_TIFF=OFF - -DBUILD_JPEG=OFF - -DBUILD_PNG=OFF - -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON + # Ungrouped Entries + -DOpenCV_DISABLE_ARCH_PATH=ON + -DPROTOBUF_UPDATE_FILES=ON + -DUPDATE_PROTO_FILES=ON + # BUILD -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF - -DENABLE_PYLINT=OFF + -DBUILD_JPEG=OFF -DBUILD_PACKAGE=OFF -DBUILD_PERF_TESTS=OFF + -DBUILD_PNG=OFF + -DBUILD_PROTOBUF=OFF -DBUILD_TESTS=OFF + -DBUILD_TIFF=OFF -DBUILD_WITH_DEBUG_INFO=ON - -DOpenCV_DISABLE_ARCH_PATH=ON - -DINSTALL_FORCE_UNIX_PATHS=ON - -DOPENCV_CONFIG_INSTALL_PATH=share/opencv - -DOPENCV_OTHER_INSTALL_PATH=share/opencv - -DINSTALL_LICENSE=OFF - -DWITH_CUBLAS=OFF - -DWITH_OPENCLAMDBLAS=OFF - -DWITH_LAPACK=OFF - -DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules - -DBUILD_PROTOBUF=OFF - -DUPDATE_PROTO_FILES=ON - -DPROTOBUF_UPDATE_FILES=ON - + -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT} + -DBUILD_ZLIB=OFF + -DBUILD_opencv_apps=OFF -DBUILD_opencv_dnn=ON + -DBUILD_opencv_flann=ON -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF - -DBUILD_opencv_flann=ON - -DBUILD_opencv_apps=OFF -DBUILD_opencv_sfm=${BUILD_opencv_sfm} - - -DWITH_FFMPEG=${WITH_FFMPEG} + # CMAKE + -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON + # ENABLE + -DENABLE_PYLINT=OFF + # INSTALL + -DINSTALL_FORCE_UNIX_PATHS=ON + -DINSTALL_LICENSE=OFF + # OPENCV + -DOPENCV_CONFIG_INSTALL_PATH=share/opencv + "-DOPENCV_DOWNLOAD_PATH=${DOWNLOADS}/opencv-cache" + -DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules + -DOPENCV_OTHER_INSTALL_PATH=share/opencv + # WITH + -DWITH_CUBLAS=OFF -DWITH_CUDA=${WITH_CUDA} + -DWITH_FFMPEG=${WITH_FFMPEG} + -DWITH_LAPACK=OFF + -DWITH_OPENCLAMDBLAS=OFF -DWITH_OPENGL=ON -DWITH_QT=${WITH_QT} -DWITH_VTK=${WITH_VTK} -- cgit v1.2.3 From 7ac8622265cf1154daac61ed4165365701e9e848 Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 1 Nov 2017 15:20:00 -0500 Subject: VTK: implement features (#2071) * [vtk/portfile] add OpenVR option * [vtk/control] add OpenVR feature * [vtk/portfile] Add OpenVR feature to portfile * [vtk/CONTROL] add features * [vtk/portfile] implement features * [vtk/CONTROL] fix syntax * [vtk/CONTROL] fix case * [vtk/portfile] fix case * [vtk/CONTROL] fix syntax * [vtk/CONTROL] fix syntax * [vtk/portfile] fix module name * [vtk] Bump version --- ports/vtk/CONTROL | 20 ++++++++++++++++++-- ports/vtk/portfile.cmake | 34 ++++++++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 1c9095d34..d30e61506 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,20 @@ Source: vtk -Version: 8.0.1 +Version: 8.0.1-1 Description: Software system for 3D computer graphics, image processing, and visualization -Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj4, lz4, libtheora, libharu +Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora, libharu + +Feature: openvr +Description: OpenVR functionality for VTK +Build-Depends: sdl2, openvr + +Feature: qt +Description: Qt functionality for VTK +Build-Depends: qt5 + +Feature: mpi +Description: MPI functionality for VTK +Build-Depends: msmpi + +Feature: python +Description: Python functionality for VTK +Build-Depends: python3 diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 463ce6981..0a407e9ae 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -13,12 +13,32 @@ vcpkg_from_github( # ============================================================================= # Options: These should be set by feature-packages when they become available -set(VTK_WITH_QT ON ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file -set(VTK_WITH_MPI ON ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file -set(VTK_WITH_PYTHON OFF) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file + +if ("qt" IN_LIST FEATURES) + set(VTK_WITH_QT ON ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file +else() + set(VTK_WITH_QT OFF ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file +endif() + +if ("mpi" IN_LIST FEATURES) + set(VTK_WITH_MPI ON ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file +else() + set(VTK_WITH_MPI OFF ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file +endif() + +if ("python" IN_LIST FEATURES) + set(VTK_WITH_PYTHON ON) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file +else() + set(VTK_WITH_PYTHON OFF) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file +endif() +if("openvr" IN_LIST FEATURES) + set(VTK_WITH_OPENVR ON) # IMPORTANT: if ON make sure `OpenVR` is listed as dependency in the CONTROL file +else() + set(VTK_WITH_OPENVR OFF) +endif() + set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5`, `mpi`, `python3`, `ffmpeg`, `gdal`, `fontconfig`, # `libmysql` and `atlmfc` are listed as dependency in the CONTROL file - # ============================================================================= # Apply patches to the source code vcpkg_apply_patches( @@ -78,6 +98,12 @@ if(VTK_WITH_PYTHON) ) endif() +if(VTK_WITH_OPENVR) + list(APPEND ADDITIONAL_OPTIONS + -DModule_vtkRenderingOpenVR=ON + ) +endif() + if(VTK_WITH_ALL_MODULES) list(APPEND ADDITIONAL_OPTIONS -DVTK_BUILD_ALL_MODULES=ON -- cgit v1.2.3 From fec804f2361284bed911bfc373207c4d28fcaaf1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 13:24:54 -0700 Subject: [uwebsockets] Remove boost from dependency list to follow upstream's official README --- ports/uwebsockets/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index 3e202f42b..13aa16cc5 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets Version: 0.14.4-1 -Build-Depends: libuv, openssl, zlib, boost +Build-Depends: libuv, openssl, zlib Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js -- cgit v1.2.3 From 807a39c07888ac33ba3fc351c592b78307310e79 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Nov 2017 14:47:34 -0700 Subject: [libharu] Fix DLLIMPORT macro replacement --- ports/libharu/CONTROL | 2 +- ports/libharu/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/libharu/CONTROL b/ports/libharu/CONTROL index 5919acef0..623628ab8 100644 --- a/ports/libharu/CONTROL +++ b/ports/libharu/CONTROL @@ -1,4 +1,4 @@ Source: libharu -Version: 2017-08-15-d84867ebf9f-3 +Version: 2017-08-15-d84867ebf9f-4 Description: libharu - free PDF library Build-Depends: zlib, libpng diff --git a/ports/libharu/portfile.cmake b/ports/libharu/portfile.cmake index 7896d7659..c8e9250b9 100644 --- a/ports/libharu/portfile.cmake +++ b/ports/libharu/portfile.cmake @@ -37,17 +37,17 @@ file(REMOVE_RECURSE file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf.h" _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - string(REPLACE "#ifdef HPDF_DLL" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HPDF_DLL\n" "#if 1\n" _contents "${_contents}") else() - string(REPLACE "#ifdef HPDF_DLL" "#if 0" _contents "${_contents}") + string(REPLACE "#ifdef HPDF_DLL\n" "#if 0\n" _contents "${_contents}") endif() file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf.h" "${_contents}") file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - string(REPLACE "#ifdef HPDF_DLL" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HPDF_DLL\n" "#if 1\n" _contents "${_contents}") else() - string(REPLACE "#ifdef HPDF_DLL" "#if 0" _contents "${_contents}") + string(REPLACE "#ifdef HPDF_DLL\n" "#if 0\n" _contents "${_contents}") endif() file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" "${_contents}") -- cgit v1.2.3 From 2e48ccb8a4db43f63dc25748732b529a9972bbfc Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 1 Nov 2017 15:28:51 -0700 Subject: Update CHANGELOG and bump version to v0.0.95 --- CHANGELOG.md | 23 +++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25c0688b6..88d1cb726 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ +vcpkg (0.0.95) +-------------- + * Update ports: + - assimp 4.0.1 -> 4.0.1-2 + - blaze 3.2-1 -> 3.2-2 + - boost 1.65.1-2 -> 1.65.1-3 + - catch 1.10.0 -> 1.11.0 + - libharu 2017-08-15-d84867ebf9f-2 -> 2017-08-15-d84867ebf9f-4 + - libsndfile libsndfile-1.0.29-6830c42-1 -> 1.0.29-6830c42-1 + - opencv 3.3.1 -> 3.3.1-4 + - pcl 1.8.1-2 -> 1.8.1-3 + - poco 1.7.8-1 -> 1.7.8-2 + - signalrclient 1.0.0-beta1-1 -> 1.0.0-beta1-2 + - vtk 8.0.0-3 -> 8.0.1-1 + - xlnt 1.1.0-1 -> 1.2.0-1 + * Various improvements in `vcpkg` when obtaining data from `PowerShell` scripts. It should now be more robust + * Fix Windows 7 (i.e. `PowerShell 2.0`) issues in `PowerShell` scripts + * Fix an issue with `feature packages` where an installed package would appear to be uninstalled if a feature of the package was installed and then uninstalled + * Bump required version & auto-downloaded version of `git` to 2.5.0 + +-- vcpkg team FRI, 27 Oct 2017 19:30:00 -0800 + + vcpkg (0.0.94) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index ac2866fef..e5fce74a7 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.94" \ No newline at end of file +"0.0.95" \ No newline at end of file -- cgit v1.2.3 From 305a9ae7f2b5754f1afa62670f8f53ab10e5c06c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 1 Nov 2017 15:34:02 -0700 Subject: Fix date in CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88d1cb726..b2f3c720f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ vcpkg (0.0.95) * Fix an issue with `feature packages` where an installed package would appear to be uninstalled if a feature of the package was installed and then uninstalled * Bump required version & auto-downloaded version of `git` to 2.5.0 --- vcpkg team FRI, 27 Oct 2017 19:30:00 -0800 +-- vcpkg team WED, 01 Nov 2017 15:30:00 -0800 vcpkg (0.0.94) -- cgit v1.2.3 From fae64c544e86bfe327404b341b50d9e01dedea68 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 1 Nov 2017 16:35:07 -0700 Subject: [apr] Update to 1.6.3 --- ports/apr/CONTROL | 2 +- ports/apr/portfile.cmake | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ports/apr/CONTROL b/ports/apr/CONTROL index 94581eab0..1f771a0ed 100644 --- a/ports/apr/CONTROL +++ b/ports/apr/CONTROL @@ -1,3 +1,3 @@ Source: apr -Version: 1.6.2-1 +Version: 1.6.3 Description: The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems. diff --git a/ports/apr/portfile.cmake b/ports/apr/portfile.cmake index 414ca1dda..64ad02b81 100644 --- a/ports/apr/portfile.cmake +++ b/ports/apr/portfile.cmake @@ -7,11 +7,14 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-1.6.2) + +set(VERSION 1.6.3) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/apr-${VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "https://www.apache.org/dist/apr/apr-1.6.2.tar.bz2" - FILENAME "apr-1.6.2.tar.bz2" - SHA512 20f449fde522f186b919b64ce6f90073b267557e17438607d31af917eca7941222dd7a7379d66f1430ff68f7e28fbccd140d24f3ca7aae8a876a550b19de284a + URLS "https://www.apache.org/dist/apr/apr-${VERSION}.tar.bz2" + FILENAME "apr-${VERSION}.tar.bz2" + SHA512 f6b8679ae7fafff793c825c78775c84a646267c441710a50664589850e13148719b4eab48ab6e7c95b7aed085cff831115687434a7b160dcc2faa0eae63ac996 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 82db1b3a2a446514e3c39d6c44dcbabf2efd9568 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 2 Nov 2017 23:08:25 +0900 Subject: Enable C++11 features Enable C++11 features. --- ports/opencv/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index d712ce65e..48698a522 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -86,6 +86,7 @@ vcpkg_configure_cmake( # CMAKE -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON # ENABLE + -DENABLE_CXX11=ON -DENABLE_PYLINT=OFF # INSTALL -DINSTALL_FORCE_UNIX_PATHS=ON -- cgit v1.2.3 From ee2452f066e96b717c88471892872f3e8a09b2ad Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 2 Nov 2017 23:11:12 +0900 Subject: Enable Microsoft Media Foundation support for Video I/O Enable Microsoft Media Foundation support for Video I/O. --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index f442e0cca..c5896a516 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.1-4 +Version: 3.3.1-5 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 48698a522..8e68379fa 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -101,6 +101,7 @@ vcpkg_configure_cmake( -DWITH_CUDA=${WITH_CUDA} -DWITH_FFMPEG=${WITH_FFMPEG} -DWITH_LAPACK=OFF + -DWITH_MSMF=ON -DWITH_OPENCLAMDBLAS=OFF -DWITH_OPENGL=ON -DWITH_QT=${WITH_QT} -- cgit v1.2.3 From 38136a2d05435dc1ef4d9604b1336509a6d667f8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 2 Nov 2017 11:42:32 -0700 Subject: [double-conversion] Fix regression introduced in vcpkg_fixup_cmake_targets. --- ports/double-conversion/CONTROL | 2 +- ports/double-conversion/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/double-conversion/CONTROL b/ports/double-conversion/CONTROL index 8ef2de918..fb0afdb9a 100644 --- a/ports/double-conversion/CONTROL +++ b/ports/double-conversion/CONTROL @@ -1,3 +1,3 @@ Source: double-conversion -Version: 3.0.0-1 +Version: 3.0.0-2 Description: Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles. diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index cbb67bfb6..ee4881e88 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -44,6 +44,7 @@ if(NOT VCPKG_USE_HEAD_VERSION) file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake "${CONFIG_FILE}") vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) else() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion) endif() -- cgit v1.2.3 From 6a91d1ece10ce0aeda89c44611d5335a07b8e40d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 2 Nov 2017 15:20:42 -0700 Subject: [vcpkg] Refactor argument parsing to use common code paths. --- toolsrc/include/vcpkg/base/span.h | 12 +++ toolsrc/include/vcpkg/base/util.h | 2 +- toolsrc/include/vcpkg/build.h | 8 +- toolsrc/include/vcpkg/commands.h | 7 ++ toolsrc/include/vcpkg/vcpkgcmdarguments.h | 65 +++++++----- toolsrc/src/tests.arguments.cpp | 11 +- toolsrc/src/vcpkg/build.cpp | 29 ++++-- toolsrc/src/vcpkg/commands.autocomplete.cpp | 10 +- toolsrc/src/vcpkg/commands.buildexternal.cpp | 20 ++-- toolsrc/src/vcpkg/commands.cache.cpp | 16 ++- toolsrc/src/vcpkg/commands.ci.cpp | 20 +++- toolsrc/src/vcpkg/commands.contact.cpp | 12 ++- toolsrc/src/vcpkg/commands.cpp | 2 +- toolsrc/src/vcpkg/commands.create.cpp | 15 ++- toolsrc/src/vcpkg/commands.dependinfo.cpp | 12 ++- toolsrc/src/vcpkg/commands.edit.cpp | 18 ++-- toolsrc/src/vcpkg/commands.env.cpp | 12 ++- toolsrc/src/vcpkg/commands.hash.cpp | 15 ++- toolsrc/src/vcpkg/commands.import.cpp | 14 ++- toolsrc/src/vcpkg/commands.integrate.cpp | 13 +-- toolsrc/src/vcpkg/commands.list.cpp | 20 +++- toolsrc/src/vcpkg/commands.owns.cpp | 13 ++- toolsrc/src/vcpkg/commands.portsdiff.cpp | 15 ++- toolsrc/src/vcpkg/commands.search.cpp | 22 ++-- toolsrc/src/vcpkg/commands.version.cpp | 11 +- toolsrc/src/vcpkg/export.cpp | 80 ++++++++------- toolsrc/src/vcpkg/help.cpp | 11 +- toolsrc/src/vcpkg/install.cpp | 26 ++--- toolsrc/src/vcpkg/remove.cpp | 42 ++++---- toolsrc/src/vcpkg/update.cpp | 11 +- toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 147 ++++++++++++--------------- 31 files changed, 424 insertions(+), 287 deletions(-) diff --git a/toolsrc/include/vcpkg/base/span.h b/toolsrc/include/vcpkg/base/span.h index 6be546351..158f1ac74 100644 --- a/toolsrc/include/vcpkg/base/span.h +++ b/toolsrc/include/vcpkg/base/span.h @@ -57,4 +57,16 @@ namespace vcpkg { return {v.data(), v.size()}; } + + template + constexpr T* begin(Span sp) + { + return sp.begin(); + } + + template + constexpr T* end(Span sp) + { + return sp.end(); + } } \ No newline at end of file diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index e67d38ad8..155b16cf7 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -30,7 +30,7 @@ namespace vcpkg::Util } template - using FmapOut = decltype(std::declval()(*begin(std::declval()))); + using FmapOut = decltype(std::declval()(*begin(std::declval()))); template> std::vector fmap(Cont&& xs, Func&& f) diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 94d9fddf5..824f3ccaf 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -18,10 +18,10 @@ namespace vcpkg::Build { namespace Command { - void perform_and_exit(const FullPackageSpec& full_spec, - const fs::path& port_dir, - const ParsedArguments& options, - const VcpkgPaths& paths); + void perform_and_exit_ex(const FullPackageSpec& full_spec, + const fs::path& port_dir, + const ParsedArguments& options, + const VcpkgPaths& paths); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index d9ebad2c4..74fd80c03 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -23,16 +23,19 @@ namespace vcpkg::Commands namespace CI { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } namespace Env { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } namespace Create { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } @@ -49,16 +52,19 @@ namespace vcpkg::Commands namespace Search { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } namespace List { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } namespace Owns { + extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } @@ -99,6 +105,7 @@ namespace vcpkg::Commands namespace Contact { + extern const CommandStructure COMMAND_STRUCTURE; const std::string& email(); void perform_and_exit(const VcpkgCmdArguments& args); } diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index e59979ad1..a832caf04 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -17,13 +17,47 @@ namespace vcpkg std::unordered_map settings; }; - struct VcpkgCmdArguments + struct VcpkgPaths; + + struct CommandSwitch + { + std::string name; + CStringView short_help_text; + }; + + struct CommandSetting { + std::string name; + CStringView short_help_text; + }; + + struct CommandOptionsStructure + { + Span switches; + Span settings; + }; + + struct CommandStructure + { + std::string example_text; + + size_t minimum_arity; + size_t maximum_arity; + + CommandOptionsStructure options; + + std::vector (*valid_arguments)(const VcpkgPaths& paths); + }; + #if defined(_WIN32) - static VcpkgCmdArguments create_from_command_line(const int argc, const wchar_t* const* const argv); + using CommandLineCharType = wchar_t; #else - static VcpkgCmdArguments create_from_command_line(const int argc, const char* const* const argv); + using CommandLineCharType = char; #endif + + struct VcpkgCmdArguments + { + static VcpkgCmdArguments create_from_command_line(const int argc, const CommandLineCharType* const* const argv); static VcpkgCmdArguments create_from_arg_sequence(const std::string* arg_begin, const std::string* arg_end); std::unique_ptr vcpkg_root_dir; @@ -35,32 +69,9 @@ namespace vcpkg std::string command; std::vector command_arguments; - ParsedArguments check_and_get_optional_command_arguments(const std::vector& valid_switches, - const std::vector& valid_settings) const; - - void check_max_arg_count(const size_t expected_arg_count) const; - void check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const; - void check_min_arg_count(const size_t expected_arg_count) const; - void check_min_arg_count(const size_t expected_arg_count, const std::string& example_text) const; - void check_exact_arg_count(const size_t expected_arg_count) const; - void check_exact_arg_count(const size_t expected_arg_count, const std::string& example_text) const; + ParsedArguments parse_arguments(const CommandStructure& command_structure) const; private: std::unordered_map> optional_command_arguments; }; - - struct VcpkgPaths; - - struct CommandStructure - { - CStringView example_text; - - size_t minimum_arity; - size_t maximum_arity; - - Span switches; - Span settings; - - std::vector (*valid_arguments)(const VcpkgPaths& paths); - }; } diff --git a/toolsrc/src/tests.arguments.cpp b/toolsrc/src/tests.arguments.cpp index 25bf0f085..0f082222d 100644 --- a/toolsrc/src/tests.arguments.cpp +++ b/toolsrc/src/tests.arguments.cpp @@ -34,9 +34,12 @@ namespace UnitTest1 TEST_METHOD(create_from_arg_sequence_valued_options) { + std::array settings = { {{"--a", ""}} }; + CommandStructure cmdstruct = { "", 0, SIZE_MAX, {{}, settings }, nullptr }; + std::vector t = {"--a=b", "command", "argument"}; auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); - auto opts = v.check_and_get_optional_command_arguments({}, {"--a"}); + auto opts = v.parse_arguments(cmdstruct); Assert::AreEqual("b", opts.settings["--a"].c_str()); Assert::AreEqual(size_t{1}, v.command_arguments.size()); Assert::AreEqual("argument", v.command_arguments[0].c_str()); @@ -45,9 +48,13 @@ namespace UnitTest1 TEST_METHOD(create_from_arg_sequence_valued_options2) { + std::array switches = { {{"--a", ""}, {"--c", ""}} }; + std::array settings = { { {"--b", ""}, {"--d", ""}} }; + CommandStructure cmdstruct = {"", 0, SIZE_MAX, {switches, settings}, nullptr}; + std::vector t = {"--a", "--b=c"}; auto v = VcpkgCmdArguments::create_from_arg_sequence(t.data(), t.data() + t.size()); - auto opts = v.check_and_get_optional_command_arguments({"--a", "--c"}, {"--b", "--d"}); + auto opts = v.parse_arguments(cmdstruct); Assert::AreEqual("c", opts.settings["--b"].c_str()); Assert::IsTrue(opts.settings.find("--d") == opts.settings.end()); Assert::IsTrue(opts.switches.find("--a") != opts.switches.end()); diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index c59b6f7d1..8b4654aa8 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -28,10 +28,10 @@ namespace vcpkg::Build::Command static const std::string OPTION_CHECKS_ONLY = "--checks-only"; - void perform_and_exit(const FullPackageSpec& full_spec, - const fs::path& port_dir, - const ParsedArguments& options, - const VcpkgPaths& paths) + void perform_and_exit_ex(const FullPackageSpec& full_spec, + const fs::path& port_dir, + const ParsedArguments& options, + const VcpkgPaths& paths) { const PackageSpec& spec = full_spec.package_spec; if (Util::Sets::contains(options.switches, OPTION_CHECKS_ONLY)) @@ -97,21 +97,32 @@ namespace vcpkg::Build::Command Checks::exit_success(VCPKG_LINE_INFO); } + static const 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, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string EXAMPLE = Help::create_example_string("build zlib:x64-windows"); // Build only takes a single package and all dependencies must already be installed - args.check_exact_arg_count(1, EXAMPLE); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const std::string command_argument = args.command_arguments.at(0); - const FullPackageSpec spec = Input::check_and_get_full_package_spec(command_argument, default_triplet, EXAMPLE); + const FullPackageSpec spec = + Input::check_and_get_full_package_spec(command_argument, default_triplet, COMMAND_STRUCTURE.example_text); Input::check_triplet(spec.package_spec.triplet(), paths); if (!spec.features.empty() && !GlobalState::feature_packages) { Checks::exit_with_message( VCPKG_LINE_INFO, "Feature packages are experimentally available under the --featurepackages flag."); } - const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_CHECKS_ONLY}, {}); - perform_and_exit(spec, paths.port_dir(spec.package_spec), options, paths); + perform_and_exit_ex(spec, paths.port_dir(spec.package_spec), options, paths); } } diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index 410bfcd0d..0df7ec5eb 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -120,7 +120,6 @@ namespace vcpkg::Commands::Autocomplete }; static constexpr CommandEntry COMMANDS[] = { - CommandEntry{"install", R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, CommandEntry{"install", R"###(^install\s(.*\s|)(\S*)$)###", Install::COMMAND_STRUCTURE}, CommandEntry{"edit", R"###(^edit\s(.*\s|)(\S*)$)###", Edit::COMMAND_STRUCTURE}, CommandEntry{"remove", R"###(^remove\s(.*\s|)(\S*)$)###", Remove::COMMAND_STRUCTURE}, @@ -137,11 +136,16 @@ namespace vcpkg::Commands::Autocomplete const bool is_option = Strings::case_insensitive_ascii_starts_with(prefix, "-"); if (is_option) { - results = Util::fmap(command.structure.switches, [](auto&& s) -> std::string { return s; }); + results = + Util::fmap(command.structure.options.switches, [](const CommandSwitch& s) { return s.name; }); + + auto settings = Util::fmap(command.structure.options.settings, [](auto&& s) { return s.name; }); + results.insert(results.end(), settings.begin(), settings.end()); } else { - results = command.structure.valid_arguments(paths); + if (command.structure.valid_arguments != nullptr) + results = command.structure.valid_arguments(paths); } Util::unstable_keep_if(results, [&](const std::string& s) { diff --git a/toolsrc/src/vcpkg/commands.buildexternal.cpp b/toolsrc/src/vcpkg/commands.buildexternal.cpp index 2cc7aabde..82d03db48 100644 --- a/toolsrc/src/vcpkg/commands.buildexternal.cpp +++ b/toolsrc/src/vcpkg/commands.buildexternal.cpp @@ -7,17 +7,23 @@ namespace vcpkg::Commands::BuildExternal { + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)"), + 2, + 2, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string EXAMPLE = - Help::create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)"); - args.check_exact_arg_count(2, EXAMPLE); - const FullPackageSpec spec = - Input::check_and_get_full_package_spec(args.command_arguments.at(0), default_triplet, EXAMPLE); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); + + const FullPackageSpec spec = Input::check_and_get_full_package_spec( + args.command_arguments.at(0), default_triplet, COMMAND_STRUCTURE.example_text); Input::check_triplet(spec.package_spec.triplet(), paths); - const ParsedArguments options = args.check_and_get_optional_command_arguments({}, {}); const fs::path port_dir = args.command_arguments.at(1); - Build::Command::perform_and_exit(spec, port_dir, options, paths); + Build::Command::perform_and_exit_ex(spec, port_dir, options, paths); } } diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index 64a3169b1..6fd123b7c 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -26,13 +26,19 @@ namespace vcpkg::Commands::Cache return output; } + const CommandStructure COMMAND_STRUCTURE = { + Strings::format( + "The argument should be a substring to search for, or no argument to display all cached libraries.\n%s", + Help::create_example_string("cache png")), + 0, + 1, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Strings::format( - "The argument should be a substring to search for, or no argument to display all cached libraries.\n%s", - Help::create_example_string("cache png")); - args.check_max_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); const std::vector binary_paragraphs = read_all_binary_paragraphs(paths); if (binary_paragraphs.empty()) diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index d012ff6dc..dce294004 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -58,13 +58,23 @@ namespace vcpkg::Commands::CI Install::InstallSummary summary; }; + static const std::string OPTION_EXCLUDE = "--exclude"; + + static const std::array CI_SETTINGS = {{ + {OPTION_EXCLUDE, "Comma separated list of ports to skip"}, + }}; + + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("ci x64-windows"), + 0, + SIZE_MAX, + {{}, CI_SETTINGS}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string OPTION_EXCLUDE = "--exclude"; - - static const std::string EXAMPLE = Help::create_example_string("ci x64-windows"); - - const ParsedArguments options = args.check_and_get_optional_command_arguments({}, {OPTION_EXCLUDE}); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const std::vector exclusions = Strings::split(options.settings.at(OPTION_EXCLUDE), ","); const std::set exclusions_set(exclusions.cbegin(), exclusions.cend()); diff --git a/toolsrc/src/vcpkg/commands.contact.cpp b/toolsrc/src/vcpkg/commands.contact.cpp index 5694c1fa6..5d62faeea 100644 --- a/toolsrc/src/vcpkg/commands.contact.cpp +++ b/toolsrc/src/vcpkg/commands.contact.cpp @@ -2,6 +2,7 @@ #include #include +#include namespace vcpkg::Commands::Contact { @@ -11,10 +12,17 @@ namespace vcpkg::Commands::Contact return S_EMAIL; } + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("contact"), + 0, + 0, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args) { - args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); System::println("Send an email to %s with any feedback.", email()); Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index 9d969ea28..15b10c7ea 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -13,7 +13,7 @@ namespace vcpkg::Commands Span> get_available_commands_type_a() { static std::vector> t = { - {"install", &Install::perform_and_exit}, + PackageNameAndFunction{"install", &Install::perform_and_exit}, {"ci", &CI::perform_and_exit}, {"remove", &Remove::perform_and_exit}, {"build", &Build::Command::perform_and_exit}, diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index f1acacd14..c7183d257 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -8,13 +8,18 @@ namespace vcpkg::Commands::Create { + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string( + R"###(create zlib2 http://zlib.net/zlib1211.zip "zlib1211-2.zip")###"), + 2, + 3, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Help::create_example_string( - R"###(create zlib2 http://zlib.net/zlib1211.zip "zlib1211-2.zip")###"); - args.check_max_arg_count(3, EXAMPLE); - args.check_min_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); const std::string port_name = args.command_arguments.at(0); const std::string url = args.command_arguments.at(1); diff --git a/toolsrc/src/vcpkg/commands.dependinfo.cpp b/toolsrc/src/vcpkg/commands.dependinfo.cpp index e5554f7e2..bb300d96e 100644 --- a/toolsrc/src/vcpkg/commands.dependinfo.cpp +++ b/toolsrc/src/vcpkg/commands.dependinfo.cpp @@ -9,11 +9,17 @@ namespace vcpkg::Commands::DependInfo { + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string(R"###(depend-info [pat])###"), + 0, + 1, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Help::create_example_string(R"###(depend-info [pat])###"); - args.check_max_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); std::vector> source_control_files = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index bf618e256..e40e394fb 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -34,11 +34,6 @@ namespace vcpkg::Commands::Edit static const std::string OPTION_BUILDTREES = "--buildtrees"; - static const std::array SWITCHES = { - OPTION_BUILDTREES, - }; - static const std::array SETTINGS; - static std::vector valid_arguments(const VcpkgPaths& paths) { auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); @@ -47,12 +42,15 @@ namespace vcpkg::Commands::Edit [](auto&& pgh) -> std::string { return pgh->core_paragraph->name; }); } + static const std::array EDIT_SWITCHES = {{ + {OPTION_BUILDTREES, "Open editor into the port-specific buildtree subfolder"}, + }}; + const CommandStructure COMMAND_STRUCTURE = { - "edit zlib", + Help::create_example_string("edit zlib"), 1, 1, - SWITCHES, - SETTINGS, + {EDIT_SWITCHES, {}}, &valid_arguments, }; @@ -63,9 +61,7 @@ namespace vcpkg::Commands::Edit auto& fs = paths.get_filesystem(); - static const std::string EXAMPLE = Help::create_example_string("edit zlib"); - args.check_exact_arg_count(1, EXAMPLE); - const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_BUILDTREES}, {}); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const std::string port_name = args.command_arguments.at(0); const fs::path portpath = paths.ports / port_name; diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp index c0d26dac2..98b5aced9 100644 --- a/toolsrc/src/vcpkg/commands.env.cpp +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -7,11 +7,17 @@ namespace vcpkg::Commands::Env { + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("env --triplet x64-windows"), + 0, + 0, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string EXAMPLE = Help::create_example_string(R"(env --triplet x64-windows)"); - args.check_exact_arg_count(0, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 51f6b9ad0..a5940ea1e 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -28,13 +28,18 @@ namespace vcpkg::Commands::Hash System::println(hash); } + const CommandStructure COMMAND_STRUCTURE = { + Strings::format("The argument should be a file path\n%s", + Help::create_example_string("hash boost_1_62_0.tar.bz2")), + 1, + 2, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args) { - static const std::string EXAMPLE = Strings::format("The argument should be a file path\n%s", - Help::create_example_string("hash boost_1_62_0.tar.bz2")); - args.check_min_arg_count(1, EXAMPLE); - args.check_max_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); if (args.command_arguments.size() == 1) { diff --git a/toolsrc/src/vcpkg/commands.import.cpp b/toolsrc/src/vcpkg/commands.import.cpp index 5e74b6d94..24394207b 100644 --- a/toolsrc/src/vcpkg/commands.import.cpp +++ b/toolsrc/src/vcpkg/commands.import.cpp @@ -92,12 +92,18 @@ namespace vcpkg::Commands::Import fs.write_contents(control_file_path, Strings::serialize(control_file_data)); } + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string( + R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)"), + 3, + 3, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Help::create_example_string( - R"(import C:\path\to\CONTROLfile C:\path\to\includedir C:\path\to\projectdir)"); - args.check_exact_arg_count(3, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); const fs::path control_file_path(args.command_arguments[0]); const fs::path include_directory(args.command_arguments[1]); diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 604bd2c6e..31b9ec722 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -333,10 +333,6 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console static const std::string PROJECT = "project"; } - static const std::array INSTALL_SWITCHES; - - static const std::array INSTALL_SETTINGS; - static std::vector valid_arguments(const VcpkgPaths&) { return {Subcommand::INSTALL, Subcommand::REMOVE, Subcommand::PROJECT}; @@ -348,18 +344,13 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console INTEGRATE_COMMAND_HELPSTRING), 1, 1, - INSTALL_SWITCHES, - INSTALL_SETTINGS, + {}, &valid_arguments, }; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Strings::format("Commands:\n" - "%s", - INTEGRATE_COMMAND_HELPSTRING); - args.check_exact_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); #if defined(_WIN32) if (args.command_arguments[0] == Subcommand::INSTALL) diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index 145d4c931..1f2387843 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -24,13 +24,23 @@ namespace vcpkg::Commands::List } } + static const std::array LIST_SWITCHES = {{ + {OPTION_FULLDESC, "Do not truncate long text"}, + }}; + + const CommandStructure COMMAND_STRUCTURE = { + Strings::format( + "The argument should be a substring to search for, or no argument to display all installed libraries.\n%s", + Help::create_example_string("list png")), + 0, + 1, + {LIST_SWITCHES, {}}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Strings::format( - "The argument should be a substring to search for, or no argument to display all installed libraries.\n%s", - Help::create_example_string("list png")); - args.check_max_arg_count(1, EXAMPLE); - const ParsedArguments options = args.check_and_get_optional_command_arguments({OPTION_FULLDESC}, {}); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const StatusParagraphs status_paragraphs = database_load_check(paths); std::vector installed_packages = get_installed_ports(status_paragraphs); diff --git a/toolsrc/src/vcpkg/commands.owns.cpp b/toolsrc/src/vcpkg/commands.owns.cpp index b2db966e1..52249187b 100644 --- a/toolsrc/src/vcpkg/commands.owns.cpp +++ b/toolsrc/src/vcpkg/commands.owns.cpp @@ -23,13 +23,18 @@ namespace vcpkg::Commands::Owns } } } + const CommandStructure COMMAND_STRUCTURE = { + Strings::format("The argument should be a pattern to search for. %s", + Help::create_example_string("owns zlib.dll")), + 1, + 1, + {}, + nullptr, + }; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Strings::format("The argument should be a pattern to search for. %s", - Help::create_example_string("owns zlib.dll")); - args.check_exact_arg_count(1, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); const StatusParagraphs status_db = database_load_check(paths); search_file(paths, args.command_arguments[0], status_db); diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index 5008f3e8a..0277c8bdb 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -114,13 +114,18 @@ namespace vcpkg::Commands::PortsDiff VCPKG_LINE_INFO, output.output == VALID_COMMIT_OUTPUT, "Invalid commit id %s", git_commit_id); } + const CommandStructure COMMAND_STRUCTURE = { + Strings::format("The argument should be a branch/tag/hash to checkout.\n%s", + Help::create_example_string("portsdiff mybranchname")), + 1, + 2, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Strings::format("The argument should be a branch/tag/hash to checkout.\n%s", - Help::create_example_string("portsdiff mybranchname")); - args.check_min_arg_count(1, EXAMPLE); - args.check_max_arg_count(2, EXAMPLE); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); const fs::path& git_exe = paths.get_git_exe(); diff --git a/toolsrc/src/vcpkg/commands.search.cpp b/toolsrc/src/vcpkg/commands.search.cpp index ad3046e6d..01291ddfb 100644 --- a/toolsrc/src/vcpkg/commands.search.cpp +++ b/toolsrc/src/vcpkg/commands.search.cpp @@ -79,14 +79,24 @@ namespace vcpkg::Commands::Search } } + static std::array SEARCH_SWITCHES = {{ + {OPTION_GRAPH, "Open editor into the port-specific buildtree subfolder"}, + {OPTION_FULLDESC, "Do not truncate long text"}, + }}; + + const CommandStructure COMMAND_STRUCTURE = { + Strings::format( + "The argument should be a substring to search for, or no argument to display all libraries.\n%s", + Help::create_example_string("search png")), + 0, + 1, + {SEARCH_SWITCHES, {}}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - static const std::string EXAMPLE = Strings::format( - "The argument should be a substring to search for, or no argument to display all libraries.\n%s", - Help::create_example_string("search png")); - args.check_max_arg_count(1, EXAMPLE); - const ParsedArguments options = - args.check_and_get_optional_command_arguments({OPTION_GRAPH, OPTION_FULLDESC}, {}); + 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); diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp index e8756a77d..3f44cf1a2 100644 --- a/toolsrc/src/vcpkg/commands.version.cpp +++ b/toolsrc/src/vcpkg/commands.version.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #define STRINGIFY(...) #__VA_ARGS__ @@ -61,11 +62,17 @@ namespace vcpkg::Commands::Version } } } + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("version"), + 0, + 0, + {}, + nullptr, + }; void perform_and_exit(const VcpkgCmdArguments& args) { - args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); System::println("Vcpkg package management program version %s\n" "\n" diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index eb4f5db3c..bbeecefed 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -257,51 +257,57 @@ namespace vcpkg::Export std::vector specs; }; + static const std::string OPTION_DRY_RUN = "--dry-run"; + static const std::string OPTION_RAW = "--raw"; + static const std::string OPTION_NUGET = "--nuget"; + static const std::string OPTION_IFW = "--ifw"; + static const std::string OPTION_ZIP = "--zip"; + static const std::string OPTION_SEVEN_ZIP = "--7zip"; + static const std::string OPTION_NUGET_ID = "--nuget-id"; + static const std::string OPTION_NUGET_VERSION = "--nuget-version"; + static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; + static const std::string OPTION_IFW_PACKAGES_DIR_PATH = "--ifw-packages-directory-path"; + static const std::string OPTION_IFW_REPOSITORY_DIR_PATH = "--ifw-repository-directory-path"; + static const std::string OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path"; + static const std::string OPTION_IFW_INSTALLER_FILE_PATH = "--ifw-installer-file-path"; + + static const std::array EXPORT_SWITCHES = {{ + {OPTION_DRY_RUN, "Do not actually export"}, + {OPTION_RAW, "Export to an uncompressed directory"}, + {OPTION_NUGET, "Export a NuGet package"}, + {OPTION_IFW, "Export to an IFW-based installer"}, + {OPTION_ZIP, "Export to a zip file"}, + {OPTION_SEVEN_ZIP, "Export to a 7zip (.7z) file"}, + }}; + static const std::array EXPORT_SETTINGS = {{ + {OPTION_NUGET_ID, "Specify the id for the exported NuGet package"}, + {OPTION_NUGET_VERSION, "Specify the version for the exported NuGet package"}, + {OPTION_IFW_REPOSITORY_URL, ""}, + {OPTION_IFW_PACKAGES_DIR_PATH, ""}, + {OPTION_IFW_REPOSITORY_DIR_PATH, ""}, + {OPTION_IFW_CONFIG_FILE_PATH, ""}, + {OPTION_IFW_INSTALLER_FILE_PATH, ""}, + }}; + + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("export zlib zlib:x64-windows boost --nuget"), + 0, + SIZE_MAX, + {EXPORT_SWITCHES, EXPORT_SETTINGS}, + nullptr, + }; + static ExportArguments handle_export_command_arguments(const VcpkgCmdArguments& args, const Triplet& default_triplet) { ExportArguments ret; - static const std::string OPTION_DRY_RUN = "--dry-run"; - static const std::string OPTION_RAW = "--raw"; - static const std::string OPTION_NUGET = "--nuget"; - static const std::string OPTION_IFW = "--ifw"; - static const std::string OPTION_ZIP = "--zip"; - static const std::string OPTION_SEVEN_ZIP = "--7zip"; - static const std::string OPTION_NUGET_ID = "--nuget-id"; - static const std::string OPTION_NUGET_VERSION = "--nuget-version"; - static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; - static const std::string OPTION_IFW_PACKAGES_DIR_PATH = "--ifw-packages-directory-path"; - static const std::string OPTION_IFW_REPOSITORY_DIR_PATH = "--ifw-repository-directory-path"; - static const std::string OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path"; - static const std::string OPTION_IFW_INSTALLER_FILE_PATH = "--ifw-installer-file-path"; + const auto options = args.parse_arguments(COMMAND_STRUCTURE); // input sanitization - static const std::string EXAMPLE = Help::create_example_string("export zlib zlib:x64-windows boost --nuget"); - args.check_min_arg_count(1, EXAMPLE); - ret.specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, EXAMPLE); + return Input::check_and_get_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); }); - - const auto options = args.check_and_get_optional_command_arguments( - { - OPTION_DRY_RUN, - OPTION_RAW, - OPTION_NUGET, - OPTION_IFW, - OPTION_ZIP, - OPTION_SEVEN_ZIP, - }, - { - OPTION_NUGET_ID, - OPTION_NUGET_VERSION, - OPTION_IFW_REPOSITORY_URL, - OPTION_IFW_PACKAGES_DIR_PATH, - OPTION_IFW_REPOSITORY_DIR_PATH, - OPTION_IFW_CONFIG_FILE_PATH, - OPTION_IFW_INSTALLER_FILE_PATH, - }); ret.dry_run = options.switches.find(OPTION_DRY_RUN) != options.switches.cend(); ret.raw = options.switches.find(OPTION_RAW) != options.switches.cend(); ret.nuget = options.switches.find(OPTION_NUGET) != options.switches.cend(); @@ -313,7 +319,7 @@ namespace vcpkg::Export { System::println(System::Color::error, "Must provide at least one export type: --raw --nuget --ifw --zip --7zip"); - System::print(EXAMPLE); + System::print(COMMAND_STRUCTURE.example_text); Checks::exit_fail(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index 8783833f2..5d4cf99a4 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -91,10 +91,17 @@ namespace vcpkg::Help System::println(create_example_string(command_and_arguments)); } + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("help"), + 0, + 1, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - args.check_max_arg_count(1); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); if (args.command_arguments.empty()) { diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index b1f722d59..20ffd3164 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -535,13 +535,13 @@ namespace vcpkg::Install static const std::string OPTION_RECURSE = "--recurse"; static const std::string OPTION_KEEP_GOING = "--keep-going"; - static const std::array INSTALL_SWITCHES = { - OPTION_DRY_RUN, - OPTION_USE_HEAD_VERSION, - OPTION_NO_DOWNLOADS, - OPTION_RECURSE, - OPTION_KEEP_GOING, - }; + static const std::array INSTALL_SWITCHES = {{ + {OPTION_DRY_RUN, "Do not actually build or install"}, + {OPTION_USE_HEAD_VERSION, "Install the libraries on the command line using the latest upstream sources"}, + {OPTION_NO_DOWNLOADS, "Do not download new sources"}, + {OPTION_RECURSE, "Allow removal of packages as part of installation"}, + {OPTION_KEEP_GOING, "Continue installing packages on failure"}, + }}; static const std::array INSTALL_SETTINGS; std::vector get_all_port_names(const VcpkgPaths& paths) @@ -553,22 +553,20 @@ namespace vcpkg::Install } const CommandStructure COMMAND_STRUCTURE = { - "install zlib zlib:x64-windows curl boost", + Help::create_example_string("install zlib zlib:x64-windows curl boost"), 1, SIZE_MAX, - INSTALL_SWITCHES, - INSTALL_SETTINGS, + {INSTALL_SWITCHES, {}}, &get_all_port_names, }; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { // input sanitization - static const std::string EXAMPLE = Help::create_example_string("install zlib zlib:x64-windows curl boost"); - args.check_min_arg_count(1, EXAMPLE); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_full_package_spec(arg, default_triplet, EXAMPLE); + return Input::check_and_get_full_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); }); for (auto&& spec : specs) @@ -581,8 +579,6 @@ namespace vcpkg::Install } } - const ParsedArguments options = args.check_and_get_optional_command_arguments( - {OPTION_DRY_RUN, OPTION_USE_HEAD_VERSION, OPTION_NO_DOWNLOADS, OPTION_RECURSE, OPTION_KEEP_GOING}, {}); const bool dry_run = Util::Sets::contains(options.switches, OPTION_DRY_RUN); const bool use_head_version = Util::Sets::contains(options.switches, (OPTION_USE_HEAD_VERSION)); const bool no_downloads = Util::Sets::contains(options.switches, (OPTION_NO_DOWNLOADS)); diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 156f23003..7f40fb16e 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -169,14 +169,13 @@ namespace vcpkg::Remove static const std::string OPTION_DRY_RUN = "--dry-run"; static const std::string OPTION_OUTDATED = "--outdated"; - static const std::array SWITCHES = { - OPTION_PURGE, - OPTION_NO_PURGE, - OPTION_RECURSE, - OPTION_DRY_RUN, - OPTION_OUTDATED, - }; - static const std::array SETTINGS; + static const std::array SWITCHES = {{ + {OPTION_PURGE, "Remove the cached copy of the package (default)"}, + {OPTION_NO_PURGE, "Do not remove the cached copy of the package"}, + {OPTION_RECURSE, "Allow removal of packages not explicitly specified on the command line"}, + {OPTION_DRY_RUN, "Print the packages to be removed, but do not remove them"}, + {OPTION_OUTDATED, "Select all packages with versions that do not match the portfiles"}, + }}; static std::vector valid_arguments(const VcpkgPaths& paths) { @@ -187,25 +186,26 @@ namespace vcpkg::Remove } const CommandStructure COMMAND_STRUCTURE = { - "remove zlib zlib:x64-windows curl boost", - 1, + Help::create_example_string("remove zlib zlib:x64-windows curl boost"), + 0, SIZE_MAX, - SWITCHES, - SETTINGS, + {SWITCHES, {}}, &valid_arguments, }; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - static const std::string EXAMPLE = Help::create_example_string("remove zlib zlib:x64-windows curl boost"); - const ParsedArguments options = args.check_and_get_optional_command_arguments( - {OPTION_PURGE, OPTION_NO_PURGE, OPTION_RECURSE, OPTION_DRY_RUN, OPTION_OUTDATED}, {}); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); StatusParagraphs status_db = database_load_check(paths); std::vector specs; if (Util::Sets::contains(options.switches, OPTION_OUTDATED)) { - args.check_exact_arg_count(0, EXAMPLE); + if (args.command_arguments.size() != 0) + { + System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); + Checks::exit_fail(VCPKG_LINE_INFO); + } specs = Util::fmap(Update::find_outdated_packages(paths, status_db), [](auto&& outdated) { return outdated.spec; }); @@ -217,9 +217,13 @@ namespace vcpkg::Remove } else { - args.check_min_arg_count(1, EXAMPLE); + if (args.command_arguments.size() < 1) + { + System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); + Checks::exit_fail(VCPKG_LINE_INFO); + } specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, EXAMPLE); + return Input::check_and_get_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); }); for (auto&& spec : specs) @@ -231,7 +235,7 @@ namespace vcpkg::Remove if (purge_was_passed && no_purge_was_passed) { System::println(System::Color::error, "Error: cannot specify both --no-purge and --purge."); - System::print(EXAMPLE); + System::print(COMMAND_STRUCTURE.example_text); Checks::exit_fail(VCPKG_LINE_INFO); } const Purge purge = to_purge(purge_was_passed || !no_purge_was_passed); diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index 7d565251e..61a3f89c5 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -38,10 +38,17 @@ namespace vcpkg::Update return output; } + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("update"), + 0, + 0, + {}, + nullptr, + }; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - args.check_exact_arg_count(0); - args.check_and_get_optional_command_arguments({}, {}); + args.parse_arguments(COMMAND_STRUCTURE); System::println("Using local portfile versions. To update the local portfiles, use `git pull`."); const StatusParagraphs status_db = database_load_check(paths); diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 209f6a3f2..35cdbc12e 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -45,11 +45,8 @@ namespace vcpkg option_field = new_setting; } -#if defined(_WIN32) - VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, const wchar_t* const* const argv) -#else - VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, const char* const* const argv) -#endif + VcpkgCmdArguments VcpkgCmdArguments::create_from_command_line(const int argc, + const CommandLineCharType* const* const argv) { std::vector v; for (int i = 1; i < argc; ++i) @@ -158,46 +155,83 @@ namespace vcpkg return args; } - ParsedArguments VcpkgCmdArguments::check_and_get_optional_command_arguments( - const std::vector& valid_switches, const std::vector& valid_settings) const + ParsedArguments VcpkgCmdArguments::parse_arguments(const CommandStructure& command_structure) const { bool failed = false; ParsedArguments output; + const size_t actual_arg_count = command_arguments.size(); + + if (command_structure.minimum_arity == command_structure.maximum_arity) + { + if (actual_arg_count != command_structure.minimum_arity) + { + System::println(System::Color::error, + "Error: '%s' requires %u arguments, but %u were provided.", + this->command, + command_structure.minimum_arity, + actual_arg_count); + failed = true; + } + } + else + { + if (actual_arg_count < command_structure.minimum_arity) + { + System::println(System::Color::error, + "Error: '%s' requires at least %u arguments, but %u were provided", + this->command, + command_structure.minimum_arity, + actual_arg_count); + failed = true; + } + if (actual_arg_count > command_structure.maximum_arity) + { + System::println(System::Color::error, + "Error: '%s' requires at most %u arguments, but %u were provided", + this->command, + command_structure.maximum_arity, + actual_arg_count); + failed = true; + } + } + auto options_copy = this->optional_command_arguments; - for (const std::string& option : valid_switches) + for (auto&& option : command_structure.options.switches) { - const auto it = options_copy.find(option); + const auto it = options_copy.find(option.name); if (it != options_copy.end()) { if (it->second.has_value()) { // Having a string value indicates it was passed like '--a=xyz' - System::println(System::Color::error, "The option '%s' does not accept an argument.", option); + System::println( + System::Color::error, "Error: The option '%s' does not accept an argument.", option.name); failed = true; } else { - output.switches.insert(option); + output.switches.insert(option.name); options_copy.erase(it); } } } - for (const std::string& option : valid_settings) + for (auto&& option : command_structure.options.settings) { - const auto it = options_copy.find(option); + 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::println(System::Color::error, "The option '%s' must be passed an argument.", option); + System::println( + System::Color::error, "Error: The option '%s' must be passed an argument.", option.name); failed = true; } else { - output.settings.emplace(option, it->second.value_or_exit(VCPKG_LINE_INFO)); + output.settings.emplace(option.name, it->second.value_or_exit(VCPKG_LINE_INFO)); options_copy.erase(it); } } @@ -210,83 +244,32 @@ namespace vcpkg { System::println(" %s", option.first); } - System::println("\nValid options are:", this->command); - for (auto&& option : valid_switches) + System::println(); + failed = true; + } + + if (failed) + { + if (!command_structure.example_text.empty()) { - System::println(" %s", option); + System::println("%s", command_structure.example_text); } - for (auto&& option : valid_settings) + + System::println("Options:", this->command); + for (auto&& option : command_structure.options.switches) { - System::println(" %s=...", option); + System::println(" %-40s %s", option.name, option.short_help_text); + } + for (auto&& option : command_structure.options.settings) + { + System::println(" %-40s %s", (option.name + "=..."), option.short_help_text); } System::println(" --triplet "); System::println(" --vcpkg-root "); Checks::exit_fail(VCPKG_LINE_INFO); } - if (failed) Checks::exit_fail(VCPKG_LINE_INFO); return output; } - - void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count) const - { - return check_max_arg_count(expected_arg_count, ""); - } - - void VcpkgCmdArguments::check_min_arg_count(const size_t expected_arg_count) const - { - return check_min_arg_count(expected_arg_count, ""); - } - - void VcpkgCmdArguments::check_exact_arg_count(const size_t expected_arg_count) const - { - return check_exact_arg_count(expected_arg_count, ""); - } - - void VcpkgCmdArguments::check_max_arg_count(const size_t expected_arg_count, const std::string& example_text) const - { - const size_t actual_arg_count = command_arguments.size(); - if (actual_arg_count > expected_arg_count) - { - System::println(System::Color::error, - "Error: `%s` requires at most %u arguments, but %u were provided", - this->command, - expected_arg_count, - actual_arg_count); - System::print(example_text); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - - void VcpkgCmdArguments::check_min_arg_count(const size_t expected_arg_count, const std::string& example_text) const - { - const size_t actual_arg_count = command_arguments.size(); - if (actual_arg_count < expected_arg_count) - { - System::println(System::Color::error, - "Error: `%s` requires at least %u arguments, but %u were provided", - this->command, - expected_arg_count, - actual_arg_count); - System::print(example_text); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - - void VcpkgCmdArguments::check_exact_arg_count(const size_t expected_arg_count, - const std::string& example_text) const - { - const size_t actual_arg_count = command_arguments.size(); - if (actual_arg_count != expected_arg_count) - { - System::println(System::Color::error, - "Error: `%s` requires %u arguments, but %u were provided", - this->command, - expected_arg_count, - actual_arg_count); - System::print(example_text); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } } -- cgit v1.2.3 From 2feea0828ba94d2a365e8825fe799ed12acc6e6c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 2 Nov 2017 18:17:21 -0700 Subject: [vcpkg] Improve `vcpkg help` -- now has per-command help! --- toolsrc/include/vcpkg/base/cstringview.h | 2 + toolsrc/include/vcpkg/export.h | 2 + toolsrc/include/vcpkg/help.h | 4 +- toolsrc/include/vcpkg/vcpkgcmdarguments.h | 2 + toolsrc/src/vcpkg/export.cpp | 3 +- toolsrc/src/vcpkg/help.cpp | 116 +++++++++++++++++------------- toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 40 ++++++----- 7 files changed, 99 insertions(+), 70 deletions(-) diff --git a/toolsrc/include/vcpkg/base/cstringview.h b/toolsrc/include/vcpkg/base/cstringview.h index 342455402..0441bc573 100644 --- a/toolsrc/include/vcpkg/base/cstringview.h +++ b/toolsrc/include/vcpkg/base/cstringview.h @@ -63,6 +63,8 @@ namespace vcpkg inline bool operator!=(const std::string& l, const CStringView& r) { return l != r.c_str(); } + inline std::string operator+(std::string&& l, const CStringView& r) { return std::move(l) + r.c_str(); } + inline const char* to_printf_arg(const CStringView string_view) { return string_view.c_str(); } static_assert(sizeof(CStringView) == sizeof(void*), "CStringView must be a simple wrapper around char*"); diff --git a/toolsrc/include/vcpkg/export.h b/toolsrc/include/vcpkg/export.h index f3285e187..eb99b4fb1 100644 --- a/toolsrc/include/vcpkg/export.h +++ b/toolsrc/include/vcpkg/export.h @@ -4,6 +4,8 @@ namespace vcpkg::Export { + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); void export_integration_files(const fs::path& raw_exported_dir_path, const VcpkgPaths& paths); diff --git a/toolsrc/include/vcpkg/help.h b/toolsrc/include/vcpkg/help.h index 39ad6912d..73549efd7 100644 --- a/toolsrc/include/vcpkg/help.h +++ b/toolsrc/include/vcpkg/help.h @@ -7,13 +7,13 @@ namespace vcpkg::Help { + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); void help_topic_valid_triplet(const VcpkgPaths& paths); void print_usage(); - void print_example(const std::string& command_and_arguments); - std::string create_example_string(const std::string& command_and_arguments); } diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index a832caf04..93eeb6ef5 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -49,6 +49,8 @@ namespace vcpkg std::vector (*valid_arguments)(const VcpkgPaths& paths); }; + void display_usage(const CommandStructure& command_structure); + #if defined(_WIN32) using CommandLineCharType = wchar_t; #else diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index bbeecefed..625dff8b1 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -289,7 +290,7 @@ namespace vcpkg::Export {OPTION_IFW_INSTALLER_FILE_PATH, ""}, }}; - const CommandStructure COMMAND_STRUCTURE = { + const CommandStructure vcpkg::Export::COMMAND_STRUCTURE = { Help::create_example_string("export zlib zlib:x64-windows boost --nuget"), 0, SIZE_MAX, diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index 5d4cf99a4..c83f0277b 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -2,15 +2,68 @@ #include #include +#include +#include +#include +#include namespace vcpkg::Help { - void help_topics() + struct Topic + { + using topic_function = void (*)(const VcpkgPaths& paths); + + constexpr Topic(CStringView n, topic_function fn) : name(n), print(fn) {} + + CStringView name; + topic_function print; + }; + + template + static void command_topic_fn(const VcpkgPaths&) + { + display_usage(S); + } + + static void integrate_topic_fn(const VcpkgPaths&) + { + System::print("Commands:\n" + "%s", + Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING); + } + + static void help_topics(const VcpkgPaths&); + + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("help"), + 0, + 1, + {}, + nullptr, + }; + + static constexpr std::array topics = {{ + {"create", command_topic_fn}, + {"edit", command_topic_fn}, + {"env", command_topic_fn}, + {"export", command_topic_fn}, + {"help", command_topic_fn}, + {"install", command_topic_fn}, + {"integrate", integrate_topic_fn}, + {"list", command_topic_fn}, + {"owns", command_topic_fn}, + {"remove", command_topic_fn}, + {"search", command_topic_fn}, + {"topics", help_topics}, + }}; + + static void help_topics(const VcpkgPaths&) { System::println("Available help topics:\n" " triplet\n" - " integrate\n" - " export"); + " integrate" + "%s", + Strings::join("", topics, [](const Topic& topic) { return std::string("\n ") + topic.name; })); } void help_topic_valid_triplet(const VcpkgPaths& paths) @@ -22,21 +75,6 @@ namespace vcpkg::Help } } - void help_topic_export() - { - System::println("Summary:\n" - " vcpkg export [options] ...\n" - "\n" - "Options:\n" - " --7zip Export to a 7zip (.7z) file\n" - " --dry-run Do not actually export\n" - " --nuget Export a NuGet package\n" - " --nuget-id= Specify the id for the exported NuGet package\n" - " --nuget-version= Specify the version for the exported NuGet package\n" - " --raw Export to an uncompressed directory\n" - " --zip Export to a zip file"); - } - void print_usage() { System::println( @@ -86,19 +124,6 @@ namespace vcpkg::Help return cs; } - void print_example(const std::string& command_and_arguments) - { - System::println(create_example_string(command_and_arguments)); - } - - const CommandStructure COMMAND_STRUCTURE = { - Help::create_example_string("help"), - 0, - 1, - {}, - nullptr, - }; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { args.parse_arguments(COMMAND_STRUCTURE); @@ -112,27 +137,18 @@ namespace vcpkg::Help if (topic == "triplet" || topic == "triplets" || topic == "triple") { help_topic_valid_triplet(paths); + Checks::exit_success(VCPKG_LINE_INFO); } - else if (topic == "export") - { - help_topic_export(); - } - else if (topic == "integrate") - { - System::print("Commands:\n" - "%s", - Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING); - } - else if (topic == "topics") - { - help_topics(); - } - else + + auto it_topic = Util::find_if(topics, [&](const Topic& t) { return t.name == topic; }); + if (it_topic != topics.end()) { - System::println(System::Color::error, "Error: unknown topic %s", topic); - help_topics(); - Checks::exit_fail(VCPKG_LINE_INFO); + it_topic->print(paths); + Checks::exit_success(VCPKG_LINE_INFO); } - Checks::exit_success(VCPKG_LINE_INFO); + + System::println(System::Color::error, "Error: unknown topic %s", topic); + help_topics(paths); + Checks::exit_fail(VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 35cdbc12e..671a89892 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -250,26 +250,32 @@ namespace vcpkg if (failed) { - if (!command_structure.example_text.empty()) - { - System::println("%s", command_structure.example_text); - } - - System::println("Options:", this->command); - for (auto&& option : command_structure.options.switches) - { - System::println(" %-40s %s", option.name, option.short_help_text); - } - for (auto&& option : command_structure.options.settings) - { - System::println(" %-40s %s", (option.name + "=..."), option.short_help_text); - } - System::println(" --triplet "); - System::println(" --vcpkg-root "); - + display_usage(command_structure); Checks::exit_fail(VCPKG_LINE_INFO); } return output; } + + void display_usage(const CommandStructure& command_structure) + { + if (!command_structure.example_text.empty()) + { + System::println("%s", command_structure.example_text); + } + + System::println("Options:"); + for (auto&& option : command_structure.options.switches) + { + System::println(" %-40s %s", option.name, option.short_help_text); + } + for (auto&& option : command_structure.options.settings) + { + System::println(" %-40s %s", (option.name + "=..."), option.short_help_text); + } + System::println(" %-40s %s", "--triplet ", "Set the default triplet for unqualified packages"); + System::println(" %-40s %s", + "--vcpkg-root ", + "Specify the vcpkg directory to use instead of current directory or tool directory"); + } } -- cgit v1.2.3 From 115cd5f69f1060d3662355a3276948cd77b7fa31 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Fri, 3 Nov 2017 20:31:13 +0300 Subject: [vcpkg-help-export-ifw] Add settings description --- toolsrc/src/vcpkg/export.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 625dff8b1..9b86863eb 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -283,11 +283,11 @@ namespace vcpkg::Export static const std::array EXPORT_SETTINGS = {{ {OPTION_NUGET_ID, "Specify the id for the exported NuGet package"}, {OPTION_NUGET_VERSION, "Specify the version for the exported NuGet package"}, - {OPTION_IFW_REPOSITORY_URL, ""}, - {OPTION_IFW_PACKAGES_DIR_PATH, ""}, - {OPTION_IFW_REPOSITORY_DIR_PATH, ""}, - {OPTION_IFW_CONFIG_FILE_PATH, ""}, - {OPTION_IFW_INSTALLER_FILE_PATH, ""}, + {OPTION_IFW_REPOSITORY_URL, "Specify the remote repository URL for the online installer"}, + {OPTION_IFW_PACKAGES_DIR_PATH, "Specify the temporary directory path for the repacked packages"}, + {OPTION_IFW_REPOSITORY_DIR_PATH, "Specify the directory path for the exported repository"}, + {OPTION_IFW_CONFIG_FILE_PATH, "Specify the temporary file path for the installer configuration"}, + {OPTION_IFW_INSTALLER_FILE_PATH, "Specify the file path for the exported installer"}, }}; const CommandStructure vcpkg::Export::COMMAND_STRUCTURE = { -- cgit v1.2.3 From 66ad158be46e09b2db4fe8be90841fc01d271c68 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 3 Nov 2017 14:44:11 -0700 Subject: [opencv] Disable MSMF in UWP due to an upstream bug --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index c5896a516..47d8b2443 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.1-5 +Version: 3.3.1-6 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 8e68379fa..f201ea706 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -57,6 +57,11 @@ if("vtk" IN_LIST FEATURES) set(WITH_VTK ON) endif() +set(WITH_MSMF ON) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(WITH_MSMF OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -101,7 +106,7 @@ vcpkg_configure_cmake( -DWITH_CUDA=${WITH_CUDA} -DWITH_FFMPEG=${WITH_FFMPEG} -DWITH_LAPACK=OFF - -DWITH_MSMF=ON + -DWITH_MSMF=${WITH_MSMF} -DWITH_OPENCLAMDBLAS=OFF -DWITH_OPENGL=ON -DWITH_QT=${WITH_QT} -- cgit v1.2.3 From 24c3f87bf45838aeeb74c513d40ac175994d0b7f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 18:54:10 -0700 Subject: [vcpkg_download_distfile] Now downloads in a temp dir and rename to the target location --- scripts/cmake/vcpkg_download_distfile.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index b8acfc823..ff32f1aed 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -38,7 +38,12 @@ function(vcpkg_download_distfile VAR) set(oneValueArgs FILENAME SHA512) set(multipleValuesArgs URLS) cmake_parse_arguments(vcpkg_download_distfile "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}) + set(download_file_path_part "${DOWNLOADS}/temp/${vcpkg_download_distfile_FILENAME}") + + file(REMOVE_RECURSE "${DOWNLOADS}/temp") + file(MAKE_DIRECTORY "${DOWNLOADS}/temp") function(test_hash FILE_KIND CUSTOM_ERROR_ADVICE) message(STATUS "Testing integrity of ${FILE_KIND}...") @@ -65,13 +70,13 @@ function(vcpkg_download_distfile VAR) # Tries to download the file. foreach(url IN LISTS vcpkg_download_distfile_URLS) message(STATUS "Downloading ${url}...") - file(DOWNLOAD ${url} ${downloaded_file_path} STATUS download_status) + file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status SHOW_PROGRESS) list(GET download_status 0 status_code) if (NOT "${status_code}" STREQUAL "0") message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") - file(REMOVE ${downloaded_file_path}) set(download_success 0) else() + file(RENAME ${download_file_path_part} ${downloaded_file_path}) message(STATUS "Downloading ${url}... OK") set(download_success 1) break() -- cgit v1.2.3 From 9150cb8a906c99ff1881fe0d88811ad967658cde Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 18:54:34 -0700 Subject: [vcpkg_find_acquire_program] Use vcpkg_download_distfile() --- scripts/cmake/vcpkg_find_acquire_program.cmake | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index fdee0cb1f..e6a37e328 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -164,18 +164,20 @@ function(vcpkg_find_acquire_program VAR) do_find() if("${${VAR}}" MATCHES "-NOTFOUND") - file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE} - EXPECTED_HASH SHA512=${HASH} - SHOW_PROGRESS + vcpkg_download_distfile(ARCHIVE_PATH + URLS ${URL} + SHA512 ${HASH} + FILENAME ${ARCHIVE} ) + file(MAKE_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) if(DEFINED NOEXTRACT) - file(COPY ${DOWNLOADS}/${ARCHIVE} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) + file(COPY ${ARCHIVE_PATH} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) else() get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT) string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) if(ARCHIVE_EXTENSION STREQUAL ".msi") - file(TO_NATIVE_PATH "${DOWNLOADS}/${ARCHIVE}" ARCHIVE_NATIVE_PATH) + file(TO_NATIVE_PATH "${ARCHIVE_PATH}" ARCHIVE_NATIVE_PATH) file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}" DESTINATION_NATIVE_PATH) execute_process( COMMAND msiexec /a ${ARCHIVE_NATIVE_PATH} /qn TARGETDIR=${DESTINATION_NATIVE_PATH} @@ -183,7 +185,7 @@ function(vcpkg_find_acquire_program VAR) ) else() execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} + COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE_PATH} WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR} ) endif() -- cgit v1.2.3 From ebb52b8cb19e049cf998bd6742cb9f6a07e947cd Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 19:08:13 -0700 Subject: Remove vcpkg_acquire_depot_tools --- scripts/cmake/vcpkg_acquire_depot_tools.cmake | 48 --------------------------- scripts/cmake/vcpkg_common_functions.cmake | 1 - 2 files changed, 49 deletions(-) delete mode 100644 scripts/cmake/vcpkg_acquire_depot_tools.cmake diff --git a/scripts/cmake/vcpkg_acquire_depot_tools.cmake b/scripts/cmake/vcpkg_acquire_depot_tools.cmake deleted file mode 100644 index 009ba40f1..000000000 --- a/scripts/cmake/vcpkg_acquire_depot_tools.cmake +++ /dev/null @@ -1,48 +0,0 @@ -function(vcpkg_acquire_depot_tools PATH_TO_ROOT_OUT) - set(TOOLPATH ${DOWNLOADS}/tools/depot_tools) - set(URL "https://storage.googleapis.com/chrome-infra/depot_tools.zip") - set(ARCHIVE "depot_tools.zip") - set(STAMP "initialized-depot-tools.stamp") - set(downloaded_file_path ${DOWNLOADS}/${ARCHIVE}) - - if(NOT EXISTS "${TOOLPATH}/${STAMP}") - - message(STATUS "Acquiring Depot Tools...") - - if(EXISTS ${downloaded_file_path}) - message(STATUS "Using cached ${downloaded_file_path}") - else() - if(_VCPKG_NO_DOWNLOADS) - message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") - endif() - file(DOWNLOAD ${URL} ${downloaded_file_path} STATUS download_status) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - message(STATUS "Downloading ${URL}... Failed. Status: ${download_status}") - file(REMOVE ${downloaded_file_path}) - set(download_success 0) - else() - message(STATUS "Downloading ${URL}... OK") - set(download_success 1) - endif() - - if (NOT download_success) - message(FATAL_ERROR - "\n" - " Failed to download file.\n" - " Add mirrors or submit an issue at https://github.com/Microsoft/vcpkg/issues\n") - endif() - endif() - - - file(REMOVE_RECURSE ${TOOLPATH}) - file(MAKE_DIRECTORY ${TOOLPATH}) - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} - WORKING_DIRECTORY ${TOOLPATH} - ) - file(WRITE "${TOOLPATH}/${STAMP}" "0") - message(STATUS "Acquiring Depot Tools... OK") - endif() - set(${PATH_TO_ROOT_OUT} ${TOOLPATH} PARENT_SCOPE) -endfunction() diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 81e8e5813..7ef87f2ea 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -21,4 +21,3 @@ include(vcpkg_copy_tool_dependencies) include(vcpkg_get_program_files_32_bit) include(vcpkg_get_program_files_platform_bitness) include(vcpkg_get_windows_sdk) -include(vcpkg_acquire_depot_tools) -- cgit v1.2.3 From dc7db2571399a97d6dacc4f12f81ee1fa204987d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 19:08:53 -0700 Subject: [downloads] Don't show progress by default --- scripts/cmake/vcpkg_download_distfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index ff32f1aed..0141e9811 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -70,7 +70,7 @@ function(vcpkg_download_distfile VAR) # Tries to download the file. foreach(url IN LISTS vcpkg_download_distfile_URLS) message(STATUS "Downloading ${url}...") - file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status SHOW_PROGRESS) + file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status) list(GET download_status 0 status_code) if (NOT "${status_code}" STREQUAL "0") message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") -- cgit v1.2.3 From 76d4666f12cbce4a52123cc41d489dfa4ce4bbba Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 2 Nov 2017 19:14:10 -0700 Subject: [vcpkg_acquire_msys] Use vcpkg_download_distfile() --- scripts/cmake/vcpkg_acquire_msys.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index 830022906..80a30bf2b 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -70,14 +70,18 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) set(PATH_TO_ROOT ${TOOLPATH}/${TOOLSUBPATH}) if(NOT EXISTS "${TOOLPATH}/${STAMP}") + message(STATUS "Acquiring MSYS2...") - file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE} - EXPECTED_HASH SHA512=${HASH} + vcpkg_download_distfile(ARCHIVE_PATH + URLS ${URL} + FILENAME ${ARCHIVE} + SHA512 ${HASH} ) + file(REMOVE_RECURSE ${TOOLPATH}/${TOOLSUBPATH}) file(MAKE_DIRECTORY ${TOOLPATH}) execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} + COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE_PATH} WORKING_DIRECTORY ${TOOLPATH} ) execute_process( -- cgit v1.2.3 From 8bbd043beac822c20c54e6f2ee686777c9a20ac9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 14:34:08 -0700 Subject: vcpkg_from_github] Use vcpkg_download_distfile() --- scripts/cmake/vcpkg_download_distfile.cmake | 4 ++++ scripts/cmake/vcpkg_from_github.cmake | 33 ++++++++++++----------------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 0141e9811..b22d82a16 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -46,6 +46,10 @@ function(vcpkg_download_distfile VAR) file(MAKE_DIRECTORY "${DOWNLOADS}/temp") function(test_hash FILE_KIND CUSTOM_ERROR_ADVICE) + if (_VCPKG_INTERNAL_NO_HASH_CHECK) + return() + endif() + message(STATUS "Testing integrity of ${FILE_KIND}...") file(SHA512 ${downloaded_file_path} FILE_HASH) if(NOT "${FILE_HASH}" STREQUAL "${vcpkg_download_distfile_SHA512}") diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index d14077410..1ede43fd8 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -113,7 +113,8 @@ function(vcpkg_from_github) # The following is for --head scenarios set(URL "https://github.com/${ORG_NAME}/${REPO_NAME}/archive/${_vdud_HEAD_REF}.tar.gz") - set(downloaded_file_path "${DOWNLOADS}/${ORG_NAME}-${REPO_NAME}-${_vdud_HEAD_REF}.tar.gz") + set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${_vdud_HEAD_REF}.tar.gz") + set(downloaded_file_path "${DOWNLOADS}/${downloaded_file_name}") if(_VCPKG_NO_DOWNLOADS) if(NOT EXISTS ${downloaded_file_path} OR NOT EXISTS ${downloaded_file_path}.version) @@ -133,35 +134,27 @@ function(vcpkg_from_github) endif() # Try to download the file and version information from github. - message(STATUS "Downloading ${URL}...") - file(DOWNLOAD "https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/git/refs/heads/${_vdud_HEAD_REF}" - ${downloaded_file_path}.version - STATUS download_status + set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") + vcpkg_download_distfile(ARCHIVE_VERSION + URLS "https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/git/refs/heads/${_vdud_HEAD_REF}" + FILENAME ${downloaded_file_name}.version ) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - file(REMOVE ${downloaded_file_path}.version) - message(FATAL_ERROR "Downloading version info for ${URL}... Failed. Status: ${download_status}") - endif() - file(DOWNLOAD ${URL} ${downloaded_file_path} STATUS download_status) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - file(REMOVE ${downloaded_file_path}) - message(FATAL_ERROR "Downloading ${URL}... Failed. Status: ${download_status}") - else() - message(STATUS "Downloading ${URL}... OK") - endif() + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${downloaded_file_name} + ) + set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() vcpkg_extract_source_archive_ex( - ARCHIVE "${downloaded_file_path}" + ARCHIVE "${ARCHIVE}" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/head" ) # Parse the github refs response with regex. # TODO: use some JSON swiss-army-knife utility instead. - file(READ "${downloaded_file_path}.version" _contents) + file(READ "${ARCHIVE_VERSION}" _contents) string(REGEX MATCH "\"sha\": \"[a-f0-9]+\"" x "${_contents}") string(REGEX REPLACE "\"sha\": \"([a-f0-9]+)\"" "\\1" _version ${x}) -- cgit v1.2.3 From a523aacff8a642d4380e5f53b87404118b5d2a03 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 14:50:16 -0700 Subject: [vcpkg_from_bitbucket] Use vcpkg_download_distfile() --- scripts/cmake/vcpkg_from_bitbucket.cmake | 38 +++++++++++++------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/scripts/cmake/vcpkg_from_bitbucket.cmake b/scripts/cmake/vcpkg_from_bitbucket.cmake index 227de5141..26600f013 100644 --- a/scripts/cmake/vcpkg_from_bitbucket.cmake +++ b/scripts/cmake/vcpkg_from_bitbucket.cmake @@ -92,13 +92,13 @@ function(vcpkg_from_bitbucket) message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") set(VCPKG_USE_HEAD_VERSION OFF) endif() - + # Handle --no-head scenarios if(NOT VCPKG_USE_HEAD_VERSION) if(NOT _vdud_REF) message(FATAL_ERROR "Package does not specify REF. It must built using --head.") endif() - + set(URL "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz") set(downloaded_file_path "${DOWNLOADS}/${ORG_NAME}-${REPO_NAME}-${_vdud_REF}.tar.gz") @@ -117,7 +117,7 @@ function(vcpkg_from_bitbucket) else() set(_version ${_vdud_REF}) endif() - + vcpkg_download_distfile(ARCHIVE URLS "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz" SHA512 "${_vdud_SHA512}" @@ -150,39 +150,31 @@ function(vcpkg_from_bitbucket) endif() # Try to download the file and version information from bitbucket. - message(STATUS "Downloading ${URL}...") - file(DOWNLOAD "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/branches/${_vdud_HEAD_REF}" - ${downloaded_file_path}.version - STATUS download_status + set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") + vcpkg_download_distfile(ARCHIVE_VERSION + URLS "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/branches/${_vdud_HEAD_REF}" + FILENAME ${downloaded_file_name}.version ) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - file(REMOVE ${downloaded_file_path}.version) - message(FATAL_ERROR "Downloading version info for ${URL}... Failed. Status: ${download_status}") - endif() - file(DOWNLOAD ${URL} ${downloaded_file_path} STATUS download_status) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - file(REMOVE ${downloaded_file_path}) - message(FATAL_ERROR "Downloading ${URL}... Failed. Status: ${download_status}") - else() - message(STATUS "Downloading ${URL}... OK") - endif() + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${downloaded_file_name} + ) + set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() vcpkg_extract_source_archive_ex( - ARCHIVE "${downloaded_file_path}" + ARCHIVE "${ARCHIVE}" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/head" ) # Parse the github refs response with regex. # TODO: use some JSON swiss-army-knife utility instead. - file(READ "${downloaded_file_path}.version" _contents) + file(READ "${ARCHIVE_VERSION}" _contents) string(REGEX MATCH "\"hash\": \"[a-f0-9]+\"" x "${_contents}") string(REGEX REPLACE "\"hash\": \"([a-f0-9]+)\"" "\\1" _version ${x}) string(SUBSTRING ${_version} 0 12 _vdud_HEAD_REF) # Get the 12 first numbers from commit hash - + # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) -- cgit v1.2.3 From 0fb0191f3cb9ba4ea0f0e0675f929e1e599e1461 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 14:52:02 -0700 Subject: [ports.cmake] Use vcpkg_download_distfile() --- scripts/ports.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/ports.cmake b/scripts/ports.cmake index 8b4d17d80..ef06a4d65 100644 --- a/scripts/ports.cmake +++ b/scripts/ports.cmake @@ -108,10 +108,12 @@ elseif(CMD MATCHES "^CREATE$") message(STATUS "If this is not desired, delete the file and ${NATIVE_VCPKG_ROOT_DIR}\\ports\\${PORT}") else() include(vcpkg_download_distfile) - file(DOWNLOAD ${URL} ${DOWNLOADS}/${FILENAME} STATUS error_code) - if(NOT error_code MATCHES "0;") - message(FATAL_ERROR "Error downloading file: ${error_code}") - endif() + set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${FILENAME} + ) + set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() file(SHA512 ${DOWNLOADS}/${FILENAME} SHA512) -- cgit v1.2.3 From bd91824bca86387a436785d1b757d23a06593677 Mon Sep 17 00:00:00 2001 From: sdcb Date: Fri, 3 Nov 2017 11:51:24 +0800 Subject: [antlr] upgrade to antlr4.7 --- ports/antlr4/portfile.cmake | 6 +++--- ports/antlr4/static.patch | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ports/antlr4/portfile.cmake b/ports/antlr4/portfile.cmake index 868efcdbe..d344e9d06 100644 --- a/ports/antlr4/portfile.cmake +++ b/ports/antlr4/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(VERSION 4.6) +set(VERSION 4.7) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/runtime) vcpkg_download_distfile(ARCHIVE - URLS "http://www.antlr.org/download/antlr4-cpp-runtime-4.6-source.zip" + URLS "http://www.antlr.org/download/antlr4-cpp-runtime-4.7-source.zip" FILENAME "antlr4-cpp-runtime-${VERSION}-source.zip" - SHA512 e123c2227e41ce80da5a3758725a018690ed70a4e10c23da26c966259e6bdafa192f4363f5a7e1181ef9a47bf3cc50d6b0ca7b26c8dd2b19222a7edf54de8de2 + SHA512 a14fd3320537075a8d4c1cfa81d416bad6257d238608e2428f4930495072cce984c707126e3777ffd3849dd6b6cdf1bf43624bd6d318b1fa5dd6749a7304f808 ) # license not exist in antlr folder. diff --git a/ports/antlr4/static.patch b/ports/antlr4/static.patch index fb54c5ae4..e66787233 100644 --- a/ports/antlr4/static.patch +++ b/ports/antlr4/static.patch @@ -1,12 +1,12 @@ diff --git a/antlr4-common.h b/antlr4-common.h -index 197fd6d..34a62c8 100644 +index ce45e9e..3162795 100644 --- a/antlr4-common.h +++ b/antlr4-common.h -@@ -34,6 +34,7 @@ - #include - #include +@@ -48,6 +48,7 @@ + #endif -+#define ANTLR4CPP_STATIC - // Defines for the Guid class and other platform dependent stuff. - #ifdef _WIN32 - #pragma warning (disable: 4250) // Class inherits by dominance. + #define GUID_WINDOWS ++ #define ANTLR4CPP_STATIC + + #ifdef _WIN64 + typedef __int64 ssize_t; -- cgit v1.2.3 From 7af697e6e8c257546e44b8788588c1f1ef52fafd Mon Sep 17 00:00:00 2001 From: sdcb Date: Fri, 3 Nov 2017 12:32:03 +0800 Subject: [antlr4] bump version to 4.7 --- ports/antlr4/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/antlr4/CONTROL b/ports/antlr4/CONTROL index 03877e495..bf4df8d1c 100644 --- a/ports/antlr4/CONTROL +++ b/ports/antlr4/CONTROL @@ -1,3 +1,3 @@ Source: antlr4 -Version: 4.6-1 +Version: 4.7 Description: ANother Tool for Language Recognition \ No newline at end of file -- cgit v1.2.3 From 82ce87cfd0854907a270ef2f8de80670bd8428b3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 15:48:21 -0700 Subject: Use download-at-temp-and-rename pattern in powershell too --- scripts/fetchDependency.ps1 | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 4ef3a1f17..9d3f76386 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -65,6 +65,18 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) New-Item -ItemType directory -Path $downloadDir | Out-Null } + $downloadsTemp = "$downloadDir/temp" + if (Test-Path $downloadsTemp) # Delete temp dir if it exists + { + Remove-Item $downloadsTemp -Recurse -Force + } + if (!(Test-Path $downloadsTemp)) # Recreate temp dir. It may still be there the dir was in use + { + New-Item -ItemType directory -Path $downloadsTemp | Out-Null + } + + $tempDownloadName = "$downloadsTemp/$Dependency-$downloadVersion.temp" + $WC = New-Object System.Net.WebClient $ProxyAuth = !$WC.Proxy.IsBypassed($url) @@ -79,15 +91,16 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential", $ProxyCred) } - Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop + Start-BitsTransfer -Source $url -Destination $tempDownloadName -ErrorAction Stop + Move-Item -Path $tempDownloadName -Destination $downloadPath return } catch [System.Exception] { # If BITS fails for any reason, delete any potentially partially downloaded files and continue - if (Test-Path $downloadPath) + if (Test-Path $tempDownloadName) { - Remove-Item $downloadPath + Remove-Item $tempDownloadName } } } @@ -98,7 +111,8 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } Write-Verbose("Downloading $Dependency...") - $WC.DownloadFile($url, $downloadPath) + $WC.DownloadFile($url, $tempDownloadName) + Move-Item -Path $tempDownloadName -Destination $downloadPath } # Enums (without resorting to C#) are only available on powershell 5+. -- cgit v1.2.3 From 57934e5bbe485e904b47d49b3609d4000a4ca952 Mon Sep 17 00:00:00 2001 From: bjornpiltz Date: Thu, 2 Nov 2017 10:48:52 +0100 Subject: Print error message when there is a syntax error in triplet file As it is now vcpkg fails silently (actually, it outputs two empty lines). --- 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 8b4654aa8..ca0712a06 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -489,7 +489,7 @@ namespace vcpkg::Build {"CMAKE_TRIPLET_FILE", triplet_file_path}, }); const auto ec_data = System::cmd_execute_and_capture_output(cmd_launch_cmake); - Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0); + Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, ec_data.output); const std::vector lines = Strings::split(ec_data.output, "\n"); -- cgit v1.2.3 From 98b2654c77149099cc84cb710fe0608060bdc4a3 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 3 Nov 2017 10:33:48 -0700 Subject: [fdk-aac] init --- ports/fdk-aac/CMakeLists.txt | 206 +++++++++++++++++++++++++++++++++++++++++++ ports/fdk-aac/CONTROL | 3 + ports/fdk-aac/fdk-aac.def | 19 ++++ ports/fdk-aac/portfile.cmake | 22 +++++ 4 files changed, 250 insertions(+) create mode 100644 ports/fdk-aac/CMakeLists.txt create mode 100644 ports/fdk-aac/CONTROL create mode 100644 ports/fdk-aac/fdk-aac.def create mode 100644 ports/fdk-aac/portfile.cmake diff --git a/ports/fdk-aac/CMakeLists.txt b/ports/fdk-aac/CMakeLists.txt new file mode 100644 index 000000000..869703c19 --- /dev/null +++ b/ports/fdk-aac/CMakeLists.txt @@ -0,0 +1,206 @@ +cmake_minimum_required(VERSION 3.8.0) + +project(fdk-aac) + +set(AACDEC_SRC + libAACdec/src/aacdec_drc.cpp + libAACdec/src/aacdec_hcr.cpp + libAACdec/src/aacdecoder.cpp + libAACdec/src/aacdec_pns.cpp + libAACdec/src/aac_ram.cpp + libAACdec/src/block.cpp + libAACdec/src/channelinfo.cpp + libAACdec/src/ldfiltbank.cpp + libAACdec/src/rvlcbit.cpp + libAACdec/src/rvlc.cpp + libAACdec/src/aacdec_hcr_bit.cpp + libAACdec/src/aacdec_hcrs.cpp + libAACdec/src/aacdecoder_lib.cpp + libAACdec/src/aacdec_tns.cpp + libAACdec/src/aac_rom.cpp + libAACdec/src/channel.cpp + libAACdec/src/conceal.cpp + libAACdec/src/pulsedata.cpp + libAACdec/src/rvlcconceal.cpp + libAACdec/src/stereo.cpp +) + +set(AACENC_SRC + libAACenc/src/aacenc.cpp + libAACenc/src/aacEnc_ram.cpp + libAACenc/src/band_nrg.cpp + libAACenc/src/block_switch.cpp + libAACenc/src/grp_data.cpp + libAACenc/src/metadata_main.cpp + libAACenc/src/pre_echo_control.cpp + libAACenc/src/quantize.cpp + libAACenc/src/tonality.cpp + libAACenc/src/aacEnc_rom.cpp + libAACenc/src/bandwidth.cpp + libAACenc/src/channel_map.cpp + libAACenc/src/intensity.cpp + libAACenc/src/ms_stereo.cpp + libAACenc/src/psy_configuration.cpp + libAACenc/src/sf_estim.cpp + libAACenc/src/transform.cpp + libAACenc/src/aacenc_lib.cpp + libAACenc/src/aacenc_tns.cpp + libAACenc/src/bit_cnt.cpp + libAACenc/src/chaosmeasure.cpp + libAACenc/src/line_pe.cpp + libAACenc/src/noisedet.cpp + libAACenc/src/psy_main.cpp + libAACenc/src/spreading.cpp + libAACenc/src/aacenc_pns.cpp + libAACenc/src/adj_thr.cpp + libAACenc/src/bitenc.cpp + libAACenc/src/dyn_bits.cpp + libAACenc/src/metadata_compressor.cpp + libAACenc/src/pnsparam.cpp + libAACenc/src/qc_main.cpp +) + +set(FDK_SRC + libFDK/src/autocorr2nd.cpp + libFDK/src/dct.cpp + libFDK/src/FDK_bitbuffer.cpp + libFDK/src/FDK_core.cpp + libFDK/src/FDK_crc.cpp + libFDK/src/FDK_hybrid.cpp + libFDK/src/FDK_tools_rom.cpp + libFDK/src/FDK_trigFcts.cpp + libFDK/src/fft.cpp + libFDK/src/fft_rad2.cpp + libFDK/src/fixpoint_math.cpp + libFDK/src/mdct.cpp + libFDK/src/qmf.cpp + libFDK/src/scale.cpp +) + +set(MPEGTPDEC_SRC + libMpegTPDec/src/tpdec_adif.cpp + libMpegTPDec/src/tpdec_adts.cpp + libMpegTPDec/src/tpdec_asc.cpp + libMpegTPDec/src/tpdec_drm.cpp + libMpegTPDec/src/tpdec_latm.cpp + libMpegTPDec/src/tpdec_lib.cpp +) + +set( MPEGTPENC_SRC + libMpegTPEnc/src/tpenc_adif.cpp + libMpegTPEnc/src/tpenc_adts.cpp + libMpegTPEnc/src/tpenc_asc.cpp + libMpegTPEnc/src/tpenc_latm.cpp + libMpegTPEnc/src/tpenc_lib.cpp +) + +set( PCMUTILS_SRC + libPCMutils/src/limiter.cpp + libPCMutils/src/pcmutils_lib.cpp +) + +set(SBRDEC_SRC + libSBRdec/src/env_calc.cpp + libSBRdec/src/env_dec.cpp + libSBRdec/src/env_extr.cpp + libSBRdec/src/huff_dec.cpp + libSBRdec/src/lpp_tran.cpp + libSBRdec/src/psbitdec.cpp + libSBRdec/src/psdec.cpp + libSBRdec/src/psdec_hybrid.cpp + libSBRdec/src/sbr_crc.cpp + libSBRdec/src/sbr_deb.cpp + libSBRdec/src/sbr_dec.cpp + libSBRdec/src/sbrdec_drc.cpp + libSBRdec/src/sbrdec_freq_sca.cpp + libSBRdec/src/sbrdecoder.cpp + libSBRdec/src/sbr_ram.cpp + libSBRdec/src/sbr_rom.cpp +) + +set(SBRENC_SRC + libSBRenc/src/bit_sbr.cpp + libSBRenc/src/env_bit.cpp + libSBRenc/src/fram_gen.cpp + libSBRenc/src/mh_det.cpp + libSBRenc/src/ps_bitenc.cpp + libSBRenc/src/ps_encode.cpp + libSBRenc/src/resampler.cpp + libSBRenc/src/sbr_encoder.cpp + libSBRenc/src/sbr_ram.cpp + libSBRenc/src/ton_corr.cpp + libSBRenc/src/code_env.cpp + libSBRenc/src/env_est.cpp + libSBRenc/src/invf_est.cpp + libSBRenc/src/nf_est.cpp + libSBRenc/src/ps_main.cpp + libSBRenc/src/sbrenc_freq_sca.cpp + libSBRenc/src/sbr_misc.cpp + libSBRenc/src/sbr_rom.cpp + libSBRenc/src/tran_det.cpp +) + +set(SYS_SRC + libSYS/src/cmdl_parser.cpp + libSYS/src/conv_string.cpp + libSYS/src/genericStds.cpp + libSYS/src/wav_file.cpp +) + +set( + libfdk_aac_SOURCES + ${AACDEC_SRC} ${AACENC_SRC} + ${MPEGTPDEC_SRC} ${MPEGTPENC_SRC} + ${SBRDEC_SRC} ${SBRENC_SRC} + ${PCMUTILS_SRC} ${FDK_SRC} ${SYS_SRC} + fdk-aac.def +) + +include_directories( + . + win32 + libAACdec/include + libAACenc/include + libSBRdec/include + libSBRenc/include + libMpegTPDec/include + libMpegTPEnc/include + libSYS/include + libFDK/include + libPCMutils/include +) +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +add_library(fdk-aac ${libfdk_aac_SOURCES}) + +add_executable(aac-enc aac-enc.c wavreader.c) + +target_link_libraries(aac-enc fdk-aac) + +install( + TARGETS fdk-aac + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS aac-enc + RUNTIME DESTINATION tools/fdk-aac + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES + libAACdec/include/aacdecoder_lib.h + libAACenc/include/aacenc_lib.h + libSYS/include/FDK_audio.h + libSYS/include/genericStds.h + libSYS/include/machine_type.h + DESTINATION include + ) +endif() diff --git a/ports/fdk-aac/CONTROL b/ports/fdk-aac/CONTROL new file mode 100644 index 000000000..126a2f5a1 --- /dev/null +++ b/ports/fdk-aac/CONTROL @@ -0,0 +1,3 @@ +Source: fdk-aac +Version: 2017-11-02-1e351 +Description: A standalone library of the Fraunhofer FDK AAC code diff --git a/ports/fdk-aac/fdk-aac.def b/ports/fdk-aac/fdk-aac.def new file mode 100644 index 000000000..8690b69b6 --- /dev/null +++ b/ports/fdk-aac/fdk-aac.def @@ -0,0 +1,19 @@ +EXPORTS +aacDecoder_AncDataGet +aacDecoder_AncDataInit +aacDecoder_Close +aacDecoder_ConfigRaw +aacDecoder_DecodeFrame +aacDecoder_Fill +aacDecoder_GetFreeBytes +aacDecoder_GetLibInfo +aacDecoder_GetStreamInfo +aacDecoder_Open +aacDecoder_SetParam +aacEncClose +aacEncEncode +aacEncGetLibInfo +aacEncInfo +aacEncOpen +aacEncoder_GetParam +aacEncoder_SetParam diff --git a/ports/fdk-aac/portfile.cmake b/ports/fdk-aac/portfile.cmake new file mode 100644 index 000000000..7142ca795 --- /dev/null +++ b/ports/fdk-aac/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mstorsjo/fdk-aac + REF 1e3515e03e2dbdbd48dacc31ef75d25c201a4c51 + SHA512 4bb0cb75fac46b30f64f5588a528f3c97d66b456fb866524018596dc79eb8b01735eb7e2bc56489127091924117a8a5f4a722dd9cc90c4caa8ad5c55e58faa40 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/fdk-aac.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/fdk-aac) +file(INSTALL ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fdk-aac RENAME copyright) -- cgit v1.2.3 From 9dc02f48b65618ab7f89c5a004a3d81fc882af32 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 16:35:15 -0700 Subject: [fetchDependendy.ps1] Remove obsolete comment --- scripts/fetchDependency.ps1 | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 9d3f76386..6788b5e7e 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -57,9 +57,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) return } - # Can't print because vcpkg captures the output and expects only the path that is returned at the end of this script file - # Write-Host "A suitable version of $Dependency was not found (required v$requiredVersion). Downloading portable $Dependency v$downloadVersion..." - if (!(Test-Path $downloadDir)) { New-Item -ItemType directory -Path $downloadDir | Out-Null -- cgit v1.2.3 From a4dc2d2ef29654df9587d60f586c2eea16dedaaf Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 16:39:43 -0700 Subject: [fetchDependency.ps1] Improve error message on hash mismatch --- scripts/fetchDependency.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6788b5e7e..593cba2a6 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -239,9 +239,14 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $downloadedFileHash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) } + $downloadedFileHash = $downloadedFileHash.ToLower() if ($expectedDownloadedFileHash -ne $downloadedFileHash) { - throw [System.IO.FileNotFoundException] ("Mismatching hash of the downloaded " + $Dependency) + Write-Host ("`nFile does not have expected hash:`n" + + " File path: [ $downloadPath ]`n" + + " Expected hash: [ $expectedDownloadedFileHash ]`n" + + " Actual hash: [ $downloadedFileHash ]`n") + throw "Invalid Hash" } if ($extractionType -eq $ExtractionType_NO_EXTRACTION_REQUIRED) @@ -270,7 +275,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if (-not (Test-Path $executableFromDownload)) { - throw [System.IO.FileNotFoundException] ("Could not detect or download " + $Dependency) + throw ("Could not detect or download " + $Dependency) } return $executableFromDownload -- cgit v1.2.3 From ad884fc2966c0d8fdff6835d481fd301bfc438ad Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 16:40:28 -0700 Subject: [vswhere] Update to 2.2.11 (was 2.2.7) --- scripts/fetchDependency.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 593cba2a6..f78d159d0 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -181,11 +181,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "vswhere") { - $requiredVersion = "2.2.7" - $downloadVersion = "2.2.7" - $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.7/vswhere.exe" + $requiredVersion = "2.2.11" + $downloadVersion = "2.2.11" + $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.11/vswhere.exe" $downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe" - $expectedDownloadedFileHash = "f50303881da706132516d9decfd5314d524a0044daf49c0cfd21dc39c1261ec3" + $expectedDownloadedFileHash = "0235c2cb6341978abdf32e27fcf1d7af5cb5514c035e529c4cd9283e6f1a261f" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } -- cgit v1.2.3 From 3cb9769d7b1a0f87dbb5be0dce2386f569fbbe95 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 3 Nov 2017 09:59:44 -0700 Subject: libaiff --- ports/libaiff/CMakeLists.txt | 32 +++++ ports/libaiff/CONTROL | 3 + ports/libaiff/allow_utf_16_filename.patch | 214 ++++++++++++++++++++++++++++++ ports/libaiff/config.h | 12 ++ ports/libaiff/portfile.cmake | 40 ++++++ 5 files changed, 301 insertions(+) create mode 100644 ports/libaiff/CMakeLists.txt create mode 100644 ports/libaiff/CONTROL create mode 100644 ports/libaiff/allow_utf_16_filename.patch create mode 100644 ports/libaiff/config.h create mode 100644 ports/libaiff/portfile.cmake diff --git a/ports/libaiff/CMakeLists.txt b/ports/libaiff/CMakeLists.txt new file mode 100644 index 000000000..9dcfd46d2 --- /dev/null +++ b/ports/libaiff/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required (VERSION 3.9) +project (libaiff) +set(SRC + iff.c aifx.c lpcm.c g711.c + float32.c libaiff.c + extended.c pascal.c +) + +if(MSVC) + add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DHAVE_INTTYPES_H -DHAVE_STDINT_H -DHAVE_STRING_H -DHAVE_STDLIB_H) +endif() + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +include_directories(.) + +add_library(libaiff ${SRC}) + + +install( + TARGETS libaiff + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES libaiff/libaiff.h libaiff/config.h libaiff/endian.h DESTINATION include/libaiff) +endif() diff --git a/ports/libaiff/CONTROL b/ports/libaiff/CONTROL new file mode 100644 index 000000000..21078bfe8 --- /dev/null +++ b/ports/libaiff/CONTROL @@ -0,0 +1,3 @@ +Source: libaiff +Version: 5.0 +Description: LibAiff is an open-source library, providing C applications transparent read & write operations for Audio Interchange File Format (AIFF) files, with the goal of supporting all of its features diff --git a/ports/libaiff/allow_utf_16_filename.patch b/ports/libaiff/allow_utf_16_filename.patch new file mode 100644 index 000000000..fb927763f --- /dev/null +++ b/ports/libaiff/allow_utf_16_filename.patch @@ -0,0 +1,214 @@ +diff --git a/libaiff.c b/libaiff.c +index d0ad40d..e266802 100644 +--- a/libaiff.c ++++ b/libaiff.c +@@ -44,6 +44,8 @@ static struct decoder* decoders[] = { + + static AIFF_Ref AIFF_ReadOpen (const char *, int); + static AIFF_Ref AIFF_WriteOpen (const char *, int); ++static AIFF_Ref AIFF_ReadOpenW (const wchar_t*, int); ++static AIFF_Ref AIFF_WriteOpenW (const wchar_t*, int); + static void AIFF_ReadClose (AIFF_Ref); + static int AIFF_WriteClose (AIFF_Ref); + static void* InitBuffer (AIFF_Ref, size_t); +@@ -53,6 +55,21 @@ static int Prepare (AIFF_Ref); + static void Unprepare (AIFF_Ref); + static struct decoder* FindDecoder (IFFType); + ++#ifdef _WIN32 ++AIFF_Ref ++AIFF_OpenFileW(const wchar_t *file, int flags) ++{ ++ AIFF_Ref ref = NULL; ++ ++ if (flags & F_RDONLY) { ++ ref = AIFF_ReadOpenW(file, flags); ++ } else if (flags & F_WRONLY) { ++ ref = AIFF_WriteOpenW(file, flags); ++ } ++ ++ return ref; ++} ++#endif + AIFF_Ref + AIFF_OpenFile(const char *file, int flags) + { +@@ -86,6 +103,76 @@ AIFF_CloseFile(AIFF_Ref ref) + return r; + } + ++#ifdef _WIN32 ++static AIFF_Ref ++AIFF_ReadOpenW(const wchar_t *file, int flags) ++{ ++ AIFF_Ref r; ++ IFFHeader hdr; ++ ++ r = malloc(kAIFFRefSize); ++ if (!r) { ++ return NULL; ++ } ++ r->fd = _wfopen(file, L"rb"); ++ if (r->fd == NULL) { ++ free(r); ++ return NULL; ++ } ++ r->flags = F_RDONLY | flags; ++ if (fread(&hdr, 1, 4, r->fd) < 4) { ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ switch (hdr.hid) { ++ case AIFF_TYPE_IFF: ++ /* Continue reading the IFF header */ ++ if (fread(&(hdr.len), 1, 8, r->fd) < 8) { ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ if (hdr.len == 0) { ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ /* ++ * Check the format type (AIFF or AIFC) ++ */ ++ r->format = hdr.fid; ++ switch (r->format) { ++ case AIFF_TYPE_AIFF: ++ case AIFF_TYPE_AIFC: ++ break; ++ default: ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ ++ if (init_aifx(r) < 1) { ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ break; ++ default: ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ ++ r->stat = 0; ++ r->buffer = NULL; ++ r->buflen = 0; ++ ++ return r; ++} ++ ++#endif ++ + static AIFF_Ref + AIFF_ReadOpen(const char *file, int flags) + { +@@ -450,6 +537,89 @@ AIFF_ReadClose(AIFF_Ref r) + return; + } + ++#ifdef WIN32 ++static AIFF_Ref ++AIFF_WriteOpenW(const wchar_t *file, int flags) ++{ ++ AIFF_Ref w; ++ IFFHeader hdr; ++ ASSERT(sizeof(IFFHeader) == 12); ++ ++ w = malloc(kAIFFRefSize); ++ if (!w) { ++err0: ++ return NULL; ++ } ++ ++ /* ++ * Simultaneous open for reading & writing ++ */ ++ w->fd = _wfopen(file, L"w+b"); ++ if (w->fd == NULL) { ++err1: ++ free(w); ++ goto err0; ++ } ++ hdr.hid = ARRANGE_BE32(AIFF_FORM); ++ w->len = 4; ++ hdr.len = ARRANGE_BE32(4); ++ if (flags & F_AIFC) ++ hdr.fid = ARRANGE_BE32(AIFF_AIFC); ++ else ++ hdr.fid = ARRANGE_BE32(AIFF_AIFF); ++ ++ if (fwrite(&hdr, 1, 12, w->fd) < 12) { ++err2: ++ fclose(w->fd); ++ goto err1; ++ } ++ w->stat = 0; ++ w->segmentSize = 0; ++ w->buffer = NULL; ++ w->buflen = 0; ++ w->tics = 0; ++ ++ /* ++ * If writing AIFF-C, write the required FVER chunk ++ */ ++ if (flags & F_AIFC) { ++ IFFChunk chk; ++ uint32_t vers; ++ ASSERT(sizeof(IFFChunk) == 8); ++ ++ chk.id = ARRANGE_BE32(AIFF_FVER); ++ chk.len = ARRANGE_BE32(4); ++ vers = ARRANGE_BE32(AIFC_STD_DRAFT_082691); ++ ++ if (fwrite(&chk, 1, 8, w->fd) < 8 || ++ fwrite(&vers, 1, 4, w->fd) < 4) { ++ goto err2; ++ } ++ ++ w->len += 12; ++ ++ /* ++ * If no endianness specified for AIFF-C, ++ * default to big endian ++ */ ++ if (!(flags & (LPCM_LTE_ENDIAN | LPCM_BIG_ENDIAN))) { ++ flags |= LPCM_BIG_ENDIAN; ++ } ++ } else { ++ /* ++ * If writing regular AIFF, make sure we ++ * write big-endian data ++ */ ++ flags &= ~LPCM_LTE_ENDIAN; ++ flags |= LPCM_BIG_ENDIAN; ++ } ++ ++ w->flags = F_WRONLY | flags; ++ ++ return w; ++} ++#endif ++ + static AIFF_Ref + AIFF_WriteOpen(const char *file, int flags) + { +diff --git a/libaiff/libaiff.h b/libaiff/libaiff.h +index 56fc77f..e1940a5 100644 +--- a/libaiff/libaiff.h ++++ b/libaiff/libaiff.h +@@ -165,6 +165,7 @@ typedef struct s_Instrument Instrument ; + + /* == Function prototypes == */ + AIFF_Ref AIFF_OpenFile(const char *, int) ; ++AIFF_Ref AIFF_OpenFile(const wchar_t *, int) ; + int AIFF_CloseFile(AIFF_Ref) ; + char* AIFF_GetAttribute(AIFF_Ref,IFFType) ; + int AIFF_GetInstrumentData(AIFF_Ref,Instrument*) ; diff --git a/ports/libaiff/config.h b/ports/libaiff/config.h new file mode 100644 index 000000000..f7c04eebf --- /dev/null +++ b/ports/libaiff/config.h @@ -0,0 +1,12 @@ +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "marcotrillo@gmail.com" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "LibAiff (MSVC)" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "LibAiff (MSVC) $Revision: 1.1 $" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "$Revision: 1.1 $" + diff --git a/ports/libaiff/portfile.cmake b/ports/libaiff/portfile.cmake new file mode 100644 index 000000000..146d24c7f --- /dev/null +++ b/ports/libaiff/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libaiff-5.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/aifftools/files/libaiff/LibAiff%205.0/libaiff-5.0-release.tar.gz" + FILENAME "libaiff-5.0-release.tar.gz" + SHA512 7800f9a3fbd0c5a17b8cc6c9b60181131d159ab5f5fb8e7de54e8f88c151717a988231de664a635e61940267c854a9ce83d58b12e322dcdda3aa8080c7b15f66 +) +vcpkg_extract_source_archive(${ARCHIVE}) + + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/allow_utf_16_filename.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/libaiff) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/libaiff/*.h") +foreach(HEADER ${HEADERS}) + file(READ "${HEADER}" _contents) + string(REPLACE "#ifdef HAVE_STDINT_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_STRING_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_STDLIB_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_INTTYPES_H" "#if 1" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") +endforeach() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libaiff RENAME copyright) -- cgit v1.2.3 From 669e7a981eaabe7df1734aab3d79a4a5cbb19109 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 3 Nov 2017 11:08:37 -0700 Subject: Append W --- ports/libaiff/allow_utf_16_filename.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libaiff/allow_utf_16_filename.patch b/ports/libaiff/allow_utf_16_filename.patch index fb927763f..773b492fd 100644 --- a/ports/libaiff/allow_utf_16_filename.patch +++ b/ports/libaiff/allow_utf_16_filename.patch @@ -208,7 +208,7 @@ index 56fc77f..e1940a5 100644 /* == Function prototypes == */ AIFF_Ref AIFF_OpenFile(const char *, int) ; -+AIFF_Ref AIFF_OpenFile(const wchar_t *, int) ; ++AIFF_Ref AIFF_OpenFileW(const wchar_t *, int) ; int AIFF_CloseFile(AIFF_Ref) ; char* AIFF_GetAttribute(AIFF_Ref,IFFType) ; int AIFF_GetInstrumentData(AIFF_Ref,Instrument*) ; -- cgit v1.2.3 From 79067748292b613b2d3bcabf8d5cdd71a8100cef Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 3 Nov 2017 12:58:17 -0700 Subject: [libaiff] fix uninitialized buffer --- ports/libaiff/buffer_uninitialized.patch | 42 +++++++++++++++++ ports/libaiff/portfile.cmake | 81 ++++++++++++++++---------------- 2 files changed, 83 insertions(+), 40 deletions(-) create mode 100644 ports/libaiff/buffer_uninitialized.patch diff --git a/ports/libaiff/buffer_uninitialized.patch b/ports/libaiff/buffer_uninitialized.patch new file mode 100644 index 000000000..855d11a36 --- /dev/null +++ b/ports/libaiff/buffer_uninitialized.patch @@ -0,0 +1,42 @@ +diff --git "a/libaiff.c" "b/libaiff.c" +index e266802..21179f9 100644 +--- "a/libaiff.c" ++++ "b/libaiff.c" +@@ -168,6 +168,9 @@ AIFF_ReadOpenW(const wchar_t *file, int flags) + r->buffer = NULL; + r->buflen = 0; + ++ r->buffer2 = NULL; ++ r->buflen2 = 0; ++ + return r; + } + +@@ -237,6 +240,9 @@ AIFF_ReadOpen(const char *file, int flags) + r->buffer = NULL; + r->buflen = 0; + ++ r->buffer2 = NULL; ++ r->buflen2 = 0; ++ + return r; + } + +@@ -577,6 +583,8 @@ err2: + w->segmentSize = 0; + w->buffer = NULL; + w->buflen = 0; ++ w->buffer2 = NULL; ++ w->buflen2 = 0; + w->tics = 0; + + /* +@@ -659,6 +667,8 @@ err2: + w->segmentSize = 0; + w->buffer = NULL; + w->buflen = 0; ++ w->buffer2 = NULL; ++ w->buflen2 = 0; + w->tics = 0; + + /* diff --git a/ports/libaiff/portfile.cmake b/ports/libaiff/portfile.cmake index 146d24c7f..17277159e 100644 --- a/ports/libaiff/portfile.cmake +++ b/ports/libaiff/portfile.cmake @@ -1,40 +1,41 @@ -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libaiff-5.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/aifftools/files/libaiff/LibAiff%205.0/libaiff-5.0-release.tar.gz" - FILENAME "libaiff-5.0-release.tar.gz" - SHA512 7800f9a3fbd0c5a17b8cc6c9b60181131d159ab5f5fb8e7de54e8f88c151717a988231de664a635e61940267c854a9ce83d58b12e322dcdda3aa8080c7b15f66 -) -vcpkg_extract_source_archive(${ARCHIVE}) - - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/allow_utf_16_filename.patch" -) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/libaiff) - - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -) - -vcpkg_install_cmake() - -file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/libaiff/*.h") -foreach(HEADER ${HEADERS}) - file(READ "${HEADER}" _contents) - string(REPLACE "#ifdef HAVE_STDINT_H" "#if 1" _contents "${_contents}") - string(REPLACE "#ifdef HAVE_STRING_H" "#if 1" _contents "${_contents}") - string(REPLACE "#ifdef HAVE_STDLIB_H" "#if 1" _contents "${_contents}") - string(REPLACE "#ifdef HAVE_INTTYPES_H" "#if 1" _contents "${_contents}") - file(WRITE "${HEADER}" "${_contents}") -endforeach() - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libaiff RENAME copyright) +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libaiff-5.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/aifftools/files/libaiff/LibAiff%205.0/libaiff-5.0-release.tar.gz" + FILENAME "libaiff-5.0-release.tar.gz" + SHA512 7800f9a3fbd0c5a17b8cc6c9b60181131d159ab5f5fb8e7de54e8f88c151717a988231de664a635e61940267c854a9ce83d58b12e322dcdda3aa8080c7b15f66 +) +vcpkg_extract_source_archive(${ARCHIVE}) + + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/allow_utf_16_filename.patch" + "${CMAKE_CURRENT_LIST_DIR}/buffer_uninitialized.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/libaiff) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/libaiff/*.h") +foreach(HEADER ${HEADERS}) + file(READ "${HEADER}" _contents) + string(REPLACE "#ifdef HAVE_STDINT_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_STRING_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_STDLIB_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_INTTYPES_H" "#if 1" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") +endforeach() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libaiff RENAME copyright) -- cgit v1.2.3 From 244d6e894f575601835f7b3ae308a648d227188a Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 3 Nov 2017 18:54:44 -0500 Subject: Add the flint2 library (#1988) * Add the "flint2" library. * FIX: update library name * FIX: only set MSVC version to VC14 * FIX: use static linkage * DOC: display notification to the user * [flint/CONTROL] add gettimeofday dependency * [flint/portfile] move up linkage * [flint/portfile] attempt to override the CRT linkage --- ports/flint/CONTROL | 4 ++ ports/flint/dll_flint.patch | 76 ++++++++++++++++++++++++++++ ports/flint/lib_flint.patch | 40 +++++++++++++++ ports/flint/portfile.cmake | 117 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 237 insertions(+) create mode 100644 ports/flint/CONTROL create mode 100644 ports/flint/dll_flint.patch create mode 100644 ports/flint/lib_flint.patch create mode 100644 ports/flint/portfile.cmake diff --git a/ports/flint/CONTROL b/ports/flint/CONTROL new file mode 100644 index 000000000..ee495fc0c --- /dev/null +++ b/ports/flint/CONTROL @@ -0,0 +1,4 @@ +Source: flint +Version: 2.5.2 +Description: Fast Library for Number Theory +Build-Depends: mpir, mpfr, pthreads, gettimeofday diff --git a/ports/flint/dll_flint.patch b/ports/flint/dll_flint.patch new file mode 100644 index 000000000..29e1fa77a --- /dev/null +++ b/ports/flint/dll_flint.patch @@ -0,0 +1,76 @@ +diff --git a/build.vc14/dll_flint/dll_flint.vcxproj b/build.vc14/dll_flint/dll_flint.vcxproj +index 3c8edd3c..947b4e38 100644 +--- a/build.vc14/dll_flint/dll_flint.vcxproj ++++ b/build.vc14/dll_flint/dll_flint.vcxproj +@@ -81,7 +81,7 @@ + + Full + true +- ..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir); ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + NDEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions) + MultiThreadedDLL + $(TargetDir)$(TargetName).pdb +@@ -90,7 +90,7 @@ + + true + true +- ..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies) ++ @NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadsVC2.lib;%(AdditionalDependencies) + + + postbuild $(IntDir) DLL +@@ -105,7 +105,7 @@ + + Disabled + true +- ..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir); ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + _DEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + $(TargetDir)$(TargetName).pdb +@@ -114,7 +114,7 @@ + + true + true +- ..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies) ++ @NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadsVC2.lib;%(AdditionalDependencies) + + + postbuild $(IntDir) DLL +@@ -129,7 +129,7 @@ + + Full + true +- ..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir); ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + NDEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions) + MultiThreadedDLL + $(TargetDir)$(TargetName).pdb +@@ -138,7 +138,7 @@ + + true + true +- ..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies) ++ @NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadsVC2.lib;%(AdditionalDependencies) + + + postbuild $(IntDir) DLL +@@ -153,7 +153,7 @@ + + Disabled + true +- ..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir); ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + _DEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + $(TargetDir)$(TargetName).pdb +@@ -162,7 +162,7 @@ + + true + true +- ..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies) ++ @NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadsVC2.lib;%(AdditionalDependencies) + + + postbuild $(IntDir) DLL diff --git a/ports/flint/lib_flint.patch b/ports/flint/lib_flint.patch new file mode 100644 index 000000000..3d0a4caea --- /dev/null +++ b/ports/flint/lib_flint.patch @@ -0,0 +1,40 @@ +diff --git a/build.vc14/lib_flint/lib_flint.vcxproj b/build.vc14/lib_flint/lib_flint.vcxproj +index c6bd44c0..197d7723 100644 +--- a/build.vc14/lib_flint/lib_flint.vcxproj ++++ b/build.vc14/lib_flint/lib_flint.vcxproj +@@ -81,7 +81,7 @@ + + Full + true +- ..\;..\..\;..\..\..\mpir\lib\$(IntDir);..\..\..\mpfr\lib\$(IntDir);..\..\..\pthreads\lib\$(IntDir) ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + NDEBUG;WIN32;_LIB;HAVE_CONFIG_H;PTW32_STATIC_LIB;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions) + MultiThreaded + $(TargetDir)$(TargetName).pdb +@@ -100,7 +100,7 @@ + + Disabled + true +- ..\;..\..\;..\..\..\mpir\lib\$(IntDir);..\..\..\mpfr\lib\$(IntDir);..\..\..\pthreads\lib\$(IntDir) ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + _DEBUG;WIN32;_LIB;HAVE_CONFIG_H;PTW32_STATIC_LIB;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions) + MultiThreadedDebug + $(TargetDir)$(TargetName).pdb +@@ -119,7 +119,7 @@ + + Full + true +- ..\;..\..\;..\..\..\mpir\lib\$(IntDir);..\..\..\mpfr\lib\$(IntDir);..\..\..\pthreads\lib\$(IntDir) ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + NDEBUG;WIN32;_LIB;HAVE_CONFIG_H;PTW32_STATIC_LIB;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions) + MultiThreaded + $(TargetDir)$(TargetName).pdb +@@ -138,7 +138,7 @@ + + Disabled + true +- ..\;..\..\;..\..\..\mpir\lib\$(IntDir);..\..\..\mpfr\lib\$(IntDir);..\..\..\pthreads\lib\$(IntDir) ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + _DEBUG;WIN32;_LIB;HAVE_CONFIG_H;PTW32_STATIC_LIB;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions) + MultiThreadedDebug + $(TargetDir)$(TargetName).pdb diff --git a/ports/flint/portfile.cmake b/ports/flint/portfile.cmake new file mode 100644 index 000000000..e20ef9731 --- /dev/null +++ b/ports/flint/portfile.cmake @@ -0,0 +1,117 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_CRT_LINKAGE static) + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) + +set(FLINT_VERSION 2.5.2) +set(FLINT_HASH "8606b369af505d5fcedd05d95fcd04afac2a916fc5291501c56785891cfdb2f9bc98700b2d05afd1d9482fb96df2a8c8bf1cd0e5696df46775df9fa743eb900b") +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flint-${FLINT_VERSION}) + +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://www.flintlib.org/flint-${FLINT_VERSION}.zip" + FILENAME "flint-${FLINT_VERSION}.zip" + SHA512 ${FLINT_HASH} +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/lib_flint.patch" + "${CMAKE_CURRENT_LIST_DIR}/dll_flint.patch" +) + +set(MSVC_VERSION 14) + +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +file(COPY ${SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +get_filename_component(SOURCE_DIR_NAME "${SOURCE_PATH}" NAME) + +# Use fresh copy of sources for building and modification +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${SOURCE_DIR_NAME}") + +file(TO_NATIVE_PATH ${CURRENT_INSTALLED_DIR} NATIVE_INSTALLED_DIR) +configure_file( + "${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/dll_flint.vcxproj" "${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/dll_flint.vcxproj" @ONLY +) +configure_file( + "${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/lib_flint.vcxproj" "${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/lib_flint.vcxproj" @ONLY +) + +file(RENAME "${SOURCE_PATH}/fmpz-conversions-gc.in" "${SOURCE_PATH}/fmpz-conversions.h") + +IF (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + file(RENAME "${SOURCE_PATH}/fft_tuning32.in" "${SOURCE_PATH}/fft_tuning.h") +ELSE() + file(RENAME "${SOURCE_PATH}/fft_tuning64.in" "${SOURCE_PATH}/fft_tuning.h") +ENDIF() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/dll_flint.vcxproj + ) +else() + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/lib_flint.vcxproj + ) +endif() + +IF (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + SET(BUILD_ARCH "Win32") +ELSE() + SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) +ENDIF() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB FLINT_HEADERS "${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/*.h") + file(INSTALL + ${FLINT_HEADERS} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/flint + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/${BUILD_ARCH}/Release/dll_flint.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/${BUILD_ARCH}/Debug/dll_flint.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/${BUILD_ARCH}/Release/dll_flint.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + RENAME flint.lib + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/${BUILD_ARCH}/Debug/dll_flint.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + RENAME flint.lib + ) + vcpkg_copy_pdbs() +else() + file(GLOB FLINT_HEADERS "${SOURCE_PATH}/lib/${BUILD_ARCH}/Release/*.h") + file(INSTALL + ${FLINT_HEADERS} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/flint + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/${BUILD_ARCH}/Release/lib_flint.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + RENAME flint.lib + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/${BUILD_ARCH}/Debug/lib_flint.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + RENAME flint.lib + ) +endif() + +file(INSTALL + ${SOURCE_PATH}/gpl-2.0.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/flint + RENAME copyright +) + +message(STATUS "Installing done") -- cgit v1.2.3 From c0090ed4c98dbad3fe855f3ac3b9908e037afa03 Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 3 Nov 2017 19:57:33 -0500 Subject: Add arblib (#1991) --- ports/arb/CMakeLists.txt | 94 ++++++++++++++++++++++++++++++++++++++++++++++++ ports/arb/CONTROL | 4 +++ ports/arb/portfile.cmake | 32 +++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 ports/arb/CMakeLists.txt create mode 100644 ports/arb/CONTROL create mode 100644 ports/arb/portfile.cmake diff --git a/ports/arb/CMakeLists.txt b/ports/arb/CMakeLists.txt new file mode 100644 index 000000000..3474c9974 --- /dev/null +++ b/ports/arb/CMakeLists.txt @@ -0,0 +1,94 @@ +cmake_minimum_required(VERSION 2.8.12) + +project(arb C) + +set (DEPS mpir mpfr pthreads flint2 gettimeofday) +set (mpir_lib gmp mpir) +set (mpfr_lib mpfr) +set (pthreads_lib pthreads pthread) +set (flint2_lib ${LIBRARY_TYPE}_flint flint) +set (gettimeofday_lib gettimeofday) + +set (mpir_header gmp.h) +set (mpfr_header mpfr.h) +set (pthreads_header pthread.h) +set (flint2_header flint/flint.h) +set (gettimeofday_header gettimeofday.h) + +foreach (LIB ${DEPS}) + string (TOUPPER ${LIB} LIB_UPPER) + find_library(${LIB_UPPER}_LIBRARY NAMES ${${LIB}_lib}) + if (NOT ${LIB_UPPER}_LIBRARY) + message(FATAL_ERROR "${LIB} library not found.") + endif() + add_library(${LIB} UNKNOWN IMPORTED) + set_property(TARGET ${LIB} PROPERTY IMPORTED_LOCATION ${${LIB_UPPER}_LIBRARY}) + message("${LIB} found in ${${LIB_UPPER}_LIBRARY}") +endforeach () + +foreach (LIB ${DEPS}) + string(TOUPPER ${LIB} HEADER_PKG) + set (HEADER ${${LIB}_header}) + find_path(${HEADER_PKG}_INCLUDE_DIR NAMES ${HEADER}) + if (NOT ${HEADER_PKG}_INCLUDE_DIR) + message(FATAL_ERROR "${HEADER} header not found.") + endif() + message("${HEADER} found in ${${HEADER_PKG}_INCLUDE_DIR}") + set (DEP_INCLUDE_DIRS ${DEP_INCLUDE_DIRS} ${${HEADER_PKG}_INCLUDE_DIR}) +endforeach () + +file(GLOB TEMP "*.h") + +foreach (TEMP_H ${TEMP}) + get_filename_component(FOLDER ${TEMP_H} NAME_WE) + set(FOLDERS ${FOLDERS} ${FOLDER}) +endforeach() + +foreach (FOLDER ${FOLDERS}) + file(GLOB TEMP "${FOLDER}/*.c") + set(SRC ${SRC} ${TEMP}) +endforeach () + +include_directories(BEFORE ${arb_SOURCE_DIR}) +include_directories(BEFORE ${DEP_INCLUDE_DIRS}) + +add_library(arb ${SRC}) + +target_compile_definitions(arb PRIVATE HAVE_TLS=1 FLINT_REENTRANT=0) +if (BUILD_SHARED_LIBS) + target_compile_definitions(arb PRIVATE MSC_USE_DLL) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS yes) + MESSAGE( STATUS "Building shared libraries" ) +else () + target_compile_definitions(arb PRIVATE PTW32_STATIC_LIB) + MESSAGE( STATUS "Building static libraries" ) +endif() +target_compile_definitions(arb PRIVATE "ARB_BUILD_DLL") + +target_link_libraries(arb ${DEPS}) + +install(TARGETS arb + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + ) + +foreach (FOLDER ${FOLDERS}) + set(HEADERS ${HEADERS} ${FOLDER}.h) +endforeach () + +install(FILES ${HEADERS} DESTINATION include) + +if (BUILD_TESTS) + enable_testing() + foreach (FOLDER ${FOLDERS}) + file(GLOB TEMP "${FOLDER}/test/*.c") + foreach (TEST_SOURCE ${TEMP}) + get_filename_component(TEST_NAME ${TEST_SOURCE} NAME_WE) + add_executable(${FOLDER}-${TEST_NAME} ${TEST_SOURCE}) + target_link_libraries(${FOLDER}-${TEST_NAME} arb) + add_test(${FOLDER}-${TEST_NAME} ${FOLDER}-${TEST_NAME}) + endforeach () + endforeach () +endif () + diff --git a/ports/arb/CONTROL b/ports/arb/CONTROL new file mode 100644 index 000000000..2166fd1e0 --- /dev/null +++ b/ports/arb/CONTROL @@ -0,0 +1,4 @@ +Source: arb +Version: 2.11.1 +Description: a C library for arbitrary-precision interval arithmetic +Build-Depends: flint diff --git a/ports/arb/portfile.cmake b/ports/arb/portfile.cmake new file mode 100644 index 000000000..234ce1778 --- /dev/null +++ b/ports/arb/portfile.cmake @@ -0,0 +1,32 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/arb-2.11.1) + +vcpkg_from_github( + OUT_SOURCE_PATH ${SOURCE_PATH} + REPO fredrik-johansson/arb + REF 2.11.1 + SHA512 7a014da5208b55f20c7a3cd3eb51070b09ae107b04cbbd6329925780c2ab4d7c38e1fb3619f21456fa806939818370fcae921f59eb013661b6bdd3d0971e3353 + HEAD_REF master +) + +file(REMOVE ${SOURCE_PATH}/CMakeLists.txt) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/arb RENAME copyright) + +# Remove duplicate headers +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 05afaff3558f0657c03a66cc87c7f54a1fec6864 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sat, 4 Nov 2017 09:46:53 +0900 Subject: Fix rename libraries of FLANN Fix rename libraries of FLANN. --- ports/flann/CONTROL | 2 +- ports/flann/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL index b70472913..850c76850 100644 --- a/ports/flann/CONTROL +++ b/ports/flann/CONTROL @@ -1,3 +1,3 @@ Source: flann -Version: 1.9.1-6 +Version: 1.9.1-7 Description: Fast Library for Approximate Nearest Neighbors diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake index f1ead2ad9..6d251caa5 100644 --- a/ports/flann/portfile.cmake +++ b/ports/flann/portfile.cmake @@ -37,9 +37,9 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann-gd.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp-gd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann-gd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s-gd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann-gd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann_cpp-gd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp_s-gd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp-gd.lib) elseif(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s-gd.lib) -- cgit v1.2.3 From 34c25840a3aad15d44bb58c51abda9c2f6f347dc Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 18:11:27 -0700 Subject: Fix line endings --- ports/libaiff/buffer_uninitialized.patch | 84 ++++++++++++++++---------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/ports/libaiff/buffer_uninitialized.patch b/ports/libaiff/buffer_uninitialized.patch index 855d11a36..d87ab41c6 100644 --- a/ports/libaiff/buffer_uninitialized.patch +++ b/ports/libaiff/buffer_uninitialized.patch @@ -1,42 +1,42 @@ -diff --git "a/libaiff.c" "b/libaiff.c" -index e266802..21179f9 100644 ---- "a/libaiff.c" -+++ "b/libaiff.c" -@@ -168,6 +168,9 @@ AIFF_ReadOpenW(const wchar_t *file, int flags) - r->buffer = NULL; - r->buflen = 0; - -+ r->buffer2 = NULL; -+ r->buflen2 = 0; -+ - return r; - } - -@@ -237,6 +240,9 @@ AIFF_ReadOpen(const char *file, int flags) - r->buffer = NULL; - r->buflen = 0; - -+ r->buffer2 = NULL; -+ r->buflen2 = 0; -+ - return r; - } - -@@ -577,6 +583,8 @@ err2: - w->segmentSize = 0; - w->buffer = NULL; - w->buflen = 0; -+ w->buffer2 = NULL; -+ w->buflen2 = 0; - w->tics = 0; - - /* -@@ -659,6 +667,8 @@ err2: - w->segmentSize = 0; - w->buffer = NULL; - w->buflen = 0; -+ w->buffer2 = NULL; -+ w->buflen2 = 0; - w->tics = 0; - - /* +diff --git "a/libaiff.c" "b/libaiff.c" +index e266802..21179f9 100644 +--- "a/libaiff.c" ++++ "b/libaiff.c" +@@ -168,6 +168,9 @@ AIFF_ReadOpenW(const wchar_t *file, int flags) + r->buffer = NULL; + r->buflen = 0; + ++ r->buffer2 = NULL; ++ r->buflen2 = 0; ++ + return r; + } + +@@ -237,6 +240,9 @@ AIFF_ReadOpen(const char *file, int flags) + r->buffer = NULL; + r->buflen = 0; + ++ r->buffer2 = NULL; ++ r->buflen2 = 0; ++ + return r; + } + +@@ -577,6 +583,8 @@ err2: + w->segmentSize = 0; + w->buffer = NULL; + w->buflen = 0; ++ w->buffer2 = NULL; ++ w->buflen2 = 0; + w->tics = 0; + + /* +@@ -659,6 +667,8 @@ err2: + w->segmentSize = 0; + w->buffer = NULL; + w->buflen = 0; ++ w->buffer2 = NULL; ++ w->buflen2 = 0; + w->tics = 0; + + /* -- cgit v1.2.3 From 3b90bc07ce6fb8639fbb0a142bdbbd458e85462a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 18:25:54 -0700 Subject: [cmake] Update to 3.9.5 (was 3.9.4) --- README.md | 2 +- scripts/fetchDependency.ps1 | 12 ++++++------ toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e2c076977..30d193892 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Prerequisites: - Windows 10, 8.1, or 7 - Visual Studio 2017 or Visual Studio 2015 Update 3 - Git -- *Optional: CMake 3.9.4* +- *Optional: CMake 3.9.5* Clone this repository, then run ``` diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index f78d159d0..16ba984e6 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -160,12 +160,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.9.4" - $downloadVersion = "3.9.4" - $url = "https://cmake.org/files/v3.9/cmake-3.9.4-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.9.4-win32-x86.zip" - $expectedDownloadedFileHash = "8214df1ff51f9a6a1f0e27f9bd18f402b1749c5b645fbf6e401bcb00047171cd" - $executableFromDownload = "$downloadsDir\cmake-3.9.4-win32-x86\bin\cmake.exe" + $requiredVersion = "3.9.5" + $downloadVersion = "3.9.5" + $url = "https://cmake.org/files/v3.9/cmake-3.9.5-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.9.5-win32-x86.zip" + $expectedDownloadedFileHash = "dd3e183254c12f7c338d3edfa642f1ac84a763b8b9a2feabb4ad5fccece5dff9" + $executableFromDownload = "$downloadsDir\cmake-3.9.5-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP $extractionFolder = $downloadsDir } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 5e43ee4c7..c17b029c0 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -125,10 +125,10 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { - static constexpr std::array EXPECTED_VERSION = {3, 9, 4}; + static constexpr std::array EXPECTED_VERSION = {3, 9, 5}; static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const fs::path downloaded_copy = downloads_folder / "cmake-3.9.4-win32-x86" / "bin" / "cmake.exe"; + const fs::path downloaded_copy = downloads_folder / "cmake-3.9.5-win32-x86" / "bin" / "cmake.exe"; const std::vector from_path = Files::find_from_PATH("cmake"); std::vector candidate_paths; -- cgit v1.2.3 From 868697d5bbc5c97b7dd17f0924fd7cb6b37a0082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Thu, 2 Mar 2017 17:44:43 -0500 Subject: Porting ITK --- ports/itk/CONTROL | 4 ++++ ports/itk/portfile.cmake | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 ports/itk/CONTROL create mode 100644 ports/itk/portfile.cmake diff --git a/ports/itk/CONTROL b/ports/itk/CONTROL new file mode 100644 index 000000000..c930e9491 --- /dev/null +++ b/ports/itk/CONTROL @@ -0,0 +1,4 @@ +Source: itk +Version: 4.11.0 +Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis. +Build-Depends: libjpeg-turbo, zlib, libpng, tiff, expat diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake new file mode 100644 index 000000000..24d0f5cf4 --- /dev/null +++ b/ports/itk/portfile.cmake @@ -0,0 +1,58 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/dzenanz/ITK/releases/download/v4.12rc02/ITK_VCPKG.zip" + FILENAME "ITK-Test.zip" + SHA512 6283381b2a615ca40ddd05fa4e45a3dbc32ed6dd6bc02e0bb9462ef07762507970d4b56f0fdf8098d23361e52af9afec670a41acd33adb44a7b3cb7d6501bc65 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# directory path length needs to be shorter than 50 characters +# file(RENAME ${CURRENT_BUILDTREES_DIR}/src/InsightToolkit-4.12.0 ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DBUILD_EXAMPLES=OFF + -DDO_NOT_INSTALL_ITK_TEST_DRIVER=ON + -DITK_INSTALL_DATA_DIR=share/itk/data + -DITK_INSTALL_DOC_DIR=share/itk/doc + -DITK_INSTALL_PACKAGE_DIR=share/itk + -DITK_LEGACY_REMOVE=ON + -DITK_USE_64BITS_IDS=ON + -DITK_USE_CONCEPT_CHECKING=ON + # -DITK_WRAP_PYTHON=ON + # -DITK_PYTHON_VERSION=3 + # -DITK_USE_SYSTEM_LIBRARIES=ON # enables USE_SYSTEM for many third party libraries which do not have vcpkg ports such as FFTW + -DITK_USE_SYSTEM_EXPAT=ON + -DITK_USE_SYSTEM_JPEG=ON + -DITK_USE_SYSTEM_PNG=ON + -DITK_USE_SYSTEM_TIFF=ON + -DITK_USE_SYSTEM_ZLIB=ON + -DITK_FORBID_DOWNLOADS=OFF + -DITK_BUILD_DEFAULT_MODULES=OFF # turns on HDF5, which is problematic + -DITKGroup_IO=OFF # turns on HDF5, which is problematic + -DModule_ITKReview=OFF # turns on HDF5, which is problematic + -DITKGroup_Filtering=ON + -DITKGroup_Registration=ON + -DITKGroup_Segmentation=ON + -DModule_ITKIOMesh=ON + -DModule_ITKIOCSV=ON + -DModule_IOSTL=ON # example how to turn on a non-default module + # -DModule_ITKVtkGlue=ON # this option requires VTK to be a dependency in CONTROL file + -DModule_MorphologicalContourInterpolation=ON # example how to turn on a remote module + -DModule_RLEImage=ON # example how to turn on a remote module + ${ADDITIONAL_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +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) -- cgit v1.2.3 From 11d672617c19833f8eb5ab7a2291c8f274cdfc9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Wed, 11 Oct 2017 15:48:41 -0400 Subject: Sourcing from GitHub, using a master version with vcpkg patch --- ports/itk/portfile.cmake | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake index 24d0f5cf4..79b298ae2 100644 --- a/ports/itk/portfile.cmake +++ b/ports/itk/portfile.cmake @@ -1,14 +1,16 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/dzenanz/ITK/releases/download/v4.12rc02/ITK_VCPKG.zip" - FILENAME "ITK-Test.zip" - SHA512 6283381b2a615ca40ddd05fa4e45a3dbc32ed6dd6bc02e0bb9462ef07762507970d4b56f0fdf8098d23361e52af9afec670a41acd33adb44a7b3cb7d6501bc65 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO InsightSoftwareConsortium/ITK + REF fc374c8431a8aec740e4db3a398c6e95294f34a2 + SHA512 d4a313cfba78ab309e387c213a2dd568c4d8bb628210dcb519712bbed23380b870d7224634119fad08ff157451b75f1c7fbae93841a00091b0e403315cde2943 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) # directory path length needs to be shorter than 50 characters -# file(RENAME ${CURRENT_BUILDTREES_DIR}/src/InsightToolkit-4.12.0 ${SOURCE_PATH}) +file(RENAME ${SOURCE_PATH} ${CURRENT_BUILDTREES_DIR}/ITK) +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/ITK") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From aec7d6d60628602fa153633f7e7e92fe66af0655 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 3 Nov 2017 18:41:19 -0700 Subject: Update CHANGELOG and bump version to v0.0.96 --- CHANGELOG.md | 23 +++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2f3c720f..b15a24e46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ +vcpkg (0.0.96) +-------------- + * Add ports: + - arb 2.11.1 + - fdk-aac 2017-11-02-1e351 + - flint 2.5.2 + - itk 4.11.0 + - libaiff 5.0 + * Update ports: + - antlr4 4.6-1 -> 4.7 + - apr 1.6.2-1 -> 1.6.3 + - double-conversion 3.0.0-1 -> 3.0.0-2 + - flann 1.9.1-6 -> 1.9.1-7 + - opencv 3.3.1-4 -> 3.3.1-6 + - protobuf 3.4.1-1 -> 3.4.1-2 + * `vcpkg help`: Add help topics for commands. For example `vcpkg help install` + * `vcpkg` now downloads in a temp directory; after the download is complete, the file is moved to the destination. This avoids issues with hash mismatch on partially downloaded files. + * Update required version & auto-downloaded version of `cmake` to 3.9.5 + * Update required version & auto-downloaded version of `vswhere` to 2.2.11 + +-- vcpkg team WED, 03 Nov 2017 18:45:00 -0800 + + vcpkg (0.0.95) -------------- * Update ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index e5fce74a7..bc63ef127 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.95" \ No newline at end of file +"0.0.96" \ No newline at end of file -- cgit v1.2.3 From 65bac6d9fa8d4b49c119c84dfc6d6f13b5a94149 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 3 Nov 2017 22:33:36 -0700 Subject: [fftw] update to 3.3.7 --- ports/fftw3/CONTROL | 2 +- ports/fftw3/portfile.cmake | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/ports/fftw3/CONTROL b/ports/fftw3/CONTROL index 50513df27..338c602d3 100644 --- a/ports/fftw3/CONTROL +++ b/ports/fftw3/CONTROL @@ -1,3 +1,3 @@ Source: fftw3 -Version: 3.3.6-p12-1 +Version: 3.3.7 Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). diff --git a/ports/fftw3/portfile.cmake b/ports/fftw3/portfile.cmake index 99ac01e2d..86e5e722b 100644 --- a/ports/fftw3/portfile.cmake +++ b/ports/fftw3/portfile.cmake @@ -1,17 +1,9 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fftw-3.3.6-pl2) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fftw-3.3.7) vcpkg_download_distfile(ARCHIVE - URLS "http://www.fftw.org/fftw-3.3.6-pl2.tar.gz" - FILENAME "fftw-3.3.6-pl2.tar.gz" - SHA512 e130309856752a1555b6d151c4d0ce9eb4b2c208fff7e3e89282ca8ef6104718f865cbb5e9c4af4367b3615b69b0d50fd001a26d74fd5324ff2faabe14fe3472 + URLS "http://www.fftw.org/fftw-3.3.7.tar.gz" + FILENAME "fftw-3.3.7.tar.gz" + SHA512 a5db54293a6d711408bed5894766437eee920be015ad27023c7a91d4581e2ff5b96e3db0201e6eaccf7b064c4d32db1a2a8fab3e6813e524b4743ddd6216ba77 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From d7eefd989231810e6dd151502477ca4d5f026889 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 3 Nov 2017 22:47:41 -0700 Subject: [dlib] update to 19.7 and use vcpkg_from_github --- ports/dlib/CONTROL | 2 +- ports/dlib/portfile.cmake | 23 +++++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index ce39fcb1b..87d81875b 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,4 +1,4 @@ Source: dlib -Version: 19.4-5 +Version: 19.7 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3 Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index 6c1bad0f8..74494d2cd 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -1,18 +1,13 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/dlib-19.4) -vcpkg_download_distfile(ARCHIVE - URLS "http://dlib.net/files/dlib-19.4.tar.bz2" - FILENAME "dlib-19.4.tar.bz2" - SHA512 c5ae22c507b57a13d880d79e9671730829114d0276508b0a41b373d3abae9057d960fce84fafe1be468d943910853baaa70c88f2516e20a0c41f3895bf217f7b + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO davisking/dlib + REF v19.7 + SHA512 a3877066e04a411d96e910f4229c60a86971a9290e840aa4a5b2f0b102e9b8c37bfede259b80b71ba066d21eb0aa2565808e51d0eab6397ff5fd2bac60dcedd5 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) + file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libjpeg) file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libpng) file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/zlib) @@ -63,6 +58,6 @@ string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if defined(NDEBUG)\n#define DLIB file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h ${_contents}) # Handle copyright -file(COPY ${CURRENT_PACKAGES_DIR}/share/doc/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib) +file(COPY ${SOURCE_PATH}/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib) file(RENAME ${CURRENT_PACKAGES_DIR}/share/dlib/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/dlib/COPYRIGHT) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) -- cgit v1.2.3 From 925bc946812a912ad93d1b2a3088e00b20da6331 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sat, 4 Nov 2017 00:39:59 -0700 Subject: fix issue 2111 --- ports/dlib/portfile.cmake | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index 74494d2cd..4234e3e4b 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -38,7 +38,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/dlib) # There is no way to suppress installation of the headers and resource files in debug build. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -48,7 +48,10 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/all) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/test) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/travis) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_neon) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cudnn) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cuda) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cpp11) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm) # Dlib encodes debug/release in its config.h. Patch it to respond to the NDEBUG macro instead. @@ -57,6 +60,13 @@ string(REPLACE "/* #undef ENABLE_ASSERTS */" "#if !defined(NDEBUG)\n#define ENAB string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if defined(NDEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif" _contents ${_contents}) file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h ${_contents}) +file(READ ${CURRENT_PACKAGES_DIR}/share/dlib/dlib.cmake _contents) +string(REPLACE + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)" + _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/dlib/dlib.cmake "${_contents}") + # Handle copyright file(COPY ${SOURCE_PATH}/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib) file(RENAME ${CURRENT_PACKAGES_DIR}/share/dlib/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/dlib/COPYRIGHT) -- cgit v1.2.3 From 3c85f7073b92b056dfe27a59ab0c8eaffdaf70c3 Mon Sep 17 00:00:00 2001 From: Mateusz Adamczyk Date: Sat, 21 Oct 2017 18:56:11 +0200 Subject: Revert "Updated libsigcpp to version 2.99.9" This reverts commit 079ef9785ad539e1484f876577913a7269021288. --- ports/libsigcpp/CMakeLists.txt | 19 ++++++------------- ports/libsigcpp/CONTROL | 2 +- ports/libsigcpp/portfile.cmake | 8 ++++---- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/ports/libsigcpp/CMakeLists.txt b/ports/libsigcpp/CMakeLists.txt index 30c3c610e..7a669a24e 100644 --- a/ports/libsigcpp/CMakeLists.txt +++ b/ports/libsigcpp/CMakeLists.txt @@ -5,14 +5,14 @@ set(SIGCPP_API_VERSION 2.0) add_definitions(-DSIGC_BUILD) -include_directories(./MSVC_Net2017) # config file for windows is there +include_directories(./MSVC_Net2013) # config file for windows is there include_directories(.) - set(SICGPP_SOURCES sigc++/connection.cc sigc++/signal_base.cc sigc++/trackable.cc + sigc++/adaptors/lambda/lambda.cc sigc++/functors/slot_base.cc) add_library(sigc ${SICGPP_SOURCES}) @@ -20,13 +20,12 @@ set_target_properties(sigc PROPERTIES OUTPUT_NAME sigc-${SIGCPP_API_VERSION}) install(TARGETS sigc RUNTIME DESTINATION bin ARCHIVE DESTINATION lib) if(NOT SIGCPP_SKIP_HEADERS) - install(FILES MSVC_Net2017/sigc++config.h DESTINATION include) + install(FILES MSVC_Net2013/sigc++config.h DESTINATION include) install(FILES sigc++/sigc++.h DESTINATION include/sigc++) install(FILES sigc++/bind.h DESTINATION include/sigc++) install(FILES sigc++/bind_return.h DESTINATION include/sigc++) install(FILES sigc++/connection.h DESTINATION include/sigc++) install(FILES sigc++/limit_reference.h DESTINATION include/sigc++) - install(FILES sigc++/member_method_trait.h DESTINATION include/sigc++) install(FILES sigc++/reference_wrapper.h DESTINATION include/sigc++) install(FILES sigc++/retype_return.h DESTINATION include/sigc++) install(FILES sigc++/signal.h DESTINATION include/sigc++) @@ -35,30 +34,24 @@ if(NOT SIGCPP_SKIP_HEADERS) install(FILES sigc++/trackable.h DESTINATION include/sigc++) install(FILES sigc++/type_traits.h DESTINATION include/sigc++) install(FILES sigc++/visit_each.h DESTINATION include/sigc++) - install(FILES sigc++/weak_raw_ptr.h DESTINATION include/sigc++) install(FILES sigc++/adaptors/adaptors.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/adaptor_base.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/adaptor_trait.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/adapts.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/bind.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/bind_return.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/bound_argument.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/compose.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/deduce_result_type.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/exception_catch.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/hide.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/retype.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/retype_return.h DESTINATION include/sigc++/adaptors) install(FILES sigc++/adaptors/track_obj.h DESTINATION include/sigc++/adaptors) - install(FILES sigc++/adaptors/tuple_visitor_visit_each.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/lambda/base.h DESTINATION include/sigc++/adaptors/lambda) + install(FILES sigc++/adaptors/lambda/select.h DESTINATION include/sigc++/adaptors/lambda) install(FILES sigc++/functors/functors.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/functor_trait.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/mem_fun.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/ptr_fun.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/slot.h DESTINATION include/sigc++/functors) install(FILES sigc++/functors/slot_base.h DESTINATION include/sigc++/functors) - install(FILES sigc++/tuple-utils/tuple_cdr.h DESTINATION include/sigc++/tuple-utils) - install(FILES sigc++/tuple-utils/tuple_end.h DESTINATION include/sigc++/tuple-utils) - install(FILES sigc++/tuple-utils/tuple_for_each.h DESTINATION include/sigc++/tuple-utils) - install(FILES sigc++/tuple-utils/tuple_start.h DESTINATION include/sigc++/tuple-utils) - install(FILES sigc++/tuple-utils/tuple_transform_each.h DESTINATION include/sigc++/tuple-utils) endif() diff --git a/ports/libsigcpp/CONTROL b/ports/libsigcpp/CONTROL index 97667dd7d..02b2e4b83 100644 --- a/ports/libsigcpp/CONTROL +++ b/ports/libsigcpp/CONTROL @@ -1,3 +1,3 @@ Source: libsigcpp -Version: 2.99-1 +Version: 2.10 Description: Typesafe callback framework for C++ diff --git a/ports/libsigcpp/portfile.cmake b/ports/libsigcpp/portfile.cmake index 7525c1aae..c98a26717 100644 --- a/ports/libsigcpp/portfile.cmake +++ b/ports/libsigcpp/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsigc++-2.99.9) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsigc++-2.10.0) vcpkg_download_distfile(ARCHIVE - URLS "http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.99/libsigc++-2.99.9.tar.xz" - FILENAME "libsigc++-2.99.9.tar.xz" - SHA512 3e8f8176a4618938a16b2367466415aff8ec10d83ef84de8973373a63fc0b9708d14115ad5c039c81b570385b205944651849a68e618c37c171cd748dd5b2403) + URLS "http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.10/libsigc++-2.10.0.tar.xz" + FILENAME "libsigc++-2.10.0.tar.xz" + SHA512 5b96df21d6bd6ba41520c7219e77695a86aabc60b7259262c7a9f4b8475ce0e2fd8dc37bcf7c17e24e818ff28c262d682b964c83e215b51bdbe000f3f58794ae) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 81c1a0efc3bacd2aecb82089ebd6651bdb2aa10d Mon Sep 17 00:00:00 2001 From: Mateusz Adamczyk Date: Sun, 22 Oct 2017 14:16:33 +0200 Subject: Added glibmm and giomm. --- ports/glibmm/CONTROL | 4 + ports/glibmm/COPYING | 514 +++++++++ ports/glibmm/README | 4 + ports/glibmm/fix_properties.patch | 1721 +++++++++++++++++++++++++++++++ ports/glibmm/msvc_recommended_pragmas.h | 34 + ports/glibmm/portfile.cmake | 105 ++ 6 files changed, 2382 insertions(+) create mode 100644 ports/glibmm/CONTROL create mode 100644 ports/glibmm/COPYING create mode 100644 ports/glibmm/README create mode 100644 ports/glibmm/fix_properties.patch create mode 100644 ports/glibmm/msvc_recommended_pragmas.h create mode 100644 ports/glibmm/portfile.cmake diff --git a/ports/glibmm/CONTROL b/ports/glibmm/CONTROL new file mode 100644 index 000000000..babaee277 --- /dev/null +++ b/ports/glibmm/CONTROL @@ -0,0 +1,4 @@ +Source: glibmm +Version: 2.52.1 +Description: This is glibmm, a C++ API for parts of glib that are useful for C++. See http://www.gtkmm.org. +Build-Depends: zlib, pcre, libffi, gettext, libiconv, glib diff --git a/ports/glibmm/COPYING b/ports/glibmm/COPYING new file mode 100644 index 000000000..5e1f37e13 --- /dev/null +++ b/ports/glibmm/COPYING @@ -0,0 +1,514 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. +^L + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. +^L + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +^L + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +^L + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +^L + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. +^L + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +^L + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS +^L + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper +mail. + +You should also get your employer (if you work as a programmer) or +your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James +Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/ports/glibmm/README b/ports/glibmm/README new file mode 100644 index 000000000..341c67e43 --- /dev/null +++ b/ports/glibmm/README @@ -0,0 +1,4 @@ +This is glibmm, a C++ API for parts of glib that are useful for C++. +See http://www.gtkmm.org + + diff --git a/ports/glibmm/fix_properties.patch b/ports/glibmm/fix_properties.patch new file mode 100644 index 000000000..51044a27f --- /dev/null +++ b/ports/glibmm/fix_properties.patch @@ -0,0 +1,1721 @@ +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index 62dbcc8..7da2fbd 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -91,6 +91,7 @@ + + + MachineX86 ++ %(AdditionalDependencies) + + + +@@ -109,6 +110,7 @@ + + + MachineX86 ++ %(AdditionalDependencies) + + + +@@ -132,6 +134,7 @@ + + + MachineX64 ++ %(AdditionalDependencies) + + + +@@ -153,6 +156,7 @@ + + + MachineX64 ++ %(AdditionalDependencies) + + + +@@ -161,4 +165,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/giomm.vcxproj b/MSVC_Net2013/giomm.vcxproj +index bc4fc3d..078fcb2 100644 +--- a/MSVC_Net2013/giomm.vcxproj ++++ b/MSVC_Net2013/giomm.vcxproj +@@ -69,7 +69,7 @@ + + %(AdditionalOptions) + Disabled +- .\giomm;..\gio;$(GlibEtcInstallRoot)\include\gio-win32-2.0;%(AdditionalIncludeDirectories) ++ .\giomm;..\gio;%(AdditionalIncludeDirectories) + _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) + true + EnableFastChecks +@@ -82,7 +82,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj + + +- gio-2.0.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll + $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +@@ -100,7 +100,7 @@ + + %(AdditionalOptions) + Disabled +- .;../..;../../glib;../../gio;$(SolutionDir)\glibmm;..\..\..\vs10\x64\include\gio-win32-2.0;..\..\..\vs10\x64\include\glib-2.0;..\..\..\vs10\x64\lib\glib-2.0\include;..\..\..\vs10\x64\include\sigc++-2.0;..\..\..\vs10\x64\lib\sigc++-2.0\include;..\..\..\vs10\x64\include;%(AdditionalIncludeDirectories) ++ .\giomm;..\gio;%(AdditionalIncludeDirectories) + _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) + true + EnableFastChecks +@@ -113,7 +113,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj + + +- gio-2.0.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll + $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +@@ -128,7 +128,7 @@ + + + %(AdditionalOptions) +- .\giomm;..\gio;$(GlibEtcInstallRoot)\include\gio-win32-2.0;%(AdditionalIncludeDirectories) ++ .\giomm;..\gio;%(AdditionalIncludeDirectories) + $(GioMMBuildDefs);%(PreprocessorDefinitions) + MultiThreadedDLL + Level3 +@@ -139,7 +139,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj + + +- gio-2.0.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll + $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +@@ -158,7 +158,7 @@ + + + %(AdditionalOptions) +- .\giomm;..\gio;$(GlibEtcInstallRoot)\include\gio-win32-2.0;%(AdditionalIncludeDirectories) ++ .\giomm;..\gio;%(AdditionalIncludeDirectories) + $(GioMMBuildDefs);%(PreprocessorDefinitions) + MultiThreadedDLL + Level3 +@@ -169,7 +169,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj + + +- gio-2.0.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll + $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +@@ -455,4 +455,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/giomm.vcxproj.filters b/MSVC_Net2013/giomm.vcxproj.filters +index 4f01b13..934eddc 100644 +--- a/MSVC_Net2013/giomm.vcxproj.filters ++++ b/MSVC_Net2013/giomm.vcxproj.filters +@@ -15,266 +15,780 @@ + + + +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ + + +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Source Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Source Files +- Source Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Source Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ + + +- Resource Files ++ ++ Resource Files + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/glibmm-build-defines.props b/MSVC_Net2013/glibmm-build-defines.props +index 5cbde3c..9a027c5 100644 +--- a/MSVC_Net2013/glibmm-build-defines.props ++++ b/MSVC_Net2013/glibmm-build-defines.props +@@ -6,8 +6,8 @@ + + SIZEOF_WCHAR_T=2;GLIBMM_BUILD + GIOMM_BUILD +- sigc-vc$(VSVer)0-2_0.lib +- sigc-vc$(VSVer)0-d-2_0.lib ++ sigc-2_0.lib ++ sigc-2_0.lib + + + <_PropertySheetDisplayName>glibmmbuilddefinesprops +@@ -16,28 +16,10 @@ + + + +- .\glibmm;..;..\glib;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) ++ .\glibmm;..;.;..\glib;%(AdditionalIncludeDirectories) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) + +- +- glib-2.0.lib;gobject-2.0.lib;gmodule-2.0.lib;%(AdditionalDependencies) +- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) +- + +- +- +- $(GLibMMBuildDefs) +- +- +- $(GioMMBuildDefs) +- +- +- $(CPPDepLibsRelease) +- +- +- $(CPPDepLibsDebug) +- +- +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/glibmm-install.props b/MSVC_Net2013/glibmm-install.props +index f28a0c8..9283a7b 100644 +--- a/MSVC_Net2013/glibmm-install.props ++++ b/MSVC_Net2013/glibmm-install.props +@@ -3,410 +3,4 @@ + + + +- +- $(SolutionDir)$(Configuration)\$(Platform)\bin +- $(BinDir)\glibmm$(ReleaseDllSuffix).dll;$(BinDir)\giomm$(ReleaseDllSuffix).dll +- $(BinDir)\glibmm$(DebugDllSuffix).dll;$(BinDir)\giomm$(DebugDllSuffix).dll +- +-mkdir $(CopyDir) +-mkdir $(CopyDir)\bin +-copy $(BinDir)\glibmm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).dll $(CopyDir)\bin +-copy $(BinDir)\glibmm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).pdb $(CopyDir)\bin +-copy $(BinDir)\giomm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).dll $(CopyDir)\bin +-copy $(BinDir)\giomm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).pdb $(CopyDir)\bin +- +-mkdir $(CopyDir)\lib\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\include +-mkdir $(CopyDir)\lib\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\include +-copy $(BinDir)\glibmm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).lib $(CopyDir)\lib +-copy $(BinDir)\giomm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).lib $(CopyDir)\lib +- +-mkdir $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-mkdir $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\glib\glibmm.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion) +-copy ..\gio\giomm.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion) +- +-copy ..\glib\glibmm\arrayhandle.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\balancedtree.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\base64.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\binding.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\bytes.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\bytearray.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\checksum.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\class.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\containerhandle_shared.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\containers.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\convert.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\date.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\datetime.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\debug.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\enums.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\dispatcher.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\error.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\exception.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\exceptionhandler.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\fileutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\helperlist.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\i18n-lib.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\i18n.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\init.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\interface.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\iochannel.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\keyfile.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\listhandle.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\main.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\markup.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\miscutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\module.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\nodetree.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\object.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\objectbase.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\optioncontext.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\optionentry.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\optiongroup.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\pattern.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\priorities.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\property.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\propertyproxy.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\propertyproxy_base.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\quark.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\random.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\refptr.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\regex.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\sarray.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\shell.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\signalproxy.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\signalproxy_connectionnode.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\slisthandle.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\spawn.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\streamiochannel.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\stringutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\threadpool.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\threads.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\timer.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\timeval.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\timezone.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\unicode.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\uriutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\ustring.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\utility.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\variant.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\variantdict.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\variantiter.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\varianttype.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\variant_basictypes.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\thread.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\value.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\valuearray.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\value_basictypes.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\value_custom.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\vectorutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\weakref.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\wrap.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +-copy ..\glib\glibmm\wrap_init.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm +- +-copy ..\glib\glibmm\private\balancedtree_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\binding_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\bytes_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\bytearray_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\checksum_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\convert_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\date_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\datetime_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\enums_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\fileutils_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\interface_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\iochannel_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\keyfile_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\markup_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\miscutils_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\module_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\nodetree_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\object_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\optioncontext_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\optionentry_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\optiongroup_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\regex_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\shell_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\spawn_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\threads_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\timezone_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\unicode_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\uriutils_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\variant_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\variantdict_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\variantiter_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\varianttype_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\thread_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +-copy ..\glib\glibmm\private\valuearray_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private +- +-copy ..\gio\giomm\action.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\actiongroup.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\actionmap.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\applaunchcontext.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\appinfo.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\application.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\applicationcommandline.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\asyncinitable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\asyncresult.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\bufferedinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\bufferedoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\cancellable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\charsetconverter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\contenttype.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\converter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\converterinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\converteroutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\credentials.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\datainputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dataoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusactiongroup.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusauthobserver.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbuserror.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbuserrorutils.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusinterface.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusinterfaceskeleton.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusinterfacevtable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusintrospection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusmenumodel.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusmessage.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusmethodinvocation.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusobject.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusownname.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusproxy.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusserver.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbussubtreevtable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbusutils.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\dbuswatchname.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\drive.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\emblem.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\emblemedicon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\enums.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\error.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\file.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileattributeinfo.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileattributeinfolist.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileenumerator.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileicon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileinfo.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileiostream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\filemonitor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\filenamecompleter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\fileoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\filterinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\filteroutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\icon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\inetaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\inetsocketaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\init.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\initable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\inputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\iostream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\listmodel.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\liststore.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\loadableicon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\memoryinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\memoryoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\menuattributeiter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\menulinkiter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\menu.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\menuitem.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\menumodel.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\mount.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\mountoperation.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\networkaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\networkmonitor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\networkservice.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\notification.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\outputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\permission.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\pollableinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\pollableoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\proxy.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\proxyaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\proxyresolver.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\remoteactiongroup.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\resolver.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\resource.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\seekable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\settings.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\settingsschema.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\settingsschemakey.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\settingsschemasource.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\simpleaction.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\simpleactiongroup.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\simpleiostream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\simplepermission.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socket.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketaddressenumerator.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketclient.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketconnectable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketcontrolmessage.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketlistener.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketservice.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\socketsource.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\srvtarget.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tcpconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tcpwrapperconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\threadedsocketservice.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\themedicon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlscertificate.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlsclientconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlsconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlsdatabase.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlsinteraction.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlspassword.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\tlsserverconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\volume.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\volumemonitor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\wrap_init.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\zlibdecompressor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +-copy ..\gio\giomm\zlibcompressor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm +- +-copy ..\gio\giomm\private\action_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\actiongroup_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\actionmap_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\appinfo_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\applaunchcontext_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\application_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\applicationcommandline_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\asyncinitable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\asyncresult_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\bufferedinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\bufferedoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\cancellable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\charsetconverter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\converter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\converterinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\converteroutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\credentials_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\datainputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dataoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusactiongroup_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusauthobserver_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbuserror_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbuserrorutils_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusinterface_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusinterfaceskeleton_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusinterfacevtable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusintrospection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusmenumodel_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusmessage_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusmethodinvocation_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusobject_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusownname_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusproxy_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusserver_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbussubtreevtable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbusutils_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\dbuswatchname_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\drive_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\emblem_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\emblemedicon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\enums_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\error_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\file_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileattributeinfo_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileattributeinfolist_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileenumerator_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileicon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileinfo_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileiostream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\filemonitor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\filenamecompleter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\fileoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\filterinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\filteroutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\icon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\inetaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\inetsocketaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\initable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\inputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\iostream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\listmodel_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\liststore_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\loadableicon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\memoryinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\memoryoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\menu_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\menuattributeiter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\menuitem_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\menulinkiter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\menumodel_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\mount_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\mountoperation_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\networkaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\networkmonitor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\networkservice_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\notification_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\outputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\pollableinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\pollableoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\proxy_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\proxyaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\proxyresolver_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\remoteactiongroup_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\resolver_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\resource_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\seekable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\settings_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\settingsschema_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\settingsschemakey_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\settingsschemasource_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\simpleaction_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\simpleactiongroup_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\simpleiostream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socket_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketaddressenumerator_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketclient_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketconnectable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketcontrolmessage_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketlistener_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\socketservice_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\srvtarget_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tcpconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tcpwrapperconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\themedicon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\threadedsocketservice_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlscertificate_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlsclientconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlsconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlsdatabase_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlsinteraction_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlspassword_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\tlsserverconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\volume_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\volumemonitor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\zlibcompressor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy ..\gio\giomm\private\zlibdecompressor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private +-copy .\glibmm\glibmmconfig.h $(CopyDir)\lib\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\include +-copy .\giomm\giommconfig.h $(CopyDir)\lib\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\include +- +- +- +- <_PropertySheetDisplayName>glibmminstallprops +- +- +- +- $(BinDir) +- +- +- $(InstalledReleaseDlls) +- +- +- $(InstalledDebugDlls) +- +- +- $(GLibmmDoInstall) +- +- + +diff --git a/MSVC_Net2013/glibmm-version-paths.props b/MSVC_Net2013/glibmm-version-paths.props +index 216731b..e5f0f6a 100644 +--- a/MSVC_Net2013/glibmm-version-paths.props ++++ b/MSVC_Net2013/glibmm-version-paths.props +@@ -2,13 +2,9 @@ + + + 12 +- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) +- $(GlibEtcInstallRoot) + $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ + 2 + 4 +- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) +- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) + + + <_PropertySheetDisplayName>glibmmversionpathsprops +@@ -17,12 +13,6 @@ + + $(VSVer) + +- +- $(GlibEtcInstallRoot) +- +- +- $(CopyDir) +- + + $(DefDir) + +@@ -32,11 +22,5 @@ + + $(ApiMinorVersion) + +- +- $(ReleaseDllSuffix) +- +- +- $(DebugDllSuffix) +- + + +diff --git a/MSVC_Net2013/glibmm.vcxproj b/MSVC_Net2013/glibmm.vcxproj +index 6594edc..c611561 100644 +--- a/MSVC_Net2013/glibmm.vcxproj ++++ b/MSVC_Net2013/glibmm.vcxproj +@@ -93,7 +93,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj + + +- $(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll + $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +@@ -125,7 +125,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj + + +- $(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll + $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +@@ -152,7 +152,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj + + +- $(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll + $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +@@ -183,7 +183,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj + + +- $(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll + $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +@@ -359,4 +359,4 @@ + + + +- ++ +\ No newline at end of file diff --git a/ports/glibmm/msvc_recommended_pragmas.h b/ports/glibmm/msvc_recommended_pragmas.h new file mode 100644 index 000000000..c0eb1d5ed --- /dev/null +++ b/ports/glibmm/msvc_recommended_pragmas.h @@ -0,0 +1,34 @@ +#ifndef _MSC_VER +#pragma error "This header is for Microsoft VC only." +#endif /* _MSC_VER */ + +/* Make MSVC more pedantic, this is a recommended pragma list + * from _Win32_Programming_ by Rector and Newcomer. + */ +#pragma warning(error:4002) /* too many actual parameters for macro */ +#pragma warning(error:4003) /* not enough actual parameters for macro */ +#pragma warning(1:4010) /* single-line comment contains line-continuation character */ +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ +#pragma warning(1:4016) /* no function return type; using int as default */ +#pragma warning(error:4020) /* too many actual parameters */ +#pragma warning(error:4021) /* too few actual parameters */ +#pragma warning(error:4027) /* function declared without formal parameter list */ +#pragma warning(error:4029) /* declared formal parameter list different from definition */ +#pragma warning(error:4033) /* 'function' must return a value */ +#pragma warning(error:4035) /* 'function' : no return value */ +#pragma warning(error:4045) /* array bounds overflow */ +#pragma warning(error:4047) /* different levels of indirection */ +#pragma warning(error:4049) /* terminating line number emission */ +#pragma warning(error:4053) /* An expression of type void was used as an operand */ +#pragma warning(error:4071) /* no function prototype given */ +#pragma warning(disable:4101) /* unreferenced local variable */ +#pragma warning(error:4150) + +#pragma warning(disable:4244) /* No possible loss of data warnings */ +#pragma warning(disable:4305) /* No truncation from int to char warnings */ + +#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ + +/* work around Microsoft's premature attempt to deprecate the C-Library */ +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS diff --git a/ports/glibmm/portfile.cmake b/ports/glibmm/portfile.cmake new file mode 100644 index 000000000..f5880ecf7 --- /dev/null +++ b/ports/glibmm/portfile.cmake @@ -0,0 +1,105 @@ +# Glib uses winapi functions not available in WindowsStore, so glibmm +# also +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Error: UWP builds are currently not supported.") +endif() + +# Glib relies on DllMain, so glibmm also +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building not supported. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glibmm-2.52.1) +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.52/glibmm-2.52.1.tar.xz" + FILENAME "glibmm-2.52.1.tar.xz" + SHA512 702158762cb28972b315ab98dc00a62e532bda08b6e76dc2a2556e8cb381c2021290891887a4af2fbff5a62bab4d50581be73037dc8e0dc47d5febd6cbeb7bda +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) + +set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) + set(VS_PLATFORM "Win32") +endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/glibmm.sln + TARGET giomm + PLATFORM ${VS_PLATFORM} + # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 + OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets +) + +# Handle headers +file(COPY ${SOURCE_PATH}/MSVC_Net2013/giomm/giommconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/gio/giomm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/gio/giomm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) +file(COPY ${SOURCE_PATH}/MSVC_Net2013/glibmm/glibmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/glib/glibmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/glib/glibmm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) + +# Handle libraries +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/giomm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/giomm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/glibmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/glibmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/giomm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/giomm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/glibmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/glibmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +vcpkg_copy_pdbs() + +# Handle copyright and readme +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/glibmm RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/glibmm RENAME readme.txt) -- cgit v1.2.3 From 25a15b59b66148e48ca4cd7579a776b15425bdf0 Mon Sep 17 00:00:00 2001 From: Mateusz Adamczyk Date: Sun, 22 Oct 2017 16:16:07 +0200 Subject: Added atkmm. --- ports/atkmm/CONTROL | 4 + ports/atkmm/COPYING | 510 +++++++++++++++++++++++++++++++++ ports/atkmm/README | 2 + ports/atkmm/fix_properties.patch | 306 ++++++++++++++++++++ ports/atkmm/msvc_recommended_pragmas.h | 34 +++ ports/atkmm/portfile.cmake | 71 +++++ 6 files changed, 927 insertions(+) create mode 100644 ports/atkmm/CONTROL create mode 100644 ports/atkmm/COPYING create mode 100644 ports/atkmm/README create mode 100644 ports/atkmm/fix_properties.patch create mode 100644 ports/atkmm/msvc_recommended_pragmas.h create mode 100644 ports/atkmm/portfile.cmake diff --git a/ports/atkmm/CONTROL b/ports/atkmm/CONTROL new file mode 100644 index 000000000..3a8d55164 --- /dev/null +++ b/ports/atkmm/CONTROL @@ -0,0 +1,4 @@ +Source: atkmm +Version: 2.24.2 +Description: atkmm is the official C++ interface for the ATK accessibility toolkit library. It may be used, for instance, by user interfaces implemented with gtkmm. +Build-Depends: glib, gettext, atk, glibmm diff --git a/ports/atkmm/COPYING b/ports/atkmm/COPYING new file mode 100644 index 000000000..2d2d780e6 --- /dev/null +++ b/ports/atkmm/COPYING @@ -0,0 +1,510 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/ports/atkmm/README b/ports/atkmm/README new file mode 100644 index 000000000..e3ac5c916 --- /dev/null +++ b/ports/atkmm/README @@ -0,0 +1,2 @@ +atkmm is the C++ binding for the ATK library. +This module is part of the GNOME C++ bindings effort . diff --git a/ports/atkmm/fix_properties.patch b/ports/atkmm/fix_properties.patch new file mode 100644 index 000000000..a03924386 --- /dev/null +++ b/ports/atkmm/fix_properties.patch @@ -0,0 +1,306 @@ +diff --git a/MSVC_Net2013/atkmm-build-defines.props b/MSVC_Net2013/atkmm-build-defines.props +index 421f5c3..0275e6e 100644 +--- a/MSVC_Net2013/atkmm-build-defines.props ++++ b/MSVC_Net2013/atkmm-build-defines.props +@@ -5,8 +5,6 @@ + + + ATKMM_BUILD +- glibmm-vc$(VSVer)0-2_4.lib;sigc-vc$(VSVer)0-2_0.lib +- glibmm-vc$(VSVer)0-d-2_4.lib;sigc-vc$(VSVer)0-d-2_0.lib + + + <_PropertySheetDisplayName>panogmmbuilddefinesprops +@@ -15,25 +13,19 @@ + + + +- .\atkmm;..\atk;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) ++ .\atkmm;..\atk;.;%(AdditionalIncludeDirectories) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) + + +- atk-1.0.lib;gobject-2.0.lib;glib-2.0.lib;%(AdditionalDependencies) +- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) ++ %(AdditionalDependencies) ++ %(AdditionalLibraryDirectories) + + + + + $(AtkMMBuildDefs) + +- +- $(CPPDepLibsRelease) +- +- +- $(CPPDepLibsDebug) +- + + +\ No newline at end of file +diff --git a/MSVC_Net2013/atkmm-version-paths.props b/MSVC_Net2013/atkmm-version-paths.props +index affd50f..675aa3e 100644 +--- a/MSVC_Net2013/atkmm-version-paths.props ++++ b/MSVC_Net2013/atkmm-version-paths.props +@@ -2,13 +2,9 @@ + + + 12 +- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) +- $(GlibEtcInstallRoot) + $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ + 1 + 6 +- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) +- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) + + + <_PropertySheetDisplayName>atkmmversionpathsprops +@@ -17,12 +13,6 @@ + + $(VSVer) + +- +- $(GlibEtcInstallRoot) +- +- +- $(CopyDir) +- + + $(DefDir) + +@@ -32,11 +22,5 @@ + + $(ApiMinorVersion) + +- +- $(ReleaseDllSuffix) +- +- +- $(DebugDllSuffix) +- + + +\ No newline at end of file +diff --git a/MSVC_Net2013/atkmm.vcxproj b/MSVC_Net2013/atkmm.vcxproj +index c3db50a..40f21cb 100644 +--- a/MSVC_Net2013/atkmm.vcxproj ++++ b/MSVC_Net2013/atkmm.vcxproj +@@ -41,7 +41,7 @@ + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/atkmm.vcxproj.filters b/MSVC_Net2013/atkmm.vcxproj.filters +index f0fca22..6598996 100644 +--- a/MSVC_Net2013/atkmm.vcxproj.filters ++++ b/MSVC_Net2013/atkmm.vcxproj.filters +@@ -15,55 +15,143 @@ + + + +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ + + +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ + + +- ++ + Resource Files + + +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index 554054c..d6f2798 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -40,7 +40,7 @@ + + + Application +- MultiByte ++ Unicode + v120 + + diff --git a/ports/atkmm/msvc_recommended_pragmas.h b/ports/atkmm/msvc_recommended_pragmas.h new file mode 100644 index 000000000..c0eb1d5ed --- /dev/null +++ b/ports/atkmm/msvc_recommended_pragmas.h @@ -0,0 +1,34 @@ +#ifndef _MSC_VER +#pragma error "This header is for Microsoft VC only." +#endif /* _MSC_VER */ + +/* Make MSVC more pedantic, this is a recommended pragma list + * from _Win32_Programming_ by Rector and Newcomer. + */ +#pragma warning(error:4002) /* too many actual parameters for macro */ +#pragma warning(error:4003) /* not enough actual parameters for macro */ +#pragma warning(1:4010) /* single-line comment contains line-continuation character */ +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ +#pragma warning(1:4016) /* no function return type; using int as default */ +#pragma warning(error:4020) /* too many actual parameters */ +#pragma warning(error:4021) /* too few actual parameters */ +#pragma warning(error:4027) /* function declared without formal parameter list */ +#pragma warning(error:4029) /* declared formal parameter list different from definition */ +#pragma warning(error:4033) /* 'function' must return a value */ +#pragma warning(error:4035) /* 'function' : no return value */ +#pragma warning(error:4045) /* array bounds overflow */ +#pragma warning(error:4047) /* different levels of indirection */ +#pragma warning(error:4049) /* terminating line number emission */ +#pragma warning(error:4053) /* An expression of type void was used as an operand */ +#pragma warning(error:4071) /* no function prototype given */ +#pragma warning(disable:4101) /* unreferenced local variable */ +#pragma warning(error:4150) + +#pragma warning(disable:4244) /* No possible loss of data warnings */ +#pragma warning(disable:4305) /* No truncation from int to char warnings */ + +#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ + +/* work around Microsoft's premature attempt to deprecate the C-Library */ +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS diff --git a/ports/atkmm/portfile.cmake b/ports/atkmm/portfile.cmake new file mode 100644 index 000000000..84fc6e6a0 --- /dev/null +++ b/ports/atkmm/portfile.cmake @@ -0,0 +1,71 @@ +# ATK uses DllMain, so atkmm also +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building not supported. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/atkmm-2.24.2) +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/atkmm/2.24/atkmm-2.24.2.tar.xz" + FILENAME "atkmm-2.24.2.tar.xz" + SHA512 427714cdf3b10e3f9bc36df09c4b05608d295f5895fb1e079b9bd84afdf7bf1cfdec6794ced7f1e35bd430b76f87792df4ee63c515071a2ea6e3e51e672cdbe2 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) + +set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) + set(VS_PLATFORM "Win32") +endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/atkmm.sln + TARGET atkmm + PLATFORM ${VS_PLATFORM} + # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 + OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets +) + +# Handle headers +file(COPY ${SOURCE_PATH}/MSVC_Net2013/atkmm/atkmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/atk/atkmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/atk/atkmm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) + +# Handle libraries +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/atkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/atkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/atkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/atkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +vcpkg_copy_pdbs() + +# Handle copyright and readme +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/atkmm RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/atkmm RENAME readme.txt) -- cgit v1.2.3 From a2fd38d3c62666b953ee1ca1e798c08bbf1d4048 Mon Sep 17 00:00:00 2001 From: Mateusz Adamczyk Date: Sun, 22 Oct 2017 18:24:49 +0200 Subject: Added pangomm. --- ports/pangomm/CONTROL | 4 + ports/pangomm/COPYING | 515 +++++++++++++++++++++++++++++++ ports/pangomm/README | 3 + ports/pangomm/fix_properties.patch | 75 +++++ ports/pangomm/msvc_recommended_pragmas.h | 34 ++ ports/pangomm/portfile.cmake | 77 +++++ 6 files changed, 708 insertions(+) create mode 100644 ports/pangomm/CONTROL create mode 100644 ports/pangomm/COPYING create mode 100644 ports/pangomm/README create mode 100644 ports/pangomm/fix_properties.patch create mode 100644 ports/pangomm/msvc_recommended_pragmas.h create mode 100644 ports/pangomm/portfile.cmake diff --git a/ports/pangomm/CONTROL b/ports/pangomm/CONTROL new file mode 100644 index 000000000..68860b305 --- /dev/null +++ b/ports/pangomm/CONTROL @@ -0,0 +1,4 @@ +Source: pangomm +Version: 2.40.1 +Description: pangomm is the official C++ interface for the Pango font layout library. See, for instance, the Pango::Layout class. +Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz, pango, cairomm, glibmm diff --git a/ports/pangomm/COPYING b/ports/pangomm/COPYING new file mode 100644 index 000000000..c4792dd27 --- /dev/null +++ b/ports/pangomm/COPYING @@ -0,0 +1,515 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. +^L + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. +^L + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +^L + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +^L + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +^L + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. +^L + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +^L + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS +^L + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + 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 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 + +Also add information on how to contact you by electronic and paper +mail. + +You should also get your employer (if you work as a programmer) or +your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James +Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/ports/pangomm/README b/ports/pangomm/README new file mode 100644 index 000000000..37c05b4ee --- /dev/null +++ b/ports/pangomm/README @@ -0,0 +1,3 @@ +This is pangomm, a C++ API for Pango. +See http://www.gtkmm.org/ + diff --git a/ports/pangomm/fix_properties.patch b/ports/pangomm/fix_properties.patch new file mode 100644 index 000000000..22ee67bf1 --- /dev/null +++ b/ports/pangomm/fix_properties.patch @@ -0,0 +1,75 @@ +diff --git a/MSVC_Net2013/pangomm-build-defines.props b/MSVC_Net2013/pangomm-build-defines.props +index 3c3108d..f30890b 100644 +--- a/MSVC_Net2013/pangomm-build-defines.props ++++ b/MSVC_Net2013/pangomm-build-defines.props +@@ -5,8 +5,6 @@ + + + PANGOMM_BUILD +- glibmm-vc$(VSVer)0-2_4.lib;cairomm-vc$(VSVer)0-1_0.lib;sigc-vc$(VSVer)0-2_0.lib +- glibmm-vc$(VSVer)0-d-2_4.lib;cairomm-vc$(VSVer)0-d-1_0.lib;sigc-vc$(VSVer)0-d-2_0.lib + + + <_PropertySheetDisplayName>panogmmbuilddefinesprops +@@ -15,14 +13,14 @@ + + + +- .\pangomm;..\pango;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\cairomm-1.0;$(GlibEtcInstallRoot)\lib\cairomm-1.0\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) ++ .\pangomm;..\pango;.;%(AdditionalIncludeDirectories) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) + + +- pangocairo-1.0.lib;pango-1.0.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;%(AdditionalDependencies) +- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) ++ %(AdditionalDependencies) ++ %(AdditionalLibraryDirectories) + + + +diff --git a/MSVC_Net2013/pangomm-version-paths.props b/MSVC_Net2013/pangomm-version-paths.props +index b287629..01a267e 100644 +--- a/MSVC_Net2013/pangomm-version-paths.props ++++ b/MSVC_Net2013/pangomm-version-paths.props +@@ -2,13 +2,9 @@ + + + 12 +- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) +- $(GlibEtcInstallRoot) + $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ + 1 + 4 +- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) +- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) + + + <_PropertySheetDisplayName>pangommversionpathsprops +@@ -17,12 +13,6 @@ + + $(VSVer) + +- +- $(GlibEtcInstallRoot) +- +- +- $(CopyDir) +- + + $(DefDir) + +@@ -32,11 +22,5 @@ + + $(ApiMinorVersion) + +- +- $(ReleaseDllSuffix) +- +- +- $(DebugDllSuffix) +- + + +\ No newline at end of file diff --git a/ports/pangomm/msvc_recommended_pragmas.h b/ports/pangomm/msvc_recommended_pragmas.h new file mode 100644 index 000000000..c0eb1d5ed --- /dev/null +++ b/ports/pangomm/msvc_recommended_pragmas.h @@ -0,0 +1,34 @@ +#ifndef _MSC_VER +#pragma error "This header is for Microsoft VC only." +#endif /* _MSC_VER */ + +/* Make MSVC more pedantic, this is a recommended pragma list + * from _Win32_Programming_ by Rector and Newcomer. + */ +#pragma warning(error:4002) /* too many actual parameters for macro */ +#pragma warning(error:4003) /* not enough actual parameters for macro */ +#pragma warning(1:4010) /* single-line comment contains line-continuation character */ +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ +#pragma warning(1:4016) /* no function return type; using int as default */ +#pragma warning(error:4020) /* too many actual parameters */ +#pragma warning(error:4021) /* too few actual parameters */ +#pragma warning(error:4027) /* function declared without formal parameter list */ +#pragma warning(error:4029) /* declared formal parameter list different from definition */ +#pragma warning(error:4033) /* 'function' must return a value */ +#pragma warning(error:4035) /* 'function' : no return value */ +#pragma warning(error:4045) /* array bounds overflow */ +#pragma warning(error:4047) /* different levels of indirection */ +#pragma warning(error:4049) /* terminating line number emission */ +#pragma warning(error:4053) /* An expression of type void was used as an operand */ +#pragma warning(error:4071) /* no function prototype given */ +#pragma warning(disable:4101) /* unreferenced local variable */ +#pragma warning(error:4150) + +#pragma warning(disable:4244) /* No possible loss of data warnings */ +#pragma warning(disable:4305) /* No truncation from int to char warnings */ + +#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ + +/* work around Microsoft's premature attempt to deprecate the C-Library */ +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS diff --git a/ports/pangomm/portfile.cmake b/ports/pangomm/portfile.cmake new file mode 100644 index 000000000..58d02f268 --- /dev/null +++ b/ports/pangomm/portfile.cmake @@ -0,0 +1,77 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pangomm-2.40.1) +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/pangomm/2.40/pangomm-2.40.1.tar.xz" + FILENAME "pangomm-2.40.1.tar.xz" + SHA512 bed19800b76e69cc51abeb5997bdc2f687f261ebcbe36aeee51f1fbf5010a46f4b9469033c34a912502001d9985135fd5c7f7574d3de8ba33cc5832520c6aa6f +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) + +set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) + set(VS_PLATFORM "Win32") +endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/pangomm.sln + TARGET pangomm + PLATFORM ${VS_PLATFORM} + # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 + OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets +) + +# Handle headers +file(COPY ${SOURCE_PATH}/MSVC_Net2013/pangomm/pangommconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/pango/pangomm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/pango/pangomm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) + +# Handle libraries +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/pangomm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/pangomm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/pangomm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/pangomm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +vcpkg_copy_pdbs() + +# Handle copyright and readme +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pangomm RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/pangomm RENAME readme.txt) -- cgit v1.2.3 From dad3c7b87cfb6380138de9678048495271224023 Mon Sep 17 00:00:00 2001 From: Mateusz Adamczyk Date: Mon, 23 Oct 2017 22:22:02 +0200 Subject: Added gtkmm --- ports/gtkmm/CONTROL | 4 + ports/gtkmm/COPYING | 502 +++++++ ports/gtkmm/README | 3 + ports/gtkmm/fix_properties.patch | 2423 ++++++++++++++++++++++++++++++++ ports/gtkmm/msvc_recommended_pragmas.h | 34 + ports/gtkmm/portfile.cmake | 117 ++ 6 files changed, 3083 insertions(+) create mode 100644 ports/gtkmm/CONTROL create mode 100644 ports/gtkmm/COPYING create mode 100644 ports/gtkmm/README create mode 100644 ports/gtkmm/fix_properties.patch create mode 100644 ports/gtkmm/msvc_recommended_pragmas.h create mode 100644 ports/gtkmm/portfile.cmake diff --git a/ports/gtkmm/CONTROL b/ports/gtkmm/CONTROL new file mode 100644 index 000000000..a0812ef67 --- /dev/null +++ b/ports/gtkmm/CONTROL @@ -0,0 +1,4 @@ +Source: gtkmm +Version: 3.22.2 +Description: gtkmm is the official C++ interface for the popular GUI library GTK+. +Build-Depends: glib, atk, gtk, gdk-pixbuf, pango, cairo, libepoxy, gettext, glibmm, atkmm, cairomm, pangomm diff --git a/ports/gtkmm/COPYING b/ports/gtkmm/COPYING new file mode 100644 index 000000000..4362b4915 --- /dev/null +++ b/ports/gtkmm/COPYING @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/ports/gtkmm/README b/ports/gtkmm/README new file mode 100644 index 000000000..ea1d8e0a6 --- /dev/null +++ b/ports/gtkmm/README @@ -0,0 +1,3 @@ +This is gtkmm, the C++ API for GTK+. +See http://www.gtkmm.org/ + diff --git a/ports/gtkmm/fix_properties.patch b/ports/gtkmm/fix_properties.patch new file mode 100644 index 000000000..3db0a30e5 --- /dev/null +++ b/ports/gtkmm/fix_properties.patch @@ -0,0 +1,2423 @@ +diff --git a/MSVC_Net2013/gdkmm.vcxproj b/MSVC_Net2013/gdkmm.vcxproj +index dd495a0..94c6396 100644 +--- a/MSVC_Net2013/gdkmm.vcxproj ++++ b/MSVC_Net2013/gdkmm.vcxproj +@@ -93,7 +93,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- $(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + $(OutDir)$(ProjectName)$(DebugDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -118,7 +118,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- $(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -150,7 +150,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- $(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + $(OutDir)$(ProjectName)$(DebugDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -179,7 +179,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- $(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll + $(IntDir)\$(ProjectName).def + false +@@ -263,4 +263,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gdkmm.vcxproj.filters b/MSVC_Net2013/gdkmm.vcxproj.filters +index 826f785..da390e5 100644 +--- a/MSVC_Net2013/gdkmm.vcxproj.filters ++++ b/MSVC_Net2013/gdkmm.vcxproj.filters +@@ -15,71 +15,183 @@ + + + +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ + + +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ + + + + Resource Files + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm-build-defines.props b/MSVC_Net2013/gtkmm-build-defines.props +index 880cbf7..2cb24a3 100644 +--- a/MSVC_Net2013/gtkmm-build-defines.props ++++ b/MSVC_Net2013/gtkmm-build-defines.props +@@ -4,10 +4,8 @@ + + + +- GDKMM_BUILD +- GTKMM_BUILD +- pangomm-vc$(VSVer)0-1_4.lib;giomm-vc$(VSVer)0-2_4.lib;glibmm-vc$(VSVer)0-2_4.lib;cairomm-vc$(VSVer)0-1_0.lib;sigc-vc$(VSVer)0-2_0.lib +- pangomm-vc$(VSVer)0-d-1_4.lib;giomm-vc$(VSVer)0-d-2_4.lib;glibmm-vc$(VSVer)0-d-2_4.lib;cairomm-vc$(VSVer)0-d-1_0.lib;sigc-vc$(VSVer)0-d-2_0.lib ++ GDKMM_BUILD;_WINDLL ++ GTKMM_BUILD;_WINDLL + + + <_PropertySheetDisplayName>glibmmbuilddefinesprops +@@ -16,15 +14,15 @@ + + + +- .\gdkmm;..;..\gdk;$(GlibEtcInstallRoot)\include\pangomm-1.4;$(GlibEtcInstallRoot)\lib\pangomm-1.4\include;$(GlibEtcInstallRoot)\include\giomm-2.4;$(GlibEtcInstallRoot)\lib\giomm-2.4\include;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\cairomm-1.0;$(GlibEtcInstallRoot)\lib\cairomm-1.0\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\gtk-3.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) ++ .\gdkmm;..;..\gdk;.;%(AdditionalIncludeDirectories) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + 4250;%(DisableSpecificWarnings) + true + /d2Zi+ %(AdditionalOptions) + + +- gtk-3.0.lib;gdk-3.0.lib;gdk_pixbuf-2.0.lib;gobject-2.0.lib;gio-2.0.lib;glib-2.0.lib;epoxy.lib;%(AdditionalDependencies) +- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) ++ %(AdditionalDependencies) ++ %(AdditionalLibraryDirectories) + + + +@@ -34,11 +32,5 @@ + + $(GtkMMBuildDefs) + +- +- $(CPPDepLibsRelease) +- +- +- $(CPPDepLibsDebug) +- + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm-version-paths.props b/MSVC_Net2013/gtkmm-version-paths.props +index f0c2834..968562a 100644 +--- a/MSVC_Net2013/gtkmm-version-paths.props ++++ b/MSVC_Net2013/gtkmm-version-paths.props +@@ -2,13 +2,9 @@ + + + 12 +- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) +- $(GlibEtcInstallRoot) + $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ + 3 + 0 +- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) +- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) + + + <_PropertySheetDisplayName>glibmmversionpathsprops +@@ -17,12 +13,6 @@ + + $(VSVer) + +- +- $(GlibEtcInstallRoot) +- +- +- $(CopyDir) +- + + $(DefDir) + +@@ -32,11 +22,5 @@ + + $(ApiMinorVersion) + +- +- $(ReleaseDllSuffix) +- +- +- $(DebugDllSuffix) +- + + +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm.vcxproj b/MSVC_Net2013/gtkmm.vcxproj +index 8093886..ec56ed1 100644 +--- a/MSVC_Net2013/gtkmm.vcxproj ++++ b/MSVC_Net2013/gtkmm.vcxproj +@@ -80,7 +80,7 @@ + %(AdditionalOptions) + Disabled + .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) +- _DEBUG;$(GtkMMBuildDefs);%(PreprocessorDefinitions) ++ _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL +@@ -95,7 +95,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- atkmm-vc$(VSVer)0-d-1_6.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) ++ legacy_stdio_definitions.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)$(DebugDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -108,7 +108,7 @@ + + %(AdditionalOptions) + .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) +- $(GtkMMBuildDefs);%(PreprocessorDefinitions) ++ $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + +@@ -121,7 +121,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- atkmm-vc$(VSVer)0-1_6.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) ++ legacy_stdio_definitions.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll + $(IntDir)\$(ProjectName).def + false +@@ -139,7 +139,7 @@ + %(AdditionalOptions) + Disabled + .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) +- _DEBUG;$(GtkMMBuildDefs);%(PreprocessorDefinitions) ++ _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);) + true + EnableFastChecks + MultiThreadedDebugDLL +@@ -154,7 +154,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- atkmm-vc$(VSVer)0-d-1_6.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) ++ legacy_stdio_definitions.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)$(DebugDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -171,7 +171,7 @@ + + %(AdditionalOptions) + .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) +- $(GtkMMBuildDefs);%(PreprocessorDefinitions) ++ $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + +@@ -184,7 +184,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- atkmm-vc$(VSVer)0-1_6.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) ++ legacy_stdio_definitions.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -697,4 +697,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm.vcxproj.filters b/MSVC_Net2013/gtkmm.vcxproj.filters +index 5237502..5e8bd36 100644 +--- a/MSVC_Net2013/gtkmm.vcxproj.filters ++++ b/MSVC_Net2013/gtkmm.vcxproj.filters +@@ -14,496 +14,1459 @@ + + + +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Header Files +- Header Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Header Files +- Header Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ + + +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Source Files +- Source Files +- Source Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Source Files +- Source Files +- Source Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ + + + + Resource Files + + +- ++ +\ No newline at end of file diff --git a/ports/gtkmm/msvc_recommended_pragmas.h b/ports/gtkmm/msvc_recommended_pragmas.h new file mode 100644 index 000000000..c0eb1d5ed --- /dev/null +++ b/ports/gtkmm/msvc_recommended_pragmas.h @@ -0,0 +1,34 @@ +#ifndef _MSC_VER +#pragma error "This header is for Microsoft VC only." +#endif /* _MSC_VER */ + +/* Make MSVC more pedantic, this is a recommended pragma list + * from _Win32_Programming_ by Rector and Newcomer. + */ +#pragma warning(error:4002) /* too many actual parameters for macro */ +#pragma warning(error:4003) /* not enough actual parameters for macro */ +#pragma warning(1:4010) /* single-line comment contains line-continuation character */ +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ +#pragma warning(1:4016) /* no function return type; using int as default */ +#pragma warning(error:4020) /* too many actual parameters */ +#pragma warning(error:4021) /* too few actual parameters */ +#pragma warning(error:4027) /* function declared without formal parameter list */ +#pragma warning(error:4029) /* declared formal parameter list different from definition */ +#pragma warning(error:4033) /* 'function' must return a value */ +#pragma warning(error:4035) /* 'function' : no return value */ +#pragma warning(error:4045) /* array bounds overflow */ +#pragma warning(error:4047) /* different levels of indirection */ +#pragma warning(error:4049) /* terminating line number emission */ +#pragma warning(error:4053) /* An expression of type void was used as an operand */ +#pragma warning(error:4071) /* no function prototype given */ +#pragma warning(disable:4101) /* unreferenced local variable */ +#pragma warning(error:4150) + +#pragma warning(disable:4244) /* No possible loss of data warnings */ +#pragma warning(disable:4305) /* No truncation from int to char warnings */ + +#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ + +/* work around Microsoft's premature attempt to deprecate the C-Library */ +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS diff --git a/ports/gtkmm/portfile.cmake b/ports/gtkmm/portfile.cmake new file mode 100644 index 000000000..61e7b67f5 --- /dev/null +++ b/ports/gtkmm/portfile.cmake @@ -0,0 +1,117 @@ +# 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) +# + +# Glibmm uses winapi functions not available in WindowsStore, so gtkmm +# also +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) +message(FATAL_ERROR "Error: UWP builds are currently not supported.") +endif() + +# Glibmm relies on DllMain, so gtkmm also +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +message(STATUS "Warning: Static building not supported. Building dynamic.") +set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gtkmm-3.22.2) +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/gtkmm/3.22/gtkmm-3.22.2.tar.xz" + FILENAME "gtkmm-3.22.2.tar.xz" + SHA512 6e96b543e459481145ee0f56f31a7ad2466bd8ccdd2abf3205998aecede73d235149ca6e5ba6e8d20a4fd5345e310870d81ac2a716d4f78d1460ed685badbdc2 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) + +set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) + set(VS_PLATFORM "Win32") +endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/gtkmm.sln + TARGET gtkmm + PLATFORM ${VS_PLATFORM} + # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 + OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets +) + +# Handle headers +file(COPY ${SOURCE_PATH}/MSVC_Net2013/gdkmm/gdkmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/gdk/gdkmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/gdk/gdkmm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) +file(COPY ${SOURCE_PATH}/MSVC_Net2013/gtkmm/gtkmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/gtk/gtkmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/gtk/gtkmm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) + +# Handle libraries +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gdkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gdkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gtkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gtkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gdkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gdkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gtkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gtkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +vcpkg_copy_pdbs() + +# Handle copyright and readme +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtkmm RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtkmm RENAME readme.txt) -- cgit v1.2.3 From 886bc2965d0f7fa5d30121cf28aef1265279494a Mon Sep 17 00:00:00 2001 From: Mateusz Adamczyk Date: Tue, 24 Oct 2017 20:57:31 +0200 Subject: Use unicode --- ports/atkmm/fix_charset.patch | 98 ++ ports/atkmm/portfile.cmake | 2 +- ports/glibmm/fix_charset.patch | 2702 +++++++++++++++++++++++++++++++++++++++ ports/glibmm/portfile.cmake | 2 +- ports/gtkmm/fix_charset.patch | 2053 +++++++++++++++++++++++++++++ ports/gtkmm/portfile.cmake | 14 +- ports/pangomm/fix_charset.patch | 110 ++ ports/pangomm/portfile.cmake | 2 +- 8 files changed, 4967 insertions(+), 16 deletions(-) create mode 100644 ports/atkmm/fix_charset.patch create mode 100644 ports/glibmm/fix_charset.patch create mode 100644 ports/gtkmm/fix_charset.patch create mode 100644 ports/pangomm/fix_charset.patch diff --git a/ports/atkmm/fix_charset.patch b/ports/atkmm/fix_charset.patch new file mode 100644 index 000000000..60cd8fbcd --- /dev/null +++ b/ports/atkmm/fix_charset.patch @@ -0,0 +1,98 @@ +diff --git a/MSVC_Net2013/atkmm.vcxproj b/MSVC_Net2013/atkmm.vcxproj +index 40f21cb..e9f5c5e 100644 +--- a/MSVC_Net2013/atkmm.vcxproj ++++ b/MSVC_Net2013/atkmm.vcxproj +@@ -22,21 +22,22 @@ + atkmm + {9FE0D5A6-458C-45C7-B954-2C3C1E6196C2} + Win32Proj ++ 8.1 + + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index d6f2798..aab7023 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -21,21 +21,22 @@ + + {07324745-C9BE-4D65-B08A-9C88188C0C28} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj +index 6225a66..7f61dc5 100644 +--- a/MSVC_Net2013/install.vcxproj ++++ b/MSVC_Net2013/install.vcxproj +@@ -22,28 +22,29 @@ + {2093D218-190E-4194-9421-3BA7CBF33B10} + install + Win32Proj ++ 8.1 + + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + diff --git a/ports/atkmm/portfile.cmake b/ports/atkmm/portfile.cmake index 84fc6e6a0..4cbaee7ad 100644 --- a/ports/atkmm/portfile.cmake +++ b/ports/atkmm/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch ${CMAKE_CURRENT_LIST_DIR}/fix_charset.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) diff --git a/ports/glibmm/fix_charset.patch b/ports/glibmm/fix_charset.patch new file mode 100644 index 000000000..8831fc946 --- /dev/null +++ b/ports/glibmm/fix_charset.patch @@ -0,0 +1,2702 @@ +diff --git a/MSVC_Net2013/compose.vcxproj b/MSVC_Net2013/compose.vcxproj +index 4775af3..72a7054 100644 +--- a/MSVC_Net2013/compose.vcxproj ++++ b/MSVC_Net2013/compose.vcxproj +@@ -23,26 +23,27 @@ + {D1C74410-023C-48DE-B636-E8B6D177C306} + compose + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/dispatcher.vcxproj b/MSVC_Net2013/dispatcher.vcxproj +index 6c403c0..90d254a 100644 +--- a/MSVC_Net2013/dispatcher.vcxproj ++++ b/MSVC_Net2013/dispatcher.vcxproj +@@ -23,26 +23,27 @@ + {129ECC08-6D30-4884-B824-4AF96EF0A45C} + dispatcher + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/dispatcher2.vcxproj b/MSVC_Net2013/dispatcher2.vcxproj +index db6a5fd..9cf6b57 100644 +--- a/MSVC_Net2013/dispatcher2.vcxproj ++++ b/MSVC_Net2013/dispatcher2.vcxproj +@@ -22,26 +22,27 @@ + dispatcher2 + {18A82706-B645-4DF5-AB09-06B90128BAC5} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -188,4 +189,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index 8894039..0b2cb08 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -1,168 +1,169 @@ +-??? +- +- +- +- Debug +- Win32 +- +- +- Debug +- x64 +- +- +- Release +- Win32 +- +- +- Release +- x64 +- +- +- +- {07324745-C9BE-4D65-B08A-9C88188C0C28} +- Win32Proj +- +- +- +- Application +- MultiByte +- v120 +- +- +- Application +- MultiByte +- v120 +- +- +- Application +- MultiByte +- v120 +- +- +- Application +- MultiByte +- v120 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- true +- true +- false +- true +- true +- true +- false +- true +- +- +- +- Disabled +- _DEBUG;%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebug +- Level3 +- EditAndContinue +- +- +- true +- $(OutDir)\$(TargetName).pdb +- Console +- false +- +- +- MachineX86 ++??? ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ {07324745-C9BE-4D65-B08A-9C88188C0C28} ++ Win32Proj ++ 8.1 ++ ++ ++ ++ Application ++ Unicode ++ v120 ++ ++ ++ Application ++ Unicode ++ v120 ++ ++ ++ Application ++ Unicode ++ v120 ++ ++ ++ Application ++ Unicode ++ v120 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ true ++ true ++ false ++ true ++ true ++ true ++ false ++ true ++ ++ ++ ++ Disabled ++ _DEBUG;%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebug ++ Level3 ++ EditAndContinue ++ ++ ++ true ++ $(OutDir)\$(TargetName).pdb ++ Console ++ false ++ ++ ++ MachineX86 + %(AdditionalDependencies) +- +- +- +- +- ;%(PreprocessorDefinitions) +- MultiThreaded +- Level3 +- ProgramDatabase +- +- +- true +- Console +- true +- true +- false +- +- +- MachineX86 ++ ++ ++ ++ ++ ;%(PreprocessorDefinitions) ++ MultiThreaded ++ Level3 ++ ProgramDatabase ++ ++ ++ true ++ Console ++ true ++ true ++ false ++ ++ ++ MachineX86 + %(AdditionalDependencies) +- +- +- +- +- X64 +- +- +- Disabled +- _DEBUG;%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebug +- Level3 +- ProgramDatabase +- +- +- true +- $(OutDir)\$(TargetName).pdb +- Console +- false +- +- +- MachineX64 ++ ++ ++ ++ ++ X64 ++ ++ ++ Disabled ++ _DEBUG;%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebug ++ Level3 ++ ProgramDatabase ++ ++ ++ true ++ $(OutDir)\$(TargetName).pdb ++ Console ++ false ++ ++ ++ MachineX64 + %(AdditionalDependencies) +- +- +- +- +- X64 +- +- +- ;%(PreprocessorDefinitions) +- MultiThreaded +- Level3 +- ProgramDatabase +- +- +- true +- Console +- true +- true +- false +- +- +- MachineX64 ++ ++ ++ ++ ++ X64 ++ ++ ++ ;%(PreprocessorDefinitions) ++ MultiThreaded ++ Level3 ++ ProgramDatabase ++ ++ ++ true ++ Console ++ true ++ true ++ false ++ ++ ++ MachineX64 + %(AdditionalDependencies) +- +- +- +- +- +- +- +- +- +\ No newline at end of file ++ ++ ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/giomm.vcxproj b/MSVC_Net2013/giomm.vcxproj +index df3c4f8..f9baf6b 100644 +--- a/MSVC_Net2013/giomm.vcxproj ++++ b/MSVC_Net2013/giomm.vcxproj +@@ -1,458 +1,459 @@ +-??? +- +- +- +- Debug +- Win32 +- +- +- Debug +- x64 +- +- +- Release +- Win32 +- +- +- Release +- x64 +- +- +- +- giomm +- {EE6C0430-C2C9-425C-8EBA-963FAC3E9832} +- +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- %(AdditionalOptions) +- Disabled ++??? ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ giomm ++ {EE6C0430-C2C9-425C-8EBA-963FAC3E9832} ++ 8.1 ++ ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ %(AdditionalOptions) ++ Disabled + .\giomm;..\gio;%(AdditionalIncludeDirectories) +- _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- Level3 +- EditAndContinue +- +- +- Generate giomm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj +- +- ++ _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ Level3 ++ EditAndContinue ++ ++ ++ Generate giomm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll +- $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- Disabled ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ Disabled + .\giomm;..\gio;%(AdditionalIncludeDirectories) +- _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- Level3 +- ProgramDatabase +- +- +- Generate giomm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj +- +- ++ _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate giomm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll +- $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- MachineX64 +- +- +- +- +- %(AdditionalOptions) ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ %(AdditionalOptions) + .\giomm;..\gio;%(AdditionalIncludeDirectories) +- $(GioMMBuildDefs);%(PreprocessorDefinitions) +- MultiThreadedDLL +- Level3 +- ProgramDatabase +- +- +- Generate giomm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj +- +- ++ $(GioMMBuildDefs);%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate giomm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll +- $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- false +- true +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb +- true +- +- +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ false ++ true ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb ++ true ++ ++ ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) + .\giomm;..\gio;%(AdditionalIncludeDirectories) +- $(GioMMBuildDefs);%(PreprocessorDefinitions) +- MultiThreadedDLL +- Level3 +- ProgramDatabase +- +- +- Generate giomm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj +- +- ++ $(GioMMBuildDefs);%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate giomm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll +- $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- false +- true +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb +- true +- +- +- MachineX64 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- {58b2b53c-c4ff-47fd-817b-095e45b7f7d4} +- false +- +- +- +- +- +- +\ No newline at end of file ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ false ++ true ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb ++ true ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ {58b2b53c-c4ff-47fd-817b-095e45b7f7d4} ++ false ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/giomm_simple.vcxproj b/MSVC_Net2013/giomm_simple.vcxproj +index 1eb6124..2db412e 100644 +--- a/MSVC_Net2013/giomm_simple.vcxproj ++++ b/MSVC_Net2013/giomm_simple.vcxproj +@@ -23,26 +23,27 @@ + {F4F66980-51D4-4CC2-A529-9AD2C9F7D143} + tests_giomm_simple + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/glibmm.vcxproj b/MSVC_Net2013/glibmm.vcxproj +index cf86400..e3df6a8 100644 +--- a/MSVC_Net2013/glibmm.vcxproj ++++ b/MSVC_Net2013/glibmm.vcxproj +@@ -1,362 +1,363 @@ +-??? +- +- +- +- Debug +- Win32 +- +- +- Debug +- x64 +- +- +- Release +- Win32 +- +- +- Release +- x64 +- +- +- +- glibmm +- {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} +- glibmm +- Win32Proj +- +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- true +- true +- true +- true +- true +- true +- true +- true +- +- +- +- %(AdditionalOptions) +- Disabled +- %(AdditionalIncludeDirectories) +- _DEBUG;$(GLibMMBuildDefs);%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- true +- Level3 +- EditAndContinue +- +- +- Generate glibmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj +- +- ++??? ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ glibmm ++ {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} ++ glibmm ++ Win32Proj ++ 8.1 ++ ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ true ++ true ++ true ++ true ++ true ++ true ++ true ++ true ++ ++ ++ ++ %(AdditionalOptions) ++ Disabled ++ %(AdditionalIncludeDirectories) ++ _DEBUG;$(GLibMMBuildDefs);%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ true ++ Level3 ++ EditAndContinue ++ ++ ++ Generate glibmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll +- $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- Disabled +- %(AdditionalIncludeDirectories) +- _DEBUG;$(GLibMMBuildDefs);%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- true +- Level3 +- ProgramDatabase +- +- +- Generate glibmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj +- +- ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ Disabled ++ %(AdditionalIncludeDirectories) ++ _DEBUG;$(GLibMMBuildDefs);%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ true ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate glibmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll +- $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- MachineX64 +- +- +- +- +- %(AdditionalOptions) +- %(AdditionalIncludeDirectories) +- $(GLibMMBuildDefs);%(PreprocessorDefinitions) +- MultiThreadedDLL +- true +- Level3 +- ProgramDatabase +- +- +- Generate glibmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj +- +- ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ %(AdditionalOptions) ++ %(AdditionalIncludeDirectories) ++ $(GLibMMBuildDefs);%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ true ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate glibmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll +- $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- true +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb +- false +- true +- +- +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- %(AdditionalIncludeDirectories) +- $(GLibMMBuildDefs);%(PreprocessorDefinitions) +- MultiThreadedDLL +- true +- Level3 +- ProgramDatabase +- +- +- Generate glibmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj +- +- ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ true ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb ++ false ++ true ++ ++ ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ %(AdditionalIncludeDirectories) ++ $(GLibMMBuildDefs);%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ true ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate glibmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- %(AdditionalLibraryDirectories) +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll +- $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib +- $(IntDir)\$(ProjectName).def +- true +- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb +- false +- true +- +- +- MachineX64 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- {07324745-c9be-4d65-b08a-9c88188c0c28} +- false +- +- +- +- +- +- +\ No newline at end of file ++ %(AdditionalLibraryDirectories) ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll ++ $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib ++ $(IntDir)\$(ProjectName).def ++ true ++ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb ++ false ++ true ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ {07324745-c9be-4d65-b08a-9c88188c0c28} ++ false ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/glibmm_value.vcxproj b/MSVC_Net2013/glibmm_value.vcxproj +index 9639003..7e12415 100644 +--- a/MSVC_Net2013/glibmm_value.vcxproj ++++ b/MSVC_Net2013/glibmm_value.vcxproj +@@ -23,26 +23,27 @@ + {22277003-3228-486E-A6A8-994B8B13AF30} + tests_glibmm_value + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -186,4 +187,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj +index 059ceec..b6f2843 100644 +--- a/MSVC_Net2013/install.vcxproj ++++ b/MSVC_Net2013/install.vcxproj +@@ -22,28 +22,29 @@ + {2093D218-190E-4194-9421-3BA7CBF33B10} + install + Win32Proj ++ 8.1 + + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + +@@ -113,4 +114,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/keyfile.vcxproj b/MSVC_Net2013/keyfile.vcxproj +index 0993e6a..ee23bae 100644 +--- a/MSVC_Net2013/keyfile.vcxproj ++++ b/MSVC_Net2013/keyfile.vcxproj +@@ -23,26 +23,27 @@ + {569A24AB-8D81-4427-B40D-85485AA7F3CD} + dispatcher + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/markup.vcxproj b/MSVC_Net2013/markup.vcxproj +index 03b3295..db2dfab 100644 +--- a/MSVC_Net2013/markup.vcxproj ++++ b/MSVC_Net2013/markup.vcxproj +@@ -22,26 +22,27 @@ + markup + {6300FCFA-97F1-4967-802E-E354D95DB0EB} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -188,4 +189,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/options.vcxproj b/MSVC_Net2013/options.vcxproj +index f627c4e..dda25b9 100644 +--- a/MSVC_Net2013/options.vcxproj ++++ b/MSVC_Net2013/options.vcxproj +@@ -23,26 +23,27 @@ + {46962B9A-C5E9-4863-9408-97514D63F420} + dispatcher + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/properties.vcxproj b/MSVC_Net2013/properties.vcxproj +index 6858140..d8a95c2 100644 +--- a/MSVC_Net2013/properties.vcxproj ++++ b/MSVC_Net2013/properties.vcxproj +@@ -23,26 +23,27 @@ + {206CC821-8BE3-4455-B09E-63F93E30F20C} + dispatcher + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/regex.vcxproj b/MSVC_Net2013/regex.vcxproj +index 84418df..c4c0cf0 100644 +--- a/MSVC_Net2013/regex.vcxproj ++++ b/MSVC_Net2013/regex.vcxproj +@@ -23,26 +23,27 @@ + {7374A5A1-4E74-44BD-918C-FDF80B97FA3F} + dispatcher + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -189,4 +190,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/resolver.vcxproj b/MSVC_Net2013/resolver.vcxproj +index 113d86a..9fa59a4 100644 +--- a/MSVC_Net2013/resolver.vcxproj ++++ b/MSVC_Net2013/resolver.vcxproj +@@ -23,26 +23,27 @@ + {E4D320F1-7D2D-43AF-874F-14524220EF92} + resolver + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -193,4 +194,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/socket-client.vcxproj b/MSVC_Net2013/socket-client.vcxproj +index 3743708..bfb8330 100644 +--- a/MSVC_Net2013/socket-client.vcxproj ++++ b/MSVC_Net2013/socket-client.vcxproj +@@ -23,26 +23,27 @@ + {1E38D900-90AC-4E18-B34C-7B08E3383087} + socket-client + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -193,4 +194,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/socket-client.vcxproj.filters b/MSVC_Net2013/socket-client.vcxproj.filters +index edb14c1..8d41b33 100644 +--- a/MSVC_Net2013/socket-client.vcxproj.filters ++++ b/MSVC_Net2013/socket-client.vcxproj.filters +@@ -15,6 +15,6 @@ + + + +- Source Files ++ + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/socket-server.vcxproj b/MSVC_Net2013/socket-server.vcxproj +index 4116263..e6744af 100644 +--- a/MSVC_Net2013/socket-server.vcxproj ++++ b/MSVC_Net2013/socket-server.vcxproj +@@ -23,26 +23,27 @@ + {7A4EB8C4-4784-4E9E-96E6-CA6FF4CE1D20} + socket-server + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -193,4 +194,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/socket-server.vcxproj.filters b/MSVC_Net2013/socket-server.vcxproj.filters +index 66a88d3..8d41b33 100644 +--- a/MSVC_Net2013/socket-server.vcxproj.filters ++++ b/MSVC_Net2013/socket-server.vcxproj.filters +@@ -15,6 +15,6 @@ + + + +- Source Files ++ + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/thread.vcxproj b/MSVC_Net2013/thread.vcxproj +index 9950bbb..d1824e8 100644 +--- a/MSVC_Net2013/thread.vcxproj ++++ b/MSVC_Net2013/thread.vcxproj +@@ -22,26 +22,27 @@ + thread + {5357AB2B-A5F9-463C-92D8-00357CCC3ECE} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -184,4 +185,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/threadpool.vcxproj b/MSVC_Net2013/threadpool.vcxproj +index 9ab9748..d0a0d15 100644 +--- a/MSVC_Net2013/threadpool.vcxproj ++++ b/MSVC_Net2013/threadpool.vcxproj +@@ -22,26 +22,27 @@ + threadpool + {962484DB-2111-48A4-BEF0-194433719D0D} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -192,4 +193,4 @@ + + + +- ++ +\ No newline at end of file diff --git a/ports/glibmm/portfile.cmake b/ports/glibmm/portfile.cmake index f5880ecf7..fd4853f55 100644 --- a/ports/glibmm/portfile.cmake +++ b/ports/glibmm/portfile.cmake @@ -21,7 +21,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch ${CMAKE_CURRENT_LIST_DIR}/fix_charset.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) diff --git a/ports/gtkmm/fix_charset.patch b/ports/gtkmm/fix_charset.patch new file mode 100644 index 000000000..027d74f99 --- /dev/null +++ b/ports/gtkmm/fix_charset.patch @@ -0,0 +1,2053 @@ +diff --git a/MSVC_Net2013/gdkmm.vcxproj b/MSVC_Net2013/gdkmm.vcxproj +index d9d08ac..8c6b528 100644 +--- a/MSVC_Net2013/gdkmm.vcxproj ++++ b/MSVC_Net2013/gdkmm.vcxproj +@@ -1,266 +1,267 @@ +-??? +- +- +- +- Debug +- Win32 +- +- +- Debug +- x64 +- +- +- Release +- Win32 +- +- +- Release +- x64 +- +- +- +- gdkmm +- {976C8F9C-1A1D-4E23-B79E-EC9091BBEA0E} +- Win32Proj +- +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- true +- true +- true +- true +- $(ProjectName)$(DebugDllSuffix) +- $(ProjectName)$(DebugDllSuffix) +- $(ProjectName)$(ReleaseDllSuffix) +- $(ProjectName)$(ReleaseDllSuffix) +- +- +- +- %(AdditionalOptions) +- Disabled +- _DEBUG;$(GdkMMBuildDefs);%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- true +- +- +- Level3 +- EditAndContinue +- +- +- Generate gdkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++??? ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ gdkmm ++ {976C8F9C-1A1D-4E23-B79E-EC9091BBEA0E} ++ Win32Proj ++ 8.1 ++ ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ true ++ true ++ true ++ true ++ $(ProjectName)$(DebugDllSuffix) ++ $(ProjectName)$(DebugDllSuffix) ++ $(ProjectName)$(ReleaseDllSuffix) ++ $(ProjectName)$(ReleaseDllSuffix) ++ ++ ++ ++ %(AdditionalOptions) ++ Disabled ++ _DEBUG;$(GdkMMBuildDefs);%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ true ++ ++ ++ Level3 ++ EditAndContinue ++ ++ ++ Generate gdkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(DebugDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- +- +- +- +- %(AdditionalOptions) +- $(GdkMMBuildDefs);%(PreprocessorDefinitions) +- MultiThreadedDLL +- true +- +- +- Level3 +- ProgramDatabase +- +- +- Generate gdkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ $(OutDir)$(ProjectName)$(DebugDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ ++ ++ ++ ++ %(AdditionalOptions) ++ $(GdkMMBuildDefs);%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate gdkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- true +- true +- false +- +- +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- Disabled +- _DEBUG;$(GdkMMBuildDefs);%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- true +- +- +- Level3 +- ProgramDatabase +- +- +- Generate gdkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ true ++ true ++ false ++ ++ ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ Disabled ++ _DEBUG;$(GdkMMBuildDefs);%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate gdkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(DebugDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- MachineX64 +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- $(GdkMMBuildDefs);%(PreprocessorDefinitions) +- MultiThreadedDLL +- true +- +- +- Level3 +- ProgramDatabase +- +- +- Generate gdkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ $(OutDir)$(ProjectName)$(DebugDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ $(GdkMMBuildDefs);%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate gdkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + %(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- false +- true +- true +- +- +- MachineX64 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- {07324745-c9be-4d65-b08a-9c88188c0c28} +- false +- +- +- +- +- +- +\ No newline at end of file ++ $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ false ++ true ++ true ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ {07324745-c9be-4d65-b08a-9c88188c0c28} ++ false ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index 33dfe5e..01b9271 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -21,26 +21,27 @@ + + {07324745-C9BE-4D65-B08A-9C88188C0C28} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/gtkmm.vcxproj b/MSVC_Net2013/gtkmm.vcxproj +index 2c732f8..ad9d312 100644 +--- a/MSVC_Net2013/gtkmm.vcxproj ++++ b/MSVC_Net2013/gtkmm.vcxproj +@@ -1,700 +1,701 @@ +-??? +- +- +- +- Debug +- Win32 +- +- +- Debug +- x64 +- +- +- Release +- Win32 +- +- +- Release +- x64 +- +- +- +- gtkmm +- {907B8D15-7E12-4136-A7E6-B6ED5E055D39} +- gtkmm +- Win32Proj +- +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- DynamicLibrary +- MultiByte +- v120 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- true +- true +- true +- true +- $(ProjectName)$(DebugDllSuffix) +- $(ProjectName)$(DebugDllSuffix) +- $(ProjectName)$(ReleaseDllSuffix) +- $(ProjectName)$(ReleaseDllSuffix) +- +- +- +- %(AdditionalOptions) +- Disabled +- .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) ++??? ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Debug ++ x64 ++ ++ ++ Release ++ Win32 ++ ++ ++ Release ++ x64 ++ ++ ++ ++ gtkmm ++ {907B8D15-7E12-4136-A7E6-B6ED5E055D39} ++ gtkmm ++ Win32Proj ++ 8.1 ++ ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ DynamicLibrary ++ Unicode ++ v120 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ true ++ true ++ true ++ true ++ $(ProjectName)$(DebugDllSuffix) ++ $(ProjectName)$(DebugDllSuffix) ++ $(ProjectName)$(ReleaseDllSuffix) ++ $(ProjectName)$(ReleaseDllSuffix) ++ ++ ++ ++ %(AdditionalOptions) ++ Disabled ++ .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) + _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- true +- +- +- Level3 +- EditAndContinue +- +- +- Generate gtkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ true ++ ++ ++ Level3 ++ EditAndContinue ++ ++ ++ Generate gtkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + legacy_stdio_definitions.lib;%(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(DebugDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- +- +- +- +- %(AdditionalOptions) +- .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) ++ $(OutDir)$(ProjectName)$(DebugDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ ++ ++ ++ ++ %(AdditionalOptions) ++ .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) + $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) +- MultiThreadedDLL +- true +- +- +- Level3 +- ProgramDatabase +- +- +- Generate gtkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ MultiThreadedDLL ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate gtkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + legacy_stdio_definitions.lib;%(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- false +- true +- true +- +- +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- Disabled +- .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) ++ $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ false ++ true ++ true ++ ++ ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ Disabled ++ .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) + _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);) +- true +- EnableFastChecks +- MultiThreadedDebugDLL +- true +- +- +- Level3 +- ProgramDatabase +- +- +- Generate gtkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate gtkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + legacy_stdio_definitions.lib;%(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(DebugDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- true +- false +- +- +- MachineX64 +- +- +- +- +- X64 +- +- +- %(AdditionalOptions) +- .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) ++ $(OutDir)$(ProjectName)$(DebugDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ true ++ false ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ X64 ++ ++ ++ %(AdditionalOptions) ++ .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) + $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) +- MultiThreadedDLL +- true +- +- +- Level3 +- ProgramDatabase +- +- +- Generate gtkmm def file +- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj +- +- ++ MultiThreadedDLL ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ Generate gtkmm def file ++ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj ++ ++ + legacy_stdio_definitions.lib;%(AdditionalDependencies) +- $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll +- $(IntDir)\$(ProjectName).def +- true +- true +- false +- +- +- MachineX64 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- {976c8f9c-1a1d-4e23-b79e-ec9091bbea0e} +- false +- +- +- {07324745-c9be-4d65-b08a-9c88188c0c28} +- false +- +- +- +- +- +- +\ No newline at end of file ++ $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll ++ $(IntDir)\$(ProjectName).def ++ true ++ true ++ false ++ ++ ++ MachineX64 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ {976c8f9c-1a1d-4e23-b79e-ec9091bbea0e} ++ false ++ ++ ++ {07324745-c9be-4d65-b08a-9c88188c0c28} ++ false ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm3-demo.vcxproj b/MSVC_Net2013/gtkmm3-demo.vcxproj +index 9c33d45..84a988a 100644 +--- a/MSVC_Net2013/gtkmm3-demo.vcxproj ++++ b/MSVC_Net2013/gtkmm3-demo.vcxproj +@@ -23,26 +23,27 @@ + {5A8BBE25-E8D8-487B-AD2D-690438F09FA1} + gtkmm3-demo + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +@@ -251,4 +252,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj +index 1df2f4b..a484bd6 100644 +--- a/MSVC_Net2013/install.vcxproj ++++ b/MSVC_Net2013/install.vcxproj +@@ -22,28 +22,29 @@ + {2093D218-190E-4194-9421-3BA7CBF33B10} + install + Win32Proj ++ 8.1 + + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + diff --git a/ports/gtkmm/portfile.cmake b/ports/gtkmm/portfile.cmake index 61e7b67f5..c82bc597d 100644 --- a/ports/gtkmm/portfile.cmake +++ b/ports/gtkmm/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) -# - # Glibmm uses winapi functions not available in WindowsStore, so gtkmm # also if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) @@ -33,7 +21,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch ${CMAKE_CURRENT_LIST_DIR}/fix_charset.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) diff --git a/ports/pangomm/fix_charset.patch b/ports/pangomm/fix_charset.patch new file mode 100644 index 000000000..d57063c86 --- /dev/null +++ b/ports/pangomm/fix_charset.patch @@ -0,0 +1,110 @@ +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index ceca956..c29a2a1 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -21,26 +21,27 @@ + + {07324745-C9BE-4D65-B08A-9C88188C0C28} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj +index fecde32..8f97675 100644 +--- a/MSVC_Net2013/install.vcxproj ++++ b/MSVC_Net2013/install.vcxproj +@@ -22,28 +22,29 @@ + {2093D218-190E-4194-9421-3BA7CBF33B10} + install + Win32Proj ++ 8.1 + + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/pangomm.vcxproj b/MSVC_Net2013/pangomm.vcxproj +index aa03fad..d63becf 100644 +--- a/MSVC_Net2013/pangomm.vcxproj ++++ b/MSVC_Net2013/pangomm.vcxproj +@@ -23,26 +23,27 @@ + {A93D607A-5C37-4AEC-BA08-6A655F6DC834} + pangomm + Win32Proj ++ 8.1 + + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + diff --git a/ports/pangomm/portfile.cmake b/ports/pangomm/portfile.cmake index 58d02f268..ad350f638 100644 --- a/ports/pangomm/portfile.cmake +++ b/ports/pangomm/portfile.cmake @@ -21,7 +21,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch ${CMAKE_CURRENT_LIST_DIR}/fix_charset.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) -- cgit v1.2.3 From fdf331e2883200e1922b8ed051dc4ab775619d60 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 4 Nov 2017 10:07:16 -0700 Subject: [glibmm] Add missing dependency: libsigcpp --- ports/glibmm/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/glibmm/CONTROL b/ports/glibmm/CONTROL index babaee277..52a4e0e05 100644 --- a/ports/glibmm/CONTROL +++ b/ports/glibmm/CONTROL @@ -1,4 +1,4 @@ Source: glibmm Version: 2.52.1 Description: This is glibmm, a C++ API for parts of glib that are useful for C++. See http://www.gtkmm.org. -Build-Depends: zlib, pcre, libffi, gettext, libiconv, glib +Build-Depends: zlib, pcre, libffi, gettext, libiconv, glib, libsigcpp -- cgit v1.2.3 From 30f74216028193e619826809897085a9f536a607 Mon Sep 17 00:00:00 2001 From: Vlad Kolesnikov Date: Sat, 4 Nov 2017 14:54:12 -0700 Subject: Adding OpenSSL support to FFMPEG, fixed Assmimp UWP build (#2018) * Enable ffmpeg to build using openssl for HTTPS/TLS support * [ffmpeg] Add contract versions to libpath * Updated FFMPEG to 3.3.3; Fixed unistd.h issue in ffmpeg build * merge fix * merge fix * fix merge * removed extra files * Assimp UWP build fix * [assimp] Bump version * [ffmpeg] Implement openssl support through features. * [opencv] remove ffmpeg depenency OpenCV has own prebuilt ffmpeg library * Fix version, package name is not a part of it * Add support build option to PCL port Add support build options (pcap, qt) to PCL port. * Update VTK to 8.0.1 Update VTK to 8.0.1. * [vcpkg] Enable pkg[*] as alias for all features. * Using CP_UTF8 macro instead of magic numbers. * [vcpkg] Add optional Abi field to BinaryParagraph for future use. * [double-conversion] Fix --head builds * [vcpkg] --head should only apply to USER_REQUESTED packages. * [vcpkg] Fix bug where packages with uninstalled features appear to be uninstalled. * Update Catch to 1.11.0 * Fix proxy usage in Win7 (powershell 2.0) * [findVSInstances] Data lines are now placed within tags. Text outside these tags is ignored This means we can print text in powershell now and it won't break vcpkg. * [fetchDependency] Now also returns output in the form data * [git] Update to 2.15.0 (was 2.14.3) * [bootstrap-vcpkg] Added better diagnostics in case of MSBuild failure. * [poco] build with MySQL support (#2088) * [poco] build with MySQL support Set proper variables to enable MySQL support if libmysql port is installed * [poco] Move Mysql support to a feature. Enable CMake config files. * help assimp find vcpkg's copy of zlib so it does not build its own * [assimp] Bump revision * [assimp] Fix assimp overwriting CMAKE_PREFIX_PATH. * [boost] Handle spaces in vcpkg path. * [vcpkg] Fix use of features in undocumented build command * Update to v1.2.0. Remove man pages * [opencv] Remove ffmpeg from dependencies -- it is not currently possible to use an external ffmpeg with opencv. Add features for cuda and vtk. * Enable OpenGL support for GUI Enable OpenGL support for GUI. * [protobuf] Add feature packages for zlib ZLib based features like Gzip streams. * [llvm] Require Python3 * [blaze] Fix remaining stray _INVALID_ROOT_ * Add option to enable Qt GUI support Add option to enable Qt GUI support. * Sorting CMake options for maintainability Sorting CMake options based on grouped of CMake-GUI for maintainability. * VTK: implement features (#2071) * [vtk/portfile] add OpenVR option * [vtk/control] add OpenVR feature * [vtk/portfile] Add OpenVR feature to portfile * [vtk/CONTROL] add features * [vtk/portfile] implement features * [vtk/CONTROL] fix syntax * [vtk/CONTROL] fix case * [vtk/portfile] fix case * [vtk/CONTROL] fix syntax * [vtk/CONTROL] fix syntax * [vtk/portfile] fix module name * [vtk] Bump version * [uwebsockets] Remove boost from dependency list to follow upstream's official README * [libharu] Fix DLLIMPORT macro replacement * Update CHANGELOG and bump version to v0.0.95 * Fix date in CHANGELOG.md * [apr] Update to 1.6.3 * Enable C++11 features Enable C++11 features. * Enable Microsoft Media Foundation support for Video I/O Enable Microsoft Media Foundation support for Video I/O. * [double-conversion] Fix regression introduced in vcpkg_fixup_cmake_targets. * [vcpkg] Refactor argument parsing to use common code paths. * [vcpkg] Improve `vcpkg help` -- now has per-command help! * [vcpkg-help-export-ifw] Add settings description * [opencv] Disable MSMF in UWP due to an upstream bug * [vcpkg_download_distfile] Now downloads in a temp dir and rename to the target location * [vcpkg_find_acquire_program] Use vcpkg_download_distfile() * Remove vcpkg_acquire_depot_tools * [downloads] Don't show progress by default * [vcpkg_acquire_msys] Use vcpkg_download_distfile() * vcpkg_from_github] Use vcpkg_download_distfile() * [vcpkg_from_bitbucket] Use vcpkg_download_distfile() * [ports.cmake] Use vcpkg_download_distfile() * [antlr] upgrade to antlr4.7 * [antlr4] bump version to 4.7 * Use download-at-temp-and-rename pattern in powershell too * Print error message when there is a syntax error in triplet file As it is now vcpkg fails silently (actually, it outputs two empty lines). * [fdk-aac] init * [fetchDependendy.ps1] Remove obsolete comment * [fetchDependency.ps1] Improve error message on hash mismatch * [vswhere] Update to 2.2.11 (was 2.2.7) * libaiff * Append W * [libaiff] fix uninitialized buffer * Add the flint2 library (#1988) * Add the "flint2" library. * FIX: update library name * FIX: only set MSVC version to VC14 * FIX: use static linkage * DOC: display notification to the user * [flint/CONTROL] add gettimeofday dependency * [flint/portfile] move up linkage * [flint/portfile] attempt to override the CRT linkage * Add arblib (#1991) * Fix rename libraries of FLANN Fix rename libraries of FLANN. * Fix line endings * [cmake] Update to 3.9.5 (was 3.9.4) * Porting ITK * Sourcing from GitHub, using a master version with vcpkg patch * Update CHANGELOG and bump version to v0.0.96 * [fftw] update to 3.3.7 * [dlib] update to 19.7 and use vcpkg_from_github * fix issue 2111 * Revert "Updated libsigcpp to version 2.99.9" This reverts commit 079ef9785ad539e1484f876577913a7269021288. * Added glibmm and giomm. * Added atkmm. * Added pangomm. * Added gtkmm * Use unicode * [glibmm] Add missing dependency: libsigcpp --- ports/assimp/CONTROL | 2 +- ports/assimp/portfile.cmake | 2 ++ ports/ffmpeg/CONTROL | 6 +++++- ports/ffmpeg/detect-openssl.patch | 25 +++++++++++++++++++++++++ ports/ffmpeg/portfile.cmake | 14 ++++++++++++++ 5 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 ports/ffmpeg/detect-openssl.patch diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index 9666a06b3..f6e6eaaff 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 4.0.1-2 +Version: 4.0.1-3 Description: The Open Asset import library Build-Depends: zlib diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 496300240..583738e16 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -16,6 +16,8 @@ vcpkg_apply_patches( ) file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake) +set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS") +set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 658c4b1f2..0b9d22dba 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,4 +1,8 @@ Source: ffmpeg -Version: 3.3.3 +Version: 3.3.3-1 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. + +Feature: openssl +Build-Depends: openssl +Description: openssl support in ffmpeg diff --git a/ports/ffmpeg/detect-openssl.patch b/ports/ffmpeg/detect-openssl.patch new file mode 100644 index 000000000..cb8a77e0a --- /dev/null +++ b/ports/ffmpeg/detect-openssl.patch @@ -0,0 +1,25 @@ +From 18de5c60ae0a987680681d5a0602009b428504fa Mon Sep 17 00:00:00 2001 +From: Gilles Khouzam +Date: Mon, 19 Jun 2017 16:33:38 -0700 +Subject: [PATCH] Add better detection for Openssl on Windows. + +Look for libeay32 and ssleay32 as another detection mechanism +--- + configure | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure b/configure +index a1818dc..1cf2a7c 100755 +--- a/configure ++++ b/configure +@@ -5836,6 +5836,7 @@ enabled openssl && { use_pkg_config openssl openssl/ssl.h OPENSSL_init + check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || + check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || + check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || ++ check_lib openssl/ssl.h SSL_library_init -llibeay32 -lssleay32 || + die "ERROR: openssl not found"; } + enabled qtkit_indev && { check_header_objcc QTKit/QTKit.h || disable qtkit_indev; } + +-- +2.10.1.windows.1 + diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 8bd7abab0..0b3002c87 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -11,6 +11,10 @@ vcpkg_download_distfile(ARCHIVE SHA512 1cc63bf73356f4e618c0d3572a216bdf5689f10deff56b4262f6d740b0bee5a4b3eac234f45fca3d4d2da77903a507b4fba725b76d2d2070f31b6dae9e7a2dab ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/detect-openssl.patch +) vcpkg_find_acquire_program(YASM) get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) @@ -18,6 +22,8 @@ set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") vcpkg_acquire_msys(MSYS_ROOT) set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) +set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}") +set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;$ENV{LIB}") set(_csc_PROJECT_PATH ffmpeg) @@ -25,8 +31,14 @@ file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg ${CURRENT_BU set(OPTIONS "--disable-ffmpeg --disable-ffprobe --disable-doc --enable-debug") set(OPTIONS "${OPTIONS} --enable-runtime-cpudetect") +if("openssl" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-openssl") +else() + set(OPTIONS "${OPTIONS} --disable-openssl") +endif() if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\") set(OPTIONS "${OPTIONS} --disable-programs --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") set(OPTIONS "${OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") @@ -54,6 +66,8 @@ endif() set(OPTIONS_DEBUG "") # Note: --disable-optimizations can't be used due to http://ffmpeg.org/pipermail/libav-user/2013-March/003945.html set(OPTIONS_RELEASE "") +set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(OPTIONS "${OPTIONS} --disable-static --enable-shared") if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -- cgit v1.2.3 From 32d588aa6903277a273a4d436c2929a412d11aa3 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 5 Nov 2017 01:11:48 +0300 Subject: [opencv] add support for MSVS 2017 update 5 (#2132) --- ports/opencv/CONTROL | 2 +- ports/opencv/msvs-fix-2017-u5.patch | 39 +++++++++++++++++++++++++++++++++++++ ports/opencv/portfile.cmake | 1 + 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 ports/opencv/msvs-fix-2017-u5.patch diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 47d8b2443..2654e5a25 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.1-6 +Version: 3.3.1-7 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library diff --git a/ports/opencv/msvs-fix-2017-u5.patch b/ports/opencv/msvs-fix-2017-u5.patch new file mode 100644 index 000000000..ab0d0d0ff --- /dev/null +++ b/ports/opencv/msvs-fix-2017-u5.patch @@ -0,0 +1,39 @@ +From 62737c777c9314ee2e4b4e595daa830ba12765e2 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Sat, 4 Nov 2017 23:52:37 +0300 +Subject: [PATCH] cmake: add support for MSVS 2017 update 5 + +--- + cmake/OpenCVDetectCXXCompiler.cmake | 2 +- + cmake/templates/OpenCVConfig.root-WIN32.cmake.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cmake/OpenCVDetectCXXCompiler.cmake b/cmake/OpenCVDetectCXXCompiler.cmake +index cfb613b..3874467 100644 +--- a/cmake/OpenCVDetectCXXCompiler.cmake ++++ b/cmake/OpenCVDetectCXXCompiler.cmake +@@ -114,7 +114,7 @@ if(MSVC) + set(OpenCV_RUNTIME vc12) + elseif(MSVC_VERSION EQUAL 1900) + set(OpenCV_RUNTIME vc14) +- elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911) ++ elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911 OR MSVC_VERSION EQUAL 1912) + set(OpenCV_RUNTIME vc15) + else() + message(WARNING "OpenCV does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set OpenCV_RUNTIME") +diff --git a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in +index 7dc6666..846c400 100644 +--- a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in ++++ b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in +@@ -78,7 +78,7 @@ if(MSVC) + set(OpenCV_RUNTIME vc12) + elseif(MSVC_VERSION EQUAL 1900) + set(OpenCV_RUNTIME vc14) +- elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911) ++ elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911 OR MSVC_VERSION EQUAL 1912) + set(OpenCV_RUNTIME vc15) + endif() + elseif(MINGW) +-- +2.14.1.windows.1 + diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index f201ea706..f514e189e 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -14,6 +14,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch" "${CMAKE_CURRENT_LIST_DIR}/002-fix-uwp.patch" "${CMAKE_CURRENT_LIST_DIR}/no-double-expand-enable-pylint.patch" + "${CMAKE_CURRENT_LIST_DIR}/msvs-fix-2017-u5.patch" ) file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libpng ${SOURCE_PATH}/3rdparty/zlib ${SOURCE_PATH}/3rdparty/libtiff) -- cgit v1.2.3 From 61c0a337842b50d4b914893030193f3a1faaedf4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 4 Nov 2017 16:40:11 -0700 Subject: Improve error messages around calling powershell scripts --- toolsrc/include/vcpkg/base/system.h | 4 +++- toolsrc/src/vcpkg/base/system.cpp | 28 ++++++++++++++++++++-- toolsrc/src/vcpkg/vcpkgpaths.cpp | 47 +++++++++++++++---------------------- 3 files changed, 48 insertions(+), 31 deletions(-) diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index a696bf3ae..9f2d91435 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -22,7 +22,9 @@ namespace vcpkg::System ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line); - ExitCodeAndOutput powershell_execute_and_capture_output(const fs::path& script_path, const CStringView args = ""); + std::string powershell_execute_and_capture_output(const std::string& title, + const fs::path& script_path, + const CStringView args = ""); enum class Color { diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index a1bc9daf6..47096ed63 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include @@ -269,7 +270,9 @@ namespace vcpkg::System #endif } - ExitCodeAndOutput powershell_execute_and_capture_output(const fs::path& script_path, const CStringView args) + std::string powershell_execute_and_capture_output(const std::string& title, + const fs::path& script_path, + const CStringView args) { // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned const std::string cmd = Strings::format( @@ -277,6 +280,27 @@ namespace vcpkg::System auto rc = System::cmd_execute_and_capture_output(cmd); + if (rc.exit_code) + { + System::println(Color::error, + "%s\n" + "Could not run:\n" + " '%s'\n" + "Error message was:\n" + " %s", + title, + script_path.generic_string(), + rc.output); + + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_property("error", "powershell script failed"); + locked_metrics->track_property("title", title); + } + + Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); + } + // Remove newline from all output. // Powershell returns newlines when it hits the column count of the console. // For example, this is 80 in cmd on Windows 7. If the expected output is longer than 80 lines, we get @@ -285,7 +309,7 @@ namespace vcpkg::System // and then strip all newlines here. rc.output = Strings::replace_all(std::move(rc.output), "\n", ""); - return rc; + return rc.output; } void println() { putchar('\n'); } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index c17b029c0..a553f4199 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -91,26 +91,13 @@ namespace vcpkg tool_name, version_as_string); const fs::path script = scripts_folder / "fetchDependency.ps1"; - const System::ExitCodeAndOutput rc = - System::powershell_execute_and_capture_output(script, Strings::format("-Dependency %s", tool_name)); - if (rc.exit_code) - { - System::println(System::Color::error, - "Launching powershell failed or was denied when trying to fetch %s version %s.\n" - "(No sufficient installed version was found)", - tool_name, - version_as_string); - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_property("error", "powershell install failed"); - locked_metrics->track_property("dependency", tool_name); - } - Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); - } + const std::string title = "Fetching %s version %s (No sufficient installed version was found)"; + const std::string output = + System::powershell_execute_and_capture_output(title, script, Strings::format("-Dependency %s", tool_name)); - const std::vector dependency_path = keep_data_lines(rc.output); + const std::vector dependency_path = keep_data_lines(output); Checks::check_exit( - VCPKG_LINE_INFO, dependency_path.size() == 1, "Expected dependency path, but got %s", rc.output); + VCPKG_LINE_INFO, dependency_path.size() == 1, "Expected dependency path, but got %s", output); const fs::path actual_downloaded_path = Strings::trim(std::string{dependency_path.at(0)}); std::error_code ec; @@ -344,17 +331,21 @@ namespace vcpkg static std::vector get_visual_studio_instances(const VcpkgPaths& paths) { const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; - const System::ExitCodeAndOutput ec_data = System::powershell_execute_and_capture_output(script); - Checks::check_exit( - VCPKG_LINE_INFO, ec_data.exit_code == 0, "Could not run script to detect Visual Studio instances"); + const std::string output = + System::powershell_execute_and_capture_output("Detecting Visual Studio instances", script); - const std::vector instances_as_strings = keep_data_lines(ec_data.output); + const std::vector instances_as_strings = keep_data_lines(output); Checks::check_exit(VCPKG_LINE_INFO, !instances_as_strings.empty(), - "Could not detect any Visual Studio instances. Powershell returned: %s\n", - ec_data.output); - - std::vector output; + "Could not detect any Visual Studio instances.\n" + "Powershell script:\n" + " %s\n" + "returned:\n" + "%s", + script.generic_string(), + output); + + std::vector instances; for (const std::string& instance_as_string : instances_as_strings) { const std::vector split = Strings::split(instance_as_string, "::"); @@ -364,10 +355,10 @@ namespace vcpkg "Expected: PreferenceWeight::ReleaseType::Version::PathToVisualStudio\n" "Actual : %s\n", instance_as_string); - output.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); + instances.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); } - return output; + return instances; } static std::vector find_toolset_instances(const VcpkgPaths& paths) -- cgit v1.2.3 From 9e71c1810cd6f6a56848c794d51fc4c1960e4634 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 4 Nov 2017 15:52:07 -0700 Subject: [alac] init --- ports/alac/CMakeLists.txt | 65 +++++++++++++++++++++++++++++++++++++++++++++++ ports/alac/CONTROL | 3 +++ ports/alac/portfile.cmake | 21 +++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 ports/alac/CMakeLists.txt create mode 100644 ports/alac/CONTROL create mode 100644 ports/alac/portfile.cmake diff --git a/ports/alac/CMakeLists.txt b/ports/alac/CMakeLists.txt new file mode 100644 index 000000000..843189546 --- /dev/null +++ b/ports/alac/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required (VERSION 3.9) +project (alac) + +set(HEADERS + codec/EndianPortable.h + codec/aglib.h + codec/ALACAudioTypes.h + codec/ALACBitUtilities.h + codec/ALACDecoder.h + codec/ALACEncoder.h + codec/dplib.h + codec/matrixlib.h +) + + +set (SRCS + codec/EndianPortable.c + codec/ALACBitUtilities.c + codec/ALACDecoder.cpp + codec/ALACEncoder.cpp + codec/ag_dec.c + codec/ag_enc.c + codec/dp_dec.c + codec/dp_enc.c + codec/matrix_dec.c + codec/matrix_enc.c +) + +set(EXE_SRCS + convert-utility/main.cpp + convert-utility/CAFFileALAC.cpp +) + +if(MSVC) + add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DTARGET_OS_WIN32) +endif() + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +include_directories(. codec convert-utility) + +add_library(libalac ${SRCS}) + +add_executable(alacconvert ${EXE_SRCS}) +target_link_libraries(alacconvert libalac) + +install( + TARGETS libalac + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS alacconvert + RUNTIME DESTINATION tools/alac + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${HEADERS} DESTINATION include/alac) +endif() diff --git a/ports/alac/CONTROL b/ports/alac/CONTROL new file mode 100644 index 000000000..f50b135e9 --- /dev/null +++ b/ports/alac/CONTROL @@ -0,0 +1,3 @@ +Source: alac +Version: 2017-11-03-c38887c5 +Description: The Apple Lossless Audio Codec (ALAC) is a lossless audio codec developed by Apple and deployed on all of its platforms and devices. diff --git a/ports/alac/portfile.cmake b/ports/alac/portfile.cmake new file mode 100644 index 000000000..c04e3a7d1 --- /dev/null +++ b/ports/alac/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO macosforge/alac + REF c38887c5c5e64a4b31108733bd79ca9b2496d987 + SHA512 8da18df25807e76f9187f7bf30585aace303d55444f0a614ab00d98d11caca3fdc5c6f5b9fd11e5f4c92a2ab1e86fef73deeeada57e9d49951fea8b80ba383cc + HEAD_REF master +) + +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 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/alac) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/alac RENAME copyright) -- cgit v1.2.3 From 330b8d8bab6a3d07165bf7c05fea09a8e0d56348 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 4 Nov 2017 20:48:06 -0700 Subject: [vcpkg-msbuild-integration] Output warning when configuration is not determinable. Add special cases for RelWithDebInfo and MinSizeRel. --- scripts/buildsystems/msbuild/vcpkg.targets | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 1cb338237..ad1dde89b 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -36,15 +36,17 @@ $(Configuration) + Debug + Release $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), .vcpkg-root))\installed\$(VcpkgTriplet)\ - %(AdditionalDependencies);$(VcpkgRoot)debug\lib\*.lib - %(AdditionalDependencies);$(VcpkgRoot)lib\*.lib - %(AdditionalLibraryDirectories);$(VcpkgRoot)lib;$(VcpkgRoot)lib\manual-link - %(AdditionalLibraryDirectories);$(VcpkgRoot)debug\lib;$(VcpkgRoot)debug\lib\manual-link + %(AdditionalDependencies);$(VcpkgRoot)debug\lib\*.lib + %(AdditionalDependencies);$(VcpkgRoot)lib\*.lib + %(AdditionalLibraryDirectories);$(VcpkgRoot)lib;$(VcpkgRoot)lib\manual-link + %(AdditionalLibraryDirectories);$(VcpkgRoot)debug\lib;$(VcpkgRoot)debug\lib\manual-link %(AdditionalIncludeDirectories);$(VcpkgRoot)include @@ -57,6 +59,7 @@ + -- cgit v1.2.3 From 7ca9449744349f6ac128dfd200fdcdfdefd99c58 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 4 Nov 2017 14:09:19 -0700 Subject: [freetype-gl] Add version & description. Note that the build is always static. --- ports/freetype-gl/CONTROL | 4 ++-- ports/freetype-gl/portfile.cmake | 46 +++++++++++++++++++++------------------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/ports/freetype-gl/CONTROL b/ports/freetype-gl/CONTROL index e8b324f20..f88d6f185 100644 --- a/ports/freetype-gl/CONTROL +++ b/ports/freetype-gl/CONTROL @@ -1,4 +1,4 @@ Source: freetype-gl -Version: -Description: +Version: 2017-10-9-82fb152a74f01b1483ac80d15935fbdfaf3ed836 +Description: OpenGL text using one vertex buffer, one texture and FreeType Build-Depends: glew, freetype diff --git a/ports/freetype-gl/portfile.cmake b/ports/freetype-gl/portfile.cmake index 2cf27c447..8771c15fc 100644 --- a/ports/freetype-gl/portfile.cmake +++ b/ports/freetype-gl/portfile.cmake @@ -1,17 +1,9 @@ -# 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) -# +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freetype-gl) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -34,28 +26,38 @@ file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindGLEW.cmake) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - #PREFER_NINJA - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA OPTIONS -Dfreetype-gl_BUILD_APIDOC=OFF -Dfreetype-gl_BUILD_DEMOS=OFF -Dfreetype-gl_BUILD_TESTS=OFF + -Dfreetype-gl_BUILD_MAKEFONT=OFF ) # We may soon install using a modified cmake process with install target -#vcpkg_install_cmake() + +# Although FreeType-GL uses CMake as its build system, the implementation +# (*.cmake,CMakeLists.txt) doesn't provide for any type of installation. +# Presumably, it has been used as-is, in-tree, without ever needing to install +# itself within a larger system. vcpkg_build_cmake(LOGFILE_ROOT install) file(GLOB HEADER_FILES "${SOURCE_PATH}/*.h") file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/freetype-gl) -# DLL & LIB -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/freetype-gl.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/freetype-gl.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -#file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/makefont.exe DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -#file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/makefont.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +# LIB +file(GLOB LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" +) +file(GLOB DEBUG_LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" +) +file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) vcpkg_copy_pdbs() -- cgit v1.2.3 From 9ed2fc546cd9896340706f25c04aab93ddf45e45 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Sun, 5 Nov 2017 18:00:01 +1100 Subject: qt5 - serial, svg, charts, and 3d modules --- ports/qt53d/CONTROL | 4 ++ ports/qt53d/fixcmake.py | 57 +++++++++++++++++++++++++++ ports/qt53d/portfile.cmake | 88 ++++++++++++++++++++++++++++++++++++++++++ ports/qt5charts/CONTROL | 4 ++ ports/qt5charts/fixcmake.py | 57 +++++++++++++++++++++++++++ ports/qt5charts/portfile.cmake | 79 +++++++++++++++++++++++++++++++++++++ ports/qt5serial/CONTROL | 4 ++ ports/qt5serial/fixcmake.py | 57 +++++++++++++++++++++++++++ ports/qt5serial/portfile.cmake | 79 +++++++++++++++++++++++++++++++++++++ ports/qt5svg/CONTROL | 4 ++ ports/qt5svg/fixcmake.py | 57 +++++++++++++++++++++++++++ ports/qt5svg/portfile.cmake | 81 ++++++++++++++++++++++++++++++++++++++ 12 files changed, 571 insertions(+) create mode 100644 ports/qt53d/CONTROL create mode 100644 ports/qt53d/fixcmake.py create mode 100644 ports/qt53d/portfile.cmake create mode 100644 ports/qt5charts/CONTROL create mode 100644 ports/qt5charts/fixcmake.py create mode 100644 ports/qt5charts/portfile.cmake create mode 100644 ports/qt5serial/CONTROL create mode 100644 ports/qt5serial/fixcmake.py create mode 100644 ports/qt5serial/portfile.cmake create mode 100644 ports/qt5svg/CONTROL create mode 100644 ports/qt5svg/fixcmake.py create mode 100644 ports/qt5svg/portfile.cmake diff --git a/ports/qt53d/CONTROL b/ports/qt53d/CONTROL new file mode 100644 index 000000000..d8130de6e --- /dev/null +++ b/ports/qt53d/CONTROL @@ -0,0 +1,4 @@ +Source: qt53d +Version: 5.9.2-0 +Description: Qt5 3d Module - Functionality for near-realtime simulation systems with support for 2D and 3D rendering +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt53d/fixcmake.py b/ports/qt53d/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt53d/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt53d/portfile.cmake b/ports/qt53d/portfile.cmake new file mode 100644 index 000000000..cb0ac87ef --- /dev/null +++ b/ports/qt53d/portfile.cmake @@ -0,0 +1,88 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qt3d-5.9.2") +set(ARCHIVE_NAME "qt3d-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 1c7dbd4e557cdd183ec6e929aae5727ce2ffcb519517942b588594bb81a78cb3d732cde4dae58085a70ec2968a8c2443eae96536125c25938222ff7c89f4f9a2 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) +file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt53d RENAME copyright) \ No newline at end of file diff --git a/ports/qt5charts/CONTROL b/ports/qt5charts/CONTROL new file mode 100644 index 000000000..d1a2eb844 --- /dev/null +++ b/ports/qt5charts/CONTROL @@ -0,0 +1,4 @@ +Source: qt5charts +Version: 5.9.2-0 +Description: Qt5 Charts Module - UI components for displaying charts, driven by static or dynamic data models +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5charts/fixcmake.py b/ports/qt5charts/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5charts/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5charts/portfile.cmake b/ports/qt5charts/portfile.cmake new file mode 100644 index 000000000..2ff08e715 --- /dev/null +++ b/ports/qt5charts/portfile.cmake @@ -0,0 +1,79 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtcharts-5.9.2") +set(ARCHIVE_NAME "qtcharts-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 297547b565dd71b05237bb05ecc1abf1a774a4909668417e78bd65e805c1e47a456a5a06898fe06d4c4614118e4129e19893d4c77598667a9354ab969307a293 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.GPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5charts RENAME copyright) \ No newline at end of file diff --git a/ports/qt5serial/CONTROL b/ports/qt5serial/CONTROL new file mode 100644 index 000000000..386fc8e6c --- /dev/null +++ b/ports/qt5serial/CONTROL @@ -0,0 +1,4 @@ +Source: qt5serial +Version: 5.9.2-0 +Description: Qt5 Serial Port - provides access to hardware and virtual serial ports +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5serial/fixcmake.py b/ports/qt5serial/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5serial/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5serial/portfile.cmake b/ports/qt5serial/portfile.cmake new file mode 100644 index 000000000..732675337 --- /dev/null +++ b/ports/qt5serial/portfile.cmake @@ -0,0 +1,79 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtserial-5.9.2") +set(ARCHIVE_NAME "qtserialport-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 cc8899c1ae2ed9fd8cf1c213ab7efaec12b3b16836006fdbf74cb7ea457705505a13e82c2f2873ee9426ae66473ec42259f4e728de64576ee44420f116cc433d +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5serial RENAME copyright) \ No newline at end of file diff --git a/ports/qt5svg/CONTROL b/ports/qt5svg/CONTROL new file mode 100644 index 000000000..f56df4b51 --- /dev/null +++ b/ports/qt5svg/CONTROL @@ -0,0 +1,4 @@ +Source: qt5svg +Version: 5.9.2-0 +Description: Qt5 SVG Module - provides classes for displaying the contents of SVG files +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5svg/fixcmake.py b/ports/qt5svg/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5svg/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5svg/portfile.cmake b/ports/qt5svg/portfile.cmake new file mode 100644 index 000000000..e06c6ef85 --- /dev/null +++ b/ports/qt5svg/portfile.cmake @@ -0,0 +1,81 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 27) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtsvg-5.9.2") +set(ARCHIVE_NAME "qtsvg-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 c21c5a12fa10ff9f91deda88c99c995ee2138bdffa21c793b0c42f25155f01f87ede5206624b9d82713649f8cf1cfdb95f1d5b7e792de62f3848d3a9ec665fdd +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5svg RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From 938a8fe401ebf88de37e6149a4e9818a8f130a7e Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Sun, 5 Nov 2017 19:44:44 +1100 Subject: fix path lengths limit for qt source, add qt5 modules: datavis3d, imageformats, multimedia, xmlpatterns --- ports/cairomm/cmake/FindSigC++.cmake | 2 +- ports/qt53d/portfile.cmake | 2 +- ports/qt5base/portfile.cmake | 2 +- ports/qt5charts/portfile.cmake | 2 +- ports/qt5datavisualization3d/CONTROL | 4 ++ ports/qt5datavisualization3d/fixcmake.py | 57 +++++++++++++++++++ ports/qt5datavisualization3d/portfile.cmake | 79 ++++++++++++++++++++++++++ ports/qt5declarative/portfile.cmake | 2 +- ports/qt5imageformats/CONTROL | 4 ++ ports/qt5imageformats/fixcmake.py | 57 +++++++++++++++++++ ports/qt5imageformats/portfile.cmake | 73 ++++++++++++++++++++++++ ports/qt5multimedia/CONTROL | 4 ++ ports/qt5multimedia/fixcmake.py | 57 +++++++++++++++++++ ports/qt5multimedia/portfile.cmake | 81 +++++++++++++++++++++++++++ ports/qt5serial/portfile.cmake | 2 +- ports/qt5speech/portfile.cmake | 2 +- ports/qt5svg/portfile.cmake | 2 +- ports/qt5tools/portfile.cmake | 2 +- ports/qt5winextras/portfile.cmake | 2 +- ports/qt5xmlpatterns/CONTROL | 4 ++ ports/qt5xmlpatterns/fixcmake.py | 57 +++++++++++++++++++ ports/qt5xmlpatterns/portfile.cmake | 86 +++++++++++++++++++++++++++++ 22 files changed, 573 insertions(+), 10 deletions(-) create mode 100644 ports/qt5datavisualization3d/CONTROL create mode 100644 ports/qt5datavisualization3d/fixcmake.py create mode 100644 ports/qt5datavisualization3d/portfile.cmake create mode 100644 ports/qt5imageformats/CONTROL create mode 100644 ports/qt5imageformats/fixcmake.py create mode 100644 ports/qt5imageformats/portfile.cmake create mode 100644 ports/qt5multimedia/CONTROL create mode 100644 ports/qt5multimedia/fixcmake.py create mode 100644 ports/qt5multimedia/portfile.cmake create mode 100644 ports/qt5xmlpatterns/CONTROL create mode 100644 ports/qt5xmlpatterns/fixcmake.py create mode 100644 ports/qt5xmlpatterns/portfile.cmake diff --git a/ports/cairomm/cmake/FindSigC++.cmake b/ports/cairomm/cmake/FindSigC++.cmake index ed16ef93f..8d65f70d9 100644 --- a/ports/cairomm/cmake/FindSigC++.cmake +++ b/ports/cairomm/cmake/FindSigC++.cmake @@ -108,4 +108,4 @@ find_package_handle_standard_args(SIGC++ FAIL_MESSAGE "Could NOT find SIGC++, try to set the path to SIGC++ root folder in the system variable SIGC++" ) -MARK_AS_ADVANCED(SIGC++_CONFIG_INCLUDE_DIR SIGC++_INCLUDE_DIR SIGC++_INCLUDE_DIRS SIGC++_LIBRARY SIGC++_LIBRARIES) \ No newline at end of file +MARK_AS_ADVANCED(SIGC++_CONFIG_INCLUDE_DIR SIGC++_INCLUDE_DIR SIGC++_INCLUDE_DIRS SIGC++_LIBRARY SIGC++_LIBRARIES) diff --git a/ports/qt53d/portfile.cmake b/ports/qt53d/portfile.cmake index cb0ac87ef..d31904043 100644 --- a/ports/qt53d/portfile.cmake +++ b/ports/qt53d/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) +if(BUILDTREES_PATH_LENGTH GREATER 37) message(WARNING "Qt5'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." ) diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake index 623ff29c2..3c18a13f6 100644 --- a/ports/qt5base/portfile.cmake +++ b/ports/qt5base/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) +if(BUILDTREES_PATH_LENGTH GREATER 37) message(WARNING "Qt5'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." ) diff --git a/ports/qt5charts/portfile.cmake b/ports/qt5charts/portfile.cmake index 2ff08e715..e9b0d9dda 100644 --- a/ports/qt5charts/portfile.cmake +++ b/ports/qt5charts/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) +if(BUILDTREES_PATH_LENGTH GREATER 37) message(WARNING "Qt5'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." ) diff --git a/ports/qt5datavisualization3d/CONTROL b/ports/qt5datavisualization3d/CONTROL new file mode 100644 index 000000000..f48b02579 --- /dev/null +++ b/ports/qt5datavisualization3d/CONTROL @@ -0,0 +1,4 @@ +Source: qt5datavisualization3d +Version: 5.9.2-0 +Description: Qt5 Data Visualization 3d Module - UI Components for creating 3D data visualizations +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5datavisualization3d/fixcmake.py b/ports/qt5datavisualization3d/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5datavisualization3d/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5datavisualization3d/portfile.cmake b/ports/qt5datavisualization3d/portfile.cmake new file mode 100644 index 000000000..85bd0e21b --- /dev/null +++ b/ports/qt5datavisualization3d/portfile.cmake @@ -0,0 +1,79 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtdatavis3d-5.9.2") +set(ARCHIVE_NAME "qtdatavis3d-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 5f173401ba2f0ebb4bbb1ff65053f1ece44a97a8bf1d9fc8d81540709c588e140c533d5f317d6a9109d538e38aa742d42bf00906f63d433811bc1c8526788dc3 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.GPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5datavisualization3d RENAME copyright) \ No newline at end of file diff --git a/ports/qt5declarative/portfile.cmake b/ports/qt5declarative/portfile.cmake index 614eecd37..70c502dfa 100644 --- a/ports/qt5declarative/portfile.cmake +++ b/ports/qt5declarative/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) +if(BUILDTREES_PATH_LENGTH GREATER 37) message(WARNING "Qt5'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." ) diff --git a/ports/qt5imageformats/CONTROL b/ports/qt5imageformats/CONTROL new file mode 100644 index 000000000..bcafa4558 --- /dev/null +++ b/ports/qt5imageformats/CONTROL @@ -0,0 +1,4 @@ +Source: qt5imageformats +Version: 5.9.2-0 +Description: Qt5 Image Formats Module - Plugins for additional image formats: TIFF, MNG, TGA, WBMP +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5imageformats/fixcmake.py b/ports/qt5imageformats/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5imageformats/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5imageformats/portfile.cmake b/ports/qt5imageformats/portfile.cmake new file mode 100644 index 000000000..0dfe68b8d --- /dev/null +++ b/ports/qt5imageformats/portfile.cmake @@ -0,0 +1,73 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtimageformats-5.9.2") +set(ARCHIVE_NAME "qtimageformats-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 5f1b93c0e5fffa4c2c063d14c12ad97114a452b16814ca9ac45f00ec36308a09770b3b4d137cb5d19bd3aa3a6f576724084df5d0dad75236d49868af9243c9d2 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(INSTALL ${RELEASE_DIR}/lib/cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share) + +#Create an empty include file so that vcpkg doesn't complain +file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty "") + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5imageformats RENAME copyright) \ No newline at end of file diff --git a/ports/qt5multimedia/CONTROL b/ports/qt5multimedia/CONTROL new file mode 100644 index 000000000..3a4d01030 --- /dev/null +++ b/ports/qt5multimedia/CONTROL @@ -0,0 +1,4 @@ +Source: qt5multimedia +Version: 5.9.2-0 +Description: Qt5 Multimedia Module - Classes and widgets for audio, video, radio and camera functionality +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5multimedia/fixcmake.py b/ports/qt5multimedia/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5multimedia/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5multimedia/portfile.cmake b/ports/qt5multimedia/portfile.cmake new file mode 100644 index 000000000..d326bb783 --- /dev/null +++ b/ports/qt5multimedia/portfile.cmake @@ -0,0 +1,81 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtmultimedia-5.9.2") +set(ARCHIVE_NAME "qtmultimedia-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 b9fab874706440e97185475bfd0ad769c23d5ddbff5086cc0da9783777e81ed8140fb06fa0e7536ebfb67f2c9db39e1b9f3c2241834e74a9e1fb6ffd5cb7af11 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5multimedia RENAME copyright) \ No newline at end of file diff --git a/ports/qt5serial/portfile.cmake b/ports/qt5serial/portfile.cmake index 732675337..edcd4b20a 100644 --- a/ports/qt5serial/portfile.cmake +++ b/ports/qt5serial/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) +if(BUILDTREES_PATH_LENGTH GREATER 37) message(WARNING "Qt5'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." ) diff --git a/ports/qt5speech/portfile.cmake b/ports/qt5speech/portfile.cmake index fab35389e..39b52ff58 100644 --- a/ports/qt5speech/portfile.cmake +++ b/ports/qt5speech/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) +if(BUILDTREES_PATH_LENGTH GREATER 37) message(WARNING "Qt5'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." ) diff --git a/ports/qt5svg/portfile.cmake b/ports/qt5svg/portfile.cmake index e06c6ef85..13ea3d1e7 100644 --- a/ports/qt5svg/portfile.cmake +++ b/ports/qt5svg/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) +if(BUILDTREES_PATH_LENGTH GREATER 37) message(WARNING "Qt5'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." ) diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake index 84c00d0c8..b0bf93f29 100644 --- a/ports/qt5tools/portfile.cmake +++ b/ports/qt5tools/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) +if(BUILDTREES_PATH_LENGTH GREATER 37) message(WARNING "Qt5'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." ) diff --git a/ports/qt5winextras/portfile.cmake b/ports/qt5winextras/portfile.cmake index 5d7b85909..b5842494a 100644 --- a/ports/qt5winextras/portfile.cmake +++ b/ports/qt5winextras/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 27) +if(BUILDTREES_PATH_LENGTH GREATER 37) message(WARNING "Qt5'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." ) diff --git a/ports/qt5xmlpatterns/CONTROL b/ports/qt5xmlpatterns/CONTROL new file mode 100644 index 000000000..baef1b3fd --- /dev/null +++ b/ports/qt5xmlpatterns/CONTROL @@ -0,0 +1,4 @@ +Source: qt5xmlpatterns +Version: 5.9.2-0 +Description: Qt5 XML Patterns Module - Support for XPath, XQuery, XSLT and XML schema validation +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5xmlpatterns/fixcmake.py b/ports/qt5xmlpatterns/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5xmlpatterns/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5xmlpatterns/portfile.cmake b/ports/qt5xmlpatterns/portfile.cmake new file mode 100644 index 000000000..0bf42b19d --- /dev/null +++ b/ports/qt5xmlpatterns/portfile.cmake @@ -0,0 +1,86 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtxmlpatterns-5.9.2") +set(ARCHIVE_NAME "qtxmlpatterns-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 c14dbd97988473ba73b4e21352c5560278aa4dbfdf2be1d12e9119c0b5dbe8a0e4eff9a682052024a01bb21dcf52d40ba00da98947901fb91518af92a225da83 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) +file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5xmlpatterns RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From 054a013bf3417fcf1c48cc9ee811cae0c8c00e53 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 5 Nov 2017 12:12:32 +0300 Subject: [libpng] update to 1.6.34 https://sourceforge.net/projects/libpng/files/libpng16/older-releases/1.6.33/ https://sourceforge.net/projects/libpng/files/libpng16/1.6.34/ --- ports/libpng/CONTROL | 2 +- ports/libpng/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index 7899cbc8e..b5f59e6cf 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.32-1 +Version: 1.6.34-1 Build-Depends: zlib 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 e012bb6dc..e58df4e99 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(LIBPNG_VERSION 1.6.32) +set(LIBPNG_VERSION 1.6.34) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-${LIBPNG_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://downloads.sourceforge.net/project/libpng/libpng16/${LIBPNG_VERSION}/libpng-${LIBPNG_VERSION}.tar.xz" FILENAME "libpng-${LIBPNG_VERSION}.tar.xz" - SHA512 24cf4d38dc08d1db7721fc580d8bf6cee9a105afcea32f1245b7bb3727c8a8645ad733a24534782ef5dfb0d4315a5fd6b0eee9e7f0704e0c635350f80c19a708 + SHA512 89407c5abc1623faaa3992fc1e4a62def671d9a7401108dfceee895d5f16fe7030090bea89b34a36d377d8e6a5d40046886991f663ce075d1a2d31bf9eaf3c51 ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( -- cgit v1.2.3 From 6b83925dd6b88233410f1511993350bab6ef984a Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Sun, 5 Nov 2017 20:13:12 +1100 Subject: qt5 modules: gamepad, scxml, virtual keyboard, websockets --- ports/qt5gamepad/CONTROL | 4 ++ ports/qt5gamepad/fixcmake.py | 57 ++++++++++++++++++++++ ports/qt5gamepad/portfile.cmake | 81 +++++++++++++++++++++++++++++++ ports/qt5imageformats/portfile.cmake | 2 +- ports/qt5scxml/CONTROL | 4 ++ ports/qt5scxml/fixcmake.py | 57 ++++++++++++++++++++++ ports/qt5scxml/portfile.cmake | 86 +++++++++++++++++++++++++++++++++ ports/qt5virtualkeyboard/CONTROL | 4 ++ ports/qt5virtualkeyboard/fixcmake.py | 57 ++++++++++++++++++++++ ports/qt5virtualkeyboard/portfile.cmake | 73 ++++++++++++++++++++++++++++ ports/qt5websockets/CONTROL | 4 ++ ports/qt5websockets/fixcmake.py | 57 ++++++++++++++++++++++ ports/qt5websockets/portfile.cmake | 79 ++++++++++++++++++++++++++++++ 13 files changed, 564 insertions(+), 1 deletion(-) create mode 100644 ports/qt5gamepad/CONTROL create mode 100644 ports/qt5gamepad/fixcmake.py create mode 100644 ports/qt5gamepad/portfile.cmake create mode 100644 ports/qt5scxml/CONTROL create mode 100644 ports/qt5scxml/fixcmake.py create mode 100644 ports/qt5scxml/portfile.cmake create mode 100644 ports/qt5virtualkeyboard/CONTROL create mode 100644 ports/qt5virtualkeyboard/fixcmake.py create mode 100644 ports/qt5virtualkeyboard/portfile.cmake create mode 100644 ports/qt5websockets/CONTROL create mode 100644 ports/qt5websockets/fixcmake.py create mode 100644 ports/qt5websockets/portfile.cmake diff --git a/ports/qt5gamepad/CONTROL b/ports/qt5gamepad/CONTROL new file mode 100644 index 000000000..051deb634 --- /dev/null +++ b/ports/qt5gamepad/CONTROL @@ -0,0 +1,4 @@ +Source: qt5gamepad +Version: 5.9.2-0 +Description: Qt5 Gamepad Module - Enables Qt applications to support the use of gamepad hardware +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5gamepad/fixcmake.py b/ports/qt5gamepad/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5gamepad/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5gamepad/portfile.cmake b/ports/qt5gamepad/portfile.cmake new file mode 100644 index 000000000..3492e78de --- /dev/null +++ b/ports/qt5gamepad/portfile.cmake @@ -0,0 +1,81 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtgamepad-5.9.2") +set(ARCHIVE_NAME "qtgamepad-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 398d6ff0268460358584a4ea8ba0588881970dcc1dff6c5aa91d1630065ba112c86d7a1fe96dceb8ff301b350aef7f74ad1ee6212048a4cdfb26ff5d944d6222 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5gamepad RENAME copyright) \ No newline at end of file diff --git a/ports/qt5imageformats/portfile.cmake b/ports/qt5imageformats/portfile.cmake index 0dfe68b8d..059f8ae6a 100644 --- a/ports/qt5imageformats/portfile.cmake +++ b/ports/qt5imageformats/portfile.cmake @@ -68,6 +68,6 @@ file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt file(INSTALL ${RELEASE_DIR}/lib/cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share) #Create an empty include file so that vcpkg doesn't complain -file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty "") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_qt5imageformats "") file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5imageformats RENAME copyright) \ No newline at end of file diff --git a/ports/qt5scxml/CONTROL b/ports/qt5scxml/CONTROL new file mode 100644 index 000000000..974bce77c --- /dev/null +++ b/ports/qt5scxml/CONTROL @@ -0,0 +1,4 @@ +Source: qt5scxml +Version: 5.9.2-0 +Description: Qt5 SCXML Module - Provides classes and tools for creating state machines from SCXML files and embedding them in applications +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5scxml/fixcmake.py b/ports/qt5scxml/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5scxml/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5scxml/portfile.cmake b/ports/qt5scxml/portfile.cmake new file mode 100644 index 000000000..db2f385af --- /dev/null +++ b/ports/qt5scxml/portfile.cmake @@ -0,0 +1,86 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtscxml-5.9.2") +set(ARCHIVE_NAME "qtscxml-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 c33db992ab456e5dd8b9be65c5619c503048106bbb1839b0930f2d4df36eed0780dfa1fc2912d7758aa72195269e59cbe8826cbaa414c2f339ca66c565809c88 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) +file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5scxml RENAME copyright) \ No newline at end of file diff --git a/ports/qt5virtualkeyboard/CONTROL b/ports/qt5virtualkeyboard/CONTROL new file mode 100644 index 000000000..7f5649f31 --- /dev/null +++ b/ports/qt5virtualkeyboard/CONTROL @@ -0,0 +1,4 @@ +Source: qt5virtualkeyboard +Version: 5.9.2-0 +Description: Qt5 Virtual Keyboard Module - A framework for implementing different input methods. Supports localized keyboard layouts and custom visual themes +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5virtualkeyboard/fixcmake.py b/ports/qt5virtualkeyboard/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5virtualkeyboard/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5virtualkeyboard/portfile.cmake b/ports/qt5virtualkeyboard/portfile.cmake new file mode 100644 index 000000000..6a4c921cb --- /dev/null +++ b/ports/qt5virtualkeyboard/portfile.cmake @@ -0,0 +1,73 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtvirtualkeyboard-5.9.2") +set(ARCHIVE_NAME "qtvirtualkeyboard-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 f8c39b789e877e60389ee9aab4a5c17e6018093f72fc57f526ce2584183135206306d4d5a7c7551a6de45969aa6f55444bb39f4ea3324cdf10611533f0bc2b22 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(INSTALL ${RELEASE_DIR}/lib/cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share) + +#Create an empty include file so that vcpkg doesn't complain +file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_qt5virtualkeyboard "") + +file(INSTALL ${SOURCE_PATH}/LICENSE.GPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5virtualkeyboard RENAME copyright) \ No newline at end of file diff --git a/ports/qt5websockets/CONTROL b/ports/qt5websockets/CONTROL new file mode 100644 index 000000000..51497f6ec --- /dev/null +++ b/ports/qt5websockets/CONTROL @@ -0,0 +1,4 @@ +Source: qt5websockets +Version: 5.9.2-0 +Description: Qt5 Web Sockets Module - provides WebSocket communication compliant with RFC 6455 +Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5websockets/fixcmake.py b/ports/qt5websockets/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5websockets/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5websockets/portfile.cmake b/ports/qt5websockets/portfile.cmake new file mode 100644 index 000000000..333483a74 --- /dev/null +++ b/ports/qt5websockets/portfile.cmake @@ -0,0 +1,79 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +set(SRCDIR_NAME "qtwebsockets-5.9.2") +set(ARCHIVE_NAME "qtwebsockets-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 9330d6806251bc77d4c2a497a31b1b0e42a1e6bfe3ea7c00cee123052e9e1f9080e33cf4dfcd6ee6e4732c62f41257a77ec25ad607528f4e8ebe61ccaee3e159 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_debug() + +vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} +) + +vcpkg_build_qmake_release() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake +) + +set(ENV{PATH} "${_path}") + +file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) + +file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5websockets RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From f96080db34eebf6767260190c8eaa78407188c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sun, 5 Nov 2017 11:05:14 +0100 Subject: Update Catch to 2.0.1 --- ports/catch/CONTROL | 2 +- ports/catch/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/catch/CONTROL b/ports/catch/CONTROL index 1229bc936..bab18cb67 100644 --- a/ports/catch/CONTROL +++ b/ports/catch/CONTROL @@ -1,3 +1,3 @@ Source: catch -Version: 1.11.0 +Version: 2.0.1 Description: C++ Automated Test Cases in Headers diff --git a/ports/catch/portfile.cmake b/ports/catch/portfile.cmake index b31ac6d5a..c6b96e995 100644 --- a/ports/catch/portfile.cmake +++ b/ports/catch/portfile.cmake @@ -1,17 +1,17 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v1.11.0) +set(CATCH_VERSION v2.0.1) vcpkg_download_distfile(HEADER URLS "https://github.com/philsquared/Catch/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-${CATCH_VERSION}.hpp" - SHA512 8ce490cfa433ec1c6b6460d76e1d9a6502966ada96fec7290fe9827a965751f3d572e97b93bbbb5e2bc97ffcf70bb547a050405b80a1a816054bd6afd1208cbe + SHA512 421a913e9c1671ef32833ec82c1889de69f74b80241708702873e54d804b1f7a3814ff01a34b945242e92d8a63cd668b0eb7f335b7fed352ef94679ad5295c0e ) vcpkg_download_distfile(LICENSE URLS "https://raw.githubusercontent.com/philsquared/Catch/${CATCH_VERSION}/LICENSE.txt" FILENAME "catch-LICENSE-${CATCH_VERSION}.txt" - SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 + SHA512 f1a8d21ccbb6436d289ecfae65b9019278e40552a2383aaf6c1dfed98affe6e7bbf364d67597a131642b62446a0c40495e66a7efca7e6dff72727c6fd3776407 ) file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME catch.hpp) -- cgit v1.2.3 From 6e7eb0b787b3a88ae6f5a9394560622fafc7c5ba Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 5 Nov 2017 13:59:25 +0300 Subject: [sfgui] add version 0.3.2 --- ports/sfgui/CONTROL | 4 ++++ ports/sfgui/portfile.cmake | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 ports/sfgui/CONTROL create mode 100644 ports/sfgui/portfile.cmake diff --git a/ports/sfgui/CONTROL b/ports/sfgui/CONTROL new file mode 100644 index 000000000..39962e0e5 --- /dev/null +++ b/ports/sfgui/CONTROL @@ -0,0 +1,4 @@ +Source: sfgui +Version: 0.3.2-1 +Description: simple and fast graphical user interface library +Build-Depends: sfml diff --git a/ports/sfgui/portfile.cmake b/ports/sfgui/portfile.cmake new file mode 100644 index 000000000..7764a60a1 --- /dev/null +++ b/ports/sfgui/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO TankOs/SFGUI + REF 0.3.2 + SHA512 cd97e421695f6189995c1b7a4180e3738bf785abae37d3eb51ac6d687a88a26a1f088863b37e065edaff6ba43eea379e423b31118324c4daa65dba0b3e904869 + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(SFGUI_BUILD_SHARED_LIBS ON) + set(SFML_STATIC_LIBRARIES OFF) +else() + set(SFGUI_BUILD_SHARED_LIBS OFF) + set(SFML_STATIC_LIBRARIES ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSFGUI_BUILD_DOC=OFF + -DSFGUI_BUILD_EXAMPLES=OFF + -DSFGUI_BUILD_SHARED_LIBS=${SFGUI_BUILD_SHARED_LIBS} + -DSFML_STATIC_LIBRARIES=${SFML_STATIC_LIBRARIES} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfgui RENAME copyright) + +file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/Modules/FindSFGUI.cmake ${CURRENT_PACKAGES_DIR}/share/sfgui/FindSFGUI.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake/Modules) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) + +file(GLOB_RECURSE SFGUI_DOC_RELEASE ${CURRENT_PACKAGES_DIR}/*.md) +file(GLOB_RECURSE SFGUI_DOC_DEBUG ${CURRENT_PACKAGES_DIR}/debug/*.md) +file(REMOVE ${SFGUI_DOC_RELEASE} ${SFGUI_DOC_DEBUG}) -- cgit v1.2.3 From 9bb4817e32a14647093876cabaf62bbd2be63fc6 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 6 Nov 2017 00:24:29 +1100 Subject: use install target in Makefiles; make all portfile uniform --- ports/qt53d/portfile.cmake | 145 ++++++++++++++++++++-------- ports/qt5charts/portfile.cmake | 130 ++++++++++++++++++++----- ports/qt5datavisualization3d/portfile.cmake | 130 ++++++++++++++++++++----- ports/qt5declarative/portfile.cmake | 141 ++++++++++++++++++++------- ports/qt5gamepad/portfile.cmake | 132 +++++++++++++++++++------ ports/qt5imageformats/portfile.cmake | 124 ++++++++++++++++++++---- ports/qt5multimedia/portfile.cmake | 132 +++++++++++++++++++------ ports/qt5scxml/portfile.cmake | 137 +++++++++++++++++++------- ports/qt5serial/portfile.cmake | 130 ++++++++++++++++++++----- ports/qt5speech/portfile.cmake | 132 +++++++++++++++++++------ ports/qt5svg/portfile.cmake | 132 +++++++++++++++++++------ ports/qt5tools/CONTROL | 4 +- ports/qt5tools/portfile.cmake | 140 ++++++++++++++++++++------- ports/qt5virtualkeyboard/portfile.cmake | 124 ++++++++++++++++++++---- ports/qt5websockets/portfile.cmake | 130 ++++++++++++++++++++----- ports/qt5winextras/portfile.cmake | 130 ++++++++++++++++++++----- ports/qt5xmlpatterns/portfile.cmake | 137 +++++++++++++++++++------- scripts/cmake/vcpkg_common_functions.cmake | 1 + scripts/cmake/vcpkg_replace_string.cmake | 14 +++ 19 files changed, 1689 insertions(+), 456 deletions(-) create mode 100644 scripts/cmake/vcpkg_replace_string.cmake diff --git a/ports/qt53d/portfile.cmake b/ports/qt53d/portfile.cmake index d31904043..dd9751650 100644 --- a/ports/qt53d/portfile.cmake +++ b/ports/qt53d/portfile.cmake @@ -31,58 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +#Build release vcpkg_build_qmake_release() -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) +#Reset the path to the baseline set(ENV{PATH} "${_path}") -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) - -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) - -file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) -file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) - -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) - -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt53d RENAME copyright) \ No newline at end of file +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() + +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() + +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() + +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5charts/portfile.cmake b/ports/qt5charts/portfile.cmake index e9b0d9dda..6e43f92b5 100644 --- a/ports/qt5charts/portfile.cmake +++ b/ports/qt5charts/portfile.cmake @@ -31,49 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +#Build release vcpkg_build_qmake_release() -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) +#Reset the path to the baseline set(ENV{PATH} "${_path}") -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) - -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.GPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5charts RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5datavisualization3d/portfile.cmake b/ports/qt5datavisualization3d/portfile.cmake index 85bd0e21b..8a067c524 100644 --- a/ports/qt5datavisualization3d/portfile.cmake +++ b/ports/qt5datavisualization3d/portfile.cmake @@ -31,49 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +#Build release vcpkg_build_qmake_release() -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) +#Reset the path to the baseline set(ENV{PATH} "${_path}") -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) - -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.GPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5datavisualization3d RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5declarative/portfile.cmake b/ports/qt5declarative/portfile.cmake index 70c502dfa..29ff3e759 100644 --- a/ports/qt5declarative/portfile.cmake +++ b/ports/qt5declarative/portfile.cmake @@ -31,57 +31,130 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +#Build release vcpkg_build_qmake_release() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() + +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) +#Reset the path to the baseline set(ENV{PATH} "${_path}") -file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) -file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) - -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) - -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) - -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) - -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5declarative RENAME copyright) \ No newline at end of file +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() + +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() + +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() + +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) + +#Fix incorrectly placed file(s) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Qt5QmlDevToolsd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5QmlDevToolsd.lib) \ No newline at end of file diff --git a/ports/qt5gamepad/portfile.cmake b/ports/qt5gamepad/portfile.cmake index 3492e78de..68ab01e6d 100644 --- a/ports/qt5gamepad/portfile.cmake +++ b/ports/qt5gamepad/portfile.cmake @@ -31,51 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +#Build release vcpkg_build_qmake_release() -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) +#Reset the path to the baseline set(ENV{PATH} "${_path}") -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) - -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5gamepad RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5imageformats/portfile.cmake b/ports/qt5imageformats/portfile.cmake index 059f8ae6a..612178ff8 100644 --- a/ports/qt5imageformats/portfile.cmake +++ b/ports/qt5imageformats/portfile.cmake @@ -31,43 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +#Build release vcpkg_build_qmake_release() -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) +#Reset the path to the baseline set(ENV{PATH} "${_path}") -file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) - -file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(INSTALL ${RELEASE_DIR}/lib/cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -#Create an empty include file so that vcpkg doesn't complain -file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_qt5imageformats "") +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5imageformats RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5multimedia/portfile.cmake b/ports/qt5multimedia/portfile.cmake index d326bb783..5eb7c4ff1 100644 --- a/ports/qt5multimedia/portfile.cmake +++ b/ports/qt5multimedia/portfile.cmake @@ -31,51 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +#Build release vcpkg_build_qmake_release() -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) +#Reset the path to the baseline set(ENV{PATH} "${_path}") -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) - -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5multimedia RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5scxml/portfile.cmake b/ports/qt5scxml/portfile.cmake index db2f385af..03de826cf 100644 --- a/ports/qt5scxml/portfile.cmake +++ b/ports/qt5scxml/portfile.cmake @@ -31,56 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) -vcpkg_build_qmake_release() +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Build release +vcpkg_build_qmake_release() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(ENV{PATH} "${_path}") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) -file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +#Reset the path to the baseline +set(ENV{PATH} "${_path}") -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5scxml RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5serial/portfile.cmake b/ports/qt5serial/portfile.cmake index edcd4b20a..1d47b5d0a 100644 --- a/ports/qt5serial/portfile.cmake +++ b/ports/qt5serial/portfile.cmake @@ -31,49 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +#Build release vcpkg_build_qmake_release() -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) +#Reset the path to the baseline set(ENV{PATH} "${_path}") -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) - -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5serial RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5speech/portfile.cmake b/ports/qt5speech/portfile.cmake index 39b52ff58..fa80da81d 100644 --- a/ports/qt5speech/portfile.cmake +++ b/ports/qt5speech/portfile.cmake @@ -31,51 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +#Build release vcpkg_build_qmake_release() -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) +#Reset the path to the baseline set(ENV{PATH} "${_path}") -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) - -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5speech RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5svg/portfile.cmake b/ports/qt5svg/portfile.cmake index 13ea3d1e7..2b838714e 100644 --- a/ports/qt5svg/portfile.cmake +++ b/ports/qt5svg/portfile.cmake @@ -31,51 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +#Build release vcpkg_build_qmake_release() -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) +#Reset the path to the baseline set(ENV{PATH} "${_path}") -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) - -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5svg RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5tools/CONTROL b/ports/qt5tools/CONTROL index 20c100ce9..702d4d68e 100644 --- a/ports/qt5tools/CONTROL +++ b/ports/qt5tools/CONTROL @@ -1,4 +1,4 @@ Source: qt5tools Version: 5.9.2-0 -Description: Qt5 Tools Module. Includes deployment tools and helpers, Qt Designer, Assistant, and other applications -Build-Depends: qt5base +Description: Qt5 Tools Module; Includes deployment tools and helpers, Qt Designer, Assistant, and other applications +Build-Depends: qt5base, qt5declarative \ No newline at end of file diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake index b0bf93f29..2dcd4a3c3 100644 --- a/ports/qt5tools/portfile.cmake +++ b/ports/qt5tools/portfile.cmake @@ -31,55 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) -vcpkg_build_qmake_release() +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Build release +vcpkg_build_qmake_release() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(ENV{PATH} "${_path}") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) -file(GLOB BINARY_TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +#Reset the path to the baseline +set(ENV{PATH} "${_path}") -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5tools RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5virtualkeyboard/portfile.cmake b/ports/qt5virtualkeyboard/portfile.cmake index 6a4c921cb..a2f0b1999 100644 --- a/ports/qt5virtualkeyboard/portfile.cmake +++ b/ports/qt5virtualkeyboard/portfile.cmake @@ -31,43 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +#Build release vcpkg_build_qmake_release() -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) +#Reset the path to the baseline set(ENV{PATH} "${_path}") -file(INSTALL ${DEBUG_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) - -file(INSTALL ${RELEASE_DIR}/plugins DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(INSTALL ${RELEASE_DIR}/lib/cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -#Create an empty include file so that vcpkg doesn't complain -file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_qt5virtualkeyboard "") +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.GPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5virtualkeyboard RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5websockets/portfile.cmake b/ports/qt5websockets/portfile.cmake index 333483a74..64f9bf374 100644 --- a/ports/qt5websockets/portfile.cmake +++ b/ports/qt5websockets/portfile.cmake @@ -31,49 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +#Build release vcpkg_build_qmake_release() -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) +#Reset the path to the baseline set(ENV{PATH} "${_path}") -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) - -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5websockets RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5winextras/portfile.cmake b/ports/qt5winextras/portfile.cmake index b5842494a..04b55327f 100644 --- a/ports/qt5winextras/portfile.cmake +++ b/ports/qt5winextras/portfile.cmake @@ -31,49 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +#Build release vcpkg_build_qmake_release() -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) +#Reset the path to the baseline set(ENV{PATH} "${_path}") -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) - -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5winextras RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5xmlpatterns/portfile.cmake b/ports/qt5xmlpatterns/portfile.cmake index 0bf42b19d..764628c5e 100644 --- a/ports/qt5xmlpatterns/portfile.cmake +++ b/ports/qt5xmlpatterns/portfile.cmake @@ -31,56 +31,127 @@ endif() # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +#Find Python and add it to the path +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") +set(_path "$ENV{PATH}") + +#Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +#Fix path to Qt5QmlDevTools +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") +endforeach() + +#Build debug vcpkg_build_qmake_debug() +#Configure release vcpkg_configure_qmake_release( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} ) -vcpkg_build_qmake_release() +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +#Build release +vcpkg_build_qmake_release() -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake -) +#Fix the cmake files if they exist +if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) +endif() -set(ENV{PATH} "${_path}") +#Set the correct install directory to packages +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") +endforeach() -file(INSTALL ${DEBUG_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(INSTALL ${DEBUG_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) -file(INSTALL ${DEBUG_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5/debug) +#Install the module files +vcpkg_build_qmake_debug(TARGETS install) +vcpkg_build_qmake_release(TARGETS install) -file(INSTALL ${RELEASE_DIR}/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${RELEASE_DIR}/mkspecs DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5) +#Reset the path to the baseline +set(ENV{PATH} "${_path}") -file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) -file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) +#Remove extra 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) + #Check if there are any libs left over; if not - delete the directory + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + #Check if there are any libs left over; if not - delete the directory + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) + if(NOT DEBUG_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +endif() -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +#Move release and debug dlls to the correct directory +file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) +file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) +if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() +endif() +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + if(NOT DEBUG_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() +endif() -file(GLOB RELEASE_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") -file(GLOB DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") -file(REMOVE ${RELEASE_DLLS} ${DEBUG_DLLS}) +#If there are no include files in the module - create an empty one to stop vcpkg from complaining +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") +endif() -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5xmlpatterns RENAME copyright) \ No newline at end of file +#Find the relevant license file and install it +if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") +elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") +endif() +file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 5dabd446e..e48b5e442 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -26,3 +26,4 @@ include(vcpkg_get_program_files_32_bit) include(vcpkg_get_program_files_platform_bitness) include(vcpkg_get_windows_sdk) include(vcpkg_acquire_depot_tools) +include(vcpkg_replace_string) diff --git a/scripts/cmake/vcpkg_replace_string.cmake b/scripts/cmake/vcpkg_replace_string.cmake new file mode 100644 index 000000000..3eb18d0bf --- /dev/null +++ b/scripts/cmake/vcpkg_replace_string.cmake @@ -0,0 +1,14 @@ +#.rst: +# .. command:: vcpkg_replace_string +# +# Replace a string in a file. +# +# :: +# vcpkg_replace_string(filename match_string replace_string) +# +# +function(vcpkg_replace_string filename match_string replace_string) + file(READ ${filename} _contents) + string(REPLACE "${match_string}" "${replace_string}" _contents "${_contents}") + file(WRITE ${filename} "${_contents}") +endfunction() -- cgit v1.2.3 From 76837a91b4af5cf5cce8ff1feb847ce4c96b8e05 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 6 Nov 2017 00:26:06 +1100 Subject: update modules dependent on qt5 to use qt5base --- ports/qca/CONTROL | 2 +- ports/qscintilla/CONTROL | 2 +- ports/qwt/CONTROL | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/qca/CONTROL b/ports/qca/CONTROL index 7d757297c..beddbaa37 100644 --- a/ports/qca/CONTROL +++ b/ports/qca/CONTROL @@ -1,4 +1,4 @@ Source: qca Version: 2.2.0-1 Description: Qt Cryptographic Architecture (QCA). Sources: https://cgit.kde.org/qca.git/ -Build-Depends: qt5 +Build-Depends: qt5base diff --git a/ports/qscintilla/CONTROL b/ports/qscintilla/CONTROL index 22a30137c..9ebe3ba04 100644 --- a/ports/qscintilla/CONTROL +++ b/ports/qscintilla/CONTROL @@ -1,4 +1,4 @@ Source: qscintilla Version: 2.10-1 Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt) and without QtDesigner plugin) -Build-Depends: qt5 +Build-Depends: qt5base diff --git a/ports/qwt/CONTROL b/ports/qwt/CONTROL index dd6400764..60539483b 100644 --- a/ports/qwt/CONTROL +++ b/ports/qwt/CONTROL @@ -1,4 +1,4 @@ Source: qwt Version: 6.1.3-2 Description: Qt widgets library for technical applications -Build-Depends: qt5 +Build-Depends: qt5base -- cgit v1.2.3 From 3a5b383bbec74dbaf0f1056e1a5d315e43d79375 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Mon, 6 Nov 2017 00:31:24 +1100 Subject: resolve conflict on non-existant vcpkg_acquire_depot_tools --- scripts/cmake/vcpkg_common_functions.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index e48b5e442..40111542d 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -25,5 +25,4 @@ include(vcpkg_copy_tool_dependencies) include(vcpkg_get_program_files_32_bit) include(vcpkg_get_program_files_platform_bitness) include(vcpkg_get_windows_sdk) -include(vcpkg_acquire_depot_tools) include(vcpkg_replace_string) -- cgit v1.2.3 From 07e4e674f09e435ba2a444296bbc12814cc8428e Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Mon, 6 Nov 2017 04:33:35 +0900 Subject: Reset settings to find boost libraries Reset the settings to find the boost libraries that installed by vcpkg. vcpkg will always rename to Boost libraries name that able to be find with default settings of FindBoost.cmake. --- scripts/buildsystems/vcpkg.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 19fc99af7..68e29b87c 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -155,6 +155,8 @@ endfunction() macro(find_package name) if(name STREQUAL "Boost") unset(Boost_USE_STATIC_LIBS) + unset(Boost_USE_MULTITHREADED) + unset(Boost_USE_STATIC_RUNTIME) endif() _find_package(${ARGV}) endmacro() -- cgit v1.2.3 From 524adf93aac0b7ed7c9c0f06d0e578803336bbb7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 5 Nov 2017 17:58:47 -0800 Subject: [Expand-Archive] Use namespaces to distringuish Powershell 5's and PSCX's --- scripts/fetchDependency.ps1 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 16ba984e6..4f629dfc9 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -142,12 +142,19 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) New-Item -ItemType Directory -Path $destination | Out-Null } - if (Test-Command -commandName 'Expand-Archive') + if (Test-Command -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') { - Expand-Archive -path $file -destinationpath $destination + Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") + Microsoft.PowerShell.Archive\Expand-Archive -path $file -destinationpath $destination + } + elseif (Test-Command -commandName 'Pscx\Expand-Archive') + { + Write-Verbose("Extracting with Pscx\Expand-Archive") + Pscx\Expand-Archive -path $file -OutputPath $destination } else { + Write-Verbose("Extracting via shell") $shell = new-object -com shell.application $zip = $shell.NameSpace($file) foreach($item in $zip.items()) @@ -257,7 +264,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { if (-not (Test-Path $executableFromDownload)) # consider renaming the extraction folder to make sure the extraction finished { - # Expand-Archive $downloadPath -dest "$extractionFolder" -Force # Requires powershell 5+ Expand-ZIPFile -File $downloadPath -Destination $extractionFolder } } -- cgit v1.2.3 From 4bd9ad6969485417e1c8243eeba4cef4608e6ec9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 5 Nov 2017 18:10:48 -0800 Subject: [Get-(File)Hash] Use namespaces and add Pscx check --- scripts/fetchDependency.ps1 | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 4f629dfc9..b884f3da8 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -31,6 +31,30 @@ function Get-Credential-Backwards-Compatible() } } +function Get-Hash-SHA265() +{ + if (Test-Command -commandName 'Microsoft.PowerShell.Utility\Get-FileHash') + { + Write-Verbose("Hashing with Microsoft.PowerShell.Utility\Get-FileHash") + $downloadedFileHash = (Get-FileHash -Path $downloadPath -Algorithm SHA256).Hash + } + elseif(Test-Command -commandName 'Pscx\Get-Hash') + { + Write-Verbose("Hashing with Pscx\Get-Hash") + $downloadedFileHash = (Get-Hash -Path $downloadPath -Algorithm SHA256).HashString + } + else + { + Write-Verbose("Hashing with .NET") + $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256") + $fileAsByteArray = [io.File]::ReadAllBytes($downloadPath) + $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) + $downloadedFileHash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) + } + + return $downloadedFileHash.ToLower() +} + if (Test-Module -moduleName 'BitsTransfer') { Import-Module BitsTransfer -Verbose:$false @@ -233,20 +257,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) performDownload $Dependency $url $downloadsDir $downloadPath $downloadVersion $requiredVersion - #calculating the hash - if (Test-Command -commandName 'Get-FileHash') - { - $downloadedFileHash = (Get-FileHash -Path $downloadPath -Algorithm SHA256).Hash - } - else - { - $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256") - $fileAsByteArray = [io.File]::ReadAllBytes($downloadPath) - $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) - $downloadedFileHash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) - } - - $downloadedFileHash = $downloadedFileHash.ToLower() + $downloadedFileHash = Get-Hash-SHA265 $downloadPath if ($expectedDownloadedFileHash -ne $downloadedFileHash) { Write-Host ("`nFile does not have expected hash:`n" + -- cgit v1.2.3 From 7fa618093d76b160b2c4d02e4a5bba1d38c674d3 Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 6 Nov 2017 12:35:12 -0600 Subject: BUGFIX: [vtk] remove libharu as a core dependency (#2140) * [vtk:control] break out libharu * [vtk:portfile] disable libharu * [vtk:control] update version * [vtk:portfile] remove useless comment --- ports/vtk/CONTROL | 8 ++++++-- ports/vtk/portfile.cmake | 13 ++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index d30e61506..2ef7ffeca 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,7 +1,7 @@ Source: vtk -Version: 8.0.1-1 +Version: 8.0.1-2 Description: Software system for 3D computer graphics, image processing, and visualization -Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora, libharu +Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora Feature: openvr Description: OpenVR functionality for VTK @@ -18,3 +18,7 @@ Build-Depends: msmpi Feature: python Description: Python functionality for VTK Build-Depends: python3 + +Feature: libharu +Description: PDF libharu functionality for VTK +Build-Depends: libharu diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 0a407e9ae..d865d1df2 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -37,6 +37,12 @@ else() set(VTK_WITH_OPENVR OFF) endif() +if("libharu" IN_LIST FEATURES) + set(VTK_WITH_LIBHARU ON) +else() + set(VTK_WITH_LIBHARU OFF) +endif() + set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5`, `mpi`, `python3`, `ffmpeg`, `gdal`, `fontconfig`, # `libmysql` and `atlmfc` are listed as dependency in the CONTROL file # ============================================================================= @@ -104,6 +110,12 @@ if(VTK_WITH_OPENVR) ) endif() +if(VTK_WITH_LIBHARU) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_USE_SYSTEM_LIBHARU=ON + ) +endif() + if(VTK_WITH_ALL_MODULES) list(APPEND ADDITIONAL_OPTIONS -DVTK_BUILD_ALL_MODULES=ON @@ -138,7 +150,6 @@ vcpkg_configure_cmake( -DVTK_USE_SYSTEM_EXPAT=ON -DVTK_USE_SYSTEM_FREETYPE=ON # -DVTK_USE_SYSTEM_GL2PS=ON - -DVTK_USE_SYSTEM_LIBHARU=ON -DVTK_USE_SYSTEM_JPEG=ON -DVTK_USE_SYSTEM_GLEW=ON -DVTK_USE_SYSTEM_HDF5=ON -- cgit v1.2.3 From 493483f52cd104962a6cc8dd4b9dda68ea73b64e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 6 Nov 2017 10:52:00 -0800 Subject: [libpng] Add older-releases mirror --- ports/libpng/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index e58df4e99..3b154506c 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -4,6 +4,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-${LIBPNG_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://downloads.sourceforge.net/project/libpng/libpng16/${LIBPNG_VERSION}/libpng-${LIBPNG_VERSION}.tar.xz" + "https://downloads.sourceforge.net/project/libpng/libpng16/older-releases/${LIBPNG_VERSION}/libpng-${LIBPNG_VERSION}.tar.xz" FILENAME "libpng-${LIBPNG_VERSION}.tar.xz" SHA512 89407c5abc1623faaa3992fc1e4a62def671d9a7401108dfceee895d5f16fe7030090bea89b34a36d377d8e6a5d40046886991f663ce075d1a2d31bf9eaf3c51 ) -- cgit v1.2.3 From e00bb8d7dd06cc3aa030952b993f3b8a4366e611 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 5 Nov 2017 12:05:17 +0300 Subject: [freetype] update to 2.8.1 https://sourceforge.net/projects/freetype/files/freetype2/2.8.1/ --- ports/freetype/CONTROL | 2 +- ports/freetype/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL index bf65eb28f..c6fcc4243 100644 --- a/ports/freetype/CONTROL +++ b/ports/freetype/CONTROL @@ -1,4 +1,4 @@ Source: freetype -Version: 2.8-1 +Version: 2.8.1-1 Build-Depends: zlib, bzip2, libpng Description: A library to render fonts. diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake index 8bce2577e..026c1573a 100644 --- a/ports/freetype/portfile.cmake +++ b/ports/freetype/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(FT_VERSION 2.8) +set(FT_VERSION 2.8.1) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freetype-${FT_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "http://download.savannah.gnu.org/releases/freetype/freetype-${FT_VERSION}.tar.bz2" FILENAME "freetype-${FT_VERSION}.tar.bz2" - SHA512 3842c34bf6100a8c9b78258146b2ff35e9bb4c993937d3ef09982c1e2552dfd15f8849ddd8a1e84edf08b5a5fb918b68cf7b1584545c5900e22a00bfa1c89ff5 + SHA512 ca59e47f0fceeeb9b8032be2671072604d0c79094675df24187829c05e99757d0a48a0f8062d4d688e056f783aa8f6090d732ad116562e94784fccf1339eb823 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From f1ab66b960f4b46ecb0f61cd46094f51dbe454f2 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 5 Nov 2017 12:20:35 +0300 Subject: [openal-soft] update to 1.18.2 https://github.com/kcat/openal-soft/blob/openal-soft-1.18.2/ChangeLog --- ports/openal-soft/CONTROL | 2 +- ports/openal-soft/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/openal-soft/CONTROL b/ports/openal-soft/CONTROL index 094f5c188..f7af2c687 100644 --- a/ports/openal-soft/CONTROL +++ b/ports/openal-soft/CONTROL @@ -1,3 +1,3 @@ Source: openal-soft -Version: 1.18.1-1 +Version: 1.18.2-1 Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake index de9538b5e..b1421f1f5 100644 --- a/ports/openal-soft/portfile.cmake +++ b/ports/openal-soft/portfile.cmake @@ -6,8 +6,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kcat/openal-soft - REF openal-soft-1.18.1 - SHA512 6e9d65dafbd77ca5d7badb1999b08a104e9c7e6c6637fb9ccca946de5bdfc6266de9d316ce06a979c94309ac9e0e5c1fac27b2673297f9062ef67f0e8a54e39c + REF openal-soft-1.18.2 + SHA512 85c62d3d16d2a371c1930310eed7219031203824289d9a30d60000f8e124ffa67e1bbfb15f1ba6841ef7346e88c000b9cca51c79d32c02e5dc9870392c536723 HEAD_REF master ) -- cgit v1.2.3 From eb99b0c705b78e6c278e0a3782a8324e9d304e69 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 6 Nov 2017 14:22:10 -0800 Subject: [vcpkg] Add tests for remove plans. --- toolsrc/src/tests.installplan.cpp | 493 ------------------------ toolsrc/src/tests.plan.cpp | 561 ++++++++++++++++++++++++++++ toolsrc/vcpkgtest/vcpkgtest.vcxproj | 2 +- toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters | 6 +- 4 files changed, 565 insertions(+), 497 deletions(-) delete mode 100644 toolsrc/src/tests.installplan.cpp create mode 100644 toolsrc/src/tests.plan.cpp diff --git a/toolsrc/src/tests.installplan.cpp b/toolsrc/src/tests.installplan.cpp deleted file mode 100644 index 129926317..000000000 --- a/toolsrc/src/tests.installplan.cpp +++ /dev/null @@ -1,493 +0,0 @@ -#include -#include - -#include - -using namespace Microsoft::VisualStudio::CppUnitTestFramework; - -using namespace vcpkg; - -namespace Microsoft::VisualStudio::CppUnitTestFramework -{ - template<> - inline std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t) - { - switch (t) - { - case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; - case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; - case Dependencies::InstallPlanType::INSTALL: return L"INSTALL"; - case Dependencies::InstallPlanType::EXCLUDED: return L"EXCLUDED"; - case 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 Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED"; - case Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED"; - case Dependencies::RequestType::UNKNOWN: return L"UNKNOWN"; - default: return ToString(static_cast(t)); - } - } -} - -namespace UnitTest1 -{ - class InstallPlanTests : public TestClass - { - static std::unique_ptr make_control_file( - const char* name, - const char* depends, - const std::vector>& features = {}) - { - using Pgh = std::unordered_map; - std::vector scf_pghs; - scf_pghs.push_back(Pgh{ - {"Source", name}, - {"Version", "0"}, - {"Build-Depends", depends}, - }); - for (auto&& feature : features) - { - scf_pghs.push_back(Pgh{ - {"Feature", feature.first}, - {"Description", "feature"}, - {"Build-Depends", feature.second}, - }); - } - auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(scf_pghs)); - Assert::IsTrue(m_pgh.has_value()); - return std::move(*m_pgh.get()); - } - - static void features_check(Dependencies::AnyAction* install_action, - std::string pkg_name, - std::vector vec, - const Triplet& triplet = Triplet::X86_WINDOWS) - { - const auto& plan = install_action->install_plan.value_or_exit(VCPKG_LINE_INFO); - const auto& feature_list = plan.feature_list; - - Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); - - Assert::AreEqual(pkg_name.c_str(), - (*plan.any_paragraph.source_control_file.get())->core_paragraph->name.c_str()); - Assert::AreEqual(size_t(vec.size()), feature_list.size()); - - for (auto&& feature_name : vec) - { - if (feature_name == "core" || feature_name == "") - { - Assert::IsTrue(Util::find(feature_list, "core") != feature_list.end() || - Util::find(feature_list, "") != feature_list.end()); - continue; - } - Assert::IsTrue(Util::find(feature_list, feature_name) != feature_list.end()); - } - } - - static void remove_plan_check(Dependencies::AnyAction* remove_action, - std::string pkg_name, - const Triplet& triplet = Triplet::X86_WINDOWS) - { - const auto& plan = remove_action->remove_plan.value_or_exit(VCPKG_LINE_INFO); - Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); - Assert::AreEqual(pkg_name.c_str(), plan.spec.name().c_str()); - } - - static std::unique_ptr make_status_pgh(const char* name, const char* depends = "") - { - using Pgh = std::unordered_map; - return std::make_unique(Pgh{{"Package", name}, - {"Version", "1"}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", depends}, - {"Status", "install ok installed"}}); - } - static std::unique_ptr make_status_feature_pgh(const char* name, - const char* feature, - const char* depends = "") - { - using Pgh = std::unordered_map; - return std::make_unique(Pgh{{"Package", name}, - {"Version", "1"}, - {"Feature", feature}, - {"Architecture", "x86-windows"}, - {"Multi-Arch", "same"}, - {"Depends", depends}, - {"Status", "install ok installed"}}); - } - struct PackageSpecMap - { - std::unordered_map map; - Triplet triplet; - PackageSpecMap(const Triplet& t) { triplet = t; } - - PackageSpec emplace(const char* name, - const char* depends = "", - const std::vector>& features = {}) - { - return emplace(std::move(*make_control_file(name, depends, features))); - } - PackageSpec emplace(vcpkg::SourceControlFile&& scf) - { - 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)); - return PackageSpec{*spec.get()}; - } - }; - - TEST_METHOD(basic_install_scheme) - { - std::vector> status_paragraphs; - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = spec_map.emplace("a", "b"); - auto spec_b = spec_map.emplace("b", "c"); - auto spec_c = spec_map.emplace("c"); - - Dependencies::MapPortFile map_port(spec_map.map); - auto install_plan = - Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(3), install_plan.size()); - Assert::AreEqual("c", install_plan[0].spec.name().c_str()); - Assert::AreEqual("b", install_plan[1].spec.name().c_str()); - Assert::AreEqual("a", install_plan[2].spec.name().c_str()); - } - - TEST_METHOD(multiple_install_scheme) - { - std::vector> status_paragraphs; - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = spec_map.emplace("a", "d"); - auto spec_b = spec_map.emplace("b", "d, e"); - auto spec_c = spec_map.emplace("c", "e, h"); - auto spec_d = spec_map.emplace("d", "f, g, h"); - auto spec_e = spec_map.emplace("e", "g"); - auto spec_f = spec_map.emplace("f"); - auto spec_g = spec_map.emplace("g"); - auto spec_h = spec_map.emplace("h"); - - Dependencies::MapPortFile map_port(spec_map.map); - auto install_plan = Dependencies::create_install_plan( - map_port, {spec_a, spec_b, spec_c}, StatusParagraphs(std::move(status_paragraphs))); - - auto iterator_pos = [&](const PackageSpec& spec) -> int { - auto it = std::find_if( - install_plan.begin(), install_plan.end(), [&](auto& action) { return action.spec == spec; }); - Assert::IsTrue(it != install_plan.end()); - return (int)(it - install_plan.begin()); - }; - - int a_pos = iterator_pos(spec_a), b_pos = iterator_pos(spec_b), c_pos = iterator_pos(spec_c), - d_pos = iterator_pos(spec_d), e_pos = iterator_pos(spec_e), f_pos = iterator_pos(spec_f), - g_pos = iterator_pos(spec_g), h_pos = iterator_pos(spec_h); - - Assert::IsTrue(a_pos > d_pos); - Assert::IsTrue(b_pos > e_pos); - Assert::IsTrue(b_pos > d_pos); - Assert::IsTrue(c_pos > e_pos); - Assert::IsTrue(c_pos > h_pos); - Assert::IsTrue(d_pos > f_pos); - Assert::IsTrue(d_pos > g_pos); - Assert::IsTrue(d_pos > h_pos); - Assert::IsTrue(e_pos > g_pos); - } - - TEST_METHOD(existing_package_scheme) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("a")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{spec_map.emplace("a")}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_a}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(1), install_plan.size()); - auto p = install_plan[0].install_plan.get(); - Assert::IsNotNull(p); - Assert::AreEqual("a", p->spec.name().c_str()); - Assert::AreEqual(Dependencies::InstallPlanType::ALREADY_INSTALLED, p->plan_type); - Assert::AreEqual(Dependencies::RequestType::USER_REQUESTED, p->request_type); - } - - TEST_METHOD(user_requested_package_scheme) - { - std::vector> status_paragraphs; - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{spec_map.emplace("a", "b")}; - auto spec_b = FullPackageSpec{spec_map.emplace("b")}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_a}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(2), install_plan.size()); - auto p = install_plan[0].install_plan.get(); - Assert::IsNotNull(p); - Assert::AreEqual("b", p->spec.name().c_str()); - Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p->plan_type); - Assert::AreEqual(Dependencies::RequestType::AUTO_SELECTED, p->request_type); - - auto p2 = install_plan[1].install_plan.get(); - Assert::IsNotNull(p2); - Assert::AreEqual("a", p2->spec.name().c_str()); - Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p2->plan_type); - Assert::AreEqual(Dependencies::RequestType::USER_REQUESTED, p2->request_type); - } - - TEST_METHOD(long_install_scheme) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("j", "k")); - status_paragraphs.push_back(make_status_pgh("k")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - - auto spec_a = spec_map.emplace("a", "b, c, d, e, f, g, h, j, k"); - auto spec_b = spec_map.emplace("b", "c, d, e, f, g, h, j, k"); - auto spec_c = spec_map.emplace("c", "d, e, f, g, h, j, k"); - auto spec_d = spec_map.emplace("d", "e, f, g, h, j, k"); - auto spec_e = spec_map.emplace("e", "f, g, h, j, k"); - auto spec_f = spec_map.emplace("f", "g, h, j, k"); - auto spec_g = spec_map.emplace("g", "h, j, k"); - auto spec_h = spec_map.emplace("h", "j, k"); - auto spec_j = spec_map.emplace("j", "k"); - auto spec_k = spec_map.emplace("k"); - - Dependencies::MapPortFile map_port(spec_map.map); - auto install_plan = - Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(8), install_plan.size()); - Assert::AreEqual("h", install_plan[0].spec.name().c_str()); - Assert::AreEqual("g", install_plan[1].spec.name().c_str()); - Assert::AreEqual("f", install_plan[2].spec.name().c_str()); - Assert::AreEqual("e", install_plan[3].spec.name().c_str()); - Assert::AreEqual("d", install_plan[4].spec.name().c_str()); - Assert::AreEqual("c", install_plan[5].spec.name().c_str()); - Assert::AreEqual("b", install_plan[6].spec.name().c_str()); - Assert::AreEqual("a", install_plan[7].spec.name().c_str()); - } - - TEST_METHOD(basic_feature_test_1) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("a", "b, b[b1]")); - status_paragraphs.push_back(make_status_pgh("b")); - status_paragraphs.push_back(make_status_feature_pgh("b", "b1")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{spec_map.emplace("a", "b, b[b1]", {{"a1", "b[b2]"}}), {"a1"}}; - auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_a}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(4), install_plan.size()); - remove_plan_check(&install_plan[0], "a"); - remove_plan_check(&install_plan[1], "b"); - features_check(&install_plan[2], "b", {"b1", "core", "b1"}); - features_check(&install_plan[3], "a", {"a1", "core"}); - } - - TEST_METHOD(basic_feature_test_2) - { - std::vector> status_paragraphs; - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - - auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[b1]", {{"a1", "b[b2]"}}), {"a1"}}; - auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_a}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(2), install_plan.size()); - features_check(&install_plan[0], "b", {"b1", "b2", "core"}); - features_check(&install_plan[1], "a", {"a1", "core"}); - } - - TEST_METHOD(basic_feature_test_3) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("a")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - - auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; - auto spec_b = FullPackageSpec{spec_map.emplace("b")}; - auto spec_c = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_c, spec_a}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(4), install_plan.size()); - remove_plan_check(&install_plan[0], "a"); - features_check(&install_plan[1], "b", {"core"}); - features_check(&install_plan[2], "a", {"a1", "core"}); - features_check(&install_plan[3], "c", {"core"}); - } - - TEST_METHOD(basic_feature_test_4) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("a")); - status_paragraphs.push_back(make_status_feature_pgh("a", "a1", "")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - - auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}})}; - auto spec_b = FullPackageSpec{spec_map.emplace("b")}; - auto spec_c = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_c}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(1), install_plan.size()); - features_check(&install_plan[0], "c", {"core"}); - } - - TEST_METHOD(basic_feature_test_5) - { - std::vector> status_paragraphs; - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - - auto spec_a = - FullPackageSpec{spec_map.emplace("a", "", {{"a1", "b[b1]"}, {"a2", "b[b2]"}, {"a3", "a[a2]"}}), {"a3"}}; - auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}})}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_a}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(2), install_plan.size()); - features_check(&install_plan[0], "b", {"core", "b2"}); - features_check(&install_plan[1], "a", {"core", "a3", "a2"}); - } - - TEST_METHOD(basic_feature_test_6) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("b")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[core]"), {"core"}}; - auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}}), {"b1"}}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_a, spec_b}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(3), install_plan.size()); - remove_plan_check(&install_plan[0], "b"); - features_check(&install_plan[1], "b", {"core", "b1"}); - features_check(&install_plan[2], "a", {"core"}); - } - - TEST_METHOD(basic_feature_test_7) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("x", "b")); - status_paragraphs.push_back(make_status_pgh("b")); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - - auto spec_a = FullPackageSpec{spec_map.emplace("a")}; - auto spec_x = FullPackageSpec{spec_map.emplace("x", "a"), {"core"}}; - auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}}), {"b1"}}; - - auto install_plan = - Dependencies::create_feature_install_plan(spec_map.map, - FullPackageSpec::to_feature_specs({spec_b}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::AreEqual(size_t(5), install_plan.size()); - remove_plan_check(&install_plan[0], "x"); - remove_plan_check(&install_plan[1], "b"); - - // TODO: order here may change but A < X, and B anywhere - features_check(&install_plan[2], "b", {"core", "b1"}); - features_check(&install_plan[3], "a", {"core"}); - features_check(&install_plan[4], "x", {"core"}); - } - - TEST_METHOD(basic_feature_test_8) - { - std::vector> status_paragraphs; - status_paragraphs.push_back(make_status_pgh("a")); - status_paragraphs.push_back(make_status_pgh("a")); - status_paragraphs.back()->package.spec = - PackageSpec::from_name_and_triplet("a", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); - - PackageSpecMap spec_map(Triplet::X64_WINDOWS); - auto spec_a_64 = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; - auto spec_b_64 = FullPackageSpec{spec_map.emplace("b")}; - auto spec_c_64 = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; - - spec_map.triplet = Triplet::X86_WINDOWS; - auto spec_a_86 = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; - auto spec_b_86 = FullPackageSpec{spec_map.emplace("b")}; - auto spec_c_86 = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; - - auto install_plan = Dependencies::create_feature_install_plan( - spec_map.map, - FullPackageSpec::to_feature_specs({spec_c_64, spec_a_86, spec_a_64, spec_c_86}), - StatusParagraphs(std::move(status_paragraphs))); - - remove_plan_check(&install_plan[0], "a", Triplet::X64_WINDOWS); - remove_plan_check(&install_plan[1], "a"); - features_check(&install_plan[2], "b", {"core"}, Triplet::X64_WINDOWS); - features_check(&install_plan[3], "a", {"a1", "core"}, Triplet::X64_WINDOWS); - features_check(&install_plan[4], "c", {"core"}, Triplet::X64_WINDOWS); - features_check(&install_plan[5], "b", {"core"}); - features_check(&install_plan[6], "a", {"a1", "core"}); - features_check(&install_plan[7], "c", {"core"}); - } - - TEST_METHOD(install_all_features_test) - { - std::vector> status_paragraphs; - - PackageSpecMap spec_map(Triplet::X64_WINDOWS); - auto spec_a_64 = FullPackageSpec{spec_map.emplace("a", "", {{"0", ""}, {"1", ""}}), {"core"}}; - - auto install_specs = FullPackageSpec::from_string("a[*]", Triplet::X64_WINDOWS); - Assert::IsTrue(install_specs.has_value()); - if (!install_specs.has_value()) return; - auto install_plan = Dependencies::create_feature_install_plan( - spec_map.map, - FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), - StatusParagraphs(std::move(status_paragraphs))); - - Assert::IsTrue(install_plan.size() == 1); - features_check(&install_plan[0], "a", {"0", "1", "core"}, Triplet::X64_WINDOWS); - } - }; -} diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp new file mode 100644 index 000000000..d62178bdf --- /dev/null +++ b/toolsrc/src/tests.plan.cpp @@ -0,0 +1,561 @@ +#include +#include + +#include + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +using namespace vcpkg; + +namespace Microsoft::VisualStudio::CppUnitTestFramework +{ + template<> + inline std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t) + { + switch (t) + { + case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; + case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; + case Dependencies::InstallPlanType::INSTALL: return L"INSTALL"; + case Dependencies::InstallPlanType::EXCLUDED: return L"EXCLUDED"; + case 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 Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED"; + case Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED"; + case Dependencies::RequestType::UNKNOWN: return L"UNKNOWN"; + default: return ToString(static_cast(t)); + } + } +} + +namespace UnitTest1 +{ + static std::unique_ptr make_control_file( + const char* name, + const char* depends, + const std::vector>& features = {}) + { + using Pgh = std::unordered_map; + std::vector scf_pghs; + scf_pghs.push_back(Pgh{ + { "Source", name }, + { "Version", "0" }, + { "Build-Depends", depends }, + }); + for (auto&& feature : features) + { + scf_pghs.push_back(Pgh{ + { "Feature", feature.first }, + { "Description", "feature" }, + { "Build-Depends", feature.second }, + }); + } + auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(scf_pghs)); + Assert::IsTrue(m_pgh.has_value()); + return std::move(*m_pgh.get()); + } + + static void features_check(Dependencies::AnyAction* install_action, + std::string pkg_name, + std::vector vec, + const Triplet& triplet = Triplet::X86_WINDOWS) + { + const auto& plan = install_action->install_plan.value_or_exit(VCPKG_LINE_INFO); + const auto& feature_list = plan.feature_list; + + Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); + + Assert::AreEqual(pkg_name.c_str(), + (*plan.any_paragraph.source_control_file.get())->core_paragraph->name.c_str()); + Assert::AreEqual(size_t(vec.size()), feature_list.size()); + + for (auto&& feature_name : vec) + { + if (feature_name == "core" || feature_name == "") + { + Assert::IsTrue(Util::find(feature_list, "core") != feature_list.end() || + Util::find(feature_list, "") != feature_list.end()); + continue; + } + Assert::IsTrue(Util::find(feature_list, feature_name) != feature_list.end()); + } + } + + static void remove_plan_check(Dependencies::AnyAction* remove_action, + std::string pkg_name, + const Triplet& triplet = Triplet::X86_WINDOWS) + { + const auto& plan = remove_action->remove_plan.value_or_exit(VCPKG_LINE_INFO); + Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); + Assert::AreEqual(pkg_name.c_str(), plan.spec.name().c_str()); + } + + static std::unique_ptr make_status_pgh(const char* name, const char* depends = "") + { + using Pgh = std::unordered_map; + return std::make_unique(Pgh{ { "Package", name }, + { "Version", "1" }, + { "Architecture", "x86-windows" }, + { "Multi-Arch", "same" }, + { "Depends", depends }, + { "Status", "install ok installed" } }); + } + static std::unique_ptr make_status_feature_pgh(const char* name, + const char* feature, + const char* depends = "") + { + using Pgh = std::unordered_map; + return std::make_unique(Pgh{ { "Package", name }, + { "Version", "1" }, + { "Feature", feature }, + { "Architecture", "x86-windows" }, + { "Multi-Arch", "same" }, + { "Depends", depends }, + { "Status", "install ok installed" } }); + } + struct PackageSpecMap + { + std::unordered_map map; + Triplet triplet; + PackageSpecMap(const Triplet& t) { triplet = t; } + + PackageSpec emplace(const char* name, + const char* depends = "", + const std::vector>& features = {}) + { + return emplace(std::move(*make_control_file(name, depends, features))); + } + PackageSpec emplace(vcpkg::SourceControlFile&& scf) + { + 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)); + return PackageSpec{ *spec.get() }; + } + }; + + class InstallPlanTests : public TestClass + { + TEST_METHOD(basic_install_scheme) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a", "b"); + auto spec_b = spec_map.emplace("b", "c"); + auto spec_c = spec_map.emplace("c"); + + Dependencies::MapPortFile map_port(spec_map.map); + auto install_plan = + Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(3), install_plan.size()); + Assert::AreEqual("c", install_plan[0].spec.name().c_str()); + Assert::AreEqual("b", install_plan[1].spec.name().c_str()); + Assert::AreEqual("a", install_plan[2].spec.name().c_str()); + } + + TEST_METHOD(multiple_install_scheme) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a", "d"); + auto spec_b = spec_map.emplace("b", "d, e"); + auto spec_c = spec_map.emplace("c", "e, h"); + auto spec_d = spec_map.emplace("d", "f, g, h"); + auto spec_e = spec_map.emplace("e", "g"); + auto spec_f = spec_map.emplace("f"); + auto spec_g = spec_map.emplace("g"); + auto spec_h = spec_map.emplace("h"); + + Dependencies::MapPortFile map_port(spec_map.map); + auto install_plan = Dependencies::create_install_plan( + map_port, {spec_a, spec_b, spec_c}, StatusParagraphs(std::move(status_paragraphs))); + + auto iterator_pos = [&](const PackageSpec& spec) -> int { + auto it = std::find_if( + install_plan.begin(), install_plan.end(), [&](auto& action) { return action.spec == spec; }); + Assert::IsTrue(it != install_plan.end()); + return (int)(it - install_plan.begin()); + }; + + int a_pos = iterator_pos(spec_a), b_pos = iterator_pos(spec_b), c_pos = iterator_pos(spec_c), + d_pos = iterator_pos(spec_d), e_pos = iterator_pos(spec_e), f_pos = iterator_pos(spec_f), + g_pos = iterator_pos(spec_g), h_pos = iterator_pos(spec_h); + + Assert::IsTrue(a_pos > d_pos); + Assert::IsTrue(b_pos > e_pos); + Assert::IsTrue(b_pos > d_pos); + Assert::IsTrue(c_pos > e_pos); + Assert::IsTrue(c_pos > h_pos); + Assert::IsTrue(d_pos > f_pos); + Assert::IsTrue(d_pos > g_pos); + Assert::IsTrue(d_pos > h_pos); + Assert::IsTrue(e_pos > g_pos); + } + + TEST_METHOD(existing_package_scheme) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = FullPackageSpec{spec_map.emplace("a")}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(1), install_plan.size()); + auto p = install_plan[0].install_plan.get(); + Assert::IsNotNull(p); + Assert::AreEqual("a", p->spec.name().c_str()); + Assert::AreEqual(Dependencies::InstallPlanType::ALREADY_INSTALLED, p->plan_type); + Assert::AreEqual(Dependencies::RequestType::USER_REQUESTED, p->request_type); + } + + TEST_METHOD(user_requested_package_scheme) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b")}; + auto spec_b = FullPackageSpec{spec_map.emplace("b")}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(2), install_plan.size()); + auto p = install_plan[0].install_plan.get(); + Assert::IsNotNull(p); + Assert::AreEqual("b", p->spec.name().c_str()); + Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p->plan_type); + Assert::AreEqual(Dependencies::RequestType::AUTO_SELECTED, p->request_type); + + auto p2 = install_plan[1].install_plan.get(); + Assert::IsNotNull(p2); + Assert::AreEqual("a", p2->spec.name().c_str()); + Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p2->plan_type); + Assert::AreEqual(Dependencies::RequestType::USER_REQUESTED, p2->request_type); + } + + TEST_METHOD(long_install_scheme) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("j", "k")); + status_paragraphs.push_back(make_status_pgh("k")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + + auto spec_a = spec_map.emplace("a", "b, c, d, e, f, g, h, j, k"); + auto spec_b = spec_map.emplace("b", "c, d, e, f, g, h, j, k"); + auto spec_c = spec_map.emplace("c", "d, e, f, g, h, j, k"); + auto spec_d = spec_map.emplace("d", "e, f, g, h, j, k"); + auto spec_e = spec_map.emplace("e", "f, g, h, j, k"); + auto spec_f = spec_map.emplace("f", "g, h, j, k"); + auto spec_g = spec_map.emplace("g", "h, j, k"); + auto spec_h = spec_map.emplace("h", "j, k"); + auto spec_j = spec_map.emplace("j", "k"); + auto spec_k = spec_map.emplace("k"); + + Dependencies::MapPortFile map_port(spec_map.map); + auto install_plan = + Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(8), install_plan.size()); + Assert::AreEqual("h", install_plan[0].spec.name().c_str()); + Assert::AreEqual("g", install_plan[1].spec.name().c_str()); + Assert::AreEqual("f", install_plan[2].spec.name().c_str()); + Assert::AreEqual("e", install_plan[3].spec.name().c_str()); + Assert::AreEqual("d", install_plan[4].spec.name().c_str()); + Assert::AreEqual("c", install_plan[5].spec.name().c_str()); + Assert::AreEqual("b", install_plan[6].spec.name().c_str()); + Assert::AreEqual("a", install_plan[7].spec.name().c_str()); + } + + TEST_METHOD(basic_feature_test_1) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a", "b, b[b1]")); + status_paragraphs.push_back(make_status_pgh("b")); + status_paragraphs.push_back(make_status_feature_pgh("b", "b1")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b, b[b1]", {{"a1", "b[b2]"}}), {"a1"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(4), install_plan.size()); + remove_plan_check(&install_plan[0], "a"); + remove_plan_check(&install_plan[1], "b"); + features_check(&install_plan[2], "b", {"b1", "core", "b1"}); + features_check(&install_plan[3], "a", {"a1", "core"}); + } + + TEST_METHOD(basic_feature_test_2) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[b1]", {{"a1", "b[b2]"}}), {"a1"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(2), install_plan.size()); + features_check(&install_plan[0], "b", {"b1", "b2", "core"}); + features_check(&install_plan[1], "a", {"a1", "core"}); + } + + TEST_METHOD(basic_feature_test_3) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b")}; + auto spec_c = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_c, spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(4), install_plan.size()); + remove_plan_check(&install_plan[0], "a"); + features_check(&install_plan[1], "b", {"core"}); + features_check(&install_plan[2], "a", {"a1", "core"}); + features_check(&install_plan[3], "c", {"core"}); + } + + TEST_METHOD(basic_feature_test_4) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.push_back(make_status_feature_pgh("a", "a1", "")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}})}; + auto spec_b = FullPackageSpec{spec_map.emplace("b")}; + auto spec_c = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_c}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(1), install_plan.size()); + features_check(&install_plan[0], "c", {"core"}); + } + + TEST_METHOD(basic_feature_test_5) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + + auto spec_a = + FullPackageSpec{spec_map.emplace("a", "", {{"a1", "b[b1]"}, {"a2", "b[b2]"}, {"a3", "a[a2]"}}), {"a3"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}})}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(2), install_plan.size()); + features_check(&install_plan[0], "b", {"core", "b2"}); + features_check(&install_plan[1], "a", {"core", "a3", "a2"}); + } + + TEST_METHOD(basic_feature_test_6) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("b")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[core]"), {"core"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}}), {"b1"}}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_a, spec_b}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(3), install_plan.size()); + remove_plan_check(&install_plan[0], "b"); + features_check(&install_plan[1], "b", {"core", "b1"}); + features_check(&install_plan[2], "a", {"core"}); + } + + TEST_METHOD(basic_feature_test_7) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("x", "b")); + status_paragraphs.push_back(make_status_pgh("b")); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + + auto spec_a = FullPackageSpec{spec_map.emplace("a")}; + auto spec_x = FullPackageSpec{spec_map.emplace("x", "a"), {"core"}}; + auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}}), {"b1"}}; + + auto install_plan = + Dependencies::create_feature_install_plan(spec_map.map, + FullPackageSpec::to_feature_specs({spec_b}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::AreEqual(size_t(5), install_plan.size()); + remove_plan_check(&install_plan[0], "x"); + remove_plan_check(&install_plan[1], "b"); + + // TODO: order here may change but A < X, and B anywhere + features_check(&install_plan[2], "b", {"core", "b1"}); + features_check(&install_plan[3], "a", {"core"}); + features_check(&install_plan[4], "x", {"core"}); + } + + TEST_METHOD(basic_feature_test_8) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.back()->package.spec = + PackageSpec::from_name_and_triplet("a", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); + + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_a_64 = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; + auto spec_b_64 = FullPackageSpec{spec_map.emplace("b")}; + auto spec_c_64 = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; + + spec_map.triplet = Triplet::X86_WINDOWS; + auto spec_a_86 = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; + auto spec_b_86 = FullPackageSpec{spec_map.emplace("b")}; + auto spec_c_86 = FullPackageSpec{spec_map.emplace("c", "a[a1]"), {"core"}}; + + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({spec_c_64, spec_a_86, spec_a_64, spec_c_86}), + StatusParagraphs(std::move(status_paragraphs))); + + remove_plan_check(&install_plan[0], "a", Triplet::X64_WINDOWS); + remove_plan_check(&install_plan[1], "a"); + features_check(&install_plan[2], "b", {"core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[3], "a", {"a1", "core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[4], "c", {"core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[5], "b", {"core"}); + features_check(&install_plan[6], "a", {"a1", "core"}); + features_check(&install_plan[7], "c", {"core"}); + } + + TEST_METHOD(install_all_features_test) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_a_64 = FullPackageSpec{spec_map.emplace("a", "", {{"0", ""}, {"1", ""}}), {"core"}}; + + auto install_specs = FullPackageSpec::from_string("a[*]", Triplet::X64_WINDOWS); + Assert::IsTrue(install_specs.has_value()); + if (!install_specs.has_value()) return; + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::IsTrue(install_plan.size() == 1); + features_check(&install_plan[0], "a", {"0", "1", "core"}, Triplet::X64_WINDOWS); + } + }; + + static PackageSpec unsafe_pspec(std::string name, Triplet t = Triplet::X86_WINDOWS) + { + auto m_ret = PackageSpec::from_name_and_triplet(name, t); + Assert::IsTrue(m_ret.has_value()); + return m_ret.value_or_exit(VCPKG_LINE_INFO); + } + + class RemovePlanTests : public TestClass + { + TEST_METHOD(basic_remove_scheme) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + StatusParagraphs status_db(std::move(pghs)); + + auto remove_plan = Dependencies::create_remove_plan({ unsafe_pspec("a") }, status_db); + + Assert::AreEqual(size_t(1), remove_plan.size()); + Assert::AreEqual("a", remove_plan[0].spec.name().c_str()); + } + + TEST_METHOD(recurse_remove_scheme) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + pghs.push_back(make_status_pgh("b", "a")); + StatusParagraphs status_db(std::move(pghs)); + + auto remove_plan = Dependencies::create_remove_plan({ unsafe_pspec("a") }, status_db); + + Assert::AreEqual(size_t(2), remove_plan.size()); + Assert::AreEqual("b", remove_plan[0].spec.name().c_str()); + Assert::AreEqual("a", remove_plan[1].spec.name().c_str()); + } + + TEST_METHOD(features_depend_remove_scheme) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + pghs.push_back(make_status_pgh("b")); + pghs.push_back(make_status_feature_pgh("b", "0", "a")); + StatusParagraphs status_db(std::move(pghs)); + + auto remove_plan = Dependencies::create_remove_plan({ unsafe_pspec("a") }, status_db); + + Assert::AreEqual(size_t(2), remove_plan.size()); + Assert::AreEqual("b", remove_plan[0].spec.name().c_str()); + Assert::AreEqual("a", remove_plan[1].spec.name().c_str()); + } + + TEST_METHOD(features_depend_remove_scheme_once_removed) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("expat")); + pghs.push_back(make_status_pgh("vtk", "expat")); + pghs.push_back(make_status_pgh("opencv")); + pghs.push_back(make_status_feature_pgh("opencv", "vtk", "vtk")); + StatusParagraphs status_db(std::move(pghs)); + + auto remove_plan = Dependencies::create_remove_plan({ unsafe_pspec("expat") }, status_db); + + Assert::AreEqual(size_t(3), remove_plan.size()); + Assert::AreEqual("opencv", remove_plan[0].spec.name().c_str()); + Assert::AreEqual("vtk", remove_plan[1].spec.name().c_str()); + Assert::AreEqual("expat", remove_plan[2].spec.name().c_str()); + } + }; +} diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index 766b4bf67..88dc14a75 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -23,7 +23,7 @@ - + diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters index b6f1ced06..217c5b608 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters @@ -15,9 +15,6 @@ - - Source Files - Source Files @@ -33,5 +30,8 @@ Source Files + + Source Files + \ No newline at end of file -- cgit v1.2.3 From e2575e8c961e90b5dd35ef37c0b241b6cdb2914a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 6 Nov 2017 14:29:57 -0800 Subject: [vcpkg] Reformat tests.plan.cpp and add :x64 version of test --- toolsrc/src/tests.plan.cpp | 97 +++++++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 39 deletions(-) diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index d62178bdf..9cf3cfd8e 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -39,23 +39,21 @@ namespace Microsoft::VisualStudio::CppUnitTestFramework namespace UnitTest1 { static std::unique_ptr make_control_file( - const char* name, - const char* depends, - const std::vector>& features = {}) + const char* name, const char* depends, const std::vector>& features = {}) { using Pgh = std::unordered_map; std::vector scf_pghs; scf_pghs.push_back(Pgh{ - { "Source", name }, - { "Version", "0" }, - { "Build-Depends", depends }, + {"Source", name}, + {"Version", "0"}, + {"Build-Depends", depends}, }); for (auto&& feature : features) { scf_pghs.push_back(Pgh{ - { "Feature", feature.first }, - { "Description", "feature" }, - { "Build-Depends", feature.second }, + {"Feature", feature.first}, + {"Description", "feature"}, + {"Build-Depends", feature.second}, }); } auto m_pgh = vcpkg::SourceControlFile::parse_control_file(std::move(scf_pghs)); @@ -64,9 +62,9 @@ namespace UnitTest1 } static void features_check(Dependencies::AnyAction* install_action, - std::string pkg_name, - std::vector vec, - const Triplet& triplet = Triplet::X86_WINDOWS) + std::string pkg_name, + std::vector vec, + const Triplet& triplet = Triplet::X86_WINDOWS) { const auto& plan = install_action->install_plan.value_or_exit(VCPKG_LINE_INFO); const auto& feature_list = plan.feature_list; @@ -74,7 +72,7 @@ namespace UnitTest1 Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); Assert::AreEqual(pkg_name.c_str(), - (*plan.any_paragraph.source_control_file.get())->core_paragraph->name.c_str()); + (*plan.any_paragraph.source_control_file.get())->core_paragraph->name.c_str()); Assert::AreEqual(size_t(vec.size()), feature_list.size()); for (auto&& feature_name : vec) @@ -82,7 +80,7 @@ namespace UnitTest1 if (feature_name == "core" || feature_name == "") { Assert::IsTrue(Util::find(feature_list, "core") != feature_list.end() || - Util::find(feature_list, "") != feature_list.end()); + Util::find(feature_list, "") != feature_list.end()); continue; } Assert::IsTrue(Util::find(feature_list, feature_name) != feature_list.end()); @@ -90,36 +88,39 @@ namespace UnitTest1 } static void remove_plan_check(Dependencies::AnyAction* remove_action, - std::string pkg_name, - const Triplet& triplet = Triplet::X86_WINDOWS) + std::string pkg_name, + const Triplet& triplet = Triplet::X86_WINDOWS) { const auto& plan = remove_action->remove_plan.value_or_exit(VCPKG_LINE_INFO); Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); Assert::AreEqual(pkg_name.c_str(), plan.spec.name().c_str()); } - static std::unique_ptr make_status_pgh(const char* name, const char* depends = "") + static std::unique_ptr make_status_pgh(const char* name, + const char* depends = "", + const char* triplet = "x86-windows") { using Pgh = std::unordered_map; - return std::make_unique(Pgh{ { "Package", name }, - { "Version", "1" }, - { "Architecture", "x86-windows" }, - { "Multi-Arch", "same" }, - { "Depends", depends }, - { "Status", "install ok installed" } }); + return std::make_unique(Pgh{{"Package", name}, + {"Version", "1"}, + {"Architecture", triplet}, + {"Multi-Arch", "same"}, + {"Depends", depends}, + {"Status", "install ok installed"}}); } static std::unique_ptr make_status_feature_pgh(const char* name, - const char* feature, - const char* depends = "") + const char* feature, + const char* depends = "", + const char* triplet = "x86-windows") { using Pgh = std::unordered_map; - return std::make_unique(Pgh{ { "Package", name }, - { "Version", "1" }, - { "Feature", feature }, - { "Architecture", "x86-windows" }, - { "Multi-Arch", "same" }, - { "Depends", depends }, - { "Status", "install ok installed" } }); + return std::make_unique(Pgh{{"Package", name}, + {"Version", "1"}, + {"Feature", feature}, + {"Architecture", triplet}, + {"Multi-Arch", "same"}, + {"Depends", depends}, + {"Status", "install ok installed"}}); } struct PackageSpecMap { @@ -128,8 +129,8 @@ namespace UnitTest1 PackageSpecMap(const Triplet& t) { triplet = t; } PackageSpec emplace(const char* name, - const char* depends = "", - const std::vector>& features = {}) + const char* depends = "", + const std::vector>& features = {}) { return emplace(std::move(*make_control_file(name, depends, features))); } @@ -138,7 +139,7 @@ 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)); - return PackageSpec{ *spec.get() }; + return PackageSpec{*spec.get()}; } }; @@ -506,7 +507,7 @@ namespace UnitTest1 pghs.push_back(make_status_pgh("a")); StatusParagraphs status_db(std::move(pghs)); - auto remove_plan = Dependencies::create_remove_plan({ unsafe_pspec("a") }, status_db); + auto remove_plan = Dependencies::create_remove_plan({unsafe_pspec("a")}, status_db); Assert::AreEqual(size_t(1), remove_plan.size()); Assert::AreEqual("a", remove_plan[0].spec.name().c_str()); @@ -519,7 +520,7 @@ namespace UnitTest1 pghs.push_back(make_status_pgh("b", "a")); StatusParagraphs status_db(std::move(pghs)); - auto remove_plan = Dependencies::create_remove_plan({ unsafe_pspec("a") }, status_db); + auto remove_plan = Dependencies::create_remove_plan({unsafe_pspec("a")}, status_db); Assert::AreEqual(size_t(2), remove_plan.size()); Assert::AreEqual("b", remove_plan[0].spec.name().c_str()); @@ -534,7 +535,7 @@ namespace UnitTest1 pghs.push_back(make_status_feature_pgh("b", "0", "a")); StatusParagraphs status_db(std::move(pghs)); - auto remove_plan = Dependencies::create_remove_plan({ unsafe_pspec("a") }, status_db); + auto remove_plan = Dependencies::create_remove_plan({unsafe_pspec("a")}, status_db); Assert::AreEqual(size_t(2), remove_plan.size()); Assert::AreEqual("b", remove_plan[0].spec.name().c_str()); @@ -550,7 +551,25 @@ namespace UnitTest1 pghs.push_back(make_status_feature_pgh("opencv", "vtk", "vtk")); StatusParagraphs status_db(std::move(pghs)); - auto remove_plan = Dependencies::create_remove_plan({ unsafe_pspec("expat") }, status_db); + auto remove_plan = Dependencies::create_remove_plan({unsafe_pspec("expat")}, status_db); + + Assert::AreEqual(size_t(3), remove_plan.size()); + Assert::AreEqual("opencv", remove_plan[0].spec.name().c_str()); + Assert::AreEqual("vtk", remove_plan[1].spec.name().c_str()); + Assert::AreEqual("expat", remove_plan[2].spec.name().c_str()); + } + + TEST_METHOD(features_depend_remove_scheme_once_removed_x64) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("expat", "", "x64")); + pghs.push_back(make_status_pgh("vtk", "expat", "x64")); + pghs.push_back(make_status_pgh("opencv", "", "x64")); + pghs.push_back(make_status_feature_pgh("opencv", "vtk", "vtk", "x64")); + StatusParagraphs status_db(std::move(pghs)); + + auto remove_plan = Dependencies::create_remove_plan( + {unsafe_pspec("expat", Triplet::from_canonical_name("x64"))}, status_db); Assert::AreEqual(size_t(3), remove_plan.size()); Assert::AreEqual("opencv", remove_plan[0].spec.name().c_str()); -- cgit v1.2.3 From 05a82c5e95520e59c207015950de2f00b6dae492 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 6 Nov 2017 15:27:57 -0800 Subject: [clapack] Fix downloaded file name --- ports/clapack/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/clapack/portfile.cmake b/ports/clapack/portfile.cmake index 72b1aa23b..933294419 100644 --- a/ports/clapack/portfile.cmake +++ b/ports/clapack/portfile.cmake @@ -19,7 +19,7 @@ endif() set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/clapack-3.2.1-CMAKE) vcpkg_download_distfile(ARCHIVE URLS "http://www.netlib.org/clapack/clapack-3.2.1-CMAKE.tgz" - FILENAME "clapack-3.2.1" + FILENAME "clapack-3.2.1.tgz" SHA512 cf19c710291ddff3f6ead7d86bdfdeaebca21291d9df094bf0a8ef599546b007757fb2dbb19b56511bb53ef7456eac0c73973b9627bf4d02982c856124428b49 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 31247f6f3b1badad4f78c5ef2146769953b95955 Mon Sep 17 00:00:00 2001 From: James Chang Date: Tue, 7 Nov 2017 15:59:02 +0800 Subject: [librealsense2] new port --- ports/librealsense2/CONTROL | 3 ++ ports/librealsense2/crt-linkage-restriction.patch | 19 +++++++++ ports/librealsense2/portfile.cmake | 47 +++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 ports/librealsense2/CONTROL create mode 100644 ports/librealsense2/crt-linkage-restriction.patch create mode 100644 ports/librealsense2/portfile.cmake diff --git a/ports/librealsense2/CONTROL b/ports/librealsense2/CONTROL new file mode 100644 index 000000000..312c7b145 --- /dev/null +++ b/ports/librealsense2/CONTROL @@ -0,0 +1,3 @@ +Source: librealsense2 +Version: 2.8.1 +Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). diff --git a/ports/librealsense2/crt-linkage-restriction.patch b/ports/librealsense2/crt-linkage-restriction.patch new file mode 100644 index 000000000..ae4acc834 --- /dev/null +++ b/ports/librealsense2/crt-linkage-restriction.patch @@ -0,0 +1,19 @@ +--- a/CMakeLists.txt 2017-11-07 14:30:02.270145100 +0800 ++++ b/CMakeLists.txt 2017-11-07 14:26:42.306208800 +0800 +@@ -402,16 +402,6 @@ + source_group("Header Files\\Processing Blocks" FILES + src/colorizer.h + ) +- +- foreach(flag_var +- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE +- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO +- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE +- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) +- if(${flag_var} MATCHES "/MD") +- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") +- endif(${flag_var} MATCHES "/MD") +- endforeach(flag_var) + else() + + endif() diff --git a/ports/librealsense2/portfile.cmake b/ports/librealsense2/portfile.cmake new file mode 100644 index 000000000..09cc5706b --- /dev/null +++ b/ports/librealsense2/portfile.cmake @@ -0,0 +1,47 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO IntelRealSense/librealsense + REF v2.8.1 + SHA512 af6ae166ef0879d4da434cebea95358a4c3907bd71913577008a21717a9e45400a6eafffe5ddbf9cc50bd939d4dae0863e2f34b7ee76de276fedc68117a21e71 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/crt-linkage-restriction.patch +) + +if(${VCPKG_LIBRARY_LINKAGE} STREQUAL static) + set(BUILD_SHARED off) +else() + set(BUILD_SHARED on) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DENFORCE_METADATA=on + -DBUILD_EXAMPLES=off + -DBUILD_GRAPHICAL_EXAMPLES=off + -DBUILD_PYTHON_BINDINGS=off + -DBUILD_UNIT_TESTS=off + -DBUILD_WITH_OPENMP=off + -DBUILD_SHARED_LIBS=${BUILD_SHARED} + OPTIONS_DEBUG + "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/realsense2) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/librealsense2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/librealsense2/COPYING ${CURRENT_PACKAGES_DIR}/share/librealsense2/copyright) + +vcpkg_copy_pdbs() + -- cgit v1.2.3 From e2b2f49dc6a90d9ff0a3e6dad2d67ab3ed800e0a Mon Sep 17 00:00:00 2001 From: jasjuang Date: Mon, 6 Nov 2017 22:05:04 -0800 Subject: [libpng] use vcpkg_from_github --- ports/libpng/CONTROL | 2 +- ports/libpng/portfile.cmake | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index b5f59e6cf..89ea07065 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.34-1 +Version: 1.6.34-2 Build-Depends: zlib 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 3b154506c..fe4fb7250 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -1,14 +1,13 @@ include(vcpkg_common_functions) -set(LIBPNG_VERSION 1.6.34) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libpng-${LIBPNG_VERSION}) - -vcpkg_download_distfile(ARCHIVE - URLS "https://downloads.sourceforge.net/project/libpng/libpng16/${LIBPNG_VERSION}/libpng-${LIBPNG_VERSION}.tar.xz" - "https://downloads.sourceforge.net/project/libpng/libpng16/older-releases/${LIBPNG_VERSION}/libpng-${LIBPNG_VERSION}.tar.xz" - FILENAME "libpng-${LIBPNG_VERSION}.tar.xz" - SHA512 89407c5abc1623faaa3992fc1e4a62def671d9a7401108dfceee895d5f16fe7030090bea89b34a36d377d8e6a5d40046886991f663ce075d1a2d31bf9eaf3c51 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO glennrp/libpng + REF v1.6.34 + SHA512 23b6112a1d16a34c8037d5c5812944d4385fc96ed819a22172776bdd5acd3a34e55f073b46087b77d1c12cecc68f9e8ba7754c86b5ab6ed3016063e1c795de7a + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) + vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES -- cgit v1.2.3 From 9d2f9739ae42425b25a685f04570590371b6e9bf Mon Sep 17 00:00:00 2001 From: kypp Date: Mon, 6 Nov 2017 09:56:24 +0100 Subject: new port: blosc --- ports/blosc/CONTROL | 4 +++ ports/blosc/portfile.cmake | 54 ++++++++++++++++++++++++++++++++++++ ports/blosc/static-install-fix.patch | 15 ++++++++++ 3 files changed, 73 insertions(+) create mode 100644 ports/blosc/CONTROL create mode 100644 ports/blosc/portfile.cmake create mode 100644 ports/blosc/static-install-fix.patch diff --git a/ports/blosc/CONTROL b/ports/blosc/CONTROL new file mode 100644 index 000000000..8f072f480 --- /dev/null +++ b/ports/blosc/CONTROL @@ -0,0 +1,4 @@ +Source: blosc +Version: 1.12.1 +Build-Depends: lz4, snappy, zlib, zstd +Description: A blocking, shuffling and loss-less compression library that can be faster than `memcpy()` diff --git a/ports/blosc/portfile.cmake b/ports/blosc/portfile.cmake new file mode 100644 index 000000000..98e2b4f82 --- /dev/null +++ b/ports/blosc/portfile.cmake @@ -0,0 +1,54 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Blosc/c-blosc + REF v1.12.1 + SHA512 f65bbbfce6fc59d0c5a0889d5771dd78cae2796244c6ee69edf15b27c4563c28ce789fded9104a8626d12be3e46418d596dfdb204c43e33abae8dca40debfd92 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/static-install-fix.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BLOSC_STATIC ON) + set(BLOSC_SHARED OFF) +else() + set(BLOSC_STATIC OFF) + set(BLOSC_SHARED ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DPREFER_EXTERNAL_LZ4=ON + -DPREFER_EXTERNAL_SNAPPY=ON + -DPREFER_EXTERNAL_ZLIB=ON + -DPREFER_EXTERNAL_ZSTD=ON + -DBUILD_TESTS=OFF + -DBUILD_BENCHMARKS=OFF + -DBUILD_STATIC=${BLOSC_STATIC} + -DBUILD_SHARED=${BLOSC_SHARED} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if (BLOSC_SHARED) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/blosc.dll ${CURRENT_PACKAGES_DIR}/debug/bin/blosc.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/blosc.dll ${CURRENT_PACKAGES_DIR}/bin/blosc.dll) +endif() + +# cleanup +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSES/BLOSC.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/blosc RENAME copyright) + diff --git a/ports/blosc/static-install-fix.patch b/ports/blosc/static-install-fix.patch new file mode 100644 index 000000000..3416bde57 --- /dev/null +++ b/ports/blosc/static-install-fix.patch @@ -0,0 +1,15 @@ +diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt +index cd163f4..8cb1bdb 100644 +--- a/blosc/CMakeLists.txt ++++ b/blosc/CMakeLists.txt +@@ -211,7 +211,9 @@ endif(BUILD_STATIC) + # install + if(BLOSC_INSTALL) + install(FILES blosc.h blosc-export.h DESTINATION include COMPONENT DEV) +- install(TARGETS blosc_shared DESTINATION ${lib_dir} COMPONENT LIB) ++ if(BUILD_SHARED) ++ install(TARGETS blosc_shared DESTINATION ${lib_dir} COMPONENT LIB) ++ endif(BUILD_SHARED) + if(BUILD_STATIC) + install(TARGETS blosc_static DESTINATION ${lib_dir} COMPONENT DEV) + endif(BUILD_STATIC) -- cgit v1.2.3 From d43676658ac120cb9a0ce3df6a62e9ee0c3c4843 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 7 Nov 2017 09:06:54 -0800 Subject: [vcpkg_from_github] Handle '/' in REFs. Fixes #2141. --- scripts/cmake/vcpkg_from_github.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index 1ede43fd8..5730ce39a 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -101,19 +101,22 @@ function(vcpkg_from_github) message(FATAL_ERROR "Package does not specify REF. It must built using --head.") endif() + string(REPLACE "/" "-" SANITIZED_REF "${_vdud_REF}") + vcpkg_download_distfile(ARCHIVE URLS "https://github.com/${ORG_NAME}/${REPO_NAME}/archive/${_vdud_REF}.tar.gz" SHA512 "${_vdud_SHA512}" - FILENAME "${ORG_NAME}-${REPO_NAME}-${_vdud_REF}.tar.gz" + FILENAME "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}.tar.gz" ) vcpkg_extract_source_archive_ex(ARCHIVE "${ARCHIVE}") - set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src ${_vdud_REF}) + set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src ${SANITIZED_REF}) return() endif() # The following is for --head scenarios set(URL "https://github.com/${ORG_NAME}/${REPO_NAME}/archive/${_vdud_HEAD_REF}.tar.gz") - set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${_vdud_HEAD_REF}.tar.gz") + string(REPLACE "/" "-" SANITIZED_HEAD_REF "${_vdud_HEAD_REF}") + set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${SANITIZED_HEAD_REF}.tar.gz") set(downloaded_file_path "${DOWNLOADS}/${downloaded_file_name}") if(_VCPKG_NO_DOWNLOADS) @@ -161,5 +164,5 @@ function(vcpkg_from_github) # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) - set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/head ${_vdud_HEAD_REF}) + set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/head ${SANITIZED_HEAD_REF}) endfunction() -- cgit v1.2.3 From e58f3ed58e5d937a9c805c93f81d7715ebf29499 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Tue, 7 Nov 2017 20:15:17 +0300 Subject: [jasper] update to 2.0.14, fix UWP --- ports/jasper/CONTROL | 2 +- ports/jasper/jasper-fix-uwp.patch | 32 ++++++++++++++++++++++++++++++++ ports/jasper/portfile.cmake | 35 +++++++++++++++++++---------------- 3 files changed, 52 insertions(+), 17 deletions(-) create mode 100644 ports/jasper/jasper-fix-uwp.patch diff --git a/ports/jasper/CONTROL b/ports/jasper/CONTROL index 70f3eda3c..ede42e377 100644 --- a/ports/jasper/CONTROL +++ b/ports/jasper/CONTROL @@ -1,4 +1,4 @@ Source: jasper -Version: 2.0.13-1 +Version: 2.0.14-1 Description: Open source implementation of the JPEG-2000 Part-1 standard Build-Depends: libjpeg-turbo diff --git a/ports/jasper/jasper-fix-uwp.patch b/ports/jasper/jasper-fix-uwp.patch new file mode 100644 index 000000000..2b67d6c93 --- /dev/null +++ b/ports/jasper/jasper-fix-uwp.patch @@ -0,0 +1,32 @@ +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/portfile.cmake b/ports/jasper/portfile.cmake index fa2b415a7..ee73c8cbd 100644 --- a/ports/jasper/portfile.cmake +++ b/ports/jasper/portfile.cmake @@ -1,13 +1,22 @@ include(vcpkg_common_functions) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mdadams/jasper - REF version-2.0.13 - SHA512 8c09a7b773e739a2594cd1002fe66f79ea4336f7de7c97267ab976c06ba075468a7f3c8731dff13a98221cd11d3f2bf8dcddb3fc2c2fc7d7c5ba402bcd3f9fd8 + REF version-2.0.14 + SHA512 6b270cb1eb55f777f30016f3258e5e2297627e7d086334814c308464f5a4552c23241b0fdbc81ea715a6f4746294657f96c1cb6ceb320629ce57db7e81d84940 HEAD_REF master) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(JASPER_LINKAGE -DJAS_ENABLE_SHARED=OFF) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/jasper-fix-uwp.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(JAS_ENABLE_SHARED ON) +else() + set(JAS_ENABLE_SHARED OFF) endif() vcpkg_configure_cmake( @@ -18,24 +27,18 @@ vcpkg_configure_cmake( -DJAS_ENABLE_LIBJPEG=ON -DJAS_ENABLE_OPENGL=OFF # not needed for the library -DJAS_ENABLE_DOC=OFF - ${JASPER_LINKAGE}) + -DJAS_ENABLE_PROGRAMS=OFF + -DJAS_ENABLE_SHARED=${JAS_ENABLE_SHARED} +) vcpkg_install_cmake() +vcpkg_copy_pdbs() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -else() - file(GLOB EXECS ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) - file(REMOVE ${EXECS}) -endif() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -vcpkg_copy_pdbs() +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) -- cgit v1.2.3 From 0365de8b26bbac41fbe53e1296eff6ac8df06a41 Mon Sep 17 00:00:00 2001 From: James Chang Date: Wed, 8 Nov 2017 09:29:27 +0800 Subject: comment on the reason to disable OpenMP --- ports/librealsense2/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/librealsense2/portfile.cmake b/ports/librealsense2/portfile.cmake index 09cc5706b..ac4c40e95 100644 --- a/ports/librealsense2/portfile.cmake +++ b/ports/librealsense2/portfile.cmake @@ -28,7 +28,7 @@ vcpkg_configure_cmake( -DBUILD_GRAPHICAL_EXAMPLES=off -DBUILD_PYTHON_BINDINGS=off -DBUILD_UNIT_TESTS=off - -DBUILD_WITH_OPENMP=off + -DBUILD_WITH_OPENMP=off # keep OpenMP off until librealsense issue #744 is patched -DBUILD_SHARED_LIBS=${BUILD_SHARED} OPTIONS_DEBUG "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" -- cgit v1.2.3 From 44a469aa3e2f461a43ea53955402fd547ce9d00b Mon Sep 17 00:00:00 2001 From: Chris Bond Date: Tue, 7 Nov 2017 17:11:31 -0800 Subject: updated control and port file for latest version of sqlite-modern-cpp --- ports/sqlite-modern-cpp/CONTROL | 2 +- ports/sqlite-modern-cpp/portfile.cmake | 16 +++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/ports/sqlite-modern-cpp/CONTROL b/ports/sqlite-modern-cpp/CONTROL index 641b3229c..a70a64a21 100644 --- a/ports/sqlite-modern-cpp/CONTROL +++ b/ports/sqlite-modern-cpp/CONTROL @@ -1,4 +1,4 @@ Source: sqlite-modern-cpp -Version: 2.4 +Version: 3.2 Build-Depends: sqlite3 Description: The C++14 wrapper around sqlite library diff --git a/ports/sqlite-modern-cpp/portfile.cmake b/ports/sqlite-modern-cpp/portfile.cmake index 3171b5550..7d6c20308 100644 --- a/ports/sqlite-modern-cpp/portfile.cmake +++ b/ports/sqlite-modern-cpp/portfile.cmake @@ -1,20 +1,14 @@ # header only include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite_modern_cpp-2.4) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite_modern_cpp-3.2) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/aminroosta/sqlite_modern_cpp/archive/v2.4.tar.gz" - FILENAME "sqlite_modern_cpp-2.4.tar.gz" - SHA512 99d8220c9dcbf7383c75ef8061bc792a4ea0b7e6e1290992f1604f66e77fcb5055af8c54c2d82b6a8d331359e2829d987b7528208f032f32699e1349296792db + URLS "https://github.com/aminroosta/sqlite_modern_cpp/archive/v3.2.tar.gz" + FILENAME "sqlite_modern_cpp-3.2.tar.gz" + SHA512 7e54cc41713247c9f6373a441854e8dace8e334e6ee29f870f11bc3fd3b53b5cff4e1a6d4c7e3cda33509b70a3f9a47363922a589b9a6d0730ce6dc0c884d878 ) vcpkg_extract_source_archive(${ARCHIVE}) file(INSTALL ${SOURCE_PATH}/hdr/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) -# Handle copyright -vcpkg_download_distfile(LICENSE - URLS https://raw.githubusercontent.com/aminroosta/sqlite_modern_cpp/1d7747fcbb16325ec6673477b06f0c780de24a27/License.txt - FILENAME "sqlite_modern_cpp-2.4-license-mit.txt" - SHA512 4ffc41d14902b37841463b9e9274537cb48523a7ab7e5fbbbd14a01820d141e367851b0496aa18546ddab96100e7381db7fc35621c795a97c3290b618e18a8bd -) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/sqlite-modern-cpp) -file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlite-modern-cpp RENAME copyright) +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlite-modern-cpp RENAME copyright) -- cgit v1.2.3 From acad35f493231baff5406d04c562a89deaad5e16 Mon Sep 17 00:00:00 2001 From: Rodrigo Hernandez Date: Wed, 8 Nov 2017 00:08:05 -0600 Subject: [tidy-html5] Added libtidy version 5.4.0 --- ports/tidy-html5/CONTROL | 3 + ports/tidy-html5/portfile.cmake | 27 +++++++ .../remove_execution_character_set.patch | 90 ++++++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 ports/tidy-html5/CONTROL create mode 100644 ports/tidy-html5/portfile.cmake create mode 100644 ports/tidy-html5/remove_execution_character_set.patch diff --git a/ports/tidy-html5/CONTROL b/ports/tidy-html5/CONTROL new file mode 100644 index 000000000..9f415ab7a --- /dev/null +++ b/ports/tidy-html5/CONTROL @@ -0,0 +1,3 @@ +Source: tidy-html5 +Version: 5.4.0 +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 new file mode 100644 index 000000000..ff0c2e545 --- /dev/null +++ b/ports/tidy-html5/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO htacg/tidy-html5 + REF 5.4.0 + SHA512 d92c89f2ef371499f9c3de6f9389783d2449433b4da1f5a29e2eb81b7a7db8dd9f68e220cdde092d446e9bd779bcbc30f84bda79013526540f29d00f438cb402 + HEAD_REF master) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/remove_execution_character_set.patch +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DBUILD_SHARED_LIB=ON -DTIDY_CONSOLE_SHARED=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/tidyd.exe) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tidy.exe ${CURRENT_PACKAGES_DIR}/tools/tidy.exe) +file(INSTALL ${SOURCE_PATH}/README/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tidy-html5 RENAME copyright) diff --git a/ports/tidy-html5/remove_execution_character_set.patch b/ports/tidy-html5/remove_execution_character_set.patch new file mode 100644 index 000000000..9f5ebf3e7 --- /dev/null +++ b/ports/tidy-html5/remove_execution_character_set.patch @@ -0,0 +1,90 @@ +diff --git a/src/language_en.h b/src/language_en.h +index ab191e0..e1cd96b 100644 +--- a/src/language_en.h ++++ b/src/language_en.h +@@ -18,10 +18,6 @@ + * Created by Jim Derry on 11/28/15. + */ + +-#ifdef _MSC_VER +-#pragma execution_character_set("utf-8") +-#endif +- + #include "language.h" + #include "access.h" + #include "message.h" +diff --git a/src/language_en_gb.h b/src/language_en_gb.h +index a89f0fe..7b14d6f 100644 +--- a/src/language_en_gb.h ++++ b/src/language_en_gb.h +@@ -31,10 +31,6 @@ + * PO_REVISION_DATE=2016-03-24 10:59:55 + */ + +-#ifdef _MSC_VER +-#pragma execution_character_set("utf-8") +-#endif +- + #include "language.h" + #include "access.h" + #include "message.h" +diff --git a/src/language_es.h b/src/language_es.h +index db09f2a..1e474b5 100644 +--- a/src/language_es.h ++++ b/src/language_es.h +@@ -31,10 +31,6 @@ + * PO_REVISION_DATE=2016-03-24 10:59:55 + */ + +-#ifdef _MSC_VER +-#pragma execution_character_set("utf-8") +-#endif +- + #include "language.h" + #include "access.h" + #include "message.h" +diff --git a/src/language_es_mx.h b/src/language_es_mx.h +index 5574b3b..530c9f1 100644 +--- a/src/language_es_mx.h ++++ b/src/language_es_mx.h +@@ -31,10 +31,6 @@ + * PO_REVISION_DATE=2016-03-24 10:59:55 + */ + +-#ifdef _MSC_VER +-#pragma execution_character_set("utf-8") +-#endif +- + #include "language.h" + #include "access.h" + #include "message.h" +diff --git a/src/language_fr.h b/src/language_fr.h +index c87ae7b..91baa5e 100644 +--- a/src/language_fr.h ++++ b/src/language_fr.h +@@ -31,10 +31,6 @@ + * PO_REVISION_DATE= + */ + +-#ifdef _MSC_VER +-#pragma execution_character_set("utf-8") +-#endif +- + #include "language.h" + #include "access.h" + #include "message.h" +diff --git a/src/language_zh_cn.h b/src/language_zh_cn.h +index 1c35fef..218203d 100644 +--- a/src/language_zh_cn.h ++++ b/src/language_zh_cn.h +@@ -31,10 +31,6 @@ + * PO_REVISION_DATE=2016-03-24 10:59:55 + */ + +-#ifdef _MSC_VER +-#pragma execution_character_set("utf-8") +-#endif +- + #include "language.h" + #include "access.h" + #include "message.h" -- cgit v1.2.3 From d0ac8b489825e2f4dd3da76c442f18debd2f8161 Mon Sep 17 00:00:00 2001 From: James Chang Date: Wed, 8 Nov 2017 14:37:16 +0800 Subject: [realsense2] renaming the port --- ports/librealsense2/CONTROL | 3 -- ports/librealsense2/crt-linkage-restriction.patch | 19 --------- ports/librealsense2/portfile.cmake | 47 ----------------------- ports/realsense2/CONTROL | 3 ++ ports/realsense2/crt-linkage-restriction.patch | 19 +++++++++ ports/realsense2/portfile.cmake | 43 +++++++++++++++++++++ 6 files changed, 65 insertions(+), 69 deletions(-) delete mode 100644 ports/librealsense2/CONTROL delete mode 100644 ports/librealsense2/crt-linkage-restriction.patch delete mode 100644 ports/librealsense2/portfile.cmake create mode 100644 ports/realsense2/CONTROL create mode 100644 ports/realsense2/crt-linkage-restriction.patch create mode 100644 ports/realsense2/portfile.cmake diff --git a/ports/librealsense2/CONTROL b/ports/librealsense2/CONTROL deleted file mode 100644 index 312c7b145..000000000 --- a/ports/librealsense2/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: librealsense2 -Version: 2.8.1 -Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). diff --git a/ports/librealsense2/crt-linkage-restriction.patch b/ports/librealsense2/crt-linkage-restriction.patch deleted file mode 100644 index ae4acc834..000000000 --- a/ports/librealsense2/crt-linkage-restriction.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/CMakeLists.txt 2017-11-07 14:30:02.270145100 +0800 -+++ b/CMakeLists.txt 2017-11-07 14:26:42.306208800 +0800 -@@ -402,16 +402,6 @@ - source_group("Header Files\\Processing Blocks" FILES - src/colorizer.h - ) -- -- foreach(flag_var -- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE -- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO -- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE -- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) -- if(${flag_var} MATCHES "/MD") -- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") -- endif(${flag_var} MATCHES "/MD") -- endforeach(flag_var) - else() - - endif() diff --git a/ports/librealsense2/portfile.cmake b/ports/librealsense2/portfile.cmake deleted file mode 100644 index ac4c40e95..000000000 --- a/ports/librealsense2/portfile.cmake +++ /dev/null @@ -1,47 +0,0 @@ -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO IntelRealSense/librealsense - REF v2.8.1 - SHA512 af6ae166ef0879d4da434cebea95358a4c3907bd71913577008a21717a9e45400a6eafffe5ddbf9cc50bd939d4dae0863e2f34b7ee76de276fedc68117a21e71 - HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/crt-linkage-restriction.patch -) - -if(${VCPKG_LIBRARY_LINKAGE} STREQUAL static) - set(BUILD_SHARED off) -else() - set(BUILD_SHARED on) -endif() - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DENFORCE_METADATA=on - -DBUILD_EXAMPLES=off - -DBUILD_GRAPHICAL_EXAMPLES=off - -DBUILD_PYTHON_BINDINGS=off - -DBUILD_UNIT_TESTS=off - -DBUILD_WITH_OPENMP=off # keep OpenMP off until librealsense issue #744 is patched - -DBUILD_SHARED_LIBS=${BUILD_SHARED} - OPTIONS_DEBUG - "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" -) - -vcpkg_install_cmake() - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/realsense2) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/librealsense2) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/librealsense2/COPYING ${CURRENT_PACKAGES_DIR}/share/librealsense2/copyright) - -vcpkg_copy_pdbs() - diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL new file mode 100644 index 000000000..a57375819 --- /dev/null +++ b/ports/realsense2/CONTROL @@ -0,0 +1,3 @@ +Source: realsense2 +Version: 2.8.1 +Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). diff --git a/ports/realsense2/crt-linkage-restriction.patch b/ports/realsense2/crt-linkage-restriction.patch new file mode 100644 index 000000000..ae4acc834 --- /dev/null +++ b/ports/realsense2/crt-linkage-restriction.patch @@ -0,0 +1,19 @@ +--- a/CMakeLists.txt 2017-11-07 14:30:02.270145100 +0800 ++++ b/CMakeLists.txt 2017-11-07 14:26:42.306208800 +0800 +@@ -402,16 +402,6 @@ + source_group("Header Files\\Processing Blocks" FILES + src/colorizer.h + ) +- +- foreach(flag_var +- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE +- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO +- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE +- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) +- if(${flag_var} MATCHES "/MD") +- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") +- endif(${flag_var} MATCHES "/MD") +- endforeach(flag_var) + else() + + endif() diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake new file mode 100644 index 000000000..522bd7252 --- /dev/null +++ b/ports/realsense2/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO IntelRealSense/librealsense + REF v2.8.1 + SHA512 af6ae166ef0879d4da434cebea95358a4c3907bd71913577008a21717a9e45400a6eafffe5ddbf9cc50bd939d4dae0863e2f34b7ee76de276fedc68117a21e71 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/crt-linkage-restriction.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DENFORCE_METADATA=on + -DBUILD_EXAMPLES=off + -DBUILD_GRAPHICAL_EXAMPLES=off + -DBUILD_PYTHON_BINDINGS=off + -DBUILD_UNIT_TESTS=off + -DBUILD_WITH_OPENMP=off # keep OpenMP off until librealsense issue #744 is patched + -DBUILD_SHARED_LIBS=${BUILD_SHARED} + OPTIONS_DEBUG + "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/realsense2) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/realsense2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/realsense2/COPYING ${CURRENT_PACKAGES_DIR}/share/realsense2/copyright) + +vcpkg_copy_pdbs() + -- cgit v1.2.3 From 9ea963dcec629b03994cf21e78b152efc3e2c0b0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 8 Nov 2017 02:36:55 -0800 Subject: [catch] Fix hashes and download urls. Resolves #2151 --- ports/catch/CONTROL | 2 +- ports/catch/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/catch/CONTROL b/ports/catch/CONTROL index bab18cb67..2975af555 100644 --- a/ports/catch/CONTROL +++ b/ports/catch/CONTROL @@ -1,3 +1,3 @@ Source: catch -Version: 2.0.1 +Version: 2.0.1-1 Description: C++ Automated Test Cases in Headers diff --git a/ports/catch/portfile.cmake b/ports/catch/portfile.cmake index c6b96e995..a1c5033cf 100644 --- a/ports/catch/portfile.cmake +++ b/ports/catch/portfile.cmake @@ -3,15 +3,15 @@ include(vcpkg_common_functions) set(CATCH_VERSION v2.0.1) vcpkg_download_distfile(HEADER - URLS "https://github.com/philsquared/Catch/releases/download/${CATCH_VERSION}/catch.hpp" + URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-${CATCH_VERSION}.hpp" - SHA512 421a913e9c1671ef32833ec82c1889de69f74b80241708702873e54d804b1f7a3814ff01a34b945242e92d8a63cd668b0eb7f335b7fed352ef94679ad5295c0e + SHA512 e5e58c3a190cb0e848e19e885037e88e1b864e017f42b1306569850436c1c691b65640759d467061486931e7465a2b906fdd9e5208911b660fd960bf718305b4 ) vcpkg_download_distfile(LICENSE - URLS "https://raw.githubusercontent.com/philsquared/Catch/${CATCH_VERSION}/LICENSE.txt" + URLS "https://raw.githubusercontent.com/catchorg/Catch2/${CATCH_VERSION}/LICENSE.txt" FILENAME "catch-LICENSE-${CATCH_VERSION}.txt" - SHA512 f1a8d21ccbb6436d289ecfae65b9019278e40552a2383aaf6c1dfed98affe6e7bbf364d67597a131642b62446a0c40495e66a7efca7e6dff72727c6fd3776407 + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 ) file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME catch.hpp) -- cgit v1.2.3 From 68bfea163aaa59d59e9e45954fa1777028c7f770 Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Wed, 8 Nov 2017 14:55:46 +0100 Subject: rename freeglut_static.lib for compatibility with FindGLUT.cmake --- ports/freeglut/CONTROL | 2 +- ports/freeglut/portfile.cmake | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ports/freeglut/CONTROL b/ports/freeglut/CONTROL index 82f0dc1f1..d7c3801f7 100644 --- a/ports/freeglut/CONTROL +++ b/ports/freeglut/CONTROL @@ -1,3 +1,3 @@ Source: freeglut -Version: 3.0.0-2 +Version: 3.0.0-3 Description: Open source implementation of GLUT with source and binary backwards compatibility. diff --git a/ports/freeglut/portfile.cmake b/ports/freeglut/portfile.cmake index c2d1f2816..33861a7eb 100644 --- a/ports/freeglut/portfile.cmake +++ b/ports/freeglut/portfile.cmake @@ -35,11 +35,17 @@ vcpkg_install_cmake() # Patch header file(READ ${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h FREEGLUT_STDH) string(REPLACE "pragma comment (lib, \"freeglut_staticd.lib\")" - "pragma comment (lib, \"freeglut_static.lib\")" FREEGLUT_STDH "${FREEGLUT_STDH}") + "pragma comment (lib, \"freeglut.lib\")" FREEGLUT_STDH "${FREEGLUT_STDH}") string(REPLACE "pragma comment (lib, \"freeglutd.lib\")" "pragma comment (lib, \"freeglut.lib\")" FREEGLUT_STDH "${FREEGLUT_STDH}") file(WRITE ${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h "${FREEGLUT_STDH}") +# Rename static lib (otherwise it's incompatible with FindGLUT.cmake) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/lib/freeglut.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut.lib) +endif() + # Clean file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 3e36c7bc7f3929c0a5ddbc4de91ed660461a4532 Mon Sep 17 00:00:00 2001 From: LazyHamster Date: Wed, 8 Nov 2017 17:50:49 +0300 Subject: [ogre] Reincarnation of cmake install dir patch. Updated version to 1.10.9. --- ports/ogre/001-cmake-install-dir.patch | 46 ++++++++++++++++++++++++++++++++++ ports/ogre/CONTROL | 2 +- ports/ogre/portfile.cmake | 21 ++++++++++------ 3 files changed, 60 insertions(+), 9 deletions(-) create mode 100644 ports/ogre/001-cmake-install-dir.patch diff --git a/ports/ogre/001-cmake-install-dir.patch b/ports/ogre/001-cmake-install-dir.patch new file mode 100644 index 000000000..cf73bc977 --- /dev/null +++ b/ports/ogre/001-cmake-install-dir.patch @@ -0,0 +1,46 @@ +diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt +index 3382de139..404c56e5e 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 +diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake +index 0181259e2..346188c73 100644 +--- a/CMake/InstallResources.cmake ++++ b/CMake/InstallResources.cmake +@@ -245,12 +245,14 @@ endif () + # Create the CMake package files + include(CMakePackageConfigHelpers) + +-if (WIN32) +- set(OGRE_CMAKE_DIR CMake) +-elseif (UNIX) +- set(OGRE_CMAKE_DIR lib/OGRE/cmake) +-elseif (APPLE) +-endif () ++if (NOT DEFINED OGRE_CMAKE_DIR) ++ if (WIN32) ++ set(OGRE_CMAKE_DIR CMake) ++ elseif (UNIX) ++ set(OGRE_CMAKE_DIR lib/OGRE/cmake) ++ elseif (APPLE) ++ endif () ++endif() + configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${OGRE_BINARY_DIR}/cmake/OGREConfig.cmake + INSTALL_DESTINATION ${OGRE_CMAKE_DIR} + PATH_VARS CMAKE_INSTALL_PREFIX) diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL index 98d68abf0..1716ac116 100644 --- a/ports/ogre/CONTROL +++ b/ports/ogre/CONTROL @@ -1,5 +1,5 @@ Source: ogre -Version: 1.10.8 +Version: 1.10.9 Build-Depends: freeimage, freetype, zlib, zziplib Description: 3D Object-Oriented Graphics Rendering Engine diff --git a/ports/ogre/portfile.cmake b/ports/ogre/portfile.cmake index 9c380f79e..9ee84f82c 100644 --- a/ports/ogre/portfile.cmake +++ b/ports/ogre/portfile.cmake @@ -1,15 +1,21 @@ include(vcpkg_common_functions) -set(OGRE_VERSION 1.10.8) +set(OGRE_VERSION 1.10.9) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ogre-${OGRE_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/OGRECave/ogre/archive/v1.10.8.zip" - FILENAME "ogre-1.10.8.zip" - SHA512 c7d962fe7fb8c46a4e15bb6e2bb68c67f0cc2a0d04a8f53e03fb9572c76df3679dcd117137c6624f2f56a8eda108723817dbaa616ecb7dc4cfd6a644a6bc4356 + URLS "https://github.com/OGRECave/ogre/archive/v${OGRE_VERSION}.zip" + FILENAME "ogre-${OGRE_VERSION}.zip" + SHA512 2e68b30da6dc2e1df6575970623a14057675b069536ed0ac87faeefc8e295965ff7427c99385f29ab803b02bd5294f6886293aabdd17ec8c92f80baf53587457 ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/001-cmake-install-dir.patch" +) + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) set(OGRE_STATIC ON) else() @@ -66,18 +72,17 @@ vcpkg_configure_cmake( -DOGRE_BUILD_COMPONENT_JAVA=${WITH_JAVA} -DOGRE_BUILD_COMPONENT_PYTHON=${WITH_PYTHON} -DOGRE_BUILD_RENDERSYSTEM_D3D9=${WITH_D3D9} +# vcpkg specific stuff + -DOGRE_CMAKE_DIR=share/ogre ) vcpkg_install_cmake() # Remove unwanted files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre RENAME copyright) -# Move installed CMake scripts to share folder -file(RENAME ${CURRENT_PACKAGES_DIR}/CMake ${CURRENT_PACKAGES_DIR}/share/ogre/CMake) - vcpkg_copy_pdbs() -- cgit v1.2.3 From 56c74b32f6857429a99385975cc763849995b1ee Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 8 Nov 2017 09:56:34 -0600 Subject: If97 (#2131) * [if97] create CONTROL * [if97] add portfile * [if97] create custom cmakelists * [if97:portfile] copy cmakelists * [if97:portfile] define build_targets * [if97:portfile] fix def * [if97:portfile] fix flag * [if97:portfile] fix header * [if97] remove cmake * [portfile] cleanup * [if97] No need to define SOURCE_PATH --- ports/if97/CONTROL | 3 +++ ports/if97/portfile.cmake | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 ports/if97/CONTROL create mode 100644 ports/if97/portfile.cmake diff --git a/ports/if97/CONTROL b/ports/if97/CONTROL new file mode 100644 index 000000000..7e5bb74fb --- /dev/null +++ b/ports/if97/CONTROL @@ -0,0 +1,3 @@ +Source: if97 +Version: 2.1.0 +Description: This repository implements the IF97 formulation for the properties of pure water substance. diff --git a/ports/if97/portfile.cmake b/ports/if97/portfile.cmake new file mode 100644 index 000000000..043094361 --- /dev/null +++ b/ports/if97/portfile.cmake @@ -0,0 +1,19 @@ +include(vcpkg_common_functions) +set(PORT_VERSION 2.1.0) + +vcpkg_from_github( + OUT_SOURCE_PATH ${SOURCE_PATH} + REPO CoolProp/IF97 + REF v${PORT_VERSION} + SHA512 f8cde0538af395d8d82998bd71f28d89cd5c6fcfdf16410b0630a0f8b59ec86ff8a748b05681e65cbece051db5be6b960b6ea4fc8bce83b4309f46896083164a + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/IF97.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file( + INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/if97 + RENAME copyright +) -- cgit v1.2.3 From 2ece3186ff5cc8b687a22d1a242537a0a6da7420 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 8 Nov 2017 10:41:03 -0800 Subject: [vcpkg-build-msbuild] Update examples. --- docs/maintainers/vcpkg_build_msbuild.md | 4 ++-- scripts/cmake/vcpkg_build_msbuild.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/maintainers/vcpkg_build_msbuild.md b/docs/maintainers/vcpkg_build_msbuild.md index 178964fcd..889b07bdc 100644 --- a/docs/maintainers/vcpkg_build_msbuild.md +++ b/docs/maintainers/vcpkg_build_msbuild.md @@ -52,8 +52,8 @@ Additional options passed to msbuild for Debug builds. These are in addition to ## Examples -* [libuv](https://github.com/Microsoft/vcpkg/blob/master/ports/libuv/portfile.cmake) -* [zeromq](https://github.com/Microsoft/vcpkg/blob/master/ports/zeromq/portfile.cmake) +* [chakracore](https://github.com/Microsoft/vcpkg/blob/master/ports/chakracore/portfile.cmake) +* [cppunit](https://github.com/Microsoft/vcpkg/blob/master/ports/cppunit/portfile.cmake) ## Source [scripts/cmake/vcpkg_build_msbuild.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_msbuild.cmake) diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index 1e3c85ba2..81f442ef7 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -52,8 +52,8 @@ ## ## ## Examples ## -## * [libuv](https://github.com/Microsoft/vcpkg/blob/master/ports/libuv/portfile.cmake) -## * [zeromq](https://github.com/Microsoft/vcpkg/blob/master/ports/zeromq/portfile.cmake) +## * [chakracore](https://github.com/Microsoft/vcpkg/blob/master/ports/chakracore/portfile.cmake) +## * [cppunit](https://github.com/Microsoft/vcpkg/blob/master/ports/cppunit/portfile.cmake) function(vcpkg_build_msbuild) cmake_parse_arguments(_csc "" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" ${ARGN}) -- cgit v1.2.3 From ef48879bd33f4c134907812bcdb3a5a40a30802e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 8 Nov 2017 11:18:21 -0800 Subject: [tidy-html5] Handle static builds. --- ports/tidy-html5/CONTROL | 2 +- ports/tidy-html5/portfile.cmake | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ports/tidy-html5/CONTROL b/ports/tidy-html5/CONTROL index 9f415ab7a..377e47f13 100644 --- a/ports/tidy-html5/CONTROL +++ b/ports/tidy-html5/CONTROL @@ -1,3 +1,3 @@ Source: tidy-html5 -Version: 5.4.0 +Version: 5.4.0-1 Description: Tidy tidies HTML and XML. It can tidy your documents by itself, and developers can easily integrate its features into even more powerful tools. diff --git a/ports/tidy-html5/portfile.cmake b/ports/tidy-html5/portfile.cmake index ff0c2e545..da0ba45ca 100644 --- a/ports/tidy-html5/portfile.cmake +++ b/ports/tidy-html5/portfile.cmake @@ -12,16 +12,29 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/remove_execution_character_set.patch ) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIB) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DBUILD_SHARED_LIB=ON -DTIDY_CONSOLE_SHARED=ON + OPTIONS + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON + -DBUILD_SHARED_LIB=${BUILD_SHARED_LIB} + -DTIDY_CONSOLE_SHARED=${BUILD_SHARED_LIB} ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/tidyd.exe) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tidy.exe ${CURRENT_PACKAGES_DIR}/tools/tidy.exe) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/tidy-html5) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tidy.exe ${CURRENT_PACKAGES_DIR}/tools/tidy-html5/tidy.exe) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(INSTALL ${SOURCE_PATH}/README/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tidy-html5 RENAME copyright) -- cgit v1.2.3 From 00987279d8a3bbcf80df10a854cfd62084fb8de0 Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 8 Nov 2017 13:40:38 -0600 Subject: Refprop headers: add port (#2148) * [refprop] create CONTROL * [refprop-headers] add portfile * [refprop] fix install copyright * fix * fix * [refprop-headers] Minor cleanup --- ports/refprop-headers/CONTROL | 3 +++ ports/refprop-headers/portfile.cmake | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 ports/refprop-headers/CONTROL create mode 100644 ports/refprop-headers/portfile.cmake diff --git a/ports/refprop-headers/CONTROL b/ports/refprop-headers/CONTROL new file mode 100644 index 000000000..00b78cc55 --- /dev/null +++ b/ports/refprop-headers/CONTROL @@ -0,0 +1,3 @@ +Source: refprop-headers +Version: 2017-11-7-882aec454b2bc3d5323b8691736ff09c288f4ed6 +Description: The REFPROP Headers diff --git a/ports/refprop-headers/portfile.cmake b/ports/refprop-headers/portfile.cmake new file mode 100644 index 000000000..c8024d052 --- /dev/null +++ b/ports/refprop-headers/portfile.cmake @@ -0,0 +1,19 @@ +include(vcpkg_common_functions) +set(PORT_COMMIT 882aec454b2bc3d5323b8691736ff09c288f4ed6) + +vcpkg_from_github( + OUT_SOURCE_PATH ${SOURCE_PATH} + REPO CoolProp/REFPROP-headers + REF ${PORT_COMMIT} + SHA512 23ee3df4ffe21b2d790efa27a1b8ea5fa4fce0a274d78e493a2d71043670420e19216f925d23d04f6139ca084a21b97028bd2547f3dbd00ffbb33d0c0bbfece5 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/REFPROP_lib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file( + INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/refprop-headers + RENAME copyright +) -- cgit v1.2.3 From 1297e256deb6021d7a8d78a852c06c23f72e89e7 Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 8 Nov 2017 16:22:11 -0600 Subject: Add Coolprop (#2129) --- ports/coolprop/CONTROL | 4 ++ ports/coolprop/portfile.cmake | 111 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 ports/coolprop/CONTROL create mode 100644 ports/coolprop/portfile.cmake diff --git a/ports/coolprop/CONTROL b/ports/coolprop/CONTROL new file mode 100644 index 000000000..22ccaba2c --- /dev/null +++ b/ports/coolprop/CONTROL @@ -0,0 +1,4 @@ +Source: coolprop +Version: 6.1.0-1 +Description: Thermophysical properties for the masses +Build-Depends: catch, eigen3, pybind11, if97, fmt, rapidjson, msgpack, refprop-headers diff --git a/ports/coolprop/portfile.cmake b/ports/coolprop/portfile.cmake new file mode 100644 index 000000000..9e0c2274e --- /dev/null +++ b/ports/coolprop/portfile.cmake @@ -0,0 +1,111 @@ +include(vcpkg_common_functions) +set(PORT_VERSION 6.1.0) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CoolProp/CoolProp + REF 0e934e842e9ce83eea64fda1d4ab8e59adf9d8cd + SHA512 a44eafc84f2b88259d7bcf6cfa81daeb81ea9d55bd356e59b3ef77b6f68ea405961c7cb54ba899e3896bb2a02d3e01119a4a51f72899126c8da6081fa2ece948 + HEAD_REF master +) + +# Patch up the file locations +file(COPY + ${CURRENT_INSTALLED_DIR}/include/catch.hpp + DESTINATION ${SOURCE_PATH}/externals/Catch/single_include +) + +file(COPY + ${CURRENT_INSTALLED_DIR}/include/rapidjson + DESTINATION ${SOURCE_PATH}/externals/rapidjson/include +) + +file(COPY + ${CURRENT_INSTALLED_DIR}/include/IF97.h + DESTINATION ${SOURCE_PATH}/externals/IF97 +) + +file(COPY + ${CURRENT_INSTALLED_DIR}/include + DESTINATION ${SOURCE_PATH}/externals/msgpack-c +) + +file(COPY + ${CURRENT_INSTALLED_DIR}/include/REFPROP_lib.h + DESTINATION ${SOURCE_PATH}/externals/REFPROP-headers/ +) + +# Use a nasty hack to include the correct header +file(APPEND + ${SOURCE_PATH}/externals/msgpack-c/include/fmt/format.h + "#include \"fmt/printf.h\"" +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" COOLPROP_SHARED_LIBRARY) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" COOLPROP_STATIC_LIBRARY) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" COOLPROP_MSVC_DYNAMIC) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" COOLPROP_MSVC_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCOOLPROP_SHARED_LIBRARY=${COOLPROP_SHARED_LIBRARY} + -DCOOLPROP_STATIC_LIBRARY=${COOLPROP_STATIC_LIBRARY} + -DCOOLPROP_MSVC_DYNAMIC=${COOLPROP_MSVC_DYNAMIC} + -DCOOLPROP_MSVC_STATIC=${COOLPROP_MSVC_STATIC} + OPTIONS_RELEASE + -DCOOLPROP_RELEASE=ON + OPTIONS_DEBUG + -DCOOLPROP_DEBUG=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") + set(TARGET_FOLDER "shared_library") +else() + set(TARGET_FOLDER "static_library") +endif() + +# Install the headers +file(GLOB COOLPROP_HEADERS "${SOURCE_PATH}/install_root/${TARGET_FOLDER}/*.h") +file(INSTALL ${COOLPROP_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Install the libs +set(TARGET_FOLDER ${TARGET_FOLDER}/Windows) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(BITS 32bit) +else() + set(BITS 64bit) +endif() + +file(INSTALL + "${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolProp.lib" + DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + "${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolPropd.lib" + DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +file(INSTALL + "${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolProp.dll" + DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) + +file(INSTALL + "${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolPropd.dll" + DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file( + INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/coolprop + RENAME copyright +) -- cgit v1.2.3 From bb47f71bf373a61b95c604eab80d636c70605ef4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 8 Nov 2017 15:33:01 -0800 Subject: [hdf5] Switch to using `vcpkg_fixup_cmake_targets()` --- ports/hdf5/portfile.cmake | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/ports/hdf5/portfile.cmake b/ports/hdf5/portfile.cmake index 9801ec44a..d9682b0f7 100644 --- a/ports/hdf5/portfile.cmake +++ b/ports/hdf5/portfile.cmake @@ -1,19 +1,4 @@ -# 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) -# set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hdf5-1.8.18) -# vcpkg_download_distfile(ARCHIVE -# URLS "https://support.hdfgroup.org/ftp/HDF5/current18/src/hdf5-1.8.18.tar.bz2" -# FILENAME "hdf5-1.8.18.tar.bz2" -# SHA512 01f6d14bdd3be2ced9c63cc9e1820cd7ea11db649ff9f3a3055c18c4b0fffe777fd23baad536e3bce31c4d76fe17db64a3972762e1bb4d232927c1ca140e72b2 -# ) -# vcpkg_extract_source_archive(${ARCHIVE}) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CMake-hdf5-1.10.0-patch1/hdf5-1.10.0-patch1) vcpkg_download_distfile(ARCHIVE URLS "http://hdf4.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0-patch1/src/CMake-hdf5-1.10.0-patch1.zip" @@ -30,10 +15,7 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/link-libraries-private.patch ) -set(DISABLE_STATIC_LIBS OFF) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(DISABLE_STATIC_LIBS ON) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DISABLE_STATIC_LIBS) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -57,9 +39,7 @@ vcpkg_copy_pdbs() file(RENAME ${CURRENT_PACKAGES_DIR}/share/hdf5/data/COPYING ${CURRENT_PACKAGES_DIR}/share/hdf5/copyright) -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/hdf5/hdf5-targets-debug.cmake HDF5_TARGETS_DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" HDF5_TARGETS_DEBUG_MODULE "${HDF5_TARGETS_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-targets-debug.cmake "${HDF5_TARGETS_DEBUG_MODULE}") +vcpkg_fixup_cmake_targets(CONFIG_PATH share/hdf5) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 087dc9410c95c42b38f64d5caa173905f5fa6089 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 8 Nov 2017 15:33:29 -0800 Subject: [vtk] Fix builds, including static against HDF5. --- ports/vtk/CONTROL | 2 +- ports/vtk/FindHDF5.cmake | 27 +++++++++++++++++++++++++++ ports/vtk/portfile.cmake | 12 ++---------- 3 files changed, 30 insertions(+), 11 deletions(-) create mode 100644 ports/vtk/FindHDF5.cmake diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 2ef7ffeca..7cd91a985 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,5 +1,5 @@ Source: vtk -Version: 8.0.1-2 +Version: 8.0.1-3 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora diff --git a/ports/vtk/FindHDF5.cmake b/ports/vtk/FindHDF5.cmake new file mode 100644 index 000000000..55d007006 --- /dev/null +++ b/ports/vtk/FindHDF5.cmake @@ -0,0 +1,27 @@ +find_package(HDF5 NO_MODULE REQUIRED) + +set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) + +add_library(vtk::hdf5::hdf5 INTERFACE IMPORTED GLOBAL) +if(TARGET hdf5-static) + set_target_properties(vtk::hdf5::hdf5 PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5-static") +elseif(TARGET hdf5-shared) + set_target_properties(vtk::hdf5::hdf5 PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5-shared") +else() + message(FATAL_ERROR "could not find target hdf5-*") +endif() + +add_library(vtk::hdf5::hdf5_hl INTERFACE IMPORTED GLOBAL) +if(TARGET hdf5_hl-static) + set_target_properties(vtk::hdf5::hdf5_hl PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5_hl-static") +elseif(TARGET hdf5_hl-shared) + set_target_properties(vtk::hdf5::hdf5_hl PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5_hl-shared") +else() + message(FATAL_ERROR "could not find target hdf5_hl-*") +endif() + +set(HDF5_LIBRARIES vtk::hdf5::hdf5 vtk::hdf5::hdf5_hl) + +find_package_handle_standard_args(HDF5 + REQUIRED_VARS HDF5_INCLUDE_DIRS HDF5_LIBRARIES +) diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index d865d1df2..1168691cc 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -31,6 +31,7 @@ if ("python" IN_LIST FEATURES) else() set(VTK_WITH_PYTHON OFF) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file endif() + if("openvr" IN_LIST FEATURES) set(VTK_WITH_OPENVR ON) # IMPORTANT: if ON make sure `OpenVR` is listed as dependency in the CONTROL file else() @@ -80,6 +81,7 @@ vcpkg_apply_patches( file(REMOVE ${SOURCE_PATH}/CMake/FindGLEW.cmake) file(REMOVE ${SOURCE_PATH}/CMake/FindPythonLibs.cmake) file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindGDAL.cmake DESTINATION ${SOURCE_PATH}/CMake) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindHDF5.cmake DESTINATION ${SOURCE_PATH}/CMake/NewCMake) # ============================================================================= # Collect CMake options for optional components @@ -133,10 +135,6 @@ if(VTK_WITH_ALL_MODULES) ) endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - list(APPEND ADDITIONAL_OPTIONS "-DVTK_EXTERNAL_HDF5_IS_SHARED=ON") -endif() - # ============================================================================= # Configure & Install vcpkg_configure_cmake( @@ -169,12 +167,6 @@ vcpkg_configure_cmake( -DVTK_INSTALL_PACKAGE_DIR=share/vtk -DVTK_FORBID_DOWNLOADS=ON ${ADDITIONAL_OPTIONS} - OPTIONS_RELEASE - -DHDF5_C_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/hdf5.lib - -DHDF5_C_HL_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/hdf5_hl.lib - OPTIONS_DEBUG - -DHDF5_C_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/hdf5_D.lib - -DHDF5_C_HL_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/hdf5_hl_D.lib ) vcpkg_install_cmake() -- cgit v1.2.3 From 44cb4467a3585ec1bf3b0b7cef695eca657e97c4 Mon Sep 17 00:00:00 2001 From: MadDog Test Execution Admin User Date: Wed, 8 Nov 2017 16:43:21 -0800 Subject: disbale the test --- ports/glbinding/portfile.cmake | 7 ++++++- vcpkgTemp1 | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) create mode 160000 vcpkgTemp1 diff --git a/ports/glbinding/portfile.cmake b/ports/glbinding/portfile.cmake index 6f6dfcc68..8b0f2f4b7 100644 --- a/ports/glbinding/portfile.cmake +++ b/ports/glbinding/portfile.cmake @@ -14,7 +14,12 @@ vcpkg_download_distfile(ARCHIVE SHA512 66b21853a4f4760b7b22cafd5211958769c513e83be999018fe79cf56a9271e0e28566caaa2286393f54ac2154d564a68d12159598d03c965adf6756f3753f11 ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DOPTION_BUILD_TESTS=OFF + -DOPTION_BUILD_GPU_TESTS=OFF +) #vcpkg_build_cmake() vcpkg_install_cmake() diff --git a/vcpkgTemp1 b/vcpkgTemp1 new file mode 160000 index 000000000..cdff7ada1 --- /dev/null +++ b/vcpkgTemp1 @@ -0,0 +1 @@ +Subproject commit cdff7ada17828cd68f21a2180b45c8ea2e885877 -- cgit v1.2.3 From 4b5d4527f595e4202e1fc75afb5a279e9da66e53 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 8 Nov 2017 17:21:21 -0800 Subject: [glbinding] Use vcpkg_from_github() --- ports/glbinding/CONTROL | 2 +- ports/glbinding/portfile.cmake | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ports/glbinding/CONTROL b/ports/glbinding/CONTROL index b6eaf06bd..1fd781901 100644 --- a/ports/glbinding/CONTROL +++ b/ports/glbinding/CONTROL @@ -1,3 +1,3 @@ Source: glbinding -Version: 2.1.1-2 +Version: 2.1.1-3 Description: glbinding is an MIT licensed, cross-platform C++ binding for the OpenGL API diff --git a/ports/glbinding/portfile.cmake b/ports/glbinding/portfile.cmake index 8b0f2f4b7..cf3f64e5d 100644 --- a/ports/glbinding/portfile.cmake +++ b/ports/glbinding/portfile.cmake @@ -7,19 +7,20 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glbinding-2.1.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/cginternals/glbinding/archive/v2.1.1.zip" - FILENAME "glbinding-2.1.1.zip" - SHA512 66b21853a4f4760b7b22cafd5211958769c513e83be999018fe79cf56a9271e0e28566caaa2286393f54ac2154d564a68d12159598d03c965adf6756f3753f11 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cginternals/glbinding + REF v2.1.1 + SHA512 6c7251555801272a90c87a9386324eb6993102601a036fc7d9f9b4ebed64c74d011909566e5fc5a34ef8242e24915848296023daa1420c91aaf08cf9635be397 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DOPTION_BUILD_TESTS=OFF -DOPTION_BUILD_GPU_TESTS=OFF -) +) + #vcpkg_build_cmake() vcpkg_install_cmake() -- cgit v1.2.3 From ef2ebab09b4a6734766bef93a4e1d0e24222b240 Mon Sep 17 00:00:00 2001 From: Roelf-Jilling Date: Thu, 9 Nov 2017 21:12:59 +0100 Subject: [ms-gsl] update to current --- ports/ms-gsl/CONTROL | 2 +- ports/ms-gsl/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL index c485497e3..b19e7c583 100644 --- a/ports/ms-gsl/CONTROL +++ b/ports/ms-gsl/CONTROL @@ -1,3 +1,3 @@ Source: ms-gsl -Version: 20170425-8b320e3f5d016f953e55dfc7ec8694c1349d3fe4 +Version: 20171104-d10ebc6555b627c9d1196076a78467e7be505987 Description: Microsoft implementation of the Guidelines Support Library \ No newline at end of file diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index a5353e666..285b49676 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/GSL - REF 8b320e3f5d016f953e55dfc7ec8694c1349d3fe4 - SHA512 79d4ecc937cdce2acf79620f12c6d4592159f17aa23c0fd1e978cc571e84ee11d91bd9a45f975546447e1ba20878244312609396a52a76f18872b97ea024aa00 + REF d10ebc6555b627c9d1196076a78467e7be505987 + SHA512 982f1d059f3128e79db7742e4bc9a641f8f6b91e02b00f7a98e4447bff9602501e905bc42173520036a0d3b6ad95ca7908fed15fa200ea01a2bd103b8e9cff88 HEAD_REF master ) -- cgit v1.2.3 From 138bce34f27f2cb2cdeb50056b414d1cd80e73ec Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 9 Nov 2017 17:51:15 -0800 Subject: Fix SHA-256 name --- scripts/fetchDependency.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index b884f3da8..f90a51290 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -31,7 +31,7 @@ function Get-Credential-Backwards-Compatible() } } -function Get-Hash-SHA265() +function Get-Hash-SHA256() { if (Test-Command -commandName 'Microsoft.PowerShell.Utility\Get-FileHash') { @@ -257,7 +257,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) performDownload $Dependency $url $downloadsDir $downloadPath $downloadVersion $requiredVersion - $downloadedFileHash = Get-Hash-SHA265 $downloadPath + $downloadedFileHash = Get-Hash-SHA256 $downloadPath if ($expectedDownloadedFileHash -ne $downloadedFileHash) { Write-Host ("`nFile does not have expected hash:`n" + -- cgit v1.2.3 From eabacf0d14b288f8d8a530cbefce09f7e26aa981 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 9 Nov 2017 17:52:04 -0800 Subject: Make parameter mandatory --- scripts/fetchDependency.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index f90a51290..b185336f5 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -145,9 +145,9 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) # Using this to wait for the execution to finish function Invoke-Command() { - param ( [string]$program = $(throw "Please specify a program" ), - [string]$argumentString = "", - [switch]$waitForExit ) + param ( [Parameter(Mandatory=$true)][string]$program, + [string]$argumentString = "", + [switch]$waitForExit = $false ) $psi = new-object "Diagnostics.ProcessStartInfo" $psi.FileName = $program -- cgit v1.2.3 From 615f7e112f38cf82dd1cec9d519501938f755324 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 9 Nov 2017 20:09:04 -0800 Subject: [bootstrap.ps1] Add option to specify VS path --- scripts/bootstrap.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index b14dbbe4a..f8e6dcaa0 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -1,7 +1,7 @@ [CmdletBinding()] param( - [ValidateNotNullOrEmpty()] - [string]$disableMetrics = "0" + [ValidateNotNullOrEmpty()][string]$disableMetrics = "0", + [Parameter(Mandatory=$False)][string]$explicitlyRequestedVSPath = "" ) $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition @@ -39,7 +39,7 @@ if (!(Test-Path $vcpkgSourcesPath)) try { pushd $vcpkgSourcesPath - $msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 + $msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $explicitlyRequestedVSPath $msbuildExe = $msbuildExeWithPlatformToolset[0] $platformToolset = $msbuildExeWithPlatformToolset[1] $windowsSDK = & $scriptsDir\getWindowsSDK.ps1 -- cgit v1.2.3 From 7eb0095094f62719d9f28c694d2bd6b3d003f090 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 9 Nov 2017 21:41:16 -0800 Subject: Rename $explicitlyRequestedVSPath to $withVSPath --- scripts/bootstrap.ps1 | 4 ++-- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index f8e6dcaa0..f349dbecd 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -1,7 +1,7 @@ [CmdletBinding()] param( [ValidateNotNullOrEmpty()][string]$disableMetrics = "0", - [Parameter(Mandatory=$False)][string]$explicitlyRequestedVSPath = "" + [Parameter(Mandatory=$False)][string]$withVSPath = "" ) $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition @@ -39,7 +39,7 @@ if (!(Test-Path $vcpkgSourcesPath)) try { pushd $vcpkgSourcesPath - $msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $explicitlyRequestedVSPath + $msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $withVSPath $msbuildExe = $msbuildExeWithPlatformToolset[0] $platformToolset = $msbuildExeWithPlatformToolset[1] $windowsSDK = & $scriptsDir\getWindowsSDK.ps1 diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index d9ffbd32a..e58b58c04 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -1,10 +1,10 @@ [CmdletBinding()] param( [Parameter(Mandatory=$False)] - [string]$explicitlyRequestedVSPath = "" + [string]$withVSPath = "" ) -$explicitlyRequestedVSPath = $explicitlyRequestedVSPath -replace "\\$" # Remove potential trailing backslash +$withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 @@ -19,7 +19,7 @@ foreach ($instanceCandidateWithEOL in $VisualStudioInstallationInstances) $version = $split[2] $path = $split[3] - if ($explicitlyRequestedVSPath -ne "" -and $explicitlyRequestedVSPath -ne $path) + if ($withVSPath -ne "" -and $withVSPath -ne $path) { Write-Verbose "Skipping: $instanceCandidate" continue -- cgit v1.2.3 From 192087563d08d659c219700358803c748a71f72e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 9 Nov 2017 21:42:03 -0800 Subject: Join declaration and assignment. Add const --- toolsrc/src/vcpkg/build.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index ca0712a06..b0ca3501b 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -317,9 +317,8 @@ namespace vcpkg::Build {"FEATURES", features}, }); - std::string command; const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); - command = Strings::format(R"(%s && %s)", cmd_set_environment, cmd_launch_cmake); + const std::string command = Strings::format(R"(%s && %s)", cmd_set_environment, cmd_launch_cmake); const auto timer = Chrono::ElapsedTime::create_started(); -- cgit v1.2.3 From cd41cfe468d453a9c5d9ceb601f0e5aba988113a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 9 Nov 2017 21:42:36 -0800 Subject: Use Push-Location/Pop-Location instead of pushd/popd --- scripts/bootstrap.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index f349dbecd..ca7b1a0ce 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -38,7 +38,7 @@ if (!(Test-Path $vcpkgSourcesPath)) try { - pushd $vcpkgSourcesPath + Push-Location $vcpkgSourcesPath $msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $withVSPath $msbuildExe = $msbuildExeWithPlatformToolset[0] $platformToolset = $msbuildExeWithPlatformToolset[1] @@ -57,5 +57,5 @@ try } finally { - popd + Pop-Location } -- cgit v1.2.3 From 2c4d1dc17f0ddd9443447a9e671fcf8e5d9311f7 Mon Sep 17 00:00:00 2001 From: Jozef Izso Date: Thu, 9 Nov 2017 10:57:35 +0100 Subject: Update grpc port to release 1.7.0 --- ports/grpc/CONTROL | 2 +- ports/grpc/portfile.cmake | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 958ab7723..b866586fe 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.6.0-2 +Version: 1.7.0 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 791470bc2..4b7473105 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -12,24 +12,16 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF v1.6.0 - SHA512 70a68fecca43cfe8c94206fd39ad8f86e055eb2185ae8c90040cc35928f1102016775c66e83c3cc76690e44598764b215d884a206f8466d45b00e2c54593e682 + REF v1.7.0 + SHA512 23427ac1f180ce6d70b039225f26cecbd938655d1e5b726414aee7dfee6e6f301913255cfe0ff326dfb34e206ca6476c389b2fd0db58b284fff30c9757c5e4ac HEAD_REF master ) -# fix from PR https://github.com/grpc/grpc/pull/12411 -vcpkg_download_distfile(CMAKE_ERROR_FIX_DIFF - URLS "https://github.com/grpc/grpc/commit/74c139a83987087f9e2d2e6b5d44c240d719061d.diff" - FILENAME "grpc-cmake-error-fix.diff" - SHA512 38cdff0e6db12276400cf4eec66aafdbfe34912a78a0604ced3b216d3a60e5b87464f9083fa5e5dfb4df1490ef10565cbe04d3f750f59c7e7e1a05334c0b528e -) - # Issue: https://github.com/grpc/grpc/issues/10759 vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext.patch - ${CMAKE_ERROR_FIX_DIFF} ) if(VCPKG_CRT_LINKAGE STREQUAL static) -- cgit v1.2.3 From f625230452b7b37adeb60c45622c817dfb68c362 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 10 Nov 2017 00:31:46 -0800 Subject: [pcl][vtk] fixup_cmake_targets. Fix vtk config files regression. --- ports/pcl/CONTROL | 2 +- ports/pcl/portfile.cmake | 29 ++++++++--------------------- ports/vtk/CONTROL | 2 +- ports/vtk/FindHDF5.cmake | 2 +- 4 files changed, 11 insertions(+), 24 deletions(-) diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index dcaa884eb..1e9f8c57b 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,5 +1,5 @@ Source: pcl -Version: 1.8.1-3 +Version: 1.8.1-4 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. Build-Depends: boost, eigen3, flann, qhull, vtk, openni2 diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index 92c554df9..d63c9dfbb 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/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_from_github( @@ -27,13 +15,10 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/find_flann.patch" "${CMAKE_CURRENT_LIST_DIR}/find_qhull.patch" "${CMAKE_CURRENT_LIST_DIR}/find_openni2.patch" + "${CMAKE_CURRENT_LIST_DIR}/vs2017-15.4-workaround.patch" ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(LIBRARY_LINKAGE ON) -elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(LIBRARY_LINKAGE OFF) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS) set(WITH_QT OFF) if("qt" IN_LIST FEATURES) @@ -53,9 +38,9 @@ vcpkg_configure_cmake( -DBUILD_surface_on_nurbs=ON -DBUILD_tools=OFF # PCL - -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${LIBRARY_LINKAGE} - -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${LIBRARY_LINKAGE} - -DPCL_SHARED_LIBS=${LIBRARY_LINKAGE} + -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS} + -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS} + -DPCL_SHARED_LIBS=${PCL_SHARED_LIBS} # WITH -DWITH_CUDA=OFF -DWITH_LIBUSB=OFF @@ -68,8 +53,10 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/pcl) +vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcl) file(RENAME ${CURRENT_PACKAGES_DIR}/share/pcl/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/pcl/copyright) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 7cd91a985..0131e72bb 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,5 +1,5 @@ Source: vtk -Version: 8.0.1-3 +Version: 8.0.1-4 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora diff --git a/ports/vtk/FindHDF5.cmake b/ports/vtk/FindHDF5.cmake index 55d007006..b4783c947 100644 --- a/ports/vtk/FindHDF5.cmake +++ b/ports/vtk/FindHDF5.cmake @@ -20,7 +20,7 @@ else() message(FATAL_ERROR "could not find target hdf5_hl-*") endif() -set(HDF5_LIBRARIES vtk::hdf5::hdf5 vtk::hdf5::hdf5_hl) +set(HDF5_LIBRARIES "$>:vtk::hdf5::hdf5>>" "$>:vtk::hdf5::hdf5_hl>>") find_package_handle_standard_args(HDF5 REQUIRED_VARS HDF5_INCLUDE_DIRS HDF5_LIBRARIES -- cgit v1.2.3 From 00952c99d6f059e46fbe617e3ee237ac3450826c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 10 Nov 2017 00:59:05 -0800 Subject: Remove vcpkgTemp1 --- vcpkgTemp1 | 1 - 1 file changed, 1 deletion(-) delete mode 160000 vcpkgTemp1 diff --git a/vcpkgTemp1 b/vcpkgTemp1 deleted file mode 160000 index cdff7ada1..000000000 --- a/vcpkgTemp1 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cdff7ada17828cd68f21a2180b45c8ea2e885877 -- cgit v1.2.3 From 318613d2b230a306fb0c09ed1727cd66aeb60434 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 10 Nov 2017 01:23:10 -0800 Subject: [vtk] Refactor fixup to be less hacky. PCL builds for x86-windows. --- ports/vtk/CONTROL | 2 +- ports/vtk/FindHDF5.cmake | 2 +- ports/vtk/portfile.cmake | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 0131e72bb..3919619ef 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,5 +1,5 @@ Source: vtk -Version: 8.0.1-4 +Version: 8.0.1-5 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora diff --git a/ports/vtk/FindHDF5.cmake b/ports/vtk/FindHDF5.cmake index b4783c947..4a8c4a166 100644 --- a/ports/vtk/FindHDF5.cmake +++ b/ports/vtk/FindHDF5.cmake @@ -20,7 +20,7 @@ else() message(FATAL_ERROR "could not find target hdf5_hl-*") endif() -set(HDF5_LIBRARIES "$>:vtk::hdf5::hdf5>>" "$>:vtk::hdf5::hdf5_hl>>") +set(HDF5_LIBRARIES "$" "$") find_package_handle_standard_args(HDF5 REQUIRED_VARS HDF5_INCLUDE_DIRS HDF5_LIBRARIES diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 1168691cc..f46b47cbf 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -320,6 +320,11 @@ set(VTK_TOOLS pvtkpython ) +file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtkhdf5.cmake" _contents) +string(REPLACE "vtk::hdf5::hdf5_hl" "" _contents "${_contents}") +string(REPLACE "vtk::hdf5::hdf5" "" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtkhdf5.cmake" "${_contents}") + foreach(TOOL_NAME IN LISTS VTK_TOOLS) _vtk_move_tool("${TOOL_NAME}") endforeach() -- cgit v1.2.3 From f007f6971d80d2ca5b1662e280e2cbd6557f03ce Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Fri, 10 Nov 2017 15:39:37 +0100 Subject: add GlU32.lib to OpenGL port --- ports/opengl/CONTROL | 2 +- ports/opengl/portfile.cmake | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ports/opengl/CONTROL b/ports/opengl/CONTROL index e2db823cf..15acb1f0f 100644 --- a/ports/opengl/CONTROL +++ b/ports/opengl/CONTROL @@ -1,3 +1,3 @@ Source: opengl -Version: 0.0-3 +Version: 0.0-4 Description: Open Graphics Library (OpenGL)[3][4][5] is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. \ No newline at end of file diff --git a/ports/opengl/portfile.cmake b/ports/opengl/portfile.cmake index 36622393b..154cb039e 100644 --- a/ports/opengl/portfile.cmake +++ b/ports/opengl/portfile.cmake @@ -4,20 +4,26 @@ vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) vcpkg_get_windows_sdk(WINDOWS_SDK) if (WINDOWS_SDK MATCHES "10.") - set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") - set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf") - set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") + set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") + set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") + set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf") + set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") elseif(WINDOWS_SDK MATCHES "8.") - set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") - set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um") + set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") + set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") + set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um") else() message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") endif() -if (NOT EXISTS "${LIBFILEPATH}") +if (NOT EXISTS "${LIBGLFILEPATH}") message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}") endif() +if (NOT EXISTS "${LIBGLUFILEPATH}") + message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBGLUFILEPATH}") +endif() + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/gl ${CURRENT_PACKAGES_DIR}/lib @@ -30,8 +36,10 @@ file(COPY "${HEADERSPATH}\\gl\\GLU.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/gl ) -file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) if (DEFINED LICENSEPATH) file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/opengl) -- cgit v1.2.3 From 3ae740cef8e34ebb447752b3e0c628dc39553315 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 10 Nov 2017 08:06:20 -0800 Subject: [abseil] Update, apply workaround for NOMINMAX --- ports/abseil/CMakeLists.txt | 4 ++-- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 12 ++++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ports/abseil/CMakeLists.txt b/ports/abseil/CMakeLists.txt index 4a96b3fde..de9ce8c52 100644 --- a/ports/abseil/CMakeLists.txt +++ b/ports/abseil/CMakeLists.txt @@ -14,7 +14,7 @@ endif() function(add_sublibrary LIB) file(GLOB_RECURSE SOURCES "absl/${LIB}/*.cc") - list(FILTER SOURCES EXCLUDE REGEX "_test(_.+)?.cc$|_nonprod.cc$") + list(FILTER SOURCES EXCLUDE REGEX "_test(ing)?(_.+)?.cc$|_nonprod.cc$") file(GLOB HEADERS "absl/${LIB}/*.h") file(GLOB INTERNAL_HEADERS "absl/${LIB}/internal/*.h") @@ -83,7 +83,7 @@ target_link_public_libraries(time base numeric) target_link_public_libraries(synchronization base time) find_package(unofficial-cctz REQUIRED) -targeT_link_libraries(time PUBLIC unofficial::cctz) +target_link_libraries(time PUBLIC unofficial::cctz) install( EXPORT unofficial-abseil-targets diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index 44684b6b8..2e0345619 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2017-10-14 +Version: 2017-11-10 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index d74369951..a6efa08b5 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -10,8 +10,8 @@ message("To use from cmake:\n find_package(unofficial-abseil REQUIRED)\n link_ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 1a9ba5e2e5a14413704f0c913fac53359576d3b6 - SHA512 756e494c30324c937ca655d91afdee9acb923c7ee837a7c685441305bea2d54a75b3b21be7355abe416660984ba51ace9d234d70168fb029c601b7442397e8ff + REF 778abb7c279547afe7a4642063712f13a80b8eea + SHA512 55268321429ac5dfc432fd60e71cfac5abbc4b7145bc16bfaaff9dd05af4a3a8cb92e95906f6ebcd493f71e2fd892ddc8923011ad15fbd37ed423b70200c8538 HEAD_REF master ) @@ -27,6 +27,14 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-abseil) file(RENAME ${CURRENT_PACKAGES_DIR}/share/abseil ${CURRENT_PACKAGES_DIR}/share/unofficial-abseil) +file(GLOB_RECURSE HEADERS ${CURRENT_PACKAGES_DIR}/include/*) +foreach(FILE ${HEADERS}) + file(READ "${FILE}" _contents) + string(REPLACE "std::min(" "(std::min)(" _contents "${_contents}") + string(REPLACE "std::max(" "(std::max)(" _contents "${_contents}") + file(WRITE "${FILE}" "${_contents}") +endforeach() + vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/abseil RENAME copyright) -- cgit v1.2.3 From d02ee690dc422031bc9ea4d8665ec5ad40502abc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 10 Nov 2017 14:29:28 -0800 Subject: [openssl] Update to 1.0.2m --- ports/openssl/CONTROL | 2 +- ports/openssl/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index f3f065c13..e5d1bf8bc 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2l-3 +Version: 1.0.2m 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/portfile.cmake b/ports/openssl/portfile.cmake index 9763f740e..5f1b39bc7 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -4,7 +4,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endif() include(vcpkg_common_functions) -set(OPENSSL_VERSION 1.0.2l) +set(OPENSSL_VERSION 1.0.2m) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) vcpkg_find_acquire_program(PERL) @@ -19,7 +19,7 @@ set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH};${PERL_EXE_PATH}") 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 047d964508ad6025c79caabd8965efd2416dc026a56183d0ef4de7a0a6769ce8e0b4608a3f8393d326f6d03b26a2b067e6e0c750f35b20be190e595e8290c0e3 + SHA512 7619aa223ee50d0f5e270ac9090e95b2b1ba5dfc656c98f625a9a277dda472fb960a4e89a7ba300044cb401b2072b2ca6a6fcce8206d927bf373d1c981806a93 ) vcpkg_extract_source_archive(${OPENSSL_SOURCE_ARCHIVE}) -- cgit v1.2.3 From 50f6bc4e8f103c695f8754962dde0be03e32cbc5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 10 Nov 2017 17:34:00 -0800 Subject: [vcpkg-toolchain] Fix find_package detection of Boost. Fixes #2130. --- scripts/buildsystems/vcpkg.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 68e29b87c..e3aa46b64 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -153,7 +153,7 @@ function(add_library name) endfunction() macro(find_package name) - if(name STREQUAL "Boost") + if("${name}" STREQUAL "Boost") unset(Boost_USE_STATIC_LIBS) unset(Boost_USE_MULTITHREADED) unset(Boost_USE_STATIC_RUNTIME) -- cgit v1.2.3 From b5afd00ad632ab144555e9bc1e106b84e11cd040 Mon Sep 17 00:00:00 2001 From: Andrew Male Date: Sat, 11 Nov 2017 07:27:31 -0500 Subject: Modifying libwebsockets portfile to account for static triplets --- ports/libwebsockets/portfile.cmake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ports/libwebsockets/portfile.cmake b/ports/libwebsockets/portfile.cmake index 43502a52a..fa5ecfd8f 100644 --- a/ports/libwebsockets/portfile.cmake +++ b/ports/libwebsockets/portfile.cmake @@ -17,10 +17,19 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-UWP.patch ) +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(LWS_MSVC_STATIC_RUNTIME ON) + set(LWS_MSVC_SHARED_RUNTIME OFF) +else() + set(LWS_MSVC_STATIC_RUNTIME OFF) + set(LWS_MSVC_SHARED_RUNTIME ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DLWS_WITH_STATIC=OFF + -DLWS_WITH_STATIC=${LWS_MSVC_STATIC_RUNTIME} + -DLWS_WITH_SHARED=${LWS_MSVC_SHARED_RUNTIME} -DLWS_USE_BUNDLED_ZLIB=OFF -DLWS_WITHOUT_TESTAPPS=ON -DLWS_IPV6=ON -- cgit v1.2.3 From 679dd12a756583f3014d06ac5a2ab8e6695eb372 Mon Sep 17 00:00:00 2001 From: Andrew Male Date: Sat, 11 Nov 2017 07:38:53 -0500 Subject: Incrementing CONTROL version for libwebsockets --- ports/libwebsockets/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL index 816253a2c..fa700ddbd 100644 --- a/ports/libwebsockets/CONTROL +++ b/ports/libwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: libwebsockets -Version: 2.0.0-2 +Version: 2.0.0-3 Build-Depends: zlib, openssl 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. -- cgit v1.2.3 From 1b679903952c3afa0a0252299348ff6e3e143092 Mon Sep 17 00:00:00 2001 From: Andrew Male Date: Sat, 11 Nov 2017 07:39:17 -0500 Subject: Removing static linkage warning/toggle --- ports/libwebsockets/portfile.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ports/libwebsockets/portfile.cmake b/ports/libwebsockets/portfile.cmake index fa5ecfd8f..78632256d 100644 --- a/ports/libwebsockets/portfile.cmake +++ b/ports/libwebsockets/portfile.cmake @@ -1,7 +1,3 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libwebsockets-2.0.0) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From 72f10db01caf7dfa0e8c14c4256401b3f4ea70a2 Mon Sep 17 00:00:00 2001 From: Luiz Paulo Date: Sat, 11 Nov 2017 15:31:38 +0000 Subject: Adding package features for Dlib and OpenCV Dlib - Package feature for blas (dlib is compatiable with Intel MKL) and CUDA OpenCV - Added option to integrate GDCM support (to read DICOM files) --- ports/dlib/CONTROL | 7 +++++++ ports/dlib/portfile.cmake | 15 ++++++++++++--- ports/opencv/CONTROL | 4 ++++ ports/opencv/portfile.cmake | 6 ++++++ 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index 87d81875b..c773d8d28 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -2,3 +2,10 @@ Source: dlib Version: 19.7 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3 Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ + +Feature: blas +Description: BLAS support for dlib + +Feature: cuda +Build-Depends: cuda +Description: CUDA support for dlib diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index 4234e3e4b..e80176b7d 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -17,6 +17,16 @@ file(READ "${SOURCE_PATH}/dlib/CMakeLists.txt" DLIB_CMAKE) string(REPLACE "PNG_LIBRARY" "PNG_LIBRARIES" DLIB_CMAKE "${DLIB_CMAKE}") file(WRITE "${SOURCE_PATH}/dlib/CMakeLists.txt" "${DLIB_CMAKE}") +set(WITH_BLAS OFF) +if("blas" IN_LIST FEATURES) + set(WITH_BLAS ON) +endif() + +set(WITH_CUDA OFF) +if("cuda" IN_LIST FEATURES) + set(WITH_CUDA ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -25,12 +35,11 @@ vcpkg_configure_cmake( -DDLIB_USE_FFTW=ON -DDLIB_PNG_SUPPORT=ON -DDLIB_JPEG_SUPPORT=ON - -DDLIB_USE_BLAS=OFF + -DDLIB_USE_BLAS=${WITH_BLAS} -DDLIB_USE_LAPACK=OFF - -DDLIB_USE_CUDA=OFF + -DDLIB_USE_CUDA=${WITH_CUDA} -DDLIB_GIF_SUPPORT=OFF -DDLIB_USE_MKL_FFT=OFF - #-DDLIB_USE_CUDA=ON OPTIONS_DEBUG -DDLIB_ENABLE_ASSERTS=ON #-DDLIB_ENABLE_STACK_TRACE=ON diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 2654e5a25..d41323609 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -21,3 +21,7 @@ Description: Qt GUI support for opencv Feature: vtk Build-Depends: vtk Description: vtk support for opencv + +Feature: gdcm +Build-Depends: gdcm2 +Description: GDCM support for opencv diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index f514e189e..b6958abfd 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -58,6 +58,11 @@ if("vtk" IN_LIST FEATURES) set(WITH_VTK ON) endif() +set(WITH_GDCM OFF) +if("gdcm" IN_LIST FEATURES) + set(WITH_GDCM ON) +endif() + set(WITH_MSMF ON) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(WITH_MSMF OFF) @@ -112,6 +117,7 @@ vcpkg_configure_cmake( -DWITH_OPENGL=ON -DWITH_QT=${WITH_QT} -DWITH_VTK=${WITH_VTK} + -DWITH_GDCM=${WITH_GDCM} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -DINSTALL_OTHER=OFF -- cgit v1.2.3 From e57d38a8128ddd278bc4249358c292923e867736 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 11 Nov 2017 18:46:05 +0000 Subject: [discord-rpc] Add v2.0.1 - Not properly configured for debug builds and always forced /MT. Fixed by patching cmake. - Unable to stop building of examples, so delete afterwards. --- ports/discord-rpc/CONTROL | 3 +++ ports/discord-rpc/fix-debug.diff | 24 +++++++++++++++++++++ ports/discord-rpc/portfile.cmake | 45 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 ports/discord-rpc/CONTROL create mode 100644 ports/discord-rpc/fix-debug.diff create mode 100644 ports/discord-rpc/portfile.cmake diff --git a/ports/discord-rpc/CONTROL b/ports/discord-rpc/CONTROL new file mode 100644 index 000000000..e6d3462aa --- /dev/null +++ b/ports/discord-rpc/CONTROL @@ -0,0 +1,3 @@ +Source: discord-rpc +Version: 2.0.1 +Description: Rich Presence allows you to leverage the totally overhauled "Now Playing" section in a Discord user's profile to help people play your game together. diff --git a/ports/discord-rpc/fix-debug.diff b/ports/discord-rpc/fix-debug.diff new file mode 100644 index 000000000..df33249b9 --- /dev/null +++ b/ports/discord-rpc/fix-debug.diff @@ -0,0 +1,24 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -30,7 +30,6 @@ if(WIN32) + set(BASE_RPC_SRC ${BASE_RPC_SRC} connection_win.cpp discord_register_win.cpp) + add_library(discord-rpc ${RPC_LIBRARY_TYPE} ${BASE_RPC_SRC}) + target_compile_options(discord-rpc PRIVATE /EHsc +- /MT + /Wall + /wd4100 # unreferenced formal parameter + /wd4514 # unreferenced inline +@@ -102,13 +101,10 @@ install( + EXPORT "discord-rpc" + RUNTIME + DESTINATION "bin" +- CONFIGURATIONS Release + LIBRARY + DESTINATION "lib" +- CONFIGURATIONS Release + ARCHIVE + DESTINATION "lib" +- CONFIGURATIONS Release + INCLUDES + DESTINATION "include" + ) diff --git a/ports/discord-rpc/portfile.cmake b/ports/discord-rpc/portfile.cmake new file mode 100644 index 000000000..ea59126a3 --- /dev/null +++ b/ports/discord-rpc/portfile.cmake @@ -0,0 +1,45 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO discordapp/discord-rpc + REF v2.0.1 + SHA512 496f8f34184c4be3c3341b05ebd440a9e89e36ecf15747ea8f4d1cc0404f1341404fda6c8358a2c08e0149023775472ea78603b9d41687f1004828523debda99 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH + ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-debug.diff +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_DYNAMIC_LIB ON) +else() + set(BUILD_DYNAMIC_LIB OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_DYNAMIC_LIB=${BUILD_DYNAMIC_LIB} +) + +vcpkg_install_cmake() + +# Remove bin and debug include +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/send-presence.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/send-presence.exe) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Copy copright information +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/discord-rpc" RENAME "copyright") + +vcpkg_copy_pdbs() -- cgit v1.2.3 From fbaaf5b1099e7ebeb023fb8599d7671e70b32911 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 11 Nov 2017 20:20:28 +0000 Subject: [sdl2] Update to 2.0.7 --- ports/sdl2/CONTROL | 2 +- ports/sdl2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index e4d99f4ae..f662ef6e7 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.6-1 +Version: 2.0.7-1 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 a430b29f6..9dd029c84 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(SDL2_VERSION 2.0.6) -set(SDL2_HASH ad4dad5663834ee0ffbdca1b531d753449b260c9256df2c48da7261aacd9795d91eef1286525cf914f6b92ba5985de7798f041557574b5d978b8224f10041830) +set(SDL2_VERSION 2.0.7) +set(SDL2_HASH eed5477843086a0e66552eb197a5c4929134522bc366d873732361ea0df5fb841ef7e2b1913e21d1bae69e6fd3152ee630492e615c58cbe903e7d6e47b587410) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-${SDL2_VERSION}) vcpkg_download_distfile(ARCHIVE_FILE -- cgit v1.2.3 From 492b9448a7d91e801f4eed9f4eba1be0f888a73c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 11 Nov 2017 19:03:13 -0800 Subject: [pcl] Fixup: commit missing patch --- ports/pcl/vs2017-15.4-workaround.patch | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 ports/pcl/vs2017-15.4-workaround.patch diff --git a/ports/pcl/vs2017-15.4-workaround.patch b/ports/pcl/vs2017-15.4-workaround.patch new file mode 100644 index 000000000..5600c9dc8 --- /dev/null +++ b/ports/pcl/vs2017-15.4-workaround.patch @@ -0,0 +1,41 @@ +diff --git a/io/include/pcl/io/ply/ply_parser.h b/io/include/pcl/io/ply/ply_parser.h +index 649d19a..45709a8 100644 +--- a/io/include/pcl/io/ply/ply_parser.h ++++ b/io/include/pcl/io/ply/ply_parser.h +@@ -115,7 +115,7 @@ namespace pcl + + class scalar_property_definition_callbacks_type + { +- private: ++ public: + template + struct callbacks_element + { +@@ -123,7 +123,8 @@ namespace pcl + typedef T scalar_type; + typename scalar_property_definition_callback_type::type callback; + }; +- ++ ++ private: + typedef boost::mpl::inherit_linearly< + scalar_types, + boost::mpl::inherit< +@@ -218,6 +219,7 @@ namespace pcl + boost::mpl::_1,boost::mpl::transform > > > + {}; + ++ public: + template + struct callbacks_element + { +@@ -225,7 +227,8 @@ namespace pcl + typedef typename T::second scalar_type; + typename list_property_definition_callback_type::type callback; + }; +- ++ ++ private: + typedef boost::mpl::inherit_linearly::type, boost::mpl::inherit > >::type callbacks; + callbacks callbacks_; + -- cgit v1.2.3 From ecd21d6cb429a91076c0fc1bb3c6d4af447343e8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 11 Nov 2017 19:47:56 -0800 Subject: [vcpkg-tests] Use PCH. [vcpkg-update] Fix feature packages with update command. Fixes #2003. --- toolsrc/include/tests.pch.h | 18 ++++++ toolsrc/include/tests.utils.h | 26 ++++++++ toolsrc/include/vcpkg/base/sortedvector.h | 2 + toolsrc/include/vcpkg/update.h | 3 +- toolsrc/include/vcpkg/versiont.h | 3 +- toolsrc/src/tests.arguments.cpp | 3 +- toolsrc/src/tests.dependencies.cpp | 4 +- toolsrc/src/tests.packagespec.cpp | 24 +------- toolsrc/src/tests.paragraph.cpp | 6 +- toolsrc/src/tests.pch.cpp | 1 + toolsrc/src/tests.plan.cpp | 60 +----------------- toolsrc/src/tests.statusparagraphs.cpp | 7 +-- toolsrc/src/tests.update.cpp | 96 +++++++++++++++++++++++++++++ toolsrc/src/tests.utils.cpp | 62 +++++++++++++++++++ toolsrc/src/vcpkg/remove.cpp | 7 ++- toolsrc/src/vcpkg/update.cpp | 17 +++-- toolsrc/src/vcpkg/versiont.cpp | 13 ++-- toolsrc/vcpkgtest/vcpkgtest.vcxproj | 28 ++++++--- toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters | 17 +++++ 19 files changed, 279 insertions(+), 118 deletions(-) create mode 100644 toolsrc/include/tests.pch.h create mode 100644 toolsrc/include/tests.utils.h create mode 100644 toolsrc/src/tests.pch.cpp create mode 100644 toolsrc/src/tests.update.cpp create mode 100644 toolsrc/src/tests.utils.cpp diff --git a/toolsrc/include/tests.pch.h b/toolsrc/include/tests.pch.h new file mode 100644 index 000000000..0037af585 --- /dev/null +++ b/toolsrc/include/tests.pch.h @@ -0,0 +1,18 @@ +#pragma once + +#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 new file mode 100644 index 000000000..485b8c294 --- /dev/null +++ b/toolsrc/include/tests.utils.h @@ -0,0 +1,26 @@ +#pragma once + +#include + +#include +#include +#include +#include + +#include + +namespace Microsoft::VisualStudio::CppUnitTestFramework +{ + std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t); + std::wstring ToString(const vcpkg::Dependencies::RequestType& t); + std::wstring ToString(const vcpkg::PackageSpecParseResult& t); + std::wstring ToString(const vcpkg::PackageSpec& t); +} + +std::unique_ptr make_status_pgh(const char* name, + const char* depends = "", + 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"); \ No newline at end of file diff --git a/toolsrc/include/vcpkg/base/sortedvector.h b/toolsrc/include/vcpkg/base/sortedvector.h index 62808cc2f..fbb7e5a5a 100644 --- a/toolsrc/include/vcpkg/base/sortedvector.h +++ b/toolsrc/include/vcpkg/base/sortedvector.h @@ -44,6 +44,8 @@ namespace vcpkg size_type size() const { return this->m_data.size(); } + const T& operator[](int i) const { return this->m_data[i]; } + private: std::vector m_data; }; diff --git a/toolsrc/include/vcpkg/update.h b/toolsrc/include/vcpkg/update.h index e7303d1b0..7587b9eb2 100644 --- a/toolsrc/include/vcpkg/update.h +++ b/toolsrc/include/vcpkg/update.h @@ -16,6 +16,7 @@ namespace vcpkg::Update VersionDiff version_diff; }; - std::vector find_outdated_packages(const VcpkgPaths& paths, const StatusParagraphs& status_db); + std::vector find_outdated_packages(const std::map& src_names_to_versions, + const StatusParagraphs& status_db); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } \ No newline at end of file diff --git a/toolsrc/include/vcpkg/versiont.h b/toolsrc/include/vcpkg/versiont.h index 67efd8da3..6d8332521 100644 --- a/toolsrc/include/vcpkg/versiont.h +++ b/toolsrc/include/vcpkg/versiont.h @@ -8,8 +8,9 @@ namespace vcpkg VersionT(); VersionT(const std::string& value); - std::string to_string() const; + const std::string& to_string() const; + private: std::string value; }; diff --git a/toolsrc/src/tests.arguments.cpp b/toolsrc/src/tests.arguments.cpp index 0f082222d..c87281fa8 100644 --- a/toolsrc/src/tests.arguments.cpp +++ b/toolsrc/src/tests.arguments.cpp @@ -1,5 +1,4 @@ -#include -#include +#include "tests.pch.h" #pragma comment(lib, "version") #pragma comment(lib, "winhttp") diff --git a/toolsrc/src/tests.dependencies.cpp b/toolsrc/src/tests.dependencies.cpp index 3f6e0dd10..f82fad4e4 100644 --- a/toolsrc/src/tests.dependencies.cpp +++ b/toolsrc/src/tests.dependencies.cpp @@ -1,6 +1,4 @@ -#include -#include -#include +#include "tests.pch.h" #pragma comment(lib, "version") #pragma comment(lib, "winhttp") diff --git a/toolsrc/src/tests.packagespec.cpp b/toolsrc/src/tests.packagespec.cpp index 25498a799..32ad81227 100644 --- a/toolsrc/src/tests.packagespec.cpp +++ b/toolsrc/src/tests.packagespec.cpp @@ -1,32 +1,12 @@ -#include -#include -#include +#include "tests.pch.h" -#include -#include +#include #pragma comment(lib, "version") #pragma comment(lib, "winhttp") using namespace Microsoft::VisualStudio::CppUnitTestFramework; -namespace Microsoft::VisualStudio::CppUnitTestFramework -{ - 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()); - } -} - -namespace Strings = vcpkg::Strings; - namespace UnitTest1 { using namespace vcpkg; diff --git a/toolsrc/src/tests.paragraph.cpp b/toolsrc/src/tests.paragraph.cpp index 13052610f..9cddd7bdb 100644 --- a/toolsrc/src/tests.paragraph.cpp +++ b/toolsrc/src/tests.paragraph.cpp @@ -1,8 +1,4 @@ -#include -#include -#include - -#include +#include "tests.pch.h" #pragma comment(lib, "version") #pragma comment(lib, "winhttp") diff --git a/toolsrc/src/tests.pch.cpp b/toolsrc/src/tests.pch.cpp new file mode 100644 index 000000000..bdddab76a --- /dev/null +++ b/toolsrc/src/tests.pch.cpp @@ -0,0 +1 @@ +#include "tests.pch.h" diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 9cf3cfd8e..122a4ffef 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -1,41 +1,11 @@ -#include -#include +#include "tests.pch.h" -#include +#include using namespace Microsoft::VisualStudio::CppUnitTestFramework; using namespace vcpkg; -namespace Microsoft::VisualStudio::CppUnitTestFramework -{ - template<> - inline std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t) - { - switch (t) - { - case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; - case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; - case Dependencies::InstallPlanType::INSTALL: return L"INSTALL"; - case Dependencies::InstallPlanType::EXCLUDED: return L"EXCLUDED"; - case 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 Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED"; - case Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED"; - case Dependencies::RequestType::UNKNOWN: return L"UNKNOWN"; - default: return ToString(static_cast(t)); - } - } -} - namespace UnitTest1 { static std::unique_ptr make_control_file( @@ -96,32 +66,6 @@ namespace UnitTest1 Assert::AreEqual(pkg_name.c_str(), plan.spec.name().c_str()); } - static std::unique_ptr make_status_pgh(const char* name, - const char* depends = "", - const char* triplet = "x86-windows") - { - using Pgh = std::unordered_map; - return std::make_unique(Pgh{{"Package", name}, - {"Version", "1"}, - {"Architecture", triplet}, - {"Multi-Arch", "same"}, - {"Depends", depends}, - {"Status", "install ok installed"}}); - } - static std::unique_ptr make_status_feature_pgh(const char* name, - const char* feature, - const char* depends = "", - const char* triplet = "x86-windows") - { - using Pgh = std::unordered_map; - return std::make_unique(Pgh{{"Package", name}, - {"Version", "1"}, - {"Feature", feature}, - {"Architecture", triplet}, - {"Multi-Arch", "same"}, - {"Depends", depends}, - {"Status", "install ok installed"}}); - } struct PackageSpecMap { std::unordered_map map; diff --git a/toolsrc/src/tests.statusparagraphs.cpp b/toolsrc/src/tests.statusparagraphs.cpp index 4cc1130b1..ed6eaa764 100644 --- a/toolsrc/src/tests.statusparagraphs.cpp +++ b/toolsrc/src/tests.statusparagraphs.cpp @@ -1,9 +1,4 @@ -#include - -#include -#include -#include -#include +#include "tests.pch.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; diff --git a/toolsrc/src/tests.update.cpp b/toolsrc/src/tests.update.cpp new file mode 100644 index 000000000..06ae797f4 --- /dev/null +++ b/toolsrc/src/tests.update.cpp @@ -0,0 +1,96 @@ +#include "tests.pch.h" + +#include + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +using namespace vcpkg; +using namespace vcpkg::Update; + +namespace UnitTest1 +{ + class UpdateTests : public TestClass + { + TEST_METHOD(find_outdated_packages_basic) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.back()->package.version = "2"; + + StatusParagraphs status_db(std::move(status_paragraphs)); + + std::map port_versions; + port_versions["a"] = VersionT("0"); + + auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), + &OutdatedPackage::compare_by_name); + + Assert::AreEqual(size_t(1), pkgs.size()); + Assert::AreEqual("2", pkgs[0].version_diff.left.to_string().c_str()); + Assert::AreEqual("0", pkgs[0].version_diff.right.to_string().c_str()); + } + + TEST_METHOD(find_outdated_packages_features) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.back()->package.version = "2"; + + status_paragraphs.push_back(make_status_feature_pgh("a", "b")); + status_paragraphs.back()->package.version = "2"; + + StatusParagraphs status_db(std::move(status_paragraphs)); + + std::map port_versions; + port_versions["a"] = VersionT("0"); + + auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), + &OutdatedPackage::compare_by_name); + + Assert::AreEqual(size_t(1), pkgs.size()); + Assert::AreEqual("2", pkgs[0].version_diff.left.to_string().c_str()); + Assert::AreEqual("0", pkgs[0].version_diff.right.to_string().c_str()); + } + + TEST_METHOD(find_outdated_packages_features_2) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.back()->package.version = "2"; + + status_paragraphs.push_back(make_status_feature_pgh("a", "b")); + status_paragraphs.back()->package.version = "0"; + status_paragraphs.back()->state = InstallState::NOT_INSTALLED; + status_paragraphs.back()->want = Want::PURGE; + + StatusParagraphs status_db(std::move(status_paragraphs)); + + std::map port_versions; + port_versions["a"] = VersionT("0"); + + auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), + &OutdatedPackage::compare_by_name); + + Assert::AreEqual(size_t(1), pkgs.size()); + Assert::AreEqual("2", pkgs[0].version_diff.left.to_string().c_str()); + Assert::AreEqual("0", pkgs[0].version_diff.right.to_string().c_str()); + } + + TEST_METHOD(find_outdated_packages_none) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.back()->package.version = "2"; + + StatusParagraphs status_db(std::move(status_paragraphs)); + + std::map port_versions; + port_versions["a"] = VersionT("2"); + + auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), + &OutdatedPackage::compare_by_name); + + Assert::AreEqual(size_t(0), pkgs.size()); + } + }; +} diff --git a/toolsrc/src/tests.utils.cpp b/toolsrc/src/tests.utils.cpp new file mode 100644 index 000000000..b9fb51a59 --- /dev/null +++ b/toolsrc/src/tests.utils.cpp @@ -0,0 +1,62 @@ +#include "tests.pch.h" + +#include "tests.utils.h" + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; +using namespace vcpkg; + +namespace Microsoft::VisualStudio::CppUnitTestFramework +{ + std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t) + { + switch (t) + { + case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; + case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; + case Dependencies::InstallPlanType::INSTALL: return L"INSTALL"; + case Dependencies::InstallPlanType::EXCLUDED: return L"EXCLUDED"; + case Dependencies::InstallPlanType::UNKNOWN: return L"UNKNOWN"; + default: return ToString(static_cast(t)); + } + } + + std::wstring ToString(const vcpkg::Dependencies::RequestType& t) + { + switch (t) + { + case Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED"; + case Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED"; + case Dependencies::RequestType::UNKNOWN: return L"UNKNOWN"; + default: return ToString(static_cast(t)); + } + } + + std::wstring ToString(const vcpkg::PackageSpecParseResult& t) { return ToString(static_cast(t)); } + + 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* triplet) +{ + using Pgh = std::unordered_map; + return std::make_unique(Pgh{{"Package", name}, + {"Version", "1"}, + {"Architecture", triplet}, + {"Multi-Arch", "same"}, + {"Depends", depends}, + {"Status", "install ok installed"}}); +} +std::unique_ptr make_status_feature_pgh(const char* name, + const char* feature, + const char* depends, + const char* triplet) +{ + using Pgh = std::unordered_map; + return std::make_unique(Pgh{{"Package", name}, + {"Version", "1"}, + {"Feature", feature}, + {"Architecture", triplet}, + {"Multi-Arch", "same"}, + {"Depends", depends}, + {"Status", "install ok installed"}}); +} diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 7f40fb16e..8ae0bc881 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -206,8 +207,10 @@ namespace vcpkg::Remove System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); Checks::exit_fail(VCPKG_LINE_INFO); } - specs = Util::fmap(Update::find_outdated_packages(paths, status_db), - [](auto&& outdated) { return outdated.spec; }); + specs = Util::fmap( + Update::find_outdated_packages( + Paragraphs::load_all_port_names_and_versions(paths.get_filesystem(), paths.ports), status_db), + [](auto&& outdated) { return outdated.spec; }); if (specs.empty()) { diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index 61a3f89c5..29baef91e 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -14,15 +14,20 @@ namespace vcpkg::Update return left.spec.name() < right.spec.name(); } - std::vector find_outdated_packages(const VcpkgPaths& paths, const StatusParagraphs& status_db) + std::vector find_outdated_packages(const std::map& src_names_to_versions, + const StatusParagraphs& status_db) { - const std::map src_names_to_versions = - Paragraphs::load_all_port_names_and_versions(paths.get_filesystem(), paths.ports); const std::vector installed_packages = get_installed_ports(status_db); std::vector output; for (const StatusParagraph* pgh : installed_packages) { + if (!pgh->package.feature.empty()) + { + // Skip feature packages; only consider master packages for needing updates. + continue; + } + const auto it = src_names_to_versions.find(pgh->package.spec.name()); if (it == src_names_to_versions.end()) { @@ -53,8 +58,10 @@ namespace vcpkg::Update const StatusParagraphs status_db = database_load_check(paths); - const auto outdated_packages = - SortedVector(find_outdated_packages(paths, status_db), &OutdatedPackage::compare_by_name); + const auto outdated_packages = SortedVector( + find_outdated_packages(Paragraphs::load_all_port_names_and_versions(paths.get_filesystem(), paths.ports), + status_db), + &OutdatedPackage::compare_by_name); if (outdated_packages.empty()) { diff --git a/toolsrc/src/vcpkg/versiont.cpp b/toolsrc/src/vcpkg/versiont.cpp index 1c52d674a..91f7e23ef 100644 --- a/toolsrc/src/vcpkg/versiont.cpp +++ b/toolsrc/src/vcpkg/versiont.cpp @@ -7,13 +7,16 @@ namespace vcpkg { VersionT::VersionT() : value("0.0.0") {} VersionT::VersionT(const std::string& value) : value(value) {} - std::string VersionT::to_string() const { return value; } - bool operator==(const VersionT& left, const VersionT& right) { return left.value == right.value; } - bool operator!=(const VersionT& left, const VersionT& right) { return left.value != right.value; } - std::string to_printf_arg(const VersionT& version) { return version.value; } + const std::string& VersionT::to_string() const { return value; } + bool operator==(const VersionT& left, const VersionT& right) { return left.to_string() == right.to_string(); } + bool operator!=(const VersionT& left, const VersionT& right) { return left.to_string() != right.to_string(); } + std::string to_printf_arg(const VersionT& version) { return version.to_string(); } VersionDiff::VersionDiff() : left(), right() {} VersionDiff::VersionDiff(const VersionT& left, const VersionT& right) : left(left), right(right) {} - std::string VersionDiff::to_string() const { return Strings::format("%s -> %s", left.value, right.value); } + std::string VersionDiff::to_string() const + { + return Strings::format("%s -> %s", left.to_string(), right.to_string()); + } } diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index 88dc14a75..9eafc1ada 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -23,14 +23,26 @@ + + Create + Create + Create + Create + + + {b98c92b7-2874-4537-9d46-d14e5c237f04} + + + + {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D} Win32Proj @@ -93,13 +105,13 @@ - NotUsing + Use Level3 Disabled ..\include;$(VCInstallDir)UnitTest\include;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\include;%(AdditionalIncludeDirectories) WIN32;_DEBUG;%(PreprocessorDefinitions) true - + tests.pch.h /std:c++latest %(AdditionalOptions) true false @@ -111,13 +123,13 @@ - NotUsing + Use Level4 Disabled ..\include;$(VCInstallDir)UnitTest\include;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\include;%(AdditionalIncludeDirectories) _DEBUG;%(PreprocessorDefinitions) true - + tests.pch.h /std:c++latest %(AdditionalOptions) true false @@ -130,14 +142,14 @@ Level3 - NotUsing + Use MaxSpeed true true ..\include;$(VCInstallDir)UnitTest\include;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\include;%(AdditionalIncludeDirectories) WIN32;NDEBUG;%(PreprocessorDefinitions) true - + tests.pch.h /std:c++latest %(AdditionalOptions) true @@ -151,14 +163,14 @@ Level3 - NotUsing + Use MaxSpeed true true ..\include;$(VCInstallDir)UnitTest\include;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\include;%(AdditionalIncludeDirectories) NDEBUG;%(PreprocessorDefinitions) true - + tests.pch.h /std:c++latest %(AdditionalOptions) true diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters index 217c5b608..2121f9782 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters @@ -33,5 +33,22 @@ Source Files + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + \ No newline at end of file -- cgit v1.2.3 From 482f85f4142fb02ec6a39ae7d264901bc1e162c1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 11 Nov 2017 21:00:10 -0800 Subject: [libwebsockets] Use vcpkg_from_github. Compare against VCPKG_LIBRARY_LINKAGE instead of VCPKG_CRT_LINKAGE. Use vcpkg_fixup_cmake_targets(). --- ports/libwebsockets/CONTROL | 2 +- ports/libwebsockets/portfile.cmake | 41 +++++++++++++++----------------------- 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL index fa700ddbd..64bf929bd 100644 --- a/ports/libwebsockets/CONTROL +++ b/ports/libwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: libwebsockets -Version: 2.0.0-3 +Version: 2.0.0-4 Build-Depends: zlib, openssl 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 78632256d..ae74f5268 100644 --- a/ports/libwebsockets/portfile.cmake +++ b/ports/libwebsockets/portfile.cmake @@ -1,31 +1,27 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libwebsockets-2.0.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/warmcat/libwebsockets/archive/v2.0.0.zip" - FILENAME "libwebsockets-v2.0.0.zip" - SHA512 bf57a46f2c60095e7e6ec6656b185ffd2cf8f553bc22255ae8f6825d3613316d794f139cdefacbdf60ef997b0cd675fe356813d406c9b7c5a5ae838ce5326042 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO warmcat/libwebsockets + REF v2.0.0 + SHA512 26bc09877c1595b80b08e788e4ae3908af86b67e19f4b9f7ac48d90783cf5c563d4d03e5586d18f6bb8e67d15a03d000f31f67f3a327d898844f77e5d22f7c9d + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-UWP.patch + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-UWP.patch ) -if(VCPKG_CRT_LINKAGE STREQUAL static) - set(LWS_MSVC_STATIC_RUNTIME ON) - set(LWS_MSVC_SHARED_RUNTIME OFF) -else() - set(LWS_MSVC_STATIC_RUNTIME OFF) - set(LWS_MSVC_SHARED_RUNTIME ON) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LWS_WITH_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LWS_WITH_SHARED) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DLWS_WITH_STATIC=${LWS_MSVC_STATIC_RUNTIME} - -DLWS_WITH_SHARED=${LWS_MSVC_SHARED_RUNTIME} + -DLWS_WITH_STATIC=${LWS_WITH_STATIC} + -DLWS_WITH_SHARED=${LWS_WITH_SHARED} -DLWS_USE_BUNDLED_ZLIB=OFF -DLWS_WITHOUT_TESTAPPS=ON -DLWS_IPV6=ON @@ -36,14 +32,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/share/libwebsockets) -file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/cmake/LibwebsocketsTargets-debug.cmake - ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake -) +vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebsockets) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LICENSE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/copyright) -- cgit v1.2.3 From e4d38bb874fe47317e1dd4128c013af882408bbf Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 11 Nov 2017 21:45:37 -0800 Subject: [vcpkg-ci] Fix crash when not passed --exclude. Added Util::Maps::maybe_find. Added Optional. --- toolsrc/include/vcpkg/base/optional.h | 73 +++++++++++++++++++++++++++-------- toolsrc/include/vcpkg/base/util.h | 18 +++++++++ toolsrc/src/vcpkg/commands.ci.cpp | 10 ++++- 3 files changed, 82 insertions(+), 19 deletions(-) diff --git a/toolsrc/include/vcpkg/base/optional.h b/toolsrc/include/vcpkg/base/optional.h index ff7a210c7..aa9e480fd 100644 --- a/toolsrc/include/vcpkg/base/optional.h +++ b/toolsrc/include/vcpkg/base/optional.h @@ -11,59 +11,98 @@ namespace vcpkg const static constexpr NullOpt nullopt{0}; + namespace details + { + template + struct OptionalStorage + { + constexpr OptionalStorage() : m_is_present(false), m_t() {} + constexpr OptionalStorage(const T& t) : m_is_present(true), m_t(t) {} + constexpr OptionalStorage(T&& t) : m_is_present(true), m_t(std::move(t)) {} + + constexpr bool has_value() const { return m_is_present; } + + const T& value() const { return this->m_t; } + T& value() { return this->m_t; } + + private: + bool m_is_present; + T m_t; + }; + + template + struct OptionalStorage + { + constexpr OptionalStorage() : m_t(nullptr) {} + constexpr OptionalStorage(T& t) : m_t(&t) {} + + constexpr bool has_value() const { return m_t != nullptr; } + + T& value() const { return *this->m_t; } + + private: + T* m_t; + }; + } + template - class Optional + struct Optional { - public: - constexpr Optional() : m_is_present(false), m_t() {} + constexpr Optional() {} // Constructors are intentionally implicit - constexpr Optional(NullOpt) : m_is_present(false), m_t() {} + constexpr Optional(NullOpt) {} - Optional(const T& t) : m_is_present(true), m_t(t) {} + Optional(const T& t) : m_base(t) {} - Optional(T&& t) : m_is_present(true), m_t(std::move(t)) {} + template::value>> + Optional(T&& t) : m_base(std::move(t)) + { + } T&& value_or_exit(const LineInfo& line_info) && { this->exit_if_null(line_info); - return std::move(this->m_t); + return std::move(this->m_base.value()); } const T& value_or_exit(const LineInfo& line_info) const& { this->exit_if_null(line_info); - return this->m_t; + return this->m_base.value(); } - constexpr explicit operator bool() const { return this->m_is_present; } + constexpr explicit operator bool() const { return this->m_base.has_value(); } - constexpr bool has_value() const { return m_is_present; } + constexpr bool has_value() const { return this->m_base.has_value(); } template T value_or(U&& default_value) const& { - return bool(*this) ? this->m_t : static_cast(std::forward(default_value)); + return this->m_base.has_value() ? this->m_base.value() : static_cast(std::forward(default_value)); } template T value_or(U&& default_value) && { - return bool(*this) ? std::move(this->m_t) : static_cast(std::forward(default_value)); + return this->m_base.has_value() ? std::move(this->m_base.value()) + : static_cast(std::forward(default_value)); } - const T* get() const { return bool(*this) ? &this->m_t : nullptr; } + typename std::add_pointer::type get() const + { + return this->m_base.has_value() ? &this->m_base.value() : nullptr; + } - T* get() { return bool(*this) ? &this->m_t : nullptr; } + typename std::add_pointer::type get() { return this->m_base.has_value() ? &this->m_base.value() : nullptr; } private: void exit_if_null(const LineInfo& line_info) const { - Checks::check_exit(line_info, this->m_is_present, "Value was null"); + Checks::check_exit(line_info, this->m_base.has_value(), "Value was null"); } - bool m_is_present; - T m_t; + details::OptionalStorage m_base; }; template diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 155b16cf7..44d09ae15 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -6,6 +6,8 @@ #include #include +#include + namespace vcpkg::Util { template @@ -29,6 +31,22 @@ namespace vcpkg::Util } } + namespace Maps + { + template + using FirstT = std::remove_reference_t().first)>; + + template>> + Optional maybe_find(Container&& assoc_container, const K& key) + { + auto it = assoc_container.find(key); + if (it == assoc_container.end()) + return nullopt; + else + return it->second; + } + } + template using FmapOut = decltype(std::declval()(*begin(std::declval()))); diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index dce294004..ee25f272a 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -75,8 +75,14 @@ namespace vcpkg::Commands::CI void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); - const std::vector exclusions = Strings::split(options.settings.at(OPTION_EXCLUDE), ","); - const std::set exclusions_set(exclusions.cbegin(), exclusions.cend()); + + std::set exclusions_set; + auto maybe_exclusions = Util::Maps::maybe_find(options.settings, OPTION_EXCLUDE); + if (auto p_exclusions = maybe_exclusions.get()) + { + auto exclusions = Strings::split(*p_exclusions, ","); + exclusions_set.insert(exclusions.begin(), exclusions.end()); + } std::vector triplets; for (const std::string& triplet : args.command_arguments) -- cgit v1.2.3 From 6ece1871b1c4249c667d6f1ca096fcb12861303f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 11 Nov 2017 22:10:38 -0800 Subject: [vcpkg] Simplify code -- Maps::maybe_find is not very useful compared to iterators. --- toolsrc/include/vcpkg/base/util.h | 16 ---------------- toolsrc/src/vcpkg/commands.ci.cpp | 6 +++--- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 44d09ae15..3d56c1e10 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -31,22 +31,6 @@ namespace vcpkg::Util } } - namespace Maps - { - template - using FirstT = std::remove_reference_t().first)>; - - template>> - Optional maybe_find(Container&& assoc_container, const K& key) - { - auto it = assoc_container.find(key); - if (it == assoc_container.end()) - return nullopt; - else - return it->second; - } - } - template using FmapOut = decltype(std::declval()(*begin(std::declval()))); diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index ee25f272a..65adade1a 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -77,10 +77,10 @@ namespace vcpkg::Commands::CI const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); std::set exclusions_set; - auto maybe_exclusions = Util::Maps::maybe_find(options.settings, OPTION_EXCLUDE); - if (auto p_exclusions = maybe_exclusions.get()) + auto it_exclusions = options.settings.find(OPTION_EXCLUDE); + if (it_exclusions != options.settings.end()) { - auto exclusions = Strings::split(*p_exclusions, ","); + auto exclusions = Strings::split(it_exclusions->second, ","); exclusions_set.insert(exclusions.begin(), exclusions.end()); } -- cgit v1.2.3 From e4786a054d53d1c7f3f1ae24ce6004733af61a43 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 11 Nov 2017 22:40:53 -0800 Subject: Improve error message --- toolsrc/src/vcpkg/postbuildlint.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp index 0063f8d98..d83d656cf 100644 --- a/toolsrc/src/vcpkg/postbuildlint.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -74,8 +74,9 @@ namespace vcpkg::PostBuildLint const fs::path include_dir = package_dir / "include"; if (!fs.exists(include_dir) || fs.is_empty(include_dir)) { - System::println(System::Color::warning, - "The folder /include is empty. This indicates the library was not correctly installed."); + System::println( + System::Color::warning, + "The folder /include is empty or not present. This indicates the library was not correctly installed."); return LintStatus::ERROR_DETECTED; } -- cgit v1.2.3 From 6732d76e14678b51a69a8ae4b151e3d4fce6edaf Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 11 Nov 2017 22:43:07 -0800 Subject: Fix header conflict caused by wincrypt/winsock2 and older Windows SDKs If a project was using Windows 7 SDK and vcpkg was integrated, the project would fail to build (the vcpkg ports use Windows 8.1/10 SDK) --- ports/wincrypt/CONTROL | 2 +- ports/wincrypt/portfile.cmake | 16 ++++------------ ports/winsock2/CONTROL | 2 +- ports/winsock2/portfile.cmake | 16 ++++------------ 4 files changed, 10 insertions(+), 26 deletions(-) diff --git a/ports/wincrypt/CONTROL b/ports/wincrypt/CONTROL index 78803229c..c83865407 100644 --- a/ports/wincrypt/CONTROL +++ b/ports/wincrypt/CONTROL @@ -1,3 +1,3 @@ Source: wincrypt -Version: 0.0 +Version: 0.0-1 Description: Windows Cryptography. \ No newline at end of file diff --git a/ports/wincrypt/portfile.cmake b/ports/wincrypt/portfile.cmake index 8ded1cdc4..6ce62cfee 100644 --- a/ports/wincrypt/portfile.cmake +++ b/ports/wincrypt/portfile.cmake @@ -18,17 +18,6 @@ if (NOT EXISTS "${LIBFILEPATH}") message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}") endif() -file(MAKE_DIRECTORY - ${CURRENT_PACKAGES_DIR}/include - ${CURRENT_PACKAGES_DIR}/lib - ${CURRENT_PACKAGES_DIR}/debug/lib - ${CURRENT_PACKAGES_DIR}/share/wincrypt -) - -file(COPY - "${HEADERSPATH}\\Wincrypt.h" - DESTINATION ${CURRENT_PACKAGES_DIR}/include - ) file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) @@ -37,4 +26,7 @@ if (DEFINED LICENSEPATH) file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See the accompanying sdk_license.rtf") else() file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") -endif() \ No newline at end of file +endif() + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) \ No newline at end of file diff --git a/ports/winsock2/CONTROL b/ports/winsock2/CONTROL index 4b56e50bf..298fd7ebd 100644 --- a/ports/winsock2/CONTROL +++ b/ports/winsock2/CONTROL @@ -1,3 +1,3 @@ Source: winsock2 -Version: 0.0 +Version: 0.0-1 Description: Windows Sockets. \ No newline at end of file diff --git a/ports/winsock2/portfile.cmake b/ports/winsock2/portfile.cmake index 81fd38992..0f55c1227 100644 --- a/ports/winsock2/portfile.cmake +++ b/ports/winsock2/portfile.cmake @@ -18,17 +18,6 @@ if (NOT EXISTS "${LIBFILEPATH}") message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}") endif() -file(MAKE_DIRECTORY - ${CURRENT_PACKAGES_DIR}/include - ${CURRENT_PACKAGES_DIR}/lib - ${CURRENT_PACKAGES_DIR}/debug/lib - ${CURRENT_PACKAGES_DIR}/share/winsock2 -) - -file(COPY - "${HEADERSPATH}\\Winsock2.h" - DESTINATION ${CURRENT_PACKAGES_DIR}/include - ) file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) @@ -37,4 +26,7 @@ if (DEFINED LICENSEPATH) file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See the accompanying sdk_license.rtf") else() file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") -endif() \ No newline at end of file +endif() + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) \ No newline at end of file -- cgit v1.2.3 From c2a757ab9acecfced03da57bc5a3595dff441030 Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 10 Nov 2017 17:34:48 -0600 Subject: [if97] fix source path Closes #2162 --- ports/if97/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/if97/portfile.cmake b/ports/if97/portfile.cmake index 043094361..4f8d28e82 100644 --- a/ports/if97/portfile.cmake +++ b/ports/if97/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) set(PORT_VERSION 2.1.0) vcpkg_from_github( - OUT_SOURCE_PATH ${SOURCE_PATH} + OUT_SOURCE_PATH SOURCE_PATH REPO CoolProp/IF97 REF v${PORT_VERSION} SHA512 f8cde0538af395d8d82998bd71f28d89cd5c6fcfdf16410b0630a0f8b59ec86ff8a748b05681e65cbece051db5be6b960b6ea4fc8bce83b4309f46896083164a -- cgit v1.2.3 From 49e82f5db2ad2283c08216a7d940e78320372e12 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 10 Nov 2017 21:01:35 -0800 Subject: [glm] update to 0.9.8.5 --- ports/glm/CONTROL | 2 +- ports/glm/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/glm/CONTROL b/ports/glm/CONTROL index 36a40e32d..4e7bad7ee 100644 --- a/ports/glm/CONTROL +++ b/ports/glm/CONTROL @@ -1,3 +1,3 @@ Source: glm -Version: 0.9.8.4-1 +Version: 0.9.8.5 Description: OpenGL Mathematics (GLM) https://glm.g-truc.net diff --git a/ports/glm/portfile.cmake b/ports/glm/portfile.cmake index ff988c47b..81e764f06 100644 --- a/ports/glm/portfile.cmake +++ b/ports/glm/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO g-truc/glm - REF 0.9.8.4 - SHA512 ff0e0651a695caebe9235882d14e09546d52b3cdf66cca8e2078f15b02a3fca4e47bd97d2807aa329f76aa633af3b4999501bd4d0b22ad44b00558d4917f39ed + REF 0.9.8.5 + SHA512 5a7e84ecc5a54320c74776c133bfdbeaf0d4496a7a7fdf2f4ccf89e66b3665a577a370a662ac97a350a2b1f717ce769cb0826057ebb3b13c9c2fee65f20ac7b4 HEAD_REF master ) -- cgit v1.2.3 From ca947c664ace9039b14126dedccd12616add09c9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 12 Nov 2017 00:22:51 -0800 Subject: [allegro5][refprop-headers][libsodium][arb] Fix use of vcpkg_from_github's OUT_SOURCE_PATH parameter. Fixes #2178. --- ports/allegro5/portfile.cmake | 3 +-- ports/arb/portfile.cmake | 3 +-- ports/libsodium/portfile.cmake | 3 +-- ports/refprop-headers/portfile.cmake | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index d4f74a569..46cb8020d 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -11,9 +11,8 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/allegro5-e8b209bc20a60224859eb8a0cae082bd20d32ed1) vcpkg_from_github( - OUT_SOURCE_PATH ${SOURCE_PATH} + OUT_SOURCE_PATH SOURCE_PATH REPO liballeg/allegro5 REF e8b209bc20a60224859eb8a0cae082bd20d32ed1 SHA512 50b30d4b539bd4a2488d2b33e9fbfc6fdfd340039d9086993a5719bab3cb020ee6fe7f6d3578755a52c8aab9816d25cd74710ce93b0b374a2f97620b6138419d diff --git a/ports/arb/portfile.cmake b/ports/arb/portfile.cmake index 234ce1778..9b621723b 100644 --- a/ports/arb/portfile.cmake +++ b/ports/arb/portfile.cmake @@ -4,10 +4,9 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/arb-2.11.1) vcpkg_from_github( - OUT_SOURCE_PATH ${SOURCE_PATH} + OUT_SOURCE_PATH SOURCE_PATH REPO fredrik-johansson/arb REF 2.11.1 SHA512 7a014da5208b55f20c7a3cd3eb51070b09ae107b04cbbd6329925780c2ab4d7c38e1fb3619f21456fa806939818370fcae921f59eb013661b6bdd3d0971e3353 diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index b2329d248..4e6cd6be7 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -1,10 +1,9 @@ include(vcpkg_common_functions) set(LIBSODIUM_VERSION 1.0.15) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsodium-${LIBSODIUM_VERSION}) vcpkg_from_github( - OUT_SOURCE_PATH ${SOURCE_PATH} + OUT_SOURCE_PATH SOURCE_PATH REPO jedisct1/libsodium REF ${LIBSODIUM_VERSION} SHA512 ec497cb0007597efaeae0aecaa7484d6dcc53367607ec3fd28a98c6209f0cdecd5a6f560c15badd3a69b8da7d63676b11fb395ef4ed4da9b80467dbdc5f65a72 diff --git a/ports/refprop-headers/portfile.cmake b/ports/refprop-headers/portfile.cmake index c8024d052..4b6274e12 100644 --- a/ports/refprop-headers/portfile.cmake +++ b/ports/refprop-headers/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) set(PORT_COMMIT 882aec454b2bc3d5323b8691736ff09c288f4ed6) vcpkg_from_github( - OUT_SOURCE_PATH ${SOURCE_PATH} + OUT_SOURCE_PATH SOURCE_PATH REPO CoolProp/REFPROP-headers REF ${PORT_COMMIT} SHA512 23ee3df4ffe21b2d790efa27a1b8ea5fa4fce0a274d78e493a2d71043670420e19216f925d23d04f6139ca084a21b97028bd2547f3dbd00ffbb33d0c0bbfece5 -- cgit v1.2.3 From fffaa4af7efd8403aa860358888d5346f8b33c9a Mon Sep 17 00:00:00 2001 From: Tushar Maheshwari Date: Sun, 12 Nov 2017 14:14:39 +0530 Subject: libuv update --- ports/libuv/CMakeLists.txt | 1 + ports/libuv/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/libuv/CMakeLists.txt b/ports/libuv/CMakeLists.txt index cd5d9f66f..87c0a6c95 100644 --- a/ports/libuv/CMakeLists.txt +++ b/ports/libuv/CMakeLists.txt @@ -5,6 +5,7 @@ file(GLOB UV_SOURCES_COMMON src/*.c) file(GLOB UV_SOURCES_WIN src/win/*.c) add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN}) +target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600") target_link_libraries(libuv iphlpapi psapi shell32 userenv ws2_32) target_include_directories(libuv PUBLIC ./include PRIVATE ./src) set_target_properties(libuv PROPERTIES DEFINE_SYMBOL BUILDING_UV_SHARED) diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index 2e07ff607..e46dc9430 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.14.1 - SHA512 de78909e92757ce024a48d5a12a1aedd8015d7135cee374965dc38c07c29352ea411a31921910653728b3f73aca0275382cbf2130144da65e50a472b17849ade + REF v1.16.1 + SHA512 e75c735467c5fc1681bee2b4f4ffae63116644309016d0f507b37643697ae8c85b3be7309288b1aca8fa11c6cb1dc1873962d1dc18fa3ed8cb66c8d2514c95e6 HEAD_REF v1.x) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 8fd6bcfe6fcae20f2ec729a7cd177bb472c956a0 Mon Sep 17 00:00:00 2001 From: Tushar Maheshwari Date: Sun, 12 Nov 2017 19:02:44 +0530 Subject: Fixing libuv/CONTROL --- ports/libuv/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index ba5d7e85e..256897afb 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.14.1-1 +Version: 1.16.1 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. -- cgit v1.2.3 From 6a7d311ea5f180bdc86bb80bb04ed058fa518015 Mon Sep 17 00:00:00 2001 From: Sean Warren Date: Mon, 13 Nov 2017 12:14:05 +1100 Subject: [libraw] Add 'd' debug postfix --- ports/libraw/portfile.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/libraw/portfile.cmake b/ports/libraw/portfile.cmake index 797ca5aa0..ee3c1ae26 100644 --- a/ports/libraw/portfile.cmake +++ b/ports/libraw/portfile.cmake @@ -26,6 +26,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DINSTALL_CMAKE_MODULE_PATH=${CURRENT_PACKAGES_DIR}/share/libraw + -DCMAKE_DEBUG_POSTFIX=d ) vcpkg_install_cmake() @@ -40,9 +41,9 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/include/libraw/libraw_types.h "${LIBRAW_H}") # Rename thread-safe version to be "raw.lib". This is unfortunately needed # because otherwise libraries that build on top of libraw have to choose. -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/raw.lib ${CURRENT_PACKAGES_DIR}/debug/lib/raw.lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/raw.lib ${CURRENT_PACKAGES_DIR}/debug/lib/rawd.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/raw_r.lib ${CURRENT_PACKAGES_DIR}/lib/raw.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/raw_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/raw.lib) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/raw_rd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/rawd.lib) # Cleanup file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -53,7 +54,7 @@ file(REMOVE ${DEBUG_EXECUTABLES}) 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/raw.dll ${CURRENT_PACKAGES_DIR}/debug/bin/raw.dll) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/raw.dll ${CURRENT_PACKAGES_DIR}/debug/bin/rawd.dll) endif() # Rename cmake module into a config in order to allow more flexible lookup rules -- cgit v1.2.3 From 8bf974b0add21961b85bd2c4c47b01db6655a119 Mon Sep 17 00:00:00 2001 From: gknowles Date: Fri, 10 Nov 2017 23:46:58 -0800 Subject: [dimcli] update to 3.1.1 --- ports/dimcli/CONTROL | 2 +- ports/dimcli/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/dimcli/CONTROL b/ports/dimcli/CONTROL index 2b108239d..c8b8c56e2 100644 --- a/ports/dimcli/CONTROL +++ b/ports/dimcli/CONTROL @@ -1,3 +1,3 @@ Source: dimcli -Version: 2.0.0-1 +Version: 3.1.1-1 Description: C++ command line parser toolkit diff --git a/ports/dimcli/portfile.cmake b/ports/dimcli/portfile.cmake index 72097a5f5..3c4eb912c 100644 --- a/ports/dimcli/portfile.cmake +++ b/ports/dimcli/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gknowles/dimcli - REF v2.0.0 - SHA512 55ff29e3ddd6a96946f58e661231a1d2197f56a86c9260142f083589738aaa5e2f7721c754fa4a86b450a943c19367e1c4f82aec57e5b7ae7336f989e0194dec + REF v3.1.1 + SHA512 ed9aeedc59a9d48c59aa8dd1adb9cb110771c1eab0bbab8f8b518e12a45cdafb0ea94301d082ed3a033ca2428c19c8d990c76f666d1e9822cddf6e744f1db701 HEAD_REF master ) set(staticCrt OFF) @@ -13,7 +13,7 @@ if(VCPKG_CRT_LINKAGE STREQUAL static) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DLINK_STATIC_RUNTIME:BOOL=${staticCrt} + OPTIONS -DLINK_STATIC_RUNTIME:BOOL=${staticCrt} -DINSTALL_LIBS:BOOL=ON ) vcpkg_install_cmake() -- cgit v1.2.3 From a4761aa26b21f3fe621d3fc95d06c0abe478760e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 13 Nov 2017 02:51:09 -0800 Subject: [libraw] Bump version --- ports/libraw/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libraw/CONTROL b/ports/libraw/CONTROL index 4860b0a6b..e49e79f66 100644 --- a/ports/libraw/CONTROL +++ b/ports/libraw/CONTROL @@ -1,4 +1,4 @@ Source: libraw -Version: 0.18.2-4 +Version: 0.18.2-5 Build-Depends: lcms, jasper Description: raw image decoder library -- cgit v1.2.3 From 28aaced0f592796f65102c516627a939d9bd7fa8 Mon Sep 17 00:00:00 2001 From: Sean Warren Date: Mon, 13 Nov 2017 12:21:27 +1100 Subject: [lcms] Add 'd' debug postfix --- ports/lcms/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/lcms/CMakeLists.txt b/ports/lcms/CMakeLists.txt index 809fe505e..10ccc0b02 100644 --- a/ports/lcms/CMakeLists.txt +++ b/ports/lcms/CMakeLists.txt @@ -33,6 +33,8 @@ set(SRCS "src/cmssm.c" ) +set(CMAKE_DEBUG_POSTFIX d) + add_definitions(-DUNICODE -D_UNICODE) if(BUILD_SHARED_LIBS) -- cgit v1.2.3 From 0526ec7678f1fbcc630367d01bec903e1be4a79f Mon Sep 17 00:00:00 2001 From: "Stephen E. Baker" Date: Mon, 13 Nov 2017 21:55:33 -0500 Subject: [sdl2-mixer] Bump to 2.0.2 Follows upstream default mp3 library change from smpeg to mpg123 --- ports/sdl2-mixer/CMakeLists.txt | 40 +++++++++++++++++----------------------- ports/sdl2-mixer/CONTROL | 4 ++-- ports/sdl2-mixer/portfile.cmake | 10 +++++----- 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/ports/sdl2-mixer/CMakeLists.txt b/ports/sdl2-mixer/CMakeLists.txt index 014923628..3a2aa0780 100644 --- a/ports/sdl2-mixer/CMakeLists.txt +++ b/ports/sdl2-mixer/CMakeLists.txt @@ -8,17 +8,16 @@ set(SDL_MIXER_LIBRARIES ${SDL_LIBRARY}) # builtin formats set(SDL_MIXER_DEFINES - WAV_MUSIC - MID_MUSIC - USE_NATIVE_MIDI) + MUSIC_WAV + MUSIC_MID_NATIVE) # MP3 support if(SDL_MIXER_ENABLE_MP3) - find_path(SMPEG_INCLUDE_DIR smpeg.h) - find_library(SMPEG_LIBRARY smpeg2) - list(APPEND SDL_MIXER_INCLUDES ${SMPEG_INCLUDE_DIR}) - list(APPEND SDL_MIXER_LIBRARIES ${SMPEG_LIBRARY}) - list(APPEND SDL_MIXER_DEFINES MP3_MUSIC) + find_path(MPG123_INCLUDE_DIR mpg123.h) + find_library(MPG123_LIBRARY libmpg123) + list(APPEND SDL_MIXER_INCLUDES ${MPG123_INCLUDE_DIR}) + list(APPEND SDL_MIXER_LIBRARIES ${MPG123_LIBRARY}) + list(APPEND SDL_MIXER_DEFINES MUSIC_MP3_MPG123) endif() # FLAC support @@ -27,7 +26,7 @@ if(SDL_MIXER_ENABLE_FLAC) find_library(FLAC_LIBRARY flac) list(APPEND SDL_MIXER_INCLUDES ${FLAC_INCLUDE_DIR}) list(APPEND SDL_MIXER_LIBRARIES ${FLAC_LIBRARY}) - list(APPEND SDL_MIXER_DEFINES FLAC_MUSIC) + list(APPEND SDL_MIXER_DEFINES MUSIC_FLAC) endif() # MOD support @@ -36,7 +35,7 @@ if(SDL_MIXER_ENABLE_MOD) find_library(MODPLUG_LIBRARY modplug) list(APPEND SDL_MIXER_INCLUDES ${MODPLUG_INCLUDE_DIR}) list(APPEND SDL_MIXER_LIBRARIES ${MODPLUG_LIBRARY}) - list(APPEND SDL_MIXER_DEFINES MODPLUG_MUSIC) + list(APPEND SDL_MIXER_DEFINES MUSIC_MOD_MODPLUG) endif() # Ogg-Vorbis support @@ -45,34 +44,29 @@ if(SDL_MIXER_ENABLE_OGGVORBIS) find_library(VORBISFILE_LIBRARY vorbisfile) list(APPEND SDL_MIXER_INCLUDES ${VORBIS_INCLUDE_DIR}) list(APPEND SDL_MIXER_LIBRARIES ${VORBISFILE_LIBRARY}) - list(APPEND SDL_MIXER_DEFINES OGG_MUSIC) + list(APPEND SDL_MIXER_DEFINES MUSIC_OGG) endif() add_library(SDL2_mixer - dynamic_flac.c - dynamic_fluidsynth.c - dynamic_mod.c - dynamic_modplug.c - dynamic_mp3.c - dynamic_ogg.c effect_position.c effect_stereoreverse.c effects_internal.c - fluidsynth.c load_aiff.c - load_flac.c - load_mp3.c - load_ogg.c load_voc.c mixer.c music.c music_cmd.c music_flac.c + music_fluidsynth.c music_mad.c - music_mod.c + music_mikmod.c music_modplug.c + music_mpg123.c + music_nativemidi.c music_ogg.c - wavestream.c + music_smpeg.c + music_timidity.c + music_wav.c native_midi/native_midi_common.c native_midi/native_midi_win32.c) diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL index f0ef29fbd..978b87d13 100644 --- a/ports/sdl2-mixer/CONTROL +++ b/ports/sdl2-mixer/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-mixer -Version: 2.0.1-3 +Version: 2.0.2-1 Description: Multi-channel audio mixer library for SDL. -Build-Depends: sdl2, libflac, smpeg2, libmodplug, libvorbis +Build-Depends: sdl2, libflac, mpg123, libmodplug, libvorbis diff --git a/ports/sdl2-mixer/portfile.cmake b/ports/sdl2-mixer/portfile.cmake index 574e6a1e0..9f6240bcf 100644 --- a/ports/sdl2-mixer/portfile.cmake +++ b/ports/sdl2-mixer/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_mixer-2.0.1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_mixer-2.0.2) vcpkg_download_distfile(ARCHIVE - URLS "https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.zip" - FILENAME "SDL2_mixer-2.0.1.zip" - SHA512 7399f08c5b091698c90d49fcc2996677eae8a36f05a65b4470807c9cf2c04730669e0ca395893cfa49177a929f8c5b2b10b6c541ba2fe2646300dcdad4ec1d9e) + URLS "https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.2.zip" + FILENAME "SDL2_mixer-2.0.2.zip" + SHA512 da0c27c560a153d57d69a1b6c58a288f017762afc654749957072900a904d3dac19a0efcb68516cb166546d29ff570462385016e0041dae6f393ccb4bbd2ffbc) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -12,7 +12,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DSDL_MIXER_ENABLE_MP3=ON # smpeg2 + -DSDL_MIXER_ENABLE_MP3=ON # mpg123 -DSDL_MIXER_ENABLE_FLAC=ON # libflac -DSDL_MIXER_ENABLE_MOD=ON # libmodplug -DSDL_MIXER_ENABLE_OGGVORBIS=ON # libvorbis -- cgit v1.2.3 From 48c3fe7dde8c180952e7eaaa71418d1eb1064f09 Mon Sep 17 00:00:00 2001 From: yintothayang Date: Tue, 14 Nov 2017 12:20:23 +0900 Subject: small version bump to redshell port --- ports/redshell/CONTROL | 2 +- ports/redshell/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/redshell/CONTROL b/ports/redshell/CONTROL index 54d211498..4a3970084 100644 --- a/ports/redshell/CONTROL +++ b/ports/redshell/CONTROL @@ -1,4 +1,4 @@ Source: redshell -Version: 1.0.0 +Version: 1.1.2 Description: RedShell C++ SDK. Steam attribution tracking, www.redshell.io # Built-Using: openssl (= 1.0.2k-2), cpprestsdk (= 2.9.0-2), boost (= 1.64-4), websocketpp (= 0.7.0), zlib (= 1.2.11), bzip2 (= 1.0.6-1) diff --git a/ports/redshell/portfile.cmake b/ports/redshell/portfile.cmake index d7fbec955..929c8ef24 100644 --- a/ports/redshell/portfile.cmake +++ b/ports/redshell/portfile.cmake @@ -22,8 +22,8 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/redshell) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Innervate/red-shell-cpp - REF 1.0.0 - SHA512 00c79a09e92131e4ee0f46b14a2280bdb4e8c5970876dba99e8edd2294813f1b602eb0c9c8e24c9fd363a5c276dfa3daaf71f6ba2774842a8b565c803b3ff08c + REF 1.1.2 + SHA512 7ed9f2945b55e6cdba9c3e6c1c11e5363ec834924313eb62ac8b077db0a0c556a89b212d1e8319e915b31514371b9d81beaaca06f277f15ad1b80ea2ac071b2e HEAD_REF master ) -- cgit v1.2.3 From 415789b42e5fd43ac984902cd72848f6ef6b450a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 13 Nov 2017 21:36:29 -0800 Subject: [vcpkg-metrics] Replace SQM with MAC hash. --- scripts/SHA256Hash.ps1 | 9 +++++++ toolsrc/include/vcpkg/metrics.h | 4 +-- toolsrc/src/vcpkg.cpp | 59 ++++++++++++++++++++++++++--------------- toolsrc/src/vcpkg/metrics.cpp | 36 ++++++++++++++++++++++--- 4 files changed, 80 insertions(+), 28 deletions(-) create mode 100644 scripts/SHA256Hash.ps1 diff --git a/scripts/SHA256Hash.ps1 b/scripts/SHA256Hash.ps1 new file mode 100644 index 000000000..348d461b7 --- /dev/null +++ b/scripts/SHA256Hash.ps1 @@ -0,0 +1,9 @@ +[CmdletBinding()] +Param( + [Parameter(Mandatory=$True)] + [String]$Value +) + +$sha256 = New-Object -TypeName System.Security.Cryptography.SHA256CryptoServiceProvider +$utf8 = New-Object -TypeName System.Text.UTF8Encoding +[System.BitConverter]::ToString($sha256.ComputeHash($utf8.GetBytes($Value))) diff --git a/toolsrc/include/vcpkg/metrics.h b/toolsrc/include/vcpkg/metrics.h index f73c636cf..ee6f8eb51 100644 --- a/toolsrc/include/vcpkg/metrics.h +++ b/toolsrc/include/vcpkg/metrics.h @@ -11,7 +11,7 @@ namespace vcpkg::Metrics void set_send_metrics(bool should_send_metrics); void set_print_metrics(bool should_print_metrics); void set_user_information(const std::string& user_id, const std::string& first_use_time); - void init_user_information(std::string& user_id, std::string& first_use_time); + static void init_user_information(std::string& user_id, std::string& first_use_time); void track_metric(const std::string& name, double value); void track_property(const std::string& name, const std::string& value); @@ -22,6 +22,6 @@ namespace vcpkg::Metrics extern Util::LockGuarded g_metrics; - std::string get_SQM_user(); + std::string get_MAC_user(); bool get_compiled_metrics_enabled(); } diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 2a73c5b0f..5642f937c 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -157,6 +157,7 @@ static void load_config() CoTaskMemFree(localappdatapath); } + std::string user_id, user_time, user_mac; try { auto maybe_pghs = Paragraphs::get_paragraphs(Files::get_real_filesystem(), localappdata / "vcpkg" / "config"); @@ -173,39 +174,54 @@ static void load_config() keys.insert(p); } - auto user_id = keys["User-Id"]; - auto user_time = keys["User-Since"]; - if (!user_id.empty() && !user_time.empty()) - { - Metrics::g_metrics.lock()->set_user_information(user_id, user_time); - return; - } + user_id = keys["User-Id"]; + user_time = keys["User-Since"]; + user_mac = keys["Mac-Hash"]; } } catch (...) { } + bool write_config = false; + // config file not found, could not be read, or invalid - std::string user_id, user_time; + if (user_id.empty() || user_time.empty()) { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->init_user_information(user_id, user_time); - locked_metrics->set_user_information(user_id, user_time); + ::vcpkg::Metrics::Metrics::init_user_information(user_id, user_time); + write_config = true; } - try + + if (user_mac.empty()) { - std::error_code ec; - auto& fs = Files::get_real_filesystem(); - fs.create_directory(localappdata / "vcpkg", ec); - fs.write_contents(localappdata / "vcpkg" / "config", - Strings::format("User-Id: %s\n" - "User-Since: %s\n", - user_id, - user_time)); + user_mac = Metrics::get_MAC_user(); + write_config = true; } - catch (...) + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->set_user_information(user_id, user_time); + locked_metrics->track_property("user_mac", user_mac); + } + + if (write_config) + { + try + { + std::error_code ec; + auto& fs = Files::get_real_filesystem(); + fs.create_directory(localappdata / "vcpkg", ec); + fs.write_contents(localappdata / "vcpkg" / "config", + Strings::format("User-Id: %s\n" + "User-Since: %s\n" + "Mac-Hash: %s\n", + user_id, + user_time, + user_mac)); + } + catch (...) + { + } } #endif } @@ -259,7 +275,6 @@ int main(const int argc, const char* const* const argv) #endif } load_config(); - Metrics::g_metrics.lock()->track_property("sqmuser", Metrics::get_SQM_user()); const VcpkgCmdArguments args = VcpkgCmdArguments::create_from_command_line(argc, argv); diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 8f2575886..d7e18a176 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -233,12 +233,40 @@ namespace vcpkg::Metrics bool get_compiled_metrics_enabled() { return DISABLE_METRICS == 0; } - std::string get_SQM_user() + static fs::path get_vcpkg_root() + { + return Files::get_real_filesystem().find_file_recursively_up( + fs::stdfs::absolute(System::get_exe_path_of_current_process()), ".vcpkg-root"); + } + + std::string get_MAC_user() { #if defined(_WIN32) - auto hkcu_sqmclient = - System::get_registry_string(HKEY_CURRENT_USER, R"(Software\Microsoft\SQMClient)", "UserId"); - return hkcu_sqmclient.value_or("{}"); + auto getmac = System::cmd_execute_and_capture_output("getmac"); + + if (getmac.exit_code != 0) return "0"; + + std::regex mac_regex("([a-fA-F0-9]{2}(-[a-fA-F0-9]{2}){5})"); + std::sregex_iterator next(getmac.output.begin(), getmac.output.end(), mac_regex); + std::sregex_iterator last; + + while (next != last) + { + auto match = *next; + if (match[0] != "00-00-00-00-00-00") + { + std::string matchstr = match[0]; + auto hash_result = System::powershell_execute_and_capture_output( + "SHA256Hash", get_vcpkg_root() / "SHA256Hash.ps1", Strings::format("-Value \"%s\"", matchstr)); + Util::erase_remove_if(hash_result, + [](char ch) { return !(ch >= 'A' && ch <= 'F') && !(ch >= '0' && ch <= '9'); }); + hash_result = Strings::ascii_to_lowercase(hash_result); + return hash_result; + } + ++next; + } + + return "0"; #else return "{}"; #endif -- cgit v1.2.3 From 71289ee5e8e5286fde47ec563bfdcdb2cb9c369d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 13 Nov 2017 23:06:04 -0800 Subject: [vcpkg-contact] Add --survey so users can easily provide feedback --- toolsrc/include/vcpkg/base/util.h | 4 ++-- toolsrc/src/vcpkg/commands.contact.cpp | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 3d56c1e10..8d78fd6cc 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -24,8 +24,8 @@ namespace vcpkg::Util namespace Sets { - template> - bool contains(const Container& container, const T& item) + template + bool contains(const Container& container, const ElementT& item) { return container.find(item) != container.cend(); } diff --git a/toolsrc/src/vcpkg/commands.contact.cpp b/toolsrc/src/vcpkg/commands.contact.cpp index 5d62faeea..07dcea80e 100644 --- a/toolsrc/src/vcpkg/commands.contact.cpp +++ b/toolsrc/src/vcpkg/commands.contact.cpp @@ -12,19 +12,29 @@ namespace vcpkg::Commands::Contact return S_EMAIL; } + static const CommandSwitch switches[] = {{"--survey", "Launch default browser to the current vcpkg survey"}}; + const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("contact"), 0, 0, - {}, + {switches, {}}, nullptr, }; void perform_and_exit(const VcpkgCmdArguments& args) { - args.parse_arguments(COMMAND_STRUCTURE); + auto parsed_args = args.parse_arguments(COMMAND_STRUCTURE); - System::println("Send an email to %s with any feedback.", email()); + if (Util::Sets::contains(parsed_args.switches, switches[0].name)) + { + System::cmd_execute("start https://aka.ms/NPS_vcpkg"); + System::println("Default browser launched to https://aka.ms/NPS_vcpkg, thank you for your feedback!"); + } + else + { + System::println("Send an email to %s with any feedback.", email()); + } Checks::exit_success(VCPKG_LINE_INFO); } } -- cgit v1.2.3 From 194edb784d61bd7a7e5885260954452422d450d3 Mon Sep 17 00:00:00 2001 From: Christopher Warrington Date: Tue, 14 Nov 2017 00:44:24 -0800 Subject: Upgrade Bond to 7.0.2 * Updated to the 7.0.2 release of Bond. * Regenerated patches. --- ports/bond/0001_boost_static_libs.patch | 6 +++--- ports/bond/CONTROL | 2 +- ports/bond/portfile.cmake | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ports/bond/0001_boost_static_libs.patch b/ports/bond/0001_boost_static_libs.patch index de40a6254..99eeb712e 100644 --- a/ports/bond/0001_boost_static_libs.patch +++ b/ports/bond/0001_boost_static_libs.patch @@ -1,8 +1,8 @@ diff --git a/cmake/Config.cmake b/cmake/Config.cmake -index d5125c70..a2eb536c 100644 +index b51c76a6..4cb5a6ff 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake -@@ -46,7 +46,7 @@ if (MSVC) +@@ -52,7 +52,7 @@ if (MSVC) add_compile_options (/permissive-) endif() @@ -11,7 +11,7 @@ index d5125c70..a2eb536c 100644 endif (MSVC) if (WIN32) -@@ -131,9 +131,6 @@ if (DEFINED ENV{APPVEYOR} AND ("$ENV{BOND_BUILD}" STREQUAL "C++")) +@@ -137,9 +137,6 @@ if (DEFINED ENV{APPVEYOR} AND ("$ENV{BOND_BUILD}" STREQUAL "C++")) endif() endif() diff --git a/ports/bond/CONTROL b/ports/bond/CONTROL index e69c925d6..6680b6dd3 100644 --- a/ports/bond/CONTROL +++ b/ports/bond/CONTROL @@ -1,5 +1,5 @@ Source: bond Maintainer: bond@microsoft.com -Version: 6.0.0-1 +Version: 7.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. Build-Depends: boost, rapidjson diff --git a/ports/bond/portfile.cmake b/ports/bond/portfile.cmake index 147ebeea8..40d3a6d0a 100644 --- a/ports/bond/portfile.cmake +++ b/ports/bond/portfile.cmake @@ -4,24 +4,24 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bond-6.0.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bond-7.0.2) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/bond/archive/6.0.0.zip" - FILENAME "bond-6.0.0.zip" - SHA512 d585debabb7b74c1e85313278456bd6b63a388dbf64515c550b1d9739114b0963ffb1982d145fa4d3717747e8eba82e79ed2744a6c9e3cb1615d9a78b75b42bb + 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/6.0.0/gbc-6.0.0-amd64.exe.zip" - FILENAME "gbc-6.0.0-amd64.zip" - SHA512 2aa4b5add478b952cb7733dcbf5c35634cde66812f1f1920d5fb1e2a52681a101ac6157bdba535a59316c4590fa37c74889b734106ca3e202a7a5ec0bcb1847f + 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_extract_source_archive(${ARCHIVE}) # Extract the precompiled gbc vcpkg_extract_source_archive(${GBC_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/tools/) -set(FETCHED_GBC_PATH ${CURRENT_BUILDTREES_DIR}/tools/gbc-6.0.0-amd64.exe) +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.") -- cgit v1.2.3 From f06bf273971ffede4d2a8fefea0de383841cc8b7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 14 Nov 2017 01:39:59 -0800 Subject: [bond] Boost patch is no longer needed due to toolchain improvements. --- ports/bond/0001_boost_static_libs.patch | 23 ----------------------- ports/bond/portfile.cmake | 3 --- 2 files changed, 26 deletions(-) delete mode 100644 ports/bond/0001_boost_static_libs.patch diff --git a/ports/bond/0001_boost_static_libs.patch b/ports/bond/0001_boost_static_libs.patch deleted file mode 100644 index 99eeb712e..000000000 --- a/ports/bond/0001_boost_static_libs.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/cmake/Config.cmake b/cmake/Config.cmake -index b51c76a6..4cb5a6ff 100644 ---- a/cmake/Config.cmake -+++ b/cmake/Config.cmake -@@ -52,7 +52,7 @@ if (MSVC) - add_compile_options (/permissive-) - endif() - -- set (Boost_USE_STATIC_LIBS ON) -+ set (Boost_USE_STATIC_LIBS OFF) - endif (MSVC) - - if (WIN32) -@@ -137,9 +137,6 @@ if (DEFINED ENV{APPVEYOR} AND ("$ENV{BOND_BUILD}" STREQUAL "C++")) - endif() - endif() - --# disable Boost auto-linking --add_definitions (-DBOOST_ALL_NO_LIB) -- - # VS2015U2 fixed a bug with atomics and emits a warning without this definition. - add_definitions (-D_ENABLE_ATOMIC_ALIGNMENT_FIX) - diff --git a/ports/bond/portfile.cmake b/ports/bond/portfile.cmake index 40d3a6d0a..2ad48a94d 100644 --- a/ports/bond/portfile.cmake +++ b/ports/bond/portfile.cmake @@ -30,9 +30,6 @@ endif() vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - # Change Boost_USE_STATIC_LIBS to be compatible with vcpkg's treatment - # of Boost - ${CMAKE_CURRENT_LIST_DIR}/0001_boost_static_libs.patch # Don't install rapidjson from the (empty) submodule. With vcpkg, we get # rapidjson from vcpkg ${CMAKE_CURRENT_LIST_DIR}/0002_omit_rapidjson.patch -- cgit v1.2.3 From 5c9f0ff47324634a9796ed5d6cd7350cb06022c2 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 14 Nov 2017 02:13:31 -0800 Subject: [coolprop] Avoid copying entire include/ directory. Add python2 to requirements. Simplify portfile. Fixes #2180. --- ports/coolprop/CONTROL | 2 +- ports/coolprop/portfile.cmake | 36 +++++++++++++++++++++++++----------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/ports/coolprop/CONTROL b/ports/coolprop/CONTROL index 22ccaba2c..16cbefe24 100644 --- a/ports/coolprop/CONTROL +++ b/ports/coolprop/CONTROL @@ -1,4 +1,4 @@ Source: coolprop -Version: 6.1.0-1 +Version: 6.1.0-2 Description: Thermophysical properties for the masses Build-Depends: catch, eigen3, pybind11, if97, fmt, rapidjson, msgpack, refprop-headers diff --git a/ports/coolprop/portfile.cmake b/ports/coolprop/portfile.cmake index 9e0c2274e..2e8c61005 100644 --- a/ports/coolprop/portfile.cmake +++ b/ports/coolprop/portfile.cmake @@ -9,12 +9,27 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR ${PYTHON2} DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${PYTHON2_DIR}") + +file(REMOVE_RECURSE ${SOURCE_PATH}/externals) + # Patch up the file locations file(COPY ${CURRENT_INSTALLED_DIR}/include/catch.hpp DESTINATION ${SOURCE_PATH}/externals/Catch/single_include ) +file(COPY + ${CURRENT_INSTALLED_DIR}/include/eigen3/Eigen + DESTINATION ${SOURCE_PATH}/externals/Eigen +) +file(COPY + ${CURRENT_INSTALLED_DIR}/include/eigen3/unsupported/Eigen + DESTINATION ${SOURCE_PATH}/externals/Eigen/unsupported +) + file(COPY ${CURRENT_INSTALLED_DIR}/include/rapidjson DESTINATION ${SOURCE_PATH}/externals/rapidjson/include @@ -26,8 +41,15 @@ file(COPY ) file(COPY - ${CURRENT_INSTALLED_DIR}/include - DESTINATION ${SOURCE_PATH}/externals/msgpack-c + ${CURRENT_INSTALLED_DIR}/include/msgpack.h + ${CURRENT_INSTALLED_DIR}/include/msgpack.hpp + ${CURRENT_INSTALLED_DIR}/include/msgpack + DESTINATION ${SOURCE_PATH}/externals/msgpack-c/include +) + +file(COPY + ${CURRENT_INSTALLED_DIR}/include/fmt + DESTINATION ${SOURCE_PATH}/externals/cppformat ) file(COPY @@ -43,8 +65,6 @@ file(APPEND string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" COOLPROP_SHARED_LIBRARY) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" COOLPROP_STATIC_LIBRARY) -string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" COOLPROP_MSVC_DYNAMIC) -string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" COOLPROP_MSVC_STATIC) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -52,18 +72,12 @@ vcpkg_configure_cmake( OPTIONS -DCOOLPROP_SHARED_LIBRARY=${COOLPROP_SHARED_LIBRARY} -DCOOLPROP_STATIC_LIBRARY=${COOLPROP_STATIC_LIBRARY} - -DCOOLPROP_MSVC_DYNAMIC=${COOLPROP_MSVC_DYNAMIC} - -DCOOLPROP_MSVC_STATIC=${COOLPROP_MSVC_STATIC} - OPTIONS_RELEASE - -DCOOLPROP_RELEASE=ON - OPTIONS_DEBUG - -DCOOLPROP_DEBUG=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() -if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(TARGET_FOLDER "shared_library") else() set(TARGET_FOLDER "static_library") -- cgit v1.2.3 From 502baf1ccb41aa593062e9c528371ae32e759361 Mon Sep 17 00:00:00 2001 From: Jared Szechy Date: Tue, 14 Nov 2017 12:07:17 -0500 Subject: Add librabbitmq port --- ports/librabbitmq/CONTROL | 4 ++++ ports/librabbitmq/portfile.cmake | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 ports/librabbitmq/CONTROL create mode 100644 ports/librabbitmq/portfile.cmake diff --git a/ports/librabbitmq/CONTROL b/ports/librabbitmq/CONTROL new file mode 100644 index 000000000..19b131f82 --- /dev/null +++ b/ports/librabbitmq/CONTROL @@ -0,0 +1,4 @@ +Source: librabbitmq +Version: 0.8.0 +Build-Depends: openssl +Description: A C-language AMQP client library for use with v2.0+ of the RabbitMQ broker. diff --git a/ports/librabbitmq/portfile.cmake b/ports/librabbitmq/portfile.cmake new file mode 100644 index 000000000..cfdcf9527 --- /dev/null +++ b/ports/librabbitmq/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alanxz/rabbitmq-c + REF v0.8.0 + SHA512 54e1c98a6b0eb7de848c9fac13dcde6455a6f71acee9e62a96c171f0e3e1cf860a70837f07b633d1a55b1ffd3d33ed7186b52495fa4c6e755b69a7e728eb9f1a + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_SHARED_LIBS=${BUILD_SHARED} + -DBUILD_STATIC_LIBS=${BUILD_STATIC} + -DBUILD_TESTS=OFF + -DBUILD_TOOLS=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(INSTALL ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/librabbitmq RENAME copyright) -- cgit v1.2.3 From ca1aa816d2af1b600f68b1c965bed5bd180d829a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 14 Nov 2017 15:27:12 -0800 Subject: [vcpkg-ci] Clean up buildtrees during build to avoid consuming 200+ Gb of SSD --- toolsrc/include/vcpkg/install.h | 12 ++++++++++++ toolsrc/src/vcpkg/commands.ci.cpp | 2 +- toolsrc/src/vcpkg/install.cpp | 18 +++++++++++++++++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index 7bf823e99..df7542318 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -17,6 +17,17 @@ namespace vcpkg::Install inline KeepGoing to_keep_going(const bool value) { return value ? KeepGoing::YES : KeepGoing::NO; } + enum class CleanBuildtrees + { + NO = 0, + YES + }; + + inline CleanBuildtrees to_clean_buildtrees(const bool value) + { + return value ? CleanBuildtrees::YES : CleanBuildtrees::NO; + } + struct SpecSummary { explicit SpecSummary(const PackageSpec& spec); @@ -70,6 +81,7 @@ namespace vcpkg::Install InstallSummary perform(const std::vector& action_plan, const KeepGoing keep_going, + const CleanBuildtrees clean_buildtrees, const VcpkgPaths& paths, StatusParagraphs& status_db); diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 65adade1a..3c1c443f0 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -49,7 +49,7 @@ namespace vcpkg::Commands::CI return Dependencies::AnyAction(std::move(install_action)); }); - return Install::perform(action_plan, Install::KeepGoing::YES, paths, status_db); + return Install::perform(action_plan, Install::KeepGoing::YES, Install::CleanBuildtrees::YES, paths, status_db); } struct TripletAndSummary diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 20ffd3164..88ef5c73d 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -481,6 +481,7 @@ namespace vcpkg::Install InstallSummary perform(const std::vector& action_plan, const KeepGoing keep_going, + const CleanBuildtrees clean_buildtrees, const VcpkgPaths& paths, StatusParagraphs& status_db) { @@ -504,6 +505,21 @@ namespace vcpkg::Install if (const auto install_action = action.install_plan.get()) { const BuildResult result = perform_install_plan_action(paths, *install_action, status_db); + if (clean_buildtrees == CleanBuildtrees::YES) + { + auto& fs = paths.get_filesystem(); + auto buildtrees_dir = paths.buildtrees / install_action->spec.name(); + auto buildtree_files = fs.get_files_non_recursive(buildtrees_dir); + for (auto&& file : buildtree_files) + { + if (fs.is_directory(file) && file.filename() != "src") + { + std::error_code ec; + fs.remove_all(file, ec); + } + } + } + if (result != BuildResult::SUCCEEDED && keep_going == KeepGoing::NO) { System::println(Build::create_user_troubleshooting_message(install_action->spec)); @@ -645,7 +661,7 @@ namespace vcpkg::Install Checks::exit_success(VCPKG_LINE_INFO); } - const InstallSummary summary = perform(action_plan, keep_going, paths, status_db); + const InstallSummary summary = perform(action_plan, keep_going, Install::CleanBuildtrees::NO, paths, status_db); System::println("\nTotal elapsed time: %s", summary.total_elapsed_time); -- cgit v1.2.3 From 2b7cd655c8d52ce40453497ecc06c81dc2977aab Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 14 Nov 2017 16:01:13 -0800 Subject: Update CHANGELOG and bump version to v0.0.97 --- CHANGELOG.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b15a24e46..4f45365ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,59 @@ +vcpkg (0.0.97) +-------------- + * Add ports: + - alac 2017-11-03-c38887c5 + - atkmm 2.24.2 + - blosc 1.12.1 + - coolprop 6.1.0-2 + - discord-rpc 2.0.1 + - freetype-gl 2017-10-9-82fb152a74f01b1483ac80d15935fbdfaf3ed836 + - glibmm 2.52.1 + - gtkmm 3.22.2 + - if97 2.1.0 + - luasocket 2017.05.25.5a17f79b0301f0a1b4c7f1c73388757a7e2ed309 + - pangomm 2.40.1 + - realsense2 2.8.1 + - refprop-headers 2017-11-7-882aec454b2bc3d5323b8691736ff09c288f4ed6 + - sfgui 0.3.2-1 + - tidy-html5 5.4.0-1 + * Update ports: + - abseil 2017-10-14 -> 2017-11-10 + - assimp 4.0.1-2 -> 4.0.1-3 + - bond 6.0.0-1 -> 7.0.2 + - catch 1.11.0 -> 2.0.1-1 + - dimcli 2.0.0-1 -> 3.1.1-1 + - dlib 19.4-5 -> 19.7 + - ffmpeg 3.3.3 -> 3.3.3-1 + - fftw3 3.3.6-p12-1 -> 3.3.7 + - freeglut 3.0.0-2 -> 3.0.0-3 + - freetype 2.8-1 -> 2.8.1-1 + - glbinding 2.1.1-2 -> 2.1.1-3 + - glm 0.9.8.4-1 -> 0.9.8.5 + - grpc 1.6.0-2 -> 1.7.0 + - jasper 2.0.13-1 -> 2.0.14-1 + - libpng 1.6.32-1 -> 1.6.34-2 + - libraw 0.18.2-4 -> 0.18.2-5 + - libsigcpp 2.99-1 -> 2.10 + - libuv 1.14.1-1 -> 1.16.1 + - libwebsockets 2.0.0-2 -> 2.0.0-4 + - ms-gsl 20170425-8b320e3f5d016f953e55dfc7ec8694c1349d3fe4 -> 20171104-d10ebc6555b627c9d1196076a78467e7be505987 + - openal-soft 1.18.1-1 -> 1.18.2-1 + - opencv 3.3.1-6 -> 3.3.1-7 + - openssl 1.0.2l-3 -> 1.0.2m + - pcl 1.8.1-3 -> 1.8.1-4 + - sdl2 2.0.6-1 -> 2.0.7-1 + - sdl2-mixer 2.0.1-3 -> 2.0.2-1 + - sqlite-modern-cpp 2.4 -> 3.2 + - vtk 8.0.1-1 -> 8.0.1-5 + - wincrypt 0.0 -> 0.0-1 + - winsock2 0.0 -> 0.0-1 + * MSBuild integration now outputs a warning when configuration is not determinable. + * Fix Powershell execution failures for users of PSCX. PSCX has an `Expand-Archive` cmdlet that has different parameter names than the same-named cmdlet in Powershell 5. + * `vcpkg_from_github()`: Handle '/' in REFs + +-- vcpkg team TUE, 14 Nov 2017 16:00:00 -0800 + + vcpkg (0.0.96) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index bc63ef127..d7db639a5 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.96" \ No newline at end of file +"0.0.97" \ No newline at end of file -- cgit v1.2.3 From dd695c1184982eac9c802e2385c5a0c3bb7456e0 Mon Sep 17 00:00:00 2001 From: yintothayang Date: Wed, 15 Nov 2017 09:58:21 +0900 Subject: update CONTROL with latest deps --- ports/redshell/CONTROL | 2 +- ports/redshell/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/redshell/CONTROL b/ports/redshell/CONTROL index 4a3970084..adb34e490 100644 --- a/ports/redshell/CONTROL +++ b/ports/redshell/CONTROL @@ -1,4 +1,4 @@ Source: redshell Version: 1.1.2 Description: RedShell C++ SDK. Steam attribution tracking, www.redshell.io -# Built-Using: openssl (= 1.0.2k-2), cpprestsdk (= 2.9.0-2), boost (= 1.64-4), websocketpp (= 0.7.0), zlib (= 1.2.11), bzip2 (= 1.0.6-1) +# Built-Using: openssl (= 1.0.2m), cpprestsdk (= 2.10.0), boost (= 1.65.1-3), websocketpp (= 0.7.0-1), zlib (= 1.2.11-3), bzip2 (= 1.0.6-2) diff --git a/ports/redshell/portfile.cmake b/ports/redshell/portfile.cmake index 929c8ef24..52d5c105e 100644 --- a/ports/redshell/portfile.cmake +++ b/ports/redshell/portfile.cmake @@ -23,7 +23,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Innervate/red-shell-cpp REF 1.1.2 - SHA512 7ed9f2945b55e6cdba9c3e6c1c11e5363ec834924313eb62ac8b077db0a0c556a89b212d1e8319e915b31514371b9d81beaaca06f277f15ad1b80ea2ac071b2e + SHA512 9e0705508928efed5ae5c216316cb0429090cd7131ca7993f585eaf26bccd1e18b93dfeaff0406c64921b06c8312c0d147024af1c29e6003ff35556cda36e57c HEAD_REF master ) -- cgit v1.2.3 From 1c43dfa4a2921fe80954b2b7d63104a2031fb216 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Wed, 15 Nov 2017 07:45:16 +0900 Subject: Fix find debug library of QHull Fix find debug library of QHull. Currently, QHull port generates debug libraries with DEBUG_POSTFIX (_d). Therefore, It doesn't need to be override. --- ports/pcl/CONTROL | 2 +- ports/pcl/config.patch | 2 +- ports/pcl/find_qhull.patch | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index 1e9f8c57b..daadfa911 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,5 +1,5 @@ Source: pcl -Version: 1.8.1-4 +Version: 1.8.1-5 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. Build-Depends: boost, eigen3, flann, qhull, vtk, openni2 diff --git a/ports/pcl/config.patch b/ports/pcl/config.patch index c949f128f..54b7c6413 100644 --- a/ports/pcl/config.patch +++ b/ports/pcl/config.patch @@ -7,7 +7,7 @@ index f4ef6a0ff..3a2c259dc 100644 HINTS "${QHULL_ROOT}" "$ENV{QHULL_ROOT}" PATHS "$ENV{PROGRAMFILES}/qhull" "$ENV{PROGRAMW6432}/qhull" - PATH_SUFFIXES project build bin lib) -+ PATH_SUFFIXES project build bin debug/lib) ++ PATH_SUFFIXES project build bin lib debug/lib) find_package_handle_standard_args(qhull DEFAULT_MSG QHULL_LIBRARY QHULL_INCLUDE_DIRS) diff --git a/ports/pcl/find_qhull.patch b/ports/pcl/find_qhull.patch index 0f5036e1e..e845293be 100644 --- a/ports/pcl/find_qhull.patch +++ b/ports/pcl/find_qhull.patch @@ -7,7 +7,7 @@ index 698bd151b..44c1d5d8d 100644 HINTS "${QHULL_ROOT}" "$ENV{QHULL_ROOT}" PATHS "$ENV{PROGRAMFILES}/QHull" "$ENV{PROGRAMW6432}/QHull" - PATH_SUFFIXES project build bin lib) -+ PATH_SUFFIXES project build bin debug/lib) ++ PATH_SUFFIXES project build bin lib debug/lib) if(NOT QHULL_LIBRARY_DEBUG) set(QHULL_LIBRARY_DEBUG ${QHULL_LIBRARY}) -- cgit v1.2.3 From 0e4daf35bae630442dab1750c7f07f2c8bcd1839 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Wed, 15 Nov 2017 10:22:43 +0900 Subject: Fix find debug library of FLANN Fix find debug library of FLANN. Currently, QHull port generates debug libraries with DEBUG_POSTFIX (-gd). Therefore, It doesn't need to be override. --- ports/pcl/config.patch | 2 +- ports/pcl/find_flann.patch | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ports/pcl/config.patch b/ports/pcl/config.patch index 54b7c6413..1b46ab7ce 100644 --- a/ports/pcl/config.patch +++ b/ports/pcl/config.patch @@ -16,7 +16,7 @@ index f4ef6a0ff..3a2c259dc 100644 PATHS "$ENV{PROGRAMFILES}/flann 1.6.9" "$ENV{PROGRAMW6432}/flann 1.6.9" "$ENV{PROGRAMFILES}/flann" "$ENV{PROGRAMW6432}/flann" - PATH_SUFFIXES lib) -+ PATH_SUFFIXES debug/lib) ++ PATH_SUFFIXES lib debug/lib) find_package_handle_standard_args(Flann DEFAULT_MSG FLANN_LIBRARY FLANN_INCLUDE_DIRS) if(FLANN_FOUND) diff --git a/ports/pcl/find_flann.patch b/ports/pcl/find_flann.patch index 6cbfb011f..e9760e502 100644 --- a/ports/pcl/find_flann.patch +++ b/ports/pcl/find_flann.patch @@ -1,5 +1,5 @@ diff --git a/cmake/Modules/FindFLANN.cmake b/cmake/Modules/FindFLANN.cmake -index b5739dc95..4041a2539 100644 +index b5739dc95..d2c3fd07e 100644 --- a/cmake/Modules/FindFLANN.cmake +++ b/cmake/Modules/FindFLANN.cmake @@ -10,8 +10,8 @@ @@ -13,3 +13,12 @@ index b5739dc95..4041a2539 100644 else(FLANN_USE_STATIC) set(FLANN_RELEASE_NAME flann_cpp) set(FLANN_DEBUG_NAME flann_cpp-gd) +@@ -41,7 +41,7 @@ find_library(FLANN_LIBRARY_DEBUG + NAMES ${FLANN_DEBUG_NAME} ${FLANN_RELEASE_NAME} + HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}" + PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann" +- PATH_SUFFIXES lib) ++ PATH_SUFFIXES lib debug/lib) + + if(NOT FLANN_LIBRARY_DEBUG) + set(FLANN_LIBRARY_DEBUG ${FLANN_LIBRARY}) -- cgit v1.2.3 From 6ad50f9a30546c93b95d634013c785ebeca3267f Mon Sep 17 00:00:00 2001 From: Alisa Yang Date: Wed, 15 Nov 2017 02:42:09 -0800 Subject: [globjects]disable the gtests --- ports/globjects/portfile.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/globjects/portfile.cmake b/ports/globjects/portfile.cmake index 5ab880ad6..08fae6ec3 100644 --- a/ports/globjects/portfile.cmake +++ b/ports/globjects/portfile.cmake @@ -15,7 +15,12 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DOPTION_BUILD_TESTS=OFF + -DOPTION_BUILD_GPU_TESTS=OFF +) #vcpkg_build_cmake() vcpkg_install_cmake() -- cgit v1.2.3 From c8412ae01710fa20870689b70b52bbc1daeecef1 Mon Sep 17 00:00:00 2001 From: pravic Date: Wed, 15 Nov 2017 17:57:43 +0300 Subject: [sciter] Update to 4.0.5.5520 --- ports/sciter/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 73ba4a91a..cd81ac139 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -13,8 +13,8 @@ include(vcpkg_common_functions) set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) set(SCITER_VERSION 4.0.5) -set(SCITER_REVISION 4f42e19b81312c1ca87494897d2e7e0461a5aa29) -set(SCITER_SHA 9f2cc6bd3bac6437cb26cb4993e1516276119fac451109da509ea781786825769acdca8dda8111d0ae09f987dc38d747504fb601fae227b2ee606433e4d0fcd4) +set(SCITER_REVISION c48b7c9219e4b01c9e1a668fb27cd9eb847e87ac) +set(SCITER_SHA 5e9ff4a074bf854362fc7ce753679619b32ea8f3ab782c55d85125350ddc9b7e428ad23ae29fa12269fdf55209e66777e332e811520d61309b49ab48c00859b4) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From d182f929ee6f7a9eb7df86dd5fd21d67634d83b5 Mon Sep 17 00:00:00 2001 From: Eric Rosenquist Date: Wed, 15 Nov 2017 10:36:04 -0500 Subject: Initial commit of the C API for Apache Avro Avro is a data serialization system. https://avro.apache.org/docs/current/api/c/ A static library is the only build option at the moment. The patch for PR#217 in the Avro repo is included since it contains a vital memory leak fix that has not yet been merged into the Avro code. https://github.com/apache/avro/pull/217 --- ports/avro-c/CONTROL | 4 + ports/avro-c/avro-pr-217.patch | 421 +++++++++++++++++++++++++++++++++++++++++ ports/avro-c/avro.patch | 349 ++++++++++++++++++++++++++++++++++ ports/avro-c/portfile.cmake | 30 +++ 4 files changed, 804 insertions(+) create mode 100644 ports/avro-c/CONTROL create mode 100644 ports/avro-c/avro-pr-217.patch create mode 100644 ports/avro-c/avro.patch create mode 100644 ports/avro-c/portfile.cmake diff --git a/ports/avro-c/CONTROL b/ports/avro-c/CONTROL new file mode 100644 index 000000000..3a7334c41 --- /dev/null +++ b/ports/avro-c/CONTROL @@ -0,0 +1,4 @@ +Source: avro-c +Version: 1.8.2 +Description: Apache Avro is a data serialization system +Build-Depends: jansson, liblzma, zlib diff --git a/ports/avro-c/avro-pr-217.patch b/ports/avro-c/avro-pr-217.patch new file mode 100644 index 000000000..9a5ddd3a8 --- /dev/null +++ b/ports/avro-c/avro-pr-217.patch @@ -0,0 +1,421 @@ +diff --git a/lang/c/src/schema.c b/lang/c/src/schema.c +index 3ade1140e..97e3ff354 100644 +--- a/lang/c/src/schema.c ++++ b/lang/c/src/schema.c +@@ -2,17 +2,17 @@ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. +- * The ASF licenses this file to you under the Apache License, Version 2.0 ++ * The ASF licenses this file to you under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at +- * ++ * + * http://www.apache.org/licenses/LICENSE-2.0 +- * ++ * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing +- * permissions and limitations under the License. ++ * permissions and limitations under the License. + */ + + #include "avro/allocation.h" +@@ -61,7 +61,7 @@ static int is_avro_id(const char *name) + } + } + /* +- * starts with [A-Za-z_] subsequent [A-Za-z0-9_] ++ * starts with [A-Za-z_] subsequent [A-Za-z0-9_] + */ + return 1; + } +@@ -199,7 +199,13 @@ static void avro_schema_free(avro_schema_t schema) + case AVRO_LINK:{ + struct avro_link_schema_t *link; + link = avro_schema_to_link(schema); +- avro_schema_decref(link->to); ++ /* Since we didn't increment the ++ * reference count of the target ++ * schema when we created the link, we ++ * should not decrement the reference ++ * count of the target schema when we ++ * free the link. ++ */ + avro_freet(struct avro_link_schema_t, link); + } + break; +@@ -727,7 +733,19 @@ avro_schema_t avro_schema_link(avro_schema_t to) + avro_set_error("Cannot allocate new link schema"); + return NULL; + } +- link->to = avro_schema_incref(to); ++ ++ /* Do not increment the reference count of target schema ++ * pointed to by the AVRO_LINK. AVRO_LINKs are only valid ++ * internal to a schema. The target schema pointed to by a ++ * link will be valid as long as the top-level schema is ++ * valid. Similarly, the link will be valid as long as the ++ * top-level schema is valid. Therefore the validity of the ++ * link ensures the validity of its target, and we don't need ++ * an additional reference count on the target. This mechanism ++ * of an implied validity also breaks reference count cycles ++ * for recursive schemas, which result in memory leaks. ++ */ ++ link->to = to; + avro_schema_init(&link->obj, AVRO_LINK); + return &link->obj; + } +@@ -807,7 +825,7 @@ avro_type_from_json_t(json_t *json, avro_type_t *type, + return EINVAL; + } + /* +- * TODO: gperf/re2c this ++ * TODO: gperf/re2c this + */ + if (strcmp(type_str, "string") == 0) { + *type = AVRO_STRING; +@@ -1259,7 +1277,7 @@ avro_schema_from_json_length(const char *jsontext, size_t length, + return avro_schema_from_json_root(root, schema); + } + +-avro_schema_t avro_schema_copy(avro_schema_t schema) ++avro_schema_t avro_schema_copy_root(avro_schema_t schema, st_table *named_schemas) + { + long i; + avro_schema_t new_schema = NULL; +@@ -1276,7 +1294,7 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) + case AVRO_BOOLEAN: + case AVRO_NULL: + /* +- * No need to copy primitives since they're static ++ * No need to copy primitives since they're static + */ + new_schema = schema; + break; +@@ -1288,6 +1306,10 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) + new_schema = + avro_schema_record(record_schema->name, + record_schema->space); ++ if (save_named_schemas(new_schema, named_schemas)) { ++ avro_set_error("Cannot save enum schema"); ++ return NULL; ++ } + for (i = 0; i < record_schema->fields->num_entries; i++) { + union { + st_data_t data; +@@ -1295,10 +1317,11 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) + } val; + st_lookup(record_schema->fields, i, &val.data); + avro_schema_t type_copy = +- avro_schema_copy(val.field->type); ++ avro_schema_copy_root(val.field->type, named_schemas); + avro_schema_record_field_append(new_schema, + val.field->name, + type_copy); ++ avro_schema_decref(type_copy); + } + } + break; +@@ -1309,6 +1332,10 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) + avro_schema_to_enum(schema); + new_schema = avro_schema_enum_ns(enum_schema->name, + enum_schema->space); ++ if (save_named_schemas(new_schema, named_schemas)) { ++ avro_set_error("Cannot save enum schema"); ++ return NULL; ++ } + for (i = 0; i < enum_schema->symbols->num_entries; i++) { + union { + st_data_t data; +@@ -1329,6 +1356,10 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) + avro_schema_fixed_ns(fixed_schema->name, + fixed_schema->space, + fixed_schema->size); ++ if (save_named_schemas(new_schema, named_schemas)) { ++ avro_set_error("Cannot save fixed schema"); ++ return NULL; ++ } + } + break; + +@@ -1337,11 +1368,12 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) + struct avro_map_schema_t *map_schema = + avro_schema_to_map(schema); + avro_schema_t values_copy = +- avro_schema_copy(map_schema->values); ++ avro_schema_copy_root(map_schema->values, named_schemas); + if (!values_copy) { + return NULL; + } + new_schema = avro_schema_map(values_copy); ++ avro_schema_decref(values_copy); + } + break; + +@@ -1350,11 +1382,12 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) + struct avro_array_schema_t *array_schema = + avro_schema_to_array(schema); + avro_schema_t items_copy = +- avro_schema_copy(array_schema->items); ++ avro_schema_copy_root(array_schema->items, named_schemas); + if (!items_copy) { + return NULL; + } + new_schema = avro_schema_array(items_copy); ++ avro_schema_decref(items_copy); + } + break; + +@@ -1372,12 +1405,13 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) + avro_schema_t schema; + } val; + st_lookup(union_schema->branches, i, &val.data); +- schema_copy = avro_schema_copy(val.schema); ++ schema_copy = avro_schema_copy_root(val.schema, named_schemas); + if (avro_schema_union_append + (new_schema, schema_copy)) { + avro_schema_decref(new_schema); + return NULL; + } ++ avro_schema_decref(schema_copy); + } + } + break; +@@ -1386,12 +1420,12 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) + { + struct avro_link_schema_t *link_schema = + avro_schema_to_link(schema); +- /* +- * TODO: use an avro_schema_copy of to instead of pointing to +- * the same reference +- */ +- avro_schema_incref(link_schema->to); +- new_schema = avro_schema_link(link_schema->to); ++ avro_schema_t to; ++ ++ to = find_named_schemas(avro_schema_name(link_schema->to), ++ avro_schema_namespace(link_schema->to), ++ named_schemas); ++ new_schema = avro_schema_link(to); + } + break; + +@@ -1401,6 +1435,23 @@ avro_schema_t avro_schema_copy(avro_schema_t schema) + return new_schema; + } + ++avro_schema_t avro_schema_copy(avro_schema_t schema) ++{ ++ avro_schema_t new_schema; ++ st_table *named_schemas; ++ ++ named_schemas = st_init_strtable_with_size(DEFAULT_TABLE_SIZE); ++ if (!named_schemas) { ++ avro_set_error("Cannot allocate named schema map"); ++ return NULL; ++ } ++ ++ new_schema = avro_schema_copy_root(schema, named_schemas); ++ st_foreach(named_schemas, HASH_FUNCTION_CAST named_schema_free_foreach, 0); ++ st_free_table(named_schemas); ++ return new_schema; ++} ++ + avro_schema_t avro_schema_get_subschema(const avro_schema_t schema, + const char *name) + { +diff --git a/lang/c/tests/CMakeLists.txt b/lang/c/tests/CMakeLists.txt +index 445e689a7..0870ef5ec 100644 +--- a/lang/c/tests/CMakeLists.txt ++++ b/lang/c/tests/CMakeLists.txt +@@ -48,12 +48,14 @@ add_avro_test(test_data_structures) + add_avro_test(test_avro_schema) + add_avro_test(test_avro_schema_names) + add_avro_test(test_avro_values) ++add_avro_test(test_avro_766) + add_avro_test(test_avro_968) + add_avro_test(test_avro_984) + add_avro_test(test_avro_1034) + add_avro_test(test_avro_1084) + add_avro_test(test_avro_1087) + add_avro_test(test_avro_1165) ++add_avro_test(test_avro_1167) + add_avro_test(test_avro_1237) + add_avro_test(test_avro_1238) + add_avro_test(test_avro_1279) +diff --git a/lang/c/tests/test_avro_1167.c b/lang/c/tests/test_avro_1167.c +new file mode 100644 +index 000000000..869b37d17 +--- /dev/null ++++ b/lang/c/tests/test_avro_1167.c +@@ -0,0 +1,84 @@ ++/* ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to you under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or ++ * implied. See the License for the specific language governing ++ * permissions and limitations under the License. ++ */ ++ ++#include ++#include ++#include ++ ++/* To see the AVRO-1167 memory leak, run this test program through ++ * valgrind. The specific valgrind commandline to use from the ++ * avro-trunk/lang/c/tests directory is: ++ * valgrind -v --track-origins=yes --leak-check=full ++ * --show-reachable = yes ../build/tests/test_avro_1167 ++ */ ++ ++int main(int argc, char **argv) ++{ ++ const char *json = ++ "{" ++ " \"name\": \"repeated_subrecord_array\"," ++ " \"type\": \"record\"," ++ " \"fields\": [" ++ " { \"name\": \"subrecord_one\"," ++ " \"type\": {" ++ " \"name\": \"SubrecordType\"," ++ " \"type\": \"record\"," ++ " \"fields\": [" ++ " { \"name\": \"x\", \"type\": \"int\" }," ++ " { \"name\": \"y\", \"type\": \"int\" }" ++ " ]" ++ " }" ++ " }," ++ " { \"name\": \"subrecord_two\", \"type\": \"SubrecordType\" }," ++ " { \"name\": \"subrecord_array\", \"type\": {" ++ " \"type\":\"array\"," ++ " \"items\": \"SubrecordType\"" ++ " }" ++ " }" ++ " ]" ++ "}"; ++ ++ int rval; ++ avro_schema_t schema = NULL; ++ avro_schema_t schema_copy = NULL; ++ avro_schema_error_t error; ++ ++ (void) argc; ++ (void) argv; ++ ++ rval = avro_schema_from_json(json, strlen(json), &schema, &error); ++ if ( rval ) ++ { ++ printf("Failed to read schema from JSON.\n"); ++ exit(EXIT_FAILURE); ++ } ++ else ++ { ++ printf("Successfully read schema from JSON.\n"); ++ } ++ ++ schema_copy = avro_schema_copy( schema ); ++ if ( ! avro_schema_equal(schema, schema_copy) ) ++ { ++ printf("Failed avro_schema_equal(schema, schema_copy)\n"); ++ exit(EXIT_FAILURE); ++ } ++ ++ avro_schema_decref(schema); ++ avro_schema_decref(schema_copy); ++ return 0; ++} +diff --git a/lang/c/tests/test_avro_766.c b/lang/c/tests/test_avro_766.c +new file mode 100755 +index 000000000..4e21368c4 +--- /dev/null ++++ b/lang/c/tests/test_avro_766.c +@@ -0,0 +1,76 @@ ++/* ++ * Licensed to the Apache Software Foundation (ASF) under one or more ++ * contributor license agreements. See the NOTICE file distributed with ++ * this work for additional information regarding copyright ownership. ++ * The ASF licenses this file to you under the Apache License, Version 2.0 ++ * (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or ++ * implied. See the License for the specific language governing ++ * permissions and limitations under the License. ++ */ ++ ++#include ++#include ++#include ++ ++/* To see the AVRO-766 memory leak, run this test program through ++ * valgrind. The specific valgrind commandline to use from the ++ * avro-trunk/lang/c/tests directory is: ++ * valgrind -v --track-origins=yes --leak-check=full ++ * --show-reachable = yes ../build/tests/test_avro_766 ++ */ ++int main(int argc, char **argv) ++{ ++ const char *json = ++ "{" ++ " \"type\": \"record\"," ++ " \"name\": \"list\"," ++ " \"fields\": [" ++ " { \"name\": \"x\", \"type\": \"int\" }," ++ " { \"name\": \"y\", \"type\": \"int\" }," ++ " { \"name\": \"next\", \"type\": [\"null\",\"list\"]}," ++ " { \"name\": \"arraylist\", \"type\": { \"type\":\"array\", \"items\": \"list\" } }" ++ " ]" ++ "}"; ++ ++ int rval; ++ avro_schema_t schema = NULL; ++ avro_schema_error_t error; ++ ++ (void) argc; ++ (void) argv; ++ ++ rval = avro_schema_from_json(json, strlen(json), &schema, &error); ++ if ( rval ) ++ { ++ printf("Failed to read schema from JSON.\n"); ++ exit(EXIT_FAILURE); ++ } ++ else ++ { ++ printf("Successfully read schema from JSON.\n"); ++ } ++ ++#define TEST_AVRO_1167 (1) ++ #if TEST_AVRO_1167 ++ { ++ avro_schema_t schema_copy = NULL; ++ schema_copy = avro_schema_copy( schema ); ++ if ( ! avro_schema_equal(schema, schema_copy) ) ++ { ++ printf("Failed avro_schema_equal(schema, schema_copy)\n"); ++ exit(EXIT_FAILURE); ++ } ++ avro_schema_decref(schema_copy); ++ } ++ #endif ++ ++ avro_schema_decref(schema); ++ return 0; ++} diff --git a/ports/avro-c/avro.patch b/ports/avro-c/avro.patch new file mode 100644 index 000000000..50c32a6d3 --- /dev/null +++ b/ports/avro-c/avro.patch @@ -0,0 +1,349 @@ +diff -ur a/lang/c/CMakeLists.txt b/lang/c/CMakeLists.txt +--- a/lang/c/CMakeLists.txt 2017-04-17 19:56:17.000000000 -0400 ++++ b/lang/c/CMakeLists.txt 2017-11-12 20:03:13.776973800 -0500 +@@ -50,7 +50,7 @@ + else(UNIX) + # Hard code for win32 -- need to figure out how to port version.sh for + # Windows. +- set(LIBAVRO_VERSION "22:0:0") ++ set(LIBAVRO_VERSION "23:0:0") + endif(UNIX) + + +@@ -151,25 +151,24 @@ + message("Disabled snappy codec. libsnappy not found or zlib not found.") + endif (SNAPPY_FOUND AND ZLIB_FOUND) + +-find_package(PkgConfig) +-pkg_check_modules(LZMA liblzma) +-if (LZMA_FOUND) ++find_package(LIBLZMA) ++if (LIBLZMA_FOUND) + set(LZMA_PKG liblzma) + add_definitions(-DLZMA_CODEC) +- include_directories(${LZMA_INCLUDE_DIRS}) +- link_directories(${LZMA_LIBRARY_DIRS}) ++ include_directories(${LIBLZMA_INCLUDE_DIRS}) ++ link_directories(${LIBLZMA_LIBRARY_DIRS}) + message("Enabled lzma codec") +-else (LZMA_FOUND) ++else (LIBLZMA_FOUND) + set(LZMA_PKG "") + set(LZMA_LIBRARIES "") + message("Disabled lzma codec. liblzma not found.") +-endif (LZMA_FOUND) ++endif (LIBLZMA_FOUND) + +-set(CODEC_LIBRARIES ${ZLIB_LIBRARIES} ${LZMA_LIBRARIES} ${SNAPPY_LIBRARIES}) ++set(CODEC_LIBRARIES ${ZLIB_LIBRARIES} ${LIBLZMA_LIBRARIES} ${SNAPPY_LIBRARIES}) + set(CODEC_PKG "@ZLIB_PKG@ @LZMA_PKG@ @SNAPPY_PKG@") + + # Jansson JSON library +-pkg_check_modules(JANSSON jansson>=2.3) ++find_package(JANSSON REQUIRED) + if (JANSSON_FOUND) + set(JANSSON_PKG libjansson) + include_directories(${JANSSON_INCLUDE_DIR}) +diff -ur a/lang/c/examples/quickstop.c b/lang/c/examples/quickstop.c +--- a/lang/c/examples/quickstop.c 2017-04-17 19:56:17.000000000 -0400 ++++ b/lang/c/examples/quickstop.c 2017-11-10 12:40:59.151301400 -0500 +@@ -16,6 +16,7 @@ + */ + + #include ++#include + #include + #include + +@@ -102,7 +103,7 @@ + + if (avro_record_get(person, "ID", &id_datum) == 0) { + avro_int64_get(id_datum, &i64); +- fprintf(stdout, "%"PRId64" | ", i64); ++ fprintf(stdout, "%" PRId64 " | ", i64); + } + if (avro_record_get(person, "First", &first_datum) == 0) { + avro_string_get(first_datum, &p); +diff -ur a/lang/c/src/avro/msinttypes.h b/lang/c/src/avro/msinttypes.h +--- a/lang/c/src/avro/msinttypes.h 2017-04-17 19:56:17.000000000 -0400 ++++ b/lang/c/src/avro/msinttypes.h 2017-11-10 12:37:30.372271300 -0500 +@@ -54,6 +54,9 @@ + + // 7.8 Format conversion of integer types + ++#if (_MSC_VER >= 1900) ++# include ++#else + typedef struct { + intmax_t quot; + intmax_t rem; +@@ -311,5 +314,6 @@ + #define wcstoimax _wcstoi64 + #define wcstoumax _wcstoui64 + ++#endif + + #endif // _MSC_INTTYPES_H_ ] +diff -ur a/lang/c/src/avro/msstdint.h b/lang/c/src/avro/msstdint.h +--- a/lang/c/src/avro/msstdint.h 2017-04-17 19:56:17.000000000 -0400 ++++ b/lang/c/src/avro/msstdint.h 2017-11-10 10:44:14.011482500 -0500 +@@ -42,6 +42,10 @@ + + #include + ++#if (_MSC_VER >= 1900) ++# include ++#else ++ + // For Visual Studio 6 in C++ mode and for many Visual Studio versions when + // compiling for ARM we should wrap include with 'extern "C++" {}' + // or compiler give many errors like this: +@@ -243,5 +247,6 @@ + + #endif // __STDC_CONSTANT_MACROS ] + ++#endif // _MSC_VER < 1900 + + #endif // _MSC_STDINT_H_ ] +diff -ur a/lang/c/src/avro_private.h b/lang/c/src/avro_private.h +--- a/lang/c/src/avro_private.h 2017-04-17 19:56:17.000000000 -0400 ++++ b/lang/c/src/avro_private.h 2017-11-10 10:32:33.414879700 -0500 +@@ -34,7 +34,7 @@ + #endif + + #ifdef _WIN32 +-#define snprintf _snprintf ++ //#define snprintf _snprintf + #endif + + /* Note that AVRO_PLATFORM_IS_BIG_ENDIAN is *always* defined. It is +diff -ur a/lang/c/src/avroappend.c b/lang/c/src/avroappend.c +--- a/lang/c/src/avroappend.c 2017-04-17 19:56:17.000000000 -0400 ++++ b/lang/c/src/avroappend.c 2017-11-10 12:15:14.878275800 -0500 +@@ -20,7 +20,7 @@ + #include + #include + #ifdef _WIN32 +-#include ++#include + #endif + + #include "avro.h" +diff -ur a/lang/c/src/codec.c b/lang/c/src/codec.c +--- a/lang/c/src/codec.c 2017-04-17 19:56:17.000000000 -0400 ++++ b/lang/c/src/codec.c 2017-11-10 11:09:08.033816100 -0500 +@@ -266,7 +266,7 @@ + s->next_in = (Bytef*)data; + s->avail_in = (uInt)len; + +- s->next_out = c->block_data; ++ s->next_out = (Bytef*)c->block_data; + s->avail_out = (uInt)c->block_size; + + s->total_out = 0; +@@ -310,10 +310,10 @@ + + c->used_size = 0; + +- s->next_in = data; ++ s->next_in = (Bytef*)data; + s->avail_in = len; + +- s->next_out = c->block_data; ++ s->next_out = (Bytef*)c->block_data; + s->avail_out = c->block_size; + + s->total_out = 0; +@@ -334,7 +334,7 @@ + if (err == Z_BUF_ERROR) + { + c->block_data = avro_realloc(c->block_data, c->block_size, c->block_size * 2); +- s->next_out = c->block_data + s->total_out; ++ s->next_out = (Bytef*)c->block_data + s->total_out; + s->avail_out += c->block_size; + c->block_size = c->block_size * 2; + } +@@ -437,7 +437,7 @@ + return 1; + } + +- ret = lzma_raw_buffer_encode(filters, NULL, data, len, codec->block_data, &written, codec->block_size); ++ ret = lzma_raw_buffer_encode(filters, NULL, (const uint8_t *)data, len, (uint8_t *)codec->block_data, &written, codec->block_size); + + codec->used_size = written; + +@@ -468,8 +468,8 @@ + + do + { +- ret = lzma_raw_buffer_decode(filters, NULL, data, +- &read_pos, len, codec->block_data, &write_pos, ++ ret = lzma_raw_buffer_decode(filters, NULL, (const uint8_t *)data, ++ &read_pos, len, (uint8_t *)codec->block_data, &write_pos, + codec->block_size); + + codec->used_size = write_pos; +diff -ur a/lang/c/src/schema.c b/lang/c/src/schema.c +--- a/lang/c/src/schema.c 2017-04-17 19:56:17.000000000 -0400 ++++ b/lang/c/src/schema.c 2017-11-10 11:45:45.268458000 -0500 +@@ -74,7 +74,7 @@ + * namespace (as a newly allocated buffer using Avro's allocator). */ + static char *split_namespace_name(const char *fullname, const char **name_out) + { +- char *last_dot = strrchr(fullname, '.'); ++ const char *last_dot = strrchr(fullname, '.'); + if (last_dot == NULL) { + *name_out = fullname; + return NULL; +@@ -742,12 +742,12 @@ + } + + static const char * +-qualify_name(const char *name, const char *namespace) ++qualify_name(const char *name, const char *namespaceX) + { + char *full_name; +- if (namespace != NULL && strchr(name, '.') == NULL) { +- full_name = avro_str_alloc(strlen(name) + strlen(namespace) + 2); +- sprintf(full_name, "%s.%s", namespace, name); ++ if (namespaceX != NULL && strchr(name, '.') == NULL) { ++ full_name = avro_str_alloc(strlen(name) + strlen(namespaceX) + 2); ++ sprintf(full_name, "%s.%s", namespaceX, name); + } else { + full_name = avro_strdup(name); + } +@@ -758,20 +758,20 @@ + save_named_schemas(const avro_schema_t schema, st_table *st) + { + const char *name = avro_schema_name(schema); +- const char *namespace = avro_schema_namespace(schema); +- const char *full_name = qualify_name(name, namespace); ++ const char *namespaceX = avro_schema_namespace(schema); ++ const char *full_name = qualify_name(name, namespaceX); + int rval = st_insert(st, (st_data_t) full_name, (st_data_t) schema); + return rval; + } + + static avro_schema_t +-find_named_schemas(const char *name, const char *namespace, st_table *st) ++find_named_schemas(const char *name, const char *namespaceX, st_table *st) + { + union { + avro_schema_t schema; + st_data_t data; + } val; +- const char *full_name = qualify_name(name, namespace); ++ const char *full_name = qualify_name(name, namespaceX); + int rval = st_lookup(st, (st_data_t) full_name, &(val.data)); + avro_str_free((char *)full_name); + if (rval) { +@@ -784,7 +784,7 @@ + static int + avro_type_from_json_t(json_t *json, avro_type_t *type, + st_table *named_schemas, avro_schema_t *named_type, +- const char *namespace) ++ const char *namespaceX) + { + json_t *json_type; + const char *type_str; +@@ -835,7 +835,7 @@ + *type = AVRO_MAP; + } else if (strcmp(type_str, "fixed") == 0) { + *type = AVRO_FIXED; +- } else if ((*named_type = find_named_schemas(type_str, namespace, named_schemas))) { ++ } else if ((*named_type = find_named_schemas(type_str, namespaceX, named_schemas))) { + *type = AVRO_LINK; + } else { + avro_set_error("Unknown Avro \"type\": %s", type_str); +@@ -930,12 +930,12 @@ + } + + if (strchr(fullname, '.')) { +- char *namespace = split_namespace_name(fullname, &name); +- *schema = avro_schema_record(name, namespace); +- avro_str_free(namespace); ++ char *namespaceX = split_namespace_name(fullname, &name); ++ *schema = avro_schema_record(name, namespaceX); ++ avro_str_free(namespaceX); + } else if (json_is_string(json_namespace)) { +- const char *namespace = json_string_value(json_namespace); +- *schema = avro_schema_record(fullname, namespace); ++ const char *namespaceX = json_string_value(json_namespace); ++ *schema = avro_schema_record(fullname, namespaceX); + } else { + *schema = avro_schema_record(fullname, parent_namespace); + } +@@ -1026,13 +1026,13 @@ + } + + if (strchr(fullname, '.')) { +- char *namespace; +- namespace = split_namespace_name(fullname, &name); +- *schema = avro_schema_enum_ns(name, namespace); +- avro_str_free(namespace); ++ char *namespaceX; ++ namespaceX = split_namespace_name(fullname, &name); ++ *schema = avro_schema_enum_ns(name, namespaceX); ++ avro_str_free(namespaceX); + } else if (json_is_string(json_namespace)) { +- const char *namespace = json_string_value(json_namespace); +- *schema = avro_schema_enum_ns(fullname, namespace); ++ const char *namespaceX = json_string_value(json_namespace); ++ *schema = avro_schema_enum_ns(fullname, namespaceX); + } else { + *schema = avro_schema_enum_ns(fullname, parent_namespace); + } +@@ -1160,13 +1160,13 @@ + fullname = json_string_value(json_name); + + if (strchr(fullname, '.')) { +- char *namespace; +- namespace = split_namespace_name(fullname, &name); +- *schema = avro_schema_fixed_ns(name, namespace, (int64_t) size); +- avro_str_free(namespace); ++ char *namespaceX; ++ namespaceX = split_namespace_name(fullname, &name); ++ *schema = avro_schema_fixed_ns(name, namespaceX, (int64_t) size); ++ avro_str_free(namespaceX); + } else if (json_is_string(json_namespace)) { +- const char *namespace = json_string_value(json_namespace); +- *schema = avro_schema_fixed_ns(fullname, namespace, (int64_t) size); ++ const char *namespaceX = json_string_value(json_namespace); ++ *schema = avro_schema_fixed_ns(fullname, namespaceX, (int64_t) size); + } else { + *schema = avro_schema_fixed_ns(fullname, parent_namespace, (int64_t) size); + } +@@ -1749,9 +1749,9 @@ + { + int rval; + check(rval, avro_write_str(out, "\"")); +- const char *namespace = avro_schema_namespace(link->to); +- if (namespace && nullstrcmp(namespace, parent_namespace)) { +- check(rval, avro_write_str(out, namespace)); ++ const char *namespaceX = avro_schema_namespace(link->to); ++ if (namespaceX && nullstrcmp(namespaceX, parent_namespace)) { ++ check(rval, avro_write_str(out, namespaceX)); + check(rval, avro_write_str(out, ".")); + } + check(rval, avro_write_str(out, avro_schema_name(link->to))); +diff -ur a/lang/c/tests/test_avro_data.c b/lang/c/tests/test_avro_data.c +--- a/lang/c/tests/test_avro_data.c 2017-04-17 19:56:17.000000000 -0400 ++++ b/lang/c/tests/test_avro_data.c 2017-11-10 12:41:29.924190100 -0500 +@@ -112,7 +112,7 @@ + if (size != avro_writer_tell(writer)) { + fprintf(stderr, + "Unable to calculate size %s validate=%d " +- "(%"PRId64" != %"PRId64")\n %s\n", ++ "(%" PRId64 " != %" PRId64 ")\n %s\n", + type, validate, size, avro_writer_tell(writer), + avro_strerror()); + exit(EXIT_FAILURE); +@@ -142,7 +142,7 @@ + { + char *json = NULL; + avro_datum_to_json(datum, 1, &json); +- if (strcasecmp(json, expected) != 0) { ++ if (stricmp(json, expected) != 0) { + fprintf(stderr, "Unexpected JSON encoding: %s\n", json); + exit(EXIT_FAILURE); + } diff --git a/ports/avro-c/portfile.cmake b/ports/avro-c/portfile.cmake new file mode 100644 index 000000000..94fcf25ba --- /dev/null +++ b/ports/avro-c/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/avro + REF release-1.8.2 + SHA512 a48cc353aadd45ad2c8593bf89ec3f1ddb0fcd364b79dd002a60a54d49cab714b46eee8bd6dc47b13588b9eead49c754dfe05f6aff735752fca8d2cd35ae8649 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/avro.patch + ${CMAKE_CURRENT_LIST_DIR}/avro-pr-217.patch) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/lang/c +) + +vcpkg_install_cmake(DISABLE_PARALLEL) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/lang/c/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/avro-c) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/avro-c/LICENSE ${CURRENT_PACKAGES_DIR}/share/avro-c/copyright) -- cgit v1.2.3 From 24283ec1ee019df3e43dbb9c9bf2f1d9d1263911 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 15 Nov 2017 18:56:44 -0800 Subject: [leptonica][tiff] Add LZMA to tiff's dependent libraries. Leptonica should use TIFF_LIBRARIES. --- ports/leptonica/CONTROL | 2 +- ports/leptonica/portfile.cmake | 4 ++++ ports/leptonica/use-tiff-libraries.patch | 13 +++++++++++++ scripts/buildsystems/vcpkg.cmake | 10 ++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ports/leptonica/use-tiff-libraries.patch diff --git a/ports/leptonica/CONTROL b/ports/leptonica/CONTROL index cd1c44cb4..6ca0bea56 100644 --- a/ports/leptonica/CONTROL +++ b/ports/leptonica/CONTROL @@ -1,4 +1,4 @@ Source: leptonica -Version: 1.74.4-1 +Version: 1.74.4-2 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 a5d4330fd..acaf7fe9d 100644 --- a/ports/leptonica/portfile.cmake +++ b/ports/leptonica/portfile.cmake @@ -12,12 +12,16 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch + ${CMAKE_CURRENT_LIST_DIR}/use-tiff-libraries.patch ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DSTATIC=${STATIC} -DCMAKE_REQUIRED_INCLUDES=${CURRENT_INSTALLED_DIR}/include # for check_include_file() ) diff --git a/ports/leptonica/use-tiff-libraries.patch b/ports/leptonica/use-tiff-libraries.patch new file mode 100644 index 000000000..f994be552 --- /dev/null +++ b/ports/leptonica/use-tiff-libraries.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3af7e30..55e17da 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -44,7 +44,7 @@ if (PNG_LIBRARY) + endif() + if (TIFF_LIBRARY) + target_include_directories (leptonica PUBLIC ${TIFF_INCLUDE_DIR}) +- target_link_libraries (leptonica ${TIFF_LIBRARY}) ++ target_link_libraries (leptonica ${TIFF_LIBRARIES}) + endif() + if (WEBP_FOUND) + target_include_directories (leptonica PUBLIC ${WEBP_INCLUDE_DIR}) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index e3aa46b64..66dd50169 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -159,6 +159,16 @@ macro(find_package name) unset(Boost_USE_STATIC_RUNTIME) endif() _find_package(${ARGV}) + + if("${name}" STREQUAL "TIFF") + find_package(LibLZMA) + if(TARGET TIFF::TIFF) + set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${LIBLZMA_LIBRARIES}) + endif() + if(TIFF_LIBRARIES) + list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES}) + endif() + endif() endmacro() set(VCPKG_TOOLCHAIN ON) -- cgit v1.2.3 From 4228e1e389f31b70eb7078aed99b21ad465d8aa0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 15 Nov 2017 21:15:37 -0800 Subject: [llvm] Install debug targets for cmake --- ports/llvm/CONTROL | 2 +- ports/llvm/portfile.cmake | 13 +++++++++---- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 5 ++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index 2f6b1ec93..2ea653a12 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,3 +1,3 @@ Source: llvm -Version: 5.0.0-1 +Version: 5.0.0-2 Description: The LLVM Compiler Infrastructure diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 55a23f802..a2f32abe9 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -30,14 +30,19 @@ vcpkg_configure_cmake( -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF - -DLLVM_TOOLS_INSTALL_DIR=tools + -DLLVM_TOOLS_INSTALL_DIR=tools/llvm ) vcpkg_install_cmake() -# Remove extra copy of cmake modules and include files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/llvm) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/llvm) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/tools + ${CURRENT_PACKAGES_DIR}/debug/share +) # Remove one empty include subdirectory if it is indeed empty file(GLOB MCANALYSISFILES ${CURRENT_PACKAGES_DIR}/include/llvm/MC/MCAnalysis/*) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 22c2245c8..5bf1b2cdb 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -81,9 +81,11 @@ function(vcpkg_fixup_cmake_targets) file(REMOVE ${UNUSED_FILES}) endif() + # LLVM uses "LLVMExports-release.cmake" file(GLOB RELEASE_TARGETS "${RELEASE_SHARE}/*[Tt]argets-release.cmake" "${RELEASE_SHARE}/*[Cc]onfig-release.cmake" + "${RELEASE_SHARE}/*[Ee]xports-release.cmake" ) foreach(RELEASE_TARGET ${RELEASE_TARGETS}) file(READ ${RELEASE_TARGET} _contents) @@ -95,7 +97,8 @@ function(vcpkg_fixup_cmake_targets) file(GLOB DEBUG_TARGETS "${DEBUG_SHARE}/*[Tt]argets-debug.cmake" "${DEBUG_SHARE}/*[Cc]onfig-debug.cmake" - ) + "${DEBUG_SHARE}/*[Ee]xports-debug.cmake" + ) foreach(DEBUG_TARGET ${DEBUG_TARGETS}) get_filename_component(DEBUG_TARGET_NAME ${DEBUG_TARGET} NAME) -- cgit v1.2.3 From 7e3dcc4f096925f152593e3c8cd33e5dbf0b4e6f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 15 Nov 2017 21:58:26 -0800 Subject: [tesseract] Fix static linking. [icu][tiff] Add patches in toolchain to fix static linking. --- ports/tesseract/CONTROL | 2 +- ports/tesseract/portfile.cmake | 3 +++ scripts/buildsystems/vcpkg.cmake | 20 ++++++++++++++++---- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ports/tesseract/CONTROL b/ports/tesseract/CONTROL index 8aee14808..6e0b0428d 100644 --- a/ports/tesseract/CONTROL +++ b/ports/tesseract/CONTROL @@ -1,4 +1,4 @@ Source: tesseract -Version: 3.05.01-1 +Version: 3.05.01-2 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 31ed2cd1f..5c37f51b3 100644 --- a/ports/tesseract/portfile.cmake +++ b/ports/tesseract/portfile.cmake @@ -19,6 +19,9 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-icu.patch ) +# The built-in cmake FindICU is better +file(REMOVE ${SOURCE_PATH}/cmake/FindICU.cmake) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 66dd50169..ff89439cc 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -157,10 +157,20 @@ macro(find_package name) unset(Boost_USE_STATIC_LIBS) unset(Boost_USE_MULTITHREADED) unset(Boost_USE_STATIC_RUNTIME) - endif() - _find_package(${ARGV}) - - if("${name}" STREQUAL "TIFF") + _find_package(${ARGV}) + elseif("${name}" STREQUAL "ICU") + function(_vcpkg_find_in_list) + list(FIND ARGV "COMPONENTS" COMPONENTS_IDX) + set(COMPONENTS_IDX ${COMPONENTS_IDX} PARENT_SCOPE) + endfunction() + _vcpkg_find_in_list(${ARGV}) + if(NOT COMPONENTS_IDX EQUAL -1) + _find_package(${ARGV} COMPONENTS data) + else() + _find_package(${ARGV}) + endif() + elseif("${name}" STREQUAL "TIFF") + _find_package(${ARGV}) find_package(LibLZMA) if(TARGET TIFF::TIFF) set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${LIBLZMA_LIBRARIES}) @@ -168,6 +178,8 @@ macro(find_package name) if(TIFF_LIBRARIES) list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES}) endif() + else() + _find_package(${ARGV}) endif() endmacro() -- cgit v1.2.3 From 2abdcc1eec62fa7bd6af7abe0d7884966bd65b59 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 15 Nov 2017 18:07:50 -0800 Subject: Introduce VcpkgPowershellUtils --- scripts/VcpkgPowershellUtils.ps1 | 185 ++++++++++++++++++++++++++++++++++++ scripts/fetchDependency.ps1 | 198 ++------------------------------------- 2 files changed, 192 insertions(+), 191 deletions(-) create mode 100644 scripts/VcpkgPowershellUtils.ps1 diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 new file mode 100644 index 000000000..c7447b383 --- /dev/null +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -0,0 +1,185 @@ +function vcpkgHasModule([Parameter(Mandatory=$true)][string]$moduleName) +{ + return [bool](Get-Module -ListAvailable -Name $moduleName) +} + +function vcpkgCreateDirectory([Parameter(Mandatory=$true)][string]$dirPath) +{ + if (!(Test-Path $dirPath)) + { + New-Item -ItemType Directory -Path $dirPath | Out-Null + } +} + +function vcpkgRemoveDirectory([Parameter(Mandatory=$true)][string]$dirPath) +{ + if (Test-Path $dirPath) + { + Remove-Item $dirPath -Recurse -Force + } +} + +function vcpkgRemoveFile([Parameter(Mandatory=$true)][string]$filePath) +{ + if (Test-Path $filePath) + { + Remove-Item $filePath -Force + } +} + +function vcpkgHasCommand([Parameter(Mandatory=$true)][string]$commandName) +{ + return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) +} + +function vcpkgHasCommandParameter([Parameter(Mandatory=$true)][string]$commandName, [Parameter(Mandatory=$true)][string]$parameterName) +{ + return (Get-Command $commandName).Parameters.Keys -contains $parameterName +} + +function vcpkgGetCredentials() +{ + if (vcpkgHasCommandParameter -commandName 'Get-Credential' -parameterName 'Message') + { + return Get-Credential -Message "Enter credentials for Proxy Authentication" + } + else + { + Write-Host "Enter credentials for Proxy Authentication" + return Get-Credential + } +} + +function vcpkgGetSHA256([Parameter(Mandatory=$true)][string]$filePath) +{ + if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Utility\Get-FileHash') + { + Write-Verbose("Hashing with Microsoft.PowerShell.Utility\Get-FileHash") + $hash = (Microsoft.PowerShell.Utility\Get-FileHash -Path $filePath -Algorithm SHA256).Hash + } + elseif(vcpkgHasCommand -commandName 'Pscx\Get-Hash') + { + Write-Verbose("Hashing with Pscx\Get-Hash") + $hash = (Pscx\Get-Hash -Path $filePath -Algorithm SHA256).HashString + } + else + { + Write-Verbose("Hashing with .NET") + $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256") + $fileAsByteArray = [io.File]::ReadAllBytes($filePath) + $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) + $hash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) + } + + return $hash.ToLower() +} + +function vcpkgCheckEqualFileHash( [Parameter(Mandatory=$true)][string]$filePath, + [Parameter(Mandatory=$true)][string]$expectedHash, + [Parameter(Mandatory=$true)][string]$actualHash ) +{ + if ($expectedDownloadedFileHash -ne $downloadedFileHash) + { + Write-Host ("`nFile does not have expected hash:`n" + + " File path: [ $filePath ]`n" + + " Expected hash: [ $expectedHash ]`n" + + " Actual hash: [ $actualHash ]`n") + throw "Invalid Hash for file $filePath" + } +} + +if (vcpkgHasModule -moduleName 'BitsTransfer') +{ + Import-Module BitsTransfer -Verbose:$false +} + +function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, + [Parameter(Mandatory=$true)][string]$downloadPath) +{ + if (Test-Path $downloadPath) + { + return + } + + $downloadDir = split-path -parent $downloadPath + vcpkgCreateDirectory $downloadDir + + $downloadPartPath = "$downloadPath.part" + vcpkgRemoveFile $downloadPartPath + + $wc = New-Object System.Net.WebClient + $proxyAuth = !$wc.Proxy.IsBypassed($url) + if ($proxyAuth) + { + $wc.Proxy.Credentials = vcpkgGetCredentials + } + + # Some download (e.g. git from github)fail with Start-BitsTransfer + if (vcpkgHasCommand -commandName 'Start-BitsTransfer') + { + try + { + if ($proxyAuth) + { + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") + $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential", $wc.Proxy.Credentials) + } + Start-BitsTransfer -Source $url -Destination $downloadPartPath -ErrorAction Stop + Move-Item -Path $downloadPartPath -Destination $downloadPath + return + } + catch [System.Exception] + { + # If BITS fails for any reason, delete any potentially partially downloaded files and continue + vcpkgRemoveFile $downloadPartPath + } + } + + Write-Verbose("Downloading $Dependency...") + $wc.DownloadFile($url, $downloadPartPath) + Move-Item -Path $downloadPartPath -Destination $downloadPath +} + +function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, + [Parameter(Mandatory=$true)][string]$destination) +{ + vcpkgCreateDirectory $destination + + if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') + { + Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") + Microsoft.PowerShell.Archive\Expand-Archive -path $file -destinationpath $destination + } + elseif (vcpkgHasCommand -commandName 'Pscx\Expand-Archive') + { + Write-Verbose("Extracting with Pscx\Expand-Archive") + Pscx\Expand-Archive -path $file -OutputPath $destination + } + else + { + Write-Verbose("Extracting via shell") + $shell = new-object -com shell.application + $zip = $shell.NameSpace($file) + foreach($item in $zip.items()) + { + # Piping to Out-Null is used to block until finished + $shell.Namespace($destination).copyhere($item) | Out-Null + } + } +} + +function vcpkgInvokeCommand() +{ + param ( [Parameter(Mandatory=$true)][string]$executable, + [string]$arguments = "", + [switch]$wait) + + Write-Verbose "Executing: ${executable} ${arguments}" + $process = Start-Process -FilePath $executable -ArgumentList $arguments -PassThru + if ($wait) + { + Wait-Process -InputObject $process + $ec = $process.ExitCode + Write-Verbose "Execution terminated with exit code $ec." + } +} \ No newline at end of file diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index b185336f5..8ea69e488 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -3,192 +3,21 @@ param( [string]$Dependency ) -function Test-Command($commandName) -{ - return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) -} - -function Test-CommandParameter($commandName, $parameterName) -{ - return (Get-Command $commandName).Parameters.Keys -contains $parameterName -} - -function Test-Module($moduleName) -{ - return [bool](Get-Module -ListAvailable -Name $moduleName) -} - -function Get-Credential-Backwards-Compatible() -{ - if (Test-CommandParameter -commandName 'Get-Credential' -parameterName 'Message') - { - return Get-Credential -Message "Enter credentials for Proxy Authentication" - } - else - { - Write-Host "Enter credentials for Proxy Authentication" - return Get-Credential - } -} - -function Get-Hash-SHA256() -{ - if (Test-Command -commandName 'Microsoft.PowerShell.Utility\Get-FileHash') - { - Write-Verbose("Hashing with Microsoft.PowerShell.Utility\Get-FileHash") - $downloadedFileHash = (Get-FileHash -Path $downloadPath -Algorithm SHA256).Hash - } - elseif(Test-Command -commandName 'Pscx\Get-Hash') - { - Write-Verbose("Hashing with Pscx\Get-Hash") - $downloadedFileHash = (Get-Hash -Path $downloadPath -Algorithm SHA256).HashString - } - else - { - Write-Verbose("Hashing with .NET") - $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256") - $fileAsByteArray = [io.File]::ReadAllBytes($downloadPath) - $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) - $downloadedFileHash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) - } - - return $downloadedFileHash.ToLower() -} - -if (Test-Module -moduleName 'BitsTransfer') -{ - Import-Module BitsTransfer -Verbose:$false -} +$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition +. "$scriptsDir\VcpkgPowershellUtils.ps1" Write-Verbose "Fetching dependency: $Dependency" - -$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { - function performDownload( [Parameter(Mandatory=$true)][string]$Dependency, - [Parameter(Mandatory=$true)][string]$url, - [Parameter(Mandatory=$true)][string]$downloadDir, - [Parameter(Mandatory=$true)][string]$downloadPath, - [Parameter(Mandatory=$true)][string]$downloadVersion, - [Parameter(Mandatory=$true)][string]$requiredVersion) - { - if (Test-Path $downloadPath) - { - return - } - - if (!(Test-Path $downloadDir)) - { - New-Item -ItemType directory -Path $downloadDir | Out-Null - } - - $downloadsTemp = "$downloadDir/temp" - if (Test-Path $downloadsTemp) # Delete temp dir if it exists - { - Remove-Item $downloadsTemp -Recurse -Force - } - if (!(Test-Path $downloadsTemp)) # Recreate temp dir. It may still be there the dir was in use - { - New-Item -ItemType directory -Path $downloadsTemp | Out-Null - } - - $tempDownloadName = "$downloadsTemp/$Dependency-$downloadVersion.temp" - - $WC = New-Object System.Net.WebClient - $ProxyAuth = !$WC.Proxy.IsBypassed($url) - - # git and installerbase fail with Start-BitsTransfer - if ((Test-Command -commandName 'Start-BitsTransfer') -and ($Dependency -ne "git")-and ($Dependency -ne "installerbase")) - { - try - { - if ($ProxyAuth) - { - $ProxyCred = Get-Credential-Backwards-Compatible - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential", $ProxyCred) - } - Start-BitsTransfer -Source $url -Destination $tempDownloadName -ErrorAction Stop - Move-Item -Path $tempDownloadName -Destination $downloadPath - return - } - catch [System.Exception] - { - # If BITS fails for any reason, delete any potentially partially downloaded files and continue - if (Test-Path $tempDownloadName) - { - Remove-Item $tempDownloadName - } - } - } - - if ($ProxyAuth) - { - $WC.Proxy.Credentials = Get-Credential-Backwards-Compatible - } - - Write-Verbose("Downloading $Dependency...") - $WC.DownloadFile($url, $tempDownloadName) - Move-Item -Path $tempDownloadName -Destination $downloadPath - } - # Enums (without resorting to C#) are only available on powershell 5+. $ExtractionType_NO_EXTRACTION_REQUIRED = 0 $ExtractionType_ZIP = 1 $ExtractionType_SELF_EXTRACTING_7Z = 2 - - # Using this to wait for the execution to finish - function Invoke-Command() - { - param ( [Parameter(Mandatory=$true)][string]$program, - [string]$argumentString = "", - [switch]$waitForExit = $false ) - - $psi = new-object "Diagnostics.ProcessStartInfo" - $psi.FileName = $program - $psi.Arguments = $argumentString - $proc = [Diagnostics.Process]::Start($psi) - if ( $waitForExit ) - { - $proc.WaitForExit(); - } - } - - function Expand-ZIPFile($file, $destination) - { - if (!(Test-Path $destination)) - { - New-Item -ItemType Directory -Path $destination | Out-Null - } - - if (Test-Command -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') - { - Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") - Microsoft.PowerShell.Archive\Expand-Archive -path $file -destinationpath $destination - } - elseif (Test-Command -commandName 'Pscx\Expand-Archive') - { - Write-Verbose("Extracting with Pscx\Expand-Archive") - Pscx\Expand-Archive -path $file -OutputPath $destination - } - else - { - Write-Verbose("Extracting via shell") - $shell = new-object -com shell.application - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - # Piping to Out-Null is used to block until finished - $shell.Namespace($destination).copyhere($item) | Out-Null - } - } - } - if($Dependency -eq "cmake") { $requiredVersion = "3.9.5" @@ -249,23 +78,10 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) throw "Unknown program requested" } - $downloadSubdir = Split-path $downloadPath -Parent - if (!(Test-Path $downloadSubdir)) - { - New-Item -ItemType Directory -Path $downloadSubdir | Out-Null - } - - performDownload $Dependency $url $downloadsDir $downloadPath $downloadVersion $requiredVersion + vcpkgDownloadFile $url $downloadPath - $downloadedFileHash = Get-Hash-SHA256 $downloadPath - if ($expectedDownloadedFileHash -ne $downloadedFileHash) - { - Write-Host ("`nFile does not have expected hash:`n" + - " File path: [ $downloadPath ]`n" + - " Expected hash: [ $expectedDownloadedFileHash ]`n" + - " Actual hash: [ $downloadedFileHash ]`n") - throw "Invalid Hash" - } + $downloadedFileHash = vcpkgGetSHA256 $downloadPath + vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash if ($extractionType -eq $ExtractionType_NO_EXTRACTION_REQUIRED) { @@ -275,14 +91,14 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { if (-not (Test-Path $executableFromDownload)) # consider renaming the extraction folder to make sure the extraction finished { - Expand-ZIPFile -File $downloadPath -Destination $extractionFolder + vcpkgExtractFile -File $downloadPath -Destination $extractionFolder } } elseif($extractionType -eq $ExtractionType_SELF_EXTRACTING_7Z) { if (-not (Test-Path $executableFromDownload)) { - Invoke-Command $downloadPath "-y" -waitForExit:$true + vcpkgInvokeCommand $downloadPath "-y" -wait:$true } } else -- cgit v1.2.3 From 2e726781461f163c9dcfa9c9070fddf3681d0e45 Mon Sep 17 00:00:00 2001 From: Alisayyy-Yang Date: Thu, 16 Nov 2017 01:35:19 -0800 Subject: [string-theory]disable the tests --- ports/string-theory/CONTROL | 2 +- ports/string-theory/disableTests.patch | 13 +++++++++++++ ports/string-theory/portfile.cmake | 6 +++++- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 ports/string-theory/disableTests.patch diff --git a/ports/string-theory/CONTROL b/ports/string-theory/CONTROL index 63bc5b656..26cf23674 100644 --- a/ports/string-theory/CONTROL +++ b/ports/string-theory/CONTROL @@ -1,3 +1,3 @@ Source: string-theory -Version: 1.6 +Version: 1.6-1 Description: Flexible C++11 string library with type-safe formatting. diff --git a/ports/string-theory/disableTests.patch b/ports/string-theory/disableTests.patch new file mode 100644 index 000000000..7990385ac --- /dev/null +++ b/ports/string-theory/disableTests.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cf79105..a29c209 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -230,5 +230,6 @@ install(FILES + install(EXPORT string_theory-targets + DESTINATION "${ST_INSTALL_CMAKE_DIR}/string_theory" COMPONENT devel) + +-enable_testing() +-add_subdirectory(test) ++# Note:we do not mind the tests, which caused our library build failed ,so disable the tests ++#enable_testing() ++#add_subdirectory(test) diff --git a/ports/string-theory/portfile.cmake b/ports/string-theory/portfile.cmake index 8a6cb1fd1..e3508b76a 100644 --- a/ports/string-theory/portfile.cmake +++ b/ports/string-theory/portfile.cmake @@ -7,7 +7,11 @@ vcpkg_from_github( SHA512 5bc99b6dfc2ab43d2812ee47dfbbeeb68106da39b2349799ab924f009270166ebb5508f87a37e634fbfa5495dd263697a582404650eedc5393722761c5ce2028 HEAD_REF master ) - +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/disableTests.patch +) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(ST_BUILD_STATIC ON) else() -- cgit v1.2.3 From b2e1dc3e5a4224bd06f1aaa52c87f5c8939787ae Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 16 Nov 2017 02:01:50 -0800 Subject: Use temp-and-rename pattern for extracting --- scripts/VcpkgPowershellUtils.ps1 | 13 ++++++++++--- scripts/fetchDependency.ps1 | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index c7447b383..12eacec96 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -144,16 +144,20 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, [Parameter(Mandatory=$true)][string]$destination) { vcpkgCreateDirectory $destination + $baseName = (Get-ChildItem .\downloads\cmake-3.9.5-win32-x86.zip).BaseName + $destinationPartial = "$destination\$baseName-partially_extracted" + vcpkgRemoveDirectory $destinationPartial + vcpkgCreateDirectory $destinationPartial if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') { Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") - Microsoft.PowerShell.Archive\Expand-Archive -path $file -destinationpath $destination + Microsoft.PowerShell.Archive\Expand-Archive -path $file -destinationpath $destinationPartial } elseif (vcpkgHasCommand -commandName 'Pscx\Expand-Archive') { Write-Verbose("Extracting with Pscx\Expand-Archive") - Pscx\Expand-Archive -path $file -OutputPath $destination + Pscx\Expand-Archive -path $file -OutputPath $destinationPartial } else { @@ -163,9 +167,12 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, foreach($item in $zip.items()) { # Piping to Out-Null is used to block until finished - $shell.Namespace($destination).copyhere($item) | Out-Null + $shell.Namespace($destinationPartial).copyhere($item) | Out-Null } } + + Move-Item -Path "$destinationPartial\*" -Destination $destination + vcpkgRemoveDirectory $destinationPartial } function vcpkgInvokeCommand() diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 8ea69e488..2cc782feb 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -89,7 +89,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($extractionType -eq $ExtractionType_ZIP) { - if (-not (Test-Path $executableFromDownload)) # consider renaming the extraction folder to make sure the extraction finished + if (-not (Test-Path $executableFromDownload)) { vcpkgExtractFile -File $downloadPath -Destination $extractionFolder } -- cgit v1.2.3 From cb30c3fd0014f264709287fee43f24310dfde4aa Mon Sep 17 00:00:00 2001 From: Aybe Date: Fri, 17 Nov 2017 00:54:14 +0100 Subject: [libflac] patches for UWP builds --- ports/libflac/CONTROL | 2 +- ports/libflac/portfile.cmake | 16 ++++++++++----- ports/libflac/uwp-consolewidth.patch | 16 +++++++++++++++ ports/libflac/uwp-createfile.patch | 38 +++++++++++++++++++++++++++++++++++ ports/libflac/uwp-loadlibrary.patch | 13 ++++++++++++ ports/libflac/uwp-writeconsole.patch | 39 ++++++++++++++++++++++++++++++++++++ 6 files changed, 118 insertions(+), 6 deletions(-) create mode 100644 ports/libflac/uwp-consolewidth.patch create mode 100644 ports/libflac/uwp-createfile.patch create mode 100644 ports/libflac/uwp-loadlibrary.patch create mode 100644 ports/libflac/uwp-writeconsole.patch diff --git a/ports/libflac/CONTROL b/ports/libflac/CONTROL index 2a0572d2a..ca2995d68 100644 --- a/ports/libflac/CONTROL +++ b/ports/libflac/CONTROL @@ -1,4 +1,4 @@ Source: libflac -Version: 1.3.2-3 +Version: 1.3.2-4 Description: Library for manipulating FLAC files Build-Depends: libogg diff --git a/ports/libflac/portfile.cmake b/ports/libflac/portfile.cmake index cbf7d6fd3..7657e3927 100644 --- a/ports/libflac/portfile.cmake +++ b/ports/libflac/portfile.cmake @@ -1,8 +1,3 @@ - # libFLAC uses winapi functions not available in WindowsStore -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: UWP builds are currently not supported.") -endif() - include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flac-1.3.2) vcpkg_download_distfile(ARCHIVE @@ -12,6 +7,17 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flac-1.3.2 + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/uwp-consolewidth.patch" + "${CMAKE_CURRENT_LIST_DIR}/uwp-loadlibrary.patch" + "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile.patch" + "${CMAKE_CURRENT_LIST_DIR}/uwp-writeconsole.patch" + ) +endif() + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) vcpkg_find_acquire_program(NASM) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) diff --git a/ports/libflac/uwp-consolewidth.patch b/ports/libflac/uwp-consolewidth.patch new file mode 100644 index 000000000..87a15f663 --- /dev/null +++ b/ports/libflac/uwp-consolewidth.patch @@ -0,0 +1,16 @@ +diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c +index c61d27f..5b0e8f0 100644 +--- a/src/share/win_utf8_io/win_utf8_io.c ++++ b/src/share/win_utf8_io/win_utf8_io.c +@@ -164,11 +164,6 @@ size_t strlen_utf8(const char *str) + int win_get_console_width(void) + { + int width = 80; +- CONSOLE_SCREEN_BUFFER_INFO csbi; +- HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); +- if(hOut != INVALID_HANDLE_VALUE && hOut != NULL) +- if (GetConsoleScreenBufferInfo(hOut, &csbi) != 0) +- width = csbi.dwSize.X; + return width; + } + diff --git a/ports/libflac/uwp-createfile.patch b/ports/libflac/uwp-createfile.patch new file mode 100644 index 000000000..348e66b0a --- /dev/null +++ b/ports/libflac/uwp-createfile.patch @@ -0,0 +1,38 @@ +diff --git a/src/libFLAC/windows_unicode_filenames.c b/src/libFLAC/windows_unicode_filenames.c +index 2404e31..6d8bc74 100644 +--- a/src/libFLAC/windows_unicode_filenames.c ++++ b/src/libFLAC/windows_unicode_filenames.c +@@ -185,17 +185,23 @@ int flac_internal_rename_utf8(const char *oldname, const char *newname) + + HANDLE WINAPI flac_internal_CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) + { +- if (!utf8_filenames) { +- return CreateFileA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); +- } else { +- wchar_t *wname; +- HANDLE handle = INVALID_HANDLE_VALUE; +- +- if ((wname = wchar_from_utf8(lpFileName)) != NULL) { +- handle = CreateFileW(wname, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); +- free(wname); +- } ++ HANDLE handle = INVALID_HANDLE_VALUE; + ++ if (!utf8_filenames) + return handle; ++ ++ wchar_t *wname; ++ ++ if ((wname = wchar_from_utf8(lpFileName)) != NULL) ++ { ++ CREATEFILE2_EXTENDED_PARAMETERS cfParams = {0}; ++ cfParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); ++ cfParams.dwFileAttributes = dwFlagsAndAttributes & FILE_ATTRIBUTE_NORMAL; ++ cfParams.lpSecurityAttributes = lpSecurityAttributes; ++ cfParams.hTemplateFile = hTemplateFile; ++ handle = CreateFile2(wname, dwDesiredAccess, dwShareMode, dwCreationDisposition, &cfParams); ++ free(wname); + } ++ ++ return handle; + } diff --git a/ports/libflac/uwp-loadlibrary.patch b/ports/libflac/uwp-loadlibrary.patch new file mode 100644 index 000000000..5d0b10df9 --- /dev/null +++ b/ports/libflac/uwp-loadlibrary.patch @@ -0,0 +1,13 @@ +diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c +index 5b0e8f0..15a76d4 100644 +--- a/src/share/win_utf8_io/win_utf8_io.c ++++ b/src/share/win_utf8_io/win_utf8_io.c +@@ -110,7 +110,7 @@ int get_utf8_argv(int *argc, char ***argv) + char **utf8argv; + int ret, i; + +- if ((handle = LoadLibrary("msvcrt.dll")) == NULL) return 1; ++ if ((handle = LoadPackagedLibrary("msvcrt.dll", 0)) == NULL) return 1; + if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) { + FreeLibrary(handle); + return 1; diff --git a/ports/libflac/uwp-writeconsole.patch b/ports/libflac/uwp-writeconsole.patch new file mode 100644 index 000000000..feef96305 --- /dev/null +++ b/ports/libflac/uwp-writeconsole.patch @@ -0,0 +1,39 @@ +diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c +index 15a76d4..bfcc9db 100644 +--- a/src/share/win_utf8_io/win_utf8_io.c ++++ b/src/share/win_utf8_io/win_utf8_io.c +@@ -171,31 +171,13 @@ int win_get_console_width(void) + + static int wprint_console(FILE *stream, const wchar_t *text, size_t len) + { +- DWORD out; +- int ret; ++ // disabled for UWP (https://docs.microsoft.com/en-us/uwp/win32-and-com/alternatives-to-windows-apis-uwp) + +- do { +- if (stream == stdout) { +- HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); +- if (hOut == INVALID_HANDLE_VALUE || hOut == NULL || GetFileType(hOut) != FILE_TYPE_CHAR) +- break; +- if (WriteConsoleW(hOut, text, len, &out, NULL) == 0) +- return -1; +- return out; +- } +- if (stream == stderr) { +- HANDLE hErr = GetStdHandle(STD_ERROR_HANDLE); +- if (hErr == INVALID_HANDLE_VALUE || hErr == NULL || GetFileType(hErr) != FILE_TYPE_CHAR) +- break; +- if (WriteConsoleW(hErr, text, len, &out, NULL) == 0) +- return -1; +- return out; +- } +- } while(0); ++ int ret = fputws(text, stream); + +- ret = fputws(text, stream); + if (ret < 0) + return ret; ++ + return len; + } + -- cgit v1.2.3 From 295bb9f45429900d019562e487272a5acde59f16 Mon Sep 17 00:00:00 2001 From: Aybe Date: Fri, 17 Nov 2017 02:10:21 +0100 Subject: [libsndfile] patches for UWP builds --- ports/libsndfile/CONTROL | 2 +- ports/libsndfile/portfile.cmake | 9 ++++++++ ports/libsndfile/uwp-createfile.patch | 39 ++++++++++++++++++++++++++++++++++ ports/libsndfile/uwp-getfilesize.patch | 29 +++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 ports/libsndfile/uwp-createfile.patch create mode 100644 ports/libsndfile/uwp-getfilesize.patch diff --git a/ports/libsndfile/CONTROL b/ports/libsndfile/CONTROL index 67e058991..70be2ab6c 100644 --- a/ports/libsndfile/CONTROL +++ b/ports/libsndfile/CONTROL @@ -1,4 +1,4 @@ Source: libsndfile -Version: 1.0.29-6830c42-1 +Version: 1.0.29-6830c42-2 Description: Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo Build-Depends: libogg, libflac, libvorbis diff --git a/ports/libsndfile/portfile.cmake b/ports/libsndfile/portfile.cmake index ac07f96a0..304bc005b 100644 --- a/ports/libsndfile/portfile.cmake +++ b/ports/libsndfile/portfile.cmake @@ -19,6 +19,15 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsndfile-6830c421899e32f8d413a903a21a9b6cf384d369 + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile.patch" + "${CMAKE_CURRENT_LIST_DIR}/uwp-getfilesize.patch" + ) +endif() + if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") set(CRT_LIB_STATIC 0) elseif (VCPKG_CRT_LINKAGE STREQUAL "static") diff --git a/ports/libsndfile/uwp-createfile.patch b/ports/libsndfile/uwp-createfile.patch new file mode 100644 index 000000000..d4b58a74f --- /dev/null +++ b/ports/libsndfile/uwp-createfile.patch @@ -0,0 +1,39 @@ +diff --git a/src/file_io.c b/src/file_io.c +index 7cf8f0c..a47ce6b 100644 +--- a/src/file_io.c ++++ b/src/file_io.c +@@ -787,26 +787,14 @@ psf_open_handle (PSF_FILE * pfile) + return NULL ; + } ; + +- if (pfile->use_wchar) +- handle = CreateFileW ( +- pfile->path.wc, /* pointer to name of the file */ +- dwDesiredAccess, /* access (read-write) mode */ +- dwShareMode, /* share mode */ +- 0, /* pointer to security attributes */ +- dwCreationDistribution, /* how to create */ +- FILE_ATTRIBUTE_NORMAL, /* file attributes (could use FILE_FLAG_SEQUENTIAL_SCAN) */ +- NULL /* handle to file with attributes to copy */ +- ) ; +- else +- handle = CreateFile ( +- pfile->path.c, /* pointer to name of the file */ +- dwDesiredAccess, /* access (read-write) mode */ +- dwShareMode, /* share mode */ +- 0, /* pointer to security attributes */ +- dwCreationDistribution, /* how to create */ +- FILE_ATTRIBUTE_NORMAL, /* file attributes (could use FILE_FLAG_SEQUENTIAL_SCAN) */ +- NULL /* handle to file with attributes to copy */ +- ) ; ++ if (!pfile->use_wchar) ++ return NULL; ++ ++ CREATEFILE2_EXTENDED_PARAMETERS cfParams = {0}; ++ cfParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); ++ cfParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; ++ ++ handle = CreateFile2(pfile->path.wc, dwDesiredAccess, dwShareMode, dwCreationDistribution, &cfParams); + + if (handle == INVALID_HANDLE_VALUE) + return NULL ; diff --git a/ports/libsndfile/uwp-getfilesize.patch b/ports/libsndfile/uwp-getfilesize.patch new file mode 100644 index 000000000..1ecbcda7f --- /dev/null +++ b/ports/libsndfile/uwp-getfilesize.patch @@ -0,0 +1,29 @@ +diff --git a/src/file_io.c b/src/file_io.c +index a47ce6b..4b38455 100644 +--- a/src/file_io.c ++++ b/src/file_io.c +@@ -1093,19 +1093,16 @@ psf_is_pipe (SF_PRIVATE *psf) + /* USE_WINDOWS_API */ sf_count_t + psf_get_filelen_handle (HANDLE handle) + { sf_count_t filelen ; +- DWORD dwFileSizeLow, dwFileSizeHigh, dwError = NO_ERROR ; ++ DWORD dwError = NO_ERROR ; ++ LARGE_INTEGER size; + +- dwFileSizeLow = GetFileSize (handle, &dwFileSizeHigh) ; +- +- if (dwFileSizeLow == 0xFFFFFFFF) +- dwError = GetLastError () ; ++ if (!GetFileSizeEx(handle, &size)) ++ dwError = GetLastError(); + + if (dwError != NO_ERROR) + return (sf_count_t) -1 ; + +- filelen = dwFileSizeLow + ((__int64) dwFileSizeHigh << 32) ; +- +- return filelen ; ++ return size.QuadPart; + } /* psf_get_filelen_handle */ + + /* USE_WINDOWS_API */ void -- cgit v1.2.3 From 34b4db1fb45df541b8a2c7592a57ac6a8fd0b900 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 16 Nov 2017 17:42:15 -0800 Subject: [vcpkg] Output autodetected CMake usage information after install. --- toolsrc/include/vcpkg/build.h | 6 ++ toolsrc/include/vcpkg/install.h | 14 ++-- toolsrc/src/vcpkg/install.cpp | 140 ++++++++++++++++++++++++++++++++++------ 3 files changed, 134 insertions(+), 26 deletions(-) diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 824f3ccaf..cbd34c730 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -69,6 +69,12 @@ namespace vcpkg::Build EXCLUDED, }; + struct BuildResults + { + BuildResult result_code; + std::unique_ptr binary_control_file; + }; + static constexpr std::array BUILD_RESULT_VALUES = { BuildResult::SUCCEEDED, BuildResult::BUILD_FAILED, diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index df7542318..e436e2238 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -30,11 +30,15 @@ namespace vcpkg::Install struct SpecSummary { - explicit SpecSummary(const PackageSpec& spec); + SpecSummary(const PackageSpec& spec, const Dependencies::AnyAction* action); + + const BinaryParagraph* get_binary_paragraph() const; PackageSpec spec; - Build::BuildResult result; + Build::BuildResults build_result; std::string timing; + + const Dependencies::AnyAction* action; }; struct InstallSummary @@ -62,9 +66,9 @@ namespace vcpkg::Install const fs::path& listfile() const; }; - Build::BuildResult perform_install_plan_action(const VcpkgPaths& paths, - const Dependencies::InstallPlanAction& action, - StatusParagraphs& status_db); + Build::BuildResults perform_install_plan_action(const VcpkgPaths& paths, + const Dependencies::InstallPlanAction& action, + StatusParagraphs& status_db); enum class InstallResult { diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 88ef5c73d..7edcafb1f 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -247,10 +247,11 @@ namespace vcpkg::Install } using Build::BuildResult; + using Build::BuildResults; - BuildResult perform_install_plan_action(const VcpkgPaths& paths, - const InstallPlanAction& action, - StatusParagraphs& status_db) + BuildResults perform_install_plan_action(const VcpkgPaths& paths, + const InstallPlanAction& action, + StatusParagraphs& status_db) { const InstallPlanType& plan_type = action.plan_type; const std::string display_name = action.spec.to_string(); @@ -267,7 +268,7 @@ namespace vcpkg::Install System::Color::warning, "Package %s is already installed -- not building from HEAD", display_name); else System::println(System::Color::success, "Package %s is already installed", display_name); - return BuildResult::SUCCEEDED; + return {BuildResult::SUCCEEDED, nullptr}; } if (plan_type == InstallPlanType::BUILD_AND_INSTALL) @@ -302,21 +303,21 @@ namespace vcpkg::Install if (result.code != Build::BuildResult::SUCCEEDED) { System::println(System::Color::error, Build::create_error_message(result.code, action.spec)); - return result.code; + return {result.code, nullptr}; } System::println("Building package %s... done", display_name_with_features); - const BinaryControlFile bcf = - Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO); + auto bcf = std::make_unique( + Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO)); System::println("Installing package %s... ", display_name_with_features); - const auto install_result = install_package(paths, bcf, &status_db); + const auto install_result = install_package(paths, *bcf, &status_db); switch (install_result) { case InstallResult::SUCCESS: System::println(System::Color::success, "Installing package %s... done", display_name); - return BuildResult::SUCCEEDED; - case InstallResult::FILE_CONFLICTS: return BuildResult::FILE_CONFLICTS; + return {BuildResult::SUCCEEDED, std::move(bcf)}; + case InstallResult::FILE_CONFLICTS: return {BuildResult::FILE_CONFLICTS, nullptr}; default: Checks::unreachable(VCPKG_LINE_INFO); } } @@ -335,8 +336,8 @@ namespace vcpkg::Install { case InstallResult::SUCCESS: System::println(System::Color::success, "Installing package %s... done", display_name); - return BuildResult::SUCCEEDED; - case InstallResult::FILE_CONFLICTS: return BuildResult::FILE_CONFLICTS; + return {BuildResult::SUCCEEDED, nullptr}; + case InstallResult::FILE_CONFLICTS: return {BuildResult::FILE_CONFLICTS, nullptr}; default: Checks::unreachable(VCPKG_LINE_INFO); } } @@ -344,7 +345,7 @@ namespace vcpkg::Install if (plan_type == InstallPlanType::EXCLUDED) { System::println(System::Color::warning, "Package %s is excluded", display_name); - return BuildResult::EXCLUDED; + return {BuildResult::EXCLUDED, nullptr}; } Checks::unreachable(VCPKG_LINE_INFO); @@ -458,7 +459,8 @@ namespace vcpkg::Install for (const SpecSummary& result : this->results) { - System::println(" %s: %s: %s", result.spec, Build::to_string(result.result), result.timing); + System::println( + " %s: %s: %s", result.spec, Build::to_string(result.build_result.result_code), result.timing); } std::map summary; @@ -469,7 +471,7 @@ namespace vcpkg::Install for (const SpecSummary& r : this->results) { - summary[r.result]++; + summary[r.build_result.result_code]++; } System::println("\nSUMMARY"); @@ -500,11 +502,11 @@ namespace vcpkg::Install const std::string display_name = spec.to_string(); System::println("Starting package %d/%d: %s", counter, package_count, display_name); - results.push_back(SpecSummary{spec}); + results.emplace_back(spec, &action); if (const auto install_action = action.install_plan.get()) { - const BuildResult result = perform_install_plan_action(paths, *install_action, status_db); + Build::BuildResults result = perform_install_plan_action(paths, *install_action, status_db); if (clean_buildtrees == CleanBuildtrees::YES) { auto& fs = paths.get_filesystem(); @@ -520,13 +522,13 @@ namespace vcpkg::Install } } - if (result != BuildResult::SUCCEEDED && keep_going == KeepGoing::NO) + if (result.result_code != BuildResult::SUCCEEDED && keep_going == KeepGoing::NO) { System::println(Build::create_user_troubleshooting_message(install_action->spec)); Checks::exit_fail(VCPKG_LINE_INFO); } - results.back().result = result; + results.back().build_result = std::move(result); } else if (const auto remove_action = action.remove_plan.get()) { @@ -542,7 +544,7 @@ namespace vcpkg::Install System::println("Elapsed time for package %s: %s", display_name, build_timer.to_string()); } - return InstallSummary{results, timer.to_string()}; + return InstallSummary{std::move(results), timer.to_string()}; } static const std::string OPTION_DRY_RUN = "--dry-run"; @@ -576,6 +578,69 @@ namespace vcpkg::Install &get_all_port_names, }; + static void print_cmake_information(const BinaryParagraph& bpgh, const VcpkgPaths& paths) + { + static const std::regex cmake_library_regex("^add_library\\(([^\\s\\$\\)]+)\\s"); + + auto& fs = paths.get_filesystem(); + + auto files = fs.read_lines(paths.listfile_path(bpgh)); + if (auto p_lines = files.get()) + { + for (auto&& suffix : *p_lines) + { + if (Strings::case_insensitive_ascii_find(suffix, "/share/") != suffix.end()) + { + std::vector library_targets; + + // File is inside the share folder + auto path = paths.installed / suffix; + auto maybe_contents = fs.read_contents(path); + if (auto p_contents = maybe_contents.get()) + { + std::sregex_iterator next(p_contents->begin(), p_contents->end(), cmake_library_regex); + std::sregex_iterator last; + + while (next != last) + { + auto match = *next; + library_targets.push_back(match[1]); + ++next; + } + } + + if (library_targets.empty()) + { + } + else if (library_targets.size() <= 4) + { + System::println("\nThe package %s provides CMake targets:\n" + "\n" + " find_package(%s REQUIRED)\n" + " target_link_libraries(main PRIVATE %s)", + bpgh.spec, + path.parent_path().filename().u8string(), + Strings::join(" ", library_targets)); + } + else + { + auto omitted = library_targets.size() - 4; + library_targets.erase(library_targets.begin() + 4, library_targets.end()); + System::println("\nThe package %s provides CMake targets:\n" + "\n" + " find_package(%s REQUIRED)\n" + " # Note: %d targets were omitted\n" + " target_link_libraries(main PRIVATE %s)", + bpgh.spec, + path.parent_path().filename().u8string(), + omitted, + Strings::join(" ", library_targets)); + } + } + } + } + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { // input sanitization @@ -670,8 +735,41 @@ namespace vcpkg::Install summary.print(); } + auto& fs = paths.get_filesystem(); + + for (auto&& result : summary.results) + { + if (!result.action) continue; + if (auto p_install_action = result.action->install_plan.get()) + { + if (p_install_action->request_type != RequestType::USER_REQUESTED) continue; + auto bpgh = result.get_binary_paragraph(); + if (!bpgh) continue; + print_cmake_information(*bpgh, paths); + } + } + Checks::exit_success(VCPKG_LINE_INFO); } - SpecSummary::SpecSummary(const PackageSpec& spec) : spec(spec), result(BuildResult::NULLVALUE), timing("0") {} + SpecSummary::SpecSummary(const PackageSpec& spec, const Dependencies::AnyAction* action) + : spec(spec), build_result{BuildResult::NULLVALUE, nullptr}, timing("0"), action(action) + { + } + + const BinaryParagraph* SpecSummary::get_binary_paragraph() const + { + if (build_result.binary_control_file) return &build_result.binary_control_file->core_paragraph; + if (action) + if (auto p_install_plan = action->install_plan.get()) + { + if (auto p_bcf = p_install_plan->any_paragraph.binary_control_file.get()) + return &p_bcf->core_paragraph; + else if (auto p_status = p_install_plan->any_paragraph.status_paragraph.get()) + { + return &p_status->package; + } + } + return nullptr; + } } -- cgit v1.2.3 From 9bd4d9a050657b4ec372868c3ff506b088ccb971 Mon Sep 17 00:00:00 2001 From: Aybe Date: Fri, 17 Nov 2017 04:03:49 +0100 Subject: [aubio] patches for UWP builds --- ports/aubio/CMakeLists.txt | 2 ++ ports/aubio/CONTROL | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt index 3e20a28f6..50e61339e 100644 --- a/ports/aubio/CMakeLists.txt +++ b/ports/aubio/CMakeLists.txt @@ -15,6 +15,8 @@ add_definitions( -DHAVE_WAVREAD=1 -DHAVE_LIBAV=1 -DHAVE_SWRESAMPLE=1 + + -D_CRT_SECURE_NO_WARNINGS=1 ) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL index 34fcaa495..8a6f114a7 100644 --- a/ports/aubio/CONTROL +++ b/ports/aubio/CONTROL @@ -1,4 +1,4 @@ Source: aubio -Version: 0.46~alpha-3 +Version: 0.46~alpha-4 Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis -- cgit v1.2.3 From 468e9e70e644eb26258434c9e27e34935eb3e06d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 16 Nov 2017 19:29:32 -0800 Subject: [vcpkg] Refactor to remove Build::BuildResults -- too similar to ExtendedBuildResult --- toolsrc/include/vcpkg/base/util.h | 15 +++++++ toolsrc/include/vcpkg/build.h | 28 +++++------- toolsrc/include/vcpkg/install.h | 20 ++------- toolsrc/src/vcpkg/build.cpp | 66 ++++++++++++++++++---------- toolsrc/src/vcpkg/commands.ci.cpp | 8 +++- toolsrc/src/vcpkg/install.cpp | 90 ++++++++++++++++----------------------- 6 files changed, 115 insertions(+), 112 deletions(-) diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 8d78fd6cc..6c05a3a9e 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -190,4 +190,19 @@ namespace vcpkg::Util std::unique_lock m_lock; T& m_ptr; }; + + namespace Enum + { + template + E to_enum(bool b) + { + return b ? E::YES : E::NO; + } + + template + bool to_bool(E e) + { + return e == E::YES; + } + } } diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index cbd34c730..1f6782ccf 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -32,30 +32,23 @@ namespace vcpkg::Build YES }; - inline UseHeadVersion to_use_head_version(const bool value) - { - return value ? UseHeadVersion::YES : UseHeadVersion::NO; - } - - inline bool to_bool(const UseHeadVersion value) { return value == UseHeadVersion::YES; } - enum class AllowDownloads { NO = 0, YES }; - inline AllowDownloads to_allow_downloads(const bool value) + enum class CleanBuildtrees { - return value ? AllowDownloads::YES : AllowDownloads::NO; - } - - inline bool to_bool(const AllowDownloads value) { return value == AllowDownloads::YES; } + NO = 0, + YES + }; struct BuildPackageOptions { UseHeadVersion use_head_version; AllowDownloads allow_downloads; + CleanBuildtrees clean_buildtrees; }; enum class BuildResult @@ -69,12 +62,6 @@ namespace vcpkg::Build EXCLUDED, }; - struct BuildResults - { - BuildResult result_code; - std::unique_ptr binary_control_file; - }; - static constexpr std::array BUILD_RESULT_VALUES = { BuildResult::SUCCEEDED, BuildResult::BUILD_FAILED, @@ -108,8 +95,13 @@ namespace vcpkg::Build struct ExtendedBuildResult { + ExtendedBuildResult(BuildResult code); + ExtendedBuildResult(BuildResult code, std::vector&& unmet_deps); + ExtendedBuildResult(BuildResult code, std::unique_ptr&& bcf); + BuildResult code; std::vector unmet_dependencies; + std::unique_ptr binary_control_file; }; struct BuildPackageConfig diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index e436e2238..28896adee 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -17,17 +17,6 @@ namespace vcpkg::Install inline KeepGoing to_keep_going(const bool value) { return value ? KeepGoing::YES : KeepGoing::NO; } - enum class CleanBuildtrees - { - NO = 0, - YES - }; - - inline CleanBuildtrees to_clean_buildtrees(const bool value) - { - return value ? CleanBuildtrees::YES : CleanBuildtrees::NO; - } - struct SpecSummary { SpecSummary(const PackageSpec& spec, const Dependencies::AnyAction* action); @@ -35,7 +24,7 @@ namespace vcpkg::Install const BinaryParagraph* get_binary_paragraph() const; PackageSpec spec; - Build::BuildResults build_result; + Build::ExtendedBuildResult build_result; std::string timing; const Dependencies::AnyAction* action; @@ -66,9 +55,9 @@ namespace vcpkg::Install const fs::path& listfile() const; }; - Build::BuildResults perform_install_plan_action(const VcpkgPaths& paths, - const Dependencies::InstallPlanAction& action, - StatusParagraphs& status_db); + Build::ExtendedBuildResult perform_install_plan_action(const VcpkgPaths& paths, + const Dependencies::InstallPlanAction& action, + StatusParagraphs& status_db); enum class InstallResult { @@ -85,7 +74,6 @@ namespace vcpkg::Install InstallSummary perform(const std::vector& action_plan, const KeepGoing keep_going, - const CleanBuildtrees clean_buildtrees, const VcpkgPaths& paths, StatusParagraphs& status_db); diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index b0ca3501b..e3787a97e 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -220,26 +220,25 @@ namespace vcpkg::Build tonull); } - static void create_binary_feature_control_file(const SourceParagraph& source_paragraph, - const FeatureParagraph& feature_paragraph, - const Triplet& triplet, - BinaryControlFile& bcf) + static BinaryParagraph create_binary_feature_control_file(const SourceParagraph& source_paragraph, + const FeatureParagraph& feature_paragraph, + const Triplet& triplet) { - BinaryParagraph bpgh(source_paragraph, feature_paragraph, triplet); - bcf.features.emplace_back(std::move(bpgh)); + return BinaryParagraph(source_paragraph, feature_paragraph, triplet); } - static void create_binary_control_file(const SourceParagraph& source_paragraph, - const Triplet& triplet, - const BuildInfo& build_info, - BinaryControlFile& bcf) + static std::unique_ptr create_binary_control_file(const SourceParagraph& source_paragraph, + const Triplet& triplet, + const BuildInfo& build_info) { + auto bcf = std::make_unique(); BinaryParagraph bpgh(source_paragraph, triplet); if (const auto p_ver = build_info.version.get()) { bpgh.version = *p_ver; } - bcf.core_paragraph = std::move(bpgh); + bcf->core_paragraph = std::move(bpgh); + return bcf; } static void write_binary_control_file(const VcpkgPaths& paths, BinaryControlFile bcf) @@ -311,8 +310,9 @@ namespace vcpkg::Build {"CURRENT_PORT_DIR", config.port_dir / "/."}, {"TARGET_TRIPLET", triplet.canonical_name()}, {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, - {"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, - {"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, + {"VCPKG_USE_HEAD_VERSION", + Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, + {"_VCPKG_NO_DOWNLOADS", !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, {"GIT", git_exe_path}, {"FEATURES", features}, }); @@ -333,20 +333,18 @@ namespace vcpkg::Build { locked_metrics->track_property("error", "build failed"); locked_metrics->track_property("build_error", spec_string); - return {BuildResult::BUILD_FAILED, {}}; + return BuildResult::BUILD_FAILED; } } const BuildInfo build_info = 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); - BinaryControlFile bcf; - - create_binary_control_file(config.src, triplet, build_info, bcf); + auto bcf = create_binary_control_file(config.src, triplet, build_info); if (error_count != 0) { - return {BuildResult::POST_BUILD_CHECKS_FAILED, {}}; + return BuildResult::POST_BUILD_CHECKS_FAILED; } if (GlobalState::feature_packages) { @@ -357,18 +355,31 @@ namespace vcpkg::Build for (auto&& f_pgh : config.scf->feature_paragraphs) { if (f_pgh->name == feature) - create_binary_feature_control_file(*config.scf->core_paragraph, *f_pgh, triplet, bcf); + bcf->features.push_back( + create_binary_feature_control_file(*config.scf->core_paragraph, *f_pgh, triplet)); } } } } - write_binary_control_file(paths, bcf); + write_binary_control_file(paths, *bcf); - // const fs::path port_buildtrees_dir = paths.buildtrees / spec.name; - // delete_directory(port_buildtrees_dir); + if (config.build_package_options.clean_buildtrees == CleanBuildtrees::YES) + { + auto& fs = paths.get_filesystem(); + auto buildtrees_dir = paths.buildtrees / spec.name(); + auto buildtree_files = fs.get_files_non_recursive(buildtrees_dir); + for (auto&& file : buildtree_files) + { + if (fs.is_directory(file) && file.filename() != "src") + { + std::error_code ec; + fs.remove_all(file, ec); + } + } + } - return {BuildResult::SUCCEEDED, {}}; + return {BuildResult::SUCCEEDED, std::move(bcf)}; } const std::string& to_string(const BuildResult build_result) @@ -549,4 +560,13 @@ namespace vcpkg::Build 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)) + { + } + ExtendedBuildResult::ExtendedBuildResult(BuildResult code, std::vector&& unmet_deps) + : code(code), unmet_dependencies(std::move(unmet_deps)) + { + } } diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 3c1c443f0..8f79b83e1 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -41,7 +41,11 @@ namespace vcpkg::Commands::CI Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); - const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; + const Build::BuildPackageOptions install_plan_options = { + Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::YES, + }; const std::vector action_plan = Util::fmap(install_plan, [&install_plan_options](InstallPlanAction& install_action) { @@ -49,7 +53,7 @@ namespace vcpkg::Commands::CI return Dependencies::AnyAction(std::move(install_action)); }); - return Install::perform(action_plan, Install::KeepGoing::YES, Install::CleanBuildtrees::YES, paths, status_db); + return Install::perform(action_plan, Install::KeepGoing::YES, paths, status_db); } struct TripletAndSummary diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 7edcafb1f..cc006811b 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -247,11 +247,11 @@ namespace vcpkg::Install } using Build::BuildResult; - using Build::BuildResults; + using Build::ExtendedBuildResult; - BuildResults perform_install_plan_action(const VcpkgPaths& paths, - const InstallPlanAction& action, - StatusParagraphs& status_db) + ExtendedBuildResult perform_install_plan_action(const VcpkgPaths& paths, + const InstallPlanAction& action, + StatusParagraphs& status_db) { const InstallPlanType& plan_type = action.plan_type; const std::string display_name = action.spec.to_string(); @@ -259,7 +259,7 @@ namespace vcpkg::Install GlobalState::feature_packages ? action.displayname() : display_name; const bool is_user_requested = action.request_type == RequestType::USER_REQUESTED; - const bool use_head_version = to_bool(action.build_options.use_head_version); + const bool use_head_version = Util::Enum::to_bool(action.build_options.use_head_version); if (plan_type == InstallPlanType::ALREADY_INSTALLED) { @@ -268,9 +268,22 @@ namespace vcpkg::Install System::Color::warning, "Package %s is already installed -- not building from HEAD", display_name); else System::println(System::Color::success, "Package %s is already installed", display_name); - return {BuildResult::SUCCEEDED, nullptr}; + return BuildResult::SUCCEEDED; } + auto aux_install = [&](const std::string& name, const BinaryControlFile& bcf) -> BuildResult { + System::println("Installing package %s... ", name); + const auto install_result = install_package(paths, bcf, &status_db); + switch (install_result) + { + case InstallResult::SUCCESS: + System::println(System::Color::success, "Installing package %s... done", name); + return BuildResult::SUCCEEDED; + case InstallResult::FILE_CONFLICTS: return BuildResult::FILE_CONFLICTS; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + }; + if (plan_type == InstallPlanType::BUILD_AND_INSTALL) { if (use_head_version) @@ -278,7 +291,7 @@ namespace vcpkg::Install else System::println("Building package %s... ", display_name_with_features); - const auto result = [&]() -> Build::ExtendedBuildResult { + auto result = [&]() -> Build::ExtendedBuildResult { if (GlobalState::feature_packages) { const Build::BuildPackageConfig build_config{ @@ -303,23 +316,15 @@ namespace vcpkg::Install if (result.code != Build::BuildResult::SUCCEEDED) { System::println(System::Color::error, Build::create_error_message(result.code, action.spec)); - return {result.code, nullptr}; + return result; } System::println("Building package %s... done", display_name_with_features); auto bcf = std::make_unique( Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO)); - System::println("Installing package %s... ", display_name_with_features); - const auto install_result = install_package(paths, *bcf, &status_db); - switch (install_result) - { - case InstallResult::SUCCESS: - System::println(System::Color::success, "Installing package %s... done", display_name); - return {BuildResult::SUCCEEDED, std::move(bcf)}; - case InstallResult::FILE_CONFLICTS: return {BuildResult::FILE_CONFLICTS, nullptr}; - default: Checks::unreachable(VCPKG_LINE_INFO); - } + auto code = aux_install(display_name_with_features, *bcf); + return {code, std::move(bcf)}; } if (plan_type == InstallPlanType::INSTALL) @@ -329,23 +334,15 @@ namespace vcpkg::Install System::println( System::Color::warning, "Package %s is already built -- not building from HEAD", display_name); } - System::println("Installing package %s... ", display_name); - const auto install_result = install_package( - paths, action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO), &status_db); - switch (install_result) - { - case InstallResult::SUCCESS: - System::println(System::Color::success, "Installing package %s... done", display_name); - return {BuildResult::SUCCEEDED, nullptr}; - case InstallResult::FILE_CONFLICTS: return {BuildResult::FILE_CONFLICTS, nullptr}; - default: Checks::unreachable(VCPKG_LINE_INFO); - } + auto code = aux_install(display_name_with_features, + action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO)); + return code; } if (plan_type == InstallPlanType::EXCLUDED) { System::println(System::Color::warning, "Package %s is excluded", display_name); - return {BuildResult::EXCLUDED, nullptr}; + return BuildResult::EXCLUDED; } Checks::unreachable(VCPKG_LINE_INFO); @@ -459,8 +456,7 @@ namespace vcpkg::Install for (const SpecSummary& result : this->results) { - System::println( - " %s: %s: %s", result.spec, Build::to_string(result.build_result.result_code), result.timing); + System::println(" %s: %s: %s", result.spec, Build::to_string(result.build_result.code), result.timing); } std::map summary; @@ -471,7 +467,7 @@ namespace vcpkg::Install for (const SpecSummary& r : this->results) { - summary[r.build_result.result_code]++; + summary[r.build_result.code]++; } System::println("\nSUMMARY"); @@ -483,7 +479,6 @@ namespace vcpkg::Install InstallSummary perform(const std::vector& action_plan, const KeepGoing keep_going, - const CleanBuildtrees clean_buildtrees, const VcpkgPaths& paths, StatusParagraphs& status_db) { @@ -506,23 +501,9 @@ namespace vcpkg::Install if (const auto install_action = action.install_plan.get()) { - Build::BuildResults result = perform_install_plan_action(paths, *install_action, status_db); - if (clean_buildtrees == CleanBuildtrees::YES) - { - auto& fs = paths.get_filesystem(); - auto buildtrees_dir = paths.buildtrees / install_action->spec.name(); - auto buildtree_files = fs.get_files_non_recursive(buildtrees_dir); - for (auto&& file : buildtree_files) - { - if (fs.is_directory(file) && file.filename() != "src") - { - std::error_code ec; - fs.remove_all(file, ec); - } - } - } + auto result = perform_install_plan_action(paths, *install_action, status_db); - if (result.result_code != BuildResult::SUCCEEDED && keep_going == KeepGoing::NO) + if (result.code != BuildResult::SUCCEEDED && keep_going == KeepGoing::NO) { System::println(Build::create_user_troubleshooting_message(install_action->spec)); Checks::exit_fail(VCPKG_LINE_INFO); @@ -669,8 +650,11 @@ namespace vcpkg::Install // create the plan StatusParagraphs status_db = database_load_check(paths); - const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version), - Build::to_allow_downloads(!no_downloads)}; + const Build::BuildPackageOptions install_plan_options = { + Util::Enum::to_enum(use_head_version), + Util::Enum::to_enum(!no_downloads), + Build::CleanBuildtrees::NO, + }; // Note: action_plan will hold raw pointers to SourceControlFiles from this map std::unordered_map scf_map; @@ -726,7 +710,7 @@ namespace vcpkg::Install Checks::exit_success(VCPKG_LINE_INFO); } - const InstallSummary summary = perform(action_plan, keep_going, Install::CleanBuildtrees::NO, paths, status_db); + const InstallSummary summary = perform(action_plan, keep_going, paths, status_db); System::println("\nTotal elapsed time: %s", summary.total_elapsed_time); -- cgit v1.2.3 From 5236fa3cc7635ea3f828b792ec38191299338d0a Mon Sep 17 00:00:00 2001 From: jasjuang Date: Thu, 16 Nov 2017 22:34:25 -0800 Subject: add in clang and enable tools --- ports/llvm/CONTROL | 2 +- ports/llvm/portfile.cmake | 32 +++++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index 2ea653a12..fb8b1b3da 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,3 +1,3 @@ Source: llvm -Version: 5.0.0-2 +Version: 5.0.0-3 Description: The LLVM Compiler Infrastructure diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index a2f32abe9..c4233af37 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -11,6 +11,17 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_download_distfile(CLANG_ARCHIVE + URLS "http://releases.llvm.org/5.0.0/cfe-5.0.0.src.tar.xz" + FILENAME "cfe-5.0.0.src.tar.xz" + SHA512 14acdd622310122b544c952ee5b932b7006d9d8424319f0e3974f2503d40a0cec4200fdd3d813a32ce0d877bcfbb9a5bd5c36f6142b4330e6c814f113ca2efe8 +) +vcpkg_extract_source_archive(${CLANG_ARCHIVE} ${SOURCE_PATH}/tools) + +if(NOT EXISTS ${SOURCE_PATH}/tools/clang) + file(RENAME ${SOURCE_PATH}/tools/cfe-5.0.0.src ${SOURCE_PATH}/tools/clang) +endif() + vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-cmake-modules-to-share.patch @@ -25,7 +36,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DLLVM_TARGETS_TO_BUILD=X86 - -DLLVM_INCLUDE_TOOLS=OFF + -DLLVM_INCLUDE_TOOLS=ON -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF @@ -35,6 +46,18 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*) +file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*) +file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools) +file(REMOVE ${EXE}) +file(REMOVE ${DEBUG_EXE}) + +file(GLOB CMAKECONFIG_DEBUG ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/clang/*) +file(GLOB CMAKECONFIG ${CURRENT_PACKAGES_DIR}/lib/cmake/clang/*) +file(COPY ${CMAKECONFIG_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/share/clang) +file(COPY ${CMAKECONFIG} DESTINATION ${CURRENT_PACKAGES_DIR}/share/clang) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/llvm) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/llvm) @@ -42,6 +65,13 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/tools ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/msbuild-bin + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/lib/cmake + ${CURRENT_PACKAGES_DIR}/msbuild-bin + ${CURRENT_PACKAGES_DIR}/tools/msbuild-bin ) # Remove one empty include subdirectory if it is indeed empty -- cgit v1.2.3 From 1b2f75be941e9eed5986c10eb99fd6049490daec Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 16 Nov 2017 23:54:55 -0800 Subject: [vcpkg] Support \share\\usage to handle libraries which are found through built-in Find Modules. --- ports/boost/portfile.cmake | 2 ++ ports/boost/usage | 5 +++++ ports/bzip2/portfile.cmake | 2 ++ ports/bzip2/usage | 4 ++++ ports/curl/portfile.cmake | 2 ++ ports/curl/usage | 5 +++++ ports/freeglut/portfile.cmake | 3 ++- ports/freeglut/usage | 4 ++++ ports/freetype/portfile.cmake | 1 + ports/freetype/usage | 5 +++++ ports/glew/portfile.cmake | 3 ++- ports/glew/usage | 4 ++++ ports/gtest/portfile.cmake | 2 ++ ports/gtest/usage | 6 ++++++ ports/libjpeg-turbo/portfile.cmake | 1 + ports/libjpeg-turbo/usage | 5 +++++ ports/libpng/portfile.cmake | 2 ++ ports/libpng/usage | 4 ++++ ports/openssl/portfile-uwp.cmake | 2 ++ ports/openssl/portfile.cmake | 2 ++ ports/openssl/usage | 4 ++++ ports/zlib/portfile.cmake | 4 +++- ports/zlib/usage | 4 ++++ toolsrc/src/vcpkg/install.cpp | 21 ++++++++++++++++----- 24 files changed, 89 insertions(+), 8 deletions(-) create mode 100644 ports/boost/usage create mode 100644 ports/bzip2/usage create mode 100644 ports/curl/usage create mode 100644 ports/freeglut/usage create mode 100644 ports/freetype/usage create mode 100644 ports/glew/usage create mode 100644 ports/gtest/usage create mode 100644 ports/libjpeg-turbo/usage create mode 100644 ports/libpng/usage create mode 100644 ports/openssl/usage create mode 100644 ports/zlib/usage diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index c15f7c312..fa264fa51 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -342,3 +342,5 @@ move_to_manual_link(boost_test_exec_monitor) move_to_manual_link(boost_prg_exec_monitor) vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/boost/usage b/ports/boost/usage new file mode 100644 index 000000000..28d429010 --- /dev/null +++ b/ports/boost/usage @@ -0,0 +1,5 @@ +The package boost is compatible with built-in CMake targets: + + find_package(Boost REQUIRED [COMPONENTS ...]) + target_link_libraries(main PRIVATE ${Boost_LIBRARIES}) + target_include_directories(main PRIVATE ${Boost_INCLUDE_DIRS}) diff --git a/ports/bzip2/portfile.cmake b/ports/bzip2/portfile.cmake index f5823fb94..d4dd18fd5 100644 --- a/ports/bzip2/portfile.cmake +++ b/ports/bzip2/portfile.cmake @@ -36,3 +36,5 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/include/bzlib.h "${BZLIB_H}") file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/bzip2) file(RENAME ${CURRENT_PACKAGES_DIR}/share/bzip2/LICENSE ${CURRENT_PACKAGES_DIR}/share/bzip2/copyright) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/bzip2/usage b/ports/bzip2/usage new file mode 100644 index 000000000..084bf390a --- /dev/null +++ b/ports/bzip2/usage @@ -0,0 +1,4 @@ +The package bzip2 is compatible with built-in CMake targets: + + find_package(BZip2 REQUIRED) + target_link_libraries(main PRIVATE BZip2::BZip2) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index c770d3f25..eaeba787d 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -73,3 +73,5 @@ endif() file(WRITE ${CURRENT_PACKAGES_DIR}/include/curl/curl.h "${CURL_H}") vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/curl/usage b/ports/curl/usage new file mode 100644 index 000000000..d43e7112e --- /dev/null +++ b/ports/curl/usage @@ -0,0 +1,5 @@ +The package curl is compatible with built-in CMake targets: + + find_package(CURL REQUIRED) + target_link_libraries(main PRIVATE ${CURL_LIBRARIES}) + target_include_directories(main PRIVATE ${CURL_INCLUDE_DIRS}) diff --git a/ports/freeglut/portfile.cmake b/ports/freeglut/portfile.cmake index 33861a7eb..3e6248126 100644 --- a/ports/freeglut/portfile.cmake +++ b/ports/freeglut/portfile.cmake @@ -53,4 +53,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freeglut) file(RENAME ${CURRENT_PACKAGES_DIR}/share/freeglut/COPYING ${CURRENT_PACKAGES_DIR}/share/freeglut/copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/freeglut/usage b/ports/freeglut/usage new file mode 100644 index 000000000..40e214fde --- /dev/null +++ b/ports/freeglut/usage @@ -0,0 +1,4 @@ +The package freeglut is compatible with built-in CMake targets: + + find_package(GLUT REQUIRED) + target_link_libraries(main PRIVATE GLUT::GLUT) diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake index 026c1573a..7b98fa477 100644 --- a/ports/freetype/portfile.cmake +++ b/ports/freetype/portfile.cmake @@ -58,3 +58,4 @@ file(COPY file(RENAME ${CURRENT_PACKAGES_DIR}/share/freetype/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/freetype/copyright) vcpkg_copy_pdbs() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/freetype/usage b/ports/freetype/usage new file mode 100644 index 000000000..3b42b86e4 --- /dev/null +++ b/ports/freetype/usage @@ -0,0 +1,5 @@ +The package freetype is compatible with built-in CMake targets: + + find_package(Freetype REQUIRED) + target_link_libraries(main PRIVATE ${FREETYPE_LIBRARIES}) + target_include_directories(main PRIVATE ${FREETYPE_INCLUDE_DIRS}) diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake index a18a8ceeb..dddaf51c1 100644 --- a/ports/glew/portfile.cmake +++ b/ports/glew/portfile.cmake @@ -48,4 +48,5 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glew RENAME copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glew RENAME copyright) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/glew/usage b/ports/glew/usage new file mode 100644 index 000000000..c0678a825 --- /dev/null +++ b/ports/glew/usage @@ -0,0 +1,4 @@ +The package glew is compatible with built-in CMake targets: + + find_package(GLEW REQUIRED) + target_link_libraries(main PRIVATE GLEW::GLEW) diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index 333dc8ae3..491d6a8d5 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -60,3 +60,5 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_main.lib) vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/gtest/usage b/ports/gtest/usage new file mode 100644 index 000000000..fa226ceed --- /dev/null +++ b/ports/gtest/usage @@ -0,0 +1,6 @@ +The package gtest is compatible with built-in CMake targets: + + enable_testing() + find_package(GTest REQUIRED) + target_link_libraries(main PRIVATE GTest::GTest GTest::Main) + add_test(AllTestsInMain main) diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index 225b23353..1d45087b0 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -53,3 +53,4 @@ file(COPY ) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/copyright) vcpkg_copy_pdbs() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/libjpeg-turbo/usage b/ports/libjpeg-turbo/usage new file mode 100644 index 000000000..ccd47717f --- /dev/null +++ b/ports/libjpeg-turbo/usage @@ -0,0 +1,5 @@ +The package libjpeg-turbo is compatible with built-in CMake targets: + + find_package(JPEG REQUIRED) + target_link_libraries(main PRIVATE ${JPEG_LIBRARIES}) + target_include_directories(main PRIVATE ${JPEG_INCLUDE_DIR}) diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index fe4fb7250..c2067ff9b 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -57,3 +57,5 @@ file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpn file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpng/LICENSE ${CURRENT_PACKAGES_DIR}/share/libpng/copyright) vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/libpng/usage b/ports/libpng/usage new file mode 100644 index 000000000..19203399c --- /dev/null +++ b/ports/libpng/usage @@ -0,0 +1,4 @@ +The package libpng is compatible with built-in CMake targets: + + find_package(PNG REQUIRED) + target_link_libraries(main PRIVATE PNG::PNG) diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake index 4f83f2eed..0331e0f77 100644 --- a/ports/openssl/portfile-uwp.cmake +++ b/ports/openssl/portfile-uwp.cmake @@ -90,3 +90,5 @@ file(INSTALL DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 5f1b39bc7..1a856e17d 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -145,3 +145,5 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/openssl/usage b/ports/openssl/usage new file mode 100644 index 000000000..f535cb6a4 --- /dev/null +++ b/ports/openssl/usage @@ -0,0 +1,4 @@ +The package openssl is compatible with built-in CMake targets: + + find_package(OpenSSL REQUIRED) + target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto) diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index c41d61bda..ec8b05ffc 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -33,4 +33,6 @@ endif() file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/zlib RENAME copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/zlib/usage b/ports/zlib/usage new file mode 100644 index 000000000..39d861822 --- /dev/null +++ b/ports/zlib/usage @@ -0,0 +1,4 @@ +The package zlib is compatible with built-in CMake targets: + + find_package(ZLIB REQUIRED) + target_link_libraries(main PRIVATE ZLIB::ZLIB) diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index cc006811b..f48b04d68 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -565,6 +565,17 @@ namespace vcpkg::Install auto& fs = paths.get_filesystem(); + auto usage_file = paths.installed / bpgh.spec.triplet().canonical_name() / "share" / bpgh.spec.name() / "usage"; + if (fs.exists(usage_file)) + { + auto maybe_contents = fs.read_contents(usage_file); + if (auto p_contents = maybe_contents.get()) + { + System::println(*p_contents); + } + return; + } + auto files = fs.read_lines(paths.listfile_path(bpgh)); if (auto p_lines = files.get()) { @@ -595,10 +606,10 @@ namespace vcpkg::Install } else if (library_targets.size() <= 4) { - System::println("\nThe package %s provides CMake targets:\n" + System::println("The package %s provides CMake targets:\n" "\n" " find_package(%s REQUIRED)\n" - " target_link_libraries(main PRIVATE %s)", + " target_link_libraries(main PRIVATE %s)\n", bpgh.spec, path.parent_path().filename().u8string(), Strings::join(" ", library_targets)); @@ -607,11 +618,11 @@ namespace vcpkg::Install { auto omitted = library_targets.size() - 4; library_targets.erase(library_targets.begin() + 4, library_targets.end()); - System::println("\nThe package %s provides CMake targets:\n" + System::println("The package %s provides CMake targets:\n" "\n" " find_package(%s REQUIRED)\n" " # Note: %d targets were omitted\n" - " target_link_libraries(main PRIVATE %s)", + " target_link_libraries(main PRIVATE %s)\n", bpgh.spec, path.parent_path().filename().u8string(), omitted, @@ -712,7 +723,7 @@ namespace vcpkg::Install const InstallSummary summary = perform(action_plan, keep_going, paths, status_db); - System::println("\nTotal elapsed time: %s", summary.total_elapsed_time); + System::println("\nTotal elapsed time: %s\n", summary.total_elapsed_time); if (keep_going == KeepGoing::YES) { -- cgit v1.2.3 From 6290155eaaff1bd70ec9a893b090adea473effa8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 17 Nov 2017 01:23:14 -0800 Subject: [vcpkgExtractFile] Fix partial dir name. Special case 1-item zips - If the zip contains a single item, pull that up a directory - If the zip contains multiple items, place that in a directory on of the same name as the zip --- scripts/VcpkgPowershellUtils.ps1 | 23 +++++++++++++++++------ scripts/fetchDependency.ps1 | 5 +---- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 12eacec96..0b1a35262 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -141,11 +141,13 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, } function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, - [Parameter(Mandatory=$true)][string]$destination) + [Parameter(Mandatory=$true)][string]$destinationDir) { - vcpkgCreateDirectory $destination - $baseName = (Get-ChildItem .\downloads\cmake-3.9.5-win32-x86.zip).BaseName - $destinationPartial = "$destination\$baseName-partially_extracted" + $parentPath = split-path -parent $destinationDir + vcpkgCreateDirectory $parentPath + $baseName = (Get-ChildItem $file).BaseName + $destinationPartial = "$destinationDir\$baseName-partially_extracted" + vcpkgRemoveDirectory $destinationPartial vcpkgCreateDirectory $destinationPartial @@ -171,8 +173,17 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, } } - Move-Item -Path "$destinationPartial\*" -Destination $destination - vcpkgRemoveDirectory $destinationPartial + $hasASingleItem = (Get-ChildItem $destinationPartial | Measure-Object).Count -eq 1; + + if ($hasASingleItem) + { + Move-Item -Path "$destinationPartial\*" -Destination $destinationDir + vcpkgRemoveDirectory $destinationPartial + } + else + { + Rename-Item -Path $destinationPartial -NewName $baseName + } } function vcpkgInvokeCommand() diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 2cc782feb..596845acb 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -27,7 +27,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $expectedDownloadedFileHash = "dd3e183254c12f7c338d3edfa642f1ac84a763b8b9a2feabb4ad5fccece5dff9" $executableFromDownload = "$downloadsDir\cmake-3.9.5-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP - $extractionFolder = $downloadsDir } elseif($Dependency -eq "nuget") { @@ -60,7 +59,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) # Therefore, choosing the cmd dir here as well. $executableFromDownload = "$downloadsDir\MinGit-2.15.0-32-bit\cmd\git.exe" $extractionType = $ExtractionType_ZIP - $extractionFolder = "$downloadsDir\MinGit-2.15.0-32-bit" } elseif($Dependency -eq "installerbase") { @@ -71,7 +69,6 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) $expectedDownloadedFileHash = "f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8" $executableFromDownload = "$downloadsDir\QtInstallerFramework-win-x86\bin\installerbase.exe" $extractionType = $ExtractionType_ZIP - $extractionFolder = $downloadsDir } else { @@ -91,7 +88,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { if (-not (Test-Path $executableFromDownload)) { - vcpkgExtractFile -File $downloadPath -Destination $extractionFolder + vcpkgExtractFile -File $downloadPath -DestinationDir $downloadsDir } } elseif($extractionType -eq $ExtractionType_SELF_EXTRACTING_7Z) -- cgit v1.2.3 From 85fe5932cf171359f997869a5cb351df7031e51d Mon Sep 17 00:00:00 2001 From: cDc Date: Fri, 17 Nov 2017 13:48:52 +0200 Subject: [ceres] enable static CRT linkage for MSVC --- ports/ceres/portfile.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index 49353205e..e8ae03ce4 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -1,5 +1,9 @@ +set(MSVC_USE_STATIC_CRT_VALUE OFF) if(VCPKG_CRT_LINKAGE STREQUAL "static") - message(FATAL_ERROR "Ceres does not currently support static CRT linkage") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "Ceres does not currently support mixing static CRT and dynamic library linkage") + endif() + set(MSVC_USE_STATIC_CRT_VALUE ON) endif() include(vcpkg_common_functions) @@ -32,6 +36,7 @@ vcpkg_configure_cmake( -DSUITESPARSE=ON -DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION=OFF # TheiaSfm doesn't work well with this -DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION=OFF # TheiaSfm doesn't work well with this + -DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE} ) vcpkg_install_cmake() -- cgit v1.2.3 From c7888a36e48383a0de3a86267dc9bbe3762f1f94 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Fri, 17 Nov 2017 22:19:25 +0900 Subject: Change OpenNI2 to option Change OpenNI2 to option for build static link library. --- ports/pcl/CONTROL | 8 ++++++-- ports/pcl/portfile.cmake | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index daadfa911..5d19f0021 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,7 +1,11 @@ Source: pcl -Version: 1.8.1-5 +Version: 1.8.1-6 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. -Build-Depends: boost, eigen3, flann, qhull, vtk, openni2 +Build-Depends: boost, eigen3, flann, qhull, vtk + +Feature: openni2 +Description: OpenNI2 support for PCL +Build-Depends: openni2 Feature: qt Description: Qt support for PCL diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index d63c9dfbb..a3efd3367 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -20,6 +20,11 @@ vcpkg_apply_patches( string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS) +set(WITH_OPENNI2 OFF) +if("openni2" IN_LIST FEATURES) + set(WITH_OPENNI2 ON) +endif() + set(WITH_QT OFF) if("qt" IN_LIST FEATURES) set(WITH_QT ON) @@ -44,7 +49,7 @@ vcpkg_configure_cmake( # WITH -DWITH_CUDA=OFF -DWITH_LIBUSB=OFF - -DWITH_OPENNI2=ON + -DWITH_OPENNI2=${WITH_OPENNI2} -DWITH_PCAP=${WITH_PCAP} -DWITH_PNG=OFF -DWITH_QHULL=ON -- cgit v1.2.3 From 6b6fa2ab379d718656c2a0aa3044fae7b941a6fa Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 17 Nov 2017 15:46:20 -0800 Subject: [date] Update to 2.3 --- ports/date/CMakeLists.txt | 6 +++--- ports/date/CONTROL | 2 +- ports/date/portfile.cmake | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/date/CMakeLists.txt b/ports/date/CMakeLists.txt index 91fcab1c7..c1efc4e2a 100644 --- a/ports/date/CMakeLists.txt +++ b/ports/date/CMakeLists.txt @@ -8,9 +8,9 @@ endif() add_definitions(-DNOMINMAX) -include_directories(".") +include_directories("./include") -add_library(tz tz.cpp) +add_library(tz src/tz.cpp) if(BUILD_SHARED_LIBS) target_compile_definitions(tz PRIVATE -DDATE_BUILD_DLL) @@ -26,5 +26,5 @@ install( ) if(NOT DISABLE_INSTALL_HEADERS) - install(FILES date.h tz.h julian.h iso_week.h islamic.h DESTINATION include) + install(FILES include/date/date.h include/date/tz.h include/date/julian.h include/date/iso_week.h include/date/islamic.h DESTINATION include/date) endif() diff --git a/ports/date/CONTROL b/ports/date/CONTROL index 8eab618c2..a2e7c6e69 100644 --- a/ports/date/CONTROL +++ b/ports/date/CONTROL @@ -1,3 +1,3 @@ Source: date -Version: 2.2 +Version: 2.3 Description: A date and time library based on the C++11/14/17 header diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake index f73c72b52..0001bbe6b 100644 --- a/ports/date/portfile.cmake +++ b/ports/date/portfile.cmake @@ -8,8 +8,8 @@ message(WARNING vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO HowardHinnant/date - REF 272d487b3d490126e520b67fe76bbb2e67226c07 - SHA512 59e8ff642d3eb82cb6116a77d4c5e14bbc2ae6bd4019e64a49609b6e46d679c2cb4ccae74807b72223aed18ae015596193919cdb58b011bfb774ff3e29a1d43b + REF 2.3 + SHA512 d629f2fb1403913ed276bec9c6fd72b8eb16067663e188b7be0c22c2621332f5b46f1eed166874b7a27f90b08fca8a5509b49f395611a1af5ca73385953e3abe HEAD_REF master ) @@ -25,7 +25,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() -set(HEADER "${CURRENT_PACKAGES_DIR}/include/tz.h") +set(HEADER "${CURRENT_PACKAGES_DIR}/include/date/tz.h") file(READ "${HEADER}" _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) string(REPLACE "DATE_BUILD_DLL" "1" _contents "${_contents}") -- cgit v1.2.3 From cd9d32721d4a200cf04520175eaafd84ee1c8f31 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sat, 18 Nov 2017 16:07:49 -0800 Subject: [libusb] apply patch to make it libfreenect2 compatible --- ports/libusb/libfreenect2.patch | 268 ++++++++++++++++++++++++++++++++++++++++ ports/libusb/portfile.cmake | 5 + 2 files changed, 273 insertions(+) create mode 100644 ports/libusb/libfreenect2.patch diff --git a/ports/libusb/libfreenect2.patch b/ports/libusb/libfreenect2.patch new file mode 100644 index 000000000..2c2b859b0 --- /dev/null +++ b/ports/libusb/libfreenect2.patch @@ -0,0 +1,268 @@ +diff --git a/libusb/os/windows_winusb.c b/libusb/os/windows_winusb.c +index 93668f3..7fdafd6 100644 +--- a/libusb/os/windows_winusb.c ++++ b/libusb/os/windows_winusb.c +@@ -66,6 +66,7 @@ static int winusbx_claim_interface(int sub_api, struct libusb_device_handle *dev + static int winusbx_release_interface(int sub_api, struct libusb_device_handle *dev_handle, int iface); + static int winusbx_submit_control_transfer(int sub_api, struct usbi_transfer *itransfer); + static int winusbx_set_interface_altsetting(int sub_api, struct libusb_device_handle *dev_handle, int iface, int altsetting); ++static int winusbx_submit_iso_transfer(int sub_api, struct usbi_transfer *itransfer); + static int winusbx_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer); + static int winusbx_clear_halt(int sub_api, struct libusb_device_handle *dev_handle, unsigned char endpoint); + static int winusbx_abort_transfers(int sub_api, struct usbi_transfer *itransfer); +@@ -1901,6 +1902,10 @@ void windows_clear_transfer_priv(struct usbi_transfer *itransfer) + + usbi_free_fd(&transfer_priv->pollable_fd); + safe_free(transfer_priv->hid_buffer); ++ ++ //TODO this should occur during windows_free_transfer instead ++ safe_free(transfer_priv->iso_context); ++ + // When auto claim is in use, attempt to release the auto-claimed interface + auto_release(itransfer); + } +@@ -2274,7 +2279,7 @@ const struct windows_usb_api_backend usb_api_backend[USB_API_MAX] = { + winusbx_clear_halt, + winusbx_reset_device, + winusbx_submit_bulk_transfer, +- unsupported_submit_iso_transfer, ++ winusbx_submit_iso_transfer, + winusbx_submit_control_transfer, + winusbx_abort_control, + winusbx_abort_transfers, +@@ -2374,6 +2379,8 @@ static int winusbx_init(int sub_api, struct libusb_context *ctx) + WinUSBX_Set(SetPipePolicy); + WinUSBX_Set(SetPowerPolicy); + WinUSBX_Set(WritePipe); ++ WinUSBX_Set(IsoReadPipe); ++ WinUSBX_Set(IsoWritePipe); + if (!native_winusb) + WinUSBX_Set(ResetDevice); + +@@ -2803,6 +2810,100 @@ static int winusbx_set_interface_altsetting(int sub_api, struct libusb_device_ha + return LIBUSB_SUCCESS; + } + ++static int winusbx_submit_iso_transfer(int sub_api, struct usbi_transfer *itransfer) ++{ ++ struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); ++ struct libusb_context *ctx = DEVICE_CTX(transfer->dev_handle->dev); ++ struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer); ++ struct windows_device_handle_priv *handle_priv = _device_handle_priv(transfer->dev_handle); ++ struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev); ++ HANDLE winusb_handle; ++ bool ret; ++ int current_interface; ++ struct winfd wfd; ++ int i; ++ uint16_t maxPacketSize; ++ uint32_t offset; ++ size_t ctx_size; ++ ++ CHECK_WINUSBX_AVAILABLE(sub_api); ++ ++ if (sub_api != SUB_API_LIBUSBK && sub_api != SUB_API_LIBUSB0) ++ { ++ //iso only supported on libusbk-based backends ++ return unsupported_submit_iso_transfer(sub_api, itransfer); ++ }; ++ ++ transfer_priv->pollable_fd = INVALID_WINFD; ++ ++ current_interface = interface_by_endpoint(priv, handle_priv, transfer->endpoint); ++ if (current_interface < 0) { ++ usbi_err(ctx, "unable to match endpoint to an open interface - cancelling transfer"); ++ return LIBUSB_ERROR_NOT_FOUND; ++ } ++ ++ usbi_dbg("matched endpoint %02X with interface %d", transfer->endpoint, current_interface); ++ ++ winusb_handle = handle_priv->interface_handle[current_interface].api_handle; ++ ++ wfd = usbi_create_fd(winusb_handle, IS_XFERIN(transfer) ? RW_READ : RW_WRITE, NULL, NULL); ++ // Always use the handle returned from usbi_create_fd (wfd.handle) ++ if (wfd.fd < 0) { ++ return LIBUSB_ERROR_NO_MEM; ++ } ++ ++ ctx_size = sizeof(KISO_CONTEXT)+sizeof(KISO_PACKET)* transfer->num_iso_packets; ++ //Init the libusbk iso_context ++ if (!transfer_priv->iso_context) ++ { ++ transfer_priv->iso_context = (PKISO_CONTEXT)malloc(ctx_size); ++ if (!transfer_priv->iso_context) ++ { ++ //TODO does this return leak mem, or does the transfer get cleaned up? ++ return LIBUSB_ERROR_NO_MEM; ++ } ++ } ++ memset(transfer_priv->iso_context, 0, ctx_size); ++ ++ //start ASAP ++ transfer_priv->iso_context->StartFrame = 0; ++ transfer_priv->iso_context->NumberOfPackets = transfer->num_iso_packets; ++ ++ /* convert the transfer packet lengths to iso_packet offsets */ ++ offset = 0; ++ for (i = 0; i < transfer->num_iso_packets; i++) ++ { ++ transfer_priv->iso_context->IsoPackets[i].offset = offset; ++ offset += transfer->iso_packet_desc[i].length; ++ } ++ ++ if (IS_XFERIN(transfer)) { ++ usbi_dbg("reading %d iso packets", transfer->num_iso_packets); ++ ret = WinUSBX[sub_api].IsoReadPipe(wfd.handle, transfer->endpoint, transfer->buffer, transfer->length, wfd.overlapped, transfer_priv->iso_context); ++ } ++ else { ++ usbi_dbg("writing %d iso packets", transfer->num_iso_packets); ++ ret = WinUSBX[sub_api].IsoWritePipe(wfd.handle, transfer->endpoint, transfer->buffer, transfer->length, wfd.overlapped, transfer_priv->iso_context); ++ } ++ ++ if (!ret) { ++ if (GetLastError() != ERROR_IO_PENDING) { ++ usbi_err(ctx, "IsoReadPipe/IsoWritePipe failed: %s", windows_error_str(0)); ++ usbi_free_fd(&wfd); ++ return LIBUSB_ERROR_IO; ++ } ++ } ++ else { ++ wfd.overlapped->Internal = STATUS_COMPLETED_SYNCHRONOUSLY; ++ wfd.overlapped->InternalHigh = (DWORD)transfer->length; ++ } ++ ++ transfer_priv->pollable_fd = wfd; ++ transfer_priv->interface_number = (uint8_t)current_interface; ++ ++ return LIBUSB_SUCCESS; ++} ++ + static int winusbx_submit_bulk_transfer(int sub_api, struct usbi_transfer *itransfer) + { + struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); +@@ -2989,7 +3090,36 @@ static int winusbx_reset_device(int sub_api, struct libusb_device_handle *dev_ha + + static int winusbx_copy_transfer_data(int sub_api, struct usbi_transfer *itransfer, uint32_t io_size) + { ++ struct libusb_transfer *transfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); ++ struct windows_transfer_priv *transfer_priv = (struct windows_transfer_priv*)usbi_transfer_get_os_priv(itransfer); ++ struct windows_device_priv *priv = _device_priv(transfer->dev_handle->dev); ++ int i; ++ ++ CHECK_WINUSBX_AVAILABLE(sub_api); ++ ++ if (transfer->type == LIBUSB_TRANSFER_TYPE_ISOCHRONOUS) ++ { ++ //for isochronous, need to copy the individual iso packet actual_lengths and statuses ++ if (sub_api == SUB_API_LIBUSBK || sub_api == SUB_API_LIBUSB0) ++ { ++ //iso only supported on libusbk-based backends for now ++ ++ for (i = 0; i < transfer->num_iso_packets; i++) ++ { ++ transfer->iso_packet_desc[i].actual_length = transfer_priv->iso_context->IsoPackets[i].actual_length; ++ //TODO translate USDB_STATUS codes http://msdn.microsoft.com/en-us/library/ff539136(VS.85).aspx to libusb_transfer_status ++ //transfer->iso_packet_desc[i].status = transfer_priv->iso_context->IsoPackets[i].status; ++ } ++ } ++ else ++ { ++ //This should only occur if backend is not set correctly or other backend isoc is partially implemented ++ return unsupported_copy_transfer_data(sub_api, itransfer, io_size); ++ } ++ } ++ + itransfer->transferred += io_size; ++ + return LIBUSB_TRANSFER_COMPLETED; + } + +diff --git a/libusb/os/windows_winusb.h b/libusb/os/windows_winusb.h +index 89ebc24..28a7e4f 100644 +--- a/libusb/os/windows_winusb.h ++++ b/libusb/os/windows_winusb.h +@@ -154,6 +154,42 @@ struct libusb_hid_descriptor { + #define LIBUSB_REQ_IN(request_type) ((request_type) & LIBUSB_ENDPOINT_IN) + #define LIBUSB_REQ_OUT(request_type) (!LIBUSB_REQ_IN(request_type)) + ++ ++/* start libusbk_shared.h definitions, must match libusbk_shared.h for isochronous support */ ++ ++//KISO_PACKET is equivalent of libusb_iso_packet_descriptor except uses absolute "offset" field instead of sequential Lengths ++typedef struct _KISO_PACKET ++{ ++ UINT offset; ++ USHORT actual_length; //changed from libusbk_shared.h "Length" for clarity ++ USHORT status; ++ ++} KISO_PACKET; ++ ++typedef KISO_PACKET* PKISO_PACKET; ++ ++typedef enum _KISO_FLAG ++{ ++ KISO_FLAG_NONE = 0, ++ KISO_FLAG_SET_START_FRAME = 0x00000001, ++} KISO_FLAG; ++ ++//KISO_CONTEXT is the conceptual equivalent of libusb_transfer except is isochronous-specific and must match libusbk's version ++typedef struct _KISO_CONTEXT ++{ ++ KISO_FLAG Flags; ++ UINT StartFrame; ++ SHORT ErrorCount; ++ SHORT NumberOfPackets; ++ UINT UrbHdrStatus; ++ KISO_PACKET IsoPackets[0]; ++ ++} KISO_CONTEXT; ++ ++typedef KISO_CONTEXT* PKISO_CONTEXT; ++ ++/* end libusbk_shared.h definitions */ ++ + // The following are used for HID reports IOCTLs + #define HID_CTL_CODE(id) \ + CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_NEITHER, FILE_ANY_ACCESS) +@@ -280,6 +316,8 @@ struct windows_transfer_priv { + uint8_t *hid_buffer; // 1 byte extended data buffer, required for HID + uint8_t *hid_dest; // transfer buffer destination, required for HID + size_t hid_expected_size; ++ /* Isoc */ ++ PKISO_CONTEXT iso_context; + }; + + // used to match a device driver (including filter drivers) against a supported API +@@ -623,6 +661,23 @@ typedef BOOL (WINAPI *WinUsb_ResetDevice_t)( + WINUSB_INTERFACE_HANDLE InterfaceHandle + ); + ++typedef BOOL(WINAPI *WinUsb_IsoReadPipe_t)( ++ WINUSB_INTERFACE_HANDLE InterfaceHandle, ++ UCHAR PipeID, ++ PUCHAR Buffer, ++ ULONG BufferLength, ++ LPOVERLAPPED Overlapped, ++ PKISO_CONTEXT IsoContext ++ ); ++typedef BOOL(WINAPI *WinUsb_IsoWritePipe_t)( ++ WINUSB_INTERFACE_HANDLE InterfaceHandle, ++ UCHAR PipeID, ++ PUCHAR Buffer, ++ ULONG BufferLength, ++ LPOVERLAPPED Overlapped, ++ PKISO_CONTEXT IsoContext ++ ); ++ + /* /!\ These must match the ones from the official libusbk.h */ + typedef enum _KUSB_FNID { + KUSB_FNID_Init, +@@ -703,6 +758,8 @@ struct winusb_interface { + WinUsb_SetPowerPolicy_t SetPowerPolicy; + WinUsb_WritePipe_t WritePipe; + WinUsb_ResetDevice_t ResetDevice; ++ WinUsb_IsoReadPipe_t IsoReadPipe; ++ WinUsb_IsoWritePipe_t IsoWritePipe; + }; + + /* hid.dll interface */ diff --git a/ports/libusb/portfile.cmake b/ports/libusb/portfile.cmake index 398fdcfd1..cd99405e6 100644 --- a/ports/libusb/portfile.cmake +++ b/ports/libusb/portfile.cmake @@ -16,6 +16,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/libfreenect2.patch" +) + if (TRIPLET_SYSTEM_ARCH MATCHES "x86") set(MSBUILD_PLATFORM "Win32") else () -- cgit v1.2.3 From 7fc2d7dbdf81b05905f4121fd52aa68234024c43 Mon Sep 17 00:00:00 2001 From: Frank Quinn Date: Sun, 19 Nov 2017 11:42:52 +0000 Subject: Added SCONS to vcpkg_find_acquire_program See: http://scons.org I have a port I would like to submit which uses scons (which in turn uses the python interpreter already provided). This change makes SCONS usable for vcpkg_execute_required_process. --- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index e6a37e328..066126e6c 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -148,6 +148,14 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://github.com/wixtoolset/wix3/releases/download/wix311rtm/wix311-binaries.zip") set(ARCHIVE "wix311-binaries.zip") set(HASH 74f0fa29b5991ca655e34a9d1000d47d4272e071113fada86727ee943d913177ae96dc3d435eaf494d2158f37560cd4c2c5274176946ebdb17bf2354ced1c516) + elseif(VAR MATCHES "SCONS") + set(PROGNAME scons) + set(REQUIRED_INTERPRETER PYTHON2) + set(SCRIPTNAME "scons.py") + set(PATHS ${DOWNLOADS}/tools/scons) + set(URL "https://sourceforge.net/projects/scons/files/scons-local-3.0.1.zip/download") + set(ARCHIVE "scons-local-3.0.1.zip") + set(HASH fe121b67b979a4e9580c7f62cfdbe0c243eba62a05b560d6d513ac7f35816d439b26d92fc2d7b7d7241c9ce2a49ea7949455a17587ef53c04a5f5125ac635727) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() -- cgit v1.2.3 From 5123b32da186ff753cf233a6ef06b2f3ef575fe9 Mon Sep 17 00:00:00 2001 From: Frank Quinn Date: Sat, 18 Nov 2017 18:00:58 +0000 Subject: Added port for qpid proton 0.18.1 --- ports/qpid-proton/CONTROL | 4 ++++ ports/qpid-proton/portfile.cmake | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 ports/qpid-proton/CONTROL create mode 100644 ports/qpid-proton/portfile.cmake diff --git a/ports/qpid-proton/CONTROL b/ports/qpid-proton/CONTROL new file mode 100644 index 000000000..6f64c3fcf --- /dev/null +++ b/ports/qpid-proton/CONTROL @@ -0,0 +1,4 @@ +Source: qpid-proton +Version: 0.18.1 +Build-Depends: openssl +Description: Qpid Proton is a high-performance, lightweight messaging library. \ No newline at end of file diff --git a/ports/qpid-proton/portfile.cmake b/ports/qpid-proton/portfile.cmake new file mode 100644 index 000000000..e5ba1d7ed --- /dev/null +++ b/ports/qpid-proton/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +# Use this throughout rather than literal string +set(QPID_PROTON_VERSION 0.18.1) + +# Go grab the code. Set SHA512 to 1 to get correct sha from download +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/qpid-proton + REF ${QPID_PROTON_VERSION} + SHA512 92cbd7f534e8b180fb72888999af2735541663c70dde1e4e1382f39c5057920df0fb72527db23008823d69a7ddac335217f16270c0bbdb4dfe26733feddf94cc + HEAD_REF next +) + +# Run cmake configure step +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}) + +# Run cmake install step +vcpkg_install_cmake() + +# Copy across any pdbs generated +vcpkg_copy_pdbs() + +# Rename share subdirectory +file(RENAME ${CURRENT_PACKAGES_DIR}/share/proton-${QPID_PROTON_VERSION} + ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# Vcpkg expects file with name "copyright" +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE + ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + +# Remove extraneous unrequired-for-vcpkg files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) \ No newline at end of file -- cgit v1.2.3 From ea6783f9ba878a58b43d8728fd816413f708eb04 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 20 Nov 2017 15:05:44 -0800 Subject: [imgui] Use vendored stb at request of author -- static linking is explicitly worked around. Update to 1.52. --- ports/imgui/CMakeLists.txt | 4 ---- ports/imgui/CONTROL | 3 +-- ports/imgui/portfile.cmake | 13 ++----------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt index a4c49a337..3658c5cae 100644 --- a/ports/imgui/CMakeLists.txt +++ b/ports/imgui/CMakeLists.txt @@ -4,8 +4,6 @@ project(imgui CXX) set(CMAKE_DEBUG_POSTFIX d) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -find_path(STB_INCLUDE_DIR stb_rect_pack.h stb_textedit.h stb_truetype.h) - set(IMGUI_INCLUDES_PUBLIC imgui.h imconfig.h @@ -27,8 +25,6 @@ add_library(imgui ${IMGUI_SOURCES} ) -target_include_directories(imgui PUBLIC ${STB_INCLUDE_DIR}) - install(TARGETS imgui RUNTIME DESTINATION bin LIBRARY DESTINATION lib diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL index 35e041de1..4428d0d45 100644 --- a/ports/imgui/CONTROL +++ b/ports/imgui/CONTROL @@ -1,4 +1,3 @@ Source: imgui -Version: 1.51-1 -Build-Depends: stb +Version: 1.52 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 587a4cf19..385a2396b 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -1,23 +1,14 @@ include(vcpkg_common_functions) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "Warning: Dynamic building not supported yet. Building static.") - set(VCPKG_LIBRARY_LINKAGE static) -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ocornut/imgui - REF v1.51 - SHA512 33aea46d0ab8419fcd4af765c9f1a88dfb1b80ad466276b655a67f40ffedabe399db6b0d76a2ece74e551928bd6f842ae3fa42998e0b1a2206157a3852e002d6 + REF v1.52 + SHA512 8ada897ae33bcffa222dab4e9ff602611fa27d43f26085b8f96c313fea917d3149f1e3f4640f6156cfb7bc39bcb116106ccb4e8da1409d467e78c93bf9f7ea03 HEAD_REF master ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(GLOB STB_HEADERS ${SOURCE_PATH}/stb_*.h) -if(STB_HEADERS) - file(REMOVE ${STB_HEADERS}) -endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 1a6d0f5611882618f9179898448ca56770ff2ab0 Mon Sep 17 00:00:00 2001 From: xoviat Date: Mon, 20 Nov 2017 17:10:00 -0600 Subject: [mprf] add missing symbol (#2226) * [mprf] create printf * Update CMakeLists.txt * [mpfr:portile] copy file --- ports/mpfr/CMakeLists.txt | 3 ++- ports/mpfr/CONTROL | 2 +- ports/mpfr/gmp_printf.c | 6 ++++++ ports/mpfr/portfile.cmake | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 ports/mpfr/gmp_printf.c diff --git a/ports/mpfr/CMakeLists.txt b/ports/mpfr/CMakeLists.txt index 8a989ff28..3fb121b76 100644 --- a/ports/mpfr/CMakeLists.txt +++ b/ports/mpfr/CMakeLists.txt @@ -11,6 +11,7 @@ set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR}) # Sources set(SRCS + src/gmp_printf.c src/mpfr.h src/mpf2mpfr.h src/mpfr-gmp.h @@ -272,4 +273,4 @@ install( install( FILES src/mpfr.h DESTINATION "include" -) \ No newline at end of file +) diff --git a/ports/mpfr/CONTROL b/ports/mpfr/CONTROL index bec54417d..8482ed8eb 100644 --- a/ports/mpfr/CONTROL +++ b/ports/mpfr/CONTROL @@ -1,4 +1,4 @@ Source: mpfr -Version: 3.1.6 +Version: 3.1.6-1 Description: The MPFR library is a C library for multiple-precision floating-point computations with correct rounding Build-Depends: mpir diff --git a/ports/mpfr/gmp_printf.c b/ports/mpfr/gmp_printf.c new file mode 100644 index 000000000..1ccb94c0c --- /dev/null +++ b/ports/mpfr/gmp_printf.c @@ -0,0 +1,6 @@ +#include +#include + +extern int __gmpfr_fprintf(const char *fmt, va_list argp) { + return fprintf(stderr, fmt, argp); +} diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake index b71aa0505..0e82d2623 100644 --- a/ports/mpfr/portfile.cmake +++ b/ports/mpfr/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/gmp_printf.c DESTINATION ${SOURCE_PATH}/src) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 4415ff5c16d96928a80fa17d6f7028bc9023ebd8 Mon Sep 17 00:00:00 2001 From: Alexej Harm Date: Tue, 21 Nov 2017 00:33:06 +0100 Subject: [angle] Add CMake package with modules. (#2223) * added angle cmake config * bumped angle package version * [angle] Add unofficial cmake targets --- ports/angle/CMakeLists.txt | 6 +++++- ports/angle/CONTROL | 2 +- ports/angle/portfile.cmake | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ports/angle/CMakeLists.txt b/ports/angle/CMakeLists.txt index 5a4c05359..53fff2223 100644 --- a/ports/angle/CMakeLists.txt +++ b/ports/angle/CMakeLists.txt @@ -178,6 +178,7 @@ target_compile_definitions(libGLESv2 -DGL_APICALL= -DEGLAPI= ) +target_include_directories(libGLESv2 PUBLIC "$") ########## # libEGL @@ -188,13 +189,16 @@ add_library(libEGL "src/libEGL/resource.h" ) target_link_libraries(libEGL PRIVATE angle::common angle::libANGLE libGLESv2) +target_include_directories(libEGL PUBLIC "$") -install(TARGETS libEGL libGLESv2 +install(TARGETS libEGL libGLESv2 EXPORT ANGLEExport RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) +install(EXPORT ANGLEExport FILE unofficial-angle-config.cmake NAMESPACE unofficial::angle:: DESTINATION share/unofficial-angle) + if(NOT DISABLE_INSTALL_HEADERS) install( DIRECTORY include/ diff --git a/ports/angle/CONTROL b/ports/angle/CONTROL index 38f8c7c60..12f912ac8 100644 --- a/ports/angle/CONTROL +++ b/ports/angle/CONTROL @@ -1,4 +1,4 @@ Source: angle -Version: 2017-06-14-8d471f-2 +Version: 2017-06-14-8d471f-4 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 ab7ebd828..e21aa83bc 100644 --- a/ports/angle/portfile.cmake +++ b/ports/angle/portfile.cmake @@ -31,6 +31,10 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/angle ${CURRENT_PACKAGES_DIR}/share/unofficial-angle) + vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/angle RENAME copyright) -- cgit v1.2.3 From 3d8ba3e775c13816f4c298ba16b8094e2affc4dd Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 20 Nov 2017 17:06:11 -0800 Subject: [SDL2] Move SDL2main.lib into manual-link. --- ports/sdl2/CONTROL | 2 +- ports/sdl2/portfile.cmake | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index f662ef6e7..04c88cb24 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.7-1 +Version: 2.0.7-2 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 9dd029c84..2fe53818e 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -50,7 +50,7 @@ else() else() set(SDL_STATIC_CRT OFF) endif() - + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -61,10 +61,21 @@ else() ) vcpkg_install_cmake() - + + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDL2main.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDL2maind.lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") + + file(GLOB SHARE_FILES ${CURRENT_PACKAGES_DIR}/share/sdl2/*.cmake) + foreach(SHARE_FILE ${SHARE_FILES}) + file(READ "${SHARE_FILE}" _contents) + string(REPLACE "lib/SDL2main" "lib/manual-link/SDL2main" _contents "${_contents}") + file(WRITE "${SHARE_FILE}" "${_contents}") + endforeach() endif() file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2 RENAME copyright) -- cgit v1.2.3 From eec26f68fc0f380118b2de7670c98f7a639d9d4b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 20 Nov 2017 17:07:03 -0800 Subject: [qt5] Reduce duplication in modular build by extracting qt5modularscripts --- ports/qt5/CONTROL | 4 + ports/qt5/portfile.cmake | 1 + ports/qt53d/CONTROL | 2 +- ports/qt53d/fixcmake.py | 57 ------- ports/qt53d/portfile.cmake | 156 +------------------ ports/qt5base/configure_qt.cmake | 2 +- ports/qt5base/portfile.cmake | 9 +- ports/qt5base/qt_debug.conf | 6 +- ports/qt5base/qt_release.conf | 2 +- ports/qt5charts/CONTROL | 2 +- ports/qt5charts/fixcmake.py | 57 ------- ports/qt5charts/portfile.cmake | 156 +------------------ ports/qt5datavis3d/CONTROL | 4 + ports/qt5datavis3d/portfile.cmake | 5 + ports/qt5datavisualization3d/CONTROL | 4 - ports/qt5datavisualization3d/fixcmake.py | 57 ------- ports/qt5datavisualization3d/portfile.cmake | 157 ------------------- ports/qt5declarative/CONTROL | 2 +- ports/qt5declarative/fixcmake.py | 57 ------- ports/qt5declarative/portfile.cmake | 159 +------------------- ports/qt5gamepad/CONTROL | 2 +- ports/qt5gamepad/fixcmake.py | 57 ------- ports/qt5gamepad/portfile.cmake | 156 +------------------ ports/qt5imageformats/CONTROL | 2 +- ports/qt5imageformats/fixcmake.py | 57 ------- ports/qt5imageformats/portfile.cmake | 156 +------------------ ports/qt5modularscripts/CONTROL | 3 + ports/qt5modularscripts/fixcmake.py | 57 +++++++ ports/qt5modularscripts/portfile.cmake | 9 ++ ports/qt5modularscripts/qt_modular_library.cmake | 174 ++++++++++++++++++++++ ports/qt5multimedia/CONTROL | 2 +- ports/qt5multimedia/fixcmake.py | 57 ------- ports/qt5multimedia/portfile.cmake | 156 +------------------ ports/qt5scxml/CONTROL | 2 +- ports/qt5scxml/fixcmake.py | 57 ------- ports/qt5scxml/portfile.cmake | 156 +------------------ ports/qt5serial/CONTROL | 2 +- ports/qt5serial/fixcmake.py | 57 ------- ports/qt5serial/portfile.cmake | 156 +------------------ ports/qt5speech/CONTROL | 2 +- ports/qt5speech/fixcmake.py | 57 ------- ports/qt5speech/portfile.cmake | 156 +------------------ ports/qt5svg/CONTROL | 2 +- ports/qt5svg/fixcmake.py | 57 ------- ports/qt5svg/portfile.cmake | 156 +------------------ ports/qt5tools/CONTROL | 2 +- ports/qt5tools/fixcmake.py | 57 ------- ports/qt5tools/portfile.cmake | 156 +------------------ ports/qt5virtualkeyboard/CONTROL | 2 +- ports/qt5virtualkeyboard/fixcmake.py | 57 ------- ports/qt5virtualkeyboard/portfile.cmake | 156 +------------------ ports/qt5websockets/CONTROL | 2 +- ports/qt5websockets/fixcmake.py | 57 ------- ports/qt5websockets/portfile.cmake | 156 +------------------ ports/qt5winextras/CONTROL | 2 +- ports/qt5winextras/fixcmake.py | 57 ------- ports/qt5winextras/portfile.cmake | 156 +------------------ ports/qt5xmlpatterns/CONTROL | 2 +- ports/qt5xmlpatterns/fixcmake.py | 57 ------- ports/qt5xmlpatterns/portfile.cmake | 156 +------------------ scripts/cmake/vcpkg_configure_qmake_debug.cmake | 6 +- scripts/cmake/vcpkg_configure_qmake_release.cmake | 5 +- 62 files changed, 320 insertions(+), 3413 deletions(-) create mode 100644 ports/qt5/CONTROL create mode 100644 ports/qt5/portfile.cmake delete mode 100644 ports/qt53d/fixcmake.py delete mode 100644 ports/qt5charts/fixcmake.py create mode 100644 ports/qt5datavis3d/CONTROL create mode 100644 ports/qt5datavis3d/portfile.cmake delete mode 100644 ports/qt5datavisualization3d/CONTROL delete mode 100644 ports/qt5datavisualization3d/fixcmake.py delete mode 100644 ports/qt5datavisualization3d/portfile.cmake delete mode 100644 ports/qt5declarative/fixcmake.py delete mode 100644 ports/qt5gamepad/fixcmake.py delete mode 100644 ports/qt5imageformats/fixcmake.py create mode 100644 ports/qt5modularscripts/CONTROL create mode 100644 ports/qt5modularscripts/fixcmake.py create mode 100644 ports/qt5modularscripts/portfile.cmake create mode 100644 ports/qt5modularscripts/qt_modular_library.cmake delete mode 100644 ports/qt5multimedia/fixcmake.py delete mode 100644 ports/qt5scxml/fixcmake.py delete mode 100644 ports/qt5serial/fixcmake.py delete mode 100644 ports/qt5speech/fixcmake.py delete mode 100644 ports/qt5svg/fixcmake.py delete mode 100644 ports/qt5tools/fixcmake.py delete mode 100644 ports/qt5virtualkeyboard/fixcmake.py delete mode 100644 ports/qt5websockets/fixcmake.py delete mode 100644 ports/qt5winextras/fixcmake.py delete mode 100644 ports/qt5xmlpatterns/fixcmake.py diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL new file mode 100644 index 000000000..060b41e3c --- /dev/null +++ b/ports/qt5/CONTROL @@ -0,0 +1,4 @@ +Source: qt5 +Version: 5.9.2-1 +Description: Qt5 Application Framework +Build-Depends: qt5base, qt5charts, qt5datavis3d, qt5declarative, qt5gamepad, qt5imageformats, qt5multimedia, qt5scxml, qt5serial, qt5speech, qt5svg, qt5tools, qt5virtualkeyboard, qt5websockets, qt53d, qt5winextras, qt5xmlpatterns diff --git a/ports/qt5/portfile.cmake b/ports/qt5/portfile.cmake new file mode 100644 index 000000000..cc6e26fcb --- /dev/null +++ b/ports/qt5/portfile.cmake @@ -0,0 +1 @@ +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/qt53d/CONTROL b/ports/qt53d/CONTROL index d8130de6e..b75c6b7bf 100644 --- a/ports/qt53d/CONTROL +++ b/ports/qt53d/CONTROL @@ -1,4 +1,4 @@ Source: qt53d Version: 5.9.2-0 Description: Qt5 3d Module - Functionality for near-realtime simulation systems with support for 2D and 3D rendering -Build-Depends: qt5base \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt53d/fixcmake.py b/ports/qt53d/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt53d/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt53d/portfile.cmake b/ports/qt53d/portfile.cmake index dd9751650..7de7bb5d5 100644 --- a/ports/qt53d/portfile.cmake +++ b/ports/qt53d/portfile.cmake @@ -1,157 +1,5 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qt3d-5.9.2") -set(ARCHIVE_NAME "qt3d-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 1c7dbd4e557cdd183ec6e929aae5727ce2ffcb519517942b588594bb81a78cb3d732cde4dae58085a70ec2968a8c2443eae96536125c25938222ff7c89f4f9a2 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +qt_modular_library(qt3d 1c7dbd4e557cdd183ec6e929aae5727ce2ffcb519517942b588594bb81a78cb3d732cde4dae58085a70ec2968a8c2443eae96536125c25938222ff7c89f4f9a2) diff --git a/ports/qt5base/configure_qt.cmake b/ports/qt5base/configure_qt.cmake index 315c48bdf..1d4f1e570 100644 --- a/ports/qt5base/configure_qt.cmake +++ b/ports/qt5base/configure_qt.cmake @@ -33,7 +33,7 @@ function(configure_qt) -datadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug -plugindir ${CURRENT_PACKAGES_DIR}/debug/plugins -qmldir ${CURRENT_PACKAGES_DIR}/debug/qml - -headerdir ${CURRENT_PACKAGES_DIR}/share/qt5/debug/include + -headerdir ${CURRENT_PACKAGES_DIR}/include -I ${CURRENT_INSTALLED_DIR}/include -L ${CURRENT_INSTALLED_DIR}/debug/lib -platform ${PLATFORM} diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake index 3c18a13f6..5cb7c6b82 100644 --- a/ports/qt5base/portfile.cmake +++ b/ports/qt5base/portfile.cmake @@ -77,13 +77,9 @@ file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) file(REMOVE ${BINARY_TOOLS}) file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) file(REMOVE ${BINARY_TOOLS}) -set(QT_DEBUG_PREFIX_PATH ${CURRENT_INSTALLED_DIR}) -set(QT_RELEASE_PREFIX_PATH ${CURRENT_INSTALLED_DIR}) -configure_file(${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/qt.conf) -configure_file(${CMAKE_CURRENT_LIST_DIR}/qt_release.conf ${CURRENT_PACKAGES_DIR}/tools/qt5/qt.conf) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf ${CMAKE_CURRENT_LIST_DIR}/qt_release.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) vcpkg_execute_required_process( COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py @@ -92,5 +88,6 @@ vcpkg_execute_required_process( ) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5) -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5base RENAME copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5base RENAME copyright) diff --git a/ports/qt5base/qt_debug.conf b/ports/qt5base/qt_debug.conf index 3bed4b725..1314d00b9 100644 --- a/ports/qt5base/qt_debug.conf +++ b/ports/qt5base/qt_debug.conf @@ -1,7 +1,7 @@ [Paths] -Prefix = ${QT_DEBUG_PREFIX_PATH} -Documentation = share/qt5/debug/doc -Headers = share/qt5/debug/include +Prefix = ${CURRENT_INSTALLED_DIR} +Documentation = share/qt5/doc +Headers = include Libraries = debug/lib Binaries = debug/tools/qt5 LibraryExecutables = debug/tools/qt5 diff --git a/ports/qt5base/qt_release.conf b/ports/qt5base/qt_release.conf index 99356fc26..a04aef525 100644 --- a/ports/qt5base/qt_release.conf +++ b/ports/qt5base/qt_release.conf @@ -1,5 +1,5 @@ [Paths] -Prefix = ${QT_RELEASE_PREFIX_PATH} +Prefix = ${CURRENT_INSTALLED_DIR} Documentation = share/qt5/doc Headers = include Libraries = lib diff --git a/ports/qt5charts/CONTROL b/ports/qt5charts/CONTROL index d1a2eb844..7b97a82b8 100644 --- a/ports/qt5charts/CONTROL +++ b/ports/qt5charts/CONTROL @@ -1,4 +1,4 @@ Source: qt5charts Version: 5.9.2-0 Description: Qt5 Charts Module - UI components for displaying charts, driven by static or dynamic data models -Build-Depends: qt5base \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5charts/fixcmake.py b/ports/qt5charts/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5charts/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5charts/portfile.cmake b/ports/qt5charts/portfile.cmake index 6e43f92b5..45a53b63d 100644 --- a/ports/qt5charts/portfile.cmake +++ b/ports/qt5charts/portfile.cmake @@ -1,157 +1,5 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtcharts-5.9.2") -set(ARCHIVE_NAME "qtcharts-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 297547b565dd71b05237bb05ecc1abf1a774a4909668417e78bd65e805c1e47a456a5a06898fe06d4c4614118e4129e19893d4c77598667a9354ab969307a293 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +qt_modular_library(qtcharts 297547b565dd71b05237bb05ecc1abf1a774a4909668417e78bd65e805c1e47a456a5a06898fe06d4c4614118e4129e19893d4c77598667a9354ab969307a293) diff --git a/ports/qt5datavis3d/CONTROL b/ports/qt5datavis3d/CONTROL new file mode 100644 index 000000000..c3f2157f8 --- /dev/null +++ b/ports/qt5datavis3d/CONTROL @@ -0,0 +1,4 @@ +Source: qt5datavis3d +Version: 5.9.2-0 +Description: Qt5 Data Visualization 3d Module - UI Components for creating 3D data visualizations +Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5datavis3d/portfile.cmake b/ports/qt5datavis3d/portfile.cmake new file mode 100644 index 000000000..d7a552cba --- /dev/null +++ b/ports/qt5datavis3d/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtdatavis3d 5f173401ba2f0ebb4bbb1ff65053f1ece44a97a8bf1d9fc8d81540709c588e140c533d5f317d6a9109d538e38aa742d42bf00906f63d433811bc1c8526788dc3) diff --git a/ports/qt5datavisualization3d/CONTROL b/ports/qt5datavisualization3d/CONTROL deleted file mode 100644 index f48b02579..000000000 --- a/ports/qt5datavisualization3d/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5datavisualization3d -Version: 5.9.2-0 -Description: Qt5 Data Visualization 3d Module - UI Components for creating 3D data visualizations -Build-Depends: qt5base \ No newline at end of file diff --git a/ports/qt5datavisualization3d/fixcmake.py b/ports/qt5datavisualization3d/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5datavisualization3d/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5datavisualization3d/portfile.cmake b/ports/qt5datavisualization3d/portfile.cmake deleted file mode 100644 index 8a067c524..000000000 --- a/ports/qt5datavisualization3d/portfile.cmake +++ /dev/null @@ -1,157 +0,0 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtdatavis3d-5.9.2") -set(ARCHIVE_NAME "qtdatavis3d-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 5f173401ba2f0ebb4bbb1ff65053f1ece44a97a8bf1d9fc8d81540709c588e140c533d5f317d6a9109d538e38aa742d42bf00906f63d433811bc1c8526788dc3 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/ports/qt5declarative/CONTROL b/ports/qt5declarative/CONTROL index cd86bb413..93014a591 100644 --- a/ports/qt5declarative/CONTROL +++ b/ports/qt5declarative/CONTROL @@ -1,4 +1,4 @@ Source: qt5declarative Version: 5.9.2-0 Description: Qt5 Declarative (Quick 2) Module. Includes QtQuick, QtQuickParticles, QtQuickWidgets, QtQml, and QtPacketProtocol. -Build-Depends: qt5base \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5declarative/fixcmake.py b/ports/qt5declarative/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5declarative/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5declarative/portfile.cmake b/ports/qt5declarative/portfile.cmake index 29ff3e759..63ce79746 100644 --- a/ports/qt5declarative/portfile.cmake +++ b/ports/qt5declarative/portfile.cmake @@ -1,160 +1,5 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtdeclarative-5.9.2") -set(ARCHIVE_NAME "qtdeclarative-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 49b8b50932b73ea39da14ac3425044193dfd64eabceadba379aa01cf2fc141177f9870c387caf1cf93ce09e8b197828a54b8d9fcefc4d9cdf400a6c6dd9a9e90 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) - -#Fix incorrectly placed file(s) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Qt5QmlDevToolsd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/Qt5QmlDevToolsd.lib) \ No newline at end of file +qt_modular_library(qtdeclarative 49b8b50932b73ea39da14ac3425044193dfd64eabceadba379aa01cf2fc141177f9870c387caf1cf93ce09e8b197828a54b8d9fcefc4d9cdf400a6c6dd9a9e90) diff --git a/ports/qt5gamepad/CONTROL b/ports/qt5gamepad/CONTROL index 051deb634..5228aa006 100644 --- a/ports/qt5gamepad/CONTROL +++ b/ports/qt5gamepad/CONTROL @@ -1,4 +1,4 @@ Source: qt5gamepad Version: 5.9.2-0 Description: Qt5 Gamepad Module - Enables Qt applications to support the use of gamepad hardware -Build-Depends: qt5base \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5gamepad/fixcmake.py b/ports/qt5gamepad/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5gamepad/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5gamepad/portfile.cmake b/ports/qt5gamepad/portfile.cmake index 68ab01e6d..f4b81f4fd 100644 --- a/ports/qt5gamepad/portfile.cmake +++ b/ports/qt5gamepad/portfile.cmake @@ -1,157 +1,5 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtgamepad-5.9.2") -set(ARCHIVE_NAME "qtgamepad-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 398d6ff0268460358584a4ea8ba0588881970dcc1dff6c5aa91d1630065ba112c86d7a1fe96dceb8ff301b350aef7f74ad1ee6212048a4cdfb26ff5d944d6222 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +qt_modular_library(qtgamepad 398d6ff0268460358584a4ea8ba0588881970dcc1dff6c5aa91d1630065ba112c86d7a1fe96dceb8ff301b350aef7f74ad1ee6212048a4cdfb26ff5d944d6222) diff --git a/ports/qt5imageformats/CONTROL b/ports/qt5imageformats/CONTROL index bcafa4558..995dc59fc 100644 --- a/ports/qt5imageformats/CONTROL +++ b/ports/qt5imageformats/CONTROL @@ -1,4 +1,4 @@ Source: qt5imageformats Version: 5.9.2-0 Description: Qt5 Image Formats Module - Plugins for additional image formats: TIFF, MNG, TGA, WBMP -Build-Depends: qt5base \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5imageformats/fixcmake.py b/ports/qt5imageformats/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5imageformats/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5imageformats/portfile.cmake b/ports/qt5imageformats/portfile.cmake index 612178ff8..ae3025b51 100644 --- a/ports/qt5imageformats/portfile.cmake +++ b/ports/qt5imageformats/portfile.cmake @@ -1,157 +1,7 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() +qt_modular_library(qtimageformats 5f1b93c0e5fffa4c2c063d14c12ad97114a452b16814ca9ac45f00ec36308a09770b3b4d137cb5d19bd3aa3a6f576724084df5d0dad75236d49868af9243c9d2) -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtimageformats-5.9.2") -set(ARCHIVE_NAME "qtimageformats-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 5f1b93c0e5fffa4c2c063d14c12ad97114a452b16814ca9ac45f00ec36308a09770b3b4d137cb5d19bd3aa3a6f576724084df5d0dad75236d49868af9243c9d2 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/qt5modularscripts/CONTROL b/ports/qt5modularscripts/CONTROL new file mode 100644 index 000000000..88c0379af --- /dev/null +++ b/ports/qt5modularscripts/CONTROL @@ -0,0 +1,3 @@ +Source: qt5modularscripts +Version: 0 +Description: Vcpkg helpers to package qt5 modules diff --git a/ports/qt5modularscripts/fixcmake.py b/ports/qt5modularscripts/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5modularscripts/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5modularscripts/portfile.cmake b/ports/qt5modularscripts/portfile.cmake new file mode 100644 index 000000000..e7149adfc --- /dev/null +++ b/ports/qt5modularscripts/portfile.cmake @@ -0,0 +1,9 @@ +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + ${CMAKE_CURRENT_LIST_DIR}/qt_modular_library.cmake + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/qt5modularscripts +) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/qt5modularscripts/copyright "") + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/qt5modularscripts/qt_modular_library.cmake b/ports/qt5modularscripts/qt_modular_library.cmake new file mode 100644 index 000000000..6fa4c20c8 --- /dev/null +++ b/ports/qt5modularscripts/qt_modular_library.cmake @@ -0,0 +1,174 @@ +set(_qt5base_port_dir "${CMAKE_CURRENT_LIST_DIR}") + +function(qt_modular_library NAME HASH) + 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" + "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." + ) + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") + endif() + + set(SRCDIR_NAME "${NAME}-5.9.2") + set(ARCHIVE_NAME "${NAME}-opensource-src-5.9.2") + set(ARCHIVE_EXTENSION ".tar.xz") + + set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) + vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 ${HASH} + ) + vcpkg_extract_source_archive(${ARCHIVE_FILE}) + if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) + endif() + + # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings + set(ENV{_CL_} "/utf-8") + + #Store build paths + set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + + file(REMOVE_RECURSE "${DEBUG_DIR}" "${RELEASE_DIR}") + + #Find Python and add it to the path + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) + set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") + + #Configure debug + vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} + ) + + #First generate the makefiles so we can modify them + vcpkg_build_qmake_debug(TARGETS qmake_all) + + #Store debug makefiles path + file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + + foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + file(READ "${DEBUG_MAKEFILE}" _contents) + string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") + string(REPLACE "vcpkg\\installed\\${TARGET_TRIPLET}\\lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") + file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") + endforeach() + + #Build debug + vcpkg_build_qmake_debug() + + #Configure release + vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} + ) + + #First generate the makefiles so we can modify them + vcpkg_build_qmake_release(TARGETS qmake_all) + + #Store release makefile path + file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + + #Build release + vcpkg_build_qmake_release() + + #Fix the cmake files if they exist + if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${_qt5base_port_dir}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) + endif() + + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) + + string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) + string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) + + #Set the correct install directory to packages + foreach(MAKEFILE ${RELEASE_MAKEFILES} ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${MAKEFILE} "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}") + endforeach() + + #Install the module files + vcpkg_build_qmake_debug(TARGETS install) + vcpkg_build_qmake_release(TARGETS install) + + #Remove extra 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() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + endif() + + file(GLOB RELEASE_LIBS "${CURRENT_PACKAGES_DIR}/lib/*") + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() + file(GLOB DEBUG_FILES "${CURRENT_PACKAGES_DIR}/debug/lib/*") + if(NOT DEBUG_FILES) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() + + #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}/debug/tools/qt5 ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) + endif() + + file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/${PORT}/*.dll) + file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/*.dll) + if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/${PORT}/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() + endif() + if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + #file(REMOVE ${DEBUG_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + # file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) + # if(NOT DEBUG_BINS) + # file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + # endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/qt5/debug/include) + + # file(GLOB DEBUG_LIBS "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib") + # if(EXISTS ${CURRENT_PACKAGES_DIR}/bin) + # make_directory(${CURRENT_PACKAGES_DIR}/debug/bin) + # foreach(DEBUG_LIB ${DEBUG_LIBS}) + # get_filename_component(DEBUG_STEM "${DEBUG_LIB}" NAME_WE) + # file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${DEBUG_STEM}.dll ${CURRENT_PACKAGES_DIR}/debug/bin/${DEBUG_STEM}.dll) + # endforeach() + # endif() + + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + + #Find the relevant license file and install it + if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") + endif() + file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +endfunction() \ No newline at end of file diff --git a/ports/qt5multimedia/CONTROL b/ports/qt5multimedia/CONTROL index 3a4d01030..b45f3f297 100644 --- a/ports/qt5multimedia/CONTROL +++ b/ports/qt5multimedia/CONTROL @@ -1,4 +1,4 @@ Source: qt5multimedia Version: 5.9.2-0 Description: Qt5 Multimedia Module - Classes and widgets for audio, video, radio and camera functionality -Build-Depends: qt5base \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base, qt5declarative diff --git a/ports/qt5multimedia/fixcmake.py b/ports/qt5multimedia/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5multimedia/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5multimedia/portfile.cmake b/ports/qt5multimedia/portfile.cmake index 5eb7c4ff1..878c2b150 100644 --- a/ports/qt5multimedia/portfile.cmake +++ b/ports/qt5multimedia/portfile.cmake @@ -1,157 +1,5 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtmultimedia-5.9.2") -set(ARCHIVE_NAME "qtmultimedia-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 b9fab874706440e97185475bfd0ad769c23d5ddbff5086cc0da9783777e81ed8140fb06fa0e7536ebfb67f2c9db39e1b9f3c2241834e74a9e1fb6ffd5cb7af11 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +qt_modular_library(qtmultimedia b9fab874706440e97185475bfd0ad769c23d5ddbff5086cc0da9783777e81ed8140fb06fa0e7536ebfb67f2c9db39e1b9f3c2241834e74a9e1fb6ffd5cb7af11) diff --git a/ports/qt5scxml/CONTROL b/ports/qt5scxml/CONTROL index 974bce77c..4010ca304 100644 --- a/ports/qt5scxml/CONTROL +++ b/ports/qt5scxml/CONTROL @@ -1,4 +1,4 @@ Source: qt5scxml Version: 5.9.2-0 Description: Qt5 SCXML Module - Provides classes and tools for creating state machines from SCXML files and embedding them in applications -Build-Depends: qt5base \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base, qt5declarative diff --git a/ports/qt5scxml/fixcmake.py b/ports/qt5scxml/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5scxml/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5scxml/portfile.cmake b/ports/qt5scxml/portfile.cmake index 03de826cf..b0827216e 100644 --- a/ports/qt5scxml/portfile.cmake +++ b/ports/qt5scxml/portfile.cmake @@ -1,157 +1,5 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtscxml-5.9.2") -set(ARCHIVE_NAME "qtscxml-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 c33db992ab456e5dd8b9be65c5619c503048106bbb1839b0930f2d4df36eed0780dfa1fc2912d7758aa72195269e59cbe8826cbaa414c2f339ca66c565809c88 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +qt_modular_library(qtscxml c33db992ab456e5dd8b9be65c5619c503048106bbb1839b0930f2d4df36eed0780dfa1fc2912d7758aa72195269e59cbe8826cbaa414c2f339ca66c565809c88) diff --git a/ports/qt5serial/CONTROL b/ports/qt5serial/CONTROL index 386fc8e6c..7782e6a53 100644 --- a/ports/qt5serial/CONTROL +++ b/ports/qt5serial/CONTROL @@ -1,4 +1,4 @@ Source: qt5serial Version: 5.9.2-0 Description: Qt5 Serial Port - provides access to hardware and virtual serial ports -Build-Depends: qt5base \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5serial/fixcmake.py b/ports/qt5serial/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5serial/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5serial/portfile.cmake b/ports/qt5serial/portfile.cmake index 1d47b5d0a..f4a42f38f 100644 --- a/ports/qt5serial/portfile.cmake +++ b/ports/qt5serial/portfile.cmake @@ -1,157 +1,5 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtserial-5.9.2") -set(ARCHIVE_NAME "qtserialport-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 cc8899c1ae2ed9fd8cf1c213ab7efaec12b3b16836006fdbf74cb7ea457705505a13e82c2f2873ee9426ae66473ec42259f4e728de64576ee44420f116cc433d -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +qt_modular_library(qtserialport cc8899c1ae2ed9fd8cf1c213ab7efaec12b3b16836006fdbf74cb7ea457705505a13e82c2f2873ee9426ae66473ec42259f4e728de64576ee44420f116cc433d) diff --git a/ports/qt5speech/CONTROL b/ports/qt5speech/CONTROL index 0013556d7..f175d13e7 100644 --- a/ports/qt5speech/CONTROL +++ b/ports/qt5speech/CONTROL @@ -1,4 +1,4 @@ Source: qt5speech Version: 5.9.2-0 Description: Qt5 Speech Module -Build-Depends: qt5base, atlmfc \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base, atlmfc \ No newline at end of file diff --git a/ports/qt5speech/fixcmake.py b/ports/qt5speech/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5speech/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5speech/portfile.cmake b/ports/qt5speech/portfile.cmake index fa80da81d..8a271b289 100644 --- a/ports/qt5speech/portfile.cmake +++ b/ports/qt5speech/portfile.cmake @@ -1,157 +1,5 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtspeech-5.9.2") -set(ARCHIVE_NAME "qtspeech-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 8213ad13d33732fee3fc5b5e408b870970a3003d461be24195222e1d1209210039d1d0cd2f3c537a0db62629fb297d88b33ed4734ecb6c8d74f5406a87e7e0c0 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +qt_modular_library(qtspeech 8213ad13d33732fee3fc5b5e408b870970a3003d461be24195222e1d1209210039d1d0cd2f3c537a0db62629fb297d88b33ed4734ecb6c8d74f5406a87e7e0c0) diff --git a/ports/qt5svg/CONTROL b/ports/qt5svg/CONTROL index f56df4b51..c52ca485c 100644 --- a/ports/qt5svg/CONTROL +++ b/ports/qt5svg/CONTROL @@ -1,4 +1,4 @@ Source: qt5svg Version: 5.9.2-0 Description: Qt5 SVG Module - provides classes for displaying the contents of SVG files -Build-Depends: qt5base \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5svg/fixcmake.py b/ports/qt5svg/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5svg/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5svg/portfile.cmake b/ports/qt5svg/portfile.cmake index 2b838714e..83283d376 100644 --- a/ports/qt5svg/portfile.cmake +++ b/ports/qt5svg/portfile.cmake @@ -1,157 +1,5 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtsvg-5.9.2") -set(ARCHIVE_NAME "qtsvg-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 c21c5a12fa10ff9f91deda88c99c995ee2138bdffa21c793b0c42f25155f01f87ede5206624b9d82713649f8cf1cfdb95f1d5b7e792de62f3848d3a9ec665fdd -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +qt_modular_library(qtsvg c21c5a12fa10ff9f91deda88c99c995ee2138bdffa21c793b0c42f25155f01f87ede5206624b9d82713649f8cf1cfdb95f1d5b7e792de62f3848d3a9ec665fdd) diff --git a/ports/qt5tools/CONTROL b/ports/qt5tools/CONTROL index 702d4d68e..4050ac097 100644 --- a/ports/qt5tools/CONTROL +++ b/ports/qt5tools/CONTROL @@ -1,4 +1,4 @@ Source: qt5tools Version: 5.9.2-0 Description: Qt5 Tools Module; Includes deployment tools and helpers, Qt Designer, Assistant, and other applications -Build-Depends: qt5base, qt5declarative \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base, qt5declarative \ No newline at end of file diff --git a/ports/qt5tools/fixcmake.py b/ports/qt5tools/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5tools/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake index 2dcd4a3c3..10eefa959 100644 --- a/ports/qt5tools/portfile.cmake +++ b/ports/qt5tools/portfile.cmake @@ -1,157 +1,5 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qttools-5.9.2") -set(ARCHIVE_NAME "qttools-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 afce063e167de96dfa264cfd27dc8d80c23ef091a30f4f8119575cae83f39716c3b332427630b340f518b82d6396cca1893f28e00f3c667ba201d7e4fc2aefe1 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +qt_modular_library(qttools afce063e167de96dfa264cfd27dc8d80c23ef091a30f4f8119575cae83f39716c3b332427630b340f518b82d6396cca1893f28e00f3c667ba201d7e4fc2aefe1) diff --git a/ports/qt5virtualkeyboard/CONTROL b/ports/qt5virtualkeyboard/CONTROL index 7f5649f31..041e2cdd9 100644 --- a/ports/qt5virtualkeyboard/CONTROL +++ b/ports/qt5virtualkeyboard/CONTROL @@ -1,4 +1,4 @@ Source: qt5virtualkeyboard Version: 5.9.2-0 Description: Qt5 Virtual Keyboard Module - A framework for implementing different input methods. Supports localized keyboard layouts and custom visual themes -Build-Depends: qt5base \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5virtualkeyboard/fixcmake.py b/ports/qt5virtualkeyboard/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5virtualkeyboard/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5virtualkeyboard/portfile.cmake b/ports/qt5virtualkeyboard/portfile.cmake index a2f0b1999..cceed3894 100644 --- a/ports/qt5virtualkeyboard/portfile.cmake +++ b/ports/qt5virtualkeyboard/portfile.cmake @@ -1,157 +1,7 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() +qt_modular_library(qtvirtualkeyboard f8c39b789e877e60389ee9aab4a5c17e6018093f72fc57f526ce2584183135206306d4d5a7c7551a6de45969aa6f55444bb39f4ea3324cdf10611533f0bc2b22) -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtvirtualkeyboard-5.9.2") -set(ARCHIVE_NAME "qtvirtualkeyboard-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 f8c39b789e877e60389ee9aab4a5c17e6018093f72fc57f526ce2584183135206306d4d5a7c7551a6de45969aa6f55444bb39f4ea3324cdf10611533f0bc2b22 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/qt5websockets/CONTROL b/ports/qt5websockets/CONTROL index 51497f6ec..2ab49879b 100644 --- a/ports/qt5websockets/CONTROL +++ b/ports/qt5websockets/CONTROL @@ -1,4 +1,4 @@ Source: qt5websockets Version: 5.9.2-0 Description: Qt5 Web Sockets Module - provides WebSocket communication compliant with RFC 6455 -Build-Depends: qt5base \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5websockets/fixcmake.py b/ports/qt5websockets/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5websockets/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5websockets/portfile.cmake b/ports/qt5websockets/portfile.cmake index 64f9bf374..98442f4c0 100644 --- a/ports/qt5websockets/portfile.cmake +++ b/ports/qt5websockets/portfile.cmake @@ -1,157 +1,5 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtwebsockets-5.9.2") -set(ARCHIVE_NAME "qtwebsockets-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 9330d6806251bc77d4c2a497a31b1b0e42a1e6bfe3ea7c00cee123052e9e1f9080e33cf4dfcd6ee6e4732c62f41257a77ec25ad607528f4e8ebe61ccaee3e159 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +qt_modular_library(qtwebsockets 9330d6806251bc77d4c2a497a31b1b0e42a1e6bfe3ea7c00cee123052e9e1f9080e33cf4dfcd6ee6e4732c62f41257a77ec25ad607528f4e8ebe61ccaee3e159) diff --git a/ports/qt5winextras/CONTROL b/ports/qt5winextras/CONTROL index 1c212d9b5..451118c5a 100644 --- a/ports/qt5winextras/CONTROL +++ b/ports/qt5winextras/CONTROL @@ -1,4 +1,4 @@ Source: qt5winextras Version: 5.9.2-0 Description: Qt5 Windows Extras Module. Provides platform-specific APIs for Windows. -Build-Depends: qt5base, atlmfc \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base, atlmfc \ No newline at end of file diff --git a/ports/qt5winextras/fixcmake.py b/ports/qt5winextras/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5winextras/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5winextras/portfile.cmake b/ports/qt5winextras/portfile.cmake index 04b55327f..692683adf 100644 --- a/ports/qt5winextras/portfile.cmake +++ b/ports/qt5winextras/portfile.cmake @@ -1,157 +1,5 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtwinextras-5.9.2") -set(ARCHIVE_NAME "qtwinextras-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 dbfb89833cc291fade8e9fe2ad9c7b7a78c2032de8dcbca1049d637f829811b99e1852ae39ca73a6eac2960df168765bee28023bb723e69c87e2f3bb50b7ef02 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +qt_modular_library(qtwinextras dbfb89833cc291fade8e9fe2ad9c7b7a78c2032de8dcbca1049d637f829811b99e1852ae39ca73a6eac2960df168765bee28023bb723e69c87e2f3bb50b7ef02) diff --git a/ports/qt5xmlpatterns/CONTROL b/ports/qt5xmlpatterns/CONTROL index baef1b3fd..03bd2938e 100644 --- a/ports/qt5xmlpatterns/CONTROL +++ b/ports/qt5xmlpatterns/CONTROL @@ -1,4 +1,4 @@ Source: qt5xmlpatterns Version: 5.9.2-0 Description: Qt5 XML Patterns Module - Support for XPath, XQuery, XSLT and XML schema validation -Build-Depends: qt5base \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5xmlpatterns/fixcmake.py b/ports/qt5xmlpatterns/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5xmlpatterns/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5xmlpatterns/portfile.cmake b/ports/qt5xmlpatterns/portfile.cmake index 764628c5e..6fbc69538 100644 --- a/ports/qt5xmlpatterns/portfile.cmake +++ b/ports/qt5xmlpatterns/portfile.cmake @@ -1,157 +1,5 @@ include(vcpkg_common_functions) -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - -set(SRCDIR_NAME "qtxmlpatterns-5.9.2") -set(ARCHIVE_NAME "qtxmlpatterns-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 c14dbd97988473ba73b4e21352c5560278aa4dbfdf2be1d12e9119c0b5dbe8a0e4eff9a682052024a01bb21dcf52d40ba00da98947901fb91518af92a225da83 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -#Store build paths -set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -#Find Python and add it to the path -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) -set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") -set(_path "$ENV{PATH}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS sub-src-qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -#Fix path to Qt5QmlDevTools -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "vcpkg\\installed\\${TARGET_TRIPLET}\\lib\\Qt5QmlDevToolsd.lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib\\Qt5QmlDevToolsd.lib") -endforeach() - -#Build debug -vcpkg_build_qmake_debug() - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS sub-src-qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -#Build release -vcpkg_build_qmake_release() - -#Fix the cmake files if they exist -if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) -endif() - -#Set the correct install directory to packages -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - vcpkg_replace_string(${RELEASE_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${DEBUG_MAKEFILE} "(INSTALL_ROOT)\\vcpkg\\installed\\${TARGET_TRIPLET}" "(INSTALL_ROOT)\\vcpkg\\packages\\${PORT}_${TARGET_TRIPLET}") -endforeach() - -#Install the module files -vcpkg_build_qmake_debug(TARGETS install) -vcpkg_build_qmake_release(TARGETS install) - -#Reset the path to the baseline -set(ENV{PATH} "${_path}") - -#Remove extra 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) - #Check if there are any libs left over; if not - delete the directory - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() -endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - #Check if there are any libs left over; if not - delete the directory - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/lib/*) - if(NOT DEBUG_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() -endif() - -#Move release and debug dlls to the correct directory -file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/qt5/*.dll) -file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*.dll) -if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/qt5/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() -endif() -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - if(NOT DEBUG_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() -endif() - -#If there are no include files in the module - create an empty one to stop vcpkg from complaining -if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include) - file(WRITE ${CURRENT_PACKAGES_DIR}/include/.empty_${PORT} "") -endif() - -#Find the relevant license file and install it -if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") -elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") -endif() -file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file +qt_modular_library(qtxmlpatterns c14dbd97988473ba73b4e21352c5560278aa4dbfdf2be1d12e9119c0b5dbe8a0e4eff9a682052024a01bb21dcf52d40ba00da98947901fb91518af92a225da83) diff --git a/scripts/cmake/vcpkg_configure_qmake_debug.cmake b/scripts/cmake/vcpkg_configure_qmake_debug.cmake index e3dfb0777..3eeb42cb3 100644 --- a/scripts/cmake/vcpkg_configure_qmake_debug.cmake +++ b/scripts/cmake/vcpkg_configure_qmake_debug.cmake @@ -21,7 +21,7 @@ function(vcpkg_configure_qmake_debug) cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) # Find qmake exectuable - find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/debug/tools/qt5) + find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) if(NOT QMAKE_COMMAND) message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") @@ -30,10 +30,12 @@ function(vcpkg_configure_qmake_debug) # Cleanup build directories file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_debug.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) vcpkg_execute_required_process( - COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} + COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf" WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME config-${TARGET_TRIPLET}-dbg ) diff --git a/scripts/cmake/vcpkg_configure_qmake_release.cmake b/scripts/cmake/vcpkg_configure_qmake_release.cmake index cf9eacbd5..60750060b 100644 --- a/scripts/cmake/vcpkg_configure_qmake_release.cmake +++ b/scripts/cmake/vcpkg_configure_qmake_release.cmake @@ -22,6 +22,7 @@ function(vcpkg_configure_qmake_release) # Find qmake exectuable find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) + if(NOT QMAKE_COMMAND) message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") endif() @@ -29,10 +30,12 @@ function(vcpkg_configure_qmake_release) # Cleanup build directories file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_release.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) vcpkg_execute_required_process( - COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} + COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf" WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME config-${TARGET_TRIPLET}-rel ) -- cgit v1.2.3 From 1313a418cfe26d29c7b4ec2f871d93a07e884d10 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 20 Nov 2017 18:17:24 -0800 Subject: Introduce PowershellParameter to add '' to parameter values. Also place that and CMakeVariable in System.h --- toolsrc/include/vcpkg/base/system.h | 24 +++++++++++++++++++- toolsrc/include/vcpkg/vcpkglib.h | 15 +------------ toolsrc/src/vcpkg/base/system.cpp | 41 ++++++++++++++++++++++++++++++++++- toolsrc/src/vcpkg/build.cpp | 12 +++++----- toolsrc/src/vcpkg/commands.create.cpp | 3 +-- toolsrc/src/vcpkg/export.cpp | 3 ++- toolsrc/src/vcpkg/metrics.cpp | 5 +++-- toolsrc/src/vcpkg/vcpkglib.cpp | 24 +------------------- toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 9 files changed, 79 insertions(+), 52 deletions(-) diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index 9f2d91435..db537db4b 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -10,6 +10,28 @@ namespace vcpkg::System fs::path get_exe_path_of_current_process(); + struct CMakeVariable + { + CMakeVariable(const CStringView varname, const char* varvalue); + CMakeVariable(const CStringView varname, const std::string& varvalue); + CMakeVariable(const CStringView varname, const fs::path& path); + + std::string s; + }; + + std::string make_cmake_cmd(const fs::path& cmake_exe, + const fs::path& cmake_script, + const std::vector& pass_variables); + + struct PowershellParameter + { + PowershellParameter(const CStringView varname, const char* varvalue); + PowershellParameter(const CStringView varname, const std::string& varvalue); + PowershellParameter(const CStringView varname, const fs::path& path); + + std::string s; + }; + struct ExitCodeAndOutput { int exit_code; @@ -24,7 +46,7 @@ namespace vcpkg::System std::string powershell_execute_and_capture_output(const std::string& title, const fs::path& script_path, - const CStringView args = ""); + const std::vector& parameters = {}); enum class Color { diff --git a/toolsrc/include/vcpkg/vcpkglib.h b/toolsrc/include/vcpkg/vcpkglib.h index 9a7fdb861..3c8e676bf 100644 --- a/toolsrc/include/vcpkg/vcpkglib.h +++ b/toolsrc/include/vcpkg/vcpkglib.h @@ -20,18 +20,5 @@ namespace vcpkg std::vector get_installed_files(const VcpkgPaths& paths, const StatusParagraphs& status_db); - struct CMakeVariable - { - CMakeVariable(const CStringView varname, const char* varvalue); - CMakeVariable(const CStringView varname, const std::string& varvalue); - CMakeVariable(const CStringView varname, const fs::path& path); - - std::string s; - }; - - std::string make_cmake_cmd(const fs::path& cmake_exe, - const fs::path& cmake_script, - const std::vector& pass_variables); - - std::string shorten_text(const std::string& desc, size_t length); + std::string shorten_text(const std::string& desc, const size_t length); } // namespace vcpkg diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 47096ed63..56b725f6b 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -72,6 +72,43 @@ namespace vcpkg::System return supported_architectures; } + CMakeVariable::CMakeVariable(const CStringView varname, const char* varvalue) + : s(Strings::format(R"("-D%s=%s")", varname, varvalue)) + { + } + CMakeVariable::CMakeVariable(const CStringView varname, const std::string& varvalue) + : CMakeVariable(varname, varvalue.c_str()) + { + } + CMakeVariable::CMakeVariable(const CStringView varname, const fs::path& path) + : CMakeVariable(varname, path.generic_u8string()) + { + } + + std::string make_cmake_cmd(const fs::path& cmake_exe, + const fs::path& cmake_script, + const std::vector& pass_variables) + { + const std::string cmd_cmake_pass_variables = Strings::join(" ", pass_variables, [](auto&& v) { return v.s; }); + return Strings::format( + R"("%s" %s -P "%s")", cmake_exe.u8string(), cmd_cmake_pass_variables, cmake_script.generic_u8string()); + } + + PowershellParameter::PowershellParameter(const CStringView varname, const char* varvalue) + : s(Strings::format(R"(-%s '%s')", varname, varvalue)) + { + } + + PowershellParameter::PowershellParameter(const CStringView varname, const std::string& varvalue) + : PowershellParameter(varname, varvalue.c_str()) + { + } + + PowershellParameter::PowershellParameter(const CStringView varname, const fs::path& path) + : PowershellParameter(varname, path.generic_u8string()) + { + } + int cmd_execute_clean(const CStringView cmd_line) { #if defined(_WIN32) @@ -272,8 +309,10 @@ namespace vcpkg::System std::string powershell_execute_and_capture_output(const std::string& title, const fs::path& script_path, - const CStringView args) + const std::vector& parameters) { + const std::string args = Strings::join(" ", parameters, [](auto&& v) { return v.s; }); + // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned const std::string cmd = Strings::format( R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), args); diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index e3787a97e..804573d91 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -301,7 +301,7 @@ namespace vcpkg::Build const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); - const std::string cmd_launch_cmake = make_cmake_cmd( + const std::string cmd_launch_cmake = System::make_cmake_cmd( cmake_exe_path, ports_cmake_script_path, { @@ -493,11 +493,11 @@ namespace vcpkg::Build 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 auto cmd_launch_cmake = make_cmake_cmd(cmake_exe_path, - ports_cmake_script_path, - { - {"CMAKE_TRIPLET_FILE", triplet_file_path}, - }); + const auto cmd_launch_cmake = System::make_cmake_cmd(cmake_exe_path, + ports_cmake_script_path, + { + {"CMAKE_TRIPLET_FILE", triplet_file_path}, + }); 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.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index c7183d257..44f5f7928 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -4,7 +4,6 @@ #include #include #include -#include namespace vcpkg::Commands::Create { @@ -25,7 +24,7 @@ namespace vcpkg::Commands::Create const fs::path& cmake_exe = paths.get_cmake_exe(); - std::vector cmake_args{{"CMD", "CREATE"}, {"PORT", port_name}, {"URL", url}}; + std::vector cmake_args{{"CMD", "CREATE"}, {"PORT", port_name}, {"URL", url}}; if (args.command_arguments.size() >= 3) { diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 9b86863eb..f237c72f8 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -369,7 +369,8 @@ namespace vcpkg::Export static void print_next_step_info(const fs::path& prefix) { const fs::path cmake_toolchain = prefix / "scripts" / "buildsystems" / "vcpkg.cmake"; - const CMakeVariable cmake_variable = CMakeVariable("CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); + const System::CMakeVariable cmake_variable = + System::CMakeVariable("CMAKE_TOOLCHAIN_FILE", cmake_toolchain.generic_string()); System::println("\n" "To use the exported libraries in CMake projects use:" "\n" diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index d7e18a176..15bcb4516 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -255,9 +255,10 @@ namespace vcpkg::Metrics auto match = *next; if (match[0] != "00-00-00-00-00-00") { - std::string matchstr = match[0]; + const std::string matchstr = match[0]; + const System::PowershellParameter value("Value", matchstr); auto hash_result = System::powershell_execute_and_capture_output( - "SHA256Hash", get_vcpkg_root() / "SHA256Hash.ps1", Strings::format("-Value \"%s\"", matchstr)); + "SHA256Hash", get_vcpkg_root() / "SHA256Hash.ps1", {value}); Util::erase_remove_if(hash_result, [](char ch) { return !(ch >= 'A' && ch <= 'F') && !(ch >= '0' && ch <= '9'); }); hash_result = Strings::ascii_to_lowercase(hash_result); diff --git a/toolsrc/src/vcpkg/vcpkglib.cpp b/toolsrc/src/vcpkg/vcpkglib.cpp index 38b130f6f..5b2cec4d0 100644 --- a/toolsrc/src/vcpkg/vcpkglib.cpp +++ b/toolsrc/src/vcpkg/vcpkglib.cpp @@ -212,29 +212,7 @@ namespace vcpkg return installed_files; } - CMakeVariable::CMakeVariable(const CStringView varname, const char* varvalue) - : s(Strings::format(R"("-D%s=%s")", varname, varvalue)) - { - } - CMakeVariable::CMakeVariable(const CStringView varname, const std::string& varvalue) - : CMakeVariable(varname, varvalue.c_str()) - { - } - CMakeVariable::CMakeVariable(const CStringView varname, const fs::path& path) - : CMakeVariable(varname, path.generic_u8string()) - { - } - - std::string make_cmake_cmd(const fs::path& cmake_exe, - const fs::path& cmake_script, - const std::vector& pass_variables) - { - const std::string cmd_cmake_pass_variables = Strings::join(" ", pass_variables, [](auto&& v) { return v.s; }); - return Strings::format( - R"("%s" %s -P "%s")", cmake_exe.u8string(), cmd_cmake_pass_variables, cmake_script.generic_u8string()); - } - - std::string shorten_text(const std::string& desc, size_t length) + std::string shorten_text(const std::string& desc, const size_t length) { Checks::check_exit(VCPKG_LINE_INFO, length >= 3); auto simple_desc = std::regex_replace(desc, std::regex("\\s+"), " "); diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index a553f4199..460979693 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -92,8 +92,8 @@ namespace vcpkg version_as_string); const fs::path script = scripts_folder / "fetchDependency.ps1"; const std::string title = "Fetching %s version %s (No sufficient installed version was found)"; - const std::string output = - System::powershell_execute_and_capture_output(title, script, Strings::format("-Dependency %s", tool_name)); + const System::PowershellParameter dependency_param("Dependency", tool_name); + const std::string output = System::powershell_execute_and_capture_output(title, script, {dependency_param}); const std::vector dependency_path = keep_data_lines(output); Checks::check_exit( -- cgit v1.2.3 From 7c07ff813b0528fdd37f8835b99bc2e449fcf10c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 20 Nov 2017 18:22:55 -0800 Subject: Fix path --- toolsrc/src/vcpkg/metrics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 15bcb4516..69160705c 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -258,7 +258,7 @@ namespace vcpkg::Metrics const std::string matchstr = match[0]; const System::PowershellParameter value("Value", matchstr); auto hash_result = System::powershell_execute_and_capture_output( - "SHA256Hash", get_vcpkg_root() / "SHA256Hash.ps1", {value}); + "SHA256Hash", get_vcpkg_root() / "scripts" / "SHA256Hash.ps1", {value}); Util::erase_remove_if(hash_result, [](char ch) { return !(ch >= 'A' && ch <= 'F') && !(ch >= '0' && ch <= '9'); }); hash_result = Strings::ascii_to_lowercase(hash_result); -- cgit v1.2.3 From c4d9af91c315bcd5d0e35ea26d61fc1317cd4dfe Mon Sep 17 00:00:00 2001 From: Aybe Date: Tue, 21 Nov 2017 03:38:04 +0100 Subject: [aubio] bumping to 0.46 and using GitHub instead --- ports/aubio/CONTROL | 2 +- ports/aubio/portfile.cmake | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL index 8a6f114a7..635d2a9c9 100644 --- a/ports/aubio/CONTROL +++ b/ports/aubio/CONTROL @@ -1,4 +1,4 @@ Source: aubio -Version: 0.46~alpha-4 +Version: 0.46 Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis diff --git a/ports/aubio/portfile.cmake b/ports/aubio/portfile.cmake index 9421f2487..02b898246 100644 --- a/ports/aubio/portfile.cmake +++ b/ports/aubio/portfile.cmake @@ -1,11 +1,12 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aubio-3c230fae309e9ea3298783368dd71bae6172359a) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/aubio/aubio/archive/3c230fae309e9ea3298783368dd71bae6172359a.zip" - FILENAME "aubio-0.4.6-3c230f.zip" - SHA512 081fe59612f0b1860f465208739b1377869c64b91cecf4a6f6fbdea19204b801c650ff956b34be5988ef1905f3546d3c55846037487e0b34b014f1adbb68629c +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aubio/aubio + REF 0.4.6 + SHA512 9bb787d81f39ab8e3440be9936552a712a24e009884818e13e80dde756ad3874055bcd931ca3af638122f6a0d0bc53e62e1abeedce3fd79af35fe9ddea6bc707 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 786d53c002c044e9340e43070b393d69e14e78be Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 20 Nov 2017 19:15:47 -0800 Subject: Fix `vcpkg integrate install` for unicode usernames --- toolsrc/include/vcpkg/base/files.h | 1 + toolsrc/src/vcpkg/commands.integrate.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 63cf3c6fd..51a12ceba 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -15,6 +15,7 @@ namespace fs using stdfs::copy_options; using stdfs::file_status; using stdfs::path; + using stdfs::u8path; 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/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 31b9ec722..f13a999fa 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -139,7 +139,7 @@ namespace vcpkg::Commands::Integrate static fs::path get_appdata_targets_path() { static const fs::path LOCAL_APP_DATA = - fs::path(System::get_environment_variable("LOCALAPPDATA").value_or_exit(VCPKG_LINE_INFO)); + fs::u8path(System::get_environment_variable("LOCALAPPDATA").value_or_exit(VCPKG_LINE_INFO)); return LOCAL_APP_DATA / "vcpkg" / "vcpkg.user.targets"; } #endif -- cgit v1.2.3 From 72fdd294b05f7b29cc711757a819df2948c72d80 Mon Sep 17 00:00:00 2001 From: Aybe Date: Tue, 21 Nov 2017 04:39:13 +0100 Subject: [libsndfile] patches applied with #ifdef instead --- ports/libsndfile/portfile.cmake | 13 ++--- ports/libsndfile/uwp-createfile-getfilesize.patch | 58 +++++++++++++++++++++++ ports/libsndfile/uwp-createfile.patch | 39 --------------- ports/libsndfile/uwp-getfilesize.patch | 29 ------------ 4 files changed, 63 insertions(+), 76 deletions(-) create mode 100644 ports/libsndfile/uwp-createfile-getfilesize.patch delete mode 100644 ports/libsndfile/uwp-createfile.patch delete mode 100644 ports/libsndfile/uwp-getfilesize.patch diff --git a/ports/libsndfile/portfile.cmake b/ports/libsndfile/portfile.cmake index 304bc005b..503134ff2 100644 --- a/ports/libsndfile/portfile.cmake +++ b/ports/libsndfile/portfile.cmake @@ -19,14 +19,11 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsndfile-6830c421899e32f8d413a903a21a9b6cf384d369 - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile.patch" - "${CMAKE_CURRENT_LIST_DIR}/uwp-getfilesize.patch" - ) -endif() +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsndfile-6830c421899e32f8d413a903a21a9b6cf384d369 + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile-getfilesize.patch" +) if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") set(CRT_LIB_STATIC 0) diff --git a/ports/libsndfile/uwp-createfile-getfilesize.patch b/ports/libsndfile/uwp-createfile-getfilesize.patch new file mode 100644 index 000000000..0e60cde54 --- /dev/null +++ b/ports/libsndfile/uwp-createfile-getfilesize.patch @@ -0,0 +1,58 @@ +diff --git a/src/file_io.c b/src/file_io.c +index 7cf8f0c..47351bc 100644 +--- a/src/file_io.c ++++ b/src/file_io.c +@@ -787,6 +787,19 @@ psf_open_handle (PSF_FILE * pfile) + return NULL ; + } ; + ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++ if (!pfile->use_wchar) ++ return NULL; ++ ++ CREATEFILE2_EXTENDED_PARAMETERS cfParams = {0}; ++ cfParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); ++ cfParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; ++ ++ handle = CreateFile2(pfile->path.wc, dwDesiredAccess, dwShareMode, dwCreationDistribution, &cfParams); ++ ++ if (handle == INVALID_HANDLE_VALUE) ++ return NULL; ++#else + if (pfile->use_wchar) + handle = CreateFileW ( + pfile->path.wc, /* pointer to name of the file */ +@@ -812,6 +825,7 @@ psf_open_handle (PSF_FILE * pfile) + return NULL ; + + return handle ; ++#endif + } /* psf_open_handle */ + + /* USE_WINDOWS_API */ static void +@@ -1104,7 +1118,16 @@ psf_is_pipe (SF_PRIVATE *psf) + + /* USE_WINDOWS_API */ sf_count_t + psf_get_filelen_handle (HANDLE handle) +-{ sf_count_t filelen ; ++{ ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++ LARGE_INTEGER size; ++ ++ if (!GetFileSizeEx(handle, &size) && GetLastError() != NO_ERROR) ++ return (sf_count_t) -1 ; ++ ++ return size.QuadPart; ++#else ++ sf_count_t filelen ; + DWORD dwFileSizeLow, dwFileSizeHigh, dwError = NO_ERROR ; + + dwFileSizeLow = GetFileSize (handle, &dwFileSizeHigh) ; +@@ -1118,6 +1141,7 @@ psf_get_filelen_handle (HANDLE handle) + filelen = dwFileSizeLow + ((__int64) dwFileSizeHigh << 32) ; + + return filelen ; ++#endif + } /* psf_get_filelen_handle */ + + /* USE_WINDOWS_API */ void diff --git a/ports/libsndfile/uwp-createfile.patch b/ports/libsndfile/uwp-createfile.patch deleted file mode 100644 index d4b58a74f..000000000 --- a/ports/libsndfile/uwp-createfile.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/src/file_io.c b/src/file_io.c -index 7cf8f0c..a47ce6b 100644 ---- a/src/file_io.c -+++ b/src/file_io.c -@@ -787,26 +787,14 @@ psf_open_handle (PSF_FILE * pfile) - return NULL ; - } ; - -- if (pfile->use_wchar) -- handle = CreateFileW ( -- pfile->path.wc, /* pointer to name of the file */ -- dwDesiredAccess, /* access (read-write) mode */ -- dwShareMode, /* share mode */ -- 0, /* pointer to security attributes */ -- dwCreationDistribution, /* how to create */ -- FILE_ATTRIBUTE_NORMAL, /* file attributes (could use FILE_FLAG_SEQUENTIAL_SCAN) */ -- NULL /* handle to file with attributes to copy */ -- ) ; -- else -- handle = CreateFile ( -- pfile->path.c, /* pointer to name of the file */ -- dwDesiredAccess, /* access (read-write) mode */ -- dwShareMode, /* share mode */ -- 0, /* pointer to security attributes */ -- dwCreationDistribution, /* how to create */ -- FILE_ATTRIBUTE_NORMAL, /* file attributes (could use FILE_FLAG_SEQUENTIAL_SCAN) */ -- NULL /* handle to file with attributes to copy */ -- ) ; -+ if (!pfile->use_wchar) -+ return NULL; -+ -+ CREATEFILE2_EXTENDED_PARAMETERS cfParams = {0}; -+ cfParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); -+ cfParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; -+ -+ handle = CreateFile2(pfile->path.wc, dwDesiredAccess, dwShareMode, dwCreationDistribution, &cfParams); - - if (handle == INVALID_HANDLE_VALUE) - return NULL ; diff --git a/ports/libsndfile/uwp-getfilesize.patch b/ports/libsndfile/uwp-getfilesize.patch deleted file mode 100644 index 1ecbcda7f..000000000 --- a/ports/libsndfile/uwp-getfilesize.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/src/file_io.c b/src/file_io.c -index a47ce6b..4b38455 100644 ---- a/src/file_io.c -+++ b/src/file_io.c -@@ -1093,19 +1093,16 @@ psf_is_pipe (SF_PRIVATE *psf) - /* USE_WINDOWS_API */ sf_count_t - psf_get_filelen_handle (HANDLE handle) - { sf_count_t filelen ; -- DWORD dwFileSizeLow, dwFileSizeHigh, dwError = NO_ERROR ; -+ DWORD dwError = NO_ERROR ; -+ LARGE_INTEGER size; - -- dwFileSizeLow = GetFileSize (handle, &dwFileSizeHigh) ; -- -- if (dwFileSizeLow == 0xFFFFFFFF) -- dwError = GetLastError () ; -+ if (!GetFileSizeEx(handle, &size)) -+ dwError = GetLastError(); - - if (dwError != NO_ERROR) - return (sf_count_t) -1 ; - -- filelen = dwFileSizeLow + ((__int64) dwFileSizeHigh << 32) ; -- -- return filelen ; -+ return size.QuadPart; - } /* psf_get_filelen_handle */ - - /* USE_WINDOWS_API */ void -- cgit v1.2.3 From 38ae2f69b7f376614f6a4b9201a23fcaa228baf9 Mon Sep 17 00:00:00 2001 From: Aybe Date: Tue, 21 Nov 2017 05:46:58 +0100 Subject: [libflac] using #ifdef for patches instead --- ports/libflac/portfile.cmake | 16 ++++------ ports/libflac/uwp-consolewidth.patch | 16 ---------- ports/libflac/uwp-createfile.patch | 38 ----------------------- ports/libflac/uwp-createfile2.patch | 38 +++++++++++++++++++++++ ports/libflac/uwp-library-console.patch | 53 +++++++++++++++++++++++++++++++++ ports/libflac/uwp-loadlibrary.patch | 13 -------- ports/libflac/uwp-writeconsole.patch | 39 ------------------------ 7 files changed, 97 insertions(+), 116 deletions(-) delete mode 100644 ports/libflac/uwp-consolewidth.patch delete mode 100644 ports/libflac/uwp-createfile.patch create mode 100644 ports/libflac/uwp-createfile2.patch create mode 100644 ports/libflac/uwp-library-console.patch delete mode 100644 ports/libflac/uwp-loadlibrary.patch delete mode 100644 ports/libflac/uwp-writeconsole.patch diff --git a/ports/libflac/portfile.cmake b/ports/libflac/portfile.cmake index 7657e3927..236f51c8e 100644 --- a/ports/libflac/portfile.cmake +++ b/ports/libflac/portfile.cmake @@ -7,16 +7,12 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flac-1.3.2 - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/uwp-consolewidth.patch" - "${CMAKE_CURRENT_LIST_DIR}/uwp-loadlibrary.patch" - "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile.patch" - "${CMAKE_CURRENT_LIST_DIR}/uwp-writeconsole.patch" - ) -endif() +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flac-1.3.2 + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/uwp-library-console.patch" + "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile2.patch" +) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) vcpkg_find_acquire_program(NASM) diff --git a/ports/libflac/uwp-consolewidth.patch b/ports/libflac/uwp-consolewidth.patch deleted file mode 100644 index 87a15f663..000000000 --- a/ports/libflac/uwp-consolewidth.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c -index c61d27f..5b0e8f0 100644 ---- a/src/share/win_utf8_io/win_utf8_io.c -+++ b/src/share/win_utf8_io/win_utf8_io.c -@@ -164,11 +164,6 @@ size_t strlen_utf8(const char *str) - int win_get_console_width(void) - { - int width = 80; -- CONSOLE_SCREEN_BUFFER_INFO csbi; -- HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); -- if(hOut != INVALID_HANDLE_VALUE && hOut != NULL) -- if (GetConsoleScreenBufferInfo(hOut, &csbi) != 0) -- width = csbi.dwSize.X; - return width; - } - diff --git a/ports/libflac/uwp-createfile.patch b/ports/libflac/uwp-createfile.patch deleted file mode 100644 index 348e66b0a..000000000 --- a/ports/libflac/uwp-createfile.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/src/libFLAC/windows_unicode_filenames.c b/src/libFLAC/windows_unicode_filenames.c -index 2404e31..6d8bc74 100644 ---- a/src/libFLAC/windows_unicode_filenames.c -+++ b/src/libFLAC/windows_unicode_filenames.c -@@ -185,17 +185,23 @@ int flac_internal_rename_utf8(const char *oldname, const char *newname) - - HANDLE WINAPI flac_internal_CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) - { -- if (!utf8_filenames) { -- return CreateFileA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); -- } else { -- wchar_t *wname; -- HANDLE handle = INVALID_HANDLE_VALUE; -- -- if ((wname = wchar_from_utf8(lpFileName)) != NULL) { -- handle = CreateFileW(wname, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); -- free(wname); -- } -+ HANDLE handle = INVALID_HANDLE_VALUE; - -+ if (!utf8_filenames) - return handle; -+ -+ wchar_t *wname; -+ -+ if ((wname = wchar_from_utf8(lpFileName)) != NULL) -+ { -+ CREATEFILE2_EXTENDED_PARAMETERS cfParams = {0}; -+ cfParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); -+ cfParams.dwFileAttributes = dwFlagsAndAttributes & FILE_ATTRIBUTE_NORMAL; -+ cfParams.lpSecurityAttributes = lpSecurityAttributes; -+ cfParams.hTemplateFile = hTemplateFile; -+ handle = CreateFile2(wname, dwDesiredAccess, dwShareMode, dwCreationDisposition, &cfParams); -+ free(wname); - } -+ -+ return handle; - } diff --git a/ports/libflac/uwp-createfile2.patch b/ports/libflac/uwp-createfile2.patch new file mode 100644 index 000000000..cfb343990 --- /dev/null +++ b/ports/libflac/uwp-createfile2.patch @@ -0,0 +1,38 @@ +diff --git a/src/libFLAC/windows_unicode_filenames.c b/src/libFLAC/windows_unicode_filenames.c +index 2404e31..d320bf5 100644 +--- a/src/libFLAC/windows_unicode_filenames.c ++++ b/src/libFLAC/windows_unicode_filenames.c +@@ -185,6 +185,27 @@ int flac_internal_rename_utf8(const char *oldname, const char *newname) + + HANDLE WINAPI flac_internal_CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) + { ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++ HANDLE handle = INVALID_HANDLE_VALUE; ++ ++ if (!utf8_filenames) ++ return handle; ++ ++ wchar_t *wname; ++ ++ if ((wname = wchar_from_utf8(lpFileName)) != NULL) ++ { ++ CREATEFILE2_EXTENDED_PARAMETERS cfParams = {0}; ++ cfParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); ++ cfParams.dwFileAttributes = dwFlagsAndAttributes & FILE_ATTRIBUTE_NORMAL; ++ cfParams.lpSecurityAttributes = lpSecurityAttributes; ++ cfParams.hTemplateFile = hTemplateFile; ++ handle = CreateFile2(wname, dwDesiredAccess, dwShareMode, dwCreationDisposition, &cfParams); ++ free(wname); ++ } ++ ++ return handle; ++#else + if (!utf8_filenames) { + return CreateFileA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); + } else { +@@ -198,4 +219,5 @@ HANDLE WINAPI flac_internal_CreateFile_utf8(const char *lpFileName, DWORD dwDesi + + return handle; + } ++#endif + } diff --git a/ports/libflac/uwp-library-console.patch b/ports/libflac/uwp-library-console.patch new file mode 100644 index 000000000..bba2422c3 --- /dev/null +++ b/ports/libflac/uwp-library-console.patch @@ -0,0 +1,53 @@ +diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c +index c61d27f..0870054 100644 +--- a/src/share/win_utf8_io/win_utf8_io.c ++++ b/src/share/win_utf8_io/win_utf8_io.c +@@ -110,7 +110,11 @@ int get_utf8_argv(int *argc, char ***argv) + char **utf8argv; + int ret, i; + ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++ if ((handle = LoadPackagedLibrary("msvcrt.dll", 0)) == NULL) return 1; ++#else + if ((handle = LoadLibrary("msvcrt.dll")) == NULL) return 1; ++#endif + if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) { + FreeLibrary(handle); + return 1; +@@ -163,6 +167,9 @@ size_t strlen_utf8(const char *str) + /* get the console width in characters */ + int win_get_console_width(void) + { ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++ return 80; ++#else + int width = 80; + CONSOLE_SCREEN_BUFFER_INFO csbi; + HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); +@@ -170,6 +177,7 @@ int win_get_console_width(void) + if (GetConsoleScreenBufferInfo(hOut, &csbi) != 0) + width = csbi.dwSize.X; + return width; ++#endif + } + + /* print functions */ +@@ -179,6 +187,10 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len) + DWORD out; + int ret; + ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++ // disabled for UWP as there's no alternative: ++ // https://docs.microsoft.com/en-us/uwp/win32-and-com/alternatives-to-windows-apis-uwp ++#else + do { + if (stream == stdout) { + HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); +@@ -197,6 +209,7 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len) + return out; + } + } while(0); ++#endif + + ret = fputws(text, stream); + if (ret < 0) diff --git a/ports/libflac/uwp-loadlibrary.patch b/ports/libflac/uwp-loadlibrary.patch deleted file mode 100644 index 5d0b10df9..000000000 --- a/ports/libflac/uwp-loadlibrary.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c -index 5b0e8f0..15a76d4 100644 ---- a/src/share/win_utf8_io/win_utf8_io.c -+++ b/src/share/win_utf8_io/win_utf8_io.c -@@ -110,7 +110,7 @@ int get_utf8_argv(int *argc, char ***argv) - char **utf8argv; - int ret, i; - -- if ((handle = LoadLibrary("msvcrt.dll")) == NULL) return 1; -+ if ((handle = LoadPackagedLibrary("msvcrt.dll", 0)) == NULL) return 1; - if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) { - FreeLibrary(handle); - return 1; diff --git a/ports/libflac/uwp-writeconsole.patch b/ports/libflac/uwp-writeconsole.patch deleted file mode 100644 index feef96305..000000000 --- a/ports/libflac/uwp-writeconsole.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c -index 15a76d4..bfcc9db 100644 ---- a/src/share/win_utf8_io/win_utf8_io.c -+++ b/src/share/win_utf8_io/win_utf8_io.c -@@ -171,31 +171,13 @@ int win_get_console_width(void) - - static int wprint_console(FILE *stream, const wchar_t *text, size_t len) - { -- DWORD out; -- int ret; -+ // disabled for UWP (https://docs.microsoft.com/en-us/uwp/win32-and-com/alternatives-to-windows-apis-uwp) - -- do { -- if (stream == stdout) { -- HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); -- if (hOut == INVALID_HANDLE_VALUE || hOut == NULL || GetFileType(hOut) != FILE_TYPE_CHAR) -- break; -- if (WriteConsoleW(hOut, text, len, &out, NULL) == 0) -- return -1; -- return out; -- } -- if (stream == stderr) { -- HANDLE hErr = GetStdHandle(STD_ERROR_HANDLE); -- if (hErr == INVALID_HANDLE_VALUE || hErr == NULL || GetFileType(hErr) != FILE_TYPE_CHAR) -- break; -- if (WriteConsoleW(hErr, text, len, &out, NULL) == 0) -- return -1; -- return out; -- } -- } while(0); -+ int ret = fputws(text, stream); - -- ret = fputws(text, stream); - if (ret < 0) - return ret; -+ - return len; - } - -- cgit v1.2.3 From 395829c5450f0f964cbfc08e1aac5b4559729aed Mon Sep 17 00:00:00 2001 From: Aybe Date: Tue, 21 Nov 2017 06:54:11 +0100 Subject: [libsndfile] fixed missing return ! --- ports/libsndfile/portfile.cmake | 1 + ports/libsndfile/uwp-createfile-getfilesize-addendum.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 ports/libsndfile/uwp-createfile-getfilesize-addendum.patch diff --git a/ports/libsndfile/portfile.cmake b/ports/libsndfile/portfile.cmake index 503134ff2..daa7de3ae 100644 --- a/ports/libsndfile/portfile.cmake +++ b/ports/libsndfile/portfile.cmake @@ -23,6 +23,7 @@ vcpkg_apply_patches( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsndfile-6830c421899e32f8d413a903a21a9b6cf384d369 PATCHES "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile-getfilesize.patch" + "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile-getfilesize-addendum.patch" ) if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") diff --git a/ports/libsndfile/uwp-createfile-getfilesize-addendum.patch b/ports/libsndfile/uwp-createfile-getfilesize-addendum.patch new file mode 100644 index 000000000..62e6b1131 --- /dev/null +++ b/ports/libsndfile/uwp-createfile-getfilesize-addendum.patch @@ -0,0 +1,13 @@ +diff --git a/src/file_io.c b/src/file_io.c +index 47351bc..54741c9 100644 +--- a/src/file_io.c ++++ b/src/file_io.c +@@ -799,6 +799,8 @@ psf_open_handle (PSF_FILE * pfile) + + if (handle == INVALID_HANDLE_VALUE) + return NULL; ++ ++ return handle; + #else + if (pfile->use_wchar) + handle = CreateFileW ( -- cgit v1.2.3 From 7c6fb6081b461a8d546a76ea38bd3f0300111458 Mon Sep 17 00:00:00 2001 From: kypp Date: Tue, 21 Nov 2017 18:55:55 +0100 Subject: new port: openvdb --- ports/openvdb/AddLinkageAndToolsChoice.patch | 225 ++++++++++++++++++++++++++ ports/openvdb/CONTROL | 8 + ports/openvdb/UseGLEWOnWindowsForViewer.patch | 60 +++++++ ports/openvdb/portfile.cmake | 118 ++++++++++++++ 4 files changed, 411 insertions(+) create mode 100644 ports/openvdb/AddLinkageAndToolsChoice.patch create mode 100644 ports/openvdb/CONTROL create mode 100644 ports/openvdb/UseGLEWOnWindowsForViewer.patch create mode 100644 ports/openvdb/portfile.cmake diff --git a/ports/openvdb/AddLinkageAndToolsChoice.patch b/ports/openvdb/AddLinkageAndToolsChoice.patch new file mode 100644 index 000000000..3d155cbe4 --- /dev/null +++ b/ports/openvdb/AddLinkageAndToolsChoice.patch @@ -0,0 +1,225 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 712fb1d..440a63a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,6 +32,9 @@ PROJECT ( OpenVDB ) + + ENABLE_TESTING() + ++OPTION ( OPENVDB_BUILD_TOOLS "Build OpenVDB utilities" ON ) ++OPTION ( OPENVDB_STATIC "Build statically linked library" ON ) ++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/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt +index 5703eb9..6ff3c6a 100644 +--- a/openvdb/CMakeLists.txt ++++ b/openvdb/CMakeLists.txt +@@ -26,6 +26,7 @@ + # + PROJECT ( OpenVDBCore ) + ++IF ( OPENVDB_BUILD_TOOLS ) + IF ( USE_GLFW3 ) + FIND_PACKAGE ( GLFW3 REQUIRED ) + SET ( OPENVDB_USE_GLFW_FLAG "-DOPENVDB_USE_GLFW_3" ) +@@ -42,9 +43,12 @@ ELSE () + SET ( GLFW_LINK_LIBRARY ${GLFW_glfw_LIBRARY} ) + SET ( GLFW_INCLUDE_DIRECTORY ${GLFW_INCLUDE_DIR} CACHE STRING "GLFW include directory") + ENDIF () ++ENDIF ( OPENVDB_BUILD_TOOLS ) + + IF (WIN32) ++ IF ( OPENVDB_BUILD_TOOLS ) + FIND_PACKAGE ( GLEW REQUIRED ) ++ ENDIF ( OPENVDB_BUILD_TOOLS ) + ELSE () + FIND_PACKAGE ( Threads REQUIRED ) + ENDIF() +@@ -75,7 +79,7 @@ SET ( OPENVDB_PATCH_VERSION_NUMBER ${_openvdb_patch_version_number} CACHE STRING + # MESSAGE ( "OPENVDB_MINOR_VERSION_NUMBER = ${OPENVDB_MINOR_VERSION_NUMBER}" ) + # MESSAGE ( "OPENVDB_PATCH_VERSION_NUMBER = ${OPENVDB_PATCH_VERSION_NUMBER}" ) + +-FIND_PACKAGE ( Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS iostreams system thread ${OPENVDB_BOOST_PYTHON_LIBRARY_COMPONENT_NAME} ) ++FIND_PACKAGE ( Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS iostreams system thread date_time ${OPENVDB_BOOST_PYTHON_LIBRARY_COMPONENT_NAME} ) + IF (WIN32 AND OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING) + ADD_DEFINITIONS ( -DBOOST_ALL_NO_LIB ) + ENDIF () +@@ -85,7 +89,9 @@ FIND_PACKAGE ( TBB REQUIRED ) + FIND_PACKAGE ( ZLIB REQUIRED ) + FIND_PACKAGE ( ILMBase REQUIRED ) + FIND_PACKAGE ( OpenEXR REQUIRED ) ++IF ( OPENVDB_BUILD_TOOLS ) + FIND_PACKAGE ( OpenGL REQUIRED ) ++ENDIF () + IF (OPENVDB_BUILD_DOCS) + FIND_PACKAGE ( Doxygen REQUIRED ) + ENDIF () +@@ -127,7 +133,10 @@ 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_WIN32 -DNOMINMAX ) ++ IF ( OPENVDB_SHARED ) ++ ADD_DEFINITIONS ( -DOPENVDB_DLL ) ++ ENDIF () + ELSE () + ADD_DEFINITIONS ( -pthread -fPIC ) + ENDIF () +@@ -167,16 +176,20 @@ 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} +@@ -185,6 +198,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} +@@ -193,7 +208,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 +@@ -203,7 +220,9 @@ ELSE() + PROPERTIES OUTPUT_NAME openvdb + ) + ENDIF() ++ENDIF () + ++IF ( OPENVDB_SHARED ) + SET_TARGET_PROPERTIES( + openvdb_shared + PROPERTIES +@@ -211,13 +230,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} + ) +@@ -231,7 +252,7 @@ TARGET_LINK_LIBRARIES ( vdb_print + 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} +@@ -256,26 +277,26 @@ 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" + ) +-IF (NOT WIN32) + ADD_EXECUTABLE ( vdb_view + ${VDB_VIEW_SOURCE_FILES} + ) + + TARGET_LINK_LIBRARIES ( vdb_view + openvdb_shared +- ${Boost_THREAD_LIBRARY} ++ ${Boost_LIBRARIES} + ${OPENGL_gl_LIBRARY} + ${OPENGL_glu_LIBRARY} +- ${COCOA_LIBRARY} +- ${IOKIT_LIBRARY} +- ${COREVIDEO_LIBRARY} ++ #${COCOA_LIBRARY} ++ #${IOKIT_LIBRARY} ++ #${COREVIDEO_LIBRARY} + ${GLFW_LINK_LIBRARY} + ${GLFW_DEPENDENT_LIBRARIES} + ${GLEW_GLEW_LIBRARY} + ) +-ENDIF () ++ ++ENDIF ( OPENVDB_BUILD_TOOLS ) + + SET ( UNITTEST_SOURCE_FILES + unittest/main.cc +@@ -405,27 +426,32 @@ IF (OPENVDB_BUILD_DOCS) + + ENDIF () + ++IF ( OPENVDB_BUILD_TOOLS ) + # Installation +-IF ( NOT WIN32 ) ++#IF ( NOT WIN32 ) + INSTALL ( TARGETS + vdb_view + DESTINATION + bin + ) +-ENDIF () ++#ENDIF () + INSTALL ( TARGETS + vdb_print + vdb_render + DESTINATION + bin + ) ++ENDIF ( OPENVDB_BUILD_TOOLS ) + ++IF ( OPENVDB_STATIC) + INSTALL ( TARGETS + openvdb_static + DESTINATION + lib + ) ++ENDIF () + ++IF ( OPENVDB_SHARED ) + IF (WIN32) + INSTALL ( TARGETS + openvdb_shared +@@ -439,6 +465,7 @@ ELSE() + lib + ) + ENDIF () ++ENDIF ( OPENVDB_SHARED ) + + INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR} DESTINATION include + FILES_MATCHING PATTERN "*.h" diff --git a/ports/openvdb/CONTROL b/ports/openvdb/CONTROL new file mode 100644 index 000000000..cfcbfac6f --- /dev/null +++ b/ports/openvdb/CONTROL @@ -0,0 +1,8 @@ +Source: openvdb +Version: 5.0.0 +Build-Depends: boost, ilmbase, openexr, tbb, blosc +Description: Sparse volume data structure and tools + +Feature: tools +Description: OpenVDB utilities: view, print and render +Build-Depends: glew, glfw3 \ No newline at end of file diff --git a/ports/openvdb/UseGLEWOnWindowsForViewer.patch b/ports/openvdb/UseGLEWOnWindowsForViewer.patch new file mode 100644 index 000000000..bfa29c46c --- /dev/null +++ b/ports/openvdb/UseGLEWOnWindowsForViewer.patch @@ -0,0 +1,60 @@ +diff --git a/openvdb/viewer/ClipBox.h b/openvdb/viewer/ClipBox.h +index b792491..d2f50cc 100644 +--- a/openvdb/viewer/ClipBox.h ++++ b/openvdb/viewer/ClipBox.h +@@ -36,6 +36,8 @@ + #if defined(__APPLE__) || defined(MACOSX) + #include + #include ++#elif defined(WIN32) ++#include + #else + #include + #include +diff --git a/openvdb/viewer/Font.h b/openvdb/viewer/Font.h +index 6e79704..566cfbd 100644 +--- a/openvdb/viewer/Font.h ++++ b/openvdb/viewer/Font.h +@@ -36,6 +36,8 @@ + #if defined(__APPLE__) || defined(MACOSX) + #include + #include ++#elif defined(WIN32) ++#include + #else + #include + #include +diff --git a/openvdb/viewer/RenderModules.h b/openvdb/viewer/RenderModules.h +index f4745d9..339dfc3 100644 +--- a/openvdb/viewer/RenderModules.h ++++ b/openvdb/viewer/RenderModules.h +@@ -43,6 +43,8 @@ + #if defined(__APPLE__) || defined(MACOSX) + #include + #include ++#elif defined(WIN32) ++#include + #else + #include + #include +diff --git a/openvdb/viewer/Viewer.cc b/openvdb/viewer/Viewer.cc +index 307aa2b..8b79358 100644 +--- a/openvdb/viewer/Viewer.cc ++++ b/openvdb/viewer/Viewer.cc +@@ -540,7 +540,15 @@ ViewerImpl::open(int width, int height) + std::shared_ptr curWindow( + glfwGetCurrentContext(), glfwMakeContextCurrent); + glfwMakeContextCurrent(mWindow); +- BitmapFont13::initialize(); ++ BitmapFont13::initialize(); ++#ifdef WIN32 ++ if (glewInit() == GLEW_OK) { ++ OPENVDB_LOG_DEBUG_RUNTIME("initialized GLEW from thread " ++ << boost::this_thread::get_id()); ++ } else { ++ OPENVDB_LOG_ERROR("GLEW initialization failed"); ++ } ++#endif + } + } + mCamera->setWindow(mWindow); diff --git a/ports/openvdb/portfile.cmake b/ports/openvdb/portfile.cmake new file mode 100644 index 000000000..a21e82240 --- /dev/null +++ b/ports/openvdb/portfile.cmake @@ -0,0 +1,118 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dreamworksanimation/openvdb + REF v5.0.0 + SHA512 8916d54683d81144114e57f8332be43b7547e6da5d194f6147bcefd4ee9e8e7ec817f27b65adb129dfd149e6b308f4bab30591ee953ee2c319636491bf051a2b + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/UseGLEWOnWindowsForViewer.patch + ${CMAKE_CURRENT_LIST_DIR}/AddLinkageAndToolsChoice.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(OPENVDB_STATIC ON) + set(OPENVDB_SHARED OFF) +else() + set(OPENVDB_STATIC OFF) + set(OPENVDB_SHARED ON) +endif() + +if ("tools" IN_LIST FEATURES) + set(OPENVDB_BUILD_TOOLS ON) + set(OPENVDB_SHARED ON) # tools require shared version of the library +else() + set(OPENVDB_BUILD_TOOLS OFF) +endif() + +file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}" INSTALL_LOCATION) + +file(TO_NATIVE_PATH "${INSTALL_LOCATION}/include" INCLUDE_LOCATION) +file(TO_NATIVE_PATH "${INSTALL_LOCATION}/lib/" LIB_LOCATION) +file(TO_NATIVE_PATH "${INSTALL_LOCATION}/debug/lib/" LIB_LOCATION_DEBUG) + +file(TO_NATIVE_PATH "${LIB_LOCATION}/zlib.lib" ZLIB_LIBRARY) +file(TO_NATIVE_PATH "${LIB_LOCATION}/tbb.lib" Tbb_TBB_LIBRARY) +file(TO_NATIVE_PATH "${LIB_LOCATION}/tbbmalloc.lib" Tbb_TBBMALLOC_LIBRARY) +file(TO_NATIVE_PATH "${LIB_LOCATION_DEBUG}/tbb_debug.lib" Tbb_TBB_LIBRARY_DEBUG) +file(TO_NATIVE_PATH "${LIB_LOCATION_DEBUG}/tbbmalloc_debug.lib" Tbb_TBBMALLOC_LIBRARY_DEBUG) + +file(TO_NATIVE_PATH "${LIB_LOCATION}/Half.lib" Ilmbase_HALF_LIBRARY) +file(TO_NATIVE_PATH "${LIB_LOCATION}/Iex-2_2.lib" Ilmbase_IEX_LIBRARY) +file(TO_NATIVE_PATH "${LIB_LOCATION}/IlmThread-2_2.lib" Ilmbase_ILMTHREAD_LIBRARY) + +if (OPENVDB_STATIC) + file(TO_NATIVE_PATH "${LIB_LOCATION}/glfw3.lib" GLFW3_LIBRARY) +else() + file(TO_NATIVE_PATH "${LIB_LOCATION}/glfw3dll.lib" GLFW3_LIBRARY) +endif() + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DOPENVDB_BUILD_UNITTESTS=OFF + -DOPENVDB_BUILD_PYTHON_MODULE=OFF + -DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF + -DUSE_GLFW3=ON + -DGLFW3_USE_STATIC_LIBS=${OPENVDB_STATIC} + -DBlosc_USE_STATIC_LIBS=${OPENVDB_STATIC} + -DOpenexr_USE_STATIC_LIBS=${OPENVDB_STATIC} + -DIlmbase_USE_STATIC_LIBS=${OPENVDB_STATIC} + -DGLFW3_glfw_LIBRARY=${GLFW3_LIBRARY} + + -DIlmbase_HALF_LIBRARY=${Ilmbase_HALF_LIBRARY} + -DIlmbase_IEX_LIBRARY=${Ilmbase_IEX_LIBRARY} + -DIlmbase_ILMTHREAD_LIBRARY=${Ilmbase_ILMTHREAD_LIBRARY} + + -DOPENVDB_STATIC=${OPENVDB_STATIC} + -DOPENVDB_SHARED=${OPENVDB_SHARED} + -DOPENVDB_BUILD_TOOLS=${OPENVDB_BUILD_TOOLS} + + -DZLIB_INCLUDE_DIR=${INCLUDE_LOCATION} + -DTBB_INCLUDE_DIR=${INCLUDE_LOCATION} + -DZLIB_LIBRARY=${ZLIB_LIBRARY} + + -DGLFW3_LOCATION=${INSTALL_LOCATION} + -DGLEW_LOCATION=${INSTALL_LOCATION} + -DILMBASE_LOCATION=${INSTALL_LOCATION} + -DOPENEXR_LOCATION=${INSTALL_LOCATION} + -DTBB_LOCATION=${INSTALL_LOCATION} + -DBLOSC_LOCATION=${INSTALL_LOCATION} + OPTIONS_RELEASE + -DTBB_LIBRARY_PATH=${LIB_LOCATION} + -DTbb_TBB_LIBRARY=${Tbb_TBB_LIBRARY} + -DTbb_TBBMALLOC_LIBRARY=${Tbb_TBBMALLOC_LIBRARY} + OPTIONS_DEBUG + -DTBB_LIBRARY_PATH=${LIB_LOCATION_DEBUG} + -DTbb_TBB_LIBRARY=${Tbb_TBB_LIBRARY_DEBUG} + -DTbb_TBBMALLOC_LIBRARY=${Tbb_TBBMALLOC_LIBRARY_DEBUG} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +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) + 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) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/openvdb/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/openvdb RENAME copyright) -- cgit v1.2.3 From 958c5e927638cca35bac2c487a281a698af46193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Tue, 21 Nov 2017 13:28:32 +0100 Subject: [libzip] Update libzip to 1.3.2 --- ports/libzip/portfile.cmake | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake index fccb6cdf2..bcde856e2 100644 --- a/ports/libzip/portfile.cmake +++ b/ports/libzip/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libzip-1.2.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libzip-1.3.2) vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://nih.at/libzip/libzip-1.2.0.tar.gz" - FILENAME "libzip-1.2.0.tar.gz" - SHA512 b71642a80f8e2573c9082d513018bfd2d1d155663ac83fdf7ec969a08d5230fcbc76f2cf89c26ff1d1288e9f407ba9fa234604d813ed3bab816ca1670f7a53f3 + URLS "https://nih.at/libzip/libzip-1.3.2.tar.gz" + FILENAME "libzip-1.3.2.tar.gz" + SHA512 75b7e6f541be30e721275723f264c20f9a3be5335d954b5909acdddb0f6dd9b2420166904c9b88206692a57a4aa54e4fe8ed4d62c1f4b900aebf6ad40f767376 ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) @@ -27,11 +27,6 @@ endif() vcpkg_install_cmake() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/zipstatic.lib ${CURRENT_PACKAGES_DIR}/lib/zip.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/zipstatic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zip.lib) -endif() - # Move zipconf.h to include and remove include directories from lib file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libzip/include/zipconf.h ${CURRENT_PACKAGES_DIR}/include/zipconf.h) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libzip ${CURRENT_PACKAGES_DIR}/debug/lib/libzip) -- cgit v1.2.3 From 0b3a91a01d60349664ba81013c33e35709e82ae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Tue, 21 Nov 2017 13:40:07 +0100 Subject: [libzip] update patches --- ports/libzip/enable-static.patch | 72 ++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 47 deletions(-) diff --git a/ports/libzip/enable-static.patch b/ports/libzip/enable-static.patch index d95b90f3d..61c93b435 100644 --- a/ports/libzip/enable-static.patch +++ b/ports/libzip/enable-static.patch @@ -1,19 +1,25 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index d443757..303dfe2 100644 +index deceb65..1283013 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -102,14 +102,20 @@ IF(MSVC) - ADD_DEFINITIONS("-D_CRT_SECURE_NO_WARNINGS") +@@ -113,6 +113,15 @@ ADD_DEFINITIONS("-D_CRT_SECURE_NO_WARNINGS") + ADD_DEFINITIONS("-D_CRT_NONSTDC_NO_DEPRECATE") ENDIF(MSVC) +OPTION(ENABLE_STATIC "Enable static builds" OFF) +IF(ENABLE_STATIC) ++ set(BUILD_SHARED_LIBS OFF) + set(ZIP_EXTERN_OVERRIDE ON) + set(ZIP_EXTERN ON) ++ELSE(ENABLE_STATIC) ++ set(BUILD_SHARED_LIBS ON) +ENDIF(ENABLE_STATIC) + ADD_DEFINITIONS("-DHAVE_CONFIG_H") + # rpath handling: use rpath in installed binaries +@@ -121,10 +130,10 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + # Targets ADD_SUBDIRECTORY(lib) -ADD_SUBDIRECTORY(man) @@ -25,10 +31,23 @@ index d443757..303dfe2 100644 +# ADD_SUBDIRECTORY(regress) +# ADD_SUBDIRECTORY(examples) - # TODO: pkgconfig file + # pkgconfig file + SET(prefix ${CMAKE_INSTALL_PREFIX}) +diff --git a/cmake-config.h.in b/cmake-config.h.in +index 0d1839c..dd450ff 100644 +--- a/cmake-config.h.in ++++ b/cmake-config.h.in +@@ -60,7 +60,7 @@ + #cmakedefine WORDS_BIGENDIAN + /* END DEFINES */ + #define PACKAGE "@PACKAGE@" +-#define VERSION "@VERSION@" ++#define LIBZIP_VERSION "@VERSION@" + #ifndef HAVE_SSIZE_T_LIBZIP + # if SIZE_T_LIBZIP == INT_LIBZIP diff --git a/cmake-zipconf.h.in b/cmake-zipconf.h.in -index 17edc6c..ac9c394 100644 +index 6a276f6..410c898 100644 --- a/cmake-zipconf.h.in +++ b/cmake-zipconf.h.in @@ -118,4 +118,10 @@ typedef unsigned long long zip_uint64_t; @@ -42,49 +61,8 @@ index 17edc6c..ac9c394 100644 +#endif + #endif /* zipconf.h */ -diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index 1596f30..eb55fc0 100644 ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -191,19 +191,20 @@ IF(NOT HAVE_MKSTEMP) - SET(LIBZIP_EXTRA_FILES mkstemp.c) - ENDIF(NOT HAVE_MKSTEMP) - --ADD_LIBRARY(zip SHARED ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPSYS_FILES}) --SET_TARGET_PROPERTIES(zip PROPERTIES VERSION 3.0 SOVERSION 3 ) --TARGET_LINK_LIBRARIES(zip ${ZLIB_LIBRARY}) --INSTALL(TARGETS zip -- RUNTIME DESTINATION bin -- ARCHIVE DESTINATION lib -- LIBRARY DESTINATION lib) --#CREATE_LIBTOOL_FILE(zip lib) -- --#ADD_LIBRARY(zipstatic STATIC ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPSYS_FILES}) --#SET_TARGET_PROPERTIES(zipstatic PROPERTIES VERSION 3.0 SOVERSION 3 ) --#TARGET_LINK_LIBRARIES(zipstatic ${ZLIB_LIBRARY}) --#INSTALL(TARGETS zipstatic --# RUNTIME DESTINATION bin --# ARCHIVE DESTINATION lib --# LIBRARY DESTINATION lib) -+IF(ENABLE_STATIC) -+ ADD_LIBRARY(zipstatic STATIC ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPSYS_FILES}) -+ SET_TARGET_PROPERTIES(zipstatic PROPERTIES VERSION 3.0 SOVERSION 3 ) -+ TARGET_LINK_LIBRARIES(zipstatic ${ZLIB_LIBRARY}) -+ INSTALL(TARGETS zipstatic -+ RUNTIME DESTINATION bin -+ ARCHIVE DESTINATION lib -+ LIBRARY DESTINATION lib) -+ELSE(ENABLE_STATIC) -+ ADD_LIBRARY(zip SHARED ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPSYS_FILES}) -+ SET_TARGET_PROPERTIES(zip PROPERTIES VERSION 3.0 SOVERSION 3 ) -+ TARGET_LINK_LIBRARIES(zip ${ZLIB_LIBRARY}) -+ INSTALL(TARGETS zip -+ RUNTIME DESTINATION bin -+ ARCHIVE DESTINATION lib -+ LIBRARY DESTINATION lib) -+ENDIF(ENABLE_STATIC) diff --git a/lib/compat.h b/lib/compat.h -index 4c9e3a0..d667fe3 100644 +index 625c84e..8943587 100644 --- a/lib/compat.h +++ b/lib/compat.h @@ -42,7 +42,9 @@ -- cgit v1.2.3 From 2ebc3938ea659f804a99603118208e68c7a61965 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 21 Nov 2017 17:18:12 -0800 Subject: [alembic] fix string replace eats semicolon problem --- ports/alembic/CONTROL | 2 +- ports/alembic/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index b2246c9c0..e9632f98e 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.4 +Version: 1.7.4-1 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. http://alembic.io/ diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index 3c1242010..03d3e8dc3 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -44,12 +44,12 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Alembic.dll ${CURRENT_PACKAGES_DIR file(READ ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-debug.cmake DEBUG_CONFIG) string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/Alembic.dll" - "\${_IMPORT_PREFIX}/debug/bin/Alembic.dll" DEBUG_CONFIG ${DEBUG_CONFIG}) + "\${_IMPORT_PREFIX}/debug/bin/Alembic.dll" DEBUG_CONFIG "${DEBUG_CONFIG}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-debug.cmake "${DEBUG_CONFIG}") file(READ ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-release.cmake RELEASE_CONFIG) string(REPLACE "\${_IMPORT_PREFIX}/lib/Alembic.dll" - "\${_IMPORT_PREFIX}/bin/Alembic.dll" RELEASE_CONFIG ${RELEASE_CONFIG}) + "\${_IMPORT_PREFIX}/bin/Alembic.dll" RELEASE_CONFIG "${RELEASE_CONFIG}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-release.cmake "${RELEASE_CONFIG}") # Put the license file where vcpkg expects it -- cgit v1.2.3 From 480f50a7b0e050885fa79eb6c2ffc85e0a4e7649 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 21 Nov 2017 19:58:38 -0800 Subject: [vcpkg] Improve cmake targets output --- toolsrc/src/vcpkg/install.cpp | 51 +++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index f48b04d68..249e36e0f 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -579,15 +579,17 @@ namespace vcpkg::Install auto files = fs.read_lines(paths.listfile_path(bpgh)); if (auto p_lines = files.get()) { + std::map> library_targets; + for (auto&& suffix : *p_lines) { - if (Strings::case_insensitive_ascii_find(suffix, "/share/") != suffix.end()) + if (Strings::case_insensitive_ascii_find(suffix, "/share/") != suffix.end() && + suffix.substr(suffix.size() - 6) == ".cmake") { - std::vector library_targets; - // File is inside the share folder auto path = paths.installed / suffix; auto maybe_contents = fs.read_contents(path); + auto find_package_name = path.parent_path().filename().u8string(); if (auto p_contents = maybe_contents.get()) { std::sregex_iterator next(p_contents->begin(), p_contents->end(), cmake_library_regex); @@ -596,37 +598,40 @@ namespace vcpkg::Install while (next != last) { auto match = *next; - library_targets.push_back(match[1]); + library_targets[find_package_name].push_back(match[1]); ++next; } } + } + } - if (library_targets.empty()) - { - } - else if (library_targets.size() <= 4) + if (library_targets.empty()) + { + } + else + { + System::println("The package %s provides CMake targets:\n", bpgh.spec); + + for (auto&& library_target_pair : library_targets) + { + if (library_target_pair.second.size() <= 4) { - System::println("The package %s provides CMake targets:\n" - "\n" - " find_package(%s REQUIRED)\n" + System::println(" find_package(%s REQUIRED)\n" " target_link_libraries(main PRIVATE %s)\n", - bpgh.spec, - path.parent_path().filename().u8string(), - Strings::join(" ", library_targets)); + library_target_pair.first, + Strings::join(" ", library_target_pair.second)); } else { - auto omitted = library_targets.size() - 4; - library_targets.erase(library_targets.begin() + 4, library_targets.end()); - System::println("The package %s provides CMake targets:\n" - "\n" - " find_package(%s REQUIRED)\n" + auto omitted = library_target_pair.second.size() - 4; + library_target_pair.second.erase(library_target_pair.second.begin() + 4, + library_target_pair.second.end()); + System::println(" find_package(%s REQUIRED)\n" " # Note: %d targets were omitted\n" " target_link_libraries(main PRIVATE %s)\n", - bpgh.spec, - path.parent_path().filename().u8string(), + library_target_pair.first, omitted, - Strings::join(" ", library_targets)); + Strings::join(" ", library_target_pair.second)); } } } @@ -730,8 +735,6 @@ namespace vcpkg::Install summary.print(); } - auto& fs = paths.get_filesystem(); - for (auto&& result : summary.results) { if (!result.action) continue; -- cgit v1.2.3 From f86e4b2a6a831ddc0f6a8e50853386eea16654d2 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Wed, 22 Nov 2017 13:27:19 +0900 Subject: Add Halide Add Halide. --- ports/halide/CONTROL | 3 ++ ports/halide/portfile.cmake | 81 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 ports/halide/CONTROL create mode 100644 ports/halide/portfile.cmake diff --git a/ports/halide/CONTROL b/ports/halide/CONTROL new file mode 100644 index 000000000..2866357e3 --- /dev/null +++ b/ports/halide/CONTROL @@ -0,0 +1,3 @@ +Source: halide +Version: release_2017_10_30 +Description: Halide is a programming language designed to make it easier to write high-performance image processing code on modern machines. diff --git a/ports/halide/portfile.cmake b/ports/halide/portfile.cmake new file mode 100644 index 000000000..d27985ba0 --- /dev/null +++ b/ports/halide/portfile.cmake @@ -0,0 +1,81 @@ +include(vcpkg_common_functions) + +if(${VCPKG_LIBRARY_LINKAGE} STREQUAL static) + message(STATUS "Warning: Static building not supported yet. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) + set(TARGET_ARCHITECTURE 32) + set(FILE_HASH 99e9f05629213f99ba0b2ae088e2356842841604346a2871b05bf933a2a4712528ad1a38861f54478c16b99686ce615f97254b00c09b92b540c7afa1b0b0bb8f) +elseif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x64) + set(TARGET_ARCHITECTURE 64) + set(FILE_HASH aa699684321e779898ff09dc02163347dce355fa5d47fe673191e2323e28cc5b6554dfd51f39cc9c231ba8b07927f36e99b8489e4f7eb871ebaf6e377fc33cfc) +else() + message(FATAL_ERROR "Error: halide does not support the ARM architecture.") +endif() + +set(COMMIT_HASH 3af238615667312dcb46607752e3ae5d0ec5d713) +set(RELEASE_DATE 2017_10_30) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/halide-win-${TARGET_ARCHITECTURE}-distro-trunk-${COMMIT_HASH}) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/halide/Halide/releases/download/release_${RELEASE_DATE}/halide-win-${TARGET_ARCHITECTURE}-distro-trunk-${COMMIT_HASH}.zip" + FILENAME "halide-win-${TARGET_ARCHITECTURE}-distro-trunk-${COMMIT_HASH}.zip" + SHA512 ${FILE_HASH} +) +vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}) +set(SOURCE_PATH ${SOURCE_PATH}/halide) + +file( + INSTALL + "${SOURCE_PATH}/include/Halide.h" + "${SOURCE_PATH}/include/HalideBuffer.h" + "${SOURCE_PATH}/include/HalideRuntime.h" + "${SOURCE_PATH}/include/HalideRuntimeCuda.h" + "${SOURCE_PATH}/include/HalideRuntimeHexagonHost.h" + "${SOURCE_PATH}/include/HalideRuntimeMetal.h" + "${SOURCE_PATH}/include/HalideRuntimeOpenCL.h" + "${SOURCE_PATH}/include/HalideRuntimeOpenGL.h" + "${SOURCE_PATH}/include/HalideRuntimeOpenGLCompute.h" + "${SOURCE_PATH}/include/HalideRuntimeQurt.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include +) + +file( + INSTALL + "${SOURCE_PATH}/tools/halide_image_io.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include +) + +file( + INSTALL + "${SOURCE_PATH}/Release/Halide.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib +) + +file( + INSTALL + "${SOURCE_PATH}/Debug/Halide.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/lib +) + +file( + INSTALL + "${SOURCE_PATH}/Release/Halide.dll" + DESTINATION + ${CURRENT_PACKAGES_DIR}/bin +) + +file( + INSTALL + "${SOURCE_PATH}/Debug/Halide.dll" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/bin +) + +file(DOWNLOAD https://raw.githubusercontent.com/halide/Halide/release_${RELEASE_DATE}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/halide/copyright) -- cgit v1.2.3 From 18eeee6a2c2436b48530f3f778435ad4d00371bb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 21 Nov 2017 21:05:13 -0800 Subject: [libssh2] Enable cmake config targets --- ports/libssh2/CONTROL | 2 +- ports/libssh2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libssh2/CONTROL b/ports/libssh2/CONTROL index 5c68d2693..d050bf838 100644 --- a/ports/libssh2/CONTROL +++ b/ports/libssh2/CONTROL @@ -1,4 +1,4 @@ Source: libssh2 -Version: 1.8.0-2 +Version: 1.8.0-3 Build-Depends: zlib, openssl Description: The SSH library diff --git a/ports/libssh2/portfile.cmake b/ports/libssh2/portfile.cmake index 2e3ee5009..9e5e5c025 100644 --- a/ports/libssh2/portfile.cmake +++ b/ports/libssh2/portfile.cmake @@ -24,13 +24,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libssh2) + file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh2 RENAME copyright) vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 89a49b25b6a6329e39df0c06afbff26caa566a47 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 21 Nov 2017 21:09:21 -0800 Subject: [lcms] Bump package version --- ports/lcms/CONTROL | 2 +- ports/lcms/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/lcms/CONTROL b/ports/lcms/CONTROL index 03efca607..5855fbc71 100644 --- a/ports/lcms/CONTROL +++ b/ports/lcms/CONTROL @@ -1,4 +1,4 @@ Source: lcms -Version: 2.8-3 +Version: 2.8-4 Build-Depends: Description: Little CMS. diff --git a/ports/lcms/portfile.cmake b/ports/lcms/portfile.cmake index eeb12243c..7d52e5270 100644 --- a/ports/lcms/portfile.cmake +++ b/ports/lcms/portfile.cmake @@ -13,7 +13,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS_DEBUG + OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) -- cgit v1.2.3 From 373cfcc8d80d6485bfbbfe88b4402479d0b74582 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 21 Nov 2017 21:45:26 -0800 Subject: [halide] Small tweaks, use hash check for license --- ports/halide/portfile.cmake | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/ports/halide/portfile.cmake b/ports/halide/portfile.cmake index d27985ba0..184d5114c 100644 --- a/ports/halide/portfile.cmake +++ b/ports/halide/portfile.cmake @@ -1,18 +1,18 @@ include(vcpkg_common_functions) -if(${VCPKG_LIBRARY_LINKAGE} STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") message(STATUS "Warning: Static building not supported yet. Building dynamic.") set(VCPKG_LIBRARY_LINKAGE dynamic) endif() -if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(TARGET_ARCHITECTURE 32) set(FILE_HASH 99e9f05629213f99ba0b2ae088e2356842841604346a2871b05bf933a2a4712528ad1a38861f54478c16b99686ce615f97254b00c09b92b540c7afa1b0b0bb8f) -elseif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x64) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(TARGET_ARCHITECTURE 64) set(FILE_HASH aa699684321e779898ff09dc02163347dce355fa5d47fe673191e2323e28cc5b6554dfd51f39cc9c231ba8b07927f36e99b8489e4f7eb871ebaf6e377fc33cfc) else() - message(FATAL_ERROR "Error: halide does not support the ARM architecture.") + message(FATAL_ERROR "Error: halide does not support the ${VCPKG_TARGET_ARCHITECTURE} architecture.") endif() set(COMMIT_HASH 3af238615667312dcb46607752e3ae5d0ec5d713) @@ -25,6 +25,13 @@ vcpkg_download_distfile(ARCHIVE SHA512 ${FILE_HASH} ) vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}) + +vcpkg_download_distfile(LICENSE + URLS "https://raw.githubusercontent.com/halide/Halide/release_${RELEASE_DATE}/LICENSE.txt" + FILENAME "halide-release_${RELEASE_DATE}-LICENSE.txt" + SHA512 bf11aa011ce872bcd51fe8d350f7238ad1eceb61eb7af788a2d78a6cfdfa9095abeeb2d230ead5c5299d245d6507a7b4374e3294703c126dcdae531db5a5ba7a +) + set(SOURCE_PATH ${SOURCE_PATH}/halide) file( @@ -78,4 +85,4 @@ file( ${CURRENT_PACKAGES_DIR}/debug/bin ) -file(DOWNLOAD https://raw.githubusercontent.com/halide/Halide/release_${RELEASE_DATE}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/halide/copyright) +file(INSTALL "${LICENSE}" DESTINATION ${CURRENT_PACKAGES_DIR}/share/halide RENAME copyright) -- cgit v1.2.3 From 46288a5a6df363bcb795ccc49f78adab560e41e5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 21 Nov 2017 22:50:03 -0800 Subject: [devil] Enable static builds --- ports/devil/0002_fix-missing-mfc-includes.patch | 2 +- ports/devil/CONTROL | 2 +- ports/devil/enable-static.patch | 26 +++++++++++++++++++ ports/devil/portfile.cmake | 33 +++++-------------------- 4 files changed, 34 insertions(+), 29 deletions(-) create mode 100644 ports/devil/enable-static.patch diff --git a/ports/devil/0002_fix-missing-mfc-includes.patch b/ports/devil/0002_fix-missing-mfc-includes.patch index a456c0116..755d0d867 100644 --- a/ports/devil/0002_fix-missing-mfc-includes.patch +++ b/ports/devil/0002_fix-missing-mfc-includes.patch @@ -6,7 +6,7 @@ index 346758f..298a207 100644 // // Generated from the TEXTINCLUDE 2 resource. // --#include "afxres.h" +-#include "afxres.h" +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS diff --git a/ports/devil/CONTROL b/ports/devil/CONTROL index 8e6d08a70..fcdf51a9d 100644 --- a/ports/devil/CONTROL +++ b/ports/devil/CONTROL @@ -1,4 +1,4 @@ Source: devil -Version: 1.8.0 +Version: 1.8.0-1 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp, libraw, jxrlib, openexr, jasper, liblzma Description: A full featured cross-platform image library diff --git a/ports/devil/enable-static.patch b/ports/devil/enable-static.patch new file mode 100644 index 000000000..bf0cb618a --- /dev/null +++ b/ports/devil/enable-static.patch @@ -0,0 +1,26 @@ +diff --git a/devil/src-ILU/CMakeLists.txt b/devil/src-ILU/CMakeLists.txt +index 17a3afe..a46ab41 100644 +--- a/devil/src-ILU/CMakeLists.txt ++++ b/devil/src-ILU/CMakeLists.txt +@@ -43,7 +43,7 @@ source_group("Header Files" FILES ${ILU_INC} ) + source_group("Resource Files" FILES ${ILU_RSRC} ) + + # Remove SHARED to create a static library +-add_library(ILU SHARED ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC}) ++add_library(ILU ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC}) + + + ## ILU requires IL +diff --git a/devil/src-ILUT/CMakeLists.txt b/devil/src-ILUT/CMakeLists.txt +index 21470cb..398d3c1 100644 +--- a/devil/src-ILUT/CMakeLists.txt ++++ b/devil/src-ILUT/CMakeLists.txt +@@ -43,7 +43,7 @@ source_group("Header Files" FILES ${ILUT_INC} ) + source_group("Resource Files" FILES ${ILUT_RSRC} ) + + # Remove SHARED to create a static library +-add_library(ILUT SHARED ${ILUT_SRCS} ${ILUT_INC} ${ILUT_RSRC}) ++add_library(ILUT ${ILUT_SRCS} ${ILUT_INC} ${ILUT_RSRC}) + + ## add link sub library info + target_link_libraries(ILUT diff --git a/ports/devil/portfile.cmake b/ports/devil/portfile.cmake index 71f2f1c82..f9dc82293 100644 --- a/ports/devil/portfile.cmake +++ b/ports/devil/portfile.cmake @@ -1,16 +1,3 @@ -# Common Ambient Variables: -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() - include(vcpkg_common_functions) set(DEVIL_VERSION 1.8.0) @@ -19,29 +6,21 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DentonW/DevIL REF v${DEVIL_VERSION} - SHA512 4aed5e50a730ece8b1eb6b2f6204374c6fb6f5334cf7c880d84c0f79645ea7c6b5118f57a7868a487510fc59c452f51472b272215d4c852f265f58b5857e17c7 + SHA512 4aed5e50a730ece8b1eb6b2f6204374c6fb6f5334cf7c880d84c0f79645ea7c6b5118f57a7868a487510fc59c452f51472b272215d4c852f265f58b5857e17c7 HEAD_REF master ) -set(DEVIL_SHARED OFF) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(DEVIL_SHARED ON) -else() - set(DEVIL_SHARED OFF) -endif() - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH}/DevIL - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_fix-encoding.patch - ${CMAKE_CURRENT_LIST_DIR}/0002_fix-missing-mfc-includes.patch + SOURCE_PATH ${SOURCE_PATH}/DevIL + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001_fix-encoding.patch + ${CMAKE_CURRENT_LIST_DIR}/0002_fix-missing-mfc-includes.patch + ${CMAKE_CURRENT_LIST_DIR}/enable-static.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/DevIL PREFER_NINJA - OPTIONS - -DBUILD_SHARED_LIBS=${DEVIL_SHARED} ) vcpkg_install_cmake() -- cgit v1.2.3 From c7caa18a71c02d6c8d72ebf536ed4156f43a86cc Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 21 Nov 2017 23:30:36 -0800 Subject: [leveldb] force static build when triplet is dynamic --- ports/leveldb/CONTROL | 2 +- ports/leveldb/portfile.cmake | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ports/leveldb/CONTROL b/ports/leveldb/CONTROL index b953e540c..5953bc35d 100644 --- a/ports/leveldb/CONTROL +++ b/ports/leveldb/CONTROL @@ -1,3 +1,3 @@ Source: leveldb -Version: 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73 +Version: 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-1 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/portfile.cmake b/ports/leveldb/portfile.cmake index 8a32c8392..387cfd96e 100644 --- a/ports/leveldb/portfile.cmake +++ b/ports/leveldb/portfile.cmake @@ -1,8 +1,6 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(FATAL_ERROR "leveldb doesn't currently support dynamic buildsas there are no export symbols defined.") -endif() +set(VCPKG_LIBRARY_LINKAGE static) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/leveldb-8b1cd3753b184341e837b30383832645135d3d73) -- cgit v1.2.3 From 3c4a4560c6c04b4011a3e3148183359d79ee717b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 22 Nov 2017 00:40:31 -0800 Subject: [ogre] Fix static builds --- ports/ogre/CONTROL | 2 +- ports/ogre/portfile.cmake | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL index 1716ac116..879d78e39 100644 --- a/ports/ogre/CONTROL +++ b/ports/ogre/CONTROL @@ -1,5 +1,5 @@ Source: ogre -Version: 1.10.9 +Version: 1.10.9-1 Build-Depends: freeimage, freetype, zlib, zziplib Description: 3D Object-Oriented Graphics Rendering Engine diff --git a/ports/ogre/portfile.cmake b/ports/ogre/portfile.cmake index 9ee84f82c..2e604ee58 100644 --- a/ports/ogre/portfile.cmake +++ b/ports/ogre/portfile.cmake @@ -62,6 +62,7 @@ vcpkg_configure_cmake( -DOGRE_STATIC=${OGRE_STATIC} -DOGRE_UNITY_BUILD=OFF -DOGRE_USE_STD11=ON + -DOGRE_CONFIG_THREAD_PROVIDER=std -DOGRE_NODE_STORAGE_LEGACY=OFF -DOGRE_BUILD_RENDERSYSTEM_D3D11=ON -DOGRE_BUILD_RENDERSYSTEM_GL=ON @@ -80,8 +81,22 @@ vcpkg_install_cmake() # Remove unwanted files 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) + +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(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + # Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre RENAME copyright) -- cgit v1.2.3 From 26a180b804c80e983a5666877953ec87804db57f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 22 Nov 2017 04:36:33 -0800 Subject: [ogre] Fix unrelocatable CMake files, also attempt to enable Debug --- ports/ogre/CONTROL | 2 +- ports/ogre/portfile.cmake | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL index 879d78e39..1533b8e8d 100644 --- a/ports/ogre/CONTROL +++ b/ports/ogre/CONTROL @@ -1,5 +1,5 @@ Source: ogre -Version: 1.10.9-1 +Version: 1.10.9-2 Build-Depends: freeimage, freetype, zlib, zziplib Description: 3D Object-Oriented Graphics Rendering Engine diff --git a/ports/ogre/portfile.cmake b/ports/ogre/portfile.cmake index 2e604ee58..f42b4c220 100644 --- a/ports/ogre/portfile.cmake +++ b/ports/ogre/portfile.cmake @@ -97,6 +97,34 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link ${CURRENT_PACKAGES_DIR}/lib/manual-link) + +file(GLOB MAIN_REL ${CURRENT_PACKAGES_DIR}/lib/OgreMain.lib ${CURRENT_PACKAGES_DIR}/lib/OgreMainStatic.lib) +file(COPY ${MAIN_REL} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(GLOB MAIN_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMain_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMainStatic_d.lib) +file(COPY ${MAIN_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +file(REMOVE ${MAIN_REL} ${MAIN_DBG}) + +# Ogre installs custom cmake config files which don't follow the normal pattern. +# This normally makes them completely incompatible with multi-config generators, but with some effort it can be done. +file(READ "${CURRENT_PACKAGES_DIR}/share/ogre/OGREConfig.cmake" _contents) +string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${PACKAGE_PREFIX_DIR}" _contents "${_contents}") +string(REPLACE "SDL2main.lib" "SDL2main$<$:d>.lib" _contents "${_contents}") +string(REPLACE "SDL2.lib" "SDL2$<$:d>.lib" _contents "${_contents}") +string(REPLACE "\${PACKAGE_PREFIX_DIR}/lib" "\${PACKAGE_PREFIX_DIR}$<$:/debug>/lib" _contents "${_contents}") +string(REPLACE "{OGRE_PREFIX_DIR}/lib" "{OGRE_PREFIX_DIR}$<$:/debug>/lib" _contents "${_contents}") + +string(REPLACE "\"Ogre\${COMPONENT}\"" "\"Ogre\${COMPONENT}$<$:_d>\"" _contents "${_contents}") +string(REPLACE "\"Ogre\${COMPONENT}Static\"" "\"Ogre\${COMPONENT}Static$<$:_d>\"" _contents "${_contents}") + +string(REPLACE "\"\${TYPE}_\${COMPONENT}\"" "\"\${TYPE}_\${COMPONENT}$<$:_d>\"" _contents "${_contents}") +string(REPLACE "\"\${TYPE}_\${COMPONENT}Static\"" "\"\${TYPE}_\${COMPONENT}Static$<$:_d>\"" _contents "${_contents}") + +string(REPLACE "\"OgreMain\"" "\"\${PACKAGE_PREFIX_DIR}/lib/manual-link/OgreMain$<$:_d>.lib\"" _contents "${_contents}") +string(REPLACE "\"OgreMainStatic\"" "\"\${PACKAGE_PREFIX_DIR}/lib/manual-link/OgreMainStatic$<$:_d>.lib\"" _contents "${_contents}") + +file(WRITE "${CURRENT_PACKAGES_DIR}/share/ogre/OGREConfig.cmake" "${_contents}") + # Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre RENAME copyright) -- cgit v1.2.3 From e6c65b93b125cf0be13254cf2f5a9d27cb009707 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 22 Nov 2017 02:56:43 -0800 Subject: [sdl2] Use cmake for UWP --- ports/sdl2/CONTROL | 2 +- ports/sdl2/enable-winrt-cmake.patch | 206 ++++++++++++++++++++++++++++++++++++ ports/sdl2/portfile.cmake | 62 ++++------- 3 files changed, 225 insertions(+), 45 deletions(-) create mode 100644 ports/sdl2/enable-winrt-cmake.patch diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index 04c88cb24..44ea3ce3c 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.7-2 +Version: 2.0.7-3 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/enable-winrt-cmake.patch b/ports/sdl2/enable-winrt-cmake.patch new file mode 100644 index 000000000..dcd2afa67 --- /dev/null +++ b/ports/sdl2/enable-winrt-cmake.patch @@ -0,0 +1,206 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 73d9407..082fbc5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,7 +3,11 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + endif() + + cmake_minimum_required(VERSION 2.8.11) +-project(SDL2 C) ++if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") ++ project(SDL2 C CXX) ++else() ++ project(SDL2 C) ++endif() + + # !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property + # !!! FIXME: for the SDL2 shared library (so you get an +@@ -358,7 +362,6 @@ file(GLOB SOURCE_FILES + ${SDL2_SOURCE_DIR}/src/timer/*.c + ${SDL2_SOURCE_DIR}/src/video/*.c) + +- + if(ASSERTIONS STREQUAL "auto") + # Do nada - use optimization settings to determine the assertion level + elseif(ASSERTIONS STREQUAL "disabled") +@@ -1132,6 +1135,22 @@ elseif(WINDOWS) + file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES}) + ++ if(WINDOWS_STORE) ++ cmake_minimum_required(VERSION 3.0) ++ add_definitions(-DSDL_BUILDING_WINRT=1 -ZW) ++ link_libraries( ++ -nodefaultlib:vccorlib$<$:d> ++ -nodefaultlib:msvcrt$<$:d> ++ vccorlib$<$:d>.lib ++ msvcrt$<$:d>.lib ++ ) ++ endif() ++ ++ if(WINDOWS_STORE) ++ file(GLOB WINRT_SOURCE_FILES ${SDL2_SOURCE_DIR}/src/core/winrt/*.c ${SDL2_SOURCE_DIR}/src/core/winrt/*.cpp) ++ set(SOURCE_FILES ${SOURCE_FILES} ${WINRT_SOURCE_FILES}) ++ endif() ++ + if(MSVC) + # Prevent codegen that would use the VC runtime libraries. + set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/GS-") +@@ -1176,7 +1195,11 @@ elseif(WINDOWS) + check_include_file(d3d11_1.h HAVE_D3D11_H) + check_include_file(ddraw.h HAVE_DDRAW_H) + check_include_file(dsound.h HAVE_DSOUND_H) +- check_include_file(dinput.h HAVE_DINPUT_H) ++ if(WINDOWS_STORE) ++ set(HAVE_DINPUT_H 0) ++ else() ++ check_include_file(dinput.h HAVE_DINPUT_H) ++ endif() + check_include_file(xaudio2.h HAVE_XAUDIO2_H) + check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H) + check_include_file(audioclient.h HAVE_AUDIOCLIENT_H) +@@ -1193,12 +1216,14 @@ elseif(WINDOWS) + endif() + + if(SDL_AUDIO) +- set(SDL_AUDIO_DRIVER_WINMM 1) +- file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c) +- set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES}) +- set(HAVE_SDL_AUDIO TRUE) ++ if(NOT WINDOWS_STORE) ++ set(SDL_AUDIO_DRIVER_WINMM 1) ++ file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c) ++ set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES}) ++ set(HAVE_SDL_AUDIO TRUE) ++ endif() + +- if(HAVE_DSOUND_H) ++ if(HAVE_DSOUND_H AND NOT WINDOWS_STORE) + set(SDL_AUDIO_DRIVER_DSOUND 1) + file(GLOB DSOUND_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/directsound/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES}) +@@ -1208,9 +1233,10 @@ elseif(WINDOWS) + set(SDL_AUDIO_DRIVER_XAUDIO2 1) + file(GLOB XAUDIO2_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/xaudio2/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${XAUDIO2_AUDIO_SOURCES}) ++ set(HAVE_SDL_AUDIO TRUE) + endif() + +- if(HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H) ++ if(HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H AND NOT WINDOWS_STORE) + set(SDL_AUDIO_DRIVER_WASAPI 1) + file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES}) +@@ -1222,11 +1248,20 @@ elseif(WINDOWS) + if(NOT SDL_LOADSO) + message_error("SDL_VIDEO requires SDL_LOADSO, which is not enabled") + endif() +- set(SDL_VIDEO_DRIVER_WINDOWS 1) +- file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c) ++ if(WINDOWS_STORE) ++ set(SDL_VIDEO_DRIVER_WINRT 1) ++ file(GLOB WIN_VIDEO_SOURCES ++ ${SDL2_SOURCE_DIR}/src/video/winrt/*.c ++ ${SDL2_SOURCE_DIR}/src/video/winrt/*.cpp ++ ${SDL2_SOURCE_DIR}/src/render/direct3d11/*.cpp ++ ) ++ else() ++ set(SDL_VIDEO_DRIVER_WINDOWS 1) ++ file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c) ++ endif() + set(SOURCE_FILES ${SOURCE_FILES} ${WIN_VIDEO_SOURCES}) + +- if(RENDER_D3D AND HAVE_D3D_H) ++ if(RENDER_D3D AND HAVE_D3D_H AND NOT WINDOWS_STORE) + set(SDL_VIDEO_RENDER_D3D 1) + set(HAVE_RENDER_D3D TRUE) + endif() +@@ -1249,20 +1284,31 @@ elseif(WINDOWS) + endif() + + if(SDL_POWER) +- set(SDL_POWER_WINDOWS 1) +- set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c) ++ if(WINDOWS_STORE) ++ set(SDL_POWER_WINRT 1) ++ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/winrt/SDL_syspower.cpp) ++ else() ++ set(SDL_POWER_WINDOWS 1) ++ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c) ++ endif() + set(HAVE_SDL_POWER TRUE) + endif() + + if(SDL_FILESYSTEM) + set(SDL_FILESYSTEM_WINDOWS 1) +- file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c) ++ if(WINDOWS_STORE) ++ file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/winrt/*.cpp) ++ else() ++ file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c) ++ endif() + set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES}) + set(HAVE_SDL_FILESYSTEM TRUE) + endif() + + # Libraries for Win32 native and MinGW +- list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid) ++ if(NOT WINDOWS_STORE) ++ list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid) ++ endif() + + # TODO: in configure.in the check for timers is set on + # cygwin | mingw32* - does this include mingw32CE? +@@ -1284,7 +1330,7 @@ elseif(WINDOWS) + set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES}) + + if(SDL_VIDEO) +- if(VIDEO_OPENGL) ++ if(VIDEO_OPENGL AND NOT WINDOWS_STORE) + set(SDL_VIDEO_OPENGL 1) + set(SDL_VIDEO_OPENGL_WGL 1) + set(SDL_VIDEO_RENDER_OGL 1) +@@ -1688,9 +1734,11 @@ endif() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") + + # Always build SDLmain +-add_library(SDL2main STATIC ${SDLMAIN_SOURCES}) +-target_include_directories(SDL2main PUBLIC $) +-set(_INSTALL_LIBS "SDL2main") ++if(NOT WINDOWS_STORE) ++ add_library(SDL2main STATIC ${SDLMAIN_SOURCES}) ++ target_include_directories(SDL2main PUBLIC $) ++ set(_INSTALL_LIBS "SDL2main") ++endif() + + if(SDL_SHARED) + add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES}) +diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake +index 9b20398..7ae6e35 100644 +--- a/include/SDL_config.h.cmake ++++ b/include/SDL_config.h.cmake +@@ -298,6 +298,7 @@ + #cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@ + #cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@ + #cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@ ++#cmakedefine SDL_VIDEO_DRIVER_WINRT @SDL_VIDEO_DRIVER_WINRT@ + #cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@ + #cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@ + #cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@ +@@ -365,6 +366,7 @@ + #cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@ + #cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@ + #cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@ ++#cmakedefine SDL_POWER_WINRT @SDL_POWER_WINRT@ + #cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@ + #cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@ + #cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@ +@@ -387,7 +389,7 @@ + #cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@ + + /* Platform specific definitions */ +-#if !defined(__WIN32__) ++#if !defined(__WIN32__) && !defined(__WINRT__) + # if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H) + typedef unsigned int size_t; + typedef signed char int8_t; diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index 2fe53818e..17f96748e 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -15,61 +15,35 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/export-symbols-only-in-shared-build.patch + ${CMAKE_CURRENT_LIST_DIR}/enable-winrt-cmake.patch ) -if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") - vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj - ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SDL_SHARED) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" FORCE_STATIC_VCRT) - file(COPY - ${SOURCE_PATH}/VisualC-WinRT/UWP_VS2015/Debug/SDL-UWP/SDL2.dll - ${SOURCE_PATH}/VisualC-WinRT/UWP_VS2015/Debug/SDL-UWP/SDL2.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(COPY - ${SOURCE_PATH}/VisualC-WinRT/UWP_VS2015/Release/SDL-UWP/SDL2.dll - ${SOURCE_PATH}/VisualC-WinRT/UWP_VS2015/Release/SDL-UWP/SDL2.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(COPY ${SOURCE_PATH}/VisualC-WinRT/UWP_VS2015/Debug/SDL-UWP/SDL2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(COPY ${SOURCE_PATH}/VisualC-WinRT/UWP_VS2015/Release/SDL-UWP/SDL2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSDL_STATIC=${SDL_STATIC} + -DSDL_SHARED=${SDL_SHARED} + -DVIDEO_VULKAN=OFF + -DFORCE_STATIC_VCRT=${FORCE_STATIC_VCRT} + -DLIBC=ON +) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) - file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include) - file(RENAME ${CURRENT_PACKAGES_DIR}/include/include ${CURRENT_PACKAGES_DIR}/include/SDL2) -else() - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(SDL_STATIC_LIB ON) - set(SDL_SHARED_LIB OFF) - else() - set(SDL_STATIC_LIB OFF) - set(SDL_SHARED_LIB ON) - endif() - if(VCPKG_CRT_LINKAGE STREQUAL static) - set(SDL_STATIC_CRT ON) - else() - set(SDL_STATIC_CRT OFF) - endif() +vcpkg_install_cmake() - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DSDL_STATIC=${SDL_STATIC_LIB} - -DSDL_SHARED=${SDL_SHARED_LIB} - -DFORCE_STATIC_VCRT=${SDL_STATIC_CRT} - -DLIBC=ON - ) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") +if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDL2main.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDL2maind.lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - - vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") - file(GLOB SHARE_FILES ${CURRENT_PACKAGES_DIR}/share/sdl2/*.cmake) foreach(SHARE_FILE ${SHARE_FILES}) file(READ "${SHARE_FILE}" _contents) -- cgit v1.2.3 From 6a2904aebdb184ffb0eca0aafda0756ad6f1ff3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Wed, 22 Nov 2017 14:30:48 +0100 Subject: [jansson] Don't use WinCryptoApi for UWP builds Jansson tries to use Windows' CryptoApi to seed its hash table. This API is not exposed in UWP, but there is still a fallback to use current time and PID. This change makes Jansson use less-secure fallback, but fixes compilation for UWP target. See https://jansson.readthedocs.io/en/2.10/apiref.html#c.json_object_seed --- ports/jansson/portfile.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ports/jansson/portfile.cmake b/ports/jansson/portfile.cmake index 50d5a994e..e018170c7 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -21,6 +21,14 @@ else() set(JANSSON_BUILD_SHARED_LIBS OFF) endif() +# Jansson tries to random-seed its hash table with system-provided entropy. +# This is not ported to UWP yet. +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(USE_WINDOWS_CRYPTOAPI OFF) +else() + set(USE_WINDOWS_CRYPTOAPI ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -28,6 +36,7 @@ vcpkg_configure_cmake( -DJANSSON_EXAMPLES=OFF -DJANSSON_WITHOUT_TESTS=ON -DJANSSON_BUILD_SHARED_LIBS=${JANSSON_BUILD_SHARED_LIBS} + -DUSE_WINDOWS_CRYPTOAPI=${USE_WINDOWS_CRYPTOAPI} ) vcpkg_install_cmake(DISABLE_PARALLEL) -- cgit v1.2.3 From 746cfad3de61daf3323b2b3bcb5dbcd05448cfc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Wed, 22 Nov 2017 16:18:45 +0100 Subject: [speexdsp] Only use SSE on x86/amd64 This fixes UWP builds. --- ports/speexdsp/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/speexdsp/CMakeLists.txt b/ports/speexdsp/CMakeLists.txt index 76a3a9118..59e70ffcf 100644 --- a/ports/speexdsp/CMakeLists.txt +++ b/ports/speexdsp/CMakeLists.txt @@ -18,7 +18,12 @@ else () add_definitions(-D_LIB) endif () -add_definitions(-D_USE_SSE -DHAVE_CONFIG_H -D_WIN32) +add_definitions(-DHAVE_CONFIG_H -D_WIN32) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + add_definitions(-D_USE_SSE) +endif() + include_directories("${SOURCE_PATH}/include" "${SOURCE_PATH}/win32") add_library(libspeexdsp ${LIBSPEEXDSP_SOURCES} ${LIBSPEEXDSP_HEADERS}) -- cgit v1.2.3 From 70ade5e03a6834693861e44cada475ff733a4f89 Mon Sep 17 00:00:00 2001 From: fquinner Date: Wed, 22 Nov 2017 21:51:40 +0000 Subject: Fixed qpid-proton port to not need system python Tried to build the last version of the port on a fresh build but wouldn't work properly unless python.exe was already installed on the system. This version explicitly uses the vcpkg provided python. --- ports/qpid-proton/portfile.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ports/qpid-proton/portfile.cmake b/ports/qpid-proton/portfile.cmake index e5ba1d7ed..91be9aae3 100644 --- a/ports/qpid-proton/portfile.cmake +++ b/ports/qpid-proton/portfile.cmake @@ -2,6 +2,7 @@ include(vcpkg_common_functions) # Use this throughout rather than literal string set(QPID_PROTON_VERSION 0.18.1) +vcpkg_find_acquire_program(PYTHON2) # Go grab the code. Set SHA512 to 1 to get correct sha from download vcpkg_from_github( @@ -13,7 +14,9 @@ vcpkg_from_github( ) # Run cmake configure step -vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}) +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DPYTHON_EXECUTABLE=${PYTHON2}) # Run cmake install step vcpkg_install_cmake() @@ -33,4 +36,4 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) \ No newline at end of file +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -- cgit v1.2.3 From 22d015073f25ac10318cec47b58b6e405399aa7b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 22 Nov 2017 14:58:39 -0800 Subject: [date] Update. Resolves #2222 --- ports/date/CONTROL | 2 +- ports/date/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/date/CONTROL b/ports/date/CONTROL index a2e7c6e69..68fb435b6 100644 --- a/ports/date/CONTROL +++ b/ports/date/CONTROL @@ -1,3 +1,3 @@ Source: date -Version: 2.3 +Version: 2.3-c286981b3bf83c79554769df68b27415cee68d77 Description: A date and time library based on the C++11/14/17 header diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake index 0001bbe6b..a5270554f 100644 --- a/ports/date/portfile.cmake +++ b/ports/date/portfile.cmake @@ -8,8 +8,8 @@ message(WARNING vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO HowardHinnant/date - REF 2.3 - SHA512 d629f2fb1403913ed276bec9c6fd72b8eb16067663e188b7be0c22c2621332f5b46f1eed166874b7a27f90b08fca8a5509b49f395611a1af5ca73385953e3abe + REF c286981b3bf83c79554769df68b27415cee68d77 + SHA512 226e2cbc2598fbbe3a451664b017ab5b4314a682a9303268bd531931ea23baa4c9677c4433a87dbbc4a7d960dcfad1fcb632ac430d5d81c9909bcc567cf7eadf HEAD_REF master ) -- cgit v1.2.3 From 105b2cccc6f37c0b2de76c290a6817c427cd22d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Thu, 23 Nov 2017 11:26:30 +0100 Subject: [speexdsp] Check CMAKE_SYSTEM_PROCESSOR to enable SSE --- ports/speexdsp/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/speexdsp/CMakeLists.txt b/ports/speexdsp/CMakeLists.txt index 59e70ffcf..20ae3c290 100644 --- a/ports/speexdsp/CMakeLists.txt +++ b/ports/speexdsp/CMakeLists.txt @@ -20,7 +20,8 @@ endif () add_definitions(-DHAVE_CONFIG_H -D_WIN32) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") +string (TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" LOWERCASE_SYSTEM_PROCESSOR) +if (LOWERCASE_SYSTEM_PROCESSOR STREQUAL "x86" OR LOWERCASE_SYSTEM_PROCESSOR STREQUAL "amd64") add_definitions(-D_USE_SSE) endif() -- cgit v1.2.3 From abf595e903101c994b4cd87b460474f870cf6491 Mon Sep 17 00:00:00 2001 From: Andrew Male Date: Thu, 23 Nov 2017 10:11:38 -0500 Subject: Adding UnitTest++ Port --- ports/unittest-cpp/CONTROL | 3 +++ ports/unittest-cpp/portfile.cmake | 46 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 ports/unittest-cpp/CONTROL create mode 100644 ports/unittest-cpp/portfile.cmake diff --git a/ports/unittest-cpp/CONTROL b/ports/unittest-cpp/CONTROL new file mode 100644 index 000000000..e24b8b774 --- /dev/null +++ b/ports/unittest-cpp/CONTROL @@ -0,0 +1,3 @@ +Source: unittest-cpp +Version: 2.0.0 +Description: A lightweight unit testing framework for C++ diff --git a/ports/unittest-cpp/portfile.cmake b/ports/unittest-cpp/portfile.cmake new file mode 100644 index 000000000..e8341edb7 --- /dev/null +++ b/ports/unittest-cpp/portfile.cmake @@ -0,0 +1,46 @@ +# 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) +# +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported by libvpx yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/unittest-cpp-2.0.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/unittest-cpp/unittest-cpp/archive/v2.0.0.zip" + FILENAME "unittest-cpp-2.0.0.zip" + SHA512 2f1bdedc9cd8dcfeccca8be034dcc07544d991f8fc183166d9224d466f5e47100e0769b8c2b85dd45ca9ff57e42460bf41478a9e52fe2d2df4663fb22fe8cb6e +) +vcpkg_extract_source_archive(${ARCHIVE}) + +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}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/unittest-cpp RENAME copyright) + +# Remove duplicate includes +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Clean up cmake files and move to share +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/UnitTest++/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/cmake/UnitTest++/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/UnitTest++/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/unittest-cpp/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) \ No newline at end of file -- cgit v1.2.3 From 9114ae48162ae206c44fa39c92dc2d2fcf2a20c7 Mon Sep 17 00:00:00 2001 From: Andrew Male Date: Thu, 23 Nov 2017 10:14:01 -0500 Subject: Final edits to unittest-cpp portfile --- ports/unittest-cpp/portfile.cmake | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/ports/unittest-cpp/portfile.cmake b/ports/unittest-cpp/portfile.cmake index e8341edb7..9daa0998f 100644 --- a/ports/unittest-cpp/portfile.cmake +++ b/ports/unittest-cpp/portfile.cmake @@ -1,16 +1,6 @@ -# 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) -# +# UnitTest++ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "Warning: Dynamic building not supported by libvpx yet. Building static.") + message(STATUS "Warning: Dynamic building not supported by unittest-cpp yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) endif() -- cgit v1.2.3 From df4d694cf1178a987452df6bef1c355de9bae98a Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 23 Nov 2017 16:24:13 +0100 Subject: protobuf: upgrade to protobuf 3.5 --- ports/protobuf/portfile.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 3a5ac2c17..22421d513 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -1,17 +1,17 @@ include(vcpkg_common_functions) -set(PROTOBUF_VERSION 3.4.1) -set(PROTOC_VERSION 3.4.0) +set(PROTOBUF_VERSION 3.5.0) +set(PROTOC_VERSION 3.5.0) vcpkg_download_distfile(ARCHIVE_FILE URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-cpp-${PROTOBUF_VERSION}.tar.gz" FILENAME "protobuf-cpp-${PROTOBUF_VERSION}.tar.gz" - SHA512 6189e23c7e381f62e971bd0e35ad9c3ed8effe584755357013887c6a582cb5a9a654c39affa2a073b658854138f31bfb70f89fa1df494e9386f1d64fd73d07d2 + SHA512 b1d3f3617898e3f73630ea7a43416a60b970291b4f93952b8d4f68ee5cd401f752d76cd1f6a65a87186b415208142401e01ffebb2ec52534e1db31abcc0d052e ) vcpkg_download_distfile(TOOL_ARCHIVE_FILE URLS "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-win32.zip" FILENAME "protoc-${PROTOC_VERSION}-win32.zip" - SHA512 b874c3f47b39ac78f5675e05220318683004a365c248bf47ba50d8c66c8ed7763432451bab30524e131e1185a2bdaa6e6071b389eb61ad58b1b95974cf39d41b + SHA512 d332045346883ac1ca76a77cc9d6303b1c83147f49e7525c531d390b1ac57be1c765e01dc53eeb38a0d9fa3e30cab420f6a6f52dbb0c4d0a84a421de955007a4 ) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}) -- cgit v1.2.3 From d476d8fe8d7704e62c70036352293c690e2d310e Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 24 Nov 2017 10:42:14 -0600 Subject: [fftw] Use builtin cmake configuration --- ports/fftw3/CMakeLists.txt | 117 -------------- ports/fftw3/config.h | 393 --------------------------------------------- ports/fftw3/portfile.cmake | 9 +- 3 files changed, 6 insertions(+), 513 deletions(-) delete mode 100644 ports/fftw3/CMakeLists.txt delete mode 100644 ports/fftw3/config.h diff --git a/ports/fftw3/CMakeLists.txt b/ports/fftw3/CMakeLists.txt deleted file mode 100644 index 10c63d710..000000000 --- a/ports/fftw3/CMakeLists.txt +++ /dev/null @@ -1,117 +0,0 @@ -cmake_minimum_required (VERSION 3.0) -project (fftw3) - -# From: http://stackoverflow.com/questions/10252336/fftw-in-visual-studio-2010 - -# Standard: /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR -if (WIN32) - add_definitions(-D_OPENMP -DLIBFFTWF33_EXPORTS /openmp /bigobj) # Visual Studio 2005 and up supports OpenMP -endif (WIN32) - -if (BUILD_SHARED_LIBS) - add_definitions(-DFFTW_DLL) -endif() - - -file(GLOB fftw_api_SOURCE api/*.c api/*.h) -file(GLOB fftw_dft_SOURCE dft/*.c dft/*.h) -file(GLOB fftw_dft_scalar_SOURCE dft/scalar/*.c dft/scalar/*.h) -file(GLOB fftw_dft_scalar_codelets_SOURCE dft/scalar/codelets/*.c dft/scalar/codelets/*.h) -file(GLOB fftw_dft_simd_SOURCE dft/simd/*.c dft/simd/*.h) - -file(GLOB fftw_dft_simd_sse2_SOURCE dft/simd/sse2/*.c dft/simd/sse2/*.h) -file(GLOB fftw_kernel_SOURCE kernel/*.c kernel/*.h) -file(GLOB fftw_rdft_SOURCE rdft/*.c rdft/*.h) -file(GLOB fftw_rdft_scalar_SOURCE rdft/scalar/*.c rdft/scalar/*.h) - -file(GLOB fftw_rdft_scalar_r2cb_SOURCE rdft/scalar/r2cb/*.c - rdft/scalar/r2cb/*.h) -file(GLOB fftw_rdft_scalar_r2cf_SOURCE rdft/scalar/r2cf/*.c - rdft/scalar/r2cf/*.h) -file(GLOB fftw_rdft_scalar_r2r_SOURCE rdft/scalar/r2r/*.c - rdft/scalar/r2r/*.h) - -file(GLOB fftw_rdft_simd_SOURCE rdft/simd/*.c rdft/simd/*.h) -file(GLOB fftw_rdft_simd_sse2_SOURCE rdft/simd/sse2/*.c rdft/simd/sse2/*.h) - -file(GLOB fftw_reodft_SOURCE reodft/*.c reodft/*.h) -file(GLOB fftw_simd_support_SOURCE simd-support/*.c simd-support/*.h) -#file(GLOB fftw_threads_SOURCE threads/*.c threads/*.h) - - -set(${fftw_threads_SOURCE} - threads/api.c - threads/conf.c - threads/ct.c - threads/dft-vrank-qeq1.c - threads/f77api.c - threads/hc2hc.c - threads/openmp.c - threads/rdft-vrank-geq1.c - threads/vrank-geq1-rdft2.c) - - -include_directories( - kernel - api - dft - dft/scalar - dft/scalar/codelets # really needed? - dft/simd - dft/simd/sse2 - rdft - rdft/scalar - rdft/simd - reodft - ${CMAKE_CURRENT_SOURCE_DIR} # thats where the config.h is located - simd-support -) - -set(COMMON_SOURCES - ${fftw_api_SOURCE} - ${fftw_dft_SOURCE} - ${fftw_dft_scalar_SOURCE} - ${fftw_dft_scalar_codelets_SOURCE} - ${fftw_dft_simd_SOURCE} - ${fftw_kernel_SOURCE} - ${fftw_rdft_SOURCE} - ${fftw_rdft_scalar_SOURCE} - - ${fftw_rdft_scalar_r2cb_SOURCE} - ${fftw_rdft_scalar_r2cf_SOURCE} - ${fftw_rdft_scalar_r2r_SOURCE} - - ${fftw_rdft_simd_SOURCE} - ${fftw_reodft_SOURCE} - ${fftw_simd_support_SOURCE} - ${fftw_threads_SOURCE} -) - -set(SSE2_SOURCES - ${fftw_dft_simd_sse2_SOURCE} - ${fftw_rdft_simd_sse2_SOURCE} -) - -# Create default target for the library (double precision) -add_library(fftw3 ${COMMON_SOURCES} ${SSE2_SOURCES}) -target_compile_definitions(fftw3 PRIVATE HAVE_SSE2) -set(INSTALL_TARGETS fftw3) - -# Optionally add single precision -if(BUILD_SINGLE) - add_library(fftw3f ${COMMON_SOURCES} ${SSE2_SOURCES}) - target_compile_definitions(fftw3f PRIVATE FFTW_SINGLE BENCHFFT_SINGLE HAVE_SSE2) - set(INSTALL_TARGETS ${INSTALL_TARGETS} fftw3f) -endif(BUILD_SINGLE) - -# Optionally add long-double precision (does not support SSE2) -if(BUILD_LONG_DOUBLE) - add_library(fftw3l ${COMMON_SOURCES}) - target_compile_definitions(fftw3l PRIVATE FFTW_LDOUBLE BENCHFFT_LDOUBLE) - set(INSTALL_TARGETS ${INSTALL_TARGETS} fftw3l) -endif(BUILD_LONG_DOUBLE) - -install(TARGETS ${INSTALL_TARGETS} - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib) diff --git a/ports/fftw3/config.h b/ports/fftw3/config.h deleted file mode 100644 index 900062344..000000000 --- a/ports/fftw3/config.h +++ /dev/null @@ -1,393 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to compile in long-double precision. */ -/*#undef BENCHFFT_LDOUBLE*/ - -/* Define to compile in quad precision. */ -#undef BENCHFFT_QUAD - -/* Define to compile in single precision. */ -/*#undef BENCHFFT_SINGLE*/ - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -#undef CRAY_STACKSEG_END - -/* Define to 1 if using `alloca.c'. */ -#undef C_ALLOCA - -/* Define to disable Fortran wrappers. */ -#define DISABLE_FORTRAN 1 - -/* Define to dummy `main' function (if any) required to link to the Fortran - libraries. */ -#undef F77_DUMMY_MAIN - -/* Define to a macro mangling the given C identifier (in lower and upper - case), which must not contain underscores, for linking with Fortran. */ -#undef F77_FUNC - -/* As F77_FUNC, but for C identifiers containing underscores. */ -#undef F77_FUNC_ - -/* Define if F77_FUNC and F77_FUNC_ are equivalent. */ -#undef F77_FUNC_EQUIV - -/* Define if F77 and FC dummy `main' functions are identical. */ -#undef FC_DUMMY_MAIN_EQ_F77 - -/* C compiler name and flags */ -#define FFTW_CC "cl" - -/* Define to enable extra FFTW debugging code. */ -#undef FFTW_DEBUG - -/* Define to enable alignment debugging hacks. */ -#undef FFTW_DEBUG_ALIGNMENT - -/* Define to enable debugging malloc. */ -#undef FFTW_DEBUG_MALLOC - -/* Define to enable the use of alloca(). */ -#undef FFTW_ENABLE_ALLOCA - -/* Define to compile in long-double precision. */ -/*#undef FFTW_LDOUBLE*/ - -/* Define to compile in quad precision. */ -#undef FFTW_QUAD - -/* Define to enable pseudorandom estimate planning for debugging. */ -#undef FFTW_RANDOM_ESTIMATOR - -/* Define to compile in single precision. */ -/*#undef FFTW_SINGLE*/ - -/* Define to 1 if you have the `abort' function. */ -#define HAVE_ABORT 1 - -/* Define to 1 if you have `alloca', as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#undef HAVE_ALLOCA_H - -/* Define to enable Altivec optimizations. */ -#undef HAVE_ALTIVEC - -/* Define to 1 if you have the header file. */ -#undef HAVE_ALTIVEC_H - -/* Define to enable AVX optimizations. */ -#undef HAVE_AVX - -/* Define to 1 if you have the `BSDgettimeofday' function. */ -#undef HAVE_BSDGETTIMEOFDAY - -/* Define to 1 if you have the `clock_gettime' function. */ -#undef HAVE_CLOCK_GETTIME - -/* Define to 1 if you have the `cosl' function. */ -#define HAVE_COSL 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_C_ASM_H - -/* Define to 1 if you have the declaration of `cosl', and to 0 if you don't. - */ -#define HAVE_DECL_COSL 1 - -/* Define to 1 if you have the declaration of `cosq', and to 0 if you don't. */ -#define HAVE_DECL_COSQ 0 - -/* Define to 1 if you have the declaration of `drand48', and to 0 if you don't. */ -#define HAVE_DECL_DRAND48 0 - -/* Define to 1 if you have the declaration of `memalign', and to 0 if you don't. */ -#define HAVE_DECL_MEMALIGN 0 - -/* Define to 1 if you have the declaration of `posix_memalign', and to 0 if you don't. */ -#define HAVE_DECL_POSIX_MEMALIGN 0 - -/* Define to 1 if you have the declaration of `sinl', and to 0 if you don't. */ -#define HAVE_DECL_SINL 1 - -/* Define to 1 if you have the declaration of `sinq', and to 0 if you don't. - */ -#define HAVE_DECL_SINQ 0 - -/* Define to 1 if you have the declaration of `srand48', and to 0 if you - don't. */ -#define HAVE_DECL_SRAND48 0 - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -#undef HAVE_DOPRNT - -/* Define to 1 if you have the `drand48' function. */ -#undef HAVE_DRAND48 - -/* Define if you have a machine with fused multiply-add */ -#undef HAVE_FMA - -/* Define to 1 if you have the `gethrtime' function. */ -#undef HAVE_GETHRTIME - -/* Define to 1 if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define to 1 if hrtime_t is defined in */ -#undef HAVE_HRTIME_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTRINSICS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define if the isnan() function/macro is available. */ -#undef HAVE_ISNAN - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBINTL_H - -/* Define to 1 if you have the `m' library (-lm). */ -#undef HAVE_LIBM - -/* Define to 1 if you have the `quadmath' library (-lquadmath). */ -#undef HAVE_LIBQUADMATH - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if the compiler supports `long double' */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if you have the `mach_absolute_time' function. */ -#undef HAVE_MACH_ABSOLUTE_TIME - -/* Define to 1 if you have the header file. */ -#undef HAVE_MACH_MACH_TIME_H - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define to 1 if you have the `memalign' function. */ -#undef HAVE_MEMALIGN - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to enable MIPS paired-single optimizations. */ -#undef HAVE_MIPS_PS - -/* Define to enable use of MIPS ZBus cycle-counter. */ -#undef HAVE_MIPS_ZBUS_TIMER - -/* Define if you have the MPI library. */ -#undef HAVE_MPI - -/* Define if OpenMP is enabled */ -#define HAVE_OPENMP 1 - -/* Define to 1 if you have the `posix_memalign' function. */ -#undef HAVE_POSIX_MEMALIGN - -/* Define if you have POSIX threads libraries and header files. */ -#undef HAVE_PTHREAD - -/* Define to 1 if you have the `read_real_time' function. */ -#undef HAVE_READ_REAL_TIME - -/* Define to 1 if you have the `sinl' function. */ -#define HAVE_SINL 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the `sqrt' function. */ -#define HAVE_SQRT 1 - -/* Define to enable SSE/SSE2 optimizations. */ -/* #define HAVE_SSE2 1 */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 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. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `sysctl' function. */ -#undef HAVE_SYSCTL - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SYSCTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `tanl' function. */ -#define HAVE_TANL 1 - -/* Define if we have a threads library. */ -#undef HAVE_THREADS - -/* Define to 1 if you have the `time_base_to_time' function. */ -#undef HAVE_TIME_BASE_TO_TIME - -/* Define to 1 if the system has the type `uintptr_t'. */ -#define HAVE_UINTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `vprintf' function. */ -#define HAVE_VPRINTF 1 - -/* Define to 1 if you have the `_mm_free' function. */ -#undef HAVE__MM_FREE - -/* Define to 1 if you have the `_mm_malloc' function. */ -#undef HAVE__MM_MALLOC - -/* Define if you have the UNICOS _rtc() intrinsic. */ -#undef HAVE__RTC - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - -/* Name of package */ -#define PACKAGE "fftw" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "fftw@fftw.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "fftw" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "fftw-3.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "fftw" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.fftw.org" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "3.3" - -/* Define to necessary symbol if this constant uses a non-standard name on - your system. */ -#undef PTHREAD_CREATE_JOINABLE - -/* The size of `double', as computed by sizeof. */ -#undef SIZEOF_DOUBLE - -/* The size of `fftw_r2r_kind', as computed by sizeof. */ -#undef SIZEOF_FFTW_R2R_KIND - -/* The size of `float', as computed by sizeof. */ -#undef SIZEOF_FLOAT - -/* The size of `int', as computed by sizeof. */ -#undef SIZEOF_INT - -/* The size of `long', as computed by sizeof. */ -#undef SIZEOF_LONG - -/* The size of `long long', as computed by sizeof. */ -#undef SIZEOF_LONG_LONG - -/* The size of `MPI_Fint', as computed by sizeof. */ -#undef SIZEOF_MPI_FINT - -/* The size of `ptrdiff_t', as computed by sizeof. */ -#undef SIZEOF_PTRDIFF_T - -/* The size of `size_t', as computed by sizeof. */ -#undef SIZEOF_SIZE_T - -/* The size of `unsigned int', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_INT - -/* The size of `unsigned long', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_LONG - -/* The size of `unsigned long long', as computed by sizeof. */ -#undef SIZEOF_UNSIGNED_LONG_LONG - -/* The size of `void *', as computed by sizeof. */ -#undef SIZEOF_VOID_P - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -#undef STACK_DIRECTION - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define if we have and are using POSIX threads. */ -#undef USING_POSIX_THREADS - -/* Version number of package */ -#define VERSION "3.3" - -/* Use common Windows Fortran mangling styles for the Fortran interfaces. */ -#undef WINDOWS_F77_MANGLING - -/* Include g77-compatible wrappers in addition to any other Fortran wrappers. - */ -#undef WITH_G77_WRAPPERS - -/* Use our own aligned malloc routine; mainly helpful for Windows systems - lacking aligned allocation system-library routines. */ -#define WITH_OUR_MALLOC 1 - -/* Use low-precision timers, making planner very slow */ -#undef WITH_SLOW_TIMER - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* Define to `unsigned int' if does not define. */ -#undef size_t diff --git a/ports/fftw3/portfile.cmake b/ports/fftw3/portfile.cmake index 86e5e722b..973cf7dbe 100644 --- a/ports/fftw3/portfile.cmake +++ b/ports/fftw3/portfile.cmake @@ -11,9 +11,6 @@ vcpkg_extract_source_archive(${ARCHIVE}) option(BUILD_SINGLE "Additionally build single precision library" ON) option(BUILD_LONG_DOUBLE "Additionally build long-double precision library" ON) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -23,8 +20,14 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(COPY ${SOURCE_PATH}/api/fftw3.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/fftw3) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) vcpkg_apply_patches( SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include -- cgit v1.2.3 From 9f4ea2d316ecfed9c77018f918931bd1c950616c Mon Sep 17 00:00:00 2001 From: xoviat Date: Fri, 24 Nov 2017 10:45:53 -0600 Subject: [fftw] bump version --- ports/fftw3/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/fftw3/CONTROL b/ports/fftw3/CONTROL index 338c602d3..ccdc0e7ee 100644 --- a/ports/fftw3/CONTROL +++ b/ports/fftw3/CONTROL @@ -1,3 +1,3 @@ Source: fftw3 -Version: 3.3.7 +Version: 3.3.7-1 Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). -- cgit v1.2.3 From 5799ba24c447257c7012e1d0df96d841211c71cb Mon Sep 17 00:00:00 2001 From: James Chang Date: Sat, 25 Nov 2017 01:48:01 +0800 Subject: [realsense2] update to v2.8.2 --- ports/realsense2/CONTROL | 2 +- ports/realsense2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index a57375819..9153402c7 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,3 +1,3 @@ Source: realsense2 -Version: 2.8.1 +Version: 2.8.2 Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index 522bd7252..609b1c660 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense - REF v2.8.1 - SHA512 af6ae166ef0879d4da434cebea95358a4c3907bd71913577008a21717a9e45400a6eafffe5ddbf9cc50bd939d4dae0863e2f34b7ee76de276fedc68117a21e71 + REF v2.8.2 + SHA512 a2622ff241e939fad74f6d0224b5f9b505e971935bb8f27dc10159a5853bc5d55870c312c0f43014c8c7ec5a1c824e659ee9ee9a574b2d7c9b8e484c1a4918a1 HEAD_REF master ) -- cgit v1.2.3 From 473d3e4c51e96f4d56a29cb82f399cbb31c76ed4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 25 Nov 2017 10:11:08 -0800 Subject: [protobuf] bump version to 3.5.0 --- ports/protobuf/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 88904f315..5bdb879dc 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.4.1-2 +Version: 3.5.0 Description: Protocol Buffers - Google's data interchange format Feature: zlib -- cgit v1.2.3 From 141f10801c2fae8ab844e94fe5338d055892c0ac Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 25 Nov 2017 11:49:15 -0800 Subject: [vcpkg] Improve external toolchain handling. --- scripts/buildsystems/vcpkg.cmake | 16 ++++--- scripts/cmake/vcpkg_configure_cmake.cmake | 4 +- scripts/cmake/vcpkg_execute_required_process.cmake | 7 +-- scripts/get_triplet_environment.cmake | 3 +- toolsrc/include/vcpkg/build.h | 1 + toolsrc/include/vcpkg/vcpkgpaths.h | 8 +++- toolsrc/src/vcpkg/base/files.cpp | 3 +- toolsrc/src/vcpkg/base/system.cpp | 10 +++++ toolsrc/src/vcpkg/build.cpp | 14 +++++- toolsrc/src/vcpkg/commands.env.cpp | 2 +- toolsrc/src/vcpkg/export.cpp | 2 +- toolsrc/src/vcpkg/install.cpp | 2 +- toolsrc/src/vcpkg/postbuildlint.cpp | 2 +- toolsrc/src/vcpkg/vcpkgpaths.cpp | 37 +++++++++++++--- toolsrc/vcpkg.sln | 51 ++++++++++++++++++++++ 15 files changed, 136 insertions(+), 26 deletions(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index ff89439cc..4d82c43b7 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -1,6 +1,11 @@ # Mark variables as used so cmake doesn't complain about them mark_as_advanced(CMAKE_TOOLCHAIN_FILE) +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if( _CMAKE_IN_TRY_COMPILE ) + include( "${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL ) +endif() + if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") endif() @@ -9,11 +14,6 @@ if(VCPKG_TOOLCHAIN) return() endif() -get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) -if( _CMAKE_IN_TRY_COMPILE ) - include( "${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL ) -endif() - if(VCPKG_TARGET_TRIPLET) elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) @@ -77,10 +77,16 @@ if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) list(APPEND CMAKE_LIBRARY_PATH ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link ) + list(APPEND CMAKE_FIND_ROOT_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug + ) endif() list(APPEND CMAKE_PREFIX_PATH ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ) +list(APPEND CMAKE_FIND_ROOT_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} +) list(APPEND CMAKE_LIBRARY_PATH ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link ) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 54616122c..d40550f06 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -61,14 +61,14 @@ function(vcpkg_configure_cmake) set(GENERATOR ${_csc_GENERATOR}) elseif(_csc_PREFER_NINJA AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT _csc_HOST_ARCHITECTURE STREQUAL "x86") set(GENERATOR "Ninja") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") set(GENERATOR "Visual Studio 12 2013") elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") set(GENERATOR "Visual Studio 12 2013 Win64") elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") set(GENERATOR "Visual Studio 12 2013 ARM") - + elseif(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + set(GENERATOR "Ninja") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") diff --git a/scripts/cmake/vcpkg_execute_required_process.cmake b/scripts/cmake/vcpkg_execute_required_process.cmake index 173bca6e9..7c4907016 100644 --- a/scripts/cmake/vcpkg_execute_required_process.cmake +++ b/scripts/cmake/vcpkg_execute_required_process.cmake @@ -38,13 +38,14 @@ function(vcpkg_execute_required_process) RESULT_VARIABLE error_code WORKING_DIRECTORY ${vcpkg_execute_required_process_WORKING_DIRECTORY}) #debug_message("error_code=${error_code}") - file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}" NATIVE_BUILDTREES_DIR) if(error_code) + file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-out.log" NATIVE_LOG_OUT) + file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-err.log" NATIVE_LOG_ERR) message(FATAL_ERROR " Command failed: ${vcpkg_execute_required_process_COMMAND}\n" " Working Directory: ${vcpkg_execute_required_process_WORKING_DIRECTORY}\n" " See logs for more information:\n" - " ${NATIVE_BUILDTREES_DIR}\\${vcpkg_execute_required_process_LOGNAME}-out.log\n" - " ${NATIVE_BUILDTREES_DIR}\\${vcpkg_execute_required_process_LOGNAME}-err.log\n") + " ${NATIVE_LOG_OUT}\n" + " ${NATIVE_LOG_ERR}\n") endif() endfunction() diff --git a/scripts/get_triplet_environment.cmake b/scripts/get_triplet_environment.cmake index b32f840d2..d498edf4a 100644 --- a/scripts/get_triplet_environment.cmake +++ b/scripts/get_triplet_environment.cmake @@ -6,4 +6,5 @@ message("VCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}") message("VCPKG_CMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") message("VCPKG_CMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") message("VCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}") -message("VCPKG_VISUAL_STUDIO_PATH=${VCPKG_VISUAL_STUDIO_PATH}") \ No newline at end of file +message("VCPKG_VISUAL_STUDIO_PATH=${VCPKG_VISUAL_STUDIO_PATH}") +message("VCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 1f6782ccf..09e74905f 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -89,6 +89,7 @@ namespace vcpkg::Build std::string cmake_system_version; Optional platform_toolset; Optional visual_studio_path; + Optional external_toolchain_file; }; std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 0790be785..33a9b0067 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -26,6 +26,11 @@ namespace vcpkg std::vector supported_architectures; }; + namespace Build + { + struct PreBuildInfo; + } + struct VcpkgPaths { static Expected create(const fs::path& vcpkg_root_dir); @@ -69,8 +74,7 @@ namespace vcpkg /// /// Valid version strings are "v120", "v140", "v141", and "". Empty string gets the latest. /// - const Toolset& get_toolset(const Optional& toolset_version, - const Optional& visual_studio_path) const; + const Toolset& get_toolset(const Build::PreBuildInfo& prebuildinfo) const; Files::Filesystem& get_filesystem() const; diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 6e43debb1..8c9e137ed 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -72,7 +72,8 @@ namespace vcpkg::Files { std::vector ret; - fs::stdfs::recursive_directory_iterator b(dir), e{}; + std::error_code ec; + fs::stdfs::recursive_directory_iterator b(dir, ec), e{}; for (; b != e; ++b) { ret.push_back(b->path()); diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 56b725f6b..9d8e1ce84 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -51,11 +51,21 @@ namespace vcpkg::System CPUArchitecture get_host_processor() { +#if defined(_WIN32) auto w6432 = get_environment_variable("PROCESSOR_ARCHITEW6432"); if (const auto p = w6432.get()) return to_cpu_architecture(*p).value_or_exit(VCPKG_LINE_INFO); const auto procarch = get_environment_variable("PROCESSOR_ARCHITECTURE").value_or_exit(VCPKG_LINE_INFO); return to_cpu_architecture(procarch).value_or_exit(VCPKG_LINE_INFO); +#else +#if defined(__x86_64__) || defined(_M_X64) + return CPUArchitecture::X64; +#elif defined(__x86__) || defined(_M_X86) + return CPUArchitecture::X86; +#else +#error "Unknown host architecture" +#endif +#endif } std::vector get_supported_host_architectures() diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 804573d91..fd605ac08 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -203,6 +203,10 @@ namespace vcpkg::Build std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) { + if (pre_build_info.external_toolchain_file) + return Strings::format( + R"("%s" %s 2>&1)", toolset.vcvarsall.u8string(), Strings::join(" ", toolset.vcvarsall_options)); + const char* tonull = " >nul"; if (GlobalState::debugging) { @@ -299,8 +303,7 @@ namespace vcpkg::Build } } - const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); - + const Toolset& toolset = paths.get_toolset(pre_build_info); const std::string cmd_launch_cmake = System::make_cmake_cmd( cmake_exe_path, ports_cmake_script_path, @@ -555,6 +558,13 @@ namespace vcpkg::Build continue; } + if (variable_name == "VCPKG_CHAINLOAD_TOOLCHAIN_FILE") + { + pre_build_info.external_toolchain_file = + variable_value.empty() ? nullopt : Optional{variable_value}; + continue; + } + Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown variable name %s", line); } diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp index 98b5aced9..6e52383d8 100644 --- a/toolsrc/src/vcpkg/commands.env.cpp +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -20,7 +20,7 @@ namespace vcpkg::Commands::Env args.parse_arguments(COMMAND_STRUCTURE); const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); - const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); + const Toolset& toolset = paths.get_toolset(pre_build_info); System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, toolset) + " && cmd"); Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index f237c72f8..32cb6f03e 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -290,7 +290,7 @@ namespace vcpkg::Export {OPTION_IFW_INSTALLER_FILE_PATH, "Specify the file path for the exported installer"}, }}; - const CommandStructure vcpkg::Export::COMMAND_STRUCTURE = { + const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("export zlib zlib:x64-windows boost --nuget"), 0, SIZE_MAX, diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 249e36e0f..0888e21d5 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -561,7 +561,7 @@ namespace vcpkg::Install static void print_cmake_information(const BinaryParagraph& bpgh, const VcpkgPaths& paths) { - static const std::regex cmake_library_regex("^add_library\\(([^\\s\\$\\)]+)\\s"); + static const std::regex cmake_library_regex(R"(\badd_library\(([^\s\)]+)\s)", std::regex_constants::ECMAScript); auto& fs = paths.get_filesystem(); diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp index 1f13c0a4f..10af41bb0 100644 --- a/toolsrc/src/vcpkg/postbuildlint.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -726,7 +726,7 @@ namespace vcpkg::PostBuildLint const auto& fs = paths.get_filesystem(); // for dumpbin - const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset, pre_build_info.visual_studio_path); + const Toolset& toolset = paths.get_toolset(pre_build_info); const fs::path package_dir = paths.package_dir(spec); size_t error_count = 0; diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 7c4d41815..0114b51b8 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -115,11 +116,13 @@ namespace vcpkg static constexpr std::array EXPECTED_VERSION = {3, 9, 5}; static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const fs::path downloaded_copy = downloads_folder / "cmake-3.9.5-win32-x86" / "bin" / "cmake.exe"; const std::vector from_path = Files::find_from_PATH("cmake"); std::vector candidate_paths; + const fs::path downloaded_copy = downloads_folder / "cmake-3.9.5-win32-x86" / "bin" / "cmake.exe"; +#if defined(_WIN32) candidate_paths.push_back(downloaded_copy); +#endif candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); #if defined(_WIN32) candidate_paths.push_back(System::get_program_files_platform_bitness() / "CMake" / "bin" / "cmake.exe"); @@ -161,11 +164,13 @@ namespace vcpkg static constexpr std::array EXPECTED_VERSION = {2, 15, 0}; static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const fs::path downloaded_copy = downloads_folder / "MinGit-2.15.0-32-bit" / "cmd" / "git.exe"; const std::vector from_path = Files::find_from_PATH("git"); + const fs::path downloaded_copy = downloads_folder / "MinGit-2.15.0-32-bit" / "cmd" / "git.exe"; std::vector candidate_paths; +#if defined(_WIN32) candidate_paths.push_back(downloaded_copy); +#endif candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); #if defined(_WIN32) candidate_paths.push_back(System::get_program_files_platform_bitness() / "git" / "cmd" / "git.exe"); @@ -499,16 +504,36 @@ namespace vcpkg return found_toolsets; } - const Toolset& VcpkgPaths::get_toolset(const Optional& toolset_version, - const Optional& visual_studio_path) const + const Toolset& VcpkgPaths::get_toolset(const Build::PreBuildInfo& prebuildinfo) const { + if (prebuildinfo.external_toolchain_file) + { + static Toolset external_toolset = []() -> Toolset { + Toolset ret; + ret.dumpbin = ""; + ret.supported_architectures = { + ToolsetArchOption{"", System::get_host_processor(), System::get_host_processor()}}; +#if defined(_WIN32) + ret.vcvarsall = "cmd"; + ret.vcvarsall_options = {"/c", "echo done"}; +#else + ret.vcvarsall = "true"; + ret.vcvarsall_options = {}; +#endif + ret.version = "external"; + ret.visual_studio_root_path = ""; + return ret; + }(); + return external_toolset; + } + // Invariant: toolsets are non-empty and sorted with newest at back() const std::vector& vs_toolsets = this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); }); std::vector candidates = Util::element_pointers(vs_toolsets); - const auto tsv = toolset_version.get(); - const auto vsp = visual_studio_path.get(); + const auto tsv = prebuildinfo.platform_toolset.get(); + const auto vsp = prebuildinfo.visual_studio_path.get(); if (tsv && vsp) { diff --git a/toolsrc/vcpkg.sln b/toolsrc/vcpkg.sln index c97756c21..c2df757fc 100644 --- a/toolsrc/vcpkg.sln +++ b/toolsrc/vcpkg.sln @@ -11,6 +11,51 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcpkgmetricsuploader", "vcp EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcpkgtest", "vcpkgtest\vcpkgtest.vcxproj", "{F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F5893B21-EA71-4432-84D6-5FB0E0461A2A}" + ProjectSection(SolutionItems) = preProject + ..\scripts\bootstrap.ps1 = ..\scripts\bootstrap.ps1 + ..\scripts\fetchDependency.ps1 = ..\scripts\fetchDependency.ps1 + ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1 = ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1 + ..\scripts\findFileRecursivelyUp.ps1 = ..\scripts\findFileRecursivelyUp.ps1 + ..\scripts\findVisualStudioInstallationInstances.ps1 = ..\scripts\findVisualStudioInstallationInstances.ps1 + ..\scripts\get_triplet_environment.cmake = ..\scripts\get_triplet_environment.cmake + ..\scripts\getProgramFiles32bit.ps1 = ..\scripts\getProgramFiles32bit.ps1 + ..\scripts\getProgramFilesPlatformBitness.ps1 = ..\scripts\getProgramFilesPlatformBitness.ps1 + ..\scripts\getWindowsSDK.ps1 = ..\scripts\getWindowsSDK.ps1 + ..\scripts\internalCI.ps1 = ..\scripts\internalCI.ps1 + ..\scripts\ports.cmake = ..\scripts\ports.cmake + ..\scripts\SHA256Hash.ps1 = ..\scripts\SHA256Hash.ps1 + ..\scripts\VcpkgPowershellUtils.ps1 = ..\scripts\VcpkgPowershellUtils.ps1 + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cmake", "cmake", "{A0122231-04D5-420B-81CA-7960946E5E65}" + ProjectSection(SolutionItems) = preProject + ..\scripts\cmake\vcpkg_acquire_msys.cmake = ..\scripts\cmake\vcpkg_acquire_msys.cmake + ..\scripts\cmake\vcpkg_apply_patches.cmake = ..\scripts\cmake\vcpkg_apply_patches.cmake + ..\scripts\cmake\vcpkg_build_cmake.cmake = ..\scripts\cmake\vcpkg_build_cmake.cmake + ..\scripts\cmake\vcpkg_build_msbuild.cmake = ..\scripts\cmake\vcpkg_build_msbuild.cmake + ..\scripts\cmake\vcpkg_build_qmake.cmake = ..\scripts\cmake\vcpkg_build_qmake.cmake + ..\scripts\cmake\vcpkg_common_functions.cmake = ..\scripts\cmake\vcpkg_common_functions.cmake + ..\scripts\cmake\vcpkg_configure_cmake.cmake = ..\scripts\cmake\vcpkg_configure_cmake.cmake + ..\scripts\cmake\vcpkg_configure_meson.cmake = ..\scripts\cmake\vcpkg_configure_meson.cmake + ..\scripts\cmake\vcpkg_configure_qmake.cmake = ..\scripts\cmake\vcpkg_configure_qmake.cmake + ..\scripts\cmake\vcpkg_copy_pdbs.cmake = ..\scripts\cmake\vcpkg_copy_pdbs.cmake + ..\scripts\cmake\vcpkg_copy_tool_dependencies.cmake = ..\scripts\cmake\vcpkg_copy_tool_dependencies.cmake + ..\scripts\cmake\vcpkg_download_distfile.cmake = ..\scripts\cmake\vcpkg_download_distfile.cmake + ..\scripts\cmake\vcpkg_execute_required_process.cmake = ..\scripts\cmake\vcpkg_execute_required_process.cmake + ..\scripts\cmake\vcpkg_execute_required_process_repeat.cmake = ..\scripts\cmake\vcpkg_execute_required_process_repeat.cmake + ..\scripts\cmake\vcpkg_extract_source_archive.cmake = ..\scripts\cmake\vcpkg_extract_source_archive.cmake + ..\scripts\cmake\vcpkg_find_acquire_program.cmake = ..\scripts\cmake\vcpkg_find_acquire_program.cmake + ..\scripts\cmake\vcpkg_fixup_cmake_targets.cmake = ..\scripts\cmake\vcpkg_fixup_cmake_targets.cmake + ..\scripts\cmake\vcpkg_from_bitbucket.cmake = ..\scripts\cmake\vcpkg_from_bitbucket.cmake + ..\scripts\cmake\vcpkg_from_github.cmake = ..\scripts\cmake\vcpkg_from_github.cmake + ..\scripts\cmake\vcpkg_get_program_files_32_bit.cmake = ..\scripts\cmake\vcpkg_get_program_files_32_bit.cmake + ..\scripts\cmake\vcpkg_get_program_files_platform_bitness.cmake = ..\scripts\cmake\vcpkg_get_program_files_platform_bitness.cmake + ..\scripts\cmake\vcpkg_get_windows_sdk.cmake = ..\scripts\cmake\vcpkg_get_windows_sdk.cmake + ..\scripts\cmake\vcpkg_install_cmake.cmake = ..\scripts\cmake\vcpkg_install_cmake.cmake + ..\scripts\cmake\vcpkg_install_meson.cmake = ..\scripts\cmake\vcpkg_install_meson.cmake + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -55,4 +100,10 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {A0122231-04D5-420B-81CA-7960946E5E65} = {F5893B21-EA71-4432-84D6-5FB0E0461A2A} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DEDCC7AF-0FE6-4387-9FFE-495D6C1AEE1B} + EndGlobalSection EndGlobal -- cgit v1.2.3 From 9a9c3a8634207c9473f178dcf6c2819f6cb7686f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 24 Nov 2017 03:07:33 -0800 Subject: [libiconv] Update to 1.15 --- ports/libiconv/0002-Config-for-MSVC.patch | 54 -------------------- ports/libiconv/CMakeLists.txt | 85 +++++++++---------------------- ports/libiconv/CONTROL | 2 +- ports/libiconv/portfile.cmake | 9 ++-- 4 files changed, 30 insertions(+), 120 deletions(-) diff --git a/ports/libiconv/0002-Config-for-MSVC.patch b/ports/libiconv/0002-Config-for-MSVC.patch index 8ce2f683f..0c90e50ef 100644 --- a/ports/libiconv/0002-Config-for-MSVC.patch +++ b/ports/libiconv/0002-Config-for-MSVC.patch @@ -1,57 +1,3 @@ -diff --git "a/config.h.in" "b/config.h.in" -index 207e487..56501ed 100644 ---- "a/config.h.in" -+++ "b/config.h.in" -@@ -27,7 +27,7 @@ - #undef DOUBLE_SLASH_IS_DISTINCT_ROOT - - /* Define as good substitute value for EILSEQ. */ --#undef EILSEQ -+//#undef EILSEQ - - /* Define to 1 to enable a few rarely used encodings. */ - #undef ENABLE_EXTRA -@@ -207,10 +207,10 @@ - #undef HAVE_MACH_O_DYLD_H - - /* Define to 1 if you have the `mbrtowc' function. */ --#undef HAVE_MBRTOWC -+#define HAVE_MBRTOWC 1 - - /* Define to 1 if you have the `mbsinit' function. */ --#undef HAVE_MBSINIT -+#define HAVE_MBSINIT 1 - - /* Define to 1 if declares mbstate_t. */ - #undef HAVE_MBSTATE_T -@@ -665,7 +665,7 @@ - #undef HAVE_WCHAR_T - - /* Define to 1 if you have the `wcrtomb' function. */ --#undef HAVE_WCRTOMB -+#define HAVE_WCRTOMB 1 - - /* Define to 1 if you have the header file. */ - #undef HAVE_WINSOCK2_H -@@ -683,7 +683,7 @@ - #undef HAVE__NSGETEXECUTABLEPATH - - /* Define as const if the declaration of iconv() needs const. */ --#undef ICONV_CONST -+#define ICONV_CONST const - - /* Define to the value of ${prefix}, as a string. */ - #undef INSTALLPREFIX -@@ -787,7 +787,7 @@ - #undef WINT_T_SUFFIX - - /* Define if the machine's byte ordering is little endian. */ --#undef WORDS_LITTLEENDIAN -+#define WORDS_LITTLEENDIAN 1 - - /* Define to 1 if on MINIX. */ - #undef _MINIX - diff --git "a/lib/loop_wchar.h" "b/lib/loop_wchar.h" index 6dc011b..158ccdd 100644 --- "a/lib/loop_wchar.h" diff --git a/ports/libiconv/CMakeLists.txt b/ports/libiconv/CMakeLists.txt index 0d2a2a4d3..be42843e3 100644 --- a/ports/libiconv/CMakeLists.txt +++ b/ports/libiconv/CMakeLists.txt @@ -1,20 +1,5 @@ -## -## CMake support for libiconv -## based on the work here: https://github.com/vovythevov/libiconv-cmake -## - cmake_minimum_required(VERSION 3.0.0) -project(Libiconv) - -# -# Options -# - -# Config file -configure_file( - ${Libiconv_SOURCE_DIR}/config.h.in - ${Libiconv_BINARY_DIR}/config.h -) +project(libiconv C) if(BUILD_SHARED_LIBS) set(LIBICONV_DYNAMIC "1 /*LIBICONV_DYNAMIC*/") @@ -26,59 +11,37 @@ set(USE_MBSTATE_T "0 /*USE_MBSTATE_T*/") set(BROKEN_WCHAR_H "0 /*BROKEN_WCHAR_H*/") set(HAVE_VISIBILITY "0 /*HAVE_VISIBILITY*/") -include_directories(${Libiconv_SOURCE_DIR} ${Libiconv_BINARY_DIR}) - -# -# Build libcharset -# -set(libname libcharset) -set(libcharset_source_dir ${Libiconv_SOURCE_DIR}/libcharset) - -add_definitions(-DLIBDIR) - -configure_file( - ${Libiconv_SOURCE_DIR}/libcharset/include/localcharset.h.build.in - ${Libiconv_BINARY_DIR}/localcharset.h -) - -set(${libname}_sources - ${libcharset_source_dir}/lib/localcharset.c - ${Libiconv_BINARY_DIR}/localcharset.h -) +configure_file(config.h.in config.h) +file(READ "${CMAKE_CURRENT_BINARY_DIR}/config.h" _contents) +string(REPLACE "#undef HAVE_WORKING_O_NOFOLLOW" "#define HAVE_WORKING_O_NOFOLLOW 0" _contents "${_contents}") +string(REPLACE "#undef HAVE_MBRTOWC" "#define HAVE_MBRTOWC 1" _contents "${_contents}") +string(REPLACE "#undef HAVE_MBSINIT" "#define HAVE_MBSINIT 1" _contents "${_contents}") +string(REPLACE "#undef HAVE_WCRTOMB" "#define HAVE_WCRTOMB 1" _contents "${_contents}") +string(REPLACE "#undef ICONV_CONST" "#define ICONV_CONST const" _contents "${_contents}") +string(REPLACE "#undef EILSEQ" "" _contents "${_contents}") +string(REPLACE "#undef WORDS_LITTLEENDIAN" "#define WORDS_LITTLEENDIAN 1" _contents "${_contents}") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config.h" "${_contents}") -add_library(${libname} ${${libname}_sources}) -list(APPEND Libiconv_TARGETS ${libname}) -list(APPEND Libiconv_headers ${Libiconv_BINARY_DIR}/localcharset.h) +configure_file(libcharset/include/localcharset.h.build.in localcharset.h) +configure_file(include/iconv.h.build.in iconv.h) -# -# Build libiconv -# -set(libname libiconv) +include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) -add_definitions(-D_CRT_SECURE_NO_WARNINGS) +add_definitions(-DLIBDIR -D_CRT_SECURE_NO_WARNINGS) -configure_file( - ${Libiconv_SOURCE_DIR}/include/iconv.h.build.in - ${Libiconv_BINARY_DIR}/iconv.h - ) +add_library(libcharset libcharset/lib/localcharset.c) -set(${libname}_sources - ${Libiconv_SOURCE_DIR}/lib/iconv.c - ${Libiconv_BINARY_DIR}/iconv.h -) - -add_library(${libname} ${${libname}_sources}) -target_link_libraries(${libname} libcharset) -list(APPEND Libiconv_TARGETS ${libname}) -list(APPEND Libiconv_headers ${Libiconv_BINARY_DIR}/iconv.h) +add_library(libiconv lib/iconv.c) +target_link_libraries(libiconv libcharset) -# -# Export targets -# -install(TARGETS ${Libiconv_TARGETS} +install(TARGETS libcharset libiconv RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) -install(FILES ${Libiconv_headers} DESTINATION include) +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/iconv.h + ${CMAKE_CURRENT_BINARY_DIR}/localcharset.h + DESTINATION include +) diff --git a/ports/libiconv/CONTROL b/ports/libiconv/CONTROL index 851c8dd01..980763980 100644 --- a/ports/libiconv/CONTROL +++ b/ports/libiconv/CONTROL @@ -1,3 +1,3 @@ Source: libiconv -Version: 1.14-1 +Version: 1.15 Description: GNU Unicode text conversion diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index 46bd2f9e9..a79d7c074 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libiconv-1.14) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libiconv-1.15) vcpkg_download_distfile(ARCHIVE - URLS "https://ftp.gnu.org/gnu/libiconv/libiconv-1.14.tar.gz" - FILENAME "libiconv-1.14.tar.gz" - SHA512 b96774fefc4fa1d07948fcc667027701373c34ebf9c4101000428e048addd85a5bb5e05e59f80eb783a3054a3a8a3c0da909450053275bbbf3ffde511eb3f387 + URLS "https://ftp.gnu.org/gnu/libiconv/libiconv-1.15.tar.gz" + FILENAME "libiconv-1.15.tar.gz" + SHA512 1233fe3ca09341b53354fd4bfe342a7589181145a1232c9919583a8c9979636855839049f3406f253a9d9829908816bb71fd6d34dd544ba290d6f04251376b1a ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -19,6 +19,7 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() -- cgit v1.2.3 From fec269d594723bf605a1d65b0fb05f869d954906 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 25 Nov 2017 12:36:50 -0800 Subject: [protobuf] Restore removed export required for GRPC. [grpc] Update to 1.7.2 --- ports/grpc/CONTROL | 2 +- ports/grpc/portfile.cmake | 4 ++-- ports/protobuf/CONTROL | 2 +- ports/protobuf/export-ParseGeneratorParameter.patch | 13 +++++++++++++ ports/protobuf/portfile.cmake | 4 +++- 5 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 ports/protobuf/export-ParseGeneratorParameter.patch diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index b866586fe..8eb7093e1 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.7.0 +Version: 1.7.2 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 4b7473105..45126f05f 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF v1.7.0 - SHA512 23427ac1f180ce6d70b039225f26cecbd938655d1e5b726414aee7dfee6e6f301913255cfe0ff326dfb34e206ca6476c389b2fd0db58b284fff30c9757c5e4ac + REF v1.7.2 + SHA512 54cb4165878fb3361cd7a81b631f1b20e991eadd286c0f6020542a8aa464cf30bdd1479dc413b767a1585bdc730e465a64c45e9e805723f38bd54521e1c4f942 HEAD_REF master ) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 5bdb879dc..c52a3ce55 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.5.0 +Version: 3.5.0-1 Description: Protocol Buffers - Google's data interchange format Feature: zlib diff --git a/ports/protobuf/export-ParseGeneratorParameter.patch b/ports/protobuf/export-ParseGeneratorParameter.patch new file mode 100644 index 000000000..38b45a4c4 --- /dev/null +++ b/ports/protobuf/export-ParseGeneratorParameter.patch @@ -0,0 +1,13 @@ +diff --git a/src/google/protobuf/compiler/code_generator.h b/src/google/protobuf/compiler/code_generator.h +index 4b1d90b..4c2b3ee 100644 +--- a/src/google/protobuf/compiler/code_generator.h ++++ b/src/google/protobuf/compiler/code_generator.h +@@ -166,7 +166,7 @@ typedef GeneratorContext OutputDirectory; + // "foo=bar,baz,qux=corge" + // parses to the pairs: + // ("foo", "bar"), ("baz", ""), ("qux", "corge") +-void ParseGeneratorParameter( ++LIBPROTOC_EXPORT void ParseGeneratorParameter( + const string&, std::vector >*); + + } // namespace compiler diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 22421d513..7e0c5c4f8 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -22,7 +22,9 @@ vcpkg_extract_source_archive(${ARCHIVE_FILE}) # Add a flag that can be set to disable the protobuf compiler vcpkg_apply_patches( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch" + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch" + "${CMAKE_CURRENT_LIST_DIR}/export-ParseGeneratorParameter.patch" ) -- cgit v1.2.3 From dbe732fd8a283235d6e44b85997c5d80290925d2 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 25 Nov 2017 12:47:41 -0800 Subject: [unittest-cpp] Use vcpkg_from_github. --- ports/unittest-cpp/portfile.cmake | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/ports/unittest-cpp/portfile.cmake b/ports/unittest-cpp/portfile.cmake index 9daa0998f..2a31852a9 100644 --- a/ports/unittest-cpp/portfile.cmake +++ b/ports/unittest-cpp/portfile.cmake @@ -1,36 +1,29 @@ -# UnitTest++ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(STATUS "Warning: Dynamic building not supported by unittest-cpp yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/unittest-cpp-2.0.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/unittest-cpp/unittest-cpp/archive/v2.0.0.zip" - FILENAME "unittest-cpp-2.0.0.zip" - SHA512 2f1bdedc9cd8dcfeccca8be034dcc07544d991f8fc183166d9224d466f5e47100e0769b8c2b85dd45ca9ff57e42460bf41478a9e52fe2d2df4663fb22fe8cb6e +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO unittest-cpp/unittest-cpp + REF v2.0.0 + SHA512 39318f4ed31534c116679a3257bf1438a6c4b3bef1894dfd40aea934950c6c8197af6a7f61539b8e9ddc67327c9388d7e8a6f8a3e0e966ad26c07554e2429cab + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) 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 + PREFER_NINJA ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/UnitTest++) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/unittest-cpp ${CURRENT_PACKAGES_DIR}/share/unittest++) + # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/unittest-cpp RENAME copyright) # Remove duplicate includes file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -# Clean up cmake files and move to share -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/UnitTest++/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/cmake/UnitTest++/debug) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/UnitTest++/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/unittest-cpp/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) \ No newline at end of file -- cgit v1.2.3 From 89983fe102520c7a063ff349ac824995b1832a97 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 25 Nov 2017 12:47:49 -0800 Subject: [vcpkg-from-github] Improve argument handling --- scripts/cmake/vcpkg_from_github.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index 5730ce39a..b71ab3838 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -54,19 +54,19 @@ function(vcpkg_from_github) set(multipleValuesArgs) cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) - if(NOT _vdud_OUT_SOURCE_PATH) + if(NOT DEFINED _vdud_OUT_SOURCE_PATH) message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") endif() - if((_vdud_REF AND NOT _vdud_SHA512) OR (NOT _vdud_REF AND _vdud_SHA512)) + if((DEFINED _vdud_REF AND NOT DEFINED _vdud_SHA512) OR (NOT DEFINED _vdud_REF AND DEFINED _vdud_SHA512)) message(FATAL_ERROR "SHA512 must be specified if REF is specified.") endif() - if(NOT _vdud_REPO) + if(NOT DEFINED _vdud_REPO) message(FATAL_ERROR "The GitHub repository must be specified.") endif() - if(NOT _vdud_REF AND NOT _vdud_HEAD_REF) + if(NOT DEFINED _vdud_REF AND NOT DEFINED _vdud_HEAD_REF) message(FATAL_ERROR "At least one of REF and HEAD_REF must be specified.") endif() @@ -90,7 +90,7 @@ function(vcpkg_from_github) endif() endmacro() - if(VCPKG_USE_HEAD_VERSION AND NOT _vdud_HEAD_REF) + if(VCPKG_USE_HEAD_VERSION AND NOT DEFINED _vdud_HEAD_REF) message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") set(VCPKG_USE_HEAD_VERSION OFF) endif() -- cgit v1.2.3 From 4d274a7bffa1cf141f3be7d227702cea44df6894 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 25 Nov 2017 13:45:33 -0800 Subject: [opencv] Disable msvcrt check to allow prepackaged ffmpeg --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index d41323609..2c80e5767 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.1-7 +Version: 3.3.1-9 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index b6958abfd..b309edb89 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -201,4 +201,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() -set(VCPKG_LIBRARY_LINKAGE "dynamic") \ No newline at end of file +set(VCPKG_LIBRARY_LINKAGE "dynamic") + +set(VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT enabled) -- cgit v1.2.3 From 22fbd3ac362b8225eaf8727a3b077e6beec37c78 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 25 Nov 2017 13:49:43 -0800 Subject: [libpng] Remove unneeded CMAKE_SYSTEM_PROCESSOR override --- ports/libpng/portfile.cmake | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index c2067ff9b..4273846e9 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -22,13 +22,6 @@ else() set(PNG_SHARED_LIBS OFF) endif() -# Libpng's cmake uses if(${CMAKE_SYSTEM_PROCESSOR} ....) which performs double-evaluation and breaks if the variable is not defined. -if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - set(CMAKE_SYSTEM_PROCESSOR AMD64) -else() - set(CMAKE_SYSTEM_PROCESSOR ${VCPKG_TARGET_ARCHITECTURE}) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -39,7 +32,6 @@ vcpkg_configure_cmake( -DSKIP_INSTALL_PROGRAMS=ON -DSKIP_INSTALL_EXECUTABLES=ON -DSKIP_INSTALL_FILES=ON - -DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR} OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) -- cgit v1.2.3 From fda988964d2f84aae705802092315ba83ada76a7 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sun, 26 Nov 2017 07:29:56 +0900 Subject: Enable Ninja build in QHull port Enable Ninja build in QHull port. --- ports/qhull/portfile.cmake | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/ports/qhull/portfile.cmake b/ports/qhull/portfile.cmake index 493a14e38..ab4ea3b92 100644 --- a/ports/qhull/portfile.cmake +++ b/ports/qhull/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_from_github( @@ -22,7 +10,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - #PREFER_NINJA # Disable this option if project cannot be built with Ninja + PREFER_NINJA OPTIONS -DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include -DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull @@ -53,6 +41,5 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_rd.lib) endif() -# Handle copyright file(COPY ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/qhull) file(RENAME ${CURRENT_PACKAGES_DIR}/share/qhull/README.txt ${CURRENT_PACKAGES_DIR}/share/qhull/copyright) -- cgit v1.2.3 From 173a1d59a590f823cd0e25b48906348ff68435e2 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sun, 26 Nov 2017 07:34:19 +0900 Subject: Fix remove files when install dynamic libraries Fix remove files when install dynamic libraries. --- ports/qhull/CONTROL | 2 +- ports/qhull/portfile.cmake | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/qhull/CONTROL b/ports/qhull/CONTROL index ff0847781..8eb3f8772 100644 --- a/ports/qhull/CONTROL +++ b/ports/qhull/CONTROL @@ -1,3 +1,3 @@ Source: qhull -Version: 2015.2-1 +Version: 2015.2-2 Description: computes the convex hull, Delaunay triangulation, Voronoi diagram diff --git a/ports/qhull/portfile.cmake b/ports/qhull/portfile.cmake index ab4ea3b92..25ee8f0d1 100644 --- a/ports/qhull/portfile.cmake +++ b/ports/qhull/portfile.cmake @@ -39,6 +39,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_d.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_p.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_pd.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_rd.lib) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhullcpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhullcpp_d.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhullstatic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhullstatic_d.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhullstatic_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhullstatic_rd.lib) endif() file(COPY ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/qhull) -- cgit v1.2.3 From 390806e93186563372d6f2797e8dcabdb4d7de07 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sun, 26 Nov 2017 07:49:30 +0900 Subject: Fix PCL port according to QHull port change Fix PCL port according to QHull port change. PCL will link dynamic link librariy of QHull when build dynamic link library configure. --- ports/pcl/CONTROL | 2 +- ports/pcl/cmakelists.patch | 16 ++++++++++++++++ ports/pcl/portfile.cmake | 3 ++- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 ports/pcl/cmakelists.patch diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index 5d19f0021..86839aedd 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,5 +1,5 @@ Source: pcl -Version: 1.8.1-6 +Version: 1.8.1-7 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. Build-Depends: boost, eigen3, flann, qhull, vtk diff --git a/ports/pcl/cmakelists.patch b/ports/pcl/cmakelists.patch new file mode 100644 index 000000000..2d8bd1bd3 --- /dev/null +++ b/ports/pcl/cmakelists.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d36a581fb..9b0195324 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -327,9 +327,9 @@ endif(WITH_PNG) + # Qhull + option(WITH_QHULL "Include convex-hull operations" TRUE) + if(WITH_QHULL) +- if(NOT PCL_SHARED_LIBS OR WIN32) ++ if(NOT PCL_SHARED_LIBS) + set(QHULL_USE_STATIC ON) +- endif(NOT PCL_SHARED_LIBS OR WIN32) ++ endif(NOT PCL_SHARED_LIBS) + find_package(Qhull) + if(QHULL_FOUND) + include_directories(${QHULL_INCLUDE_DIRS}) diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index a3efd3367..eeb7b0e6c 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -10,7 +10,8 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/config.patch" + PATCHES "${CMAKE_CURRENT_LIST_DIR}/cmakelists.patch" + "${CMAKE_CURRENT_LIST_DIR}/config.patch" "${CMAKE_CURRENT_LIST_DIR}/config_install.patch" "${CMAKE_CURRENT_LIST_DIR}/find_flann.patch" "${CMAKE_CURRENT_LIST_DIR}/find_qhull.patch" -- cgit v1.2.3 From 5335d17f53d491d83d98e80ab0e750ec0f6f430b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 25 Nov 2017 15:25:18 -0800 Subject: [vcpkg] Initial experimental support for VCPKG_BUILD_TYPE release --- ports/boost/portfile.cmake | 104 +++++++++++++----------- scripts/cmake/vcpkg_build_cmake.cmake | 32 ++++---- scripts/cmake/vcpkg_build_msbuild.cmake | 44 +++++----- scripts/cmake/vcpkg_configure_cmake.cmake | 48 ++++++----- scripts/cmake/vcpkg_configure_meson.cmake | 56 +++++++------ scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 76 +++++++++-------- scripts/get_triplet_environment.cmake | 1 + toolsrc/VERSION.txt | 2 +- toolsrc/include/vcpkg/build.h | 7 ++ toolsrc/include/vcpkg/postbuildlint.buildtype.h | 24 +++--- toolsrc/src/vcpkg/build.cpp | 14 ++++ toolsrc/src/vcpkg/postbuildlint.buildtype.cpp | 2 + toolsrc/src/vcpkg/postbuildlint.cpp | 22 ++--- toolsrc/vcpkg/vcpkg.vcxproj | 3 + toolsrc/vcpkg/vcpkg.vcxproj.filters | 5 ++ 15 files changed, 251 insertions(+), 189 deletions(-) diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index fa264fa51..5d7eee0b3 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -223,33 +223,37 @@ set(B2_OPTIONS_REL ###################### # Perform build + Package ###################### -message(STATUS "Building ${TARGET_TRIPLET}-rel") -set(ENV{BOOST_BUILD_PATH} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -vcpkg_execute_required_process_repeat( - COUNT 2 - COMMAND "${SOURCE_PATH}/b2.exe" - --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage - --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - ${B2_OPTIONS_REL} - variant=release - debug-symbols=on - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME build-${TARGET_TRIPLET}-rel -) -message(STATUS "Building ${TARGET_TRIPLET}-rel done") -message(STATUS "Building ${TARGET_TRIPLET}-dbg") -set(ENV{BOOST_BUILD_PATH} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) -vcpkg_execute_required_process_repeat( - COUNT 2 - COMMAND "${SOURCE_PATH}/b2.exe" - --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage - --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - ${B2_OPTIONS_DBG} - variant=debug - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME build-${TARGET_TRIPLET}-dbg -) -message(STATUS "Building ${TARGET_TRIPLET}-dbg done") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${TARGET_TRIPLET}-rel") + set(ENV{BOOST_BUILD_PATH} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + vcpkg_execute_required_process_repeat( + COUNT 2 + COMMAND "${SOURCE_PATH}/b2.exe" + --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage + --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + ${B2_OPTIONS_REL} + variant=release + debug-symbols=on + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + set(ENV{BOOST_BUILD_PATH} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + vcpkg_execute_required_process_repeat( + COUNT 2 + COMMAND "${SOURCE_PATH}/b2.exe" + --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage + --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + ${B2_OPTIONS_DBG} + variant=debug + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") +endif() message(STATUS "Packaging headers") file( @@ -294,32 +298,36 @@ function(boost_rename_libs LIBS) endforeach() endfunction() -message(STATUS "Packaging ${TARGET_TRIPLET}-rel") -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage/lib/ - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - FILES_MATCHING PATTERN "*.lib") -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Packaging ${TARGET_TRIPLET}-rel") file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage/lib/ - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - FILES_MATCHING PATTERN "*.dll") -endif() -file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*.lib) + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + FILES_MATCHING PATTERN "*.lib") + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage/lib/ + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + FILES_MATCHING PATTERN "*.dll") + endif() + file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*.lib) -boost_rename_libs(RELEASE_LIBS) -message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") + boost_rename_libs(RELEASE_LIBS) + message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") +endif() -message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage/lib/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - FILES_MATCHING PATTERN "*.lib") -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage/lib/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - FILES_MATCHING PATTERN "*.dll") + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + FILES_MATCHING PATTERN "*.lib") + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage/lib/ + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + FILES_MATCHING PATTERN "*.dll") + endif() + file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*.lib) + boost_rename_libs(DEBUG_LIBS) + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") endif() -file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*.lib) -boost_rename_libs(DEBUG_LIBS) -message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") macro(move_to_manual_link LIBNAME) if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/${LIBNAME}-vc140-mt-${VERSION_FULL}.lib) diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 5dc81ec09..0b4bbd211 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -58,19 +58,23 @@ function(vcpkg_build_cmake) set(TARGET_PARAM) endif() - message(STATUS "Build ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release ${TARGET_PARAM} -- ${BUILD_ARGS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME ${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-rel - ) - message(STATUS "Build ${TARGET_TRIPLET}-rel done") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Build ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${CMAKE_COMMAND} --build . --config Release ${TARGET_PARAM} -- ${BUILD_ARGS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME ${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-rel + ) + message(STATUS "Build ${TARGET_TRIPLET}-rel done") + endif() - message(STATUS "Build ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug ${TARGET_PARAM} -- ${BUILD_ARGS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME ${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Build ${TARGET_TRIPLET}-dbg done") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Build ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${CMAKE_COMMAND} --build . --config Debug ${TARGET_PARAM} -- ${BUILD_ARGS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME ${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Build ${TARGET_TRIPLET}-dbg done") + endif() endfunction() diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index 81f442ef7..b8403d277 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -87,25 +87,29 @@ function(vcpkg_build_msbuild) /m ) - message(STATUS "Building ${_csc_PROJECT_PATH} for Release") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - vcpkg_execute_required_process( - COMMAND msbuild ${_csc_PROJECT_PATH} - /p:Configuration=${_csc_RELEASE_CONFIGURATION} - ${_csc_OPTIONS} - ${_csc_OPTIONS_RELEASE} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME build-${TARGET_TRIPLET}-rel - ) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${_csc_PROJECT_PATH} for Release") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + vcpkg_execute_required_process( + COMMAND msbuild ${_csc_PROJECT_PATH} + /p:Configuration=${_csc_RELEASE_CONFIGURATION} + ${_csc_OPTIONS} + ${_csc_OPTIONS_RELEASE} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME build-${TARGET_TRIPLET}-rel + ) + endif() - message(STATUS "Building ${_csc_PROJECT_PATH} for Debug") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - vcpkg_execute_required_process( - COMMAND msbuild ${_csc_PROJECT_PATH} - /p:Configuration=${_csc_DEBUG_CONFIGURATION} - ${_csc_OPTIONS} - ${_csc_OPTIONS_DEBUG} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME build-${TARGET_TRIPLET}-dbg - ) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${_csc_PROJECT_PATH} for Debug") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + vcpkg_execute_required_process( + COMMAND msbuild ${_csc_PROJECT_PATH} + /p:Configuration=${_csc_DEBUG_CONFIGURATION} + ${_csc_OPTIONS} + ${_csc_OPTIONS_DEBUG} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + endif() endfunction() diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index d40550f06..4bcf3d2c9 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -199,29 +199,33 @@ function(vcpkg_configure_cmake) ) endif() - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} - -G ${GENERATOR} - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME config-${TARGET_TRIPLET}-rel - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + vcpkg_execute_required_process( + COMMAND ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} + -G ${GENERATOR} + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + endif() - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} - -G ${GENERATOR} - -DCMAKE_BUILD_TYPE=Debug - -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME config-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + vcpkg_execute_required_process( + COMMAND ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} + -G ${GENERATOR} + -DCMAKE_BUILD_TYPE=Debug + -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + endif() set(_VCPKG_CMAKE_GENERATOR "${GENERATOR}" PARENT_SCOPE) endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_meson.cmake b/scripts/cmake/vcpkg_configure_meson.cmake index 143bb74de..9b87261d5 100644 --- a/scripts/cmake/vcpkg_configure_meson.cmake +++ b/scripts/cmake/vcpkg_configure_meson.cmake @@ -42,31 +42,35 @@ function(vcpkg_configure_meson) set(ENV{PATH} "$ENV{PATH};${NINJA_PATH}") # configure release - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - set(ENV{CFLAGS} "${MESON_COMMON_CFLAGS} ${MESON_RELEASE_CFLAGS}") - set(ENV{CXXFLAGS} "${MESON_COMMON_CXXFLAGS} ${MESON_RELEASE_CXXFLAGS}") - set(ENV{LDFLAGS} "${MESON_COMMON_LDFLAGS} ${MESON_RELEASE_LDFLAGS}") - set(ENV{CPPFLAGS} "${MESON_COMMON_CPPFLAGS} ${MESON_RELEASE_CPPFLAGS}") - vcpkg_execute_required_process( - COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_RELEASE} ${_vcm_SOURCE_PATH} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME config-${TARGET_TRIPLET}-rel - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - - # configure debug - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - set(ENV{CFLAGS} "${MESON_COMMON_CFLAGS} ${MESON_DEBUG_CFLAGS}") - set(ENV{CXXFLAGS} "${MESON_COMMON_CXXFLAGS} ${MESON_DEBUG_CXXFLAGS}") - set(ENV{LDFLAGS} "${MESON_COMMON_LDFLAGS} ${MESON_DEBUG_LDFLAGS}") - set(ENV{CPPFLAGS} "${MESON_COMMON_CPPFLAGS} ${MESON_DEBUG_CPPFLAGS}") - vcpkg_execute_required_process( - COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_DEBUG} ${_vcm_SOURCE_PATH} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME config-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + set(ENV{CFLAGS} "${MESON_COMMON_CFLAGS} ${MESON_RELEASE_CFLAGS}") + set(ENV{CXXFLAGS} "${MESON_COMMON_CXXFLAGS} ${MESON_RELEASE_CXXFLAGS}") + set(ENV{LDFLAGS} "${MESON_COMMON_LDFLAGS} ${MESON_RELEASE_LDFLAGS}") + set(ENV{CPPFLAGS} "${MESON_COMMON_CPPFLAGS} ${MESON_RELEASE_CPPFLAGS}") + vcpkg_execute_required_process( + COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_RELEASE} ${_vcm_SOURCE_PATH} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # configure debug + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + set(ENV{CFLAGS} "${MESON_COMMON_CFLAGS} ${MESON_DEBUG_CFLAGS}") + set(ENV{CXXFLAGS} "${MESON_COMMON_CXXFLAGS} ${MESON_DEBUG_CXXFLAGS}") + set(ENV{LDFLAGS} "${MESON_COMMON_LDFLAGS} ${MESON_DEBUG_LDFLAGS}") + set(ENV{CPPFLAGS} "${MESON_COMMON_CPPFLAGS} ${MESON_DEBUG_CPPFLAGS}") + vcpkg_execute_required_process( + COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_DEBUG} ${_vcm_SOURCE_PATH} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + endif() endfunction() diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 5bf1b2cdb..f86ad0661 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -27,29 +27,33 @@ function(vcpkg_fixup_cmake_targets) set(DEBUG_CONFIG ${CURRENT_PACKAGES_DIR}/debug/${_vfct_CONFIG_PATH}) set(RELEASE_CONFIG ${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}) - if(NOT EXISTS ${DEBUG_CONFIG}) - message(FATAL_ERROR "'${DEBUG_CONFIG}' does not exist.") - endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(NOT EXISTS ${DEBUG_CONFIG}) + message(FATAL_ERROR "'${DEBUG_CONFIG}' does not exist.") + endif() - file(MAKE_DIRECTORY ${DEBUG_SHARE}) - file(GLOB FILES ${DEBUG_CONFIG}/*) - file(COPY ${FILES} DESTINATION ${DEBUG_SHARE}) - file(REMOVE_RECURSE ${DEBUG_CONFIG}) + file(MAKE_DIRECTORY ${DEBUG_SHARE}) + file(GLOB FILES ${DEBUG_CONFIG}/*) + file(COPY ${FILES} DESTINATION ${DEBUG_SHARE}) + file(REMOVE_RECURSE ${DEBUG_CONFIG}) + endif() file(GLOB FILES ${RELEASE_CONFIG}/*) file(COPY ${FILES} DESTINATION ${RELEASE_SHARE}) file(REMOVE_RECURSE ${RELEASE_CONFIG}) - get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG} NAME) - string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) - if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake") - file(REMOVE_RECURSE ${DEBUG_CONFIG}) - else() - get_filename_component(DEBUG_CONFIG_PARENT_DIR ${DEBUG_CONFIG} DIRECTORY) - get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG_PARENT_DIR} NAME) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG} NAME) string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake") - file(REMOVE_RECURSE ${DEBUG_CONFIG_PARENT_DIR}) + file(REMOVE_RECURSE ${DEBUG_CONFIG}) + else() + get_filename_component(DEBUG_CONFIG_PARENT_DIR ${DEBUG_CONFIG} DIRECTORY) + get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG_PARENT_DIR} NAME) + string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) + if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake") + file(REMOVE_RECURSE ${DEBUG_CONFIG_PARENT_DIR}) + endif() endif() endif() @@ -67,8 +71,10 @@ function(vcpkg_fixup_cmake_targets) endif() endif() - if(NOT EXISTS ${DEBUG_SHARE}) - message(FATAL_ERROR "'${DEBUG_SHARE}' does not exist.") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(NOT EXISTS ${DEBUG_SHARE}) + message(FATAL_ERROR "'${DEBUG_SHARE}' does not exist.") + endif() endif() file(GLOB UNUSED_FILES @@ -94,23 +100,25 @@ function(vcpkg_fixup_cmake_targets) file(WRITE ${RELEASE_TARGET} "${_contents}") endforeach() - file(GLOB DEBUG_TARGETS - "${DEBUG_SHARE}/*[Tt]argets-debug.cmake" - "${DEBUG_SHARE}/*[Cc]onfig-debug.cmake" - "${DEBUG_SHARE}/*[Ee]xports-debug.cmake" - ) - foreach(DEBUG_TARGET ${DEBUG_TARGETS}) - get_filename_component(DEBUG_TARGET_NAME ${DEBUG_TARGET} NAME) - - 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(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" _contents "${_contents}") - string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/${DEBUG_TARGET_NAME} "${_contents}") - - file(REMOVE ${DEBUG_TARGET}) - endforeach() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(GLOB DEBUG_TARGETS + "${DEBUG_SHARE}/*[Tt]argets-debug.cmake" + "${DEBUG_SHARE}/*[Cc]onfig-debug.cmake" + "${DEBUG_SHARE}/*[Ee]xports-debug.cmake" + ) + foreach(DEBUG_TARGET ${DEBUG_TARGETS}) + get_filename_component(DEBUG_TARGET_NAME ${DEBUG_TARGET} NAME) + + 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(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" _contents "${_contents}") + string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/${DEBUG_TARGET_NAME} "${_contents}") + + file(REMOVE ${DEBUG_TARGET}) + endforeach() + endif() file(GLOB MAIN_TARGETS "${RELEASE_SHARE}/*[Tt]argets.cmake") foreach(MAIN_TARGET ${MAIN_TARGETS}) diff --git a/scripts/get_triplet_environment.cmake b/scripts/get_triplet_environment.cmake index d498edf4a..bc79b16ce 100644 --- a/scripts/get_triplet_environment.cmake +++ b/scripts/get_triplet_environment.cmake @@ -8,3 +8,4 @@ message("VCPKG_CMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") 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}") diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index d7db639a5..b9553cc3e 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.97" \ No newline at end of file +"0.0.98" \ No newline at end of file diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 09e74905f..18408e207 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -44,6 +44,12 @@ namespace vcpkg::Build YES }; + enum class ConfigurationType + { + DEBUG, + RELEASE, + }; + struct BuildPackageOptions { UseHeadVersion use_head_version; @@ -90,6 +96,7 @@ namespace vcpkg::Build Optional platform_toolset; Optional visual_studio_path; Optional external_toolchain_file; + Optional build_type; }; std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset); diff --git a/toolsrc/include/vcpkg/postbuildlint.buildtype.h b/toolsrc/include/vcpkg/postbuildlint.buildtype.h index ff651fd7a..0b469d9a0 100644 --- a/toolsrc/include/vcpkg/postbuildlint.buildtype.h +++ b/toolsrc/include/vcpkg/postbuildlint.buildtype.h @@ -8,12 +8,6 @@ namespace vcpkg::PostBuildLint { - enum class ConfigurationType - { - DEBUG, - RELEASE, - }; - struct BuildType { enum class BackingEnum @@ -24,12 +18,12 @@ namespace vcpkg::PostBuildLint RELEASE_DYNAMIC }; - static BuildType value_of(const ConfigurationType& config, const Build::LinkageType& linkage); + static BuildType value_of(const Build::ConfigurationType& config, const Build::LinkageType& linkage); BuildType() = delete; constexpr BuildType(const BackingEnum backing_enum, - const ConfigurationType config, + const Build::ConfigurationType config, const Build::LinkageType linkage) : backing_enum(backing_enum), m_config(config), m_linkage(linkage) { @@ -37,14 +31,14 @@ namespace vcpkg::PostBuildLint constexpr operator BackingEnum() const { return backing_enum; } - const ConfigurationType& config() const; + const Build::ConfigurationType& config() const; const Build::LinkageType& linkage() const; const std::regex& crt_regex() const; const std::string& to_string() const; private: BackingEnum backing_enum; - ConfigurationType m_config; + Build::ConfigurationType m_config; Build::LinkageType m_linkage; }; @@ -55,12 +49,14 @@ namespace vcpkg::PostBuildLint static constexpr CStringView ENUM_NAME = "vcpkg::PostBuildLint::BuildType"; - static constexpr BuildType DEBUG_STATIC = {BE::DEBUG_STATIC, ConfigurationType::DEBUG, LinkageType::STATIC}; - static constexpr BuildType DEBUG_DYNAMIC = {BE::DEBUG_DYNAMIC, ConfigurationType::DEBUG, LinkageType::DYNAMIC}; + static constexpr BuildType DEBUG_STATIC = { + BE::DEBUG_STATIC, Build::ConfigurationType::DEBUG, LinkageType::STATIC}; + static constexpr BuildType DEBUG_DYNAMIC = { + BE::DEBUG_DYNAMIC, Build::ConfigurationType::DEBUG, LinkageType::DYNAMIC}; static constexpr BuildType RELEASE_STATIC = { - BE::RELEASE_STATIC, ConfigurationType::RELEASE, LinkageType::STATIC}; + BE::RELEASE_STATIC, Build::ConfigurationType::RELEASE, LinkageType::STATIC}; static constexpr BuildType RELEASE_DYNAMIC = { - BE::RELEASE_DYNAMIC, ConfigurationType::RELEASE, LinkageType::DYNAMIC}; + BE::RELEASE_DYNAMIC, Build::ConfigurationType::RELEASE, LinkageType::DYNAMIC}; static constexpr std::array VALUES = { DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC}; diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index fd605ac08..6ef72b639 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -565,6 +565,20 @@ namespace vcpkg::Build 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); } diff --git a/toolsrc/src/vcpkg/postbuildlint.buildtype.cpp b/toolsrc/src/vcpkg/postbuildlint.buildtype.cpp index 2baaddb5e..e966ce78a 100644 --- a/toolsrc/src/vcpkg/postbuildlint.buildtype.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.buildtype.cpp @@ -3,6 +3,8 @@ #include #include +using vcpkg::Build::ConfigurationType; + namespace vcpkg::PostBuildLint { BuildType BuildType::value_of(const ConfigurationType& config, const Build::LinkageType& linkage) diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp index 10af41bb0..0532bce58 100644 --- a/toolsrc/src/vcpkg/postbuildlint.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -758,7 +758,8 @@ namespace vcpkg::PostBuildLint std::vector release_libs = fs.get_files_recursive(release_lib_dir); Util::unstable_keep_if(release_libs, has_extension_pred(fs, ".lib")); - error_count += check_matching_debug_and_release_binaries(debug_libs, release_libs); + if (!pre_build_info.build_type) + error_count += check_matching_debug_and_release_binaries(debug_libs, release_libs); { std::vector libs; @@ -777,7 +778,8 @@ namespace vcpkg::PostBuildLint { case Build::LinkageType::DYNAMIC: { - error_count += check_matching_debug_and_release_binaries(debug_dlls, release_dlls); + if (!pre_build_info.build_type) + error_count += check_matching_debug_and_release_binaries(debug_dlls, release_dlls); error_count += check_lib_files_are_available_if_dlls_are_available( build_info.policies, debug_libs.size(), debug_dlls.size(), debug_lib_dir); @@ -805,15 +807,15 @@ namespace vcpkg::PostBuildLint if (!build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT)) { - error_count += - check_crt_linkage_of_libs(BuildType::value_of(ConfigurationType::DEBUG, build_info.crt_linkage), - debug_libs, - toolset.dumpbin); + error_count += check_crt_linkage_of_libs( + BuildType::value_of(Build::ConfigurationType::DEBUG, build_info.crt_linkage), + debug_libs, + toolset.dumpbin); } - error_count += - check_crt_linkage_of_libs(BuildType::value_of(ConfigurationType::RELEASE, build_info.crt_linkage), - release_libs, - toolset.dumpbin); + error_count += check_crt_linkage_of_libs( + BuildType::value_of(Build::ConfigurationType::RELEASE, build_info.crt_linkage), + release_libs, + toolset.dumpbin); break; } default: Checks::unreachable(VCPKG_LINE_INFO); diff --git a/toolsrc/vcpkg/vcpkg.vcxproj b/toolsrc/vcpkg/vcpkg.vcxproj index fd8e5d33e..d15e8dd44 100644 --- a/toolsrc/vcpkg/vcpkg.vcxproj +++ b/toolsrc/vcpkg/vcpkg.vcxproj @@ -138,6 +138,9 @@ + + + diff --git a/toolsrc/vcpkg/vcpkg.vcxproj.filters b/toolsrc/vcpkg/vcpkg.vcxproj.filters index ca9723bbf..45a6238f6 100644 --- a/toolsrc/vcpkg/vcpkg.vcxproj.filters +++ b/toolsrc/vcpkg/vcpkg.vcxproj.filters @@ -19,4 +19,9 @@ Source Files + + + Source Files + + \ No newline at end of file -- cgit v1.2.3 From 56a47f6339c239d2dcffaf96a1dddbe1b4176905 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sat, 25 Nov 2017 17:48:26 -0600 Subject: [fftw] remove fftw3 directory if it exists --- ports/fftw3/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/fftw3/portfile.cmake b/ports/fftw3/portfile.cmake index 973cf7dbe..9bf6b3a58 100644 --- a/ports/fftw3/portfile.cmake +++ b/ports/fftw3/portfile.cmake @@ -24,6 +24,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(COPY ${SOURCE_PATH}/api/fftw3.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/fftw3) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/fftw3) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -- cgit v1.2.3 From 14cbe496bcc136aac590f10d79848ec224088e85 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 25 Nov 2017 15:53:32 -0800 Subject: [vcpkg] Allow compilation inside WSL --- ports/zlib/portfile.cmake | 6 ++++-- scripts/buildsystems/vcpkg.cmake | 8 ++++++-- toolsrc/CMakeLists.txt | 14 ++++++++++++++ toolsrc/src/vcpkg/vcpkgpaths.cpp | 8 ++++++++ 4 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 toolsrc/CMakeLists.txt diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index ec8b05ffc..963b86d24 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -27,8 +27,10 @@ vcpkg_install_cmake() # Both dynamic and static are built, so keep only the one needed if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib ${CURRENT_PACKAGES_DIR}/lib/zlib.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zlibd.lib) + if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib ${CURRENT_PACKAGES_DIR}/lib/zlib.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zlibd.lib) + endif() endif() file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/zlib RENAME copyright) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 4d82c43b7..8edc2830c 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -42,6 +42,8 @@ else() set(_VCPKG_TARGET_TRIPLET_ARCH arm) elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) + elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(_VCPKG_TARGET_TRIPLET_ARCH x64) else() message(FATAL_ERROR "Unable to determine target architecture.") endif() @@ -50,6 +52,8 @@ endif() if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") set(_VCPKG_TARGET_TRIPLET_PLAT uwp) +elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(_VCPKG_TARGET_TRIPLET_PLAT linux) else() set(_VCPKG_TARGET_TRIPLET_PLAT windows) endif() @@ -93,7 +97,7 @@ list(APPEND CMAKE_LIBRARY_PATH set(Boost_COMPILER "-vc140") -if (NOT DEFINED CMAKE_SYSTEM_VERSION) +if (NOT DEFINED CMAKE_SYSTEM_VERSION AND _VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp") include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake) # This is used as an implicit parameter for vcpkg_get_windows_sdk set(VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR}) @@ -134,7 +138,7 @@ function(add_executable name) list(FIND ARGV "IMPORTED" IMPORTED_IDX) list(FIND ARGV "ALIAS" ALIAS_IDX) if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) - if(VCPKG_APPLOCAL_DEPS) + if(VCPKG_APPLOCAL_DEPS AND _VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp") add_custom_command(TARGET ${name} POST_BUILD COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 -targetBinary $ diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt new file mode 100644 index 000000000..af281f12f --- /dev/null +++ b/toolsrc/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.3) +project(vcpkg CXX) + +add_compile_options(-std=c++1z) + +file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp) + +add_library(vcpkglib STATIC ${VCPKGLIB_SOURCES}) +target_compile_definitions(vcpkglib PRIVATE -DDISABLE_METRICS=0) +target_include_directories(vcpkglib PUBLIC include) +target_link_libraries(vcpkglib PRIVATE stdc++fs) + +add_executable(vcpkg src/vcpkg.cpp) +target_link_libraries(vcpkg PRIVATE vcpkglib) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 0114b51b8..016f26f6d 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -113,7 +113,11 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { +#if defined(_WIN32) static constexpr std::array EXPECTED_VERSION = {3, 9, 5}; +#else + static constexpr std::array EXPECTED_VERSION = {3, 5, 1}; +#endif static const std::string VERSION_CHECK_ARGUMENTS = "--version"; const std::vector from_path = Files::find_from_PATH("cmake"); @@ -161,7 +165,11 @@ namespace vcpkg fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { +#if defined(_WIN32) static constexpr std::array EXPECTED_VERSION = {2, 15, 0}; +#else + static constexpr std::array EXPECTED_VERSION = {2, 7, 4}; +#endif static const std::string VERSION_CHECK_ARGUMENTS = "--version"; const std::vector from_path = Files::find_from_PATH("git"); -- cgit v1.2.3 From 8883e40aaadbba91610342fda42d304a4cad0e68 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 26 Nov 2017 01:31:58 -0800 Subject: vcpkgCreateDirectory->vcpkgCreateDirectoryIfNotExists --- scripts/VcpkgPowershellUtils.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 0b1a35262..d32c3ae6b 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -3,7 +3,7 @@ function vcpkgHasModule([Parameter(Mandatory=$true)][string]$moduleName) return [bool](Get-Module -ListAvailable -Name $moduleName) } -function vcpkgCreateDirectory([Parameter(Mandatory=$true)][string]$dirPath) +function vcpkgCreateDirectoryIfNotExists([Parameter(Mandatory=$true)][string]$dirPath) { if (!(Test-Path $dirPath)) { @@ -102,7 +102,7 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, } $downloadDir = split-path -parent $downloadPath - vcpkgCreateDirectory $downloadDir + vcpkgCreateDirectoryIfNotExists $downloadDir $downloadPartPath = "$downloadPath.part" vcpkgRemoveFile $downloadPartPath @@ -144,12 +144,12 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, [Parameter(Mandatory=$true)][string]$destinationDir) { $parentPath = split-path -parent $destinationDir - vcpkgCreateDirectory $parentPath + vcpkgCreateDirectoryIfNotExists $parentPath $baseName = (Get-ChildItem $file).BaseName $destinationPartial = "$destinationDir\$baseName-partially_extracted" vcpkgRemoveDirectory $destinationPartial - vcpkgCreateDirectory $destinationPartial + vcpkgCreateDirectoryIfNotExists $destinationPartial if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') { -- cgit v1.2.3 From 92872439b9e76ec881edae187d5fb137f02ce39b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 26 Nov 2017 01:32:09 -0800 Subject: [fetchDependency[ Make parameter mandatory --- scripts/fetchDependency.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 596845acb..6e022928f 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -1,6 +1,6 @@ [CmdletBinding()] param( - [string]$Dependency + [Parameter(Mandatory=$true)][string]$Dependency ) $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -- cgit v1.2.3 From 2af7fe8690a9b78f1eab1e532670ed133f82aff9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 26 Nov 2017 02:49:23 -0800 Subject: Add System::powershell_execute() --- toolsrc/include/vcpkg/base/system.h | 4 ++++ toolsrc/src/vcpkg/base/system.cpp | 43 +++++++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index db537db4b..31034f6b4 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -44,6 +44,10 @@ namespace vcpkg::System ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line); + void powershell_execute(const std::string& title, + const fs::path& script_path, + const std::vector& parameters = {}); + std::string powershell_execute_and_capture_output(const std::string& title, const fs::path& script_path, const std::vector& parameters = {}); diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 9d8e1ce84..e3d3ad292 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -119,6 +119,16 @@ namespace vcpkg::System { } + static std::string make_powershell_cmd(const fs::path& script_path, + const std::vector& parameters) + { + const std::string args = Strings::join(" ", parameters, [](auto&& v) { return v.s; }); + + // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned + return Strings::format( + R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), args); + } + int cmd_execute_clean(const CStringView cmd_line) { #if defined(_WIN32) @@ -317,16 +327,37 @@ namespace vcpkg::System #endif } + void powershell_execute(const std::string& title, + const fs::path& script_path, + const std::vector& parameters) + { + const std::string cmd = make_powershell_cmd(script_path, parameters); + const int rc = System::cmd_execute(cmd); + + if (rc) + { + System::println(Color::error, + "%s\n" + "Could not run:\n" + " '%s'", + title, + script_path.generic_string()); + + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_property("error", "powershell script failed"); + locked_metrics->track_property("title", title); + } + + Checks::exit_with_code(VCPKG_LINE_INFO, rc); + } + } + std::string powershell_execute_and_capture_output(const std::string& title, const fs::path& script_path, const std::vector& parameters) { - const std::string args = Strings::join(" ", parameters, [](auto&& v) { return v.s; }); - - // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned - const std::string cmd = Strings::format( - R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), args); - + const std::string cmd = make_powershell_cmd(script_path, parameters); auto rc = System::cmd_execute_and_capture_output(cmd); if (rc.exit_code) -- cgit v1.2.3 From e009618ba0850ef54e837e8fb76910245d99b456 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sun, 26 Nov 2017 14:18:35 +0300 Subject: [cmake] update to 3.10.0 (#2236) --- README.md | 2 +- scripts/fetchDependency.ps1 | 12 ++++++------ toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 30d193892..bf7d7b0ea 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Prerequisites: - Windows 10, 8.1, or 7 - Visual Studio 2017 or Visual Studio 2015 Update 3 - Git -- *Optional: CMake 3.9.5* +- *Optional: CMake 3.10.0* Clone this repository, then run ``` diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6e022928f..744439bb7 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -20,12 +20,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.9.5" - $downloadVersion = "3.9.5" - $url = "https://cmake.org/files/v3.9/cmake-3.9.5-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.9.5-win32-x86.zip" - $expectedDownloadedFileHash = "dd3e183254c12f7c338d3edfa642f1ac84a763b8b9a2feabb4ad5fccece5dff9" - $executableFromDownload = "$downloadsDir\cmake-3.9.5-win32-x86\bin\cmake.exe" + $requiredVersion = "3.10.0" + $downloadVersion = "3.10.0" + $url = "https://cmake.org/files/v3.10/cmake-3.10.0-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.10.0-win32-x86.zip" + $expectedDownloadedFileHash = "dce666e897f95a88d3eed6cddd1faa3f44179d519b33ca6065b385bbc7072419" + $executableFromDownload = "$downloadsDir\cmake-3.10.0-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP } elseif($Dependency -eq "nuget") diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 016f26f6d..d5763921e 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -114,7 +114,7 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { #if defined(_WIN32) - static constexpr std::array EXPECTED_VERSION = {3, 9, 5}; + static constexpr std::array EXPECTED_VERSION = {3, 10, 0}; #else static constexpr std::array EXPECTED_VERSION = {3, 5, 1}; #endif @@ -123,7 +123,7 @@ namespace vcpkg const std::vector from_path = Files::find_from_PATH("cmake"); std::vector candidate_paths; - const fs::path downloaded_copy = downloads_folder / "cmake-3.9.5-win32-x86" / "bin" / "cmake.exe"; + const fs::path downloaded_copy = downloads_folder / "cmake-3.10.0-win32-x86" / "bin" / "cmake.exe"; #if defined(_WIN32) candidate_paths.push_back(downloaded_copy); #endif -- cgit v1.2.3 From 7da4a498b3bf6686c1b08abafb59ab2e14cee681 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 26 Nov 2017 03:38:40 -0800 Subject: Update CHANGELOG and bump version to v0.0.99 --- CHANGELOG.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f45365ee..491e4b9c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,50 @@ +vcpkg (0.0.99) +-------------- + * Add ports: + - avro-c 1.8.2 + - devil 1.8.0-1 + - halide release_2017_10_30 + - librabbitmq 0.8.0 + - openvdb 5.0.0 + - qpid-proton 0.18.1 + - unittest-cpp 2.0.0 + * Update ports: + - alembic 1.7.4 -> 1.7.4-1 + - angle 2017-06-14-8d471f-2 -> 2017-06-14-8d471f-4 + - aubio 0.46~alpha-3 -> 0.46 + - date 2.2 -> 2.3-c286981b3bf83c79554769df68b27415cee68d77 + - fftw3 3.3.7 -> 3.3.7-1 + - grpc 1.7.0 -> 1.7.2 + - imgui 1.51-1 -> 1.52 + - lcms 2.8-3 -> 2.8-4 + - leptonica 1.74.4-1 -> 1.74.4-2 + - leveldb 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73 -> 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-1 + - libflac 1.3.2-3 -> 1.3.2-4 + - libiconv 1.14-1 -> 1.15 + - libsndfile 1.0.29-6830c42-1 -> 1.0.29-6830c42-2 + - libssh2 1.8.0-2 -> 1.8.0-3 + - llvm 5.0.0-1 -> 5.0.0-2 + - mpfr 3.1.6 -> 3.1.6-1 + - ogre 1.9.0-1 -> 1.10.9-2 + - opencv 3.3.1-7 -> 3.3.1-9 + - opengl 0.0-3 -> 0.0-4 + - pcl 1.8.1-4 -> 1.8.1-7 + - protobuf 3.4.1-2 -> 3.5.0-1 + - qhull 2015.2-1 -> 2015.2-2 + - realsense2 2.8.1 -> 2.8.2 + - redshell 1.0.0 -> 1.1.2 + - sdl2 2.0.7-1 -> 2.0.7-3 + - string-theory 1.6 -> 1.6-1 + - tesseract 3.05.01-1 -> 3.05.01-2 + * `vcpkg` now autodetects CMake usage information in libraries and displays it after install + * `vcpkg integrate install`: Fix issue that would cause failure with unicode usernames + * Introduce experimental support for `VCPKG_BUILD_TYPE`. Adding `set(VCPKG_BUILD_TYPE release)` in a triplet: will cause *most* ports to only build release + * `vcpkg` now compiles inside WSL + * Update required version & auto-downloaded version of `cmake` to 3.10.0 + +-- vcpkg team SAT, 26 Nov 2017 03:30:00 -0800 + + vcpkg (0.0.97) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index b9553cc3e..2f0f54a23 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.98" \ No newline at end of file +"0.0.99" \ No newline at end of file -- cgit v1.2.3 From 530aadc6e230411d94f3428d5bdbd66f50217633 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Mon, 27 Nov 2017 00:51:32 +0900 Subject: Add install googletest/src Add install googletest/src directory for project that desirable to build Google Test by compiling a single file. --- ports/gtest/CONTROL | 2 +- ports/gtest/portfile.cmake | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index 77082f5cb..5afef043c 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,3 +1,3 @@ Source: gtest -Version: 1.8-1 +Version: 1.8.0-2 Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index 491d6a8d5..88b23a022 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -32,6 +32,22 @@ set(ENV{_CL_} "/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING") vcpkg_install_cmake() +file( + INSTALL + "${SOURCE_PATH}/googletest/src/gtest.cc" + "${SOURCE_PATH}/googletest/src/gtest_main.cc" + "${SOURCE_PATH}/googletest/src/gtest-all.cc" + "${SOURCE_PATH}/googletest/src/gtest-death-test.cc" + "${SOURCE_PATH}/googletest/src/gtest-filepath.cc" + "${SOURCE_PATH}/googletest/src/gtest-internal-inl.h" + "${SOURCE_PATH}/googletest/src/gtest-port.cc" + "${SOURCE_PATH}/googletest/src/gtest-printers.cc" + "${SOURCE_PATH}/googletest/src/gtest-test-part.cc" + "${SOURCE_PATH}/googletest/src/gtest-typed-test.cc" + DESTINATION + ${CURRENT_PACKAGES_DIR}/src +) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/googletest/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtest RENAME copyright) -- cgit v1.2.3 From 97101d4bd500d3784f3cd9524dbdaa1ef45978d3 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 25 Nov 2017 17:06:51 -0800 Subject: [fftw3] Detect stale sources --- ports/fftw3/portfile.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ports/fftw3/portfile.cmake b/ports/fftw3/portfile.cmake index 973cf7dbe..317046635 100644 --- a/ports/fftw3/portfile.cmake +++ b/ports/fftw3/portfile.cmake @@ -1,5 +1,14 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fftw-3.3.7) + +# This can be removed in the next source code update +if(EXISTS "${SOURCE_PATH}/CMakeLists.txt") + file(READ "${SOURCE_PATH}/CMakeLists.txt" _contents) + if("${_contents}" MATCHES "-D_OPENMP -DLIBFFTWF33_EXPORTS /openmp /bigobj") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) + endif() +endif() + vcpkg_download_distfile(ARCHIVE URLS "http://www.fftw.org/fftw-3.3.7.tar.gz" FILENAME "fftw-3.3.7.tar.gz" -- cgit v1.2.3 From 7938006022d38176c2a9c7dd2829385559491ee0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 26 Nov 2017 10:28:16 -0800 Subject: [ports] Mark several ports as unbuildable on UWP --- ports/abseil/portfile.cmake | 3 --- ports/ace/portfile.cmake | 4 ++++ ports/alac/portfile.cmake | 4 ++++ ports/antlr4/portfile.cmake | 4 ++++ ports/apr/portfile.cmake | 10 +++------- ports/azure-storage-cpp/portfile.cmake | 4 ++++ ports/benchmark/portfile.cmake | 4 ++++ ports/berkeleydb/portfile.cmake | 4 ++++ ports/cctz/portfile.cmake | 4 ++++ ports/expat/portfile.cmake | 4 ++++ ports/flatbuffers/portfile.cmake | 12 ++++-------- ports/gflags/portfile.cmake | 5 ++++- ports/hdf5/portfile.cmake | 4 ++++ ports/liblzma/portfile.cmake | 3 +++ ports/physfs/portfile.cmake | 4 ++++ ports/pthreads/portfile.cmake | 4 ++++ 16 files changed, 58 insertions(+), 19 deletions(-) diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index a6efa08b5..639983fc0 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -4,9 +4,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "Abseil currently only supports being built for desktop") endif() -message("NOTE: THIS PORT IS USING AN UNOFFICIAL BUILDSYSTEM. THE BINARY LAYOUT AND CMAKE INTEGRATION WILL CHANGE IN THE FUTURE.") -message("To use from cmake:\n find_package(unofficial-abseil REQUIRED)\n link_libraries(unofficial::abseil::strings)") - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake index fece3ebcc..a601f1205 100644 --- a/ports/ace/portfile.cmake +++ b/ports/ace/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) message(STATUS "Warning: Static building not supported yet. Building dynamic.") set(VCPKG_LIBRARY_LINKAGE dynamic) diff --git a/ports/alac/portfile.cmake b/ports/alac/portfile.cmake index c04e3a7d1..309ebfef9 100644 --- a/ports/alac/portfile.cmake +++ b/ports/alac/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH diff --git a/ports/antlr4/portfile.cmake b/ports/antlr4/portfile.cmake index d344e9d06..0d77208e0 100644 --- a/ports/antlr4/portfile.cmake +++ b/ports/antlr4/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + include(vcpkg_common_functions) set(VERSION 4.7) diff --git a/ports/apr/portfile.cmake b/ports/apr/portfile.cmake index 64ad02b81..22bd260c8 100644 --- a/ports/apr/portfile.cmake +++ b/ports/apr/portfile.cmake @@ -1,10 +1,6 @@ -# 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} -# +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() include(vcpkg_common_functions) diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index 7359f3bc7..32f05221d 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + include(vcpkg_common_functions) vcpkg_from_github( diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake index c3159ef8b..e394157e3 100644 --- a/ports/benchmark/portfile.cmake +++ b/ports/benchmark/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + if(VCPKG_CRT_LINKAGE STREQUAL static) message(FATAL_ERROR "Google benchmark only supports dynamic crt linkage.") endif() diff --git a/ports/berkeleydb/portfile.cmake b/ports/berkeleydb/portfile.cmake index 6a7e30a05..38f383d7b 100644 --- a/ports/berkeleydb/portfile.cmake +++ b/ports/berkeleydb/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/db-4.8.30.NC) diff --git a/ports/cctz/portfile.cmake b/ports/cctz/portfile.cmake index 11955b365..c0bfc9720 100644 --- a/ports/cctz/portfile.cmake +++ b/ports/cctz/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index da6ddc429..66a714817 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH diff --git a/ports/flatbuffers/portfile.cmake b/ports/flatbuffers/portfile.cmake index b785e2fc5..4df390de0 100644 --- a/ports/flatbuffers/portfile.cmake +++ b/ports/flatbuffers/portfile.cmake @@ -1,11 +1,3 @@ -# 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} -# - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") message("Building DLLs not supported. Building static instead.") set(VCPKG_LIBRARY_LINKAGE static) @@ -20,6 +12,10 @@ vcpkg_from_github( HEAD_REF master ) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + list(APPEND OPTIONS -DFLATBUFFERS_BUILD_FLATC=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF) +endif() + set(OPTIONS) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") list(APPEND OPTIONS -DFLATBUFFERS_BUILD_SHAREDLIB=ON) diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index 463b6d9b2..13d9a831b 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -1,5 +1,8 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + include(vcpkg_common_functions) -find_program(GIT git) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH diff --git a/ports/hdf5/portfile.cmake b/ports/hdf5/portfile.cmake index d9682b0f7..000ed6a31 100644 --- a/ports/hdf5/portfile.cmake +++ b/ports/hdf5/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CMake-hdf5-1.10.0-patch1/hdf5-1.10.0-patch1) vcpkg_download_distfile(ARCHIVE diff --git a/ports/liblzma/portfile.cmake b/ports/liblzma/portfile.cmake index 6185815f4..be7e494ad 100644 --- a/ports/liblzma/portfile.cmake +++ b/ports/liblzma/portfile.cmake @@ -1,3 +1,6 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xz-5.2.3) diff --git a/ports/physfs/portfile.cmake b/ports/physfs/portfile.cmake index 4e00a43fc..c6233eed3 100644 --- a/ports/physfs/portfile.cmake +++ b/ports/physfs/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + include(vcpkg_common_functions) set(PHYSFS_VERSION 2.0.3) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/physfs-${PHYSFS_VERSION}) diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index cddb3f411..2f540316e 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pthreads-w32-2-9-1-release) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From dc83d0409c8acaf313a7e1808ac14bf0b5599f7f Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 26 Nov 2017 14:52:30 -0600 Subject: [arb] prefer ninja --- ports/arb/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/arb/portfile.cmake b/ports/arb/portfile.cmake index 9b621723b..32bb3a23b 100644 --- a/ports/arb/portfile.cmake +++ b/ports/arb/portfile.cmake @@ -18,6 +18,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() -- cgit v1.2.3 From 10ab5ec665e5da6d92c9767d26e7a8971fc8e65d Mon Sep 17 00:00:00 2001 From: Frank Quinn Date: Sun, 26 Nov 2017 23:17:02 +0000 Subject: Added port for OpenMAMA 6.2.1.SNAPSHOT This is a snapshot version since it contains some changes necessary to get vcpkg to play nicely with it. When 6.2.2 is released, this port will be updated with it. --- ports/openmama/CONTROL | 4 +++ ports/openmama/portfile.cmake | 82 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 ports/openmama/CONTROL create mode 100644 ports/openmama/portfile.cmake diff --git a/ports/openmama/CONTROL b/ports/openmama/CONTROL new file mode 100644 index 000000000..fff50fb8a --- /dev/null +++ b/ports/openmama/CONTROL @@ -0,0 +1,4 @@ +Source: openmama +Version: 6.2.1-a5a93a24d2f89a0def0145552c8cd4a53c69e2de +Build-Depends: libevent, apr, qpid-proton +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/openmama/portfile.cmake b/ports/openmama/portfile.cmake new file mode 100644 index 000000000..99417dd80 --- /dev/null +++ b/ports/openmama/portfile.cmake @@ -0,0 +1,82 @@ +include(vcpkg_common_functions) + +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(SCONS) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenMAMA/OpenMAMA + REF a5a93a24d2f89a0def0145552c8cd4a53c69e2de + SHA512 ddce249da470a4b2acda3953a1f8feed93eb1e05ee6048ed798a9f32eaf7ce037d611ff331a8982a8a309d4b09c05a37f9fbe8ca90420751e46f67f7a53a555f + HEAD_REF next +) + +set(OPENMAMA_TARGET_ARCH ${TRIPLET_SYSTEM_ARCH}) +if(${TRIPLET_SYSTEM_ARCH} STREQUAL x64) + set(OPENMAMA_TARGET_ARCH x86_64) +endif() + +# Clean from any previous builds +vcpkg_execute_required_process( + COMMAND ${SCONS} + -c + target_arch=${OPENMAMA_TARGET_ARCH} + libevent_home=${CURRENT_INSTALLED_DIR} + apr_home=${CURRENT_INSTALLED_DIR} + qpid_home=${CURRENT_INSTALLED_DIR} + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clean-${TARGET_TRIPLET}.log +) + +# This build +vcpkg_execute_required_process( + COMMAND ${SCONS} + with_unittest=False + with_examples=False + product=mamda + lex=${FLEX} + middleware=qpid + buildtype=dynamic,dynamic-debug + prefix=\#install + with_dependency_runtimes=False + target_arch=${OPENMAMA_TARGET_ARCH} + libevent_home=${CURRENT_INSTALLED_DIR} + apr_home=${CURRENT_INSTALLED_DIR} + qpid_home=${CURRENT_INSTALLED_DIR} + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}.log +) + +# Remove dependency files which build system creates for convenience +file(REMOVE ${SOURCE_PATH}/install/bin/dynamic/libapr-1.dll) +file(REMOVE ${SOURCE_PATH}/install/bin/dynamic/libapr-1.pdb) +file(REMOVE ${SOURCE_PATH}/install/bin/dynamic-debug/libapr-1.dll) +file(REMOVE ${SOURCE_PATH}/install/bin/dynamic-debug/libapr-1.pdb) +file(REMOVE ${SOURCE_PATH}/install/bin/dynamic/qpid-proton.dll) +file(REMOVE ${SOURCE_PATH}/install/bin/dynamic-debug/qpid-protond.dll) + +# Custom install target - the build system doesn't really +# do prefixes properly and it has a different directory +# structure than vcpkg expects so reorganizing here +file(COPY ${SOURCE_PATH}/install/include + DESTINATION ${CURRENT_PACKAGES_DIR}) +file(COPY ${SOURCE_PATH}/install/lib/dynamic/ + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${SOURCE_PATH}/install/lib/dynamic-debug/ + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(COPY ${SOURCE_PATH}/install/bin/dynamic/ + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + FILES_MATCHING PATTERN "*.dll") +file(COPY ${SOURCE_PATH}/install/bin/dynamic-debug/ + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + FILES_MATCHING PATTERN "*.dll") + +# Copy across license files and copyright +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/openmama) +file(COPY ${SOURCE_PATH}/install/LICENSE.md + ${SOURCE_PATH}/install/LICENSE-3RD-PARTY.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmama/) +file(COPY ${SOURCE_PATH}/install/LICENSE.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmama/copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 488e910260f7f13956186ec66e0910a152bf5d2e Mon Sep 17 00:00:00 2001 From: Marc Gallagher Date: Sun, 26 Nov 2017 22:32:23 -0800 Subject: Install cmake files so find_package works --- ports/pugixml/CONTROL | 2 +- ports/pugixml/portfile.cmake | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ports/pugixml/CONTROL b/ports/pugixml/CONTROL index 01679ea6e..eb1f4e634 100644 --- a/ports/pugixml/CONTROL +++ b/ports/pugixml/CONTROL @@ -1,3 +1,3 @@ Source: pugixml -Version: 1.8.1-2 +Version: 1.8.1-3 Description: C++ XML processing library diff --git a/ports/pugixml/portfile.cmake b/ports/pugixml/portfile.cmake index 0d5123974..889063223 100644 --- a/ports/pugixml/portfile.cmake +++ b/ports/pugixml/portfile.cmake @@ -26,8 +26,7 @@ endif() vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/pugixml") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pugixml RENAME copyright) \ No newline at end of file +file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pugixml RENAME copyright) -- cgit v1.2.3 From c4c079f86eac8215040173d6707900d8983ea7fc Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 27 Nov 2017 00:25:29 -0800 Subject: [VcpkgPowershellUtils] Minor tweaks --- scripts/VcpkgPowershellUtils.ps1 | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index d32c3ae6b..d431c3b45 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -11,6 +11,20 @@ function vcpkgCreateDirectoryIfNotExists([Parameter(Mandatory=$true)][string]$di } } +function vcpkgCreateParentDirectoryIfNotExists([Parameter(Mandatory=$true)][string]$path) +{ + $parentDir = split-path -parent $path + if ([string]::IsNullOrEmpty($parentDir)) + { + return + } + + if (!(Test-Path $dirPath)) + { + New-Item -ItemType Directory -Path $parentDir | Out-Null + } +} + function vcpkgRemoveDirectory([Parameter(Mandatory=$true)][string]$dirPath) { if (Test-Path $dirPath) @@ -101,8 +115,7 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, return } - $downloadDir = split-path -parent $downloadPath - vcpkgCreateDirectoryIfNotExists $downloadDir + vcpkgCreateParentDirectoryIfNotExists $downloadPath $downloadPartPath = "$downloadPath.part" vcpkgRemoveFile $downloadPartPath @@ -143,10 +156,10 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, [Parameter(Mandatory=$true)][string]$destinationDir) { - $parentPath = split-path -parent $destinationDir - vcpkgCreateDirectoryIfNotExists $parentPath + vcpkgCreateParentDirectoryIfNotExists $destinationDir $baseName = (Get-ChildItem $file).BaseName - $destinationPartial = "$destinationDir\$baseName-partially_extracted" + $destination = "$destinationDir\$baseName" + $destinationPartial = "$destination-partially_extracted" vcpkgRemoveDirectory $destinationPartial vcpkgCreateDirectoryIfNotExists $destinationPartial @@ -179,10 +192,12 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, { Move-Item -Path "$destinationPartial\*" -Destination $destinationDir vcpkgRemoveDirectory $destinationPartial + return $destination } else { Rename-Item -Path $destinationPartial -NewName $baseName + return $destination } } -- cgit v1.2.3 From 2c914ff05af3b2209eb11b6ba61b43eb46033cb3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 27 Nov 2017 00:42:21 -0800 Subject: Rework vcpkgExtractFile (powershell) --- scripts/VcpkgPowershellUtils.ps1 | 12 +++++------- scripts/fetchDependency.ps1 | 3 ++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index d431c3b45..0e53ff620 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -19,7 +19,7 @@ function vcpkgCreateParentDirectoryIfNotExists([Parameter(Mandatory=$true)][stri return } - if (!(Test-Path $dirPath)) + if (!(Test-Path $parentDir)) { New-Item -ItemType Directory -Path $parentDir | Out-Null } @@ -157,9 +157,7 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, [Parameter(Mandatory=$true)][string]$destinationDir) { vcpkgCreateParentDirectoryIfNotExists $destinationDir - $baseName = (Get-ChildItem $file).BaseName - $destination = "$destinationDir\$baseName" - $destinationPartial = "$destination-partially_extracted" + $destinationPartial = "$destinationDir-partially_extracted" vcpkgRemoveDirectory $destinationPartial vcpkgCreateDirectoryIfNotExists $destinationPartial @@ -192,12 +190,12 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, { Move-Item -Path "$destinationPartial\*" -Destination $destinationDir vcpkgRemoveDirectory $destinationPartial - return $destination + return $destinationDir } else { - Rename-Item -Path $destinationPartial -NewName $baseName - return $destination + Move-Item -Path $destinationPartial -Destination $destinationDir + return $destinationDir } } diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 744439bb7..830ec7064 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -88,7 +88,8 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { if (-not (Test-Path $executableFromDownload)) { - vcpkgExtractFile -File $downloadPath -DestinationDir $downloadsDir + $extractFolderName = (Get-ChildItem $downloadPath).BaseName + vcpkgExtractFile -File $downloadPath -DestinationDir "$downloadsDir\$extractFolderName" } } elseif($extractionType -eq $ExtractionType_SELF_EXTRACTING_7Z) -- cgit v1.2.3 From b7c9ef55531cba1c014650dbc5ff33fa1b977b40 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 27 Nov 2017 00:45:00 -0800 Subject: Don't return $destinationDir --- scripts/VcpkgPowershellUtils.ps1 | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 0e53ff620..28e818437 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -190,12 +190,10 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, { Move-Item -Path "$destinationPartial\*" -Destination $destinationDir vcpkgRemoveDirectory $destinationPartial - return $destinationDir } else { Move-Item -Path $destinationPartial -Destination $destinationDir - return $destinationDir } } -- cgit v1.2.3 From 8a55bd8d3bf61e10bd42966228007f930cc8f011 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Tue, 28 Nov 2017 18:18:05 +0800 Subject: [log4cplus] upgrade to v2.0.0rc2. (#2265) --- ports/log4cplus/CONTROL | 3 ++- ports/log4cplus/portfile.cmake | 20 ++++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ports/log4cplus/CONTROL b/ports/log4cplus/CONTROL index 882ee88b8..6dbcb515c 100644 --- a/ports/log4cplus/CONTROL +++ b/ports/log4cplus/CONTROL @@ -1,3 +1,4 @@ Source: log4cplus -Version: REL_1_2_1-RC2-1 +Version: REL_2_0_0-RC2 Description: A simple to use C++ logging API providing thread--safe, flexible, and arbitrarily granular control over log management and configuration +Build-Depends: catch diff --git a/ports/log4cplus/portfile.cmake b/ports/log4cplus/portfile.cmake index c1c5de3e2..ffdd0c3ba 100644 --- a/ports/log4cplus/portfile.cmake +++ b/ports/log4cplus/portfile.cmake @@ -2,11 +2,27 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO log4cplus/log4cplus - REF REL_1_2_1-RC2 - SHA512 480a2a61b01e988253c1bf2bb26088030541a63811c8ffbb9e90581d556b717df5220e3ff72eedd27ea704af35218f71f20ceadf4d6d94984b4f56d273b4d3a3 + REF REL_2_0_0-RC2 + SHA512 34392d85088534e0661e6fa9726c5970647a5acaa559bafb5d3746a70f5baca01012f457d50c15e73d9aca1d3ed9ec99028cc65fab07f73cdadbbc0b4329bcb5 HEAD_REF master ) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/log4cplus/ThreadPool/archive/dda9e3d40502e85ce082c05d2c05c1bc94348b6a.tar.gz" + FILENAME "master.tar.gz" + SHA512 97b5877b9c49d02abfcba4ca1312b833b58e4f0e9884fdcf57c20b7ec58801ed24742c8316512b4de8ab29bae42cc1e34058c0d2443c3a5950a2fb3434f86662 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file( + COPY + ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-master/COPYING + ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-master/example.cpp + ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-master/README.md + ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-master/ThreadPool.h + DESTINATION ${SOURCE_PATH}/threadpool +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA -- cgit v1.2.3 From b9b4ae8641f44296a8f0c3f64366901123d134f2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 28 Nov 2017 02:19:33 -0800 Subject: [log4cplus] Change name of downloaded file --- ports/log4cplus/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/log4cplus/portfile.cmake b/ports/log4cplus/portfile.cmake index ffdd0c3ba..db694315b 100644 --- a/ports/log4cplus/portfile.cmake +++ b/ports/log4cplus/portfile.cmake @@ -9,7 +9,7 @@ vcpkg_from_github( vcpkg_download_distfile(ARCHIVE URLS "https://github.com/log4cplus/ThreadPool/archive/dda9e3d40502e85ce082c05d2c05c1bc94348b6a.tar.gz" - FILENAME "master.tar.gz" + FILENAME "log4cplus-threadpool-97b5877b9c49d02abf.tar.gz" SHA512 97b5877b9c49d02abfcba4ca1312b833b58e4f0e9884fdcf57c20b7ec58801ed24742c8316512b4de8ab29bae42cc1e34058c0d2443c3a5950a2fb3434f86662 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 10ad65ec7d58f9076d070b49995057582607c552 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Wed, 29 Nov 2017 03:11:26 +0900 Subject: Fix find Gtest FindGtest.cmake that include in CMake finds the debug libraries that file name with postfix "d". --- ports/gtest/portfile.cmake | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index 88b23a022..584d9b2ac 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -58,10 +58,10 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/bin/gmock.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/bin/gmock_main.dll) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin/) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_main.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_main.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtestd.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_maind.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmockd.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_maind.dll) endif() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) @@ -70,10 +70,10 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/l file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock_main.lib) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest_main.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_main.lib) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtestd.lib) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest_maind.lib) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmockd.lib) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_maind.lib) vcpkg_copy_pdbs() -- cgit v1.2.3 From cb87b8c11673eb3d5caad698048b71fa058bccc9 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Wed, 29 Nov 2017 03:25:52 +0900 Subject: Enable Ninja build Enable Ninja build. --- ports/gtest/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index 584d9b2ac..2c55d2809 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -25,6 +25,7 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -Dgtest_force_shared_crt=${gtest_force_shared_crt} ) -- cgit v1.2.3 From 8ba327914306a1545c039c0c1b55b962adeeebfb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 28 Nov 2017 10:50:33 -0800 Subject: [vcpkg] Use c++experimental in clang --- toolsrc/CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index af281f12f..0325160ee 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -1,14 +1,19 @@ cmake_minimum_required(VERSION 3.3) project(vcpkg CXX) -add_compile_options(-std=c++1z) - file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp) add_library(vcpkglib STATIC ${VCPKGLIB_SOURCES}) target_compile_definitions(vcpkglib PRIVATE -DDISABLE_METRICS=0) target_include_directories(vcpkglib PUBLIC include) -target_link_libraries(vcpkglib PRIVATE stdc++fs) + +if(CMAKE_COMPILER_IS_GNUXX) + target_link_libraries(vcpkglib PRIVATE stdc++fs) + target_compile_options(vcpkglib PRIVATE -std=c++1z) +elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") + target_link_libraries(vcpkglib PRIVATE c++experimental) + target_compile_options(vcpkglib PRIVATE -std=c++1z) +endif() add_executable(vcpkg src/vcpkg.cpp) target_link_libraries(vcpkg PRIVATE vcpkglib) -- cgit v1.2.3 From 0a5a906af0e8dddbf6fb32f4d28730488f1f5358 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Tue, 28 Nov 2017 21:52:17 +0300 Subject: [folly] Update to version 2017.11.27.00 --- ports/folly/CONTROL | 2 +- ports/folly/fix-MSG_ERRQUEUE.diff | 22 --------- ports/folly/fix-histogram.diff | 11 ----- ports/folly/fix-malloc.diff | 12 ----- ports/folly/fix-static-linking.diff | 98 ------------------------------------- ports/folly/portfile.cmake | 14 +----- 6 files changed, 3 insertions(+), 156 deletions(-) delete mode 100644 ports/folly/fix-MSG_ERRQUEUE.diff delete mode 100644 ports/folly/fix-histogram.diff delete mode 100644 ports/folly/fix-malloc.diff delete mode 100644 ports/folly/fix-static-linking.diff diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 027979146..7a239386a 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,4 +1,4 @@ Source: folly -Version: 2017.10.02.00 +Version: 2017.11.27.00 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: zlib, openssl, boost, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy diff --git a/ports/folly/fix-MSG_ERRQUEUE.diff b/ports/folly/fix-MSG_ERRQUEUE.diff deleted file mode 100644 index ee3a1215a..000000000 --- a/ports/folly/fix-MSG_ERRQUEUE.diff +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/folly/io/async/AsyncSocket.cpp b/folly/io/async/AsyncSocket.cpp -index 7f8c5f13..f77adbc0 100644 ---- a/folly/io/async/AsyncSocket.cpp -+++ b/folly/io/async/AsyncSocket.cpp -@@ -41,7 +41,7 @@ namespace fsp = folly::portability::sockets; - namespace folly { - - static constexpr bool msgErrQueueSupported = --#ifdef MSG_ERRQUEUE -+#if defined(MSG_ERRQUEUE) && !defined(_WIN32) - true; - #else - false; -@@ -1551,7 +1551,7 @@ void AsyncSocket::handleErrMessages() noexcept { - return; - } - --#ifdef MSG_ERRQUEUE -+#if defined(MSG_ERRQUEUE) && !defined(_WIN32) - uint8_t ctrl[1024]; - unsigned char data; - struct msghdr msg; diff --git a/ports/folly/fix-histogram.diff b/ports/folly/fix-histogram.diff deleted file mode 100644 index ca92a891e..000000000 --- a/ports/folly/fix-histogram.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- a/folly/stats/Histogram.h -+++ b/folly/stats/Histogram.h -@@ -485,7 +485,7 @@ - // with /permissive- (the default for the CMake build), so we directly include - // the -defs as if it were -inl, and don't provide the explicit instantiations. - // https://developercommunity.visualstudio.com/content/problem/81223/incorrect-error-c5037-with-permissive.html --#if defined(_MSC_VER) && _MSC_FULL_VER >= 191125506 && _MSC_FULL_VER < 191125542 -+#if defined(_MSC_VER) && _MSC_FULL_VER >= 191125506 && _MSC_FULL_VER <= 191125547 - #define FOLLY_MSVC_USE_WORKAROUND_FOR_C5037 1 - #else - #define FOLLY_MSVC_USE_WORKAROUND_FOR_C5037 0 diff --git a/ports/folly/fix-malloc.diff b/ports/folly/fix-malloc.diff deleted file mode 100644 index db7a23063..000000000 --- a/ports/folly/fix-malloc.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- a/folly/Malloc.h Mon Oct 09 04:35:09 2017 -+++ b/folly/Malloc.h Fri Oct 13 15:31:36 2017 -@@ -189,9 +189,6 @@ - return false; - } - -- /* Avoid optimizing away the malloc. */ -- asm volatile("" ::"m"(ptr) : "memory"); -- - return (origAllocated != *counter); - }(); - diff --git a/ports/folly/fix-static-linking.diff b/ports/folly/fix-static-linking.diff deleted file mode 100644 index 80434faca..000000000 --- a/ports/folly/fix-static-linking.diff +++ /dev/null @@ -1,98 +0,0 @@ -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 211c6fbf..fbcbddf0 100755 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -10,9 +10,26 @@ find_package(Boost 1.55.0 MODULE - thread - REQUIRED - ) -+ - find_package(DoubleConversion MODULE REQUIRED) --find_package(GFlags MODULE REQUIRED) --find_package(GLog MODULE REQUIRED) --find_package(LibEvent MODULE REQUIRED) -+ -+find_package(gflags CONFIG) -+if(NOT TARGET gflags) -+ message(STATUS "MODULE: GFlags") -+ find_package(GFlags MODULE REQUIRED) -+endif() -+ -+find_package(glog CONFIG) -+if(NOT TARGET glog::glog) -+ message(STATUS "MODULE: GLog") -+ find_package(GLog MODULE REQUIRED) -+endif() -+ -+find_package(Libevent CONFIG) -+if(NOT TARGET event) -+ message(STATUS "MODULE: Libevent") -+ find_package(LibEvent MODULE REQUIRED) -+endif() -+ - find_package(OpenSSL MODULE REQUIRED) - find_package(PThread MODULE) -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cdc992a8..c0231402 100755 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -141,9 +141,38 @@ set(FOLLY_SHINY_DEPENDENCIES - - set(FOLLY_LINK_LIBRARIES - ${DOUBLE_CONVERSION_LIBRARY} -- ${LIBEVENT_LIB} -- ${LIBGFLAGS_LIBRARY} -- ${LIBGLOG_LIBRARY} -+) -+ -+set(FOLLY_INCLUDE_DIRECTORIES -+ ${DOUBLE_CONVERSION_INCLUDE_DIR} -+) -+ -+if(TARGET gflags_static) -+ set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} gflags_static) -+elseif(TARGET gflags) -+ set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} gflags) -+else() -+ set(FOLLY_LINK_LIBRARIES ${FOLLY_LINK_LIBRARIES} ${LIBGFLAGS_LIBRARY}) -+ set(FOLLY_INCLUDE_DIRECTORIES ${FOLLY_INCLUDE_DIRECTORIES} ${LIBGFLAGS_INCLUDE_DIR}) -+endif() -+ -+if(TARGET glog::glog) -+ set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} glog::glog) -+else() -+ set(FOLLY_LINK_LIBRARIES ${FOLLY_LINK_LIBRARIES} ${LIBGLOG_LIBRARY}) -+ set(FOLLY_INCLUDE_DIRECTORIES ${FOLLY_INCLUDE_DIRECTORIES} ${LIBGLOG_INCLUDE_DIR}) -+endif() -+ -+if(TARGET event) -+ set(FOLLY_SHINY_DEPENDENCIES ${FOLLY_SHINY_DEPENDENCIES} event) -+else() -+ set(FOLLY_LINK_LIBRARIES ${FOLLY_LINK_LIBRARIES} ${LIBEVENT_LIB}) -+ set(FOLLY_INCLUDE_DIRECTORIES ${FOLLY_INCLUDE_DIRECTORIES} ${LIBEVENT_INCLUDE_DIR}) -+endif() -+ -+ -+set(FOLLY_LINK_LIBRARIES -+ ${FOLLY_LINK_LIBRARIES} - Iphlpapi.lib - Ws2_32.lib - -@@ -152,15 +181,12 @@ set(FOLLY_LINK_LIBRARIES - - target_include_directories(folly_base - PUBLIC -- ${DOUBLE_CONVERSION_INCLUDE_DIR} -- ${LIBGFLAGS_INCLUDE_DIR} -- ${LIBGLOG_INCLUDE_DIR} -- ${LIBEVENT_INCLUDE_DIR} -- $ -+ ${FOLLY_INCLUDE_DIRECTORIES} - ) - - foreach (LIB ${FOLLY_SHINY_DEPENDENCIES}) - target_include_directories(folly_base PUBLIC $) -+ target_compile_definitions(folly_base PUBLIC $) - endforeach() - - if (FOLLY_HAVE_PTHREAD) diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 8a48ee85d..fc3584860 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -17,21 +17,11 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2017.10.02.00 - SHA512 4fc7840c7a6c528c8ba6a21817bc75f15f5cd5f781d104a1f0622fe1085a6cb26ff9749616b164afff0ea46be6d16877457a98f417e6dbe1044db7605650a6d3 + REF v2017.11.27.00 + SHA512 738bb00047a7cbd807f2dccd64031763df80bbebca73f1ae9500b750dcad156dde84e47f4eda7af1bcd7abfae10c973da47515f2e111929979d1637869cf06ee HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH - ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-static-linking.diff - ${CMAKE_CURRENT_LIST_DIR}/fix-malloc.diff - ${CMAKE_CURRENT_LIST_DIR}/fix-MSG_ERRQUEUE.diff - ${CMAKE_CURRENT_LIST_DIR}/fix-histogram.diff -) - if(VCPKG_CRT_LINKAGE STREQUAL static) set(MSVC_USE_STATIC_RUNTIME ON) else() -- cgit v1.2.3 From 5cb154be1196baeae6f7cc855f4748bc37176dbe Mon Sep 17 00:00:00 2001 From: Ross Brower Date: Tue, 28 Nov 2017 11:55:10 -0800 Subject: FreeRDP 2.0.0-rc1 #2267 --- ports/freerdp/CONTROL | 2 +- ports/freerdp/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/freerdp/CONTROL b/ports/freerdp/CONTROL index 5a730efb7..6a2d5d480 100644 --- a/ports/freerdp/CONTROL +++ b/ports/freerdp/CONTROL @@ -1,4 +1,4 @@ Source: freerdp -Version: 2.0.0-rc0~vcpkg1-1 +Version: 2.0.0-rc1~vcpkg1 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 6805c5a69..cd27da88c 100644 --- a/ports/freerdp/portfile.cmake +++ b/ports/freerdp/portfile.cmake @@ -1,8 +1,8 @@ include(vcpkg_common_functions) -set(FREERDP_VERSION 2.0.0-rc0) -set(FREERDP_REVISION 2.0.0-rc0) -set(FREERDP_HASH d3eb0d5d23aa2a4d0277414f13a984d40aba051102c5af1e5ade975cdb469ef3549b145cd4339415fc33f056044929cfac71884512ea77a1e718d70d5b21b9dd) +set(FREERDP_VERSION 2.0.0-rc1) +set(FREERDP_REVISION 2.0.0-rc1) +set(FREERDP_HASH 5d8fd7d6900feac1e42bfc0ebc111524205c3baa093958ced42d03635076ae7d88cd86439a22ff0656bc53f0302daee5a114a4ac26328ae598ee086490926182) string(REGEX REPLACE "\\+" "-" FREERDP_VERSION_ESCAPED ${FREERDP_VERSION}) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/FreeRDP-${FREERDP_VERSION_ESCAPED}) -- cgit v1.2.3 From b496f7df493085d4e9b83082f33258bc164dcece Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 28 Nov 2017 13:06:56 -0800 Subject: [vcpkg] Further fix for clang/gcc --- toolsrc/CMakeLists.txt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index 0325160ee..51578e4e4 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -1,18 +1,24 @@ cmake_minimum_required(VERSION 3.3) project(vcpkg CXX) +add_compile_options(-std=c++1z) + +if(CMAKE_COMPILER_IS_GNUXX) + set(GCC 1) +elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") + set(CLANG 1) +endif() + file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp) add_library(vcpkglib STATIC ${VCPKGLIB_SOURCES}) target_compile_definitions(vcpkglib PRIVATE -DDISABLE_METRICS=0) target_include_directories(vcpkglib PUBLIC include) -if(CMAKE_COMPILER_IS_GNUXX) - target_link_libraries(vcpkglib PRIVATE stdc++fs) - target_compile_options(vcpkglib PRIVATE -std=c++1z) -elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") - target_link_libraries(vcpkglib PRIVATE c++experimental) - target_compile_options(vcpkglib PRIVATE -std=c++1z) +if(GCC) + target_link_libraries(vcpkglib PUBLIC stdc++fs) +elseif(CLANG) + target_link_libraries(vcpkglib PUBLIC c++experimental) endif() add_executable(vcpkg src/vcpkg.cpp) -- cgit v1.2.3 From b4668e664a4db7b8bc9e9c4c202312e0fb7a8ff9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 28 Nov 2017 13:17:10 -0800 Subject: [vcpkg] Only default target triplet to windows if on windows --- scripts/buildsystems/vcpkg.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 8edc2830c..24f6d855e 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -54,7 +54,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "Wind set(_VCPKG_TARGET_TRIPLET_PLAT uwp) elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") set(_VCPKG_TARGET_TRIPLET_PLAT linux) -else() +elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") set(_VCPKG_TARGET_TRIPLET_PLAT windows) endif() -- cgit v1.2.3 From 6de016f75347b01854614c46dcc8e34f0c22fc1b Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 29 Nov 2017 11:28:30 -0600 Subject: [mpfr] add MPFR_USE_INTMAX_T --- ports/mpfr/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/mpfr/CMakeLists.txt b/ports/mpfr/CMakeLists.txt index 3fb121b76..733e6d183 100644 --- a/ports/mpfr/CMakeLists.txt +++ b/ports/mpfr/CMakeLists.txt @@ -250,6 +250,7 @@ add_library(mpfr ${SRCS}) # target_compile_definitions(mpfr PRIVATE HAVE_CONFIG_H) target_compile_definitions(mpfr PRIVATE __MPFR_WITHIN_MPFR) +target_compile_definitions(mpfr PRIVATE MPFR_USE_INTMAX_T) if(BUILD_SHARED_LIBS) target_compile_definitions(mpfr PRIVATE __GMP_LIBGMP_DLL) endif() -- cgit v1.2.3 From 51c9c6eb619b35cab4e3875d3474e6fed148f80d Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 29 Nov 2017 11:49:09 -0600 Subject: [mpfr] prepend stdint to header --- ports/mpfr/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake index 0e82d2623..bd15515b3 100644 --- a/ports/mpfr/portfile.cmake +++ b/ports/mpfr/portfile.cmake @@ -10,6 +10,11 @@ vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/gmp_printf.c DESTINATION ${SOURCE_PATH}/src) +# Prepend stdint to the mpfr header +file(READ "${SOURCE_PATH}/mpfr.h" _contents) +string(CONCAT _contents "#include \"stdint.h\"\n" ${_contents}) +file(READ "${SOURCE_PATH}/mpfr.h" ${_contents}) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} ) -- cgit v1.2.3 From 7dda8dcdd038be809dc5ecdd5d7b1020a90b0f11 Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 29 Nov 2017 11:49:54 -0600 Subject: [mpfr] fix portfile --- ports/mpfr/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake index bd15515b3..acda3702c 100644 --- a/ports/mpfr/portfile.cmake +++ b/ports/mpfr/portfile.cmake @@ -13,7 +13,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/gmp_printf.c DESTINATION ${SOURCE_PATH}/src) # Prepend stdint to the mpfr header file(READ "${SOURCE_PATH}/mpfr.h" _contents) string(CONCAT _contents "#include \"stdint.h\"\n" ${_contents}) -file(READ "${SOURCE_PATH}/mpfr.h" ${_contents}) +file(WRITE "${SOURCE_PATH}/mpfr.h" ${_contents}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From d0f6656b55284e3ec65a83528711445d6df6ee02 Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 29 Nov 2017 11:56:17 -0600 Subject: [mpfr] fix source path --- ports/mpfr/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake index acda3702c..db32d43b9 100644 --- a/ports/mpfr/portfile.cmake +++ b/ports/mpfr/portfile.cmake @@ -11,9 +11,9 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/gmp_printf.c DESTINATION ${SOURCE_PATH}/src) # Prepend stdint to the mpfr header -file(READ "${SOURCE_PATH}/mpfr.h" _contents) +file(READ "${SOURCE_PATH}/src/mpfr.h" _contents) string(CONCAT _contents "#include \"stdint.h\"\n" ${_contents}) -file(WRITE "${SOURCE_PATH}/mpfr.h" ${_contents}) +file(WRITE "${SOURCE_PATH}/src/mpfr.h" ${_contents}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From e0362393cfb4555b3928239aa7ae40b888203359 Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 29 Nov 2017 12:17:31 -0600 Subject: [mpfr] define have_stdint_h --- ports/mpfr/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mpfr/CMakeLists.txt b/ports/mpfr/CMakeLists.txt index 733e6d183..ed48eaf59 100644 --- a/ports/mpfr/CMakeLists.txt +++ b/ports/mpfr/CMakeLists.txt @@ -250,7 +250,7 @@ add_library(mpfr ${SRCS}) # target_compile_definitions(mpfr PRIVATE HAVE_CONFIG_H) target_compile_definitions(mpfr PRIVATE __MPFR_WITHIN_MPFR) -target_compile_definitions(mpfr PRIVATE MPFR_USE_INTMAX_T) +target_compile_definitions(mpfr PRIVATE HAVE_STDINT_H) if(BUILD_SHARED_LIBS) target_compile_definitions(mpfr PRIVATE __GMP_LIBGMP_DLL) endif() -- cgit v1.2.3 From 8c6eb97ec7b1acb2dc1289910689a6ff76792f5b Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 29 Nov 2017 12:17:53 -0600 Subject: [mpfr] revert portfile patch --- ports/mpfr/portfile.cmake | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake index db32d43b9..0e82d2623 100644 --- a/ports/mpfr/portfile.cmake +++ b/ports/mpfr/portfile.cmake @@ -10,11 +10,6 @@ vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/gmp_printf.c DESTINATION ${SOURCE_PATH}/src) -# Prepend stdint to the mpfr header -file(READ "${SOURCE_PATH}/src/mpfr.h" _contents) -string(CONCAT _contents "#include \"stdint.h\"\n" ${_contents}) -file(WRITE "${SOURCE_PATH}/src/mpfr.h" ${_contents}) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} ) -- cgit v1.2.3 From b12e76cd60025cf22e5191dafac8256086cbad82 Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 29 Nov 2017 12:23:46 -0600 Subject: [mpfr] prefer ninja --- ports/mpfr/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake index 0e82d2623..0a192f168 100644 --- a/ports/mpfr/portfile.cmake +++ b/ports/mpfr/portfile.cmake @@ -12,6 +12,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/gmp_printf.c DESTINATION ${SOURCE_PATH}/src) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() -- cgit v1.2.3 From 9bc2ba5357ebd8c8daf0dfae9511a5a6b16aa11a Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 29 Nov 2017 12:33:08 -0600 Subject: [mpfr] bump version --- ports/mpfr/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mpfr/CONTROL b/ports/mpfr/CONTROL index 8482ed8eb..fdfe6deb0 100644 --- a/ports/mpfr/CONTROL +++ b/ports/mpfr/CONTROL @@ -1,4 +1,4 @@ Source: mpfr -Version: 3.1.6-1 +Version: 3.1.6-2 Description: The MPFR library is a C library for multiple-precision floating-point computations with correct rounding Build-Depends: mpir -- cgit v1.2.3 From 3dfe2ec64b66d87ef55986eb42e2f7f576faf0d8 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 29 Nov 2017 22:22:04 +0100 Subject: Updated benchmark to v1.3 --- ports/benchmark/CONTROL | 2 +- ports/benchmark/portfile.cmake | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/ports/benchmark/CONTROL b/ports/benchmark/CONTROL index 03052ce7f..9e6262e1b 100644 --- a/ports/benchmark/CONTROL +++ b/ports/benchmark/CONTROL @@ -1,3 +1,3 @@ Source: benchmark -Version: 1.2.0 +Version: 1.3.0 Description: A library to support the benchmarking of functions, similar to unit-tests. diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake index e394157e3..1832174fe 100644 --- a/ports/benchmark/portfile.cmake +++ b/ports/benchmark/portfile.cmake @@ -16,23 +16,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/benchmark - REF v1.2.0 - SHA512 859063669fd84e847f04624013f0b2b734d75d90cada247682eaf345b86c88a9bc2320250e128f2361e37f402b3fb56a18c493ec6038973744a005a452d693ba + REF v1.3.0 + SHA512 272775e4dbd0ecc65a2a3a64f24e79682b630929dea3af47349329ac8b796341f1197458a67c9aac0e514857ebe7cbc191d18f6fd2c0aea3242562e69d8a6849 HEAD_REF master ) -vcpkg_download_distfile(PATCH - URLS "https://github.com/efcs/benchmark/commit/536b0b82b8ec12fc7e17e6d243633618f294a739.diff" - FILENAME google-benchmark-1.2.0-536b0b82.patch - SHA512 ed42cc0014741c8039c0fca5b4317b2ed09d06a25c91f49a48be6dce921e39469b002c088794c1ea73dc759166e20cb685b47f809ba28dddd95b5f3263be03cd -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - "${PATCH}" -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA -- cgit v1.2.3 From ca3a6ab0fea53a49a241772f6f383b0fe6b808b7 Mon Sep 17 00:00:00 2001 From: LazyHamster Date: Thu, 30 Nov 2017 12:39:19 +0300 Subject: [libmspack] Initial port. --- ports/libmspack/CMakeLists.txt | 52 ++++++++++++++++++++++++++++++++++++++++++ ports/libmspack/CONTROL | 4 ++++ ports/libmspack/config.h | 8 +++++++ ports/libmspack/libmspack.def | 32 ++++++++++++++++++++++++++ ports/libmspack/portfile.cmake | 30 ++++++++++++++++++++++++ 5 files changed, 126 insertions(+) create mode 100644 ports/libmspack/CMakeLists.txt create mode 100644 ports/libmspack/CONTROL create mode 100644 ports/libmspack/config.h create mode 100644 ports/libmspack/libmspack.def create mode 100644 ports/libmspack/portfile.cmake diff --git a/ports/libmspack/CMakeLists.txt b/ports/libmspack/CMakeLists.txt new file mode 100644 index 000000000..4591d3e04 --- /dev/null +++ b/ports/libmspack/CMakeLists.txt @@ -0,0 +1,52 @@ +cmake_minimum_required(VERSION 3.8) + +project(libmspack C) + +set(CMAKE_DEBUG_POSTFIX "d") + +add_definitions(-DHAVE_CONFIG_H) + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + +# List the source files +set(LIB_SRC mspack/cabc.c + mspack/cabd.c + mspack/chmc.c + mspack/chmd.c + mspack/crc32.c + mspack/hlpc.c + mspack/hlpd.c + mspack/kwajc.c + mspack/kwajd.c + mspack/litc.c + mspack/litd.c + mspack/lzssd.c + mspack/lzxc.c + mspack/lzxd.c + mspack/mszipc.c + mspack/mszipd.c + mspack/oabc.c + mspack/oabd.c + mspack/qtmd.c + mspack/system.c + mspack/szddc.c + mspack/szddd.c +) + +if(BUILD_SHARED_LIBS) + set(LIB_DEF libmspack.def) +endif() + +add_library(libmspack ${LIB_SRC} ${LIB_DEF}) + +target_include_directories(libmspack PRIVATE . ./mspack) + +install(TARGETS libmspack + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES mspack/mspack.h DESTINATION include) diff --git a/ports/libmspack/CONTROL b/ports/libmspack/CONTROL new file mode 100644 index 000000000..b881f614f --- /dev/null +++ b/ports/libmspack/CONTROL @@ -0,0 +1,4 @@ +Source: libmspack +Version: 0.6 +Build-Depends: +Description: libmspack is a portable library for some loosely related Microsoft compression formats. diff --git a/ports/libmspack/config.h b/ports/libmspack/config.h new file mode 100644 index 000000000..ebe95831c --- /dev/null +++ b/ports/libmspack/config.h @@ -0,0 +1,8 @@ +#define HAVE_LIMITS_H 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_STRING_H 1 +#define HAVE_CTYPE_H 1 + +#define HAVE_MEMCMP 1 +#define HAVE_TOWLOWER 1 +#define HAVE_TOLOWER 1 diff --git a/ports/libmspack/libmspack.def b/ports/libmspack/libmspack.def new file mode 100644 index 000000000..6a1a43d75 --- /dev/null +++ b/ports/libmspack/libmspack.def @@ -0,0 +1,32 @@ +EXPORTS + +mspack_create_cab_compressor +mspack_create_chm_compressor +mspack_create_lit_compressor +mspack_create_hlp_compressor +mspack_create_szdd_compressor +mspack_create_kwaj_compressor +mspack_create_oab_compressor + +mspack_create_cab_decompressor +mspack_create_chm_decompressor +mspack_create_lit_decompressor +mspack_create_hlp_decompressor +mspack_create_szdd_decompressor +mspack_create_kwaj_decompressor +mspack_create_oab_decompressor + +mspack_destroy_cab_compressor +mspack_destroy_cab_decompressor +mspack_destroy_chm_compressor +mspack_destroy_chm_decompressor +mspack_destroy_lit_compressor +mspack_destroy_lit_decompressor +mspack_destroy_hlp_compressor +mspack_destroy_hlp_decompressor +mspack_destroy_szdd_compressor +mspack_destroy_szdd_decompressor +mspack_destroy_kwaj_compressor +mspack_destroy_kwaj_decompressor +mspack_destroy_oab_compressor +mspack_destroy_oab_decompressor diff --git a/ports/libmspack/portfile.cmake b/ports/libmspack/portfile.cmake new file mode 100644 index 000000000..fe75e2edd --- /dev/null +++ b/ports/libmspack/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +set(LIB_NAME libmspack) +set(LIB_VERSION 0.6alpha) +set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.cabextract.org.uk/libmspack/${LIB_FILENAME}" + FILENAME "${LIB_FILENAME}" + SHA512 7ba4a584d335c2d703628a3c179bc0d323574632357cdfe04622f960dcc4ef970b5739799397b6802d44a312f7ed9d589b4be223facf044bbfdbfd76d9c7405d +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/libmspack.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# License and man +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${LIB_NAME} RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From d38d4a75408e0e9d0820187b16da2e06ce0ee316 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 29 Nov 2017 23:45:47 -0800 Subject: [vcpkg] Add --x-xunit internal command to print installation results in a VSTS friendly format. --- .gitignore | 3 +- scripts/internalCI.ps1 | 17 +++----- toolsrc/include/vcpkg/base/chrono.h | 31 +++++++++++--- toolsrc/include/vcpkg/globalstate.h | 4 +- toolsrc/include/vcpkg/install.h | 4 +- toolsrc/src/vcpkg.cpp | 2 +- toolsrc/src/vcpkg/base/chrono.cpp | 8 ++-- toolsrc/src/vcpkg/build.cpp | 4 +- toolsrc/src/vcpkg/commands.ci.cpp | 16 +++++++- toolsrc/src/vcpkg/commands.integrate.cpp | 2 +- toolsrc/src/vcpkg/commands.portsdiff.cpp | 6 +-- toolsrc/src/vcpkg/globalstate.cpp | 2 +- toolsrc/src/vcpkg/install.cpp | 69 +++++++++++++++++++++++++++----- toolsrc/src/vcpkg/postbuildlint.cpp | 2 +- 14 files changed, 127 insertions(+), 43 deletions(-) diff --git a/.gitignore b/.gitignore index 003d607fd..e1954660f 100644 --- a/.gitignore +++ b/.gitignore @@ -274,8 +274,9 @@ __pycache__/ .vscode/ buildtrees/ +build*/ downloads/ -installed/ +installed*/ packages/ scripts/buildsystems/tmp/ *.exe diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1 index 16ce4fc7a..37f4f35a4 100644 --- a/scripts/internalCI.ps1 +++ b/scripts/internalCI.ps1 @@ -1,5 +1,7 @@ $ErrorActionPreference = "Stop" +rm TEST-internal-ci.xml -errorAction SilentlyContinue + New-Item -type directory downloads -errorAction SilentlyContinue | Out-Null ./scripts/bootstrap.ps1 if (-not $?) { throw $? } @@ -7,21 +9,14 @@ if (-not $?) { throw $? } # Clear out any intermediate files from the previous build if (Test-Path buildtrees) { - Get-ChildItem buildtrees/*/* | ? { $_.Name -ne "src" -and $_.Extension -ne ".log"} | Remove-Item -Recurse -Force + Get-ChildItem buildtrees/*/* | ? { $_.Name -ne "src" } | Remove-Item -Recurse -Force } # Purge any outdated packages ./vcpkg remove --outdated --recurse if (-not $?) { throw $? } -./vcpkg.exe install azure-storage-cpp cpprestsdk:x64-windows-static cpprestsdk:x86-uwp -if (-not $?) { throw $? } - -./vcpkg.exe install bond cryptopp zlib expat sdl2 curl sqlite3 libuv protobuf:x64-windows sfml opencv:x64-windows uwebsockets uwebsockets:x64-windows-static +./vcpkg.exe install azure-storage-cpp cpprestsdk:x64-windows-static cpprestsdk:x86-uwp ` +bond cryptopp zlib expat sdl2 curl sqlite3 libuv protobuf:x64-windows sfml opencv:x64-windows uwebsockets uwebsockets:x64-windows-static ` +opencv:x86-uwp boost:x86-uwp --keep-going "--x-xunit=TEST-internal-ci.xml" if (-not $?) { throw $? } - -./vcpkg.exe install opencv:x86-uwp boost:x86-uwp -if (-not $?) { throw $? } - -# ./vcpkg.exe install folly:x64-windows -# if (-not $?) { throw $? } diff --git a/toolsrc/include/vcpkg/base/chrono.h b/toolsrc/include/vcpkg/base/chrono.h index b525852f2..c791f53fa 100644 --- a/toolsrc/include/vcpkg/base/chrono.h +++ b/toolsrc/include/vcpkg/base/chrono.h @@ -7,18 +7,37 @@ namespace vcpkg::Chrono { class ElapsedTime { - public: - static ElapsedTime create_started(); + using duration = std::chrono::high_resolution_clock::time_point::duration; - constexpr ElapsedTime() : m_start_tick() {} + public: + constexpr ElapsedTime() : m_duration() {} + constexpr ElapsedTime(duration d) : m_duration(d) {} template - TimeUnit elapsed() const + TimeUnit as() const + { + return std::chrono::duration_cast(m_duration); + } + + std::string to_string() const; + + private: + std::chrono::high_resolution_clock::time_point::duration m_duration; + }; + + class ElapsedTimer + { + public: + static ElapsedTimer create_started(); + + constexpr ElapsedTimer() : m_start_tick() {} + + ElapsedTime elapsed() const { - return std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - this->m_start_tick); + return ElapsedTime(std::chrono::high_resolution_clock::now() - this->m_start_tick); } - double microseconds() const { return elapsed>().count(); } + double microseconds() const { return elapsed().as>().count(); } std::string to_string() const; diff --git a/toolsrc/include/vcpkg/globalstate.h b/toolsrc/include/vcpkg/globalstate.h index 7cea361cf..40ec7958e 100644 --- a/toolsrc/include/vcpkg/globalstate.h +++ b/toolsrc/include/vcpkg/globalstate.h @@ -9,11 +9,11 @@ namespace vcpkg { struct GlobalState { - static Util::LockGuarded timer; + static Util::LockGuarded timer; static std::atomic debugging; static std::atomic feature_packages; static std::atomic g_init_console_cp; static std::atomic g_init_console_output_cp; }; -} \ No newline at end of file +} diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index 28896adee..2e92764dc 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -25,7 +26,7 @@ namespace vcpkg::Install PackageSpec spec; Build::ExtendedBuildResult build_result; - std::string timing; + vcpkg::Chrono::ElapsedTime timing; const Dependencies::AnyAction* action; }; @@ -36,6 +37,7 @@ namespace vcpkg::Install std::string total_elapsed_time; void print() const; + std::string xunit_results() const; }; struct InstallDir diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 5642f937c..04d44c414 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -255,7 +255,7 @@ int main(const int argc, const char* const* const argv) { if (argc == 0) std::abort(); - *GlobalState::timer.lock() = Chrono::ElapsedTime::create_started(); + *GlobalState::timer.lock() = Chrono::ElapsedTimer::create_started(); #if defined(_WIN32) GlobalState::g_init_console_cp = GetConsoleCP(); diff --git a/toolsrc/src/vcpkg/base/chrono.cpp b/toolsrc/src/vcpkg/base/chrono.cpp index 5d28909fc..f0e450231 100644 --- a/toolsrc/src/vcpkg/base/chrono.cpp +++ b/toolsrc/src/vcpkg/base/chrono.cpp @@ -50,12 +50,14 @@ namespace vcpkg::Chrono return Strings::format("%.4g ns", nanos_as_double); } - ElapsedTime ElapsedTime::create_started() + ElapsedTimer ElapsedTimer::create_started() { - ElapsedTime t; + ElapsedTimer t; t.m_start_tick = std::chrono::high_resolution_clock::now(); return t; } - std::string ElapsedTime::to_string() const { return format_time_userfriendly(elapsed()); } + std::string ElapsedTime::to_string() const { return format_time_userfriendly(as()); } + + std::string ElapsedTimer::to_string() const { return elapsed().to_string(); } } diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 6ef72b639..b8f122b27 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -67,7 +67,7 @@ namespace vcpkg::Build::Command const Build::BuildPackageConfig build_config{ *scf, spec.triplet(), fs::path{port_dir}, build_package_options, features_as_set}; - const auto build_timer = Chrono::ElapsedTime::create_started(); + const auto build_timer = Chrono::ElapsedTimer::create_started(); const auto result = Build::build_package(paths, build_config, status_db); System::println("Elapsed time for package %s: %s", spec.to_string(), build_timer.to_string()); @@ -323,7 +323,7 @@ namespace vcpkg::Build const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); const std::string command = Strings::format(R"(%s && %s)", cmd_set_environment, cmd_launch_cmake); - const auto timer = Chrono::ElapsedTime::create_started(); + const auto timer = Chrono::ElapsedTimer::create_started(); const int return_code = System::cmd_execute_clean(command); const auto buildtimeus = timer.microseconds(); diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 8f79b83e1..f2e984bf8 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -63,9 +63,11 @@ namespace vcpkg::Commands::CI }; static const std::string OPTION_EXCLUDE = "--exclude"; + static const std::string OPTION_XUNIT = "--x-xunit"; - static const std::array CI_SETTINGS = {{ + static const std::array CI_SETTINGS = {{ {OPTION_EXCLUDE, "Comma separated list of ports to skip"}, + {OPTION_XUNIT, "File to output results in XUnit format (internal)"}, }}; const CommandStructure COMMAND_STRUCTURE = { @@ -114,6 +116,18 @@ namespace vcpkg::Commands::CI result.summary.print(); } + auto it_xunit = options.settings.find(OPTION_XUNIT); + if (it_xunit != options.settings.end()) + { + std::string xunit_doc = "\n"; + + for (auto&& result : results) + xunit_doc += result.summary.xunit_results(); + + xunit_doc += "\n"; + paths.get_filesystem().write_contents(fs::u8path(it_xunit->second), xunit_doc); + } + Checks::exit_success(VCPKG_LINE_INFO); } } diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index f13a999fa..66c5eb5a9 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -257,7 +257,7 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", std::error_code ec; const bool was_deleted = fs.remove(path, ec); - Checks::check_exit(VCPKG_LINE_INFO, !ec, "Error: Unable to remove user-wide integration: %d", ec.message()); + Checks::check_exit(VCPKG_LINE_INFO, !ec, "Error: Unable to remove user-wide integration: %s", ec.message()); if (was_deleted) { diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index 0277c8bdb..6752715e4 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -151,14 +151,14 @@ namespace vcpkg::Commands::PortsDiff const std::vector& added_ports = setp.only_left; if (!added_ports.empty()) { - System::println("\nThe following %d ports were added:", added_ports.size()); + System::println("\nThe following %zd ports were added:", added_ports.size()); do_print_name_and_version(added_ports, current_names_and_versions); } const std::vector& removed_ports = setp.only_right; if (!removed_ports.empty()) { - System::println("\nThe following %d ports were removed:", removed_ports.size()); + System::println("\nThe following %zd ports were removed:", removed_ports.size()); do_print_name_and_version(removed_ports, previous_names_and_versions); } @@ -168,7 +168,7 @@ namespace vcpkg::Commands::PortsDiff if (!updated_ports.empty()) { - System::println("\nThe following %d ports were updated:", updated_ports.size()); + System::println("\nThe following %zd ports were updated:", updated_ports.size()); for (const UpdatedPort& p : updated_ports) { System::println(" - %-14s %-16s", p.port, p.version_diff.to_string()); diff --git a/toolsrc/src/vcpkg/globalstate.cpp b/toolsrc/src/vcpkg/globalstate.cpp index 43230fa4b..149401b2c 100644 --- a/toolsrc/src/vcpkg/globalstate.cpp +++ b/toolsrc/src/vcpkg/globalstate.cpp @@ -4,7 +4,7 @@ namespace vcpkg { - Util::LockGuarded GlobalState::timer; + Util::LockGuarded GlobalState::timer; std::atomic GlobalState::debugging(false); std::atomic GlobalState::feature_packages(false); diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 0888e21d5..76dc7a527 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -484,18 +484,18 @@ namespace vcpkg::Install { std::vector results; - const auto timer = Chrono::ElapsedTime::create_started(); + const auto timer = Chrono::ElapsedTimer::create_started(); size_t counter = 0; const size_t package_count = action_plan.size(); for (const auto& action : action_plan) { - const auto build_timer = Chrono::ElapsedTime::create_started(); + const auto build_timer = Chrono::ElapsedTimer::create_started(); counter++; const PackageSpec& spec = action.spec(); const std::string display_name = spec.to_string(); - System::println("Starting package %d/%d: %s", counter, package_count, display_name); + System::println("Starting package %zd/%zd: %s", counter, package_count, display_name); results.emplace_back(spec, &action); @@ -521,8 +521,8 @@ namespace vcpkg::Install Checks::unreachable(VCPKG_LINE_INFO); } - results.back().timing = build_timer.to_string(); - System::println("Elapsed time for package %s: %s", display_name, build_timer.to_string()); + results.back().timing = build_timer.elapsed(); + System::println("Elapsed time for package %s: %s", display_name, results.back().timing.to_string()); } return InstallSummary{std::move(results), timer.to_string()}; @@ -533,6 +533,7 @@ namespace vcpkg::Install static const std::string OPTION_NO_DOWNLOADS = "--no-downloads"; static const std::string OPTION_RECURSE = "--recurse"; static const std::string OPTION_KEEP_GOING = "--keep-going"; + static const std::string OPTION_XUNIT = "--x-xunit"; static const std::array INSTALL_SWITCHES = {{ {OPTION_DRY_RUN, "Do not actually build or install"}, @@ -541,7 +542,9 @@ namespace vcpkg::Install {OPTION_RECURSE, "Allow removal of packages as part of installation"}, {OPTION_KEEP_GOING, "Continue installing packages on failure"}, }}; - static const std::array INSTALL_SETTINGS; + static const std::array INSTALL_SETTINGS = {{ + {OPTION_XUNIT, "File to output results in XUnit format (Internal use)"}, + }}; std::vector get_all_port_names(const VcpkgPaths& paths) { @@ -555,7 +558,7 @@ namespace vcpkg::Install Help::create_example_string("install zlib zlib:x64-windows curl boost"), 1, SIZE_MAX, - {INSTALL_SWITCHES, {}}, + {INSTALL_SWITCHES, INSTALL_SETTINGS}, &get_all_port_names, }; @@ -627,7 +630,7 @@ namespace vcpkg::Install library_target_pair.second.erase(library_target_pair.second.begin() + 4, library_target_pair.second.end()); System::println(" find_package(%s REQUIRED)\n" - " # Note: %d targets were omitted\n" + " # Note: %zd targets were omitted\n" " target_link_libraries(main PRIVATE %s)\n", library_target_pair.first, omitted, @@ -735,6 +738,17 @@ namespace vcpkg::Install summary.print(); } + auto it_xunit = options.settings.find(OPTION_XUNIT); + if (it_xunit != options.settings.end()) + { + std::string xunit_doc = "\n"; + + xunit_doc += summary.xunit_results(); + + xunit_doc += "\n"; + paths.get_filesystem().write_contents(fs::u8path(it_xunit->second), xunit_doc); + } + for (auto&& result : summary.results) { if (!result.action) continue; @@ -751,7 +765,7 @@ namespace vcpkg::Install } SpecSummary::SpecSummary(const PackageSpec& spec, const Dependencies::AnyAction* action) - : spec(spec), build_result{BuildResult::NULLVALUE, nullptr}, timing("0"), action(action) + : spec(spec), build_result{BuildResult::NULLVALUE, nullptr}, action(action) { } @@ -770,4 +784,41 @@ namespace vcpkg::Install } return nullptr; } + + std::string InstallSummary::xunit_results() const + { + std::string xunit_doc; + for (auto&& result : results) + { + std::string inner_block; + const char* result_string = ""; + switch (result.build_result.code) + { + case BuildResult::POST_BUILD_CHECKS_FAILED: + case BuildResult::FILE_CONFLICTS: + case BuildResult::BUILD_FAILED: + result_string = "Fail"; + inner_block = Strings::format("", + to_string(result.build_result.code)); + break; + case BuildResult::EXCLUDED: + case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: + result_string = "Skip"; + inner_block = + Strings::format("", to_string(result.build_result.code)); + break; + case BuildResult::SUCCEEDED: result_string = "Pass"; break; + default: Checks::exit_fail(VCPKG_LINE_INFO); + } + + xunit_doc += Strings::format(R"(%s)" + "\n", + result.spec, + result.spec, + result.timing.as().count(), + result_string, + inner_block); + } + return xunit_doc; + } } diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp index 0532bce58..2b427737a 100644 --- a/toolsrc/src/vcpkg/postbuildlint.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -479,7 +479,7 @@ namespace vcpkg::PostBuildLint } System::println(System::Color::warning, - "Mismatching number of debug and release binaries. Found %d for debug but %d for release.", + "Mismatching number of debug and release binaries. Found %zd for debug but %zd for release.", debug_count, release_count); System::println("Debug binaries"); -- cgit v1.2.3 From 26f12d20bbbce9247860f5cb0a14088f91d06970 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 29 Nov 2017 13:12:11 -0800 Subject: [many ports] Updates to latest --- ports/allegro5/CONTROL | 2 +- ports/allegro5/portfile.cmake | 4 ++-- ports/botan/CONTROL | 2 +- ports/botan/portfile.cmake | 8 ++++---- ports/brotli/CONTROL | 2 +- ports/brotli/portfile.cmake | 4 ++-- ports/chakracore/CONTROL | 4 ++-- ports/chakracore/portfile.cmake | 4 ++-- ports/cppunit/CONTROL | 2 +- ports/cppunit/portfile.cmake | 9 +++++---- ports/doctest/CONTROL | 2 +- ports/doctest/portfile.cmake | 4 ++-- ports/ecm/CONTROL | 2 +- ports/ecm/portfile.cmake | 13 +++++++------ ports/expat/CONTROL | 2 +- ports/expat/portfile.cmake | 4 ++-- ports/harfbuzz/CONTROL | 2 +- ports/harfbuzz/portfile.cmake | 13 +++++++------ ports/libuv/CONTROL | 2 +- ports/libuv/portfile.cmake | 4 ++-- ports/libzip/CONTROL | 2 +- ports/nana/CONTROL | 2 +- ports/nana/portfile.cmake | 4 ++-- ports/poco/CONTROL | 2 +- ports/poco/portfile.cmake | 12 ++++++------ 25 files changed, 57 insertions(+), 54 deletions(-) diff --git a/ports/allegro5/CONTROL b/ports/allegro5/CONTROL index 8f078909a..6cf78f2a0 100644 --- a/ports/allegro5/CONTROL +++ b/ports/allegro5/CONTROL @@ -1,4 +1,4 @@ Source: allegro5 -Version: 5.2.2.0-1 +Version: 5.2.3.0 Description: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like. Build-Depends: opengl, zlib, freetype, libogg, libvorbis, libflac, openal-soft, libpng, bzip2, physfs, libtheora, opus, opusfile diff --git a/ports/allegro5/portfile.cmake b/ports/allegro5/portfile.cmake index 46cb8020d..d22a0ecd9 100644 --- a/ports/allegro5/portfile.cmake +++ b/ports/allegro5/portfile.cmake @@ -14,8 +14,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO liballeg/allegro5 - REF e8b209bc20a60224859eb8a0cae082bd20d32ed1 - SHA512 50b30d4b539bd4a2488d2b33e9fbfc6fdfd340039d9086993a5719bab3cb020ee6fe7f6d3578755a52c8aab9816d25cd74710ce93b0b374a2f97620b6138419d + REF 5.2.3.0 + SHA512 419f036d0265062dbec0e9306b153de5af5375186f7b5b2fe62a80549fc0e2c2a6afff81a6772effa7624fe2e452ed0a2830872ef25cc3b23fea93af99f60ba9 HEAD_REF master ) diff --git a/ports/botan/CONTROL b/ports/botan/CONTROL index 1ff010118..3d3043521 100644 --- a/ports/botan/CONTROL +++ b/ports/botan/CONTROL @@ -1,3 +1,3 @@ Source: botan -Version: 2.0.1 +Version: 2.3.0 Description: A cryptography library written in C++11 \ No newline at end of file diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake index a9a9ca547..7b538a985 100644 --- a/ports/botan/portfile.cmake +++ b/ports/botan/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(BOTAN_VERSION 2.0.1) -set(BOTAN_HASH c5062ce92a6e6e333b4e6af095ed54d0c4ffacefc6ac87ec651dd1e0937793c9956b7c9c0d3acf49f059505526584168364e01c55ab72c953ad255e8396aed35) +set(BOTAN_VERSION 2.3.0) +set(BOTAN_HASH a8575bdb2eaa01fb45d8565bea0b54ddf47a21d2fb761fc0a286373b09d51e5a00e84d5cefc51040c5720db66f5625c6bc73ab09cffa9cd42472545610f9892a) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Botan-${BOTAN_VERSION}) vcpkg_download_distfile(ARCHIVE @@ -57,7 +57,7 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE) --makefile-style=nmake --with-pkcs11 --prefix=${BOTAN_FLAG_PREFIX} - --link-method=copy + --link-method=copy WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}" LOGNAME configure-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) message(STATUS "Configure ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done") @@ -73,7 +73,7 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE) vcpkg_execute_required_process( COMMAND "${PYTHON3}" "${SOURCE_PATH}/src/scripts/install.py" --destdir=${BOTAN_FLAG_PREFIX} - --docdir=share + --docdir=share WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}" LOGNAME install-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) diff --git a/ports/brotli/CONTROL b/ports/brotli/CONTROL index 25bc036a8..451b46f9f 100644 --- a/ports/brotli/CONTROL +++ b/ports/brotli/CONTROL @@ -1,3 +1,3 @@ Source: brotli -Version: 0.6.0-1 +Version: 1.0.2 Description: a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling. diff --git a/ports/brotli/portfile.cmake b/ports/brotli/portfile.cmake index 36e489bc4..2479a73aa 100644 --- a/ports/brotli/portfile.cmake +++ b/ports/brotli/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/brotli - REF v0.6.0 - SHA512 36caa277790efeb5bff0fdc090cdcf00fd9995c4e81a60ed31d36af2e13848ec1afe5d84e6926eebbee013525191e9404e112cb7fbede16097221c5bc3dfb5d5 + REF v1.0.2 + SHA512 b3ec98159e63b4169dea3e958d60d89247dc1c0f78aab27bfffb2ece659fa024df990d410aa15c12b2082d42e3785e32ec248dce2b116c7f34e98bb6337f9fc9 HEAD_REF master ) diff --git a/ports/chakracore/CONTROL b/ports/chakracore/CONTROL index f3b510ecd..b86fa8963 100644 --- a/ports/chakracore/CONTROL +++ b/ports/chakracore/CONTROL @@ -1,3 +1,3 @@ Source: chakracore -Version: 1.4.3 -Description: Core part of the Chakra Javascript engine \ No newline at end of file +Version: 1.7.4 +Description: Core part of the Chakra Javascript engine diff --git a/ports/chakracore/portfile.cmake b/ports/chakracore/portfile.cmake index 331cd8b31..7bb628744 100644 --- a/ports/chakracore/portfile.cmake +++ b/ports/chakracore/portfile.cmake @@ -10,8 +10,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/ChakraCore - REF v1.4.3 - SHA512 6083bbbb4b980f44fe0e1d3581eea17190e379134f9312f11d195694aa3e0d9723406d8048ce461bc2744306c07b44465d6d58636b114a82b2f42d7a3316c9af + REF v1.7.4 + SHA512 116ed75d3128f8d9e8ad5a12deed194e14403e05f495422b14277a31620a37b7c8324f04738947388393b0e204f7748bb81d90ebab3373a198db76b70f89f374 HEAD_REF master ) diff --git a/ports/cppunit/CONTROL b/ports/cppunit/CONTROL index 76a315cdf..b7d8968d7 100644 --- a/ports/cppunit/CONTROL +++ b/ports/cppunit/CONTROL @@ -1,3 +1,3 @@ Source: cppunit -Version: 1.13.2 +Version: 1.14.0 Description: CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML for automatic testing and GUI based for supervised tests. \ No newline at end of file diff --git a/ports/cppunit/portfile.cmake b/ports/cppunit/portfile.cmake index 14b1d0478..a56f7849a 100644 --- a/ports/cppunit/portfile.cmake +++ b/ports/cppunit/portfile.cmake @@ -11,11 +11,12 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}/cppunit-1.13.2) +set(VERSION 1.14.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}/cppunit-${VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "http://dev-www.libreoffice.org/src/cppunit-1.13.2.tar.gz" - FILENAME "cppunit-1.13.2.tar.gz" - SHA512 8f4be569f321d577cec31931f49f4df143bc94e283605509b6ea50c60690aa91a2aed940e7eebd4b2413a4218f9a6c3978d312d8e587eab040283c6563846ecd + URLS "http://dev-www.libreoffice.org/src/cppunit-${VERSION}.tar.gz" + FILENAME "cppunit-${VERSION}.tar.gz" + SHA512 4ea1da423c6f7ab37e4144689f593396829ce74d43872d6b10709c1ad5fbda4ee945842f7e9803592520ef81ac713e95a3fe130295bf048cd32a605d1959882e ) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) diff --git a/ports/doctest/CONTROL b/ports/doctest/CONTROL index 29093fae4..872c47475 100644 --- a/ports/doctest/CONTROL +++ b/ports/doctest/CONTROL @@ -1,3 +1,3 @@ Source: doctest -Version: 1.2.0 +Version: 1.2.6 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 4a98020f0..eef9b4ca1 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 1.2.0 - SHA512 7e01e4b817e2200fcd7216342b184ddb60723180bb0a69e24d8c54b7b7d5d983bbd7a2fb0c629e87c95127f4213cca11beb95d079880313d2445703e289c23b5 + REF 1.2.6 + SHA512 bee59e9e18a474b9a7883e0c506a1133fdd382d3ecbe010c0402399d6c48572508bfa347a2196908d846e345508c564f758b17c268a19b65968f5c2ff87b25a4 HEAD_REF master ) diff --git a/ports/ecm/CONTROL b/ports/ecm/CONTROL index 12a9fd8a9..147603756 100644 --- a/ports/ecm/CONTROL +++ b/ports/ecm/CONTROL @@ -1,3 +1,3 @@ Source: ecm -Version: 5.37.0-1 +Version: 5.40.0 Description: Extra CMake Modules (ECM), extra modules and scripts for CMake diff --git a/ports/ecm/portfile.cmake b/ports/ecm/portfile.cmake index 0e016418c..56dcdcf7d 100644 --- a/ports/ecm/portfile.cmake +++ b/ports/ecm/portfile.cmake @@ -1,12 +1,13 @@ #cmake-only scripts include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/extra-cmake-modules-5.37.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://download.kde.org/stable/frameworks/5.37/extra-cmake-modules-5.37.0.zip" - FILENAME "extra-cmake-modules-5.37.0.zip" - SHA512 a9cd585fb5c63452fc45c955df62b6e7aca3d19e47ca2db33216f83951645f393271f37a04630e5c7f01899063562548c2b0dfe79d7afa8661bb0a8bca5ccfbf + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/extra-cmake-modules + REF v5.40.0 + SHA512 1f79d797770367e79c2c6dd73c125d32fcc5fe404b350d953b69cc6544babc1c73e2986c833635daaac85a5af966977e40fe41c01ac48ccc45d46d2e1636d21f + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/expat/CONTROL b/ports/expat/CONTROL index 450b8e61d..edbcf2326 100644 --- a/ports/expat/CONTROL +++ b/ports/expat/CONTROL @@ -1,3 +1,3 @@ Source: expat -Version: 2.2.4-2 +Version: 2.2.5 Description: XML parser library written in C diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index 66a714817..a8f320ab3 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -6,8 +6,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libexpat/libexpat - REF R_2_2_4 - SHA512 64f9deb2f75be70450a60a408ab867d1df800022e29000a31a801d85421178b400ebbf817864d1592ce998ada1012fa25fd896e5f25c6b314851ae62d94b45dc + REF R_2_2_5 + SHA512 61ce2a479521412e0c56c352106c4adfb61a6bedb883921aba3ebccc29311ddd192646ac2c51b41572728d4de6ab4cb60a1dbc71515d742a80a8b59d89ca74d6 HEAD_REF master) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 9dad59be5..fc281de81 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.6.3-1 +Version: 1.7.1 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, glib (windows) diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index f9fa05555..97e224ca3 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -1,11 +1,12 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.6.3) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/behdad/harfbuzz/releases/download/1.6.3/harfbuzz-1.6.3.tar.bz2" - FILENAME "harfbuzz-1.6.3.tar.bz2" - SHA512 37d1a161d9074e9898d9ef6cca6dffffc725005828d700744553b0145373b69bcd3b08f507d49f4c2e05850d9275a54f15983356c547c86e5e3c202cc7cbfbe8 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO behdad/harfbuzz + REF 1.7.1 + SHA512 af25a393f0401e04647b8bc508cfed3cea399522e2932631d87f45127b7f975bfd9d896b1e3104a97f4b69b3e0e8a001173fbee0af0c559cd580d4aa5cd8d04d + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index 256897afb..517bad5e1 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.16.1 +Version: 1.17.0 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index e46dc9430..0eee8b190 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.16.1 - SHA512 e75c735467c5fc1681bee2b4f4ffae63116644309016d0f507b37643697ae8c85b3be7309288b1aca8fa11c6cb1dc1873962d1dc18fa3ed8cb66c8d2514c95e6 + REF v1.17.0 + SHA512 274615dd67808a7b7481184aa9c1650f7646ffe714c5304ea123e287eb09cad2a4c677ac06ae68b7d0e70071545954aa6a80414cd7e37c242a2533563094870c HEAD_REF v1.x) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL index 045030e95..3ca61d39b 100644 --- a/ports/libzip/CONTROL +++ b/ports/libzip/CONTROL @@ -1,4 +1,4 @@ Source: libzip -Version: 1.2.0-2 +Version: 1.3.2 Build-Depends: zlib Description: A library for reading, creating, and modifying zip archives. diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL index ae4168544..41d7188b9 100644 --- a/ports/nana/CONTROL +++ b/ports/nana/CONTROL @@ -1,4 +1,4 @@ Source: nana -Version: 1.5.4-1 +Version: 1.5.5 Description: Cross-platform library for GUI programming in modern C++ style. Build-Depends: libpng, libjpeg-turbo diff --git a/ports/nana/portfile.cmake b/ports/nana/portfile.cmake index 6f61d79f7..fc492ee44 100644 --- a/ports/nana/portfile.cmake +++ b/ports/nana/portfile.cmake @@ -7,8 +7,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cnjinhao/nana - REF v1.5.4 - SHA512 54d8d06a7792c7c626793f0c5f769884d7af78950a1df7d543f13bbb6de5ae35b51130a150438faa1c3c53dfea29fad6d12b94c535c264aac893325b244c6e0a + REF v1.5.5 + SHA512 d28348b807e131f5868a162cf5b914523246ab5c4d4395186377f54dff9ad91199b13f640e05b5d959347ebfb570df79d5de39abfd690d8831034063422e3587 HEAD_REF develop ) diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index 4eb60a07d..69166867f 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,5 +1,5 @@ Source: poco -Version: 1.7.8-2 +Version: 1.8.0.1 Build-Depends: zlib, pcre, sqlite3, expat Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 315eaf2e5..6a187fac8 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/poco-poco-1.7.8-release) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/pocoproject/poco/archive/poco-1.7.8-release.tar.gz" - FILENAME "poco-poco-1.7.8-release.tar.gz" - SHA512 50a47e6f69491859f48b72e3695c380ec871f7d5249d938216e3be41579d752675e5d746a150720d93122f87f585ebeea24dc9660c81642a12e70f761b9d2502 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pocoproject/poco + REF poco-1.8.0.1-release + SHA512 b4a58053235582038186bdddbfa4842833bb3529af9522662e935efaf852f5155addd510729ea5c148b3bcc57ed3b8287cd98cbeb6d04e1a13bd31fadbdf7ad8 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From eb8c9e084be627a96a9730f82c089b0d114e33ea Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 30 Nov 2017 12:43:45 -0800 Subject: [llvm] Fail early on UWP --- ports/llvm/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index a2f32abe9..d2a82cf0b 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -2,6 +2,10 @@ # building with Microsoft toolchain; it's also the default on other platforms set(VCPKG_LIBRARY_LINKAGE static) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "llvm cannot currently be built for UWP") +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-5.0.0.src) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From 0ade7d3d97a15bcaf59b2074ed0888737d98b01c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 30 Nov 2017 14:19:06 -0800 Subject: [netcdf-c] Fix x64-windows-static builds --- ports/netcdf-c/portfile.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/netcdf-c/portfile.cmake b/ports/netcdf-c/portfile.cmake index 75a361106..f2630711e 100644 --- a/ports/netcdf-c/portfile.cmake +++ b/ports/netcdf-c/portfile.cmake @@ -41,10 +41,11 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/netcdf) -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/netcdf/netCDFTargets-debug.cmake NETCDF_TARGETS_DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" NETCDF_TARGETS_DEBUG_MODULE "${NETCDF_TARGETS_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/netcdf/netCDFTargets-debug.cmake "${NETCDF_TARGETS_DEBUG_MODULE}") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -- cgit v1.2.3 From 0aa1bfe293454874eeae33ce80f2469ea28edb59 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 30 Nov 2017 16:26:37 -0800 Subject: [harfbuzz] Revert upgrade due to regression --- ports/harfbuzz/CONTROL | 2 +- ports/harfbuzz/portfile.cmake | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index fc281de81..9dad59be5 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.7.1 +Version: 1.6.3-1 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, glib (windows) diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 97e224ca3..f9fa05555 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -1,12 +1,11 @@ include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO behdad/harfbuzz - REF 1.7.1 - SHA512 af25a393f0401e04647b8bc508cfed3cea399522e2932631d87f45127b7f975bfd9d896b1e3104a97f4b69b3e0e8a001173fbee0af0c559cd580d4aa5cd8d04d - HEAD_REF master +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.6.3) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/behdad/harfbuzz/releases/download/1.6.3/harfbuzz-1.6.3.tar.bz2" + FILENAME "harfbuzz-1.6.3.tar.bz2" + SHA512 37d1a161d9074e9898d9ef6cca6dffffc725005828d700744553b0145373b69bcd3b08f507d49f4c2e05850d9275a54f15983356c547c86e5e3c202cc7cbfbe8 ) +vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From fdf7c65aa4ea53e580a85c9b984109c4f4446da5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 30 Nov 2017 16:43:41 -0800 Subject: Exit early if no VS is found --- scripts/bootstrap.ps1 | 2 +- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index ca7b1a0ce..3f40a2ead 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -46,7 +46,7 @@ try & $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /p:TargetPlatformVersion=$windowsSDK /m dirs.proj if ($LASTEXITCODE -ne 0) { - Write-Error "Building vcpkg.exe failed. Please ensure you have installed the Desktop C++ workload and the Windows SDK for Desktop C++." + Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." return } diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index e58b58c04..46ba767b9 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -8,6 +8,11 @@ $withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 +if ($VisualStudioInstallationInstances -eq $null) +{ + throw "Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed." +} + Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstallationInstances))" foreach ($instanceCandidateWithEOL in $VisualStudioInstallationInstances) { -- cgit v1.2.3 From d165543c12df2be37f1b9cf624354e9c85020a32 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 30 Nov 2017 18:10:33 -0800 Subject: [libsodium] Fix static build trying to copy dlls --- ports/libsodium/portfile.cmake | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index 4e6cd6be7..c781fb1fb 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -37,18 +37,21 @@ file(INSTALL DESTINATION ${CURRENT_PACKAGES_DIR}/include/sodium ) -file(INSTALL - ${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(INSTALL + ${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) +endif() + file(INSTALL ${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib ) -file(INSTALL - ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) file(INSTALL ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -- cgit v1.2.3 From c9642097a8aa85c652daed2fc28e6a828688801e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 30 Nov 2017 21:44:34 -0800 Subject: Specify VSLANG=1033 to use english locale in builds Resolves several locale-specific issues outside our control --- toolsrc/src/vcpkg/base/system.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index e3d3ad292..8dd73c32f 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -202,6 +202,7 @@ namespace vcpkg::System env_cstr.append(Strings::to_utf16(NEW_PATH)); env_cstr.push_back(L'\0'); + env_cstr.append(L"VSLANG=1033\0"); STARTUPINFOW startup_info; memset(&startup_info, 0, sizeof(STARTUPINFOW)); -- cgit v1.2.3 From f174d5561af49cccbfb4d9618be123cf7ee971d6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 30 Nov 2017 21:46:23 -0800 Subject: Exclude and warn about VS instances without English language pack Resolves several locale-specific issues outside our control --- toolsrc/src/vcpkg/vcpkgpaths.cpp | 64 ++++++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 15 deletions(-) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index d5763921e..324ca29d1 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -280,7 +280,6 @@ namespace vcpkg 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)) { @@ -384,6 +383,7 @@ namespace vcpkg std::vector paths_examined; std::vector found_toolsets; + std::vector excluded_toolsets; const std::vector vs_instances = get_visual_studio_instances(paths); const bool v140_is_available = Util::find_if(vs_instances, [&](const VisualStudioInstance& vs_instance) { @@ -440,17 +440,28 @@ namespace vcpkg paths_examined.push_back(dumpbin_path); if (fs.exists(dumpbin_path)) { - found_toolsets.push_back(Toolset{ - vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}); + const Toolset v141toolset = Toolset{ + vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}; + + auto english_language_pack = dumpbin_path.parent_path() / "1033"; + + if (!fs.exists(english_language_pack)) + { + excluded_toolsets.push_back(v141toolset); + break; + } + + found_toolsets.push_back(v141toolset); if (v140_is_available) { - found_toolsets.push_back(Toolset{vs_instance.root_path, - dumpbin_path, - vcvarsall_bat, - {"-vcvars_ver=14.0"}, - V_140, - supported_architectures}); + const Toolset v140toolset = Toolset{vs_instance.root_path, + dumpbin_path, + vcvarsall_bat, + {"-vcvars_ver=14.0"}, + V_140, + supported_architectures}; + found_toolsets.push_back(v140toolset); } break; @@ -487,17 +498,39 @@ namespace vcpkg if (fs.exists(vs_dumpbin_exe)) { - found_toolsets.push_back({vs_instance.root_path, - vs_dumpbin_exe, - vcvarsall_bat, - {}, - major_version == "14" ? V_140 : V_120, - supported_architectures}); + const Toolset toolset = {vs_instance.root_path, + vs_dumpbin_exe, + vcvarsall_bat, + {}, + major_version == "14" ? V_140 : V_120, + supported_architectures}; + + auto english_language_pack = vs_dumpbin_exe.parent_path() / "1033"; + + if (!fs.exists(english_language_pack)) + { + excluded_toolsets.push_back(toolset); + break; + } + + found_toolsets.push_back(toolset); } } } } + if (!excluded_toolsets.empty()) + { + System::println( + System::Color::warning, + "Warning: The following VS instances are exluded because the English language pack is unavailable."); + for (const Toolset& toolset : excluded_toolsets) + { + System::println(" %s", toolset.visual_studio_root_path.u8string()); + } + System::println(System::Color::warning, "Please install the English language pack."); + } + if (found_toolsets.empty()) { System::println(System::Color::error, "Could not locate a complete toolset."); @@ -575,6 +608,7 @@ namespace vcpkg vs_root_path.generic_string()); } + Checks::check_exit(VCPKG_LINE_INFO, !candidates.empty(), "No suitable Visual Studio instances were found"); return *candidates.front(); } -- cgit v1.2.3 From 03ff483446cc1772415cc1bf2104a9fe99dd5a18 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 30 Nov 2017 22:20:00 -0800 Subject: [botan] Revert upgrade due to regressions --- ports/botan/CONTROL | 2 +- ports/botan/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/botan/CONTROL b/ports/botan/CONTROL index 3d3043521..1ff010118 100644 --- a/ports/botan/CONTROL +++ b/ports/botan/CONTROL @@ -1,3 +1,3 @@ Source: botan -Version: 2.3.0 +Version: 2.0.1 Description: A cryptography library written in C++11 \ No newline at end of file diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake index 7b538a985..a9a9ca547 100644 --- a/ports/botan/portfile.cmake +++ b/ports/botan/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(BOTAN_VERSION 2.3.0) -set(BOTAN_HASH a8575bdb2eaa01fb45d8565bea0b54ddf47a21d2fb761fc0a286373b09d51e5a00e84d5cefc51040c5720db66f5625c6bc73ab09cffa9cd42472545610f9892a) +set(BOTAN_VERSION 2.0.1) +set(BOTAN_HASH c5062ce92a6e6e333b4e6af095ed54d0c4ffacefc6ac87ec651dd1e0937793c9956b7c9c0d3acf49f059505526584168364e01c55ab72c953ad255e8396aed35) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Botan-${BOTAN_VERSION}) vcpkg_download_distfile(ARCHIVE @@ -57,7 +57,7 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE) --makefile-style=nmake --with-pkcs11 --prefix=${BOTAN_FLAG_PREFIX} - --link-method=copy + --link-method=copy WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}" LOGNAME configure-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) message(STATUS "Configure ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done") @@ -73,7 +73,7 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE) vcpkg_execute_required_process( COMMAND "${PYTHON3}" "${SOURCE_PATH}/src/scripts/install.py" --destdir=${BOTAN_FLAG_PREFIX} - --docdir=share + --docdir=share WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}" LOGNAME install-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) -- cgit v1.2.3 From 977d4decb4c7ca85395012f2b52a5e6c522a1c9c Mon Sep 17 00:00:00 2001 From: sdcb Date: Fri, 1 Dec 2017 18:18:53 +0800 Subject: [vlpp] initial create --- ports/vlpp/CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++++++ ports/vlpp/CONTROL | 3 +++ ports/vlpp/portfile.cmake | 28 ++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 ports/vlpp/CMakeLists.txt create mode 100644 ports/vlpp/CONTROL create mode 100644 ports/vlpp/portfile.cmake diff --git a/ports/vlpp/CMakeLists.txt b/ports/vlpp/CMakeLists.txt new file mode 100644 index 000000000..238600f6e --- /dev/null +++ b/ports/vlpp/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required(VERSION 3.3.0) + +project(Vlpp VERSION 0.9.3.1 LANGUAGES CXX) + +# Sources +set(SRCS + Import/Vlpp.cpp + Import/VlppWorkflow.cpp + Import/VlppWorkflowCompiler.cpp) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") + +# Create and configure the target +add_library(Vlpp ${SRCS}) + +# target_compile_definitions +target_compile_definitions(Vlpp PRIVATE UNICODE) +target_compile_definitions(Vlpp PRIVATE _UNICODE) + +target_include_directories(Vlpp PRIVATE ${PROJECT_SOURCE_DIR}/Import) + +# Install +install( + TARGETS Vlpp + RUNTIME DESTINATION "bin" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + ) + +if (NOT DEFINED SKIP_HEADERS) + install( + FILES + Import/Vlpp.h + Import/VlppWorkflow.h + Import/VlppWorkflowCompiler.h + DESTINATION "include" + ) +endif() diff --git a/ports/vlpp/CONTROL b/ports/vlpp/CONTROL new file mode 100644 index 000000000..aa8381cae --- /dev/null +++ b/ports/vlpp/CONTROL @@ -0,0 +1,3 @@ +Source: vlpp +Version: 0.9.3.1 +Description: Common C++ construction, including string operation / generic container / linq / General-LR parser generator / multithreading / reflection for C++ / etc diff --git a/ports/vlpp/portfile.cmake b/ports/vlpp/portfile.cmake new file mode 100644 index 000000000..f607b865f --- /dev/null +++ b/ports/vlpp/portfile.cmake @@ -0,0 +1,28 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Release-0.9.3.1) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/vczh-libraries/Release/archive/0.9.3.1.tar.gz" + FILENAME "GacUI-0.9.3.1.tar.gz" + SHA512 f284d3c78f8ae54102457b2cdc4fcee4b8da9a72d13bb325c7c7269261c5b0789eeb7340b0409b2b37294d68edb558503be131948aea3cb53582900339d26b54 +) +vcpkg_extract_source_archive(${ARCHIVE}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DSKIP_HEADERS=1 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGE_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/vlpp RENAME copyright) -- cgit v1.2.3 From 8d3526e85f04e08431cc9954fdce018c0f8100f2 Mon Sep 17 00:00:00 2001 From: sdcb Date: Fri, 1 Dec 2017 18:34:26 +0800 Subject: [vlpp] add the CppMerge.exe tool --- ports/vlpp/portfile.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/vlpp/portfile.cmake b/ports/vlpp/portfile.cmake index f607b865f..1b7ec027a 100644 --- a/ports/vlpp/portfile.cmake +++ b/ports/vlpp/portfile.cmake @@ -24,5 +24,8 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGE_DIR}/debug/include) +# Tools +file(INSTALL ${SOURCE_PATH}/Tools/CppMerge.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/vlpp RENAME copyright) -- cgit v1.2.3 From 46ec37a17c8e08ac38974da842e160d868e17bb6 Mon Sep 17 00:00:00 2001 From: lcdtyph Date: Fri, 1 Dec 2017 20:56:04 +0800 Subject: libuv: update to v1.18.0 --- ports/libuv/CONTROL | 2 +- ports/libuv/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index 517bad5e1..792b0b668 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.17.0 +Version: 1.18.0 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index 0eee8b190..638012433 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.17.0 - SHA512 274615dd67808a7b7481184aa9c1650f7646ffe714c5304ea123e287eb09cad2a4c677ac06ae68b7d0e70071545954aa6a80414cd7e37c242a2533563094870c + REF v1.18.0 + SHA512 d1ef70b0f060f40cf57b282279d1d63d6dd019b4b811211b2252db32633a80af46290d201b4a4338f84b3efdfe9754a11b29bfa4a7636b06540b1a65e1fd4fbc HEAD_REF v1.x) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 88d953a88d7061c4c49a5cb3d6323bb8f4442521 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Dec 2017 05:57:47 -0800 Subject: [hotfix] Remove VSLANG=1033. It is causing a lot of Process creation failed with error code: 87 --- toolsrc/src/vcpkg/base/system.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 8dd73c32f..8684cefe2 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -202,7 +202,7 @@ namespace vcpkg::System env_cstr.append(Strings::to_utf16(NEW_PATH)); env_cstr.push_back(L'\0'); - env_cstr.append(L"VSLANG=1033\0"); + // env_cstr.append(L"VSLANG=1033\0"); STARTUPINFOW startup_info; memset(&startup_info, 0, sizeof(STARTUPINFOW)); -- cgit v1.2.3 From d3314dfd4ea773509588084febd8ce48fe1589fa Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 1 Dec 2017 06:09:56 -0800 Subject: Properly fix VSLANG=1033 --- toolsrc/src/vcpkg/base/system.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 8684cefe2..625ee6ce0 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -202,7 +202,8 @@ namespace vcpkg::System env_cstr.append(Strings::to_utf16(NEW_PATH)); env_cstr.push_back(L'\0'); - // env_cstr.append(L"VSLANG=1033\0"); + env_cstr.append(L"VSLANG=1033"); + env_cstr.push_back(L'\0'); STARTUPINFOW startup_info; memset(&startup_info, 0, sizeof(STARTUPINFOW)); -- cgit v1.2.3 From 71f8958a069208b08a4bcca207956ef8a15238ab Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 1 Dec 2017 16:08:09 -0800 Subject: [vcpkg-contact-survey] Add monthly survey prompt --- toolsrc/include/pch.h | 1 + toolsrc/include/tests.pch.h | 1 + toolsrc/include/vcpkg/base/chrono.h | 19 ++++++ toolsrc/include/vcpkg/globalstate.h | 2 + toolsrc/include/vcpkg/userconfig.h | 20 ++++++ toolsrc/src/tests.chrono.cpp | 41 +++++++++++++ toolsrc/src/vcpkg.cpp | 95 ++++++++++++----------------- toolsrc/src/vcpkg/base/chrono.cpp | 62 +++++++++++++++++++ toolsrc/src/vcpkg/commands.contact.cpp | 13 ++++ toolsrc/src/vcpkg/globalstate.cpp | 2 + toolsrc/src/vcpkg/metrics.cpp | 28 ++------- toolsrc/src/vcpkg/userconfig.cpp | 83 +++++++++++++++++++++++++ toolsrc/vcpkglib/vcpkglib.vcxproj | 2 + toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 6 ++ toolsrc/vcpkgtest/vcpkgtest.vcxproj | 1 + toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters | 3 + 16 files changed, 301 insertions(+), 78 deletions(-) create mode 100644 toolsrc/include/vcpkg/userconfig.h create mode 100644 toolsrc/src/tests.chrono.cpp create mode 100644 toolsrc/src/vcpkg/userconfig.cpp diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index 5c31fbbd1..683bef171 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/toolsrc/include/tests.pch.h b/toolsrc/include/tests.pch.h index 0037af585..5c00fca4a 100644 --- a/toolsrc/include/tests.pch.h +++ b/toolsrc/include/tests.pch.h @@ -2,6 +2,7 @@ #include +#include #include #include #include diff --git a/toolsrc/include/vcpkg/base/chrono.h b/toolsrc/include/vcpkg/base/chrono.h index c791f53fa..4291115f7 100644 --- a/toolsrc/include/vcpkg/base/chrono.h +++ b/toolsrc/include/vcpkg/base/chrono.h @@ -2,6 +2,8 @@ #include #include +#include +#include namespace vcpkg::Chrono { @@ -44,4 +46,21 @@ namespace vcpkg::Chrono private: std::chrono::high_resolution_clock::time_point m_start_tick; }; + + class CTime + { + public: + static Optional get_current_date_time(); + static Optional parse(CStringView str); + + constexpr CTime() : m_tm{0} {} + explicit constexpr CTime(tm t) : m_tm{t} {} + + std::string to_string() const; + + std::chrono::system_clock::time_point to_time_point() const; + + private: + mutable tm m_tm; + }; } diff --git a/toolsrc/include/vcpkg/globalstate.h b/toolsrc/include/vcpkg/globalstate.h index 40ec7958e..360d3f43e 100644 --- a/toolsrc/include/vcpkg/globalstate.h +++ b/toolsrc/include/vcpkg/globalstate.h @@ -10,6 +10,8 @@ namespace vcpkg struct GlobalState { static Util::LockGuarded timer; + static Util::LockGuarded g_surveydate; + static std::atomic debugging; static std::atomic feature_packages; diff --git a/toolsrc/include/vcpkg/userconfig.h b/toolsrc/include/vcpkg/userconfig.h new file mode 100644 index 000000000..63b8e5481 --- /dev/null +++ b/toolsrc/include/vcpkg/userconfig.h @@ -0,0 +1,20 @@ +#pragma once + +#include +#include + +namespace vcpkg +{ + struct UserConfig + { + std::string user_id; + std::string user_time; + std::string user_mac; + + std::string last_completed_survey; + + static UserConfig try_read_data(const Files::Filesystem& fs); + + void try_write_data(Files::Filesystem& fs) const; + }; +} diff --git a/toolsrc/src/tests.chrono.cpp b/toolsrc/src/tests.chrono.cpp new file mode 100644 index 000000000..269cdca58 --- /dev/null +++ b/toolsrc/src/tests.chrono.cpp @@ -0,0 +1,41 @@ +#include "tests.pch.h" + +using namespace Microsoft::VisualStudio::CppUnitTestFramework; + +namespace Chrono = vcpkg::Chrono; + +namespace UnitTest1 +{ + class ChronoTests : public TestClass + { + TEST_METHOD(parse_time) + { + auto timestring = "1990-02-03T04:05:06.0Z"; + auto maybe_time = Chrono::CTime::parse(timestring); + + Assert::IsTrue(maybe_time.has_value()); + + Assert::AreEqual(timestring, maybe_time.get()->to_string().c_str()); + } + + TEST_METHOD(parse_time_blank) + { + auto maybe_time = Chrono::CTime::parse(""); + + Assert::IsFalse(maybe_time.has_value()); + } + + TEST_METHOD(time_difference) + { + auto maybe_time1 = Chrono::CTime::parse("1990-02-03T04:05:06.0Z"); + auto maybe_time2 = Chrono::CTime::parse("1990-02-10T04:05:06.0Z"); + + Assert::IsTrue(maybe_time1.has_value()); + Assert::IsTrue(maybe_time2.has_value()); + + auto delta = maybe_time2.get()->to_time_point() - maybe_time1.get()->to_time_point(); + + Assert::AreEqual(24 * 7, std::chrono::duration_cast(delta).count()); + } + }; +} diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 04d44c414..094ea1dc5 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -20,11 +20,13 @@ #include #include #include +#include #include #include #include #include +#include #pragma comment(lib, "ole32") #pragma comment(lib, "shell32") @@ -110,6 +112,28 @@ static void inner(const VcpkgCmdArguments& args) if (args.command != "autocomplete") { Commands::Version::warn_if_vcpkg_version_mismatch(paths); + std::string surveydate = *GlobalState::g_surveydate.lock(); + auto maybe_surveydate = Chrono::CTime::parse(surveydate); + if (auto p_surveydate = maybe_surveydate.get()) + { + auto delta = std::chrono::system_clock::now() - p_surveydate->to_time_point(); + // 24 hours/day * 30 days/month + if (std::chrono::duration_cast(delta).count() > 24 * 30) + { + std::default_random_engine generator( + static_cast(std::chrono::system_clock::now().time_since_epoch().count())); + std::uniform_int_distribution distribution(1, 4); + + if (distribution(generator) == 1) + { + Metrics::g_metrics.lock()->track_property("surveyprompt", "true"); + System::println( + System::Color::success, + "Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey " + "by running: vcpkg contact --survey"); + } + } + } } if (const auto command_function = find_command(Commands::get_available_commands_type_b())) @@ -148,80 +172,41 @@ static void inner(const VcpkgCmdArguments& args) static void load_config() { #if defined(_WIN32) - fs::path localappdata; - { - // Config path in AppDataLocal - wchar_t* localappdatapath = nullptr; - if (S_OK != SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, nullptr, &localappdatapath)) __fastfail(1); - localappdata = localappdatapath; - CoTaskMemFree(localappdatapath); - } - - std::string user_id, user_time, user_mac; - try - { - auto maybe_pghs = Paragraphs::get_paragraphs(Files::get_real_filesystem(), localappdata / "vcpkg" / "config"); - if (const auto p_pghs = maybe_pghs.get()) - { - const auto& pghs = *p_pghs; + auto& fs = Files::get_real_filesystem(); - std::unordered_map keys; - if (pghs.size() > 0) keys = pghs[0]; - - for (size_t x = 1; x < pghs.size(); ++x) - { - for (auto&& p : pghs[x]) - keys.insert(p); - } - - user_id = keys["User-Id"]; - user_time = keys["User-Since"]; - user_mac = keys["Mac-Hash"]; - } - } - catch (...) - { - } + auto config = UserConfig::try_read_data(fs); bool write_config = false; // config file not found, could not be read, or invalid - if (user_id.empty() || user_time.empty()) + if (config.user_id.empty() || config.user_time.empty()) { - ::vcpkg::Metrics::Metrics::init_user_information(user_id, user_time); + ::vcpkg::Metrics::Metrics::init_user_information(config.user_id, config.user_time); write_config = true; } - if (user_mac.empty()) + if (config.user_mac.empty()) { - user_mac = Metrics::get_MAC_user(); + config.user_mac = Metrics::get_MAC_user(); write_config = true; } { auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->set_user_information(user_id, user_time); - locked_metrics->track_property("user_mac", user_mac); + locked_metrics->set_user_information(config.user_id, config.user_time); + locked_metrics->track_property("user_mac", config.user_mac); } + if (config.last_completed_survey.empty()) + { + config.last_completed_survey = config.user_time; + } + + GlobalState::g_surveydate.lock()->assign(config.last_completed_survey); + if (write_config) { - try - { - std::error_code ec; - auto& fs = Files::get_real_filesystem(); - fs.create_directory(localappdata / "vcpkg", ec); - fs.write_contents(localappdata / "vcpkg" / "config", - Strings::format("User-Id: %s\n" - "User-Since: %s\n" - "Mac-Hash: %s\n", - user_id, - user_time, - user_mac)); - } - catch (...) - { - } + config.try_write_data(fs); } #endif } diff --git a/toolsrc/src/vcpkg/base/chrono.cpp b/toolsrc/src/vcpkg/base/chrono.cpp index f0e450231..03c1ecce9 100644 --- a/toolsrc/src/vcpkg/base/chrono.cpp +++ b/toolsrc/src/vcpkg/base/chrono.cpp @@ -60,4 +60,66 @@ namespace vcpkg::Chrono std::string ElapsedTime::to_string() const { return format_time_userfriendly(as()); } std::string ElapsedTimer::to_string() const { return elapsed().to_string(); } + + Optional CTime::get_current_date_time() + { + CTime ret; + +#if defined(_WIN32) + struct _timeb timebuffer; + + _ftime_s(&timebuffer); + + const errno_t err = gmtime_s(&ret.m_tm, &timebuffer.time); + + if (err) + { + return nullopt; + } +#else + time_t now = {0}; + time(&now); + auto null_if_failed = gmtime_r(&now, &ret.m_tm); + if (null_if_failed == nullptr) + { + return nullopt; + } +#endif + + return ret; + } + + Optional CTime::parse(CStringView str) + { + CTime ret; + auto assigned = sscanf_s(str.c_str(), + "%d-%d-%dT%d:%d:%d.", + &ret.m_tm.tm_year, + &ret.m_tm.tm_mon, + &ret.m_tm.tm_mday, + &ret.m_tm.tm_hour, + &ret.m_tm.tm_min, + &ret.m_tm.tm_sec); + if (assigned != 6) return nullopt; + if (ret.m_tm.tm_year < 1900) return nullopt; + ret.m_tm.tm_year -= 1900; + if (ret.m_tm.tm_mon < 1) return nullopt; + ret.m_tm.tm_mon -= 1; + mktime(&ret.m_tm); + return ret; + } + + std::string CTime::to_string() const + { + std::array date; + date.fill(0); + + strftime(&date[0], date.size(), "%Y-%m-%dT%H:%M:%S.0Z", &m_tm); + return &date[0]; + } + std::chrono::system_clock::time_point CTime::to_time_point() const + { + auto t = mktime(&m_tm); + return std::chrono::system_clock::from_time_t(t); + } } diff --git a/toolsrc/src/vcpkg/commands.contact.cpp b/toolsrc/src/vcpkg/commands.contact.cpp index 07dcea80e..8063fe317 100644 --- a/toolsrc/src/vcpkg/commands.contact.cpp +++ b/toolsrc/src/vcpkg/commands.contact.cpp @@ -1,8 +1,10 @@ #include "pch.h" +#include #include #include #include +#include namespace vcpkg::Commands::Contact { @@ -28,6 +30,17 @@ namespace vcpkg::Commands::Contact if (Util::Sets::contains(parsed_args.switches, switches[0].name)) { +#if defined(_WIN32) + auto maybe_now = Chrono::CTime::get_current_date_time(); + if (auto p_now = maybe_now.get()) + { + auto& fs = Files::get_real_filesystem(); + auto config = UserConfig::try_read_data(fs); + config.last_completed_survey = p_now->to_string(); + config.try_write_data(fs); + } +#endif + System::cmd_execute("start https://aka.ms/NPS_vcpkg"); System::println("Default browser launched to https://aka.ms/NPS_vcpkg, thank you for your feedback!"); } diff --git a/toolsrc/src/vcpkg/globalstate.cpp b/toolsrc/src/vcpkg/globalstate.cpp index 149401b2c..123c77d46 100644 --- a/toolsrc/src/vcpkg/globalstate.cpp +++ b/toolsrc/src/vcpkg/globalstate.cpp @@ -5,6 +5,8 @@ namespace vcpkg { Util::LockGuarded GlobalState::timer; + Util::LockGuarded GlobalState::g_surveydate; + std::atomic GlobalState::debugging(false); std::atomic GlobalState::feature_packages(false); diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 69160705c..a0d40e7d3 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -2,6 +2,7 @@ #include +#include #include #include #include @@ -15,32 +16,13 @@ namespace vcpkg::Metrics static std::string get_current_date_time() { - struct tm newtime; - std::array date; - date.fill(0); - -#if defined(_WIN32) - struct _timeb timebuffer; - - _ftime_s(&timebuffer); - time_t now = timebuffer.time; - const int milli = timebuffer.millitm; - - const errno_t err = gmtime_s(&newtime, &now); - - if (err) + auto maybe_time = Chrono::CTime::get_current_date_time(); + if (auto ptime = maybe_time.get()) { - return ""; + return ptime->to_string(); } -#else - time_t now; - time(&now); - gmtime_r(&now, &newtime); - const int milli = 0; -#endif - strftime(&date[0], date.size(), "%Y-%m-%dT%H:%M:%S", &newtime); - return std::string(&date[0]) + "." + std::to_string(milli) + "Z"; + return ""; } static std::string generate_random_UUID() diff --git a/toolsrc/src/vcpkg/userconfig.cpp b/toolsrc/src/vcpkg/userconfig.cpp new file mode 100644 index 000000000..d13a46f41 --- /dev/null +++ b/toolsrc/src/vcpkg/userconfig.cpp @@ -0,0 +1,83 @@ +#include "pch.h" + +#include +#include +#include +#include + +namespace +{ + static vcpkg::Lazy s_localappdata; + + static const fs::path& get_localappdata() + { + return s_localappdata.get_lazy([]() { + fs::path localappdata; + { + // Config path in AppDataLocal + wchar_t* localappdatapath = nullptr; + if (S_OK != SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, nullptr, &localappdatapath)) __fastfail(1); + localappdata = localappdatapath; + CoTaskMemFree(localappdatapath); + } + return localappdata; + }); + } +} + +namespace vcpkg +{ + UserConfig UserConfig::try_read_data(const Files::Filesystem& fs) + { + UserConfig ret; + + try + { + auto maybe_pghs = Paragraphs::get_paragraphs(fs, get_localappdata() / "vcpkg" / "config"); + if (const auto p_pghs = maybe_pghs.get()) + { + const auto& pghs = *p_pghs; + + std::unordered_map keys; + if (pghs.size() > 0) keys = pghs[0]; + + for (size_t x = 1; x < pghs.size(); ++x) + { + for (auto&& p : pghs[x]) + keys.insert(p); + } + + ret.user_id = keys["User-Id"]; + ret.user_time = keys["User-Since"]; + ret.user_mac = keys["Mac-Hash"]; + ret.last_completed_survey = keys["Survey-Completed"]; + } + } + catch (...) + { + } + + return ret; + } + + void UserConfig::try_write_data(Files::Filesystem& fs) const + { + try + { + std::error_code ec; + fs.create_directory(get_localappdata() / "vcpkg", ec); + fs.write_contents(get_localappdata() / "vcpkg" / "config", + Strings::format("User-Id: %s\n" + "User-Since: %s\n" + "Mac-Hash: %s\n" + "Survey-Completed: %s\n", + user_id, + user_time, + user_mac, + last_completed_survey)); + } + catch (...) + { + } + } +} diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index ae332e015..9a7ad6dc0 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -178,6 +178,7 @@ + @@ -240,6 +241,7 @@ + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index e902bffbb..966fc7fb9 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -192,6 +192,9 @@ Source Files\vcpkg\base + + Source Files\vcpkg + @@ -332,5 +335,8 @@ Header Files\vcpkg + + Header Files\vcpkg + \ No newline at end of file diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index 9eafc1ada..166216c45 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -20,6 +20,7 @@ + diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters index 2121f9782..422f9298e 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters @@ -42,6 +42,9 @@ Source Files + + Source Files + -- cgit v1.2.3 From 19d64fbf561fa470078ef1471dfced6710a6e89d Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Sat, 2 Dec 2017 09:28:56 +0300 Subject: Update libtorrent to 1.1.5 --- ports/libtorrent/CONTROL | 2 +- ports/libtorrent/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL index f2618a4ef..e139965df 100644 --- a/ports/libtorrent/CONTROL +++ b/ports/libtorrent/CONTROL @@ -1,4 +1,4 @@ Source: libtorrent -Version: 1.1.4-1 +Version: 1.1.5 Description: An efficient feature complete C++ BitTorrent implementation Build-Depends: boost, openssl diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake index 6eb49c0b4..97658384e 100644 --- a/ports/libtorrent/portfile.cmake +++ b/ports/libtorrent/portfile.cmake @@ -11,11 +11,11 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libtorrent-libtorrent-1_1_4) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libtorrent-libtorrent-1_1_5) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/arvidn/libtorrent/archive/libtorrent-1_1_4.zip" - FILENAME "libtorrent-1_1_4.zip" - SHA512 fd3b875c9626721db9b3e719ce50deeb6f39a030df1e23dd421d0b142aac9c3bb7bee3a61f0c18bb30f85d4dd6131fe90d6138c09ba598f09230824f8d5a3fb1 + URLS "https://github.com/arvidn/libtorrent/archive/libtorrent-1_1_5.zip" + FILENAME "libtorrent-1_1_5.zip" + SHA512 ebb7c1b08a4b07b4db54050a099950dc61446e2e7fcceb82c5db8e0629c7718c3c8808ee59d5f361ad85c75f7034a33dfcb5ebd619ef0bb9b5ae0cfdd10d01b5 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 768acf196685e6662b50fa87396d496d374ace61 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Sun, 3 Dec 2017 10:30:13 +1100 Subject: re-add debug tools: --- ports/qt5base/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake index 5cb7c6b82..c5ec1ea9d 100644 --- a/ports/qt5base/portfile.cmake +++ b/ports/qt5base/portfile.cmake @@ -77,6 +77,7 @@ file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) file(REMOVE ${BINARY_TOOLS}) file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) file(REMOVE ${BINARY_TOOLS}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf ${CMAKE_CURRENT_LIST_DIR}/qt_release.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) -- cgit v1.2.3 From d5395ac793d1db78ab97ca144d5e89eabf49a735 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 2 Dec 2017 23:57:17 -0800 Subject: [speex] Fix debug mode .def file. Add exports for extern globals. --- ports/speex/CMakeLists.txt | 13 ++++++++++--- ports/speex/CONTROL | 2 +- ports/speex/portfile.cmake | 6 ++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt index 839222ae6..915b08226 100644 --- a/ports/speex/CMakeLists.txt +++ b/ports/speex/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required (VERSION 3.8.0) project (libspeex C) -set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/include) - option(USE_SSE "USE_SSE used Note: USE_SSE and FIXED_POINT are mutually exclusive." ON) if(MSVC) add_definitions(-DHAVE_CONFIG_H) @@ -17,6 +15,15 @@ include_directories(win32 include) set(CMAKE_DEBUG_POSTFIX d) +file(READ "win32/libspeex.def" _contents) +string(REPLACE "LIBRARY libspeex" "LIBRARY libspeexd" _contents "${_contents}") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libspeex.def" + "${_contents}\n" + "speex_nb_mode\n" + "speex_wb_mode\n" + "speex_uwb_mode\n" +) + set(SRC "libspeex/bits.c" "libspeex/cb_search.c" @@ -52,7 +59,7 @@ set(SRC "libspeex/vbr.c" "libspeex/vq.c" "libspeex/window.c" - "win32/libspeex.def" + "${CMAKE_CURRENT_BINARY_DIR}/libspeex.def" ) add_library(libspeex ${SRC}) diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL index 5d3fa10a2..00910a596 100644 --- a/ports/speex/CONTROL +++ b/ports/speex/CONTROL @@ -1,3 +1,3 @@ Source: speex -Version: 1.2.0-1 +Version: 1.2.0-2 Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. diff --git a/ports/speex/portfile.cmake b/ports/speex/portfile.cmake index 6eed0cfc9..271c2bc88 100644 --- a/ports/speex/portfile.cmake +++ b/ports/speex/portfile.cmake @@ -18,4 +18,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(READ "${CURRENT_PACKAGES_DIR}/include/speex/speex.h" _contents) + string(REPLACE "extern const SpeexMode" "__declspec(dllimport) extern const SpeexMode" _contents "${_contents}") + file(WRITE "${CURRENT_PACKAGES_DIR}/include/speex/speex.h" "${_contents}") +endif() + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/speex RENAME copyright) -- cgit v1.2.3 From c6a82f27f197b1129eddb561eb14d26f67b4cd36 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Sun, 3 Dec 2017 19:19:08 +1100 Subject: put qtmain in manual link directory, resolve resultant build issues with qtdeclarative --- ports/qt5base/fixcmake.py | 11 +++++++++++ ports/qt5base/portfile.cmake | 20 ++++++++++++++++++++ ports/qt5modularscripts/qt_modular_library.cmake | 21 ++++++++++++++------- 3 files changed, 45 insertions(+), 7 deletions(-) diff --git a/ports/qt5base/fixcmake.py b/ports/qt5base/fixcmake.py index 923e600bc..bcfb12ac5 100644 --- a/ports/qt5base/fixcmake.py +++ b/ports/qt5base/fixcmake.py @@ -42,6 +42,17 @@ for f in files: builder += " else()" builder += "\n " + line.replace("/plugins/", "/debug/plugins/") builder += " endif()\n" + elif "_install_prefix}/lib/qtmaind.lib" in line: + # qtmaind.lib has been moved to manual-link: + builder += line.replace("/lib/", "/debug/lib/manual-link/") + elif "_install_prefix}/lib/qtmain.lib" in line: + # qtmain(d).lib has been moved to manual-link: + builder += line.replace("/lib/", "/lib/manual-link/") + builder += " set(imported_location_debug \"${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib\")\n" + builder += "\n" + builder += " set_target_properties(Qt5::WinMain PROPERTIES\n" + builder += " IMPORTED_LOCATION_DEBUG ${imported_location_debug}\n" + builder += " )\n" elif dllpattern.search(line) != None: builder += line.replace("/bin/", "/debug/bin/") elif libpattern.search(line) != None: diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake index c5ec1ea9d..02122f9cc 100644 --- a/ports/qt5base/portfile.cmake +++ b/ports/qt5base/portfile.cmake @@ -91,4 +91,24 @@ vcpkg_execute_required_process( vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5) +#--------------------------------------------------------------------------- +# qtmain(d) vs. Qt5AxServer(d) +#--------------------------------------------------------------------------- +# Qt applications have to either link to qtmain(d) or to Qt5AxServer(d), +# never both. See http://doc.qt.io/qt-5/activeqt-server.html for more info. +# +# Create manual-link folders: +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +# +# Either have users explicitly link against qtmain.lib, qtmaind.lib: +file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl) + file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5base RENAME copyright) diff --git a/ports/qt5modularscripts/qt_modular_library.cmake b/ports/qt5modularscripts/qt_modular_library.cmake index 6fa4c20c8..518f226bb 100644 --- a/ports/qt5modularscripts/qt_modular_library.cmake +++ b/ports/qt5modularscripts/qt_modular_library.cmake @@ -41,6 +41,12 @@ function(qt_modular_library NAME HASH) get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) + + string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) + string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) + #Configure debug vcpkg_configure_qmake_debug( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} @@ -56,6 +62,7 @@ function(qt_modular_library NAME HASH) file(READ "${DEBUG_MAKEFILE}" _contents) string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") string(REPLACE "vcpkg\\installed\\${TARGET_TRIPLET}\\lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") + string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib qtmaind.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link qtmaind.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" _contents "${_contents}") file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") endforeach() @@ -73,6 +80,12 @@ function(qt_modular_library NAME HASH) #Store release makefile path file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + file(READ "${RELEASE_MAKEFILE}" _contents) + string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib qtmain.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib\\manual-link qtmain.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib" _contents "${_contents}") + file(WRITE "${RELEASE_MAKEFILE}" "${_contents}") + endforeach() + #Build release vcpkg_build_qmake_release() @@ -84,13 +97,7 @@ function(qt_modular_library NAME HASH) LOGNAME fix-cmake ) endif() - - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) - - string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) - string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) - + #Set the correct install directory to packages foreach(MAKEFILE ${RELEASE_MAKEFILES} ${DEBUG_MAKEFILES}) vcpkg_replace_string(${MAKEFILE} "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}") -- cgit v1.2.3 From 11c6613ba930b04c0027ff9b775ec2cc3b13e969 Mon Sep 17 00:00:00 2001 From: evpobr Date: Sun, 3 Dec 2017 14:31:57 +0500 Subject: [scintilla] Initial port. --- ports/scintilla/CONTROL | 3 +++ ports/scintilla/portfile.cmake | 61 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 ports/scintilla/CONTROL create mode 100644 ports/scintilla/portfile.cmake diff --git a/ports/scintilla/CONTROL b/ports/scintilla/CONTROL new file mode 100644 index 000000000..f382cb552 --- /dev/null +++ b/ports/scintilla/CONTROL @@ -0,0 +1,3 @@ +Source: scintilla +Version: 3.7.6 +Description: A free source code editing component for Win32, GTK+, and OS X diff --git a/ports/scintilla/portfile.cmake b/ports/scintilla/portfile.cmake new file mode 100644 index 000000000..4bdfc8ec8 --- /dev/null +++ b/ports/scintilla/portfile.cmake @@ -0,0 +1,61 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/scintilla) +vcpkg_download_distfile(ARCHIVE + URLS "http://www.scintilla.org/scintilla376.zip" + FILENAME "scintilla376.zip" + SHA512 618a50405eede3277d7696ac58122aeeb490d10ae392c60c7f78baaa96c965a8e1a599948e0ebd61bed7f75894b01bdf4574a0e5d0e20996bfdfb2e1bdb33203 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +if(TRIPLET_SYSTEM_ARCH MATCHES "x86") + set(BUILD_ARCH "Win32") +else() + set(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) +endif() + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/Win32/SciLexer.vcxproj + PLATFORM ${MSBUILD_PLATFORM} +) + +# Handle headers +file(INSTALL ${SOURCE_PATH}/include/ILexer.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/include/Sci_Position.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/include/SciLexer.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/include/Scintilla.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle libraries +if(BUILD_ARCH STREQUAL "Win32") + set(BUILD_DIR_DEBUG "/Debug") + set(BUILD_DIR_RELEASE "/Release") +else() + set(BUILD_DIR_DEBUG "${BUILD_ARCH}/Debug") + set(BUILD_DIR_RELEASE "${BUILD_ARCH}/Release") +endif() + +if(VCPKG_LIBRARY_LINKAGE MATCHES "dynamic") + file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_RELEASE}/SciLexer.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_DEBUG}/SciLexer.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_RELEASE}/SciLexer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_DEBUG}/SciLexer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +# Handle PDBs + +file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_RELEASE}/SciLexer.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_DEBUG}/SciLexer.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/scintilla RENAME copyright) -- cgit v1.2.3 From 805fabe58adfcb0c073868c5534bf2f54f4a7914 Mon Sep 17 00:00:00 2001 From: xoviat Date: Sun, 3 Dec 2017 22:37:01 -0600 Subject: Flint: enable DLL builds (#2271) * [flint] enable dynamic building * [flint] increment version --- ports/flint/CONTROL | 2 +- ports/flint/portfile.cmake | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ports/flint/CONTROL b/ports/flint/CONTROL index ee495fc0c..ce4646883 100644 --- a/ports/flint/CONTROL +++ b/ports/flint/CONTROL @@ -1,4 +1,4 @@ Source: flint -Version: 2.5.2 +Version: 2.5.2-1 Description: Fast Library for Number Theory Build-Depends: mpir, mpfr, pthreads, gettimeofday diff --git a/ports/flint/portfile.cmake b/ports/flint/portfile.cmake index e20ef9731..9a9d5136b 100644 --- a/ports/flint/portfile.cmake +++ b/ports/flint/portfile.cmake @@ -1,9 +1,3 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "Warning: Dynamic building not supported yet. Building static.") - set(VCPKG_CRT_LINKAGE static) - set(VCPKG_LIBRARY_LINKAGE static) -endif() - include(vcpkg_common_functions) set(FLINT_VERSION 2.5.2) -- cgit v1.2.3 From fb3aefa4e6bdb28aa9cb3d6a1e3580b952c8dd77 Mon Sep 17 00:00:00 2001 From: pravic Date: Mon, 4 Dec 2017 17:55:26 +0300 Subject: [sciter] Update to 4.0.6.5590 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index df095e29e..b822697e6 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.0.5 +Version: 4.0.6 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index cd81ac139..2f65614e6 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,9 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_VERSION 4.0.5) -set(SCITER_REVISION c48b7c9219e4b01c9e1a668fb27cd9eb847e87ac) -set(SCITER_SHA 5e9ff4a074bf854362fc7ce753679619b32ea8f3ab782c55d85125350ddc9b7e428ad23ae29fa12269fdf55209e66777e332e811520d61309b49ab48c00859b4) +set(SCITER_REVISION d015c26ee369dffd353c40bb1a98a7350db14ab2) +set(SCITER_SHA 41c33d0049d32ec07bf7c1af38d31c87c4504c2ee054a60ebaa867b4affe7c8eab60a2f2ffe3326f44d61751e5e7ffd3c067d878c79acf47c2598f6e65fbf7a9) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From e373beac70dcad693acc7f08c5be829888675eb6 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 5 Dec 2017 08:15:49 +1100 Subject: remove commented sections --- ports/qt53d/CONTROL | 2 +- ports/qt5modularscripts/qt_modular_library.cmake | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/ports/qt53d/CONTROL b/ports/qt53d/CONTROL index b75c6b7bf..d157525ee 100644 --- a/ports/qt53d/CONTROL +++ b/ports/qt53d/CONTROL @@ -1,4 +1,4 @@ Source: qt53d Version: 5.9.2-0 Description: Qt5 3d Module - Functionality for near-realtime simulation systems with support for 2D and 3D rendering -Build-Depends: qt5modularscripts, qt5base \ No newline at end of file +Build-Depends: qt5modularscripts, qt5base, qt5declarative \ No newline at end of file diff --git a/ports/qt5modularscripts/qt_modular_library.cmake b/ports/qt5modularscripts/qt_modular_library.cmake index 518f226bb..7aff90f9b 100644 --- a/ports/qt5modularscripts/qt_modular_library.cmake +++ b/ports/qt5modularscripts/qt_modular_library.cmake @@ -144,26 +144,11 @@ function(qt_modular_library NAME HASH) endif() if(DEBUG_DLLS) file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - #file(REMOVE ${DEBUG_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - # file(GLOB DEBUG_BINS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/*) - # if(NOT DEBUG_BINS) - # file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - # endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/qt5/debug/include) - # file(GLOB DEBUG_LIBS "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib") - # if(EXISTS ${CURRENT_PACKAGES_DIR}/bin) - # make_directory(${CURRENT_PACKAGES_DIR}/debug/bin) - # foreach(DEBUG_LIB ${DEBUG_LIBS}) - # get_filename_component(DEBUG_STEM "${DEBUG_LIB}" NAME_WE) - # file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${DEBUG_STEM}.dll ${CURRENT_PACKAGES_DIR}/debug/bin/${DEBUG_STEM}.dll) - # endforeach() - # endif() - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) #Find the relevant license file and install it -- cgit v1.2.3 From d26a6b067c24e324b111849c320bdc4cf681e713 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 26 Nov 2017 02:51:31 -0800 Subject: Add `vcpkg integrate powershell` for tab completion --- scripts/addPoshVcpkgToPowershellProfile.ps1 | 55 +++++++++++++++++++++++++++++ toolsrc/src/vcpkg/commands.integrate.cpp | 12 +++++-- 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 scripts/addPoshVcpkgToPowershellProfile.ps1 diff --git a/scripts/addPoshVcpkgToPowershellProfile.ps1 b/scripts/addPoshVcpkgToPowershellProfile.ps1 new file mode 100644 index 000000000..92a7573e4 --- /dev/null +++ b/scripts/addPoshVcpkgToPowershellProfile.ps1 @@ -0,0 +1,55 @@ +[CmdletBinding()] +param() + +function findExistingImportModuleDirectives([Parameter(Mandatory=$true)][string]$path) +{ + if (!(Test-Path $path)) + { + return $false + } + + $fileContents = Get-Content $path + return $fileContents -match 'Import-Module.+?(?=posh-vcpkg)' +} + +$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition +. "$scriptsDir\VcpkgPowershellUtils.ps1" + +$profileEntry = "Import-Module '$scriptsDir\posh-vcpkg'" +$profilePath = $PROFILE # Implicit powershell variable +if (!(Test-Path $profilePath)) +{ + $profileDir = Split-Path $profilePath -Parent + vcpkgCreateDirectoryIfNotExists $profileDir +} + +Write-Host "`nAdding the following line to ${profilePath}:" +Write-Host " $profileEntry" + +# @() Needed to force Array in PowerShell 2.0 +[Array]$existingImports = @(findExistingImportModuleDirectives $profilePath) +if ($existingImports.Count -gt 0) +{ + $existingImportsOut = $existingImports -join "`n " + Write-Host "`nposh-vcpkg is already imported to your PowerShell profile. The following entries were found:" + Write-Host " $existingImportsOut" + Write-Host "`nPlease make sure you have started a new Powershell window for the changes to take effect." + return +} + +# Posh-git does the following check, so we should too. +# https://github.com/dahlbyk/posh-git/blob/master/src/Utils.ps1 +# If the profile script exists and is signed, then we should not modify it +if (Test-Path $profilePath) +{ + $sig = Get-AuthenticodeSignature $profilePath + if ($null -ne $sig.SignerCertificate) + { + Write-Warning "Skipping add of posh-vcpkg import to profile; '$profilePath' appears to be signed." + Write-Warning "Please manually add the line '$profileEntry' to your profile and resign it." + return + } +} + +Add-Content $profilePath -Value "`n$profileEntry" -Encoding UTF8 +Write-Host "`nSuccessfully added posh-vcpkg to your PowerShell profile. Please start a new Powershell window for the changes to take effect." diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 66c5eb5a9..460e99b88 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -324,18 +324,20 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console " vcpkg integrate install Make installed packages available user-wide. Requires admin privileges on " "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 project Generate a referencing nuget package for individual VS project use\n" + " vcpkg integrate powershell Enable PowerShell Tab-Completion\n"; namespace Subcommand { static const std::string INSTALL = "install"; static const std::string REMOVE = "remove"; static const std::string PROJECT = "project"; + static const std::string POWERSHELL = "powershell"; } static std::vector valid_arguments(const VcpkgPaths&) { - return {Subcommand::INSTALL, Subcommand::REMOVE, Subcommand::PROJECT}; + return {Subcommand::INSTALL, Subcommand::REMOVE, Subcommand::PROJECT, Subcommand::POWERSHELL}; } const CommandStructure COMMAND_STRUCTURE = { @@ -365,6 +367,12 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console { return integrate_project(paths); } + if (args.command_arguments[0] == Subcommand::POWERSHELL) + { + System::powershell_execute("PowerShell Tab-Completion", + paths.scripts / "addPoshVcpkgToPowershellProfile.ps1"); + Checks::exit_success(VCPKG_LINE_INFO); + } #endif Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown parameter %s for integrate", args.command_arguments[0]); -- cgit v1.2.3 From 1a9a14b3ce456289c2a4523079e0104dc17a9758 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 4 Dec 2017 16:01:16 -0800 Subject: [autocomplete] Add info in README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index bf7d7b0ea..9ff217564 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,14 @@ Finally, create a New Project (or open an existing one) in Visual Studio 2017 or For CMake projects, simply include our toolchain file. See our [using a package](docs/examples/using-sqlite.md) example for the specifics. +## Tab-Completion / Auto-Completion +`Vcpkg` supports auto-completion of commands, package names, options etc. To enable tab-completion in Powershell, use +``` +.\vcpkg integrate powershell +``` +and restart Powershell. + + ## Examples See the [documentation](docs/index.md) for specific walkthroughs, including [using a package](docs/examples/using-sqlite.md) and [adding a new package](docs/examples/packaging-zlib.md). -- cgit v1.2.3 From 36579517b9685f0c475d65defc1d84794a8c2592 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Mon, 4 Dec 2017 16:37:06 -0800 Subject: [aws-sdk-cpp] update to 1.3.15 --- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index a36263e7a..78ac3dfd7 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,3 +1,3 @@ Source: aws-sdk-cpp -Version: 1.2.4 +Version: 1.3.15 Description: AWS SDK for C++ diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 4e0e8bdfe..e47417100 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.2.4 - SHA512 dc96e40fe72e4b115607245f536cd13414e33a8f754153fd137f1391af14b9793fc8a07f9f984490e0783e385c2c7b9a421878b63ea793012f53fefe7ec4d368 + REF 1.3.15 + SHA512 844addabf01bdbba2c50f94303f23fd092ac5593c42c782aad5959d5edaadb0bec8a6408a91f4605cef996f0d5a23fd94ca3c194829c65db98291d5fa7150bff HEAD_REF master ) -- cgit v1.2.3 From ca3604738687d0c95042c8b9ba6d0514d2ed66ac Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 4 Dec 2017 16:53:31 -0800 Subject: Update CHANGELOG and bump version to v0.0.100 --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 491e4b9c6..2c07411a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,38 @@ +vcpkg (0.0.100) +-------------- + * Add ports: + - libmspack 0.6 + - scintilla 3.7.6 + - vlpp 0.9.3.1 + * Update ports: + - allegro5 5.2.2.0-1 -> 5.2.3.0 + - benchmark 1.2.0 -> 1.3.0 + - brotli 0.6.0-1 -> 1.0.2 + - chakracore 1.4.3 -> 1.7.4 + - cppunit 1.13.2 -> 1.14.0 + - doctest 1.2.0 -> 1.2.6 + - ecm 5.37.0-1 -> 5.40.0 + - expat 2.2.4-2 -> 2.2.5 + - flint 2.5.2 -> 2.5.2-1 + - folly 2017.10.02.00 -> 2017.11.27.00 + - freerdp 2.0.0-rc0~vcpkg1-1 -> 2.0.0-rc1~vcpkg1 + - libtorrent 1.1.4-1 -> 1.1.5 + - libuv 1.16.1 -> 1.18.0 + - libzip 1.2.0-2 -> 1.3.2 + - log4cplus REL_1_2_1-RC2-1 -> REL_2_0_0-RC2 + - mpfr 3.1.6-1 -> 3.1.6-2 + - nana 1.5.4-1 -> 1.5.5 + - poco 1.7.8-2 -> 1.8.0.1 + - pugixml 1.8.1-2 -> 1.8.1-3 + - sciter 4.0.4 -> 4.0.6 + - speex 1.2.0-1 -> 1.2.0-2 + * `vcpkg` has exceeded 400 libraries! + * `vcpkg` now supports Tab-Completion/Auto-Completion in Powershell. To enable it, simply run `.\vcpkg integrate powershell` and restart Powershell. + * `vcpkg` now requires the English language pack of Visual Studio to be installed. This is needed because several libraries fail to build in non-English languages, so `vcpkg` sets the build environment to English to bypass these issues. + +-- vcpkg team MON, 04 Dec 2017 17:00:00 -0800 + + vcpkg (0.0.99) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 2f0f54a23..e45ea373f 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.99" \ No newline at end of file +"0.0.100" \ No newline at end of file -- cgit v1.2.3 From 03ced8199b8dcdb64723ba5bcd26c77ec4b75f68 Mon Sep 17 00:00:00 2001 From: Rahul Potharaju Date: Mon, 4 Dec 2017 17:15:16 -0800 Subject: Adding re2 port --- ports/re2/CONTROL | 3 +++ ports/re2/portfile.cmake | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 ports/re2/CONTROL create mode 100644 ports/re2/portfile.cmake diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL new file mode 100644 index 000000000..5a37abbaf --- /dev/null +++ b/ports/re2/CONTROL @@ -0,0 +1,3 @@ +Source: re2 +Version: 2017-12-01 +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 diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake new file mode 100644 index 000000000..7caf9acba --- /dev/null +++ b/ports/re2/portfile.cmake @@ -0,0 +1,19 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/re2-2017-12-01) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/google/re2/archive/2017-12-01.zip" + FILENAME "re2-2017-12-01.zip" + SHA512 64e9b8673201fd3b0253acfd9fcb2985e88db69724e31a9c839d3b5cddfa1b91cf9e4fb70b12250fd4d6a7934a50550f6000627607227ed97bca329bfeb5bcc4 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DRE2_BUILD_TESTING=1 -DBUILD_SHARED_LIBS=1 -DBUILD_TESTING=1 +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/re2 RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 6c42097aef35368a49fad3d63fd09a9035e1cd4e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 4 Dec 2017 19:24:00 -0800 Subject: [re2] Use vcpkg_from_github() --- ports/re2/portfile.cmake | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake index 7caf9acba..0cc4d9cfa 100644 --- a/ports/re2/portfile.cmake +++ b/ports/re2/portfile.cmake @@ -1,11 +1,12 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/re2-2017-12-01) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/google/re2/archive/2017-12-01.zip" - FILENAME "re2-2017-12-01.zip" - SHA512 64e9b8673201fd3b0253acfd9fcb2985e88db69724e31a9c839d3b5cddfa1b91cf9e4fb70b12250fd4d6a7934a50550f6000627607227ed97bca329bfeb5bcc4 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/re2 + REF 2017-12-01 + SHA512 1943be4543ac6cedaef27202e126bddc57472926c2f28470c5e980902252d58e18bb4578c538883d9368a041e4928983fa27cd960c3671fe3b6366dbd5048b29 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 216f7137b9736d68e698f32154966ea68c7b98db Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 4 Dec 2017 19:50:23 -0800 Subject: [re2] Don't pass BUILD_SHARED_LIBS BUILD_SHARED_LIBS should not be locked to shared/static, because the other type will fail. Vcpkg was overriding this flag before, so no behavior change. (i.e. static builds worked before as well). Also tests = OFF. --- ports/re2/CONTROL | 2 +- ports/re2/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL index 5a37abbaf..89cb6a1a0 100644 --- a/ports/re2/CONTROL +++ b/ports/re2/CONTROL @@ -1,3 +1,3 @@ Source: re2 -Version: 2017-12-01 +Version: 2017-12-01-1 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 diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake index 0cc4d9cfa..bc9544db1 100644 --- a/ports/re2/portfile.cmake +++ b/ports/re2/portfile.cmake @@ -10,7 +10,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DRE2_BUILD_TESTING=1 -DBUILD_SHARED_LIBS=1 -DBUILD_TESTING=1 + OPTIONS -DRE2_BUILD_TESTING=OFF ) vcpkg_install_cmake() -- cgit v1.2.3 From 09c8264e9c06e747ede8b1eca785658216008374 Mon Sep 17 00:00:00 2001 From: Christophe Guebert Date: Tue, 5 Dec 2017 15:09:14 +0100 Subject: crow initial port --- ports/crow/CONTROL | 3 +++ ports/crow/portfile.cmake | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 ports/crow/CONTROL create mode 100644 ports/crow/portfile.cmake diff --git a/ports/crow/CONTROL b/ports/crow/CONTROL new file mode 100644 index 000000000..0b33939d5 --- /dev/null +++ b/ports/crow/CONTROL @@ -0,0 +1,3 @@ +Source: crow +Version: 0.1 +Description: Very fast and easy to use C++ micro web framework diff --git a/ports/crow/portfile.cmake b/ports/crow/portfile.cmake new file mode 100644 index 000000000..de9471fcc --- /dev/null +++ b/ports/crow/portfile.cmake @@ -0,0 +1,12 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/crow-0.1) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "https://github.com/ipkn/crow/archive/v0.1.tar.gz" + FILENAME "crow-v0.1.tar.gz" + SHA512 5a97c5b8cda3ffe79001aa382d4391eddde30027401bbb1d9c85c70ea715f556d3659f5eac0b9d9192c19d13718f19ad6bdf49d67bef03b21e75300d60e7d02a +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/crow RENAME copyright) -- cgit v1.2.3 From a81a51650542ab4db32249f7c596991c4805d0dc Mon Sep 17 00:00:00 2001 From: Tobias Kohlbau Date: Tue, 5 Dec 2017 13:15:47 +0100 Subject: fcl: add missing dependencies within cmake Signed-off-by: Tobias Kohlbau --- ports/fcl/0002-fix_dependencies.patch | 14 ++++++++++++++ ports/fcl/CONTROL | 2 +- ports/fcl/portfile.cmake | 8 +++++++- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 ports/fcl/0002-fix_dependencies.patch diff --git a/ports/fcl/0002-fix_dependencies.patch b/ports/fcl/0002-fix_dependencies.patch new file mode 100644 index 000000000..34b069291 --- /dev/null +++ b/ports/fcl/0002-fix_dependencies.patch @@ -0,0 +1,14 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 5ce1f77..1f3e863 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -10,8 +10,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES + SOVERSION ${FCL_ABI_VERSION}) + + target_link_libraries(${PROJECT_NAME} +- PUBLIC ${OCTOMAP_LIBRARIES} +- PRIVATE ${CCD_LIBRARIES} ++ PUBLIC octomap octomath ccd + PRIVATE ${Boost_LIBRARIES}) + + target_include_directories(${PROJECT_NAME} INTERFACE diff --git a/ports/fcl/CONTROL b/ports/fcl/CONTROL index daadff075..84a9c1f5b 100644 --- a/ports/fcl/CONTROL +++ b/ports/fcl/CONTROL @@ -1,4 +1,4 @@ Source: fcl -Version: 0.5.0-2 +Version: 0.5.0-3 Description: a library for performing three types of proximity queries on a pair of geometric models composed of triangles Build-Depends: boost, ccd, octomap diff --git a/ports/fcl/portfile.cmake b/ports/fcl/portfile.cmake index e0cee7e02..851a013c2 100644 --- a/ports/fcl/portfile.cmake +++ b/ports/fcl/portfile.cmake @@ -16,7 +16,8 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_fix_package_detection.patch) + ${CMAKE_CURRENT_LIST_DIR}/0001_fix_package_detection.patch + ${CMAKE_CURRENT_LIST_DIR}/0002-fix_dependencies.patch) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(FCL_STATIC_LIBRARY ON) @@ -37,6 +38,11 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake/") +file(READ ${CURRENT_PACKAGES_DIR}/share/fcl/fclConfig.cmake FCL_CONFIG) +string(REPLACE "unset(_expectedTargets)" + "unset(_expectedTargets)\n\nfind_package(octomap REQUIRED)\nfind_package(ccd REQUIRED)" FCL_CONFIG "${FCL_CONFIG}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/fcl/fclConfig.cmake "${FCL_CONFIG}") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fcl RENAME copyright) -- cgit v1.2.3 From 2977e1d7cd51d2150b9b8b4708e369ccc8666f92 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Wed, 6 Dec 2017 05:38:35 +0900 Subject: Fix pcl/CMakeLists fot Visual Studio 2017 Fix conditional branch for Visual C++ 2017. Visual C++ 2017 has a version number 191x. --- ports/pcl/CONTROL | 2 +- ports/pcl/cmakelists.patch | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index 86839aedd..fa2d37fca 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,5 +1,5 @@ Source: pcl -Version: 1.8.1-7 +Version: 1.8.1-8 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. Build-Depends: boost, eigen3, flann, qhull, vtk diff --git a/ports/pcl/cmakelists.patch b/ports/pcl/cmakelists.patch index 2d8bd1bd3..d385fd291 100644 --- a/ports/pcl/cmakelists.patch +++ b/ports/pcl/cmakelists.patch @@ -1,7 +1,16 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index d36a581fb..9b0195324 100644 +index d36a581fb..b68962e97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt +@@ -258,7 +258,7 @@ if(OPENMP_FOUND) + set(OPENMP_DLL VCOMP120) + elseif(MSVC_VERSION EQUAL 1900) + set(OPENMP_DLL VCOMP140) +- elseif(MSVC_VERSION EQUAL 1910) ++ elseif(MSVC_VERSION MATCHES "^191[0-9]$") + set(OPENMP_DLL VCOMP140) + endif() + if(OPENMP_DLL) @@ -327,9 +327,9 @@ endif(WITH_PNG) # Qhull option(WITH_QHULL "Include convex-hull operations" TRUE) -- cgit v1.2.3 From a4f8515c9e6af66bbdcf704c75e5284daa240040 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 4 Dec 2017 17:37:08 -0800 Subject: [vcpkg-msbuild-integration] Address #2299 by using full path to powershell. --- scripts/buildsystems/msbuild/vcpkg.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index ad1dde89b..d6fbcf179 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -67,11 +67,11 @@ File="$(TLogLocation)$(ProjectName).write.1u.tlog" Lines="^$(TargetPath);$([System.IO.Path]::Combine($(ProjectDir),$(IntDir)))vcpkg.applocal.log" Encoding="Unicode"/> -- cgit v1.2.3 From e7cbb50f3dd323380928f4cb4e5b9bc0945abac8 Mon Sep 17 00:00:00 2001 From: Ilya Finkelshteyn Date: Tue, 5 Dec 2017 14:31:58 -0800 Subject: Fix path to powershell.exe https://github.com/Microsoft/vcpkg/issues/2299 --- scripts/buildsystems/msbuild/vcpkg.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index d6fbcf179..092e013b5 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -67,11 +67,11 @@ File="$(TLogLocation)$(ProjectName).write.1u.tlog" Lines="^$(TargetPath);$([System.IO.Path]::Combine($(ProjectDir),$(IntDir)))vcpkg.applocal.log" Encoding="Unicode"/> -- cgit v1.2.3 From 705c8f201273e9bdad9508903d26b21f5d76f1c3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 5 Dec 2017 18:03:36 -0800 Subject: Improve error message when failing to parse package --- toolsrc/src/vcpkg/packagespec.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/packagespec.cpp b/toolsrc/src/vcpkg/packagespec.cpp index eeb9981af..17189afcf 100644 --- a/toolsrc/src/vcpkg/packagespec.cpp +++ b/toolsrc/src/vcpkg/packagespec.cpp @@ -2,6 +2,7 @@ #include #include +#include #include using vcpkg::Parse::parse_comma_list; @@ -95,8 +96,19 @@ namespace vcpkg std::vector PackageSpec::to_package_specs(const std::vector& ports, const Triplet& triplet) { - return Util::fmap(ports, [&](const std::string s) { - return PackageSpec::from_name_and_triplet(s, triplet).value_or_exit(VCPKG_LINE_INFO); + return Util::fmap(ports, [&](const std::string& s) -> PackageSpec { + auto maybe_spec = PackageSpec::from_name_and_triplet(s, triplet); + if (auto spec = maybe_spec.get()) + { + return std::move(*spec); + } + + const PackageSpecParseResult error_type = maybe_spec.error(); + Checks::exit_with_message(VCPKG_LINE_INFO, + "Invalid package: %s\n" + "%s", + s, + vcpkg::to_string(error_type)); }); } -- cgit v1.2.3 From 438dc50389048bdd15b504444b284e0d5d95e3c2 Mon Sep 17 00:00:00 2001 From: Roelf-Jilling Date: Wed, 6 Dec 2017 12:53:47 +0100 Subject: [ms-gsl] simplify portfile --- ports/ms-gsl/portfile.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index 285b49676..b8c2d4948 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -9,8 +9,7 @@ vcpkg_from_github( HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*") +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ms-gsl) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/ms-gsl/LICENSE ${CURRENT_PACKAGES_DIR}/share/ms-gsl/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ms-gsl RENAME copyright) -- cgit v1.2.3 From 89683742beb839f5d7acc94bb9af12b1c6e270e4 Mon Sep 17 00:00:00 2001 From: Roelf-Jilling Date: Wed, 6 Dec 2017 12:28:36 +0100 Subject: [ms-gsl] update to 2017-12-04 --- ports/ms-gsl/CONTROL | 2 +- ports/ms-gsl/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL index b19e7c583..f9ab0c433 100644 --- a/ports/ms-gsl/CONTROL +++ b/ports/ms-gsl/CONTROL @@ -1,3 +1,3 @@ Source: ms-gsl -Version: 20171104-d10ebc6555b627c9d1196076a78467e7be505987 +Version: 20171204-9d65e74400976b3509833f49b16d401600c7317d Description: Microsoft implementation of the Guidelines Support Library \ No newline at end of file diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index b8c2d4948..a85f91611 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/GSL - REF d10ebc6555b627c9d1196076a78467e7be505987 - SHA512 982f1d059f3128e79db7742e4bc9a641f8f6b91e02b00f7a98e4447bff9602501e905bc42173520036a0d3b6ad95ca7908fed15fa200ea01a2bd103b8e9cff88 + REF 9d65e74400976b3509833f49b16d401600c7317d + SHA512 36f1b0dba5b724c5ef437b07a9141f2bb2e8b059f968736e2c6d7cd5c50d5701a109df40e35f971ff8c225901560dd8783458d1f2fe56065c4cd85465cf5a527 HEAD_REF master ) -- cgit v1.2.3 From 50e34d957d09f4a46f77b68537642364fca57265 Mon Sep 17 00:00:00 2001 From: eao197 Date: Wed, 6 Dec 2017 19:18:31 +0300 Subject: Adaptation for so-5.5.20-beta1 --- ports/sobjectizer/001-cmake.patch | 36 ------------------------------------ ports/sobjectizer/CONTROL | 2 +- ports/sobjectizer/portfile.cmake | 37 +++++++++++-------------------------- 3 files changed, 12 insertions(+), 63 deletions(-) delete mode 100644 ports/sobjectizer/001-cmake.patch diff --git a/ports/sobjectizer/001-cmake.patch b/ports/sobjectizer/001-cmake.patch deleted file mode 100644 index cb4285e91..000000000 --- a/ports/sobjectizer/001-cmake.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/so_5/CMakeLists.txt b/so_5/CMakeLists.txt -index bd6f1d7..0e30831 100644 ---- a/so_5/CMakeLists.txt -+++ b/so_5/CMakeLists.txt -@@ -71,12 +71,17 @@ set(SO_5_SRC exception.cpp - disp/prio_dedicated_threads/one_per_prio/pub.cpp - ) - --add_library(${SO_5_TARGET} SHARED ${SO_5_SRC}) -+if (SO_BUILD_STATIC) -+ message(STATUS "Building static.") -+ add_library(${SO_5_TARGET} STATIC ${SO_5_SRC}) -+ target_compile_definitions(${SO_5_TARGET} -+ PUBLIC -DSO_5_STATIC_LIB -+ ) -+else() -+ message(STATUS "Building dynamic.") -+ add_library(${SO_5_TARGET} SHARED ${SO_5_SRC}) -+endif() - --add_library(${SO_5_S_TARGET} STATIC ${SO_5_SRC}) --target_compile_definitions(${SO_5_S_TARGET} -- PUBLIC -DSO_5_STATIC_LIB --) - - set(SO_5_EXT_LIBS ) - if( ANDROID ) -@@ -90,7 +95,7 @@ foreach(__extLibrary ${SO_5_EXT_LIBS}) - endforeach() - - install( -- TARGETS ${SO_5_TARGET} ${SO_5_S_TARGET} -+ TARGETS ${SO_5_TARGET} - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - RUNTIME DESTINATION bin diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL index 95bcb751b..f76bf8562 100644 --- a/ports/sobjectizer/CONTROL +++ b/ports/sobjectizer/CONTROL @@ -1,3 +1,3 @@ Source: sobjectizer -Version: 5.5.19.2-1 +Version: 5.5.20-beta1-201712061845 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 5ea87917c..5685c6855 100644 --- a/ports/sobjectizer/portfile.cmake +++ b/ports/sobjectizer/portfile.cmake @@ -1,50 +1,35 @@ include(vcpkg_common_functions) -set(VERSION 5.5.19.2) +set(VERSION 5.5.20-beta1-201712061845) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/so-${VERSION}/dev) vcpkg_download_distfile(ARCHIVE - URLS "https://downloads.sourceforge.net/project/sobjectizer/sobjectizer/SObjectizer%20Core%20v.5.5/so-${VERSION}.zip" - FILENAME "so-${VERSION}.tar.xz" - SHA512 8f70e751766ea43ddbc8e633aa729b81f01b84b7e3d4faf237e77a61dabe60bb1aaad8dabb868db4e473d801f5a639eb3d12aa8180feacb894f7a99b08375291 + URLS "https://sourceforge.net/projects/sobjectizer/files/sobjectizer/SObjectizer%20Core%20v.5.5/so-${VERSION}.zip" + FILENAME "so-${VERSION}.zip" + SHA512 8b0dbec88d6783856cc75d8a71ae4b2c6620d77160c860ae1c6d16c1f8f8113dc4a86574a5ada6946444e8c8460c2a3861359a6c8743e1f98a93cea1871a6bb8 ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/001-cmake.patch -) - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(SO_BUILD_STATIC ON) - set(SO_BUILD_SHARED OFF) + set(SOBJECTIZER_BUILD_STATIC ON) + set(SOBJECTIZER_BUILD_SHARED OFF) else() - set(SO_BUILD_STATIC OFF) - set(SO_BUILD_SHARED ON) + set(SOBJECTIZER_BUILD_STATIC OFF) + set(SOBJECTIZER_BUILD_SHARED ON) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DSO_BUILD_STATIC=${SO_BUILD_STATIC} - -DSO_BUILD_SHARED=${SO_BUILD_SHARED} + -DSOBJECTIZER_BUILD_STATIC=${SOBJECTIZER_BUILD_STATIC} + -DSOBJECTIZER_BUILD_SHARED=${SOBJECTIZER_BUILD_SHARED} ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -# patch SO_5_STATIC_LIB in headers with actual value -set(DECLSPEC_FILE ${CURRENT_PACKAGES_DIR}/include/so_5/h/declspec.hpp) -file(READ ${DECLSPEC_FILE} DECLSPEC_H) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - string(REPLACE "defined( SO_5_STATIC_LIB )" "1" DECLSPEC_H "${DECLSPEC_H}") -else() - string(REPLACE "defined( SO_5_STATIC_LIB )" "0" DECLSPEC_H "${DECLSPEC_H}") -endif() -file(WRITE ${DECLSPEC_FILE} "${DECLSPEC_H}") +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/sobjectizer") # Handle copyright file(COPY ${SOURCE_PATH}/../LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sobjectizer) -- cgit v1.2.3 From d540915a3aaab722e9b627ae001168be52333662 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 6 Dec 2017 14:42:17 -0800 Subject: Improve error message on invalid dependency of package --- toolsrc/include/vcpkg/packagespec.h | 4 ++++ toolsrc/src/vcpkg/dependencies.cpp | 6 +++--- toolsrc/src/vcpkg/packagespec.cpp | 27 ++++++++++++++++++++++++--- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index 0487ae6b8..071487e1a 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -22,6 +22,10 @@ namespace vcpkg static std::vector to_package_specs(const std::vector& ports, const Triplet& triplet); + static std::vector from_dependencies_of_port(const std::string& port, + const std::vector& dependencies, + const Triplet& triplet); + const std::string& name() const; const Triplet& triplet() const; diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 6f599afd4..0a1f79834 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -114,19 +114,19 @@ namespace vcpkg::Dependencies { if (const auto p = this->status_paragraph.get()) { - return PackageSpec::to_package_specs(p->package.depends, triplet); + return PackageSpec::from_dependencies_of_port(p->package.spec.name(), p->package.depends, triplet); } if (const auto p = this->binary_control_file.get()) { auto deps = Util::fmap_flatten(p->features, [](const BinaryParagraph& pgh) { return pgh.depends; }); deps.insert(deps.end(), p->core_paragraph.depends.cbegin(), p->core_paragraph.depends.cend()); - return PackageSpec::to_package_specs(deps, triplet); + return PackageSpec::from_dependencies_of_port(p->core_paragraph.spec.name(), deps, triplet); } if (const auto p = this->source_paragraph.get()) { - return PackageSpec::to_package_specs(filter_dependencies(p->depends, triplet), triplet); + return PackageSpec::from_dependencies_of_port(p->name, filter_dependencies(p->depends, triplet), triplet); } Checks::exit_with_message(VCPKG_LINE_INFO, diff --git a/toolsrc/src/vcpkg/packagespec.cpp b/toolsrc/src/vcpkg/packagespec.cpp index 17189afcf..a9e072094 100644 --- a/toolsrc/src/vcpkg/packagespec.cpp +++ b/toolsrc/src/vcpkg/packagespec.cpp @@ -96,8 +96,8 @@ namespace vcpkg std::vector PackageSpec::to_package_specs(const std::vector& ports, const Triplet& triplet) { - return Util::fmap(ports, [&](const std::string& s) -> PackageSpec { - auto maybe_spec = PackageSpec::from_name_and_triplet(s, triplet); + return Util::fmap(ports, [&](const std::string& spec_as_string) -> PackageSpec { + auto maybe_spec = PackageSpec::from_name_and_triplet(spec_as_string, triplet); if (auto spec = maybe_spec.get()) { return std::move(*spec); @@ -107,7 +107,28 @@ namespace vcpkg Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid package: %s\n" "%s", - s, + spec_as_string, + vcpkg::to_string(error_type)); + }); + } + + std::vector PackageSpec::from_dependencies_of_port(const std::string& port, + const std::vector& dependencies, + const Triplet& triplet) + { + return Util::fmap(dependencies, [&](const std::string& spec_as_string) -> PackageSpec { + auto maybe_spec = PackageSpec::from_name_and_triplet(spec_as_string, triplet); + if (auto spec = maybe_spec.get()) + { + return std::move(*spec); + } + + const PackageSpecParseResult error_type = maybe_spec.error(); + Checks::exit_with_message(VCPKG_LINE_INFO, + "Invalid dependency [%s] in package [%s]\n" + "%s", + spec_as_string, + port, vcpkg::to_string(error_type)); }); } -- cgit v1.2.3 From 1e6dd7b5d1820065e496a5d5c49e863cd0642ea9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 6 Dec 2017 18:08:03 -0800 Subject: [libsodium] Disable tests Also, this is a workaround for x64-windows-static taking forever in VS2017 15.5 --- ports/libsodium/CONTROL | 2 +- ports/libsodium/disable-tests.patch | 16 ++++++++++++++++ ports/libsodium/portfile.cmake | 6 ++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 ports/libsodium/disable-tests.patch diff --git a/ports/libsodium/CONTROL b/ports/libsodium/CONTROL index 185718572..4048a6a1f 100644 --- a/ports/libsodium/CONTROL +++ b/ports/libsodium/CONTROL @@ -1,3 +1,3 @@ Source: libsodium -Version: 1.0.15 +Version: 1.0.15-1 Description: A modern and easy-to-use crypto library diff --git a/ports/libsodium/disable-tests.patch b/ports/libsodium/disable-tests.patch new file mode 100644 index 000000000..24bcc1d83 --- /dev/null +++ b/ports/libsodium/disable-tests.patch @@ -0,0 +1,16 @@ +diff --git a/msvc-scripts/sodium.props b/msvc-scripts/sodium.props +index 41e1e47..3126455 100644 +--- a/msvc-scripts/sodium.props ++++ b/msvc-scripts/sodium.props +@@ -17,9 +17,9 @@ + + Process .in files + +- ++ + + Run the test suite + diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index c781fb1fb..4a2ed3d77 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -10,6 +10,12 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/disable-tests.patch +) + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(LIBSODIUM_RELEASE_CONFIGURATION ReleaseDLL) set(LIBSODIUM_DEBUG_CONFIGURATION DebugDLL) -- cgit v1.2.3 From af8e296db597a4b248093e7b2a4cbf5a1b4c29b3 Mon Sep 17 00:00:00 2001 From: "hwq@peergine.com" Date: Thu, 7 Dec 2017 12:12:35 +0800 Subject: updata live555 live555-latest --- ports/live555/liveMedia.txt | 4 +++- ports/live555/portfile.cmake | 14 +++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ports/live555/liveMedia.txt b/ports/live555/liveMedia.txt index 067fd5bc0..604bf1c50 100644 --- a/ports/live555/liveMedia.txt +++ b/ports/live555/liveMedia.txt @@ -1,7 +1,6 @@ # CMakeLists.txt in liveMedia SET(LIVE_MEDIA_SRCS -rtcp_from_spec.c AC3AudioFileServerMediaSubsession.cpp AC3AudioRTPSink.cpp AC3AudioRTPSource.cpp @@ -103,6 +102,7 @@ MPEG1or2VideoStreamDiscreteFramer.cpp MPEG1or2VideoStreamFramer.cpp MPEG2IndexFromTransportStream.cpp MPEG2TransportFileServerMediaSubsession.cpp +MPEG2TransportStreamAccumulator.cpp MPEG2TransportStreamFramer.cpp MPEG2TransportStreamFromESSource.cpp MPEG2TransportStreamFromPESSource.cpp @@ -138,6 +138,7 @@ QCELPAudioRTPSource.cpp QuickTimeFileSink.cpp QuickTimeGenericRTPSource.cpp RTCP.cpp +rtcp_from_spec.c RTPInterface.cpp RTPSink.cpp RTPSource.cpp @@ -145,6 +146,7 @@ RTSPClient.cpp RTSPCommon.cpp RTSPRegisterSender.cpp RTSPServer.cpp +RTSPServerRegister.cpp RTSPServerSupportingHTTPStreaming.cpp ServerMediaSession.cpp SimpleRTPSink.cpp diff --git a/ports/live555/portfile.cmake b/ports/live555/portfile.cmake index e8b41371a..b3f6511b5 100644 --- a/ports/live555/portfile.cmake +++ b/ports/live555/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/live) vcpkg_download_distfile(ARCHIVE - URLS "http://www.live555.com/liveMedia/public/live.2017.09.12.tar.gz" - FILENAME "live.2017.09.12.tar.gz" - SHA512 09b18b5f5dce28519b6c7cd8d52eb3448711939df051f84c8d6dce0b88d05c982711059f2ce13efccd326b2dbfeb93b88c4e03fe4a88bbd8fcefcb25e51d107d + URLS "http://www.live555.com/liveMedia/public/live555-latest.tar.gz" + FILENAME "live555-latest.tar.gz" + SHA512 eea5bdb8d89e76c8b6aeb6ec04b77af3048cb41f228d230ba4da6045e9bc691a456023d44d8650fe690b08143567ed5af5b633f5b6522debff79344a813dc7d0 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -52,10 +52,10 @@ file(GLOB DEBUG_LIBS ) file(GLOB HEADERS -"${CURRENT_BUILDTREES_DIR}/src/live/BasicUsageEnvironment/include/*.hh" -"${CURRENT_BUILDTREES_DIR}/src/live/groupsock/include/*.hh" -"${CURRENT_BUILDTREES_DIR}/src/live/liveMedia/include/*.hh" -"${CURRENT_BUILDTREES_DIR}/src/live/UsageEnvironment/include/*.hh" +"${CURRENT_BUILDTREES_DIR}/src/live/BasicUsageEnvironment/include/*.h*" +"${CURRENT_BUILDTREES_DIR}/src/live/groupsock/include/*.h*" +"${CURRENT_BUILDTREES_DIR}/src/live/liveMedia/include/*.h*" +"${CURRENT_BUILDTREES_DIR}/src/live/UsageEnvironment/include/*.h*" ) if(DLLS) file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -- cgit v1.2.3 From 6351f9c21c83a2d7c12c18cf73b9eeb26d1d9046 Mon Sep 17 00:00:00 2001 From: LazyHamster Date: Thu, 7 Dec 2017 12:59:08 +0300 Subject: [gmime] Update to version 3.0.5. --- ports/gmime/CMakeLists.txt | 62 +++------------------------------------------- ports/gmime/CONTROL | 2 +- ports/gmime/config.h | 14 +++++------ ports/gmime/gmime.def | 25 +++++++++++++++++++ ports/gmime/portfile.cmake | 7 +++--- 5 files changed, 41 insertions(+), 69 deletions(-) diff --git a/ports/gmime/CMakeLists.txt b/ports/gmime/CMakeLists.txt index 18ec89518..20c788f7e 100644 --- a/ports/gmime/CMakeLists.txt +++ b/ports/gmime/CMakeLists.txt @@ -32,6 +32,7 @@ add_definitions(-DG_LOG_DOMAIN="GMime") # List the source files set(LIB_SRC gmime/gmime.c gmime/gmime-application-pkcs7-mime.c + gmime/gmime-autocrypt.c gmime/gmime-certificate.c gmime/gmime-charset.c gmime/gmime-common.c @@ -97,64 +98,9 @@ set(LIB_SRC gmime/gmime.c util/gtrie.c ) -set (LIB_HEADERS gmime/gmime.h - gmime/gmime-version.h - gmime/gmime-error.h - gmime/gmime-charset.h - gmime/gmime-iconv.h - gmime/gmime-iconv-utils.h - gmime/gmime-param.h - gmime/gmime-content-type.h - gmime/gmime-disposition.h - gmime/gmime-data-wrapper.h - gmime/gmime-object.h - gmime/gmime-part.h - gmime/gmime-text-part.h - gmime/gmime-part-iter.h - gmime/gmime-application-pkcs7-mime.h - gmime/gmime-multipart.h - gmime/gmime-multipart-encrypted.h - gmime/gmime-multipart-signed.h - gmime/gmime-message.h - gmime/gmime-message-part.h - gmime/gmime-message-partial.h - gmime/internet-address.h - gmime/gmime-encodings.h - gmime/gmime-format-options.h - gmime/gmime-parser-options.h - gmime/gmime-parser.h - gmime/gmime-utils.h - gmime/gmime-references.h - gmime/gmime-stream.h - gmime/gmime-stream-buffer.h - gmime/gmime-stream-cat.h - gmime/gmime-stream-file.h - gmime/gmime-stream-filter.h - gmime/gmime-stream-fs.h - gmime/gmime-stream-gio.h - gmime/gmime-stream-mem.h - gmime/gmime-stream-mmap.h - gmime/gmime-stream-null.h - gmime/gmime-stream-pipe.h - gmime/gmime-filter.h - gmime/gmime-filter-basic.h - gmime/gmime-filter-best.h - gmime/gmime-filter-charset.h - gmime/gmime-filter-checksum.h - gmime/gmime-filter-dos2unix.h - gmime/gmime-filter-enriched.h - gmime/gmime-filter-from.h - gmime/gmime-filter-gzip.h - gmime/gmime-filter-html.h - gmime/gmime-filter-smtp-data.h - gmime/gmime-filter-strip.h - gmime/gmime-filter-unix2dos.h - gmime/gmime-filter-windows.h - gmime/gmime-filter-yenc.h - gmime/gmime-crypto-context.h - gmime/gmime-pkcs7-context.h - gmime/gmime-gpg-context.h -) +file(GLOB LIB_HEADERS gmime/gmime-*.h) +list(APPEND LIB_HEADERS gmime/gmime.h) +list(APPEND LIB_HEADERS gmime/internet-address.h) if(MSVC AND BUILD_SHARED_LIBS) set(MSVC_SRC gmime.def) diff --git a/ports/gmime/CONTROL b/ports/gmime/CONTROL index 215df5995..febce0ebe 100644 --- a/ports/gmime/CONTROL +++ b/ports/gmime/CONTROL @@ -1,4 +1,4 @@ Source: gmime -Version: 3.0.2 +Version: 3.0.5 Build-Depends: zlib, glib, libiconv, libidn2 Description: GMime is a C/C++ library which may be used for the creation and parsing of messages using the Multipurpose Internet Mail Extension (MIME). diff --git a/ports/gmime/config.h b/ports/gmime/config.h index 578223e20..a53c1537a 100644 --- a/ports/gmime/config.h +++ b/ports/gmime/config.h @@ -8,7 +8,7 @@ /* #undef ENABLE_WARNINGS */ /* Define to the GMime version */ -#define GMIME_VERSION "3.0.2" +#define GMIME_VERSION "@LIB_VERSION@" /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ @@ -30,7 +30,7 @@ #define HAVE_GETOPT_H 1 /* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 +/* #undef HAVE_GETPAGESIZE */ /* Define to 1 to use auto-detected iconv-friendly charset names. */ /* #undef HAVE_ICONV_DETECT_H */ @@ -117,7 +117,7 @@ #define PACKAGE_NAME "gmime" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "gmime 3.0.2" +#define PACKAGE_STRING "gmime @LIB_VERSION@" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gmime" @@ -126,16 +126,16 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "3.0.2" +#define PACKAGE_VERSION "@LIB_VERSION@" /* The size of `off_t', as computed by sizeof. */ -#define SIZEOF_OFF_T 8 +/* #undef SIZEOF_OFF_T */ /* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 8 +/* #undef SIZEOF_SIZE_T */ /* The size of `ssize_t', as computed by sizeof. */ -#define SIZEOF_SSIZE_T 8 +/* #undef SIZEOF_SSIZE_T */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 diff --git a/ports/gmime/gmime.def b/ports/gmime/gmime.def index 463dda27e..b072e0d65 100644 --- a/ports/gmime/gmime.def +++ b/ports/gmime/gmime.def @@ -587,3 +587,28 @@ internet_address_mailbox_set_addr internet_address_set_charset internet_address_set_name internet_address_to_string +g_mime_autocrypt_header_new +g_mime_autocrypt_header_new_from_string +g_mime_autocrypt_header_get_address +g_mime_autocrypt_header_set_address +g_mime_autocrypt_header_set_address_from_string +g_mime_autocrypt_header_get_address_as_string +g_mime_autocrypt_header_get_prefer_encrypt +g_mime_autocrypt_header_set_prefer_encrypt +g_mime_autocrypt_header_get_keydata +g_mime_autocrypt_header_set_keydata +g_mime_autocrypt_header_get_effective_date +g_mime_autocrypt_header_set_effective_date +g_mime_autocrypt_header_is_complete +g_mime_autocrypt_header_to_string +g_mime_autocrypt_header_compare +g_mime_autocrypt_header_clone +g_mime_autocrypt_header_list_new +g_mime_autocrypt_header_list_add_missing_addresses +g_mime_autocrypt_header_list_add +g_mime_autocrypt_header_list_get_count +g_mime_autocrypt_header_list_get_header_at +g_mime_autocrypt_header_list_get_header_for_address +g_mime_autocrypt_header_list_remove_incomplete +g_mime_autocrypt_header_get_type +g_mime_autocrypt_header_list_get_type diff --git a/ports/gmime/portfile.cmake b/ports/gmime/portfile.cmake index 1fa50063c..ddfeeb74c 100644 --- a/ports/gmime/portfile.cmake +++ b/ports/gmime/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) set(LIB_NAME gmime) -set(LIB_VERSION 3.0.2) +set(LIB_VERSION 3.0.5) set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.xz) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) @@ -9,7 +9,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://download.gnome.org/sources/gmime/3.0/${LIB_FILENAME}" FILENAME "${LIB_FILENAME}" - SHA512 246f489c168ce7e04fab664b7e9ae7772ae52f0063fb0eac9153460d84fa5d9712457d81fbd1bdcdadb7e03007cf71ed3bad5287f1639214f54167427c9209ca + SHA512 658b9008ffdf8055ffa9dfe8a5a6036a487309b0419572a9376397f68a8fc17d36ba6a05d2dfcb2ad23e634dc9e2aedd2479df1bfa0b7f8944d4c294650cb6c8 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -18,7 +18,8 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) # We can use file supplied with original sources configure_file(${SOURCE_PATH}/build/vs2010/unistd.h ${SOURCE_PATH} COPYONLY) -configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h ${SOURCE_PATH} COPYONLY) +configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h ${SOURCE_PATH}) + configure_file(${CMAKE_CURRENT_LIST_DIR}/idna.h ${SOURCE_PATH} COPYONLY) configure_file(${CMAKE_CURRENT_LIST_DIR}/gmime.def ${SOURCE_PATH} COPYONLY) -- cgit v1.2.3 From d64fd32046936eccccfb5b15dd7e8bfafd01f247 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 5 Dec 2017 14:57:14 +0100 Subject: curl: update to v7.57.0 Due to changes in curl's CMake support, where it now installs .cmake files, we now have to make sure that they are installed into the correct directory (and not duplicated into the debug/share/ directory, either). Also, a change in the context of the 2nd patch required an update of said patch. Signed-off-by: Johannes Schindelin --- ports/curl/0001_cmake.patch | 15 +++++++++++++++ ports/curl/0002_fix_uwp.patch | 16 ++++++++-------- ports/curl/CONTROL | 2 +- ports/curl/portfile.cmake | 6 ++++-- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/ports/curl/0001_cmake.patch b/ports/curl/0001_cmake.patch index db281e122..4298321b3 100644 --- a/ports/curl/0001_cmake.patch +++ b/ports/curl/0001_cmake.patch @@ -11,3 +11,18 @@ index 12a7c61..9839c67 100644 ) if(LIBSSH2_INCLUDE_DIR) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7b73b98..6c7c559 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1132,7 +1132,9 @@ function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE) + + endfunction() + +-if(WIN32 AND NOT CYGWIN) ++if(MSVC) ++ set(CURL_INSTALL_CMAKE_DIR share/curl) ++elseif(WIN32 AND NOT CYGWIN) + set(CURL_INSTALL_CMAKE_DIR CMake) + else() + set(CURL_INSTALL_CMAKE_DIR lib/cmake/curl) diff --git a/ports/curl/0002_fix_uwp.patch b/ports/curl/0002_fix_uwp.patch index a3f227fb1..8408177e8 100644 --- a/ports/curl/0002_fix_uwp.patch +++ b/ports/curl/0002_fix_uwp.patch @@ -1,9 +1,9 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0caf3dc..de9fcdb 100644 +index 7b73b98..72f6171 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -941,7 +941,9 @@ check_symbol_exists(ioctl "${CURL_INCLUDES}" HAVE_IOCTL) - check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT) +@@ -882,7 +882,9 @@ check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT) + check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME) # symbol exists in win32, but function does not. -if(WIN32) @@ -38,10 +38,10 @@ index 8337c72..41867b2 100644 } else { diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c -index aea5452..c1f59f2 100644 +index e896276..268f0ea 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c -@@ -700,9 +700,12 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, +@@ -743,9 +743,12 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, /* Calculate the timestamp */ #ifdef DEBUGBUILD @@ -57,10 +57,10 @@ index aea5452..c1f59f2 100644 #endif tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000; diff --git a/lib/ftp.c b/lib/ftp.c -index 6e86e53..a96fe1a 100644 +index 8042edf..3442df7 100644 --- a/lib/ftp.c +++ b/lib/ftp.c -@@ -4292,7 +4292,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) +@@ -4297,7 +4297,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) /* prevpath is "raw" so we convert the input path before we compare the strings */ size_t dlen; @@ -70,7 +70,7 @@ index 6e86e53..a96fe1a 100644 Curl_urldecode(conn->data, data->state.path, 0, &path, &dlen, FALSE); if(result) { diff --git a/lib/rand.c b/lib/rand.c -index 2713a0a..7da6e00 100644 +index 2670af9..0d18d37 100644 --- a/lib/rand.c +++ b/lib/rand.c @@ -44,7 +44,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index 1193e114f..cdc514006 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,4 +1,4 @@ Source: curl -Version: 7.55.1-1 +Version: 7.57.0-1 Build-Depends: zlib, openssl, libssh2 Description: A library for transferring data with URLs diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index eaeba787d..8a5d17ed6 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO curl/curl - REF curl-7_55_1 - SHA512 b5c6dd6cca8d07c08d1760feff9822f1264359adde068afd1584fc3fdcfa50c68e0e1b5ecaa277298ad0923b61019943c181ee1f0870c312399038c4c4e0e327 + REF curl-7_57_0 + SHA512 19f963d86682153d2d73731c784adf6457bc3fd48b628d6d701649f64718b10df268797ce21ad5f5339efc5df81b8547772edcc36c046665309e32997d5d1afc HEAD_REF master ) @@ -64,6 +64,8 @@ else() endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(READ ${CURRENT_PACKAGES_DIR}/include/curl/curl.h CURL_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) string(REPLACE "#ifdef CURL_STATICLIB" "#if 1" CURL_H "${CURL_H}") -- cgit v1.2.3 From 7efd70488cbd8bfb754867d7ca7e9bd7b8857fb9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 7 Dec 2017 13:20:05 -0800 Subject: [live555] Set version instead of latest and update CONTROL file --- ports/live555/CONTROL | 2 +- ports/live555/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/live555/CONTROL b/ports/live555/CONTROL index a2354fad1..ca55f517f 100644 --- a/ports/live555/CONTROL +++ b/ports/live555/CONTROL @@ -1,3 +1,3 @@ Source: live555 -Version: 2017.09.12 +Version: 2017.10.28 Description: A complete RTSP server application diff --git a/ports/live555/portfile.cmake b/ports/live555/portfile.cmake index b3f6511b5..28aa45eb9 100644 --- a/ports/live555/portfile.cmake +++ b/ports/live555/portfile.cmake @@ -1,8 +1,8 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/live) vcpkg_download_distfile(ARCHIVE - URLS "http://www.live555.com/liveMedia/public/live555-latest.tar.gz" - FILENAME "live555-latest.tar.gz" + URLS "http://www.live555.com/liveMedia/public/live.2017.10.28.tar.gz" + FILENAME "live.2017.10.28.tar.gz" SHA512 eea5bdb8d89e76c8b6aeb6ec04b77af3048cb41f228d230ba4da6045e9bc691a456023d44d8650fe690b08143567ed5af5b633f5b6522debff79344a813dc7d0 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From c48cf285ec554f936a1fcae55c1c047d4dacdb39 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 7 Dec 2017 22:21:56 +0100 Subject: openssl: update to v1.0.2n The patch to allow for spaces in paths while running the Perl helpers is no longer necessary, and was dropped. Signed-off-by: Johannes Schindelin --- ports/openssl/CONTROL | 2 +- ports/openssl/PerlScriptSpaceInPathFixes.patch | 35 -------------------------- ports/openssl/portfile.cmake | 4 +-- 3 files changed, 3 insertions(+), 38 deletions(-) delete mode 100644 ports/openssl/PerlScriptSpaceInPathFixes.patch diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index e5d1bf8bc..897e93cc7 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2m +Version: 1.0.2n 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/PerlScriptSpaceInPathFixes.patch b/ports/openssl/PerlScriptSpaceInPathFixes.patch deleted file mode 100644 index 1dcf8a991..000000000 --- a/ports/openssl/PerlScriptSpaceInPathFixes.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/util/copy.pl b/util/copy.pl -index eba6d58..5d971a2 100644 ---- a/util/copy.pl -+++ b/util/copy.pl -@@ -19,7 +19,7 @@ foreach $arg (@ARGV) { - next; - } - $arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob... -- foreach (glob $arg) -+ foreach (glob qq("$arg")) - { - push @filelist, $_; - } -diff --git a/util/mk1mf.pl b/util/mk1mf.pl -index 128a405..fd853da 100644 ---- a/util/mk1mf.pl -+++ b/util/mk1mf.pl -@@ -428,7 +428,7 @@ EOF - { - $extra_install .= <<"EOF" - \$(MKDIR) \"\$(INSTALLTOP)${o}lib${o}engines\" -- \$(CP) \"\$(E_SHLIB)\" \"\$(INSTALLTOP)${o}lib${o}engines\" -+ \$(CP) \$(E_SHLIB) \"\$(INSTALLTOP)${o}lib${o}engines\" - EOF - } - } -@@ -608,7 +608,7 @@ install: all - \$(MKDIR) \"\$(INSTALLTOP)${o}include${o}openssl\" - \$(MKDIR) \"\$(INSTALLTOP)${o}lib\" - \$(CP) \"\$(INCO_D)${o}*.\[ch\]\" \"\$(INSTALLTOP)${o}include${o}openssl\" -- \$(CP) \"\$(BIN_D)$o\$(E_EXE)$exep \$(INSTALLTOP)${o}bin\" -+ \$(CP) \"\$(BIN_D)$o\$(E_EXE)$exep\" \"\$(INSTALLTOP)${o}bin\" - \$(MKDIR) \"\$(OPENSSLDIR)\" - \$(CP) apps${o}openssl.cnf \"\$(OPENSSLDIR)\" - $extra_install diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 1a856e17d..a1af5b546 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -4,7 +4,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endif() include(vcpkg_common_functions) -set(OPENSSL_VERSION 1.0.2m) +set(OPENSSL_VERSION 1.0.2n) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) vcpkg_find_acquire_program(PERL) @@ -19,7 +19,7 @@ set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH};${PERL_EXE_PATH}") 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 7619aa223ee50d0f5e270ac9090e95b2b1ba5dfc656c98f625a9a277dda472fb960a4e89a7ba300044cb401b2072b2ca6a6fcce8206d927bf373d1c981806a93 + SHA512 144bf0d6aa27b4af01df0b7b734c39962649e1711554247d42e05e14d8945742b18745aefdba162e2dfc762b941fd7d3b2d5dc6a781ae4ba10a6f5a3cadb0687 ) vcpkg_extract_source_archive(${OPENSSL_SOURCE_ARCHIVE}) -- cgit v1.2.3 From 6ce08903f5642da5f4d63bf3d1d168b31515d5cb Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 8 Dec 2017 09:55:46 +0100 Subject: [ACE] 6.4.6 --- ports/ace/CONTROL | 2 +- ports/ace/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/ace/CONTROL b/ports/ace/CONTROL index 80af89d8a..596d5a7a7 100644 --- a/ports/ace/CONTROL +++ b/ports/ace/CONTROL @@ -1,3 +1,3 @@ Source: ace -Version: 6.4.5 +Version: 6.4.6 Description: The ADAPTIVE Communication Environment diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake index a601f1205..63239138b 100644 --- a/ports/ace/portfile.cmake +++ b/ports/ace/portfile.cmake @@ -9,9 +9,9 @@ endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ACE_wrappers/ace) vcpkg_download_distfile(ARCHIVE - URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.5.zip" - FILENAME "ACE-6.4.5.zip" - SHA512 cce1681fc35efdefb8b88a49b743ffcaecfe8f146dcf6c78393aed29c8853e77b062bced4a2fb457eba74bf5834511611cc40da2320c6094793cb8c2b6df3d2a + URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.6.zip" + FILENAME "ACE-6.4.6.zip" + SHA512 3b1ced19bb42bd753e0a43990f1d8f84dc57f5650c7c972f2e849d4ce3aa1db08673cf14fbc0607d7dbc9b9f95f33f72a5d7f0f11cd993beba528f80eb525e69 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 9bb4d5c74cd73905c25db184490065ec0c7f2c3d Mon Sep 17 00:00:00 2001 From: eao197 Date: Fri, 8 Dec 2017 12:10:10 +0300 Subject: Update for sobjectizer v.5.5.20 --- ports/sobjectizer/CONTROL | 2 +- ports/sobjectizer/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL index f76bf8562..5c90ce3f1 100644 --- a/ports/sobjectizer/CONTROL +++ b/ports/sobjectizer/CONTROL @@ -1,3 +1,3 @@ Source: sobjectizer -Version: 5.5.20-beta1-201712061845 +Version: 5.5.20 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 5685c6855..e61b2a466 100644 --- a/ports/sobjectizer/portfile.cmake +++ b/ports/sobjectizer/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(VERSION 5.5.20-beta1-201712061845) +set(VERSION 5.5.20) 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 8b0dbec88d6783856cc75d8a71ae4b2c6620d77160c860ae1c6d16c1f8f8113dc4a86574a5ada6946444e8c8460c2a3861359a6c8743e1f98a93cea1871a6bb8 + SHA512 ec62f358b363ee35c9baba4871612c906d9b57624a8a86e57c59cfe8bfd209554f70fee1d3caf815a475b6833238f8d2ec9ebc210acc978423b31b3ebf27b868 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 9b14a7528d1a4aa4bb69e90f53c6422163c35963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 8 Dec 2017 13:50:06 +0100 Subject: [jansson] Prefer ninja --- ports/jansson/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/jansson/portfile.cmake b/ports/jansson/portfile.cmake index e018170c7..5b255e7ac 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -31,6 +31,7 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DJANSSON_STATIC_CRT=${JANSSON_STATIC_CRT} -DJANSSON_EXAMPLES=OFF -- cgit v1.2.3 From 583ee9ee91a0d7abb5487580faf3ff1f302a642d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 8 Dec 2017 13:21:32 -0800 Subject: [openssl] Remove entry of removed patch --- ports/openssl/portfile.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index a1af5b546..b6c72fb4d 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -25,8 +25,7 @@ vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE vcpkg_extract_source_archive(${OPENSSL_SOURCE_ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${MASTER_COPY_SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/PerlScriptSpaceInPathFixes.patch - ${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch ${CMAKE_CURRENT_LIST_DIR}/STRINGIFYPatch.patch ${CMAKE_CURRENT_LIST_DIR}/EmbedSymbolsInStaticLibsZ7.patch ) -- cgit v1.2.3 From 8ea6a9818a10a6eb84350cb4855d4c8c2bae9f8e Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Mon, 4 Dec 2017 01:28:09 +0100 Subject: [unicorn] Adding unicorn port --- ports/unicorn/CONTROL | 3 +++ ports/unicorn/portfile.cmake | 47 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 ports/unicorn/CONTROL create mode 100644 ports/unicorn/portfile.cmake diff --git a/ports/unicorn/CONTROL b/ports/unicorn/CONTROL new file mode 100644 index 000000000..ad91f82b5 --- /dev/null +++ b/ports/unicorn/CONTROL @@ -0,0 +1,3 @@ +Source: unicorn +Version: 2017-12-06-bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4 +Description: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework diff --git a/ports/unicorn/portfile.cmake b/ports/unicorn/portfile.cmake new file mode 100644 index 000000000..a8d4c24dc --- /dev/null +++ b/ports/unicorn/portfile.cmake @@ -0,0 +1,47 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "WindowsStore not supported") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO unicorn-engine/unicorn + REF bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4 + SHA512 2edd31097a38d4270ae36f3f54b4c9385e088f85465d3c4fc7cd95162e5d4ba72b8b7d305deeb535c69dcbc15de7364150530887b29b363e087aadacce3f2f41 + HEAD_REF master +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(UNICORN_PLATFORM "Win32") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(UNICORN_PLATFORM "x64") +else() + message(FATAL_ERROR "Unsupported architecture") +endif() + +vcpkg_build_msbuild( + PROJECT_PATH "${SOURCE_PATH}/msvc/unicorn.sln" + PLATFORM "${UNICORN_PLATFORM}" +) + +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") +else() + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn_static.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn_static.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") +endif() + +file( + INSTALL "${SOURCE_PATH}/msvc/distro/include/unicorn" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" + RENAME "unicorn" +) +file( + INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/unicorn" + RENAME "copyright" +) -- cgit v1.2.3 From 1f3013bea303736d216361a47e2f323577ab9c46 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 8 Dec 2017 15:16:35 -0800 Subject: Improve vcpkgExtractFile. Also merge vcpkgRemoveDirectory/File --- scripts/VcpkgPowershellUtils.ps1 | 41 ++++++++++++++++++---------------------- scripts/fetchDependency.ps1 | 4 ++-- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 28e818437..45f52b225 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -25,7 +25,7 @@ function vcpkgCreateParentDirectoryIfNotExists([Parameter(Mandatory=$true)][stri } } -function vcpkgRemoveDirectory([Parameter(Mandatory=$true)][string]$dirPath) +function vcpkgRemoveItem([Parameter(Mandatory=$true)][string]$dirPath) { if (Test-Path $dirPath) { @@ -33,14 +33,6 @@ function vcpkgRemoveDirectory([Parameter(Mandatory=$true)][string]$dirPath) } } -function vcpkgRemoveFile([Parameter(Mandatory=$true)][string]$filePath) -{ - if (Test-Path $filePath) - { - Remove-Item $filePath -Force - } -} - function vcpkgHasCommand([Parameter(Mandatory=$true)][string]$commandName) { return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) @@ -118,7 +110,7 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, vcpkgCreateParentDirectoryIfNotExists $downloadPath $downloadPartPath = "$downloadPath.part" - vcpkgRemoveFile $downloadPartPath + vcpkgRemoveItem $downloadPartPath $wc = New-Object System.Net.WebClient $proxyAuth = !$wc.Proxy.IsBypassed($url) @@ -144,7 +136,7 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, catch [System.Exception] { # If BITS fails for any reason, delete any potentially partially downloaded files and continue - vcpkgRemoveFile $downloadPartPath + vcpkgRemoveItem $downloadPartPath } } @@ -154,14 +146,21 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, } function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, - [Parameter(Mandatory=$true)][string]$destinationDir) + [Parameter(Mandatory=$true)][string]$destinationDir, + [Parameter(Mandatory=$true)][string]$outFilename) { - vcpkgCreateParentDirectoryIfNotExists $destinationDir - $destinationPartial = "$destinationDir-partially_extracted" + vcpkgCreateDirectoryIfNotExists $destinationDir + $output = "$destinationDir/$outFilename" + vcpkgRemoveItem $output + $destinationPartial = "$destinationDir/partially-extracted" - vcpkgRemoveDirectory $destinationPartial + vcpkgRemoveItem $destinationPartial vcpkgCreateDirectoryIfNotExists $destinationPartial + $shell = new-object -com shell.application + $zip = $shell.NameSpace($file) + $itemCount = $zip.Items().Count + if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') { Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") @@ -175,8 +174,6 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, else { Write-Verbose("Extracting via shell") - $shell = new-object -com shell.application - $zip = $shell.NameSpace($file) foreach($item in $zip.items()) { # Piping to Out-Null is used to block until finished @@ -184,16 +181,14 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, } } - $hasASingleItem = (Get-ChildItem $destinationPartial | Measure-Object).Count -eq 1; - - if ($hasASingleItem) + if ($itemCount -eq 1) { - Move-Item -Path "$destinationPartial\*" -Destination $destinationDir - vcpkgRemoveDirectory $destinationPartial + Move-Item -Path "$destinationPartial\*" -Destination $output + vcpkgRemoveItem $destinationPartial } else { - Move-Item -Path $destinationPartial -Destination $destinationDir + Move-Item -Path $destinationPartial -Destination $output } } diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 830ec7064..f62fe450c 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -88,8 +88,8 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { if (-not (Test-Path $executableFromDownload)) { - $extractFolderName = (Get-ChildItem $downloadPath).BaseName - vcpkgExtractFile -File $downloadPath -DestinationDir "$downloadsDir\$extractFolderName" + $outFilename = (Get-ChildItem $downloadPath).BaseName + vcpkgExtractFile -File $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename } } elseif($extractionType -eq $ExtractionType_SELF_EXTRACTING_7Z) -- cgit v1.2.3 From 3c2b2cc60719b110de889b62dd13af5f1a4b883c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 8 Dec 2017 22:03:03 -0800 Subject: [vcpkg-cmake-toolchain] Use list(APPEND) instead of set(). Fixes #2336. Fix MPI issue introduced in cmake 3.10. Fixes #2317. Add _VCPKG_ROOT_DIR to persisted variables to reduce disk access during cmake reconfigure. --- scripts/buildsystems/vcpkg.cmake | 50 ++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 24f6d855e..cdef610c1 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -1,6 +1,7 @@ # Mark variables as used so cmake doesn't complain about them mark_as_advanced(CMAKE_TOOLCHAIN_FILE) +# This is a backport of CMAKE_TRY_COMPILE_PLATFORM_VARIABLES to cmake 3.0 get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) if( _CMAKE_IN_TRY_COMPILE ) include( "${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL ) @@ -61,17 +62,19 @@ endif() set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)") set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR}) -# Detect .vcpkg-root to figure VCPKG_ROOT_DIR -set(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR}) -while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root") - get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY) - if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive - message(FATAL_ERROR "Could not find .vcpkg-root") - else() - SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP}) - endif() -endwhile() -set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE}) +if(NOT DEFINED _VCPKG_ROOT_DIR) + # Detect .vcpkg-root to figure VCPKG_ROOT_DIR + set(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR}) + while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root") + get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY) + if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive + message(FATAL_ERROR "Could not find .vcpkg-root") + else() + SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP}) + endif() + endwhile() + set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE} CACHE STRING "Vcpkg root directory") +endif() set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed) if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) @@ -95,8 +98,6 @@ list(APPEND CMAKE_LIBRARY_PATH ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link ) -set(Boost_COMPILER "-vc140") - if (NOT DEFINED CMAKE_SYSTEM_VERSION AND _VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp") include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake) # This is used as an implicit parameter for vcpkg_get_windows_sdk @@ -124,11 +125,11 @@ set(CMAKE_SYSTEM_IGNORE_PATH "C:/OpenSSL-Win64/lib/VC/static" ) -set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools) +list(APPEND CMAKE_PROGRAM_PATH ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools) file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*) foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS}) if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR}) - set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_TOOLS_DIR}) + list(APPEND CMAKE_PROGRAM_PATH ${_VCPKG_TOOLS_DIR}) endif() endforeach() @@ -167,6 +168,7 @@ macro(find_package name) unset(Boost_USE_STATIC_LIBS) unset(Boost_USE_MULTITHREADED) unset(Boost_USE_STATIC_RUNTIME) + set(Boost_COMPILER "-vc140") _find_package(${ARGV}) elseif("${name}" STREQUAL "ICU") function(_vcpkg_find_in_list) @@ -188,6 +190,17 @@ macro(find_package name) if(TIFF_LIBRARIES) list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES}) endif() + elseif("${name}" STREQUAL "MPI") + if(MPI_C_LIB_NAMES) + set(MPI_C_WORKS TRUE) + set(MPI_C_WRAPPER_FOUND TRUE) + endif() + if(MPI_CXX_LIB_NAMES) + set(MPI_CXX_WORKS TRUE) + set(MPI_CXX_WRAPPER_FOUND TRUE) + set(MPI_CXX_VALIDATE_SKIP_MPICXX TRUE) + endif() + _find_package(${ARGV}) else() _find_package(${ARGV}) endif() @@ -202,8 +215,11 @@ set(_UNUSED ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP}) if(NOT _CMAKE_IN_TRY_COMPILE) file(TO_CMAKE_PATH "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" _chainload_file) + file(TO_CMAKE_PATH "${_VCPKG_ROOT_DIR}" _root_dir) file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vcpkg.config.cmake" "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")\n" "set(VCPKG_APPLOCAL_DEPS \"${VCPKG_APPLOCAL_DEPS}\" CACHE STRING \"\")\n" - "set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE \"${_chainload_file}\" CACHE STRING \"\")\n") -endif() \ No newline at end of file + "set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE \"${_chainload_file}\" CACHE STRING \"\")\n" + "set(_VCPKG_ROOT_DIR \"${_root_dir}\" CACHE STRING \"\")\n" + ) +endif() -- cgit v1.2.3 From d11bad20127b35119eb1e54537d619abca2aafd4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 8 Dec 2017 22:40:45 -0800 Subject: [gtest] Remove renaming of DLLs -- only the import libs need renaming. --- ports/gtest/CONTROL | 2 +- ports/gtest/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index 5afef043c..e4022376e 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,3 +1,3 @@ Source: gtest -Version: 1.8.0-2 +Version: 1.8.0-3 Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index 2c55d2809..b08d29488 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -59,10 +59,10 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/bin/gmock.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/bin/gmock_main.dll) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin/) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtestd.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_maind.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmockd.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_maind.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_main.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_main.dll) endif() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) -- cgit v1.2.3 From 8766979444d7652b5c170b487ac39391d85b292e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 8 Dec 2017 23:54:41 -0800 Subject: [unicorn] Adjust handling of CRT and LIBRARY LINKAGE. Reformat to LF. --- ports/unicorn/CONTROL | 6 +-- ports/unicorn/portfile.cmake | 105 ++++++++++++++++++++++++------------------- 2 files changed, 61 insertions(+), 50 deletions(-) diff --git a/ports/unicorn/CONTROL b/ports/unicorn/CONTROL index ad91f82b5..d60ab9f78 100644 --- a/ports/unicorn/CONTROL +++ b/ports/unicorn/CONTROL @@ -1,3 +1,3 @@ -Source: unicorn -Version: 2017-12-06-bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4 -Description: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework +Source: unicorn +Version: 2017-12-06-bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4-1 +Description: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework diff --git a/ports/unicorn/portfile.cmake b/ports/unicorn/portfile.cmake index a8d4c24dc..d64b2bf4d 100644 --- a/ports/unicorn/portfile.cmake +++ b/ports/unicorn/portfile.cmake @@ -1,47 +1,58 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "WindowsStore not supported") -endif() - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO unicorn-engine/unicorn - REF bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4 - SHA512 2edd31097a38d4270ae36f3f54b4c9385e088f85465d3c4fc7cd95162e5d4ba72b8b7d305deeb535c69dcbc15de7364150530887b29b363e087aadacce3f2f41 - HEAD_REF master -) - -if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) - set(UNICORN_PLATFORM "Win32") -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - set(UNICORN_PLATFORM "x64") -else() - message(FATAL_ERROR "Unsupported architecture") -endif() - -vcpkg_build_msbuild( - PROJECT_PATH "${SOURCE_PATH}/msvc/unicorn.sln" - PLATFORM "${UNICORN_PLATFORM}" -) - -if(VCPKG_CRT_LINKAGE STREQUAL dynamic) - file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") - file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin") - file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") - file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") -else() - file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn_static.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") - file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn_static.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") -endif() - -file( - INSTALL "${SOURCE_PATH}/msvc/distro/include/unicorn" - DESTINATION "${CURRENT_PACKAGES_DIR}/include" - RENAME "unicorn" -) -file( - INSTALL "${SOURCE_PATH}/COPYING" - DESTINATION "${CURRENT_PACKAGES_DIR}/share/unicorn" - RENAME "copyright" -) +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "WindowsStore not supported") +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(FATAL_ERROR "unicorn can currently only be built with /MT or /MTd (static CRT linkage)") +endif() + +# Note: this is safe because unicorn is a C library and takes steps to avoid memory allocate/free across the DLL boundary. +set(VCPKG_CRT_LINKAGE "static") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO unicorn-engine/unicorn + REF bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4 + SHA512 43694c7dfb0783c1d64236a286b929c9d0eea9d8e18146ad4fb36d7e4faf719e179d7ee36b43e568e4fce779b0f660ed9c1fb417793d6019923cae9538c9355e + HEAD_REF master +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(UNICORN_PLATFORM "Win32") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(UNICORN_PLATFORM "x64") +else() + message(FATAL_ERROR "Unsupported architecture") +endif() + +vcpkg_build_msbuild( + PROJECT_PATH "${SOURCE_PATH}/msvc/unicorn.sln" + PLATFORM "${UNICORN_PLATFORM}" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") +else() + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn_static.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn_static.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") +endif() + +file( + INSTALL "${SOURCE_PATH}/msvc/distro/include/unicorn" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" + RENAME "unicorn" +) +file( + INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/unicorn" + RENAME "copyright" +) +file( + INSTALL "${SOURCE_PATH}/COPYING_GLIB" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/unicorn" +) -- cgit v1.2.3 From 940b33e52dfcedfd0fc7d6bd4375e4ad846e444a Mon Sep 17 00:00:00 2001 From: lcdtyph Date: Sat, 9 Dec 2017 16:00:06 +0800 Subject: [mbedtls] Initial port. (#2286) * mbedtls: init port * add VCPKG_LIBRARY_LINKAGE for static libs only * [mbedtls] Slight cleanup --- ports/mbedtls/CONTROL | 3 +++ ports/mbedtls/portfile.cmake | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 ports/mbedtls/CONTROL create mode 100644 ports/mbedtls/portfile.cmake diff --git a/ports/mbedtls/CONTROL b/ports/mbedtls/CONTROL new file mode 100644 index 000000000..c4bed6fa6 --- /dev/null +++ b/ports/mbedtls/CONTROL @@ -0,0 +1,3 @@ +Source: mbedtls +Version: 2.6.1 +Description: An open source, portable, easy to use, readable and flexible SSL library diff --git a/ports/mbedtls/portfile.cmake b/ports/mbedtls/portfile.cmake new file mode 100644 index 000000000..600b2790c --- /dev/null +++ b/ports/mbedtls/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +set(VCPKG_LIBRARY_LINKAGE static) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ARMmbed/mbedtls + REF mbedtls-2.6.1 + SHA512 06f8ba2a453164bac01d20ca6f5c80e691857977ef501d56685e81a0e90dddae1bedeab46c18c22f9a3b72894d45d7466f76a5c404417b6613ddae0ee4a881c8 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_TESTING=OFF + -DENABLE_PROGRAMS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mbedtls RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 19860a093370c5a57bd8c622e5e47177193c7c8e Mon Sep 17 00:00:00 2001 From: cDc Date: Sat, 9 Dec 2017 10:24:19 +0200 Subject: [tinyexif] add TinyEXIF library (#2221) --- ports/tinyexif/CONTROL | 4 ++++ ports/tinyexif/portfile.cmake | 30 ++++++++++++++++++++++++++++++ scripts/buildsystems/vcpkg.cmake | 6 ++++++ 3 files changed, 40 insertions(+) create mode 100644 ports/tinyexif/CONTROL create mode 100644 ports/tinyexif/portfile.cmake diff --git a/ports/tinyexif/CONTROL b/ports/tinyexif/CONTROL new file mode 100644 index 000000000..9f86c85d5 --- /dev/null +++ b/ports/tinyexif/CONTROL @@ -0,0 +1,4 @@ +Source: tinyexif +Version: 1.0.0-1 +Build-Depends: tinyxml2 +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 new file mode 100644 index 000000000..c69938a0d --- /dev/null +++ b/ports/tinyexif/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cdcseacave/TinyEXIF + REF 1.0.0 + SHA512 530b3e165bc51fa5a1bb29ea1f8cb5d7100a995347622d50375fdb5fab36139e9474d97ae2e3d54ac2886c2da1fe7138ed15710277410b6a6504ce05537fff28 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} + -DBUILD_DEMO=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/tinyexif") + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyexif RENAME copyright) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index cdef610c1..22dc5d6b1 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -190,6 +190,12 @@ macro(find_package name) if(TIFF_LIBRARIES) list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES}) endif() + elseif("${name}" STREQUAL "tinyxml2") + _find_package(${ARGV}) + if(TARGET tinyxml2_static AND NOT TARGET tinyxml2) + add_library(tinyxml2 INTERFACE IMPORTED) + set_target_properties(tinyxml2 PROPERTIES INTERFACE_LINK_LIBRARIES "tinyxml2_static") + endif() elseif("${name}" STREQUAL "MPI") if(MPI_C_LIB_NAMES) set(MPI_C_WORKS TRUE) -- cgit v1.2.3 From 9f0d33b6ad3af842b133aafa8be1bbf63e08201d Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 9 Dec 2017 02:33:33 -0600 Subject: alac-decoder (#2176) --- ports/alac-decoder/CMakeLists.txt | 50 +++++++ ports/alac-decoder/CONTROL | 3 + ports/alac-decoder/decomp.c | 11 ++ ports/alac-decoder/portfile.cmake | 30 ++++ ports/alac-decoder/remove_stdint_headers.patch | 193 +++++++++++++++++++++++++ 5 files changed, 287 insertions(+) create mode 100644 ports/alac-decoder/CMakeLists.txt create mode 100644 ports/alac-decoder/CONTROL create mode 100644 ports/alac-decoder/decomp.c create mode 100644 ports/alac-decoder/portfile.cmake create mode 100644 ports/alac-decoder/remove_stdint_headers.patch diff --git a/ports/alac-decoder/CMakeLists.txt b/ports/alac-decoder/CMakeLists.txt new file mode 100644 index 000000000..cafd05b18 --- /dev/null +++ b/ports/alac-decoder/CMakeLists.txt @@ -0,0 +1,50 @@ +cmake_minimum_required (VERSION 3.9) +project (alac_decoder) + +set(HEADERS + decomp.h + demux.h + stream.h + wavwriter.h +) + +set (SRCS + decomp.c + alac.c + demux.c + stream.c + wavwriter.c +) + +if(MSVC) + add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DTARGET_OS_WIN32) +endif() + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +include_directories(.) + +add_library(libalac_decoder ${SRCS}) + +add_executable(alac_decoder main.c) +target_link_libraries(alac_decoder libalac_decoder) + +install( + TARGETS libalac_decoder + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS alac_decoder + RUNTIME DESTINATION tools/alac-decoder + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${HEADERS} DESTINATION include/alac_decoder) +endif() diff --git a/ports/alac-decoder/CONTROL b/ports/alac-decoder/CONTROL new file mode 100644 index 000000000..b2300174b --- /dev/null +++ b/ports/alac-decoder/CONTROL @@ -0,0 +1,3 @@ +Source: alac-decoder +Version: 0.2 +Description: ALAC C implementation of a decoder, written from reverse engineering the file format diff --git a/ports/alac-decoder/decomp.c b/ports/alac-decoder/decomp.c new file mode 100644 index 000000000..a76953325 --- /dev/null +++ b/ports/alac-decoder/decomp.c @@ -0,0 +1,11 @@ +#include "decomp.h" +#include + +int set_endian() +{ + uint32_t integer = 0x000000aa; + unsigned char *p = (unsigned char*)&integer; + + if (p[0] == 0xaa) return 0; + else return 1; +} diff --git a/ports/alac-decoder/portfile.cmake b/ports/alac-decoder/portfile.cmake new file mode 100644 index 000000000..732ed2631 --- /dev/null +++ b/ports/alac-decoder/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/alac_decoder) +vcpkg_download_distfile(ARCHIVE + URLS "https://distfiles.macports.org/alac_decoder/alac_decoder-0.2.0.tgz" + FILENAME "alac_decoder-0.2.0.tgz" + SHA512 4b37d4fe37681bfccaa4a27fbaf11eb2a1fba5f14e77d219a6d9814ff44d1168534d05eb19443dd2fd11e6fcdf4da3a22e3f3c79314cb7a6767c152351b13e29 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/decomp.c DESTINATION ${SOURCE_PATH}) + + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/remove_stdint_headers.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/alac-decoder) + +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/alac-decoder RENAME copyright) diff --git a/ports/alac-decoder/remove_stdint_headers.patch b/ports/alac-decoder/remove_stdint_headers.patch new file mode 100644 index 000000000..834b808cc --- /dev/null +++ b/ports/alac-decoder/remove_stdint_headers.patch @@ -0,0 +1,193 @@ +diff --git a/alac.c b/alac.c +index 469000d..c6fe479 100644 +--- a/alac.c ++++ b/alac.c +@@ -33,11 +33,7 @@ + #include + #include + #include +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++#include + + #include "decomp.h" + +@@ -54,7 +50,7 @@ + struct {signed int x:24;} se_struct_24; + #define SignExtend24(val) (se_struct_24.x = val) + +-extern int host_bigendian; ++#define host_bigendian set_endian() + + struct alac_file + { +diff --git a/decomp.h b/decomp.h +index 23dbc52..679a320 100644 +--- a/decomp.h ++++ b/decomp.h +@@ -8,6 +8,7 @@ void decode_frame(alac_file *alac, + unsigned char *inbuffer, + void *outbuffer, int *outputsize); + void alac_set_info(alac_file *alac, char *inputbuffer); ++int set_endian(); + + #endif /* __ALAC__DECOMP_H */ + +diff --git a/demux.c b/demux.c +index ae77a9d..9e858a9 100644 +--- a/demux.c ++++ b/demux.c +@@ -33,11 +33,7 @@ + #include + #include + #include +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++#include + + #include "stream.h" + #include "demux.h" +diff --git a/demux.h b/demux.h +index 8447bf8..8874ba4 100644 +--- a/demux.h ++++ b/demux.h +@@ -1,11 +1,8 @@ + #ifndef DEMUX_H + #define DEMUX_H + +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++ ++#include + + #include "stream.h" + +diff --git a/main.c b/main.c +index 7449ca1..dd58699 100644 +--- a/main.c ++++ b/main.c +@@ -37,11 +37,7 @@ + #include + #include + #include +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++#include + + #include "demux.h" + #include "decomp.h" +@@ -267,19 +263,7 @@ static void setup_environment(int argc, char **argv) + } + } + +-/* this could quite easily be done at compile time, +- * however I don't want to have to bother with all the +- * various possible #define's for endianness, worrying about +- * different compilers etc. and I'm too lazy to use autoconf. +- */ +-void set_endian() +-{ +- uint32_t integer = 0x000000aa; +- unsigned char *p = (unsigned char*)&integer; + +- if (p[0] == 0xaa) host_bigendian = 0; +- else host_bigendian = 1; +-} + + int main(int argc, char **argv) + { +@@ -288,7 +272,7 @@ int main(int argc, char **argv) + + memset(&demux_res, 0, sizeof(demux_res)); + +- set_endian(); ++ host_bigendian = set_endian(); + + setup_environment(argc, argv); + +diff --git a/stream.c b/stream.c +index 565db54..56727a0 100644 +--- a/stream.c ++++ b/stream.c +@@ -33,13 +33,10 @@ + #include + #include + #include +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++#include + + #include "stream.h" ++#include "decomp.h" + + #define _Swap32(v) do { \ + v = (((v) & 0x000000FF) << 0x18) | \ +@@ -51,7 +48,7 @@ + v = (((v) & 0x00FF) << 0x08) | \ + (((v) & 0xFF00) >> 0x08); } while (0) + +-extern int host_bigendian; ++#define host_bigendian set_endian() + + struct stream_tTAG { + FILE *f; +diff --git a/stream.h b/stream.h +index 18d6aa0..ff6325e 100644 +--- a/stream.h ++++ b/stream.h +@@ -3,11 +3,8 @@ + + /* stream.h */ + +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++#include ++ + + typedef struct stream_tTAG stream_t; + +diff --git a/wavwriter.c b/wavwriter.c +index fd19502..ce941c7 100644 +--- a/wavwriter.c ++++ b/wavwriter.c +@@ -32,11 +32,8 @@ + + #include + #include +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++#include ++ + + #ifndef MAKEFOURCC + #define MAKEFOURCC(ch0, ch1, ch2, ch3) ( \ +@@ -56,7 +53,7 @@ + v = (((v) & 0x00FF) << 0x08) | \ + (((v) & 0xFF00) >> 0x08); } while (0) + +-extern int host_bigendian; ++#define host_bigendian set_endian() + + static void write_uint32(FILE *f, uint32_t v, int bigendian) + { -- cgit v1.2.3 From 662d3bd9be374b705c4c396e06a824d6dafcdc54 Mon Sep 17 00:00:00 2001 From: cDc Date: Sat, 9 Dec 2017 15:04:16 +0200 Subject: [tinyexif] update to version 1.0.1 --- ports/tinyexif/CONTROL | 2 +- ports/tinyexif/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/tinyexif/CONTROL b/ports/tinyexif/CONTROL index 9f86c85d5..9c984a507 100644 --- a/ports/tinyexif/CONTROL +++ b/ports/tinyexif/CONTROL @@ -1,4 +1,4 @@ Source: tinyexif -Version: 1.0.0-1 +Version: 1.0.1-1 Build-Depends: tinyxml2 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 c69938a0d..4ee127d4a 100644 --- a/ports/tinyexif/portfile.cmake +++ b/ports/tinyexif/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cdcseacave/TinyEXIF - REF 1.0.0 - SHA512 530b3e165bc51fa5a1bb29ea1f8cb5d7100a995347622d50375fdb5fab36139e9474d97ae2e3d54ac2886c2da1fe7138ed15710277410b6a6504ce05537fff28 + REF 1.0.1 + SHA512 d018d882adbcebf9fa8ad67a78304a1dd21ffd3a01e3cf2d269fa34efedc5ec5f293767f3a21d62cb1bb9b88b2c364977a9125e9b88b2eac7866a8d6b27c2f23 HEAD_REF master ) -- cgit v1.2.3 From 5a8e2d9a8e2c7bef80a59d420a081c04b833095c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 9 Dec 2017 17:17:10 -0800 Subject: [speex] Fix regression for release mode import library --- ports/speex/CMakeLists.txt | 4 +++- ports/speex/CONTROL | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt index 915b08226..c5c651edf 100644 --- a/ports/speex/CMakeLists.txt +++ b/ports/speex/CMakeLists.txt @@ -16,7 +16,9 @@ include_directories(win32 include) set(CMAKE_DEBUG_POSTFIX d) file(READ "win32/libspeex.def" _contents) -string(REPLACE "LIBRARY libspeex" "LIBRARY libspeexd" _contents "${_contents}") +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + string(REPLACE "LIBRARY libspeex" "LIBRARY libspeexd" _contents "${_contents}") +endif() file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libspeex.def" "${_contents}\n" "speex_nb_mode\n" diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL index 00910a596..e66d3445a 100644 --- a/ports/speex/CONTROL +++ b/ports/speex/CONTROL @@ -1,3 +1,3 @@ Source: speex -Version: 1.2.0-2 +Version: 1.2.0-3 Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. -- cgit v1.2.3 From d7b06be393c84273615a7e2526f514ffff0f93bc Mon Sep 17 00:00:00 2001 From: Artem Golubikhin Date: Sun, 10 Dec 2017 04:19:12 +0300 Subject: [speex] Fix release mode .def file. Add missing exports (#2340) * [speex] Fix release mode .def file. Add missing exports Fixed .def file in release mode (it is bugged after #2293 fix in d5395ac793d1db78ab97ca144d5e89eabf49a735) https://github.com/Microsoft/vcpkg/issues/2293#issuecomment-350449317 Added exports for speex_header_free and speex_mode_list (https://github.com/Microsoft/vcpkg/issues/2292#issuecomment-348773393) * [speex] Fix regression for release mode import library --- ports/speex/CMakeLists.txt | 2 ++ ports/speex/CONTROL | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/speex/CMakeLists.txt b/ports/speex/CMakeLists.txt index c5c651edf..bdce0b3c3 100644 --- a/ports/speex/CMakeLists.txt +++ b/ports/speex/CMakeLists.txt @@ -24,6 +24,8 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libspeex.def" "speex_nb_mode\n" "speex_wb_mode\n" "speex_uwb_mode\n" + "speex_mode_list\n" + "speex_header_free\n" ) set(SRC diff --git a/ports/speex/CONTROL b/ports/speex/CONTROL index e66d3445a..6fcda84be 100644 --- a/ports/speex/CONTROL +++ b/ports/speex/CONTROL @@ -1,3 +1,3 @@ Source: speex -Version: 1.2.0-3 +Version: 1.2.0-4 Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. -- cgit v1.2.3 From 4567fa570916b0398ac0a65645e2074a4c8f0fd9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 9 Dec 2017 17:25:12 -0800 Subject: [vcpkg-cmake-toolchain] Mark _VCPKG_ROOT_DIR as INTERNAL --- scripts/buildsystems/vcpkg.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 22dc5d6b1..71cf4e9b3 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -73,7 +73,7 @@ if(NOT DEFINED _VCPKG_ROOT_DIR) SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP}) endif() endwhile() - set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE} CACHE STRING "Vcpkg root directory") + set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE} CACHE INTERNAL "Vcpkg root directory") endif() set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed) -- cgit v1.2.3 From f3f9afd1c662db4be72c4a21393f6c3463cddde1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 11 Dec 2017 17:29:04 -0800 Subject: [openssl] Add -utf-8 flag --- ports/openssl/CONTROL | 2 +- ports/openssl/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index 897e93cc7..dcdda9cc6 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2n +Version: 1.0.2n-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/portfile.cmake b/ports/openssl/portfile.cmake index b6c72fb4d..349144e91 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -34,6 +34,7 @@ set(CONFIGURE_COMMAND ${PERL} Configure enable-static-engine enable-capieng no-ssl2 + -utf-8 ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") -- cgit v1.2.3 From b59a4647ec5272d46ab59728a235d964b182bffd Mon Sep 17 00:00:00 2001 From: jasjuang Date: Mon, 11 Dec 2017 22:14:57 -0800 Subject: [exiv2] update to latest master and fix debug config --- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 4db8e73ee..15d24a868 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 4f4add2cdcbe73af7098122a509dff0739d15908 +Version: 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99 Build-Depends:zlib, expat Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index f9aff3e93..fb44d3e94 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF 4f4add2cdcbe73af7098122a509dff0739d15908 - SHA512 32207cfd7ac932942562e062e851d7ba9be5586f33c2d924fb2a908a78f0c53f0d2973108c49bc865a3e7697a04a4b65d991441e4b89baca82b51b61affd4fa3 + REF 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99 + SHA512 672d5d2e823e72ed20d0d5f8f993b797a39109f99734b25db8eefdefa47e54df83d0644798ecb04891f68544e9e407a816ec6901027f14ef116f186b07043c18 HEAD_REF master ) @@ -14,6 +14,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/exiv2/cmake") + vcpkg_copy_pdbs() # Clean -- cgit v1.2.3 From 85848475feb8c852d24d4875f212e0505ca7238a Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Wed, 13 Dec 2017 10:34:16 +0900 Subject: Fix Gtest port fails install when one of the configuration is set to VCPKG_BUILD_TYPE (#2359) * Support build with master/HEAD Gtest will be able to build with master/HEAD. * Fix install when one of the configuration is set to VCPKG_BUILD_TYPE Fix install when one of the configuration is set to VCPKG_BUILD_TYPE. --- ports/gtest/CONTROL | 2 +- ports/gtest/portfile.cmake | 50 ++++++++++++++++++++++++++-------------------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index e4022376e..09a418b81 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,3 +1,3 @@ Source: gtest -Version: 1.8.0-3 +Version: 1.8.0-4 Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index b08d29488..39e56bc6c 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -17,16 +17,15 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch ) -if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") - set(gtest_force_shared_crt YES) -else() - set(gtest_force_shared_crt NO) -endif() +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" GTEST_FORCE_SHARED_CRT) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -Dgtest_force_shared_crt=${gtest_force_shared_crt} + OPTIONS + -DBUILD_GMOCK=ON + -DBUILD_GTEST=ON + -Dgtest_force_shared_crt=${GTEST_FORCE_SHARED_CRT} ) set(ENV{_CL_} "/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING") @@ -52,29 +51,36 @@ file( file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/googletest/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtest RENAME copyright) -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") +# This block will be unnecessary in googletest 1.9.0 (or later). +# These dll files are installed in ../bin directory by default settings. +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.dll) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin/) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/bin/gtest.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/bin/gtest_main.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/bin/gmock.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/bin/gmock_main.dll) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin/) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_main.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_main.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtestd.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_maind.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmockd.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_maind.dll) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.lib) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gtest.lib) + 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.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock_main.lib) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.lib) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtestd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest_maind.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmockd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_maind.lib) endif() - -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gtest.lib) -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.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock_main.lib) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtestd.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest_maind.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmockd.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_maind.lib) vcpkg_copy_pdbs() -- cgit v1.2.3 From 1656cf7fa7f8fe7fa3d803c86fbd9ae8a649b719 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 12 Dec 2017 17:52:57 -0800 Subject: [powershell] Use \ instead of / for paths. Resolves #2358. Resolves #2361 --- scripts/VcpkgPowershellUtils.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 45f52b225..e394e540e 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -150,9 +150,9 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, [Parameter(Mandatory=$true)][string]$outFilename) { vcpkgCreateDirectoryIfNotExists $destinationDir - $output = "$destinationDir/$outFilename" + $output = "$destinationDir\$outFilename" vcpkgRemoveItem $output - $destinationPartial = "$destinationDir/partially-extracted" + $destinationPartial = "$destinationDir\partially-extracted" vcpkgRemoveItem $destinationPartial vcpkgCreateDirectoryIfNotExists $destinationPartial -- cgit v1.2.3 From dd1c2d9d6256d345659372ae4731bc81a91ad63b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 12 Dec 2017 18:01:12 -0800 Subject: Fix fetching dependency text --- toolsrc/src/vcpkg/vcpkgpaths.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 324ca29d1..e64a681e2 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -92,7 +92,8 @@ namespace vcpkg tool_name, version_as_string); const fs::path script = scripts_folder / "fetchDependency.ps1"; - const std::string title = "Fetching %s version %s (No sufficient installed version was found)"; + const std::string title = Strings::format( + "Fetching %s version %s (No sufficient installed version was found)", tool_name, version_as_string); const System::PowershellParameter dependency_param("Dependency", tool_name); const std::string output = System::powershell_execute_and_capture_output(title, script, {dependency_param}); -- cgit v1.2.3 From 803347a0c545687f6e6b8b3594b52d11435491b3 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 13 Dec 2017 02:22:52 -0800 Subject: [vcpkg-upgrade] Initial commit of upgrade command. --- toolsrc/include/tests.utils.h | 16 +- toolsrc/include/vcpkg/commands.h | 6 + toolsrc/include/vcpkg/dependencies.h | 50 +++- toolsrc/include/vcpkg/paragraphs.h | 3 - toolsrc/include/vcpkg/update.h | 6 +- toolsrc/src/commands.upgrade.cpp | 79 ++++++ toolsrc/src/tests.plan.cpp | 150 +++++++++++- toolsrc/src/tests.update.cpp | 34 ++- toolsrc/src/vcpkg/commands.ci.cpp | 2 +- toolsrc/src/vcpkg/commands.cpp | 3 +- toolsrc/src/vcpkg/commands.portsdiff.cpp | 7 +- toolsrc/src/vcpkg/dependencies.cpp | 391 +++++++++++++++++++----------- toolsrc/src/vcpkg/help.cpp | 1 + toolsrc/src/vcpkg/install.cpp | 120 +-------- toolsrc/src/vcpkg/paragraphs.cpp | 12 - toolsrc/src/vcpkg/remove.cpp | 9 +- toolsrc/src/vcpkg/update.cpp | 40 +-- toolsrc/vcpkglib/vcpkglib.vcxproj | 1 + toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 3 + 19 files changed, 600 insertions(+), 333 deletions(-) create mode 100644 toolsrc/src/commands.upgrade.cpp diff --git a/toolsrc/include/tests.utils.h b/toolsrc/include/tests.utils.h index 485b8c294..0c0add7ab 100644 --- a/toolsrc/include/tests.utils.h +++ b/toolsrc/include/tests.utils.h @@ -23,4 +23,18 @@ std::unique_ptr make_status_pgh(const char* name, std::unique_ptr make_status_feature_pgh(const char* name, const char* feature, const char* depends = "", - const char* triplet = "x86-windows"); \ No newline at end of file + 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()); +} diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 74fd80c03..b852a973e 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -39,6 +39,12 @@ namespace vcpkg::Commands void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } + namespace Upgrade + { + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); + } + namespace Edit { extern const CommandStructure COMMAND_STRUCTURE; diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 5411ee166..f1249dc88 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -92,11 +92,11 @@ namespace vcpkg::Dependencies struct AnyAction { - AnyAction(InstallPlanAction&& iplan) : install_plan(std::move(iplan)) {} - AnyAction(RemovePlanAction&& rplan) : remove_plan(std::move(rplan)) {} + AnyAction(InstallPlanAction&& iplan) : install_action(std::move(iplan)) {} + AnyAction(RemovePlanAction&& rplan) : remove_action(std::move(rplan)) {} - Optional install_plan; - Optional remove_plan; + Optional install_action; + Optional remove_action; const PackageSpec& spec() const; }; @@ -123,22 +123,44 @@ namespace vcpkg::Dependencies struct PortFileProvider { - virtual const SourceControlFile& get_control_file(const std::string& spec) const = 0; + virtual Optional get_control_file(const std::string& src_name) const = 0; }; - struct MapPortFile : Util::ResourceBase, PortFileProvider + struct MapPortFileProvider : Util::ResourceBase, PortFileProvider { + explicit MapPortFileProvider(const std::unordered_map& map); + Optional get_control_file(const std::string& src_name) const override; + + private: const std::unordered_map& ports; - explicit MapPortFile(const std::unordered_map& map); - const SourceControlFile& get_control_file(const std::string& spec) const override; }; - struct PathsPortFile : Util::ResourceBase, PortFileProvider + struct PathsPortFileProvider : Util::ResourceBase, PortFileProvider { + explicit PathsPortFileProvider(const VcpkgPaths& paths); + Optional get_control_file(const std::string& src_name) const override; + + private: const VcpkgPaths& ports; mutable std::unordered_map cache; - explicit PathsPortFile(const VcpkgPaths& paths); - const SourceControlFile& get_control_file(const std::string& spec) const override; + }; + + struct ClusterGraph; + struct GraphPlan; + + struct PackageGraph + { + PackageGraph(const PortFileProvider& provider, const StatusParagraphs& status_db); + ~PackageGraph(); + + void install(const FeatureSpec& spec); + void upgrade(const PackageSpec& spec); + + std::vector serialize() const; + + private: + std::unique_ptr m_graph_plan; + std::unique_ptr m_graph; }; std::vector create_install_plan(const PortFileProvider& port_file_provider, @@ -155,4 +177,10 @@ namespace vcpkg::Dependencies std::vector create_feature_install_plan(const std::unordered_map& map, const std::vector& specs, const StatusParagraphs& status_db); + + std::vector create_feature_install_plan(const PortFileProvider& port_file_provider, + const std::vector& specs, + const StatusParagraphs& status_db); + + void print_plan(const std::vector& action_plan, const bool is_recursive = true); } diff --git a/toolsrc/include/vcpkg/paragraphs.h b/toolsrc/include/vcpkg/paragraphs.h index c8dbea646..e2c7f2d99 100644 --- a/toolsrc/include/vcpkg/paragraphs.h +++ b/toolsrc/include/vcpkg/paragraphs.h @@ -32,7 +32,4 @@ namespace vcpkg::Paragraphs std::vector> load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); - - std::map load_all_port_names_and_versions(const Files::Filesystem& fs, - const fs::path& ports_dir); } diff --git a/toolsrc/include/vcpkg/update.h b/toolsrc/include/vcpkg/update.h index 7587b9eb2..b85f7b2b3 100644 --- a/toolsrc/include/vcpkg/update.h +++ b/toolsrc/include/vcpkg/update.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -16,7 +17,8 @@ namespace vcpkg::Update VersionDiff version_diff; }; - std::vector find_outdated_packages(const std::map& src_names_to_versions, + std::vector find_outdated_packages(const Dependencies::PortFileProvider& provider, const StatusParagraphs& status_db); + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); -} \ No newline at end of file +} diff --git a/toolsrc/src/commands.upgrade.cpp b/toolsrc/src/commands.upgrade.cpp new file mode 100644 index 000000000..7a3210042 --- /dev/null +++ b/toolsrc/src/commands.upgrade.cpp @@ -0,0 +1,79 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Commands::Upgrade +{ + using Install::KeepGoing; + using Install::to_keep_going; + + static const std::string OPTION_NO_DRY_RUN = "--no-dry-run"; + static const std::string OPTION_KEEP_GOING = "--keep-going"; + + static const std::array INSTALL_SWITCHES = {{ + {OPTION_NO_DRY_RUN, "Actually upgrade"}, + {OPTION_KEEP_GOING, "Continue installing packages on failure"}, + }}; + + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("upgrade --no-dry-run"), + 0, + 0, + {INSTALL_SWITCHES, {}}, + nullptr, + }; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet&) + { + // input sanitization + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); + + const bool no_dry_run = Util::Sets::contains(options.switches, OPTION_NO_DRY_RUN); + const KeepGoing keep_going = to_keep_going(Util::Sets::contains(options.switches, OPTION_KEEP_GOING)); + + // create the plan + StatusParagraphs status_db = database_load_check(paths); + + Dependencies::PathsPortFileProvider provider(paths); + Dependencies::PackageGraph graph(provider, status_db); + + auto outdated_packages = Update::find_outdated_packages(provider, status_db); + for (auto&& outdated_package : outdated_packages) + graph.upgrade(outdated_package.spec); + + auto plan = graph.serialize(); + + if (plan.empty()) + { + System::println("All packages are up-to-date."); + Checks::exit_success(VCPKG_LINE_INFO); + } + + Dependencies::print_plan(plan, true); + + if (!no_dry_run) + { + System::println(System::Color::warning, + "If you are sure you want to rebuild the above packages, run this command with the " + "--no-dry-run option."); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + const Install::InstallSummary summary = Install::perform(plan, keep_going, paths, status_db); + + System::println("\nTotal elapsed time: %s\n", summary.total_elapsed_time); + + if (keep_going == KeepGoing::YES) + { + summary.print(); + } + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 122a4ffef..781588c91 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -36,7 +36,7 @@ namespace UnitTest1 std::vector vec, const Triplet& triplet = Triplet::X86_WINDOWS) { - const auto& plan = install_action->install_plan.value_or_exit(VCPKG_LINE_INFO); + const auto& plan = install_action->install_action.value_or_exit(VCPKG_LINE_INFO); const auto& feature_list = plan.feature_list; Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); @@ -61,7 +61,7 @@ namespace UnitTest1 std::string pkg_name, const Triplet& triplet = Triplet::X86_WINDOWS) { - const auto& plan = remove_action->remove_plan.value_or_exit(VCPKG_LINE_INFO); + const auto& plan = remove_action->remove_action.value_or_exit(VCPKG_LINE_INFO); Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); Assert::AreEqual(pkg_name.c_str(), plan.spec.name().c_str()); } @@ -98,7 +98,7 @@ namespace UnitTest1 auto spec_b = spec_map.emplace("b", "c"); auto spec_c = spec_map.emplace("c"); - Dependencies::MapPortFile map_port(spec_map.map); + Dependencies::MapPortFileProvider map_port(spec_map.map); auto install_plan = Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); @@ -122,7 +122,7 @@ namespace UnitTest1 auto spec_g = spec_map.emplace("g"); auto spec_h = spec_map.emplace("h"); - Dependencies::MapPortFile map_port(spec_map.map); + Dependencies::MapPortFileProvider map_port(spec_map.map); auto install_plan = Dependencies::create_install_plan( map_port, {spec_a, spec_b, spec_c}, StatusParagraphs(std::move(status_paragraphs))); @@ -162,7 +162,7 @@ namespace UnitTest1 StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(1), install_plan.size()); - auto p = install_plan[0].install_plan.get(); + auto p = install_plan[0].install_action.get(); Assert::IsNotNull(p); Assert::AreEqual("a", p->spec.name().c_str()); Assert::AreEqual(Dependencies::InstallPlanType::ALREADY_INSTALLED, p->plan_type); @@ -183,13 +183,13 @@ namespace UnitTest1 StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(2), install_plan.size()); - auto p = install_plan[0].install_plan.get(); + auto p = install_plan[0].install_action.get(); Assert::IsNotNull(p); Assert::AreEqual("b", p->spec.name().c_str()); Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p->plan_type); Assert::AreEqual(Dependencies::RequestType::AUTO_SELECTED, p->request_type); - auto p2 = install_plan[1].install_plan.get(); + auto p2 = install_plan[1].install_action.get(); Assert::IsNotNull(p2); Assert::AreEqual("a", p2->spec.name().c_str()); Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p2->plan_type); @@ -215,7 +215,7 @@ namespace UnitTest1 auto spec_j = spec_map.emplace("j", "k"); auto spec_k = spec_map.emplace("k"); - Dependencies::MapPortFile map_port(spec_map.map); + Dependencies::MapPortFileProvider map_port(spec_map.map); auto install_plan = Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); @@ -521,4 +521,138 @@ namespace UnitTest1 Assert::AreEqual("expat", remove_plan[2].spec.name().c_str()); } }; + + class UpgradePlanTests : public TestClass + { + TEST_METHOD(basic_upgrade_scheme) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a"); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + + auto plan = graph.serialize(); + + Assert::AreEqual(size_t(2), plan.size()); + Assert::AreEqual("a", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + Assert::AreEqual("a", plan[1].spec().name().c_str()); + Assert::IsTrue(plan[1].install_action.has_value()); + } + + TEST_METHOD(basic_upgrade_scheme_with_recurse) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + pghs.push_back(make_status_pgh("b", "a")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a"); + spec_map.emplace("b", "a"); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + + auto plan = graph.serialize(); + + Assert::AreEqual(size_t(4), plan.size()); + Assert::AreEqual("b", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + + Assert::AreEqual("a", plan[1].spec().name().c_str()); + Assert::IsTrue(plan[1].remove_action.has_value()); + + Assert::AreEqual("a", plan[2].spec().name().c_str()); + Assert::IsTrue(plan[2].install_action.has_value()); + + Assert::AreEqual("b", plan[3].spec().name().c_str()); + Assert::IsTrue(plan[3].install_action.has_value()); + } + + TEST_METHOD(basic_upgrade_scheme_with_bystander) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + pghs.push_back(make_status_pgh("b")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a"); + spec_map.emplace("b", "a"); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + + auto plan = graph.serialize(); + + Assert::AreEqual(size_t(2), plan.size()); + Assert::AreEqual("a", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + Assert::AreEqual("a", plan[1].spec().name().c_str()); + Assert::IsTrue(plan[1].install_action.has_value()); + } + + TEST_METHOD(basic_upgrade_scheme_with_new_dep) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a", "b"); + spec_map.emplace("b"); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + + auto plan = graph.serialize(); + + Assert::AreEqual(size_t(3), plan.size()); + Assert::AreEqual("a", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + Assert::AreEqual("b", plan[1].spec().name().c_str()); + Assert::IsTrue(plan[1].install_action.has_value()); + Assert::AreEqual("a", plan[2].spec().name().c_str()); + Assert::IsTrue(plan[2].install_action.has_value()); + } + + TEST_METHOD(basic_upgrade_scheme_with_features) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + pghs.push_back(make_status_feature_pgh("a", "a1")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a", "", {{"a1", ""}}); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + + auto plan = graph.serialize(); + + Assert::AreEqual(size_t(2), plan.size()); + + Assert::AreEqual("a", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + + features_check(&plan[1], "a", {"core", "a1"}); + } + }; } diff --git a/toolsrc/src/tests.update.cpp b/toolsrc/src/tests.update.cpp index 06ae797f4..b6e487c17 100644 --- a/toolsrc/src/tests.update.cpp +++ b/toolsrc/src/tests.update.cpp @@ -9,6 +9,8 @@ using namespace vcpkg::Update; namespace UnitTest1 { + using Pgh = std::vector>; + class UpdateTests : public TestClass { TEST_METHOD(find_outdated_packages_basic) @@ -19,10 +21,12 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::map port_versions; - port_versions["a"] = VersionT("0"); + std::unordered_map map; + auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "0"}}})); + map.emplace("a", std::move(*scf)); + Dependencies::MapPortFileProvider provider(map); - auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), + auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), &OutdatedPackage::compare_by_name); Assert::AreEqual(size_t(1), pkgs.size()); @@ -41,10 +45,12 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::map port_versions; - port_versions["a"] = VersionT("0"); + std::unordered_map map; + auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "0"}}})); + map.emplace("a", std::move(*scf)); + Dependencies::MapPortFileProvider provider(map); - auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), + auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), &OutdatedPackage::compare_by_name); Assert::AreEqual(size_t(1), pkgs.size()); @@ -65,10 +71,12 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::map port_versions; - port_versions["a"] = VersionT("0"); + std::unordered_map map; + auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "0"}}})); + map.emplace("a", std::move(*scf)); + Dependencies::MapPortFileProvider provider(map); - auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), + auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), &OutdatedPackage::compare_by_name); Assert::AreEqual(size_t(1), pkgs.size()); @@ -84,10 +92,12 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::map port_versions; - port_versions["a"] = VersionT("2"); + std::unordered_map map; + auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "2"}}})); + map.emplace("a", std::move(*scf)); + Dependencies::MapPortFileProvider provider(map); - auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), + auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), &OutdatedPackage::compare_by_name); Assert::AreEqual(size_t(0), pkgs.size()); diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index f2e984bf8..1a2f9b47f 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -27,7 +27,7 @@ namespace vcpkg::Commands::CI const std::vector specs = PackageSpec::to_package_specs(ports, triplet); StatusParagraphs status_db = database_load_check(paths); - const auto& paths_port_file = Dependencies::PathsPortFile(paths); + const auto& paths_port_file = Dependencies::PathsPortFileProvider(paths); std::vector install_plan = Dependencies::create_install_plan(paths_port_file, specs, status_db); diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index 15b10c7ea..ccf6fa729 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -13,9 +13,10 @@ namespace vcpkg::Commands Span> get_available_commands_type_a() { static std::vector> t = { - PackageNameAndFunction{"install", &Install::perform_and_exit}, + {"install", &Install::perform_and_exit}, {"ci", &CI::perform_and_exit}, {"remove", &Remove::perform_and_exit}, + {"upgrade", &Upgrade::perform_and_exit}, {"build", &Build::Command::perform_and_exit}, {"env", &Env::perform_and_exit}, {"build-external", &BuildExternal::perform_and_exit}, diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index 6752715e4..dba04ce5b 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -98,8 +98,11 @@ namespace vcpkg::Commands::PortsDiff ".vcpkg-root", git_exe.u8string()); System::cmd_execute_clean(cmd); - const std::map names_and_versions = Paragraphs::load_all_port_names_and_versions( - paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string); + const auto all_ports = + Paragraphs::load_all_ports(paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string); + 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); return names_and_versions; } diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 0a1f79834..5148a10f5 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -65,26 +65,19 @@ namespace vcpkg::Dependencies struct ClusterGraph : Util::MoveOnlyBase { - explicit ClusterGraph(std::unordered_map&& ports) - : m_ports(std::move(ports)) - { - } + explicit ClusterGraph(const PortFileProvider& provider) : m_provider(provider) {} Cluster& get(const PackageSpec& spec) { auto it = m_graph.find(spec); if (it == m_graph.end()) { - // Load on-demand from m_ports - auto it_ports = m_ports.find(spec.name()); - if (it_ports != m_ports.end()) - { - auto& clust = m_graph[spec]; - clust.spec = spec; - cluster_from_scf(*it_ports->second, clust); - return clust; - } - return m_graph[spec]; + // Load on-demand from m_provider + auto maybe_scf = m_provider.get_control_file(spec.name()); + auto& clust = m_graph[spec]; + clust.spec = spec; + if (auto p_scf = maybe_scf.get()) cluster_from_scf(*p_scf, clust); + return clust; } return it->second; } @@ -107,7 +100,7 @@ namespace vcpkg::Dependencies } std::unordered_map m_graph; - std::unordered_map m_ports; + const PortFileProvider& m_provider; }; std::vector AnyParagraph::dependencies(const Triplet& triplet) const @@ -226,12 +219,12 @@ namespace vcpkg::Dependencies const PackageSpec& AnyAction::spec() const { - if (const auto p = install_plan.get()) + if (const auto p = install_action.get()) { return p->spec; } - if (const auto p = remove_plan.get()) + if (const auto p = remove_action.get()) { return p->spec; } @@ -269,21 +262,20 @@ namespace vcpkg::Dependencies return left->spec.name() < right->spec.name(); } - MapPortFile::MapPortFile(const std::unordered_map& map) : ports(map) {} + MapPortFileProvider::MapPortFileProvider(const std::unordered_map& map) : ports(map) + { + } - const SourceControlFile& MapPortFile::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()) - { - Checks::exit_fail(VCPKG_LINE_INFO); - } + if (scf == ports.end()) return nullopt; return scf->second; } - PathsPortFile::PathsPortFile(const VcpkgPaths& paths) : ports(paths) {} + PathsPortFileProvider::PathsPortFileProvider(const VcpkgPaths& paths) : ports(paths) {} - const SourceControlFile& PathsPortFile::get_control_file(const std::string& spec) const + Optional PathsPortFileProvider::get_control_file(const std::string& spec) const { auto cache_it = cache.find(spec); if (cache_it != cache.end()) @@ -298,56 +290,34 @@ namespace vcpkg::Dependencies auto it = cache.emplace(spec, std::move(*scf->get())); return it.first->second; } - print_error_message(source_control_file.error()); - Checks::exit_fail(VCPKG_LINE_INFO); + return nullopt; } std::vector create_install_plan(const PortFileProvider& port_file_provider, const std::vector& specs, const StatusParagraphs& status_db) { - struct InstallAdjacencyProvider final : Graphs::AdjacencyProvider - { - const PortFileProvider& port_file_provider; - const StatusParagraphs& status_db; - const std::unordered_set& specs_as_set; + auto fspecs = Util::fmap(specs, [](const PackageSpec& spec) { return FeatureSpec(spec, ""); }); + auto plan = create_feature_install_plan(port_file_provider, fspecs, status_db); - InstallAdjacencyProvider(const PortFileProvider& port_file_provider, - const StatusParagraphs& s, - const std::unordered_set& specs_as_set) - : port_file_provider(port_file_provider), status_db(s), specs_as_set(specs_as_set) - { - } + std::vector ret; + ret.reserve(plan.size()); - std::vector adjacency_list(const InstallPlanAction& plan) const override + for (auto&& action : plan) + { + if (auto p_install = action.install_action.get()) { - if (plan.any_paragraph.status_paragraph.get()) return std::vector{}; - return plan.any_paragraph.dependencies(plan.spec.triplet()); + ret.push_back(std::move(*p_install)); } - - InstallPlanAction load_vertex_data(const PackageSpec& spec) const override + else { - const RequestType request_type = specs_as_set.find(spec) != specs_as_set.end() - ? RequestType::USER_REQUESTED - : RequestType::AUTO_SELECTED; - auto it = status_db.find_installed(spec); - if (it != status_db.end()) return InstallPlanAction{spec, {*it->get(), nullopt, nullopt}, request_type}; - return InstallPlanAction{ - spec, - {nullopt, nullopt, *port_file_provider.get_control_file(spec.name()).core_paragraph}, - request_type}; + Checks::exit_with_message(VCPKG_LINE_INFO, + "The installation plan requires feature packages support. Please re-run the " + "command with --featurepackages."); } - }; - - const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); - std::vector toposort = - Graphs::topological_sort(specs, InstallAdjacencyProvider{port_file_provider, status_db, specs_as_set}); - Util::erase_remove_if(toposort, [](const InstallPlanAction& plan) { - return plan.request_type == RequestType::AUTO_SELECTED && - plan.plan_type == InstallPlanType::ALREADY_INSTALLED; - }); + } - return toposort; + return ret; } std::vector create_remove_plan(const std::vector& specs, @@ -461,11 +431,12 @@ namespace vcpkg::Dependencies SUCCESS, }; - MarkPlusResult mark_plus(const std::string& feature, - Cluster& cluster, - ClusterGraph& pkg_to_cluster, - GraphPlan& graph_plan); - void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); + static MarkPlusResult mark_plus(const std::string& feature, + Cluster& cluster, + ClusterGraph& pkg_to_cluster, + GraphPlan& graph_plan); + + static void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); MarkPlusResult mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) { @@ -557,110 +528,80 @@ namespace vcpkg::Dependencies } } - static ClusterGraph create_feature_install_graph(const std::unordered_map& map, - const StatusParagraphs& status_db) + std::vector create_feature_install_plan(const PortFileProvider& provider, + const std::vector& specs, + const StatusParagraphs& status_db) { - std::unordered_map ptr_map; - for (auto&& p : map) - ptr_map.emplace(p.first, &p.second); - ClusterGraph graph(std::move(ptr_map)); - - auto installed_ports = get_installed_ports(status_db); - - for (auto&& status_paragraph : installed_ports) - { - Cluster& cluster = graph.get(status_paragraph->package.spec); - - cluster.transient_uninstalled = false; - - cluster.status_paragraphs.emplace_back(status_paragraph); - - auto& status_paragraph_feature = status_paragraph->package.feature; - // In this case, empty string indicates the "core" paragraph for a package. - if (status_paragraph_feature.empty()) - { - cluster.original_features.insert("core"); - } - else - { - cluster.original_features.insert(status_paragraph_feature); - } - } - - for (auto&& status_paragraph : installed_ports) - { - auto& spec = status_paragraph->package.spec; - auto& status_paragraph_feature = status_paragraph->package.feature; - auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends, - status_paragraph->package.spec.triplet()); - - for (auto&& dependency : reverse_edges) - { - auto& dep_cluster = graph.get(dependency.spec()); - - auto depends_name = dependency.feature(); - if (depends_name.empty()) depends_name = "core"; + PackageGraph pgraph(provider, status_db); + for (auto&& spec : specs) + pgraph.install(spec); - auto& target_node = dep_cluster.edges[depends_name]; - target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); - } - } - return graph; + return pgraph.serialize(); } std::vector create_feature_install_plan(const std::unordered_map& map, const std::vector& specs, const StatusParagraphs& status_db) { - ClusterGraph graph = create_feature_install_graph(map, status_db); + MapPortFileProvider provider(map); + return create_feature_install_plan(provider, specs, status_db); + } - GraphPlan graph_plan; - for (auto&& spec : specs) + void PackageGraph::install(const FeatureSpec& spec) + { + Cluster& spec_cluster = m_graph->get(spec.spec()); + spec_cluster.request_type = RequestType::USER_REQUESTED; + if (spec.feature() == "*") { - Cluster& spec_cluster = graph.get(spec.spec()); - spec_cluster.request_type = RequestType::USER_REQUESTED; - if (spec.feature() == "*") + if (auto p_scf = spec_cluster.source_control_file.value_or(nullptr)) { - if (auto p_scf = spec_cluster.source_control_file.value_or(nullptr)) + for (auto&& feature : p_scf->feature_paragraphs) { - for (auto&& feature : p_scf->feature_paragraphs) - { - auto res = mark_plus(feature->name, spec_cluster, graph, graph_plan); - - Checks::check_exit(VCPKG_LINE_INFO, - res == MarkPlusResult::SUCCESS, - "Error: Unable to locate feature %s", - spec); - } - - auto res = mark_plus("core", spec_cluster, graph, graph_plan); + auto res = mark_plus(feature->name, spec_cluster, *m_graph, *m_graph_plan); Checks::check_exit( VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); } - else - { - Checks::exit_with_message( - VCPKG_LINE_INFO, "Error: Unable to handle '*' because can't find CONTROL for %s", spec.spec()); - } - } - else - { - auto res = mark_plus(spec.feature(), spec_cluster, graph, graph_plan); + + auto res = mark_plus("core", spec_cluster, *m_graph, *m_graph_plan); Checks::check_exit( VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); } + else + { + Checks::exit_with_message( + VCPKG_LINE_INFO, "Error: Unable to handle '*' because can't find CONTROL for %s", spec.spec()); + } + } + else + { + auto res = mark_plus(spec.feature(), spec_cluster, *m_graph, *m_graph_plan); - graph_plan.install_graph.add_vertex(ClusterPtr{&spec_cluster}); + Checks::check_exit( + VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); } - Graphs::GraphAdjacencyProvider adjacency_remove_graph(graph_plan.remove_graph.adjacency_list()); - auto remove_vertex_list = graph_plan.remove_graph.vertex_list(); + m_graph_plan->install_graph.add_vertex(ClusterPtr{&spec_cluster}); + } + + void PackageGraph::upgrade(const PackageSpec& spec) + { + Cluster& spec_cluster = m_graph->get(spec); + spec_cluster.request_type = RequestType::USER_REQUESTED; + + mark_minus(spec_cluster, *m_graph, *m_graph_plan); + } + + std::vector PackageGraph::serialize() const + { + Graphs::GraphAdjacencyProvider adjacency_remove_graph(m_graph_plan->remove_graph.adjacency_list()); + auto remove_vertex_list = m_graph_plan->remove_graph.vertex_list(); auto remove_toposort = Graphs::topological_sort(remove_vertex_list, adjacency_remove_graph); - Graphs::GraphAdjacencyProvider adjacency_install_graph(graph_plan.install_graph.adjacency_list()); - auto insert_vertex_list = graph_plan.install_graph.vertex_list(); + Graphs::GraphAdjacencyProvider adjacency_install_graph( + m_graph_plan->install_graph.adjacency_list()); + auto insert_vertex_list = m_graph_plan->install_graph.vertex_list(); auto insert_toposort = Graphs::topological_sort(insert_vertex_list, adjacency_install_graph); std::vector plan; @@ -705,4 +646,162 @@ namespace vcpkg::Dependencies return plan; } + + static std::unique_ptr create_feature_install_graph(const PortFileProvider& map, + const StatusParagraphs& status_db) + { + std::unique_ptr graph = std::make_unique(map); + + auto installed_ports = get_installed_ports(status_db); + + for (auto&& status_paragraph : installed_ports) + { + Cluster& cluster = graph->get(status_paragraph->package.spec); + + cluster.transient_uninstalled = false; + + cluster.status_paragraphs.emplace_back(status_paragraph); + + auto& status_paragraph_feature = status_paragraph->package.feature; + // In this case, empty string indicates the "core" paragraph for a package. + if (status_paragraph_feature.empty()) + { + cluster.original_features.insert("core"); + } + else + { + cluster.original_features.insert(status_paragraph_feature); + } + } + + // Populate the graph with "remove edges", which are the reverse of the Build-Depends edges. + for (auto&& status_paragraph : installed_ports) + { + auto& spec = status_paragraph->package.spec; + auto& status_paragraph_feature = status_paragraph->package.feature; + auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends, + status_paragraph->package.spec.triplet()); + + for (auto&& dependency : reverse_edges) + { + auto& dep_cluster = graph->get(dependency.spec()); + + auto depends_name = dependency.feature(); + if (depends_name.empty()) depends_name = "core"; + + auto& target_node = dep_cluster.edges[depends_name]; + target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); + } + } + return graph; + } + + PackageGraph::PackageGraph(const PortFileProvider& provider, const StatusParagraphs& status_db) + : m_graph(create_feature_install_graph(provider, status_db)), m_graph_plan(std::make_unique()) + { + } + + PackageGraph::~PackageGraph() {} + + void print_plan(const std::vector& action_plan, const bool is_recursive) + { + std::vector remove_plans; + std::vector rebuilt_plans; + std::vector only_install_plans; + std::vector new_plans; + std::vector already_installed_plans; + std::vector excluded; + + const bool has_non_user_requested_packages = Util::find_if(action_plan, [](const AnyAction& package) -> bool { + if (auto iplan = package.install_action.get()) + return iplan->request_type != RequestType::USER_REQUESTED; + else + return false; + }) != action_plan.cend(); + + for (auto&& action : action_plan) + { + if (auto install_action = action.install_action.get()) + { + // remove plans are guaranteed to come before install plans, so we know the plan will be contained if at + // all. + auto it = Util::find_if( + remove_plans, [&](const RemovePlanAction* plan) { return plan->spec == install_action->spec; }); + if (it != remove_plans.end()) + { + rebuilt_plans.emplace_back(install_action); + } + else + { + switch (install_action->plan_type) + { + case InstallPlanType::INSTALL: only_install_plans.emplace_back(install_action); break; + case InstallPlanType::ALREADY_INSTALLED: + if (install_action->request_type == RequestType::USER_REQUESTED) + already_installed_plans.emplace_back(install_action); + break; + case InstallPlanType::BUILD_AND_INSTALL: new_plans.emplace_back(install_action); break; + case InstallPlanType::EXCLUDED: excluded.emplace_back(install_action); break; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + } + else if (auto remove_action = action.remove_action.get()) + { + remove_plans.emplace_back(remove_action); + } + } + + std::sort(remove_plans.begin(), remove_plans.end(), &RemovePlanAction::compare_by_name); + std::sort(rebuilt_plans.begin(), rebuilt_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(only_install_plans.begin(), only_install_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(new_plans.begin(), new_plans.end(), &InstallPlanAction::compare_by_name); + 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) { + return to_output_string(p->request_type, p->displayname(), p->build_options); + }); + }; + + if (excluded.size() > 0) + { + System::println("The following packages are excluded:\n%s", actions_to_output_string(excluded)); + } + + if (already_installed_plans.size() > 0) + { + System::println("The following packages are already installed:\n%s", + actions_to_output_string(already_installed_plans)); + } + + if (rebuilt_plans.size() > 0) + { + System::println("The following packages will be rebuilt:\n%s", actions_to_output_string(rebuilt_plans)); + } + + if (new_plans.size() > 0) + { + System::println("The following packages will be built and installed:\n%s", + actions_to_output_string(new_plans)); + } + + if (only_install_plans.size() > 0) + { + System::println("The following packages will be directly installed:\n%s", + actions_to_output_string(only_install_plans)); + } + + if (has_non_user_requested_packages) + System::println("Additional packages (*) will be modified to complete this operation."); + + if (remove_plans.size() > 0 && !is_recursive) + { + System::println(System::Color::warning, + "If you are sure you want to rebuild the above packages, run the command with the " + "--recurse option"); + Checks::exit_fail(VCPKG_LINE_INFO); + } + } } diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index c83f0277b..b7d355742 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -85,6 +85,7 @@ namespace vcpkg::Help " vcpkg remove --outdated Uninstall all out-of-date packages\n" " vcpkg list List installed packages\n" " vcpkg update Display list of packages for updating\n" + " vcpkg upgrade Rebuild all outdated packages\n" " vcpkg hash [alg] Hash a file by specific algorithm, default SHA512\n" " vcpkg help topics Display the list of help topics\n" " vcpkg help Display help for a specific topic\n" diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 76dc7a527..08cfc2e73 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -348,108 +348,6 @@ namespace vcpkg::Install Checks::unreachable(VCPKG_LINE_INFO); } - static void print_plan(const std::vector& action_plan, const bool is_recursive) - { - std::vector remove_plans; - std::vector rebuilt_plans; - std::vector only_install_plans; - std::vector new_plans; - std::vector already_installed_plans; - std::vector excluded; - - const bool has_non_user_requested_packages = Util::find_if(action_plan, [](const AnyAction& package) -> bool { - if (auto iplan = package.install_plan.get()) - return iplan->request_type != RequestType::USER_REQUESTED; - else - return false; - }) != action_plan.cend(); - - for (auto&& action : action_plan) - { - if (auto install_action = action.install_plan.get()) - { - // remove plans are guaranteed to come before install plans, so we know the plan will be contained if at - // all. - auto it = Util::find_if( - remove_plans, [&](const RemovePlanAction* plan) { return plan->spec == install_action->spec; }); - if (it != remove_plans.end()) - { - rebuilt_plans.emplace_back(install_action); - } - else - { - switch (install_action->plan_type) - { - case InstallPlanType::INSTALL: only_install_plans.emplace_back(install_action); break; - case InstallPlanType::ALREADY_INSTALLED: - if (install_action->request_type == RequestType::USER_REQUESTED) - already_installed_plans.emplace_back(install_action); - break; - case InstallPlanType::BUILD_AND_INSTALL: new_plans.emplace_back(install_action); break; - case InstallPlanType::EXCLUDED: excluded.emplace_back(install_action); break; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - } - else if (auto remove_action = action.remove_plan.get()) - { - remove_plans.emplace_back(remove_action); - } - } - - std::sort(remove_plans.begin(), remove_plans.end(), &RemovePlanAction::compare_by_name); - std::sort(rebuilt_plans.begin(), rebuilt_plans.end(), &InstallPlanAction::compare_by_name); - std::sort(only_install_plans.begin(), only_install_plans.end(), &InstallPlanAction::compare_by_name); - std::sort(new_plans.begin(), new_plans.end(), &InstallPlanAction::compare_by_name); - 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) { - return to_output_string(p->request_type, p->displayname(), p->build_options); - }); - }; - - if (excluded.size() > 0) - { - System::println("The following packages are excluded:\n%s", actions_to_output_string(excluded)); - } - - if (already_installed_plans.size() > 0) - { - System::println("The following packages are already installed:\n%s", - actions_to_output_string(already_installed_plans)); - } - - if (rebuilt_plans.size() > 0) - { - System::println("The following packages will be rebuilt:\n%s", actions_to_output_string(rebuilt_plans)); - } - - if (new_plans.size() > 0) - { - System::println("The following packages will be built and installed:\n%s", - actions_to_output_string(new_plans)); - } - - if (only_install_plans.size() > 0) - { - System::println("The following packages will be directly installed:\n%s", - actions_to_output_string(only_install_plans)); - } - - if (has_non_user_requested_packages) - System::println("Additional packages (*) will be installed to complete this operation."); - - if (remove_plans.size() > 0 && !is_recursive) - { - System::println(System::Color::warning, - "If you are sure you want to rebuild the above packages, run the command with the " - "--recurse option"); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - void InstallSummary::print() const { System::println("RESULTS"); @@ -499,7 +397,7 @@ namespace vcpkg::Install results.emplace_back(spec, &action); - if (const auto install_action = action.install_plan.get()) + if (const auto install_action = action.install_action.get()) { auto result = perform_install_plan_action(paths, *install_action, status_db); @@ -511,7 +409,7 @@ namespace vcpkg::Install results.back().build_result = std::move(result); } - else if (const auto remove_action = action.remove_plan.get()) + else if (const auto remove_action = action.remove_action.get()) { Checks::check_exit(VCPKG_LINE_INFO, GlobalState::feature_packages); Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, status_db); @@ -690,7 +588,7 @@ namespace vcpkg::Install } else { - Dependencies::PathsPortFile paths_port_file(paths); + Dependencies::PathsPortFileProvider paths_port_file(paths); auto install_plan = Dependencies::create_install_plan( paths_port_file, Util::fmap(specs, [](auto&& spec) { return spec.package_spec; }), status_db); @@ -700,7 +598,7 @@ namespace vcpkg::Install for (auto&& action : action_plan) { - if (auto p_install = action.install_plan.get()) + if (auto p_install = action.install_action.get()) { p_install->build_options = install_plan_options; if (p_install->request_type != RequestType::USER_REQUESTED) @@ -713,16 +611,16 @@ namespace vcpkg::Install // log the plan const std::string specs_string = Strings::join(",", action_plan, [](const AnyAction& action) { - if (auto iaction = action.install_plan.get()) + if (auto iaction = action.install_action.get()) return iaction->spec.to_string(); - else if (auto raction = action.remove_plan.get()) + else if (auto raction = action.remove_action.get()) return "R$" + raction->spec.to_string(); Checks::unreachable(VCPKG_LINE_INFO); }); Metrics::g_metrics.lock()->track_property("installplan", specs_string); - print_plan(action_plan, is_recursive); + Dependencies::print_plan(action_plan, is_recursive); if (dry_run) { @@ -752,7 +650,7 @@ namespace vcpkg::Install for (auto&& result : summary.results) { if (!result.action) continue; - if (auto p_install_action = result.action->install_plan.get()) + if (auto p_install_action = result.action->install_action.get()) { if (p_install_action->request_type != RequestType::USER_REQUESTED) continue; auto bpgh = result.get_binary_paragraph(); @@ -773,7 +671,7 @@ namespace vcpkg::Install { if (build_result.binary_control_file) return &build_result.binary_control_file->core_paragraph; if (action) - if (auto p_install_plan = action->install_plan.get()) + if (auto p_install_plan = action->install_action.get()) { if (auto p_bcf = p_install_plan->any_paragraph.binary_control_file.get()) return &p_bcf->core_paragraph; diff --git a/toolsrc/src/vcpkg/paragraphs.cpp b/toolsrc/src/vcpkg/paragraphs.cpp index b93de190c..b66d53994 100644 --- a/toolsrc/src/vcpkg/paragraphs.cpp +++ b/toolsrc/src/vcpkg/paragraphs.cpp @@ -289,16 +289,4 @@ namespace vcpkg::Paragraphs } return std::move(results.paragraphs); } - - std::map load_all_port_names_and_versions(const Files::Filesystem& fs, - const fs::path& ports_dir) - { - auto all_ports = load_all_ports(fs, ports_dir); - - std::map names_and_versions; - for (auto&& port : all_ports) - names_and_versions.emplace(port->core_paragraph->name, port->core_paragraph->version); - - return names_and_versions; - } } diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 8ae0bc881..4079d60c1 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -207,10 +207,11 @@ namespace vcpkg::Remove System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); Checks::exit_fail(VCPKG_LINE_INFO); } - specs = Util::fmap( - Update::find_outdated_packages( - Paragraphs::load_all_port_names_and_versions(paths.get_filesystem(), paths.ports), status_db), - [](auto&& outdated) { return outdated.spec; }); + + Dependencies::PathsPortFileProvider provider(paths); + + specs = Util::fmap(Update::find_outdated_packages(provider, status_db), + [](auto&& outdated) { return outdated.spec; }); if (specs.empty()) { diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index 29baef91e..d6c5614ed 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -14,7 +14,7 @@ namespace vcpkg::Update return left.spec.name() < right.spec.name(); } - std::vector find_outdated_packages(const std::map& src_names_to_versions, + std::vector find_outdated_packages(const Dependencies::PortFileProvider& provider, const StatusParagraphs& status_db) { const std::vector installed_packages = get_installed_ports(status_db); @@ -24,19 +24,23 @@ namespace vcpkg::Update { if (!pgh->package.feature.empty()) { - // Skip feature packages; only consider master packages for needing updates. + // Skip feature paragraphs; only consider master paragraphs for needing updates. continue; } - const auto it = src_names_to_versions.find(pgh->package.spec.name()); - if (it == src_names_to_versions.end()) + auto maybe_scf = provider.get_control_file(pgh->package.spec.name()); + if (auto p_scf = maybe_scf.get()) { - // Package was not installed from portfile - continue; + auto&& port_version = p_scf->core_paragraph->version; + auto&& installed_version = pgh->package.version; + if (installed_version != port_version) + { + output.push_back({pgh->package.spec, VersionDiff(installed_version, port_version)}); + } } - if (it->second != pgh->package.version) + else { - output.push_back({pgh->package.spec, VersionDiff(pgh->package.version, it->second)}); + // No portfile available } } @@ -58,10 +62,10 @@ namespace vcpkg::Update const StatusParagraphs status_db = database_load_check(paths); - const auto outdated_packages = SortedVector( - find_outdated_packages(Paragraphs::load_all_port_names_and_versions(paths.get_filesystem(), paths.ports), - status_db), - &OutdatedPackage::compare_by_name); + Dependencies::PathsPortFileProvider provider(paths); + + const auto outdated_packages = SortedVector(find_outdated_packages(provider, status_db), + &OutdatedPackage::compare_by_name); if (outdated_packages.empty()) { @@ -69,19 +73,17 @@ namespace vcpkg::Update } else { - std::string install_line; System::println("The following packages differ from their port versions:"); for (auto&& package : outdated_packages) { - install_line += package.spec.to_string(); - install_line += " "; System::println(" %-32s %s", package.spec, package.version_diff.to_string()); } System::println("\n" - "To update these packages, run\n" - " .\\vcpkg remove --outdated\n" - " .\\vcpkg install " + - install_line); + "To update these packages and all dependencies, run\n" + " .\\vcpkg upgrade\n" + "\n" + "To only remove outdated packages, run\n" + " .\\vcpkg remove --outdated\n"); } Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 9a7ad6dc0..68345ca85 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -185,6 +185,7 @@ + Create Create diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 966fc7fb9..dfbcf0c7e 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -195,6 +195,9 @@ Source Files\vcpkg + + Source Files\vcpkg + -- cgit v1.2.3 From d88563cd095b9aaad81d57f1c0a254d7e17cf859 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 13 Dec 2017 03:01:50 -0800 Subject: [vcpkg-upgrade] Accept list of packages to specifically upgrade. --- toolsrc/include/vcpkg/packagespec.h | 7 +++ toolsrc/src/commands.upgrade.cpp | 108 ++++++++++++++++++++++++++++++++---- toolsrc/src/vcpkg/base/checks.cpp | 9 ++- 3 files changed, 108 insertions(+), 16 deletions(-) diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index 071487e1a..f1119e2f3 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -34,6 +34,13 @@ namespace vcpkg std::string to_string() const; + bool operator<(const PackageSpec& other) const + { + if (name() < other.name()) return true; + if (name() > other.name()) return false; + return triplet() < other.triplet(); + } + private: std::string m_name; Triplet m_triplet; diff --git a/toolsrc/src/commands.upgrade.cpp b/toolsrc/src/commands.upgrade.cpp index 7a3210042..2ce04faa9 100644 --- a/toolsrc/src/commands.upgrade.cpp +++ b/toolsrc/src/commands.upgrade.cpp @@ -1,8 +1,10 @@ #include "pch.h" +#include #include #include #include +#include #include #include #include @@ -24,37 +26,121 @@ namespace vcpkg::Commands::Upgrade const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("upgrade --no-dry-run"), 0, - 0, + SIZE_MAX, {INSTALL_SWITCHES, {}}, nullptr, }; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet&) + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - // input sanitization const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const bool no_dry_run = Util::Sets::contains(options.switches, OPTION_NO_DRY_RUN); const KeepGoing keep_going = to_keep_going(Util::Sets::contains(options.switches, OPTION_KEEP_GOING)); - // create the plan StatusParagraphs status_db = database_load_check(paths); Dependencies::PathsPortFileProvider provider(paths); Dependencies::PackageGraph graph(provider, status_db); - auto outdated_packages = Update::find_outdated_packages(provider, status_db); - for (auto&& outdated_package : outdated_packages) - graph.upgrade(outdated_package.spec); + // input sanitization + const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { + return Input::check_and_get_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); + }); - auto plan = graph.serialize(); + for (auto&& spec : specs) + { + Input::check_triplet(spec.triplet(), paths); + } - if (plan.empty()) + if (specs.empty()) { - System::println("All packages are up-to-date."); - Checks::exit_success(VCPKG_LINE_INFO); + // If no packages specified, upgrade all outdated packages. + auto outdated_packages = Update::find_outdated_packages(provider, status_db); + + if (outdated_packages.empty()) + { + System::println("All installed packages are up-to-date with the local portfiles."); + Checks::exit_success(VCPKG_LINE_INFO); + } + + for (auto&& outdated_package : outdated_packages) + graph.upgrade(outdated_package.spec); + } + else + { + std::vector not_installed; + std::vector no_portfile; + std::vector to_upgrade; + std::vector up_to_date; + + for (auto&& spec : specs) + { + auto it = status_db.find_installed(spec); + if (it == status_db.end()) + { + not_installed.push_back(spec); + } + + auto maybe_scf = provider.get_control_file(spec.name()); + if (auto p_scf = maybe_scf.get()) + { + if (it != status_db.end()) + { + if (p_scf->core_paragraph->version != (*it)->package.version) + { + to_upgrade.push_back(spec); + } + else + { + up_to_date.push_back(spec); + } + } + } + else + { + no_portfile.push_back(spec); + } + } + + Util::sort(not_installed); + Util::sort(no_portfile); + Util::sort(up_to_date); + Util::sort(to_upgrade); + + if (!up_to_date.empty()) + { + System::println(System::Color::success, "The following packages are up-to-date:"); + System::println(Strings::join( + "", up_to_date, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); + } + + if (!not_installed.empty()) + { + System::println(System::Color::error, "The following packages are not installed:"); + System::println(Strings::join( + "", not_installed, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); + } + + if (!no_portfile.empty()) + { + System::println(System::Color::error, "The following packages do not have a valid portfile:"); + System::println(Strings::join( + "", no_portfile, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); + } + + Checks::check_exit(VCPKG_LINE_INFO, not_installed.empty() && no_portfile.empty()); + + if (to_upgrade.empty()) Checks::exit_success(VCPKG_LINE_INFO); + + for (auto&& spec : to_upgrade) + graph.upgrade(spec); } + auto plan = graph.serialize(); + + Checks::check_exit(VCPKG_LINE_INFO, !plan.empty()); + Dependencies::print_plan(plan, true); if (!no_dry_run) diff --git a/toolsrc/src/vcpkg/base/checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp index ed28d6e2b..23f2cc630 100644 --- a/toolsrc/src/vcpkg/base/checks.cpp +++ b/toolsrc/src/vcpkg/base/checks.cpp @@ -49,8 +49,7 @@ namespace vcpkg::Checks #else void register_console_ctrl_handler() {} #endif - - [[noreturn]] void unreachable(const LineInfo& line_info) + void unreachable(const LineInfo& line_info) { System::println(System::Color::error, "Error: Unreachable code was reached"); System::println(System::Color::error, line_info.to_string()); // Always print line_info here @@ -61,13 +60,13 @@ namespace vcpkg::Checks #endif } - [[noreturn]] void exit_with_code(const LineInfo& line_info, const int exit_code) + void exit_with_code(const LineInfo& line_info, const int exit_code) { Debug::println(System::Color::error, line_info.to_string()); cleanup_and_exit(exit_code); } - [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView error_message) + void exit_with_message(const LineInfo& line_info, const CStringView error_message) { System::println(System::Color::error, error_message); exit_fail(line_info); @@ -77,7 +76,7 @@ namespace vcpkg::Checks { if (!expression) { - exit_with_message(line_info, ""); + exit_fail(line_info); } } -- cgit v1.2.3 From 621d9afe7b8225ce3607b599413dd60cc93c94e9 Mon Sep 17 00:00:00 2001 From: Mark Garcia Date: Wed, 13 Dec 2017 19:38:33 +0800 Subject: Upgrade assimp to v4.1.0 (#2364) * [assimp] Update to v4.1.0 and remove code patch which is fixed in new version * [assimp] Fix vcpkg_fixup_cmake_targets argument * [assimp] Fix formatting --- ports/assimp/CONTROL | 2 +- ports/assimp/const-compare-worditerator.patch | 15 --------------- ports/assimp/portfile.cmake | 7 +++---- 3 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 ports/assimp/const-compare-worditerator.patch diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index f6e6eaaff..b63cca6ed 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 4.0.1-3 +Version: 4.1.0 Description: The Open Asset import library Build-Depends: zlib diff --git a/ports/assimp/const-compare-worditerator.patch b/ports/assimp/const-compare-worditerator.patch deleted file mode 100644 index 9b892ed82..000000000 --- a/ports/assimp/const-compare-worditerator.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/code/X3DImporter.cpp b/code/X3DImporter.cpp -index 1117735..669f46f 100644 ---- a/code/X3DImporter.cpp -+++ b/code/X3DImporter.cpp -@@ -95,8 +95,8 @@ struct WordIterator: public std::iterator - end_ = other.end_; - return *this; - } -- bool operator==(WordIterator &other) const { return start_ == other.start_; } -- bool operator!=(WordIterator &other) const { return start_ != other.start_; } -+ bool operator==(const WordIterator &other) const { return start_ == other.start_; } -+ bool operator!=(const WordIterator &other) const { return start_ != other.start_; } - WordIterator &operator++() { - start_ += strcspn(start_, whitespace); - start_ += strspn(start_, whitespace); diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 583738e16..618ce160f 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -3,15 +3,14 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO assimp/assimp - REF v4.0.1 - SHA512 260b4c7e738f857d8364c4878ea4e789ca676180821943f6d9bff8f56e5f9377ea29660dca4e130c681a8aa12fc32f155adb1d78ca260ba242e68b8afa6cc1bb + REF v4.1.0 + SHA512 5f1292de873ae16c9921d1d44f2871474d74c0ddfd76cc928a7d9b3e03aa6eca4cc72af0513da20a86d09c55d48646e610fd4a4f2b05364f08ad09cf27cbc67a HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/const-compare-worditerator.patch" "${CMAKE_CURRENT_LIST_DIR}/dont-overwrite-prefix-path.patch" ) @@ -30,7 +29,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/assimp-4.0") +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/assimp-4.1") vcpkg_copy_pdbs() -- cgit v1.2.3 From e6b16165e7d69feab3f4841ab702e6072199b9d4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 13 Dec 2017 04:47:59 -0800 Subject: Revert "[vcpkg-upgrade] Accept list of packages to specifically upgrade." This reverts commit d88563cd095b9aaad81d57f1c0a254d7e17cf859. --- toolsrc/include/vcpkg/packagespec.h | 7 --- toolsrc/src/commands.upgrade.cpp | 108 ++++-------------------------------- toolsrc/src/vcpkg/base/checks.cpp | 9 +-- 3 files changed, 16 insertions(+), 108 deletions(-) diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index f1119e2f3..071487e1a 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -34,13 +34,6 @@ namespace vcpkg std::string to_string() const; - bool operator<(const PackageSpec& other) const - { - if (name() < other.name()) return true; - if (name() > other.name()) return false; - return triplet() < other.triplet(); - } - private: std::string m_name; Triplet m_triplet; diff --git a/toolsrc/src/commands.upgrade.cpp b/toolsrc/src/commands.upgrade.cpp index 2ce04faa9..7a3210042 100644 --- a/toolsrc/src/commands.upgrade.cpp +++ b/toolsrc/src/commands.upgrade.cpp @@ -1,10 +1,8 @@ #include "pch.h" -#include #include #include #include -#include #include #include #include @@ -26,121 +24,37 @@ namespace vcpkg::Commands::Upgrade const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("upgrade --no-dry-run"), 0, - SIZE_MAX, + 0, {INSTALL_SWITCHES, {}}, nullptr, }; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet&) { + // input sanitization const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const bool no_dry_run = Util::Sets::contains(options.switches, OPTION_NO_DRY_RUN); const KeepGoing keep_going = to_keep_going(Util::Sets::contains(options.switches, OPTION_KEEP_GOING)); + // create the plan StatusParagraphs status_db = database_load_check(paths); Dependencies::PathsPortFileProvider provider(paths); Dependencies::PackageGraph graph(provider, status_db); - // input sanitization - const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); - }); + auto outdated_packages = Update::find_outdated_packages(provider, status_db); + for (auto&& outdated_package : outdated_packages) + graph.upgrade(outdated_package.spec); - for (auto&& spec : specs) - { - Input::check_triplet(spec.triplet(), paths); - } - - if (specs.empty()) - { - // If no packages specified, upgrade all outdated packages. - auto outdated_packages = Update::find_outdated_packages(provider, status_db); - - if (outdated_packages.empty()) - { - System::println("All installed packages are up-to-date with the local portfiles."); - Checks::exit_success(VCPKG_LINE_INFO); - } + auto plan = graph.serialize(); - for (auto&& outdated_package : outdated_packages) - graph.upgrade(outdated_package.spec); - } - else + if (plan.empty()) { - std::vector not_installed; - std::vector no_portfile; - std::vector to_upgrade; - std::vector up_to_date; - - for (auto&& spec : specs) - { - auto it = status_db.find_installed(spec); - if (it == status_db.end()) - { - not_installed.push_back(spec); - } - - auto maybe_scf = provider.get_control_file(spec.name()); - if (auto p_scf = maybe_scf.get()) - { - if (it != status_db.end()) - { - if (p_scf->core_paragraph->version != (*it)->package.version) - { - to_upgrade.push_back(spec); - } - else - { - up_to_date.push_back(spec); - } - } - } - else - { - no_portfile.push_back(spec); - } - } - - Util::sort(not_installed); - Util::sort(no_portfile); - Util::sort(up_to_date); - Util::sort(to_upgrade); - - if (!up_to_date.empty()) - { - System::println(System::Color::success, "The following packages are up-to-date:"); - System::println(Strings::join( - "", up_to_date, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); - } - - if (!not_installed.empty()) - { - System::println(System::Color::error, "The following packages are not installed:"); - System::println(Strings::join( - "", not_installed, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); - } - - if (!no_portfile.empty()) - { - System::println(System::Color::error, "The following packages do not have a valid portfile:"); - System::println(Strings::join( - "", no_portfile, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); - } - - Checks::check_exit(VCPKG_LINE_INFO, not_installed.empty() && no_portfile.empty()); - - if (to_upgrade.empty()) Checks::exit_success(VCPKG_LINE_INFO); - - for (auto&& spec : to_upgrade) - graph.upgrade(spec); + System::println("All packages are up-to-date."); + Checks::exit_success(VCPKG_LINE_INFO); } - auto plan = graph.serialize(); - - Checks::check_exit(VCPKG_LINE_INFO, !plan.empty()); - Dependencies::print_plan(plan, true); if (!no_dry_run) diff --git a/toolsrc/src/vcpkg/base/checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp index 23f2cc630..ed28d6e2b 100644 --- a/toolsrc/src/vcpkg/base/checks.cpp +++ b/toolsrc/src/vcpkg/base/checks.cpp @@ -49,7 +49,8 @@ namespace vcpkg::Checks #else void register_console_ctrl_handler() {} #endif - void unreachable(const LineInfo& line_info) + + [[noreturn]] void unreachable(const LineInfo& line_info) { System::println(System::Color::error, "Error: Unreachable code was reached"); System::println(System::Color::error, line_info.to_string()); // Always print line_info here @@ -60,13 +61,13 @@ namespace vcpkg::Checks #endif } - void exit_with_code(const LineInfo& line_info, const int exit_code) + [[noreturn]] void exit_with_code(const LineInfo& line_info, const int exit_code) { Debug::println(System::Color::error, line_info.to_string()); cleanup_and_exit(exit_code); } - void exit_with_message(const LineInfo& line_info, const CStringView error_message) + [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView error_message) { System::println(System::Color::error, error_message); exit_fail(line_info); @@ -76,7 +77,7 @@ namespace vcpkg::Checks { if (!expression) { - exit_fail(line_info); + exit_with_message(line_info, ""); } } -- cgit v1.2.3 From 7a6ffdc75c6634e0df3c158e871426190511a096 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 13 Dec 2017 04:48:13 -0800 Subject: Revert "[vcpkg-upgrade] Initial commit of upgrade command." This reverts commit 803347a0c545687f6e6b8b3594b52d11435491b3. --- toolsrc/include/tests.utils.h | 16 +- toolsrc/include/vcpkg/commands.h | 6 - toolsrc/include/vcpkg/dependencies.h | 50 +--- toolsrc/include/vcpkg/paragraphs.h | 3 + toolsrc/include/vcpkg/update.h | 6 +- toolsrc/src/commands.upgrade.cpp | 79 ------ toolsrc/src/tests.plan.cpp | 150 +----------- toolsrc/src/tests.update.cpp | 34 +-- toolsrc/src/vcpkg/commands.ci.cpp | 2 +- toolsrc/src/vcpkg/commands.cpp | 3 +- toolsrc/src/vcpkg/commands.portsdiff.cpp | 7 +- toolsrc/src/vcpkg/dependencies.cpp | 391 +++++++++++------------------- toolsrc/src/vcpkg/help.cpp | 1 - toolsrc/src/vcpkg/install.cpp | 120 ++++++++- toolsrc/src/vcpkg/paragraphs.cpp | 12 + toolsrc/src/vcpkg/remove.cpp | 9 +- toolsrc/src/vcpkg/update.cpp | 40 ++- toolsrc/vcpkglib/vcpkglib.vcxproj | 1 - toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 3 - 19 files changed, 333 insertions(+), 600 deletions(-) delete mode 100644 toolsrc/src/commands.upgrade.cpp diff --git a/toolsrc/include/tests.utils.h b/toolsrc/include/tests.utils.h index 0c0add7ab..485b8c294 100644 --- a/toolsrc/include/tests.utils.h +++ b/toolsrc/include/tests.utils.h @@ -23,18 +23,4 @@ std::unique_ptr make_status_pgh(const char* name, 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()); -} + const char* triplet = "x86-windows"); \ No newline at end of file diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index b852a973e..74fd80c03 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -39,12 +39,6 @@ namespace vcpkg::Commands void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } - namespace Upgrade - { - extern const CommandStructure COMMAND_STRUCTURE; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); - } - namespace Edit { extern const CommandStructure COMMAND_STRUCTURE; diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index f1249dc88..5411ee166 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -92,11 +92,11 @@ namespace vcpkg::Dependencies struct AnyAction { - AnyAction(InstallPlanAction&& iplan) : install_action(std::move(iplan)) {} - AnyAction(RemovePlanAction&& rplan) : remove_action(std::move(rplan)) {} + AnyAction(InstallPlanAction&& iplan) : install_plan(std::move(iplan)) {} + AnyAction(RemovePlanAction&& rplan) : remove_plan(std::move(rplan)) {} - Optional install_action; - Optional remove_action; + Optional install_plan; + Optional remove_plan; const PackageSpec& spec() const; }; @@ -123,44 +123,22 @@ namespace vcpkg::Dependencies struct PortFileProvider { - virtual Optional get_control_file(const std::string& src_name) const = 0; + virtual const SourceControlFile& get_control_file(const std::string& spec) const = 0; }; - struct MapPortFileProvider : Util::ResourceBase, PortFileProvider + struct MapPortFile : Util::ResourceBase, PortFileProvider { - explicit MapPortFileProvider(const std::unordered_map& map); - Optional get_control_file(const std::string& src_name) const override; - - private: const std::unordered_map& ports; + explicit MapPortFile(const std::unordered_map& map); + const SourceControlFile& get_control_file(const std::string& spec) const override; }; - struct PathsPortFileProvider : Util::ResourceBase, PortFileProvider + struct PathsPortFile : Util::ResourceBase, PortFileProvider { - explicit PathsPortFileProvider(const VcpkgPaths& paths); - Optional get_control_file(const std::string& src_name) const override; - - private: const VcpkgPaths& ports; mutable std::unordered_map cache; - }; - - struct ClusterGraph; - struct GraphPlan; - - struct PackageGraph - { - PackageGraph(const PortFileProvider& provider, const StatusParagraphs& status_db); - ~PackageGraph(); - - void install(const FeatureSpec& spec); - void upgrade(const PackageSpec& spec); - - std::vector serialize() const; - - private: - std::unique_ptr m_graph_plan; - std::unique_ptr m_graph; + explicit PathsPortFile(const VcpkgPaths& paths); + const SourceControlFile& get_control_file(const std::string& spec) const override; }; std::vector create_install_plan(const PortFileProvider& port_file_provider, @@ -177,10 +155,4 @@ namespace vcpkg::Dependencies std::vector create_feature_install_plan(const std::unordered_map& map, const std::vector& specs, const StatusParagraphs& status_db); - - std::vector create_feature_install_plan(const PortFileProvider& port_file_provider, - const std::vector& specs, - const StatusParagraphs& status_db); - - void print_plan(const std::vector& action_plan, const bool is_recursive = true); } diff --git a/toolsrc/include/vcpkg/paragraphs.h b/toolsrc/include/vcpkg/paragraphs.h index e2c7f2d99..c8dbea646 100644 --- a/toolsrc/include/vcpkg/paragraphs.h +++ b/toolsrc/include/vcpkg/paragraphs.h @@ -32,4 +32,7 @@ namespace vcpkg::Paragraphs std::vector> load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); + + std::map load_all_port_names_and_versions(const Files::Filesystem& fs, + const fs::path& ports_dir); } diff --git a/toolsrc/include/vcpkg/update.h b/toolsrc/include/vcpkg/update.h index b85f7b2b3..7587b9eb2 100644 --- a/toolsrc/include/vcpkg/update.h +++ b/toolsrc/include/vcpkg/update.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include #include @@ -17,8 +16,7 @@ namespace vcpkg::Update VersionDiff version_diff; }; - std::vector find_outdated_packages(const Dependencies::PortFileProvider& provider, + std::vector find_outdated_packages(const std::map& src_names_to_versions, const StatusParagraphs& status_db); - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); -} +} \ No newline at end of file diff --git a/toolsrc/src/commands.upgrade.cpp b/toolsrc/src/commands.upgrade.cpp deleted file mode 100644 index 7a3210042..000000000 --- a/toolsrc/src/commands.upgrade.cpp +++ /dev/null @@ -1,79 +0,0 @@ -#include "pch.h" - -#include -#include -#include -#include -#include -#include -#include - -namespace vcpkg::Commands::Upgrade -{ - using Install::KeepGoing; - using Install::to_keep_going; - - static const std::string OPTION_NO_DRY_RUN = "--no-dry-run"; - static const std::string OPTION_KEEP_GOING = "--keep-going"; - - static const std::array INSTALL_SWITCHES = {{ - {OPTION_NO_DRY_RUN, "Actually upgrade"}, - {OPTION_KEEP_GOING, "Continue installing packages on failure"}, - }}; - - const CommandStructure COMMAND_STRUCTURE = { - Help::create_example_string("upgrade --no-dry-run"), - 0, - 0, - {INSTALL_SWITCHES, {}}, - nullptr, - }; - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet&) - { - // input sanitization - const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); - - const bool no_dry_run = Util::Sets::contains(options.switches, OPTION_NO_DRY_RUN); - const KeepGoing keep_going = to_keep_going(Util::Sets::contains(options.switches, OPTION_KEEP_GOING)); - - // create the plan - StatusParagraphs status_db = database_load_check(paths); - - Dependencies::PathsPortFileProvider provider(paths); - Dependencies::PackageGraph graph(provider, status_db); - - auto outdated_packages = Update::find_outdated_packages(provider, status_db); - for (auto&& outdated_package : outdated_packages) - graph.upgrade(outdated_package.spec); - - auto plan = graph.serialize(); - - if (plan.empty()) - { - System::println("All packages are up-to-date."); - Checks::exit_success(VCPKG_LINE_INFO); - } - - Dependencies::print_plan(plan, true); - - if (!no_dry_run) - { - System::println(System::Color::warning, - "If you are sure you want to rebuild the above packages, run this command with the " - "--no-dry-run option."); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - const Install::InstallSummary summary = Install::perform(plan, keep_going, paths, status_db); - - System::println("\nTotal elapsed time: %s\n", summary.total_elapsed_time); - - if (keep_going == KeepGoing::YES) - { - summary.print(); - } - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 781588c91..122a4ffef 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -36,7 +36,7 @@ namespace UnitTest1 std::vector vec, const Triplet& triplet = Triplet::X86_WINDOWS) { - const auto& plan = install_action->install_action.value_or_exit(VCPKG_LINE_INFO); + const auto& plan = install_action->install_plan.value_or_exit(VCPKG_LINE_INFO); const auto& feature_list = plan.feature_list; Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); @@ -61,7 +61,7 @@ namespace UnitTest1 std::string pkg_name, const Triplet& triplet = Triplet::X86_WINDOWS) { - const auto& plan = remove_action->remove_action.value_or_exit(VCPKG_LINE_INFO); + const auto& plan = remove_action->remove_plan.value_or_exit(VCPKG_LINE_INFO); Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); Assert::AreEqual(pkg_name.c_str(), plan.spec.name().c_str()); } @@ -98,7 +98,7 @@ namespace UnitTest1 auto spec_b = spec_map.emplace("b", "c"); auto spec_c = spec_map.emplace("c"); - Dependencies::MapPortFileProvider map_port(spec_map.map); + Dependencies::MapPortFile map_port(spec_map.map); auto install_plan = Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); @@ -122,7 +122,7 @@ namespace UnitTest1 auto spec_g = spec_map.emplace("g"); auto spec_h = spec_map.emplace("h"); - Dependencies::MapPortFileProvider map_port(spec_map.map); + Dependencies::MapPortFile map_port(spec_map.map); auto install_plan = Dependencies::create_install_plan( map_port, {spec_a, spec_b, spec_c}, StatusParagraphs(std::move(status_paragraphs))); @@ -162,7 +162,7 @@ namespace UnitTest1 StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(1), install_plan.size()); - auto p = install_plan[0].install_action.get(); + auto p = install_plan[0].install_plan.get(); Assert::IsNotNull(p); Assert::AreEqual("a", p->spec.name().c_str()); Assert::AreEqual(Dependencies::InstallPlanType::ALREADY_INSTALLED, p->plan_type); @@ -183,13 +183,13 @@ namespace UnitTest1 StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(2), install_plan.size()); - auto p = install_plan[0].install_action.get(); + auto p = install_plan[0].install_plan.get(); Assert::IsNotNull(p); Assert::AreEqual("b", p->spec.name().c_str()); Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p->plan_type); Assert::AreEqual(Dependencies::RequestType::AUTO_SELECTED, p->request_type); - auto p2 = install_plan[1].install_action.get(); + auto p2 = install_plan[1].install_plan.get(); Assert::IsNotNull(p2); Assert::AreEqual("a", p2->spec.name().c_str()); Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p2->plan_type); @@ -215,7 +215,7 @@ namespace UnitTest1 auto spec_j = spec_map.emplace("j", "k"); auto spec_k = spec_map.emplace("k"); - Dependencies::MapPortFileProvider map_port(spec_map.map); + Dependencies::MapPortFile map_port(spec_map.map); auto install_plan = Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); @@ -521,138 +521,4 @@ namespace UnitTest1 Assert::AreEqual("expat", remove_plan[2].spec.name().c_str()); } }; - - class UpgradePlanTests : public TestClass - { - TEST_METHOD(basic_upgrade_scheme) - { - std::vector> pghs; - pghs.push_back(make_status_pgh("a")); - StatusParagraphs status_db(std::move(pghs)); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = spec_map.emplace("a"); - - Dependencies::MapPortFileProvider provider(spec_map.map); - Dependencies::PackageGraph graph(provider, status_db); - - graph.upgrade(spec_a); - - auto plan = graph.serialize(); - - Assert::AreEqual(size_t(2), plan.size()); - Assert::AreEqual("a", plan[0].spec().name().c_str()); - Assert::IsTrue(plan[0].remove_action.has_value()); - Assert::AreEqual("a", plan[1].spec().name().c_str()); - Assert::IsTrue(plan[1].install_action.has_value()); - } - - TEST_METHOD(basic_upgrade_scheme_with_recurse) - { - std::vector> pghs; - pghs.push_back(make_status_pgh("a")); - pghs.push_back(make_status_pgh("b", "a")); - StatusParagraphs status_db(std::move(pghs)); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = spec_map.emplace("a"); - spec_map.emplace("b", "a"); - - Dependencies::MapPortFileProvider provider(spec_map.map); - Dependencies::PackageGraph graph(provider, status_db); - - graph.upgrade(spec_a); - - auto plan = graph.serialize(); - - Assert::AreEqual(size_t(4), plan.size()); - Assert::AreEqual("b", plan[0].spec().name().c_str()); - Assert::IsTrue(plan[0].remove_action.has_value()); - - Assert::AreEqual("a", plan[1].spec().name().c_str()); - Assert::IsTrue(plan[1].remove_action.has_value()); - - Assert::AreEqual("a", plan[2].spec().name().c_str()); - Assert::IsTrue(plan[2].install_action.has_value()); - - Assert::AreEqual("b", plan[3].spec().name().c_str()); - Assert::IsTrue(plan[3].install_action.has_value()); - } - - TEST_METHOD(basic_upgrade_scheme_with_bystander) - { - std::vector> pghs; - pghs.push_back(make_status_pgh("a")); - pghs.push_back(make_status_pgh("b")); - StatusParagraphs status_db(std::move(pghs)); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = spec_map.emplace("a"); - spec_map.emplace("b", "a"); - - Dependencies::MapPortFileProvider provider(spec_map.map); - Dependencies::PackageGraph graph(provider, status_db); - - graph.upgrade(spec_a); - - auto plan = graph.serialize(); - - Assert::AreEqual(size_t(2), plan.size()); - Assert::AreEqual("a", plan[0].spec().name().c_str()); - Assert::IsTrue(plan[0].remove_action.has_value()); - Assert::AreEqual("a", plan[1].spec().name().c_str()); - Assert::IsTrue(plan[1].install_action.has_value()); - } - - TEST_METHOD(basic_upgrade_scheme_with_new_dep) - { - std::vector> pghs; - pghs.push_back(make_status_pgh("a")); - StatusParagraphs status_db(std::move(pghs)); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = spec_map.emplace("a", "b"); - spec_map.emplace("b"); - - Dependencies::MapPortFileProvider provider(spec_map.map); - Dependencies::PackageGraph graph(provider, status_db); - - graph.upgrade(spec_a); - - auto plan = graph.serialize(); - - Assert::AreEqual(size_t(3), plan.size()); - Assert::AreEqual("a", plan[0].spec().name().c_str()); - Assert::IsTrue(plan[0].remove_action.has_value()); - Assert::AreEqual("b", plan[1].spec().name().c_str()); - Assert::IsTrue(plan[1].install_action.has_value()); - Assert::AreEqual("a", plan[2].spec().name().c_str()); - Assert::IsTrue(plan[2].install_action.has_value()); - } - - TEST_METHOD(basic_upgrade_scheme_with_features) - { - std::vector> pghs; - pghs.push_back(make_status_pgh("a")); - pghs.push_back(make_status_feature_pgh("a", "a1")); - StatusParagraphs status_db(std::move(pghs)); - - PackageSpecMap spec_map(Triplet::X86_WINDOWS); - auto spec_a = spec_map.emplace("a", "", {{"a1", ""}}); - - Dependencies::MapPortFileProvider provider(spec_map.map); - Dependencies::PackageGraph graph(provider, status_db); - - graph.upgrade(spec_a); - - auto plan = graph.serialize(); - - Assert::AreEqual(size_t(2), plan.size()); - - Assert::AreEqual("a", plan[0].spec().name().c_str()); - Assert::IsTrue(plan[0].remove_action.has_value()); - - features_check(&plan[1], "a", {"core", "a1"}); - } - }; } diff --git a/toolsrc/src/tests.update.cpp b/toolsrc/src/tests.update.cpp index b6e487c17..06ae797f4 100644 --- a/toolsrc/src/tests.update.cpp +++ b/toolsrc/src/tests.update.cpp @@ -9,8 +9,6 @@ using namespace vcpkg::Update; namespace UnitTest1 { - using Pgh = std::vector>; - class UpdateTests : public TestClass { TEST_METHOD(find_outdated_packages_basic) @@ -21,12 +19,10 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::unordered_map map; - auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "0"}}})); - map.emplace("a", std::move(*scf)); - Dependencies::MapPortFileProvider provider(map); + std::map port_versions; + port_versions["a"] = VersionT("0"); - auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), + auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), &OutdatedPackage::compare_by_name); Assert::AreEqual(size_t(1), pkgs.size()); @@ -45,12 +41,10 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::unordered_map map; - auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "0"}}})); - map.emplace("a", std::move(*scf)); - Dependencies::MapPortFileProvider provider(map); + std::map port_versions; + port_versions["a"] = VersionT("0"); - auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), + auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), &OutdatedPackage::compare_by_name); Assert::AreEqual(size_t(1), pkgs.size()); @@ -71,12 +65,10 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::unordered_map map; - auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "0"}}})); - map.emplace("a", std::move(*scf)); - Dependencies::MapPortFileProvider provider(map); + std::map port_versions; + port_versions["a"] = VersionT("0"); - auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), + auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), &OutdatedPackage::compare_by_name); Assert::AreEqual(size_t(1), pkgs.size()); @@ -92,12 +84,10 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::unordered_map map; - auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "2"}}})); - map.emplace("a", std::move(*scf)); - Dependencies::MapPortFileProvider provider(map); + std::map port_versions; + port_versions["a"] = VersionT("2"); - auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), + auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), &OutdatedPackage::compare_by_name); Assert::AreEqual(size_t(0), pkgs.size()); diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 1a2f9b47f..f2e984bf8 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -27,7 +27,7 @@ namespace vcpkg::Commands::CI const std::vector specs = PackageSpec::to_package_specs(ports, triplet); StatusParagraphs status_db = database_load_check(paths); - const auto& paths_port_file = Dependencies::PathsPortFileProvider(paths); + const auto& paths_port_file = Dependencies::PathsPortFile(paths); std::vector install_plan = Dependencies::create_install_plan(paths_port_file, specs, status_db); diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index ccf6fa729..15b10c7ea 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -13,10 +13,9 @@ namespace vcpkg::Commands Span> get_available_commands_type_a() { static std::vector> t = { - {"install", &Install::perform_and_exit}, + PackageNameAndFunction{"install", &Install::perform_and_exit}, {"ci", &CI::perform_and_exit}, {"remove", &Remove::perform_and_exit}, - {"upgrade", &Upgrade::perform_and_exit}, {"build", &Build::Command::perform_and_exit}, {"env", &Env::perform_and_exit}, {"build-external", &BuildExternal::perform_and_exit}, diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index dba04ce5b..6752715e4 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -98,11 +98,8 @@ namespace vcpkg::Commands::PortsDiff ".vcpkg-root", git_exe.u8string()); System::cmd_execute_clean(cmd); - const auto all_ports = - Paragraphs::load_all_ports(paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string); - std::map names_and_versions; - for (auto&& port : all_ports) - names_and_versions.emplace(port->core_paragraph->name, port->core_paragraph->version); + const std::map names_and_versions = Paragraphs::load_all_port_names_and_versions( + paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string); fs.remove_all(temp_checkout_path, ec); return names_and_versions; } diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 5148a10f5..0a1f79834 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -65,19 +65,26 @@ namespace vcpkg::Dependencies struct ClusterGraph : Util::MoveOnlyBase { - explicit ClusterGraph(const PortFileProvider& provider) : m_provider(provider) {} + explicit ClusterGraph(std::unordered_map&& ports) + : m_ports(std::move(ports)) + { + } Cluster& get(const PackageSpec& spec) { auto it = m_graph.find(spec); if (it == m_graph.end()) { - // Load on-demand from m_provider - auto maybe_scf = m_provider.get_control_file(spec.name()); - auto& clust = m_graph[spec]; - clust.spec = spec; - if (auto p_scf = maybe_scf.get()) cluster_from_scf(*p_scf, clust); - return clust; + // Load on-demand from m_ports + auto it_ports = m_ports.find(spec.name()); + if (it_ports != m_ports.end()) + { + auto& clust = m_graph[spec]; + clust.spec = spec; + cluster_from_scf(*it_ports->second, clust); + return clust; + } + return m_graph[spec]; } return it->second; } @@ -100,7 +107,7 @@ namespace vcpkg::Dependencies } std::unordered_map m_graph; - const PortFileProvider& m_provider; + std::unordered_map m_ports; }; std::vector AnyParagraph::dependencies(const Triplet& triplet) const @@ -219,12 +226,12 @@ namespace vcpkg::Dependencies const PackageSpec& AnyAction::spec() const { - if (const auto p = install_action.get()) + if (const auto p = install_plan.get()) { return p->spec; } - if (const auto p = remove_action.get()) + if (const auto p = remove_plan.get()) { return p->spec; } @@ -262,20 +269,21 @@ namespace vcpkg::Dependencies return left->spec.name() < right->spec.name(); } - MapPortFileProvider::MapPortFileProvider(const std::unordered_map& map) : ports(map) - { - } + MapPortFile::MapPortFile(const std::unordered_map& map) : ports(map) {} - Optional MapPortFileProvider::get_control_file(const std::string& spec) const + const SourceControlFile& MapPortFile::get_control_file(const std::string& spec) const { auto scf = ports.find(spec); - if (scf == ports.end()) return nullopt; + if (scf == ports.end()) + { + Checks::exit_fail(VCPKG_LINE_INFO); + } return scf->second; } - PathsPortFileProvider::PathsPortFileProvider(const VcpkgPaths& paths) : ports(paths) {} + PathsPortFile::PathsPortFile(const VcpkgPaths& paths) : ports(paths) {} - Optional PathsPortFileProvider::get_control_file(const std::string& spec) const + const SourceControlFile& PathsPortFile::get_control_file(const std::string& spec) const { auto cache_it = cache.find(spec); if (cache_it != cache.end()) @@ -290,34 +298,56 @@ namespace vcpkg::Dependencies auto it = cache.emplace(spec, std::move(*scf->get())); return it.first->second; } - return nullopt; + print_error_message(source_control_file.error()); + Checks::exit_fail(VCPKG_LINE_INFO); } std::vector create_install_plan(const PortFileProvider& port_file_provider, const std::vector& specs, const StatusParagraphs& status_db) { - auto fspecs = Util::fmap(specs, [](const PackageSpec& spec) { return FeatureSpec(spec, ""); }); - auto plan = create_feature_install_plan(port_file_provider, fspecs, status_db); + struct InstallAdjacencyProvider final : Graphs::AdjacencyProvider + { + const PortFileProvider& port_file_provider; + const StatusParagraphs& status_db; + const std::unordered_set& specs_as_set; - std::vector ret; - ret.reserve(plan.size()); + InstallAdjacencyProvider(const PortFileProvider& port_file_provider, + const StatusParagraphs& s, + const std::unordered_set& specs_as_set) + : port_file_provider(port_file_provider), status_db(s), specs_as_set(specs_as_set) + { + } - for (auto&& action : plan) - { - if (auto p_install = action.install_action.get()) + std::vector adjacency_list(const InstallPlanAction& plan) const override { - ret.push_back(std::move(*p_install)); + if (plan.any_paragraph.status_paragraph.get()) return std::vector{}; + return plan.any_paragraph.dependencies(plan.spec.triplet()); } - else + + InstallPlanAction load_vertex_data(const PackageSpec& spec) const override { - Checks::exit_with_message(VCPKG_LINE_INFO, - "The installation plan requires feature packages support. Please re-run the " - "command with --featurepackages."); + const RequestType request_type = specs_as_set.find(spec) != specs_as_set.end() + ? RequestType::USER_REQUESTED + : RequestType::AUTO_SELECTED; + auto it = status_db.find_installed(spec); + if (it != status_db.end()) return InstallPlanAction{spec, {*it->get(), nullopt, nullopt}, request_type}; + return InstallPlanAction{ + spec, + {nullopt, nullopt, *port_file_provider.get_control_file(spec.name()).core_paragraph}, + request_type}; } - } + }; - return ret; + const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); + std::vector toposort = + Graphs::topological_sort(specs, InstallAdjacencyProvider{port_file_provider, status_db, specs_as_set}); + Util::erase_remove_if(toposort, [](const InstallPlanAction& plan) { + return plan.request_type == RequestType::AUTO_SELECTED && + plan.plan_type == InstallPlanType::ALREADY_INSTALLED; + }); + + return toposort; } std::vector create_remove_plan(const std::vector& specs, @@ -431,12 +461,11 @@ namespace vcpkg::Dependencies SUCCESS, }; - static MarkPlusResult mark_plus(const std::string& feature, - Cluster& cluster, - ClusterGraph& pkg_to_cluster, - GraphPlan& graph_plan); - - static void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); + MarkPlusResult mark_plus(const std::string& feature, + Cluster& cluster, + ClusterGraph& pkg_to_cluster, + GraphPlan& graph_plan); + void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); MarkPlusResult mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) { @@ -528,80 +557,110 @@ namespace vcpkg::Dependencies } } - std::vector create_feature_install_plan(const PortFileProvider& provider, - const std::vector& specs, - const StatusParagraphs& status_db) + static ClusterGraph create_feature_install_graph(const std::unordered_map& map, + const StatusParagraphs& status_db) { - PackageGraph pgraph(provider, status_db); - for (auto&& spec : specs) - pgraph.install(spec); + std::unordered_map ptr_map; + for (auto&& p : map) + ptr_map.emplace(p.first, &p.second); + ClusterGraph graph(std::move(ptr_map)); + + auto installed_ports = get_installed_ports(status_db); - return pgraph.serialize(); + for (auto&& status_paragraph : installed_ports) + { + Cluster& cluster = graph.get(status_paragraph->package.spec); + + cluster.transient_uninstalled = false; + + cluster.status_paragraphs.emplace_back(status_paragraph); + + auto& status_paragraph_feature = status_paragraph->package.feature; + // In this case, empty string indicates the "core" paragraph for a package. + if (status_paragraph_feature.empty()) + { + cluster.original_features.insert("core"); + } + else + { + cluster.original_features.insert(status_paragraph_feature); + } + } + + for (auto&& status_paragraph : installed_ports) + { + auto& spec = status_paragraph->package.spec; + auto& status_paragraph_feature = status_paragraph->package.feature; + auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends, + status_paragraph->package.spec.triplet()); + + for (auto&& dependency : reverse_edges) + { + auto& dep_cluster = graph.get(dependency.spec()); + + auto depends_name = dependency.feature(); + if (depends_name.empty()) depends_name = "core"; + + auto& target_node = dep_cluster.edges[depends_name]; + target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); + } + } + return graph; } std::vector create_feature_install_plan(const std::unordered_map& map, const std::vector& specs, const StatusParagraphs& status_db) { - MapPortFileProvider provider(map); - return create_feature_install_plan(provider, specs, status_db); - } + ClusterGraph graph = create_feature_install_graph(map, status_db); - void PackageGraph::install(const FeatureSpec& spec) - { - Cluster& spec_cluster = m_graph->get(spec.spec()); - spec_cluster.request_type = RequestType::USER_REQUESTED; - if (spec.feature() == "*") + GraphPlan graph_plan; + for (auto&& spec : specs) { - if (auto p_scf = spec_cluster.source_control_file.value_or(nullptr)) + Cluster& spec_cluster = graph.get(spec.spec()); + spec_cluster.request_type = RequestType::USER_REQUESTED; + if (spec.feature() == "*") { - for (auto&& feature : p_scf->feature_paragraphs) + if (auto p_scf = spec_cluster.source_control_file.value_or(nullptr)) { - auto res = mark_plus(feature->name, spec_cluster, *m_graph, *m_graph_plan); + for (auto&& feature : p_scf->feature_paragraphs) + { + auto res = mark_plus(feature->name, spec_cluster, graph, graph_plan); + + Checks::check_exit(VCPKG_LINE_INFO, + res == MarkPlusResult::SUCCESS, + "Error: Unable to locate feature %s", + spec); + } + + auto res = mark_plus("core", spec_cluster, graph, graph_plan); Checks::check_exit( VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); } - - auto res = mark_plus("core", spec_cluster, *m_graph, *m_graph_plan); - - Checks::check_exit( - VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); + else + { + Checks::exit_with_message( + VCPKG_LINE_INFO, "Error: Unable to handle '*' because can't find CONTROL for %s", spec.spec()); + } } else { - Checks::exit_with_message( - VCPKG_LINE_INFO, "Error: Unable to handle '*' because can't find CONTROL for %s", spec.spec()); + auto res = mark_plus(spec.feature(), spec_cluster, graph, graph_plan); + + Checks::check_exit( + VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); } - } - else - { - auto res = mark_plus(spec.feature(), spec_cluster, *m_graph, *m_graph_plan); - Checks::check_exit( - VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); + graph_plan.install_graph.add_vertex(ClusterPtr{&spec_cluster}); } - m_graph_plan->install_graph.add_vertex(ClusterPtr{&spec_cluster}); - } - - void PackageGraph::upgrade(const PackageSpec& spec) - { - Cluster& spec_cluster = m_graph->get(spec); - spec_cluster.request_type = RequestType::USER_REQUESTED; - - mark_minus(spec_cluster, *m_graph, *m_graph_plan); - } - - std::vector PackageGraph::serialize() const - { - Graphs::GraphAdjacencyProvider adjacency_remove_graph(m_graph_plan->remove_graph.adjacency_list()); - auto remove_vertex_list = m_graph_plan->remove_graph.vertex_list(); + Graphs::GraphAdjacencyProvider adjacency_remove_graph(graph_plan.remove_graph.adjacency_list()); + auto remove_vertex_list = graph_plan.remove_graph.vertex_list(); auto remove_toposort = Graphs::topological_sort(remove_vertex_list, adjacency_remove_graph); - Graphs::GraphAdjacencyProvider adjacency_install_graph( - m_graph_plan->install_graph.adjacency_list()); - auto insert_vertex_list = m_graph_plan->install_graph.vertex_list(); + Graphs::GraphAdjacencyProvider adjacency_install_graph(graph_plan.install_graph.adjacency_list()); + auto insert_vertex_list = graph_plan.install_graph.vertex_list(); auto insert_toposort = Graphs::topological_sort(insert_vertex_list, adjacency_install_graph); std::vector plan; @@ -646,162 +705,4 @@ namespace vcpkg::Dependencies return plan; } - - static std::unique_ptr create_feature_install_graph(const PortFileProvider& map, - const StatusParagraphs& status_db) - { - std::unique_ptr graph = std::make_unique(map); - - auto installed_ports = get_installed_ports(status_db); - - for (auto&& status_paragraph : installed_ports) - { - Cluster& cluster = graph->get(status_paragraph->package.spec); - - cluster.transient_uninstalled = false; - - cluster.status_paragraphs.emplace_back(status_paragraph); - - auto& status_paragraph_feature = status_paragraph->package.feature; - // In this case, empty string indicates the "core" paragraph for a package. - if (status_paragraph_feature.empty()) - { - cluster.original_features.insert("core"); - } - else - { - cluster.original_features.insert(status_paragraph_feature); - } - } - - // Populate the graph with "remove edges", which are the reverse of the Build-Depends edges. - for (auto&& status_paragraph : installed_ports) - { - auto& spec = status_paragraph->package.spec; - auto& status_paragraph_feature = status_paragraph->package.feature; - auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends, - status_paragraph->package.spec.triplet()); - - for (auto&& dependency : reverse_edges) - { - auto& dep_cluster = graph->get(dependency.spec()); - - auto depends_name = dependency.feature(); - if (depends_name.empty()) depends_name = "core"; - - auto& target_node = dep_cluster.edges[depends_name]; - target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); - } - } - return graph; - } - - PackageGraph::PackageGraph(const PortFileProvider& provider, const StatusParagraphs& status_db) - : m_graph(create_feature_install_graph(provider, status_db)), m_graph_plan(std::make_unique()) - { - } - - PackageGraph::~PackageGraph() {} - - void print_plan(const std::vector& action_plan, const bool is_recursive) - { - std::vector remove_plans; - std::vector rebuilt_plans; - std::vector only_install_plans; - std::vector new_plans; - std::vector already_installed_plans; - std::vector excluded; - - const bool has_non_user_requested_packages = Util::find_if(action_plan, [](const AnyAction& package) -> bool { - if (auto iplan = package.install_action.get()) - return iplan->request_type != RequestType::USER_REQUESTED; - else - return false; - }) != action_plan.cend(); - - for (auto&& action : action_plan) - { - if (auto install_action = action.install_action.get()) - { - // remove plans are guaranteed to come before install plans, so we know the plan will be contained if at - // all. - auto it = Util::find_if( - remove_plans, [&](const RemovePlanAction* plan) { return plan->spec == install_action->spec; }); - if (it != remove_plans.end()) - { - rebuilt_plans.emplace_back(install_action); - } - else - { - switch (install_action->plan_type) - { - case InstallPlanType::INSTALL: only_install_plans.emplace_back(install_action); break; - case InstallPlanType::ALREADY_INSTALLED: - if (install_action->request_type == RequestType::USER_REQUESTED) - already_installed_plans.emplace_back(install_action); - break; - case InstallPlanType::BUILD_AND_INSTALL: new_plans.emplace_back(install_action); break; - case InstallPlanType::EXCLUDED: excluded.emplace_back(install_action); break; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - } - else if (auto remove_action = action.remove_action.get()) - { - remove_plans.emplace_back(remove_action); - } - } - - std::sort(remove_plans.begin(), remove_plans.end(), &RemovePlanAction::compare_by_name); - std::sort(rebuilt_plans.begin(), rebuilt_plans.end(), &InstallPlanAction::compare_by_name); - std::sort(only_install_plans.begin(), only_install_plans.end(), &InstallPlanAction::compare_by_name); - std::sort(new_plans.begin(), new_plans.end(), &InstallPlanAction::compare_by_name); - 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) { - return to_output_string(p->request_type, p->displayname(), p->build_options); - }); - }; - - if (excluded.size() > 0) - { - System::println("The following packages are excluded:\n%s", actions_to_output_string(excluded)); - } - - if (already_installed_plans.size() > 0) - { - System::println("The following packages are already installed:\n%s", - actions_to_output_string(already_installed_plans)); - } - - if (rebuilt_plans.size() > 0) - { - System::println("The following packages will be rebuilt:\n%s", actions_to_output_string(rebuilt_plans)); - } - - if (new_plans.size() > 0) - { - System::println("The following packages will be built and installed:\n%s", - actions_to_output_string(new_plans)); - } - - if (only_install_plans.size() > 0) - { - System::println("The following packages will be directly installed:\n%s", - actions_to_output_string(only_install_plans)); - } - - if (has_non_user_requested_packages) - System::println("Additional packages (*) will be modified to complete this operation."); - - if (remove_plans.size() > 0 && !is_recursive) - { - System::println(System::Color::warning, - "If you are sure you want to rebuild the above packages, run the command with the " - "--recurse option"); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } } diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index b7d355742..c83f0277b 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -85,7 +85,6 @@ namespace vcpkg::Help " vcpkg remove --outdated Uninstall all out-of-date packages\n" " vcpkg list List installed packages\n" " vcpkg update Display list of packages for updating\n" - " vcpkg upgrade Rebuild all outdated packages\n" " vcpkg hash [alg] Hash a file by specific algorithm, default SHA512\n" " vcpkg help topics Display the list of help topics\n" " vcpkg help Display help for a specific topic\n" diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 08cfc2e73..76dc7a527 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -348,6 +348,108 @@ namespace vcpkg::Install Checks::unreachable(VCPKG_LINE_INFO); } + static void print_plan(const std::vector& action_plan, const bool is_recursive) + { + std::vector remove_plans; + std::vector rebuilt_plans; + std::vector only_install_plans; + std::vector new_plans; + std::vector already_installed_plans; + std::vector excluded; + + const bool has_non_user_requested_packages = Util::find_if(action_plan, [](const AnyAction& package) -> bool { + if (auto iplan = package.install_plan.get()) + return iplan->request_type != RequestType::USER_REQUESTED; + else + return false; + }) != action_plan.cend(); + + for (auto&& action : action_plan) + { + if (auto install_action = action.install_plan.get()) + { + // remove plans are guaranteed to come before install plans, so we know the plan will be contained if at + // all. + auto it = Util::find_if( + remove_plans, [&](const RemovePlanAction* plan) { return plan->spec == install_action->spec; }); + if (it != remove_plans.end()) + { + rebuilt_plans.emplace_back(install_action); + } + else + { + switch (install_action->plan_type) + { + case InstallPlanType::INSTALL: only_install_plans.emplace_back(install_action); break; + case InstallPlanType::ALREADY_INSTALLED: + if (install_action->request_type == RequestType::USER_REQUESTED) + already_installed_plans.emplace_back(install_action); + break; + case InstallPlanType::BUILD_AND_INSTALL: new_plans.emplace_back(install_action); break; + case InstallPlanType::EXCLUDED: excluded.emplace_back(install_action); break; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + } + else if (auto remove_action = action.remove_plan.get()) + { + remove_plans.emplace_back(remove_action); + } + } + + std::sort(remove_plans.begin(), remove_plans.end(), &RemovePlanAction::compare_by_name); + std::sort(rebuilt_plans.begin(), rebuilt_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(only_install_plans.begin(), only_install_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(new_plans.begin(), new_plans.end(), &InstallPlanAction::compare_by_name); + 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) { + return to_output_string(p->request_type, p->displayname(), p->build_options); + }); + }; + + if (excluded.size() > 0) + { + System::println("The following packages are excluded:\n%s", actions_to_output_string(excluded)); + } + + if (already_installed_plans.size() > 0) + { + System::println("The following packages are already installed:\n%s", + actions_to_output_string(already_installed_plans)); + } + + if (rebuilt_plans.size() > 0) + { + System::println("The following packages will be rebuilt:\n%s", actions_to_output_string(rebuilt_plans)); + } + + if (new_plans.size() > 0) + { + System::println("The following packages will be built and installed:\n%s", + actions_to_output_string(new_plans)); + } + + if (only_install_plans.size() > 0) + { + System::println("The following packages will be directly installed:\n%s", + actions_to_output_string(only_install_plans)); + } + + if (has_non_user_requested_packages) + System::println("Additional packages (*) will be installed to complete this operation."); + + if (remove_plans.size() > 0 && !is_recursive) + { + System::println(System::Color::warning, + "If you are sure you want to rebuild the above packages, run the command with the " + "--recurse option"); + Checks::exit_fail(VCPKG_LINE_INFO); + } + } + void InstallSummary::print() const { System::println("RESULTS"); @@ -397,7 +499,7 @@ namespace vcpkg::Install results.emplace_back(spec, &action); - if (const auto install_action = action.install_action.get()) + if (const auto install_action = action.install_plan.get()) { auto result = perform_install_plan_action(paths, *install_action, status_db); @@ -409,7 +511,7 @@ namespace vcpkg::Install results.back().build_result = std::move(result); } - else if (const auto remove_action = action.remove_action.get()) + else if (const auto remove_action = action.remove_plan.get()) { Checks::check_exit(VCPKG_LINE_INFO, GlobalState::feature_packages); Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, status_db); @@ -588,7 +690,7 @@ namespace vcpkg::Install } else { - Dependencies::PathsPortFileProvider paths_port_file(paths); + Dependencies::PathsPortFile paths_port_file(paths); auto install_plan = Dependencies::create_install_plan( paths_port_file, Util::fmap(specs, [](auto&& spec) { return spec.package_spec; }), status_db); @@ -598,7 +700,7 @@ namespace vcpkg::Install for (auto&& action : action_plan) { - if (auto p_install = action.install_action.get()) + if (auto p_install = action.install_plan.get()) { p_install->build_options = install_plan_options; if (p_install->request_type != RequestType::USER_REQUESTED) @@ -611,16 +713,16 @@ namespace vcpkg::Install // log the plan const std::string specs_string = Strings::join(",", action_plan, [](const AnyAction& action) { - if (auto iaction = action.install_action.get()) + if (auto iaction = action.install_plan.get()) return iaction->spec.to_string(); - else if (auto raction = action.remove_action.get()) + else if (auto raction = action.remove_plan.get()) return "R$" + raction->spec.to_string(); Checks::unreachable(VCPKG_LINE_INFO); }); Metrics::g_metrics.lock()->track_property("installplan", specs_string); - Dependencies::print_plan(action_plan, is_recursive); + print_plan(action_plan, is_recursive); if (dry_run) { @@ -650,7 +752,7 @@ namespace vcpkg::Install for (auto&& result : summary.results) { if (!result.action) continue; - if (auto p_install_action = result.action->install_action.get()) + if (auto p_install_action = result.action->install_plan.get()) { if (p_install_action->request_type != RequestType::USER_REQUESTED) continue; auto bpgh = result.get_binary_paragraph(); @@ -671,7 +773,7 @@ namespace vcpkg::Install { if (build_result.binary_control_file) return &build_result.binary_control_file->core_paragraph; if (action) - if (auto p_install_plan = action->install_action.get()) + if (auto p_install_plan = action->install_plan.get()) { if (auto p_bcf = p_install_plan->any_paragraph.binary_control_file.get()) return &p_bcf->core_paragraph; diff --git a/toolsrc/src/vcpkg/paragraphs.cpp b/toolsrc/src/vcpkg/paragraphs.cpp index b66d53994..b93de190c 100644 --- a/toolsrc/src/vcpkg/paragraphs.cpp +++ b/toolsrc/src/vcpkg/paragraphs.cpp @@ -289,4 +289,16 @@ namespace vcpkg::Paragraphs } return std::move(results.paragraphs); } + + std::map load_all_port_names_and_versions(const Files::Filesystem& fs, + const fs::path& ports_dir) + { + auto all_ports = load_all_ports(fs, ports_dir); + + std::map names_and_versions; + for (auto&& port : all_ports) + names_and_versions.emplace(port->core_paragraph->name, port->core_paragraph->version); + + return names_and_versions; + } } diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 4079d60c1..8ae0bc881 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -207,11 +207,10 @@ namespace vcpkg::Remove System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); Checks::exit_fail(VCPKG_LINE_INFO); } - - Dependencies::PathsPortFileProvider provider(paths); - - specs = Util::fmap(Update::find_outdated_packages(provider, status_db), - [](auto&& outdated) { return outdated.spec; }); + specs = Util::fmap( + Update::find_outdated_packages( + Paragraphs::load_all_port_names_and_versions(paths.get_filesystem(), paths.ports), status_db), + [](auto&& outdated) { return outdated.spec; }); if (specs.empty()) { diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index d6c5614ed..29baef91e 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -14,7 +14,7 @@ namespace vcpkg::Update return left.spec.name() < right.spec.name(); } - std::vector find_outdated_packages(const Dependencies::PortFileProvider& provider, + std::vector find_outdated_packages(const std::map& src_names_to_versions, const StatusParagraphs& status_db) { const std::vector installed_packages = get_installed_ports(status_db); @@ -24,23 +24,19 @@ namespace vcpkg::Update { if (!pgh->package.feature.empty()) { - // Skip feature paragraphs; only consider master paragraphs for needing updates. + // Skip feature packages; only consider master packages for needing updates. continue; } - auto maybe_scf = provider.get_control_file(pgh->package.spec.name()); - if (auto p_scf = maybe_scf.get()) + const auto it = src_names_to_versions.find(pgh->package.spec.name()); + if (it == src_names_to_versions.end()) { - auto&& port_version = p_scf->core_paragraph->version; - auto&& installed_version = pgh->package.version; - if (installed_version != port_version) - { - output.push_back({pgh->package.spec, VersionDiff(installed_version, port_version)}); - } + // Package was not installed from portfile + continue; } - else + if (it->second != pgh->package.version) { - // No portfile available + output.push_back({pgh->package.spec, VersionDiff(pgh->package.version, it->second)}); } } @@ -62,10 +58,10 @@ namespace vcpkg::Update const StatusParagraphs status_db = database_load_check(paths); - Dependencies::PathsPortFileProvider provider(paths); - - const auto outdated_packages = SortedVector(find_outdated_packages(provider, status_db), - &OutdatedPackage::compare_by_name); + const auto outdated_packages = SortedVector( + find_outdated_packages(Paragraphs::load_all_port_names_and_versions(paths.get_filesystem(), paths.ports), + status_db), + &OutdatedPackage::compare_by_name); if (outdated_packages.empty()) { @@ -73,17 +69,19 @@ namespace vcpkg::Update } else { + std::string install_line; System::println("The following packages differ from their port versions:"); for (auto&& package : outdated_packages) { + install_line += package.spec.to_string(); + install_line += " "; System::println(" %-32s %s", package.spec, package.version_diff.to_string()); } System::println("\n" - "To update these packages and all dependencies, run\n" - " .\\vcpkg upgrade\n" - "\n" - "To only remove outdated packages, run\n" - " .\\vcpkg remove --outdated\n"); + "To update these packages, run\n" + " .\\vcpkg remove --outdated\n" + " .\\vcpkg install " + + install_line); } Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 68345ca85..9a7ad6dc0 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -185,7 +185,6 @@ - Create Create diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index dfbcf0c7e..966fc7fb9 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -195,9 +195,6 @@ Source Files\vcpkg - - Source Files\vcpkg - -- cgit v1.2.3 From eb1a7b099eb347b195491dfa2949d8aa92677276 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 13 Dec 2017 05:43:00 -0800 Subject: [vcpkg] Fix regressions introduced with update command. Fixed issue with upgrade where it assumed downloads were not allowed. --- toolsrc/include/tests.utils.h | 16 +- toolsrc/include/vcpkg/build.h | 23 +- toolsrc/include/vcpkg/commands.h | 6 + toolsrc/include/vcpkg/dependencies.h | 54 +++- toolsrc/include/vcpkg/packagespec.h | 7 + toolsrc/include/vcpkg/paragraphs.h | 3 - toolsrc/include/vcpkg/update.h | 6 +- toolsrc/src/commands.upgrade.cpp | 180 +++++++++++++ toolsrc/src/tests.plan.cpp | 150 ++++++++++- toolsrc/src/tests.update.cpp | 34 ++- toolsrc/src/vcpkg/base/checks.cpp | 9 +- toolsrc/src/vcpkg/build.cpp | 38 ++- toolsrc/src/vcpkg/commands.ci.cpp | 2 +- toolsrc/src/vcpkg/commands.cpp | 3 +- toolsrc/src/vcpkg/commands.portsdiff.cpp | 7 +- toolsrc/src/vcpkg/dependencies.cpp | 420 +++++++++++++++++++----------- toolsrc/src/vcpkg/export.cpp | 4 +- toolsrc/src/vcpkg/help.cpp | 1 + toolsrc/src/vcpkg/install.cpp | 177 +++---------- toolsrc/src/vcpkg/paragraphs.cpp | 12 - toolsrc/src/vcpkg/remove.cpp | 9 +- toolsrc/src/vcpkg/update.cpp | 40 +-- toolsrc/vcpkglib/vcpkglib.vcxproj | 1 + toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 3 + 24 files changed, 776 insertions(+), 429 deletions(-) create mode 100644 toolsrc/src/commands.upgrade.cpp diff --git a/toolsrc/include/tests.utils.h b/toolsrc/include/tests.utils.h index 485b8c294..0c0add7ab 100644 --- a/toolsrc/include/tests.utils.h +++ b/toolsrc/include/tests.utils.h @@ -23,4 +23,18 @@ std::unique_ptr make_status_pgh(const char* name, std::unique_ptr make_status_feature_pgh(const char* name, const char* feature, const char* depends = "", - const char* triplet = "x86-windows"); \ No newline at end of file + 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()); +} diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 18408e207..e3f8bf79e 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -114,39 +114,24 @@ namespace vcpkg::Build struct BuildPackageConfig { - BuildPackageConfig(const SourceParagraph& src, - const Triplet& triplet, - fs::path&& port_dir, - const BuildPackageOptions& build_package_options) - : src(src) - , scf(nullptr) - , triplet(triplet) - , port_dir(std::move(port_dir)) - , build_package_options(build_package_options) - , feature_list(nullptr) - { - } - BuildPackageConfig(const SourceControlFile& src, const Triplet& triplet, fs::path&& port_dir, const BuildPackageOptions& build_package_options, const std::unordered_set& feature_list) - : src(*src.core_paragraph) - , scf(&src) + : scf(src) , triplet(triplet) , port_dir(std::move(port_dir)) , build_package_options(build_package_options) - , feature_list(&feature_list) + , feature_list(feature_list) { } - const SourceParagraph& src; - const SourceControlFile* scf; + const SourceControlFile& scf; const Triplet& triplet; fs::path port_dir; const BuildPackageOptions& build_package_options; - const std::unordered_set* feature_list; + const std::unordered_set& feature_list; }; ExtendedBuildResult build_package(const VcpkgPaths& paths, diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 74fd80c03..b852a973e 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -39,6 +39,12 @@ namespace vcpkg::Commands void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } + namespace Upgrade + { + extern const CommandStructure COMMAND_STRUCTURE; + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); + } + namespace Edit { extern const CommandStructure COMMAND_STRUCTURE; diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 5411ee166..8a082efca 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -30,7 +30,6 @@ namespace vcpkg::Dependencies Optional status_paragraph; Optional binary_control_file; - Optional source_paragraph; Optional source_control_file; }; } @@ -92,11 +91,11 @@ namespace vcpkg::Dependencies struct AnyAction { - AnyAction(InstallPlanAction&& iplan) : install_plan(std::move(iplan)) {} - AnyAction(RemovePlanAction&& rplan) : remove_plan(std::move(rplan)) {} + AnyAction(InstallPlanAction&& iplan) : install_action(std::move(iplan)) {} + AnyAction(RemovePlanAction&& rplan) : remove_action(std::move(rplan)) {} - Optional install_plan; - Optional remove_plan; + Optional install_action; + Optional remove_action; const PackageSpec& spec() const; }; @@ -123,22 +122,44 @@ namespace vcpkg::Dependencies struct PortFileProvider { - virtual const SourceControlFile& get_control_file(const std::string& spec) const = 0; + virtual Optional get_control_file(const std::string& src_name) const = 0; }; - struct MapPortFile : Util::ResourceBase, PortFileProvider + struct MapPortFileProvider : Util::ResourceBase, PortFileProvider { + explicit MapPortFileProvider(const std::unordered_map& map); + Optional get_control_file(const std::string& src_name) const override; + + private: const std::unordered_map& ports; - explicit MapPortFile(const std::unordered_map& map); - const SourceControlFile& get_control_file(const std::string& spec) const override; }; - struct PathsPortFile : Util::ResourceBase, PortFileProvider + struct PathsPortFileProvider : Util::ResourceBase, PortFileProvider { + explicit PathsPortFileProvider(const VcpkgPaths& paths); + Optional get_control_file(const std::string& src_name) const override; + + private: const VcpkgPaths& ports; mutable std::unordered_map cache; - explicit PathsPortFile(const VcpkgPaths& paths); - const SourceControlFile& get_control_file(const std::string& spec) const override; + }; + + struct ClusterGraph; + struct GraphPlan; + + struct PackageGraph + { + PackageGraph(const PortFileProvider& provider, const StatusParagraphs& status_db); + ~PackageGraph(); + + void install(const FeatureSpec& spec); + void upgrade(const PackageSpec& spec); + + std::vector serialize() const; + + private: + std::unique_ptr m_graph_plan; + std::unique_ptr m_graph; }; std::vector create_install_plan(const PortFileProvider& port_file_provider, @@ -148,11 +169,18 @@ namespace vcpkg::Dependencies std::vector create_remove_plan(const std::vector& specs, const StatusParagraphs& status_db); - std::vector create_export_plan(const VcpkgPaths& paths, + std::vector create_export_plan(const PortFileProvider& port_file_provider, + const VcpkgPaths& paths, const std::vector& specs, const StatusParagraphs& status_db); std::vector create_feature_install_plan(const std::unordered_map& map, const std::vector& specs, const StatusParagraphs& status_db); + + std::vector create_feature_install_plan(const PortFileProvider& port_file_provider, + const std::vector& specs, + const StatusParagraphs& status_db); + + void print_plan(const std::vector& action_plan, const bool is_recursive = true); } diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index 071487e1a..f1119e2f3 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -34,6 +34,13 @@ namespace vcpkg std::string to_string() const; + bool operator<(const PackageSpec& other) const + { + if (name() < other.name()) return true; + if (name() > other.name()) return false; + return triplet() < other.triplet(); + } + private: std::string m_name; Triplet m_triplet; diff --git a/toolsrc/include/vcpkg/paragraphs.h b/toolsrc/include/vcpkg/paragraphs.h index c8dbea646..e2c7f2d99 100644 --- a/toolsrc/include/vcpkg/paragraphs.h +++ b/toolsrc/include/vcpkg/paragraphs.h @@ -32,7 +32,4 @@ namespace vcpkg::Paragraphs std::vector> load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); - - std::map load_all_port_names_and_versions(const Files::Filesystem& fs, - const fs::path& ports_dir); } diff --git a/toolsrc/include/vcpkg/update.h b/toolsrc/include/vcpkg/update.h index 7587b9eb2..b85f7b2b3 100644 --- a/toolsrc/include/vcpkg/update.h +++ b/toolsrc/include/vcpkg/update.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -16,7 +17,8 @@ namespace vcpkg::Update VersionDiff version_diff; }; - std::vector find_outdated_packages(const std::map& src_names_to_versions, + std::vector find_outdated_packages(const Dependencies::PortFileProvider& provider, const StatusParagraphs& status_db); + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); -} \ No newline at end of file +} diff --git a/toolsrc/src/commands.upgrade.cpp b/toolsrc/src/commands.upgrade.cpp new file mode 100644 index 000000000..d2c868870 --- /dev/null +++ b/toolsrc/src/commands.upgrade.cpp @@ -0,0 +1,180 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Commands::Upgrade +{ + using Install::KeepGoing; + using Install::to_keep_going; + + static const std::string OPTION_NO_DRY_RUN = "--no-dry-run"; + static const std::string OPTION_KEEP_GOING = "--keep-going"; + + static const std::array INSTALL_SWITCHES = {{ + {OPTION_NO_DRY_RUN, "Actually upgrade"}, + {OPTION_KEEP_GOING, "Continue installing packages on failure"}, + }}; + + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("upgrade --no-dry-run"), + 0, + SIZE_MAX, + {INSTALL_SWITCHES, {}}, + nullptr, + }; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + { + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); + + const bool no_dry_run = Util::Sets::contains(options.switches, OPTION_NO_DRY_RUN); + const KeepGoing keep_going = to_keep_going(Util::Sets::contains(options.switches, OPTION_KEEP_GOING)); + + StatusParagraphs status_db = database_load_check(paths); + + Dependencies::PathsPortFileProvider provider(paths); + Dependencies::PackageGraph graph(provider, status_db); + + // input sanitization + const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { + return Input::check_and_get_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); + }); + + for (auto&& spec : specs) + { + Input::check_triplet(spec.triplet(), paths); + } + + if (specs.empty()) + { + // If no packages specified, upgrade all outdated packages. + auto outdated_packages = Update::find_outdated_packages(provider, status_db); + + if (outdated_packages.empty()) + { + System::println("All installed packages are up-to-date with the local portfiles."); + Checks::exit_success(VCPKG_LINE_INFO); + } + + for (auto&& outdated_package : outdated_packages) + graph.upgrade(outdated_package.spec); + } + else + { + std::vector not_installed; + std::vector no_portfile; + std::vector to_upgrade; + std::vector up_to_date; + + for (auto&& spec : specs) + { + auto it = status_db.find_installed(spec); + if (it == status_db.end()) + { + not_installed.push_back(spec); + } + + auto maybe_scf = provider.get_control_file(spec.name()); + if (auto p_scf = maybe_scf.get()) + { + if (it != status_db.end()) + { + if (p_scf->core_paragraph->version != (*it)->package.version) + { + to_upgrade.push_back(spec); + } + else + { + up_to_date.push_back(spec); + } + } + } + else + { + no_portfile.push_back(spec); + } + } + + Util::sort(not_installed); + Util::sort(no_portfile); + Util::sort(up_to_date); + Util::sort(to_upgrade); + + if (!up_to_date.empty()) + { + System::println(System::Color::success, "The following packages are up-to-date:"); + System::println(Strings::join( + "", up_to_date, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); + } + + if (!not_installed.empty()) + { + System::println(System::Color::error, "The following packages are not installed:"); + System::println(Strings::join( + "", not_installed, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); + } + + if (!no_portfile.empty()) + { + System::println(System::Color::error, "The following packages do not have a valid portfile:"); + System::println(Strings::join( + "", no_portfile, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); + } + + Checks::check_exit(VCPKG_LINE_INFO, not_installed.empty() && no_portfile.empty()); + + if (to_upgrade.empty()) Checks::exit_success(VCPKG_LINE_INFO); + + for (auto&& spec : to_upgrade) + graph.upgrade(spec); + } + + auto plan = graph.serialize(); + + Checks::check_exit(VCPKG_LINE_INFO, !plan.empty()); + + const Build::BuildPackageOptions install_plan_options = { + Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::NO, + }; + + // Set build settings for all install actions + for (auto&& action : plan) + { + if (auto p_install = action.install_action.get()) + { + p_install->build_options = install_plan_options; + } + } + + Dependencies::print_plan(plan, true); + + if (!no_dry_run) + { + System::println(System::Color::warning, + "If you are sure you want to rebuild the above packages, run this command with the " + "--no-dry-run option."); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + const Install::InstallSummary summary = Install::perform(plan, keep_going, paths, status_db); + + System::println("\nTotal elapsed time: %s\n", summary.total_elapsed_time); + + if (keep_going == KeepGoing::YES) + { + summary.print(); + } + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 122a4ffef..781588c91 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -36,7 +36,7 @@ namespace UnitTest1 std::vector vec, const Triplet& triplet = Triplet::X86_WINDOWS) { - const auto& plan = install_action->install_plan.value_or_exit(VCPKG_LINE_INFO); + const auto& plan = install_action->install_action.value_or_exit(VCPKG_LINE_INFO); const auto& feature_list = plan.feature_list; Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); @@ -61,7 +61,7 @@ namespace UnitTest1 std::string pkg_name, const Triplet& triplet = Triplet::X86_WINDOWS) { - const auto& plan = remove_action->remove_plan.value_or_exit(VCPKG_LINE_INFO); + const auto& plan = remove_action->remove_action.value_or_exit(VCPKG_LINE_INFO); Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); Assert::AreEqual(pkg_name.c_str(), plan.spec.name().c_str()); } @@ -98,7 +98,7 @@ namespace UnitTest1 auto spec_b = spec_map.emplace("b", "c"); auto spec_c = spec_map.emplace("c"); - Dependencies::MapPortFile map_port(spec_map.map); + Dependencies::MapPortFileProvider map_port(spec_map.map); auto install_plan = Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); @@ -122,7 +122,7 @@ namespace UnitTest1 auto spec_g = spec_map.emplace("g"); auto spec_h = spec_map.emplace("h"); - Dependencies::MapPortFile map_port(spec_map.map); + Dependencies::MapPortFileProvider map_port(spec_map.map); auto install_plan = Dependencies::create_install_plan( map_port, {spec_a, spec_b, spec_c}, StatusParagraphs(std::move(status_paragraphs))); @@ -162,7 +162,7 @@ namespace UnitTest1 StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(1), install_plan.size()); - auto p = install_plan[0].install_plan.get(); + auto p = install_plan[0].install_action.get(); Assert::IsNotNull(p); Assert::AreEqual("a", p->spec.name().c_str()); Assert::AreEqual(Dependencies::InstallPlanType::ALREADY_INSTALLED, p->plan_type); @@ -183,13 +183,13 @@ namespace UnitTest1 StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(2), install_plan.size()); - auto p = install_plan[0].install_plan.get(); + auto p = install_plan[0].install_action.get(); Assert::IsNotNull(p); Assert::AreEqual("b", p->spec.name().c_str()); Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p->plan_type); Assert::AreEqual(Dependencies::RequestType::AUTO_SELECTED, p->request_type); - auto p2 = install_plan[1].install_plan.get(); + auto p2 = install_plan[1].install_action.get(); Assert::IsNotNull(p2); Assert::AreEqual("a", p2->spec.name().c_str()); Assert::AreEqual(Dependencies::InstallPlanType::BUILD_AND_INSTALL, p2->plan_type); @@ -215,7 +215,7 @@ namespace UnitTest1 auto spec_j = spec_map.emplace("j", "k"); auto spec_k = spec_map.emplace("k"); - Dependencies::MapPortFile map_port(spec_map.map); + Dependencies::MapPortFileProvider map_port(spec_map.map); auto install_plan = Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); @@ -521,4 +521,138 @@ namespace UnitTest1 Assert::AreEqual("expat", remove_plan[2].spec.name().c_str()); } }; + + class UpgradePlanTests : public TestClass + { + TEST_METHOD(basic_upgrade_scheme) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a"); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + + auto plan = graph.serialize(); + + Assert::AreEqual(size_t(2), plan.size()); + Assert::AreEqual("a", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + Assert::AreEqual("a", plan[1].spec().name().c_str()); + Assert::IsTrue(plan[1].install_action.has_value()); + } + + TEST_METHOD(basic_upgrade_scheme_with_recurse) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + pghs.push_back(make_status_pgh("b", "a")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a"); + spec_map.emplace("b", "a"); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + + auto plan = graph.serialize(); + + Assert::AreEqual(size_t(4), plan.size()); + Assert::AreEqual("b", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + + Assert::AreEqual("a", plan[1].spec().name().c_str()); + Assert::IsTrue(plan[1].remove_action.has_value()); + + Assert::AreEqual("a", plan[2].spec().name().c_str()); + Assert::IsTrue(plan[2].install_action.has_value()); + + Assert::AreEqual("b", plan[3].spec().name().c_str()); + Assert::IsTrue(plan[3].install_action.has_value()); + } + + TEST_METHOD(basic_upgrade_scheme_with_bystander) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + pghs.push_back(make_status_pgh("b")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a"); + spec_map.emplace("b", "a"); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + + auto plan = graph.serialize(); + + Assert::AreEqual(size_t(2), plan.size()); + Assert::AreEqual("a", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + Assert::AreEqual("a", plan[1].spec().name().c_str()); + Assert::IsTrue(plan[1].install_action.has_value()); + } + + TEST_METHOD(basic_upgrade_scheme_with_new_dep) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a", "b"); + spec_map.emplace("b"); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + + auto plan = graph.serialize(); + + Assert::AreEqual(size_t(3), plan.size()); + Assert::AreEqual("a", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + Assert::AreEqual("b", plan[1].spec().name().c_str()); + Assert::IsTrue(plan[1].install_action.has_value()); + Assert::AreEqual("a", plan[2].spec().name().c_str()); + Assert::IsTrue(plan[2].install_action.has_value()); + } + + TEST_METHOD(basic_upgrade_scheme_with_features) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + pghs.push_back(make_status_feature_pgh("a", "a1")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a", "", {{"a1", ""}}); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + + auto plan = graph.serialize(); + + Assert::AreEqual(size_t(2), plan.size()); + + Assert::AreEqual("a", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + + features_check(&plan[1], "a", {"core", "a1"}); + } + }; } diff --git a/toolsrc/src/tests.update.cpp b/toolsrc/src/tests.update.cpp index 06ae797f4..b6e487c17 100644 --- a/toolsrc/src/tests.update.cpp +++ b/toolsrc/src/tests.update.cpp @@ -9,6 +9,8 @@ using namespace vcpkg::Update; namespace UnitTest1 { + using Pgh = std::vector>; + class UpdateTests : public TestClass { TEST_METHOD(find_outdated_packages_basic) @@ -19,10 +21,12 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::map port_versions; - port_versions["a"] = VersionT("0"); + std::unordered_map map; + auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "0"}}})); + map.emplace("a", std::move(*scf)); + Dependencies::MapPortFileProvider provider(map); - auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), + auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), &OutdatedPackage::compare_by_name); Assert::AreEqual(size_t(1), pkgs.size()); @@ -41,10 +45,12 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::map port_versions; - port_versions["a"] = VersionT("0"); + std::unordered_map map; + auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "0"}}})); + map.emplace("a", std::move(*scf)); + Dependencies::MapPortFileProvider provider(map); - auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), + auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), &OutdatedPackage::compare_by_name); Assert::AreEqual(size_t(1), pkgs.size()); @@ -65,10 +71,12 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::map port_versions; - port_versions["a"] = VersionT("0"); + std::unordered_map map; + auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "0"}}})); + map.emplace("a", std::move(*scf)); + Dependencies::MapPortFileProvider provider(map); - auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), + auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), &OutdatedPackage::compare_by_name); Assert::AreEqual(size_t(1), pkgs.size()); @@ -84,10 +92,12 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(status_paragraphs)); - std::map port_versions; - port_versions["a"] = VersionT("2"); + std::unordered_map map; + auto scf = unwrap(SourceControlFile::parse_control_file(Pgh{{{"Source", "a"}, {"Version", "2"}}})); + map.emplace("a", std::move(*scf)); + Dependencies::MapPortFileProvider provider(map); - auto pkgs = SortedVector(Update::find_outdated_packages(port_versions, status_db), + auto pkgs = SortedVector(Update::find_outdated_packages(provider, status_db), &OutdatedPackage::compare_by_name); Assert::AreEqual(size_t(0), pkgs.size()); diff --git a/toolsrc/src/vcpkg/base/checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp index ed28d6e2b..23f2cc630 100644 --- a/toolsrc/src/vcpkg/base/checks.cpp +++ b/toolsrc/src/vcpkg/base/checks.cpp @@ -49,8 +49,7 @@ namespace vcpkg::Checks #else void register_console_ctrl_handler() {} #endif - - [[noreturn]] void unreachable(const LineInfo& line_info) + void unreachable(const LineInfo& line_info) { System::println(System::Color::error, "Error: Unreachable code was reached"); System::println(System::Color::error, line_info.to_string()); // Always print line_info here @@ -61,13 +60,13 @@ namespace vcpkg::Checks #endif } - [[noreturn]] void exit_with_code(const LineInfo& line_info, const int exit_code) + void exit_with_code(const LineInfo& line_info, const int exit_code) { Debug::println(System::Color::error, line_info.to_string()); cleanup_and_exit(exit_code); } - [[noreturn]] void exit_with_message(const LineInfo& line_info, const CStringView error_message) + void exit_with_message(const LineInfo& line_info, const CStringView error_message) { System::println(System::Color::error, error_message); exit_fail(line_info); @@ -77,7 +76,7 @@ namespace vcpkg::Checks { if (!expression) { - exit_with_message(line_info, ""); + exit_fail(line_info); } } diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index b8f122b27..f43d8788e 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -260,13 +260,13 @@ namespace vcpkg::Build const BuildPackageConfig& config, const StatusParagraphs& status_db) { - const PackageSpec spec = - PackageSpec::from_name_and_triplet(config.src.name, config.triplet).value_or_exit(VCPKG_LINE_INFO); + const PackageSpec spec = PackageSpec::from_name_and_triplet(config.scf.core_paragraph->name, config.triplet) + .value_or_exit(VCPKG_LINE_INFO); const Triplet& triplet = config.triplet; { std::vector missing_specs; - for (auto&& dep : filter_dependencies(config.src.depends, triplet)) + for (auto&& dep : filter_dependencies(config.scf.core_paragraph->depends, triplet)) { if (status_db.find_installed(dep, triplet) == status_db.end()) { @@ -290,16 +290,13 @@ namespace vcpkg::Build std::string features; if (GlobalState::feature_packages) { - if (config.feature_list) + for (auto&& feature : config.feature_list) { - for (auto&& feature : *config.feature_list) - { - features.append(feature + ";"); - } - if (features.size() > 0) - { - features.pop_back(); - } + features.append(feature + ";"); + } + if (features.size() > 0) + { + features.pop_back(); } } @@ -309,7 +306,7 @@ namespace vcpkg::Build ports_cmake_script_path, { {"CMD", "BUILD"}, - {"PORT", config.src.name}, + {"PORT", config.scf.core_paragraph->name}, {"CURRENT_PORT_DIR", config.port_dir / "/."}, {"TARGET_TRIPLET", triplet.canonical_name()}, {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, @@ -343,7 +340,7 @@ namespace vcpkg::Build const BuildInfo build_info = 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); - auto bcf = create_binary_control_file(config.src, triplet, build_info); + auto bcf = create_binary_control_file(*config.scf.core_paragraph, triplet, build_info); if (error_count != 0) { @@ -351,16 +348,13 @@ namespace vcpkg::Build } if (GlobalState::feature_packages) { - if (config.feature_list) + for (auto&& feature : config.feature_list) { - for (auto&& feature : *config.feature_list) + for (auto&& f_pgh : config.scf.feature_paragraphs) { - for (auto&& f_pgh : config.scf->feature_paragraphs) - { - if (f_pgh->name == feature) - bcf->features.push_back( - create_binary_feature_control_file(*config.scf->core_paragraph, *f_pgh, triplet)); - } + if (f_pgh->name == feature) + bcf->features.push_back( + create_binary_feature_control_file(*config.scf.core_paragraph, *f_pgh, triplet)); } } } diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index f2e984bf8..1a2f9b47f 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -27,7 +27,7 @@ namespace vcpkg::Commands::CI const std::vector specs = PackageSpec::to_package_specs(ports, triplet); StatusParagraphs status_db = database_load_check(paths); - const auto& paths_port_file = Dependencies::PathsPortFile(paths); + const auto& paths_port_file = Dependencies::PathsPortFileProvider(paths); std::vector install_plan = Dependencies::create_install_plan(paths_port_file, specs, status_db); diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index 15b10c7ea..ccf6fa729 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -13,9 +13,10 @@ namespace vcpkg::Commands Span> get_available_commands_type_a() { static std::vector> t = { - PackageNameAndFunction{"install", &Install::perform_and_exit}, + {"install", &Install::perform_and_exit}, {"ci", &CI::perform_and_exit}, {"remove", &Remove::perform_and_exit}, + {"upgrade", &Upgrade::perform_and_exit}, {"build", &Build::Command::perform_and_exit}, {"env", &Env::perform_and_exit}, {"build-external", &BuildExternal::perform_and_exit}, diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index 6752715e4..dba04ce5b 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -98,8 +98,11 @@ namespace vcpkg::Commands::PortsDiff ".vcpkg-root", git_exe.u8string()); System::cmd_execute_clean(cmd); - const std::map names_and_versions = Paragraphs::load_all_port_names_and_versions( - paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string); + const auto all_ports = + Paragraphs::load_all_ports(paths.get_filesystem(), temp_checkout_path / ports_dir_name_as_string); + 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); return names_and_versions; } diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 0a1f79834..a48f3f1d8 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -65,26 +65,19 @@ namespace vcpkg::Dependencies struct ClusterGraph : Util::MoveOnlyBase { - explicit ClusterGraph(std::unordered_map&& ports) - : m_ports(std::move(ports)) - { - } + explicit ClusterGraph(const PortFileProvider& provider) : m_provider(provider) {} Cluster& get(const PackageSpec& spec) { auto it = m_graph.find(spec); if (it == m_graph.end()) { - // Load on-demand from m_ports - auto it_ports = m_ports.find(spec.name()); - if (it_ports != m_ports.end()) - { - auto& clust = m_graph[spec]; - clust.spec = spec; - cluster_from_scf(*it_ports->second, clust); - return clust; - } - return m_graph[spec]; + // Load on-demand from m_provider + auto maybe_scf = m_provider.get_control_file(spec.name()); + auto& clust = m_graph[spec]; + clust.spec = spec; + if (auto p_scf = maybe_scf.get()) cluster_from_scf(*p_scf, clust); + return clust; } return it->second; } @@ -107,7 +100,7 @@ namespace vcpkg::Dependencies } std::unordered_map m_graph; - std::unordered_map m_ports; + const PortFileProvider& m_provider; }; std::vector AnyParagraph::dependencies(const Triplet& triplet) const @@ -124,9 +117,10 @@ namespace vcpkg::Dependencies return PackageSpec::from_dependencies_of_port(p->core_paragraph.spec.name(), deps, triplet); } - if (const auto p = this->source_paragraph.get()) + if (const auto p = this->source_control_file.value_or(nullptr)) { - return PackageSpec::from_dependencies_of_port(p->name, filter_dependencies(p->depends, triplet), triplet); + return PackageSpec::from_dependencies_of_port( + p->core_paragraph->name, filter_dependencies(p->core_paragraph->depends, triplet), triplet); } Checks::exit_with_message(VCPKG_LINE_INFO, @@ -192,11 +186,13 @@ namespace vcpkg::Dependencies return; } - if (auto p = any_paragraph.source_paragraph.get()) + if (auto p = any_paragraph.source_control_file.get()) { this->plan_type = InstallPlanType::BUILD_AND_INSTALL; return; } + + Checks::unreachable(VCPKG_LINE_INFO); } std::string InstallPlanAction::displayname() const @@ -226,12 +222,12 @@ namespace vcpkg::Dependencies const PackageSpec& AnyAction::spec() const { - if (const auto p = install_plan.get()) + if (const auto p = install_action.get()) { return p->spec; } - if (const auto p = remove_plan.get()) + if (const auto p = remove_action.get()) { return p->spec; } @@ -257,7 +253,7 @@ namespace vcpkg::Dependencies return; } - if (auto p = any_paragraph.source_paragraph.get()) + if (auto p = any_paragraph.source_control_file.get()) { this->plan_type = ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT; return; @@ -269,21 +265,20 @@ namespace vcpkg::Dependencies return left->spec.name() < right->spec.name(); } - MapPortFile::MapPortFile(const std::unordered_map& map) : ports(map) {} + MapPortFileProvider::MapPortFileProvider(const std::unordered_map& map) : ports(map) + { + } - const SourceControlFile& MapPortFile::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()) - { - Checks::exit_fail(VCPKG_LINE_INFO); - } + if (scf == ports.end()) return nullopt; return scf->second; } - PathsPortFile::PathsPortFile(const VcpkgPaths& paths) : ports(paths) {} + PathsPortFileProvider::PathsPortFileProvider(const VcpkgPaths& paths) : ports(paths) {} - const SourceControlFile& PathsPortFile::get_control_file(const std::string& spec) const + Optional PathsPortFileProvider::get_control_file(const std::string& spec) const { auto cache_it = cache.find(spec); if (cache_it != cache.end()) @@ -298,56 +293,34 @@ namespace vcpkg::Dependencies auto it = cache.emplace(spec, std::move(*scf->get())); return it.first->second; } - print_error_message(source_control_file.error()); - Checks::exit_fail(VCPKG_LINE_INFO); + return nullopt; } std::vector create_install_plan(const PortFileProvider& port_file_provider, const std::vector& specs, const StatusParagraphs& status_db) { - struct InstallAdjacencyProvider final : Graphs::AdjacencyProvider - { - const PortFileProvider& port_file_provider; - const StatusParagraphs& status_db; - const std::unordered_set& specs_as_set; + auto fspecs = Util::fmap(specs, [](const PackageSpec& spec) { return FeatureSpec(spec, ""); }); + auto plan = create_feature_install_plan(port_file_provider, fspecs, status_db); - InstallAdjacencyProvider(const PortFileProvider& port_file_provider, - const StatusParagraphs& s, - const std::unordered_set& specs_as_set) - : port_file_provider(port_file_provider), status_db(s), specs_as_set(specs_as_set) - { - } + std::vector ret; + ret.reserve(plan.size()); - std::vector adjacency_list(const InstallPlanAction& plan) const override + for (auto&& action : plan) + { + if (auto p_install = action.install_action.get()) { - if (plan.any_paragraph.status_paragraph.get()) return std::vector{}; - return plan.any_paragraph.dependencies(plan.spec.triplet()); + ret.push_back(std::move(*p_install)); } - - InstallPlanAction load_vertex_data(const PackageSpec& spec) const override + else { - const RequestType request_type = specs_as_set.find(spec) != specs_as_set.end() - ? RequestType::USER_REQUESTED - : RequestType::AUTO_SELECTED; - auto it = status_db.find_installed(spec); - if (it != status_db.end()) return InstallPlanAction{spec, {*it->get(), nullopt, nullopt}, request_type}; - return InstallPlanAction{ - spec, - {nullopt, nullopt, *port_file_provider.get_control_file(spec.name()).core_paragraph}, - request_type}; + Checks::exit_with_message(VCPKG_LINE_INFO, + "The installation plan requires feature packages support. Please re-run the " + "command with --featurepackages."); } - }; - - const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); - std::vector toposort = - Graphs::topological_sort(specs, InstallAdjacencyProvider{port_file_provider, status_db, specs_as_set}); - Util::erase_remove_if(toposort, [](const InstallPlanAction& plan) { - return plan.request_type == RequestType::AUTO_SELECTED && - plan.plan_type == InstallPlanType::ALREADY_INSTALLED; - }); + } - return toposort; + return ret; } std::vector create_remove_plan(const std::vector& specs, @@ -407,7 +380,8 @@ namespace vcpkg::Dependencies return Graphs::topological_sort(specs, RemoveAdjacencyProvider{status_db, installed_ports, specs_as_set}); } - std::vector create_export_plan(const VcpkgPaths& paths, + std::vector create_export_plan(const PortFileProvider& port_file_provider, + const VcpkgPaths& paths, const std::vector& specs, const StatusParagraphs& status_db) { @@ -415,12 +389,14 @@ namespace vcpkg::Dependencies { const VcpkgPaths& paths; const StatusParagraphs& status_db; + const PortFileProvider& provider; const std::unordered_set& specs_as_set; ExportAdjacencyProvider(const VcpkgPaths& p, const StatusParagraphs& s, + const PortFileProvider& prov, const std::unordered_set& specs_as_set) - : paths(p), status_db(s), specs_as_set(specs_as_set) + : paths(p), status_db(s), provider(prov), specs_as_set(specs_as_set) { } @@ -439,19 +415,16 @@ namespace vcpkg::Dependencies if (auto bcf = maybe_bpgh.get()) return ExportPlanAction{spec, AnyParagraph{nullopt, std::move(*bcf), nullopt}, request_type}; - auto maybe_scf = Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec)); - if (auto scf = maybe_scf.get()) - return ExportPlanAction{spec, {nullopt, nullopt, *scf->get()->core_paragraph}, request_type}; - else - print_error_message(maybe_scf.error()); + auto maybe_scf = provider.get_control_file(spec.name()); + if (auto scf = maybe_scf.get()) return ExportPlanAction{spec, {nullopt, nullopt, scf}, request_type}; Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec); } }; const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); - std::vector toposort = - Graphs::topological_sort(specs, ExportAdjacencyProvider{paths, status_db, specs_as_set}); + std::vector toposort = Graphs::topological_sort( + specs, ExportAdjacencyProvider{paths, status_db, port_file_provider, specs_as_set}); return toposort; } @@ -461,11 +434,12 @@ namespace vcpkg::Dependencies SUCCESS, }; - MarkPlusResult mark_plus(const std::string& feature, - Cluster& cluster, - ClusterGraph& pkg_to_cluster, - GraphPlan& graph_plan); - void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); + static MarkPlusResult mark_plus(const std::string& feature, + Cluster& cluster, + ClusterGraph& pkg_to_cluster, + GraphPlan& graph_plan); + + static void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); MarkPlusResult mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) { @@ -557,110 +531,80 @@ namespace vcpkg::Dependencies } } - static ClusterGraph create_feature_install_graph(const std::unordered_map& map, - const StatusParagraphs& status_db) + std::vector create_feature_install_plan(const PortFileProvider& provider, + const std::vector& specs, + const StatusParagraphs& status_db) { - std::unordered_map ptr_map; - for (auto&& p : map) - ptr_map.emplace(p.first, &p.second); - ClusterGraph graph(std::move(ptr_map)); - - auto installed_ports = get_installed_ports(status_db); - - for (auto&& status_paragraph : installed_ports) - { - Cluster& cluster = graph.get(status_paragraph->package.spec); - - cluster.transient_uninstalled = false; - - cluster.status_paragraphs.emplace_back(status_paragraph); - - auto& status_paragraph_feature = status_paragraph->package.feature; - // In this case, empty string indicates the "core" paragraph for a package. - if (status_paragraph_feature.empty()) - { - cluster.original_features.insert("core"); - } - else - { - cluster.original_features.insert(status_paragraph_feature); - } - } - - for (auto&& status_paragraph : installed_ports) - { - auto& spec = status_paragraph->package.spec; - auto& status_paragraph_feature = status_paragraph->package.feature; - auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends, - status_paragraph->package.spec.triplet()); - - for (auto&& dependency : reverse_edges) - { - auto& dep_cluster = graph.get(dependency.spec()); - - auto depends_name = dependency.feature(); - if (depends_name.empty()) depends_name = "core"; + PackageGraph pgraph(provider, status_db); + for (auto&& spec : specs) + pgraph.install(spec); - auto& target_node = dep_cluster.edges[depends_name]; - target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); - } - } - return graph; + return pgraph.serialize(); } std::vector create_feature_install_plan(const std::unordered_map& map, const std::vector& specs, const StatusParagraphs& status_db) { - ClusterGraph graph = create_feature_install_graph(map, status_db); + MapPortFileProvider provider(map); + return create_feature_install_plan(provider, specs, status_db); + } - GraphPlan graph_plan; - for (auto&& spec : specs) + void PackageGraph::install(const FeatureSpec& spec) + { + Cluster& spec_cluster = m_graph->get(spec.spec()); + spec_cluster.request_type = RequestType::USER_REQUESTED; + if (spec.feature() == "*") { - Cluster& spec_cluster = graph.get(spec.spec()); - spec_cluster.request_type = RequestType::USER_REQUESTED; - if (spec.feature() == "*") + if (auto p_scf = spec_cluster.source_control_file.value_or(nullptr)) { - if (auto p_scf = spec_cluster.source_control_file.value_or(nullptr)) + for (auto&& feature : p_scf->feature_paragraphs) { - for (auto&& feature : p_scf->feature_paragraphs) - { - auto res = mark_plus(feature->name, spec_cluster, graph, graph_plan); - - Checks::check_exit(VCPKG_LINE_INFO, - res == MarkPlusResult::SUCCESS, - "Error: Unable to locate feature %s", - spec); - } - - auto res = mark_plus("core", spec_cluster, graph, graph_plan); + auto res = mark_plus(feature->name, spec_cluster, *m_graph, *m_graph_plan); Checks::check_exit( VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); } - else - { - Checks::exit_with_message( - VCPKG_LINE_INFO, "Error: Unable to handle '*' because can't find CONTROL for %s", spec.spec()); - } - } - else - { - auto res = mark_plus(spec.feature(), spec_cluster, graph, graph_plan); + + auto res = mark_plus("core", spec_cluster, *m_graph, *m_graph_plan); Checks::check_exit( VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); } + else + { + Checks::exit_with_message( + VCPKG_LINE_INFO, "Error: Unable to handle '*' because can't find CONTROL for %s", spec.spec()); + } + } + else + { + auto res = mark_plus(spec.feature(), spec_cluster, *m_graph, *m_graph_plan); - graph_plan.install_graph.add_vertex(ClusterPtr{&spec_cluster}); + Checks::check_exit( + VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); } - Graphs::GraphAdjacencyProvider adjacency_remove_graph(graph_plan.remove_graph.adjacency_list()); - auto remove_vertex_list = graph_plan.remove_graph.vertex_list(); + m_graph_plan->install_graph.add_vertex(ClusterPtr{&spec_cluster}); + } + + void PackageGraph::upgrade(const PackageSpec& spec) + { + Cluster& spec_cluster = m_graph->get(spec); + spec_cluster.request_type = RequestType::USER_REQUESTED; + + mark_minus(spec_cluster, *m_graph, *m_graph_plan); + } + + std::vector PackageGraph::serialize() const + { + Graphs::GraphAdjacencyProvider adjacency_remove_graph(m_graph_plan->remove_graph.adjacency_list()); + auto remove_vertex_list = m_graph_plan->remove_graph.vertex_list(); auto remove_toposort = Graphs::topological_sort(remove_vertex_list, adjacency_remove_graph); - Graphs::GraphAdjacencyProvider adjacency_install_graph(graph_plan.install_graph.adjacency_list()); - auto insert_vertex_list = graph_plan.install_graph.vertex_list(); + Graphs::GraphAdjacencyProvider adjacency_install_graph( + m_graph_plan->install_graph.adjacency_list()); + auto insert_vertex_list = m_graph_plan->install_graph.vertex_list(); auto insert_toposort = Graphs::topological_sort(insert_vertex_list, adjacency_install_graph); std::vector plan; @@ -705,4 +649,162 @@ namespace vcpkg::Dependencies return plan; } + + static std::unique_ptr create_feature_install_graph(const PortFileProvider& map, + const StatusParagraphs& status_db) + { + std::unique_ptr graph = std::make_unique(map); + + auto installed_ports = get_installed_ports(status_db); + + for (auto&& status_paragraph : installed_ports) + { + Cluster& cluster = graph->get(status_paragraph->package.spec); + + cluster.transient_uninstalled = false; + + cluster.status_paragraphs.emplace_back(status_paragraph); + + auto& status_paragraph_feature = status_paragraph->package.feature; + // In this case, empty string indicates the "core" paragraph for a package. + if (status_paragraph_feature.empty()) + { + cluster.original_features.insert("core"); + } + else + { + cluster.original_features.insert(status_paragraph_feature); + } + } + + // Populate the graph with "remove edges", which are the reverse of the Build-Depends edges. + for (auto&& status_paragraph : installed_ports) + { + auto& spec = status_paragraph->package.spec; + auto& status_paragraph_feature = status_paragraph->package.feature; + auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends, + status_paragraph->package.spec.triplet()); + + for (auto&& dependency : reverse_edges) + { + auto& dep_cluster = graph->get(dependency.spec()); + + auto depends_name = dependency.feature(); + if (depends_name.empty()) depends_name = "core"; + + auto& target_node = dep_cluster.edges[depends_name]; + target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); + } + } + return graph; + } + + PackageGraph::PackageGraph(const PortFileProvider& provider, const StatusParagraphs& status_db) + : m_graph(create_feature_install_graph(provider, status_db)), m_graph_plan(std::make_unique()) + { + } + + PackageGraph::~PackageGraph() {} + + void print_plan(const std::vector& action_plan, const bool is_recursive) + { + std::vector remove_plans; + std::vector rebuilt_plans; + std::vector only_install_plans; + std::vector new_plans; + std::vector already_installed_plans; + std::vector excluded; + + const bool has_non_user_requested_packages = Util::find_if(action_plan, [](const AnyAction& package) -> bool { + if (auto iplan = package.install_action.get()) + return iplan->request_type != RequestType::USER_REQUESTED; + else + return false; + }) != action_plan.cend(); + + for (auto&& action : action_plan) + { + if (auto install_action = action.install_action.get()) + { + // remove plans are guaranteed to come before install plans, so we know the plan will be contained if at + // all. + auto it = Util::find_if( + remove_plans, [&](const RemovePlanAction* plan) { return plan->spec == install_action->spec; }); + if (it != remove_plans.end()) + { + rebuilt_plans.emplace_back(install_action); + } + else + { + switch (install_action->plan_type) + { + case InstallPlanType::INSTALL: only_install_plans.emplace_back(install_action); break; + case InstallPlanType::ALREADY_INSTALLED: + if (install_action->request_type == RequestType::USER_REQUESTED) + already_installed_plans.emplace_back(install_action); + break; + case InstallPlanType::BUILD_AND_INSTALL: new_plans.emplace_back(install_action); break; + case InstallPlanType::EXCLUDED: excluded.emplace_back(install_action); break; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + } + else if (auto remove_action = action.remove_action.get()) + { + remove_plans.emplace_back(remove_action); + } + } + + std::sort(remove_plans.begin(), remove_plans.end(), &RemovePlanAction::compare_by_name); + std::sort(rebuilt_plans.begin(), rebuilt_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(only_install_plans.begin(), only_install_plans.end(), &InstallPlanAction::compare_by_name); + std::sort(new_plans.begin(), new_plans.end(), &InstallPlanAction::compare_by_name); + 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) { + return to_output_string(p->request_type, p->displayname(), p->build_options); + }); + }; + + if (excluded.size() > 0) + { + System::println("The following packages are excluded:\n%s", actions_to_output_string(excluded)); + } + + if (already_installed_plans.size() > 0) + { + System::println("The following packages are already installed:\n%s", + actions_to_output_string(already_installed_plans)); + } + + if (rebuilt_plans.size() > 0) + { + System::println("The following packages will be rebuilt:\n%s", actions_to_output_string(rebuilt_plans)); + } + + if (new_plans.size() > 0) + { + System::println("The following packages will be built and installed:\n%s", + actions_to_output_string(new_plans)); + } + + if (only_install_plans.size() > 0) + { + System::println("The following packages will be directly installed:\n%s", + actions_to_output_string(only_install_plans)); + } + + if (has_non_user_requested_packages) + System::println("Additional packages (*) will be modified to complete this operation."); + + if (remove_plans.size() > 0 && !is_recursive) + { + System::println(System::Color::warning, + "If you are sure you want to rebuild the above packages, run the command with the " + "--recurse option"); + Checks::exit_fail(VCPKG_LINE_INFO); + } + } } diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 32cb6f03e..e3221a12f 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -478,7 +478,9 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console // create the plan const StatusParagraphs status_db = database_load_check(paths); - std::vector export_plan = Dependencies::create_export_plan(paths, opts.specs, status_db); + Dependencies::PathsPortFileProvider provider(paths); + std::vector export_plan = + Dependencies::create_export_plan(provider, paths, opts.specs, status_db); Checks::check_exit(VCPKG_LINE_INFO, !export_plan.empty(), "Export plan cannot be empty"); std::map> group_by_plan_type; diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index c83f0277b..b7d355742 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -85,6 +85,7 @@ namespace vcpkg::Help " vcpkg remove --outdated Uninstall all out-of-date packages\n" " vcpkg list List installed packages\n" " vcpkg update Display list of packages for updating\n" + " vcpkg upgrade Rebuild all outdated packages\n" " vcpkg hash [alg] Hash a file by specific algorithm, default SHA512\n" " vcpkg help topics Display the list of help topics\n" " vcpkg help Display help for a specific topic\n" diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 76dc7a527..dcc130be3 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -292,25 +292,13 @@ namespace vcpkg::Install System::println("Building package %s... ", display_name_with_features); auto result = [&]() -> Build::ExtendedBuildResult { - if (GlobalState::feature_packages) - { - const Build::BuildPackageConfig build_config{ - *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), - action.spec.triplet(), - paths.port_dir(action.spec), - action.build_options, - action.feature_list}; - return Build::build_package(paths, build_config, status_db); - } - else - { - const Build::BuildPackageConfig build_config{ - action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO), - action.spec.triplet(), - paths.port_dir(action.spec), - action.build_options}; - return Build::build_package(paths, build_config, status_db); - } + const Build::BuildPackageConfig build_config{ + *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), + action.spec.triplet(), + paths.port_dir(action.spec), + action.build_options, + action.feature_list}; + return Build::build_package(paths, build_config, status_db); }(); if (result.code != Build::BuildResult::SUCCEEDED) @@ -348,108 +336,6 @@ namespace vcpkg::Install Checks::unreachable(VCPKG_LINE_INFO); } - static void print_plan(const std::vector& action_plan, const bool is_recursive) - { - std::vector remove_plans; - std::vector rebuilt_plans; - std::vector only_install_plans; - std::vector new_plans; - std::vector already_installed_plans; - std::vector excluded; - - const bool has_non_user_requested_packages = Util::find_if(action_plan, [](const AnyAction& package) -> bool { - if (auto iplan = package.install_plan.get()) - return iplan->request_type != RequestType::USER_REQUESTED; - else - return false; - }) != action_plan.cend(); - - for (auto&& action : action_plan) - { - if (auto install_action = action.install_plan.get()) - { - // remove plans are guaranteed to come before install plans, so we know the plan will be contained if at - // all. - auto it = Util::find_if( - remove_plans, [&](const RemovePlanAction* plan) { return plan->spec == install_action->spec; }); - if (it != remove_plans.end()) - { - rebuilt_plans.emplace_back(install_action); - } - else - { - switch (install_action->plan_type) - { - case InstallPlanType::INSTALL: only_install_plans.emplace_back(install_action); break; - case InstallPlanType::ALREADY_INSTALLED: - if (install_action->request_type == RequestType::USER_REQUESTED) - already_installed_plans.emplace_back(install_action); - break; - case InstallPlanType::BUILD_AND_INSTALL: new_plans.emplace_back(install_action); break; - case InstallPlanType::EXCLUDED: excluded.emplace_back(install_action); break; - default: Checks::unreachable(VCPKG_LINE_INFO); - } - } - } - else if (auto remove_action = action.remove_plan.get()) - { - remove_plans.emplace_back(remove_action); - } - } - - std::sort(remove_plans.begin(), remove_plans.end(), &RemovePlanAction::compare_by_name); - std::sort(rebuilt_plans.begin(), rebuilt_plans.end(), &InstallPlanAction::compare_by_name); - std::sort(only_install_plans.begin(), only_install_plans.end(), &InstallPlanAction::compare_by_name); - std::sort(new_plans.begin(), new_plans.end(), &InstallPlanAction::compare_by_name); - 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) { - return to_output_string(p->request_type, p->displayname(), p->build_options); - }); - }; - - if (excluded.size() > 0) - { - System::println("The following packages are excluded:\n%s", actions_to_output_string(excluded)); - } - - if (already_installed_plans.size() > 0) - { - System::println("The following packages are already installed:\n%s", - actions_to_output_string(already_installed_plans)); - } - - if (rebuilt_plans.size() > 0) - { - System::println("The following packages will be rebuilt:\n%s", actions_to_output_string(rebuilt_plans)); - } - - if (new_plans.size() > 0) - { - System::println("The following packages will be built and installed:\n%s", - actions_to_output_string(new_plans)); - } - - if (only_install_plans.size() > 0) - { - System::println("The following packages will be directly installed:\n%s", - actions_to_output_string(only_install_plans)); - } - - if (has_non_user_requested_packages) - System::println("Additional packages (*) will be installed to complete this operation."); - - if (remove_plans.size() > 0 && !is_recursive) - { - System::println(System::Color::warning, - "If you are sure you want to rebuild the above packages, run the command with the " - "--recurse option"); - Checks::exit_fail(VCPKG_LINE_INFO); - } - } - void InstallSummary::print() const { System::println("RESULTS"); @@ -499,7 +385,7 @@ namespace vcpkg::Install results.emplace_back(spec, &action); - if (const auto install_action = action.install_plan.get()) + if (const auto install_action = action.install_action.get()) { auto result = perform_install_plan_action(paths, *install_action, status_db); @@ -511,9 +397,8 @@ namespace vcpkg::Install results.back().build_result = std::move(result); } - else if (const auto remove_action = action.remove_plan.get()) + else if (const auto remove_action = action.remove_action.get()) { - Checks::check_exit(VCPKG_LINE_INFO, GlobalState::feature_packages); Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, status_db); } else @@ -676,31 +561,33 @@ namespace vcpkg::Install }; // Note: action_plan will hold raw pointers to SourceControlFiles from this map - std::unordered_map scf_map; std::vector action_plan; - if (GlobalState::feature_packages) + auto all_ports = Paragraphs::load_all_ports(paths.get_filesystem(), 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); + + action_plan = create_feature_install_plan(provider, FullPackageSpec::to_feature_specs(specs), status_db); + + if (!GlobalState::feature_packages) { - auto all_ports = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); - for (auto&& port : all_ports) + for (auto&& action : action_plan) { - scf_map[port->core_paragraph->name] = std::move(*port); + if (action.remove_action.has_value()) + { + Checks::exit_with_message( + VCPKG_LINE_INFO, + "The installation plan requires feature packages support. Please re-run the " + "command with --featurepackages."); + } } - action_plan = create_feature_install_plan(scf_map, FullPackageSpec::to_feature_specs(specs), status_db); - } - else - { - Dependencies::PathsPortFile paths_port_file(paths); - auto install_plan = Dependencies::create_install_plan( - paths_port_file, Util::fmap(specs, [](auto&& spec) { return spec.package_spec; }), status_db); - - action_plan = Util::fmap( - install_plan, [](InstallPlanAction& install_action) { return AnyAction(std::move(install_action)); }); } for (auto&& action : action_plan) { - if (auto p_install = action.install_plan.get()) + if (auto p_install = action.install_action.get()) { p_install->build_options = install_plan_options; if (p_install->request_type != RequestType::USER_REQUESTED) @@ -713,16 +600,16 @@ namespace vcpkg::Install // log the plan const std::string specs_string = Strings::join(",", action_plan, [](const AnyAction& action) { - if (auto iaction = action.install_plan.get()) + if (auto iaction = action.install_action.get()) return iaction->spec.to_string(); - else if (auto raction = action.remove_plan.get()) + else if (auto raction = action.remove_action.get()) return "R$" + raction->spec.to_string(); Checks::unreachable(VCPKG_LINE_INFO); }); Metrics::g_metrics.lock()->track_property("installplan", specs_string); - print_plan(action_plan, is_recursive); + Dependencies::print_plan(action_plan, is_recursive); if (dry_run) { @@ -752,7 +639,7 @@ namespace vcpkg::Install for (auto&& result : summary.results) { if (!result.action) continue; - if (auto p_install_action = result.action->install_plan.get()) + if (auto p_install_action = result.action->install_action.get()) { if (p_install_action->request_type != RequestType::USER_REQUESTED) continue; auto bpgh = result.get_binary_paragraph(); @@ -773,7 +660,7 @@ namespace vcpkg::Install { if (build_result.binary_control_file) return &build_result.binary_control_file->core_paragraph; if (action) - if (auto p_install_plan = action->install_plan.get()) + if (auto p_install_plan = action->install_action.get()) { if (auto p_bcf = p_install_plan->any_paragraph.binary_control_file.get()) return &p_bcf->core_paragraph; diff --git a/toolsrc/src/vcpkg/paragraphs.cpp b/toolsrc/src/vcpkg/paragraphs.cpp index b93de190c..b66d53994 100644 --- a/toolsrc/src/vcpkg/paragraphs.cpp +++ b/toolsrc/src/vcpkg/paragraphs.cpp @@ -289,16 +289,4 @@ namespace vcpkg::Paragraphs } return std::move(results.paragraphs); } - - std::map load_all_port_names_and_versions(const Files::Filesystem& fs, - const fs::path& ports_dir) - { - auto all_ports = load_all_ports(fs, ports_dir); - - std::map names_and_versions; - for (auto&& port : all_ports) - names_and_versions.emplace(port->core_paragraph->name, port->core_paragraph->version); - - return names_and_versions; - } } diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 8ae0bc881..4079d60c1 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -207,10 +207,11 @@ namespace vcpkg::Remove System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); Checks::exit_fail(VCPKG_LINE_INFO); } - specs = Util::fmap( - Update::find_outdated_packages( - Paragraphs::load_all_port_names_and_versions(paths.get_filesystem(), paths.ports), status_db), - [](auto&& outdated) { return outdated.spec; }); + + Dependencies::PathsPortFileProvider provider(paths); + + specs = Util::fmap(Update::find_outdated_packages(provider, status_db), + [](auto&& outdated) { return outdated.spec; }); if (specs.empty()) { diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index 29baef91e..d6c5614ed 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -14,7 +14,7 @@ namespace vcpkg::Update return left.spec.name() < right.spec.name(); } - std::vector find_outdated_packages(const std::map& src_names_to_versions, + std::vector find_outdated_packages(const Dependencies::PortFileProvider& provider, const StatusParagraphs& status_db) { const std::vector installed_packages = get_installed_ports(status_db); @@ -24,19 +24,23 @@ namespace vcpkg::Update { if (!pgh->package.feature.empty()) { - // Skip feature packages; only consider master packages for needing updates. + // Skip feature paragraphs; only consider master paragraphs for needing updates. continue; } - const auto it = src_names_to_versions.find(pgh->package.spec.name()); - if (it == src_names_to_versions.end()) + auto maybe_scf = provider.get_control_file(pgh->package.spec.name()); + if (auto p_scf = maybe_scf.get()) { - // Package was not installed from portfile - continue; + auto&& port_version = p_scf->core_paragraph->version; + auto&& installed_version = pgh->package.version; + if (installed_version != port_version) + { + output.push_back({pgh->package.spec, VersionDiff(installed_version, port_version)}); + } } - if (it->second != pgh->package.version) + else { - output.push_back({pgh->package.spec, VersionDiff(pgh->package.version, it->second)}); + // No portfile available } } @@ -58,10 +62,10 @@ namespace vcpkg::Update const StatusParagraphs status_db = database_load_check(paths); - const auto outdated_packages = SortedVector( - find_outdated_packages(Paragraphs::load_all_port_names_and_versions(paths.get_filesystem(), paths.ports), - status_db), - &OutdatedPackage::compare_by_name); + Dependencies::PathsPortFileProvider provider(paths); + + const auto outdated_packages = SortedVector(find_outdated_packages(provider, status_db), + &OutdatedPackage::compare_by_name); if (outdated_packages.empty()) { @@ -69,19 +73,17 @@ namespace vcpkg::Update } else { - std::string install_line; System::println("The following packages differ from their port versions:"); for (auto&& package : outdated_packages) { - install_line += package.spec.to_string(); - install_line += " "; System::println(" %-32s %s", package.spec, package.version_diff.to_string()); } System::println("\n" - "To update these packages, run\n" - " .\\vcpkg remove --outdated\n" - " .\\vcpkg install " + - install_line); + "To update these packages and all dependencies, run\n" + " .\\vcpkg upgrade\n" + "\n" + "To only remove outdated packages, run\n" + " .\\vcpkg remove --outdated\n"); } Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 9a7ad6dc0..68345ca85 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -185,6 +185,7 @@ + Create Create diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 966fc7fb9..dfbcf0c7e 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -195,6 +195,9 @@ Source Files\vcpkg + + Source Files\vcpkg + -- cgit v1.2.3 From 6e653d88f685e30fb9c4b82a440a0cc8fb826f71 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 13 Dec 2017 06:20:07 -0800 Subject: [brotli] Fix regressions introduced during update --- ports/brotli/CONTROL | 2 +- ports/brotli/portfile.cmake | 46 ++++++++++++++++----------------------------- 2 files changed, 17 insertions(+), 31 deletions(-) diff --git a/ports/brotli/CONTROL b/ports/brotli/CONTROL index 451b46f9f..0c4d7eb0c 100644 --- a/ports/brotli/CONTROL +++ b/ports/brotli/CONTROL @@ -1,3 +1,3 @@ Source: brotli -Version: 1.0.2 +Version: 1.0.2-1 Description: a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling. diff --git a/ports/brotli/portfile.cmake b/ports/brotli/portfile.cmake index 2479a73aa..b4e33086e 100644 --- a/ports/brotli/portfile.cmake +++ b/ports/brotli/portfile.cmake @@ -11,41 +11,27 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS -DBROTLI_DISABLE_TESTS=ON ) -vcpkg_build_cmake() +vcpkg_install_cmake() -file(GLOB DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" -) -file(GLOB LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" -) -file(GLOB DEBUG_DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" -) -file(GLOB DEBUG_LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" -) -file(GLOB HEADERS "${SOURCE_PATH}/c/include/brotli/*.h" "${SOURCE_PATH}/include/brotli/*.h") -if(DLLS) - file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -endif() -file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/brotli) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/brotli.exe ${CURRENT_PACKAGES_DIR}/tools/brotli/brotli.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/brotli.exe) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/brotli) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB STATIC_LIBS "${CURRENT_PACKAGES_DIR}/lib/*-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*-static.lib") + file(REMOVE ${STATIC_LIBS}) +else() + file(GLOB LIBS "${CURRENT_PACKAGES_DIR}/lib/*.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib") + list(FILTER LIBS EXCLUDE REGEX "-static\\.lib\$") + file(REMOVE_RECURSE ${LIBS} ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/brotli) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brotli RENAME copyright) vcpkg_copy_pdbs() -- cgit v1.2.3 From 0ba4b66293085601d458b52ddf30deb07b279fa1 Mon Sep 17 00:00:00 2001 From: JUAN DENT Date: Wed, 13 Dec 2017 11:55:22 -0600 Subject: Add quotation marks to support user profiles with spaces in them --- toolsrc/src/vcpkg/metrics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index a0d40e7d3..dc7bf824c 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -403,7 +403,7 @@ namespace vcpkg::Metrics fs.write_contents(vcpkg_metrics_txt_path, payload); const std::string cmd_line = - Strings::format("start %s %s", temp_folder_path_exe.u8string(), vcpkg_metrics_txt_path.u8string()); + Strings::format("start \"%s\" \"%s\"", temp_folder_path_exe.u8string(), vcpkg_metrics_txt_path.u8string()); System::cmd_execute_clean(cmd_line); #endif } -- cgit v1.2.3 From e44da2345681f60ea6d1b923672cb5042a336d12 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 13 Dec 2017 10:46:10 -0800 Subject: Revert "Add quotation marks to support user profiles with spaces in them" This reverts commit 0ba4b66293085601d458b52ddf30deb07b279fa1. --- toolsrc/src/vcpkg/metrics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index dc7bf824c..a0d40e7d3 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -403,7 +403,7 @@ namespace vcpkg::Metrics fs.write_contents(vcpkg_metrics_txt_path, payload); const std::string cmd_line = - Strings::format("start \"%s\" \"%s\"", temp_folder_path_exe.u8string(), vcpkg_metrics_txt_path.u8string()); + Strings::format("start %s %s", temp_folder_path_exe.u8string(), vcpkg_metrics_txt_path.u8string()); System::cmd_execute_clean(cmd_line); #endif } -- cgit v1.2.3 From 7a2120dba1fb606b06f555965908db438d10e019 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 13 Dec 2017 11:02:04 -0800 Subject: [vcpkg] Revert revert of #2369. --- toolsrc/include/vcpkg/commands.h | 1 + toolsrc/src/vcpkg/commands.version.cpp | 7 +++++++ toolsrc/src/vcpkg/metrics.cpp | 13 +++++++++---- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index b852a973e..c82f504e0 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -104,6 +104,7 @@ namespace vcpkg::Commands namespace Version { + const char* base_version(); const std::string& version(); void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths); void perform_and_exit(const VcpkgCmdArguments& args); diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp index 3f44cf1a2..c21e8cafd 100644 --- a/toolsrc/src/vcpkg/commands.version.cpp +++ b/toolsrc/src/vcpkg/commands.version.cpp @@ -12,6 +12,13 @@ namespace vcpkg::Commands::Version { + const char* base_version() + { + return +#include "../VERSION.txt" + ; + } + const std::string& version() { static const std::string S_VERSION = diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index a0d40e7d3..cdb21d260 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -1,5 +1,6 @@ #include "pch.h" +#include #include #include @@ -376,8 +377,9 @@ namespace vcpkg::Metrics wchar_t temp_folder[MAX_PATH]; GetTempPathW(MAX_PATH, temp_folder); - const fs::path temp_folder_path = temp_folder; - const fs::path temp_folder_path_exe = temp_folder_path / "vcpkgmetricsuploader.exe"; + const fs::path temp_folder_path = fs::path(temp_folder) / "vcpkg"; + const fs::path temp_folder_path_exe = + temp_folder_path / Strings::format("vcpkgmetricsuploader-%s.exe", Commands::Version::base_version()); auto& fs = Files::get_real_filesystem(); @@ -395,6 +397,8 @@ namespace vcpkg::Metrics }(); std::error_code ec; + fs.create_directories(temp_folder_path, ec); + if (ec) return; fs.copy_file(exe_path, temp_folder_path_exe, fs::copy_options::skip_existing, ec); if (ec) return; } @@ -402,8 +406,9 @@ namespace vcpkg::Metrics const fs::path vcpkg_metrics_txt_path = temp_folder_path / ("vcpkg" + generate_random_UUID() + ".txt"); fs.write_contents(vcpkg_metrics_txt_path, payload); - const std::string cmd_line = - Strings::format("start %s %s", temp_folder_path_exe.u8string(), vcpkg_metrics_txt_path.u8string()); + const std::string cmd_line = Strings::format("start \"vcpkgmetricsuploader.exe\" \"%s\" \"%s\"", + temp_folder_path_exe.u8string(), + vcpkg_metrics_txt_path.u8string()); System::cmd_execute_clean(cmd_line); #endif } -- cgit v1.2.3 From eb92719c5d41b3013050b269ba5ec85383789b17 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Fri, 15 Dec 2017 07:02:25 +1100 Subject: fix naming issues --- ports/qt5modularscripts/qt_modular_library.cmake | 2 +- ports/qt5serial/CONTROL | 4 ---- ports/qt5serial/portfile.cmake | 5 ----- ports/qt5serialport/CONTROL | 4 ++++ ports/qt5serialport/portfile.cmake | 5 +++++ 5 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 ports/qt5serial/CONTROL delete mode 100644 ports/qt5serial/portfile.cmake create mode 100644 ports/qt5serialport/CONTROL create mode 100644 ports/qt5serialport/portfile.cmake diff --git a/ports/qt5modularscripts/qt_modular_library.cmake b/ports/qt5modularscripts/qt_modular_library.cmake index 7aff90f9b..b841d9eb7 100644 --- a/ports/qt5modularscripts/qt_modular_library.cmake +++ b/ports/qt5modularscripts/qt_modular_library.cmake @@ -61,7 +61,7 @@ function(qt_modular_library NAME HASH) foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) file(READ "${DEBUG_MAKEFILE}" _contents) string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") - string(REPLACE "vcpkg\\installed\\${TARGET_TRIPLET}\\lib" "vcpkg\\installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") + string(REPLACE "installed\\${TARGET_TRIPLET}\\lib" "installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib qtmaind.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link qtmaind.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" _contents "${_contents}") file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") endforeach() diff --git a/ports/qt5serial/CONTROL b/ports/qt5serial/CONTROL deleted file mode 100644 index 7782e6a53..000000000 --- a/ports/qt5serial/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5serial -Version: 5.9.2-0 -Description: Qt5 Serial Port - provides access to hardware and virtual serial ports -Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5serial/portfile.cmake b/ports/qt5serial/portfile.cmake deleted file mode 100644 index f4a42f38f..000000000 --- a/ports/qt5serial/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtserialport cc8899c1ae2ed9fd8cf1c213ab7efaec12b3b16836006fdbf74cb7ea457705505a13e82c2f2873ee9426ae66473ec42259f4e728de64576ee44420f116cc433d) diff --git a/ports/qt5serialport/CONTROL b/ports/qt5serialport/CONTROL new file mode 100644 index 000000000..eb87231e0 --- /dev/null +++ b/ports/qt5serialport/CONTROL @@ -0,0 +1,4 @@ +Source: qt5serialport +Version: 5.9.2-0 +Description: Qt5 Serial Port - provides access to hardware and virtual serial ports +Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5serialport/portfile.cmake b/ports/qt5serialport/portfile.cmake new file mode 100644 index 000000000..f4a42f38f --- /dev/null +++ b/ports/qt5serialport/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtserialport cc8899c1ae2ed9fd8cf1c213ab7efaec12b3b16836006fdbf74cb7ea457705505a13e82c2f2873ee9426ae66473ec42259f4e728de64576ee44420f116cc433d) -- cgit v1.2.3 From 54c0f87da73fba58b70a105046abdb55f40d015a Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Fri, 15 Dec 2017 07:07:24 +1100 Subject: change to python2 for future web engine support --- ports/qt5modularscripts/qt_modular_library.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/qt5modularscripts/qt_modular_library.cmake b/ports/qt5modularscripts/qt_modular_library.cmake index b841d9eb7..336a3913d 100644 --- a/ports/qt5modularscripts/qt_modular_library.cmake +++ b/ports/qt5modularscripts/qt_modular_library.cmake @@ -37,9 +37,9 @@ function(qt_modular_library NAME HASH) file(REMOVE_RECURSE "${DEBUG_DIR}" "${RELEASE_DIR}") #Find Python and add it to the path - vcpkg_find_acquire_program(PYTHON3) - get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) - set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") + vcpkg_find_acquire_program(PYTHON2) + get_filename_component(PYTHON2_EXE_PATH ${PYTHON2} DIRECTORY) + set(ENV{PATH} "${PYTHON2_EXE_PATH};$ENV{PATH}") file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) @@ -92,7 +92,7 @@ function(qt_modular_library NAME HASH) #Fix the cmake files if they exist if(EXISTS ${RELEASE_DIR}/lib/cmake) vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${_qt5base_port_dir}/fixcmake.py + COMMAND ${PYTHON2} ${_qt5base_port_dir}/fixcmake.py WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake LOGNAME fix-cmake ) -- cgit v1.2.3 From 22e9a2b25db21e1d1a1f75786442f2c90ae0db0c Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Fri, 15 Dec 2017 07:15:38 +1100 Subject: change serial module name --- ports/qt5/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index 060b41e3c..e8c7f6f01 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 Version: 5.9.2-1 Description: Qt5 Application Framework -Build-Depends: qt5base, qt5charts, qt5datavis3d, qt5declarative, qt5gamepad, qt5imageformats, qt5multimedia, qt5scxml, qt5serial, qt5speech, qt5svg, qt5tools, qt5virtualkeyboard, qt5websockets, qt53d, qt5winextras, qt5xmlpatterns +Build-Depends: qt5base, qt5charts, qt5datavis3d, qt5declarative, qt5gamepad, qt5imageformats, qt5multimedia, qt5scxml, qt5serialport, qt5speech, qt5svg, qt5tools, qt5virtualkeyboard, qt5websockets, qt53d, qt5winextras, qt5xmlpatterns -- cgit v1.2.3 From a196d7e398d37d54cf22038c1f1ce6ed0313465d Mon Sep 17 00:00:00 2001 From: jasjuang Date: Thu, 14 Dec 2017 13:29:55 -0800 Subject: [tinyxml2] update to 6.0.0 --- ports/tinyxml2/CONTROL | 2 +- ports/tinyxml2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL index c2b75c438..70bc8c107 100644 --- a/ports/tinyxml2/CONTROL +++ b/ports/tinyxml2/CONTROL @@ -1,3 +1,3 @@ Source: tinyxml2 -Version: 5.0.1-1 +Version: 6.0.0 Description: A simple, small, efficient, C++ XML parser diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake index 0c8b0b84b..cf8373e4f 100644 --- a/ports/tinyxml2/portfile.cmake +++ b/ports/tinyxml2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO leethomason/tinyxml2 - REF 5.0.1 - SHA512 a51ec5843774df0482620c549fb6c61d30a6db5025be26ff6d25b3c53533a27a57f00b026bd9fbca78e9e30084b3f5f6fbff9dba315d078419da084b57f518ba + REF 6.0.0 + SHA512 30c68f491830187738b01ca5db1a96e7b4907cf8fa09a533c90ea084ab5e73f798dff6305cfc4edccc8989926e91c0482677bb5796799113c839dbd0528c8ad5 HEAD_REF master ) -- cgit v1.2.3 From 63a23cf0cad4da12eed69883f37c21d319461187 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 14 Dec 2017 14:31:16 -0800 Subject: [vcpkg] Fix regressions in WSL build. --- toolsrc/CMakeLists.txt | 4 +- toolsrc/include/vcpkg/base/optional.h | 6 +- toolsrc/src/commands.upgrade.cpp | 180 ------------------------------ toolsrc/src/vcpkg/base/chrono.cpp | 22 ++-- toolsrc/src/vcpkg/commands.upgrade.cpp | 180 ++++++++++++++++++++++++++++++ toolsrc/src/vcpkg/userconfig.cpp | 7 +- toolsrc/vcpkglib/vcpkglib.vcxproj | 2 +- toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 2 +- 8 files changed, 207 insertions(+), 196 deletions(-) delete mode 100644 toolsrc/src/commands.upgrade.cpp create mode 100644 toolsrc/src/vcpkg/commands.upgrade.cpp diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index 51578e4e4..0168e2de2 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -3,10 +3,12 @@ project(vcpkg CXX) add_compile_options(-std=c++1z) -if(CMAKE_COMPILER_IS_GNUXX) +if(CMAKE_COMPILER_IS_GNUXX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") set(GCC 1) elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") set(CLANG 1) +else() + message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}") endif() file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp) diff --git a/toolsrc/include/vcpkg/base/optional.h b/toolsrc/include/vcpkg/base/optional.h index aa9e480fd..af2d297a6 100644 --- a/toolsrc/include/vcpkg/base/optional.h +++ b/toolsrc/include/vcpkg/base/optional.h @@ -53,10 +53,8 @@ namespace vcpkg // Constructors are intentionally implicit constexpr Optional(NullOpt) {} - Optional(const T& t) : m_base(t) {} - - template::value>> - Optional(T&& t) : m_base(std::move(t)) + template + Optional(U&& t) : m_base(std::forward(t)) { } diff --git a/toolsrc/src/commands.upgrade.cpp b/toolsrc/src/commands.upgrade.cpp deleted file mode 100644 index d2c868870..000000000 --- a/toolsrc/src/commands.upgrade.cpp +++ /dev/null @@ -1,180 +0,0 @@ -#include "pch.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace vcpkg::Commands::Upgrade -{ - using Install::KeepGoing; - using Install::to_keep_going; - - static const std::string OPTION_NO_DRY_RUN = "--no-dry-run"; - static const std::string OPTION_KEEP_GOING = "--keep-going"; - - static const std::array INSTALL_SWITCHES = {{ - {OPTION_NO_DRY_RUN, "Actually upgrade"}, - {OPTION_KEEP_GOING, "Continue installing packages on failure"}, - }}; - - const CommandStructure COMMAND_STRUCTURE = { - Help::create_example_string("upgrade --no-dry-run"), - 0, - SIZE_MAX, - {INSTALL_SWITCHES, {}}, - nullptr, - }; - - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) - { - const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); - - const bool no_dry_run = Util::Sets::contains(options.switches, OPTION_NO_DRY_RUN); - const KeepGoing keep_going = to_keep_going(Util::Sets::contains(options.switches, OPTION_KEEP_GOING)); - - StatusParagraphs status_db = database_load_check(paths); - - Dependencies::PathsPortFileProvider provider(paths); - Dependencies::PackageGraph graph(provider, status_db); - - // input sanitization - const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { - return Input::check_and_get_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); - }); - - for (auto&& spec : specs) - { - Input::check_triplet(spec.triplet(), paths); - } - - if (specs.empty()) - { - // If no packages specified, upgrade all outdated packages. - auto outdated_packages = Update::find_outdated_packages(provider, status_db); - - if (outdated_packages.empty()) - { - System::println("All installed packages are up-to-date with the local portfiles."); - Checks::exit_success(VCPKG_LINE_INFO); - } - - for (auto&& outdated_package : outdated_packages) - graph.upgrade(outdated_package.spec); - } - else - { - std::vector not_installed; - std::vector no_portfile; - std::vector to_upgrade; - std::vector up_to_date; - - for (auto&& spec : specs) - { - auto it = status_db.find_installed(spec); - if (it == status_db.end()) - { - not_installed.push_back(spec); - } - - auto maybe_scf = provider.get_control_file(spec.name()); - if (auto p_scf = maybe_scf.get()) - { - if (it != status_db.end()) - { - if (p_scf->core_paragraph->version != (*it)->package.version) - { - to_upgrade.push_back(spec); - } - else - { - up_to_date.push_back(spec); - } - } - } - else - { - no_portfile.push_back(spec); - } - } - - Util::sort(not_installed); - Util::sort(no_portfile); - Util::sort(up_to_date); - Util::sort(to_upgrade); - - if (!up_to_date.empty()) - { - System::println(System::Color::success, "The following packages are up-to-date:"); - System::println(Strings::join( - "", up_to_date, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); - } - - if (!not_installed.empty()) - { - System::println(System::Color::error, "The following packages are not installed:"); - System::println(Strings::join( - "", not_installed, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); - } - - if (!no_portfile.empty()) - { - System::println(System::Color::error, "The following packages do not have a valid portfile:"); - System::println(Strings::join( - "", no_portfile, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); - } - - Checks::check_exit(VCPKG_LINE_INFO, not_installed.empty() && no_portfile.empty()); - - if (to_upgrade.empty()) Checks::exit_success(VCPKG_LINE_INFO); - - for (auto&& spec : to_upgrade) - graph.upgrade(spec); - } - - auto plan = graph.serialize(); - - Checks::check_exit(VCPKG_LINE_INFO, !plan.empty()); - - const Build::BuildPackageOptions install_plan_options = { - Build::UseHeadVersion::NO, - Build::AllowDownloads::YES, - Build::CleanBuildtrees::NO, - }; - - // Set build settings for all install actions - for (auto&& action : plan) - { - if (auto p_install = action.install_action.get()) - { - p_install->build_options = install_plan_options; - } - } - - Dependencies::print_plan(plan, true); - - if (!no_dry_run) - { - System::println(System::Color::warning, - "If you are sure you want to rebuild the above packages, run this command with the " - "--no-dry-run option."); - Checks::exit_fail(VCPKG_LINE_INFO); - } - - const Install::InstallSummary summary = Install::perform(plan, keep_going, paths, status_db); - - System::println("\nTotal elapsed time: %s\n", summary.total_elapsed_time); - - if (keep_going == KeepGoing::YES) - { - summary.print(); - } - - Checks::exit_success(VCPKG_LINE_INFO); - } -} diff --git a/toolsrc/src/vcpkg/base/chrono.cpp b/toolsrc/src/vcpkg/base/chrono.cpp index 03c1ecce9..00f8ba3f1 100644 --- a/toolsrc/src/vcpkg/base/chrono.cpp +++ b/toolsrc/src/vcpkg/base/chrono.cpp @@ -92,14 +92,20 @@ namespace vcpkg::Chrono Optional CTime::parse(CStringView str) { CTime ret; - auto assigned = sscanf_s(str.c_str(), - "%d-%d-%dT%d:%d:%d.", - &ret.m_tm.tm_year, - &ret.m_tm.tm_mon, - &ret.m_tm.tm_mday, - &ret.m_tm.tm_hour, - &ret.m_tm.tm_min, - &ret.m_tm.tm_sec); + auto assigned = +#if defined(_WIN32) + sscanf_s +#else + sscanf +#endif + (str.c_str(), + "%d-%d-%dT%d:%d:%d.", + &ret.m_tm.tm_year, + &ret.m_tm.tm_mon, + &ret.m_tm.tm_mday, + &ret.m_tm.tm_hour, + &ret.m_tm.tm_min, + &ret.m_tm.tm_sec); if (assigned != 6) return nullopt; if (ret.m_tm.tm_year < 1900) return nullopt; ret.m_tm.tm_year -= 1900; diff --git a/toolsrc/src/vcpkg/commands.upgrade.cpp b/toolsrc/src/vcpkg/commands.upgrade.cpp new file mode 100644 index 000000000..d2c868870 --- /dev/null +++ b/toolsrc/src/vcpkg/commands.upgrade.cpp @@ -0,0 +1,180 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Commands::Upgrade +{ + using Install::KeepGoing; + using Install::to_keep_going; + + static const std::string OPTION_NO_DRY_RUN = "--no-dry-run"; + static const std::string OPTION_KEEP_GOING = "--keep-going"; + + static const std::array INSTALL_SWITCHES = {{ + {OPTION_NO_DRY_RUN, "Actually upgrade"}, + {OPTION_KEEP_GOING, "Continue installing packages on failure"}, + }}; + + const CommandStructure COMMAND_STRUCTURE = { + Help::create_example_string("upgrade --no-dry-run"), + 0, + SIZE_MAX, + {INSTALL_SWITCHES, {}}, + nullptr, + }; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + { + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); + + const bool no_dry_run = Util::Sets::contains(options.switches, OPTION_NO_DRY_RUN); + const KeepGoing keep_going = to_keep_going(Util::Sets::contains(options.switches, OPTION_KEEP_GOING)); + + StatusParagraphs status_db = database_load_check(paths); + + Dependencies::PathsPortFileProvider provider(paths); + Dependencies::PackageGraph graph(provider, status_db); + + // input sanitization + const std::vector specs = Util::fmap(args.command_arguments, [&](auto&& arg) { + return Input::check_and_get_package_spec(arg, default_triplet, COMMAND_STRUCTURE.example_text); + }); + + for (auto&& spec : specs) + { + Input::check_triplet(spec.triplet(), paths); + } + + if (specs.empty()) + { + // If no packages specified, upgrade all outdated packages. + auto outdated_packages = Update::find_outdated_packages(provider, status_db); + + if (outdated_packages.empty()) + { + System::println("All installed packages are up-to-date with the local portfiles."); + Checks::exit_success(VCPKG_LINE_INFO); + } + + for (auto&& outdated_package : outdated_packages) + graph.upgrade(outdated_package.spec); + } + else + { + std::vector not_installed; + std::vector no_portfile; + std::vector to_upgrade; + std::vector up_to_date; + + for (auto&& spec : specs) + { + auto it = status_db.find_installed(spec); + if (it == status_db.end()) + { + not_installed.push_back(spec); + } + + auto maybe_scf = provider.get_control_file(spec.name()); + if (auto p_scf = maybe_scf.get()) + { + if (it != status_db.end()) + { + if (p_scf->core_paragraph->version != (*it)->package.version) + { + to_upgrade.push_back(spec); + } + else + { + up_to_date.push_back(spec); + } + } + } + else + { + no_portfile.push_back(spec); + } + } + + Util::sort(not_installed); + Util::sort(no_portfile); + Util::sort(up_to_date); + Util::sort(to_upgrade); + + if (!up_to_date.empty()) + { + System::println(System::Color::success, "The following packages are up-to-date:"); + System::println(Strings::join( + "", up_to_date, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); + } + + if (!not_installed.empty()) + { + System::println(System::Color::error, "The following packages are not installed:"); + System::println(Strings::join( + "", not_installed, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); + } + + if (!no_portfile.empty()) + { + System::println(System::Color::error, "The following packages do not have a valid portfile:"); + System::println(Strings::join( + "", no_portfile, [](const PackageSpec& spec) { return " " + spec.to_string() + "\n"; })); + } + + Checks::check_exit(VCPKG_LINE_INFO, not_installed.empty() && no_portfile.empty()); + + if (to_upgrade.empty()) Checks::exit_success(VCPKG_LINE_INFO); + + for (auto&& spec : to_upgrade) + graph.upgrade(spec); + } + + auto plan = graph.serialize(); + + Checks::check_exit(VCPKG_LINE_INFO, !plan.empty()); + + const Build::BuildPackageOptions install_plan_options = { + Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::NO, + }; + + // Set build settings for all install actions + for (auto&& action : plan) + { + if (auto p_install = action.install_action.get()) + { + p_install->build_options = install_plan_options; + } + } + + Dependencies::print_plan(plan, true); + + if (!no_dry_run) + { + System::println(System::Color::warning, + "If you are sure you want to rebuild the above packages, run this command with the " + "--no-dry-run option."); + Checks::exit_fail(VCPKG_LINE_INFO); + } + + const Install::InstallSummary summary = Install::perform(plan, keep_going, paths, status_db); + + System::println("\nTotal elapsed time: %s\n", summary.total_elapsed_time); + + if (keep_going == KeepGoing::YES) + { + summary.print(); + } + + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/userconfig.cpp b/toolsrc/src/vcpkg/userconfig.cpp index d13a46f41..906594691 100644 --- a/toolsrc/src/vcpkg/userconfig.cpp +++ b/toolsrc/src/vcpkg/userconfig.cpp @@ -5,6 +5,7 @@ #include #include +#if defined(_WIN32) namespace { static vcpkg::Lazy s_localappdata; @@ -24,13 +25,14 @@ namespace }); } } +#endif namespace vcpkg { UserConfig UserConfig::try_read_data(const Files::Filesystem& fs) { UserConfig ret; - +#if defined(_WIN32) try { auto maybe_pghs = Paragraphs::get_paragraphs(fs, get_localappdata() / "vcpkg" / "config"); @@ -56,12 +58,14 @@ namespace vcpkg catch (...) { } +#endif return ret; } void UserConfig::try_write_data(Files::Filesystem& fs) const { +#if defined(_WIN32) try { std::error_code ec; @@ -79,5 +83,6 @@ namespace vcpkg catch (...) { } +#endif } } diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 68345ca85..455891f85 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -185,7 +185,6 @@ - Create Create @@ -221,6 +220,7 @@ + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index dfbcf0c7e..f8f517ad7 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -195,7 +195,7 @@ Source Files\vcpkg - + Source Files\vcpkg -- cgit v1.2.3 From 9af036fc0ef9dd4bf23c48c7dc8da372442d9056 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 14 Dec 2017 19:06:12 -0800 Subject: [cpprestsdk] Update to 2.10.1 --- 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 48b7a26e0..bfc2c7fe4 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,5 @@ Source: cpprestsdk -Version: 2.10.0 +Version: 2.10.1 Build-Depends: zlib, openssl (windows), boost (windows), websocketpp (windows) Description: C++11 JSON, REST, and OAuth library The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index 6f339c48a..be7423997 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.0 - SHA512 78e7a38c21db5b563d08cb082bfa96360ac44c66f2189a614d3d2bb71655fd82d931f138590d2dba2d6a4c0884ae37a5be34ea3b753c3517bd68ce490daf60b4 + REF v2.10.1 + SHA512 f6a93e5e87e27db724ccc028326b1dce243617cb0ae0d101b2cea700c4f264c073cb0e8a9d88a14be165e16ef2f1f43a17e49278087bc8cf372e623a1b6a9c47 HEAD_REF master ) -- cgit v1.2.3 From 839285590a727ee2570856e79424dffeced2c1ed Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 14 Dec 2017 22:24:37 -0800 Subject: [gtest] Fix issue with renaming gtest DLLs in debug mode --- ports/gtest/CONTROL | 2 +- ports/gtest/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index 09a418b81..d3086b8ac 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,3 +1,3 @@ Source: gtest -Version: 1.8.0-4 +Version: 1.8.0-5 Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index 39e56bc6c..b1f9e5dce 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -62,10 +62,10 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.dll) endif() if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin/) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtestd.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_maind.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmockd.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_maind.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_main.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_main.dll) endif() if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.lib) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) -- cgit v1.2.3 From 19cb7978387ff12edf992d0bfc23706f60a3b5a4 Mon Sep 17 00:00:00 2001 From: IronsDu Date: Fri, 15 Dec 2017 15:12:21 +0800 Subject: Added port brynet - A C++ cross platform high performance TCP network library using C++ 11. --- ports/brynet/CONTROL | 4 ++++ ports/brynet/portfile.cmake | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 ports/brynet/CONTROL create mode 100644 ports/brynet/portfile.cmake diff --git a/ports/brynet/CONTROL b/ports/brynet/CONTROL new file mode 100644 index 000000000..005d7d02e --- /dev/null +++ b/ports/brynet/CONTROL @@ -0,0 +1,4 @@ +Source: brynet +Version: 0.9.0 +Description: A C++ cross platform high performance tcp network library, and support SSL/HTTP/Websocket. +Build-Depends: diff --git a/ports/brynet/portfile.cmake b/ports/brynet/portfile.cmake new file mode 100644 index 000000000..4321185d4 --- /dev/null +++ b/ports/brynet/portfile.cmake @@ -0,0 +1,42 @@ +# 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) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Alembic does not support dynamic linkage. Building statically.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +set(BRYNET_VERSION 0.9.0) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/brynet-${BRYNET_VERSION}) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/IronsDu/brynet/archive/v${BRYNET_VERSION}.zip" + FILENAME "v${BRYNET_VERSION}.zip" + SHA512 a39bdffe6bb9b93bd6f21da0d59b172c2956c5f9366716dff01027f59660ca4d28ee557a42caa93d93047e041438a1de42ed22c67a3c2124d105a63381ac3685 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +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() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/brynet-${BRYNET_VERSION}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brynet) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/brynet/LICENSE ${CURRENT_PACKAGES_DIR}/share/brynet/copyright) +# Handle copyright +# file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brynet RENAME copyright) -- cgit v1.2.3 From 361c69660e7c57af20d2b23eddfd3bdb78d85cf3 Mon Sep 17 00:00:00 2001 From: Mark Garcia Date: Fri, 15 Dec 2017 17:59:11 +0800 Subject: [tbb] Update to 2018_U2 --- ports/tbb/CONTROL | 2 +- ports/tbb/portfile.cmake | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ports/tbb/CONTROL b/ports/tbb/CONTROL index a9a584c06..1de2e57a5 100644 --- a/ports/tbb/CONTROL +++ b/ports/tbb/CONTROL @@ -1,3 +1,3 @@ Source: tbb -Version: 2017_U7 +Version: 2018_U2 Description: Intel's Threading Building Blocks. diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index 7bde0c416..12e07ba78 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -5,17 +5,14 @@ endif() if (VCPKG_CRT_LINKAGE STREQUAL static) message(FATAL_ERROR "TBB does not currently support static crt linkage") endif() -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "TBB does not currently support UWP") -endif() include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO 01org/tbb - REF 2017_U7 - SHA512 e4a6fcc3cace9b57061e8661b09af9cb2be721224889af52f4c1b4faec1a130512b7c960e21171ebb8105593a81bd9b80bef20cda91bfac174d535d0f7ccb680 - HEAD_REF tbb_2017) + REF 2018_U2 + SHA512 a94b55bcabec47424be1c2d4b7bf3502a545bc714250a260e152b00431420094dbab64c0355bd0004ee9ad10d85c7b920969bf4b6d9a30b3697c7c5202518841 + HEAD_REF tbb_2018) if(TRIPLET_SYSTEM_ARCH STREQUAL x86) set(BUILD_ARCH Win32) @@ -23,7 +20,9 @@ else() set(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) endif() -vcpkg_build_msbuild(PROJECT_PATH ${SOURCE_PATH}/build/vs2012/makefile.sln PLATFORM ${BUILD_ARCH}) +set(TBB_MSBUILD_PROJECT_DIR ${SOURCE_PATH}/build/vs2013) + +vcpkg_build_msbuild(PROJECT_PATH ${TBB_MSBUILD_PROJECT_DIR}/makefile.sln PLATFORM ${BUILD_ARCH}) # Installation message(STATUS "Installing") @@ -32,8 +31,8 @@ file(COPY ${SOURCE_PATH}/include/serial DESTINATION ${CURRENT_PACKAGES_DIR}/include) -set(DEBUG_OUTPUT_PATH ${SOURCE_PATH}/build/vs2012/${BUILD_ARCH}/Debug) -set(RELEASE_OUTPUT_PATH ${SOURCE_PATH}/build/vs2012/${BUILD_ARCH}/Release) +set(DEBUG_OUTPUT_PATH ${TBB_MSBUILD_PROJECT_DIR}/${BUILD_ARCH}/Debug) +set(RELEASE_OUTPUT_PATH ${TBB_MSBUILD_PROJECT_DIR}/${BUILD_ARCH}/Release) file(COPY ${RELEASE_OUTPUT_PATH}/tbb.lib @@ -59,7 +58,6 @@ file(COPY vcpkg_copy_pdbs() -# Since 2017_U7 TBB provides a CMake script to generate config file include(${SOURCE_PATH}/cmake/TBBMakeConfig.cmake) tbb_make_config(TBB_ROOT ${CURRENT_PACKAGES_DIR} CONFIG_DIR TBB_CONFIG_DIR # is set to ${CURRENT_PACKAGES_DIR}/cmake -- cgit v1.2.3 From 7c701c801259fa5e9c2703874d447ce86f2ce762 Mon Sep 17 00:00:00 2001 From: WPMGPRoSToTeMa Date: Fri, 15 Dec 2017 21:20:32 +0300 Subject: [gsl-lite] Updated to 0.26.0 --- ports/gsl-lite/CONTROL | 2 +- ports/gsl-lite/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/gsl-lite/CONTROL b/ports/gsl-lite/CONTROL index 0facec7fd..1d93638e0 100644 --- a/ports/gsl-lite/CONTROL +++ b/ports/gsl-lite/CONTROL @@ -1,3 +1,3 @@ Source: gsl-lite -Version: 0.24.0 +Version: 0.26.0 Description: A single-file header-only version of ISO C++ Guideline Support Library (GSL) for C++98, C++11 and later diff --git a/ports/gsl-lite/portfile.cmake b/ports/gsl-lite/portfile.cmake index a2773b759..807e13233 100644 --- a/ports/gsl-lite/portfile.cmake +++ b/ports/gsl-lite/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(GSL_LITE_VERSION v0.24.0) +set(GSL_LITE_VERSION v0.26.0) vcpkg_download_distfile(HEADER URLS "https://github.com/martinmoene/gsl-lite/releases/download/${GSL_LITE_VERSION}/gsl-lite.h" FILENAME "gsl-lite-${GSL_LITE_VERSION}.h" - SHA512 fbe93aadf25feb488c2190e867933f198adb92a5a87e6bee8a8e1d6f0185829953348cb67eb52f70945d5a3cdb1f4d7403cfd950ab808b215ce445c37e9d9daf + SHA512 22bfa69120f98662adca0459a876186086f5deecfaaad6e0d7420fa2b2f7acac63c767b3b1f8915d36f3a44e647a730e2c22f2587befc938e81ea4329c5f2185 ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From 9dd2ff2f079f552d2e4eeee1bfe20808d017d943 Mon Sep 17 00:00:00 2001 From: Chainik Date: Sun, 17 Dec 2017 15:01:07 +0100 Subject: [nlohmann-json] Update to 3.0.0 --- ports/nlohmann-json/CONTROL | 2 +- ports/nlohmann-json/portfile.cmake | 30 +++++++++++++----------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/ports/nlohmann-json/CONTROL b/ports/nlohmann-json/CONTROL index 90b6e504e..1b268b456 100644 --- a/ports/nlohmann-json/CONTROL +++ b/ports/nlohmann-json/CONTROL @@ -1,3 +1,3 @@ Source: nlohmann-json -Version: 2.1.1-1 +Version: 3.0.0 Description: JSON for Modern C++ diff --git a/ports/nlohmann-json/portfile.cmake b/ports/nlohmann-json/portfile.cmake index 8a8f5dc30..d03c5b395 100644 --- a/ports/nlohmann-json/portfile.cmake +++ b/ports/nlohmann-json/portfile.cmake @@ -1,22 +1,18 @@ include(vcpkg_common_functions) -set(SOURCE_VERSION 2.1.1) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/json-${SOURCE_VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/nlohmann/json/archive/v${SOURCE_VERSION}.zip" - FILENAME "nlohmann-json-v${SOURCE_VERSION}.zip" - SHA512 7f7155c4bcc4f704f329ba6976c31888a45d17bc2fa08ee9e64dc1b0b1f39439819b895cda9d77f3f60446ad6f5802e9c6ae79fbaf6d1b6f7e49ca050b86cd7c -) -vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) +set(SOURCE_VERSION 3.0.0) -vcpkg_install_cmake() +vcpkg_download_distfile(HEADER + URLS "https://github.com/nlohmann/json/releases/download/v${SOURCE_VERSION}/json.hpp" + FILENAME "nlohmann-json-${SOURCE_VERSION}.hpp" + SHA512 0983320160900e7dbb1241d10f5be6eb0c1be39f2af3f153f488533c381e909f4af0d60c25c6a2e4bb7b69ad1ff0033651c52fe36886f917324f355281e99c05 +) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +vcpkg_download_distfile(LICENSE + URLS "https://github.com/nlohmann/json/raw/v${SOURCE_VERSION}/LICENSE.MIT" + FILENAME "nlohmann-json-LICENSE-${SOURCE_VERSION}.txt" + SHA512 629ac4ed0128af8750ddaefb86b01e52243457020b54e3c38a1a772dbbc1598442a45ab9a0537bd47e35eafa73df0a9d1f1ebe235f339dcd2df1083219ded2d1 +) -file(COPY ${SOURCE_PATH}/LICENSE.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/nlohmann-json) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/nlohmann-json/LICENSE.MIT ${CURRENT_PACKAGES_DIR}/share/nlohmann-json/copyright) +file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include/nlohmann RENAME json.hpp) +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/nlohmann-json RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From 8ad25f0506c8fefa0a6ae9801b4d1c82d2ad8da1 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Mon, 18 Dec 2017 11:06:27 -0800 Subject: Update string-theory to 1.7 --- ports/string-theory/CONTROL | 2 +- ports/string-theory/disableTests.patch | 13 ------------- ports/string-theory/portfile.cmake | 10 +++------- 3 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 ports/string-theory/disableTests.patch diff --git a/ports/string-theory/CONTROL b/ports/string-theory/CONTROL index 26cf23674..04384f8fb 100644 --- a/ports/string-theory/CONTROL +++ b/ports/string-theory/CONTROL @@ -1,3 +1,3 @@ Source: string-theory -Version: 1.6-1 +Version: 1.7 Description: Flexible C++11 string library with type-safe formatting. diff --git a/ports/string-theory/disableTests.patch b/ports/string-theory/disableTests.patch deleted file mode 100644 index 7990385ac..000000000 --- a/ports/string-theory/disableTests.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cf79105..a29c209 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -230,5 +230,6 @@ install(FILES - install(EXPORT string_theory-targets - DESTINATION "${ST_INSTALL_CMAKE_DIR}/string_theory" COMPONENT devel) - --enable_testing() --add_subdirectory(test) -+# Note:we do not mind the tests, which caused our library build failed ,so disable the tests -+#enable_testing() -+#add_subdirectory(test) diff --git a/ports/string-theory/portfile.cmake b/ports/string-theory/portfile.cmake index e3508b76a..c986839e1 100644 --- a/ports/string-theory/portfile.cmake +++ b/ports/string-theory/portfile.cmake @@ -3,15 +3,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zrax/string_theory - REF 1.6 - SHA512 5bc99b6dfc2ab43d2812ee47dfbbeeb68106da39b2349799ab924f009270166ebb5508f87a37e634fbfa5495dd263697a582404650eedc5393722761c5ce2028 + REF 1.7 + SHA512 59b367542a0dde727bf58791a94eed1b0f7007d1c661a8e728f3668bb284cadd98a03379cb96dc832e5230b6e991b66b9c8522e3525ed168505d9b930af5d239 HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/disableTests.patch -) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(ST_BUILD_STATIC ON) else() -- cgit v1.2.3 From 3f43b56bd98f9567c05c458560e587e58d9a9776 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Mon, 18 Dec 2017 20:59:31 -0800 Subject: Update Range-V3-VS2015. --- ports/range-v3/CONTROL | 2 +- ports/range-v3/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/range-v3/CONTROL b/ports/range-v3/CONTROL index 2bf8b6087..6325b3a55 100644 --- a/ports/range-v3/CONTROL +++ b/ports/range-v3/CONTROL @@ -1,3 +1,3 @@ Source: range-v3 -Version: 20151130-vcpkg4 +Version: 20151130-vcpkg5 Description: Range library for C++11/14/17. diff --git a/ports/range-v3/portfile.cmake b/ports/range-v3/portfile.cmake index 61429548b..b4c0c1403 100644 --- a/ports/range-v3/portfile.cmake +++ b/ports/range-v3/portfile.cmake @@ -17,8 +17,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/Range-V3-VS2015 - REF 2695c779d52717b635e97352fed6b75d32eba7a4 - SHA512 a1dad795b15c8491963f75fb58097dd290203406038cb2790c66b7ebd854a42043a92cfa2fed30c125529c3aa8d0cfc05cf1d149c84e96eb1f865857ad87adeb + REF 423bcae5cf18948591361329784d3b12ef41711b + SHA512 c6756bc6b5131c4c0ffb96550fb40decf734fc8c30e3d51c5c2bf03aae4d7426de36e896a1abf0a200a49a3906d4b60c1cf52f43504554b64d89c91de3e92746 HEAD_REF master ) -- cgit v1.2.3 From 5ac69dd02bef426d71ed1e58923345c9042c37dc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 18 Dec 2017 23:00:11 -0800 Subject: [vcpkg] Improve error message upon graph cycle detected. --- toolsrc/include/vcpkg/base/graphs.h | 155 +++++++++++++---------------------- toolsrc/include/vcpkg/dependencies.h | 1 - toolsrc/src/vcpkg/dependencies.cpp | 11 +-- 3 files changed, 63 insertions(+), 104 deletions(-) diff --git a/toolsrc/include/vcpkg/base/graphs.h b/toolsrc/include/vcpkg/base/graphs.h index b585d2bb9..bd22bbcb0 100644 --- a/toolsrc/include/vcpkg/base/graphs.h +++ b/toolsrc/include/vcpkg/base/graphs.h @@ -4,6 +4,7 @@ #include #include +#include namespace vcpkg::Graphs { @@ -23,139 +24,97 @@ namespace vcpkg::Graphs struct AdjacencyProvider { virtual std::vector adjacency_list(const U& vertex) const = 0; - + virtual std::string to_string(const V& vertex) const = 0; virtual U load_vertex_data(const V& vertex) const = 0; }; - template - static void topological_sort_internal(const V& vertex, - const AdjacencyProvider& f, - std::unordered_map& exploration_status, - std::vector& sorted) + namespace details { - ExplorationStatus& status = exploration_status[vertex]; - switch (status) + template + void topological_sort_internal(const V& vertex, + const AdjacencyProvider& f, + std::unordered_map& exploration_status, + std::vector& sorted) { - case ExplorationStatus::FULLY_EXPLORED: return; - case ExplorationStatus::PARTIALLY_EXPLORED: Checks::exit_with_message(VCPKG_LINE_INFO, "cycle in graph"); - case ExplorationStatus::NOT_EXPLORED: + ExplorationStatus& status = exploration_status[vertex]; + switch (status) { - status = ExplorationStatus::PARTIALLY_EXPLORED; - U vertex_data = f.load_vertex_data(vertex); - for (const V& neighbour : f.adjacency_list(vertex_data)) - topological_sort_internal(neighbour, f, exploration_status, sorted); - - sorted.push_back(std::move(vertex_data)); - status = ExplorationStatus::FULLY_EXPLORED; - return; + case ExplorationStatus::FULLY_EXPLORED: return; + case ExplorationStatus::PARTIALLY_EXPLORED: + { + System::println("Cycle detected within graph:"); + for (auto&& node : exploration_status) + { + if (node.second == ExplorationStatus::PARTIALLY_EXPLORED) + { + System::println(" %s", f.to_string(node.first)); + } + } + Checks::exit_fail(VCPKG_LINE_INFO); + } + case ExplorationStatus::NOT_EXPLORED: + { + status = ExplorationStatus::PARTIALLY_EXPLORED; + U vertex_data = f.load_vertex_data(vertex); + for (const V& neighbour : f.adjacency_list(vertex_data)) + topological_sort_internal(neighbour, f, exploration_status, sorted); + + sorted.push_back(std::move(vertex_data)); + status = ExplorationStatus::FULLY_EXPLORED; + return; + } + default: Checks::unreachable(VCPKG_LINE_INFO); } - default: Checks::unreachable(VCPKG_LINE_INFO); } } - template - std::vector topological_sort(const std::vector& starting_vertices, const AdjacencyProvider& f) + template + std::vector topological_sort(const VertexRange& starting_vertices, const AdjacencyProvider& f) { std::vector sorted; std::unordered_map exploration_status; - for (auto& vertex : starting_vertices) + for (auto&& vertex : starting_vertices) { - topological_sort_internal(vertex, f, exploration_status, sorted); + details::topological_sort_internal(vertex, f, exploration_status, sorted); } return sorted; } template - struct GraphAdjacencyProvider final : AdjacencyProvider - { - const std::unordered_map>& vertices; - - GraphAdjacencyProvider(const std::unordered_map>& vertices) : vertices(vertices) {} - - std::vector adjacency_list(const V& vertex) const override - { - const std::unordered_set& as_set = this->vertices.at(vertex); - return std::vector(as_set.cbegin(), as_set.cend()); // TODO: Avoid redundant copy - } - - V load_vertex_data(const V& vertex) const override { return vertex; } - }; - - template - struct Graph + struct Graph final : AdjacencyProvider { public: - void add_vertex(V v) { this->vertices[v]; } + void add_vertex(const V& v) { this->m_edges[v]; } - // TODO: Change with iterators - void add_vertices(const std::vector& vs) + void add_edge(const V& u, const V& v) { - for (const V& v : vs) - { - this->vertices[v]; - } + this->m_edges[v]; + this->m_edges[u].insert(v); } - void add_edge(V u, V v) + std::vector vertex_list() const { - this->vertices[v]; - this->vertices[u].insert(v); + std::vector vertex_list; + for (auto&& vertex : this->m_edges) + vertex_list.emplace_back(vertex.first); + return vertex_list; } - std::vector topological_sort() const + std::vector adjacency_list(const V& vertex) const override { - GraphAdjacencyProvider adjacency_provider{this->vertices}; - std::unordered_map indegrees = count_indegrees(); - - std::vector sorted; - sorted.reserve(indegrees.size()); - - std::unordered_map exploration_status; - exploration_status.reserve(indegrees.size()); - - for (auto& pair : indegrees) - { - if (pair.second == 0) // Starting from vertices with indegree == 0. Not required. - { - V vertex = pair.first; - topological_sort_internal(vertex, adjacency_provider, exploration_status, sorted); - } - } - - return sorted; + const std::unordered_set& as_set = this->m_edges.at(vertex); + return std::vector(as_set.cbegin(), as_set.cend()); // TODO: Avoid redundant copy } - std::unordered_map count_indegrees() const - { - std::unordered_map indegrees; - - for (auto& pair : this->vertices) - { - indegrees[pair.first]; - for (V neighbour : pair.second) - { - ++indegrees[neighbour]; - } - } - - return indegrees; - } + V load_vertex_data(const V& vertex) const override { return vertex; } - const std::unordered_map>& adjacency_list() const { return this->vertices; } - std::vector vertex_list() const - { - // why no &? it returns 0 - std::vector vertex_list; - for (const auto& vertex : this->vertices) - { - vertex_list.emplace_back(vertex.first); - } - return vertex_list; - } + // Note: this function indicates how tied this template is to the exact type it will be templated upon. + // Possible fix: This type shouldn't implement to_string() and should instead be derived from? + std::string to_string(const V& spec) const override { return spec->spec.to_string(); } private: - std::unordered_map> vertices; + std::unordered_map> m_edges; }; } diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 8a082efca..8902a7b08 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include #include diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index a48f3f1d8..76aeb0eaa 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -373,6 +373,8 @@ namespace vcpkg::Dependencies } return RemovePlanAction{spec, RemovePlanType::REMOVE, request_type}; } + + std::string to_string(const PackageSpec& spec) const override { return spec.to_string(); } }; const std::vector& installed_ports = get_installed_ports(status_db); @@ -420,6 +422,8 @@ namespace vcpkg::Dependencies Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec); } + + std::string to_string(const PackageSpec& spec) const override { return spec.to_string(); } }; const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); @@ -598,14 +602,11 @@ namespace vcpkg::Dependencies std::vector PackageGraph::serialize() const { - Graphs::GraphAdjacencyProvider adjacency_remove_graph(m_graph_plan->remove_graph.adjacency_list()); auto remove_vertex_list = m_graph_plan->remove_graph.vertex_list(); - auto remove_toposort = Graphs::topological_sort(remove_vertex_list, adjacency_remove_graph); + auto remove_toposort = Graphs::topological_sort(remove_vertex_list, m_graph_plan->remove_graph); - Graphs::GraphAdjacencyProvider adjacency_install_graph( - m_graph_plan->install_graph.adjacency_list()); auto insert_vertex_list = m_graph_plan->install_graph.vertex_list(); - auto insert_toposort = Graphs::topological_sort(insert_vertex_list, adjacency_install_graph); + auto insert_toposort = Graphs::topological_sort(insert_vertex_list, m_graph_plan->install_graph); std::vector plan; -- cgit v1.2.3 From dde10c4936c3f849fcc386524fa7f2135aa11298 Mon Sep 17 00:00:00 2001 From: Mark Garcia Date: Tue, 19 Dec 2017 15:25:03 +0800 Subject: [glm] Ignore MSVC warning C4201 --- ports/glm/CONTROL | 2 +- ports/glm/ignore-warning-C4201.patch | 128 +++++++++++++++++++++++++++++++++++ ports/glm/portfile.cmake | 5 ++ 3 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 ports/glm/ignore-warning-C4201.patch diff --git a/ports/glm/CONTROL b/ports/glm/CONTROL index 4e7bad7ee..10a6e5f88 100644 --- a/ports/glm/CONTROL +++ b/ports/glm/CONTROL @@ -1,3 +1,3 @@ Source: glm -Version: 0.9.8.5 +Version: 0.9.8.5-1 Description: OpenGL Mathematics (GLM) https://glm.g-truc.net diff --git a/ports/glm/ignore-warning-C4201.patch b/ports/glm/ignore-warning-C4201.patch new file mode 100644 index 000000000..b94b123db --- /dev/null +++ b/ports/glm/ignore-warning-C4201.patch @@ -0,0 +1,128 @@ +diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp +index f5c7f017..69c7274a 100644 +--- a/glm/detail/type_vec1.hpp ++++ b/glm/detail/type_vec1.hpp +@@ -39,6 +39,10 @@ namespace glm + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" + # pragma clang diagnostic ignored "-Wnested-anon-types" ++# endif ++# if GLM_COMPILER & GLM_COMPILER_VC ++# pragma warning(push) ++# pragma warning(disable: 4201) + # endif + + union +@@ -60,6 +64,9 @@ namespace glm + # endif//GLM_SWIZZLE*/ + }; + ++# if GLM_COMPILER & GLM_COMPILER_VC ++# pragma warning(pop) ++# endif + # if GLM_COMPILER & GLM_COMPILER_CLANG + # pragma clang diagnostic pop + # endif +diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp +index a9af32e3..b8b8f32e 100644 +--- a/glm/detail/type_vec2.hpp ++++ b/glm/detail/type_vec2.hpp +@@ -38,6 +38,10 @@ namespace glm + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" + # pragma clang diagnostic ignored "-Wnested-anon-types" ++# endif ++# if GLM_COMPILER & GLM_COMPILER_VC ++# pragma warning(push) ++# pragma warning(disable: 4201) + # endif + + union +@@ -60,6 +64,9 @@ namespace glm + + }; + ++# if GLM_COMPILER & GLM_COMPILER_VC ++# pragma warning(pop) ++# endif + # if GLM_COMPILER & GLM_COMPILER_CLANG + # pragma clang diagnostic pop + # endif +diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp +index f85f0a5c..28e6c6ed 100644 +--- a/glm/detail/type_vec3.hpp ++++ b/glm/detail/type_vec3.hpp +@@ -38,6 +38,10 @@ namespace glm + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" + # pragma clang diagnostic ignored "-Wnested-anon-types" ++# endif ++# if GLM_COMPILER & GLM_COMPILER_VC ++# pragma warning(push) ++# pragma warning(disable: 4201) + # endif + + union +@@ -59,6 +63,9 @@ namespace glm + # endif//GLM_SWIZZLE + }; + ++# if GLM_COMPILER & GLM_COMPILER_VC ++# pragma warning(pop) ++# endif + # if GLM_COMPILER & GLM_COMPILER_CLANG + # pragma clang diagnostic pop + # endif +diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp +index 5e89b744..0a16bc2c 100644 +--- a/glm/detail/type_vec4.hpp ++++ b/glm/detail/type_vec4.hpp +@@ -38,6 +38,10 @@ namespace glm + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" + # pragma clang diagnostic ignored "-Wnested-anon-types" ++# endif ++# if GLM_COMPILER & GLM_COMPILER_VC ++# pragma warning(push) ++# pragma warning(disable: 4201) + # endif + + union +@@ -61,6 +65,9 @@ namespace glm + # endif//GLM_SWIZZLE + }; + ++# if GLM_COMPILER & GLM_COMPILER_VC ++# pragma warning(pop) ++# endif + # if GLM_COMPILER & GLM_COMPILER_CLANG + # pragma clang diagnostic pop + # endif +diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp +index 8af1c8bf..ff8c4aa6 100644 +--- a/glm/gtc/quaternion.hpp ++++ b/glm/gtc/quaternion.hpp +@@ -49,6 +49,10 @@ namespace glm + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" + # pragma clang diagnostic ignored "-Wnested-anon-types" ++# endif ++# if GLM_COMPILER & GLM_COMPILER_VC ++# pragma warning(push) ++# pragma warning(disable: 4201) + # endif + + union +@@ -57,6 +61,9 @@ namespace glm + typename detail::storage::value>::type data; + }; + ++# if GLM_COMPILER & GLM_COMPILER_VC ++# pragma warning(pop) ++# endif + # if GLM_COMPILER & GLM_COMPILER_CLANG + # pragma clang diagnostic pop + # endif +-- +2.15.1.windows.2 + diff --git a/ports/glm/portfile.cmake b/ports/glm/portfile.cmake index 81e764f06..1fb4fe073 100644 --- a/ports/glm/portfile.cmake +++ b/ports/glm/portfile.cmake @@ -8,6 +8,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/ignore-warning-C4201.patch" +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} ) -- cgit v1.2.3 From 14358e8b257a27f86a58bf95aaca1625c1ec2a26 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 5 Dec 2017 13:00:50 -0800 Subject: [boost] Modularize --- ports/boost-accumulators/CONTROL | 5 + ports/boost-accumulators/portfile.cmake | 14 + ports/boost-algorithm/CONTROL | 5 + ports/boost-algorithm/portfile.cmake | 14 + ports/boost-align/CONTROL | 5 + ports/boost-align/portfile.cmake | 14 + ports/boost-any/CONTROL | 5 + ports/boost-any/portfile.cmake | 14 + ports/boost-array/CONTROL | 5 + ports/boost-array/portfile.cmake | 14 + ports/boost-asio/CONTROL | 5 + ports/boost-asio/portfile.cmake | 14 + ports/boost-assert/CONTROL | 5 + ports/boost-assert/portfile.cmake | 14 + ports/boost-assign/CONTROL | 5 + ports/boost-assign/portfile.cmake | 14 + ports/boost-atomic/CONTROL | 5 + ports/boost-atomic/portfile.cmake | 15 ++ ports/boost-beast/CONTROL | 5 + ports/boost-beast/portfile.cmake | 14 + ports/boost-bimap/CONTROL | 5 + ports/boost-bimap/portfile.cmake | 14 + ports/boost-bind/CONTROL | 5 + ports/boost-bind/portfile.cmake | 14 + ports/boost-build/CONTROL | 3 + ports/boost-build/portfile.cmake | 54 ++++ ports/boost-callable-traits/CONTROL | 5 + ports/boost-callable-traits/portfile.cmake | 14 + ports/boost-chrono/CONTROL | 5 + ports/boost-chrono/portfile.cmake | 15 ++ ports/boost-circular-buffer/CONTROL | 5 + ports/boost-circular-buffer/portfile.cmake | 14 + ports/boost-compatibility/CONTROL | 5 + ports/boost-compatibility/portfile.cmake | 14 + ports/boost-compute/CONTROL | 5 + ports/boost-compute/portfile.cmake | 14 + ports/boost-concept-check/CONTROL | 5 + ports/boost-concept-check/portfile.cmake | 14 + ports/boost-config/CONTROL | 5 + ports/boost-config/portfile.cmake | 20 ++ ports/boost-container/CONTROL | 5 + ports/boost-container/portfile.cmake | 15 ++ ports/boost-context/CONTROL | 5 + ports/boost-context/portfile.cmake | 15 ++ ports/boost-conversion/CONTROL | 5 + ports/boost-conversion/portfile.cmake | 14 + ports/boost-convert/CONTROL | 5 + ports/boost-convert/portfile.cmake | 14 + ports/boost-core/CONTROL | 5 + ports/boost-core/portfile.cmake | 14 + ports/boost-coroutine/CONTROL | 5 + ports/boost-coroutine/portfile.cmake | 15 ++ ports/boost-coroutine2/CONTROL | 5 + ports/boost-coroutine2/portfile.cmake | 14 + ports/boost-crc/CONTROL | 5 + ports/boost-crc/portfile.cmake | 14 + ports/boost-date-time/CONTROL | 5 + ports/boost-date-time/portfile.cmake | 15 ++ ports/boost-detail/CONTROL | 5 + ports/boost-detail/portfile.cmake | 14 + ports/boost-disjoint-sets/CONTROL | 5 + ports/boost-disjoint-sets/portfile.cmake | 14 + ports/boost-dll/CONTROL | 5 + ports/boost-dll/portfile.cmake | 14 + ports/boost-dynamic-bitset/CONTROL | 5 + ports/boost-dynamic-bitset/portfile.cmake | 14 + ports/boost-endian/CONTROL | 5 + ports/boost-endian/portfile.cmake | 14 + ports/boost-exception/CONTROL | 5 + ports/boost-exception/portfile.cmake | 18 ++ ports/boost-fiber/CONTROL | 5 + ports/boost-fiber/portfile.cmake | 15 ++ ports/boost-filesystem/CONTROL | 5 + ports/boost-filesystem/portfile.cmake | 15 ++ ports/boost-flyweight/CONTROL | 5 + ports/boost-flyweight/portfile.cmake | 14 + ports/boost-foreach/CONTROL | 5 + ports/boost-foreach/portfile.cmake | 14 + ports/boost-format/CONTROL | 5 + ports/boost-format/portfile.cmake | 14 + ports/boost-function-types/CONTROL | 5 + ports/boost-function-types/portfile.cmake | 14 + ports/boost-function/CONTROL | 5 + ports/boost-function/portfile.cmake | 14 + ports/boost-functional/CONTROL | 5 + ports/boost-functional/portfile.cmake | 14 + ports/boost-fusion/CONTROL | 5 + ports/boost-fusion/portfile.cmake | 14 + ports/boost-geometry/CONTROL | 5 + ports/boost-geometry/portfile.cmake | 14 + ports/boost-gil/CONTROL | 5 + ports/boost-gil/portfile.cmake | 14 + ports/boost-graph-parallel/CONTROL | 5 + ports/boost-graph-parallel/portfile.cmake | 15 ++ ports/boost-graph/CONTROL | 5 + ports/boost-graph/portfile.cmake | 15 ++ ports/boost-hana/CONTROL | 5 + ports/boost-hana/portfile.cmake | 14 + ports/boost-heap/CONTROL | 5 + ports/boost-heap/portfile.cmake | 14 + ports/boost-icl/CONTROL | 5 + ports/boost-icl/portfile.cmake | 14 + ports/boost-integer/CONTROL | 5 + ports/boost-integer/portfile.cmake | 14 + ports/boost-interprocess/CONTROL | 5 + ports/boost-interprocess/portfile.cmake | 14 + ports/boost-interval/CONTROL | 5 + ports/boost-interval/portfile.cmake | 14 + ports/boost-intrusive/CONTROL | 5 + ports/boost-intrusive/portfile.cmake | 14 + ports/boost-io/CONTROL | 5 + ports/boost-io/portfile.cmake | 14 + ports/boost-iostreams/CONTROL | 5 + ports/boost-iostreams/portfile.cmake | 15 ++ ports/boost-iterator/CONTROL | 5 + ports/boost-iterator/portfile.cmake | 14 + ports/boost-lambda/CONTROL | 5 + ports/boost-lambda/portfile.cmake | 14 + ports/boost-lexical-cast/CONTROL | 5 + ports/boost-lexical-cast/portfile.cmake | 14 + ports/boost-local-function/CONTROL | 5 + ports/boost-local-function/portfile.cmake | 14 + ports/boost-locale/CONTROL | 9 + ports/boost-locale/portfile.cmake | 28 ++ ports/boost-lockfree/CONTROL | 5 + ports/boost-lockfree/portfile.cmake | 14 + ports/boost-log/CONTROL | 5 + ports/boost-log/portfile.cmake | 15 ++ ports/boost-logic/CONTROL | 5 + ports/boost-logic/portfile.cmake | 14 + ports/boost-math/CONTROL | 5 + ports/boost-math/portfile.cmake | 15 ++ ports/boost-metaparse/CONTROL | 5 + ports/boost-metaparse/portfile.cmake | 14 + ports/boost-move/CONTROL | 5 + ports/boost-move/portfile.cmake | 14 + ports/boost-mp11/CONTROL | 5 + ports/boost-mp11/portfile.cmake | 14 + ports/boost-mpi/CONTROL | 5 + ports/boost-mpi/portfile.cmake | 15 ++ ports/boost-mpl/CONTROL | 5 + ports/boost-mpl/portfile.cmake | 14 + ports/boost-msm/CONTROL | 5 + ports/boost-msm/portfile.cmake | 14 + ports/boost-multi-array/CONTROL | 5 + ports/boost-multi-array/portfile.cmake | 14 + ports/boost-multi-index/CONTROL | 5 + ports/boost-multi-index/portfile.cmake | 14 + ports/boost-multiprecision/CONTROL | 5 + ports/boost-multiprecision/portfile.cmake | 14 + ports/boost-numeric-conversion/CONTROL | 5 + ports/boost-numeric-conversion/portfile.cmake | 14 + ports/boost-odeint/CONTROL | 5 + ports/boost-odeint/portfile.cmake | 14 + ports/boost-optional/CONTROL | 5 + ports/boost-optional/portfile.cmake | 14 + ports/boost-parameter/CONTROL | 5 + ports/boost-parameter/portfile.cmake | 14 + ports/boost-phoenix/CONTROL | 5 + ports/boost-phoenix/portfile.cmake | 14 + ports/boost-poly-collection/CONTROL | 5 + ports/boost-poly-collection/portfile.cmake | 14 + ports/boost-polygon/CONTROL | 5 + ports/boost-polygon/portfile.cmake | 14 + ports/boost-pool/CONTROL | 5 + ports/boost-pool/portfile.cmake | 14 + ports/boost-predef/CONTROL | 5 + ports/boost-predef/portfile.cmake | 14 + ports/boost-preprocessor/CONTROL | 5 + ports/boost-preprocessor/portfile.cmake | 14 + ports/boost-process/CONTROL | 5 + ports/boost-process/portfile.cmake | 14 + ports/boost-program-options/CONTROL | 5 + ports/boost-program-options/portfile.cmake | 15 ++ ports/boost-property-map/CONTROL | 5 + ports/boost-property-map/portfile.cmake | 14 + ports/boost-property-tree/CONTROL | 5 + ports/boost-property-tree/portfile.cmake | 14 + ports/boost-proto/CONTROL | 5 + ports/boost-proto/portfile.cmake | 14 + ports/boost-ptr-container/CONTROL | 5 + ports/boost-ptr-container/portfile.cmake | 14 + ports/boost-python/CONTROL | 5 + ports/boost-python/portfile.cmake | 19 ++ ports/boost-qvm/CONTROL | 5 + ports/boost-qvm/portfile.cmake | 14 + ports/boost-random/CONTROL | 5 + ports/boost-random/portfile.cmake | 15 ++ ports/boost-range/CONTROL | 5 + ports/boost-range/portfile.cmake | 14 + ports/boost-ratio/CONTROL | 5 + ports/boost-ratio/portfile.cmake | 14 + ports/boost-rational/CONTROL | 5 + ports/boost-rational/portfile.cmake | 14 + ports/boost-regex/CONTROL | 9 + ports/boost-regex/portfile.cmake | 21 ++ ports/boost-scope-exit/CONTROL | 5 + ports/boost-scope-exit/portfile.cmake | 14 + ports/boost-serialization/CONTROL | 5 + ports/boost-serialization/portfile.cmake | 15 ++ ports/boost-signals/CONTROL | 5 + ports/boost-signals/portfile.cmake | 15 ++ ports/boost-signals2/CONTROL | 5 + ports/boost-signals2/portfile.cmake | 14 + ports/boost-smart-ptr/CONTROL | 5 + ports/boost-smart-ptr/portfile.cmake | 14 + ports/boost-sort/CONTROL | 5 + ports/boost-sort/portfile.cmake | 14 + ports/boost-spirit/CONTROL | 5 + ports/boost-spirit/portfile.cmake | 14 + ports/boost-stacktrace/CONTROL | 5 + ports/boost-stacktrace/portfile.cmake | 15 ++ ports/boost-statechart/CONTROL | 5 + ports/boost-statechart/portfile.cmake | 14 + ports/boost-static-assert/CONTROL | 5 + ports/boost-static-assert/portfile.cmake | 14 + ports/boost-system/CONTROL | 5 + ports/boost-system/portfile.cmake | 15 ++ ports/boost-test/CONTROL | 5 + ports/boost-test/portfile.cmake | 15 ++ ports/boost-thread/CONTROL | 5 + ports/boost-thread/portfile.cmake | 15 ++ ports/boost-throw-exception/CONTROL | 5 + ports/boost-throw-exception/portfile.cmake | 14 + ports/boost-timer/CONTROL | 5 + ports/boost-timer/portfile.cmake | 15 ++ ports/boost-tokenizer/CONTROL | 5 + ports/boost-tokenizer/portfile.cmake | 14 + ports/boost-tti/CONTROL | 5 + ports/boost-tti/portfile.cmake | 14 + ports/boost-tuple/CONTROL | 5 + ports/boost-tuple/portfile.cmake | 14 + ports/boost-type-erasure/CONTROL | 5 + ports/boost-type-erasure/portfile.cmake | 15 ++ ports/boost-type-index/CONTROL | 5 + ports/boost-type-index/portfile.cmake | 14 + ports/boost-type-traits/CONTROL | 5 + ports/boost-type-traits/portfile.cmake | 14 + ports/boost-typeof/CONTROL | 5 + ports/boost-typeof/portfile.cmake | 14 + ports/boost-ublas/CONTROL | 5 + ports/boost-ublas/portfile.cmake | 14 + ports/boost-units/CONTROL | 5 + ports/boost-units/portfile.cmake | 14 + ports/boost-unordered/CONTROL | 5 + ports/boost-unordered/portfile.cmake | 14 + ports/boost-utility/CONTROL | 5 + ports/boost-utility/portfile.cmake | 14 + ports/boost-uuid/CONTROL | 5 + ports/boost-uuid/portfile.cmake | 14 + ports/boost-variant/CONTROL | 5 + ports/boost-variant/portfile.cmake | 14 + ports/boost-vcpkg-helpers/.gitignore | 3 + ports/boost-vcpkg-helpers/CONTROL | 3 + ports/boost-vcpkg-helpers/Jamroot.jam | 141 ++++++++++ ports/boost-vcpkg-helpers/boost-modular.cmake | 273 ++++++++++++++++++++ ports/boost-vcpkg-helpers/generate-ports.ps1 | 335 ++++++++++++++++++++++++ ports/boost-vcpkg-helpers/nothing.bat | 0 ports/boost-vcpkg-helpers/portfile.cmake | 11 + ports/boost-vcpkg-helpers/user-config.jam | 25 ++ ports/boost-vmd/CONTROL | 5 + ports/boost-vmd/portfile.cmake | 14 + ports/boost-wave/CONTROL | 5 + ports/boost-wave/portfile.cmake | 15 ++ ports/boost-winapi/CONTROL | 5 + ports/boost-winapi/portfile.cmake | 14 + ports/boost-xpressive/CONTROL | 5 + ports/boost-xpressive/portfile.cmake | 14 + ports/boost/CONTROL | 19 +- ports/boost/portfile.cmake | 356 +------------------------- 270 files changed, 3373 insertions(+), 370 deletions(-) create mode 100644 ports/boost-accumulators/CONTROL create mode 100644 ports/boost-accumulators/portfile.cmake create mode 100644 ports/boost-algorithm/CONTROL create mode 100644 ports/boost-algorithm/portfile.cmake create mode 100644 ports/boost-align/CONTROL create mode 100644 ports/boost-align/portfile.cmake create mode 100644 ports/boost-any/CONTROL create mode 100644 ports/boost-any/portfile.cmake create mode 100644 ports/boost-array/CONTROL create mode 100644 ports/boost-array/portfile.cmake create mode 100644 ports/boost-asio/CONTROL create mode 100644 ports/boost-asio/portfile.cmake create mode 100644 ports/boost-assert/CONTROL create mode 100644 ports/boost-assert/portfile.cmake create mode 100644 ports/boost-assign/CONTROL create mode 100644 ports/boost-assign/portfile.cmake create mode 100644 ports/boost-atomic/CONTROL create mode 100644 ports/boost-atomic/portfile.cmake create mode 100644 ports/boost-beast/CONTROL create mode 100644 ports/boost-beast/portfile.cmake create mode 100644 ports/boost-bimap/CONTROL create mode 100644 ports/boost-bimap/portfile.cmake create mode 100644 ports/boost-bind/CONTROL create mode 100644 ports/boost-bind/portfile.cmake create mode 100644 ports/boost-build/CONTROL create mode 100644 ports/boost-build/portfile.cmake create mode 100644 ports/boost-callable-traits/CONTROL create mode 100644 ports/boost-callable-traits/portfile.cmake create mode 100644 ports/boost-chrono/CONTROL create mode 100644 ports/boost-chrono/portfile.cmake create mode 100644 ports/boost-circular-buffer/CONTROL create mode 100644 ports/boost-circular-buffer/portfile.cmake create mode 100644 ports/boost-compatibility/CONTROL create mode 100644 ports/boost-compatibility/portfile.cmake create mode 100644 ports/boost-compute/CONTROL create mode 100644 ports/boost-compute/portfile.cmake create mode 100644 ports/boost-concept-check/CONTROL create mode 100644 ports/boost-concept-check/portfile.cmake create mode 100644 ports/boost-config/CONTROL create mode 100644 ports/boost-config/portfile.cmake create mode 100644 ports/boost-container/CONTROL create mode 100644 ports/boost-container/portfile.cmake create mode 100644 ports/boost-context/CONTROL create mode 100644 ports/boost-context/portfile.cmake create mode 100644 ports/boost-conversion/CONTROL create mode 100644 ports/boost-conversion/portfile.cmake create mode 100644 ports/boost-convert/CONTROL create mode 100644 ports/boost-convert/portfile.cmake create mode 100644 ports/boost-core/CONTROL create mode 100644 ports/boost-core/portfile.cmake create mode 100644 ports/boost-coroutine/CONTROL create mode 100644 ports/boost-coroutine/portfile.cmake create mode 100644 ports/boost-coroutine2/CONTROL create mode 100644 ports/boost-coroutine2/portfile.cmake create mode 100644 ports/boost-crc/CONTROL create mode 100644 ports/boost-crc/portfile.cmake create mode 100644 ports/boost-date-time/CONTROL create mode 100644 ports/boost-date-time/portfile.cmake create mode 100644 ports/boost-detail/CONTROL create mode 100644 ports/boost-detail/portfile.cmake create mode 100644 ports/boost-disjoint-sets/CONTROL create mode 100644 ports/boost-disjoint-sets/portfile.cmake create mode 100644 ports/boost-dll/CONTROL create mode 100644 ports/boost-dll/portfile.cmake create mode 100644 ports/boost-dynamic-bitset/CONTROL create mode 100644 ports/boost-dynamic-bitset/portfile.cmake create mode 100644 ports/boost-endian/CONTROL create mode 100644 ports/boost-endian/portfile.cmake create mode 100644 ports/boost-exception/CONTROL create mode 100644 ports/boost-exception/portfile.cmake create mode 100644 ports/boost-fiber/CONTROL create mode 100644 ports/boost-fiber/portfile.cmake create mode 100644 ports/boost-filesystem/CONTROL create mode 100644 ports/boost-filesystem/portfile.cmake create mode 100644 ports/boost-flyweight/CONTROL create mode 100644 ports/boost-flyweight/portfile.cmake create mode 100644 ports/boost-foreach/CONTROL create mode 100644 ports/boost-foreach/portfile.cmake create mode 100644 ports/boost-format/CONTROL create mode 100644 ports/boost-format/portfile.cmake create mode 100644 ports/boost-function-types/CONTROL create mode 100644 ports/boost-function-types/portfile.cmake create mode 100644 ports/boost-function/CONTROL create mode 100644 ports/boost-function/portfile.cmake create mode 100644 ports/boost-functional/CONTROL create mode 100644 ports/boost-functional/portfile.cmake create mode 100644 ports/boost-fusion/CONTROL create mode 100644 ports/boost-fusion/portfile.cmake create mode 100644 ports/boost-geometry/CONTROL create mode 100644 ports/boost-geometry/portfile.cmake create mode 100644 ports/boost-gil/CONTROL create mode 100644 ports/boost-gil/portfile.cmake create mode 100644 ports/boost-graph-parallel/CONTROL create mode 100644 ports/boost-graph-parallel/portfile.cmake create mode 100644 ports/boost-graph/CONTROL create mode 100644 ports/boost-graph/portfile.cmake create mode 100644 ports/boost-hana/CONTROL create mode 100644 ports/boost-hana/portfile.cmake create mode 100644 ports/boost-heap/CONTROL create mode 100644 ports/boost-heap/portfile.cmake create mode 100644 ports/boost-icl/CONTROL create mode 100644 ports/boost-icl/portfile.cmake create mode 100644 ports/boost-integer/CONTROL create mode 100644 ports/boost-integer/portfile.cmake create mode 100644 ports/boost-interprocess/CONTROL create mode 100644 ports/boost-interprocess/portfile.cmake create mode 100644 ports/boost-interval/CONTROL create mode 100644 ports/boost-interval/portfile.cmake create mode 100644 ports/boost-intrusive/CONTROL create mode 100644 ports/boost-intrusive/portfile.cmake create mode 100644 ports/boost-io/CONTROL create mode 100644 ports/boost-io/portfile.cmake create mode 100644 ports/boost-iostreams/CONTROL create mode 100644 ports/boost-iostreams/portfile.cmake create mode 100644 ports/boost-iterator/CONTROL create mode 100644 ports/boost-iterator/portfile.cmake create mode 100644 ports/boost-lambda/CONTROL create mode 100644 ports/boost-lambda/portfile.cmake create mode 100644 ports/boost-lexical-cast/CONTROL create mode 100644 ports/boost-lexical-cast/portfile.cmake create mode 100644 ports/boost-local-function/CONTROL create mode 100644 ports/boost-local-function/portfile.cmake create mode 100644 ports/boost-locale/CONTROL create mode 100644 ports/boost-locale/portfile.cmake create mode 100644 ports/boost-lockfree/CONTROL create mode 100644 ports/boost-lockfree/portfile.cmake create mode 100644 ports/boost-log/CONTROL create mode 100644 ports/boost-log/portfile.cmake create mode 100644 ports/boost-logic/CONTROL create mode 100644 ports/boost-logic/portfile.cmake create mode 100644 ports/boost-math/CONTROL create mode 100644 ports/boost-math/portfile.cmake create mode 100644 ports/boost-metaparse/CONTROL create mode 100644 ports/boost-metaparse/portfile.cmake create mode 100644 ports/boost-move/CONTROL create mode 100644 ports/boost-move/portfile.cmake create mode 100644 ports/boost-mp11/CONTROL create mode 100644 ports/boost-mp11/portfile.cmake create mode 100644 ports/boost-mpi/CONTROL create mode 100644 ports/boost-mpi/portfile.cmake create mode 100644 ports/boost-mpl/CONTROL create mode 100644 ports/boost-mpl/portfile.cmake create mode 100644 ports/boost-msm/CONTROL create mode 100644 ports/boost-msm/portfile.cmake create mode 100644 ports/boost-multi-array/CONTROL create mode 100644 ports/boost-multi-array/portfile.cmake create mode 100644 ports/boost-multi-index/CONTROL create mode 100644 ports/boost-multi-index/portfile.cmake create mode 100644 ports/boost-multiprecision/CONTROL create mode 100644 ports/boost-multiprecision/portfile.cmake create mode 100644 ports/boost-numeric-conversion/CONTROL create mode 100644 ports/boost-numeric-conversion/portfile.cmake create mode 100644 ports/boost-odeint/CONTROL create mode 100644 ports/boost-odeint/portfile.cmake create mode 100644 ports/boost-optional/CONTROL create mode 100644 ports/boost-optional/portfile.cmake create mode 100644 ports/boost-parameter/CONTROL create mode 100644 ports/boost-parameter/portfile.cmake create mode 100644 ports/boost-phoenix/CONTROL create mode 100644 ports/boost-phoenix/portfile.cmake create mode 100644 ports/boost-poly-collection/CONTROL create mode 100644 ports/boost-poly-collection/portfile.cmake create mode 100644 ports/boost-polygon/CONTROL create mode 100644 ports/boost-polygon/portfile.cmake create mode 100644 ports/boost-pool/CONTROL create mode 100644 ports/boost-pool/portfile.cmake create mode 100644 ports/boost-predef/CONTROL create mode 100644 ports/boost-predef/portfile.cmake create mode 100644 ports/boost-preprocessor/CONTROL create mode 100644 ports/boost-preprocessor/portfile.cmake create mode 100644 ports/boost-process/CONTROL create mode 100644 ports/boost-process/portfile.cmake create mode 100644 ports/boost-program-options/CONTROL create mode 100644 ports/boost-program-options/portfile.cmake create mode 100644 ports/boost-property-map/CONTROL create mode 100644 ports/boost-property-map/portfile.cmake create mode 100644 ports/boost-property-tree/CONTROL create mode 100644 ports/boost-property-tree/portfile.cmake create mode 100644 ports/boost-proto/CONTROL create mode 100644 ports/boost-proto/portfile.cmake create mode 100644 ports/boost-ptr-container/CONTROL create mode 100644 ports/boost-ptr-container/portfile.cmake create mode 100644 ports/boost-python/CONTROL create mode 100644 ports/boost-python/portfile.cmake create mode 100644 ports/boost-qvm/CONTROL create mode 100644 ports/boost-qvm/portfile.cmake create mode 100644 ports/boost-random/CONTROL create mode 100644 ports/boost-random/portfile.cmake create mode 100644 ports/boost-range/CONTROL create mode 100644 ports/boost-range/portfile.cmake create mode 100644 ports/boost-ratio/CONTROL create mode 100644 ports/boost-ratio/portfile.cmake create mode 100644 ports/boost-rational/CONTROL create mode 100644 ports/boost-rational/portfile.cmake create mode 100644 ports/boost-regex/CONTROL create mode 100644 ports/boost-regex/portfile.cmake create mode 100644 ports/boost-scope-exit/CONTROL create mode 100644 ports/boost-scope-exit/portfile.cmake create mode 100644 ports/boost-serialization/CONTROL create mode 100644 ports/boost-serialization/portfile.cmake create mode 100644 ports/boost-signals/CONTROL create mode 100644 ports/boost-signals/portfile.cmake create mode 100644 ports/boost-signals2/CONTROL create mode 100644 ports/boost-signals2/portfile.cmake create mode 100644 ports/boost-smart-ptr/CONTROL create mode 100644 ports/boost-smart-ptr/portfile.cmake create mode 100644 ports/boost-sort/CONTROL create mode 100644 ports/boost-sort/portfile.cmake create mode 100644 ports/boost-spirit/CONTROL create mode 100644 ports/boost-spirit/portfile.cmake create mode 100644 ports/boost-stacktrace/CONTROL create mode 100644 ports/boost-stacktrace/portfile.cmake create mode 100644 ports/boost-statechart/CONTROL create mode 100644 ports/boost-statechart/portfile.cmake create mode 100644 ports/boost-static-assert/CONTROL create mode 100644 ports/boost-static-assert/portfile.cmake create mode 100644 ports/boost-system/CONTROL create mode 100644 ports/boost-system/portfile.cmake create mode 100644 ports/boost-test/CONTROL create mode 100644 ports/boost-test/portfile.cmake create mode 100644 ports/boost-thread/CONTROL create mode 100644 ports/boost-thread/portfile.cmake create mode 100644 ports/boost-throw-exception/CONTROL create mode 100644 ports/boost-throw-exception/portfile.cmake create mode 100644 ports/boost-timer/CONTROL create mode 100644 ports/boost-timer/portfile.cmake create mode 100644 ports/boost-tokenizer/CONTROL create mode 100644 ports/boost-tokenizer/portfile.cmake create mode 100644 ports/boost-tti/CONTROL create mode 100644 ports/boost-tti/portfile.cmake create mode 100644 ports/boost-tuple/CONTROL create mode 100644 ports/boost-tuple/portfile.cmake create mode 100644 ports/boost-type-erasure/CONTROL create mode 100644 ports/boost-type-erasure/portfile.cmake create mode 100644 ports/boost-type-index/CONTROL create mode 100644 ports/boost-type-index/portfile.cmake create mode 100644 ports/boost-type-traits/CONTROL create mode 100644 ports/boost-type-traits/portfile.cmake create mode 100644 ports/boost-typeof/CONTROL create mode 100644 ports/boost-typeof/portfile.cmake create mode 100644 ports/boost-ublas/CONTROL create mode 100644 ports/boost-ublas/portfile.cmake create mode 100644 ports/boost-units/CONTROL create mode 100644 ports/boost-units/portfile.cmake create mode 100644 ports/boost-unordered/CONTROL create mode 100644 ports/boost-unordered/portfile.cmake create mode 100644 ports/boost-utility/CONTROL create mode 100644 ports/boost-utility/portfile.cmake create mode 100644 ports/boost-uuid/CONTROL create mode 100644 ports/boost-uuid/portfile.cmake create mode 100644 ports/boost-variant/CONTROL create mode 100644 ports/boost-variant/portfile.cmake create mode 100644 ports/boost-vcpkg-helpers/.gitignore create mode 100644 ports/boost-vcpkg-helpers/CONTROL create mode 100644 ports/boost-vcpkg-helpers/Jamroot.jam create mode 100644 ports/boost-vcpkg-helpers/boost-modular.cmake create mode 100644 ports/boost-vcpkg-helpers/generate-ports.ps1 create mode 100644 ports/boost-vcpkg-helpers/nothing.bat create mode 100644 ports/boost-vcpkg-helpers/portfile.cmake create mode 100644 ports/boost-vcpkg-helpers/user-config.jam create mode 100644 ports/boost-vmd/CONTROL create mode 100644 ports/boost-vmd/portfile.cmake create mode 100644 ports/boost-wave/CONTROL create mode 100644 ports/boost-wave/portfile.cmake create mode 100644 ports/boost-winapi/CONTROL create mode 100644 ports/boost-winapi/portfile.cmake create mode 100644 ports/boost-xpressive/CONTROL create mode 100644 ports/boost-xpressive/portfile.cmake diff --git a/ports/boost-accumulators/CONTROL b/ports/boost-accumulators/CONTROL new file mode 100644 index 000000000..dda6adfc0 --- /dev/null +++ b/ports/boost-accumulators/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-accumulators +Version: 1.66.0 +Build-Depends: boost-array, boost-assert, boost-circular-buffer, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-interval, boost-iterator, boost-mpl, boost-numeric-conversion, boost-odeint, boost-parameter, boost-preprocessor, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-typeof, boost-type-traits, boost-ublas, boost-utility, boost-vcpkg-helpers +Description: Boost accumulators module diff --git a/ports/boost-accumulators/portfile.cmake b/ports/boost-accumulators/portfile.cmake new file mode 100644 index 000000000..b55026968 --- /dev/null +++ b/ports/boost-accumulators/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/accumulators + REF boost-1.66.0 + SHA512 8413fb2c8f52ae8ec0253847ae01bd1a99d3746bd24bafb9707c243119055e3fbb7da848048db8493c80b8f1bb149d18cd03d8be22ffd2465165fb644cdfd12e + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-algorithm/CONTROL b/ports/boost-algorithm/CONTROL new file mode 100644 index 000000000..50534ac12 --- /dev/null +++ b/ports/boost-algorithm/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-algorithm +Version: 1.66.0 +Build-Depends: boost-array, boost-assert, boost-bind, boost-concept-check, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-iterator, boost-mpl, boost-range, boost-regex, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers +Description: Boost algorithm module diff --git a/ports/boost-algorithm/portfile.cmake b/ports/boost-algorithm/portfile.cmake new file mode 100644 index 000000000..2149ba0e0 --- /dev/null +++ b/ports/boost-algorithm/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/algorithm + REF boost-1.66.0 + SHA512 46779a82175b89da21789e332befb89972320652bafcdacf76f456d3d9ff3635a2db0693dd035bd6651262f762f591d026387682f3c0764315e40d5f007e72ee + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-align/CONTROL b/ports/boost-align/CONTROL new file mode 100644 index 000000000..e3009e539 --- /dev/null +++ b/ports/boost-align/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-align +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-static-assert, boost-throw-exception, boost-vcpkg-helpers +Description: Boost align module diff --git a/ports/boost-align/portfile.cmake b/ports/boost-align/portfile.cmake new file mode 100644 index 000000000..481b66321 --- /dev/null +++ b/ports/boost-align/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/align + REF boost-1.66.0 + SHA512 3f358344470f797e093fd5db80a6d332e960b7301188e346771e06acc620d97d0e02562eb417eb4627a2200967af4eda74931fc61c8746df16d754f4b578b958 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-any/CONTROL b/ports/boost-any/CONTROL new file mode 100644 index 000000000..c0f854590 --- /dev/null +++ b/ports/boost-any/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-any +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-mpl, boost-static-assert, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost any module diff --git a/ports/boost-any/portfile.cmake b/ports/boost-any/portfile.cmake new file mode 100644 index 000000000..76d723999 --- /dev/null +++ b/ports/boost-any/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/any + REF boost-1.66.0 + SHA512 57f24a2532e31e664415642c2e125263964eae6798dfc31eae586a3e4fe516edc1adea882883d34613744ae79acfbc0bed9c8fd823153bafc25d9c3c1ec1e5ef + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-array/CONTROL b/ports/boost-array/CONTROL new file mode 100644 index 000000000..549e3b979 --- /dev/null +++ b/ports/boost-array/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-array +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-static-assert, boost-throw-exception, boost-vcpkg-helpers +Description: Boost array module diff --git a/ports/boost-array/portfile.cmake b/ports/boost-array/portfile.cmake new file mode 100644 index 000000000..8affa0dff --- /dev/null +++ b/ports/boost-array/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/array + REF boost-1.66.0 + SHA512 67ca3644cdea6c2ac1791707e93c517cb1cc5aa593ead675bcfa844a27bcbb61ae4c1c35dc1cbb099e45041275e0ca70c99726a9f70319358057bc448f538425 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-asio/CONTROL b/ports/boost-asio/CONTROL new file mode 100644 index 000000000..3df7042e6 --- /dev/null +++ b/ports/boost-asio/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-asio +Version: 1.66.0 +Build-Depends: boost-coroutine (windows), boost-date-time, boost-regex, boost-system, boost-vcpkg-helpers +Description: Boost asio module diff --git a/ports/boost-asio/portfile.cmake b/ports/boost-asio/portfile.cmake new file mode 100644 index 000000000..4317b12d5 --- /dev/null +++ b/ports/boost-asio/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/asio + REF boost-1.66.0 + SHA512 7d9989bd96b2940183a1aa75e7f7a6cec0ecf630922009d440ba876802411eba80ddc9b22bd4af65d6f12e3414eb130dc27a884c53bceabdfe8bafb9772db01f + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-assert/CONTROL b/ports/boost-assert/CONTROL new file mode 100644 index 000000000..70f7769c3 --- /dev/null +++ b/ports/boost-assert/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-assert +Version: 1.66.0 +Build-Depends: boost-config, boost-vcpkg-helpers +Description: Boost assert module diff --git a/ports/boost-assert/portfile.cmake b/ports/boost-assert/portfile.cmake new file mode 100644 index 000000000..6112c47bf --- /dev/null +++ b/ports/boost-assert/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/assert + REF boost-1.66.0 + SHA512 a00e17793c94d8d9e616bc5e80433fd68e4e4e51abf23956b6a7c977b01300d6a2200e9f6a8d249d7813b57d20fb2e6a844f5d2eb7504add99d748f89c2f39d5 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-assign/CONTROL b/ports/boost-assign/CONTROL new file mode 100644 index 000000000..88deae645 --- /dev/null +++ b/ports/boost-assign/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-assign +Version: 1.66.0 +Build-Depends: boost-array, boost-config, boost-detail, boost-mpl, boost-preprocessor, boost-ptr-container, boost-range, boost-static-assert, boost-tuple, boost-type-traits, boost-vcpkg-helpers +Description: Boost assign module diff --git a/ports/boost-assign/portfile.cmake b/ports/boost-assign/portfile.cmake new file mode 100644 index 000000000..470e22cd9 --- /dev/null +++ b/ports/boost-assign/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/assign + REF boost-1.66.0 + SHA512 501e11279f672a24585a6189438f2310358cc67a8838995abb0f1454f230242fdd8f206ec294cdbb39ebe7e606a8a4ef2a96e0fe236d5e044ab4708eae030264 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-atomic/CONTROL b/ports/boost-atomic/CONTROL new file mode 100644 index 000000000..9c84408eb --- /dev/null +++ b/ports/boost-atomic/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-atomic +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-integer, boost-type-traits, boost-vcpkg-helpers +Description: Boost atomic module diff --git a/ports/boost-atomic/portfile.cmake b/ports/boost-atomic/portfile.cmake new file mode 100644 index 000000000..650016d6f --- /dev/null +++ b/ports/boost-atomic/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/atomic + REF boost-1.66.0 + SHA512 2f13902827ea0639ec37e514d87cfc9081bca6f4f6d98e0ad84f19b2042900e03bb3f5c2fb4891864174ae5abb743315af27062d7b10de861e91a7e92df91f98 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-beast/CONTROL b/ports/boost-beast/CONTROL new file mode 100644 index 000000000..13f1d67f6 --- /dev/null +++ b/ports/boost-beast/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-beast +Version: 1.66.0 +Build-Depends: boost-asio, boost-assert, boost-config, boost-container, boost-core, boost-endian, boost-intrusive, boost-optional, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Description: Boost beast module diff --git a/ports/boost-beast/portfile.cmake b/ports/boost-beast/portfile.cmake new file mode 100644 index 000000000..06312f417 --- /dev/null +++ b/ports/boost-beast/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/beast + REF boost-1.66.0 + SHA512 0559721217469b3862c6653488de245841f351098766d2cbf4d0fd3a2ecdd96460ecaf5591166dc59f7c5a9806edab9101c9939c98b294c3cbd2d738dd07f6c6 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-bimap/CONTROL b/ports/boost-bimap/CONTROL new file mode 100644 index 000000000..7c84d3103 --- /dev/null +++ b/ports/boost-bimap/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-bimap +Version: 1.66.0 +Build-Depends: boost-concept-check, boost-config, boost-functional, boost-iterator, boost-lambda, boost-mpl, boost-multi-index, boost-preprocessor, boost-property-map, boost-serialization, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost bimap module diff --git a/ports/boost-bimap/portfile.cmake b/ports/boost-bimap/portfile.cmake new file mode 100644 index 000000000..313cd9075 --- /dev/null +++ b/ports/boost-bimap/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/bimap + REF boost-1.66.0 + SHA512 f0784a2fd2be60b404d8a3bb43fa4685ab75a17a18e9e9fb0a8e8d1df18323ad02ad12720f5cfb310c93a33fd3bdec09d8ac92cbc4ff875f9ff4c3a6263d4f8b + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-bind/CONTROL b/ports/boost-bind/CONTROL new file mode 100644 index 000000000..1c9875b2f --- /dev/null +++ b/ports/boost-bind/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-bind +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-vcpkg-helpers +Description: Boost bind module diff --git a/ports/boost-bind/portfile.cmake b/ports/boost-bind/portfile.cmake new file mode 100644 index 000000000..9cc1df5e7 --- /dev/null +++ b/ports/boost-bind/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/bind + REF boost-1.66.0 + SHA512 a3366e1d30b6d69fe1ce9a7daeabb5e32a64dea3c043be44327941e93a19a3bfa78a1a552c189edf7490f743d1e5686555d3caaf6826aeb6c7be4900e9c2368c + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-build/CONTROL b/ports/boost-build/CONTROL new file mode 100644 index 000000000..d034154d3 --- /dev/null +++ b/ports/boost-build/CONTROL @@ -0,0 +1,3 @@ +Source: boost-build +Version: 1.66.0 +Description: Boost.Build diff --git a/ports/boost-build/portfile.cmake b/ports/boost-build/portfile.cmake new file mode 100644 index 000000000..dec41e37b --- /dev/null +++ b/ports/boost-build/portfile.cmake @@ -0,0 +1,54 @@ +include(vcpkg_common_functions) + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + return() +endif() + +# This fixes the lib path to use desktop libs instead of uwp -- TODO: improve this with better "host" compilation +string(REPLACE "\\store\\;" "\\;" LIB "$ENV{LIB}") +set(ENV{LIB} "${LIB}") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/build + REF boost-1.66.0 + SHA512 db94eefa0c2fe410cfdf7599102670377a069d52a7c8d4181f6209e3e65860e9d92f86ec5994e402b8a773a47a4ad5c074acf9763eabbe293266af19380e7ca9 + HEAD_REF master +) + +vcpkg_download_distfile(ARCHIVE + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.65.1/LICENSE_1_0.txt" + FILENAME "boost_LICENSE_1_0.txt" + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 +) + +vcpkg_download_distfile(BOOSTCPP_ARCHIVE + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.66.0/boostcpp.jam" + FILENAME "boost-1.66.0-boostcpp.jam" + SHA512 ef2ae1d6a53a7f93654950e2e8e679da6b0359f02baafc03db970801634c1f5d4229633b5b6d74ad96a306e6efe3429d436669dc165b1fa655917e0ec74714e4 +) + +file(COPY + ${SOURCE_PATH}/ + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build +) + +file(READ "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" _contents) +string(REPLACE " /ZW /EHsc " "" _contents "${_contents}") +string(REPLACE "-nologo" "" _contents "${_contents}") +string(REPLACE "/nologo" "" _contents "${_contents}") +string(REPLACE "/Zm800" "" _contents "${_contents}") +string(REPLACE "_WIN32_WINNT=0x0602" "" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" "${_contents}") + +message(STATUS "Bootstrapping...") +vcpkg_execute_required_process( + COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" msvc + WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build + LOGNAME bootstrap-${TARGET_TRIPLET} +) + +file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright) +file(INSTALL ${BOOSTCPP_ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build RENAME boostcpp.jam) diff --git a/ports/boost-callable-traits/CONTROL b/ports/boost-callable-traits/CONTROL new file mode 100644 index 000000000..dbe301198 --- /dev/null +++ b/ports/boost-callable-traits/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-callable-traits +Version: 1.66.0 +Build-Depends: boost-vcpkg-helpers +Description: Boost callable_traits module diff --git a/ports/boost-callable-traits/portfile.cmake b/ports/boost-callable-traits/portfile.cmake new file mode 100644 index 000000000..4bc138320 --- /dev/null +++ b/ports/boost-callable-traits/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/callable_traits + REF boost-1.66.0 + SHA512 87a0f4de9a8cf2652addca6b3b685cea242bf55e1609409f41360813761ad3078b414761cf34856223fe60f460616e13e7b2e6017afc3d053879c7ec8292b9b0 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-chrono/CONTROL b/ports/boost-chrono/CONTROL new file mode 100644 index 000000000..00ee98871 --- /dev/null +++ b/ports/boost-chrono/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-chrono +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-move, boost-mpl, boost-predef, boost-ratio, boost-static-assert, boost-system, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Description: Boost chrono module diff --git a/ports/boost-chrono/portfile.cmake b/ports/boost-chrono/portfile.cmake new file mode 100644 index 000000000..167414ebf --- /dev/null +++ b/ports/boost-chrono/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/chrono + REF boost-1.66.0 + SHA512 edbc8c16bcdc4b79c47885e720c96781e6737d31c54e2c051596e693390c5a8efca4e16e253db0db5a996c72c1d0fb6482dda7dc58f78fd67edb09ad12f3a25b + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-circular-buffer/CONTROL b/ports/boost-circular-buffer/CONTROL new file mode 100644 index 000000000..56be43c12 --- /dev/null +++ b/ports/boost-circular-buffer/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-circular-buffer +Version: 1.66.0 +Build-Depends: boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-container, boost-core, boost-detail, boost-iterator, boost-move, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost circular_buffer module diff --git a/ports/boost-circular-buffer/portfile.cmake b/ports/boost-circular-buffer/portfile.cmake new file mode 100644 index 000000000..ebb8be3d0 --- /dev/null +++ b/ports/boost-circular-buffer/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/circular_buffer + REF boost-1.66.0 + SHA512 78d74fa417da8d19b8344feccff009ed90eb07e36251f2a18dcd58716c230c7faade68faf2b7b98c2fc43fea8186c38e5a81c1d2c981841b59e35b0dc6026943 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-compatibility/CONTROL b/ports/boost-compatibility/CONTROL new file mode 100644 index 000000000..acb31e6f1 --- /dev/null +++ b/ports/boost-compatibility/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-compatibility +Version: 1.66.0 +Build-Depends: boost-vcpkg-helpers +Description: Boost compatibility module diff --git a/ports/boost-compatibility/portfile.cmake b/ports/boost-compatibility/portfile.cmake new file mode 100644 index 000000000..cd9464deb --- /dev/null +++ b/ports/boost-compatibility/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/compatibility + REF boost-1.66.0 + SHA512 3f78455431974ca24fe48a6fce22eb9f374455560f2e9442c921e082e23ceb82b9ac2a443e6c4dbba2d24531dd0752ef854d3548340e3dba42b31aa795885fe3 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-compute/CONTROL b/ports/boost-compute/CONTROL new file mode 100644 index 000000000..3c7b1c17e --- /dev/null +++ b/ports/boost-compute/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-compute +Version: 1.66.0 +Build-Depends: boost-algorithm, boost-array, boost-assert, boost-chrono, boost-config, boost-core, boost-filesystem (windows), boost-function, boost-function-types, boost-fusion, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-preprocessor, boost-property-tree, boost-proto, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-uuid, boost-vcpkg-helpers +Description: Boost compute module diff --git a/ports/boost-compute/portfile.cmake b/ports/boost-compute/portfile.cmake new file mode 100644 index 000000000..fd8e2cd39 --- /dev/null +++ b/ports/boost-compute/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/compute + REF boost-1.66.0 + SHA512 c540200a62faf4e4b5895177d9b33f9316d0d5e4052f3bfea7eb33d9faa9446bd5015c55f59c923134c59d635f1078e1e7e50e013636efc65820056bb6bdb704 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-concept-check/CONTROL b/ports/boost-concept-check/CONTROL new file mode 100644 index 000000000..c56fc9fae --- /dev/null +++ b/ports/boost-concept-check/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-concept-check +Version: 1.66.0 +Build-Depends: boost-config, boost-mpl, boost-vcpkg-helpers +Description: Boost concept_check module diff --git a/ports/boost-concept-check/portfile.cmake b/ports/boost-concept-check/portfile.cmake new file mode 100644 index 000000000..0aa690830 --- /dev/null +++ b/ports/boost-concept-check/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/concept_check + REF boost-1.66.0 + SHA512 bec39bf040752414e08f7f6222b8557ea27df0e48c57fc2a1ad680ee15256a37a4e6a8cad1b39bb5f8800bfc7a32c39f89321669d04be9698775e77cd26e2fee + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-config/CONTROL b/ports/boost-config/CONTROL new file mode 100644 index 000000000..ed053950a --- /dev/null +++ b/ports/boost-config/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-config +Version: 1.66.0 +Build-Depends: boost-vcpkg-helpers +Description: Boost config module diff --git a/ports/boost-config/portfile.cmake b/ports/boost-config/portfile.cmake new file mode 100644 index 000000000..7b1a023c1 --- /dev/null +++ b/ports/boost-config/portfile.cmake @@ -0,0 +1,20 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/config + REF boost-1.66.0 + SHA512 7754f48170ceb06fce2961bf7ecf85d7601eccdaf1949fc5730a2bfb4524ff32b703be053059defcfb1c08d21573e8184a38283c59b6091f69e565eade06d9c1 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) +file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#ifndef BOOST_ALL_NO_LIB\n#define BOOST_ALL_NO_LIB\n#endif\n") +file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#undef BOOST_ALL_DYN_LINK\n") + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#define BOOST_ALL_DYN_LINK\n") +endif() diff --git a/ports/boost-container/CONTROL b/ports/boost-container/CONTROL new file mode 100644 index 000000000..df2cfe44e --- /dev/null +++ b/ports/boost-container/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-container +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-functional, boost-integer, boost-intrusive, boost-move, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Description: Boost container module diff --git a/ports/boost-container/portfile.cmake b/ports/boost-container/portfile.cmake new file mode 100644 index 000000000..46aefd96d --- /dev/null +++ b/ports/boost-container/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/container + REF boost-1.66.0 + SHA512 805421c56ace8786803a572e6047f0ab2de74973d7b04d603080b007c6ee7f288364dfe91f6d11be6128e8d5b0d9b2554237a6f77ee3855f3b598c3d5e20f3d1 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-context/CONTROL b/ports/boost-context/CONTROL new file mode 100644 index 000000000..37568a50d --- /dev/null +++ b/ports/boost-context/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-context +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-pool, boost-predef, boost-smart-ptr, boost-vcpkg-helpers +Description: Boost context module diff --git a/ports/boost-context/portfile.cmake b/ports/boost-context/portfile.cmake new file mode 100644 index 000000000..0e5852bb6 --- /dev/null +++ b/ports/boost-context/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/context + REF boost-1.66.0 + SHA512 73efe1ab2c3b589e0ec7a095ab4a62090d8a980efbc81ac915823d1015fec215647a558bf0102fb42dbcdb05e9a4f70bd145bba095f09f1f4aec24eceddef3d4 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-conversion/CONTROL b/ports/boost-conversion/CONTROL new file mode 100644 index 000000000..916585c42 --- /dev/null +++ b/ports/boost-conversion/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-conversion +Version: 1.66.0 +Build-Depends: boost-vcpkg-helpers +Description: Boost conversion module diff --git a/ports/boost-conversion/portfile.cmake b/ports/boost-conversion/portfile.cmake new file mode 100644 index 000000000..25b0a5dfb --- /dev/null +++ b/ports/boost-conversion/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/conversion + REF boost-1.66.0 + SHA512 685308e332cbcf94fa9788d36bbfcbbfe384010761b581df913f259c87add3041fba122fb0bd38ad6b706d64918f88e5b13730a4ab0e8e6f450aed82df4edd6d + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-convert/CONTROL b/ports/boost-convert/CONTROL new file mode 100644 index 000000000..e4219cb68 --- /dev/null +++ b/ports/boost-convert/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-convert +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-function-types, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-parameter, boost-range, boost-spirit, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost convert module diff --git a/ports/boost-convert/portfile.cmake b/ports/boost-convert/portfile.cmake new file mode 100644 index 000000000..10adca8e9 --- /dev/null +++ b/ports/boost-convert/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/convert + REF boost-1.66.0 + SHA512 5edd73c5f78471a567f03e7772834656295acd6897f4674950a5064053d1c8de019050141d5109cc2bba13a94d2a06e2c7020d09af9eb78174f5bf8dc2ba2220 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-core/CONTROL b/ports/boost-core/CONTROL new file mode 100644 index 000000000..785f2e2fd --- /dev/null +++ b/ports/boost-core/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-core +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-vcpkg-helpers +Description: Boost core module diff --git a/ports/boost-core/portfile.cmake b/ports/boost-core/portfile.cmake new file mode 100644 index 000000000..59cb63c78 --- /dev/null +++ b/ports/boost-core/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/core + REF boost-1.66.0 + SHA512 a8705d00b2f6803f924d73dc47ec9084824e9b80d19e281da632aed60abd2c60cf8b32bca92ea3ef1b8039100a7ac61d761a0eff521e3a182a6cd7a9de8b5710 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-coroutine/CONTROL b/ports/boost-coroutine/CONTROL new file mode 100644 index 000000000..227ffe8ef --- /dev/null +++ b/ports/boost-coroutine/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-coroutine +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-context (windows), boost-detail, boost-exception, boost-integer, boost-move, boost-range, boost-system, boost-thread (windows), boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost coroutine module diff --git a/ports/boost-coroutine/portfile.cmake b/ports/boost-coroutine/portfile.cmake new file mode 100644 index 000000000..2ba322498 --- /dev/null +++ b/ports/boost-coroutine/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/coroutine + REF boost-1.66.0 + SHA512 f42318076c1547797dd9427c47eb6a6dc5e2407f788d6e8c7e8b6092632238a6e33f1c4d02c25af00bb85f89c82a6f8f2d10911620b5d53cbc0bf931c7fdd160 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-coroutine2/CONTROL b/ports/boost-coroutine2/CONTROL new file mode 100644 index 000000000..fd52e362a --- /dev/null +++ b/ports/boost-coroutine2/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-coroutine2 +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-context (windows), boost-detail, boost-vcpkg-helpers +Description: Boost coroutine2 module diff --git a/ports/boost-coroutine2/portfile.cmake b/ports/boost-coroutine2/portfile.cmake new file mode 100644 index 000000000..824403bbf --- /dev/null +++ b/ports/boost-coroutine2/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/coroutine2 + REF boost-1.66.0 + SHA512 2ecc05325b7870e1d315e488b9f463f56f9959e6ae98277363176f32d80ba8dbd5d6b706e7cc60c896f53708fb25841ed5ef9f0520dba22c5f1a32ac120559f2 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-crc/CONTROL b/ports/boost-crc/CONTROL new file mode 100644 index 000000000..fdc424db6 --- /dev/null +++ b/ports/boost-crc/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-crc +Version: 1.66.0 +Build-Depends: boost-compatibility, boost-config, boost-integer, boost-vcpkg-helpers +Description: Boost crc module diff --git a/ports/boost-crc/portfile.cmake b/ports/boost-crc/portfile.cmake new file mode 100644 index 000000000..b8d183cd2 --- /dev/null +++ b/ports/boost-crc/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/crc + REF boost-1.66.0 + SHA512 887a1ee59535f150a6166432e8b9fdd124d604363c3609f9958d25ce3f265c42f1d749b52075d4e617acf552f68a56d92d249f562ad6475b53b15ca364e4e5b4 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-date-time/CONTROL b/ports/boost-date-time/CONTROL new file mode 100644 index 000000000..73f8d07ce --- /dev/null +++ b/ports/boost-date-time/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-date-time +Version: 1.66.0 +Build-Depends: boost-algorithm, boost-assert, boost-build, boost-compatibility, boost-config, boost-detail, boost-integer, boost-io, boost-lexical-cast, boost-math, boost-mpl, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Description: Boost date_time module diff --git a/ports/boost-date-time/portfile.cmake b/ports/boost-date-time/portfile.cmake new file mode 100644 index 000000000..fad0f01e9 --- /dev/null +++ b/ports/boost-date-time/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/date_time + REF boost-1.66.0 + SHA512 5c8ddf94d1c5a0bc5c216c9cbb4560a2e0aa7b116966a9a9250a517fb4c83f2fb9ad0c37c65f65e8cad2c7f21f621d696e1efd6d2bd557c1bfaa8b9d8c566f7d + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-detail/CONTROL b/ports/boost-detail/CONTROL new file mode 100644 index 000000000..21ae5d726 --- /dev/null +++ b/ports/boost-detail/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-detail +Version: 1.66.0 +Build-Depends: boost-compatibility, boost-config, boost-vcpkg-helpers +Description: Boost detail module diff --git a/ports/boost-detail/portfile.cmake b/ports/boost-detail/portfile.cmake new file mode 100644 index 000000000..072f14361 --- /dev/null +++ b/ports/boost-detail/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/detail + REF boost-1.66.0 + SHA512 9ad69f2d032535207748680e635b5c5cfeb2921f67f6d711d5083fd67686f63476fa04c03e0abf63bc58405b4a38b542686192398930154df716ea9381c7a43f + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-disjoint-sets/CONTROL b/ports/boost-disjoint-sets/CONTROL new file mode 100644 index 000000000..7ab636e2d --- /dev/null +++ b/ports/boost-disjoint-sets/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-disjoint-sets +Version: 1.66.0 +Build-Depends: boost-graph, boost-vcpkg-helpers +Description: Boost disjoint_sets module diff --git a/ports/boost-disjoint-sets/portfile.cmake b/ports/boost-disjoint-sets/portfile.cmake new file mode 100644 index 000000000..1b0c9aba3 --- /dev/null +++ b/ports/boost-disjoint-sets/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/disjoint_sets + REF boost-1.66.0 + SHA512 608239f39a11995ebd930d250a39c92971b6547b853eabe49938f6bbdadfbdb4f2220ccaf98e3516fe817284dc310dfb579f6fd7ae082dda9e7a5f80ce53abe6 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-dll/CONTROL b/ports/boost-dll/CONTROL new file mode 100644 index 000000000..96c9f59dc --- /dev/null +++ b/ports/boost-dll/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-dll +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-filesystem (windows), boost-integer, boost-move, boost-mpl, boost-predef, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Description: Boost dll module diff --git a/ports/boost-dll/portfile.cmake b/ports/boost-dll/portfile.cmake new file mode 100644 index 000000000..c387a6d7c --- /dev/null +++ b/ports/boost-dll/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/dll + REF boost-1.66.0 + SHA512 42e4442fbf50f33528e389ca463042c9155df970a7725a6d10213e3a8c311b638006271d1b5691e0ccdeb71652034568b2b5fa299a5b1580ad4433db0371138a + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-dynamic-bitset/CONTROL b/ports/boost-dynamic-bitset/CONTROL new file mode 100644 index 000000000..1170b0099 --- /dev/null +++ b/ports/boost-dynamic-bitset/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-dynamic-bitset +Version: 1.66.0 +Build-Depends: boost-serialization, boost-vcpkg-helpers +Description: Boost dynamic_bitset module diff --git a/ports/boost-dynamic-bitset/portfile.cmake b/ports/boost-dynamic-bitset/portfile.cmake new file mode 100644 index 000000000..63928751a --- /dev/null +++ b/ports/boost-dynamic-bitset/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/dynamic_bitset + REF boost-1.66.0 + SHA512 fa9bc10bbcd7ea907acf11abfd245fa70e4d82e5f7fe5b295b65e404ed19b276c06cd68ccec36a2276e76985a20c2a788c99e8cee095f24c04d0c8c5f5952135 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-endian/CONTROL b/ports/boost-endian/CONTROL new file mode 100644 index 000000000..cfcb7cb52 --- /dev/null +++ b/ports/boost-endian/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-endian +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-predef, boost-static-assert, boost-system, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost endian module diff --git a/ports/boost-endian/portfile.cmake b/ports/boost-endian/portfile.cmake new file mode 100644 index 000000000..14f19b0ed --- /dev/null +++ b/ports/boost-endian/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/endian + REF boost-1.66.0 + SHA512 5b23ff8f2fd2f59dc56637bef628328e8b99e261ce421809363cdfeb203646667f10b624b114e8e70d1fdfce0d53055dd03376d21ef4b5cba0f51b600091f2f3 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-exception/CONTROL b/ports/boost-exception/CONTROL new file mode 100644 index 000000000..52d316c34 --- /dev/null +++ b/ports/boost-exception/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-exception +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-smart-ptr, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost exception module diff --git a/ports/boost-exception/portfile.cmake b/ports/boost-exception/portfile.cmake new file mode 100644 index 000000000..dd5d6540e --- /dev/null +++ b/ports/boost-exception/portfile.cmake @@ -0,0 +1,18 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/exception + REF boost-1.66.0 + SHA512 ab4bd5df7250847c866e5b6db99930d190c04b2c2a46e49eb62e9ed9467b6f5aa60aa2db87e9fe27145321bf429a23e94a83bb28ea9f574d01b02ea06dd89571 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) + +set(VCPKG_LIBRARY_LINKAGE static) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/ports/boost-fiber/CONTROL b/ports/boost-fiber/CONTROL new file mode 100644 index 000000000..776d929a3 --- /dev/null +++ b/ports/boost-fiber/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-fiber +Version: 1.66.0 +Build-Depends: boost-algorithm, boost-assert, boost-build, boost-config, boost-context (windows), boost-core, boost-detail, boost-filesystem (windows), boost-format, boost-intrusive, boost-predef, boost-smart-ptr, boost-vcpkg-helpers +Description: Boost fiber module diff --git a/ports/boost-fiber/portfile.cmake b/ports/boost-fiber/portfile.cmake new file mode 100644 index 000000000..0ea0edcc4 --- /dev/null +++ b/ports/boost-fiber/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/fiber + REF boost-1.66.0 + SHA512 ba3980846e6602999a2187fb40c9c17d0bd0a8b7681bcdb2c9695ec5e218b6306c52680b565e176f170a7219aedf86596e356e92612bee87bf1ad8123261ccaf + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-filesystem/CONTROL b/ports/boost-filesystem/CONTROL new file mode 100644 index 000000000..afa6d0e45 --- /dev/null +++ b/ports/boost-filesystem/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-filesystem +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-functional, boost-integer, boost-io, boost-iterator, boost-range, boost-smart-ptr, boost-static-assert, boost-system, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost filesystem module diff --git a/ports/boost-filesystem/portfile.cmake b/ports/boost-filesystem/portfile.cmake new file mode 100644 index 000000000..e85cc096a --- /dev/null +++ b/ports/boost-filesystem/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/filesystem + REF boost-1.66.0 + SHA512 16c6c692485e02515fc09da5672cad4eb3c313e3a9ed9854d52ad1ba97a38d7346e4d0cf70baacba8468628bc1348350404151c3ff8984397a819d2cde3e4974 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-flyweight/CONTROL b/ports/boost-flyweight/CONTROL new file mode 100644 index 000000000..fb4378501 --- /dev/null +++ b/ports/boost-flyweight/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-flyweight +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-functional, boost-interprocess, boost-mpl, boost-multi-index, boost-parameter, boost-preprocessor, boost-serialization, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost flyweight module diff --git a/ports/boost-flyweight/portfile.cmake b/ports/boost-flyweight/portfile.cmake new file mode 100644 index 000000000..858560aeb --- /dev/null +++ b/ports/boost-flyweight/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/flyweight + REF boost-1.66.0 + SHA512 4c0faaafe0143404d6eabc57ee5089840290c865ab00b7b3c81d4ab37c1603aaec77bc7f592e4566ed20786a14bc6bb9a6623384fdf6886168cac2696224c6df + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-foreach/CONTROL b/ports/boost-foreach/CONTROL new file mode 100644 index 000000000..e2ecd2aae --- /dev/null +++ b/ports/boost-foreach/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-foreach +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-iterator, boost-mpl, boost-range, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost foreach module diff --git a/ports/boost-foreach/portfile.cmake b/ports/boost-foreach/portfile.cmake new file mode 100644 index 000000000..9801f7053 --- /dev/null +++ b/ports/boost-foreach/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/foreach + REF boost-1.66.0 + SHA512 17ae42db9b9b13841133cb35ccd1b0a2bf6121e72ef53b7f06d8715d0ef2d9c6daee631df1c8eb87013b1415ec4ed7481b3d67aa86122c84bfc560b0815f81c6 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-format/CONTROL b/ports/boost-format/CONTROL new file mode 100644 index 000000000..264544399 --- /dev/null +++ b/ports/boost-format/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-format +Version: 1.66.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-optional, boost-smart-ptr, boost-throw-exception, boost-utility, boost-vcpkg-helpers +Description: Boost format module diff --git a/ports/boost-format/portfile.cmake b/ports/boost-format/portfile.cmake new file mode 100644 index 000000000..a6c44bd27 --- /dev/null +++ b/ports/boost-format/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/format + REF boost-1.66.0 + SHA512 f730b56c3c56e85d5f467b7c9b60b29b112990ac29ecfbd6cdcd41ac6c931b71067a88d35ba688c8b80b9f4636a5f6010448f470cd3c0c7cad7c8c1d933c1a67 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-function-types/CONTROL b/ports/boost-function-types/CONTROL new file mode 100644 index 000000000..a091f72c4 --- /dev/null +++ b/ports/boost-function-types/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-function-types +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers +Description: Boost function_types module diff --git a/ports/boost-function-types/portfile.cmake b/ports/boost-function-types/portfile.cmake new file mode 100644 index 000000000..1b3190699 --- /dev/null +++ b/ports/boost-function-types/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/function_types + REF boost-1.66.0 + SHA512 ecac32195728a38bb83ee553d25567bca3a4075948fbffdf2f5d6cd7c4df7ca1b90ed32ec2811e6aa7eea264d6a1e63c8fc2fc9a091d081e231aadb513ed1646 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-function/CONTROL b/ports/boost-function/CONTROL new file mode 100644 index 000000000..78e68d4a9 --- /dev/null +++ b/ports/boost-function/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-function +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-integer, boost-mpl, boost-preprocessor, boost-type-index, boost-typeof, boost-type-traits, boost-vcpkg-helpers +Description: Boost function module diff --git a/ports/boost-function/portfile.cmake b/ports/boost-function/portfile.cmake new file mode 100644 index 000000000..c0db0b55f --- /dev/null +++ b/ports/boost-function/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/function + REF boost-1.66.0 + SHA512 7efe61484e99bf4b68bd70415411fe4b22da6c76c7bb2e4b86fc766a98f5bca02d3911c81763893edfabfe6dc3fd4e0b125656a518e4b46449ef2620c1278454 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-functional/CONTROL b/ports/boost-functional/CONTROL new file mode 100644 index 000000000..1c5b17ccd --- /dev/null +++ b/ports/boost-functional/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-functional +Version: 1.66.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-detail, boost-integer, boost-mpl, boost-preprocessor, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost functional module diff --git a/ports/boost-functional/portfile.cmake b/ports/boost-functional/portfile.cmake new file mode 100644 index 000000000..503d0786f --- /dev/null +++ b/ports/boost-functional/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/functional + REF boost-1.66.0 + SHA512 d909a4d4696ece5ebaff97a743c5f9fec2ce27b72de46a96252a07a021ad689ce73aab1f1828ca2925bac0ef48ccbe99bdd5f6a56186061fdecdb416f72cc98f + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-fusion/CONTROL b/ports/boost-fusion/CONTROL new file mode 100644 index 000000000..29864c681 --- /dev/null +++ b/ports/boost-fusion/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-fusion +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-functional, boost-function-types, boost-mpl, boost-preprocessor, boost-static-assert, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost fusion module diff --git a/ports/boost-fusion/portfile.cmake b/ports/boost-fusion/portfile.cmake new file mode 100644 index 000000000..ab3b553dd --- /dev/null +++ b/ports/boost-fusion/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/fusion + REF boost-1.66.0 + SHA512 2c965b3ad18f4b2551af4595de415c3c1354296c1244675a354b74de12106bf10ddea07c7e55e93469f3af0de64cb00e1d353e569af40de506d68b88adeba7d0 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-geometry/CONTROL b/ports/boost-geometry/CONTROL new file mode 100644 index 000000000..009e7e1c1 --- /dev/null +++ b/ports/boost-geometry/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-geometry +Version: 1.66.0 +Build-Depends: boost-algorithm, boost-array, boost-assert, boost-concept-check, boost-config, boost-container, boost-core, boost-detail, boost-function-types, boost-fusion, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-multiprecision, boost-numeric-conversion, boost-polygon, boost-qvm, boost-range, boost-rational, boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers +Description: Boost geometry module diff --git a/ports/boost-geometry/portfile.cmake b/ports/boost-geometry/portfile.cmake new file mode 100644 index 000000000..9e30e8fc7 --- /dev/null +++ b/ports/boost-geometry/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/geometry + REF boost-1.66.0 + SHA512 05f983d9258ddc663139a46ecb2f8a14988ad74fcc623af713bc486de2c9241896ca5f6a85d47cd02911f5f1f2f5acc439bb6f45ae9ef13667a30d27d9b5c123 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-gil/CONTROL b/ports/boost-gil/CONTROL new file mode 100644 index 000000000..71bf438b8 --- /dev/null +++ b/ports/boost-gil/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-gil +Version: 1.66.0 +Build-Depends: boost-bind, boost-concept-check, boost-config, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost gil module diff --git a/ports/boost-gil/portfile.cmake b/ports/boost-gil/portfile.cmake new file mode 100644 index 000000000..8ce5cc5aa --- /dev/null +++ b/ports/boost-gil/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/gil + REF boost-1.66.0 + SHA512 f60c452740e56810ee967aab68b61277af0b467085bb7594dfbdea07e02354f2533983f88867c788862bc30c027720f8aeff2ab8f5a251c1a2b7c686b43064bc + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-graph-parallel/CONTROL b/ports/boost-graph-parallel/CONTROL new file mode 100644 index 000000000..f3a7a6744 --- /dev/null +++ b/ports/boost-graph-parallel/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-graph-parallel +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-detail, boost-dynamic-bitset, boost-function, boost-functional, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpi, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers +Description: Boost graph_parallel module diff --git a/ports/boost-graph-parallel/portfile.cmake b/ports/boost-graph-parallel/portfile.cmake new file mode 100644 index 000000000..022831655 --- /dev/null +++ b/ports/boost-graph-parallel/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/graph_parallel + REF boost-1.66.0 + SHA512 0f897d52610827b352c509d9d3400a9424f2e927fe5bce7ba1a39884938ca9ae1c9d362277828d3e77fa727676bfeb993f3d9bc7f11815cc119c0dabbd5a2ed4 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-graph/CONTROL b/ports/boost-graph/CONTROL new file mode 100644 index 000000000..dc81d1a85 --- /dev/null +++ b/ports/boost-graph/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-graph +Version: 1.66.0 +Build-Depends: boost-algorithm, boost-any, boost-array, boost-assert, boost-bimap, boost-bind, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-functional, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-preprocessor, boost-property-map, boost-property-tree, boost-random, boost-range, boost-regex, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-test (windows), boost-throw-exception, boost-tti, boost-tuple, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers, boost-xpressive +Description: Boost graph module diff --git a/ports/boost-graph/portfile.cmake b/ports/boost-graph/portfile.cmake new file mode 100644 index 000000000..84948ccad --- /dev/null +++ b/ports/boost-graph/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/graph + REF boost-1.66.0 + SHA512 49f0292a4cbb26c4f9ada0e85f717a7848a81812957b891f72e99c9b7a62025bce244a2f7ef56aaf42f44ab11c41a02be4f1f70df41d3605da45becf370ca81b + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-hana/CONTROL b/ports/boost-hana/CONTROL new file mode 100644 index 000000000..9c9524e01 --- /dev/null +++ b/ports/boost-hana/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-hana +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers +Description: Boost hana module diff --git a/ports/boost-hana/portfile.cmake b/ports/boost-hana/portfile.cmake new file mode 100644 index 000000000..a46cfb28f --- /dev/null +++ b/ports/boost-hana/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/hana + REF boost-1.66.0 + SHA512 cf105931ad59147edd97aaee29d9af4f069ada58c1c0f49eba7c3f921c5a412c90609853603504207526cf80c728f188ba4ee024fc2b7c8c924f98faf543167a + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-heap/CONTROL b/ports/boost-heap/CONTROL new file mode 100644 index 000000000..588ee634c --- /dev/null +++ b/ports/boost-heap/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-heap +Version: 1.66.0 +Build-Depends: boost-array, boost-assert, boost-bind, boost-concept-check, boost-integer, boost-intrusive, boost-iterator, boost-mpl, boost-parameter, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Description: Boost heap module diff --git a/ports/boost-heap/portfile.cmake b/ports/boost-heap/portfile.cmake new file mode 100644 index 000000000..636763954 --- /dev/null +++ b/ports/boost-heap/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/heap + REF boost-1.66.0 + SHA512 3c7f14860e6456144f1282024bdf8c99415fe2c9395a01dea9000b26e9587430a73e133e7c72f3d40b5eab9c891e86ea3fa420a84e7d187a349f869f721b4587 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-icl/CONTROL b/ports/boost-icl/CONTROL new file mode 100644 index 000000000..d5d8aba74 --- /dev/null +++ b/ports/boost-icl/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-icl +Version: 1.66.0 +Build-Depends: boost-assert, boost-concept-check, boost-config, boost-date-time, boost-detail, boost-iterator, boost-move, boost-mpl, boost-rational, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost icl module diff --git a/ports/boost-icl/portfile.cmake b/ports/boost-icl/portfile.cmake new file mode 100644 index 000000000..e442621fa --- /dev/null +++ b/ports/boost-icl/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/icl + REF boost-1.66.0 + SHA512 3e240adbc815215d58c45978a52cf9e5ee8df1b457634d53f403dfc7785372f1711e407d6b1ccd48f6e4383455a5dc2c5a35923b6ac9ae722b91094902b8a599 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-integer/CONTROL b/ports/boost-integer/CONTROL new file mode 100644 index 000000000..6f6773b8c --- /dev/null +++ b/ports/boost-integer/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-integer +Version: 1.66.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-static-assert, boost-vcpkg-helpers +Description: Boost integer module diff --git a/ports/boost-integer/portfile.cmake b/ports/boost-integer/portfile.cmake new file mode 100644 index 000000000..07dc91e20 --- /dev/null +++ b/ports/boost-integer/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/integer + REF boost-1.66.0 + SHA512 ed22f30132300985361c3176b0e308c9ed2d0a2f470c3686898c66f90dfa21912edb92477f82f75b77b3409a21ea317442ab4d21889af45ebb2bc86bf88ce67f + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-interprocess/CONTROL b/ports/boost-interprocess/CONTROL new file mode 100644 index 000000000..75d524e61 --- /dev/null +++ b/ports/boost-interprocess/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-interprocess +Version: 1.66.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-integer, boost-intrusive, boost-move, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers +Description: Boost interprocess module diff --git a/ports/boost-interprocess/portfile.cmake b/ports/boost-interprocess/portfile.cmake new file mode 100644 index 000000000..6e959ca2d --- /dev/null +++ b/ports/boost-interprocess/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/interprocess + REF boost-1.66.0 + SHA512 e3c7f4fb49d126671354212fdb079c418847061a33589ab92c8cb600b469b98c658533307e1d0322c97568eb2716caccbf43b4b2d8eab520eab4d0f50b4df773 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-interval/CONTROL b/ports/boost-interval/CONTROL new file mode 100644 index 000000000..644558413 --- /dev/null +++ b/ports/boost-interval/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-interval +Version: 1.66.0 +Build-Depends: boost-compatibility, boost-config, boost-logic (windows), boost-vcpkg-helpers +Description: Boost interval module diff --git a/ports/boost-interval/portfile.cmake b/ports/boost-interval/portfile.cmake new file mode 100644 index 000000000..0d0a88b8b --- /dev/null +++ b/ports/boost-interval/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/interval + REF boost-1.66.0 + SHA512 adc8e7cf75de4f07607b2a13f38c4bb442780e7ad2e5a73f831803101f61f3d93d8d26407d68b1f811309e9a1362613fd29b5ff49e013341d421b0e76d6f4a69 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-intrusive/CONTROL b/ports/boost-intrusive/CONTROL new file mode 100644 index 000000000..966c775c3 --- /dev/null +++ b/ports/boost-intrusive/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-intrusive +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-functional, boost-move, boost-static-assert, boost-vcpkg-helpers +Description: Boost intrusive module diff --git a/ports/boost-intrusive/portfile.cmake b/ports/boost-intrusive/portfile.cmake new file mode 100644 index 000000000..d562cd074 --- /dev/null +++ b/ports/boost-intrusive/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/intrusive + REF boost-1.66.0 + SHA512 b61e88d38c9ee6cd174380c53fc3422f72824c895b3723c4ac7b3b3e0bd52d52fe40d349db5f8eff3b23413950ae872fa7634514ac072111614875922580c493 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-io/CONTROL b/ports/boost-io/CONTROL new file mode 100644 index 000000000..e146c12a6 --- /dev/null +++ b/ports/boost-io/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-io +Version: 1.66.0 +Build-Depends: boost-detail, boost-vcpkg-helpers +Description: Boost io module diff --git a/ports/boost-io/portfile.cmake b/ports/boost-io/portfile.cmake new file mode 100644 index 000000000..fae7c9191 --- /dev/null +++ b/ports/boost-io/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/io + REF boost-1.66.0 + SHA512 33926210420fa6bd83006e6d2de3bad4c1094c179309402d78aea906cdb301e652b32438472a29b195fac7e007146fbb081c722cc2ebf2c63acb0d0e44f73f20 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-iostreams/CONTROL b/ports/boost-iostreams/CONTROL new file mode 100644 index 000000000..57301cb18 --- /dev/null +++ b/ports/boost-iostreams/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-iostreams +Version: 1.66.0 +Build-Depends: boost-assert, boost-bind, boost-build, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, zlib +Description: Boost iostreams module diff --git a/ports/boost-iostreams/portfile.cmake b/ports/boost-iostreams/portfile.cmake new file mode 100644 index 000000000..e49d4a579 --- /dev/null +++ b/ports/boost-iostreams/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/iostreams + REF boost-1.66.0 + SHA512 d2d603013dd952a550850c986fc18ded90a483d9eccd80aec4bb421187f6d8ba8fc2c82926f60d4e4f777c67eab1b8dc3708058147dcdd1ab259aa13cee26fd9 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-iterator/CONTROL b/ports/boost-iterator/CONTROL new file mode 100644 index 000000000..416c85d53 --- /dev/null +++ b/ports/boost-iterator/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-iterator +Version: 1.66.0 +Build-Depends: boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-function-types, boost-fusion, boost-mpl, boost-optional, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost iterator module diff --git a/ports/boost-iterator/portfile.cmake b/ports/boost-iterator/portfile.cmake new file mode 100644 index 000000000..c20e9e29c --- /dev/null +++ b/ports/boost-iterator/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/iterator + REF boost-1.66.0 + SHA512 33a3ffd242769bf55325516346193db0d5ddb69e9da1f7805c35953e4ec7f090fb60faeea8d19c17e651148ba93d48b4a634533de9b5cb13af2a5e9cd0fd0e15 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-lambda/CONTROL b/ports/boost-lambda/CONTROL new file mode 100644 index 000000000..dd83f0048 --- /dev/null +++ b/ports/boost-lambda/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-lambda +Version: 1.66.0 +Build-Depends: boost-bind, boost-config, boost-detail, boost-mpl, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost lambda module diff --git a/ports/boost-lambda/portfile.cmake b/ports/boost-lambda/portfile.cmake new file mode 100644 index 000000000..315bf1ddf --- /dev/null +++ b/ports/boost-lambda/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/lambda + REF boost-1.66.0 + SHA512 2f5fd6c55c686528971c9e021779f39217952b279e5bef46879233fb1c516895a4fcdc6eddf43cd0fb73aa7ee5f868d6f4d51fdc74c9f68515ef6735ff31a349 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-lexical-cast/CONTROL b/ports/boost-lexical-cast/CONTROL new file mode 100644 index 000000000..a7c913996 --- /dev/null +++ b/ports/boost-lexical-cast/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-lexical-cast +Version: 1.66.0 +Build-Depends: boost-array, boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-detail, boost-integer, boost-mpl, boost-numeric-conversion, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Description: Boost lexical_cast module diff --git a/ports/boost-lexical-cast/portfile.cmake b/ports/boost-lexical-cast/portfile.cmake new file mode 100644 index 000000000..5187ead72 --- /dev/null +++ b/ports/boost-lexical-cast/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/lexical_cast + REF boost-1.66.0 + SHA512 93afc3a296ca30ebb3f48aaf7752a4da33d3e621b56f0f574e98a21aceb7c402fc7512ac65895c8bf473b6962222d0022a6d2aadad5ce2cdbfdf5318967dc76b + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-local-function/CONTROL b/ports/boost-local-function/CONTROL new file mode 100644 index 000000000..512cb0f7d --- /dev/null +++ b/ports/boost-local-function/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-local-function +Version: 1.66.0 +Build-Depends: boost-config, boost-mpl, boost-preprocessor, boost-scope-exit, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost local_function module diff --git a/ports/boost-local-function/portfile.cmake b/ports/boost-local-function/portfile.cmake new file mode 100644 index 000000000..0c59a8db7 --- /dev/null +++ b/ports/boost-local-function/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/local_function + REF boost-1.66.0 + SHA512 3f76fda169f11ceca60c8e1857643d7bf7eea85fdb615635469e28cdc6e02f022d5f698ec53608d6f1068be653ceda40f33f4c832782e347037b924208fc5d20 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-locale/CONTROL b/ports/boost-locale/CONTROL new file mode 100644 index 000000000..884c737b4 --- /dev/null +++ b/ports/boost-locale/CONTROL @@ -0,0 +1,9 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-locale +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-function, boost-integer, boost-iterator, boost-smart-ptr, boost-static-assert, boost-thread (windows), boost-type-traits, boost-unordered, boost-vcpkg-helpers +Description: Boost locale module + +Feature: icu +Description: ICU backend for Boost.Locale +Build-Depends: icu diff --git a/ports/boost-locale/portfile.cmake b/ports/boost-locale/portfile.cmake new file mode 100644 index 000000000..b8126dce5 --- /dev/null +++ b/ports/boost-locale/portfile.cmake @@ -0,0 +1,28 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/locale + REF boost-1.66.0 + SHA512 558c84fe83909b9eb410ed5b846d2393733811e3765e99e41884a7fc7020163437a42584911b4f634706c1a0e79e23bb09bd6a3ffa219c9e524a10ace02728af + HEAD_REF master +) + +if("icu" IN_LIST FEATURES) + set(BOOST_LOCALE_ICU on) +else() + set(BOOST_LOCALE_ICU off) +endif() + +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + boost.locale.iconv=off + boost.locale.posix=off + /boost/locale//boost_locale + boost.locale.icu=${BOOST_LOCALE_ICU} +) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-lockfree/CONTROL b/ports/boost-lockfree/CONTROL new file mode 100644 index 000000000..7a6eaef4d --- /dev/null +++ b/ports/boost-lockfree/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-lockfree +Version: 1.66.0 +Build-Depends: boost-align, boost-array, boost-assert, boost-atomic, boost-config, boost-core, boost-integer, boost-mpl, boost-parameter, boost-predef, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost lockfree module diff --git a/ports/boost-lockfree/portfile.cmake b/ports/boost-lockfree/portfile.cmake new file mode 100644 index 000000000..0f6cabeb8 --- /dev/null +++ b/ports/boost-lockfree/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/lockfree + REF boost-1.66.0 + SHA512 f4c5c146fd2e457e6ee4090a4492eef7cd204ec594349c239c3f50e348a161b8598d7445ca03daea8720b58f0eb1eb5ec8332b078f8dcd9d8133b0d17796e21e + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-log/CONTROL b/ports/boost-log/CONTROL new file mode 100644 index 000000000..912f771d0 --- /dev/null +++ b/ports/boost-log/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-log +Version: 1.66.0 +Build-Depends: boost-align, boost-array, boost-asio, boost-assert, boost-atomic, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-date-time, boost-detail, boost-exception, boost-filesystem (windows), boost-function-types, boost-fusion, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iterator, boost-lexical-cast, boost-locale (windows), boost-math, boost-move, boost-mpl, boost-optional, boost-parameter, boost-phoenix, boost-predef, boost-preprocessor, boost-property-tree, boost-proto, boost-random, boost-range, boost-regex, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-thread (windows), boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi, boost-xpressive +Description: Boost log module diff --git a/ports/boost-log/portfile.cmake b/ports/boost-log/portfile.cmake new file mode 100644 index 000000000..ecc8118d9 --- /dev/null +++ b/ports/boost-log/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/log + REF boost-1.66.0 + SHA512 cb0b7ac7136c1066c6dd10a27873febbf983b9c7b7d141ba5e1076a0984cb83609a3c8d38d13e7641002d460f868c2593fecdfd86d9eb75078f14597ab965fa1 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-logic/CONTROL b/ports/boost-logic/CONTROL new file mode 100644 index 000000000..535a53caa --- /dev/null +++ b/ports/boost-logic/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-logic +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-vcpkg-helpers +Description: Boost logic module diff --git a/ports/boost-logic/portfile.cmake b/ports/boost-logic/portfile.cmake new file mode 100644 index 000000000..66df8aca6 --- /dev/null +++ b/ports/boost-logic/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/logic + REF boost-1.66.0 + SHA512 76e8534127da09c7b70e14927dae03696e251e1c9a825f466d6848dfd0ba14e0d4e8b7bd00dfebe4caf9ef10c591e0d50140b1d4c9c638e0b3f7ae7bf353b8af + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-math/CONTROL b/ports/boost-math/CONTROL new file mode 100644 index 000000000..8343ab985 --- /dev/null +++ b/ports/boost-math/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-math +Version: 1.66.0 +Build-Depends: boost-array, boost-assert, boost-atomic, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-integer, boost-lambda, boost-lexical-cast, boost-mpl, boost-predef, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost math module diff --git a/ports/boost-math/portfile.cmake b/ports/boost-math/portfile.cmake new file mode 100644 index 000000000..f6e4eeccd --- /dev/null +++ b/ports/boost-math/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/math + REF boost-1.66.0 + SHA512 0fbeea0cb3303fe66e42b54d3db81e92d6b05a5dec90bd36e1365db738b33790e9bc6ff56a8ead0a2e2d578606702eb364d023bce0f1f42a454f60d0626e8737 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-metaparse/CONTROL b/ports/boost-metaparse/CONTROL new file mode 100644 index 000000000..7f18a1f45 --- /dev/null +++ b/ports/boost-metaparse/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-metaparse +Version: 1.66.0 +Build-Depends: boost-config, boost-mpl, boost-predef, boost-preprocessor, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Description: Boost metaparse module diff --git a/ports/boost-metaparse/portfile.cmake b/ports/boost-metaparse/portfile.cmake new file mode 100644 index 000000000..972f5bf52 --- /dev/null +++ b/ports/boost-metaparse/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/metaparse + REF boost-1.66.0 + SHA512 919c0f198b19114fe1ed457fead502cee729b7c14de460b176784e9778b0040a960d916b4c7fbeb3e7c3ec285b7b1a0d90de8d0dfcca5c14c9d810ab17da5717 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-move/CONTROL b/ports/boost-move/CONTROL new file mode 100644 index 000000000..ec9de26e9 --- /dev/null +++ b/ports/boost-move/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-move +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-detail, boost-integer, boost-static-assert, boost-vcpkg-helpers +Description: Boost move module diff --git a/ports/boost-move/portfile.cmake b/ports/boost-move/portfile.cmake new file mode 100644 index 000000000..29f3a3ff7 --- /dev/null +++ b/ports/boost-move/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/move + REF boost-1.66.0 + SHA512 e431ca8c709f6acb205f93e3c1de1a3b46325e183726bd9b862f4fba436af92b3f5a945eddfe04c3fa775fd88311f98eafa9e81f5014f3a0309096f18b837286 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-mp11/CONTROL b/ports/boost-mp11/CONTROL new file mode 100644 index 000000000..70bd30300 --- /dev/null +++ b/ports/boost-mp11/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-mp11 +Version: 1.66.0 +Build-Depends: boost-config, boost-detail, boost-vcpkg-helpers +Description: Boost mp11 module diff --git a/ports/boost-mp11/portfile.cmake b/ports/boost-mp11/portfile.cmake new file mode 100644 index 000000000..3e39072a8 --- /dev/null +++ b/ports/boost-mp11/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/mp11 + REF boost-1.66.0 + SHA512 40eb7813f7821d584733b5499270b8ef26619502a3eac78b026587477be881a55efbb99769a0818c50413facb12f583b459df121c8d01dc06ceb4ea50a5f7029 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-mpi/CONTROL b/ports/boost-mpi/CONTROL new file mode 100644 index 000000000..807729530 --- /dev/null +++ b/ports/boost-mpi/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-mpi +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost mpi module diff --git a/ports/boost-mpi/portfile.cmake b/ports/boost-mpi/portfile.cmake new file mode 100644 index 000000000..66c11c29a --- /dev/null +++ b/ports/boost-mpi/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/mpi + REF boost-1.66.0 + SHA512 bd6385274f291c905ba0239f8399058e4bf76a07d5b984a10fe737e895495c92190ef468be48c32247d4bcb3dd844a5b72b9370ebd2a95945aa38be60bdd3465 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-mpl/CONTROL b/ports/boost-mpl/CONTROL new file mode 100644 index 000000000..f082844d6 --- /dev/null +++ b/ports/boost-mpl/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-mpl +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-predef, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers +Description: Boost mpl module diff --git a/ports/boost-mpl/portfile.cmake b/ports/boost-mpl/portfile.cmake new file mode 100644 index 000000000..908524fb2 --- /dev/null +++ b/ports/boost-mpl/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/mpl + REF boost-1.66.0 + SHA512 e88fa03fbc0f876f838826c5ccfd3866425fa87fd81b9aeb83e4c0afded189a66b06206230f07d1177bdbc39ea5b15cb050ad6285d7704ea83bb43c7d608cc1b + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-msm/CONTROL b/ports/boost-msm/CONTROL new file mode 100644 index 000000000..f51a7993f --- /dev/null +++ b/ports/boost-msm/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-msm +Version: 1.66.0 +Build-Depends: boost-any, boost-assert, boost-bind, boost-circular-buffer, boost-config, boost-core, boost-detail, boost-function, boost-fusion, boost-mpl, boost-parameter, boost-phoenix, boost-preprocessor, boost-proto, boost-serialization, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost msm module diff --git a/ports/boost-msm/portfile.cmake b/ports/boost-msm/portfile.cmake new file mode 100644 index 000000000..fec66d317 --- /dev/null +++ b/ports/boost-msm/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/msm + REF boost-1.66.0 + SHA512 722360bb58971b52ca2078f908d439544d577fbcba0a99328a000be59772e492c5243192641cc91fe6b3ed95885b209a30f47fd1dd7246889b0552cdc1246b3d + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-multi-array/CONTROL b/ports/boost-multi-array/CONTROL new file mode 100644 index 000000000..68ac4410b --- /dev/null +++ b/ports/boost-multi-array/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-multi-array +Version: 1.66.0 +Build-Depends: boost-compatibility, boost-config, boost-vcpkg-helpers +Description: Boost multi_array module diff --git a/ports/boost-multi-array/portfile.cmake b/ports/boost-multi-array/portfile.cmake new file mode 100644 index 000000000..312c4bfdd --- /dev/null +++ b/ports/boost-multi-array/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/multi_array + REF boost-1.66.0 + SHA512 6240a90a020f1a6dda1be9e5d5d3743d6f5c50cea1a8b8f75151e60314822e8469db7c0d134a1b1ff50af40833017ee087673894e7e8bd6c394d68547ae68d62 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-multi-index/CONTROL b/ports/boost-multi-index/CONTROL new file mode 100644 index 000000000..d6da63dcd --- /dev/null +++ b/ports/boost-multi-index/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-multi-index +Version: 1.66.0 +Build-Depends: boost-assert, boost-bind, boost-compatibility, boost-config, boost-core, boost-detail, boost-foreach, boost-functional, boost-integer, boost-iterator, boost-move, boost-mpl, boost-preprocessor, boost-serialization, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost multi_index module diff --git a/ports/boost-multi-index/portfile.cmake b/ports/boost-multi-index/portfile.cmake new file mode 100644 index 000000000..a2b157fa6 --- /dev/null +++ b/ports/boost-multi-index/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/multi_index + REF boost-1.66.0 + SHA512 a96c5f7f6a31236462a06c11320232d5aeb16a4df9ff8af972d03c27fb35d6cf17789d8ea6b6d155b55ea435335e605ec7a049c418c529ed48f99b31a4f34423 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-multiprecision/CONTROL b/ports/boost-multiprecision/CONTROL new file mode 100644 index 000000000..241880570 --- /dev/null +++ b/ports/boost-multiprecision/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-multiprecision +Version: 1.66.0 +Build-Depends: boost-array, boost-assert, boost-config, boost-detail, boost-functional, boost-integer, boost-lexical-cast, boost-math, boost-mpl, boost-random, boost-rational, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost multiprecision module diff --git a/ports/boost-multiprecision/portfile.cmake b/ports/boost-multiprecision/portfile.cmake new file mode 100644 index 000000000..9fe2f040a --- /dev/null +++ b/ports/boost-multiprecision/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/multiprecision + REF boost-1.66.0 + SHA512 3ba38ec20855a0f2f363c34e3c958a7e2e93cbb45d1ab995c26a38e06751192ada95e1a28ea0e9106002cef6250b68dcdecf83a8c6b42676c467ec2d7626288e + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-numeric-conversion/CONTROL b/ports/boost-numeric-conversion/CONTROL new file mode 100644 index 000000000..8bc729ec9 --- /dev/null +++ b/ports/boost-numeric-conversion/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-numeric-conversion +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-integer, boost-preprocessor, boost-throw-exception, boost-vcpkg-helpers +Description: Boost numeric_conversion module diff --git a/ports/boost-numeric-conversion/portfile.cmake b/ports/boost-numeric-conversion/portfile.cmake new file mode 100644 index 000000000..e90d9dba2 --- /dev/null +++ b/ports/boost-numeric-conversion/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/numeric_conversion + REF boost-1.66.0 + SHA512 3f20e7adf501d69544fe5a4e8b52efa8e7b4327c0c371f1abc22f6aa6035931bcf0597853690b59140378e158462b0ba1d85d2c8ba978c2a5185cac7acefd313 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-odeint/CONTROL b/ports/boost-odeint/CONTROL new file mode 100644 index 000000000..abe138aec --- /dev/null +++ b/ports/boost-odeint/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-odeint +Version: 1.66.0 +Build-Depends: boost-array, boost-assert, boost-bind, boost-compute, boost-config, boost-core, boost-function, boost-fusion, boost-iterator, boost-math, boost-mpi, boost-mpl, boost-multi-array, boost-preprocessor, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-units, boost-utility, boost-vcpkg-helpers +Description: Boost odeint module diff --git a/ports/boost-odeint/portfile.cmake b/ports/boost-odeint/portfile.cmake new file mode 100644 index 000000000..6ded9f5b2 --- /dev/null +++ b/ports/boost-odeint/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/odeint + REF boost-1.66.0 + SHA512 f4d1a0d689c64bbd3dc93060e0e787aa39940b4ca0baf557ea7cb1c28225af5388d24b1654be04103427ba3b943f83dc34be1c0acedcdc2a9b8ac63acbe6946c + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-optional/CONTROL b/ports/boost-optional/CONTROL new file mode 100644 index 000000000..752708636 --- /dev/null +++ b/ports/boost-optional/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-optional +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-move, boost-mpl, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost optional module diff --git a/ports/boost-optional/portfile.cmake b/ports/boost-optional/portfile.cmake new file mode 100644 index 000000000..e3144433b --- /dev/null +++ b/ports/boost-optional/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/optional + REF boost-1.66.0 + SHA512 489e8a10abcd906e2bf12d1019f16c02e64ca32df5611351d6a512ff3fdd742f726820a1b6f9de66de78363f8a6a964d1f06905c91382342b5320effd7991b89 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-parameter/CONTROL b/ports/boost-parameter/CONTROL new file mode 100644 index 000000000..aaee2abfc --- /dev/null +++ b/ports/boost-parameter/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-parameter +Version: 1.66.0 +Build-Depends: boost-detail, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers +Description: Boost parameter module diff --git a/ports/boost-parameter/portfile.cmake b/ports/boost-parameter/portfile.cmake new file mode 100644 index 000000000..a5d119c15 --- /dev/null +++ b/ports/boost-parameter/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/parameter + REF boost-1.66.0 + SHA512 042be1f9030f4561295a8fcdd252c094d7e17cfd7cc237dfcab6d131c568466fa5ee86a57746d8b254a577251922c7dfa5c1913529743936b8ec90cbb6e7939c + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-phoenix/CONTROL b/ports/boost-phoenix/CONTROL new file mode 100644 index 000000000..ad3236dde --- /dev/null +++ b/ports/boost-phoenix/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-phoenix +Version: 1.66.0 +Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-function, boost-fusion, boost-mpl, boost-predef, boost-preprocessor, boost-proto, boost-range, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost phoenix module diff --git a/ports/boost-phoenix/portfile.cmake b/ports/boost-phoenix/portfile.cmake new file mode 100644 index 000000000..42281eba4 --- /dev/null +++ b/ports/boost-phoenix/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/phoenix + REF boost-1.66.0 + SHA512 dbffb57041607e90dfea2113192e1a8fc73934faefe00a00d50542e102b8659f55b4491cc2066fd181444bd04f2a610d75bb67773c205742d8def3516d9148aa + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-poly-collection/CONTROL b/ports/boost-poly-collection/CONTROL new file mode 100644 index 000000000..66679c5c9 --- /dev/null +++ b/ports/boost-poly-collection/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-poly-collection +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-iterator, boost-mpl, boost-type-erasure (windows), boost-type-traits, boost-vcpkg-helpers +Description: Boost poly_collection module diff --git a/ports/boost-poly-collection/portfile.cmake b/ports/boost-poly-collection/portfile.cmake new file mode 100644 index 000000000..b0fbf602a --- /dev/null +++ b/ports/boost-poly-collection/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/poly_collection + REF boost-1.66.0 + SHA512 110af2363b0ca7f6941ebd45d67edda865b704cbf8e7009349e1487f7c0303e3d2d891576ff7004a74bafd66cf913d91e83166c54a9c34770e58c574e288d688 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-polygon/CONTROL b/ports/boost-polygon/CONTROL new file mode 100644 index 000000000..8c95d707e --- /dev/null +++ b/ports/boost-polygon/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-polygon +Version: 1.66.0 +Build-Depends: boost-config, boost-integer, boost-mpl, boost-utility, boost-vcpkg-helpers +Description: Boost polygon module diff --git a/ports/boost-polygon/portfile.cmake b/ports/boost-polygon/portfile.cmake new file mode 100644 index 000000000..f9390d963 --- /dev/null +++ b/ports/boost-polygon/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/polygon + REF boost-1.66.0 + SHA512 7d8b3b275ab5c010a3c1736e59290b514d44080a7fec9e26b28d39c3df2346ac9f5d762b84c6f55296452bbcdf3a8cff5ac3f2895a99be90c4630efb04229157 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-pool/CONTROL b/ports/boost-pool/CONTROL new file mode 100644 index 000000000..141cc45c3 --- /dev/null +++ b/ports/boost-pool/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-pool +Version: 1.66.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-detail, boost-integer, boost-thread (windows), boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Description: Boost pool module diff --git a/ports/boost-pool/portfile.cmake b/ports/boost-pool/portfile.cmake new file mode 100644 index 000000000..1f5b5dfc9 --- /dev/null +++ b/ports/boost-pool/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/pool + REF boost-1.66.0 + SHA512 1b54515a075ff2039ff18ac615a3e172cd7e703d7d27970c12f507aaa32cf36ac79b5fc4e808df10e076175036d953fff601c8814ef286b61fcc41ac1a708c3b + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-predef/CONTROL b/ports/boost-predef/CONTROL new file mode 100644 index 000000000..9419ab7b5 --- /dev/null +++ b/ports/boost-predef/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-predef +Version: 1.66.0 +Build-Depends: boost-vcpkg-helpers +Description: Boost predef module diff --git a/ports/boost-predef/portfile.cmake b/ports/boost-predef/portfile.cmake new file mode 100644 index 000000000..ff0e9a9f1 --- /dev/null +++ b/ports/boost-predef/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/predef + REF boost-1.66.0 + SHA512 24f9ddb4ff5f16ae6a8764e940aa85f703c924e550423d7ff58c0e6b97568ecc78b6e97cbcc4ea0489ff2272501130db33e80bf86f071f1bad1d4b0f8c8665ae + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-preprocessor/CONTROL b/ports/boost-preprocessor/CONTROL new file mode 100644 index 000000000..6cc22c054 --- /dev/null +++ b/ports/boost-preprocessor/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-preprocessor +Version: 1.66.0 +Build-Depends: boost-vcpkg-helpers +Description: Boost preprocessor module diff --git a/ports/boost-preprocessor/portfile.cmake b/ports/boost-preprocessor/portfile.cmake new file mode 100644 index 000000000..4b85735b4 --- /dev/null +++ b/ports/boost-preprocessor/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/preprocessor + REF boost-1.66.0 + SHA512 233c46132d69499d96d8cf47fd41e7b80a558b43ace57a654be9bf4aad8c46907bf2fcc0e5698c0df4c8006bcd1e51a72b69c9269e128f360477481ff8cb2451 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-process/CONTROL b/ports/boost-process/CONTROL new file mode 100644 index 000000000..28d9c027d --- /dev/null +++ b/ports/boost-process/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-process +Version: 1.66.0 +Build-Depends: boost-algorithm, boost-asio, boost-config, boost-core, boost-filesystem (windows), boost-fusion, boost-iterator, boost-move, boost-optional, boost-system, boost-tokenizer, boost-type-index, boost-vcpkg-helpers, boost-winapi +Description: Boost process module diff --git a/ports/boost-process/portfile.cmake b/ports/boost-process/portfile.cmake new file mode 100644 index 000000000..444196c4e --- /dev/null +++ b/ports/boost-process/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/process + REF boost-1.66.0 + SHA512 4e9b4709c9c46eade2b2ac572b323928cbb793168b3a6ae78387ce7f224daa6a8358c8902547066f5ab2ab34705cb2b1a854cc33144e5459ce95acee96be1d6e + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-program-options/CONTROL b/ports/boost-program-options/CONTROL new file mode 100644 index 000000000..3a1ff727e --- /dev/null +++ b/ports/boost-program-options/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-program-options +Version: 1.66.0 +Build-Depends: boost-any, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-lexical-cast, boost-math, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-vcpkg-helpers +Description: Boost program_options module diff --git a/ports/boost-program-options/portfile.cmake b/ports/boost-program-options/portfile.cmake new file mode 100644 index 000000000..61740c6cb --- /dev/null +++ b/ports/boost-program-options/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/program_options + REF boost-1.66.0 + SHA512 8c196b4c784def8cedb9c591e364e1759d1c90ff41a536c4c2f0dcc4cae58fb82ab3b6640438b6e98988eba7f6517e2baa5ce67738e9aad7db5924b71a7937fe + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-property-map/CONTROL b/ports/boost-property-map/CONTROL new file mode 100644 index 000000000..2b88e8c12 --- /dev/null +++ b/ports/boost-property-map/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-property-map +Version: 1.66.0 +Build-Depends: boost-any, boost-assert, boost-bind, boost-concept-check, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-multi-index, boost-optional, boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost property_map module diff --git a/ports/boost-property-map/portfile.cmake b/ports/boost-property-map/portfile.cmake new file mode 100644 index 000000000..b5855bd8b --- /dev/null +++ b/ports/boost-property-map/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/property_map + REF boost-1.66.0 + SHA512 3a935f14bf87a8c469b39a9fc4457f11d932caede6558d49868073ad35113a6285c48fed4fe3f2e6c8d743f1cf28ac0e8c4bb83b230a55035a89a60e24d43441 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-property-tree/CONTROL b/ports/boost-property-tree/CONTROL new file mode 100644 index 000000000..c1f329ea3 --- /dev/null +++ b/ports/boost-property-tree/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-property-tree +Version: 1.66.0 +Build-Depends: boost-any, boost-assert, boost-bind, boost-compatibility, boost-config, boost-core, boost-format, boost-iterator, boost-mpl, boost-multi-index, boost-optional, boost-range, boost-serialization, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost property_tree module diff --git a/ports/boost-property-tree/portfile.cmake b/ports/boost-property-tree/portfile.cmake new file mode 100644 index 000000000..fd98c349b --- /dev/null +++ b/ports/boost-property-tree/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/property_tree + REF boost-1.66.0 + SHA512 257f3ae750d71c82c0585766e1a35ac90dfced98fdccde8fe5fc504f26e42e7c6629c83fa6cae098271f7cf0cbe669f00246248b548740b303e32c63e79b0492 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-proto/CONTROL b/ports/boost-proto/CONTROL new file mode 100644 index 000000000..3fc404fa4 --- /dev/null +++ b/ports/boost-proto/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-proto +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-fusion, boost-mpl, boost-preprocessor, boost-range, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost proto module diff --git a/ports/boost-proto/portfile.cmake b/ports/boost-proto/portfile.cmake new file mode 100644 index 000000000..50051cec1 --- /dev/null +++ b/ports/boost-proto/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/proto + REF boost-1.66.0 + SHA512 bf15dc60d07be6e0198c3afd9ca232561e7e919957a0c28b8558bc6bea25e9c3b64af7efa573daeda657e8f6657dc3c11570776261dc29cc4e50356a5b67333a + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-ptr-container/CONTROL b/ports/boost-ptr-container/CONTROL new file mode 100644 index 000000000..d55c82ae0 --- /dev/null +++ b/ports/boost-ptr-container/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-ptr-container +Version: 1.66.0 +Build-Depends: boost-array, boost-assert, boost-circular-buffer, boost-config, boost-core, boost-iterator, boost-mpl, boost-range, boost-serialization, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers +Description: Boost ptr_container module diff --git a/ports/boost-ptr-container/portfile.cmake b/ports/boost-ptr-container/portfile.cmake new file mode 100644 index 000000000..34a7e4cb4 --- /dev/null +++ b/ports/boost-ptr-container/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/ptr_container + REF boost-1.66.0 + SHA512 4a90951b6467a4bc97ef9426b1a3d29178084c3033664ef1717926592e515d446b4a8f0c42d1bb640d7a82d7219514f5370f16744bbd8bfbc922b2f5b2c85180 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-python/CONTROL b/ports/boost-python/CONTROL new file mode 100644 index 000000000..645cf8b13 --- /dev/null +++ b/ports/boost-python/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-python +Version: 1.66.0 +Build-Depends: boost-bind, boost-config, boost-core, boost-detail, boost-graph, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-property-map, boost-smart-ptr, boost-static-assert, boost-tuple, boost-utility, boost-vcpkg-helpers, python3 +Description: Boost python module diff --git a/ports/boost-python/portfile.cmake b/ports/boost-python/portfile.cmake new file mode 100644 index 000000000..beb16ad8f --- /dev/null +++ b/ports/boost-python/portfile.cmake @@ -0,0 +1,19 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/python + REF boost-1.66.0 + SHA512 3a16f16c19bf8a97c10db5c4a39385646a49ed794e9f7a0030181c0fb163671306ca92714aeea6440f60d043736ea4c15d1256fb418f18aea164c2d09420774f + HEAD_REF master +) + +# Find Python. Can't use find_package here, but we already know where everything is +file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") +set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") +set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") +string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION "${PYTHON_INCLUDE_PATH}") +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-qvm/CONTROL b/ports/boost-qvm/CONTROL new file mode 100644 index 000000000..a7521d4ab --- /dev/null +++ b/ports/boost-qvm/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-qvm +Version: 1.66.0 +Build-Depends: boost-assert, boost-exception, boost-static-assert, boost-throw-exception, boost-utility, boost-vcpkg-helpers +Description: Boost qvm module diff --git a/ports/boost-qvm/portfile.cmake b/ports/boost-qvm/portfile.cmake new file mode 100644 index 000000000..1ef911b15 --- /dev/null +++ b/ports/boost-qvm/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/qvm + REF boost-1.66.0 + SHA512 b7c1db0f7db316e6f2094185497deaf58fe45f9a11517c76a66bec65d9ee9f32167bccb36ad8388c0f06649067a89e5b1c3894af0a4b4b327ee51ae29dd86c50 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-random/CONTROL b/ports/boost-random/CONTROL new file mode 100644 index 000000000..fee15c891 --- /dev/null +++ b/ports/boost-random/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-random +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-math, boost-mpl, boost-range, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost random module diff --git a/ports/boost-random/portfile.cmake b/ports/boost-random/portfile.cmake new file mode 100644 index 000000000..f95153971 --- /dev/null +++ b/ports/boost-random/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/random + REF boost-1.66.0 + SHA512 ca62697080e059fa8b01e364b07fdb99bb7db078c2a5683e0f67d89705530276331a5f8706307b14b49f2621d1c158e0d1b9188aee54ab8852bab7800ca18b3e + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-range/CONTROL b/ports/boost-range/CONTROL new file mode 100644 index 000000000..2cf963bef --- /dev/null +++ b/ports/boost-range/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-range +Version: 1.66.0 +Build-Depends: boost-array, boost-assert, boost-concept-check, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-iterator, boost-mpl, boost-optional, boost-preprocessor, boost-regex, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost range module diff --git a/ports/boost-range/portfile.cmake b/ports/boost-range/portfile.cmake new file mode 100644 index 000000000..8769e1cdd --- /dev/null +++ b/ports/boost-range/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/range + REF boost-1.66.0 + SHA512 98b050cb3e4249c72222d0efac4edbf4cb62ff303dd1634e7e76fea7dff19c62eceb837e8cffbd088fb28b16b98e923f62c7220d5ff424f3c82383a78df97785 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-ratio/CONTROL b/ports/boost-ratio/CONTROL new file mode 100644 index 000000000..801212d8c --- /dev/null +++ b/ports/boost-ratio/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-ratio +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-integer, boost-mpl, boost-rational, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Description: Boost ratio module diff --git a/ports/boost-ratio/portfile.cmake b/ports/boost-ratio/portfile.cmake new file mode 100644 index 000000000..cb781cc5e --- /dev/null +++ b/ports/boost-ratio/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/ratio + REF boost-1.66.0 + SHA512 caa2ed8f01d6f99aaa8ab8bc52c0f9a8cf2551585760abf6e1d0f129c77c58f3b68569a0db6917c0a40a38faf63935ae23e482b96a2417bd7cb3d5f61e59d887 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-rational/CONTROL b/ports/boost-rational/CONTROL new file mode 100644 index 000000000..f78bf6029 --- /dev/null +++ b/ports/boost-rational/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-rational +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-integer, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost rational module diff --git a/ports/boost-rational/portfile.cmake b/ports/boost-rational/portfile.cmake new file mode 100644 index 000000000..c0ad27744 --- /dev/null +++ b/ports/boost-rational/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/rational + REF boost-1.66.0 + SHA512 e61b85344d3418484c044ac0d3946059a3a341cab490d1a54dbee241946c7cb5882e30fcd5e8c9a919622cee69828108d2f7dc578eae51f31c5fb1217deff152 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-regex/CONTROL b/ports/boost-regex/CONTROL new file mode 100644 index 000000000..24e5014d4 --- /dev/null +++ b/ports/boost-regex/CONTROL @@ -0,0 +1,9 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-regex +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-iterator, boost-mpl, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Description: Boost regex module + +Feature: icu +Description: ICU backend for Boost.Regex +Build-Depends: icu diff --git a/ports/boost-regex/portfile.cmake b/ports/boost-regex/portfile.cmake new file mode 100644 index 000000000..2246e3df4 --- /dev/null +++ b/ports/boost-regex/portfile.cmake @@ -0,0 +1,21 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/regex + REF boost-1.66.0 + SHA512 def00fc4876fd83a2581eea15228940a665cb79eff26e979079b5df568952f144b74da2f41ddffe6792784fe3fceca94d7b0f49d1a7f01a4df78948244fe86b1 + HEAD_REF master +) + +if("icu" IN_LIST FEATURES) + set(REQUIREMENTS "/user-config//icuuc /user-config//icudt /user-config//icuin BOOST_HAS_ICU=1") +else() + set(REQUIREMENTS) +endif() + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH} REQUIREMENTS "${REQUIREMENTS}") +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-scope-exit/CONTROL b/ports/boost-scope-exit/CONTROL new file mode 100644 index 000000000..a94cb9fd6 --- /dev/null +++ b/ports/boost-scope-exit/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-scope-exit +Version: 1.66.0 +Build-Depends: boost-config, boost-detail, boost-function, boost-mpl, boost-preprocessor, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost scope_exit module diff --git a/ports/boost-scope-exit/portfile.cmake b/ports/boost-scope-exit/portfile.cmake new file mode 100644 index 000000000..60358a992 --- /dev/null +++ b/ports/boost-scope-exit/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/scope_exit + REF boost-1.66.0 + SHA512 cb46dee821cf9f873eac9d8e937773a44c9e77b7c9972d064e1cc7b9f95e8b06509da29e2357c479f70993aae25756de1dad5d6639690f4390d466deef75b8da + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-serialization/CONTROL b/ports/boost-serialization/CONTROL new file mode 100644 index 000000000..146c618bd --- /dev/null +++ b/ports/boost-serialization/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-serialization +Version: 1.66.0 +Build-Depends: boost-array, boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-io, boost-iterator, boost-move, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-spirit, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers +Description: Boost serialization module diff --git a/ports/boost-serialization/portfile.cmake b/ports/boost-serialization/portfile.cmake new file mode 100644 index 000000000..59276cfd3 --- /dev/null +++ b/ports/boost-serialization/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/serialization + REF boost-1.66.0 + SHA512 8d4908a1eba309c8e752f07e123d0c6d461e3ce87db3b3afbf4ae56340c1ead6ac874be392d8270b167be28d7dc515f98abece091b081fd4794cb375f9779880 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-signals/CONTROL b/ports/boost-signals/CONTROL new file mode 100644 index 000000000..e612f3415 --- /dev/null +++ b/ports/boost-signals/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-signals +Version: 1.66.0 +Build-Depends: boost-any, boost-build, boost-config, boost-core, boost-function, boost-iterator, boost-optional, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost signals module diff --git a/ports/boost-signals/portfile.cmake b/ports/boost-signals/portfile.cmake new file mode 100644 index 000000000..03895d120 --- /dev/null +++ b/ports/boost-signals/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/signals + REF boost-1.66.0 + SHA512 4a857c2f272ccd5feef7549a9344444e30de71ca49f33d42415aad3af0659534cc46490082a3ab9d52f3bced7635cbb17b6db16216a13a4df79349f01a0fe636 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-signals2/CONTROL b/ports/boost-signals2/CONTROL new file mode 100644 index 000000000..749be6f6b --- /dev/null +++ b/ports/boost-signals2/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-signals2 +Version: 1.66.0 +Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-predef, boost-preprocessor, boost-smart-ptr, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers +Description: Boost signals2 module diff --git a/ports/boost-signals2/portfile.cmake b/ports/boost-signals2/portfile.cmake new file mode 100644 index 000000000..9e83e65c4 --- /dev/null +++ b/ports/boost-signals2/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/signals2 + REF boost-1.66.0 + SHA512 e49e263836db77603b256b45c8d764b91d2ff9b1bcfa36e6b446fbaf0be2e7135b715cf00795d0a98ade48f3ff574c54fadfa58faae330261c58642c0dfaf39a + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-smart-ptr/CONTROL b/ports/boost-smart-ptr/CONTROL new file mode 100644 index 000000000..a4451ef05 --- /dev/null +++ b/ports/boost-smart-ptr/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-smart-ptr +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-integer, boost-move, boost-predef, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Description: Boost smart_ptr module diff --git a/ports/boost-smart-ptr/portfile.cmake b/ports/boost-smart-ptr/portfile.cmake new file mode 100644 index 000000000..5dbfc1473 --- /dev/null +++ b/ports/boost-smart-ptr/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/smart_ptr + REF boost-1.66.0 + SHA512 d45d925531c5060cabd5a949612c3d1358ca92120253c04a755390fc5be80fae2f756cb358b636cf0a86d3091e5c27574a4e4f340ece94a8291acab4a0b4c8a0 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-sort/CONTROL b/ports/boost-sort/CONTROL new file mode 100644 index 000000000..6f13d05a2 --- /dev/null +++ b/ports/boost-sort/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-sort +Version: 1.66.0 +Build-Depends: boost-integer, boost-serialization, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost sort module diff --git a/ports/boost-sort/portfile.cmake b/ports/boost-sort/portfile.cmake new file mode 100644 index 000000000..9a13503f8 --- /dev/null +++ b/ports/boost-sort/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/sort + REF boost-1.66.0 + SHA512 0c4d252cf92f46b402be2d9f46f4c4b052dbbb85c83cb7e78a9f75a2e2d14225614f97f3b4e91205d55f224faef2baf939c28fb935d9dbfa140aa7a9c51836df + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-spirit/CONTROL b/ports/boost-spirit/CONTROL new file mode 100644 index 000000000..ed71760c0 --- /dev/null +++ b/ports/boost-spirit/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-spirit +Version: 1.66.0 +Build-Depends: boost-algorithm, boost-array, boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-endian, boost-filesystem (windows), boost-foreach, boost-function, boost-function-types, boost-fusion, boost-integer, boost-io, boost-iostreams (windows), boost-iterator, boost-lexical-cast, boost-locale (windows), boost-math, boost-move, boost-mpl, boost-optional, boost-phoenix, boost-pool, boost-preprocessor, boost-proto, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-thread (windows), boost-throw-exception, boost-tti, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers +Description: Boost spirit module diff --git a/ports/boost-spirit/portfile.cmake b/ports/boost-spirit/portfile.cmake new file mode 100644 index 000000000..e9b239d69 --- /dev/null +++ b/ports/boost-spirit/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/spirit + REF boost-1.66.0 + SHA512 c02594dc732d8ad8d23b1ed94f7aea05e3a339d0189a224340ea882b0de68f10820ad40886e040269ce4e08a558806c48662acba0bf00d95b8cafb5a7ce0057b + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-stacktrace/CONTROL b/ports/boost-stacktrace/CONTROL new file mode 100644 index 000000000..b6c11e8f3 --- /dev/null +++ b/ports/boost-stacktrace/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-stacktrace +Version: 1.66.0 +Build-Depends: boost-array, boost-build, boost-config, boost-core, boost-lexical-cast, boost-math, boost-static-assert, boost-type-traits, boost-vcpkg-helpers, boost-winapi +Description: Boost stacktrace module diff --git a/ports/boost-stacktrace/portfile.cmake b/ports/boost-stacktrace/portfile.cmake new file mode 100644 index 000000000..8f8c3afa1 --- /dev/null +++ b/ports/boost-stacktrace/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/stacktrace + REF boost-1.66.0 + SHA512 40b96f7c1fdaf5a5909148d7edd4f77b4991ead70d5350bc7c8451781c80020496b14688c0dff365b75941a1ba16244246a52b6a708f4b1f79c99f4d8a0556f0 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-statechart/CONTROL b/ports/boost-statechart/CONTROL new file mode 100644 index 000000000..eafbc2db4 --- /dev/null +++ b/ports/boost-statechart/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-statechart +Version: 1.66.0 +Build-Depends: boost-assert, boost-bind, boost-config, boost-conversion, boost-core, boost-detail, boost-function, boost-mpl, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Description: Boost statechart module diff --git a/ports/boost-statechart/portfile.cmake b/ports/boost-statechart/portfile.cmake new file mode 100644 index 000000000..8b8e2da99 --- /dev/null +++ b/ports/boost-statechart/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/statechart + REF boost-1.66.0 + SHA512 c9e20deca66f896eee004d19be388857817b2d4bdf49a9a146625de091420399a7098a6ecb2020ce07a96b11092922f4623159434b04983072dad8b91d2d7187 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-static-assert/CONTROL b/ports/boost-static-assert/CONTROL new file mode 100644 index 000000000..e4719ff49 --- /dev/null +++ b/ports/boost-static-assert/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-static-assert +Version: 1.66.0 +Build-Depends: boost-config, boost-detail, boost-vcpkg-helpers +Description: Boost static_assert module diff --git a/ports/boost-static-assert/portfile.cmake b/ports/boost-static-assert/portfile.cmake new file mode 100644 index 000000000..7768973dd --- /dev/null +++ b/ports/boost-static-assert/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/static_assert + REF boost-1.66.0 + SHA512 97e0007ffef86578f4877744947e4c7d90de932719df25a38a72c018112b9b6d6d2fbdbef9307c02d1d85e5d8733a0f20a903c0fc623ef969afc788cfdf8722b + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-system/CONTROL b/ports/boost-system/CONTROL new file mode 100644 index 000000000..92d43608f --- /dev/null +++ b/ports/boost-system/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-system +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-integer, boost-predef, boost-utility, boost-vcpkg-helpers, boost-winapi +Description: Boost system module diff --git a/ports/boost-system/portfile.cmake b/ports/boost-system/portfile.cmake new file mode 100644 index 000000000..c5ca8d0cc --- /dev/null +++ b/ports/boost-system/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/system + REF boost-1.66.0 + SHA512 97181610bc577182cb83c55b7c5d73aec6794543c0a7b43b4d08c7a1ed9936500f383038dbda1c0876f58d52c000f8b2e4a6bc1f68d14c7d9f015918f1c46851 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-test/CONTROL b/ports/boost-test/CONTROL new file mode 100644 index 000000000..e19d889b1 --- /dev/null +++ b/ports/boost-test/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-test +Version: 1.66.0 +Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-io, boost-iterator, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-range, boost-smart-ptr, boost-static-assert, boost-timer, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost test module diff --git a/ports/boost-test/portfile.cmake b/ports/boost-test/portfile.cmake new file mode 100644 index 000000000..fd6606f0e --- /dev/null +++ b/ports/boost-test/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/test + REF boost-1.66.0 + SHA512 f5f0557fc7afb1c085765edda5ec37ce2a0f31aa39c861a7979dfd5344751978139cc3eef44d773140e4b023c0123065169fc11ae889ca1ea51f58bdf5018a5d + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-thread/CONTROL b/ports/boost-thread/CONTROL new file mode 100644 index 000000000..772f1a450 --- /dev/null +++ b/ports/boost-thread/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-thread +Version: 1.66.0 +Build-Depends: boost-algorithm, boost-assert, boost-atomic, boost-bind, boost-build, boost-chrono, boost-concept-check, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-function, boost-functional, boost-integer, boost-intrusive, boost-io, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Description: Boost thread module diff --git a/ports/boost-thread/portfile.cmake b/ports/boost-thread/portfile.cmake new file mode 100644 index 000000000..307ae58b4 --- /dev/null +++ b/ports/boost-thread/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/thread + REF boost-1.66.0 + SHA512 35875d3feb64617b74ef1303939a9e0f8d72b9b2d7361e9a25c54431c60c17b481023006f2329e4cd8dd37206553991e40a12a20bb479ec497c475240e19776b + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH} REQUIREMENTS "/boost/date_time//boost_date_time") +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-throw-exception/CONTROL b/ports/boost-throw-exception/CONTROL new file mode 100644 index 000000000..61809bb7b --- /dev/null +++ b/ports/boost-throw-exception/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-throw-exception +Version: 1.66.0 +Build-Depends: boost-config, boost-detail, boost-vcpkg-helpers +Description: Boost throw_exception module diff --git a/ports/boost-throw-exception/portfile.cmake b/ports/boost-throw-exception/portfile.cmake new file mode 100644 index 000000000..bdf47bac7 --- /dev/null +++ b/ports/boost-throw-exception/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/throw_exception + REF boost-1.66.0 + SHA512 46c1683ded42fe9b0cd44711071bee1122dbd0529648f69439cc5391d05e7e22968235bc852878441ad051b6c021b10e319b6337aff28f6acaafca7e70480ef8 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-timer/CONTROL b/ports/boost-timer/CONTROL new file mode 100644 index 000000000..be8b0c18a --- /dev/null +++ b/ports/boost-timer/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-timer +Version: 1.66.0 +Build-Depends: boost-build, boost-chrono, boost-compatibility, boost-config, boost-core, boost-integer, boost-io, boost-system, boost-throw-exception, boost-vcpkg-helpers +Description: Boost timer module diff --git a/ports/boost-timer/portfile.cmake b/ports/boost-timer/portfile.cmake new file mode 100644 index 000000000..28210aabe --- /dev/null +++ b/ports/boost-timer/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/timer + REF boost-1.66.0 + SHA512 2b50d38e3b5ca79014f96eb8fb55d1320c0de97ba2bb632dec946690437f8a1533c3e78e25798a0f49c08a5644f7f55afcd0f85f94bea4e041cddbcd8867450d + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-tokenizer/CONTROL b/ports/boost-tokenizer/CONTROL new file mode 100644 index 000000000..27fb3021b --- /dev/null +++ b/ports/boost-tokenizer/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-tokenizer +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-detail, boost-iterator, boost-mpl, boost-throw-exception, boost-vcpkg-helpers +Description: Boost tokenizer module diff --git a/ports/boost-tokenizer/portfile.cmake b/ports/boost-tokenizer/portfile.cmake new file mode 100644 index 000000000..74834110b --- /dev/null +++ b/ports/boost-tokenizer/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/tokenizer + REF boost-1.66.0 + SHA512 ce5f6d89fd8b61a5d8074d8cb6bbc3b9a0e3ebf96081c9dda8e67a64b7052f38ebc50581284fa182f83f6f3eb54eee5292f6e79832ffd293ef9a35af2b595a51 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-tti/CONTROL b/ports/boost-tti/CONTROL new file mode 100644 index 000000000..bcab1a023 --- /dev/null +++ b/ports/boost-tti/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-tti +Version: 1.66.0 +Build-Depends: boost-config, boost-detail, boost-function-types, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers +Description: Boost tti module diff --git a/ports/boost-tti/portfile.cmake b/ports/boost-tti/portfile.cmake new file mode 100644 index 000000000..2151427be --- /dev/null +++ b/ports/boost-tti/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/tti + REF boost-1.66.0 + SHA512 8c399d475819b68324e1a56b9ba13a3e26faf175d3180b0317e82212ce4c587d8074c597832165e81a3ed6af09026b7c5433a8cd58b6ad861dad7d9fe1d57eee + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-tuple/CONTROL b/ports/boost-tuple/CONTROL new file mode 100644 index 000000000..a96059c05 --- /dev/null +++ b/ports/boost-tuple/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-tuple +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost tuple module diff --git a/ports/boost-tuple/portfile.cmake b/ports/boost-tuple/portfile.cmake new file mode 100644 index 000000000..a020d5d1b --- /dev/null +++ b/ports/boost-tuple/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/tuple + REF boost-1.66.0 + SHA512 c65bd37871256f1edb1db4d9ac158788c3a76248d7f7ff72eece874ea521d9846d55373e223d783a4c6fe3a524088fe2e4e58e533d1144671e4a1d22443f0414 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-type-erasure/CONTROL b/ports/boost-type-erasure/CONTROL new file mode 100644 index 000000000..79a8697a3 --- /dev/null +++ b/ports/boost-type-erasure/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-type-erasure +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-fusion, boost-iterator, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread (windows), boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost type_erasure module diff --git a/ports/boost-type-erasure/portfile.cmake b/ports/boost-type-erasure/portfile.cmake new file mode 100644 index 000000000..7363cfd8e --- /dev/null +++ b/ports/boost-type-erasure/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/type_erasure + REF boost-1.66.0 + SHA512 a64b3477478a656c0e04e897f4b9e19941b884c17cfa07ec05f96cebab0f4a377d728ddee354923c1c00bd85f2bf180a46747ccfe5eceb3fe143c2154e0be0e8 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-type-index/CONTROL b/ports/boost-type-index/CONTROL new file mode 100644 index 000000000..e291a6222 --- /dev/null +++ b/ports/boost-type-index/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-type-index +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-functional, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Description: Boost type_index module diff --git a/ports/boost-type-index/portfile.cmake b/ports/boost-type-index/portfile.cmake new file mode 100644 index 000000000..5f5f7dc7d --- /dev/null +++ b/ports/boost-type-index/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/type_index + REF boost-1.66.0 + SHA512 c731d336b0b29a0dbbb12c027fe052f9cea0f06703d05e3f24c24d9feb5abcf04cfb6e867da752cdbc75056db9482b5318ee1489db54244c3fdc6e1f32899aa8 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-type-traits/CONTROL b/ports/boost-type-traits/CONTROL new file mode 100644 index 000000000..3b88d7122 --- /dev/null +++ b/ports/boost-type-traits/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-type-traits +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-static-assert, boost-vcpkg-helpers +Description: Boost type_traits module diff --git a/ports/boost-type-traits/portfile.cmake b/ports/boost-type-traits/portfile.cmake new file mode 100644 index 000000000..3dbd82382 --- /dev/null +++ b/ports/boost-type-traits/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/type_traits + REF boost-1.66.0 + SHA512 ad05d6e50914e0d9c0e8267dd3b01f090f7dd3c6370b4b59ae1bbcc50b2cb2a5f1b2647eacc15ff4f2e071da0732a6fc47508284d6d20ca0a545fd6f8d90648c + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-typeof/CONTROL b/ports/boost-typeof/CONTROL new file mode 100644 index 000000000..93d92c65a --- /dev/null +++ b/ports/boost-typeof/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-typeof +Version: 1.66.0 +Build-Depends: boost-config, boost-mpl, boost-preprocessor, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost typeof module diff --git a/ports/boost-typeof/portfile.cmake b/ports/boost-typeof/portfile.cmake new file mode 100644 index 000000000..177e6d860 --- /dev/null +++ b/ports/boost-typeof/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/typeof + REF boost-1.66.0 + SHA512 4436dc1b346dfaf9bd77ab386e213fb4a5fb9f3ea5f4de3e2eaaf4e7c2c6712729071e8e25c4014c36a0977f62b646900e2db7c9f65121ef32475074940e4937 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-ublas/CONTROL b/ports/boost-ublas/CONTROL new file mode 100644 index 000000000..acbd90541 --- /dev/null +++ b/ports/boost-ublas/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-ublas +Version: 1.66.0 +Build-Depends: boost-concept-check, boost-config, boost-core, boost-iterator, boost-mpl, boost-range, boost-serialization, boost-smart-ptr, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost ublas module diff --git a/ports/boost-ublas/portfile.cmake b/ports/boost-ublas/portfile.cmake new file mode 100644 index 000000000..173236e87 --- /dev/null +++ b/ports/boost-ublas/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/ublas + REF boost-1.66.0 + SHA512 77d2dac6f7df56d8640e000ffce7042c828765da9a1ccb1f487559ac7ad2577246334e32e058a41ef028719c7465990d12e4fc0294ecf1747ac90bda53cf7d00 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-units/CONTROL b/ports/boost-units/CONTROL new file mode 100644 index 000000000..4728dcb90 --- /dev/null +++ b/ports/boost-units/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-units +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-io, boost-lambda, boost-math, boost-mpl, boost-preprocessor, boost-serialization, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost units module diff --git a/ports/boost-units/portfile.cmake b/ports/boost-units/portfile.cmake new file mode 100644 index 000000000..87dd4906d --- /dev/null +++ b/ports/boost-units/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/units + REF boost-1.66.0 + SHA512 493c91b8741788c18147b0689df82e8391992797420f09fa3d90f8405c1ac7cab6a17c39231836d4410525eae3ae53899157cd48e28e3136ffc16970fc5209f6 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-unordered/CONTROL b/ports/boost-unordered/CONTROL new file mode 100644 index 000000000..f051d4f33 --- /dev/null +++ b/ports/boost-unordered/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-unordered +Version: 1.66.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-detail, boost-functional, boost-iterator, boost-move, boost-predef, boost-preprocessor, boost-smart-ptr, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost unordered module diff --git a/ports/boost-unordered/portfile.cmake b/ports/boost-unordered/portfile.cmake new file mode 100644 index 000000000..abd0a3c3e --- /dev/null +++ b/ports/boost-unordered/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/unordered + REF boost-1.66.0 + SHA512 4abb2d6a2847c28ecd2324afd4caf46a9fe2597e3bceaf2fe430cb82688ce6584137356fd3dff5fe1ab60ab8a51460821d9dd78c14d4e0fb6e11c4dee7cc0adb + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-utility/CONTROL b/ports/boost-utility/CONTROL new file mode 100644 index 000000000..1793f88f3 --- /dev/null +++ b/ports/boost-utility/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-utility +Version: 1.66.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-mpl, boost-preprocessor, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Description: Boost utility module diff --git a/ports/boost-utility/portfile.cmake b/ports/boost-utility/portfile.cmake new file mode 100644 index 000000000..5cf3ceeed --- /dev/null +++ b/ports/boost-utility/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/utility + REF boost-1.66.0 + SHA512 aa72e1d32bb1575e23ec8e1dc12421e56d114532a9e7b3ebf2edf6926c79d2e2eb3c5483f241bc014b65008a9d03fbeadc85a6f0cea9013ecea2b1c1e942ea59 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-uuid/CONTROL b/ports/boost-uuid/CONTROL new file mode 100644 index 000000000..9c81b7c12 --- /dev/null +++ b/ports/boost-uuid/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-uuid +Version: 1.66.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-io, boost-iterator, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Description: Boost uuid module diff --git a/ports/boost-uuid/portfile.cmake b/ports/boost-uuid/portfile.cmake new file mode 100644 index 000000000..c6f2950a6 --- /dev/null +++ b/ports/boost-uuid/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/uuid + REF boost-1.66.0 + SHA512 5fc333c76f4d44fcbca4a7be02117015e361b85c615d3f728d9805d32f55431fca33f90bb0151a789b341606d8ce7538163a162a4c7ba29823cf7a01326685d7 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-variant/CONTROL b/ports/boost-variant/CONTROL new file mode 100644 index 000000000..9edcfa99e --- /dev/null +++ b/ports/boost-variant/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-variant +Version: 1.66.0 +Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-functional, boost-math, boost-move, boost-mpl, boost-preprocessor, boost-static-assert, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost variant module diff --git a/ports/boost-variant/portfile.cmake b/ports/boost-variant/portfile.cmake new file mode 100644 index 000000000..9ec22e174 --- /dev/null +++ b/ports/boost-variant/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/variant + REF boost-1.66.0 + SHA512 3eb3d4070bf81033c0a342956393e2e902618dc482fd3ba7c0b4f97ac3259fff31943a9b059bc25dd6d399af6d8b56a8297b462776b14b5012c6436b00c7d491 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-vcpkg-helpers/.gitignore b/ports/boost-vcpkg-helpers/.gitignore new file mode 100644 index 000000000..6217c8eab --- /dev/null +++ b/ports/boost-vcpkg-helpers/.gitignore @@ -0,0 +1,3 @@ +downloads/ +libs/ +boost/ \ No newline at end of file diff --git a/ports/boost-vcpkg-helpers/CONTROL b/ports/boost-vcpkg-helpers/CONTROL new file mode 100644 index 000000000..e9a60e401 --- /dev/null +++ b/ports/boost-vcpkg-helpers/CONTROL @@ -0,0 +1,3 @@ +Source: boost-vcpkg-helpers +Version: 1 +Description: a set of vcpkg-internal scripts used to modularize boost diff --git a/ports/boost-vcpkg-helpers/Jamroot.jam b/ports/boost-vcpkg-helpers/Jamroot.jam new file mode 100644 index 000000000..2762c99ea --- /dev/null +++ b/ports/boost-vcpkg-helpers/Jamroot.jam @@ -0,0 +1,141 @@ +constant BOOST_VERSION : 1.66.0 ; +constant BOOST_VERSION_ABI_TAG : 1_66 ; +constant BOOST_JAMROOT_MODULE : $(__name__) ; + +import boostcpp ; +import feature ; + +boostcpp.set-version $(BOOST_VERSION) ; + +project boost : requirements + include&&@CURRENT_INSTALLED_DIR@/include + BOOST_ALL_NO_LIB=1 + @$(__name__).tag + @REQUIREMENTS@ + ; + +rule boost-install ( libraries * ) +{ + stagedir = [ option.get stagedir ] ; + install stage + : $(libraries) + : $(stagedir)/lib ; +} + +rule tag ( name : type ? : property-set ) +{ + return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ; +} + +rule python-tag ( name : type ? : property-set ) +{ + return [ tag $(name) : $(type) : $(property-set) ] ; +} + +if "@PORT@" != "boost-system" +{ + use-project /boost/system : . ; + + lib boost_system : : @CURRENT_INSTALLED_DIR@/lib/boost_system-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_system : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_system-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_system ; +} + +if "@PORT@" != "boost-chrono" +{ + use-project /boost/chrono : . ; + + lib boost_chrono : : @CURRENT_INSTALLED_DIR@/lib/boost_chrono-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_chrono : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_chrono-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_chrono ; +} + +if "@PORT@" != "boost-regex" +{ + use-project /boost/regex : . ; + + lib boost_regex : : @CURRENT_INSTALLED_DIR@/lib/boost_regex-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_regex : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_regex-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_regex ; +} + +if "@PORT@" != "boost-date-time" +{ + use-project /boost/date_time : . ; + + lib boost_date_time : : @CURRENT_INSTALLED_DIR@/lib/boost_date_time-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release -/boost/date_time//boost_date_time ; + lib boost_date_time : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_date_time-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug -/boost/date_time//boost_date_time ; + explicit boost_date_time ; +} + +if "@PORT@" != "boost-thread" +{ + use-project /boost/thread : . ; + + lib boost_thread : : @CURRENT_INSTALLED_DIR@/lib/boost_thread-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release : : /boost/date_time//boost_date_time ; + lib boost_thread : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_thread-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug : : /boost/date_time//boost_date_time ; + explicit boost_thread ; +} + +if "@PORT@" != "boost-timer" +{ + use-project /boost/timer : . ; + + lib boost_timer : : @CURRENT_INSTALLED_DIR@/lib/boost_timer-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_timer : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_timer-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_timer ; +} + +if "@PORT@" != "boost-filesystem" +{ + use-project /boost/filesystem : . ; + + lib boost_filesystem : : @CURRENT_INSTALLED_DIR@/lib/boost_filesystem-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release : : /boost/system//boost_system ; + lib boost_filesystem : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_filesystem-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug : : /boost/system//boost_system ; + explicit boost_filesystem ; +} + +if "@PORT@" != "boost-atomic" +{ + use-project /boost/atomic : . ; + + lib boost_atomic : : @CURRENT_INSTALLED_DIR@/lib/boost_atomic-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_atomic : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_atomic-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_atomic ; +} + +if "@PORT@" != "boost-context" +{ + feature.feature segmented-stacks : on : optional propagated composite ; + feature.compose on : BOOST_USE_SEGMENTED_STACKS ; + + use-project /boost/context : . ; + + lib boost_context : : @CURRENT_INSTALLED_DIR@/lib/boost_context-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_context : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_context-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_context ; +} + +if "@PORT@" != "boost-test" +{ + use-project /boost/test : . ; + + lib boost_unit_test_framework : : @CURRENT_INSTALLED_DIR@/lib/boost_unit_test_framework-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_unit_test_framework : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_unit_test_framework-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_unit_test_framework ; +} + +rule requires ( foo * ) +{ +} + +rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * ) +{ + name = boost_$(name) ; + lib $(name) : $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ; + boost-install $(name) ; +} + +use-project /boost/@PORT@ : build ; + +build-project build ; diff --git a/ports/boost-vcpkg-helpers/boost-modular.cmake b/ports/boost-vcpkg-helpers/boost-modular.cmake new file mode 100644 index 000000000..e98cae65f --- /dev/null +++ b/ports/boost-vcpkg-helpers/boost-modular.cmake @@ -0,0 +1,273 @@ + +function(boost_modular_build) + cmake_parse_arguments(_bm "" "SOURCE_PATH;REQUIREMENTS" "OPTIONS" ${ARGN}) + + if(NOT DEFINED _bm_SOURCE_PATH) + message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_build.") + endif() + + # Todo: this serves too similar a purpose as vcpkg_find_acquire_program() + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/tools/boost-build") + else() + get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE) + endif() + + if(NOT EXISTS "${BOOST_BUILD_PATH}") + message(FATAL_ERROR "The x86 boost-build tools must be installed to build for non-x86/x64 platforms. Please run `vcpkg install boost-build:x86-windows`.") + endif() + + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + list(APPEND _bm_OPTIONS windows-api=store) + endif() + + set(_bm_DIR ${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers) + + if(EXISTS "${_bm_SOURCE_PATH}/Jamfile.v2") + file(REMOVE_RECURSE "${_bm_SOURCE_PATH}/Jamfile.v2") + endif() + + set(REQUIREMENTS ${_bm_REQUIREMENTS}) + + configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) + + # boost thread superfluously builds has_atomic_flag_lockfree on windows. + if(EXISTS "${_bm_SOURCE_PATH}/build/Jamfile.v2") + file(READ ${_bm_SOURCE_PATH}/build/Jamfile.v2 _contents) + string(REPLACE + "\n\nexe has_atomic_flag_lockfree" + "\n\nexplicit has_atomic_flag_lockfree ;\nexe has_atomic_flag_lockfree" + _contents + "${_contents}" + ) + string(REPLACE "\nimport ../../config/checks/config : requires ;" "\n# import ../../config/checks/config : requires ;" _contents "${_contents}") + string(REGEX REPLACE + "\.\./\.\./([^/ ]+)/build//(boost_[^/ ]+)" + "/boost/\\1//\\2" + _contents + "${_contents}" + ) + string(REGEX REPLACE " /boost//([^/ ]+)" " /boost/\\1//boost_\\1" _contents "${_contents}") + file(WRITE ${_bm_SOURCE_PATH}/build/Jamfile.v2 "${_contents}") + endif() + + if(EXISTS "${_bm_SOURCE_PATH}/build/log-architecture.jam") + file(READ ${_bm_SOURCE_PATH}/build/log-architecture.jam _contents) + string(REPLACE + "\nproject.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" + "\n# project.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" + _contents "${_contents}") + file(WRITE ${_bm_SOURCE_PATH}/build/log-architecture.jam "${_contents}") + endif() + + ##################### + # Cleanup previous builds + ###################### + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + # It is possible for a file in this folder to be locked due to antivirus or vctip + execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\n Files are likely in use.") + endif() + endif() + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + # It is possible for a file in this folder to be locked due to antivirus or vctip + execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg\n Files are likely in use.") + endif() + endif() + + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug) + message(FATAL_ERROR "Error: directory exists: ${CURRENT_PACKAGES_DIR}/debug\n The previous package was not fully cleared. This is an internal error.") + endif() + file(MAKE_DIRECTORY + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + ) + + ###################### + # Generate configuration + ###################### + list(APPEND _bm_OPTIONS + -j$ENV{NUMBER_OF_PROCESSORS} + --debug-configuration + --debug-building + --debug-generators + --disable-icu + --ignore-site-config + --hash + -q + + threadapi=win32 + threading=multi + ) + + # Add build type specific options + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + list(APPEND _bm_OPTIONS runtime-link=shared) + else() + list(APPEND _bm_OPTIONS runtime-link=static) + endif() + + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND _bm_OPTIONS link=shared) + else() + list(APPEND _bm_OPTIONS link=static) + endif() + + if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + list(APPEND _bm_OPTIONS address-model=64 architecture=x86) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + list(APPEND _bm_OPTIONS address-model=32 architecture=arm) + else() + list(APPEND _bm_OPTIONS address-model=32 architecture=x86) + endif() + + file(TO_CMAKE_PATH "${_bm_DIR}/nothing.bat" NOTHING_BAT) + set(TOOLSET_OPTIONS " /EHsc -Zm800 -nologo") + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + find_path(PATH_TO_CL cl.exe) + find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "${PATH_TO_CL}/../../../lib/x86/store/references" NO_DEFAULT_PATH) + if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") + message(FATAL_ERROR "Could not find `platform.winmd` in VS2017. Do you have the Universal Windows Platform development workload installed?") + endif() + else() + find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "$ENV{VS140COMNTOOLS}/../../VC/LIB/store/references") + if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") + message(FATAL_ERROR "Could not find `platform.winmd` in VS2015.") + endif() + endif() + file(TO_NATIVE_PATH "${PLATFORM_WINMD_DIR}" PLATFORM_WINMD_DIR) + string(REPLACE "\\" "\\\\" PLATFORM_WINMD_DIR ${PLATFORM_WINMD_DIR}) # escape backslashes + + set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -Zl \"/AI${PLATFORM_WINMD_DIR}\" WindowsApp.lib /ZW -DVirtualAlloc=VirtualAllocFromApp -D_WIN32_WINNT=0x0A00") + else() + set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -D_WIN32_WINNT=0x0602") + endif() + + configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) + configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) + + if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + list(APPEND _bm_OPTIONS toolset=msvc-14.1) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") + list(APPEND _bm_OPTIONS toolset=msvc-14.0) + else() + message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'") + endif() + + ###################### + # Perform build + Package + ###################### + set(B2_EXE "${BOOST_BUILD_PATH}/b2.exe") + + message(STATUS "Building ${TARGET_TRIPLET}-rel") + set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") + vcpkg_execute_required_process( + COMMAND "${B2_EXE}" + --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage + --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam + ${_bm_OPTIONS} + variant=release + debug-symbols=on + WORKING_DIRECTORY ${_bm_SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") + + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") + vcpkg_execute_required_process( + COMMAND "${B2_EXE}" + --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage + --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam + ${_bm_OPTIONS} + variant=debug + WORKING_DIRECTORY ${_bm_SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + + message(STATUS "Packaging ${TARGET_TRIPLET}-rel") + file(GLOB REL_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.lib) + file(COPY ${REL_LIBS} + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + FILES_MATCHING PATTERN "*.lib") + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.dll) + file(COPY ${REL_DLLS} + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + FILES_MATCHING PATTERN "*.dll") + endif() + message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") + + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") + file(GLOB DBG_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.lib) + file(COPY ${DBG_LIBS} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + FILES_MATCHING PATTERN "*.lib") + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.dll) + file(COPY ${DBG_DLLS} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + FILES_MATCHING PATTERN "*.dll") + endif() + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") + + file(GLOB INSTALLED_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*.lib ${CURRENT_PACKAGES_DIR}/lib/*.lib) + foreach(LIB ${INSTALLED_LIBS}) + get_filename_component(OLD_FILENAME ${LIB} NAME) + get_filename_component(DIRECTORY_OF_LIB_FILE ${LIB} DIRECTORY) + string(REPLACE "libboost_" "boost_" NEW_FILENAME ${OLD_FILENAME}) + string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs + string(REPLACE "-vc141-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2017 and VS2015 binaries + string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs + string(REPLACE "-sgyd-" "-gyd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs + string(REPLACE "-x32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-x64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-a32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-a64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "_python3-" "_python-" NEW_FILENAME ${NEW_FILENAME}) + if ("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}") + # nothing to do + elseif (EXISTS ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) + file(REMOVE ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}) + else() + file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) + endif() + endforeach() +endfunction() + +function(boost_modular_headers) + cmake_parse_arguments(_bm "" "SOURCE_PATH" "" ${ARGN}) + + if(NOT DEFINED _bm_SOURCE_PATH) + message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_headers.") + endif() + + message(STATUS "Packaging headers") + + file( + COPY ${_bm_SOURCE_PATH}/include/boost + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) + + message(STATUS "Packaging headers done") + + vcpkg_download_distfile(ARCHIVE + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.65.1/LICENSE_1_0.txt" + FILENAME "boost_LICENSE_1_0.txt" + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 + ) + + file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endfunction() diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 new file mode 100644 index 000000000..cc2929ef4 --- /dev/null +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -0,0 +1,335 @@ +[CmdletBinding()] +param ( + $libraries = @(), + $version = "1.66.0" +) + +$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition + +$libsDisabledInUWP = "iostreams|filesystem|thread|context|python|stacktrace|program-options|program_options|coroutine`$|fiber|locale|test|type-erasure|type_erasure|wave|log" + +function Generate() +{ + param ( + [string]$Name, + [string]$Hash, + [bool]$NeedsBuild, + $Depends = @() + ) + + $controlDeps = ($Depends | sort) -join ", " + + $sanitizedName = $name -replace "_","-" + + mkdir "$scriptsDir/../boost-$sanitizedName" -erroraction SilentlyContinue | out-null + $controlLines = @( + "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" + "Source: boost-$sanitizedName" + "Version: $version" + "Build-Depends: $controlDeps" + "Description: Boost $Name module" + ) + if ($Name -eq "locale") + { + $controlLines += @( + "" + "Feature: icu" + "Description: ICU backend for Boost.Locale" + "Build-Depends: icu" + ) + } + if ($Name -eq "regex") + { + $controlLines += @( + "" + "Feature: icu" + "Description: ICU backend for Boost.Regex" + "Build-Depends: icu" + ) + } + $controlLines | out-file -enc ascii "$scriptsDir/../boost-$sanitizedName/CONTROL" + + $portfileLines = @( + "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" + "" + "include(vcpkg_common_functions)" + "include(`${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake)" + "" + "vcpkg_from_github(" + " OUT_SOURCE_PATH SOURCE_PATH" + " REPO boostorg/$Name" + " REF boost-$version" + " SHA512 $Hash" + " HEAD_REF master" + ")" + "" + ) + + if ($Name -eq "python") + { + $portfileLines += @( + "# Find Python. Can't use find_package here, but we already know where everything is" + "file(GLOB PYTHON_INCLUDE_PATH `"`${CURRENT_INSTALLED_DIR}/include/python[0-9.]*`")" + "set(PYTHONLIBS_RELEASE `"`${CURRENT_INSTALLED_DIR}/lib`")" + "set(PYTHONLIBS_DEBUG `"`${CURRENT_INSTALLED_DIR}/debug/lib`")" + "string(REGEX REPLACE `".*python([0-9\.]+)`$`" `"\\1`" PYTHON_VERSION `"`${PYTHON_INCLUDE_PATH}`")" + ) + } + + if ($NeedsBuild) + { + if ($Name -eq "locale") + { + $portfileLines += @( + "if(`"icu`" IN_LIST FEATURES)" + " set(BOOST_LOCALE_ICU on)" + "else()" + " set(BOOST_LOCALE_ICU off)" + "endif()" + "" + "boost_modular_build(" + " SOURCE_PATH `${SOURCE_PATH}" + " OPTIONS" + " boost.locale.iconv=off" + " boost.locale.posix=off" + " /boost/locale//boost_locale" + " boost.locale.icu=`${BOOST_LOCALE_ICU}" + ")" + ) + } + elseif ($Name -eq "regex") + { + $portfileLines += @( + "if(`"icu`" IN_LIST FEATURES)" + " set(REQUIREMENTS `"/user-config//icuuc /user-config//icudt /user-config//icuin BOOST_HAS_ICU=1`")" + "else()" + " set(REQUIREMENTS)" + "endif()" + "" + "boost_modular_build(SOURCE_PATH `${SOURCE_PATH} REQUIREMENTS `"`${REQUIREMENTS}`")" + ) + } + elseif ($Name -eq "thread") + { + $portfileLines += @( + "boost_modular_build(SOURCE_PATH `${SOURCE_PATH} REQUIREMENTS `"/boost/date_time//boost_date_time`")" + ) + } + else + { + $portfileLines += @( + "boost_modular_build(SOURCE_PATH `${SOURCE_PATH})" + ) + } + } + $portfileLines += @("boost_modular_headers(SOURCE_PATH `${SOURCE_PATH})") + + if ($Name -eq "exception") + { + $portfileLines += @( + "" + "set(VCPKG_LIBRARY_LINKAGE static)" + "file(REMOVE_RECURSE `${CURRENT_PACKAGES_DIR}/bin `${CURRENT_PACKAGES_DIR}/debug/bin)" + ) + } + if ($Name -eq "config") + { + $portfileLines += @( + "file(APPEND `${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp `"\n#ifndef BOOST_ALL_NO_LIB\n#define BOOST_ALL_NO_LIB\n#endif\n`")" + "file(APPEND `${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp `"\n#undef BOOST_ALL_DYN_LINK\n`")" + "" + "if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)" + " file(APPEND `${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp `"\n#define BOOST_ALL_DYN_LINK\n`")" + "endif()" + ) + } + + $portfileLines | out-file -enc ascii "$scriptsDir/../boost-$sanitizedName/portfile.cmake" +} + +if (!(Test-Path "$scriptsDir/boost")) +{ + "Cloning boost..." + pushd $scriptsDir + try + { + git clone https://github.com/boostorg/boost --branch boost-$version + } + finally + { + popd + } +} + +$libraries_found = ls $scriptsDir/boost/libs -directory | % name | % { + if ($_ -match "numeric") + { + "numeric_conversion" + "interval" + "odeint" + "ublas" + } + else + { + $_ + } +} + +mkdir $scriptsDir/downloads -erroraction SilentlyContinue | out-null + +if ($libraries.Length -eq 0) +{ + $libraries = $libraries_found +} + +$libraries_in_boost_port = @() + +foreach ($library in $libraries) +{ + "Handling boost/$library..." + $archive = "$scriptsDir/downloads/$library-boost-$version.tar.gz" + if (!(Test-Path $archive)) + { + "Downloading boost/$library..." + Invoke-WebRequest "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" -OutFile $archive + } + $hash = vcpkg hash $archive + $unpacked = "$scriptsDir/libs/$library-boost-$version" + if (!(Test-Path $unpacked)) + { + "Unpacking boost/$library..." + mkdir $scriptsDir/libs -erroraction SilentlyContinue | out-null + pushd $scriptsDir/libs + try + { + cmake -E tar xf $archive + } + finally + { + popd + } + } + pushd $unpacked + try + { + $groups = $( + findstr /si /C:"#include ).*", "`$1" -replace "/|\.hp?p?| ","" } | group | % name | % { + # mappings + Write-Verbose "${library}: $_" + if ($_ -match "aligned_storage") { "type_traits" } + elseif ($_ -match "noncopyable|ref|swap|get_pointer|checked_delete|visit_each") { "core" } + elseif ($_ -eq "type") { "core" } + elseif ($_ -match "unordered_") { "unordered" } + elseif ($_ -match "cstdint") { "integer" } + elseif ($_ -match "call_traits|operators|current_function|cstdlib|next_prior") { "utility" } + elseif ($_ -eq "version") { "config" } + elseif ($_ -match "shared_ptr|make_shared|intrusive_ptr|scoped_ptr|pointer_to_other|weak_ptr|shared_array|scoped_array") { "smart_ptr" } + elseif ($_ -match "iterator_adaptors|generator_iterator|pointee") { "iterator" } + elseif ($_ -eq "regex_fwd") { "regex" } + elseif ($_ -eq "make_default") { "convert" } + elseif ($_ -eq "foreach_fwd") { "foreach" } + elseif ($_ -eq "cerrno") { "system" } + elseif ($_ -eq "archive") { "serialization" } + elseif ($_ -eq "none") { "optional" } + elseif ($_ -eq "integer_traits") { "integer" } + elseif ($_ -eq "limits") { "compatibility" } + elseif ($_ -eq "math_fwd") { "math" } + elseif ($_ -match "polymorphic_cast|implicit_cast") { "conversion" } + elseif ($_ -eq "nondet_random") { "random" } + elseif ($_ -eq "memory_order") { "atomic" } + elseif ($_ -eq "blank") { "detail" } + elseif ($_ -match "is_placeholder|mem_fn") { "bind" } + elseif ($_ -eq "exception_ptr") { "exception" } + elseif ($_ -eq "multi_index_container") { "multi_index" } + elseif ($_ -eq "lexical_cast") { "lexical_cast"; "math" } + elseif ($_ -eq "numeric" -and $library -notmatch "numeric_conversion|interval|odeint|ublas") { "numeric_conversion"; "interval"; "odeint"; "ublas" } + else { $_ } + } | group | % name | ? { $_ -ne $library } + + #"`nFor ${library}:" + " [known] " + $($groups | ? { $libraries_found -contains $_ }) + " [unknown] " + $($groups | ? { $libraries_found -notcontains $_ }) + + $deps = @($groups | ? { $libraries_found -contains $_ }) + + $deps = @($deps | ? { + # Boost contains cycles, so remove a few dependencies to break the loop. + (($library -notmatch "core|assert|mpl|detail|type_traits") -or ($_ -notmatch "utility")) ` + -and ` + (($library -notmatch "lexical_cast") -or ($_ -notmatch "math"))` + -and ` + (($library -notmatch "functional") -or ($_ -notmatch "function"))` + -and ` + (($library -notmatch "detail") -or ($_ -notmatch "static_assert|integer|mpl|type_traits"))` + -and ` + (($library -notmatch "property_map") -or ($_ -notmatch "mpi"))` + -and ` + (($library -notmatch "spirit") -or ($_ -notmatch "serialization"))` + -and ` + (($library -notmatch "utility|concept_check") -or ($_ -notmatch "iterator")) + } | % { "boost-$_" -replace "_","-" } | % { + if ($_ -match $libsDisabledInUWP) + { + "$_ (windows)" + } + else + { + $_ + } + }) + + $deps += @("boost-vcpkg-helpers") + + $needsBuild = $false + if ((Test-Path $unpacked/build/Jamfile.v2) -and $library -ne "metaparse") + { + $deps += @("boost-build") + $needsBuild = $true + } + + if ($library -eq "python") + { + $deps += @("python3") + } + elseif ($library -eq "iostreams") + { + $deps += @("zlib", "bzip2") + } + + Generate ` + -Name $library ` + -Hash $hash ` + -Depends $deps ` + -NeedsBuild $needsBuild + + if ($library -match $libsDisabledInUWP) + { + $libraries_in_boost_port += @("$library (windows)") + } + else + { + $libraries_in_boost_port += @($library) + } + + } + finally + { + popd + } +} + +# Generate master boost control file which depends on each individual library +$boostDependsList = @($libraries_in_boost_port | % { "boost-$_" -replace "_","-" }) -join ", " + +@( + "Source: boost" + "Version: $version" + "Build-Depends: $boostDependsList" +) | out-file -enc ascii $scriptsDir/../boost/CONTROL + +"set(VCPKG_POLICY_EMPTY_PACKAGE enabled)`n" | out-file -enc ascii $scriptsDir/../boost/portfile.cmake + +return diff --git a/ports/boost-vcpkg-helpers/nothing.bat b/ports/boost-vcpkg-helpers/nothing.bat new file mode 100644 index 000000000..e69de29bb diff --git a/ports/boost-vcpkg-helpers/portfile.cmake b/ports/boost-vcpkg-helpers/portfile.cmake new file mode 100644 index 000000000..3d31bd327 --- /dev/null +++ b/ports/boost-vcpkg-helpers/portfile.cmake @@ -0,0 +1,11 @@ + +file( + COPY + ${CMAKE_CURRENT_LIST_DIR}/boost-modular.cmake + ${CMAKE_CURRENT_LIST_DIR}/Jamroot.jam + ${CMAKE_CURRENT_LIST_DIR}/nothing.bat + ${CMAKE_CURRENT_LIST_DIR}/user-config.jam + DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-vcpkg-helpers +) + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/boost-vcpkg-helpers/user-config.jam b/ports/boost-vcpkg-helpers/user-config.jam new file mode 100644 index 000000000..c970f07a5 --- /dev/null +++ b/ports/boost-vcpkg-helpers/user-config.jam @@ -0,0 +1,25 @@ +import toolset ; + +using msvc : : cl.exe : +@NOTHING_BAT@ +@TOOLSET_OPTIONS@ +; + +if "@PORT@" = "boost-python" +{ + using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_RELEASE@ ; + using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_DEBUG@ : on ; +} + +project user-config : ; + +lib advapi32 ; + +lib icuuc : : @CURRENT_INSTALLED_DIR@/lib/icuuc.lib release : : advapi32 ; +lib icuuc : : @CURRENT_INSTALLED_DIR@/debug/lib/icuucd.lib debug : : advapi32 ; + +lib icuin : : @CURRENT_INSTALLED_DIR@/lib/icuin.lib release : : ; +lib icuin : : @CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib debug : : ; + +lib icudt : : @CURRENT_INSTALLED_DIR@/lib/icudt.lib release : : ; +lib icudt : : @CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib debug : : ; diff --git a/ports/boost-vmd/CONTROL b/ports/boost-vmd/CONTROL new file mode 100644 index 000000000..cbd36905a --- /dev/null +++ b/ports/boost-vmd/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-vmd +Version: 1.66.0 +Build-Depends: boost-preprocessor, boost-vcpkg-helpers +Description: Boost vmd module diff --git a/ports/boost-vmd/portfile.cmake b/ports/boost-vmd/portfile.cmake new file mode 100644 index 000000000..389ba79fd --- /dev/null +++ b/ports/boost-vmd/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/vmd + REF boost-1.66.0 + SHA512 a0112a6751d1dc9c015d8ba8a2dce5ebe13c2189cec1039a5bc57e71efad7244c39eabdb5e24c8d8111edfc1a9856154b9c3f658f36bfd935274e02229e86821 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-wave/CONTROL b/ports/boost-wave/CONTROL new file mode 100644 index 000000000..99aa3d8be --- /dev/null +++ b/ports/boost-wave/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-wave +Version: 1.66.0 +Build-Depends: boost-assert, boost-build, boost-concept-check, boost-config, boost-core, boost-detail, boost-filesystem (windows), boost-integer, boost-iterator, boost-mpl, boost-multi-index, boost-pool, boost-preprocessor, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Description: Boost wave module diff --git a/ports/boost-wave/portfile.cmake b/ports/boost-wave/portfile.cmake new file mode 100644 index 000000000..a9c3ea232 --- /dev/null +++ b/ports/boost-wave/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/wave + REF boost-1.66.0 + SHA512 2fd57aab7cbc92e7d46bc35512f2019d71f0e5af93dfcbfeada595d899bbf9ae1f1c88f915d555f2fce16419a9320164203303d00f09493cfa5f87afde002d42 + HEAD_REF master +) + +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-winapi/CONTROL b/ports/boost-winapi/CONTROL new file mode 100644 index 000000000..f06f0c530 --- /dev/null +++ b/ports/boost-winapi/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-winapi +Version: 1.66.0 +Build-Depends: boost-config, boost-integer, boost-predef, boost-vcpkg-helpers +Description: Boost winapi module diff --git a/ports/boost-winapi/portfile.cmake b/ports/boost-winapi/portfile.cmake new file mode 100644 index 000000000..eb0b91b8f --- /dev/null +++ b/ports/boost-winapi/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/winapi + REF boost-1.66.0 + SHA512 ec60e5d73d6553ca981b4a65b0edcd85dc54336e6369124204495a35c6c1c7adf79345e47425a93f1d9ed6694bfae76828162eb102bc660901fb276a3e9eb989 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-xpressive/CONTROL b/ports/boost-xpressive/CONTROL new file mode 100644 index 000000000..e126d3c19 --- /dev/null +++ b/ports/boost-xpressive/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-xpressive +Version: 1.66.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-conversion, boost-core, boost-detail, boost-exception, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-proto, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost xpressive module diff --git a/ports/boost-xpressive/portfile.cmake b/ports/boost-xpressive/portfile.cmake new file mode 100644 index 000000000..3848d814c --- /dev/null +++ b/ports/boost-xpressive/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/xpressive + REF boost-1.66.0 + SHA512 99b4cab1ec6e85421dfbd8085cbdad2533e48aaff352ba920d589da328ee78a009d27b53042f08bb64d4b3b02499152928cadb5c97537c9b8ab5ce97daaf34f9 + HEAD_REF master +) + +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index c07369e2e..660f4898e 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,16 +1,3 @@ -Source: boost -Version: 1.65.1-3 -Description: Peer-reviewed portable C++ source libraries -Build-Depends: zlib, bzip2 - -Feature: locale-icu -Description: ICU backend for Boost.Locale -Build-Depends: icu - -Feature: regex-icu -Description: ICU support for Boost.Regex -Build-Depends: icu - -Feature: python -Description: a C++ library which enables seamless interoperability between C++ and the Python programming language. -Build-Depends: python3 +Source: boost +Version: 1.66.0 +Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-context (windows), boost-conversion, boost-convert, boost-core, boost-coroutine (windows), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-disjoint-sets, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (windows), boost-filesystem (windows), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (windows), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (windows), boost-local-function, boost-lockfree, boost-log (windows), boost-logic (windows), boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpi, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-optional, boost-parameter, boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options (windows), boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (windows), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-scope-exit, boost-serialization, boost-signals, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (windows), boost-statechart, boost-static-assert, boost-system, boost-test (windows), boost-thread (windows), boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure (windows), boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-vmd, boost-wave (windows), boost-winapi, boost-xpressive diff --git a/ports/boost/portfile.cmake b/ports/boost/portfile.cmake index 5d7eee0b3..0283a2085 100644 --- a/ports/boost/portfile.cmake +++ b/ports/boost/portfile.cmake @@ -1,354 +1,2 @@ -include(vcpkg_common_functions) -set(VERSION 1_65) -set(VERSION_FULL 1_65_1) -set(VERSION2 1.65.1) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/boost_${VERSION_FULL}) - -###################### -# Acquire and arrange sources -###################### -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://sourceforge.net/projects/boost/files/boost/${VERSION2}/boost_${VERSION_FULL}.7z" "http://dl.bintray.com/boostorg/release/${VERSION2}/source/boost_${VERSION_FULL}.7z" - FILENAME "boost_${VERSION_FULL}.7z" - SHA512 b1d9264ec74dd75c68176f5a2d2da33a2c1e3162842cc61a07ac8ed1ebb953855cece4faf72ce99b490b665e813b839e35c7fc8026f2f9cb31b106fb8bab2a9c -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) - -# apply boost range hotfix -vcpkg_download_distfile(DIFF - URLS "https://github.com/boostorg/range/commit/e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff" - FILENAME "boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2-2.diff" - SHA512 88392fcf092d07ee2de66d937634688eef1d7491a4e2fb0fce064b4e631813a0814455a329f9eed8b968ff205883751d51a86edecc8e355790fc8a35d6742483 -) - -FILE(READ "${DIFF}" content) -STRING(REGEX REPLACE "include/" "" content "${content}") -set(DIFF2 ${CURRENT_BUILDTREES_DIR}/src/boost-range-has_range_iterator-hotfix_e7ebe14707130cda7b72e0ae5e93b17157fdb6a2.diff.fixed) -FILE(WRITE ${DIFF2} "${content}") -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF2} - ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-boost-ICU-support.patch) - -###################### -# Cleanup previous builds -###################### -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - # It is possible for a file in this folder to be locked due to antivirus or vctip - execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\n Files are likely in use.") - endif() -endif() - -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) -if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - # It is possible for a file in this folder to be locked due to antivirus or vctip - execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg\n Files are likely in use.") - endif() -endif() - -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug) - message(FATAL_ERROR "Error: directory exists: ${CURRENT_PACKAGES_DIR}/debug\n The previous package was not fully cleared. This is an internal error.") -endif() -file(MAKE_DIRECTORY - ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - -###################### -# Bootstrap b2 -###################### -if(NOT EXISTS ${SOURCE_PATH}/b2.exe) - message(STATUS "Bootstrapping") - vcpkg_execute_required_process( - COMMAND "${SOURCE_PATH}/bootstrap.bat" msvc - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME bootstrap - ) -endif() -message(STATUS "Bootstrapping done") - -###################### -# Generate configuration -###################### -set(B2_OPTIONS - -sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}\\include" - -sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}\\include" - -sICU_PATH="${CURRENT_INSTALLED_DIR}" - -j$ENV{NUMBER_OF_PROCESSORS} - --debug-configuration - --ignore-site-config - --hash - -q - - threading=multi -) - -# Add build type specific options -set(B2_OPTIONS_DBG - -sZLIB_BINARY=zlibd - -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" - -sBZIP2_BINARY=bz2d - -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" -) - -set(B2_OPTIONS_REL - -sZLIB_BINARY=zlib - -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" - -sBZIP2_BINARY=bz2 - -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" -) - -set(LIB_RUNTIME_LINK "shared") -if (VCPKG_CRT_LINKAGE STREQUAL dynamic) - list(APPEND B2_OPTIONS runtime-link=shared) -else() - list(APPEND B2_OPTIONS runtime-link=static) - set(LIB_RUNTIME_LINK "static") -endif() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - list(APPEND B2_OPTIONS link=shared) -else() - list(APPEND B2_OPTIONS link=static) -endif() - -if(TRIPLET_SYSTEM_ARCH MATCHES "x64") - list(APPEND B2_OPTIONS address-model=64) -endif() - -if("python" IN_LIST FEATURES) - # Find Python. Can't use find_package here, but we already know where everything is - file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") - set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") - set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") - string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION ${PYTHON_INCLUDE_PATH}) - list(APPEND B2_OPTIONS_DBG python-debugging=on) -else() - list(APPEND B2_OPTIONS --without-python) -endif() - -if("locale-icu" IN_LIST FEATURES) - list(APPEND B2_OPTIONS boost.locale.icu=on) -else() - list(APPEND B2_OPTIONS boost.locale.icu=off) -endif() - -if("regex-icu" IN_LIST FEATURES) - list(APPEND B2_OPTIONS --enable-icu) -else() - list(APPEND B2_OPTIONS --disable-icu) -endif() - - -if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") - list(APPEND B2_OPTIONS - windows-api=store - # --without-atomic - # --without-chrono - # --without-system - # --without-date_time - # --without-exception - # --without-serialization - # --without-context - # --without-graph_parallel - # --without-signals - # --without-coroutine2 - # --without-graph - # --without-math - # --without-random - # --without-regex - ################################ - --without-type_erasure # depends on thread - --without-log # depends on filesystem - --without-mpi # Needs "using mpi ;" - --without-wave # depends on filesystem - --without-coroutine # depends on thread - --without-metaparse # depends on test - --without-locale # libs\locale\src\encoding\wconv_codepage.ipp(114): error C3861: 'IsDBCSLeadByteEx': identifier not found - --without-timer # libs\timer\src\cpu_timer.cpp(126): error C2039: 'GetProcessTimes': is not a member of '`global namespace'' - --without-program_options # libs\program_options\src\parsers.cpp(194): error C2065: 'environ': undeclared identifier - - --without-test - --without-fiber - --without-stacktrace - --without-filesystem # libs\filesystem\src\operations.cpp(178): error C2039: 'GetEnvironmentVariableW': is not a member of '`global namespace'' - --without-thread - --without-iostreams - --without-container - --without-python - ) - if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - find_path(PATH_TO_CL cl.exe) - find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "${PATH_TO_CL}/../../../lib/x86/store/references" NO_DEFAULT_PATH) - if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") - message(FATAL_ERROR "Could not find `platform.winmd` in VS2017. Do you have the Universal Windows Platform development workload installed?") - endif() - else() - find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "$ENV{VS140COMNTOOLS}/../../VC/LIB/store/references") - if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") - message(FATAL_ERROR "Could not find `platform.winmd` in VS2015.") - endif() - endif() - file(TO_NATIVE_PATH "${PLATFORM_WINMD_DIR}" PLATFORM_WINMD_DIR) - string(REPLACE "\\" "\\\\" PLATFORM_WINMD_DIR ${PLATFORM_WINMD_DIR}) # escape backslashes - configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam ESCAPE_QUOTES @ONLY) - configure_file(${CMAKE_CURRENT_LIST_DIR}/uwp/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam ESCAPE_QUOTES @ONLY) -else() - configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) - configure_file(${CMAKE_CURRENT_LIST_DIR}/desktop/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) -endif() - -if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - list(APPEND B2_OPTIONS toolset=msvc-14.1) -elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") - list(APPEND B2_OPTIONS toolset=msvc-14.0) -else() - message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'") -endif() - -set(B2_OPTIONS_DBG - ${B2_OPTIONS} - ${B2_OPTIONS_DBG} -) - -set(B2_OPTIONS_REL - ${B2_OPTIONS} - ${B2_OPTIONS_REL} -) - -###################### -# Perform build + Package -###################### -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Building ${TARGET_TRIPLET}-rel") - set(ENV{BOOST_BUILD_PATH} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - vcpkg_execute_required_process_repeat( - COUNT 2 - COMMAND "${SOURCE_PATH}/b2.exe" - --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage - --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - ${B2_OPTIONS_REL} - variant=release - debug-symbols=on - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME build-${TARGET_TRIPLET}-rel - ) - message(STATUS "Building ${TARGET_TRIPLET}-rel done") -endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - set(ENV{BOOST_BUILD_PATH} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - vcpkg_execute_required_process_repeat( - COUNT 2 - COMMAND "${SOURCE_PATH}/b2.exe" - --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage - --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - ${B2_OPTIONS_DBG} - variant=debug - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME build-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Building ${TARGET_TRIPLET}-dbg done") -endif() - -message(STATUS "Packaging headers") -file( - COPY ${SOURCE_PATH}/boost - DESTINATION ${CURRENT_PACKAGES_DIR}/include -) - -# Disable Boost auto-link. -file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp - "\n#ifndef BOOST_ALL_NO_LIB\n#define BOOST_ALL_NO_LIB\n#endif\n" -) -file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp - "\n#undef BOOST_ALL_DYN_LINK\n" -) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp - "\n#define BOOST_ALL_DYN_LINK\n" - ) -endif() - -file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost RENAME copyright) -message(STATUS "Packaging headers done") - -# This function makes the static build lib names match the dynamic build lib names which FindBoost.cmake is looking for by default. -# It also renames a couple of "libboost" lib files in the dynamic build (for example libboost_exception-vc140-mt-1_63.lib). -function(boost_rename_libs LIBS) - foreach(LIB ${${LIBS}}) - get_filename_component(OLD_FILENAME ${LIB} NAME) - get_filename_component(DIRECTORY_OF_LIB_FILE ${LIB} DIRECTORY) - string(REPLACE "libboost_" "boost_" NEW_FILENAME ${OLD_FILENAME}) - string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs - string(REPLACE "-vc141-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2017 and VS2015 binaries - string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs - if ("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}") - # nothing to do - elseif (EXISTS ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) - file(REMOVE ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}) - else() - file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) - endif() - endforeach() -endfunction() - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Packaging ${TARGET_TRIPLET}-rel") - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage/lib/ - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - FILES_MATCHING PATTERN "*.lib") - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage/lib/ - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - FILES_MATCHING PATTERN "*.dll") - endif() - file(GLOB RELEASE_LIBS ${CURRENT_PACKAGES_DIR}/lib/*.lib) - - boost_rename_libs(RELEASE_LIBS) - message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") -endif() - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage/lib/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - FILES_MATCHING PATTERN "*.lib") - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage/lib/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - FILES_MATCHING PATTERN "*.dll") - endif() - file(GLOB DEBUG_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*.lib) - boost_rename_libs(DEBUG_LIBS) - message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") -endif() - -macro(move_to_manual_link LIBNAME) - if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/${LIBNAME}-vc140-mt-${VERSION_FULL}.lib) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/${LIBNAME}-vc140-mt-${VERSION_FULL}.lib - ${CURRENT_PACKAGES_DIR}/lib/manual-link/${LIBNAME}-vc140-mt-${VERSION_FULL}.lib - ) - endif() - if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/${LIBNAME}-vc140-mt-gd-${VERSION_FULL}.lib) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/${LIBNAME}-vc140-mt-gd-${VERSION_FULL}.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/${LIBNAME}-vc140-mt-gd-${VERSION_FULL}.lib - ) - endif() -endmacro() - -move_to_manual_link(boost_test_exec_monitor) -move_to_manual_link(boost_prg_exec_monitor) - -vcpkg_copy_pdbs() - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + -- cgit v1.2.3 From a6ee2c145fca2006848ef9afbf580ea88bee7dd1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 19 Dec 2017 10:22:43 -0800 Subject: [vcpkg-list] Improve list output for long triplets --- toolsrc/src/vcpkg/binaryparagraph.cpp | 5 +++-- toolsrc/src/vcpkg/commands.list.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index c7136b713..7c9e905e8 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -92,8 +92,9 @@ namespace vcpkg std::string BinaryParagraph::displayname() const { - const auto f = this->feature.empty() ? "core" : this->feature; - return Strings::format("%s[%s]:%s", this->spec.name(), f, this->spec.triplet()); + if (this->feature.empty() || this->feature == "core") + return Strings::format("%s:%s", this->spec.name(), this->spec.triplet()); + return Strings::format("%s[%s]:%s", this->spec.name(), this->feature, this->spec.triplet()); } std::string BinaryParagraph::dir() const { return this->spec.dir(); } diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index 1f2387843..960c57225 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -13,14 +13,14 @@ namespace vcpkg::Commands::List { if (full_desc) { - System::println("%-30s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description); + System::println("%-50s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description); } else { - System::println("%-30s %-16s %s", - vcpkg::shorten_text(pgh.package.displayname(), 30), + System::println("%-50s %-16s %s", + vcpkg::shorten_text(pgh.package.displayname(), 50), vcpkg::shorten_text(pgh.package.version, 16), - vcpkg::shorten_text(pgh.package.description, 71)); + vcpkg::shorten_text(pgh.package.description, 51)); } } -- cgit v1.2.3 From b79395c4adf076dc57db2f7c1b0c38db4cc94f72 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 5 Dec 2017 13:01:50 -0800 Subject: Update downstream libraries to use modularized boost --- ports/arrow/CONTROL | 4 +- ports/arrow/portfile.cmake | 5 +- ports/beast/CONTROL | 4 +- ports/beast/portfile.cmake | 14 +--- ports/blaze/CONTROL | 4 +- ports/bond/CONTROL | 4 +- ports/bond/portfile.cmake | 1 + ports/cgal/CONTROL | 4 +- ports/cgal/portfile.cmake | 1 + ports/cpprestsdk/CONTROL | 4 +- ports/cpprestsdk/portfile.cmake | 6 ++ ports/cpprestsdk/undef-minmax.patch | 14 ++++ ports/fcl/CONTROL | 2 +- ports/folly/CONTROL | 4 +- ports/hpx/CONTROL | 4 +- ports/hpx/portfile.cmake | 1 + ports/libkml/CONTROL | 4 +- ports/libkml/portfile.cmake | 1 + ports/libtorrent/CONTROL | 4 +- ports/libtorrent/portfile.cmake | 42 ++++------ ports/libtorrent/vcpkg-boost-madness.patch | 13 --- ports/mongo-cxx-driver/CONTROL | 4 +- ports/openimageio/CONTROL | 4 +- ports/openvdb/CONTROL | 6 +- ports/pcl/CONTROL | 4 +- ports/thrift/CONTROL | 4 +- ports/thrift/portfile.cmake | 2 + ports/websocketpp/CONTROL | 2 +- ports/wt/CONTROL | 4 +- ports/wt/boost-1.66.patch | 123 +++++++++++++++++++++++++++++ ports/wt/guard-NO_ERROR.patch | 19 +++++ ports/wt/portfile.cmake | 11 ++- 32 files changed, 227 insertions(+), 96 deletions(-) create mode 100644 ports/cpprestsdk/undef-minmax.patch delete mode 100644 ports/libtorrent/vcpkg-boost-madness.patch create mode 100644 ports/wt/boost-1.66.patch create mode 100644 ports/wt/guard-NO_ERROR.patch diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL index 78cbf2a18..000b8a6d6 100644 --- a/ports/arrow/CONTROL +++ b/ports/arrow/CONTROL @@ -1,4 +1,4 @@ Source: arrow -Version: 0.6.0 -Build-Depends: boost, flatbuffers, rapidjson, zlib, lz4, brotli, zstd, snappy, gflags +Version: 0.6.0-1 +Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, flatbuffers, rapidjson, zlib, lz4, brotli, zstd, snappy, gflags Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake index c70a3cdc3..a462d3e9b 100644 --- a/ports/arrow/portfile.cmake +++ b/ports/arrow/portfile.cmake @@ -12,7 +12,6 @@ vcpkg_from_github( HEAD_REF master ) - set(CPP_SOURCE_PATH "${SOURCE_PATH}/cpp") vcpkg_apply_patches( @@ -27,7 +26,9 @@ string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" ARROW_BUILD_STATIC) vcpkg_configure_cmake( SOURCE_PATH ${CPP_SOURCE_PATH} - OPTIONS -DARROW_BUILD_TESTS=off + PREFER_NINJA + OPTIONS + -DARROW_BUILD_TESTS=off -DRAPIDJSON_HOME=${CURRENT_INSTALLED_DIR} -DFLATBUFFERS_HOME=${CURRENT_INSTALLED_DIR} -DARROW_ZLIB_VENDORED=ON diff --git a/ports/beast/CONTROL b/ports/beast/CONTROL index 2e44e7909..0c889b941 100644 --- a/ports/beast/CONTROL +++ b/ports/beast/CONTROL @@ -1,4 +1,4 @@ Source: beast -Version: v84-1 -Build-Depends: boost +Version: 0 +Build-Depends: boost-beast Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/ports/beast/portfile.cmake b/ports/beast/portfile.cmake index 31d049ea1..065116c27 100644 --- a/ports/beast/portfile.cmake +++ b/ports/beast/portfile.cmake @@ -1,13 +1 @@ -# header only -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO vinniefalco/Beast - REF 32902fad8b7c57be27b96e00ed6ec82748732133 - SHA512 409bd23e19c4bb157619405713f73b90c5f680bec487ad7b6fc8bcd30db54444a78950ce631c8e267e4397b9128679528fd237d3c53f7e1e55634473a169af5f - HEAD_REF master -) - -file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/beast RENAME copyright) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/blaze/CONTROL b/ports/blaze/CONTROL index 3355159f4..c64405980 100644 --- a/ports/blaze/CONTROL +++ b/ports/blaze/CONTROL @@ -1,4 +1,4 @@ Source: blaze -Version: 3.2-2 -Build-Depends: boost, clapack +Version: 3.2-3 +Build-Depends: clapack, boost-exception Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic. diff --git a/ports/bond/CONTROL b/ports/bond/CONTROL index 6680b6dd3..eea3a85cb 100644 --- a/ports/bond/CONTROL +++ b/ports/bond/CONTROL @@ -1,5 +1,5 @@ Source: bond Maintainer: bond@microsoft.com -Version: 7.0.2 +Version: 7.0.2-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. -Build-Depends: boost, rapidjson +Build-Depends: rapidjson, boost-config, boost-utility, boost-assign diff --git a/ports/bond/portfile.cmake b/ports/bond/portfile.cmake index 2ad48a94d..b64be214c 100644 --- a/ports/bond/portfile.cmake +++ b/ports/bond/portfile.cmake @@ -37,6 +37,7 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DBOND_LIBRARIES_ONLY=TRUE -DBOND_GBC_PATH=${FETCHED_GBC_PATH} diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL index d6d01956d..c2331f294 100644 --- a/ports/cgal/CONTROL +++ b/ports/cgal/CONTROL @@ -1,4 +1,4 @@ Source: cgal -Version: 4.11 -Build-Depends:mpfr, mpir, zlib, boost, qt5 +Version: 4.11-1 +Build-Depends: mpfr, mpir, zlib, qt5, boost-format, boost-container, boost-iterator, boost-variant, boost-any, boost-unordered, boost-random Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry. diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake index c55d0ba3e..9ef8c189d 100644 --- a/ports/cgal/portfile.cmake +++ b/ports/cgal/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index bfc2c7fe4..5dcd880f0 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,5 @@ Source: cpprestsdk -Version: 2.10.1 -Build-Depends: zlib, openssl (windows), boost (windows), websocketpp (windows) +Version: 2.10.1-1 +Build-Depends: zlib, openssl (windows), boost-system (windows), boost-date-time (windows), boost-regex (windows), websocketpp (windows) Description: C++11 JSON, REST, and OAuth library The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index be7423997..ca22f2a5c 100644 --- a/ports/cpprestsdk/portfile.cmake +++ b/ports/cpprestsdk/portfile.cmake @@ -16,6 +16,11 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -DWEBSOCKETPP_CONFIG_VERSION=${WEBSOCKETPP_PATH}) endif() +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/undef-minmax.patch" +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/Release PREFER_NINJA @@ -25,6 +30,7 @@ vcpkg_configure_cmake( -DBUILD_SAMPLES=OFF -DCPPREST_EXCLUDE_WEBSOCKETS=OFF -DCPPREST_EXPORT_DIR=share/cpprestsdk + -DWERROR=OFF OPTIONS_DEBUG -DCPPREST_INSTALL_HEADERS=OFF ) diff --git a/ports/cpprestsdk/undef-minmax.patch b/ports/cpprestsdk/undef-minmax.patch new file mode 100644 index 000000000..4dc3bc019 --- /dev/null +++ b/ports/cpprestsdk/undef-minmax.patch @@ -0,0 +1,14 @@ +diff --git a/Release/src/http/client/http_client_winrt.cpp b/Release/src/http/client/http_client_winrt.cpp +index 697f48a..4ada65a 100644 +--- a/Release/src/http/client/http_client_winrt.cpp ++++ b/Release/src/http/client/http_client_winrt.cpp +@@ -28,6 +28,9 @@ using namespace std; + using namespace Platform; + using namespace Microsoft::WRL; + ++#undef min ++#undef max ++ + namespace web + { + namespace http diff --git a/ports/fcl/CONTROL b/ports/fcl/CONTROL index 84a9c1f5b..0e425f59b 100644 --- a/ports/fcl/CONTROL +++ b/ports/fcl/CONTROL @@ -1,4 +1,4 @@ Source: fcl Version: 0.5.0-3 Description: a library for performing three types of proximity queries on a pair of geometric models composed of triangles -Build-Depends: boost, ccd, octomap +Build-Depends: ccd, octomap diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 7a239386a..dfd4b833e 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,4 +1,4 @@ Source: folly -Version: 2017.11.27.00 +Version: 2017.11.27.00-1 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows -Build-Depends: zlib, openssl, boost, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy +Build-Depends: zlib, openssl, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy, boost-context, boost-chrono, boost-date-time, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread, boost-conversion, boost-multi-index, boost-crc diff --git a/ports/hpx/CONTROL b/ports/hpx/CONTROL index a7f31fc42..efac88780 100644 --- a/ports/hpx/CONTROL +++ b/ports/hpx/CONTROL @@ -1,5 +1,5 @@ Source: hpx -Version: 1.0.0-5 -Build-Depends: boost, hwloc +Version: 1.0.0-6 +Build-Depends: hwloc, boost-chrono, boost-date-time, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread, boost-context, boost-iostreams, boost-random, boost-atomic, boost-asio, boost-dynamic-bitset, boost-assign, boost-format, boost-signals2, boost-parameter, boost-bimap, boost-accumulators, boost-lockfree, boost-icl Description: The C++ Standards Library for Concurrency and Parallelism HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case. diff --git a/ports/hpx/portfile.cmake b/ports/hpx/portfile.cmake index fce8fce61..0f0299d05 100644 --- a/ports/hpx/portfile.cmake +++ b/ports/hpx/portfile.cmake @@ -44,6 +44,7 @@ SET(HWLOC_PATH "${CURRENT_INSTALLED_DIR}/share/hwloc") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DBOOST_ROOT=${BOOST_PATH} -DHWLOC_ROOT=${HWLOC_ROOT} diff --git a/ports/libkml/CONTROL b/ports/libkml/CONTROL index bc054e036..b5ea568c7 100644 --- a/ports/libkml/CONTROL +++ b/ports/libkml/CONTROL @@ -1,4 +1,4 @@ Source: libkml -Version: 1.3.0-1 +Version: 1.3.0-2 Description: Reference implementation of OGC KML 2.2 -Build-Depends: zlib, boost, expat, minizip, uriparser +Build-Depends: zlib, expat, minizip, uriparser, boost-smart-ptr diff --git a/ports/libkml/portfile.cmake b/ports/libkml/portfile.cmake index cb07e271f..b2e846d3c 100644 --- a/ports/libkml/portfile.cmake +++ b/ports/libkml/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/patch_empty_literal_on_vc.patch" ) +file(REMOVE ${SOURCE_PATH}/cmake/External_boost.cmake) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL index e139965df..46c096a68 100644 --- a/ports/libtorrent/CONTROL +++ b/ports/libtorrent/CONTROL @@ -1,4 +1,4 @@ Source: libtorrent -Version: 1.1.5 +Version: 1.1.5-1 Description: An efficient feature complete C++ BitTorrent implementation -Build-Depends: boost, openssl +Build-Depends: openssl, boost-system, boost-date-time, boost-chrono, boost-random, boost-asio, boost-crc, boost-config diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake index 97658384e..45dd0aab3 100644 --- a/ports/libtorrent/portfile.cmake +++ b/ports/libtorrent/portfile.cmake @@ -1,37 +1,25 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libtorrent-libtorrent-1_1_5) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/arvidn/libtorrent/archive/libtorrent-1_1_5.zip" - FILENAME "libtorrent-1_1_5.zip" - SHA512 ebb7c1b08a4b07b4db54050a099950dc61446e2e7fcceb82c5db8e0629c7718c3c8808ee59d5f361ad85c75f7034a33dfcb5ebd619ef0bb9b5ae0cfdd10d01b5 -) -vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO arvidn/libtorrent + REF libtorrent-1_1_5 + SHA512 edaff6347bf922af8b6d74e332e180fe122f64152a152fb905f4f2c3371dc29d668fc2b0ffcda3f56b50a1a51b25d1a3ae4284ed6e09f6a2eb7b34bcce8dd9c7 + HEAD_REF master +) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-datetime-to-boost-libs.patch - PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-dbghelp-to-win32-libs.patch - PATCHES ${CMAKE_CURRENT_LIST_DIR}/vcpkg-boost-madness.patch + ${CMAKE_CURRENT_LIST_DIR}/add-dbghelp-to-win32-libs.patch ) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(LIBTORRENT_SHARED ON) -else() - set(LIBTORRENT_SHARED OFF) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBTORRENT_SHARED) + +file(READ "${SOURCE_PATH}/include/libtorrent/export.hpp" _contents) +string(REPLACE "" "" _contents "${_contents}") +string(REPLACE "" "" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/include/libtorrent/export.hpp" "${_contents}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -43,7 +31,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") # Put shared libraries into the proper directory file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/ports/libtorrent/vcpkg-boost-madness.patch b/ports/libtorrent/vcpkg-boost-madness.patch deleted file mode 100644 index e9e498ee4..000000000 --- a/ports/libtorrent/vcpkg-boost-madness.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 99698a2..454bae6 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -252,7 +252,7 @@ else() - - set(Boost_USE_STATIC_RUNTIME ON) - endif() -- set(Boost_USE_STATIC_LIBS ON) -+ set(Boost_USE_STATIC_LIBS OFF) - add_library(torrent-rasterbar STATIC ${sources2}) - endif() - diff --git a/ports/mongo-cxx-driver/CONTROL b/ports/mongo-cxx-driver/CONTROL index 306f6a96c..065fbbab0 100644 --- a/ports/mongo-cxx-driver/CONTROL +++ b/ports/mongo-cxx-driver/CONTROL @@ -1,4 +1,4 @@ Source: mongo-cxx-driver -Version: 3.1.1-1 -Build-Depends: boost, libbson, mongo-c-driver +Version: 3.1.1-2 +Build-Depends: libbson, mongo-c-driver, boost-smart-ptr, boost-optional, boost-utility Description: MongoDB C++ Driver. diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index 1421e3acb..3e498bf56 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -1,4 +1,4 @@ Source: openimageio -Version: 1.7.15-1 +Version: 1.7.15-2 Description: An library for reading and writing images, and a bunch of related classes, utilities, and application -Build-Depends: boost, libjpeg-turbo, tiff, libpng, openexr +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 diff --git a/ports/openvdb/CONTROL b/ports/openvdb/CONTROL index cfcbfac6f..7576ff790 100644 --- a/ports/openvdb/CONTROL +++ b/ports/openvdb/CONTROL @@ -1,8 +1,8 @@ Source: openvdb -Version: 5.0.0 -Build-Depends: boost, ilmbase, openexr, tbb, blosc +Version: 5.0.0-1 +Build-Depends: ilmbase, openexr, tbb, blosc, boost-iostreams, boost-system, boost-thread, boost-date-time, boost-any, boost-uuid, boost-interprocess Description: Sparse volume data structure and tools Feature: tools Description: OpenVDB utilities: view, print and render -Build-Depends: glew, glfw3 \ No newline at end of file +Build-Depends: glew, glfw3 diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index fa2d37fca..ba78abbf0 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,7 +1,7 @@ Source: pcl -Version: 1.8.1-8 +Version: 1.8.1-9 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. -Build-Depends: boost, eigen3, flann, qhull, vtk +Build-Depends: eigen3, flann, qhull, vtk, 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 Feature: openni2 Description: OpenNI2 support for PCL diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index d7831632e..ec00292b5 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 20172805-72ca60debae1d9fb35d9f0085118873669006d7f-1 -Build-Depends: boost, zlib, libevent, openssl +Version: 20172805-72ca60debae1d9fb35d9f0085118873669006d7f-2 +Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 3cb280462..cae46e01c 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -22,9 +22,11 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DWITH_SHARED_LIB=OFF -DWITH_STATIC_LIB=ON + -DWITH_STDTHREADS=ON -DBUILD_TESTING=off -DBUILD_JAVA=off -DBUILD_C_GLIB=off diff --git a/ports/websocketpp/CONTROL b/ports/websocketpp/CONTROL index f15164de2..991e6635c 100644 --- a/ports/websocketpp/CONTROL +++ b/ports/websocketpp/CONTROL @@ -1,4 +1,4 @@ Source: websocketpp Version: 0.7.0-1 -Build-Depends: zlib, openssl, boost +Build-Depends: zlib, openssl, boost-asio Description: Library that implements RFC6455 The WebSocket Protocol \ No newline at end of file diff --git a/ports/wt/CONTROL b/ports/wt/CONTROL index 43fa044ef..448d76f60 100644 --- a/ports/wt/CONTROL +++ b/ports/wt/CONTROL @@ -1,4 +1,4 @@ Source: wt -Version: 3.3.7-2 +Version: 3.3.7-4 Description: Wt is a C++ library for developing web applications -Build-Depends: boost, openssl, sqlite3, libpq, pango +Build-Depends: openssl, sqlite3, libpq, pango, boost-date-time, boost-regex, boost-program-options, boost-signals, boost-system, boost-filesystem, boost-thread, boost-random, boost-multi-index, boost-signals2, boost-asio, boost-ublas, boost-conversion, boost-array, boost-smart-ptr, boost-tuple, boost-algorithm, boost-logic diff --git a/ports/wt/boost-1.66.patch b/ports/wt/boost-1.66.patch new file mode 100644 index 000000000..d8268f6ba --- /dev/null +++ b/ports/wt/boost-1.66.patch @@ -0,0 +1,123 @@ +diff --git a/src/http/Connection.C b/src/http/Connection.C +index 70ecfd5..b24c817 100644 +--- a/src/http/Connection.C ++++ b/src/http/Connection.C +@@ -339,7 +339,7 @@ void Connection::handleReadBody(ReplyPtr reply, + const asio_error_code& e, + std::size_t bytes_transferred) + { +- LOG_DEBUG(socket().native() << ": handleReadBody(): " << e.message()); ++ LOG_DEBUG(socket().native_handle() << ": handleReadBody(): " << e.message()); + + if (disconnectCallback_) { + rcv_body_buffer_ = false; +@@ -350,7 +350,7 @@ void Connection::handleReadBody(ReplyPtr reply, + disconnectCallback_ = boost::function(); + f(); + } else if (!e) { +- LOG_ERROR(socket().native() ++ LOG_ERROR(socket().native_handle() + << ": handleReadBody(): while waiting for disconnect, " + "received unexpected data, closing"); + close(); +@@ -471,3 +471,4 @@ void Connection::handleWriteResponse(ReplyPtr reply, + + } // namespace server + } // namespace http ++ +diff --git a/src/http/Connection.h b/src/http/Connection.h +index 712f736..dabba21 100644 +--- a/src/http/Connection.h ++++ b/src/http/Connection.h +@@ -72,7 +72,7 @@ public: + virtual ~Connection(); + + Server *server() const { return server_; } +- asio::strand& strand() { return strand_; } ++ asio::io_service::strand& strand() { return strand_; } + + /// Stop all asynchronous operations associated with the connection. + void scheduleStop(); +@@ -113,7 +113,7 @@ protected: + /// The manager for this connection. + ConnectionManager& ConnectionManager_; + +- asio::strand strand_; ++ asio::io_service::strand strand_; + + void finishReply(); + +@@ -204,3 +204,4 @@ typedef boost::shared_ptr ConnectionPtr; + } // namespace http + + #endif // HTTP_CONNECTION_HPP ++ +diff --git a/src/http/Reply.C b/src/http/Reply.C +index f7fe2aa..603b9ea 100644 +--- a/src/http/Reply.C ++++ b/src/http/Reply.C +@@ -593,7 +593,7 @@ bool Reply::encodeNextContentBuffer( + originalSize += bs; + + gzipStrm_.avail_in = bs; +- gzipStrm_.next_in = (unsigned char *)asio::detail::buffer_cast_helper(b); ++ gzipStrm_.next_in = (unsigned char *)b.data(); + + unsigned char out[16*1024]; + do { +@@ -642,3 +642,4 @@ bool Reply::encodeNextContentBuffer( + + } // namespace server + } // namespace http ++ +diff --git a/src/http/Server.h b/src/http/Server.h +index 3260a23..c924ed2 100644 +--- a/src/http/Server.h ++++ b/src/http/Server.h +@@ -120,7 +120,7 @@ private: + Wt::WLogger accessLogger_; + + /// The strand for handleTcpAccept(), handleSslAccept() and handleStop() +- asio::strand accept_strand_; ++ asio::io_service::strand accept_strand_; + + /// Acceptor used to listen for incoming http connections. + asio::ip::tcp::acceptor tcp_acceptor_; +@@ -164,3 +164,4 @@ void handleTimeout(asio_timer *timer, + } // namespace http + + #endif // HTTP_SERVER_HPP ++ +diff --git a/src/wt/WServerGLWidget.C b/src/wt/WServerGLWidget.C +index a1fb5ee..7e1d31e 100644 +--- a/src/wt/WServerGLWidget.C ++++ b/src/wt/WServerGLWidget.C +@@ -36,8 +36,9 @@ typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXC + #endif + + #ifdef WIN32_GL +-#include ++#define WIN32_LEAN_AND_MEAN + #include ++#include + #endif + + #ifdef APPLE_GL +diff --git a/src/wt/http/Client.C b/src/wt/http/Client.C +index 2c4e07d..ca793d4 100644 +--- a/src/wt/http/Client.C ++++ b/src/wt/http/Client.C +@@ -605,7 +605,7 @@ private: + + protected: + WIOService& ioService_; +- boost::asio::strand strand_; ++ boost::asio::io_service::strand strand_; + tcp::resolver resolver_; + boost::asio::streambuf requestBuf_; + boost::asio::streambuf responseBuf_; +@@ -1060,3 +1060,4 @@ bool Client::parseUrl(const std::string &url, URL &parsedUrl) + + } + } ++ diff --git a/ports/wt/guard-NO_ERROR.patch b/ports/wt/guard-NO_ERROR.patch new file mode 100644 index 000000000..b91a19a20 --- /dev/null +++ b/ports/wt/guard-NO_ERROR.patch @@ -0,0 +1,19 @@ +diff --git a/src/wt/WGLWidget b/src/wt/WGLWidget +index dd39701..94634f7 100644 +--- a/src/wt/WGLWidget ++++ b/src/wt/WGLWidget +@@ -798,7 +798,14 @@ public: + SAMPLE_COVERAGE = 0x80A0, + + /* ErrorCode */ ++#ifdef _WIN32 ++#pragma push_macro ("NO_ERROR") ++#undef NO_ERROR ++#endif + NO_ERROR = 0x0, ++#ifdef _WIN32 ++#pragma pop_macro ("NO_ERROR") ++#endif + INVALID_ENUM = 0x0500, + INVALID_VALUE = 0x0501, + INVALID_OPERATION = 0x0502, diff --git a/ports/wt/portfile.cmake b/ports/wt/portfile.cmake index 9e219de1f..ede65c8df 100644 --- a/ports/wt/portfile.cmake +++ b/ports/wt/portfile.cmake @@ -10,14 +10,13 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-disable-boost-autolink-option.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/add-disable-boost-autolink-option.patch + ${CMAKE_CURRENT_LIST_DIR}/guard-NO_ERROR.patch + ${CMAKE_CURRENT_LIST_DIR}/boost-1.66.patch ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(SHARED_LIBS ON) -else() - set(SHARED_LIBS OFF) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIBS) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 47e968937f78438c79cb2e8315dbeaf02925063a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 19 Dec 2017 10:41:42 -0800 Subject: [magnum] Remove --trace --- ports/magnum/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 9eff36dcf..67d96bf5b 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -43,7 +43,6 @@ vcpkg_configure_cmake( -DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC} -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum - --trace ) vcpkg_install_cmake() -- cgit v1.2.3 From 9ed81627e7feb28bea6432581cf25730a9f145be Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 19 Dec 2017 10:22:43 -0800 Subject: [vcpkg-list] Improve list output for long triplets --- toolsrc/src/vcpkg/binaryparagraph.cpp | 5 +++-- toolsrc/src/vcpkg/commands.list.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index c7136b713..7c9e905e8 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -92,8 +92,9 @@ namespace vcpkg std::string BinaryParagraph::displayname() const { - const auto f = this->feature.empty() ? "core" : this->feature; - return Strings::format("%s[%s]:%s", this->spec.name(), f, this->spec.triplet()); + if (this->feature.empty() || this->feature == "core") + return Strings::format("%s:%s", this->spec.name(), this->spec.triplet()); + return Strings::format("%s[%s]:%s", this->spec.name(), this->feature, this->spec.triplet()); } std::string BinaryParagraph::dir() const { return this->spec.dir(); } diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index 1f2387843..960c57225 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -13,14 +13,14 @@ namespace vcpkg::Commands::List { if (full_desc) { - System::println("%-30s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description); + System::println("%-50s %-16s %s", pgh.package.displayname(), pgh.package.version, pgh.package.description); } else { - System::println("%-30s %-16s %s", - vcpkg::shorten_text(pgh.package.displayname(), 30), + System::println("%-50s %-16s %s", + vcpkg::shorten_text(pgh.package.displayname(), 50), vcpkg::shorten_text(pgh.package.version, 16), - vcpkg::shorten_text(pgh.package.description, 71)); + vcpkg::shorten_text(pgh.package.description, 51)); } } -- cgit v1.2.3 From 8791faba96649f9536e33f41c14781652790d084 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 19 Dec 2017 16:05:15 -0800 Subject: [llvm] Add atlmfc to dependencies -- fixes #2400 --- ports/llvm/CONTROL | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index 2ea653a12..c50dc8cb8 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,3 +1,4 @@ Source: llvm Version: 5.0.0-2 Description: The LLVM Compiler Infrastructure +Build-Depends: atlmfc -- cgit v1.2.3 From 7e1a737ba4ef1fb0377b75c4a64973f821a561d0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 19 Dec 2017 16:11:20 -0800 Subject: [vcpkg-integrate-powershell] Fix $false bug. Fixes #2397. --- scripts/addPoshVcpkgToPowershellProfile.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/addPoshVcpkgToPowershellProfile.ps1 b/scripts/addPoshVcpkgToPowershellProfile.ps1 index 92a7573e4..7a12e7d34 100644 --- a/scripts/addPoshVcpkgToPowershellProfile.ps1 +++ b/scripts/addPoshVcpkgToPowershellProfile.ps1 @@ -5,11 +5,12 @@ function findExistingImportModuleDirectives([Parameter(Mandatory=$true)][string] { if (!(Test-Path $path)) { - return $false + return } $fileContents = Get-Content $path - return $fileContents -match 'Import-Module.+?(?=posh-vcpkg)' + $fileContents -match 'Import-Module.+?(?=posh-vcpkg)' + return } $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -- cgit v1.2.3 From 6cb6a61aaf5ef2c143f974e9f731778bcd3f5cbe Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Wed, 20 Dec 2017 09:18:13 +0900 Subject: Fix find Boost when can not be found Boost that installed with Vcpkg (#2395) * Fix find Boost when can not be found Boost that installed with Vcpkg Fix find Boost when can not be found Boost that installed with Vcpkg. Re-find package Boost uisng user specified options. * Fix regex of generators Fix regex of generators. Add ending position. * Fix Save and Resore Boost_COMPILER * [vcpkg-cmake-integration] Expand saved boost variables --- scripts/buildsystems/vcpkg.cmake | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 71cf4e9b3..b8d3fbdbb 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -31,9 +31,9 @@ else() set(_VCPKG_TARGET_TRIPLET_ARCH x86) elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$") set(_VCPKG_TARGET_TRIPLET_ARCH x64) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM") + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM$") set(_VCPKG_TARGET_TRIPLET_ARCH arm) - elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017") + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) else() find_program(_VCPKG_CL cl) @@ -165,11 +165,22 @@ endfunction() macro(find_package name) if("${name}" STREQUAL "Boost") + set(_Boost_USE_STATIC_LIBS ${Boost_USE_STATIC_LIBS}) + set(_Boost_USE_MULTITHREADED ${Boost_USE_MULTITHREADED}) + set(_Boost_USE_STATIC_RUNTIME ${Boost_USE_STATIC_RUNTIME}) + set(_Boost_COMPILER ${Boost_COMPILER}) unset(Boost_USE_STATIC_LIBS) unset(Boost_USE_MULTITHREADED) unset(Boost_USE_STATIC_RUNTIME) set(Boost_COMPILER "-vc140") _find_package(${ARGV}) + if(NOT Boost_FOUND) + set(Boost_USE_STATIC_LIBS ${_Boost_USE_STATIC_LIBS}) + set(Boost_USE_MULTITHREADED ${_Boost_USE_MULTITHREADED}) + set(Boost_USE_STATIC_RUNTIME ${_Boost_USE_STATIC_RUNTIME}) + set(Boost_COMPILER ${_Boost_COMPILER}) + _find_package(${ARGV}) + endif() elseif("${name}" STREQUAL "ICU") function(_vcpkg_find_in_list) list(FIND ARGV "COMPONENTS" COMPONENTS_IDX) -- cgit v1.2.3 From 476dab76158c0ad21251bc5d768e0362018a088f Mon Sep 17 00:00:00 2001 From: pravic Date: Wed, 20 Dec 2017 08:56:32 +0300 Subject: [sciter] Update to 4.0.7.5637 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index b822697e6..1c43b1720 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.0.6 +Version: 4.0.7 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 2f65614e6..55b99d296 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,8 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION d015c26ee369dffd353c40bb1a98a7350db14ab2) -set(SCITER_SHA 41c33d0049d32ec07bf7c1af38d31c87c4504c2ee054a60ebaa867b4affe7c8eab60a2f2ffe3326f44d61751e5e7ffd3c067d878c79acf47c2598f6e65fbf7a9) +set(SCITER_REVISION e5e612ae914233d2436240cdd7730fb739461f8e) +set(SCITER_SHA 8d4412e6e9047bbcc5fa0dae4b49844367f3b621b0edca2544f907dc651a1be7fddbedf5004ddbcb5b9bbe26abca0259c78c89febab6778806c4a62a50908bf2) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) @@ -21,7 +21,8 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) set(SCITER_ARCH 32) endif() -# check out +# check out the `https://github.com/c-smile/sciter-sdk/archive/${SCITER_REVISION}.tar.gz` +# hash checksum can be obtained with `curl -L -o tmp.tgz ${URL} && vcpkg hash tmp.tgz` vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO c-smile/sciter-sdk -- cgit v1.2.3 From 6c55370286d915b742fb2bf51b35129c7d033dc3 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Wed, 20 Dec 2017 15:19:18 +0900 Subject: Initial experimental re-support for VCPKG_BUILD_TYPE release re-add this commit 5335d17 --- ports/boost-vcpkg-helpers/CONTROL | 2 +- ports/boost-vcpkg-helpers/boost-modular.cmake | 112 ++++++++++++++------------ 2 files changed, 61 insertions(+), 53 deletions(-) diff --git a/ports/boost-vcpkg-helpers/CONTROL b/ports/boost-vcpkg-helpers/CONTROL index e9a60e401..d3fc0fc95 100644 --- a/ports/boost-vcpkg-helpers/CONTROL +++ b/ports/boost-vcpkg-helpers/CONTROL @@ -1,3 +1,3 @@ Source: boost-vcpkg-helpers -Version: 1 +Version: 2 Description: a set of vcpkg-internal scripts used to modularize boost diff --git a/ports/boost-vcpkg-helpers/boost-modular.cmake b/ports/boost-vcpkg-helpers/boost-modular.cmake index e98cae65f..0d8c8b4cb 100644 --- a/ports/boost-vcpkg-helpers/boost-modular.cmake +++ b/ports/boost-vcpkg-helpers/boost-modular.cmake @@ -168,60 +168,68 @@ function(boost_modular_build) ###################### set(B2_EXE "${BOOST_BUILD_PATH}/b2.exe") - message(STATUS "Building ${TARGET_TRIPLET}-rel") - set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") - vcpkg_execute_required_process( - COMMAND "${B2_EXE}" - --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage - --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam - ${_bm_OPTIONS} - variant=release - debug-symbols=on - WORKING_DIRECTORY ${_bm_SOURCE_PATH} - LOGNAME build-${TARGET_TRIPLET}-rel - ) - message(STATUS "Building ${TARGET_TRIPLET}-rel done") - - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") - vcpkg_execute_required_process( - COMMAND "${B2_EXE}" - --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage - --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam - ${_bm_OPTIONS} - variant=debug - WORKING_DIRECTORY ${_bm_SOURCE_PATH} - LOGNAME build-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Building ${TARGET_TRIPLET}-dbg done") - - message(STATUS "Packaging ${TARGET_TRIPLET}-rel") - file(GLOB REL_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.lib) - file(COPY ${REL_LIBS} - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - FILES_MATCHING PATTERN "*.lib") - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.dll) - file(COPY ${REL_DLLS} - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - FILES_MATCHING PATTERN "*.dll") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${TARGET_TRIPLET}-rel") + set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") + vcpkg_execute_required_process( + COMMAND "${B2_EXE}" + --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage + --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam + ${_bm_OPTIONS} + variant=release + debug-symbols=on + WORKING_DIRECTORY ${_bm_SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") + vcpkg_execute_required_process( + COMMAND "${B2_EXE}" + --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage + --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam + ${_bm_OPTIONS} + variant=debug + WORKING_DIRECTORY ${_bm_SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") endif() - message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") - - message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") - file(GLOB DBG_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.lib) - file(COPY ${DBG_LIBS} - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - FILES_MATCHING PATTERN "*.lib") - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.dll) - file(COPY ${DBG_DLLS} - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - FILES_MATCHING PATTERN "*.dll") + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Packaging ${TARGET_TRIPLET}-rel") + file(GLOB REL_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.lib) + file(COPY ${REL_LIBS} + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + FILES_MATCHING PATTERN "*.lib") + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.dll) + file(COPY ${REL_DLLS} + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + FILES_MATCHING PATTERN "*.dll") + endif() + message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") + file(GLOB DBG_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.lib) + file(COPY ${DBG_LIBS} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + FILES_MATCHING PATTERN "*.lib") + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.dll) + file(COPY ${DBG_DLLS} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + FILES_MATCHING PATTERN "*.dll") + endif() + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") endif() - message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") file(GLOB INSTALLED_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*.lib ${CURRENT_PACKAGES_DIR}/lib/*.lib) foreach(LIB ${INSTALLED_LIBS}) -- cgit v1.2.3 From 65f96fab1d0823abd65560f5425eabe75da84303 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Wed, 20 Dec 2017 08:15:18 -0800 Subject: [dlib] update to 19.8 --- ports/dlib/CONTROL | 2 +- ports/dlib/portfile.cmake | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index c773d8d28..4d0a72f50 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,5 +1,5 @@ Source: dlib -Version: 19.7 +Version: 19.8 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3 Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index e80176b7d..9d82cbf19 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO davisking/dlib - REF v19.7 - SHA512 a3877066e04a411d96e910f4229c60a86971a9290e840aa4a5b2f0b102e9b8c37bfede259b80b71ba066d21eb0aa2565808e51d0eab6397ff5fd2bac60dcedd5 + REF v19.8 + SHA512 5fbe306dab1fe025de0892808431ddc4bc6f3e91eb509881a0b341dd2d0a5a36c5d99d45ece19c428d6025b0601b996cab4b554332323a0c73a65d66b82db01a HEAD_REF master ) @@ -55,6 +55,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Remove other files not required in package file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/all) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/appveyor) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/test) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/travis) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_neon) -- cgit v1.2.3 From 6363688b6d2f3522a4ce48cedb60da31775cd923 Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 20 Dec 2017 12:28:54 -0600 Subject: [fftw] Build more libs --- ports/fftw3/CONTROL | 2 +- ports/fftw3/portfile.cmake | 54 +++++++++++++++++++++++----------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/ports/fftw3/CONTROL b/ports/fftw3/CONTROL index ccdc0e7ee..fd9e59766 100644 --- a/ports/fftw3/CONTROL +++ b/ports/fftw3/CONTROL @@ -1,3 +1,3 @@ Source: fftw3 -Version: 3.3.7-1 +Version: 3.3.7-2 Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). diff --git a/ports/fftw3/portfile.cmake b/ports/fftw3/portfile.cmake index 317046635..2cf78f44c 100644 --- a/ports/fftw3/portfile.cmake +++ b/ports/fftw3/portfile.cmake @@ -17,33 +17,33 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) -option(BUILD_SINGLE "Additionally build single precision library" ON) -option(BUILD_LONG_DOUBLE "Additionally build long-double precision library" ON) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS -DBUILD_SINGLE=${BUILD_SINGLE} -DBUILD_LONG_DOUBLE=${BUILD_LONG_DOUBLE} -) - -vcpkg_install_cmake() -vcpkg_copy_pdbs() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${SOURCE_PATH}/api/fftw3.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) - -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/fftw3) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - - -if (VCPKG_CRT_LINKAGE STREQUAL dynamic) - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-dynamic.patch) -endif() - +foreach(PRECISION ENABLE_DEFAULT_PRECISION ENABLE_FLOAT ENABLE_LONG_DOUBLE) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -D${PRECISION}=ON + ) + + vcpkg_install_cmake() + vcpkg_copy_pdbs() + + file(COPY ${SOURCE_PATH}/api/fftw3.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-dynamic.patch) + endif() + + # Cleanup + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +endforeach() + # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/fftw3) file(RENAME ${CURRENT_PACKAGES_DIR}/share/fftw3/COPYING ${CURRENT_PACKAGES_DIR}/share/fftw3/copyright) -- cgit v1.2.3 From 49e56732c0f15a9a1108d36534ab69ed18b50cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Mon, 11 Dec 2017 17:36:49 -0500 Subject: Improving support for ITK --- ports/itk/CONTROL | 4 ++-- ports/itk/portfile.cmake | 30 ++++++++++++++++-------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/ports/itk/CONTROL b/ports/itk/CONTROL index c930e9491..f4b29af94 100644 --- a/ports/itk/CONTROL +++ b/ports/itk/CONTROL @@ -1,4 +1,4 @@ Source: itk -Version: 4.11.0 +Version: 4.13.0 Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis. -Build-Depends: libjpeg-turbo, zlib, libpng, tiff, expat +Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake index 79b298ae2..d37d5b150 100644 --- a/ports/itk/portfile.cmake +++ b/ports/itk/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO InsightSoftwareConsortium/ITK - REF fc374c8431a8aec740e4db3a398c6e95294f34a2 - SHA512 d4a313cfba78ab309e387c213a2dd568c4d8bb628210dcb519712bbed23380b870d7224634119fad08ff157451b75f1c7fbae93841a00091b0e403315cde2943 + REF d92873e33e8a54e933e445b92151191f02feab42 + SHA512 0e3ebd27571543e1c497377dd9576a9bb0711129be12131109fe9b3c8413655ad14ce4d9ac6e281bac83c57e6032b614bc9ff53ed357d831544ca52f41513b62 HEAD_REF master ) @@ -23,27 +23,27 @@ vcpkg_configure_cmake( -DITK_INSTALL_DOC_DIR=share/itk/doc -DITK_INSTALL_PACKAGE_DIR=share/itk -DITK_LEGACY_REMOVE=ON + -DITK_FUTURE_LEGACY_REMOVE=ON -DITK_USE_64BITS_IDS=ON -DITK_USE_CONCEPT_CHECKING=ON - # -DITK_WRAP_PYTHON=ON - # -DITK_PYTHON_VERSION=3 - # -DITK_USE_SYSTEM_LIBRARIES=ON # enables USE_SYSTEM for many third party libraries which do not have vcpkg ports such as FFTW + #-DITK_USE_SYSTEM_LIBRARIES=ON # enables USE_SYSTEM for all third party libraries, some of which do not have vcpkg ports such as CastXML, SWIG, MINC etc + -DITK_USE_SYSTEM_DOUBLECONVERSION=ON -DITK_USE_SYSTEM_EXPAT=ON -DITK_USE_SYSTEM_JPEG=ON -DITK_USE_SYSTEM_PNG=ON -DITK_USE_SYSTEM_TIFF=ON -DITK_USE_SYSTEM_ZLIB=ON -DITK_FORBID_DOWNLOADS=OFF - -DITK_BUILD_DEFAULT_MODULES=OFF # turns on HDF5, which is problematic - -DITKGroup_IO=OFF # turns on HDF5, which is problematic - -DModule_ITKReview=OFF # turns on HDF5, which is problematic - -DITKGroup_Filtering=ON - -DITKGroup_Registration=ON - -DITKGroup_Segmentation=ON - -DModule_ITKIOMesh=ON - -DModule_ITKIOCSV=ON + + # I havn't tried Python wrapping in vcpkg + #-DITK_WRAP_PYTHON=ON + #-DITK_PYTHON_VERSION=3 + + # HDF5 must NOT be installed, otherwise it causes: ...\installed\x64-windows-static\include\H5Tpkg.h(25): fatal error C1189: #error: "Do not include this file outside the H5T package!" + -DITK_USE_SYSTEM_HDF5=OFF # if ON, causes: ...\buildtrees\itk\x64-windows-static-rel\Modules\ThirdParty\HDF5\src\itk_H5Cpp.h(25): fatal error C1083: Cannot open include file: 'H5Cpp.h': No such file or directory + + # -DModule_ITKVtkGlue=ON # this option requires VTK to be a dependency in CONTROL file. VTK depends on HDF5! -DModule_IOSTL=ON # example how to turn on a non-default module - # -DModule_ITKVtkGlue=ON # this option requires VTK to be a dependency in CONTROL file -DModule_MorphologicalContourInterpolation=ON # example how to turn on a remote module -DModule_RLEImage=ON # example how to turn on a remote module ${ADDITIONAL_OPTIONS} @@ -52,6 +52,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() # combines release and debug build configurations + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From cd6fb55cd9411a0b420ff7fae8a0c23d43ee6882 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Thu, 21 Dec 2017 03:57:14 +0300 Subject: [libdatrie] add version 0.2.10 --- ports/libdatrie/CMakeLists.txt | 94 +++++++++++++++++++++++++++++++++++++++ ports/libdatrie/CONTROL | 4 ++ ports/libdatrie/config.h.cmake | 87 ++++++++++++++++++++++++++++++++++++ ports/libdatrie/fix-exports.patch | 8 ++++ ports/libdatrie/portfile.cmake | 53 ++++++++++++++++++++++ 5 files changed, 246 insertions(+) create mode 100644 ports/libdatrie/CMakeLists.txt create mode 100644 ports/libdatrie/CONTROL create mode 100644 ports/libdatrie/config.h.cmake create mode 100644 ports/libdatrie/fix-exports.patch create mode 100644 ports/libdatrie/portfile.cmake diff --git a/ports/libdatrie/CMakeLists.txt b/ports/libdatrie/CMakeLists.txt new file mode 100644 index 000000000..bdc1c21ea --- /dev/null +++ b/ports/libdatrie/CMakeLists.txt @@ -0,0 +1,94 @@ +cmake_minimum_required(VERSION 3.0) +project(libdatrie LANGUAGES C) + +option(SKIP_HEADERS "Skip headers" OFF) +option(SKIP_TOOL "Skip tool" OFF) +option(BUILD_SHARED_LIBS "Build shared libs" OFF) + +set(LIB_SRCS + datrie/alpha-map.c + datrie/darray.c + datrie/dstring.c + datrie/fileutils.c + datrie/tail.c + datrie/trie.c + datrie/trie-string.c +) + +set(LIB_HDRS + datrie/alpha-map.h + datrie/trie.h + datrie/triedefs.h + datrie/typedefs.h +) + +if(WIN32) + list(APPEND LIB_SRCS datrie/libdatrie.def) +endif() + +include(CheckIncludeFile) +include(CheckFunctionExists) + +set(STDC_HEADERS 1) +check_include_file(dlfcn.h HAVE_DLFCN_H) +check_include_file(inttypes.h HAVE_INTTYPES_H) +check_include_file(limits.h HAVE_LIMITS_H) +check_include_file(memory.h HAVE_MEMORY_H) +check_include_file(stdint.h HAVE_STDINT_H) +check_include_file(stdio.h HAVE_STDIO_H) +check_include_file(stdlib.h HAVE_STDLIB_H) +check_include_file(strings.h HAVE_STRINGS_H) +check_include_file(string.h HAVE_STRING_H) +check_include_file(sys/stat.h HAVE_SYS_STAT_H) +check_include_file(sys/types.h HAVE_SYS_TYPES_H) +check_include_file(unistd.h HAVE_UNISTD_H) + +check_function_exists(nl_langinfo HAVE_LANGINFO_CODESET) +check_function_exists(locale_charset HAVE_LOCALE_CHARSET) +check_function_exists(malloc HAVE_MALLOC) + +configure_file(config.h.cmake config.h) + +add_library(libdatrie ${LIB_SRCS}) +target_include_directories(libdatrie PRIVATE ".") +target_include_directories(libdatrie PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) +set_target_properties(libdatrie PROPERTIES PREFIX "") +set_target_properties(libdatrie PROPERTIES DEBUG_POSTFIX "d") + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + + +if (NOT SKIP_TOOL) + add_executable(trietool "tools/trietool.c" ) + target_include_directories(trietool PRIVATE ".") + target_include_directories(trietool PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) + target_link_libraries(trietool libdatrie) + + find_path(ICONV_INCLUDE_DIR iconv.h) + find_library(ICONV_LIBRARY NAMES iconv libiconv) + find_library(CHARSET_LIBRARY NAMES charset libcharset) + target_include_directories(trietool PRIVATE ${ICONV_INCLUDE_DIR}) + target_link_libraries(trietool ${ICONV_LIBRARY} ${CHARSET_LIBRARY}) + + install( + TARGETS trietool + RUNTIME DESTINATION bin + ) +endif() + +install( + TARGETS libdatrie + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if (NOT SKIP_HEADERS) + install( + FILES ${LIB_HDRS} + DESTINATION "include/datrie" + ) +endif() diff --git a/ports/libdatrie/CONTROL b/ports/libdatrie/CONTROL new file mode 100644 index 000000000..b39710141 --- /dev/null +++ b/ports/libdatrie/CONTROL @@ -0,0 +1,4 @@ +Source: libdatrie +Version: 0.2.10-1 +Description: implementation of double-array structure for representing trie +Build-Depends: libiconv diff --git a/ports/libdatrie/config.h.cmake b/ports/libdatrie/config.h.cmake new file mode 100644 index 000000000..9d575d6e5 --- /dev/null +++ b/ports/libdatrie/config.h.cmake @@ -0,0 +1,87 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_INTTYPES_H + +/* Have nl_langinfo (CODESET) */ +#cmakedefine HAVE_LANGINFO_CODESET + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LIMITS_H + +/* Have locale_charset() */ +#cmakedefine HAVE_LOCALE_CHARSET + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#cmakedefine HAVE_MALLOC + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDIO_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#cmakedefine LT_OBJDIR + +/* Name of package */ +#define PACKAGE "libdatrie" + +/* Define to the address where bug reports for this package should be sent. */ +#cmakedefine PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libdatrie" + +/* Define to the full name and version of this package. */ +#cmakedefine PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#cmakedefine PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://linux.thai.net/~thep/datrie/datrie.html" + +/* Define to the version of this package. */ +#cmakedefine PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#cmakedefine STDC_HEADERS 1 + +/* Version number of package */ +#cmakedefine VERSION "@VERSION@" + +/* Define to empty if `const' does not conform to ANSI C. */ +#cmakedefine const + +/* Define to rpl_malloc if the replacement function should be used. */ +#cmakedefine malloc + +/* Define to `unsigned int' if does not define. */ +#cmakedefine size_t diff --git a/ports/libdatrie/fix-exports.patch b/ports/libdatrie/fix-exports.patch new file mode 100644 index 000000000..d82850431 --- /dev/null +++ b/ports/libdatrie/fix-exports.patch @@ -0,0 +1,8 @@ +diff -Naur ./a/libdatrie.def ./b/libdatrie.def +--- a/libdatrie.def 2013-10-17 06:27:57.000000000 +0300 ++++ b/libdatrie.def 2017-12-21 02:42:39.873879000 +0300 +@@ -1,3 +1,4 @@ ++EXPORTS + alpha_map_new + alpha_map_clone + alpha_map_free diff --git a/ports/libdatrie/portfile.cmake b/ports/libdatrie/portfile.cmake new file mode 100644 index 000000000..81ff4e239 --- /dev/null +++ b/ports/libdatrie/portfile.cmake @@ -0,0 +1,53 @@ +set(LIBDATRIE_VERSION 0.2.10) + +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libdatrie-${LIBDATRIE_VERSION}) +vcpkg_download_distfile(ARCHIVE + URLS "https://linux.thai.net/pub/ThaiLinux/software/libthai/libdatrie-${LIBDATRIE_VERSION}.tar.xz" + FILENAME "libdatrie-${LIBDATRIE_VERSION}.tar.xz" + SHA512 ee68ded9d6e06c562da462d42e7e56098a82478d7b8547506200c3018b72536c4037a4e518924f779dc77d3ab139d93216bdb29ab4116b9dc9efd1a5d1eb9e31 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH}/datrie + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-exports.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake DESTINATION ${SOURCE_PATH}) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(SKIP_TOOL ON) +else() + set(SKIP_TOOL OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DVERSION=${LIBDATRIE_VERSION} + OPTIONS_RELEASE + -DSKIP_TOOL=${SKIP_TOOL} + -DSKIP_HEADERS=OFF + OPTIONS_DEBUG + -DSKIP_TOOL=ON + -DSKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/trietool.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/trietool.exe) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libdatrie RENAME copyright) -- cgit v1.2.3 From b4e0467f9e21f6c8460ea83ba54da6f98fdb6724 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Wed, 20 Dec 2017 22:47:10 -0800 Subject: [alembic] update to 1.7.5 --- ports/alembic/CONTROL | 2 +- ports/alembic/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index e9632f98e..e1e3090b9 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.4-1 +Version: 1.7.5 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. http://alembic.io/ diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index 03d3e8dc3..9b7eee317 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alembic/alembic - REF 1.7.4 - SHA512 8e752d6d85bea3b6a53582d35a589fc40824456098d950974effe0a6a0e359fec1e056af1ea1379f7e23b7ffed2c05c7f5269fa4b64757631b7d57fb60ee98b0 + REF 1.7.5 + SHA512 9e8c9a29661d4cec16dbc77014188a07112c78b011c48fb5e9c2107512926e2cdd43f65e732c456574e07947afc4e53e200753ca59430f011e6fc8ea31041fc0 HEAD_REF master ) -- cgit v1.2.3 From a0b2767175c20dc446c22a9ce30ed1874d72acdf Mon Sep 17 00:00:00 2001 From: Anatoly Shirokov Date: Thu, 21 Dec 2017 10:37:02 +0300 Subject: Added port libqrencode - a fast and compact QR Code encoding library (#2372) * https://github.com/Microsoft/vcpkg/issues/2363 * libqrencode: Added necessary new line at end of CONTROL, portfile.cmake, usage files. Added copying the usage file in portfile.cmake, and removed unnecessary DBUILD_SHARED_LIBS as remarked @ras0219-msft * [libqrencode] Adjust usage to match other packages --- ports/libqrencode/CONTROL | 4 ++ ports/libqrencode/portfile.cmake | 47 ++++++++++++++++++++++ .../libqrencode/remove-deprecated-attribute.patch | 16 ++++++++ ports/libqrencode/usage | 10 +++++ 4 files changed, 77 insertions(+) create mode 100644 ports/libqrencode/CONTROL create mode 100644 ports/libqrencode/portfile.cmake create mode 100644 ports/libqrencode/remove-deprecated-attribute.patch create mode 100644 ports/libqrencode/usage diff --git a/ports/libqrencode/CONTROL b/ports/libqrencode/CONTROL new file mode 100644 index 000000000..0e96c99a9 --- /dev/null +++ b/ports/libqrencode/CONTROL @@ -0,0 +1,4 @@ +Source: libqrencode +Version: 4.0.0-1 +Build-Depends: libpng, libiconv +Description: libqrencode - a fast and compact QR Code encoding library diff --git a/ports/libqrencode/portfile.cmake b/ports/libqrencode/portfile.cmake new file mode 100644 index 000000000..ff0c2302b --- /dev/null +++ b/ports/libqrencode/portfile.cmake @@ -0,0 +1,47 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fukuchi/libqrencode + REF v4.0.0 + SHA512 0e4855c7983d4c73eb4a7f9cb081679547957c9f4a30cb943f2ae25e3a6496a202d3489f46e248386499d05a68c6a36e24f64af57ef4d6f447ef3a39e08374ee + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/remove-deprecated-attribute.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_TOOLS=NO + -DWITH_TEST=NO + -DSKIP_INSTALL_PROGRAMS=ON + -DSKIP_INSTALL_EXECUTABLES=ON + -DSKIP_INSTALL_FILES=ON + OPTIONS_DEBUG + -DSKIP_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/qrencode.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/qrencode.dll ${CURRENT_PACKAGES_DIR}/bin/qrencode.dll) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/qrencoded.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/qrencoded.dll ${CURRENT_PACKAGES_DIR}/debug/bin/qrencoded.dll) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/libqrencode-4.0.0/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libqrencode) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libqrencode/COPYING ${CURRENT_PACKAGES_DIR}/share/libqrencode/copyright) + +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/libqrencode/remove-deprecated-attribute.patch b/ports/libqrencode/remove-deprecated-attribute.patch new file mode 100644 index 000000000..1a00c3a3b --- /dev/null +++ b/ports/libqrencode/remove-deprecated-attribute.patch @@ -0,0 +1,16 @@ + qrencode.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/qrencode.h b/qrencode.h +index b855f0a..a6d4a29 100644 +--- a/qrencode.h ++++ b/qrencode.h +@@ -555,7 +555,7 @@ extern char *QRcode_APIVersionString(void); + /** + * @deprecated + */ +-extern void QRcode_clearCache(void) __attribute__ ((deprecated)); ++extern void QRcode_clearCache(void); + + #if defined(__cplusplus) + } diff --git a/ports/libqrencode/usage b/ports/libqrencode/usage new file mode 100644 index 000000000..f6003f4e3 --- /dev/null +++ b/ports/libqrencode/usage @@ -0,0 +1,10 @@ +To use libqrencode library in CMakeLists.txt: + + find_path(QRENCODE_INCLUDE_DIR NAMES qrencode.h) + find_library(QRENCODE_LIBRARY_RELEASE qrencode) + find_library(QRENCODE_LIBRARY_DEBUG qrencoded) + set(QRENCODE_LIBRARIES optimized ${QRENCODE_LIBRARY_RELEASE} debug ${QRENCODE_LIBRARY_DEBUG}) + + add_executable(main main.cpp) + target_include_directories(main PRIVATE ${QRENCODE_INCLUDE_DIR}) + target_link_libraries(main PRIVATE ${QRENCODE_LIBRARIES}) -- cgit v1.2.3 From 4e6678ba9dd1291439143fccc603b614f7baa9f0 Mon Sep 17 00:00:00 2001 From: Guillaume Lachance Date: Thu, 21 Dec 2017 02:39:45 -0500 Subject: libmupdf initial port (#1950) * libmupdf initial port * [libmupdf] Use CMake for buildsystem replacement. --- ports/libmupdf/CMakeLists.txt | 43 +++++++++++++++++++++++++++++++++++++++++++ ports/libmupdf/CONTROL | 4 ++++ ports/libmupdf/portfile.cmake | 30 ++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 ports/libmupdf/CMakeLists.txt create mode 100644 ports/libmupdf/CONTROL create mode 100644 ports/libmupdf/portfile.cmake diff --git a/ports/libmupdf/CMakeLists.txt b/ports/libmupdf/CMakeLists.txt new file mode 100644 index 000000000..827f2de5d --- /dev/null +++ b/ports/libmupdf/CMakeLists.txt @@ -0,0 +1,43 @@ +cmake_minimum_required(VERSION 3.9) +project(libmupdf C) + +set(CMAKE_DEBUG_POSTFIX d) + +if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include/mupdf/pdf/name-table.h") + execute_process( + COMMAND "cmd.exe" "/c" "platform\\win32\\generate.bat" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + ) +endif() + +find_package(freetype NO_MODULE REQUIRED) +find_package(JPEG REQUIRED) +find_path(HARFBUZZ_INCLUDE hb.h PATH_SUFFIXES harfbuzz) +find_library(HARFBUZZ_LIBRARIES harfbuzz) + +file(GLOB_RECURSE SOURCES "source/*.c") +list(FILTER SOURCES EXCLUDE REGEX "source/tools/[a-z]*\\.c$") +add_library(libmupdf ${SOURCES}) + +target_compile_definitions(libmupdf PRIVATE -DZ_SOLO) +target_include_directories(libmupdf PRIVATE + include + generated + thirdparty/jbig2dec + thirdparty/libjpeg + thirdparty/mujs + thirdparty/openjpeg/src/lib/openjp2 + ${JPEG_INCLUDE_DIR} + ${HARFBUZZ_INCLUDE} +) +target_link_libraries(libmupdf PRIVATE + freetype + ${JPEG_LIBRARIES} + ${HARFBUZZ_LIBRARIES} +) + +install(TARGETS libmupdf + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/ports/libmupdf/CONTROL b/ports/libmupdf/CONTROL new file mode 100644 index 000000000..ed61402d7 --- /dev/null +++ b/ports/libmupdf/CONTROL @@ -0,0 +1,4 @@ +Source: libmupdf +Version: 1.11-1 +Build-Depends: freetype, libjpeg-turbo, harfbuzz, zlib, curl, glfw3 +Description: a lightweight PDF, XPS, and E-book library diff --git a/ports/libmupdf/portfile.cmake b/ports/libmupdf/portfile.cmake new file mode 100644 index 000000000..df4997a70 --- /dev/null +++ b/ports/libmupdf/portfile.cmake @@ -0,0 +1,30 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(STATUS "Warning: Dynamic building not supported. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mupdf-1.11-source) +vcpkg_download_distfile(ARCHIVE + URLS "https://mupdf.com/downloads/mupdf-1.11-source.tar.gz" + FILENAME "mupdf.tar.gz" + SHA512 501670f540e298a8126806ebbd9db8b29866f663b7bbf26c9ade1933e42f0c00ad410b9d93f3ddbfb3e45c38722869095de28d832fe3fb3703c55cc9a01dbf63 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(COPY ${SOURCE_PATH}/include/mupdf DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_copy_pdbs() + +#copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYRIGHT) -- cgit v1.2.3 From 1e7b70493976c9e4f822adcb95fcc307a3f548a4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 20 Dec 2017 23:47:39 -0800 Subject: [hpx] Handle boost breaking changes. Fixes #2416. --- ports/hpx/CONTROL | 2 +- ports/hpx/boost-1-66.patch | 38 ++++++++++++++++++++++++++++++++++++++ ports/hpx/portfile.cmake | 17 +++++++++++------ 3 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 ports/hpx/boost-1-66.patch diff --git a/ports/hpx/CONTROL b/ports/hpx/CONTROL index efac88780..6956312c8 100644 --- a/ports/hpx/CONTROL +++ b/ports/hpx/CONTROL @@ -1,5 +1,5 @@ Source: hpx -Version: 1.0.0-6 +Version: 1.0.0-7 Build-Depends: hwloc, boost-chrono, boost-date-time, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread, boost-context, boost-iostreams, boost-random, boost-atomic, boost-asio, boost-dynamic-bitset, boost-assign, boost-format, boost-signals2, boost-parameter, boost-bimap, boost-accumulators, boost-lockfree, boost-icl Description: The C++ Standards Library for Concurrency and Parallelism HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case. diff --git a/ports/hpx/boost-1-66.patch b/ports/hpx/boost-1-66.patch new file mode 100644 index 000000000..6f98a48aa --- /dev/null +++ b/ports/hpx/boost-1-66.patch @@ -0,0 +1,38 @@ +diff --git a/src/util/asio_util.cpp b/src/util/asio_util.cpp +index e2207de..48a35b9 100644 +--- a/src/util/asio_util.cpp ++++ b/src/util/asio_util.cpp +@@ -231,7 +231,7 @@ namespace hpx { namespace util + tcp::endpoint ep; + if (util::get_endpoint(address, port, ep)) + { +- return endpoint_iterator_type(tcp::resolver::iterator::create( ++ return endpoint_iterator_type(tcp::resolver::results_type::create( + ep, address, port_str)); + } + } +@@ -283,7 +283,7 @@ namespace hpx { namespace util + if (util::get_endpoint(address, port, ep)) + { + return endpoint_iterator_type( +- tcp::resolver::iterator::create(ep, address, port_str)); ++ tcp::resolver::results_type::create(ep, address, port_str)); + } + } + catch (boost::system::system_error const&) { +diff --git a/src/util/serialize_exception.cpp b/src/util/serialize_exception.cpp +index 935e575..22bcf37 100644 +--- a/src/util/serialize_exception.cpp ++++ b/src/util/serialize_exception.cpp +@@ -341,11 +341,7 @@ namespace hpx { namespace serialization + case hpx::util::boost_system_error: + e = hpx::detail::construct_exception( + boost::system::system_error(err_value, +-#ifndef BOOST_SYSTEM_NO_DEPRECATED +- boost::system::get_system_category() +-#else + boost::system::system_category() +-#endif + , err_message + ) + , throw_function_, throw_file_, throw_line_, throw_back_trace_, diff --git a/ports/hpx/portfile.cmake b/ports/hpx/portfile.cmake index 0f0299d05..4b3a87254 100644 --- a/ports/hpx/portfile.cmake +++ b/ports/hpx/portfile.cmake @@ -15,29 +15,34 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) # apply hotfix to enable building with vcpkg -vcpkg_download_distfile(DIFF +vcpkg_download_distfile(DIFF1 URLS "http://stellar-group.org/files/hpx-Build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" FILENAME "hpx-Build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" SHA512 86df311a120686139955e1c0fdca55379594be3fa8d46d69ee59d83da351ce3bed487ab946c80f7127aab9699e470e24e545b112f92be9f971f41d95c429d01d ) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) # apply hotfix to fix issues with building 32bit version -vcpkg_download_distfile(DIFF +vcpkg_download_distfile(DIFF2 URLS "http://stellar-group.org/files/hpx-Fixing-32bit-MSVC-compilation.diff" FILENAME "hpx-Fixing-32bit-MSVC-compilation.diff" SHA512 31c904d317b4c24eddd819e4856f8326ff3850a5a196c7648c46a11dbb85f35e972e077957b3c4aec67c8b043816fe1cebc92cfe28ed815f682537dfc3421b8b ) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) # apply hotfix to fix issues when building with UNICODE enabled -vcpkg_download_distfile(DIFF +vcpkg_download_distfile(DIFF3 URLS "http://stellar-group.org/files/hpx-Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" FILENAME "hpx-Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" SHA512 8fcdb36307702d64b9d2b26920374a6c5a29a50d125305dc95926c4cbc91215cb0c72ede83b06d0fc007fe7b2283845e08351bd45f11f3677f0d3db4ac8f9424 ) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${DIFF}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${DIFF1} + ${DIFF2} + ${DIFF3} + ${CMAKE_CURRENT_LIST_DIR}/boost-1-66.patch +) SET(BOOST_PATH "${CURRENT_INSTALLED_DIR}/share/boost") SET(HWLOC_PATH "${CURRENT_INSTALLED_DIR}/share/hwloc") -- cgit v1.2.3 From b7ce0db27fa482bddbbdafa06d85ba179bf42ed6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 20 Dec 2017 23:55:38 -0800 Subject: [folly] Handle boost upgrade --- ports/folly/CONTROL | 2 +- ports/folly/cmake-link-boost-fix.cmake | 35 ++++++++++++++++++++++++++++++++++ ports/folly/portfile.cmake | 6 ++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 ports/folly/cmake-link-boost-fix.cmake diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index dfd4b833e..cc3678039 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,4 +1,4 @@ Source: folly -Version: 2017.11.27.00-1 +Version: 2017.11.27.00-2 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: zlib, openssl, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy, boost-context, boost-chrono, boost-date-time, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread, boost-conversion, boost-multi-index, boost-crc diff --git a/ports/folly/cmake-link-boost-fix.cmake b/ports/folly/cmake-link-boost-fix.cmake new file mode 100644 index 000000000..7eb4574c4 --- /dev/null +++ b/ports/folly/cmake-link-boost-fix.cmake @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec5a985c..36564534 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -136,13 +136,6 @@ source_group("folly\\build" FILES + ) + + set(FOLLY_SHINY_DEPENDENCIES +- Boost::chrono +- Boost::context +- Boost::date_time +- Boost::filesystem +- Boost::program_options +- Boost::regex +- Boost::system + OpenSSL::SSL + OpenSSL::Crypto + ) +@@ -179,6 +172,7 @@ endif() + + set(FOLLY_LINK_LIBRARIES + ${FOLLY_LINK_LIBRARIES} ++ ${Boost_LIBRARIES} + Iphlpapi.lib + Ws2_32.lib + +@@ -320,7 +314,7 @@ if (BUILD_TESTS) + ) + target_link_libraries(folly_test_support + PUBLIC +- Boost::thread ++ ${Boost_LIBRARIES} + folly + ${LIBGMOCK_LIBRARY} + ) diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index fc3584860..77c8cecdf 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -22,6 +22,12 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/cmake-link-boost-fix.cmake +) + if(VCPKG_CRT_LINKAGE STREQUAL static) set(MSVC_USE_STATIC_RUNTIME ON) else() -- cgit v1.2.3 From c426491191c0fbe4df201a9208263988b3dbf137 Mon Sep 17 00:00:00 2001 From: Vitaliy Didik Date: Thu, 21 Dec 2017 11:13:50 +0300 Subject: [nghttp2] initial port (dynamic build only). (#2366) * [nghttp2] initial port (dynamic build only). * [nghttp2] Slight tweak --- ports/nghttp2/CONTROL | 3 +++ ports/nghttp2/portfile.cmake | 51 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 ports/nghttp2/CONTROL create mode 100644 ports/nghttp2/portfile.cmake diff --git a/ports/nghttp2/CONTROL b/ports/nghttp2/CONTROL new file mode 100644 index 000000000..18cd57cef --- /dev/null +++ b/ports/nghttp2/CONTROL @@ -0,0 +1,3 @@ +Source: nghttp2 +Version: 1.28.0 +Description: Implementation of the Hypertext Transfer Protocol version 2 in C diff --git a/ports/nghttp2/portfile.cmake b/ports/nghttp2/portfile.cmake new file mode 100644 index 000000000..dd9f02b84 --- /dev/null +++ b/ports/nghttp2/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) + +set(LIB_NAME nghttp2) +set(LIB_VERSION 1.28.0) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message("nghttp2 doesn't currently support static library build") + set(VCPKG_LIBRARY_LINKAGE dynamic) + if(VCPKG_CRT_LINKAGE STREQUAL static) + message(FATAL_ERROR "avoiding building DLL with static CRT.") + endif() +endif() + +set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/nghttp2/nghttp2/releases/download/v${LIB_VERSION}/${LIB_FILENAME}" + FILENAME "${LIB_FILENAME}" + SHA512 37fbc7fe5f7292ea17ec030f024de0a697ede3ea883457b7edebfb0f21c7eee9196c62df61945953b54b410eea3a64d180beeb477529bd744caf986be0a1b1c9 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DENABLE_LIB_ONLY=ON + -DENABLE_ASIO_LIB=OFF +) + +vcpkg_install_cmake() + +# Remove unwanted files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) + +# Move dll files from /lib to /bin where vcpkg expects them +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/${LIB_NAME}.dll ${CURRENT_PACKAGES_DIR}/bin/${LIB_NAME}.dll) + + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/${LIB_NAME}.dll ${CURRENT_PACKAGES_DIR}/debug/bin/${LIB_NAME}.dll) +endif() + +# License and man +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${LIB_NAME} RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 31d686e7e4f30eec204da660539a27bb370e7b4a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 21 Dec 2017 00:19:44 -0800 Subject: [brynet] Use vcpkg_from_github --- ports/brynet/CONTROL | 1 - ports/brynet/portfile.cmake | 40 ++++++++++++---------------------------- 2 files changed, 12 insertions(+), 29 deletions(-) diff --git a/ports/brynet/CONTROL b/ports/brynet/CONTROL index 005d7d02e..f94ec56ee 100644 --- a/ports/brynet/CONTROL +++ b/ports/brynet/CONTROL @@ -1,4 +1,3 @@ Source: brynet Version: 0.9.0 Description: A C++ cross platform high performance tcp network library, and support SSL/HTTP/Websocket. -Build-Depends: diff --git a/ports/brynet/portfile.cmake b/ports/brynet/portfile.cmake index 4321185d4..7922b704c 100644 --- a/ports/brynet/portfile.cmake +++ b/ports/brynet/portfile.cmake @@ -1,42 +1,26 @@ -# 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) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "Alembic does not support dynamic linkage. Building statically.") + message(STATUS "brynet does not support dynamic linkage. Building statically.") set(VCPKG_LIBRARY_LINKAGE static) endif() -set(BRYNET_VERSION 0.9.0) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/brynet-${BRYNET_VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/IronsDu/brynet/archive/v${BRYNET_VERSION}.zip" - FILENAME "v${BRYNET_VERSION}.zip" - SHA512 a39bdffe6bb9b93bd6f21da0d59b172c2956c5f9366716dff01027f59660ca4d28ee557a42caa93d93047e041438a1de42ed22c67a3c2124d105a63381ac3685 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO IronsDu/brynet + REF v0.9.0 + SHA512 49543833be0d8eb2dce2b00a85d48087e9756b93febaae0c7cd83b7f44f9cd8d81976069f8b84344807bee2df785b80fbb65a1a93e8c6a9c942f9554063a05c1 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) 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 + PREFER_NINJA ) vcpkg_install_cmake() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/brynet-${BRYNET_VERSION}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brynet) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brynet) file(RENAME ${CURRENT_PACKAGES_DIR}/share/brynet/LICENSE ${CURRENT_PACKAGES_DIR}/share/brynet/copyright) -# Handle copyright -# file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/brynet RENAME copyright) -- cgit v1.2.3 From 81bb62a8dd0a363157f6e7ba0ac1d27116e796d2 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 21 Dec 2017 02:37:25 -0800 Subject: [boost] Fix uwp builds on systems with spaces --- ports/boost-vcpkg-helpers/CONTROL | 2 +- ports/boost-vcpkg-helpers/boost-modular.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/boost-vcpkg-helpers/CONTROL b/ports/boost-vcpkg-helpers/CONTROL index d3fc0fc95..3e29eb9f8 100644 --- a/ports/boost-vcpkg-helpers/CONTROL +++ b/ports/boost-vcpkg-helpers/CONTROL @@ -1,3 +1,3 @@ Source: boost-vcpkg-helpers -Version: 2 +Version: 3 Description: a set of vcpkg-internal scripts used to modularize boost diff --git a/ports/boost-vcpkg-helpers/boost-modular.cmake b/ports/boost-vcpkg-helpers/boost-modular.cmake index 0d8c8b4cb..8e3ca378b 100644 --- a/ports/boost-vcpkg-helpers/boost-modular.cmake +++ b/ports/boost-vcpkg-helpers/boost-modular.cmake @@ -147,7 +147,7 @@ function(boost_modular_build) file(TO_NATIVE_PATH "${PLATFORM_WINMD_DIR}" PLATFORM_WINMD_DIR) string(REPLACE "\\" "\\\\" PLATFORM_WINMD_DIR ${PLATFORM_WINMD_DIR}) # escape backslashes - set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -Zl \"/AI${PLATFORM_WINMD_DIR}\" WindowsApp.lib /ZW -DVirtualAlloc=VirtualAllocFromApp -D_WIN32_WINNT=0x0A00") + set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -Zl \"/AI\"${PLATFORM_WINMD_DIR}\"\" WindowsApp.lib /ZW -DVirtualAlloc=VirtualAllocFromApp -D_WIN32_WINNT=0x0A00") else() set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -D_WIN32_WINNT=0x0602") endif() -- cgit v1.2.3 From ac32306cd2ecc7e3bdd2b7eb7e528bbe49787afb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 21 Dec 2017 03:15:23 -0800 Subject: [assimp] Fix unitialized variable issue. --- ports/assimp/CONTROL | 2 +- ports/assimp/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/assimp/CONTROL b/ports/assimp/CONTROL index b63cca6ed..a2cb8e780 100644 --- a/ports/assimp/CONTROL +++ b/ports/assimp/CONTROL @@ -1,4 +1,4 @@ Source: assimp -Version: 4.1.0 +Version: 4.1.0-1 Description: The Open Asset import library Build-Depends: zlib diff --git a/ports/assimp/portfile.cmake b/ports/assimp/portfile.cmake index 618ce160f..6d4a7ec1d 100644 --- a/ports/assimp/portfile.cmake +++ b/ports/assimp/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/dont-overwrite-prefix-path.patch" + "${CMAKE_CURRENT_LIST_DIR}/uninitialized-variable.patch" ) file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake) -- cgit v1.2.3 From 4971bb4dca4886889d1eedc93a7643d651cfbb42 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 21 Dec 2017 03:46:08 -0800 Subject: [libtorrent] Update to more recent snapshot to support boost 1.66 --- ports/libtorrent/CONTROL | 2 +- ports/libtorrent/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL index 46c096a68..f6dde66ee 100644 --- a/ports/libtorrent/CONTROL +++ b/ports/libtorrent/CONTROL @@ -1,4 +1,4 @@ Source: libtorrent -Version: 1.1.5-1 +Version: 94f4e88e05f92a1 Description: An efficient feature complete C++ BitTorrent implementation Build-Depends: openssl, boost-system, boost-date-time, boost-chrono, boost-random, boost-asio, boost-crc, boost-config diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake index 45dd0aab3..3101bab29 100644 --- a/ports/libtorrent/portfile.cmake +++ b/ports/libtorrent/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO arvidn/libtorrent - REF libtorrent-1_1_5 - SHA512 edaff6347bf922af8b6d74e332e180fe122f64152a152fb905f4f2c3371dc29d668fc2b0ffcda3f56b50a1a51b25d1a3ae4284ed6e09f6a2eb7b34bcce8dd9c7 + REF 94f4e88e05f92a1b07551598a4bedb2c16af0f2f + SHA512 1b4876a471a62813c97519ebf54fc06286b7ee43005e436c7139c6a6ac39fd40fefd5c9b7424e65509ec8deb95dfe1427544b686b6b9cd51cf3d3f133ba7a701 HEAD_REF master ) -- cgit v1.2.3 From 9491c607435fb349b255f0423dd7a6239a2dd002 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 21 Dec 2017 03:46:39 -0800 Subject: [assimp] Fixup: add missing patchfile --- ports/assimp/uninitialized-variable.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ports/assimp/uninitialized-variable.patch diff --git a/ports/assimp/uninitialized-variable.patch b/ports/assimp/uninitialized-variable.patch new file mode 100644 index 000000000..f7b51c143 --- /dev/null +++ b/ports/assimp/uninitialized-variable.patch @@ -0,0 +1,13 @@ +diff --git a/contrib/zip/src/miniz.h b/contrib/zip/src/miniz.h +index 916fb1f..a7bc178 100644 +--- a/contrib/zip/src/miniz.h ++++ b/contrib/zip/src/miniz.h +@@ -4420,7 +4420,7 @@ mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, const char *pArchive_name + #ifndef MINIZ_NO_STDIO + mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, const char *pSrc_filename, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags) + { +- mz_uint uncomp_crc32 = MZ_CRC32_INIT, level, num_alignment_padding_bytes; ++ mz_uint uncomp_crc32 = MZ_CRC32_INIT, level = 0, num_alignment_padding_bytes; + mz_uint16 method = 0, dos_time = 0, dos_date = 0, ext_attributes = 0; + mz_uint64 local_dir_header_ofs, cur_archive_file_ofs, uncomp_size = 0, comp_size = 0; + size_t archive_name_size; -- cgit v1.2.3 From 5e5506e68a9657d18bc4fb4380b5b4dfc849c019 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 21 Dec 2017 03:47:02 -0800 Subject: [vcpkg-download-distfile] Add input sanitization --- scripts/cmake/vcpkg_download_distfile.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index b22d82a16..24503338a 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -39,6 +39,16 @@ function(vcpkg_download_distfile VAR) set(multipleValuesArgs URLS) cmake_parse_arguments(vcpkg_download_distfile "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + if(NOT DEFINED vcpkg_download_distfile_URLS) + message(FATAL_ERROR "vcpkg_download_distfile requires a URLS argument.") + endif() + if(NOT DEFINED vcpkg_download_distfile_FILENAME) + message(FATAL_ERROR "vcpkg_download_distfile requires a FILENAME argument.") + endif() + if(NOT DEFINED vcpkg_download_distfile_SHA512) + message(FATAL_ERROR "vcpkg_download_distfile requires a SHA512 argument.") + endif() + set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}) set(download_file_path_part "${DOWNLOADS}/temp/${vcpkg_download_distfile_FILENAME}") -- cgit v1.2.3 From 95b739c1a8eeea5dbb73be58e369baa9fb231a8c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 21 Dec 2017 11:46:26 -0800 Subject: [boost-python] Fix build. --- ports/boost-python/CONTROL | 2 +- ports/boost-python/portfile.cmake | 1 + ports/boost-vcpkg-helpers/generate-ports.ps1 | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/boost-python/CONTROL b/ports/boost-python/CONTROL index 645cf8b13..f59353af7 100644 --- a/ports/boost-python/CONTROL +++ b/ports/boost-python/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-python -Version: 1.66.0 +Version: 1.66.0-1 Build-Depends: boost-bind, boost-config, boost-core, boost-detail, boost-graph, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-property-map, boost-smart-ptr, boost-static-assert, boost-tuple, boost-utility, boost-vcpkg-helpers, python3 Description: Boost python module diff --git a/ports/boost-python/portfile.cmake b/ports/boost-python/portfile.cmake index beb16ad8f..395227990 100644 --- a/ports/boost-python/portfile.cmake +++ b/ports/boost-python/portfile.cmake @@ -16,4 +16,5 @@ file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION "${PYTHON_INCLUDE_PATH}") +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index cc2929ef4..11f670c7a 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -293,6 +293,7 @@ foreach ($library in $libraries) if ($library -eq "python") { $deps += @("python3") + $needsBuild = $true } elseif ($library -eq "iostreams") { -- cgit v1.2.3 From db40d19f3db8d72439f3d1958f3d6ffbd8003435 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 21 Dec 2017 12:02:08 -0800 Subject: [qt5] Add atlmfc to dependencies on windows due to tlbase.h inclusion. Fixes #2344. --- ports/qt5/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index ce46d249b..4d5d44ab7 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 Version: 5.8-6 Description: Qt5 application framework main components. Webengine, examples and tests not included. -Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre, harfbuzz, sqlite3, libpq, double-conversion +Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre, harfbuzz, sqlite3, libpq, double-conversion, atlmfc (windows) -- cgit v1.2.3 From a24ccdfc01aba83b833af528b8f1a6ec6db020a4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Oct 2017 17:19:11 -0700 Subject: [vcpkg-build-cmake] Build at IDLE priority. Try to detect out-of-memory issues in the linker, and restart the build once. --- scripts/cmake/vcpkg_build_cmake.cmake | 99 +++++++++++++++++----- scripts/cmake/vcpkg_execute_required_process.cmake | 28 ++++-- toolsrc/src/vcpkg/base/system.cpp | 2 +- 3 files changed, 100 insertions(+), 29 deletions(-) diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 0b4bbd211..548e6cf46 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -33,10 +33,13 @@ function(vcpkg_build_cmake) set(_bc_LOGFILE_ROOT "build") endif() + set(PARALLEL_ARG) + set(NO_PARALLEL_ARG) + if(_VCPKG_CMAKE_GENERATOR MATCHES "Ninja") set(BUILD_ARGS "-v") # verbose output if (_bc_DISABLE_PARALLEL) - list(APPEND BUILD_ARGS "-j1") + set(NO_PARALLEL_ARG "-j1") endif() elseif(_VCPKG_CMAKE_GENERATOR MATCHES "Visual Studio") set(BUILD_ARGS @@ -44,7 +47,7 @@ function(vcpkg_build_cmake) "/p:UseIntelMKL=No" ) if (NOT _bc_DISABLE_PARALLEL) - list(APPEND BUILD_ARGS "/m") + set(PARALLEL_ARG "/m") endif() elseif(_VCPKG_CMAKE_GENERATOR MATCHES "NMake") # No options are currently added for nmake builds @@ -58,23 +61,79 @@ function(vcpkg_build_cmake) set(TARGET_PARAM) endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Build ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release ${TARGET_PARAM} -- ${BUILD_ARGS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME ${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-rel - ) - message(STATUS "Build ${TARGET_TRIPLET}-rel done") - endif() + foreach(BUILDTYPE "release" "debug") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) + if(BUILDTYPE STREQUAL "debug") + set(SHORT_BUILDTYPE "dbg") + else() + set(SHORT_BUILDTYPE "rel") + endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Build ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug ${TARGET_PARAM} -- ${BUILD_ARGS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME ${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Build ${TARGET_TRIPLET}-dbg done") - endif() + message(STATUS "Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") + set(LOGPREFIX "${CURRENT_BUILDTREES_DIR}/${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") + set(LOGS) + + if(BUILDTYPE STREQUAL "release") + set(CONFIG "Release") + else() + set(CONFIG "Debug") + endif() + + execute_process( + COMMAND ${CMAKE_COMMAND} --build . --config Release ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG} + OUTPUT_FILE "${LOGPREFIX}-out.log" + ERROR_FILE "${LOGPREFIX}-err.log" + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) + if(error_code) + file(READ "${LOGPREFIX}-out.log" out_contents) + file(READ "${LOGPREFIX}-err.log" err_contents) + + if(out_contents) + list(APPEND LOGS "${LOGPREFIX}-out.log") + endif() + if(err_contents) + list(APPEND LOGS "${LOGPREFIX}-err.log") + endif() + + if(out_contents MATCHES "LINK : fatal error LNK1102:" OR out_contents MATCHES " fatal error C1060: ") + # The linker ran out of memory during execution. We will try continuing once more, with parallelism disabled. + execute_process( + COMMAND ${CMAKE_COMMAND} --build . --config Release ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG} + OUTPUT_FILE "${LOGPREFIX}-out-1.log" + ERROR_FILE "${LOGPREFIX}-err-1.log" + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) + + if(error_code) + file(READ "${LOGPREFIX}-out-1.log" out_contents) + file(READ "${LOGPREFIX}-err-1.log" err_contents) + + if(out_contents) + list(APPEND LOGS "${LOGPREFIX}-out-1.log") + endif() + if(err_contents) + list(APPEND LOGS "${LOGPREFIX}-err-1.log") + endif() + endif() + endif() + + if(error_code) + set(STRINGIFIED_LOGS) + foreach(LOG ${LOGS}) + file(TO_NATIVE_PATH "${LOG}" NATIVE_LOG) + list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") + endforeach() + set(_eb_COMMAND ${CMAKE_COMMAND} --build . --config Release ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG}) + set(_eb_WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) + message(FATAL_ERROR + " Command failed: ${_eb_COMMAND}\n" + " Working Directory: ${_eb_WORKING_DIRECTORY}\n" + " See logs for more information:\n" + ${STRINGIFIED_LOGS}) + endif() + endif() + message(STATUS "Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} done") + endif() + endforeach() endfunction() diff --git a/scripts/cmake/vcpkg_execute_required_process.cmake b/scripts/cmake/vcpkg_execute_required_process.cmake index 7c4907016..5b8922c14 100644 --- a/scripts/cmake/vcpkg_execute_required_process.cmake +++ b/scripts/cmake/vcpkg_execute_required_process.cmake @@ -30,22 +30,34 @@ ## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) function(vcpkg_execute_required_process) cmake_parse_arguments(vcpkg_execute_required_process "" "WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN}) - #debug_message("vcpkg_execute_required_process(${vcpkg_execute_required_process_COMMAND})") + set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-out.log") + set(LOG_ERR "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-err.log") execute_process( COMMAND ${vcpkg_execute_required_process_COMMAND} - OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-out.log - ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-err.log + OUTPUT_FILE ${LOG_OUT} + ERROR_FILE ${LOG_ERR} RESULT_VARIABLE error_code WORKING_DIRECTORY ${vcpkg_execute_required_process_WORKING_DIRECTORY}) - #debug_message("error_code=${error_code}") if(error_code) - file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-out.log" NATIVE_LOG_OUT) - file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-err.log" NATIVE_LOG_ERR) + set(LOGS) + file(READ "${LOG_OUT}" out_contents) + file(READ "${LOG_ERR}" err_contents) + if(out_contents) + list(APPEND LOGS "${LOG_OUT}") + endif() + if(err_contents) + list(APPEND LOGS "${LOG_ERR}") + endif() + set(STRINGIFIED_LOGS) + foreach(LOG ${LOGS}) + file(TO_NATIVE_PATH "${LOG}" NATIVE_LOG) + list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") + endforeach() message(FATAL_ERROR " Command failed: ${vcpkg_execute_required_process_COMMAND}\n" " Working Directory: ${vcpkg_execute_required_process_WORKING_DIRECTORY}\n" " See logs for more information:\n" - " ${NATIVE_LOG_OUT}\n" - " ${NATIVE_LOG_ERR}\n") + ${STRINGIFIED_LOGS} + ) endif() endfunction() diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 625ee6ce0..84721bf6e 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -220,7 +220,7 @@ namespace vcpkg::System nullptr, nullptr, FALSE, - BELOW_NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT, + IDLE_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT, env_cstr.data(), nullptr, &startup_info, -- cgit v1.2.3 From 2d0a76370ead152896411d17aa19934235b93d1c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 21 Dec 2017 16:28:13 -0800 Subject: clang-tidy fixes --- toolsrc/include/vcpkg/sourceparagraph.h | 3 ++- toolsrc/include/vcpkg/versiont.h | 2 +- toolsrc/src/vcpkg.cpp | 14 +++++----- toolsrc/src/vcpkg/base/chrono.cpp | 2 +- toolsrc/src/vcpkg/base/cofffilereader.cpp | 2 +- toolsrc/src/vcpkg/base/files.cpp | 4 +-- toolsrc/src/vcpkg/build.cpp | 11 ++++---- toolsrc/src/vcpkg/commands.cache.cpp | 2 +- toolsrc/src/vcpkg/commands.create.cpp | 2 +- toolsrc/src/vcpkg/commands.exportifw.cpp | 6 ++--- toolsrc/src/vcpkg/commands.integrate.cpp | 2 +- toolsrc/src/vcpkg/commands.list.cpp | 2 +- toolsrc/src/vcpkg/export.cpp | 4 +-- toolsrc/src/vcpkg/install.cpp | 2 +- toolsrc/src/vcpkg/metrics.cpp | 43 ++++++++++++++----------------- toolsrc/src/vcpkg/remove.cpp | 4 +-- toolsrc/src/vcpkg/sourceparagraph.cpp | 6 ++--- toolsrc/src/vcpkg/statusparagraphs.cpp | 2 +- toolsrc/src/vcpkg/update.cpp | 3 ++- toolsrc/src/vcpkg/userconfig.cpp | 2 +- toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 +-- toolsrc/src/vcpkg/versiont.cpp | 2 +- 22 files changed, 61 insertions(+), 63 deletions(-) diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h index dcbbc1c3b..58e76b7b1 100644 --- a/toolsrc/include/vcpkg/sourceparagraph.h +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -14,11 +14,12 @@ namespace vcpkg { struct Dependency { + static Dependency parse_dependency(std::string&& name, std::string&& qualifier); + Features depend; std::string qualifier; std::string name() const; - static Dependency parse_dependency(std::string name, std::string qualifier); }; std::vector filter_dependencies(const std::vector& deps, const Triplet& t); diff --git a/toolsrc/include/vcpkg/versiont.h b/toolsrc/include/vcpkg/versiont.h index 6d8332521..0ffb4d602 100644 --- a/toolsrc/include/vcpkg/versiont.h +++ b/toolsrc/include/vcpkg/versiont.h @@ -6,7 +6,7 @@ namespace vcpkg struct VersionT { VersionT(); - VersionT(const std::string& value); + VersionT(std::string&& value); const std::string& to_string() const; diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 094ea1dc5..08dd3fcf6 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -4,7 +4,7 @@ #pragma warning(push) #pragma warning(disable : 4768) -#include +#include #pragma warning(pop) #else #include @@ -21,10 +21,8 @@ #include #include #include -#include #include -#include #include #include @@ -49,7 +47,7 @@ static void inner(const VcpkgCmdArguments& args) Checks::exit_fail(VCPKG_LINE_INFO); } - static const auto find_command = [&](auto&& commands) { + static const auto FIND_COMMAND = [&](auto&& commands) { auto it = Util::find_if(commands, [&](auto&& commandc) { return Strings::case_insensitive_ascii_equals(commandc.name, args.command); }); @@ -62,7 +60,7 @@ static void inner(const VcpkgCmdArguments& args) return static_cast(nullptr); }; - if (const auto command_function = find_command(Commands::get_available_commands_type_c())) + if (const auto command_function = FIND_COMMAND(Commands::get_available_commands_type_c())) { return command_function->function(args); } @@ -136,7 +134,7 @@ static void inner(const VcpkgCmdArguments& args) } } - if (const auto command_function = find_command(Commands::get_available_commands_type_b())) + if (const auto command_function = FIND_COMMAND(Commands::get_available_commands_type_b())) { return command_function->function(args, paths); } @@ -161,7 +159,7 @@ static void inner(const VcpkgCmdArguments& args) Input::check_triplet(default_triplet, paths); - if (const auto command_function = find_command(Commands::get_available_commands_type_a())) + if (const auto command_function = FIND_COMMAND(Commands::get_available_commands_type_a())) { return command_function->function(args, paths, default_triplet); } @@ -214,7 +212,7 @@ static void load_config() static std::string trim_path_from_command_line(const std::string& full_command_line) { Checks::check_exit( - VCPKG_LINE_INFO, full_command_line.size() > 0, "Internal failure - cannot have empty command line"); + VCPKG_LINE_INFO, !full_command_line.empty(), "Internal failure - cannot have empty command line"); if (full_command_line[0] == '"') { diff --git a/toolsrc/src/vcpkg/base/chrono.cpp b/toolsrc/src/vcpkg/base/chrono.cpp index 00f8ba3f1..d83106c8b 100644 --- a/toolsrc/src/vcpkg/base/chrono.cpp +++ b/toolsrc/src/vcpkg/base/chrono.cpp @@ -15,7 +15,7 @@ namespace vcpkg::Chrono using std::chrono::nanoseconds; using std::chrono::seconds; - const double nanos_as_double = static_cast(nanos.count()); + const auto nanos_as_double = static_cast(nanos.count()); if (duration_cast(nanos) > hours()) { diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp index 1927e0b5e..27426eb0a 100644 --- a/toolsrc/src/vcpkg/base/cofffilereader.cpp +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -223,7 +223,7 @@ namespace vcpkg::CoffFileReader static const char* FILE_START = "!\n"; static const size_t FILE_START_SIZE = 8; - fs.seekg(fs.beg); + fs.seekg(fstream::beg); char file_start[FILE_START_SIZE]; fs.read(file_start, FILE_START_SIZE); diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 8c9e137ed..7e4cfbf6a 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -18,9 +18,9 @@ namespace vcpkg::Files return std::make_error_code(std::errc::no_such_file_or_directory); } - file_stream.seekg(0, file_stream.end); + file_stream.seekg(0, std::fstream::end); auto length = file_stream.tellg(); - file_stream.seekg(0, file_stream.beg); + file_stream.seekg(0, std::fstream::beg); if (length > SIZE_MAX) { diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index f43d8788e..16f7a400f 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -60,7 +60,8 @@ namespace vcpkg::Build::Command spec.name()); const StatusParagraphs status_db = database_load_check(paths); - const Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; + const Build::BuildPackageOptions build_package_options{ + Build::UseHeadVersion::NO, Build::AllowDownloads::YES, Build::CleanBuildtrees::NO}; const std::unordered_set features_as_set(full_spec.features.begin(), full_spec.features.end()); @@ -192,7 +193,7 @@ namespace vcpkg::Build for (auto&& host : host_architectures) { - auto it = Util::find_if(toolset.supported_architectures, [&](const ToolsetArchOption& opt) { + const auto it = Util::find_if(toolset.supported_architectures, [&](const ToolsetArchOption& opt) { return host == opt.host_arch && target_arch == opt.target_arch; }); if (it != toolset.supported_architectures.end()) return it->name; @@ -294,7 +295,7 @@ namespace vcpkg::Build { features.append(feature + ";"); } - if (features.size() > 0) + if (!features.empty()) { features.pop_back(); } @@ -364,7 +365,7 @@ namespace vcpkg::Build if (config.build_package_options.clean_buildtrees == CleanBuildtrees::YES) { auto& fs = paths.get_filesystem(); - auto buildtrees_dir = paths.buildtrees / spec.name(); + const auto buildtrees_dir = paths.buildtrees / spec.name(); auto buildtree_files = fs.get_files_non_recursive(buildtrees_dir); for (auto&& file : buildtree_files) { @@ -500,7 +501,7 @@ namespace vcpkg::Build const std::vector lines = Strings::split(ec_data.output, "\n"); - PreBuildInfo pre_build_info; + PreBuildInfo pre_build_info{}; const auto e = lines.cend(); auto cur = std::find(lines.cbegin(), e, FLAG_GUID); diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index 6fd123b7c..85bf5fb4d 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -47,7 +47,7 @@ namespace vcpkg::Commands::Cache Checks::exit_success(VCPKG_LINE_INFO); } - if (args.command_arguments.size() == 0) + if (args.command_arguments.empty()) { for (const BinaryParagraph& binary_paragraph : binary_paragraphs) { diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index 44f5f7928..25c34cf09 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -34,7 +34,7 @@ namespace vcpkg::Commands::Create R"(Filename cannot contain invalid chars %s, but was %s)", Files::FILESYSTEM_INVALID_CHARACTERS, zip_file_name); - cmake_args.push_back({"FILENAME", zip_file_name}); + cmake_args.emplace_back("FILENAME", zip_file_name); } const std::string cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args); diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp index 682267acb..96c0e2215 100644 --- a/toolsrc/src/vcpkg/commands.exportifw.cpp +++ b/toolsrc/src/vcpkg/commands.exportifw.cpp @@ -139,14 +139,14 @@ namespace vcpkg::Export::IFW )###", create_release_date())); - for (auto package = unique_packages.begin(); package != unique_packages.end(); ++package) + for (const auto& unique_package : unique_packages) { - const ExportPlanAction& action = *(package->second); + const ExportPlanAction& action = *(unique_package.second); const BinaryParagraph& binary_paragraph = action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; package_xml_file_path = - raw_exported_dir_path / Strings::format("packages.%s", package->first) / "meta" / "package.xml"; + raw_exported_dir_path / Strings::format("packages.%s", unique_package.first) / "meta" / "package.xml"; package_xml_dir_path = package_xml_file_path.parent_path(); fs.create_directories(package_xml_dir_path, ec); Checks::check_exit(VCPKG_LINE_INFO, diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 460e99b88..0f647a40f 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -191,7 +191,7 @@ namespace vcpkg::Commands::Integrate const auto found = std::regex_search(*contents_data, match, RE); if (found) { - const int ver = atoi(match[1].str().c_str()); + const auto ver = strtol(match[1].str().c_str(), nullptr, 10); if (ver >= 1) should_install_system = false; } } diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index 960c57225..66939a68a 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -57,7 +57,7 @@ namespace vcpkg::Commands::List return lhs->package.displayname() < rhs->package.displayname(); }); - if (args.command_arguments.size() == 0) + if (args.command_arguments.empty()) { for (const StatusParagraph* status_paragraph : installed_packages) { diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index e3221a12f..11e810339 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -69,8 +69,8 @@ namespace vcpkg::Export { static constexpr std::array ORDER = {ExportPlanType::ALREADY_BUILT, ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT}; - static constexpr Build::BuildPackageOptions build_options = {Build::UseHeadVersion::NO, - Build::AllowDownloads::YES}; + static constexpr Build::BuildPackageOptions build_options = { + Build::UseHeadVersion::NO, Build::AllowDownloads::YES, Build::CleanBuildtrees::NO}; for (const ExportPlanType plan_type : ORDER) { diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index dcc130be3..88c9d8882 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -159,7 +159,7 @@ namespace vcpkg::Install auto package_files = Util::fmap(package_file_paths, [package_remove_char_count](const fs::path& path) { std::string as_string = path.generic_string(); as_string.erase(0, package_remove_char_count); - return std::move(as_string); + return as_string; }); return SortedVector(std::move(package_files)); diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index cdb21d260..818a9066c 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -152,7 +152,7 @@ namespace vcpkg::Metrics void track_property(const std::string& name, const std::string& value) { - if (properties.size() != 0) properties.push_back(','); + if (!properties.empty()) properties.push_back(','); properties.append(to_json_string(name)); properties.push_back(':'); properties.append(to_json_string(value)); @@ -160,7 +160,7 @@ namespace vcpkg::Metrics void track_metric(const std::string& name, double value) { - if (measurements.size() != 0) measurements.push_back(','); + if (!measurements.empty()) measurements.push_back(','); measurements.append(to_json_string(name)); measurements.push_back(':'); measurements.append(std::to_string(value)); @@ -302,7 +302,7 @@ namespace vcpkg::Metrics { if (MAXDWORD <= payload.size()) abort(); std::wstring hdrs = L"Content-Type: application/json\r\n"; - std::string& p = const_cast(payload); + auto& p = const_cast(payload); results = WinHttpSendRequest(request, hdrs.c_str(), static_cast(hdrs.size()), @@ -383,30 +383,27 @@ namespace vcpkg::Metrics auto& fs = Files::get_real_filesystem(); - if (true) - { - const fs::path exe_path = [&fs]() -> fs::path { - auto vcpkgdir = System::get_exe_path_of_current_process().parent_path(); - auto path = vcpkgdir / "vcpkgmetricsuploader.exe"; - if (fs.exists(path)) return path; - - path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe"; - if (fs.exists(path)) return path; - - return ""; - }(); - - std::error_code ec; - fs.create_directories(temp_folder_path, ec); - if (ec) return; - fs.copy_file(exe_path, temp_folder_path_exe, fs::copy_options::skip_existing, ec); - if (ec) return; - } + const fs::path exe_path = [&fs]() -> fs::path { + auto vcpkgdir = System::get_exe_path_of_current_process().parent_path(); + auto path = vcpkgdir / "vcpkgmetricsuploader.exe"; + if (fs.exists(path)) return path; + + path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe"; + if (fs.exists(path)) return path; + + return ""; + }(); + + std::error_code ec; + fs.create_directories(temp_folder_path, ec); + if (ec) return; + fs.copy_file(exe_path, temp_folder_path_exe, fs::copy_options::skip_existing, ec); + if (ec) return; const fs::path vcpkg_metrics_txt_path = temp_folder_path / ("vcpkg" + generate_random_UUID() + ".txt"); fs.write_contents(vcpkg_metrics_txt_path, payload); - const std::string cmd_line = Strings::format("start \"vcpkgmetricsuploader.exe\" \"%s\" \"%s\"", + const std::string cmd_line = Strings::format(R"(start "vcpkgmetricsuploader.exe" "%s" "%s")", temp_folder_path_exe.u8string(), vcpkg_metrics_txt_path.u8string()); System::cmd_execute_clean(cmd_line); diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 4079d60c1..ed2c02b9f 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -202,7 +202,7 @@ namespace vcpkg::Remove std::vector specs; if (Util::Sets::contains(options.switches, OPTION_OUTDATED)) { - if (args.command_arguments.size() != 0) + if (!args.command_arguments.empty()) { System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); Checks::exit_fail(VCPKG_LINE_INFO); @@ -221,7 +221,7 @@ namespace vcpkg::Remove } else { - if (args.command_arguments.size() < 1) + if (args.command_arguments.empty()) { System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); Checks::exit_fail(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index 2a9480538..4da0cfcfc 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -158,7 +158,7 @@ namespace vcpkg return std::move(control_file); } - Dependency Dependency::parse_dependency(std::string name, std::string qualifier) + Dependency Dependency::parse_dependency(std::string&& name, std::string&& qualifier) { Dependency dep; dep.qualifier = qualifier; @@ -182,7 +182,7 @@ namespace vcpkg { return Util::fmap(depends, [&](const std::string& depend_string) -> Dependency { auto pos = depend_string.find(' '); - if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, ""); + if (pos == std::string::npos) return Dependency::parse_dependency(std::string{depend_string}, ""); // expect of the form "\w+ \[\w+\]" Dependency dep; @@ -190,7 +190,7 @@ namespace vcpkg if (depend_string.c_str()[pos + 1] != '(' || depend_string[depend_string.size() - 1] != ')') { // Error, but for now just slurp the entire string. - return Dependency::parse_dependency(depend_string, ""); + return Dependency::parse_dependency(std::string{depend_string}, ""); } dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3); return dep; diff --git a/toolsrc/src/vcpkg/statusparagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp index d4afc0427..d516b6284 100644 --- a/toolsrc/src/vcpkg/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg/statusparagraphs.cpp @@ -47,7 +47,7 @@ namespace vcpkg StatusParagraphs::const_iterator StatusParagraphs::find_installed(const std::string& name, const Triplet& triplet) const { - const const_iterator it = find(name, triplet); + const auto it = find(name, triplet); if (it != end() && (*it)->want == Want::INSTALL && (*it)->state == InstallState::INSTALLED) { return it; diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index d6c5614ed..9f89da13c 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -35,7 +35,8 @@ namespace vcpkg::Update auto&& installed_version = pgh->package.version; if (installed_version != port_version) { - output.push_back({pgh->package.spec, VersionDiff(installed_version, port_version)}); + output.push_back( + {pgh->package.spec, VersionDiff(std::string{installed_version}, std::string{port_version})}); } } else diff --git a/toolsrc/src/vcpkg/userconfig.cpp b/toolsrc/src/vcpkg/userconfig.cpp index 906594691..45ed01ec6 100644 --- a/toolsrc/src/vcpkg/userconfig.cpp +++ b/toolsrc/src/vcpkg/userconfig.cpp @@ -41,7 +41,7 @@ namespace vcpkg const auto& pghs = *p_pghs; std::unordered_map keys; - if (pghs.size() > 0) keys = pghs[0]; + if (!pghs.empty()) keys = pghs[0]; for (size_t x = 1; x < pghs.size(); ++x) { diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index e64a681e2..cbf1e97e1 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -50,14 +50,14 @@ namespace vcpkg const std::string& version_check_arguments, const std::array& expected_version) { - auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { + const auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { const std::string cmd = Strings::format(R"("%s" %s)", p.u8string(), version_check_arguments); return exists_and_has_equal_or_greater_version(cmd, expected_version); }); if (it != candidate_paths.cend()) { - return std::move(*it); + return *it; } return nullopt; diff --git a/toolsrc/src/vcpkg/versiont.cpp b/toolsrc/src/vcpkg/versiont.cpp index 91f7e23ef..cff49d9e8 100644 --- a/toolsrc/src/vcpkg/versiont.cpp +++ b/toolsrc/src/vcpkg/versiont.cpp @@ -6,7 +6,7 @@ namespace vcpkg { VersionT::VersionT() : value("0.0.0") {} - VersionT::VersionT(const std::string& value) : value(value) {} + VersionT::VersionT(std::string&& value) : value(std::move(value)) {} const std::string& VersionT::to_string() const { return value; } bool operator==(const VersionT& left, const VersionT& right) { return left.to_string() == right.to_string(); } bool operator!=(const VersionT& left, const VersionT& right) { return left.to_string() != right.to_string(); } -- cgit v1.2.3 From 6832578fe3197f4c367f26cb98b22858fd4db6b2 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 22 Dec 2017 21:23:57 -0800 Subject: [opencv] update to 3.4.0 --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 2c80e5767..e71ad109d 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.3.1-9 +Version: 3.4.0 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index b309edb89..5e3c98555 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO opencv/opencv - REF 3.3.1 - SHA512 ee228953b621be022c203e3d60b06be524bd134ba6188c447216ee89e14dfddeac7d6aaf85c5a0b0008b010254e2aa711813bfdb691a77b0bdba33682c6ca68c + REF 3.4.0 + SHA512 aa7e475f356ffdaeb2ae9f7e9380c92cae58fabde9cd3b23c388f9190b8fde31ee70d16648042d0c43c03b2ff1f15e4be950be7851133ea0aa82cf6e42ba4710 HEAD_REF master ) @@ -21,8 +21,8 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libp vcpkg_from_github( OUT_SOURCE_PATH CONTRIB_SOURCE_PATH REPO opencv/opencv_contrib - REF 3.3.1 - SHA512 b5f35f68faab811a440b6af6b33c766dcdf4cc8547c0a4ed3a6a3da80ca8ae77618039d94bee6d249e96899765bdbb34c997bd7ee53d864c43427eff92f7ea34 + REF 3.4.0 + SHA512 53f6127304f314d3be834f79520d4bc8a75e14cad8c9c14a66a7a6b37908ded114d24e3a2c664d4ec2275903db08ac826f29433e810c6400f3adc2714a3c5be7 HEAD_REF master ) -- cgit v1.2.3 From 7cc7c28e209b6fe7b037c59c9fa83a763e337bb8 Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Sat, 23 Dec 2017 17:26:05 +0300 Subject: [vcpkg-hash] Replace certutil.exe with cmake built-in hash commands --- toolsrc/include/vcpkg/commands.h | 2 +- toolsrc/src/vcpkg/commands.cpp | 7 ++++--- toolsrc/src/vcpkg/commands.hash.cpp | 16 +++++++++------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index c82f504e0..31c750b38 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -119,7 +119,7 @@ namespace vcpkg::Commands namespace Hash { - void perform_and_exit(const VcpkgCmdArguments& args); + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } template diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index ccf6fa729..d9c0e54cd 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -41,7 +41,9 @@ namespace vcpkg::Commands {"import", &Import::perform_and_exit}, {"cache", &Cache::perform_and_exit}, {"portsdiff", &PortsDiff::perform_and_exit}, - {"autocomplete", &Autocomplete::perform_and_exit}}; + {"autocomplete", &Autocomplete::perform_and_exit}, + {"hash", &Hash::perform_and_exit}, + }; return t; } @@ -49,8 +51,7 @@ namespace vcpkg::Commands { static std::vector> t = { {"version", &Version::perform_and_exit}, - {"contact", &Contact::perform_and_exit}, - {"hash", &Hash::perform_and_exit}, + {"contact", &Contact::perform_and_exit} }; return t; } diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index a5940ea1e..1e3e5b23d 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -7,15 +7,17 @@ namespace vcpkg::Commands::Hash { - static void do_file_hash(fs::path const& path, std::string const& hash_type) + static void do_file_hash(fs::path const &cmake_exe_path, fs::path const& path, std::string const& hash_type) { - const auto cmd_line = Strings::format(R"(CertUtil.exe -hashfile "%s" %s)", path.u8string().c_str(), hash_type); + const std::string cmd_line = Strings::format( + R"("%s" -E %ssum %s)", cmake_exe_path.u8string(), Strings::ascii_to_lowercase(hash_type), path.u8string()); + const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); std::string const& output = ec_data.output; - const auto start = output.find_first_of("\r\n"); + const auto start = output.find_first_of(" "); Checks::check_exit( VCPKG_LINE_INFO, start != std::string::npos, "Unexpected output format from command: %s", cmd_line); @@ -23,7 +25,7 @@ namespace vcpkg::Commands::Hash Checks::check_exit( VCPKG_LINE_INFO, end != std::string::npos, "Unexpected output format from command: %s", cmd_line); - auto hash = output.substr(start, end - start); + auto hash = output.substr(0, start); Util::erase_remove_if(hash, isspace); System::println(hash); } @@ -37,17 +39,17 @@ namespace vcpkg::Commands::Hash nullptr, }; - void perform_and_exit(const VcpkgCmdArguments& args) + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { args.parse_arguments(COMMAND_STRUCTURE); if (args.command_arguments.size() == 1) { - do_file_hash(args.command_arguments[0], "SHA512"); + do_file_hash(paths.get_cmake_exe(), args.command_arguments[0], "SHA512"); } if (args.command_arguments.size() == 2) { - do_file_hash(args.command_arguments[0], args.command_arguments[1]); + do_file_hash(paths.get_cmake_exe(), args.command_arguments[0], args.command_arguments[1]); } Checks::exit_success(VCPKG_LINE_INFO); -- cgit v1.2.3 From e57bd44d28a56404eb8de42400c3a2e6dd9ee721 Mon Sep 17 00:00:00 2001 From: pravic Date: Sat, 23 Dec 2017 17:47:11 +0300 Subject: [sciter] Update to 4.0.8.5649 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 1c43b1720..478fde568 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.0.7 +Version: 4.0.8 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 55b99d296..21a754172 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,8 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION e5e612ae914233d2436240cdd7730fb739461f8e) -set(SCITER_SHA 8d4412e6e9047bbcc5fa0dae4b49844367f3b621b0edca2544f907dc651a1be7fddbedf5004ddbcb5b9bbe26abca0259c78c89febab6778806c4a62a50908bf2) +set(SCITER_REVISION aa2c7a1f9128c1a846e6fd6c6ab4f4172c4ccea5) +set(SCITER_SHA 5425e6edc10ce26ac78d1e41574584d8de29b5748ff82ac7a7a869094ebd83344ca5c2e99178193e135fa52b67d11fa0777162d9396dea57f607e30826293ef2) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From a5f206e4230c8ca738315f7bb751a90f05d4db98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Tassoux?= Date: Sat, 23 Dec 2017 15:50:33 +0100 Subject: [directxmesh] Update to the last version (dec2017) --- ports/directxmesh/CONTROL | 2 +- ports/directxmesh/portfile.cmake | 39 +++++++++++++++++++++++---------------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/ports/directxmesh/CONTROL b/ports/directxmesh/CONTROL index 13401f80d..0348b1939 100644 --- a/ports/directxmesh/CONTROL +++ b/ports/directxmesh/CONTROL @@ -1,3 +1,3 @@ Source: directxmesh -Version: oct2016 +Version: dec2017 Description: DirectXMesh geometry processing library \ No newline at end of file diff --git a/ports/directxmesh/portfile.cmake b/ports/directxmesh/portfile.cmake index 51840b68f..26fda2210 100644 --- a/ports/directxmesh/portfile.cmake +++ b/ports/directxmesh/portfile.cmake @@ -1,10 +1,16 @@ # 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} +# 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) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(STATUS "Warning: Dynamic building not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) @@ -14,14 +20,15 @@ if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") message(FATAL_ERROR "DirectXMesh only supports dynamic CRT linkage") endif() -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/DirectXMesh-oct2016) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/DirectXMesh/archive/oct2016.tar.gz" - FILENAME "DirectXMesh-oct2016.tar.gz" - SHA512 8aaf9749766afd23709ce6c6f8d74b008fe9f96789e4d97cb387633dad34b4132ef28dfe028d13c779ea366428d53076a881c0d63c4f0c2c74d552293c8d6bf1 +set(DIRECTXMESH_VERSION dec2017) +set(DIRECTXMESH_ARCHIVE_HASH 82468f1fcf0d51cf614921b1bd2dd06a05b120f84531d59429042951a39d1e978b5395cdf75269fe1767789ce487bfc6e544c54df4b1b9bec9adb1c853dc8497) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/DirectXMesh + REF ${DIRECTXMESH_VERSION} + SHA512 ${DIRECTXMESH_ARCHIVE_HASH} + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") SET(BUILD_ARCH "Win32") @@ -30,7 +37,7 @@ ELSE() ENDIF() vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/DirectXMesh_Desktop_2015.sln + PROJECT_PATH ${SOURCE_PATH}/DirectXMesh_Desktop_2017.sln PLATFORM ${BUILD_ARCH} ) @@ -40,15 +47,15 @@ file(INSTALL DESTINATION ${CURRENT_PACKAGES_DIR}/include ) file(INSTALL - ${SOURCE_PATH}/DirectXMesh/Bin/Desktop_2015/${BUILD_ARCH}/Debug/DirectXMesh.lib + ${SOURCE_PATH}/DirectXMesh/Bin/Desktop_2017/${BUILD_ARCH}/Debug/DirectXMesh.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(INSTALL - ${SOURCE_PATH}/DirectXMesh/Bin/Desktop_2015/${BUILD_ARCH}/Release/DirectXMesh.lib + ${SOURCE_PATH}/DirectXMesh/Bin/Desktop_2017/${BUILD_ARCH}/Release/DirectXMesh.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) set(TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools) file(INSTALL - ${SOURCE_PATH}/Meshconvert/Bin/Desktop_2015/${BUILD_ARCH}/Release/Meshconvert.exe + ${SOURCE_PATH}/Meshconvert/Bin/Desktop_2017/${BUILD_ARCH}/Release/Meshconvert.exe DESTINATION ${TOOL_PATH}) # Handle copyright -- cgit v1.2.3 From 63b7bcd8b94721cb6fcf90bd33d45812f6e0bf05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Tassoux?= Date: Sat, 23 Dec 2017 15:51:00 +0100 Subject: [directxtex] Update to the last version (dec2017) --- ports/directxtex/CONTROL | 2 +- ports/directxtex/portfile.cmake | 43 ++++++++++++++++++++++++----------------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/ports/directxtex/CONTROL b/ports/directxtex/CONTROL index b11daa8d4..57de4eea1 100644 --- a/ports/directxtex/CONTROL +++ b/ports/directxtex/CONTROL @@ -1,3 +1,3 @@ Source: directxtex -Version: dec2016 +Version: dec2017 Description: DirectXTex texture processing library \ No newline at end of file diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake index 392290c06..c1127fea7 100644 --- a/ports/directxtex/portfile.cmake +++ b/ports/directxtex/portfile.cmake @@ -1,10 +1,16 @@ # 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} +# 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) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(STATUS "Warning: Dynamic building not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) @@ -14,14 +20,15 @@ if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") message(FATAL_ERROR "DirectXTex only supports dynamic CRT linkage") endif() -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/directxtex-dec2016) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/DirectXTex/archive/dec2016.tar.gz" - FILENAME "directxtex-dec2016.tar.gz" - SHA512 87797340c40a98a7b11b6eb7da17d0b93bc01ba48deed50e99ce74e0e33387cac2ec18f2f14d0148c2a79f97ca98d6b2a228dad2f16010b6dcf03c0d24a79d20 +set(DIRECTXTEX_VERSION dec2017) +set(DIRECTXTEX_ARCHIVE_HASH f4154c820059893ce0a42a1224d14adc0f8b54f36aa7f687f29aba0358488da9eb83cbdbf682499c5b210e99607d74209595153d4ed86eb30c43b775c5d8a72f) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/DirectXTex + REF ${DIRECTXTEX_VERSION} + SHA512 ${DIRECTXTEX_ARCHIVE_HASH} + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") SET(BUILD_ARCH "Win32") @@ -30,7 +37,7 @@ ELSE() ENDIF() vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/DirectXTex_Desktop_2015.sln + PROJECT_PATH ${SOURCE_PATH}/DirectXTex_Desktop_2017.sln PLATFORM ${BUILD_ARCH} ) @@ -40,22 +47,22 @@ file(INSTALL DESTINATION ${CURRENT_PACKAGES_DIR}/include ) file(INSTALL - ${SOURCE_PATH}/DirectXTex/Bin/Desktop_2015/${BUILD_ARCH}/Debug/DirectXTex.lib + ${SOURCE_PATH}/DirectXTex/Bin/Desktop_2017/${BUILD_ARCH}/Debug/DirectXTex.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(INSTALL - ${SOURCE_PATH}/DirectXTex/Bin/Desktop_2015/${BUILD_ARCH}/Release/DirectXTex.lib + ${SOURCE_PATH}/DirectXTex/Bin/Desktop_2017/${BUILD_ARCH}/Release/DirectXTex.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) set(TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools) file(MAKE_DIRECTORY ${TOOL_PATH}) file(INSTALL - ${SOURCE_PATH}/Texdiag/Bin/Desktop_2015/${BUILD_ARCH}/Release/texdiag.exe + ${SOURCE_PATH}/Texdiag/Bin/Desktop_2017/${BUILD_ARCH}/Release/texdiag.exe DESTINATION ${TOOL_PATH}) file(INSTALL - ${SOURCE_PATH}/Texconv/Bin/Desktop_2015/${BUILD_ARCH}/Release/Texconv.exe + ${SOURCE_PATH}/Texconv/Bin/Desktop_2017/${BUILD_ARCH}/Release/Texconv.exe DESTINATION ${TOOL_PATH}) file(INSTALL - ${SOURCE_PATH}/Texassemble/Bin/Desktop_2015/${BUILD_ARCH}/Release/Texassemble.exe + ${SOURCE_PATH}/Texassemble/Bin/Desktop_2017/${BUILD_ARCH}/Release/Texassemble.exe DESTINATION ${TOOL_PATH}) # Handle copyright -- cgit v1.2.3 From 40245cde8cde51897d8f79971b2b8c917dab399d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Tassoux?= Date: Sat, 23 Dec 2017 15:51:17 +0100 Subject: [directxtk] Update to the last version (dec2017) --- ports/directxtk/CONTROL | 2 +- ports/directxtk/portfile.cmake | 38 ++++++++++++++++++++++++++------------ 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/ports/directxtk/CONTROL b/ports/directxtk/CONTROL index 97f97ecd9..4e565f799 100644 --- a/ports/directxtk/CONTROL +++ b/ports/directxtk/CONTROL @@ -1,3 +1,3 @@ Source: directxtk -Version: dec2016-1 +Version: dec2017 Description: A collection of helper classes for writing DirectX 11.x code in C++. diff --git a/ports/directxtk/portfile.cmake b/ports/directxtk/portfile.cmake index 5a751446c..31fa82011 100644 --- a/ports/directxtk/portfile.cmake +++ b/ports/directxtk/portfile.cmake @@ -1,20 +1,34 @@ +# 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) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(STATUS "Warning: Dynamic building not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) endif() if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "DirectXTk only supports dynamic CRT linkage") + message(FATAL_ERROR "DirectXTK only supports dynamic CRT linkage") endif() -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/DirectXTK-dec2016) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Microsoft/DirectXTK/archive/dec2016.tar.gz" - FILENAME "DirectXTK-dec2016.tar.gz" - SHA512 efb8a98d0872bf1835b274ba88615e88c4a58ab753c5ebef5a407c54d5f9a2197d1521f14651c60ea16c047918db6f54bf2ac58a6eb7330490b9bae619e8dad3 +set(DIRECTXTK_VERSION dec2017) +set(DIRECTXTK_ARCHIVE_HASH 30df95c17d6d61bdeb372d3ba112995ad76753e23ddaf7fb104d2384e3b26e22a383355d2a411fdfce866d4a98205e4ed039a8f34a9e1d9bc1ee90b4064bcd15) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/DirectXTK + REF ${DIRECTXTK_VERSION} + SHA512 ${DIRECTXTK_ARCHIVE_HASH} + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") SET(BUILD_ARCH "Win32") @@ -23,16 +37,16 @@ ELSE() ENDIF() vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/DirectXTK_Desktop_2015.sln + PROJECT_PATH ${SOURCE_PATH}/DirectXTK_Desktop_2017.sln PLATFORM ${BUILD_ARCH} ) file(INSTALL - ${SOURCE_PATH}/Bin/Desktop_2015/${BUILD_ARCH}/Release/DirectXTK.lib + ${SOURCE_PATH}/Bin/Desktop_2017/${BUILD_ARCH}/Release/DirectXTK.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(INSTALL - ${SOURCE_PATH}/Bin/Desktop_2015/${BUILD_ARCH}/Debug/DirectXTK.lib + ${SOURCE_PATH}/Bin/Desktop_2017/${BUILD_ARCH}/Debug/DirectXTK.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) set(DXTK_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/directxtk) @@ -43,7 +57,7 @@ file(INSTALL DESTINATION ${DXTK_TOOL_PATH}) file(INSTALL - ${SOURCE_PATH}/XWBTool/Bin/Desktop_2015/${BUILD_ARCH}/Release/XWBTool.exe + ${SOURCE_PATH}/XWBTool/Bin/Desktop_2017/${BUILD_ARCH}/Release/XWBTool.exe DESTINATION ${DXTK_TOOL_PATH}) file(INSTALL -- cgit v1.2.3 From 332414111dcc1eee316aa93c1c5e74699a521709 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 23 Dec 2017 07:29:12 -0800 Subject: Revert "clang-tidy fixes" This reverts commit 2d0a76370ead152896411d17aa19934235b93d1c. --- toolsrc/include/vcpkg/sourceparagraph.h | 3 +-- toolsrc/include/vcpkg/versiont.h | 2 +- toolsrc/src/vcpkg.cpp | 14 +++++----- toolsrc/src/vcpkg/base/chrono.cpp | 2 +- toolsrc/src/vcpkg/base/cofffilereader.cpp | 2 +- toolsrc/src/vcpkg/base/files.cpp | 4 +-- toolsrc/src/vcpkg/build.cpp | 11 ++++---- toolsrc/src/vcpkg/commands.cache.cpp | 2 +- toolsrc/src/vcpkg/commands.create.cpp | 2 +- toolsrc/src/vcpkg/commands.exportifw.cpp | 6 ++--- toolsrc/src/vcpkg/commands.integrate.cpp | 2 +- toolsrc/src/vcpkg/commands.list.cpp | 2 +- toolsrc/src/vcpkg/export.cpp | 4 +-- toolsrc/src/vcpkg/install.cpp | 2 +- toolsrc/src/vcpkg/metrics.cpp | 43 +++++++++++++++++-------------- toolsrc/src/vcpkg/remove.cpp | 4 +-- toolsrc/src/vcpkg/sourceparagraph.cpp | 6 ++--- toolsrc/src/vcpkg/statusparagraphs.cpp | 2 +- toolsrc/src/vcpkg/update.cpp | 3 +-- toolsrc/src/vcpkg/userconfig.cpp | 2 +- toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 +-- toolsrc/src/vcpkg/versiont.cpp | 2 +- 22 files changed, 63 insertions(+), 61 deletions(-) diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h index 58e76b7b1..dcbbc1c3b 100644 --- a/toolsrc/include/vcpkg/sourceparagraph.h +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -14,12 +14,11 @@ namespace vcpkg { struct Dependency { - static Dependency parse_dependency(std::string&& name, std::string&& qualifier); - Features depend; std::string qualifier; std::string name() const; + static Dependency parse_dependency(std::string name, std::string qualifier); }; std::vector filter_dependencies(const std::vector& deps, const Triplet& t); diff --git a/toolsrc/include/vcpkg/versiont.h b/toolsrc/include/vcpkg/versiont.h index 0ffb4d602..6d8332521 100644 --- a/toolsrc/include/vcpkg/versiont.h +++ b/toolsrc/include/vcpkg/versiont.h @@ -6,7 +6,7 @@ namespace vcpkg struct VersionT { VersionT(); - VersionT(std::string&& value); + VersionT(const std::string& value); const std::string& to_string() const; diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 08dd3fcf6..094ea1dc5 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -4,7 +4,7 @@ #pragma warning(push) #pragma warning(disable : 4768) -#include +#include #pragma warning(pop) #else #include @@ -21,8 +21,10 @@ #include #include #include +#include #include +#include #include #include @@ -47,7 +49,7 @@ static void inner(const VcpkgCmdArguments& args) Checks::exit_fail(VCPKG_LINE_INFO); } - static const auto FIND_COMMAND = [&](auto&& commands) { + static const auto find_command = [&](auto&& commands) { auto it = Util::find_if(commands, [&](auto&& commandc) { return Strings::case_insensitive_ascii_equals(commandc.name, args.command); }); @@ -60,7 +62,7 @@ static void inner(const VcpkgCmdArguments& args) return static_cast(nullptr); }; - if (const auto command_function = FIND_COMMAND(Commands::get_available_commands_type_c())) + if (const auto command_function = find_command(Commands::get_available_commands_type_c())) { return command_function->function(args); } @@ -134,7 +136,7 @@ static void inner(const VcpkgCmdArguments& args) } } - if (const auto command_function = FIND_COMMAND(Commands::get_available_commands_type_b())) + if (const auto command_function = find_command(Commands::get_available_commands_type_b())) { return command_function->function(args, paths); } @@ -159,7 +161,7 @@ static void inner(const VcpkgCmdArguments& args) Input::check_triplet(default_triplet, paths); - if (const auto command_function = FIND_COMMAND(Commands::get_available_commands_type_a())) + if (const auto command_function = find_command(Commands::get_available_commands_type_a())) { return command_function->function(args, paths, default_triplet); } @@ -212,7 +214,7 @@ static void load_config() static std::string trim_path_from_command_line(const std::string& full_command_line) { Checks::check_exit( - VCPKG_LINE_INFO, !full_command_line.empty(), "Internal failure - cannot have empty command line"); + VCPKG_LINE_INFO, full_command_line.size() > 0, "Internal failure - cannot have empty command line"); if (full_command_line[0] == '"') { diff --git a/toolsrc/src/vcpkg/base/chrono.cpp b/toolsrc/src/vcpkg/base/chrono.cpp index d83106c8b..00f8ba3f1 100644 --- a/toolsrc/src/vcpkg/base/chrono.cpp +++ b/toolsrc/src/vcpkg/base/chrono.cpp @@ -15,7 +15,7 @@ namespace vcpkg::Chrono using std::chrono::nanoseconds; using std::chrono::seconds; - const auto nanos_as_double = static_cast(nanos.count()); + const double nanos_as_double = static_cast(nanos.count()); if (duration_cast(nanos) > hours()) { diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp index 27426eb0a..1927e0b5e 100644 --- a/toolsrc/src/vcpkg/base/cofffilereader.cpp +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -223,7 +223,7 @@ namespace vcpkg::CoffFileReader static const char* FILE_START = "!\n"; static const size_t FILE_START_SIZE = 8; - fs.seekg(fstream::beg); + fs.seekg(fs.beg); char file_start[FILE_START_SIZE]; fs.read(file_start, FILE_START_SIZE); diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 7e4cfbf6a..8c9e137ed 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -18,9 +18,9 @@ namespace vcpkg::Files return std::make_error_code(std::errc::no_such_file_or_directory); } - file_stream.seekg(0, std::fstream::end); + file_stream.seekg(0, file_stream.end); auto length = file_stream.tellg(); - file_stream.seekg(0, std::fstream::beg); + file_stream.seekg(0, file_stream.beg); if (length > SIZE_MAX) { diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 16f7a400f..f43d8788e 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -60,8 +60,7 @@ namespace vcpkg::Build::Command spec.name()); const StatusParagraphs status_db = database_load_check(paths); - const Build::BuildPackageOptions build_package_options{ - Build::UseHeadVersion::NO, Build::AllowDownloads::YES, Build::CleanBuildtrees::NO}; + const Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; const std::unordered_set features_as_set(full_spec.features.begin(), full_spec.features.end()); @@ -193,7 +192,7 @@ namespace vcpkg::Build for (auto&& host : host_architectures) { - const auto it = Util::find_if(toolset.supported_architectures, [&](const ToolsetArchOption& opt) { + auto it = Util::find_if(toolset.supported_architectures, [&](const ToolsetArchOption& opt) { return host == opt.host_arch && target_arch == opt.target_arch; }); if (it != toolset.supported_architectures.end()) return it->name; @@ -295,7 +294,7 @@ namespace vcpkg::Build { features.append(feature + ";"); } - if (!features.empty()) + if (features.size() > 0) { features.pop_back(); } @@ -365,7 +364,7 @@ namespace vcpkg::Build if (config.build_package_options.clean_buildtrees == CleanBuildtrees::YES) { auto& fs = paths.get_filesystem(); - const auto buildtrees_dir = paths.buildtrees / spec.name(); + auto buildtrees_dir = paths.buildtrees / spec.name(); auto buildtree_files = fs.get_files_non_recursive(buildtrees_dir); for (auto&& file : buildtree_files) { @@ -501,7 +500,7 @@ namespace vcpkg::Build const std::vector lines = Strings::split(ec_data.output, "\n"); - PreBuildInfo pre_build_info{}; + PreBuildInfo pre_build_info; const auto e = lines.cend(); auto cur = std::find(lines.cbegin(), e, FLAG_GUID); diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index 85bf5fb4d..6fd123b7c 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -47,7 +47,7 @@ namespace vcpkg::Commands::Cache Checks::exit_success(VCPKG_LINE_INFO); } - if (args.command_arguments.empty()) + if (args.command_arguments.size() == 0) { for (const BinaryParagraph& binary_paragraph : binary_paragraphs) { diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index 25c34cf09..44f5f7928 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -34,7 +34,7 @@ namespace vcpkg::Commands::Create R"(Filename cannot contain invalid chars %s, but was %s)", Files::FILESYSTEM_INVALID_CHARACTERS, zip_file_name); - cmake_args.emplace_back("FILENAME", zip_file_name); + cmake_args.push_back({"FILENAME", zip_file_name}); } const std::string cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args); diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp index 96c0e2215..682267acb 100644 --- a/toolsrc/src/vcpkg/commands.exportifw.cpp +++ b/toolsrc/src/vcpkg/commands.exportifw.cpp @@ -139,14 +139,14 @@ namespace vcpkg::Export::IFW )###", create_release_date())); - for (const auto& unique_package : unique_packages) + for (auto package = unique_packages.begin(); package != unique_packages.end(); ++package) { - const ExportPlanAction& action = *(unique_package.second); + const ExportPlanAction& action = *(package->second); const BinaryParagraph& binary_paragraph = action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; package_xml_file_path = - raw_exported_dir_path / Strings::format("packages.%s", unique_package.first) / "meta" / "package.xml"; + raw_exported_dir_path / Strings::format("packages.%s", package->first) / "meta" / "package.xml"; package_xml_dir_path = package_xml_file_path.parent_path(); fs.create_directories(package_xml_dir_path, ec); Checks::check_exit(VCPKG_LINE_INFO, diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 0f647a40f..460e99b88 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -191,7 +191,7 @@ namespace vcpkg::Commands::Integrate const auto found = std::regex_search(*contents_data, match, RE); if (found) { - const auto ver = strtol(match[1].str().c_str(), nullptr, 10); + const int ver = atoi(match[1].str().c_str()); if (ver >= 1) should_install_system = false; } } diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index 66939a68a..960c57225 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -57,7 +57,7 @@ namespace vcpkg::Commands::List return lhs->package.displayname() < rhs->package.displayname(); }); - if (args.command_arguments.empty()) + if (args.command_arguments.size() == 0) { for (const StatusParagraph* status_paragraph : installed_packages) { diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 11e810339..e3221a12f 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -69,8 +69,8 @@ namespace vcpkg::Export { static constexpr std::array ORDER = {ExportPlanType::ALREADY_BUILT, ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT}; - static constexpr Build::BuildPackageOptions build_options = { - Build::UseHeadVersion::NO, Build::AllowDownloads::YES, Build::CleanBuildtrees::NO}; + static constexpr Build::BuildPackageOptions build_options = {Build::UseHeadVersion::NO, + Build::AllowDownloads::YES}; for (const ExportPlanType plan_type : ORDER) { diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 88c9d8882..dcc130be3 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -159,7 +159,7 @@ namespace vcpkg::Install auto package_files = Util::fmap(package_file_paths, [package_remove_char_count](const fs::path& path) { std::string as_string = path.generic_string(); as_string.erase(0, package_remove_char_count); - return as_string; + return std::move(as_string); }); return SortedVector(std::move(package_files)); diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 818a9066c..cdb21d260 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -152,7 +152,7 @@ namespace vcpkg::Metrics void track_property(const std::string& name, const std::string& value) { - if (!properties.empty()) properties.push_back(','); + if (properties.size() != 0) properties.push_back(','); properties.append(to_json_string(name)); properties.push_back(':'); properties.append(to_json_string(value)); @@ -160,7 +160,7 @@ namespace vcpkg::Metrics void track_metric(const std::string& name, double value) { - if (!measurements.empty()) measurements.push_back(','); + if (measurements.size() != 0) measurements.push_back(','); measurements.append(to_json_string(name)); measurements.push_back(':'); measurements.append(std::to_string(value)); @@ -302,7 +302,7 @@ namespace vcpkg::Metrics { if (MAXDWORD <= payload.size()) abort(); std::wstring hdrs = L"Content-Type: application/json\r\n"; - auto& p = const_cast(payload); + std::string& p = const_cast(payload); results = WinHttpSendRequest(request, hdrs.c_str(), static_cast(hdrs.size()), @@ -383,27 +383,30 @@ namespace vcpkg::Metrics auto& fs = Files::get_real_filesystem(); - const fs::path exe_path = [&fs]() -> fs::path { - auto vcpkgdir = System::get_exe_path_of_current_process().parent_path(); - auto path = vcpkgdir / "vcpkgmetricsuploader.exe"; - if (fs.exists(path)) return path; - - path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe"; - if (fs.exists(path)) return path; - - return ""; - }(); - - std::error_code ec; - fs.create_directories(temp_folder_path, ec); - if (ec) return; - fs.copy_file(exe_path, temp_folder_path_exe, fs::copy_options::skip_existing, ec); - if (ec) return; + if (true) + { + const fs::path exe_path = [&fs]() -> fs::path { + auto vcpkgdir = System::get_exe_path_of_current_process().parent_path(); + auto path = vcpkgdir / "vcpkgmetricsuploader.exe"; + if (fs.exists(path)) return path; + + path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe"; + if (fs.exists(path)) return path; + + return ""; + }(); + + std::error_code ec; + fs.create_directories(temp_folder_path, ec); + if (ec) return; + fs.copy_file(exe_path, temp_folder_path_exe, fs::copy_options::skip_existing, ec); + if (ec) return; + } const fs::path vcpkg_metrics_txt_path = temp_folder_path / ("vcpkg" + generate_random_UUID() + ".txt"); fs.write_contents(vcpkg_metrics_txt_path, payload); - const std::string cmd_line = Strings::format(R"(start "vcpkgmetricsuploader.exe" "%s" "%s")", + const std::string cmd_line = Strings::format("start \"vcpkgmetricsuploader.exe\" \"%s\" \"%s\"", temp_folder_path_exe.u8string(), vcpkg_metrics_txt_path.u8string()); System::cmd_execute_clean(cmd_line); diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index ed2c02b9f..4079d60c1 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -202,7 +202,7 @@ namespace vcpkg::Remove std::vector specs; if (Util::Sets::contains(options.switches, OPTION_OUTDATED)) { - if (!args.command_arguments.empty()) + if (args.command_arguments.size() != 0) { System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); Checks::exit_fail(VCPKG_LINE_INFO); @@ -221,7 +221,7 @@ namespace vcpkg::Remove } else { - if (args.command_arguments.empty()) + if (args.command_arguments.size() < 1) { System::println(System::Color::error, "Error: 'remove' accepts either libraries or '--outdated'"); Checks::exit_fail(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index 4da0cfcfc..2a9480538 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -158,7 +158,7 @@ namespace vcpkg return std::move(control_file); } - Dependency Dependency::parse_dependency(std::string&& name, std::string&& qualifier) + Dependency Dependency::parse_dependency(std::string name, std::string qualifier) { Dependency dep; dep.qualifier = qualifier; @@ -182,7 +182,7 @@ namespace vcpkg { return Util::fmap(depends, [&](const std::string& depend_string) -> Dependency { auto pos = depend_string.find(' '); - if (pos == std::string::npos) return Dependency::parse_dependency(std::string{depend_string}, ""); + if (pos == std::string::npos) return Dependency::parse_dependency(depend_string, ""); // expect of the form "\w+ \[\w+\]" Dependency dep; @@ -190,7 +190,7 @@ namespace vcpkg if (depend_string.c_str()[pos + 1] != '(' || depend_string[depend_string.size() - 1] != ')') { // Error, but for now just slurp the entire string. - return Dependency::parse_dependency(std::string{depend_string}, ""); + return Dependency::parse_dependency(depend_string, ""); } dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3); return dep; diff --git a/toolsrc/src/vcpkg/statusparagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp index d516b6284..d4afc0427 100644 --- a/toolsrc/src/vcpkg/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg/statusparagraphs.cpp @@ -47,7 +47,7 @@ namespace vcpkg StatusParagraphs::const_iterator StatusParagraphs::find_installed(const std::string& name, const Triplet& triplet) const { - const auto it = find(name, triplet); + const const_iterator it = find(name, triplet); if (it != end() && (*it)->want == Want::INSTALL && (*it)->state == InstallState::INSTALLED) { return it; diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index 9f89da13c..d6c5614ed 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -35,8 +35,7 @@ namespace vcpkg::Update auto&& installed_version = pgh->package.version; if (installed_version != port_version) { - output.push_back( - {pgh->package.spec, VersionDiff(std::string{installed_version}, std::string{port_version})}); + output.push_back({pgh->package.spec, VersionDiff(installed_version, port_version)}); } } else diff --git a/toolsrc/src/vcpkg/userconfig.cpp b/toolsrc/src/vcpkg/userconfig.cpp index 45ed01ec6..906594691 100644 --- a/toolsrc/src/vcpkg/userconfig.cpp +++ b/toolsrc/src/vcpkg/userconfig.cpp @@ -41,7 +41,7 @@ namespace vcpkg const auto& pghs = *p_pghs; std::unordered_map keys; - if (!pghs.empty()) keys = pghs[0]; + if (pghs.size() > 0) keys = pghs[0]; for (size_t x = 1; x < pghs.size(); ++x) { diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index cbf1e97e1..e64a681e2 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -50,14 +50,14 @@ namespace vcpkg const std::string& version_check_arguments, const std::array& expected_version) { - const auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { + auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { const std::string cmd = Strings::format(R"("%s" %s)", p.u8string(), version_check_arguments); return exists_and_has_equal_or_greater_version(cmd, expected_version); }); if (it != candidate_paths.cend()) { - return *it; + return std::move(*it); } return nullopt; diff --git a/toolsrc/src/vcpkg/versiont.cpp b/toolsrc/src/vcpkg/versiont.cpp index cff49d9e8..91f7e23ef 100644 --- a/toolsrc/src/vcpkg/versiont.cpp +++ b/toolsrc/src/vcpkg/versiont.cpp @@ -6,7 +6,7 @@ namespace vcpkg { VersionT::VersionT() : value("0.0.0") {} - VersionT::VersionT(std::string&& value) : value(std::move(value)) {} + VersionT::VersionT(const std::string& value) : value(value) {} const std::string& VersionT::to_string() const { return value; } bool operator==(const VersionT& left, const VersionT& right) { return left.to_string() == right.to_string(); } bool operator!=(const VersionT& left, const VersionT& right) { return left.to_string() != right.to_string(); } -- cgit v1.2.3 From 44a1023f047bb518659e326c82650c7d4bea0d0b Mon Sep 17 00:00:00 2001 From: Force Charlie Date: Sun, 24 Dec 2017 00:14:20 +0800 Subject: [libgit2] Initial port. --- ports/libgit2/CONTROL | 3 +++ ports/libgit2/portfile.cmake | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 ports/libgit2/CONTROL create mode 100644 ports/libgit2/portfile.cmake diff --git a/ports/libgit2/CONTROL b/ports/libgit2/CONTROL new file mode 100644 index 000000000..779bf10c9 --- /dev/null +++ b/ports/libgit2/CONTROL @@ -0,0 +1,3 @@ +Source: libgit2 +Version: 0.26.0 +Description: Git linkable library diff --git a/ports/libgit2/portfile.cmake b/ports/libgit2/portfile.cmake new file mode 100644 index 000000000..e624e37eb --- /dev/null +++ b/ports/libgit2/portfile.cmake @@ -0,0 +1,30 @@ +# libgit2 uses winapi functions not available in WindowsStore +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Error: UWP builds are not supported.") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libgit2/libgit2 + REF v0.26.0 + SHA512 b6e51f2216c7c23f352572b780ea1325a25a517396709f036bb573295c2bd02aa505ba616846ac7e07863e99e640e7d47fefc5727478a257b283da99060ee47c + HEAD_REF master) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_CLAR=OFF + OPTIONS_DEBUG + -DBUILD_CLAR=OFF +) + + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgit2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libgit2/COPYING ${CURRENT_PACKAGES_DIR}/share/libgit2/copyright) -- cgit v1.2.3 From 538e61ab91af2fb1072ab9c7164e91cb592713ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Tassoux?= Date: Sat, 23 Dec 2017 18:07:20 +0100 Subject: [bullet3] Update from 2.86.1 to 2.87 --- ports/bullet3/CONTROL | 2 +- ports/bullet3/portfile.cmake | 32 ++++++++++++++++++++++---------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/ports/bullet3/CONTROL b/ports/bullet3/CONTROL index 92b55db2e..36f8b1838 100644 --- a/ports/bullet3/CONTROL +++ b/ports/bullet3/CONTROL @@ -1,3 +1,3 @@ Source: bullet3 -Version: 2.86.1-1 +Version: 2.87 Description: Bullet Physics is a professional collision detection, rigid body, and soft body dynamics library diff --git a/ports/bullet3/portfile.cmake b/ports/bullet3/portfile.cmake index 17d6f8ea7..f86f323f3 100644 --- a/ports/bullet3/portfile.cmake +++ b/ports/bullet3/portfile.cmake @@ -1,11 +1,23 @@ +# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bullet3-2.86.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/bulletphysics/bullet3/archive/2.86.1.zip" - FILENAME "bullet3-2.86.1.zip" - SHA512 96c67bed63db4b7d46196cebda57b80543ea37bd19f013adcfe19ee6c2c3319ed007bcd1ebbe345d8c75b7e80588f4a7d85cb6a07e1a5eea759d97ce4d94f972 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO bulletphysics/bullet3 + REF 2.87 + SHA512 649e470223295666eda6f7ff59d03097637c2645b5cd951977060ae14b89f56948ce03e437e83c986d26876f187d7ee34e790bc3882d5d66da9af89a4ab81c21 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -22,14 +34,14 @@ vcpkg_configure_cmake( -DINSTALL_LIBS=ON ) -vcpkg_build_cmake() vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bullet3) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/bullet3/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/bullet3/copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bullet/BulletInverseDynamics/details) vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bullet3 RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From 75f43baedf90fce8c50f4c486df2d5831459b715 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sun, 24 Dec 2017 23:46:16 +0900 Subject: Update librealsense v2.8.3 Update librealsense v2.8.3. --- ports/realsense2/CONTROL | 2 +- ports/realsense2/crt-linkage-restriction.patch | 12 +++++++----- ports/realsense2/portfile.cmake | 16 ++++++++-------- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index 9153402c7..8a3efdee0 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,3 +1,3 @@ Source: realsense2 -Version: 2.8.2 +Version: 2.8.3 Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). diff --git a/ports/realsense2/crt-linkage-restriction.patch b/ports/realsense2/crt-linkage-restriction.patch index ae4acc834..c36753f2a 100644 --- a/ports/realsense2/crt-linkage-restriction.patch +++ b/ports/realsense2/crt-linkage-restriction.patch @@ -1,8 +1,10 @@ ---- a/CMakeLists.txt 2017-11-07 14:30:02.270145100 +0800 -+++ b/CMakeLists.txt 2017-11-07 14:26:42.306208800 +0800 -@@ -402,16 +402,6 @@ - source_group("Header Files\\Processing Blocks" FILES - src/colorizer.h +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a59e2513..3b08f490 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -420,16 +420,6 @@ if(WIN32) + src/proc/temporal-filter.h + src/proc/syncer-processing-block.h ) - - foreach(flag_var diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index 609b1c660..ea8fff99d 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense - REF v2.8.2 - SHA512 a2622ff241e939fad74f6d0224b5f9b505e971935bb8f27dc10159a5853bc5d55870c312c0f43014c8c7ec5a1c824e659ee9ee9a574b2d7c9b8e484c1a4918a1 + REF v2.8.3 + SHA512 9be27109da0247cf6669f01b3f0f945073f7851897da553915716d979c50f6228e771ca5a63955707f618d0db1fc58ba52f78dece6d904b6671dee56ba70d48f HEAD_REF master ) @@ -19,12 +19,12 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DENFORCE_METADATA=on - -DBUILD_EXAMPLES=off - -DBUILD_GRAPHICAL_EXAMPLES=off - -DBUILD_PYTHON_BINDINGS=off - -DBUILD_UNIT_TESTS=off - -DBUILD_WITH_OPENMP=off # keep OpenMP off until librealsense issue #744 is patched + -DENFORCE_METADATA=ON + -DBUILD_EXAMPLES=OFF + -DBUILD_GRAPHICAL_EXAMPLES=OFF + -DBUILD_PYTHON_BINDINGS=OFF + -DBUILD_UNIT_TESTS=OFF + -DBUILD_WITH_OPENMP=OFF # keep OpenMP off until librealsense issue #744 is patched -DBUILD_SHARED_LIBS=${BUILD_SHARED} OPTIONS_DEBUG "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" -- cgit v1.2.3 From c8cddb849a658156fbeeee42044f670da5c648a1 Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Tue, 26 Dec 2017 12:43:00 +0800 Subject: [libconfig] update to 1.7.1 --- ports/libconfig/CMakeLists.txt | 9 +- ports/libconfig/CONTROL | 3 +- .../libconfig/fix-scanner-header-msvc-patch.patch | 108 -- .../libconfig/fix-scanner-source-msvc-patch.patch | 1122 -------------------- ports/libconfig/portfile.cmake | 12 +- ports/libconfig/scandir.c | 112 -- 6 files changed, 8 insertions(+), 1358 deletions(-) delete mode 100644 ports/libconfig/fix-scanner-header-msvc-patch.patch delete mode 100644 ports/libconfig/fix-scanner-source-msvc-patch.patch delete mode 100644 ports/libconfig/scandir.c diff --git a/ports/libconfig/CMakeLists.txt b/ports/libconfig/CMakeLists.txt index 8762917ef..fe70cb9dd 100644 --- a/ports/libconfig/CMakeLists.txt +++ b/ports/libconfig/CMakeLists.txt @@ -3,26 +3,26 @@ project(libconfig C CXX) if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) - add_definitions(-Dscandir=libconfig_scandir) endif() set(C_SOURCES lib/grammar.c lib/libconfig.c lib/scanctx.c - lib/win32/scandir.c lib/scanner.c lib/strbuf.c + lib/strvec.c + lib/util.c + lib/wincompat.c ) set(CPP_SOURCES lib/libconfigcpp.cc ) -find_path(DIRENT_H dirent.h) find_path(STDINT_H stdint.h) -include_directories(lib ${DIRENT_H} ${STDINT_H}) +include_directories(lib ${STDINT_H}) add_definitions(-DYY_NO_UNISTD_H -DYY_USE_CONST) @@ -37,6 +37,7 @@ else() target_compile_definitions(libconfig++ PUBLIC -DLIBCONFIGXX_STATIC) endif() +target_link_libraries(libconfig shlwapi) target_link_libraries(libconfig++ PRIVATE libconfig) install( diff --git a/ports/libconfig/CONTROL b/ports/libconfig/CONTROL index cd0469369..d8d00ddd4 100644 --- a/ports/libconfig/CONTROL +++ b/ports/libconfig/CONTROL @@ -1,4 +1,3 @@ Source: libconfig -Version: 1.6.0-1 +Version: 1.7.1 Description: C/C++ library for processing configuration files -Build-Depends: dirent diff --git a/ports/libconfig/fix-scanner-header-msvc-patch.patch b/ports/libconfig/fix-scanner-header-msvc-patch.patch deleted file mode 100644 index c2e13c2ff..000000000 --- a/ports/libconfig/fix-scanner-header-msvc-patch.patch +++ /dev/null @@ -1,108 +0,0 @@ -diff --git a/lib/scanner.h b/lib/scanner.h -index cdca3bb..1fc0509 100644 ---- a/lib/scanner.h -+++ b/lib/scanner.h -@@ -13,7 +13,7 @@ - #define FLEX_SCANNER - #define YY_FLEX_MAJOR_VERSION 2 - #define YY_FLEX_MINOR_VERSION 5 --#define YY_FLEX_SUBMINOR_VERSION 39 -+#define YY_FLEX_SUBMINOR_VERSION 35 - #if YY_FLEX_SUBMINOR_VERSION > 0 - #define FLEX_BETA - #endif -@@ -132,7 +132,15 @@ typedef void* yyscan_t; - - /* Size of default input buffer. */ - #ifndef YY_BUF_SIZE -+#ifdef __ia64__ -+/* On IA-64, the buffer size is 16k, not 8k. -+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. -+ * Ditto for the __ia64__ case accordingly. -+ */ -+#define YY_BUF_SIZE 32768 -+#else - #define YY_BUF_SIZE 16384 -+#endif /* __ia64__ */ - #endif - - #ifndef YY_TYPEDEF_YY_BUFFER_STATE -@@ -162,7 +170,7 @@ struct yy_buffer_state - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ -- yy_size_t yy_n_chars; -+ int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to -@@ -206,13 +214,13 @@ void libconfig_yypop_buffer_state (yyscan_t yyscanner ); - - YY_BUFFER_STATE libconfig_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); - YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); --YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); -+YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - - void *libconfig_yyalloc (yy_size_t ,yyscan_t yyscanner ); - void *libconfig_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); - void libconfig_yyfree (void * ,yyscan_t yyscanner ); - --#define libconfig_yywrap(yyscanner) 1 -+#define libconfig_yywrap(n) 1 - #define YY_SKIP_YYWRAP - - #define yytext_ptr yytext_r -@@ -221,7 +229,8 @@ void libconfig_yyfree (void * ,yyscan_t yyscanner ); - #define INITIAL 0 - #define COMMENT 1 - #define STRING 2 --#define INCLUDE 3 -+#define INCLUDE_F 3 -+#define INCLUDE_D 4 - - #endif - -@@ -260,7 +269,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner ); - - void libconfig_yyset_out (FILE * out_str ,yyscan_t yyscanner ); - --yy_size_t libconfig_yyget_leng (yyscan_t yyscanner ); -+int libconfig_yyget_leng (yyscan_t yyscanner ); - - char *libconfig_yyget_text (yyscan_t yyscanner ); - -@@ -268,10 +277,6 @@ int libconfig_yyget_lineno (yyscan_t yyscanner ); - - void libconfig_yyset_lineno (int line_number ,yyscan_t yyscanner ); - --int libconfig_yyget_column (yyscan_t yyscanner ); -- --void libconfig_yyset_column (int column_no ,yyscan_t yyscanner ); -- - YYSTYPE * libconfig_yyget_lval (yyscan_t yyscanner ); - - void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); -@@ -302,7 +307,12 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); - - /* Amount of stuff to slurp up with each read. */ - #ifndef YY_READ_BUF_SIZE -+#ifdef __ia64__ -+/* On IA-64, the buffer size is 16k, not 8k */ -+#define YY_READ_BUF_SIZE 16384 -+#else - #define YY_READ_BUF_SIZE 8192 -+#endif /* __ia64__ */ - #endif - - /* Number of entries by which start-condition stack grows. */ -@@ -337,8 +347,8 @@ extern int libconfig_yylex \ - #undef YY_DECL - #endif - --#line 207 "scanner.l" -+#line 315 "scanner.l" - --#line 343 "scanner.h" -+#line 353 "scanner.h" - #undef libconfig_yyIN_HEADER - #endif /* libconfig_yyHEADER_H */ diff --git a/ports/libconfig/fix-scanner-source-msvc-patch.patch b/ports/libconfig/fix-scanner-source-msvc-patch.patch deleted file mode 100644 index e8f24e638..000000000 --- a/ports/libconfig/fix-scanner-source-msvc-patch.patch +++ /dev/null @@ -1,1122 +0,0 @@ -diff --git a/lib/scanner.c b/lib/scanner.c -index dc07eb0..efb6730 100644 ---- a/lib/scanner.c -+++ b/lib/scanner.c -@@ -9,7 +9,7 @@ - #define FLEX_SCANNER - #define YY_FLEX_MAJOR_VERSION 2 - #define YY_FLEX_MINOR_VERSION 5 --#define YY_FLEX_SUBMINOR_VERSION 39 -+#define YY_FLEX_SUBMINOR_VERSION 35 - #if YY_FLEX_SUBMINOR_VERSION > 0 - #define FLEX_BETA - #endif -@@ -159,7 +159,15 @@ typedef void* yyscan_t; - - /* Size of default input buffer. */ - #ifndef YY_BUF_SIZE -+#ifdef __ia64__ -+/* On IA-64, the buffer size is 16k, not 8k. -+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. -+ * Ditto for the __ia64__ case accordingly. -+ */ -+#define YY_BUF_SIZE 32768 -+#else - #define YY_BUF_SIZE 16384 -+#endif /* __ia64__ */ - #endif - - /* The state buf must be large enough to hold one state per character in the main buffer. -@@ -171,11 +179,6 @@ typedef void* yyscan_t; - typedef struct yy_buffer_state *YY_BUFFER_STATE; - #endif - --#ifndef YY_TYPEDEF_YY_SIZE_T --#define YY_TYPEDEF_YY_SIZE_T --typedef size_t yy_size_t; --#endif -- - #define EOB_ACT_CONTINUE_SCAN 0 - #define EOB_ACT_END_OF_FILE 1 - #define EOB_ACT_LAST_MATCH 2 -@@ -194,13 +197,6 @@ typedef size_t yy_size_t; - if ( yytext[yyl] == '\n' )\ - --yylineno;\ - }while(0) -- #define YY_LINENO_REWIND_TO(dst) \ -- do {\ -- const char *p;\ -- for ( p = yy_cp-1; p >= (dst); --p)\ -- if ( *p == '\n' )\ -- --yylineno;\ -- }while(0) - - /* Return all but the first "n" matched characters back to the input stream. */ - #define yyless(n) \ -@@ -218,6 +214,11 @@ typedef size_t yy_size_t; - - #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -+#ifndef YY_TYPEDEF_YY_SIZE_T -+#define YY_TYPEDEF_YY_SIZE_T -+typedef size_t yy_size_t; -+#endif -+ - #ifndef YY_STRUCT_YY_BUFFER_STATE - #define YY_STRUCT_YY_BUFFER_STATE - struct yy_buffer_state -@@ -235,7 +236,7 @@ struct yy_buffer_state - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ -- yy_size_t yy_n_chars; -+ int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to -@@ -314,7 +315,7 @@ static void libconfig_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yys - - YY_BUFFER_STATE libconfig_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); - YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); --YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); -+YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - - void *libconfig_yyalloc (yy_size_t ,yyscan_t yyscanner ); - void *libconfig_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -@@ -344,7 +345,7 @@ void libconfig_yyfree (void * ,yyscan_t yyscanner ); - - #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - --#define libconfig_yywrap(yyscanner) 1 -+#define libconfig_yywrap(n) 1 - #define YY_SKIP_YYWRAP - - typedef unsigned char YY_CHAR; -@@ -368,8 +369,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - --#define YY_NUM_RULES 42 --#define YY_END_OF_BUFFER 43 -+#define YY_NUM_RULES 47 -+#define YY_END_OF_BUFFER 48 - /* This struct is not used in this scanner, - but its presence is necessary. */ - struct yy_trans_info -@@ -377,20 +378,21 @@ struct yy_trans_info - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; --static yyconst flex_int16_t yy_accept[103] = -+static yyconst flex_int16_t yy_accept[117] = - { 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 43, 41, -- 22, 21, 21, 5, 41, 37, 38, 29, 41, 24, -- 30, 41, 31, 31, 23, 39, 29, 29, 35, 36, -- 25, 26, 22, 41, 3, 4, 3, 6, 15, 14, -- 17, 20, 42, 22, 0, 40, 29, 30, 31, 30, -- 0, 1, 0, 30, 0, 32, 0, 29, 29, 22, -- 0, 0, 2, 6, 12, 0, 11, 10, 7, 8, -- 9, 17, 19, 18, 0, 30, 30, 0, 0, 30, -- 32, 33, 29, 29, 0, 0, 0, 30, 34, 29, -- 27, 0, 13, 34, 28, 0, 0, 0, 0, 0, -- -- 16, 0 -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 48, 46, 27, 26, 26, 5, 46, 42, 43, 34, -+ 46, 29, 35, 46, 36, 36, 28, 44, 34, 34, -+ 40, 41, 30, 31, 27, 46, 3, 4, 3, 6, -+ 15, 14, 17, 20, 47, 22, 25, 47, 27, 0, -+ 45, 34, 35, 36, 35, 0, 1, 0, 35, 0, -+ 37, 0, 34, 34, 27, 0, 0, 2, 6, 12, -+ 0, 11, 10, 7, 8, 9, 17, 19, 18, 22, -+ 24, 23, 0, 35, 35, 0, 0, 35, 37, 38, -+ 34, 34, 0, 0, 0, 35, 39, 34, 32, 0, -+ -+ 13, 39, 33, 0, 0, 0, 0, 0, 0, 16, -+ 0, 0, 0, 0, 21, 0 - } ; - - static yyconst flex_int32_t yy_ec[256] = -@@ -434,110 +436,116 @@ static yyconst flex_int32_t yy_meta[49] = - 3, 3, 3, 3, 3, 3, 1, 1 - } ; - --static yyconst flex_int16_t yy_base[113] = -+static yyconst flex_int16_t yy_base[129] = - { 0, -- 0, 47, 47, 48, 46, 47, 48, 49, 203, 204, -- 200, 204, 204, 204, 198, 204, 204, 0, 45, 204, -- 47, 50, 60, 74, 204, 204, 178, 28, 204, 204, -- 204, 204, 64, 158, 204, 204, 183, 0, 204, 63, -- 0, 204, 83, 195, 193, 204, 0, 88, 102, 98, -- 62, 204, 190, 104, 119, 162, 0, 67, 65, 121, -- 127, 124, 204, 0, 204, 0, 204, 204, 204, 204, -- 204, 0, 204, 204, 108, 117, 122, 134, 132, 136, -- 204, 139, 136, 116, 126, 0, 140, 142, 135, 130, -- 0, 102, 204, 204, 0, 85, 72, 63, 98, 158, -- -- 204, 204, 169, 173, 177, 181, 183, 187, 191, 89, -- 66, 63 -+ 0, 47, 47, 48, 46, 47, 48, 49, 50, 53, -+ 223, 224, 220, 224, 224, 224, 218, 224, 224, 0, -+ 46, 224, 49, 54, 62, 76, 224, 224, 198, 33, -+ 224, 224, 224, 224, 70, 178, 224, 224, 203, 0, -+ 224, 64, 0, 224, 61, 0, 224, 65, 215, 213, -+ 224, 0, 89, 100, 94, 109, 224, 212, 113, 125, -+ 187, 0, 70, 88, 100, 172, 169, 224, 0, 224, -+ 0, 224, 224, 224, 224, 224, 0, 224, 224, 0, -+ 224, 224, 58, 115, 127, 137, 129, 139, 224, 184, -+ 181, 123, 172, 0, 141, 143, 181, 125, 0, 165, -+ -+ 224, 224, 0, 160, 167, 165, 133, 159, 163, 224, -+ 156, 149, 166, 161, 224, 224, 169, 173, 177, 181, -+ 185, 187, 191, 195, 199, 136, 119, 81 - } ; - --static yyconst flex_int16_t yy_def[113] = -+static yyconst flex_int16_t yy_def[129] = - { 0, -- 102, 1, 103, 103, 104, 104, 105, 105, 102, 102, -- 102, 102, 102, 102, 106, 102, 102, 107, 102, 102, -- 102, 102, 102, 102, 102, 102, 107, 107, 102, 102, -- 102, 102, 102, 102, 102, 102, 102, 108, 102, 102, -- 109, 102, 102, 102, 106, 102, 107, 102, 102, 102, -- 102, 102, 106, 102, 102, 102, 110, 107, 107, 102, -- 102, 102, 102, 108, 102, 111, 102, 102, 102, 102, -- 102, 109, 102, 102, 102, 102, 102, 102, 102, 102, -- 102, 110, 107, 107, 102, 112, 102, 102, 102, 107, -- 107, 102, 102, 102, 107, 102, 102, 102, 102, 102, -- -- 102, 0, 102, 102, 102, 102, 102, 102, 102, 102, -- 102, 102 -+ 116, 1, 117, 117, 118, 118, 119, 119, 120, 120, -+ 116, 116, 116, 116, 116, 116, 121, 116, 116, 122, -+ 116, 116, 116, 116, 116, 116, 116, 116, 122, 122, -+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 123, -+ 116, 116, 124, 116, 116, 125, 116, 116, 116, 121, -+ 116, 122, 116, 116, 116, 116, 116, 121, 116, 116, -+ 116, 126, 122, 122, 116, 116, 116, 116, 123, 116, -+ 127, 116, 116, 116, 116, 116, 124, 116, 116, 125, -+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 126, -+ 122, 122, 116, 128, 116, 116, 116, 122, 122, 116, -+ -+ 116, 116, 122, 116, 116, 116, 116, 116, 116, 116, -+ 116, 116, 116, 116, 116, 0, 116, 116, 116, 116, -+ 116, 116, 116, 116, 116, 116, 116, 116 - } ; - --static yyconst flex_int16_t yy_nxt[253] = -+static yyconst flex_int16_t yy_nxt[273] = - { 0, -- 10, 11, 12, 13, 13, 14, 15, 16, 17, 18, -- 19, 20, 19, 21, 22, 23, 24, 25, 26, 25, -- 10, 18, 18, 18, 27, 18, 18, 18, 18, 28, -- 18, 18, 29, 10, 30, 10, 18, 18, 18, 27, -- 18, 18, 18, 18, 28, 18, 31, 32, 33, 36, -- 36, 39, 39, 42, 42, 59, 37, 37, 48, 52, -- 49, 49, 50, 50, 53, 60, 93, 34, 65, 86, -- 51, 59, 75, 54, 75, 49, 49, 76, 76, 40, -- 40, 43, 43, 55, 61, 51, 56, 54, 73, 49, -- 49, 57, 82, 83, 66, 84, 67, 55, 55, 100, -- -- 56, 99, 68, 50, 50, 69, 70, 71, 83, 98, -- 84, 51, 55, 50, 50, 54, 74, 49, 49, 77, -- 77, 51, 60, 76, 76, 55, 51, 78, 56, 79, -- 97, 79, 76, 76, 80, 80, 51, 77, 77, 91, -- 55, 61, 78, 96, 87, 78, 87, 80, 80, 88, -- 88, 80, 80, 95, 91, 88, 88, 88, 88, 100, -- 78, 94, 92, 101, 90, 89, 85, 62, 95, 35, -- 35, 35, 35, 38, 38, 38, 38, 41, 41, 41, -- 41, 45, 45, 45, 45, 47, 47, 64, 81, 64, -- 64, 72, 46, 72, 72, 46, 44, 63, 62, 58, -- -- 46, 44, 102, 9, 102, 102, 102, 102, 102, 102, -- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, -- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, -- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, -- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, -- 102, 102 -+ 12, 13, 14, 15, 15, 16, 17, 18, 19, 20, -+ 21, 22, 21, 23, 24, 25, 26, 27, 28, 27, -+ 12, 20, 20, 20, 29, 20, 20, 20, 20, 30, -+ 20, 20, 31, 12, 32, 12, 20, 20, 20, 29, -+ 20, 20, 20, 20, 30, 20, 33, 34, 35, 38, -+ 38, 41, 41, 44, 44, 47, 39, 39, 47, 53, -+ 64, 54, 54, 57, 55, 55, 78, 36, 58, 70, -+ 81, 65, 56, 84, 84, 59, 64, 54, 54, 42, -+ 42, 45, 45, 48, 101, 60, 48, 56, 61, 59, -+ 66, 54, 54, 62, 79, 71, 91, 72, 82, 60, -+ -+ 60, 65, 61, 73, 55, 55, 74, 75, 76, 55, -+ 55, 91, 56, 59, 60, 54, 54, 56, 92, 83, -+ 66, 83, 94, 60, 84, 84, 61, 56, 85, 85, -+ 84, 84, 56, 92, 108, 87, 86, 87, 60, 90, -+ 88, 88, 85, 85, 88, 88, 99, 95, 103, 95, -+ 86, 86, 96, 96, 88, 88, 96, 96, 96, 96, -+ 108, 99, 114, 103, 110, 86, 115, 114, 109, 37, -+ 37, 37, 37, 40, 40, 40, 40, 43, 43, 43, -+ 43, 46, 46, 46, 46, 50, 50, 50, 50, 52, -+ 52, 69, 113, 69, 69, 77, 112, 77, 77, 80, -+ -+ 111, 80, 80, 107, 106, 105, 104, 102, 100, 98, -+ 97, 93, 67, 89, 51, 51, 49, 68, 67, 63, -+ 51, 49, 116, 11, 116, 116, 116, 116, 116, 116, -+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, -+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, -+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, -+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, -+ 116, 116 - } ; - --static yyconst flex_int16_t yy_chk[253] = -+static yyconst flex_int16_t yy_chk[273] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, -- 4, 5, 6, 7, 8, 28, 3, 4, 19, 22, -- 19, 19, 21, 21, 22, 33, 112, 2, 40, 111, -- 21, 28, 51, 23, 51, 23, 23, 51, 51, 5, -- 6, 7, 8, 23, 33, 21, 23, 24, 43, 24, -- 24, 23, 110, 58, 40, 59, 40, 24, 23, 99, -- -- 24, 98, 40, 48, 48, 40, 40, 40, 58, 97, -- 59, 48, 24, 50, 50, 49, 43, 49, 49, 54, -- 54, 50, 60, 75, 75, 49, 48, 54, 49, 55, -- 96, 55, 76, 76, 55, 55, 50, 77, 77, 84, -- 49, 60, 54, 92, 78, 77, 78, 79, 79, 78, -- 78, 80, 80, 90, 84, 87, 87, 88, 88, 100, -- 77, 89, 85, 100, 83, 82, 62, 61, 90, 103, -- 103, 103, 103, 104, 104, 104, 104, 105, 105, 105, -- 105, 106, 106, 106, 106, 107, 107, 108, 56, 108, -- 108, 109, 53, 109, 109, 45, 44, 37, 34, 27, -- -- 15, 11, 9, 102, 102, 102, 102, 102, 102, 102, -- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, -- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, -- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, -- 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, -- 102, 102 -+ 4, 5, 6, 7, 8, 9, 3, 4, 10, 21, -+ 30, 21, 21, 24, 23, 23, 45, 2, 24, 42, -+ 48, 35, 23, 83, 83, 25, 30, 25, 25, 5, -+ 6, 7, 8, 9, 128, 25, 10, 23, 25, 26, -+ 35, 26, 26, 25, 45, 42, 63, 42, 48, 26, -+ -+ 25, 65, 26, 42, 53, 53, 42, 42, 42, 55, -+ 55, 63, 53, 54, 26, 54, 54, 55, 64, 56, -+ 65, 56, 127, 54, 56, 56, 54, 53, 59, 59, -+ 84, 84, 55, 64, 107, 60, 59, 60, 54, 126, -+ 60, 60, 85, 85, 87, 87, 92, 86, 98, 86, -+ 85, 59, 86, 86, 88, 88, 95, 95, 96, 96, -+ 108, 92, 114, 98, 108, 85, 114, 113, 107, 117, -+ 117, 117, 117, 118, 118, 118, 118, 119, 119, 119, -+ 119, 120, 120, 120, 120, 121, 121, 121, 121, 122, -+ 122, 123, 112, 123, 123, 124, 111, 124, 124, 125, -+ -+ 109, 125, 125, 106, 105, 104, 100, 97, 93, 91, -+ 90, 67, 66, 61, 58, 50, 49, 39, 36, 29, -+ 17, 13, 11, 116, 116, 116, 116, 116, 116, 116, -+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, -+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, -+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, -+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, -+ 116, 116 - } ; - - /* Table of booleans, true if rule could match eol. */ --static yyconst flex_int32_t yy_rule_can_match_eol[43] = -+static yyconst flex_int32_t yy_rule_can_match_eol[48] = - { 0, - 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -- 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, }; -+ 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, }; - - /* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. -@@ -550,7 +558,7 @@ static yyconst flex_int32_t yy_rule_can_match_eol[43] = - /* -*- mode: C -*- */ - /* -------------------------------------------------------------------------- - libconfig - A library for processing structured configuration files -- Copyright (C) 2005-2014 Mark A Lindner -+ Copyright (C) 2005-2015 Mark A Lindner - - This file is part of libconfig. - -@@ -577,9 +585,11 @@ static yyconst flex_int32_t yy_rule_can_match_eol[43] = - #endif - - #include -+#include - #include - #include - #include -+#include - #include "parsectx.h" - #include "scanctx.h" - #include "grammar.h" -@@ -621,13 +631,30 @@ static unsigned long long fromhex(const char *s) - #endif /* __MINGW32__ */ - } - -+static int filter_dotfiles(const struct dirent *de) -+{ -+ const char *fname = de->d_name; -+ -+#ifdef _DIRENT_HAVE_D_TYPE -+ /* filter out non-files and non-symlinks */ -+ if((de->d_type != DT_REG) && (de->d_type != DT_LNK) && (de->d_type != DT_UNKNOWN)) -+ return 0; -+#endif -+ -+ return (fname /* != NULL */ -+ && ('\0' != fname[0]) /* can't really happen */ -+ && ('.' != fname[0]) -+ ) ? 1 : 0 ; -+} - --#line 626 "scanner.c" -+ -+#line 652 "scanner.c" - - #define INITIAL 0 - #define COMMENT 1 - #define STRING 2 --#define INCLUDE 3 -+#define INCLUDE_F 3 -+#define INCLUDE_D 4 - - #ifndef YY_NO_UNISTD_H - /* Special case for "unistd.h", since it is non-ANSI. We include it way -@@ -652,8 +679,8 @@ struct yyguts_t - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; -- yy_size_t yy_n_chars; -- yy_size_t yyleng_r; -+ int yy_n_chars; -+ int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; -@@ -706,7 +733,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner ); - - void libconfig_yyset_out (FILE * out_str ,yyscan_t yyscanner ); - --yy_size_t libconfig_yyget_leng (yyscan_t yyscanner ); -+int libconfig_yyget_leng (yyscan_t yyscanner ); - - char *libconfig_yyget_text (yyscan_t yyscanner ); - -@@ -714,10 +741,6 @@ int libconfig_yyget_lineno (yyscan_t yyscanner ); - - void libconfig_yyset_lineno (int line_number ,yyscan_t yyscanner ); - --int libconfig_yyget_column (yyscan_t yyscanner ); -- --void libconfig_yyset_column (int column_no ,yyscan_t yyscanner ); -- - YYSTYPE * libconfig_yyget_lval (yyscan_t yyscanner ); - - void libconfig_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); -@@ -754,7 +777,12 @@ static int input (yyscan_t yyscanner ); - - /* Amount of stuff to slurp up with each read. */ - #ifndef YY_READ_BUF_SIZE -+#ifdef __ia64__ -+/* On IA-64, the buffer size is 16k, not 8k */ -+#define YY_READ_BUF_SIZE 16384 -+#else - #define YY_READ_BUF_SIZE 8192 -+#endif /* __ia64__ */ - #endif - - /* Copy whatever the last rule matched to the standard output. */ -@@ -861,6 +889,11 @@ YY_DECL - register int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - -+#line 121 "scanner.l" -+ -+ -+#line 896 "scanner.c" -+ - yylval = yylval_param; - - if ( !yyg->yy_init ) -@@ -889,12 +922,6 @@ YY_DECL - libconfig_yy_load_buffer_state(yyscanner ); - } - -- { --#line 102 "scanner.l" -- -- --#line 897 "scanner.c" -- - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; -@@ -912,7 +939,7 @@ YY_DECL - yy_match: - do - { -- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; -+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; -@@ -921,13 +948,13 @@ yy_match: - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; -- if ( yy_current_state >= 103 ) -+ if ( yy_current_state >= 117 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } -- while ( yy_current_state != 102 ); -+ while ( yy_current_state != 116 ); - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - -@@ -938,7 +965,7 @@ yy_find_action: - - if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) - { -- yy_size_t yyl; -+ int yyl; - for ( yyl = 0; yyl < yyleng; ++yyl ) - if ( yytext[yyl] == '\n' ) - -@@ -961,69 +988,69 @@ do_action: /* This label is used only to access EOF actions. */ - - case 1: - YY_RULE_SETUP --#line 104 "scanner.l" -+#line 123 "scanner.l" - { BEGIN COMMENT; } - YY_BREAK - case 2: - YY_RULE_SETUP --#line 105 "scanner.l" -+#line 124 "scanner.l" - { BEGIN INITIAL; } - YY_BREAK - case 3: - YY_RULE_SETUP --#line 106 "scanner.l" -+#line 125 "scanner.l" - { /* ignore */ } - YY_BREAK - case 4: - /* rule 4 can match eol */ - YY_RULE_SETUP --#line 107 "scanner.l" -+#line 126 "scanner.l" - { /* ignore */ } - YY_BREAK - case 5: - YY_RULE_SETUP --#line 109 "scanner.l" -+#line 128 "scanner.l" - { BEGIN STRING; } - YY_BREAK - case 6: - /* rule 6 can match eol */ - YY_RULE_SETUP --#line 110 "scanner.l" -+#line 129 "scanner.l" - { scanctx_append_string(yyextra, yytext); } - YY_BREAK - case 7: - YY_RULE_SETUP --#line 111 "scanner.l" -+#line 130 "scanner.l" - { scanctx_append_string(yyextra, "\n"); } - YY_BREAK - case 8: - YY_RULE_SETUP --#line 112 "scanner.l" -+#line 131 "scanner.l" - { scanctx_append_string(yyextra, "\r"); } - YY_BREAK - case 9: - YY_RULE_SETUP --#line 113 "scanner.l" -+#line 132 "scanner.l" - { scanctx_append_string(yyextra, "\t"); } - YY_BREAK - case 10: - YY_RULE_SETUP --#line 114 "scanner.l" -+#line 133 "scanner.l" - { scanctx_append_string(yyextra, "\f"); } - YY_BREAK - case 11: - YY_RULE_SETUP --#line 115 "scanner.l" -+#line 134 "scanner.l" - { scanctx_append_string(yyextra, "\\"); } - YY_BREAK - case 12: - YY_RULE_SETUP --#line 116 "scanner.l" -+#line 135 "scanner.l" - { scanctx_append_string(yyextra, "\""); } - YY_BREAK - case 13: - YY_RULE_SETUP --#line 117 "scanner.l" -+#line 136 "scanner.l" - { - char c[2] = { (char)(strtol(yytext + 2, NULL, 16) & 0xFF), - 0 }; -@@ -1032,12 +1059,12 @@ YY_RULE_SETUP - YY_BREAK - case 14: - YY_RULE_SETUP --#line 122 "scanner.l" -+#line 141 "scanner.l" - { scanctx_append_string(yyextra, "\\"); } - YY_BREAK - case 15: - YY_RULE_SETUP --#line 123 "scanner.l" -+#line 142 "scanner.l" - { - yylval->sval = scanctx_take_string(yyextra); - BEGIN INITIAL; -@@ -1046,198 +1073,304 @@ YY_RULE_SETUP - YY_BREAK - case 16: - YY_RULE_SETUP --#line 129 "scanner.l" --{ BEGIN INCLUDE; } -+#line 148 "scanner.l" -+{ BEGIN INCLUDE_F; } - YY_BREAK - case 17: - /* rule 17 can match eol */ - YY_RULE_SETUP --#line 130 "scanner.l" -+#line 149 "scanner.l" - { scanctx_append_string(yyextra, yytext); } - YY_BREAK - case 18: - YY_RULE_SETUP --#line 131 "scanner.l" -+#line 150 "scanner.l" - { scanctx_append_string(yyextra, "\\"); } - YY_BREAK - case 19: - YY_RULE_SETUP --#line 132 "scanner.l" -+#line 151 "scanner.l" - { scanctx_append_string(yyextra, "\""); } - YY_BREAK - case 20: - YY_RULE_SETUP --#line 133 "scanner.l" -+#line 152 "scanner.l" - { -- const char *error; -- FILE *fp = scanctx_push_include(yyextra, -- (void *)YY_CURRENT_BUFFER, -- &error); -- if(fp) -- { -- yyin = fp; -- libconfig_yy_switch_to_buffer(libconfig_yy_create_buffer(yyin,YY_BUF_SIZE,yyscanner),yyscanner); -- } -- else -- { -- yyextra->config->error_text = error; -- yyextra->config->error_file = scanctx_current_filename( -- yyextra); -- yyextra->config->error_line = libconfig_yyget_lineno( -- yyscanner); -- return TOK_ERROR; -- } -- BEGIN INITIAL; -- } -+ const char *error; -+ FILE *fp = scanctx_push_include(yyextra, -+ (void *)YY_CURRENT_BUFFER, -+ scanctx_getpath(yyextra), -+ &error); -+ if(fp) -+ { -+ yyin = fp; -+ libconfig_yy_switch_to_buffer(libconfig_yy_create_buffer(yyin,YY_BUF_SIZE,yyscanner),yyscanner -+ ); -+ } -+ else -+ { -+ yyextra->config->error_text = error; -+ yyextra->config->error_file = scanctx_current_filename( -+ yyextra); -+ yyextra->config->error_line = libconfig_yyget_lineno(yyscanner); -+ return TOK_ERROR; -+ } -+ BEGIN INITIAL; -+ } - YY_BREAK - case 21: --/* rule 21 can match eol */ - YY_RULE_SETUP --#line 157 "scanner.l" --{ /* ignore */ } -+#line 177 "scanner.l" -+{ BEGIN INCLUDE_D; } - YY_BREAK - case 22: -+/* rule 22 can match eol */ - YY_RULE_SETUP --#line 158 "scanner.l" --{ /* ignore */ } -+#line 178 "scanner.l" -+{ scanctx_append_string(yyextra, yytext); } - YY_BREAK - case 23: - YY_RULE_SETUP --#line 160 "scanner.l" --{ return(TOK_EQUALS); } -+#line 179 "scanner.l" -+{ scanctx_append_string(yyextra, "\\"); } - YY_BREAK - case 24: - YY_RULE_SETUP --#line 161 "scanner.l" --{ return(TOK_COMMA); } -+#line 180 "scanner.l" -+{ scanctx_append_string(yyextra, "\""); } - YY_BREAK - case 25: - YY_RULE_SETUP --#line 162 "scanner.l" --{ return(TOK_GROUP_START); } -+#line 181 "scanner.l" -+{ -+ const char *error; -+ const char* basedir; -+ FILE *fp = NULL; -+ -+ basedir = scanctx_getpath(yyextra); -+ if(scanctx_dirscan(yyextra, basedir, filter_dotfiles, NULL) < 0) -+ { -+ if(basedir) -+ free((void*)basedir); -+ return TOK_ERROR; -+ } -+ -+ if(scanctx_inloop(yyextra)) -+ { -+ fp = scanctx_push_include(yyextra, -+ (void *)YY_CURRENT_BUFFER, -+ scanctx_filename(yyextra, NULL, scanctx_dirnext(yyextra)), -+ &error -+ ); -+ -+ if(fp) -+ { -+ yyin = fp; -+ libconfig_yy_switch_to_buffer(libconfig_yy_create_buffer(yyin,YY_BUF_SIZE,yyscanner),yyscanner -+ ); -+ } -+ else -+ { -+ yyextra->config->error_text = error; -+ yyextra->config->error_file = scanctx_current_filename(yyextra); -+ yyextra->config->error_line = libconfig_yyget_lineno(yyscanner); -+ } -+ } -+ else -+ scanctx_dirend(yyextra); /* avoid leaks */ -+ -+ BEGIN INITIAL; -+ } - YY_BREAK - case 26: -+/* rule 26 can match eol */ - YY_RULE_SETUP --#line 163 "scanner.l" --{ return(TOK_GROUP_END); } -+#line 223 "scanner.l" -+{ /* ignore */ } - YY_BREAK - case 27: - YY_RULE_SETUP --#line 164 "scanner.l" --{ yylval->ival = 1; return(TOK_BOOLEAN); } -+#line 224 "scanner.l" -+{ /* ignore */ } - YY_BREAK - case 28: - YY_RULE_SETUP --#line 165 "scanner.l" --{ yylval->ival = 0; return(TOK_BOOLEAN); } -+#line 226 "scanner.l" -+{ return(TOK_EQUALS); } - YY_BREAK - case 29: - YY_RULE_SETUP --#line 166 "scanner.l" --{ yylval->sval = yytext; return(TOK_NAME); } -+#line 227 "scanner.l" -+{ return(TOK_COMMA); } - YY_BREAK - case 30: - YY_RULE_SETUP --#line 167 "scanner.l" --{ yylval->fval = atof(yytext); return(TOK_FLOAT); } -+#line 228 "scanner.l" -+{ return(TOK_GROUP_START); } - YY_BREAK - case 31: - YY_RULE_SETUP --#line 168 "scanner.l" -+#line 229 "scanner.l" -+{ return(TOK_GROUP_END); } -+ YY_BREAK -+case 32: -+YY_RULE_SETUP -+#line 230 "scanner.l" -+{ yylval->ival = 1; return(TOK_BOOLEAN); } -+ YY_BREAK -+case 33: -+YY_RULE_SETUP -+#line 231 "scanner.l" -+{ yylval->ival = 0; return(TOK_BOOLEAN); } -+ YY_BREAK -+case 34: -+YY_RULE_SETUP -+#line 232 "scanner.l" -+{ yylval->sval = yytext; return(TOK_NAME); } -+ YY_BREAK -+case 35: -+YY_RULE_SETUP -+#line 233 "scanner.l" -+{ yylval->fval = atof(yytext); return(TOK_FLOAT); } -+ YY_BREAK -+case 36: -+YY_RULE_SETUP -+#line 234 "scanner.l" - { - long long llval; -- llval = atoll(yytext); -+ char *endptr; -+ int errsave = errno; -+ errno = 0; -+ llval = strtoll(yytext, &endptr, 0); /* base 10 or base 8 */ -+ if(*endptr || errno) -+ { -+ errno = 0; -+ return(TOK_ERROR); /* some error occured ... */ -+ } -+ errno = errsave; -+ if((*yytext == '0') && (*(yytext+1) != '\0')) -+ { /* it's octal... so INT we go */ -+ yylval->ival = (int)(llval); -+ return(TOK_INTEGER); -+ } -+ - if((llval < INT_MIN) || (llval > INT_MAX)) - { -- yylval->llval = llval; -- return(TOK_INTEGER64); -+ yylval->llval = llval; -+ return(TOK_INTEGER64); - } - else - { -- yylval->ival = llval; -- return(TOK_INTEGER); -+ yylval->ival = llval; -+ return(TOK_INTEGER); - } - } - YY_BREAK --case 32: -+case 37: - YY_RULE_SETUP --#line 182 "scanner.l" -+#line 263 "scanner.l" - { yylval->llval = atoll(yytext); return(TOK_INTEGER64); } - YY_BREAK --case 33: -+case 38: - YY_RULE_SETUP --#line 183 "scanner.l" -+#line 264 "scanner.l" - { - yylval->ival = strtoul(yytext, NULL, 16); - return(TOK_HEX); - } - YY_BREAK --case 34: -+case 39: - YY_RULE_SETUP --#line 187 "scanner.l" -+#line 268 "scanner.l" - { yylval->llval = fromhex(yytext); return(TOK_HEX64); } - YY_BREAK --case 35: -+case 40: - YY_RULE_SETUP --#line 188 "scanner.l" -+#line 269 "scanner.l" - { return(TOK_ARRAY_START); } - YY_BREAK --case 36: -+case 41: - YY_RULE_SETUP --#line 189 "scanner.l" -+#line 270 "scanner.l" - { return(TOK_ARRAY_END); } - YY_BREAK --case 37: -+case 42: - YY_RULE_SETUP --#line 190 "scanner.l" -+#line 271 "scanner.l" - { return(TOK_LIST_START); } - YY_BREAK --case 38: -+case 43: - YY_RULE_SETUP --#line 191 "scanner.l" -+#line 272 "scanner.l" - { return(TOK_LIST_END); } - YY_BREAK --case 39: -+case 44: - YY_RULE_SETUP --#line 192 "scanner.l" -+#line 273 "scanner.l" - { return(TOK_SEMICOLON); } - YY_BREAK --case 40: -+case 45: - *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ - yyg->yy_c_buf_p = yy_cp -= 1; - YY_DO_BEFORE_ACTION; /* set up yytext again */ - YY_RULE_SETUP --#line 193 "scanner.l" -+#line 274 "scanner.l" - { /* ignore */ } - YY_BREAK --case 41: -+case 46: - YY_RULE_SETUP --#line 194 "scanner.l" -+#line 275 "scanner.l" - { return(TOK_GARBAGE); } - YY_BREAK - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(COMMENT): - case YY_STATE_EOF(STRING): --case YY_STATE_EOF(INCLUDE): --#line 196 "scanner.l" -+case YY_STATE_EOF(INCLUDE_F): -+case YY_STATE_EOF(INCLUDE_D): -+#line 277 "scanner.l" - { -- YY_BUFFER_STATE buf = (YY_BUFFER_STATE)scanctx_pop_include( -- yyextra); -- if(buf) -- { -- libconfig_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner); -- libconfig_yy_switch_to_buffer(buf,yyscanner); -- } -- else -- yyterminate(); -- } -+ const char* error; -+ FILE *fp; -+ YY_BUFFER_STATE buf = (YY_BUFFER_STATE)scanctx_pop_include(yyextra); -+ if(buf) -+ { -+ libconfig_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner); -+ libconfig_yy_switch_to_buffer(buf,yyscanner); -+ } -+ else /* if no more buffers, we are done */ -+ yyterminate(); -+ -+ if(scanctx_inloop(yyextra)) -+ { -+ /* gotta keep looping.... */ -+ fp = scanctx_push_include(yyextra, -+ (void *)YY_CURRENT_BUFFER, -+ scanctx_filename(yyextra, NULL, scanctx_dirnext(yyextra)), -+ &error -+ ); -+ if(fp) -+ { -+ yyin = fp; -+ libconfig_yy_switch_to_buffer(libconfig_yy_create_buffer(yyin,YY_BUF_SIZE,yyscanner),yyscanner -+ ); -+ } -+ else -+ { -+ yyextra->config->error_text = error; -+ yyextra->config->error_file = scanctx_current_filename(yyextra); -+ yyextra->config->error_line = libconfig_yyget_lineno(yyscanner); -+ } -+ } -+ else /* not on loop, or just finished */ -+ scanctx_dirend(yyextra); -+ } - YY_BREAK --case 42: -+case 47: - YY_RULE_SETUP --#line 207 "scanner.l" -+#line 315 "scanner.l" - ECHO; - YY_BREAK --#line 1241 "scanner.c" -+#line 1374 "scanner.c" - - case YY_END_OF_BUFFER: - { -@@ -1367,7 +1500,6 @@ ECHO; - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -- } /* end of user's declarations */ - } /* end of libconfig_yylex */ - - /* yy_get_next_buffer - try to read in a new buffer -@@ -1424,21 +1556,21 @@ static int yy_get_next_buffer (yyscan_t yyscanner) - - else - { -- yy_size_t num_to_read = -+ int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ -- YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; -+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { -- yy_size_t new_size = b->yy_buf_size * 2; -+ int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; -@@ -1469,7 +1601,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), -- yyg->yy_n_chars, num_to_read ); -+ yyg->yy_n_chars, (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } -@@ -1532,7 +1664,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; -- if ( yy_current_state >= 103 ) -+ if ( yy_current_state >= 117 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; -@@ -1561,13 +1693,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner) - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; -- if ( yy_current_state >= 103 ) -+ if ( yy_current_state >= 117 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; -- yy_is_jam = (yy_current_state == 102); -+ yy_is_jam = (yy_current_state == 116); - -- (void)yyg; - return yy_is_jam ? 0 : yy_current_state; - } - -@@ -1596,7 +1727,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) - - else - { /* need more input */ -- yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; -+ int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) -@@ -1884,7 +2015,7 @@ void libconfig_yypop_buffer_state (yyscan_t yyscanner) - */ - static void libconfig_yyensure_buffer_stack (yyscan_t yyscanner) - { -- yy_size_t num_to_alloc; -+ int num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { -@@ -1982,12 +2113,12 @@ YY_BUFFER_STATE libconfig_yy_scan_string (yyconst char * yystr , yyscan_t yyscan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ --YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) -+YY_BUFFER_STATE libconfig_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) - { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; -- yy_size_t i; -+ int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; -@@ -2097,7 +2228,7 @@ FILE *libconfig_yyget_out (yyscan_t yyscanner) - /** Get the length of the current token. - * @param yyscanner The scanner object. - */ --yy_size_t libconfig_yyget_leng (yyscan_t yyscanner) -+int libconfig_yyget_leng (yyscan_t yyscanner) - { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -@@ -2133,7 +2264,7 @@ void libconfig_yyset_lineno (int line_number , yyscan_t yyscanner) - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) -- YY_FATAL_ERROR( "libconfig_yyset_lineno called with no buffer" ); -+ yy_fatal_error( "libconfig_yyset_lineno called with no buffer" , yyscanner); - - yylineno = line_number; - } -@@ -2148,7 +2279,7 @@ void libconfig_yyset_column (int column_no , yyscan_t yyscanner) - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) -- YY_FATAL_ERROR( "libconfig_yyset_column called with no buffer" ); -+ yy_fatal_error( "libconfig_yyset_column called with no buffer" , yyscanner); - - yycolumn = column_no; - } -@@ -2372,4 +2503,4 @@ void libconfig_yyfree (void * ptr , yyscan_t yyscanner) - - #define YYTABLES_NAME "yytables" - --#line 207 "scanner.l" -+#line 315 "scanner.l" diff --git a/ports/libconfig/portfile.cmake b/ports/libconfig/portfile.cmake index 73028de7c..2862a8e95 100644 --- a/ports/libconfig/portfile.cmake +++ b/ports/libconfig/portfile.cmake @@ -3,20 +3,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO hyperrealm/libconfig - REF v1.6 - SHA512 6222110851970fda11d21e73bc322be95fb1ce62c513e2f4cc7875d7b32d1d211860971692db679edf8ac46151033a132fc669bd16590fec56360ef3a6e584f8 + REF v1.7.1 + SHA512 b58b468e9e2d5175fbde1ad9765c6604dc9b3f3944613a88404a45d0d232e7d79a47321bf3c06b97cb46a2104b4313fad5c7f8944149f550b7af51ad523e775e HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/fix-scanner-source-msvc-patch.patch" - "${CMAKE_CURRENT_LIST_DIR}/fix-scanner-header-msvc-patch.patch" -) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/scandir.c DESTINATION ${SOURCE_PATH}/lib/win32) vcpkg_configure_cmake( diff --git a/ports/libconfig/scandir.c b/ports/libconfig/scandir.c deleted file mode 100644 index cab75716e..000000000 --- a/ports/libconfig/scandir.c +++ /dev/null @@ -1,112 +0,0 @@ -// "$Id: scandir.c 1339 2006-04-03 22:47:29Z spitzak $" -// -// Copyright 1998-2006 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 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 -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library 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. -// -// Please report all bugs and problems to "fltk-bugs@fltk.org". - -// Emulation of posix scandir() call -// This source file is #include'd by scandir.c -// THIS IS A C FILE! DO NOT CHANGE TO C++!!! -// See @http://www.fltk.org/strfiles/1779/scandir.c - -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef FILENAME_MAX -#define FILENAME_MAX 2048 -#endif - -/** - * The scandir() function reads the directory dirname and builds an array of - * pointers to directory entries. It returns the number of entries in the array. - * A pointer to the array of directory entries is stored in the location - * referenced by namelist. - */ -int libconfig_scandir(const char *dirname, struct dirent ***namelist, - int (*select)(struct dirent *), - int (*compar)(struct dirent **, struct dirent **)) { - char *d; - WIN32_FIND_DATA find; - HANDLE h; - int nDir = 0, NDir = 0; - struct dirent **dir = 0, *selectDir; - unsigned long ret; - char findIn[MAX_PATH*4]; - - //utf8tomb(dirname, strlen(dirname), findIn, _MAX_PATH); - strcpy(findIn, dirname); - - d = findIn+strlen(findIn); - if (d==findIn) *d++ = '.'; - if (*(d-1)!='/' && *(d-1)!='\\') *d++ = '/'; - *d++ = '*'; - *d++ = 0; - - if ((h=FindFirstFile(findIn, &find))==INVALID_HANDLE_VALUE) { - ret = GetLastError(); - if (ret != ERROR_NO_MORE_FILES) { - // TODO: return some error code - } - *namelist = dir; - return nDir; - } - do { - selectDir=(struct dirent*)malloc(sizeof(struct dirent)); - strcpy(selectDir->d_name, find.cFileName); - if (!select || (*select)(selectDir)) { - if (nDir==NDir) { - struct dirent **tempDir = (struct dirent **)calloc(sizeof(struct dirent*), NDir+33); - if (NDir) memcpy(tempDir, dir, sizeof(struct dirent*)*NDir); - if (dir) free(dir); - dir = tempDir; - NDir += 32; - } - dir[nDir] = selectDir; - nDir++; - dir[nDir] = 0; - } else { - free(selectDir); - } - } while (FindNextFile(h, &find)); - ret = GetLastError(); - if (ret != ERROR_NO_MORE_FILES) { - // TODO: return some error code - } - FindClose(h); - - if (compar) qsort (dir, nDir, sizeof(*dir), - (int(*)(const void*, const void*))compar); - - *namelist = dir; - return nDir; -} - -#ifdef __cplusplus -} -#endif - -// -// End of "$Id: scandir.c 1339 2006-04-03 22:47:29Z spitzak $". -// -- cgit v1.2.3 From 178517052f42d428bb2f304946e635d3c1f318e9 Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Tue, 26 Dec 2017 12:45:49 +0800 Subject: [fmt] update to 4.1.0 --- ports/fmt/CONTROL | 2 +- ports/fmt/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL index c0fd45c63..7cd59ab27 100644 --- a/ports/fmt/CONTROL +++ b/ports/fmt/CONTROL @@ -1,3 +1,3 @@ Source: fmt -Version: 4.0.0-1 +Version: 4.1.0 Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams. diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake index f40e2adc9..36ab2ac3b 100644 --- a/ports/fmt/portfile.cmake +++ b/ports/fmt/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fmtlib/fmt - REF 4.0.0 - SHA512 8b9f7ce4720c3caef6de4a75b8d4b0fd7db4f1638edca98d5ea95f4a5157aef8faefbac68438236691bd373111ca089b4d3864f7352f3fba1fe44392e9644f8b + REF 4.1.0 + SHA512 8daaa4a61bfe63345a12df0a9bca0b1cd6a162d0f4e97d2d2978ae19a1a1357ec4d4cce948ce726cdbe9403e51ad995950a2a99de28f9b9085c02ce845540b22 HEAD_REF master ) -- cgit v1.2.3 From 5abb2872f0d1e375c2e18c3b20c8670a2f98da1b Mon Sep 17 00:00:00 2001 From: Adrian Geipert Date: Tue, 26 Dec 2017 17:46:05 +0100 Subject: [gainput] Initial port --- ports/gainput/CONTROL | 3 +++ ports/gainput/portfile.cmake | 47 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 ports/gainput/CONTROL create mode 100644 ports/gainput/portfile.cmake diff --git a/ports/gainput/CONTROL b/ports/gainput/CONTROL new file mode 100644 index 000000000..45b7b6afb --- /dev/null +++ b/ports/gainput/CONTROL @@ -0,0 +1,3 @@ +Source: gainput +Version: 1.0.0 +Description: Gainput is a multiplatform C++ input library, supporting mouse, keyboard and controllers diff --git a/ports/gainput/portfile.cmake b/ports/gainput/portfile.cmake new file mode 100644 index 000000000..c1f1f6158 --- /dev/null +++ b/ports/gainput/portfile.cmake @@ -0,0 +1,47 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gainput-1.0.0) +vcpkg_download_distfile(ARCHIVE + URLS "http://github.com/jkuhlmann/gainput/archive/v1.0.0.zip" + FILENAME "gainput-1.0.0.zip" + SHA512 dab221290560298693f54bebced1da5ec3dfae2d2adbfd6ceb17b5b28dc2a637a49e479d49fe98680915b29beb5dd2d5c74258598233a053230696186593c88e +) +vcpkg_extract_source_archive(${ARCHIVE}) + + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGAINPUT_TESTS=OFF + -DGAINPUT_SAMPLES=OFF + # 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() +vcpkg_copy_pdbs() +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gainput RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gainputstatic.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gainputstatic.lib ${CURRENT_PACKAGES_DIR}/lib/gainput.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gainputstaticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gainputd.lib) + endif() +endif() -- cgit v1.2.3 From 55d8069da33a18cca4d6c5497a834172300360c7 Mon Sep 17 00:00:00 2001 From: xoviat Date: Tue, 26 Dec 2017 12:16:50 -0600 Subject: mpfr: fix download link --- ports/mpfr/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mpfr/portfile.cmake b/ports/mpfr/portfile.cmake index 0a192f168..689b075fc 100644 --- a/ports/mpfr/portfile.cmake +++ b/ports/mpfr/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpfr-3.1.6) vcpkg_download_distfile(ARCHIVE - URLS "http://www.mpfr.org/mpfr-current/mpfr-3.1.6.tar.xz" + URLS "http://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.xz" FILENAME "mpfr-3.1.6.tar.xz" SHA512 746ee74d5026f267f74ab352d850ed30ff627d530aa840c71b24793e44875f8503946bd7399905dea2b2dd5744326254d7889337fe94cfe58d03c4066e9d8054 ) -- cgit v1.2.3 From fe2d4e2ee95fb9d2ddb8fd0e4ec9b28c0a9d793c Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 26 Dec 2017 14:24:42 -0800 Subject: [mpir] use vcpkg_from_github --- ports/mpir/CONTROL | 2 +- ports/mpir/portfile.cmake | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/ports/mpir/CONTROL b/ports/mpir/CONTROL index b9d1b2d74..22216d41d 100644 --- a/ports/mpir/CONTROL +++ b/ports/mpir/CONTROL @@ -1,3 +1,3 @@ Source: mpir -Version: 3.0.0-3 +Version: 3.0.0-4 Description: Multiple Precision Integers and Rationals. diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake index c56cfa545..c352b657a 100644 --- a/ports/mpir/portfile.cmake +++ b/ports/mpir/portfile.cmake @@ -8,16 +8,13 @@ if(VCPKG_CRT_LINKAGE STREQUAL "static" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynam message(FATAL_ERROR "MPIR currently can only be built using the dynamic CRT when building DLLs") endif() -set(MPIR_VERSION 3.0.0) -set(MPIR_HASH "c735105db8b86db739fd915bf16064e6bc82d0565ad8858059e4e93f62c9d72d9a1c02a5ca9859b184346a8dc64fa714d4d61404cff1e405dc548cbd54d0a88e") -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpir-${MPIR_VERSION}) - -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://mpir.org/mpir-${MPIR_VERSION}.tar.bz2" - FILENAME "mpir-${MPIR_VERSION}.tar.bz2" - SHA512 ${MPIR_HASH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wbhart/mpir + REF mpir-3.0.0 + SHA512 7d37f60645c533a6638dde5d9c48f5535022fa0ea02bafd5b714649c70814e88c5e5e3b0bef4c5a749aaf8772531de89c331716ee00ba1c2f9521c2cc8f3c61b + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From a3abeb2bb7d76db3bc8e7d147e905a067a440329 Mon Sep 17 00:00:00 2001 From: clvn Date: Wed, 27 Dec 2017 11:49:36 +0100 Subject: [portmidi] Initial port --- ports/portmidi/CONTROL | 3 +++ ports/portmidi/portfile.cmake | 49 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 ports/portmidi/CONTROL create mode 100644 ports/portmidi/portfile.cmake diff --git a/ports/portmidi/CONTROL b/ports/portmidi/CONTROL new file mode 100644 index 000000000..3534c1856 --- /dev/null +++ b/ports/portmidi/CONTROL @@ -0,0 +1,3 @@ +Source: portmidi +Version: 0.217.1 +Description: Free, cross-platform, open-source I/O library for MIDI diff --git a/ports/portmidi/portfile.cmake b/ports/portmidi/portfile.cmake new file mode 100644 index 000000000..557f4a1ca --- /dev/null +++ b/ports/portmidi/portfile.cmake @@ -0,0 +1,49 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "WindowsStore not supported") +endif() + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/portmidi) +vcpkg_download_distfile(ARCHIVE + URLS "https://downloads.sourceforge.net/project/portmedia/portmidi/217/portmidi-src-217.zip" + FILENAME "portmidi-src-217.zip" + SHA512 d08d4d57429d26d292b5fe6868b7c7a32f2f1d2428f6695cd403a697e2d91629bd4380242ab2720e8f21c895bb75cb56b709fb663a20e8e623120e50bfc5d90b +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Mark portmidi-static as static, disable pmjni library depending on the Java SDK + +file(READ "${SOURCE_PATH}/pm_common/CMakeLists.txt" PM_CMAKE) +string(REPLACE "add_library(portmidi-static \${LIBSRC})" "add_library(portmidi-static STATIC \${LIBSRC})" PM_CMAKE "${PM_CMAKE}") +string(REPLACE "add_library(pmjni SHARED \${JNISRC})" "# Removed pmjni" PM_CMAKE "${PM_CMAKE}") +string(REPLACE "target_link_libraries(pmjni \${JNI_EXTRA_LIBS})" "# Removed pmjni" PM_CMAKE "${PM_CMAKE}") +string(REPLACE "set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION \"jnilib\")" "# Removed pmjni" PM_CMAKE "${PM_CMAKE}") +file(WRITE "${SOURCE_PATH}/pm_common/CMakeLists.txt" "${PM_CMAKE}") + +# Run cmake configure step +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DJAVA_INCLUDE_PATH= + -DJAVA_INCLUDE_PATH2= + -DJAVA_JVM_LIBRARY= +) + +# Run cmake build step, nothing is installed on Windows +vcpkg_build_cmake() + +file(INSTALL ${SOURCE_PATH}/pm_common/portmidi.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/porttime/porttime.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/portmidi_s.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/portmidi_s.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +else() + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/portmidi.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/portmidi.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/portmidi.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/portmidi.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() + +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/portmidi RENAME copyright) -- cgit v1.2.3 From 2de68fb7797c0974965db26cfe1b5b700acb42f6 Mon Sep 17 00:00:00 2001 From: clvn Date: Wed, 27 Dec 2017 12:18:50 +0100 Subject: [jack2] Initial commit --- ports/jack2/CMakeLists.txt | 14 ++++++++++++++ ports/jack2/CONTROL | 4 ++++ ports/jack2/portfile.cmake | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 ports/jack2/CMakeLists.txt create mode 100644 ports/jack2/CONTROL create mode 100644 ports/jack2/portfile.cmake diff --git a/ports/jack2/CMakeLists.txt b/ports/jack2/CMakeLists.txt new file mode 100644 index 000000000..2fb25edb8 --- /dev/null +++ b/ports/jack2/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.8) +project(jack2 C) + +include_directories(common) + +add_library(jack2 STATIC common/JackWeakAPI.c) + +install(TARGETS jack2 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(DIRECTORY common/jack DESTINATION include) diff --git a/ports/jack2/CONTROL b/ports/jack2/CONTROL new file mode 100644 index 000000000..6ccdc052a --- /dev/null +++ b/ports/jack2/CONTROL @@ -0,0 +1,4 @@ +Source: jack2 +Version: 1.9.12.1 +Description: Cross-platform API that enables device sharing and inter-application audio routing + diff --git a/ports/jack2/portfile.cmake b/ports/jack2/portfile.cmake new file mode 100644 index 000000000..6fe7a1100 --- /dev/null +++ b/ports/jack2/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "WindowsStore not supported") +endif() + +set(VERSION 1.9.12) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/jack2-${VERSION}) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/jackaudio/jack2/releases/download/v${VERSION}/jack2-${VERSION}.tar.gz" + FILENAME "jack2-${VERSION}.tar.gz" + SHA512 f0271dfc8f8e2f2489ca52f431ad4fa420665816d6c67a01a76da1d4b5ae91f6dad8c4e3309ec5e0c159c9d312ed56021ab323d74bce828ace26f1b8d477ddfa +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Install headers and a statically built JackWeakAPI.c +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +# Remove duplicate headers +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/jack2 RENAME copyright) -- cgit v1.2.3 From 491e9c73a73b9e47e7e5f020ccdd3044f1f95888 Mon Sep 17 00:00:00 2001 From: Frank Quinn Date: Wed, 27 Dec 2017 23:03:48 +0000 Subject: Modified OpenMAMA port to use vcpkg build option This option enables searching in the debug directory for debug libraries for OpenMAMA dependencies. --- ports/openmama/portfile.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/openmama/portfile.cmake b/ports/openmama/portfile.cmake index 99417dd80..2b7aedd49 100644 --- a/ports/openmama/portfile.cmake +++ b/ports/openmama/portfile.cmake @@ -6,8 +6,8 @@ vcpkg_find_acquire_program(SCONS) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenMAMA/OpenMAMA - REF a5a93a24d2f89a0def0145552c8cd4a53c69e2de - SHA512 ddce249da470a4b2acda3953a1f8feed93eb1e05ee6048ed798a9f32eaf7ce037d611ff331a8982a8a309d4b09c05a37f9fbe8ca90420751e46f67f7a53a555f + REF 24bc69c07e3fdaf95351baea64a5fa87c15de6c9 + SHA512 d660910fec772bad2ad2668066e5a03cb29cd40b6b443895967bb3b8ae12bbbdb8aa379a347bde7ecff81dad42e8149d2694cc542e41af17245d6ce227278afc HEAD_REF next ) @@ -24,6 +24,7 @@ vcpkg_execute_required_process( libevent_home=${CURRENT_INSTALLED_DIR} apr_home=${CURRENT_INSTALLED_DIR} qpid_home=${CURRENT_INSTALLED_DIR} + vcpkg_build=y WORKING_DIRECTORY ${SOURCE_PATH} LOGNAME clean-${TARGET_TRIPLET}.log ) @@ -43,6 +44,7 @@ vcpkg_execute_required_process( libevent_home=${CURRENT_INSTALLED_DIR} apr_home=${CURRENT_INSTALLED_DIR} qpid_home=${CURRENT_INSTALLED_DIR} + vcpkg_build=y WORKING_DIRECTORY ${SOURCE_PATH} LOGNAME build-${TARGET_TRIPLET}.log ) -- cgit v1.2.3 From 3aa16aeece48b44562647eef1c8e150069d74ef8 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Thu, 28 Dec 2017 16:20:38 +0300 Subject: [libdatrie] fix trietool for MSVC runtime --- ports/libdatrie/CONTROL | 2 +- ports/libdatrie/fix-exports.patch | 4 ++-- ports/libdatrie/fix-trietool.patch | 31 +++++++++++++++++++++++++++++++ ports/libdatrie/portfile.cmake | 6 ++++-- 4 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 ports/libdatrie/fix-trietool.patch diff --git a/ports/libdatrie/CONTROL b/ports/libdatrie/CONTROL index b39710141..8b9747fd7 100644 --- a/ports/libdatrie/CONTROL +++ b/ports/libdatrie/CONTROL @@ -1,4 +1,4 @@ Source: libdatrie -Version: 0.2.10-1 +Version: 0.2.10-2 Description: implementation of double-array structure for representing trie Build-Depends: libiconv diff --git a/ports/libdatrie/fix-exports.patch b/ports/libdatrie/fix-exports.patch index d82850431..3c407c21b 100644 --- a/ports/libdatrie/fix-exports.patch +++ b/ports/libdatrie/fix-exports.patch @@ -1,6 +1,6 @@ diff -Naur ./a/libdatrie.def ./b/libdatrie.def ---- a/libdatrie.def 2013-10-17 06:27:57.000000000 +0300 -+++ b/libdatrie.def 2017-12-21 02:42:39.873879000 +0300 +--- a/datrie/libdatrie.def 2013-10-17 06:27:57.000000000 +0300 ++++ b/datrie/libdatrie.def 2017-12-21 02:42:39.873879000 +0300 @@ -1,3 +1,4 @@ +EXPORTS alpha_map_new diff --git a/ports/libdatrie/fix-trietool.patch b/ports/libdatrie/fix-trietool.patch new file mode 100644 index 000000000..bcecee26e --- /dev/null +++ b/ports/libdatrie/fix-trietool.patch @@ -0,0 +1,31 @@ +From 086a76ad7c17060d504371ea724cf5d651d43eb3 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Thu, 28 Dec 2017 16:07:51 +0300 +Subject: [PATCH] fix trietool for MSVC runtime + +--- + tools/trietool.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/trietool.c b/tools/trietool.c +index 4cfde2a..7c90905 100644 +--- a/tools/trietool.c ++++ b/tools/trietool.c +@@ -589,12 +589,12 @@ string_trim (char *s) + char *p; + + /* skip leading white spaces */ +- while (*s && isspace (*s)) ++ while (*s && isspace ((unsigned char)*s)) + ++s; + + /* trim trailing white spaces */ + p = s + strlen (s) - 1; +- while (isspace (*p)) ++ while (isspace ((unsigned char)*p)) + --p; + *++p = '\0'; + +-- +2.14.1.windows.1 + diff --git a/ports/libdatrie/portfile.cmake b/ports/libdatrie/portfile.cmake index 81ff4e239..f7fefd248 100644 --- a/ports/libdatrie/portfile.cmake +++ b/ports/libdatrie/portfile.cmake @@ -11,8 +11,10 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH}/datrie - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-exports.patch" + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix-exports.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-trietool.patch" ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 4bdaba0e500da4b73d6749f90ad71775413ad923 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Thu, 28 Dec 2017 22:28:44 +0300 Subject: Fix version --- ports/aubio/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL index 635d2a9c9..7261afd80 100644 --- a/ports/aubio/CONTROL +++ b/ports/aubio/CONTROL @@ -1,4 +1,4 @@ Source: aubio -Version: 0.46 +Version: 0.4.6 Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis -- cgit v1.2.3 From 6800cbed5cbb2fdc2c52f2ff6c03e7771810003e Mon Sep 17 00:00:00 2001 From: Jim Tilander Date: Thu, 28 Dec 2017 15:37:56 -0800 Subject: Add support for Box2D to be build as a static library --- ports/box2d/portfile.cmake | 11 +++++++--- ports/box2d/use-static-linkage.patch | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 ports/box2d/use-static-linkage.patch diff --git a/ports/box2d/portfile.cmake b/ports/box2d/portfile.cmake index 122290251..b07dbc663 100644 --- a/ports/box2d/portfile.cmake +++ b/ports/box2d/portfile.cmake @@ -7,9 +7,6 @@ elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm") message(FATAL_ERROR "ARM not supported") endif(TRIPLET_SYSTEM_ARCH MATCHES "x86") -if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "Box2d only supports dynamic CRT linkage") -endif() include(vcpkg_common_functions) @@ -25,6 +22,14 @@ vcpkg_from_github( HEAD_REF master ) +if(VCPKG_CRT_LINKAGE STREQUAL "static") + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/use-static-linkage.patch + ) +endif() + # Put the licence and readme files where vcpkg expects it message(STATUS "Packaging license") file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/box2d) diff --git a/ports/box2d/use-static-linkage.patch b/ports/box2d/use-static-linkage.patch new file mode 100644 index 000000000..4c3fccd53 --- /dev/null +++ b/ports/box2d/use-static-linkage.patch @@ -0,0 +1,40 @@ +diff --git a/Box2D/Build/vs2015/Box2D.vcxproj b/Box2D/Build/vs2015/Box2D.vcxproj +index 830803c..5dda519 100644 +--- a/Box2D/Build/vs2015/Box2D.vcxproj ++++ b/Box2D/Build/vs2015/Box2D.vcxproj +@@ -86,7 +86,7 @@ + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks +- MultiThreadedDebugDLL ++ MultiThreadedDebug + true + + +@@ -115,7 +115,7 @@ + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks +- MultiThreadedDebugDLL ++ MultiThreadedDebug + true + + +@@ -145,7 +145,7 @@ + _CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + false + true +- MultiThreadedDLL ++ MultiThreaded + true + + +@@ -176,7 +176,7 @@ + _CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) + false + true +- MultiThreadedDLL ++ MultiThreaded + true + + -- cgit v1.2.3 From 42467a590e078dfff3fde32cccd73b8b2ddad48c Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sat, 30 Dec 2017 01:22:14 +0300 Subject: [asio] swith to vcpkg_from_github() --- ports/asio/CONTROL | 2 +- ports/asio/portfile.cmake | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ports/asio/CONTROL b/ports/asio/CONTROL index 18d9692f5..021e20592 100644 --- a/ports/asio/CONTROL +++ b/ports/asio/CONTROL @@ -1,3 +1,3 @@ Source: asio -Version: 1.10.8 +Version: 1.10.8-1 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 39fefa012..88cddfbbc 100644 --- a/ports/asio/portfile.cmake +++ b/ports/asio/portfile.cmake @@ -1,16 +1,17 @@ #header-only library include(vcpkg_common_functions) -SET(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/asio-asio-1-10-8/asio/) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/chriskohlhoff/asio/archive/asio-1-10-8.zip" - FILENAME "asio-1-10-8.zip" - SHA512 bc9794a20fc7844a2a9d22bfa418005f61defbcecdd612daba0d317e6f8fc5a61d3a3b2d7d557b92584294b8adfccc3c47a8f0441f3e34a47a0f715ca1ba0e5b + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO chriskohlhoff/asio + REF asio-1-10-8 + SHA512 55c26a6daf893f6e91ec7e8b5d70f1e27f2c1886552b2c9cb5c47b7c3bb08f78c9d6cec0a3bc6edbfb657a5094a001f742db0f18f81f51d79661b01fafea293e + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/asio) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/asio/COPYING ${CURRENT_PACKAGES_DIR}/share/asio/copyright) +file(COPY ${SOURCE_PATH}/asio/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) # Copy the asio header files -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp" PATTERN "*.ipp") +file(INSTALL ${SOURCE_PATH}/asio/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp" PATTERN "*.ipp") -- cgit v1.2.3 From 7fbd67db7bd4a63f468423354fa3804a533df01c Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sat, 30 Dec 2017 02:08:49 +0300 Subject: [nlohmann-json] update to 3.0.1 --- ports/nlohmann-json/CONTROL | 2 +- ports/nlohmann-json/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/nlohmann-json/CONTROL b/ports/nlohmann-json/CONTROL index 1b268b456..1666f8ebd 100644 --- a/ports/nlohmann-json/CONTROL +++ b/ports/nlohmann-json/CONTROL @@ -1,3 +1,3 @@ Source: nlohmann-json -Version: 3.0.0 +Version: 3.0.1 Description: JSON for Modern C++ diff --git a/ports/nlohmann-json/portfile.cmake b/ports/nlohmann-json/portfile.cmake index d03c5b395..d47298dd9 100644 --- a/ports/nlohmann-json/portfile.cmake +++ b/ports/nlohmann-json/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_VERSION 3.0.0) +set(SOURCE_VERSION 3.0.1) vcpkg_download_distfile(HEADER URLS "https://github.com/nlohmann/json/releases/download/v${SOURCE_VERSION}/json.hpp" FILENAME "nlohmann-json-${SOURCE_VERSION}.hpp" - SHA512 0983320160900e7dbb1241d10f5be6eb0c1be39f2af3f153f488533c381e909f4af0d60c25c6a2e4bb7b69ad1ff0033651c52fe36886f917324f355281e99c05 + SHA512 95c0f0ca2e0eddfa462e732055ac6ede208929120bbe5c5d6e1035a7263900590bfeaddcbc4e1043aaa9255906cb0f038af64abf9a8da9fc98a7dc61356e2fef ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From fe94a33bfe9c23c9ba766a2a689e7afec3bde198 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Sun, 31 Dec 2017 08:25:28 +1100 Subject: qt5 network auth module --- ports/qt5/CONTROL | 2 +- ports/qt5networkauth/CONTROL | 4 ++++ ports/qt5networkauth/portfile.cmake | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 ports/qt5networkauth/CONTROL create mode 100644 ports/qt5networkauth/portfile.cmake diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index 7c87d3806..f8817e1db 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 Version: 5.9.2-1 Description: Qt5 Application Framework -Build-Depends: qt5base, qt5charts, qt5datavis3d, qt5declarative, qt5gamepad, qt5imageformats, qt5multimedia, qt5scxml, qt5serialport, qt5speech, qt5svg, qt5tools, qt5virtualkeyboard, qt5websockets, qt53d, qt5winextras, qt5xmlpatterns \ No newline at end of file +Build-Depends: qt5base, qt5charts, qt5datavis3d, qt5declarative, qt5gamepad, qt5imageformats, qt5multimedia, qt5networkauth, qt5scxml, qt5serialport, qt5speech, qt5svg, qt5tools, qt5virtualkeyboard, qt5websockets, qt53d, qt5winextras, qt5xmlpatterns \ No newline at end of file diff --git a/ports/qt5networkauth/CONTROL b/ports/qt5networkauth/CONTROL new file mode 100644 index 000000000..0e5f45f96 --- /dev/null +++ b/ports/qt5networkauth/CONTROL @@ -0,0 +1,4 @@ +Source: qt5networkauth +Version: 5.9.2-0 +Description: Qt5 Network Authorization Module +Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5networkauth/portfile.cmake b/ports/qt5networkauth/portfile.cmake new file mode 100644 index 000000000..c9b9db47c --- /dev/null +++ b/ports/qt5networkauth/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtnetworkauth 2e83eefd5db62aa1cdbe451b432ba1937541e435dcc35205d3bb9b947f2ac7e31663dc069a6cfad5bbf34e1fa799d519820f7ed61b9c247016611a533385bebf) \ No newline at end of file -- cgit v1.2.3 From 47189e90d59459be69d4f6a0b039849913031c8e Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Sun, 31 Dec 2017 10:12:22 +1100 Subject: fix qwt build --- ports/qwt/CONTROL | 2 +- ports/qwt/portfile.cmake | 64 +++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 56 insertions(+), 10 deletions(-) diff --git a/ports/qwt/CONTROL b/ports/qwt/CONTROL index 60539483b..c30b97779 100644 --- a/ports/qwt/CONTROL +++ b/ports/qwt/CONTROL @@ -1,4 +1,4 @@ Source: qwt Version: 6.1.3-2 Description: Qt widgets library for technical applications -Build-Depends: qt5base +Build-Depends: qt5base, qt5svg diff --git a/ports/qwt/portfile.cmake b/ports/qwt/portfile.cmake index 99f84425a..f4be871b7 100644 --- a/ports/qwt/portfile.cmake +++ b/ports/qwt/portfile.cmake @@ -24,37 +24,83 @@ endif() # The qwt build requires zlib1.dll SET(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") -vcpkg_configure_qmake( +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +file(REMOVE_RECURSE "${DEBUG_DIR}" "${RELEASE_DIR}") + +#Configure debug +vcpkg_configure_qmake_debug( + SOURCE_PATH ${SOURCE_PATH} +) + +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + file(READ "${DEBUG_MAKEFILE}" _contents) + string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") + string(REPLACE "installed\\${TARGET_TRIPLET}\\lib" "installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") + string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib qtmaind.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link qtmaind.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" _contents "${_contents}") + file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") +endforeach() + +#Build debug +vcpkg_build_qmake_debug(TARGETS sub-src-debug_ordered) + +#Configure release +vcpkg_configure_qmake_release( SOURCE_PATH ${SOURCE_PATH} ) -vcpkg_build_qmake() +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + file(READ "${RELEASE_MAKEFILE}" _contents) + string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib qtmain.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib\\manual-link qtmain.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib" _contents "${_contents}") + file(WRITE "${RELEASE_MAKEFILE}" "${_contents}") +endforeach() + +#Build release +vcpkg_build_qmake_release(TARGETS sub-src-release_ordered) -# Install following vcpkg conventions -set(BUILD_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +#Set the correct install directory to packages +foreach(MAKEFILE ${RELEASE_MAKEFILES} ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${MAKEFILE} "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}") +endforeach() +#Install the header files file(GLOB HEADER_FILES ${SOURCE_PATH}/src/*.h) file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/qwt) +#Install the module files file(INSTALL - ${BUILD_DIR}/lib/qwt.lib + ${RELEASE_DIR}/lib/qwt.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib ) file(INSTALL - ${BUILD_DIR}/lib/qwtd.lib + ${DEBUG_DIR}/lib/qwtd.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(INSTALL - ${BUILD_DIR}/lib/qwt.dll + ${RELEASE_DIR}/lib/qwt.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin ) file(INSTALL - ${BUILD_DIR}/lib/qwtd.dll - ${BUILD_DIR}/lib/qwtd.pdb + ${DEBUG_DIR}/lib/qwtd.dll + ${DEBUG_DIR}/lib/qwtd.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin ) endif() -- cgit v1.2.3 From ab884b5f0c38797dc76a213182ed658738cc7cbe Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Mon, 1 Jan 2018 15:20:33 +0800 Subject: [libbson] update to 1.9.0 --- ports/libbson/CONTROL | 2 +- ports/libbson/fix-uwp.patch | 76 ++++++++++++++++++++++++++++++++------------ ports/libbson/portfile.cmake | 37 +++++++++++++++++---- ports/libbson/static.patch | 18 +++++------ 4 files changed, 96 insertions(+), 37 deletions(-) diff --git a/ports/libbson/CONTROL b/ports/libbson/CONTROL index 263608bf6..bc99eb9a3 100644 --- a/ports/libbson/CONTROL +++ b/ports/libbson/CONTROL @@ -1,3 +1,3 @@ Source: libbson -Version: 1.6.2-2 +Version: 1.9.0 Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. diff --git a/ports/libbson/fix-uwp.patch b/ports/libbson/fix-uwp.patch index abe11f8a4..ad916373f 100644 --- a/ports/libbson/fix-uwp.patch +++ b/ports/libbson/fix-uwp.patch @@ -2,27 +2,63 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 553f13b..03dc546 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -194,6 +194,8 @@ set (HEADERS +@@ -230,6 +230,9 @@ ${SOURCE_DIR}/src/bson/bson-writer.h ) +add_definitions(-D_CRT_SECURE_NO_WARNINGS) + ++if (NOT BSON_ENABLE_STATIC) add_library(bson_shared SHARED ${SOURCES} ${HEADERS}) - add_library(bson_static STATIC ${SOURCES} ${HEADERS}) + set(CMAKE_CXX_VISIBILITY_PRESET hidden) + set_target_properties(bson_shared PROPERTIES COMPILE_DEFINITIONS "BSON_COMPILATION;JSONSL_PARSE_NAN") +@@ -263,16 +266,21 @@ + # must be handled specially since we can't resolve them + set(BSON_SYSTEM_LIBS ${BSON_SYSTEM_LIBS} ws2_32) + endif() ++endif() -@@ -272,8 +274,10 @@ if (ENABLE_TESTS) - DESTINATION ${PROJECT_BINARY_DIR}/tests) - endif () # ENABLE_TESTS + if (BSON_ENABLE_STATIC) + add_library(bson_static STATIC ${SOURCES} ${HEADERS}) ++ set(CMAKE_CXX_VISIBILITY_PRESET hidden) + set_target_properties(bson_static PROPERTIES COMPILE_DEFINITIONS "BSON_COMPILATION;BSON_STATIC;JSONSL_PARSE_NAN") + set_target_properties(bson_static PROPERTIES VERSION ${BSON_VERSION}) + set_target_properties(bson_static PROPERTIES OUTPUT_NAME "bson-static-${BSON_API_VERSION}") ++ set(THREADS_PREFER_PTHREAD_FLAG 1) ++ find_package (Threads REQUIRED) + target_link_libraries(bson_static Threads::Threads) + if (RT_LIBRARY) + target_link_libraries (bson_static ${RT_LIBRARY}) + endif() ++ find_library(M_LIBRARY m) + if (M_LIBRARY) + target_link_libraries (bson_static ${M_LIBRARY}) + endif() +@@ -332,7 +340,7 @@ + add_executable (${bin} ${BSON_EXAMPLE_SOURCES}) -+set(INSTALL_TARGETS bson_shared bson_static CACHE INTERNAL "List of library targets to install") -+ + # Link against the shared lib like normal apps +- target_link_libraries(${bin} bson_shared) ++ target_link_libraries(${bin} bson_shared bson_static) + + set (EXAMPLES ${EXAMPLES} ${bin}) + endfunction () +@@ -349,6 +357,7 @@ + endif () # ENABLE_EXAMPLES + + set (BSON_HEADER_INSTALL_DIR "include/libbson-${BSON_API_VERSION}") ++if (NOT BSON_ENABLE_STATIC) install( -- TARGETS bson_shared bson_static -+ TARGETS ${INSTALL_TARGETS} + TARGETS bson_shared ${EXAMPLES} LIBRARY DESTINATION lib +@@ -355,6 +364,7 @@ ARCHIVE DESTINATION lib RUNTIME DESTINATION bin + ) ++endif () + if (BSON_ENABLE_STATIC) + install( + TARGETS bson_static ${EXAMPLES} diff --git a/src/bson/bson-compat.h b/src/bson/bson-compat.h index 05fc614..e8e2214 100644 --- a/src/bson/bson-compat.h @@ -31,21 +67,21 @@ index 05fc614..e8e2214 100644 #ifdef BSON_OS_WIN32 --# if defined(_WIN32_WINNT) && (_WIN32_WINNT < 0x0600) -+# if defined(_WIN32_WINNT) && (_WIN32_WINNT < 0x0602) - # undef _WIN32_WINNT - # endif - # ifndef _WIN32_WINNT --# define _WIN32_WINNT 0x0600 -+# define _WIN32_WINNT 0x0602 - # endif - # ifndef NOMINMAX - # define NOMINMAX +-#if defined(_WIN32_WINNT) && (_WIN32_WINNT < 0x0600) ++#if defined(_WIN32_WINNT) && (_WIN32_WINNT < 0x0602) + #undef _WIN32_WINNT + #endif + #ifndef _WIN32_WINNT +-#define _WIN32_WINNT 0x0600 ++#define _WIN32_WINNT 0x0602 + #endif + #ifndef NOMINMAX + #define NOMINMAX diff --git a/src/bson/bson-iso8601.c b/src/bson/bson-iso8601.c index 8beea90..cb4b531 100644 --- a/src/bson/bson-iso8601.c +++ b/src/bson/bson-iso8601.c -@@ -117,8 +117,8 @@ _bson_iso8601_date_parse (const char *str, +@@ -115,8 +115,8 @@ _bson_iso8601_date_parse (const char *str, const char *day_ptr; const char *hour_ptr; const char *min_ptr; diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake index 1a86128a4..956e39ff0 100644 --- a/ports/libbson/portfile.cmake +++ b/ports/libbson/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libbson-1.6.2) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libbson-1.9.0) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mongodb/libbson/archive/1.6.2.tar.gz" - FILENAME "libbson-1.6.2.tar.gz" - SHA512 c5848984d5db5ab62e698a0185139b20834d83fd7befef72336997097f639ef13e81053531385e96c7ba1fe3f3fe4ded517f5b8ee58f0914c5c807a9cb43766d + URLS "https://github.com/mongodb/libbson/archive/1.9.0.tar.gz" + FILENAME "libbson-1.9.0.tar.gz" + SHA512 ced5e20a043096bbb2bd97f179c50fa105498fd089a54fcf7c0e3edda52030e7a6363ff1ab75c885649590a7d8846fa8adf880026cc059772cdfd87da23a244d ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -14,9 +14,9 @@ vcpkg_apply_patches( ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(TARGET_TO_INSTALL bson_static) + set(ENABLE_STATIC ON) else() - set(TARGET_TO_INSTALL bson_shared) + set(ENABLE_STATIC OFF) endif() vcpkg_configure_cmake( @@ -24,7 +24,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DENABLE_TESTS=OFF - -DINSTALL_TARGETS=${TARGET_TO_INSTALL} + -DENABLE_STATIC=${ENABLE_STATIC} ) vcpkg_install_cmake() @@ -60,4 +60,27 @@ endif() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson RENAME copyright) file(COPY ${SOURCE_PATH}/THIRD_PARTY_NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-static-1.0/libbson-static-1.0-config.cmake LIBBSON_CONFIG_CMAKE) +string(REPLACE "/../../../" "/../../" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") +string(REPLACE "/include/libbson-1.0" "/include" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") +string(REPLACE "bson-static-1.0" "bson-1.0" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config.cmake "${LIBBSON_CONFIG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson-static-1.0/libbson-static-1.0-config.cmake "${LIBBSON_CONFIG_CMAKE}") +file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-static-1.0/libbson-static-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-static-1.0-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config-version.cmake) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-static-1.0/libbson-static-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson-static-1.0) +else() +file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-1.0/libbson-1.0-config.cmake LIBBSON_CONFIG_CMAKE) +string(REPLACE "/../../../" "/../../" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") +string(REPLACE "/include/libbson-1.0" "/include" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config.cmake "${LIBBSON_CONFIG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson-1.0/libbson-1.0-config.cmake "${LIBBSON_CONFIG_CMAKE}") +file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-1.0/libbson-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-1.0-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config-version.cmake) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-1.0/libbson-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson-1.0) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ${CURRENT_PACKAGES_DIR}/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/libbson/static.patch b/ports/libbson/static.patch index adb52fa4f..e92286aed 100644 --- a/ports/libbson/static.patch +++ b/ports/libbson/static.patch @@ -2,12 +2,12 @@ diff --git a/bson-macros.h b/bson-macros.h index 909bf6c..0a1f612 100644 --- a/bson-macros.h +++ b/bson-macros.h -@@ -69,7 +69,7 @@ - # ifdef BSON_COMPILATION - # define BSON_API __declspec(dllexport) - # else --# define BSON_API __declspec(dllimport) -+# define BSON_API - # endif - #elif defined(__GNUC__) - # define BSON_API __attribute__ ((visibility ("default"))) +@@ -87,7 +87,7 @@ + #elif defined(BSON_COMPILATION) + #define BSON_API __declspec(dllexport) + #else +-#define BSON_API __declspec(dllimport) ++#define BSON_API + #endif + #define BSON_CALL __cdecl + -- cgit v1.2.3 From 7f3e5e3f776811764b679470b1494264c538885a Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Mon, 1 Jan 2018 15:22:26 +0800 Subject: [mongo-c-driver] update to 1.9.0 --- ports/mongo-c-driver/CONTROL | 2 +- ports/mongo-c-driver/bson.patch | 23 ------------ ports/mongo-c-driver/fix-uwp.patch | 72 ++++++++++++++++++++++++++++++++++--- ports/mongo-c-driver/portfile.cmake | 61 ++++++++++++++++++++++--------- ports/mongo-c-driver/static.patch | 13 +++++++ 5 files changed, 127 insertions(+), 44 deletions(-) delete mode 100644 ports/mongo-c-driver/bson.patch create mode 100644 ports/mongo-c-driver/static.patch diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL index 4b100879a..6391682c4 100644 --- a/ports/mongo-c-driver/CONTROL +++ b/ports/mongo-c-driver/CONTROL @@ -1,4 +1,4 @@ Source: mongo-c-driver -Version: 1.6.2-1 +Version: 1.9.0 Build-Depends: libbson, openssl (uwp) Description: Client library written in C for MongoDB. diff --git a/ports/mongo-c-driver/bson.patch b/ports/mongo-c-driver/bson.patch deleted file mode 100644 index 6ef5451b8..000000000 --- a/ports/mongo-c-driver/bson.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/build/cmake/FindBSON.cmake b/build/cmake/FindBSON.cmake -index 06fd82e..3ac549d 100644 ---- a/build/cmake/FindBSON.cmake -+++ b/build/cmake/FindBSON.cmake -@@ -11,15 +11,15 @@ endif () - - find_path(BSON_INCLUDE_DIR - NAMES -- libbson-1.0/bson.h -+ bson.h - HINTS - ${BSON_ROOT_DIR} - PATH_SUFFIXES - include -+ libbson-1.0 -+ include/libbson-1.0 - ) - --set(BSON_INCLUDE_DIR "${BSON_INCLUDE_DIR}/libbson-1.0") -- - find_library(BSON - NAMES - "bson-1.0" diff --git a/ports/mongo-c-driver/fix-uwp.patch b/ports/mongo-c-driver/fix-uwp.patch index 13c0a2299..59d67c6be 100644 --- a/ports/mongo-c-driver/fix-uwp.patch +++ b/ports/mongo-c-driver/fix-uwp.patch @@ -1,8 +1,72 @@ -diff --git a/src/mongoc/mongoc-gridfs-file.c b/src/mongoc/mongoc-gridfs-file.c +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5beb610..7e74ff7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -55,6 +55,7 @@ + + include(MaintainerFlags) + ++if ((NOT ENABLE_STATIC STREQUAL ON) AND (NOT ENABLE_STATIC STREQUAL AUTO)) + # The input variable BSON_ROOT_DIR is respected for backwards compatibility, + # but you should use the standard CMAKE_PREFIX_PATH instead. + message (STATUS "Searching for libbson CMake packages") +@@ -67,12 +68,14 @@ + message ("-- libbson found version \"${BSON_VERSION}\"") + message ("-- libbson include path \"${BSON_INCLUDE_DIRS}\"") + message ("-- libbson libraries \"${BSON_LIBRARIES}\"") ++endif () + + if (ENABLE_STATIC STREQUAL ON OR ENABLE_STATIC STREQUAL AUTO) + find_package (libbson-static-1.0 + "${MONGOC_MAJOR_VERSION}.${MONGOC_MINOR_VERSION}.${MONGOC_MICRO_VERSION}" + HINTS +- ${BSON_ROOT_DIR}) ++ ${BSON_ROOT_DIR} ++ REQUIRED) + + if (ENABLE_STATIC STREQUAL ON AND NOT BSON_STATIC_LIBRARY) + message (FATAL_ERROR "Static libbson not found. Pass -DENABLE_STATIC=OFF") +@@ -627,6 +630,7 @@ + set (LIBS ${LIBS} ws2_32) + endif() + ++if (NOT MONGOC_ENABLE_STATIC) + add_library(mongoc_shared SHARED ${SOURCES} ${HEADERS}) + set_target_properties(mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) + target_link_libraries (mongoc_shared ${LIBS} ${BSON_LIBRARIES}) +@@ -638,6 +642,7 @@ + # This hack sets up standard symlink, libmongoc-1.0.so -> libmongoc-1.0.0.so + set_target_properties(mongoc_shared PROPERTIES VERSION 0 SOVERSION ${MONGOC_MAJOR_VERSION}) + set_target_properties(mongoc_shared PROPERTIES OUTPUT_NAME "mongoc-${MONGOC_API_VERSION}" PREFIX "lib") ++endif () + + if (MONGOC_ENABLE_STATIC) + add_library(mongoc_static STATIC ${SOURCES} ${HEADERS}) +@@ -804,6 +809,7 @@ + file(COPY ${SOURCE_DIR}/tests/x509gen DESTINATION ${PROJECT_BINARY_DIR}/tests) + file(COPY ${SOURCE_DIR}/tests/release_files DESTINATION ${PROJECT_BINARY_DIR}/tests) + ++if (NOT MONGOC_ENABLE_STATIC) + install( + TARGETS mongoc_shared ${EXAMPLES} + LIBRARY DESTINATION lib +@@ -810,10 +816,11 @@ + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin + ) ++endif () + + if (MONGOC_ENABLE_STATIC) + install( +- TARGETS mongoc_shared mongoc_static ${EXAMPLES} ++ TARGETS mongoc_static ${EXAMPLES} + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin index 5beb610..7e74ff7 100644 --- a/src/mongoc/mongoc-gridfs-file.c +++ b/src/mongoc/mongoc-gridfs-file.c -@@ -734,7 +734,7 @@ _mongoc_gridfs_file_refresh_page (mongoc_gridfs_file_t *file) +@@ -753,7 +753,7 @@ _mongoc_gridfs_file_refresh_page (mongoc_gridfs_file_t *file) bson_t query; bson_t child; bson_t opts; @@ -15,7 +79,7 @@ diff --git a/src/mongoc/mongoc-handshake.c b/src/mongoc/mongoc-handshake.c index 4e181bd..b274fc1 100644 --- a/src/mongoc/mongoc-handshake.c +++ b/src/mongoc/mongoc-handshake.c -@@ -195,7 +195,8 @@ _get_os_version (void) +@@ -243,7 +243,8 @@ _get_os_version (void) char *ret = bson_malloc (HANDSHAKE_OS_VERSION_MAX); bool found = false; @@ -29,7 +93,7 @@ diff --git a/src/mongoc/mongoc-util.c b/src/mongoc/mongoc-util.c index 6dbb26d..7f33780 100644 --- a/src/mongoc/mongoc-util.c +++ b/src/mongoc/mongoc-util.c -@@ -46,7 +46,11 @@ _mongoc_hex_md5 (const char *input) +@@ -69,7 +69,11 @@ _mongoc_hex_md5 (const char *input) void _mongoc_usleep (int64_t usec) { diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake index 4376f324a..3b3b1f863 100644 --- a/ports/mongo-c-driver/portfile.cmake +++ b/ports/mongo-c-driver/portfile.cmake @@ -1,21 +1,24 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-c-driver-1.6.2) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-c-driver-1.9.0) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mongodb/mongo-c-driver/archive/1.6.2.tar.gz" - FILENAME "mongo-c-driver-1.6.2.tar.gz" - SHA512 3533fed665c70b71f0e9473156bab1575f60b0b3db412f19c0a625e1e35683a3077f96b8a0ba337fd755675029f47b68dc3a5fc8f39254bb0be589da57cffad3 + URLS "https://github.com/mongodb/mongo-c-driver/archive/1.9.0.tar.gz" + FILENAME "mongo-c-driver-1.9.0.tar.gz" + SHA512 e7785f336c38bbf7dd519351bba2facab025b4d2bcd1eef82e98606a21510af7f799edaf4b4f074bd4c5a17ad63176c276f8c57e499b8d9afd098bce274da4ae ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/bson.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-uwp.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-uwp.patch ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(ENABLE_STATIC ON) +else() + set(ENABLE_STATIC OFF) +endif() + set(ENABLE_SSL "WINDOWS") if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(ENABLE_SSL "OPENSSL") @@ -23,11 +26,13 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DBSON_ROOT_DIR=${CURRENT_INSTALLED_DIR} -DENABLE_TESTS=OFF -DENABLE_EXAMPLES=OFF -DENABLE_SSL=${ENABLE_SSL} + -DENABLE_STATIC=${ENABLE_STATIC} ) vcpkg_install_cmake() @@ -43,23 +48,47 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) 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/mongoc-1.0.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib) -else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib) + + # drop the __declspec(dllimport) when building static + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/static.patch + ) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) endif() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver RENAME copyright) file(COPY ${SOURCE_PATH}/THIRD_PARTY_NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-static-1.0/libmongoc-static-1.0-config.cmake LIBMONGOC_CONFIG_CMAKE) +string(REPLACE "/../../../" "/../../" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +string(REPLACE "/include/libmongoc-1.0" "/include" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +string(REPLACE "mongoc-static-1.0" "mongoc-1.0" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config.cmake "${LIBMONGOC_CONFIG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libmongoc-static-1.0/libmongoc-static-1.0-config.cmake "${LIBMONGOC_CONFIG_CMAKE}") +file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-static-1.0/libmongoc-static-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-static-1.0-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config-version.cmake) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-static-1.0/libmongoc-static-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmongoc-static-1.0) +else() +file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-1.0/libmongoc-1.0-config.cmake LIBMONGOC_CONFIG_CMAKE) +string(REPLACE "/../../../" "/../../" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +string(REPLACE "/include/libmongoc-1.0" "/include" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config.cmake "${LIBMONGOC_CONFIG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libmongoc-1.0/libmongoc-1.0-config.cmake "${LIBMONGOC_CONFIG_CMAKE}") +file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-1.0/libmongoc-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-1.0-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config-version.cmake) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-1.0/libmongoc-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmongoc-1.0) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ${CURRENT_PACKAGES_DIR}/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + vcpkg_copy_pdbs() diff --git a/ports/mongo-c-driver/static.patch b/ports/mongo-c-driver/static.patch new file mode 100644 index 000000000..7f348ba82 --- /dev/null +++ b/ports/mongo-c-driver/static.patch @@ -0,0 +1,13 @@ +diff --git a/mongoc-macros.h b/mongoc-macros.h +index 909bf6c..0a1f612 100644 +--- a/mongoc-macros.h ++++ b/mongoc-macros.h +@@ -40,7 +40,7 @@ + #elif defined(MONGOC_COMPILATION) + #define MONGOC_API __declspec(dllexport) + #else +-#define MONGOC_API __declspec(dllimport) ++#define MONGOC_API + #endif + #define MONGOC_CALL __cdecl + -- cgit v1.2.3 From e95ab9c51079ec172c15d9561ac57c24168b0b1e Mon Sep 17 00:00:00 2001 From: jasjuang Date: Mon, 1 Jan 2018 00:19:40 -0800 Subject: [harfbuzz] update to 1.7.4 --- ports/harfbuzz/CONTROL | 4 ++-- ports/harfbuzz/portfile.cmake | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 9dad59be5..235a05045 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.6.3-1 +Version: 1.7.4 Description: HarfBuzz OpenType text shaping engine -Build-Depends: freetype, glib (windows) +Build-Depends: freetype, ragel, glib (windows) diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index f9fa05555..6e58997c1 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -1,11 +1,12 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/harfbuzz-1.6.3) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/behdad/harfbuzz/releases/download/1.6.3/harfbuzz-1.6.3.tar.bz2" - FILENAME "harfbuzz-1.6.3.tar.bz2" - SHA512 37d1a161d9074e9898d9ef6cca6dffffc725005828d700744553b0145373b69bcd3b08f507d49f4c2e05850d9275a54f15983356c547c86e5e3c202cc7cbfbe8 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO behdad/harfbuzz + REF 1.7.4 + SHA512 9d96017ba980280fa2e741dc2c7197e1f4b62b1bbb1e17b57806dc594ed905f52f08136830aafc995420eb709e3c927b2a6ea396fecb3b4a33473c0e0f345dee + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 386e69c6b2f2047624cf4b2123cb53e810e78ae1 Mon Sep 17 00:00:00 2001 From: clvn Date: Mon, 1 Jan 2018 15:43:41 +0100 Subject: [jack2] Prefer using vcpkg_from_github. Removed check for Windows Store --- ports/jack2/CONTROL | 2 +- ports/jack2/portfile.cmake | 16 +++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/ports/jack2/CONTROL b/ports/jack2/CONTROL index 6ccdc052a..ccf49a118 100644 --- a/ports/jack2/CONTROL +++ b/ports/jack2/CONTROL @@ -1,4 +1,4 @@ Source: jack2 -Version: 1.9.12.1 +Version: 1.9.12.2 Description: Cross-platform API that enables device sharing and inter-application audio routing diff --git a/ports/jack2/portfile.cmake b/ports/jack2/portfile.cmake index 6fe7a1100..a82f1be62 100644 --- a/ports/jack2/portfile.cmake +++ b/ports/jack2/portfile.cmake @@ -5,19 +5,13 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(VCPKG_LIBRARY_LINKAGE static) endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "WindowsStore not supported") -endif() - -set(VERSION 1.9.12) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/jack2-${VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/jackaudio/jack2/releases/download/v${VERSION}/jack2-${VERSION}.tar.gz" - FILENAME "jack2-${VERSION}.tar.gz" +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jackaudio/jack2 + REF v1.9.12 SHA512 f0271dfc8f8e2f2489ca52f431ad4fa420665816d6c67a01a76da1d4b5ae91f6dad8c4e3309ec5e0c159c9d312ed56021ab323d74bce828ace26f1b8d477ddfa + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) # Install headers and a statically built JackWeakAPI.c file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 757e75f89ec9e247fb94ca3fa0e1f115e22cc4e5 Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Tue, 2 Jan 2018 15:20:44 +0300 Subject: [zstd] update to 1.3.3 --- ports/zstd/CONTROL | 2 +- ports/zstd/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL index c6c5cc8e3..fa139d868 100644 --- a/ports/zstd/CONTROL +++ b/ports/zstd/CONTROL @@ -1,3 +1,3 @@ Source: zstd -Version: 1.3.1-1 +Version: 1.3.3 Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index 1f93cac74..874b5ec93 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/zstd - REF v1.3.1 - SHA512 cc2ace7b2dd19a2bbf4c43a89d64a7ce121309f712bfb4940ccfd6f9353f1466612ef7096adcd852f54eaea8663d884acf681c83ae5b274b24c9b85f21367b7c + REF v1.3.3 + SHA512 72b63f96f65ca987cdc82c24354f7665c7dc3b2563cb0646f355c34bf8f090d8a0759729f8beaba8317272bdab34749f934055707b25cfd69c98a9fdcfbc59ae HEAD_REF dev) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) -- cgit v1.2.3 From cc99ad6ee41630007cd253b3d9e7f4d1cdaa160b Mon Sep 17 00:00:00 2001 From: Sean Warren Date: Wed, 3 Jan 2018 07:58:20 +1100 Subject: Use vcpkg version of BLAS and LAPACK in dlib dlib v19.8 detects these packages correctly --- ports/dlib/CONTROL | 5 +---- ports/dlib/portfile.cmake | 9 ++------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index 4d0a72f50..51f4d1e03 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,11 +1,8 @@ Source: dlib Version: 19.8 -Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3 +Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3, openblas, clapack Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ -Feature: blas -Description: BLAS support for dlib - Feature: cuda Build-Depends: cuda Description: CUDA support for dlib diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index 9d82cbf19..99784551a 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -17,11 +17,6 @@ file(READ "${SOURCE_PATH}/dlib/CMakeLists.txt" DLIB_CMAKE) string(REPLACE "PNG_LIBRARY" "PNG_LIBRARIES" DLIB_CMAKE "${DLIB_CMAKE}") file(WRITE "${SOURCE_PATH}/dlib/CMakeLists.txt" "${DLIB_CMAKE}") -set(WITH_BLAS OFF) -if("blas" IN_LIST FEATURES) - set(WITH_BLAS ON) -endif() - set(WITH_CUDA OFF) if("cuda" IN_LIST FEATURES) set(WITH_CUDA ON) @@ -35,8 +30,8 @@ vcpkg_configure_cmake( -DDLIB_USE_FFTW=ON -DDLIB_PNG_SUPPORT=ON -DDLIB_JPEG_SUPPORT=ON - -DDLIB_USE_BLAS=${WITH_BLAS} - -DDLIB_USE_LAPACK=OFF + -DDLIB_USE_BLAS=ON + -DDLIB_USE_LAPACK=ON -DDLIB_USE_CUDA=${WITH_CUDA} -DDLIB_GIF_SUPPORT=OFF -DDLIB_USE_MKL_FFT=OFF -- cgit v1.2.3 From a0d09ae1fb4f25efeaadb79d6f97d188c25966f8 Mon Sep 17 00:00:00 2001 From: Andrei Lebedev Date: Wed, 3 Jan 2018 01:43:06 +0300 Subject: [libpqxx] Initial port --- ports/libpqxx/CMakeLists.txt | 68 +++++++++++++++++++++++++++++ ports/libpqxx/CONTROL | 4 ++ ports/libpqxx/config-internal-compiler.h.in | 14 ++++++ ports/libpqxx/config-public-compiler.h.in | 8 ++++ ports/libpqxx/portfile.cmake | 23 ++++++++++ 5 files changed, 117 insertions(+) create mode 100644 ports/libpqxx/CMakeLists.txt create mode 100644 ports/libpqxx/CONTROL create mode 100644 ports/libpqxx/config-internal-compiler.h.in create mode 100644 ports/libpqxx/config-public-compiler.h.in create mode 100644 ports/libpqxx/portfile.cmake diff --git a/ports/libpqxx/CMakeLists.txt b/ports/libpqxx/CMakeLists.txt new file mode 100644 index 000000000..c33d8863f --- /dev/null +++ b/ports/libpqxx/CMakeLists.txt @@ -0,0 +1,68 @@ +cmake_minimum_required(VERSION 3.5) +project(libpqxx VERSION 6.0.0 LANGUAGES CXX) +set(CMAKE_DEBUG_POSTFIX "D") + +find_library(LIBPQD libpqd) +find_library(LIBPQ libpq) +find_path(LIBPQ_FE_H libpq-fe.h) +find_path(POSTGRES_EXT_H postgres_ext.h) + +include(CheckIncludeFileCXX) + +check_include_file_cxx(poll.h HAVE_POLL) +check_include_file_cxx(sys/select.h HAVE_SYS_SELECT_H) +check_include_file_cxx(sys/time.h HAVE_SYS_TIME_H) +check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H) +check_include_file_cxx(unistd.h HAVE_UNISTD_H) + +include(CheckCXXSourceCompiles) + +check_cxx_source_compiles("[[deprecated]] void f(); +int main() { return 0; }" PQXX_HAVE_DEPRECATED) +check_cxx_source_compiles("#include +int main() { return std::optional(0).value(); }" PQXX_HAVE_OPTIONAL) +check_cxx_source_compiles("#include +int main() { return std::experimental::optional(0).value(); }" PQXX_HAVE_EXP_OPTIONAL) + +configure_file(config-internal-compiler.h.in pqxx/config-internal-compiler.h) +configure_file(config-public-compiler.h.in pqxx/config-public-compiler.h) + +file(GLOB SRCS "${PROJECT_SOURCE_DIR}/src/*.cxx") + +if(BUILD_SHARED_LIBS) + set(TARGET libpqxx) + set(SHARED_DEFINITION -DPQXX_SHARED) + list(APPEND SRCS "${PROJECT_SOURCE_DIR}/win32/libpqxx.cxx") +else() + set(TARGET libpqxx_static) + set(SHARED_DEFINITION "") +endif() + +add_library(${TARGET} ${SRCS}) +target_compile_definitions(${TARGET} PRIVATE -DPQXX_INTERNAL -DNOMINMAX ${SHARED_DEFINITION}) +target_include_directories(${TARGET} PRIVATE include ${LIBPQ_FE_H} ${POSTGRES_EXT_H} ${CMAKE_BINARY_DIR}) +target_link_libraries(${TARGET} PRIVATE ws2_32) +if(LIBPQD AND LIBPQ) + target_link_libraries(${TARGET} PRIVATE debug ${LIBPQD} optimized ${LIBPQ}) +elseif(LIBPQD) + target_link_libraries(${TARGET} PRIVATE ${LIBPQD}) +else() + target_link_libraries(${TARGET} PRIVATE ${LIBPQ}) +endif() + +install(TARGETS ${TARGET} + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + ) +install(DIRECTORY include/ DESTINATION include + CONFIGURATIONS Release + PATTERN "doc" EXCLUDE + PATTERN "*.am" EXCLUDE + PATTERN "*.in" EXCLUDE + PATTERN "*.template" EXCLUDE + ) +install(DIRECTORY ${CMAKE_BINARY_DIR}/pqxx/ DESTINATION include/pqxx + CONFIGURATIONS Release + FILES_MATCHING PATTERN "*.h" + ) diff --git a/ports/libpqxx/CONTROL b/ports/libpqxx/CONTROL new file mode 100644 index 000000000..8860ddaf9 --- /dev/null +++ b/ports/libpqxx/CONTROL @@ -0,0 +1,4 @@ +Source: libpqxx +Version: 6.0.0 +Description: The official C++ client API for PostgreSQL +Build-Depends: libpq diff --git a/ports/libpqxx/config-internal-compiler.h.in b/ports/libpqxx/config-internal-compiler.h.in new file mode 100644 index 000000000..6a5f07fbe --- /dev/null +++ b/ports/libpqxx/config-internal-compiler.h.in @@ -0,0 +1,14 @@ +/* System supports poll(). */ +#cmakedefine HAVE_POLL 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H 1 diff --git a/ports/libpqxx/config-public-compiler.h.in b/ports/libpqxx/config-public-compiler.h.in new file mode 100644 index 000000000..24479707a --- /dev/null +++ b/ports/libpqxx/config-public-compiler.h.in @@ -0,0 +1,8 @@ +/* Define if compiler supports [[deprecated]] attribute */ +#cmakedefine PQXX_HAVE_DEPRECATED 1 + +/* Define if the compiler supports std::experimental::optional. */ +#cmakedefine PQXX_HAVE_EXP_OPTIONAL 1 + +/* Define if the compiler supports std::optional. */ +#cmakedefine PQXX_HAVE_OPTIONAL 1 diff --git a/ports/libpqxx/portfile.cmake b/ports/libpqxx/portfile.cmake new file mode 100644 index 000000000..2ba92b1cb --- /dev/null +++ b/ports/libpqxx/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jtv/libpqxx + REF 6.0.0 + SHA512 f237cc03c01a8262eee44a9428206c1cc11b6034dddf540afef145f58eee5c32b880d84832563480d73d834c24311170e2ef6789e100793afbe0b6e393bd4169 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config-public-compiler.h.in DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config-internal-compiler.h.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpqxx RENAME copyright) -- cgit v1.2.3 From 147e393362373b88dcad74f21cc1253d66b731d1 Mon Sep 17 00:00:00 2001 From: Andrei Lebedev Date: Wed, 3 Jan 2018 01:54:10 +0300 Subject: [tacopie] Update to 3.2.0 --- ports/tacopie/CONTROL | 2 +- ports/tacopie/fix-cmakelists.patch | 27 +++++++++++++++++++++++++++ ports/tacopie/fix-export.patch | 20 ++++++++++++++++++++ ports/tacopie/portfile.cmake | 22 +++++++++++++++------- 4 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 ports/tacopie/fix-cmakelists.patch create mode 100644 ports/tacopie/fix-export.patch diff --git a/ports/tacopie/CONTROL b/ports/tacopie/CONTROL index c0464c02b..ae46741d5 100644 --- a/ports/tacopie/CONTROL +++ b/ports/tacopie/CONTROL @@ -1,3 +1,3 @@ Source: tacopie -Version: 2.4.1-2 +Version: 3.2.0 Description: Tacopie is a TCP Client & Server C++11 library diff --git a/ports/tacopie/fix-cmakelists.patch b/ports/tacopie/fix-cmakelists.patch new file mode 100644 index 000000000..48ba317bd --- /dev/null +++ b/ports/tacopie/fix-cmakelists.patch @@ -0,0 +1,27 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,6 +26,7 @@ + cmake_minimum_required(VERSION 2.8.7) + set(CMAKE_MACOSX_RPATH 1) + include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) ++include(${CMAKE_ROOT}/Modules/GenerateExportHeader.cmake) + + + ### +@@ -153,6 +154,8 @@ IF (SELECT_TIMEOUT) + set_target_properties(${PROJECT} PROPERTIES COMPILE_DEFINITIONS "__TACOPIE_TIMEOUT=${SELECT_TIMEOUT}") + ENDIF(SELECT_TIMEOUT) + ++generate_export_header(${PROJECT} EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/tacopie/utils/${PROJECT}_export.hpp) ++target_include_directories(${PROJECT} PUBLIC ${CMAKE_BINARY_DIR}) + + ### + # install +@@ -164,6 +167,7 @@ install(DIRECTORY DESTINATION ${CMAKE_BINARY_DIR}/bin/) + install (DIRECTORY ${CMAKE_BINARY_DIR}/lib/ DESTINATION lib USE_SOURCE_PERMISSIONS) + install (DIRECTORY ${CMAKE_BINARY_DIR}/bin/ DESTINATION bin USE_SOURCE_PERMISSIONS) + install (DIRECTORY ${TACOPIE_INCLUDES}/ DESTINATION include USE_SOURCE_PERMISSIONS) ++install (FILES ${CMAKE_BINARY_DIR}/tacopie/utils/${PROJECT}_export.hpp DESTINATION include/tacopie/utils) + + + ### diff --git a/ports/tacopie/fix-export.patch b/ports/tacopie/fix-export.patch new file mode 100644 index 000000000..d971b8338 --- /dev/null +++ b/ports/tacopie/fix-export.patch @@ -0,0 +1,20 @@ +--- a/includes/tacopie/utils/logger.hpp ++++ b/includes/tacopie/utils/logger.hpp +@@ -26,6 +26,8 @@ + #include + #include + ++#include ++ + namespace tacopie { + + //! +@@ -161,7 +163,7 @@ private: + //! variable containing the current logger + //! by default, not set (no logs) + //! +-extern std::unique_ptr active_logger; ++extern TACOPIE_EXPORT std::unique_ptr active_logger; + + //! + //! debug logging diff --git a/ports/tacopie/portfile.cmake b/ports/tacopie/portfile.cmake index dac3cf858..d1e30e67e 100644 --- a/ports/tacopie/portfile.cmake +++ b/ports/tacopie/portfile.cmake @@ -1,17 +1,20 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "cpp-redis only supports static library linkage.") -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Cylix/tacopie - REF 2.4.1 - SHA512 a1579080412114d3899492cd9559bb0eadd6048c1f84ac66ec8ca47bd6fbb35306f0d203d789bd1b7ed0a0a5ab27434dfe6583a1c67873c85bca4b6e2a186d77 + REF 3.2.0 + SHA512 079b294b537aaffe3bcf43a485c3be5b15f633c3f7c70140032d60cb010d35b76e76ef4ddd7596f6bfaf3f7edca7cb086c67552efffbf65846e725d7be54ce72 HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-export.patch +) + if(VCPKG_CRT_LINKAGE STREQUAL dynamic) set(MSVC_RUNTIME_LIBRARY_CONFIG "/MD") else() @@ -27,11 +30,16 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG} + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE ) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/debug/include) +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() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tacopie RENAME copyright) -- cgit v1.2.3 From 68f9f8943114677d6c66d85c14ccd1e5dcca8fd7 Mon Sep 17 00:00:00 2001 From: Andrei Lebedev Date: Wed, 3 Jan 2018 02:03:43 +0300 Subject: [cpp-redis] Update to 4.3.0 --- ports/cpp-redis/CONTROL | 2 +- ports/cpp-redis/fix-cmakelists.patch | 29 +++++++++++++++++++++++++++++ ports/cpp-redis/fix-export.patch | 22 ++++++++++++++++++++++ ports/cpp-redis/portfile.cmake | 26 +++++++++++++++++++------- 4 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 ports/cpp-redis/fix-cmakelists.patch create mode 100644 ports/cpp-redis/fix-export.patch diff --git a/ports/cpp-redis/CONTROL b/ports/cpp-redis/CONTROL index 554755b57..53ed862c2 100644 --- a/ports/cpp-redis/CONTROL +++ b/ports/cpp-redis/CONTROL @@ -1,4 +1,4 @@ Source: cpp-redis -Version: 3.5.2-2 +Version: 4.3.0 Build-Depends: tacopie Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining. diff --git a/ports/cpp-redis/fix-cmakelists.patch b/ports/cpp-redis/fix-cmakelists.patch new file mode 100644 index 000000000..2839ce56f --- /dev/null +++ b/ports/cpp-redis/fix-cmakelists.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ae20868..01bb84c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,6 +26,7 @@ + cmake_minimum_required(VERSION 2.8.7) + set(CMAKE_MACOSX_RPATH 1) + include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) ++include(${CMAKE_ROOT}/Modules/GenerateExportHeader.cmake) + + + ### +@@ -170,6 +171,8 @@ if(USE_CUSTOM_TCP_CLIENT) + set_target_properties(${PROJECT} PROPERTIES COMPILE_DEFINITIONS "__CPP_REDIS_USE_CUSTOM_TCP_CLIENT=${USE_CUSTOM_TCP_CLIENT}") + endif(USE_CUSTOM_TCP_CLIENT) + ++generate_export_header(${PROJECT} EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/cpp_redis/misc/${PROJECT}_export.hpp) ++target_include_directories(${PROJECT} PUBLIC ${CMAKE_BINARY_DIR}) + + ### + # install +@@ -181,6 +184,7 @@ install(DIRECTORY DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + install(DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} DESTINATION lib USE_SOURCE_PERMISSIONS) + install(DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DESTINATION bin USE_SOURCE_PERMISSIONS) + install(DIRECTORY ${CPP_REDIS_INCLUDES}/ DESTINATION include USE_SOURCE_PERMISSIONS) ++install (FILES ${CMAKE_BINARY_DIR}/cpp_redis/misc/${PROJECT}_export.hpp DESTINATION include/cpp_redis/misc) + + + ### diff --git a/ports/cpp-redis/fix-export.patch b/ports/cpp-redis/fix-export.patch new file mode 100644 index 000000000..1b071c511 --- /dev/null +++ b/ports/cpp-redis/fix-export.patch @@ -0,0 +1,22 @@ +diff --git a/includes/cpp_redis/misc/logger.hpp b/includes/cpp_redis/misc/logger.hpp +index d79a98f..bfb33b9 100644 +--- a/includes/cpp_redis/misc/logger.hpp ++++ b/includes/cpp_redis/misc/logger.hpp +@@ -26,6 +26,8 @@ + #include + #include + ++#include ++ + namespace cpp_redis { + + //! +@@ -161,7 +163,7 @@ private: + //! variable containing the current logger + //! by default, not set (no logs) + //! +-extern std::unique_ptr active_logger; ++extern CPP_REDIS_EXPORT std::unique_ptr active_logger; + + //! + //! debug logging diff --git a/ports/cpp-redis/portfile.cmake b/ports/cpp-redis/portfile.cmake index 3a560a047..ea0ea1194 100644 --- a/ports/cpp-redis/portfile.cmake +++ b/ports/cpp-redis/portfile.cmake @@ -1,17 +1,20 @@ include(vcpkg_common_functions) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(STATUS "cpp-redis only supports static library linkage.") -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Cylix/cpp_redis - REF 3.5.2 - SHA512 d19445c93fad9fba39c7aed07b2d196ec0c96366324a2a2ee856c930683b5428fe8b5bc46de4b2b23112aae83f8229a4703c2355d1c74831602ec3a7f8dac315 + REF 4.3.0 + SHA512 d4a2865b72b4dfa80b6d3c004245014a77e74d4a3d254d6b0a9d50e890a22dc3d9ce54688a8c9185ecee9bbf8cdf76046a9788c70887ccf8a08d5cdcef298b46 HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-export.patch +) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/tacopie/CMakeLists.txt DESTINATION ${SOURCE_PATH}/tacopie) if(VCPKG_CRT_LINKAGE STREQUAL dynamic) @@ -29,11 +32,12 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG} + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE ) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(GLOB_RECURSE FILES "${CURRENT_PACKAGES_DIR}/include/*") foreach(file ${FILES}) @@ -42,6 +46,14 @@ foreach(file ${FILES}) file(WRITE ${file} "${_contents}") endforeach() +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/lib ${CURRENT_PACKAGES_DIR}/debug/bin/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/lib ${CURRENT_PACKAGES_DIR}/bin/bin DESTINATION ${CURRENT_PACKAGES_DIR}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/lib ${CURRENT_PACKAGES_DIR}/debug/bin/bin ${CURRENT_PACKAGES_DIR}/lib/lib ${CURRENT_PACKAGES_DIR}/bin/bin) + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpp-redis RENAME copyright) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + vcpkg_copy_pdbs() -- cgit v1.2.3 From be5e529bb3e8483e5675488232d936e7d7d29ceb Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Wed, 3 Jan 2018 10:57:46 +0100 Subject: Update cmake to 3.10.1 --- README.md | 2 +- scripts/fetchDependency.ps1 | 12 ++++++------ toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9ff217564..6cb2d9755 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Prerequisites: - Windows 10, 8.1, or 7 - Visual Studio 2017 or Visual Studio 2015 Update 3 - Git -- *Optional: CMake 3.10.0* +- *Optional: CMake 3.10.1* Clone this repository, then run ``` diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index f62fe450c..168c2359e 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -20,12 +20,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.10.0" - $downloadVersion = "3.10.0" - $url = "https://cmake.org/files/v3.10/cmake-3.10.0-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.10.0-win32-x86.zip" - $expectedDownloadedFileHash = "dce666e897f95a88d3eed6cddd1faa3f44179d519b33ca6065b385bbc7072419" - $executableFromDownload = "$downloadsDir\cmake-3.10.0-win32-x86\bin\cmake.exe" + $requiredVersion = "3.10.1" + $downloadVersion = "3.10.1" + $url = "https://cmake.org/files/v3.10/cmake-3.10.1-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.10.1-win32-x86.zip" + $expectedDownloadedFileHash = "6fe010cce1201d884cd7a9535db8a1f16d98b8965341251fde8f1c5069ee58c0" + $executableFromDownload = "$downloadsDir\cmake-3.10.1-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP } elseif($Dependency -eq "nuget") diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index e64a681e2..70d64de45 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -115,7 +115,7 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { #if defined(_WIN32) - static constexpr std::array EXPECTED_VERSION = {3, 10, 0}; + static constexpr std::array EXPECTED_VERSION = {3, 10, 1}; #else static constexpr std::array EXPECTED_VERSION = {3, 5, 1}; #endif @@ -124,7 +124,7 @@ namespace vcpkg const std::vector from_path = Files::find_from_PATH("cmake"); std::vector candidate_paths; - const fs::path downloaded_copy = downloads_folder / "cmake-3.10.0-win32-x86" / "bin" / "cmake.exe"; + const fs::path downloaded_copy = downloads_folder / "cmake-3.10.1-win32-x86" / "bin" / "cmake.exe"; #if defined(_WIN32) candidate_paths.push_back(downloaded_copy); #endif -- cgit v1.2.3 From 43aec468a14993044b9d6fd89d124c1371edba64 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Wed, 3 Jan 2018 10:58:59 +0100 Subject: Remove workaround for a bug in FindMPI.cmake that was introduced in cmake 3.10.0 and fixed in 3.10.1 --- scripts/buildsystems/vcpkg.cmake | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index b8d3fbdbb..7ebe695fb 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -207,17 +207,6 @@ macro(find_package name) add_library(tinyxml2 INTERFACE IMPORTED) set_target_properties(tinyxml2 PROPERTIES INTERFACE_LINK_LIBRARIES "tinyxml2_static") endif() - elseif("${name}" STREQUAL "MPI") - if(MPI_C_LIB_NAMES) - set(MPI_C_WORKS TRUE) - set(MPI_C_WRAPPER_FOUND TRUE) - endif() - if(MPI_CXX_LIB_NAMES) - set(MPI_CXX_WORKS TRUE) - set(MPI_CXX_WRAPPER_FOUND TRUE) - set(MPI_CXX_VALIDATE_SKIP_MPICXX TRUE) - endif() - _find_package(${ARGV}) else() _find_package(${ARGV}) endif() -- cgit v1.2.3 From 01995a5b7e23fb75e3d22a4c9813a03b69a15923 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Wed, 3 Jan 2018 12:03:29 +0100 Subject: Update szip to 2.1.1 --- ports/szip/CONTROL | 2 +- ports/szip/disable-static-lib-in-shared-build.patch | 15 +++++++++++++-- ports/szip/portfile.cmake | 21 ++++----------------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/ports/szip/CONTROL b/ports/szip/CONTROL index c775581ad..37923213a 100644 --- a/ports/szip/CONTROL +++ b/ports/szip/CONTROL @@ -1,3 +1,3 @@ Source: szip -Version: 2.1-2 +Version: 2.1.1 Description: Szip compression software, providing lossless compression of scientific data diff --git a/ports/szip/disable-static-lib-in-shared-build.patch b/ports/szip/disable-static-lib-in-shared-build.patch index f06e6dcf6..02110cb2a 100644 --- a/ports/szip/disable-static-lib-in-shared-build.patch +++ b/ports/szip/disable-static-lib-in-shared-build.patch @@ -1,5 +1,5 @@ ---- a/src/CMakeLists.txt Mon Aug 03 17:10:33 2015 -+++ b/src/CMakeLists.txt Fri Jan 13 09:38:07 2017 +--- a/src/CMakeLists.txt Fri Feb 03 20:42:43 2017 ++++ b/src/CMakeLists.txt Wed Jan 03 11:42:51 2018 @@ -22,20 +22,22 @@ ${SZIP_SRC_SOURCE_DIR}/szlib.h ) @@ -37,3 +37,14 @@ if (BUILD_SHARED_LIBS) add_library (${SZIP_LIBSH_TARGET} SHARED ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS}) +@@ -62,8 +64,9 @@ + if (SZIP_EXPORTED_TARGETS) + if (BUILD_SHARED_LIBS) + INSTALL_TARGET_PDB (${SZIP_LIBSH_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries) ++ else() ++ INSTALL_TARGET_PDB (${SZIP_LIB_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries) + endif (BUILD_SHARED_LIBS) +- INSTALL_TARGET_PDB (${SZIP_LIB_TARGET} ${SZIP_INSTALL_BIN_DIR} libraries) + + install ( + TARGETS diff --git a/ports/szip/portfile.cmake b/ports/szip/portfile.cmake index 957d91ea1..39d5646ee 100644 --- a/ports/szip/portfile.cmake +++ b/ports/szip/portfile.cmake @@ -1,25 +1,12 @@ include(vcpkg_common_functions) -# set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/szip-2.1) -# vcpkg_download_distfile(ARCHIVE -# URLS "https://support.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz" -# FILENAME "szip-2.1.tar.gz" -# SHA512 ea91b877bb061fe6c96988a3c4b705e101a6950e34e9be53d6a57455c6a625be0afa60f4a3cfdd09649205b9f8586cc25ea60fe07a8131579acf3826b35fb749 -# ) -# vcpkg_extract_source_archive(${ARCHIVE}) - -# NOTE: We use Szip from the HDF5 cmake package dir, because it includes a lot of fixes for the CMake build files - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CMake-hdf5-1.10.0-patch1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/szip-2.1.1) vcpkg_download_distfile(ARCHIVE - URLS "http://hdf4.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0-patch1/src/CMake-hdf5-1.10.0-patch1.zip" - FILENAME "CMake-hdf5-1.10.0-patch1.zip" - SHA512 ec2edb43438661323be5998ecf64c4dd537ddc7451e31f89390260d16883e60a1ccc1bf745bcb809af22f2bf7157d50331a33910b8ebf5c59cd50693dfb2ef8f + URLS "https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz" + FILENAME "szip-2.1.1.tar.gz" + SHA512 ada6406efb096cd8a2daf8f9217fe9111a96dcae87e29d1c31f58ddd2ad2aa7bac03f23c7205dc9360f3b62d259461759330c7189ef0c2fe559704b1ea9d40dd ) vcpkg_extract_source_archive(${ARCHIVE}) -set(ARCHIVE ${SOURCE_PATH}/SZip.tar.gz) -vcpkg_extract_source_archive(${ARCHIVE}) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Szip) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 7d48a73928f3134604cbc7075ef535568c06ed5f Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Wed, 3 Jan 2018 13:28:42 +0100 Subject: Update HDF5 to 1.10.1 --- ports/hdf5/CONTROL | 2 +- ports/hdf5/disable-static-libs.patch | 105 +++++++++++++++++++------------- ports/hdf5/link-libraries-private.patch | 16 +++-- ports/hdf5/portfile.cmake | 8 +-- 4 files changed, 76 insertions(+), 55 deletions(-) diff --git a/ports/hdf5/CONTROL b/ports/hdf5/CONTROL index 38a0b8382..292e14331 100644 --- a/ports/hdf5/CONTROL +++ b/ports/hdf5/CONTROL @@ -1,4 +1,4 @@ Source: hdf5 -Version: 1.10.0-patch1-2 +Version: 1.10.1 Description: HDF5 is a data model, library, and file format for storing and managing data Build-Depends: zlib, szip, msmpi diff --git a/ports/hdf5/disable-static-libs.patch b/ports/hdf5/disable-static-libs.patch index 4b7b440ec..4d33c5e45 100644 --- a/ports/hdf5/disable-static-libs.patch +++ b/ports/hdf5/disable-static-libs.patch @@ -1,12 +1,10 @@ -diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt -index 872e42d..146d0a9 100644 ---- a/hl/src/CMakeLists.txt -+++ b/hl/src/CMakeLists.txt -@@ -29,16 +29,20 @@ set (HL_HEADERS +--- a/hl/src/CMakeLists.txt Thu Apr 13 18:26:10 2017 ++++ b/hl/src/CMakeLists.txt Wed Jan 03 13:13:06 2018 +@@ -29,16 +29,20 @@ ${HDF5_HL_SRC_SOURCE_DIR}/hdf5_hl.h ) --add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SRCS} ${HL_HEADERS}) +-add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS}) -TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) -H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC) @@ -19,7 +17,7 @@ index 872e42d..146d0a9 100644 +set (install_targets) + +if (NOT DISABLE_STATIC_LIBS) -+ add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SRCS} ${HL_HEADERS}) ++ add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS}) + TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ") + target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) + H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC) @@ -28,16 +26,25 @@ index 872e42d..146d0a9 100644 + INTERFACE_INCLUDE_DIRECTORIES "$/include>" + ) + set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_LIB_TARGET}") -+ set (install_targets ${install_targets} ${HDF5_HL_LIB_TARGET}) -+endif (NOT DISABLE_STATIC_LIBS) ++ set (install_targets ${HDF5_HL_LIB_TARGET}) ++endif () if (BUILD_SHARED_LIBS) - add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SRCS} ${HL_HEADERS}) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index d93612b..a63cc3a 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -851,30 +851,33 @@ add_custom_command ( + add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS}) +@@ -73,8 +77,9 @@ + if (HDF5_EXPORTED_TARGETS) + if (BUILD_SHARED_LIBS) + INSTALL_TARGET_PDB (${HDF5_HL_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries) ++ else () ++ INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries) + endif () +- INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hllibraries) + + install ( + TARGETS +--- a/src/CMakeLists.txt Thu Apr 13 18:26:11 2017 ++++ b/src/CMakeLists.txt Wed Jan 03 13:03:05 2018 +@@ -876,30 +876,33 @@ #----------------------------------------------------------------------------- set (gen_SRCS ${HDF5_BINARY_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c) @@ -45,46 +52,62 @@ index d93612b..a63cc3a 100644 -TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS}) -if (NOT WIN32) -+set (install_targets) -+if (NOT DISABLE_STATIC_LIBS) -+ add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) -+ TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ") -+ target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS}) -+ if (NOT WIN32) - target_link_libraries (${HDF5_LIB_TARGET} dl) --endif (NOT WIN32) +- target_link_libraries (${HDF5_LIB_TARGET} dl) +-endif () -if (H5_HAVE_PARALLEL AND MPI_C_FOUND) -+ endif (NOT WIN32) -+ if (H5_HAVE_PARALLEL AND MPI_C_FOUND) - target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES}) --endif (H5_HAVE_PARALLEL AND MPI_C_FOUND) +- target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES}) +-endif () -set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) -H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC) -set_target_properties (${HDF5_LIB_TARGET} PROPERTIES - FOLDER libraries - INTERFACE_INCLUDE_DIRECTORIES "$/include>" -) -+ endif (H5_HAVE_PARALLEL AND MPI_C_FOUND) +- +-option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF) +-if (HDF5_ENABLE_DEBUG_APIS) ++set (install_targets) ++if (NOT DISABLE_STATIC_LIBS) ++ add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) ++ TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ") ++ target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS}) ++ if (NOT WIN32) ++ target_link_libraries (${HDF5_LIB_TARGET} dl) ++ endif () ++ if (H5_HAVE_PARALLEL AND MPI_C_FOUND) ++ target_link_libraries (${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES}) ++ endif () + set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) + H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC) -+ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES + set_target_properties (${HDF5_LIB_TARGET} PROPERTIES +- COMPILE_DEFINITIONS +- "H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG" + FOLDER libraries + INTERFACE_INCLUDE_DIRECTORIES "$/include>" -+ ) - --option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF) --if (HDF5_ENABLE_DEBUG_APIS) + ) ++ + option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF) + if (HDF5_ENABLE_DEBUG_APIS) - set_target_properties (${HDF5_LIB_TARGET} PROPERTIES - COMPILE_DEFINITIONS - "H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG" - ) --endif (HDF5_ENABLE_DEBUG_APIS) ++ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES ++ COMPILE_DEFINITIONS ++ "H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG" ++ ) ++ endif () ++ set (install_targets ${HDF5_LIB_TARGET}) + endif () -set (install_targets ${HDF5_LIB_TARGET}) -+ endif (HDF5_ENABLE_DEBUG_APIS) -+ set (install_targets ${install_targets} ${HDF5_LIB_TARGET}) -+endif (NOT DISABLE_STATIC_LIBS) if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${HDF5_BINARY_DIR}/shared") +@@ -975,8 +978,10 @@ + if (HDF5_EXPORTED_TARGETS) + if (BUILD_SHARED_LIBS) + INSTALL_TARGET_PDB (${HDF5_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries) ++ else () ++ INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries) + endif () +- INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} libraries) ++ + + install ( + TARGETS diff --git a/ports/hdf5/link-libraries-private.patch b/ports/hdf5/link-libraries-private.patch index 15db78a2d..df423b8bb 100644 --- a/ports/hdf5/link-libraries-private.patch +++ b/ports/hdf5/link-libraries-private.patch @@ -1,8 +1,6 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index a63cc3a..aea963d 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -900,12 +900,12 @@ if (BUILD_SHARED_LIBS) +--- a/src/CMakeLists.txt Wed Jan 03 13:16:33 2018 ++++ b/src/CMakeLists.txt Wed Jan 03 13:16:56 2018 +@@ -925,12 +925,12 @@ set (shared_gen_SRCS ${HDF5_BINARY_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c) add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ") @@ -11,19 +9,19 @@ index a63cc3a..aea963d 100644 if (NOT WIN32) - target_link_libraries (${HDF5_LIBSH_TARGET} dl) + target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE dl) - endif (NOT WIN32) + endif () if (H5_HAVE_PARALLEL AND MPI_C_FOUND) - target_link_libraries (${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES}) + target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE ${MPI_C_LIBRARIES}) - endif (H5_HAVE_PARALLEL AND MPI_C_FOUND) + endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) -@@ -920,7 +920,7 @@ if (BUILD_SHARED_LIBS) +@@ -945,7 +945,7 @@ APPEND PROPERTY COMPILE_DEFINITIONS "H5_HAVE_THREADSAFE" ) - target_link_libraries (${HDF5_LIBSH_TARGET} Threads::Threads) + target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE Threads::Threads) - endif (HDF5_ENABLE_THREADSAFE) + endif () if (HDF5_ENABLE_DEBUG_APIS) diff --git a/ports/hdf5/portfile.cmake b/ports/hdf5/portfile.cmake index 000ed6a31..bbfec2188 100644 --- a/ports/hdf5/portfile.cmake +++ b/ports/hdf5/portfile.cmake @@ -3,11 +3,11 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CMake-hdf5-1.10.0-patch1/hdf5-1.10.0-patch1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CMake-hdf5-1.10.1/hdf5-1.10.1) vcpkg_download_distfile(ARCHIVE - URLS "http://hdf4.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0-patch1/src/CMake-hdf5-1.10.0-patch1.zip" - FILENAME "CMake-hdf5-1.10.0-patch1.zip" - SHA512 ec2edb43438661323be5998ecf64c4dd537ddc7451e31f89390260d16883e60a1ccc1bf745bcb809af22f2bf7157d50331a33910b8ebf5c59cd50693dfb2ef8f + URLS "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.1/src/CMake-hdf5-1.10.1.zip" + FILENAME "CMake-hdf5-1.10.1.zip" + SHA512 0045a6301c6e3479be70f025d8690297ff33b9e6e99ec217a33e9b916d9410fb3f7110b7361fbeaec163c35b8e6bd948ac8d5fdace80930c98c6a0b27c6fd5c4 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From ca9f73935def43ec291fb7440465c9fde09033c4 Mon Sep 17 00:00:00 2001 From: clvn <2023066+clvn@users.noreply.github.com> Date: Wed, 3 Jan 2018 17:58:04 +0100 Subject: [soundtouch] Initial port (#2455) * [soundtouch] Initial port * [soundtouch] Fixed typo --- ports/soundtouch/CONTROL | 4 +++ ports/soundtouch/portfile.cmake | 70 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 ports/soundtouch/CONTROL create mode 100644 ports/soundtouch/portfile.cmake diff --git a/ports/soundtouch/CONTROL b/ports/soundtouch/CONTROL new file mode 100644 index 000000000..c4bc8df52 --- /dev/null +++ b/ports/soundtouch/CONTROL @@ -0,0 +1,4 @@ +Source: soundtouch +Version: 2.0.0.2 +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 diff --git a/ports/soundtouch/portfile.cmake b/ports/soundtouch/portfile.cmake new file mode 100644 index 000000000..42c055312 --- /dev/null +++ b/ports/soundtouch/portfile.cmake @@ -0,0 +1,70 @@ +include(vcpkg_common_functions) + +# NOTE: SoundTouch has a static c++ version too, but entirely different headers, api, etc +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building not supported. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "WindowsStore not supported") +endif() + +set(VERSION 2.0.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/soundtouch) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.surina.net/soundtouch/soundtouch-${VERSION}.zip" + FILENAME "soundtouch-${VERSION}.zip" + SHA512 50ef36b6cd21c16e235b908c5518e29b159b11f658a014c47fe767d3d8acebaefefec0ce253b4ed322cbd26387c69c0ed464ddace0c098e61d56d55c198117a5 +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_execute_required_process( + COMMAND "devenv.exe" + "SoundTouchDLL.sln" + /Upgrade + WORKING_DIRECTORY ${SOURCE_PATH}/source/SoundTouchDLL + LOGNAME upgrade-Packet-${TARGET_TRIPLET} +) + +IF (TRIPLET_SYSTEM_ARCH MATCHES "x64") + # There is no x64 Debug target + SET(BUILD_RELEASE_CONFIGURATION "ReleaseX64") + SET(BUILD_DEBUG_CONFIGURATION "ReleaseX64") +ELSE() + SET(BUILD_RELEASE_CONFIGURATION "Release") + SET(BUILD_DEBUG_CONFIGURATION "Debug") +ENDIF() + +SET(BUILD_ARCH "Win32") + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/source/SoundTouchDLL/SoundTouchDLL.sln + PLATFORM ${BUILD_ARCH} + RELEASE_CONFIGURATION ${BUILD_RELEASE_CONFIGURATION} + DEBUG_CONFIGURATION ${BUILD_DEBUG_CONFIGURATION} +) + +file(INSTALL ${SOURCE_PATH}/source/SoundTouchDLL/SoundTouchDLL.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle libraries +IF (BUILD_RELEASE_CONFIGURATION STREQUAL ReleaseX64) + file(INSTALL ${SOURCE_PATH}/lib/SoundTouch_x64.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SOURCE_PATH}/lib/SoundTouchDll_x64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +ELSE() + file(INSTALL ${SOURCE_PATH}/lib/SoundTouch.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SOURCE_PATH}/lib/SoundTouchDll.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +ENDIF() + +IF (BUILD_DEBUG_CONFIGURATION STREQUAL ReleaseX64) + file(INSTALL ${SOURCE_PATH}/lib/SoundTouch_x64.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${SOURCE_PATH}/lib/SoundTouchDll_x64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +ELSE() + file(INSTALL ${SOURCE_PATH}/lib/SoundTouchD.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${SOURCE_PATH}/lib/SoundTouchDllD.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +ENDIF() + +file(COPY ${SOURCE_PATH}/COPYING.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/soundtouch) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/soundtouch/COPYING.TXT ${CURRENT_PACKAGES_DIR}/share/soundtouch/copyright) -- cgit v1.2.3 From 7f9ca12c4c66a0e4043c5999b098fe9f721f9d1b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 3 Jan 2018 14:30:30 -0800 Subject: [vcpkg-download-distfile] Fix #2426 --- scripts/cmake/vcpkg_download_distfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 24503338a..2055139f5 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -45,7 +45,7 @@ function(vcpkg_download_distfile VAR) if(NOT DEFINED vcpkg_download_distfile_FILENAME) message(FATAL_ERROR "vcpkg_download_distfile requires a FILENAME argument.") endif() - if(NOT DEFINED vcpkg_download_distfile_SHA512) + if(NOT _VCPKG_INTERNAL_NO_HASH_CHECK AND NOT DEFINED vcpkg_download_distfile_SHA512) message(FATAL_ERROR "vcpkg_download_distfile requires a SHA512 argument.") endif() -- cgit v1.2.3 From a28138eb9ef8d2986227b7cd784be9ffa8492a46 Mon Sep 17 00:00:00 2001 From: Jacek Blaszczynski Date: Thu, 4 Jan 2018 00:19:52 +0100 Subject: Add preliminary support for arm-windows and arm64-windows triplets (#2371) * Add preliminary support for arm-windows and arm64-windows triplets Visual Studio 15.4 shipped with new VC tools targeting arm and arm64 for desktop. This change allows for recognition and usage of new triplets supporting arm and arm64 Windows desktop and server targets. * Remove unnecessary changes * Part 2 * Part 3 * Make detection of Arm64 _VCPKG_TARGET_ARCHITECTURE precise * Enforce usage of Visual Studio CMake generatorfor arm and temporarily arm64 targets * Address code review feedback, clean libjpeg-turbo port.cmake * [libjpeg-turbo][tiff] Reduce changes to existing libraries. * [vcpkg-cmake] Simplify toolchain selection logic and improve comments --- ports/libjpeg-turbo/portfile.cmake | 15 ++++++------ ports/tiff/portfile.cmake | 5 ++++ scripts/buildsystems/msbuild/vcpkg.targets | 15 ++++++++++++ scripts/buildsystems/vcpkg.cmake | 5 ++++ scripts/cmake/vcpkg_configure_cmake.cmake | 37 +++++++++++++++--------------- toolsrc/include/vcpkg/triplet.h | 3 +++ toolsrc/src/vcpkg/triplet.cpp | 3 +++ triplets/arm-windows.cmake | 5 ++++ triplets/arm64-windows.cmake | 5 ++++ 9 files changed, 67 insertions(+), 26 deletions(-) create mode 100644 triplets/arm-windows.cmake create mode 100644 triplets/arm64-windows.cmake diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index 1d45087b0..a3e882b1f 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -12,18 +12,19 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-options-for-exes-docs-headers.patch" ) -vcpkg_find_acquire_program(NASM) -get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(LIBJPEGTURBO_SIMD -DWITH_SIMD=OFF) +else() + set(LIBJPEGTURBO_SIMD -DWITH_SIMD=ON) + vcpkg_find_acquire_program(NASM) + get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) + set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") +endif() string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_CRT_DLL) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set(LIBJPEGTURBO_SIMD -DWITH_SIMD=OFF) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA diff --git a/ports/tiff/portfile.cmake b/ports/tiff/portfile.cmake index bfa1c3853..292389350 100644 --- a/ports/tiff/portfile.cmake +++ b/ports/tiff/portfile.cmake @@ -18,6 +18,10 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/crt-secure-no-deprecate.patch ) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set (TIFF_CXX_TARGET -Dcxx=OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -28,6 +32,7 @@ vcpkg_configure_cmake( -DBUILD_TESTS=OFF -Djbig=OFF # This is disabled by default due to GPL/Proprietary licensing. -Djpeg12=OFF + ${TIFF_CXX_TARGET} ) vcpkg_install_cmake() diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 092e013b5..499052e4d 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -24,6 +24,16 @@ x64-windows + + true + arm-windows + + + + true + arm64-windows + + true x64-uwp @@ -34,6 +44,11 @@ arm-uwp + + true + arm64-uwp + + $(Configuration) Debug diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 7ebe695fb..f157d3236 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -22,6 +22,8 @@ elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$") set(_VCPKG_TARGET_TRIPLET_ARCH x64) elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$") set(_VCPKG_TARGET_TRIPLET_ARCH arm) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]64$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm64) else() if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$") set(_VCPKG_TARGET_TRIPLET_ARCH x64) @@ -41,6 +43,8 @@ else() set(_VCPKG_TARGET_TRIPLET_ARCH x64) elseif(_VCPKG_CL MATCHES "arm/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(_VCPKG_CL MATCHES "arm64/cl.exe$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm64) elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") @@ -105,6 +109,7 @@ if (NOT DEFINED CMAKE_SYSTEM_VERSION AND _VCPKG_TARGET_TRIPLET_PLAT MATCHES "win vcpkg_get_windows_sdk(WINDOWS_SDK_VERSION) unset(VCPKG_ROOT_DIR) set(CMAKE_SYSTEM_VERSION ${WINDOWS_SDK_VERSION} CACHE STRING "Windows SDK version") + message(STATUS "Found Windows SDK ${WINDOWS_SDK_VERSION}") endif() file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 4bcf3d2c9..6e2ec4ef5 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -57,40 +57,39 @@ function(vcpkg_configure_cmake) set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) endif() + set(NINJA_CAN_BE_USED ON) + if(_csc_HOST_ARCHITECTURE STREQUAL "x86") + # Prebuilt ninja binaries are only provided for x64 hosts + set(NINJA_CAN_BE_USED OFF) + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + # Ninja and MSBuild have many differences when targetting UWP, so use MSBuild to maximize existing compatibility + set(NINJA_CAN_BE_USED OFF) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + # Arm64 usage should be allowed once github issue #2375 is resolved + set(NINJA_CAN_BE_USED OFF) + endif() + if(_csc_GENERATOR) set(GENERATOR ${_csc_GENERATOR}) - elseif(_csc_PREFER_NINJA AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT _csc_HOST_ARCHITECTURE STREQUAL "x86") + elseif(_csc_PREFER_NINJA AND NINJA_CAN_BE_USED) + set(GENERATOR "Ninja") + elseif(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) set(GENERATOR "Ninja") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") set(GENERATOR "Visual Studio 12 2013") elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") set(GENERATOR "Visual Studio 12 2013 Win64") elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") set(GENERATOR "Visual Studio 12 2013 ARM") - elseif(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) - set(GENERATOR "Ninja") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") - set(GENERATOR "Visual Studio 14 2015") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") - set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") - set(GENERATOR "Visual Studio 14 2015 ARM") + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 ARM") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(GENERATOR "Visual Studio 15 2017") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(GENERATOR "Visual Studio 15 2017 Win64") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(GENERATOR "Visual Studio 15 2017 ARM") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(GENERATOR "Visual Studio 15 2017") - set(ARCH "ARM64") elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(GENERATOR "Visual Studio 15 2017") elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") diff --git a/toolsrc/include/vcpkg/triplet.h b/toolsrc/include/vcpkg/triplet.h index 2cfc2d02a..10464dc2c 100644 --- a/toolsrc/include/vcpkg/triplet.h +++ b/toolsrc/include/vcpkg/triplet.h @@ -18,6 +18,9 @@ namespace vcpkg static const Triplet X86_UWP; static const Triplet X64_UWP; static const Triplet ARM_UWP; + static const Triplet ARM64_UWP; + static const Triplet ARM_WINDOWS; + static const Triplet ARM64_WINDOWS; const std::string& canonical_name() const; const std::string& to_string() const; diff --git a/toolsrc/src/vcpkg/triplet.cpp b/toolsrc/src/vcpkg/triplet.cpp index 4cba1523d..ef0fab183 100644 --- a/toolsrc/src/vcpkg/triplet.cpp +++ b/toolsrc/src/vcpkg/triplet.cpp @@ -36,6 +36,9 @@ namespace vcpkg const Triplet Triplet::X86_UWP = from_canonical_name("x86-uwp"); const Triplet Triplet::X64_UWP = from_canonical_name("x64-uwp"); const Triplet Triplet::ARM_UWP = from_canonical_name("arm-uwp"); + const Triplet Triplet::ARM64_UWP = from_canonical_name("arm64-uwp"); + const Triplet Triplet::ARM_WINDOWS = from_canonical_name("arm-windows"); + const Triplet Triplet::ARM64_WINDOWS = from_canonical_name("arm64-windows"); bool Triplet::operator==(const Triplet& other) const { return this->m_instance == other.m_instance; } diff --git a/triplets/arm-windows.cmake b/triplets/arm-windows.cmake new file mode 100644 index 000000000..3aa75933f --- /dev/null +++ b/triplets/arm-windows.cmake @@ -0,0 +1,5 @@ +set(VCPKG_TARGET_ARCHITECTURE arm) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + + diff --git a/triplets/arm64-windows.cmake b/triplets/arm64-windows.cmake new file mode 100644 index 000000000..ac911c476 --- /dev/null +++ b/triplets/arm64-windows.cmake @@ -0,0 +1,5 @@ +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + + -- cgit v1.2.3 From 520dfe11bc25069062d2886135f3829335f4fa5a Mon Sep 17 00:00:00 2001 From: Guillaume Lachance Date: Wed, 3 Jan 2018 18:22:55 -0500 Subject: ignore custom triplets (#2210) * [vcpkg] Further fix for clang/gcc * [vcpkg] Only default target triplet to windows if on windows * [mpfr] add MPFR_USE_INTMAX_T * [mpfr] prepend stdint to header * [mpfr] fix portfile * [mpfr] fix source path * [mpfr] define have_stdint_h * [mpfr] revert portfile patch * [mpfr] prefer ninja * [mpfr] bump version * Updated benchmark to v1.3 * [libmspack] Initial port. * [vcpkg] Add --x-xunit internal command to print installation results in a VSTS friendly format. * [many ports] Updates to latest * [llvm] Fail early on UWP * [netcdf-c] Fix x64-windows-static builds * [harfbuzz] Revert upgrade due to regression * Exit early if no VS is found * [libsodium] Fix static build trying to copy dlls * Specify VSLANG=1033 to use english locale in builds Resolves several locale-specific issues outside our control * Exclude and warn about VS instances without English language pack Resolves several locale-specific issues outside our control * [botan] Revert upgrade due to regressions * [vlpp] initial create * [vlpp] add the CppMerge.exe tool * libuv: update to v1.18.0 * [hotfix] Remove VSLANG=1033. It is causing a lot of Process creation failed with error code: 87 * Properly fix VSLANG=1033 * [vcpkg-contact-survey] Add monthly survey prompt * Update libtorrent to 1.1.5 * [speex] Fix debug mode .def file. Add exports for extern globals. * [scintilla] Initial port. * Flint: enable DLL builds (#2271) * [flint] enable dynamic building * [flint] increment version * [sciter] Update to 4.0.6.5590 * Add `vcpkg integrate powershell` for tab completion * [autocomplete] Add info in README.md * [aws-sdk-cpp] update to 1.3.15 * Update CHANGELOG and bump version to v0.0.100 * Adding re2 port * [re2] Use vcpkg_from_github() * [re2] Don't pass BUILD_SHARED_LIBS BUILD_SHARED_LIBS should not be locked to shared/static, because the other type will fail. Vcpkg was overriding this flag before, so no behavior change. (i.e. static builds worked before as well). Also tests = OFF. * crow initial port * fcl: add missing dependencies within cmake Signed-off-by: Tobias Kohlbau * Fix pcl/CMakeLists fot Visual Studio 2017 Fix conditional branch for Visual C++ 2017. Visual C++ 2017 has a version number 191x. * [vcpkg-msbuild-integration] Address #2299 by using full path to powershell. * Fix path to powershell.exe https://github.com/Microsoft/vcpkg/issues/2299 * Improve error message when failing to parse package * [ms-gsl] update to 2017-12-04 * [ms-gsl] simplify portfile * Adaptation for so-5.5.20-beta1 * Improve error message on invalid dependency of package * [libsodium] Disable tests Also, this is a workaround for x64-windows-static taking forever in VS2017 15.5 * updata live555 live555-latest * [gmime] Update to version 3.0.5. * curl: update to v7.57.0 Due to changes in curl's CMake support, where it now installs .cmake files, we now have to make sure that they are installed into the correct directory (and not duplicated into the debug/share/ directory, either). Also, a change in the context of the 2nd patch required an update of said patch. Signed-off-by: Johannes Schindelin * [live555] Set version instead of latest and update CONTROL file * openssl: update to v1.0.2n The patch to allow for spaces in paths while running the Perl helpers is no longer necessary, and was dropped. Signed-off-by: Johannes Schindelin * [ACE] 6.4.6 * Update for sobjectizer v.5.5.20 * [jansson] Prefer ninja * [openssl] Remove entry of removed patch * [unicorn] Adding unicorn port * Improve vcpkgExtractFile. Also merge vcpkgRemoveDirectory/File * [vcpkg-cmake-toolchain] Use list(APPEND) instead of set(). Fixes #2336. Fix MPI issue introduced in cmake 3.10. Fixes #2317. Add _VCPKG_ROOT_DIR to persisted variables to reduce disk access during cmake reconfigure. * [gtest] Remove renaming of DLLs -- only the import libs need renaming. * [unicorn] Adjust handling of CRT and LIBRARY LINKAGE. Reformat to LF. * [mbedtls] Initial port. (#2286) * mbedtls: init port * add VCPKG_LIBRARY_LINKAGE for static libs only * [mbedtls] Slight cleanup * [tinyexif] add TinyEXIF library (#2221) * alac-decoder (#2176) * [tinyexif] update to version 1.0.1 * [speex] Fix regression for release mode import library * [speex] Fix release mode .def file. Add missing exports (#2340) * [speex] Fix release mode .def file. Add missing exports Fixed .def file in release mode (it is bugged after #2293 fix in d5395ac793d1db78ab97ca144d5e89eabf49a735) https://github.com/Microsoft/vcpkg/issues/2293#issuecomment-350449317 Added exports for speex_header_free and speex_mode_list (https://github.com/Microsoft/vcpkg/issues/2292#issuecomment-348773393) * [speex] Fix regression for release mode import library * [vcpkg-cmake-toolchain] Mark _VCPKG_ROOT_DIR as INTERNAL * [openssl] Add -utf-8 flag * [exiv2] update to latest master and fix debug config * Fix Gtest port fails install when one of the configuration is set to VCPKG_BUILD_TYPE (#2359) * Support build with master/HEAD Gtest will be able to build with master/HEAD. * Fix install when one of the configuration is set to VCPKG_BUILD_TYPE Fix install when one of the configuration is set to VCPKG_BUILD_TYPE. * [powershell] Use \ instead of / for paths. Resolves #2358. Resolves #2361 * Fix fetching dependency text * [vcpkg-upgrade] Initial commit of upgrade command. * [vcpkg-upgrade] Accept list of packages to specifically upgrade. * Upgrade assimp to v4.1.0 (#2364) * [assimp] Update to v4.1.0 and remove code patch which is fixed in new version * [assimp] Fix vcpkg_fixup_cmake_targets argument * [assimp] Fix formatting * Revert "[vcpkg-upgrade] Accept list of packages to specifically upgrade." This reverts commit d88563cd095b9aaad81d57f1c0a254d7e17cf859. * Revert "[vcpkg-upgrade] Initial commit of upgrade command." This reverts commit 803347a0c545687f6e6b8b3594b52d11435491b3. * [vcpkg] Fix regressions introduced with update command. Fixed issue with upgrade where it assumed downloads were not allowed. * [brotli] Fix regressions introduced during update * Add quotation marks to support user profiles with spaces in them * Revert "Add quotation marks to support user profiles with spaces in them" This reverts commit 0ba4b66293085601d458b52ddf30deb07b279fa1. * [vcpkg] Revert revert of #2369. * [tinyxml2] update to 6.0.0 * [vcpkg] Fix regressions in WSL build. * [cpprestsdk] Update to 2.10.1 * [gtest] Fix issue with renaming gtest DLLs in debug mode * Added port brynet - A C++ cross platform high performance TCP network library using C++ 11. * [tbb] Update to 2018_U2 * [gsl-lite] Updated to 0.26.0 * [nlohmann-json] Update to 3.0.0 * Update string-theory to 1.7 * Update Range-V3-VS2015. * [vcpkg] Improve error message upon graph cycle detected. * [glm] Ignore MSVC warning C4201 * [boost] Modularize * [vcpkg-list] Improve list output for long triplets * Update downstream libraries to use modularized boost * [magnum] Remove --trace * [vcpkg-list] Improve list output for long triplets * [llvm] Add atlmfc to dependencies -- fixes #2400 * [vcpkg-integrate-powershell] Fix $false bug. Fixes #2397. * Fix find Boost when can not be found Boost that installed with Vcpkg (#2395) * Fix find Boost when can not be found Boost that installed with Vcpkg Fix find Boost when can not be found Boost that installed with Vcpkg. Re-find package Boost uisng user specified options. * Fix regex of generators Fix regex of generators. Add ending position. * Fix Save and Resore Boost_COMPILER * [vcpkg-cmake-integration] Expand saved boost variables * [sciter] Update to 4.0.7.5637 * Initial experimental re-support for VCPKG_BUILD_TYPE release re-add this commit 5335d17 * [dlib] update to 19.8 * [fftw] Build more libs * Improving support for ITK * [libdatrie] add version 0.2.10 * [alembic] update to 1.7.5 * Added port libqrencode - a fast and compact QR Code encoding library (#2372) * https://github.com/Microsoft/vcpkg/issues/2363 * libqrencode: Added necessary new line at end of CONTROL, portfile.cmake, usage files. Added copying the usage file in portfile.cmake, and removed unnecessary DBUILD_SHARED_LIBS as remarked @ras0219-msft * [libqrencode] Adjust usage to match other packages * libmupdf initial port (#1950) * libmupdf initial port * [libmupdf] Use CMake for buildsystem replacement. * [hpx] Handle boost breaking changes. Fixes #2416. * [folly] Handle boost upgrade * [nghttp2] initial port (dynamic build only). (#2366) * [nghttp2] initial port (dynamic build only). * [nghttp2] Slight tweak * [brynet] Use vcpkg_from_github * [boost] Fix uwp builds on systems with spaces * [assimp] Fix unitialized variable issue. * [libtorrent] Update to more recent snapshot to support boost 1.66 * [assimp] Fixup: add missing patchfile * [vcpkg-download-distfile] Add input sanitization * [boost-python] Fix build. * [qt5] Add atlmfc to dependencies on windows due to tlbase.h inclusion. Fixes #2344. * clang-tidy fixes * [opencv] update to 3.4.0 * [vcpkg-hash] Replace certutil.exe with cmake built-in hash commands * [sciter] Update to 4.0.8.5649 * [directxmesh] Update to the last version (dec2017) * [directxtex] Update to the last version (dec2017) * [directxtk] Update to the last version (dec2017) * Revert "clang-tidy fixes" This reverts commit 2d0a76370ead152896411d17aa19934235b93d1c. * [libgit2] Initial port. * [bullet3] Update from 2.86.1 to 2.87 * Update librealsense v2.8.3 Update librealsense v2.8.3. * [libconfig] update to 1.7.1 * [fmt] update to 4.1.0 * [gainput] Initial port * mpfr: fix download link * [mpir] use vcpkg_from_github * [portmidi] Initial port * [jack2] Initial commit * [libdatrie] fix trietool for MSVC runtime * Fix version * Add support for Box2D to be build as a static library * [asio] swith to vcpkg_from_github() * [nlohmann-json] update to 3.0.1 * [libbson] update to 1.9.0 * [mongo-c-driver] update to 1.9.0 * [harfbuzz] update to 1.7.4 * [jack2] Prefer using vcpkg_from_github. Removed check for Windows Store * [zstd] update to 1.3.3 * Use vcpkg version of BLAS and LAPACK in dlib dlib v19.8 detects these packages correctly * [libpqxx] Initial port * [tacopie] Update to 3.2.0 * [cpp-redis] Update to 4.3.0 * Update cmake to 3.10.1 * Remove workaround for a bug in FindMPI.cmake that was introduced in cmake 3.10.0 and fixed in 3.10.1 * Update szip to 2.1.1 * Update HDF5 to 1.10.1 * [soundtouch] Initial port (#2455) * [soundtouch] Initial port * [soundtouch] Fixed typo * [vcpkg-download-distfile] Fix #2426 * Add preliminary support for arm-windows and arm64-windows triplets (#2371) * Add preliminary support for arm-windows and arm64-windows triplets Visual Studio 15.4 shipped with new VC tools targeting arm and arm64 for desktop. This change allows for recognition and usage of new triplets supporting arm and arm64 Windows desktop and server targets. * Remove unnecessary changes * Part 2 * Part 3 * Make detection of Arm64 _VCPKG_TARGET_ARCHITECTURE precise * Enforce usage of Visual Studio CMake generatorfor arm and temporarily arm64 targets * Address code review feedback, clean libjpeg-turbo port.cmake * [libjpeg-turbo][tiff] Reduce changes to existing libraries. * [vcpkg-cmake] Simplify toolchain selection logic and improve comments * [gitignore] Add new triplets to gitignore --- .gitignore | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.gitignore b/.gitignore index e1954660f..18384e3da 100644 --- a/.gitignore +++ b/.gitignore @@ -279,6 +279,19 @@ downloads/ installed*/ packages/ scripts/buildsystems/tmp/ +#ignore custom triplets +triplets/* +#add vcpkg-designed triplets back in +!triplets/arm-uwp.cmake +!triplets/arm-windows.cmake +!triplets/x64-uwp.cmake +!triplets/x64-windows.cmake +!triplets/x64-windows-static.cmake +!triplets/x86-uwp.cmake +!triplets/x86-windows.cmake +!triplets/x86-windows-static.cmake +!triplets/arm64-uwp.cmake +!triplets/arm64-windows.cmake *.exe *.zip -- cgit v1.2.3 From 3bebb1074420858b9c703865c518cf09438fa52a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 3 Jan 2018 17:37:34 -0800 Subject: [log4cplus] Fix #2457. Update hash. --- ports/log4cplus/portfile.cmake | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ports/log4cplus/portfile.cmake b/ports/log4cplus/portfile.cmake index db694315b..acd101c9b 100644 --- a/ports/log4cplus/portfile.cmake +++ b/ports/log4cplus/portfile.cmake @@ -7,19 +7,20 @@ vcpkg_from_github( HEAD_REF master ) +set(THREADPOOL_REF dda9e3d40502e85ce082c05d2c05c1bc94348b6a) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/log4cplus/ThreadPool/archive/dda9e3d40502e85ce082c05d2c05c1bc94348b6a.tar.gz" - FILENAME "log4cplus-threadpool-97b5877b9c49d02abf.tar.gz" - SHA512 97b5877b9c49d02abfcba4ca1312b833b58e4f0e9884fdcf57c20b7ec58801ed24742c8316512b4de8ab29bae42cc1e34058c0d2443c3a5950a2fb3434f86662 + URLS "https://github.com/log4cplus/ThreadPool/archive/${THREADPOOL_REF}.tar.gz" + FILENAME "log4cplus-threadpool-${THREADPOOL_REF}.tar.gz" + SHA512 225adb11f447495a00e401d32f63d9a7eb3a8191d477a21bfa3c39f1ff5cbe8bfb7770a740e840c5748f816137cdef1a5915b17d16b3dd4c3399d1a67ab0f381 ) vcpkg_extract_source_archive(${ARCHIVE}) file( COPY - ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-master/COPYING - ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-master/example.cpp - ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-master/README.md - ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-master/ThreadPool.h + ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-${THREADPOOL_REF}/COPYING + ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-${THREADPOOL_REF}/example.cpp + ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-${THREADPOOL_REF}/README.md + ${CURRENT_BUILDTREES_DIR}/src/ThreadPool-${THREADPOOL_REF}/ThreadPool.h DESTINATION ${SOURCE_PATH}/threadpool ) -- cgit v1.2.3 From b899067edba25c5464a96a5dd2c5cfac5901b785 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 3 Jan 2018 17:44:55 -0800 Subject: [boost-test] Move _exec_monitor libs to manual-link. Fixes #2444. --- ports/boost-test/CONTROL | 2 +- ports/boost-test/portfile.cmake | 9 +++++++++ ports/boost-vcpkg-helpers/generate-ports.ps1 | 22 +++++++++++++++++++++- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/ports/boost-test/CONTROL b/ports/boost-test/CONTROL index e19d889b1..63b982ee4 100644 --- a/ports/boost-test/CONTROL +++ b/ports/boost-test/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-test -Version: 1.66.0 +Version: 1.66.0-1 Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-io, boost-iterator, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-range, boost-smart-ptr, boost-static-assert, boost-timer, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost test module diff --git a/ports/boost-test/portfile.cmake b/ports/boost-test/portfile.cmake index fd6606f0e..090542bc7 100644 --- a/ports/boost-test/portfile.cmake +++ b/ports/boost-test/portfile.cmake @@ -13,3 +13,12 @@ vcpkg_from_github( boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + +file(GLOB MONITOR_LIBS ${CURRENT_PACKAGES_DIR}/lib/*_exec_monitor*) +file(COPY ${MONITOR_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(GLOB DEBUG_MONITOR_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*_exec_monitor*) +file(COPY ${DEBUG_MONITOR_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + +file(REMOVE ${DEBUG_MONITOR_LIBS} ${MONITOR_LIBS}) diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index 11f670c7a..09dcbca72 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -21,11 +21,17 @@ function Generate() $sanitizedName = $name -replace "_","-" + $versionsuffix = "" + if ($Name -eq "test") + { + $versionsuffix = "-1" + } + mkdir "$scriptsDir/../boost-$sanitizedName" -erroraction SilentlyContinue | out-null $controlLines = @( "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" "Source: boost-$sanitizedName" - "Version: $version" + "Version: $version$versionsuffix" "Build-Depends: $controlDeps" "Description: Boost $Name module" ) @@ -143,6 +149,20 @@ function Generate() "endif()" ) } + if ($Name -eq "test") + { + $portfileLines += @( + "file(MAKE_DIRECTORY `${CURRENT_PACKAGES_DIR}/lib/manual-link)" + "file(MAKE_DIRECTORY `${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)" + "" + "file(GLOB MONITOR_LIBS `${CURRENT_PACKAGES_DIR}/lib/*_exec_monitor*)" + "file(COPY `${MONITOR_LIBS} DESTINATION `${CURRENT_PACKAGES_DIR}/lib/manual-link)" + "file(GLOB DEBUG_MONITOR_LIBS `${CURRENT_PACKAGES_DIR}/debug/lib/*_exec_monitor*)" + "file(COPY `${DEBUG_MONITOR_LIBS} DESTINATION `${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)" + "" + "file(REMOVE `${DEBUG_MONITOR_LIBS} `${MONITOR_LIBS})" + ) + } $portfileLines | out-file -enc ascii "$scriptsDir/../boost-$sanitizedName/portfile.cmake" } -- cgit v1.2.3 From 2ae46fd676b7ecae569cbac8705f8d6993aa8c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Tassoux?= Date: Thu, 4 Jan 2018 04:34:44 +0100 Subject: [Yoga] Initial port --- ports/yoga/CONTROL | 3 +++ ports/yoga/portfile.cmake | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 ports/yoga/CONTROL create mode 100644 ports/yoga/portfile.cmake diff --git a/ports/yoga/CONTROL b/ports/yoga/CONTROL new file mode 100644 index 000000000..c8ff36c24 --- /dev/null +++ b/ports/yoga/CONTROL @@ -0,0 +1,3 @@ +Source: yoga +Version: 1.7.0 +Description: Yoga is a cross-platform layout engine which implements Flexbox diff --git a/ports/yoga/portfile.cmake b/ports/yoga/portfile.cmake new file mode 100644 index 000000000..ba13192c8 --- /dev/null +++ b/ports/yoga/portfile.cmake @@ -0,0 +1,42 @@ +# 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) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(FATAL_ERROR "Error: Dynamic building not supported yet.") +elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Error: UWP builds not supported yet.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/yoga + REF 1.7.0 + SHA512 3472a6db429e1fd0365321b2e663935741c4c97331f3936ea7b590b8218ada567ef7517fb20b1c843c1aad393e2b564e9626170a3d6c25e85450f9e8eb7ffdcc + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_build_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/yoga DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/yoga RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From ed1304b21ddb93a6de8d7acff499dd5836b3b7d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Tassoux?= Date: Thu, 4 Jan 2018 04:45:30 +0100 Subject: [Sol] Initial port --- ports/sol/CONTROL | 3 +++ ports/sol/portfile.cmake | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 ports/sol/CONTROL create mode 100644 ports/sol/portfile.cmake diff --git a/ports/sol/CONTROL b/ports/sol/CONTROL new file mode 100644 index 000000000..f1bd57fa3 --- /dev/null +++ b/ports/sol/CONTROL @@ -0,0 +1,3 @@ +Source: sol +Version: 2.18.7 +Description: Sol v2.0 - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great diff --git a/ports/sol/portfile.cmake b/ports/sol/portfile.cmake new file mode 100644 index 000000000..83d59becc --- /dev/null +++ b/ports/sol/portfile.cmake @@ -0,0 +1,25 @@ +# 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 ThePhD/sol2 + REF v2.18.7 + SHA512 747dbcba2da4e44bfb365c0fd0c8df916d0e5d0ddbaa9df514838d84a8fd4261c87db7d14d9683b708b874cd6a73586e7854d9a784743a737858b73acdd78f1c + HEAD_REF develop +) + +file(INSTALL ${SOURCE_PATH}/single/sol/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sol RENAME copyright) -- cgit v1.2.3 From 89400e8bd675752afa244961ee1aab0aaa9618b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Tassoux?= Date: Thu, 4 Jan 2018 04:48:49 +0100 Subject: [chaiscript] Initial port --- ports/chaiscript/CONTROL | 3 +++ ports/chaiscript/portfile.cmake | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 ports/chaiscript/CONTROL create mode 100644 ports/chaiscript/portfile.cmake diff --git a/ports/chaiscript/CONTROL b/ports/chaiscript/CONTROL new file mode 100644 index 000000000..7d6197531 --- /dev/null +++ b/ports/chaiscript/CONTROL @@ -0,0 +1,3 @@ +Source: chaiscript +Version: 6.0.0 +Description: Embedded Scripting Language Designed for C++ diff --git a/ports/chaiscript/portfile.cmake b/ports/chaiscript/portfile.cmake new file mode 100644 index 000000000..3103eb302 --- /dev/null +++ b/ports/chaiscript/portfile.cmake @@ -0,0 +1,25 @@ +# 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 ChaiScript/ChaiScript + REF v6.0.0 + SHA512 612c175b9ee357512addcbe9ce0e2b9c34c40a45b5be85a3f75e2c0d391bc845996e2559c401e4899088b3e641c6c5b34af233bf2fd48d4de4531ea2815e2a96 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/chaiscript RENAME copyright) -- cgit v1.2.3 From 273f35372c7960dbbcaf78ffcf02b36470e77b16 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 3 Jan 2018 19:52:14 -0800 Subject: [zeromq] Fix #2476 --- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index b850b71b9..2e876f6e1 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2-1 +Version: 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2-2 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 77d0da23d..e5a5d567b 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -8,11 +8,6 @@ vcpkg_from_github( HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${ARCHIVE} -) - string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) @@ -38,6 +33,16 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ) +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_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") +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) -- cgit v1.2.3 From 4351c4a6484e25637c4e9efed35481291d5a3cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Tassoux?= Date: Thu, 4 Jan 2018 05:02:59 +0100 Subject: [unicorn-lib][rs-core-lib] Initial port --- ports/rs-core-lib/CONTROL | 4 ++++ ports/rs-core-lib/portfile.cmake | 25 +++++++++++++++++++++++++ ports/unicorn-lib/CMakeLists.txt | 30 ++++++++++++++++++++++++++++++ ports/unicorn-lib/CONTROL | 4 ++++ ports/unicorn-lib/portfile.cmake | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 97 insertions(+) create mode 100644 ports/rs-core-lib/CONTROL create mode 100644 ports/rs-core-lib/portfile.cmake create mode 100644 ports/unicorn-lib/CMakeLists.txt create mode 100644 ports/unicorn-lib/CONTROL create mode 100644 ports/unicorn-lib/portfile.cmake diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL new file mode 100644 index 000000000..f19aa7914 --- /dev/null +++ b/ports/rs-core-lib/CONTROL @@ -0,0 +1,4 @@ +Source: rs-core-lib +Version: commit-1ed2dadbda3977b13e5e83cc1f3eeca76b36ebe5 +Description: Minimal common utilities by Ross Smith + diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake new file mode 100644 index 000000000..78ad34335 --- /dev/null +++ b/ports/rs-core-lib/portfile.cmake @@ -0,0 +1,25 @@ +# 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 CaptainCrowbar/rs-core-lib + REF 1ed2dadbda3977b13e5e83cc1f3eeca76b36ebe5 + SHA512 f84803fdd26f36b2a3748b9668253f058376e19740bc85e009726142b0b1f5906423729d9b71b224a995869a428a7e1e7b1f8afae897d416d9dfc1708b41975a + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/rs-core DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/rs-core-lib RENAME copyright) \ No newline at end of file diff --git a/ports/unicorn-lib/CMakeLists.txt b/ports/unicorn-lib/CMakeLists.txt new file mode 100644 index 000000000..b34e04f23 --- /dev/null +++ b/ports/unicorn-lib/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.10) + +project(Unicorn_Lib LANGUAGES CXX DESCRIPTION "Unicode library for C++ by Ross Smith") +set(CMAKE_CXX_STANDARD 17) +option(UNICORN_LIB_SKIP_HEADERS "If the headers installation is skipped or not." OFF) + +find_path(RS_CORE_LIB_INCLUDE_DIR rs-core/common.hpp) +#find_library(RW_UTILITIES_LIBRARY NAMES rw_utilities) + +file(GLOB_RECURSE UNICORN_LIB_SOURCES ${PROJECT_SOURCE_DIR}/unicorn/*.cpp) +foreach(ITR ${UNICORN_LIB_SOURCES}) + if(ITR MATCHES "(.*)-test.cpp(.*)") + list(REMOVE_ITEM UNICORN_LIB_SOURCES ${ITR}) + endif() +endforeach() +add_library(unicorn-lib ${UNICORN_LIB_SOURCES}) +target_include_directories( + unicorn-lib + PUBLIC ${PROJECT_SOURCE_DIR} + PUBLIC ${RS_CORE_LIB_INCLUDE_DIR} +) +target_compile_definitions( + unicorn-lib + PRIVATE -DUNICODE -D_UNICODE _CRT_SECURE_NO_WARNINGS +) + +if(NOT UNICORN_LIB_SKIP_HEADERS) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/unicorn DESTINATION include FILES_MATCHING PATTERN "*.hpp") +endif() +install(TARGETS unicorn-lib DESTINATION lib) \ No newline at end of file diff --git a/ports/unicorn-lib/CONTROL b/ports/unicorn-lib/CONTROL new file mode 100644 index 000000000..ac8a96114 --- /dev/null +++ b/ports/unicorn-lib/CONTROL @@ -0,0 +1,4 @@ +Source: unicorn-lib +Version: commit-3ffa7fe69a1d0c37fb52a4af61380c5fd84fa5aa +Description: Unicode library for C++ by Ross Smith +Build-Depends: rs-core-lib, pcre, zlib, libiconv diff --git a/ports/unicorn-lib/portfile.cmake b/ports/unicorn-lib/portfile.cmake new file mode 100644 index 000000000..5067bcf8c --- /dev/null +++ b/ports/unicorn-lib/portfile.cmake @@ -0,0 +1,34 @@ +# 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 CaptainCrowbar/unicorn-lib + REF 3ffa7fe69a1d0c37fb52a4af61380c5fd84fa5aa + SHA512 5e942cf111746ef430c8a3488e7f2e554fa374ff16111439274dec376396a950e49bf816a10d6a8d97d6008edbd14350568d00664f15c1a0bd09c93450ed0554 + HEAD_REF master +) + +file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG + -DUNICORN_LIB_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/unicorn-lib RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From 0cf5bd657ef401319fa3ef60846189546a5c7a87 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 3 Jan 2018 20:11:35 -0800 Subject: [vcpkg-fixup-cmake-targets] Add TARGET_PATH option --- scripts/cmake/vcpkg_build_cmake.cmake | 12 ++++++------ scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 14 +++++++++----- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 548e6cf46..66503f4b8 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -38,17 +38,13 @@ function(vcpkg_build_cmake) if(_VCPKG_CMAKE_GENERATOR MATCHES "Ninja") set(BUILD_ARGS "-v") # verbose output - if (_bc_DISABLE_PARALLEL) - set(NO_PARALLEL_ARG "-j1") - endif() + set(NO_PARALLEL_ARG "-j1") elseif(_VCPKG_CMAKE_GENERATOR MATCHES "Visual Studio") set(BUILD_ARGS "/p:VCPkgLocalAppDataDisabled=true" "/p:UseIntelMKL=No" ) - if (NOT _bc_DISABLE_PARALLEL) - set(PARALLEL_ARG "/m") - endif() + set(PARALLEL_ARG "/m") elseif(_VCPKG_CMAKE_GENERATOR MATCHES "NMake") # No options are currently added for nmake builds else() @@ -61,6 +57,10 @@ function(vcpkg_build_cmake) set(TARGET_PARAM) endif() + if(_bc_DISABLE_PARALLEL) + set(PARALLEL_ARG ${NO_PARALLEL_ARG}) + endif() + foreach(BUILDTYPE "release" "debug") if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) if(BUILDTYPE STREQUAL "debug") diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index f86ad0661..fead64d15 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -14,14 +14,18 @@ # function(vcpkg_fixup_cmake_targets) - cmake_parse_arguments(_vfct "" "CONFIG_PATH" "" ${ARGN}) + cmake_parse_arguments(_vfct "" "CONFIG_PATH;TARGET_PATH" "" ${ARGN}) if(_vfct_UNPARSED_ARGUMENTS) message(FATAL_ERROR "vcpkg_fixup_cmake_targets was passed extra arguments: ${_vfct_UNPARSED_ARGUMENTS}") endif() - set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/share/${PORT}) - set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/share/${PORT}) + if(NOT _vfct_TARGET_PATH) + set(_vfct_TARGET_PATH share/${PORT}) + endif() + + set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/${_vfct_TARGET_PATH}) + set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/${_vfct_TARGET_PATH}) if(_vfct_CONFIG_PATH AND NOT RELEASE_SHARE STREQUAL "${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}") set(DEBUG_CONFIG ${CURRENT_PACKAGES_DIR}/debug/${_vfct_CONFIG_PATH}) @@ -114,7 +118,7 @@ function(vcpkg_fixup_cmake_targets) string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+\\.exe)" "\${_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 ${CURRENT_PACKAGES_DIR}/share/${PORT}/${DEBUG_TARGET_NAME} "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/${_vfct_TARGET_PATH}/${DEBUG_TARGET_NAME} "${_contents}") file(REMOVE ${DEBUG_TARGET}) endforeach() @@ -148,7 +152,7 @@ function(vcpkg_fixup_cmake_targets) file(WRITE ${MAIN_CONFIG} "${_contents}") endforeach() - # Remove /debug/share// if it's empty. + # Remove /debug// if it's empty. file(GLOB_RECURSE REMAINING_FILES "${DEBUG_SHARE}/*") if(NOT REMAINING_FILES) file(REMOVE_RECURSE ${DEBUG_SHARE}) -- cgit v1.2.3 From de98ec658f552c2f98f45683ad2d157015165c4f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 3 Jan 2018 20:12:49 -0800 Subject: [llvm] Fix installation of clang cmake targets --- ports/llvm/CONTROL | 2 +- ports/llvm/portfile.cmake | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index f043598a9..7df5565c2 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,4 +1,4 @@ Source: llvm -Version: 5.0.0-3 +Version: 5.0.0-4 Description: The LLVM Compiler Infrastructure Build-Depends: atlmfc diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index f9ddef26e..55490a1b1 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -52,16 +52,12 @@ vcpkg_install_cmake() file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*) file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*) -file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools) +file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/llvm) +file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/llvm) file(REMOVE ${EXE}) file(REMOVE ${DEBUG_EXE}) -file(GLOB CMAKECONFIG_DEBUG ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/clang/*) -file(GLOB CMAKECONFIG ${CURRENT_PACKAGES_DIR}/lib/cmake/clang/*) -file(COPY ${CMAKECONFIG_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/share/clang) -file(COPY ${CMAKECONFIG} DESTINATION ${CURRENT_PACKAGES_DIR}/share/clang) - +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/clang TARGET_PATH share/clang) vcpkg_fixup_cmake_targets(CONFIG_PATH share/llvm) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/llvm) @@ -70,10 +66,8 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/bin - ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ${CURRENT_PACKAGES_DIR}/debug/msbuild-bin ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/msbuild-bin ${CURRENT_PACKAGES_DIR}/tools/msbuild-bin ) -- cgit v1.2.3 From 11aba184957066a4d14d64bb047155c5b6c11b6c Mon Sep 17 00:00:00 2001 From: clvn Date: Thu, 4 Jan 2018 08:04:54 +0100 Subject: [libsamplerate] Initial port --- ports/libsamplerate/CMakeLists.txt | 14 ++++++++++++++ ports/libsamplerate/CONTROL | 3 +++ ports/libsamplerate/portfile.cmake | 26 ++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 ports/libsamplerate/CMakeLists.txt create mode 100644 ports/libsamplerate/CONTROL create mode 100644 ports/libsamplerate/portfile.cmake diff --git a/ports/libsamplerate/CMakeLists.txt b/ports/libsamplerate/CMakeLists.txt new file mode 100644 index 000000000..44ba2277a --- /dev/null +++ b/ports/libsamplerate/CMakeLists.txt @@ -0,0 +1,14 @@ +add_library(libsamplerate-0 + samplerate.c + src_sinc.c + src_zoh.c + src_linear.c + ../Win32/libsamplerate-0.def +) + +install(TARGETS libsamplerate-0 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES samplerate.h DESTINATION include) diff --git a/ports/libsamplerate/CONTROL b/ports/libsamplerate/CONTROL new file mode 100644 index 000000000..d8a8f5f4e --- /dev/null +++ b/ports/libsamplerate/CONTROL @@ -0,0 +1,3 @@ +Source: libsamplerate +Version: 0.1.9.0 +Description: Sample Rate Converter for audio diff --git a/ports/libsamplerate/portfile.cmake b/ports/libsamplerate/portfile.cmake new file mode 100644 index 000000000..87712f6d2 --- /dev/null +++ b/ports/libsamplerate/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsamplerate-0.1.9) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.mega-nerd.com/SRC/libsamplerate-0.1.9.tar.gz" + FILENAME "libsamplerate-0.1.9.tar.gz" + SHA512 78596657963cbf06785e3e6e1190b093df71da52ca340e75bd8246a962cd79dd1c90fa5527c607cebcb296e2c1ee605015278b274e3b768f2f3fbeb0eadfb728 +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src) +file(COPY ${SOURCE_PATH}/Win32/config.h DESTINATION ${SOURCE_PATH}/src) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsamplerate RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From cfe7560506e0f692feb947c2180c7df6e0ce628e Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Thu, 4 Jan 2018 14:46:21 +0300 Subject: [imgui] Update to 1.53 --- ports/imgui/CMakeLists.txt | 9 +++++++-- ports/imgui/CONTROL | 2 +- ports/imgui/portfile.cmake | 5 +++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt index 3658c5cae..5bcf278f7 100644 --- a/ports/imgui/CMakeLists.txt +++ b/ports/imgui/CMakeLists.txt @@ -19,18 +19,23 @@ set(IMGUI_SOURCES imgui_draw.cpp ) -add_library(imgui +add_library(${PROJECT_NAME} ${IMGUI_INCLUDES_PUBLIC} ${IMGUI_INCLUDES_PRIVATE} ${IMGUI_SOURCES} ) -install(TARGETS imgui +target_include_directories(${PROJECT_NAME} PUBLIC $) + +install(TARGETS ${PROJECT_NAME} + EXPORT IMGUIExport RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) +install(EXPORT IMGUIExport FILE ${PROJECT_NAME}Config.cmake NAMESPACE ${PROJECT_NAME}:: DESTINATION share/${PROJECT_NAME}) + if(NOT IMGUI_SKIP_HEADERS) install( FILES ${IMGUI_INCLUDES_PUBLIC} diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL index 4428d0d45..6b6a82476 100644 --- a/ports/imgui/CONTROL +++ b/ports/imgui/CONTROL @@ -1,3 +1,3 @@ Source: imgui -Version: 1.52 +Version: 1.53 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 385a2396b..1ca99841d 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ocornut/imgui - REF v1.52 - SHA512 8ada897ae33bcffa222dab4e9ff602611fa27d43f26085b8f96c313fea917d3149f1e3f4640f6156cfb7bc39bcb116106ccb4e8da1409d467e78c93bf9f7ea03 + REF v1.53 + SHA512 3e1ebf3844eaca3471064fa3d5792525c696b39f502c75235fae469038b73ae0eff198f13d5e1a35f86c011903cd379066afe1e22b6df769b9b16dc390f8b0c3 HEAD_REF master ) @@ -19,6 +19,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/imgui) file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/imgui) file(RENAME ${CURRENT_PACKAGES_DIR}/share/imgui/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/imgui/copyright) -- cgit v1.2.3 From f8ac383a61b1cbb6024a67424e233599e3554173 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Thu, 4 Jan 2018 17:53:48 +0100 Subject: [pybind11] Update to 2.2.1 --- ports/pybind11/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/pybind11/portfile.cmake b/ports/pybind11/portfile.cmake index 3e5802059..9425baae6 100644 --- a/ports/pybind11/portfile.cmake +++ b/ports/pybind11/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pybind/pybind11 - REF v2.2.0 - SHA512 65d8c2c9ba77b25577dd330356ef9cc8f9af924b1d578c28176f230c6f6a88cfd335cc01cc5e010bb8e641a000a78cfcaa1a1367b438e7c6e0d40ea511494a5a + REF v2.2.1 + SHA512 1bc0646862fabef1111c05403a7238965ce5661a6f53945a1b7c4faad33f039d2ea278de64190099a8ae4fd66487a070de59334a7f32e187060bbbc7e0c3060e HEAD_REF master ) -- cgit v1.2.3 From 23962328a4f0ea83de847d71a927ba1cc397b560 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Thu, 4 Jan 2018 17:55:01 +0100 Subject: [python3] Update to 3.6.4 --- ports/python3/0001-Static-library.patch | 11 ++--------- ports/python3/0002-Static-CRT.patch | 4 +--- ports/python3/CONTROL | 2 +- ports/python3/portfile.cmake | 26 +++++++++++++++----------- 4 files changed, 19 insertions(+), 24 deletions(-) diff --git a/ports/python3/0001-Static-library.patch b/ports/python3/0001-Static-library.patch index 4bc10af41..b5666ba40 100644 --- a/ports/python3/0001-Static-library.patch +++ b/ports/python3/0001-Static-library.patch @@ -1,13 +1,5 @@ -diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj -index 6ea1848..4134d7b 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj -@@ -1,4 +1,4 @@ -- -+ - - - @@ -41,7 +41,7 @@ @@ -17,7 +9,7 @@ index 6ea1848..4134d7b 100644 false -@@ -66,12 +66,24 @@ +@@ -67,13 +67,25 @@ /Zm200 %(AdditionalOptions) $(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories) @@ -26,6 +18,7 @@ index 6ea1848..4134d7b 100644 version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies) + %(AdditionalLibraryDirectories);$(PySourcePath)PC\external\$(PlatformToolset)\$(ArchName) 0x1e000000 + diff --git a/ports/python3/0002-Static-CRT.patch b/ports/python3/0002-Static-CRT.patch index 267d03d75..8f63aa092 100644 --- a/ports/python3/0002-Static-CRT.patch +++ b/ports/python3/0002-Static-CRT.patch @@ -1,8 +1,6 @@ -diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj -index 4134d7b..ecbccf0 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj -@@ -67,6 +67,10 @@ +@@ -68,6 +68,10 @@ /Zm200 %(AdditionalOptions) $(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories) _USRDLL;Py_BUILD_CORE;Py_NO_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) diff --git a/ports/python3/CONTROL b/ports/python3/CONTROL index 6cef24232..0a730e517 100644 --- a/ports/python3/CONTROL +++ b/ports/python3/CONTROL @@ -1,3 +1,3 @@ Source: python3 -Version: 3.6.1 +Version: 3.6.4 Description: The Python programming language as an embeddable library \ No newline at end of file diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 19f04a15d..9bb50b70c 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -16,19 +16,23 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static set(VCPKG_LIBRARY_LINKAGE static) endif() +set(PYTHON_VERSION_MAJOR 3) +set(PYTHON_VERSION_MINOR 6) +set(PYTHON_VERSION_PATCH 4) +set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}) include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) vcpkg_from_github( OUT_SOURCE_PATH TEMP_SOURCE_PATH REPO python/cpython - REF v3.6.1 - SHA512 1fdc1dc44d82762a793093fa19d6401c99fbc05375d8d7e378274ed5555a25dfb3537f93ef04e52ebbf95b42fda74303293dd37aba81ce0c4296a675ab75fa62 + REF v${PYTHON_VERSION} + SHA512 32cca5e344ee66f08712ab5533e5518f724f978ec98d985f7612d0bd8d7f5cac25625363c9eead192faf1806d4ea3393515f72ba962a2a0bed26261e56d8c637 HEAD_REF master ) # We need per-triplet directories because we need to patch the project files differently based on the linkage file(COPY ${TEMP_SOURCE_PATH} DESTINATION ${SOURCE_PATH}) -set(SOURCE_PATH ${SOURCE_PATH}/cpython-3.6.1) +set(SOURCE_PATH ${SOURCE_PATH}/cpython-${PYTHON_VERSION}) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) vcpkg_apply_patches( @@ -68,19 +72,19 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() file(GLOB HEADERS ${SOURCE_PATH}/Include/*.h) -file(COPY ${HEADERS} ${SOURCE_PATH}/PC/pyconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/python3.6) +file(COPY ${HEADERS} ${SOURCE_PATH}/PC/pyconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) -file(COPY ${SOURCE_PATH}/Lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/python3) +file(COPY ${SOURCE_PATH}/Lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}) -file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python36.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python36_d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python36.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python36_d.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) endif() # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/python3) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/python3/LICENSE ${CURRENT_PACKAGES_DIR}/share/python3/copyright) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/copyright) vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 75c66575c4ae21d2f828284fd1a7d81fd632ef81 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Thu, 4 Jan 2018 17:57:30 +0100 Subject: [vtk] Fix hdf5 target names after hdf5 has been updated to 1.10.1 --- ports/vtk/CONTROL | 2 +- ports/vtk/FindHDF5.cmake | 32 ++++++++++++++++++-------------- ports/vtk/portfile.cmake | 16 ++++++++-------- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 3919619ef..66ee71f23 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,5 +1,5 @@ Source: vtk -Version: 8.0.1-5 +Version: 8.0.1-6 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora diff --git a/ports/vtk/FindHDF5.cmake b/ports/vtk/FindHDF5.cmake index 4a8c4a166..f3c6bd30f 100644 --- a/ports/vtk/FindHDF5.cmake +++ b/ports/vtk/FindHDF5.cmake @@ -2,22 +2,26 @@ find_package(HDF5 NO_MODULE REQUIRED) set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) -add_library(vtk::hdf5::hdf5 INTERFACE IMPORTED GLOBAL) -if(TARGET hdf5-static) - set_target_properties(vtk::hdf5::hdf5 PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5-static") -elseif(TARGET hdf5-shared) - set_target_properties(vtk::hdf5::hdf5 PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5-shared") -else() - message(FATAL_ERROR "could not find target hdf5-*") +if(NOT TARGET vtk::hdf5::hdf5) + add_library(vtk::hdf5::hdf5 INTERFACE IMPORTED GLOBAL) + if(TARGET hdf5::hdf5-static) + set_target_properties(vtk::hdf5::hdf5 PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5-static") + elseif(TARGET hdf5::hdf5-shared) + set_target_properties(vtk::hdf5::hdf5 PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5-shared") + else() + message(FATAL_ERROR "could not find target hdf5-*") + endif() endif() -add_library(vtk::hdf5::hdf5_hl INTERFACE IMPORTED GLOBAL) -if(TARGET hdf5_hl-static) - set_target_properties(vtk::hdf5::hdf5_hl PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5_hl-static") -elseif(TARGET hdf5_hl-shared) - set_target_properties(vtk::hdf5::hdf5_hl PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5_hl-shared") -else() - message(FATAL_ERROR "could not find target hdf5_hl-*") +if(NOT TARGET vtk::hdf5::hdf5_hl) + add_library(vtk::hdf5::hdf5_hl INTERFACE IMPORTED GLOBAL) + if(TARGET hdf5::hdf5_hl-static) + set_target_properties(vtk::hdf5::hdf5_hl PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5_hl-static") + elseif(TARGET hdf5::hdf5_hl-shared) + set_target_properties(vtk::hdf5::hdf5_hl PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::hdf5_hl-shared") + else() + message(FATAL_ERROR "could not find target hdf5_hl-*") + endif() endif() set(HDF5_LIBRARIES "$" "$") diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index f46b47cbf..51f7df4c6 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -12,28 +12,28 @@ vcpkg_from_github( ) # ============================================================================= -# Options: These should be set by feature-packages when they become available +# Options: if ("qt" IN_LIST FEATURES) - set(VTK_WITH_QT ON ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file + set(VTK_WITH_QT ON ) else() - set(VTK_WITH_QT OFF ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file + set(VTK_WITH_QT OFF ) endif() if ("mpi" IN_LIST FEATURES) - set(VTK_WITH_MPI ON ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file + set(VTK_WITH_MPI ON ) else() - set(VTK_WITH_MPI OFF ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file + set(VTK_WITH_MPI OFF ) endif() if ("python" IN_LIST FEATURES) - set(VTK_WITH_PYTHON ON) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file + set(VTK_WITH_PYTHON ON) else() - set(VTK_WITH_PYTHON OFF) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file + set(VTK_WITH_PYTHON OFF) endif() if("openvr" IN_LIST FEATURES) - set(VTK_WITH_OPENVR ON) # IMPORTANT: if ON make sure `OpenVR` is listed as dependency in the CONTROL file + set(VTK_WITH_OPENVR ON) else() set(VTK_WITH_OPENVR OFF) endif() -- cgit v1.2.3 From b39049f7b88bf0741b2f172975c83e07b5b1aa09 Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Fri, 5 Jan 2018 07:32:31 +0300 Subject: [libiconv] copy pdbs --- ports/libiconv/CONTROL | 2 +- ports/libiconv/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/libiconv/CONTROL b/ports/libiconv/CONTROL index 980763980..aabc4a953 100644 --- a/ports/libiconv/CONTROL +++ b/ports/libiconv/CONTROL @@ -1,3 +1,3 @@ Source: libiconv -Version: 1.15 +Version: 1.15-1 Description: GNU Unicode text conversion diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index a79d7c074..79c30987c 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -23,6 +23,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_copy_pdbs() # Handle copyright file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libiconv) -- cgit v1.2.3 From e3ae00e4f156aae36ec91be5da9fb3244ce3c1f8 Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Thu, 4 Jan 2018 06:55:18 +0300 Subject: [cimg] initial port --- ports/cimg/CMakeLists.txt | 21 +++++++++++++++++++++ ports/cimg/CONTROL | 3 +++ ports/cimg/portfile.cmake | 23 +++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 ports/cimg/CMakeLists.txt create mode 100644 ports/cimg/CONTROL create mode 100644 ports/cimg/portfile.cmake diff --git a/ports/cimg/CMakeLists.txt b/ports/cimg/CMakeLists.txt new file mode 100644 index 000000000..75ae59cd5 --- /dev/null +++ b/ports/cimg/CMakeLists.txt @@ -0,0 +1,21 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.9) +project(CImg) + +add_library(${PROJECT_NAME} INTERFACE) + +target_include_directories(${PROJECT_NAME} INTERFACE + $ + $ +) + +install(TARGETS ${PROJECT_NAME} + EXPORT CImgExport + INCLUDES DESTINATION include +) + +install(EXPORT CImgExport FILE ${PROJECT_NAME}Config.cmake NAMESPACE ${PROJECT_NAME}:: DESTINATION share/cimg) + +install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/CImg.h + DESTINATION include +) diff --git a/ports/cimg/CONTROL b/ports/cimg/CONTROL new file mode 100644 index 000000000..74f184270 --- /dev/null +++ b/ports/cimg/CONTROL @@ -0,0 +1,3 @@ +Source: cimg +Version: 2.1.8 +Description: The CImg Library is a small, open-source, and modern C++ toolkit for image processing diff --git a/ports/cimg/portfile.cmake b/ports/cimg/portfile.cmake new file mode 100644 index 000000000..6e5a86ad9 --- /dev/null +++ b/ports/cimg/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH + REPO "dtschump/CImg" + REF "v.218" + HEAD_REF master + SHA512 aa6267c9b425cb82aa3aeadea9f7c1ffdd975d01b4f64b8cd905ce11cf062ae22eea9b519c681f0fef239615a621dd3cae2a67e04e6cac96425776a4ac176a23) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Move cmake files, ensuring they will be 3 directories up the import prefix +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cimg) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/Licence_CeCILL-C_V1-en.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cimg RENAME copyright) +file(INSTALL ${SOURCE_PATH}/Licence_CeCILL_V2-en.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cimg RENAME copyright2) -- cgit v1.2.3 From ab881e91e46da02f03a2ee3dd98df7dea86be7f6 Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Fri, 5 Jan 2018 09:31:27 +0300 Subject: [libtorrent] Update to 1.1.6 --- ports/libtorrent/CONTROL | 2 +- ports/libtorrent/add-dbghelp-to-win32-libs.patch | 13 ------------- ports/libtorrent/portfile.cmake | 5 ++--- 3 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 ports/libtorrent/add-dbghelp-to-win32-libs.patch diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL index f6dde66ee..e0de70962 100644 --- a/ports/libtorrent/CONTROL +++ b/ports/libtorrent/CONTROL @@ -1,4 +1,4 @@ Source: libtorrent -Version: 94f4e88e05f92a1 +Version: 1.1.6 Description: An efficient feature complete C++ BitTorrent implementation Build-Depends: openssl, boost-system, boost-date-time, boost-chrono, boost-random, boost-asio, boost-crc, boost-config diff --git a/ports/libtorrent/add-dbghelp-to-win32-libs.patch b/ports/libtorrent/add-dbghelp-to-win32-libs.patch deleted file mode 100644 index 35df3bc2b..000000000 --- a/ports/libtorrent/add-dbghelp-to-win32-libs.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1963d90..99698a2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -267,7 +267,7 @@ target_link_libraries(torrent-rasterbar ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_I - #add_definitions(-DBOOST_ASIO_HASH_MAP_BUCKETS=1021 -D__USE_W32_SOCKETS -DWIN32_LEAN_AND_MEAN ) - - if (WIN32) -- target_link_libraries(torrent-rasterbar wsock32 ws2_32 Iphlpapi) -+ target_link_libraries(torrent-rasterbar wsock32 ws2_32 Iphlpapi dbghelp) - add_definitions(-D_WIN32_WINNT=0x0600) - # prevent winsock1 to be included - add_definitions(-DWIN32_LEAN_AND_MEAN) diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake index 3101bab29..bf0d851b9 100644 --- a/ports/libtorrent/portfile.cmake +++ b/ports/libtorrent/portfile.cmake @@ -3,15 +3,14 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO arvidn/libtorrent - REF 94f4e88e05f92a1b07551598a4bedb2c16af0f2f - SHA512 1b4876a471a62813c97519ebf54fc06286b7ee43005e436c7139c6a6ac39fd40fefd5c9b7424e65509ec8deb95dfe1427544b686b6b9cd51cf3d3f133ba7a701 + REF libtorrent-1_1_6 + SHA512 528034e63330d3c6910ab9db34a2a543618961c0095ecb8f865065516c341d063cba92aed2904b80aa0d0ef65df1b91c400f69d16defad787ff1ffb5edd09e37 HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-datetime-to-boost-libs.patch - ${CMAKE_CURRENT_LIST_DIR}/add-dbghelp-to-win32-libs.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBTORRENT_SHARED) -- cgit v1.2.3 From 087498f675a257131e74ad077361ae8d2fb653b5 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Fri, 5 Jan 2018 15:27:16 +0100 Subject: [pybind11] Fix version in CONTROL after update --- ports/pybind11/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/pybind11/CONTROL b/ports/pybind11/CONTROL index 94ed66368..66157db1d 100644 --- a/ports/pybind11/CONTROL +++ b/ports/pybind11/CONTROL @@ -1,4 +1,4 @@ Source: pybind11 -Version: 2.2.0 +Version: 2.2.1 Description: pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. Build-Depends: python3 -- cgit v1.2.3 From 813d441ba2365c33e2a99a8d28c126389cbafea4 Mon Sep 17 00:00:00 2001 From: Eric Mittelette Date: Fri, 5 Jan 2018 10:46:58 -0800 Subject: adding args port file --- ports/args/CONTROL | 3 +++ ports/args/portfile.cmake | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 ports/args/CONTROL create mode 100644 ports/args/portfile.cmake diff --git a/ports/args/CONTROL b/ports/args/CONTROL new file mode 100644 index 000000000..975b0251e --- /dev/null +++ b/ports/args/CONTROL @@ -0,0 +1,3 @@ +Source: args +Version: d8905de +Description: A simple header-only C++ argument parser library. diff --git a/ports/args/portfile.cmake b/ports/args/portfile.cmake new file mode 100644 index 000000000..a5f4f1c85 --- /dev/null +++ b/ports/args/portfile.cmake @@ -0,0 +1,19 @@ +#header-only library +include(vcpkg_common_functions) +SET(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/args-master) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/Taywee/args/archive/master.zip" + FILENAME "args.zip" + SHA512 81751bfc86e15db1e5f245baa7df0464027b22b577c9de359e22dc4fe1dd550acfb116801b47d88b56d61b69a640c55757206f6f84977ace2fb02742b60ff216 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/args) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/args/license ${CURRENT_PACKAGES_DIR}/share/args/copyright) + +# Copy the args header files +file(INSTALL ${SOURCE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.hxx") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/args-master/examples ${CURRENT_PACKAGES_DIR}/include/args-master/test) +vcpkg_copy_pdbs() -- cgit v1.2.3 From 42c0cfc8705c71c3c9dcc4df4804ab342dc89988 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Sat, 30 Dec 2017 01:21:18 +0300 Subject: [vcpkg] fix --head flag for github-based ports --- scripts/cmake/vcpkg_download_distfile.cmake | 16 ++++++++++++---- scripts/cmake/vcpkg_from_github.cmake | 2 ++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 2055139f5..2c20cc1b8 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -26,6 +26,9 @@ ## ## If this doesn't match the downloaded version, the build will be terminated with a message describing the mismatch. ## +## ### SKIP_SHA512 +## Skip SHA512 hash check for file. +## ## ## Notes ## The command [`vcpkg_from_github`](vcpkg_from_github.md) should be used instead of this for downloading the main archive for GitHub projects. ## @@ -35,9 +38,10 @@ ## * [fontconfig](https://github.com/Microsoft/vcpkg/blob/master/ports/fontconfig/portfile.cmake) ## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) function(vcpkg_download_distfile VAR) + set(options SKIP_SHA512) set(oneValueArgs FILENAME SHA512) set(multipleValuesArgs URLS) - cmake_parse_arguments(vcpkg_download_distfile "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + cmake_parse_arguments(vcpkg_download_distfile "${options}" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) if(NOT DEFINED vcpkg_download_distfile_URLS) message(FATAL_ERROR "vcpkg_download_distfile requires a URLS argument.") @@ -45,7 +49,7 @@ function(vcpkg_download_distfile VAR) if(NOT DEFINED vcpkg_download_distfile_FILENAME) message(FATAL_ERROR "vcpkg_download_distfile requires a FILENAME argument.") endif() - if(NOT _VCPKG_INTERNAL_NO_HASH_CHECK AND NOT DEFINED vcpkg_download_distfile_SHA512) + if(NOT DEFINED vcpkg_download_distfile_SKIP_SHA512 AND NOT _VCPKG_INTERNAL_NO_HASH_CHECK AND NOT DEFINED vcpkg_download_distfile_SHA512) message(FATAL_ERROR "vcpkg_download_distfile requires a SHA512 argument.") endif() @@ -75,7 +79,9 @@ function(vcpkg_download_distfile VAR) if(EXISTS ${downloaded_file_path}) message(STATUS "Using cached ${downloaded_file_path}") - test_hash("cached file" "Please delete the file and retry if this file should be downloaded again.") + if(NOT DEFINED vcpkg_download_distfile_SKIP_SHA512) + test_hash("cached file" "Please delete the file and retry if this file should be downloaded again.") + endif() else() if(_VCPKG_NO_DOWNLOADS) message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") @@ -103,7 +109,9 @@ function(vcpkg_download_distfile VAR) " Failed to download file.\n" " Add mirrors or submit an issue at https://github.com/Microsoft/vcpkg/issues\n") else() - test_hash("downloaded file" "The file may be corrupted.") + if(NOT DEFINED vcpkg_download_distfile_SKIP_SHA512) + test_hash("downloaded file" "The file may be corrupted.") + endif() endif() endif() set(${VAR} ${downloaded_file_path} PARENT_SCOPE) diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index b71ab3838..545be3b4d 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -141,11 +141,13 @@ function(vcpkg_from_github) vcpkg_download_distfile(ARCHIVE_VERSION URLS "https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/git/refs/heads/${_vdud_HEAD_REF}" FILENAME ${downloaded_file_name}.version + SKIP_SHA512 ) vcpkg_download_distfile(ARCHIVE URLS ${URL} FILENAME ${downloaded_file_name} + SKIP_SHA512 ) set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() -- cgit v1.2.3 From 2b30280c222a6970fa74d05b6f7e106b4776318a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 5 Jan 2018 16:16:08 -0800 Subject: [vcpkg-download-distfile] Regenerate docs and enable SKIP_SHA512 only in unstable (head) mode --- docs/maintainers/vcpkg_download_distfile.md | 11 ++++++++-- scripts/cmake/vcpkg_download_distfile.cmake | 33 +++++++++++++++++++---------- scripts/cmake/vcpkg_from_github.cmake | 7 +++--- 3 files changed, 35 insertions(+), 16 deletions(-) diff --git a/docs/maintainers/vcpkg_download_distfile.md b/docs/maintainers/vcpkg_download_distfile.md index 7897610e3..80ea7559a 100644 --- a/docs/maintainers/vcpkg_download_distfile.md +++ b/docs/maintainers/vcpkg_download_distfile.md @@ -2,6 +2,8 @@ Download and cache a file needed for this port. +This helper should always be used instead of CMake's built-in `file(DOWNLOAD)` command. + ## Usage ```cmake vcpkg_download_distfile( @@ -26,12 +28,17 @@ The expected hash for the file. If this doesn't match the downloaded version, the build will be terminated with a message describing the mismatch. +### SKIP_SHA512 +Skip SHA512 hash check for file. + +This switch is only valid when building with the `--head` command line flag. + ## Notes -The command [`vcpkg_from_github`](vcpkg_from_github.md) should be used instead of this for downloading the main archive for GitHub projects. +The helper [`vcpkg_from_github`](vcpkg_from_github.md) should be used for downloading from GitHub projects. ## Examples -* [boost](https://github.com/Microsoft/vcpkg/blob/master/ports/boost/portfile.cmake) +* [apr](https://github.com/Microsoft/vcpkg/blob/master/ports/apr/portfile.cmake) * [fontconfig](https://github.com/Microsoft/vcpkg/blob/master/ports/fontconfig/portfile.cmake) * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 2c20cc1b8..7a1c95461 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -2,6 +2,8 @@ ## ## Download and cache a file needed for this port. ## +## This helper should always be used instead of CMake's built-in `file(DOWNLOAD)` command. +## ## ## Usage ## ```cmake ## vcpkg_download_distfile( @@ -29,12 +31,14 @@ ## ### SKIP_SHA512 ## Skip SHA512 hash check for file. ## +## This switch is only valid when building with the `--head` command line flag. +## ## ## Notes -## The command [`vcpkg_from_github`](vcpkg_from_github.md) should be used instead of this for downloading the main archive for GitHub projects. +## The helper [`vcpkg_from_github`](vcpkg_from_github.md) should be used for downloading from GitHub projects. ## ## ## Examples ## -## * [boost](https://github.com/Microsoft/vcpkg/blob/master/ports/boost/portfile.cmake) +## * [apr](https://github.com/Microsoft/vcpkg/blob/master/ports/apr/portfile.cmake) ## * [fontconfig](https://github.com/Microsoft/vcpkg/blob/master/ports/fontconfig/portfile.cmake) ## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) function(vcpkg_download_distfile VAR) @@ -49,8 +53,14 @@ function(vcpkg_download_distfile VAR) if(NOT DEFINED vcpkg_download_distfile_FILENAME) message(FATAL_ERROR "vcpkg_download_distfile requires a FILENAME argument.") endif() - if(NOT DEFINED vcpkg_download_distfile_SKIP_SHA512 AND NOT _VCPKG_INTERNAL_NO_HASH_CHECK AND NOT DEFINED vcpkg_download_distfile_SHA512) - message(FATAL_ERROR "vcpkg_download_distfile requires a SHA512 argument.") + if(vcpkg_download_distfile_SKIP_SHA512 AND NOT VCPKG_USE_HEAD_VERSION) + message(FATAL_ERROR "vcpkg_download_distfile only allows SKIP_SHA512 when building with --head") + endif() + if(NOT vcpkg_download_distfile_SKIP_SHA512 AND NOT DEFINED vcpkg_download_distfile_SHA512) + message(FATAL_ERROR "vcpkg_download_distfile requires a SHA512 argument. If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.") + endif() + if(vcpkg_download_distfile_SKIP_SHA512 AND DEFINED vcpkg_download_distfile_SHA512) + message(FATAL_ERROR "vcpkg_download_distfile must not be passed both SHA512 and SKIP_SHA512.") endif() set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}) @@ -60,7 +70,12 @@ function(vcpkg_download_distfile VAR) file(MAKE_DIRECTORY "${DOWNLOADS}/temp") function(test_hash FILE_KIND CUSTOM_ERROR_ADVICE) - if (_VCPKG_INTERNAL_NO_HASH_CHECK) + if(_VCPKG_INTERNAL_NO_HASH_CHECK) + # When using the internal hash skip, do not output an explicit message. + return() + endif() + if(vcpkg_download_distfile_SKIP_SHA512) + message(STATUS "Skipping hash check for ${downloaded_file_path}.") return() endif() @@ -79,9 +94,7 @@ function(vcpkg_download_distfile VAR) if(EXISTS ${downloaded_file_path}) message(STATUS "Using cached ${downloaded_file_path}") - if(NOT DEFINED vcpkg_download_distfile_SKIP_SHA512) - test_hash("cached file" "Please delete the file and retry if this file should be downloaded again.") - endif() + test_hash("cached file" "Please delete the file and retry if this file should be downloaded again.") else() if(_VCPKG_NO_DOWNLOADS) message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") @@ -109,9 +122,7 @@ function(vcpkg_download_distfile VAR) " Failed to download file.\n" " Add mirrors or submit an issue at https://github.com/Microsoft/vcpkg/issues\n") else() - if(NOT DEFINED vcpkg_download_distfile_SKIP_SHA512) - test_hash("downloaded file" "The file may be corrupted.") - endif() + test_hash("downloaded file" "The file may have been corrupted in transit.") endif() endif() set(${VAR} ${downloaded_file_path} PARENT_SCOPE) diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index 545be3b4d..c6a23cff6 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -137,7 +137,6 @@ function(vcpkg_from_github) endif() # Try to download the file and version information from github. - set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") vcpkg_download_distfile(ARCHIVE_VERSION URLS "https://api.github.com/repos/${ORG_NAME}/${REPO_NAME}/git/refs/heads/${_vdud_HEAD_REF}" FILENAME ${downloaded_file_name}.version @@ -149,7 +148,6 @@ function(vcpkg_from_github) FILENAME ${downloaded_file_name} SKIP_SHA512 ) - set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() vcpkg_extract_source_archive_ex( @@ -164,7 +162,10 @@ function(vcpkg_from_github) string(REGEX REPLACE "\"sha\": \"([a-f0-9]+)\"" "\\1" _version ${x}) # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. - set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) + # When multiple vcpkg_from_github's are used after each other, only use the version from the first (hopefully the primary one). + if(NOT DEFINED VCPKG_HEAD_VERSION) + set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) + endif() set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/head ${SANITIZED_HEAD_REF}) endfunction() -- cgit v1.2.3 From ae82c74340af2c04c7831021799e7f6c60451ace Mon Sep 17 00:00:00 2001 From: Force Charlie Date: Sat, 6 Jan 2018 10:07:16 +0800 Subject: [llvm]: update llvm to 5.0.1 --- ports/llvm/CONTROL | 2 +- ports/llvm/portfile.cmake | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index 7df5565c2..ecc6346ca 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,4 +1,4 @@ Source: llvm -Version: 5.0.0-4 +Version: 5.0.1 Description: The LLVM Compiler Infrastructure Build-Depends: atlmfc diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 55490a1b1..60580947e 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-5.0.0.src) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-5.0.1.src) vcpkg_download_distfile(ARCHIVE - URLS "http://releases.llvm.org/5.0.0/llvm-5.0.0.src.tar.xz" - FILENAME "llvm-5.0.0.src.tar.xz" - SHA512 e6d8fdcb5bf27bded814d02f39f69c6171bc3a512d5957c03e5ac2e231f903b7de87634b059bd5c5da670f7c3a8f7a538f6299225799f15f921857f1452f6b3a + URLS "http://releases.llvm.org/5.0.1/llvm-5.0.1.src.tar.xz" + FILENAME "llvm-5.0.1.src.tar.xz" + SHA512 bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b5366172c4aad46592dfd8afe372349ecf264f581463d017f9cee2d63c1cb ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_download_distfile(CLANG_ARCHIVE - URLS "http://releases.llvm.org/5.0.0/cfe-5.0.0.src.tar.xz" - FILENAME "cfe-5.0.0.src.tar.xz" - SHA512 14acdd622310122b544c952ee5b932b7006d9d8424319f0e3974f2503d40a0cec4200fdd3d813a32ce0d877bcfbb9a5bd5c36f6142b4330e6c814f113ca2efe8 + URLS "http://releases.llvm.org/5.0.1/cfe-5.0.1.src.tar.xz" + FILENAME "cfe-5.0.1.src.tar.xz" + SHA512 6619177a2ff9934fe8b15d6aa229abb8e34d0b1a75228d9efba9393daf71d6419a7256de57b31e2f9f829f71f842118556f996e86ee076f1e0a7cd394dfd31a2 ) vcpkg_extract_source_archive(${CLANG_ARCHIVE} ${SOURCE_PATH}/tools) if(NOT EXISTS ${SOURCE_PATH}/tools/clang) - file(RENAME ${SOURCE_PATH}/tools/cfe-5.0.0.src ${SOURCE_PATH}/tools/clang) + file(RENAME ${SOURCE_PATH}/tools/cfe-5.0.1.src ${SOURCE_PATH}/tools/clang) endif() vcpkg_apply_patches( -- cgit v1.2.3 From 9b4e48cb1d4aaf27a269fa16a0270c66d7a52350 Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Sat, 6 Jan 2018 12:58:22 +0300 Subject: [sqlitecpp] Initial port --- ports/sqlitecpp/0001-Find-external-sqlite3.patch | 26 +++++++++++++++++++ ports/sqlitecpp/CONTROL | 4 +++ ports/sqlitecpp/portfile.cmake | 33 ++++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 ports/sqlitecpp/0001-Find-external-sqlite3.patch create mode 100644 ports/sqlitecpp/CONTROL create mode 100644 ports/sqlitecpp/portfile.cmake diff --git a/ports/sqlitecpp/0001-Find-external-sqlite3.patch b/ports/sqlitecpp/0001-Find-external-sqlite3.patch new file mode 100644 index 000000000..ef6700e14 --- /dev/null +++ b/ports/sqlitecpp/0001-Find-external-sqlite3.patch @@ -0,0 +1,26 @@ +From 495f0f8bf2caf158ffed78e479d68359f51289a2 Mon Sep 17 00:00:00 2001 +From: Stanislav Ershov +Date: Sat, 6 Jan 2018 11:26:55 +0300 +Subject: [PATCH] Find external sqlite3 + +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4a3e492..f7e22a5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -193,7 +193,8 @@ install(EXPORT ${PROJECT_NAME}Config DESTINATION lib/cmake/${PROJECT_NAME}) + ## Build provided copy of SQLite3 C library ## + + # TODO NOCOMMIT +-#find_package(sqlite3) ++find_package(sqlite3 REQUIRED) ++target_link_libraries(SQLiteCpp PRIVATE sqlite3) + #if(sqlite3_VERSION VERSION_LESS "3.19") + # set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT") + #endif() +-- +2.15.0.windows.1 + diff --git a/ports/sqlitecpp/CONTROL b/ports/sqlitecpp/CONTROL new file mode 100644 index 000000000..133ac6703 --- /dev/null +++ b/ports/sqlitecpp/CONTROL @@ -0,0 +1,4 @@ +Source: sqlitecpp +Version: 2.2 +Build-Depends: sqlite3 +Description: SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper. diff --git a/ports/sqlitecpp/portfile.cmake b/ports/sqlitecpp/portfile.cmake new file mode 100644 index 000000000..2af9c8cfa --- /dev/null +++ b/ports/sqlitecpp/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) +vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH + REPO "SRombauts/SQLiteCpp" + REF "2.2.0" + HEAD_REF master + SHA512 769857c50cc24596cbd7c6f057ca1e158a3bfecf00d7865d6ef0b90a2ff8ecb9ccb9e1d0e660bb9df8ecd50075a94a9bc9e3a71b96f2ef1c30780c6da9446cf0) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-Find-external-sqlite3.patch) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSQLITECPP_RUN_CPPLINT=OFF + -DSQLITECPP_RUN_CPPCHECK=OFF + -DSQLITECPP_INTERNAL_SQLITE=OFF + -DSQLITE_ENABLE_COLUMN_METADATA=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SQLiteCpp) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlitecpp RENAME copyright) -- cgit v1.2.3 From aa8883f71a3cdef460df6eda7fd6db7bca242db4 Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Sat, 6 Jan 2018 13:01:06 +0300 Subject: [vcpkg] fix typos in error messages --- toolsrc/src/vcpkg/vcpkgpaths.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 70d64de45..fa5fb128c 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -583,7 +583,7 @@ namespace vcpkg candidates, [&](const Toolset* t) { return *tsv == t->version && *vsp == t->visual_studio_root_path; }); Checks::check_exit(VCPKG_LINE_INFO, !candidates.empty(), - "Could not find Visual Studio instace at %s with %s toolset.", + "Could not find Visual Studio instance at %s with %s toolset.", vsp->u8string(), *tsv); @@ -595,7 +595,7 @@ namespace vcpkg { Util::stable_keep_if(candidates, [&](const Toolset* t) { return *tsv == t->version; }); Checks::check_exit( - VCPKG_LINE_INFO, !candidates.empty(), "Could not find Visual Studio instace with %s toolset.", *tsv); + VCPKG_LINE_INFO, !candidates.empty(), "Could not find Visual Studio instance with %s toolset.", *tsv); } if (vsp) @@ -605,7 +605,7 @@ namespace vcpkg [&](const Toolset* t) { return vs_root_path == t->visual_studio_root_path; }); Checks::check_exit(VCPKG_LINE_INFO, !candidates.empty(), - "Could not find Visual Studio instace at %s.", + "Could not find Visual Studio instance at %s.", vs_root_path.generic_string()); } -- cgit v1.2.3 From bc70053ab7764d3d59c428c507aa25ccea773458 Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Sat, 6 Jan 2018 18:54:59 +0100 Subject: use proper symbol to build correct configuration --- scripts/cmake/vcpkg_build_cmake.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 66503f4b8..8bafee4d4 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -80,7 +80,7 @@ function(vcpkg_build_cmake) endif() execute_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG} + COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG} OUTPUT_FILE "${LOGPREFIX}-out.log" ERROR_FILE "${LOGPREFIX}-err.log" RESULT_VARIABLE error_code @@ -99,7 +99,7 @@ function(vcpkg_build_cmake) if(out_contents MATCHES "LINK : fatal error LNK1102:" OR out_contents MATCHES " fatal error C1060: ") # The linker ran out of memory during execution. We will try continuing once more, with parallelism disabled. execute_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG} + COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG} OUTPUT_FILE "${LOGPREFIX}-out-1.log" ERROR_FILE "${LOGPREFIX}-err-1.log" RESULT_VARIABLE error_code @@ -124,7 +124,7 @@ function(vcpkg_build_cmake) file(TO_NATIVE_PATH "${LOG}" NATIVE_LOG) list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") endforeach() - set(_eb_COMMAND ${CMAKE_COMMAND} --build . --config Release ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG}) + set(_eb_COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG}) set(_eb_WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) message(FATAL_ERROR " Command failed: ${_eb_COMMAND}\n" -- cgit v1.2.3 From eb34e61d6d1a01851db311776f8f6218449ca53c Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Mon, 8 Jan 2018 14:00:54 +0100 Subject: [cgal] Use CGAL_INSTALL_CMAKE_DIR to force an installation path for CMake files --- ports/cgal/CONTROL | 2 +- ports/cgal/portfile.cmake | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL index c2331f294..2fc86bd11 100644 --- a/ports/cgal/CONTROL +++ b/ports/cgal/CONTROL @@ -1,4 +1,4 @@ Source: cgal -Version: 4.11-1 +Version: 4.11-2 Build-Depends: mpfr, mpir, zlib, qt5, boost-format, boost-container, boost-iterator, boost-variant, boost-any, boost-unordered, boost-random Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry. diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake index 9ef8c189d..642e88920 100644 --- a/ports/cgal/portfile.cmake +++ b/ports/cgal/portfile.cmake @@ -11,11 +11,13 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DCGAL_INSTALL_CMAKE_DIR=share/cgal ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/CGAL") +vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() -- cgit v1.2.3 From 17bdc084f944eaf489341bd54e9a191fb9a53986 Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Sun, 7 Jan 2018 13:26:55 +0300 Subject: [mpg123] Update to 1.25.8 --- ports/mpg123/CONTROL | 2 +- ports/mpg123/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/mpg123/CONTROL b/ports/mpg123/CONTROL index e4652e52d..b742b0a08 100644 --- a/ports/mpg123/CONTROL +++ b/ports/mpg123/CONTROL @@ -1,3 +1,3 @@ Source: mpg123 -Version: 1.24.0-1 +Version: 1.25.8 Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). \ No newline at end of file diff --git a/ports/mpg123/portfile.cmake b/ports/mpg123/portfile.cmake index cac518cb2..07dd1b3f0 100644 --- a/ports/mpg123/portfile.cmake +++ b/ports/mpg123/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(MPG123_VERSION 1.24.0) -set(MPG123_HASH e7c0d7a103daf496e75a6aa6aca861cfc0ad391f242335990c2360305e567039d24ca3b37a35f79b75749055e255f4692b8b43d2fec332b119223b00e12b0cb7) +set(MPG123_VERSION 1.25.8) +set(MPG123_HASH f226317dddb07841a13753603fa13c0a867605a5a051626cb30d45cfba266d3d4296f5b8254f65b403bb5eef6addce1784ae8829b671a746854785cda1bad203) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpg123-${MPG123_VERSION}) #architecture detection -- cgit v1.2.3 From 78ae618d8ec3bad4e9dc45f3a382a513ffd09065 Mon Sep 17 00:00:00 2001 From: Nikolay Baklicharov Date: Mon, 8 Jan 2018 22:12:37 +0200 Subject: [librtmp] Update to 2.4 --- ports/librtmp/CMakeLists.txt | 3 +-- ports/librtmp/CONTROL | 2 +- ports/librtmp/fix_strncasecmp.patch | 18 +++++++++++------- ports/librtmp/hide_netstackdump.patch | 6 +++--- ports/librtmp/librtmp.def | 24 ++++++++++++++---------- ports/librtmp/portfile.cmake | 9 +++++---- 6 files changed, 35 insertions(+), 27 deletions(-) diff --git a/ports/librtmp/CMakeLists.txt b/ports/librtmp/CMakeLists.txt index c12ddc0ef..f0f78e5f1 100644 --- a/ports/librtmp/CMakeLists.txt +++ b/ports/librtmp/CMakeLists.txt @@ -36,7 +36,6 @@ set(SRCS librtmp/amf.c librtmp/log.c librtmp/parseurl.c librtmp/rtmp.c - librtmp/librtmp.def ) if(MSVC) @@ -54,4 +53,4 @@ install(TARGETS librtmp LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) -install(FILES librtmp/rtmp.h librtmp/amf.h DESTINATION include/librtmp) \ No newline at end of file +install(DIRECTORY ${PROJECT_SOURCE_DIR}/librtmp DESTINATION include FILES_MATCHING PATTERN "*.h") diff --git a/ports/librtmp/CONTROL b/ports/librtmp/CONTROL index d26541d91..9a93c8b47 100644 --- a/ports/librtmp/CONTROL +++ b/ports/librtmp/CONTROL @@ -1,4 +1,4 @@ Source: librtmp -Version: 2.3 +Version: 2.4 Build-Depends: zlib, openssl Description: RTMPDump Real-Time Messaging Protocol API diff --git a/ports/librtmp/fix_strncasecmp.patch b/ports/librtmp/fix_strncasecmp.patch index c1cadc4ac..3e0c7ea96 100644 --- a/ports/librtmp/fix_strncasecmp.patch +++ b/ports/librtmp/fix_strncasecmp.patch @@ -1,16 +1,20 @@ diff --git a/librtmp/rtmp_sys.h b/librtmp/rtmp_sys.h -index 0874cbe..b43d587 100644 +index 6a3f215..1b5ac2a 100644 --- a/librtmp/rtmp_sys.h +++ b/librtmp/rtmp_sys.h -@@ -37,6 +37,11 @@ +@@ -28,11 +28,13 @@ #include - #endif -+#ifdef _MSC_VER -+#define strncasecmp _strnicmp + #ifdef _MSC_VER /* MSVC */ ++#if _MSC_VER < 1900 + #define snprintf _snprintf +-#define strcasecmp stricmp +-#define strncasecmp strnicmp + #define vsnprintf _vsnprintf + #endif +#define strcasecmp _stricmp ++#define strncasecmp _strnicmp +#endif -+ + #define GetSockError() WSAGetLastError() #define SetSockError(e) WSASetLastError(e) - #define setsockopt(a,b,c,d,e) (setsockopt)(a,b,c,(const char *)d,(int)e) diff --git a/ports/librtmp/hide_netstackdump.patch b/ports/librtmp/hide_netstackdump.patch index e2a5e4207..391bbdc39 100644 --- a/ports/librtmp/hide_netstackdump.patch +++ b/ports/librtmp/hide_netstackdump.patch @@ -1,8 +1,8 @@ diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c -index f152648..0bf3f7d 100644 +index 5ef3ae9..e559c6e 100644 --- a/librtmp/rtmp.c +++ b/librtmp/rtmp.c -@@ -1316,7 +1316,7 @@ ReadN(RTMP *r, char *buffer, int n) +@@ -1333,7 +1333,7 @@ ReadN(RTMP *r, char *buffer, int n) SendBytesReceived(r); } /*RTMP_Log(RTMP_LOGDEBUG, "%s: %d bytes\n", __FUNCTION__, nBytes); */ @@ -11,7 +11,7 @@ index f152648..0bf3f7d 100644 fwrite(ptr, 1, nBytes, netstackdump_read); #endif -@@ -3527,7 +3527,7 @@ RTMPSockBuf_Send(RTMPSockBuf *sb, const char *buf, int len) +@@ -3553,7 +3553,7 @@ RTMPSockBuf_Send(RTMPSockBuf *sb, const char *buf, int len) { int rc; diff --git a/ports/librtmp/librtmp.def b/ports/librtmp/librtmp.def index d9f8b9136..837e6a355 100644 --- a/ports/librtmp/librtmp.def +++ b/ports/librtmp/librtmp.def @@ -1,4 +1,11 @@ EXPORTS + AMF3_Decode + AMF3CD_AddProp + AMF3CD_GetProp + AMF3Prop_Decode + AMF3ReadInteger + AMF3ReadString + AMF_AddProp AMF_CountProp AMF_Decode @@ -24,13 +31,6 @@ EXPORTS AMF_GetProp AMF_Reset - AMF3_Decode - AMF3CD_AddProp - AMF3CD_GetProp - AMF3Prop_Decode - AMF3ReadInteger - AMF3ReadString - AMFProp_Decode AMFProp_Dump AMFProp_Encode @@ -51,9 +51,7 @@ EXPORTS RTMP_Connect0 RTMP_Connect1 RTMP_ConnectStream - RTMP_ctrlC RTMP_debuglevel - RTMP_DefaultFlashVer RTMP_DeleteStream RTMP_DropRequest RTMP_EnableWrite @@ -97,9 +95,15 @@ EXPORTS RTMP_SetupStream RTMP_SetupURL RTMP_Socket - RTMP_TLS_ctx RTMP_TLS_Init RTMP_ToggleStream RTMP_UpdateBufferMS RTMP_UserInterrupt RTMP_Write + RTMPPacket_Alloc + RTMPPacket_Dump + RTMPPacket_Free + RTMPPacket_Reset + RTMPSockBuf_Close + RTMPSockBuf_Fill + RTMPSockBuf_Send diff --git a/ports/librtmp/portfile.cmake b/ports/librtmp/portfile.cmake index 18423f152..25e41bbf7 100644 --- a/ports/librtmp/portfile.cmake +++ b/ports/librtmp/portfile.cmake @@ -1,13 +1,13 @@ include(vcpkg_common_functions) -set(RTMPDUMP_VERSION 2.3) -set(RTMPDUMP_FILENAME rtmpdump-${RTMPDUMP_VERSION}.tgz) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rtmpdump-${RTMPDUMP_VERSION}) +set(RTMPDUMP_VERSION 2.4) +set(RTMPDUMP_FILENAME rtmpdump-${RTMPDUMP_VERSION}.tar.gz) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rtmpdump) vcpkg_download_distfile(ARCHIVE URLS "http://rtmpdump.mplayerhq.hu/download/${RTMPDUMP_FILENAME}" FILENAME "${RTMPDUMP_FILENAME}" - SHA512 d8240ba372a704231286b81bbf75716d8b76874840538c4e1527f7f8b6ca66eeaba6b03167fe6fab06bf80f20f07d89ecb84cc428b3196234174a43f3328ec2a + SHA512 a6253af95492739366dce620a2a6cc6f4f18d7f12f9ef2c747240259066ca135beeb02091d0f3dd8380c0c294a30d3f702ad3fad1dee1db4e70473078fb81609 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -23,6 +23,7 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() -- cgit v1.2.3 From 69e4ef66328eb15397de74573bdf3b79fdeae596 Mon Sep 17 00:00:00 2001 From: James Chang Date: Tue, 9 Jan 2018 14:22:02 +0800 Subject: make parallel support optional --- ports/hdf5/CONTROL | 6 +++++- ports/hdf5/portfile.cmake | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ports/hdf5/CONTROL b/ports/hdf5/CONTROL index 292e14331..3d9789713 100644 --- a/ports/hdf5/CONTROL +++ b/ports/hdf5/CONTROL @@ -1,4 +1,8 @@ Source: hdf5 Version: 1.10.1 Description: HDF5 is a data model, library, and file format for storing and managing data -Build-Depends: zlib, szip, msmpi +Build-Depends: zlib, szip + +Feature: parallel +Description: parallel support for HDF5 +Build-Depends: msmpi diff --git a/ports/hdf5/portfile.cmake b/ports/hdf5/portfile.cmake index bbfec2188..15f2399f2 100644 --- a/ports/hdf5/portfile.cmake +++ b/ports/hdf5/portfile.cmake @@ -21,6 +21,12 @@ vcpkg_apply_patches( string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DISABLE_STATIC_LIBS) +if ("parallel" IN_LIST FEATURES) + set(ENABLE_PARALLEL ON) +else() + set(ENABLE_PARALLEL OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -30,7 +36,7 @@ vcpkg_configure_cmake( -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS=OFF -DHDF5_BUILD_CPP_LIB=OFF - -DHDF5_ENABLE_PARALLEL=ON + -DHDF5_ENABLE_PARALLEL=${ENABLE_PARALLEL} -DHDF5_ENABLE_Z_LIB_SUPPORT=ON -DHDF5_ENABLE_SZIP_SUPPORT=ON -DHDF5_ENABLE_SZIP_ENCODING=ON -- cgit v1.2.3 From 90542f8cf35724da6fd853e0f760f9651dfdabe0 Mon Sep 17 00:00:00 2001 From: James Chang Date: Tue, 9 Jan 2018 15:22:21 +0800 Subject: [vtk] update to 8.1.0 --- ports/vtk/CONTROL | 2 +- ports/vtk/fix-find-libharu.patch | 2 +- ports/vtk/portfile.cmake | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 66ee71f23..0ccb59f83 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,5 +1,5 @@ Source: vtk -Version: 8.0.1-6 +Version: 8.1.0 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora diff --git a/ports/vtk/fix-find-libharu.patch b/ports/vtk/fix-find-libharu.patch index 683f7bae6..1c66408c6 100644 --- a/ports/vtk/fix-find-libharu.patch +++ b/ports/vtk/fix-find-libharu.patch @@ -4,7 +4,7 @@ find_path(LIBHARU_INCLUDE_DIR hpdf.h) --find_library(LIBHARU_LIBRARY NAMES hpdf) +-find_library(LIBHARU_LIBRARY NAMES hpdf hpdfs) +find_library(LIBHARU_LIBRARY_RELEASE NAMES hpdf libhpdf) +find_library(LIBHARU_LIBRARY_DEBUG NAMES hpdfd libhpdfd) diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 51f7df4c6..be344f8bf 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -1,13 +1,13 @@ include(vcpkg_common_functions) -set(VTK_SHORT_VERSION "8.0") -set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.1") +set(VTK_SHORT_VERSION "8.1") +set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "Kitware/VTK" REF "v${VTK_LONG_VERSION}" - SHA512 3a70fa704d791d21a1e2421e6799ccc8238da5bc1fc0ab1925fb7956ccaebb7748c452faba1e7f4a2eafbc8612ed644f46f84b0cb3fe16ce539a823165feb29f + SHA512 09e110cba4ad9a6684e9b2af0cbb5b9053e3596ccb62aab96cd9e71aa4a96c809d96e13153ff44c28ad83015a61ba5195f7d34056707b62654c1bc057f9b9edf HEAD_REF "master" ) -- cgit v1.2.3 From 48e9cc063e065c67fcf104040397479f8a7420e0 Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Tue, 9 Jan 2018 00:58:01 +0300 Subject: [sdl2-image] Update to 2.0.2 --- ports/sdl2-image/CMakeLists.txt | 3 ++- ports/sdl2-image/CONTROL | 2 +- ports/sdl2-image/correct-sdl-headers-dir.patch | 25 ------------------------- ports/sdl2-image/portfile.cmake | 14 +++++--------- 4 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 ports/sdl2-image/correct-sdl-headers-dir.patch diff --git a/ports/sdl2-image/CMakeLists.txt b/ports/sdl2-image/CMakeLists.txt index d04b3f7b6..e950e16df 100644 --- a/ports/sdl2-image/CMakeLists.txt +++ b/ports/sdl2-image/CMakeLists.txt @@ -5,7 +5,7 @@ project(SDL2_image C) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") # enable all file formats which are supported natively -set(SUPPORTED_FORMATS BMP GIF LBM PCX PNM TGA XPM XCF XV) +set(SUPPORTED_FORMATS BMP GIF LBM PCX PNM TGA XPM XCF XV SVG) # enable all file formats which are supported through external dependencies # first try to load them statically (lib file in vcpkg installation) @@ -34,6 +34,7 @@ add_library(SDL2_image IMG_pcx.c IMG_png.c IMG_pnm.c + IMG_svg.c IMG_tga.c IMG_tif.c IMG_webp.c diff --git a/ports/sdl2-image/CONTROL b/ports/sdl2-image/CONTROL index aff048d9a..21e22f872 100644 --- a/ports/sdl2-image/CONTROL +++ b/ports/sdl2-image/CONTROL @@ -1,5 +1,5 @@ Source: sdl2-image -Version: 2.0.1-3 +Version: 2.0.2 Build-Depends: sdl2, libpng, libjpeg-turbo, tiff, libwebp 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/correct-sdl-headers-dir.patch b/ports/sdl2-image/correct-sdl-headers-dir.patch deleted file mode 100644 index 4addc155d..000000000 --- a/ports/sdl2-image/correct-sdl-headers-dir.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git "a/SDL_image.h" "b/SDL_image.h" -index f654483..1bd4f62 100644 ---- "a/SDL_image.h" -+++ "b/SDL_image.h" -@@ -24,9 +24,9 @@ - #ifndef _SDL_IMAGE_H - #define _SDL_IMAGE_H - --#include "SDL.h" --#include "SDL_version.h" --#include "begin_code.h" -+#include -+#include -+#include - - /* Set up for C function definitions, even when using C++ */ - #ifdef __cplusplus -@@ -140,6 +140,6 @@ extern DECLSPEC int SDLCALL IMG_SavePNG_RW(SDL_Surface *surface, SDL_RWops *dst, - #ifdef __cplusplus - } - #endif --#include "close_code.h" -+#include - - #endif /* _SDL_IMAGE_H */ diff --git a/ports/sdl2-image/portfile.cmake b/ports/sdl2-image/portfile.cmake index ad3f1a2d5..10567a131 100644 --- a/ports/sdl2-image/portfile.cmake +++ b/ports/sdl2-image/portfile.cmake @@ -7,19 +7,15 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_image-2.0.1) +set(SDL2_IMAGE_VERSION "2.0.2") +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_image-${SDL2_IMAGE_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.zip" - FILENAME "SDL2_image-2.0.1.zip" - SHA512 37d12f4fae71c586bec73262bddb9207ab2f9a2ca6001d2cbfde646e268a950ba5cd4cff53d75e2da8959ae6da6e9cadc6eca88fa7bd9aa2758395d64c84a307 + URLS "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-${SDL2_IMAGE_VERSION}.zip" + FILENAME "SDL2_image-${SDL2_IMAGE_VERSION}.zip" + SHA512 bf143bdbd3cb7cfad61b8dcc35950584304deac802bad6c0c8144e914401a5ddef01f674d2dc1214371d0f371f76e87a45873e2655947e8e1da83fb44d8285f4 ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/correct-sdl-headers-dir.patch) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindWEBP.cmake DESTINATION ${SOURCE_PATH}/cmake) -- cgit v1.2.3 From 7f7f2b629e7f81b5dcd1ccfff4392c098f8fde29 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 8 Jan 2018 23:34:52 -0800 Subject: [hdf5] Bump version to include new feature --- ports/hdf5/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/hdf5/CONTROL b/ports/hdf5/CONTROL index 3d9789713..b9744407a 100644 --- a/ports/hdf5/CONTROL +++ b/ports/hdf5/CONTROL @@ -1,5 +1,5 @@ Source: hdf5 -Version: 1.10.1 +Version: 1.10.1-1 Description: HDF5 is a data model, library, and file format for storing and managing data Build-Depends: zlib, szip -- cgit v1.2.3 From 30a6668e224dca086ce57ecc6f2fd3c4f4b9a5b0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 9 Jan 2018 02:01:40 -0800 Subject: [vtk] Add dependency from mpi feature to hdf5[parallel] --- ports/vtk/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index 0ccb59f83..8b9ae8f6b 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,5 +1,5 @@ Source: vtk -Version: 8.1.0 +Version: 8.1.0-1 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora @@ -13,7 +13,7 @@ Build-Depends: qt5 Feature: mpi Description: MPI functionality for VTK -Build-Depends: msmpi +Build-Depends: msmpi, hdf5[parallel] Feature: python Description: Python functionality for VTK -- cgit v1.2.3 From 00782fb30497ef14aaaaf24f0d0350b76dcbac63 Mon Sep 17 00:00:00 2001 From: James Chang Date: Tue, 9 Jan 2018 20:48:11 +0800 Subject: [realsense2] update to 2.9.0 --- ports/realsense2/CONTROL | 2 +- ports/realsense2/crt-linkage-restriction.patch | 6 +++--- ports/realsense2/portfile.cmake | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index 8a3efdee0..244fe200f 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,3 +1,3 @@ Source: realsense2 -Version: 2.8.3 +Version: 2.9.0 Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). diff --git a/ports/realsense2/crt-linkage-restriction.patch b/ports/realsense2/crt-linkage-restriction.patch index c36753f2a..772978616 100644 --- a/ports/realsense2/crt-linkage-restriction.patch +++ b/ports/realsense2/crt-linkage-restriction.patch @@ -1,10 +1,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index a59e2513..3b08f490 100644 +index d6717b19..3fb373be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -420,16 +420,6 @@ if(WIN32) - src/proc/temporal-filter.h +@@ -453,16 +453,6 @@ if(WIN32) src/proc/syncer-processing-block.h + src/proc/disparity-transform.h ) - - foreach(flag_var diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index ea8fff99d..ccbc664ef 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense - REF v2.8.3 - SHA512 9be27109da0247cf6669f01b3f0f945073f7851897da553915716d979c50f6228e771ca5a63955707f618d0db1fc58ba52f78dece6d904b6671dee56ba70d48f + REF v2.9.0 + SHA512 10b4d165e5763567517fc2320b7094af5a078d1b5da2374cfa8480cab0715303ea29a87f04876cbc39b5d22ac72cba7d13711c0b46fa125fbd2cf13fcb1a28e6 HEAD_REF master ) -- cgit v1.2.3 From 2ad118a2532e99a78c41dffa1b9648e7eca20a95 Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Tue, 9 Jan 2018 23:44:37 +0300 Subject: Add missing version.rc file to sdl2 libraries. Affected sdl2 libraries: - sdl2-image - sdl2-mixer - sdl2-net - sdl2-ttf --- ports/sdl2-image/CMakeLists.txt | 1 + ports/sdl2-image/CONTROL | 2 +- ports/sdl2-mixer/CMakeLists.txt | 3 ++- ports/sdl2-mixer/CONTROL | 2 +- ports/sdl2-net/CMakeLists.txt | 2 +- ports/sdl2-net/CONTROL | 2 +- ports/sdl2-ttf/CMakeLists.txt | 2 +- ports/sdl2-ttf/CONTROL | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ports/sdl2-image/CMakeLists.txt b/ports/sdl2-image/CMakeLists.txt index e950e16df..0df7e7d36 100644 --- a/ports/sdl2-image/CMakeLists.txt +++ b/ports/sdl2-image/CMakeLists.txt @@ -42,6 +42,7 @@ add_library(SDL2_image IMG_xpm.c IMG_xv.c IMG_xxx.c + version.rc ) set_target_properties(SDL2_image PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) diff --git a/ports/sdl2-image/CONTROL b/ports/sdl2-image/CONTROL index 21e22f872..f9d5e14ed 100644 --- a/ports/sdl2-image/CONTROL +++ b/ports/sdl2-image/CONTROL @@ -1,5 +1,5 @@ Source: sdl2-image -Version: 2.0.2 +Version: 2.0.2-1 Build-Depends: sdl2, libpng, libjpeg-turbo, tiff, libwebp 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-mixer/CMakeLists.txt b/ports/sdl2-mixer/CMakeLists.txt index 3a2aa0780..1df35c44a 100644 --- a/ports/sdl2-mixer/CMakeLists.txt +++ b/ports/sdl2-mixer/CMakeLists.txt @@ -68,7 +68,8 @@ add_library(SDL2_mixer music_timidity.c music_wav.c native_midi/native_midi_common.c - native_midi/native_midi_win32.c) + native_midi/native_midi_win32.c + version.rc) set_target_properties(SDL2_mixer PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) target_compile_definitions(SDL2_mixer PRIVATE ${SDL_MIXER_DEFINES}) diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL index 978b87d13..e66081fc7 100644 --- a/ports/sdl2-mixer/CONTROL +++ b/ports/sdl2-mixer/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-mixer -Version: 2.0.2-1 +Version: 2.0.2-2 Description: Multi-channel audio mixer library for SDL. Build-Depends: sdl2, libflac, mpg123, libmodplug, libvorbis diff --git a/ports/sdl2-net/CMakeLists.txt b/ports/sdl2-net/CMakeLists.txt index 4127262d7..aea5f005e 100644 --- a/ports/sdl2-net/CMakeLists.txt +++ b/ports/sdl2-net/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") find_path(SDL_INCLUDE_DIR SDL2/SDL.h) find_library(SDL_LIBRARY NAMES SDL2d SDL2) -add_library(SDL2_net SDLnet.c SDLnetselect.c SDLnetTCP.c SDLnetUDP.c) +add_library(SDL2_net SDLnet.c SDLnetselect.c SDLnetTCP.c SDLnetUDP.c version.rc) set_target_properties(SDL2_net PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) target_compile_definitions(SDL2_net PRIVATE _WINSOCK_DEPRECATED_NO_WARNINGS) diff --git a/ports/sdl2-net/CONTROL b/ports/sdl2-net/CONTROL index 6b2793449..ff239d5a4 100644 --- a/ports/sdl2-net/CONTROL +++ b/ports/sdl2-net/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-net -Version: 2.0.1-3 +Version: 2.0.1-4 Description: Networking library for SDL Build-Depends: sdl2 diff --git a/ports/sdl2-ttf/CMakeLists.txt b/ports/sdl2-ttf/CMakeLists.txt index 7e3a180f9..7c3e8fc77 100644 --- a/ports/sdl2-ttf/CMakeLists.txt +++ b/ports/sdl2-ttf/CMakeLists.txt @@ -5,7 +5,7 @@ find_path(SDL_INCLUDE_DIR SDL2/SDL.h) find_library(SDL_LIBRARY NAMES SDL2d SDL2) find_package(FreeType REQUIRED) -add_library(SDL2_ttf SDL_ttf.c) +add_library(SDL2_ttf SDL_ttf.c version.rc) set_target_properties(SDL2_ttf PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) target_include_directories(SDL2_ttf PRIVATE ${SDL_INCLUDE_DIR}/SDL2 ${FREETYPE_INCLUDE_DIR_ft2build}) diff --git a/ports/sdl2-ttf/CONTROL b/ports/sdl2-ttf/CONTROL index 18773dd21..362daf221 100644 --- a/ports/sdl2-ttf/CONTROL +++ b/ports/sdl2-ttf/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-ttf -Version: 2.0.14-3 +Version: 2.0.14-4 Description: A library for rendering TrueType fonts with SDL Build-Depends: sdl2, freetype -- cgit v1.2.3 From 124a9354c03a90ffdfe93570fad016f0e90be23b Mon Sep 17 00:00:00 2001 From: b-r-o-c-k Date: Tue, 9 Jan 2018 20:52:59 -0600 Subject: [libodb] Allow static linking to libodb --- ports/libodb/portfile.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ports/libodb/portfile.cmake b/ports/libodb/portfile.cmake index 21d715499..e45b7b25a 100644 --- a/ports/libodb/portfile.cmake +++ b/ports/libodb/portfile.cmake @@ -36,4 +36,13 @@ write_basic_package_version_file(${CURRENT_PACKAGES_DIR}/share/odb/odbConfigVers file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libodb) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libodb/LICENSE ${CURRENT_PACKAGES_DIR}/share/libodb/copyright) +set(LIBODB_HEADER_PATH ${CURRENT_PACKAGES_DIR}/include/odb/details/export.hxx) +file(READ ${LIBODB_HEADER_PATH} LIBODB_HEADER) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "#ifdef LIBODB_STATIC_LIB" "#if 1" LIBODB_HEADER ${LIBODB_HEADER}) +else() + string(REPLACE "#ifdef LIBODB_STATIC_LIB" "#if 0" LIBODB_HEADER ${LIBODB_HEADER}) +endif() +file(WRITE ${LIBODB_HEADER_PATH} ${LIBODB_HEADER}) + vcpkg_copy_pdbs() -- cgit v1.2.3 From 96aa26ebaddadb5756e923ffad3cdabb01971d1d Mon Sep 17 00:00:00 2001 From: pravic Date: Wed, 10 Jan 2018 12:47:53 +0300 Subject: [sciter] Update to 4.1.0.5687 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 478fde568..3d1f4e58d 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.0.8 +Version: 4.1.0 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 21a754172..5dffc368a 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,8 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION aa2c7a1f9128c1a846e6fd6c6ab4f4172c4ccea5) -set(SCITER_SHA 5425e6edc10ce26ac78d1e41574584d8de29b5748ff82ac7a7a869094ebd83344ca5c2e99178193e135fa52b67d11fa0777162d9396dea57f607e30826293ef2) +set(SCITER_REVISION e46624fb242d3cbad6abdf25e9876ef6c18b7f1a) +set(SCITER_SHA 4d36856add6044bc6ea745098e82bfcb0ddeef6c254439d38c6a15d0d8334d6b330916a9238c9a8eb800750dd668d5ab6595beab907c4e00c3743effab710154) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From d837a89c64f80c1d958dc03c23a63ae22ae45a7c Mon Sep 17 00:00:00 2001 From: Francisco Facioni Date: Wed, 10 Jan 2018 10:12:05 +0000 Subject: [grpc] update to 1.8.3 --- ports/grpc/CONTROL | 2 +- ports/grpc/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 8eb7093e1..83a44f869 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.7.2 +Version: 1.8.3 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 45126f05f..4d9b692ab 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF v1.7.2 - SHA512 54cb4165878fb3361cd7a81b631f1b20e991eadd286c0f6020542a8aa464cf30bdd1479dc413b767a1585bdc730e465a64c45e9e805723f38bd54521e1c4f942 + REF v1.8.3 + SHA512 9bf308252221488840fad7669b8f10143c6e2130585b350b31b8d9f362f55cb1d16e5ee79d9d02ce13521e9471a8d55e8fd6c1ae0b710e22e3f918fb9fdc4d40 HEAD_REF master ) -- cgit v1.2.3 From b04abf9841182173a89cd8809d9a9b2b12d9fd58 Mon Sep 17 00:00:00 2001 From: Francisco Facioni Date: Wed, 10 Jan 2018 10:29:20 +0000 Subject: [flatbuffers] update to 1.8.0 --- ports/flatbuffers/CONTROL | 2 +- ports/flatbuffers/portfile.cmake | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/flatbuffers/CONTROL b/ports/flatbuffers/CONTROL index 5611e4945..a1efcdd39 100644 --- a/ports/flatbuffers/CONTROL +++ b/ports/flatbuffers/CONTROL @@ -1,4 +1,4 @@ Source: flatbuffers -Version: 1.7.1-1 +Version: 1.8.0 Description: Memory Efficient Serialization Library http://google.github.io/flatbuffers/ 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. diff --git a/ports/flatbuffers/portfile.cmake b/ports/flatbuffers/portfile.cmake index 4df390de0..2e3ab983c 100644 --- a/ports/flatbuffers/portfile.cmake +++ b/ports/flatbuffers/portfile.cmake @@ -7,8 +7,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/flatbuffers - REF v1.7.1 - SHA512 57732fc352c216c4be6d3237f93b872abf9dd2b62361d7d2856f99804a178760e4665ead2e33d5acdd00984ad03a746f581c9784ece583e1b2df1a10776f967a + REF v1.8.0 + SHA512 8f6c84caa6456418fc751ea9de456dd37378b3239d1a41d2205140e7b19a5b8b2e342a22dc8d7fdd0c36878455e9d7401cc6438d3b771f7875e8fcfe7bbd52f1 HEAD_REF master ) @@ -33,6 +33,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/flatbuffers") if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -- cgit v1.2.3 From 443af9686b9ea44b5f4b5a08fb822cf25f5c5cd9 Mon Sep 17 00:00:00 2001 From: Koby Kahane Date: Wed, 10 Jan 2018 15:40:27 +0200 Subject: Update TCLAP to 1.2.2. --- ports/tclap/CONTROL | 2 +- ports/tclap/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/tclap/CONTROL b/ports/tclap/CONTROL index 1e086a845..e4276ca03 100644 --- a/ports/tclap/CONTROL +++ b/ports/tclap/CONTROL @@ -1,3 +1,3 @@ Source: tclap -Version: 1.2.1 +Version: 1.2.2 Description: Templatized command-line argument parser for C++ diff --git a/ports/tclap/portfile.cmake b/ports/tclap/portfile.cmake index 8f41d076f..96337418a 100644 --- a/ports/tclap/portfile.cmake +++ b/ports/tclap/portfile.cmake @@ -1,10 +1,10 @@ #header-only library include(vcpkg_common_functions) -set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/tclap-1.2.1") +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/tclap-1.2.2") vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/project/tclap/tclap-1.2.1.tar.gz" - FILENAME "tclap-1.2.1.tar.gz" - SHA512 8bd6ee724600880840048c7b36f02d31b1aa4910b17f80fb04aef89b1f1917856d9979ec488edbd457b66d9d689aea97540abb842a8b902bbd75c66a6e07b9b1 + URLS "http://downloads.sourceforge.net/project/tclap/tclap-1.2.2.tar.gz" + FILENAME "tclap-1.2.2.tar.gz" + SHA512 516ec17f82a61277922bc8c0ed66973300bf42a738847fbbd2912c6405c34f94a13e47dc964854a5b26a9a9f1f518cce682ca54e769d6016851656c647866107 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 8c09cad80ec3fb0fb433bd44a9feb68eb8e68c01 Mon Sep 17 00:00:00 2001 From: Koby Kahane Date: Wed, 10 Jan 2018 16:26:56 +0200 Subject: [gflags] update to 2.2.1 --- ports/gflags/CONTROL | 2 +- ports/gflags/fix-install.patch | 43 +++++------------------------------ ports/gflags/fix-static-linking.patch | 13 ----------- ports/gflags/portfile.cmake | 5 ++-- 4 files changed, 9 insertions(+), 54 deletions(-) delete mode 100644 ports/gflags/fix-static-linking.patch diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index c673815f9..c41d49217 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.2.0-5 +Version: 2.2.1 Description: A C++ library that implements commandline flags processing diff --git a/ports/gflags/fix-install.patch b/ports/gflags/fix-install.patch index a2e6061f8..eda5b7f98 100644 --- a/ports/gflags/fix-install.patch +++ b/ports/gflags/fix-install.patch @@ -1,46 +1,15 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3fd9d70..0debb89 100644 +index 922a038..7d6af45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -397,11 +397,11 @@ endif () - # ---------------------------------------------------------------------------- - # installation directories - if (OS_WINDOWS) -- set (RUNTIME_INSTALL_DIR Bin) -- set (LIBRARY_INSTALL_DIR Lib) -- set (INCLUDE_INSTALL_DIR Include) -- set (CONFIG_INSTALL_DIR CMake) +@@ -410,8 +410,8 @@ if (OS_WINDOWS) + set (RUNTIME_INSTALL_DIR "bin") + set (LIBRARY_INSTALL_DIR "lib") + set (INCLUDE_INSTALL_DIR "include") +- set (CONFIG_INSTALL_DIR "lib/cmake/${PACKAGE_NAME}") - set (PKGCONFIG_INSTALL_DIR) -+ set (RUNTIME_INSTALL_DIR "bin") -+ set (LIBRARY_INSTALL_DIR "lib") -+ set (INCLUDE_INSTALL_DIR "include") + set (CONFIG_INSTALL_DIR "share/${PACKAGE_NAME}") + set (PKGCONFIG_INSTALL_DIR "") else () set (RUNTIME_INSTALL_DIR bin) # The LIB_INSTALL_DIR and LIB_SUFFIX variables are used by the Fedora -@@ -501,14 +501,22 @@ configure_file (cmake/version.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-co - if (BUILD_SHARED_LIBS AND INSTALL_SHARED_LIBS) - foreach (opts IN ITEMS "" _nothreads) - if (BUILD_gflags${opts}_LIB) -- install (TARGETS gflags${opts}_shared DESTINATION ${LIBRARY_INSTALL_DIR} EXPORT ${EXPORT_NAME}) -+ install (TARGETS gflags${opts}_shared -+ EXPORT ${EXPORT_NAME} -+ RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR} -+ LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} -+ ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}) - endif () - endforeach () - endif () - if (BUILD_STATIC_LIBS AND INSTALL_STATIC_LIBS) - foreach (opts IN ITEMS "" _nothreads) - if (BUILD_gflags${opts}_LIB) -- install (TARGETS gflags${opts}_static DESTINATION ${LIBRARY_INSTALL_DIR} EXPORT ${EXPORT_NAME}) -+ install (TARGETS gflags${opts}_static -+ EXPORT ${EXPORT_NAME} -+ RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR} -+ LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} -+ ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}) - endif () - endforeach () - endif () diff --git a/ports/gflags/fix-static-linking.patch b/ports/gflags/fix-static-linking.patch deleted file mode 100644 index 0cefed2e3..000000000 --- a/ports/gflags/fix-static-linking.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/gflags.h.in b/src/gflags.h.in -index 43b3f7a..82e640f 100644 ---- a/src/gflags.h.in -+++ b/src/gflags.h.in -@@ -86,7 +86,7 @@ - - // We always want to export variables defined in user code - #ifndef GFLAGS_DLL_DEFINE_FLAG --# ifdef _MSC_VER -+# if GFLAGS_IS_A_DLL && defined(_MSC_VER) - # define GFLAGS_DLL_DEFINE_FLAG __declspec(dllexport) - # else - # define GFLAGS_DLL_DEFINE_FLAG diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index 13d9a831b..59811f487 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -7,15 +7,14 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gflags/gflags - REF v2.2.0 - SHA512 e2106ca70ff539024f888bca12487b3bf7f4f51928acf5ae3e1022f6bbd5e3b7882196ec50b609fd52f739e1f7b13eec7d4b3535d8216ec019a3577de6b4228d + REF v2.2.1 + SHA512 e919cbdcff1f993ddbfa9c06d8e595566a4717c27ff62f388a64c0e6b4683a93211c24ce78485eae84c2c76053341574064e6c56af185fc2782e2816b26e1fc9 HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install.patch" - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-static-linking.patch" ) vcpkg_configure_cmake( -- cgit v1.2.3 From 3011064df2497e8a02d3aae30d75a3b537498ae0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 10 Jan 2018 16:56:36 -0800 Subject: Update CHANGELOG and bump version to v0.0.101 --- CHANGELOG.md | 248 ++++++++++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 249 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c07411a8..e2e2b42b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,251 @@ +vcpkg (0.0.101) +-------------- + * Add ports: + - alac-decoder 0.2 + - args d8905de + - boost-accumulators 1.66.0 + - boost-algorithm 1.66.0 + - boost-align 1.66.0 + - boost-any 1.66.0 + - boost-array 1.66.0 + - boost-asio 1.66.0 + - boost-assert 1.66.0 + - boost-assign 1.66.0 + - boost-atomic 1.66.0 + - boost-beast 1.66.0 + - boost-bimap 1.66.0 + - boost-bind 1.66.0 + - boost-build 1.66.0 + - boost-callable-traits 1.66.0 + - boost-chrono 1.66.0 + - boost-circular-buffer 1.66.0 + - boost-compatibility 1.66.0 + - boost-compute 1.66.0 + - boost-concept-check 1.66.0 + - boost-config 1.66.0 + - boost-container 1.66.0 + - boost-context 1.66.0 + - boost-conversion 1.66.0 + - boost-convert 1.66.0 + - boost-core 1.66.0 + - boost-coroutine 1.66.0 + - boost-coroutine2 1.66.0 + - boost-crc 1.66.0 + - boost-date-time 1.66.0 + - boost-detail 1.66.0 + - boost-disjoint-sets 1.66.0 + - boost-dll 1.66.0 + - boost-dynamic-bitset 1.66.0 + - boost-endian 1.66.0 + - boost-exception 1.66.0 + - boost-fiber 1.66.0 + - boost-filesystem 1.66.0 + - boost-flyweight 1.66.0 + - boost-foreach 1.66.0 + - boost-format 1.66.0 + - boost-function 1.66.0 + - boost-function-types 1.66.0 + - boost-functional 1.66.0 + - boost-fusion 1.66.0 + - boost-geometry 1.66.0 + - boost-gil 1.66.0 + - boost-graph 1.66.0 + - boost-graph-parallel 1.66.0 + - boost-hana 1.66.0 + - boost-heap 1.66.0 + - boost-icl 1.66.0 + - boost-integer 1.66.0 + - boost-interprocess 1.66.0 + - boost-interval 1.66.0 + - boost-intrusive 1.66.0 + - boost-io 1.66.0 + - boost-iostreams 1.66.0 + - boost-iterator 1.66.0 + - boost-lambda 1.66.0 + - boost-lexical-cast 1.66.0 + - boost-local-function 1.66.0 + - boost-locale 1.66.0 + - boost-lockfree 1.66.0 + - boost-log 1.66.0 + - boost-logic 1.66.0 + - boost-math 1.66.0 + - boost-metaparse 1.66.0 + - boost-move 1.66.0 + - boost-mp11 1.66.0 + - boost-mpi 1.66.0 + - boost-mpl 1.66.0 + - boost-msm 1.66.0 + - boost-multi-array 1.66.0 + - boost-multi-index 1.66.0 + - boost-multiprecision 1.66.0 + - boost-numeric-conversion 1.66.0 + - boost-odeint 1.66.0 + - boost-optional 1.66.0 + - boost-parameter 1.66.0 + - boost-phoenix 1.66.0 + - boost-poly-collection 1.66.0 + - boost-polygon 1.66.0 + - boost-pool 1.66.0 + - boost-predef 1.66.0 + - boost-preprocessor 1.66.0 + - boost-process 1.66.0 + - boost-program-options 1.66.0 + - boost-property-map 1.66.0 + - boost-property-tree 1.66.0 + - boost-proto 1.66.0 + - boost-ptr-container 1.66.0 + - boost-python 1.66.0-1 + - boost-qvm 1.66.0 + - boost-random 1.66.0 + - boost-range 1.66.0 + - boost-ratio 1.66.0 + - boost-rational 1.66.0 + - boost-regex 1.66.0 + - boost-scope-exit 1.66.0 + - boost-serialization 1.66.0 + - boost-signals 1.66.0 + - boost-signals2 1.66.0 + - boost-smart-ptr 1.66.0 + - boost-sort 1.66.0 + - boost-spirit 1.66.0 + - boost-stacktrace 1.66.0 + - boost-statechart 1.66.0 + - boost-static-assert 1.66.0 + - boost-system 1.66.0 + - boost-test 1.66.0-1 + - boost-thread 1.66.0 + - boost-throw-exception 1.66.0 + - boost-timer 1.66.0 + - boost-tokenizer 1.66.0 + - boost-tti 1.66.0 + - boost-tuple 1.66.0 + - boost-type-erasure 1.66.0 + - boost-type-index 1.66.0 + - boost-type-traits 1.66.0 + - boost-typeof 1.66.0 + - boost-ublas 1.66.0 + - boost-units 1.66.0 + - boost-unordered 1.66.0 + - boost-utility 1.66.0 + - boost-uuid 1.66.0 + - boost-variant 1.66.0 + - boost-vcpkg-helpers 3 + - boost-vmd 1.66.0 + - boost-wave 1.66.0 + - boost-winapi 1.66.0 + - boost-xpressive 1.66.0 + - brynet 0.9.0 + - chaiscript 6.0.0 + - cimg 2.1.8 + - crow 0.1 + - gainput 1.0.0 + - jack2 1.9.12.2 + - libdatrie 0.2.10-2 + - libgit2 0.26.0 + - libmupdf 1.11-1 + - libpqxx 6.0.0 + - libqrencode 4.0.0-1 + - libsamplerate 0.1.9.0 + - mbedtls 2.6.1 + - nghttp2 1.28.0 + - portmidi 0.217.1 + - re2 2017-12-01-1 + - rs-core-lib commit-1ed2dadbda3977b13e5e83cc1f3eeca76b36ebe5 + - sol 2.18.7 + - soundtouch 2.0.0.2 + - sqlitecpp 2.2 + - tinyexif 1.0.1-1 + - unicorn 2017-12-06-bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4-1 + - unicorn-lib commit-3ffa7fe69a1d0c37fb52a4af61380c5fd84fa5aa + - yoga 1.7.0 + * Update ports: + - ace 6.4.5 -> 6.4.6 + - alembic 1.7.4-1 -> 1.7.5 + - arrow 0.6.0 -> 0.6.0-1 + - asio 1.10.8 -> 1.10.8-1 + - assimp 4.0.1-3 -> 4.1.0-1 + - aubio 0.46 -> 0.4.6 + - aws-sdk-cpp 1.2.4 -> 1.3.15 + - beast v84-1 -> 0 + - blaze 3.2-2 -> 3.2-3 + - bond 7.0.2 -> 7.0.2-1 + - boost 1.65.1-3 -> 1.66.0 + - brotli 1.0.2 -> 1.0.2-1 + - bullet3 2.86.1-1 -> 2.87 + - cgal 4.11 -> 4.11-2 + - cpp-redis 3.5.2-2 -> 4.3.0 + - cpprestsdk 2.10.0 -> 2.10.1-1 + - curl 7.55.1-1 -> 7.57.0-1 + - directxmesh oct2016 -> dec2017 + - directxtex dec2016 -> dec2017 + - directxtk dec2016-1 -> dec2017 + - dlib 19.7 -> 19.8 + - exiv2 4f4add2cdcbe73af7098122a509dff0739d15908 -> 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99 + - fcl 0.5.0-2 -> 0.5.0-3 + - fftw3 3.3.7-1 -> 3.3.7-2 + - flatbuffers 1.7.1-1 -> 1.8.0 + - fmt 4.0.0-1 -> 4.1.0 + - folly 2017.11.27.00 -> 2017.11.27.00-2 + - gflags 2.2.0-5 -> 2.2.1 + - glm 0.9.8.5 -> 0.9.8.5-1 + - gmime 3.0.2 -> 3.0.5 + - grpc 1.7.2 -> 1.8.3 + - gsl-lite 0.24.0 -> 0.26.0 + - gtest 1.8-1 -> 1.8.0-5 + - harfbuzz 1.6.3-1 -> 1.7.4 + - hdf5 1.10.0-patch1-2 -> 1.10.1-1 + - hpx 1.0.0-5 -> 1.0.0-7 + - imgui 1.52 -> 1.53 + - itk 4.11.0 -> 4.13.0 + - libbson 1.6.2-2 -> 1.9.0 + - libconfig 1.6.0-1 -> 1.7.1 + - libiconv 1.15 -> 1.15-1 + - libkml 1.3.0-1 -> 1.3.0-2 + - librtmp 2.3 -> 2.4 + - libsodium 1.0.15 -> 1.0.15-1 + - libtorrent 1.1.5 -> 1.1.6 + - live555 2017.09.12 -> 2017.10.28 + - llvm 5.0.0-2 -> 5.0.1 + - mongo-c-driver 1.6.2-1 -> 1.9.0 + - mongo-cxx-driver 3.1.1-1 -> 3.1.1-2 + - mpg123 1.24.0-1 -> 1.25.8 + - mpir 3.0.0-3 -> 3.0.0-4 + - ms-gsl 20171104-d10ebc6555b627c9d1196076a78467e7be505987 -> 20171204-9d65e74400976b3509833f49b16d401600c7317d + - nlohmann-json 2.1.1-1 -> 3.0.1 + - opencv 3.3.1-9 -> 3.4.0 + - openimageio 1.7.15-1 -> 1.7.15-2 + - openssl 1.0.2m -> 1.0.2n-1 + - openvdb 5.0.0 -> 5.0.0-1 + - pcl 1.8.1-7 -> 1.8.1-9 + - pybind11 2.2.0 -> 2.2.1 + - python3 3.6.1 -> 3.6.4 + - range-v3 20151130-vcpkg4 -> 20151130-vcpkg5 + - realsense2 2.8.2 -> 2.9.0 + - sciter 4.0.6 -> 4.1.0 + - sdl2-image 2.0.1-3 -> 2.0.2-1 + - sdl2-mixer 2.0.2-1 -> 2.0.2-2 + - sdl2-net 2.0.1-3 -> 2.0.1-4 + - sdl2-ttf 2.0.14-3 -> 2.0.14-4 + - sobjectizer 5.5.19.2-1 -> 5.5.20 + - speex 1.2.0-2 -> 1.2.0-4 + - string-theory 1.6-1 -> 1.7 + - szip 2.1-2 -> 2.1.1 + - tacopie 2.4.1-2 -> 3.2.0 + - tbb 2017_U7 -> 2018_U2 + - tclap 1.2.1 -> 1.2.2 + - thrift 20172805-72ca60debae1d9fb35d9f0085118873669006d7f-1 -> 20172805-72ca60debae1d9fb35d9f0085118873669006d7f-2 + - tinyxml2 5.0.1-1 -> 6.0.0 + - vtk 8.0.1-5 -> 8.1.0-1 + - wt 3.3.7-2 -> 3.3.7-4 + - zeromq 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2-1 -> 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2-2 + - zstd 1.3.1-1 -> 1.3.3 + * Introduce `vcpkg upgrade` command. This command automatically rebuilds outdated libraries to the latest version. + * `vcpkg list`: Improve output for long triplets + * Update required version & auto-downloaded version of `cmake` to 3.10.1 + +-- vcpkg team WED, 10 Jan 2018 17:00:00 -0800 + + vcpkg (0.0.100) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index e45ea373f..d78a54a5e 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.100" \ No newline at end of file +"0.0.101" \ No newline at end of file -- cgit v1.2.3 From 0e6e2c9658f3cc7d11a37e4feb0a98ff58a4e53c Mon Sep 17 00:00:00 2001 From: Joel Clay Date: Wed, 10 Jan 2018 20:47:17 -0500 Subject: Update magnum, magnum-plugins and corrade to latest --- ports/corrade/CONTROL | 2 +- ports/corrade/portfile.cmake | 4 ++-- ports/magnum-plugins/CONTROL | 2 +- ports/magnum-plugins/portfile.cmake | 4 ++-- ports/magnum/CONTROL | 2 +- ports/magnum/portfile.cmake | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL index 2d262a0e0..a2d73fba8 100644 --- a/ports/corrade/CONTROL +++ b/ports/corrade/CONTROL @@ -1,3 +1,3 @@ Source: corrade -Version: jun2017-3 +Version: jan2018-1 Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 88b27ab62..d08530ef4 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/corrade - REF c182fe636894a998f241212d0205d0c126b7926f - SHA512 d664c7884c0c6c7977261a851948b2b591ac0fbdbcfddab1d8e578e629a252f48fa786cf9f96525e10aa76c95919dfc3452ccbe5e930aa4a69e61269e4ee07ee + REF 2dd926d23f21042838d9244c00ddd1d2f09861ee + SHA512 085062a34c4fecc864d02f38d4d45e22f6de72f3599d67327a783c350e478fe943c5bb3f9cd5544953b55b7ffa78923b087bc0f40a54eb9ed9f5d580970b2f45 HEAD_REF master ) diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 6c187f423..5c76b45ae 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,4 @@ Source: magnum-plugins -Version: jun2017-5 +Version: jan2018-1 Build-Depends: stb, magnum Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index 289816b94..b2b574b06 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-plugins - REF 34a3bc34335ca05097e735db19fe1fae81dbfbb5 - SHA512 8d8998ed0f5a9361fd8a322f0c9ee8bb36b2255487e7198603f316a383a5dcb38160dcfa92759a2e2aa6d13d45f5fdae8f1165e39428d516823bc931d3097b83 + REF f0ddc63385e30c3bae362789855a95de7c46f8a7 + SHA512 d0afda7be75efd2dec731e9435732220a76e735ef58d860f7119f206b1d5828af6e70aca3517b0f930c83440930ed62cb03e6c123e37771b72c50ddb44676945 HEAD_REF master ) diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 382e39075..a54adc118 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,4 @@ Source: magnum -Version: jun2017-6 +Version: jan2018-1 Build-Depends: corrade, sdl2, openal-soft Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 67d96bf5b..57c62431e 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum - REF ed7eac0b42a598dff8984830e7f943dd6af07deb - SHA512 843e209b82b4f6f7c3f9612aec2641a28cb09361eefefe435bb7d2c06d0e4df65b6b9adf5893222cf31ddc3ccec967eb343da1da6180e9fbfef1b26234e145d5 + REF 68953f8c872b7c08f792c6082b8ab152f2119560 + SHA512 00b507b85ed3454f81fe7098e1fc349d4048a2372e3b2aceabccc0c4287540ed3850f8dd9cdcd9cfb9542ba9af741e30e43e2b03bbc5490b552f862da34369b1 HEAD_REF master ) -- cgit v1.2.3 From bfc50d8ee24f5a86b589d955a18d12a2c7d6343b Mon Sep 17 00:00:00 2001 From: Vitaliy Parinov Date: Thu, 11 Jan 2018 08:46:08 +0300 Subject: Update HowardHinnant/date to 2.4 --- ports/date/CONTROL | 2 +- ports/date/portfile.cmake | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/ports/date/CONTROL b/ports/date/CONTROL index 68fb435b6..8c1797072 100644 --- a/ports/date/CONTROL +++ b/ports/date/CONTROL @@ -1,3 +1,3 @@ Source: date -Version: 2.3-c286981b3bf83c79554769df68b27415cee68d77 +Version: 2.4 Description: A date and time library based on the C++11/14/17 header diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake index a5270554f..14bae6195 100644 --- a/ports/date/portfile.cmake +++ b/ports/date/portfile.cmake @@ -8,8 +8,8 @@ message(WARNING vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO HowardHinnant/date - REF c286981b3bf83c79554769df68b27415cee68d77 - SHA512 226e2cbc2598fbbe3a451664b017ab5b4314a682a9303268bd531931ea23baa4c9677c4433a87dbbc4a7d960dcfad1fcb632ac430d5d81c9909bcc567cf7eadf + REF v2.4 + SHA512 01bcc021ebf9ca0ac88c797896a291ff81834e7fae37323ad20881d3a172963c04d3c7bea0dd37cd945b756ab7f70f0a02edb18a085bf9abf8d8f10056f73f3c HEAD_REF master ) @@ -25,14 +25,4 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() -set(HEADER "${CURRENT_PACKAGES_DIR}/include/date/tz.h") -file(READ "${HEADER}" _contents) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - string(REPLACE "DATE_BUILD_DLL" "1" _contents "${_contents}") -else() - string(REPLACE "DATE_BUILD_LIB" "1" _contents "${_contents}") -endif() -file(WRITE "${HEADER}" "${_contents}") - - file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright) -- cgit v1.2.3 From 5fdda7b89f3de800978d3b1a3ebb6b4148788643 Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Thu, 11 Jan 2018 12:45:32 +0300 Subject: [mpg123] Fix x86 build --- ports/mpg123/0002-fix-x86-build.patch | 24 ++++++++++++++++++++++++ ports/mpg123/CONTROL | 2 +- ports/mpg123/portfile.cmake | 4 +++- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 ports/mpg123/0002-fix-x86-build.patch diff --git a/ports/mpg123/0002-fix-x86-build.patch b/ports/mpg123/0002-fix-x86-build.patch new file mode 100644 index 000000000..d7d3887b7 --- /dev/null +++ b/ports/mpg123/0002-fix-x86-build.patch @@ -0,0 +1,24 @@ +diff --git a/src/libmpg123/mangle.h b/src/libmpg123/mangle.h +index 6012ccc..bf37cd7 100644 +--- a/src/libmpg123/mangle.h ++++ b/src/libmpg123/mangle.h +@@ -85,6 +85,10 @@ + #define ASM_VALUE(a) MANGLE_MACROCAT($,a) + #endif + ++#if defined(_WIN32) && !defined(_WIN64) ++#define OPT_X86 ++#endif ++ + /* Enable position-independent code for certain platforms. */ + + #if defined(OPT_X86) +@@ -130,7 +134,7 @@ Lpic_base: \ + /* Dummies for everyone else. */ + #define LOCAL_VAR(a) a + #define GLOBAL_VAR ASM_NAME +-#define GLOBAL_VAR_PTR(a) #error Cannot use indirect addressing in non-PIC object. ++#define GLOBAL_VAR_PTR(a) // #error Cannot use indirect addressing in non-PIC object. + #define FUNC ASM_NAME + #define EXTERNAL_FUNC ASM_NAME + #define GET_GOT diff --git a/ports/mpg123/CONTROL b/ports/mpg123/CONTROL index b742b0a08..f64ae5c56 100644 --- a/ports/mpg123/CONTROL +++ b/ports/mpg123/CONTROL @@ -1,3 +1,3 @@ Source: mpg123 -Version: 1.25.8 +Version: 1.25.8-1 Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). \ No newline at end of file diff --git a/ports/mpg123/portfile.cmake b/ports/mpg123/portfile.cmake index 07dd1b3f0..891542f00 100644 --- a/ports/mpg123/portfile.cmake +++ b/ports/mpg123/portfile.cmake @@ -31,7 +31,9 @@ set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CURRENT_PORT_DIR}/0001-fix-crt-linking.patch") + PATCHES + "${CURRENT_PORT_DIR}/0001-fix-crt-linking.patch" + "${CURRENT_PORT_DIR}/0002-fix-x86-build.patch") vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj -- cgit v1.2.3 From 60fb59ce4d0b205f06282b11768d0d04fde60eae Mon Sep 17 00:00:00 2001 From: Vitaliy Parinov Date: Fri, 12 Jan 2018 05:50:19 +0300 Subject: [date] Update to 2.4 cont. (removed DATE_BUILD_LIB usages) --- ports/date/CMakeLists.txt | 2 -- ports/date/portfile.cmake | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ports/date/CMakeLists.txt b/ports/date/CMakeLists.txt index c1efc4e2a..4c38e4a87 100644 --- a/ports/date/CMakeLists.txt +++ b/ports/date/CMakeLists.txt @@ -14,8 +14,6 @@ add_library(tz src/tz.cpp) if(BUILD_SHARED_LIBS) target_compile_definitions(tz PRIVATE -DDATE_BUILD_DLL) -else() - target_compile_definitions(tz PRIVATE -DDATE_BUILD_LIB) endif() install( diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake index 14bae6195..e060edb87 100644 --- a/ports/date/portfile.cmake +++ b/ports/date/portfile.cmake @@ -25,4 +25,11 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() +set(HEADER "${CURRENT_PACKAGES_DIR}/include/date/tz.h") +file(READ "${HEADER}" _contents) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "ifdef DATE_BUILD_DLL" "if 1" _contents "${_contents}") +endif() +file(WRITE "${HEADER}" "${_contents}") + file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright) -- cgit v1.2.3 From c14f2b36e44526300f0ea7f828d09eefb77a3ad5 Mon Sep 17 00:00:00 2001 From: Ryan Fitzsimon Date: Fri, 12 Jan 2018 14:14:23 +1000 Subject: Add output option to export - The '--output=...' option allows the date/time string used in exported filenames to be overridden --- toolsrc/src/vcpkg/export.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index e3221a12f..66e6af5b6 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -251,6 +251,8 @@ namespace vcpkg::Export bool zip; bool seven_zip; + Optional maybe_output; + Optional maybe_nuget_id; Optional maybe_nuget_version; @@ -258,6 +260,7 @@ namespace vcpkg::Export std::vector specs; }; + static const std::string OPTION_OUTPUT = "--output"; static const std::string OPTION_DRY_RUN = "--dry-run"; static const std::string OPTION_RAW = "--raw"; static const std::string OPTION_NUGET = "--nuget"; @@ -280,8 +283,9 @@ namespace vcpkg::Export {OPTION_ZIP, "Export to a zip file"}, {OPTION_SEVEN_ZIP, "Export to a 7zip (.7z) file"}, }}; - static const std::array EXPORT_SETTINGS = {{ - {OPTION_NUGET_ID, "Specify the id for the exported NuGet package"}, + static const std::array EXPORT_SETTINGS = {{ + {OPTION_OUTPUT, "Specify the output name (used to construct filename)"}, + {OPTION_NUGET_ID, "Specify the id for the exported NuGet package (overrides " + OPTION_OUTPUT + ")"}, {OPTION_NUGET_VERSION, "Specify the version for the exported NuGet package"}, {OPTION_IFW_REPOSITORY_URL, "Specify the remote repository URL for the online installer"}, {OPTION_IFW_PACKAGES_DIR_PATH, "Specify the temporary directory path for the repacked packages"}, @@ -316,6 +320,8 @@ namespace vcpkg::Export ret.zip = options.switches.find(OPTION_ZIP) != options.switches.cend(); ret.seven_zip = options.switches.find(OPTION_SEVEN_ZIP) != options.switches.cend(); + ret.maybe_output = maybe_lookup(options.settings, OPTION_OUTPUT); + if (!ret.raw && !ret.nuget && !ret.ifw && !ret.zip && !ret.seven_zip && !ret.dry_run) { System::println(System::Color::error, @@ -520,7 +526,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console Checks::exit_success(VCPKG_LINE_INFO); } - std::string export_id = create_export_id(); + std::string export_id = opts.maybe_output.value_or(create_export_id()); if (opts.raw || opts.nuget || opts.zip || opts.seven_zip) { -- cgit v1.2.3 From 0fb03e8b73b3b38c1f972f036b695b56fab8645f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 12 Jan 2018 11:13:55 +0100 Subject: Add specific port for Catch2 --- ports/catch2/CONTROL | 5 +++++ ports/catch2/portfile.cmake | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 ports/catch2/CONTROL create mode 100644 ports/catch2/portfile.cmake diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL new file mode 100644 index 000000000..31e4d87fa --- /dev/null +++ b/ports/catch2/CONTROL @@ -0,0 +1,5 @@ +Source: catch2 +Version: 2.1.0 +Description: A modern, header-only test framework for unit testing + +Issues, PRs and changelogs can be found at https://github.com/catchorg/Catch2 diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake new file mode 100644 index 000000000..87e2482e3 --- /dev/null +++ b/ports/catch2/portfile.cmake @@ -0,0 +1,18 @@ +include(vcpkg_common_functions) + +set(CATCH_VERSION v2.1.0) + +vcpkg_download_distfile(HEADER + URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" + FILENAME "catch-${CATCH_VERSION}.hpp" + SHA512 6c2b9d4337369362b9079ac4eb53481e2db2a235af6ed0fa9d178775336a5c2d6aba1f86967f53de736aa198ae9d1acadd15a8c3ae2348c7dec0450e6452c716 +) + +vcpkg_download_distfile(LICENSE + URLS "https://raw.githubusercontent.com/catchorg/Catch2/${CATCH_VERSION}/LICENSE.txt" + FILENAME "catch-LICENSE-${CATCH_VERSION}.txt" + SHA512 f1a8d21ccbb6436d289ecfae65b9019278e40552a2383aaf6c1dfed98affe6e7bbf364d67597a131642b62446a0c40495e66a7efca7e6dff72727c6fd3776407 +) + +file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME catch.hpp) +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch RENAME copyright) -- cgit v1.2.3 From d7cd72e396446504c4a24fcfc2cd1660c26c30e1 Mon Sep 17 00:00:00 2001 From: clvn Date: Fri, 12 Jan 2018 12:24:02 +0100 Subject: [tre] Initial port --- ports/tre/CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++++++ ports/tre/CONTROL | 3 +++ ports/tre/portfile.cmake | 26 ++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 ports/tre/CMakeLists.txt create mode 100644 ports/tre/CONTROL create mode 100644 ports/tre/portfile.cmake diff --git a/ports/tre/CMakeLists.txt b/ports/tre/CMakeLists.txt new file mode 100644 index 000000000..09113fca1 --- /dev/null +++ b/ports/tre/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required (VERSION 3.9) +project (tre) + +set (HEADERS + lib/regex.h + include/tre/tre.h + include/tre/tre-config.h +) + +set (SRCS + lib/regcomp.c + lib/regerror.c + lib/regexec.c + lib/tre-ast.c + lib/tre-compile.c + lib/tre-match-approx.c + lib/tre-match-backtrack.c + lib/tre-match-parallel.c + lib/tre-mem.c + lib/tre-parse.c + lib/tre-stack.c + lib/xmalloc.c + win32/tre.def +) + +include_directories(win32 include/tre) +add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -DHAVE_CONFIG_H) +add_library(tre ${SRCS}) + +install( + TARGETS tre + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES ${HEADERS} DESTINATION include/tre) diff --git a/ports/tre/CONTROL b/ports/tre/CONTROL new file mode 100644 index 000000000..a5df8cd11 --- /dev/null +++ b/ports/tre/CONTROL @@ -0,0 +1,3 @@ +Source: tre +Version: 0.8.0-1 +Description: TRE is a lightweight, robust, and efficient POSIX compliant regexp matching library with some exciting features such as approximate (fuzzy) matching. diff --git a/ports/tre/portfile.cmake b/ports/tre/portfile.cmake new file mode 100644 index 000000000..0cf993082 --- /dev/null +++ b/ports/tre/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO laurikari/tre + REF 6fb7206b935b35814c5078c20046dbe065435363 + SHA512 f1d664719eab23b665d71e34ca3d11f8ba49da23ff20dc28f46d4ce30fe155c12208ba7fd212dbeb20a7037e069909f0c2120ce1fc01074656399805e3289a90 + HEAD_REF master +) + +file(READ ${SOURCE_PATH}/win32/config.h CONFIG_H) +string(REPLACE "#define snprintf sprintf_s" "" CONFIG_H ${CONFIG_H}) +file(WRITE ${SOURCE_PATH}/win32/config.h "${CONFIG_H}") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tre RENAME copyright) -- cgit v1.2.3 From 62744550b980157083f91ef9558270910216ee45 Mon Sep 17 00:00:00 2001 From: Fabian Wosar Date: Fri, 12 Jan 2018 14:45:39 +0100 Subject: Fixed wrong include folder The port used to install "include/cpr" instead of "cpr" into the vcpkg include folder . As a result, attempting to use the cpr header would fail as the header includes "cpr/
". In addition having to include breaks the general vcpkg conventions. --- ports/cpr/enable-install.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/cpr/enable-install.patch b/ports/cpr/enable-install.patch index da8d3ee73..250199e5a 100644 --- a/ports/cpr/enable-install.patch +++ b/ports/cpr/enable-install.patch @@ -13,5 +13,5 @@ index a6db5bd..b4982d1 100644 + ARCHIVE DESTINATION lib +) +if(NOT DISABLE_INSTALL_HEADERS) -+ install(DIRECTORY ${CPR_INCLUDE_DIRS} DESTINATION include) ++ install(DIRECTORY ${CPR_INCLUDE_DIRS}/cpr DESTINATION include) +endif() -- cgit v1.2.3 From 9e21f1aacf7ce32e7be542b636f212a5bf0896d2 Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Sat, 13 Jan 2018 13:04:15 +0800 Subject: [libconfig] update to 1.7.2 --- ports/libconfig/CONTROL | 2 +- ports/libconfig/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libconfig/CONTROL b/ports/libconfig/CONTROL index d8d00ddd4..fceb37bd3 100644 --- a/ports/libconfig/CONTROL +++ b/ports/libconfig/CONTROL @@ -1,3 +1,3 @@ Source: libconfig -Version: 1.7.1 +Version: 1.7.2 Description: C/C++ library for processing configuration files diff --git a/ports/libconfig/portfile.cmake b/ports/libconfig/portfile.cmake index 2862a8e95..9456636a9 100644 --- a/ports/libconfig/portfile.cmake +++ b/ports/libconfig/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO hyperrealm/libconfig - REF v1.7.1 - SHA512 b58b468e9e2d5175fbde1ad9765c6604dc9b3f3944613a88404a45d0d232e7d79a47321bf3c06b97cb46a2104b4313fad5c7f8944149f550b7af51ad523e775e + REF v1.7.2 + SHA512 9df57355c2d08381b4a0a6366f0db3633fbe8f73c2bb8c370c040b0bae96ce89ee4ac6c17a5a247fed855d890fa383e5b70cb5573fc9cfc62194d5b94e161cee HEAD_REF master ) -- cgit v1.2.3 From 3b3bff1824c09a9c3accc9e737af96e4f89228fd Mon Sep 17 00:00:00 2001 From: Cdec Date: Sun, 14 Jan 2018 12:49:04 +0900 Subject: [vcpkg_download_distfile] Change to refer _VCPKG_INTERNAL_NO_HASH_CHECK in parameter check --- scripts/cmake/vcpkg_download_distfile.cmake | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 7a1c95461..28276f47c 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -53,14 +53,16 @@ function(vcpkg_download_distfile VAR) if(NOT DEFINED vcpkg_download_distfile_FILENAME) message(FATAL_ERROR "vcpkg_download_distfile requires a FILENAME argument.") endif() - if(vcpkg_download_distfile_SKIP_SHA512 AND NOT VCPKG_USE_HEAD_VERSION) - message(FATAL_ERROR "vcpkg_download_distfile only allows SKIP_SHA512 when building with --head") - endif() - if(NOT vcpkg_download_distfile_SKIP_SHA512 AND NOT DEFINED vcpkg_download_distfile_SHA512) - message(FATAL_ERROR "vcpkg_download_distfile requires a SHA512 argument. If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.") - endif() - if(vcpkg_download_distfile_SKIP_SHA512 AND DEFINED vcpkg_download_distfile_SHA512) - message(FATAL_ERROR "vcpkg_download_distfile must not be passed both SHA512 and SKIP_SHA512.") + if(NOT _VCPKG_INTERNAL_NO_HASH_CHECK) + if(vcpkg_download_distfile_SKIP_SHA512 AND NOT VCPKG_USE_HEAD_VERSION) + message(FATAL_ERROR "vcpkg_download_distfile only allows SKIP_SHA512 when building with --head") + endif() + if(NOT vcpkg_download_distfile_SKIP_SHA512 AND NOT DEFINED vcpkg_download_distfile_SHA512) + message(FATAL_ERROR "vcpkg_download_distfile requires a SHA512 argument. If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.") + endif() + if(vcpkg_download_distfile_SKIP_SHA512 AND DEFINED vcpkg_download_distfile_SHA512) + message(FATAL_ERROR "vcpkg_download_distfile must not be passed both SHA512 and SKIP_SHA512.") + endif() endif() set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}) -- cgit v1.2.3 From 950918b9fb0d139212a6e9902d9f5eb2adfa85dd Mon Sep 17 00:00:00 2001 From: pravic Date: Mon, 15 Jan 2018 21:23:40 +0300 Subject: [sciter] Update to 4.1.1.5703 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 3d1f4e58d..65dd215ac 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.1.0 +Version: 4.1.1 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 5dffc368a..4aec0c397 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,8 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION e46624fb242d3cbad6abdf25e9876ef6c18b7f1a) -set(SCITER_SHA 4d36856add6044bc6ea745098e82bfcb0ddeef6c254439d38c6a15d0d8334d6b330916a9238c9a8eb800750dd668d5ab6595beab907c4e00c3743effab710154) +set(SCITER_REVISION c6f5f5e826160920dd7409481c1d064bde995cde) +set(SCITER_SHA 47c634dc5ad5907d7f21207d1d4bfe4df06910417ce53169020466afcebe94f1cae9a0cccbf3fc105eab16315da65c74eed7af5efc9ca438b9cbb5d6e9bb09e1) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From 5aa627e16493afc31e772067074ebcaefe860d28 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 16 Jan 2018 14:13:15 -0800 Subject: [SDL2] use vcpkg_from_github to enable --head --- ports/sdl2/CONTROL | 2 +- ports/sdl2/portfile.cmake | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index 44ea3ce3c..f349dc2d4 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.7-3 +Version: 2.0.7-4 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 17f96748e..7aa17b261 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -1,15 +1,12 @@ include(vcpkg_common_functions) -set(SDL2_VERSION 2.0.7) -set(SDL2_HASH eed5477843086a0e66552eb197a5c4929134522bc366d873732361ea0df5fb841ef7e2b1913e21d1bae69e6fd3152ee630492e615c58cbe903e7d6e47b587410) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-${SDL2_VERSION}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://libsdl.org/release/SDL2-${SDL2_VERSION}.tar.gz" - FILENAME "SDL2-${SDL2_VERSION}.tar.gz" - SHA512 ${SDL2_HASH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SDL-Mirror/SDL + REF release-2.0.7 + SHA512 3667c7299d007e0438de90c6dd1f19ad9f30cf155c35792c40267bc74f8fe8acd1046ac918a104690ccba3faa2dbd86b37821a38c6c389179359b903209e2eb7 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 0fde60e467ba756ddaaae389f1969a826268dc5d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 17 Jan 2018 12:32:38 -0800 Subject: Fix variable lifetime issue --- toolsrc/src/vcpkg/export.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 66e6af5b6..d15df95d2 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -283,9 +283,13 @@ namespace vcpkg::Export {OPTION_ZIP, "Export to a zip file"}, {OPTION_SEVEN_ZIP, "Export to a 7zip (.7z) file"}, }}; + + static const std::string EXPORT_SETTINGS_NUGET_ID_HELP_TEXT = + Strings::format("Specify the id for the exported NuGet package (overrides %s)", OPTION_OUTPUT); + static const std::array EXPORT_SETTINGS = {{ {OPTION_OUTPUT, "Specify the output name (used to construct filename)"}, - {OPTION_NUGET_ID, "Specify the id for the exported NuGet package (overrides " + OPTION_OUTPUT + ")"}, + {OPTION_NUGET_ID, EXPORT_SETTINGS_NUGET_ID_HELP_TEXT}, {OPTION_NUGET_VERSION, "Specify the version for the exported NuGet package"}, {OPTION_IFW_REPOSITORY_URL, "Specify the remote repository URL for the online installer"}, {OPTION_IFW_PACKAGES_DIR_PATH, "Specify the temporary directory path for the repacked packages"}, -- cgit v1.2.3 From ca9ff199d6024fa0ef26abcba920928215d77f38 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Thu, 18 Jan 2018 10:02:56 +1100 Subject: append hyphen to qt5 module names --- ports/qt5-3d/CONTROL | 4 + ports/qt5-3d/portfile.cmake | 5 + ports/qt5-base/CONTROL | 4 + ports/qt5-base/configure_qt.cmake | 64 +++++++++ ports/qt5-base/fix-system-pcre2.patch | 18 +++ ports/qt5-base/fixcmake.py | 68 +++++++++ ports/qt5-base/install_qt.cmake | 46 ++++++ ports/qt5-base/portfile.cmake | 114 +++++++++++++++ ports/qt5-base/qt_debug.conf | 13 ++ ports/qt5-base/qt_release.conf | 13 ++ ports/qt5-charts/CONTROL | 4 + ports/qt5-charts/portfile.cmake | 5 + ports/qt5-datavis3d/CONTROL | 4 + ports/qt5-datavis3d/portfile.cmake | 5 + ports/qt5-declarative/CONTROL | 4 + ports/qt5-declarative/portfile.cmake | 5 + ports/qt5-gamepad/CONTROL | 4 + ports/qt5-gamepad/portfile.cmake | 5 + ports/qt5-imageformats/CONTROL | 4 + ports/qt5-imageformats/portfile.cmake | 7 + ports/qt5-modularscripts/CONTROL | 3 + ports/qt5-modularscripts/fixcmake.py | 57 ++++++++ ports/qt5-modularscripts/portfile.cmake | 9 ++ ports/qt5-modularscripts/qt_modular_library.cmake | 166 ++++++++++++++++++++++ ports/qt5-multimedia/CONTROL | 4 + ports/qt5-multimedia/portfile.cmake | 5 + ports/qt5-networkauth/CONTROL | 4 + ports/qt5-networkauth/portfile.cmake | 5 + ports/qt5-scxml/CONTROL | 4 + ports/qt5-scxml/portfile.cmake | 5 + ports/qt5-serialport/CONTROL | 4 + ports/qt5-serialport/portfile.cmake | 5 + ports/qt5-speech/CONTROL | 4 + ports/qt5-speech/portfile.cmake | 5 + ports/qt5-svg/CONTROL | 4 + ports/qt5-svg/portfile.cmake | 5 + ports/qt5-tools/CONTROL | 4 + ports/qt5-tools/portfile.cmake | 5 + ports/qt5-virtualkeyboard/CONTROL | 4 + ports/qt5-virtualkeyboard/portfile.cmake | 7 + ports/qt5-websockets/CONTROL | 4 + ports/qt5-websockets/portfile.cmake | 5 + ports/qt5-winextras/CONTROL | 4 + ports/qt5-winextras/portfile.cmake | 5 + ports/qt5-xmlpatterns/CONTROL | 4 + ports/qt5-xmlpatterns/portfile.cmake | 5 + ports/qt5/CONTROL | 2 +- ports/qt53d/CONTROL | 4 - ports/qt53d/portfile.cmake | 5 - ports/qt5base/CONTROL | 4 - ports/qt5base/configure_qt.cmake | 64 --------- ports/qt5base/fix-system-pcre2.patch | 18 --- ports/qt5base/fixcmake.py | 68 --------- ports/qt5base/install_qt.cmake | 46 ------ ports/qt5base/portfile.cmake | 114 --------------- ports/qt5base/qt_debug.conf | 13 -- ports/qt5base/qt_release.conf | 13 -- ports/qt5charts/CONTROL | 4 - ports/qt5charts/portfile.cmake | 5 - ports/qt5datavis3d/CONTROL | 4 - ports/qt5datavis3d/portfile.cmake | 5 - ports/qt5declarative/CONTROL | 4 - ports/qt5declarative/portfile.cmake | 5 - ports/qt5gamepad/CONTROL | 4 - ports/qt5gamepad/portfile.cmake | 5 - ports/qt5imageformats/CONTROL | 4 - ports/qt5imageformats/portfile.cmake | 7 - ports/qt5modularscripts/CONTROL | 3 - ports/qt5modularscripts/fixcmake.py | 57 -------- ports/qt5modularscripts/portfile.cmake | 9 -- ports/qt5modularscripts/qt_modular_library.cmake | 166 ---------------------- ports/qt5multimedia/CONTROL | 4 - ports/qt5multimedia/portfile.cmake | 5 - ports/qt5networkauth/CONTROL | 4 - ports/qt5networkauth/portfile.cmake | 5 - ports/qt5scxml/CONTROL | 4 - ports/qt5scxml/portfile.cmake | 5 - ports/qt5serialport/CONTROL | 4 - ports/qt5serialport/portfile.cmake | 5 - ports/qt5speech/CONTROL | 4 - ports/qt5speech/portfile.cmake | 5 - ports/qt5svg/CONTROL | 4 - ports/qt5svg/portfile.cmake | 5 - ports/qt5tools/CONTROL | 4 - ports/qt5tools/portfile.cmake | 5 - ports/qt5virtualkeyboard/CONTROL | 4 - ports/qt5virtualkeyboard/portfile.cmake | 7 - ports/qt5websockets/CONTROL | 4 - ports/qt5websockets/portfile.cmake | 5 - ports/qt5winextras/CONTROL | 4 - ports/qt5winextras/portfile.cmake | 5 - ports/qt5xmlpatterns/CONTROL | 4 - ports/qt5xmlpatterns/portfile.cmake | 5 - 93 files changed, 733 insertions(+), 733 deletions(-) create mode 100644 ports/qt5-3d/CONTROL create mode 100644 ports/qt5-3d/portfile.cmake create mode 100644 ports/qt5-base/CONTROL create mode 100644 ports/qt5-base/configure_qt.cmake create mode 100644 ports/qt5-base/fix-system-pcre2.patch create mode 100644 ports/qt5-base/fixcmake.py create mode 100644 ports/qt5-base/install_qt.cmake create mode 100644 ports/qt5-base/portfile.cmake create mode 100644 ports/qt5-base/qt_debug.conf create mode 100644 ports/qt5-base/qt_release.conf create mode 100644 ports/qt5-charts/CONTROL create mode 100644 ports/qt5-charts/portfile.cmake create mode 100644 ports/qt5-datavis3d/CONTROL create mode 100644 ports/qt5-datavis3d/portfile.cmake create mode 100644 ports/qt5-declarative/CONTROL create mode 100644 ports/qt5-declarative/portfile.cmake create mode 100644 ports/qt5-gamepad/CONTROL create mode 100644 ports/qt5-gamepad/portfile.cmake create mode 100644 ports/qt5-imageformats/CONTROL create mode 100644 ports/qt5-imageformats/portfile.cmake create mode 100644 ports/qt5-modularscripts/CONTROL create mode 100644 ports/qt5-modularscripts/fixcmake.py create mode 100644 ports/qt5-modularscripts/portfile.cmake create mode 100644 ports/qt5-modularscripts/qt_modular_library.cmake create mode 100644 ports/qt5-multimedia/CONTROL create mode 100644 ports/qt5-multimedia/portfile.cmake create mode 100644 ports/qt5-networkauth/CONTROL create mode 100644 ports/qt5-networkauth/portfile.cmake create mode 100644 ports/qt5-scxml/CONTROL create mode 100644 ports/qt5-scxml/portfile.cmake create mode 100644 ports/qt5-serialport/CONTROL create mode 100644 ports/qt5-serialport/portfile.cmake create mode 100644 ports/qt5-speech/CONTROL create mode 100644 ports/qt5-speech/portfile.cmake create mode 100644 ports/qt5-svg/CONTROL create mode 100644 ports/qt5-svg/portfile.cmake create mode 100644 ports/qt5-tools/CONTROL create mode 100644 ports/qt5-tools/portfile.cmake create mode 100644 ports/qt5-virtualkeyboard/CONTROL create mode 100644 ports/qt5-virtualkeyboard/portfile.cmake create mode 100644 ports/qt5-websockets/CONTROL create mode 100644 ports/qt5-websockets/portfile.cmake create mode 100644 ports/qt5-winextras/CONTROL create mode 100644 ports/qt5-winextras/portfile.cmake create mode 100644 ports/qt5-xmlpatterns/CONTROL create mode 100644 ports/qt5-xmlpatterns/portfile.cmake delete mode 100644 ports/qt53d/CONTROL delete mode 100644 ports/qt53d/portfile.cmake delete mode 100644 ports/qt5base/CONTROL delete mode 100644 ports/qt5base/configure_qt.cmake delete mode 100644 ports/qt5base/fix-system-pcre2.patch delete mode 100644 ports/qt5base/fixcmake.py delete mode 100644 ports/qt5base/install_qt.cmake delete mode 100644 ports/qt5base/portfile.cmake delete mode 100644 ports/qt5base/qt_debug.conf delete mode 100644 ports/qt5base/qt_release.conf delete mode 100644 ports/qt5charts/CONTROL delete mode 100644 ports/qt5charts/portfile.cmake delete mode 100644 ports/qt5datavis3d/CONTROL delete mode 100644 ports/qt5datavis3d/portfile.cmake delete mode 100644 ports/qt5declarative/CONTROL delete mode 100644 ports/qt5declarative/portfile.cmake delete mode 100644 ports/qt5gamepad/CONTROL delete mode 100644 ports/qt5gamepad/portfile.cmake delete mode 100644 ports/qt5imageformats/CONTROL delete mode 100644 ports/qt5imageformats/portfile.cmake delete mode 100644 ports/qt5modularscripts/CONTROL delete mode 100644 ports/qt5modularscripts/fixcmake.py delete mode 100644 ports/qt5modularscripts/portfile.cmake delete mode 100644 ports/qt5modularscripts/qt_modular_library.cmake delete mode 100644 ports/qt5multimedia/CONTROL delete mode 100644 ports/qt5multimedia/portfile.cmake delete mode 100644 ports/qt5networkauth/CONTROL delete mode 100644 ports/qt5networkauth/portfile.cmake delete mode 100644 ports/qt5scxml/CONTROL delete mode 100644 ports/qt5scxml/portfile.cmake delete mode 100644 ports/qt5serialport/CONTROL delete mode 100644 ports/qt5serialport/portfile.cmake delete mode 100644 ports/qt5speech/CONTROL delete mode 100644 ports/qt5speech/portfile.cmake delete mode 100644 ports/qt5svg/CONTROL delete mode 100644 ports/qt5svg/portfile.cmake delete mode 100644 ports/qt5tools/CONTROL delete mode 100644 ports/qt5tools/portfile.cmake delete mode 100644 ports/qt5virtualkeyboard/CONTROL delete mode 100644 ports/qt5virtualkeyboard/portfile.cmake delete mode 100644 ports/qt5websockets/CONTROL delete mode 100644 ports/qt5websockets/portfile.cmake delete mode 100644 ports/qt5winextras/CONTROL delete mode 100644 ports/qt5winextras/portfile.cmake delete mode 100644 ports/qt5xmlpatterns/CONTROL delete mode 100644 ports/qt5xmlpatterns/portfile.cmake diff --git a/ports/qt5-3d/CONTROL b/ports/qt5-3d/CONTROL new file mode 100644 index 000000000..9213e0356 --- /dev/null +++ b/ports/qt5-3d/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-3d +Version: 5.9.2-0 +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-3d/portfile.cmake b/ports/qt5-3d/portfile.cmake new file mode 100644 index 000000000..7de7bb5d5 --- /dev/null +++ b/ports/qt5-3d/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qt3d 1c7dbd4e557cdd183ec6e929aae5727ce2ffcb519517942b588594bb81a78cb3d732cde4dae58085a70ec2968a8c2443eae96536125c25938222ff7c89f4f9a2) diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL new file mode 100644 index 000000000..f2a507e19 --- /dev/null +++ b/ports/qt5-base/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-base +Version: 5.9.2-0 +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 diff --git a/ports/qt5-base/configure_qt.cmake b/ports/qt5-base/configure_qt.cmake new file mode 100644 index 000000000..1d4f1e570 --- /dev/null +++ b/ports/qt5-base/configure_qt.cmake @@ -0,0 +1,64 @@ +function(configure_qt) + cmake_parse_arguments(_csc "" "SOURCE_PATH;PLATFORM" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + + if (_csc_PLATFORM) + set(PLATFORM ${_csc_PLATFORM}) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") + set(PLATFORM "win32-msvc2015") + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(PLATFORM "win32-msvc2017") + endif() + + vcpkg_find_acquire_program(PERL) + get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") + + if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) + list(APPEND _csc_OPTIONS + "-static" + "-static-runtime" + ) + endif() + + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + vcpkg_execute_required_process( + COMMAND "${_csc_SOURCE_PATH}/configure.bat" ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} + -debug + -prefix ${CURRENT_PACKAGES_DIR}/debug + -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 + -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug + -datadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug + -plugindir ${CURRENT_PACKAGES_DIR}/debug/plugins + -qmldir ${CURRENT_PACKAGES_DIR}/debug/qml + -headerdir ${CURRENT_PACKAGES_DIR}/include + -I ${CURRENT_INSTALLED_DIR}/include + -L ${CURRENT_INSTALLED_DIR}/debug/lib + -platform ${PLATFORM} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + vcpkg_execute_required_process( + COMMAND "${_csc_SOURCE_PATH}/configure.bat" ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} + -release + -prefix ${CURRENT_PACKAGES_DIR} + -hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5 + -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5 + -datadir ${CURRENT_PACKAGES_DIR}/share/qt5 + -plugindir ${CURRENT_PACKAGES_DIR}/plugins + -qmldir ${CURRENT_PACKAGES_DIR}/qml + -I ${CURRENT_INSTALLED_DIR}/include + -L ${CURRENT_INSTALLED_DIR}/lib + -platform ${PLATFORM} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/fix-system-pcre2.patch b/ports/qt5-base/fix-system-pcre2.patch new file mode 100644 index 000000000..be401d448 --- /dev/null +++ b/ports/qt5-base/fix-system-pcre2.patch @@ -0,0 +1,18 @@ +diff --git a/src/corelib/configure.json b/src/corelib/configure.json +index a5b69a2..01c5cde 100644 +--- a/src/corelib/configure.json ++++ b/src/corelib/configure.json +@@ -159,7 +159,12 @@ + ] + }, + "sources": [ +- "-lpcre2-16" ++ { ++ "builds": { ++ "debug": "-lpcre2-16d", ++ "release": "-lpcre2-16" ++ } ++ } + ] + }, + "pps": { diff --git a/ports/qt5-base/fixcmake.py b/ports/qt5-base/fixcmake.py new file mode 100644 index 000000000..bcfb12ac5 --- /dev/null +++ b/ports/qt5-base/fixcmake.py @@ -0,0 +1,68 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif "_install_prefix}/lib/qtmaind.lib" in line: + # qtmaind.lib has been moved to manual-link: + builder += line.replace("/lib/", "/debug/lib/manual-link/") + elif "_install_prefix}/lib/qtmain.lib" in line: + # qtmain(d).lib has been moved to manual-link: + builder += line.replace("/lib/", "/lib/manual-link/") + builder += " set(imported_location_debug \"${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib\")\n" + builder += "\n" + builder += " set_target_properties(Qt5::WinMain PROPERTIES\n" + builder += " IMPORTED_LOCATION_DEBUG ${imported_location_debug}\n" + builder += " )\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5-base/install_qt.cmake b/ports/qt5-base/install_qt.cmake new file mode 100644 index 000000000..37528e4e6 --- /dev/null +++ b/ports/qt5-base/install_qt.cmake @@ -0,0 +1,46 @@ +function(install_qt) + cmake_parse_arguments(_bc "DISABLE_PARALLEL" "" "" ${ARGN}) + + if (_bc_DISABLE_PARALLEL) + set(JOBS "1") + else() + set(JOBS "$ENV{NUMBER_OF_PROCESSORS}") + endif() + + vcpkg_find_acquire_program(JOM) + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) + set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") + set(_path "$ENV{PATH}") + + message(STATUS "Package ${TARGET_TRIPLET}-dbg") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/bin;${_path}") + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME package-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Package ${TARGET_TRIPLET}-dbg done") + + message(STATUS "Package ${TARGET_TRIPLET}-rel") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${_path}") + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME build-${TARGET_TRIPLET}-rel + ) + vcpkg_execute_required_process( + COMMAND ${JOM} /J ${JOBS} install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME package-${TARGET_TRIPLET}-rel + ) + message(STATUS "Package ${TARGET_TRIPLET}-rel done") + + set(ENV{PATH} "${_path}") + +endfunction() \ No newline at end of file diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake new file mode 100644 index 000000000..bde933392 --- /dev/null +++ b/ports/qt5-base/portfile.cmake @@ -0,0 +1,114 @@ +include(vcpkg_common_functions) + +string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) +if(BUILDTREES_PATH_LENGTH GREATER 37) + message(WARNING "Qt5'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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +include(configure_qt) +include(install_qt) + +set(SRCDIR_NAME "qtbase-5.9.2") +set(ARCHIVE_NAME "qtbase-opensource-src-5.9.2") +set(ARCHIVE_EXTENSION ".tar.xz") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 a2f965871645256f3d019f71f3febb875455a29d03fccc7a3371ddfeb193b0af12394e779df05adf69fd10fe7b0d966f3915a24528ec7eb3bc36c2db6af2b6e7 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) +if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) +endif() + +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2.patch" +) + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +configure_qt( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -confirm-license + -opensource + -system-zlib + -system-libjpeg + -system-libpng + -system-freetype + -system-pcre + -system-harfbuzz + -system-doubleconversion + -system-sqlite + -sql-sqlite + -sql-psql + -feature-freetype + -nomake examples -nomake tests + -opengl desktop # other options are "-no-opengl" and "-opengl angle" + -mp + LIBJPEG_LIBS="-ljpeg" + OPTIONS_RELEASE + ZLIB_LIBS="-lzlib" + LIBPNG_LIBS="-llibpng16" + OPTIONS_DEBUG + ZLIB_LIBS="-lzlibd" + LIBPNG_LIBS="-llibpng16d" + PSQL_LIBS="-llibpqd" + FREETYPE_LIBS="-lfreetyped" +) + +install_qt() + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) +file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) +file(REMOVE ${BINARY_TOOLS}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf ${CMAKE_CURRENT_LIST_DIR}/qt_release.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cmake + LOGNAME fix-cmake +) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5) + +#--------------------------------------------------------------------------- +# qtmain(d) vs. Qt5AxServer(d) +#--------------------------------------------------------------------------- +# Qt applications have to either link to qtmain(d) or to Qt5AxServer(d), +# never both. See http://doc.qt.io/qt-5/activeqt-server.html for more info. +# +# Create manual-link folders: +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +# +# Either have users explicitly link against qtmain.lib, qtmaind.lib: +file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl) + +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/qt5-base/qt_debug.conf b/ports/qt5-base/qt_debug.conf new file mode 100644 index 000000000..1314d00b9 --- /dev/null +++ b/ports/qt5-base/qt_debug.conf @@ -0,0 +1,13 @@ +[Paths] +Prefix = ${CURRENT_INSTALLED_DIR} +Documentation = share/qt5/doc +Headers = include +Libraries = debug/lib +Binaries = debug/tools/qt5 +LibraryExecutables = debug/tools/qt5 +Plugins = debug/plugins +Qml2Imports = qml +Data = share/qt5/debug +ArchData = share/qt5/debug +HostData = share/qt5/debug +HostBinaries = debug/tools/qt5 \ No newline at end of file diff --git a/ports/qt5-base/qt_release.conf b/ports/qt5-base/qt_release.conf new file mode 100644 index 000000000..a04aef525 --- /dev/null +++ b/ports/qt5-base/qt_release.conf @@ -0,0 +1,13 @@ +[Paths] +Prefix = ${CURRENT_INSTALLED_DIR} +Documentation = share/qt5/doc +Headers = include +Libraries = lib +Binaries = tools/qt5 +LibraryExecutables = tools/qt5 +Plugins = plugins +Qml2Imports = qml +Data = share/qt5 +ArchData = share/qt5 +HostData = share/qt5 +HostBinaries = tools/qt5 \ No newline at end of file diff --git a/ports/qt5-charts/CONTROL b/ports/qt5-charts/CONTROL new file mode 100644 index 000000000..6f71277b6 --- /dev/null +++ b/ports/qt5-charts/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-charts +Version: 5.9.2-0 +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-charts/portfile.cmake b/ports/qt5-charts/portfile.cmake new file mode 100644 index 000000000..45a53b63d --- /dev/null +++ b/ports/qt5-charts/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtcharts 297547b565dd71b05237bb05ecc1abf1a774a4909668417e78bd65e805c1e47a456a5a06898fe06d4c4614118e4129e19893d4c77598667a9354ab969307a293) diff --git a/ports/qt5-datavis3d/CONTROL b/ports/qt5-datavis3d/CONTROL new file mode 100644 index 000000000..cb4d7e393 --- /dev/null +++ b/ports/qt5-datavis3d/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-datavis3d +Version: 5.9.2-0 +Description: Qt5 Data Visualization 3d Module - UI Components for creating 3D data visualizations +Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-datavis3d/portfile.cmake b/ports/qt5-datavis3d/portfile.cmake new file mode 100644 index 000000000..d7a552cba --- /dev/null +++ b/ports/qt5-datavis3d/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtdatavis3d 5f173401ba2f0ebb4bbb1ff65053f1ece44a97a8bf1d9fc8d81540709c588e140c533d5f317d6a9109d538e38aa742d42bf00906f63d433811bc1c8526788dc3) diff --git a/ports/qt5-declarative/CONTROL b/ports/qt5-declarative/CONTROL new file mode 100644 index 000000000..ad3ebf978 --- /dev/null +++ b/ports/qt5-declarative/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-declarative +Version: 5.9.2-0 +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 new file mode 100644 index 000000000..63ce79746 --- /dev/null +++ b/ports/qt5-declarative/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtdeclarative 49b8b50932b73ea39da14ac3425044193dfd64eabceadba379aa01cf2fc141177f9870c387caf1cf93ce09e8b197828a54b8d9fcefc4d9cdf400a6c6dd9a9e90) diff --git a/ports/qt5-gamepad/CONTROL b/ports/qt5-gamepad/CONTROL new file mode 100644 index 000000000..977b48a8e --- /dev/null +++ b/ports/qt5-gamepad/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-gamepad +Version: 5.9.2-0 +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-gamepad/portfile.cmake b/ports/qt5-gamepad/portfile.cmake new file mode 100644 index 000000000..f4b81f4fd --- /dev/null +++ b/ports/qt5-gamepad/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtgamepad 398d6ff0268460358584a4ea8ba0588881970dcc1dff6c5aa91d1630065ba112c86d7a1fe96dceb8ff301b350aef7f74ad1ee6212048a4cdfb26ff5d944d6222) diff --git a/ports/qt5-imageformats/CONTROL b/ports/qt5-imageformats/CONTROL new file mode 100644 index 000000000..0406f0027 --- /dev/null +++ b/ports/qt5-imageformats/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-imageformats +Version: 5.9.2-0 +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-imageformats/portfile.cmake b/ports/qt5-imageformats/portfile.cmake new file mode 100644 index 000000000..ae3025b51 --- /dev/null +++ b/ports/qt5-imageformats/portfile.cmake @@ -0,0 +1,7 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtimageformats 5f1b93c0e5fffa4c2c063d14c12ad97114a452b16814ca9ac45f00ec36308a09770b3b4d137cb5d19bd3aa3a6f576724084df5d0dad75236d49868af9243c9d2) + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/qt5-modularscripts/CONTROL b/ports/qt5-modularscripts/CONTROL new file mode 100644 index 000000000..ddbdea51e --- /dev/null +++ b/ports/qt5-modularscripts/CONTROL @@ -0,0 +1,3 @@ +Source: qt5-modularscripts +Version: 0 +Description: Vcpkg helpers to package qt5 modules diff --git a/ports/qt5-modularscripts/fixcmake.py b/ports/qt5-modularscripts/fixcmake.py new file mode 100644 index 000000000..923e600bc --- /dev/null +++ b/ports/qt5-modularscripts/fixcmake.py @@ -0,0 +1,57 @@ +import os +import re +from glob import glob + +files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] + +for f in files: + openedfile = open(f, "r") + builder = "" + dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") + libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") + exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") + for line in openedfile: + if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line.replace("/tools/qt5/", "/bin/") + builder += " else()" + builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/bin/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/bin/", "/debug/bin/") + builder += " endif()\n" + elif "_install_prefix}/lib/${LIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/lib/", "/debug/lib/") + builder += " endif()\n" + elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: + builder += " if (${Configuration} STREQUAL \"RELEASE\")" + builder += "\n " + line + builder += " else()" + builder += "\n " + line.replace("/plugins/", "/debug/plugins/") + builder += " endif()\n" + elif dllpattern.search(line) != None: + builder += line.replace("/bin/", "/debug/bin/") + elif libpattern.search(line) != None: + builder += line.replace("/lib/", "/debug/lib/") + elif tooldllpattern.search(line) != None: + builder += line.replace("/tools/qt5/", "/debug/bin/") + elif exepattern.search(line) != None: + builder += line.replace("/bin/", "/tools/qt5/") + else: + builder += line + new_file = open(f, "w") + new_file.write(builder) + new_file.close() \ No newline at end of file diff --git a/ports/qt5-modularscripts/portfile.cmake b/ports/qt5-modularscripts/portfile.cmake new file mode 100644 index 000000000..e7149adfc --- /dev/null +++ b/ports/qt5-modularscripts/portfile.cmake @@ -0,0 +1,9 @@ +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py + ${CMAKE_CURRENT_LIST_DIR}/qt_modular_library.cmake + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/qt5modularscripts +) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/qt5modularscripts/copyright "") + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/qt5-modularscripts/qt_modular_library.cmake b/ports/qt5-modularscripts/qt_modular_library.cmake new file mode 100644 index 000000000..cdffc58fa --- /dev/null +++ b/ports/qt5-modularscripts/qt_modular_library.cmake @@ -0,0 +1,166 @@ +set(_qt5base_port_dir "${CMAKE_CURRENT_LIST_DIR}") + +function(qt_modular_library NAME HASH) + 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" + "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." + ) + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") + endif() + + set(SRCDIR_NAME "${NAME}-5.9.2") + set(ARCHIVE_NAME "${NAME}-opensource-src-5.9.2") + set(ARCHIVE_EXTENSION ".tar.xz") + + set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) + vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" + FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} + SHA512 ${HASH} + ) + vcpkg_extract_source_archive(${ARCHIVE_FILE}) + if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) + file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) + endif() + + # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings + set(ENV{_CL_} "/utf-8") + + #Store build paths + set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + + file(REMOVE_RECURSE "${DEBUG_DIR}" "${RELEASE_DIR}") + + #Find Python and add it to the path + vcpkg_find_acquire_program(PYTHON2) + get_filename_component(PYTHON2_EXE_PATH ${PYTHON2} DIRECTORY) + set(ENV{PATH} "${PYTHON2_EXE_PATH};$ENV{PATH}") + + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) + + string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) + string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) + + #Configure debug + vcpkg_configure_qmake_debug( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} + ) + + #First generate the makefiles so we can modify them + vcpkg_build_qmake_debug(TARGETS qmake_all) + + #Store debug makefiles path + file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + + foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + file(READ "${DEBUG_MAKEFILE}" _contents) + string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") + string(REPLACE "installed\\${TARGET_TRIPLET}\\lib" "installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") + string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib qtmaind.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link qtmaind.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" _contents "${_contents}") + file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") + endforeach() + + #Build debug + vcpkg_build_qmake_debug() + + #Configure release + vcpkg_configure_qmake_release( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} + ) + + #First generate the makefiles so we can modify them + vcpkg_build_qmake_release(TARGETS qmake_all) + + #Store release makefile path + file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + + foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + file(READ "${RELEASE_MAKEFILE}" _contents) + string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib qtmain.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib\\manual-link qtmain.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib" _contents "${_contents}") + file(WRITE "${RELEASE_MAKEFILE}" "${_contents}") + endforeach() + + #Build release + vcpkg_build_qmake_release() + + #Fix the cmake files if they exist + if(EXISTS ${RELEASE_DIR}/lib/cmake) + vcpkg_execute_required_process( + COMMAND ${PYTHON2} ${_qt5base_port_dir}/fixcmake.py + WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake + LOGNAME fix-cmake + ) + endif() + + #Set the correct install directory to packages + foreach(MAKEFILE ${RELEASE_MAKEFILES} ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${MAKEFILE} "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}") + endforeach() + + #Install the module files + vcpkg_build_qmake_debug(TARGETS install) + vcpkg_build_qmake_release(TARGETS install) + + #Remove extra 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() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + endif() + + file(GLOB RELEASE_LIBS "${CURRENT_PACKAGES_DIR}/lib/*") + if(NOT RELEASE_LIBS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + endif() + file(GLOB DEBUG_FILES "${CURRENT_PACKAGES_DIR}/debug/lib/*") + if(NOT DEBUG_FILES) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() + + #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}/debug/tools/qt5 ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) + endif() + + file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/${PORT}/*.dll) + file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/*.dll) + if (RELEASE_DLLS) + file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${RELEASE_DLLS}) + #Check if there are any binaries left over; if not - delete the directory + file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/${PORT}/*) + if(NOT RELEASE_BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + endif() + endif() + if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/qt5/debug/include) + + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + + #Find the relevant license file and install it + if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") + endif() + file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +endfunction() \ No newline at end of file diff --git a/ports/qt5-multimedia/CONTROL b/ports/qt5-multimedia/CONTROL new file mode 100644 index 000000000..6e68c399d --- /dev/null +++ b/ports/qt5-multimedia/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-multimedia +Version: 5.9.2-0 +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-multimedia/portfile.cmake b/ports/qt5-multimedia/portfile.cmake new file mode 100644 index 000000000..878c2b150 --- /dev/null +++ b/ports/qt5-multimedia/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtmultimedia b9fab874706440e97185475bfd0ad769c23d5ddbff5086cc0da9783777e81ed8140fb06fa0e7536ebfb67f2c9db39e1b9f3c2241834e74a9e1fb6ffd5cb7af11) diff --git a/ports/qt5-networkauth/CONTROL b/ports/qt5-networkauth/CONTROL new file mode 100644 index 000000000..97cdfd865 --- /dev/null +++ b/ports/qt5-networkauth/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-networkauth +Version: 5.9.2-0 +Description: Qt5 Network Authorization Module +Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-networkauth/portfile.cmake b/ports/qt5-networkauth/portfile.cmake new file mode 100644 index 000000000..c9b9db47c --- /dev/null +++ b/ports/qt5-networkauth/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtnetworkauth 2e83eefd5db62aa1cdbe451b432ba1937541e435dcc35205d3bb9b947f2ac7e31663dc069a6cfad5bbf34e1fa799d519820f7ed61b9c247016611a533385bebf) \ No newline at end of file diff --git a/ports/qt5-scxml/CONTROL b/ports/qt5-scxml/CONTROL new file mode 100644 index 000000000..ed3f93812 --- /dev/null +++ b/ports/qt5-scxml/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-scxml +Version: 5.9.2-0 +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-scxml/portfile.cmake b/ports/qt5-scxml/portfile.cmake new file mode 100644 index 000000000..b0827216e --- /dev/null +++ b/ports/qt5-scxml/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtscxml c33db992ab456e5dd8b9be65c5619c503048106bbb1839b0930f2d4df36eed0780dfa1fc2912d7758aa72195269e59cbe8826cbaa414c2f339ca66c565809c88) diff --git a/ports/qt5-serialport/CONTROL b/ports/qt5-serialport/CONTROL new file mode 100644 index 000000000..5887105d8 --- /dev/null +++ b/ports/qt5-serialport/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-serialport +Version: 5.9.2-0 +Description: Qt5 Serial Port - provides access to hardware and virtual serial ports +Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-serialport/portfile.cmake b/ports/qt5-serialport/portfile.cmake new file mode 100644 index 000000000..f4a42f38f --- /dev/null +++ b/ports/qt5-serialport/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtserialport cc8899c1ae2ed9fd8cf1c213ab7efaec12b3b16836006fdbf74cb7ea457705505a13e82c2f2873ee9426ae66473ec42259f4e728de64576ee44420f116cc433d) diff --git a/ports/qt5-speech/CONTROL b/ports/qt5-speech/CONTROL new file mode 100644 index 000000000..44b8324f5 --- /dev/null +++ b/ports/qt5-speech/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-speech +Version: 5.9.2-0 +Description: Qt5 Speech Module +Build-Depends: qt5-modularscripts, qt5-base, atlmfc diff --git a/ports/qt5-speech/portfile.cmake b/ports/qt5-speech/portfile.cmake new file mode 100644 index 000000000..8a271b289 --- /dev/null +++ b/ports/qt5-speech/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtspeech 8213ad13d33732fee3fc5b5e408b870970a3003d461be24195222e1d1209210039d1d0cd2f3c537a0db62629fb297d88b33ed4734ecb6c8d74f5406a87e7e0c0) diff --git a/ports/qt5-svg/CONTROL b/ports/qt5-svg/CONTROL new file mode 100644 index 000000000..71abad30c --- /dev/null +++ b/ports/qt5-svg/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-svg +Version: 5.9.2-0 +Description: Qt5 SVG Module - provides classes for displaying the contents of SVG files +Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-svg/portfile.cmake b/ports/qt5-svg/portfile.cmake new file mode 100644 index 000000000..83283d376 --- /dev/null +++ b/ports/qt5-svg/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtsvg c21c5a12fa10ff9f91deda88c99c995ee2138bdffa21c793b0c42f25155f01f87ede5206624b9d82713649f8cf1cfdb95f1d5b7e792de62f3848d3a9ec665fdd) diff --git a/ports/qt5-tools/CONTROL b/ports/qt5-tools/CONTROL new file mode 100644 index 000000000..9f3bdaf6d --- /dev/null +++ b/ports/qt5-tools/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-tools +Version: 5.9.2-0 +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-tools/portfile.cmake b/ports/qt5-tools/portfile.cmake new file mode 100644 index 000000000..10eefa959 --- /dev/null +++ b/ports/qt5-tools/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qttools afce063e167de96dfa264cfd27dc8d80c23ef091a30f4f8119575cae83f39716c3b332427630b340f518b82d6396cca1893f28e00f3c667ba201d7e4fc2aefe1) diff --git a/ports/qt5-virtualkeyboard/CONTROL b/ports/qt5-virtualkeyboard/CONTROL new file mode 100644 index 000000000..6fff91b58 --- /dev/null +++ b/ports/qt5-virtualkeyboard/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-virtualkeyboard +Version: 5.9.2-0 +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-virtualkeyboard/portfile.cmake b/ports/qt5-virtualkeyboard/portfile.cmake new file mode 100644 index 000000000..cceed3894 --- /dev/null +++ b/ports/qt5-virtualkeyboard/portfile.cmake @@ -0,0 +1,7 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtvirtualkeyboard f8c39b789e877e60389ee9aab4a5c17e6018093f72fc57f526ce2584183135206306d4d5a7c7551a6de45969aa6f55444bb39f4ea3324cdf10611533f0bc2b22) + +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/qt5-websockets/CONTROL b/ports/qt5-websockets/CONTROL new file mode 100644 index 000000000..2f43b9d2c --- /dev/null +++ b/ports/qt5-websockets/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-websockets +Version: 5.9.2-0 +Description: Qt5 Web Sockets Module - provides WebSocket communication compliant with RFC 6455 +Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-websockets/portfile.cmake b/ports/qt5-websockets/portfile.cmake new file mode 100644 index 000000000..98442f4c0 --- /dev/null +++ b/ports/qt5-websockets/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtwebsockets 9330d6806251bc77d4c2a497a31b1b0e42a1e6bfe3ea7c00cee123052e9e1f9080e33cf4dfcd6ee6e4732c62f41257a77ec25ad607528f4e8ebe61ccaee3e159) diff --git a/ports/qt5-winextras/CONTROL b/ports/qt5-winextras/CONTROL new file mode 100644 index 000000000..d00ad7a0c --- /dev/null +++ b/ports/qt5-winextras/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-winextras +Version: 5.9.2-0 +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 new file mode 100644 index 000000000..692683adf --- /dev/null +++ b/ports/qt5-winextras/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtwinextras dbfb89833cc291fade8e9fe2ad9c7b7a78c2032de8dcbca1049d637f829811b99e1852ae39ca73a6eac2960df168765bee28023bb723e69c87e2f3bb50b7ef02) diff --git a/ports/qt5-xmlpatterns/CONTROL b/ports/qt5-xmlpatterns/CONTROL new file mode 100644 index 000000000..5fcec19be --- /dev/null +++ b/ports/qt5-xmlpatterns/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-xmlpatterns +Version: 5.9.2-0 +Description: Qt5 XML Patterns Module - Support for XPath, XQuery, XSLT and XML schema validation +Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-xmlpatterns/portfile.cmake b/ports/qt5-xmlpatterns/portfile.cmake new file mode 100644 index 000000000..6fbc69538 --- /dev/null +++ b/ports/qt5-xmlpatterns/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtxmlpatterns c14dbd97988473ba73b4e21352c5560278aa4dbfdf2be1d12e9119c0b5dbe8a0e4eff9a682052024a01bb21dcf52d40ba00da98947901fb91518af92a225da83) diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index f8817e1db..e56858730 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 Version: 5.9.2-1 Description: Qt5 Application Framework -Build-Depends: qt5base, qt5charts, qt5datavis3d, qt5declarative, qt5gamepad, qt5imageformats, qt5multimedia, qt5networkauth, qt5scxml, qt5serialport, qt5speech, qt5svg, qt5tools, qt5virtualkeyboard, qt5websockets, qt53d, qt5winextras, qt5xmlpatterns \ No newline at end of file +Build-Depends: qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-imageformats, qt5-multimedia, qt5-networkauth, qt5-scxml, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-websockets, qt5-3d, qt5-winextras, qt5-xmlpatterns \ No newline at end of file diff --git a/ports/qt53d/CONTROL b/ports/qt53d/CONTROL deleted file mode 100644 index d157525ee..000000000 --- a/ports/qt53d/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt53d -Version: 5.9.2-0 -Description: Qt5 3d Module - Functionality for near-realtime simulation systems with support for 2D and 3D rendering -Build-Depends: qt5modularscripts, qt5base, qt5declarative \ No newline at end of file diff --git a/ports/qt53d/portfile.cmake b/ports/qt53d/portfile.cmake deleted file mode 100644 index 7de7bb5d5..000000000 --- a/ports/qt53d/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qt3d 1c7dbd4e557cdd183ec6e929aae5727ce2ffcb519517942b588594bb81a78cb3d732cde4dae58085a70ec2968a8c2443eae96536125c25938222ff7c89f4f9a2) diff --git a/ports/qt5base/CONTROL b/ports/qt5base/CONTROL deleted file mode 100644 index 79523a21f..000000000 --- a/ports/qt5base/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5base -Version: 5.9.2-0 -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 diff --git a/ports/qt5base/configure_qt.cmake b/ports/qt5base/configure_qt.cmake deleted file mode 100644 index 1d4f1e570..000000000 --- a/ports/qt5base/configure_qt.cmake +++ /dev/null @@ -1,64 +0,0 @@ -function(configure_qt) - cmake_parse_arguments(_csc "" "SOURCE_PATH;PLATFORM" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) - - if (_csc_PLATFORM) - set(PLATFORM ${_csc_PLATFORM}) - elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") - set(PLATFORM "win32-msvc2015") - elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(PLATFORM "win32-msvc2017") - endif() - - vcpkg_find_acquire_program(PERL) - get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) - - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") - - if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) - list(APPEND _csc_OPTIONS - "-static" - "-static-runtime" - ) - endif() - - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - vcpkg_execute_required_process( - COMMAND "${_csc_SOURCE_PATH}/configure.bat" ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} - -debug - -prefix ${CURRENT_PACKAGES_DIR}/debug - -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 - -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug - -datadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug - -plugindir ${CURRENT_PACKAGES_DIR}/debug/plugins - -qmldir ${CURRENT_PACKAGES_DIR}/debug/qml - -headerdir ${CURRENT_PACKAGES_DIR}/include - -I ${CURRENT_INSTALLED_DIR}/include - -L ${CURRENT_INSTALLED_DIR}/debug/lib - -platform ${PLATFORM} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME config-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") - - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - vcpkg_execute_required_process( - COMMAND "${_csc_SOURCE_PATH}/configure.bat" ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} - -release - -prefix ${CURRENT_PACKAGES_DIR} - -hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5 - -archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5 - -datadir ${CURRENT_PACKAGES_DIR}/share/qt5 - -plugindir ${CURRENT_PACKAGES_DIR}/plugins - -qmldir ${CURRENT_PACKAGES_DIR}/qml - -I ${CURRENT_INSTALLED_DIR}/include - -L ${CURRENT_INSTALLED_DIR}/lib - -platform ${PLATFORM} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME config-${TARGET_TRIPLET}-rel - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - -endfunction() \ No newline at end of file diff --git a/ports/qt5base/fix-system-pcre2.patch b/ports/qt5base/fix-system-pcre2.patch deleted file mode 100644 index be401d448..000000000 --- a/ports/qt5base/fix-system-pcre2.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/src/corelib/configure.json b/src/corelib/configure.json -index a5b69a2..01c5cde 100644 ---- a/src/corelib/configure.json -+++ b/src/corelib/configure.json -@@ -159,7 +159,12 @@ - ] - }, - "sources": [ -- "-lpcre2-16" -+ { -+ "builds": { -+ "debug": "-lpcre2-16d", -+ "release": "-lpcre2-16" -+ } -+ } - ] - }, - "pps": { diff --git a/ports/qt5base/fixcmake.py b/ports/qt5base/fixcmake.py deleted file mode 100644 index bcfb12ac5..000000000 --- a/ports/qt5base/fixcmake.py +++ /dev/null @@ -1,68 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif "_install_prefix}/lib/qtmaind.lib" in line: - # qtmaind.lib has been moved to manual-link: - builder += line.replace("/lib/", "/debug/lib/manual-link/") - elif "_install_prefix}/lib/qtmain.lib" in line: - # qtmain(d).lib has been moved to manual-link: - builder += line.replace("/lib/", "/lib/manual-link/") - builder += " set(imported_location_debug \"${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib\")\n" - builder += "\n" - builder += " set_target_properties(Qt5::WinMain PROPERTIES\n" - builder += " IMPORTED_LOCATION_DEBUG ${imported_location_debug}\n" - builder += " )\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5base/install_qt.cmake b/ports/qt5base/install_qt.cmake deleted file mode 100644 index 37528e4e6..000000000 --- a/ports/qt5base/install_qt.cmake +++ /dev/null @@ -1,46 +0,0 @@ -function(install_qt) - cmake_parse_arguments(_bc "DISABLE_PARALLEL" "" "" ${ARGN}) - - if (_bc_DISABLE_PARALLEL) - set(JOBS "1") - else() - set(JOBS "$ENV{NUMBER_OF_PROCESSORS}") - endif() - - vcpkg_find_acquire_program(JOM) - vcpkg_find_acquire_program(PYTHON3) - get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) - set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") - set(_path "$ENV{PATH}") - - message(STATUS "Package ${TARGET_TRIPLET}-dbg") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/bin;${_path}") - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME build-${TARGET_TRIPLET}-dbg - ) - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME package-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Package ${TARGET_TRIPLET}-dbg done") - - message(STATUS "Package ${TARGET_TRIPLET}-rel") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${_path}") - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME build-${TARGET_TRIPLET}-rel - ) - vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} install - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME package-${TARGET_TRIPLET}-rel - ) - message(STATUS "Package ${TARGET_TRIPLET}-rel done") - - set(ENV{PATH} "${_path}") - -endfunction() \ No newline at end of file diff --git a/ports/qt5base/portfile.cmake b/ports/qt5base/portfile.cmake deleted file mode 100644 index 02122f9cc..000000000 --- a/ports/qt5base/portfile.cmake +++ /dev/null @@ -1,114 +0,0 @@ -include(vcpkg_common_functions) - -string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) - message(WARNING "Qt5'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() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") -endif() - -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) -include(configure_qt) -include(install_qt) - -set(SRCDIR_NAME "qtbase-5.9.2") -set(ARCHIVE_NAME "qtbase-opensource-src-5.9.2") -set(ARCHIVE_EXTENSION ".tar.xz") - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 a2f965871645256f3d019f71f3febb875455a29d03fccc7a3371ddfeb193b0af12394e779df05adf69fd10fe7b0d966f3915a24528ec7eb3bc36c2db6af2b6e7 -) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) -if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) -endif() - -vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2.patch" -) - -# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -set(ENV{_CL_} "/utf-8") - -configure_qt( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -confirm-license - -opensource - -system-zlib - -system-libjpeg - -system-libpng - -system-freetype - -system-pcre - -system-harfbuzz - -system-doubleconversion - -system-sqlite - -sql-sqlite - -sql-psql - -feature-freetype - -nomake examples -nomake tests - -opengl desktop # other options are "-no-opengl" and "-opengl angle" - -mp - LIBJPEG_LIBS="-ljpeg" - OPTIONS_RELEASE - ZLIB_LIBS="-lzlib" - LIBPNG_LIBS="-llibpng16" - OPTIONS_DEBUG - ZLIB_LIBS="-lzlibd" - LIBPNG_LIBS="-llibpng16d" - PSQL_LIBS="-llibpqd" - FREETYPE_LIBS="-lfreetyped" -) - -install_qt() - -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - -file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) -file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) -file(REMOVE ${BINARY_TOOLS}) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf ${CMAKE_CURRENT_LIST_DIR}/qt_release.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) - -vcpkg_execute_required_process( - COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cmake - LOGNAME fix-cmake -) - -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5) - -#--------------------------------------------------------------------------- -# qtmain(d) vs. Qt5AxServer(d) -#--------------------------------------------------------------------------- -# Qt applications have to either link to qtmain(d) or to Qt5AxServer(d), -# never both. See http://doc.qt.io/qt-5/activeqt-server.html for more info. -# -# Create manual-link folders: -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -# -# Either have users explicitly link against qtmain.lib, qtmaind.lib: -file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl) - -file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5base RENAME copyright) diff --git a/ports/qt5base/qt_debug.conf b/ports/qt5base/qt_debug.conf deleted file mode 100644 index 1314d00b9..000000000 --- a/ports/qt5base/qt_debug.conf +++ /dev/null @@ -1,13 +0,0 @@ -[Paths] -Prefix = ${CURRENT_INSTALLED_DIR} -Documentation = share/qt5/doc -Headers = include -Libraries = debug/lib -Binaries = debug/tools/qt5 -LibraryExecutables = debug/tools/qt5 -Plugins = debug/plugins -Qml2Imports = qml -Data = share/qt5/debug -ArchData = share/qt5/debug -HostData = share/qt5/debug -HostBinaries = debug/tools/qt5 \ No newline at end of file diff --git a/ports/qt5base/qt_release.conf b/ports/qt5base/qt_release.conf deleted file mode 100644 index a04aef525..000000000 --- a/ports/qt5base/qt_release.conf +++ /dev/null @@ -1,13 +0,0 @@ -[Paths] -Prefix = ${CURRENT_INSTALLED_DIR} -Documentation = share/qt5/doc -Headers = include -Libraries = lib -Binaries = tools/qt5 -LibraryExecutables = tools/qt5 -Plugins = plugins -Qml2Imports = qml -Data = share/qt5 -ArchData = share/qt5 -HostData = share/qt5 -HostBinaries = tools/qt5 \ No newline at end of file diff --git a/ports/qt5charts/CONTROL b/ports/qt5charts/CONTROL deleted file mode 100644 index 7b97a82b8..000000000 --- a/ports/qt5charts/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5charts -Version: 5.9.2-0 -Description: Qt5 Charts Module - UI components for displaying charts, driven by static or dynamic data models -Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5charts/portfile.cmake b/ports/qt5charts/portfile.cmake deleted file mode 100644 index 45a53b63d..000000000 --- a/ports/qt5charts/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtcharts 297547b565dd71b05237bb05ecc1abf1a774a4909668417e78bd65e805c1e47a456a5a06898fe06d4c4614118e4129e19893d4c77598667a9354ab969307a293) diff --git a/ports/qt5datavis3d/CONTROL b/ports/qt5datavis3d/CONTROL deleted file mode 100644 index c3f2157f8..000000000 --- a/ports/qt5datavis3d/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5datavis3d -Version: 5.9.2-0 -Description: Qt5 Data Visualization 3d Module - UI Components for creating 3D data visualizations -Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5datavis3d/portfile.cmake b/ports/qt5datavis3d/portfile.cmake deleted file mode 100644 index d7a552cba..000000000 --- a/ports/qt5datavis3d/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtdatavis3d 5f173401ba2f0ebb4bbb1ff65053f1ece44a97a8bf1d9fc8d81540709c588e140c533d5f317d6a9109d538e38aa742d42bf00906f63d433811bc1c8526788dc3) diff --git a/ports/qt5declarative/CONTROL b/ports/qt5declarative/CONTROL deleted file mode 100644 index 93014a591..000000000 --- a/ports/qt5declarative/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5declarative -Version: 5.9.2-0 -Description: Qt5 Declarative (Quick 2) Module. Includes QtQuick, QtQuickParticles, QtQuickWidgets, QtQml, and QtPacketProtocol. -Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5declarative/portfile.cmake b/ports/qt5declarative/portfile.cmake deleted file mode 100644 index 63ce79746..000000000 --- a/ports/qt5declarative/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtdeclarative 49b8b50932b73ea39da14ac3425044193dfd64eabceadba379aa01cf2fc141177f9870c387caf1cf93ce09e8b197828a54b8d9fcefc4d9cdf400a6c6dd9a9e90) diff --git a/ports/qt5gamepad/CONTROL b/ports/qt5gamepad/CONTROL deleted file mode 100644 index 5228aa006..000000000 --- a/ports/qt5gamepad/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5gamepad -Version: 5.9.2-0 -Description: Qt5 Gamepad Module - Enables Qt applications to support the use of gamepad hardware -Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5gamepad/portfile.cmake b/ports/qt5gamepad/portfile.cmake deleted file mode 100644 index f4b81f4fd..000000000 --- a/ports/qt5gamepad/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtgamepad 398d6ff0268460358584a4ea8ba0588881970dcc1dff6c5aa91d1630065ba112c86d7a1fe96dceb8ff301b350aef7f74ad1ee6212048a4cdfb26ff5d944d6222) diff --git a/ports/qt5imageformats/CONTROL b/ports/qt5imageformats/CONTROL deleted file mode 100644 index 995dc59fc..000000000 --- a/ports/qt5imageformats/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5imageformats -Version: 5.9.2-0 -Description: Qt5 Image Formats Module - Plugins for additional image formats: TIFF, MNG, TGA, WBMP -Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5imageformats/portfile.cmake b/ports/qt5imageformats/portfile.cmake deleted file mode 100644 index ae3025b51..000000000 --- a/ports/qt5imageformats/portfile.cmake +++ /dev/null @@ -1,7 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtimageformats 5f1b93c0e5fffa4c2c063d14c12ad97114a452b16814ca9ac45f00ec36308a09770b3b4d137cb5d19bd3aa3a6f576724084df5d0dad75236d49868af9243c9d2) - -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/qt5modularscripts/CONTROL b/ports/qt5modularscripts/CONTROL deleted file mode 100644 index 88c0379af..000000000 --- a/ports/qt5modularscripts/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: qt5modularscripts -Version: 0 -Description: Vcpkg helpers to package qt5 modules diff --git a/ports/qt5modularscripts/fixcmake.py b/ports/qt5modularscripts/fixcmake.py deleted file mode 100644 index 923e600bc..000000000 --- a/ports/qt5modularscripts/fixcmake.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import re -from glob import glob - -files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] - -for f in files: - openedfile = open(f, "r") - builder = "" - dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") - libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") - exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") - tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") - for line in openedfile: - if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line.replace("/tools/qt5/", "/bin/") - builder += " else()" - builder += "\n " + line.replace("/tools/qt5/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/bin/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/bin/", "/debug/bin/") - builder += " endif()\n" - elif "_install_prefix}/lib/${LIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/lib/${IMPLIB_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/lib/", "/debug/lib/") - builder += " endif()\n" - elif "_install_prefix}/plugins/${PLUGIN_LOCATION}" in line: - builder += " if (${Configuration} STREQUAL \"RELEASE\")" - builder += "\n " + line - builder += " else()" - builder += "\n " + line.replace("/plugins/", "/debug/plugins/") - builder += " endif()\n" - elif dllpattern.search(line) != None: - builder += line.replace("/bin/", "/debug/bin/") - elif libpattern.search(line) != None: - builder += line.replace("/lib/", "/debug/lib/") - elif tooldllpattern.search(line) != None: - builder += line.replace("/tools/qt5/", "/debug/bin/") - elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") - else: - builder += line - new_file = open(f, "w") - new_file.write(builder) - new_file.close() \ No newline at end of file diff --git a/ports/qt5modularscripts/portfile.cmake b/ports/qt5modularscripts/portfile.cmake deleted file mode 100644 index e7149adfc..000000000 --- a/ports/qt5modularscripts/portfile.cmake +++ /dev/null @@ -1,9 +0,0 @@ -file(COPY - ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py - ${CMAKE_CURRENT_LIST_DIR}/qt_modular_library.cmake - DESTINATION - ${CURRENT_PACKAGES_DIR}/share/qt5modularscripts -) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/qt5modularscripts/copyright "") - -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/ports/qt5modularscripts/qt_modular_library.cmake b/ports/qt5modularscripts/qt_modular_library.cmake deleted file mode 100644 index 336a3913d..000000000 --- a/ports/qt5modularscripts/qt_modular_library.cmake +++ /dev/null @@ -1,166 +0,0 @@ -set(_qt5base_port_dir "${CMAKE_CURRENT_LIST_DIR}") - -function(qt_modular_library NAME HASH) - 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" - "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." - ) - endif() - - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") - endif() - - set(SRCDIR_NAME "${NAME}-5.9.2") - set(ARCHIVE_NAME "${NAME}-opensource-src-5.9.2") - set(ARCHIVE_EXTENSION ".tar.xz") - - set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) - vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://download.qt.io/official_releases/qt/5.9/5.9.2/submodules/${ARCHIVE_NAME}${ARCHIVE_EXTENSION}" - FILENAME ${SRCDIR_NAME}${ARCHIVE_EXTENSION} - SHA512 ${HASH} - ) - vcpkg_extract_source_archive(${ARCHIVE_FILE}) - if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) - file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) - endif() - - # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings - set(ENV{_CL_} "/utf-8") - - #Store build paths - set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - - file(REMOVE_RECURSE "${DEBUG_DIR}" "${RELEASE_DIR}") - - #Find Python and add it to the path - vcpkg_find_acquire_program(PYTHON2) - get_filename_component(PYTHON2_EXE_PATH ${PYTHON2} DIRECTORY) - set(ENV{PATH} "${PYTHON2_EXE_PATH};$ENV{PATH}") - - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) - file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) - - string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) - string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) - - #Configure debug - vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} - ) - - #First generate the makefiles so we can modify them - vcpkg_build_qmake_debug(TARGETS qmake_all) - - #Store debug makefiles path - file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - - foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - file(READ "${DEBUG_MAKEFILE}" _contents) - string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") - string(REPLACE "installed\\${TARGET_TRIPLET}\\lib" "installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") - string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib qtmaind.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link qtmaind.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" _contents "${_contents}") - file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") - endforeach() - - #Build debug - vcpkg_build_qmake_debug() - - #Configure release - vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} - ) - - #First generate the makefiles so we can modify them - vcpkg_build_qmake_release(TARGETS qmake_all) - - #Store release makefile path - file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - - foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - file(READ "${RELEASE_MAKEFILE}" _contents) - string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib qtmain.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib\\manual-link qtmain.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib" _contents "${_contents}") - file(WRITE "${RELEASE_MAKEFILE}" "${_contents}") - endforeach() - - #Build release - vcpkg_build_qmake_release() - - #Fix the cmake files if they exist - if(EXISTS ${RELEASE_DIR}/lib/cmake) - vcpkg_execute_required_process( - COMMAND ${PYTHON2} ${_qt5base_port_dir}/fixcmake.py - WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake - LOGNAME fix-cmake - ) - endif() - - #Set the correct install directory to packages - foreach(MAKEFILE ${RELEASE_MAKEFILES} ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${MAKEFILE} "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}") - endforeach() - - #Install the module files - vcpkg_build_qmake_debug(TARGETS install) - vcpkg_build_qmake_release(TARGETS install) - - #Remove extra 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() - if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) - endif() - - file(GLOB RELEASE_LIBS "${CURRENT_PACKAGES_DIR}/lib/*") - if(NOT RELEASE_LIBS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - endif() - file(GLOB DEBUG_FILES "${CURRENT_PACKAGES_DIR}/debug/lib/*") - if(NOT DEBUG_FILES) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - endif() - - #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}/debug/tools/qt5 ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) - endif() - - file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/tools/${PORT}/*.dll) - file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/*.dll) - if (RELEASE_DLLS) - file(INSTALL ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${RELEASE_DLLS}) - #Check if there are any binaries left over; if not - delete the directory - file(GLOB RELEASE_BINS ${CURRENT_PACKAGES_DIR}/tools/${PORT}/*) - if(NOT RELEASE_BINS) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) - endif() - endif() - if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) - endif() - - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/qt5/debug/include) - - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - - #Find the relevant license file and install it - if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") - elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") - elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") - elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") - set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") - endif() - file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -endfunction() \ No newline at end of file diff --git a/ports/qt5multimedia/CONTROL b/ports/qt5multimedia/CONTROL deleted file mode 100644 index b45f3f297..000000000 --- a/ports/qt5multimedia/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5multimedia -Version: 5.9.2-0 -Description: Qt5 Multimedia Module - Classes and widgets for audio, video, radio and camera functionality -Build-Depends: qt5modularscripts, qt5base, qt5declarative diff --git a/ports/qt5multimedia/portfile.cmake b/ports/qt5multimedia/portfile.cmake deleted file mode 100644 index 878c2b150..000000000 --- a/ports/qt5multimedia/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtmultimedia b9fab874706440e97185475bfd0ad769c23d5ddbff5086cc0da9783777e81ed8140fb06fa0e7536ebfb67f2c9db39e1b9f3c2241834e74a9e1fb6ffd5cb7af11) diff --git a/ports/qt5networkauth/CONTROL b/ports/qt5networkauth/CONTROL deleted file mode 100644 index 0e5f45f96..000000000 --- a/ports/qt5networkauth/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5networkauth -Version: 5.9.2-0 -Description: Qt5 Network Authorization Module -Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5networkauth/portfile.cmake b/ports/qt5networkauth/portfile.cmake deleted file mode 100644 index c9b9db47c..000000000 --- a/ports/qt5networkauth/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtnetworkauth 2e83eefd5db62aa1cdbe451b432ba1937541e435dcc35205d3bb9b947f2ac7e31663dc069a6cfad5bbf34e1fa799d519820f7ed61b9c247016611a533385bebf) \ No newline at end of file diff --git a/ports/qt5scxml/CONTROL b/ports/qt5scxml/CONTROL deleted file mode 100644 index 4010ca304..000000000 --- a/ports/qt5scxml/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5scxml -Version: 5.9.2-0 -Description: Qt5 SCXML Module - Provides classes and tools for creating state machines from SCXML files and embedding them in applications -Build-Depends: qt5modularscripts, qt5base, qt5declarative diff --git a/ports/qt5scxml/portfile.cmake b/ports/qt5scxml/portfile.cmake deleted file mode 100644 index b0827216e..000000000 --- a/ports/qt5scxml/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtscxml c33db992ab456e5dd8b9be65c5619c503048106bbb1839b0930f2d4df36eed0780dfa1fc2912d7758aa72195269e59cbe8826cbaa414c2f339ca66c565809c88) diff --git a/ports/qt5serialport/CONTROL b/ports/qt5serialport/CONTROL deleted file mode 100644 index eb87231e0..000000000 --- a/ports/qt5serialport/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5serialport -Version: 5.9.2-0 -Description: Qt5 Serial Port - provides access to hardware and virtual serial ports -Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5serialport/portfile.cmake b/ports/qt5serialport/portfile.cmake deleted file mode 100644 index f4a42f38f..000000000 --- a/ports/qt5serialport/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtserialport cc8899c1ae2ed9fd8cf1c213ab7efaec12b3b16836006fdbf74cb7ea457705505a13e82c2f2873ee9426ae66473ec42259f4e728de64576ee44420f116cc433d) diff --git a/ports/qt5speech/CONTROL b/ports/qt5speech/CONTROL deleted file mode 100644 index f175d13e7..000000000 --- a/ports/qt5speech/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5speech -Version: 5.9.2-0 -Description: Qt5 Speech Module -Build-Depends: qt5modularscripts, qt5base, atlmfc \ No newline at end of file diff --git a/ports/qt5speech/portfile.cmake b/ports/qt5speech/portfile.cmake deleted file mode 100644 index 8a271b289..000000000 --- a/ports/qt5speech/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtspeech 8213ad13d33732fee3fc5b5e408b870970a3003d461be24195222e1d1209210039d1d0cd2f3c537a0db62629fb297d88b33ed4734ecb6c8d74f5406a87e7e0c0) diff --git a/ports/qt5svg/CONTROL b/ports/qt5svg/CONTROL deleted file mode 100644 index c52ca485c..000000000 --- a/ports/qt5svg/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5svg -Version: 5.9.2-0 -Description: Qt5 SVG Module - provides classes for displaying the contents of SVG files -Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5svg/portfile.cmake b/ports/qt5svg/portfile.cmake deleted file mode 100644 index 83283d376..000000000 --- a/ports/qt5svg/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtsvg c21c5a12fa10ff9f91deda88c99c995ee2138bdffa21c793b0c42f25155f01f87ede5206624b9d82713649f8cf1cfdb95f1d5b7e792de62f3848d3a9ec665fdd) diff --git a/ports/qt5tools/CONTROL b/ports/qt5tools/CONTROL deleted file mode 100644 index 4050ac097..000000000 --- a/ports/qt5tools/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5tools -Version: 5.9.2-0 -Description: Qt5 Tools Module; Includes deployment tools and helpers, Qt Designer, Assistant, and other applications -Build-Depends: qt5modularscripts, qt5base, qt5declarative \ No newline at end of file diff --git a/ports/qt5tools/portfile.cmake b/ports/qt5tools/portfile.cmake deleted file mode 100644 index 10eefa959..000000000 --- a/ports/qt5tools/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qttools afce063e167de96dfa264cfd27dc8d80c23ef091a30f4f8119575cae83f39716c3b332427630b340f518b82d6396cca1893f28e00f3c667ba201d7e4fc2aefe1) diff --git a/ports/qt5virtualkeyboard/CONTROL b/ports/qt5virtualkeyboard/CONTROL deleted file mode 100644 index 041e2cdd9..000000000 --- a/ports/qt5virtualkeyboard/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5virtualkeyboard -Version: 5.9.2-0 -Description: Qt5 Virtual Keyboard Module - A framework for implementing different input methods. Supports localized keyboard layouts and custom visual themes -Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5virtualkeyboard/portfile.cmake b/ports/qt5virtualkeyboard/portfile.cmake deleted file mode 100644 index cceed3894..000000000 --- a/ports/qt5virtualkeyboard/portfile.cmake +++ /dev/null @@ -1,7 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtvirtualkeyboard f8c39b789e877e60389ee9aab4a5c17e6018093f72fc57f526ce2584183135206306d4d5a7c7551a6de45969aa6f55444bb39f4ea3324cdf10611533f0bc2b22) - -set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/ports/qt5websockets/CONTROL b/ports/qt5websockets/CONTROL deleted file mode 100644 index 2ab49879b..000000000 --- a/ports/qt5websockets/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5websockets -Version: 5.9.2-0 -Description: Qt5 Web Sockets Module - provides WebSocket communication compliant with RFC 6455 -Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5websockets/portfile.cmake b/ports/qt5websockets/portfile.cmake deleted file mode 100644 index 98442f4c0..000000000 --- a/ports/qt5websockets/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtwebsockets 9330d6806251bc77d4c2a497a31b1b0e42a1e6bfe3ea7c00cee123052e9e1f9080e33cf4dfcd6ee6e4732c62f41257a77ec25ad607528f4e8ebe61ccaee3e159) diff --git a/ports/qt5winextras/CONTROL b/ports/qt5winextras/CONTROL deleted file mode 100644 index 451118c5a..000000000 --- a/ports/qt5winextras/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5winextras -Version: 5.9.2-0 -Description: Qt5 Windows Extras Module. Provides platform-specific APIs for Windows. -Build-Depends: qt5modularscripts, qt5base, atlmfc \ No newline at end of file diff --git a/ports/qt5winextras/portfile.cmake b/ports/qt5winextras/portfile.cmake deleted file mode 100644 index 692683adf..000000000 --- a/ports/qt5winextras/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtwinextras dbfb89833cc291fade8e9fe2ad9c7b7a78c2032de8dcbca1049d637f829811b99e1852ae39ca73a6eac2960df168765bee28023bb723e69c87e2f3bb50b7ef02) diff --git a/ports/qt5xmlpatterns/CONTROL b/ports/qt5xmlpatterns/CONTROL deleted file mode 100644 index 03bd2938e..000000000 --- a/ports/qt5xmlpatterns/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: qt5xmlpatterns -Version: 5.9.2-0 -Description: Qt5 XML Patterns Module - Support for XPath, XQuery, XSLT and XML schema validation -Build-Depends: qt5modularscripts, qt5base \ No newline at end of file diff --git a/ports/qt5xmlpatterns/portfile.cmake b/ports/qt5xmlpatterns/portfile.cmake deleted file mode 100644 index 6fbc69538..000000000 --- a/ports/qt5xmlpatterns/portfile.cmake +++ /dev/null @@ -1,5 +0,0 @@ -include(vcpkg_common_functions) - -include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) - -qt_modular_library(qtxmlpatterns c14dbd97988473ba73b4e21352c5560278aa4dbfdf2be1d12e9119c0b5dbe8a0e4eff9a682052024a01bb21dcf52d40ba00da98947901fb91518af92a225da83) -- cgit v1.2.3 From 3390007020921b41e3d4d42ad9b46c671250743a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 17 Jan 2018 17:31:22 -0800 Subject: [powershell] Remove usages of BitsTransfer --- scripts/VcpkgPowershellUtils.ps1 | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index e394e540e..997f603e3 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -94,11 +94,6 @@ function vcpkgCheckEqualFileHash( [Parameter(Mandatory=$true)][string]$filePat } } -if (vcpkgHasModule -moduleName 'BitsTransfer') -{ - Import-Module BitsTransfer -Verbose:$false -} - function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, [Parameter(Mandatory=$true)][string]$downloadPath) { @@ -119,28 +114,6 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, $wc.Proxy.Credentials = vcpkgGetCredentials } - # Some download (e.g. git from github)fail with Start-BitsTransfer - if (vcpkgHasCommand -commandName 'Start-BitsTransfer') - { - try - { - if ($proxyAuth) - { - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic") - $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential", $wc.Proxy.Credentials) - } - Start-BitsTransfer -Source $url -Destination $downloadPartPath -ErrorAction Stop - Move-Item -Path $downloadPartPath -Destination $downloadPath - return - } - catch [System.Exception] - { - # If BITS fails for any reason, delete any potentially partially downloaded files and continue - vcpkgRemoveItem $downloadPartPath - } - } - - Write-Verbose("Downloading $Dependency...") $wc.DownloadFile($url, $downloadPartPath) Move-Item -Path $downloadPartPath -Destination $downloadPath } -- cgit v1.2.3 From 81ab439b4884b93f862ebd17da1e65d8d8d9bd70 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 17 Jan 2018 17:33:44 -0800 Subject: [VcpkgPowershelUtils] Inline variable --- scripts/VcpkgPowershellUtils.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 997f603e3..5381523f0 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -108,8 +108,7 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, vcpkgRemoveItem $downloadPartPath $wc = New-Object System.Net.WebClient - $proxyAuth = !$wc.Proxy.IsBypassed($url) - if ($proxyAuth) + if (!$wc.Proxy.IsBypassed($url)) { $wc.Proxy.Credentials = vcpkgGetCredentials } -- cgit v1.2.3 From c7296cf1f21104b15d9cfe931416245768b484e3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 17 Jan 2018 17:34:09 -0800 Subject: [FetchDependency] Print out text when downloading/extracting --- scripts/fetchDependency.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 168c2359e..e4cab124c 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -75,7 +75,9 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) throw "Unknown program requested" } + Write-Host "Downloading $Dependency..." vcpkgDownloadFile $url $downloadPath + Write-Host "Downloading $Dependency has completed successfully." $downloadedFileHash = vcpkgGetSHA256 $downloadPath vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash @@ -89,7 +91,9 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if (-not (Test-Path $executableFromDownload)) { $outFilename = (Get-ChildItem $downloadPath).BaseName + Write-Host "Extracting $Dependency..." vcpkgExtractFile -File $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename + Write-Host "Extracting $Dependency has completed successfully." } } elseif($extractionType -eq $ExtractionType_SELF_EXTRACTING_7Z) -- cgit v1.2.3 From 458dafc812a1bc4f3290397601457e93f53b2dea Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 17 Jan 2018 19:35:31 -0800 Subject: Add new struct: StringLiteral --- toolsrc/include/vcpkg/base/stringliteral.h | 26 ++++++++++++++++++++++++++ toolsrc/vcpkglib/vcpkglib.vcxproj | 1 + toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 3 +++ 3 files changed, 30 insertions(+) create mode 100644 toolsrc/include/vcpkg/base/stringliteral.h diff --git a/toolsrc/include/vcpkg/base/stringliteral.h b/toolsrc/include/vcpkg/base/stringliteral.h new file mode 100644 index 000000000..c07f04cec --- /dev/null +++ b/toolsrc/include/vcpkg/base/stringliteral.h @@ -0,0 +1,26 @@ +#pragma once + +#include + +namespace vcpkg +{ + struct StringLiteral + { + template + constexpr StringLiteral(const char (&str)[N]) : m_size(N), m_cstr(str) + { + } + + constexpr const char* c_str() const { return m_cstr; } + constexpr size_t size() const { return m_size; } + + operator CStringView() const { return m_cstr; } + operator std::string() const { return m_cstr; } + + private: + size_t m_size; + const char* m_cstr; + }; + + inline const char* to_printf_arg(const StringLiteral str) { return str.c_str(); } +} diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 455891f85..c2bc6b6fd 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -151,6 +151,7 @@ + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index f8f517ad7..24f943e4a 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -341,5 +341,8 @@ Header Files\vcpkg + + Header Files\vcpkg\base + \ No newline at end of file -- cgit v1.2.3 From f563d2b58849d8ae6a04be0ad531cb2e20313fe0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 17 Jan 2018 19:39:46 -0800 Subject: Use StringLiteral and constexpr for options/switches --- toolsrc/include/vcpkg/vcpkgcmdarguments.h | 19 +++++++++++--- toolsrc/src/vcpkg/build.cpp | 5 ++-- toolsrc/src/vcpkg/commands.autocomplete.cpp | 6 +++-- toolsrc/src/vcpkg/commands.ci.cpp | 7 ++--- toolsrc/src/vcpkg/commands.edit.cpp | 4 +-- toolsrc/src/vcpkg/commands.list.cpp | 5 ++-- toolsrc/src/vcpkg/commands.search.cpp | 7 ++--- toolsrc/src/vcpkg/commands.upgrade.cpp | 6 ++--- toolsrc/src/vcpkg/export.cpp | 40 ++++++++++++++--------------- toolsrc/src/vcpkg/install.cpp | 18 ++++++------- toolsrc/src/vcpkg/remove.cpp | 12 ++++----- 11 files changed, 72 insertions(+), 57 deletions(-) diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index 93eeb6ef5..d84be9c22 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -21,14 +22,24 @@ namespace vcpkg struct CommandSwitch { - std::string name; - CStringView short_help_text; + constexpr CommandSwitch(const StringLiteral& name, const StringLiteral& short_help_text) + : name(name), short_help_text(short_help_text) + { + } + + StringLiteral name; + StringLiteral short_help_text; }; struct CommandSetting { - std::string name; - CStringView short_help_text; + constexpr CommandSetting(const StringLiteral& name, const StringLiteral& short_help_text) + : name(name), short_help_text(short_help_text) + { + } + + StringLiteral name; + StringLiteral short_help_text; }; struct CommandOptionsStructure diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index f43d8788e..960ba0400 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -26,7 +27,7 @@ namespace vcpkg::Build::Command using Dependencies::InstallPlanAction; using Dependencies::InstallPlanType; - static const std::string OPTION_CHECKS_ONLY = "--checks-only"; + static constexpr StringLiteral OPTION_CHECKS_ONLY = "--checks-only"; void perform_and_exit_ex(const FullPackageSpec& full_spec, const fs::path& port_dir, @@ -97,7 +98,7 @@ namespace vcpkg::Build::Command Checks::exit_success(VCPKG_LINE_INFO); } - static const std::array BUILD_SWITCHES = {{ + static constexpr std::array BUILD_SWITCHES = {{ {OPTION_CHECKS_ONLY, "Only run checks, do not rebuild package"}, }}; diff --git a/toolsrc/src/vcpkg/commands.autocomplete.cpp b/toolsrc/src/vcpkg/commands.autocomplete.cpp index 0df7ec5eb..564404421 100644 --- a/toolsrc/src/vcpkg/commands.autocomplete.cpp +++ b/toolsrc/src/vcpkg/commands.autocomplete.cpp @@ -136,8 +136,8 @@ namespace vcpkg::Commands::Autocomplete const bool is_option = Strings::case_insensitive_ascii_starts_with(prefix, "-"); if (is_option) { - results = - Util::fmap(command.structure.options.switches, [](const CommandSwitch& s) { return s.name; }); + results = Util::fmap(command.structure.options.switches, + [](const CommandSwitch& s) -> std::string { return s.name; }); auto settings = Util::fmap(command.structure.options.settings, [](auto&& s) { return s.name; }); results.insert(results.end(), settings.begin(), settings.end()); @@ -145,7 +145,9 @@ namespace vcpkg::Commands::Autocomplete else { if (command.structure.valid_arguments != nullptr) + { results = command.structure.valid_arguments(paths); + } } Util::unstable_keep_if(results, [&](const std::string& s) { diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 1a2f9b47f..4636a5738 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include +#include #include #include #include @@ -62,10 +63,10 @@ namespace vcpkg::Commands::CI Install::InstallSummary summary; }; - static const std::string OPTION_EXCLUDE = "--exclude"; - static const std::string OPTION_XUNIT = "--x-xunit"; + static constexpr StringLiteral OPTION_EXCLUDE = "--exclude"; + static constexpr StringLiteral OPTION_XUNIT = "--x-xunit"; - static const std::array CI_SETTINGS = {{ + static constexpr std::array CI_SETTINGS = {{ {OPTION_EXCLUDE, "Comma separated list of ports to skip"}, {OPTION_XUNIT, "File to output results in XUnit format (internal)"}, }}; diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index e40e394fb..3e5d08956 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -32,7 +32,7 @@ namespace vcpkg::Commands::Edit return output; } - static const std::string OPTION_BUILDTREES = "--buildtrees"; + static constexpr StringLiteral OPTION_BUILDTREES = "--buildtrees"; static std::vector valid_arguments(const VcpkgPaths& paths) { @@ -42,7 +42,7 @@ namespace vcpkg::Commands::Edit [](auto&& pgh) -> std::string { return pgh->core_paragraph->name; }); } - static const std::array EDIT_SWITCHES = {{ + static constexpr std::array EDIT_SWITCHES = {{ {OPTION_BUILDTREES, "Open editor into the port-specific buildtree subfolder"}, }}; diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index 960c57225..2570c8a6d 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -7,7 +7,8 @@ namespace vcpkg::Commands::List { - static const std::string OPTION_FULLDESC = "--x-full-desc"; // TODO: This should find a better home, eventually + static constexpr StringLiteral OPTION_FULLDESC = + "--x-full-desc"; // TODO: This should find a better home, eventually static void do_print(const StatusParagraph& pgh, bool full_desc) { @@ -24,7 +25,7 @@ namespace vcpkg::Commands::List } } - static const std::array LIST_SWITCHES = {{ + static constexpr std::array LIST_SWITCHES = {{ {OPTION_FULLDESC, "Do not truncate long text"}, }}; diff --git a/toolsrc/src/vcpkg/commands.search.cpp b/toolsrc/src/vcpkg/commands.search.cpp index 01291ddfb..33a642e40 100644 --- a/toolsrc/src/vcpkg/commands.search.cpp +++ b/toolsrc/src/vcpkg/commands.search.cpp @@ -10,8 +10,9 @@ namespace vcpkg::Commands::Search { - static const std::string OPTION_GRAPH = "--graph"; // TODO: This should find a better home, eventually - static const std::string OPTION_FULLDESC = "--x-full-desc"; // TODO: This should find a better home, eventually + static constexpr StringLiteral OPTION_GRAPH = "--graph"; // TODO: This should find a better home, eventually + static constexpr StringLiteral OPTION_FULLDESC = + "--x-full-desc"; // TODO: This should find a better home, eventually static std::string replace_dashes_with_underscore(const std::string& input) { @@ -79,7 +80,7 @@ namespace vcpkg::Commands::Search } } - static std::array SEARCH_SWITCHES = {{ + static constexpr std::array SEARCH_SWITCHES = {{ {OPTION_GRAPH, "Open editor into the port-specific buildtree subfolder"}, {OPTION_FULLDESC, "Do not truncate long text"}, }}; diff --git a/toolsrc/src/vcpkg/commands.upgrade.cpp b/toolsrc/src/vcpkg/commands.upgrade.cpp index d2c868870..bb26dc735 100644 --- a/toolsrc/src/vcpkg/commands.upgrade.cpp +++ b/toolsrc/src/vcpkg/commands.upgrade.cpp @@ -15,10 +15,10 @@ namespace vcpkg::Commands::Upgrade using Install::KeepGoing; using Install::to_keep_going; - static const std::string OPTION_NO_DRY_RUN = "--no-dry-run"; - static const std::string OPTION_KEEP_GOING = "--keep-going"; + static constexpr StringLiteral OPTION_NO_DRY_RUN = "--no-dry-run"; + static constexpr StringLiteral OPTION_KEEP_GOING = "--keep-going"; - static const std::array INSTALL_SWITCHES = {{ + static constexpr std::array INSTALL_SWITCHES = {{ {OPTION_NO_DRY_RUN, "Actually upgrade"}, {OPTION_KEEP_GOING, "Continue installing packages on failure"}, }}; diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index d15df95d2..64cb3c804 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -1,5 +1,6 @@ #include "pch.h" +#include #include #include #include @@ -260,22 +261,22 @@ namespace vcpkg::Export std::vector specs; }; - static const std::string OPTION_OUTPUT = "--output"; - static const std::string OPTION_DRY_RUN = "--dry-run"; - static const std::string OPTION_RAW = "--raw"; - static const std::string OPTION_NUGET = "--nuget"; - static const std::string OPTION_IFW = "--ifw"; - static const std::string OPTION_ZIP = "--zip"; - static const std::string OPTION_SEVEN_ZIP = "--7zip"; - static const std::string OPTION_NUGET_ID = "--nuget-id"; - static const std::string OPTION_NUGET_VERSION = "--nuget-version"; - static const std::string OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; - static const std::string OPTION_IFW_PACKAGES_DIR_PATH = "--ifw-packages-directory-path"; - static const std::string OPTION_IFW_REPOSITORY_DIR_PATH = "--ifw-repository-directory-path"; - static const std::string OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path"; - static const std::string OPTION_IFW_INSTALLER_FILE_PATH = "--ifw-installer-file-path"; - - static const std::array EXPORT_SWITCHES = {{ + static constexpr StringLiteral OPTION_OUTPUT = "--output"; + static constexpr StringLiteral OPTION_DRY_RUN = "--dry-run"; + static constexpr StringLiteral OPTION_RAW = "--raw"; + static constexpr StringLiteral OPTION_NUGET = "--nuget"; + static constexpr StringLiteral OPTION_IFW = "--ifw"; + static constexpr StringLiteral OPTION_ZIP = "--zip"; + static constexpr StringLiteral OPTION_SEVEN_ZIP = "--7zip"; + static constexpr StringLiteral OPTION_NUGET_ID = "--nuget-id"; + static constexpr StringLiteral OPTION_NUGET_VERSION = "--nuget-version"; + static constexpr StringLiteral OPTION_IFW_REPOSITORY_URL = "--ifw-repository-url"; + static constexpr StringLiteral OPTION_IFW_PACKAGES_DIR_PATH = "--ifw-packages-directory-path"; + static constexpr StringLiteral OPTION_IFW_REPOSITORY_DIR_PATH = "--ifw-repository-directory-path"; + static constexpr StringLiteral OPTION_IFW_CONFIG_FILE_PATH = "--ifw-configuration-file-path"; + static constexpr StringLiteral OPTION_IFW_INSTALLER_FILE_PATH = "--ifw-installer-file-path"; + + static constexpr std::array EXPORT_SWITCHES = {{ {OPTION_DRY_RUN, "Do not actually export"}, {OPTION_RAW, "Export to an uncompressed directory"}, {OPTION_NUGET, "Export a NuGet package"}, @@ -284,12 +285,9 @@ namespace vcpkg::Export {OPTION_SEVEN_ZIP, "Export to a 7zip (.7z) file"}, }}; - static const std::string EXPORT_SETTINGS_NUGET_ID_HELP_TEXT = - Strings::format("Specify the id for the exported NuGet package (overrides %s)", OPTION_OUTPUT); - - static const std::array EXPORT_SETTINGS = {{ + static constexpr std::array EXPORT_SETTINGS = {{ {OPTION_OUTPUT, "Specify the output name (used to construct filename)"}, - {OPTION_NUGET_ID, EXPORT_SETTINGS_NUGET_ID_HELP_TEXT}, + {OPTION_NUGET_ID, "Specify the id for the exported NuGet package (overrides --output)"}, {OPTION_NUGET_VERSION, "Specify the version for the exported NuGet package"}, {OPTION_IFW_REPOSITORY_URL, "Specify the remote repository URL for the online installer"}, {OPTION_IFW_PACKAGES_DIR_PATH, "Specify the temporary directory path for the repacked packages"}, diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index dcc130be3..d6a28d57c 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -413,21 +413,21 @@ namespace vcpkg::Install return InstallSummary{std::move(results), timer.to_string()}; } - static const std::string OPTION_DRY_RUN = "--dry-run"; - static const std::string OPTION_USE_HEAD_VERSION = "--head"; - static const std::string OPTION_NO_DOWNLOADS = "--no-downloads"; - static const std::string OPTION_RECURSE = "--recurse"; - static const std::string OPTION_KEEP_GOING = "--keep-going"; - static const std::string OPTION_XUNIT = "--x-xunit"; - - static const std::array INSTALL_SWITCHES = {{ + static constexpr StringLiteral OPTION_DRY_RUN = "--dry-run"; + static constexpr StringLiteral OPTION_USE_HEAD_VERSION = "--head"; + static constexpr StringLiteral OPTION_NO_DOWNLOADS = "--no-downloads"; + static constexpr StringLiteral OPTION_RECURSE = "--recurse"; + static constexpr StringLiteral OPTION_KEEP_GOING = "--keep-going"; + static constexpr StringLiteral OPTION_XUNIT = "--x-xunit"; + + static constexpr std::array INSTALL_SWITCHES = {{ {OPTION_DRY_RUN, "Do not actually build or install"}, {OPTION_USE_HEAD_VERSION, "Install the libraries on the command line using the latest upstream sources"}, {OPTION_NO_DOWNLOADS, "Do not download new sources"}, {OPTION_RECURSE, "Allow removal of packages as part of installation"}, {OPTION_KEEP_GOING, "Continue installing packages on failure"}, }}; - static const std::array INSTALL_SETTINGS = {{ + static constexpr std::array INSTALL_SETTINGS = {{ {OPTION_XUNIT, "File to output results in XUnit format (Internal use)"}, }}; diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 4079d60c1..e03df2ed2 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -164,13 +164,13 @@ namespace vcpkg::Remove } } - static const std::string OPTION_PURGE = "--purge"; - static const std::string OPTION_NO_PURGE = "--no-purge"; - static const std::string OPTION_RECURSE = "--recurse"; - static const std::string OPTION_DRY_RUN = "--dry-run"; - static const std::string OPTION_OUTDATED = "--outdated"; + static constexpr StringLiteral OPTION_PURGE = "--purge"; + static constexpr StringLiteral OPTION_NO_PURGE = "--no-purge"; + static constexpr StringLiteral OPTION_RECURSE = "--recurse"; + static constexpr StringLiteral OPTION_DRY_RUN = "--dry-run"; + static constexpr StringLiteral OPTION_OUTDATED = "--outdated"; - static const std::array SWITCHES = {{ + static constexpr std::array SWITCHES = {{ {OPTION_PURGE, "Remove the cached copy of the package (default)"}, {OPTION_NO_PURGE, "Do not remove the cached copy of the package"}, {OPTION_RECURSE, "Allow removal of packages not explicitly specified on the command line"}, -- cgit v1.2.3 From 9fadc83fdcf2f46d0d9606f928a9487553823d3e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 17 Jan 2018 22:48:10 -0800 Subject: [libodb] Bump version due to package change --- ports/libodb/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libodb/CONTROL b/ports/libodb/CONTROL index 3d502effe..bb9bbfe29 100644 --- a/ports/libodb/CONTROL +++ b/ports/libodb/CONTROL @@ -1,3 +1,3 @@ Source: libodb -Version: 2.4.0-1 +Version: 2.4.0-2 Description: ODB library, base runtime for the ODB ORM solution -- cgit v1.2.3 From 78ac1d0bb641619094772e942673094b14935e7f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 17 Jan 2018 22:08:48 -0800 Subject: [boost] Split boost-modular.cmake --- ports/boost-accumulators/portfile.cmake | 2 +- ports/boost-algorithm/portfile.cmake | 2 +- ports/boost-align/portfile.cmake | 2 +- ports/boost-any/portfile.cmake | 2 +- ports/boost-array/portfile.cmake | 2 +- ports/boost-asio/portfile.cmake | 2 +- ports/boost-assert/portfile.cmake | 2 +- ports/boost-assign/portfile.cmake | 2 +- ports/boost-atomic/portfile.cmake | 3 +- ports/boost-beast/portfile.cmake | 2 +- ports/boost-bimap/portfile.cmake | 2 +- ports/boost-bind/portfile.cmake | 2 +- ports/boost-build/CONTROL | 2 +- ports/boost-build/Jamroot.jam | 141 +++++++++++ ports/boost-build/boost-modular-build.cmake | 255 +++++++++++++++++++ ports/boost-build/nothing.bat | 0 ports/boost-build/portfile.cmake | 11 + ports/boost-build/user-config.jam | 25 ++ ports/boost-callable-traits/portfile.cmake | 2 +- ports/boost-chrono/portfile.cmake | 3 +- ports/boost-circular-buffer/portfile.cmake | 2 +- ports/boost-compatibility/portfile.cmake | 2 +- ports/boost-compute/portfile.cmake | 2 +- ports/boost-concept-check/portfile.cmake | 2 +- ports/boost-config/portfile.cmake | 2 +- ports/boost-container/portfile.cmake | 3 +- ports/boost-context/portfile.cmake | 3 +- ports/boost-conversion/portfile.cmake | 2 +- ports/boost-convert/portfile.cmake | 2 +- ports/boost-core/portfile.cmake | 2 +- ports/boost-coroutine/portfile.cmake | 3 +- ports/boost-coroutine2/portfile.cmake | 2 +- ports/boost-crc/portfile.cmake | 2 +- ports/boost-date-time/portfile.cmake | 3 +- ports/boost-detail/portfile.cmake | 2 +- ports/boost-disjoint-sets/portfile.cmake | 2 +- ports/boost-dll/portfile.cmake | 2 +- ports/boost-dynamic-bitset/portfile.cmake | 2 +- ports/boost-endian/portfile.cmake | 2 +- ports/boost-exception/portfile.cmake | 3 +- ports/boost-fiber/portfile.cmake | 3 +- ports/boost-filesystem/portfile.cmake | 3 +- ports/boost-flyweight/portfile.cmake | 2 +- ports/boost-foreach/portfile.cmake | 2 +- ports/boost-format/portfile.cmake | 2 +- ports/boost-function-types/portfile.cmake | 2 +- ports/boost-function/portfile.cmake | 2 +- ports/boost-functional/portfile.cmake | 2 +- ports/boost-fusion/portfile.cmake | 2 +- ports/boost-geometry/portfile.cmake | 2 +- ports/boost-gil/portfile.cmake | 2 +- ports/boost-graph-parallel/portfile.cmake | 3 +- ports/boost-graph/portfile.cmake | 3 +- ports/boost-hana/portfile.cmake | 2 +- ports/boost-heap/portfile.cmake | 2 +- ports/boost-icl/portfile.cmake | 2 +- ports/boost-integer/portfile.cmake | 2 +- ports/boost-interprocess/portfile.cmake | 2 +- ports/boost-interval/portfile.cmake | 2 +- ports/boost-intrusive/portfile.cmake | 2 +- ports/boost-io/portfile.cmake | 2 +- ports/boost-iostreams/portfile.cmake | 3 +- ports/boost-iterator/portfile.cmake | 2 +- ports/boost-lambda/portfile.cmake | 2 +- ports/boost-lexical-cast/portfile.cmake | 2 +- ports/boost-local-function/portfile.cmake | 2 +- ports/boost-locale/portfile.cmake | 3 +- ports/boost-lockfree/portfile.cmake | 2 +- ports/boost-log/portfile.cmake | 3 +- ports/boost-logic/portfile.cmake | 2 +- ports/boost-math/portfile.cmake | 3 +- ports/boost-metaparse/portfile.cmake | 2 +- ports/boost-move/portfile.cmake | 2 +- ports/boost-mp11/portfile.cmake | 2 +- ports/boost-mpi/portfile.cmake | 3 +- ports/boost-mpl/portfile.cmake | 2 +- ports/boost-msm/portfile.cmake | 2 +- ports/boost-multi-array/portfile.cmake | 2 +- ports/boost-multi-index/portfile.cmake | 2 +- ports/boost-multiprecision/portfile.cmake | 2 +- ports/boost-numeric-conversion/portfile.cmake | 2 +- ports/boost-odeint/portfile.cmake | 2 +- ports/boost-optional/portfile.cmake | 2 +- ports/boost-parameter/portfile.cmake | 2 +- ports/boost-phoenix/portfile.cmake | 2 +- ports/boost-poly-collection/portfile.cmake | 2 +- ports/boost-polygon/portfile.cmake | 2 +- ports/boost-pool/portfile.cmake | 2 +- ports/boost-predef/portfile.cmake | 2 +- ports/boost-preprocessor/portfile.cmake | 2 +- ports/boost-process/portfile.cmake | 2 +- ports/boost-program-options/portfile.cmake | 3 +- ports/boost-property-map/portfile.cmake | 2 +- ports/boost-property-tree/portfile.cmake | 2 +- ports/boost-proto/portfile.cmake | 2 +- ports/boost-ptr-container/portfile.cmake | 2 +- ports/boost-python/portfile.cmake | 3 +- ports/boost-qvm/portfile.cmake | 2 +- ports/boost-random/portfile.cmake | 3 +- ports/boost-range/portfile.cmake | 2 +- ports/boost-ratio/portfile.cmake | 2 +- ports/boost-rational/portfile.cmake | 2 +- ports/boost-regex/portfile.cmake | 3 +- ports/boost-scope-exit/portfile.cmake | 2 +- ports/boost-serialization/portfile.cmake | 3 +- ports/boost-signals/portfile.cmake | 3 +- ports/boost-signals2/portfile.cmake | 2 +- ports/boost-smart-ptr/portfile.cmake | 2 +- ports/boost-sort/portfile.cmake | 2 +- ports/boost-spirit/portfile.cmake | 2 +- ports/boost-stacktrace/portfile.cmake | 3 +- ports/boost-statechart/portfile.cmake | 2 +- ports/boost-static-assert/portfile.cmake | 2 +- ports/boost-system/portfile.cmake | 3 +- ports/boost-test/portfile.cmake | 3 +- ports/boost-thread/portfile.cmake | 3 +- ports/boost-throw-exception/portfile.cmake | 2 +- ports/boost-timer/portfile.cmake | 3 +- ports/boost-tokenizer/portfile.cmake | 2 +- ports/boost-tti/portfile.cmake | 2 +- ports/boost-tuple/portfile.cmake | 2 +- ports/boost-type-erasure/portfile.cmake | 3 +- ports/boost-type-index/portfile.cmake | 2 +- ports/boost-type-traits/portfile.cmake | 2 +- ports/boost-typeof/portfile.cmake | 2 +- ports/boost-ublas/portfile.cmake | 2 +- ports/boost-units/portfile.cmake | 2 +- ports/boost-unordered/portfile.cmake | 2 +- ports/boost-utility/portfile.cmake | 2 +- ports/boost-uuid/portfile.cmake | 2 +- ports/boost-variant/portfile.cmake | 2 +- ports/boost-vcpkg-helpers/CONTROL | 2 +- ports/boost-vcpkg-helpers/Jamroot.jam | 141 ----------- .../boost-modular-headers.cmake | 24 ++ ports/boost-vcpkg-helpers/boost-modular.cmake | 281 --------------------- ports/boost-vcpkg-helpers/generate-ports.ps1 | 12 +- ports/boost-vcpkg-helpers/nothing.bat | 0 ports/boost-vcpkg-helpers/portfile.cmake | 6 +- ports/boost-vcpkg-helpers/user-config.jam | 25 -- ports/boost-vmd/portfile.cmake | 2 +- ports/boost-wave/portfile.cmake | 3 +- ports/boost-winapi/portfile.cmake | 2 +- ports/boost-xpressive/portfile.cmake | 2 +- 143 files changed, 626 insertions(+), 586 deletions(-) create mode 100644 ports/boost-build/Jamroot.jam create mode 100644 ports/boost-build/boost-modular-build.cmake create mode 100644 ports/boost-build/nothing.bat create mode 100644 ports/boost-build/user-config.jam delete mode 100644 ports/boost-vcpkg-helpers/Jamroot.jam create mode 100644 ports/boost-vcpkg-helpers/boost-modular-headers.cmake delete mode 100644 ports/boost-vcpkg-helpers/boost-modular.cmake delete mode 100644 ports/boost-vcpkg-helpers/nothing.bat delete mode 100644 ports/boost-vcpkg-helpers/user-config.jam diff --git a/ports/boost-accumulators/portfile.cmake b/ports/boost-accumulators/portfile.cmake index b55026968..9c13dcc52 100644 --- a/ports/boost-accumulators/portfile.cmake +++ b/ports/boost-accumulators/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-algorithm/portfile.cmake b/ports/boost-algorithm/portfile.cmake index 2149ba0e0..2f6803405 100644 --- a/ports/boost-algorithm/portfile.cmake +++ b/ports/boost-algorithm/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-align/portfile.cmake b/ports/boost-align/portfile.cmake index 481b66321..80a2a7ab7 100644 --- a/ports/boost-align/portfile.cmake +++ b/ports/boost-align/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-any/portfile.cmake b/ports/boost-any/portfile.cmake index 76d723999..47de0a492 100644 --- a/ports/boost-any/portfile.cmake +++ b/ports/boost-any/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-array/portfile.cmake b/ports/boost-array/portfile.cmake index 8affa0dff..299bf6ff3 100644 --- a/ports/boost-array/portfile.cmake +++ b/ports/boost-array/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-asio/portfile.cmake b/ports/boost-asio/portfile.cmake index 4317b12d5..f513ae43c 100644 --- a/ports/boost-asio/portfile.cmake +++ b/ports/boost-asio/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-assert/portfile.cmake b/ports/boost-assert/portfile.cmake index 6112c47bf..cd0e8267f 100644 --- a/ports/boost-assert/portfile.cmake +++ b/ports/boost-assert/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-assign/portfile.cmake b/ports/boost-assign/portfile.cmake index 470e22cd9..e2d0a7e20 100644 --- a/ports/boost-assign/portfile.cmake +++ b/ports/boost-assign/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-atomic/portfile.cmake b/ports/boost-atomic/portfile.cmake index 650016d6f..feb671183 100644 --- a/ports/boost-atomic/portfile.cmake +++ b/ports/boost-atomic/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-beast/portfile.cmake b/ports/boost-beast/portfile.cmake index 06312f417..16d782d94 100644 --- a/ports/boost-beast/portfile.cmake +++ b/ports/boost-beast/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-bimap/portfile.cmake b/ports/boost-bimap/portfile.cmake index 313cd9075..eda19317a 100644 --- a/ports/boost-bimap/portfile.cmake +++ b/ports/boost-bimap/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-bind/portfile.cmake b/ports/boost-bind/portfile.cmake index 9cc1df5e7..8f6ee1cfb 100644 --- a/ports/boost-bind/portfile.cmake +++ b/ports/boost-bind/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-build/CONTROL b/ports/boost-build/CONTROL index d034154d3..79aab946b 100644 --- a/ports/boost-build/CONTROL +++ b/ports/boost-build/CONTROL @@ -1,3 +1,3 @@ Source: boost-build -Version: 1.66.0 +Version: 1.66.0-1 Description: Boost.Build diff --git a/ports/boost-build/Jamroot.jam b/ports/boost-build/Jamroot.jam new file mode 100644 index 000000000..2762c99ea --- /dev/null +++ b/ports/boost-build/Jamroot.jam @@ -0,0 +1,141 @@ +constant BOOST_VERSION : 1.66.0 ; +constant BOOST_VERSION_ABI_TAG : 1_66 ; +constant BOOST_JAMROOT_MODULE : $(__name__) ; + +import boostcpp ; +import feature ; + +boostcpp.set-version $(BOOST_VERSION) ; + +project boost : requirements + include&&@CURRENT_INSTALLED_DIR@/include + BOOST_ALL_NO_LIB=1 + @$(__name__).tag + @REQUIREMENTS@ + ; + +rule boost-install ( libraries * ) +{ + stagedir = [ option.get stagedir ] ; + install stage + : $(libraries) + : $(stagedir)/lib ; +} + +rule tag ( name : type ? : property-set ) +{ + return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ; +} + +rule python-tag ( name : type ? : property-set ) +{ + return [ tag $(name) : $(type) : $(property-set) ] ; +} + +if "@PORT@" != "boost-system" +{ + use-project /boost/system : . ; + + lib boost_system : : @CURRENT_INSTALLED_DIR@/lib/boost_system-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_system : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_system-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_system ; +} + +if "@PORT@" != "boost-chrono" +{ + use-project /boost/chrono : . ; + + lib boost_chrono : : @CURRENT_INSTALLED_DIR@/lib/boost_chrono-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_chrono : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_chrono-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_chrono ; +} + +if "@PORT@" != "boost-regex" +{ + use-project /boost/regex : . ; + + lib boost_regex : : @CURRENT_INSTALLED_DIR@/lib/boost_regex-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_regex : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_regex-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_regex ; +} + +if "@PORT@" != "boost-date-time" +{ + use-project /boost/date_time : . ; + + lib boost_date_time : : @CURRENT_INSTALLED_DIR@/lib/boost_date_time-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release -/boost/date_time//boost_date_time ; + lib boost_date_time : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_date_time-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug -/boost/date_time//boost_date_time ; + explicit boost_date_time ; +} + +if "@PORT@" != "boost-thread" +{ + use-project /boost/thread : . ; + + lib boost_thread : : @CURRENT_INSTALLED_DIR@/lib/boost_thread-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release : : /boost/date_time//boost_date_time ; + lib boost_thread : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_thread-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug : : /boost/date_time//boost_date_time ; + explicit boost_thread ; +} + +if "@PORT@" != "boost-timer" +{ + use-project /boost/timer : . ; + + lib boost_timer : : @CURRENT_INSTALLED_DIR@/lib/boost_timer-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_timer : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_timer-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_timer ; +} + +if "@PORT@" != "boost-filesystem" +{ + use-project /boost/filesystem : . ; + + lib boost_filesystem : : @CURRENT_INSTALLED_DIR@/lib/boost_filesystem-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release : : /boost/system//boost_system ; + lib boost_filesystem : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_filesystem-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug : : /boost/system//boost_system ; + explicit boost_filesystem ; +} + +if "@PORT@" != "boost-atomic" +{ + use-project /boost/atomic : . ; + + lib boost_atomic : : @CURRENT_INSTALLED_DIR@/lib/boost_atomic-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_atomic : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_atomic-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_atomic ; +} + +if "@PORT@" != "boost-context" +{ + feature.feature segmented-stacks : on : optional propagated composite ; + feature.compose on : BOOST_USE_SEGMENTED_STACKS ; + + use-project /boost/context : . ; + + lib boost_context : : @CURRENT_INSTALLED_DIR@/lib/boost_context-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_context : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_context-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_context ; +} + +if "@PORT@" != "boost-test" +{ + use-project /boost/test : . ; + + lib boost_unit_test_framework : : @CURRENT_INSTALLED_DIR@/lib/boost_unit_test_framework-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; + lib boost_unit_test_framework : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_unit_test_framework-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + explicit boost_unit_test_framework ; +} + +rule requires ( foo * ) +{ +} + +rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * ) +{ + name = boost_$(name) ; + lib $(name) : $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ; + boost-install $(name) ; +} + +use-project /boost/@PORT@ : build ; + +build-project build ; diff --git a/ports/boost-build/boost-modular-build.cmake b/ports/boost-build/boost-modular-build.cmake new file mode 100644 index 000000000..e9062e7e3 --- /dev/null +++ b/ports/boost-build/boost-modular-build.cmake @@ -0,0 +1,255 @@ +function(boost_modular_build) + cmake_parse_arguments(_bm "" "SOURCE_PATH;REQUIREMENTS" "OPTIONS" ${ARGN}) + + if(NOT DEFINED _bm_SOURCE_PATH) + message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_build.") + endif() + + # Todo: this serves too similar a purpose as vcpkg_find_acquire_program() + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/tools/boost-build") + else() + get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE) + endif() + + if(NOT EXISTS "${BOOST_BUILD_PATH}") + message(FATAL_ERROR "The x86 boost-build tools must be installed to build for non-x86/x64 platforms. Please run `vcpkg install boost-build:x86-windows`.") + endif() + + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + list(APPEND _bm_OPTIONS windows-api=store) + endif() + + set(_bm_DIR ${CURRENT_INSTALLED_DIR}/share/boost-build) + + if(EXISTS "${_bm_SOURCE_PATH}/Jamfile.v2") + file(REMOVE_RECURSE "${_bm_SOURCE_PATH}/Jamfile.v2") + endif() + + set(REQUIREMENTS ${_bm_REQUIREMENTS}) + + configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) + + # boost thread superfluously builds has_atomic_flag_lockfree on windows. + if(EXISTS "${_bm_SOURCE_PATH}/build/Jamfile.v2") + file(READ ${_bm_SOURCE_PATH}/build/Jamfile.v2 _contents) + string(REPLACE + "\n\nexe has_atomic_flag_lockfree" + "\n\nexplicit has_atomic_flag_lockfree ;\nexe has_atomic_flag_lockfree" + _contents + "${_contents}" + ) + string(REPLACE "\nimport ../../config/checks/config : requires ;" "\n# import ../../config/checks/config : requires ;" _contents "${_contents}") + string(REGEX REPLACE + "\.\./\.\./([^/ ]+)/build//(boost_[^/ ]+)" + "/boost/\\1//\\2" + _contents + "${_contents}" + ) + string(REGEX REPLACE " /boost//([^/ ]+)" " /boost/\\1//boost_\\1" _contents "${_contents}") + file(WRITE ${_bm_SOURCE_PATH}/build/Jamfile.v2 "${_contents}") + endif() + + if(EXISTS "${_bm_SOURCE_PATH}/build/log-architecture.jam") + file(READ ${_bm_SOURCE_PATH}/build/log-architecture.jam _contents) + string(REPLACE + "\nproject.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" + "\n# project.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" + _contents "${_contents}") + file(WRITE ${_bm_SOURCE_PATH}/build/log-architecture.jam "${_contents}") + endif() + + ##################### + # Cleanup previous builds + ###################### + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + # It is possible for a file in this folder to be locked due to antivirus or vctip + execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\n Files are likely in use.") + endif() + endif() + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + # It is possible for a file in this folder to be locked due to antivirus or vctip + execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg\n Files are likely in use.") + endif() + endif() + + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug) + message(FATAL_ERROR "Error: directory exists: ${CURRENT_PACKAGES_DIR}/debug\n The previous package was not fully cleared. This is an internal error.") + endif() + file(MAKE_DIRECTORY + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + ) + + ###################### + # Generate configuration + ###################### + list(APPEND _bm_OPTIONS + -j$ENV{NUMBER_OF_PROCESSORS} + --debug-configuration + --debug-building + --debug-generators + --disable-icu + --ignore-site-config + --hash + -q + + threadapi=win32 + threading=multi + ) + + # Add build type specific options + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + list(APPEND _bm_OPTIONS runtime-link=shared) + else() + list(APPEND _bm_OPTIONS runtime-link=static) + endif() + + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND _bm_OPTIONS link=shared) + else() + list(APPEND _bm_OPTIONS link=static) + endif() + + if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + list(APPEND _bm_OPTIONS address-model=64 architecture=x86) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + list(APPEND _bm_OPTIONS address-model=32 architecture=arm) + else() + list(APPEND _bm_OPTIONS address-model=32 architecture=x86) + endif() + + file(TO_CMAKE_PATH "${_bm_DIR}/nothing.bat" NOTHING_BAT) + set(TOOLSET_OPTIONS " /EHsc -Zm800 -nologo") + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + find_path(PATH_TO_CL cl.exe) + find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "${PATH_TO_CL}/../../../lib/x86/store/references" NO_DEFAULT_PATH) + if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") + message(FATAL_ERROR "Could not find `platform.winmd` in VS2017. Do you have the Universal Windows Platform development workload installed?") + endif() + else() + find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "$ENV{VS140COMNTOOLS}/../../VC/LIB/store/references") + if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") + message(FATAL_ERROR "Could not find `platform.winmd` in VS2015.") + endif() + endif() + file(TO_NATIVE_PATH "${PLATFORM_WINMD_DIR}" PLATFORM_WINMD_DIR) + string(REPLACE "\\" "\\\\" PLATFORM_WINMD_DIR ${PLATFORM_WINMD_DIR}) # escape backslashes + + set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -Zl \"/AI\"${PLATFORM_WINMD_DIR}\"\" WindowsApp.lib /ZW -DVirtualAlloc=VirtualAllocFromApp -D_WIN32_WINNT=0x0A00") + else() + set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -D_WIN32_WINNT=0x0602") + endif() + + configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) + configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) + + if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + list(APPEND _bm_OPTIONS toolset=msvc-14.1) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") + list(APPEND _bm_OPTIONS toolset=msvc-14.0) + else() + message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'") + endif() + + ###################### + # Perform build + Package + ###################### + set(B2_EXE "${BOOST_BUILD_PATH}/b2.exe") + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${TARGET_TRIPLET}-rel") + set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") + vcpkg_execute_required_process( + COMMAND "${B2_EXE}" + --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage + --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam + ${_bm_OPTIONS} + variant=release + debug-symbols=on + WORKING_DIRECTORY ${_bm_SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") + vcpkg_execute_required_process( + COMMAND "${B2_EXE}" + --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage + --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam + ${_bm_OPTIONS} + variant=debug + WORKING_DIRECTORY ${_bm_SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Packaging ${TARGET_TRIPLET}-rel") + file(GLOB REL_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.lib) + file(COPY ${REL_LIBS} + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + FILES_MATCHING PATTERN "*.lib") + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.dll) + file(COPY ${REL_DLLS} + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + FILES_MATCHING PATTERN "*.dll") + endif() + message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") + file(GLOB DBG_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.lib) + file(COPY ${DBG_LIBS} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + FILES_MATCHING PATTERN "*.lib") + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.dll) + file(COPY ${DBG_DLLS} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + FILES_MATCHING PATTERN "*.dll") + endif() + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") + endif() + + file(GLOB INSTALLED_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*.lib ${CURRENT_PACKAGES_DIR}/lib/*.lib) + foreach(LIB ${INSTALLED_LIBS}) + get_filename_component(OLD_FILENAME ${LIB} NAME) + get_filename_component(DIRECTORY_OF_LIB_FILE ${LIB} DIRECTORY) + string(REPLACE "libboost_" "boost_" NEW_FILENAME ${OLD_FILENAME}) + string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs + string(REPLACE "-vc141-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2017 and VS2015 binaries + string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs + string(REPLACE "-sgyd-" "-gyd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs + string(REPLACE "-x32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-x64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-a32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-a64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "_python3-" "_python-" NEW_FILENAME ${NEW_FILENAME}) + if("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}") + # nothing to do + elseif(EXISTS ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) + file(REMOVE ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}) + else() + file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) + endif() + endforeach() +endfunction() diff --git a/ports/boost-build/nothing.bat b/ports/boost-build/nothing.bat new file mode 100644 index 000000000..e69de29bb diff --git a/ports/boost-build/portfile.cmake b/ports/boost-build/portfile.cmake index dec41e37b..9a02b061e 100644 --- a/ports/boost-build/portfile.cmake +++ b/ports/boost-build/portfile.cmake @@ -52,3 +52,14 @@ vcpkg_execute_required_process( file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright) file(INSTALL ${BOOSTCPP_ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build RENAME boostcpp.jam) + + + +file( + COPY + ${CMAKE_CURRENT_LIST_DIR}/boost-modular-build.cmake + ${CMAKE_CURRENT_LIST_DIR}/Jamroot.jam + ${CMAKE_CURRENT_LIST_DIR}/nothing.bat + ${CMAKE_CURRENT_LIST_DIR}/user-config.jam + DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build +) diff --git a/ports/boost-build/user-config.jam b/ports/boost-build/user-config.jam new file mode 100644 index 000000000..c970f07a5 --- /dev/null +++ b/ports/boost-build/user-config.jam @@ -0,0 +1,25 @@ +import toolset ; + +using msvc : : cl.exe : +@NOTHING_BAT@ +@TOOLSET_OPTIONS@ +; + +if "@PORT@" = "boost-python" +{ + using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_RELEASE@ ; + using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_DEBUG@ : on ; +} + +project user-config : ; + +lib advapi32 ; + +lib icuuc : : @CURRENT_INSTALLED_DIR@/lib/icuuc.lib release : : advapi32 ; +lib icuuc : : @CURRENT_INSTALLED_DIR@/debug/lib/icuucd.lib debug : : advapi32 ; + +lib icuin : : @CURRENT_INSTALLED_DIR@/lib/icuin.lib release : : ; +lib icuin : : @CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib debug : : ; + +lib icudt : : @CURRENT_INSTALLED_DIR@/lib/icudt.lib release : : ; +lib icudt : : @CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib debug : : ; diff --git a/ports/boost-callable-traits/portfile.cmake b/ports/boost-callable-traits/portfile.cmake index 4bc138320..0a0a670b3 100644 --- a/ports/boost-callable-traits/portfile.cmake +++ b/ports/boost-callable-traits/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-chrono/portfile.cmake b/ports/boost-chrono/portfile.cmake index 167414ebf..d1cb98af1 100644 --- a/ports/boost-chrono/portfile.cmake +++ b/ports/boost-chrono/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-circular-buffer/portfile.cmake b/ports/boost-circular-buffer/portfile.cmake index ebb8be3d0..85b46c0d4 100644 --- a/ports/boost-circular-buffer/portfile.cmake +++ b/ports/boost-circular-buffer/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-compatibility/portfile.cmake b/ports/boost-compatibility/portfile.cmake index cd9464deb..e59db2e84 100644 --- a/ports/boost-compatibility/portfile.cmake +++ b/ports/boost-compatibility/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-compute/portfile.cmake b/ports/boost-compute/portfile.cmake index fd8e2cd39..2c70ac5ef 100644 --- a/ports/boost-compute/portfile.cmake +++ b/ports/boost-compute/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-concept-check/portfile.cmake b/ports/boost-concept-check/portfile.cmake index 0aa690830..36d7bac9c 100644 --- a/ports/boost-concept-check/portfile.cmake +++ b/ports/boost-concept-check/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-config/portfile.cmake b/ports/boost-config/portfile.cmake index 7b1a023c1..21d1c4083 100644 --- a/ports/boost-config/portfile.cmake +++ b/ports/boost-config/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,6 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#ifndef BOOST_ALL_NO_LIB\n#define BOOST_ALL_NO_LIB\n#endif\n") file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#undef BOOST_ALL_DYN_LINK\n") diff --git a/ports/boost-container/portfile.cmake b/ports/boost-container/portfile.cmake index 46aefd96d..d2cc5c209 100644 --- a/ports/boost-container/portfile.cmake +++ b/ports/boost-container/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-context/portfile.cmake b/ports/boost-context/portfile.cmake index 0e5852bb6..b749a9d80 100644 --- a/ports/boost-context/portfile.cmake +++ b/ports/boost-context/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-conversion/portfile.cmake b/ports/boost-conversion/portfile.cmake index 25b0a5dfb..00ce64df7 100644 --- a/ports/boost-conversion/portfile.cmake +++ b/ports/boost-conversion/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-convert/portfile.cmake b/ports/boost-convert/portfile.cmake index 10adca8e9..a3c10172a 100644 --- a/ports/boost-convert/portfile.cmake +++ b/ports/boost-convert/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-core/portfile.cmake b/ports/boost-core/portfile.cmake index 59cb63c78..70c989e16 100644 --- a/ports/boost-core/portfile.cmake +++ b/ports/boost-core/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-coroutine/portfile.cmake b/ports/boost-coroutine/portfile.cmake index 2ba322498..14c8dbe3b 100644 --- a/ports/boost-coroutine/portfile.cmake +++ b/ports/boost-coroutine/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-coroutine2/portfile.cmake b/ports/boost-coroutine2/portfile.cmake index 824403bbf..19ad0fecc 100644 --- a/ports/boost-coroutine2/portfile.cmake +++ b/ports/boost-coroutine2/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-crc/portfile.cmake b/ports/boost-crc/portfile.cmake index b8d183cd2..435ec9ad5 100644 --- a/ports/boost-crc/portfile.cmake +++ b/ports/boost-crc/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-date-time/portfile.cmake b/ports/boost-date-time/portfile.cmake index fad0f01e9..a171018c4 100644 --- a/ports/boost-date-time/portfile.cmake +++ b/ports/boost-date-time/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-detail/portfile.cmake b/ports/boost-detail/portfile.cmake index 072f14361..eec646472 100644 --- a/ports/boost-detail/portfile.cmake +++ b/ports/boost-detail/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-disjoint-sets/portfile.cmake b/ports/boost-disjoint-sets/portfile.cmake index 1b0c9aba3..223339e95 100644 --- a/ports/boost-disjoint-sets/portfile.cmake +++ b/ports/boost-disjoint-sets/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-dll/portfile.cmake b/ports/boost-dll/portfile.cmake index c387a6d7c..063b979f5 100644 --- a/ports/boost-dll/portfile.cmake +++ b/ports/boost-dll/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-dynamic-bitset/portfile.cmake b/ports/boost-dynamic-bitset/portfile.cmake index 63928751a..414f7b304 100644 --- a/ports/boost-dynamic-bitset/portfile.cmake +++ b/ports/boost-dynamic-bitset/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-endian/portfile.cmake b/ports/boost-endian/portfile.cmake index 14f19b0ed..911d90971 100644 --- a/ports/boost-endian/portfile.cmake +++ b/ports/boost-endian/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-exception/portfile.cmake b/ports/boost-exception/portfile.cmake index dd5d6540e..eda3644a7 100644 --- a/ports/boost-exception/portfile.cmake +++ b/ports/boost-exception/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,7 +10,9 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) set(VCPKG_LIBRARY_LINKAGE static) diff --git a/ports/boost-fiber/portfile.cmake b/ports/boost-fiber/portfile.cmake index 0ea0edcc4..ef8751a53 100644 --- a/ports/boost-fiber/portfile.cmake +++ b/ports/boost-fiber/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-filesystem/portfile.cmake b/ports/boost-filesystem/portfile.cmake index e85cc096a..5a964b7a1 100644 --- a/ports/boost-filesystem/portfile.cmake +++ b/ports/boost-filesystem/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-flyweight/portfile.cmake b/ports/boost-flyweight/portfile.cmake index 858560aeb..25c0f65f5 100644 --- a/ports/boost-flyweight/portfile.cmake +++ b/ports/boost-flyweight/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-foreach/portfile.cmake b/ports/boost-foreach/portfile.cmake index 9801f7053..21c688318 100644 --- a/ports/boost-foreach/portfile.cmake +++ b/ports/boost-foreach/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-format/portfile.cmake b/ports/boost-format/portfile.cmake index a6c44bd27..a80e1c7e6 100644 --- a/ports/boost-format/portfile.cmake +++ b/ports/boost-format/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-function-types/portfile.cmake b/ports/boost-function-types/portfile.cmake index 1b3190699..2a679a25a 100644 --- a/ports/boost-function-types/portfile.cmake +++ b/ports/boost-function-types/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-function/portfile.cmake b/ports/boost-function/portfile.cmake index c0db0b55f..decf00686 100644 --- a/ports/boost-function/portfile.cmake +++ b/ports/boost-function/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-functional/portfile.cmake b/ports/boost-functional/portfile.cmake index 503d0786f..5de067de4 100644 --- a/ports/boost-functional/portfile.cmake +++ b/ports/boost-functional/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-fusion/portfile.cmake b/ports/boost-fusion/portfile.cmake index ab3b553dd..3923f82bc 100644 --- a/ports/boost-fusion/portfile.cmake +++ b/ports/boost-fusion/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-geometry/portfile.cmake b/ports/boost-geometry/portfile.cmake index 9e30e8fc7..c2f1d20ab 100644 --- a/ports/boost-geometry/portfile.cmake +++ b/ports/boost-geometry/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-gil/portfile.cmake b/ports/boost-gil/portfile.cmake index 8ce5cc5aa..deb977a20 100644 --- a/ports/boost-gil/portfile.cmake +++ b/ports/boost-gil/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-graph-parallel/portfile.cmake b/ports/boost-graph-parallel/portfile.cmake index 022831655..8d2fdb2eb 100644 --- a/ports/boost-graph-parallel/portfile.cmake +++ b/ports/boost-graph-parallel/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-graph/portfile.cmake b/ports/boost-graph/portfile.cmake index 84948ccad..21670d647 100644 --- a/ports/boost-graph/portfile.cmake +++ b/ports/boost-graph/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-hana/portfile.cmake b/ports/boost-hana/portfile.cmake index a46cfb28f..05ce047aa 100644 --- a/ports/boost-hana/portfile.cmake +++ b/ports/boost-hana/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-heap/portfile.cmake b/ports/boost-heap/portfile.cmake index 636763954..02a25bab9 100644 --- a/ports/boost-heap/portfile.cmake +++ b/ports/boost-heap/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-icl/portfile.cmake b/ports/boost-icl/portfile.cmake index e442621fa..1f6bac41b 100644 --- a/ports/boost-icl/portfile.cmake +++ b/ports/boost-icl/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-integer/portfile.cmake b/ports/boost-integer/portfile.cmake index 07dc91e20..4afba50e8 100644 --- a/ports/boost-integer/portfile.cmake +++ b/ports/boost-integer/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-interprocess/portfile.cmake b/ports/boost-interprocess/portfile.cmake index 6e959ca2d..c10635499 100644 --- a/ports/boost-interprocess/portfile.cmake +++ b/ports/boost-interprocess/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-interval/portfile.cmake b/ports/boost-interval/portfile.cmake index 0d0a88b8b..9fe190197 100644 --- a/ports/boost-interval/portfile.cmake +++ b/ports/boost-interval/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-intrusive/portfile.cmake b/ports/boost-intrusive/portfile.cmake index d562cd074..2fc9fd32a 100644 --- a/ports/boost-intrusive/portfile.cmake +++ b/ports/boost-intrusive/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-io/portfile.cmake b/ports/boost-io/portfile.cmake index fae7c9191..0991872ff 100644 --- a/ports/boost-io/portfile.cmake +++ b/ports/boost-io/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-iostreams/portfile.cmake b/ports/boost-iostreams/portfile.cmake index e49d4a579..782a7cb40 100644 --- a/ports/boost-iostreams/portfile.cmake +++ b/ports/boost-iostreams/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-iterator/portfile.cmake b/ports/boost-iterator/portfile.cmake index c20e9e29c..365938407 100644 --- a/ports/boost-iterator/portfile.cmake +++ b/ports/boost-iterator/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-lambda/portfile.cmake b/ports/boost-lambda/portfile.cmake index 315bf1ddf..bb9d68c6f 100644 --- a/ports/boost-lambda/portfile.cmake +++ b/ports/boost-lambda/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-lexical-cast/portfile.cmake b/ports/boost-lexical-cast/portfile.cmake index 5187ead72..b86e06415 100644 --- a/ports/boost-lexical-cast/portfile.cmake +++ b/ports/boost-lexical-cast/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-local-function/portfile.cmake b/ports/boost-local-function/portfile.cmake index 0c59a8db7..a4f378933 100644 --- a/ports/boost-local-function/portfile.cmake +++ b/ports/boost-local-function/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-locale/portfile.cmake b/ports/boost-locale/portfile.cmake index b8126dce5..9c1aa2ff4 100644 --- a/ports/boost-locale/portfile.cmake +++ b/ports/boost-locale/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -17,6 +16,7 @@ else() set(BOOST_LOCALE_ICU off) endif() +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -25,4 +25,5 @@ boost_modular_build( /boost/locale//boost_locale boost.locale.icu=${BOOST_LOCALE_ICU} ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-lockfree/portfile.cmake b/ports/boost-lockfree/portfile.cmake index 0f6cabeb8..989729d14 100644 --- a/ports/boost-lockfree/portfile.cmake +++ b/ports/boost-lockfree/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-log/portfile.cmake b/ports/boost-log/portfile.cmake index ecc8118d9..302fb786a 100644 --- a/ports/boost-log/portfile.cmake +++ b/ports/boost-log/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-logic/portfile.cmake b/ports/boost-logic/portfile.cmake index 66df8aca6..08a578ccd 100644 --- a/ports/boost-logic/portfile.cmake +++ b/ports/boost-logic/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-math/portfile.cmake b/ports/boost-math/portfile.cmake index f6e4eeccd..2ad0b28e2 100644 --- a/ports/boost-math/portfile.cmake +++ b/ports/boost-math/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-metaparse/portfile.cmake b/ports/boost-metaparse/portfile.cmake index 972f5bf52..22742179c 100644 --- a/ports/boost-metaparse/portfile.cmake +++ b/ports/boost-metaparse/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-move/portfile.cmake b/ports/boost-move/portfile.cmake index 29f3a3ff7..c340db6e3 100644 --- a/ports/boost-move/portfile.cmake +++ b/ports/boost-move/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-mp11/portfile.cmake b/ports/boost-mp11/portfile.cmake index 3e39072a8..a350e333e 100644 --- a/ports/boost-mp11/portfile.cmake +++ b/ports/boost-mp11/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-mpi/portfile.cmake b/ports/boost-mpi/portfile.cmake index 66c11c29a..0ac40b4a6 100644 --- a/ports/boost-mpi/portfile.cmake +++ b/ports/boost-mpi/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-mpl/portfile.cmake b/ports/boost-mpl/portfile.cmake index 908524fb2..44fc12d93 100644 --- a/ports/boost-mpl/portfile.cmake +++ b/ports/boost-mpl/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-msm/portfile.cmake b/ports/boost-msm/portfile.cmake index fec66d317..c16c3a962 100644 --- a/ports/boost-msm/portfile.cmake +++ b/ports/boost-msm/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-multi-array/portfile.cmake b/ports/boost-multi-array/portfile.cmake index 312c4bfdd..ead468c54 100644 --- a/ports/boost-multi-array/portfile.cmake +++ b/ports/boost-multi-array/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-multi-index/portfile.cmake b/ports/boost-multi-index/portfile.cmake index a2b157fa6..7b8f35aff 100644 --- a/ports/boost-multi-index/portfile.cmake +++ b/ports/boost-multi-index/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-multiprecision/portfile.cmake b/ports/boost-multiprecision/portfile.cmake index 9fe2f040a..43423e6c3 100644 --- a/ports/boost-multiprecision/portfile.cmake +++ b/ports/boost-multiprecision/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-numeric-conversion/portfile.cmake b/ports/boost-numeric-conversion/portfile.cmake index e90d9dba2..c525b2e1f 100644 --- a/ports/boost-numeric-conversion/portfile.cmake +++ b/ports/boost-numeric-conversion/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-odeint/portfile.cmake b/ports/boost-odeint/portfile.cmake index 6ded9f5b2..5309f3663 100644 --- a/ports/boost-odeint/portfile.cmake +++ b/ports/boost-odeint/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-optional/portfile.cmake b/ports/boost-optional/portfile.cmake index e3144433b..af2b6641c 100644 --- a/ports/boost-optional/portfile.cmake +++ b/ports/boost-optional/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-parameter/portfile.cmake b/ports/boost-parameter/portfile.cmake index a5d119c15..871f7198b 100644 --- a/ports/boost-parameter/portfile.cmake +++ b/ports/boost-parameter/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-phoenix/portfile.cmake b/ports/boost-phoenix/portfile.cmake index 42281eba4..74e290f1e 100644 --- a/ports/boost-phoenix/portfile.cmake +++ b/ports/boost-phoenix/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-poly-collection/portfile.cmake b/ports/boost-poly-collection/portfile.cmake index b0fbf602a..7edccef50 100644 --- a/ports/boost-poly-collection/portfile.cmake +++ b/ports/boost-poly-collection/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-polygon/portfile.cmake b/ports/boost-polygon/portfile.cmake index f9390d963..1244b3abb 100644 --- a/ports/boost-polygon/portfile.cmake +++ b/ports/boost-polygon/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-pool/portfile.cmake b/ports/boost-pool/portfile.cmake index 1f5b5dfc9..2b70b4c24 100644 --- a/ports/boost-pool/portfile.cmake +++ b/ports/boost-pool/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-predef/portfile.cmake b/ports/boost-predef/portfile.cmake index ff0e9a9f1..289bc4988 100644 --- a/ports/boost-predef/portfile.cmake +++ b/ports/boost-predef/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-preprocessor/portfile.cmake b/ports/boost-preprocessor/portfile.cmake index 4b85735b4..0a2a62ad4 100644 --- a/ports/boost-preprocessor/portfile.cmake +++ b/ports/boost-preprocessor/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-process/portfile.cmake b/ports/boost-process/portfile.cmake index 444196c4e..3b5fac7cf 100644 --- a/ports/boost-process/portfile.cmake +++ b/ports/boost-process/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-program-options/portfile.cmake b/ports/boost-program-options/portfile.cmake index 61740c6cb..2eb6086f1 100644 --- a/ports/boost-program-options/portfile.cmake +++ b/ports/boost-program-options/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-property-map/portfile.cmake b/ports/boost-property-map/portfile.cmake index b5855bd8b..6f6739aa9 100644 --- a/ports/boost-property-map/portfile.cmake +++ b/ports/boost-property-map/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-property-tree/portfile.cmake b/ports/boost-property-tree/portfile.cmake index fd98c349b..8632df529 100644 --- a/ports/boost-property-tree/portfile.cmake +++ b/ports/boost-property-tree/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-proto/portfile.cmake b/ports/boost-proto/portfile.cmake index 50051cec1..c6ba949a2 100644 --- a/ports/boost-proto/portfile.cmake +++ b/ports/boost-proto/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-ptr-container/portfile.cmake b/ports/boost-ptr-container/portfile.cmake index 34a7e4cb4..8191f2c41 100644 --- a/ports/boost-ptr-container/portfile.cmake +++ b/ports/boost-ptr-container/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-python/portfile.cmake b/ports/boost-python/portfile.cmake index 395227990..db55b3e7b 100644 --- a/ports/boost-python/portfile.cmake +++ b/ports/boost-python/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -16,5 +15,7 @@ file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION "${PYTHON_INCLUDE_PATH}") +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-qvm/portfile.cmake b/ports/boost-qvm/portfile.cmake index 1ef911b15..b16d419d5 100644 --- a/ports/boost-qvm/portfile.cmake +++ b/ports/boost-qvm/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-random/portfile.cmake b/ports/boost-random/portfile.cmake index f95153971..ec99fec55 100644 --- a/ports/boost-random/portfile.cmake +++ b/ports/boost-random/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-range/portfile.cmake b/ports/boost-range/portfile.cmake index 8769e1cdd..7b676d431 100644 --- a/ports/boost-range/portfile.cmake +++ b/ports/boost-range/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-ratio/portfile.cmake b/ports/boost-ratio/portfile.cmake index cb781cc5e..a39d80204 100644 --- a/ports/boost-ratio/portfile.cmake +++ b/ports/boost-ratio/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-rational/portfile.cmake b/ports/boost-rational/portfile.cmake index c0ad27744..437d650fa 100644 --- a/ports/boost-rational/portfile.cmake +++ b/ports/boost-rational/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-regex/portfile.cmake b/ports/boost-regex/portfile.cmake index 2246e3df4..58cd529cd 100644 --- a/ports/boost-regex/portfile.cmake +++ b/ports/boost-regex/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -17,5 +16,7 @@ else() set(REQUIREMENTS) endif() +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH} REQUIREMENTS "${REQUIREMENTS}") +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-scope-exit/portfile.cmake b/ports/boost-scope-exit/portfile.cmake index 60358a992..1c31b1002 100644 --- a/ports/boost-scope-exit/portfile.cmake +++ b/ports/boost-scope-exit/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-serialization/portfile.cmake b/ports/boost-serialization/portfile.cmake index 59276cfd3..2349283f2 100644 --- a/ports/boost-serialization/portfile.cmake +++ b/ports/boost-serialization/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-signals/portfile.cmake b/ports/boost-signals/portfile.cmake index 03895d120..a2453b0b5 100644 --- a/ports/boost-signals/portfile.cmake +++ b/ports/boost-signals/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-signals2/portfile.cmake b/ports/boost-signals2/portfile.cmake index 9e83e65c4..992a410c9 100644 --- a/ports/boost-signals2/portfile.cmake +++ b/ports/boost-signals2/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-smart-ptr/portfile.cmake b/ports/boost-smart-ptr/portfile.cmake index 5dbfc1473..de74fd25d 100644 --- a/ports/boost-smart-ptr/portfile.cmake +++ b/ports/boost-smart-ptr/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-sort/portfile.cmake b/ports/boost-sort/portfile.cmake index 9a13503f8..e5e63b33d 100644 --- a/ports/boost-sort/portfile.cmake +++ b/ports/boost-sort/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-spirit/portfile.cmake b/ports/boost-spirit/portfile.cmake index e9b239d69..0a5ebf5aa 100644 --- a/ports/boost-spirit/portfile.cmake +++ b/ports/boost-spirit/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-stacktrace/portfile.cmake b/ports/boost-stacktrace/portfile.cmake index 8f8c3afa1..34c6e6d31 100644 --- a/ports/boost-stacktrace/portfile.cmake +++ b/ports/boost-stacktrace/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-statechart/portfile.cmake b/ports/boost-statechart/portfile.cmake index 8b8e2da99..61680bd2b 100644 --- a/ports/boost-statechart/portfile.cmake +++ b/ports/boost-statechart/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-static-assert/portfile.cmake b/ports/boost-static-assert/portfile.cmake index 7768973dd..2598280af 100644 --- a/ports/boost-static-assert/portfile.cmake +++ b/ports/boost-static-assert/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-system/portfile.cmake b/ports/boost-system/portfile.cmake index c5ca8d0cc..bc35d0d93 100644 --- a/ports/boost-system/portfile.cmake +++ b/ports/boost-system/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-test/portfile.cmake b/ports/boost-test/portfile.cmake index 090542bc7..57d6b99d0 100644 --- a/ports/boost-test/portfile.cmake +++ b/ports/boost-test/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,7 +10,9 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) diff --git a/ports/boost-thread/portfile.cmake b/ports/boost-thread/portfile.cmake index 307ae58b4..e1f0a0c2f 100644 --- a/ports/boost-thread/portfile.cmake +++ b/ports/boost-thread/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH} REQUIREMENTS "/boost/date_time//boost_date_time") +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-throw-exception/portfile.cmake b/ports/boost-throw-exception/portfile.cmake index bdf47bac7..c4e87087e 100644 --- a/ports/boost-throw-exception/portfile.cmake +++ b/ports/boost-throw-exception/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-timer/portfile.cmake b/ports/boost-timer/portfile.cmake index 28210aabe..072b701a7 100644 --- a/ports/boost-timer/portfile.cmake +++ b/ports/boost-timer/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-tokenizer/portfile.cmake b/ports/boost-tokenizer/portfile.cmake index 74834110b..4f4c066bf 100644 --- a/ports/boost-tokenizer/portfile.cmake +++ b/ports/boost-tokenizer/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-tti/portfile.cmake b/ports/boost-tti/portfile.cmake index 2151427be..d263b7540 100644 --- a/ports/boost-tti/portfile.cmake +++ b/ports/boost-tti/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-tuple/portfile.cmake b/ports/boost-tuple/portfile.cmake index a020d5d1b..2c4cfe5be 100644 --- a/ports/boost-tuple/portfile.cmake +++ b/ports/boost-tuple/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-type-erasure/portfile.cmake b/ports/boost-type-erasure/portfile.cmake index 7363cfd8e..95c28afc6 100644 --- a/ports/boost-type-erasure/portfile.cmake +++ b/ports/boost-type-erasure/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-type-index/portfile.cmake b/ports/boost-type-index/portfile.cmake index 5f5f7dc7d..ae292b7e5 100644 --- a/ports/boost-type-index/portfile.cmake +++ b/ports/boost-type-index/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-type-traits/portfile.cmake b/ports/boost-type-traits/portfile.cmake index 3dbd82382..5a7fb6a79 100644 --- a/ports/boost-type-traits/portfile.cmake +++ b/ports/boost-type-traits/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-typeof/portfile.cmake b/ports/boost-typeof/portfile.cmake index 177e6d860..644b8e121 100644 --- a/ports/boost-typeof/portfile.cmake +++ b/ports/boost-typeof/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-ublas/portfile.cmake b/ports/boost-ublas/portfile.cmake index 173236e87..385810a3b 100644 --- a/ports/boost-ublas/portfile.cmake +++ b/ports/boost-ublas/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-units/portfile.cmake b/ports/boost-units/portfile.cmake index 87dd4906d..1180ec01b 100644 --- a/ports/boost-units/portfile.cmake +++ b/ports/boost-units/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-unordered/portfile.cmake b/ports/boost-unordered/portfile.cmake index abd0a3c3e..f90c8094f 100644 --- a/ports/boost-unordered/portfile.cmake +++ b/ports/boost-unordered/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-utility/portfile.cmake b/ports/boost-utility/portfile.cmake index 5cf3ceeed..42c9d1fc7 100644 --- a/ports/boost-utility/portfile.cmake +++ b/ports/boost-utility/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-uuid/portfile.cmake b/ports/boost-uuid/portfile.cmake index c6f2950a6..35b9c4c17 100644 --- a/ports/boost-uuid/portfile.cmake +++ b/ports/boost-uuid/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-variant/portfile.cmake b/ports/boost-variant/portfile.cmake index 9ec22e174..8e32a822d 100644 --- a/ports/boost-variant/portfile.cmake +++ b/ports/boost-variant/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-vcpkg-helpers/CONTROL b/ports/boost-vcpkg-helpers/CONTROL index 3e29eb9f8..42e02b3aa 100644 --- a/ports/boost-vcpkg-helpers/CONTROL +++ b/ports/boost-vcpkg-helpers/CONTROL @@ -1,3 +1,3 @@ Source: boost-vcpkg-helpers -Version: 3 +Version: 4 Description: a set of vcpkg-internal scripts used to modularize boost diff --git a/ports/boost-vcpkg-helpers/Jamroot.jam b/ports/boost-vcpkg-helpers/Jamroot.jam deleted file mode 100644 index 2762c99ea..000000000 --- a/ports/boost-vcpkg-helpers/Jamroot.jam +++ /dev/null @@ -1,141 +0,0 @@ -constant BOOST_VERSION : 1.66.0 ; -constant BOOST_VERSION_ABI_TAG : 1_66 ; -constant BOOST_JAMROOT_MODULE : $(__name__) ; - -import boostcpp ; -import feature ; - -boostcpp.set-version $(BOOST_VERSION) ; - -project boost : requirements - include&&@CURRENT_INSTALLED_DIR@/include - BOOST_ALL_NO_LIB=1 - @$(__name__).tag - @REQUIREMENTS@ - ; - -rule boost-install ( libraries * ) -{ - stagedir = [ option.get stagedir ] ; - install stage - : $(libraries) - : $(stagedir)/lib ; -} - -rule tag ( name : type ? : property-set ) -{ - return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ; -} - -rule python-tag ( name : type ? : property-set ) -{ - return [ tag $(name) : $(type) : $(property-set) ] ; -} - -if "@PORT@" != "boost-system" -{ - use-project /boost/system : . ; - - lib boost_system : : @CURRENT_INSTALLED_DIR@/lib/boost_system-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_system : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_system-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; - explicit boost_system ; -} - -if "@PORT@" != "boost-chrono" -{ - use-project /boost/chrono : . ; - - lib boost_chrono : : @CURRENT_INSTALLED_DIR@/lib/boost_chrono-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_chrono : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_chrono-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; - explicit boost_chrono ; -} - -if "@PORT@" != "boost-regex" -{ - use-project /boost/regex : . ; - - lib boost_regex : : @CURRENT_INSTALLED_DIR@/lib/boost_regex-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_regex : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_regex-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; - explicit boost_regex ; -} - -if "@PORT@" != "boost-date-time" -{ - use-project /boost/date_time : . ; - - lib boost_date_time : : @CURRENT_INSTALLED_DIR@/lib/boost_date_time-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release -/boost/date_time//boost_date_time ; - lib boost_date_time : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_date_time-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug -/boost/date_time//boost_date_time ; - explicit boost_date_time ; -} - -if "@PORT@" != "boost-thread" -{ - use-project /boost/thread : . ; - - lib boost_thread : : @CURRENT_INSTALLED_DIR@/lib/boost_thread-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release : : /boost/date_time//boost_date_time ; - lib boost_thread : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_thread-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug : : /boost/date_time//boost_date_time ; - explicit boost_thread ; -} - -if "@PORT@" != "boost-timer" -{ - use-project /boost/timer : . ; - - lib boost_timer : : @CURRENT_INSTALLED_DIR@/lib/boost_timer-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_timer : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_timer-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; - explicit boost_timer ; -} - -if "@PORT@" != "boost-filesystem" -{ - use-project /boost/filesystem : . ; - - lib boost_filesystem : : @CURRENT_INSTALLED_DIR@/lib/boost_filesystem-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release : : /boost/system//boost_system ; - lib boost_filesystem : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_filesystem-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug : : /boost/system//boost_system ; - explicit boost_filesystem ; -} - -if "@PORT@" != "boost-atomic" -{ - use-project /boost/atomic : . ; - - lib boost_atomic : : @CURRENT_INSTALLED_DIR@/lib/boost_atomic-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_atomic : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_atomic-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; - explicit boost_atomic ; -} - -if "@PORT@" != "boost-context" -{ - feature.feature segmented-stacks : on : optional propagated composite ; - feature.compose on : BOOST_USE_SEGMENTED_STACKS ; - - use-project /boost/context : . ; - - lib boost_context : : @CURRENT_INSTALLED_DIR@/lib/boost_context-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_context : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_context-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; - explicit boost_context ; -} - -if "@PORT@" != "boost-test" -{ - use-project /boost/test : . ; - - lib boost_unit_test_framework : : @CURRENT_INSTALLED_DIR@/lib/boost_unit_test_framework-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_unit_test_framework : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_unit_test_framework-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; - explicit boost_unit_test_framework ; -} - -rule requires ( foo * ) -{ -} - -rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * ) -{ - name = boost_$(name) ; - lib $(name) : $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ; - boost-install $(name) ; -} - -use-project /boost/@PORT@ : build ; - -build-project build ; diff --git a/ports/boost-vcpkg-helpers/boost-modular-headers.cmake b/ports/boost-vcpkg-helpers/boost-modular-headers.cmake new file mode 100644 index 000000000..1a4b8574b --- /dev/null +++ b/ports/boost-vcpkg-helpers/boost-modular-headers.cmake @@ -0,0 +1,24 @@ +function(boost_modular_headers) + cmake_parse_arguments(_bm "" "SOURCE_PATH" "" ${ARGN}) + + if(NOT DEFINED _bm_SOURCE_PATH) + message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_headers.") + endif() + + message(STATUS "Packaging headers") + + file( + COPY ${_bm_SOURCE_PATH}/include/boost + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) + + message(STATUS "Packaging headers done") + + vcpkg_download_distfile(ARCHIVE + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.65.1/LICENSE_1_0.txt" + FILENAME "boost_LICENSE_1_0.txt" + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 + ) + + file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endfunction() diff --git a/ports/boost-vcpkg-helpers/boost-modular.cmake b/ports/boost-vcpkg-helpers/boost-modular.cmake deleted file mode 100644 index 8e3ca378b..000000000 --- a/ports/boost-vcpkg-helpers/boost-modular.cmake +++ /dev/null @@ -1,281 +0,0 @@ - -function(boost_modular_build) - cmake_parse_arguments(_bm "" "SOURCE_PATH;REQUIREMENTS" "OPTIONS" ${ARGN}) - - if(NOT DEFINED _bm_SOURCE_PATH) - message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_build.") - endif() - - # Todo: this serves too similar a purpose as vcpkg_find_acquire_program() - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/tools/boost-build") - else() - get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE) - endif() - - if(NOT EXISTS "${BOOST_BUILD_PATH}") - message(FATAL_ERROR "The x86 boost-build tools must be installed to build for non-x86/x64 platforms. Please run `vcpkg install boost-build:x86-windows`.") - endif() - - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - list(APPEND _bm_OPTIONS windows-api=store) - endif() - - set(_bm_DIR ${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers) - - if(EXISTS "${_bm_SOURCE_PATH}/Jamfile.v2") - file(REMOVE_RECURSE "${_bm_SOURCE_PATH}/Jamfile.v2") - endif() - - set(REQUIREMENTS ${_bm_REQUIREMENTS}) - - configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) - - # boost thread superfluously builds has_atomic_flag_lockfree on windows. - if(EXISTS "${_bm_SOURCE_PATH}/build/Jamfile.v2") - file(READ ${_bm_SOURCE_PATH}/build/Jamfile.v2 _contents) - string(REPLACE - "\n\nexe has_atomic_flag_lockfree" - "\n\nexplicit has_atomic_flag_lockfree ;\nexe has_atomic_flag_lockfree" - _contents - "${_contents}" - ) - string(REPLACE "\nimport ../../config/checks/config : requires ;" "\n# import ../../config/checks/config : requires ;" _contents "${_contents}") - string(REGEX REPLACE - "\.\./\.\./([^/ ]+)/build//(boost_[^/ ]+)" - "/boost/\\1//\\2" - _contents - "${_contents}" - ) - string(REGEX REPLACE " /boost//([^/ ]+)" " /boost/\\1//boost_\\1" _contents "${_contents}") - file(WRITE ${_bm_SOURCE_PATH}/build/Jamfile.v2 "${_contents}") - endif() - - if(EXISTS "${_bm_SOURCE_PATH}/build/log-architecture.jam") - file(READ ${_bm_SOURCE_PATH}/build/log-architecture.jam _contents) - string(REPLACE - "\nproject.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" - "\n# project.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" - _contents "${_contents}") - file(WRITE ${_bm_SOURCE_PATH}/build/log-architecture.jam "${_contents}") - endif() - - ##################### - # Cleanup previous builds - ###################### - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - # It is possible for a file in this folder to be locked due to antivirus or vctip - execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\n Files are likely in use.") - endif() - endif() - - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - # It is possible for a file in this folder to be locked due to antivirus or vctip - execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg\n Files are likely in use.") - endif() - endif() - - if(EXISTS ${CURRENT_PACKAGES_DIR}/debug) - message(FATAL_ERROR "Error: directory exists: ${CURRENT_PACKAGES_DIR}/debug\n The previous package was not fully cleared. This is an internal error.") - endif() - file(MAKE_DIRECTORY - ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - ) - - ###################### - # Generate configuration - ###################### - list(APPEND _bm_OPTIONS - -j$ENV{NUMBER_OF_PROCESSORS} - --debug-configuration - --debug-building - --debug-generators - --disable-icu - --ignore-site-config - --hash - -q - - threadapi=win32 - threading=multi - ) - - # Add build type specific options - if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") - list(APPEND _bm_OPTIONS runtime-link=shared) - else() - list(APPEND _bm_OPTIONS runtime-link=static) - endif() - - if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - list(APPEND _bm_OPTIONS link=shared) - else() - list(APPEND _bm_OPTIONS link=static) - endif() - - if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64") - list(APPEND _bm_OPTIONS address-model=64 architecture=x86) - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - list(APPEND _bm_OPTIONS address-model=32 architecture=arm) - else() - list(APPEND _bm_OPTIONS address-model=32 architecture=x86) - endif() - - file(TO_CMAKE_PATH "${_bm_DIR}/nothing.bat" NOTHING_BAT) - set(TOOLSET_OPTIONS " /EHsc -Zm800 -nologo") - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - find_path(PATH_TO_CL cl.exe) - find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "${PATH_TO_CL}/../../../lib/x86/store/references" NO_DEFAULT_PATH) - if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") - message(FATAL_ERROR "Could not find `platform.winmd` in VS2017. Do you have the Universal Windows Platform development workload installed?") - endif() - else() - find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "$ENV{VS140COMNTOOLS}/../../VC/LIB/store/references") - if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") - message(FATAL_ERROR "Could not find `platform.winmd` in VS2015.") - endif() - endif() - file(TO_NATIVE_PATH "${PLATFORM_WINMD_DIR}" PLATFORM_WINMD_DIR) - string(REPLACE "\\" "\\\\" PLATFORM_WINMD_DIR ${PLATFORM_WINMD_DIR}) # escape backslashes - - set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -Zl \"/AI\"${PLATFORM_WINMD_DIR}\"\" WindowsApp.lib /ZW -DVirtualAlloc=VirtualAllocFromApp -D_WIN32_WINNT=0x0A00") - else() - set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -D_WIN32_WINNT=0x0602") - endif() - - configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) - configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) - - if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - list(APPEND _bm_OPTIONS toolset=msvc-14.1) - elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") - list(APPEND _bm_OPTIONS toolset=msvc-14.0) - else() - message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'") - endif() - - ###################### - # Perform build + Package - ###################### - set(B2_EXE "${BOOST_BUILD_PATH}/b2.exe") - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Building ${TARGET_TRIPLET}-rel") - set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") - vcpkg_execute_required_process( - COMMAND "${B2_EXE}" - --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage - --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam - ${_bm_OPTIONS} - variant=release - debug-symbols=on - WORKING_DIRECTORY ${_bm_SOURCE_PATH} - LOGNAME build-${TARGET_TRIPLET}-rel - ) - message(STATUS "Building ${TARGET_TRIPLET}-rel done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") - vcpkg_execute_required_process( - COMMAND "${B2_EXE}" - --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage - --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam - ${_bm_OPTIONS} - variant=debug - WORKING_DIRECTORY ${_bm_SOURCE_PATH} - LOGNAME build-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Building ${TARGET_TRIPLET}-dbg done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Packaging ${TARGET_TRIPLET}-rel") - file(GLOB REL_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.lib) - file(COPY ${REL_LIBS} - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - FILES_MATCHING PATTERN "*.lib") - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.dll) - file(COPY ${REL_DLLS} - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - FILES_MATCHING PATTERN "*.dll") - endif() - message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") - file(GLOB DBG_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.lib) - file(COPY ${DBG_LIBS} - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - FILES_MATCHING PATTERN "*.lib") - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.dll) - file(COPY ${DBG_DLLS} - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - FILES_MATCHING PATTERN "*.dll") - endif() - message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") - endif() - - file(GLOB INSTALLED_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*.lib ${CURRENT_PACKAGES_DIR}/lib/*.lib) - foreach(LIB ${INSTALLED_LIBS}) - get_filename_component(OLD_FILENAME ${LIB} NAME) - get_filename_component(DIRECTORY_OF_LIB_FILE ${LIB} DIRECTORY) - string(REPLACE "libboost_" "boost_" NEW_FILENAME ${OLD_FILENAME}) - string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs - string(REPLACE "-vc141-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2017 and VS2015 binaries - string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs - string(REPLACE "-sgyd-" "-gyd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs - string(REPLACE "-x32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries - string(REPLACE "-x64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries - string(REPLACE "-a32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries - string(REPLACE "-a64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries - string(REPLACE "_python3-" "_python-" NEW_FILENAME ${NEW_FILENAME}) - if ("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}") - # nothing to do - elseif (EXISTS ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) - file(REMOVE ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}) - else() - file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) - endif() - endforeach() -endfunction() - -function(boost_modular_headers) - cmake_parse_arguments(_bm "" "SOURCE_PATH" "" ${ARGN}) - - if(NOT DEFINED _bm_SOURCE_PATH) - message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_headers.") - endif() - - message(STATUS "Packaging headers") - - file( - COPY ${_bm_SOURCE_PATH}/include/boost - DESTINATION ${CURRENT_PACKAGES_DIR}/include - ) - - message(STATUS "Packaging headers done") - - vcpkg_download_distfile(ARCHIVE - URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.65.1/LICENSE_1_0.txt" - FILENAME "boost_LICENSE_1_0.txt" - SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 - ) - - file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -endfunction() diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index 09dcbca72..62cfe5cc2 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -22,7 +22,7 @@ function Generate() $sanitizedName = $name -replace "_","-" $versionsuffix = "" - if ($Name -eq "test") + if ($Name -eq "test" -or $Name -eq "python") { $versionsuffix = "-1" } @@ -59,7 +59,6 @@ function Generate() "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" "" "include(vcpkg_common_functions)" - "include(`${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake)" "" "vcpkg_from_github(" " OUT_SOURCE_PATH SOURCE_PATH" @@ -93,6 +92,7 @@ function Generate() " set(BOOST_LOCALE_ICU off)" "endif()" "" + "include(`${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)" "boost_modular_build(" " SOURCE_PATH `${SOURCE_PATH}" " OPTIONS" @@ -112,23 +112,29 @@ function Generate() " set(REQUIREMENTS)" "endif()" "" + "include(`${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)" "boost_modular_build(SOURCE_PATH `${SOURCE_PATH} REQUIREMENTS `"`${REQUIREMENTS}`")" ) } elseif ($Name -eq "thread") { $portfileLines += @( + "include(`${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)" "boost_modular_build(SOURCE_PATH `${SOURCE_PATH} REQUIREMENTS `"/boost/date_time//boost_date_time`")" ) } else { $portfileLines += @( + "include(`${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)" "boost_modular_build(SOURCE_PATH `${SOURCE_PATH})" ) } } - $portfileLines += @("boost_modular_headers(SOURCE_PATH `${SOURCE_PATH})") + $portfileLines += @( + "include(`${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)" + "boost_modular_headers(SOURCE_PATH `${SOURCE_PATH})" + ) if ($Name -eq "exception") { diff --git a/ports/boost-vcpkg-helpers/nothing.bat b/ports/boost-vcpkg-helpers/nothing.bat deleted file mode 100644 index e69de29bb..000000000 diff --git a/ports/boost-vcpkg-helpers/portfile.cmake b/ports/boost-vcpkg-helpers/portfile.cmake index 3d31bd327..32f501f24 100644 --- a/ports/boost-vcpkg-helpers/portfile.cmake +++ b/ports/boost-vcpkg-helpers/portfile.cmake @@ -1,10 +1,6 @@ file( - COPY - ${CMAKE_CURRENT_LIST_DIR}/boost-modular.cmake - ${CMAKE_CURRENT_LIST_DIR}/Jamroot.jam - ${CMAKE_CURRENT_LIST_DIR}/nothing.bat - ${CMAKE_CURRENT_LIST_DIR}/user-config.jam + COPY ${CMAKE_CURRENT_LIST_DIR}/boost-modular-headers.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-vcpkg-helpers ) diff --git a/ports/boost-vcpkg-helpers/user-config.jam b/ports/boost-vcpkg-helpers/user-config.jam deleted file mode 100644 index c970f07a5..000000000 --- a/ports/boost-vcpkg-helpers/user-config.jam +++ /dev/null @@ -1,25 +0,0 @@ -import toolset ; - -using msvc : : cl.exe : -@NOTHING_BAT@ -@TOOLSET_OPTIONS@ -; - -if "@PORT@" = "boost-python" -{ - using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_RELEASE@ ; - using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_DEBUG@ : on ; -} - -project user-config : ; - -lib advapi32 ; - -lib icuuc : : @CURRENT_INSTALLED_DIR@/lib/icuuc.lib release : : advapi32 ; -lib icuuc : : @CURRENT_INSTALLED_DIR@/debug/lib/icuucd.lib debug : : advapi32 ; - -lib icuin : : @CURRENT_INSTALLED_DIR@/lib/icuin.lib release : : ; -lib icuin : : @CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib debug : : ; - -lib icudt : : @CURRENT_INSTALLED_DIR@/lib/icudt.lib release : : ; -lib icudt : : @CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib debug : : ; diff --git a/ports/boost-vmd/portfile.cmake b/ports/boost-vmd/portfile.cmake index 389ba79fd..eab18ada3 100644 --- a/ports/boost-vmd/portfile.cmake +++ b/ports/boost-vmd/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-wave/portfile.cmake b/ports/boost-wave/portfile.cmake index a9c3ea232..e335f6ba4 100644 --- a/ports/boost-wave/portfile.cmake +++ b/ports/boost-wave/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,5 +10,7 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-winapi/portfile.cmake b/ports/boost-winapi/portfile.cmake index eb0b91b8f..d788dea86 100644 --- a/ports/boost-winapi/portfile.cmake +++ b/ports/boost-winapi/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-xpressive/portfile.cmake b/ports/boost-xpressive/portfile.cmake index 3848d814c..2eacea441 100644 --- a/ports/boost-xpressive/portfile.cmake +++ b/ports/boost-xpressive/portfile.cmake @@ -1,7 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 include(vcpkg_common_functions) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular.cmake) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -11,4 +10,5 @@ vcpkg_from_github( HEAD_REF master ) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) -- cgit v1.2.3 From 9fe10062003053ce8e4033440e3fba206bffbeaa Mon Sep 17 00:00:00 2001 From: David Benson Date: Tue, 16 Jan 2018 14:26:13 -0700 Subject: Restore support for zlib and gzip in iostreams --- ports/boost-build/boost-modular-build.cmake | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ports/boost-build/boost-modular-build.cmake b/ports/boost-build/boost-modular-build.cmake index e9062e7e3..f0d43f1b3 100644 --- a/ports/boost-build/boost-modular-build.cmake +++ b/ports/boost-build/boost-modular-build.cmake @@ -102,10 +102,25 @@ function(boost_modular_build) --ignore-site-config --hash -q - + -sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}\\include" + -sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}\\include" threadapi=win32 threading=multi ) + set(_bm_OPTIONS_DBG + -sZLIB_BINARY=zlibd + -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" + -sBZIP2_BINARY=bz2d + -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" + ) + + set(_bm_OPTIONS_REL + -sZLIB_BINARY=zlib + -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" + -sBZIP2_BINARY=bz2 + -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" + ) + # Add build type specific options if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") @@ -176,6 +191,7 @@ function(boost_modular_build) --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam ${_bm_OPTIONS} + ${_bm_OPTIONS_REL} variant=release debug-symbols=on WORKING_DIRECTORY ${_bm_SOURCE_PATH} @@ -193,6 +209,7 @@ function(boost_modular_build) --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam ${_bm_OPTIONS} + ${_bm_OPTIONS_DBG} variant=debug WORKING_DIRECTORY ${_bm_SOURCE_PATH} LOGNAME build-${TARGET_TRIPLET}-dbg -- cgit v1.2.3 From 1e95a2cd8a47a40284fed7bb4547a8bf639a237f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 17 Jan 2018 23:20:31 -0800 Subject: [boost-build] Bump version to include ZLIB/BZIP2 --- ports/boost-build/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/boost-build/CONTROL b/ports/boost-build/CONTROL index 79aab946b..12af51a0f 100644 --- a/ports/boost-build/CONTROL +++ b/ports/boost-build/CONTROL @@ -1,3 +1,3 @@ Source: boost-build -Version: 1.66.0-1 +Version: 1.66.0-2 Description: Boost.Build -- cgit v1.2.3 From bbc24d2212ad8ea64ee656cf5efbc32f96cd4f42 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 18 Jan 2018 00:36:23 -0800 Subject: [catch2] Fix hashes and CONTROL --- ports/catch2/CONTROL | 5 ++--- ports/catch2/portfile.cmake | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL index 31e4d87fa..6eeb40c21 100644 --- a/ports/catch2/CONTROL +++ b/ports/catch2/CONTROL @@ -1,5 +1,4 @@ Source: catch2 Version: 2.1.0 -Description: A modern, header-only test framework for unit testing - -Issues, PRs and changelogs can be found at https://github.com/catchorg/Catch2 +Description: A modern, header-only test framework for unit testing. + Issues, PRs and changelogs can be found at https://github.com/catchorg/Catch2 diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake index 87e2482e3..635bc385a 100644 --- a/ports/catch2/portfile.cmake +++ b/ports/catch2/portfile.cmake @@ -4,15 +4,15 @@ set(CATCH_VERSION v2.1.0) vcpkg_download_distfile(HEADER URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" - FILENAME "catch-${CATCH_VERSION}.hpp" - SHA512 6c2b9d4337369362b9079ac4eb53481e2db2a235af6ed0fa9d178775336a5c2d6aba1f86967f53de736aa198ae9d1acadd15a8c3ae2348c7dec0450e6452c716 + FILENAME "catchorg-catch2-${CATCH_VERSION}.hpp" + SHA512 967a9b4046ec2c72f094bebae381b5090e88358faefde9bdbca3d7e058c299c1bed0542653de79c857f78139d7969b0815bb8b8a60ff13e2144fcb7af2a2020c ) vcpkg_download_distfile(LICENSE URLS "https://raw.githubusercontent.com/catchorg/Catch2/${CATCH_VERSION}/LICENSE.txt" - FILENAME "catch-LICENSE-${CATCH_VERSION}.txt" - SHA512 f1a8d21ccbb6436d289ecfae65b9019278e40552a2383aaf6c1dfed98affe6e7bbf364d67597a131642b62446a0c40495e66a7efca7e6dff72727c6fd3776407 + FILENAME "catchorg-catch2-LICENSE-${CATCH_VERSION}.txt" + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 ) file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME catch.hpp) -file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch RENAME copyright) +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch2 RENAME copyright) -- cgit v1.2.3 From 14650ddfb8d31a0e075b4684e8c1ebc9976319bc Mon Sep 17 00:00:00 2001 From: Jonathan Hale Date: Thu, 18 Jan 2018 10:09:53 +0100 Subject: [vkpkg] Fix edit command not considering EDITOR environment variable (#2597) * [vkpkg] Fix edit command not considering EDITOR environment variable Signed-off-by: Squareys * [vcpkg-edit] Reformat and improve code consistency --- toolsrc/src/vcpkg/commands.edit.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index 3e5d08956..41f261a53 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -68,8 +68,11 @@ namespace vcpkg::Commands::Edit Checks::check_exit(VCPKG_LINE_INFO, fs.is_directory(portpath), R"(Could not find port named "%s")", port_name); std::vector candidate_paths; - const std::vector from_path = Files::find_from_PATH("EDITOR"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + auto maybe_editor_path = System::get_environment_variable("EDITOR"); + if (auto editor_path = maybe_editor_path.get()) + { + candidate_paths.emplace_back(*editor_path); + } candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE_INSIDERS); candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE_INSIDERS); candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE); @@ -81,8 +84,9 @@ namespace vcpkg::Commands::Edit auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { return fs.exists(p); }); if (it == candidate_paths.cend()) { - System::println(System::Color::error, - "Error: Visual Studio Code was not found and the environment variable EDITOR is not set."); + System::println( + System::Color::error, + "Error: Visual Studio Code was not found and the environment variable EDITOR is not set or invalid."); System::println("The following paths were examined:"); Files::print_paths(candidate_paths); System::println("You can also set the environmental variable EDITOR to your editor of choice."); -- cgit v1.2.3 From c1ba4eacc34a814ce2f9f0b35bf055750c94f8c2 Mon Sep 17 00:00:00 2001 From: Sean Warren Date: Thu, 18 Jan 2018 20:28:56 +1100 Subject: Generalise vcpkg_fixup_cmake_targets.cmake file to correctly detect dlib debug files (#2574) --- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index fead64d15..4bd4d135f 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -91,11 +91,8 @@ function(vcpkg_fixup_cmake_targets) file(REMOVE ${UNUSED_FILES}) endif() - # LLVM uses "LLVMExports-release.cmake" file(GLOB RELEASE_TARGETS - "${RELEASE_SHARE}/*[Tt]argets-release.cmake" - "${RELEASE_SHARE}/*[Cc]onfig-release.cmake" - "${RELEASE_SHARE}/*[Ee]xports-release.cmake" + "${RELEASE_SHARE}/*-release.cmake" ) foreach(RELEASE_TARGET ${RELEASE_TARGETS}) file(READ ${RELEASE_TARGET} _contents) @@ -106,9 +103,7 @@ function(vcpkg_fixup_cmake_targets) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") file(GLOB DEBUG_TARGETS - "${DEBUG_SHARE}/*[Tt]argets-debug.cmake" - "${DEBUG_SHARE}/*[Cc]onfig-debug.cmake" - "${DEBUG_SHARE}/*[Ee]xports-debug.cmake" + "${DEBUG_SHARE}/*-debug.cmake" ) foreach(DEBUG_TARGET ${DEBUG_TARGETS}) get_filename_component(DEBUG_TARGET_NAME ${DEBUG_TARGET} NAME) -- cgit v1.2.3 From 129971d2287937ffb0d4e08c148f01f777696a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 12 Jan 2018 10:49:41 +0100 Subject: v1.10.0 --- ports/catch-classic/CONTROL | 5 +++++ ports/catch-classic/portfile.cmake | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 ports/catch-classic/CONTROL create mode 100644 ports/catch-classic/portfile.cmake diff --git a/ports/catch-classic/CONTROL b/ports/catch-classic/CONTROL new file mode 100644 index 000000000..e4cd614fb --- /dev/null +++ b/ports/catch-classic/CONTROL @@ -0,0 +1,5 @@ +Source: catch-classic +Version: 1.10.0 +Description: A modern, header-only test framework for unit tests + This is specifically the legacy 1.x branch provided for compatibility + with older compilers. diff --git a/ports/catch-classic/portfile.cmake b/ports/catch-classic/portfile.cmake new file mode 100644 index 000000000..e09b7c995 --- /dev/null +++ b/ports/catch-classic/portfile.cmake @@ -0,0 +1,18 @@ +include(vcpkg_common_functions) + +set(CATCH_VERSION v1.10.0) + +vcpkg_download_distfile(HEADER + URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" + FILENAME "catch-classic-${CATCH_VERSION}.hpp" + SHA512 275ab5b5d778cc8a91b5f3e8f241a37b680c81d1b8945ff64ad16a9708c98e6535b389746bf8cacbed07f874629f456b56bafbf1879c5a6f84fa87675c1361b6 +) + +vcpkg_download_distfile(LICENSE + URLS "https://raw.githubusercontent.com/catchorg/Catch2/${CATCH_VERSION}/LICENSE.txt" + FILENAME "catch-classic-LICENSE-${CATCH_VERSION}.txt" + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 +) + +file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME catch.hpp) +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch-classic RENAME copyright) -- cgit v1.2.3 From 508edef95a98560c9f9a9b511fb3d094e06f7df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 12 Jan 2018 10:51:26 +0100 Subject: Update Catch to 1.11.0 --- ports/catch-classic/CONTROL | 2 +- ports/catch-classic/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/catch-classic/CONTROL b/ports/catch-classic/CONTROL index e4cd614fb..7b19cead5 100644 --- a/ports/catch-classic/CONTROL +++ b/ports/catch-classic/CONTROL @@ -1,5 +1,5 @@ Source: catch-classic -Version: 1.10.0 +Version: 1.11.0 Description: A modern, header-only test framework for unit tests This is specifically the legacy 1.x branch provided for compatibility with older compilers. diff --git a/ports/catch-classic/portfile.cmake b/ports/catch-classic/portfile.cmake index e09b7c995..1b5312606 100644 --- a/ports/catch-classic/portfile.cmake +++ b/ports/catch-classic/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v1.10.0) +set(CATCH_VERSION v1.11.0) vcpkg_download_distfile(HEADER URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-classic-${CATCH_VERSION}.hpp" - SHA512 275ab5b5d778cc8a91b5f3e8f241a37b680c81d1b8945ff64ad16a9708c98e6535b389746bf8cacbed07f874629f456b56bafbf1879c5a6f84fa87675c1361b6 + SHA512 8ce490cfa433ec1c6b6460d76e1d9a6502966ada96fec7290fe9827a965751f3d572e97b93bbbb5e2bc97ffcf70bb547a050405b80a1a816054bd6afd1208cbe ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From 381263aaa0c49b66c8253d2ab0700d3bca6b0d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 12 Jan 2018 10:52:34 +0100 Subject: Update Catch to 1.12.0 --- ports/catch-classic/CONTROL | 2 +- ports/catch-classic/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/catch-classic/CONTROL b/ports/catch-classic/CONTROL index 7b19cead5..488366f3e 100644 --- a/ports/catch-classic/CONTROL +++ b/ports/catch-classic/CONTROL @@ -1,5 +1,5 @@ Source: catch-classic -Version: 1.11.0 +Version: 1.12.0 Description: A modern, header-only test framework for unit tests This is specifically the legacy 1.x branch provided for compatibility with older compilers. diff --git a/ports/catch-classic/portfile.cmake b/ports/catch-classic/portfile.cmake index 1b5312606..5334ab503 100644 --- a/ports/catch-classic/portfile.cmake +++ b/ports/catch-classic/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v1.11.0) +set(CATCH_VERSION v1.12.0) vcpkg_download_distfile(HEADER URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-classic-${CATCH_VERSION}.hpp" - SHA512 8ce490cfa433ec1c6b6460d76e1d9a6502966ada96fec7290fe9827a965751f3d572e97b93bbbb5e2bc97ffcf70bb547a050405b80a1a816054bd6afd1208cbe + SHA512 0334993982a4543a42b301b77622dbc7df9e9c53dfe4e49a7b32cafea59f999e057777e94e719ecc0aafebc02fa937243d7ea6301be086a2dbd9f52b0d61d807 ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From 1b5ec0bc10b19563dc662c6480fd007cbc51c59f Mon Sep 17 00:00:00 2001 From: Nikolay Baklicharov Date: Thu, 18 Jan 2018 12:20:18 +0000 Subject: librtmp: Fix debug build (#2537) --- ports/librtmp/hide_netstackdump.patch | 38 ++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/ports/librtmp/hide_netstackdump.patch b/ports/librtmp/hide_netstackdump.patch index 391bbdc39..2ae44e46b 100644 --- a/ports/librtmp/hide_netstackdump.patch +++ b/ports/librtmp/hide_netstackdump.patch @@ -1,7 +1,25 @@ diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c -index 5ef3ae9..e559c6e 100644 +index 5ef3ae9..7c6a010 100644 --- a/librtmp/rtmp.c +++ b/librtmp/rtmp.c +@@ -129,7 +129,7 @@ static int clk_tck; + uint32_t + RTMP_GetTime() + { +-#ifdef _DEBUG ++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY) + return 0; + #elif defined(_WIN32) + return timeGetTime(); +@@ -1256,7 +1256,7 @@ RTMP_ClientPacket(RTMP *r, RTMPPacket *packet) + return bHasMediaPacket; + } + +-#ifdef _DEBUG ++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY) + extern FILE *netstackdump; + extern FILE *netstackdump_read; + #endif @@ -1333,7 +1333,7 @@ ReadN(RTMP *r, char *buffer, int n) SendBytesReceived(r); } @@ -11,6 +29,24 @@ index 5ef3ae9..e559c6e 100644 fwrite(ptr, 1, nBytes, netstackdump_read); #endif +@@ -3064,7 +3064,7 @@ HandShake(RTMP *r, int FP9HandShake) + + memset(&clientsig[4], 0, 4); + +-#ifdef _DEBUG ++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY) + for (i = 8; i < RTMP_SIG_SIZE; i++) + clientsig[i] = 0xff; + #else +@@ -3136,7 +3136,7 @@ SHandShake(RTMP *r) + memcpy(serversig, &uptime, 4); + + memset(&serversig[4], 0, 4); +-#ifdef _DEBUG ++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY) + for (i = 8; i < RTMP_SIG_SIZE; i++) + serversig[i] = 0xff; + #else @@ -3553,7 +3553,7 @@ RTMPSockBuf_Send(RTMPSockBuf *sb, const char *buf, int len) { int rc; -- cgit v1.2.3 From 7b0cfc6f6c5464e4f008b5ccbd99c9ac01e95bee Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 18 Jan 2018 02:13:50 -0800 Subject: [qt5-base] Remove debug qmake.exe --- ports/qt5-base/CONTROL | 2 +- ports/qt5-base/portfile.cmake | 2 +- ports/qt5-base/qt_debug.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index f2a507e19..039a0b873 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,4 +1,4 @@ Source: qt5-base -Version: 5.9.2-0 +Version: 5.9.2-1 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 diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index bde933392..0badd0477 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -77,8 +77,8 @@ file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) file(REMOVE ${BINARY_TOOLS}) file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") -file(INSTALL ${BINARY_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/qt5) file(REMOVE ${BINARY_TOOLS}) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools") file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf ${CMAKE_CURRENT_LIST_DIR}/qt_release.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) diff --git a/ports/qt5-base/qt_debug.conf b/ports/qt5-base/qt_debug.conf index 1314d00b9..45cac7a4b 100644 --- a/ports/qt5-base/qt_debug.conf +++ b/ports/qt5-base/qt_debug.conf @@ -10,4 +10,4 @@ Qml2Imports = qml Data = share/qt5/debug ArchData = share/qt5/debug HostData = share/qt5/debug -HostBinaries = debug/tools/qt5 \ No newline at end of file +HostBinaries = tools/qt5 \ No newline at end of file -- cgit v1.2.3 From d9d3744484b1dbe166d2036764f5d78b486e7290 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 18 Jan 2018 02:32:35 -0800 Subject: [qt5-base] Restore qtdeploy.ps1 --- ports/qt5-base/portfile.cmake | 2 ++ ports/qt5-base/qtdeploy.ps1 | 68 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 ports/qt5-base/qtdeploy.ps1 diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 0badd0477..9284f09b5 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -111,4 +111,6 @@ file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl DESTINATION ${CURRENT_PA file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins) + file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/qt5-base/qtdeploy.ps1 b/ports/qt5-base/qtdeploy.ps1 new file mode 100644 index 000000000..9d514e411 --- /dev/null +++ b/ports/qt5-base/qtdeploy.ps1 @@ -0,0 +1,68 @@ +# This script is based on the implementation of windeployqt for qt5.7.1 +# +# Qt's plugin deployment strategy is that each main Qt Module has a hardcoded +# set of plugin subdirectories. Each of these subdirectories is deployed in +# full if that Module is referenced. +# +# This hardcoded list is found inside qttools\src\windeployqt\main.cpp. For +# updating, inspect the symbols qtModuleEntries and qtModuleForPlugin. + +# Note: this function signature and behavior is depended upon by applocal.ps1 +function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [string]$targetBinaryName) { + + function deployPlugins([string]$pluginSubdirName) { + if (Test-Path "$QtPluginsDir\$pluginSubdirName") { + Write-Verbose " Deploying plugins directory '$pluginSubdirName'" + New-Item "$targetBinaryDir\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null + Get-ChildItem "$QtPluginsDir\$pluginSubdirName\*.dll" | % { + deployBinary "$targetBinaryDir\$pluginSubdirName" "$QtPluginsDir\$pluginSubdirName" $_.Name + } + } else { + Write-Verbose " Skipping plugins directory '$pluginSubdirName': doesn't exist" + } + } + + # We detect Qt modules in use via the DLLs themselves. See qtModuleEntries in Qt to find the mapping. + if ($targetBinaryName -like "Qt5Gui*.dll") { + Write-Verbose " Deploying platforms" + New-Item "$targetBinaryDir\platforms" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null + Get-ChildItem "$QtPluginsDir\platforms\qwindows*.dll" | % { + deployBinary "$targetBinaryDir\platforms" "$QtPluginsDir\platforms" $_.Name + } + + deployPlugins "accessible" + deployPlugins "imageformats" + deployPlugins "iconengines" + deployPlugins "platforminputcontexts" + } elseif ($targetBinaryName -like "Qt5Network*.dll") { + deployPlugins "bearer" + } elseif ($targetBinaryName -like "Qt5Sql*.dll") { + deployPlugins "sqldrivers" + } elseif ($targetBinaryName -like "Qt5Multimedia*.dll") { + deployPlugins "audio" + deployPlugins "mediaservice" + deployPlugins "playlistformats" + } elseif ($targetBinaryName -like "Qt5PrintSupport*.dll") { + deployPlugins "printsupport" + } elseif ($targetBinaryName -like "Qt5Quick*.dll") { + deployPlugins "scenegraph" + deployPlugins "qmltooling" + } elseif ($targetBinaryName -like "Qt5Declarative*.dll") { + deployPlugins "qml1tooling" + } elseif ($targetBinaryName -like "Qt5Positioning*.dll") { + deployPlugins "position" + } elseif ($targetBinaryName -like "Qt5Location*.dll") { + deployPlugins "geoservices" + } elseif ($targetBinaryName -like "Qt5Sensors*.dll") { + deployPlugins "sensors" + deployPlugins "sensorgestures" + } elseif ($targetBinaryName -like "Qt5WebEngineCore*.dll") { + deployPlugins "qtwebengine" + } elseif ($targetBinaryName -like "Qt53DRenderer*.dll") { + deployPlugins "sceneparsers" + } elseif ($targetBinaryName -like "Qt5TextToSpeech*.dll") { + deployPlugins "texttospeech" + } elseif ($targetBinaryName -like "Qt5SerialBus*.dll") { + deployPlugins "canbus" + } +} -- cgit v1.2.3 From d6dc7a078a845bd4e1349a4d4cb77e2070125d4d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 18 Jan 2018 02:33:23 -0800 Subject: [qwt][qscintilla][qca] Use dash in qt modular dependency --- ports/qca/CONTROL | 4 ++-- ports/qscintilla/CONTROL | 4 ++-- ports/qwt/CONTROL | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/qca/CONTROL b/ports/qca/CONTROL index beddbaa37..4f484666f 100644 --- a/ports/qca/CONTROL +++ b/ports/qca/CONTROL @@ -1,4 +1,4 @@ Source: qca -Version: 2.2.0-1 +Version: 2.2.0-2 Description: Qt Cryptographic Architecture (QCA). Sources: https://cgit.kde.org/qca.git/ -Build-Depends: qt5base +Build-Depends: qt5-base diff --git a/ports/qscintilla/CONTROL b/ports/qscintilla/CONTROL index 9ebe3ba04..32a11a69b 100644 --- a/ports/qscintilla/CONTROL +++ b/ports/qscintilla/CONTROL @@ -1,4 +1,4 @@ Source: qscintilla -Version: 2.10-1 +Version: 2.10-2 Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt) and without QtDesigner plugin) -Build-Depends: qt5base +Build-Depends: qt5-base diff --git a/ports/qwt/CONTROL b/ports/qwt/CONTROL index c30b97779..5bf85ad95 100644 --- a/ports/qwt/CONTROL +++ b/ports/qwt/CONTROL @@ -1,4 +1,4 @@ Source: qwt -Version: 6.1.3-2 +Version: 6.1.3-3 Description: Qt widgets library for technical applications -Build-Depends: qt5base, qt5svg +Build-Depends: qt5-base, qt5-svg -- cgit v1.2.3 From 51da0e25fa5af242331d0a5d8b0d8b4137d98fc5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 18 Jan 2018 04:22:18 -0800 Subject: [qscintilla] Fix build against new modular qt --- ports/qscintilla/CONTROL | 2 +- ports/qscintilla/portfile.cmake | 65 +++++++++++++++++++++++++++++++++++------ 2 files changed, 57 insertions(+), 10 deletions(-) diff --git a/ports/qscintilla/CONTROL b/ports/qscintilla/CONTROL index 32a11a69b..65fa0cd63 100644 --- a/ports/qscintilla/CONTROL +++ b/ports/qscintilla/CONTROL @@ -1,4 +1,4 @@ Source: qscintilla -Version: 2.10-2 +Version: 2.10-3 Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt) and without QtDesigner plugin) Build-Depends: qt5-base diff --git a/ports/qscintilla/portfile.cmake b/ports/qscintilla/portfile.cmake index a03ecb7db..fd60a5957 100644 --- a/ports/qscintilla/portfile.cmake +++ b/ports/qscintilla/portfile.cmake @@ -38,13 +38,60 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) ) endif() -vcpkg_configure_qmake( - SOURCE_PATH "${SOURCE_PATH}/Qt4Qt5" - OPTIONS - ${BUILD_OPTIONS} +SET(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") + +#Store build paths +set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +file(REMOVE_RECURSE "${DEBUG_DIR}" "${RELEASE_DIR}") + +#Configure debug +vcpkg_configure_qmake_debug( + SOURCE_PATH ${SOURCE_PATH}/Qt4Qt5 +) + +#First generate the makefiles so we can modify them +vcpkg_build_qmake_debug(TARGETS qmake_all) + +#Store debug makefiles path +file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + +foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + file(READ "${DEBUG_MAKEFILE}" _contents) + string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") + string(REPLACE "installed\\${TARGET_TRIPLET}\\lib" "installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") + string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib qtmaind.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link qtmaind.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" _contents "${_contents}") + file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") +endforeach() + +#Build debug +vcpkg_build_qmake_debug(TARGETS debug) + +#Configure release +vcpkg_configure_qmake_release( + SOURCE_PATH ${SOURCE_PATH}/Qt4Qt5 ) -vcpkg_build_qmake() +#First generate the makefiles so we can modify them +vcpkg_build_qmake_release(TARGETS qmake_all) + +#Store release makefile path +file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + +foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + file(READ "${RELEASE_MAKEFILE}" _contents) + string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib qtmain.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib\\manual-link qtmain.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib" _contents "${_contents}") + file(WRITE "${RELEASE_MAKEFILE}" "${_contents}") +endforeach() + +#Build release +vcpkg_build_qmake_release(TARGETS release) + +#Set the correct install directory to packages +foreach(MAKEFILE ${RELEASE_MAKEFILES} ${DEBUG_MAKEFILES}) + vcpkg_replace_string(${MAKEFILE} "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}") +endforeach() set(BUILD_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) @@ -52,25 +99,25 @@ file(GLOB HEADER_FILES ${SOURCE_PATH}/Qt4Qt5/Qsci/*) file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/Qsci) file(INSTALL - ${BUILD_DIR}/release/qscintilla2_qt5.lib + ${RELEASE_DIR}/release/qscintilla2_qt5.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME qscintilla2.lib ) file(INSTALL - ${BUILD_DIR}/debug/qscintilla2_qt5.lib + ${DEBUG_DIR}/debug/qscintilla2_qt5.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib RENAME qscintilla2.lib ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(INSTALL - ${BUILD_DIR}/release/qscintilla2_qt5.dll + ${RELEASE_DIR}/release/qscintilla2_qt5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin ) file(INSTALL - ${BUILD_DIR}/debug/qscintilla2_qt5.dll + ${DEBUG_DIR}/debug/qscintilla2_qt5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin ) -- cgit v1.2.3 From b47b4346f8c5b09cfb9826a083fc2d034a2ea9b4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 18 Jan 2018 07:36:07 -0800 Subject: [vcpkg-build-qmake][vcpkg-configure-qmake] Collapse config-specific versions. --- ports/qscintilla/CONTROL | 2 +- ports/qscintilla/portfile.cmake | 75 +++------------------- ports/qt5-modularscripts/CONTROL | 2 +- ports/qt5-modularscripts/qt_modular_library.cmake | 56 +++-------------- ports/qwt/CONTROL | 2 +- ports/qwt/portfile.cmake | 54 +++------------- scripts/cmake/vcpkg_build_qmake.cmake | 76 +++++++++++++++++++---- scripts/cmake/vcpkg_build_qmake_debug.cmake | 30 --------- scripts/cmake/vcpkg_build_qmake_release.cmake | 30 --------- scripts/cmake/vcpkg_common_functions.cmake | 4 -- scripts/cmake/vcpkg_configure_qmake.cmake | 41 +++++++----- scripts/cmake/vcpkg_configure_qmake_debug.cmake | 46 -------------- scripts/cmake/vcpkg_configure_qmake_release.cmake | 46 -------------- 13 files changed, 116 insertions(+), 348 deletions(-) delete mode 100644 scripts/cmake/vcpkg_build_qmake_debug.cmake delete mode 100644 scripts/cmake/vcpkg_build_qmake_release.cmake delete mode 100644 scripts/cmake/vcpkg_configure_qmake_debug.cmake delete mode 100644 scripts/cmake/vcpkg_configure_qmake_release.cmake diff --git a/ports/qscintilla/CONTROL b/ports/qscintilla/CONTROL index 65fa0cd63..6453ad643 100644 --- a/ports/qscintilla/CONTROL +++ b/ports/qscintilla/CONTROL @@ -1,4 +1,4 @@ Source: qscintilla -Version: 2.10-3 +Version: 2.10-4 Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt) and without QtDesigner plugin) Build-Depends: qt5-base diff --git a/ports/qscintilla/portfile.cmake b/ports/qscintilla/portfile.cmake index fd60a5957..18ff18a97 100644 --- a/ports/qscintilla/portfile.cmake +++ b/ports/qscintilla/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) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/QScintilla_gpl-2.10) vcpkg_download_distfile(ARCHIVE @@ -31,70 +19,24 @@ set(BUILD_OPTIONS CONFIG-=hide_symbols ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(BUILD_OPTIONS - ${BUILD_OPTIONS} - CONFIG+=staticlib - ) -endif() - SET(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") #Store build paths set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") -file(REMOVE_RECURSE "${DEBUG_DIR}" "${RELEASE_DIR}") - -#Configure debug -vcpkg_configure_qmake_debug( +vcpkg_configure_qmake( SOURCE_PATH ${SOURCE_PATH}/Qt4Qt5 + OPTIONS + CONFIG+=build_all + CONFIG-=hide_symbols ) -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - file(READ "${DEBUG_MAKEFILE}" _contents) - string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") - string(REPLACE "installed\\${TARGET_TRIPLET}\\lib" "installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") - string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib qtmaind.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link qtmaind.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" _contents "${_contents}") - file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") -endforeach() - -#Build debug -vcpkg_build_qmake_debug(TARGETS debug) - -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${SOURCE_PATH}/Qt4Qt5 +vcpkg_build_qmake( + RELEASE_TARGETS release + DEBUG_TARGETS debug ) -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - file(READ "${RELEASE_MAKEFILE}" _contents) - string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib qtmain.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib\\manual-link qtmain.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib" _contents "${_contents}") - file(WRITE "${RELEASE_MAKEFILE}" "${_contents}") -endforeach() - -#Build release -vcpkg_build_qmake_release(TARGETS release) - -#Set the correct install directory to packages -foreach(MAKEFILE ${RELEASE_MAKEFILES} ${DEBUG_MAKEFILES}) - vcpkg_replace_string(${MAKEFILE} "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}") -endforeach() - -set(BUILD_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) - file(GLOB HEADER_FILES ${SOURCE_PATH}/Qt4Qt5/Qsci/*) file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/Qsci) @@ -120,11 +62,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) ${DEBUG_DIR}/debug/qscintilla2_qt5.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin ) +endif() vcpkg_copy_pdbs() -endif() - # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/qscintilla) file(RENAME ${CURRENT_PACKAGES_DIR}/share/qscintilla/LICENSE ${CURRENT_PACKAGES_DIR}/share/qscintilla/copyright) diff --git a/ports/qt5-modularscripts/CONTROL b/ports/qt5-modularscripts/CONTROL index ddbdea51e..bf2ab2734 100644 --- a/ports/qt5-modularscripts/CONTROL +++ b/ports/qt5-modularscripts/CONTROL @@ -1,3 +1,3 @@ Source: qt5-modularscripts -Version: 0 +Version: 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 cdffc58fa..0301bcebc 100644 --- a/ports/qt5-modularscripts/qt_modular_library.cmake +++ b/ports/qt5-modularscripts/qt_modular_library.cmake @@ -34,8 +34,6 @@ function(qt_modular_library NAME HASH) set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - file(REMOVE_RECURSE "${DEBUG_DIR}" "${RELEASE_DIR}") - #Find Python and add it to the path vcpkg_find_acquire_program(PYTHON2) get_filename_component(PYTHON2_EXE_PATH ${PYTHON2} DIRECTORY) @@ -43,51 +41,14 @@ function(qt_modular_library NAME HASH) file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) - + string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) - #Configure debug - vcpkg_configure_qmake_debug( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} - ) - - #First generate the makefiles so we can modify them - vcpkg_build_qmake_debug(TARGETS qmake_all) - - #Store debug makefiles path - file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - - foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - file(READ "${DEBUG_MAKEFILE}" _contents) - string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") - string(REPLACE "installed\\${TARGET_TRIPLET}\\lib" "installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") - string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib qtmaind.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link qtmaind.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" _contents "${_contents}") - file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") - endforeach() - - #Build debug - vcpkg_build_qmake_debug() + #Configure debug+release + vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH}) - #Configure release - vcpkg_configure_qmake_release( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} - ) - - #First generate the makefiles so we can modify them - vcpkg_build_qmake_release(TARGETS qmake_all) - - #Store release makefile path - file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - - foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - file(READ "${RELEASE_MAKEFILE}" _contents) - string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib qtmain.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib\\manual-link qtmain.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib" _contents "${_contents}") - file(WRITE "${RELEASE_MAKEFILE}" "${_contents}") - endforeach() - - #Build release - vcpkg_build_qmake_release() + vcpkg_build_qmake() #Fix the cmake files if they exist if(EXISTS ${RELEASE_DIR}/lib/cmake) @@ -97,15 +58,16 @@ function(qt_modular_library NAME HASH) LOGNAME fix-cmake ) endif() - + + file(GLOB_RECURSE MAKEFILES ${DEBUG_DIR}/*Makefile* ${RELEASE_DIR}/*Makefile*) + #Set the correct install directory to packages - foreach(MAKEFILE ${RELEASE_MAKEFILES} ${DEBUG_MAKEFILES}) + foreach(MAKEFILE ${MAKEFILES}) vcpkg_replace_string(${MAKEFILE} "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}") endforeach() #Install the module files - vcpkg_build_qmake_debug(TARGETS install) - vcpkg_build_qmake_release(TARGETS install) + vcpkg_build_qmake(TARGETS install SKIP_MAKEFILES BUILD_LOGNAME install) #Remove extra cmake files if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake) diff --git a/ports/qwt/CONTROL b/ports/qwt/CONTROL index 5bf85ad95..9dcf19f5b 100644 --- a/ports/qwt/CONTROL +++ b/ports/qwt/CONTROL @@ -1,4 +1,4 @@ Source: qwt -Version: 6.1.3-3 +Version: 6.1.3-4 Description: Qt widgets library for technical applications Build-Depends: qt5-base, qt5-svg diff --git a/ports/qwt/portfile.cmake b/ports/qwt/portfile.cmake index f4be871b7..918914a01 100644 --- a/ports/qwt/portfile.cmake +++ b/ports/qwt/portfile.cmake @@ -21,57 +21,16 @@ else() ) endif() -# The qwt build requires zlib1.dll -SET(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") - -#Store build paths set(DEBUG_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") set(RELEASE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") -file(REMOVE_RECURSE "${DEBUG_DIR}" "${RELEASE_DIR}") - -#Configure debug -vcpkg_configure_qmake_debug( - SOURCE_PATH ${SOURCE_PATH} -) - -#First generate the makefiles so we can modify them -vcpkg_build_qmake_debug(TARGETS qmake_all) - -#Store debug makefiles path -file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) - -foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) - file(READ "${DEBUG_MAKEFILE}" _contents) - string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") - string(REPLACE "installed\\${TARGET_TRIPLET}\\lib" "installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") - string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib qtmaind.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link qtmaind.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" _contents "${_contents}") - file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") -endforeach() - -#Build debug -vcpkg_build_qmake_debug(TARGETS sub-src-debug_ordered) +vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH}) -#Configure release -vcpkg_configure_qmake_release( - SOURCE_PATH ${SOURCE_PATH} +vcpkg_build_qmake( + RELEASE_TARGETS sub-src-release_ordered + DEBUG_TARGETS sub-src-debug_ordered ) -#First generate the makefiles so we can modify them -vcpkg_build_qmake_release(TARGETS qmake_all) - -#Store release makefile path -file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) - -foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) - file(READ "${RELEASE_MAKEFILE}" _contents) - string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib qtmain.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib\\manual-link qtmain.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib" _contents "${_contents}") - file(WRITE "${RELEASE_MAKEFILE}" "${_contents}") -endforeach() - -#Build release -vcpkg_build_qmake_release(TARGETS sub-src-release_ordered) - #Set the correct install directory to packages foreach(MAKEFILE ${RELEASE_MAKEFILES} ${DEBUG_MAKEFILES}) vcpkg_replace_string(${MAKEFILE} "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}") @@ -92,7 +51,7 @@ file(INSTALL DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(INSTALL ${RELEASE_DIR}/lib/qwt.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin @@ -100,11 +59,12 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(INSTALL ${DEBUG_DIR}/lib/qwtd.dll - ${DEBUG_DIR}/lib/qwtd.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin ) endif() +vcpkg_copy_pdbs() + # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/qwt) file(RENAME ${CURRENT_PACKAGES_DIR}/share/qwt/COPYING ${CURRENT_PACKAGES_DIR}/share/qwt/copyright) diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake index 693f7841e..194ab8206 100644 --- a/scripts/cmake/vcpkg_build_qmake.cmake +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -1,31 +1,81 @@ #.rst: # .. command:: vcpkg_build_qmake # -# Build a qmake-based project, previously configured using vcpkg_configure_qmake . -# As the CONFIG qmake option is assumed to be "debug_and_release" (the default value on Windows, see [1]), -# both the debug and release libraries are build in the same build tree. +# Build a qmake-based project, previously configured using vcpkg_configure_qmake. # # :: # vcpkg_build_qmake() # -# -# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html function(vcpkg_build_qmake) + cmake_parse_arguments(_csc "SKIP_MAKEFILES" "BUILD_LOGNAME" "TARGETS;RELEASE_TARGETS;DEBUG_TARGETS" ${ARGN}) vcpkg_find_acquire_program(JOM) # Make sure that the linker finds the libraries used set(ENV_PATH_BACKUP "$ENV{PATH}") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/debug/lib;${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin;${CURRENT_INSTALLED_DIR}/tools/qt5;$ENV{PATH}") - message(STATUS "Package ${TARGET_TRIPLET}") - vcpkg_execute_required_process( - COMMAND ${JOM} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} - LOGNAME package-${TARGET_TRIPLET} - ) - message(STATUS "Package ${TARGET_TRIPLET} done") + set(DEBUG_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + set(RELEASE_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) + + list(APPEND _csc_RELEASE_TARGETS ${_csc_TARGETS}) + list(APPEND _csc_DEBUG_TARGETS ${_csc_TARGETS}) + + if(NOT _csc_BUILD_LOGNAME) + set(_csc_BUILD_LOGNAME build) + endif() + + function(run_jom TARGETS LOG_PREFIX LOG_SUFFIX) + message(STATUS "Package ${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX}") + vcpkg_execute_required_process( + COMMAND ${JOM} ${TARGETS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${LOG_SUFFIX} + LOGNAME package-${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX} + ) + message(STATUS "Package ${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX} done") + endfunction() + + # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings + set(ENV_CL_BACKUP "$ENV{_CL_}") + set(ENV{_CL_} "/utf-8") + + #First generate the makefiles so we can modify them + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/lib;${CURRENT_INSTALLED_DIR}/debug/bin;${CURRENT_INSTALLED_DIR}/tools/qt5;${ENV_PATH_BACKUP}") + if(NOT _csc_SKIP_MAKEFILES) + run_jom(qmake_all makefiles dbg) + + #Store debug makefiles path + file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*) + + foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES}) + file(READ "${DEBUG_MAKEFILE}" _contents) + string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}") + string(REPLACE "installed\\${TARGET_TRIPLET}\\lib" "installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}") + string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib qtmaind.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link qtmaind.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" _contents "${_contents}") + file(WRITE "${DEBUG_MAKEFILE}" "${_contents}") + endforeach() + endif() + + run_jom("${_csc_DEBUG_TARGETS}" ${_csc_BUILD_LOGNAME} dbg) + + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/tools/qt5;${ENV_PATH_BACKUP}") + if(NOT _csc_SKIP_MAKEFILES) + run_jom(qmake_all makefiles rel) + + #Store release makefile path + file(GLOB_RECURSE RELEASE_MAKEFILES ${RELEASE_DIR}/*Makefile*) + + foreach(RELEASE_MAKEFILE ${RELEASE_MAKEFILES}) + file(READ "${RELEASE_MAKEFILE}" _contents) + string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\lib qtmain.lib" "shell32.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib\\manual-link qtmain.lib /LIBPATH:${NATIVE_INSTALLED_DIR}\\lib" _contents "${_contents}") + file(WRITE "${RELEASE_MAKEFILE}" "${_contents}") + endforeach() + endif() + + run_jom("${_csc_RELEASE_TARGETS}" ${_csc_BUILD_LOGNAME} rel) # Restore the original value of ENV{PATH} set(ENV{PATH} "${ENV_PATH_BACKUP}") + set(ENV{_CL_} "${ENV_CL_BACKUP}") endfunction() diff --git a/scripts/cmake/vcpkg_build_qmake_debug.cmake b/scripts/cmake/vcpkg_build_qmake_debug.cmake deleted file mode 100644 index a734e63cf..000000000 --- a/scripts/cmake/vcpkg_build_qmake_debug.cmake +++ /dev/null @@ -1,30 +0,0 @@ -#.rst: -# .. command:: vcpkg_build_qmake_debug -# -# Build a qmake-based project, previously configured using vcpkg_configure_qmake_debug. -# -# :: -# vcpkg_build_qmake_debug() -# -# -# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html - -function(vcpkg_build_qmake_debug) - cmake_parse_arguments(_csc "" "" "TARGETS" ${ARGN}) - vcpkg_find_acquire_program(JOM) - - # Make sure that the linker finds the libraries used - set(ENV_PATH_BACKUP "$ENV{PATH}") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/lib;${CURRENT_INSTALLED_DIR}/debug/bin;${CURRENT_INSTALLED_DIR}/debug/tools/qt5;$ENV{PATH}") - - message(STATUS "Package ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND ${JOM} ${_csc_TARGETS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME package-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Package ${TARGET_TRIPLET}-dbg done") - - # Restore the original value of ENV{PATH} - set(ENV{PATH} "${ENV_PATH_BACKUP}") -endfunction() diff --git a/scripts/cmake/vcpkg_build_qmake_release.cmake b/scripts/cmake/vcpkg_build_qmake_release.cmake deleted file mode 100644 index 3daf9201b..000000000 --- a/scripts/cmake/vcpkg_build_qmake_release.cmake +++ /dev/null @@ -1,30 +0,0 @@ -#.rst: -# .. command:: vcpkg_build_qmake_release -# -# Build a qmake-based project, previously configured using vcpkg_configure_qmake_release. -# -# :: -# vcpkg_build_qmake_release() -# -# -# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html - -function(vcpkg_build_qmake_release) - cmake_parse_arguments(_csc "" "" "TARGETS" ${ARGN}) - vcpkg_find_acquire_program(JOM) - - # Make sure that the linker finds the libraries used - set(ENV_PATH_BACKUP "$ENV{PATH}") - set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/tools/qt5;$ENV{PATH}") - - message(STATUS "Package ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND ${JOM} ${_csc_TARGETS} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME package-${TARGET_TRIPLET}-rel - ) - message(STATUS "Package ${TARGET_TRIPLET}-rel done") - - # Restore the original value of ENV{PATH} - set(ENV{PATH} "${ENV_PATH_BACKUP}") -endfunction() diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 258b8f64a..27dd0732d 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -10,15 +10,11 @@ include(vcpkg_from_bitbucket) include(vcpkg_build_cmake) include(vcpkg_build_msbuild) include(vcpkg_build_qmake) -include(vcpkg_build_qmake_debug) -include(vcpkg_build_qmake_release) include(vcpkg_install_cmake) include(vcpkg_install_meson) include(vcpkg_configure_cmake) include(vcpkg_configure_meson) include(vcpkg_configure_qmake) -include(vcpkg_configure_qmake_debug) -include(vcpkg_configure_qmake_release) include(vcpkg_apply_patches) include(vcpkg_copy_pdbs) include(vcpkg_copy_tool_dependencies) diff --git a/scripts/cmake/vcpkg_configure_qmake.cmake b/scripts/cmake/vcpkg_configure_qmake.cmake index 037197e48..4cc7bc9f7 100644 --- a/scripts/cmake/vcpkg_configure_qmake.cmake +++ b/scripts/cmake/vcpkg_configure_qmake.cmake @@ -2,11 +2,6 @@ # .. command:: vcpkg_configure_qmake # # Configure a qmake-based project. -# It is assume that the qmake project CONFIG variable is -# "debug_and_release" (the default value on Windows, see [1]). -# Using this option, only one Makefile for building both Release and Debug -# libraries is generated, that then can be run using the vcpkg_build_qmake -# command. # # :: # vcpkg_configure_qmake(SOURCE_PATH @@ -17,28 +12,44 @@ # The path to the *.pro qmake project file. # ``OPTIONS`` # The options passed to qmake. -# -# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html function(vcpkg_configure_qmake) cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) - # Find qmake exectuable + # Find qmake executable find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) if(NOT QMAKE_COMMAND) message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND _csc_OPTIONS CONFIG+=staticlib) + endif() + # Cleanup build directories - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - message(STATUS "Configuring ${TARGET_TRIPLET}") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_release.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf) + + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) vcpkg_execute_required_process( - COMMAND ${QMAKE_COMMAND} ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} - LOGNAME config-${TARGET_TRIPLET} + COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel ) - message(STATUS "Configuring ${TARGET_TRIPLET} done") + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + + configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_debug.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/qt.conf) + + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + vcpkg_execute_required_process( + COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/qt.conf" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_qmake_debug.cmake b/scripts/cmake/vcpkg_configure_qmake_debug.cmake deleted file mode 100644 index 3eeb42cb3..000000000 --- a/scripts/cmake/vcpkg_configure_qmake_debug.cmake +++ /dev/null @@ -1,46 +0,0 @@ -#.rst: -# .. command:: vcpkg_configure_qmake_debug -# -# Configure a qmake-based project. -# This sets the config variable to debug and outputs to -# a debug triplet directory. -# -# :: -# vcpkg_configure_qmake_debug(SOURCE_PATH -# [OPTIONS arg1 [arg2 ...]] -# ) -# -# ``SOURCE_PATH`` -# The path to the *.pro qmake project file. -# ``OPTIONS`` -# The options passed to qmake. -# -# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html - -function(vcpkg_configure_qmake_debug) - cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) - - # Find qmake exectuable - find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) - - if(NOT QMAKE_COMMAND) - message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") - endif() - - # Cleanup build directories - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - - configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_debug.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf) - - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - vcpkg_execute_required_process( - COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf" - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME config-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") - unset(QMAKE_COMMAND) - unset(QMAKE_COMMAND PARENT_SCOPE) - unset(QMAKE_COMMAND CACHE) -endfunction() \ No newline at end of file diff --git a/scripts/cmake/vcpkg_configure_qmake_release.cmake b/scripts/cmake/vcpkg_configure_qmake_release.cmake deleted file mode 100644 index 60750060b..000000000 --- a/scripts/cmake/vcpkg_configure_qmake_release.cmake +++ /dev/null @@ -1,46 +0,0 @@ -#.rst: -# .. command:: vcpkg_configure_qmake_release -# -# Configure a qmake-based project. -# This sets the config variable to release and outputs to -# a release triplet directory. -# -# :: -# vcpkg_configure_qmake_release(SOURCE_PATH -# [OPTIONS arg1 [arg2 ...]] -# ) -# -# ``SOURCE_PATH`` -# The path to the *.pro qmake project file. -# ``OPTIONS`` -# The options passed to qmake. -# -# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html - -function(vcpkg_configure_qmake_release) - cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) - - # Find qmake exectuable - find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) - - if(NOT QMAKE_COMMAND) - message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") - endif() - - # Cleanup build directories - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - - configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_release.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf) - - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - vcpkg_execute_required_process( - COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf" - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME config-${TARGET_TRIPLET}-rel - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - unset(QMAKE_COMMAND) - unset(QMAKE_COMMAND PARENT_SCOPE) - unset(QMAKE_COMMAND CACHE) -endfunction() \ No newline at end of file -- cgit v1.2.3 From 353d635b97df5c80f270ec200d16a6664c4d6ab6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 18 Jan 2018 10:45:34 -0800 Subject: [freetype][harfbuzz] Fix static freetype dependency. --- ports/freetype/usage | 3 +-- ports/harfbuzz/find-package-freetype.patch | 13 +++++++++++++ ports/harfbuzz/portfile.cmake | 4 +++- scripts/buildsystems/vcpkg.cmake | 11 +++++++++++ 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 ports/harfbuzz/find-package-freetype.patch diff --git a/ports/freetype/usage b/ports/freetype/usage index 3b42b86e4..458a9dd88 100644 --- a/ports/freetype/usage +++ b/ports/freetype/usage @@ -1,5 +1,4 @@ The package freetype is compatible with built-in CMake targets: find_package(Freetype REQUIRED) - target_link_libraries(main PRIVATE ${FREETYPE_LIBRARIES}) - target_include_directories(main PRIVATE ${FREETYPE_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE Freetype::Freetype) diff --git a/ports/harfbuzz/find-package-freetype.patch b/ports/harfbuzz/find-package-freetype.patch new file mode 100644 index 000000000..a556d1377 --- /dev/null +++ b/ports/harfbuzz/find-package-freetype.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 24ccb6f..21df836 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -201,7 +201,7 @@ set(project_headers + ## Find and include needed header folders and libraries + if (HB_HAVE_FREETYPE) + +- include(FindFreetype) ++ find_package(Freetype REQUIRED) + if (NOT FREETYPE_FOUND) + message(FATAL_ERROR "HB_HAVE_FREETYPE was set, but we failed to find it. Maybe add a CMAKE_PREFIX_PATH= to your Freetype2 install prefix") + endif() diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 6e58997c1..c4bdbca22 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -10,7 +10,9 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch" + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch" + "${CMAKE_CURRENT_LIST_DIR}/find-package-freetype.patch" ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index f157d3236..8ee21d411 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -206,6 +206,17 @@ macro(find_package name) if(TIFF_LIBRARIES) list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES}) endif() + elseif("${name}" STREQUAL "Freetype") + _find_package(${ARGV}) + find_package(ZLIB) + find_package(PNG) + find_package(BZip2) + if(TARGET Freetype::Freetype) + set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES BZip2::BZip2 PNG::PNG ZLIB::ZLIB) + endif() + if(FREETYPE_LIBRARIES) + list(APPEND FREETYPE_LIBRARIES ${BZIP2_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES}) + endif() elseif("${name}" STREQUAL "tinyxml2") _find_package(${ARGV}) if(TARGET tinyxml2_static AND NOT TARGET tinyxml2) -- cgit v1.2.3 From e44c1b292d194c1949445ac5bc96e1d81f11f4bf Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 17 Jan 2018 22:08:48 -0800 Subject: [boost] Remove version from .lib filenames to improve CMake compatibility. Fixes #2459. --- ports/boost-build/CONTROL | 2 +- ports/boost-build/Jamroot.jam | 40 ++++++++++++++--------------- ports/boost-build/boost-modular-build.cmake | 1 + 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/ports/boost-build/CONTROL b/ports/boost-build/CONTROL index 12af51a0f..fb8d36918 100644 --- a/ports/boost-build/CONTROL +++ b/ports/boost-build/CONTROL @@ -1,3 +1,3 @@ Source: boost-build -Version: 1.66.0-2 +Version: 1.66.0-3 Description: Boost.Build diff --git a/ports/boost-build/Jamroot.jam b/ports/boost-build/Jamroot.jam index 2762c99ea..3c34905e5 100644 --- a/ports/boost-build/Jamroot.jam +++ b/ports/boost-build/Jamroot.jam @@ -36,8 +36,8 @@ if "@PORT@" != "boost-system" { use-project /boost/system : . ; - lib boost_system : : @CURRENT_INSTALLED_DIR@/lib/boost_system-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_system : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_system-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + lib boost_system : : @CURRENT_INSTALLED_DIR@/lib/boost_system-vc140-mt.lib release ; + lib boost_system : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_system-vc140-mt-gd.lib debug ; explicit boost_system ; } @@ -45,8 +45,8 @@ if "@PORT@" != "boost-chrono" { use-project /boost/chrono : . ; - lib boost_chrono : : @CURRENT_INSTALLED_DIR@/lib/boost_chrono-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_chrono : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_chrono-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + lib boost_chrono : : @CURRENT_INSTALLED_DIR@/lib/boost_chrono-vc140-mt.lib release ; + lib boost_chrono : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_chrono-vc140-mt-gd.lib debug ; explicit boost_chrono ; } @@ -54,8 +54,8 @@ if "@PORT@" != "boost-regex" { use-project /boost/regex : . ; - lib boost_regex : : @CURRENT_INSTALLED_DIR@/lib/boost_regex-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_regex : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_regex-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + lib boost_regex : : @CURRENT_INSTALLED_DIR@/lib/boost_regex-vc140-mt.lib release ; + lib boost_regex : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_regex-vc140-mt-gd.lib debug ; explicit boost_regex ; } @@ -63,8 +63,8 @@ if "@PORT@" != "boost-date-time" { use-project /boost/date_time : . ; - lib boost_date_time : : @CURRENT_INSTALLED_DIR@/lib/boost_date_time-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release -/boost/date_time//boost_date_time ; - lib boost_date_time : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_date_time-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug -/boost/date_time//boost_date_time ; + lib boost_date_time : : @CURRENT_INSTALLED_DIR@/lib/boost_date_time-vc140-mt.lib release -/boost/date_time//boost_date_time ; + lib boost_date_time : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_date_time-vc140-mt-gd.lib debug -/boost/date_time//boost_date_time ; explicit boost_date_time ; } @@ -72,8 +72,8 @@ if "@PORT@" != "boost-thread" { use-project /boost/thread : . ; - lib boost_thread : : @CURRENT_INSTALLED_DIR@/lib/boost_thread-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release : : /boost/date_time//boost_date_time ; - lib boost_thread : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_thread-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug : : /boost/date_time//boost_date_time ; + lib boost_thread : : @CURRENT_INSTALLED_DIR@/lib/boost_thread-vc140-mt.lib release : : /boost/date_time//boost_date_time ; + lib boost_thread : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_thread-vc140-mt-gd.lib debug : : /boost/date_time//boost_date_time ; explicit boost_thread ; } @@ -81,8 +81,8 @@ if "@PORT@" != "boost-timer" { use-project /boost/timer : . ; - lib boost_timer : : @CURRENT_INSTALLED_DIR@/lib/boost_timer-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_timer : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_timer-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + lib boost_timer : : @CURRENT_INSTALLED_DIR@/lib/boost_timer-vc140-mt.lib release ; + lib boost_timer : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_timer-vc140-mt-gd.lib debug ; explicit boost_timer ; } @@ -90,8 +90,8 @@ if "@PORT@" != "boost-filesystem" { use-project /boost/filesystem : . ; - lib boost_filesystem : : @CURRENT_INSTALLED_DIR@/lib/boost_filesystem-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release : : /boost/system//boost_system ; - lib boost_filesystem : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_filesystem-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug : : /boost/system//boost_system ; + lib boost_filesystem : : @CURRENT_INSTALLED_DIR@/lib/boost_filesystem-vc140-mt.lib release : : /boost/system//boost_system ; + lib boost_filesystem : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_filesystem-vc140-mt-gd.lib debug : : /boost/system//boost_system ; explicit boost_filesystem ; } @@ -99,8 +99,8 @@ if "@PORT@" != "boost-atomic" { use-project /boost/atomic : . ; - lib boost_atomic : : @CURRENT_INSTALLED_DIR@/lib/boost_atomic-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_atomic : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_atomic-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + lib boost_atomic : : @CURRENT_INSTALLED_DIR@/lib/boost_atomic-vc140-mt.lib release ; + lib boost_atomic : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_atomic-vc140-mt-gd.lib debug ; explicit boost_atomic ; } @@ -111,8 +111,8 @@ if "@PORT@" != "boost-context" use-project /boost/context : . ; - lib boost_context : : @CURRENT_INSTALLED_DIR@/lib/boost_context-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_context : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_context-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + lib boost_context : : @CURRENT_INSTALLED_DIR@/lib/boost_context-vc140-mt.lib release ; + lib boost_context : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_context-vc140-mt-gd.lib debug ; explicit boost_context ; } @@ -120,8 +120,8 @@ if "@PORT@" != "boost-test" { use-project /boost/test : . ; - lib boost_unit_test_framework : : @CURRENT_INSTALLED_DIR@/lib/boost_unit_test_framework-vc140-mt-$(BOOST_VERSION_ABI_TAG).lib release ; - lib boost_unit_test_framework : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_unit_test_framework-vc140-mt-gd-$(BOOST_VERSION_ABI_TAG).lib debug ; + lib boost_unit_test_framework : : @CURRENT_INSTALLED_DIR@/lib/boost_unit_test_framework-vc140-mt.lib release ; + lib boost_unit_test_framework : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_unit_test_framework-vc140-mt-gd.lib debug ; explicit boost_unit_test_framework ; } diff --git a/ports/boost-build/boost-modular-build.cmake b/ports/boost-build/boost-modular-build.cmake index f0d43f1b3..a67dde31c 100644 --- a/ports/boost-build/boost-modular-build.cmake +++ b/ports/boost-build/boost-modular-build.cmake @@ -260,6 +260,7 @@ function(boost_modular_build) string(REPLACE "-x64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries string(REPLACE "-a32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries string(REPLACE "-a64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-1_66" "" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake > 3.10 to locate the binaries string(REPLACE "_python3-" "_python-" NEW_FILENAME ${NEW_FILENAME}) if("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}") # nothing to do -- cgit v1.2.3 From 21d51eab4ccb9fe4a80393fb68fa0c1b337fe2f4 Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Fri, 19 Jan 2018 12:08:55 +0800 Subject: [libbson] update to 1.9.2 --- ports/libbson/CONTROL | 2 +- ports/libbson/portfile.cmake | 43 ++++++++++++++++++++----------------------- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/ports/libbson/CONTROL b/ports/libbson/CONTROL index bc99eb9a3..8ba25697f 100644 --- a/ports/libbson/CONTROL +++ b/ports/libbson/CONTROL @@ -1,3 +1,3 @@ Source: libbson -Version: 1.9.0 +Version: 1.9.2 Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake index 956e39ff0..3bc9cd18a 100644 --- a/ports/libbson/portfile.cmake +++ b/ports/libbson/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libbson-1.9.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libbson-1.9.2) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mongodb/libbson/archive/1.9.0.tar.gz" - FILENAME "libbson-1.9.0.tar.gz" - SHA512 ced5e20a043096bbb2bd97f179c50fa105498fd089a54fcf7c0e3edda52030e7a6363ff1ab75c885649590a7d8846fa8adf880026cc059772cdfd87da23a244d + URLS "https://github.com/mongodb/libbson/archive/1.9.2.tar.gz" + FILENAME "libbson-1.9.2.tar.gz" + SHA512 a05f1e8fbabb34e847692397e2e41fc5923ddd18dba861e5ab8a31acdf6738e13ab719eae8f9f8563f08fc43aab5c8d1f53cb6a47c38c96e132fa4a62a48d2bf ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -28,6 +28,11 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libbson-static-1.0") +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libbson-1.0") +endif() # This rename is needed because the official examples expect to use #include # See Microsoft/vcpkg#904 @@ -61,26 +66,18 @@ file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/li file(COPY ${SOURCE_PATH}/THIRD_PARTY_NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) -file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-static-1.0/libbson-static-1.0-config.cmake LIBBSON_CONFIG_CMAKE) -string(REPLACE "/../../../" "/../../" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") -string(REPLACE "/include/libbson-1.0" "/include" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") -string(REPLACE "bson-static-1.0" "bson-1.0" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config.cmake "${LIBBSON_CONFIG_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson-static-1.0/libbson-static-1.0-config.cmake "${LIBBSON_CONFIG_CMAKE}") -file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-static-1.0/libbson-static-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-static-1.0-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config-version.cmake) -file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-static-1.0/libbson-static-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson-static-1.0) + set(PORT_POSTFIX "static-1.0") else() -file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-1.0/libbson-1.0-config.cmake LIBBSON_CONFIG_CMAKE) -string(REPLACE "/../../../" "/../../" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") -string(REPLACE "/include/libbson-1.0" "/include" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config.cmake "${LIBBSON_CONFIG_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson-1.0/libbson-1.0-config.cmake "${LIBBSON_CONFIG_CMAKE}") -file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-1.0/libbson-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-1.0-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config-version.cmake) -file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-1.0/libbson-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson-1.0) + set(PORT_POSTFIX "1.0") endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + +file(READ ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake LIBBSON_CONFIG_CMAKE) +string(REPLACE "/include/libbson-1.0" "/include" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") +string(REPLACE "bson-static-1.0" "bson-1.0" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake "${LIBBSON_CONFIG_CMAKE}") +file(COPY ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX}) +file(COPY ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config-version.cmake) vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 04eb62a1bfb353c598a5a2ea1d19542f75768fd9 Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Fri, 19 Jan 2018 12:10:05 +0800 Subject: [mongo-c-driver] update to 1.9.2 --- ports/mongo-c-driver/CONTROL | 2 +- ports/mongo-c-driver/portfile.cmake | 43 +++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL index 6391682c4..9a367df3a 100644 --- a/ports/mongo-c-driver/CONTROL +++ b/ports/mongo-c-driver/CONTROL @@ -1,4 +1,4 @@ Source: mongo-c-driver -Version: 1.9.0 +Version: 1.9.2 Build-Depends: libbson, openssl (uwp) Description: Client library written in C for MongoDB. diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake index 3b3b1f863..74f4bd66b 100644 --- a/ports/mongo-c-driver/portfile.cmake +++ b/ports/mongo-c-driver/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-c-driver-1.9.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-c-driver-1.9.2) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mongodb/mongo-c-driver/archive/1.9.0.tar.gz" - FILENAME "mongo-c-driver-1.9.0.tar.gz" - SHA512 e7785f336c38bbf7dd519351bba2facab025b4d2bcd1eef82e98606a21510af7f799edaf4b4f074bd4c5a17ad63176c276f8c57e499b8d9afd098bce274da4ae + URLS "https://github.com/mongodb/mongo-c-driver/archive/1.9.2.tar.gz" + FILENAME "mongo-c-driver-1.9.2.tar.gz" + SHA512 a2c819da77aef93ce261093e98e8e8c41c449af56bd03d875e2838a067ae71b5ceb16fed2fb8df9458c84310451b813464377592806fc9ac39d9df2f4ddba83b ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -36,6 +36,11 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libmongoc-static-1.0") +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libmongoc-1.0") +endif() # This rename is needed because the official examples expect to use #include # See Microsoft/vcpkg#904 @@ -69,26 +74,18 @@ file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mo file(COPY ${SOURCE_PATH}/THIRD_PARTY_NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) -file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-static-1.0/libmongoc-static-1.0-config.cmake LIBMONGOC_CONFIG_CMAKE) -string(REPLACE "/../../../" "/../../" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") -string(REPLACE "/include/libmongoc-1.0" "/include" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") -string(REPLACE "mongoc-static-1.0" "mongoc-1.0" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config.cmake "${LIBMONGOC_CONFIG_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libmongoc-static-1.0/libmongoc-static-1.0-config.cmake "${LIBMONGOC_CONFIG_CMAKE}") -file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-static-1.0/libmongoc-static-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-static-1.0-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config-version.cmake) -file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-static-1.0/libmongoc-static-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmongoc-static-1.0) + set(PORT_POSTFIX "static-1.0") else() -file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-1.0/libmongoc-1.0-config.cmake LIBMONGOC_CONFIG_CMAKE) -string(REPLACE "/../../../" "/../../" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") -string(REPLACE "/include/libmongoc-1.0" "/include" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config.cmake "${LIBMONGOC_CONFIG_CMAKE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libmongoc-1.0/libmongoc-1.0-config.cmake "${LIBMONGOC_CONFIG_CMAKE}") -file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-1.0/libmongoc-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-1.0-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config-version.cmake) -file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-1.0/libmongoc-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmongoc-1.0) + set(PORT_POSTFIX "1.0") endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + +file(READ ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake LIBMONGOC_CONFIG_CMAKE) +string(REPLACE "/include/libmongoc-1.0" "/include" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +string(REPLACE "mongoc-static-1.0" "mongoc-1.0" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake "${LIBMONGOC_CONFIG_CMAKE}") +file(COPY ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmongoc-${PORT_POSTFIX}) +file(COPY ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmongoc-${PORT_POSTFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config-version.cmake) vcpkg_copy_pdbs() -- cgit v1.2.3 From a23484228d7976883dd23a51daf4bc0e1c8b84bd Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Fri, 19 Jan 2018 13:06:04 +0800 Subject: [libwebp] update to 0.6.1 --- ports/libwebp/0001-add-install-to-cmake.patch | 21 --------------------- .../0002-add-missing-directory-to-cmake.patch | 12 ------------ ports/libwebp/CONTROL | 2 +- ports/libwebp/portfile.cmake | 12 ++++-------- 4 files changed, 5 insertions(+), 42 deletions(-) delete mode 100644 ports/libwebp/0001-add-install-to-cmake.patch delete mode 100644 ports/libwebp/0002-add-missing-directory-to-cmake.patch diff --git a/ports/libwebp/0001-add-install-to-cmake.patch b/ports/libwebp/0001-add-install-to-cmake.patch deleted file mode 100644 index 206e87fc3..000000000 --- a/ports/libwebp/0001-add-install-to-cmake.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0c62dd19..a2f72106 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -95,6 +95,16 @@ foreach(I_FILE RANGE ${WEBP_SIMD_FILES_TO_INCLUDE_RANGE}) - ) - endforeach() - -+# Install the headers -+file(GLOB PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/*.h) -+install(FILES ${PUBLIC_HEADERS} DESTINATION include/webp) -+ -+# Install the library -+install(TARGETS webp -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) -+ - # Build the executables if asked for. - if(WEBP_BUILD_CWEBP OR WEBP_BUILD_DWEBP OR - WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) diff --git a/ports/libwebp/0002-add-missing-directory-to-cmake.patch b/ports/libwebp/0002-add-missing-directory-to-cmake.patch deleted file mode 100644 index 92c52a9c7..000000000 --- a/ports/libwebp/0002-add-missing-directory-to-cmake.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a2f72106..469f03b4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -68,6 +68,7 @@ parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/dec "WEBP_SRCS") - parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/demux "WEBP_SRCS") - parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/dsp "WEBP_SRCS") - parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/enc "WEBP_SRCS") -+parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_SRCS") - parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/utils "WEBP_SRCS") - - # Remove the files specific to SIMD we don't use. diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index e042390f4..0e63f5b39 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -1,3 +1,3 @@ Source: libwebp -Version: 0.6.0-2 +Version: 0.6.1 Description: Lossy compression of digital photographic images. diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 2c70513b8..22c028452 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(WEBP_VERSION 0.6.0) -set(WEBP_HASH 59491b3837c7c96e56407c479722ad48b08b6133b123b61f66c5f0b61a1e8222ed20006b5c6fc708791bed72ac65e707aa25635e07fd11c81f26cc1e23892f48) +set(WEBP_VERSION 0.6.1) +set(WEBP_HASH f2512db136c9d9a455463134df1aff427f9d603aedd4cabd97ad26f3fa717806427f10a3162a94322900f2457268c867f1b655fc2a6a99d58c4141145979797a) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libwebp-${WEBP_VERSION}) vcpkg_download_distfile(ARCHIVE @@ -11,12 +11,6 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-add-install-to-cmake.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-add-missing-directory-to-cmake.patch -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -29,6 +23,8 @@ vcpkg_build_cmake() vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebp) -- cgit v1.2.3 From 6fbd38035aa262ca6a2c9e06c5bd1091ab21a48d Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Fri, 19 Jan 2018 13:08:23 +0800 Subject: [libjpeg-turbo] update to 1.5.3 --- ports/libjpeg-turbo/CONTROL | 2 +- ports/libjpeg-turbo/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libjpeg-turbo/CONTROL b/ports/libjpeg-turbo/CONTROL index d63d15db9..2bb119dbc 100644 --- a/ports/libjpeg-turbo/CONTROL +++ b/ports/libjpeg-turbo/CONTROL @@ -1,3 +1,3 @@ Source: libjpeg-turbo -Version: 1.5.2-2 +Version: 1.5.3 Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index a3e882b1f..a3c0e65b6 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libjpeg-turbo/libjpeg-turbo - REF 1.5.2 - SHA512 43f0c3e8c87bef4f0010827fd3c245df2467c0a6c714d2984284d3a64f933d06bbffc9fb893c8f3f2cd7f8fce2702cf39074c34e5bf370d90d1ca0d03c803590 + REF 1.5.3 + SHA512 0e7a2cd9943b610f49b562c20a5c350a50326a87bce1d39f14fe45760ed2f89a0d2d3e3f0de9f6a7714f566aabadec6b2422b592591ebb98bbad600ea411fea7 HEAD_REF master ) -- cgit v1.2.3 From 5b1cff5b3cb2cab9d59b0c21270add9fa55f7dd9 Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Fri, 19 Jan 2018 13:10:01 +0800 Subject: [libogg] update to 1.3.3 --- ports/libogg/CONTROL | 2 +- ports/libogg/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libogg/CONTROL b/ports/libogg/CONTROL index 39205bd71..459cdaf95 100644 --- a/ports/libogg/CONTROL +++ b/ports/libogg/CONTROL @@ -1,3 +1,3 @@ Source: libogg -Version: 1.3.2-cab46b1-3 +Version: 1.3.3 Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs. diff --git a/ports/libogg/portfile.cmake b/ports/libogg/portfile.cmake index a3640c54c..d0efac69a 100644 --- a/ports/libogg/portfile.cmake +++ b/ports/libogg/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/ogg - REF cab46b19847eb1d38aeda73ab4708716e5776366 - SHA512 3a5add81210a699c219ef3cef52ed71e00069dfee160aaf23bb68126f768a57139a77022f8c7bec88143a9393865a1e81b0a4c4e7b9e7f533dc665d656e99d90 + REF v1.3.3 + SHA512 0bd6095d647530d4cb1f509eb5e99965a25cc3dd9b8125b93abd6b248255c890cf20710154bdec40568478eb5c4cde724abfb2eff1f3a04e63acef0fbbc9799b HEAD_REF master ) -- cgit v1.2.3 From 933c46267b202238b27cd6a25d23a822a3c8e2e3 Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Fri, 19 Jan 2018 13:11:48 +0800 Subject: [libwebsockets] update to 2.4.1 --- ports/libwebsockets/0001-Fix-UWP.patch | 120 ++++++++++++++++++--------------- ports/libwebsockets/CONTROL | 2 +- ports/libwebsockets/portfile.cmake | 20 +++++- 3 files changed, 82 insertions(+), 60 deletions(-) diff --git a/ports/libwebsockets/0001-Fix-UWP.patch b/ports/libwebsockets/0001-Fix-UWP.patch index 8996c4e0e..c4cf22140 100644 --- a/ports/libwebsockets/0001-Fix-UWP.patch +++ b/ports/libwebsockets/0001-Fix-UWP.patch @@ -1,91 +1,99 @@ -diff --git a/lib/lws-plat-win.c b/lib/lws-plat-win.c +diff --git a/lib/plat/lws-plat-win.c b/lib/plat/lws-plat-win.c index dd3e95a..eb1690a 100644 ---- a/lib/lws-plat-win.c -+++ b/lib/lws-plat-win.c -@@ -155,7 +155,7 @@ lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi) +--- a/lib/plat/lws-plat-win.c ++++ b/lib/plat/lws-plat-win.c +@@ -157,7 +157,7 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi) { - struct lws_context_per_thread *pt = &context->pt[tsi]; + struct lws_context_per_thread *pt; WSANETWORKEVENTS networkevents; - struct lws_pollfd *pfd; + struct lws_pollfd *pfd = NULL; struct lws *wsi; unsigned int i; DWORD ev; -@@ -493,6 +493,7 @@ lws_plat_inet_ntop(int af, const void *src, char *dst, int cnt) - return ok ? dst : NULL; +@@ -591,6 +591,7 @@ lws_plat_inet_pton(int af, const char *src, void *dst) + return ok ? 1 : -1; } +#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) - static lws_filefd_type - _lws_plat_file_open(struct lws *wsi, const char *filename, - unsigned long *filelen, int flags) -@@ -516,6 +517,35 @@ _lws_plat_file_open(struct lws *wsi, const char *filename, - - return ret; + LWS_VISIBLE lws_fop_fd_t + _lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename, + const char *vpath, lws_fop_flags_t *flags) +@@ -631,6 +632,49 @@ _lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename, + bail: + return NULL; } +#else -+static lws_filefd_type -+_lws_plat_file_open(struct lws *wsi, const char *filename, -+ unsigned long *filelen, int flags) ++LWS_VISIBLE lws_fop_fd_t ++_lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename, ++ const char *vpath, lws_fop_flags_t *flags) +{ -+ HANDLE ret; -+ WCHAR buf[MAX_PATH]; ++ HANDLE ret; ++ WCHAR buf[MAX_PATH]; ++ lws_fop_fd_t fop_fd; ++ LARGE_INTEGER llFileSize = {0}; ++ ++ MultiByteToWideChar(CP_UTF8, 0, filename, -1, buf, ARRAY_SIZE(buf)); ++ if (((*flags) & 7) == _O_RDONLY) { ++ ret = CreateFile2(buf, GENERIC_READ, FILE_SHARE_READ, ++ OPEN_EXISTING, NULL); ++ } else { ++ lwsl_err("%s: open for write not implemented\n", __func__); ++ *filelen = 0; ++ ret = LWS_INVALID_FILE; ++ } ++ ++ if (ret == LWS_INVALID_FILE) ++ goto bail; ++ ++ fop_fd = malloc(sizeof(*fop_fd)); ++ if (!fop_fd) ++ goto bail; ++ ++ fop_fd->fops = fops; ++ fop_fd->fd = ret; ++ fop_fd->filesystem_priv = NULL; /* we don't use it */ ++ fop_fd->flags = *flags; ++ fop_fd->len = GetFileSize(ret, NULL); ++ if(GetFileSizeEx(ret, &llFileSize)) ++ fop_fd->len = llFileSize.QuadPart; + -+ (void)wsi; -+ MultiByteToWideChar(CP_UTF8, 0, filename, -1, buf, ARRAY_SIZE(buf)); -+ if ((flags & 7) == _O_RDONLY) { -+ ret = CreateFile2(buf, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, NULL); -+ } -+ else { -+ lwsl_err("%s: open for write not implemented\n", __func__); -+ *filelen = 0; -+ return LWS_INVALID_FILE; -+ } ++ fop_fd->pos = 0; + -+ if (ret != LWS_INVALID_FILE) -+ { -+ struct stat info; -+ int result = stat(filename, &info); -+ *filelen = result != 0 ? -1 : (long)(info.st_size); -+ } ++ return fop_fd; + -+ return ret; ++bail: ++ return NULL; +} +#endif - static int - _lws_plat_file_close(struct lws *wsi, lws_filefd_type fd) + LWS_VISIBLE int + _lws_plat_file_close(lws_fop_fd_t *fop_fd) diff --git a/lib/private-libwebsockets.h b/lib/private-libwebsockets.h index 23f8f4d..bc32aef 100644 --- a/lib/private-libwebsockets.h +++ b/lib/private-libwebsockets.h -@@ -48,12 +48,25 @@ +@@ -111,12 +111,23 @@ + #define WIN32_LEAN_AND_MEAN #endif - #if defined(WIN32) || defined(_WIN32) -+ +#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) -+ #ifndef WINVER -+ #define WINVER 0x0602 -+ #define _WIN32_WINNT WINVER -+ #endif ++#ifndef WINVER ++#define WINVER 0x0602 ++#define _WIN32_WINNT WINVER ++#endif + -+ #define getenv(x) NULL -+ #define _WINSOCK_DEPRECATED_NO_WARNINGS ++#define getenv(x) NULL ++#define _WINSOCK_DEPRECATED_NO_WARNINGS +#else + #if (WINVER < 0x0501) --#undef WINVER --#undef _WIN32_WINNT --#define WINVER 0x0501 --#define _WIN32_WINNT WINVER -+ #undef WINVER -+ #undef _WIN32_WINNT -+ #define WINVER 0x0501 -+ #define _WIN32_WINNT WINVER -+ #endif + #undef WINVER + #undef _WIN32_WINNT + #define WINVER 0x0501 + #define _WIN32_WINNT WINVER #endif -+ ++#endif #define LWS_NO_DAEMONIZE #define LWS_ERRNO WSAGetLastError() #define LWS_EAGAIN WSAEWOULDBLOCK diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL index 64bf929bd..50db40c85 100644 --- a/ports/libwebsockets/CONTROL +++ b/ports/libwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: libwebsockets -Version: 2.0.0-4 +Version: 2.4.1 Build-Depends: zlib, openssl 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 ae74f5268..ca6c49a73 100644 --- a/ports/libwebsockets/portfile.cmake +++ b/ports/libwebsockets/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO warmcat/libwebsockets - REF v2.0.0 - SHA512 26bc09877c1595b80b08e788e4ae3908af86b67e19f4b9f7ac48d90783cf5c563d4d03e5586d18f6bb8e67d15a03d000f31f67f3a327d898844f77e5d22f7c9d + REF v2.4.1 + SHA512 a5f6a3388517d6f46183dfd1e625475ac1d4d509690e431a581d6ca927078fa50ac9a0787b4305fe088c694af1809335020bfc083a4d4d98585143f13ff61c75 HEAD_REF master ) @@ -35,7 +35,21 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/libwebsockets-test-server) +file(READ ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsConfig.cmake LIBWEBSOCKETSCONFIG_CMAKE) +string(REPLACE "/../include" "/../../include" LIBWEBSOCKETSCONFIG_CMAKE "${LIBWEBSOCKETSCONFIG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsConfig.cmake "${LIBWEBSOCKETSCONFIG_CMAKE}") +file(READ ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake LIBWEBSOCKETSTARGETSDEBUG_CMAKE) +string(REPLACE "websockets_static.lib" "websockets.lib" LIBWEBSOCKETSTARGETSDEBUG_CMAKE "${LIBWEBSOCKETSTARGETSDEBUG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake "${LIBWEBSOCKETSTARGETSDEBUG_CMAKE}") +file(READ ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake LIBWEBSOCKETSTARGETSRELEASE_CMAKE) +string(REPLACE "websockets_static.lib" "websockets.lib" LIBWEBSOCKETSTARGETSRELEASE_CMAKE "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}") file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebsockets) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LICENSE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/copyright) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/websockets_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/websockets.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/websockets_static.lib ${CURRENT_PACKAGES_DIR}/lib/websockets.lib) +endif () vcpkg_copy_pdbs() -- cgit v1.2.3 From c761d3704d79475e59cb30a8668a1453e3d23b58 Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Fri, 19 Jan 2018 13:13:06 +0800 Subject: [tiff] update to 4.0.9 --- ports/tiff/CONTROL | 2 +- ports/tiff/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/tiff/CONTROL b/ports/tiff/CONTROL index 0222fa809..7a91d1d5b 100644 --- a/ports/tiff/CONTROL +++ b/ports/tiff/CONTROL @@ -1,4 +1,4 @@ Source: tiff -Version: 4.0.8-1 +Version: 4.0.9 Build-Depends: zlib, libjpeg-turbo, liblzma (windows) Description: A library that supports the manipulation of TIFF image files diff --git a/ports/tiff/portfile.cmake b/ports/tiff/portfile.cmake index 292389350..e14079c31 100644 --- a/ports/tiff/portfile.cmake +++ b/ports/tiff/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(LIBTIFF_VERSION 4.0.8) -set(LIBTIFF_HASH 5d010ec4ce37aca733f7ab7db9f432987b0cd21664bd9d99452a146833c40f0d1e7309d1870b0395e947964134d5cfeb1366181e761fe353ad585803ff3d6be6) +set(LIBTIFF_VERSION 4.0.9) +set(LIBTIFF_HASH 04f3d5eefccf9c1a0393659fe27f3dddd31108c401ba0dc587bca152a1c1f6bc844ba41622ff5572da8cc278593eff8c402b44e7af0a0090e91d326c2d79f6cd) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tiff-${LIBTIFF_VERSION}) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From a5e1ae77a9f78a75e47c18f1c438e9a4692328da Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Fri, 19 Jan 2018 13:14:26 +0800 Subject: [xxhash] update to 0.6.4 --- ports/xxhash/CONTROL | 2 +- ports/xxhash/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/xxhash/CONTROL b/ports/xxhash/CONTROL index 3ca3cb512..2501630a0 100644 --- a/ports/xxhash/CONTROL +++ b/ports/xxhash/CONTROL @@ -1,3 +1,3 @@ Source: xxhash -Version: 0.6.3-1 +Version: 0.6.4 Description: Extremely fast hash algorithm diff --git a/ports/xxhash/portfile.cmake b/ports/xxhash/portfile.cmake index 3330174b8..c23f24623 100644 --- a/ports/xxhash/portfile.cmake +++ b/ports/xxhash/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Cyan4973/xxHash - REF v0.6.3 - SHA512 5b11009ecf142725c642be55e9072792709bd40d8674f30afdc13f9b9fd6936ea69e683c7b9df212b5126f9ba3925969fc0b65bb5518506b501bb339d3a29372 + REF v0.6.4 + SHA512 6c914bac5092dfd01349c8223c382d3c13ba1b22e08300ce86ea9663a9a934f930debdeb71c14365ec57d72b95088a4354da92dfb7fcf7d07ec01c0f4fb70ca7 HEAD_REF dev) vcpkg_configure_cmake( -- cgit v1.2.3 From b17566a694a0b49a2abce58dc90b32e791081f85 Mon Sep 17 00:00:00 2001 From: Calum Robinson Date: Fri, 19 Jan 2018 15:33:18 +0000 Subject: [osg] Keep debug plugins separate --- ports/osg/CONTROL | 2 +- ports/osg/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL index df2af4bc1..4e3a308a4 100644 --- a/ports/osg/CONTROL +++ b/ports/osg/CONTROL @@ -1,4 +1,4 @@ Source: osg -Version: 3.5.6-1 +Version: 3.5.6-2 Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit. Build-Depends: freetype, jasper, openexr, zlib, gdal, giflib, libjpeg-turbo, libpng, tiff diff --git a/ports/osg/portfile.cmake b/ports/osg/portfile.cmake index 5d68a57be..ac6f8e2ee 100644 --- a/ports/osg/portfile.cmake +++ b/ports/osg/portfile.cmake @@ -47,7 +47,7 @@ file(GLOB OSG_TOOLS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(REMOVE_RECURSE ${OSG_TOOLS_DBG}) file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.5.6/*.dll) -file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-3.5.6) +file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/osg/osgPlugins-3.5.6) file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.5.6/*.dll) file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-3.5.6) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.5.6/) -- cgit v1.2.3 From f522ff0811b82ea4300aa373e5a5b4729a8b6bba Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 19 Jan 2018 14:46:52 -0800 Subject: [opencv] Improve CMake usage instructions --- ports/opencv/portfile.cmake | 2 ++ ports/opencv/usage | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 ports/opencv/usage diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 5e3c98555..a91020f24 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -199,6 +199,8 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME} file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/opencv) + vcpkg_copy_pdbs() set(VCPKG_LIBRARY_LINKAGE "dynamic") diff --git a/ports/opencv/usage b/ports/opencv/usage new file mode 100644 index 000000000..b9df60b82 --- /dev/null +++ b/ports/opencv/usage @@ -0,0 +1,5 @@ +The package opencv provides CMake integration: + + find_package(OpenCV REQUIRED) + include_directories(${OpenCV_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${OpenCV_LIBS}) -- cgit v1.2.3 From 228eebfbecf2e5d0a4c901820b26659137707d7a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 19 Jan 2018 15:23:47 -0800 Subject: [vcpkg] Add additional tests. Enable featurepackages by default. --- toolsrc/src/tests.plan.cpp | 69 +++++++++++++++++++++++++++++++++ toolsrc/src/vcpkg/globalstate.cpp | 2 +- toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 5 +++ 3 files changed, 75 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 781588c91..593003b80 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -434,6 +434,75 @@ namespace UnitTest1 Assert::IsTrue(install_plan.size() == 1); features_check(&install_plan[0], "a", {"0", "1", "core"}, Triplet::X64_WINDOWS); } + + TEST_METHOD(transitive_features_test) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_a_64 = FullPackageSpec{spec_map.emplace("a", "b", {{"0", "b[0]"}}), {"core"}}; + auto spec_b_64 = FullPackageSpec{spec_map.emplace("b", "c", {{"0", "c[0]"}}), {"core"}}; + auto spec_c_64 = FullPackageSpec{spec_map.emplace("c", "", {{"0", ""}}), {"core"}}; + + auto install_specs = FullPackageSpec::from_string("a[*]", Triplet::X64_WINDOWS); + Assert::IsTrue(install_specs.has_value()); + if (!install_specs.has_value()) return; + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::IsTrue(install_plan.size() == 3); + features_check(&install_plan[0], "c", {"0", "core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[1], "b", {"0", "core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[2], "a", {"0", "core"}, Triplet::X64_WINDOWS); + } + + TEST_METHOD(no_transitive_features_test) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_a_64 = FullPackageSpec{spec_map.emplace("a", "b", {{"0", ""}}), {"core"}}; + auto spec_b_64 = FullPackageSpec{spec_map.emplace("b", "c", {{"0", ""}}), {"core"}}; + auto spec_c_64 = FullPackageSpec{spec_map.emplace("c", "", {{"0", ""}}), {"core"}}; + + auto install_specs = FullPackageSpec::from_string("a[*]", Triplet::X64_WINDOWS); + Assert::IsTrue(install_specs.has_value()); + if (!install_specs.has_value()) return; + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::IsTrue(install_plan.size() == 3); + features_check(&install_plan[0], "c", {"core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[1], "b", {"core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[2], "a", {"0", "core"}, Triplet::X64_WINDOWS); + } + + TEST_METHOD(only_transitive_features_test) + { + std::vector> status_paragraphs; + + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_a_64 = FullPackageSpec{spec_map.emplace("a", "", {{"0", "b[0]"}}), {"core"}}; + auto spec_b_64 = FullPackageSpec{spec_map.emplace("b", "", {{"0", "c[0]"}}), {"core"}}; + auto spec_c_64 = FullPackageSpec{spec_map.emplace("c", "", {{"0", ""}}), {"core"}}; + + auto install_specs = FullPackageSpec::from_string("a[*]", Triplet::X64_WINDOWS); + Assert::IsTrue(install_specs.has_value()); + if (!install_specs.has_value()) return; + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::IsTrue(install_plan.size() == 3); + features_check(&install_plan[0], "c", {"0", "core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[1], "b", {"0", "core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[2], "a", {"0", "core"}, Triplet::X64_WINDOWS); + } }; static PackageSpec unsafe_pspec(std::string name, Triplet t = Triplet::X86_WINDOWS) diff --git a/toolsrc/src/vcpkg/globalstate.cpp b/toolsrc/src/vcpkg/globalstate.cpp index 123c77d46..eac69d9f5 100644 --- a/toolsrc/src/vcpkg/globalstate.cpp +++ b/toolsrc/src/vcpkg/globalstate.cpp @@ -8,7 +8,7 @@ namespace vcpkg Util::LockGuarded GlobalState::g_surveydate; std::atomic GlobalState::debugging(false); - std::atomic GlobalState::feature_packages(false); + std::atomic GlobalState::feature_packages(true); std::atomic GlobalState::g_init_console_cp(0); std::atomic GlobalState::g_init_console_output_cp(0); diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 671a89892..84ad17fe3 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -129,6 +129,11 @@ namespace vcpkg GlobalState::feature_packages = true; continue; } + if (arg == "--no-featurepackages") + { + GlobalState::feature_packages = false; + continue; + } const auto eq_pos = arg.find('='); if (eq_pos != std::string::npos) -- cgit v1.2.3 From b7b61e917fb62dcf1f4f7444cd34109431633446 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 19 Jan 2018 15:34:43 -0800 Subject: [poco] Update to 1.8.1 --- ports/poco/CONTROL | 2 +- ports/poco/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index 69166867f..ea16a2644 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,5 +1,5 @@ Source: poco -Version: 1.8.0.1 +Version: 1.8.1 Build-Depends: zlib, pcre, sqlite3, expat Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 6a187fac8..6d3db0fa4 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pocoproject/poco - REF poco-1.8.0.1-release - SHA512 b4a58053235582038186bdddbfa4842833bb3529af9522662e935efaf852f5155addd510729ea5c148b3bcc57ed3b8287cd98cbeb6d04e1a13bd31fadbdf7ad8 + REF poco-1.8.1-release + SHA512 ca57b30c10fc4e611dbdd90c7e36db34b8cb9a7dae675dc8aed37457a26d3433080caf26eaace85adf8d6a6ad7945c49f7c66f274b26fe9cc0c7d5107be3828e HEAD_REF master ) -- cgit v1.2.3 From 55415f920077be653dfa79d8cf3db4c3a8cfd937 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 19 Jan 2018 16:26:30 -0800 Subject: [boost-asio] Added openssl as a dependency since most users will want it --- ports/boost-asio/CONTROL | 4 ++-- ports/boost-vcpkg-helpers/generate-ports.ps1 | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ports/boost-asio/CONTROL b/ports/boost-asio/CONTROL index 3df7042e6..8335a6dd8 100644 --- a/ports/boost-asio/CONTROL +++ b/ports/boost-asio/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-asio -Version: 1.66.0 -Build-Depends: boost-coroutine (windows), boost-date-time, boost-regex, boost-system, boost-vcpkg-helpers +Version: 1.66.0-1 +Build-Depends: boost-coroutine (windows), boost-date-time, boost-regex, boost-system, boost-vcpkg-helpers, openssl Description: Boost asio module diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index 62cfe5cc2..0b186caa4 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -22,7 +22,7 @@ function Generate() $sanitizedName = $name -replace "_","-" $versionsuffix = "" - if ($Name -eq "test" -or $Name -eq "python") + if ($Name -eq "test" -or $Name -eq "python" -or $Name -eq "asio") { $versionsuffix = "-1" } @@ -325,6 +325,10 @@ foreach ($library in $libraries) { $deps += @("zlib", "bzip2") } + elseif ($library -eq "asio") + { + $deps += @("openssl") + } Generate ` -Name $library ` -- cgit v1.2.3 From c407c6db1c68e3d72bc39e0509b9b02d26184445 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 20 Jan 2018 16:18:36 +0200 Subject: [cgicc] init #2550 --- ports/cgicc/CMakeLists.txt | 115 +++++++++++++++++++++++++++++++++++++++++++++ ports/cgicc/CONTROL | 3 ++ ports/cgicc/portfile.cmake | 25 ++++++++++ 3 files changed, 143 insertions(+) create mode 100644 ports/cgicc/CMakeLists.txt create mode 100644 ports/cgicc/CONTROL create mode 100644 ports/cgicc/portfile.cmake diff --git a/ports/cgicc/CMakeLists.txt b/ports/cgicc/CMakeLists.txt new file mode 100644 index 000000000..0a9ad3e13 --- /dev/null +++ b/ports/cgicc/CMakeLists.txt @@ -0,0 +1,115 @@ + +cmake_minimum_required (VERSION 3.8) +project (cgicc) +include (CheckIncludeFiles) +include(CheckSymbolExists) +include (CheckCXXSourceCompiles) + +set (VERSION "3.2.19") +execute_process (COMMAND hostname OUTPUT_VARIABLE HOST OUTPUT_STRIP_TRAILING_WHITESPACE) +check_include_files (dlfcn.h HAVE_DLFCN_H) +check_symbol_exists(gettimeofday sys/time.h HAVE_GETTIMEOFDAY) +check_include_files (inttypes.h HAVE_INTTYPES_H) +check_include_files (memory.h HAVE_MEMORY_H) + +check_cxx_source_compiles (" + namespace test { } + int main(int, char**) { + using namespace ::test; +}" HAVE_NAMESPACES) +check_include_files (stdint.h HAVE_STDINT_H) +check_include_files (stdlib.h HAVE_STDLIB_H) +set (CMAKE_REQUIRED_FLAGS "-DHAVE_NAMESPACES") +check_cxx_source_compiles (" + #include + #include + #ifdef HAVE_NAMESPACES + using namespace std; +#endif +int +main () +{ +list x; x.push_back(5); +list::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0; + ; + return 0; +}" HAVE_STL) +check_include_files (strings.h HAVE_STRINGS_H) +check_include_files (string.h HAVE_STRING_H) +check_include_files (sys/stat.h HAVE_SYS_STAT_H) +check_include_files (sys/time.h HAVE_SYS_TIME_H) +check_include_files (sys/types.h HAVE_SYS_TYPES_H) +check_include_files (sys/utsname.h HAVE_SYS_UTSNAME_H) +check_symbol_exists (uname sys/utsname.h HAVE_UNAME) +check_include_files (unistd.h HAVE_UNISTD_H) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/CgiDefs.h.in ${CMAKE_CURRENT_BINARY_DIR}/CgiDefs.h) +add_definitions (-DHAVE_CONFIG_H) +set (cgicc_SOURCES + cgicc/CgiEnvironment.cpp + cgicc/CgiInput.cpp + cgicc/CgiUtils.cpp + cgicc/Cgicc.cpp + cgicc/FormEntry.cpp + cgicc/FormFile.cpp + cgicc/HTMLAttribute.cpp + cgicc/HTMLAttributeList.cpp + cgicc/HTMLDoctype.cpp + cgicc/HTMLElement.cpp + cgicc/HTMLElementList.cpp + cgicc/HTTPContentHeader.cpp + cgicc/HTTPCookie.cpp + cgicc/HTTPHTMLHeader.cpp + cgicc/HTTPHeader.cpp + cgicc/HTTPPlainHeader.cpp + cgicc/HTTPRedirectHeader.cpp + cgicc/HTTPResponseHeader.cpp + cgicc/HTTPStatusHeader.cpp + cgicc/HTTPXHTMLHeader.cpp + cgicc/MStreamable.cpp + cgicc/XHTMLDoctype.cpp +cgicc/XMLPI.cpp) +set (cgicc_HEADERS + cgicc/Cgicc.h + cgicc/CgiEnvironment.h + cgicc/CgiInput.h + cgicc/CgiUtils.h + cgicc/FormEntry.h + cgicc/FormFile.h + cgicc/HTMLAtomicElement.h + cgicc/HTMLAttribute.h + cgicc/HTMLAttributeList.h + cgicc/HTMLBooleanElement.h + cgicc/HTMLClasses.h + cgicc/HTMLDoctype.h + cgicc/HTMLElement.h + cgicc/HTMLElementList.h + cgicc/HTTPContentHeader.h + cgicc/HTTPCookie.h + cgicc/HTTPHeader.h + cgicc/HTTPHTMLHeader.h + cgicc/HTTPPlainHeader.h + cgicc/HTTPRedirectHeader.h + cgicc/HTTPResponseHeader.h + cgicc/HTTPStatusHeader.h + cgicc/HTTPXHTMLHeader.h + cgicc/MStreamable.h + cgicc/XHTMLDoctype.h + cgicc/XMLDeclaration.h + cgicc/XMLPI.h + ${CMAKE_CURRENT_BINARY_DIR}/CgiDefs.h + ${CMAKE_CURRENT_BINARY_DIR}/config.h +) + +include_directories (. ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +add_library (cgicc ${cgicc_SOURCES} ${cgicc_HEADERS}) + +install(TARGETS cgicc + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${cgicc_HEADERS} DESTINATION include/cgicc) +endif() diff --git a/ports/cgicc/CONTROL b/ports/cgicc/CONTROL new file mode 100644 index 000000000..2ea370eb5 --- /dev/null +++ b/ports/cgicc/CONTROL @@ -0,0 +1,3 @@ +Source: cgicc +Version: +Description: diff --git a/ports/cgicc/portfile.cmake b/ports/cgicc/portfile.cmake new file mode 100644 index 000000000..9851e0f80 --- /dev/null +++ b/ports/cgicc/portfile.cmake @@ -0,0 +1,25 @@ + +include(vcpkg_common_functions) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "Warning: Dynamic building not supported. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) + endif() +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cgicc-3.2.19) +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnu.org/gnu/cgicc/cgicc-3.2.19.tar.gz" + FILENAME "cgicc-3.2.19.tar.gz" + SHA512 c361923cf3ac876bc3fc94dffd040d2be7cd44751d8534f4cfa3545e9f58a8ec35ebcd902a8ce6a19da0efe52db67506d8b02e5cc868188d187ce3092519abdf +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.DOC DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgicc RENAME copyright) -- cgit v1.2.3 From 9863dd8b136d3b66ad34b6cffbc3913fe561cc85 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 20 Jan 2018 16:21:27 +0200 Subject: [cgicc] fix documentation --- ports/cgicc/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/cgicc/CONTROL b/ports/cgicc/CONTROL index 2ea370eb5..6caa44df1 100644 --- a/ports/cgicc/CONTROL +++ b/ports/cgicc/CONTROL @@ -1,3 +1,3 @@ Source: cgicc -Version: -Description: +Version: 3.2.19 +Description: GNU Cgicc is an ANSI C++ compliant class library that greatly simplifies the creation of CGI applications for the World Wide Web -- cgit v1.2.3 From 751877f4e8141e99ca01225fe338ff328fb913d5 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 21 Jan 2018 12:48:37 +0200 Subject: [libdisasm] init --- ports/libdisasm/CMakeLists.txt | 46 ++++++++++++++++++++++++++++++++++++++++ ports/libdisasm/CONTROL | 3 +++ ports/libdisasm/portfile.cmake | 34 +++++++++++++++++++++++++++++ ports/libdisasm/sizeofvoid.patch | 29 +++++++++++++++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 ports/libdisasm/CMakeLists.txt create mode 100644 ports/libdisasm/CONTROL create mode 100644 ports/libdisasm/portfile.cmake create mode 100644 ports/libdisasm/sizeofvoid.patch diff --git a/ports/libdisasm/CMakeLists.txt b/ports/libdisasm/CMakeLists.txt new file mode 100644 index 000000000..295f0f72b --- /dev/null +++ b/ports/libdisasm/CMakeLists.txt @@ -0,0 +1,46 @@ +cmake_minimum_required(VERSION 3.9) +project(libdisasm) +set( + SRCS + ia32_implicit.c + ia32_implicit.h + ia32_insn.c + ia32_insn.h + ia32_invariant.c + ia32_invariant.h + ia32_modrm.c + ia32_modrm.h + ia32_opcode_tables.c + ia32_opcode_tables.h + ia32_operand.c + ia32_operand.h + ia32_reg.c + ia32_reg.h + ia32_settings.c + ia32_settings.h + libdis.h + qword.h + x86_disasm.c + x86_format.c + x86_imm.c + x86_imm.h + x86_insn.c + x86_misc.c + x86_operand_list.c + x86_operand_list.h +) + +include_directories(libdisasm) + +add_library(libdisasm ${SRCS}) + +install( + TARGETS libdisasm + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES libdis.h DESTINATION include) +endif() diff --git a/ports/libdisasm/CONTROL b/ports/libdisasm/CONTROL new file mode 100644 index 000000000..3d41823ca --- /dev/null +++ b/ports/libdisasm/CONTROL @@ -0,0 +1,3 @@ +Source: libdisasm +Version: 0.23 +Description: x86 Disassembler Library. diff --git a/ports/libdisasm/portfile.cmake b/ports/libdisasm/portfile.cmake new file mode 100644 index 000000000..21a022c42 --- /dev/null +++ b/ports/libdisasm/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "Warning: Dynamic building not supported. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) + endif() + +set(BASE_PATH ${CURRENT_BUILDTREES_DIR}/src/libdisasm-0.23) +set(SOURCE_PATH ${BASE_PATH}/libdisasm) + +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/bastard/files/libdisasm/0.23/libdisasm-0.23.tar.gz" + FILENAME "libdisasm-0.23.tar.gz" + SHA512 29eecfbfd8168188242278a1a38f0c90770d0581a52d4600ae6343829dd0d6607b98329f12a3d7409d43dd56dca6a7d1eb25d58a001c2bfd3eb8474c0e7879e7 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/sizeofvoid.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${BASE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libdisasm RENAME copyright) diff --git a/ports/libdisasm/sizeofvoid.patch b/ports/libdisasm/sizeofvoid.patch new file mode 100644 index 000000000..428c5616c --- /dev/null +++ b/ports/libdisasm/sizeofvoid.patch @@ -0,0 +1,29 @@ +diff --git a/x86_disasm.c b/x86_disasm.c +index 04574fa..177bfb8 100644 +--- a/x86_disasm.c ++++ b/x86_disasm.c +@@ -35,7 +35,7 @@ unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len, + + if ( offset >= buf_len ) { + /* another caller screwup ;) */ +- x86_report_error(report_disasm_bounds, (void*)(long)buf_rva+offset); ++ x86_report_error(report_disasm_bounds, (void*)(long)(buf_rva+offset)); + return 0; + } + +@@ -53,13 +53,13 @@ unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len, + + /* check and see if we had an invalid instruction */ + if (! size ) { +- x86_report_error(report_invalid_insn, (void*)(long)buf_rva+offset ); ++ x86_report_error(report_invalid_insn, (void*)(long)(buf_rva+offset)); + return 0; + } + + /* check if we overran the end of the buffer */ + if ( size > len ) { +- x86_report_error( report_insn_bounds, (void*)(long)buf_rva + offset ); ++ x86_report_error( report_insn_bounds, (void*)(long)(buf_rva + offset)); + MAKE_INVALID( insn, bytes ); + return 0; + } -- cgit v1.2.3 From 27ada0615cd3ca307bd5cc8becc8ce12e71fe4d1 Mon Sep 17 00:00:00 2001 From: Koby Kahane Date: Mon, 22 Jan 2018 15:11:59 +0200 Subject: [lz4] update to 1.8.1.2 --- ports/lz4/CONTROL | 2 +- ports/lz4/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL index 5e8b87bd2..ae7d57377 100644 --- a/ports/lz4/CONTROL +++ b/ports/lz4/CONTROL @@ -1,3 +1,3 @@ Source: lz4 -Version: 1.8.0-1 +Version: 1.8.1.2 Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core. diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake index 6664c2b79..1928d7e70 100644 --- a/ports/lz4/portfile.cmake +++ b/ports/lz4/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lz4/lz4 - REF v1.8.0 - SHA512 aea46d4a900a3ede7dd7b498ee938ecd98397d3277c5b3a85b4236a44777cba85cd68a2f32c993b872afda96c5dafe0cb3dd391101fe8181e17c9f48884c1535 + REF v1.8.1.2 + SHA512 f4ed450bc05477cc6c2b42e6fe1fbb1fb0907f1d05b68b1d69d975b555ddb385550f204258e6d91642e14ce373815141dc218cda03b711793935d5458bc45c7f HEAD_REF dev) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 77eae92e75c4b0d15c14c1f19c93fb41bc60f25e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 22 Jan 2018 22:28:13 -0800 Subject: [vcpkg-docs] Add feature packages to core documentation of CONTROL files --- docs/maintainers/control-files.md | 53 +++++++++++++++++++++++++++++---- docs/specifications/feature-packages.md | 2 ++ 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/docs/maintainers/control-files.md b/docs/maintainers/control-files.md index 17cb50311..eb03f1d94 100644 --- a/docs/maintainers/control-files.md +++ b/docs/maintainers/control-files.md @@ -1,16 +1,29 @@ # CONTROL files + Each port has some static metadata in the form of a `CONTROL` file. This file uses the same syntax and a subset of the fields from [the Debian `control` format][debian]. Field names are case-sensitive. [debian]: https://www.debian.org/doc/debian-policy/ch-controlfields.html -## Recognized fields +## Source Paragraph + +The first paragraph appearing in a `CONTROL` file is the Source paragraph, which defines the core attributes of the package (name, version, and so on). + +### Example: +```no-highlight +Source: vtk +Version: 8.1.0-1 +Description: Software system for 3D computer graphics, image processing, and visualization +Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype +``` + +### Recognized fields -### Source +#### Source The name of the port. -### Version +#### Version The port version. This field should be an alphanumeric string which may also contain `.`, `_`, or `-`. No attempt at ordering versions is made; all versions are treated as bitstrings and are only evaluated for equality. @@ -22,15 +35,15 @@ Example: Version: 1.0.5-2 ``` -### Description +#### Description A description of the library The first sentence of the description should concisely describe the purpose and contents of the library. Then, a larger description including the library's "proper name" should follow. -### Maintainer +#### Maintainer Reserved for future use. -### Build-Depends +#### Build-Depends The list of dependencies required to build and use this library. Example: @@ -49,3 +62,31 @@ Example: Build-Depends: zlib (windows), openssl (windows), boost (windows), websocketpp (windows) ``` +## Feature Paragraphs + +After the Source Paragraph, `CONTROL` files can list zero or more Feature Paragraphs which declare features. + +### Example: +```no-highlight +Source: vtk +Version: 8.1.0-1 +Description: Software system for 3D computer graphics, image processing, and visualization +Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype + +Feature: mpi +Description: MPI functionality for VTK +Build-Depends: msmpi, hdf5[parallel] +``` + +### Recognized fields + +#### Feature +The name of the feature. + +#### Description +A description of the feature + +#### Build-Depends +The list of dependencies required to build and use this feature. + +All dependencies from selected features are unioned together to produce the final dependency set for the build. This field follows the same syntax as `Build-Depends` in the Source Paragraph. diff --git a/docs/specifications/feature-packages.md b/docs/specifications/feature-packages.md index 2c7f60ff9..198a602ba 100644 --- a/docs/specifications/feature-packages.md +++ b/docs/specifications/feature-packages.md @@ -1,5 +1,7 @@ # Proposal: Features / Feature packages (Feb 23 2017) +**Note: this is the proposal as it was initially accepted and does not neccessarily reflect the current behavior.** + ## 1. Motivation ### A. OpenCV + CUDA -- cgit v1.2.3 From bac1ed6b764482ec89ac4c480f04242777a0dbae Mon Sep 17 00:00:00 2001 From: jasjuang Date: Mon, 22 Jan 2018 23:01:36 -0800 Subject: [dlib] update to 19.9 --- ports/dlib/CONTROL | 2 +- ports/dlib/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index 51f4d1e03..b23776ff5 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,5 +1,5 @@ Source: dlib -Version: 19.8 +Version: 19.9 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3, openblas, clapack Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index 99784551a..fc63f494a 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO davisking/dlib - REF v19.8 - SHA512 5fbe306dab1fe025de0892808431ddc4bc6f3e91eb509881a0b341dd2d0a5a36c5d99d45ece19c428d6025b0601b996cab4b554332323a0c73a65d66b82db01a + REF v19.9 + SHA512 1e2123c22e1b13cc84108fa627bfa92eadc9dee63f93a9f45676bbf2b752c8728117d915ac327f5223b0cdbce87dd3bef2f4d8d5ed3f8f5a314ffa9e8962a246 HEAD_REF master ) -- cgit v1.2.3 From 0682bb734d5f8667d5aa1a8c2448d69fc042c53f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 22 Jan 2018 23:40:41 -0800 Subject: [vcpkg] Store Optional<&> instead of Optional<*> --- toolsrc/include/vcpkg/dependencies.h | 2 +- toolsrc/src/tests.plan.cpp | 3 +-- toolsrc/src/vcpkg/dependencies.cpp | 6 +++--- toolsrc/src/vcpkg/install.cpp | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 8902a7b08..84886c8dc 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -29,7 +29,7 @@ namespace vcpkg::Dependencies Optional status_paragraph; Optional binary_control_file; - Optional source_control_file; + Optional source_control_file; }; } diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 593003b80..0916e66c8 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -41,8 +41,7 @@ namespace UnitTest1 Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); - Assert::AreEqual(pkg_name.c_str(), - (*plan.any_paragraph.source_control_file.get())->core_paragraph->name.c_str()); + Assert::AreEqual(pkg_name.c_str(), plan.any_paragraph.source_control_file.get()->core_paragraph->name.c_str()); Assert::AreEqual(size_t(vec.size()), feature_list.size()); for (auto&& feature_name : vec) diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 76aeb0eaa..e48d85885 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -117,7 +117,7 @@ namespace vcpkg::Dependencies return PackageSpec::from_dependencies_of_port(p->core_paragraph.spec.name(), deps, triplet); } - if (const auto p = this->source_control_file.value_or(nullptr)) + if (const auto p = this->source_control_file.get()) { return PackageSpec::from_dependencies_of_port( p->core_paragraph->name, filter_dependencies(p->core_paragraph->depends, triplet), triplet); @@ -159,7 +159,7 @@ namespace vcpkg::Dependencies const RequestType& request_type) : spec(spec), plan_type(InstallPlanType::BUILD_AND_INSTALL), request_type(request_type), feature_list(features) { - this->any_paragraph.source_control_file = &any_paragraph; + this->any_paragraph.source_control_file = any_paragraph; } InstallPlanAction::InstallPlanAction(const PackageSpec& spec, @@ -418,7 +418,7 @@ namespace vcpkg::Dependencies return ExportPlanAction{spec, AnyParagraph{nullopt, std::move(*bcf), nullopt}, request_type}; auto maybe_scf = provider.get_control_file(spec.name()); - if (auto scf = maybe_scf.get()) return ExportPlanAction{spec, {nullopt, nullopt, scf}, request_type}; + if (auto scf = maybe_scf.get()) return ExportPlanAction{spec, {nullopt, nullopt, *scf}, request_type}; Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec); } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index d6a28d57c..3ecb627f5 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -293,7 +293,7 @@ namespace vcpkg::Install auto result = [&]() -> Build::ExtendedBuildResult { const Build::BuildPackageConfig build_config{ - *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), + action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), action.spec.triplet(), paths.port_dir(action.spec), action.build_options, -- cgit v1.2.3 From 3e42585f47a7c6abaa516cf2ed7b1e702ffd38ca Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 23 Jan 2018 01:54:31 -0800 Subject: [vcpkg] Span usage improvements. --- toolsrc/include/vcpkg/base/span.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/toolsrc/include/vcpkg/base/span.h b/toolsrc/include/vcpkg/base/span.h index 158f1ac74..c9ac18afe 100644 --- a/toolsrc/include/vcpkg/base/span.h +++ b/toolsrc/include/vcpkg/base/span.h @@ -11,15 +11,17 @@ namespace vcpkg struct Span { public: + static_assert(!std::is_reference::value, "Span<&> is illegal"); + using element_type = T; - using pointer = T*; - using reference = T&; - using iterator = T*; + using pointer = std::add_pointer_t; + using reference = std::add_lvalue_reference_t; + using iterator = pointer; constexpr Span() noexcept : m_ptr(nullptr), m_count(0) {} constexpr Span(std::nullptr_t) noexcept : Span() {} - constexpr Span(T* ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {} - constexpr Span(T* ptr_begin, T* ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {} + constexpr Span(pointer ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {} + constexpr Span(pointer ptr_begin, pointer ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {} constexpr Span(std::initializer_list l) noexcept : m_ptr(l.begin()), m_count(l.size()) {} template @@ -69,4 +71,4 @@ namespace vcpkg { return sp.end(); } -} \ No newline at end of file +} -- cgit v1.2.3 From 10d712ed018fe3b2cd8d485e41f32ad555d9a1f1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 23 Jan 2018 01:56:25 -0800 Subject: [vcpkg] Added StatusParagraph::is_installed() --- toolsrc/include/vcpkg/statusparagraph.h | 2 ++ toolsrc/src/vcpkg/statusparagraphs.cpp | 2 +- toolsrc/src/vcpkg/vcpkglib.cpp | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/toolsrc/include/vcpkg/statusparagraph.h b/toolsrc/include/vcpkg/statusparagraph.h index ca84b1bb7..051acf95f 100644 --- a/toolsrc/include/vcpkg/statusparagraph.h +++ b/toolsrc/include/vcpkg/statusparagraph.h @@ -32,6 +32,8 @@ namespace vcpkg StatusParagraph(); explicit StatusParagraph(std::unordered_map&& fields); + bool is_installed() const { return want == Want::INSTALL && state == InstallState::INSTALLED; } + BinaryParagraph package; Want want; InstallState state; diff --git a/toolsrc/src/vcpkg/statusparagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp index d4afc0427..19919b76f 100644 --- a/toolsrc/src/vcpkg/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg/statusparagraphs.cpp @@ -48,7 +48,7 @@ namespace vcpkg const Triplet& triplet) const { const const_iterator it = find(name, triplet); - if (it != end() && (*it)->want == Want::INSTALL && (*it)->state == InstallState::INSTALLED) + if (it != end() && (*it)->is_installed()) { return it; } diff --git a/toolsrc/src/vcpkg/vcpkglib.cpp b/toolsrc/src/vcpkg/vcpkglib.cpp index 5b2cec4d0..de6ffefed 100644 --- a/toolsrc/src/vcpkg/vcpkglib.cpp +++ b/toolsrc/src/vcpkg/vcpkglib.cpp @@ -173,7 +173,7 @@ namespace vcpkg std::vector installed_packages; for (auto&& pgh : status_db) { - if (pgh->state != InstallState::INSTALLED || pgh->want != Want::INSTALL) continue; + if (!pgh->is_installed()) continue; installed_packages.push_back(pgh.get()); } @@ -189,7 +189,7 @@ namespace vcpkg for (const std::unique_ptr& pgh : status_db) { - if (pgh->state != InstallState::INSTALLED || !pgh->package.feature.empty()) + if (!pgh->is_installed() || !pgh->package.feature.empty()) { continue; } -- cgit v1.2.3 From ff8a2d17266f1c601d04ac7b3c3e85ad674c8491 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 23 Jan 2018 02:21:47 -0800 Subject: [vcpkg] Remove AnyParagraph and InstallPlanType::INSTALL --- toolsrc/include/vcpkg/dependencies.h | 36 ++++----- toolsrc/include/vcpkg/statusparagraphs.h | 2 + toolsrc/src/tests.plan.cpp | 2 +- toolsrc/src/tests.utils.cpp | 1 - toolsrc/src/vcpkg/commands.exportifw.cpp | 9 +-- toolsrc/src/vcpkg/dependencies.cpp | 132 ++++++++++++++----------------- toolsrc/src/vcpkg/export.cpp | 5 +- toolsrc/src/vcpkg/install.cpp | 30 ++----- toolsrc/src/vcpkg/statusparagraphs.cpp | 23 +++++- 9 files changed, 116 insertions(+), 124 deletions(-) diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 84886c8dc..14f51c216 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -23,23 +23,10 @@ namespace vcpkg::Dependencies const Build::BuildPackageOptions& options); std::string to_output_string(RequestType request_type, const CStringView s); - struct AnyParagraph - { - std::vector dependencies(const Triplet& triplet) const; - - Optional status_paragraph; - Optional binary_control_file; - Optional source_control_file; - }; -} - -namespace vcpkg::Dependencies -{ enum class InstallPlanType { UNKNOWN, BUILD_AND_INSTALL, - INSTALL, ALREADY_INSTALLED, EXCLUDED }; @@ -51,18 +38,22 @@ namespace vcpkg::Dependencies InstallPlanAction(); InstallPlanAction(const PackageSpec& spec, + std::vector&& spghs, const std::unordered_set& features, const RequestType& request_type); - InstallPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type); + InstallPlanAction(const PackageSpec& spec, - const SourceControlFile& any_paragraph, + const SourceControlFile& scf, const std::unordered_set& features, const RequestType& request_type); std::string displayname() const; PackageSpec spec; - AnyParagraph any_paragraph; + + Optional source_control_file; + Optional> status_paragraphs; + InstallPlanType plan_type; RequestType request_type; Build::BuildPackageOptions build_options; @@ -111,12 +102,21 @@ namespace vcpkg::Dependencies static bool compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right); ExportPlanAction(); - ExportPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type); + ExportPlanAction(const PackageSpec& spec, + std::vector&& status_paragraphs, + const RequestType& request_type); + + ExportPlanAction(const PackageSpec& spec, const RequestType& request_type); PackageSpec spec; - AnyParagraph any_paragraph; ExportPlanType plan_type; RequestType request_type; + + Optional core_paragraph() const; + std::vector dependencies(const Triplet& triplet) const; + + private: + std::vector m_spghs; }; struct PortFileProvider diff --git a/toolsrc/include/vcpkg/statusparagraphs.h b/toolsrc/include/vcpkg/statusparagraphs.h index 747a0c1ab..51fbd14dd 100644 --- a/toolsrc/include/vcpkg/statusparagraphs.h +++ b/toolsrc/include/vcpkg/statusparagraphs.h @@ -21,6 +21,8 @@ namespace vcpkg std::vector*> find_all(const std::string& name, const Triplet& triplet); + std::vector*> find_all_installed(const PackageSpec& spec) const; + const_iterator find_installed(const PackageSpec& spec) const { return find_installed(spec.name(), spec.triplet()); diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 0916e66c8..67abf8de0 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -41,7 +41,7 @@ namespace UnitTest1 Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str()); - Assert::AreEqual(pkg_name.c_str(), plan.any_paragraph.source_control_file.get()->core_paragraph->name.c_str()); + Assert::AreEqual(pkg_name.c_str(), plan.source_control_file.get()->core_paragraph->name.c_str()); Assert::AreEqual(size_t(vec.size()), feature_list.size()); for (auto&& feature_name : vec) diff --git a/toolsrc/src/tests.utils.cpp b/toolsrc/src/tests.utils.cpp index b9fb51a59..d155c7238 100644 --- a/toolsrc/src/tests.utils.cpp +++ b/toolsrc/src/tests.utils.cpp @@ -13,7 +13,6 @@ namespace Microsoft::VisualStudio::CppUnitTestFramework { case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; - case Dependencies::InstallPlanType::INSTALL: return L"INSTALL"; case Dependencies::InstallPlanType::EXCLUDED: return L"EXCLUDED"; case Dependencies::InstallPlanType::UNKNOWN: return L"UNKNOWN"; default: return ToString(static_cast(t)); diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp index 682267acb..b25982e4b 100644 --- a/toolsrc/src/vcpkg/commands.exportifw.cpp +++ b/toolsrc/src/vcpkg/commands.exportifw.cpp @@ -69,8 +69,7 @@ namespace vcpkg::Export::IFW { std::error_code ec; - const BinaryParagraph& binary_paragraph = - action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + const BinaryParagraph& binary_paragraph = action.core_paragraph().value_or_exit(VCPKG_LINE_INFO); // Prepare meta dir const fs::path package_xml_file_path = @@ -142,8 +141,7 @@ namespace vcpkg::Export::IFW for (auto package = unique_packages.begin(); package != unique_packages.end(); ++package) { const ExportPlanAction& action = *(package->second); - const BinaryParagraph& binary_paragraph = - action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + const BinaryParagraph& binary_paragraph = action.core_paragraph().value_or_exit(VCPKG_LINE_INFO); package_xml_file_path = raw_exported_dir_path / Strings::format("packages.%s", package->first) / "meta" / "package.xml"; @@ -436,8 +434,7 @@ namespace vcpkg::Export::IFW const std::string display_name = action.spec.to_string(); System::println("Exporting package %s... ", display_name); - const BinaryParagraph& binary_paragraph = - action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + const BinaryParagraph& binary_paragraph = action.core_paragraph().value_or_exit(VCPKG_LINE_INFO); unique_packages[action.spec.name()] = &action; unique_triplets.insert(action.spec.triplet().canonical_name()); diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index e48d85885..277de0557 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -103,28 +103,15 @@ namespace vcpkg::Dependencies const PortFileProvider& m_provider; }; - std::vector AnyParagraph::dependencies(const Triplet& triplet) const + static std::vector source_paragraphs_dependencies(Span spghs) { - if (const auto p = this->status_paragraph.get()) - { - return PackageSpec::from_dependencies_of_port(p->package.spec.name(), p->package.depends, triplet); - } + if (spghs.size() == 0) return {}; - if (const auto p = this->binary_control_file.get()) - { - auto deps = Util::fmap_flatten(p->features, [](const BinaryParagraph& pgh) { return pgh.depends; }); - deps.insert(deps.end(), p->core_paragraph.depends.cbegin(), p->core_paragraph.depends.cend()); - return PackageSpec::from_dependencies_of_port(p->core_paragraph.spec.name(), deps, triplet); - } + auto deps = Util::fmap_flatten( + spghs, [](const StatusParagraph* pgh) -> std::vector const& { return pgh->package.depends; }); - if (const auto p = this->source_control_file.get()) - { - return PackageSpec::from_dependencies_of_port( - p->core_paragraph->name, filter_dependencies(p->core_paragraph->depends, triplet), triplet); - } - - Checks::exit_with_message(VCPKG_LINE_INFO, - "Cannot get dependencies because there was none of: source/binary/status paragraphs"); + auto&& spec = spghs[0]->package.spec; + return PackageSpec::from_dependencies_of_port(spec.name(), deps, spec.triplet()); } std::string to_output_string(RequestType request_type, @@ -154,45 +141,28 @@ namespace vcpkg::Dependencies InstallPlanAction::InstallPlanAction() : plan_type(InstallPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} InstallPlanAction::InstallPlanAction(const PackageSpec& spec, - const SourceControlFile& any_paragraph, + const SourceControlFile& scf, const std::unordered_set& features, const RequestType& request_type) - : spec(spec), plan_type(InstallPlanType::BUILD_AND_INSTALL), request_type(request_type), feature_list(features) + : spec(spec) + , source_control_file(scf) + , plan_type(InstallPlanType::BUILD_AND_INSTALL) + , request_type(request_type) + , feature_list(features) { - this->any_paragraph.source_control_file = any_paragraph; } InstallPlanAction::InstallPlanAction(const PackageSpec& spec, + std::vector&& spghs, const std::unordered_set& features, const RequestType& request_type) - : spec(spec), plan_type(InstallPlanType::ALREADY_INSTALLED), request_type(request_type), feature_list(features) + : spec(spec) + , status_paragraphs(std::move(spghs)) + , plan_type(InstallPlanType::ALREADY_INSTALLED) + , request_type(request_type) + , feature_list(features) { - } - - InstallPlanAction::InstallPlanAction(const PackageSpec& spec, - const AnyParagraph& any_paragraph, - const RequestType& request_type) - : spec(spec), any_paragraph(any_paragraph), plan_type(InstallPlanType::UNKNOWN), request_type(request_type) - { - if (auto p = any_paragraph.status_paragraph.get()) - { - this->plan_type = InstallPlanType::ALREADY_INSTALLED; - return; - } - - if (auto p = any_paragraph.binary_control_file.get()) - { - this->plan_type = InstallPlanType::INSTALL; - return; - } - - if (auto p = any_paragraph.source_control_file.get()) - { - this->plan_type = InstallPlanType::BUILD_AND_INSTALL; - return; - } - - Checks::unreachable(VCPKG_LINE_INFO); + Checks::check_exit(VCPKG_LINE_INFO, status_paragraphs.get()->size() > 0); } std::string InstallPlanAction::displayname() const @@ -243,21 +213,30 @@ namespace vcpkg::Dependencies ExportPlanAction::ExportPlanAction() : plan_type(ExportPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} ExportPlanAction::ExportPlanAction(const PackageSpec& spec, - const AnyParagraph& any_paragraph, + std::vector&& status_paragraphs, const RequestType& request_type) - : spec(spec), any_paragraph(any_paragraph), plan_type(ExportPlanType::UNKNOWN), request_type(request_type) + : spec(spec) + , plan_type(ExportPlanType::ALREADY_BUILT) + , request_type(request_type) + , m_spghs(std::move(status_paragraphs)) { - if (auto p = any_paragraph.binary_control_file.get()) - { - this->plan_type = ExportPlanType::ALREADY_BUILT; - return; - } + } - if (auto p = any_paragraph.source_control_file.get()) - { - this->plan_type = ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT; - return; - } + ExportPlanAction::ExportPlanAction(const PackageSpec& spec, const RequestType& request_type) + : spec(spec), plan_type(ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT), request_type(request_type) + { + } + + Optional ExportPlanAction::core_paragraph() const + { + auto it = m_spghs.begin(); + if (it == m_spghs.end()) return nullopt; + return (*it)->package; + } + + std::vector ExportPlanAction::dependencies(const Triplet&) const + { + return source_paragraphs_dependencies(m_spghs); } bool RemovePlanAction::compare_by_name(const RemovePlanAction* left, const RemovePlanAction* right) @@ -404,7 +383,7 @@ namespace vcpkg::Dependencies std::vector adjacency_list(const ExportPlanAction& plan) const override { - return plan.any_paragraph.dependencies(plan.spec.triplet()); + return plan.dependencies(plan.spec.triplet()); } ExportPlanAction load_vertex_data(const PackageSpec& spec) const override @@ -413,14 +392,22 @@ namespace vcpkg::Dependencies ? RequestType::USER_REQUESTED : RequestType::AUTO_SELECTED; - Expected maybe_bpgh = Paragraphs::try_load_cached_control_package(paths, spec); - if (auto bcf = maybe_bpgh.get()) - return ExportPlanAction{spec, AnyParagraph{nullopt, std::move(*bcf), nullopt}, request_type}; - - auto maybe_scf = provider.get_control_file(spec.name()); - if (auto scf = maybe_scf.get()) return ExportPlanAction{spec, {nullopt, nullopt, *scf}, request_type}; + auto spghs = status_db.find_all_installed(spec); - Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec); + if (spghs.size() == 0) + { + return ExportPlanAction{spec, request_type}; + } + else + { + return ExportPlanAction{ + spec, + Util::fmap(spghs, + [](std::unique_ptr const* const& p) -> const StatusParagraph* { + return p->get(); + }), + request_type}; + } } std::string to_string(const PackageSpec& spec) const override { return spec.to_string(); } @@ -642,6 +629,7 @@ namespace vcpkg::Dependencies if (p_cluster->request_type != RequestType::USER_REQUESTED) continue; plan.emplace_back(InstallPlanAction{ p_cluster->spec, + {p_cluster->status_paragraphs.begin(), p_cluster->status_paragraphs.end()}, p_cluster->original_features, p_cluster->request_type, }); @@ -664,17 +652,18 @@ namespace vcpkg::Dependencies cluster.transient_uninstalled = false; - cluster.status_paragraphs.emplace_back(status_paragraph); - auto& status_paragraph_feature = status_paragraph->package.feature; + // In this case, empty string indicates the "core" paragraph for a package. if (status_paragraph_feature.empty()) { cluster.original_features.insert("core"); + cluster.status_paragraphs.emplace(cluster.status_paragraphs.begin(), status_paragraph); } else { cluster.original_features.insert(status_paragraph_feature); + cluster.status_paragraphs.emplace_back(status_paragraph); } } @@ -739,7 +728,6 @@ namespace vcpkg::Dependencies { switch (install_action->plan_type) { - case InstallPlanType::INSTALL: only_install_plans.emplace_back(install_action); break; case InstallPlanType::ALREADY_INSTALLED: if (install_action->request_type == RequestType::USER_REQUESTED) already_installed_plans.emplace_back(install_action); diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 64cb3c804..a9c407dd8 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -385,7 +385,7 @@ namespace vcpkg::Export " %s" "\n", cmake_variable.s); - }; + } static void handle_raw_based_export(Span export_plan, const ExportArguments& opts, @@ -410,8 +410,7 @@ namespace vcpkg::Export const std::string display_name = action.spec.to_string(); System::println("Exporting package %s... ", display_name); - const BinaryParagraph& binary_paragraph = - action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph; + const BinaryParagraph& binary_paragraph = action.core_paragraph().value_or_exit(VCPKG_LINE_INFO); const InstallDir dirs = InstallDir::from_destination_root( raw_exported_dir_path / "installed", diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 3ecb627f5..368ca6487 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -292,12 +292,11 @@ namespace vcpkg::Install System::println("Building package %s... ", display_name_with_features); auto result = [&]() -> Build::ExtendedBuildResult { - const Build::BuildPackageConfig build_config{ - action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO), - action.spec.triplet(), - paths.port_dir(action.spec), - action.build_options, - action.feature_list}; + const Build::BuildPackageConfig build_config{action.source_control_file.value_or_exit(VCPKG_LINE_INFO), + action.spec.triplet(), + paths.port_dir(action.spec), + action.build_options, + action.feature_list}; return Build::build_package(paths, build_config, status_db); }(); @@ -315,18 +314,6 @@ namespace vcpkg::Install return {code, std::move(bcf)}; } - if (plan_type == InstallPlanType::INSTALL) - { - if (use_head_version && is_user_requested) - { - System::println( - System::Color::warning, "Package %s is already built -- not building from HEAD", display_name); - } - auto code = aux_install(display_name_with_features, - action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO)); - return code; - } - if (plan_type == InstallPlanType::EXCLUDED) { System::println(System::Color::warning, "Package %s is excluded", display_name); @@ -662,11 +649,10 @@ namespace vcpkg::Install if (action) if (auto p_install_plan = action->install_action.get()) { - if (auto p_bcf = p_install_plan->any_paragraph.binary_control_file.get()) - return &p_bcf->core_paragraph; - else if (auto p_status = p_install_plan->any_paragraph.status_paragraph.get()) + if (auto p_status = p_install_plan->status_paragraphs.get()) { - return &p_status->package; + Checks::check_exit(VCPKG_LINE_INFO, p_status->size() > 0); + return &(*p_status->begin())->package; } } return nullptr; diff --git a/toolsrc/src/vcpkg/statusparagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp index 19919b76f..61c04d72a 100644 --- a/toolsrc/src/vcpkg/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg/statusparagraphs.cpp @@ -18,7 +18,28 @@ namespace vcpkg { if (p->package.spec.name() == name && p->package.spec.triplet() == triplet) { - spghs.emplace_back(&p); + if (p->package.feature.empty()) + spghs.emplace(spghs.begin(), &p); + else + spghs.emplace_back(&p); + } + } + return spghs; + } + + std::vector*> StatusParagraphs::find_all_installed( + const PackageSpec& spec) const + { + std::vector*> spghs; + for (auto&& p : *this) + { + if (p->package.spec.name() == spec.name() && p->package.spec.triplet() == spec.triplet() && + p->is_installed()) + { + if (p->package.feature.empty()) + spghs.emplace(spghs.begin(), &p); + else + spghs.emplace_back(&p); } } return spghs; -- cgit v1.2.3 From 78d3302940f6c11a220008215b6f67daa8cc8bb7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 23 Jan 2018 02:36:39 -0800 Subject: [vcpkg] Remove overload of StatusParagraphs::find_installed() --- toolsrc/include/tests.utils.h | 3 +++ toolsrc/include/vcpkg/statusparagraphs.h | 7 ++----- toolsrc/src/tests.plan.cpp | 7 ------- toolsrc/src/tests.statusparagraphs.cpp | 10 ++++++---- toolsrc/src/tests.utils.cpp | 7 +++++++ toolsrc/src/vcpkg/build.cpp | 6 +++--- toolsrc/src/vcpkg/statusparagraphs.cpp | 15 +++++++++++---- 7 files changed, 32 insertions(+), 23 deletions(-) diff --git a/toolsrc/include/tests.utils.h b/toolsrc/include/tests.utils.h index 0c0add7ab..b23abe4eb 100644 --- a/toolsrc/include/tests.utils.h +++ b/toolsrc/include/tests.utils.h @@ -6,6 +6,7 @@ #include #include #include +#include #include @@ -38,3 +39,5 @@ 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/statusparagraphs.h b/toolsrc/include/vcpkg/statusparagraphs.h index 51fbd14dd..4e31b48d8 100644 --- a/toolsrc/include/vcpkg/statusparagraphs.h +++ b/toolsrc/include/vcpkg/statusparagraphs.h @@ -23,11 +23,8 @@ namespace vcpkg std::vector*> find_all_installed(const PackageSpec& spec) const; - const_iterator find_installed(const PackageSpec& spec) const - { - return find_installed(spec.name(), spec.triplet()); - } - const_iterator find_installed(const std::string& name, const Triplet& triplet) const; + const_iterator find_installed(const PackageSpec& spec) const; + bool is_installed(const PackageSpec& spec) const; iterator insert(std::unique_ptr); diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 67abf8de0..86386be14 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -504,13 +504,6 @@ namespace UnitTest1 } }; - static PackageSpec unsafe_pspec(std::string name, Triplet t = Triplet::X86_WINDOWS) - { - auto m_ret = PackageSpec::from_name_and_triplet(name, t); - Assert::IsTrue(m_ret.has_value()); - return m_ret.value_or_exit(VCPKG_LINE_INFO); - } - class RemovePlanTests : public TestClass { TEST_METHOD(basic_remove_scheme) diff --git a/toolsrc/src/tests.statusparagraphs.cpp b/toolsrc/src/tests.statusparagraphs.cpp index ed6eaa764..0d5324a8c 100644 --- a/toolsrc/src/tests.statusparagraphs.cpp +++ b/toolsrc/src/tests.statusparagraphs.cpp @@ -1,5 +1,7 @@ #include "tests.pch.h" +#include + using namespace Microsoft::VisualStudio::CppUnitTestFramework; using namespace vcpkg; @@ -25,7 +27,7 @@ Status: install ok installed StatusParagraphs status_db(Util::fmap( *pghs.get(), [](RawParagraph& rpgh) { return std::make_unique(std::move(rpgh)); })); - auto it = status_db.find_installed("ffmpeg", Triplet::X64_WINDOWS); + auto it = status_db.find_installed(unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS)); Assert::IsTrue(it != status_db.end()); } @@ -45,7 +47,7 @@ Status: purge ok not-installed StatusParagraphs status_db(Util::fmap( *pghs.get(), [](RawParagraph& rpgh) { return std::make_unique(std::move(rpgh)); })); - auto it = status_db.find_installed("ffmpeg", Triplet::X64_WINDOWS); + auto it = status_db.find_installed(unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS)); Assert::IsTrue(it == status_db.end()); } @@ -73,8 +75,8 @@ Status: purge ok not-installed StatusParagraphs status_db(Util::fmap( *pghs.get(), [](RawParagraph& rpgh) { return std::make_unique(std::move(rpgh)); })); - auto it = status_db.find_installed("ffmpeg", Triplet::X64_WINDOWS); + auto it = status_db.find_installed(unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS)); Assert::IsTrue(it != status_db.end()); } }; -} \ No newline at end of file +} diff --git a/toolsrc/src/tests.utils.cpp b/toolsrc/src/tests.utils.cpp index d155c7238..19e877920 100644 --- a/toolsrc/src/tests.utils.cpp +++ b/toolsrc/src/tests.utils.cpp @@ -59,3 +59,10 @@ std::unique_ptr make_status_feature_pgh(const char* name, {"Depends", depends}, {"Status", "install ok installed"}}); } + +PackageSpec unsafe_pspec(std::string name, Triplet t) +{ + auto m_ret = PackageSpec::from_name_and_triplet(name, t); + Assert::IsTrue(m_ret.has_value()); + return m_ret.value_or_exit(VCPKG_LINE_INFO); +} diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 960ba0400..d583a409e 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -269,10 +269,10 @@ namespace vcpkg::Build std::vector missing_specs; for (auto&& dep : filter_dependencies(config.scf.core_paragraph->depends, triplet)) { - if (status_db.find_installed(dep, triplet) == status_db.end()) + auto spec = PackageSpec::from_name_and_triplet(dep, triplet).value_or_exit(VCPKG_LINE_INFO); + if (!status_db.is_installed(spec)) { - missing_specs.push_back( - PackageSpec::from_name_and_triplet(dep, triplet).value_or_exit(VCPKG_LINE_INFO)); + missing_specs.push_back(spec); } } // Fail the build if any dependencies were missing diff --git a/toolsrc/src/vcpkg/statusparagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp index 61c04d72a..fb5267b95 100644 --- a/toolsrc/src/vcpkg/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg/statusparagraphs.cpp @@ -65,16 +65,23 @@ namespace vcpkg }); } - StatusParagraphs::const_iterator StatusParagraphs::find_installed(const std::string& name, - const Triplet& triplet) const + StatusParagraphs::const_iterator StatusParagraphs::find_installed(const PackageSpec& spec) const { - const const_iterator it = find(name, triplet); + auto it = find(spec); if (it != end() && (*it)->is_installed()) { return it; } + else + { + return end(); + } + } - return end(); + bool vcpkg::StatusParagraphs::is_installed(const PackageSpec& spec) const + { + auto it = find(spec); + return it != end() && (*it)->is_installed(); } StatusParagraphs::iterator StatusParagraphs::insert(std::unique_ptr pgh) -- cgit v1.2.3 From 18f44c353d369b4da54cd7d352b9fba0fb911457 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 23 Jan 2018 02:50:01 -0800 Subject: [msmpi] Accept v8.1.1 --- ports/msmpi/portfile.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/msmpi/portfile.cmake b/ports/msmpi/portfile.cmake index 893e6f124..0992f5f5d 100644 --- a/ports/msmpi/portfile.cmake +++ b/ports/msmpi/portfile.cmake @@ -20,7 +20,7 @@ endmacro() # We always want the ProgramFiles folder even on a 64-bit machine (not the ProgramFilesx86 folder) vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS) set(SYSTEM_MPIEXEC_FILEPATH "${PROGRAM_FILES_PLATFORM_BITNESS}/Microsoft MPI/Bin/mpiexec.exe") -set(MSMPI_EXPECTED_FULL_VERSION "8.1.12438.1084") +set(MSMPI_EXPECTED_FULL_VERSION "8.1.12438") if(EXISTS "${SYSTEM_MPIEXEC_FILEPATH}") set(MPIEXEC_VERSION_LOGNAME "mpiexec-version") @@ -31,7 +31,8 @@ if(EXISTS "${SYSTEM_MPIEXEC_FILEPATH}") ) file(READ ${CURRENT_BUILDTREES_DIR}/${MPIEXEC_VERSION_LOGNAME}-out.log MPIEXEC_OUTPUT) - if(MPIEXEC_OUTPUT MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)\\]") + # Note: v8.1.1 was released with version 8.1.12438.1091. This is compatible with 8.1.12438.1084 (the version above), so ignore the fourth version number. + if(MPIEXEC_OUTPUT MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+)\\.[0-9]+\\]") if(NOT CMAKE_MATCH_1 STREQUAL MSMPI_EXPECTED_FULL_VERSION) download_msmpi_redistributable_package() -- cgit v1.2.3 From 3beeb94ec5ca73636d1a26bd9c2ec386b15df9b7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 23 Jan 2018 06:50:24 -0800 Subject: [vcpkg] Use InstalledPackageView instead of unsorted raw vectors --- toolsrc/include/vcpkg/dependencies.h | 8 ++--- toolsrc/include/vcpkg/remove.h | 4 +-- toolsrc/include/vcpkg/statusparagraph.h | 15 +++++++++ toolsrc/include/vcpkg/statusparagraphs.h | 2 +- toolsrc/src/vcpkg/dependencies.cpp | 56 +++++++++++++------------------- toolsrc/src/vcpkg/install.cpp | 5 ++- toolsrc/src/vcpkg/remove.cpp | 39 +++++++++++++--------- toolsrc/src/vcpkg/statusparagraph.cpp | 12 +++++++ toolsrc/src/vcpkg/statusparagraphs.cpp | 17 ++++++---- 9 files changed, 92 insertions(+), 66 deletions(-) diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 14f51c216..c3f00018d 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -38,7 +38,7 @@ namespace vcpkg::Dependencies InstallPlanAction(); InstallPlanAction(const PackageSpec& spec, - std::vector&& spghs, + InstalledPackageView&& spghs, const std::unordered_set& features, const RequestType& request_type); @@ -52,7 +52,7 @@ namespace vcpkg::Dependencies PackageSpec spec; Optional source_control_file; - Optional> status_paragraphs; + Optional installed_package; InstallPlanType plan_type; RequestType request_type; @@ -103,7 +103,7 @@ namespace vcpkg::Dependencies ExportPlanAction(); ExportPlanAction(const PackageSpec& spec, - std::vector&& status_paragraphs, + InstalledPackageView&& installed_package, const RequestType& request_type); ExportPlanAction(const PackageSpec& spec, const RequestType& request_type); @@ -116,7 +116,7 @@ namespace vcpkg::Dependencies std::vector dependencies(const Triplet& triplet) const; private: - std::vector m_spghs; + Optional m_installed_package; }; struct PortFileProvider diff --git a/toolsrc/include/vcpkg/remove.h b/toolsrc/include/vcpkg/remove.h index 6d8a3ebe9..0610bd127 100644 --- a/toolsrc/include/vcpkg/remove.h +++ b/toolsrc/include/vcpkg/remove.h @@ -17,10 +17,10 @@ namespace vcpkg::Remove void perform_remove_plan_action(const VcpkgPaths& paths, const Dependencies::RemovePlanAction& action, const Purge purge, - StatusParagraphs& status_db); + const StatusParagraphs& status_db); extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); - void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db); + void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, const StatusParagraphs& status_db); } diff --git a/toolsrc/include/vcpkg/statusparagraph.h b/toolsrc/include/vcpkg/statusparagraph.h index 051acf95f..0802de530 100644 --- a/toolsrc/include/vcpkg/statusparagraph.h +++ b/toolsrc/include/vcpkg/statusparagraph.h @@ -44,4 +44,19 @@ namespace vcpkg std::string to_string(InstallState f); std::string to_string(Want f); + + struct InstalledPackageView + { + InstalledPackageView() : core(nullptr) {} + + InstalledPackageView(const StatusParagraph* c, std::vector&& fs) + : core(c), features(std::move(fs)) + { + } + + std::vector dependencies() const; + + const StatusParagraph* core; + std::vector features; + }; } diff --git a/toolsrc/include/vcpkg/statusparagraphs.h b/toolsrc/include/vcpkg/statusparagraphs.h index 4e31b48d8..fd33f8094 100644 --- a/toolsrc/include/vcpkg/statusparagraphs.h +++ b/toolsrc/include/vcpkg/statusparagraphs.h @@ -21,7 +21,7 @@ namespace vcpkg std::vector*> find_all(const std::string& name, const Triplet& triplet); - std::vector*> find_all_installed(const PackageSpec& spec) const; + Optional find_all_installed(const PackageSpec& spec) const; const_iterator find_installed(const PackageSpec& spec) const; bool is_installed(const PackageSpec& spec) const; diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 277de0557..5ce96a3e1 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -22,7 +22,8 @@ namespace vcpkg::Dependencies struct Cluster : Util::MoveOnlyBase { - std::vector status_paragraphs; + InstalledPackageView installed_package; + Optional source_control_file; PackageSpec spec; std::unordered_map edges; @@ -103,17 +104,6 @@ namespace vcpkg::Dependencies const PortFileProvider& m_provider; }; - static std::vector source_paragraphs_dependencies(Span spghs) - { - if (spghs.size() == 0) return {}; - - auto deps = Util::fmap_flatten( - spghs, [](const StatusParagraph* pgh) -> std::vector const& { return pgh->package.depends; }); - - auto&& spec = spghs[0]->package.spec; - return PackageSpec::from_dependencies_of_port(spec.name(), deps, spec.triplet()); - } - std::string to_output_string(RequestType request_type, const CStringView s, const Build::BuildPackageOptions& options) @@ -153,16 +143,15 @@ namespace vcpkg::Dependencies } InstallPlanAction::InstallPlanAction(const PackageSpec& spec, - std::vector&& spghs, + InstalledPackageView&& ipv, const std::unordered_set& features, const RequestType& request_type) : spec(spec) - , status_paragraphs(std::move(spghs)) + , installed_package(std::move(ipv)) , plan_type(InstallPlanType::ALREADY_INSTALLED) , request_type(request_type) , feature_list(features) { - Checks::check_exit(VCPKG_LINE_INFO, status_paragraphs.get()->size() > 0); } std::string InstallPlanAction::displayname() const @@ -213,12 +202,12 @@ namespace vcpkg::Dependencies ExportPlanAction::ExportPlanAction() : plan_type(ExportPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} ExportPlanAction::ExportPlanAction(const PackageSpec& spec, - std::vector&& status_paragraphs, + InstalledPackageView&& installed_package, const RequestType& request_type) : spec(spec) , plan_type(ExportPlanType::ALREADY_BUILT) , request_type(request_type) - , m_spghs(std::move(status_paragraphs)) + , m_installed_package(std::move(installed_package)) { } @@ -229,14 +218,19 @@ namespace vcpkg::Dependencies Optional ExportPlanAction::core_paragraph() const { - auto it = m_spghs.begin(); - if (it == m_spghs.end()) return nullopt; - return (*it)->package; + if (auto p_ip = m_installed_package.get()) + { + return p_ip->core->package; + } + return nullopt; } std::vector ExportPlanAction::dependencies(const Triplet&) const { - return source_paragraphs_dependencies(m_spghs); + if (auto p_ip = m_installed_package.get()) + return p_ip->dependencies(); + else + return {}; } bool RemovePlanAction::compare_by_name(const RemovePlanAction* left, const RemovePlanAction* right) @@ -392,21 +386,15 @@ namespace vcpkg::Dependencies ? RequestType::USER_REQUESTED : RequestType::AUTO_SELECTED; - auto spghs = status_db.find_all_installed(spec); + auto maybe_ipv = status_db.find_all_installed(spec); - if (spghs.size() == 0) + if (auto p_ipv = maybe_ipv.get()) { - return ExportPlanAction{spec, request_type}; + return ExportPlanAction{spec, std::move(*p_ipv), request_type}; } else { - return ExportPlanAction{ - spec, - Util::fmap(spghs, - [](std::unique_ptr const* const& p) -> const StatusParagraph* { - return p->get(); - }), - request_type}; + return ExportPlanAction{spec, request_type}; } } @@ -629,7 +617,7 @@ namespace vcpkg::Dependencies if (p_cluster->request_type != RequestType::USER_REQUESTED) continue; plan.emplace_back(InstallPlanAction{ p_cluster->spec, - {p_cluster->status_paragraphs.begin(), p_cluster->status_paragraphs.end()}, + InstalledPackageView{p_cluster->installed_package}, p_cluster->original_features, p_cluster->request_type, }); @@ -658,12 +646,12 @@ namespace vcpkg::Dependencies if (status_paragraph_feature.empty()) { cluster.original_features.insert("core"); - cluster.status_paragraphs.emplace(cluster.status_paragraphs.begin(), status_paragraph); + cluster.installed_package.core = status_paragraph; } else { cluster.original_features.insert(status_paragraph_feature); - cluster.status_paragraphs.emplace_back(status_paragraph); + cluster.installed_package.features.emplace_back(status_paragraph); } } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 368ca6487..7a1ba4698 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -649,10 +649,9 @@ namespace vcpkg::Install if (action) if (auto p_install_plan = action->install_action.get()) { - if (auto p_status = p_install_plan->status_paragraphs.get()) + if (auto p_status = p_install_plan->installed_package.get()) { - Checks::check_exit(VCPKG_LINE_INFO, p_status->size() > 0); - return &(*p_status->begin())->package; + return &p_status->core->package; } } return nullptr; diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index e03df2ed2..3815c3ce7 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -18,22 +18,31 @@ namespace vcpkg::Remove using Dependencies::RequestType; using Update::OutdatedPackage; - void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db) + void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, const StatusParagraphs& status_db) { auto& fs = paths.get_filesystem(); - auto spghs = status_db->find_all(spec.name(), spec.triplet()); - const auto core_pkg = **status_db->find(spec.name(), spec.triplet(), ""); + auto maybe_ipv = status_db.find_all_installed(spec); + + Checks::check_exit( + VCPKG_LINE_INFO, maybe_ipv.has_value(), "unable to remove package %s: already removed", spec); + + auto&& ipv = maybe_ipv.value_or_exit(VCPKG_LINE_INFO); + + std::vector spghs; + spghs.emplace_back(*ipv.core); + for (auto&& feature : ipv.features) + { + spghs.emplace_back(*feature); + } for (auto&& spgh : spghs) { - StatusParagraph& pkg = **spgh; - if (pkg.state != InstallState::INSTALLED) continue; - pkg.want = Want::PURGE; - pkg.state = InstallState::HALF_INSTALLED; - write_update(paths, pkg); + spgh.want = Want::PURGE; + spgh.state = InstallState::HALF_INSTALLED; + write_update(paths, spgh); } - auto maybe_lines = fs.read_lines(paths.listfile_path(core_pkg.package)); + auto maybe_lines = fs.read_lines(paths.listfile_path(ipv.core->package)); if (const auto lines = maybe_lines.get()) { @@ -90,15 +99,13 @@ namespace vcpkg::Remove } } - fs.remove(paths.listfile_path(core_pkg.package)); + fs.remove(paths.listfile_path(ipv.core->package)); } for (auto&& spgh : spghs) { - StatusParagraph& pkg = **spgh; - if (pkg.state != InstallState::HALF_INSTALLED) continue; - pkg.state = InstallState::NOT_INSTALLED; - write_update(paths, pkg); + spgh.state = InstallState::NOT_INSTALLED; + write_update(paths, spgh); } } @@ -136,7 +143,7 @@ namespace vcpkg::Remove void perform_remove_plan_action(const VcpkgPaths& paths, const RemovePlanAction& action, const Purge purge, - StatusParagraphs& status_db) + const StatusParagraphs& status_db) { const std::string display_name = action.spec.to_string(); @@ -147,7 +154,7 @@ namespace vcpkg::Remove break; case RemovePlanType::REMOVE: System::println("Removing package %s... ", display_name); - remove_package(paths, action.spec, &status_db); + remove_package(paths, action.spec, status_db); System::println(System::Color::success, "Removing package %s... done", display_name); break; case RemovePlanType::UNKNOWN: diff --git a/toolsrc/src/vcpkg/statusparagraph.cpp b/toolsrc/src/vcpkg/statusparagraph.cpp index 5f00825e1..05238ba8b 100644 --- a/toolsrc/src/vcpkg/statusparagraph.cpp +++ b/toolsrc/src/vcpkg/statusparagraph.cpp @@ -1,5 +1,6 @@ #include "pch.h" +#include #include using namespace vcpkg::Parse; @@ -83,4 +84,15 @@ namespace vcpkg default: return "error"; } } + std::vector InstalledPackageView::dependencies() const + { + auto deps = Util::fmap_flatten(features, [](const StatusParagraph* pgh) -> std::vector const& { + return pgh->package.depends; + }); + + deps.insert(deps.end(), core->package.depends.begin(), core->package.depends.end()); + + auto&& spec = core->package.spec; + return PackageSpec::from_dependencies_of_port(spec.name(), deps, spec.triplet()); + } } diff --git a/toolsrc/src/vcpkg/statusparagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp index fb5267b95..475f86279 100644 --- a/toolsrc/src/vcpkg/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg/statusparagraphs.cpp @@ -27,22 +27,27 @@ namespace vcpkg return spghs; } - std::vector*> StatusParagraphs::find_all_installed( - const PackageSpec& spec) const + Optional StatusParagraphs::find_all_installed(const PackageSpec& spec) const { - std::vector*> spghs; + InstalledPackageView ipv; for (auto&& p : *this) { if (p->package.spec.name() == spec.name() && p->package.spec.triplet() == spec.triplet() && p->is_installed()) { if (p->package.feature.empty()) - spghs.emplace(spghs.begin(), &p); + { + Checks::check_exit(VCPKG_LINE_INFO, ipv.core == nullptr); + ipv.core = p.get(); + } else - spghs.emplace_back(&p); + ipv.features.emplace_back(p.get()); } } - return spghs; + if (ipv.core != nullptr) + return std::move(ipv); + else + return nullopt; } StatusParagraphs::iterator StatusParagraphs::find(const std::string& name, -- cgit v1.2.3 From 3df6043856810c6057d2291f4de508fd4ef4b179 Mon Sep 17 00:00:00 2001 From: Tobias Kohlbau Date: Tue, 23 Jan 2018 16:44:13 +0100 Subject: [discord-rpc] bump to version 2.1.0 Signed-off-by: Tobias Kohlbau --- ports/discord-rpc/CONTROL | 2 +- ports/discord-rpc/fix-debug.diff | 24 ------------------------ ports/discord-rpc/portfile.cmake | 21 ++++++--------------- 3 files changed, 7 insertions(+), 40 deletions(-) delete mode 100644 ports/discord-rpc/fix-debug.diff diff --git a/ports/discord-rpc/CONTROL b/ports/discord-rpc/CONTROL index e6d3462aa..94769dae5 100644 --- a/ports/discord-rpc/CONTROL +++ b/ports/discord-rpc/CONTROL @@ -1,3 +1,3 @@ Source: discord-rpc -Version: 2.0.1 +Version: 2.1.0 Description: Rich Presence allows you to leverage the totally overhauled "Now Playing" section in a Discord user's profile to help people play your game together. diff --git a/ports/discord-rpc/fix-debug.diff b/ports/discord-rpc/fix-debug.diff deleted file mode 100644 index df33249b9..000000000 --- a/ports/discord-rpc/fix-debug.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -30,7 +30,6 @@ if(WIN32) - set(BASE_RPC_SRC ${BASE_RPC_SRC} connection_win.cpp discord_register_win.cpp) - add_library(discord-rpc ${RPC_LIBRARY_TYPE} ${BASE_RPC_SRC}) - target_compile_options(discord-rpc PRIVATE /EHsc -- /MT - /Wall - /wd4100 # unreferenced formal parameter - /wd4514 # unreferenced inline -@@ -102,13 +101,10 @@ install( - EXPORT "discord-rpc" - RUNTIME - DESTINATION "bin" -- CONFIGURATIONS Release - LIBRARY - DESTINATION "lib" -- CONFIGURATIONS Release - ARCHIVE - DESTINATION "lib" -- CONFIGURATIONS Release - INCLUDES - DESTINATION "include" - ) diff --git a/ports/discord-rpc/portfile.cmake b/ports/discord-rpc/portfile.cmake index ea59126a3..9c35458a3 100644 --- a/ports/discord-rpc/portfile.cmake +++ b/ports/discord-rpc/portfile.cmake @@ -3,28 +3,19 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO discordapp/discord-rpc - REF v2.0.1 - SHA512 496f8f34184c4be3c3341b05ebd440a9e89e36ecf15747ea8f4d1cc0404f1341404fda6c8358a2c08e0149023775472ea78603b9d41687f1004828523debda99 + REF v2.1.0 + SHA512 24bbc391670bfb53f0501ed189cef8193f35332de9fff3016fc18eb7eab4970d5c90576aa95dfcc4f1ef553e8b1ea781e1e40e595cbbcc1c4200e4ff174369de HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH - ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-debug.diff -) - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(BUILD_DYNAMIC_LIB ON) -else() - set(BUILD_DYNAMIC_LIB OFF) +set(STATIC_CRT OFF) +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(STATIC_CRT ON) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_DYNAMIC_LIB=${BUILD_DYNAMIC_LIB} + OPTIONS -DUSE_STATIC_CRT=${STATIC_CRT} ) vcpkg_install_cmake() -- cgit v1.2.3 From 64203615a6d593fafbea36ce4cd01583deb0ad01 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Wed, 24 Jan 2018 01:45:23 +0900 Subject: Fix OpenNI2 deploy (#2627) * Fix OpenNI2 deploy Fix to deploy initialization file and drivers. * [openni2] Adjusting deployopenni2.ps1 paths * Fix Create Directory of OpenNI2 Drivers Fix create directory of OpenNI2 drivers. * Fix Deploy Script Path Fix deploy script path. --- ports/openni2/CONTROL | 2 +- ports/openni2/openni2deploy.ps1 | 18 ++++++++++++++++++ ports/openni2/portfile.cmake | 16 ++++++++++++++++ scripts/buildsystems/msbuild/applocal.ps1 | 6 ++++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 ports/openni2/openni2deploy.ps1 diff --git a/ports/openni2/CONTROL b/ports/openni2/CONTROL index b1d60d860..26fcebaba 100644 --- a/ports/openni2/CONTROL +++ b/ports/openni2/CONTROL @@ -1,4 +1,4 @@ Source: openni2 -Version: 2.2.0.33-4 +Version: 2.2.0.33-7 Build-Depends: kinectsdk1 Description: OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera. diff --git a/ports/openni2/openni2deploy.ps1 b/ports/openni2/openni2deploy.ps1 new file mode 100644 index 000000000..f420014cf --- /dev/null +++ b/ports/openni2/openni2deploy.ps1 @@ -0,0 +1,18 @@ +# Note: This function signature and behavior is depended upon by applocal.ps1 + +function deployOpenNI2([string]$targetBinaryDir, [string]$installedDir, [string]$targetBinaryName) { + if ($targetBinaryName -like "OpenNI2.dll") { + if(Test-Path "$installedDir\bin\OpenNI2\OpenNI.ini") { + Write-Verbose " Deploying OpenNI2 Initialization" + deployBinary "$targetBinaryDir" "$installedDir\bin\OpenNI2" "OpenNI.ini" + } + if(Test-Path "$installedDir\bin\OpenNI2\Drivers") { + Write-Verbose " Deploying OpenNI2 Drivers" + New-Item "$targetBinaryDir\OpenNI2\Drivers" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null + Get-ChildItem "$installedDir\bin\OpenNI2\Drivers\*.*" -include "*.dll","*.ini" | % { + deployBinary "$targetBinaryDir\OpenNI2\Drivers" "$installedDir\bin\OpenNI2\Drivers" $_.Name + } + } + } +} + diff --git a/ports/openni2/portfile.cmake b/ports/openni2/portfile.cmake index cc428ddb7..fb7eeade6 100644 --- a/ports/openni2/portfile.cmake +++ b/ports/openni2/portfile.cmake @@ -150,6 +150,12 @@ file( file( INSTALL "${SOURCE_CONFIG_PATH}/OpenNI.ini" + DESTINATION + ${CURRENT_PACKAGES_DIR}/bin/OpenNI2 +) + +file( + INSTALL "${SOURCE_BIN_PATH_RELEASE}/OpenNI2.dll" DESTINATION ${CURRENT_PACKAGES_DIR}/bin @@ -170,6 +176,12 @@ file( file( INSTALL "${SOURCE_CONFIG_PATH}/OpenNI.ini" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2 +) + +file( + INSTALL "${SOURCE_BIN_PATH_DEBUG}/OpenNI2.dll" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin @@ -205,6 +217,10 @@ file( ${CURRENT_PACKAGES_DIR}/tools/openni2 ) +# Deploy Script +file(COPY ${CMAKE_CURRENT_LIST_DIR}/openni2deploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/bin/OpenNI2) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/openni2deploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2) + # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openni2) file(RENAME ${CURRENT_PACKAGES_DIR}/share/openni2/LICENSE ${CURRENT_PACKAGES_DIR}/share/openni2/copyright) \ No newline at end of file diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index 08a6d9a8f..0b56356a0 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -49,6 +49,7 @@ function resolve([string]$targetBinary) { if (Test-Path "$installedDir\$_") { deployBinary $targetBinaryDir $installedDir "$_" if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $targetBinaryDir "$g_install_root\plugins" "$_" } + if (Test-Path function:\deployOpenNI2) { deployOpenNI2 $targetBinaryDir "$g_install_root" "$_" } resolve "$targetBinaryDir\$_" } elseif (Test-Path "$targetBinaryDir\$_") { Write-Verbose " ${_}: $_ not found in vcpkg; locally deployed" @@ -66,5 +67,10 @@ if (Test-Path "$g_install_root\plugins\qtdeploy.ps1") { . "$g_install_root\plugins\qtdeploy.ps1" } +# Note: This is a hack to make OpenNI2 work. +if (Test-Path "$g_install_root\bin\OpenNI2\openni2deploy.ps1") { + . "$g_install_root\bin\OpenNI2\openni2deploy.ps1" +} + resolve($targetBinary) Write-Verbose $($g_searched | out-string) \ No newline at end of file -- cgit v1.2.3 From 91f447631da356ca9e8f1eca92f5f59a57e3b5fb Mon Sep 17 00:00:00 2001 From: Tobias Kohlbau Date: Tue, 23 Jan 2018 21:11:15 +0100 Subject: [curl] add option to build with winssl (#2631) Sometimes curl needs to be build with winssl, use vcpkg install curl[winssl]. Signed-off-by: Tobias Kohlbau --- ports/curl/CONTROL | 3 ++- ports/curl/portfile.cmake | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index cdc514006..2affc3bb7 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,4 +1,5 @@ Source: curl -Version: 7.57.0-1 +Version: 7.57.0-2 Build-Depends: zlib, openssl, libssh2 Description: A library for transferring data with URLs +# For WINSSL create target triplet which contains set(CURL_USE_WINSSL ON) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 8a5d17ed6..054dd74b2 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -20,6 +20,12 @@ else() SET(CURL_STATICLIB ON) endif() +set(USE_OPENSSL ON) +if(CURL_USE_WINSSL) + set(USE_OPENSSL OFF) + set(USE_WINSSL ON) +endif() + set(UWP_OPTIONS) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(UWP_OPTIONS @@ -43,7 +49,8 @@ vcpkg_configure_cmake( -DBUILD_CURL_EXE=OFF -DENABLE_MANUAL=OFF -DCURL_STATICLIB=${CURL_STATICLIB} - -DCMAKE_USE_OPENSSL=ON + -DCMAKE_USE_OPENSSL=${USE_OPENSSL} + -DCMAKE_USE_WINSSL=${USE_WINSSL} OPTIONS_DEBUG -DENABLE_DEBUG=ON ) -- cgit v1.2.3 From 130fa279f968ad9661ff4614a2b87f1bb0c5aee2 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 23 Jan 2018 14:14:01 -0800 Subject: [vcpkg] Revert making remove_package() take status_db by const The in-memory database must be updated to communicate to future actions that they need to look at this package's files (or not) --- toolsrc/include/vcpkg/remove.h | 4 ++-- toolsrc/src/vcpkg/install.cpp | 2 +- toolsrc/src/vcpkg/remove.cpp | 10 ++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/toolsrc/include/vcpkg/remove.h b/toolsrc/include/vcpkg/remove.h index 0610bd127..36aeda2ad 100644 --- a/toolsrc/include/vcpkg/remove.h +++ b/toolsrc/include/vcpkg/remove.h @@ -17,10 +17,10 @@ namespace vcpkg::Remove void perform_remove_plan_action(const VcpkgPaths& paths, const Dependencies::RemovePlanAction& action, const Purge purge, - const StatusParagraphs& status_db); + StatusParagraphs* status_db); extern const CommandStructure COMMAND_STRUCTURE; void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); - void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, const StatusParagraphs& status_db); + void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db); } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 7a1ba4698..081063633 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -386,7 +386,7 @@ namespace vcpkg::Install } else if (const auto remove_action = action.remove_action.get()) { - Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, status_db); + Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, &status_db); } else { diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 3815c3ce7..3eaf991ce 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -18,10 +18,10 @@ namespace vcpkg::Remove using Dependencies::RequestType; using Update::OutdatedPackage; - void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, const StatusParagraphs& status_db) + void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db) { auto& fs = paths.get_filesystem(); - auto maybe_ipv = status_db.find_all_installed(spec); + auto maybe_ipv = status_db->find_all_installed(spec); Checks::check_exit( VCPKG_LINE_INFO, maybe_ipv.has_value(), "unable to remove package %s: already removed", spec); @@ -106,6 +106,8 @@ namespace vcpkg::Remove { spgh.state = InstallState::NOT_INSTALLED; write_update(paths, spgh); + + status_db->insert(std::make_unique(std::move(spgh))); } } @@ -143,7 +145,7 @@ namespace vcpkg::Remove void perform_remove_plan_action(const VcpkgPaths& paths, const RemovePlanAction& action, const Purge purge, - const StatusParagraphs& status_db) + StatusParagraphs* status_db) { const std::string display_name = action.spec.to_string(); @@ -285,7 +287,7 @@ namespace vcpkg::Remove for (const RemovePlanAction& action : remove_plan) { - perform_remove_plan_action(paths, action, purge, status_db); + perform_remove_plan_action(paths, action, purge, &status_db); } Checks::exit_success(VCPKG_LINE_INFO); -- cgit v1.2.3 From 2890ffa31c409e1384bdd562f6f5b9fc827a4c14 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 18 Jan 2018 18:12:14 -0800 Subject: Don't print "downloading..." if file is already downloaded --- scripts/fetchDependency.ps1 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index e4cab124c..1ff44c211 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -75,9 +75,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) throw "Unknown program requested" } - Write-Host "Downloading $Dependency..." - vcpkgDownloadFile $url $downloadPath - Write-Host "Downloading $Dependency has completed successfully." + if (!(Test-Path $downloadPath)) + { + Write-Host "Downloading $Dependency..." + vcpkgDownloadFile $url $downloadPath + Write-Host "Downloading $Dependency has completed successfully." + } $downloadedFileHash = vcpkgGetSHA256 $downloadPath vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash -- cgit v1.2.3 From 3332326c655714fe2e1f740b5635a29c86581228 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 19 Jan 2018 15:12:21 -0800 Subject: Update CMake to 3.10.2 --- README.md | 2 +- scripts/fetchDependency.ps1 | 12 ++++++------ toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6cb2d9755..85f8fc922 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Prerequisites: - Windows 10, 8.1, or 7 - Visual Studio 2017 or Visual Studio 2015 Update 3 - Git -- *Optional: CMake 3.10.1* +- *Optional: CMake 3.10.2* Clone this repository, then run ``` diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 1ff44c211..7629a0c2c 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -20,12 +20,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) if($Dependency -eq "cmake") { - $requiredVersion = "3.10.1" - $downloadVersion = "3.10.1" - $url = "https://cmake.org/files/v3.10/cmake-3.10.1-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.10.1-win32-x86.zip" - $expectedDownloadedFileHash = "6fe010cce1201d884cd7a9535db8a1f16d98b8965341251fde8f1c5069ee58c0" - $executableFromDownload = "$downloadsDir\cmake-3.10.1-win32-x86\bin\cmake.exe" + $requiredVersion = "3.10.2" + $downloadVersion = "3.10.2" + $url = "https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip" + $downloadPath = "$downloadsDir\cmake-3.10.2-win32-x86.zip" + $expectedDownloadedFileHash = "f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6" + $executableFromDownload = "$downloadsDir\cmake-3.10.2-win32-x86\bin\cmake.exe" $extractionType = $ExtractionType_ZIP } elseif($Dependency -eq "nuget") diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index fa5fb128c..e6daedcd4 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -115,7 +115,7 @@ namespace vcpkg static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { #if defined(_WIN32) - static constexpr std::array EXPECTED_VERSION = {3, 10, 1}; + static constexpr std::array EXPECTED_VERSION = {3, 10, 2}; #else static constexpr std::array EXPECTED_VERSION = {3, 5, 1}; #endif @@ -124,7 +124,7 @@ namespace vcpkg const std::vector from_path = Files::find_from_PATH("cmake"); std::vector candidate_paths; - const fs::path downloaded_copy = downloads_folder / "cmake-3.10.1-win32-x86" / "bin" / "cmake.exe"; + const fs::path downloaded_copy = downloads_folder / "cmake-3.10.2-win32-x86" / "bin" / "cmake.exe"; #if defined(_WIN32) candidate_paths.push_back(downloaded_copy); #endif -- cgit v1.2.3 From ae582e0d4f05c210b82046b1a5cb63f395242219 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 19 Jan 2018 15:19:18 -0800 Subject: [bootstrap] Extract arguments in variable --- scripts/bootstrap.ps1 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 3f40a2ead..b4749bdd6 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -43,7 +43,18 @@ try $msbuildExe = $msbuildExeWithPlatformToolset[0] $platformToolset = $msbuildExeWithPlatformToolset[1] $windowsSDK = & $scriptsDir\getWindowsSDK.ps1 - & $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /p:TargetPlatformVersion=$windowsSDK /m dirs.proj + + $arguments = ( + "`"/p:VCPKG_VERSION=-$gitHash`"", + "`"/p:DISABLE_METRICS=$disableMetrics`"", + "/p:Configuration=Release", + "/p:Platform=x86", + "/p:PlatformToolset=$platformToolset", + "/p:TargetPlatformVersion=$windowsSDK", + "/m", + "dirs.proj") + + & $msbuildExe $arguments if ($LASTEXITCODE -ne 0) { Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." -- cgit v1.2.3 From 62c8626f4d28344c3cc4b488ffeac51bddb8bbcd Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 19 Jan 2018 15:19:40 -0800 Subject: vcpkgInvokeCommand(): Add -NoNewWindows flag --- scripts/VcpkgPowershellUtils.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 5381523f0..7a6a67c2c 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -171,7 +171,7 @@ function vcpkgInvokeCommand() [switch]$wait) Write-Verbose "Executing: ${executable} ${arguments}" - $process = Start-Process -FilePath $executable -ArgumentList $arguments -PassThru + $process = Start-Process -FilePath $executable -ArgumentList $arguments -PassThru -NoNewWindow if ($wait) { Wait-Process -InputObject $process -- cgit v1.2.3 From a5fe308ea3c29c5f8715b8f0c78571759541c9b5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 22 Jan 2018 18:18:53 -0800 Subject: $script:MyInvocation.MyCommand.Definition It works also in cases where scripts/functions are calling each other. Without the $script prefix, it would instead give you the calling function OR the path if there was no parent function. With the prefix, it always yields the directory of the script --- scripts/addPoshVcpkgToPowershellProfile.ps1 | 2 +- scripts/bootstrap.ps1 | 2 +- scripts/fetchDependency.ps1 | 2 +- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 2 +- scripts/findVisualStudioInstallationInstances.ps1 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/addPoshVcpkgToPowershellProfile.ps1 b/scripts/addPoshVcpkgToPowershellProfile.ps1 index 7a12e7d34..dcbd2e0be 100644 --- a/scripts/addPoshVcpkgToPowershellProfile.ps1 +++ b/scripts/addPoshVcpkgToPowershellProfile.ps1 @@ -13,7 +13,7 @@ function findExistingImportModuleDirectives([Parameter(Mandatory=$true)][string] return } -$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition . "$scriptsDir\VcpkgPowershellUtils.ps1" $profileEntry = "Import-Module '$scriptsDir\posh-vcpkg'" diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index b4749bdd6..2c05f1adb 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -4,7 +4,7 @@ param( [Parameter(Mandatory=$False)][string]$withVSPath = "" ) -$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root Write-Verbose("vcpkg Path " + $vcpkgRootDir) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 7629a0c2c..6bb87fec4 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -3,7 +3,7 @@ param( [Parameter(Mandatory=$true)][string]$Dependency ) -$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition . "$scriptsDir\VcpkgPowershellUtils.ps1" Write-Verbose "Fetching dependency: $Dependency" diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index 46ba767b9..570ebdf44 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -6,7 +6,7 @@ param( $withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash -$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition $VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 if ($VisualStudioInstallationInstances -eq $null) { diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index e3bc67ff6..359da9caa 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -3,7 +3,7 @@ param( ) -$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition $vswhereExe = (& $scriptsDir\fetchDependency.ps1 "vswhere") -replace "::" -replace "::" $output = & $vswhereExe -prerelease -legacy -products * -format xml -- cgit v1.2.3 From 0df743d6252efda732c00daa48cef28acbf3f078 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 22 Jan 2018 18:19:30 -0800 Subject: [bootstrap] Build vcpkg in a clean environment --- scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 | 52 +++++++++++++++++++++++ scripts/VcpkgPowershellUtils.ps1 | 27 +++++++++++- scripts/bootstrap.ps1 | 7 ++- 3 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 diff --git a/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 b/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 new file mode 100644 index 000000000..5c922572b --- /dev/null +++ b/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 @@ -0,0 +1,52 @@ +# 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 +$machineEnvironmentMap = [Environment]::GetEnvironmentVariables('Machine') # HKEY_CURRENT_USER\Environment +$userEnvironmentMap = [Environment]::GetEnvironmentVariables('User') # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment + +# Identify the keySet of environment variable names +$nameSet = ($specialEnvironmentMap.Keys + $machineEnvironmentMap.Keys + $userEnvironmentMap.Keys) | Sort-Object | Select-Object -Unique + +# Any environment variable in the $nameSet should be restored to its original value +foreach ($name in $nameSet) +{ + if ($specialEnvironmentMap.ContainsKey($name)) + { + [Environment]::SetEnvironmentVariable($name, $specialEnvironmentMap[$name], 'Process') + continue; + } + + # PATH needs to be concatenated as it has values in both machine and user environment. Any other values should be set. + if ($name -match 'path') + { + $pathValuePartial = @() + # Machine values before user values + $pathValuePartial += $machineEnvironmentMap[$name] -split ';' + $pathValuePartial += $userEnvironmentMap[$name] -split ';' + $pathValue = $pathValuePartial -join ';' + [Environment]::SetEnvironmentVariable($name, $pathValue, 'Process') + continue; + } + + if ($userEnvironmentMap.ContainsKey($name)) + { + [Environment]::SetEnvironmentVariable($name, $userEnvironmentMap[$name], 'Process') + continue; + } + + if ($machineEnvironmentMap.ContainsKey($name)) + { + [Environment]::SetEnvironmentVariable($name, $machineEnvironmentMap[$name], 'Process') + continue; + } + + throw "Unreachable: Unknown variable $name" +} + +# Any environment variable NOT in the $nameSet should be removed +$processEnvironmentMap = [Environment]::GetEnvironmentVariables('Process') +$variablesForRemoval = $processEnvironmentMap.Keys | Where-Object {$nameSet -notcontains $_} +foreach ($name in $variablesForRemoval) +{ + [Environment]::SetEnvironmentVariable($name, $null, 'Process') +} diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 7a6a67c2c..ec1e8b92b 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -168,10 +168,33 @@ function vcpkgInvokeCommand() { param ( [Parameter(Mandatory=$true)][string]$executable, [string]$arguments = "", - [switch]$wait) + [Parameter(Mandatory=$true)][switch]$wait) Write-Verbose "Executing: ${executable} ${arguments}" - $process = Start-Process -FilePath $executable -ArgumentList $arguments -PassThru -NoNewWindow + $process = Start-Process -FilePath "`"$executable`"" -ArgumentList $arguments -PassThru -NoNewWindow + if ($wait) + { + Wait-Process -InputObject $process + $ec = $process.ExitCode + Write-Verbose "Execution terminated with exit code $ec." + } +} + +function vcpkgInvokeCommandClean() +{ + param ( [Parameter(Mandatory=$true)][string]$executable, + [string]$arguments = "", + [Parameter(Mandatory=$true)][switch]$wait) + + Write-Verbose "Clean-Executing: ${executable} ${arguments}" + $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition + $cleanEnvScript = "$scriptsDir\VcpkgPowershellUtils-ClearEnvironment.ps1" + $command = "& `"$cleanEnvScript`"; & `"$executable`" $arguments" + $bytes = [System.Text.Encoding]::Unicode.GetBytes($command) + $encodedCommand = [Convert]::ToBase64String($bytes) + $arg = "-encodedCommand $encodedCommand" + + $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow if ($wait) { Wait-Process -InputObject $process diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 2c05f1adb..bf1dcba8e 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -5,6 +5,7 @@ param( ) $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition +. "$scriptsDir\VcpkgPowershellUtils.ps1" $vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root Write-Verbose("vcpkg Path " + $vcpkgRootDir) @@ -52,9 +53,11 @@ try "/p:PlatformToolset=$platformToolset", "/p:TargetPlatformVersion=$windowsSDK", "/m", - "dirs.proj") + "dirs.proj") -join " " + + # vcpkgInvokeCommandClean cmd "/c echo %PATH%" -wait:$true + vcpkgInvokeCommandClean $msbuildExe $arguments -wait:$true - & $msbuildExe $arguments if ($LASTEXITCODE -ne 0) { Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." -- cgit v1.2.3 From 9e00fb932da0520aabf670478f71a578ad920762 Mon Sep 17 00:00:00 2001 From: Godrod Date: Tue, 23 Jan 2018 23:23:58 +0100 Subject: Fix missing dlls --- ports/wxwidgets/portfile.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index 15688264d..a68f71f99 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -96,10 +96,15 @@ file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/mswu/wx/setup.h DESTINATION file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/mswu/wx/msw/rcdefs.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/wx/msw) file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.lib" PATTERN "*.pdb") +file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/ + DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dll") file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-dbg/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "*.lib" PATTERN "*.pdb") +file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-dbg/ + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dll") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/mswu ${CURRENT_PACKAGES_DIR}/debug/lib/mswud) - +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/mswu ${CURRENT_PACKAGES_DIR}/debug/bin/mswud) + # Handle copyright file(COPY ${SOURCE_PATH}/docs/licence.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxwidgets) file(RENAME ${CURRENT_PACKAGES_DIR}/share/wxWidgets/licence.txt ${CURRENT_PACKAGES_DIR}/share/wxwidgets/copyright) -- cgit v1.2.3 From e5b0de35d37b0df531fbcc7567fe849aef0b2b85 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:08:52 -0800 Subject: [vswhere] Update to 2.3.2 --- scripts/fetchDependency.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 6bb87fec4..463b6f243 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -40,11 +40,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "vswhere") { - $requiredVersion = "2.2.11" - $downloadVersion = "2.2.11" - $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.11/vswhere.exe" + $requiredVersion = "2.3.2" + $downloadVersion = "2.3.2" + $url = "https://github.com/Microsoft/vswhere/releases/download/2.3.2/vswhere.exe" $downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe" - $expectedDownloadedFileHash = "0235c2cb6341978abdf32e27fcf1d7af5cb5514c035e529c4cd9283e6f1a261f" + $expectedDownloadedFileHash = "103f2784c4b2c8e70c7c1c03687abbf22bce052aae30639406e4e13ffa29ee04" $executableFromDownload = $downloadPath $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED } -- cgit v1.2.3 From 209452755be4e607864481a24eb6383f7e3e984d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:18:31 -0800 Subject: Fix #include casing --- 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 094ea1dc5..0af6bd76a 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -4,7 +4,7 @@ #pragma warning(push) #pragma warning(disable : 4768) -#include +#include #pragma warning(pop) #else #include -- cgit v1.2.3 From a413b523e2a4e96c2e2cc3eb4e24e11f7ac75b52 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:19:51 -0800 Subject: Add missing initializer --- toolsrc/src/vcpkg/build.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index d583a409e..74b946775 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -61,7 +61,8 @@ namespace vcpkg::Build::Command spec.name()); const StatusParagraphs status_db = database_load_check(paths); - const Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; + const Build::BuildPackageOptions build_package_options{ + Build::UseHeadVersion::NO, Build::AllowDownloads::YES, Build::CleanBuildtrees::NO}; const std::unordered_set features_as_set(full_spec.features.begin(), full_spec.features.end()); -- cgit v1.2.3 From 80f1563c6b6204d09b750944433d51047c46afba Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:21:33 -0800 Subject: Use empty() instead of comparing with size() --- toolsrc/src/vcpkg.cpp | 2 +- toolsrc/src/vcpkg/build.cpp | 2 +- toolsrc/src/vcpkg/commands.cache.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 0af6bd76a..9f29dcdd2 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -214,7 +214,7 @@ static void load_config() static std::string trim_path_from_command_line(const std::string& full_command_line) { Checks::check_exit( - VCPKG_LINE_INFO, full_command_line.size() > 0, "Internal failure - cannot have empty command line"); + VCPKG_LINE_INFO, !full_command_line.empty(), "Internal failure - cannot have empty command line"); if (full_command_line[0] == '"') { diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 74b946775..4a6834443 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -296,7 +296,7 @@ namespace vcpkg::Build { features.append(feature + ";"); } - if (features.size() > 0) + if (!features.empty()) { features.pop_back(); } diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index 6fd123b7c..85bf5fb4d 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -47,7 +47,7 @@ namespace vcpkg::Commands::Cache Checks::exit_success(VCPKG_LINE_INFO); } - if (args.command_arguments.size() == 0) + if (args.command_arguments.empty()) { for (const BinaryParagraph& binary_paragraph : binary_paragraphs) { -- cgit v1.2.3 From 2f6e549223021b446b6b5c2942c665ee9a4b91d7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:23:21 -0800 Subject: Use emplace_back() instead of push_back() --- toolsrc/src/vcpkg/commands.create.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index 44f5f7928..25c34cf09 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -34,7 +34,7 @@ namespace vcpkg::Commands::Create R"(Filename cannot contain invalid chars %s, but was %s)", Files::FILESYSTEM_INVALID_CHARACTERS, zip_file_name); - cmake_args.push_back({"FILENAME", zip_file_name}); + cmake_args.emplace_back("FILENAME", zip_file_name); } const std::string cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args); -- cgit v1.2.3 From adc8055a90b56cfc2bc45e39deea2d3ab95b8216 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:23:38 -0800 Subject: Rename to avoid variable hiding. Move temp into vector --- toolsrc/src/vcpkg/build.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 4a6834443..db1360ba0 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -270,10 +270,10 @@ namespace vcpkg::Build std::vector missing_specs; for (auto&& dep : filter_dependencies(config.scf.core_paragraph->depends, triplet)) { - auto spec = PackageSpec::from_name_and_triplet(dep, triplet).value_or_exit(VCPKG_LINE_INFO); - if (!status_db.is_installed(spec)) + auto dep_spec = PackageSpec::from_name_and_triplet(dep, triplet).value_or_exit(VCPKG_LINE_INFO); + if (!status_db.is_installed(dep_spec)) { - missing_specs.push_back(spec); + missing_specs.push_back(std::move(dep_spec)); } } // Fail the build if any dependencies were missing -- cgit v1.2.3 From bbf1a737b6da91a452d93579b5162bd7c6239316 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:27:38 -0800 Subject: Use for-each loop --- toolsrc/src/vcpkg/commands.exportifw.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp index b25982e4b..58d9aa0be 100644 --- a/toolsrc/src/vcpkg/commands.exportifw.cpp +++ b/toolsrc/src/vcpkg/commands.exportifw.cpp @@ -138,13 +138,13 @@ namespace vcpkg::Export::IFW )###", create_release_date())); - for (auto package = unique_packages.begin(); package != unique_packages.end(); ++package) + for (const auto& unique_package : unique_packages) { - const ExportPlanAction& action = *(package->second); + const ExportPlanAction& action = *(unique_package.second); const BinaryParagraph& binary_paragraph = action.core_paragraph().value_or_exit(VCPKG_LINE_INFO); package_xml_file_path = - raw_exported_dir_path / Strings::format("packages.%s", package->first) / "meta" / "package.xml"; + raw_exported_dir_path / Strings::format("packages.%s", unique_package.first) / "meta" / "package.xml"; package_xml_dir_path = package_xml_file_path.parent_path(); fs.create_directories(package_xml_dir_path, ec); Checks::check_exit(VCPKG_LINE_INFO, -- cgit v1.2.3 From 9d85ed4c17bd871cfc4b267c3231fc207f4f0006 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:28:20 -0800 Subject: Use char instead of string when string-searching for a single char --- toolsrc/src/vcpkg/commands.hash.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 1e3e5b23d..fa3d80f27 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -7,7 +7,7 @@ namespace vcpkg::Commands::Hash { - static void do_file_hash(fs::path const &cmake_exe_path, fs::path const& path, std::string const& hash_type) + static void do_file_hash(fs::path const& cmake_exe_path, fs::path const& path, std::string const& hash_type) { const std::string cmd_line = Strings::format( R"("%s" -E %ssum %s)", cmake_exe_path.u8string(), Strings::ascii_to_lowercase(hash_type), path.u8string()); @@ -17,7 +17,7 @@ namespace vcpkg::Commands::Hash std::string const& output = ec_data.output; - const auto start = output.find_first_of(" "); + const auto start = output.find_first_of(' '); Checks::check_exit( VCPKG_LINE_INFO, start != std::string::npos, "Unexpected output format from command: %s", cmd_line); -- cgit v1.2.3 From bff50291c209e7864ec1a58f8bc8d646ae7d7240 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:28:55 -0800 Subject: Use empty() instead of size() == 0 --- toolsrc/src/vcpkg/commands.list.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index 2570c8a6d..a5efd5442 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -58,7 +58,7 @@ namespace vcpkg::Commands::List return lhs->package.displayname() < rhs->package.displayname(); }); - if (args.command_arguments.size() == 0) + if (args.command_arguments.empty()) { for (const StatusParagraph* status_paragraph : installed_packages) { -- cgit v1.2.3 From 47833bb39310c0c76a02f3724faf07b41488c736 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:31:39 -0800 Subject: Parameter name consistency between declaration and definition --- toolsrc/src/vcpkg/dependencies.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 5ce96a3e1..236d38bea 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -415,10 +415,10 @@ namespace vcpkg::Dependencies static MarkPlusResult mark_plus(const std::string& feature, Cluster& cluster, - ClusterGraph& pkg_to_cluster, + ClusterGraph& graph, GraphPlan& graph_plan); - static void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan); + static void mark_minus(Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan); MarkPlusResult mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) { -- cgit v1.2.3 From 5be6975cd53892479aae4ce5e9af6cc9ea88634e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:33:13 -0800 Subject: Use =default for trivial destructor --- toolsrc/src/vcpkg/dependencies.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 236d38bea..af2e8b431 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -682,7 +682,7 @@ namespace vcpkg::Dependencies { } - PackageGraph::~PackageGraph() {} + PackageGraph::~PackageGraph() = default; void print_plan(const std::vector& action_plan, const bool is_recursive) { -- cgit v1.2.3 From acf3f30d7a4b8cd4b568f6faa3314bcf1940521d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:33:47 -0800 Subject: Init order should match order of fields --- toolsrc/src/vcpkg/dependencies.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index af2e8b431..26ee19e66 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -678,7 +678,7 @@ namespace vcpkg::Dependencies } PackageGraph::PackageGraph(const PortFileProvider& provider, const StatusParagraphs& status_db) - : m_graph(create_feature_install_graph(provider, status_db)), m_graph_plan(std::make_unique()) + : m_graph_plan(std::make_unique()), m_graph(create_feature_install_graph(provider, status_db)) { } -- cgit v1.2.3 From f3a43d98abecb61a7628f415d9bbe886c4bb26ec Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:36:06 -0800 Subject: Remove unneeded else --- toolsrc/src/vcpkg/dependencies.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 26ee19e66..a4ef991fc 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -392,10 +392,8 @@ namespace vcpkg::Dependencies { return ExportPlanAction{spec, std::move(*p_ipv), request_type}; } - else - { - return ExportPlanAction{spec, request_type}; - } + + return ExportPlanAction{spec, request_type}; } std::string to_string(const PackageSpec& spec) const override { return spec.to_string(); } -- cgit v1.2.3 From 639f99379847a95a7dacd8874dc41276b6fe4862 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:38:08 -0800 Subject: Add missing method const --- toolsrc/include/vcpkg/dependencies.h | 4 ++-- toolsrc/src/vcpkg/dependencies.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index c3f00018d..014f004a2 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -151,8 +151,8 @@ namespace vcpkg::Dependencies PackageGraph(const PortFileProvider& provider, const StatusParagraphs& status_db); ~PackageGraph(); - void install(const FeatureSpec& spec); - void upgrade(const PackageSpec& spec); + void install(const FeatureSpec& spec) const; + void upgrade(const PackageSpec& spec) const; std::vector serialize() const; diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index a4ef991fc..71cfd52c1 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -527,7 +527,7 @@ namespace vcpkg::Dependencies return create_feature_install_plan(provider, specs, status_db); } - void PackageGraph::install(const FeatureSpec& spec) + void PackageGraph::install(const FeatureSpec& spec) const { Cluster& spec_cluster = m_graph->get(spec.spec()); spec_cluster.request_type = RequestType::USER_REQUESTED; @@ -565,7 +565,7 @@ namespace vcpkg::Dependencies m_graph_plan->install_graph.add_vertex(ClusterPtr{&spec_cluster}); } - void PackageGraph::upgrade(const PackageSpec& spec) + void PackageGraph::upgrade(const PackageSpec& spec) const { Cluster& spec_cluster = m_graph->get(spec); spec_cluster.request_type = RequestType::USER_REQUESTED; -- cgit v1.2.3 From 67755f9415cb8c7aae971084aa5313bfa71c97bb Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 15:40:25 -0800 Subject: Use !empty() instead of size() > 0 --- toolsrc/src/vcpkg/dependencies.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 71cfd52c1..4842fde96 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -743,29 +743,29 @@ namespace vcpkg::Dependencies }); }; - if (excluded.size() > 0) + if (!excluded.empty()) { System::println("The following packages are excluded:\n%s", actions_to_output_string(excluded)); } - if (already_installed_plans.size() > 0) + if (!already_installed_plans.empty()) { System::println("The following packages are already installed:\n%s", actions_to_output_string(already_installed_plans)); } - if (rebuilt_plans.size() > 0) + if (!rebuilt_plans.empty()) { System::println("The following packages will be rebuilt:\n%s", actions_to_output_string(rebuilt_plans)); } - if (new_plans.size() > 0) + if (!new_plans.empty()) { System::println("The following packages will be built and installed:\n%s", actions_to_output_string(new_plans)); } - if (only_install_plans.size() > 0) + if (!only_install_plans.empty()) { System::println("The following packages will be directly installed:\n%s", actions_to_output_string(only_install_plans)); @@ -774,7 +774,7 @@ namespace vcpkg::Dependencies if (has_non_user_requested_packages) System::println("Additional packages (*) will be modified to complete this operation."); - if (remove_plans.size() > 0 && !is_recursive) + if (!remove_plans.empty() && !is_recursive) { System::println(System::Color::warning, "If you are sure you want to rebuild the above packages, run the command with the " -- cgit v1.2.3 From 2fa1ca162104193b36f0d9800b10afb1c4e82257 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 23 Jan 2018 16:59:10 -0800 Subject: Update CHANGELOG and bump version to v0.0.102 --- CHANGELOG.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2e2b42b9..c364df0a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,71 @@ +vcpkg (0.0.102) +-------------- + * Add ports: + - catch-classic 1.12.0 + - catch2 2.1.0 + - cgicc 3.2.19 + - libdisasm 0.23 + - qt5-3d 5.9.2-0 + - qt5-base 5.9.2-1 + - qt5-charts 5.9.2-0 + - qt5-datavis3d 5.9.2-0 + - qt5-declarative 5.9.2-0 + - qt5-gamepad 5.9.2-0 + - qt5-imageformats 5.9.2-0 + - qt5-modularscripts 1 + - qt5-multimedia 5.9.2-0 + - qt5-networkauth 5.9.2-0 + - qt5-scxml 5.9.2-0 + - qt5-serialport 5.9.2-0 + - qt5-speech 5.9.2-0 + - qt5-svg 5.9.2-0 + - qt5-tools 5.9.2-0 + - qt5-virtualkeyboard 5.9.2-0 + - qt5-websockets 5.9.2-0 + - qt5-winextras 5.9.2-0 + - qt5-xmlpatterns 5.9.2-0 + - tre 0.8.0-1 + * Update ports: + - boost-asio 1.66.0 -> 1.66.0-1 + - boost-build 1.66.0 -> 1.66.0-3 + - boost-vcpkg-helpers 3 -> 4 + - corrade jun2017-3 -> jan2018-1 + - curl 7.57.0-1 -> 7.57.0-2 + - date 2.3-c286981b3bf83c79554769df68b27415cee68d77 -> 2.4 + - discord-rpc 2.0.1 -> 2.1.0 + - dlib 19.8 -> 19.9 + - libbson 1.9.0 -> 1.9.2 + - libconfig 1.7.1 -> 1.7.2 + - libjpeg-turbo 1.5.2-2 -> 1.5.3 + - libodb 2.4.0-1 -> 2.4.0-2 + - libogg 1.3.2-cab46b1-3 -> 1.3.3 + - libwebp 0.6.0-2 -> 0.6.1 + - libwebsockets 2.0.0-4 -> 2.4.1 + - lz4 1.8.0-1 -> 1.8.1.2 + - magnum jun2017-6 -> jan2018-1 + - magnum-plugins jun2017-5 -> jan2018-1 + - mongo-c-driver 1.9.0 -> 1.9.2 + - mpg123 1.25.8 -> 1.25.8-1 + - openni2 2.2.0.33-4 -> 2.2.0.33-7 + - osg 3.5.6-1 -> 3.5.6-2 + - poco 1.8.0.1 -> 1.8.1 + - qca 2.2.0-1 -> 2.2.0-2 + - qscintilla 2.10-1 -> 2.10-4 + - qt5 5.8-6 -> 5.9.2-1 + - qwt 6.1.3-2 -> 6.1.3-4 + - sciter 4.1.0 -> 4.1.1 + - sdl2 2.0.7-3 -> 2.0.7-4 + - tiff 4.0.8-1 -> 4.0.9 + - xxhash 0.6.3-1 -> 0.6.4 + * Remove usage of `BITS-transfer`. Use .NET functions (which used to be the fallback if `BITS-transfer` failed) by default. + * Enable the usage of `feature-packages` by default. More info [here](docs/specifications/feature-packages.md). + * Bootstrapping `vcpkg` now happens in a clean environment to avoid issues when building in a VS Developer Prompt among others. + * Update required version & auto-downloaded version of `cmake` to 3.10.2 + * Update required version & auto-downloaded version of `vswhere` to 2.3.2 + +-- vcpkg team TUE, 23 Jan 2018 17:00:00 -0800 + + vcpkg (0.0.101) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index d78a54a5e..d2de8fba0 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.101" \ No newline at end of file +"0.0.102" \ No newline at end of file -- cgit v1.2.3 From d0d38919bb3878e281b62bb69137cd94279b690d Mon Sep 17 00:00:00 2001 From: pravic Date: Wed, 24 Jan 2018 11:30:44 +0300 Subject: [curl] update to 7.58.0 --- 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 2affc3bb7..450f43d59 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7.57.0-2 +Version: 7.58.0 Build-Depends: zlib, openssl, libssh2 Description: A library for transferring data with URLs # For WINSSL create target triplet which contains set(CURL_USE_WINSSL ON) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 054dd74b2..64001704a 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO curl/curl - REF curl-7_57_0 - SHA512 19f963d86682153d2d73731c784adf6457bc3fd48b628d6d701649f64718b10df268797ce21ad5f5339efc5df81b8547772edcc36c046665309e32997d5d1afc + REF curl-7_58_0 + SHA512 148c25152732dd5ad2626bc70c7725577e25033a73eecefa4dd820927ec552f9c2d0235cc3f597404d3893eced7d5d2bd9522f6302b7f930e9f65912ac2c91f6 HEAD_REF master ) -- cgit v1.2.3 From 9eda2e04d161503672bf4250e304892e4ab39c03 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 24 Jan 2018 14:20:24 -0800 Subject: [vcpkg] Fix issue with any command executing more than 10 transactions with mixed types. Fixes #2600. Fixes #2582. --- toolsrc/src/vcpkg/vcpkglib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/vcpkglib.cpp b/toolsrc/src/vcpkg/vcpkglib.cpp index de6ffefed..220c29720 100644 --- a/toolsrc/src/vcpkg/vcpkglib.cpp +++ b/toolsrc/src/vcpkg/vcpkglib.cpp @@ -92,7 +92,7 @@ namespace vcpkg const auto my_update_id = update_id++; const auto tmp_update_filename = paths.vcpkg_dir_updates / "incomplete"; - const auto update_filename = paths.vcpkg_dir_updates / std::to_string(my_update_id); + const auto update_filename = paths.vcpkg_dir_updates / Strings::format("%010d", my_update_id); fs.write_contents(tmp_update_filename, Strings::serialize(p)); fs.rename(tmp_update_filename, update_filename); -- cgit v1.2.3 From 0c67c35bccc61945cee6511721c302bdbbaaeb10 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 24 Jan 2018 14:31:37 -0800 Subject: Update CHANGELOG and bump version to v0.0.103 --- CHANGELOG.md | 7 +++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c364df0a0..59da20df1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +vcpkg (0.0.103) +-------------- + * `vcpkg upgrade`: Fix issue with any command executing more than 10 transactions with mixed transaction types (install + remove) + +-- vcpkg team WED, 24 Jan 2017 14:30:00 -0800 + + vcpkg (0.0.102) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index d2de8fba0..486716ae3 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.102" \ No newline at end of file +"0.0.103" \ No newline at end of file -- cgit v1.2.3 From fd2f9816cc7aaecd52d335591d46efa3c9ea2f00 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 24 Jan 2018 15:22:41 -0800 Subject: Don't expand variable --- scripts/cmake/vcpkg_apply_patches.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index ac6e5cc93..1894d6e9a 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -47,7 +47,7 @@ function(vcpkg_apply_patches) RESULT_VARIABLE error_code ) - if(error_code AND NOT ${_ap_QUIET}) + if(error_code AND NOT _ap_QUIET) message(STATUS "Applying patch failed. This is expected if this patch was previously applied.") endif() -- cgit v1.2.3 From d4cf299de62a97d573445bf55c70816947940072 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 24 Jan 2018 15:35:01 -0800 Subject: [gflags] Use vcpkg_fixup_cmake_targets() instead of patching --- ports/gflags/CONTROL | 2 +- ports/gflags/fix-install.patch | 15 --------------- ports/gflags/portfile.cmake | 7 +------ 3 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 ports/gflags/fix-install.patch diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index c41d49217..a1bcb795c 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.2.1 +Version: 2.2.1-1 Description: A C++ library that implements commandline flags processing diff --git a/ports/gflags/fix-install.patch b/ports/gflags/fix-install.patch deleted file mode 100644 index eda5b7f98..000000000 --- a/ports/gflags/fix-install.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 922a038..7d6af45 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -410,8 +410,8 @@ if (OS_WINDOWS) - set (RUNTIME_INSTALL_DIR "bin") - set (LIBRARY_INSTALL_DIR "lib") - set (INCLUDE_INSTALL_DIR "include") -- set (CONFIG_INSTALL_DIR "lib/cmake/${PACKAGE_NAME}") -- set (PKGCONFIG_INSTALL_DIR) -+ set (CONFIG_INSTALL_DIR "share/${PACKAGE_NAME}") -+ set (PKGCONFIG_INSTALL_DIR "") - else () - set (RUNTIME_INSTALL_DIR bin) - # The LIB_INSTALL_DIR and LIB_SUFFIX variables are used by the Fedora diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index 59811f487..0e89a8f16 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -12,11 +12,6 @@ vcpkg_from_github( HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install.patch" -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -27,7 +22,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gflags) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -- cgit v1.2.3 From ccedc8b4333037eb4cb4a2f2d15c3684e3729dd3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 24 Jan 2018 18:43:19 -0800 Subject: [openssl] Patch out non-ascii char --- ports/openssl/CONTROL | 2 +- ports/openssl/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index dcdda9cc6..e1cea2799 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2n-1 +Version: 1.0.2n-2 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/portfile.cmake b/ports/openssl/portfile.cmake index 349144e91..65662dd86 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -28,6 +28,7 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch ${CMAKE_CURRENT_LIST_DIR}/STRINGIFYPatch.patch ${CMAKE_CURRENT_LIST_DIR}/EmbedSymbolsInStaticLibsZ7.patch + ${CMAKE_CURRENT_LIST_DIR}/RemoveNonASCIIChar.patch ) set(CONFIGURE_COMMAND ${PERL} Configure -- cgit v1.2.3 From 9e0e0ebe6232303a9de41d0ae5f2167ad4a7382f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 24 Jan 2018 18:49:03 -0800 Subject: [openssl] Add missing patch --- ports/openssl/RemoveNonASCIIChar.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ports/openssl/RemoveNonASCIIChar.patch diff --git a/ports/openssl/RemoveNonASCIIChar.patch b/ports/openssl/RemoveNonASCIIChar.patch new file mode 100644 index 000000000..5c4553b0a --- /dev/null +++ b/ports/openssl/RemoveNonASCIIChar.patch @@ -0,0 +1,13 @@ +diff --git a/ssl/bad_dtls_test.c b/ssl/bad_dtls_test.c +index 34af37d..ff754e1 100644 +--- a/ssl/bad_dtls_test.c ++++ b/ssl/bad_dtls_test.c +@@ -19,7 +19,7 @@ + * Note that unlike other SSL tests, we don't test against our own SSL + * server method. Firstly because we don't have one; we *only* support + * DTLS1_BAD_VER as a client. And secondly because even if that were +- * fixed up it's the wrong thing to test against — because if changes ++ * fixed up it's the wrong thing to test against - because if changes + * are made in generic DTLS code which don't take DTLS1_BAD_VER into + * account, there's plenty of scope for making those changes such that + * they break *both* the client and the server in the same way. -- cgit v1.2.3 From de2396035a98c1149bd0db2c4bc59d7243e0802a Mon Sep 17 00:00:00 2001 From: pravic Date: Thu, 25 Jan 2018 07:57:33 +0300 Subject: [sciter] Update to 4.1.2.5717 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 65dd215ac..349f0d6bf 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.1.1 +Version: 4.1.2 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 4aec0c397..df3fb0507 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,8 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION c6f5f5e826160920dd7409481c1d064bde995cde) -set(SCITER_SHA 47c634dc5ad5907d7f21207d1d4bfe4df06910417ce53169020466afcebe94f1cae9a0cccbf3fc105eab16315da65c74eed7af5efc9ca438b9cbb5d6e9bb09e1) +set(SCITER_REVISION 38c277d6b4642ad5f00e24c11bcc4cab099d9a7a) +set(SCITER_SHA efce6bb9fd733cde5f0f11f54375e40389454feb6f0170a18423bb75e43d6bcb9621e05320f8e9954231439e8295e2a6eda236b671fb8dfa5c9c256e3ed7bb03) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From d0897e726d7e0809cab6fbadbfa3ccceec8bb502 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Wed, 24 Jan 2018 21:49:13 -0800 Subject: [openvr] update to 1.0.12 and use vcpkg_from_github --- ports/openvr/CONTROL | 2 +- ports/openvr/portfile.cmake | 21 +++++++-------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/ports/openvr/CONTROL b/ports/openvr/CONTROL index 69d7ba966..18d040b95 100644 --- a/ports/openvr/CONTROL +++ b/ports/openvr/CONTROL @@ -1,3 +1,3 @@ Source: openvr -Version: 1.0.9 +Version: 1.0.12 Description: an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting. diff --git a/ports/openvr/portfile.cmake b/ports/openvr/portfile.cmake index 50ec79d77..1a18b4fd0 100644 --- a/ports/openvr/portfile.cmake +++ b/ports/openvr/portfile.cmake @@ -1,19 +1,12 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openvr-1.0.9) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/ValveSoftware/openvr/archive/v1.0.9.zip" - FILENAME "openvr-v1.0.9.zip" - SHA512 969cf6bf94802553bb4f1e5d6a2348566847b3d60efee9d8f83233d1d85e44a870e388028be956950d4f8ecb79f8e0bcf0a6b987b0ab3083060ece5ea48b8fa7 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ValveSoftware/openvr + REF v1.0.12 + SHA512 42e6ac8635417fbb2c95a4b290f917d057c0d66ac1e07b4a0d16c4f8197b06c8ebf553299060a7996b5a9b5420f299f2bda257b8133dc99f9441c67331293ad1 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) set(VCPKG_LIBRARY_LINKAGE dynamic) -- cgit v1.2.3 From f04a4aee91babba8f9924f859bfd959fe34c2445 Mon Sep 17 00:00:00 2001 From: Tobias Kohlbau Date: Tue, 23 Jan 2018 17:23:45 +0100 Subject: [libzip] bump to 1.4.0 Signed-off-by: Tobias Kohlbau --- ports/libzip/CONTROL | 2 +- .../libzip/cmake_dont_build_more_than_needed.patch | 19 ++++++ ports/libzip/enable-static.patch | 77 ---------------------- ports/libzip/fix-attribute.patch | 12 ++++ ports/libzip/portfile.cmake | 31 ++++----- 5 files changed, 44 insertions(+), 97 deletions(-) create mode 100644 ports/libzip/cmake_dont_build_more_than_needed.patch delete mode 100644 ports/libzip/enable-static.patch create mode 100644 ports/libzip/fix-attribute.patch diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL index 3ca61d39b..763275196 100644 --- a/ports/libzip/CONTROL +++ b/ports/libzip/CONTROL @@ -1,4 +1,4 @@ Source: libzip -Version: 1.3.2 +Version: 1.4.0 Build-Depends: zlib Description: A library for reading, creating, and modifying zip archives. diff --git a/ports/libzip/cmake_dont_build_more_than_needed.patch b/ports/libzip/cmake_dont_build_more_than_needed.patch new file mode 100644 index 000000000..bb0af9749 --- /dev/null +++ b/ports/libzip/cmake_dont_build_more_than_needed.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 69cdb8b..4c985fb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -149,10 +149,10 @@ ENABLE_TESTING() + + # Targets + ADD_SUBDIRECTORY(lib) +-ADD_SUBDIRECTORY(man) +-ADD_SUBDIRECTORY(src) +-ADD_SUBDIRECTORY(regress) +-ADD_SUBDIRECTORY(examples) ++#ADD_SUBDIRECTORY(man) ++#ADD_SUBDIRECTORY(src) ++#ADD_SUBDIRECTORY(regress) ++#ADD_SUBDIRECTORY(examples) + + # pkgconfig file + SET(prefix ${CMAKE_INSTALL_PREFIX}) diff --git a/ports/libzip/enable-static.patch b/ports/libzip/enable-static.patch deleted file mode 100644 index 61c93b435..000000000 --- a/ports/libzip/enable-static.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index deceb65..1283013 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -113,6 +113,15 @@ ADD_DEFINITIONS("-D_CRT_SECURE_NO_WARNINGS") - ADD_DEFINITIONS("-D_CRT_NONSTDC_NO_DEPRECATE") - ENDIF(MSVC) - -+OPTION(ENABLE_STATIC "Enable static builds" OFF) -+IF(ENABLE_STATIC) -+ set(BUILD_SHARED_LIBS OFF) -+ set(ZIP_EXTERN_OVERRIDE ON) -+ set(ZIP_EXTERN ON) -+ELSE(ENABLE_STATIC) -+ set(BUILD_SHARED_LIBS ON) -+ENDIF(ENABLE_STATIC) -+ - ADD_DEFINITIONS("-DHAVE_CONFIG_H") - - # rpath handling: use rpath in installed binaries -@@ -121,10 +130,10 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - - # Targets - ADD_SUBDIRECTORY(lib) --ADD_SUBDIRECTORY(man) --ADD_SUBDIRECTORY(src) --ADD_SUBDIRECTORY(regress) --ADD_SUBDIRECTORY(examples) -+# ADD_SUBDIRECTORY(man) -+# ADD_SUBDIRECTORY(src) -+# ADD_SUBDIRECTORY(regress) -+# ADD_SUBDIRECTORY(examples) - - # pkgconfig file - SET(prefix ${CMAKE_INSTALL_PREFIX}) -diff --git a/cmake-config.h.in b/cmake-config.h.in -index 0d1839c..dd450ff 100644 ---- a/cmake-config.h.in -+++ b/cmake-config.h.in -@@ -60,7 +60,7 @@ - #cmakedefine WORDS_BIGENDIAN - /* END DEFINES */ - #define PACKAGE "@PACKAGE@" --#define VERSION "@VERSION@" -+#define LIBZIP_VERSION "@VERSION@" - - #ifndef HAVE_SSIZE_T_LIBZIP - # if SIZE_T_LIBZIP == INT_LIBZIP -diff --git a/cmake-zipconf.h.in b/cmake-zipconf.h.in -index 6a276f6..410c898 100644 ---- a/cmake-zipconf.h.in -+++ b/cmake-zipconf.h.in -@@ -118,4 +118,10 @@ typedef unsigned long long zip_uint64_t; - #define ZIP_INT64_MAX 0x7fffffffffffffffLL - #define ZIP_UINT64_MAX 0xffffffffffffffffULL - -+#cmakedefine ZIP_EXTERN_OVERRIDE -+#ifdef ZIP_EXTERN_OVERRIDE -+#undef ZIP_EXTERN -+#cmakedefine ZIP_EXTERN -+#endif -+ - #endif /* zipconf.h */ -diff --git a/lib/compat.h b/lib/compat.h -index 625c84e..8943587 100644 ---- a/lib/compat.h -+++ b/lib/compat.h -@@ -42,7 +42,9 @@ - #define __STDC_LIMIT_MACROS - - #ifdef _WIN32 -+#ifndef ZIP_EXTERN_OVERRIDE - #define ZIP_EXTERN __declspec(dllexport) -+#endif - /* for dup(), close(), etc. */ - #include - #endif diff --git a/ports/libzip/fix-attribute.patch b/ports/libzip/fix-attribute.patch new file mode 100644 index 000000000..0669d75d6 --- /dev/null +++ b/ports/libzip/fix-attribute.patch @@ -0,0 +1,12 @@ +diff --git a/lib/zip_algorithm_bzip2.c b/lib/zip_algorithm_bzip2.c +index 1748fd4..fd74503 100644 +--- a/lib/zip_algorithm_bzip2.c ++++ b/lib/zip_algorithm_bzip2.c +@@ -270,6 +270,6 @@ zip_compression_algorithm_t zip_algorithm_bzip2_decompress = { + + #else + +-static int dummy __attribute__((used)); ++static int dummy; + + #endif /* HAVE_LIBBZ2 */ diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake index bcde856e2..ae95a3ae4 100644 --- a/ports/libzip/portfile.cmake +++ b/ports/libzip/portfile.cmake @@ -1,34 +1,27 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libzip-1.3.2) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://nih.at/libzip/libzip-1.3.2.tar.gz" - FILENAME "libzip-1.3.2.tar.gz" - SHA512 75b7e6f541be30e721275723f264c20f9a3be5335d954b5909acdddb0f6dd9b2420166904c9b88206692a57a4aa54e4fe8ed4d62c1f4b900aebf6ad40f767376 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nih-at/libzip + REF rel-1-4-0 + SHA512 3d8c5e64c567d2b91670ea041228d74cc8415116dfeb5c9bcf587ab817618eace668c5171122eeccf2a5f25242c2439c5f60b361f99a06274ab58aea720fe0bb ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) # Patch cmake and configuration to allow static builds vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/enable-static.patch" + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/cmake_dont_build_more_than_needed.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-attribute.patch" ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DENABLE_STATIC=OFF - ) -else() - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DENABLE_STATIC=ON - ) -endif() +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) vcpkg_install_cmake() # Move zipconf.h to include and remove include directories from lib -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libzip/include/zipconf.h ${CURRENT_PACKAGES_DIR}/include/zipconf.h) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libzip ${CURRENT_PACKAGES_DIR}/debug/lib/libzip) # Remove debug include -- cgit v1.2.3 From 0cf5297a723243e0f116de8112ace8125c262f44 Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Thu, 25 Jan 2018 22:49:44 +0100 Subject: license has been removed from SDK 16299 default installation, use a link as a copyright notice like 8.1 sdk --- ports/opengl/CONTROL | 4 ++-- ports/opengl/portfile.cmake | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ports/opengl/CONTROL b/ports/opengl/CONTROL index 15acb1f0f..365b908cf 100644 --- a/ports/opengl/CONTROL +++ b/ports/opengl/CONTROL @@ -1,3 +1,3 @@ Source: opengl -Version: 0.0-4 -Description: Open Graphics Library (OpenGL)[3][4][5] is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. \ No newline at end of file +Version: 0.0-5 +Description: Open Graphics Library (OpenGL)[3][4][5] is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. diff --git a/ports/opengl/portfile.cmake b/ports/opengl/portfile.cmake index 154cb039e..6e9e1d14f 100644 --- a/ports/opengl/portfile.cmake +++ b/ports/opengl/portfile.cmake @@ -6,7 +6,6 @@ vcpkg_get_windows_sdk(WINDOWS_SDK) if (WINDOWS_SDK MATCHES "10.") set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") - set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf") set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") elseif(WINDOWS_SDK MATCHES "8.") set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") @@ -41,9 +40,8 @@ file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -if (DEFINED LICENSEPATH) - file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/opengl) - file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See the accompanying sdk_license.rtf") -else() - file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") -endif() \ No newline at end of file +if (WINDOWS_SDK MATCHES "10.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license") +elseif(WINDOWS_SDK MATCHES "8.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") +endif() -- cgit v1.2.3 From a8a20f1a1338ecc5ebb0575135b820b06479ae15 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 25 Jan 2018 14:46:00 -0800 Subject: VcpkgInvokeCommand: remove paramter $wait --- scripts/VcpkgPowershellUtils.ps1 | 24 ++++++++---------------- scripts/bootstrap.ps1 | 4 ++-- scripts/fetchDependency.ps1 | 2 +- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index ec1e8b92b..3ca540874 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -167,24 +167,19 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, function vcpkgInvokeCommand() { param ( [Parameter(Mandatory=$true)][string]$executable, - [string]$arguments = "", - [Parameter(Mandatory=$true)][switch]$wait) + [string]$arguments = "") Write-Verbose "Executing: ${executable} ${arguments}" $process = Start-Process -FilePath "`"$executable`"" -ArgumentList $arguments -PassThru -NoNewWindow - if ($wait) - { - Wait-Process -InputObject $process - $ec = $process.ExitCode - Write-Verbose "Execution terminated with exit code $ec." - } + Wait-Process -InputObject $process + $ec = $process.ExitCode + Write-Verbose "Execution terminated with exit code $ec." } function vcpkgInvokeCommandClean() { param ( [Parameter(Mandatory=$true)][string]$executable, - [string]$arguments = "", - [Parameter(Mandatory=$true)][switch]$wait) + [string]$arguments = "") Write-Verbose "Clean-Executing: ${executable} ${arguments}" $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition @@ -195,10 +190,7 @@ function vcpkgInvokeCommandClean() $arg = "-encodedCommand $encodedCommand" $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow - if ($wait) - { - Wait-Process -InputObject $process - $ec = $process.ExitCode - Write-Verbose "Execution terminated with exit code $ec." - } + Wait-Process -InputObject $process + $ec = $process.ExitCode + Write-Verbose "Execution terminated with exit code $ec." } \ No newline at end of file diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index bf1dcba8e..a50d0dde1 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -55,8 +55,8 @@ try "/m", "dirs.proj") -join " " - # vcpkgInvokeCommandClean cmd "/c echo %PATH%" -wait:$true - vcpkgInvokeCommandClean $msbuildExe $arguments -wait:$true + # vcpkgInvokeCommandClean cmd "/c echo %PATH%" + vcpkgInvokeCommandClean $msbuildExe $arguments if ($LASTEXITCODE -ne 0) { diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 463b6f243..ad0b774d4 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -103,7 +103,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { if (-not (Test-Path $executableFromDownload)) { - vcpkgInvokeCommand $downloadPath "-y" -wait:$true + vcpkgInvokeCommand $downloadPath "-y" } } else -- cgit v1.2.3 From 89addaa7a52e46014a3c6996ca3a093e9f5fd4d0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 25 Jan 2018 14:57:26 -0800 Subject: VcpkgInvokeCommand: return the error code --- scripts/VcpkgPowershellUtils.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 3ca540874..06fc458f7 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -174,6 +174,7 @@ function vcpkgInvokeCommand() Wait-Process -InputObject $process $ec = $process.ExitCode Write-Verbose "Execution terminated with exit code $ec." + return $ec } function vcpkgInvokeCommandClean() @@ -193,4 +194,5 @@ function vcpkgInvokeCommandClean() Wait-Process -InputObject $process $ec = $process.ExitCode Write-Verbose "Execution terminated with exit code $ec." + return $ec } \ No newline at end of file -- cgit v1.2.3 From edcc8e2c364b2030e4f542faf05b4d36220083e9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 25 Jan 2018 14:57:53 -0800 Subject: [bootstrap] Exit fast(er) if msbuild fails --- scripts/bootstrap.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index a50d0dde1..3e886b26a 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -56,9 +56,9 @@ try "dirs.proj") -join " " # vcpkgInvokeCommandClean cmd "/c echo %PATH%" - vcpkgInvokeCommandClean $msbuildExe $arguments + $ec = vcpkgInvokeCommandClean $msbuildExe $arguments - if ($LASTEXITCODE -ne 0) + if ($ec -ne 0) { Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." return -- cgit v1.2.3 From 6e07cbeff467a027b14870f57a8b8a18357b243e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 25 Jan 2018 16:48:32 -0800 Subject: [bootstrap] Specify full path for dirs.proj --- scripts/bootstrap.ps1 | 54 ++++++++++++++++++++++----------------------------- 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 3e886b26a..ab7838127 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -37,39 +37,31 @@ if (!(Test-Path $vcpkgSourcesPath)) return } -try -{ - Push-Location $vcpkgSourcesPath - $msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $withVSPath - $msbuildExe = $msbuildExeWithPlatformToolset[0] - $platformToolset = $msbuildExeWithPlatformToolset[1] - $windowsSDK = & $scriptsDir\getWindowsSDK.ps1 - - $arguments = ( - "`"/p:VCPKG_VERSION=-$gitHash`"", - "`"/p:DISABLE_METRICS=$disableMetrics`"", - "/p:Configuration=Release", - "/p:Platform=x86", - "/p:PlatformToolset=$platformToolset", - "/p:TargetPlatformVersion=$windowsSDK", - "/m", - "dirs.proj") -join " " +$msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $withVSPath +$msbuildExe = $msbuildExeWithPlatformToolset[0] +$platformToolset = $msbuildExeWithPlatformToolset[1] +$windowsSDK = & $scriptsDir\getWindowsSDK.ps1 - # vcpkgInvokeCommandClean cmd "/c echo %PATH%" - $ec = vcpkgInvokeCommandClean $msbuildExe $arguments - - if ($ec -ne 0) - { - Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." - return - } +$arguments = ( +"`"/p:VCPKG_VERSION=-$gitHash`"", +"`"/p:DISABLE_METRICS=$disableMetrics`"", +"/p:Configuration=Release", +"/p:Platform=x86", +"/p:PlatformToolset=$platformToolset", +"/p:TargetPlatformVersion=$windowsSDK", +"/m", +"$vcpkgSourcesPath\dirs.proj") -join " " - Write-Verbose("Placing vcpkg.exe in the correct location") +# vcpkgInvokeCommandClean cmd "/c echo %PATH%" +$ec = vcpkgInvokeCommandClean $msbuildExe $arguments - Copy-Item $vcpkgSourcesPath\Release\vcpkg.exe $vcpkgRootDir\vcpkg.exe | Out-Null - Copy-Item $vcpkgSourcesPath\Release\vcpkgmetricsuploader.exe $vcpkgRootDir\scripts\vcpkgmetricsuploader.exe | Out-Null -} -finally +if ($ec -ne 0) { - Pop-Location + Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." + return } + +Write-Verbose("Placing vcpkg.exe in the correct location") + +Copy-Item $vcpkgSourcesPath\Release\vcpkg.exe $vcpkgRootDir\vcpkg.exe | Out-Null +Copy-Item $vcpkgSourcesPath\Release\vcpkgmetricsuploader.exe $vcpkgRootDir\scripts\vcpkgmetricsuploader.exe | Out-Null -- cgit v1.2.3 From 186a2cf88baa88be7385dd3381748e80432e5261 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 25 Jan 2018 17:03:37 -0800 Subject: [bootstrap] Fix whitespace issue --- scripts/bootstrap.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index ab7838127..03f05d50b 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -50,7 +50,7 @@ $arguments = ( "/p:PlatformToolset=$platformToolset", "/p:TargetPlatformVersion=$windowsSDK", "/m", -"$vcpkgSourcesPath\dirs.proj") -join " " +"`"$vcpkgSourcesPath\dirs.proj`"") -join " " # vcpkgInvokeCommandClean cmd "/c echo %PATH%" $ec = vcpkgInvokeCommandClean $msbuildExe $arguments -- cgit v1.2.3 From e9b0de9d689560bfde4ebb73a6d76a0c3440a9ef Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 25 Jan 2018 17:27:43 -0800 Subject: Add -NoProfile and -ExecutionPolicy Bypass in powershell call --- scripts/VcpkgPowershellUtils.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 06fc458f7..63da1a508 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -188,7 +188,7 @@ function vcpkgInvokeCommandClean() $command = "& `"$cleanEnvScript`"; & `"$executable`" $arguments" $bytes = [System.Text.Encoding]::Unicode.GetBytes($command) $encodedCommand = [Convert]::ToBase64String($bytes) - $arg = "-encodedCommand $encodedCommand" + $arg = "-NoProfile -ExecutionPolicy Bypass -encodedCommand $encodedCommand" $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow Wait-Process -InputObject $process -- cgit v1.2.3 From cbf0c07660986217045ba1a74a6c6fe54faea02c Mon Sep 17 00:00:00 2001 From: ArashPartow Date: Fri, 26 Jan 2018 15:41:24 +1100 Subject: Update StrTk package --- ports/strtk/CONTROL | 4 ++-- ports/strtk/copyright | 5 +++-- ports/strtk/portfile.cmake | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ports/strtk/CONTROL b/ports/strtk/CONTROL index a1d1b5e44..2fbac5743 100644 --- a/ports/strtk/CONTROL +++ b/ports/strtk/CONTROL @@ -1,4 +1,4 @@ Source: strtk -Version: 2017.01.02-1e2960f +Version: 2018.01.01-5579ed1 Description: robust, optimized and portable string processing algorithms for the C++ language -Build-Depends: boost \ No newline at end of file +Build-Depends: boost diff --git a/ports/strtk/copyright b/ports/strtk/copyright index f9418e215..e732a0a9a 100644 --- a/ports/strtk/copyright +++ b/ports/strtk/copyright @@ -1,7 +1,8 @@ -Copyright 2010-2017 Arash Partow +Copyright 2002-2018 Arash Partow +http://www.partow.net/programming/strtk/index.html Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ports/strtk/portfile.cmake b/ports/strtk/portfile.cmake index 6122da897..c5998a538 100644 --- a/ports/strtk/portfile.cmake +++ b/ports/strtk/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArashPartow/strtk - REF 1e2960fd55918532dd96aed6a4b9cc6ee8f2e3c5 - SHA512 89b3d40dbdf66a21a38005f3d878e039f2e59c378aac13077ce183b495e903aeebd5f99ce4fbb892cf69503e5e7bf560498e65769f2f67d722262c0cf22fe74e + REF 5579ed1fa9766a5f9b67ed4773a3f59e7b107093 + SHA512 552ada7aa36fd057003a0fcaeabd3b457bb7b4dbc05ae595b905503d254c95334569c63b7c9f014a174489e56902a38744417b14eaa08f86558e3c66063863b3 ) file(COPY ${SOURCE_PATH}/strtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -- cgit v1.2.3 From e649c0a46ad3337ac31442992d631607606ddda8 Mon Sep 17 00:00:00 2001 From: ArashPartow Date: Fri, 26 Jan 2018 15:48:21 +1100 Subject: Add ExprTk package --- ports/exprtk/CONTROL | 3 +++ ports/exprtk/copyright | 8 ++++++++ ports/exprtk/portfile.cmake | 11 +++++++++++ 3 files changed, 22 insertions(+) create mode 100644 ports/exprtk/CONTROL create mode 100644 ports/exprtk/copyright create mode 100644 ports/exprtk/portfile.cmake diff --git a/ports/exprtk/CONTROL b/ports/exprtk/CONTROL new file mode 100644 index 000000000..2ebcfab28 --- /dev/null +++ b/ports/exprtk/CONTROL @@ -0,0 +1,3 @@ +Source: exprtk +Version: 2018.01.01-f32d2b4 +Description: Simple to use, easy to integrate and extremely efficient run-time C++ mathematical expression parser and evaluation engine. diff --git a/ports/exprtk/copyright b/ports/exprtk/copyright new file mode 100644 index 000000000..ee372c989 --- /dev/null +++ b/ports/exprtk/copyright @@ -0,0 +1,8 @@ +Copyright 1999-2018 Arash Partow +http://www.partow.net/programming/exprtk/index.html + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/ports/exprtk/portfile.cmake b/ports/exprtk/portfile.cmake new file mode 100644 index 000000000..1178a3e12 --- /dev/null +++ b/ports/exprtk/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ArashPartow/exprtk + REF f32d2b4bbb640ea4732b8a7fce1bd9717e9c998b + SHA512 22c977dc2514bd525856ed26b8895687601e79784486efe9d4f27466e1e1932c4a947297d83e9b98a6c82df9eaf5b0f82990741bbb699d565ca11e5755a55dd6 +) + +file(COPY ${SOURCE_PATH}/exprtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/exprtk) -- cgit v1.2.3 From 6a14c842bfedf32df479d83d114e910546c4db0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 26 Jan 2018 16:46:41 +0100 Subject: Update Catch to 2.1.1 --- ports/catch2/CONTROL | 2 +- ports/catch2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL index 6eeb40c21..0f169ae4e 100644 --- a/ports/catch2/CONTROL +++ b/ports/catch2/CONTROL @@ -1,4 +1,4 @@ Source: catch2 -Version: 2.1.0 +Version: 2.1.1 Description: A modern, header-only test framework for unit testing. Issues, PRs and changelogs can be found at https://github.com/catchorg/Catch2 diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake index 635bc385a..34adb60db 100644 --- a/ports/catch2/portfile.cmake +++ b/ports/catch2/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v2.1.0) +set(CATCH_VERSION v2.1.1) vcpkg_download_distfile(HEADER URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catchorg-catch2-${CATCH_VERSION}.hpp" - SHA512 967a9b4046ec2c72f094bebae381b5090e88358faefde9bdbca3d7e058c299c1bed0542653de79c857f78139d7969b0815bb8b8a60ff13e2144fcb7af2a2020c + SHA512 52a3161b92b7a21b360ce023b69b881c23869fa9194f22b4aadc9b3d1415520a1b525d5dd22b599495bef6ad4f051ecf853528c0e6296d2bf0c1bf99842bce52 ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From 366bbc0190de22f39b174eae11b17d86f2a13481 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sat, 27 Jan 2018 01:09:19 +0900 Subject: [realsense2] Update to v2.9.1 Update realsense2 port to librealsense v2.9.1. --- ports/realsense2/CONTROL | 2 +- ports/realsense2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index 244fe200f..76ce98ffa 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,3 +1,3 @@ Source: realsense2 -Version: 2.9.0 +Version: 2.9.1 Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index ccbc664ef..0ae449aaf 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense - REF v2.9.0 - SHA512 10b4d165e5763567517fc2320b7094af5a078d1b5da2374cfa8480cab0715303ea29a87f04876cbc39b5d22ac72cba7d13711c0b46fa125fbd2cf13fcb1a28e6 + REF v2.9.1 + SHA512 065b772948ebe34d187d44110326f711f3184876b1f129de83552c5cfe333485f9b0c9e4774b391e55d7fe533619818594f0946eee07d528dfe91b2c5e96d942 HEAD_REF master ) -- cgit v1.2.3 From 884afaa9ce1b3fb578a337acbeb0a4ba174cd133 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 26 Jan 2018 14:25:24 -0800 Subject: [wincrypt,winsock2] Fix issue: license has been removed from SDK 16299 default installation --- ports/wincrypt/portfile.cmake | 10 ++++------ ports/winsock2/portfile.cmake | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/ports/wincrypt/portfile.cmake b/ports/wincrypt/portfile.cmake index 6ce62cfee..5cb5a1b19 100644 --- a/ports/wincrypt/portfile.cmake +++ b/ports/wincrypt/portfile.cmake @@ -5,7 +5,6 @@ vcpkg_get_windows_sdk(WINDOWS_SDK) if (WINDOWS_SDK MATCHES "10.") set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib") - set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf") set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") elseif(WINDOWS_SDK MATCHES "8.") set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib") @@ -21,11 +20,10 @@ endif() file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -if (DEFINED LICENSEPATH) - file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/wincrypt) - file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See the accompanying sdk_license.rtf") -else() - file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") +if (WINDOWS_SDK MATCHES "10.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license") +elseif(WINDOWS_SDK MATCHES "8.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") endif() # Allow empty include directory diff --git a/ports/winsock2/portfile.cmake b/ports/winsock2/portfile.cmake index 0f55c1227..76f3bc23d 100644 --- a/ports/winsock2/portfile.cmake +++ b/ports/winsock2/portfile.cmake @@ -5,7 +5,6 @@ vcpkg_get_windows_sdk(WINDOWS_SDK) if (WINDOWS_SDK MATCHES "10.") set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib") - set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf") set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") elseif(WINDOWS_SDK MATCHES "8.") set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib") @@ -21,11 +20,10 @@ endif() file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -if (DEFINED LICENSEPATH) - file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/winsock2) - file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See the accompanying sdk_license.rtf") -else() - file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") +if (WINDOWS_SDK MATCHES "10.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license") +elseif(WINDOWS_SDK MATCHES "8.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") endif() # Allow empty include directory -- cgit v1.2.3 From 75f19a58ba27f79da4c57d22e4a9e92afcb55d4c Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sat, 27 Jan 2018 00:44:07 +0200 Subject: [vcpkg] Add string constructor (#2429) * [vcpkg] Add string constructor * Update versiont.h --- toolsrc/include/vcpkg/versiont.h | 1 + toolsrc/src/vcpkg/versiont.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/toolsrc/include/vcpkg/versiont.h b/toolsrc/include/vcpkg/versiont.h index 6d8332521..8427dfe3b 100644 --- a/toolsrc/include/vcpkg/versiont.h +++ b/toolsrc/include/vcpkg/versiont.h @@ -6,6 +6,7 @@ namespace vcpkg struct VersionT { VersionT(); + VersionT(std::string&& value); VersionT(const std::string& value); const std::string& to_string() const; diff --git a/toolsrc/src/vcpkg/versiont.cpp b/toolsrc/src/vcpkg/versiont.cpp index 91f7e23ef..0d4a39255 100644 --- a/toolsrc/src/vcpkg/versiont.cpp +++ b/toolsrc/src/vcpkg/versiont.cpp @@ -6,6 +6,7 @@ namespace vcpkg { VersionT::VersionT() : value("0.0.0") {} + VersionT::VersionT(std::string&& value) : value(std::move(value)) {} VersionT::VersionT(const std::string& value) : value(value) {} const std::string& VersionT::to_string() const { return value; } bool operator==(const VersionT& left, const VersionT& right) { return left.to_string() == right.to_string(); } -- cgit v1.2.3 From 5c9c1bde53f562c11a5248090ad2c63e7e481633 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 26 Jan 2018 15:47:30 -0800 Subject: [qt5-base] Fix missing qtdeploy script in debug builds --- ports/qt5-base/CONTROL | 2 +- ports/qt5-base/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index 039a0b873..0886bd04f 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,4 +1,4 @@ Source: qt5-base -Version: 5.9.2-1 +Version: 5.9.2-2 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 diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 9284f09b5..62c1396c2 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -112,5 +112,6 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl) file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins) file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -- cgit v1.2.3 From c835db39e8c3201383a1e0e3b5dcea41afd68165 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 27 Jan 2018 16:07:07 -0800 Subject: [dlib] Fix assert configuration issue in release mode --- ports/dlib/CONTROL | 2 +- ports/dlib/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index b23776ff5..d711849f0 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,5 +1,5 @@ Source: dlib -Version: 19.9 +Version: 19.9-1 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3, openblas, clapack Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index fc63f494a..cf3ae4079 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -61,8 +61,8 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm) # Dlib encodes debug/release in its config.h. Patch it to respond to the NDEBUG macro instead. file(READ ${CURRENT_PACKAGES_DIR}/include/dlib/config.h _contents) -string(REPLACE "/* #undef ENABLE_ASSERTS */" "#if !defined(NDEBUG)\n#define ENABLE_ASSERTS\n#endif" _contents ${_contents}) -string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if defined(NDEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif" _contents ${_contents}) +string(REPLACE "/* #undef ENABLE_ASSERTS */" "#if defined(_DEBUG)\n#define ENABLE_ASSERTS\n#endif" _contents ${_contents}) +string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if !defined(_DEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif" _contents ${_contents}) file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h ${_contents}) file(READ ${CURRENT_PACKAGES_DIR}/share/dlib/dlib.cmake _contents) -- cgit v1.2.3 From 6c0f3a8859718b87b017ee9458cf0e4adacdd2dd Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 27 Jan 2018 22:08:07 -0800 Subject: [ClearEnvironment] Fix registry comments --- scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 b/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 index 5c922572b..0a133f5f8 100644 --- a/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 +++ b/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 @@ -1,8 +1,8 @@ # 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 -$machineEnvironmentMap = [Environment]::GetEnvironmentVariables('Machine') # HKEY_CURRENT_USER\Environment -$userEnvironmentMap = [Environment]::GetEnvironmentVariables('User') # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment +$machineEnvironmentMap = [Environment]::GetEnvironmentVariables('Machine') # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment +$userEnvironmentMap = [Environment]::GetEnvironmentVariables('User') # HKEY_CURRENT_USER\Environment # Identify the keySet of environment variable names $nameSet = ($specialEnvironmentMap.Keys + $machineEnvironmentMap.Keys + $userEnvironmentMap.Keys) | Sort-Object | Select-Object -Unique -- cgit v1.2.3 From 340ff984cba132f71e4fabbc78c247ad4e4de292 Mon Sep 17 00:00:00 2001 From: Tsvetkov Maksim Date: Sun, 28 Jan 2018 10:30:47 +0300 Subject: [log4cplus] correct path for vcpkg_fixup_cmake_targets (#2646) --- ports/log4cplus/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/log4cplus/portfile.cmake b/ports/log4cplus/portfile.cmake index acd101c9b..d6e600221 100644 --- a/ports/log4cplus/portfile.cmake +++ b/ports/log4cplus/portfile.cmake @@ -32,7 +32,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/log4cplus) vcpkg_copy_pdbs() -- cgit v1.2.3 From bfc283f5b22ab9d5daba3cc7acf09f2bf6aedcbe Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 28 Jan 2018 09:45:36 +0200 Subject: [libudis86] init --- ports/libudis86/CMakeLists.txt | 56 ++++++++++++++++++++++++++++++++++++++++++ ports/libudis86/CONTROL | 3 +++ ports/libudis86/portfile.cmake | 33 +++++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 ports/libudis86/CMakeLists.txt create mode 100644 ports/libudis86/CONTROL create mode 100644 ports/libudis86/portfile.cmake diff --git a/ports/libudis86/CMakeLists.txt b/ports/libudis86/CMakeLists.txt new file mode 100644 index 000000000..8f412cf90 --- /dev/null +++ b/ports/libudis86/CMakeLists.txt @@ -0,0 +1,56 @@ +cmake_minimum_required (VERSION 3.9) + +project (udis86) + + +set( + lib_sources + libudis86/decode.c + libudis86/itab.c + libudis86/syn-att.c + libudis86/syn-intel.c + libudis86/syn.c + libudis86/udis86.c +) + +set(lib_headers + libudis86/decode.h + libudis86/itab.h + libudis86/extern.h + libudis86/syn.h + libudis86/types.h + libudis86/udint.h +) + +set(cli_srcs udcli/udcli.c) + +include_directories(.) + +add_library(libudis86 ${lib_sources}) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(libudis86 PRIVATE -D_USRDLL) +endif() + +add_executable(udcli ${cli_srcs}) +target_link_libraries(udcli libudis86) + + +install( + TARGETS libudis86 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS udcli + RUNTIME DESTINATION tools/libudis86 + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${lib_headers} DESTINATION include/libudis86) + install(FILES udis86.h DESTINATION include) +endif() diff --git a/ports/libudis86/CONTROL b/ports/libudis86/CONTROL new file mode 100644 index 000000000..661ad7859 --- /dev/null +++ b/ports/libudis86/CONTROL @@ -0,0 +1,3 @@ +Source: libudis86 +Version: 2018-01-28-56ff6c87 +Description: Disassembler Library for x86 and x86-64 diff --git a/ports/libudis86/portfile.cmake b/ports/libudis86/portfile.cmake new file mode 100644 index 000000000..a4f5aa9d7 --- /dev/null +++ b/ports/libudis86/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vmt/udis86 + REF 56ff6c87c11de0ffa725b14339004820556e343d + SHA512 7a98333f9310f5f0466294bd980f03f9269c118a7557832015c59a7b6349a0eeab5642e0e6598d0be76d71f5d2d566d8b8af0ec75c26bdcff45646d60ff18e3a + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_find_acquire_program(PYTHON2) + +vcpkg_execute_required_process( + COMMAND ${PYTHON2} ${SOURCE_PATH}/scripts/ud_itab.py ${SOURCE_PATH}/docs/x86/optable.xml ${SOURCE_PATH}/libudis86/ + WORKING_DIRECTORY SOURCE_PATH + LOGNAME python-${TARGET_TRIPLET}-generate-sources +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON + -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libudis86) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libudis86 RENAME copyright) -- cgit v1.2.3 From 7a12e5e25bad95a58b0c127d9e66bd735e8c1299 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 28 Jan 2018 10:08:21 +0200 Subject: [cccapstone] init --- ports/cccapstone/CONTROL | 4 ++++ ports/cccapstone/portfile.cmake | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 ports/cccapstone/CONTROL create mode 100644 ports/cccapstone/portfile.cmake diff --git a/ports/cccapstone/CONTROL b/ports/cccapstone/CONTROL new file mode 100644 index 000000000..d81c1acda --- /dev/null +++ b/ports/cccapstone/CONTROL @@ -0,0 +1,4 @@ +Source: cccapstone +Version: 9b4128ee1153e78288a1b5433e2c06a0d47a4c4e +Description: c++ bindings for capstone disasembly framework +Build-Depends: capstone diff --git a/ports/cccapstone/portfile.cmake b/ports/cccapstone/portfile.cmake new file mode 100644 index 000000000..69b8bcef7 --- /dev/null +++ b/ports/cccapstone/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REF 9b4128ee1153e78288a1b5433e2c06a0d47a4c4e + REPO zer0mem/cccapstone + SHA512 d0023586281f921314dbba501fa2c06d822b1adba0a0c32f30b78628ee935e5822caebe3881a5d1cc4cc696b82a7e348044d887a7f652303359d2853d2ee45fb + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/cppbindings/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/cccapstone/cppbindings) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/cccapstone RENAME copyright) -- cgit v1.2.3 From 36e7f37f892f82525d582962e666dcdc5bc1fe6d Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Sun, 28 Jan 2018 13:14:06 +0200 Subject: [libopenmpt] init --- ports/libopenmpt/CMakeLists.txt | 289 ++++++++++++++++++++++++++++++++++++++++ ports/libopenmpt/CONTROL | 4 + ports/libopenmpt/portfile.cmake | 26 ++++ 3 files changed, 319 insertions(+) create mode 100644 ports/libopenmpt/CMakeLists.txt create mode 100644 ports/libopenmpt/CONTROL create mode 100644 ports/libopenmpt/portfile.cmake diff --git a/ports/libopenmpt/CMakeLists.txt b/ports/libopenmpt/CMakeLists.txt new file mode 100644 index 000000000..5e9b20799 --- /dev/null +++ b/ports/libopenmpt/CMakeLists.txt @@ -0,0 +1,289 @@ +cmake_minimum_required(VERSION 3.9) +project(libopenmpt) + +if(MSVC) + add_compile_options( + /W3 /wd4005 /wd4267 /wd4244 /wd4996 /wd410 /wd4018 + -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE + -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS + ) +endif() + +find_package(ZLIB REQUIRED) + +find_path(MPG123_INCLUDE_DIR NAMES mpg123.h) +find_library(MPG123_LIBRARY NAMES mpg123 libmpg123) + +find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h) +find_path(OGG_INCLUDE_DIR ogg/ogg.h) + +find_library(OGG_LIBRARY NAMES ogg) +find_library(VORBIS_LIBRARY NAMES vorbis) +find_library(VORBISFILE_LIBRARY NAMES vorbisfile) + +find_path(FLAC_INCLUDE_DIR FLAC/all.h) +find_library(FLAC_LIBRARY NAMES FLAC flac) + +find_path(PORTAUDIO_INCLUDE_DIR NAMES portaudio.h) +find_library(PORTAUDIO_LIBRARY NAMES portaudio) + + + +set( + lib_headers + libopenmpt/libopenmpt.h + libopenmpt/libopenmpt.hpp + libopenmpt/libopenmpt_config.h + libopenmpt/libopenmpt_ext.h + libopenmpt/libopenmpt_ext.hpp + libopenmpt/libopenmpt_ext_impl.hpp + libopenmpt/libopenmpt_impl.hpp + libopenmpt/libopenmpt_internal.h + libopenmpt/libopenmpt_stream_callbacks_buffer.h + libopenmpt/libopenmpt_stream_callbacks_fd.h + libopenmpt/libopenmpt_stream_callbacks_file.h + libopenmpt/libopenmpt_version.h +) + + +include_directories( + . + build/svn_version + libopenmpt + common + soundbase + sounddsp + soundlib + openmpt123 + ${MPG123_INCLUDE_DIR} + ${VORBIS_INCLUDE_DIR} + ${OGG_INCLUDE_DIR} + ${FLAC_INCLUDE_DIR} + ${PORTAUDIO_INCLUDE_DIR} +) + +set( + lib_sources + common/ComponentManager.cpp + common/FileReader.cpp + common/Logging.cpp + common/Profiler.cpp + common/misc_util.cpp + common/mptCPU.cpp + common/mptFileIO.cpp + common/mptIO.cpp + common/mptLibrary.cpp + common/mptOS.cpp + common/mptPathString.cpp + common/mptRandom.cpp + common/mptString.cpp + common/mptStringFormat.cpp + common/mptStringParse.cpp + common/mptTime.cpp + common/mptUUID.cpp + common/mptWine.cpp + common/serialization_utils.cpp + common/stdafx.cpp + common/typedefs.cpp + common/version.cpp + libopenmpt/libopenmpt_c.cpp + libopenmpt/libopenmpt_cxx.cpp + libopenmpt/libopenmpt_ext_impl.cpp + libopenmpt/libopenmpt_impl.cpp + sounddsp/AGC.cpp + sounddsp/DSP.cpp + sounddsp/EQ.cpp + sounddsp/Reverb.cpp + soundlib/AudioCriticalSection.cpp + soundlib/ContainerMMCMP.cpp + soundlib/ContainerPP20.cpp + soundlib/ContainerUMX.cpp + soundlib/ContainerXPK.cpp + soundlib/Dither.cpp + soundlib/Dlsbank.cpp + soundlib/Fastmix.cpp + soundlib/ITCompression.cpp + soundlib/ITTools.cpp + soundlib/InstrumentExtensions.cpp + soundlib/Load_669.cpp + soundlib/Load_amf.cpp + soundlib/Load_ams.cpp + soundlib/Load_dbm.cpp + soundlib/Load_digi.cpp + soundlib/Load_dmf.cpp + soundlib/Load_dsm.cpp + soundlib/Load_dtm.cpp + soundlib/Load_far.cpp + soundlib/Load_gdm.cpp + soundlib/Load_imf.cpp + soundlib/Load_it.cpp + soundlib/Load_itp.cpp + soundlib/Load_mdl.cpp + soundlib/Load_med.cpp + soundlib/Load_mid.cpp + soundlib/Load_mo3.cpp + soundlib/Load_mod.cpp + soundlib/Load_mt2.cpp + soundlib/Load_mtm.cpp + soundlib/Load_okt.cpp + soundlib/Load_plm.cpp + soundlib/Load_psm.cpp + soundlib/Load_ptm.cpp + soundlib/Load_s3m.cpp + soundlib/Load_sfx.cpp + soundlib/Load_stm.cpp + soundlib/Load_stp.cpp + soundlib/Load_uax.cpp + soundlib/Load_ult.cpp + soundlib/Load_wav.cpp + soundlib/Load_xm.cpp + soundlib/MIDIEvents.cpp + soundlib/MIDIMacros.cpp + soundlib/MPEGFrame.cpp + soundlib/Message.cpp + soundlib/MixFuncTable.cpp + soundlib/MixerLoops.cpp + soundlib/MixerSettings.cpp + soundlib/ModChannel.cpp + soundlib/ModInstrument.cpp + soundlib/ModSample.cpp + soundlib/ModSequence.cpp + soundlib/OggStream.cpp + soundlib/Paula.cpp + soundlib/RowVisitor.cpp + soundlib/S3MTools.cpp + soundlib/SampleFormatFLAC.cpp + soundlib/SampleFormatMP3.cpp + soundlib/SampleFormatMediaFoundation.cpp + soundlib/SampleFormatOpus.cpp + soundlib/SampleFormatVorbis.cpp + soundlib/SampleFormats.cpp + soundlib/SampleIO.cpp + soundlib/Snd_flt.cpp + soundlib/Snd_fx.cpp + soundlib/Sndfile.cpp + soundlib/Sndmix.cpp + soundlib/SoundFilePlayConfig.cpp + soundlib/Tables.cpp + soundlib/Tagging.cpp + soundlib/UMXTools.cpp + soundlib/UpgradeModule.cpp + soundlib/WAVTools.cpp + soundlib/WindowedFIR.cpp + soundlib/XMTools.cpp + soundlib/load_j2b.cpp + soundlib/mod_specifications.cpp + soundlib/modcommand.cpp + soundlib/modsmp_ctrl.cpp + soundlib/pattern.cpp + soundlib/patternContainer.cpp + soundlib/plugins/DigiBoosterEcho.cpp + soundlib/plugins/LFOPlugin.cpp + soundlib/plugins/PlugInterface.cpp + soundlib/plugins/PluginManager.cpp + soundlib/plugins/dmo/Chorus.cpp + soundlib/plugins/dmo/Compressor.cpp + soundlib/plugins/dmo/DMOPlugin.cpp + soundlib/plugins/dmo/Distortion.cpp + soundlib/plugins/dmo/Echo.cpp + soundlib/plugins/dmo/Flanger.cpp + soundlib/plugins/dmo/Gargle.cpp + soundlib/plugins/dmo/I3DL2Reverb.cpp + soundlib/plugins/dmo/ParamEq.cpp + soundlib/plugins/dmo/WavesReverb.cpp + soundlib/tuning.cpp + soundlib/tuningCollection.cpp + soundlib/tuningbase.cpp +) + +add_library(libopenmpt ${lib_sources}) + +target_compile_definitions(libopenmpt PRIVATE + -DMPT_WITH_MPG123 -DMPT_WITH_OGG + -DMPT_WITH_VORBIS -DMPT_WITH_VORBISFILE + -DMPT_WITH_ZLIB -DMPT_BUILD_VCPKG + -DLIBOPENMPT_BUILD +) + +set(cli_srcs openmpt123/openmpt123.cpp) + +add_executable(openmpt123 ${cli_srcs}) + +target_compile_definitions(openmpt123 PRIVATE + -DMPT_WITH_MPG123 -DMPT_WITH_OGG + -DMPT_WITH_VORBIS -DMPT_WITH_VORBISFILE + -DMPT_WITH_ZLIB -DMPT_BUILD_VCPKG + -DLIBOPENMPT_BUILD +) + + + +if(BUILD_SHARED_LIBS) + target_compile_definitions( + libopenmpt + PRIVATE + -DMPT_BUILD_MSVC_SHARED -DLIBOPENMPT_BUILD_DLL + ) + target_compile_definitions( + openmpt123 + PRIVATE + -DMPT_BUILD_MSVC_SHARED -DLIBOPENMPT_BUILD_DLL + ) +else() + target_compile_definitions( + libopenmpt + PRIVATE + -DMPT_BUILD_MSVC_STATIC + ) + target_compile_definitions( + openmpt123 + PRIVATE + -DMPT_BUILD_MSVC_STATIC + ) +endif() + +target_link_libraries( + libopenmpt + PRIVATE + ${OGG_LIBRARY} + ${MPG123_LIBRARY} + ${VORBISFILE_LIBRARY} + ${VORBIS_LIBRARY} + ${VORBISFILE_LIBRARY} + ZLIB::ZLIB +) + +target_link_libraries( + openmpt123 + PRIVATE + libopenmpt + ${OGG_LIBRARY} + ${MPG123_LIBRARY} + ${VORBISFILE_LIBRARY} + ${VORBIS_LIBRARY} + ${VORBISFILE_LIBRARY} + ${FLAC_LIBRARY} + ${PORTAUDIO_LIBRARY} + Winmm + ZLIB::ZLIB +) + + +install( + TARGETS libopenmpt + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${lib_headers} DESTINATION include/libopenmpt) +endif() + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS openmpt123 + RUNTIME DESTINATION tools/libopenmpt + ) +endif() diff --git a/ports/libopenmpt/CONTROL b/ports/libopenmpt/CONTROL new file mode 100644 index 000000000..b12a2ee64 --- /dev/null +++ b/ports/libopenmpt/CONTROL @@ -0,0 +1,4 @@ +Source: libopenmpt +Version: 2017-01-28-cf2390140 +Description: a library to render tracker music +Build-Depends: zlib, mpg123, libogg, libvorbis, portaudio, libflac diff --git a/ports/libopenmpt/portfile.cmake b/ports/libopenmpt/portfile.cmake new file mode 100644 index 000000000..c43f64a99 --- /dev/null +++ b/ports/libopenmpt/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Windowstore not supported") +endif() +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenMPT/openmpt + REF cf2390140c37a53ecf7d5fe73412982d346efba4 + SHA512 6401bac7a899eaacebb601591f982fabde6351f1c0dc0c2d24f1f303b78592e7883a84463bdf3cf0fd029eb38d7b7085fdfadafea2931b307b43d0b601db863e + HEAD_REF master +) + +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 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libopenmpt) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libopenmpt RENAME copyright) -- cgit v1.2.3 From a66490101e23a71e214ed4a67051b00b46c0adfc Mon Sep 17 00:00:00 2001 From: Force Charlie Date: Sun, 28 Jan 2018 20:26:07 +0800 Subject: curl enable http2, use nghttp2 --- ports/curl/CONTROL | 4 ++-- ports/curl/portfile.cmake | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index 450f43d59..6db37600a 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7.58.0 -Build-Depends: zlib, openssl, libssh2 +Version: 7.58.0-1 +Build-Depends: zlib, openssl, libssh2, nghttp2 Description: A library for transferring data with URLs # For WINSSL create target triplet which contains set(CURL_USE_WINSSL ON) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 64001704a..4516793a2 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -48,6 +48,7 @@ vcpkg_configure_cmake( -DBUILD_TESTING=OFF -DBUILD_CURL_EXE=OFF -DENABLE_MANUAL=OFF + -DUSE_NGHTTP2=ON -DCURL_STATICLIB=${CURL_STATICLIB} -DCMAKE_USE_OPENSSL=${USE_OPENSSL} -DCMAKE_USE_WINSSL=${USE_WINSSL} -- cgit v1.2.3 From 75745ed90d8804cc659f75f51cc365efdcb6f773 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sun, 28 Jan 2018 22:24:52 +0900 Subject: Fix for VCPKG_BUILD_TYPE Fix for VCPKG_BUILD_TYPE. --- ports/boost-test/CONTROL | 2 +- ports/boost-test/portfile.cmake | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ports/boost-test/CONTROL b/ports/boost-test/CONTROL index 63b982ee4..52dac99e2 100644 --- a/ports/boost-test/CONTROL +++ b/ports/boost-test/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-test -Version: 1.66.0-1 +Version: 1.66.0-2 Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-io, boost-iterator, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-range, boost-smart-ptr, boost-static-assert, boost-timer, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost test module diff --git a/ports/boost-test/portfile.cmake b/ports/boost-test/portfile.cmake index 57d6b99d0..acb28c7d4 100644 --- a/ports/boost-test/portfile.cmake +++ b/ports/boost-test/portfile.cmake @@ -14,12 +14,17 @@ include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(GLOB MONITOR_LIBS ${CURRENT_PACKAGES_DIR}/lib/*_exec_monitor*) -file(COPY ${MONITOR_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(GLOB DEBUG_MONITOR_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*_exec_monitor*) -file(COPY ${DEBUG_MONITOR_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(GLOB MONITOR_LIBS ${CURRENT_PACKAGES_DIR}/lib/*_exec_monitor*) + file(COPY ${MONITOR_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(REMOVE ${MONITOR_LIBS}) +endif() -file(REMOVE ${DEBUG_MONITOR_LIBS} ${MONITOR_LIBS}) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(GLOB DEBUG_MONITOR_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*_exec_monitor*) + file(COPY ${DEBUG_MONITOR_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(REMOVE ${DEBUG_MONITOR_LIBS}) +endif() -- cgit v1.2.3 From b45bc185423e66cee437a6c1e46ddbb0932e4d00 Mon Sep 17 00:00:00 2001 From: Force Charlie Date: Sun, 28 Jan 2018 23:26:48 +0800 Subject: curl: only dynamic build support HTTP2 --- ports/curl/portfile.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 4516793a2..7752dd795 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -14,8 +14,12 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/0002_fix_uwp.patch ) +SET(HTTP2_OPTIONS) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) SET(CURL_STATICLIB OFF) + SET(HTTP2_OPTIONS + -DUSE_NGHTTP2=ON + ) else() SET(CURL_STATICLIB ON) endif() @@ -45,10 +49,10 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS ${UWP_OPTIONS} + ${HTTP2_OPTIONS} -DBUILD_TESTING=OFF -DBUILD_CURL_EXE=OFF -DENABLE_MANUAL=OFF - -DUSE_NGHTTP2=ON -DCURL_STATICLIB=${CURL_STATICLIB} -DCMAKE_USE_OPENSSL=${USE_OPENSSL} -DCMAKE_USE_WINSSL=${USE_WINSSL} -- cgit v1.2.3 From e6712779e7a0c8f34ed581131d80a639b28448a7 Mon Sep 17 00:00:00 2001 From: Force Charlie Date: Sun, 28 Jan 2018 23:33:38 +0800 Subject: curl: disable WindowsStore HTTP2 support (nghttp2 not support) --- ports/curl/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 7752dd795..d397525c6 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -38,6 +38,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -DENABLE_IPV6=OFF -DENABLE_UNIX_SOCKETS=OFF ) + set(HTTP2_OPTIONS) ## disable curl HTTP2 support endif() vcpkg_find_acquire_program(PERL) -- cgit v1.2.3 From 278ab50c3f0e14555c0fc33d7d10a2b8fa239041 Mon Sep 17 00:00:00 2001 From: Force Charlie Date: Mon, 29 Jan 2018 12:40:16 +0800 Subject: CURL_USE_WINSSL disable HTTP2 --- ports/curl/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index d397525c6..f45ee8016 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -28,6 +28,7 @@ set(USE_OPENSSL ON) if(CURL_USE_WINSSL) set(USE_OPENSSL OFF) set(USE_WINSSL ON) + set(HTTP2_OPTIONS) ## disable HTTP2 when CURL_USE_WINSSL endif() set(UWP_OPTIONS) -- cgit v1.2.3 From c4d8a862c58681cc7ab3e2f62280c014c84ff1e7 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Mon, 29 Jan 2018 14:40:26 +0800 Subject: Fix error C4996 of GTest in VS2017. --- ...-11-features-for-VS2015-fix-appveyor-fail.patch | 37 ++++++++++++---------- ports/gtest/CONTROL | 2 +- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/ports/gtest/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch b/ports/gtest/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch index 274942482..b5082a1b2 100644 --- a/ports/gtest/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch +++ b/ports/gtest/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch @@ -1,16 +1,3 @@ -From 1695708beda0306f3b4dffd66f4be142425894a0 Mon Sep 17 00:00:00 2001 -From: Arkady Shapkin -Date: Wed, 2 Mar 2016 02:53:10 +0300 -Subject: [PATCH] Enable C++11 features for VS2015 (fix appveyor fail) - ---- - .gitignore | 13 ++++++++ - googlemock/test/gmock-matchers_test.cc | 5 +++ - googletest/include/gtest/internal/gtest-port.h | 10 ++++-- - googletest/test/gtest-printers_test.cc | 43 ++++++++++++++++++++++--- - googletest/test/gtest_catch_exceptions_test_.cc | 2 +- - 5 files changed, 64 insertions(+), 9 deletions(-) - diff --git a/.gitignore b/.gitignore index ce310bc..08a67cd 100644 --- a/.gitignore @@ -48,7 +35,7 @@ index 9f62c3d..eaba362 100644 namespace internal { diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h -index 0094ed5..c07c455 100644 +index 0094ed5..09779fa 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -323,7 +323,7 @@ @@ -87,6 +74,25 @@ index 0094ed5..c07c455 100644 # define GTEST_HAS_HASH_MAP_ 1 // Indicates that hash_map is available. # define GTEST_HAS_HASH_SET_ 1 // Indicates that hash_set is available. # endif // _MSC_VER +@@ -629,6 +633,9 @@ struct _RTL_CRITICAL_SECTION; + # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR) + // STLport, provided with the Android NDK, has neither or . + # define GTEST_HAS_TR1_TUPLE 0 ++# elif defined(_MSC_VER) && (_MSC_VER >= 1910) ++// Prevent `warning C4996: 'std::tr1': warning STL4002: The non-Standard std::tr1 namespace and TR1-only machinery are deprecated and will be REMOVED.` ++# define GTEST_HAS_TR1_TUPLE 0 + # else + // The user didn't tell us not to do it, so we assume it's OK. + # define GTEST_HAS_TR1_TUPLE 1 +@@ -813,7 +820,7 @@ using ::std::tuple_size; + // value-parameterized tests are enabled. The implementation doesn't + // work on Sun Studio since it doesn't understand templated conversion + // operators. +-#if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC) ++#if GTEST_HAS_PARAM_TEST && (GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_) && !defined(__SUNPRO_CC) + # define GTEST_HAS_COMBINE 1 + #endif + diff --git a/googletest/test/gtest-printers_test.cc b/googletest/test/gtest-printers_test.cc index 3e97cc2..6320563 100644 --- a/googletest/test/gtest-printers_test.cc @@ -172,6 +178,3 @@ index d0fc82c..c6d953c 100644 class CxxExceptionInDestructorTest : public Test { public: static void TearDownTestCase() { --- -2.10.0.windows.1 - diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index d3086b8ac..f41aec0b9 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,3 +1,3 @@ Source: gtest -Version: 1.8.0-5 +Version: 1.8.0-6 Description: GoogleTest and GoogleMock testing frameworks. -- cgit v1.2.3 From babddd9dd7649bb224dba1a1280167f887e07bce Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Mon, 29 Jan 2018 18:33:18 +0800 Subject: fixed: error LNK2001: unresolved external symbol _INT123_dct36_sse https://github.com/Microsoft/vcpkg/issues/1976 --- ports/mpg123/0002-fix-x86-build.patch | 13 +++++++++++++ ports/mpg123/CONTROL | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ports/mpg123/0002-fix-x86-build.patch b/ports/mpg123/0002-fix-x86-build.patch index d7d3887b7..2d0b10b81 100644 --- a/ports/mpg123/0002-fix-x86-build.patch +++ b/ports/mpg123/0002-fix-x86-build.patch @@ -22,3 +22,16 @@ index 6012ccc..bf37cd7 100644 #define FUNC ASM_NAME #define EXTERNAL_FUNC ASM_NAME #define GET_GOT +diff --git a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj +index 1edf77d..f78999b 100644 +--- a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj ++++ b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj +@@ -700,7 +700,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_ + + + +- Shlwapi.lib;dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) ++ Shlwapi.lib;dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) + $(IntDir);%(AdditionalLibraryDirectories) + true + diff --git a/ports/mpg123/CONTROL b/ports/mpg123/CONTROL index f64ae5c56..f72437453 100644 --- a/ports/mpg123/CONTROL +++ b/ports/mpg123/CONTROL @@ -1,3 +1,3 @@ Source: mpg123 -Version: 1.25.8-1 +Version: 1.25.8-2 Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). \ No newline at end of file -- cgit v1.2.3 From 9fa540fe692333723a7fdb962ac118e2f9c75cf4 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Mon, 29 Jan 2018 18:13:09 +0200 Subject: [muparser] init --- ports/muparser/CONTROL | 3 +++ ports/muparser/portfile.cmake | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 ports/muparser/CONTROL create mode 100644 ports/muparser/portfile.cmake diff --git a/ports/muparser/CONTROL b/ports/muparser/CONTROL new file mode 100644 index 000000000..547e7c67e --- /dev/null +++ b/ports/muparser/CONTROL @@ -0,0 +1,3 @@ +Source: muparser +Version: 6cf2746 +Description: Fast math parser library diff --git a/ports/muparser/portfile.cmake b/ports/muparser/portfile.cmake new file mode 100644 index 000000000..7afb8adb1 --- /dev/null +++ b/ports/muparser/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO beltoforion/muparser + REF 6cf2746f7ce3ecbe0fd91098a3c2123e5253bb0e + SHA512 a44720507806beb577fee9480102dbdcbf8b95612e8e51e1c57688c27e69f5fec0261beb03d034471519d8a4430954d74fdb626f63d21000160eeaa081a83861 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DENABLE_SAMPLES=OFF + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/muparser RENAME copyright) -- cgit v1.2.3 From 91518839b931f052bd8bf7ab1d141b2136be2a5c Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Mon, 29 Jan 2018 18:55:41 +0200 Subject: [mujs] init --- ports/mujs/CMakeLists.txt | 24 ++++++++++++++++++++++++ ports/mujs/CONTROL | 3 +++ ports/mujs/portfile.cmake | 27 +++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 ports/mujs/CMakeLists.txt create mode 100644 ports/mujs/CONTROL create mode 100644 ports/mujs/portfile.cmake diff --git a/ports/mujs/CMakeLists.txt b/ports/mujs/CMakeLists.txt new file mode 100644 index 000000000..639d2a965 --- /dev/null +++ b/ports/mujs/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.9) +project(mujs) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +file(GLOB libmujs_sources js*.c utf*.c regexp.c) + +include_directories(.) + + +add_library(libmujs ${libmujs_sources}) + +install( + TARGETS libmujs + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES mujs.h DESTINATION include) +endif() diff --git a/ports/mujs/CONTROL b/ports/mujs/CONTROL new file mode 100644 index 000000000..10b776ab0 --- /dev/null +++ b/ports/mujs/CONTROL @@ -0,0 +1,3 @@ +Source: mujs +Version: 25821e6d74fab5fcc200fe5e818362e03e114428 +Description: An embeddable Javascript interpreter in C diff --git a/ports/mujs/portfile.cmake b/ports/mujs/portfile.cmake new file mode 100644 index 000000000..9af5984e8 --- /dev/null +++ b/ports/mujs/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "building static") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ccxvii/mujs + REF 25821e6d74fab5fcc200fe5e818362e03e114428 + SHA512 8f4ae9151ce6b7ef4b1951d23f95167d16a2acb0eba4ee656ad56c92cd19af3e049c6903533d93caf0206f776374f3203b6a3f3e1748c4e720dc11ed8ac26342 + HEAD_REF master +) + +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 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mujs RENAME copyright) -- cgit v1.2.3 From 8374c7d9e21c9c2d6467f24491300b5695070229 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Mon, 29 Jan 2018 20:53:31 +0200 Subject: [yara] init --- ports/yara/CMakeLists.txt | 106 ++++++++++++++++++++++++++++++++++++++++++++++ ports/yara/CONTROL | 4 ++ ports/yara/portfile.cmake | 26 ++++++++++++ 3 files changed, 136 insertions(+) create mode 100644 ports/yara/CMakeLists.txt create mode 100644 ports/yara/CONTROL create mode 100644 ports/yara/portfile.cmake diff --git a/ports/yara/CMakeLists.txt b/ports/yara/CMakeLists.txt new file mode 100644 index 000000000..783d322fb --- /dev/null +++ b/ports/yara/CMakeLists.txt @@ -0,0 +1,106 @@ +cmake_minimum_required(VERSION 3.8) +project(yara C) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + + +find_package(OpenSSL REQUIRED) +find_path(JANSSON_INCLUDE_DIR NAMES jansson.h) +find_library(JANSSON_LIBRARY NAMES jansson) + + +include_directories( + . + libyara + libyara/include +) + +set( + libyara_sources + libyara/ahocorasick.c + libyara/arena.c + libyara/atoms.c + libyara/compiler.c + libyara/exec.c + libyara/exefiles.c + libyara/filemap.c + libyara/grammar.c + libyara/hash.c + libyara/hex_grammar.c + libyara/hex_lexer.c + libyara/lexer.c + libyara/libyara.c + libyara/mem.c + libyara/modules.c + libyara/modules/cuckoo.c + libyara/modules/dotnet.c + libyara/modules/elf.c + libyara/modules/hash.c + libyara/modules/math.c + libyara/modules/macho.c + libyara/modules/pe.c + libyara/modules/pe_utils.c + libyara/modules/tests.c + libyara/modules/time.c + libyara/object.c + libyara/parser.c + libyara/proc.c + libyara/proc/windows.c + libyara/re.c + libyara/re_grammar.c + libyara/re_lexer.c + libyara/rules.c + libyara/scan.c + libyara/sizedstr.c + libyara/stream.c + libyara/strutils.c + libyara/threading.c +) + +set( + yara_sources + args.c + threading.c + yara.c +) +set( yarac_sources + args.c + yarac.c +) + +add_library(libyara ${libyara_sources}) + +target_link_libraries(libyara PRIVATE OpenSSL::SSL OpenSSL::Crypto ${JANSSON_LIBRARY}) +target_compile_definitions( + libyara + PRIVATE + -DHAVE_LIBCRYPTO -DUSE_WINDOWS_PROC + -DCUCKOO_MODULE- DHASH_MODULE -DDOTNET_MODULE +) + + +add_executable(yara ${yara_sources}) +add_executable(yarac ${yarac_sources}) + +target_link_libraries(yarac PRIVATE libyara OpenSSL::SSL OpenSSL::Crypto ${JANSSON_LIBRARY}) +target_link_libraries(yara PRIVATE libyara OpenSSL::SSL OpenSSL::Crypto ${JANSSON_LIBRARY}) + +install( + TARGETS libyara + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS yarac yara + RUNTIME DESTINATION tools/yara + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY libyara/include/ DESTINATION include) +endif() diff --git a/ports/yara/CONTROL b/ports/yara/CONTROL new file mode 100644 index 000000000..8772a00c6 --- /dev/null +++ b/ports/yara/CONTROL @@ -0,0 +1,4 @@ +Source: yara +Version: e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9 +Description: The pattern matching swiss knife +Build-Depends: openssl, jansson diff --git a/ports/yara/portfile.cmake b/ports/yara/portfile.cmake new file mode 100644 index 000000000..8e70a0d7f --- /dev/null +++ b/ports/yara/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "Building static") + set(VCPKG_LIBRARY_LINKAGE static) +endif() +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO VirusTotal/yara + REF e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9 + SHA512 2cb837c8e2617e66766b45339a99f3f441f842cb14ce7efe38f5ec2141a51696a400279d98514be4471234c8ef7c99419f56f5b7398af13d771294b2923090aa + HEAD_REF dev +) + +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 +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/yara RENAME copyright) -- cgit v1.2.3 From 226bb6bc2f4510a16c2fb031631481ec9574fd44 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Mon, 29 Jan 2018 22:05:19 +0200 Subject: [asmjit] init --- ports/asmjit/CONTROL | 3 +++ ports/asmjit/portfile.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 ports/asmjit/CONTROL create mode 100644 ports/asmjit/portfile.cmake diff --git a/ports/asmjit/CONTROL b/ports/asmjit/CONTROL new file mode 100644 index 000000000..37e16b63a --- /dev/null +++ b/ports/asmjit/CONTROL @@ -0,0 +1,3 @@ +Source: asmjit +Version: 673dcefaa048c5f5a2bf8b85daf8f7b9978d018a +Description: Complete x86/x64 JIT and Remote Assembler for C++ diff --git a/ports/asmjit/portfile.cmake b/ports/asmjit/portfile.cmake new file mode 100644 index 000000000..3efe1e025 --- /dev/null +++ b/ports/asmjit/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO asmjit/asmjit + REF 673dcefaa048c5f5a2bf8b85daf8f7b9978d018a + SHA512 f3cf4b603424ec0bf7e00463ad94e157bd549265730be66e5e29af31182ca3a6a318ff4c1b1d0fcd2595163df51ad6d34041583b8cbe73be1155562739c25555 + HEAD_REF master +) + + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DASMJIT_STATIC=1 + ) +else() + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + ) +endif() + + + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +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() + + + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/asmjit RENAME copyright) -- cgit v1.2.3 From bac500fb777728986c531c6ddca155d392677d04 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Mon, 29 Jan 2018 22:59:21 +0200 Subject: [crc32c] init --- ports/crc32c/CONTROL | 3 +++ ports/crc32c/portfile.cmake | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 ports/crc32c/CONTROL create mode 100644 ports/crc32c/portfile.cmake diff --git a/ports/crc32c/CONTROL b/ports/crc32c/CONTROL new file mode 100644 index 000000000..77a7e42c9 --- /dev/null +++ b/ports/crc32c/CONTROL @@ -0,0 +1,3 @@ +Source: crc32c +Version: 1.0.5 +Description: CRC32C implementation with support for CPU-specific acceleration instructions. diff --git a/ports/crc32c/portfile.cmake b/ports/crc32c/portfile.cmake new file mode 100644 index 000000000..2747d69bd --- /dev/null +++ b/ports/crc32c/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "building static") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/crc32c + REF 12a65bfb328fefae5c05879132676f702a3f68e8 + SHA512 610b7c54b0247edd2d37ec18db68c1f8a55b60b2fd3ddcede41e6321eb45d040f513cece493cbdc67e881065a643c4972126864811ff08b24aa7e82642e54f56 + HEAD_REF master +) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCRC32C_BUILD_TESTS=OFF + -DCRC32C_BUILD_BENCHMARKS=OFF + -DCRC32C_USE_GLOG=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/crc32c RENAME copyright) -- cgit v1.2.3 From b2eb87dc71c9df22d5c9fb5c2136786489b03196 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 26 Jan 2018 11:09:52 -0800 Subject: [qt5-base] Add openssl dependency for Network module and deploy it for applications --- ports/qt5-base/CONTROL | 4 ++-- ports/qt5-base/qtdeploy.ps1 | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index 0886bd04f..619b9f577 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,4 +1,4 @@ Source: qt5-base -Version: 5.9.2-2 +Version: 5.9.2-3 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 +Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl diff --git a/ports/qt5-base/qtdeploy.ps1 b/ports/qt5-base/qtdeploy.ps1 index 9d514e411..b25a46e7a 100644 --- a/ports/qt5-base/qtdeploy.ps1 +++ b/ports/qt5-base/qtdeploy.ps1 @@ -10,6 +10,9 @@ # Note: this function signature and behavior is depended upon by applocal.ps1 function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [string]$targetBinaryName) { + $baseDir = Split-Path $QtPluginsDir -parent + $binDir = "$baseDir\bin" + function deployPlugins([string]$pluginSubdirName) { if (Test-Path "$QtPluginsDir\$pluginSubdirName") { Write-Verbose " Deploying plugins directory '$pluginSubdirName'" @@ -36,6 +39,11 @@ function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [str deployPlugins "platforminputcontexts" } elseif ($targetBinaryName -like "Qt5Network*.dll") { deployPlugins "bearer" + if (Test-Path "$binDir\libeay32.dll") + { + deployBinary "$targetBinaryDir" "$binDir" "libeay32.dll" + deployBinary "$targetBinaryDir" "$binDir" "ssleay32.dll" + } } elseif ($targetBinaryName -like "Qt5Sql*.dll") { deployPlugins "sqldrivers" } elseif ($targetBinaryName -like "Qt5Multimedia*.dll") { -- cgit v1.2.3 From e95159b5a60be3dc8ba29d7baf20ce76b47c2f0e Mon Sep 17 00:00:00 2001 From: George Fotopoulos Date: Tue, 30 Jan 2018 02:44:57 +0200 Subject: [forest] New Package (#2650) * Add header-only library forest --- ports/forest/CONTROL | 3 +++ ports/forest/portfile.cmake | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 ports/forest/CONTROL create mode 100644 ports/forest/portfile.cmake diff --git a/ports/forest/CONTROL b/ports/forest/CONTROL new file mode 100644 index 000000000..522668d9d --- /dev/null +++ b/ports/forest/CONTROL @@ -0,0 +1,3 @@ +Source: forest +Version: 4.5.0 +Description: Forest is an open-source, template library of tree data structures written in C++11. diff --git a/ports/forest/portfile.cmake b/ports/forest/portfile.cmake new file mode 100644 index 000000000..6f076a0db --- /dev/null +++ b/ports/forest/portfile.cmake @@ -0,0 +1,16 @@ +# Ηeader-only library + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/forest-4.5.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/xorz57/forest/archive/4.5.0.zip" + FILENAME "forest-4.5.0.zip" + SHA512 ae256ad38802d0827cfcd45ffae35ddb95cf74e38cf3e5d806f6e2215f701abfb8159f82e2bb6362788fe96a9f9008429d366e7abbc7980b29b3528052cfe43e +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Handle headers +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/forest RENAME copyright) -- cgit v1.2.3 From d728defa671ce24abaf0e9f965cc6278c9323652 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Tue, 30 Jan 2018 09:49:05 +0900 Subject: [libspatialite] fix compile error on non-latin env (#2659) It has literals with latin chars in a C source. Unfortunately VC++ recognize source file without BOM as in OEM code not in UTF-8. It cause a strange behavior of VC++ compiler, and fails with "epsg_inlined_prussian.c(685): error C2001: newline in constant." It happens on non-latin Windows such as Japanese(CP932). It also work when changing Windows configuration "system locale for non-unicode applications" to latin one such as English(US)(CP432), but it affects all applications and users in Windows system. Signed-off-by: Hiroshi Miura --- ports/libspatialite/fix-latin-literals.patch | 108 +++++++++++++++++++++++++++ ports/libspatialite/portfile.cmake | 1 + 2 files changed, 109 insertions(+) create mode 100644 ports/libspatialite/fix-latin-literals.patch diff --git a/ports/libspatialite/fix-latin-literals.patch b/ports/libspatialite/fix-latin-literals.patch new file mode 100644 index 000000000..3060593e7 --- /dev/null +++ b/ports/libspatialite/fix-latin-literals.patch @@ -0,0 +1,108 @@ +diff --git a/src/srsinit/epsg_inlined_prussian.c b/src/srsinit/epsg_inlined_prussian.c +index a5c8334..dd75dde 100644 +--- a/src/srsinit/epsg_inlined_prussian.c ++++ b/src/srsinit/epsg_inlined_prussian.c +@@ -282,10 +282,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",17.11233917],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187913\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187914,"mj10777.de",187914,"DHDN / Soldner 14 Gröditzberg I"); ++ p = add_epsg_def(filter,first,last,187914,"mj10777.de",187914,u8"DHDN / Soldner 14 Gr\u00f6ditzberg I"); + add_proj4text(p,0,"+proj=cass +lat_0=51.17819342 +lon_0=15.76127086 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 14 Gröditzberg I\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 14 Gr\u00f6ditzberg I\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -346,10 +346,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",14.70144539],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187916\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187918,"mj10777.de",187918,"DHDN / Soldner 18 Müggelberg 600"); ++ p = add_epsg_def(filter,first,last,187918,u8"mj10777.de",187918,"DHDN / Soldner 18 M\u00fcggelberg 600"); + add_proj4text(p,0,"+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 18 Müggelberg 600\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 18 M\u00fcggelberg 600\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -362,10 +362,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",13.62720366666667],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187918\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187919,"mj10777.de",187919,"DHDN / Soldner 19 Götzer Berg 650"); ++ p = add_epsg_def(filter,first,last,187919,"mj10777.de",187919,u8"DHDN / Soldner 19 G\u00f6tzer Berg 650"); + add_proj4text(p,0,"+proj=cass +lat_0=52.43725961111112 +lon_0=12.72882972222223 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 19 Götzer Berg 650\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 19 G\u00f6tzer Berg 650\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -458,10 +458,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",9.23411097],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187924\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187925,"mj10777.de",187925,"DHDN / Soldner 25 Rathkrügen"); ++ p = add_epsg_def(filter,first,last,187925,"mj10777.de",187925,u8"DHDN / Soldner 25 Rathkr\u00fcgen"); + add_proj4text(p,0,"+proj=cass +lat_0=53.81839364 +lon_0=10.04220189 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 25 Rathkrügen\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 25 Rathkr\u00fcgen\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -570,10 +570,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",8.84051853],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187931\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187932,"mj10777.de",187932,"DHDN / Soldner 32 Münster"); ++ p = add_epsg_def(filter,first,last,187932,"mj10777.de",187932,u8"DHDN / Soldner 32 M\u00fcnster"); + add_proj4text(p,0,"+proj=cass +lat_0=51.96547642 +lon_0=7.62334994 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 32 Münster\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 32 M\u00fcnster\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -634,10 +634,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",9.50203072],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187935\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187936,"mj10777.de",187936,"DHDN / Soldner 36 Schaumburg, Schloßturm"); ++ p = add_epsg_def(filter,first,last,187936,"mj10777.de",187936,u8"DHDN / Soldner 36 Schaumburg, Schlo\u00dfturm"); + add_proj4text(p,0,"+proj=cass +lat_0=50.34048964 +lon_0=7.97808156 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 36 Schaumburg, Schloßturm\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 36 Schaumburg, Schlo\u00dfturm\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -666,10 +666,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",7.60594289],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187937\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187938,"mj10777.de",187938,"DHDN / Soldner 38 Cöln, Dom"); ++ p = add_epsg_def(filter,first,last,187938,"mj10777.de",187938,u8"DHDN / Soldner 38 C\u00f6ln, Dom"); + add_proj4text(p,0,"+proj=cass +lat_0=50.94257242 +lon_0=6.95897600 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 38 Cöln, Dom\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 38 C\u00f6ln, Dom\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -682,10 +682,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",6.95897600],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187938\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187939,"mj10777.de",187939,"DHDN / Soldner 39 Langschoß"); ++ p = add_epsg_def(filter,first,last,187939,u8"mj10777.de",187939,"DHDN / Soldner 39 Langscho\u00df"); + add_proj4text(p,0,"+proj=cass +lat_0=50.66738711 +lon_0=6.28935703 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 39 Langschoß\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 39 Langscho\u00df\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); diff --git a/ports/libspatialite/portfile.cmake b/ports/libspatialite/portfile.cmake index 6517c1d55..1efb9c159 100644 --- a/ports/libspatialite/portfile.cmake +++ b/ports/libspatialite/portfile.cmake @@ -14,6 +14,7 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch ${CMAKE_CURRENT_LIST_DIR}/fix-sources.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-latin-literals.patch ) # fix most of the problems when spacebar is in the path -- cgit v1.2.3 From 113d1668e488d477ed128522beee795837d5077b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 29 Jan 2018 16:49:31 -0800 Subject: [libspatialite] Bump version --- ports/libspatialite/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libspatialite/CONTROL b/ports/libspatialite/CONTROL index 1f7917a36..b363528e8 100644 --- a/ports/libspatialite/CONTROL +++ b/ports/libspatialite/CONTROL @@ -1,5 +1,5 @@ Source: libspatialite -Version: 4.3.0a +Version: 4.3.0a-1 Description: SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities. Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv -- cgit v1.2.3 From 108d13a27780147f788036bf56f01148768289d2 Mon Sep 17 00:00:00 2001 From: Force Charlie Date: Tue, 30 Jan 2018 21:22:53 +0800 Subject: update about HTTP2 TLS --- ports/curl/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index f45ee8016..b13cdb309 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -14,6 +14,7 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/0002_fix_uwp.patch ) +# Support HTTP2 TSL Download https://curl.haxx.se/ca/cacert.pem rename to curl-ca-bundle.crt, copy it to libcurl.dll location. SET(HTTP2_OPTIONS) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) SET(CURL_STATICLIB OFF) -- cgit v1.2.3 From d85a5bbc11a3404326a41cb43dd327896a0c79bc Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Tue, 30 Jan 2018 21:22:40 +0300 Subject: Fix incorrect version for soundtouch --- ports/soundtouch/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/soundtouch/CONTROL b/ports/soundtouch/CONTROL index c4bc8df52..cc37ea89f 100644 --- a/ports/soundtouch/CONTROL +++ b/ports/soundtouch/CONTROL @@ -1,4 +1,4 @@ Source: soundtouch -Version: 2.0.0.2 +Version: 2.0.0 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 -- cgit v1.2.3 From 794b1525d579454ea25e49b1ad6f1b878e61087a Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Tue, 30 Jan 2018 21:24:13 +0300 Subject: Fix incorrect version for jack2 --- ports/jack2/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/jack2/CONTROL b/ports/jack2/CONTROL index ccf49a118..b99701797 100644 --- a/ports/jack2/CONTROL +++ b/ports/jack2/CONTROL @@ -1,4 +1,4 @@ Source: jack2 -Version: 1.9.12.2 +Version: 1.9.12 Description: Cross-platform API that enables device sharing and inter-application audio routing -- cgit v1.2.3 From 2bc105cd95a457caf44623a742ddf4040bee4d20 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 30 Jan 2018 14:42:33 -0800 Subject: Add vcpkgFormatElapsedTime in powershell side --- scripts/VcpkgPowershellUtils.ps1 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 63da1a508..722d337ca 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -195,4 +195,29 @@ function vcpkgInvokeCommandClean() $ec = $process.ExitCode Write-Verbose "Execution terminated with exit code $ec." return $ec +} + +function vcpkgFormatElapsedTime([TimeSpan]$ts) +{ + if ($ts.TotalHours -ge 1) + { + return [string]::Format( "{0:N2} h", $ts.TotalHours); + } + + if ($ts.TotalMinutes -ge 1) + { + return [string]::Format( "{0:N2} min", $ts.TotalMinutes); + } + + if ($ts.TotalSeconds -ge 1) + { + return [string]::Format( "{0:N2} s", $ts.TotalSeconds); + } + + if ($ts.TotalMilliseconds -ge 1) + { + return [string]::Format( "{0:N2} ms", $ts.TotalMilliseconds); + } + + throw $ts } \ No newline at end of file -- cgit v1.2.3 From 4a387a4fd74b843a6a08da3ccfdb0ba223afa208 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 30 Jan 2018 15:02:19 -0800 Subject: [boost-vcpkg-helpers] Fix generator script for boost-test modifications in PR #2672 --- ports/boost-vcpkg-helpers/generate-ports.ps1 | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index 0b186caa4..a688f2356 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -22,11 +22,16 @@ function Generate() $sanitizedName = $name -replace "_","-" $versionsuffix = "" - if ($Name -eq "test" -or $Name -eq "python" -or $Name -eq "asio") + if ($Name -eq "python" -or $Name -eq "asio") { $versionsuffix = "-1" } + if ($Name -eq "test") + { + $versionsuffix = "-2" + } + mkdir "$scriptsDir/../boost-$sanitizedName" -erroraction SilentlyContinue | out-null $controlLines = @( "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" @@ -158,15 +163,20 @@ function Generate() if ($Name -eq "test") { $portfileLines += @( - "file(MAKE_DIRECTORY `${CURRENT_PACKAGES_DIR}/lib/manual-link)" - "file(MAKE_DIRECTORY `${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)" + "if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL `"release`")" + " file(MAKE_DIRECTORY `${CURRENT_PACKAGES_DIR}/lib/manual-link)" + " file(GLOB MONITOR_LIBS `${CURRENT_PACKAGES_DIR}/lib/*_exec_monitor*)" + " file(COPY `${MONITOR_LIBS} DESTINATION `${CURRENT_PACKAGES_DIR}/lib/manual-link)" + " file(REMOVE `${MONITOR_LIBS})" + "endif()" "" - "file(GLOB MONITOR_LIBS `${CURRENT_PACKAGES_DIR}/lib/*_exec_monitor*)" - "file(COPY `${MONITOR_LIBS} DESTINATION `${CURRENT_PACKAGES_DIR}/lib/manual-link)" - "file(GLOB DEBUG_MONITOR_LIBS `${CURRENT_PACKAGES_DIR}/debug/lib/*_exec_monitor*)" - "file(COPY `${DEBUG_MONITOR_LIBS} DESTINATION `${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)" + "if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL `"debug`")" + " file(MAKE_DIRECTORY `${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)" + " file(GLOB DEBUG_MONITOR_LIBS `${CURRENT_PACKAGES_DIR}/debug/lib/*_exec_monitor*)" + " file(COPY `${DEBUG_MONITOR_LIBS} DESTINATION `${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)" + " file(REMOVE `${DEBUG_MONITOR_LIBS})" + "endif()" "" - "file(REMOVE `${DEBUG_MONITOR_LIBS} `${MONITOR_LIBS})" ) } -- cgit v1.2.3 From 39e3fa9360a0ab8f2d119b02a10eeabb02454cfb Mon Sep 17 00:00:00 2001 From: Alisayyy-Yang Date: Wed, 31 Jan 2018 02:29:44 -0800 Subject: update live555 --- ports/live555/CONTROL | 2 +- ports/live555/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/live555/CONTROL b/ports/live555/CONTROL index ca55f517f..3c3318c2c 100644 --- a/ports/live555/CONTROL +++ b/ports/live555/CONTROL @@ -1,3 +1,3 @@ Source: live555 -Version: 2017.10.28 +Version: 2018.01.29 Description: A complete RTSP server application diff --git a/ports/live555/portfile.cmake b/ports/live555/portfile.cmake index 28aa45eb9..56abdafa5 100644 --- a/ports/live555/portfile.cmake +++ b/ports/live555/portfile.cmake @@ -1,9 +1,9 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/live) vcpkg_download_distfile(ARCHIVE - URLS "http://www.live555.com/liveMedia/public/live.2017.10.28.tar.gz" - FILENAME "live.2017.10.28.tar.gz" - SHA512 eea5bdb8d89e76c8b6aeb6ec04b77af3048cb41f228d230ba4da6045e9bc691a456023d44d8650fe690b08143567ed5af5b633f5b6522debff79344a813dc7d0 + URLS "http://www.live555.com/liveMedia/public/live.2018.01.29.tar.gz" + FILENAME "live.2018.01.29.tar.gz" + SHA512 dfdfcac67acd28f651807de423c6aed00190cfc38ecd361b76d37d8cc27ee2fa91a42a5b8835045680fd7f65c847e41747b948c2c71e6530a3c7e89421c60227 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 94caf16dfb41c1b6b6423000654711258e2c2a5c Mon Sep 17 00:00:00 2001 From: Force Charlie Date: Wed, 31 Jan 2018 21:34:19 +0800 Subject: [nghttp2]: update to 1.29.0 --- ports/nghttp2/CONTROL | 2 +- ports/nghttp2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/nghttp2/CONTROL b/ports/nghttp2/CONTROL index 18cd57cef..beb237aad 100644 --- a/ports/nghttp2/CONTROL +++ b/ports/nghttp2/CONTROL @@ -1,3 +1,3 @@ Source: nghttp2 -Version: 1.28.0 +Version: 1.29.0 Description: Implementation of the Hypertext Transfer Protocol version 2 in C diff --git a/ports/nghttp2/portfile.cmake b/ports/nghttp2/portfile.cmake index dd9f02b84..02133feeb 100644 --- a/ports/nghttp2/portfile.cmake +++ b/ports/nghttp2/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) set(LIB_NAME nghttp2) -set(LIB_VERSION 1.28.0) +set(LIB_VERSION 1.29.0) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) message("nghttp2 doesn't currently support static library build") @@ -17,7 +17,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/nghttp2/nghttp2/releases/download/v${LIB_VERSION}/${LIB_FILENAME}" FILENAME "${LIB_FILENAME}" - SHA512 37fbc7fe5f7292ea17ec030f024de0a697ede3ea883457b7edebfb0f21c7eee9196c62df61945953b54b410eea3a64d180beeb477529bd744caf986be0a1b1c9 + SHA512 34dfda7ba637fb23b24141aacf8a0c342a369a59c84d4e2bfed9b5a867f85a5d1d950267f018a820645954406d70bf499f01e2f9b1ebaa4b76e8f47c3693fd6e ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From b1fea458863fc6287c819771203912be844da999 Mon Sep 17 00:00:00 2001 From: Koby Kahane Date: Wed, 31 Jan 2018 16:30:03 +0200 Subject: [protobuf] update to 3.5.1 --- ports/protobuf/CONTROL | 2 +- ports/protobuf/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index c52a3ce55..0cf5b4334 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.5.0-1 +Version: 3.5.1 Description: Protocol Buffers - Google's data interchange format Feature: zlib diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 7e0c5c4f8..197a61446 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -1,17 +1,17 @@ include(vcpkg_common_functions) -set(PROTOBUF_VERSION 3.5.0) -set(PROTOC_VERSION 3.5.0) +set(PROTOBUF_VERSION 3.5.1) +set(PROTOC_VERSION 3.5.1) vcpkg_download_distfile(ARCHIVE_FILE URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-cpp-${PROTOBUF_VERSION}.tar.gz" FILENAME "protobuf-cpp-${PROTOBUF_VERSION}.tar.gz" - SHA512 b1d3f3617898e3f73630ea7a43416a60b970291b4f93952b8d4f68ee5cd401f752d76cd1f6a65a87186b415208142401e01ffebb2ec52534e1db31abcc0d052e + SHA512 195ccb210229e0a1080dcdb0a1d87b2e421ad55f6b036c56db3183bd50a942c75b4cc84e6af8a10ad88022a247781a06f609a145a461dfbb8f04051b7dd714b3 ) vcpkg_download_distfile(TOOL_ARCHIVE_FILE URLS "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-win32.zip" FILENAME "protoc-${PROTOC_VERSION}-win32.zip" - SHA512 d332045346883ac1ca76a77cc9d6303b1c83147f49e7525c531d390b1ac57be1c765e01dc53eeb38a0d9fa3e30cab420f6a6f52dbb0c4d0a84a421de955007a4 + SHA512 27b1b82e92d82c35158362435a29f590961b91f68cda21bffe46e52271340ea4587c4e3177668809af0d053b61e6efa69f0f62156ea11393cd9e6eb4474a3049 ) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}) -- cgit v1.2.3 From 76c28ad78e728cceb9dd0d5f6bec5c3454d74d4d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 31 Jan 2018 11:22:35 -0800 Subject: [gflags] Fix regression in previous gflags update for existing users. --- ports/gflags/portfile.cmake | 5 +++++ ports/gflags/revert-fix-install.patch | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 ports/gflags/revert-fix-install.patch diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index 0e89a8f16..dcbbb7426 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -12,6 +12,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/revert-fix-install.patch" +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA diff --git a/ports/gflags/revert-fix-install.patch b/ports/gflags/revert-fix-install.patch new file mode 100644 index 000000000..80793b65c --- /dev/null +++ b/ports/gflags/revert-fix-install.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 922a038..7d6af45 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -410,8 +410,8 @@ if (OS_WINDOWS) + set (RUNTIME_INSTALL_DIR "bin") + set (LIBRARY_INSTALL_DIR "lib") + set (INCLUDE_INSTALL_DIR "include") +- set (CONFIG_INSTALL_DIR "share/${PACKAGE_NAME}") +- set (PKGCONFIG_INSTALL_DIR "") ++ set (CONFIG_INSTALL_DIR "lib/cmake/${PACKAGE_NAME}") ++ set (PKGCONFIG_INSTALL_DIR) + else () + set (RUNTIME_INSTALL_DIR bin) + # The LIB_INSTALL_DIR and LIB_SUFFIX variables are used by the Fedora -- cgit v1.2.3 From 1f6f27a5480a02434614cc48aed5178a9e69bb4e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 31 Jan 2018 11:50:32 -0800 Subject: [vcpkg-from-bitbucket] Fix HEAD builds. Fixes #2696. --- scripts/cmake/vcpkg_from_bitbucket.cmake | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/cmake/vcpkg_from_bitbucket.cmake b/scripts/cmake/vcpkg_from_bitbucket.cmake index 26600f013..a12d86b43 100644 --- a/scripts/cmake/vcpkg_from_bitbucket.cmake +++ b/scripts/cmake/vcpkg_from_bitbucket.cmake @@ -130,7 +130,8 @@ function(vcpkg_from_bitbucket) # The following is for --head scenarios set(URL "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_HEAD_REF}.tar.gz") - set(downloaded_file_path "${DOWNLOADS}/${ORG_NAME}-${REPO_NAME}-${_vdud_HEAD_REF}.tar.gz") + set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${_vdud_HEAD_REF}.tar.gz") + set(downloaded_file_path "${DOWNLOADS}/${downloaded_file_name}") if(_VCPKG_NO_DOWNLOADS) if(NOT EXISTS ${downloaded_file_path} OR NOT EXISTS ${downloaded_file_path}.version) @@ -150,17 +151,17 @@ function(vcpkg_from_bitbucket) endif() # Try to download the file and version information from bitbucket. - set(_VCPKG_INTERNAL_NO_HASH_CHECK "TRUE") vcpkg_download_distfile(ARCHIVE_VERSION URLS "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/branches/${_vdud_HEAD_REF}" - FILENAME ${downloaded_file_name}.version + FILENAME "${downloaded_file_name}.version" + SKIP_SHA512 ) vcpkg_download_distfile(ARCHIVE - URLS ${URL} - FILENAME ${downloaded_file_name} + URLS "${URL}" + FILENAME "${downloaded_file_name}" + SKIP_SHA512 ) - set(_VCPKG_INTERNAL_NO_HASH_CHECK "FALSE") endif() vcpkg_extract_source_archive_ex( -- cgit v1.2.3 From 53e61d4ab545fa0097cb58ce9818350595322aab Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 31 Jan 2018 12:20:27 -0800 Subject: [docs][packaging-zlib] Fix example doc. --- docs/examples/packaging-zlib.md | 47 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/docs/examples/packaging-zlib.md b/docs/examples/packaging-zlib.md index 81bc58314..ce176d451 100644 --- a/docs/examples/packaging-zlib.md +++ b/docs/examples/packaging-zlib.md @@ -16,7 +16,7 @@ Finally, if the server's name for the archive is not very descriptive (such as d All this information can then be passed into the `create` command, which will download the sources and bootstrap the packaging process inside `ports\`. ```no-highlight -PS D:\src\vcpkg> .\vcpkg create zlib2 http://zlib.net/zlib128.zip zlib128.zip +PS D:\src\vcpkg> .\vcpkg create zlib2 http://zlib.net/zlib-1.2.11.tar.gz zlib-1.2.11.zip -- Generated portfile: D:/src/vcpkg/ports/zlib2/portfile.cmake ``` @@ -39,29 +39,28 @@ PS D:\src\vcpkg> .\vcpkg build zlib2 -- DOWNLOADS=D:/src/vcpkg/downloads -- CURRENT_PACKAGES_DIR=D:/src/vcpkg/packages/zlib2_x86-windows -- CURRENT_BUILDTREES_DIR=D:/src/vcpkg/buildtrees/zlib2 --- CURRENT_PORT_DIR=D:/src/vcpkg/ports/zlib2 --- Using cached D:/src/vcpkg/downloads/zlib128.zip --- Extracting source D:/src/vcpkg/downloads/zlib128.zip +-- CURRENT_PORT_DIR=D:/src/vcpkg/ports/zlib2/. +-- Using cached D:/src/vcpkg/downloads/zlib-1.2.11.tar.gz +-- Testing integrity of cached file... +-- Testing integrity of cached file... OK +-- Extracting source D:/src/vcpkg/downloads/zlib-1.2.11.tar.gz -- Extracting done -- Configuring x86-windows-rel -CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:13 (message): - Command failed: C:/Program Files - (x86)/CMake/bin/cmake.exe;D:/src/vcpkg/buildtrees/zlib2/src/zlib128;-G;Ninja;-DCMAKE_VERBOSE_MAKEFILE=ON;-DCMAKE_BUILD_TYPE=Release;-DCMAKE_TOOLCHAIN_FILE=D:/src/vcpkg/triplets/x86-windows.cmake;-DCMAKE_PREFIX_PATH=D:/src/vcpkg/installed/x86-windows;- -DCMAKE_INSTALL_PREFIX=D:/src/vcpkg/packages/zlib2_x86-windows - - - Working Directory: D:/src/vcpkg/buildtrees/zlib2/x86-windows-rel - - See logs for more information: - - D:/src/vcpkg/buildtrees/zlib2/config-x86-windows-rel-out.log - D:/src/vcpkg/buildtrees/zlib2/config-x86-windows-rel-err.log - -Call Stack (most recent call first): - scripts/cmake/vcpkg_configure_cmake.cmake:15 (vcpkg_execute_required_process) - ports/zlib2/portfile.cmake:8 (vcpkg_configure_cmake) - scripts/ports.cmake:105 (include) - scripts/ports.cmake:184 (build) +-- Configuring x86-windows-rel done +-- Configuring x86-windows-dbg +-- Configuring x86-windows-dbg done +-- Build x86-windows-rel +-- Build x86-windows-rel done +-- Build x86-windows-dbg +-- Build x86-windows-dbg done +-- Performing post-build validation +Include files should not be duplicated into the /debug/include directory. If this cannot be disabled in the project cmake, use + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +/debug/share should not exist. Please reorganize any important files, then use + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +The software license must be available at ${CURRENT_PACKAGES_DIR}/share/zlib2/copyright +Found 3 error(s). Please correct the portfile: + D:\src\vcpkg\ports\zlib2\portfile.cmake ``` At this point, it is a matter of reading the error messages and log files while steadily improving the quality of the portfile. Zlib required providing a discrete copy of the LICENSE to copy into the package, suppressing the build and installation of executables and headers, and removing the static libraries after they were installed. @@ -73,8 +72,8 @@ In the `ports\` directory are many libraries that can be used as examples, inclu - rapidjson - range-v3 - MSBuild-based + - cppunit - mpg123 - - glew - Non-CMake, custom buildsystem - openssl - - boost + - ffmpeg -- cgit v1.2.3 From ce93af997290d536db89db83b9b3b154a571c28f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 31 Jan 2018 11:34:25 -0800 Subject: [poco] Fix embedded copy of pcre in static linking mode. Fixes #2685. --- ports/poco/CONTROL | 2 +- ports/poco/fix-static-internal-pcre.patch | 27 +++++++++++++++++++++++++++ ports/poco/portfile.cmake | 1 + 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 ports/poco/fix-static-internal-pcre.patch diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index ea16a2644..e979e2247 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,5 +1,5 @@ Source: poco -Version: 1.8.1 +Version: 1.8.1-1 Build-Depends: zlib, pcre, sqlite3, expat Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. diff --git a/ports/poco/fix-static-internal-pcre.patch b/ports/poco/fix-static-internal-pcre.patch new file mode 100644 index 000000000..970f9e246 --- /dev/null +++ b/ports/poco/fix-static-internal-pcre.patch @@ -0,0 +1,27 @@ +diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt +index d47ced2..ddead59 100644 +--- a/Foundation/CMakeLists.txt ++++ b/Foundation/CMakeLists.txt +@@ -48,6 +48,22 @@ if (POCO_UNBUNDLED) + + add_definitions(-DPOCO_UNBUNDLED) + ++ add_definitions( ++ -D_pcre_utf8_table1=_poco_pcre_utf8_table1 ++ -D_pcre_utf8_table1_size=_poco_pcre_utf8_table1_size ++ -D_pcre_utf8_table2=_poco_pcre_utf8_table2 ++ -D_pcre_utf8_table3=_poco_pcre_utf8_table3 ++ -D_pcre_utf8_table4=_poco_pcre_utf8_table4 ++ -D_pcre_utt_names=_poco_pcre_utt_names ++ -D_pcre_utt=_poco_pcre_utt ++ -D_pcre_utt_size=_poco_pcre_utt_size ++ -D_pcre_OP_lengths=_poco_pcre_OP_lengths ++ -D_pcre_hspace_list=_poco_pcre_hspace_list ++ -D_pcre_vspace_list=_poco_pcre_vspace_list ++ -D_pcre_ucp_gentype=_poco_pcre_ucp_gentype ++ -D_pcre_ucp_gbtable=_poco_pcre_ucp_gbtable ++ ) ++ + else() + # pcre + POCO_SOURCES( SRCS pcre diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 6d3db0fa4..399f1a064 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -14,6 +14,7 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/config_h.patch ${CMAKE_CURRENT_LIST_DIR}/find_pcre.patch ${CMAKE_CURRENT_LIST_DIR}/foundation-public-include-pcre.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-static-internal-pcre.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" POCO_STATIC) -- cgit v1.2.3 From 0e254766fd6f58208215ac50b87e8c845fc58033 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 31 Jan 2018 17:24:17 -0800 Subject: [jxrlib] Switch to github --- ports/jxrlib/portfile.cmake | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ports/jxrlib/portfile.cmake b/ports/jxrlib/portfile.cmake index c7c089ff7..ca29a6aca 100644 --- a/ports/jxrlib/portfile.cmake +++ b/ports/jxrlib/portfile.cmake @@ -1,11 +1,13 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) -vcpkg_download_distfile(ARCHIVE - URLS "http://download-codeplex.sec.s-msft.com/Download/SourceControlFileDownload.ashx?ProjectName=jxrlib&changeSetId=e922fa50cdf9a58f40cad07553bcaa2883d3c5bf" - FILENAME "jxrlib_1_1.zip" - SHA512 6e8b579108444e9bea8d01f57e2ac3b63963c084adb8e265cfd82bb1199b8bd168b8aa41319cf34b87e97db1d72d0f3cc2d3dac881fcd1a6f398fe808d55772d + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO 4creators/jxrlib + REF e922fa50cdf9a58f40cad07553bcaa2883d3c5bf + SHA512 15ed099e5f80571ebd86e115ed1c2dd18be4d6faa8b5f19212ea89582ec37e0ffa0629d80470fcb49f1c605996ea6ce76fd0dd95d9edee458ba290dff4d21537 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 7cc75cea73ee09c615e137a26fcaee9f2ea5b823 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Thu, 1 Feb 2018 14:54:43 +0800 Subject: [libodb-mysql] init --- ports/libodb-mysql/CMakeLists.txt | 44 ++++++++++++++++++++++++++++++++++++++ ports/libodb-mysql/CONTROL | 4 ++++ ports/libodb-mysql/portfile.cmake | 45 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 ports/libodb-mysql/CMakeLists.txt create mode 100644 ports/libodb-mysql/CONTROL create mode 100644 ports/libodb-mysql/portfile.cmake diff --git a/ports/libodb-mysql/CMakeLists.txt b/ports/libodb-mysql/CMakeLists.txt new file mode 100644 index 000000000..b578964b6 --- /dev/null +++ b/ports/libodb-mysql/CMakeLists.txt @@ -0,0 +1,44 @@ +cmake_minimum_required(VERSION 3.0) +project(libodb-mysql VERSION 2.4.0 LANGUAGES CXX) +find_package(odb 2.4.0 REQUIRED COMPONENTS libodb) +INCLUDE_DIRECTORIES(${MYSQL_INCLUDE_DIR}) +set(LIBODB_INSTALL_HEADERS ON CACHE BOOL "Install the header files (a debug install)") +file(GLOB_RECURSE libodb_src + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + *.cxx) +add_library(libodb-mysql ${libodb_src}) +target_include_directories(libodb-mysql + PUBLIC + $ + $ + +) + +target_link_libraries(libodb-mysql PRIVATE odb::libodb ${MYSQL_LIB}) +if(BUILD_SHARED_LIBS) + target_compile_definitions(libodb-mysql PRIVATE + -DLIBODB_MYSQL_DYNAMIC_LIB + -DLIBODB_MYSQL_HAVE_UNLOCK_NOTIFY) +else() + target_compile_definitions(libodb-mysql PRIVATE + -DLIBODB_MYSQL_STATIC_LIB + -DLIBODB_MYSQL_HAVE_UNLOCK_NOTIFY) +endif() +install(TARGETS libodb-mysql EXPORT odb_mysqlConfig + COMPONENT mysql + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) +if(LIBODB_INSTALL_HEADERS) +install(DIRECTORY odb DESTINATION include/ + COMPONENT mysql + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.hxx" + PATTERN "*.ixx" + PATTERN "*.txx" +) +endif() +install(EXPORT odb_mysqlConfig NAMESPACE odb:: COMPONENT mysql DESTINATION share/odb) +export(TARGETS libodb-mysql NAMESPACE odb:: FILE odb_mysqlConfig.cmake) \ No newline at end of file diff --git a/ports/libodb-mysql/CONTROL b/ports/libodb-mysql/CONTROL new file mode 100644 index 000000000..d51a5a216 --- /dev/null +++ b/ports/libodb-mysql/CONTROL @@ -0,0 +1,4 @@ +Source: libodb-mysql +Version: 2.4.0-1 +Description: MySQL support for the ODB ORM library +Build-Depends: libodb, libmysql \ No newline at end of file diff --git a/ports/libodb-mysql/portfile.cmake b/ports/libodb-mysql/portfile.cmake new file mode 100644 index 000000000..9bb0d0434 --- /dev/null +++ b/ports/libodb-mysql/portfile.cmake @@ -0,0 +1,45 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libodb-mysql-2.4.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.codesynthesis.com/download/odb/2.4/libodb-mysql-2.4.0.tar.gz" + FILENAME "libodb-mysql-2.4.0.tar.gz" + SHA512 c27b73c3f61dccdd149c11c122185f645a00d5bc346b366ee65b738f8719c39d03fad07a0d55b62b3db9e3ad2507679c24ddda331e5d110f367ad32f7cf8b910 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql") +set(MYSQL_LIB "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib") +set(MYSQL_LIB_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib") +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DMYSQL_INCLUDE_DIR=${MYSQL_INCLUDE_DIR} + OPTIONS_RELEASE + -DMYSQL_LIB=${MYSQL_LIB} + OPTIONS_DEBUG + -DLIBODB_INSTALL_HEADERS=OFF + -DMYSQL_LIB=${MYSQL_LIB_DEBUG} +) + +vcpkg_install_cmake() + +file(READ ${CURRENT_PACKAGES_DIR}/debug/share/odb/odb_mysqlConfig-debug.cmake LIBODB_DEBUG_TARGETS) +string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" LIBODB_DEBUG_TARGETS "${LIBODB_DEBUG_TARGETS}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/odb/odb_mysqlConfig-debug.cmake "${LIBODB_DEBUG_TARGETS}") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libodb-mysql) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libodb-mysql/LICENSE ${CURRENT_PACKAGES_DIR}/share/libodb-mysql/copyright) +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 0d7213c261869ebc359d315a46380b9d10768774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Thu, 1 Feb 2018 12:01:28 +0100 Subject: Make catch an alias for Catch2 Closes #2310 --- ports/catch/CONTROL | 5 +++-- ports/catch/portfile.cmake | 19 +------------------ 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/ports/catch/CONTROL b/ports/catch/CONTROL index 2975af555..f486f31b0 100644 --- a/ports/catch/CONTROL +++ b/ports/catch/CONTROL @@ -1,3 +1,4 @@ Source: catch -Version: 2.0.1-1 -Description: C++ Automated Test Cases in Headers +Version: alias +Build-Depends: catch2 +Description: Deprecated alias for Catch2 unit testing framework diff --git a/ports/catch/portfile.cmake b/ports/catch/portfile.cmake index a1c5033cf..065116c27 100644 --- a/ports/catch/portfile.cmake +++ b/ports/catch/portfile.cmake @@ -1,18 +1 @@ -include(vcpkg_common_functions) - -set(CATCH_VERSION v2.0.1) - -vcpkg_download_distfile(HEADER - URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" - FILENAME "catch-${CATCH_VERSION}.hpp" - SHA512 e5e58c3a190cb0e848e19e885037e88e1b864e017f42b1306569850436c1c691b65640759d467061486931e7465a2b906fdd9e5208911b660fd960bf718305b4 -) - -vcpkg_download_distfile(LICENSE - URLS "https://raw.githubusercontent.com/catchorg/Catch2/${CATCH_VERSION}/LICENSE.txt" - FILENAME "catch-LICENSE-${CATCH_VERSION}.txt" - SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 -) - -file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME catch.hpp) -file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch RENAME copyright) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -- cgit v1.2.3 From fbe876646601ea1426679793d44dec7cd3852ddf Mon Sep 17 00:00:00 2001 From: "Ossowski, Michal" Date: Thu, 1 Feb 2018 15:48:40 +0100 Subject: [hdf5] add cpp feature Required for building caffe --- ports/hdf5/CONTROL | 3 +++ ports/hdf5/portfile.cmake | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ports/hdf5/CONTROL b/ports/hdf5/CONTROL index b9744407a..1d86a5edf 100644 --- a/ports/hdf5/CONTROL +++ b/ports/hdf5/CONTROL @@ -6,3 +6,6 @@ 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 15f2399f2..1da61178b 100644 --- a/ports/hdf5/portfile.cmake +++ b/ports/hdf5/portfile.cmake @@ -27,6 +27,12 @@ else() set(ENABLE_PARALLEL OFF) endif() +if ("cpp" IN_LIST FEATURES) + set(ENABLE_CPP ON) +else() + set(ENABLE_CPP OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -35,7 +41,7 @@ vcpkg_configure_cmake( -DDISABLE_STATIC_LIBS=${DISABLE_STATIC_LIBS} -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_TOOLS=OFF - -DHDF5_BUILD_CPP_LIB=OFF + -DHDF5_BUILD_CPP_LIB=${ENABLE_CPP} -DHDF5_ENABLE_PARALLEL=${ENABLE_PARALLEL} -DHDF5_ENABLE_Z_LIB_SUPPORT=ON -DHDF5_ENABLE_SZIP_SUPPORT=ON -- cgit v1.2.3 From d2c1aaddc8b953e28b8fd4a0c17c4982469b290c Mon Sep 17 00:00:00 2001 From: LazyHamster Date: Thu, 1 Feb 2018 18:06:54 +0300 Subject: Fixed build & install. Added mux library. --- ports/libwebp/CONTROL | 2 +- ports/libwebp/build_fixes.patch | 33 +++++++++++++++++++++++++++++++++ ports/libwebp/portfile.cmake | 15 ++++++++++----- 3 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 ports/libwebp/build_fixes.patch diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index 0e63f5b39..42201b36b 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -1,3 +1,3 @@ Source: libwebp -Version: 0.6.1 +Version: 0.6.1-1 Description: Lossy compression of digital photographic images. diff --git a/ports/libwebp/build_fixes.patch b/ports/libwebp/build_fixes.patch new file mode 100644 index 000000000..72cb304a9 --- /dev/null +++ b/ports/libwebp/build_fixes.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3b105e37..f9b806c4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -106,6 +106,9 @@ endforeach() + if(MSVC) + # avoid security warnings for e.g., fopen() used in the examples. + add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ if(BUILD_SHARED_LIBS) ++ add_definitions(-DWEBP_EXTERN=__declspec\(dllexport\)) ++ endif() + else() + add_definitions(-Wall) + endif() +@@ -235,6 +238,10 @@ if(WEBP_BUILD_GIF2WEBP AND NOT GIF_FOUND) + endif() + + if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) ++ set(WEBP_BUILD_MUX ON) ++endif() ++ ++if(WEBP_BUILD_MUX) + parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" + "") + add_library(webpmux ${WEBP_MUX_SRCS}) +@@ -322,6 +329,7 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/decode.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h + DESTINATION include/webp) + install(TARGETS ${INSTALLED_LIBRARIES} ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 22c028452..3c16eccbb 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -11,15 +11,20 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/build_fixes.patch +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - # dllexport support seem to be broken - OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON - -DCMAKE_DEBUG_POSTFIX=d + OPTIONS + -DCMAKE_DEBUG_POSTFIX=d + -DWEBP_BUILD_MUX=ON ) -vcpkg_build_cmake() vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -30,4 +35,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) 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) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() -- cgit v1.2.3 From b8c14a9752ecddfd56ce88aa3a373b36bf9631b8 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Thu, 1 Feb 2018 19:42:32 +0300 Subject: [boost] Restore the description --- ports/boost/CONTROL | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 660f4898e..3448765cf 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,3 +1,4 @@ Source: boost Version: 1.66.0 +Description: Peer-reviewed portable C++ source libraries Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-context (windows), boost-conversion, boost-convert, boost-core, boost-coroutine (windows), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-disjoint-sets, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (windows), boost-filesystem (windows), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (windows), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (windows), boost-local-function, boost-lockfree, boost-log (windows), boost-logic (windows), boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpi, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-optional, boost-parameter, boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options (windows), boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (windows), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-scope-exit, boost-serialization, boost-signals, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (windows), boost-statechart, boost-static-assert, boost-system, boost-test (windows), boost-thread (windows), boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure (windows), boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-vmd, boost-wave (windows), boost-winapi, boost-xpressive -- cgit v1.2.3 From 41a0eee5d10c31c7c3a157454d251dda10bd20fe Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 1 Feb 2018 10:44:29 -0800 Subject: [vcpkg] Add missing include. Fixes #2700. --- toolsrc/include/vcpkg/base/graphs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/toolsrc/include/vcpkg/base/graphs.h b/toolsrc/include/vcpkg/base/graphs.h index bd22bbcb0..1b0fa61c7 100644 --- a/toolsrc/include/vcpkg/base/graphs.h +++ b/toolsrc/include/vcpkg/base/graphs.h @@ -5,6 +5,7 @@ #include #include +#include namespace vcpkg::Graphs { -- cgit v1.2.3 From a0648c23afd9f081bf8d88a41a6842e969f05805 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 1 Feb 2018 11:08:12 -0800 Subject: [boost-vcpkg-helpers] Add boost description to generator script --- ports/boost-vcpkg-helpers/generate-ports.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index a688f2356..1a69447e0 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -368,6 +368,7 @@ $boostDependsList = @($libraries_in_boost_port | % { "boost-$_" -replace "_","-" @( "Source: boost" "Version: $version" + "Description: Peer-reviewed portable C++ source libraries" "Build-Depends: $boostDependsList" ) | out-file -enc ascii $scriptsDir/../boost/CONTROL -- cgit v1.2.3 From 9f09d67608e9f6708def890a40816c735edd3828 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 1 Feb 2018 11:27:45 -0800 Subject: [flatbuffers] Fix tool location. Fixes #2704. --- ports/flatbuffers/CONTROL | 2 +- ports/flatbuffers/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/flatbuffers/CONTROL b/ports/flatbuffers/CONTROL index a1efcdd39..b941c1188 100644 --- a/ports/flatbuffers/CONTROL +++ b/ports/flatbuffers/CONTROL @@ -1,4 +1,4 @@ Source: flatbuffers -Version: 1.8.0 +Version: 1.8.0-1 Description: Memory Efficient Serialization Library http://google.github.io/flatbuffers/ 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. diff --git a/ports/flatbuffers/portfile.cmake b/ports/flatbuffers/portfile.cmake index 2e3ab983c..7ddcee23d 100644 --- a/ports/flatbuffers/portfile.cmake +++ b/ports/flatbuffers/portfile.cmake @@ -40,7 +40,7 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin) endif() if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/flatc.exe) make_directory(${CURRENT_PACKAGES_DIR}/tools) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/flatc.exe ${CURRENT_PACKAGES_DIR}/tools/flatc.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/flatc.exe ${CURRENT_PACKAGES_DIR}/tools/flatbuffers/flatc.exe) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) endif() if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/flatbuffers.dll) -- cgit v1.2.3 From 47265676398778e03ee16bfeb33ef357e8658676 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 1 Feb 2018 11:31:46 -0800 Subject: [boost-vcpkg-helpers][boost] Add autogenerated message --- ports/boost-vcpkg-helpers/generate-ports.ps1 | 1 + ports/boost/CONTROL | 1 + 2 files changed, 2 insertions(+) diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index 1a69447e0..c410cd6a0 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -366,6 +366,7 @@ foreach ($library in $libraries) $boostDependsList = @($libraries_in_boost_port | % { "boost-$_" -replace "_","-" }) -join ", " @( + "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" "Source: boost" "Version: $version" "Description: Peer-reviewed portable C++ source libraries" diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 3448765cf..e9ed7c84b 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,3 +1,4 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost Version: 1.66.0 Description: Peer-reviewed portable C++ source libraries -- cgit v1.2.3 From 55b48e77d1742f807c27cdd6969a39cb54a8f8c2 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 1 Feb 2018 13:35:21 -0800 Subject: [freeimage] Link webpmux. --- ports/freeimage/CONTROL | 2 +- ports/freeimage/cmake/FindWEBP.cmake | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/freeimage/CONTROL b/ports/freeimage/CONTROL index 9d7c65b6f..6e8de82fc 100644 --- a/ports/freeimage/CONTROL +++ b/ports/freeimage/CONTROL @@ -1,4 +1,4 @@ Source: freeimage -Version: 3.17.0-3 +Version: 3.17.0-4 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp, libraw, jxrlib, openexr Description: Support library for graphics image formats diff --git a/ports/freeimage/cmake/FindWEBP.cmake b/ports/freeimage/cmake/FindWEBP.cmake index 9b8516e15..b4fefeadc 100644 --- a/ports/freeimage/cmake/FindWEBP.cmake +++ b/ports/freeimage/cmake/FindWEBP.cmake @@ -10,17 +10,17 @@ find_path(WEBP_INCLUDE_DIRS ) mark_as_advanced(WEBP_INCLUDE_DIRS) -find_library( - WEBP_LIBRARIES - NAMES webp -) - find_library(WEBP_LIBRARY_RELEASE NAMES webp PATH_SUFFIXES lib) find_library(WEBP_LIBRARY_DEBUG NAMES webpd PATH_SUFFIXES lib) + +find_library(WEBPMUX_LIBRARY_RELEASE NAMES webpmux PATH_SUFFIXES lib) +find_library(WEBPMUX_LIBRARY_DEBUG NAMES webpmuxd PATH_SUFFIXES lib) + include(SelectLibraryConfigurations) select_library_configurations(WEBP) +select_library_configurations(WEBPMUX) -set(WEBP_LIBRARIES ${WEBP_LIBRARY}) +set(WEBP_LIBRARIES ${WEBPMUX_LIBRARY} ${WEBP_LIBRARY}) include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(WEBP DEFAULT_MSG WEBP_INCLUDE_DIRS WEBP_LIBRARIES) -- cgit v1.2.3 From 09334981885478b8b9642755d981481dbd832c30 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 1 Feb 2018 13:49:59 -0800 Subject: [boost] copy pdbs --- ports/boost-build/boost-modular-build.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/boost-build/boost-modular-build.cmake b/ports/boost-build/boost-modular-build.cmake index a67dde31c..57505dbea 100644 --- a/ports/boost-build/boost-modular-build.cmake +++ b/ports/boost-build/boost-modular-build.cmake @@ -270,4 +270,6 @@ function(boost_modular_build) file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) endif() endforeach() + + vcpkg_copy_pdbs() endfunction() -- cgit v1.2.3 From 485c0aebf681f85ec6102d225baf7bdc772b2039 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 1 Feb 2018 15:44:22 -0800 Subject: [boost] Fix whitespace issues --- ports/boost-build/CONTROL | 2 +- ports/boost-build/Jamroot.jam | 42 +++++++++++++++++++-------------------- ports/boost-build/user-config.jam | 18 ++++++++--------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/ports/boost-build/CONTROL b/ports/boost-build/CONTROL index fb8d36918..f74f24f5c 100644 --- a/ports/boost-build/CONTROL +++ b/ports/boost-build/CONTROL @@ -1,3 +1,3 @@ Source: boost-build -Version: 1.66.0-3 +Version: 1.66.0-4 Description: Boost.Build diff --git a/ports/boost-build/Jamroot.jam b/ports/boost-build/Jamroot.jam index 3c34905e5..84f82126d 100644 --- a/ports/boost-build/Jamroot.jam +++ b/ports/boost-build/Jamroot.jam @@ -8,7 +8,7 @@ import feature ; boostcpp.set-version $(BOOST_VERSION) ; project boost : requirements - include&&@CURRENT_INSTALLED_DIR@/include + include&&"@CURRENT_INSTALLED_DIR@/include" BOOST_ALL_NO_LIB=1 @$(__name__).tag @REQUIREMENTS@ @@ -36,8 +36,8 @@ if "@PORT@" != "boost-system" { use-project /boost/system : . ; - lib boost_system : : @CURRENT_INSTALLED_DIR@/lib/boost_system-vc140-mt.lib release ; - lib boost_system : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_system-vc140-mt-gd.lib debug ; + lib boost_system : : "@CURRENT_INSTALLED_DIR@/lib/boost_system-vc140-mt.lib" release ; + lib boost_system : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_system-vc140-mt-gd.lib" debug ; explicit boost_system ; } @@ -45,8 +45,8 @@ if "@PORT@" != "boost-chrono" { use-project /boost/chrono : . ; - lib boost_chrono : : @CURRENT_INSTALLED_DIR@/lib/boost_chrono-vc140-mt.lib release ; - lib boost_chrono : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_chrono-vc140-mt-gd.lib debug ; + lib boost_chrono : : "@CURRENT_INSTALLED_DIR@/lib/boost_chrono-vc140-mt.lib" release ; + lib boost_chrono : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_chrono-vc140-mt-gd.lib" debug ; explicit boost_chrono ; } @@ -54,8 +54,8 @@ if "@PORT@" != "boost-regex" { use-project /boost/regex : . ; - lib boost_regex : : @CURRENT_INSTALLED_DIR@/lib/boost_regex-vc140-mt.lib release ; - lib boost_regex : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_regex-vc140-mt-gd.lib debug ; + lib boost_regex : : "@CURRENT_INSTALLED_DIR@/lib/boost_regex-vc140-mt.lib" release ; + lib boost_regex : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_regex-vc140-mt-gd.lib" debug ; explicit boost_regex ; } @@ -63,8 +63,8 @@ if "@PORT@" != "boost-date-time" { use-project /boost/date_time : . ; - lib boost_date_time : : @CURRENT_INSTALLED_DIR@/lib/boost_date_time-vc140-mt.lib release -/boost/date_time//boost_date_time ; - lib boost_date_time : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_date_time-vc140-mt-gd.lib debug -/boost/date_time//boost_date_time ; + lib boost_date_time : : "@CURRENT_INSTALLED_DIR@/lib/boost_date_time-vc140-mt.lib" release -/boost/date_time//boost_date_time ; + lib boost_date_time : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_date_time-vc140-mt-gd.lib" debug -/boost/date_time//boost_date_time ; explicit boost_date_time ; } @@ -72,8 +72,8 @@ if "@PORT@" != "boost-thread" { use-project /boost/thread : . ; - lib boost_thread : : @CURRENT_INSTALLED_DIR@/lib/boost_thread-vc140-mt.lib release : : /boost/date_time//boost_date_time ; - lib boost_thread : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_thread-vc140-mt-gd.lib debug : : /boost/date_time//boost_date_time ; + lib boost_thread : : "@CURRENT_INSTALLED_DIR@/lib/boost_thread-vc140-mt.lib" release : : /boost/date_time//boost_date_time ; + lib boost_thread : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_thread-vc140-mt-gd.lib" debug : : /boost/date_time//boost_date_time ; explicit boost_thread ; } @@ -81,8 +81,8 @@ if "@PORT@" != "boost-timer" { use-project /boost/timer : . ; - lib boost_timer : : @CURRENT_INSTALLED_DIR@/lib/boost_timer-vc140-mt.lib release ; - lib boost_timer : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_timer-vc140-mt-gd.lib debug ; + lib boost_timer : : "@CURRENT_INSTALLED_DIR@/lib/boost_timer-vc140-mt.lib" release ; + lib boost_timer : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_timer-vc140-mt-gd.lib" debug ; explicit boost_timer ; } @@ -90,8 +90,8 @@ if "@PORT@" != "boost-filesystem" { use-project /boost/filesystem : . ; - lib boost_filesystem : : @CURRENT_INSTALLED_DIR@/lib/boost_filesystem-vc140-mt.lib release : : /boost/system//boost_system ; - lib boost_filesystem : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_filesystem-vc140-mt-gd.lib debug : : /boost/system//boost_system ; + lib boost_filesystem : : "@CURRENT_INSTALLED_DIR@/lib/boost_filesystem-vc140-mt.lib" release : : /boost/system//boost_system ; + lib boost_filesystem : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_filesystem-vc140-mt-gd.lib" debug : : /boost/system//boost_system ; explicit boost_filesystem ; } @@ -99,8 +99,8 @@ if "@PORT@" != "boost-atomic" { use-project /boost/atomic : . ; - lib boost_atomic : : @CURRENT_INSTALLED_DIR@/lib/boost_atomic-vc140-mt.lib release ; - lib boost_atomic : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_atomic-vc140-mt-gd.lib debug ; + lib boost_atomic : : "@CURRENT_INSTALLED_DIR@/lib/boost_atomic-vc140-mt.lib" release ; + lib boost_atomic : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_atomic-vc140-mt-gd.lib" debug ; explicit boost_atomic ; } @@ -111,8 +111,8 @@ if "@PORT@" != "boost-context" use-project /boost/context : . ; - lib boost_context : : @CURRENT_INSTALLED_DIR@/lib/boost_context-vc140-mt.lib release ; - lib boost_context : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_context-vc140-mt-gd.lib debug ; + lib boost_context : : "@CURRENT_INSTALLED_DIR@/lib/boost_context-vc140-mt.lib" release ; + lib boost_context : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_context-vc140-mt-gd.lib" debug ; explicit boost_context ; } @@ -120,8 +120,8 @@ if "@PORT@" != "boost-test" { use-project /boost/test : . ; - lib boost_unit_test_framework : : @CURRENT_INSTALLED_DIR@/lib/boost_unit_test_framework-vc140-mt.lib release ; - lib boost_unit_test_framework : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_unit_test_framework-vc140-mt-gd.lib debug ; + lib boost_unit_test_framework : : "@CURRENT_INSTALLED_DIR@/lib/boost_unit_test_framework-vc140-mt.lib" release ; + lib boost_unit_test_framework : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_unit_test_framework-vc140-mt-gd.lib" debug ; explicit boost_unit_test_framework ; } diff --git a/ports/boost-build/user-config.jam b/ports/boost-build/user-config.jam index c970f07a5..ab86c0c43 100644 --- a/ports/boost-build/user-config.jam +++ b/ports/boost-build/user-config.jam @@ -1,25 +1,25 @@ import toolset ; using msvc : : cl.exe : -@NOTHING_BAT@ +"@NOTHING_BAT@" @TOOLSET_OPTIONS@ ; if "@PORT@" = "boost-python" { - using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_RELEASE@ ; - using python : @PYTHON_VERSION@ : : @PYTHON_INCLUDE_PATH@ : @PYTHONLIBS_DEBUG@ : on ; + using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_RELEASE@" ; + using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_DEBUG@" : on ; } project user-config : ; lib advapi32 ; -lib icuuc : : @CURRENT_INSTALLED_DIR@/lib/icuuc.lib release : : advapi32 ; -lib icuuc : : @CURRENT_INSTALLED_DIR@/debug/lib/icuucd.lib debug : : advapi32 ; +lib icuuc : : "@CURRENT_INSTALLED_DIR@/lib/icuuc.lib" release : : advapi32 ; +lib icuuc : : "@CURRENT_INSTALLED_DIR@/debug/lib/icuucd.lib" debug : : advapi32 ; -lib icuin : : @CURRENT_INSTALLED_DIR@/lib/icuin.lib release : : ; -lib icuin : : @CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib debug : : ; +lib icuin : : "@CURRENT_INSTALLED_DIR@/lib/icuin.lib" release : : ; +lib icuin : : "@CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib" debug : : ; -lib icudt : : @CURRENT_INSTALLED_DIR@/lib/icudt.lib release : : ; -lib icudt : : @CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib debug : : ; +lib icudt : : "@CURRENT_INSTALLED_DIR@/lib/icudt.lib" release : : ; +lib icudt : : "@CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib" debug : : ; -- cgit v1.2.3 From 51e8b5da7cd8fd1273a99dac953de1aa193e7ac9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 1 Feb 2018 17:08:39 -0800 Subject: [nlohmann-json] Update to 3.1.0 --- ports/nlohmann-json/CONTROL | 2 +- ports/nlohmann-json/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/nlohmann-json/CONTROL b/ports/nlohmann-json/CONTROL index 1666f8ebd..d32991c0d 100644 --- a/ports/nlohmann-json/CONTROL +++ b/ports/nlohmann-json/CONTROL @@ -1,3 +1,3 @@ Source: nlohmann-json -Version: 3.0.1 +Version: 3.1.0 Description: JSON for Modern C++ diff --git a/ports/nlohmann-json/portfile.cmake b/ports/nlohmann-json/portfile.cmake index d47298dd9..b186db817 100644 --- a/ports/nlohmann-json/portfile.cmake +++ b/ports/nlohmann-json/portfile.cmake @@ -1,18 +1,18 @@ include(vcpkg_common_functions) -set(SOURCE_VERSION 3.0.1) +set(SOURCE_VERSION 3.1.0) vcpkg_download_distfile(HEADER URLS "https://github.com/nlohmann/json/releases/download/v${SOURCE_VERSION}/json.hpp" FILENAME "nlohmann-json-${SOURCE_VERSION}.hpp" - SHA512 95c0f0ca2e0eddfa462e732055ac6ede208929120bbe5c5d6e1035a7263900590bfeaddcbc4e1043aaa9255906cb0f038af64abf9a8da9fc98a7dc61356e2fef + SHA512 710a92f065cc7fc873db2e08158f285390b9ac38f1b0bc6bbfd9e52597574749fe1e90b114d3d750fcc9f79d7d53530242e57135d60675b35c23d1f948ad7ef2 ) vcpkg_download_distfile(LICENSE URLS "https://github.com/nlohmann/json/raw/v${SOURCE_VERSION}/LICENSE.MIT" FILENAME "nlohmann-json-LICENSE-${SOURCE_VERSION}.txt" - SHA512 629ac4ed0128af8750ddaefb86b01e52243457020b54e3c38a1a772dbbc1598442a45ab9a0537bd47e35eafa73df0a9d1f1ebe235f339dcd2df1083219ded2d1 + SHA512 0fdb404547467f4523579acde53066badf458504d33edbb6e39df0ae145ed27d48a720189a60c225c0aab05f2aa4ce4050dcb241b56dc693f7ee9f54c8728a75 ) file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include/nlohmann RENAME json.hpp) -file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/nlohmann-json RENAME copyright) \ No newline at end of file +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/nlohmann-json RENAME copyright) -- cgit v1.2.3 From 3bb83774a53a36d67789b1ba4a309e6b8d973e53 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 2 Feb 2018 12:37:22 -0800 Subject: [highfive] Update to v1.5. Install cmake targets. Remove boost dependency as optional and does not require build sequencing. --- ports/highfive/CONTROL | 4 ++-- ports/highfive/portfile.cmake | 31 +++++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/ports/highfive/CONTROL b/ports/highfive/CONTROL index 17aa55c8f..22c7d616b 100644 --- a/ports/highfive/CONTROL +++ b/ports/highfive/CONTROL @@ -1,4 +1,4 @@ Source: highfive -Version: 1.3 +Version: 1.5 Description: HighFive is a modern C++/C++11 friendly interface for libhdf5 -Build-Depends: hdf5, boost \ No newline at end of file +Build-Depends: hdf5 diff --git a/ports/highfive/portfile.cmake b/ports/highfive/portfile.cmake index 9fea72553..72f644e0e 100644 --- a/ports/highfive/portfile.cmake +++ b/ports/highfive/portfile.cmake @@ -1,13 +1,28 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/HighFive-1.3) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/BlueBrain/HighFive/archive/v1.3.tar.gz" - FILENAME "highfive.v1.3.tar.gz" - SHA512 258efae1ef5eed45ac1cf93c21c79fab9ee3c340d49a36a4aa2b43c98df1c80db9167a40a0b6a59c4f99b7c190d41d545b53c0f2c5c59aabaffc4b2584b4390b + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO BlueBrain/HighFive + REF v1.5 + SHA512 4133ec2768f54cb3e56c32f3193d6c61ea96013dc73901c39d31ecaf10b04ea2861b0f6f5c9795985050ef72a75e2d360a4b906c9cdeb8ee49309961e15d39bf + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DHIGHFIVE_UNIT_TESTS=OFF + -DHIGHFIVE_EXAMPLES=OFF + -DUSE_BOOST=OFF + -DHIGH_FIVE_DOCUMENTATION=OFF ) -vcpkg_extract_source_archive(${ARCHIVE}) -# Copy the highfive header files -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/HighFive/CMake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + # Handle copyright file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/highfive RENAME copyright) -- cgit v1.2.3 From 99e5f4ac5090a9558dec13ad11d95024404005e1 Mon Sep 17 00:00:00 2001 From: Squareys Date: Sat, 3 Feb 2018 21:41:49 +0100 Subject: [vcpkg] Add cmake variable containing all features in the package Signed-off-by: Squareys --- toolsrc/src/vcpkg/build.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index db1360ba0..295bd240e 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -290,6 +290,7 @@ namespace vcpkg::Build const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); std::string features; + std::string all_features; if (GlobalState::feature_packages) { for (auto&& feature : config.feature_list) @@ -300,6 +301,10 @@ namespace vcpkg::Build { features.pop_back(); } + for (auto& feature : config.scf.feature_paragraphs) + { + all_features.append(feature->name + ";"); + } } const Toolset& toolset = paths.get_toolset(pre_build_info); @@ -317,6 +322,7 @@ namespace vcpkg::Build {"_VCPKG_NO_DOWNLOADS", !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, {"GIT", git_exe_path}, {"FEATURES", features}, + {"ALL_FEATURES", all_features}, }); const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); -- cgit v1.2.3 From 0ef1bbb38cf187064e55bcab50de5012e502b3af Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 3 Feb 2018 21:24:30 -0800 Subject: [vcpkg] Fix crash when trying to enumerate nonexistent directory. --- toolsrc/src/vcpkg/base/files.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 8c9e137ed..060a14da3 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -74,6 +74,7 @@ namespace vcpkg::Files std::error_code ec; fs::stdfs::recursive_directory_iterator b(dir, ec), e{}; + if (ec) return ret; for (; b != e; ++b) { ret.push_back(b->path()); @@ -86,7 +87,9 @@ namespace vcpkg::Files { std::vector ret; - fs::stdfs::directory_iterator b(dir), e{}; + std::error_code ec; + fs::stdfs::directory_iterator b(dir, ec), e{}; + if (ec) return ret; for (; b != e; ++b) { ret.push_back(b->path()); -- cgit v1.2.3 From 7edd3c70164e7b0c841a2eca2e3a37203c911db5 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Mon, 5 Feb 2018 12:21:02 +0900 Subject: Add libgta Libgta is a portable library that implements the Generic Tagged Array (GTA) file format. Signed-off-by: Hiroshi Miura --- ports/libgta/CONTROL | 3 +++ ports/libgta/portfile.cmake | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ports/libgta/CONTROL create mode 100644 ports/libgta/portfile.cmake diff --git a/ports/libgta/CONTROL b/ports/libgta/CONTROL new file mode 100644 index 000000000..9d2caffd1 --- /dev/null +++ b/ports/libgta/CONTROL @@ -0,0 +1,3 @@ +Source: libgta +Version: 1.0.8 +Description: Libgta is a portable library that implements the Generic Tagged Array (GTA) file format. diff --git a/ports/libgta/portfile.cmake b/ports/libgta/portfile.cmake new file mode 100644 index 000000000..02190242c --- /dev/null +++ b/ports/libgta/portfile.cmake @@ -0,0 +1,32 @@ + +include(vcpkg_common_functions) + +set(LIBGTA_VERSION 1.0.8) +set(LIBGTA_HASH 99ec3d6317c9a12cf440a60bb989cc7a3fe35e0a1da3e65206e5cd52b69fb860850e61ea0f819511ef48ddc87c468c0ded710409990627096738886e1b358423) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libgta-${LIBGTA_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.savannah.nongnu.org/releases/gta/libgta-1.0.8.tar.xz" + FILENAME "libgta-${LIBGTA_VERSION}.tar.xz" + SHA512 ${LIBGTA_HASH}) + +vcpkg_extract_source_archive(${ARCHIVE}) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED_LIBS) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DGTA_BUILD_SHARED_LIBS=${ENABLE_SHARED_LIBS} + -DGTA_BUILD_STATIC_LIBS=${ENABLE_STATIC_LIBS} +) + +vcpkg_build_cmake() +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgta) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libgta/COPYING ${CURRENT_PACKAGES_DIR}/share/libgta/copyright) -- cgit v1.2.3 From 71996679fad4b679f717118c58098871b31dcde5 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Mon, 5 Feb 2018 12:43:50 +0900 Subject: [libgta] turn off document build and doxygen dependency Signed-off-by: Hiroshi Miura --- ports/libgta/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/libgta/portfile.cmake b/ports/libgta/portfile.cmake index 02190242c..5cc3f3e98 100644 --- a/ports/libgta/portfile.cmake +++ b/ports/libgta/portfile.cmake @@ -20,6 +20,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DGTA_BUILD_SHARED_LIBS=${ENABLE_SHARED_LIBS} -DGTA_BUILD_STATIC_LIBS=${ENABLE_STATIC_LIBS} + -DGTA_BUILD_DOCUMENTATION=OFF ) vcpkg_build_cmake() -- cgit v1.2.3 From 1721d868562f8384c764404b86235508f8a498df Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Mon, 5 Feb 2018 12:49:54 +0900 Subject: [libgta] add build-dependency - bzip2, zlib and liblzma Signed-off-by: Hiroshi Miura --- ports/libgta/CONTROL | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/libgta/CONTROL b/ports/libgta/CONTROL index 9d2caffd1..f4c930965 100644 --- a/ports/libgta/CONTROL +++ b/ports/libgta/CONTROL @@ -1,3 +1,4 @@ Source: libgta Version: 1.0.8 Description: Libgta is a portable library that implements the Generic Tagged Array (GTA) file format. +Build-Depends: bzip2, zlib, liblzma \ No newline at end of file -- cgit v1.2.3 From 59614b1ca42a7c3dd302b085ce2a5ee5c14a81ce Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Mon, 5 Feb 2018 12:59:12 +0900 Subject: [libgta] remove dlls when static build Signed-off-by: Hiroshi Miura --- ports/libgta/portfile.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/libgta/portfile.cmake b/ports/libgta/portfile.cmake index 5cc3f3e98..abfa89201 100644 --- a/ports/libgta/portfile.cmake +++ b/ports/libgta/portfile.cmake @@ -28,6 +28,9 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin$ {CURRENT_PACKAGES_DIR}/bin) +endif() file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgta) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libgta/COPYING ${CURRENT_PACKAGES_DIR}/share/libgta/copyright) -- cgit v1.2.3 From 307a95b068249f153dfd7324096492423000a598 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Mon, 5 Feb 2018 14:05:51 +0900 Subject: Fix typo --- ports/libgta/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libgta/portfile.cmake b/ports/libgta/portfile.cmake index abfa89201..31fc64fd0 100644 --- a/ports/libgta/portfile.cmake +++ b/ports/libgta/portfile.cmake @@ -29,7 +29,7 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin$ {CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) endif() file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgta) -- cgit v1.2.3 From 669b8e0ffdc2d96729da774faa1bb1cc0baac596 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Mon, 5 Feb 2018 15:39:50 +0900 Subject: [libgta] update CONTROL add lf at end of file. --- ports/libgta/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libgta/CONTROL b/ports/libgta/CONTROL index f4c930965..2f5e817f6 100644 --- a/ports/libgta/CONTROL +++ b/ports/libgta/CONTROL @@ -1,4 +1,4 @@ Source: libgta Version: 1.0.8 Description: Libgta is a portable library that implements the Generic Tagged Array (GTA) file format. -Build-Depends: bzip2, zlib, liblzma \ No newline at end of file +Build-Depends: bzip2, zlib, liblzma -- cgit v1.2.3 From 8fde45999026e8291304747796cf945b248b63de Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 5 Feb 2018 13:28:10 -0800 Subject: [qt5-base] Use system freetype. --- ports/qt5-base/CONTROL | 2 +- ports/qt5-base/fix-system-freetype.patch | 13 +++++++++++++ ports/qt5-base/portfile.cmake | 9 ++++++--- 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 ports/qt5-base/fix-system-freetype.patch diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index 619b9f577..1a1aec15d 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,4 +1,4 @@ Source: qt5-base -Version: 5.9.2-3 +Version: 5.9.2-4 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/fix-system-freetype.patch b/ports/qt5-base/fix-system-freetype.patch new file mode 100644 index 000000000..88211bc68 --- /dev/null +++ b/ports/qt5-base/fix-system-freetype.patch @@ -0,0 +1,13 @@ +diff --git a/src/gui/configure.json b/src/gui/configure.json +index 28c8034..4c7c0a7 100644 +--- a/src/gui/configure.json ++++ b/src/gui/configure.json +@@ -157,7 +157,7 @@ + }, + "sources": [ + { "type": "pkgConfig", "args": "freetype2" }, +- { "type": "freetype", "libs": "-lfreetype" } ++ { "libs": "-lfreetype" } + ] + }, + "fontconfig": { diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 62c1396c2..9e9d7779a 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -31,8 +31,10 @@ if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) endif() vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2.patch" + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-system-freetype.patch" ) # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings @@ -51,9 +53,9 @@ configure_qt( -system-harfbuzz -system-doubleconversion -system-sqlite + -no-fontconfig -sql-sqlite -sql-psql - -feature-freetype -nomake examples -nomake tests -opengl desktop # other options are "-no-opengl" and "-opengl angle" -mp @@ -61,6 +63,7 @@ configure_qt( OPTIONS_RELEASE ZLIB_LIBS="-lzlib" LIBPNG_LIBS="-llibpng16" + FREETYPE_LIBS="-lfreetype" OPTIONS_DEBUG ZLIB_LIBS="-lzlibd" LIBPNG_LIBS="-llibpng16d" -- cgit v1.2.3 From 8d4d3087143b068b745746699407e67bfbae993e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 5 Feb 2018 17:45:10 -0800 Subject: [opencv] Fix UWP and ARM --- ports/opencv/CONTROL | 2 +- ports/opencv/filesystem-uwp.patch | 41 +++++++++++++++++++++++++++++++++++++++ ports/opencv/portfile.cmake | 16 +++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 ports/opencv/filesystem-uwp.patch diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index e71ad109d..13a24f0b4 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.4.0 +Version: 3.4.0-1 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library diff --git a/ports/opencv/filesystem-uwp.patch b/ports/opencv/filesystem-uwp.patch new file mode 100644 index 000000000..c4ddb6b78 --- /dev/null +++ b/ports/opencv/filesystem-uwp.patch @@ -0,0 +1,41 @@ +diff --git a/modules/core/src/utils/filesystem.cpp b/modules/core/src/utils/filesystem.cpp +index 266a92f..1d5a302 100644 +--- a/modules/core/src/utils/filesystem.cpp ++++ b/modules/core/src/utils/filesystem.cpp +@@ -186,7 +186,7 @@ bool createDirectory(const cv::String& path) + wchar_t wpath[MAX_PATH]; + size_t copied = mbstowcs(wpath, path.c_str(), MAX_PATH); + CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1)); +- int result = CreateDirectoryA(wpath, NULL) ? 0 : -1; ++ int result = CreateDirectoryW(wpath, NULL) ? 0 : -1; + #else + int result = _mkdir(path.c_str()); + #endif +@@ -248,8 +248,16 @@ struct FileLock::Impl + int numRetries = 5; + do + { ++#ifdef WINRT ++ wchar_t wpath[MAX_PATH]; ++ size_t copied = mbstowcs(wpath, fname, MAX_PATH); ++ CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1)); ++ handle = ::CreateFile2(wpath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, ++ OPEN_EXISTING, NULL); ++#else + handle = ::CreateFileA(fname, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); ++#endif + if (INVALID_HANDLE_VALUE == handle) + { + if (ERROR_SHARING_VIOLATION == GetLastError()) +@@ -399,7 +407,9 @@ cv::String getCacheDirectory(const char* sub_directory_name, const char* configu + if (cache_path.empty()) + { + cv::String default_cache_path; +-#ifdef _WIN32 ++#if WINRT ++ // no defaults ++#elif defined _WIN32 + char tmp_path_buf[MAX_PATH+1] = {0}; + DWORD res = GetTempPath(MAX_PATH, tmp_path_buf); + if (res > 0 && res <= MAX_PATH) diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index a91020f24..10bea9db2 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -68,6 +68,15 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(WITH_MSMF OFF) endif() +set(BUILD_opencv_line_descriptor ON) +set(BUILD_opencv_saliency ON) +set(BUILD_opencv_bgsegm ON) +if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") + set(BUILD_opencv_line_descriptor OFF) + set(BUILD_opencv_saliency OFF) + set(BUILD_opencv_bgsegm OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -94,6 +103,9 @@ vcpkg_configure_cmake( -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_opencv_sfm=${BUILD_opencv_sfm} + -DBUILD_opencv_line_descriptor=${BUILD_opencv_line_descriptor} + -DBUILD_opencv_saliency=${BUILD_opencv_saliency} + -DBUILD_opencv_bgsegm=${BUILD_opencv_bgsegm} # CMAKE -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON # ENABLE @@ -137,6 +149,10 @@ else() endif() if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(OpenCV_ARCH x64) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(OpenCV_ARCH ARM) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(OpenCV_ARCH ARM64) else() set(OpenCV_ARCH x86) endif() -- cgit v1.2.3 From d385e296a6929bcf7e86eda925376e0cabce6fd4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 5 Feb 2018 17:50:16 -0800 Subject: [hdf5] Always use config mode for HDF5 --- scripts/buildsystems/vcpkg.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 8ee21d411..76d77a0b5 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -223,6 +223,8 @@ macro(find_package name) add_library(tinyxml2 INTERFACE IMPORTED) set_target_properties(tinyxml2 PROPERTIES INTERFACE_LINK_LIBRARIES "tinyxml2_static") endif() + elseif("${name}" STREQUAL "HDF5") + _find_package(${ARGV} CONFIG) else() _find_package(${ARGV}) endif() -- cgit v1.2.3 From efedd6f299e07f2ddb49e3e2af6040431febf8dc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 5 Feb 2018 18:03:41 -0800 Subject: [opencv] Fixup -- apply patch added in previous commit --- ports/opencv/CONTROL | 2 +- ports/opencv/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 13a24f0b4..11f1e8c69 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,5 +1,5 @@ Source: opencv -Version: 3.4.0-1 +Version: 3.4.0-2 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 10bea9db2..d9d9d7344 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -15,6 +15,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/002-fix-uwp.patch" "${CMAKE_CURRENT_LIST_DIR}/no-double-expand-enable-pylint.patch" "${CMAKE_CURRENT_LIST_DIR}/msvs-fix-2017-u5.patch" + "${CMAKE_CURRENT_LIST_DIR}/filesystem-uwp.patch" ) file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libpng ${SOURCE_PATH}/3rdparty/zlib ${SOURCE_PATH}/3rdparty/libtiff) -- cgit v1.2.3 From 3eee61838a0275dbbd0d47835f710a19c7f85572 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 5 Feb 2018 18:08:10 -0800 Subject: [abseil] Add *.inc files. Fixes #2718 --- ports/abseil/CMakeLists.txt | 2 +- ports/abseil/CONTROL | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/abseil/CMakeLists.txt b/ports/abseil/CMakeLists.txt index de9ce8c52..c30f75e32 100644 --- a/ports/abseil/CMakeLists.txt +++ b/ports/abseil/CMakeLists.txt @@ -15,7 +15,7 @@ endif() function(add_sublibrary LIB) file(GLOB_RECURSE SOURCES "absl/${LIB}/*.cc") list(FILTER SOURCES EXCLUDE REGEX "_test(ing)?(_.+)?.cc$|_nonprod.cc$") - file(GLOB HEADERS "absl/${LIB}/*.h") + file(GLOB HEADERS "absl/${LIB}/*.h" "absl/${LIB}/*.inc") file(GLOB INTERNAL_HEADERS "absl/${LIB}/internal/*.h") if(SOURCES) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index 2e0345619..4fb0dea0c 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2017-11-10 +Version: 2017-11-10-1 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. -- cgit v1.2.3 From 7d969169956190b0e201d9e3d42d14e30eb46a63 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 5 Feb 2018 18:10:32 -0800 Subject: [abseil] Update to 2018-2-5 --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index 4fb0dea0c..c9a74b207 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2017-11-10-1 +Version: 2018-2-5 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 639983fc0..86effcfc5 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 778abb7c279547afe7a4642063712f13a80b8eea - SHA512 55268321429ac5dfc432fd60e71cfac5abbc4b7145bc16bfaaff9dd05af4a3a8cb92e95906f6ebcd493f71e2fd892ddc8923011ad15fbd37ed423b70200c8538 + REF bf7fc9986e20f664958fc227547fd8d2fdcf863e + SHA512 c80a1f850d40e2470db50dd0904730e615378fd1530e1bfef0908ec7ef7bf06ff7e1c6bbb1fe9aeb71e0f2df3fc2b7c516261d0521ff2822fd7f962a287b5718 HEAD_REF master ) -- cgit v1.2.3 From f136732dcd308037d6adee7bfb404e1154f78369 Mon Sep 17 00:00:00 2001 From: Neil McNeight Date: Tue, 6 Feb 2018 15:26:06 -0600 Subject: Fix for Issue #2729 Allows PowerShell to change the name of the downloaded directory correctly. --- scripts/VcpkgPowershellUtils.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 722d337ca..4aaad3479 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -160,7 +160,7 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, } else { - Move-Item -Path $destinationPartial -Destination $output + Move-Item -Path "$destinationPartial" -Destination $output } } @@ -220,4 +220,4 @@ function vcpkgFormatElapsedTime([TimeSpan]$ts) } throw $ts -} \ No newline at end of file +} -- cgit v1.2.3 From c9d434dfbc985be918295cabe7b37fae7732b9c8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 1 Feb 2018 17:36:59 -0800 Subject: vcpkgRemoveItem: nullcheck --- scripts/VcpkgPowershellUtils.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 4aaad3479..07270dd22 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -27,6 +27,11 @@ function vcpkgCreateParentDirectoryIfNotExists([Parameter(Mandatory=$true)][stri function vcpkgRemoveItem([Parameter(Mandatory=$true)][string]$dirPath) { + if ([string]::IsNullOrEmpty($dirPath)) + { + return + } + if (Test-Path $dirPath) { Remove-Item $dirPath -Recurse -Force -- cgit v1.2.3 From 3d0ace31e359cc7ceaf1391da05ecbdc3d611f2c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Feb 2018 15:45:13 -0800 Subject: [cpprestsdk] Update to 2.10.2 --- ports/cpprestsdk/CONTROL | 2 +- ports/cpprestsdk/portfile.cmake | 9 ++------- ports/cpprestsdk/undef-minmax.patch | 14 -------------- 3 files changed, 3 insertions(+), 22 deletions(-) delete mode 100644 ports/cpprestsdk/undef-minmax.patch diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index 5dcd880f0..663781d40 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,5 @@ Source: cpprestsdk -Version: 2.10.1-1 +Version: 2.10.2 Build-Depends: zlib, openssl (windows), boost-system (windows), boost-date-time (windows), boost-regex (windows), websocketpp (windows) Description: C++11 JSON, REST, and OAuth library The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index ca22f2a5c..46686bb0a 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.1 - SHA512 f6a93e5e87e27db724ccc028326b1dce243617cb0ae0d101b2cea700c4f264c073cb0e8a9d88a14be165e16ef2f1f43a17e49278087bc8cf372e623a1b6a9c47 + REF v2.10.2 + SHA512 267a928f770a668874f9b7e381e8977ffa3478c9292df4ed93d4235d20f0e89b1bfe4cfc82945d3f28fe2746a4fe6089009c4839dac5db130494bb3a395dd198 HEAD_REF master ) @@ -16,11 +16,6 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -DWEBSOCKETPP_CONFIG_VERSION=${WEBSOCKETPP_PATH}) endif() -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/undef-minmax.patch" -) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/Release PREFER_NINJA diff --git a/ports/cpprestsdk/undef-minmax.patch b/ports/cpprestsdk/undef-minmax.patch deleted file mode 100644 index 4dc3bc019..000000000 --- a/ports/cpprestsdk/undef-minmax.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/Release/src/http/client/http_client_winrt.cpp b/Release/src/http/client/http_client_winrt.cpp -index 697f48a..4ada65a 100644 ---- a/Release/src/http/client/http_client_winrt.cpp -+++ b/Release/src/http/client/http_client_winrt.cpp -@@ -28,6 +28,9 @@ using namespace std; - using namespace Platform; - using namespace Microsoft::WRL; - -+#undef min -+#undef max -+ - namespace web - { - namespace http -- cgit v1.2.3 From 03037c40f79bb8ee2d4d6d9bfa46da30c221876a Mon Sep 17 00:00:00 2001 From: Ivan Popivanov Date: Tue, 6 Feb 2018 16:53:15 -0800 Subject: Adding Torch's TH library (#2737) Adding Torch's TH library --- ports/torch-th/CONTROL | 3 +++ ports/torch-th/debug.patch | 52 +++++++++++++++++++++++++++++++++++++++++++ ports/torch-th/portfile.cmake | 29 ++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 ports/torch-th/CONTROL create mode 100644 ports/torch-th/debug.patch create mode 100644 ports/torch-th/portfile.cmake diff --git a/ports/torch-th/CONTROL b/ports/torch-th/CONTROL new file mode 100644 index 000000000..1ff2e2ff4 --- /dev/null +++ b/ports/torch-th/CONTROL @@ -0,0 +1,3 @@ +Source: torch-th +Version: 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-1 +Description: Torch's TH library diff --git a/ports/torch-th/debug.patch b/ports/torch-th/debug.patch new file mode 100644 index 000000000..2a15e84d0 --- /dev/null +++ b/ports/torch-th/debug.patch @@ -0,0 +1,52 @@ +diff --git a/lib/TH/CMakeLists.txt b/lib/TH/CMakeLists.txt +index 803dfe1..7db876b 100644 +--- a/lib/TH/CMakeLists.txt ++++ b/lib/TH/CMakeLists.txt +@@ -221,7 +221,13 @@ ENDIF(C_AVX2_FOUND OR C_AVX_FOUND OR C_SSE4_2_FOUND OR C_SSE4_1_FOUND) + IF(C_SSE4_1_FOUND AND C_SSE4_2_FOUND) + SET(CMAKE_C_FLAGS "${C_SSE4_1_FLAGS} -DUSE_SSE4_1 ${C_SSE4_2_FLAGS} -DUSE_SSE4_2 ${CMAKE_C_FLAGS}") + IF(MSVC) +- SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "/Ox /fp:fast") ++ IF(CMAKE_BUILD_TYPE STREQUAL Release) ++ SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "/Ox /fp:fast") ++ MESSAGE(STATUS "Release mode. Found SSE4_1 and SSE4_2.") ++ ELSE() ++ SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "/fp:fast") ++ MESSAGE(STATUS "Non-release mode. Found SSE4_1 and SSE4_2.") ++ ENDIF() + ELSE(MSVC) + SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "-O3 -ffast-math") + ENDIF(MSVC) +@@ -231,8 +237,15 @@ ENDIF(C_SSE4_1_FOUND AND C_SSE4_2_FOUND) + # IF AVX FOUND + IF(C_AVX_FOUND) + IF(MSVC) +- SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_avx.c PROPERTIES COMPILE_FLAGS "/Ox /fp:fast ${C_AVX_FLAGS}") +- SET_SOURCE_FILES_PROPERTIES(vector/AVX.c PROPERTIES COMPILE_FLAGS "/Ox /arch:AVX ${C_AVX_FLAGS}") ++ IF(CMAKE_BUILD_TYPE STREQUAL Release) ++ SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_avx.c PROPERTIES COMPILE_FLAGS "/Ox /fp:fast ${C_AVX_FLAGS}") ++ SET_SOURCE_FILES_PROPERTIES(vector/AVX.c PROPERTIES COMPILE_FLAGS "/Ox /arch:AVX ${C_AVX_FLAGS}") ++ MESSAGE(STATUS "Release mode. Found AVX.") ++ ELSE() ++ SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_avx.c PROPERTIES COMPILE_FLAGS "/fp:fast ${C_AVX_FLAGS}") ++ SET_SOURCE_FILES_PROPERTIES(vector/AVX.c PROPERTIES COMPILE_FLAGS "/arch:AVX ${C_AVX_FLAGS}") ++ MESSAGE(STATUS "Non-release mode. Found AVX.") ++ ENDIF() + ELSE(MSVC) + SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_avx.c PROPERTIES COMPILE_FLAGS "-O3 -ffast-math ${C_AVX_FLAGS}") + SET_SOURCE_FILES_PROPERTIES(vector/AVX.c PROPERTIES COMPILE_FLAGS "-O3 ${C_AVX_FLAGS}") +@@ -242,7 +255,13 @@ ENDIF(C_AVX_FOUND) + + IF(C_AVX2_FOUND) + IF(MSVC) +- SET_SOURCE_FILES_PROPERTIES(vector/AVX2.c PROPERTIES COMPILE_FLAGS "/Ox /arch:AVX2 ${C_AVX2_FLAGS}") ++ IF(CMAKE_BUILD_TYPE STREQUAL Release) ++ SET_SOURCE_FILES_PROPERTIES(vector/AVX2.c PROPERTIES COMPILE_FLAGS "/Ox /arch:AVX2 ${C_AVX2_FLAGS}") ++ MESSAGE(STATUS "Release mode. Found AVX2.") ++ ELSE() ++ SET_SOURCE_FILES_PROPERTIES(vector/AVX2.c PROPERTIES COMPILE_FLAGS "/arch:AVX2 ${C_AVX2_FLAGS}") ++ MESSAGE(STATUS "Non-release mode. Found AVX2.") ++ ENDIF() + ELSE(MSVC) + SET_SOURCE_FILES_PROPERTIES(vector/AVX2.c PROPERTIES COMPILE_FLAGS "-O3 ${C_AVX2_FLAGS}") + ENDIF(MSVC) diff --git a/ports/torch-th/portfile.cmake b/ports/torch-th/portfile.cmake new file mode 100644 index 000000000..7dca19ca6 --- /dev/null +++ b/ports/torch-th/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO torch/torch7 + REF 89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8 + SHA512 0b28762768129f5e59e24d505e271418bb4513db0e99acb293f01095949700711116463b299fe42d65ca07c1f0a9f6d0d1d72e21275a2825a4a9fb0197525e72 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/debug.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/lib/TH + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DWITH_OPENMP=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/torch-th RENAME copyright) -- cgit v1.2.3 From 2d324592a4ac01086191c5137efe6eead3c3c65c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Feb 2018 17:11:27 -0800 Subject: [flatbuffers] Fixes #2735 --- ports/flatbuffers/CONTROL | 2 +- ports/flatbuffers/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/flatbuffers/CONTROL b/ports/flatbuffers/CONTROL index b941c1188..508530153 100644 --- a/ports/flatbuffers/CONTROL +++ b/ports/flatbuffers/CONTROL @@ -1,4 +1,4 @@ Source: flatbuffers -Version: 1.8.0-1 +Version: 1.8.0-2 Description: Memory Efficient Serialization Library http://google.github.io/flatbuffers/ 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. diff --git a/ports/flatbuffers/portfile.cmake b/ports/flatbuffers/portfile.cmake index 7ddcee23d..8ac585946 100644 --- a/ports/flatbuffers/portfile.cmake +++ b/ports/flatbuffers/portfile.cmake @@ -39,7 +39,7 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) endif() if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/flatc.exe) - make_directory(${CURRENT_PACKAGES_DIR}/tools) + make_directory(${CURRENT_PACKAGES_DIR}/tools/flatbuffers) file(RENAME ${CURRENT_PACKAGES_DIR}/bin/flatc.exe ${CURRENT_PACKAGES_DIR}/tools/flatbuffers/flatc.exe) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) endif() -- cgit v1.2.3 From a955024aa1f9dd038cd014ed246f3def3d2d9613 Mon Sep 17 00:00:00 2001 From: eao197 Date: Wed, 7 Feb 2018 21:01:59 +0300 Subject: sobjectizer updated to v.5.5.21 --- ports/sobjectizer/CONTROL | 2 +- ports/sobjectizer/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL index 5c90ce3f1..7843e5622 100644 --- a/ports/sobjectizer/CONTROL +++ b/ports/sobjectizer/CONTROL @@ -1,3 +1,3 @@ Source: sobjectizer -Version: 5.5.20 +Version: 5.5.21 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 e61b2a466..b03b55b24 100644 --- a/ports/sobjectizer/portfile.cmake +++ b/ports/sobjectizer/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(VERSION 5.5.20) +set(VERSION 5.5.21) 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 ec62f358b363ee35c9baba4871612c906d9b57624a8a86e57c59cfe8bfd209554f70fee1d3caf815a475b6833238f8d2ec9ebc210acc978423b31b3ebf27b868 + SHA512 eaee9e27b751307a540df34ca368f5253e191b3079c1222737d4ccc1800006d35ad8411cec0aec862a7ee00d7cc3c1e4494434d4aef7adb89655e99b5d4caf41 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From b4676f2dd583a2399b195cc6d49bd77d01bd8878 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Feb 2018 12:12:14 -0800 Subject: [nghttp2] Enable static builds --- ports/nghttp2/CONTROL | 2 +- ports/nghttp2/enable-static.patch | 23 +++++++++++++++++++++++ ports/nghttp2/portfile.cmake | 17 ++++++++--------- 3 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 ports/nghttp2/enable-static.patch diff --git a/ports/nghttp2/CONTROL b/ports/nghttp2/CONTROL index beb237aad..448f6cc89 100644 --- a/ports/nghttp2/CONTROL +++ b/ports/nghttp2/CONTROL @@ -1,3 +1,3 @@ Source: nghttp2 -Version: 1.29.0 +Version: 1.29.0-1 Description: Implementation of the Hypertext Transfer Protocol version 2 in C diff --git a/ports/nghttp2/enable-static.patch b/ports/nghttp2/enable-static.patch new file mode 100644 index 000000000..3b58979cf --- /dev/null +++ b/ports/nghttp2/enable-static.patch @@ -0,0 +1,23 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 0846d06..290679f 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -38,7 +38,7 @@ if(WIN32) + endif() + + # Public shared library +-add_library(nghttp2 SHARED ${NGHTTP2_SOURCES} ${NGHTTP2_RES}) ++add_library(nghttp2 ${NGHTTP2_SOURCES} ${NGHTTP2_RES}) + set_target_properties(nghttp2 PROPERTIES + COMPILE_FLAGS "${WARNCFLAGS}" + VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION} +@@ -48,6 +48,9 @@ target_include_directories(nghttp2 INTERFACE + "${CMAKE_CURRENT_BINARY_DIR}/includes" + "${CMAKE_CURRENT_SOURCE_DIR}/includes" + ) ++if(NOT BUILD_SHARED_LIBS) ++ target_compile_definitions(nghttp2 PUBLIC "-DNGHTTP2_STATICLIB") ++endif() + + if(HAVE_CUNIT) + # Static library (for unittests because of symbol visibility) diff --git a/ports/nghttp2/portfile.cmake b/ports/nghttp2/portfile.cmake index 02133feeb..6850a70d6 100644 --- a/ports/nghttp2/portfile.cmake +++ b/ports/nghttp2/portfile.cmake @@ -3,14 +3,6 @@ include(vcpkg_common_functions) set(LIB_NAME nghttp2) set(LIB_VERSION 1.29.0) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - message("nghttp2 doesn't currently support static library build") - set(VCPKG_LIBRARY_LINKAGE dynamic) - if(VCPKG_CRT_LINKAGE STREQUAL static) - message(FATAL_ERROR "avoiding building DLL with static CRT.") - endif() -endif() - set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) @@ -21,8 +13,15 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/enable-static.patch" +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DENABLE_LIB_ONLY=ON -DENABLE_ASIO_LIB=OFF @@ -37,7 +36,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) # Move dll files from /lib to /bin where vcpkg expects them -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/${LIB_NAME}.dll ${CURRENT_PACKAGES_DIR}/bin/${LIB_NAME}.dll) -- cgit v1.2.3 From 0306f823763074cd5e4c0853f8c955e886bee20e Mon Sep 17 00:00:00 2001 From: "Force.Charlie-I" Date: Thu, 8 Feb 2018 04:17:25 +0800 Subject: [nghttp2]: update to 1.30.0 (#2739) * [nghttp2]: update to 1.30.0 * [nghttp2] Enable static builds --- ports/nghttp2/CONTROL | 2 +- ports/nghttp2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/nghttp2/CONTROL b/ports/nghttp2/CONTROL index 448f6cc89..f4ff49ae0 100644 --- a/ports/nghttp2/CONTROL +++ b/ports/nghttp2/CONTROL @@ -1,3 +1,3 @@ Source: nghttp2 -Version: 1.29.0-1 +Version: 1.30.0-1 Description: Implementation of the Hypertext Transfer Protocol version 2 in C diff --git a/ports/nghttp2/portfile.cmake b/ports/nghttp2/portfile.cmake index 6850a70d6..3c082c191 100644 --- a/ports/nghttp2/portfile.cmake +++ b/ports/nghttp2/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) set(LIB_NAME nghttp2) -set(LIB_VERSION 1.29.0) +set(LIB_VERSION 1.30.0) set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) @@ -9,7 +9,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/nghttp2/nghttp2/releases/download/v${LIB_VERSION}/${LIB_FILENAME}" FILENAME "${LIB_FILENAME}" - SHA512 34dfda7ba637fb23b24141aacf8a0c342a369a59c84d4e2bfed9b5a867f85a5d1d950267f018a820645954406d70bf499f01e2f9b1ebaa4b76e8f47c3693fd6e + SHA512 26ce717a085e9fbdf8e644d4c8ab6961ca60029c4dfa112c9932523d1c4cc3f40fda4283afddf78a649e7f6fb7d3f3bfce3197186a4f70819b5996e8158089da ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 5983ba633ff23eb801a424689cb1fa19102f5b92 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Mon, 5 Feb 2018 21:15:49 +0900 Subject: Add epsilon library port Signed-off-by: Hiroshi Miura --- ports/epsilon/0001-VS2015-provides-snprintf.patch | 51 +++++++++++ ...-for-CRT-selection-and-warning-supression.patch | 81 ++++++++++++++++++ ports/epsilon/CONTROL | 3 + ports/epsilon/portfile.cmake | 99 ++++++++++++++++++++++ 4 files changed, 234 insertions(+) create mode 100644 ports/epsilon/0001-VS2015-provides-snprintf.patch create mode 100644 ports/epsilon/0002-Add-CFLAGS-for-CRT-selection-and-warning-supression.patch create mode 100644 ports/epsilon/CONTROL create mode 100644 ports/epsilon/portfile.cmake diff --git a/ports/epsilon/0001-VS2015-provides-snprintf.patch b/ports/epsilon/0001-VS2015-provides-snprintf.patch new file mode 100644 index 000000000..0fc664f60 --- /dev/null +++ b/ports/epsilon/0001-VS2015-provides-snprintf.patch @@ -0,0 +1,51 @@ +From 8b5b2ea5ba695252abaad4234c951675d5f733ec Mon Sep 17 00:00:00 2001 +From: Hiroshi Miura +Date: Wed, 7 Feb 2018 12:28:54 +0900 +Subject: [PATCH 1/2] VS2015 provides snprintf + +Signed-off-by: Hiroshi Miura +--- + lib/common.h | 27 +++++++++++++++++++++++---- + 1 file changed, 23 insertions(+), 4 deletions(-) + +diff --git a/lib/common.h b/lib/common.h +index c5db1ed..73c4118 100644 +--- a/lib/common.h ++++ b/lib/common.h +@@ -39,10 +39,29 @@ extern "C" { + /** \addtogroup misc Miscellanea */ + /*@{*/ + +-/* Use _snprintf instead of snprintf under MSVC compiler */ +-#if defined(_WIN32) && !defined(__MINGW32__) +-#define snprintf _snprintf +-#endif ++#ifdef _MSC_VER ++#if _MSC_VER < 1900 // VS2015/17 provides snprintf ++#include ++#include ++/* Want safe, 'n += snprintf(b + n ...)' like function. If cp_max_len is 1 ++* then assume cp is pointing to a null char and do nothing. Returns number ++* number of chars placed in cp excluding the trailing null char. So for ++* cp_max_len > 0 the return value is always < cp_max_len; for cp_max_len ++* <= 0 the return value is 0 (and no chars are written to cp). */ ++static int snprintf(char * cp, int cp_max_len, const char * fmt, ...) ++{ ++ va_list args; ++ int n; ++ ++ if (cp_max_len < 2) ++ return 0; ++ va_start(args, fmt); ++ n = vsnprintf(cp, cp_max_len, fmt, args); ++ va_end(args); ++ return (n < cp_max_len) ? n : (cp_max_len - 1); ++} ++#endif // _MSC_VER < 1900 ++#endif // _MSC_VER + + #ifdef HAVE_CONFIG_H + # include +-- +2.16.1 + diff --git a/ports/epsilon/0002-Add-CFLAGS-for-CRT-selection-and-warning-supression.patch b/ports/epsilon/0002-Add-CFLAGS-for-CRT-selection-and-warning-supression.patch new file mode 100644 index 000000000..f76aed10b --- /dev/null +++ b/ports/epsilon/0002-Add-CFLAGS-for-CRT-selection-and-warning-supression.patch @@ -0,0 +1,81 @@ +From 4969dd6e7b656e92bf1bc921f0cd1af00707e17f Mon Sep 17 00:00:00 2001 +From: Hiroshi Miura +Date: Wed, 7 Feb 2018 10:47:53 +0900 +Subject: [PATCH 2/2] Add CFLAGS for CRT selection and warning supression + +Signed-off-by: Hiroshi Miura +--- + makefile.vc | 2 +- + nmake.opt | 42 +++++++++++++++++++++++++++++++++++++++--- + 2 files changed, 40 insertions(+), 4 deletions(-) + +diff --git a/makefile.vc b/makefile.vc +index 33f1f34..64fb9f3 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -20,7 +20,7 @@ EPSILON_EXE = epsilon.exe + +-CFLAGS = /nologo -IC:\OSGeo4W\include -I.\lib -I.\lib\msvc \ ++CFLAGS = /nologo -I$(INSTALLED_ROOT)\include -I.\lib -I.\lib\msvc \ + -I.\src -I..\popt\include \ +- $(OPTFLAGS) ++ $(OPTFLAGS) $(WARNFLAGS) + + default: all + +diff --git a/nmake.opt b/nmake.opt +index d5a51e2..d8088df 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -1,9 +1,45 @@ + # Directory tree where EPSILON will be installed. ++!IFNDEF INSTDIR + INSTDIR=C:\OSGeo4W ++!ENDIF ++ ++# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) ++!IFNDEF CRT_FLAGS ++!IFNDEF DEBUG ++CRT_FLAGS=/MD ++!ELSE ++CRT_FLAGS=/MDd ++!ENDIF ++!ENDIF ++ ++# Flags for enforcing PDB use ++!IFNDEF PDB_FLAGS ++PDB_FLAGS=/Fdepsilon.pdb ++!ENDIF ++ ++# Set flags controlling warnings level, and suppression of some warnings. ++!IFNDEF WARNFLAGS ++# 4127: conditional expression is constant ++# 4251: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' ++# 4275: non – DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' ++# 4786: ?????????? ++# 4100: 'identifier' : unreferenced formal parameter ++# 4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch ++# 4206: nonstandard extension used : translation unit is empty (only applies to C source code) ++# 4351: new behavior: elements of array 'array' will be default initialized (needed for https://trac.osgeo.org/gdal/changeset/35593) ++# 4611: interaction between '_setjmp' and C++ object destruction is non-portable ++# ++WARNFLAGS = /W3 /wd4127 /wd4251 /wd4275 /wd4786 /wd4100 /wd4245 /wd4206 /wd4351 /wd4611 ++!ENDIF ++ ++!IFNDEF OPTFLAGS ++!IFNDEF DEBUG ++OPTFLAGS= $(PDB_FLAGS) /nologo $(CRT_FLAGS) /D_CRT_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG ++!ELSE ++OPTFLAGS= $(PDB_FLAGS) /nologo $(CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG ++!ENDIF ++!ENDIF + +-# Uncomment the first for an optimized build, or the second for debug. +-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS +-#OPTFLAGS= /nologo /Zi /MD /Fdepsilon.pdb + + # Set the version number for the DLL. Normally we leave this blank since + # we want software that is dynamically loading the DLL to have no problem +-- +2.16.1 + diff --git a/ports/epsilon/CONTROL b/ports/epsilon/CONTROL new file mode 100644 index 000000000..94f9e1db8 --- /dev/null +++ b/ports/epsilon/CONTROL @@ -0,0 +1,3 @@ +Source: epsilon +Version: 0.9.2 +Description: EPSILON is an Open Source wavelet image compressor, that is aimed on parallel and robust image processing. \ No newline at end of file diff --git a/ports/epsilon/portfile.cmake b/ports/epsilon/portfile.cmake new file mode 100644 index 000000000..70aee7e1e --- /dev/null +++ b/ports/epsilon/portfile.cmake @@ -0,0 +1,99 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://downloads.sourceforge.net/project/epsilon-project/epsilon/0.9.2/epsilon-0.9.2.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fepsilon-project%2Ffiles%2Fepsilon%2F0.9.2%2Fepsilon-0.9.2.tar.gz%2Fdownload%3Fuse_mirror%3Dayera" + FILENAME "epsilon-0.9.2.tar.gz" + SHA512 95f427c68a4a4eb784f7d484d87fc573133983510f6b030663f88955e2446490a07b1343ae4668251b466f67cf9a79bd834b933c57c5ed12327f32174f20ac0f) + +# Extract source into archictecture specific directory, because GDALs' nmake based build currently does not +# support out of source builds. +set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/epsilon-0.9.2) +set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/epsilon-0.9.2) + +foreach(BUILD_TYPE debug release) + vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/epsilon-0.9.2 + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-VS2015-provides-snprintf.patch + ${CMAKE_CURRENT_LIST_DIR}/0002-Add-CFLAGS-for-CRT-selection-and-warning-supression.patch + ) +endforeach() + +find_program(NMAKE nmake REQUIRED) +if (VCPKG_CRT_LINKAGE STREQUAL static) + set(CL_FLAGS_REL "/MT /Ox /fp:precise") + set(CL_FLAGS_DBG "/MTd /Zi") + set(TARGET_LIB epsilon.lib) +else() + set(CL_FLAGS_REL "/MD /Ox /fp:precise") + set(CL_FLAGS_DBG "/MDd /Zi") + set(TARGET_LIB epsilon_i.lib) +endif() + +################ +# Release build +################ +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 + "INSTDIR=\"${INST_DIR_REL}\"" + MSVC_VER=1900 + CRT_FLAGS=${CL_FLAGS_REL} + INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} + ${TARGET_LIB} + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME nmake-build-${TARGET_TRIPLET}-release +) +message(STATUS "Building ${TARGET_TRIPLET}-rel done") + +################ +# Debug build +################ +message(STATUS "Building ${TARGET_TRIPLET}-dbg") +file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) +vcpkg_execute_required_process( + COMMAND ${NMAKE} /G -f makefile.vc + "INSTDIR=\"${INST_DIR_DBG}\"" + MSVC_VER=1900 + CRT_FLAGS=${CL_FLAGS_DBG} + DEBUG=1 + INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} + ${TARGET_LIB} + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME nmake-build-${TARGET_TRIPLET}-debug +) +message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + +message(STATUS "Packaging ${TARGET_TRIPLET}") +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/epsilon/filters) +if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${SOURCE_PATH_RELEASE}/epsilon.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin/) + file(INSTALL ${SOURCE_PATH_DEBUG}/epsilon.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) + file(INSTALL ${SOURCE_PATH_RELEASE}/epsilon_i.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(INSTALL ${SOURCE_PATH_DEBUG}/epsilon_i.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +else() + file(INSTALL ${SOURCE_PATH_RELEASE}/epsilon.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(INSTALL ${SOURCE_PATH_DEBUG}/epsilon.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +endif() +file(COPY ${SOURCE_PATH_RELEASE}/lib/epsilon.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include/) +file(GLOB FILTERS ${SOURCE_PATH_RELEASE}/filters/*.filter) +file(INSTALL ${FILTERS} + DESTINATION ${CURRENT_PACKAGES_DIR}/share/epsilon/filters/) +vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH_RELEASE}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/epsilon/ RENAME copyright) +message(STATUS "Packaging ${TARGET_TRIPLET} done") + -- cgit v1.2.3 From 71025694e9c3fe1c1843bbb8f41bfecc19d4a931 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Feb 2018 16:57:47 -0800 Subject: [vcpkg-configure-cmake] Use ninja to configure in parallel (#2712) --- scripts/cmake/vcpkg_configure_cmake.cmake | 88 +++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 22 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 6e2ec4ef5..bc1d73f07 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -198,32 +198,76 @@ function(vcpkg_configure_cmake) ) endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} - -G ${GENERATOR} - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME config-${TARGET_TRIPLET}-rel + set(rel_command + ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} + -G ${GENERATOR} + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}) + set(dbg_command + ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} + -G ${GENERATOR} + -DCMAKE_BUILD_TYPE=Debug + -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug) + + if(NINJA_CAN_BE_USED AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + + vcpkg_find_acquire_program(NINJA) + get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) + set(ENV{PATH} "$ENV{PATH};${NINJA_PATH}") + + #parallelize the configure step + set(_contents + "rule CreateProcess\n command = $process\n\n" ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + 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}\"") + endforeach() + set(_contents "${_contents}${rel_line}\"\n\n") + endif() + + 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") + endif() + + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure) + file(WRITE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure/build.ninja "${_contents}") + + message(STATUS "Configuring ${TARGET_TRIPLET}") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} - -G ${GENERATOR} - -DCMAKE_BUILD_TYPE=Debug - -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - LOGNAME config-${TARGET_TRIPLET}-dbg + COMMAND ninja -v + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure + LOGNAME config-${TARGET_TRIPLET} ) - message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + message(STATUS "Configuring ${TARGET_TRIPLET} done") + else() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + vcpkg_execute_required_process( + COMMAND ${rel_command} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + vcpkg_execute_required_process( + COMMAND ${dbg_command} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + endif() endif() set(_VCPKG_CMAKE_GENERATOR "${GENERATOR}" PARENT_SCOPE) -- cgit v1.2.3 From 676c861ae65569058014ac5367447464f1fb0877 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Feb 2018 17:02:47 -0800 Subject: [curl] Add nghttp2.lib to dependencies of curl --- scripts/buildsystems/vcpkg.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 76d77a0b5..9fbc24ad7 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -225,6 +225,15 @@ macro(find_package name) endif() elseif("${name}" STREQUAL "HDF5") _find_package(${ARGV} CONFIG) + elseif("${name}" STREQUAL "CURL") + _find_package(${ARGV}) + if(CURL_FOUND) + if(EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/nghttp2.lib") + list(APPEND CURL_LIBRARIES + "debug" "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/nghttp2.lib" + "optimized" "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/nghttp2.lib") + endif() + endif() else() _find_package(${ARGV}) endif() -- cgit v1.2.3 From 116914e110e06183eaa8626accf1403637b6b681 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Feb 2018 17:10:43 -0800 Subject: [vtk] Fix breaking change in find_package(HDF5) --- scripts/buildsystems/vcpkg.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 9fbc24ad7..0cb311555 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -223,7 +223,8 @@ macro(find_package name) add_library(tinyxml2 INTERFACE IMPORTED) set_target_properties(tinyxml2 PROPERTIES INTERFACE_LINK_LIBRARIES "tinyxml2_static") endif() - elseif("${name}" STREQUAL "HDF5") + elseif("${name}" STREQUAL "HDF5" AND NOT PROJECT_NAME STREQUAL "VTK") + # This is a hack to make VTK work. TODO: find another way to suppress the built-in find module. _find_package(${ARGV} CONFIG) elseif("${name}" STREQUAL "CURL") _find_package(${ARGV}) -- cgit v1.2.3 From 815e3caf5573d1149e1f826b359beb9039293307 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 6 Feb 2018 15:44:59 -0800 Subject: Merge findFileRecursivelyUp into VcpkgPowershellUtils --- scripts/VcpkgPowershellUtils.ps1 | 20 ++++++++++++++++++++ scripts/bootstrap.ps1 | 2 +- scripts/fetchDependency.ps1 | 2 +- scripts/findFileRecursivelyUp.ps1 | 18 ------------------ toolsrc/vcpkg.sln | 1 - 5 files changed, 22 insertions(+), 21 deletions(-) delete mode 100644 scripts/findFileRecursivelyUp.ps1 diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 07270dd22..4334df2cc 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -226,3 +226,23 @@ function vcpkgFormatElapsedTime([TimeSpan]$ts) throw $ts } + +function vcpkgFindFileRecursivelyUp() +{ + param( + [ValidateNotNullOrEmpty()] + [Parameter(Mandatory=$true)][string]$startingDir, + [ValidateNotNullOrEmpty()] + [Parameter(Mandatory=$true)][string]$filename + ) + + $currentDir = $startingDir + + while (!($currentDir -eq "") -and !(Test-Path "$currentDir\$filename")) + { + Write-Verbose "Examining $currentDir for $filename" + $currentDir = Split-path $currentDir -Parent + } + Write-Verbose "Examining $currentDir for $filename - Found" + return $currentDir +} diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 03f05d50b..0df2a2a99 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -6,7 +6,7 @@ param( $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition . "$scriptsDir\VcpkgPowershellUtils.ps1" -$vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root +$vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root Write-Verbose("vcpkg Path " + $vcpkgRootDir) diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index ad0b774d4..bfc0f733a 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -7,7 +7,7 @@ $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition . "$scriptsDir\VcpkgPowershellUtils.ps1" Write-Verbose "Fetching dependency: $Dependency" -$vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root +$vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" diff --git a/scripts/findFileRecursivelyUp.ps1 b/scripts/findFileRecursivelyUp.ps1 deleted file mode 100644 index 4b6409e8c..000000000 --- a/scripts/findFileRecursivelyUp.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -[CmdletBinding()] -param( - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory=$true)][string]$startingDir, - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory=$true)][string]$filename -) - -$ErrorActionPreference = "Stop" -$currentDir = $startingDir - -while (!($currentDir -eq "") -and !(Test-Path "$currentDir\$filename")) -{ - Write-Verbose "Examining $currentDir for $filename" - $currentDir = Split-path $currentDir -Parent -} -Write-Verbose "Examining $currentDir for $filename - Found" -return $currentDir \ No newline at end of file diff --git a/toolsrc/vcpkg.sln b/toolsrc/vcpkg.sln index c2df757fc..6c429cff9 100644 --- a/toolsrc/vcpkg.sln +++ b/toolsrc/vcpkg.sln @@ -16,7 +16,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F589 ..\scripts\bootstrap.ps1 = ..\scripts\bootstrap.ps1 ..\scripts\fetchDependency.ps1 = ..\scripts\fetchDependency.ps1 ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1 = ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1 - ..\scripts\findFileRecursivelyUp.ps1 = ..\scripts\findFileRecursivelyUp.ps1 ..\scripts\findVisualStudioInstallationInstances.ps1 = ..\scripts\findVisualStudioInstallationInstances.ps1 ..\scripts\get_triplet_environment.cmake = ..\scripts\get_triplet_environment.cmake ..\scripts\getProgramFiles32bit.ps1 = ..\scripts\getProgramFiles32bit.ps1 -- cgit v1.2.3 From 3aac3957ae9053eb3ffb97bcc49148e7b0a4c050 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Feb 2018 17:31:19 -0800 Subject: [vcpkgInvokeCommandClean] Don't use -encodedCommand. Instead, use -Command with the appropriate number of escaped quotes (which ended up being 3) --- scripts/VcpkgPowershellUtils.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 4334df2cc..bed78b198 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -190,10 +190,10 @@ function vcpkgInvokeCommandClean() Write-Verbose "Clean-Executing: ${executable} ${arguments}" $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition $cleanEnvScript = "$scriptsDir\VcpkgPowershellUtils-ClearEnvironment.ps1" - $command = "& `"$cleanEnvScript`"; & `"$executable`" $arguments" - $bytes = [System.Text.Encoding]::Unicode.GetBytes($command) - $encodedCommand = [Convert]::ToBase64String($bytes) - $arg = "-NoProfile -ExecutionPolicy Bypass -encodedCommand $encodedCommand" + $tripleQuotes = "`"`"`"" + $argumentsWithEscapedQuotes = $arguments -replace "`"", $tripleQuotes + $command = ". $tripleQuotes$cleanEnvScript$tripleQuotes; & $tripleQuotes$executable$tripleQuotes $argumentsWithEscapedQuotes" + $arg = "-NoProfile", "-ExecutionPolicy Bypass", "-command $command" $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow Wait-Process -InputObject $process -- cgit v1.2.3 From ca1e6d8ab7b4e345fdab88afd11c03bf5fcc43a3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Feb 2018 18:43:10 -0800 Subject: [blosc] Update to 1.13.5 static-install-fix.patch no longer required (upstream contains the patched version). Resolves build error with VS 15.6 in static builds --- ports/blosc/CONTROL | 2 +- ports/blosc/portfile.cmake | 10 ++-------- ports/blosc/static-install-fix.patch | 15 --------------- 3 files changed, 3 insertions(+), 24 deletions(-) delete mode 100644 ports/blosc/static-install-fix.patch diff --git a/ports/blosc/CONTROL b/ports/blosc/CONTROL index 8f072f480..d6ec941e1 100644 --- a/ports/blosc/CONTROL +++ b/ports/blosc/CONTROL @@ -1,4 +1,4 @@ Source: blosc -Version: 1.12.1 +Version: 1.13.5 Build-Depends: lz4, snappy, zlib, zstd Description: A blocking, shuffling and loss-less compression library that can be faster than `memcpy()` diff --git a/ports/blosc/portfile.cmake b/ports/blosc/portfile.cmake index 98e2b4f82..d2107b106 100644 --- a/ports/blosc/portfile.cmake +++ b/ports/blosc/portfile.cmake @@ -3,17 +3,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Blosc/c-blosc - REF v1.12.1 - SHA512 f65bbbfce6fc59d0c5a0889d5771dd78cae2796244c6ee69edf15b27c4563c28ce789fded9104a8626d12be3e46418d596dfdb204c43e33abae8dca40debfd92 + REF v1.13.5 + SHA512 3ddc83c16c91d87959179f58bd23fe8e4bbd07c17312cdfdd0bc238a743e695f2914baf0b69efd923e8e54e8455699c8e528d3966d9126e15a8897d3c529db25 HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/static-install-fix.patch -) - if (VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BLOSC_STATIC ON) set(BLOSC_SHARED OFF) diff --git a/ports/blosc/static-install-fix.patch b/ports/blosc/static-install-fix.patch deleted file mode 100644 index 3416bde57..000000000 --- a/ports/blosc/static-install-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt -index cd163f4..8cb1bdb 100644 ---- a/blosc/CMakeLists.txt -+++ b/blosc/CMakeLists.txt -@@ -211,7 +211,9 @@ endif(BUILD_STATIC) - # install - if(BLOSC_INSTALL) - install(FILES blosc.h blosc-export.h DESTINATION include COMPONENT DEV) -- install(TARGETS blosc_shared DESTINATION ${lib_dir} COMPONENT LIB) -+ if(BUILD_SHARED) -+ install(TARGETS blosc_shared DESTINATION ${lib_dir} COMPONENT LIB) -+ endif(BUILD_SHARED) - if(BUILD_STATIC) - install(TARGETS blosc_static DESTINATION ${lib_dir} COMPONENT DEV) - endif(BUILD_STATIC) -- cgit v1.2.3 From c2afc5266cb997ec97c0a2e06997cc993ace4125 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Feb 2018 19:30:21 -0800 Subject: [cgal] Avoid using absolute paths in cmake config file --- ports/cgal/CONTROL | 2 +- ports/cgal/portfile.cmake | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL index 2fc86bd11..c3ab7fb3e 100644 --- a/ports/cgal/CONTROL +++ b/ports/cgal/CONTROL @@ -1,4 +1,4 @@ Source: cgal -Version: 4.11-2 +Version: 4.11-3 Build-Depends: mpfr, mpir, zlib, qt5, boost-format, boost-container, boost-iterator, boost-variant, boost-any, boost-unordered, boost-random Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry. diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake index 642e88920..6b64d5d26 100644 --- a/ports/cgal/portfile.cmake +++ b/ports/cgal/portfile.cmake @@ -25,5 +25,10 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(READ ${CURRENT_PACKAGES_DIR}/share/cgal/CGALConfig.cmake _contents) +string(REPLACE "CGAL_IGNORE_PRECONFIGURED_GMP" "1" _contents "${_contents}") +string(REPLACE "CGAL_IGNORE_PRECONFIGURED_MPFR" "1" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/cgal/CGALConfig.cmake "${_contents}") + # Handle copyright of suitesparse and metis file(COPY ${SOURCE_PATH}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal) -- cgit v1.2.3 From d503a55412b3fa1b2b96ae0719286ee593f3d732 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 7 Feb 2018 20:38:53 -0800 Subject: Update CHANGELOG and bump version to v0.0.104 --- CHANGELOG.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++- toolsrc/VERSION.txt | 2 +- 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59da20df1..d356340c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,69 @@ +vcpkg (0.0.104) +-------------- + * Add ports: + - asmjit 673dcefaa048c5f5a2bf8b85daf8f7b9978d018a + - cccapstone 9b4128ee1153e78288a1b5433e2c06a0d47a4c4e + - crc32c 1.0.5 + - epsilon 0.9.2 + - exprtk 2018.01.01-f32d2b4 + - forest 4.5.0 + - libgta 1.0.8 + - libodb-mysql 2.4.0-1 + - libopenmpt 2017-01-28-cf2390140 + - libudis86 2018-01-28-56ff6c87 + - mujs 25821e6d74fab5fcc200fe5e818362e03e114428 + - muparser 6cf2746 + - openmama 6.2.1-a5a93a24d2f89a0def0145552c8cd4a53c69e2de + - torch-th 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-1 + - yara e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9 + * Update ports: + - abseil 2017-11-10 -> 2018-2-5 + - blosc 1.12.1 -> 1.13.5 + - boost-build 1.66.0-3 -> 1.66.0-4 + - boost-test 1.66.0-1 -> 1.66.0-2 + - catch 2.0.1-1 -> alias + - catch2 2.1.0 -> 2.1.1 + - cgal 4.11-2 -> 4.11-3 + - cpprestsdk 2.10.1-1 -> 2.10.2 + - curl 7.58.0 -> 7.58.0-1 + - dlib 19.9 -> 19.9-1 + - flatbuffers 1.8.0 -> 1.8.0-2 + - freeimage 3.17.0-3 -> 3.17.0-4 + - gflags 2.2.1 -> 2.2.1-1 + - gtest 1.8.0-5 -> 1.8.0-6 + - highfive 1.3 -> 1.5 + - jack2 1.9.12.2 -> 1.9.12 + - libspatialite 4.3.0a -> 4.3.0a-1 + - libwebp 0.6.1 -> 0.6.1-1 + - libzip 1.3.2 -> 1.4.0 + - live555 2017.10.28 -> 2018.01.29 + - mpg123 1.25.8-1 -> 1.25.8-2 + - nghttp2 1.28.0 -> 1.30.0-1 + - nlohmann-json 3.0.1 -> 3.1.0 + - opencv 3.4.0 -> 3.4.0-2 + - opengl 0.0-4 -> 0.0-5 + - openssl 1.0.2n-1 -> 1.0.2n-2 + - openvr 1.0.9 -> 1.0.12 + - poco 1.8.1 -> 1.8.1-1 + - protobuf 3.5.0-1 -> 3.5.1 + - qt5-base 5.9.2-1 -> 5.9.2-4 + - realsense2 2.9.0 -> 2.9.1 + - sciter 4.1.1 -> 4.1.2 + - sobjectizer 5.5.20 -> 5.5.21 + - soundtouch 2.0.0.2 -> 2.0.0 + - strtk 2017.01.02-1e2960f -> 2018.01.01-5579ed1 + * The `configure` step for `release` and `debug` now happen in parallel. + - This can significantly reduce build times for libraries where the `configure` step was a good chunk of the total build time. For example, the total build time for `zlib` drops from ~30sec to ~20sec. + * Fix a few bootstraping issues introduced in previous release (with the clean environment) + +-- vcpkg team WED, 07 Feb 2018 20:30:00 -0800 + + vcpkg (0.0.103) -------------- * `vcpkg upgrade`: Fix issue with any command executing more than 10 transactions with mixed transaction types (install + remove) --- vcpkg team WED, 24 Jan 2017 14:30:00 -0800 +-- vcpkg team WED, 24 Jan 2018 14:30:00 -0800 vcpkg (0.0.102) diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 486716ae3..f4950aa0b 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.103" \ No newline at end of file +"0.0.104" \ No newline at end of file -- cgit v1.2.3 From 73e45b0ce2b4132a24708a0359c76927ed418e15 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Feb 2018 19:00:11 -0800 Subject: [qt5-base][qtdeploy] Deploy plugin dependencies to the executable's folder. --- ports/qt5-base/CONTROL | 2 +- ports/qt5-base/qtdeploy.ps1 | 1 + scripts/buildsystems/msbuild/applocal.ps1 | 17 +++++++++++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index 1a1aec15d..1e10239b3 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,4 +1,4 @@ Source: qt5-base -Version: 5.9.2-4 +Version: 5.9.2-5 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/qtdeploy.ps1 b/ports/qt5-base/qtdeploy.ps1 index b25a46e7a..26bd10257 100644 --- a/ports/qt5-base/qtdeploy.ps1 +++ b/ports/qt5-base/qtdeploy.ps1 @@ -19,6 +19,7 @@ function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [str New-Item "$targetBinaryDir\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null Get-ChildItem "$QtPluginsDir\$pluginSubdirName\*.dll" | % { deployBinary "$targetBinaryDir\$pluginSubdirName" "$QtPluginsDir\$pluginSubdirName" $_.Name + resolve $_ } } else { Write-Verbose " Skipping plugins directory '$pluginSubdirName': doesn't exist" diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index 0b56356a0..3f0f2ef37 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -24,6 +24,19 @@ function deployBinary([string]$targetBinaryDir, [string]$SourceDir, [string]$tar if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$targetBinaryName" } } + +Write-Verbose "Resolving base path $targetBinary..." +try +{ + $baseBinaryPath = Resolve-Path $targetBinary -erroraction stop + $baseTargetBinaryDir = Split-Path $baseBinaryPath -parent +} +catch [System.Management.Automation.ItemNotFoundException] +{ + return +} + +# Note: this function signature is depended upon by the qtdeploy.ps1 script function resolve([string]$targetBinary) { Write-Verbose "Resolving $targetBinary..." try @@ -47,10 +60,10 @@ function resolve([string]$targetBinary) { } $g_searched.Set_Item($_, $true) if (Test-Path "$installedDir\$_") { - deployBinary $targetBinaryDir $installedDir "$_" + deployBinary $baseTargetBinaryDir $installedDir "$_" if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $targetBinaryDir "$g_install_root\plugins" "$_" } if (Test-Path function:\deployOpenNI2) { deployOpenNI2 $targetBinaryDir "$g_install_root" "$_" } - resolve "$targetBinaryDir\$_" + resolve "$baseTargetBinaryDir\$_" } elseif (Test-Path "$targetBinaryDir\$_") { Write-Verbose " ${_}: $_ not found in vcpkg; locally deployed" resolve "$targetBinaryDir\$_" -- cgit v1.2.3 From 5ef129e8806529cc552db6a017e44592e1222f56 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Thu, 8 Feb 2018 23:13:38 +0900 Subject: Add libgeotiff port Signed-off-by: Hiroshi Miura --- ports/libgeotiff/CONTROL | 4 ++++ ports/libgeotiff/portfile.cmake | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 ports/libgeotiff/CONTROL create mode 100644 ports/libgeotiff/portfile.cmake diff --git a/ports/libgeotiff/CONTROL b/ports/libgeotiff/CONTROL new file mode 100644 index 000000000..ba7bc134d --- /dev/null +++ b/ports/libgeotiff/CONTROL @@ -0,0 +1,4 @@ +Source: libgeotiff +Version: 1.4.2 +Description: libgeotiff. +Build-Depends: tiff, proj4, zlib, libjpeg-turbo diff --git a/ports/libgeotiff/portfile.cmake b/ports/libgeotiff/portfile.cmake new file mode 100644 index 000000000..d62c26d82 --- /dev/null +++ b/ports/libgeotiff/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +set(LIBGEOTIFF_VERSION 1.4.2) +set(LIBGEOTIFF_HASH 059c6e05eb0c47f17b102c7217a2e1636e76d622c4d1bdcf0bd89fb3505f3130bffa881e21c73cfd2ca0d6863b81322f85784658ba3539b53b63c3a8f38d1deb) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libgeotiff-${LIBGEOTIFF_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz" + FILENAME "libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz" + SHA512 ${LIBGEOTIFF_HASH}) + +vcpkg_extract_source_archive(${ARCHIVE}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_SHARED_LIBS ON) +else() + set(BUILD_SHARED_LIBS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} + -DWITH_UTILITIES=OFF +) + +vcpkg_build_cmake() +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgeotiff RENAME copyright) -- cgit v1.2.3 From f68711ed02ac2041f8760c8dc32b9b3804422189 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Fri, 9 Feb 2018 07:15:21 +0900 Subject: [libgeotiff] fix install directory for cmake configurations Signed-off-by: Hiroshi Miura --- ports/libgeotiff/fix-directory-output.patch | 14 ++++++++++++++ ports/libgeotiff/portfile.cmake | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 ports/libgeotiff/fix-directory-output.patch diff --git a/ports/libgeotiff/fix-directory-output.patch b/ports/libgeotiff/fix-directory-output.patch new file mode 100644 index 000000000..82032daa1 --- /dev/null +++ b/ports/libgeotiff/fix-directory-output.patch @@ -0,0 +1,14 @@ +diff -urN a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +--- a/cmake/CMakeLists.txt 2016-08-12 00:40:10.000000000 +0900 ++++ b/cmake/CMakeLists.txt 2018-02-09 07:12:40.422110239 +0900 +@@ -10,8 +10,8 @@ + set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") + set (PROJECT_ROOT_DIR "../../..") + else () +- set (INSTALL_CMAKE_DIR "cmake") +- set (PROJECT_ROOT_DIR "..") ++ set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME}") ++ set (PROJECT_ROOT_DIR "../..") + endif () + + configure_file (project-config.cmake.in project-config.cmake @ONLY) diff --git a/ports/libgeotiff/portfile.cmake b/ports/libgeotiff/portfile.cmake index d62c26d82..5920a0853 100644 --- a/ports/libgeotiff/portfile.cmake +++ b/ports/libgeotiff/portfile.cmake @@ -11,6 +11,10 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch") + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(BUILD_SHARED_LIBS ON) else() -- cgit v1.2.3 From fc888e46178675bb708448f24cb07a72b13d7cd1 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Fri, 9 Feb 2018 13:29:00 +0900 Subject: fix tiff detection error when static build --- ports/libgeotiff/fix-cmake-tiff-detection.patch | 21 +++++++++++++++++++++ ports/libgeotiff/portfile.cmake | 7 ++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 ports/libgeotiff/fix-cmake-tiff-detection.patch diff --git a/ports/libgeotiff/fix-cmake-tiff-detection.patch b/ports/libgeotiff/fix-cmake-tiff-detection.patch new file mode 100644 index 000000000..166aa7d44 --- /dev/null +++ b/ports/libgeotiff/fix-cmake-tiff-detection.patch @@ -0,0 +1,21 @@ +--- a/CMakeLists.txt 2016-08-12 00:40:12.000000000 +0900 ++++ b/CMakeLists.txt 2018-02-09 13:27:05.721561755 +0900 +@@ -192,7 +192,8 @@ + IF(TIFF_FOUND) + # Confirm required API is available + INCLUDE(CheckFunctionExists) +- SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES}) ++ FIND_PACKAGE(LibLZMA) ++ SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${LIBLZMA_LIBRARIES}) + + CHECK_FUNCTION_EXISTS(TIFFOpen HAVE_TIFFOPEN) + IF(NOT HAVE_TIFFOPEN) +@@ -205,7 +206,7 @@ + SET(TIFF_FOUND) # ReSET to NOT found for TIFF library + MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFMergeFieldInfo function not found. libtiff 3.6.0 Beta or later required. Please upgrade or use an older version of libgeotiff") + ENDIF() +- ++ SET(CMAKE_REQUIRED_LIBRARIES) + INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) + ADD_DEFINITIONS(-DHAVE_TIFF=1) + ENDIF(TIFF_FOUND) diff --git a/ports/libgeotiff/portfile.cmake b/ports/libgeotiff/portfile.cmake index 5920a0853..b974ebc35 100644 --- a/ports/libgeotiff/portfile.cmake +++ b/ports/libgeotiff/portfile.cmake @@ -13,7 +13,8 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch") + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-cmake-tiff-detection.patch") if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(BUILD_SHARED_LIBS ON) @@ -26,6 +27,10 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -DWITH_UTILITIES=OFF + -DWITH_TIFF=ON + -DWITH_PROJ4=ON + -DWITH_ZLIB=ON + -DWITH_JPEG=ON ) vcpkg_build_cmake() -- cgit v1.2.3 From e8899b37d28fe5b4d5843b2c2b44a939c8030a3f Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Fri, 9 Feb 2018 13:39:22 +0900 Subject: [libgeotiff] remove installed dlls when static build --- ports/libgeotiff/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/libgeotiff/portfile.cmake b/ports/libgeotiff/portfile.cmake index b974ebc35..36be37bb6 100644 --- a/ports/libgeotiff/portfile.cmake +++ b/ports/libgeotiff/portfile.cmake @@ -39,3 +39,7 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgeotiff RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +endif() \ No newline at end of file -- cgit v1.2.3 From ee84a44871daf45c9f1b127da0a1a4972cfe161f Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Fri, 9 Feb 2018 13:44:45 +0900 Subject: [libgeotiff] update description --- ports/libgeotiff/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libgeotiff/CONTROL b/ports/libgeotiff/CONTROL index ba7bc134d..8950200d9 100644 --- a/ports/libgeotiff/CONTROL +++ b/ports/libgeotiff/CONTROL @@ -1,4 +1,4 @@ Source: libgeotiff Version: 1.4.2 -Description: libgeotiff. +Description: Libgeotiff is an open source library normally hosted on top of ​libtiff for reading, and writing GeoTIFF information tags. Build-Depends: tiff, proj4, zlib, libjpeg-turbo -- cgit v1.2.3 From 8e9e4b577977310fc3cb581b71a1ba22a8ffa869 Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Fri, 9 Feb 2018 16:24:16 +0800 Subject: [chipmunk] 7.0.2 initial. --- ports/chipmunk/CONTROL | 3 ++ ports/chipmunk/portfile.cmake | 75 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 ports/chipmunk/CONTROL create mode 100644 ports/chipmunk/portfile.cmake diff --git a/ports/chipmunk/CONTROL b/ports/chipmunk/CONTROL new file mode 100644 index 000000000..64b66067b --- /dev/null +++ b/ports/chipmunk/CONTROL @@ -0,0 +1,3 @@ +Source: chipmunk +Version: 7.0.2 +Description: A fast and lightweight 2D game physics library. \ No newline at end of file diff --git a/ports/chipmunk/portfile.cmake b/ports/chipmunk/portfile.cmake new file mode 100644 index 000000000..5b6477767 --- /dev/null +++ b/ports/chipmunk/portfile.cmake @@ -0,0 +1,75 @@ +include(vcpkg_common_functions) + +#architecture detection +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(CHIPMUNK_ARCH Win32) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(CHIPMUNK_ARCH x64) +else() + message(FATAL_ERROR "unsupported architecture") +endif() + +#linking +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(CHIPMUNK_CONFIGURATION_SUFFIX " DLL") +else() + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(CHIPMUNK_CONFIGURATION_SUFFIX "") + else() + set(CHIPMUNK_CONFIGURATION_SUFFIX " SCRT") + endif() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO slembcke/Chipmunk2D + REF Chipmunk-7.0.2 + SHA512 3a697a73f854b36c53ea99390878094e91a44a0c6a19ebb0cd6726474b9b4f219085944efba4a7ae6faec1def3b9d58a02f159bea15724a7f5235bb645b91dba + HEAD_REF master +) + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/msvc/vc14/chipmunk/chipmunk.vcxproj + RELEASE_CONFIGURATION "Release${CHIPMUNK_CONFIGURATION_SUFFIX}" + DEBUG_CONFIGURATION "Debug${CHIPMUNK_CONFIGURATION_SUFFIX}" +) + +message(STATUS "Installing") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(INSTALL + "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Debug${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.dll" + "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Debug${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.pdb" + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.dll" + "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.pdb" + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) +else() + file(INSTALL + "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.pdb" + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.pdb" + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +endif() + +file(INSTALL + "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Debug${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.lib" + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) +file(INSTALL + "${SOURCE_PATH}/msvc/vc14/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.lib" + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file(INSTALL + ${SOURCE_PATH}/include/chipmunk + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/chipmunk RENAME copyright) + +message(STATUS "Installing done") -- cgit v1.2.3 From 3e0d98cd81b9d047168d5359d20e45681d17a7ae Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Fri, 9 Feb 2018 16:24:58 +0800 Subject: [recast] 1.5.1 initial. --- ports/recast/CMakeLists.txt | 57 +++++++++++++++++++++++++++++++++++++++++++++ ports/recast/CONTROL | 3 +++ ports/recast/portfile.cmake | 22 +++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 ports/recast/CMakeLists.txt create mode 100644 ports/recast/CONTROL create mode 100644 ports/recast/portfile.cmake diff --git a/ports/recast/CMakeLists.txt b/ports/recast/CMakeLists.txt new file mode 100644 index 000000000..5b54f6e20 --- /dev/null +++ b/ports/recast/CMakeLists.txt @@ -0,0 +1,57 @@ +cmake_minimum_required(VERSION 3.8) +project(recast) + +include_directories( + DebugUtils/Include + Detour/Include + DetourCrowd/Include + DetourTileCache/Include + Recast/Include +) + +set(SRC + DebugUtils/Source/DebugDraw.cpp + DebugUtils/Source/DetourDebugDraw.cpp + DebugUtils/Source/RecastDebugDraw.cpp + DebugUtils/Source/RecastDump.cpp + Detour/Source/DetourAlloc.cpp + Detour/Source/DetourCommon.cpp + Detour/Source/DetourNavMesh.cpp + Detour/Source/DetourNavMeshBuilder.cpp + Detour/Source/DetourNavMeshQuery.cpp + Detour/Source/DetourNode.cpp + DetourCrowd/Source/DetourCrowd.cpp + DetourCrowd/Source/DetourLocalBoundary.cpp + DetourCrowd/Source/DetourObstacleAvoidance.cpp + DetourCrowd/Source/DetourPathCorridor.cpp + DetourCrowd/Source/DetourPathQueue.cpp + DetourCrowd/Source/DetourProximityGrid.cpp + DetourTileCache/Source/DetourTileCache.cpp + DetourTileCache/Source/DetourTileCacheBuilder.cpp + Recast/Source/Recast.cpp + Recast/Source/RecastAlloc.cpp + Recast/Source/RecastArea.cpp + Recast/Source/RecastContour.cpp + Recast/Source/RecastFilter.cpp + Recast/Source/RecastLayers.cpp + Recast/Source/RecastMesh.cpp + Recast/Source/RecastMeshDetail.cpp + Recast/Source/RecastRasterization.cpp + Recast/Source/RecastRegion.cpp +) + +add_library(recast ${SRC}) + +install( + TARGETS recast + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY DebugUtils/Include/ DESTINATION include/recast/DebugUtils) + install(DIRECTORY Detour/Include/ DESTINATION include/recast/Detour) + install(DIRECTORY DetourCrowd/Include/ DESTINATION include/recast/DetourCrowd) + install(DIRECTORY DetourTileCache/Include/ DESTINATION include/recast/DetourTileCache) + install(DIRECTORY Recast/Include/ DESTINATION include/recast/Recast) +endif() diff --git a/ports/recast/CONTROL b/ports/recast/CONTROL new file mode 100644 index 000000000..34bb2b34a --- /dev/null +++ b/ports/recast/CONTROL @@ -0,0 +1,3 @@ +Source: recast +Version: 1.5.1 +Description: Navigation-mesh Toolset for Games diff --git a/ports/recast/portfile.cmake b/ports/recast/portfile.cmake new file mode 100644 index 000000000..9c26131da --- /dev/null +++ b/ports/recast/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO recastnavigation/recastnavigation + REF 1.5.1 + SHA512 09900d8893e0c633a79e6188d15e68d1047040a0f2bceb2542f486dded64e69b918eaae159def81416a014fae26a46502783a2a712462bee4be2a3edf7bef47f + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/recast RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From e15a7891d646a92ad1fe445d644aa1951b237e50 Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Fri, 9 Feb 2018 16:25:52 +0800 Subject: [tinydir] 1.2.3 initial. --- ports/tinydir/CONTROL | 3 +++ ports/tinydir/portfile.cmake | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 ports/tinydir/CONTROL create mode 100644 ports/tinydir/portfile.cmake diff --git a/ports/tinydir/CONTROL b/ports/tinydir/CONTROL new file mode 100644 index 000000000..5f4f52d9a --- /dev/null +++ b/ports/tinydir/CONTROL @@ -0,0 +1,3 @@ +Source: tinydir +Version: 1.2.3 +Description: Lightweight, portable and easy to integrate C directory and file reader diff --git a/ports/tinydir/portfile.cmake b/ports/tinydir/portfile.cmake new file mode 100644 index 000000000..19e9a7f48 --- /dev/null +++ b/ports/tinydir/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cxong/tinydir + REF 1.2.3 + SHA512 fa366525558b0932994f93bab7a9edafdc7fe297fc65c2ce8af5b4b05c33c4af4b1fdf72292a7a89dcea4276cf419e3569e41ff1122e0048ad467ed6e33836a2 + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/tinydir.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinydir RENAME copyright) +vcpkg_copy_pdbs() -- cgit v1.2.3 From 89b2fe67c48d17c4cb90b7ef59ee8048c7c58cdb Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Fri, 9 Feb 2018 17:03:39 +0800 Subject: [mman] git-f5ff813 initial. --- ports/mman/CONTROL | 3 +++ ports/mman/portfile.cmake | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 ports/mman/CONTROL create mode 100644 ports/mman/portfile.cmake diff --git a/ports/mman/CONTROL b/ports/mman/CONTROL new file mode 100644 index 000000000..85eb7c8d3 --- /dev/null +++ b/ports/mman/CONTROL @@ -0,0 +1,3 @@ +Source: mman +Version: git-f5ff813 +Description: A light implementation of the mmap functions for MinGW. diff --git a/ports/mman/portfile.cmake b/ports/mman/portfile.cmake new file mode 100644 index 000000000..f0616f44d --- /dev/null +++ b/ports/mman/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO witwall/mman-win32 + REF f5ff813c53935c3078f48e1f03a6944c4e7b459c + SHA512 49c9a63a0a3c6fa585a76e65425f6fb1fdaa23cc87e53d5afb7a1298bcd4956298c076ee78f24dd5df5f5a0c5f6244c6abb63b40818e4d2546185fa37a73bf0d + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(ENABLE_SHARED OFF) +else() + set(ENABLE_SHARED ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_SHARED_LIBS=${ENABLE_SHARED} +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/mman RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From ca45a305cff2c39e162271cdb64314ca10e38363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 9 Feb 2018 19:44:48 +0100 Subject: Update Catch to 2.1.2 (#2763) --- ports/catch2/CONTROL | 2 +- ports/catch2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL index 0f169ae4e..272a2592d 100644 --- a/ports/catch2/CONTROL +++ b/ports/catch2/CONTROL @@ -1,4 +1,4 @@ Source: catch2 -Version: 2.1.1 +Version: 2.1.2 Description: A modern, header-only test framework for unit testing. Issues, PRs and changelogs can be found at https://github.com/catchorg/Catch2 diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake index 34adb60db..4c75ae0f6 100644 --- a/ports/catch2/portfile.cmake +++ b/ports/catch2/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v2.1.1) +set(CATCH_VERSION v2.1.2) vcpkg_download_distfile(HEADER URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catchorg-catch2-${CATCH_VERSION}.hpp" - SHA512 52a3161b92b7a21b360ce023b69b881c23869fa9194f22b4aadc9b3d1415520a1b525d5dd22b599495bef6ad4f051ecf853528c0e6296d2bf0c1bf99842bce52 + SHA512 4d6b26aff890fd543c05a780f777df6a3ac609d67d7bc6888377c7e18b7d8d371f12725a5ff03ce5c3fac05730e8b7116164c7173a04eb56ca38c2f3e3cbb9a6 ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From b2465a175570df33730937c250357bd1f092b277 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 9 Feb 2018 19:46:43 -0800 Subject: [vcpkg-ci] Delete intermediate build folders even on unsuccesful builds --- toolsrc/src/vcpkg/build.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 295bd240e..7de276f4f 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -258,9 +258,9 @@ namespace vcpkg::Build paths.get_filesystem().write_contents(binary_control_file, start); } - ExtendedBuildResult build_package(const VcpkgPaths& paths, - const BuildPackageConfig& config, - const StatusParagraphs& status_db) + static ExtendedBuildResult do_build_package(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const StatusParagraphs& status_db) { const PackageSpec spec = PackageSpec::from_name_and_triplet(config.scf.core_paragraph->name, config.triplet) .value_or_exit(VCPKG_LINE_INFO); @@ -369,10 +369,19 @@ namespace vcpkg::Build write_binary_control_file(paths, *bcf); + return {BuildResult::SUCCEEDED, std::move(bcf)}; + } + + ExtendedBuildResult build_package(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const StatusParagraphs& status_db) + { + ExtendedBuildResult result = do_build_package(paths, config, status_db); + if (config.build_package_options.clean_buildtrees == CleanBuildtrees::YES) { auto& fs = paths.get_filesystem(); - auto buildtrees_dir = paths.buildtrees / spec.name(); + auto buildtrees_dir = paths.buildtrees / config.scf.core_paragraph->name; auto buildtree_files = fs.get_files_non_recursive(buildtrees_dir); for (auto&& file : buildtree_files) { @@ -384,7 +393,7 @@ namespace vcpkg::Build } } - return {BuildResult::SUCCEEDED, std::move(bcf)}; + return result; } const std::string& to_string(const BuildResult build_result) -- cgit v1.2.3 From 641128c6039a5a251e7da470f164e8a9c98a1b02 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 9 Feb 2018 22:56:36 -0800 Subject: [folly] Workaround bug for VS 15.6 --- ports/folly/CONTROL | 2 +- ports/folly/cmake-link-boost-fix.cmake | 35 ---------------------------------- ports/folly/cmake-link-boost-fix.patch | 35 ++++++++++++++++++++++++++++++++++ ports/folly/msvc-15.6-workaround.patch | 25 ++++++++++++++++++++++++ ports/folly/portfile.cmake | 3 ++- 5 files changed, 63 insertions(+), 37 deletions(-) delete mode 100644 ports/folly/cmake-link-boost-fix.cmake create mode 100644 ports/folly/cmake-link-boost-fix.patch create mode 100644 ports/folly/msvc-15.6-workaround.patch diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index cc3678039..8f0bb7656 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,4 +1,4 @@ Source: folly -Version: 2017.11.27.00-2 +Version: 2017.11.27.00-3 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: zlib, openssl, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy, boost-context, boost-chrono, boost-date-time, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread, boost-conversion, boost-multi-index, boost-crc diff --git a/ports/folly/cmake-link-boost-fix.cmake b/ports/folly/cmake-link-boost-fix.cmake deleted file mode 100644 index 7eb4574c4..000000000 --- a/ports/folly/cmake-link-boost-fix.cmake +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ec5a985c..36564534 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -136,13 +136,6 @@ source_group("folly\\build" FILES - ) - - set(FOLLY_SHINY_DEPENDENCIES -- Boost::chrono -- Boost::context -- Boost::date_time -- Boost::filesystem -- Boost::program_options -- Boost::regex -- Boost::system - OpenSSL::SSL - OpenSSL::Crypto - ) -@@ -179,6 +172,7 @@ endif() - - set(FOLLY_LINK_LIBRARIES - ${FOLLY_LINK_LIBRARIES} -+ ${Boost_LIBRARIES} - Iphlpapi.lib - Ws2_32.lib - -@@ -320,7 +314,7 @@ if (BUILD_TESTS) - ) - target_link_libraries(folly_test_support - PUBLIC -- Boost::thread -+ ${Boost_LIBRARIES} - folly - ${LIBGMOCK_LIBRARY} - ) diff --git a/ports/folly/cmake-link-boost-fix.patch b/ports/folly/cmake-link-boost-fix.patch new file mode 100644 index 000000000..d3baf13a3 --- /dev/null +++ b/ports/folly/cmake-link-boost-fix.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec5a985c..36564534 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -136,13 +136,6 @@ source_group("folly\\build" FILES + ) + + set(FOLLY_SHINY_DEPENDENCIES +- Boost::chrono +- Boost::context +- Boost::date_time +- Boost::filesystem +- Boost::program_options +- Boost::regex +- Boost::system + OpenSSL::SSL + OpenSSL::Crypto + ) +@@ -179,6 +172,7 @@ endif() + + set(FOLLY_LINK_LIBRARIES + ${FOLLY_LINK_LIBRARIES} ++ ${Boost_LIBRARIES} + Iphlpapi.lib + Ws2_32.lib + +@@ -320,7 +314,7 @@ if (BUILD_TESTS) + ) + target_link_libraries(folly_test_support + PUBLIC +- Boost::thread ++ ${Boost_LIBRARIES} + folly + ${LIBGMOCK_LIBRARY} + ) diff --git a/ports/folly/msvc-15.6-workaround.patch b/ports/folly/msvc-15.6-workaround.patch new file mode 100644 index 000000000..6102f32ac --- /dev/null +++ b/ports/folly/msvc-15.6-workaround.patch @@ -0,0 +1,25 @@ +diff --git a/folly/FBString.h b/folly/FBString.h +index 4882aac..6c83046 100644 +--- a/folly/FBString.h ++++ b/folly/FBString.h +@@ -1890,12 +1890,14 @@ inline basic_fbstring& basic_fbstring::operator=( + + template + template +-inline typename std::enable_if< +- std::is_same< +- typename std::decay::type, +- typename basic_fbstring::value_type>::value, +- basic_fbstring&>::type +-basic_fbstring::operator=(TP c) { ++inline auto ++basic_fbstring::operator=(TP c) ++ -> typename std::enable_if< ++ std::is_same< ++ typename std::decay::type, ++ typename basic_fbstring::value_type>::value, ++ basic_fbstring&>::type ++{ + Invariant checker(*this); + + if (empty()) { diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 77c8cecdf..00c1093da 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -25,7 +25,8 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/cmake-link-boost-fix.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake-link-boost-fix.patch + ${CMAKE_CURRENT_LIST_DIR}/msvc-15.6-workaround.patch ) if(VCPKG_CRT_LINKAGE STREQUAL static) -- cgit v1.2.3 From f676dbe8475f3f882db8d142aabf2cb21361bdfd Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Sat, 10 Feb 2018 18:50:12 +0800 Subject: [pcre] fix space issue and add mirror (fix #2751) --- ports/pcre2/CONTROL | 2 +- ports/pcre2/fix-space.patch | 13 +++++++++++++ ports/pcre2/portfile.cmake | 5 ++++- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 ports/pcre2/fix-space.patch diff --git a/ports/pcre2/CONTROL b/ports/pcre2/CONTROL index 06d683de4..79982525a 100644 --- a/ports/pcre2/CONTROL +++ b/ports/pcre2/CONTROL @@ -1,3 +1,3 @@ Source: pcre2 -Version: 10.30-1 +Version: 10.30-2 Description: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library diff --git a/ports/pcre2/fix-space.patch b/ports/pcre2/fix-space.patch new file mode 100644 index 000000000..70f88021a --- /dev/null +++ b/ports/pcre2/fix-space.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fbc37fe..54e25f2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -91,7 +91,7 @@ CMAKE_POLICY(SET CMP0026 OLD) + + SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake + +-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${PROJECT_SOURCE_DIR}/src") ++SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I\"${PROJECT_SOURCE_DIR}/src\"") + + # external packages + FIND_PACKAGE( BZip2 ) diff --git a/ports/pcre2/portfile.cmake b/ports/pcre2/portfile.cmake index 0f5bee964..34e4cf726 100644 --- a/ports/pcre2/portfile.cmake +++ b/ports/pcre2/portfile.cmake @@ -2,7 +2,7 @@ set(PCRE2_VERSION 10.30) include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pcre2-${PCRE2_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/pcre/files/pcre2/${PCRE2_VERSION}/pcre2-${PCRE2_VERSION}.zip/download" + URLS "https://ftp.pcre.org/pub/pcre/pcre2-${PCRE2_VERSION}.zip" "https://sourceforge.net/projects/pcre/files/pcre2/${PCRE2_VERSION}/pcre2-${PCRE2_VERSION}.zip/download" FILENAME "pcre2-${PCRE2_VERSION}.zip" SHA512 03e570b946ac29498a114b27e715a0fcf25702bfc9623f9fc085ee8a3214ab3c303baccb9c0af55da6916e8ce40d931d97f1ee9628690563041a943f0aa2bc54) @@ -20,6 +20,9 @@ vcpkg_configure_cmake( -DPCRE2_BUILD_TESTS=OFF -DPCRE2_BUILD_PCRE2GREP=OFF) +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-space.patch) + vcpkg_install_cmake() file(READ ${CURRENT_PACKAGES_DIR}/include/pcre2.h PCRE2_H) -- cgit v1.2.3 From a258cf5e88235f29a5fb4d24b2919f988282fe71 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sat, 10 Feb 2018 23:18:38 +0900 Subject: [realsense2] Update to v2.10.0 Update realsense2 port to librealsense v2.10.0. --- ports/realsense2/CONTROL | 2 +- ports/realsense2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index 76ce98ffa..22cbf12e4 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,3 +1,3 @@ Source: realsense2 -Version: 2.9.1 +Version: 2.10.0 Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index 0ae449aaf..49bca7188 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense - REF v2.9.1 - SHA512 065b772948ebe34d187d44110326f711f3184876b1f129de83552c5cfe333485f9b0c9e4774b391e55d7fe533619818594f0946eee07d528dfe91b2c5e96d942 + REF v2.10.0 + SHA512 b00cd4617d59197f7baa40d5a4833027c2b0c45e3e67047dce38e9415905ecf78c1ee9fe499c8e3292b54b8de8e96064001d0f154fdb10b2c64c19a8162db6d1 HEAD_REF master ) -- cgit v1.2.3 From 5da1c13c020f94b3d2d1e1f82f577485b7782282 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Sat, 10 Feb 2018 17:49:27 +0300 Subject: [libevent] Fix generated libevent targets files --- ports/libevent/fix-target-files.patch | 36 +++++++++++++++++++++++++++++++++++ ports/libevent/portfile.cmake | 12 ++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 ports/libevent/fix-target-files.patch diff --git a/ports/libevent/fix-target-files.patch b/ports/libevent/fix-target-files.patch new file mode 100644 index 000000000..d1b2d5970 --- /dev/null +++ b/ports/libevent/fix-target-files.patch @@ -0,0 +1,36 @@ +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 99f0bb0e1..6a1755c3e 100644 --- a/ports/libevent/portfile.cmake +++ b/ports/libevent/portfile.cmake @@ -11,8 +11,20 @@ vcpkg_from_github( SHA512 0d5c872dc797b69ab8ea4b83aebcbac20735b8c6f5adfcc2950aa4d6013d240f5fac3376e817da75ae0ccead50cec0d931619e135a050add438777457b086549 ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix-target-files.patch" +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DEVENT__DISABLE_BENCHMARK=ON + -DEVENT__DISABLE_TESTS=ON + -DEVENT__DISABLE_REGRESS=ON + -DEVENT__DISABLE_SAMPLES=ON ) vcpkg_install_cmake() -- cgit v1.2.3 From 9d97db3daa08168bcc4e9ac61af1df73d85ab649 Mon Sep 17 00:00:00 2001 From: ChrisBFX Date: Sat, 10 Feb 2018 23:05:50 +0100 Subject: fixed typo in warning message (#2773) --- toolsrc/src/vcpkg/vcpkgpaths.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index e6daedcd4..06e0c01ab 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -524,7 +524,7 @@ namespace vcpkg { System::println( System::Color::warning, - "Warning: The following VS instances are exluded because the English language pack is unavailable."); + "Warning: The following VS instances are excluded because the English language pack is unavailable."); for (const Toolset& toolset : excluded_toolsets) { System::println(" %s", toolset.visual_studio_root_path.u8string()); -- cgit v1.2.3 From de2160d3e33c8ec2ba36137c28e21294ef637eb2 Mon Sep 17 00:00:00 2001 From: Klaus Iglberger Date: Sun, 11 Feb 2018 06:15:36 +0100 Subject: [blaze] update to Blaze 3.3 --- ports/blaze/CONTROL | 2 +- ports/blaze/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/blaze/CONTROL b/ports/blaze/CONTROL index c64405980..c72f70865 100644 --- a/ports/blaze/CONTROL +++ b/ports/blaze/CONTROL @@ -1,4 +1,4 @@ Source: blaze -Version: 3.2-3 +Version: 3.3 Build-Depends: clapack, boost-exception Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic. diff --git a/ports/blaze/portfile.cmake b/ports/blaze/portfile.cmake index 7bbb58afc..44f20cbb1 100644 --- a/ports/blaze/portfile.cmake +++ b/ports/blaze/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_bitbucket( OUT_SOURCE_PATH SOURCE_PATH REPO blaze-lib/blaze - REF v3.2 - SHA512 f9a50c454125fe194f0d1fb259c5440c82068d41880a228fbd15fe383b6ef4198557daa406a08809065eedf223fc0c55d2309cc00ef549a3fc1a2a89e6d4b445 + REF v3.3 + SHA512 391be695114759c9eef56dbb20d039a20f88bc9b852285e950788ce5118dcf69f29c5497b62f5b18b6f777760b0bc17534d71eda40628046acfc861c7f7c2356 HEAD_REF master ) -- cgit v1.2.3 From 6acb83143081a32b86bf41619c7137d0446bc157 Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Mon, 12 Feb 2018 16:32:33 +0800 Subject: [lmdb] Fix possible whitespace problem --- ports/lmdb/cmake/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/lmdb/cmake/CMakeLists.txt b/ports/lmdb/cmake/CMakeLists.txt index 6f63384ea..32097e86a 100644 --- a/ports/lmdb/cmake/CMakeLists.txt +++ b/ports/lmdb/cmake/CMakeLists.txt @@ -22,8 +22,8 @@ set(LMDB_CONFIG_INSTALL_DIR share/lmdb CACHE PATH "Install directory for cmake c if(BUILD_SHARED_LIBS) -set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEF:${CMAKE_CURRENT_SOURCE_DIR}/lmdbd.def") -set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEF:${CMAKE_CURRENT_SOURCE_DIR}/lmdb.def") +set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEF:\"${CMAKE_CURRENT_SOURCE_DIR}/lmdbd.def\"") +set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEF:\"${CMAKE_CURRENT_SOURCE_DIR}/lmdb.def\"") endif() set(SRCS lmdb mdb.c lmdb.h midl.c midl.h ) -- cgit v1.2.3 From 32d62b2bfd93dddbfe08bee420abfcbcdd1134af Mon Sep 17 00:00:00 2001 From: Alisayyy-Yang Date: Mon, 12 Feb 2018 01:50:04 -0800 Subject: Fix date issue --- ports/date/fix-date.patch | 36 ++++++++++++++++++++++++++++++++++++ ports/date/portfile.cmake | 5 +++++ 2 files changed, 41 insertions(+) create mode 100644 ports/date/fix-date.patch diff --git a/ports/date/fix-date.patch b/ports/date/fix-date.patch new file mode 100644 index 000000000..bf4c05b38 --- /dev/null +++ b/ports/date/fix-date.patch @@ -0,0 +1,36 @@ +diff --git a/include/date/tz.h b/include/date/tz.h +index 280a598..f9b5a35 100644 +--- a/include/date/tz.h ++++ b/include/date/tz.h +@@ -1963,7 +1963,7 @@ from_stream(std::basic_istream& is, const CharT* fmt, + bool is_60_sec = fds.tod.seconds() == seconds{60}; + if (is_60_sec) + fds.tod.seconds() -= seconds{1}; +- auto tmp = to_utc_time(sys_days(fds.ymd) - *offptr + fds.tod.to_duration()); ++ auto tmp = utc_clock::from_sys(sys_days(fds.ymd) - *offptr + fds.tod.to_duration()); + if (is_60_sec) + tmp += seconds{1}; + if (is_60_sec != is_leap_second(tmp).first || !fds.tod.in_conventional_range()) +@@ -2197,7 +2197,7 @@ from_stream(std::basic_istream& is, const CharT* fmt, + return is; + } + +-#if !defined(_MSC_VER) || _MSC_VER > 1912 ++#if !defined(_MSC_VER) || _MSC_VER > 1913 + + // clock_time_conversion + +@@ -2471,7 +2471,7 @@ clock_cast(const std::chrono::time_point& tp) + return clock_cast_detail::cc_impl(tp, &tp); + } + +-#endif // !defined(_MSC_VER) || _MSC_VER > 1912 ++#endif // !defined(_MSC_VER) || _MSC_VER > 1913 + + // Deprecated API + +@@ -2579,3 +2579,4 @@ to_gps_time(const tai_time& t) + } // namespace date + + #endif // TZ_H ++ diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake index e060edb87..c60a7bcb0 100644 --- a/ports/date/portfile.cmake +++ b/ports/date/portfile.cmake @@ -13,6 +13,11 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-date.patch +) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( -- cgit v1.2.3 From bae3fac1cd5f7d1fbd15431390688694e39188f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20He=C3=9F?= Date: Mon, 12 Feb 2018 16:20:27 +0100 Subject: add qt5-quickcontrols2 --- ports/qt5-quickcontrols2/CONTROL | 4 ++++ ports/qt5-quickcontrols2/portfile.cmake | 5 +++++ ports/qt5/CONTROL | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 ports/qt5-quickcontrols2/CONTROL create mode 100644 ports/qt5-quickcontrols2/portfile.cmake diff --git a/ports/qt5-quickcontrols2/CONTROL b/ports/qt5-quickcontrols2/CONTROL new file mode 100644 index 000000000..c600ed225 --- /dev/null +++ b/ports/qt5-quickcontrols2/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-quickcontrols2 +Version: 5.9.2-0 +Description: Qt5 QuickControls2 Module. +Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-quickcontrols2/portfile.cmake b/ports/qt5-quickcontrols2/portfile.cmake new file mode 100644 index 000000000..05a7dd616 --- /dev/null +++ b/ports/qt5-quickcontrols2/portfile.cmake @@ -0,0 +1,5 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtquickcontrols2 e283320aabbaa153067c909804cb34bbcbf6fcb7246bb214957b6092ceb0f01c4fae2efd9d7a6cb011274deafff4aaf0a45dbda06a3fdce1154622e48740048c) diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index e56858730..7ef7e109d 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 Version: 5.9.2-1 Description: Qt5 Application Framework -Build-Depends: qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-imageformats, qt5-multimedia, qt5-networkauth, qt5-scxml, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-websockets, qt5-3d, qt5-winextras, qt5-xmlpatterns \ No newline at end of file +Build-Depends: qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-imageformats, qt5-multimedia, qt5-networkauth, qt5-quickcontrols2, qt5-scxml, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-websockets, qt5-3d, qt5-winextras, qt5-xmlpatterns \ No newline at end of file -- cgit v1.2.3 From c1f8dadafecf11619c2291ec3de5ccff4ca76cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20He=C3=9F?= Date: Mon, 12 Feb 2018 18:09:42 +0100 Subject: add qt5-quickcontrols port --- ports/qt5-quickcontrols/CONTROL | 4 ++++ ports/qt5-quickcontrols/portfile.cmake | 7 +++++++ ports/qt5/CONTROL | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 ports/qt5-quickcontrols/CONTROL create mode 100644 ports/qt5-quickcontrols/portfile.cmake diff --git a/ports/qt5-quickcontrols/CONTROL b/ports/qt5-quickcontrols/CONTROL new file mode 100644 index 000000000..64806cdca --- /dev/null +++ b/ports/qt5-quickcontrols/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-quickcontrols +Version: 5.9.2-0 +Description: Qt5 QuickControls Module. +Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-quickcontrols/portfile.cmake b/ports/qt5-quickcontrols/portfile.cmake new file mode 100644 index 000000000..98e491a23 --- /dev/null +++ b/ports/qt5-quickcontrols/portfile.cmake @@ -0,0 +1,7 @@ +SET(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtquickcontrols fd5833bd3823e3a53b54ac542857af5bb109952035869ad0a151e807abc9d304ef5d3fa04b75df3b59faf0b95412f593d86b56198f96734f3a75b1620688ba4f) diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index 7ef7e109d..469fbe8bf 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 Version: 5.9.2-1 Description: Qt5 Application Framework -Build-Depends: qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-imageformats, qt5-multimedia, qt5-networkauth, qt5-quickcontrols2, qt5-scxml, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-websockets, qt5-3d, qt5-winextras, qt5-xmlpatterns \ No newline at end of file +Build-Depends: qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-imageformats, qt5-multimedia, qt5-networkauth, qt5-quickcontrols, qt5-quickcontrols2, qt5-scxml, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-websockets, qt5-3d, qt5-winextras, qt5-xmlpatterns \ No newline at end of file -- cgit v1.2.3 From 2107d0b0511cab2e37b0689d6f685f5b977be557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20He=C3=9F?= Date: Mon, 12 Feb 2018 18:13:17 +0100 Subject: add qt5-graphicaleffects --- ports/qt5-graphicaleffects/CONTROL | 4 ++++ ports/qt5-graphicaleffects/portfile.cmake | 7 +++++++ ports/qt5/CONTROL | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 ports/qt5-graphicaleffects/CONTROL create mode 100644 ports/qt5-graphicaleffects/portfile.cmake diff --git a/ports/qt5-graphicaleffects/CONTROL b/ports/qt5-graphicaleffects/CONTROL new file mode 100644 index 000000000..caecc6599 --- /dev/null +++ b/ports/qt5-graphicaleffects/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-graphicaleffects +Version: 5.9.2-0 +Description: Qt5 GraphicalEffects Module. +Build-Depends: qt5-modularscripts, qt5-base diff --git a/ports/qt5-graphicaleffects/portfile.cmake b/ports/qt5-graphicaleffects/portfile.cmake new file mode 100644 index 000000000..372d62b6a --- /dev/null +++ b/ports/qt5-graphicaleffects/portfile.cmake @@ -0,0 +1,7 @@ +SET(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) + +qt_modular_library(qtgraphicaleffects 66464c26c9cc78763fda18898cd9c424bc4c0a5cbffc83d68d388e53327aeb77ae0e3c2c4cea947c3b6b7ec5af7bf5124492fc9642ff3c4ba75b06b9fa3883a4) diff --git a/ports/qt5/CONTROL b/ports/qt5/CONTROL index 469fbe8bf..dc34eee95 100644 --- a/ports/qt5/CONTROL +++ b/ports/qt5/CONTROL @@ -1,4 +1,4 @@ Source: qt5 Version: 5.9.2-1 Description: Qt5 Application Framework -Build-Depends: qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-imageformats, qt5-multimedia, qt5-networkauth, qt5-quickcontrols, qt5-quickcontrols2, qt5-scxml, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-websockets, qt5-3d, qt5-winextras, qt5-xmlpatterns \ No newline at end of file +Build-Depends: qt5-base, qt5-charts, qt5-datavis3d, qt5-declarative, qt5-gamepad, qt5-graphicaleffects, qt5-imageformats, qt5-multimedia, qt5-networkauth, qt5-quickcontrols, qt5-quickcontrols2, qt5-scxml, qt5-serialport, qt5-speech, qt5-svg, qt5-tools, qt5-virtualkeyboard, qt5-websockets, qt5-3d, qt5-winextras, qt5-xmlpatterns \ No newline at end of file -- cgit v1.2.3 From d8f3fffd5e12b241d9cc0ef67a46c087d4c63949 Mon Sep 17 00:00:00 2001 From: Jason Juang Date: Tue, 13 Feb 2018 00:00:27 -0800 Subject: change compile order to debug first, fix #2767 (#2785) --- scripts/cmake/vcpkg_build_cmake.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 8bafee4d4..bdf192792 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -61,7 +61,7 @@ function(vcpkg_build_cmake) set(PARALLEL_ARG ${NO_PARALLEL_ARG}) endif() - foreach(BUILDTYPE "release" "debug") + foreach(BUILDTYPE "debug" "release") if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) if(BUILDTYPE STREQUAL "debug") set(SHORT_BUILDTYPE "dbg") -- cgit v1.2.3 From 4fd4c03dd85bec35d39a9da4af1a00cf975801ef Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Feb 2018 00:01:51 -0800 Subject: [liblzma] Add usage information --- ports/liblzma/portfile.cmake | 2 ++ ports/liblzma/usage | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 ports/liblzma/usage diff --git a/ports/liblzma/portfile.cmake b/ports/liblzma/portfile.cmake index be7e494ad..34aa83e77 100644 --- a/ports/liblzma/portfile.cmake +++ b/ports/liblzma/portfile.cmake @@ -31,3 +31,5 @@ endif() file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma) file(RENAME ${CURRENT_PACKAGES_DIR}/share/liblzma/COPYING ${CURRENT_PACKAGES_DIR}/share/liblzma/copyright) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma) diff --git a/ports/liblzma/usage b/ports/liblzma/usage new file mode 100644 index 000000000..6f5a281a5 --- /dev/null +++ b/ports/liblzma/usage @@ -0,0 +1,5 @@ +The package liblzma is compatible with built-in CMake targets: + + find_package(LibLZMA REQUIRED) + target_include_directories(main PRIVATE ${LIBLZMA_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${LIBLZMA_LIBRARIES}) -- cgit v1.2.3 From 317b2ea082d1b48c9f107a1dc1ba882d278b2f84 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 14 Feb 2018 01:04:12 +0100 Subject: [ffmpeg] Allow static builds of ffmpeg (#2783) ffmpeg creates static .a libraries, so change the suffix to .lib --- ports/ffmpeg/create-lib-libraries.patch | 26 ++++++++++++++++++++++++++ ports/ffmpeg/portfile.cmake | 9 +++------ 2 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 ports/ffmpeg/create-lib-libraries.patch diff --git a/ports/ffmpeg/create-lib-libraries.patch b/ports/ffmpeg/create-lib-libraries.patch new file mode 100644 index 000000000..dcc767cd2 --- /dev/null +++ b/ports/ffmpeg/create-lib-libraries.patch @@ -0,0 +1,26 @@ +From 5f7c72d6c93fb1f4a730e2315fff6e5eb9bb95c8 Mon Sep 17 00:00:00 2001 +From: Anonymous Maarten +Date: Wed, 27 Sep 2017 15:50:40 +0200 +Subject: [PATCH] configure: create .lib static libraries using MSVC compiler + (instead of .a) + +--- + configure | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure b/configure +index ba38a73906..0a3f308323 100755 +--- a/configure ++++ b/configure +@@ -5031,6 +5031,8 @@ case $target_os in + fi + enabled x86_32 && check_ldflags -LARGEADDRESSAWARE + shlibdir_default="$bindir_default" ++ LIBPREF="" ++ LIBSUF=".lib" + SLIBPREF="" + SLIBSUF=".dll" + SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)' +-- +2.14.1.windows.1 + diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 0b3002c87..4a0d052a3 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -1,8 +1,3 @@ -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message(STATUS "Building as static libraries not currently supported. Building as DLLs instead.") - set(VCPKG_LIBRARY_LINKAGE "dynamic") -endif() - include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ffmpeg-3.3.3) vcpkg_download_distfile(ARCHIVE @@ -13,7 +8,9 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/detect-openssl.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/create-lib-libraries.patch + ${CMAKE_CURRENT_LIST_DIR}/detect-openssl.patch ) vcpkg_find_acquire_program(YASM) -- cgit v1.2.3 From a40559a76d745884d15881ae288fd4b81730dfbb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Feb 2018 16:05:09 -0800 Subject: [ffmpeg] Bump version for PR #2783 --- ports/ffmpeg/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 0b9d22dba..a2111c03a 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,5 +1,5 @@ Source: ffmpeg -Version: 3.3.3-1 +Version: 3.3.3-2 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. -- cgit v1.2.3 From 89bd6330dc28a5171a043910922534966bc379b5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Feb 2018 16:08:04 -0800 Subject: [aubio] Update to handle static FFMPEG --- ports/aubio/CMakeLists.txt | 7 ++++++- ports/aubio/CONTROL | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ports/aubio/CMakeLists.txt b/ports/aubio/CMakeLists.txt index 50e61339e..a405a48de 100644 --- a/ports/aubio/CMakeLists.txt +++ b/ports/aubio/CMakeLists.txt @@ -37,8 +37,10 @@ find_library(OGG_LIB ogg) find_library(FLAC_LIB flac) find_library(VORBIS_LIB vorbis) find_library(VORBISENC_LIB vorbisenc) +find_package(BZip2 REQUIRED) +find_package(LibLZMA REQUIRED) -include_directories(src ${LIBSNDFILE_H}) +include_directories(src ${LIBSNDFILE_H} ${LIBLZMA_INCLUDE_DIRS}) file(GLOB_RECURSE SOURCES src/*.c) @@ -56,7 +58,10 @@ target_link_libraries(aubio PUBLIC ${AVFILTER_LIB} ${AVFORMAT_LIB} ${SWRESAMPLE_LIB} + BZip2::BZip2 + ${LIBLZMA_LIBRARIES} ws2_32.lib + Secur32.lib ) if(BUILD_TOOLS) diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL index 7261afd80..945157c7e 100644 --- a/ports/aubio/CONTROL +++ b/ports/aubio/CONTROL @@ -1,4 +1,4 @@ Source: aubio -Version: 0.4.6 +Version: 0.4.6-1 Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis -- cgit v1.2.3 From 78b1396b88f93f74f9a007599e5998026445f14f Mon Sep 17 00:00:00 2001 From: Bruce Jones Date: Tue, 13 Feb 2018 19:13:27 -0500 Subject: Copy local dependencies for library targets (#2787) * Fix for issue #2786 * [vcpkg-cmake-toolchain] Only applocal dependencies for shared libraries --- scripts/buildsystems/vcpkg.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 0cb311555..ceb43940b 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -163,6 +163,15 @@ function(add_library name) list(FIND ARGV "INTERFACE" INTERFACE_IDX) list(FIND ARGV "ALIAS" ALIAS_IDX) if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) + get_target_property(IS_LIBRARY_SHARED ${name} TYPE) + if(VCPKG_APPLOCAL_DEPS AND _VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp" AND IS_LIBRARY_SHARED STREQUAL "SHARED_LIBRARY") + add_custom_command(TARGET ${name} POST_BUILD + COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 + -targetBinary $ + -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/bin" + -OutVariable out + ) + endif() set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) endif() -- cgit v1.2.3 From d1e8095d634aa010a2974f23a90cca3ddc2f7fb5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 13 Feb 2018 16:43:42 -0800 Subject: [uriparser] Update to 0.8.5 --- ports/uriparser/CMakeLists.txt | 28 +++------------------------- ports/uriparser/CONTROL | 2 +- ports/uriparser/portfile.cmake | 13 +++++++------ 3 files changed, 11 insertions(+), 32 deletions(-) diff --git a/ports/uriparser/CMakeLists.txt b/ports/uriparser/CMakeLists.txt index ec7f7bf38..47a6fbac1 100644 --- a/ports/uriparser/CMakeLists.txt +++ b/ports/uriparser/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.8) -project(uriparser C CXX) +project(uriparser C) if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) @@ -7,30 +7,9 @@ endif() include_directories(include) -set(SRC - src/UriCommon.c - src/UriCommon.h - src/UriCompare.c - src/UriEscape.c - src/UriFile.c - src/UriIp4.c - src/UriIp4Base.c - src/UriIp4Base.h - src/UriNormalize.c - src/UriNormalizeBase.c - src/UriNormalizeBase.h - src/UriParse.c - src/UriParseBase.c - src/UriParseBase.h - src/UriQuery.c - src/UriRecompose.c - src/UriResolve.c - src/UriShorten.c -) +file(GLOB SRC src/*.c) -if(BUILD_SHARED_LIBS) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -endif() +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) add_library(uriparser ${SRC}) @@ -41,7 +20,6 @@ install( ARCHIVE DESTINATION lib ) - if(NOT DISABLE_INSTALL_HEADERS) install(DIRECTORY include/ DESTINATION include) endif() diff --git a/ports/uriparser/CONTROL b/ports/uriparser/CONTROL index 76f975dad..553d44de9 100644 --- a/ports/uriparser/CONTROL +++ b/ports/uriparser/CONTROL @@ -1,3 +1,3 @@ Source: uriparser -Version: 0.8.4-1 +Version: 0.8.5 Description: uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C. uriparser is cross-platform, fast, supports Unicode diff --git a/ports/uriparser/portfile.cmake b/ports/uriparser/portfile.cmake index 040e3a9d7..cb8f1b14a 100644 --- a/ports/uriparser/portfile.cmake +++ b/ports/uriparser/portfile.cmake @@ -1,12 +1,13 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/uriparser-0.8.4) -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/uriparser/files/Sources/0.8.4/uriparser-0.8.4.zip/download" - FILENAME "uriparser-0.8.4.zip" - SHA512 c22a98a027c4caa1d3559b1d3112f7ac567a489037d2b38f1999483f623a2e8d79fbacdc8859fe4e669a12f0f55935179f7be2f4424c61e51d1d68f6ced37185 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO uriparser/uriparser + REF uriparser-0.8.5 + SHA512 b5a4eb316b96bdd5b87cac9fdd30b8988c158914e71030a45aafabd04df67a94bba9696782d98e9fa2169baf351e95ab1479bc76d8afe37968a941bc27a3ffb6 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 55ed8a0131e2bd970ffc1b70b5c6bd952eb10345 Mon Sep 17 00:00:00 2001 From: Youngho Kim Date: Wed, 14 Feb 2018 13:52:02 +0900 Subject: modify pthread download url modify pthread download url --- ports/pthreads/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index 2f540316e..fa7d4a326 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -5,7 +5,7 @@ endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pthreads-w32-2-9-1-release) vcpkg_download_distfile(ARCHIVE - URLS "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz" + URLS "https://www.mirrorservice.org/sites/sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz" FILENAME "pthreads-w32-2-9-1-release.tar.gz" SHA512 9c06e85310766834370c3dceb83faafd397da18a32411ca7645c8eb6b9495fea54ca2872f4a3e8d83cb5fdc5dea7f3f0464be5bb9af3222a6534574a184bd551 ) -- cgit v1.2.3 From 7bdf54e6d26467e90467381a3dc76ac0946899b1 Mon Sep 17 00:00:00 2001 From: Youngho Kim Date: Wed, 14 Feb 2018 14:10:11 +0900 Subject: modify glew download url sourceforge download url was deprecated, modifing pthread download url to github url. --- ports/glew/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake index dddaf51c1..ea455293f 100644 --- a/ports/glew/portfile.cmake +++ b/ports/glew/portfile.cmake @@ -3,7 +3,7 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glew/glew-2.1.0) vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.tgz" + URLS "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz" FILENAME "glew-2.1.0.tgz" SHA512 9a9b4d81482ccaac4b476c34ed537585ae754a82ebb51c3efa16d953c25cc3931be46ed2e49e79c730cd8afc6a1b78c97d52cd714044a339c3bc29734cd4d2ab ) -- cgit v1.2.3 From 425d07ef7f82541e50cc8cb1e2716fc33bba7b12 Mon Sep 17 00:00:00 2001 From: Jonathan Hale Date: Thu, 15 Feb 2018 01:18:25 +0100 Subject: [vcpkg] Implement Default-Features (#2697) * [vcpkg] Add Default-Feature to make_status_pgh utility function Signed-off-by: Squareys * [vcpkg] Parse "Default-Features" as dependencies and add test for parsing Signed-off-by: Squareys * [vcpkg] Document some methods and structures Signed-off-by: Squareys * [vcpkg] Add install_default_features_test Signed-off-by: Squareys * [vcpkg] Change install_default_features_test to not have preinstalled package * [vcpkg] Test install behaviour of default features Signed-off-by: Squareys * [vcpkg] Implement default features Signed-off-by: Squareys * [vcpkg] Test default features upgrade behavior Signed-off-by: Squareys * [vcpkg] Implement upgrade with default features Signed-off-by: Squareys * [vcpkg] Test behaviour of upgrade with default features in dependencies Signed-off-by: Squareys * [vcpkg] Make upgrade install new default features Signed-off-by: Squareys * [vcpkg] Move collecting of packages for which to prevent defaults Further down the line to create_feature_install_plan. Signed-off-by: Squareys * [vcpkg] Fix core missing from default features and potential inf loop Signed-off-by: Squareys * [vcpkg] Rename, fix and move some tests Signed-off-by: Squareys --- toolsrc/include/tests.utils.h | 1 + toolsrc/include/vcpkg/dependencies.h | 3 +- toolsrc/include/vcpkg/packagespec.h | 23 +++ toolsrc/include/vcpkg/sourceparagraph.h | 9 +- toolsrc/include/vcpkg/statusparagraphs.h | 5 + toolsrc/src/tests.paragraph.cpp | 35 ++++- toolsrc/src/tests.plan.cpp | 245 +++++++++++++++++++++++++++++-- toolsrc/src/tests.utils.cpp | 6 +- toolsrc/src/vcpkg/dependencies.cpp | 129 ++++++++++++++-- toolsrc/src/vcpkg/install.cpp | 5 + 10 files changed, 434 insertions(+), 27 deletions(-) diff --git a/toolsrc/include/tests.utils.h b/toolsrc/include/tests.utils.h index b23abe4eb..970506663 100644 --- a/toolsrc/include/tests.utils.h +++ b/toolsrc/include/tests.utils.h @@ -20,6 +20,7 @@ namespace Microsoft::VisualStudio::CppUnitTestFramework 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, diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 014f004a2..4abeb678e 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -151,7 +151,8 @@ namespace vcpkg::Dependencies PackageGraph(const PortFileProvider& provider, const StatusParagraphs& status_db); ~PackageGraph(); - void install(const FeatureSpec& spec) const; + void install(const FeatureSpec& spec, + const std::unordered_set& prevent_default_features = {}) const; void upgrade(const PackageSpec& spec) const; std::vector serialize() const; diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index f1119e2f3..0a4347639 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -15,6 +15,12 @@ namespace vcpkg static ExpectedT from_string(const std::string& input); }; + /// + /// + /// Full specification of a package. Contains all information to reference + /// a specific package. + /// + /// struct PackageSpec { static ExpectedT from_name_and_triplet(const std::string& name, @@ -46,6 +52,12 @@ namespace vcpkg Triplet m_triplet; }; + /// + /// + /// Full specification of a feature. Contains all information to reference + /// a single feature in a specific package. + /// + /// struct FeatureSpec { FeatureSpec(const PackageSpec& spec, const std::string& feature) : m_spec(spec), m_feature(feature) {} @@ -82,6 +94,12 @@ namespace vcpkg std::string m_feature; }; + /// + /// + /// Full specification of a package. Contains all information to reference + /// a collection of features in a single package. + /// + /// struct FullPackageSpec { PackageSpec package_spec; @@ -93,6 +111,11 @@ namespace vcpkg const Triplet& default_triplet); }; + /// + /// + /// Contains all information to reference a collection of features in a single package by their names. + /// + /// struct Features { std::string name; diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h index dcbbc1c3b..ea8e27a94 100644 --- a/toolsrc/include/vcpkg/sourceparagraph.h +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -29,6 +29,9 @@ namespace vcpkg std::string to_string(const Dependency& dep); + /// + /// Port metadata of additional feature in a package (part of CONTROL file) + /// struct FeatureParagraph { std::string name; @@ -37,7 +40,7 @@ namespace vcpkg }; /// - /// Port metadata (CONTROL file) + /// Port metadata of the core feature of a package (part of CONTROL file) /// struct SourceParagraph { @@ -49,6 +52,10 @@ namespace vcpkg std::vector depends; std::vector default_features; }; + + /// + /// Full metadata of a package: core and other features. + /// struct SourceControlFile { static Parse::ParseExpected parse_control_file( diff --git a/toolsrc/include/vcpkg/statusparagraphs.h b/toolsrc/include/vcpkg/statusparagraphs.h index fd33f8094..b3eec266a 100644 --- a/toolsrc/include/vcpkg/statusparagraphs.h +++ b/toolsrc/include/vcpkg/statusparagraphs.h @@ -6,6 +6,11 @@ namespace vcpkg { + /// Status paragraphs + /// + /// Collection of , e.g. contains the information + /// about whether a package is installed or not. + /// struct StatusParagraphs { StatusParagraphs(); diff --git a/toolsrc/src/tests.paragraph.cpp b/toolsrc/src/tests.paragraph.cpp index 9cddd7bdb..dca89bc59 100644 --- a/toolsrc/src/tests.paragraph.cpp +++ b/toolsrc/src/tests.paragraph.cpp @@ -1,4 +1,4 @@ -#include "tests.pch.h" +#include "tests.pch.h" #pragma comment(lib, "version") #pragma comment(lib, "winhttp") @@ -47,6 +47,7 @@ namespace UnitTest1 {"Maintainer", "m"}, {"Description", "d"}, {"Build-Depends", "bd"}, + {"Default-Features", "df"}, {"Supports", "x64"}, }}); Assert::IsTrue(m_pgh.has_value()); @@ -58,6 +59,8 @@ namespace UnitTest1 Assert::AreEqual("d", pgh->core_paragraph->description.c_str()); Assert::AreEqual(size_t(1), pgh->core_paragraph->depends.size()); Assert::AreEqual("bd", pgh->core_paragraph->depends[0].name().c_str()); + Assert::AreEqual(size_t(1), pgh->core_paragraph->default_features.size()); + Assert::AreEqual("df", pgh->core_paragraph->default_features[0].c_str()); Assert::AreEqual(size_t(1), pgh->core_paragraph->supports.size()); Assert::AreEqual("x64", pgh->core_paragraph->supports[0].c_str()); } @@ -134,6 +137,21 @@ namespace UnitTest1 Assert::AreEqual("uwp", pgh->core_paragraph->depends[1].qualifier.c_str()); } + TEST_METHOD(SourceParagraph_Default_Features) + { + auto m_pgh = + vcpkg::SourceControlFile::parse_control_file(std::vector>{{ + {"Source", "a"}, + {"Version", "1.0"}, + {"Default-Features", "a1"}, + }}); + Assert::IsTrue(m_pgh.has_value()); + auto& pgh = *m_pgh.get(); + + Assert::AreEqual(size_t(1), pgh->core_paragraph->default_features.size()); + Assert::AreEqual("a1", pgh->core_paragraph->default_features[0].c_str()); + } + TEST_METHOD(BinaryParagraph_Construct_Minimum) { vcpkg::BinaryParagraph pgh({ @@ -200,6 +218,21 @@ namespace UnitTest1 Assert::IsTrue(pgh.abi == "abcd123"); } + TEST_METHOD(BinaryParagraph_Default_Features) + { + vcpkg::BinaryParagraph pgh({ + {"Package", "a"}, + {"Version", "1.0"}, + {"Architecture", "x86-windows"}, + {"Multi-Arch", "same"}, + {"Default-Features", "a1"}, + }); + + Assert::AreEqual(size_t(0), pgh.depends.size()); + Assert::AreEqual(size_t(1), pgh.default_features.size()); + Assert::IsTrue(pgh.default_features[0] == "a1"); + } + TEST_METHOD(parse_paragraphs_empty) { const char* str = ""; diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 86386be14..a4c628bf6 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -9,15 +9,17 @@ using namespace vcpkg; namespace UnitTest1 { static std::unique_ptr make_control_file( - const char* name, const char* depends, const std::vector>& features = {}) + const char* name, + const char* depends, + const std::vector>& features = {}, + const std::vector& default_features = {}) { using Pgh = std::unordered_map; std::vector scf_pghs; - scf_pghs.push_back(Pgh{ - {"Source", name}, - {"Version", "0"}, - {"Build-Depends", depends}, - }); + scf_pghs.push_back(Pgh{{"Source", name}, + {"Version", "0"}, + {"Build-Depends", depends}, + {"Default-Features", Strings::join(", ", default_features)}}); for (auto&& feature : features) { scf_pghs.push_back(Pgh{ @@ -31,11 +33,15 @@ namespace UnitTest1 return std::move(*m_pgh.get()); } + /// + /// Assert that the given action an install of given features from given package. + /// static void features_check(Dependencies::AnyAction* install_action, std::string pkg_name, std::vector vec, const Triplet& triplet = Triplet::X86_WINDOWS) { + Assert::IsTrue(install_action->install_action.has_value()); const auto& plan = install_action->install_action.value_or_exit(VCPKG_LINE_INFO); const auto& feature_list = plan.feature_list; @@ -56,6 +62,9 @@ namespace UnitTest1 } } + /// + /// Assert that the given action is a remove of given package. + /// static void remove_plan_check(Dependencies::AnyAction* remove_action, std::string pkg_name, const Triplet& triplet = Triplet::X86_WINDOWS) @@ -65,6 +74,9 @@ namespace UnitTest1 Assert::AreEqual(pkg_name.c_str(), plan.spec.name().c_str()); } + /// + /// Map of source control files by their package name. + /// struct PackageSpecMap { std::unordered_map map; @@ -73,9 +85,10 @@ namespace UnitTest1 PackageSpec emplace(const char* name, const char* depends = "", - const std::vector>& features = {}) + const std::vector>& features = {}, + const std::vector& default_features = {}) { - return emplace(std::move(*make_control_file(name, depends, features))); + return emplace(std::move(*make_control_file(name, depends, features, default_features))); } PackageSpec emplace(vcpkg::SourceControlFile&& scf) { @@ -434,6 +447,190 @@ namespace UnitTest1 features_check(&install_plan[0], "a", {"0", "1", "core"}, Triplet::X64_WINDOWS); } + TEST_METHOD(install_default_features_test_1) + { + std::vector> status_paragraphs; + + // Add a port "a" with default features "1" and features "0" and "1". + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + spec_map.emplace("a", "", {{"0", ""}, {"1", ""}}, {"1"}); + + // Install "a" (without explicit feature specification) + auto install_specs = FullPackageSpec::from_string("a", Triplet::X64_WINDOWS); + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + // Expect the default feature "1" to be installed, but not "0" + Assert::IsTrue(install_plan.size() == 1); + features_check(&install_plan[0], "a", {"1", "core"}, Triplet::X64_WINDOWS); + } + + TEST_METHOD(install_default_features_test_2) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("a")); + status_paragraphs.back()->package.spec = + PackageSpec::from_name_and_triplet("a", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); + + // Add a port "a" of which "core" is already installed, but we will + // install the default features "explicitly" + // "a" has two features, of which "a1" is default. + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + spec_map.emplace("a", "", {{"a0", ""}, {"a1", ""}}, {"a1"}); + + // Install "a" (without explicit feature specification) + auto install_specs = FullPackageSpec::from_string("a", Triplet::X64_WINDOWS); + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + // Expect "a" to get removed for rebuild and then installed with default + // features. + Assert::IsTrue(install_plan.size() == 2); + remove_plan_check(&install_plan[0], "a", Triplet::X64_WINDOWS); + features_check(&install_plan[1], "a", {"a1", "core"}, Triplet::X64_WINDOWS); + } + + TEST_METHOD(install_default_features_test_3) + { + std::vector> status_paragraphs; + + // "a" has two features, of which "a1" is default. + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + spec_map.emplace("a", "", {{"a0", ""}, {"a1", ""}}, {"a1"}); + + // Explicitly install "a" without default features + auto install_specs = FullPackageSpec::from_string("a[core]", Triplet::X64_WINDOWS); + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + // Expect the default feature not to get installed. + Assert::IsTrue(install_plan.size() == 1); + features_check(&install_plan[0], "a", {"core"}, Triplet::X64_WINDOWS); + } + + TEST_METHOD(install_default_features_of_dependency_test_1) + { + std::vector> status_paragraphs; + + // Add a port "a" which depends on the core of "b" + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + spec_map.emplace("a", "b[core]"); + // "b" has two features, of which "b1" is default. + spec_map.emplace("b", "", {{"b0", ""}, {"b1", ""}}, {"b1"}); + + // Install "a" (without explicit feature specification) + auto install_specs = FullPackageSpec::from_string("a", Triplet::X64_WINDOWS); + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + // Expect "a" to get installed and defaults of "b" through the dependency, + // as no explicit features of "b" are installed by the user. + Assert::IsTrue(install_plan.size() == 2); + features_check(&install_plan[1], "a", {"core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[0], "b", {"b1", "core"}, Triplet::X64_WINDOWS); + } + + TEST_METHOD(install_default_features_of_dependency_test_2) + { + std::vector> status_paragraphs; + status_paragraphs.push_back(make_status_pgh("b")); + status_paragraphs.back()->package.spec = + PackageSpec::from_name_and_triplet("b", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); + + // Add a port "a" which depends on the core of "b", which was already + // installed explicitly + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + spec_map.emplace("a", "b[core]"); + // "b" has two features, of which "b1" is default. + spec_map.emplace("b", "", {{"b0", ""}, {"b1", ""}}, {"b1"}); + + // Install "a" (without explicit feature specification) + auto install_specs = FullPackageSpec::from_string("a", Triplet::X64_WINDOWS); + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + // Expect "a" to get installed, not the defaults of "b", as the required + // dependencies are already there, installed explicitly by the user. + Assert::IsTrue(install_plan.size() == 1); + features_check(&install_plan[0], "a", {"core"}, Triplet::X64_WINDOWS); + } + + TEST_METHOD(upgrade_with_default_features_1) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a", "", "1")); + pghs.push_back(make_status_feature_pgh("a", "0")); + pghs.back()->package.spec = + PackageSpec::from_name_and_triplet("a", Triplet::X86_WINDOWS).value_or_exit(VCPKG_LINE_INFO); + StatusParagraphs status_db(std::move(pghs)); + + // Add a port "a" of which "core" and "0" are already installed. + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a", "", {{"0", ""}, {"1", ""}}, {"1"}); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + auto plan = graph.serialize(); + + // The upgrade should not install the default feature + Assert::AreEqual(size_t(2), plan.size()); + + Assert::AreEqual("a", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + + Assert::AreEqual("a", plan[1].spec().name().c_str()); + Assert::IsTrue(plan[1].install_action.has_value()); + features_check(&plan[1], "a", {"core", "0"}, Triplet::X86_WINDOWS); + } + + TEST_METHOD(upgrade_with_default_features_2) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("b")); + pghs.push_back(make_status_pgh("a", "b[core]")); + pghs.back()->package.spec = + PackageSpec::from_name_and_triplet("a", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); + + StatusParagraphs status_db(std::move(pghs)); + + // Add a port "a" of which "core" and "0" are already installed. + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_a = spec_map.emplace("a", "b[core]"); + spec_map.emplace("b", "", {{"b0", ""}, {"b1", ""}}, {"b0"}); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + auto plan = graph.serialize(); + + // The upgrade should not install the default feature + Assert::AreEqual(size_t(3), plan.size()); + + Assert::AreEqual("a", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + + Assert::AreEqual("b", plan[1].spec().name().c_str()); + Assert::IsTrue(plan[1].install_action.has_value()); + features_check(&plan[1], "b", {"b0", "core"}, Triplet::X64_WINDOWS); + + Assert::AreEqual("a", plan[2].spec().name().c_str()); + Assert::IsTrue(plan[2].install_action.has_value()); + features_check(&plan[2], "a", {"core"}, Triplet::X64_WINDOWS); + } + TEST_METHOD(transitive_features_test) { std::vector> status_paragraphs; @@ -567,9 +764,9 @@ namespace UnitTest1 TEST_METHOD(features_depend_remove_scheme_once_removed_x64) { std::vector> pghs; - pghs.push_back(make_status_pgh("expat", "", "x64")); - pghs.push_back(make_status_pgh("vtk", "expat", "x64")); - pghs.push_back(make_status_pgh("opencv", "", "x64")); + pghs.push_back(make_status_pgh("expat", "", "", "x64")); + pghs.push_back(make_status_pgh("vtk", "expat", "", "x64")); + pghs.push_back(make_status_pgh("opencv", "", "", "x64")); pghs.push_back(make_status_feature_pgh("opencv", "vtk", "vtk", "x64")); StatusParagraphs status_db(std::move(pghs)); @@ -715,5 +912,31 @@ namespace UnitTest1 features_check(&plan[1], "a", {"core", "a1"}); } + + TEST_METHOD(basic_upgrade_scheme_with_new_default_feature) + { + // only core of package "a" is installed + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + StatusParagraphs status_db(std::move(pghs)); + + // a1 was added as a default feature and should be installed in upgrade + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a", "", {{"a1", ""}}, {"a1"}); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + + auto plan = graph.serialize(); + + Assert::AreEqual(size_t(2), plan.size()); + + Assert::AreEqual("a", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + + features_check(&plan[1], "a", {"core", "a1"}); + } }; } diff --git a/toolsrc/src/tests.utils.cpp b/toolsrc/src/tests.utils.cpp index 19e877920..a3d8ffc7d 100644 --- a/toolsrc/src/tests.utils.cpp +++ b/toolsrc/src/tests.utils.cpp @@ -35,7 +35,10 @@ namespace Microsoft::VisualStudio::CppUnitTestFramework 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* triplet) +std::unique_ptr make_status_pgh(const char* name, + const char* depends, + const char* default_features, + const char* triplet) { using Pgh = std::unordered_map; return std::make_unique(Pgh{{"Package", name}, @@ -43,6 +46,7 @@ std::unique_ptr make_status_pgh(const char* name, const char* d {"Architecture", triplet}, {"Multi-Arch", "same"}, {"Depends", depends}, + {"Default-Features", default_features}, {"Status", "install ok installed"}}); } std::unique_ptr make_status_feature_pgh(const char* name, diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 4842fde96..307c779c8 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -20,6 +20,9 @@ namespace vcpkg::Dependencies bool plus = false; }; + /// + /// Representation of a package and its features in a ClusterGraph. + /// struct Cluster : Util::MoveOnlyBase { InstalledPackageView installed_package; @@ -64,10 +67,18 @@ namespace vcpkg::Dependencies Graphs::Graph install_graph; }; + /// + /// Directional graph representing a collection of packages with their features connected by their dependencies. + /// struct ClusterGraph : Util::MoveOnlyBase { explicit ClusterGraph(const PortFileProvider& provider) : m_provider(provider) {} + /// + /// Find the cluster associated with spec or if not found, create it from the PortFileProvider. + /// + /// Package spec to get the cluster for. + /// The cluster found or created for spec. Cluster& get(const PackageSpec& spec) { auto it = m_graph.find(spec); @@ -414,16 +425,52 @@ namespace vcpkg::Dependencies static MarkPlusResult mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, - GraphPlan& graph_plan); + GraphPlan& graph_plan, + const std::unordered_set& prevent_default_features = {}); static void mark_minus(Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan); - MarkPlusResult mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) + MarkPlusResult mark_plus(const std::string& feature, + Cluster& cluster, + ClusterGraph& graph, + GraphPlan& graph_plan, + const std::unordered_set& prevent_default_features) { if (feature.empty()) { - // Indicates that core was not specified in the reference - return mark_plus("core", cluster, graph, graph_plan); + if (prevent_default_features.find(cluster.spec.name()) == prevent_default_features.end()) + { + // Indicates that core was not specified in the reference + + // Add default features for this package, if this is the "core" feature and we + // are not supposed to prevent default features for this package + if (auto scf = cluster.source_control_file.value_or(nullptr)) + { + for (auto&& default_feature : scf->core_paragraph.get()->default_features) + { + auto res = mark_plus(default_feature, cluster, graph, graph_plan, prevent_default_features); + if (res != MarkPlusResult::SUCCESS) + { + return res; + } + } + + // "core" is always an implicit default feature. In case we did not add it as + // a dependency above (e.g. no default features), add it here. + auto res = mark_plus("core", cluster, graph, graph_plan, prevent_default_features); + if (res != MarkPlusResult::SUCCESS) + { + return res; + } + } + + return MarkPlusResult::SUCCESS; + } + else + { + // Skip adding the default features, as explicitly told not to. + return MarkPlusResult::SUCCESS; + } } auto it = cluster.edges.find(feature); @@ -454,16 +501,21 @@ namespace vcpkg::Dependencies if (feature != "core") { // All features implicitly depend on core - auto res = mark_plus("core", cluster, graph, graph_plan); + auto res = mark_plus("core", cluster, graph, graph_plan, prevent_default_features); // Should be impossible for "core" to not exist Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS); } + else + { + // Add the default features of this package. + auto res = mark_plus("", cluster, graph, graph_plan, prevent_default_features); + } for (auto&& depend : cluster.edges[feature].build_edges) { auto& depend_cluster = graph.get(depend.spec()); - auto res = mark_plus(depend.feature(), depend_cluster, graph, graph_plan); + auto res = mark_plus(depend.feature(), depend_cluster, graph, graph_plan, prevent_default_features); Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, @@ -483,6 +535,18 @@ namespace vcpkg::Dependencies if (cluster.will_remove) return; cluster.will_remove = true; + std::unordered_set prevent_default_features; + + if (cluster.request_type == RequestType::USER_REQUESTED) + { + // Do not install default features for packages which the user + // installed explicitly. New default features for dependent + // clusters should still be upgraded. + prevent_default_features.insert(cluster.spec.name()); + + // For dependent packages this is handles through the recursion + } + graph_plan.remove_graph.add_vertex({&cluster}); for (auto&& pair : cluster.edges) { @@ -498,7 +562,7 @@ namespace vcpkg::Dependencies cluster.transient_uninstalled = true; for (auto&& original_feature : cluster.original_features) { - auto res = mark_plus(original_feature, cluster, graph, graph_plan); + auto res = mark_plus(original_feature, cluster, graph, graph_plan, prevent_default_features); if (res != MarkPlusResult::SUCCESS) { System::println(System::Color::warning, @@ -506,19 +570,54 @@ namespace vcpkg::Dependencies FeatureSpec{cluster.spec, original_feature}); } } + + // Check if any default features have been added + if (auto scf = cluster.source_control_file.value_or(nullptr)) + { + auto& previous_df = cluster.installed_package.core->package.default_features; + for (auto&& default_feature : scf->core_paragraph->default_features) + { + if (std::find(previous_df.begin(), previous_df.end(), default_feature) == previous_df.end()) + { + // this is a new default feature, mark it for installation + auto res = mark_plus(default_feature, cluster, graph, graph_plan); + if (res != MarkPlusResult::SUCCESS) + { + System::println(System::Color::warning, + "Warning: could not install new default feature %s", + FeatureSpec{cluster.spec, default_feature}); + } + } + } + } } + /// Figure out which actions are required to install features specifications in `specs`. + /// Contains the ports of the current environment. + /// Feature specifications to resolve dependencies for. + /// Status of installed packages in the current environment. std::vector create_feature_install_plan(const PortFileProvider& provider, const std::vector& specs, const StatusParagraphs& status_db) { + std::unordered_set prevent_default_features; + for (auto&& spec : specs) + { + // When "core" is explicitly listed, default features should not be installed. + if (spec.feature() == "core") prevent_default_features.insert(spec.name()); + } + PackageGraph pgraph(provider, status_db); for (auto&& spec : specs) - pgraph.install(spec); + pgraph.install(spec, prevent_default_features); return pgraph.serialize(); } + /// Figure out which actions are required to install features specifications in `specs`. + /// Map of all source 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, const std::vector& specs, const StatusParagraphs& status_db) @@ -527,7 +626,12 @@ namespace vcpkg::Dependencies return create_feature_install_plan(provider, specs, status_db); } - void PackageGraph::install(const FeatureSpec& spec) const + /// + /// List of package names for which default features should not be installed instead of the core package (e.g. if + /// the user is currently installing specific features of that package). + /// + void PackageGraph::install(const FeatureSpec& spec, + const std::unordered_set& prevent_default_features) const { Cluster& spec_cluster = m_graph->get(spec.spec()); spec_cluster.request_type = RequestType::USER_REQUESTED; @@ -537,13 +641,14 @@ namespace vcpkg::Dependencies { for (auto&& feature : p_scf->feature_paragraphs) { - auto res = mark_plus(feature->name, spec_cluster, *m_graph, *m_graph_plan); + auto res = + mark_plus(feature->name, spec_cluster, *m_graph, *m_graph_plan, prevent_default_features); Checks::check_exit( VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); } - auto res = mark_plus("core", spec_cluster, *m_graph, *m_graph_plan); + auto res = mark_plus("core", spec_cluster, *m_graph, *m_graph_plan, prevent_default_features); Checks::check_exit( VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); @@ -556,7 +661,7 @@ namespace vcpkg::Dependencies } else { - auto res = mark_plus(spec.feature(), spec_cluster, *m_graph, *m_graph_plan); + auto res = mark_plus(spec.feature(), spec_cluster, *m_graph, *m_graph_plan, prevent_default_features); Checks::check_exit( VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 081063633..595945d39 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -513,6 +513,11 @@ namespace vcpkg::Install } } + /// + /// + /// Run "install" command. + /// + /// void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { // input sanitization -- cgit v1.2.3 From 0d29d2fe869863640253c1486e2a83c6941d2b8a Mon Sep 17 00:00:00 2001 From: Patrik Huber Date: Thu, 15 Feb 2018 01:00:25 +0000 Subject: Updated boost license to 1.66.0 (#2795) I was a bit confused to see a reference to "1.65.1" while I was installing 1.66.0, but it turns out this URL is just not updated. This updates it. --- ports/boost-build/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/boost-build/portfile.cmake b/ports/boost-build/portfile.cmake index 9a02b061e..ea2b57261 100644 --- a/ports/boost-build/portfile.cmake +++ b/ports/boost-build/portfile.cmake @@ -19,7 +19,7 @@ vcpkg_from_github( ) vcpkg_download_distfile(ARCHIVE - URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.65.1/LICENSE_1_0.txt" + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.66.0/LICENSE_1_0.txt" FILENAME "boost_LICENSE_1_0.txt" SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 ) -- cgit v1.2.3 From f279e9f5e3a569b237dbaca44bbc7225f1d7e27d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 14 Feb 2018 18:04:16 -0800 Subject: [vcpkg-find-acquire-program] Add mirror for NASM. Fixes #2777. --- scripts/cmake/vcpkg_find_acquire_program.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 066126e6c..1e6979bad 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -55,7 +55,10 @@ function(vcpkg_find_acquire_program VAR) elseif(VAR MATCHES "NASM") set(PROGNAME nasm) set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.12.02) - set(URL "http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win32/nasm-2.12.02-win32.zip") + set(URL + "http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win32/nasm-2.12.02-win32.zip" + "http://mirrors.kodi.tv/build-deps/win32/nasm-2.12.02-win32.zip" + ) set(ARCHIVE "nasm-2.12.02-win32.zip") set(HASH df7aaba094e17832688c88993997612a2e2c96cc3dc14ca3e8347b44c7762115f5a7fc6d7f20be402553aaa4c9e43ddfcf6228f581cfe89289bae550de151b36) elseif(VAR MATCHES "YASM") -- cgit v1.2.3 From d5cb490fc02b9b0c26d869fabf3b37158586236f Mon Sep 17 00:00:00 2001 From: Jason Juang Date: Thu, 15 Feb 2018 17:42:35 -0800 Subject: update cuda requirement to 9.0, fixes #2791 (#2802) * update cuda requirement to 9.0, fixes #2791 * [cuda] Restore sample version blob --- ports/cuda/CONTROL | 2 +- ports/cuda/portfile.cmake | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ports/cuda/CONTROL b/ports/cuda/CONTROL index 0bf29b7b6..271869e8b 100644 --- a/ports/cuda/CONTROL +++ b/ports/cuda/CONTROL @@ -1,3 +1,3 @@ Source: cuda -Version: 8.0-1 +Version: 9.0 Description: A parallel computing platform and programming model \ No newline at end of file diff --git a/ports/cuda/portfile.cmake b/ports/cuda/portfile.cmake index ee876ce50..7cc1773db 100644 --- a/ports/cuda/portfile.cmake +++ b/ports/cuda/portfile.cmake @@ -20,26 +20,26 @@ if (NVCC) RESULT_VARIABLE error_code) endif() -# Sample output -# NVIDIA (R) Cuda compiler driver -# Copyright (c) 2005-2016 NVIDIA Corporation -# Built on Sat_Sep__3_19:05:48_CDT_2016 -# Cuda compilation tools, release 8.0, V8.0.44 -set(CUDA_REQUIRED_VERSION "V8.0.0") +set(CUDA_REQUIRED_VERSION "V9.0.0") if (error_code) message(FATAL_ERROR "Could not find CUDA. Before continuing, please download and install CUDA (${CUDA_REQUIRED_VERSION} or higher) from:" "\n https://developer.nvidia.com/cuda-downloads\n" - "\nAlso ensure vcpkg has been rebuilt with the latest version (v0.0.79 or later)") + "\nAlso ensure vcpkg has been rebuilt with the latest version (v0.0.104 or later)") endif() +# Sample output: +# NVIDIA (R) Cuda compiler driver +# Copyright (c) 2005-2016 NVIDIA Corporation +# Built on Sat_Sep__3_19:05:48_CDT_2016 +# Cuda compilation tools, release 8.0, V8.0.44 string(REGEX MATCH "V([0-9]+)\\.([0-9]+)\\.([0-9]+)" CUDA_VERSION ${NVCC_OUTPUT}) message(STATUS "Found CUDA ${CUDA_VERSION}") set(CUDA_VERSION_MAJOR ${CMAKE_MATCH_1}) #set(CUDA_VERSION_MINOR ${CMAKE_MATCH_2}) #set(CUDA_VERSION_PATCH ${CMAKE_MATCH_3}) -if (CUDA_VERSION_MAJOR LESS 8) +if (CUDA_VERSION_MAJOR LESS 9) message(FATAL_ERROR "CUDA ${CUDA_VERSION} but ${CUDA_REQUIRED_VERSION} is required. Please download and install a more recent version of CUDA from:" "\n https://developer.nvidia.com/cuda-downloads\n") endif() -- cgit v1.2.3 From bfac7b57161168b8b54ea159bbf2c88794098c1c Mon Sep 17 00:00:00 2001 From: Fujii Hironori Date: Fri, 16 Feb 2018 21:25:12 +0900 Subject: [vcpkg] http_proxy and https_proxy should be lowercase (#2815) Pacman of Msys understands only lowercase environment variables http_proxy and https_proxy. --- toolsrc/src/vcpkg/base/system.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 84721bf6e..f71fd8445 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -175,8 +175,8 @@ namespace vcpkg::System L"USERPROFILE", L"windir", // Enables proxy information to be passed to Curl, the underlying download library in cmake.exe - L"HTTP_PROXY", - L"HTTPS_PROXY", + L"http_proxy", + L"https_proxy", // Enables find_package(CUDA) in CMake L"CUDA_PATH", // Environmental variable generated automatically by CUDA after installation -- cgit v1.2.3 From 16faed678540be37ea623fa7f0f2c2e7c442b147 Mon Sep 17 00:00:00 2001 From: Squareys Date: Fri, 16 Feb 2018 14:27:04 +0100 Subject: [vcpkg] Add find/find_installed/is_installed for FeatureSpec Signed-off-by: Squareys --- toolsrc/include/vcpkg/statusparagraphs.h | 31 ++++++++++++++++++++++++++++++ toolsrc/src/tests.statusparagraphs.cpp | 33 ++++++++++++++++++++++++++++++++ toolsrc/src/vcpkg/statusparagraphs.cpp | 19 ++++++++++++++++++ 3 files changed, 83 insertions(+) diff --git a/toolsrc/include/vcpkg/statusparagraphs.h b/toolsrc/include/vcpkg/statusparagraphs.h index b3eec266a..fa064de7e 100644 --- a/toolsrc/include/vcpkg/statusparagraphs.h +++ b/toolsrc/include/vcpkg/statusparagraphs.h @@ -20,7 +20,21 @@ namespace vcpkg using iterator = container::reverse_iterator; using const_iterator = container::const_reverse_iterator; + /// Find the StatusParagraph for given spec. + /// Package specification to find the status paragraph for + /// Iterator for found spec const_iterator find(const PackageSpec& spec) const { return find(spec.name(), spec.triplet()); } + + /// Find the StatusParagraph for given feature spec. + /// Feature specification to find the status paragraph for + /// Iterator for found spec + const_iterator find(const FeatureSpec& spec) const { return find(spec.name(), spec.triplet(), spec.feature()); } + + /// Find a StatusParagraph by name, triplet and feature. + /// Package name + /// Triplet + /// Feature name + /// Iterator for found spec iterator find(const std::string& name, const Triplet& triplet, const std::string& feature = ""); const_iterator find(const std::string& name, const Triplet& triplet, const std::string& feature = "") const; @@ -28,9 +42,26 @@ namespace vcpkg Optional find_all_installed(const PackageSpec& spec) const; + /// Find the StatusParagraph for given spec if installed + /// Package specification to find the status for + /// Iterator for found spec const_iterator find_installed(const PackageSpec& spec) const; + + /// Find the StatusParagraph for given feature spec if installed + /// Feature specification to find the status for + /// Iterator for found spec + const_iterator find_installed(const FeatureSpec& spec) const; + + /// Find the StatusParagraph for given spec and return its install status + /// Package specification to check if installed + /// `true` if installed, `false` if not or not found. bool is_installed(const PackageSpec& spec) const; + /// Find the StatusParagraph for given feature spec and return its install status + /// Feature specification to check if installed + /// `true` if installed, `false` if not or not found. + bool is_installed(const FeatureSpec& spec) const; + iterator insert(std::unique_ptr); friend void serialize(const StatusParagraphs& pgh, std::string& out_str); diff --git a/toolsrc/src/tests.statusparagraphs.cpp b/toolsrc/src/tests.statusparagraphs.cpp index 0d5324a8c..fa0d54fac 100644 --- a/toolsrc/src/tests.statusparagraphs.cpp +++ b/toolsrc/src/tests.statusparagraphs.cpp @@ -77,6 +77,39 @@ Status: purge ok not-installed auto it = status_db.find_installed(unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS)); Assert::IsTrue(it != status_db.end()); + + // Feature "openssl" is not installed and should not be found + auto it1 = status_db.find_installed({unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS), "openssl"}); + Assert::IsTrue(it1 == status_db.end()); + } + + TEST_METHOD(find_for_feature_packages) + { + auto pghs = parse_paragraphs(R"( +Package: ffmpeg +Version: 3.3.3 +Architecture: x64-windows +Multi-Arch: same +Description: +Status: install ok installed + +Package: ffmpeg +Feature: openssl +Depends: openssl +Architecture: x64-windows +Multi-Arch: same +Description: +Status: install ok installed +)"); + Assert::IsTrue(!!pghs); + if (!pghs) return; + + StatusParagraphs status_db(Util::fmap( + *pghs.get(), [](RawParagraph& rpgh) { return std::make_unique(std::move(rpgh)); })); + + // Feature "openssl" is installed and should therefore be found + auto it = status_db.find_installed({unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS), "openssl"}); + Assert::IsTrue(it != status_db.end()); } }; } diff --git a/toolsrc/src/vcpkg/statusparagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp index 475f86279..b23d8b884 100644 --- a/toolsrc/src/vcpkg/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg/statusparagraphs.cpp @@ -83,12 +83,31 @@ namespace vcpkg } } + StatusParagraphs::const_iterator StatusParagraphs::find_installed(const FeatureSpec& spec) const + { + auto it = find(spec); + if (it != end() && (*it)->is_installed()) + { + return it; + } + else + { + return end(); + } + } + bool vcpkg::StatusParagraphs::is_installed(const PackageSpec& spec) const { auto it = find(spec); return it != end() && (*it)->is_installed(); } + bool vcpkg::StatusParagraphs::is_installed(const FeatureSpec& spec) const + { + auto it = find(spec); + return it != end() && (*it)->is_installed(); + } + StatusParagraphs::iterator StatusParagraphs::insert(std::unique_ptr pgh) { Checks::check_exit(VCPKG_LINE_INFO, pgh != nullptr, "Inserted null paragraph"); -- cgit v1.2.3 From f1ce125a28c98fd5a87bf509ac965b06c219d8f3 Mon Sep 17 00:00:00 2001 From: Squareys Date: Fri, 16 Feb 2018 14:27:32 +0100 Subject: [vcpkg] Fix build command for packages that depend of features Signed-off-by: Squareys --- toolsrc/include/vcpkg/build.h | 4 ++-- toolsrc/src/vcpkg/build.cpp | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index e3f8bf79e..d7c5c8344 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -104,11 +104,11 @@ namespace vcpkg::Build struct ExtendedBuildResult { ExtendedBuildResult(BuildResult code); - ExtendedBuildResult(BuildResult code, std::vector&& unmet_deps); + ExtendedBuildResult(BuildResult code, std::vector&& unmet_deps); ExtendedBuildResult(BuildResult code, std::unique_ptr&& bcf); BuildResult code; - std::vector unmet_dependencies; + std::vector unmet_dependencies; std::unique_ptr binary_control_file; }; diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 7de276f4f..cc376c773 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -267,13 +267,16 @@ namespace vcpkg::Build const Triplet& triplet = config.triplet; { - std::vector missing_specs; + std::vector missing_specs; for (auto&& dep : filter_dependencies(config.scf.core_paragraph->depends, triplet)) { - auto dep_spec = PackageSpec::from_name_and_triplet(dep, triplet).value_or_exit(VCPKG_LINE_INFO); - if (!status_db.is_installed(dep_spec)) + auto dep_specs = FeatureSpec::from_strings_and_triplet({dep}, triplet); + for (auto&& feature : dep_specs) { - missing_specs.push_back(std::move(dep_spec)); + if (!status_db.is_installed(feature)) + { + missing_specs.push_back(std::move(feature)); + } } } // Fail the build if any dependencies were missing @@ -600,7 +603,7 @@ namespace vcpkg::Build : code(code), binary_control_file(std::move(bcf)) { } - ExtendedBuildResult::ExtendedBuildResult(BuildResult code, std::vector&& unmet_deps) + ExtendedBuildResult::ExtendedBuildResult(BuildResult code, std::vector&& unmet_deps) : code(code), unmet_dependencies(std::move(unmet_deps)) { } -- cgit v1.2.3 From cc779ce6928d7682c252bda2d616b3e85dc843c7 Mon Sep 17 00:00:00 2001 From: Stephen Kyne Date: Fri, 16 Feb 2018 22:42:54 +0000 Subject: [liblo] Initial port (#2821) * [portaudio] Added ASIO support to build * Update libpng to 1.6.34 * [liblo] Initial port * Revert "Update libpng to 1.6.34" This reverts commit ede0bb947b07aea119b7b05e3625c3eec1395af4. * Revert "[liblo] Initial port" This reverts commit bb819eb21841bb8cf4816af5a78e17ef58ec8ce5. * [liblo] Initial port * [liblo] Use vcpkg_from_github() and vcpkg_fixup_cmake_targets() * [liblo] Fix SHA512 --- ports/liblo/CONTROL | 3 +++ ports/liblo/portfile.cmake | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 ports/liblo/CONTROL create mode 100644 ports/liblo/portfile.cmake diff --git a/ports/liblo/CONTROL b/ports/liblo/CONTROL new file mode 100644 index 000000000..b5c4f6861 --- /dev/null +++ b/ports/liblo/CONTROL @@ -0,0 +1,3 @@ +Source: liblo +Version: 0.29-1 +Description: liblo is an implementation of the Open Sound Control protocol for POSIX systems \ No newline at end of file diff --git a/ports/liblo/portfile.cmake b/ports/liblo/portfile.cmake new file mode 100644 index 000000000..4dae62903 --- /dev/null +++ b/ports/liblo/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO radarsat1/liblo + REF 0.29 + SHA512 45648f2b2280e056b045dc0f08491baa7c154a983af95cf79438ac8fafd8f03a44c337a4beb0e01dce1f4d7352a03dc9088244d8db77dcdbfa6e39874dd6250f + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/cmake + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DTHREADING=1 +) + +vcpkg_install_cmake() + +# Install needed files into package directory +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/liblo) + +file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/oscsend.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/liblo) +file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/oscdump.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/liblo) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/liblo) + +# Remove unnecessary files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/oscsend.exe ${CURRENT_PACKAGES_DIR}/bin/oscdump.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/oscsend.exe ${CURRENT_PACKAGES_DIR}/debug/bin/oscdump.exe) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblo RENAME copyright) -- cgit v1.2.3 From 31c3fe1aa3928dba8b5c50f75d16b5764d880282 Mon Sep 17 00:00:00 2001 From: Jason Juang Date: Fri, 16 Feb 2018 14:43:38 -0800 Subject: [openvr] update to 1.0.13 (#2809) --- ports/openvr/CONTROL | 2 +- ports/openvr/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/openvr/CONTROL b/ports/openvr/CONTROL index 18d040b95..3e42aaa23 100644 --- a/ports/openvr/CONTROL +++ b/ports/openvr/CONTROL @@ -1,3 +1,3 @@ Source: openvr -Version: 1.0.12 +Version: 1.0.13 Description: an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting. diff --git a/ports/openvr/portfile.cmake b/ports/openvr/portfile.cmake index 1a18b4fd0..b86f44335 100644 --- a/ports/openvr/portfile.cmake +++ b/ports/openvr/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ValveSoftware/openvr - REF v1.0.12 - SHA512 42e6ac8635417fbb2c95a4b290f917d057c0d66ac1e07b4a0d16c4f8197b06c8ebf553299060a7996b5a9b5420f299f2bda257b8133dc99f9441c67331293ad1 + REF v1.0.13 + SHA512 3ec901f9363f9517fd3246cf58c0792c2446c39d61997a46375756b0965e6fad6902a5d1b87eb65c579e1b615cbb6e6688e7dc8ced957e5dc50b4c4dcbbb36b9 HEAD_REF master ) -- cgit v1.2.3 From 726695c65cfdd2f7fc43b09a5e064dbf4506b004 Mon Sep 17 00:00:00 2001 From: evpobr Date: Sat, 17 Feb 2018 03:49:32 +0500 Subject: [ebml] Initial port. (#2812) --- ports/ebml/CMakeLists.txt | 132 ++++++++++++++++++++++++++++++++++++++++++++ ports/ebml/CONTROL | 3 + ports/ebml/EbmlConfig.cmake | 1 + ports/ebml/portfile.cmake | 47 ++++++++++++++++ 4 files changed, 183 insertions(+) create mode 100644 ports/ebml/CMakeLists.txt create mode 100644 ports/ebml/CONTROL create mode 100644 ports/ebml/EbmlConfig.cmake create mode 100644 ports/ebml/portfile.cmake diff --git a/ports/ebml/CMakeLists.txt b/ports/ebml/CMakeLists.txt new file mode 100644 index 000000000..7d99a13a4 --- /dev/null +++ b/ports/ebml/CMakeLists.txt @@ -0,0 +1,132 @@ +cmake_minimum_required(VERSION 3.1.2) + +project(ebml VERSION 1.3.5) + +option(DISABLE_PKGCONFIG "Disable PkgConfig module generation" OFF) +option(DISABLE_CMAKE_CONFIG "Disable CMake package config module generation" OFF) + +include(GNUInstallDirs) + +set(libebml_SOURCES + src/Debug.cpp + src/EbmlBinary.cpp + src/EbmlContexts.cpp + src/EbmlCrc32.cpp + src/EbmlDate.cpp + src/EbmlDummy.cpp + src/EbmlElement.cpp + src/EbmlFloat.cpp + src/EbmlHead.cpp + src/EbmlMaster.cpp + src/EbmlSInteger.cpp + src/EbmlStream.cpp + src/EbmlString.cpp + src/EbmlSubHead.cpp + src/EbmlUInteger.cpp + src/EbmlUnicodeString.cpp + src/EbmlVersion.cpp + src/EbmlVoid.cpp + src/IOCallback.cpp + src/MemIOCallback.cpp + src/MemReadIOCallback.cpp + src/SafeReadIOCallback.cpp + src/StdIOCallback.cpp) + +set(libebml_PUBLIC_HEADERS + ebml/Debug.h + ebml/EbmlBinary.h + ebml/EbmlConfig.h + ebml/EbmlContexts.h + ebml/EbmlCrc32.h + ebml/EbmlDate.h + ebml/EbmlDummy.h + ebml/EbmlElement.h + ebml/EbmlEndian.h + ebml/EbmlFloat.h + ebml/EbmlHead.h + ebml/EbmlId.h + ebml/EbmlMaster.h + ebml/EbmlSInteger.h + ebml/EbmlStream.h + ebml/EbmlString.h + ebml/EbmlSubHead.h + ebml/EbmlTypes.h + ebml/EbmlUInteger.h + ebml/EbmlUnicodeString.h + ebml/EbmlVersion.h + ebml/EbmlVoid.h + ebml/IOCallback.h + ebml/MemIOCallback.h + ebml/MemReadIOCallback.h + ebml/SafeReadIOCallback.h + ebml/StdIOCallback.h) +if(WIN32) + list(APPEND libebml_SOURCES + src/platform/win32/WinIOCallback.cpp) + list(APPEND libebml_PUBLIC_HEADERS + src/platform/win32/WinIOCallback.h) +endif() + +set(libebml_C_PUBLIC_HEADERS ebml/c/libebml_t.h) + +add_library(ebml ${libebml_SOURCES} ${libebml_PUBLIC_HEADERS} ${libebml_C_PUBLIC_HEADERS}) +if(WIN32) + include(CheckIncludeFile) + check_include_file(winapifamily.h HAVE_WINAPIFAMILY_H) + if(HAVE_WINAPIFAMILY_H) + target_compile_definitions(ebml PUBLIC HAVE_WINAPIFAMILY_H) + endif() +endif() +set_target_properties(ebml PROPERTIES + VERSION 4.0.0 + SOVERSION 4) +target_include_directories(ebml PUBLIC + $ + $) +if(MSVC) + target_compile_definitions(ebml PRIVATE _CRT_SECURE_NO_WARNINGS) +endif() +if(BUILD_SHARED_LIBS) + set_target_properties(ebml + PROPERTIES + DEFINE_SYMBOL "EBML_DLL_EXPORT" + C_VISIBILITY_PRESET hidden + VISIBILITY_INLINES_HIDDEN 1) + target_compile_definitions(ebml + PUBLIC EBML_DLL + PRIVATE EBML_DLL_EXPORT) +endif() + +install(TARGETS ebml + EXPORT EbmlTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +install(FILES ${libebml_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ebml) +install(FILES ${libebml_C_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ebml/c) + +if(NOT DISABLE_PKGCONFIG) + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix "\$\{prefix\}") + set(libdir "\$\{prefix\}/${CMAKE_INSTALL_LIBDIR}") + set(includedir "\$\{prefix\}/${CMAKE_INSTALL_INCLUDEDIR}") + set(PACKAGE_VERSION ${PROJECT_VERSION}) + configure_file(libebml.pc.in libebml.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libebml.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +endif() + +if(NOT DISABLE_CMAKE_CONFIG) + if(WIN32) + set(CMAKE_INSTALL_PACKAGEDIR cmake) + else() + set(CMAKE_INSTALL_PACKAGEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) + endif() + include(CMakePackageConfigHelpers) + write_basic_package_version_file(EbmlConfigVersion.cmake COMPATIBILITY SameMajorVersion) + install(EXPORT EbmlTargets DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}) + install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/EbmlConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/EbmlConfigVersion.cmake + DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}) +endif() diff --git a/ports/ebml/CONTROL b/ports/ebml/CONTROL new file mode 100644 index 000000000..6bcc2c5e3 --- /dev/null +++ b/ports/ebml/CONTROL @@ -0,0 +1,3 @@ +Source: ebml +Version: 1.3.5 +Description: a C++ libary to parse EBML files diff --git a/ports/ebml/EbmlConfig.cmake b/ports/ebml/EbmlConfig.cmake new file mode 100644 index 000000000..5752fa632 --- /dev/null +++ b/ports/ebml/EbmlConfig.cmake @@ -0,0 +1 @@ +include(${CMAKE_CURRENT_LIST_DIR}/EbmlTargets.cmake) diff --git a/ports/ebml/portfile.cmake b/ports/ebml/portfile.cmake new file mode 100644 index 000000000..dd58484c3 --- /dev/null +++ b/ports/ebml/portfile.cmake @@ -0,0 +1,47 @@ +# 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) + +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 Matroska-Org/libebml + REF release-1.3.5 + SHA512 ccfa58aebb8685b2dbbab7038ab7f7e0788dba2fc391abafad5a0e05c71c8f02c7e1e3521e1c59076057f9643737c2d96a4fffdeb7991214234f2db80c78254b + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/EbmlConfig.cmake DESTINATION ${SOURCE_PATH}) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DDISABLE_PKGCONFIG=1 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/ebml RENAME copyright) -- cgit v1.2.3 From 72bc3647b61ad3e8df8d1e620daa7d919b5241d6 Mon Sep 17 00:00:00 2001 From: Jonathan Hale Date: Fri, 16 Feb 2018 23:50:36 +0100 Subject: [vcpkg] Fix bug with missing dependencies introduced in #2697 (#2819) When a package dependency was not found (has no source control file), install would exit with "Value was null" when trying to install its default features, as the dependency would be marked erroneously as found in this case. Signed-off-by: Squareys --- toolsrc/src/vcpkg/dependencies.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 307c779c8..fedda56ab 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -454,14 +454,14 @@ namespace vcpkg::Dependencies return res; } } + } - // "core" is always an implicit default feature. In case we did not add it as - // a dependency above (e.g. no default features), add it here. - auto res = mark_plus("core", cluster, graph, graph_plan, prevent_default_features); - if (res != MarkPlusResult::SUCCESS) - { - return res; - } + // "core" is always an implicit default feature. In case we did not add it as + // a dependency above (e.g. no default features), add it here. + auto res = mark_plus("core", cluster, graph, graph_plan, prevent_default_features); + if (res != MarkPlusResult::SUCCESS) + { + return res; } return MarkPlusResult::SUCCESS; -- cgit v1.2.3 From 452c8ba1ff4c06e5cf7b2f2c4ff449eaefb83f79 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 16 Feb 2018 15:40:22 -0800 Subject: [vcpkg] Avoid using s::status_known() -- it does not do what you think it does --- toolsrc/include/vcpkg/base/files.h | 1 + toolsrc/src/vcpkg/install.cpp | 61 ++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 32 deletions(-) diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 51a12ceba..9bdc0aa4b 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -14,6 +14,7 @@ namespace fs using stdfs::copy_options; using stdfs::file_status; + using stdfs::file_type; using stdfs::path; using stdfs::u8path; diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 595945d39..631b16c59 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -69,7 +69,7 @@ namespace vcpkg::Install continue; } - const std::string filename = file.filename().generic_string(); + const std::string filename = file.filename().u8string(); if (fs::is_regular_file(status) && (Strings::case_insensitive_ascii_equals(filename.c_str(), "CONTROL") || Strings::case_insensitive_ascii_equals(filename.c_str(), "BUILD_INFO"))) { @@ -80,44 +80,41 @@ namespace vcpkg::Install const std::string suffix = file.generic_u8string().substr(prefix_length + 1); const fs::path target = destination / suffix; - if (fs::is_directory(status)) + switch (status.type()) { - fs.create_directory(target, ec); - if (ec) + case fs::file_type::directory: { - System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); - } - - // Trailing backslash for directories - output.push_back(Strings::format(R"(%s/%s/)", destination_subdirectory, suffix)); - continue; - } + fs.create_directory(target, ec); + if (ec) + { + System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); + } - if (fs::is_regular_file(status)) - { - if (fs.exists(target)) - { - System::println(System::Color::warning, - "File %s was already present and will be overwritten", - target.u8string(), - ec.message()); + // Trailing backslash for directories + output.push_back(Strings::format(R"(%s/%s/)", destination_subdirectory, suffix)); + break; } - fs.copy_file(file, target, fs::copy_options::overwrite_existing, ec); - if (ec) + case fs::file_type::regular: { - System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); + if (fs.exists(target)) + { + System::println(System::Color::warning, + "File %s was already present and will be overwritten", + target.u8string(), + ec.message()); + } + fs.copy_file(file, target, fs::copy_options::overwrite_existing, ec); + if (ec) + { + System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); + } + output.push_back(Strings::format(R"(%s/%s)", destination_subdirectory, suffix)); + break; } - output.push_back(Strings::format(R"(%s/%s)", destination_subdirectory, suffix)); - continue; - } - - if (!fs::status_known(status)) - { - System::println(System::Color::error, "failed: %s: unknown status", file.u8string()); - continue; + default: + System::println(System::Color::error, "failed: %s: cannot handle file type", file.u8string()); + break; } - - System::println(System::Color::error, "failed: %s: cannot handle file type", file.u8string()); } std::sort(output.begin(), output.end()); -- cgit v1.2.3 From 02c4550f0287a2386635747e826893152223eb85 Mon Sep 17 00:00:00 2001 From: Alexandre Breteau Date: Sat, 17 Feb 2018 01:16:10 +0100 Subject: [jansson] Update to 2.11 (#2820) --- ports/jansson/CONTROL | 2 +- ports/jansson/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/jansson/CONTROL b/ports/jansson/CONTROL index 15a18d7e2..d5fa4f546 100644 --- a/ports/jansson/CONTROL +++ b/ports/jansson/CONTROL @@ -1,3 +1,3 @@ Source: jansson -Version: 2.10-1 +Version: 2.11 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 5b255e7ac..034b4eb01 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -3,15 +3,15 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO akheron/jansson - REF v2.10 - SHA512 0859c8a29c1cb7e406d3eb369285500e98ee23677e3a6af6cd81511c57a6aa8dbabe4a8c7b673a3000203b68f74d84786817aec76cb1e85af217268159bda4b6 + REF v2.11 + SHA512 5dd94951e1aedd3f3a9ab6a43170d2395ec70c5a00e6da58538816b2dcd98835fc4ca43ab1e9b78864c01e48075505573f4f8d1da5c9d2c094622518d19525e8 HEAD_REF master ) if(VCPKG_CRT_LINKAGE STREQUAL static) - set(JANSSON_STATIC_CRT ON) + set(JANSSON_STATIC_CRT ON) else() - set(JANSSON_STATIC_CRT OFF) + set(JANSSON_STATIC_CRT OFF) endif() -- cgit v1.2.3 From a144a32fb2a11b5cd03f9577564aec03b4ada68d Mon Sep 17 00:00:00 2001 From: Jason Juang Date: Fri, 16 Feb 2018 16:16:29 -0800 Subject: [aws-sdk-cpp] update to 1.3.58 (#2810) --- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index 78ac3dfd7..3c784db00 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,3 +1,3 @@ Source: aws-sdk-cpp -Version: 1.3.15 +Version: 1.3.58 Description: AWS SDK for C++ diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index e47417100..d21932496 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.3.15 - SHA512 844addabf01bdbba2c50f94303f23fd092ac5593c42c782aad5959d5edaadb0bec8a6408a91f4605cef996f0d5a23fd94ca3c194829c65db98291d5fa7150bff + REF 1.3.58 + SHA512 755fe3fd9d507a43fb03c1530a979f5a5a2848588ccab39509987043b3d274f27a7b163bf078a006123450ee881fd4a092cd703246f6f669810f47c186c2b0b8 HEAD_REF master ) -- cgit v1.2.3 From ea2e5d7b006fc5bf6adc8789c5929d638bbf3e97 Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Sat, 17 Feb 2018 13:17:07 +0800 Subject: [mkl] Add port MKL (#2806) --- ports/intel-mkl/CONTROL | 3 +++ ports/intel-mkl/portfile.cmake | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ports/intel-mkl/CONTROL create mode 100644 ports/intel-mkl/portfile.cmake diff --git a/ports/intel-mkl/CONTROL b/ports/intel-mkl/CONTROL new file mode 100644 index 000000000..f0b7f12a8 --- /dev/null +++ b/ports/intel-mkl/CONTROL @@ -0,0 +1,3 @@ +Source: intel-mkl +Version: 2018.0.1 +Description: Intel® Math Kernel Library (Intel® MKL) accelerates math processing routines, increases application performance, and reduces development time on Intel® processors. \ No newline at end of file diff --git a/ports/intel-mkl/portfile.cmake b/ports/intel-mkl/portfile.cmake new file mode 100644 index 000000000..be54f0ec4 --- /dev/null +++ b/ports/intel-mkl/portfile.cmake @@ -0,0 +1,32 @@ +# Due to the complexity involved, this package doesn't install MKL. It instead verifies that MKL is installed. +# Other packages can depend on this package to declare a dependency on MKL. +# If this package is installed, we assume that MKL is properly installed. + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +set(MKL_REQUIRED_VERSION "20180000") + +set(ProgramFilesx86 "ProgramFiles(x86)") +set(INTEL_ROOT $ENV{${ProgramFilesx86}}/IntelSWTools/compilers_and_libraries/windows) + +find_path(MKL_ROOT include/mkl.h PATHS $ENV{MKLROOT} ${INTEL_ROOT}/mkl DOC "Folder contains MKL") + +if (MKL_ROOT STREQUAL "MKL_ROOT-NOTFOUND") + message(FATAL_ERROR "Could not find MKL. Before continuing, please download and install MKL (${MKL_REQUIRED_VERSION} or higher) from:" + "\n https://registrationcenter.intel.com/en/products/download/3178/\n" + "\nAlso ensure vcpkg has been rebuilt with the latest version (v0.0.104 or later)") +endif() + +# file(STRINGS ${MKL_ROOT}/include/mkl_version.h MKL_VERSION_DEFINITION REGEX "__INTEL_MKL((_MINOR)|(_UPDATE))?__") +# string(REGEX MATCHALL "([0-9]+)" MKL_VERSION ${MKL_VERSION_DEFINITION}) +# list(GET MKL_VERSION 0 MKL_VERSION_MAJOR) +# list(GET MKL_VERSION 1 MKL_VERSION_MINOR) +# list(GET MKL_VERSION 2 MKL_VERSION_UPDATE) + +file(STRINGS ${MKL_ROOT}/include/mkl_version.h MKL_VERSION_DEFINITION REGEX "INTEL_MKL_VERSION") +string(REGEX MATCH "([0-9]+)" MKL_VERSION ${MKL_VERSION_DEFINITION}) + +if (MKL_VERSION LESS MKL_REQUIRED_VERSION) + message(FATAL_ERROR "MKL ${MKL_VERSION} is found but ${MKL_REQUIRED_VERSION} is required. Please download and install a more recent version of MKL from:" + "\n https://registrationcenter.intel.com/en/products/download/3178/\n") +endif() -- cgit v1.2.3 From 0822a28059badbb18f301b414222e869845087fb Mon Sep 17 00:00:00 2001 From: Jonathan Hale Date: Sat, 17 Feb 2018 06:25:30 +0100 Subject: [corrade,magnum,-plugins,-extras,-integration] Update to latest and support feature packages (#2687) [corrade,magnum,-plugins,-extras,-integration] Update to latest and support feature packages --- ports/corrade/CONTROL | 20 ++++++- ports/corrade/portfile.cmake | 70 ++++++++++++++++++------ ports/magnum-extras/CONTROL | 9 +++ ports/magnum-extras/portfile.cmake | 72 ++++++++++++++++++++++++ ports/magnum-integration/CONTROL | 16 ++++++ ports/magnum-integration/portfile.cmake | 67 +++++++++++++++++++++++ ports/magnum-plugins/CONTROL | 83 +++++++++++++++++++++++++++- ports/magnum-plugins/portfile.cmake | 54 +++++++++++------- ports/magnum/003-glfw-find-module.patch | 13 +++++ ports/magnum/CONTROL | 97 ++++++++++++++++++++++++++++++++- ports/magnum/portfile.cmake | 60 ++++++++++++-------- 11 files changed, 496 insertions(+), 65 deletions(-) create mode 100644 ports/magnum-extras/CONTROL create mode 100644 ports/magnum-extras/portfile.cmake create mode 100644 ports/magnum-integration/CONTROL create mode 100644 ports/magnum-integration/portfile.cmake create mode 100644 ports/magnum/003-glfw-find-module.patch diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL index a2d73fba8..a886c8639 100644 --- a/ports/corrade/CONTROL +++ b/ports/corrade/CONTROL @@ -1,3 +1,19 @@ Source: corrade -Version: jan2018-1 -Description: C++11/C++14 multiplatform utility library http://mosra.cz/blog/corrade.php +Version: 2018.02-1 +Description: C++11/C++14 multiplatform utility library http://magnum.graphics/corrade/ +Default-Features: interconnect, pluginmanager, testsuite, utility + +Feature: interconnect +Description: Interconnect library +Build-Depends: corrade[utility] + +Feature: pluginmanager +Description: PluginManager library +Build-Depends: corrade[utility] + +Feature: testsuite +Description: TestSuite library +Build-Depends: corrade[utility] + +Feature: utility +Description: Utility library diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index d08530ef4..85ad3e4b0 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/corrade - REF 2dd926d23f21042838d9244c00ddd1d2f09861ee - SHA512 085062a34c4fecc864d02f38d4d45e22f6de72f3599d67327a783c350e478fe943c5bb3f9cd5544953b55b7ffa78923b087bc0f40a54eb9ed9f5d580970b2f45 + REF v2018.02 + SHA512 8fe4998dc32586386b8fa2030941f3ace6d5e76aadcf7e20a620d276cc9247324e10eb58f2c2c9e84a1a9d9b336e6bdc788f9947c9e507a053d6fd2ffcd3d58e HEAD_REF master ) @@ -13,35 +13,73 @@ else() set(BUILD_STATIC 0) endif() +# Handle features +set(_COMPONENT_FLAGS "") +foreach(_feature IN LISTS ALL_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Turn "-DWITH_*=" ON or OFF depending on whether the feature + # is in the list. + if(_feature IN_LIST FEATURES) + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON") + else() + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") + endif() +endforeach() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DBUILD_STATIC=${BUILD_STATIC} + OPTIONS + -DBUILD_STATIC=${BUILD_STATIC} + ${_COMPONENT_FLAGS} ) vcpkg_install_cmake() +# Debug includes and share are the same as release file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -# Drop a copy of tools -file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/corrade) +# Install tools +if("utility" IN_LIST FEATURES) + # Drop a copy of tools + file(COPY ${CURRENT_PACKAGES_DIR}/bin/corrade-rc.exe + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/corrade) -# Tools require dlls -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/corrade) + # Tools require dlls + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/corrade) -file(GLOB_RECURSE TO_REMOVE - ${CURRENT_PACKAGES_DIR}/bin/*.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -file(REMOVE ${TO_REMOVE}) + file(GLOB_RECURSE TO_REMOVE + ${CURRENT_PACKAGES_DIR}/bin/*.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${TO_REMOVE}) +endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +# Ensure no empty folders are left behind +if(NOT FEATURES) + # No features, no binaries (only Corrade.h). + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug) + # debug is completely empty, as include and share + # have already been removed. + +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL static) + # No dlls + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin) endif() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/corrade) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/corrade/COPYING ${CURRENT_PACKAGES_DIR}/share/corrade/copyright) +file(COPY ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/corrade) +file(RENAME + ${CURRENT_PACKAGES_DIR}/share/corrade/COPYING + ${CURRENT_PACKAGES_DIR}/share/corrade/copyright) vcpkg_copy_pdbs() diff --git a/ports/magnum-extras/CONTROL b/ports/magnum-extras/CONTROL new file mode 100644 index 000000000..0e7fe0a6b --- /dev/null +++ b/ports/magnum-extras/CONTROL @@ -0,0 +1,9 @@ +Source: magnum-extras +Version: 2018.02-1 +Build-Depends: magnum +Description: Extras for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ +Default-Features: + +Feature: ui +Description: Ui library +Build-Depends: corrade[interconnect], magnum[text] diff --git a/ports/magnum-extras/portfile.cmake b/ports/magnum-extras/portfile.cmake new file mode 100644 index 000000000..9c0771c52 --- /dev/null +++ b/ports/magnum-extras/portfile.cmake @@ -0,0 +1,72 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum-extras + REF v2018.02 + SHA512 62c0832d19a36e0f89ffcd958356130c81f577b1091a9232d43307868caf51a1fd186c4aa196bd456d3c37cb887c9802d80eb0b332893bafa812298dbc39d7b7 + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC 1) +else() + set(BUILD_STATIC 0) +endif() + +# Handle features +set(_COMPONENT_FLAGS "") +foreach(_feature IN LISTS ALL_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Turn "-DWITH_*=" ON or OFF depending on whether the feature + # is in the list. + if(_feature IN_LIST FEATURES) + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON") + else() + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") + endif() +endforeach() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + ${_COMPONENT_FLAGS} + -DBUILD_STATIC=${BUILD_STATIC} + -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d + -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum +) + +vcpkg_install_cmake() + +# Messages to the user +if("ui" IN_LIST FEATURES) + message(WARNING "It is recommended to install one of magnum-plugins[freetypefont,harfbuzzfont,stbtruetypefont] to have the UI library working out of the box") +endif() + +# Debug includes and share are the same as release +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Clean up empty directories +if(NOT FEATURES) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug) + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum-extras) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum-extras/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum-extras/copyright) + +vcpkg_copy_pdbs() diff --git a/ports/magnum-integration/CONTROL b/ports/magnum-integration/CONTROL new file mode 100644 index 000000000..a791e5718 --- /dev/null +++ b/ports/magnum-integration/CONTROL @@ -0,0 +1,16 @@ +Source: magnum-integration +Version: 2018.02-1 +Build-Depends: magnum +Description: Integrations for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ +Default-Features: + +Feature: bullet +Description: BulletIntegration library +Build-Depends: bullet3 +#Feature: ovr +#Description: OvrIntegration library +#Build-Depends: ovrsdk +#Feature: dart +#Description: DartIntegration library +#Build-Depends: dart + diff --git a/ports/magnum-integration/portfile.cmake b/ports/magnum-integration/portfile.cmake new file mode 100644 index 000000000..8ef1899fd --- /dev/null +++ b/ports/magnum-integration/portfile.cmake @@ -0,0 +1,67 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum-integration + REF v2018.02 + SHA512 b2db442d5e29c117ee30ee2c37f5087c3d360158a52eb6bc19e5c1a0388a0ec1338c53e3fdad618bb6f4aba5d88fe10d20bb1539e5f21a309b8f06f2e195279c + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC 1) +else() + set(BUILD_STATIC 0) +endif() + +# Handle features +set(_COMPONENT_FLAGS "") +foreach(_feature IN LISTS ALL_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Turn "-DWITH_*=" ON or OFF depending on whether the feature + # is in the list. + if(_feature IN_LIST FEATURES) + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON") + else() + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") + endif() +endforeach() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + ${_COMPONENT_FLAGS} + -DBUILD_STATIC=${BUILD_STATIC} + -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d + -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum +) + +vcpkg_install_cmake() + +# Debug includes and share are the same as release +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Clean up empty directories +if(NOT FEATURES) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug) + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum-integration) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum-integration/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum-integration/copyright) + +vcpkg_copy_pdbs() diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 5c76b45ae..12a444e2d 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,4 +1,81 @@ Source: magnum-plugins -Version: jan2018-1 -Build-Depends: stb, magnum -Description: Plugins for C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php +Version: 2018.02-1 +Build-Depends: magnum +Description: Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ +Default-Features: anyimageimporter, anysceneimporter, anyimageconverter, ddsimporter, miniexrimageconverter, opengeximporter, stanfordimporter, stbimageconverter, stbimageimporter + +Feature: anyimageimporter +Description: AnyImageImporter plugin + +Feature: anyaudioimporter +Description: AnyAudioImporter plugin + +Feature: anyimageconverter +Description: AnyImageConverter plugin + +Feature: anysceneimporter +Description: AnySceneImporter plugin + +Feature: assimpimporter +Description: AssimpImporter plugin +Build-Depends: assimp, magnum-plugins[anyimageimporter] + +Feature: ddsimporter +Description: DdsImporter plugin + +Feature: devilimageimporter +Description: DevIlImageImporter plugin +Build-Depends: devil + +Feature: drflacaudioimporter +Description: DrFlacAudioImporter plugin +Build-Depends: magnum[audio] + +Feature: drwavaudioimporter +Description: DrWavAudioImporter plugin +Build-Depends: magnum[audio] + +Feature: freetypefont +Description: FreeTypeFont plugin +Build-Depends: freetype, magnum[text] + +Feature: harfbuzzfont +Description: HarfBuzzFont plugin +Build-Depends: harfbuzz, magnum-plugins[freetypefont] + +Feature: jpegimporter +Description: JpegImporter plugin +Build-Depends: libjpeg-turbo + +Feature: miniexrimageconverter +Description: MiniExrImageConverter plugin + +Feature: opengeximporter +Description: OpenGexImporter plugin +Build-Depends: magnum-plugins[anyimageimporter] + +Feature: pngimageconverter +Description: PngImageConverter plugin +Build-Depends: libpng + +Feature: pngimporter +Description: PngImporter plugin +Build-Depends: libpng + +Feature: stanfordimporter +Description: StanfordImporter plugin + +Feature: stbimageconverter +Description: StbImageConverter plugin + +Feature: stbimageimporter +Description: StbImageImporter plugin + +Feature: stbtruetypefont +Description: StbTrueTypeFont plugin +Build-Depends: magnum[text] + +Feature: stbvorbisaudioimporter +Description: StbVorbisAudioImporter plugin +Build-Depends: magnum[audio] + diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index b2b574b06..86e5622d5 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-plugins - REF f0ddc63385e30c3bae362789855a95de7c46f8a7 - SHA512 d0afda7be75efd2dec731e9435732220a76e735ef58d860f7119f206b1d5828af6e70aca3517b0f930c83440930ed62cb03e6c123e37771b72c50ddb44676945 + REF v2018.02 + SHA512 650d3ec26b3c72aa98ffa242b072e382445de49d4849042faf5dac800d5e4cce223cac3fa1cc079fcb230632730af1d90ac7d347d152a1f31d224732499e96b4 HEAD_REF master ) @@ -15,38 +15,51 @@ vcpkg_apply_patches( if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILD_STATIC 1) - set(BUILD_PLUGINS_STATIC 1) else() set(BUILD_STATIC 0) - set(BUILD_PLUGINS_STATIC 0) endif() +# Handle features +set(_COMPONENT_FLAGS "") +foreach(_feature IN LISTS ALL_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Turn "-DWITH_*=" ON or OFF depending on whether the feature + # is in the list. + if(_feature IN_LIST FEATURES) + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON") + else() + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") + endif() +endforeach() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS - -DWITH_STBIMAGECONVERTER=ON - -DWITH_STBIMAGEIMPORTER=ON - -DWITH_STBTRUETYPEFONT=ON - -DWITH_STBTRUETYPEFONT=ON - -DWITH_MINIEXRIMAGECONVERTER=ON - -DWITH_OPENGEXIMPORTER=ON - -DWITH_OPENGEXIMPORTER=ON - -DWITH_STANFORDIMPORTER=ON - -DWITH_DRWAVAUDIOIMPORTER=ON - -DWITH_ANYAUDIOIMPORTER=ON - -DWITH_ANYIMAGECONVERTER=ON - -DWITH_ANYSCENEIMPORTER=ON + ${_COMPONENT_FLAGS} -DBUILD_STATIC=${BUILD_STATIC} - -DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC} -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum ) vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +# Debug includes and share are the same as release +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Clean up empty directories +if(NOT FEATURES) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug) + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) @@ -66,6 +79,9 @@ else() # hint vcpkg set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/MagnumPlugins) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) endif() # Handle copyright diff --git a/ports/magnum/003-glfw-find-module.patch b/ports/magnum/003-glfw-find-module.patch new file mode 100644 index 000000000..0517559e3 --- /dev/null +++ b/ports/magnum/003-glfw-find-module.patch @@ -0,0 +1,13 @@ +diff --git a/modules/FindGLFW.cmake b/modules/FindGLFW.cmake +index e831fdb2..b2dba97f 100644 +--- a/modules/FindGLFW.cmake ++++ b/modules/FindGLFW.cmake +@@ -39,7 +39,7 @@ + # DEALINGS IN THE SOFTWARE. + # + +-find_library(GLFW_LIBRARY NAMES glfw glfw3) ++find_library(GLFW_LIBRARY NAMES glfw glfw3 glfw3dll) + + # Include dir + find_path(GLFW_INCLUDE_DIR diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index a54adc118..dcf86f079 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,4 +1,95 @@ Source: magnum -Version: jan2018-1 -Build-Depends: corrade, sdl2, openal-soft -Description: C++11/C++14 and OpenGL graphics engine http://mosra.cz/blog/magnum.php +Version: 2018.02-1 +Build-Depends: corrade[pluginmanager], corrade[utility] +Description: C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ +Default-Features: debugtools, meshtools, primitives, scenegraph, shaders, shapes, text, texturetools, sdl2application, windowlesswglapplication + +Feature: sdl2application +Description: Sdl2Application library +Build-Depends: sdl2 + +Feature: glfwapplication +Description: GlfwApplication library +Build-Depends: glfw3 + +Feature: glutapplication +Description: GlutApplication library +Build-Depends: freeglut + +Feature: audio +Description: Audio library +Build-Depends: openal-soft + +Feature: magnuminfo +Description: magnum-info utility + +Feature: fontconverter +Description: magnum-fontconverter utility +Build-Depends: magnum[text] + +Feature: distancefieldconverter +Description: magnum-distancefieldconverter utility +Build-Depends: magnum[texturetools] + +Feature: imageconverter +Description: magnum-imageconverter utility + +Feature: wavaudioimporter +Description: WavAudioImporter plugin +Build-Depends: magnum[audio] + +Feature: magnumfont +Description: MagnumFont plugin +Build-Depends: magnum[text] + +Feature: magnumfontconverter +Description: MagnumFontConverter plugin +Build-Depends: magnum[text], magnum[tgaimageconverter] + +Feature: objimporter +Description: ObjImporter plugin + +Feature: tgaimageconverter +Description: TgaImageConverter plugin + +Feature: tgaimporter +Description: TgaImporter plugin + +Feature: debugtools +Description: DebugTools library + +Feature: meshtools +Description: MeshTools library + +Feature: primitives +Description: Primitives library + +Feature: shapes +Description: Shapes library + +Feature: scenegraph +Description: SceneGraph library + +Feature: shaders +Description: Shaders library + +Feature: text +Description: Text library +Build-Depends: magnum[texturetools] + +Feature: texturetools +Description: TextureTools library + +Feature: al-info +Description: magnum-al-info utility +Build-Depends: magnum[audio] + +Feature: windowlesswglapplication +Description: WindowlessWglApplication library + +Feature: wglcontext +Description: WglContext library + +Feature: opengltester +Description: OpenGLTester library +Build-Depends: corrade[testsuite] diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 57c62431e..10d7f02fc 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -2,16 +2,17 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum - REF 68953f8c872b7c08f792c6082b8ab152f2119560 - SHA512 00b507b85ed3454f81fe7098e1fc349d4048a2372e3b2aceabccc0c4287540ed3850f8dd9cdcd9cfb9542ba9af741e30e43e2b03bbc5490b552f862da34369b1 + REF v2018.02 + SHA512 aeb0cab91ae0a7cca79c15ce98d9b2f8d46f5bc11bb90718e59188bf233154fb51668e0241112b65103f40e675736d74c86a2e5ccffcb698780ccedb1b3fb8bd HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch + ${CMAKE_CURRENT_LIST_DIR}/001-sdl-includes.patch ${CMAKE_CURRENT_LIST_DIR}/002-tools-path.patch + ${CMAKE_CURRENT_LIST_DIR}/003-glfw-find-module.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -22,23 +23,27 @@ else() set(BUILD_PLUGINS_STATIC 0) endif() +# Handle features +set(_COMPONENT_FLAGS "") +foreach(_feature IN LISTS ALL_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Turn "-DWITH_*=" ON or OFF depending on whether the feature + # is in the list. + if(_feature IN_LIST FEATURES) + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON") + else() + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") + endif() +endforeach() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS - -DWITH_SDL2APPLICATION=ON - -DWITH_WINDOWLESSWGLAPPLICATION=ON - -DWITH_WGLCONTEXT=ON - -DWITH_OPENGLTESTER=ON - -DWITH_AUDIO=ON - -DWITH_WAVAUDIOIMPORTER=ON - -DWITH_MAGNUMFONT=ON - -DWITH_MAGNUMFONTCONVERTER=ON - -DWITH_OBJIMPORTER=ON - -DWITH_TGAIMPORTER=ON - -DWITH_DISTANCEFIELDCONVERTER=ON - -DWITH_FONTCONVERTER=ON - -DWITH_TGAIMAGECONVERTER=ON + ${_COMPONENT_FLAGS} -DBUILD_STATIC=${BUILD_STATIC} -DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC} -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d @@ -48,17 +53,28 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Drop a copy of tools -file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-distancefieldconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) -file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-fontconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) +if(distancefieldconverter IN_LIST FEATURES) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-distancefieldconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) +endif() +if(fontconverter IN_LIST FEATURES) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-fontconverter.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) +endif() +if(al-info IN_LIST FEATURES) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-al-info.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) +endif() +if(magnuminfo IN_LIST FEATURES) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/magnum-info.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/magnum) +endif() # Tools require dlls vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/magnum) -file(GLOB_RECURSE TO_REMOVE +file(GLOB_RECURSE TO_REMOVE ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -file(REMOVE ${TO_REMOVE}) - +if(TO_REMOVE) + file(REMOVE ${TO_REMOVE}) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) @@ -84,4 +100,4 @@ endif() file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/magnum) file(RENAME ${CURRENT_PACKAGES_DIR}/share/magnum/COPYING ${CURRENT_PACKAGES_DIR}/share/magnum/copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() -- cgit v1.2.3 From 773622e8c2716c4a89cbfbf392ce72ff87e88e92 Mon Sep 17 00:00:00 2001 From: evpobr Date: Sat, 17 Feb 2018 12:43:25 +0500 Subject: [matroska] Initial port --- ports/matroska/CMakeLists.txt | 110 ++++++++++++++++++++++++++++++++++++ ports/matroska/CONTROL | 4 ++ ports/matroska/MatroskaConfig.cmake | 1 + ports/matroska/portfile.cmake | 45 +++++++++++++++ 4 files changed, 160 insertions(+) create mode 100644 ports/matroska/CMakeLists.txt create mode 100644 ports/matroska/CONTROL create mode 100644 ports/matroska/MatroskaConfig.cmake create mode 100644 ports/matroska/portfile.cmake diff --git a/ports/matroska/CMakeLists.txt b/ports/matroska/CMakeLists.txt new file mode 100644 index 000000000..58308866c --- /dev/null +++ b/ports/matroska/CMakeLists.txt @@ -0,0 +1,110 @@ +cmake_minimum_required(VERSION 3.1.2) + +project(matroska VERSION 1.4.8) + +option(DISABLE_PKGCONFIG "Disable PkgConfig module generation" OFF) +option(DISABLE_CMAKE_CONFIG "Disable CMake package config module generation" OFF) + +find_package(ebml 1.3.5 REQUIRED) + +include(GNUInstallDirs) + +set(libmatroska_SOURCES + src/FileKax.cpp + src/KaxAttached.cpp + src/KaxAttachments.cpp + src/KaxBlock.cpp + src/KaxBlockData.cpp + src/KaxCluster.cpp + src/KaxContexts.cpp + src/KaxCues.cpp + src/KaxCuesData.cpp + src/KaxInfoData.cpp + src/KaxSeekHead.cpp + src/KaxSegment.cpp + src/KaxSemantic.cpp + src/KaxTracks.cpp + src/KaxVersion.cpp) + +set(libmatroska_PUBLIC_HEADERS + matroska/FileKax.h + matroska/KaxAttached.h + matroska/KaxAttachments.h + matroska/KaxBlockData.h + matroska/KaxBlock.h + matroska/KaxChapters.h + matroska/KaxClusterData.h + matroska/KaxCluster.h + matroska/KaxConfig.h + matroska/KaxContentEncoding.h + matroska/KaxContexts.h + matroska/KaxCuesData.h + matroska/KaxCues.h + matroska/KaxDefines.h + matroska/KaxInfoData.h + matroska/KaxInfo.h + matroska/KaxSeekHead.h + matroska/KaxSegment.h + matroska/KaxSemantic.h + matroska/KaxTag.h + matroska/KaxTags.h + matroska/KaxTrackAudio.h + matroska/KaxTrackEntryData.h + matroska/KaxTracks.h + matroska/KaxTrackVideo.h + matroska/KaxTypes.h + matroska/KaxVersion.h) + +set (libmatroska_C_PUBLIC_HEADERS + matroska/c/libmatroska.h + matroska/c/libmatroska_t.h) + +add_library(matroska ${libmatroska_SOURCES} ${limatroska_PUBLIC_HEADERS} ${libmatroska_C_PUBLIC_HEADERS}) +target_link_libraries(matroska PUBLIC ebml) +set_target_properties(matroska PROPERTIES + VERSION 6.0.0 + SOVERSION 6) +target_include_directories(matroska PUBLIC + $ + $) +if(MSVC) + target_compile_definitions(matroska PRIVATE _CRT_SECURE_NO_WARNINGS) +endif() +if(BUILD_SHARED_LIBS) + target_compile_definitions(matroska PUBLIC MATROSKA_DLL) + set_target_properties(matroska PROPERTIES DEFINE_SYMBOL "MATROSKA_DLL_EXPORT") +endif() + +install(TARGETS matroska + EXPORT MatroskaTargets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +install(FILES ${libmatroska_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/matroska) +install(FILES ${libmatroska_C_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/matroska/c) + +if(NOT DISABLE_PKGCONFIG) + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix "\$\{prefix\}") + set(libdir "\$\{prefix\}/${CMAKE_INSTALL_LIBDIR}") + set(includedir "\$\{prefix\}/${CMAKE_INSTALL_INCLUDEDIR}") + set(PACKAGE_VERSION ${PROJECT_VERSION}) + configure_file(libmatroska.pc.in libmatroska.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmatroska.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +endif() + +if(NOT DISABLE_CMAKE_CONFIG) + if(WIN32) + set(CMAKE_INSTALL_PACKAGEDIR cmake) + elseif(WIN32) + set(CMAKE_INSTALL_PACKAGEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) + endif() + include(CMakePackageConfigHelpers) + write_basic_package_version_file(MatroskaConfigVersion.cmake COMPATIBILITY SameMajorVersion) + install(EXPORT MatroskaTargets DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}) + install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/MatroskaConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/MatroskaConfigVersion.cmake + DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}) +endif() diff --git a/ports/matroska/CONTROL b/ports/matroska/CONTROL new file mode 100644 index 000000000..cd688d697 --- /dev/null +++ b/ports/matroska/CONTROL @@ -0,0 +1,4 @@ +Source: matroska +Version: 1.4.8 +Description: a C++ libary to parse Matroska files (.mkv and .mka) +Build-Depends: ebml diff --git a/ports/matroska/MatroskaConfig.cmake b/ports/matroska/MatroskaConfig.cmake new file mode 100644 index 000000000..e9a88bd49 --- /dev/null +++ b/ports/matroska/MatroskaConfig.cmake @@ -0,0 +1 @@ +include(${CMAKE_CURRENT_LIST_DIR}/MatroskaTargets.cmake) diff --git a/ports/matroska/portfile.cmake b/ports/matroska/portfile.cmake new file mode 100644 index 000000000..fd3624584 --- /dev/null +++ b/ports/matroska/portfile.cmake @@ -0,0 +1,45 @@ +# 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) + +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 Matroska-Org/libmatroska + REF release-1.4.8 + SHA512 3591508674ff69a185d143b4ce5c34a4c9913ad806ad94c6a96b694752f3e67b029037573564ab3bf5d9303a4b6c5fdd55865f140ab0d26df53b051b71957d0a + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/MatroskaConfig.cmake DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DDISABLE_PKGCONFIG=1 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/matroska RENAME copyright) -- cgit v1.2.3 From 995ab094093e5cea8b250f69200406bcc59848ae Mon Sep 17 00:00:00 2001 From: Guillaume Lachance Date: Sat, 17 Feb 2018 05:31:49 -0500 Subject: libmupdf version bump (#2730) * Add libgta Libgta is a portable library that implements the Generic Tagged Array (GTA) file format. Signed-off-by: Hiroshi Miura * [libgta] turn off document build and doxygen dependency Signed-off-by: Hiroshi Miura * [libgta] add build-dependency - bzip2, zlib and liblzma Signed-off-by: Hiroshi Miura * [libgta] remove dlls when static build Signed-off-by: Hiroshi Miura * Fix typo * [libgta] update CONTROL add lf at end of file. * libmupdf version bump * [qt5-base] Use system freetype. * [opencv] Fix UWP and ARM * [hdf5] Always use config mode for HDF5 * [opencv] Fixup -- apply patch added in previous commit * [abseil] Add *.inc files. Fixes #2718 * [abseil] Update to 2018-2-5 * Fix for Issue #2729 Allows PowerShell to change the name of the downloaded directory correctly. * vcpkgRemoveItem: nullcheck * [cpprestsdk] Update to 2.10.2 * Adding Torch's TH library (#2737) Adding Torch's TH library * [flatbuffers] Fixes #2735 * sobjectizer updated to v.5.5.21 * [nghttp2] Enable static builds * [nghttp2]: update to 1.30.0 (#2739) * [nghttp2]: update to 1.30.0 * [nghttp2] Enable static builds * Add epsilon library port Signed-off-by: Hiroshi Miura * [vcpkg-configure-cmake] Use ninja to configure in parallel (#2712) * [curl] Add nghttp2.lib to dependencies of curl * [vtk] Fix breaking change in find_package(HDF5) * Merge findFileRecursivelyUp into VcpkgPowershellUtils * [vcpkgInvokeCommandClean] Don't use -encodedCommand. Instead, use -Command with the appropriate number of escaped quotes (which ended up being 3) * [blosc] Update to 1.13.5 static-install-fix.patch no longer required (upstream contains the patched version). Resolves build error with VS 15.6 in static builds * [cgal] Avoid using absolute paths in cmake config file * Update CHANGELOG and bump version to v0.0.104 * [qt5-base][qtdeploy] Deploy plugin dependencies to the executable's folder. * Add libgeotiff port Signed-off-by: Hiroshi Miura * [libgeotiff] fix install directory for cmake configurations Signed-off-by: Hiroshi Miura * fix tiff detection error when static build * [libgeotiff] remove installed dlls when static build * [libgeotiff] update description * [chipmunk] 7.0.2 initial. * [recast] 1.5.1 initial. * [tinydir] 1.2.3 initial. * [mman] git-f5ff813 initial. * Update Catch to 2.1.2 (#2763) * [vcpkg-ci] Delete intermediate build folders even on unsuccesful builds * [folly] Workaround bug for VS 15.6 * [pcre] fix space issue and add mirror (fix #2751) * [realsense2] Update to v2.10.0 Update realsense2 port to librealsense v2.10.0. * [libevent] Fix generated libevent targets files * fixed typo in warning message (#2773) * [blaze] update to Blaze 3.3 * [lmdb] Fix possible whitespace problem * Fix date issue * add qt5-quickcontrols2 * add qt5-quickcontrols port * add qt5-graphicaleffects * change compile order to debug first, fix #2767 (#2785) * [liblzma] Add usage information * [ffmpeg] Allow static builds of ffmpeg (#2783) ffmpeg creates static .a libraries, so change the suffix to .lib * [ffmpeg] Bump version for PR #2783 * [aubio] Update to handle static FFMPEG * Copy local dependencies for library targets (#2787) * Fix for issue #2786 * [vcpkg-cmake-toolchain] Only applocal dependencies for shared libraries * [uriparser] Update to 0.8.5 * [vcpkg] Implement Default-Features (#2697) * [vcpkg] Add Default-Feature to make_status_pgh utility function Signed-off-by: Squareys * [vcpkg] Parse "Default-Features" as dependencies and add test for parsing Signed-off-by: Squareys * [vcpkg] Document some methods and structures Signed-off-by: Squareys * [vcpkg] Add install_default_features_test Signed-off-by: Squareys * [vcpkg] Change install_default_features_test to not have preinstalled package * [vcpkg] Test install behaviour of default features Signed-off-by: Squareys * [vcpkg] Implement default features Signed-off-by: Squareys * [vcpkg] Test default features upgrade behavior Signed-off-by: Squareys * [vcpkg] Implement upgrade with default features Signed-off-by: Squareys * [vcpkg] Test behaviour of upgrade with default features in dependencies Signed-off-by: Squareys * [vcpkg] Make upgrade install new default features Signed-off-by: Squareys * [vcpkg] Move collecting of packages for which to prevent defaults Further down the line to create_feature_install_plan. Signed-off-by: Squareys * [vcpkg] Fix core missing from default features and potential inf loop Signed-off-by: Squareys * [vcpkg] Rename, fix and move some tests Signed-off-by: Squareys * Updated boost license to 1.66.0 (#2795) I was a bit confused to see a reference to "1.65.1" while I was installing 1.66.0, but it turns out this URL is just not updated. This updates it. * [vcpkg-find-acquire-program] Add mirror for NASM. Fixes #2777. * update cuda requirement to 9.0, fixes #2791 (#2802) * update cuda requirement to 9.0, fixes #2791 * [cuda] Restore sample version blob * [vcpkg] http_proxy and https_proxy should be lowercase (#2815) Pacman of Msys understands only lowercase environment variables http_proxy and https_proxy. * [vcpkg] Add find/find_installed/is_installed for FeatureSpec Signed-off-by: Squareys * [vcpkg] Fix build command for packages that depend of features Signed-off-by: Squareys * [liblo] Initial port (#2821) * [portaudio] Added ASIO support to build * Update libpng to 1.6.34 * [liblo] Initial port * Revert "Update libpng to 1.6.34" This reverts commit ede0bb947b07aea119b7b05e3625c3eec1395af4. * Revert "[liblo] Initial port" This reverts commit bb819eb21841bb8cf4816af5a78e17ef58ec8ce5. * [liblo] Initial port * [liblo] Use vcpkg_from_github() and vcpkg_fixup_cmake_targets() * [liblo] Fix SHA512 * [openvr] update to 1.0.13 (#2809) * [ebml] Initial port. (#2812) * [vcpkg] Fix bug with missing dependencies introduced in #2697 (#2819) When a package dependency was not found (has no source control file), install would exit with "Value was null" when trying to install its default features, as the dependency would be marked erroneously as found in this case. Signed-off-by: Squareys * [vcpkg] Avoid using s::status_known() -- it does not do what you think it does * [jansson] Update to 2.11 (#2820) * [aws-sdk-cpp] update to 1.3.58 (#2810) * [mkl] Add port MKL (#2806) * [corrade,magnum,-plugins,-extras,-integration] Update to latest and support feature packages (#2687) [corrade,magnum,-plugins,-extras,-integration] Update to latest and support feature packages * [jbig2dec][libmupdf] Extract jbig2dec, remove remaining vendored 3rdparty --- docs/maintainers/vcpkg_configure_cmake.md | 5 +++++ ports/jbig2dec/CMakeLists.txt | 25 ++++++++++++++++++++++++ ports/jbig2dec/CONTROL | 4 ++++ ports/jbig2dec/portfile.cmake | 23 ++++++++++++++++++++++ ports/libmupdf/CMakeLists.txt | 32 ++++++++++++++++++++----------- ports/libmupdf/CONTROL | 4 ++-- ports/libmupdf/portfile.cmake | 21 +++++++++----------- scripts/cmake/vcpkg_configure_cmake.cmake | 9 +++++++-- 8 files changed, 96 insertions(+), 27 deletions(-) create mode 100644 ports/jbig2dec/CMakeLists.txt create mode 100644 ports/jbig2dec/CONTROL create mode 100644 ports/jbig2dec/portfile.cmake diff --git a/docs/maintainers/vcpkg_configure_cmake.md b/docs/maintainers/vcpkg_configure_cmake.md index 93f661767..200d358ae 100644 --- a/docs/maintainers/vcpkg_configure_cmake.md +++ b/docs/maintainers/vcpkg_configure_cmake.md @@ -21,6 +21,11 @@ Specifies the directory containing the `CMakeLists.txt`. By convention, this is ### 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. +### 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. diff --git a/ports/jbig2dec/CMakeLists.txt b/ports/jbig2dec/CMakeLists.txt new file mode 100644 index 000000000..a2a8376de --- /dev/null +++ b/ports/jbig2dec/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.9) +project(jbig2dec C) + +set(CMAKE_DEBUG_POSTFIX d) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + +file(GLOB SOURCES jbig2*.c) +list(REMOVE_ITEM SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/jbig2dec.c" + "${CMAKE_CURRENT_SOURCE_DIR}/jbig2_image_png.c" + "${CMAKE_CURRENT_SOURCE_DIR}/jbig2_image_pbm.c" +) + +add_library(jbig2dec ${SOURCES}) + +install(TARGETS jbig2dec + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES jbig2.h DESTINATION include) +endif() diff --git a/ports/jbig2dec/CONTROL b/ports/jbig2dec/CONTROL new file mode 100644 index 000000000..0ff000f44 --- /dev/null +++ b/ports/jbig2dec/CONTROL @@ -0,0 +1,4 @@ +Source: jbig2dec +Version: 0.13 +Description: a decoder library and example utility implementing the JBIG2 bi-level image compression spec. Also known as ITU T.88 and ISO IEC 14492, and included by reference in Adobe's PDF version 1.4 and later. + diff --git a/ports/jbig2dec/portfile.cmake b/ports/jbig2dec/portfile.cmake new file mode 100644 index 000000000..90e56bd9b --- /dev/null +++ b/ports/jbig2dec/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ArtifexSoftware/jbig2dec + REF 0.13 + SHA512 11d1209810d6c80a095ec59d6af44010d4664f4ba744c0c14bdad9564359cf31dd0095b072fa63de381f2de57116e523883aa8843cc8d9baa2c3a8b9b1fc3527 + HEAD_REF master +) + +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=1 +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/jbig2dec RENAME copyright) diff --git a/ports/libmupdf/CMakeLists.txt b/ports/libmupdf/CMakeLists.txt index 827f2de5d..76ed52c5a 100644 --- a/ports/libmupdf/CMakeLists.txt +++ b/ports/libmupdf/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.9) project(libmupdf C) set(CMAKE_DEBUG_POSTFIX d) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include/mupdf/pdf/name-table.h") execute_process( @@ -14,26 +15,30 @@ find_package(freetype NO_MODULE REQUIRED) find_package(JPEG REQUIRED) find_path(HARFBUZZ_INCLUDE hb.h PATH_SUFFIXES harfbuzz) find_library(HARFBUZZ_LIBRARIES harfbuzz) +find_package(ZLIB REQUIRED) +find_package(openjpeg REQUIRED) +find_library(JBIG2DEC_LIB NAMES jbig2decd jbig2dec) -file(GLOB_RECURSE SOURCES "source/*.c") +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 -DZ_SOLO) -target_include_directories(libmupdf PRIVATE - include - generated - thirdparty/jbig2dec - thirdparty/libjpeg - thirdparty/mujs - thirdparty/openjpeg/src/lib/openjp2 - ${JPEG_INCLUDE_DIR} - ${HARFBUZZ_INCLUDE} +target_compile_definitions(libmupdf PRIVATE -DSHARE_JPEG -DFZ_ENABLE_JS=0 -DNO_ICC) +target_include_directories(libmupdf + PUBLIC + include + PRIVATE + generated + ${JPEG_INCLUDE_DIR} + ${HARFBUZZ_INCLUDE} ) target_link_libraries(libmupdf PRIVATE + openjp2 freetype ${JPEG_LIBRARIES} ${HARFBUZZ_LIBRARIES} + ${JBIG2DEC_LIB} + ZLIB::ZLIB ) install(TARGETS libmupdf @@ -41,3 +46,8 @@ install(TARGETS libmupdf LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) + +if(BUILD_EXAMPLES) + add_executable(mu-office-test source/tests/mu-office-test.c) + target_link_libraries(mu-office-test PRIVATE libmupdf) +endif() \ No newline at end of file diff --git a/ports/libmupdf/CONTROL b/ports/libmupdf/CONTROL index ed61402d7..36ae69488 100644 --- a/ports/libmupdf/CONTROL +++ b/ports/libmupdf/CONTROL @@ -1,4 +1,4 @@ Source: libmupdf -Version: 1.11-1 -Build-Depends: freetype, libjpeg-turbo, harfbuzz, zlib, curl, glfw3 +Version: 1.12.0 +Build-Depends: freetype, libjpeg-turbo, harfbuzz, zlib, curl, glfw3, openjpeg, jbig2dec Description: a lightweight PDF, XPS, and E-book library diff --git a/ports/libmupdf/portfile.cmake b/ports/libmupdf/portfile.cmake index df4997a70..b3618ea80 100644 --- a/ports/libmupdf/portfile.cmake +++ b/ports/libmupdf/portfile.cmake @@ -1,21 +1,18 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message(STATUS "Warning: Dynamic building not supported. Building static.") - set(VCPKG_LIBRARY_LINKAGE static) -endif() - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mupdf-1.11-source) -vcpkg_download_distfile(ARCHIVE - URLS "https://mupdf.com/downloads/mupdf-1.11-source.tar.gz" - FILENAME "mupdf.tar.gz" - SHA512 501670f540e298a8126806ebbd9db8b29866f663b7bbf26c9ade1933e42f0c00ad410b9d93f3ddbfb3e45c38722869095de28d832fe3fb3703c55cc9a01dbf63 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ArtifexSoftware/mupdf + REF 1.12.0 + SHA512 893a1958e34355acf73624e9c47f4a97adf13d5fe33604ac384df9ac22a56ef7c18e02143eaffc3c2a08f460e4c71fee00c094b6d6696f8446977bb18f65e3da + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE PREFER_NINJA ) @@ -27,4 +24,4 @@ vcpkg_copy_pdbs() #copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYRIGHT) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index bc1d73f07..726aab2ec 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -21,6 +21,11 @@ ## ### 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. ## +## ### 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. ## @@ -45,7 +50,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" "SOURCE_PATH;GENERATOR" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + cmake_parse_arguments(_csc "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE" "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") @@ -209,7 +214,7 @@ function(vcpkg_configure_cmake) -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug) - if(NINJA_CAN_BE_USED AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + if(NINJA_CAN_BE_USED AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND NOT _csc_DISABLE_PARALLEL_CONFIGURE) vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) -- cgit v1.2.3 From 621bde044b76e3482667a0ae6c8357f714dee746 Mon Sep 17 00:00:00 2001 From: evpobr Date: Sat, 17 Feb 2018 16:14:14 +0500 Subject: [ebml] Apply path to export missing symbol from DLL (#2824) Failed to build libMatroska because of missing SafeReadIOCallback::EndOfStreamX not exported from DLL --- ports/ebml/CONTROL | 2 +- ports/ebml/export-endofstreamx.patch | 25 +++++++++++++++++++++++++ ports/ebml/portfile.cmake | 5 +++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 ports/ebml/export-endofstreamx.patch diff --git a/ports/ebml/CONTROL b/ports/ebml/CONTROL index 6bcc2c5e3..e4872dd6a 100644 --- a/ports/ebml/CONTROL +++ b/ports/ebml/CONTROL @@ -1,3 +1,3 @@ Source: ebml -Version: 1.3.5 +Version: 1.3.5-1 Description: a C++ libary to parse EBML files diff --git a/ports/ebml/export-endofstreamx.patch b/ports/ebml/export-endofstreamx.patch new file mode 100644 index 000000000..f89035230 --- /dev/null +++ b/ports/ebml/export-endofstreamx.patch @@ -0,0 +1,25 @@ +From d880a71996ba50c18d2e2d33ce4018b22566d9f4 Mon Sep 17 00:00:00 2001 +From: evpobr +Date: Sat, 17 Feb 2018 12:39:27 +0500 +Subject: [PATCH] Export SafeReadIOCallback::EndOfStreamX class from DLL + +--- + ebml/SafeReadIOCallback.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ebml/SafeReadIOCallback.h b/ebml/SafeReadIOCallback.h +index ea96727..3d9de07 100644 +--- a/ebml/SafeReadIOCallback.h ++++ b/ebml/SafeReadIOCallback.h +@@ -45,7 +45,7 @@ class EBML_DLL_API EbmlBinary; + + class EBML_DLL_API SafeReadIOCallback { + public: +- class EndOfStreamX { ++ class EBML_DLL_API EndOfStreamX { + public: + size_t mMissingBytes; + EndOfStreamX(std::size_t MissingBytes); +-- +2.15.1.windows.2 + diff --git a/ports/ebml/portfile.cmake b/ports/ebml/portfile.cmake index dd58484c3..4b92f37bb 100644 --- a/ports/ebml/portfile.cmake +++ b/ports/ebml/portfile.cmake @@ -28,6 +28,11 @@ vcpkg_from_github( file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/EbmlConfig.cmake DESTINATION ${SOURCE_PATH}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/export-endofstreamx.patch +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 6142925568ed0b8532feb40453dc556c2f3fa4d7 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sat, 17 Feb 2018 20:14:58 +0900 Subject: [libgeotiff] build and install utility commands (#2784) * [libgeotiff] install utility commands Signed-off-by: Hiroshi Miura * [libgeotiff] install utility only when release build and unconditionaly copy tool dependencies * [libgeotiff] fix tool instalation when static and bump version Signed-off-by: Hiroshi Miura --- ports/libgeotiff/CONTROL | 2 +- ports/libgeotiff/portfile.cmake | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ports/libgeotiff/CONTROL b/ports/libgeotiff/CONTROL index 8950200d9..f9fb872bb 100644 --- a/ports/libgeotiff/CONTROL +++ b/ports/libgeotiff/CONTROL @@ -1,4 +1,4 @@ Source: libgeotiff -Version: 1.4.2 +Version: 1.4.2-1 Description: Libgeotiff is an open source library normally hosted on top of ​libtiff for reading, and writing GeoTIFF information tags. Build-Depends: tiff, proj4, zlib, libjpeg-turbo diff --git a/ports/libgeotiff/portfile.cmake b/ports/libgeotiff/portfile.cmake index 36be37bb6..443c07acb 100644 --- a/ports/libgeotiff/portfile.cmake +++ b/ports/libgeotiff/portfile.cmake @@ -26,11 +26,12 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DWITH_UTILITIES=OFF -DWITH_TIFF=ON -DWITH_PROJ4=ON -DWITH_ZLIB=ON -DWITH_JPEG=ON + OPTIONS_RELEASE -DWITH_UTILITIES=ON + OPTIONS_DEBUG -DWITH_UTILITIES=OFF ) vcpkg_build_cmake() @@ -40,6 +41,11 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgeotiff RENAME copyright) +file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(INSTALL ${GEOTIFF_UTILS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/libgeotiff/) +file(REMOVE ${GEOTIFF_UTILS}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libgeotiff) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) -endif() \ No newline at end of file +endif() -- cgit v1.2.3 From 18be859328565eec58b6eb5952b585f66cb6b6fd Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Sat, 17 Feb 2018 14:16:32 +0300 Subject: Ceres and SuiteSparse features (#2800) * [suitesparse] Implement optional feature: metis * [ceres] Implement optional features: lapack, suitesparse, cxsparse, eigen. Closes #2798 * [ceres] Always require Eigen3 --- ports/ceres/CONTROL | 24 ++- ports/ceres/fix-find-packages.patch | 247 ------------------------ ports/ceres/portfile.cmake | 40 +++- ports/suitesparse/CONTROL | 8 +- ports/suitesparse/fix-install-suitesparse.patch | 19 +- ports/suitesparse/portfile.cmake | 7 +- 6 files changed, 80 insertions(+), 265 deletions(-) delete mode 100644 ports/ceres/fix-find-packages.patch diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL index 300b106da..f2b20f8d3 100644 --- a/ports/ceres/CONTROL +++ b/ports/ceres/CONTROL @@ -1,4 +1,24 @@ Source: ceres -Version: 1.13.0-2 -Build-Depends:suitesparse, eigen3, clapack, gflags, glog +Version: 1.13.0-4 +# eigen is always required by CMake, even if it isn't used. +Build-Depends: glog, eigen3 Description: non-linear optimization package + +Feature: lapack +Build-Depends: clapack +Description: Use Lapack in Ceres + +Feature: suitesparse +Build-Depends: ceres[lapack], suitesparse[core] +Description: SuiteSparse support for Ceres + +Feature: cxsparse +Build-Depends: suitesparse[core] +Description: CXSparse support for Ceres + +Feature: eigensparse +Description: Use of Eigen as a sparse linear algebra library in Ceres + +Feature: tools +Build-Depends: gflags +Description: Ceres tools diff --git a/ports/ceres/fix-find-packages.patch b/ports/ceres/fix-find-packages.patch deleted file mode 100644 index bdabdaa89..000000000 --- a/ports/ceres/fix-find-packages.patch +++ /dev/null @@ -1,247 +0,0 @@ ---- a/cmake/FindSuiteSparse.cmake Mon Dec 05 18:42:48 2016 -+++ b/cmake/FindSuiteSparse.cmake Fri Jul 07 01:50:54 2017 -@@ -179,8 +179,6 @@ - /opt/local/include/ufsparse # Mac OS X - /usr/local/homebrew/include # Mac OS X - /usr/local/include -- /usr/local/include/suitesparse -- /usr/include/suitesparse # Ubuntu - /usr/include) - list(APPEND SUITESPARSE_CHECK_LIBRARY_DIRS - ${SUITESPARSE_LIBRARY_DIR_HINTS} -@@ -188,9 +186,10 @@ - /opt/local/lib/ufsparse # Mac OS X - /usr/local/homebrew/lib # Mac OS X - /usr/local/lib -- /usr/local/lib/suitesparse -- /usr/lib/suitesparse # Ubuntu - /usr/lib) -+# Additional suffixes to try appending to each search path. -+list(APPEND SUITESPARSE_CHECK_PATH_SUFFIXES -+ suitesparse) # Windows/Ubuntu - - # Given the number of components of SuiteSparse, and to ensure that the - # automatic failure message generated by FindPackageHandleStandardArgs() -@@ -218,7 +217,8 @@ - set(AMD_FOUND TRUE) - list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS AMD_FOUND) - find_library(AMD_LIBRARY NAMES amd -- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${AMD_LIBRARY}) - message(STATUS "Found AMD library: ${AMD_LIBRARY}") - else (EXISTS ${AMD_LIBRARY}) -@@ -229,7 +229,8 @@ - mark_as_advanced(AMD_LIBRARY) - - find_path(AMD_INCLUDE_DIR NAMES amd.h -- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${AMD_INCLUDE_DIR}) - message(STATUS "Found AMD header in: ${AMD_INCLUDE_DIR}") - else (EXISTS ${AMD_INCLUDE_DIR}) -@@ -243,7 +244,8 @@ - set(CAMD_FOUND TRUE) - list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS CAMD_FOUND) - find_library(CAMD_LIBRARY NAMES camd -- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${CAMD_LIBRARY}) - message(STATUS "Found CAMD library: ${CAMD_LIBRARY}") - else (EXISTS ${CAMD_LIBRARY}) -@@ -254,7 +256,8 @@ - mark_as_advanced(CAMD_LIBRARY) - - find_path(CAMD_INCLUDE_DIR NAMES camd.h -- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${CAMD_INCLUDE_DIR}) - message(STATUS "Found CAMD header in: ${CAMD_INCLUDE_DIR}") - else (EXISTS ${CAMD_INCLUDE_DIR}) -@@ -268,7 +271,8 @@ - set(COLAMD_FOUND TRUE) - list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS COLAMD_FOUND) - find_library(COLAMD_LIBRARY NAMES colamd -- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${COLAMD_LIBRARY}) - message(STATUS "Found COLAMD library: ${COLAMD_LIBRARY}") - else (EXISTS ${COLAMD_LIBRARY}) -@@ -279,7 +283,8 @@ - mark_as_advanced(COLAMD_LIBRARY) - - find_path(COLAMD_INCLUDE_DIR NAMES colamd.h -- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${COLAMD_INCLUDE_DIR}) - message(STATUS "Found COLAMD header in: ${COLAMD_INCLUDE_DIR}") - else (EXISTS ${COLAMD_INCLUDE_DIR}) -@@ -293,7 +298,8 @@ - set(CCOLAMD_FOUND TRUE) - list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS CCOLAMD_FOUND) - find_library(CCOLAMD_LIBRARY NAMES ccolamd -- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${CCOLAMD_LIBRARY}) - message(STATUS "Found CCOLAMD library: ${CCOLAMD_LIBRARY}") - else (EXISTS ${CCOLAMD_LIBRARY}) -@@ -304,7 +310,8 @@ - mark_as_advanced(CCOLAMD_LIBRARY) - - find_path(CCOLAMD_INCLUDE_DIR NAMES ccolamd.h -- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${CCOLAMD_INCLUDE_DIR}) - message(STATUS "Found CCOLAMD header in: ${CCOLAMD_INCLUDE_DIR}") - else (EXISTS ${CCOLAMD_INCLUDE_DIR}) -@@ -318,7 +325,8 @@ - set(CHOLMOD_FOUND TRUE) - list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS CHOLMOD_FOUND) - find_library(CHOLMOD_LIBRARY NAMES cholmod -- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${CHOLMOD_LIBRARY}) - message(STATUS "Found CHOLMOD library: ${CHOLMOD_LIBRARY}") - else (EXISTS ${CHOLMOD_LIBRARY}) -@@ -329,7 +337,8 @@ - mark_as_advanced(CHOLMOD_LIBRARY) - - find_path(CHOLMOD_INCLUDE_DIR NAMES cholmod.h -- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${CHOLMOD_INCLUDE_DIR}) - message(STATUS "Found CHOLMOD header in: ${CHOLMOD_INCLUDE_DIR}") - else (EXISTS ${CHOLMOD_INCLUDE_DIR}) -@@ -343,7 +352,8 @@ - set(SUITESPARSEQR_FOUND TRUE) - list(APPEND SUITESPARSE_FOUND_REQUIRED_VARS SUITESPARSEQR_FOUND) - find_library(SUITESPARSEQR_LIBRARY NAMES spqr -- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${SUITESPARSEQR_LIBRARY}) - message(STATUS "Found SuiteSparseQR library: ${SUITESPARSEQR_LIBRARY}") - else (EXISTS ${SUITESPARSEQR_LIBRARY}) -@@ -354,7 +364,8 @@ - mark_as_advanced(SUITESPARSEQR_LIBRARY) - - find_path(SUITESPARSEQR_INCLUDE_DIR NAMES SuiteSparseQR.hpp -- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${SUITESPARSEQR_INCLUDE_DIR}) - message(STATUS "Found SuiteSparseQR header in: ${SUITESPARSEQR_INCLUDE_DIR}") - else (EXISTS ${SUITESPARSEQR_INCLUDE_DIR}) -@@ -370,7 +381,8 @@ - # support for it, this will do no harm if it wasn't. - set(TBB_FOUND TRUE) - find_library(TBB_LIBRARIES NAMES tbb -- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${TBB_LIBRARIES}) - message(STATUS "Found Intel Thread Building Blocks (TBB) library: " - "${TBB_LIBRARIES}, assuming SuiteSparseQR was compiled with TBB.") -@@ -383,7 +395,8 @@ - - if (TBB_FOUND) - find_library(TBB_MALLOC_LIB NAMES tbbmalloc -- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${TBB_MALLOC_LIB}) - message(STATUS "Found Intel Thread Building Blocks (TBB) Malloc library: " - "${TBB_MALLOC_LIB}") -@@ -413,7 +426,8 @@ - # If SuiteSparse version is >= 4 then SuiteSparse_config is required. - # For SuiteSparse 3, UFconfig.h is required. - find_library(SUITESPARSE_CONFIG_LIBRARY NAMES suitesparseconfig -- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${SUITESPARSE_CONFIG_LIBRARY}) - message(STATUS "Found SuiteSparse_config library: " - "${SUITESPARSE_CONFIG_LIBRARY}") -@@ -421,7 +435,8 @@ - mark_as_advanced(SUITESPARSE_CONFIG_LIBRARY) - - find_path(SUITESPARSE_CONFIG_INCLUDE_DIR NAMES SuiteSparse_config.h -- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${SUITESPARSE_CONFIG_INCLUDE_DIR}) - message(STATUS "Found SuiteSparse_config header in: " - "${SUITESPARSE_CONFIG_INCLUDE_DIR}") -@@ -439,7 +454,8 @@ - # does not have librt). - if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR UNIX AND NOT APPLE) - find_library(LIBRT_LIBRARY NAMES rt -- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (LIBRT_LIBRARY) - message(STATUS "Adding librt: ${LIBRT_LIBRARY} to " - "SuiteSparse_config libraries (required on Linux & Unix [not OSX] if " -@@ -458,7 +474,8 @@ - # UFconfig header which should be present in < v4 installs. - set(SUITESPARSE_CONFIG_FOUND FALSE) - find_path(UFCONFIG_INCLUDE_DIR NAMES UFconfig.h -- PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_INCLUDE_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${UFCONFIG_INCLUDE_DIR}) - message(STATUS "Found UFconfig header in: ${UFCONFIG_INCLUDE_DIR}") - set(UFCONFIG_FOUND TRUE) -@@ -549,7 +566,8 @@ - - # METIS (Optional dependency). - find_library(METIS_LIBRARY NAMES metis -- PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS}) -+ PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS} -+ PATH_SUFFIXES ${SUITESPARSE_CHECK_PATH_SUFFIXES}) - if (EXISTS ${METIS_LIBRARY}) - message(STATUS "Found METIS library: ${METIS_LIBRARY}.") - set(METIS_FOUND TRUE) ---- a/cmake/FindCXSparse.cmake Mon Dec 05 18:42:48 2016 -+++ b/cmake/FindCXSparse.cmake Fri Jul 07 01:50:04 2017 -@@ -135,12 +135,16 @@ - /usr/local/homebrew/lib # Mac OS X. - /opt/local/lib - /usr/lib) -+# Additional suffixes to try appending to each search path. -+list(APPEND CXSPARSE_CHECK_PATH_SUFFIXES -+ suitesparse) # Linux/Windows - - # Search supplied hint directories first if supplied. - find_path(CXSPARSE_INCLUDE_DIR - NAMES cs.h -- PATHS ${CXSPARSE_INCLUDE_DIR_HINTS} -- ${CXSPARSE_CHECK_INCLUDE_DIRS}) -+ HINTS ${CXSPARSE_INCLUDE_DIR_HINTS} -+ PATHS ${CXSPARSE_CHECK_INCLUDE_DIRS} -+ PATH_SUFFIXES ${CXSPARSE_CHECK_PATH_SUFFIXES}) - if (NOT CXSPARSE_INCLUDE_DIR OR - NOT EXISTS ${CXSPARSE_INCLUDE_DIR}) - cxsparse_report_not_found( -@@ -150,8 +154,9 @@ - NOT EXISTS ${CXSPARSE_INCLUDE_DIR}) - - find_library(CXSPARSE_LIBRARY NAMES cxsparse -- PATHS ${CXSPARSE_LIBRARY_DIR_HINTS} -- ${CXSPARSE_CHECK_LIBRARY_DIRS}) -+ HINTS ${CXSPARSE_LIBRARY_DIR_HINTS} -+ PATHS ${CXSPARSE_CHECK_LIBRARY_DIRS} -+ PATH_SUFFIXES ${CXSPARSE_CHECK_PATH_SUFFIXES}) - if (NOT CXSPARSE_LIBRARY OR - NOT EXISTS ${CXSPARSE_LIBRARY}) - cxsparse_report_not_found( diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index e8ae03ce4..8a2b88a35 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -16,24 +16,45 @@ vcpkg_from_github( HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-find-packages.patch -) - # Ninja crash compiler with error: # "fatal error C1001: An internal error has occurred in the compiler. (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 255)" +set(SUITESPARSE OFF) +if("suitesparse" IN_LIST FEATURES) + set(SUITESPARSE ON) +endif() + +set(CXSPARSE OFF) +if("cxsparse" IN_LIST FEATURES) + set(CXSPARSE ON) +endif() + +set(LAPACK OFF) +if("lapack" IN_LIST FEATURES) + set(LAPACK ON) +endif() + +set(EIGENSPARSE OFF) +if("eigensparse" IN_LIST FEATURES) + set(EIGENSPARSE ON) +endif() + +set(GFLAGS OFF) +if("tools" IN_LIST FEATURES) + set(GFLAGS ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DEXPORT_BUILD_DIR=ON -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF - -DCXSPARSE=ON - -DEIGENSPARSE=ON - -DSUITESPARSE=ON + -DGFLAGS=${GFLAGS} + -DCXSPARSE=${CXSPARSE} + -DEIGENSPARSE=${EIGENSPARSE} + -DLAPACK=${LAPACK} + -DSUITESPARSE=${SUITESPARSE} -DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION=OFF # TheiaSfm doesn't work well with this -DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION=OFF # TheiaSfm doesn't work well with this -DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE} @@ -41,7 +62,6 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") - vcpkg_copy_pdbs() # Changes target search path diff --git a/ports/suitesparse/CONTROL b/ports/suitesparse/CONTROL index af5e1b631..702692497 100644 --- a/ports/suitesparse/CONTROL +++ b/ports/suitesparse/CONTROL @@ -1,4 +1,8 @@ Source: suitesparse -Version: 4.5.5-3 -Build-Depends: metis, clapack +Version: 4.5.5-4 +Build-Depends: clapack Description: algebra library + +Feature: metis +Build-Depends: metis +Description: Use metis in SuiteSparse diff --git a/ports/suitesparse/fix-install-suitesparse.patch b/ports/suitesparse/fix-install-suitesparse.patch index 4da6e73f4..a5b5400fa 100644 --- a/ports/suitesparse/fix-install-suitesparse.patch +++ b/ports/suitesparse/fix-install-suitesparse.patch @@ -1,7 +1,20 @@ -diff --git "a/SuiteSparse/CMakeLists.txt" "b/SuiteSparse/CMakeLists.txt" +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8227298..c0eb354 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -222,7 +222,7 @@ ELSE() + ENDIF() + ENDIF() + +-IF(BUILD_METIS) ++IF(BUILD_METIS OR USE_VCPKG_METIS) + set(SuiteSparse_LINKER_METIS_LIBS "metis") + else() + set(SuiteSparse_LINKER_METIS_LIBS "") +diff --git a/SuiteSparse/CMakeLists.txt b/SuiteSparse/CMakeLists.txt index 7361363..8a48cf3 100644 ---- "a/SuiteSparse/CMakeLists.txt" -+++ "b/SuiteSparse/CMakeLists.txt" +--- a/SuiteSparse/CMakeLists.txt ++++ b/SuiteSparse/CMakeLists.txt @@ -10,7 +10,11 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_BUILD_TYPE MATCHES "Debug") IF (BUILD_METIS) INCLUDE_DIRECTORIES("${METIS_SOURCE_DIR}/include") diff --git a/ports/suitesparse/portfile.cmake b/ports/suitesparse/portfile.cmake index ce97c4b9f..75399609e 100644 --- a/ports/suitesparse/portfile.cmake +++ b/ports/suitesparse/portfile.cmake @@ -45,12 +45,17 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/remove-debug-postfix.patch" ) +set(USE_VCPKG_METIS OFF) +if("metis" IN_LIST FEATURES) + set(USE_VCPKG_METIS ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SUITESPARSEWIN_PATH} PREFER_NINJA OPTIONS -DBUILD_METIS=OFF #Disable the option to build metis from source - -DUSE_VCPKG_METIS=ON #Force using vcpckg metis library + -DUSE_VCPKG_METIS=${USE_VCPKG_METIS} #Force using vcpckg metis library -DMETIS_SOURCE_DIR=${CURRENT_INSTALLED_DIR} -DLIB_POSTFIX= -DSUITESPARSE_USE_CUSTOM_BLAS_LAPACK_LIBS=ON -- cgit v1.2.3 From 463775e913b06a11bb5c2acbd597790e834def93 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sat, 17 Feb 2018 20:19:15 +0900 Subject: [szip] Fix szip-config.cmake to return SZIP_FOUND (#2765) In current implementation, it returns only SZIP_static_FOUND or SZIP_shared_FOUND. szip-config.cmake calls check_required_components(SZIP) helper, but it just set SZIP_FOUND=FALSE when it does not find required componets, but never set SZIP_FOUND=TRUE. szip-config.cmake should set SZIP_FOUND=TRUE when it find some components before calling the helper function. Signed-off-by: Hiroshi Miura --- ports/szip/CONTROL | 2 +- ports/szip/fix-szip-config-to-set-szip-found.patch | 11 +++++++++++ ports/szip/portfile.cmake | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 ports/szip/fix-szip-config-to-set-szip-found.patch diff --git a/ports/szip/CONTROL b/ports/szip/CONTROL index 37923213a..ca2093d66 100644 --- a/ports/szip/CONTROL +++ b/ports/szip/CONTROL @@ -1,3 +1,3 @@ Source: szip -Version: 2.1.1 +Version: 2.1.1-1 Description: Szip compression software, providing lossless compression of scientific data diff --git a/ports/szip/fix-szip-config-to-set-szip-found.patch b/ports/szip/fix-szip-config-to-set-szip-found.patch new file mode 100644 index 000000000..f662916f9 --- /dev/null +++ b/ports/szip/fix-szip-config-to-set-szip-found.patch @@ -0,0 +1,11 @@ +diff -urN szip-2.1.1-a/config/cmake/szip-config.cmake.in szip-2.1.1-b/config/cmake/szip-config.cmake.in +--- szip-2.1.1-a/config/cmake/szip-config.cmake.in 2018-02-10 11:06:46.890685077 +0900 ++++ szip-2.1.1-b/config/cmake/szip-config.cmake.in 2018-02-10 11:11:25.369274127 +0900 +@@ -51,6 +51,7 @@ + set (${SZIP_PACKAGE_NAME}_${comp}_FOUND 0) + else () + set (${SZIP_PACKAGE_NAME}_${comp}_FOUND 1) ++ set (${SZIP_PACKAGE_NAME}_FOUND 1) + string(TOUPPER ${SZIP_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY) + set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @SZIP_LIB_CORENAME@-${comp}) + endif () diff --git a/ports/szip/portfile.cmake b/ports/szip/portfile.cmake index 39d5646ee..9fcd22ba1 100644 --- a/ports/szip/portfile.cmake +++ b/ports/szip/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-static-lib-in-shared-build.patch ${CMAKE_CURRENT_LIST_DIR}/default-component-shared.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-szip-config-to-set-szip-found.patch ) vcpkg_configure_cmake( -- cgit v1.2.3 From 14ef8e2fd2b99fc591bd1f29300c64d9fc14d84d Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Sat, 17 Feb 2018 12:54:43 +0100 Subject: Fix building boost.mpi (#2684) * Fix building boost.mpi * [boost-*] Remove boost-mpi dependencies to avoid direct dependency on msmpi. * [boost-build] Bump version with mpi changes --- ports/boost-build/CONTROL | 2 +- ports/boost-build/Jamroot.jam | 9 +++++++++ ports/boost-build/user-config.jam | 8 ++++++++ ports/boost-graph-parallel/CONTROL | 2 +- ports/boost-mpi/CONTROL | 4 ++-- ports/boost-odeint/CONTROL | 2 +- ports/boost-vcpkg-helpers/generate-ports.ps1 | 15 ++++++++++++--- ports/boost/CONTROL | 6 +++++- 8 files changed, 39 insertions(+), 9 deletions(-) diff --git a/ports/boost-build/CONTROL b/ports/boost-build/CONTROL index f74f24f5c..cf93bfa1e 100644 --- a/ports/boost-build/CONTROL +++ b/ports/boost-build/CONTROL @@ -1,3 +1,3 @@ Source: boost-build -Version: 1.66.0-4 +Version: 1.66.0-5 Description: Boost.Build diff --git a/ports/boost-build/Jamroot.jam b/ports/boost-build/Jamroot.jam index 84f82126d..6669b446e 100644 --- a/ports/boost-build/Jamroot.jam +++ b/ports/boost-build/Jamroot.jam @@ -125,6 +125,15 @@ if "@PORT@" != "boost-test" explicit boost_unit_test_framework ; } +if "@PORT@" != "boost-serialization" +{ + use-project /boost/serialization : . ; + + lib boost_serialization : : @CURRENT_INSTALLED_DIR@/lib/boost_serialization-vc140-mt.lib release ; + lib boost_serialization : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_serialization-vc140-mt-gd.lib debug ; + explicit boost_serialization ; +} + rule requires ( foo * ) { } diff --git a/ports/boost-build/user-config.jam b/ports/boost-build/user-config.jam index ab86c0c43..59cc160cc 100644 --- a/ports/boost-build/user-config.jam +++ b/ports/boost-build/user-config.jam @@ -11,6 +11,14 @@ if "@PORT@" = "boost-python" using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_DEBUG@" : on ; } +if "@PORT@" = "boost-mpi" +{ + using mpi : : + @CURRENT_INSTALLED_DIR@/lib + @CURRENT_INSTALLED_DIR@/include + msmpi ; +} + project user-config : ; lib advapi32 ; diff --git a/ports/boost-graph-parallel/CONTROL b/ports/boost-graph-parallel/CONTROL index f3a7a6744..ba7cf38d2 100644 --- a/ports/boost-graph-parallel/CONTROL +++ b/ports/boost-graph-parallel/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-graph-parallel Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-detail, boost-dynamic-bitset, boost-function, boost-functional, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpi, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-detail, boost-dynamic-bitset, boost-function, boost-functional, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost graph_parallel module diff --git a/ports/boost-mpi/CONTROL b/ports/boost-mpi/CONTROL index 807729530..7d17fedec 100644 --- a/ports/boost-mpi/CONTROL +++ b/ports/boost-mpi/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-mpi -Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.66.0-1 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, msmpi Description: Boost mpi module diff --git a/ports/boost-odeint/CONTROL b/ports/boost-odeint/CONTROL index abe138aec..4ab8a7814 100644 --- a/ports/boost-odeint/CONTROL +++ b/ports/boost-odeint/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-odeint Version: 1.66.0 -Build-Depends: boost-array, boost-assert, boost-bind, boost-compute, boost-config, boost-core, boost-function, boost-fusion, boost-iterator, boost-math, boost-mpi, boost-mpl, boost-multi-array, boost-preprocessor, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-units, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-array, boost-assert, boost-bind, boost-compute, boost-config, boost-core, boost-function, boost-fusion, boost-iterator, boost-math, boost-mpl, boost-multi-array, boost-preprocessor, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-units, boost-utility, boost-vcpkg-helpers Description: Boost odeint module diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index c410cd6a0..8b79826e2 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -22,7 +22,7 @@ function Generate() $sanitizedName = $name -replace "_","-" $versionsuffix = "" - if ($Name -eq "python" -or $Name -eq "asio") + if ($Name -eq "python" -or $Name -eq "asio" -or $Name -eq "mpi") { $versionsuffix = "-1" } @@ -301,7 +301,7 @@ foreach ($library in $libraries) -and ` (($library -notmatch "detail") -or ($_ -notmatch "static_assert|integer|mpl|type_traits"))` -and ` - (($library -notmatch "property_map") -or ($_ -notmatch "mpi"))` + ($_ -notmatch "mpi")` -and ` (($library -notmatch "spirit") -or ($_ -notmatch "serialization"))` -and ` @@ -339,6 +339,10 @@ foreach ($library in $libraries) { $deps += @("openssl") } + elseif ($library -eq "mpi") + { + $deps += @("msmpi") + } Generate ` -Name $library ` @@ -363,7 +367,8 @@ foreach ($library in $libraries) } # Generate master boost control file which depends on each individual library -$boostDependsList = @($libraries_in_boost_port | % { "boost-$_" -replace "_","-" }) -join ", " +# mpi is excluded due to it having a dependency on msmpi +$boostDependsList = @($libraries_in_boost_port | % { "boost-$_" -replace "_","-" } | ? { $_ -notmatch "boost-mpi" }) -join ", " @( "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" @@ -371,6 +376,10 @@ $boostDependsList = @($libraries_in_boost_port | % { "boost-$_" -replace "_","-" "Version: $version" "Description: Peer-reviewed portable C++ source libraries" "Build-Depends: $boostDependsList" + "" + "Feature: mpi" + "Description: Build with MPI support" + "Build-Depends: boost-mpi" ) | out-file -enc ascii $scriptsDir/../boost/CONTROL "set(VCPKG_POLICY_EMPTY_PACKAGE enabled)`n" | out-file -enc ascii $scriptsDir/../boost/portfile.cmake diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index e9ed7c84b..0153a151a 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -2,4 +2,8 @@ Source: boost Version: 1.66.0 Description: Peer-reviewed portable C++ source libraries -Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-context (windows), boost-conversion, boost-convert, boost-core, boost-coroutine (windows), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-disjoint-sets, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (windows), boost-filesystem (windows), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (windows), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (windows), boost-local-function, boost-lockfree, boost-log (windows), boost-logic (windows), boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpi, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-optional, boost-parameter, boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options (windows), boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (windows), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-scope-exit, boost-serialization, boost-signals, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (windows), boost-statechart, boost-static-assert, boost-system, boost-test (windows), boost-thread (windows), boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure (windows), boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-vmd, boost-wave (windows), boost-winapi, boost-xpressive +Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-context (windows), boost-conversion, boost-convert, boost-core, boost-coroutine (windows), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-disjoint-sets, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (windows), boost-filesystem (windows), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (windows), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (windows), boost-local-function, boost-lockfree, boost-log (windows), boost-logic (windows), boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-optional, boost-parameter, boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options (windows), boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (windows), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-scope-exit, boost-serialization, boost-signals, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (windows), boost-statechart, boost-static-assert, boost-system, boost-test (windows), boost-thread (windows), boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure (windows), boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-vmd, boost-wave (windows), boost-winapi, boost-xpressive + +Feature: mpi +Description: Build with MPI support +Build-Depends: boost-mpi -- cgit v1.2.3 From d60b48c32e31dcd3abc81c94fcb85bb825734d8b Mon Sep 17 00:00:00 2001 From: Albert Huang Date: Sat, 17 Feb 2018 07:31:26 -0500 Subject: Add libpng-apng as a new port (#2578) * Add libpng-apng as a new ports definition * Update portfile to use 7Z to extract patch + fix others --- ports/libpng-apng/CONTROL | 4 ++ ports/libpng-apng/portfile.cmake | 78 ++++++++++++++++++++++ ports/libpng-apng/usage | 4 ++ ports/libpng-apng/use-abort-on-all-platforms.patch | 17 +++++ 4 files changed, 103 insertions(+) create mode 100644 ports/libpng-apng/CONTROL create mode 100644 ports/libpng-apng/portfile.cmake create mode 100644 ports/libpng-apng/usage create mode 100644 ports/libpng-apng/use-abort-on-all-platforms.patch diff --git a/ports/libpng-apng/CONTROL b/ports/libpng-apng/CONTROL new file mode 100644 index 000000000..f4ea530fe --- /dev/null +++ b/ports/libpng-apng/CONTROL @@ -0,0 +1,4 @@ +Source: libpng-apng +Version: 1.6.34-2 +Build-Depends: zlib +Description: libpng-apng is a library implementing an interface for reading and writing (A)PNG ((Animated) Portable Network Graphics) format files. This is backward compatible with the regular libpng, both in library usage and format. diff --git a/ports/libpng-apng/portfile.cmake b/ports/libpng-apng/portfile.cmake new file mode 100644 index 000000000..b1ec137a8 --- /dev/null +++ b/ports/libpng-apng/portfile.cmake @@ -0,0 +1,78 @@ +include(vcpkg_common_functions) + +set(LIBPNG_APNG_VERSION 1.6.34) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO glennrp/libpng + REF v${LIBPNG_APNG_VERSION} + SHA512 23b6112a1d16a34c8037d5c5812944d4385fc96ed819a22172776bdd5acd3a34e55f073b46087b77d1c12cecc68f9e8ba7754c86b5ab6ed3016063e1c795de7a + HEAD_REF master +) + +vcpkg_download_distfile(LIBPNG_APNG_PATCH_ARCHIVE + URLS "https://downloads.sourceforge.net/project/libpng-apng/libpng16/${LIBPNG_APNG_VERSION}/libpng-${LIBPNG_APNG_VERSION}-apng.patch.gz" + FILENAME "libpng-${LIBPNG_APNG_VERSION}-apng.patch.gz" + SHA512 0777b8e55aeee207ee92479f2258ef1f60f16d7951fdbc6d89a80ef533b86dadecd1ef659d6fe7602d8ea3a8e711a096b0f77ee09b993799b73dfffddfe5dd3c +) + +vcpkg_find_acquire_program(7Z) + +vcpkg_execute_required_process( + COMMAND ${7Z} x ${LIBPNG_APNG_PATCH_ARCHIVE} -aoa + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src + LOGNAME extract-patch.log +) + +find_program(GIT NAMES git git.cmd) + +# sed and awk are installed with git but in a different directory +get_filename_component(GIT_EXE_PATH ${GIT} DIRECTORY) +set(AWK_EXE_PATH "${GIT_EXE_PATH}/../usr/bin") +set(ENV{PATH} "$ENV{PATH};${AWK_EXE_PATH}") + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch + ${CURRENT_BUILDTREES_DIR}/src/libpng-${LIBPNG_APNG_VERSION}-apng.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(PNG_STATIC_LIBS OFF) + set(PNG_SHARED_LIBS ON) +else() + set(PNG_STATIC_LIBS ON) + set(PNG_SHARED_LIBS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPNG_STATIC=${PNG_STATIC_LIBS} + -DPNG_SHARED=${PNG_SHARED_LIBS} + -DPNG_TESTS=OFF + -DPNG_PREFIX=a + -DSKIP_INSTALL_PROGRAMS=ON + -DSKIP_INSTALL_EXECUTABLES=ON + -DSKIP_INSTALL_FILES=ON + OPTIONS_DEBUG + -DSKIP_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib) +endif() + +# Remove CMake config files as they are incorrectly generated and everyone uses built-in FindPNG anyway. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libpng ${CURRENT_PACKAGES_DIR}/debug/lib/libpng) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpng-apng) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpng-apng/LICENSE ${CURRENT_PACKAGES_DIR}/share/libpng-apng/copyright) + +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/libpng-apng/usage b/ports/libpng-apng/usage new file mode 100644 index 000000000..d9c299738 --- /dev/null +++ b/ports/libpng-apng/usage @@ -0,0 +1,4 @@ +The package libpng-apng is compatible with built-in CMake targets: + + find_package(PNG REQUIRED) + target_link_libraries(main PRIVATE PNG::PNG) diff --git a/ports/libpng-apng/use-abort-on-all-platforms.patch b/ports/libpng-apng/use-abort-on-all-platforms.patch new file mode 100644 index 000000000..0a629e059 --- /dev/null +++ b/ports/libpng-apng/use-abort-on-all-platforms.patch @@ -0,0 +1,17 @@ +diff --git a/pngpriv.h b/pngpriv.h +index fe3355d..5a049b5 100644 +--- a/pngpriv.h ++++ b/pngpriv.h +@@ -457,11 +457,7 @@ + + /* Memory model/platform independent fns */ + #ifndef PNG_ABORT +-# ifdef _WINDOWS_ +-# define PNG_ABORT() ExitProcess(0) +-# else +-# define PNG_ABORT() abort() +-# endif ++# define PNG_ABORT() abort() + #endif + + /* These macros may need to be architecture dependent. */ -- cgit v1.2.3 From 12b30c0f88eb583ab8b60d4b7706574234696545 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Sat, 17 Feb 2018 16:02:40 +0300 Subject: [draco] Update to version 1.2.5 (#2826) --- ports/draco/CONTROL | 2 +- ports/draco/portfile.cmake | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ports/draco/CONTROL b/ports/draco/CONTROL index 44fbde429..1f380a804 100644 --- a/ports/draco/CONTROL +++ b/ports/draco/CONTROL @@ -1,4 +1,4 @@ Source: draco -Version: 0.10.0-1 +Version: 1.2.5 Description: A library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics. Build-Depends: diff --git a/ports/draco/portfile.cmake b/ports/draco/portfile.cmake index 0b9bca010..8080a2e0f 100644 --- a/ports/draco/portfile.cmake +++ b/ports/draco/portfile.cmake @@ -20,8 +20,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/draco - REF 0.10.0 - SHA512 4e1c5d0799b7c005167847886f6cb9ae450beb4fe6dc58971955abe0cdf43317253a2e19a185cf1210169a6b2d1922c0d684e50d39145894b01e775717e6d173 + REF 1.2.5 + SHA512 2d3d51b16edf4fd111a6c565c9bcf99adc35372d642c3850a69cc1a9010e3f1c6953e6bfe37088f85c2fb31c27680cc7f2f66ea68399144ad87cf6d490af4789 HEAD_REF master ) @@ -32,6 +32,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/draco/cmake) + # Install tools and plugins file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe") if(TOOLS) @@ -40,8 +42,12 @@ if(TOOLS) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/draco) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/draco) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) vcpkg_copy_pdbs() -- cgit v1.2.3 From 6f92f7acc5595050295bea2ae57407c124911750 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Fri, 16 Feb 2018 13:29:27 +0900 Subject: [libgeotiff] Update patches - Import CMakeLists updates from libgeotiff trunk HEAD. It makes unify target name among static/shared libs. - Rebased patches and generated from git format-patch command. These two patches are as same code as previous one. - Publish patches on https://github.com/miurahr/libgeotiff Signed-off-by: Hiroshi Miura --- ...CMake-configuration-to-align-with-other-C.patch | 88 ++++++++++++++++++++++ ports/libgeotiff/0002-Fix-directory-output.patch | 28 +++++++ .../libgeotiff/0003-Fix-cmake-TIFF-detection.patch | 36 +++++++++ ports/libgeotiff/fix-cmake-tiff-detection.patch | 21 ------ ports/libgeotiff/fix-directory-output.patch | 14 ---- ports/libgeotiff/portfile.cmake | 6 +- 6 files changed, 156 insertions(+), 37 deletions(-) create mode 100644 ports/libgeotiff/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch create mode 100644 ports/libgeotiff/0002-Fix-directory-output.patch create mode 100644 ports/libgeotiff/0003-Fix-cmake-TIFF-detection.patch delete mode 100644 ports/libgeotiff/fix-cmake-tiff-detection.patch delete mode 100644 ports/libgeotiff/fix-directory-output.patch diff --git a/ports/libgeotiff/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch b/ports/libgeotiff/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch new file mode 100644 index 000000000..93476fd2f --- /dev/null +++ b/ports/libgeotiff/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch @@ -0,0 +1,88 @@ +From 77b4bf4e649d55b1f1df38494114727f972ec806 Mon Sep 17 00:00:00 2001 +From: Howard Butler +Date: Mon, 11 Dec 2017 15:21:56 +0000 +Subject: [PATCH 1/5] Updates to CMake configuration to align with other CMake + norms (BUILD_SHARED_LIBS mostly) + +git-svn-id: https://svn.osgeo.org/metacrs/geotiff/trunk/libgeotiff@2801 4e78687f-474d-0410-85f9-8d5e500ac6b2 +Signed-off-by: Hiroshi Miura +--- + CMakeLists.txt | 22 ++-------------------- + cmake/project-config.cmake.in | 5 ++++- + 2 files changed, 6 insertions(+), 21 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0c70973..55ececf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,7 +9,6 @@ PROJECT(GeoTIFF) + + SET(GEOTIFF_LIB_NAME geotiff) + SET(GEOTIFF_LIBRARY_TARGET geotiff_library) +-SET(GEOTIFF_ARCHIVE_TARGET geotiff_archive) + + ############################################################################## + # CMake settings +@@ -416,32 +415,15 @@ FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/epsg_incode_header.h" + + SET(XTIFF_SOURCES libxtiff/xtiff.c) + +-#--- +-# Static libgeotiff archive +-# NOTE: Did not put XTIFF_SOURCES in static lib because libxtiff.a is written out +-# currently. +-#--- + if (MSVC OR CMAKE_CONFIGURATION_TYPES) + # For multi-config systems and for Visual Studio, the debug versions + # of the libraries have a _d suffix. + set (CMAKE_DEBUG_POSTFIX _d) + endif () + +-ADD_LIBRARY(${GEOTIFF_ARCHIVE_TARGET} STATIC +- ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES}) +-SET_TARGET_PROPERTIES(${GEOTIFF_ARCHIVE_TARGET} PROPERTIES +- OUTPUT_NAME ${GEOTIFF_LIB_NAME}) +- +-# Shared libgeotiff library +-ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET} SHARED ++ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET} + ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES} ${XTIFF_SOURCES}) + +-# Windows: +-IF(WIN32 AND MSVC) +- SET_TARGET_PROPERTIES(${GEOTIFF_LIBRARY_TARGET} PROPERTIES IMPORT_SUFFIX "_i.lib") +-ENDIF(WIN32 AND MSVC) +- +- + # Unix, linux: + IF(UNIX) + SET_TARGET_PROPERTIES( +@@ -478,7 +460,7 @@ TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET} + # LIBRARY DESTINATION ${GEOTIFF_LIB_DIR} + # ARCHIVE DESTINATION ${GEOTIFF_LIB_DIR}) + +-INSTALL( TARGETS ${GEOTIFF_ARCHIVE_TARGET} ${GEOTIFF_LIBRARY_TARGET} ++INSTALL( TARGETS ${GEOTIFF_LIBRARY_TARGET} + EXPORT depends + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib +diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in +index 6b5499f..dc5b999 100644 +--- a/cmake/project-config.cmake.in ++++ b/cmake/project-config.cmake.in +@@ -32,8 +32,11 @@ set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/bin") + + message (STATUS " include directory: \${@PROJECT_NAME@_INCLUDE_DIRS}") + ++if(BUILD_SHARED_LIBS) + set (@PROJECT_NAME@_SHARED_LIBRARIES @GEOTIFF_LIBRARY_TARGET@) +-set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_ARCHIVE_TARGET@) ++else() ++set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_LIBRARY_TARGET@) ++endif() + # Read in the exported definition of the library + include ("${_DIR}/@PROJECT_NAME_LOWER@-depends.cmake") + +-- +2.16.1 + diff --git a/ports/libgeotiff/0002-Fix-directory-output.patch b/ports/libgeotiff/0002-Fix-directory-output.patch new file mode 100644 index 000000000..d6b79e54c --- /dev/null +++ b/ports/libgeotiff/0002-Fix-directory-output.patch @@ -0,0 +1,28 @@ +From 2b60f0a2c264bf3730e89739384a6d50991b2fc4 Mon Sep 17 00:00:00 2001 +From: Hiroshi Miura +Date: Wed, 14 Feb 2018 12:31:53 +0900 +Subject: [PATCH 2/5] Fix directory output + +Signed-off-by: Hiroshi Miura +--- + cmake/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 47a2b00..b41f2fa 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -10,8 +10,8 @@ if (NOT WIN32) + set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") + set (PROJECT_ROOT_DIR "../../..") + else () +- set (INSTALL_CMAKE_DIR "cmake") +- set (PROJECT_ROOT_DIR "..") ++ set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME}") ++ set (PROJECT_ROOT_DIR "../..") + endif () + + configure_file (project-config.cmake.in project-config.cmake @ONLY) +-- +2.16.1 + diff --git a/ports/libgeotiff/0003-Fix-cmake-TIFF-detection.patch b/ports/libgeotiff/0003-Fix-cmake-TIFF-detection.patch new file mode 100644 index 000000000..14929e10c --- /dev/null +++ b/ports/libgeotiff/0003-Fix-cmake-TIFF-detection.patch @@ -0,0 +1,36 @@ +From bc0003ab3d94f271b27f6897259b734709a5d6cf Mon Sep 17 00:00:00 2001 +From: Hiroshi Miura +Date: Wed, 14 Feb 2018 12:32:11 +0900 +Subject: [PATCH 3/5] Fix cmake TIFF detection + +Signed-off-by: Hiroshi Miura +--- + CMakeLists.txt | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 55ececf..1e2fe3d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -191,7 +191,8 @@ IF(WITH_TIFF) + IF(TIFF_FOUND) + # Confirm required API is available + INCLUDE(CheckFunctionExists) +- SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES}) ++ FIND_PACKAGE(LibLZMA) ++ SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${LIBLZMA_LIBRARIES}) + + CHECK_FUNCTION_EXISTS(TIFFOpen HAVE_TIFFOPEN) + IF(NOT HAVE_TIFFOPEN) +@@ -204,7 +205,7 @@ IF(WITH_TIFF) + SET(TIFF_FOUND) # ReSET to NOT found for TIFF library + MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFMergeFieldInfo function not found. libtiff 3.6.0 Beta or later required. Please upgrade or use an older version of libgeotiff") + ENDIF() +- ++ SET(CMAKE_REQUIRED_LIBRARIES) + INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) + ADD_DEFINITIONS(-DHAVE_TIFF=1) + ENDIF(TIFF_FOUND) +-- +2.16.1 + diff --git a/ports/libgeotiff/fix-cmake-tiff-detection.patch b/ports/libgeotiff/fix-cmake-tiff-detection.patch deleted file mode 100644 index 166aa7d44..000000000 --- a/ports/libgeotiff/fix-cmake-tiff-detection.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/CMakeLists.txt 2016-08-12 00:40:12.000000000 +0900 -+++ b/CMakeLists.txt 2018-02-09 13:27:05.721561755 +0900 -@@ -192,7 +192,8 @@ - IF(TIFF_FOUND) - # Confirm required API is available - INCLUDE(CheckFunctionExists) -- SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES}) -+ FIND_PACKAGE(LibLZMA) -+ SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${LIBLZMA_LIBRARIES}) - - CHECK_FUNCTION_EXISTS(TIFFOpen HAVE_TIFFOPEN) - IF(NOT HAVE_TIFFOPEN) -@@ -205,7 +206,7 @@ - SET(TIFF_FOUND) # ReSET to NOT found for TIFF library - MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFMergeFieldInfo function not found. libtiff 3.6.0 Beta or later required. Please upgrade or use an older version of libgeotiff") - ENDIF() -- -+ SET(CMAKE_REQUIRED_LIBRARIES) - INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) - ADD_DEFINITIONS(-DHAVE_TIFF=1) - ENDIF(TIFF_FOUND) diff --git a/ports/libgeotiff/fix-directory-output.patch b/ports/libgeotiff/fix-directory-output.patch deleted file mode 100644 index 82032daa1..000000000 --- a/ports/libgeotiff/fix-directory-output.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -urN a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt ---- a/cmake/CMakeLists.txt 2016-08-12 00:40:10.000000000 +0900 -+++ b/cmake/CMakeLists.txt 2018-02-09 07:12:40.422110239 +0900 -@@ -10,8 +10,8 @@ - set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") - set (PROJECT_ROOT_DIR "../../..") - else () -- set (INSTALL_CMAKE_DIR "cmake") -- set (PROJECT_ROOT_DIR "..") -+ set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME}") -+ set (PROJECT_ROOT_DIR "../..") - endif () - - configure_file (project-config.cmake.in project-config.cmake @ONLY) diff --git a/ports/libgeotiff/portfile.cmake b/ports/libgeotiff/portfile.cmake index 443c07acb..df735bfcb 100644 --- a/ports/libgeotiff/portfile.cmake +++ b/ports/libgeotiff/portfile.cmake @@ -13,8 +13,10 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch" - "${CMAKE_CURRENT_LIST_DIR}/fix-cmake-tiff-detection.patch") + PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch" + "${CMAKE_CURRENT_LIST_DIR}/0002-Fix-directory-output.patch" + "${CMAKE_CURRENT_LIST_DIR}/0003-Fix-cmake-TIFF-detection.patch" +) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(BUILD_SHARED_LIBS ON) -- cgit v1.2.3 From 67d3662845ce2613b1788731a62f017d536c49e6 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Fri, 16 Feb 2018 13:32:22 +0900 Subject: [libgeotiff] Fix libgeotiff link error Signed-off-by: Hiroshi Miura --- .../0004-Fix-libxtiff-installation.patch | 64 ++++++++++++++++++++++ ...-Control-shared-library-build-with-option.patch | 34 ++++++++++++ ports/libgeotiff/CONTROL | 2 +- ports/libgeotiff/portfile.cmake | 2 + 4 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 ports/libgeotiff/0004-Fix-libxtiff-installation.patch create mode 100644 ports/libgeotiff/0005-Control-shared-library-build-with-option.patch diff --git a/ports/libgeotiff/0004-Fix-libxtiff-installation.patch b/ports/libgeotiff/0004-Fix-libxtiff-installation.patch new file mode 100644 index 000000000..f7da51ab0 --- /dev/null +++ b/ports/libgeotiff/0004-Fix-libxtiff-installation.patch @@ -0,0 +1,64 @@ +From 3a7c42f304ec3bb149e31bbd21c9c84048c3047c Mon Sep 17 00:00:00 2001 +From: Hiroshi Miura +Date: Thu, 15 Feb 2018 13:11:01 +0900 +Subject: [PATCH 4/5] Fix libxtiff installation + +Signed-off-by: Hiroshi Miura +--- + CMakeLists.txt | 9 ++------- + libxtiff/CMakeLists.txt | 9 --------- + 2 files changed, 2 insertions(+), 16 deletions(-) + delete mode 100644 libxtiff/CMakeLists.txt + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e2fe3d..c52cfb4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -354,11 +354,6 @@ INSTALL(FILES ${GEOTIFF_MAN_PAGES} DESTINATION share/man/man1) + # INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION ${GEOTIFF_INCLUDE_DIR}) + INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION include) + +-############################################################################### +-# Build libxtiff library +- +-ADD_SUBDIRECTORY(libxtiff) +- + ############################################################################### + # Build libgeotiff library + +@@ -406,6 +401,8 @@ FOREACH(epsg_csv_file ${GEOTIFF_CSV_DATA}) + ENDIF() + ENDFOREACH() + ++SET(XTIFF_SOURCES libxtiff/xtiff.c) ++ + SET(EPSG_INCODE_EXPLANATION + "This file is autogenerated by CMake, based on the INCODE_EPSG_* options specified during configure.\n + Choosing an EPSG CSV file for inclusion into code will run csv/csv2c.py on the file and include the\n +@@ -414,8 +411,6 @@ STRING(REPLACE ";" "\n" EPSG_INCLUDEFILE_POINTER_STRING "${epsg_includefile_poin + FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/epsg_incode_header.h" + "/* ${EPSG_INCODE_EXPLANATION} */\n${epsg_includefile_externconst}; \n\n/* Pointers to csv data included in code */\nstatic const datafile_t files[] = {\n${EPSG_INCLUDEFILE_POINTER_STRING}\n { NULL, NULL }};") + +-SET(XTIFF_SOURCES libxtiff/xtiff.c) +- + if (MSVC OR CMAKE_CONFIGURATION_TYPES) + # For multi-config systems and for Visual Studio, the debug versions + # of the libraries have a _d suffix. +diff --git a/libxtiff/CMakeLists.txt b/libxtiff/CMakeLists.txt +deleted file mode 100644 +index a0bbb96..0000000 +--- a/libxtiff/CMakeLists.txt ++++ /dev/null +@@ -1,9 +0,0 @@ +-############################################################################### +-# +-# CMake configuration file to build libxtiff library +-# +-# Author: Mateusz Loskot +-# +-############################################################################### +- +-ADD_LIBRARY(xtiff STATIC xtiff.c) +-- +2.16.1 + diff --git a/ports/libgeotiff/0005-Control-shared-library-build-with-option.patch b/ports/libgeotiff/0005-Control-shared-library-build-with-option.patch new file mode 100644 index 000000000..ed9a4e88a --- /dev/null +++ b/ports/libgeotiff/0005-Control-shared-library-build-with-option.patch @@ -0,0 +1,34 @@ +From 84e537f3bd0db74b22ffebb3746d292daf4f4e59 Mon Sep 17 00:00:00 2001 +From: Hiroshi Miura +Date: Thu, 15 Feb 2018 13:17:14 +0900 +Subject: [PATCH 5/5] Control shared library build with option + +Signed-off-by: Hiroshi Miura +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c52cfb4..5890203 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,14 +5,15 @@ + # Author: Mateusz Loskot + # + ############################################################################### ++CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0) + PROJECT(GeoTIFF) + + SET(GEOTIFF_LIB_NAME geotiff) + SET(GEOTIFF_LIBRARY_TARGET geotiff_library) ++option(BUILD_SHARE_LIBS "Set ON to build shared library." ON) + + ############################################################################## + # CMake settings +-CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0) + + SET(CMAKE_COLOR_MAKEFILE ON) + +-- +2.16.1 + diff --git a/ports/libgeotiff/CONTROL b/ports/libgeotiff/CONTROL index f9fb872bb..e737058e8 100644 --- a/ports/libgeotiff/CONTROL +++ b/ports/libgeotiff/CONTROL @@ -1,4 +1,4 @@ Source: libgeotiff -Version: 1.4.2-1 +Version: 1.4.2-2 Description: Libgeotiff is an open source library normally hosted on top of ​libtiff for reading, and writing GeoTIFF information tags. Build-Depends: tiff, proj4, zlib, libjpeg-turbo diff --git a/ports/libgeotiff/portfile.cmake b/ports/libgeotiff/portfile.cmake index df735bfcb..8f78edf4d 100644 --- a/ports/libgeotiff/portfile.cmake +++ b/ports/libgeotiff/portfile.cmake @@ -16,6 +16,8 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch" "${CMAKE_CURRENT_LIST_DIR}/0002-Fix-directory-output.patch" "${CMAKE_CURRENT_LIST_DIR}/0003-Fix-cmake-TIFF-detection.patch" + "${CMAKE_CURRENT_LIST_DIR}/0004-Fix-libxtiff-installation.patch" + "${CMAKE_CURRENT_LIST_DIR}/0005-Control-shared-library-build-with-option.patch" ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) -- cgit v1.2.3 From d4004c8ac9cd2c9df58495ed7e06566ed85a32d6 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Sat, 17 Feb 2018 19:32:19 -0600 Subject: Using vcpkg_from_github() for HPX (#2830) --- ports/hpx/CONTROL | 2 +- ports/hpx/portfile.cmake | 99 +++++++++++++++++++++++++----------------------- 2 files changed, 53 insertions(+), 48 deletions(-) diff --git a/ports/hpx/CONTROL b/ports/hpx/CONTROL index 6956312c8..471b64986 100644 --- a/ports/hpx/CONTROL +++ b/ports/hpx/CONTROL @@ -1,5 +1,5 @@ Source: hpx -Version: 1.0.0-7 +Version: 1.0.0-8 Build-Depends: hwloc, boost-chrono, boost-date-time, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread, boost-context, boost-iostreams, boost-random, boost-atomic, boost-asio, boost-dynamic-bitset, boost-assign, boost-format, boost-signals2, boost-parameter, boost-bimap, boost-accumulators, boost-lockfree, boost-icl Description: The C++ Standards Library for Concurrency and Parallelism HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case. diff --git a/ports/hpx/portfile.cmake b/ports/hpx/portfile.cmake index 4b3a87254..e03d566e8 100644 --- a/ports/hpx/portfile.cmake +++ b/ports/hpx/portfile.cmake @@ -5,44 +5,45 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) set(VCPKG_LIBRARY_LINKAGE dynamic) endif() -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hpx_1.0.0) - -vcpkg_download_distfile(ARCHIVE - URLS "http://stellar-group.org/files/hpx_1.0.0.tar.gz" - FILENAME "hpx_1.0.0.tar.gz" - SHA512 42c155654f118bff34b48d929b1732fd56126b8fd3e7657b5bd2f84275288ddf538572ed1152883c4aed5e9683de53b9b1f1c3613e5092e7bd1a5e165bed606d -) -vcpkg_extract_source_archive(${ARCHIVE}) - -# apply hotfix to enable building with vcpkg -vcpkg_download_distfile(DIFF1 - URLS "http://stellar-group.org/files/hpx-Build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" - FILENAME "hpx-Build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" - SHA512 86df311a120686139955e1c0fdca55379594be3fa8d46d69ee59d83da351ce3bed487ab946c80f7127aab9699e470e24e545b112f92be9f971f41d95c429d01d -) - -# apply hotfix to fix issues with building 32bit version -vcpkg_download_distfile(DIFF2 - URLS "http://stellar-group.org/files/hpx-Fixing-32bit-MSVC-compilation.diff" - FILENAME "hpx-Fixing-32bit-MSVC-compilation.diff" - SHA512 31c904d317b4c24eddd819e4856f8326ff3850a5a196c7648c46a11dbb85f35e972e077957b3c4aec67c8b043816fe1cebc92cfe28ed815f682537dfc3421b8b +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO STEllAR-GROUP/hpx + REF 1.0.0 + SHA512 1bb985ad8ab031a7ac034d4597a8bd26eae83fba5aed207c444211954079e10e2d5d83965a1f4ce52d1b29ecc72586c561b984c2c628673a262c07214fd1abb5 + HEAD_REF master ) -# apply hotfix to fix issues when building with UNICODE enabled -vcpkg_download_distfile(DIFF3 - URLS "http://stellar-group.org/files/hpx-Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" - FILENAME "hpx-Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" - SHA512 8fcdb36307702d64b9d2b26920374a6c5a29a50d125305dc95926c4cbc91215cb0c72ede83b06d0fc007fe7b2283845e08351bd45f11f3677f0d3db4ac8f9424 -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${DIFF1} - ${DIFF2} - ${DIFF3} - ${CMAKE_CURRENT_LIST_DIR}/boost-1-66.patch -) +if(NOT VCPKG_USE_HEAD_VERSION) + # apply hotfix to enable building with vcpkg + vcpkg_download_distfile(DIFF1 + URLS "http://stellar-group.org/files/hpx-Build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" + FILENAME "hpx-Build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" + SHA512 86df311a120686139955e1c0fdca55379594be3fa8d46d69ee59d83da351ce3bed487ab946c80f7127aab9699e470e24e545b112f92be9f971f41d95c429d01d + ) + + # apply hotfix to fix issues with building 32bit version + vcpkg_download_distfile(DIFF2 + URLS "http://stellar-group.org/files/hpx-Fixing-32bit-MSVC-compilation.diff" + FILENAME "hpx-Fixing-32bit-MSVC-compilation.diff" + SHA512 31c904d317b4c24eddd819e4856f8326ff3850a5a196c7648c46a11dbb85f35e972e077957b3c4aec67c8b043816fe1cebc92cfe28ed815f682537dfc3421b8b + ) + + # apply hotfix to fix issues when building with UNICODE enabled + vcpkg_download_distfile(DIFF3 + URLS "http://stellar-group.org/files/hpx-Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" + FILENAME "hpx-Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" + SHA512 8fcdb36307702d64b9d2b26920374a6c5a29a50d125305dc95926c4cbc91215cb0c72ede83b06d0fc007fe7b2283845e08351bd45f11f3677f0d3db4ac8f9424 + ) + + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${DIFF1} + ${DIFF2} + ${DIFF3} + ${CMAKE_CURRENT_LIST_DIR}/boost-1-66.patch + ) +endif() SET(BOOST_PATH "${CURRENT_INSTALLED_DIR}/share/boost") SET(HWLOC_PATH "${CURRENT_INSTALLED_DIR}/share/hwloc") @@ -64,7 +65,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # post build cleanup -file(RENAME ${CURRENT_PACKAGES_DIR}/share/hpx-1.0.0 ${CURRENT_PACKAGES_DIR}/share/hpx) +if(NOT VCPKG_USE_HEAD_VERSION) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/hpx-1.0.0 ${CURRENT_PACKAGES_DIR}/share/hpx) +else() + file(RENAME ${CURRENT_PACKAGES_DIR}/share/hpx-1.1.0 ${CURRENT_PACKAGES_DIR}/share/hpx) +endif() file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt @@ -72,32 +77,32 @@ file(INSTALL file(GLOB __hpx_cmakes ${CURRENT_PACKAGES_DIR}/lib/cmake/HPX/*.*) foreach(__hpx_cmake ${__hpx_cmakes}) - file(COPY ${__hpx_cmake} DESTINATION ${CURRENT_PACKAGES_DIR}/share/hpx/cmake) - file(REMOVE ${__hpx_cmake}) + file(COPY ${__hpx_cmake} DESTINATION ${CURRENT_PACKAGES_DIR}/share/hpx/cmake) + file(REMOVE ${__hpx_cmake}) endforeach() file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/lib/*.dll) foreach(__hpx_dll ${__hpx_dlls}) - file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${__hpx_dll}) + file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${__hpx_dll}) endforeach() file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/lib/hpx/*.dll) foreach(__hpx_dll ${__hpx_dlls}) - file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/bin/hpx) - file(REMOVE ${__hpx_dll}) + file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/bin/hpx) + file(REMOVE ${__hpx_dll}) endforeach() file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) foreach(__hpx_dll ${__hpx_dlls}) - file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${__hpx_dll}) + file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${__hpx_dll}) endforeach() file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/debug/lib/hpx/*.dll) foreach(__hpx_dll ${__hpx_dlls}) - file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/hpx) - file(REMOVE ${__hpx_dll}) + file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/hpx) + file(REMOVE ${__hpx_dll}) endforeach() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/bazel) -- cgit v1.2.3 From d6ff55a735c40a642564fdd472f907ddf8a9b859 Mon Sep 17 00:00:00 2001 From: mmazat <6835356+mmazat@users.noreply.github.com> Date: Mon, 19 Feb 2018 09:46:02 -0500 Subject: port for google cartographer (#2665) * initial try to add port files * updates control and patch * minor fix * release is now built * install succeed * update to the latest commit * use cmake to export the symbols in dynamic linkage * [cartographer] Reformatting and added dependency on ceres[eigensparse] --- ports/cartographer/CONTROL | 4 + ports/cartographer/fix-find-packages.patch | 146 +++++++++++++++++++++++++++++ ports/cartographer/portfile.cmake | 39 ++++++++ 3 files changed, 189 insertions(+) create mode 100644 ports/cartographer/CONTROL create mode 100644 ports/cartographer/fix-find-packages.patch create mode 100644 ports/cartographer/portfile.cmake diff --git a/ports/cartographer/CONTROL b/ports/cartographer/CONTROL new file mode 100644 index 000000000..8439ea8e6 --- /dev/null +++ b/ports/cartographer/CONTROL @@ -0,0 +1,4 @@ +Source: cartographer +Version: 0.3.0-3 +Build-Depends: ceres[eigensparse], gflags, glog, lua, cairo, boost-iostreams, gtest, protobuf +Description: Google 2D & 3D SLAM package diff --git a/ports/cartographer/fix-find-packages.patch b/ports/cartographer/fix-find-packages.patch new file mode 100644 index 000000000..19694b704 --- /dev/null +++ b/ports/cartographer/fix-find-packages.patch @@ -0,0 +1,146 @@ + CMakeLists.txt | 45 ++++++++++++++++++++++---------------- + cartographer/common/math.h | 4 +++- + cartographer/common/thread_pool.cc | 2 +- + cmake/functions.cmake | 10 ++++----- + 4 files changed, 35 insertions(+), 26 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 55e9adc..bc92e9b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,18 +26,23 @@ option(BUILD_GRPC "build Cartographer gRPC support" false) + set(GRPC_PLUGIN_PATH "/usr/local/bin/grpc_cpp_plugin") + + include("${PROJECT_SOURCE_DIR}/cmake/functions.cmake") +-google_initialize_cartographer_project() +-google_enable_testing() ++#google_initialize_cartographer_project() ++#google_enable_testing() + + find_package(Boost REQUIRED COMPONENTS iostreams) + find_package(Ceres REQUIRED COMPONENTS SparseLinearAlgebraLibrary) + find_package(Eigen3 REQUIRED) +-find_package(LuaGoogle REQUIRED) ++find_package(Lua REQUIRED) + find_package(Protobuf 3.0.0 REQUIRED) ++find_package(glog REQUIRED) ++find_package(gflags REQUIRED) + +-include(FindPkgConfig) +-PKG_SEARCH_MODULE(CAIRO REQUIRED cairo>=1.12.16) +- ++#include(FindPkgConfig) ++#PKG_SEARCH_MODULE(CAIRO REQUIRED cairo>=1.12.16) ++if(CMAKE_BUILD_TYPE STREQUAL Debug) ++ set(CAIRO_LIB_SUFFIX d) ++endif() ++find_library(CAIRO_LIBRARY cairo${CAIRO_LIB_SUFFIX}) + # Only build the documentation if we can find Sphinx. + find_package(Sphinx) + if(SPHINX_FOUND) +@@ -144,15 +149,15 @@ configure_file( + ${PROJECT_SOURCE_DIR}/cartographer/common/config.h.cmake + ${PROJECT_BINARY_DIR}/cartographer/common/config.h) + +-google_binary(cartographer_autogenerate_ground_truth +- SRCS +- cartographer/ground_truth/autogenerate_ground_truth_main.cc +-) +- +-google_binary(cartographer_compute_relations_metrics +- SRCS +- cartographer/ground_truth/compute_relations_metrics_main.cc +-) ++#google_binary(cartographer_autogenerate_ground_truth ++# SRCS ++# cartographer/ground_truth/autogenerate_ground_truth_main.cc ++#) ++# ++#google_binary(cartographer_compute_relations_metrics ++# SRCS ++# cartographer/ground_truth/compute_relations_metrics_main.cc ++#) + + if(${BUILD_GRPC}) + google_binary(cartographer_grpc_server +@@ -167,7 +172,7 @@ foreach(ABS_FIL ${ALL_TESTS}) + get_filename_component(FIL_WE ${REL_FIL} NAME_WE) + # Replace slashes as required for CMP0037. + string(REPLACE "/" "." TEST_TARGET_NAME "${DIR}/${FIL_WE}") +- google_test("${TEST_TARGET_NAME}" ${ABS_FIL}) ++ #google_test("${TEST_TARGET_NAME}" ${ABS_FIL}) + if(${BUILD_GRPC}) + target_link_libraries("${TEST_TARGET_NAME}" PUBLIC grpc++) + endif() +@@ -190,8 +195,9 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC + target_link_libraries(${PROJECT_NAME} PUBLIC ${Boost_LIBRARIES}) + + # We expect find_package(Ceres) to have located these for us. +-target_link_libraries(${PROJECT_NAME} PUBLIC glog) +-target_link_libraries(${PROJECT_NAME} PUBLIC gflags) ++#target_link_libraries(${PROJECT_NAME} PUBLIC glog) ++#target_link_libraries(${PROJECT_NAME} PUBLIC gflags) ++target_link_libraries(${PROJECT_NAME} PUBLIC ${CAIRO_LIBRARY}) + + target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC + "${CAIRO_INCLUDE_DIRS}") +@@ -201,7 +207,8 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC + ${PROTOBUF_INCLUDE_DIR}) + # TODO(hrapp): This should not explicitly list pthread and use + # PROTOBUF_LIBRARIES, but that failed on first try. +-target_link_libraries(${PROJECT_NAME} PUBLIC ${PROTOBUF_LIBRARY} pthread) ++#target_link_libraries(${PROJECT_NAME} PUBLIC ${PROTOBUF_LIBRARY} pthread) ++target_link_libraries(${PROJECT_NAME} PUBLIC ${PROTOBUF_LIBRARY}) + if(${BUILD_GRPC}) + target_link_libraries(${PROJECT_NAME} PUBLIC grpc++) + endif() +diff --git a/cartographer/common/math.h b/cartographer/common/math.h +index f0ae9e2..d32bdbe 100644 +--- a/cartographer/common/math.h ++++ b/cartographer/common/math.h +@@ -16,7 +16,9 @@ + + #ifndef CARTOGRAPHER_COMMON_MATH_H_ + #define CARTOGRAPHER_COMMON_MATH_H_ +- ++ #ifndef M_PI ++ #define M_PI 3.14159265358979323846 ++ #endif + #include + #include + +diff --git a/cartographer/common/thread_pool.cc b/cartographer/common/thread_pool.cc +index fdda166..178472f 100644 +--- a/cartographer/common/thread_pool.cc ++++ b/cartographer/common/thread_pool.cc +@@ -16,7 +16,7 @@ + + #include "cartographer/common/thread_pool.h" + +-#include ++//#include + #include + #include + #include +diff --git a/cmake/functions.cmake b/cmake/functions.cmake +index 3bfd343..b41a84e 100644 +--- a/cmake/functions.cmake ++++ b/cmake/functions.cmake +@@ -118,12 +118,12 @@ macro(google_initialize_cartographer_project) + set(LIST_FILES_CMD "find ${PROJECT_SOURCE_DIR}/ -not -iwholename '*.git*' | sort | sed 's/^/#/'") + set(FILES_LIST_PATH "${PROJECT_BINARY_DIR}/AllFiles.cmake") + set(DETECT_CHANGES_CMD "bash" "-c" "${LIST_FILES_CMD} | diff -N -q ${FILES_LIST_PATH} - || ${LIST_FILES_CMD} > ${FILES_LIST_PATH}") +- add_custom_target(${PROJECT_NAME}_detect_changes ALL +- COMMAND ${DETECT_CHANGES_CMD} +- VERBATIM +- ) ++ #add_custom_target(${PROJECT_NAME}_detect_changes ALL ++ # COMMAND ${DETECT_CHANGES_CMD} ++ # VERBATIM ++ #) + if(NOT EXISTS ${FILES_LIST_PATH}) +- execute_process(COMMAND ${DETECT_CHANGES_CMD}) ++ # execute_process(COMMAND ${DETECT_CHANGES_CMD}) + endif() + include(${FILES_LIST_PATH}) + endmacro() diff --git a/ports/cartographer/portfile.cmake b/ports/cartographer/portfile.cmake new file mode 100644 index 000000000..49ca1b4b2 --- /dev/null +++ b/ports/cartographer/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO googlecartographer/cartographer + REF a7ed7e224f98b396762c865b81b62dc3abea2e81 + SHA512 2ab167c1c314591b4916baf70b8ad92ae542986c3578319d2454c904adae10f8027bc696579d6e2864d3606a6711563b82438e847527cad4ab0c2bd603a63eb7 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-find-packages.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION=OFF + -DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION=OFF + -Dgtest_disable_pthreads=ON + -DCMAKE_USE_PTHREADS_INIT=OFF + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON + OPTIONS_DEBUG + -DFORCE_DEBUG_BUILD=True +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright of cartographer +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cartographer) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cartographer/LICENSE ${CURRENT_PACKAGES_DIR}/share/cartographer/copyright) -- cgit v1.2.3 From 12f19c7a30e14a89c0bac9279bb8bcda64158496 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 19 Feb 2018 07:11:30 -0800 Subject: [vcpkg] Remove create_install_plan in favor of create_feature_install_plan --- toolsrc/include/vcpkg/dependencies.h | 4 ---- toolsrc/src/tests.plan.cpp | 38 +++++++++++++++++++----------------- toolsrc/src/vcpkg/commands.ci.cpp | 38 ++++++++++++++---------------------- toolsrc/src/vcpkg/dependencies.cpp | 27 ------------------------- 4 files changed, 35 insertions(+), 72 deletions(-) diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 4abeb678e..de68d06e9 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -162,10 +162,6 @@ namespace vcpkg::Dependencies std::unique_ptr m_graph; }; - std::vector create_install_plan(const PortFileProvider& port_file_provider, - const std::vector& specs, - const StatusParagraphs& status_db); - std::vector create_remove_plan(const std::vector& specs, const StatusParagraphs& status_db); diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index a4c628bf6..546e20b0d 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -111,13 +111,13 @@ namespace UnitTest1 auto spec_c = spec_map.emplace("c"); Dependencies::MapPortFileProvider map_port(spec_map.map); - auto install_plan = - Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + auto install_plan = Dependencies::create_feature_install_plan( + map_port, {FeatureSpec{spec_a, ""}}, StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(3), install_plan.size()); - Assert::AreEqual("c", install_plan[0].spec.name().c_str()); - Assert::AreEqual("b", install_plan[1].spec.name().c_str()); - Assert::AreEqual("a", install_plan[2].spec.name().c_str()); + Assert::AreEqual("c", install_plan[0].spec().name().c_str()); + Assert::AreEqual("b", install_plan[1].spec().name().c_str()); + Assert::AreEqual("a", install_plan[2].spec().name().c_str()); } TEST_METHOD(multiple_install_scheme) @@ -135,12 +135,14 @@ namespace UnitTest1 auto spec_h = spec_map.emplace("h"); Dependencies::MapPortFileProvider map_port(spec_map.map); - auto install_plan = Dependencies::create_install_plan( - map_port, {spec_a, spec_b, spec_c}, StatusParagraphs(std::move(status_paragraphs))); + auto install_plan = Dependencies::create_feature_install_plan( + map_port, + {FeatureSpec{spec_a, ""}, FeatureSpec{spec_b, ""}, FeatureSpec{spec_c, ""}}, + StatusParagraphs(std::move(status_paragraphs))); auto iterator_pos = [&](const PackageSpec& spec) -> int { auto it = std::find_if( - install_plan.begin(), install_plan.end(), [&](auto& action) { return action.spec == spec; }); + install_plan.begin(), install_plan.end(), [&](auto& action) { return action.spec() == spec; }); Assert::IsTrue(it != install_plan.end()); return (int)(it - install_plan.begin()); }; @@ -228,18 +230,18 @@ namespace UnitTest1 auto spec_k = spec_map.emplace("k"); Dependencies::MapPortFileProvider map_port(spec_map.map); - auto install_plan = - Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs))); + auto install_plan = Dependencies::create_feature_install_plan( + map_port, {FeatureSpec{spec_a, ""}}, StatusParagraphs(std::move(status_paragraphs))); Assert::AreEqual(size_t(8), install_plan.size()); - Assert::AreEqual("h", install_plan[0].spec.name().c_str()); - Assert::AreEqual("g", install_plan[1].spec.name().c_str()); - Assert::AreEqual("f", install_plan[2].spec.name().c_str()); - Assert::AreEqual("e", install_plan[3].spec.name().c_str()); - Assert::AreEqual("d", install_plan[4].spec.name().c_str()); - Assert::AreEqual("c", install_plan[5].spec.name().c_str()); - Assert::AreEqual("b", install_plan[6].spec.name().c_str()); - Assert::AreEqual("a", install_plan[7].spec.name().c_str()); + Assert::AreEqual("h", install_plan[0].spec().name().c_str()); + Assert::AreEqual("g", install_plan[1].spec().name().c_str()); + Assert::AreEqual("f", install_plan[2].spec().name().c_str()); + Assert::AreEqual("e", install_plan[3].spec().name().c_str()); + Assert::AreEqual("d", install_plan[4].spec().name().c_str()); + Assert::AreEqual("c", install_plan[5].spec().name().c_str()); + Assert::AreEqual("b", install_plan[6].spec().name().c_str()); + Assert::AreEqual("a", install_plan[7].spec().name().c_str()); } TEST_METHOD(basic_feature_test_1) diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 4636a5738..7672755ba 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -20,27 +20,15 @@ namespace vcpkg::Commands::CI static Install::InstallSummary run_ci_on_triplet(const Triplet& triplet, const VcpkgPaths& paths, - const std::vector& ports, - const std::set& exclusions_set) + const std::vector& ports) { Input::check_triplet(triplet, paths); - - const std::vector specs = PackageSpec::to_package_specs(ports, triplet); + std::vector specs = PackageSpec::to_package_specs(ports, triplet); + auto featurespecs = Util::fmap(specs, [](auto& spec) { return FeatureSpec(spec, ""); }); StatusParagraphs status_db = database_load_check(paths); const auto& paths_port_file = Dependencies::PathsPortFileProvider(paths); - std::vector install_plan = - Dependencies::create_install_plan(paths_port_file, specs, status_db); - - for (InstallPlanAction& plan : install_plan) - { - if (Util::Sets::contains(exclusions_set, plan.spec.name())) - { - plan.plan_type = InstallPlanType::EXCLUDED; - } - } - - Checks::check_exit(VCPKG_LINE_INFO, !install_plan.empty(), "Install plan cannot be empty"); + auto action_plan = Dependencies::create_feature_install_plan(paths_port_file, featurespecs, status_db); const Build::BuildPackageOptions install_plan_options = { Build::UseHeadVersion::NO, @@ -48,11 +36,13 @@ namespace vcpkg::Commands::CI Build::CleanBuildtrees::YES, }; - const std::vector action_plan = - Util::fmap(install_plan, [&install_plan_options](InstallPlanAction& install_action) { - install_action.build_options = install_plan_options; - return Dependencies::AnyAction(std::move(install_action)); - }); + for (auto&& action : action_plan) + { + if (auto p = action.install_action.get()) + { + p->build_options = install_plan_options; + } + } return Install::perform(action_plan, Install::KeepGoing::YES, paths, status_db); } @@ -102,11 +92,13 @@ namespace vcpkg::Commands::CI triplets.push_back(default_triplet); } - const std::vector ports = Install::get_all_port_names(paths); + std::vector ports = Install::get_all_port_names(paths); + Util::erase_remove_if(ports, [&](auto&& port) { return Util::Sets::contains(exclusions_set, port); }); + std::vector results; for (const Triplet& triplet : triplets) { - Install::InstallSummary summary = run_ci_on_triplet(triplet, paths, ports, exclusions_set); + Install::InstallSummary summary = run_ci_on_triplet(triplet, paths, ports); results.push_back({triplet, std::move(summary)}); } diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index fedda56ab..793951ab5 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -280,33 +280,6 @@ namespace vcpkg::Dependencies return nullopt; } - std::vector create_install_plan(const PortFileProvider& port_file_provider, - const std::vector& specs, - const StatusParagraphs& status_db) - { - auto fspecs = Util::fmap(specs, [](const PackageSpec& spec) { return FeatureSpec(spec, ""); }); - auto plan = create_feature_install_plan(port_file_provider, fspecs, status_db); - - std::vector ret; - ret.reserve(plan.size()); - - for (auto&& action : plan) - { - if (auto p_install = action.install_action.get()) - { - ret.push_back(std::move(*p_install)); - } - else - { - Checks::exit_with_message(VCPKG_LINE_INFO, - "The installation plan requires feature packages support. Please re-run the " - "command with --featurepackages."); - } - } - - return ret; - } - std::vector create_remove_plan(const std::vector& specs, const StatusParagraphs& status_db) { -- cgit v1.2.3 From 0f607865f36fa8988288ca666395d52b32762ac7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 19 Feb 2018 08:12:04 -0800 Subject: [libdisasm][breakpad] Initial commit of breakpad. Improvements to libdisasm. --- ports/breakpad/CMakeLists.txt | 49 ++++++++++++++++++++++++++++++++++++++++++ ports/breakpad/CONTROL | 4 ++++ ports/breakpad/portfile.cmake | 24 +++++++++++++++++++++ ports/libdisasm/CMakeLists.txt | 11 ++++++---- ports/libdisasm/CONTROL | 2 +- ports/libdisasm/portfile.cmake | 1 + 6 files changed, 86 insertions(+), 5 deletions(-) create mode 100644 ports/breakpad/CMakeLists.txt create mode 100644 ports/breakpad/CONTROL create mode 100644 ports/breakpad/portfile.cmake diff --git a/ports/breakpad/CMakeLists.txt b/ports/breakpad/CMakeLists.txt new file mode 100644 index 000000000..f4c19cb8c --- /dev/null +++ b/ports/breakpad/CMakeLists.txt @@ -0,0 +1,49 @@ +cmake_minimum_required(VERSION 3.8) +project(breakpad CXX) + +add_definitions( + -DNOMINMAX + -DUNICODE + -DWIN32_LEAN_AND_MEAN + -D_CRT_SECURE_NO_WARNINGS + -D_CRT_SECURE_NO_DEPRECATE + -D_CRT_NONSTDC_NO_DEPRECATE +) + +set(CMAKE_DEBUG_POSTFIX d) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + +string(COMPARE EQUAL "${CMAKE_BUILD_TYPE}" "Release" DEFAULT_INSTALL_HEADERS) +option(INSTALL_HEADERS "Install header files" ${DEFAULT_INSTALL_HEADERS}) + +file(GLOB_RECURSE SOURCES src/processor/*.cc) +list(FILTER SOURCES EXCLUDE REGEX + "_unittest|synth_minidump|/tests|/testdata|/linux|/mac|/android|/solaris|microdump_stackwalk|minidump_dump|minidump_stackwalk") + +find_library(LIBDISASM_LIB NAMES libdisasmd libdisasm) + +add_library(libbreakpad ${SOURCES}) +target_link_libraries(libbreakpad PRIVATE ${LIBDISASM_LIB}) + +target_include_directories(libbreakpad + PUBLIC + $ + $ +) + +install(TARGETS libbreakpad EXPORT unofficial-breakpad-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(INSTALL_HEADERS) + install(DIRECTORY src/google_breakpad DESTINATION include) +endif() + +install( + EXPORT unofficial-breakpad-targets + FILE unofficial-breakpad-config.cmake + NAMESPACE unofficial::breakpad:: + DESTINATION share/unofficial-breakpad +) diff --git a/ports/breakpad/CONTROL b/ports/breakpad/CONTROL new file mode 100644 index 000000000..c391454b6 --- /dev/null +++ b/ports/breakpad/CONTROL @@ -0,0 +1,4 @@ +Source: breakpad +Version: 2018-2-19 +Build-Depends: libdisasm +Description: a set of client and server components which implement a crash-reporting system. diff --git a/ports/breakpad/portfile.cmake b/ports/breakpad/portfile.cmake new file mode 100644 index 000000000..6267b271b --- /dev/null +++ b/ports/breakpad/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/breakpad + REF 6bb6c9b26afd9844b9e35fcaa39fb24893e7abb5 + SHA512 a6a786c2cabb1fd2749d79215c7a3024ae6d1a894166060b22869cd3ee3010edb3e0613c0aeea254580554f402d919ed630ee088c53a1f218e01a7280ad29fec + 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-breakpad TARGET_PATH share/unofficial-breakpad) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/breakpad RENAME copyright) diff --git a/ports/libdisasm/CMakeLists.txt b/ports/libdisasm/CMakeLists.txt index 295f0f72b..96889e794 100644 --- a/ports/libdisasm/CMakeLists.txt +++ b/ports/libdisasm/CMakeLists.txt @@ -1,7 +1,10 @@ cmake_minimum_required(VERSION 3.9) -project(libdisasm) -set( - SRCS +project(libdisasm C) + +set(CMAKE_DEBUG_POSTFIX d) +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + +set(SRCS ia32_implicit.c ia32_implicit.h ia32_insn.c @@ -32,7 +35,7 @@ set( include_directories(libdisasm) -add_library(libdisasm ${SRCS}) +add_library(libdisasm ${SRCS}) install( TARGETS libdisasm diff --git a/ports/libdisasm/CONTROL b/ports/libdisasm/CONTROL index 3d41823ca..c6044e88d 100644 --- a/ports/libdisasm/CONTROL +++ b/ports/libdisasm/CONTROL @@ -1,3 +1,3 @@ Source: libdisasm -Version: 0.23 +Version: 0.23-1 Description: x86 Disassembler Library. diff --git a/ports/libdisasm/portfile.cmake b/ports/libdisasm/portfile.cmake index 21a022c42..19919bed6 100644 --- a/ports/libdisasm/portfile.cmake +++ b/ports/libdisasm/portfile.cmake @@ -25,6 +25,7 @@ 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 ) -- cgit v1.2.3 From 1874e0108fe116dc7d04c1e64d419d76c847f300 Mon Sep 17 00:00:00 2001 From: pravic Date: Mon, 19 Feb 2018 19:23:03 +0300 Subject: [sciter] Update to 4.1.3.5728 (#2835) --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 349f0d6bf..23a588b37 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.1.2 +Version: 4.1.3 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index df3fb0507..b6f1685a1 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,8 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION 38c277d6b4642ad5f00e24c11bcc4cab099d9a7a) -set(SCITER_SHA efce6bb9fd733cde5f0f11f54375e40389454feb6f0170a18423bb75e43d6bcb9621e05320f8e9954231439e8295e2a6eda236b671fb8dfa5c9c256e3ed7bb03) +set(SCITER_REVISION 9ba9e27690e9ef4e97f415822fb738e0f36c574e) +set(SCITER_SHA d4e7d204b67e454ba753524fb1d61887fcaeae256abb81297afc0aa7795f1acb21754ef368700dfa919717f23ca1bbb16498de1ad84c94ac7c2fc295f67f91c8) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From 0e872e6bd193d0fbcd8597ee650ed097f6785407 Mon Sep 17 00:00:00 2001 From: Tobias Schwendemann Date: Mon, 19 Feb 2018 17:41:25 +0100 Subject: [tinytoml] Initial port (#2836) * [tinytoml] Initial port This port works only using --head since no tags are provided by the author. * [tinytoml] Add stable REF and SHA512 --- ports/tinytoml/CONTROL | 3 +++ ports/tinytoml/portfile.cmake | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 ports/tinytoml/CONTROL create mode 100644 ports/tinytoml/portfile.cmake diff --git a/ports/tinytoml/CONTROL b/ports/tinytoml/CONTROL new file mode 100644 index 000000000..b656fccc4 --- /dev/null +++ b/ports/tinytoml/CONTROL @@ -0,0 +1,3 @@ +Source: tinytoml +Version: 20180219-1 +Description: A header only C++11 library for parsing TOML. diff --git a/ports/tinytoml/portfile.cmake b/ports/tinytoml/portfile.cmake new file mode 100644 index 000000000..9d7275cf2 --- /dev/null +++ b/ports/tinytoml/portfile.cmake @@ -0,0 +1,16 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mayah/tinytoml + + REF 8fe890978b3390de1fc1f26c2d6bf1711c700c5a + SHA512 c7302950c94001b5376009a08181589c7fb040d7c23343e3dbbdcf37caa0ce8f4319adb1899d946ecee3bfb7079dbe46689d6016d94fc08b610ed56fb1113b81 + + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinytoml RENAME copyright) -- cgit v1.2.3 From 8f20e31e180641f10d6e4e945b39e29991f75db8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 19 Feb 2018 10:04:02 -0800 Subject: [vcpkg-docs-triplets.md] Update triplet docs to match the qt modularization --- docs/users/triplets.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/users/triplets.md b/docs/users/triplets.md index 06f77e63f..eb83aeb10 100644 --- a/docs/users/triplets.md +++ b/docs/users/triplets.md @@ -42,11 +42,11 @@ Example: ```cmake set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_CRT_LINKAGE dynamic) -if(PORT STREQUAL "qt5") +if(PORT MATCHES "qt5-") set(VCPKG_LIBRARY_LINKAGE dynamic) endif() ``` -This will build `qt5` as DLLs against the dynamic CRT, but every other library as a static library (still against the dynamic CRT). +This will build all the `qt5-*` libraries as DLLs against the dynamic CRT, but every other library as a static library (still against the dynamic CRT). For an example in a real project, see https://github.com/Intelight/vcpkg/blob/master/triplets/x86-windows-mixed.cmake. -- cgit v1.2.3 From 77b07838bfaa997c7e133762755a9918f286d010 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 19 Feb 2018 22:25:19 -0800 Subject: [blaze] Update SHA512. Fixes #2841. --- ports/blaze/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/blaze/portfile.cmake b/ports/blaze/portfile.cmake index 44f20cbb1..6de95aeb5 100644 --- a/ports/blaze/portfile.cmake +++ b/ports/blaze/portfile.cmake @@ -4,7 +4,7 @@ vcpkg_from_bitbucket( OUT_SOURCE_PATH SOURCE_PATH REPO blaze-lib/blaze REF v3.3 - SHA512 391be695114759c9eef56dbb20d039a20f88bc9b852285e950788ce5118dcf69f29c5497b62f5b18b6f777760b0bc17534d71eda40628046acfc861c7f7c2356 + SHA512 1210db57fca04832ff9382cbb904f22f70eab3acbc355a1d22435bfe042d6acac7f86a908d8654cf49517c2ad825cd8be19f85b20b1ebd46a79d474a424653c8 HEAD_REF master ) -- cgit v1.2.3 From 536ddf4bd41a48091075d55c48a8a3e1fd5242bb Mon Sep 17 00:00:00 2001 From: Jason Juang Date: Tue, 20 Feb 2018 12:06:37 -0800 Subject: [opencv] sfm module should depend on ceres (#2829) --- ports/opencv/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 11f1e8c69..9d15073e0 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,10 +1,10 @@ Source: opencv -Version: 3.4.0-2 +Version: 3.4.0-3 Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) Description: computer vision library Feature: sfm -Build-Depends: eigen3, glog, gflags +Build-Depends: eigen3, glog, gflags, ceres Description: opencv_sfm module Feature: cuda -- cgit v1.2.3 From 2f6cf768e54a155c282a7b490027ceb7be245fbf Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 14 Feb 2018 17:08:52 -0800 Subject: Improve vcpkgRemoveItem --- scripts/VcpkgPowershellUtils.ps1 | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index bed78b198..b73361fd1 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -25,16 +25,29 @@ function vcpkgCreateParentDirectoryIfNotExists([Parameter(Mandatory=$true)][stri } } -function vcpkgRemoveItem([Parameter(Mandatory=$true)][string]$dirPath) +function vcpkgIsDirectory([Parameter(Mandatory=$true)][string]$path) { - if ([string]::IsNullOrEmpty($dirPath)) + return (Get-Item $path) -is [System.IO.DirectoryInfo] +} + +function vcpkgRemoveItem([Parameter(Mandatory=$true)][string]$path) +{ + if ([string]::IsNullOrEmpty($path)) { return } - if (Test-Path $dirPath) + if (Test-Path $path) { - Remove-Item $dirPath -Recurse -Force + # Remove-Item -Recurse occasionally fails. This is a workaround + if (vcpkgIsDirectory $path) + { + & cmd.exe /c rd /s /q $path + } + else + { + Remove-Item $path -Force + } } } -- cgit v1.2.3 From 99092990398ab80484cced0927e55bedfda05077 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 20 Feb 2018 16:56:51 -0800 Subject: Expected::check_exit() now always shows line_info if it fails --- toolsrc/include/vcpkg/base/expected.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/toolsrc/include/vcpkg/base/expected.h b/toolsrc/include/vcpkg/base/expected.h index b3b81ae81..1f3d94638 100644 --- a/toolsrc/include/vcpkg/base/expected.h +++ b/toolsrc/include/vcpkg/base/expected.h @@ -103,7 +103,12 @@ namespace vcpkg private: void exit_if_error(const LineInfo& line_info) const { - Checks::check_exit(line_info, !m_s.has_error(), m_s.to_string()); + // This is used for quick value_or_exit() calls, so always put line_info in the error message. + Checks::check_exit(line_info, + !m_s.has_error(), + "Failed at [%s] with message:\n%s", + line_info.to_string(), + m_s.to_string()); } ErrorHolder m_s; -- cgit v1.2.3 From 7f021f9bb8143b9652d9aaad7f4ab308e6ca6f87 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 20 Feb 2018 17:18:50 -0800 Subject: [glew] Add comment about vcpkg_from_github() --- ports/glew/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake index ea455293f..79c669640 100644 --- a/ports/glew/portfile.cmake +++ b/ports/glew/portfile.cmake @@ -2,6 +2,8 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glew/glew-2.1.0) +# Don't change to vcpkg_from_github! The github-auto-generated archives are missing some files. +# More info: https://github.com/nigels-com/glew/issues/31 vcpkg_download_distfile(ARCHIVE_FILE URLS "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz" FILENAME "glew-2.1.0.tgz" -- cgit v1.2.3 From adb0930bc54dbff26acf131971199c3f57bdd0fb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Feb 2018 18:02:00 -0800 Subject: [vcpkg-metrics] Adjust reporting of build times --- toolsrc/include/vcpkg/metrics.h | 1 + toolsrc/src/vcpkg/build.cpp | 3 ++- toolsrc/src/vcpkg/metrics.cpp | 25 ++++++++++++++++++++++++- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/toolsrc/include/vcpkg/metrics.h b/toolsrc/include/vcpkg/metrics.h index ee6f8eb51..cb27ba58d 100644 --- a/toolsrc/include/vcpkg/metrics.h +++ b/toolsrc/include/vcpkg/metrics.h @@ -14,6 +14,7 @@ namespace vcpkg::Metrics static void init_user_information(std::string& user_id, std::string& first_use_time); void track_metric(const std::string& name, double value); + void track_buildtime(const std::string& name, double value); void track_property(const std::string& name, const std::string& value); void upload(const std::string& payload); diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index cc376c773..7d249bd0c 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -339,7 +339,8 @@ namespace vcpkg::Build { auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_metric("buildtimeus-" + spec_string, buildtimeus); + locked_metrics->track_buildtime(spec.to_string() + ":[" + Strings::join(",", config.feature_list) + "]", + buildtimeus); if (return_code != 0) { locked_metrics->track_property("error", "build failed"); diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index cdb21d260..1f9ddde38 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -150,6 +150,9 @@ namespace vcpkg::Metrics std::string properties; std::string measurements; + std::vector buildtime_names; + std::vector buildtime_times; + void track_property(const std::string& name, const std::string& value) { if (properties.size() != 0) properties.push_back(','); @@ -166,8 +169,23 @@ namespace vcpkg::Metrics measurements.append(std::to_string(value)); } + void track_buildtime(const std::string& name, double value) + { + buildtime_names.push_back(name); + buildtime_times.push_back(std::to_string(value)); + } + std::string format_event_data_template() const { + auto props_plus_buildtimes = properties; + if (buildtime_names.size() > 0) + { + if (props_plus_buildtimes.size() > 0) props_plus_buildtimes.push_back(','); + props_plus_buildtimes.append(Strings::format(R"("buildnames": [%s], "buildtimes": [%s])", + Strings::join(",", buildtime_names, to_json_string), + Strings::join(",", buildtime_times))); + } + const std::string& session_id = get_session_id(); return Strings::format(R"([{ "ver": 1, @@ -199,7 +217,7 @@ namespace vcpkg::Metrics session_id, user_id, user_timestamp, - properties, + props_plus_buildtimes, measurements); } }; @@ -274,6 +292,11 @@ namespace vcpkg::Metrics void Metrics::track_metric(const std::string& name, double value) { g_metricmessage.track_metric(name, value); } + void Metrics::track_buildtime(const std::string& name, double value) + { + g_metricmessage.track_buildtime(name, value); + } + void Metrics::track_property(const std::string& name, const std::string& value) { g_metricmessage.track_property(name, value); -- cgit v1.2.3 From 8a4afe16193f274eb4d60357d81b8827ed055fb8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 20 Feb 2018 17:58:21 -0800 Subject: Update git to 2.16.2 --- scripts/bootstrap.ps1 | 2 +- scripts/fetchDependency.ps1 | 12 ++++++------ toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 0df2a2a99..eb4513a64 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -14,7 +14,7 @@ $gitHash = "unknownhash" $oldpath = $env:path try { - $env:path += ";$vcpkgRootDir\downloads\MinGit-2.15.0-32-bit\cmd" + $env:path += ";$vcpkgRootDir\downloads\MinGit-2.16.2-32-bit\cmd" if (Get-Command "git" -ErrorAction SilentlyContinue) { $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index bfc0f733a..ec3cdc83a 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -50,14 +50,14 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) } elseif($Dependency -eq "git") { - $requiredVersion = "2.15.0" - $downloadVersion = "2.15.0" - $url = "https://github.com/git-for-windows/git/releases/download/v2.15.0.windows.1/MinGit-2.15.0-32-bit.zip" - $downloadPath = "$downloadsDir\MinGit-2.15.0-32-bit.zip" - $expectedDownloadedFileHash = "69c035ab7b75c42ce5dd99e8927d2624ab618fab73c5ad84c9412bd74c343537" + $requiredVersion = "2.16.2" + $downloadVersion = "2.16.2" + $url = "https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-32-bit.zip" + $downloadPath = "$downloadsDir\MinGit-2.16.2-32-bit.zip" + $expectedDownloadedFileHash = "322c727e482aa97522c64a5ac68bdda3780111e8670bcfb532beac8e11ece5da" # There is another copy of git.exe in MinGit\bin. However, an installed version of git add the cmd dir to the PATH. # Therefore, choosing the cmd dir here as well. - $executableFromDownload = "$downloadsDir\MinGit-2.15.0-32-bit\cmd\git.exe" + $executableFromDownload = "$downloadsDir\MinGit-2.16.2-32-bit\cmd\git.exe" $extractionType = $ExtractionType_ZIP } elseif($Dependency -eq "installerbase") diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 06e0c01ab..d574b7c4d 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -167,7 +167,7 @@ namespace vcpkg fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) { #if defined(_WIN32) - static constexpr std::array EXPECTED_VERSION = {2, 15, 0}; + static constexpr std::array EXPECTED_VERSION = {2, 16, 2}; #else static constexpr std::array EXPECTED_VERSION = {2, 7, 4}; #endif @@ -175,7 +175,7 @@ namespace vcpkg const std::vector from_path = Files::find_from_PATH("git"); - const fs::path downloaded_copy = downloads_folder / "MinGit-2.15.0-32-bit" / "cmd" / "git.exe"; + const fs::path downloaded_copy = downloads_folder / "MinGit-2.16.2-32-bit" / "cmd" / "git.exe"; std::vector candidate_paths; #if defined(_WIN32) candidate_paths.push_back(downloaded_copy); -- cgit v1.2.3 From 210e6b0114ffe620ef3e41cc41158a26e0df692d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 20 Feb 2018 18:21:21 -0800 Subject: Update CHANGELOG and bump version to v0.0.105 --- CHANGELOG.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d356340c9..134fcd63a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,59 @@ +vcpkg (0.0.105) +-------------- + * Add ports: + - breakpad 2018-2-19 + - cartographer 0.3.0-3 + - chipmunk 7.0.2 + - ebml 1.3.5-1 + - intel-mkl 2018.0.1 + - jbig2dec 0.13 + - libgeotiff 1.4.2-2 + - liblo 0.29-1 + - libpng-apng 1.6.34-2 + - magnum-extras 2018.02-1 + - magnum-integration 2018.02-1 + - matroska 1.4.8 + - mman git-f5ff813 + - qt5-graphicaleffects 5.9.2-0 + - qt5-quickcontrols 5.9.2-0 + - qt5-quickcontrols2 5.9.2-0 + - recast 1.5.1 + - tinydir 1.2.3 + - tinytoml 20180219-1 + * Update ports: + - aubio 0.4.6 -> 0.4.6-1 + - aws-sdk-cpp 1.3.15 -> 1.3.58 + - blaze 3.2-3 -> 3.3 + - boost-build 1.66.0-4 -> 1.66.0-5 + - boost-mpi 1.66.0 -> 1.66.0-1 + - catch2 2.1.1 -> 2.1.2 + - ceres 1.13.0-2 -> 1.13.0-4 + - corrade jan2018-1 -> 2018.02-1 + - cuda 8.0-1 -> 9.0 + - draco 0.10.0-1 -> 1.2.5 + - ffmpeg 3.3.3-1 -> 3.3.3-2 + - folly 2017.11.27.00-2 -> 2017.11.27.00-3 + - hpx 1.0.0-7 -> 1.0.0-8 + - jansson 2.10-1 -> 2.11 + - libdisasm 0.23 -> 0.23-1 + - libmupdf 1.11-1 -> 1.12.0 + - magnum jan2018-1 -> 2018.02-1 + - magnum-plugins jan2018-1 -> 2018.02-1 + - opencv 3.4.0-2 -> 3.4.0-3 + - openvr 1.0.12 -> 1.0.13 + - pcre2 10.30-1 -> 10.30-2 + - qt5-base 5.9.2-4 -> 5.9.2-5 + - realsense2 2.9.1 -> 2.10.0 + - sciter 4.1.2 -> 4.1.3 + - suitesparse 4.5.5-3 -> 4.5.5-4 + - szip 2.1.1 -> 2.1.1-1 + - uriparser 0.8.4-1 -> 0.8.5 + * Better handling of `feature packages`. + * Bump required version & auto-downloaded version of `git` to 2.6.2 + +-- vcpkg team TUE, 20 Feb 2018 18:30:00 -0800 + + vcpkg (0.0.104) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index f4950aa0b..157d21b7b 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.104" \ No newline at end of file +"0.0.105" \ No newline at end of file -- cgit v1.2.3 From 97531c32d4867f6bc2d6dab9653eaaee66a74ded Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 21 Feb 2018 14:50:36 -0800 Subject: [configure_qmake] Do not pass -d (too much output) --- scripts/cmake/vcpkg_configure_qmake.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_qmake.cmake b/scripts/cmake/vcpkg_configure_qmake.cmake index 4cc7bc9f7..3aa30e70d 100644 --- a/scripts/cmake/vcpkg_configure_qmake.cmake +++ b/scripts/cmake/vcpkg_configure_qmake.cmake @@ -1,7 +1,7 @@ #.rst: # .. command:: vcpkg_configure_qmake # -# Configure a qmake-based project. +# Configure a qmake-based project. # # :: # vcpkg_configure_qmake(SOURCE_PATH @@ -15,10 +15,10 @@ function(vcpkg_configure_qmake) cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) - + # Find qmake executable find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5) - + if(NOT QMAKE_COMMAND) message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") endif() @@ -27,7 +27,7 @@ function(vcpkg_configure_qmake) list(APPEND _csc_OPTIONS CONFIG+=staticlib) endif() - # Cleanup build directories + # Cleanup build directories file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_release.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf) @@ -35,7 +35,7 @@ function(vcpkg_configure_qmake) message(STATUS "Configuring ${TARGET_TRIPLET}-rel") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) vcpkg_execute_required_process( - COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf" + COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release ${_csc_OPTIONS} ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf" WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME config-${TARGET_TRIPLET}-rel ) @@ -46,7 +46,7 @@ function(vcpkg_configure_qmake) message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) vcpkg_execute_required_process( - COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug ${_csc_OPTIONS} -d ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/qt.conf" + COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug ${_csc_OPTIONS} ${_csc_SOURCE_PATH} -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/qt.conf" WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME config-${TARGET_TRIPLET}-dbg ) -- cgit v1.2.3 From 494f3002bfdf80c363ae51ca426cabc231c73339 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 21 Feb 2018 15:32:20 -0800 Subject: Add internal option to clean packages\ after the build --- toolsrc/include/vcpkg/build.h | 7 +++++++ toolsrc/src/vcpkg/build.cpp | 18 +++++++++++++++--- toolsrc/src/vcpkg/commands.ci.cpp | 11 +++++------ toolsrc/src/vcpkg/commands.upgrade.cpp | 9 ++++----- toolsrc/src/vcpkg/install.cpp | 2 +- 5 files changed, 32 insertions(+), 15 deletions(-) diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index d7c5c8344..7ef7d6516 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -44,6 +44,12 @@ namespace vcpkg::Build YES }; + enum class CleanPackages + { + NO = 0, + YES + }; + enum class ConfigurationType { DEBUG, @@ -55,6 +61,7 @@ namespace vcpkg::Build UseHeadVersion use_head_version; AllowDownloads allow_downloads; CleanBuildtrees clean_buildtrees; + CleanPackages clean_packages; }; enum class BuildResult diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 7d249bd0c..f6c995f2a 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -61,8 +61,10 @@ namespace vcpkg::Build::Command spec.name()); const StatusParagraphs status_db = database_load_check(paths); - const Build::BuildPackageOptions build_package_options{ - Build::UseHeadVersion::NO, Build::AllowDownloads::YES, Build::CleanBuildtrees::NO}; + const Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::NO, + Build::CleanPackages::NO}; const std::unordered_set features_as_set(full_spec.features.begin(), full_spec.features.end()); @@ -385,7 +387,7 @@ namespace vcpkg::Build if (config.build_package_options.clean_buildtrees == CleanBuildtrees::YES) { auto& fs = paths.get_filesystem(); - auto buildtrees_dir = paths.buildtrees / config.scf.core_paragraph->name; + const fs::path buildtrees_dir = paths.buildtrees / config.scf.core_paragraph->name; auto buildtree_files = fs.get_files_non_recursive(buildtrees_dir); for (auto&& file : buildtree_files) { @@ -397,6 +399,16 @@ namespace vcpkg::Build } } + if (config.build_package_options.clean_packages == CleanPackages::YES) + { + auto& fs = paths.get_filesystem(); + const PackageSpec spec = PackageSpec::from_name_and_triplet(config.scf.core_paragraph->name, config.triplet) + .value_or_exit(VCPKG_LINE_INFO); + const fs::path package_dir = paths.package_dir(spec); + std::error_code ec; + fs.remove_all(package_dir, ec); + } + return result; } diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 7672755ba..313582b7b 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -24,17 +24,16 @@ namespace vcpkg::Commands::CI { Input::check_triplet(triplet, paths); std::vector specs = PackageSpec::to_package_specs(ports, triplet); - auto featurespecs = Util::fmap(specs, [](auto& spec) { return FeatureSpec(spec, ""); }); + const auto featurespecs = Util::fmap(specs, [](auto& spec) { return FeatureSpec(spec, ""); }); StatusParagraphs status_db = database_load_check(paths); const auto& paths_port_file = Dependencies::PathsPortFileProvider(paths); auto action_plan = Dependencies::create_feature_install_plan(paths_port_file, featurespecs, status_db); - const Build::BuildPackageOptions install_plan_options = { - Build::UseHeadVersion::NO, - Build::AllowDownloads::YES, - Build::CleanBuildtrees::YES, - }; + const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::YES, + Build::CleanPackages::YES}; for (auto&& action : action_plan) { diff --git a/toolsrc/src/vcpkg/commands.upgrade.cpp b/toolsrc/src/vcpkg/commands.upgrade.cpp index bb26dc735..c5b48f2a2 100644 --- a/toolsrc/src/vcpkg/commands.upgrade.cpp +++ b/toolsrc/src/vcpkg/commands.upgrade.cpp @@ -141,11 +141,10 @@ namespace vcpkg::Commands::Upgrade Checks::check_exit(VCPKG_LINE_INFO, !plan.empty()); - const Build::BuildPackageOptions install_plan_options = { - Build::UseHeadVersion::NO, - Build::AllowDownloads::YES, - Build::CleanBuildtrees::NO, - }; + const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::NO, + Build::CleanPackages::NO}; // Set build settings for all install actions for (auto&& action : plan) diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 631b16c59..d032f77d8 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -547,7 +547,7 @@ namespace vcpkg::Install Util::Enum::to_enum(use_head_version), Util::Enum::to_enum(!no_downloads), Build::CleanBuildtrees::NO, - }; + Build::CleanPackages::NO}; // Note: action_plan will hold raw pointers to SourceControlFiles from this map std::vector action_plan; -- cgit v1.2.3 From 6b48216b8c6112833311bc9aabde4664a036ecd9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Feb 2018 16:44:50 -0800 Subject: [vcpkg-configure-cmake] Improvements to allow list parameters --- scripts/cmake/vcpkg_configure_cmake.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 726aab2ec..9bb7d6da3 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -204,12 +204,12 @@ function(vcpkg_configure_cmake) endif() set(rel_command - ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} + ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} "${_csc_OPTIONS}" "${_csc_OPTIONS_RELEASE}" -G ${GENERATOR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}) set(dbg_command - ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} + ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} "${_csc_OPTIONS}" "${_csc_OPTIONS_DEBUG}" -G ${GENERATOR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug) -- cgit v1.2.3 From 099759de63e2d64ffe80f6c9244a2390e47316bc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Feb 2018 16:45:24 -0800 Subject: [vcpkg-download-distfile] Create target directory on download --- scripts/cmake/vcpkg_download_distfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 28276f47c..af4926008 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -111,6 +111,8 @@ function(vcpkg_download_distfile VAR) message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") set(download_success 0) else() + get_filename_component(downloaded_file_dir "${downloaded_file_path}" DIRECTORY) + file(MAKE_DIRECTORY "${downloaded_file_dir}") file(RENAME ${download_file_path_part} ${downloaded_file_path}) message(STATUS "Downloading ${url}... OK") set(download_success 1) -- cgit v1.2.3 From 35e19d5926f593b135878ee64abf06cf27dd91d9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 21 Feb 2018 16:58:05 -0800 Subject: Improve error message when we have an error code --- toolsrc/include/vcpkg/base/expected.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/include/vcpkg/base/expected.h b/toolsrc/include/vcpkg/base/expected.h index 1f3d94638..e20f723db 100644 --- a/toolsrc/include/vcpkg/base/expected.h +++ b/toolsrc/include/vcpkg/base/expected.h @@ -38,7 +38,7 @@ namespace vcpkg const std::error_code& error() const { return m_err; } std::error_code& error() { return m_err; } - CStringView to_string() const { return "value was error"; } + CStringView to_string() const { return m_err.message(); } private: std::error_code m_err; -- cgit v1.2.3 From e02c9e535493842a26b4426ce602c60f90ace671 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 21 Feb 2018 19:57:14 -0800 Subject: [CI] Fix too early deletion of files --- toolsrc/src/vcpkg/build.cpp | 10 ---------- toolsrc/src/vcpkg/install.cpp | 9 +++++++++ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index f6c995f2a..c169a778e 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -399,16 +399,6 @@ namespace vcpkg::Build } } - if (config.build_package_options.clean_packages == CleanPackages::YES) - { - auto& fs = paths.get_filesystem(); - const PackageSpec spec = PackageSpec::from_name_and_triplet(config.scf.core_paragraph->name, config.triplet) - .value_or_exit(VCPKG_LINE_INFO); - const fs::path package_dir = paths.package_dir(spec); - std::error_code ec; - fs.remove_all(package_dir, ec); - } - return result; } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index d032f77d8..46c7c53b8 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -308,6 +308,15 @@ namespace vcpkg::Install auto bcf = std::make_unique( Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO)); auto code = aux_install(display_name_with_features, *bcf); + + if (action.build_options.clean_packages == Build::CleanPackages::YES) + { + 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); + } + return {code, std::move(bcf)}; } -- cgit v1.2.3 From 59dca1d481113057aebb1bbf76eaf72b018d0ba2 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Feb 2018 20:08:25 -0800 Subject: [vcpkg] Handle feature packages in CI --- scripts/internalCI.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1 index 37f4f35a4..9529c3766 100644 --- a/scripts/internalCI.ps1 +++ b/scripts/internalCI.ps1 @@ -18,5 +18,5 @@ if (-not $?) { throw $? } ./vcpkg.exe install azure-storage-cpp cpprestsdk:x64-windows-static cpprestsdk:x86-uwp ` bond cryptopp zlib expat sdl2 curl sqlite3 libuv protobuf:x64-windows sfml opencv:x64-windows uwebsockets uwebsockets:x64-windows-static ` -opencv:x86-uwp boost:x86-uwp --keep-going "--x-xunit=TEST-internal-ci.xml" +opencv:x86-uwp boost:x86-uwp --keep-going "--x-xunit=TEST-internal-ci.xml" --recurse if (-not $?) { throw $? } -- cgit v1.2.3 From f6d652c1bf36717d492305defa3dcf94f724b2c9 Mon Sep 17 00:00:00 2001 From: Youngho Kim Date: Thu, 22 Feb 2018 13:12:49 +0900 Subject: add x264 package for vcpkg (#2849) * add x264 package add x264 package * [x264] Simplify portfile. Use GitHub mirror instead of trying to run git clone. --- ports/x264/CONTROL | 3 ++ ports/x264/portfile.cmake | 122 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 ports/x264/CONTROL create mode 100644 ports/x264/portfile.cmake diff --git a/ports/x264/CONTROL b/ports/x264/CONTROL new file mode 100644 index 000000000..b9a3a4f9b --- /dev/null +++ b/ports/x264/CONTROL @@ -0,0 +1,3 @@ +Source: x264 +Version: 152-e9a5903edf8ca59 +Description: x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format diff --git a/ports/x264/portfile.cmake b/ports/x264/portfile.cmake new file mode 100644 index 000000000..a6115f8d1 --- /dev/null +++ b/ports/x264/portfile.cmake @@ -0,0 +1,122 @@ +include(vcpkg_common_functions) + +set(X264_VERSION 152) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mirror/x264 + REF e9a5903edf8ca59ef20e6f4894c196f135af735e + SHA512 063da238264b33ab7ccf097c1f8a7d6b1bf1f0777b433ccbb6ab98090f050fa4d289eeff37b701b8fd7fb5ad460b7fa13d61b68b3f397bc78a8eaa50379e4878 + HEAD_REF master +) + +# Acquire tools +vcpkg_acquire_msys(MSYS_ROOT) + +# Insert msys into the path between the compiler toolset and windows system32. This prevents masking of "link.exe" but DOES mask "find.exe". +string(REPLACE ";$ENV{SystemRoot}\\system32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") +set(ENV{PATH} "${NEWPATH}") +set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + +vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c "pacman -Sy --noconfirm --needed make automake1.15" + WORKING_DIRECTORY "${MSYS_ROOT}" + LOGNAME "pacman-${TARGET_TRIPLET}") + +set(AUTOMAKE_DIR ${MSYS_ROOT}/usr/share/automake-1.15) +#file(COPY ${AUTOMAKE_DIR}/config.guess ${AUTOMAKE_DIR}/config.sub DESTINATION ${SOURCE_PATH}/source) + +set(CONFIGURE_OPTIONS "--host=i686-pc-mingw32 --enable-strip --disable-lavf --disable-swscale --disable-asm --disable-avs --disable-ffms --disable-gpac --disable-lsmash") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --enable-shared") +else() + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --enable-static") +endif() + +set(CONFIGURE_OPTIONS_RELEASE "--prefix=${CURRENT_PACKAGES_DIR}") +set(CONFIGURE_OPTIONS_DEBUG "--enable-debug --prefix=${CURRENT_PACKAGES_DIR}/debug") + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(X264_RUNTIME "-MT") +else() + set(X264_RUNTIME "-MD") +endif() + +# Configure release +message(STATUS "Configuring ${TARGET_TRIPLET}-rel") +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) +set(ENV{CFLAGS} "${X264_RUNTIME} -O2 -Oi -Zi") +set(ENV{CXXFLAGS} "${X264_RUNTIME} -O2 -Oi -Zi") +set(ENV{LDFLAGS} "-DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF") +vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c + "CC=cl ${SOURCE_PATH}/configure ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_RELEASE}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME "configure-${TARGET_TRIPLET}-rel") +message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + +# Configure debug +message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) +set(ENV{CFLAGS} "${X264_RUNTIME}d -Od -Zi -RTC1") +set(ENV{CXXFLAGS} "${X264_RUNTIME}d -Od -Zi -RTC1") +set(ENV{LDFLAGS} "-DEBUG") +vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c + "CC=cl ${SOURCE_PATH}/configure ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_DEBUG}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME "configure-${TARGET_TRIPLET}-dbg") +message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + +unset(ENV{CFLAGS}) +unset(ENV{CXXFLAGS}) +unset(ENV{LDFLAGS}) + +# Build release +message(STATUS "Package ${TARGET_TRIPLET}-rel") +vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c "make && make install" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME "build-${TARGET_TRIPLET}-rel") +message(STATUS "Package ${TARGET_TRIPLET}-rel done") + +# Build debug +message(STATUS "Package ${TARGET_TRIPLET}-dbg") +vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c "make && make install" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME "build-${TARGET_TRIPLET}-dbg") +message(STATUS "Package ${TARGET_TRIPLET}-dbg done") + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/x264) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/x264.exe ${CURRENT_PACKAGES_DIR}/tools/x264/x264.exe) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/lib/pkgconfig + ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig + ${CURRENT_PACKAGES_DIR}/debug/bin/x264.exe + ${CURRENT_PACKAGES_DIR}/debug/include +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libx264.dll.lib ${CURRENT_PACKAGES_DIR}/lib/libx264.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libx264.dll.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libx264.lib) +else() + # force U_STATIC_IMPLEMENTATION macro + file(READ ${CURRENT_PACKAGES_DIR}/include/x264.h HEADER_CONTENTS) + string(REPLACE "defined(U_STATIC_IMPLEMENTATION)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/x264.h "${HEADER_CONTENTS}") + + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ) +endif() + +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/x264) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/x264/COPYING ${CURRENT_PACKAGES_DIR}/share/x264/copyright) -- cgit v1.2.3 From 65e241cf8b47a07b85efae85bac14e723864dccb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Feb 2018 22:18:15 -0800 Subject: [vcpkg] Add non-throwing implementation of write_contents() --- toolsrc/include/vcpkg/base/files.h | 10 +++++++++- toolsrc/src/vcpkg/base/checks.cpp | 4 ++++ toolsrc/src/vcpkg/base/files.cpp | 21 +++++++++++++++------ toolsrc/src/vcpkg/metrics.cpp | 5 +++-- toolsrc/src/vcpkg/userconfig.cpp | 3 ++- 5 files changed, 33 insertions(+), 10 deletions(-) diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 9bdc0aa4b..a2bf9c33c 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -34,7 +34,7 @@ namespace vcpkg::Files virtual std::vector get_files_non_recursive(const fs::path& dir) const = 0; virtual void write_lines(const fs::path& file_path, const std::vector& lines) = 0; - virtual void write_contents(const fs::path& file_path, const std::string& data) = 0; + virtual void write_contents(const fs::path& file_path, const std::string& data, std::error_code& ec) = 0; virtual void rename(const fs::path& oldpath, const fs::path& newpath) = 0; virtual bool remove(const fs::path& path) = 0; virtual bool remove(const fs::path& path, std::error_code& ec) = 0; @@ -51,6 +51,14 @@ namespace vcpkg::Files fs::copy_options opts, std::error_code& ec) = 0; virtual fs::file_status status(const fs::path& path, std::error_code& ec) const = 0; + + inline void write_contents(const fs::path& file_path, const std::string& data) + { + std::error_code ec; + write_contents(file_path, data, ec); + Checks::check_exit( + VCPKG_LINE_INFO, ec, "error while writing file: %s: %s", file_path.u8string(), ec.message()); + } }; Filesystem& get_real_filesystem(); diff --git a/toolsrc/src/vcpkg/base/checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp index 23f2cc630..2977a1d8b 100644 --- a/toolsrc/src/vcpkg/base/checks.cpp +++ b/toolsrc/src/vcpkg/base/checks.cpp @@ -10,6 +10,10 @@ namespace vcpkg::Checks { [[noreturn]] static void cleanup_and_exit(const int exit_code) { + static std::atomic have_entered = false; + if (have_entered) std::terminate(); + have_entered = true; + const auto elapsed_us = GlobalState::timer.lock()->microseconds(); auto metrics = Metrics::g_metrics.lock(); diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 060a14da3..95ae0fd33 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -164,21 +164,30 @@ namespace vcpkg::Files { return fs::stdfs::status(path, ec); } - virtual void write_contents(const fs::path& file_path, const std::string& data) override + virtual void write_contents(const fs::path& file_path, const std::string& data, std::error_code& ec) override { + ec = std::error_code(); + FILE* f = nullptr; #if defined(_WIN32) - auto ec = _wfopen_s(&f, file_path.native().c_str(), L"wb"); + auto err = _wfopen_s(&f, file_path.native().c_str(), L"wb"); #else f = fopen(file_path.native().c_str(), "wb"); - int ec = f != nullptr ? 0 : 1; + int err = f != nullptr ? 0 : 1; #endif - Checks::check_exit( - VCPKG_LINE_INFO, ec == 0, "Error: Could not open file for writing: %s", file_path.u8string().c_str()); + if (err != 0) + { + ec.assign(err, std::system_category()); + return; + } + auto count = fwrite(data.data(), sizeof(data[0]), data.size(), f); fclose(f); - Checks::check_exit(VCPKG_LINE_INFO, count == data.size()); + if (count != data.size()) + { + ec = std::make_error_code(std::errc::no_space_on_device); + } } }; diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 1f9ddde38..1a322e99c 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -427,8 +427,9 @@ namespace vcpkg::Metrics } const fs::path vcpkg_metrics_txt_path = temp_folder_path / ("vcpkg" + generate_random_UUID() + ".txt"); - fs.write_contents(vcpkg_metrics_txt_path, payload); - + std::error_code ec; + fs.write_contents(vcpkg_metrics_txt_path, payload, ec); + if (ec) return; const std::string cmd_line = Strings::format("start \"vcpkgmetricsuploader.exe\" \"%s\" \"%s\"", temp_folder_path_exe.u8string(), vcpkg_metrics_txt_path.u8string()); diff --git a/toolsrc/src/vcpkg/userconfig.cpp b/toolsrc/src/vcpkg/userconfig.cpp index 906594691..c7c57ce26 100644 --- a/toolsrc/src/vcpkg/userconfig.cpp +++ b/toolsrc/src/vcpkg/userconfig.cpp @@ -78,7 +78,8 @@ namespace vcpkg user_id, user_time, user_mac, - last_completed_survey)); + last_completed_survey), + ec); } catch (...) { -- cgit v1.2.3 From 222fa360120b9b66fcd305a247e57e1ddf669229 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Feb 2018 22:21:19 -0800 Subject: [vcpkg] Fixup previous commit --- toolsrc/include/vcpkg/base/files.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index a2bf9c33c..09393b9ee 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -57,7 +57,7 @@ namespace vcpkg::Files std::error_code ec; write_contents(file_path, data, ec); Checks::check_exit( - VCPKG_LINE_INFO, ec, "error while writing file: %s: %s", file_path.u8string(), ec.message()); + VCPKG_LINE_INFO, !ec, "error while writing file: %s: %s", file_path.u8string(), ec.message()); } }; -- cgit v1.2.3 From 0ef0300b8eefcdfe119e0bbaa3ce7b0f8c30ee4c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 19 Feb 2018 12:20:16 -0800 Subject: [vcpkg] Enable metrics on linux --- toolsrc/CMakeLists.txt | 13 +++--- toolsrc/include/vcpkg/base/strings.h | 2 + toolsrc/src/vcpkg.cpp | 6 ++- toolsrc/src/vcpkg/base/checks.cpp | 2 +- toolsrc/src/vcpkg/base/files.cpp | 2 +- toolsrc/src/vcpkg/base/strings.cpp | 10 +++++ toolsrc/src/vcpkg/commands.contact.cpp | 9 ++-- toolsrc/src/vcpkg/commands.version.cpp | 4 ++ toolsrc/src/vcpkg/metrics.cpp | 75 ++++++++++++++++++++++------------ toolsrc/src/vcpkg/userconfig.cpp | 22 ++++++---- 10 files changed, 97 insertions(+), 48 deletions(-) diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index 0168e2de2..aa2146111 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -13,15 +13,12 @@ endif() file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp) -add_library(vcpkglib STATIC ${VCPKGLIB_SOURCES}) -target_compile_definitions(vcpkglib PRIVATE -DDISABLE_METRICS=0) -target_include_directories(vcpkglib PUBLIC include) +add_executable(vcpkg src/vcpkg.cpp ${VCPKGLIB_SOURCES}) +target_compile_definitions(vcpkg PRIVATE -DDISABLE_METRICS=0) +target_include_directories(vcpkg PUBLIC include) if(GCC) - target_link_libraries(vcpkglib PUBLIC stdc++fs) + target_link_libraries(vcpkg PUBLIC stdc++fs) elseif(CLANG) - target_link_libraries(vcpkglib PUBLIC c++experimental) + target_link_libraries(vcpkg PUBLIC c++experimental) endif() - -add_executable(vcpkg src/vcpkg.cpp) -target_link_libraries(vcpkg PRIVATE vcpkglib) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index ee1b2fc28..6ef840fb3 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -38,6 +38,8 @@ namespace vcpkg::Strings std::string to_utf8(const CWStringView& w); + std::string escape_string(const CStringView& s, char char_to_escape, char escape_char); + std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern); bool case_insensitive_ascii_contains(const std::string& s, const std::string& pattern); diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 9f29dcdd2..adb32c723 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -171,7 +171,6 @@ static void inner(const VcpkgCmdArguments& args) static void load_config() { -#if defined(_WIN32) auto& fs = Files::get_real_filesystem(); auto config = UserConfig::try_read_data(fs); @@ -185,16 +184,20 @@ static void load_config() write_config = true; } +#if defined(_WIN32) if (config.user_mac.empty()) { config.user_mac = Metrics::get_MAC_user(); write_config = true; } +#endif { auto locked_metrics = Metrics::g_metrics.lock(); locked_metrics->set_user_information(config.user_id, config.user_time); +#if defined(_WIN32) locked_metrics->track_property("user_mac", config.user_mac); +#endif } if (config.last_completed_survey.empty()) @@ -208,7 +211,6 @@ static void load_config() { config.try_write_data(fs); } -#endif } static std::string trim_path_from_command_line(const std::string& full_command_line) diff --git a/toolsrc/src/vcpkg/base/checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp index 2977a1d8b..1b3ed5ec9 100644 --- a/toolsrc/src/vcpkg/base/checks.cpp +++ b/toolsrc/src/vcpkg/base/checks.cpp @@ -31,7 +31,7 @@ namespace vcpkg::Checks #if defined(_WIN32) ::TerminateProcess(::GetCurrentProcess(), exit_code); #else - ::exit(exit_code); + std::exit(exit_code); #endif } diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 95ae0fd33..b59104a59 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -166,7 +166,7 @@ namespace vcpkg::Files } virtual void write_contents(const fs::path& file_path, const std::string& data, std::error_code& ec) override { - ec = std::error_code(); + ec.clear(); FILE* f = nullptr; #if defined(_WIN32) diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 27cfcbe71..d912734e3 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -74,6 +74,16 @@ namespace vcpkg::Strings #endif } + std::string escape_string(const CStringView& s, char char_to_escape, char escape_char) + { + std::string ret = s.c_str(); + // Replace '\' with '\\' or '`' with '``' + ret = Strings::replace_all(std::move(ret), {escape_char}, {escape_char, escape_char}); + // Replace '"' with '\"' or '`"' + ret = Strings::replace_all(std::move(ret), {char_to_escape}, {escape_char, char_to_escape}); + return ret; + } + std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern) { const std::string pattern_as_lower_case(ascii_to_lowercase(pattern)); diff --git a/toolsrc/src/vcpkg/commands.contact.cpp b/toolsrc/src/vcpkg/commands.contact.cpp index 8063fe317..ffed07557 100644 --- a/toolsrc/src/vcpkg/commands.contact.cpp +++ b/toolsrc/src/vcpkg/commands.contact.cpp @@ -30,7 +30,6 @@ namespace vcpkg::Commands::Contact if (Util::Sets::contains(parsed_args.switches, switches[0].name)) { -#if defined(_WIN32) auto maybe_now = Chrono::CTime::get_current_date_time(); if (auto p_now = maybe_now.get()) { @@ -39,10 +38,14 @@ namespace vcpkg::Commands::Contact config.last_completed_survey = p_now->to_string(); config.try_write_data(fs); } -#endif +#if defined(_WIN32) System::cmd_execute("start https://aka.ms/NPS_vcpkg"); - System::println("Default browser launched to https://aka.ms/NPS_vcpkg, thank you for your feedback!"); + System::println("Default browser launched to https://aka.ms/NPS_vcpkg; thank you for your feedback!"); +#else + System::println( + "Please navigate to https://aka.ms/NPS_vcpkg in your preferred browser. Thank you for your feedback!"); +#endif } else { diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp index c21e8cafd..ffc5d2c8f 100644 --- a/toolsrc/src/vcpkg/commands.version.cpp +++ b/toolsrc/src/vcpkg/commands.version.cpp @@ -8,7 +8,11 @@ #define STRINGIFY(...) #__VA_ARGS__ #define MACRO_TO_STRING(X) STRINGIFY(X) +#if defined(VCPKG_VERSION) #define VCPKG_VERSION_AS_STRING MACRO_TO_STRING(VCPKG_VERSION) +#else +#define VCPKG_VERSION_AS_STRING "-unknownhash" +#endif namespace vcpkg::Commands::Version { diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 1a322e99c..f81c53583 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -196,8 +196,8 @@ namespace vcpkg::Metrics "iKey": "b4e88960-4393-4dd9-ab8e-97e8fe6d7603", "flags": 0.000000, "tags": { - "ai.device.os": "Windows", - "ai.device.osVersion": "%s", + "ai.device.os": "Other", + "ai.device.osVersion": "%s-%s", "ai.session.id": "%s", "ai.user.id": "%s", "ai.user.accountAcquisitionDate": "%s" @@ -213,6 +213,17 @@ namespace vcpkg::Metrics } }])", timestamp, +#if defined(_WIN32) + "Windows", +#elif defined(__APPLE__) + "OSX", +#elif defined(__linux__) + "Linux", +#elif defined(__unix__) + "Unix", +#elif defined(__unix__) + "Other", +#endif get_os_version_string(), session_id, user_id, @@ -390,50 +401,62 @@ namespace vcpkg::Metrics void Metrics::flush() { -#if defined(_WIN32) const std::string payload = g_metricmessage.format_event_data_template(); if (g_should_print_metrics) std::cerr << payload << "\n"; if (!g_should_send_metrics) return; - // upload(payload); - +#if defined(_WIN32) wchar_t temp_folder[MAX_PATH]; GetTempPathW(MAX_PATH, temp_folder); const fs::path temp_folder_path = fs::path(temp_folder) / "vcpkg"; const fs::path temp_folder_path_exe = temp_folder_path / Strings::format("vcpkgmetricsuploader-%s.exe", Commands::Version::base_version()); +#endif auto& fs = Files::get_real_filesystem(); - if (true) - { - const fs::path exe_path = [&fs]() -> fs::path { - auto vcpkgdir = System::get_exe_path_of_current_process().parent_path(); - auto path = vcpkgdir / "vcpkgmetricsuploader.exe"; - if (fs.exists(path)) return path; - - path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe"; - if (fs.exists(path)) return path; - - return ""; - }(); - - std::error_code ec; - fs.create_directories(temp_folder_path, ec); - if (ec) return; - fs.copy_file(exe_path, temp_folder_path_exe, fs::copy_options::skip_existing, ec); - if (ec) return; - } +#if defined(_WIN32) - const fs::path vcpkg_metrics_txt_path = temp_folder_path / ("vcpkg" + generate_random_UUID() + ".txt"); + const fs::path exe_path = [&fs]() -> fs::path { + auto vcpkgdir = System::get_exe_path_of_current_process().parent_path(); + auto path = vcpkgdir / "vcpkgmetricsuploader.exe"; + if (fs.exists(path)) return path; + + path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe"; + if (fs.exists(path)) return path; + + return ""; + }(); + + std::error_code ec; + fs.create_directories(temp_folder_path, ec); + if (ec) return; + fs.copy_file(exe_path, temp_folder_path_exe, fs::copy_options::skip_existing, ec); + if (ec) return; +#else + if (!fs.exists("/tmp")) return; + const fs::path temp_folder_path = "/tmp/vcpkg"; std::error_code ec; + fs.create_directory(temp_folder_path, ec); + // ignore error + ec.clear(); +#endif + const fs::path vcpkg_metrics_txt_path = temp_folder_path / ("vcpkg" + generate_random_UUID() + ".txt"); fs.write_contents(vcpkg_metrics_txt_path, payload, ec); if (ec) return; + +#if defined(_WIN32) const std::string cmd_line = Strings::format("start \"vcpkgmetricsuploader.exe\" \"%s\" \"%s\"", temp_folder_path_exe.u8string(), vcpkg_metrics_txt_path.u8string()); - System::cmd_execute_clean(cmd_line); +#else + auto escaped_path = Strings::escape_string(vcpkg_metrics_txt_path.u8string(), '\'', '\\'); + const std::string cmd_line = Strings::format( + R"((curl "https://dc.services.visualstudio.com/v2/track" -H "Content-Type: application/json" -X POST --data '@%s' >/dev/null 2>&1; rm '%s') &)", + escaped_path, + escaped_path); #endif + System::cmd_execute_clean(cmd_line); } } diff --git a/toolsrc/src/vcpkg/userconfig.cpp b/toolsrc/src/vcpkg/userconfig.cpp index c7c57ce26..9db2e5d47 100644 --- a/toolsrc/src/vcpkg/userconfig.cpp +++ b/toolsrc/src/vcpkg/userconfig.cpp @@ -29,13 +29,22 @@ namespace namespace vcpkg { + static fs::path get_config_path() + { +#if defined(_WIN32) + return get_localappdata() / "vcpkg" / "config"; +#else + auto maybe_home = System::get_environment_variable("HOME"); + return fs::path(maybe_home.value_or("/var")) / "vcpkg" / "config"; +#endif + } + UserConfig UserConfig::try_read_data(const Files::Filesystem& fs) { UserConfig ret; -#if defined(_WIN32) try { - auto maybe_pghs = Paragraphs::get_paragraphs(fs, get_localappdata() / "vcpkg" / "config"); + auto maybe_pghs = Paragraphs::get_paragraphs(fs, get_config_path()); if (const auto p_pghs = maybe_pghs.get()) { const auto& pghs = *p_pghs; @@ -58,19 +67,19 @@ namespace vcpkg catch (...) { } -#endif return ret; } void UserConfig::try_write_data(Files::Filesystem& fs) const { -#if defined(_WIN32) try { + auto config_path = get_config_path(); + auto config_dir = config_path.parent_path(); std::error_code ec; - fs.create_directory(get_localappdata() / "vcpkg", ec); - fs.write_contents(get_localappdata() / "vcpkg" / "config", + fs.create_directory(config_dir, ec); + fs.write_contents(config_path, Strings::format("User-Id: %s\n" "User-Since: %s\n" "Mac-Hash: %s\n" @@ -84,6 +93,5 @@ namespace vcpkg catch (...) { } -#endif } } -- cgit v1.2.3 From fe41bfecd6bee02d16347802436a72e12b244d6d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Feb 2018 00:10:25 -0800 Subject: [vcpkg] Fix previous commit's typo --- toolsrc/src/vcpkg/metrics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index f81c53583..d49cadbe2 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -221,7 +221,7 @@ namespace vcpkg::Metrics "Linux", #elif defined(__unix__) "Unix", -#elif defined(__unix__) +#else "Other", #endif get_os_version_string(), -- cgit v1.2.3 From 1f9c73454bfdf26f70f6976bc633deecc3bef22a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Feb 2018 05:16:06 -0800 Subject: [mman] Fix static linkage. Fixes #2856. --- ports/mman/CONTROL | 2 +- ports/mman/mman-static.patch | 33 +++++++++++++++++++++++++++++++++ ports/mman/portfile.cmake | 19 ++++++++++++------- 3 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 ports/mman/mman-static.patch diff --git a/ports/mman/CONTROL b/ports/mman/CONTROL index 85eb7c8d3..f0ff4ec69 100644 --- a/ports/mman/CONTROL +++ b/ports/mman/CONTROL @@ -1,3 +1,3 @@ Source: mman -Version: git-f5ff813 +Version: git-f5ff813-1 Description: A light implementation of the mmap functions for MinGW. diff --git a/ports/mman/mman-static.patch b/ports/mman/mman-static.patch new file mode 100644 index 000000000..ce7be4976 --- /dev/null +++ b/ports/mman/mman-static.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4696ad4..a72bbce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,6 +8,10 @@ option (BUILD_TESTS "tests?" OFF) + set (headers mman.h) + set (sources mman.c) + ++if(NOT BUILD_SHARED_LIBS) ++ add_definitions(-DMMANSHARED_EXPORT=) ++endif() ++ + add_library (mman ${sources}) + + install (TARGETS mman RUNTIME DESTINATION bin +diff --git a/mman.h b/mman.h +index 4065bc6..435ea26 100644 +--- a/mman.h ++++ b/mman.h +@@ -15,11 +15,13 @@ + #include <_mingw.h> + #endif + ++#if !defined(MMANSHARED_EXPORT) + #if defined(MMAN_LIBRARY) + #define MMANSHARED_EXPORT __declspec(dllexport) + #else + #define MMANSHARED_EXPORT __declspec(dllimport) + #endif ++#endif + + /* Determine offset type */ + #include diff --git a/ports/mman/portfile.cmake b/ports/mman/portfile.cmake index f0616f44d..88c23348e 100644 --- a/ports/mman/portfile.cmake +++ b/ports/mman/portfile.cmake @@ -8,16 +8,15 @@ vcpkg_from_github( HEAD_REF master ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - set(ENABLE_SHARED OFF) -else() - set(ENABLE_SHARED ON) -endif() +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/mman-static.patch +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_SHARED_LIBS=${ENABLE_SHARED} + PREFER_NINJA ) vcpkg_install_cmake() @@ -25,4 +24,10 @@ vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/mman RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(READ ${CURRENT_PACKAGES_DIR}/include/sys/mman.h _contents) + string(REPLACE "__declspec(dllimport)" "" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/sys/mman.h "${_contents}") +endif() + vcpkg_copy_pdbs() -- cgit v1.2.3 From ef9d50ecb3a968062f1d7e47c3aa27e924eadf44 Mon Sep 17 00:00:00 2001 From: yosagi Date: Thu, 22 Feb 2018 22:31:28 +0900 Subject: Handle qt subpackage executable paths in cmake config files (#2844) * Handle qt subpackage executable paths in cmake config files * [qt5-modularscripts] Bump version to include changes to tool deployment --- ports/qt5-modularscripts/CONTROL | 2 +- ports/qt5-modularscripts/fixcmake.py | 13 +++++++++++-- ports/qt5-modularscripts/qt_modular_library.cmake | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ports/qt5-modularscripts/CONTROL b/ports/qt5-modularscripts/CONTROL index bf2ab2734..502887c52 100644 --- a/ports/qt5-modularscripts/CONTROL +++ b/ports/qt5-modularscripts/CONTROL @@ -1,3 +1,3 @@ Source: qt5-modularscripts -Version: 1 +Version: 2 Description: Vcpkg helpers to package qt5 modules diff --git a/ports/qt5-modularscripts/fixcmake.py b/ports/qt5-modularscripts/fixcmake.py index 923e600bc..83a40ec6c 100644 --- a/ports/qt5-modularscripts/fixcmake.py +++ b/ports/qt5-modularscripts/fixcmake.py @@ -1,8 +1,14 @@ import os import re +import sys from glob import glob +port="qt5" +if len(sys.argv) > 1: + port=sys.argv[1] + files = [y for x in os.walk('.') for y in glob(os.path.join(x[0], '*.cmake'))] +tooldir="/tools/"+port+"/" for f in files: openedfile = open(f, "r") @@ -10,6 +16,7 @@ for f in files: dllpattern = re.compile("_install_prefix}/bin/Qt5.*d.dll") libpattern = re.compile("_install_prefix}/lib/Qt5.*d.lib") exepattern = re.compile("_install_prefix}/bin/[a-z]+.exe") + toolexepattern = re.compile("_install_prefix}/tools/qt5/[a-z]+.exe") tooldllpattern = re.compile("_install_prefix}/tools/qt5/Qt5.*d.dll") for line in openedfile: if "_install_prefix}/tools/qt5/${LIB_LOCATION}" in line: @@ -49,9 +56,11 @@ for f in files: elif tooldllpattern.search(line) != None: builder += line.replace("/tools/qt5/", "/debug/bin/") elif exepattern.search(line) != None: - builder += line.replace("/bin/", "/tools/qt5/") + builder += line.replace("/bin/", tooldir) + elif toolexepattern.search(line) != None: + builder += line.replace("/tools/qt5/",tooldir) else: builder += line new_file = open(f, "w") new_file.write(builder) - new_file.close() \ No newline at end of file + new_file.close() diff --git a/ports/qt5-modularscripts/qt_modular_library.cmake b/ports/qt5-modularscripts/qt_modular_library.cmake index 0301bcebc..e733e02a5 100644 --- a/ports/qt5-modularscripts/qt_modular_library.cmake +++ b/ports/qt5-modularscripts/qt_modular_library.cmake @@ -53,7 +53,7 @@ function(qt_modular_library NAME HASH) #Fix the cmake files if they exist if(EXISTS ${RELEASE_DIR}/lib/cmake) vcpkg_execute_required_process( - COMMAND ${PYTHON2} ${_qt5base_port_dir}/fixcmake.py + COMMAND ${PYTHON2} ${_qt5base_port_dir}/fixcmake.py ${PORT} WORKING_DIRECTORY ${RELEASE_DIR}/lib/cmake LOGNAME fix-cmake ) -- cgit v1.2.3 From 86a652c31cba8a70eef41f999e2a6dc1be592303 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Feb 2018 06:22:12 -0800 Subject: [libsodium] Upgrade to 1.0.16 --- ports/libsodium/CONTROL | 2 +- ports/libsodium/portfile.cmake | 58 ++++++++++++++++++++---------------------- 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/ports/libsodium/CONTROL b/ports/libsodium/CONTROL index 4048a6a1f..7546bdd14 100644 --- a/ports/libsodium/CONTROL +++ b/ports/libsodium/CONTROL @@ -1,3 +1,3 @@ Source: libsodium -Version: 1.0.15-1 +Version: 1.0.16 Description: A modern and easy-to-use crypto library diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index 4a2ed3d77..d6da66ab4 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -1,12 +1,10 @@ include(vcpkg_common_functions) -set(LIBSODIUM_VERSION 1.0.15) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jedisct1/libsodium - REF ${LIBSODIUM_VERSION} - SHA512 ec497cb0007597efaeae0aecaa7484d6dcc53367607ec3fd28a98c6209f0cdecd5a6f560c15badd3a69b8da7d63676b11fb395ef4ed4da9b80467dbdc5f65a72 + REF 1.0.16 + SHA512 a9b5c4484f08f3ec1703a6c3af0acfa233214d0d38f32c1fc26305fc01cd2d9c8d469d52d98e6329729c08c15ee0494494037d5ad1472864d3cbdb55a751afec HEAD_REF master ) @@ -17,56 +15,56 @@ vcpkg_apply_patches( ) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - set(LIBSODIUM_RELEASE_CONFIGURATION ReleaseDLL) - set(LIBSODIUM_DEBUG_CONFIGURATION DebugDLL) + set(LIBSODIUM_RELEASE_CONFIGURATION ReleaseDLL) + set(LIBSODIUM_DEBUG_CONFIGURATION DebugDLL) else() - set(LIBSODIUM_RELEASE_CONFIGURATION Release) - set(LIBSODIUM_DEBUG_CONFIGURATION Debug) + set(LIBSODIUM_RELEASE_CONFIGURATION Release) + set(LIBSODIUM_DEBUG_CONFIGURATION Debug) endif() vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj - RELEASE_CONFIGURATION ${LIBSODIUM_RELEASE_CONFIGURATION} - DEBUG_CONFIGURATION ${LIBSODIUM_DEBUG_CONFIGURATION} + PROJECT_PATH ${SOURCE_PATH}/libsodium.vcxproj + RELEASE_CONFIGURATION ${LIBSODIUM_RELEASE_CONFIGURATION} + DEBUG_CONFIGURATION ${LIBSODIUM_DEBUG_CONFIGURATION} ) IF(VCPKG_TARGET_ARCHITECTURE MATCHES "x86") - SET(BUILD_ARCH "Win32") + SET(BUILD_ARCH "Win32") ELSE() - SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) + SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) ENDIF() file(GLOB LIBSODIUM_HEADERS "${SOURCE_PATH}/src/libsodium/include/sodium/*.h") file(INSTALL - ${LIBSODIUM_HEADERS} - DESTINATION ${CURRENT_PACKAGES_DIR}/include/sodium + ${LIBSODIUM_HEADERS} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/sodium ) if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(INSTALL - ${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - ) - file(INSTALL - ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) + file(INSTALL + ${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) endif() file(INSTALL - ${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ${SOURCE_PATH}/Build/${LIBSODIUM_RELEASE_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib ) file(INSTALL - ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ${SOURCE_PATH}/Build/${LIBSODIUM_DEBUG_CONFIGURATION}/${BUILD_ARCH}/libsodium.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) vcpkg_copy_pdbs() file(INSTALL - ${SOURCE_PATH}/LICENSE - DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsodium - RENAME copyright + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsodium + RENAME copyright ) -- cgit v1.2.3 From 2fac08c667b3230bb54b4009d95116f4374f212d Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 22 Feb 2018 23:29:41 +0900 Subject: [halide] Update to release_2018_02_15 Update halide port to halide release_2018_02_15. --- ports/halide/CONTROL | 2 +- ports/halide/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/halide/CONTROL b/ports/halide/CONTROL index 2866357e3..5539ebd32 100644 --- a/ports/halide/CONTROL +++ b/ports/halide/CONTROL @@ -1,3 +1,3 @@ Source: halide -Version: release_2017_10_30 +Version: release_2018_02_15 Description: Halide is a programming language designed to make it easier to write high-performance image processing code on modern machines. diff --git a/ports/halide/portfile.cmake b/ports/halide/portfile.cmake index 184d5114c..169723518 100644 --- a/ports/halide/portfile.cmake +++ b/ports/halide/portfile.cmake @@ -7,16 +7,16 @@ endif() if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(TARGET_ARCHITECTURE 32) - set(FILE_HASH 99e9f05629213f99ba0b2ae088e2356842841604346a2871b05bf933a2a4712528ad1a38861f54478c16b99686ce615f97254b00c09b92b540c7afa1b0b0bb8f) + set(FILE_HASH 4de27307f3355c318f21497a5b8641d215dbfbe2beb55472b9108e96aa9190300a5a8559f0c5e2788b56103f8284807e293ca362dee22adba62ae0f3b021766f) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(TARGET_ARCHITECTURE 64) - set(FILE_HASH aa699684321e779898ff09dc02163347dce355fa5d47fe673191e2323e28cc5b6554dfd51f39cc9c231ba8b07927f36e99b8489e4f7eb871ebaf6e377fc33cfc) + set(FILE_HASH a751c263335cbef725554b9a9b7b71811c0872d97109af5339124cb1db291a6f7e0bfb712f19982829477bf4fa2ad3c70ca5353b73697d1984504257b0894798) else() message(FATAL_ERROR "Error: halide does not support the ${VCPKG_TARGET_ARCHITECTURE} architecture.") endif() -set(COMMIT_HASH 3af238615667312dcb46607752e3ae5d0ec5d713) -set(RELEASE_DATE 2017_10_30) +set(COMMIT_HASH 46d8e9e0cdae456489f1eddfd6d829956fc3c843) +set(RELEASE_DATE 2018_02_15) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/halide-win-${TARGET_ARCHITECTURE}-distro-trunk-${COMMIT_HASH}) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From 05e53332449f5fad3a335e65fc6b848d423f76d1 Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Fri, 23 Feb 2018 00:24:51 +0800 Subject: [x265] Init port --- ports/x265/CONTROL | 3 +++ ports/x265/portfile.cmake | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 ports/x265/CONTROL create mode 100644 ports/x265/portfile.cmake diff --git a/ports/x265/CONTROL b/ports/x265/CONTROL new file mode 100644 index 000000000..c59410bd9 --- /dev/null +++ b/ports/x265/CONTROL @@ -0,0 +1,3 @@ +Source: x265 +Version: 2.7 +Description: x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream. diff --git a/ports/x265/portfile.cmake b/ports/x265/portfile.cmake new file mode 100644 index 000000000..6f4f7cd6d --- /dev/null +++ b/ports/x265/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO multicoreware/x265 + REF 2.7 + SHA512 fd2f43830bbe4fa0ac98ac6d8e3689d0a8a5142da9d67c0dd16fbbde40500c52a370c5c5a30e93195c2e998660a51abab76b09baed87378c9e366cf2f694f2b9 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/source + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# remove duplicated include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/x265) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/x265.exe ${CURRENT_PACKAGES_DIR}/tools/x265/x265.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/x265.exe) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/x265) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/x265) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/x265/COPYING ${CURRENT_PACKAGES_DIR}/share/x265/copyright) \ No newline at end of file -- cgit v1.2.3 From b0f2b75a2b22ae62eb2ad2ebd505d6c33520b448 Mon Sep 17 00:00:00 2001 From: Jim McGrath Date: Thu, 22 Feb 2018 15:19:14 -0600 Subject: use TLS 1.2 for downloads --- scripts/VcpkgPowershellUtils.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index b73361fd1..0cad383d0 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -1,3 +1,4 @@ +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 function vcpkgHasModule([Parameter(Mandatory=$true)][string]$moduleName) { return [bool](Get-Module -ListAvailable -Name $moduleName) -- cgit v1.2.3 From 4a25962307ae3317c94ce1e923ed8aea713931a3 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Feb 2018 17:07:50 -0800 Subject: [vcpkg] Avoid use of atomic copy constructor on older compilers --- toolsrc/src/vcpkg/base/checks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/base/checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp index 1b3ed5ec9..d96cb98ff 100644 --- a/toolsrc/src/vcpkg/base/checks.cpp +++ b/toolsrc/src/vcpkg/base/checks.cpp @@ -10,7 +10,7 @@ namespace vcpkg::Checks { [[noreturn]] static void cleanup_and_exit(const int exit_code) { - static std::atomic have_entered = false; + static std::atomic have_entered{false}; if (have_entered) std::terminate(); have_entered = true; -- cgit v1.2.3 From ce53ea00118154f240e7b5cb1856fd85b45dd216 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 22 Feb 2018 17:56:55 -0800 Subject: TLS fix --- scripts/VcpkgPowershellUtils.ps1 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 0cad383d0..d4296857e 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -1,4 +1,3 @@ -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 function vcpkgHasModule([Parameter(Mandatory=$true)][string]$moduleName) { return [bool](Get-Module -ListAvailable -Name $moduleName) @@ -121,11 +120,26 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, return } + if ($url -match "github") + { + if ([System.Enum]::IsDefined([Net.SecurityProtocolType], "Tls12")) + { + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + } + else + { + Write-Warning "Github has dropped support for TLS versions prior to 1.2, which is not available on your system" + Write-Warning "Please manually download $url to $downloadPath" + throw "Download failed" + } + } + vcpkgCreateParentDirectoryIfNotExists $downloadPath $downloadPartPath = "$downloadPath.part" vcpkgRemoveItem $downloadPartPath + $wc = New-Object System.Net.WebClient if (!$wc.Proxy.IsBypassed($url)) { -- cgit v1.2.3 From e3dda1a82dccb1c74af615572d6c35df9707275f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Feb 2018 07:54:18 -0800 Subject: [azure-storage-cpp][cpp-redis][dirent][doctest][gdcm2][grpc][llvm][matio][spdlog][yaml-cpp] Upgrades --- ports/azure-storage-cpp/CONTROL | 2 +- ports/azure-storage-cpp/portfile.cmake | 4 ++-- ports/cpp-redis/CONTROL | 2 +- ports/cpp-redis/fix-cmakelists.patch | 29 ----------------------------- ports/cpp-redis/fix-export.patch | 22 ---------------------- ports/cpp-redis/portfile.cmake | 28 ++++++++++++++-------------- ports/dirent/CONTROL | 2 +- ports/dirent/portfile.cmake | 4 ++-- ports/doctest/CONTROL | 2 +- ports/doctest/portfile.cmake | 4 ++-- ports/gdcm2/CONTROL | 2 +- ports/gdcm2/portfile.cmake | 4 ++-- ports/grpc/CONTROL | 2 +- ports/grpc/portfile.cmake | 4 ++-- ports/llvm/portfile.cmake | 2 ++ ports/matio/CONTROL | 2 +- ports/matio/portfile.cmake | 4 ++-- ports/spdlog/CONTROL | 2 +- ports/spdlog/portfile.cmake | 4 ++-- ports/yaml-cpp/CONTROL | 2 +- ports/yaml-cpp/portfile.cmake | 5 +++-- 21 files changed, 42 insertions(+), 90 deletions(-) delete mode 100644 ports/cpp-redis/fix-cmakelists.patch delete mode 100644 ports/cpp-redis/fix-export.patch diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index bf4e9f9f2..4f80cfd7d 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp -Version: 3.0.0-4 +Version: 3.1.0 Build-Depends: cpprestsdk, atlmfc 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. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index 32f05221d..f98021ff8 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -7,8 +7,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-storage-cpp - REF v3.0.0 - SHA512 45d0d7f8cc350a16cff0371cdd442e851912c89061acfec559482e8f79cebafffd8681b32a30b878e329235cd3aaad5d2ff797d1148302e3109cf5111df14b97 + REF v3.1.0 + SHA512 ebd6f8aab33046942d641bd42b126dae94c49c08963b96b0141cd6827cb865c95f05f4c7a4df9ce8c62b4ec39092c0538a8c274a0a7219c74656ad111b15bfb8 HEAD_REF master ) diff --git a/ports/cpp-redis/CONTROL b/ports/cpp-redis/CONTROL index 53ed862c2..5f001f04d 100644 --- a/ports/cpp-redis/CONTROL +++ b/ports/cpp-redis/CONTROL @@ -1,4 +1,4 @@ Source: cpp-redis -Version: 4.3.0 +Version: 4.3.1 Build-Depends: tacopie Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining. diff --git a/ports/cpp-redis/fix-cmakelists.patch b/ports/cpp-redis/fix-cmakelists.patch deleted file mode 100644 index 2839ce56f..000000000 --- a/ports/cpp-redis/fix-cmakelists.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ae20868..01bb84c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -26,6 +26,7 @@ - cmake_minimum_required(VERSION 2.8.7) - set(CMAKE_MACOSX_RPATH 1) - include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) -+include(${CMAKE_ROOT}/Modules/GenerateExportHeader.cmake) - - - ### -@@ -170,6 +171,8 @@ if(USE_CUSTOM_TCP_CLIENT) - set_target_properties(${PROJECT} PROPERTIES COMPILE_DEFINITIONS "__CPP_REDIS_USE_CUSTOM_TCP_CLIENT=${USE_CUSTOM_TCP_CLIENT}") - endif(USE_CUSTOM_TCP_CLIENT) - -+generate_export_header(${PROJECT} EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/cpp_redis/misc/${PROJECT}_export.hpp) -+target_include_directories(${PROJECT} PUBLIC ${CMAKE_BINARY_DIR}) - - ### - # install -@@ -181,6 +184,7 @@ install(DIRECTORY DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - install(DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} DESTINATION lib USE_SOURCE_PERMISSIONS) - install(DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DESTINATION bin USE_SOURCE_PERMISSIONS) - install(DIRECTORY ${CPP_REDIS_INCLUDES}/ DESTINATION include USE_SOURCE_PERMISSIONS) -+install (FILES ${CMAKE_BINARY_DIR}/cpp_redis/misc/${PROJECT}_export.hpp DESTINATION include/cpp_redis/misc) - - - ### diff --git a/ports/cpp-redis/fix-export.patch b/ports/cpp-redis/fix-export.patch deleted file mode 100644 index 1b071c511..000000000 --- a/ports/cpp-redis/fix-export.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/includes/cpp_redis/misc/logger.hpp b/includes/cpp_redis/misc/logger.hpp -index d79a98f..bfb33b9 100644 ---- a/includes/cpp_redis/misc/logger.hpp -+++ b/includes/cpp_redis/misc/logger.hpp -@@ -26,6 +26,8 @@ - #include - #include - -+#include -+ - namespace cpp_redis { - - //! -@@ -161,7 +163,7 @@ private: - //! variable containing the current logger - //! by default, not set (no logs) - //! --extern std::unique_ptr active_logger; -+extern CPP_REDIS_EXPORT std::unique_ptr active_logger; - - //! - //! debug logging diff --git a/ports/cpp-redis/portfile.cmake b/ports/cpp-redis/portfile.cmake index ea0ea1194..9187e344f 100644 --- a/ports/cpp-redis/portfile.cmake +++ b/ports/cpp-redis/portfile.cmake @@ -3,21 +3,14 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Cylix/cpp_redis - REF 4.3.0 - SHA512 d4a2865b72b4dfa80b6d3c004245014a77e74d4a3d254d6b0a9d50e890a22dc3d9ce54688a8c9185ecee9bbf8cdf76046a9788c70887ccf8a08d5cdcef298b46 + REF 4.3.1 + SHA512 abf372542c53f37f504b3211b840b100d07a8f4b2e7f5584cc7550ab16ed617838e2df79064374c7a409458d8567f4834686318ea3a40249c767e36c744c7a47 HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-export.patch -) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/tacopie/CMakeLists.txt DESTINATION ${SOURCE_PATH}/tacopie) -if(VCPKG_CRT_LINKAGE STREQUAL dynamic) +if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") set(MSVC_RUNTIME_LIBRARY_CONFIG "/MD") else() set(MSVC_RUNTIME_LIBRARY_CONFIG "/MT") @@ -43,16 +36,23 @@ file(GLOB_RECURSE FILES "${CURRENT_PACKAGES_DIR}/include/*") foreach(file ${FILES}) file(READ ${file} _contents) string(REPLACE "ifndef __CPP_REDIS_USE_CUSTOM_TCP_CLIENT" "if 1" _contents "${_contents}") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE + "extern std::unique_ptr active_logger;" + "extern __declspec(dllimport) std::unique_ptr active_logger;" + _contents "${_contents}") + endif() file(WRITE ${file} "${_contents}") endforeach() -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/lib ${CURRENT_PACKAGES_DIR}/debug/bin/bin DESTINATION ${CURRENT_PACKAGES_DIR}/debug) -file(COPY ${CURRENT_PACKAGES_DIR}/lib/lib ${CURRENT_PACKAGES_DIR}/bin/bin DESTINATION ${CURRENT_PACKAGES_DIR}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/lib ${CURRENT_PACKAGES_DIR}/debug/bin/bin ${CURRENT_PACKAGES_DIR}/lib/lib ${CURRENT_PACKAGES_DIR}/bin/bin) +file(GLOB FILES_TO_REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/cpp_redis.ilk" "${CURRENT_PACKAGES_DIR}/bin/cpp_redis.dll.manifest") +if(FILES_TO_REMOVE) + file(REMOVE_RECURSE ${FILES_TO_REMOVE}) +endif() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpp-redis RENAME copyright) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() diff --git a/ports/dirent/CONTROL b/ports/dirent/CONTROL index 50f6d7ede..96aab8334 100644 --- a/ports/dirent/CONTROL +++ b/ports/dirent/CONTROL @@ -1,3 +1,3 @@ Source: dirent -Version: 2017-06-23-5c7194c2fe2c68c1a8212712c0b4b6195382d27d +Version: 1.23.1 Description: Dirent is a C/C++ programming interface that allows programmers to retrieve information about files and directories under Linux/UNIX. This project provides Linux compatible Dirent interface for Microsoft Windows. diff --git a/ports/dirent/portfile.cmake b/ports/dirent/portfile.cmake index 9476a8dcd..c9645948e 100644 --- a/ports/dirent/portfile.cmake +++ b/ports/dirent/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tronkko/dirent - REF 8b1db5092479a73d47eafd3de739b27e876e6bf3 - SHA512 f529aa65c2a4b8249c1291f3bccad25fa3a9c2146a2c74abc0a4710f68e2bd6f73cd52682bb406fbcab71d6a5225a354f9e8bdc22ce63b7a4e64bb65bab34b9f + REF 1.23.1 + SHA512 13c59f0d225ccc09a2b92a29b41b6644dabdb0b39df7bb528d5ac60dbe71a2770eaa37d3890e0df21065bc798e9cc018e174d34c6697da7da665caafe062bbc2 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/doctest/CONTROL b/ports/doctest/CONTROL index 872c47475..ee03969dc 100644 --- a/ports/doctest/CONTROL +++ b/ports/doctest/CONTROL @@ -1,3 +1,3 @@ Source: doctest -Version: 1.2.6 +Version: 1.2.7 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 eef9b4ca1..e70d58d3d 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 1.2.6 - SHA512 bee59e9e18a474b9a7883e0c506a1133fdd382d3ecbe010c0402399d6c48572508bfa347a2196908d846e345508c564f758b17c268a19b65968f5c2ff87b25a4 + REF 1.2.7 + SHA512 aa6671eb0ac0a7336ad81dea4d696ce61849ab7eb97d6f0f549446b2ac7538a8cdb0a87b8500b3af41cd3f10672ae13591633b368cbcb901f361f7715f22e4e9 HEAD_REF master ) diff --git a/ports/gdcm2/CONTROL b/ports/gdcm2/CONTROL index eacb3a839..073e6cbeb 100644 --- a/ports/gdcm2/CONTROL +++ b/ports/gdcm2/CONTROL @@ -1,4 +1,4 @@ Source: gdcm2 -Version: 2.8.3 +Version: 2.8.4 Description: Grassroots DICOM library Build-Depends: zlib, expat diff --git a/ports/gdcm2/portfile.cmake b/ports/gdcm2/portfile.cmake index 7f7ba930b..bb0782ba4 100644 --- a/ports/gdcm2/portfile.cmake +++ b/ports/gdcm2/portfile.cmake @@ -14,8 +14,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO malaterre/GDCM - REF v2.8.3 - SHA512 f8c3d600f067c9b60a32ff5fb7e751c06088e1e4a8e8d0f5e25d9fc7d49e8fab1f0242b10433f522d2043777cddace78c5a9c2cb25bac75a8e84fee554370f62 + REF v2.8.4 + SHA512 d58854507bcc477bcf7944c82014ceac4c603bf8f0e75ddda2371052f4972f1535cb782b47d0822a8929131b804ea5c16b9236b414d70cbf96a494741391c534 ) vcpkg_apply_patches( diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 83a44f869..3a0cb1f9b 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.8.3 +Version: 1.9.1 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 4d9b692ab..73f3f2931 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF v1.8.3 - SHA512 9bf308252221488840fad7669b8f10143c6e2130585b350b31b8d9f362f55cb1d16e5ee79d9d02ce13521e9471a8d55e8fd6c1ae0b710e22e3f918fb9fdc4d40 + REF v1.9.1 + SHA512 2043b76f76680df9759d1eef9d524af2b5f82237cd08428a7aa87cadae516052b37dee470a0850e6d63f685e95f0593900d640f7e4f2fa9de9e8c2b760a82191 HEAD_REF master ) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 60580947e..8f981873a 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -1,3 +1,5 @@ +message(FATAL_ERROR "temporarily disabled") + # LLVM documentation recommends always using static library linkage when # building with Microsoft toolchain; it's also the default on other platforms set(VCPKG_LIBRARY_LINKAGE static) diff --git a/ports/matio/CONTROL b/ports/matio/CONTROL index 7912440e3..e3d0082f7 100644 --- a/ports/matio/CONTROL +++ b/ports/matio/CONTROL @@ -1,4 +1,4 @@ Source: matio -Version: 1.5.10-2 +Version: 1.5.11 Description: MATLAB MAT File I/O Library Build-Depends: zlib, hdf5 diff --git a/ports/matio/portfile.cmake b/ports/matio/portfile.cmake index 2878bdbfb..5752e635c 100644 --- a/ports/matio/portfile.cmake +++ b/ports/matio/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tbeu/matio - REF v1.5.10 - SHA512 c06ff6b3d17a136be20cebca4e1a4bb87eea98e35d979713e73f855487dee568895245528b1b8e55caf02f88aff1b742daf75f590e2d3b08158d0ad73e377243 + REF v1.5.11 + SHA512 f500475e80cdb52a4754c49e900a34c0b540a5c64f353287e6b85b0c16156b251fe8088f2ed584af5a4d0916e98fddf73a3799e7c045ab859298687038e6d513 HEAD_REF master ) diff --git a/ports/spdlog/CONTROL b/ports/spdlog/CONTROL index ac0b51be7..1bb6b3ebf 100644 --- a/ports/spdlog/CONTROL +++ b/ports/spdlog/CONTROL @@ -1,4 +1,4 @@ Source: spdlog -Version: 0.14.0-1 +Version: 0.16.3 Description: Very fast, header only, C++ logging library Build-Depends: fmt diff --git a/ports/spdlog/portfile.cmake b/ports/spdlog/portfile.cmake index 8cd05f343..a7d13527e 100644 --- a/ports/spdlog/portfile.cmake +++ b/ports/spdlog/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gabime/spdlog - REF v0.14.0 - SHA512 f49b7f26f4fde57fe16f32ab89082f0c590645c627f5b4646f633a16f3eec2926b3465e742bc4899cb802e7b974978c547638205065e9955ed9696fbcaf0b444 + REF v0.16.3 + SHA512 6e08473825cf97dfb10b0e919b77996c1023bbfb583d851e961ec4a95094e4afffd1fc6f6e7e728ce8c2c69c9fb280c59f8d6494b50224bdf8cc68914ffd21e8 HEAD_REF master ) diff --git a/ports/yaml-cpp/CONTROL b/ports/yaml-cpp/CONTROL index 0a9823da9..57673babc 100644 --- a/ports/yaml-cpp/CONTROL +++ b/ports/yaml-cpp/CONTROL @@ -1,3 +1,3 @@ Source: yaml-cpp -Version: 0.5.4-rc-2 +Version: 0.6.1 Description: yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec. diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake index 82a0b3897..574f309d9 100644 --- a/ports/yaml-cpp/portfile.cmake +++ b/ports/yaml-cpp/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jbeder/yaml-cpp - REF 380ecb404ef99ba132154ed43dd2b84136b30b14 - SHA512 30d344d271d15163be755c998b28750857355f26a3fdbaf620932b60e419a7f72884bc7fd65bf3076f4e5315e0f82aab6011406a8146e2c01ba3fc267723d5bc + REF yaml-cpp-0.6.1 + SHA512 606482d1d38c6747e22604a24c119adb4b70287da7deadb94cc20d70df47122f1714ec9bfc8f566ecf075b94d48771df17430c50039cb984bdf1980f3b445791 HEAD_REF master ) @@ -12,6 +12,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DYAML_CPP_BUILD_TOOLS=OFF + -DYAML_CPP_BUILD_TESTS=OFF ) vcpkg_install_cmake() -- cgit v1.2.3 From 43172e23188cc8014ac1b73bca8b24f664ff3324 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 03:27:49 -0800 Subject: [rocksdb] Update --- ports/rocksdb/0001-third-party.patch | 76 ++++++++++++++++++ ports/rocksdb/0002-disable-gtest.patch | 25 ++++++ ports/rocksdb/0003-only-build-one-flavor.patch | 48 ++++++++++++ ports/rocksdb/CONTROL | 2 +- .../fix-building-both-static-and-shared.patch | 91 ---------------------- ports/rocksdb/fix-third-party-deps.patch | 64 --------------- ports/rocksdb/portfile.cmake | 33 +++++--- 7 files changed, 172 insertions(+), 167 deletions(-) create mode 100644 ports/rocksdb/0001-third-party.patch create mode 100644 ports/rocksdb/0002-disable-gtest.patch create mode 100644 ports/rocksdb/0003-only-build-one-flavor.patch delete mode 100644 ports/rocksdb/fix-building-both-static-and-shared.patch delete mode 100644 ports/rocksdb/fix-third-party-deps.patch diff --git a/ports/rocksdb/0001-third-party.patch b/ports/rocksdb/0001-third-party.patch new file mode 100644 index 000000000..c28181623 --- /dev/null +++ b/ports/rocksdb/0001-third-party.patch @@ -0,0 +1,76 @@ +From 533ab1b3f3f4286aa756e965e22aa88612479e01 Mon Sep 17 00:00:00 2001 +From: Robert Schumacher +Date: Fri, 23 Feb 2018 01:44:44 -0800 +Subject: [PATCH 1/3] third-party + +--- + thirdparty.inc | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +diff --git a/thirdparty.inc b/thirdparty.inc +index a364d1d..1d85d50 100644 +--- a/thirdparty.inc ++++ b/thirdparty.inc +@@ -19,10 +19,10 @@ set (THIRDPARTY_LIBS "") # Initialization, don't touch + # + # Edit these 4 lines to define paths to GFLAGS + # +-set(GFLAGS_HOME $ENV{THIRDPARTY_HOME}/Gflags.Library) +-set(GFLAGS_INCLUDE ${GFLAGS_HOME}/inc/include) +-set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/bin/debug/amd64/gflags.lib) +-set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/bin/retail/amd64/gflags.lib) ++set(GFLAGS_HOME ${CURRENT_INSTALLED_DIR}) ++set(GFLAGS_INCLUDE ${GFLAGS_HOME}/include) ++find_library(GFLAGS_LIB_DEBUG NAMES gflags gflags_static) ++set(GFLAGS_LIB_RELEASE ${GFLAGS_LIB_DEBUG}) + + # ================================================== GFLAGS ================================================== + # +@@ -63,10 +63,10 @@ endif () + # + # Edit these 4 lines to define paths to Snappy + # +-set(SNAPPY_HOME $ENV{THIRDPARTY_HOME}/Snappy.Library) +-set(SNAPPY_INCLUDE ${SNAPPY_HOME}/inc/inc) +-set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/bin/debug/amd64/snappy.lib) +-set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/bin/retail/amd64/snappy.lib) ++set(SNAPPY_HOME ${CURRENT_INSTALLED_DIR}) ++set(SNAPPY_INCLUDE ${SNAPPY_HOME}/include) ++set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/debug/lib/snappy.lib) ++set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/lib/snappy.lib) + + # + # Don't touch these lines +@@ -106,10 +106,10 @@ endif () + # + # Edit these 4 lines to define paths to LZ4 + # +-set(LZ4_HOME $ENV{THIRDPARTY_HOME}/LZ4.Library) +-set(LZ4_INCLUDE ${LZ4_HOME}/inc/include) +-set(LZ4_LIB_DEBUG ${LZ4_HOME}/bin/debug/amd64/lz4.lib) +-set(LZ4_LIB_RELEASE ${LZ4_HOME}/bin/retail/amd64/lz4.lib) ++set(LZ4_HOME ${CURRENT_INSTALLED_DIR}) ++set(LZ4_INCLUDE ${LZ4_HOME}/include) ++set(LZ4_LIB_DEBUG ${LZ4_HOME}/debug/lib/lz4.lib) ++set(LZ4_LIB_RELEASE ${LZ4_HOME}/lib/lz4.lib) + + # + # Don't touch these lines +@@ -149,10 +149,10 @@ endif () + # + # Edit these 4 lines to define paths to ZLIB + # +-set(ZLIB_HOME $ENV{THIRDPARTY_HOME}/ZLIB.Library) +-set(ZLIB_INCLUDE ${ZLIB_HOME}/inc/include) +-set(ZLIB_LIB_DEBUG ${ZLIB_HOME}/bin/debug/amd64/zlib.lib) +-set(ZLIB_LIB_RELEASE ${ZLIB_HOME}/bin/retail/amd64/zlib.lib) ++set(ZLIB_HOME ${CURRENT_INSTALLED_DIR}) ++set(ZLIB_INCLUDE ${ZLIB_HOME}/include) ++set(ZLIB_LIB_DEBUG ${ZLIB_HOME}/debug/lib/zlibd.lib) ++set(ZLIB_LIB_RELEASE ${ZLIB_HOME}/lib/zlib.lib) + + # + # Don't touch these lines +-- +2.16.2.windows.1 + diff --git a/ports/rocksdb/0002-disable-gtest.patch b/ports/rocksdb/0002-disable-gtest.patch new file mode 100644 index 000000000..8d42bbaf1 --- /dev/null +++ b/ports/rocksdb/0002-disable-gtest.patch @@ -0,0 +1,25 @@ +From f1ecf23b8a10ab5a917da4a39fba343a00cab1a9 Mon Sep 17 00:00:00 2001 +From: Robert Schumacher +Date: Fri, 23 Feb 2018 01:44:57 -0800 +Subject: [PATCH 2/3] disable gtest + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5fb551a..faffc91 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -393,7 +393,7 @@ include_directories(${PROJECT_SOURCE_DIR}/include) + include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src) + find_package(Threads REQUIRED) + +-add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) ++#add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) + + # Main library source code + +-- +2.16.2.windows.1 + diff --git a/ports/rocksdb/0003-only-build-one-flavor.patch b/ports/rocksdb/0003-only-build-one-flavor.patch new file mode 100644 index 000000000..d9b4cf6e5 --- /dev/null +++ b/ports/rocksdb/0003-only-build-one-flavor.patch @@ -0,0 +1,48 @@ +From f77366e2bf8c136990b89ab235af8e0cf0e566f4 Mon Sep 17 00:00:00 2001 +From: Robert Schumacher +Date: Fri, 23 Feb 2018 01:45:18 -0800 +Subject: [PATCH 3/3] only build one flavor + +--- + CMakeLists.txt | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index faffc91..89dc537 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -723,6 +723,7 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) + + install(DIRECTORY include/rocksdb COMPONENT devel DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + ++ if(NOT ROCKSDB_DISABLE_INSTALL_STATIC_LIB) + install( + TARGETS ${ROCKSDB_STATIC_LIB} + EXPORT RocksDBTargets +@@ -730,15 +731,23 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) ++ else() ++ set_target_properties(${ROCKSDB_STATIC_LIB} PROPERTIES EXCLUDE_FROM_ALL TRUE) ++ endif() + ++ if(NOT ROCKSDB_DISABLE_INSTALL_SHARED_LIB) + install( + TARGETS ${ROCKSDB_SHARED_LIB} + EXPORT RocksDBTargets + COMPONENT runtime + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) ++ else() ++ set_target_properties(${ROCKSDB_SHARED_LIB} PROPERTIES EXCLUDE_FROM_ALL TRUE) ++ endif() + + install( + EXPORT RocksDBTargets +-- +2.16.2.windows.1 + diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 59850ff03..d9e8585f2 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,4 @@ Source: rocksdb -Version: 2017-06-28-18c63af6ef2b9f014c404b88488ae52e6fead03c-1 +Version: 5.10.3 Description: A library that provides an embeddable, persistent key-value store for fast storage Build-Depends: snappy, lz4, gflags, zlib, gtest diff --git a/ports/rocksdb/fix-building-both-static-and-shared.patch b/ports/rocksdb/fix-building-both-static-and-shared.patch deleted file mode 100644 index c9742450b..000000000 --- a/ports/rocksdb/fix-building-both-static-and-shared.patch +++ /dev/null @@ -1,91 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cbbde8e..cb19649 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -315,10 +315,13 @@ endif() - - include_directories(${PROJECT_SOURCE_DIR}) - include_directories(${PROJECT_SOURCE_DIR}/include) --include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src) -+ - find_package(Threads REQUIRED) - --add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) -+if(BUILD_TEST) -+ include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src) -+ add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest) -+endif() - - # Main library source code - -@@ -574,22 +577,28 @@ if(WITH_LIBRADOS) - list(APPEND THIRDPARTY_LIBS rados) - endif() - --add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES}) --target_link_libraries(${ROCKSDB_STATIC_LIB} -+if(NOT BUILD_SHARED_LIBS) -+ add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES}) -+ target_link_libraries(${ROCKSDB_STATIC_LIB} - ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) -- --if(WIN32) -- add_library(${ROCKSDB_IMPORT_LIB} SHARED ${SOURCES}) -- target_link_libraries(${ROCKSDB_IMPORT_LIB} -- ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) -- set_target_properties(${ROCKSDB_IMPORT_LIB} PROPERTIES -- COMPILE_DEFINITIONS "ROCKSDB_DLL;ROCKSDB_LIBRARY_EXPORTS") - if(MSVC) - set_target_properties(${ROCKSDB_STATIC_LIB} PROPERTIES -- COMPILE_FLAGS "/Fd${CMAKE_CFG_INTDIR}/${ROCKSDB_STATIC_LIB}.pdb") -+ COMPILE_FLAGS "/Fd${CMAKE_CFG_INTDIR}/${ROCKSDB_STATIC_LIB}.pdb") -+ endif() -+ set(INSTALL_TARGETS ${INSTALL_TARGETS} ${ROCKSDB_STATIC_LIB}) -+else() -+ if(WIN32) -+ add_library(${ROCKSDB_IMPORT_LIB} SHARED ${SOURCES}) -+ target_link_libraries(${ROCKSDB_IMPORT_LIB} -+ ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) - set_target_properties(${ROCKSDB_IMPORT_LIB} PROPERTIES -+ COMPILE_DEFINITIONS "ROCKSDB_DLL;ROCKSDB_LIBRARY_EXPORTS") -+ if(MSVC) -+ set_target_properties(${ROCKSDB_IMPORT_LIB} PROPERTIES - COMPILE_FLAGS "/Fd${CMAKE_CFG_INTDIR}/${ROCKSDB_IMPORT_LIB}.pdb") -+ endif() - endif() -+ set(INSTALL_TARGETS ${INSTALL_TARGETS} ${ROCKSDB_IMPORT_LIB}) - endif() - - option(WITH_JNI "build with JNI" OFF) -@@ -600,6 +609,7 @@ else() - message(STATUS "JNI library is disabled") - endif() - -+if(BUILD_TEST) - set(TESTS - cache/cache_test.cc - cache/lru_cache_test.cc -@@ -810,6 +820,7 @@ foreach(sourcefile ${C_TEST_EXES}) - add_dependencies(check ${exename}${ARTIFACT_SUFFIX}) - endforeach(sourcefile ${C_TEST_EXES}) - add_subdirectory(tools) -+endif() - - # Installation and packaging for Linux - if(NOT WIN32) -@@ -819,4 +830,15 @@ install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/rocksdb/" - COMPONENT devel - DESTINATION include/rocksdb) - set(CMAKE_INSTALL_PREFIX /usr) -+else() -+ install( -+ TARGETS ${INSTALL_TARGETS} -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib -+ ) -+endif() -+ -+if(NOT DISABLE_INSTALL_HEADERS) -+ install(DIRECTORY "include/rocksdb/" DESTINATION include/rocksdb) - endif() diff --git a/ports/rocksdb/fix-third-party-deps.patch b/ports/rocksdb/fix-third-party-deps.patch deleted file mode 100644 index 7f832d158..000000000 --- a/ports/rocksdb/fix-third-party-deps.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/thirdparty.inc b/thirdparty.inc -index 9fffd9b..2e1ea9d 100644 ---- a/thirdparty.inc -+++ b/thirdparty.inc -@@ -21,10 +21,10 @@ set (THIRDPARTY_LIBS "") # Initialization, don't touch - # - # Edit these 4 lines to define paths to GFLAGS - # --set(GFLAGS_HOME $ENV{THIRDPARTY_HOME}/Gflags.Library) --set(GFLAGS_INCLUDE ${GFLAGS_HOME}/inc/include) --set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/bin/debug/amd64/gflags.lib) --set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/bin/retail/amd64/gflags.lib) -+set(GFLAGS_HOME ${CURRENT_INSTALLED_DIR}) -+set(GFLAGS_INCLUDE ${GFLAGS_HOME}/include) -+set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/debug/lib/gflags.lib) -+set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/lib/gflags.lib) - - # ================================================== GFLAGS ================================================== - # -@@ -65,10 +65,10 @@ endif () - # - # Edit these 4 lines to define paths to Snappy - # --set(SNAPPY_HOME $ENV{THIRDPARTY_HOME}/Snappy.Library) --set(SNAPPY_INCLUDE ${SNAPPY_HOME}/inc/inc) --set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/bin/debug/amd64/snappy.lib) --set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/bin/retail/amd64/snappy.lib) -+set(SNAPPY_HOME ${CURRENT_INSTALLED_DIR}) -+set(SNAPPY_INCLUDE ${SNAPPY_HOME}/include) -+set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/debug/lib/snappy.lib) -+set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/lib/snappy.lib) - - # - # Don't touch these lines -@@ -108,10 +108,10 @@ endif () - # - # Edit these 4 lines to define paths to LZ4 - # --set(LZ4_HOME $ENV{THIRDPARTY_HOME}/LZ4.Library) --set(LZ4_INCLUDE ${LZ4_HOME}/inc/include) --set(LZ4_LIB_DEBUG ${LZ4_HOME}/bin/debug/amd64/lz4.lib) --set(LZ4_LIB_RELEASE ${LZ4_HOME}/bin/retail/amd64/lz4.lib) -+set(LZ4_HOME ${CURRENT_INSTALLED_DIR}) -+set(LZ4_INCLUDE ${LZ4_HOME}/include) -+set(LZ4_LIB_DEBUG ${LZ4_HOME}/debug/lib/lz4.lib) -+set(LZ4_LIB_RELEASE ${LZ4_HOME}/lib/lz4.lib) - - # - # Don't touch these lines -@@ -151,10 +151,10 @@ endif () - # - # Edit these 4 lines to define paths to ZLIB - # --set(ZLIB_HOME $ENV{THIRDPARTY_HOME}/ZLIB.Library) --set(ZLIB_INCLUDE ${ZLIB_HOME}/inc/include) --set(ZLIB_LIB_DEBUG ${ZLIB_HOME}/bin/debug/amd64/zlib.lib) --set(ZLIB_LIB_RELEASE ${ZLIB_HOME}/bin/retail/amd64/zlib.lib) -+set(ZLIB_HOME ${CURRENT_INSTALLED_DIR}) -+set(ZLIB_INCLUDE ${ZLIB_HOME}/include) -+set(ZLIB_LIB_DEBUG ${ZLIB_HOME}/debug/lib/zlibd.lib) -+set(ZLIB_LIB_RELEASE ${ZLIB_HOME}/lib/zlib.lib) - - # - # Don't touch these lines diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index a12ba4ca5..1eb0c1165 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -9,25 +9,28 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/rocksdb - REF 18c63af6ef2b9f014c404b88488ae52e6fead03c - SHA512 8dd4d27768feba6d9ddb61debe6cae21fa6d25c27dc347cba3b28cc39d2c1fa860dba7c8adedba4b40883eccccca190b60941cf958855c6b70ec5a3b96c20ac5 + REF rocksdb-5.10.3 + SHA512 2443e993271e0fbcbb3bfedba72cb9ecf109705f8cd0d7184abe10784646c3111e06ed2bd8456a2773990e5670151a623094632b33c9e36380ba6ad003977044 HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/fix-building-both-static-and-shared.patch" - "${CMAKE_CURRENT_LIST_DIR}/fix-third-party-deps.patch" + "${CMAKE_CURRENT_LIST_DIR}/0001-third-party.patch" + "${CMAKE_CURRENT_LIST_DIR}/0002-disable-gtest.patch" + "${CMAKE_CURRENT_LIST_DIR}/0003-only-build-one-flavor.patch" ) - -if(VCPKG_CRT_LINKAGE STREQUAL static) +if(VCPKG_CRT_LINKAGE STREQUAL "static") set(WITH_MD_LIBRARY OFF) else() set(WITH_MD_LIBRARY ON) endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ROCKSDB_DISABLE_INSTALL_SHARED_LIB) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ROCKSDB_DISABLE_INSTALL_STATIC_LIB) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -37,15 +40,23 @@ vcpkg_configure_cmake( -DSNAPPY=1 -DLZ4=1 -DZLIB=1 - -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} + -DWITH_TESTS=OFF + -DROCKSDB_INSTALL_ON_WINDOWS=ON -DFAIL_ON_WARNINGS=OFF -DWITH_MD_LIBRARY=${WITH_MD_LIBRARY} - OPTIONS_DEBUG - -DDISABLE_INSTALL_HEADERS=ON + -DROCKSDB_DISABLE_INSTALL_SHARED_LIB=${ROCKSDB_DISABLE_INSTALL_SHARED_LIB} + -DROCKSDB_DISABLE_INSTALL_STATIC_LIB=${ROCKSDB_DISABLE_INSTALL_STATIC_LIB} + -DROCKSDB_VERSION=5.10.3 + -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} ) -vcpkg_install_cmake(DISABLE_PARALLEL) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/rocksdb) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.Apache DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.leveldb DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb) vcpkg_copy_pdbs() -- cgit v1.2.3 From cd6aa2a5ab579d8cfec7d503fc555714508ff248 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 03:36:35 -0800 Subject: [wt] Upgrade --- ports/wt/0001-boost-1.66.patch | 370 +++++++++++++++++++++++ ports/wt/0002-link-glew.patch | 23 ++ ports/wt/0003-disable-boost-autolink.patch | 22 ++ ports/wt/CONTROL | 4 +- ports/wt/add-disable-boost-autolink-option.patch | 26 -- ports/wt/boost-1.66.patch | 123 -------- ports/wt/guard-NO_ERROR.patch | 19 -- ports/wt/portfile.cmake | 17 +- 8 files changed, 427 insertions(+), 177 deletions(-) create mode 100644 ports/wt/0001-boost-1.66.patch create mode 100644 ports/wt/0002-link-glew.patch create mode 100644 ports/wt/0003-disable-boost-autolink.patch delete mode 100644 ports/wt/add-disable-boost-autolink-option.patch delete mode 100644 ports/wt/boost-1.66.patch delete mode 100644 ports/wt/guard-NO_ERROR.patch diff --git a/ports/wt/0001-boost-1.66.patch b/ports/wt/0001-boost-1.66.patch new file mode 100644 index 000000000..b11ffdb05 --- /dev/null +++ b/ports/wt/0001-boost-1.66.patch @@ -0,0 +1,370 @@ +From a0fd67d85947c835cd55078edacf3c2ac84ca53f Mon Sep 17 00:00:00 2001 +From: Robert Schumacher +Date: Fri, 23 Feb 2018 03:12:00 -0800 +Subject: [PATCH 1/3] boost 1.66 + + +diff --git a/src/Wt/Http/Client.C b/src/Wt/Http/Client.C +index 85230d1..a2c893e 100644 +--- a/src/Wt/Http/Client.C ++++ b/src/Wt/Http/Client.C +@@ -642,7 +642,7 @@ private: + + protected: + asio::io_service& ioService_; +- asio::strand strand_; ++ asio::io_context::strand strand_; + tcp::resolver resolver_; + asio::streambuf requestBuf_; + asio::streambuf responseBuf_; +diff --git a/src/Wt/Http/Client.h b/src/Wt/Http/Client.h +index f3c7169..0f638e8 100644 +--- a/src/Wt/Http/Client.h ++++ b/src/Wt/Http/Client.h +@@ -21,11 +21,7 @@ + #include + + #ifdef WT_ASIO_IS_BOOST_ASIO +-namespace boost { +- namespace asio { +- class io_service; +- } +-} ++#include + #else // WT_ASIO_IS_STANDALONE_ASIO + namespace asio { + class io_service; +diff --git a/src/http/Connection.C b/src/http/Connection.C +index cab7708..cca4e0a 100644 +--- a/src/http/Connection.C ++++ b/src/http/Connection.C +@@ -78,7 +78,7 @@ void Connection::scheduleStop() + + void Connection::start() + { +- LOG_DEBUG(socket().native() << ": start()"); ++ LOG_DEBUG(socket().native_handle() << ": start()"); + + request_parser_.reset(); + request_.reset(); +@@ -106,7 +106,7 @@ void Connection::stop() + void Connection::setReadTimeout(int seconds) + { + if (seconds != 0) { +- LOG_DEBUG(socket().native() << " setting read timeout (ws: " ++ LOG_DEBUG(socket().native_handle() << " setting read timeout (ws: " + << request_.webSocketVersion << ")"); + state_ |= Reading; + +@@ -118,7 +118,7 @@ void Connection::setReadTimeout(int seconds) + + void Connection::setWriteTimeout(int seconds) + { +- LOG_DEBUG(socket().native() << " setting write timeout (ws: " ++ LOG_DEBUG(socket().native_handle() << " setting write timeout (ws: " + << request_.webSocketVersion << ")"); + state_ |= Writing; + +@@ -129,7 +129,7 @@ void Connection::setWriteTimeout(int seconds) + + void Connection::cancelReadTimer() + { +- LOG_DEBUG(socket().native() << " cancel read timeout"); ++ LOG_DEBUG(socket().native_handle() << " cancel read timeout"); + state_.clear(Reading); + + readTimer_.cancel(); +@@ -137,7 +137,7 @@ void Connection::cancelReadTimer() + + void Connection::cancelWriteTimer() + { +- LOG_DEBUG(socket().native() << " cancel write timeout"); ++ LOG_DEBUG(socket().native_handle() << " cancel write timeout"); + state_.clear(Writing); + + writeTimer_.cancel(); +@@ -163,7 +163,7 @@ void Connection::handleReadRequest0() + + #ifdef DEBUG + try { +- LOG_DEBUG(socket().native() << "incoming request: " ++ LOG_DEBUG(socket().native_handle() << "incoming request: " + << socket().remote_endpoint().port() << " (avail= " + << (rcv_buffer_size_ - (rcv_remaining_ - buffer.data())) << "): " + << std::string(rcv_remaining_, +@@ -189,7 +189,7 @@ void Connection::handleReadRequest0() + if (doWebSockets) + request_.enableWebSocket(); + +- LOG_DEBUG(socket().native() << "request: " << status); ++ LOG_DEBUG(socket().native_handle() << "request: " << status); + + if (status >= 300) + sendStockReply(status); +@@ -242,7 +242,7 @@ void Connection::sendStockReply(StockReply::status_type status) + void Connection::handleReadRequest(const Wt::AsioWrapper::error_code& e, + std::size_t bytes_transferred) + { +- LOG_DEBUG(socket().native() << ": handleReadRequest(): " << e.message()); ++ LOG_DEBUG(socket().native_handle() << ": handleReadRequest(): " << e.message()); + + cancelReadTimer(); + +@@ -261,7 +261,7 @@ void Connection::close() + cancelReadTimer(); + cancelWriteTimer(); + +- LOG_DEBUG(socket().native() << ": close()"); ++ LOG_DEBUG(socket().native_handle() << ": close()"); + + ConnectionManager_.stop(shared_from_this()); + } +@@ -274,7 +274,7 @@ bool Connection::closed() const + + void Connection::handleError(const Wt::AsioWrapper::error_code& e) + { +- LOG_DEBUG(socket().native() << ": error: " << e.message()); ++ LOG_DEBUG(socket().native_handle() << ": error: " << e.message()); + + close(); + } +@@ -349,7 +349,7 @@ void Connection::handleReadBody0(ReplyPtr reply, + const Wt::AsioWrapper::error_code& e, + std::size_t bytes_transferred) + { +- LOG_DEBUG(socket().native() << ": handleReadBody0(): " << e.message()); ++ LOG_DEBUG(socket().native_handle() << ": handleReadBody0(): " << e.message()); + + if (disconnectCallback_) { + if (e && e != asio::error::operation_aborted) { +@@ -357,7 +357,7 @@ void Connection::handleReadBody0(ReplyPtr reply, + disconnectCallback_ = boost::function(); + f(); + } else if (!e) { +- LOG_ERROR(socket().native() ++ LOG_ERROR(socket().native_handle() + << ": handleReadBody(): while waiting for disconnect, " + "received unexpected data, closing"); + close(); +@@ -403,14 +403,14 @@ void Connection::startWriteResponse(ReplyPtr reply) + int size = asio::buffer_size(buffers[i]); + s += size; + #ifdef DEBUG_DUMP +- char *data = (char *)asio::detail::buffer_cast_helper(buffers[i]); ++ char *data = asio::buffer_cast(buffers[i]); + for (int j = 0; j < size; ++j) + std::cerr << data[j]; + #endif + } + #endif + +- LOG_DEBUG(socket().native() << " sending: " << s << "(buffers: " ++ LOG_DEBUG(socket().native_handle() << " sending: " << s << "(buffers: " + << buffers.size() << ")"); + + if (!buffers.empty()) { +@@ -423,7 +423,7 @@ void Connection::startWriteResponse(ReplyPtr reply) + + void Connection::handleWriteResponse(ReplyPtr reply) + { +- LOG_DEBUG(socket().native() << ": handleWriteResponse() " << ++ LOG_DEBUG(socket().native_handle() << ": handleWriteResponse() " << + haveResponse_ << " " << responseDone_); + if (haveResponse_) + startWriteResponse(reply); +@@ -458,7 +458,7 @@ void Connection::handleWriteResponse0(ReplyPtr reply, + const Wt::AsioWrapper::error_code& e, + std::size_t bytes_transferred) + { +- LOG_DEBUG(socket().native() << ": handleWriteResponse0(): " ++ LOG_DEBUG(socket().native_handle() << ": handleWriteResponse0(): " + << bytes_transferred << " ; " << e.message()); + + cancelWriteTimer(); +diff --git a/src/http/Connection.h b/src/http/Connection.h +index b0b71a3..bc0b6ed 100644 +--- a/src/http/Connection.h ++++ b/src/http/Connection.h +@@ -61,7 +61,7 @@ public: + virtual ~Connection(); + + Server *server() const { return server_; } +- asio::strand& strand() { return strand_; } ++ asio::io_context::strand& strand() { return strand_; } + + /// Stop all asynchronous operations associated with the connection. + void scheduleStop(); +@@ -104,7 +104,7 @@ protected: + /// The manager for this connection. + ConnectionManager& ConnectionManager_; + +- asio::strand strand_; ++ asio::io_context::strand strand_; + + void finishReply(); + +diff --git a/src/http/Reply.C b/src/http/Reply.C +index 0d79e39..5e6c615 100644 +--- a/src/http/Reply.C ++++ b/src/http/Reply.C +@@ -596,7 +596,7 @@ bool Reply::encodeNextContentBuffer( + originalSize += bs; + + gzipStrm_.avail_in = bs; +- gzipStrm_.next_in = (unsigned char *)asio::detail::buffer_cast_helper(b); ++ gzipStrm_.next_in = (unsigned char *)b.data(); + + unsigned char out[16*1024]; + do { +diff --git a/src/http/Server.h b/src/http/Server.h +index 3d3229a..373073f 100644 +--- a/src/http/Server.h ++++ b/src/http/Server.h +@@ -129,7 +129,7 @@ private: + Wt::WLogger accessLogger_; + + /// The strand for handleTcpAccept(), handleSslAccept() and handleStop() +- asio::strand accept_strand_; ++ asio::io_context::strand accept_strand_; + + /// Acceptors used to listen for incoming http connections. + std::vector tcp_listeners_; +diff --git a/src/http/SessionProcess.C b/src/http/SessionProcess.C +index 72d9a88..92320b0 100644 +--- a/src/http/SessionProcess.C ++++ b/src/http/SessionProcess.C +@@ -80,7 +80,7 @@ void SessionProcess::asyncExec(const Configuration &config, + if (!ec) + acceptor_->listen(0, ec); + #ifndef WT_WIN32 +- fcntl(acceptor_->native(), F_SETFD, FD_CLOEXEC); ++ fcntl(acceptor_->native_handle(), F_SETFD, FD_CLOEXEC); + #endif // !WT_WIN32 + if (ec) { + LOG_ERROR("Couldn't create listening socket: " << ec.message()); +diff --git a/src/http/SslConnection.C b/src/http/SslConnection.C +index 74c8642..2c34b53 100644 +--- a/src/http/SslConnection.C ++++ b/src/http/SslConnection.C +@@ -81,9 +81,9 @@ void SslConnection::handleHandshake(const Wt::AsioWrapper::error_code& error) + + void SslConnection::stop() + { +- LOG_DEBUG(socket().native() << ": stop()"); ++ LOG_DEBUG(socket().native_handle() << ": stop()"); + finishReply(); +- LOG_DEBUG(socket().native() << ": SSL shutdown"); ++ LOG_DEBUG(socket().native_handle() << ": SSL shutdown"); + + Connection::stop(); + +@@ -108,20 +108,20 @@ void SslConnection::stopNextLayer(const Wt::AsioWrapper::error_code& ec) + // In case of timeout, we will get here twice. + sslShutdownTimer_.cancel(); + if (ec) { +- LOG_DEBUG(socket().native() << ": ssl_shutdown failed:" ++ LOG_DEBUG(socket().native_handle() << ": ssl_shutdown failed:" + << ec.message()); + } + try { + if (socket().is_open()) { + Wt::AsioWrapper::error_code ignored_ec; +- LOG_DEBUG(socket().native() << ": socket shutdown"); ++ LOG_DEBUG(socket().native_handle() << ": socket shutdown"); + socket().shutdown(asio::ip::tcp::socket::shutdown_both, + ignored_ec); +- LOG_DEBUG(socket().native() << "closing socket"); ++ LOG_DEBUG(socket().native_handle() << "closing socket"); + socket().close(); + } + } catch (Wt::AsioWrapper::system_error& e) { +- LOG_DEBUG(socket().native() << ": error " << e.what()); ++ LOG_DEBUG(socket().native_handle() << ": error " << e.what()); + } + } + +@@ -161,7 +161,7 @@ void SslConnection::startAsyncReadBody(ReplyPtr reply, + Buffer& buffer, int timeout) + { + if (state_ & Reading) { +- LOG_DEBUG(socket().native() << ": state_ = " ++ LOG_DEBUG(socket().native_handle() << ": state_ = " + << (state_ & Reading ? "reading " : "") + << (state_ & Writing ? "writing " : "")); + stop(); +@@ -198,7 +198,7 @@ void SslConnection + int timeout) + { + if (state_ & Writing) { +- LOG_DEBUG(socket().native() << ": state_ = " ++ LOG_DEBUG(socket().native_handle() << ": state_ = " + << (state_ & Reading ? "reading " : "") + << (state_ & Writing ? "writing " : "")); + stop(); +diff --git a/src/http/TcpConnection.C b/src/http/TcpConnection.C +index ad73164..4eaf83b 100644 +--- a/src/http/TcpConnection.C ++++ b/src/http/TcpConnection.C +@@ -38,17 +38,17 @@ asio::ip::tcp::socket& TcpConnection::socket() + + void TcpConnection::stop() + { +- LOG_DEBUG(socket().native() << ": stop()"); ++ LOG_DEBUG(socket().native_handle() << ": stop()"); + + finishReply(); + + try { + Wt::AsioWrapper::error_code ignored_ec; + socket_.shutdown(asio::ip::tcp::socket::shutdown_both, ignored_ec); +- LOG_DEBUG(socket().native() << ": closing socket"); ++ LOG_DEBUG(socket().native_handle() << ": closing socket"); + socket_.close(); + } catch (Wt::AsioWrapper::system_error& e) { +- LOG_DEBUG(socket().native() << ": error " << e.what()); ++ LOG_DEBUG(socket().native_handle() << ": error " << e.what()); + } + + Connection::stop(); +@@ -56,10 +56,10 @@ void TcpConnection::stop() + + void TcpConnection::startAsyncReadRequest(Buffer& buffer, int timeout) + { +- LOG_DEBUG(socket().native() << ": startAsyncReadRequest"); ++ LOG_DEBUG(socket().native_handle() << ": startAsyncReadRequest"); + + if (state_ & Reading) { +- LOG_DEBUG(socket().native() << ": state_ = " ++ LOG_DEBUG(socket().native_handle() << ": state_ = " + << (state_ & Reading ? "reading " : "") + << (state_ & Writing ? "writing " : "")); + stop(); +@@ -81,10 +81,10 @@ void TcpConnection::startAsyncReadRequest(Buffer& buffer, int timeout) + void TcpConnection::startAsyncReadBody(ReplyPtr reply, + Buffer& buffer, int timeout) + { +- LOG_DEBUG(socket().native() << ": startAsyncReadBody"); ++ LOG_DEBUG(socket().native_handle() << ": startAsyncReadBody"); + + if (state_ & Reading) { +- LOG_DEBUG(socket().native() << ": state_ = " ++ LOG_DEBUG(socket().native_handle() << ": state_ = " + << (state_ & Reading ? "reading " : "") + << (state_ & Writing ? "writing " : "")); + stop(); +@@ -109,10 +109,10 @@ void TcpConnection::startAsyncWriteResponse + const std::vector& buffers, + int timeout) + { +- LOG_DEBUG(socket().native() << ": startAsyncWriteResponse"); ++ LOG_DEBUG(socket().native_handle() << ": startAsyncWriteResponse"); + + if (state_ & Writing) { +- LOG_DEBUG(socket().native() << ": state_ = " ++ LOG_DEBUG(socket().native_handle() << ": state_ = " + << (state_ & Reading ? "reading " : "") + << (state_ & Writing ? "writing " : "")); + stop(); +-- +2.16.2.windows.1 + diff --git a/ports/wt/0002-link-glew.patch b/ports/wt/0002-link-glew.patch new file mode 100644 index 000000000..af441e81f --- /dev/null +++ b/ports/wt/0002-link-glew.patch @@ -0,0 +1,23 @@ +From 6301c4ccaf8d3b6982898fed84e691ab8ddd7a4f Mon Sep 17 00:00:00 2001 +From: Robert Schumacher +Date: Fri, 23 Feb 2018 03:12:45 -0800 +Subject: [PATCH 2/3] link glew + + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 80734fb..70e755b 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -556,7 +556,8 @@ ENDIF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "GraphicsMagick") + IF(HAVE_GL) + INCLUDE_DIRECTORIES(${GL_INCLUDE_DIRS}) + IF(USE_SYSTEM_GLEW) +- TARGET_LINK_LIBRARIES(wt PRIVATE GLEW) ++ find_package(glew REQUIRED) ++ TARGET_LINK_LIBRARIES(wt PRIVATE GLEW::GLEW) + ENDIF(USE_SYSTEM_GLEW) + TARGET_LINK_LIBRARIES(wt PRIVATE ${GL_LIBRARIES}) + ELSE(HAVE_GL) +-- +2.16.2.windows.1 + diff --git a/ports/wt/0003-disable-boost-autolink.patch b/ports/wt/0003-disable-boost-autolink.patch new file mode 100644 index 000000000..910fbf800 --- /dev/null +++ b/ports/wt/0003-disable-boost-autolink.patch @@ -0,0 +1,22 @@ +From 21dd691c8ac8d60f49cd051193402187f6912f92 Mon Sep 17 00:00:00 2001 +From: Robert Schumacher +Date: Fri, 23 Feb 2018 03:29:09 -0800 +Subject: [PATCH 3/3] disable boost autolink + + +diff --git a/cmake/WtFindBoost-cmake.txt b/cmake/WtFindBoost-cmake.txt +index b708803..b0c2846 100644 +--- a/cmake/WtFindBoost-cmake.txt ++++ b/cmake/WtFindBoost-cmake.txt +@@ -89,7 +89,7 @@ IF (Boost_FOUND) + SET(BOOST_WTHTTP_MT_FOUND TRUE) + SET(BOOST_WTHTTP_FOUND TRUE) + +- IF(MSVC) ++ IF(MSVC AND 0) + # use autolink + SET(BOOST_WT_LIBRARIES "") + SET(BOOST_WTHTTP_LIBRARIES "") +-- +2.16.2.windows.1 + diff --git a/ports/wt/CONTROL b/ports/wt/CONTROL index 448d76f60..8b9b98aa3 100644 --- a/ports/wt/CONTROL +++ b/ports/wt/CONTROL @@ -1,4 +1,4 @@ Source: wt -Version: 3.3.7-4 +Version: 4.0.2 Description: Wt is a C++ library for developing web applications -Build-Depends: openssl, sqlite3, libpq, pango, boost-date-time, boost-regex, boost-program-options, boost-signals, boost-system, boost-filesystem, boost-thread, boost-random, boost-multi-index, boost-signals2, boost-asio, boost-ublas, boost-conversion, boost-array, boost-smart-ptr, boost-tuple, boost-algorithm, boost-logic +Build-Depends: openssl, sqlite3, libpq, pango, glew, boost-date-time, boost-regex, boost-program-options, boost-signals, boost-system, boost-filesystem, boost-thread, boost-random, boost-multi-index, boost-signals2, boost-asio, boost-ublas, boost-conversion, boost-array, boost-smart-ptr, boost-tuple, boost-algorithm, boost-logic diff --git a/ports/wt/add-disable-boost-autolink-option.patch b/ports/wt/add-disable-boost-autolink-option.patch deleted file mode 100644 index 57cb3ed99..000000000 --- a/ports/wt/add-disable-boost-autolink-option.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/cmake/WtFindBoost-cmake.txt b/cmake/WtFindBoost-cmake.txt -index b66741f..377cede 100644 ---- a/cmake/WtFindBoost-cmake.txt -+++ b/cmake/WtFindBoost-cmake.txt -@@ -99,7 +99,7 @@ IF (Boost_FOUND) - SET(BOOST_WTHTTP_MT_FOUND TRUE) - SET(BOOST_WTHTTP_FOUND TRUE) - -- IF(MSVC) -+ IF(MSVC AND NOT DISABLE_BOOST_AUTOLINK) - # use autolink - SET(BOOST_WT_LIBRARIES "") - SET(BOOST_WTHTTP_LIBRARIES "") -diff --git a/src/wt/Dbo/CMakeLists.txt b/src/wt/Dbo/CMakeLists.txt -index 64d3af2..f9c31e0 100644 ---- a/src/wt/Dbo/CMakeLists.txt -+++ b/src/wt/Dbo/CMakeLists.txt -@@ -31,7 +31,7 @@ IF(ENABLE_LIBWTDBO) - StringStream.C - ) - -- IF(MSVC) -+ IF(MSVC AND NOT DISABLE_BOOST_AUTOLINK) - #win32 links automatically against boost libs; specifying too much causes - #trouble - IF(MULTI_THREADED_BUILD) diff --git a/ports/wt/boost-1.66.patch b/ports/wt/boost-1.66.patch deleted file mode 100644 index d8268f6ba..000000000 --- a/ports/wt/boost-1.66.patch +++ /dev/null @@ -1,123 +0,0 @@ -diff --git a/src/http/Connection.C b/src/http/Connection.C -index 70ecfd5..b24c817 100644 ---- a/src/http/Connection.C -+++ b/src/http/Connection.C -@@ -339,7 +339,7 @@ void Connection::handleReadBody(ReplyPtr reply, - const asio_error_code& e, - std::size_t bytes_transferred) - { -- LOG_DEBUG(socket().native() << ": handleReadBody(): " << e.message()); -+ LOG_DEBUG(socket().native_handle() << ": handleReadBody(): " << e.message()); - - if (disconnectCallback_) { - rcv_body_buffer_ = false; -@@ -350,7 +350,7 @@ void Connection::handleReadBody(ReplyPtr reply, - disconnectCallback_ = boost::function(); - f(); - } else if (!e) { -- LOG_ERROR(socket().native() -+ LOG_ERROR(socket().native_handle() - << ": handleReadBody(): while waiting for disconnect, " - "received unexpected data, closing"); - close(); -@@ -471,3 +471,4 @@ void Connection::handleWriteResponse(ReplyPtr reply, - - } // namespace server - } // namespace http -+ -diff --git a/src/http/Connection.h b/src/http/Connection.h -index 712f736..dabba21 100644 ---- a/src/http/Connection.h -+++ b/src/http/Connection.h -@@ -72,7 +72,7 @@ public: - virtual ~Connection(); - - Server *server() const { return server_; } -- asio::strand& strand() { return strand_; } -+ asio::io_service::strand& strand() { return strand_; } - - /// Stop all asynchronous operations associated with the connection. - void scheduleStop(); -@@ -113,7 +113,7 @@ protected: - /// The manager for this connection. - ConnectionManager& ConnectionManager_; - -- asio::strand strand_; -+ asio::io_service::strand strand_; - - void finishReply(); - -@@ -204,3 +204,4 @@ typedef boost::shared_ptr ConnectionPtr; - } // namespace http - - #endif // HTTP_CONNECTION_HPP -+ -diff --git a/src/http/Reply.C b/src/http/Reply.C -index f7fe2aa..603b9ea 100644 ---- a/src/http/Reply.C -+++ b/src/http/Reply.C -@@ -593,7 +593,7 @@ bool Reply::encodeNextContentBuffer( - originalSize += bs; - - gzipStrm_.avail_in = bs; -- gzipStrm_.next_in = (unsigned char *)asio::detail::buffer_cast_helper(b); -+ gzipStrm_.next_in = (unsigned char *)b.data(); - - unsigned char out[16*1024]; - do { -@@ -642,3 +642,4 @@ bool Reply::encodeNextContentBuffer( - - } // namespace server - } // namespace http -+ -diff --git a/src/http/Server.h b/src/http/Server.h -index 3260a23..c924ed2 100644 ---- a/src/http/Server.h -+++ b/src/http/Server.h -@@ -120,7 +120,7 @@ private: - Wt::WLogger accessLogger_; - - /// The strand for handleTcpAccept(), handleSslAccept() and handleStop() -- asio::strand accept_strand_; -+ asio::io_service::strand accept_strand_; - - /// Acceptor used to listen for incoming http connections. - asio::ip::tcp::acceptor tcp_acceptor_; -@@ -164,3 +164,4 @@ void handleTimeout(asio_timer *timer, - } // namespace http - - #endif // HTTP_SERVER_HPP -+ -diff --git a/src/wt/WServerGLWidget.C b/src/wt/WServerGLWidget.C -index a1fb5ee..7e1d31e 100644 ---- a/src/wt/WServerGLWidget.C -+++ b/src/wt/WServerGLWidget.C -@@ -36,8 +36,9 @@ typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXC - #endif - - #ifdef WIN32_GL --#include -+#define WIN32_LEAN_AND_MEAN - #include -+#include - #endif - - #ifdef APPLE_GL -diff --git a/src/wt/http/Client.C b/src/wt/http/Client.C -index 2c4e07d..ca793d4 100644 ---- a/src/wt/http/Client.C -+++ b/src/wt/http/Client.C -@@ -605,7 +605,7 @@ private: - - protected: - WIOService& ioService_; -- boost::asio::strand strand_; -+ boost::asio::io_service::strand strand_; - tcp::resolver resolver_; - boost::asio::streambuf requestBuf_; - boost::asio::streambuf responseBuf_; -@@ -1060,3 +1060,4 @@ bool Client::parseUrl(const std::string &url, URL &parsedUrl) - - } - } -+ diff --git a/ports/wt/guard-NO_ERROR.patch b/ports/wt/guard-NO_ERROR.patch deleted file mode 100644 index b91a19a20..000000000 --- a/ports/wt/guard-NO_ERROR.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/src/wt/WGLWidget b/src/wt/WGLWidget -index dd39701..94634f7 100644 ---- a/src/wt/WGLWidget -+++ b/src/wt/WGLWidget -@@ -798,7 +798,14 @@ public: - SAMPLE_COVERAGE = 0x80A0, - - /* ErrorCode */ -+#ifdef _WIN32 -+#pragma push_macro ("NO_ERROR") -+#undef NO_ERROR -+#endif - NO_ERROR = 0x0, -+#ifdef _WIN32 -+#pragma pop_macro ("NO_ERROR") -+#endif - INVALID_ENUM = 0x0500, - INVALID_VALUE = 0x0501, - INVALID_OPERATION = 0x0502, diff --git a/ports/wt/portfile.cmake b/ports/wt/portfile.cmake index ede65c8df..b3081b8a3 100644 --- a/ports/wt/portfile.cmake +++ b/ports/wt/portfile.cmake @@ -3,23 +3,24 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO emweb/wt - REF 3.3.7 - SHA512 f179b42eedcfd2e61f26ef92c6aad40c55c76c9a688269c4d5bd55dd48381073d6269d9c2ab305f15ef455616d48183a3fc0ba08c740a8e18318a2ad2fb13826 + REF 4.0.2 + SHA512 85e35374bec662c314b20d0699656895364386ee2e51ca99d131702f02ea5a4defeb357fdda3cf068049f077daaa7a3af1dc3d239fb73b3cf13b574778e5609c HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/add-disable-boost-autolink-option.patch - ${CMAKE_CURRENT_LIST_DIR}/guard-NO_ERROR.patch - ${CMAKE_CURRENT_LIST_DIR}/boost-1.66.patch + ${CMAKE_CURRENT_LIST_DIR}/0001-boost-1.66.patch + ${CMAKE_CURRENT_LIST_DIR}/0002-link-glew.patch + ${CMAKE_CURRENT_LIST_DIR}/0003-disable-boost-autolink.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIBS) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DSHARED_LIBS=${SHARED_LIBS} -DBOOST_DYNAMIC=ON @@ -38,12 +39,14 @@ vcpkg_configure_cmake( -DENABLE_OPENGL=ON -DUSE_SYSTEM_SQLITE3=ON + -DUSE_SYSTEM_GLEW=ON ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/wt) + # There is no way to suppress installation of the headers and resource files in debug build. -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wt RENAME copyright) vcpkg_copy_pdbs() -- cgit v1.2.3 From 488ba6dbece4bca75ba198d7ed3d3aeaebe9af97 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 12:14:25 -0800 Subject: [eastl] Upgrade to 3.07.00 --- ports/eastl/CONTROL | 2 +- ports/eastl/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/eastl/CONTROL b/ports/eastl/CONTROL index d43d7203e..1ebe124c2 100644 --- a/ports/eastl/CONTROL +++ b/ports/eastl/CONTROL @@ -1,4 +1,4 @@ Source: eastl -Version: 3.05.08 +Version: 3.07.00 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/portfile.cmake b/ports/eastl/portfile.cmake index 19fb6e51c..cdc31e4f3 100644 --- a/ports/eastl/portfile.cmake +++ b/ports/eastl/portfile.cmake @@ -8,8 +8,8 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eastl) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO electronicarts/EASTL - REF 3.05.08 - SHA512 7b9e87d967252026a660a648688a19e7b88d4eca7f373ba7427b315103a6f8cea555a85b2ef74557cf7e8a486b847589cac4b622b4ab88cab7c0f0a22355ab66 + REF 3.07.00 + SHA512 b860382217aac5a56734b9a6f5f19abf4b2a13984dc24c8088e9e0fcac7c163fb65c70612b94bcd5ee59b0d8288f8d06768be4e31e1dceea1d79e8c82e2b37af HEAD_REF master ) -- cgit v1.2.3 From 45ba125e02fbb1704ba41363c92d05f11ab5cb4a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 12:17:03 -0800 Subject: [eastl] Upgrade to 3.07.02 --- ports/eastl/CONTROL | 2 +- ports/eastl/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/eastl/CONTROL b/ports/eastl/CONTROL index 1ebe124c2..2e7d0c433 100644 --- a/ports/eastl/CONTROL +++ b/ports/eastl/CONTROL @@ -1,4 +1,4 @@ Source: eastl -Version: 3.07.00 +Version: 3.07.02 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/portfile.cmake b/ports/eastl/portfile.cmake index cdc31e4f3..f5b877b8c 100644 --- a/ports/eastl/portfile.cmake +++ b/ports/eastl/portfile.cmake @@ -8,8 +8,8 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eastl) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO electronicarts/EASTL - REF 3.07.00 - SHA512 b860382217aac5a56734b9a6f5f19abf4b2a13984dc24c8088e9e0fcac7c163fb65c70612b94bcd5ee59b0d8288f8d06768be4e31e1dceea1d79e8c82e2b37af + REF 3.07.02 + SHA512 332db00b69a5493158daf1b0b89717646f0a31aeb0bfc9bf3415caee928102c3253c47c21eda0789350095811db45f5eae82ca24fb3fe1e9d67072f9fcd21235 HEAD_REF master ) -- cgit v1.2.3 From 910d3e52802185a374fab8764b30d07f15e94fec Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 12:21:07 -0800 Subject: [llvm] Reenable package --- ports/llvm/portfile.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 8f981873a..60580947e 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -1,5 +1,3 @@ -message(FATAL_ERROR "temporarily disabled") - # LLVM documentation recommends always using static library linkage when # building with Microsoft toolchain; it's also the default on other platforms set(VCPKG_LIBRARY_LINKAGE static) -- cgit v1.2.3 From 0334365f516c5f229ff4fcf038c7d0190979a38a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 16:50:32 -0800 Subject: [vcpkg-cmake-integration] Warn if no packages are installed for the current triplet. --- scripts/buildsystems/vcpkg.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index ceb43940b..d5108471f 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -81,6 +81,10 @@ if(NOT DEFINED _VCPKG_ROOT_DIR) endif() set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed) +if(NOT EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" AND NOT _CMAKE_IN_TRY_COMPILE) + message(WARNING "There are no libraries installed for the Vcpkg triplet ${VCPKG_TARGET_TRIPLET}.") +endif() + if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) list(APPEND CMAKE_PREFIX_PATH ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug -- cgit v1.2.3 From bd52db332b3ba8cba20e6a7a92205e480b504935 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 17:04:17 -0800 Subject: [abseil] Update --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index c9a74b207..12bec5d9d 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-2-5 +Version: 2018-2-23 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 86effcfc5..0edb0fa32 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF bf7fc9986e20f664958fc227547fd8d2fdcf863e - SHA512 c80a1f850d40e2470db50dd0904730e615378fd1530e1bfef0908ec7ef7bf06ff7e1c6bbb1fe9aeb71e0f2df3fc2b7c516261d0521ff2822fd7f962a287b5718 + REF 0d40cb771eec8741f44e5979cfccf1eeeedb012a + SHA512 1b85e86a6d212c1c94f6f7bed2db0d4c30266a72268b0ef56a317709a484e657d57463263c784eb73f4838b4644b4ae9d5beedcf7e15a700fc5881a7ed825a53 HEAD_REF master ) -- cgit v1.2.3 From 175d25ae4704de187930010481ff2f9cdb5af1a4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Feb 2018 16:39:48 -0800 Subject: [ffmpeg] Deploy FindFFMPEG cmake file --- ports/ffmpeg/CONTROL | 2 +- ports/ffmpeg/FindFFMPEG.cmake | 11 +++++++++++ ports/ffmpeg/portfile.cmake | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ports/ffmpeg/FindFFMPEG.cmake diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index a2111c03a..3ed4c4bac 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,5 +1,5 @@ Source: ffmpeg -Version: 3.3.3-2 +Version: 3.3.3-3 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 new file mode 100644 index 000000000..ce6e7e600 --- /dev/null +++ b/ports/ffmpeg/FindFFMPEG.cmake @@ -0,0 +1,11 @@ +include(FindPackageHandleStandardArgs) + +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() +list(APPEND FFMPEG_LIBRARIES wsock32 ws2_32 Secur32) + +find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIR) diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 4a0d052a3..9e969bf6c 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -146,3 +146,6 @@ vcpkg_copy_pdbs() # 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) + +# Used by OpenCV +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindFFMPEG.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/ffmpeg) -- cgit v1.2.3 From 832f908694423ccf4c32d8e0dc430cc9159e309b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Feb 2018 16:40:27 -0800 Subject: [openexr] Deploy FindOpenEXR.cmake and reduce components built --- ports/openexr/CMakeLists.txt.patch | 92 ++++++++++++++++++++++++++++++++++++++ ports/openexr/CONTROL | 2 +- ports/openexr/FindOpenEXR.cmake | 13 ++++++ ports/openexr/portfile.cmake | 10 ++++- 4 files changed, 115 insertions(+), 2 deletions(-) create mode 100644 ports/openexr/CMakeLists.txt.patch create mode 100644 ports/openexr/FindOpenEXR.cmake diff --git a/ports/openexr/CMakeLists.txt.patch b/ports/openexr/CMakeLists.txt.patch new file mode 100644 index 000000000..bb0d003ef --- /dev/null +++ b/ports/openexr/CMakeLists.txt.patch @@ -0,0 +1,92 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d3e3365..a20580e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -152,13 +152,13 @@ FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h " + IF (HAVE_GCC_INLINE_ASM_AVX) + FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX 1\n" ) + ENDIF() +- ++ + IF (HAVE_SYSCONF_NPROCESSORS_ONLN) + FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN 1\n" ) + ENDIF() +- +-SET (OPENEXR_LIBSUFFIX "") +-SET (ILMBASE_LIBSUFFIX "") ++ ++SET (OPENEXR_LIBSUFFIX "" CACHE STRING "Default suffix for OpenEXR") ++SET (ILMBASE_LIBSUFFIX "" CACHE STRING "Default suffix for ILMBase") + IF (NAMESPACE_VERSIONING) + SET ( OPENEXR_LIBSUFFIX "-${OPENEXR_VERSION_API}" ) + # assume same NAMESPACE_VERSION setting for IlmBase for now +@@ -188,32 +188,6 @@ SET_TARGET_PROPERTIES ( IlmImfUtil + SOVERSION 22 + OUTPUT_NAME "IlmImfUtil${OPENEXR_LIBSUFFIX}" + ) +- +-########################## +-# Example Code +-########################## +-ADD_SUBDIRECTORY ( IlmImfExamples ) +- +- +-########################## +-# Tests +-########################## +-ADD_SUBDIRECTORY ( IlmImfTest ) +-ADD_SUBDIRECTORY ( IlmImfUtilTest ) +-ADD_SUBDIRECTORY ( IlmImfFuzzTest ) +- +- +-########################## +-# Binaries / Utilities +-########################## +-ADD_SUBDIRECTORY ( exrheader ) +-ADD_SUBDIRECTORY ( exrmaketiled ) +-ADD_SUBDIRECTORY ( exrstdattr ) +-ADD_SUBDIRECTORY ( exrmakepreview ) +-ADD_SUBDIRECTORY ( exrenvmap ) +-ADD_SUBDIRECTORY ( exrmultiview ) +-ADD_SUBDIRECTORY ( exrmultipart ) +- + + ########################## + # Installation +@@ -225,36 +199,3 @@ INSTALL ( FILES + ${CMAKE_INSTALL_PREFIX}/include/OpenEXR + ) + +-# Documentation +-INSTALL ( FILES +- doc/TechnicalIntroduction.pdf +- doc/ReadingAndWritingImageFiles.pdf +- doc/OpenEXRFileLayout.pdf +- doc/MultiViewOpenEXR.pdf +- doc/InterpretingDeepPixels.pdf +- doc/TheoryDeepPixels.pdf +- DESTINATION +- ${CMAKE_INSTALL_PREFIX}/share/doc/OpenEXR-${OPENEXR_VERSION} +- ) +- +-# Examples +-INSTALL ( FILES +- IlmImfExamples/main.cpp +- IlmImfExamples/drawImage.cpp +- IlmImfExamples/rgbaInterfaceExamples.cpp +- IlmImfExamples/rgbaInterfaceTiledExamples.cpp +- IlmImfExamples/generalInterfaceExamples.cpp +- IlmImfExamples/lowLevelIoExamples.cpp +- IlmImfExamples/previewImageExamples.cpp +- IlmImfExamples/generalInterfaceTiledExamples.cpp +- IlmImfExamples/generalInterfaceTiledExamples.h +- IlmImfExamples/drawImage.h +- IlmImfExamples/rgbaInterfaceExamples.h +- IlmImfExamples/generalInterfaceExamples.h +- IlmImfExamples/rgbaInterfaceTiledExamples.h +- IlmImfExamples/lowLevelIoExamples.h +- IlmImfExamples/previewImageExamples.h +- IlmImfExamples/namespaceAlias.h +- DESTINATION +- ${CMAKE_INSTALL_PREFIX}/share/doc/OpenEXR-${OPENEXR_VERSION}/examples +- ) diff --git a/ports/openexr/CONTROL b/ports/openexr/CONTROL index b50a48ae8..2bc513755 100644 --- a/ports/openexr/CONTROL +++ b/ports/openexr/CONTROL @@ -1,4 +1,4 @@ Source: openexr -Version: 2.2.0-1 +Version: 2.2.0-4 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, ilmbase diff --git a/ports/openexr/FindOpenEXR.cmake b/ports/openexr/FindOpenEXR.cmake new file mode 100644 index 000000000..cfff7824c --- /dev/null +++ b/ports/openexr/FindOpenEXR.cmake @@ -0,0 +1,13 @@ +include(FindPackageHandleStandardArgs) + +find_path(OPENEXR_INCLUDE_PATHS NAMES ImfRgbaFile.h PATH_SUFFIXES OpenEXR) + +find_library(OPENEXR_HALF_LIBRARY NAMES Half) +find_library(OPENEXR_IEX_LIBRARY NAMES Iex-2_2) +find_library(OPENEXR_IMATH_LIBRARY NAMES Imath-2_2) +find_library(OPENEXR_ILMIMF_LIBRARY NAMES IlmImf-2_2) +find_library(OPENEXR_ILMTHREAD_LIBRARY NAMES IlmThread-2_2) + +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_PATHS) diff --git a/ports/openexr/portfile.cmake b/ports/openexr/portfile.cmake index e95899bc7..b5b9c8d97 100644 --- a/ports/openexr/portfile.cmake +++ b/ports/openexr/portfile.cmake @@ -10,7 +10,10 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-missing-export.patch) + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/add-missing-export.patch" + "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt.patch" +) # Ensure helper executables can run during build set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin") @@ -28,6 +31,9 @@ vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} vcpkg_install_cmake() +# if you need to have OpenEXR tools, edit CMakeLists.txt.patch and remove the part that disables building executables, +# then remove the following line which deletes them and finally use vcpkg_copy_tool_dependencies() to save them +# (may require additional patching to the OpenEXR toolchain which is really broken) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -52,3 +58,5 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/include/OpenEXR/ImfExport.h "${HEADER_FILE}") file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openexr) file(RENAME ${CURRENT_PACKAGES_DIR}/share/openexr/LICENSE ${CURRENT_PACKAGES_DIR}/share/openexr/copyright) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindOpenEXR.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/openexr) -- cgit v1.2.3 From 5609d34b39009a2b511ae85ee5d8484d1db514c5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Feb 2018 16:42:23 -0800 Subject: [libwebp] Deploy FindWebP.cmake --- ports/libwebp/CONTROL | 2 +- ports/libwebp/FindWebP.cmake | 27 +++++++++++++++++++++++++++ ports/libwebp/portfile.cmake | 2 ++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 ports/libwebp/FindWebP.cmake diff --git a/ports/libwebp/CONTROL b/ports/libwebp/CONTROL index 42201b36b..3e3ae16d8 100644 --- a/ports/libwebp/CONTROL +++ b/ports/libwebp/CONTROL @@ -1,3 +1,3 @@ Source: libwebp -Version: 0.6.1-1 +Version: 0.6.1-2 Description: Lossy compression of digital photographic images. diff --git a/ports/libwebp/FindWebP.cmake b/ports/libwebp/FindWebP.cmake new file mode 100644 index 000000000..c39a0eb05 --- /dev/null +++ b/ports/libwebp/FindWebP.cmake @@ -0,0 +1,27 @@ +include(SelectLibraryConfigurations) +include(FindPackageHandleStandardArgs) + +# If the user has provided ``WEBP_ROOT``, use it! Choose items found +# at this location over system locations. +if( EXISTS "$ENV{WEBP_ROOT}" ) + file( TO_CMAKE_PATH "$ENV{WEBP_ROOT}" WEBP_ROOT ) + set( WEBP_ROOT "${WEBP_ROOT}" CACHE PATH "Prefix for WebP installation." ) +elseif(EXISTS "$ENV{WEBP_DIR}" ) + file( TO_CMAKE_PATH "$ENV{WEBP_DIR}" WEBP_ROOT ) + set( WEBP_ROOT "${WEBP_ROOT}" CACHE PATH "Prefix for WebP installation." ) +endif() + +if(NOT WEBP_INCLUDE_DIR) + FIND_PATH(WEBP_INCLUDE_DIR NAMES webp/decode.h) +endif() + +if(NOT WEBP_LIBRARY) + find_library(WEBP_LIBRARY_RELEASE NAMES webp PATHS ${WEBP_ROOT} PATH_SUFFIXES webp ) + find_library(WEBP_LIBRARY_DEBUG NAMES webpd PATHS ${WEBP_ROOT} PATH_SUFFIXES debug webp webp/debug debug/webp) + select_library_configurations(WEBP) +endif() + +SET(WEBP_LIBRARIES ${WEBP_LIBRARY}) +SET(WEBP_INCLUDE_DIRS ${WEBP_INCLUDE_DIR}) + +find_package_handle_standard_args(WEBP REQUIRED_VARS WEBP_LIBRARY WEBP_INCLUDE_DIR) diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index 3c16eccbb..e1baf1401 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -36,3 +36,5 @@ file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwe file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebp/COPYING ${CURRENT_PACKAGES_DIR}/share/libwebp/copyright) vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindWebP.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebp) -- cgit v1.2.3 From 471f7dc9700f7618aa16274fb9961e4e068f7656 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Feb 2018 16:47:42 -0800 Subject: [opencv] Rework Split off contrib, ipp, webp, openexr, tiff, png, tiff, jpeg, jasper, eigen into features. Prevent downloads during the build --- ports/opencv/0001-winrt-fixes.patch | 140 +++++++++++++++ ports/opencv/0002-install-options.patch | 174 ++++++++++++++++++ ports/opencv/0003-disable-downloading.patch | 25 +++ ports/opencv/0004-use-find-package-required.patch | 97 ++++++++++ ports/opencv/001-fix-uwp.patch | 57 ------ ports/opencv/002-fix-uwp.patch | 26 --- ports/opencv/CONTROL | 37 +++- ports/opencv/filesystem-uwp.patch | 41 ----- ports/opencv/msvs-fix-2017-u5.patch | 39 ---- ports/opencv/no-double-expand-enable-pylint.patch | 13 -- ports/opencv/open_contrib-remove-waldboost.patch | 13 -- ports/opencv/opencv-installation-options.patch | 137 -------------- ports/opencv/portfile.cmake | 209 +++++++++++++++++----- 13 files changed, 639 insertions(+), 369 deletions(-) create mode 100644 ports/opencv/0001-winrt-fixes.patch create mode 100644 ports/opencv/0002-install-options.patch create mode 100644 ports/opencv/0003-disable-downloading.patch create mode 100644 ports/opencv/0004-use-find-package-required.patch delete mode 100644 ports/opencv/001-fix-uwp.patch delete mode 100644 ports/opencv/002-fix-uwp.patch delete mode 100644 ports/opencv/filesystem-uwp.patch delete mode 100644 ports/opencv/msvs-fix-2017-u5.patch delete mode 100644 ports/opencv/no-double-expand-enable-pylint.patch delete mode 100644 ports/opencv/open_contrib-remove-waldboost.patch delete mode 100644 ports/opencv/opencv-installation-options.patch diff --git a/ports/opencv/0001-winrt-fixes.patch b/ports/opencv/0001-winrt-fixes.patch new file mode 100644 index 000000000..c52c662e1 --- /dev/null +++ b/ports/opencv/0001-winrt-fixes.patch @@ -0,0 +1,140 @@ +From 005963d571f95fc536f60aa77098b9ecbb17128c Mon Sep 17 00:00:00 2001 +From: Robert Schumacher +Date: Wed, 21 Feb 2018 17:03:30 -0800 +Subject: [PATCH 1/5] winrt-fixes + +--- + CMakeLists.txt | 2 +- + cmake/OpenCVCompilerOptions.cmake | 3 +++ + cmake/OpenCVModule.cmake | 2 +- + modules/core/src/utils/filesystem.cpp | 14 ++++++++++++-- + modules/highgui/include/opencv2/highgui/highgui_winrt.hpp | 1 + + modules/highgui/src/window_winrt_bridge.hpp | 1 + + modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp | 4 ++-- + 7 files changed, 21 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4464441..6bfbecd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -296,7 +296,7 @@ OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binar + # OpenCV build options + # =================================================== + OCV_OPTION(ENABLE_CCACHE "Use ccache" (UNIX AND NOT IOS AND (CMAKE_GENERATOR MATCHES "Makefile" OR CMAKE_GENERATOR MATCHES "Ninja")) ) +-OCV_OPTION(ENABLE_PRECOMPILED_HEADERS "Use precompiled headers" ON IF (NOT IOS AND NOT CMAKE_CROSSCOMPILING) ) ++OCV_OPTION(ENABLE_PRECOMPILED_HEADERS "Use precompiled headers" ON IF (NOT IOS AND (MSVC OR NOT CMAKE_CROSSCOMPILING)) ) + OCV_OPTION(ENABLE_SOLUTION_FOLDERS "Solution folder in Visual Studio or in other IDEs" (MSVC_IDE OR CMAKE_GENERATOR MATCHES Xcode) ) + OCV_OPTION(ENABLE_PROFILING "Enable profiling in the GCC compiler (Add flags: -g -pg)" OFF IF CMAKE_COMPILER_IS_GNUCXX ) + OCV_OPTION(ENABLE_COVERAGE "Enable coverage collection with GCov" OFF IF CMAKE_COMPILER_IS_GNUCXX ) +diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake +index 353ee12..8f4aa3b 100644 +--- a/cmake/OpenCVCompilerOptions.cmake ++++ b/cmake/OpenCVCompilerOptions.cmake +@@ -37,6 +37,9 @@ if(MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "Flags used by the compiler during all build types." FORCE) + endif() ++ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW") ++ endif() + endif() + + set(OPENCV_EXTRA_FLAGS "") +diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake +index a84bbff..8feb6df 100644 +--- a/cmake/OpenCVModule.cmake ++++ b/cmake/OpenCVModule.cmake +@@ -785,7 +785,7 @@ macro(ocv_create_module) + set(the_module_target ${the_module}) + endif() + +- if(WINRT) ++ if(WINRT AND BUILD_TESTS) + # removing APPCONTAINER from modules to run from console + # in case of usual starting of WinRT test apps output is missing + # so starting of console version w/o APPCONTAINER is required to get test results +diff --git a/modules/core/src/utils/filesystem.cpp b/modules/core/src/utils/filesystem.cpp +index 266a92f..1d5a302 100644 +--- a/modules/core/src/utils/filesystem.cpp ++++ b/modules/core/src/utils/filesystem.cpp +@@ -186,7 +186,7 @@ bool createDirectory(const cv::String& path) + wchar_t wpath[MAX_PATH]; + size_t copied = mbstowcs(wpath, path.c_str(), MAX_PATH); + CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1)); +- int result = CreateDirectoryA(wpath, NULL) ? 0 : -1; ++ int result = CreateDirectoryW(wpath, NULL) ? 0 : -1; + #else + int result = _mkdir(path.c_str()); + #endif +@@ -248,8 +248,16 @@ struct FileLock::Impl + int numRetries = 5; + do + { ++#ifdef WINRT ++ wchar_t wpath[MAX_PATH]; ++ size_t copied = mbstowcs(wpath, fname, MAX_PATH); ++ CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1)); ++ handle = ::CreateFile2(wpath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, ++ OPEN_EXISTING, NULL); ++#else + handle = ::CreateFileA(fname, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); ++#endif + if (INVALID_HANDLE_VALUE == handle) + { + if (ERROR_SHARING_VIOLATION == GetLastError()) +@@ -399,7 +407,9 @@ cv::String getCacheDirectory(const char* sub_directory_name, const char* configu + if (cache_path.empty()) + { + cv::String default_cache_path; +-#ifdef _WIN32 ++#if WINRT ++ // no defaults ++#elif defined _WIN32 + char tmp_path_buf[MAX_PATH+1] = {0}; + DWORD res = GetTempPath(MAX_PATH, tmp_path_buf); + if (res > 0 && res <= MAX_PATH) +diff --git a/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp b/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp +index f4147f3..b92efdd 100644 +--- a/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp ++++ b/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp +@@ -24,6 +24,7 @@ + // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + // POSSIBILITY OF SUCH DAMAGE. + ++#include "opencv2/core/cvdef.h" + using namespace Windows::UI::Xaml::Controls; + + namespace cv +diff --git a/modules/highgui/src/window_winrt_bridge.hpp b/modules/highgui/src/window_winrt_bridge.hpp +index 25f4aef..5429f0b 100644 +--- a/modules/highgui/src/window_winrt_bridge.hpp ++++ b/modules/highgui/src/window_winrt_bridge.hpp +@@ -28,6 +28,7 @@ + + #include + #include ++#include "opencv2/highgui/highgui_c.h" + + using namespace Windows::UI::Xaml::Controls; + +diff --git a/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp b/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp +index 236e227..e2417dc 100644 +--- a/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp ++++ b/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp +@@ -94,10 +94,10 @@ Media::CaptureFrameGrabber::~CaptureFrameGrabber() + + void Media::CaptureFrameGrabber::ShowCameraSettings() + { +-#if WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP ++#if (WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP) && (WINAPI_FAMILY!=WINAPI_FAMILY_APP) + if (_state == State::Started) + { +- CameraOptionsUI::Show(_capture.Get()); ++ CameraOptionsUI::Show(_capture.Get()); // TODO: Turn it on again in UWP mode by adding reference to UWP Desktop Extensions + } + #endif + } +-- +2.15.1.windows.2 + diff --git a/ports/opencv/0002-install-options.patch b/ports/opencv/0002-install-options.patch new file mode 100644 index 000000000..6351ceeb8 --- /dev/null +++ b/ports/opencv/0002-install-options.patch @@ -0,0 +1,174 @@ +From 5d4d154117b39d9e11fda709ede7aadf6b960a7d Mon Sep 17 00:00:00 2001 +From: Robert Schumacher +Date: Wed, 21 Feb 2018 17:05:16 -0800 +Subject: [PATCH 2/5] install-options + +--- + CMakeLists.txt | 20 +++++++++++--------- + cmake/OpenCVGenConfig.cmake | 4 ++-- + cmake/OpenCVGenHeaders.cmake | 8 ++++++-- + cmake/OpenCVModule.cmake | 4 +++- + data/CMakeLists.txt | 6 ++++-- + include/CMakeLists.txt | 16 +++++++++------- + 6 files changed, 35 insertions(+), 23 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6bfbecd..0156eeb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -292,6 +292,10 @@ OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF ) + OCV_OPTION(INSTALL_ANDROID_EXAMPLES "Install Android examples" OFF IF ANDROID ) + OCV_OPTION(INSTALL_TO_MANGLED_PATHS "Enables mangled install paths, that help with side by side installs." OFF IF (UNIX AND NOT ANDROID AND NOT APPLE_FRAMEWORK AND BUILD_SHARED_LIBS) ) + OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binaries and test data" OFF) ++OCV_OPTION(INSTALL_HEADERS "Install header files" ON) ++OCV_OPTION(INSTALL_LICENSE "Install license file" ON) ++OCV_OPTION(INSTALL_OTHER "Install other files" ON) ++OCV_OPTION(INSTALL_FORCE_UNIX_PATHS "Force unix-style installation" OFF) + + # OpenCV build options + # =================================================== +@@ -319,7 +323,7 @@ OCV_OPTION(CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON ) + OCV_OPTION(CV_DISABLE_OPTIMIZATION "Disable explicit optimized code (dispatched code/intrinsics/loop unrolling/etc)" OFF ) + OCV_OPTION(CV_TRACE "Enable OpenCV code trace" ON) + +-OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (${BUILD_DOCS} OR ${BUILD_EXAMPLES}) IF (NOT CMAKE_CROSSCOMPILING AND NOT APPLE_FRAMEWORK) ) ++OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (BUILD_DOCS OR BUILD_EXAMPLES) IF (NOT CMAKE_CROSSCOMPILING AND NOT APPLE_FRAMEWORK) ) + + if(ENABLE_IMPL_COLLECTION) + add_definitions(-DCV_COLLECT_IMPL_DATA) +@@ -355,7 +359,9 @@ else() + endif() + + if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) +- if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) ++ if(DEFINED OpenCV_DISABLE_ARCH_PATH) ++ ocv_update(OpenCV_INSTALL_BINARIES_PREFIX "") ++ elseif(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) + ocv_update(OpenCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/") + else() + message(STATUS "Can't detect runtime and/or arch") +@@ -409,12 +415,8 @@ else() + ocv_update(3P_LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/3rdparty/lib${LIB_SUFFIX}") + + if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) +- if(OpenCV_STATIC) +- ocv_update(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") +- else() +- ocv_update(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib${LIB_SUFFIX}") +- endif() +- ocv_update(OPENCV_3P_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") ++ ocv_update(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib${LIB_SUFFIX}") ++ ocv_update(OPENCV_3P_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib${LIB_SUFFIX}") + ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native) + ocv_update(OPENCV_JAR_INSTALL_PATH java) + ocv_update(OPENCV_OTHER_INSTALL_PATH etc) +@@ -856,7 +858,7 @@ if(NOT OPENCV_LICENSE_FILE) + endif() + + # for UNIX it does not make sense as LICENSE and readme will be part of the package automatically +-if(ANDROID OR NOT UNIX) ++if(ANDROID OR NOT UNIX AND INSTALL_LICENSE) + install(FILES ${OPENCV_LICENSE_FILE} + PERMISSIONS OWNER_READ GROUP_READ WORLD_READ + DESTINATION ./ COMPONENT libs) +diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake +index 57c79f2..23f1012 100644 +--- a/cmake/OpenCVGenConfig.cmake ++++ b/cmake/OpenCVGenConfig.cmake +@@ -103,7 +103,7 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) + endif() + endfunction() + +-if((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" OR UNIX) AND NOT ANDROID) ++if(((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" OR UNIX) AND NOT ANDROID) OR INSTALL_FORCE_UNIX_PATHS) + ocv_gen_config("${CMAKE_BINARY_DIR}/unix-install" "" "") + endif() + +@@ -115,7 +115,7 @@ endif() + # -------------------------------------------------------------------------------------------- + # Part 3/3: ${BIN_DIR}/win-install/OpenCVConfig.cmake -> For use within binary installers/packages + # -------------------------------------------------------------------------------------------- +-if(WIN32) ++if(WIN32 AND NOT INSTALL_FORCE_UNIX_PATHS) + if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) + if(BUILD_SHARED_LIBS) + set(_lib_suffix "lib") +diff --git a/cmake/OpenCVGenHeaders.cmake b/cmake/OpenCVGenHeaders.cmake +index 477b910..beace28 100644 +--- a/cmake/OpenCVGenHeaders.cmake ++++ b/cmake/OpenCVGenHeaders.cmake +@@ -1,7 +1,9 @@ + # platform-specific config file + configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h") + configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/cvconfig.h") +-install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) ++if(INSTALL_HEADERS) ++ install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) ++endif() + + # platform-specific config file + ocv_compiler_optimization_fill_cpu_config() +@@ -29,4 +31,6 @@ set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE + #endforeach() + + configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv_modules.hpp.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp") +-install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) ++if(INSTALL_HEADERS) ++ install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) ++endif() +diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake +index 8feb6df..1a098c4 100644 +--- a/cmake/OpenCVModule.cmake ++++ b/cmake/OpenCVModule.cmake +@@ -930,7 +930,9 @@ macro(_ocv_create_module) + foreach(hdr ${OPENCV_MODULE_${the_module}_HEADERS}) + string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}") + if(NOT hdr2 MATCHES "private" AND hdr2 MATCHES "^(opencv2/?.*)/[^/]+.h(..)?$" ) +- install(FILES ${hdr} OPTIONAL DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev) ++ if(INSTALL_HEADERS) ++ install(FILES ${hdr} OPTIONAL DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev) ++ endif() + endif() + endforeach() + endif() +diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt +index 1f0d720..86b9d89 100644 +--- a/data/CMakeLists.txt ++++ b/data/CMakeLists.txt +@@ -1,8 +1,10 @@ + file(GLOB HAAR_CASCADES haarcascades/*.xml) + file(GLOB LBP_CASCADES lbpcascades/*.xml) + +-install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) +-install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) ++if(INSTALL_OTHER) ++ install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) ++ install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) ++endif() + + if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) + install(DIRECTORY "${OPENCV_TEST_DATA_PATH}/" DESTINATION "${OPENCV_TEST_DATA_INSTALL_PATH}" COMPONENT "tests") +diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt +index b4e48e6..5ac6f16 100644 +--- a/include/CMakeLists.txt ++++ b/include/CMakeLists.txt +@@ -1,7 +1,9 @@ +-file(GLOB old_hdrs "opencv/*.h*") +-install(FILES ${old_hdrs} +- DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv +- COMPONENT dev) +-install(FILES "opencv2/opencv.hpp" +- DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 +- COMPONENT dev) ++if(INSTALL_HEADERS) ++ file(GLOB old_hdrs "opencv/*.h*") ++ install(FILES ${old_hdrs} ++ DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv ++ COMPONENT dev) ++ install(FILES "opencv2/opencv.hpp" ++ DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 ++ COMPONENT dev) ++endif() +-- +2.15.1.windows.2 + diff --git a/ports/opencv/0003-disable-downloading.patch b/ports/opencv/0003-disable-downloading.patch new file mode 100644 index 000000000..e51bab3b2 --- /dev/null +++ b/ports/opencv/0003-disable-downloading.patch @@ -0,0 +1,25 @@ +From 692f6f4fcf9bfddaf8779ba622f190c3a8c772f9 Mon Sep 17 00:00:00 2001 +From: Robert Schumacher +Date: Wed, 21 Feb 2018 17:20:22 -0800 +Subject: [PATCH 3/5] disable-downloading + +--- + cmake/OpenCVDownload.cmake | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cmake/OpenCVDownload.cmake b/cmake/OpenCVDownload.cmake +index f660502..90785f1 100644 +--- a/cmake/OpenCVDownload.cmake ++++ b/cmake/OpenCVDownload.cmake +@@ -151,6 +151,8 @@ function(ocv_download) + # Download + if(NOT EXISTS "${CACHE_CANDIDATE}") + ocv_download_log("#cmake_download \"${CACHE_CANDIDATE}\" \"${DL_URL}\"") ++ string(REPLACE "${OPENCV_DOWNLOAD_PATH}/" "opencv-cache/" CACHE_SUBPATH "${CACHE_CANDIDATE}") ++ message(FATAL_ERROR " Downloads are not permitted during configure. Please pre-download the file \"${CACHE_CANDIDATE}\":\n \n vcpkg_download_distfile(OCV_DOWNLOAD\n URLS \"${DL_URL}\"\n FILENAME \"${CACHE_SUBPATH}\"\n SHA512 0\n )") + file(DOWNLOAD "${DL_URL}" "${CACHE_CANDIDATE}" + INACTIVITY_TIMEOUT 60 + TIMEOUT 600 +-- +2.15.1.windows.2 + diff --git a/ports/opencv/0004-use-find-package-required.patch b/ports/opencv/0004-use-find-package-required.patch new file mode 100644 index 000000000..6d2fa5688 --- /dev/null +++ b/ports/opencv/0004-use-find-package-required.patch @@ -0,0 +1,97 @@ +From 7e02db97d43cb9aa331da0dbfce8c372c19ad32b Mon Sep 17 00:00:00 2001 +From: Robert Schumacher +Date: Wed, 21 Feb 2018 17:20:49 -0800 +Subject: [PATCH 4/5] use-find-package-required + +--- + cmake/OpenCVFindLibsGrfmt.cmake | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake +index 0ae58c8..5832d56 100644 +--- a/cmake/OpenCVFindLibsGrfmt.cmake ++++ b/cmake/OpenCVFindLibsGrfmt.cmake +@@ -6,7 +6,7 @@ + if(BUILD_ZLIB) + ocv_clear_vars(ZLIB_FOUND) + else() +- find_package(ZLIB "${MIN_VER_ZLIB}") ++ find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED) + if(ZLIB_FOUND AND ANDROID) + if(ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib/libz.so" OR + ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib64/libz.so") +@@ -31,7 +31,7 @@ if(WITH_JPEG) + if(BUILD_JPEG) + ocv_clear_vars(JPEG_FOUND) + else() +- include(FindJPEG) ++ find_package(JPEG REQUIRED) + endif() + + if(NOT JPEG_FOUND) +@@ -52,7 +52,7 @@ if(WITH_TIFF) + if(BUILD_TIFF) + ocv_clear_vars(TIFF_FOUND) + else() +- include(FindTIFF) ++ find_package(TIFF REQUIRED) + if(TIFF_FOUND) + ocv_parse_header("${TIFF_INCLUDE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION) + endif() +@@ -95,7 +95,7 @@ if(WITH_WEBP) + if(BUILD_WEBP) + ocv_clear_vars(WEBP_FOUND WEBP_LIBRARY WEBP_LIBRARIES WEBP_INCLUDE_DIR) + else() +- include(cmake/OpenCVFindWebP.cmake) ++ find_package(WebP REQUIRED) + if(WEBP_FOUND) + set(HAVE_WEBP 1) + endif() +@@ -136,7 +136,7 @@ if(WITH_JASPER) + if(BUILD_JASPER) + ocv_clear_vars(JASPER_FOUND) + else() +- include(FindJasper) ++ find_package(Jasper REQUIRED) + endif() + + if(NOT JASPER_FOUND) +@@ -160,7 +160,7 @@ if(WITH_PNG) + if(BUILD_PNG) + ocv_clear_vars(PNG_FOUND) + else() +- include(FindPNG) ++ find_package(PNG REQUIRED) + if(PNG_FOUND) + include(CheckIncludeFile) + check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H) +@@ -192,7 +192,7 @@ if(WITH_OPENEXR) + if(BUILD_OPENEXR) + ocv_clear_vars(OPENEXR_FOUND) + else() +- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake") ++ find_package(OpenEXR REQUIRED) + endif() + + if(NOT OPENEXR_FOUND) +@@ -208,7 +208,7 @@ endif() + + # --- GDAL (optional) --- + if(WITH_GDAL) +- find_package(GDAL QUIET) ++ find_package(GDAL REQUIRED) + + if(NOT GDAL_FOUND) + set(HAVE_GDAL NO) +@@ -220,7 +220,7 @@ if(WITH_GDAL) + endif() + + if (WITH_GDCM) +- find_package(GDCM QUIET) ++ find_package(GDCM REQUIRED) + if(NOT GDCM_FOUND) + set(HAVE_GDCM NO) + ocv_clear_vars(GDCM_VERSION GDCM_LIBRARIES) +-- +2.15.1.windows.2 + diff --git a/ports/opencv/001-fix-uwp.patch b/ports/opencv/001-fix-uwp.patch deleted file mode 100644 index fa047ee4e..000000000 --- a/ports/opencv/001-fix-uwp.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake -index 0dcf7ed..c722a03 100644 ---- "a/cmake/OpenCVCompilerOptions.cmake" -+++ "b/cmake/OpenCVCompilerOptions.cmake" -@@ -21,6 +21,9 @@ if(MSVC) - string(REPLACE "/EHsc" "/EHa" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "Flags used by the compiler during all build types." FORCE) - endif() -+ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW") -+ endif() - endif() - - set(OPENCV_EXTRA_FLAGS "") - diff --git "a/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp" "b/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp" -index f4147f3..498f414 100644 ---- "a/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp" -+++ "b/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp" -@@ -24,6 +24,8 @@ - // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - // POSSIBILITY OF SUCH DAMAGE. - -+#include "opencv2/core/cvdef.h" -+ - using namespace Windows::UI::Xaml::Controls; - - namespace cv -diff --git "a/modules/highgui/src/window_winrt_bridge.hpp" "b/modules/highgui/src/window_winrt_bridge.hpp" -index 25f4aef..5429f0b 100644 ---- "a/modules/highgui/src/window_winrt_bridge.hpp" -+++ "b/modules/highgui/src/window_winrt_bridge.hpp" -@@ -28,6 +28,7 @@ - - #include - #include -+#include "opencv2/highgui/highgui_c.h" - - using namespace Windows::UI::Xaml::Controls; - -diff --git "a/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp" "b/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp" -index 236e227..9f5970e 100644 ---- "a/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp" -+++ "b/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp" -@@ -94,10 +94,10 @@ Media::CaptureFrameGrabber::~CaptureFrameGrabber() - - void Media::CaptureFrameGrabber::ShowCameraSettings() - { --#if WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP -+#if (WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP) && (WINAPI_FAMILY!=WINAPI_FAMILY_APP) - if (_state == State::Started) - { -- CameraOptionsUI::Show(_capture.Get()); -+ CameraOptionsUI::Show(_capture.Get()); // TODO: Turn it back by adding reference to UWP Desktop Extensions - } - #endif - } - \ No newline at end of file diff --git a/ports/opencv/002-fix-uwp.patch b/ports/opencv/002-fix-uwp.patch deleted file mode 100644 index 22d006862..000000000 --- a/ports/opencv/002-fix-uwp.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b4265bd..f1621e0 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -271,7 +271,7 @@ OCV_OPTION(INSTALL_FORCE_UNIX_PATHS "Force unix-style installation" OFF) - # OpenCV build options - # =================================================== - OCV_OPTION(ENABLE_CCACHE "Use ccache" (UNIX AND NOT IOS AND (CMAKE_GENERATOR MATCHES "Makefile" OR CMAKE_GENERATOR MATCHES "Ninja")) ) --OCV_OPTION(ENABLE_PRECOMPILED_HEADERS "Use precompiled headers" ON IF (NOT IOS AND NOT CMAKE_CROSSCOMPILING) ) -+OCV_OPTION(ENABLE_PRECOMPILED_HEADERS "Use precompiled headers" ON IF (NOT IOS AND (MSVC OR NOT CMAKE_CROSSCOMPILING)) ) - OCV_OPTION(ENABLE_SOLUTION_FOLDERS "Solution folder in Visual Studio or in other IDEs" (MSVC_IDE OR CMAKE_GENERATOR MATCHES Xcode) ) - OCV_OPTION(ENABLE_PROFILING "Enable profiling in the GCC compiler (Add flags: -g -pg)" OFF IF CMAKE_COMPILER_IS_GNUCXX ) - OCV_OPTION(ENABLE_COVERAGE "Enable coverage collection with GCov" OFF IF CMAKE_COMPILER_IS_GNUCXX ) -diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake -index c8242dd..97edd14 100644 ---- a/cmake/OpenCVModule.cmake -+++ b/cmake/OpenCVModule.cmake -@@ -730,7 +730,7 @@ macro(ocv_create_module) - set(the_module_target ${the_module}) - endif() - -- if(WINRT) -+ if(WINRT AND BUILD_TESTS) - # removing APPCONTAINER from modules to run from console - # in case of usual starting of WinRT test apps output is missing - # so starting of console version w/o APPCONTAINER is required to get test results diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index 9d15073e0..df27dc08c 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,12 +1,16 @@ Source: opencv Version: 3.4.0-3 -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, protobuf (windows) +Build-Depends: opengl, zlib, protobuf (windows) Description: computer vision library +Default-Features: jpeg, png, tiff, eigen Feature: sfm Build-Depends: eigen3, glog, gflags, ceres Description: opencv_sfm module +Feature: contrib +Description: opencv_contrib module + Feature: cuda Build-Depends: cuda Description: CUDA support for opencv @@ -14,6 +18,9 @@ Description: CUDA support for opencv Feature: ffmpeg Description: prebuilt ffmpeg support for opencv +Feature: ipp +Description: Enable Intel Integrated Performance Primitives + Feature: qt Build-Depends: qt5 Description: Qt GUI support for opencv @@ -25,3 +32,31 @@ Description: vtk support for opencv Feature: gdcm Build-Depends: gdcm2 Description: GDCM support for opencv + +Feature: webp +Build-Depends: libwebp +Description: WebP support for opencv + +Feature: openexr +Build-Depends: openexr +Description: OpenEXR support for opencv + +Feature: tiff +Build-Depends: tiff +Description: TIFF support for opencv + +Feature: png +Build-Depends: libpng +Description: PNG support for opencv + +Feature: jpeg +Build-Depends: libjpeg-turbo +Description: JPEG support for opencv + +Feature: jasper +Build-Depends: jasper +Description: JPEG 2000 support for opencv + +Feature: eigen +Build-Depends: eigen3 +Description: Eigen support for opencv diff --git a/ports/opencv/filesystem-uwp.patch b/ports/opencv/filesystem-uwp.patch deleted file mode 100644 index c4ddb6b78..000000000 --- a/ports/opencv/filesystem-uwp.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/modules/core/src/utils/filesystem.cpp b/modules/core/src/utils/filesystem.cpp -index 266a92f..1d5a302 100644 ---- a/modules/core/src/utils/filesystem.cpp -+++ b/modules/core/src/utils/filesystem.cpp -@@ -186,7 +186,7 @@ bool createDirectory(const cv::String& path) - wchar_t wpath[MAX_PATH]; - size_t copied = mbstowcs(wpath, path.c_str(), MAX_PATH); - CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1)); -- int result = CreateDirectoryA(wpath, NULL) ? 0 : -1; -+ int result = CreateDirectoryW(wpath, NULL) ? 0 : -1; - #else - int result = _mkdir(path.c_str()); - #endif -@@ -248,8 +248,16 @@ struct FileLock::Impl - int numRetries = 5; - do - { -+#ifdef WINRT -+ wchar_t wpath[MAX_PATH]; -+ size_t copied = mbstowcs(wpath, fname, MAX_PATH); -+ CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1)); -+ handle = ::CreateFile2(wpath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, -+ OPEN_EXISTING, NULL); -+#else - handle = ::CreateFileA(fname, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); -+#endif - if (INVALID_HANDLE_VALUE == handle) - { - if (ERROR_SHARING_VIOLATION == GetLastError()) -@@ -399,7 +407,9 @@ cv::String getCacheDirectory(const char* sub_directory_name, const char* configu - if (cache_path.empty()) - { - cv::String default_cache_path; --#ifdef _WIN32 -+#if WINRT -+ // no defaults -+#elif defined _WIN32 - char tmp_path_buf[MAX_PATH+1] = {0}; - DWORD res = GetTempPath(MAX_PATH, tmp_path_buf); - if (res > 0 && res <= MAX_PATH) diff --git a/ports/opencv/msvs-fix-2017-u5.patch b/ports/opencv/msvs-fix-2017-u5.patch deleted file mode 100644 index ab0d0d0ff..000000000 --- a/ports/opencv/msvs-fix-2017-u5.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 62737c777c9314ee2e4b4e595daa830ba12765e2 Mon Sep 17 00:00:00 2001 -From: Mikhail Paulyshka -Date: Sat, 4 Nov 2017 23:52:37 +0300 -Subject: [PATCH] cmake: add support for MSVS 2017 update 5 - ---- - cmake/OpenCVDetectCXXCompiler.cmake | 2 +- - cmake/templates/OpenCVConfig.root-WIN32.cmake.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/cmake/OpenCVDetectCXXCompiler.cmake b/cmake/OpenCVDetectCXXCompiler.cmake -index cfb613b..3874467 100644 ---- a/cmake/OpenCVDetectCXXCompiler.cmake -+++ b/cmake/OpenCVDetectCXXCompiler.cmake -@@ -114,7 +114,7 @@ if(MSVC) - set(OpenCV_RUNTIME vc12) - elseif(MSVC_VERSION EQUAL 1900) - set(OpenCV_RUNTIME vc14) -- elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911) -+ elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911 OR MSVC_VERSION EQUAL 1912) - set(OpenCV_RUNTIME vc15) - else() - message(WARNING "OpenCV does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set OpenCV_RUNTIME") -diff --git a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in -index 7dc6666..846c400 100644 ---- a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in -+++ b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in -@@ -78,7 +78,7 @@ if(MSVC) - set(OpenCV_RUNTIME vc12) - elseif(MSVC_VERSION EQUAL 1900) - set(OpenCV_RUNTIME vc14) -- elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911) -+ elseif(MSVC_VERSION EQUAL 1910 OR MSVC_VERSION EQUAL 1911 OR MSVC_VERSION EQUAL 1912) - set(OpenCV_RUNTIME vc15) - endif() - elseif(MINGW) --- -2.14.1.windows.1 - diff --git a/ports/opencv/no-double-expand-enable-pylint.patch b/ports/opencv/no-double-expand-enable-pylint.patch deleted file mode 100644 index 9eb5563d8..000000000 --- a/ports/opencv/no-double-expand-enable-pylint.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c46fc17..07507b6 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -314,7 +314,7 @@ OCV_OPTION(CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON ) - OCV_OPTION(CV_DISABLE_OPTIMIZATION "Disable explicit optimized code (dispatched code/intrinsics/loop unrolling/etc)" OFF ) - OCV_OPTION(CV_TRACE "Enable OpenCV code trace" ON) - --OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (${BUILD_DOCS} OR ${BUILD_EXAMPLES}) ) -+OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (BUILD_DOCS OR BUILD_EXAMPLES) ) - - if(ENABLE_IMPL_COLLECTION) - add_definitions(-DCV_COLLECT_IMPL_DATA) diff --git a/ports/opencv/open_contrib-remove-waldboost.patch b/ports/opencv/open_contrib-remove-waldboost.patch deleted file mode 100644 index 6c4da30ae..000000000 --- a/ports/opencv/open_contrib-remove-waldboost.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/modules/xobjdetect/CMakeLists.txt b/modules/xobjdetect/CMakeLists.txt -index 567909b..2f30b41 100644 ---- a/modules/xobjdetect/CMakeLists.txt -+++ b/modules/xobjdetect/CMakeLists.txt -@@ -1,5 +1,2 @@ - set(the_description "Object detection algorithms") - ocv_define_module(xobjdetect opencv_core opencv_imgproc opencv_highgui opencv_objdetect WRAP python) --if (NOT APPLE_FRAMEWORK) -- add_subdirectory(tools) --endif() --- -2.12.0.windows.1 - diff --git a/ports/opencv/opencv-installation-options.patch b/ports/opencv/opencv-installation-options.patch deleted file mode 100644 index cfb401836..000000000 --- a/ports/opencv/opencv-installation-options.patch +++ /dev/null @@ -1,137 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cc45f6f..b4265bd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -263,6 +263,10 @@ OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF ) - OCV_OPTION(INSTALL_ANDROID_EXAMPLES "Install Android examples" OFF IF ANDROID ) - OCV_OPTION(INSTALL_TO_MANGLED_PATHS "Enables mangled install paths, that help with side by side installs." OFF IF (UNIX AND NOT ANDROID AND NOT APPLE_FRAMEWORK AND BUILD_SHARED_LIBS) ) - OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binaries and test data" OFF) -+OCV_OPTION(INSTALL_HEADERS "Install header files" ON) -+OCV_OPTION(INSTALL_LICENSE "Install license file" ON) -+OCV_OPTION(INSTALL_OTHER "Install other files" ON) -+OCV_OPTION(INSTALL_FORCE_UNIX_PATHS "Force unix-style installation" OFF) - - # OpenCV build options - # =================================================== -@@ -330,7 +334,9 @@ else() - endif() - - if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) -- if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) -+ if(DEFINED OpenCV_DISABLE_ARCH_PATH) -+ ocv_update(OpenCV_INSTALL_BINARIES_PREFIX "") -+ elseif(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) - ocv_update(OpenCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/") - else() - message(STATUS "Can't detect runtime and/or arch") -@@ -784,7 +790,7 @@ if(NOT OPENCV_LICENSE_FILE) - endif() - - # for UNIX it does not make sense as LICENSE and readme will be part of the package automatically --if(ANDROID OR NOT UNIX) -+if(ANDROID OR NOT UNIX AND INSTALL_LICENSE) - install(FILES ${OPENCV_LICENSE_FILE} - PERMISSIONS OWNER_READ GROUP_READ WORLD_READ - DESTINATION ./ COMPONENT libs) -diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake -index 206acfd..b4c223e 100644 ---- a/cmake/OpenCVGenConfig.cmake -+++ b/cmake/OpenCVGenConfig.cmake -@@ -91,7 +91,7 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) - endif() - endfunction() - --if(UNIX AND NOT ANDROID) -+if((UNIX AND NOT ANDROID) OR INSTALL_FORCE_UNIX_PATHS) - ocv_gen_config("${CMAKE_BINARY_DIR}/unix-install" "" "") - endif() - -@@ -103,7 +103,7 @@ endif() - # -------------------------------------------------------------------------------------------- - # Part 3/3: ${BIN_DIR}/win-install/OpenCVConfig.cmake -> For use within binary installers/packages - # -------------------------------------------------------------------------------------------- --if(WIN32) -+if(WIN32 AND NOT INSTALL_FORCE_UNIX_PATHS) - if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) - if(BUILD_SHARED_LIBS) - set(_lib_suffix "lib") -diff --git a/cmake/OpenCVGenHeaders.cmake b/cmake/OpenCVGenHeaders.cmake -index 2988979..810871b 100644 ---- a/cmake/OpenCVGenHeaders.cmake -+++ b/cmake/OpenCVGenHeaders.cmake -@@ -1,7 +1,9 @@ - # platform-specific config file - configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h") - configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/cvconfig.h") --install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) -+if(INSTALL_HEADERS) -+ install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) -+endif() - - # ---------------------------------------------------------------------------- - # opencv_modules.hpp based on actual modules list -@@ -25,4 +27,6 @@ set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE - #endforeach() - - configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv_modules.hpp.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp") --install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) -+if(INSTALL_HEADERS) -+ install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) -+endif() -diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake -index 742a287..c8242dd 100644 ---- a/cmake/OpenCVModule.cmake -+++ b/cmake/OpenCVModule.cmake -@@ -880,7 +880,9 @@ macro(_ocv_create_module) - foreach(hdr ${OPENCV_MODULE_${m}_HEADERS}) - string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}") - if(NOT hdr2 MATCHES "opencv2/${m}/private.*" AND hdr2 MATCHES "^(opencv2/?.*)/[^/]+.h(..)?$" ) -- install(FILES ${hdr} OPTIONAL DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev) -+ if(INSTALL_HEADERS) -+ install(FILES ${hdr} OPTIONAL DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev) -+ endif() - endif() - endforeach() - endif() -diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt -index 1f0d720..86b9d89 100644 ---- a/data/CMakeLists.txt -+++ b/data/CMakeLists.txt -@@ -1,8 +1,10 @@ - file(GLOB HAAR_CASCADES haarcascades/*.xml) - file(GLOB LBP_CASCADES lbpcascades/*.xml) - --install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) --install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) -+if(INSTALL_OTHER) -+ install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) -+ install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) -+endif() - - if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) - install(DIRECTORY "${OPENCV_TEST_DATA_PATH}/" DESTINATION "${OPENCV_TEST_DATA_INSTALL_PATH}" COMPONENT "tests") -diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt -index b4e48e6..d5ed455 100644 ---- a/include/CMakeLists.txt -+++ b/include/CMakeLists.txt -@@ -1,7 +1,9 @@ --file(GLOB old_hdrs "opencv/*.h*") --install(FILES ${old_hdrs} -- DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv -- COMPONENT dev) --install(FILES "opencv2/opencv.hpp" -- DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 -- COMPONENT dev) -+if(INSTALL_HEADERS) -+ file(GLOB old_hdrs "opencv/*.h*") -+ install(FILES ${old_hdrs} -+ DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv -+ COMPONENT dev) -+ install(FILES "opencv2/opencv.hpp" -+ DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 -+ COMPONENT dev) -+endif() -\ No newline at end of file --- -2.9.0.windows.1 - diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index d9d9d7344..5ccf1c66f 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -1,44 +1,85 @@ include(vcpkg_common_functions) +set(OPENCV_PORT_VERSION "3.4.0") + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO opencv/opencv - REF 3.4.0 + REF ${OPENCV_PORT_VERSION} SHA512 aa7e475f356ffdaeb2ae9f7e9380c92cae58fabde9cd3b23c388f9190b8fde31ee70d16648042d0c43c03b2ff1f15e4be950be7851133ea0aa82cf6e42ba4710 HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/opencv-installation-options.patch" - "${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch" - "${CMAKE_CURRENT_LIST_DIR}/002-fix-uwp.patch" - "${CMAKE_CURRENT_LIST_DIR}/no-double-expand-enable-pylint.patch" - "${CMAKE_CURRENT_LIST_DIR}/msvs-fix-2017-u5.patch" - "${CMAKE_CURRENT_LIST_DIR}/filesystem-uwp.patch" -) -file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/libjpeg ${SOURCE_PATH}/3rdparty/libpng ${SOURCE_PATH}/3rdparty/zlib ${SOURCE_PATH}/3rdparty/libtiff) - -vcpkg_from_github( - OUT_SOURCE_PATH CONTRIB_SOURCE_PATH - REPO opencv/opencv_contrib - REF 3.4.0 - SHA512 53f6127304f314d3be834f79520d4bc8a75e14cad8c9c14a66a7a6b37908ded114d24e3a2c664d4ec2275903db08ac826f29433e810c6400f3adc2714a3c5be7 - HEAD_REF master + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/0001-winrt-fixes.patch" + "${CMAKE_CURRENT_LIST_DIR}/0002-install-options.patch" + "${CMAKE_CURRENT_LIST_DIR}/0003-disable-downloading.patch" + "${CMAKE_CURRENT_LIST_DIR}/0004-use-find-package-required.patch" ) -vcpkg_apply_patches( - SOURCE_PATH ${CONTRIB_SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/open_contrib-remove-waldboost.patch" +vcpkg_download_distfile(TINYDNN_ARCHIVE + URLS "https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz" + FILENAME "opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz" + SHA512 5f2c1a161771efa67e85b1fea395953b7744e29f61187ac5a6c54c912fb195b3aef9a5827135c3668bd0eeea5ae04a33cc433e1f6683e2b7955010a2632d168b ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) +set(CMAKE_MODULE_PATH) + set(BUILD_opencv_sfm OFF) if("sfm" IN_LIST FEATURES) set(BUILD_opencv_sfm ON) endif() +set(BUILD_opencv_contrib OFF) +if("contrib" IN_LIST FEATURES) + set(BUILD_opencv_contrib ON) + + # Used for opencv's face module + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat" + FILENAME "opencv-cache/data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat" + SHA512 c16e60a6c4bb4de3ab39b876ae3c3f320ea56f69c93e9303bd2dff8760841dcd71be4161fff8bc71e8fe4fe8747fa8465d49d6bd8f5ebcdaea161f4bc2da7c93 + ) + + function(download_opencv_3rdparty ID COMMIT HASH) + if(NOT EXISTS "${DOWNLOADS}/opencv-cache/${ID}/${COMMIT}.stamp") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://github.com/opencv/opencv_3rdparty/archive/${COMMIT}.zip" + FILENAME "opencv_3rdparty-${COMMIT}.zip" + SHA512 ${HASH} + ) + vcpkg_extract_source_archive(${OCV_DOWNLOAD}) + file(MAKE_DIRECTORY "${DOWNLOADS}/opencv-cache/${ID}") + file(GLOB XFEATURES2D_I ${CURRENT_BUILDTREES_DIR}/src/opencv_3rdparty-${COMMIT}/*) + foreach(FILE ${XFEATURES2D_I}) + file(COPY ${FILE} DESTINATION "${DOWNLOADS}/opencv-cache/${ID}") + get_filename_component(XFEATURES2D_I_NAME "${FILE}" NAME) + file(MD5 "${FILE}" FILE_HASH) + file(RENAME "${DOWNLOADS}/opencv-cache/${ID}/${XFEATURES2D_I_NAME}" "${DOWNLOADS}/opencv-cache/${ID}/${FILE_HASH}-${XFEATURES2D_I_NAME}") + endforeach() + file(WRITE "${DOWNLOADS}/opencv-cache/${ID}/${COMMIT}.stamp") + endif() + endfunction() + + # Used for opencv's xfeature2d module + download_opencv_3rdparty( + xfeatures2d/boostdesc + 34e4206aef44d50e6bbcd0ab06354b52e7466d26 + 2ccdc8fb59da55eabc73309a80a4d3b1e73e2341027cdcdd2d714e0f519e60f243f38f79b13ed3de32f595aa23e4f86418eed42e741f32a81b1e6e0879190601 + ) + + # Used for opencv's xfeature2d module + download_opencv_3rdparty( + xfeatures2d/vgg + fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d + 7051f5d6ccb938d296b919dd6d5dcddc5afb527aed456639c9984276a8f64565c084d96a72499a7756f127f8d2b1ce9ab70e4cbb3f89c4e16f82296c2a15daed + ) +endif() + set(WITH_CUDA OFF) if("cuda" IN_LIST FEATURES) set(WITH_CUDA ON) @@ -47,6 +88,40 @@ endif() set(WITH_FFMPEG OFF) if("ffmpeg" IN_LIST FEATURES) set(WITH_FFMPEG ON) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/66b1fed06cf3510235f367f96aa26da5cb234a15/ffmpeg/opencv_ffmpeg.dll" + FILENAME "opencv-cache/ffmpeg/3ae76b105113d944984b2351c61e21c6-opencv_ffmpeg.dll" + SHA512 62ad0d6de7a7887a08313e20c474b4f98ae7746a2c10cce2ea5eae284250830e721b81308a401d0fadd238dda85c3ec0f347b41361fd56e473e790e3c40fa554 + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/66b1fed06cf3510235f367f96aa26da5cb234a15/ffmpeg/opencv_ffmpeg_64.dll" + FILENAME "opencv-cache/ffmpeg/cf3bb5bc9d393b022ea7a42eb63e794d-opencv_ffmpeg_64.dll" + SHA512 5de95a180895aaa5186578572dd1968d2ff3ce8d24c46755c94d768ea6f463c92416c86e851b06b15fc314dd852a456282a56f5b14d6fb9130a054ac9e8230bd + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/66b1fed06cf3510235f367f96aa26da5cb234a15/ffmpeg/ffmpeg_version.cmake" + FILENAME "opencv-cache/ffmpeg/ec59008da403fb18ab3c1ed66aed583b-ffmpeg_version.cmake" + SHA512 97784032256b104ed9bb3e3f71824985c551b3e4a86928bcf60d3beef50817f66cf276256e140e645e78e04f4463f3665bdda0574585d05af640fb43d0ba4cb9 + ) +endif() + +set(WITH_IPP OFF) +if("ipp" IN_LIST FEATURES) + set(WITH_IPP ON) + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_download_distfile(IPPICV_ARCHIVE + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/dfe3162c237af211e98b8960018b564bc209261d/ippicv/ippicv_2017u3_win_intel64_general_20170822.zip" + FILENAME "opencv-cache/ippicv/0421e642bc7ad741a2236d3ec4190bdd-ippicv_2017u3_win_intel64_general_20170822.zip" + SHA512 1b2b66ac60e5b6ba2fc95a3839d09b7fcfb42628dc6e01648727ee5394f6405702f69f741371627a9e1690294147c730196f1c9872339301c92a1424f159df6c + ) + else() + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/dfe3162c237af211e98b8960018b564bc209261d/ippicv/ippicv_2017u3_win_ia32_general_20170822.zip" + FILENAME "opencv-cache/ippicv/8a7680ae352c192de2e2e34936164bd0-ippicv_2017u3_win_ia32_general_20170822.zip" + SHA512 6bbe08264b56117d4a00118088d72274396964bb904fb0719fc48beeb458ac31bea3d4d2fa2e0449f55af42471758f2c090c82061c91985c8b7994ed3b71df81 + ) + endif() endif() set(WITH_QT OFF) @@ -59,16 +134,64 @@ if("vtk" IN_LIST FEATURES) set(WITH_VTK ON) endif() +set(WITH_WEBP OFF) +if("webp" IN_LIST FEATURES) + set(WITH_WEBP ON) + list(APPEND CMAKE_MODULE_PATH ${CURRENT_INSTALLED_DIR}/share/libwebp) +endif() + set(WITH_GDCM OFF) if("gdcm" IN_LIST FEATURES) set(WITH_GDCM ON) endif() +set(WITH_OPENEXR OFF) +if("openexr" IN_LIST FEATURES) + set(WITH_OPENEXR ON) + list(APPEND CMAKE_MODULE_PATH ${CURRENT_INSTALLED_DIR}/share/openexr) +endif() + set(WITH_MSMF ON) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(WITH_MSMF OFF) endif() +set(WITH_TIFF OFF) +if("tiff" IN_LIST FEATURES) + set(WITH_TIFF ON) +endif() + +set(WITH_JPEG OFF) +if("jpeg" IN_LIST FEATURES) + set(WITH_JPEG ON) +endif() + +set(WITH_JASPER OFF) +if("jasper" IN_LIST FEATURES) + set(WITH_JASPER ON) +endif() + +set(WITH_PNG OFF) +if("png" IN_LIST FEATURES) + set(WITH_PNG ON) +endif() + +set(WITH_EIGEN OFF) +if("eigen" IN_LIST FEATURES) + set(WITH_EIGEN ON) +endif() + +if(BUILD_opencv_contrib) + vcpkg_from_github( + OUT_SOURCE_PATH CONTRIB_SOURCE_PATH + REPO opencv/opencv_contrib + REF ${OPENCV_PORT_VERSION} + SHA512 53f6127304f314d3be834f79520d4bc8a75e14cad8c9c14a66a7a6b37908ded114d24e3a2c664d4ec2275903db08ac826f29433e810c6400f3adc2714a3c5be7 + HEAD_REF master + ) + set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules") +endif() + set(BUILD_opencv_line_descriptor ON) set(BUILD_opencv_saliency ON) set(BUILD_opencv_bgsegm ON) @@ -78,7 +201,10 @@ if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") set(BUILD_opencv_bgsegm OFF) endif() +string(REPLACE ";" "\\\\\;" CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}") + vcpkg_configure_cmake( + PREFER_NINJA SOURCE_PATH ${SOURCE_PATH} OPTIONS # Ungrouped Entries @@ -88,13 +214,16 @@ vcpkg_configure_cmake( # BUILD -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF + -DBUILD_JASPER=OFF -DBUILD_JPEG=OFF + -DBUILD_OPENEXR=OFF -DBUILD_PACKAGE=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_PNG=OFF -DBUILD_PROTOBUF=OFF -DBUILD_TESTS=OFF -DBUILD_TIFF=OFF + -DBUILD_WEBP=OFF -DBUILD_WITH_DEBUG_INFO=ON -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT} -DBUILD_ZLIB=OFF @@ -107,8 +236,10 @@ vcpkg_configure_cmake( -DBUILD_opencv_line_descriptor=${BUILD_opencv_line_descriptor} -DBUILD_opencv_saliency=${BUILD_opencv_saliency} -DBUILD_opencv_bgsegm=${BUILD_opencv_bgsegm} + # CMAKE -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON + "-DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}" # ENABLE -DENABLE_CXX11=ON -DENABLE_PYLINT=OFF @@ -118,12 +249,13 @@ vcpkg_configure_cmake( # OPENCV -DOPENCV_CONFIG_INSTALL_PATH=share/opencv "-DOPENCV_DOWNLOAD_PATH=${DOWNLOADS}/opencv-cache" - -DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules + ${BUILD_WITH_CONTRIB_FLAG} -DOPENCV_OTHER_INSTALL_PATH=share/opencv # WITH -DWITH_CUBLAS=OFF -DWITH_CUDA=${WITH_CUDA} -DWITH_FFMPEG=${WITH_FFMPEG} + -DWITH_IPP=${WITH_IPP} -DWITH_LAPACK=OFF -DWITH_MSMF=${WITH_MSMF} -DWITH_OPENCLAMDBLAS=OFF @@ -131,6 +263,13 @@ vcpkg_configure_cmake( -DWITH_QT=${WITH_QT} -DWITH_VTK=${WITH_VTK} -DWITH_GDCM=${WITH_GDCM} + -DWITH_WEBP=${WITH_WEBP} + -DWITH_OPENEXR=${WITH_OPENEXR} + -DWITH_TIFF=${WITH_TIFF} + -DWITH_JPEG=${WITH_JPEG} + -DWITH_PNG=${WITH_PNG} + -DWITH_JASPER=${WITH_JASPER} + -DWITH_EIGEN=${WITH_EIGEN} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -DINSTALL_OTHER=OFF @@ -179,39 +318,25 @@ if(STATICLIB) endif() file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVConfig.cmake OPENCV_CONFIG) -string(REPLACE " vc15" - " ${OpenCV_RUNTIME}" OPENCV_CONFIG "${OPENCV_CONFIG}") -string(REPLACE " vc14" - " ${OpenCV_RUNTIME}" OPENCV_CONFIG "${OPENCV_CONFIG}") +string(REPLACE "/staticlib/" + "/lib/" OPENCV_CONFIG "${OPENCV_CONFIG}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVConfig.cmake "${OPENCV_CONFIG}") -if(EXISTS "${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib") - file(RENAME ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib) -endif() -file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-release.cmake OPENCV_CONFIG_LIB) +file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-release.cmake OPENCV_CONFIG_LIB) string(REPLACE "/staticlib/" "/lib/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") -string(REPLACE "/${OpenCV_ARCH}/${OpenCV_RUNTIME}/" - "/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") -string(REPLACE "${CURRENT_INSTALLED_DIR}" - "\${_IMPORT_PREFIX}" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-release.cmake "${OPENCV_CONFIG_LIB}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-release.cmake "${OPENCV_CONFIG_LIB}") -if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib") - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/staticlib ${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib) -endif() -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-debug.cmake OPENCV_CONFIG_LIB) +file(READ ${CURRENT_PACKAGES_DIR}/debug/share/opencv/OpenCVModules-debug.cmake OPENCV_CONFIG_LIB) string(REPLACE "/staticlib/" "/lib/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") -string(REPLACE "/${OpenCV_ARCH}/${OpenCV_RUNTIME}/" - "/" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") string(REPLACE "PREFIX}/lib" "PREFIX}/debug/lib" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") string(REPLACE "PREFIX}/bin" "PREFIX}/debug/bin" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") -string(REPLACE "${CURRENT_INSTALLED_DIR}" - "\${_IMPORT_PREFIX}" OPENCV_CONFIG_LIB "${OPENCV_CONFIG_LIB}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/${OpenCV_ARCH}/${OpenCV_RUNTIME}/lib/OpenCVModules-debug.cmake "${OPENCV_CONFIG_LIB}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-debug.cmake "${OPENCV_CONFIG_LIB}") + +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share/opencv/OpenCVModules.cmake ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 5d399d585a0caaae12bf6e10928e1022102470d2 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Feb 2018 06:16:21 -0800 Subject: [opencv] Ensure rework is starting from a fresh set of sources --- ports/opencv/portfile.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 5ccf1c66f..f3efaa779 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -2,6 +2,14 @@ include(vcpkg_common_functions) set(OPENCV_PORT_VERSION "3.4.0") +# This is to ensure we are patching clean sources. These lines can be removed when the OpenCV version is next upgraded. +if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/opencv-${OPENCV_PORT_VERSION}" AND NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/opencv-${OPENCV_PORT_VERSION}/rework.stamp") + file(REMOVE_RECURSE + "${CURRENT_BUILDTREES_DIR}/src/opencv-opencv-${OPENCV_PORT_VERSION}.tar.gz.extracted" + "${CURRENT_BUILDTREES_DIR}/src/opencv-${OPENCV_PORT_VERSION}" + ) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO opencv/opencv @@ -19,6 +27,8 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/0004-use-find-package-required.patch" ) +file(WRITE "${CURRENT_BUILDTREES_DIR}/src/opencv-${OPENCV_PORT_VERSION}/rework.stamp") + vcpkg_download_distfile(TINYDNN_ARCHIVE URLS "https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz" FILENAME "opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz" -- cgit v1.2.3 From 31b27eaa1b29c856ffc16b0560a44491d27bea01 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 22 Feb 2018 19:48:37 -0800 Subject: Introduce vcpkgDependency.xml instead of hardcoding --- scripts/fetchDependency.ps1 | 110 ++++++++++++------------------------------ scripts/vcpkgDependencies.xml | 48 ++++++++++++++++++ 2 files changed, 79 insertions(+), 79 deletions(-) create mode 100644 scripts/vcpkgDependencies.xml diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index ec3cdc83a..5f7902881 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -1,124 +1,76 @@ [CmdletBinding()] param( - [Parameter(Mandatory=$true)][string]$Dependency + [Parameter(Mandatory=$true)][string]$dependency ) $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition . "$scriptsDir\VcpkgPowershellUtils.ps1" -Write-Verbose "Fetching dependency: $Dependency" +Write-Verbose "Fetching dependency: $dependency" $vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" -function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) +function fetchDependencyInternal([Parameter(Mandatory=$true)][string]$dependency) { - # Enums (without resorting to C#) are only available on powershell 5+. - $ExtractionType_NO_EXTRACTION_REQUIRED = 0 - $ExtractionType_ZIP = 1 - $ExtractionType_SELF_EXTRACTING_7Z = 2 + $dependency = $dependency.toLower() - if($Dependency -eq "cmake") - { - $requiredVersion = "3.10.2" - $downloadVersion = "3.10.2" - $url = "https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip" - $downloadPath = "$downloadsDir\cmake-3.10.2-win32-x86.zip" - $expectedDownloadedFileHash = "f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6" - $executableFromDownload = "$downloadsDir\cmake-3.10.2-win32-x86\bin\cmake.exe" - $extractionType = $ExtractionType_ZIP - } - elseif($Dependency -eq "nuget") - { - $requiredVersion = "4.4.0" - $downloadVersion = "4.4.0" - $url = "https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe" - $downloadPath = "$downloadsDir\nuget-$downloadVersion\nuget.exe" - $expectedDownloadedFileHash = "2cf9b118937eef825464e548f0c44f7f64090047746de295d75ac3dcffa3e1f6" - $executableFromDownload = $downloadPath - $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED - } - elseif($Dependency -eq "vswhere") - { - $requiredVersion = "2.3.2" - $downloadVersion = "2.3.2" - $url = "https://github.com/Microsoft/vswhere/releases/download/2.3.2/vswhere.exe" - $downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe" - $expectedDownloadedFileHash = "103f2784c4b2c8e70c7c1c03687abbf22bce052aae30639406e4e13ffa29ee04" - $executableFromDownload = $downloadPath - $extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED - } - elseif($Dependency -eq "git") - { - $requiredVersion = "2.16.2" - $downloadVersion = "2.16.2" - $url = "https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-32-bit.zip" - $downloadPath = "$downloadsDir\MinGit-2.16.2-32-bit.zip" - $expectedDownloadedFileHash = "322c727e482aa97522c64a5ac68bdda3780111e8670bcfb532beac8e11ece5da" - # There is another copy of git.exe in MinGit\bin. However, an installed version of git add the cmd dir to the PATH. - # Therefore, choosing the cmd dir here as well. - $executableFromDownload = "$downloadsDir\MinGit-2.16.2-32-bit\cmd\git.exe" - $extractionType = $ExtractionType_ZIP - } - elseif($Dependency -eq "installerbase") - { - $requiredVersion = "3.1.81" - $downloadVersion = "3.1.81" - $url = "https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip" - $downloadPath = "$downloadsDir\QtInstallerFramework-win-x86.zip" - $expectedDownloadedFileHash = "f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8" - $executableFromDownload = "$downloadsDir\QtInstallerFramework-win-x86\bin\installerbase.exe" - $extractionType = $ExtractionType_ZIP - } - else + [xml]$asXml = Get-Content "$scriptsDir\vcpkgDependencies.xml" + $dependencyData = $asXml.SelectSingleNode("//dependencies/dependency[@name=`"$dependency`"]") # Case-sensitive! + + if ($dependencyData -eq $null) { - throw "Unknown program requested" + throw "Unkown dependency $dependency" } + $requiredVersion = $dependencyData.requiredVersion + $downloadVersion = $dependencyData.downloadVersion + $url = $dependencyData.x86url + $downloadRelativePath = $dependencyData.downloadRelativePath + $downloadPath = "$downloadsDir\$downloadRelativePath" + $expectedDownloadedFileHash = $dependencyData.sha256 + $extension = $dependencyData.extension + if (!(Test-Path $downloadPath)) { - Write-Host "Downloading $Dependency..." + Write-Host "Downloading $dependency..." vcpkgDownloadFile $url $downloadPath - Write-Host "Downloading $Dependency has completed successfully." + Write-Host "Downloading $dependency has completed successfully." } $downloadedFileHash = vcpkgGetSHA256 $downloadPath vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash - if ($extractionType -eq $ExtractionType_NO_EXTRACTION_REQUIRED) + + if ($extension -eq "exe") { - # do nothing + $executableFromDownload = $downloadPath } - elseif($extractionType -eq $ExtractionType_ZIP) + elseif ($extension -eq "zip") { + $postExtractionExecutableRelativePath = $dependencyData.postExtractionExecutableRelativePath + $executableFromDownload = "$downloadsDir\$postExtractionExecutableRelativePath" if (-not (Test-Path $executableFromDownload)) { $outFilename = (Get-ChildItem $downloadPath).BaseName - Write-Host "Extracting $Dependency..." + Write-Host "Extracting $dependency..." vcpkgExtractFile -File $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename - Write-Host "Extracting $Dependency has completed successfully." - } - } - elseif($extractionType -eq $ExtractionType_SELF_EXTRACTING_7Z) - { - if (-not (Test-Path $executableFromDownload)) - { - vcpkgInvokeCommand $downloadPath "-y" + Write-Host "Extracting $dependency has completed successfully." } } else { - throw "Invalid extraction type" + throw "Unexpected file type" } if (-not (Test-Path $executableFromDownload)) { - throw ("Could not detect or download " + $Dependency) + throw ("Could not detect or download " + $dependency) } return $executableFromDownload } -$path = SelectProgram $Dependency -Write-Verbose "Fetching dependency: $Dependency. Done." +$path = fetchDependencyInternal $dependency +Write-Verbose "Fetching dependency: $dependency. Done." return "::$path::" diff --git a/scripts/vcpkgDependencies.xml b/scripts/vcpkgDependencies.xml new file mode 100644 index 000000000..2007b3ca6 --- /dev/null +++ b/scripts/vcpkgDependencies.xml @@ -0,0 +1,48 @@ + + + + 3.10.2 + 3.10.2 + https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip + cmake-3.10.2-win32-x86.zip + f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6 + zip + cmake-3.10.2-win32-x86\bin\cmake.exe + + + 2.16.2 + 2.16.2 + https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-32-bit.zip + MinGit-2.16.2-32-bit.zip + 322c727e482aa97522c64a5ac68bdda3780111e8670bcfb532beac8e11ece5da + zip + + MinGit-2.16.2-32-bit\cmd\git.exe + + + 2.3.2 + 2.3.2 + https://github.com/Microsoft/vswhere/releases/download/2.3.2/vswhere.exe + vswhere-2.3.2\vswhere.exe + 103f2784c4b2c8e70c7c1c03687abbf22bce052aae30639406e4e13ffa29ee04 + exe + + + 4.4.0 + 4.4.0 + https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe + nuget-4.4.0\nuget.exe + 2cf9b118937eef825464e548f0c44f7f64090047746de295d75ac3dcffa3e1f6 + exe + + + 3.1.81 + 3.1.81 + https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip + QtInstallerFramework-win-x86.zip + f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8 + zip + QtInstallerFramework-win-x86\bin\installerbase.exe + + \ No newline at end of file -- cgit v1.2.3 From f0cee21f7a11c9c2073616e199b412d6fb2a364d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 22 Feb 2018 19:56:08 -0800 Subject: [vcpkgDependencies.xml] Reuse in bootstrap --- scripts/bootstrap.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index eb4513a64..9ee2d1643 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -14,7 +14,13 @@ $gitHash = "unknownhash" $oldpath = $env:path try { - $env:path += ";$vcpkgRootDir\downloads\MinGit-2.16.2-32-bit\cmd" + [xml]$asXml = Get-Content "$scriptsDir\vcpkgDependencies.xml" + $dependencyData = $asXml.SelectSingleNode("//dependencies/dependency[@name=`"git`"]") + $postExtractionExecutableRelativePath = $dependencyData.postExtractionExecutableRelativePath + $gitFromDownload = "$vcpkgRootDir\downloads\$postExtractionExecutableRelativePath" + $gitDir = split-path -parent $gitFromDownload + + $env:path += ";$gitDir" if (Get-Command "git" -ErrorAction SilentlyContinue) { $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short @@ -29,6 +35,7 @@ finally $env:path = $oldpath } Write-Verbose("Git repo version string is " + $gitHash) + $vcpkgSourcesPath = "$vcpkgRootDir\toolsrc" if (!(Test-Path $vcpkgSourcesPath)) -- cgit v1.2.3 From 407767858336479eebe759404db689a9b1e16671 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 23 Feb 2018 16:34:31 -0800 Subject: Rename "depenencies" to tools. Rework xml file to reduce fields. --- scripts/bootstrap.ps1 | 6 +- scripts/fetchDependency.ps1 | 76 ----------------------- scripts/fetchTool.ps1 | 73 ++++++++++++++++++++++ scripts/findVisualStudioInstallationInstances.ps1 | 2 +- scripts/vcpkgDependencies.xml | 48 -------------- scripts/vcpkgTools.xml | 36 +++++++++++ toolsrc/src/vcpkg/vcpkgpaths.cpp | 31 +++++---- 7 files changed, 128 insertions(+), 144 deletions(-) delete mode 100644 scripts/fetchDependency.ps1 create mode 100644 scripts/fetchTool.ps1 delete mode 100644 scripts/vcpkgDependencies.xml create mode 100644 scripts/vcpkgTools.xml diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 9ee2d1643..bc94aecc8 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -14,9 +14,9 @@ $gitHash = "unknownhash" $oldpath = $env:path try { - [xml]$asXml = Get-Content "$scriptsDir\vcpkgDependencies.xml" - $dependencyData = $asXml.SelectSingleNode("//dependencies/dependency[@name=`"git`"]") - $postExtractionExecutableRelativePath = $dependencyData.postExtractionExecutableRelativePath + [xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" + $toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"git`"]") + $postExtractionExecutableRelativePath = $toolData.postExtractionExecutableRelativePath $gitFromDownload = "$vcpkgRootDir\downloads\$postExtractionExecutableRelativePath" $gitDir = split-path -parent $gitFromDownload diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 deleted file mode 100644 index 5f7902881..000000000 --- a/scripts/fetchDependency.ps1 +++ /dev/null @@ -1,76 +0,0 @@ -[CmdletBinding()] -param( - [Parameter(Mandatory=$true)][string]$dependency -) - -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" - -Write-Verbose "Fetching dependency: $dependency" -$vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root - -$downloadsDir = "$vcpkgRootDir\downloads" - -function fetchDependencyInternal([Parameter(Mandatory=$true)][string]$dependency) -{ - $dependency = $dependency.toLower() - - [xml]$asXml = Get-Content "$scriptsDir\vcpkgDependencies.xml" - $dependencyData = $asXml.SelectSingleNode("//dependencies/dependency[@name=`"$dependency`"]") # Case-sensitive! - - if ($dependencyData -eq $null) - { - throw "Unkown dependency $dependency" - } - - $requiredVersion = $dependencyData.requiredVersion - $downloadVersion = $dependencyData.downloadVersion - $url = $dependencyData.x86url - $downloadRelativePath = $dependencyData.downloadRelativePath - $downloadPath = "$downloadsDir\$downloadRelativePath" - $expectedDownloadedFileHash = $dependencyData.sha256 - $extension = $dependencyData.extension - - if (!(Test-Path $downloadPath)) - { - Write-Host "Downloading $dependency..." - vcpkgDownloadFile $url $downloadPath - Write-Host "Downloading $dependency has completed successfully." - } - - $downloadedFileHash = vcpkgGetSHA256 $downloadPath - vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash - - - if ($extension -eq "exe") - { - $executableFromDownload = $downloadPath - } - elseif ($extension -eq "zip") - { - $postExtractionExecutableRelativePath = $dependencyData.postExtractionExecutableRelativePath - $executableFromDownload = "$downloadsDir\$postExtractionExecutableRelativePath" - if (-not (Test-Path $executableFromDownload)) - { - $outFilename = (Get-ChildItem $downloadPath).BaseName - Write-Host "Extracting $dependency..." - vcpkgExtractFile -File $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename - Write-Host "Extracting $dependency has completed successfully." - } - } - else - { - throw "Unexpected file type" - } - - if (-not (Test-Path $executableFromDownload)) - { - throw ("Could not detect or download " + $dependency) - } - - return $executableFromDownload -} - -$path = fetchDependencyInternal $dependency -Write-Verbose "Fetching dependency: $dependency. Done." -return "::$path::" diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 new file mode 100644 index 000000000..1f72bb39e --- /dev/null +++ b/scripts/fetchTool.ps1 @@ -0,0 +1,73 @@ +[CmdletBinding()] +param( + [Parameter(Mandatory=$true)][string]$tool +) + +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition +. "$scriptsDir\VcpkgPowershellUtils.ps1" + +Write-Verbose "Fetching tool: $tool" +$vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root + +$downloadsDir = "$vcpkgRootDir\downloads" +vcpkgCreateDirectoryIfNotExists $downloadsDir + +function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) +{ + $tool = $tool.toLower() + + [xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" + $toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"$tool`"]") # Case-sensitive! + + if ($toolData -eq $null) + { + throw "Unkown tool $tool" + } + + $exePath = "$downloadsDir\$($toolData.exeRelativePath)" + + if (Test-Path $exePath) + { + return $exePath + } + + if ($toolData.archiveRelativePath) + { + $downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)" + } + else + { + $downloadPath = "$downloadsDir\$($toolData.exeRelativePath)" + } + + $url = $toolData.url + if (!(Test-Path $downloadPath)) + { + Write-Host "Downloading $tool..." + vcpkgDownloadFile $url $downloadPath + Write-Host "Downloading $tool has completed successfully." + } + + $expectedDownloadedFileHash = $toolData.sha256 + $downloadedFileHash = vcpkgGetSHA256 $downloadPath + vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash + + if ($toolData.archiveRelativePath) + { + $outFilename = (Get-ChildItem $downloadPath).BaseName + Write-Host "Extracting $tool..." + vcpkgExtractFile -File $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename + Write-Host "Extracting $tool has completed successfully." + } + + if (-not (Test-Path $exePath)) + { + throw ("Could not detect or download " + $tool) + } + + return $exePath +} + +$path = fetchToolInternal $tool +Write-Verbose "Fetching tool: $tool. Done." +return "::$path::" diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index 359da9caa..fba5f447e 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -4,7 +4,7 @@ param( ) $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -$vswhereExe = (& $scriptsDir\fetchDependency.ps1 "vswhere") -replace "::" -replace "::" +$vswhereExe = (& $scriptsDir\fetchTool.ps1 "vswhere") -replace "::" -replace "::" $output = & $vswhereExe -prerelease -legacy -products * -format xml [xml]$asXml = $output diff --git a/scripts/vcpkgDependencies.xml b/scripts/vcpkgDependencies.xml deleted file mode 100644 index 2007b3ca6..000000000 --- a/scripts/vcpkgDependencies.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - 3.10.2 - 3.10.2 - https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip - cmake-3.10.2-win32-x86.zip - f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6 - zip - cmake-3.10.2-win32-x86\bin\cmake.exe - - - 2.16.2 - 2.16.2 - https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-32-bit.zip - MinGit-2.16.2-32-bit.zip - 322c727e482aa97522c64a5ac68bdda3780111e8670bcfb532beac8e11ece5da - zip - - MinGit-2.16.2-32-bit\cmd\git.exe - - - 2.3.2 - 2.3.2 - https://github.com/Microsoft/vswhere/releases/download/2.3.2/vswhere.exe - vswhere-2.3.2\vswhere.exe - 103f2784c4b2c8e70c7c1c03687abbf22bce052aae30639406e4e13ffa29ee04 - exe - - - 4.4.0 - 4.4.0 - https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe - nuget-4.4.0\nuget.exe - 2cf9b118937eef825464e548f0c44f7f64090047746de295d75ac3dcffa3e1f6 - exe - - - 3.1.81 - 3.1.81 - https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip - QtInstallerFramework-win-x86.zip - f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8 - zip - QtInstallerFramework-win-x86\bin\installerbase.exe - - \ No newline at end of file diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml new file mode 100644 index 000000000..e54d16864 --- /dev/null +++ b/scripts/vcpkgTools.xml @@ -0,0 +1,36 @@ + + + + 3.10.2 + cmake-3.10.2-win32-x86\bin\cmake.exe + https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip + f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6 + cmake-3.10.2-win32-x86.zip + + + 2.16.2 + MinGit-2.16.2-32-bit\cmd\git.exe + https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-32-bit.zip + 322c727e482aa97522c64a5ac68bdda3780111e8670bcfb532beac8e11ece5da + MinGit-2.16.2-32-bit.zip + + + 2.3.2 + vswhere-2.3.2\vswhere.exe + https://github.com/Microsoft/vswhere/releases/download/2.3.2/vswhere.exe + 103f2784c4b2c8e70c7c1c03687abbf22bce052aae30639406e4e13ffa29ee04 + + + 4.4.0 + nuget-4.4.0\nuget.exe + https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe + 2cf9b118937eef825464e548f0c44f7f64090047746de295d75ac3dcffa3e1f6 + + + 3.1.81 + QtInstallerFramework-win-x86\bin\installerbase.exe + https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip + f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8 + QtInstallerFramework-win-x86.zip + + diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index d574b7c4d..8ec7ba4cc 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -80,10 +80,10 @@ namespace vcpkg return data_lines; } - static fs::path fetch_dependency(const fs::path& scripts_folder, - const std::string& tool_name, - const fs::path& expected_downloaded_path, - const std::array& version) + static fs::path fetch_tool(const fs::path& scripts_folder, + const std::string& tool_name, + const fs::path& expected_downloaded_path, + const std::array& version) { const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", @@ -91,22 +91,21 @@ namespace vcpkg version_as_string, tool_name, version_as_string); - const fs::path script = scripts_folder / "fetchDependency.ps1"; + const fs::path script = scripts_folder / "fetchtool.ps1"; const std::string title = Strings::format( "Fetching %s version %s (No sufficient installed version was found)", tool_name, version_as_string); - const System::PowershellParameter dependency_param("Dependency", tool_name); - const std::string output = System::powershell_execute_and_capture_output(title, script, {dependency_param}); + const System::PowershellParameter tool_param("tool", tool_name); + const std::string output = System::powershell_execute_and_capture_output(title, script, {tool_param}); - const std::vector dependency_path = keep_data_lines(output); - Checks::check_exit( - VCPKG_LINE_INFO, dependency_path.size() == 1, "Expected dependency path, but got %s", output); + const std::vector tool_path = keep_data_lines(output); + Checks::check_exit(VCPKG_LINE_INFO, tool_path.size() == 1, "Expected tool path, but got %s", output); - const fs::path actual_downloaded_path = Strings::trim(std::string{dependency_path.at(0)}); + const fs::path actual_downloaded_path = Strings::trim(std::string{tool_path.at(0)}); std::error_code ec; const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); Checks::check_exit(VCPKG_LINE_INFO, eq && !ec, - "Expected dependency downloaded path to be %s, but was %s", + "Expected tool downloaded path to be %s, but was %s", expected_downloaded_path.u8string(), actual_downloaded_path.u8string()); return actual_downloaded_path; @@ -141,7 +140,7 @@ namespace vcpkg return *p; } - return fetch_dependency(scripts_folder, "cmake", downloaded_copy, EXPECTED_VERSION); + return fetch_tool(scripts_folder, "cmake", downloaded_copy, EXPECTED_VERSION); } fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder) @@ -161,7 +160,7 @@ namespace vcpkg return *p; } - return fetch_dependency(scripts_folder, "nuget", downloaded_copy, EXPECTED_VERSION); + return fetch_tool(scripts_folder, "nuget", downloaded_copy, EXPECTED_VERSION); } fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) @@ -193,7 +192,7 @@ namespace vcpkg return *p; } - return fetch_dependency(scripts_folder, "git", downloaded_copy, EXPECTED_VERSION); + return fetch_tool(scripts_folder, "git", downloaded_copy, EXPECTED_VERSION); } static fs::path get_ifw_installerbase_path(const fs::path& downloads_folder, const fs::path& scripts_folder) @@ -221,7 +220,7 @@ namespace vcpkg return *p; } - return fetch_dependency(scripts_folder, "installerbase", downloaded_copy, EXPECTED_VERSION); + return fetch_tool(scripts_folder, "installerbase", downloaded_copy, EXPECTED_VERSION); } Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir) -- cgit v1.2.3 From 7f5efbe14419412d8c24df836a0b3b5192661aa3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 23 Feb 2018 18:15:26 -0800 Subject: [vcpkgTools.xml] Reuse in vcpkg.exe --- toolsrc/src/vcpkg/vcpkgpaths.cpp | 171 ++++++++++++++++++++++++++------------- 1 file changed, 113 insertions(+), 58 deletions(-) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 8ec7ba4cc..bf231cecd 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -15,35 +15,99 @@ namespace vcpkg static constexpr CStringView V_140 = "v140"; static constexpr CStringView V_141 = "v141"; - static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd, - const std::array& expected_version) + struct ToolData { - static const std::regex RE(R"###((\d+)\.(\d+)\.(\d+))###"); + std::array required_version; + fs::path downloaded_exe_path; + }; - const auto rc = System::cmd_execute_and_capture_output(Strings::format(R"(%s)", version_cmd)); - if (rc.exit_code != 0) - { - return false; - } + static Optional> parse_version_string(const std::string& version_as_string) + { + static const std::regex RE(R"###((\d+)\.(\d+)\.(\d+))###"); std::match_results match; - const auto found = std::regex_search(rc.output, match, RE); + const auto found = std::regex_search(version_as_string, match, RE); if (!found) { - return false; + return {}; } const int d1 = atoi(match[1].str().c_str()); const int d2 = atoi(match[2].str().c_str()); const int d3 = atoi(match[3].str().c_str()); - if (d1 > expected_version[0] || (d1 == expected_version[0] && d2 > expected_version[1]) || - (d1 == expected_version[0] && d2 == expected_version[1] && d3 >= expected_version[2])) + const std::array result = {d1, d2, d3}; + return result; + } + + static ToolData parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool) + { + static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; + + const auto get_string_inside_tags = + [](const std::string& input, const std::regex& regex, const std::string& tag_name) -> std::string { + std::smatch match; + const bool has_match = std::regex_search(input.cbegin(), input.cend(), match, regex); + Checks::check_exit( + VCPKG_LINE_INFO, has_match, "Could not find tag <%s> in %s", tag_name, XML_PATH.generic_string()); + + return match[1]; + }; + + static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO); + static const std::regex VERSION_REGEX{ + Strings::format(R"###(([\s\S]*?))###", tool)}; + static const std::regex EXE_RELATIVE_PATH_REGEX{ + Strings::format(R"###(([\s\S]*?))###", tool)}; + + const std::regex tool_regex{Strings::format(R"###(([\s\S]*?))###", tool)}; + + std::smatch match_tool; + const bool has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); + Checks::check_exit(VCPKG_LINE_INFO, + has_match_tool, + "Could not find entry for tool [%s] in %s", + tool, + XML_PATH.generic_string()); + + const std::string tool_data_as_string = get_string_inside_tags(XML, tool_regex, tool); + + const std::string required_version_as_string = + get_string_inside_tags(tool_data_as_string, VERSION_REGEX, "requiredVersion"); + + const std::string exe_relative_path = + get_string_inside_tags(tool_data_as_string, EXE_RELATIVE_PATH_REGEX, "exeRelativePath"); + + const Optional> required_version = parse_version_string(required_version_as_string); + Checks::check_exit(VCPKG_LINE_INFO, + required_version.has_value(), + "Could not parse version for tool %s. Version string was: %s", + tool, + required_version_as_string); + + const fs::path exe_path = paths.downloads / exe_relative_path; + return ToolData{*required_version.get(), exe_path}; + } + + static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd, + const std::array& expected_version) + { + const auto rc = System::cmd_execute_and_capture_output(Strings::format(R"(%s)", version_cmd)); + if (rc.exit_code != 0) + { + return false; + } + + const Optional> v = parse_version_string(rc.output); + if (!v.has_value()) { - // satisfactory version found - return true; + return false; } - return false; + const std::array actual_version = *v.get(); + return (actual_version[0] > expected_version[0] || + (actual_version[0] == expected_version[0] && actual_version[1] > expected_version[1]) || + (actual_version[0] == expected_version[0] && actual_version[1] == expected_version[1] && + actual_version[2] >= expected_version[2])); } static Optional find_if_has_equal_or_greater_version(const std::vector& candidate_paths, @@ -80,11 +144,10 @@ namespace vcpkg return data_lines; } - static fs::path fetch_tool(const fs::path& scripts_folder, - const std::string& tool_name, - const fs::path& expected_downloaded_path, - const std::array& version) + static fs::path fetch_tool(const fs::path& scripts_folder, const std::string& tool_name, const ToolData& tool_data) { + const std::array& version = tool_data.required_version; + const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", tool_name, @@ -101,6 +164,7 @@ namespace vcpkg Checks::check_exit(VCPKG_LINE_INFO, tool_path.size() == 1, "Expected tool path, but got %s", output); const fs::path actual_downloaded_path = Strings::trim(std::string{tool_path.at(0)}); + const fs::path& expected_downloaded_path = tool_data.downloaded_exe_path; std::error_code ec; const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); Checks::check_exit(VCPKG_LINE_INFO, @@ -111,22 +175,20 @@ namespace vcpkg return actual_downloaded_path; } - static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder) + static fs::path get_cmake_path(const VcpkgPaths& paths) { #if defined(_WIN32) - static constexpr std::array EXPECTED_VERSION = {3, 10, 2}; + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "cmake"); #else - static constexpr std::array EXPECTED_VERSION = {3, 5, 1}; + static const ToolData TOOL_DATA = ToolData{{3, 5, 1}, ""}; #endif static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const std::vector from_path = Files::find_from_PATH("cmake"); - std::vector candidate_paths; - const fs::path downloaded_copy = downloads_folder / "cmake-3.10.2-win32-x86" / "bin" / "cmake.exe"; #if defined(_WIN32) - candidate_paths.push_back(downloaded_copy); + candidate_paths.push_back(TOOL_DATA.downloaded_exe_path); #endif + const std::vector from_path = Files::find_from_PATH("cmake"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); #if defined(_WIN32) candidate_paths.push_back(System::get_program_files_platform_bitness() / "CMake" / "bin" / "cmake.exe"); @@ -134,51 +196,47 @@ namespace vcpkg #endif const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); if (const auto p = path.get()) { return *p; } - return fetch_tool(scripts_folder, "cmake", downloaded_copy, EXPECTED_VERSION); + return fetch_tool(paths.scripts, "cmake", TOOL_DATA); } - fs::path get_nuget_path(const fs::path& downloads_folder, const fs::path& scripts_folder) + static fs::path get_nuget_path(const VcpkgPaths& paths) { - static constexpr std::array EXPECTED_VERSION = {4, 4, 0}; - - const fs::path downloaded_copy = downloads_folder / "nuget-4.4.0" / "nuget.exe"; - const std::vector from_path = Files::find_from_PATH("nuget"); + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "nuget"); std::vector candidate_paths; - candidate_paths.push_back(downloaded_copy); + candidate_paths.push_back(TOOL_DATA.downloaded_exe_path); + const std::vector from_path = Files::find_from_PATH("nuget"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - auto path = find_if_has_equal_or_greater_version(candidate_paths, "", EXPECTED_VERSION); + auto path = find_if_has_equal_or_greater_version(candidate_paths, "", TOOL_DATA.required_version); if (const auto p = path.get()) { return *p; } - return fetch_tool(scripts_folder, "nuget", downloaded_copy, EXPECTED_VERSION); + return fetch_tool(paths.scripts, "nuget", TOOL_DATA); } - fs::path get_git_path(const fs::path& downloads_folder, const fs::path& scripts_folder) + static fs::path get_git_path(const VcpkgPaths& paths) { #if defined(_WIN32) - static constexpr std::array EXPECTED_VERSION = {2, 16, 2}; + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "git"); #else - static constexpr std::array EXPECTED_VERSION = {2, 7, 4}; + static const ToolData TOOL_DATA = ToolData{{2, 7, 4}, ""}; #endif static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - const std::vector from_path = Files::find_from_PATH("git"); - - const fs::path downloaded_copy = downloads_folder / "MinGit-2.16.2-32-bit" / "cmd" / "git.exe"; std::vector candidate_paths; #if defined(_WIN32) - candidate_paths.push_back(downloaded_copy); + candidate_paths.push_back(TOOL_DATA.downloaded_exe_path); #endif + const std::vector from_path = Files::find_from_PATH("git"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); #if defined(_WIN32) candidate_paths.push_back(System::get_program_files_platform_bitness() / "git" / "cmd" / "git.exe"); @@ -186,25 +244,23 @@ namespace vcpkg #endif const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); if (const auto p = path.get()) { return *p; } - return fetch_tool(scripts_folder, "git", downloaded_copy, EXPECTED_VERSION); + return fetch_tool(paths.scripts, "git", TOOL_DATA); } - static fs::path get_ifw_installerbase_path(const fs::path& downloads_folder, const fs::path& scripts_folder) + static fs::path get_ifw_installerbase_path(const VcpkgPaths& paths) { - static constexpr std::array EXPECTED_VERSION = {3, 1, 81}; - static const std::string VERSION_CHECK_ARGUMENTS = "--framework-version"; + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "installerbase"); - const fs::path downloaded_copy = - downloads_folder / "QtInstallerFramework-win-x86" / "bin" / "installerbase.exe"; + static const std::string VERSION_CHECK_ARGUMENTS = "--framework-version"; std::vector candidate_paths; - candidate_paths.push_back(downloaded_copy); + candidate_paths.push_back(TOOL_DATA.downloaded_exe_path); // TODO: Uncomment later // const std::vector from_path = Files::find_from_PATH("installerbase"); // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); @@ -214,13 +270,13 @@ namespace vcpkg // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, EXPECTED_VERSION); + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); if (const auto p = path.get()) { return *p; } - return fetch_tool(scripts_folder, "installerbase", downloaded_copy, EXPECTED_VERSION); + return fetch_tool(paths.scripts, "installerbase", TOOL_DATA); } Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir) @@ -299,23 +355,22 @@ namespace vcpkg const fs::path& VcpkgPaths::get_cmake_exe() const { - return this->cmake_exe.get_lazy([this]() { return get_cmake_path(this->downloads, this->scripts); }); + return this->cmake_exe.get_lazy([this]() { return get_cmake_path(*this); }); } const fs::path& VcpkgPaths::get_git_exe() const { - return this->git_exe.get_lazy([this]() { return get_git_path(this->downloads, this->scripts); }); + return this->git_exe.get_lazy([this]() { return get_git_path(*this); }); } const fs::path& VcpkgPaths::get_nuget_exe() const { - return this->nuget_exe.get_lazy([this]() { return get_nuget_path(this->downloads, this->scripts); }); + return this->nuget_exe.get_lazy([this]() { return get_nuget_path(*this); }); } const fs::path& VcpkgPaths::get_ifw_installerbase_exe() const { - return this->ifw_installerbase_exe.get_lazy( - [this]() { return get_ifw_installerbase_path(this->downloads, this->scripts); }); + return this->ifw_installerbase_exe.get_lazy([this]() { return get_ifw_installerbase_path(*this); }); } const fs::path& VcpkgPaths::get_ifw_binarycreator_exe() const -- cgit v1.2.3 From 92b4308f5bc265aaefb6cb9efe69db4627ab222e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 22:14:39 -0800 Subject: [breakpad] Fix hash --- ports/breakpad/CONTROL | 2 +- ports/breakpad/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/breakpad/CONTROL b/ports/breakpad/CONTROL index c391454b6..30001b1ee 100644 --- a/ports/breakpad/CONTROL +++ b/ports/breakpad/CONTROL @@ -1,4 +1,4 @@ Source: breakpad -Version: 2018-2-19 +Version: 2018-2-19-1 Build-Depends: libdisasm Description: a set of client and server components which implement a crash-reporting system. diff --git a/ports/breakpad/portfile.cmake b/ports/breakpad/portfile.cmake index 6267b271b..a584e5d0b 100644 --- a/ports/breakpad/portfile.cmake +++ b/ports/breakpad/portfile.cmake @@ -4,7 +4,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/breakpad REF 6bb6c9b26afd9844b9e35fcaa39fb24893e7abb5 - SHA512 a6a786c2cabb1fd2749d79215c7a3024ae6d1a894166060b22869cd3ee3010edb3e0613c0aeea254580554f402d919ed630ee088c53a1f218e01a7280ad29fec + SHA512 af96ec1383cce40d6dd14cf105ff0ff66bbc68ffd8941b9e5da9cb3462bfb100aa66debf38a759c7fa41a1847f4ff90bca73c859a5e0b18d8e73b3c8a008576f HEAD_REF master ) -- cgit v1.2.3 From dfa621039e69a4a42875783f533d1f201bdcc76b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 22:20:39 -0800 Subject: [args] Fix hash --- ports/args/CONTROL | 2 +- ports/args/portfile.cmake | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ports/args/CONTROL b/ports/args/CONTROL index 975b0251e..ee2a6a09a 100644 --- a/ports/args/CONTROL +++ b/ports/args/CONTROL @@ -1,3 +1,3 @@ Source: args -Version: d8905de +Version: 2018-02-23 Description: A simple header-only C++ argument parser library. diff --git a/ports/args/portfile.cmake b/ports/args/portfile.cmake index a5f4f1c85..29d76b81f 100644 --- a/ports/args/portfile.cmake +++ b/ports/args/portfile.cmake @@ -1,19 +1,21 @@ #header-only library include(vcpkg_common_functions) -SET(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/args-master) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Taywee/args/archive/master.zip" - FILENAME "args.zip" - SHA512 81751bfc86e15db1e5f245baa7df0464027b22b577c9de359e22dc4fe1dd550acfb116801b47d88b56d61b69a640c55757206f6f84977ace2fb02742b60ff216 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Taywee/args + REF 7bf17000aa0969b8ca3178c72ec834b105944a41 + SHA512 38f038f2ea3cdbf62678112a28f6b9a2b46b7b291ec9a7c78393c28b1169dc393a086393f24534804188d434583896d9eaedca964c00a2db032fb337ebc9c214 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) # Put the licence file where vcpkg expects it file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/args) file(RENAME ${CURRENT_PACKAGES_DIR}/share/args/license ${CURRENT_PACKAGES_DIR}/share/args/copyright) # Copy the args header files -file(INSTALL ${SOURCE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.hxx") +file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.hxx") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/examples ${CURRENT_PACKAGES_DIR}/include/test) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/args-master/examples ${CURRENT_PACKAGES_DIR}/include/args-master/test) vcpkg_copy_pdbs() -- cgit v1.2.3 From fee4acc543e3801eed474495061875d0484e0bd3 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 22:26:31 -0800 Subject: [unrar] Improve error message during static builds --- ports/unrar/portfile.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/unrar/portfile.cmake b/ports/unrar/portfile.cmake index 294fe9ac2..0528c8b97 100644 --- a/ports/unrar/portfile.cmake +++ b/ports/unrar/portfile.cmake @@ -5,8 +5,8 @@ set(UNRAR_FILENAME unrarsrc-${UNRAR_VERSION}.tar.gz) set(UNRAR_URL http://www.rarlab.com/rar/${UNRAR_FILENAME}) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/unrar) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(FATAL_ERROR "A static build is included with the dynamic build. Try VCPKG INSTALL UNRAR:X86-WINDOWS UNRAR:X64-WINDOWS") +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Unrar does not currently support building statically") endif() #SRC @@ -32,6 +32,7 @@ file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/unrar.dll DESTINAT file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/unrar.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/unrar.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/unrar.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + vcpkg_copy_pdbs() #COPYRIGHT -- cgit v1.2.3 From 51f6cf724c7534397bf13cf58fb9842ffde9c7ca Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 22:32:02 -0800 Subject: [exiv2] Fix static builds. [gts] Add early detection for CRT linkage. --- ports/exiv2/CONTROL | 4 ++-- ports/exiv2/portfile.cmake | 5 +++++ ports/gts/portfile.cmake | 33 ++++++++++++++------------------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 15d24a868..eb5e4c39a 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99 -Build-Depends:zlib, expat +Version: 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99-1 +Build-Depends: zlib, expat Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index fb44d3e94..93d16690c 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() @@ -26,6 +27,10 @@ file(REMOVE ${DEBUG_EXE}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + # Handle copyright file(COPY ${SOURCE_PATH}/ABOUT-NLS DESTINATION ${CURRENT_PACKAGES_DIR}/share/exiv2) file(RENAME ${CURRENT_PACKAGES_DIR}/share/exiv2/ABOUT-NLS ${CURRENT_PACKAGES_DIR}/share/exiv2/copyright) diff --git a/ports/gts/portfile.cmake b/ports/gts/portfile.cmake index d55f5dc66..14a5e2bfa 100644 --- a/ports/gts/portfile.cmake +++ b/ports/gts/portfile.cmake @@ -1,29 +1,24 @@ -# 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) -# +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message("gts does not support building statically -- building dynamically instead") + set(VCPKG_LIBRARY_LINKAGE "dynamic") +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message("gts can only be built dynamically, and therefore cannot static link the CRT") +endif() include(vcpkg_common_functions) -vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH - REPO "finetjul/gts" +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO finetjul/gts REF c4da61ae075f355d9ecc9f2d4767acf777f54c2b - HEAD_REF master SHA512 e53d11213c26cbda08ae62e6388aee0a14d2884de72268ad25d10a23e77baa53a2b1151c5cc7643b059ded82b8edf0da79144c3108949fdc515168cac13ffca9 + HEAD_REF master ) 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 + PREFER_NINJA ) vcpkg_install_cmake() @@ -33,4 +28,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gts RENAME copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() -- cgit v1.2.3 From 2f25ab678a7b7988d9a957d8befa1806879f2d7b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 23:00:39 -0800 Subject: [live555] Update and simplify --- ports/live555/BasicUsageEnvironment.txt | 25 --- ports/live555/CMakeLists.txt | 27 +++ ports/live555/CONTROL | 2 +- ports/live555/UsageEnvironment.txt | 21 -- ports/live555/groupsock.txt | 28 --- ports/live555/live.txt | 14 -- ports/live555/liveMedia.txt | 333 -------------------------------- ports/live555/master.txt | 12 -- ports/live555/mediaServer.txt | 23 --- ports/live555/portfile.cmake | 78 ++------ ports/live555/proxyServer.txt | 17 -- ports/live555/testProgs.txt | 114 ----------- 12 files changed, 49 insertions(+), 645 deletions(-) delete mode 100644 ports/live555/BasicUsageEnvironment.txt create mode 100644 ports/live555/CMakeLists.txt delete mode 100644 ports/live555/UsageEnvironment.txt delete mode 100644 ports/live555/groupsock.txt delete mode 100644 ports/live555/live.txt delete mode 100644 ports/live555/liveMedia.txt delete mode 100644 ports/live555/master.txt delete mode 100644 ports/live555/mediaServer.txt delete mode 100644 ports/live555/proxyServer.txt delete mode 100644 ports/live555/testProgs.txt diff --git a/ports/live555/BasicUsageEnvironment.txt b/ports/live555/BasicUsageEnvironment.txt deleted file mode 100644 index 40d311ee0..000000000 --- a/ports/live555/BasicUsageEnvironment.txt +++ /dev/null @@ -1,25 +0,0 @@ -# CMakeLists.txt in BasicUsageEnvironment - -SET(BASIC_USAGE_ENVIRONMENT_SRCS -BasicHashTable.cpp -BasicTaskScheduler.cpp -BasicTaskScheduler0.cpp -BasicUsageEnvironment.cpp -BasicUsageEnvironment0.cpp -DelayQueue.cpp -) - -SET(BASIC_USAGE_ENVIRONMENT_HEADERS -include/BasicHashTable.hh -include/BasicUsageEnvironment.hh -include/BasicUsageEnvironment0.hh -include/BasicUsageEnvironment_version.hh -include/DelayQueue.hh -include/HandlerSet.hh -) - -INCLUDE_DIRECTORIES( -${live555Includes} -) - -ADD_LIBRARY( BasicUsageEnvironment STATIC ${BASIC_USAGE_ENVIRONMENT_HEADERS} ${BASIC_USAGE_ENVIRONMENT_SRCS}) diff --git a/ports/live555/CMakeLists.txt b/ports/live555/CMakeLists.txt new file mode 100644 index 000000000..a41d2c791 --- /dev/null +++ b/ports/live555/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.5) +project(live555 CXX) + +include_directories( + BasicUsageEnvironment/include + groupsock/include + liveMedia/include + UsageEnvironment/include +) + +file(GLOB BASIC_USAGE_ENVIRONMENT_SRCS BasicUsageEnvironment/*.cpp) +add_library(BasicUsageEnvironment ${BASIC_USAGE_ENVIRONMENT_SRCS}) + +file(GLOB GROUPSOCK_SRCS groupsock/*.cpp) +add_library(groupsock ${GROUPSOCK_SRCS}) + +file(GLOB LIVEMEDIA_SRCS liveMedia/*.cpp) +add_library(liveMedia ${LIVEMEDIA_SRCS}) + +file(GLOB USAGE_ENVIRONMENT_SRCS UsageEnvironment/*.cpp) +add_library(UsageEnvironment ${LIVEMEDIA_SRCS}) + +install(TARGETS groupsock BasicUsageEnvironment liveMedia UsageEnvironment + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/ports/live555/CONTROL b/ports/live555/CONTROL index 3c3318c2c..4197a3595 100644 --- a/ports/live555/CONTROL +++ b/ports/live555/CONTROL @@ -1,3 +1,3 @@ Source: live555 -Version: 2018.01.29 +Version: 2018.02.18 Description: A complete RTSP server application diff --git a/ports/live555/UsageEnvironment.txt b/ports/live555/UsageEnvironment.txt deleted file mode 100644 index 0e93ec145..000000000 --- a/ports/live555/UsageEnvironment.txt +++ /dev/null @@ -1,21 +0,0 @@ -# CMakeLists.txt in UsageEnvironment - -SET(USAGE_ENVIRONMENT_SRCS -HashTable.cpp -strDup.cpp -UsageEnvironment.cpp -) - -SET(USAGE_ENVIRONMENT_HEADERS -include/Boolean.hh -include/HashTable.hh -include/strDup.hh -include/UsageEnvironment.hh -include/UsageEnvironment_version.hh -) - -INCLUDE_DIRECTORIES( -${live555Includes} -) - -ADD_LIBRARY( UsageEnvironment STATIC ${USAGE_ENVIRONMENT_HEADERS} ${USAGE_ENVIRONMENT_SRCS}) diff --git a/ports/live555/groupsock.txt b/ports/live555/groupsock.txt deleted file mode 100644 index c8c795ffa..000000000 --- a/ports/live555/groupsock.txt +++ /dev/null @@ -1,28 +0,0 @@ -# CMakeLists.txt in groupsock - -SET(GROUPSOCK_SRCS -GroupEId.cpp -Groupsock.cpp -GroupsockHelper.cpp -inet.c -IOHandlers.cpp -NetAddress.cpp -NetInterface.cpp -) - -SET(GROUPSOCK_HEADERS -include/GroupEId.hh -include/Groupsock.hh -include/GroupsockHelper.hh -include/groupsock_version.hh -include/IOHandlers.hh -include/NetAddress.hh -include/NetInterface.hh -include/TunnelEncaps.hh -) - -INCLUDE_DIRECTORIES( -${live555Includes} -) - -ADD_LIBRARY( groupsock STATIC ${GROUPSOCK_HEADERS} ${GROUPSOCK_SRCS}) diff --git a/ports/live555/live.txt b/ports/live555/live.txt deleted file mode 100644 index 1bb168407..000000000 --- a/ports/live555/live.txt +++ /dev/null @@ -1,14 +0,0 @@ -# CMakeLists.txt in live - -# includes -INCLUDE_DIRECTORIES( -${live555Includes} -) - -ADD_SUBDIRECTORY(BasicUsageEnvironment) -ADD_SUBDIRECTORY(groupsock) -ADD_SUBDIRECTORY(liveMedia) -#ADD_SUBDIRECTORY(mediaServer) -#ADD_SUBDIRECTORY(proxyServer) -ADD_SUBDIRECTORY(UsageEnvironment) -#ADD_SUBDIRECTORY(testProgs) diff --git a/ports/live555/liveMedia.txt b/ports/live555/liveMedia.txt deleted file mode 100644 index 604bf1c50..000000000 --- a/ports/live555/liveMedia.txt +++ /dev/null @@ -1,333 +0,0 @@ -# CMakeLists.txt in liveMedia - -SET(LIVE_MEDIA_SRCS -AC3AudioFileServerMediaSubsession.cpp -AC3AudioRTPSink.cpp -AC3AudioRTPSource.cpp -AC3AudioStreamFramer.cpp -ADTSAudioFileServerMediaSubsession.cpp -ADTSAudioFileSource.cpp -AMRAudioFileServerMediaSubsession.cpp -AMRAudioFileSink.cpp -AMRAudioFileSource.cpp -AMRAudioRTPSink.cpp -AMRAudioRTPSource.cpp -AMRAudioSource.cpp -AudioInputDevice.cpp -AudioRTPSink.cpp -AVIFileSink.cpp -Base64.cpp -BasicUDPSink.cpp -BasicUDPSource.cpp -BitVector.cpp -ByteStreamFileSource.cpp -ByteStreamMemoryBufferSource.cpp -ByteStreamMultiFileSource.cpp -#DarwinInjector.cpp -DeviceSource.cpp -DigestAuthentication.cpp -DVVideoFileServerMediaSubsession.cpp -DVVideoRTPSink.cpp -DVVideoRTPSource.cpp -DVVideoStreamFramer.cpp -EBMLNumber.cpp -FileServerMediaSubsession.cpp -FileSink.cpp -FramedFileSource.cpp -FramedFilter.cpp -FramedSource.cpp -GenericMediaServer.cpp -GSMAudioRTPSink.cpp -H261VideoRTPSource.cpp -H263plusVideoFileServerMediaSubsession.cpp -H263plusVideoRTPSink.cpp -H263plusVideoRTPSource.cpp -H263plusVideoStreamFramer.cpp -H263plusVideoStreamParser.cpp -H264or5VideoFileSink.cpp -H264or5VideoRTPSink.cpp -H264or5VideoStreamDiscreteFramer.cpp -H264or5VideoStreamFramer.cpp -H264VideoFileServerMediaSubsession.cpp -H264VideoFileSink.cpp -H264VideoRTPSink.cpp -H264VideoRTPSource.cpp -H264VideoStreamDiscreteFramer.cpp -H264VideoStreamFramer.cpp -H265VideoFileServerMediaSubsession.cpp -H265VideoFileSink.cpp -H265VideoRTPSink.cpp -H265VideoRTPSource.cpp -H265VideoStreamDiscreteFramer.cpp -H265VideoStreamFramer.cpp -InputFile.cpp -JPEGVideoRTPSink.cpp -JPEGVideoRTPSource.cpp -JPEGVideoSource.cpp -Locale.cpp -MatroskaDemuxedTrack.cpp -MatroskaFile.cpp -MatroskaFileParser.cpp -MatroskaFileServerDemux.cpp -MatroskaFileServerMediaSubsession.cpp -Media.cpp -MediaSession.cpp -MediaSink.cpp -MediaSource.cpp -MP3ADU.cpp -MP3ADUdescriptor.cpp -MP3ADUinterleaving.cpp -MP3ADURTPSink.cpp -MP3ADURTPSource.cpp -MP3ADUTranscoder.cpp -MP3AudioFileServerMediaSubsession.cpp -MP3AudioMatroskaFileServerMediaSubsession.cpp -MP3FileSource.cpp -MP3Internals.cpp -MP3InternalsHuffman.cpp -MP3InternalsHuffmanTable.cpp -MP3StreamState.cpp -MP3Transcoder.cpp -MPEG1or2AudioRTPSink.cpp -MPEG1or2AudioRTPSource.cpp -MPEG1or2AudioStreamFramer.cpp -MPEG1or2Demux.cpp -MPEG1or2DemuxedElementaryStream.cpp -MPEG1or2DemuxedServerMediaSubsession.cpp -MPEG1or2FileServerDemux.cpp -MPEG1or2VideoFileServerMediaSubsession.cpp -MPEG1or2VideoRTPSink.cpp -MPEG1or2VideoRTPSource.cpp -MPEG1or2VideoStreamDiscreteFramer.cpp -MPEG1or2VideoStreamFramer.cpp -MPEG2IndexFromTransportStream.cpp -MPEG2TransportFileServerMediaSubsession.cpp -MPEG2TransportStreamAccumulator.cpp -MPEG2TransportStreamFramer.cpp -MPEG2TransportStreamFromESSource.cpp -MPEG2TransportStreamFromPESSource.cpp -MPEG2TransportStreamIndexFile.cpp -MPEG2TransportStreamMultiplexor.cpp -MPEG2TransportStreamTrickModeFilter.cpp -MPEG2TransportUDPServerMediaSubsession.cpp -MPEG4ESVideoRTPSink.cpp -MPEG4ESVideoRTPSource.cpp -MPEG4GenericRTPSink.cpp -MPEG4GenericRTPSource.cpp -MPEG4LATMAudioRTPSink.cpp -MPEG4LATMAudioRTPSource.cpp -MPEG4VideoFileServerMediaSubsession.cpp -MPEG4VideoStreamDiscreteFramer.cpp -MPEG4VideoStreamFramer.cpp -MPEGVideoStreamFramer.cpp -MPEGVideoStreamParser.cpp -MultiFramedRTPSink.cpp -MultiFramedRTPSource.cpp -OggDemuxedTrack.cpp -OggFile.cpp -OggFileParser.cpp -OggFileServerDemux.cpp -OggFileServerMediaSubsession.cpp -OggFileSink.cpp -OnDemandServerMediaSubsession.cpp -ourMD5.cpp -OutputFile.cpp -PassiveServerMediaSubsession.cpp -ProxyServerMediaSession.cpp -QCELPAudioRTPSource.cpp -QuickTimeFileSink.cpp -QuickTimeGenericRTPSource.cpp -RTCP.cpp -rtcp_from_spec.c -RTPInterface.cpp -RTPSink.cpp -RTPSource.cpp -RTSPClient.cpp -RTSPCommon.cpp -RTSPRegisterSender.cpp -RTSPServer.cpp -RTSPServerRegister.cpp -RTSPServerSupportingHTTPStreaming.cpp -ServerMediaSession.cpp -SimpleRTPSink.cpp -SimpleRTPSource.cpp -SIPClient.cpp -StreamParser.cpp -StreamReplicator.cpp -T140TextRTPSink.cpp -TCPStreamSink.cpp -TextRTPSink.cpp -TheoraVideoRTPSink.cpp -TheoraVideoRTPSource.cpp -uLawAudioFilter.cpp -VideoRTPSink.cpp -VorbisAudioRTPSink.cpp -VorbisAudioRTPSource.cpp -VP8VideoRTPSink.cpp -VP8VideoRTPSource.cpp -VP9VideoRTPSink.cpp -VP9VideoRTPSource.cpp -WAVAudioFileServerMediaSubsession.cpp -WAVAudioFileSource.cpp -) - -SET(LIVE_MEDIA_HEADERS -include/AC3AudioFileServerMediaSubsession.hh -include/AC3AudioRTPSink.hh -include/AC3AudioRTPSource.hh -include/AC3AudioStreamFramer.hh -include/ADTSAudioFileServerMediaSubsession.hh -include/ADTSAudioFileSource.hh -include/AMRAudioFileServerMediaSubsession.hh -include/AMRAudioFileSink.hh -include/AMRAudioFileSource.hh -include/AMRAudioRTPSink.hh -include/AMRAudioRTPSource.hh -include/AMRAudioSource.hh -include/AudioInputDevice.hh -include/AudioRTPSink.hh -include/AVIFileSink.hh -include/Base64.hh -include/BasicUDPSink.hh -include/BasicUDPSource.hh -include/BitVector.hh -include/ByteStreamFileSource.hh -include/ByteStreamMemoryBufferSource.hh -include/ByteStreamMultiFileSource.hh -#include/DarwinInjector.hh -include/DeviceSource.hh -include/DigestAuthentication.hh -include/DVVideoFileServerMediaSubsession.hh -include/DVVideoRTPSink.hh -include/DVVideoRTPSource.hh -include/DVVideoStreamFramer.hh -include/FileServerMediaSubsession.hh -include/FileSink.hh -include/FramedFileSource.hh -include/FramedFilter.hh -include/FramedSource.hh -include/GenericMediaServer.hh -include/GSMAudioRTPSink.hh -include/H261VideoRTPSource.hh -include/H263plusVideoFileServerMediaSubsession.hh -include/H263plusVideoRTPSink.hh -include/H263plusVideoRTPSource.hh -include/H263plusVideoStreamFramer.hh -include/H264or5VideoFileSink.hh -include/H264or5VideoRTPSink.hh -include/H264or5VideoStreamDiscreteFramer.hh -include/H264or5VideoStreamFramer.hh -include/H264VideoFileServerMediaSubsession.hh -include/H264VideoFileSink.hh -include/H264VideoRTPSink.hh -include/H264VideoRTPSource.hh -include/H264VideoStreamDiscreteFramer.hh -include/H264VideoStreamFramer.hh -include/H265VideoFileServerMediaSubsession.hh -include/H265VideoFileSink.hh -include/H265VideoRTPSink.hh -include/H265VideoRTPSource.hh -include/H265VideoStreamDiscreteFramer.hh -include/H265VideoStreamFramer.hh -include/InputFile.hh -include/JPEGVideoRTPSink.hh -include/JPEGVideoRTPSource.hh -include/JPEGVideoSource.hh -include/liveMedia.hh -include/liveMedia_version.hh -include/Locale.hh -include/MatroskaFile.hh -include/MatroskaFileServerDemux.hh -include/Media.hh -include/MediaSession.hh -include/MediaSink.hh -include/MediaSource.hh -include/MediaTranscodingTable.hh -include/MP3ADU.hh -include/MP3ADUinterleaving.hh -include/MP3ADURTPSink.hh -include/MP3ADURTPSource.hh -include/MP3ADUTranscoder.hh -include/MP3AudioFileServerMediaSubsession.hh -include/MP3FileSource.hh -include/MP3Transcoder.hh -include/MPEG1or2AudioRTPSink.hh -include/MPEG1or2AudioRTPSource.hh -include/MPEG1or2AudioStreamFramer.hh -include/MPEG1or2Demux.hh -include/MPEG1or2DemuxedElementaryStream.hh -include/MPEG1or2DemuxedServerMediaSubsession.hh -include/MPEG1or2FileServerDemux.hh -include/MPEG1or2VideoFileServerMediaSubsession.hh -include/MPEG1or2VideoRTPSink.hh -include/MPEG1or2VideoRTPSource.hh -include/MPEG1or2VideoStreamDiscreteFramer.hh -include/MPEG1or2VideoStreamFramer.hh -include/MPEG2IndexFromTransportStream.hh -include/MPEG2TransportFileServerMediaSubsession.hh -include/MPEG2TransportStreamFramer.hh -include/MPEG2TransportStreamFromESSource.hh -include/MPEG2TransportStreamFromPESSource.hh -include/MPEG2TransportStreamIndexFile.hh -include/MPEG2TransportStreamMultiplexor.hh -include/MPEG2TransportStreamTrickModeFilter.hh -include/MPEG2TransportUDPServerMediaSubsession.hh -include/MPEG4ESVideoRTPSink.hh -include/MPEG4ESVideoRTPSource.hh -include/MPEG4GenericRTPSink.hh -include/MPEG4GenericRTPSource.hh -include/MPEG4LATMAudioRTPSink.hh -include/MPEG4LATMAudioRTPSource.hh -include/MPEG4VideoFileServerMediaSubsession.hh -include/MPEG4VideoStreamDiscreteFramer.hh -include/MPEG4VideoStreamFramer.hh -include/MPEGVideoStreamFramer.hh -include/MultiFramedRTPSink.hh -include/MultiFramedRTPSource.hh -include/OggFile.hh -include/OggFileServerDemux.hh -include/OggFileSink.hh -include/OnDemandServerMediaSubsession.hh -include/ourMD5.hh -include/OutputFile.hh -include/PassiveServerMediaSubsession.hh -include/ProxyServerMediaSession.hh -include/QCELPAudioRTPSource.hh -include/QuickTimeFileSink.hh -include/QuickTimeGenericRTPSource.hh -include/RTCP.hh -include/RTPInterface.hh -include/RTPSink.hh -include/RTPSource.hh -include/RTSPClient.hh -include/RTSPCommon.hh -include/RTSPRegisterSender.hh -include/RTSPServer.hh -include/RTSPServerSupportingHTTPStreaming.hh -include/ServerMediaSession.hh -include/SimpleRTPSink.hh -include/SimpleRTPSource.hh -include/SIPClient.hh -include/StreamReplicator.hh -include/T140TextRTPSink.hh -include/TCPStreamSink.hh -include/TextRTPSink.hh -include/TheoraVideoRTPSink.hh -include/TheoraVideoRTPSource.hh -include/uLawAudioFilter.hh -include/VideoRTPSink.hh -include/VorbisAudioRTPSink.hh -include/VorbisAudioRTPSource.hh -include/VP8VideoRTPSink.hh -include/VP8VideoRTPSource.hh -include/VP9VideoRTPSink.hh -include/VP9VideoRTPSource.hh -include/WAVAudioFileServerMediaSubsession.hh -include/WAVAudioFileSource.hh -) - -INCLUDE_DIRECTORIES( -${live555Includes} -) - -ADD_LIBRARY( liveMedia STATIC ${LIVE_MEDIA_HEADERS} ${LIVE_MEDIA_SRCS}) diff --git a/ports/live555/master.txt b/ports/live555/master.txt deleted file mode 100644 index b71c69f68..000000000 --- a/ports/live555/master.txt +++ /dev/null @@ -1,12 +0,0 @@ -cmake_minimum_required(VERSION 2.6) - -PROJECT( live555 C CXX) - -SET(live555Includes -${live555_SOURCE_DIR}/live/BasicUsageEnvironment/include -${live555_SOURCE_DIR}/live/groupsock/include -${live555_SOURCE_DIR}/live/liveMedia/include -${live555_SOURCE_DIR}/live/UsageEnvironment/include -) - -ADD_SUBDIRECTORY( live ) diff --git a/ports/live555/mediaServer.txt b/ports/live555/mediaServer.txt deleted file mode 100644 index 1337b8204..000000000 --- a/ports/live555/mediaServer.txt +++ /dev/null @@ -1,23 +0,0 @@ -# CMakeLists.txt mediaServer directory - -# headers -SET(MEDIA_SERVER_HDRS -DynamicRTSPServer.hh -) - -# source files for mediaServer -SET(MEDIA_SERVER_SRCS -DynamicRTSPServer.cpp -live555MediaServer.cpp -) - -ADD_EXECUTABLE(mediaServer ${MEDIA_SERVER_HDRS} ${MEDIA_SERVER_SRCS}) -TARGET_LINK_LIBRARIES( -mediaServer -BasicUsageEnvironment -groupsock -liveMedia -UsageEnvironment -ws2_32 -winmm -) diff --git a/ports/live555/portfile.cmake b/ports/live555/portfile.cmake index 56abdafa5..9e942d046 100644 --- a/ports/live555/portfile.cmake +++ b/ports/live555/portfile.cmake @@ -1,71 +1,35 @@ +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("live555 cannot currently be built dynamically. Building static instead.") + set(VCPKG_LIBRARY_LINKAGE "static") +endif() + include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/live) +set(LIVE_VERSION 2018.02.18) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIVE_VERSION}/live) vcpkg_download_distfile(ARCHIVE - URLS "http://www.live555.com/liveMedia/public/live.2018.01.29.tar.gz" - FILENAME "live.2018.01.29.tar.gz" - SHA512 dfdfcac67acd28f651807de423c6aed00190cfc38ecd361b76d37d8cc27ee2fa91a42a5b8835045680fd7f65c847e41747b948c2c71e6530a3c7e89421c60227 + URLS "http://www.live555.com/liveMedia/public/live.${LIVE_VERSION}.tar.gz" + FILENAME "live.${LIVE_VERSION}.tar.gz" + SHA512 9f72f63df4ce763bf1d106814bfc049562cd909ab96fe3e27e13372ce841e53b89ef302af1743fe83fe3a6aa2ba3c1882bd4184155d3674e0fb3c690b4cebf17 ) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/master.txt ${CURRENT_BUILDTREES_DIR}/src/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) -vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/live.txt ${CURRENT_BUILDTREES_DIR}/src/live/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) -vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/BasicUsageEnvironment.txt ${CURRENT_BUILDTREES_DIR}/src/live/BasicUsageEnvironment/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) -vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/groupsock.txt ${CURRENT_BUILDTREES_DIR}/src/live/groupsock/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) -vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/liveMedia.txt ${CURRENT_BUILDTREES_DIR}/src/live/liveMedia/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) -vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/mediaServer.txt ${CURRENT_BUILDTREES_DIR}/src/live/mediaServer/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) -vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/proxyServer.txt ${CURRENT_BUILDTREES_DIR}/src/live/proxyServer/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) -vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/testProgs.txt ${CURRENT_BUILDTREES_DIR}/src/live/testProgs/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) -vcpkg_execute_required_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/UsageEnvironment.txt ${CURRENT_BUILDTREES_DIR}/src/live/UsageEnvironment/CMakeLists.txt WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) +vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/${LIVE_VERSION}) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) -vcpkg_build_cmake() - -file(GLOB DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/live/*/Release/*.dll" -) -file(GLOB LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/live/*/Release/*.lib" -) -file(GLOB DEBUG_DLLS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/live/*/Debug/*.dll" -) -file(GLOB DEBUG_LIBS - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" - "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/live/*/Debug/*.lib" - -) +vcpkg_install_cmake() file(GLOB HEADERS -"${CURRENT_BUILDTREES_DIR}/src/live/BasicUsageEnvironment/include/*.h*" -"${CURRENT_BUILDTREES_DIR}/src/live/groupsock/include/*.h*" -"${CURRENT_BUILDTREES_DIR}/src/live/liveMedia/include/*.h*" -"${CURRENT_BUILDTREES_DIR}/src/live/UsageEnvironment/include/*.h*" + "${SOURCE_PATH}/BasicUsageEnvironment/include/*.h*" + "${SOURCE_PATH}/groupsock/include/*.h*" + "${SOURCE_PATH}/liveMedia/include/*.h*" + "${SOURCE_PATH}/UsageEnvironment/include/*.h*" ) -if(DLLS) - file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -endif() -file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -if(DEBUG_DLLS) - file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() -file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/live/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/live555 RENAME copyright) + +file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/live555 RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/live555/proxyServer.txt b/ports/live555/proxyServer.txt deleted file mode 100644 index 69677848e..000000000 --- a/ports/live555/proxyServer.txt +++ /dev/null @@ -1,17 +0,0 @@ -# CMakeLists.txt proxyServer directory - -# source files for proxyServer -SET(PROXY_SERVER_SRCS -live555ProxyServer.cpp -) - -ADD_EXECUTABLE(proxyServer ${PROXY_SERVER_SRCS}) -TARGET_LINK_LIBRARIES( -proxyServer -BasicUsageEnvironment -groupsock -liveMedia -UsageEnvironment -ws2_32 -winmm -) diff --git a/ports/live555/testProgs.txt b/ports/live555/testProgs.txt deleted file mode 100644 index ea9307069..000000000 --- a/ports/live555/testProgs.txt +++ /dev/null @@ -1,114 +0,0 @@ -# CMakeLists.txt testProgs directory - -# headers -SET(COMMON_HDRS -playCommon.hh -) - -# source files for MediaPreEncoderServer -SET(OPEN_RTSP_SRCS -openRTSP.cpp -playCommon.cpp -) - -SET(PLAY_SIP_SRCS -playCommon.cpp -playSIP.cpp -) - -SET(TEST_AMR_AUDIO_STREAMER_SRCS -testAMRAudioStreamer.cpp -) - -SET(TEST_H264_VIDEO_STREAMER_SRCS -testH264VideoStreamer.cpp -) - -SET(TEST_H265_VIDEO_STREAMER_SRCS -testH265VideoStreamer.cpp -) - -SET(ON_DEMAND_RTSP_SERVER_SRCS -testOnDemandRTSPServer.cpp -) - -SET(TEST_RTSP_CLIENT_SRCS -testRTSPClient.cpp -) - -ADD_EXECUTABLE(openRTSP ${COMMON_HDRS} ${OPEN_RTSP_SRCS}) -TARGET_LINK_LIBRARIES( -openRTSP -BasicUsageEnvironment -groupsock -liveMedia -UsageEnvironment -ws2_32 -winmm -) - -ADD_EXECUTABLE(playSip ${COMMON_HDRS} ${PLAY_SIP_SRCS}) -TARGET_LINK_LIBRARIES( -playSip -BasicUsageEnvironment -groupsock -liveMedia -UsageEnvironment -ws2_32 -winmm -) - -ADD_EXECUTABLE(testAmrAudioStreamer ${COMMON_HDRS} ${TEST_AMR_AUDIO_STREAMER_SRCS}) -TARGET_LINK_LIBRARIES( -testAmrAudioStreamer -BasicUsageEnvironment -groupsock -liveMedia -UsageEnvironment -ws2_32 -winmm -) - -ADD_EXECUTABLE(testH264VideoStreamer ${COMMON_HDRS} ${TEST_H264_VIDEO_STREAMER_SRCS}) -TARGET_LINK_LIBRARIES( -testH264VideoStreamer -BasicUsageEnvironment -groupsock -liveMedia -UsageEnvironment -ws2_32 -winmm -) - -ADD_EXECUTABLE(testH265VideoStreamer ${COMMON_HDRS} ${TEST_H265_VIDEO_STREAMER_SRCS}) -TARGET_LINK_LIBRARIES( -testH265VideoStreamer -BasicUsageEnvironment -groupsock -liveMedia -UsageEnvironment -ws2_32 -winmm -) - -ADD_EXECUTABLE(testOnDemandRTSPServer ${COMMON_HDRS} ${ON_DEMAND_RTSP_SERVER_SRCS}) -TARGET_LINK_LIBRARIES( -testOnDemandRTSPServer -BasicUsageEnvironment -groupsock -liveMedia -UsageEnvironment -ws2_32 -winmm -) - -ADD_EXECUTABLE(testRTSPClient ${COMMON_HDRS} ${TEST_RTSP_CLIENT_SRCS}) -TARGET_LINK_LIBRARIES( -testRTSPClient -BasicUsageEnvironment -groupsock -liveMedia -UsageEnvironment -ws2_32 -winmm -) -- cgit v1.2.3 From 16ca72dfe9bca88246b5b56a103f725c9a346931 Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Sat, 24 Feb 2018 15:04:58 +0800 Subject: [monkeys-audio] Init port --- ports/monkeys-audio/CONTROL | 5 ++++ ports/monkeys-audio/license | 42 ++++++++++++++++++++++++++++++++++ ports/monkeys-audio/portfile.cmake | 47 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 ports/monkeys-audio/CONTROL create mode 100644 ports/monkeys-audio/license create mode 100644 ports/monkeys-audio/portfile.cmake diff --git a/ports/monkeys-audio/CONTROL b/ports/monkeys-audio/CONTROL new file mode 100644 index 000000000..7b28d4c08 --- /dev/null +++ b/ports/monkeys-audio/CONTROL @@ -0,0 +1,5 @@ +Source: monkeys-audio +Version: 4.3.3 +Description: Monkey's Audio is an excellent audio compression tool which has multiple advantages over traditional methods. + Audio files compressed with it ends with .ape extension. + \ No newline at end of file diff --git a/ports/monkeys-audio/license b/ports/monkeys-audio/license new file mode 100644 index 000000000..a4ab2f09a --- /dev/null +++ b/ports/monkeys-audio/license @@ -0,0 +1,42 @@ +Monkey's Audio Program License Agreement +======================================== + +1. Monkey's Audio is completely free for personal, educational, or commercial use. + +2. Although the software has been tested thoroughly, the author is in no way responsible for + damages due to bugs or misuse. + +3. The redistribution of Monkey's Audio is only allowed in cases where the original installer and + components therein have not been modified. + +4. The use of Monkey's Audio or any component thereof from another program requires + compliance with the 'Monkey's Audio SDK and Source Code License Agreement'. + +5. Installing and using Monkey's Audio signifies the acceptance of these terms. If you do not + agree with any of the above terms, you must cease using Monkey's Audio and remove it from + your storage device. + + +Monkey's Audio SDK and Source Code License Agreement +==================================================== + +1. The Monkey's Audio SDK and source code can be freely used to add APE format playback, + encoding, or tagging support to any product, free or commercial. + +2. Monkey's Audio source can be included in GPL and open-source software, although Monkey's + Audio itself will not be subjected to external licensing requirements or other viral source + restrictions. + +3. Code changes and improvements must be contributed back to the Monkey's Audio project or + made freely available, unless exempted by written consent of the author. + +4. Any source code, ideas, or libraries used must be plainly acknowledged in the software using + the code. + +5. Although the software has been tested thoroughly, the author is in no way responsible for + damages due to bugs or misuse. + +6. If you do not completely agree with all of the previous stipulations, you must cease using this + source code and remove it from your storage device. + +All materials and programs copyrighted ©2000-2018 by Matt Ashland diff --git a/ports/monkeys-audio/portfile.cmake b/ports/monkeys-audio/portfile.cmake new file mode 100644 index 000000000..10b650ba4 --- /dev/null +++ b/ports/monkeys-audio/portfile.cmake @@ -0,0 +1,47 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "${PORT} currently only support static build") +endif() + +include(vcpkg_common_functions) + +set(VERSION 4.7) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Source) +set(PROJECT_PATH ${SOURCE_PATH}/Projects/VS2017) + +vcpkg_download_distfile(ARCHIVE + URLS "http://monkeysaudio.com/files/MAC_SDK_433.zip" + FILENAME "MAC_SDK_433.zip" + SHA512 957ba262da29a8542ab82dc828328b19bf80ecf0d09165db935924b390cb6a3a2d9303a2e07b86b28ecf4210a66dd5c4be840205a9f09518189101033f1a13c8 +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_build_msbuild( + PROJECT_PATH ${PROJECT_PATH}/Console/Console.vcxproj +) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/Shared/ + DESTINATION ${CURRENT_PACKAGES_DIR}/include/monkeys-audio + FILES_MATCHING PATTERN "*.h") +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/monkeys-audio/MACDll.h) + +file(COPY + ${PROJECT_PATH}/MACLib/Debug/MACLib.lib + ${PROJECT_PATH}/MACLib/Debug/MACLib.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +file(COPY + ${PROJECT_PATH}/MACLib/Release/MACLib.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL ${PROJECT_PATH}/Console/Release/Console.exe + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio + RENAME mac.exe) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/monkeys-audio RENAME copyright) -- cgit v1.2.3 From 451c6a80264f55c0cb2166f65fd44e5092debb84 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 23:36:52 -0800 Subject: [exiv2] Fix FindIconv --- ports/exiv2/CONTROL | 4 ++-- ports/exiv2/portfile.cmake | 5 +++++ ports/exiv2/use-iconv.patch | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 ports/exiv2/use-iconv.patch diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index eb5e4c39a..2a0c9837f 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99-1 -Build-Depends: zlib, expat +Version: 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99-2 +Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 93d16690c..c6fc7bbac 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -13,6 +13,11 @@ vcpkg_configure_cmake( PREFER_NINJA ) +vcpkg_apply_patches( + SOURCE_PATH "${SOURCE_PATH}" + PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-iconv.patch" +) + vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "share/exiv2/cmake") diff --git a/ports/exiv2/use-iconv.patch b/ports/exiv2/use-iconv.patch new file mode 100644 index 000000000..4305ec550 --- /dev/null +++ b/ports/exiv2/use-iconv.patch @@ -0,0 +1,37 @@ +diff --git a/config/FindIconv.cmake b/config/FindIconv.cmake +index 15a0e39..53718bf 100644 +--- a/config/FindIconv.cmake ++++ b/config/FindIconv.cmake +@@ -36,12 +36,13 @@ if(NOT ICONV_INCLUDE_DIR STREQUAL "ICONV_INCLUDE_DIR-NOTFOUND") + endif() + + if(NOT ICONV_IN_GLIBC) +- find_library(ICONV_LIBRARY NAMES iconv) ++ find_library(ICONV_LIBRARY NAMES iconv libiconv) + set(ICONV_TEST ${ICONV_LIBRARY}) + else() + set(ICONV_TEST "In glibc") + endif() + ++set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY}) + check_cxx_source_compiles( + "#include +@@ -59,7 +60,8 @@ else(ICONV_FOUND) + set(ICONV_LIBRARIES) + endif(ICONV_FOUND) + +-if(ICONV_FOUND) ++if(ICONV_FOUND) ++ set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) + check_cxx_source_compiles( + "#include +@@ -69,6 +71,7 @@ if(ICONV_FOUND) + }" + ICONV_ACCEPTS_NONCONST_INPUT) + ++ set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) + check_cxx_source_compiles( + "#include -- cgit v1.2.3 From c55ccbf146f6aeaba158f58614578906ae3f01ab Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Feb 2018 23:55:32 -0800 Subject: [exiv2] Hotfix previous fix -- apply patches before configuring --- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 2a0c9837f..087cd84e4 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99-2 +Version: 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99-3 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index c6fc7bbac..a4f9e1b00 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -8,16 +8,16 @@ vcpkg_from_github( HEAD_REF master ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) - vcpkg_apply_patches( SOURCE_PATH "${SOURCE_PATH}" PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-iconv.patch" ) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "share/exiv2/cmake") -- cgit v1.2.3 From 63901137f66ec90f4a51070bd53a2d7433b4b54a Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Sat, 24 Feb 2018 16:00:51 +0800 Subject: Add doxygen and add packages option to vcpkg_require_msys (#2869) * Add doxygen to acquired programs * Add packages option to msys function * Add documentation for PACKAGES in vcpkg_require_msys * [ffmpeg][x264] Update to use `PACKAGES` parameter. Tweak docs. --- docs/maintainers/vcpkg_acquire_msys.md | 20 ++++--------- ports/ffmpeg/build.sh | 1 - ports/ffmpeg/portfile.cmake | 14 ++++----- ports/icu/portfile.cmake | 7 +---- ports/libvpx/portfile.cmake | 10 +------ ports/x264/portfile.cmake | 7 +---- scripts/cmake/vcpkg_acquire_msys.cmake | 41 ++++++++++++++++---------- scripts/cmake/vcpkg_find_acquire_program.cmake | 6 ++++ 8 files changed, 45 insertions(+), 61 deletions(-) diff --git a/docs/maintainers/vcpkg_acquire_msys.md b/docs/maintainers/vcpkg_acquire_msys.md index 53aa6532e..4dc8f5391 100644 --- a/docs/maintainers/vcpkg_acquire_msys.md +++ b/docs/maintainers/vcpkg_acquire_msys.md @@ -4,13 +4,18 @@ Download and prepare an MSYS2 instance. ## Usage ```cmake -vcpkg_acquire_msys() +vcpkg_acquire_msys( [PACKAGES ...]) ``` ## Parameters ### MSYS_ROOT_VAR An out-variable that will be set to the path to MSYS2. +### PACKAGES +A list of packages to acquire in msys. + +To ensure a package is available: `vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15)` + ## Notes A call to `vcpkg_acquire_msys` will usually be followed by a call to `bash.exe`: ```cmake @@ -23,19 +28,6 @@ vcpkg_execute_required_process( LOGNAME build-${TARGET_TRIPLET}-rel ) ``` -To ensure a package is available: -```cmake -vcpkg_acquire_msys(MSYS_ROOT) -set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) - -message(STATUS "Installing MSYS Packages") -vcpkg_execute_required_process( - COMMAND - ${BASH} --noprofile --norc -c - 'PATH=/usr/bin:\$PATH pacman -Sy --noconfirm --needed make' - WORKING_DIRECTORY ${MSYS_ROOT} - LOGNAME pacman-${TARGET_TRIPLET}) -``` ## Examples diff --git a/ports/ffmpeg/build.sh b/ports/ffmpeg/build.sh index eea05c959..048d9ec08 100644 --- a/ports/ffmpeg/build.sh +++ b/ports/ffmpeg/build.sh @@ -8,7 +8,6 @@ fi if [ "$HTTPS_PROXY" ]; then export https_proxy=$HTTPS_PROXY fi -pacman -Sy --noconfirm --needed diffutils make PATH_TO_BUILD_DIR="`cygpath "$1"`" PATH_TO_SRC_DIR="`cygpath "$2"`" diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 9e969bf6c..56b467685 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -17,7 +17,11 @@ vcpkg_find_acquire_program(YASM) get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") -vcpkg_acquire_msys(MSYS_ROOT) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + vcpkg_acquire_msys(MSYS_ROOT PACKAGES perl gcc diffutils make) +else() + vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils make) +endif() set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}") set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;$ENV{LIB}") @@ -45,14 +49,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${GAS_ITEM_PATH}") endforeach(GAS_PATH) - - ## Get Perl and GCC for MSYS2 - vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c 'PATH=/usr/bin:\$PATH;pacman -Sy --noconfirm --needed perl gcc' - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} - LOGNAME msys-${TARGET_TRIPLET} - ) - elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") else() diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake index 11637b061..dcf9efda5 100644 --- a/ports/icu/portfile.cmake +++ b/ports/icu/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-escapestr-tool.patch) # Acquire tools -vcpkg_acquire_msys(MSYS_ROOT) +vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15) # Insert msys into the path between the compiler toolset and windows system32. This prevents masking of "link.exe" but DOES mask "find.exe". string(REPLACE ";$ENV{SystemRoot}\\system32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") @@ -23,11 +23,6 @@ string(REPLACE ";$ENV{SystemRoot}\\System32;" ";${MSYS_ROOT}/usr/bin;$ENV{System set(ENV{PATH} "${NEWPATH}") set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "pacman -Sy --noconfirm --needed make automake1.15" - WORKING_DIRECTORY "${MSYS_ROOT}" - LOGNAME "pacman-${TARGET_TRIPLET}") - set(AUTOMAKE_DIR ${MSYS_ROOT}/usr/share/automake-1.15) file(COPY ${AUTOMAKE_DIR}/config.guess ${AUTOMAKE_DIR}/config.sub DESTINATION ${SOURCE_PATH}/source) diff --git a/ports/libvpx/portfile.cmake b/ports/libvpx/portfile.cmake index f7e36b5a8..31630332a 100644 --- a/ports/libvpx/portfile.cmake +++ b/ports/libvpx/portfile.cmake @@ -22,20 +22,12 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_find_acquire_program(YASM) vcpkg_find_acquire_program(PERL) -vcpkg_acquire_msys(MSYS_ROOT) +vcpkg_acquire_msys(MSYS_ROOT PACKAGES make) get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "${YASM_EXE_PATH};${MSYS_ROOT}/usr/bin;$ENV{PATH};${PERL_EXE_PATH}") set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) -message(STATUS "Installing MSYS Packages") -vcpkg_execute_required_process( - COMMAND - ${BASH} --noprofile --norc -c - "pacman -Sy --noconfirm --needed make" - WORKING_DIRECTORY ${MSYS_ROOT} - LOGNAME pacman-${TARGET_TRIPLET}) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) if(VCPKG_CRT_LINKAGE STREQUAL static) diff --git a/ports/x264/portfile.cmake b/ports/x264/portfile.cmake index a6115f8d1..b9dbfa34d 100644 --- a/ports/x264/portfile.cmake +++ b/ports/x264/portfile.cmake @@ -11,18 +11,13 @@ vcpkg_from_github( ) # Acquire tools -vcpkg_acquire_msys(MSYS_ROOT) +vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15) # Insert msys into the path between the compiler toolset and windows system32. This prevents masking of "link.exe" but DOES mask "find.exe". string(REPLACE ";$ENV{SystemRoot}\\system32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") set(ENV{PATH} "${NEWPATH}") set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) -vcpkg_execute_required_process( - COMMAND ${BASH} --noprofile --norc -c "pacman -Sy --noconfirm --needed make automake1.15" - WORKING_DIRECTORY "${MSYS_ROOT}" - LOGNAME "pacman-${TARGET_TRIPLET}") - set(AUTOMAKE_DIR ${MSYS_ROOT}/usr/share/automake-1.15) #file(COPY ${AUTOMAKE_DIR}/config.guess ${AUTOMAKE_DIR}/config.sub DESTINATION ${SOURCE_PATH}/source) diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index 80a30bf2b..ab0f4d047 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -4,13 +4,18 @@ ## ## ## Usage ## ```cmake -## vcpkg_acquire_msys() +## vcpkg_acquire_msys( [PACKAGES ...]) ## ``` ## ## ## Parameters ## ### MSYS_ROOT_VAR ## An out-variable that will be set to the path to MSYS2. ## +## ### PACKAGES +## A list of packages to acquire in msys. +## +## To ensure a package is available: `vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15)` +## ## ## Notes ## A call to `vcpkg_acquire_msys` will usually be followed by a call to `bash.exe`: ## ```cmake @@ -23,19 +28,6 @@ ## LOGNAME build-${TARGET_TRIPLET}-rel ## ) ## ``` -## To ensure a package is available: -## ```cmake -## vcpkg_acquire_msys(MSYS_ROOT) -## set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) -## -## message(STATUS "Installing MSYS Packages") -## vcpkg_execute_required_process( -## COMMAND -## ${BASH} --noprofile --norc -c -## 'PATH=/usr/bin:\$PATH pacman -Sy --noconfirm --needed make' -## WORKING_DIRECTORY ${MSYS_ROOT} -## LOGNAME pacman-${TARGET_TRIPLET}) -## ``` ## ## ## Examples ## @@ -45,6 +37,7 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) set(TOOLPATH ${DOWNLOADS}/tools/msys2) + cmake_parse_arguments(_am "" "" "PACKAGES" ${ARGN}) # detect host architecture if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) @@ -85,16 +78,32 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) WORKING_DIRECTORY ${TOOLPATH} ) execute_process( - COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin:\$PATH;pacman-key --init;pacman-key --populate" + COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman-key --init;pacman-key --populate" WORKING_DIRECTORY ${TOOLPATH} ) execute_process( - COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin:\$PATH;pacman -Syu --noconfirm" + COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman -Syu --noconfirm" WORKING_DIRECTORY ${TOOLPATH} ) file(WRITE "${TOOLPATH}/${STAMP}" "0") message(STATUS "Acquiring MSYS2... OK") endif() + if(_am_PACKAGES) + message(STATUS "Acquiring MSYS Packages...") + string(REPLACE ";" " " _am_PACKAGES "${_am_PACKAGES}") + + set(_ENV_ORIGINAL $ENV{PATH}) + set(ENV{PATH} ${PATH_TO_ROOT}/usr/bin) + vcpkg_execute_required_process( + COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "pacman -Sy --noconfirm --needed ${_am_PACKAGES}" + WORKING_DIRECTORY ${TOOLPATH} + LOGNAME msys-pacman-${TARGET_TRIPLET} + ) + set(ENV{PATH} "${_ENV_ORIGINAL}") + + message(STATUS "Acquiring MSYS Packages... OK") + endif() + set(${PATH_TO_ROOT_OUT} ${PATH_TO_ROOT} PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 1e6979bad..b24345021 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -159,6 +159,12 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://sourceforge.net/projects/scons/files/scons-local-3.0.1.zip/download") set(ARCHIVE "scons-local-3.0.1.zip") set(HASH fe121b67b979a4e9580c7f62cfdbe0c243eba62a05b560d6d513ac7f35816d439b26d92fc2d7b7d7241c9ce2a49ea7949455a17587ef53c04a5f5125ac635727) + elseif(VAR MATCHES "DOXYGEN") + set(PROGNAME doxygen) + set(PATHS ${DOWNLOADS}/tools/doxygen) + set(URL "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.14.windows.bin.zip") + set(ARCHIVE "doxygen-1.8.14.windows.bin.zip") + set(HASH d0d706501e7112045b1f401f22d12a2c8d9b7728edee9ad1975a17dff914c16494ae48a70beab6f6304643779935843f268c7afed3b9da7d403b5cb11cac0c50) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() -- cgit v1.2.3 From e391e7b5ddf3cb7369c18730a8f8403fe05472a5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 24 Feb 2018 01:29:13 -0800 Subject: [wxwidgets] Upgrade to 3.1.1 --- ports/wxwidgets/CONTROL | 2 +- ports/wxwidgets/disable-platform-lib-dir.patch | 13 + ports/wxwidgets/portfile.cmake | 123 +-- ports/wxwidgets/use-installed-libs.patch | 1198 ------------------------ 4 files changed, 46 insertions(+), 1290 deletions(-) create mode 100644 ports/wxwidgets/disable-platform-lib-dir.patch delete mode 100644 ports/wxwidgets/use-installed-libs.patch diff --git a/ports/wxwidgets/CONTROL b/ports/wxwidgets/CONTROL index 40da8e3d7..48ceab120 100644 --- a/ports/wxwidgets/CONTROL +++ b/ports/wxwidgets/CONTROL @@ -1,4 +1,4 @@ Source: wxwidgets -Version: 3.1.0-1 +Version: 3.1.1 Description: wxWidgets is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. Build-Depends: zlib, libpng, tiff, expat diff --git a/ports/wxwidgets/disable-platform-lib-dir.patch b/ports/wxwidgets/disable-platform-lib-dir.patch new file mode 100644 index 000000000..2a1de613e --- /dev/null +++ b/ports/wxwidgets/disable-platform-lib-dir.patch @@ -0,0 +1,13 @@ +diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake +index 06256b1..2960a31 100644 +--- a/build/cmake/init.cmake ++++ b/build/cmake/init.cmake +@@ -66,7 +66,7 @@ else() + set(wxCOMPILER_PREFIX) + endif() + +-if(MSVC OR MINGW) ++if((MSVC OR MINGW) AND NOT wxBUILD_DISABLE_PLATFORM_LIB_DIR) + if(wxBUILD_SHARED) + set(lib_suffix "dll") + else() diff --git a/ports/wxwidgets/portfile.cmake b/ports/wxwidgets/portfile.cmake index a68f71f99..c88b4b613 100644 --- a/ports/wxwidgets/portfile.cmake +++ b/ports/wxwidgets/portfile.cmake @@ -1,110 +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_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO wxWidgets/wxWidgets - REF v3.1.0 - SHA512 740f3c977526395f32c2da4ea7f5f2ddc9b9a4cfd8d2cd129f011ede8e427621461c551c648b5d7a8f9ce78477e30426b836b310cff09c427ca8f9b9a9532074 + REF v3.1.1 + SHA512 f6d8974e2f48bae7e96a8938df3ad5efc403036c1dcbe2b48edd276ee7923802ba3e95e3f3bd9db17985e427b8e4f78950df0cbba83ae99d508ed04633816c95 HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-installed-libs.patch" + PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable-platform-lib-dir.patch" ) -find_program(NMAKE nmake REQUIRED) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DwxUSE_REGEX=builtin + -DwxUSE_ZLIB=sys + -DwxUSE_EXPAT=sys + -DwxUSE_LIBJPEG=sys + -DwxUSE_LIBPNG=sys + -DwxUSE_LIBTIFF=sys + -DwxUSE_STL=ON + -DwxBUILD_DISABLE_PLATFORM_LIB_DIR=ON +) -set(NMAKE_OPTIONS "") +vcpkg_install_cmake() -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - list(APPEND NMAKE_OPTIONS TARGET_CPU=X64) - set(LIB_SUB_PATH_PRE vc_x64) -else () - set(LIB_SUB_PATH_PRE vc) +file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +if(DLLS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + foreach(DLL ${DLLS}) + get_filename_component(N "${DLL}" NAME) + file(RENAME ${DLL} ${CURRENT_PACKAGES_DIR}/bin/${N}) + endforeach() endif() - -if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - list(APPEND NMAKE_OPTIONS SHARED=1) - set(LIB_SUB_PATH_TYP dll) -else() - set(LIB_SUB_PATH_TYP lib) +file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +if(DLLS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + foreach(DLL ${DLLS}) + get_filename_component(N "${DLL}" NAME) + file(RENAME ${DLL} ${CURRENT_PACKAGES_DIR}/debug/bin/${N}) + endforeach() endif() -if (VCPKG_CRT_LINKAGE STREQUAL "static") - list(APPEND NMAKE_OPTIONS RUNTIME_LIBS=static) -endif() - -set(LIB_SUB_PATH ${LIB_SUB_PATH_PRE}_${LIB_SUB_PATH_TYP}${TARGET_TRIPLET}) - -list(APPEND NMAKE_OPTIONS VCPKG_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include) - -set(NMAKE_OPTIONS_REL - ${NMAKE_OPTIONS} - VCPKG_LIB_DIR=${CURRENT_INSTALLED_DIR}/lib - BUILD=release - CFG=${TARGET_TRIPLET}-rel -) - -set(NMAKE_OPTIONS_DBG - ${NMAKE_OPTIONS} - VCPKG_LIB_DIR=${CURRENT_INSTALLED_DIR}/debug/lib - CFG=${TARGET_TRIPLET}-dbg -) - -file(REMOVE_RECURSE ${SOURCE_PATH}/lib/${LIB_SUB_PATH}) - -################ -# Release build -################ -message(STATUS "Building ${TARGET_TRIPLET}-rel") -set(ENV{_LINK_} ${CURRENT_INSTALLED_DIR}/lib/expat.lib) -vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc ${NMAKE_OPTIONS_REL} - WORKING_DIRECTORY ${SOURCE_PATH}/build/msw - LOGNAME nmake-build-${TARGET_TRIPLET}-release -) -message(STATUS "Building ${TARGET_TRIPLET}-rel done") - -################ -# Debug build -################ -message(STATUS "Building ${TARGET_TRIPLET}-dbg") -set(ENV{_LINK_} ${CURRENT_INSTALLED_DIR}/debug/lib/expat.lib) -vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc ${NMAKE_OPTIONS_DBG} - WORKING_DIRECTORY ${SOURCE_PATH}/build/msw - LOGNAME nmake-build-${TARGET_TRIPLET}-debug -) -message(STATUS "Building ${TARGET_TRIPLET}-dbg done") - -# Install headers and libraries -file(INSTALL ${SOURCE_PATH}/include - DESTINATION ${CURRENT_PACKAGES_DIR}) -file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/mswu/wx/setup.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/wx) -file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/mswu/wx/msw/rcdefs.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/wx/msw) -file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/ - DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.lib" PATTERN "*.pdb") -file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-rel/ - DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dll") -file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-dbg/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "*.lib" PATTERN "*.pdb") -file(INSTALL ${SOURCE_PATH}/lib/${LIB_SUB_PATH}-dbg/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dll") -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/mswu ${CURRENT_PACKAGES_DIR}/debug/lib/mswud) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/mswu ${CURRENT_PACKAGES_DIR}/debug/bin/mswud) - # Handle copyright file(COPY ${SOURCE_PATH}/docs/licence.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxwidgets) file(RENAME ${CURRENT_PACKAGES_DIR}/share/wxWidgets/licence.txt ${CURRENT_PACKAGES_DIR}/share/wxwidgets/copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) \ No newline at end of file diff --git a/ports/wxwidgets/use-installed-libs.patch b/ports/wxwidgets/use-installed-libs.patch deleted file mode 100644 index 9abae7128..000000000 --- a/ports/wxwidgets/use-installed-libs.patch +++ /dev/null @@ -1,1198 +0,0 @@ -diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc -index 5a30f76..b2de89d 100644 ---- a/build/msw/makefile.vc -+++ b/build/msw/makefile.vc -@@ -50,50 +50,6 @@ WXREGEX_OBJECTS = \ - $(OBJS)\wxregex_regexec.obj \ - $(OBJS)\wxregex_regerror.obj \ - $(OBJS)\wxregex_regfree.obj --WXZLIB_CFLAGS = /M$(__RUNTIME_LIBS_25)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \ -- /Fd$(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).pdb $(____DEBUGRUNTIME) \ -- $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ -- /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ -- $(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS \ -- /D_CRT_NONSTDC_NO_WARNINGS $(CPPFLAGS) $(CFLAGS) --WXZLIB_OBJECTS = \ -- $(OBJS)\wxzlib_adler32.obj \ -- $(OBJS)\wxzlib_compress.obj \ -- $(OBJS)\wxzlib_crc32.obj \ -- $(OBJS)\wxzlib_deflate.obj \ -- $(OBJS)\wxzlib_gzclose.obj \ -- $(OBJS)\wxzlib_gzlib.obj \ -- $(OBJS)\wxzlib_gzread.obj \ -- $(OBJS)\wxzlib_gzwrite.obj \ -- $(OBJS)\wxzlib_infback.obj \ -- $(OBJS)\wxzlib_inffast.obj \ -- $(OBJS)\wxzlib_inflate.obj \ -- $(OBJS)\wxzlib_inftrees.obj \ -- $(OBJS)\wxzlib_trees.obj \ -- $(OBJS)\wxzlib_uncompr.obj \ -- $(OBJS)\wxzlib_zutil.obj --WXPNG_CFLAGS = /M$(__RUNTIME_LIBS_40)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \ -- /Fd$(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).pdb $(____DEBUGRUNTIME) \ -- $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ -- /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ -- $(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /I..\..\src\zlib \ -- $(CPPFLAGS) $(CFLAGS) --WXPNG_OBJECTS = \ -- $(OBJS)\wxpng_png.obj \ -- $(OBJS)\wxpng_pngerror.obj \ -- $(OBJS)\wxpng_pngget.obj \ -- $(OBJS)\wxpng_pngmem.obj \ -- $(OBJS)\wxpng_pngpread.obj \ -- $(OBJS)\wxpng_pngread.obj \ -- $(OBJS)\wxpng_pngrio.obj \ -- $(OBJS)\wxpng_pngrtran.obj \ -- $(OBJS)\wxpng_pngrutil.obj \ -- $(OBJS)\wxpng_pngset.obj \ -- $(OBJS)\wxpng_pngtrans.obj \ -- $(OBJS)\wxpng_pngwio.obj \ -- $(OBJS)\wxpng_pngwrite.obj \ -- $(OBJS)\wxpng_pngwtran.obj \ -- $(OBJS)\wxpng_pngwutil.obj - WXJPEG_CFLAGS = /M$(__RUNTIME_LIBS_55)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \ - /Fd$(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).pdb $(____DEBUGRUNTIME) \ - $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ -@@ -147,53 +103,6 @@ WXJPEG_OBJECTS = \ - $(OBJS)\wxjpeg_jquant1.obj \ - $(OBJS)\wxjpeg_jquant2.obj \ - $(OBJS)\wxjpeg_jdmerge.obj --WXTIFF_CFLAGS = /M$(__RUNTIME_LIBS_70)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \ -- /Fd$(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).pdb $(____DEBUGRUNTIME) \ -- $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ -- /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ -- $(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /I..\..\src\zlib \ -- /I..\..\src\jpeg /I..\..\src\tiff\libtiff /D_CRT_NONSTDC_NO_WARNINGS \ -- $(CPPFLAGS) $(CFLAGS) --WXTIFF_OBJECTS = \ -- $(OBJS)\wxtiff_tif_win32.obj \ -- $(OBJS)\wxtiff_tif_aux.obj \ -- $(OBJS)\wxtiff_tif_close.obj \ -- $(OBJS)\wxtiff_tif_codec.obj \ -- $(OBJS)\wxtiff_tif_color.obj \ -- $(OBJS)\wxtiff_tif_compress.obj \ -- $(OBJS)\wxtiff_tif_dir.obj \ -- $(OBJS)\wxtiff_tif_dirinfo.obj \ -- $(OBJS)\wxtiff_tif_dirread.obj \ -- $(OBJS)\wxtiff_tif_dirwrite.obj \ -- $(OBJS)\wxtiff_tif_dumpmode.obj \ -- $(OBJS)\wxtiff_tif_error.obj \ -- $(OBJS)\wxtiff_tif_extension.obj \ -- $(OBJS)\wxtiff_tif_fax3.obj \ -- $(OBJS)\wxtiff_tif_fax3sm.obj \ -- $(OBJS)\wxtiff_tif_flush.obj \ -- $(OBJS)\wxtiff_tif_getimage.obj \ -- $(OBJS)\wxtiff_tif_jbig.obj \ -- $(OBJS)\wxtiff_tif_jpeg.obj \ -- $(OBJS)\wxtiff_tif_jpeg_12.obj \ -- $(OBJS)\wxtiff_tif_luv.obj \ -- $(OBJS)\wxtiff_tif_lzma.obj \ -- $(OBJS)\wxtiff_tif_lzw.obj \ -- $(OBJS)\wxtiff_tif_next.obj \ -- $(OBJS)\wxtiff_tif_ojpeg.obj \ -- $(OBJS)\wxtiff_tif_open.obj \ -- $(OBJS)\wxtiff_tif_packbits.obj \ -- $(OBJS)\wxtiff_tif_pixarlog.obj \ -- $(OBJS)\wxtiff_tif_predict.obj \ -- $(OBJS)\wxtiff_tif_print.obj \ -- $(OBJS)\wxtiff_tif_read.obj \ -- $(OBJS)\wxtiff_tif_strip.obj \ -- $(OBJS)\wxtiff_tif_swab.obj \ -- $(OBJS)\wxtiff_tif_thunder.obj \ -- $(OBJS)\wxtiff_tif_tile.obj \ -- $(OBJS)\wxtiff_tif_version.obj \ -- $(OBJS)\wxtiff_tif_warning.obj \ -- $(OBJS)\wxtiff_tif_write.obj \ -- $(OBJS)\wxtiff_tif_zip.obj - WXEXPAT_CFLAGS = /M$(__RUNTIME_LIBS_85)$(__DEBUGRUNTIME) /DWIN32 \ - $(__DEBUGINFO) /Fd$(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).pdb \ - $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ -@@ -358,8 +267,8 @@ MONODLL_CFLAGS = /M$(__RUNTIME_LIBS_116)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /I..\..\src\stc\scintilla\include \ - /I..\..\src\stc\scintilla\lexlib /I..\..\src\stc\scintilla\src /D__WX__ \ - /DSCI_LEXER /DLINK_LEXERS /DwxUSE_BASE=1 /DWXMAKINGDLL $(CPPFLAGS) $(CFLAGS) -@@ -371,8 +280,8 @@ MONODLL_CXXFLAGS = /M$(__RUNTIME_LIBS_116)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /I..\..\src\stc\scintilla\include \ - /I..\..\src\stc\scintilla\lexlib /I..\..\src\stc\scintilla\src /D__WX__ \ - /DSCI_LEXER /DLINK_LEXERS /DwxUSE_BASE=1 /DWXMAKINGDLL $(__RTTIFLAG) \ -@@ -517,8 +426,8 @@ MONOLIB_CFLAGS = /M$(__RUNTIME_LIBS_131)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /I..\..\src\stc\scintilla\include \ - /I..\..\src\stc\scintilla\lexlib /I..\..\src\stc\scintilla\src /D__WX__ \ - /DSCI_LEXER /DLINK_LEXERS /DwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) -@@ -530,8 +439,8 @@ MONOLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_131)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /I..\..\src\stc\scintilla\include \ - /I..\..\src\stc\scintilla\lexlib /I..\..\src\stc\scintilla\src /D__WX__ \ - /DSCI_LEXER /DLINK_LEXERS /DwxUSE_BASE=1 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ -@@ -673,8 +582,8 @@ BASEDLL_CFLAGS = /M$(__RUNTIME_LIBS_147)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DwxUSE_GUI=0 /DWXMAKINGDLL_BASE /DwxUSE_BASE=1 \ - $(CPPFLAGS) $(CFLAGS) - BASEDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_147)$(__DEBUGRUNTIME) /DWIN32 \ -@@ -685,8 +594,8 @@ BASEDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_147)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DwxUSE_GUI=0 /DWXMAKINGDLL_BASE /DwxUSE_BASE=1 \ - $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_basedll.pch" $(CPPFLAGS) $(CXXFLAGS) -@@ -814,8 +723,8 @@ BASELIB_CFLAGS = /M$(__RUNTIME_LIBS_162)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DwxUSE_GUI=0 /DwxUSE_BASE=1 $(CPPFLAGS) $(CFLAGS) - BASELIB_CXXFLAGS = /M$(__RUNTIME_LIBS_162)$(__DEBUGRUNTIME) /DWIN32 \ - $(__DEBUGINFO) \ -@@ -825,8 +734,8 @@ BASELIB_CXXFLAGS = /M$(__RUNTIME_LIBS_162)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DwxUSE_GUI=0 /DwxUSE_BASE=1 $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_baselib.pch" \ - $(CPPFLAGS) $(CXXFLAGS) -@@ -952,8 +861,8 @@ NETDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_178)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DwxUSE_GUI=0 /DWXUSINGDLL /DWXMAKINGDLL_NET \ - $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_netdll.pch" $(CPPFLAGS) $(CXXFLAGS) -@@ -981,8 +890,8 @@ NETLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_193)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ - /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_netlib.pch" $(CPPFLAGS) $(CXXFLAGS) - NETLIB_OBJECTS = \ -@@ -1007,8 +916,8 @@ COREDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_209)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_CORE /DwxUSE_BASE=0 \ - $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_coredll.pch" $(CPPFLAGS) $(CXXFLAGS) -@@ -1031,8 +940,8 @@ CORELIB_CXXFLAGS = /M$(__RUNTIME_LIBS_224)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DwxUSE_BASE=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ - /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_corelib.pch" $(CPPFLAGS) $(CXXFLAGS) - CORELIB_OBJECTS = \ -@@ -1052,8 +961,8 @@ ADVDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_240)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_ADV $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_advdll.pch" \ - $(CPPFLAGS) $(CXXFLAGS) -@@ -1070,8 +979,8 @@ ADVLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_255)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_advlib.pch" $(CPPFLAGS) $(CXXFLAGS) - ADVLIB_OBJECTS = \ -@@ -1085,8 +994,8 @@ MEDIADLL_CXXFLAGS = /M$(__RUNTIME_LIBS_271)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_MEDIA $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_mediadll.pch" \ - $(CPPFLAGS) $(CXXFLAGS) -@@ -1106,8 +1015,8 @@ MEDIALIB_CXXFLAGS = /M$(__RUNTIME_LIBS_286)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_medialib.pch" $(CPPFLAGS) $(CXXFLAGS) - MEDIALIB_OBJECTS = \ -@@ -1124,8 +1033,8 @@ HTMLDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_302)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_HTML $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_htmldll.pch" \ - $(CPPFLAGS) $(CXXFLAGS) -@@ -1168,8 +1077,8 @@ HTMLLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_317)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_htmllib.pch" $(CPPFLAGS) $(CXXFLAGS) - HTMLLIB_OBJECTS = \ -@@ -1209,8 +1118,8 @@ WEBVIEWDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_333)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_WEBVIEW $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_webviewdll.pch" \ - $(CPPFLAGS) $(CXXFLAGS) -@@ -1230,8 +1139,8 @@ WEBVIEWLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_348)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_webviewlib.pch" $(CPPFLAGS) $(CXXFLAGS) - WEBVIEWLIB_OBJECTS = \ -@@ -1248,8 +1157,8 @@ QADLL_CXXFLAGS = /M$(__RUNTIME_LIBS_364)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_QA $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_qadll.pch" \ - $(CPPFLAGS) $(CXXFLAGS) -@@ -1267,8 +1176,8 @@ QALIB_CXXFLAGS = /M$(__RUNTIME_LIBS_379)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_qalib.pch" $(CPPFLAGS) $(CXXFLAGS) - QALIB_OBJECTS = \ -@@ -1283,8 +1192,8 @@ XMLDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_395)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DwxUSE_GUI=0 /DWXUSINGDLL /DWXMAKINGDLL_XML \ - $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_xmldll.pch" $(CPPFLAGS) $(CXXFLAGS) -@@ -1302,8 +1211,8 @@ XMLLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_410)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ - /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_xmllib.pch" $(CPPFLAGS) $(CXXFLAGS) - XMLLIB_OBJECTS = \ -@@ -1318,8 +1227,8 @@ XRCDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_426)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_XRC $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_xrcdll.pch" \ - $(CPPFLAGS) $(CXXFLAGS) -@@ -1402,8 +1311,8 @@ XRCLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_441)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_xrclib.pch" $(CPPFLAGS) $(CXXFLAGS) - XRCLIB_OBJECTS = \ -@@ -1483,8 +1392,8 @@ AUIDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_457)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_AUI $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_auidll.pch" \ - $(CPPFLAGS) $(CXXFLAGS) -@@ -1511,8 +1420,8 @@ AUILIB_CXXFLAGS = /M$(__RUNTIME_LIBS_472)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_auilib.pch" $(CPPFLAGS) $(CXXFLAGS) - AUILIB_OBJECTS = \ -@@ -1536,8 +1445,8 @@ RIBBONDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_488)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_RIBBON $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_ribbondll.pch" \ - $(CPPFLAGS) $(CXXFLAGS) -@@ -1564,8 +1473,8 @@ RIBBONLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_503)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_ribbonlib.pch" $(CPPFLAGS) $(CXXFLAGS) - RIBBONLIB_OBJECTS = \ -@@ -1589,8 +1498,8 @@ PROPGRIDDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_519)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_PROPGRID $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_propgriddll.pch" \ - $(CPPFLAGS) $(CXXFLAGS) -@@ -1614,8 +1523,8 @@ PROPGRIDLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_534)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_propgridlib.pch" $(CPPFLAGS) $(CXXFLAGS) - PROPGRIDLIB_OBJECTS = \ -@@ -1636,8 +1545,8 @@ RICHTEXTDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_550)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_RICHTEXT $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_richtextdll.pch" \ - $(CPPFLAGS) $(CXXFLAGS) -@@ -1664,8 +1573,8 @@ RICHTEXTLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_565)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_richtextlib.pch" $(CPPFLAGS) $(CXXFLAGS) - RICHTEXTLIB_OBJECTS = \ -@@ -1689,8 +1598,8 @@ STCDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_581)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /I..\..\src\stc\scintilla\include \ - /I..\..\src\stc\scintilla\lexlib /I..\..\src\stc\scintilla\src /D__WX__ \ - /DSCI_LEXER /DLINK_LEXERS /DWXUSINGDLL /DWXMAKINGDLL_STC $(__RTTIFLAG) \ -@@ -1711,8 +1620,8 @@ STCLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_596)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /I..\..\src\stc\scintilla\include \ - /I..\..\src\stc\scintilla\lexlib /I..\..\src\stc\scintilla\src /D__WX__ \ - /DSCI_LEXER /DLINK_LEXERS $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ -@@ -1730,8 +1639,8 @@ GLDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_612)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib /DWXUSINGDLL /DWXMAKINGDLL_GL $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" /Fp"$(OBJS)\wxprec_gldll.pch" \ - $(CPPFLAGS) $(CXXFLAGS) -@@ -1749,8 +1658,8 @@ GLLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_627)$(__DEBUGRUNTIME) /DWIN32 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ - $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ - $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) /I$(SETUPHDIR) /I..\..\include \ -- $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING /I..\..\src\tiff\libtiff \ -- /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib /I..\..\src\regex \ -+ $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /DWXBUILDING \ -+ /I..\..\src\jpeg /I$(VCPKG_INCLUDE_DIR) /I..\..\src\regex \ - /I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) /Yu"wx/wxprec.h" \ - /Fp"$(OBJS)\wxprec_gllib.pch" $(CPPFLAGS) $(CXXFLAGS) - GLLIB_OBJECTS = \ -@@ -1851,9 +1760,6 @@ __RUNTIME_LIBS_25 = D - !if "$(RUNTIME_LIBS)" == "static" - __RUNTIME_LIBS_25 = $(__THREADSFLAG) - !endif --!if "$(USE_GUI)" == "1" --__wxpng___depname = $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib --!endif - !if "$(RUNTIME_LIBS)" == "dynamic" - __RUNTIME_LIBS_40 = D - !endif -@@ -1869,9 +1775,6 @@ __RUNTIME_LIBS_55 = D - !if "$(RUNTIME_LIBS)" == "static" - __RUNTIME_LIBS_55 = $(__THREADSFLAG) - !endif --!if "$(USE_GUI)" == "1" --__wxtiff___depname = $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib --!endif - !if "$(RUNTIME_LIBS)" == "dynamic" - __RUNTIME_LIBS_70 = D - !endif -@@ -5627,13 +5530,13 @@ __UNICODE_DEFINE_p_67 = /d _UNICODE - ____CAIRO_INCLUDEDIR_FILENAMES_4 = /i $(CAIRO_ROOT)\include\cairo - !endif - !if "$(USE_GUI)" == "1" --__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib -+__LIB_TIFF_p = tiff$(WXDEBUGFLAG).lib - !endif - !if "$(USE_GUI)" == "1" - __LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib - !endif - !if "$(USE_GUI)" == "1" --__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib -+__LIB_PNG_p = libpng16$(WXDEBUGFLAG).lib - !endif - !if "$(USE_CAIRO)" == "1" - __CAIRO_LIB_p = cairo.lib -@@ -5751,17 +5654,14 @@ $(OBJS): - - ### Targets: ### - --all: setup_h $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(__wxpng___depname) $(__wxjpeg___depname) $(__wxtiff___depname) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(__wxscintilla) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__webviewdll___depname) $(__webviewlib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__auidll___depname) $(__auilib___depname) $(__ribbondll___depname) $(__ribbonlib___depname) $(__propgriddll___depname) $(__propgridlib___depname) $(__richtextdll___depname) $(__richtextlib___depname) $(__stcdll___depname) $(__stclib___depname) $(__gldll___depname) $(__gllib___depname) build_cfg_file -+all: setup_h $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(__wxjpeg___depname) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(__wxscintilla) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__webviewdll___depname) $(__webviewlib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__auidll___depname) $(__auilib___depname) $(__ribbondll___depname) $(__ribbonlib___depname) $(__propgriddll___depname) $(__propgridlib___depname) $(__richtextdll___depname) $(__richtextlib___depname) $(__stcdll___depname) $(__stclib___depname) $(__gldll___depname) $(__gllib___depname) build_cfg_file - - clean: - -if exist $(OBJS)\*.obj del $(OBJS)\*.obj - -if exist $(OBJS)\*.res del $(OBJS)\*.res - -if exist $(OBJS)\*.pch del $(OBJS)\*.pch - -if exist $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib -- -if exist $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib -- -if exist $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib - -if exist $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib -- -if exist $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxtiff$(WXDEBUGFLAG).lib - -if exist $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib - -if exist $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib del $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib - -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll -@@ -5861,20 +5761,6 @@ $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib: $(WXREGEX_OBJECTS) - $(WXREGEX_OBJECTS) - << - --$(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib: $(WXZLIB_OBJECTS) -- if exist $@ del $@ -- link /LIB /NOLOGO /OUT:$@ @<< -- $(WXZLIB_OBJECTS) --<< -- --!if "$(USE_GUI)" == "1" --$(LIBDIRNAME)\wxpng$(WXDEBUGFLAG).lib: $(WXPNG_OBJECTS) -- if exist $@ del $@ -- link /LIB /NOLOGO /OUT:$@ @<< -- $(WXPNG_OBJECTS) --<< --!endif -- - !if "$(USE_GUI)" == "1" - $(LIBDIRNAME)\wxjpeg$(WXDEBUGFLAG).lib: $(WXJPEG_OBJECTS) - if exist $@ del $@ -@@ -5906,9 +5792,9 @@ $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib: $(WXSCINTILLA_OBJECTS) - !endif - - !if "$(MONOLITHIC)" == "1" && "$(SHARED)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\monodll_dummy.obj $(MONODLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\monodll_version.res $(__wxscintilla_library_link_DEP) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_108) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(MONODLL_OBJECTS) $(MONODLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(__wxscintilla) /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\monodll_dummy.obj $(MONODLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\monodll_version.res $(__wxscintilla_library_link_DEP) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_108) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(MONODLL_OBJECTS) $(MONODLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(__wxscintilla) /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib - << - !endif - -@@ -5921,9 +5807,9 @@ $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXD - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" --$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\basedll_dummy.obj $(BASEDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\basedll_version.res -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_139) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(BASEDLL_OBJECTS) $(BASEDLL_RESOURCES) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib -+$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\basedll_dummy.obj $(BASEDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\basedll_version.res -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_139) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(BASEDLL_OBJECTS) $(BASEDLL_RESOURCES) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib - << - !endif - -@@ -5940,9 +5826,9 @@ wxbase: $(____wxbase_namedll_DEP) $(____wxbase_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" --$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\netdll_dummy.obj $(NETDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\netdll_version.res $(__basedll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_170) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(NETDLL_OBJECTS) $(NETDLL_RESOURCES) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib -+$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\netdll_dummy.obj $(NETDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\netdll_version.res $(__basedll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_170) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(NETDLL_OBJECTS) $(NETDLL_RESOURCES) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib - << - !endif - -@@ -5959,9 +5845,9 @@ wxnet: $(____wxnet_namedll_DEP) $(____wxnet_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\coredll_dummy.obj $(COREDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\coredll_version.res $(__basedll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_201) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(COREDLL_OBJECTS) $(COREDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\coredll_dummy.obj $(COREDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\coredll_version.res $(__basedll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_201) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(COREDLL_OBJECTS) $(COREDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib - << - !endif - -@@ -5978,9 +5864,9 @@ wxcore: $(____wxcore_namedll_DEP) $(____wxcore_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\advdll_dummy.obj $(ADVDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\advdll_version.res $(__coredll___depname) $(__basedll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_232) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(ADVDLL_OBJECTS) $(ADVDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\advdll_dummy.obj $(ADVDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\advdll_version.res $(__coredll___depname) $(__basedll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_232) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(ADVDLL_OBJECTS) $(ADVDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib - << - !endif - -@@ -5997,9 +5883,9 @@ wxadv: $(____wxadv_namedll_DEP) $(____wxadv_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_MEDIA)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\mediadll_dummy.obj $(MEDIADLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\mediadll_version.res $(__coredll___depname) $(__basedll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_263) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(MEDIADLL_OBJECTS) $(MEDIADLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\mediadll_dummy.obj $(MEDIADLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\mediadll_version.res $(__coredll___depname) $(__basedll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_263) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(MEDIADLL_OBJECTS) $(MEDIADLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media.lib - << - !endif - -@@ -6016,9 +5902,9 @@ wxmedia: $(____wxmedia_namedll_DEP) $(____wxmedia_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_HTML)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\htmldll_dummy.obj $(HTMLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\htmldll_version.res $(__coredll___depname) $(__basedll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_294) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(HTMLDLL_OBJECTS) $(HTMLDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\htmldll_dummy.obj $(HTMLDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\htmldll_version.res $(__coredll___depname) $(__basedll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_294) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(HTMLDLL_OBJECTS) $(HTMLDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib - << - !endif - -@@ -6035,9 +5921,9 @@ wxhtml: $(____wxhtml_namedll_DEP) $(____wxhtml_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_WEBVIEW)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\webviewdll_dummy.obj $(WEBVIEWDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\webviewdll_version.res $(__coredll___depname) $(__basedll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_325) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(WEBVIEWDLL_OBJECTS) $(WEBVIEWDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\webviewdll_dummy.obj $(WEBVIEWDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\webviewdll_version.res $(__coredll___depname) $(__basedll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_325) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(WEBVIEWDLL_OBJECTS) $(WEBVIEWDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib - << - !endif - -@@ -6054,9 +5940,9 @@ wxwebview: $(____wxwebview_namedll_DEP) $(____wxwebview_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_QA)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\qadll_dummy.obj $(QADLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\qadll_version.res $(__coredll___depname) $(__basedll___depname) $(__xmldll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_356) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(QADLL_OBJECTS) $(QADLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\qadll_dummy.obj $(QADLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\qadll_version.res $(__coredll___depname) $(__basedll___depname) $(__xmldll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_356) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(QADLL_OBJECTS) $(QADLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa.lib - << - !endif - -@@ -6073,9 +5959,9 @@ wxqa: $(____wxqa_namedll_DEP) $(____wxqa_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" --$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\xmldll_dummy.obj $(XMLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xmldll_version.res $(__basedll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_387) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(XMLDLL_OBJECTS) $(XMLDLL_RESOURCES) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib -+$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\xmldll_dummy.obj $(XMLDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xmldll_version.res $(__basedll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_387) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(XMLDLL_OBJECTS) $(XMLDLL_RESOURCES) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib - << - !endif - -@@ -6092,9 +5978,9 @@ wxxml: $(____wxxml_namedll_DEP) $(____wxxml_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_XRC)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\xrcdll_dummy.obj $(XRCDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xrcdll_version.res $(__htmldll_library_link_DEP) $(__advdll___depname) $(__coredll___depname) $(__xmldll___depname) $(__basedll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_418) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(XRCDLL_OBJECTS) $(XRCDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\xrcdll_dummy.obj $(XRCDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\xrcdll_version.res $(__htmldll_library_link_DEP) $(__advdll___depname) $(__coredll___depname) $(__xmldll___depname) $(__basedll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_418) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(XRCDLL_OBJECTS) $(XRCDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc.lib - << - !endif - -@@ -6111,9 +5997,9 @@ wxxrc: $(____wxxrc_namedll_DEP) $(____wxxrc_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_AUI)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\auidll_dummy.obj $(AUIDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\auidll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_449) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(AUIDLL_OBJECTS) $(AUIDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\auidll_dummy.obj $(AUIDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\auidll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_449) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(AUIDLL_OBJECTS) $(AUIDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui.lib - << - !endif - -@@ -6130,9 +6016,9 @@ wxaui: $(____wxaui_namedll_DEP) $(____wxaui_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_RIBBON)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\ribbondll_dummy.obj $(RIBBONDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\ribbondll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_480) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(RIBBONDLL_OBJECTS) $(RIBBONDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\ribbondll_dummy.obj $(RIBBONDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\ribbondll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_480) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(RIBBONDLL_OBJECTS) $(RIBBONDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon.lib - << - !endif - -@@ -6149,9 +6035,9 @@ wxribbon: $(____wxribbon_namedll_DEP) $(____wxribbon_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_PROPGRID)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\propgriddll_dummy.obj $(PROPGRIDDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\propgriddll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_511) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(PROPGRIDDLL_OBJECTS) $(PROPGRIDDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\propgriddll_dummy.obj $(PROPGRIDDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\propgriddll_version.res $(__advdll___depname) $(__coredll___depname) $(__basedll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_511) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(PROPGRIDDLL_OBJECTS) $(PROPGRIDDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid.lib - << - !endif - -@@ -6168,9 +6054,9 @@ wxpropgrid: $(____wxpropgrid_namedll_DEP) $(____wxpropgrid_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_RICHTEXT)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\richtextdll_dummy.obj $(RICHTEXTDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\richtextdll_version.res $(__advdll___depname) $(__htmldll_library_link_DEP) $(__xmldll___depname) $(__coredll___depname) $(__basedll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_542) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(RICHTEXTDLL_OBJECTS) $(RICHTEXTDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\richtextdll_dummy.obj $(RICHTEXTDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\richtextdll_version.res $(__advdll___depname) $(__htmldll_library_link_DEP) $(__xmldll___depname) $(__coredll___depname) $(__basedll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_542) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(RICHTEXTDLL_OBJECTS) $(RICHTEXTDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib $(__htmldll_library_link_LIBR) $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext.lib - << - !endif - -@@ -6187,9 +6073,9 @@ wxrichtext: $(____wxrichtext_namedll_DEP) $(____wxrichtext_namelib_DEP) - !endif - - !if "$(MONOLITHIC)" == "0" && "$(SHARED)" == "1" && "$(USE_STC)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\stcdll_dummy.obj $(STCDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(__wxscintilla) $(OBJS)\stcdll_version.res $(__coredll___depname) $(__basedll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_573) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(STCDLL_OBJECTS) $(STCDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\stcdll_dummy.obj $(STCDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(__wxscintilla) $(OBJS)\stcdll_version.res $(__coredll___depname) $(__basedll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_573) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(STCDLL_OBJECTS) $(STCDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(LIBDIRNAME)\wxscintilla$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib $(LIBDIRNAME)\wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib - << - !endif - -@@ -6206,9 +6092,9 @@ wxstc: $(____wxstc_namedll_DEP) $(____wxstc_namelib_DEP) - !endif - - !if "$(SHARED)" == "1" && "$(USE_GUI)" == "1" && "$(USE_OPENGL)" == "1" --$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\gldll_dummy.obj $(GLDLL_OBJECTS) $(__wxtiff___depname) $(__wxjpeg___depname) $(__wxpng___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxzlib$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\gldll_version.res $(__basedll___depname) $(__coredll___depname) $(__monodll___depname) -- link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_604) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -- $(GLDLL_OBJECTS) $(GLDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(__WXLIBGLDEP_CORE_p) $(__WXLIBGLDEP_BASE_p) $(__WXLIB_MONO_p) opengl32.lib glu32.lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib -+$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).dll: $(OBJS)\gldll_dummy.obj $(GLDLL_OBJECTS) $(__wxjpeg___depname) $(__wxscintilla) $(LIBDIRNAME)\wxexpat$(WXDEBUGFLAG).lib $(LIBDIRNAME)\wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib $(OBJS)\gldll_version.res $(__basedll___depname) $(__coredll___depname) $(__monodll___depname) -+ link /DLL /NOLOGO /OUT:$@ $(__DEBUGINFO_6) /pdb:"$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG).pdb" $(__DEBUGINFO_604) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /LIBPATH:$(VCPKG_LIB_DIR) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< -+ $(GLDLL_OBJECTS) $(GLDLL_RESOURCES) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) zlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib $(__WXLIBGLDEP_CORE_p) $(__WXLIBGLDEP_BASE_p) $(__WXLIB_MONO_p) opengl32.lib glu32.lib /IMPLIB:$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib - << - !endif - -@@ -6303,96 +6189,6 @@ $(OBJS)\wxregex_regerror.obj: ..\..\src\regex\regerror.c - $(OBJS)\wxregex_regfree.obj: ..\..\src\regex\regfree.c - $(CC) /c /nologo /TC /Fo$@ $(WXREGEX_CFLAGS) ..\..\src\regex\regfree.c - --$(OBJS)\wxzlib_adler32.obj: ..\..\src\zlib\adler32.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\adler32.c -- --$(OBJS)\wxzlib_compress.obj: ..\..\src\zlib\compress.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\compress.c -- --$(OBJS)\wxzlib_crc32.obj: ..\..\src\zlib\crc32.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\crc32.c -- --$(OBJS)\wxzlib_deflate.obj: ..\..\src\zlib\deflate.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\deflate.c -- --$(OBJS)\wxzlib_gzclose.obj: ..\..\src\zlib\gzclose.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzclose.c -- --$(OBJS)\wxzlib_gzlib.obj: ..\..\src\zlib\gzlib.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzlib.c -- --$(OBJS)\wxzlib_gzread.obj: ..\..\src\zlib\gzread.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzread.c -- --$(OBJS)\wxzlib_gzwrite.obj: ..\..\src\zlib\gzwrite.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\gzwrite.c -- --$(OBJS)\wxzlib_infback.obj: ..\..\src\zlib\infback.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\infback.c -- --$(OBJS)\wxzlib_inffast.obj: ..\..\src\zlib\inffast.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\inffast.c -- --$(OBJS)\wxzlib_inflate.obj: ..\..\src\zlib\inflate.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\inflate.c -- --$(OBJS)\wxzlib_inftrees.obj: ..\..\src\zlib\inftrees.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\inftrees.c -- --$(OBJS)\wxzlib_trees.obj: ..\..\src\zlib\trees.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\trees.c -- --$(OBJS)\wxzlib_uncompr.obj: ..\..\src\zlib\uncompr.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\uncompr.c -- --$(OBJS)\wxzlib_zutil.obj: ..\..\src\zlib\zutil.c -- $(CC) /c /nologo /TC /Fo$@ $(WXZLIB_CFLAGS) ..\..\src\zlib\zutil.c -- --$(OBJS)\wxpng_png.obj: ..\..\src\png\png.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\png.c -- --$(OBJS)\wxpng_pngerror.obj: ..\..\src\png\pngerror.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngerror.c -- --$(OBJS)\wxpng_pngget.obj: ..\..\src\png\pngget.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngget.c -- --$(OBJS)\wxpng_pngmem.obj: ..\..\src\png\pngmem.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngmem.c -- --$(OBJS)\wxpng_pngpread.obj: ..\..\src\png\pngpread.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngpread.c -- --$(OBJS)\wxpng_pngread.obj: ..\..\src\png\pngread.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngread.c -- --$(OBJS)\wxpng_pngrio.obj: ..\..\src\png\pngrio.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngrio.c -- --$(OBJS)\wxpng_pngrtran.obj: ..\..\src\png\pngrtran.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngrtran.c -- --$(OBJS)\wxpng_pngrutil.obj: ..\..\src\png\pngrutil.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngrutil.c -- --$(OBJS)\wxpng_pngset.obj: ..\..\src\png\pngset.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngset.c -- --$(OBJS)\wxpng_pngtrans.obj: ..\..\src\png\pngtrans.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngtrans.c -- --$(OBJS)\wxpng_pngwio.obj: ..\..\src\png\pngwio.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwio.c -- --$(OBJS)\wxpng_pngwrite.obj: ..\..\src\png\pngwrite.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwrite.c -- --$(OBJS)\wxpng_pngwtran.obj: ..\..\src\png\pngwtran.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwtran.c -- --$(OBJS)\wxpng_pngwutil.obj: ..\..\src\png\pngwutil.c -- $(CC) /c /nologo /TC /Fo$@ $(WXPNG_CFLAGS) ..\..\src\png\pngwutil.c -- - $(OBJS)\wxjpeg_jcomapi.obj: ..\..\src\jpeg\jcomapi.c - $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jcomapi.c - -@@ -6531,123 +6327,6 @@ $(OBJS)\wxjpeg_jquant2.obj: ..\..\src\jpeg\jquant2.c - $(OBJS)\wxjpeg_jdmerge.obj: ..\..\src\jpeg\jdmerge.c - $(CC) /c /nologo /TC /Fo$@ $(WXJPEG_CFLAGS) ..\..\src\jpeg\jdmerge.c - --$(OBJS)\wxtiff_tif_win32.obj: ..\..\src\tiff\libtiff\tif_win32.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_win32.c -- --$(OBJS)\wxtiff_tif_aux.obj: ..\..\src\tiff\libtiff\tif_aux.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_aux.c -- --$(OBJS)\wxtiff_tif_close.obj: ..\..\src\tiff\libtiff\tif_close.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_close.c -- --$(OBJS)\wxtiff_tif_codec.obj: ..\..\src\tiff\libtiff\tif_codec.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_codec.c -- --$(OBJS)\wxtiff_tif_color.obj: ..\..\src\tiff\libtiff\tif_color.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_color.c -- --$(OBJS)\wxtiff_tif_compress.obj: ..\..\src\tiff\libtiff\tif_compress.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_compress.c -- --$(OBJS)\wxtiff_tif_dir.obj: ..\..\src\tiff\libtiff\tif_dir.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dir.c -- --$(OBJS)\wxtiff_tif_dirinfo.obj: ..\..\src\tiff\libtiff\tif_dirinfo.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dirinfo.c -- --$(OBJS)\wxtiff_tif_dirread.obj: ..\..\src\tiff\libtiff\tif_dirread.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dirread.c -- --$(OBJS)\wxtiff_tif_dirwrite.obj: ..\..\src\tiff\libtiff\tif_dirwrite.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dirwrite.c -- --$(OBJS)\wxtiff_tif_dumpmode.obj: ..\..\src\tiff\libtiff\tif_dumpmode.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_dumpmode.c -- --$(OBJS)\wxtiff_tif_error.obj: ..\..\src\tiff\libtiff\tif_error.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_error.c -- --$(OBJS)\wxtiff_tif_extension.obj: ..\..\src\tiff\libtiff\tif_extension.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_extension.c -- --$(OBJS)\wxtiff_tif_fax3.obj: ..\..\src\tiff\libtiff\tif_fax3.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_fax3.c -- --$(OBJS)\wxtiff_tif_fax3sm.obj: ..\..\src\tiff\libtiff\tif_fax3sm.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_fax3sm.c -- --$(OBJS)\wxtiff_tif_flush.obj: ..\..\src\tiff\libtiff\tif_flush.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_flush.c -- --$(OBJS)\wxtiff_tif_getimage.obj: ..\..\src\tiff\libtiff\tif_getimage.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_getimage.c -- --$(OBJS)\wxtiff_tif_jbig.obj: ..\..\src\tiff\libtiff\tif_jbig.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_jbig.c -- --$(OBJS)\wxtiff_tif_jpeg.obj: ..\..\src\tiff\libtiff\tif_jpeg.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_jpeg.c -- --$(OBJS)\wxtiff_tif_jpeg_12.obj: ..\..\src\tiff\libtiff\tif_jpeg_12.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_jpeg_12.c -- --$(OBJS)\wxtiff_tif_luv.obj: ..\..\src\tiff\libtiff\tif_luv.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_luv.c -- --$(OBJS)\wxtiff_tif_lzma.obj: ..\..\src\tiff\libtiff\tif_lzma.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_lzma.c -- --$(OBJS)\wxtiff_tif_lzw.obj: ..\..\src\tiff\libtiff\tif_lzw.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_lzw.c -- --$(OBJS)\wxtiff_tif_next.obj: ..\..\src\tiff\libtiff\tif_next.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_next.c -- --$(OBJS)\wxtiff_tif_ojpeg.obj: ..\..\src\tiff\libtiff\tif_ojpeg.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_ojpeg.c -- --$(OBJS)\wxtiff_tif_open.obj: ..\..\src\tiff\libtiff\tif_open.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_open.c -- --$(OBJS)\wxtiff_tif_packbits.obj: ..\..\src\tiff\libtiff\tif_packbits.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_packbits.c -- --$(OBJS)\wxtiff_tif_pixarlog.obj: ..\..\src\tiff\libtiff\tif_pixarlog.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_pixarlog.c -- --$(OBJS)\wxtiff_tif_predict.obj: ..\..\src\tiff\libtiff\tif_predict.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_predict.c -- --$(OBJS)\wxtiff_tif_print.obj: ..\..\src\tiff\libtiff\tif_print.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_print.c -- --$(OBJS)\wxtiff_tif_read.obj: ..\..\src\tiff\libtiff\tif_read.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_read.c -- --$(OBJS)\wxtiff_tif_strip.obj: ..\..\src\tiff\libtiff\tif_strip.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_strip.c -- --$(OBJS)\wxtiff_tif_swab.obj: ..\..\src\tiff\libtiff\tif_swab.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_swab.c -- --$(OBJS)\wxtiff_tif_thunder.obj: ..\..\src\tiff\libtiff\tif_thunder.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_thunder.c -- --$(OBJS)\wxtiff_tif_tile.obj: ..\..\src\tiff\libtiff\tif_tile.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_tile.c -- --$(OBJS)\wxtiff_tif_version.obj: ..\..\src\tiff\libtiff\tif_version.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_version.c -- --$(OBJS)\wxtiff_tif_warning.obj: ..\..\src\tiff\libtiff\tif_warning.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_warning.c -- --$(OBJS)\wxtiff_tif_write.obj: ..\..\src\tiff\libtiff\tif_write.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_write.c -- --$(OBJS)\wxtiff_tif_zip.obj: ..\..\src\tiff\libtiff\tif_zip.c -- $(CC) /c /nologo /TC /Fo$@ $(WXTIFF_CFLAGS) ..\..\src\tiff\libtiff\tif_zip.c -- - $(OBJS)\wxexpat_xmlparse.obj: ..\..\src\expat\lib\xmlparse.c - $(CC) /c /nologo /TC /Fo$@ $(WXEXPAT_CFLAGS) ..\..\src\expat\lib\xmlparse.c - -@@ -9595,7 +9274,7 @@ $(OBJS)\monodll_animateg.obj: ..\..\src\generic\animateg.cpp - !endif - - $(OBJS)\monodll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /i ..\..\src\stc\scintilla\include /i ..\..\src\stc\scintilla\lexlib /i ..\..\src\stc\scintilla\src /d __WX__ /d SCI_LEXER /d LINK_LEXERS /d wxUSE_BASE=1 /d WXMAKINGDLL ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /i ..\..\src\stc\scintilla\include /i ..\..\src\stc\scintilla\lexlib /i ..\..\src\stc\scintilla\src /d __WX__ /d SCI_LEXER /d LINK_LEXERS /d wxUSE_BASE=1 /d WXMAKINGDLL ..\..\src\msw\version.rc - - $(OBJS)\monolib_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp -@@ -12133,7 +11812,7 @@ $(OBJS)\basedll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\basedll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXMAKINGDLL_BASE /d wxUSE_BASE=1 ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXMAKINGDLL_BASE /d wxUSE_BASE=1 ..\..\src\msw\version.rc - - $(OBJS)\basedll_any.obj: ..\..\src\common\any.cpp - $(CXX) /c /nologo /TP /Fo$@ $(BASEDLL_CXXFLAGS) ..\..\src\common\any.cpp -@@ -12814,7 +12493,7 @@ $(OBJS)\netdll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\netdll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXUSINGDLL /d WXMAKINGDLL_NET ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXUSINGDLL /d WXMAKINGDLL_NET ..\..\src\msw\version.rc - - $(OBJS)\netdll_fs_inet.obj: ..\..\src\common\fs_inet.cpp - $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) ..\..\src\common\fs_inet.cpp -@@ -12895,7 +12574,7 @@ $(OBJS)\coredll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\coredll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_CORE /d wxUSE_BASE=0 ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_CORE /d wxUSE_BASE=0 ..\..\src\msw\version.rc - - $(OBJS)\coredll_event.obj: ..\..\src\common\event.cpp - $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\event.cpp -@@ -15852,7 +15531,7 @@ $(OBJS)\advdll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\advdll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_ADV ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_ADV ..\..\src\msw\version.rc - - $(OBJS)\advdll_bmpcbox.obj: ..\..\src\msw\bmpcbox.cpp - $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\bmpcbox.cpp -@@ -16179,7 +15858,7 @@ $(OBJS)\mediadll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MEDIADLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\mediadll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_MEDIA ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_MEDIA ..\..\src\msw\version.rc - - $(OBJS)\mediadll_mediactrlcmn.obj: ..\..\src\common\mediactrlcmn.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MEDIADLL_CXXFLAGS) ..\..\src\common\mediactrlcmn.cpp -@@ -16212,7 +15891,7 @@ $(OBJS)\htmldll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\htmldll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_HTML ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_HTML ..\..\src\msw\version.rc - - $(OBJS)\htmldll_helpbest.obj: ..\..\src\msw\helpbest.cpp - $(CXX) /c /nologo /TP /Fo$@ $(HTMLDLL_CXXFLAGS) ..\..\src\msw\helpbest.cpp -@@ -16383,7 +16062,7 @@ $(OBJS)\webviewdll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\webviewdll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_WEBVIEW ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_WEBVIEW ..\..\src\msw\version.rc - - $(OBJS)\webviewdll_webview_ie.obj: ..\..\src\msw\webview_ie.cpp - $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\msw\webview_ie.cpp -@@ -16416,7 +16095,7 @@ $(OBJS)\qadll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(QADLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\qadll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_QA ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_QA ..\..\src\msw\version.rc - - $(OBJS)\qadll_debugrpt.obj: ..\..\src\common\debugrpt.cpp - $(CXX) /c /nologo /TP /Fo$@ $(QADLL_CXXFLAGS) ..\..\src\common\debugrpt.cpp -@@ -16437,7 +16116,7 @@ $(OBJS)\xmldll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(XMLDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\xmldll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXUSINGDLL /d WXMAKINGDLL_XML ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wxbase$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d wxUSE_GUI=0 /d WXUSINGDLL /d WXMAKINGDLL_XML ..\..\src\msw\version.rc - - $(OBJS)\xmldll_xml.obj: ..\..\src\xml\xml.cpp - $(CXX) /c /nologo /TP /Fo$@ $(XMLDLL_CXXFLAGS) ..\..\src\xml\xml.cpp -@@ -16458,7 +16137,7 @@ $(OBJS)\xrcdll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\xrcdll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_XRC ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_XRC ..\..\src\msw\version.rc - - $(OBJS)\xrcdll_xh_activityindicator.obj: ..\..\src\xrc\xh_activityindicator.cpp - $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_activityindicator.cpp -@@ -16869,7 +16548,7 @@ $(OBJS)\auidll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\auidll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_AUI ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_AUI ..\..\src\msw\version.rc - - $(OBJS)\auidll_framemanager.obj: ..\..\src\aui\framemanager.cpp - $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\framemanager.cpp -@@ -16944,7 +16623,7 @@ $(OBJS)\ribbondll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\ribbondll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_RIBBON ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_RIBBON ..\..\src\msw\version.rc - - $(OBJS)\ribbondll_art_internal.obj: ..\..\src\ribbon\art_internal.cpp - $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) ..\..\src\ribbon\art_internal.cpp -@@ -17019,7 +16698,7 @@ $(OBJS)\propgriddll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\propgriddll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_PROPGRID ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_PROPGRID ..\..\src\msw\version.rc - - $(OBJS)\propgriddll_advprops.obj: ..\..\src\propgrid\advprops.cpp - $(CXX) /c /nologo /TP /Fo$@ $(PROPGRIDDLL_CXXFLAGS) ..\..\src\propgrid\advprops.cpp -@@ -17076,7 +16755,7 @@ $(OBJS)\richtextdll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\richtextdll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_RICHTEXT ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_RICHTEXT ..\..\src\msw\version.rc - - $(OBJS)\richtextdll_richtextbuffer.obj: ..\..\src\richtext\richtextbuffer.cpp - $(CXX) /c /nologo /TP /Fo$@ $(RICHTEXTDLL_CXXFLAGS) ..\..\src\richtext\richtextbuffer.cpp -@@ -17151,7 +16830,7 @@ $(OBJS)\stcdll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(STCDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\stcdll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /i ..\..\src\stc\scintilla\include /i ..\..\src\stc\scintilla\lexlib /i ..\..\src\stc\scintilla\src /d __WX__ /d SCI_LEXER /d LINK_LEXERS /d WXUSINGDLL /d WXMAKINGDLL_STC ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /i ..\..\src\stc\scintilla\include /i ..\..\src\stc\scintilla\lexlib /i ..\..\src\stc\scintilla\src /d __WX__ /d SCI_LEXER /d LINK_LEXERS /d WXUSINGDLL /d WXMAKINGDLL_STC ..\..\src\msw\version.rc - - $(OBJS)\stcdll_stc.obj: ..\..\src\stc\stc.cpp - $(CXX) /c /nologo /TP /Fo$@ $(STCDLL_CXXFLAGS) ..\..\src\stc\stc.cpp -@@ -17178,7 +16857,7 @@ $(OBJS)\gldll_dummy.obj: ..\..\src\common\dummy.cpp - $(CXX) /c /nologo /TP /Fo$@ $(GLDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp - - $(OBJS)\gldll_version.res: ..\..\src\msw\version.rc -- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_GL ..\..\src\msw\version.rc -+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_6) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_72) /d __WXMSW__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__NDEBUG_DEFINE_p_65) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) $(__UNICODE_DEFINE_p_67) /i $(SETUPHDIR) /i ..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_4) /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG) /i ..\..\src\jpeg /i $(VCPKG_INCLUDE_DIR) /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_GL ..\..\src\msw\version.rc - - $(OBJS)\gldll_glcmn.obj: ..\..\src\common\glcmn.cpp - $(CXX) /c /nologo /TP /Fo$@ $(GLDLL_CXXFLAGS) ..\..\src\common\glcmn.cpp -- cgit v1.2.3 From 6d3fb52c7058d21a1bd9e0e070965f74edc553a7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 24 Feb 2018 01:43:37 -0800 Subject: [chakracore] Use out of source builds --- ports/chakracore/CONTROL | 2 +- ports/chakracore/portfile.cmake | 33 +++++++++++++++++++-------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/ports/chakracore/CONTROL b/ports/chakracore/CONTROL index b86fa8963..b894f1d7f 100644 --- a/ports/chakracore/CONTROL +++ b/ports/chakracore/CONTROL @@ -1,3 +1,3 @@ Source: chakracore -Version: 1.7.4 +Version: 1.7.4-1 Description: Core part of the Chakra Javascript engine diff --git a/ports/chakracore/portfile.cmake b/ports/chakracore/portfile.cmake index 7bb628744..e87b0cb86 100644 --- a/ports/chakracore/portfile.cmake +++ b/ports/chakracore/portfile.cmake @@ -21,41 +21,46 @@ if(COR_H_PATH MATCHES "NOTFOUND") endif() get_filename_component(NETFXSDK_PATH "${COR_H_PATH}/../.." ABSOLUTE) +set(BUILDTREE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +file(REMOVE_RECURSE ${BUILDTREE_PATH}) +file(COPY ${SOURCE_PATH}/ DESTINATION ${BUILDTREE_PATH}) + vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/Build/Chakra.Core.sln + PROJECT_PATH ${BUILDTREE_PATH}/Build/Chakra.Core.sln OPTIONS "/p:DotNetSdkRoot=${NETFXSDK_PATH}/" "/p:CustomBeforeMicrosoftCommonTargets=${CMAKE_CURRENT_LIST_DIR}/no-warning-as-error.props" ) file(INSTALL - ${SOURCE_PATH}/lib/jsrt/ChakraCore.h - ${SOURCE_PATH}/lib/jsrt/ChakraCommon.h - ${SOURCE_PATH}/lib/jsrt/ChakraCommonWindows.h - ${SOURCE_PATH}/lib/jsrt/ChakraDebug.h + ${BUILDTREE_PATH}/lib/jsrt/ChakraCore.h + ${BUILDTREE_PATH}/lib/jsrt/ChakraCommon.h + ${BUILDTREE_PATH}/lib/jsrt/ChakraCommonWindows.h + ${BUILDTREE_PATH}/lib/jsrt/ChakraDebug.h DESTINATION ${CURRENT_PACKAGES_DIR}/include ) file(INSTALL - ${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.dll - ${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.pdb + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.dll + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin ) file(INSTALL - ${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/Chakracore.lib + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/Chakracore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) file(INSTALL - ${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.dll - ${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.pdb + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.dll + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/bin ) file(INSTALL - ${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/Chakracore.lib + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/Chakracore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib ) file(INSTALL - ${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ch.exe - ${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/GCStress.exe - ${SOURCE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/rl.exe + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ch.exe + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/GCStress.exe + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/rl.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/chakracore) + vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/LICENSE.txt -- cgit v1.2.3 From ca7f50e59800842bed8d1baadc63f60383beaff9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 24 Feb 2018 02:26:31 -0800 Subject: [rttr] Use from github, slight patch simplification. --- ports/rttr/fix-directory-output.patch | 26 -------------------------- ports/rttr/portfile.cmake | 25 ++++++++++++++----------- 2 files changed, 14 insertions(+), 37 deletions(-) diff --git a/ports/rttr/fix-directory-output.patch b/ports/rttr/fix-directory-output.patch index 020e16831..b83fc455c 100644 --- a/ports/rttr/fix-directory-output.patch +++ b/ports/rttr/fix-directory-output.patch @@ -1,16 +1,3 @@ -diff --git a/CMake/config.cmake b/CMake/config.cmake -index 1d753b3..02fe814 100644 ---- a/CMake/config.cmake -+++ b/CMake/config.cmake -@@ -124,7 +124,7 @@ install( - FILES - "${CMAKE_CURRENT_BINARY_DIR}/CMake/rttr-config-version.cmake" - DESTINATION -- cmake -+ share/rttr - COMPONENT - Devel - ) diff --git a/CMakeLists.txt b/CMakeLists.txt index d64ee41..e33e7bf 100644 --- a/CMakeLists.txt @@ -21,16 +8,3 @@ index d64ee41..e33e7bf 100644 # here we specify the installation directory -set(CMAKE_INSTALL_PREFIX ${RTTR_INSTALL_DIR} CACHE PATH "RTTR install prefix" FORCE) +set(CMAKE_INSTALL_PREFIX ${RTTR_INSTALL_DIR} CACHE PATH "RTTR install prefix") -diff --git a/src/rttr/CMakeLists.txt b/src/rttr/CMakeLists.txt -index 3dffa2c..405b377 100644 ---- a/src/rttr/CMakeLists.txt -+++ b/src/rttr/CMakeLists.txt -@@ -47,7 +47,7 @@ install(TARGETS rttr_core EXPORT rttr_targets - ARCHIVE DESTINATION ${RTTR_LIB_INSTALL_DIR}) - - install(EXPORT rttr_targets -- DESTINATION cmake -+ DESTINATION share/rttr - NAMESPACE RTTR:: - FILE rttr-config.cmake) - diff --git a/ports/rttr/portfile.cmake b/ports/rttr/portfile.cmake index f3b3eafb9..da66d3134 100644 --- a/ports/rttr/portfile.cmake +++ b/ports/rttr/portfile.cmake @@ -1,19 +1,22 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message("Rttr only supports dynamic library linkage") - set(VCPKG_LIBRARY_LINKAGE "dynamic") + message("Rttr only supports dynamic library linkage") + set(VCPKG_LIBRARY_LINKAGE "dynamic") +endif() +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Rttr only supports dynamic library linkage, so cannot be built with static CRT") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rttr-0.9.5-src) -vcpkg_download_distfile(ARCHIVE - URLS "http://www.rttr.org/releases/rttr-0.9.5-src.zip" - FILENAME "rttr-0.9.5-src.zip" - SHA512 49110cb588d2dd40a42de34b21a898fe7e21bd1e57f33b9183292c9e7cb8c8aa9e811e24613854a91e97d5cee2e561b430d89deab9f715081a3c6a1866966258 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rttrorg/rttr + REF v0.9.5 + SHA512 b451f24fd4bdc4b7d9ecabdb6fd261744852e68357ec36573109354a25f2bf494908b9d4174602b59dd5005c42ba8edc3b35ec1d1386384db421805ac9994608 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rttr-0.9.5-src + SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch" "${CMAKE_CURRENT_LIST_DIR}/disable-unit-tests.patch" @@ -26,14 +29,14 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) #Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rttr) file(RENAME ${CURRENT_PACKAGES_DIR}/share/rttr/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/rttr/copyright) file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/README.md ${CURRENT_PACKAGES_DIR}/debug/LICENSE.txt ${CURRENT_PACKAGES_DIR}/LICENSE.txt -- cgit v1.2.3 From ab5932e4a18b6240196b148f7d1c60fb9080c3d7 Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Sat, 24 Feb 2018 18:27:05 +0800 Subject: [lcm] Init port --- ports/lcm/CONTROL | 5 +++++ ports/lcm/portfile.cmake | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 ports/lcm/CONTROL create mode 100644 ports/lcm/portfile.cmake diff --git a/ports/lcm/CONTROL b/ports/lcm/CONTROL new file mode 100644 index 000000000..e6b9803fe --- /dev/null +++ b/ports/lcm/CONTROL @@ -0,0 +1,5 @@ +Source: lcm +Version: 1.3.95 +Build-Depends: glib +Description: Lightweight Communications and Marshalling (LCM) + LCM is a set of libraries and tools for message passing and data marshalling, targeted at real-time systems where high-bandwidth and low latency are critical. It provides a publish/subscribe message passing model and automatic marshalling/unmarshalling code generation with bindings for applications in a variety of programming languages. diff --git a/ports/lcm/portfile.cmake b/ports/lcm/portfile.cmake new file mode 100644 index 000000000..98f34e2ca --- /dev/null +++ b/ports/lcm/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lcm-proj/lcm + REF 82bd3a223e3227c70832307e53a65c13c1e5f81b + SHA512 5d3abf457e18a3bb50489ed17393c5416a459134f73c264e67d174a29411d6deb70c754b5669422a438ea3e5793b9b1b91d67e9d842151c5a910245fede5879f + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLCM_ENABLE_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/aclocal) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/java) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) + +file(COPY ${CURRENT_PACKAGES_DIR}/bin/lcm-gen.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/lcm) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lcm) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lcm RENAME copyright) -- cgit v1.2.3 From 9bf1809e28b92a7f54e152c7bb1ff4f488084285 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 24 Feb 2018 02:27:48 -0800 Subject: [magnum-extras] Fix build without features --- ports/magnum-extras/CONTROL | 2 +- ports/magnum-extras/portfile.cmake | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ports/magnum-extras/CONTROL b/ports/magnum-extras/CONTROL index 0e7fe0a6b..d0f9f32d0 100644 --- a/ports/magnum-extras/CONTROL +++ b/ports/magnum-extras/CONTROL @@ -1,5 +1,5 @@ Source: magnum-extras -Version: 2018.02-1 +Version: 2018.02-2 Build-Depends: magnum Description: Extras for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ Default-Features: diff --git a/ports/magnum-extras/portfile.cmake b/ports/magnum-extras/portfile.cmake index 9c0771c52..402c1aa1f 100644 --- a/ports/magnum-extras/portfile.cmake +++ b/ports/magnum-extras/portfile.cmake @@ -41,26 +41,30 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/MagnumExtras TARGET_PATH share/MagnumExtras) + # Messages to the user if("ui" IN_LIST FEATURES) message(WARNING "It is recommended to install one of magnum-plugins[freetypefont,harfbuzzfont,stbtruetypefont] to have the UI library working out of the box") endif() + # Debug includes and share are the same as release file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) # Clean up empty directories -if(NOT FEATURES) +if("${FEATURES}" STREQUAL "") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/lib - ${CURRENT_PACKAGES_DIR}/debug) + ${CURRENT_PACKAGES_DIR}/debug + ) set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -- cgit v1.2.3 From d90b38c12293861b430d1dde88e0d01df74085d7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 24 Feb 2018 02:32:50 -0800 Subject: [scintilla] Use out of source builds. Detect static builds for fast fail. --- ports/scintilla/CONTROL | 2 +- ports/scintilla/portfile.cmake | 32 ++++++++++++++------------------ 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/ports/scintilla/CONTROL b/ports/scintilla/CONTROL index f382cb552..e833bcb41 100644 --- a/ports/scintilla/CONTROL +++ b/ports/scintilla/CONTROL @@ -1,3 +1,3 @@ Source: scintilla -Version: 3.7.6 +Version: 3.7.6-1 Description: A free source code editing component for Win32, GTK+, and OS X diff --git a/ports/scintilla/portfile.cmake b/ports/scintilla/portfile.cmake index 4bdfc8ec8..af0fcf41d 100644 --- a/ports/scintilla/portfile.cmake +++ b/ports/scintilla/portfile.cmake @@ -1,23 +1,19 @@ -# 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) -# +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(FATAL_ERROR "scintilla only supports dynamic linkage") +endif() +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "scintilla only supports dynamic crt") +endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/scintilla) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/scintilla) vcpkg_download_distfile(ARCHIVE - URLS "http://www.scintilla.org/scintilla376.zip" - FILENAME "scintilla376.zip" - SHA512 618a50405eede3277d7696ac58122aeeb490d10ae392c60c7f78baaa96c965a8e1a599948e0ebd61bed7f75894b01bdf4574a0e5d0e20996bfdfb2e1bdb33203 + URLS "http://www.scintilla.org/scintilla376.zip" + FILENAME "scintilla376.zip" + SHA512 618a50405eede3277d7696ac58122aeeb490d10ae392c60c7f78baaa96c965a8e1a599948e0ebd61bed7f75894b01bdf4574a0e5d0e20996bfdfb2e1bdb33203 ) -vcpkg_extract_source_archive(${ARCHIVE}) +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) if(TRIPLET_SYSTEM_ARCH MATCHES "x86") set(BUILD_ARCH "Win32") @@ -26,8 +22,8 @@ else() endif() vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/Win32/SciLexer.vcxproj - PLATFORM ${MSBUILD_PLATFORM} + PROJECT_PATH ${SOURCE_PATH}/Win32/SciLexer.vcxproj + PLATFORM ${MSBUILD_PLATFORM} ) # Handle headers -- cgit v1.2.3 From 3638b0d4bf631a079e49769f262f783ab9b3d828 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 24 Feb 2018 02:36:58 -0800 Subject: [scintilla] Upgrade to 4.0.3 --- ports/scintilla/CONTROL | 2 +- ports/scintilla/portfile.cmake | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ports/scintilla/CONTROL b/ports/scintilla/CONTROL index e833bcb41..7cf89dfd2 100644 --- a/ports/scintilla/CONTROL +++ b/ports/scintilla/CONTROL @@ -1,3 +1,3 @@ Source: scintilla -Version: 3.7.6-1 +Version: 4.0.3 Description: A free source code editing component for Win32, GTK+, and OS X diff --git a/ports/scintilla/portfile.cmake b/ports/scintilla/portfile.cmake index af0fcf41d..ecf554abd 100644 --- a/ports/scintilla/portfile.cmake +++ b/ports/scintilla/portfile.cmake @@ -8,9 +8,9 @@ endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/scintilla) vcpkg_download_distfile(ARCHIVE - URLS "http://www.scintilla.org/scintilla376.zip" - FILENAME "scintilla376.zip" - SHA512 618a50405eede3277d7696ac58122aeeb490d10ae392c60c7f78baaa96c965a8e1a599948e0ebd61bed7f75894b01bdf4574a0e5d0e20996bfdfb2e1bdb33203 + URLS "http://www.scintilla.org/scintilla403.zip" + FILENAME "scintilla403.zip" + SHA512 51704651e99a6b51afff9957676afcf71fa1cc289c1713402c6e50c44a12ec956d5216751ebbbe6f251a23fa8c974510e7c9f37cb66f25f69c30e500e426baad ) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) @@ -41,12 +41,10 @@ else() set(BUILD_DIR_RELEASE "${BUILD_ARCH}/Release") endif() -if(VCPKG_LIBRARY_LINKAGE MATCHES "dynamic") - file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_RELEASE}/SciLexer.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_DEBUG}/SciLexer.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_RELEASE}/SciLexer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_DEBUG}/SciLexer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_RELEASE}/SciLexer.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_DEBUG}/SciLexer.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_RELEASE}/SciLexer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${SOURCE_PATH}/win32/${BUILD_DIR_DEBUG}/SciLexer.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) # Handle PDBs -- cgit v1.2.3 From e38bdde03db90e4138e36a9b6aede050c89c86d3 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 24 Feb 2018 02:45:13 -0800 Subject: [torch-th] Early detection to fail fast --- ports/torch-th/CONTROL | 2 +- ports/torch-th/portfile.cmake | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ports/torch-th/CONTROL b/ports/torch-th/CONTROL index 1ff2e2ff4..7c8f79883 100644 --- a/ports/torch-th/CONTROL +++ b/ports/torch-th/CONTROL @@ -1,3 +1,3 @@ Source: torch-th -Version: 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-1 +Version: 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-2 Description: Torch's TH library diff --git a/ports/torch-th/portfile.cmake b/ports/torch-th/portfile.cmake index 7dca19ca6..7d31fccc4 100644 --- a/ports/torch-th/portfile.cmake +++ b/ports/torch-th/portfile.cmake @@ -1,3 +1,10 @@ +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(FATAL_ERROR "scintilla only supports dynamic linkage") +endif() +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "scintilla only supports dynamic crt") +endif() + include(vcpkg_common_functions) vcpkg_from_github( @@ -15,7 +22,7 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/lib/TH - PREFER_NINJA # Disable this option if project cannot be built with Ninja + PREFER_NINJA OPTIONS -DWITH_OPENMP=OFF ) -- cgit v1.2.3 From 0eae5c651d44f56c5d1bf5e4a9b69c62a55c6b37 Mon Sep 17 00:00:00 2001 From: Patrik Huber Date: Sat, 24 Feb 2018 14:25:58 +0000 Subject: Change usage instructions to target_ based (#2873) --- ports/opencv/usage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/opencv/usage b/ports/opencv/usage index b9df60b82..1c30e5fea 100644 --- a/ports/opencv/usage +++ b/ports/opencv/usage @@ -1,5 +1,5 @@ The package opencv provides CMake integration: find_package(OpenCV REQUIRED) - include_directories(${OpenCV_INCLUDE_DIRS}) + target_include_directories(main PRIVATE ${OpenCV_INCLUDE_DIRS}) target_link_libraries(main PRIVATE ${OpenCV_LIBS}) -- cgit v1.2.3 From 89da6db4a95a5d355f6fd16d317b328ee637f539 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sun, 25 Feb 2018 10:12:18 +0900 Subject: [freexl] fix download url Download fails because original download url has been changed. Signed-off-by: Hiroshi Miura --- ports/freexl/CONTROL | 2 +- ports/freexl/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/freexl/CONTROL b/ports/freexl/CONTROL index 8e0c8da93..128ef56a0 100644 --- a/ports/freexl/CONTROL +++ b/ports/freexl/CONTROL @@ -1,5 +1,5 @@ Source: freexl -Version: 1.0.4 +Version: 1.0.4-1 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 b808d2a60..098a1dbec 100644 --- a/ports/freexl/portfile.cmake +++ b/ports/freexl/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freexl-1.0.4) vcpkg_download_distfile(ARCHIVE - URLS "http://www.gaia-gis.it/gaia-sins/freexl-1.0.4.tar.gz" + URLS "http://www.gaia-gis.it/gaia-sins/freexl-sources/freexl-1.0.4.tar.gz" FILENAME "freexl-1.0.4.tar.gz" SHA512 d72561f7b82e0281cb211fbf249e5e45411a7cdd009cfb58da3696f0a0341ea7df210883bfde794be28738486aeb4ffc67ec2c98fd2acde5280e246e204ce788 ) -- cgit v1.2.3 From 9457b37d3cd93e55852c587ec85bc199c9ac545c Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sun, 25 Feb 2018 10:15:58 +0900 Subject: [libspatialite] fix download url Download fails because original download url has been changed. Signed-off-by: Hiroshi Miura --- ports/libspatialite/CONTROL | 2 +- ports/libspatialite/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libspatialite/CONTROL b/ports/libspatialite/CONTROL index b363528e8..bb19a0605 100644 --- a/ports/libspatialite/CONTROL +++ b/ports/libspatialite/CONTROL @@ -1,5 +1,5 @@ Source: libspatialite -Version: 4.3.0a-1 +Version: 4.3.0a-2 Description: SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities. Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv diff --git a/ports/libspatialite/portfile.cmake b/ports/libspatialite/portfile.cmake index 1efb9c159..2a2834096 100644 --- a/ports/libspatialite/portfile.cmake +++ b/ports/libspatialite/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libspatialite-4.3.0a) vcpkg_download_distfile(ARCHIVE - URLS "http://www.gaia-gis.it/gaia-sins/libspatialite-4.3.0a.tar.gz" + URLS "http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.3.0a.tar.gz" FILENAME "libspatialite-4.3.0a.tar.gz" SHA512 adfd63e8dde0f370b07e4e7bb557647d2bfb5549205b60bdcaaca69ff81298a3d885e7c1ca515ef56dd0aca152ae940df8b5dbcb65bb61ae0a9337499895c3c0 ) -- cgit v1.2.3 From 81a1209df404f775b53f101c8ebd409dee4e3e6b Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sun, 25 Feb 2018 10:19:06 +0900 Subject: [readosm] fix download url Signed-off-by: Hiroshi Miura --- ports/readosm/CONTROL | 2 +- ports/readosm/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/readosm/CONTROL b/ports/readosm/CONTROL index bc2853daf..08e696e6d 100644 --- a/ports/readosm/CONTROL +++ b/ports/readosm/CONTROL @@ -1,4 +1,4 @@ Source: readosm -Version: 1.1.0 +Version: 1.1.0-1 Description: ReadOSM is an open source library to extract valid data from within an Open Street Map input file (.osm or .osm.pbf) Build-Depends: expat, zlib diff --git a/ports/readosm/portfile.cmake b/ports/readosm/portfile.cmake index 40af755eb..c26934685 100644 --- a/ports/readosm/portfile.cmake +++ b/ports/readosm/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/readosm-1.1.0) vcpkg_download_distfile(ARCHIVE - URLS "http://www.gaia-gis.it/gaia-sins/readosm-1.1.0.tar.gz" + URLS "http://www.gaia-gis.it/gaia-sins/readosm-sources/readosm-1.1.0.tar.gz" FILENAME "readosm-1.1.0.tar.gz" SHA512 d3581f564c4461c6a1a3d5fd7d18a262c884b2ac935530064bfaebd6c05d692fb92cc600fb40e87e03f7160ebf0eeeb05f51a0e257935d056b233fe28fc01a11 ) -- cgit v1.2.3 From caff8094f7a7c90f0650e921972477bcb6576433 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sun, 25 Feb 2018 10:21:13 +0900 Subject: [spatialite-tools] fix download url Signed-off-by: Hiroshi Miura --- ports/spatialite-tools/CONTROL | 2 +- ports/spatialite-tools/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/spatialite-tools/CONTROL b/ports/spatialite-tools/CONTROL index ecbf681c6..19b2aafbb 100644 --- a/ports/spatialite-tools/CONTROL +++ b/ports/spatialite-tools/CONTROL @@ -1,4 +1,4 @@ Source: spatialite-tools -Version: 4.3.0 +Version: 4.3.0-1 Description: Contains spatialite.exe and other command line tools to work with SpatiaLite databases (import, export, SQL queries) Build-Depends: sqlite3, libspatialite, geos, readosm, proj4, zlib, libiconv, expat diff --git a/ports/spatialite-tools/portfile.cmake b/ports/spatialite-tools/portfile.cmake index f42227a12..6bfd19966 100644 --- a/ports/spatialite-tools/portfile.cmake +++ b/ports/spatialite-tools/portfile.cmake @@ -4,7 +4,7 @@ option(BUILD_DEBUG_TOOLS "Build debug version of tools" OFF) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/spatialite-tools-4.3.0) vcpkg_download_distfile(ARCHIVE - URLS "http://www.gaia-gis.it/gaia-sins/spatialite-tools-4.3.0.tar.gz" + URLS "http://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/spatialite-tools-4.3.0.tar.gz" FILENAME "spatialite-tools-4.3.0.tar.gz" SHA512 e1de27c1c65ff2ff0b08583113517bea74edf33fff59ad6e9c77492ea3ae87d9c0f17d7670ee6602b32eea73ad3678bb5410ef2c6fac6e213bf2e341a907db88 ) -- cgit v1.2.3 From 0ad0ca6df273a407227c43e312a65f95be70a478 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 25 Feb 2018 01:27:57 -0800 Subject: [libsndfile] Fix cmake targets. Use vcpkg_from_github. Fixes #2883. --- ports/libsndfile/CONTROL | 2 +- ports/libsndfile/portfile.cmake | 53 ++++++++++++++++++----------------------- 2 files changed, 24 insertions(+), 31 deletions(-) diff --git a/ports/libsndfile/CONTROL b/ports/libsndfile/CONTROL index 70be2ab6c..f870d97af 100644 --- a/ports/libsndfile/CONTROL +++ b/ports/libsndfile/CONTROL @@ -1,4 +1,4 @@ Source: libsndfile -Version: 1.0.29-6830c42-2 +Version: 1.0.29-6830c42-3 Description: Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo Build-Depends: libogg, libflac, libvorbis diff --git a/ports/libsndfile/portfile.cmake b/ports/libsndfile/portfile.cmake index daa7de3ae..e217a9671 100644 --- a/ports/libsndfile/portfile.cmake +++ b/ports/libsndfile/portfile.cmake @@ -1,29 +1,18 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsndfile-6830c421899e32f8d413a903a21a9b6cf384d369) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/erikd/libsndfile/archive/6830c421899e32f8d413a903a21a9b6cf384d369.zip" - FILENAME "libsndfile-1.0.29-6830c42.zip" - SHA512 94b561f384606f2c3dccc79164ffb4f37b93cf96e102e8bc319b50acc0e27045eea61cbe49f25610151adbeb13cc1fd57ddbbeb76abddb0fb5027e0581b83bb6 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO erikd/libsndfile + REF 6830c421899e32f8d413a903a21a9b6cf384d369 + SHA512 b13c5d7bc27218eff8a8c4ce89a964b4920b1d3946e4843e60be965d77ec205845750a82bf654a7c2c772bf3a24f6ff5706881b24ff12115f2525c8134b6d0b9 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libsndfile-6830c421899e32f8d413a903a21a9b6cf384d369 - PATCHES - "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile-getfilesize.patch" - "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile-getfilesize-addendum.patch" + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile-getfilesize.patch" + "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile-getfilesize-addendum.patch" ) if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") @@ -44,30 +33,34 @@ option(BUILD_EXECUTABLES "Build sndfile tools and install to folder tools" OFF) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DBUILD_PROGRAMS=${BUILD_EXECUTABLES} -DBUILD_EXAMPLES=0 -DBUILD_REGTEST=0 -DBUILD_TESTING=0 -DENABLE_STATIC_RUNTIME=${CRT_LIB_STATIC} -DBUILD_STATIC_LIBS=${BUILD_STATIC} -DBUILD_SHARED_LIBS=${BUILD_DYNAMIC} + PREFER_NINJA + OPTIONS -DBUILD_EXAMPLES=0 -DBUILD_REGTEST=0 -DBUILD_TESTING=0 -DENABLE_STATIC_RUNTIME=${CRT_LIB_STATIC} -DBUILD_STATIC_LIBS=${BUILD_STATIC} + OPTIONS_RELEASE -DBUILD_PROGRAMS=${BUILD_EXECUTABLES} # Setting ENABLE_PACKAGE_CONFIG=0 has no effect - # Avoid building tools in debug-build: OPTIONS_DEBUG -DBUILD_PROGRAMS=0 ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +# Fix applied for 6830c421899e32f8d413a903a21a9b6cf384d369 +file(READ "${CURRENT_PACKAGES_DIR}/share/libsndfile/LibSndFileTargets.cmake" _contents) +string(REPLACE "INTERFACE_INCLUDE_DIRECTORIES \"\${_IMPORT_PREFIX}/lib\"" "INTERFACE_INCLUDE_DIRECTORIES \"\${_IMPORT_PREFIX}/include\"" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/libsndfile/LibSndFileTargets.cmake" "${_contents}") + vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) -file(COPY ${CURRENT_PACKAGES_DIR}/share/doc/libsndfile DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/libsndfile ${CURRENT_PACKAGES_DIR}/share/${PORT}/doc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc/libsndfile ${CURRENT_PACKAGES_DIR}/share/${PORT}/doc) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) -file(COPY ${CURRENT_PACKAGES_DIR}/cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake ) if(BUILD_EXECUTABLES) file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) file(REMOVE ${TOOLS}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) endif(BUILD_EXECUTABLES) # Handle copyright -- cgit v1.2.3 From b5ddd440ed61e7fcb25ee5c877324e9a5c143dcd Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 25 Feb 2018 03:11:23 -0800 Subject: [mman] Move header to mman/sys/mman.h to avoid tricking other libraries --- ports/mman/CONTROL | 2 +- ports/mman/portfile.cmake | 4 ++++ ports/mman/usage | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 ports/mman/usage diff --git a/ports/mman/CONTROL b/ports/mman/CONTROL index f0ff4ec69..dad1b19da 100644 --- a/ports/mman/CONTROL +++ b/ports/mman/CONTROL @@ -1,3 +1,3 @@ Source: mman -Version: git-f5ff813-1 +Version: git-f5ff813-2 Description: A light implementation of the mmap functions for MinGW. diff --git a/ports/mman/portfile.cmake b/ports/mman/portfile.cmake index 88c23348e..0330cdd2c 100644 --- a/ports/mman/portfile.cmake +++ b/ports/mman/portfile.cmake @@ -21,6 +21,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/mman) +file(RENAME ${CURRENT_PACKAGES_DIR}/include/sys ${CURRENT_PACKAGES_DIR}/include/mman/sys) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/mman) file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/mman RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/mman/usage b/ports/mman/usage new file mode 100644 index 000000000..25d00d4c0 --- /dev/null +++ b/ports/mman/usage @@ -0,0 +1,4 @@ +The mman.h header deployed by mman is placed in mman/sys/mman.h to avoid accidental inclusion. + + find_path(MMAN_DIR NAMES sys/mman.h PATH_SUFFIXES mman) + target_include_directories(main PRIVATE ${MMAN_DIR}) -- cgit v1.2.3 From 8c8fc1a28afd8fa8ea149528d68c264cc1182dd7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 25 Feb 2018 03:30:31 -0800 Subject: [vcpkg] Fix exclusions in ci --- toolsrc/src/vcpkg/commands.ci.cpp | 59 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 31 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 313582b7b..c43f25b40 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -18,34 +18,6 @@ namespace vcpkg::Commands::CI using Dependencies::InstallPlanAction; using Dependencies::InstallPlanType; - static Install::InstallSummary run_ci_on_triplet(const Triplet& triplet, - const VcpkgPaths& paths, - const std::vector& ports) - { - Input::check_triplet(triplet, paths); - std::vector specs = PackageSpec::to_package_specs(ports, triplet); - const auto featurespecs = Util::fmap(specs, [](auto& spec) { return FeatureSpec(spec, ""); }); - - StatusParagraphs status_db = database_load_check(paths); - const auto& paths_port_file = Dependencies::PathsPortFileProvider(paths); - auto action_plan = Dependencies::create_feature_install_plan(paths_port_file, featurespecs, status_db); - - const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, - Build::AllowDownloads::YES, - Build::CleanBuildtrees::YES, - Build::CleanPackages::YES}; - - for (auto&& action : action_plan) - { - if (auto p = action.install_action.get()) - { - p->build_options = install_plan_options; - } - } - - return Install::perform(action_plan, Install::KeepGoing::YES, paths, status_db); - } - struct TripletAndSummary { Triplet triplet; @@ -91,13 +63,38 @@ namespace vcpkg::Commands::CI triplets.push_back(default_triplet); } - std::vector ports = Install::get_all_port_names(paths); - Util::erase_remove_if(ports, [&](auto&& port) { return Util::Sets::contains(exclusions_set, port); }); + StatusParagraphs status_db = database_load_check(paths); + const auto& paths_port_file = Dependencies::PathsPortFileProvider(paths); + const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::YES, + Build::CleanPackages::YES}; + + std::vector ports = Install::get_all_port_names(paths); std::vector results; for (const Triplet& triplet : triplets) { - Install::InstallSummary summary = run_ci_on_triplet(triplet, paths, ports); + Input::check_triplet(triplet, paths); + std::vector specs = PackageSpec::to_package_specs(ports, triplet); + // Install the default features for every package + const auto featurespecs = Util::fmap(specs, [](auto& spec) { return FeatureSpec(spec, ""); }); + + auto action_plan = Dependencies::create_feature_install_plan(paths_port_file, featurespecs, status_db); + + for (auto&& action : action_plan) + { + if (auto p = action.install_action.get()) + { + p->build_options = install_plan_options; + if (Util::Sets::contains(exclusions_set, p->spec.name())) + { + p->plan_type = InstallPlanType::EXCLUDED; + } + } + } + + auto summary = Install::perform(action_plan, Install::KeepGoing::YES, paths, status_db); results.push_back({triplet, std::move(summary)}); } -- cgit v1.2.3 From f49a90c0f961e3866baea80174b1c605404e637f Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Sun, 25 Feb 2018 22:28:15 +0800 Subject: [graphite2] Init port --- ports/graphite2/CONTROL | 4 ++++ ports/graphite2/fix-static-build.patch | 21 +++++++++++++++++++++ ports/graphite2/portfile.cmake | 26 ++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 ports/graphite2/CONTROL create mode 100644 ports/graphite2/fix-static-build.patch create mode 100644 ports/graphite2/portfile.cmake diff --git a/ports/graphite2/CONTROL b/ports/graphite2/CONTROL new file mode 100644 index 000000000..eb12bb450 --- /dev/null +++ b/ports/graphite2/CONTROL @@ -0,0 +1,4 @@ +Source: graphite2 +Version: 1.3.10 +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 diff --git a/ports/graphite2/fix-static-build.patch b/ports/graphite2/fix-static-build.patch new file mode 100644 index 000000000..7a51f43cf --- /dev/null +++ b/ports/graphite2/fix-static-build.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3466c5f..d88b3bc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -63,11 +63,11 @@ endif (GRAPHITE2_VM_TYPE STREQUAL "direct" AND NOT (CMAKE_COMPILER_IS_GNUCXX OR + message(STATUS "Using vm machine type: ${GRAPHITE2_VM_TYPE}") + + add_subdirectory(src) +-add_subdirectory(tests) +-add_subdirectory(doc) +-if (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) +- add_subdirectory(gr2fonttest) +-endif (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) ++# add_subdirectory(tests) ++# add_subdirectory(doc) ++# if (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) ++# add_subdirectory(gr2fonttest) ++# endif (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) + + set(version 3.0.1) + set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) diff --git a/ports/graphite2/portfile.cmake b/ports/graphite2/portfile.cmake new file mode 100644 index 000000000..000817449 --- /dev/null +++ b/ports/graphite2/portfile.cmake @@ -0,0 +1,26 @@ + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO silnrsi/graphite + REF 99658129785a218556929db0595a002a668b40b0 + SHA512 50cf6f727a2ea13ccbf55b4dad282358c40973aa0a0d97db6d721208b70fe848791aab183062c7bed8ce5b0dc3fecd6b604f6defdd5ae89b46ce267069ee0ed1 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/gr2fonttest.exe) +# file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/gr2fonttest.exe) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/graphite2) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/graphite2 RENAME copyright) -- cgit v1.2.3 From fd1e314a98ed73bdfcce03665a5070b52bf021a0 Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Sun, 25 Feb 2018 22:37:39 +0800 Subject: [zziplib] Update archive source to github --- ports/zziplib/CMakeLists.txt | 1 - ports/zziplib/portfile.cmake | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ports/zziplib/CMakeLists.txt b/ports/zziplib/CMakeLists.txt index c99bc0ddd..e56df5da9 100644 --- a/ports/zziplib/CMakeLists.txt +++ b/ports/zziplib/CMakeLists.txt @@ -23,7 +23,6 @@ set(HEADERS zzip/__debug.h zzip/__fnmatch.h zzip/__hints.h zzip/__mmap.h - zzip/_config.h zzip/_msvc.h zzip/autoconf.h zzip/conf.h diff --git a/ports/zziplib/portfile.cmake b/ports/zziplib/portfile.cmake index 2a7e18e56..33430db96 100644 --- a/ports/zziplib/portfile.cmake +++ b/ports/zziplib/portfile.cmake @@ -1,11 +1,10 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/zziplib-0.13.62) -vcpkg_download_distfile(ARCHIVE - URLS "https://sourceforge.net/projects/zziplib/files/zziplib13/0.13.62/zziplib-0.13.62.tar.bz2/download" - FILENAME "zziplib-0.13.62.tar.bz2" - SHA512 fd3b9e9015ba7603bdebd8f6a2ac6d11003705bfab22f3a0025f75455042664aea69440845b59e6f389417dff5ac777f49541d8cbacb2a220e67d20bb6973e25 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gdraheim/zziplib + REF v0.13.62 + SHA512 e3dda9cfb7dadd44d3307d3ae0c706c68ef9d6434f78ed6fdb470defb03790e3c0c84d8e5149d3cff329d24627401b3ef2f0378bb3b2c3fcce89d7ae41627fb3 ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From d559aaefd6307f495deb8140e7c52ac6767fcc05 Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Sun, 25 Feb 2018 23:17:45 +0800 Subject: [zziplib] bump verison --- ports/zziplib/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/zziplib/portfile.cmake b/ports/zziplib/portfile.cmake index 33430db96..68419be3b 100644 --- a/ports/zziplib/portfile.cmake +++ b/ports/zziplib/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gdraheim/zziplib - REF v0.13.62 - SHA512 e3dda9cfb7dadd44d3307d3ae0c706c68ef9d6434f78ed6fdb470defb03790e3c0c84d8e5149d3cff329d24627401b3ef2f0378bb3b2c3fcce89d7ae41627fb3 + REF v0.13.68 + SHA512 e8a9976242acc04064ec239b9b929228370a946e5bd37092adcc1bda14605710a3850d39795d1937b609d1ab9a9a1998152f8c88b2dccc387ac6ec774d9cfce9 ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 7aaa4dc5d786b47dfd3709b21e20941e3823d2cf Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Mon, 26 Feb 2018 00:09:17 +0800 Subject: [ape] add dynamic build stuff Tried to build dynamically but failed --- ports/monkeys-audio/portfile.cmake | 12 +++++++-- ports/monkeys-audio/use-dynamic-linkage.patch | 36 +++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 ports/monkeys-audio/use-dynamic-linkage.patch diff --git a/ports/monkeys-audio/portfile.cmake b/ports/monkeys-audio/portfile.cmake index 10b650ba4..58a336737 100644 --- a/ports/monkeys-audio/portfile.cmake +++ b/ports/monkeys-audio/portfile.cmake @@ -8,8 +8,8 @@ endif() include(vcpkg_common_functions) set(VERSION 4.7) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Source) -set(PROJECT_PATH ${SOURCE_PATH}/Projects/VS2017) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) +set(PROJECT_PATH ${SOURCE_PATH}/Source/Projects/VS2017) vcpkg_download_distfile(ARCHIVE URLS "http://monkeysaudio.com/files/MAC_SDK_433.zip" @@ -19,6 +19,13 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/use-dynamic-linkage.patch + ) +endif() + vcpkg_build_msbuild( PROJECT_PATH ${PROJECT_PATH}/Console/Console.vcxproj ) @@ -43,5 +50,6 @@ file(COPY file(INSTALL ${PROJECT_PATH}/Console/Release/Console.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio RENAME mac.exe) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/monkeys-audio RENAME copyright) diff --git a/ports/monkeys-audio/use-dynamic-linkage.patch b/ports/monkeys-audio/use-dynamic-linkage.patch new file mode 100644 index 000000000..ab16f6353 --- /dev/null +++ b/ports/monkeys-audio/use-dynamic-linkage.patch @@ -0,0 +1,36 @@ +diff --git a/Source/Projects/VS2017/MACLib/MACLib.vcxproj b/Source/Projects/VS2017/MACLib/MACLib.vcxproj +index ec3cf92..44c8e65 100644 +--- a/Source/Projects/VS2017/MACLib/MACLib.vcxproj ++++ b/Source/Projects/VS2017/MACLib/MACLib.vcxproj +@@ -25,27 +25,27 @@ + + + +- StaticLibrary ++ DynamicLibrary + v141_xp + false + Unicode + false + + +- StaticLibrary ++ DynamicLibrary + v141_xp + false + Unicode + + +- StaticLibrary ++ DynamicLibrary + v141_xp + false + Unicode + false + + +- StaticLibrary ++ DynamicLibrary + v141_xp + false + Unicode -- cgit v1.2.3 From 99d30fa105c9f6b8fe70417fc72fcbf9bfb16dfa Mon Sep 17 00:00:00 2001 From: Eli Arzhannikov Date: Sun, 25 Feb 2018 21:32:16 +0300 Subject: [gsl-lite] Bump version (#2888) --- ports/gsl-lite/CONTROL | 2 +- ports/gsl-lite/portfile.cmake | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/gsl-lite/CONTROL b/ports/gsl-lite/CONTROL index 1d93638e0..dcb7c182c 100644 --- a/ports/gsl-lite/CONTROL +++ b/ports/gsl-lite/CONTROL @@ -1,3 +1,3 @@ Source: gsl-lite -Version: 0.26.0 +Version: 0.28.0 Description: A single-file header-only version of ISO C++ Guideline Support Library (GSL) for C++98, C++11 and later diff --git a/ports/gsl-lite/portfile.cmake b/ports/gsl-lite/portfile.cmake index 807e13233..9bcae7d06 100644 --- a/ports/gsl-lite/portfile.cmake +++ b/ports/gsl-lite/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(GSL_LITE_VERSION v0.26.0) +set(GSL_LITE_VERSION v0.28.0) vcpkg_download_distfile(HEADER - URLS "https://github.com/martinmoene/gsl-lite/releases/download/${GSL_LITE_VERSION}/gsl-lite.h" - FILENAME "gsl-lite-${GSL_LITE_VERSION}.h" - SHA512 22bfa69120f98662adca0459a876186086f5deecfaaad6e0d7420fa2b2f7acac63c767b3b1f8915d36f3a44e647a730e2c22f2587befc938e81ea4329c5f2185 + URLS "https://github.com/martinmoene/gsl-lite/releases/download/${GSL_LITE_VERSION}/gsl-lite.hpp" + FILENAME "gsl-lite-${GSL_LITE_VERSION}.hpp" + SHA512 2c9705c9d17b5acbd7eb2f4a93a6fd07f9ce31e81a41d2ca6a961ed484d771742d7960305bbb20b82d810013c7473c9afa58c71468a15466e00c879449d38ba5 ) vcpkg_download_distfile(LICENSE @@ -14,5 +14,5 @@ vcpkg_download_distfile(LICENSE SHA512 1feff12bda27a5ec52440a7624de54d841faf3e254fff04ab169b7f312e685f4bfe71236de8b8ef759111ae95bdb69e05f2e8318773b0aff4ba24ea9568749bb ) -file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME gsl-lite.h) +file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME gsl-lite.hpp) file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsl-lite RENAME copyright) -- cgit v1.2.3 From 8b97ae2dc14672ca83a5a7dc8f1d62af99234476 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 25 Feb 2018 10:13:57 -0800 Subject: [vcpkg] Fix "just-in-time" requirements calculation --- toolsrc/include/vcpkg/base/util.h | 9 +++ toolsrc/include/vcpkg/build.h | 5 +- toolsrc/include/vcpkg/commands.h | 1 + toolsrc/include/vcpkg/dependencies.h | 6 +- toolsrc/src/vcpkg/build.cpp | 117 +++++++++++++++++++++------------ toolsrc/src/vcpkg/commands.hash.cpp | 10 +-- toolsrc/src/vcpkg/dependencies.cpp | 8 +-- toolsrc/src/vcpkg/statusparagraphs.cpp | 10 +++ 8 files changed, 112 insertions(+), 54 deletions(-) diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 6c05a3a9e..5e07b240a 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -127,6 +127,15 @@ namespace vcpkg::Util std::sort(begin(cont), end(cont)); } + template + void sort_unique_erase(Range& cont) + { + using std::begin; + using std::end; + std::sort(begin(cont), end(cont)); + cont.erase(std::unique(begin(cont), end(cont)), end(cont)); + } + template bool all_equal(const Range1& r1, const Range2& r2) { diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 7ef7d6516..f560dbf57 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -12,6 +12,7 @@ #include #include +#include #include namespace vcpkg::Build @@ -125,7 +126,7 @@ namespace vcpkg::Build const Triplet& triplet, fs::path&& port_dir, const BuildPackageOptions& build_package_options, - const std::unordered_set& feature_list) + const std::set& feature_list) : scf(src) , triplet(triplet) , port_dir(std::move(port_dir)) @@ -138,7 +139,7 @@ namespace vcpkg::Build const Triplet& triplet; fs::path port_dir; const BuildPackageOptions& build_package_options; - const std::unordered_set& feature_list; + const std::set& feature_list; }; ExtendedBuildResult build_package(const VcpkgPaths& paths, diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 31c750b38..4027e12f4 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -120,6 +120,7 @@ namespace vcpkg::Commands namespace Hash { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + std::string get_file_hash(fs::path const& cmake_exe_path, fs::path const& path, std::string const& hash_type); } template diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index de68d06e9..6e02e4efd 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -39,12 +39,12 @@ namespace vcpkg::Dependencies InstallPlanAction(const PackageSpec& spec, InstalledPackageView&& spghs, - const std::unordered_set& features, + const std::set& features, const RequestType& request_type); InstallPlanAction(const PackageSpec& spec, const SourceControlFile& scf, - const std::unordered_set& features, + const std::set& features, const RequestType& request_type); std::string displayname() const; @@ -57,7 +57,7 @@ namespace vcpkg::Dependencies InstallPlanType plan_type; RequestType request_type; Build::BuildPackageOptions build_options; - std::unordered_set feature_list; + std::set feature_list; }; enum class RemovePlanType diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index c169a778e..ff7554b78 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -66,7 +66,8 @@ namespace vcpkg::Build::Command Build::CleanBuildtrees::NO, Build::CleanPackages::NO}; - const std::unordered_set features_as_set(full_spec.features.begin(), full_spec.features.end()); + std::set features_as_set(full_spec.features.begin(), full_spec.features.end()); + features_as_set.emplace("core"); const Build::BuildPackageConfig build_config{ *scf, spec.triplet(), fs::path{port_dir}, build_package_options, features_as_set}; @@ -260,56 +261,93 @@ namespace vcpkg::Build paths.get_filesystem().write_contents(binary_control_file, start); } - static ExtendedBuildResult do_build_package(const VcpkgPaths& paths, - const BuildPackageConfig& config, - const StatusParagraphs& status_db) + static std::vector compute_required_feature_specs(const BuildPackageConfig& config, + const StatusParagraphs& status_db) { - const PackageSpec spec = PackageSpec::from_name_and_triplet(config.scf.core_paragraph->name, config.triplet) - .value_or_exit(VCPKG_LINE_INFO); - const Triplet& triplet = config.triplet; + + auto 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 it = + Util::find_if(config.scf.feature_paragraphs, + [&](std::unique_ptr const& fpgh) { return fpgh->name == feature; }); + Checks::check_exit(VCPKG_LINE_INFO, it != config.scf.feature_paragraphs.end()); + + return filter_dependencies(it->get()->depends, triplet); + }); + + auto dep_fspecs = FeatureSpec::from_strings_and_triplet(dep_strings, triplet); + Util::sort_unique_erase(dep_fspecs); + + // expand defaults + std::vector ret; + for (auto&& fspec : dep_fspecs) { - std::vector missing_specs; - for (auto&& dep : filter_dependencies(config.scf.core_paragraph->depends, triplet)) + if (fspec.feature().empty()) { - auto dep_specs = FeatureSpec::from_strings_and_triplet({dep}, triplet); - for (auto&& feature : dep_specs) + // reference to default features + auto it = status_db.find_installed(fspec.spec()); + if (it == status_db.end()) + { + // not currently installed, so just leave the default reference so it will fail later + ret.push_back(fspec); + } + else { - if (!status_db.is_installed(feature)) - { - missing_specs.push_back(std::move(feature)); - } + ret.push_back(FeatureSpec{fspec.spec(), "core"}); + for (auto&& default_feature : it->get()->package.default_features) + ret.push_back(FeatureSpec{fspec.spec(), default_feature}); } } - // Fail the build if any dependencies were missing - if (!missing_specs.empty()) + else { - return {BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES, std::move(missing_specs)}; + ret.push_back(fspec); } } + Util::sort_unique_erase(ret); + + return ret; + } + + static ExtendedBuildResult do_build_package(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const StatusParagraphs& status_db) + { + auto& fs = paths.get_filesystem(); + const Triplet& triplet = config.triplet; + + const PackageSpec spec = + PackageSpec::from_name_and_triplet(config.scf.core_paragraph->name, triplet).value_or_exit(VCPKG_LINE_INFO); + + std::vector required_fspecs = compute_required_feature_specs(config, status_db); + + // Find all features that aren't installed. This destroys required_fspecs. + Util::unstable_keep_if(required_fspecs, + [&](FeatureSpec const& fspec) { return !status_db.is_installed(fspec); }); + + if (!required_fspecs.empty()) + { + return {BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES, std::move(required_fspecs)}; + } const fs::path& cmake_exe_path = paths.get_cmake_exe(); const fs::path& git_exe_path = paths.get_git_exe(); const fs::path ports_cmake_script_path = paths.ports_cmake; + const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); - std::string features; + std::string features = Strings::join(";", config.feature_list); + std::string all_features; - if (GlobalState::feature_packages) + for (auto& feature : config.scf.feature_paragraphs) { - for (auto&& feature : config.feature_list) - { - features.append(feature + ";"); - } - if (!features.empty()) - { - features.pop_back(); - } - for (auto& feature : config.scf.feature_paragraphs) - { - all_features.append(feature->name + ";"); - } + all_features.append(feature->name + ";"); } const Toolset& toolset = paths.get_toolset(pre_build_info); @@ -351,7 +389,7 @@ namespace vcpkg::Build } } - const BuildInfo build_info = read_build_info(paths.get_filesystem(), paths.build_info_file_path(spec)); + 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); auto bcf = create_binary_control_file(*config.scf.core_paragraph, triplet, build_info); @@ -360,16 +398,13 @@ namespace vcpkg::Build { return BuildResult::POST_BUILD_CHECKS_FAILED; } - if (GlobalState::feature_packages) + for (auto&& feature : config.feature_list) { - for (auto&& feature : config.feature_list) + for (auto&& f_pgh : config.scf.feature_paragraphs) { - for (auto&& f_pgh : config.scf.feature_paragraphs) - { - if (f_pgh->name == feature) - bcf->features.push_back( - create_binary_feature_control_file(*config.scf.core_paragraph, *f_pgh, triplet)); - } + if (f_pgh->name == feature) + bcf->features.push_back( + create_binary_feature_control_file(*config.scf.core_paragraph, *f_pgh, triplet)); } } diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index fa3d80f27..767a1bf26 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -7,7 +7,7 @@ namespace vcpkg::Commands::Hash { - static void do_file_hash(fs::path const& cmake_exe_path, fs::path const& path, std::string const& hash_type) + std::string get_file_hash(fs::path const& cmake_exe_path, fs::path const& path, std::string const& hash_type) { const std::string cmd_line = Strings::format( R"("%s" -E %ssum %s)", cmake_exe_path.u8string(), Strings::ascii_to_lowercase(hash_type), path.u8string()); @@ -27,7 +27,7 @@ namespace vcpkg::Commands::Hash auto hash = output.substr(0, start); Util::erase_remove_if(hash, isspace); - System::println(hash); + return hash; } const CommandStructure COMMAND_STRUCTURE = { @@ -45,11 +45,13 @@ namespace vcpkg::Commands::Hash if (args.command_arguments.size() == 1) { - do_file_hash(paths.get_cmake_exe(), args.command_arguments[0], "SHA512"); + auto hash = get_file_hash(paths.get_cmake_exe(), args.command_arguments[0], "SHA512"); + System::println(hash); } if (args.command_arguments.size() == 2) { - do_file_hash(paths.get_cmake_exe(), args.command_arguments[0], args.command_arguments[1]); + auto hash = get_file_hash(paths.get_cmake_exe(), args.command_arguments[0], args.command_arguments[1]); + System::println(hash); } Checks::exit_success(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 793951ab5..649e8f1d8 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -30,8 +30,8 @@ namespace vcpkg::Dependencies Optional source_control_file; PackageSpec spec; std::unordered_map edges; - std::unordered_set to_install_features; - std::unordered_set original_features; + std::set to_install_features; + std::set original_features; bool will_remove = false; bool transient_uninstalled = true; RequestType request_type = RequestType::AUTO_SELECTED; @@ -143,7 +143,7 @@ namespace vcpkg::Dependencies InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const SourceControlFile& scf, - const std::unordered_set& features, + const std::set& features, const RequestType& request_type) : spec(spec) , source_control_file(scf) @@ -155,7 +155,7 @@ namespace vcpkg::Dependencies InstallPlanAction::InstallPlanAction(const PackageSpec& spec, InstalledPackageView&& ipv, - const std::unordered_set& features, + const std::set& features, const RequestType& request_type) : spec(spec) , installed_package(std::move(ipv)) diff --git a/toolsrc/src/vcpkg/statusparagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp index b23d8b884..c642af59b 100644 --- a/toolsrc/src/vcpkg/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg/statusparagraphs.cpp @@ -54,6 +54,11 @@ namespace vcpkg const Triplet& triplet, const std::string& feature) { + if (feature == "core") + { + // The core feature maps to .feature == "" + return find(name, triplet, ""); + } return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { const PackageSpec& spec = pgh->package.spec; return spec.name() == name && spec.triplet() == triplet && pgh->package.feature == feature; @@ -64,6 +69,11 @@ namespace vcpkg const Triplet& triplet, const std::string& feature) const { + if (feature == "core") + { + // The core feature maps to .feature == "" + return find(name, triplet, ""); + } return std::find_if(begin(), end(), [&](const std::unique_ptr& pgh) { const PackageSpec& spec = pgh->package.spec; return spec.name() == name && spec.triplet() == triplet && pgh->package.feature == feature; -- cgit v1.2.3 From 3b56fc7101431a410fa8325887d6599b5ccd2a93 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 25 Feb 2018 11:32:37 -0800 Subject: [mman] Fix static build --- ports/mman/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/mman/portfile.cmake b/ports/mman/portfile.cmake index 0330cdd2c..f4eb270c8 100644 --- a/ports/mman/portfile.cmake +++ b/ports/mman/portfile.cmake @@ -29,9 +29,9 @@ file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(READ ${CURRENT_PACKAGES_DIR}/include/sys/mman.h _contents) + file(READ ${CURRENT_PACKAGES_DIR}/include/mman/sys/mman.h _contents) string(REPLACE "__declspec(dllimport)" "" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/sys/mman.h "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/mman/sys/mman.h "${_contents}") endif() vcpkg_copy_pdbs() -- cgit v1.2.3 From 2e135bf09677163fc20364f9d46ba4248042ae1a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Feb 2018 05:19:05 -0800 Subject: [vcpkg] Fix issue when removing packages that have explicit feature dependencies. --- toolsrc/src/tests.plan.cpp | 15 +++++++++++++++ toolsrc/src/vcpkg/dependencies.cpp | 30 +++++++++++++++++++----------- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 546e20b0d..d33ab290d 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -780,6 +780,21 @@ namespace UnitTest1 Assert::AreEqual("vtk", remove_plan[1].spec.name().c_str()); Assert::AreEqual("expat", remove_plan[2].spec.name().c_str()); } + + TEST_METHOD(features_depend_core_remove_scheme) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("curl", "", "", "x64")); + pghs.push_back(make_status_pgh("cpr", "curl[core]", "", "x64")); + StatusParagraphs status_db(std::move(pghs)); + + auto remove_plan = Dependencies::create_remove_plan( + {unsafe_pspec("curl", Triplet::from_canonical_name("x64"))}, status_db); + + Assert::AreEqual(size_t(2), remove_plan.size()); + Assert::AreEqual("cpr", remove_plan[0].spec.name().c_str()); + Assert::AreEqual("curl", remove_plan[1].spec.name().c_str()); + } }; class UpgradePlanTests : public TestClass diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 649e8f1d8..43e4d2721 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -29,7 +29,7 @@ namespace vcpkg::Dependencies Optional source_control_file; PackageSpec spec; - std::unordered_map edges; + std::unordered_map edges_by_feature; std::set to_install_features; std::set original_features; bool will_remove = false; @@ -100,13 +100,13 @@ namespace vcpkg::Dependencies FeatureNodeEdges core_dependencies; core_dependencies.build_edges = filter_dependencies_to_specs(scf.core_paragraph->depends, out_cluster.spec.triplet()); - out_cluster.edges.emplace("core", std::move(core_dependencies)); + out_cluster.edges_by_feature.emplace("core", std::move(core_dependencies)); for (const auto& feature : scf.feature_paragraphs) { FeatureNodeEdges added_edges; added_edges.build_edges = filter_dependencies_to_specs(feature->depends, out_cluster.spec.triplet()); - out_cluster.edges.emplace(feature->name, std::move(added_edges)); + out_cluster.edges_by_feature.emplace(feature->name, std::move(added_edges)); } out_cluster.source_control_file = &scf; } @@ -309,7 +309,15 @@ namespace vcpkg::Dependencies { if (an_installed_package->package.spec.triplet() != spec.triplet()) continue; - const std::vector& deps = an_installed_package->package.depends; + std::vector deps = an_installed_package->package.depends; + // + // This is a hack to work around existing installations that put featurespecs into binary packages + // (example: curl[core]) Eventually, this can be returned to a simple string search. + for (auto&& dep : deps) + { + dep.erase(std::find(dep.begin(), dep.end(), '['), dep.end()); + } + // if (std::find(deps.begin(), deps.end(), spec.name()) == deps.end()) continue; dependents.push_back(an_installed_package->package.spec); @@ -446,10 +454,10 @@ namespace vcpkg::Dependencies } } - auto it = cluster.edges.find(feature); - if (it == cluster.edges.end()) return MarkPlusResult::FEATURE_NOT_FOUND; + auto it = cluster.edges_by_feature.find(feature); + if (it == cluster.edges_by_feature.end()) return MarkPlusResult::FEATURE_NOT_FOUND; - if (cluster.edges[feature].plus) return MarkPlusResult::SUCCESS; + if (cluster.edges_by_feature[feature].plus) return MarkPlusResult::SUCCESS; if (cluster.original_features.find(feature) == cluster.original_features.end()) { @@ -460,7 +468,7 @@ namespace vcpkg::Dependencies { return MarkPlusResult::SUCCESS; } - cluster.edges[feature].plus = true; + cluster.edges_by_feature[feature].plus = true; if (!cluster.original_features.empty()) { @@ -485,7 +493,7 @@ namespace vcpkg::Dependencies auto res = mark_plus("", cluster, graph, graph_plan, prevent_default_features); } - for (auto&& depend : cluster.edges[feature].build_edges) + for (auto&& depend : cluster.edges_by_feature[feature].build_edges) { auto& depend_cluster = graph.get(depend.spec()); auto res = mark_plus(depend.feature(), depend_cluster, graph, graph_plan, prevent_default_features); @@ -521,7 +529,7 @@ namespace vcpkg::Dependencies } graph_plan.remove_graph.add_vertex({&cluster}); - for (auto&& pair : cluster.edges) + for (auto&& pair : cluster.edges_by_feature) { auto& remove_edges_edges = pair.second.remove_edges; for (auto&& depend : remove_edges_edges) @@ -746,7 +754,7 @@ namespace vcpkg::Dependencies auto depends_name = dependency.feature(); if (depends_name.empty()) depends_name = "core"; - auto& target_node = dep_cluster.edges[depends_name]; + auto& target_node = dep_cluster.edges_by_feature[depends_name]; target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); } } -- cgit v1.2.3 From 71d44cebdb85926bc00241fc08f0dcaaedb868d2 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Feb 2018 06:08:51 -0800 Subject: [vcpkg] Add test for default-features with a preinstalled dependency --- toolsrc/src/tests.plan.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index d33ab290d..2bdb4a465 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -536,8 +536,34 @@ namespace UnitTest1 // Expect "a" to get installed and defaults of "b" through the dependency, // as no explicit features of "b" are installed by the user. Assert::IsTrue(install_plan.size() == 2); - features_check(&install_plan[1], "a", {"core"}, Triplet::X64_WINDOWS); features_check(&install_plan[0], "b", {"b1", "core"}, Triplet::X64_WINDOWS); + features_check(&install_plan[1], "a", {"core"}, Triplet::X64_WINDOWS); + } + + TEST_METHOD(do_not_install_default_features_of_existing_dependency) + { + // Add a port "a" which depends on the core of "b" + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + spec_map.emplace("a", "b[core]"); + // "b" has two features, of which "b1" is default. + spec_map.emplace("b", "", {{"b0", ""}, {"b1", ""}}, {"b1"}); + + std::vector> status_paragraphs; + // "b[core]" is already installed + status_paragraphs.push_back(make_status_pgh("b")); + status_paragraphs.back()->package.spec = + PackageSpec::from_name_and_triplet("b", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); + + // Install "a" (without explicit feature specification) + auto install_specs = FullPackageSpec::from_string("a", Triplet::X64_WINDOWS); + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + // Expect "a" to get installed, but not require rebuilding "b" + Assert::IsTrue(install_plan.size() == 1); + features_check(&install_plan[0], "a", {"core"}, Triplet::X64_WINDOWS); } TEST_METHOD(install_default_features_of_dependency_test_2) -- cgit v1.2.3 From 65e95f6348e3a23a2afd1c1d25c9501dc826b183 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Feb 2018 14:35:08 -0800 Subject: [vcpkg] Fix inter-feature references --- toolsrc/src/tests.plan.cpp | 15 +++++++++++++++ toolsrc/src/vcpkg/dependencies.cpp | 2 ++ 2 files changed, 17 insertions(+) diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 2bdb4a465..aae4d2ee4 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -821,6 +821,21 @@ namespace UnitTest1 Assert::AreEqual("cpr", remove_plan[0].spec.name().c_str()); Assert::AreEqual("curl", remove_plan[1].spec.name().c_str()); } + + TEST_METHOD(features_depend_core_remove_scheme_2) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("curl", "", "", "x64")); + pghs.push_back(make_status_feature_pgh("curl", "a", "", "x64")); + pghs.push_back(make_status_feature_pgh("curl", "b", "curl[a]", "x64")); + StatusParagraphs status_db(std::move(pghs)); + + auto remove_plan = Dependencies::create_remove_plan( + {unsafe_pspec("curl", Triplet::from_canonical_name("x64"))}, status_db); + + Assert::AreEqual(size_t(1), remove_plan.size()); + Assert::AreEqual("curl", remove_plan[0].spec.name().c_str()); + } }; class UpgradePlanTests : public TestClass diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 43e4d2721..f4a371a2e 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -317,6 +317,8 @@ namespace vcpkg::Dependencies { dep.erase(std::find(dep.begin(), dep.end(), '['), dep.end()); } + Util::unstable_keep_if(deps, + [&](auto&& e) { return e != an_installed_package->package.spec.name(); }); // if (std::find(deps.begin(), deps.end(), spec.name()) == deps.end()) continue; -- cgit v1.2.3 From c267f32bd976ae599fa57d63031352b1c84a9c53 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Feb 2018 14:43:47 -0800 Subject: [vcpkg] Fix feature interdependency during install --- toolsrc/src/vcpkg/build.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index ff7554b78..0e0928a1b 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -327,8 +327,9 @@ namespace vcpkg::Build std::vector required_fspecs = compute_required_feature_specs(config, status_db); // Find all features that aren't installed. This destroys required_fspecs. - Util::unstable_keep_if(required_fspecs, - [&](FeatureSpec const& fspec) { return !status_db.is_installed(fspec); }); + Util::unstable_keep_if(required_fspecs, [&](FeatureSpec const& fspec) { + return !status_db.is_installed(fspec) && fspec.name() != spec.name(); + }); if (!required_fspecs.empty()) { -- cgit v1.2.3 From 3921fc3012f91efedc36961ce7f15700af47aa7d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Feb 2018 15:01:29 -0800 Subject: [chmlib] Use CMake buildsystem replacement --- ports/chmlib/CMakeLists.txt | 23 ++++ ports/chmlib/CONTROL | 4 +- ports/chmlib/chm.vcxproj | 211 ------------------------------------ ports/chmlib/enum_chmLib.vcxproj | 109 ------------------- ports/chmlib/enumdir_chmLib.vcxproj | 100 ----------------- ports/chmlib/extract_chmLib.vcxproj | 100 ----------------- ports/chmlib/portfile.cmake | 54 ++------- 7 files changed, 36 insertions(+), 565 deletions(-) create mode 100644 ports/chmlib/CMakeLists.txt delete mode 100644 ports/chmlib/chm.vcxproj delete mode 100644 ports/chmlib/enum_chmLib.vcxproj delete mode 100644 ports/chmlib/enumdir_chmLib.vcxproj delete mode 100644 ports/chmlib/extract_chmLib.vcxproj diff --git a/ports/chmlib/CMakeLists.txt b/ports/chmlib/CMakeLists.txt new file mode 100644 index 000000000..49ce1f129 --- /dev/null +++ b/ports/chmlib/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.5) +project(chm C) + +add_library(chm src/lzx.c src/chm_lib.c) + +if(BUILD_TOOLS) + link_libraries(chm) + add_executable(enum_chmLib src/enum_chmLib.c) + add_executable(enumdir_chmLib src/enumdir_chmLib.c) + add_executable(extract_chmLib src/extract_chmLib.c) + + install(TARGETS enum_chmLib extract_chmLib enumdir_chmLib + RUNTIME DESTINATION tools/chmlib + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) +endif() + +install(TARGETS chm + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/ports/chmlib/CONTROL b/ports/chmlib/CONTROL index 226a3be92..b7f0cc863 100644 --- a/ports/chmlib/CONTROL +++ b/ports/chmlib/CONTROL @@ -1,3 +1,3 @@ Source: chmlib -Version: 0.40-1 -Description: CHMLIB is a library for dealing with Microsoft ITSS/CHM format files. Right now, it is a very simple library, but sufficient for dealing with all of the .chm files I've come across. Due to the fairly well-designed indexing built into this particular file format, even a small library is able to gain reasonably good performance indexing into ITSS archives. \ No newline at end of file +Version: 0.40-2 +Description: CHMLIB is a library for dealing with Microsoft ITSS/CHM format files. Right now, it is a very simple library, but sufficient for dealing with all of the .chm files I've come across. Due to the fairly well-designed indexing built into this particular file format, even a small library is able to gain reasonably good performance indexing into ITSS archives. diff --git a/ports/chmlib/chm.vcxproj b/ports/chmlib/chm.vcxproj deleted file mode 100644 index 0cc2606fe..000000000 --- a/ports/chmlib/chm.vcxproj +++ /dev/null @@ -1,211 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {3bafee52-fe1a-494e-ab46-89bf77ed63a7} - chmLibExe1 - chm - 10.0.14393.0 - - - - StaticLibrary - true - v141 - - - StaticLibrary - false - v141 - true - - - StaticLibrary - true - v141 - - - StaticLibrary - false - v141 - true - - - - - - - - - - - - - - - - - - - - - - ..\..\..\x86-windows-static-dbg\ - ..\..\..\x86-windows-static-dbg\$(ProjectName)\ - - - - ..\..\..\x86-windows-static-rel\ - ..\..\..\x86-windows-static-rel\$(ProjectName)\ - - - - ..\..\..\x64-windows-static-dbg\ - ..\..\..\x64-windows-static-dbg\$(ProjectName)\ - - - - ..\..\..\x64-windows-static-rel\ - ..\..\..\x64-windows-static-rel\$(ProjectName)\ - - - - Disabled - true - false - WIN32;CHM_MT;CHM_DEBUG;_CRT_SECURE_NO_WARNINGS - 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) - MultiThreadedDebug - true - CompileAsC - OldStyle - false - true - - - - - Console - LinkVerbose - libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib - - - true - MachineX86 - Windows - true - libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib - true - - - - - Disabled - true - false - WIN32;CHM_MT;CHM_DEBUG;_CRT_SECURE_NO_WARNINGS - 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) - MultiThreadedDebug - true - CompileAsC - OldStyle - false - true - - - - - Console - LinkVerbose - libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib - - - Windows - true - libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib - true - - - - - true - true - true - false - CHM_MT;WIN32;_CRT_SECURE_NO_WARNINGS - 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) - MultiThreaded - CompileAsC - Full - - - true - true - - - Console - LinkVerbose - - - MachineX86 - Windows - true - libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib - - - - - true - true - true - false - CHM_MT;WIN32;_CRT_SECURE_NO_WARNINGS - 4018;4057;4127;4189;4244;4267;4295;4324;4458;4477;4701;4706;4800;4996;%(DisableSpecificWarnings) - MultiThreaded - CompileAsC - Full - - - true - true - - - Console - LinkVerbose - - - Windows - true - libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ports/chmlib/enum_chmLib.vcxproj b/ports/chmlib/enum_chmLib.vcxproj deleted file mode 100644 index 1b847a409..000000000 --- a/ports/chmlib/enum_chmLib.vcxproj +++ /dev/null @@ -1,109 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - - - - - 15.0 - {2c833145-059b-47d5-b0fe-b3ac6ff1ccb0} - enum_chmLib - 10.0.14393.0 - - - - Application - true - v141 - - - Application - false - v141 - true - MultiByte - - - Application - true - v141 - - - Application - false - v141 - true - MultiByte - - - - - - - - - - - - - - - ..\..\..\x86-windows-static-rel\ - ..\..\..\x86-windows-static-rel\$(ProjectName)\ - - - ..\..\..\x64-windows-static-rel\ - ..\..\..\x64-windows-static-rel\$(ProjectName)\ - - - - MaxSpeed - true - true - true - false - WIN32;_UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS - true - MultiThreaded - - - true - true - $(OutputPath)chm.lib - Console - LinkVerbose - libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib - - - - - true - true - true - false - WIN32;_UNICODE;UNICODE;_CRT_SECURE_NO_WARNINGS - true - MultiThreaded - - - true - true - $(OutputPath)chm.lib - Console - LinkVerbose - libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib - - - - - - \ No newline at end of file diff --git a/ports/chmlib/enumdir_chmLib.vcxproj b/ports/chmlib/enumdir_chmLib.vcxproj deleted file mode 100644 index 8b7d552c5..000000000 --- a/ports/chmlib/enumdir_chmLib.vcxproj +++ /dev/null @@ -1,100 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - - - - - 15.0 - {bb0bfe9a-7d13-44a0-b2b5-3b69a07a77e8} - enumdir_chmLib - 10.0.14393.0 - - - - Application - false - v141 - true - MultiByte - - - Application - false - v141 - true - MultiByte - - - - - - - - - - - - - - - ..\..\..\x86-windows-static-rel\ - ..\..\..\x86-windows-static-rel\$(ProjectName)\ - - - ..\..\..\x64-windows-static-rel\ - ..\..\..\x64-windows-static-rel\$(ProjectName)\ - - - - Level3 - MaxSpeed - true - true - true - false - WIN32;_CRT_SECURE_NO_WARNINGS - MultiThreaded - - - true - true - $(OutputPath)chm.lib - Console - LinkVerbose - libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib - - - - - Level3 - MaxSpeed - true - true - true - false - WIN32;_CRT_SECURE_NO_WARNINGS - MultiThreaded - - - true - true - $(OutputPath)chm.lib - Console - LinkVerbose - libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib - - - - - - \ No newline at end of file diff --git a/ports/chmlib/extract_chmLib.vcxproj b/ports/chmlib/extract_chmLib.vcxproj deleted file mode 100644 index a4666ed64..000000000 --- a/ports/chmlib/extract_chmLib.vcxproj +++ /dev/null @@ -1,100 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - - 15.0 - {8F41248C-8E62-4822-9A85-4CAF00AACEEE} - extract_chmLib - 10.0.14393.0 - - - - Application - false - v141 - true - MultiByte - - - Application - false - v141 - true - MultiByte - - - - - - - - - - - - - - - ..\..\..\x86-windows-static-rel\ - ..\..\..\x86-windows-static-rel\$(ProjectName)\ - - - ..\..\..\x64-windows-static-rel\ - ..\..\..\x64-windows-static-rel\$(ProjectName)\ - - - - Level3 - MaxSpeed - true - true - true - false - WIN32;_CRT_SECURE_NO_WARNINGS - MultiThreaded - - - true - true - $(OutputPath)chm.lib - Console - LinkVerbose - libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib - - - - - Level3 - MaxSpeed - true - true - true - false - WIN32;_CRT_SECURE_NO_WARNINGS - MultiThreaded - - - true - true - $(OutputPath)chm.lib - Console - LinkVerbose - libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib - - - - - - - - - \ No newline at end of file diff --git a/ports/chmlib/portfile.cmake b/ports/chmlib/portfile.cmake index 60381bb1a..e6a935b9f 100644 --- a/ports/chmlib/portfile.cmake +++ b/ports/chmlib/portfile.cmake @@ -6,7 +6,7 @@ endif() set(CHMLIB_VERSION chmlib-0.40) set(CHMLIB_FILENAME ${CHMLIB_VERSION}.zip) set(CHMLIB_URL http://www.jedrea.com/chmlib/${CHMLIB_FILENAME}) -set(CHMLIB_SRC ${CURRENT_BUILDTREES_DIR}/src/${CHMLIB_VERSION}/src) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${CHMLIB_VERSION}) include(vcpkg_common_functions) vcpkg_download_distfile( @@ -17,50 +17,18 @@ vcpkg_download_distfile( ) vcpkg_extract_source_archive(${ARCHIVE}) -file(GLOB VCXPROJS "${VCPKG_ROOT_DIR}/ports/${PORT}/*.vcxproj") -file(COPY ${VCXPROJS} DESTINATION ${CHMLIB_SRC}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_build_msbuild( - PROJECT_PATH ${CHMLIB_SRC}/chm.vcxproj - RELEASE_CONFIGURATION Release - DEBUG_CONFIGURATION Debug - TARGET Build - OPTIONS /v:diagnostic +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_RELEASE -DBUILD_TOOLS=ON + OPTIONS_DEBUG -DBUILD_TOOLS=OFF ) -#enum_chmLib RELEASE only -vcpkg_build_msbuild( - PROJECT_PATH ${CHMLIB_SRC}/enum_chmLib.vcxproj - RELEASE_CONFIGURATION Release - DEBUG_CONFIGURATION Release - TARGET Build - OPTIONS /v:diagnostic -) - -#enumdir_chmLib RELEASE only -vcpkg_build_msbuild( - PROJECT_PATH ${CHMLIB_SRC}/enumdir_chmLib.vcxproj - RELEASE_CONFIGURATION Release - DEBUG_CONFIGURATION Release - TARGET Build - OPTIONS /v:diagnostic -) - -#extract_chmLib RELEASE only -vcpkg_build_msbuild( - PROJECT_PATH ${CHMLIB_SRC}/extract_chmLib.vcxproj - RELEASE_CONFIGURATION Release - DEBUG_CONFIGURATION Release - TARGET Build - OPTIONS /v:diagnostic -) +vcpkg_install_cmake() -file(INSTALL ${CHMLIB_SRC}/chm_lib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-rel/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-dbg/chm.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-rel/enum_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-rel/enumdir_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${VCPKG_TARGET_ARCHITECTURE}-windows-static-rel/extract_chmLib.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(INSTALL ${SOURCE_PATH}/src/chm_lib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/chmlib-0.40/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/chmlib) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/chmlib/COPYING ${CURRENT_PACKAGES_DIR}/share/chmlib/copyright) \ No newline at end of file +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/chmlib) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/chmlib/COPYING ${CURRENT_PACKAGES_DIR}/share/chmlib/copyright) -- cgit v1.2.3 From c7616b902bf7918d7d9702dda95c80bc6c1ca545 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 25 Feb 2018 11:37:23 -0800 Subject: [many ports] Upgrades --- ports/breakpad/CONTROL | 2 +- ports/breakpad/portfile.cmake | 4 ++-- ports/butteraugli/CONTROL | 2 +- ports/butteraugli/portfile.cmake | 4 ++-- ports/cctz/CONTROL | 2 +- ports/cctz/portfile.cmake | 4 ++-- ports/chakracore/CONTROL | 2 +- ports/chakracore/portfile.cmake | 6 +++--- ports/clara/CONTROL | 2 +- ports/clara/portfile.cmake | 4 ++-- ports/directxmesh/CONTROL | 2 +- ports/directxmesh/portfile.cmake | 17 ++--------------- ports/directxtex/CONTROL | 2 +- ports/directxtex/portfile.cmake | 19 +++---------------- ports/directxtk/CONTROL | 2 +- ports/directxtk/portfile.cmake | 41 ++++++++++++++-------------------------- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/fdk-aac/CONTROL | 2 +- ports/fdk-aac/portfile.cmake | 4 ++-- ports/freetype-gl/CONTROL | 2 +- ports/freetype-gl/portfile.cmake | 4 ++-- ports/glslang/CONTROL | 2 +- ports/glslang/portfile.cmake | 4 ++-- ports/jsonnet/CONTROL | 2 +- ports/jsonnet/portfile.cmake | 4 ++-- ports/lodepng/CONTROL | 2 +- ports/lodepng/portfile.cmake | 4 ++-- ports/luasocket/CONTROL | 2 +- ports/luasocket/portfile.cmake | 14 +++----------- ports/ms-gsl/CONTROL | 2 +- ports/ms-gsl/portfile.cmake | 4 ++-- ports/msinttypes/CONTROL | 2 +- ports/msinttypes/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/picosha2/CONTROL | 2 +- ports/picosha2/portfile.cmake | 4 ++-- ports/piex/CONTROL | 2 +- ports/piex/portfile.cmake | 4 ++-- ports/re2/CONTROL | 2 +- ports/re2/portfile.cmake | 4 ++-- ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 15 ++------------- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/tiny-dnn/CONTROL | 2 +- ports/tiny-dnn/portfile.cmake | 4 ++-- ports/unicorn-lib/CONTROL | 2 +- ports/unicorn-lib/portfile.cmake | 19 ++++--------------- ports/unicorn/CONTROL | 2 +- ports/unicorn/portfile.cmake | 4 ++-- 52 files changed, 95 insertions(+), 164 deletions(-) diff --git a/ports/breakpad/CONTROL b/ports/breakpad/CONTROL index 30001b1ee..9d3e4959c 100644 --- a/ports/breakpad/CONTROL +++ b/ports/breakpad/CONTROL @@ -1,4 +1,4 @@ Source: breakpad -Version: 2018-2-19-1 +Version: 2018-02-25 Build-Depends: libdisasm Description: a set of client and server components which implement a crash-reporting system. diff --git a/ports/breakpad/portfile.cmake b/ports/breakpad/portfile.cmake index a584e5d0b..a7b28e863 100644 --- a/ports/breakpad/portfile.cmake +++ b/ports/breakpad/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/breakpad - REF 6bb6c9b26afd9844b9e35fcaa39fb24893e7abb5 - SHA512 af96ec1383cce40d6dd14cf105ff0ff66bbc68ffd8941b9e5da9cb3462bfb100aa66debf38a759c7fa41a1847f4ff90bca73c859a5e0b18d8e73b3c8a008576f + REF 88e9a460dec52d11ce4520c54246cf5cf29f87bf + SHA512 31750e6db23c30b884af7049dc67cd30198e49a638d3e226c5ba31f562145bdfbc42f0679173cefc93df75b11af734ecf164c0d4030408e6f0ab315d60fdb30f HEAD_REF master ) diff --git a/ports/butteraugli/CONTROL b/ports/butteraugli/CONTROL index fe951714b..5d9c92dfd 100644 --- a/ports/butteraugli/CONTROL +++ b/ports/butteraugli/CONTROL @@ -1,4 +1,4 @@ Source: butteraugli -Version: 2017-09-02-8c60a2aefa19adb-1 +Version: 2018-02-25 Description: butteraugli estimates the psychovisual difference between two images Build-Depends: libpng, libjpeg-turbo diff --git a/ports/butteraugli/portfile.cmake b/ports/butteraugli/portfile.cmake index a4b6fcfdd..b6f690539 100644 --- a/ports/butteraugli/portfile.cmake +++ b/ports/butteraugli/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/butteraugli - REF 8c60a2aefa19adb40e457be5358d7cc93205c72f - SHA512 ff3d8fd952d291b51dab60cef6fa46b723c4a7b649c3df70f89c63febce865dc6a2e5f95ca165ea4424fed52a57c2d76c918eb31646c44ba34a0fa51a003c9dd + REF 856a4da68d02d30e3bf843e33536f2b3a698b249 + SHA512 f02ee97f186b59cc685a63095e5618aedbfebf08ab2cf438189fc4214c7d562506368ec210c08df236132dc2f855b6b0a6226bd6dc27c1c04e9c1b0b0ac4f1df HEAD_REF master ) diff --git a/ports/cctz/CONTROL b/ports/cctz/CONTROL index 6ed9a0ce1..be0bf9602 100644 --- a/ports/cctz/CONTROL +++ b/ports/cctz/CONTROL @@ -1,3 +1,3 @@ Source: cctz -Version: 2.1 +Version: 2.2 Description: two libraries that cooperate with to give C++ programmers all the necessary tools for computing with dates, times, and time zones in a simple and correct manner. diff --git a/ports/cctz/portfile.cmake b/ports/cctz/portfile.cmake index c0bfc9720..5760e7672 100644 --- a/ports/cctz/portfile.cmake +++ b/ports/cctz/portfile.cmake @@ -6,8 +6,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/cctz - REF v2.1 - SHA512 b6531ce64fdd8581944457cdeff7f9ff9c00958af51ddb262c74e08fcc076466c59c7bef1ce7edccc9512a7f4cb204e04581d287c4a9a684057fe39421c3fbc6 + REF v2.2 + SHA512 27a9116721a78aff4f692499a48b48ddab7210216b84cff4192414c3e769fede4018118422676981a41ccd09e517a0892d6d732ed7e347ac5e4026ae64999fa4 HEAD_REF master ) diff --git a/ports/chakracore/CONTROL b/ports/chakracore/CONTROL index b894f1d7f..4ae901a2f 100644 --- a/ports/chakracore/CONTROL +++ b/ports/chakracore/CONTROL @@ -1,3 +1,3 @@ Source: chakracore -Version: 1.7.4-1 +Version: 1.8.1 Description: Core part of the Chakra Javascript engine diff --git a/ports/chakracore/portfile.cmake b/ports/chakracore/portfile.cmake index e87b0cb86..ce5934eb1 100644 --- a/ports/chakracore/portfile.cmake +++ b/ports/chakracore/portfile.cmake @@ -1,4 +1,4 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) message(STATUS "Warning: Static building not supported yet. Building dynamic.") set(VCPKG_LIBRARY_LINKAGE dynamic) endif() @@ -10,8 +10,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/ChakraCore - REF v1.7.4 - SHA512 116ed75d3128f8d9e8ad5a12deed194e14403e05f495422b14277a31620a37b7c8324f04738947388393b0e204f7748bb81d90ebab3373a198db76b70f89f374 + REF v1.8.1 + SHA512 203eaad21130fca9ac043952327f758947d41288ce9eb771bc469e768079a39cc517f86746d85ae270b04c5b7640d18d02f497a18cda05190dfaa68fdc16cbb9 HEAD_REF master ) diff --git a/ports/clara/CONTROL b/ports/clara/CONTROL index 10aba99f3..19b8d3821 100644 --- a/ports/clara/CONTROL +++ b/ports/clara/CONTROL @@ -1,3 +1,3 @@ Source: clara -Version: 2017-07-20-9661f2b4a50895d52ebb4c59382785a2b416c310 +Version: 2018-02-25 Description: A simple to use command line parser for C++ \ No newline at end of file diff --git a/ports/clara/portfile.cmake b/ports/clara/portfile.cmake index 020d8cd87..7dc0a9234 100644 --- a/ports/clara/portfile.cmake +++ b/ports/clara/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO philsquared/Clara - REF 9661f2b4a50895d52ebb4c59382785a2b416c310 - SHA512 0de5bbef3deb2b7a93be02a407ea88ef93a3d60cea4013b80bdb8cf3805e31af1d8598cb7a8415023d7f632b106d510360c61b5df15b09f30d6c045f2add33b3 + REF a07afba39d1842aa4e43dfae95c59631185163b0 + SHA512 a2334e0f272f897ca16fedf8ffcaabd1bbfdb3f488d161bb9a9aa7b00b0bdbede0144a0a4c3261647d3b73a59db513f92384822a4cbca10501f7d6d6dca6b621 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/single_include/clara.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/directxmesh/CONTROL b/ports/directxmesh/CONTROL index 0348b1939..9ccd7156e 100644 --- a/ports/directxmesh/CONTROL +++ b/ports/directxmesh/CONTROL @@ -1,3 +1,3 @@ Source: directxmesh -Version: dec2017 +Version: feb2018 Description: DirectXMesh geometry processing library \ No newline at end of file diff --git a/ports/directxmesh/portfile.cmake b/ports/directxmesh/portfile.cmake index 26fda2210..69f335c61 100644 --- a/ports/directxmesh/portfile.cmake +++ b/ports/directxmesh/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) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -20,13 +9,11 @@ if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") message(FATAL_ERROR "DirectXMesh only supports dynamic CRT linkage") endif() -set(DIRECTXMESH_VERSION dec2017) -set(DIRECTXMESH_ARCHIVE_HASH 82468f1fcf0d51cf614921b1bd2dd06a05b120f84531d59429042951a39d1e978b5395cdf75269fe1767789ce487bfc6e544c54df4b1b9bec9adb1c853dc8497) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXMesh - REF ${DIRECTXMESH_VERSION} - SHA512 ${DIRECTXMESH_ARCHIVE_HASH} + REF feb2018 + SHA512 b5d21c8960ef9c8f2e608807ce29fd4873d0f4ad5bb0b6432f6efbb6110bfd61a16fbaab8a5c626cc1977f48923a562a618f29b9b2f112db625c0a8eb43f0422 HEAD_REF master ) diff --git a/ports/directxtex/CONTROL b/ports/directxtex/CONTROL index 57de4eea1..8d47b6302 100644 --- a/ports/directxtex/CONTROL +++ b/ports/directxtex/CONTROL @@ -1,3 +1,3 @@ Source: directxtex -Version: dec2017 +Version: feb2018b Description: DirectXTex texture processing library \ No newline at end of file diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake index c1127fea7..ec466e0d6 100644 --- a/ports/directxtex/portfile.cmake +++ b/ports/directxtex/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) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -17,16 +6,14 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) endif() if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "DirectXTex only supports dynamic CRT linkage") + message(FATAL_ERROR "DirectXTex only supports dynamic CRT linkage") endif() -set(DIRECTXTEX_VERSION dec2017) -set(DIRECTXTEX_ARCHIVE_HASH f4154c820059893ce0a42a1224d14adc0f8b54f36aa7f687f29aba0358488da9eb83cbdbf682499c5b210e99607d74209595153d4ed86eb30c43b775c5d8a72f) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTex - REF ${DIRECTXTEX_VERSION} - SHA512 ${DIRECTXTEX_ARCHIVE_HASH} + REF feb2018b + SHA512 7ab88ea863947ec279c9c83bd6dd48e15345430c750c7215c22998661fad1a711f207c57227bc5cc3cddfb5e0a89a8971d7ef3319057636e2b6f3e2e607ea0cb HEAD_REF master ) diff --git a/ports/directxtk/CONTROL b/ports/directxtk/CONTROL index 4e565f799..1861befc1 100644 --- a/ports/directxtk/CONTROL +++ b/ports/directxtk/CONTROL @@ -1,3 +1,3 @@ Source: directxtk -Version: dec2017 +Version: feb2018 Description: A collection of helper classes for writing DirectX 11.x code in C++. diff --git a/ports/directxtk/portfile.cmake b/ports/directxtk/portfile.cmake index 31fa82011..18ff47218 100644 --- a/ports/directxtk/portfile.cmake +++ b/ports/directxtk/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) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -20,48 +9,46 @@ if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") message(FATAL_ERROR "DirectXTK only supports dynamic CRT linkage") endif() -set(DIRECTXTK_VERSION dec2017) -set(DIRECTXTK_ARCHIVE_HASH 30df95c17d6d61bdeb372d3ba112995ad76753e23ddaf7fb104d2384e3b26e22a383355d2a411fdfce866d4a98205e4ed039a8f34a9e1d9bc1ee90b4064bcd15) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTK - REF ${DIRECTXTK_VERSION} - SHA512 ${DIRECTXTK_ARCHIVE_HASH} + REF feb2018 + SHA512 0f123f6fa26bf5aebd0d0b3139f655369726581c25eec24d804eebf5dc34b3e45476e8a1679bf1a294b011bf32e19c5e2a63a385ecb8774dfacee3e8833c5b9e HEAD_REF master ) IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") - SET(BUILD_ARCH "Win32") + SET(BUILD_ARCH "Win32") ELSE() - SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) + SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) ENDIF() vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/DirectXTK_Desktop_2017.sln - PLATFORM ${BUILD_ARCH} + PLATFORM ${BUILD_ARCH} ) file(INSTALL - ${SOURCE_PATH}/Bin/Desktop_2017/${BUILD_ARCH}/Release/DirectXTK.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + ${SOURCE_PATH}/Bin/Desktop_2017/${BUILD_ARCH}/Release/DirectXTK.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(INSTALL - ${SOURCE_PATH}/Bin/Desktop_2017/${BUILD_ARCH}/Debug/DirectXTK.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + ${SOURCE_PATH}/Bin/Desktop_2017/${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}) file(INSTALL - ${SOURCE_PATH}/MakeSpriteFont/bin/Release/MakeSpriteFont.exe - DESTINATION ${DXTK_TOOL_PATH}) + ${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}) + ${SOURCE_PATH}/XWBTool/Bin/Desktop_2017/${BUILD_ARCH}/Release/XWBTool.exe + DESTINATION ${DXTK_TOOL_PATH}) file(INSTALL - ${SOURCE_PATH}/Inc/ + ${SOURCE_PATH}/Inc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 087cd84e4..fbcb220c7 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99-3 +Version: 2018-02-25 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index a4f9e1b00..d193897f4 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99 - SHA512 672d5d2e823e72ed20d0d5f8f993b797a39109f99734b25db8eefdefa47e54df83d0644798ecb04891f68544e9e407a816ec6901027f14ef116f186b07043c18 + REF 28fa146d9758230ea65e2b89574095514aa50429 + SHA512 710020dd404d43edd268a9229f240222b185576d8c277884c57479d291d0f3145b6076d0225849c38ab2e618d113dbc61cd6a60d4545e2a44797a63a2f01a603 HEAD_REF master ) diff --git a/ports/fdk-aac/CONTROL b/ports/fdk-aac/CONTROL index 126a2f5a1..63456baa4 100644 --- a/ports/fdk-aac/CONTROL +++ b/ports/fdk-aac/CONTROL @@ -1,3 +1,3 @@ Source: fdk-aac -Version: 2017-11-02-1e351 +Version: 2018-02-25 Description: A standalone library of the Fraunhofer FDK AAC code diff --git a/ports/fdk-aac/portfile.cmake b/ports/fdk-aac/portfile.cmake index 7142ca795..4e533603f 100644 --- a/ports/fdk-aac/portfile.cmake +++ b/ports/fdk-aac/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mstorsjo/fdk-aac - REF 1e3515e03e2dbdbd48dacc31ef75d25c201a4c51 - SHA512 4bb0cb75fac46b30f64f5588a528f3c97d66b456fb866524018596dc79eb8b01735eb7e2bc56489127091924117a8a5f4a722dd9cc90c4caa8ad5c55e58faa40 + REF 89aeea5f292306c429550e4c9fe55d865c903600 + SHA512 0c89677b6c4f1cc056e8e0ee19c0ca79c9a35babcc8ad1a9b8d93bdfc97c54a12267a1de6e86ebede6825ea40f25b7be938495180e8bc6d4cbab7ebd2e63fcd4 HEAD_REF master ) diff --git a/ports/freetype-gl/CONTROL b/ports/freetype-gl/CONTROL index f88d6f185..ba4db5391 100644 --- a/ports/freetype-gl/CONTROL +++ b/ports/freetype-gl/CONTROL @@ -1,4 +1,4 @@ Source: freetype-gl -Version: 2017-10-9-82fb152a74f01b1483ac80d15935fbdfaf3ed836 +Version: 2018-02-25 Description: OpenGL text using one vertex buffer, one texture and FreeType Build-Depends: glew, freetype diff --git a/ports/freetype-gl/portfile.cmake b/ports/freetype-gl/portfile.cmake index 8771c15fc..c627ad43c 100644 --- a/ports/freetype-gl/portfile.cmake +++ b/ports/freetype-gl/portfile.cmake @@ -8,8 +8,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rougier/freetype-gl - REF 82fb152a74f01b1483ac80d15935fbdfaf3ed836 - SHA512 4842d9e66fd25dbb3a4e3f4bf597a0c1fc3c3c30e0cb1baae1c3306ddcb663ff9108d8fc01bde539fea7cb03a6329054f66166d9e448086358ab7b05953f5884 + REF bcd2b5fb5d19f1ea5d384d0edbdda2f6d0590fa0 + SHA512 10bd8e874598e796c3123c8bc277ecb6f5d95c924c6d6bab1bec4700864c83e2f71bf9ac45c15eadba9e150660cbe9debe3509428b10264eb6a8ba64a80f3651 HEAD_REF master ) diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL index 03668b10a..02411c5fc 100644 --- a/ports/glslang/CONTROL +++ b/ports/glslang/CONTROL @@ -1,3 +1,3 @@ Source: glslang -Version: 3a21c880500eac21cdf79bef5b80f970a55ac6af-1 +Version: 2018-02-25 Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake index e663d768d..dd7c1ecd4 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/glslang - REF 3a21c880500eac21cdf79bef5b80f970a55ac6af - SHA512 a6b2f589d432015d3830027dee377350529bec9c339a8de24aa52bab5ca52b3e17e2163d3bd1a7d91f7a08c446ebfe86d64bbbbae5a23af831d2e0cb724f7418 + REF 57f6a016f05b83f5f67d46e61771e8f69e0374db + SHA512 f855912cce4c13a42cebc973b3cb85f75d2f960c68a99dff8f768521d81130a031bc06624dde7d2a4c276c9d4e129c5655e74ab410ec20305e3204f3e1b319ce HEAD_REF master ) diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index 0254fc14c..f3fae0497 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2017-09-02-11cf9fa9f2fe8acbb14b096316006082564ca580 +Version: 2018-02-25 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 0fa1bf14d..951357fab 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF 11cf9fa9f2fe8acbb14b096316006082564ca580 - SHA512 77d9c9e86c4c6501a00f089c72dea522dd818ac0c810b603d18bea111f8f8cf9a25039600a9ba158c5f02142e24d49074e7fe0ddf113665eedf4c3ef66bf421a + REF 8606e21dfb599f838890944c6d96d9aa7c70b8c1 + SHA512 955a801a0e50c71a8e7f79cb432496ff23c0769ea5bb17c8dbda8f88d0936d8c3c1213c219641982d606c91adcc48c4354ff02b759f21202831a23ca584d3f0b HEAD_REF master ) diff --git a/ports/lodepng/CONTROL b/ports/lodepng/CONTROL index 230e27252..12a944ab5 100644 --- a/ports/lodepng/CONTROL +++ b/ports/lodepng/CONTROL @@ -1,3 +1,3 @@ Source: lodepng -Version: 2017-09-01-8a0f16afe74a6a-1 +Version: 2018-02-25 Description: PNG encoder and decoder in C and C++ diff --git a/ports/lodepng/portfile.cmake b/ports/lodepng/portfile.cmake index 8611d5ea3..4fa423a0a 100644 --- a/ports/lodepng/portfile.cmake +++ b/ports/lodepng/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lvandeve/lodepng - REF 8a0f16afe74a6abf85e3b45e9558283022021a59 - SHA512 189dde0a0982822b6dfc3f886d8035338ed200958eed8394c5c64aa97ddcf758b3989beae14ce8f26a78efa9fb4b94932bb02b41cacd62bd62a46ebf9b324def + REF 116f5b2ed7c4a9c6779ae291b79770727cbb11ad + SHA512 746528e4cb4c8678a91f607ff7c2d61f651a19ef1efcd4694deb0d2191970674de7e13331004f7702b31a335474cf71364c8da0fdc7c75852db3cb896f00a375 HEAD_REF master ) diff --git a/ports/luasocket/CONTROL b/ports/luasocket/CONTROL index 09d6fabeb..3eeada1ca 100644 --- a/ports/luasocket/CONTROL +++ b/ports/luasocket/CONTROL @@ -1,4 +1,4 @@ Source: luasocket -Version: 2017.05.25.5a17f79b0301f0a1b4c7f1c73388757a7e2ed309 +Version: 2018-02-25 Description: LuaSocket is a Lua extension library that is composed by two parts: a C core that provides support for the TCP and UDP transport layers, and a set of Lua modules that add support for functionality commonly needed by applications that deal with the Internet. Build-Depends: lua diff --git a/ports/luasocket/portfile.cmake b/ports/luasocket/portfile.cmake index 48ac43168..831cd1b5e 100644 --- a/ports/luasocket/portfile.cmake +++ b/ports/luasocket/portfile.cmake @@ -1,26 +1,18 @@ include(vcpkg_common_functions) -set(LUASOCKET_VERSION 2017.05.25.5a17f79b0301f0a1b4c7f1c73388757a7e2ed309) -set(LUASOCKET_REVISION 5a17f79b0301f0a1b4c7f1c73388757a7e2ed309) -set(LUASOCKET_HASH 82a827956d992c7d67a3e9aed18db0cdce34f32e5b49c44976c1d19cb96ff1c10121abb2130d306cf51125fdc5eb3be0cc491a3862e5a8fde3d944ba3b4a94b7) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/luasocket-${LUASOCKET_VERSION}) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO diegonehab/luasocket - REF ${LUASOCKET_REVISION} - SHA512 ${LUASOCKET_HASH} + REF 652959890943c34d7180cae372339b91e62f0d7b + SHA512 8666e3dec0a3a0429e59a66c79b167f88b05a2a0b2c7f5456754cb5c505bcf8c39c4d358880a2f78a488ad07bee4e6e5b9a6a63c2affcee788091dee15ed2f6a HEAD_REF master) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH}) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS) +) vcpkg_install_cmake() vcpkg_copy_pdbs() diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL index f9ab0c433..3c1eada28 100644 --- a/ports/ms-gsl/CONTROL +++ b/ports/ms-gsl/CONTROL @@ -1,3 +1,3 @@ Source: ms-gsl -Version: 20171204-9d65e74400976b3509833f49b16d401600c7317d +Version: 2018-02-25 Description: Microsoft implementation of the Guidelines Support Library \ No newline at end of file diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index a85f91611..fb334451f 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/GSL - REF 9d65e74400976b3509833f49b16d401600c7317d - SHA512 36f1b0dba5b724c5ef437b07a9141f2bb2e8b059f968736e2c6d7cd5c50d5701a109df40e35f971ff8c225901560dd8783458d1f2fe56065c4cd85465cf5a527 + REF 7eb8f41af544941c712916dc0cb2c6c6ef7768ac + SHA512 3ff9135f30f41a254728f312ca447cb574ffab5073ead29ec64c1b10b86da23e1f8bc3c67f67061793c814cd4068cdae95a64348a7de72d757be84757f699589 HEAD_REF master ) diff --git a/ports/msinttypes/CONTROL b/ports/msinttypes/CONTROL index a7ed816ee..8b9840e0b 100644 --- a/ports/msinttypes/CONTROL +++ b/ports/msinttypes/CONTROL @@ -1,3 +1,3 @@ Source: msinttypes -Version: 2017-06-26-f9e7c5758ed9e3b9f4b2394de1881c704dd79de0 +Version: 2018-02-25 Description: msinttypes is a package to provide missing ISO C9x compliant headers for Microsoft Visual Studio diff --git a/ports/msinttypes/portfile.cmake b/ports/msinttypes/portfile.cmake index 63fbd05eb..9393ea5f9 100644 --- a/ports/msinttypes/portfile.cmake +++ b/ports/msinttypes/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO chemeris/msinttypes - REF 7636cabe55318824dc702d15b69711f5d7c30250 - SHA512 1c3c350d12c6b69e1cb6469f742afc126d50fd92e137ecacdb8367e320350cd42d7d41fbb0aa38d6a13aefbef5308f9ec89825e9b80a932f552a889f63b35cb2 + REF f9e7c5758ed9e3b9f4b2394de1881c704dd79de0 + SHA512 943ccb1245e41ad554908fd7664725f2aac929222bd823b375fbd2e8a4c4ffc42c268543c43a817b65dca047c3253d04527378ec3902e5e7df7f6ba5a736d6f3 HEAD_REF master ) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index 45dab49d2..9da44de0d 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2017-06-15-5c7194c2fe2c68c1a8212712c0b4b6195382d27d +Version: 2018-02-25 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index 907d8d2a9..fbabb5cfd 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF 5c7194c2fe2c68c1a8212712c0b4b6195382d27d - SHA512 85d8255071fb42d0a521d8d34ac579dbaa5800e96d156fa42e4ee971f1d92ea51ef3a69a166f03f3cf66b086c452892cc29457bbe4aea599c918649e87e84c38 + REF 45193dc6ddf1473b6e37dfd6b0c1813d5b52e09b + SHA512 f02c1b3b9eeea1a257a43006ec90159d6a8aa830d506133281fd52f9be1bcfef6b0f3ecad7dbad8a7480e4ae530a502b5bf8a50d51892b948f0a814103e66069 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/picosha2/CONTROL b/ports/picosha2/CONTROL index 3aa5919a4..468daffce 100644 --- a/ports/picosha2/CONTROL +++ b/ports/picosha2/CONTROL @@ -1,3 +1,3 @@ Source: picosha2 -Version: 2017-09-01-c5ff159b6 +Version: 2018-02-25 Description: PicoSHA2 - a C++ SHA256 hash generator diff --git a/ports/picosha2/portfile.cmake b/ports/picosha2/portfile.cmake index 2ce820928..093707258 100644 --- a/ports/picosha2/portfile.cmake +++ b/ports/picosha2/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO okdshin/PicoSHA2 - REF c5ff159b60a7755f5601a18cf9c25388ad25e0ef - SHA512 8fa4045d73a921bbb9bf6de96e80272e1d54a52ddb8f7d05643785a3b582e8f7a069ccf901352af26db7788863717c0553f086f69578835d6a0512f0be04bae3 + REF 77b1e29e94b3a131f202e69d35eafe709ae8e587 + SHA512 b3b11f56bc31734c899d417f10f9d44ea7f384191e147973269f9518fe1d5139f8c580d6c3d70ff5376ae80025c9dbf0956bbcd3b3455d87d26fa17174a2dbe2 HEAD_REF master ) diff --git a/ports/piex/CONTROL b/ports/piex/CONTROL index 2311bbbaf..946ca9418 100644 --- a/ports/piex/CONTROL +++ b/ports/piex/CONTROL @@ -1,3 +1,3 @@ Source: piex -Version: 2017-09-01-473434f2dd974978b-1 +Version: 2018-02-25 Description: The Preview Image Extractor (PIEX) is designed to find and extract the largest diff --git a/ports/piex/portfile.cmake b/ports/piex/portfile.cmake index 2c99ad1c7..94b7e9494 100644 --- a/ports/piex/portfile.cmake +++ b/ports/piex/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/piex - REF 473434f2dd974978b329faf5c87ae8aa09a2714d - SHA512 cb4a4107eb5e880673accac0f19965f3318e5e4c2fc24724afef5d15eab40d5866e17eb1a23af3b06b729d0e898ed99a6407d1f3000e94e3bbd71e1952d19627 + REF 938f8b6e49ae43b062f76aad968ff76f5f33c965 + SHA512 abe145f29d210b03eb4340a506cd3e061a9ffe69217f916310308c6c8095ebe3229fb969a4403d1ca06375c8c87e78db8bceee89f7963116f80acdce463c556b HEAD_REF master ) diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL index 89cb6a1a0..2b911b19c 100644 --- a/ports/re2/CONTROL +++ b/ports/re2/CONTROL @@ -1,3 +1,3 @@ Source: re2 -Version: 2017-12-01-1 +Version: 2018-02-25 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 diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake index bc9544db1..39a3d59a2 100644 --- a/ports/re2/portfile.cmake +++ b/ports/re2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/re2 - REF 2017-12-01 - SHA512 1943be4543ac6cedaef27202e126bddc57472926c2f28470c5e980902252d58e18bb4578c538883d9368a041e4928983fa27cd960c3671fe3b6366dbd5048b29 + REF bb093f12a450e4ce2be6bacadff01495cb17eab4 + SHA512 42912068da6acfec33a417d68ad08d44b73f04f542660c6a44b25c5bc5cbece3c9f14a02271072ee47a695d4a5d813acda460c40899f37cf0ecaa220295d5bf3 HEAD_REF master ) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index f19aa7914..880c2fa3a 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: commit-1ed2dadbda3977b13e5e83cc1f3eeca76b36ebe5 +Version: 2018-02-25 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index 78ad34335..50acc7d08 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -1,21 +1,10 @@ -# 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 CaptainCrowbar/rs-core-lib - REF 1ed2dadbda3977b13e5e83cc1f3eeca76b36ebe5 - SHA512 f84803fdd26f36b2a3748b9668253f058376e19740bc85e009726142b0b1f5906423729d9b71b224a995869a428a7e1e7b1f8afae897d416d9dfc1708b41975a + REF 971a8ca63bee277ef9826449c9da6233186f54f1 + SHA512 a6ef5ff35684c71e19e10af32d8149c3b80dd26a0f81193f336842ec9f220e0bc249a223066076f0d43c06a540e27c7bc3f3e58bf253672084b917fba2c7cbd9 HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index ec00292b5..423a3a5e6 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 20172805-72ca60debae1d9fb35d9f0085118873669006d7f-2 +Version: 2018-02-25 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index cae46e01c..64ea7a5fd 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 72ca60debae1d9fb35d9f0085118873669006d7f - SHA512 65023690ff04376e9e64c3e9a609640a6416a39a08bb26d31ec8799ec462bbf8631620edf9a10cdf13980b13813304263601598258cf27bbd5027f9f755c49fa + REF d907cc92db5b93e699a4282e979d097ea863215a + SHA512 3ca6000b7dfef0ccd9e0dc729d15e0acd56a058216550fe93351e4eefd8a55a9f075a02aaf9699d66cc14fa864550e7eb1cae806070d60722bb7b247036c5187 HEAD_REF master ) diff --git a/ports/tiny-dnn/CONTROL b/ports/tiny-dnn/CONTROL index f12cc076f..bb16f127a 100644 --- a/ports/tiny-dnn/CONTROL +++ b/ports/tiny-dnn/CONTROL @@ -1,3 +1,3 @@ Source: tiny-dnn -Version: 2017-10-09-dd906fed8c8aff8dc837657c42f9d55f8b793b0e +Version: 2018-02-25 Description: A C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource. diff --git a/ports/tiny-dnn/portfile.cmake b/ports/tiny-dnn/portfile.cmake index 7e3baa92a..7357eb7c8 100644 --- a/ports/tiny-dnn/portfile.cmake +++ b/ports/tiny-dnn/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tiny-dnn/tiny-dnn - REF dd906fed8c8aff8dc837657c42f9d55f8b793b0e - SHA512 d853db7f49af1bece55337b93631c41191f3abd8287969f230330662fecc612e4e53ab789535fc6f9770ae0c8623d8e020e6036c2c804783d08f176a08c05d1b + REF 17cb7ae1d130feda9a1612608ac0677cc3254bf8 + SHA512 fbd3cf94b393a4f2aacb0770b5611681b6445f0e16905435c2ec597cfc1c37e3ba7af8bb3b43146e0b2b6cd0fe4df17040f4d72dfb1d4aa50d6310350f655a46 HEAD_REF master ) diff --git a/ports/unicorn-lib/CONTROL b/ports/unicorn-lib/CONTROL index ac8a96114..23967af57 100644 --- a/ports/unicorn-lib/CONTROL +++ b/ports/unicorn-lib/CONTROL @@ -1,4 +1,4 @@ Source: unicorn-lib -Version: commit-3ffa7fe69a1d0c37fb52a4af61380c5fd84fa5aa +Version: 2018-02-25 Description: Unicode library for C++ by Ross Smith Build-Depends: rs-core-lib, pcre, zlib, libiconv diff --git a/ports/unicorn-lib/portfile.cmake b/ports/unicorn-lib/portfile.cmake index 5067bcf8c..46a7fc67c 100644 --- a/ports/unicorn-lib/portfile.cmake +++ b/ports/unicorn-lib/portfile.cmake @@ -1,21 +1,10 @@ -# 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 CaptainCrowbar/unicorn-lib - REF 3ffa7fe69a1d0c37fb52a4af61380c5fd84fa5aa - SHA512 5e942cf111746ef430c8a3488e7f2e554fa374ff16111439274dec376396a950e49bf816a10d6a8d97d6008edbd14350568d00664f15c1a0bd09c93450ed0554 + REF 1ee9ca81e62c1916a08522523ca21a46a5005ad5 + SHA512 b61f8b993d46e4750ccb14aa98dee3b9f3d9de54d2dfa60af4fabb338f04348c450089fa331e7d63342698f39168d660452fb49fb707c1a6647553ec494355bb HEAD_REF master ) @@ -23,8 +12,8 @@ file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS_DEBUG - -DUNICORN_LIB_SKIP_HEADERS=ON + OPTIONS_DEBUG + -DUNICORN_LIB_SKIP_HEADERS=ON ) vcpkg_install_cmake() diff --git a/ports/unicorn/CONTROL b/ports/unicorn/CONTROL index d60ab9f78..f1856bac6 100644 --- a/ports/unicorn/CONTROL +++ b/ports/unicorn/CONTROL @@ -1,3 +1,3 @@ Source: unicorn -Version: 2017-12-06-bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4-1 +Version: 2018-02-25 Description: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework diff --git a/ports/unicorn/portfile.cmake b/ports/unicorn/portfile.cmake index d64b2bf4d..66ba738c0 100644 --- a/ports/unicorn/portfile.cmake +++ b/ports/unicorn/portfile.cmake @@ -14,8 +14,8 @@ set(VCPKG_CRT_LINKAGE "static") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO unicorn-engine/unicorn - REF bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4 - SHA512 43694c7dfb0783c1d64236a286b929c9d0eea9d8e18146ad4fb36d7e4faf719e179d7ee36b43e568e4fce779b0f660ed9c1fb417793d6019923cae9538c9355e + REF dab5060005facc38ef6500496ae7f7bd90e4fdb7 + SHA512 42b656a9d6b8091aaed5729658d7dd94064a9c9c43ad33ca474917b0830b760ee81a37a6eec84848d8aa6784d01568649f036383a8953c3e1de2616b053c682e HEAD_REF master ) -- cgit v1.2.3 From ebdb41039450383ec7f41bd5f589cc46b7fd6a59 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Feb 2018 18:18:05 -0800 Subject: [everything] Use -text to ensure consistent files across machines. If you experience trouble, you can use the following to renormalize your local working directory: git add --renormalize . git reset . git checkout . --- .gitattributes | 5 +- toolsrc/vcpkg.sln | 216 +++---- toolsrc/vcpkg/vcpkg.vcxproj | 292 ++++----- toolsrc/vcpkg/vcpkg.vcxproj.filters | 52 +- toolsrc/vcpkglib/vcpkglib.vcxproj | 508 +++++++-------- toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 694 ++++++++++----------- .../vcpkgmetricsuploader.vcxproj | 286 ++++----- .../vcpkgmetricsuploader.vcxproj.filters | 42 +- toolsrc/vcpkgtest/vcpkgtest.vcxproj | 374 +++++------ toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters | 112 ++-- 10 files changed, 1289 insertions(+), 1292 deletions(-) diff --git a/.gitattributes b/.gitattributes index a83b236d4..fa1385d99 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1 @@ -*.patch text eol=lf -*.vcxproj text eol=crlf -*.vcxproj.filters text eol=crlf -*.sln text eol=crlf \ No newline at end of file +* -text diff --git a/toolsrc/vcpkg.sln b/toolsrc/vcpkg.sln index 6c429cff9..eae73a760 100644 --- a/toolsrc/vcpkg.sln +++ b/toolsrc/vcpkg.sln @@ -1,108 +1,108 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcpkg", "vcpkg\vcpkg.vcxproj", "{34671B80-54F9-46F5-8310-AC429C11D4FB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcpkglib", "vcpkglib\vcpkglib.vcxproj", "{B98C92B7-2874-4537-9D46-D14E5C237F04}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcpkgmetricsuploader", "vcpkgmetricsuploader\vcpkgmetricsuploader.vcxproj", "{7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcpkgtest", "vcpkgtest\vcpkgtest.vcxproj", "{F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F5893B21-EA71-4432-84D6-5FB0E0461A2A}" - ProjectSection(SolutionItems) = preProject - ..\scripts\bootstrap.ps1 = ..\scripts\bootstrap.ps1 - ..\scripts\fetchDependency.ps1 = ..\scripts\fetchDependency.ps1 - ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1 = ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1 - ..\scripts\findVisualStudioInstallationInstances.ps1 = ..\scripts\findVisualStudioInstallationInstances.ps1 - ..\scripts\get_triplet_environment.cmake = ..\scripts\get_triplet_environment.cmake - ..\scripts\getProgramFiles32bit.ps1 = ..\scripts\getProgramFiles32bit.ps1 - ..\scripts\getProgramFilesPlatformBitness.ps1 = ..\scripts\getProgramFilesPlatformBitness.ps1 - ..\scripts\getWindowsSDK.ps1 = ..\scripts\getWindowsSDK.ps1 - ..\scripts\internalCI.ps1 = ..\scripts\internalCI.ps1 - ..\scripts\ports.cmake = ..\scripts\ports.cmake - ..\scripts\SHA256Hash.ps1 = ..\scripts\SHA256Hash.ps1 - ..\scripts\VcpkgPowershellUtils.ps1 = ..\scripts\VcpkgPowershellUtils.ps1 - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cmake", "cmake", "{A0122231-04D5-420B-81CA-7960946E5E65}" - ProjectSection(SolutionItems) = preProject - ..\scripts\cmake\vcpkg_acquire_msys.cmake = ..\scripts\cmake\vcpkg_acquire_msys.cmake - ..\scripts\cmake\vcpkg_apply_patches.cmake = ..\scripts\cmake\vcpkg_apply_patches.cmake - ..\scripts\cmake\vcpkg_build_cmake.cmake = ..\scripts\cmake\vcpkg_build_cmake.cmake - ..\scripts\cmake\vcpkg_build_msbuild.cmake = ..\scripts\cmake\vcpkg_build_msbuild.cmake - ..\scripts\cmake\vcpkg_build_qmake.cmake = ..\scripts\cmake\vcpkg_build_qmake.cmake - ..\scripts\cmake\vcpkg_common_functions.cmake = ..\scripts\cmake\vcpkg_common_functions.cmake - ..\scripts\cmake\vcpkg_configure_cmake.cmake = ..\scripts\cmake\vcpkg_configure_cmake.cmake - ..\scripts\cmake\vcpkg_configure_meson.cmake = ..\scripts\cmake\vcpkg_configure_meson.cmake - ..\scripts\cmake\vcpkg_configure_qmake.cmake = ..\scripts\cmake\vcpkg_configure_qmake.cmake - ..\scripts\cmake\vcpkg_copy_pdbs.cmake = ..\scripts\cmake\vcpkg_copy_pdbs.cmake - ..\scripts\cmake\vcpkg_copy_tool_dependencies.cmake = ..\scripts\cmake\vcpkg_copy_tool_dependencies.cmake - ..\scripts\cmake\vcpkg_download_distfile.cmake = ..\scripts\cmake\vcpkg_download_distfile.cmake - ..\scripts\cmake\vcpkg_execute_required_process.cmake = ..\scripts\cmake\vcpkg_execute_required_process.cmake - ..\scripts\cmake\vcpkg_execute_required_process_repeat.cmake = ..\scripts\cmake\vcpkg_execute_required_process_repeat.cmake - ..\scripts\cmake\vcpkg_extract_source_archive.cmake = ..\scripts\cmake\vcpkg_extract_source_archive.cmake - ..\scripts\cmake\vcpkg_find_acquire_program.cmake = ..\scripts\cmake\vcpkg_find_acquire_program.cmake - ..\scripts\cmake\vcpkg_fixup_cmake_targets.cmake = ..\scripts\cmake\vcpkg_fixup_cmake_targets.cmake - ..\scripts\cmake\vcpkg_from_bitbucket.cmake = ..\scripts\cmake\vcpkg_from_bitbucket.cmake - ..\scripts\cmake\vcpkg_from_github.cmake = ..\scripts\cmake\vcpkg_from_github.cmake - ..\scripts\cmake\vcpkg_get_program_files_32_bit.cmake = ..\scripts\cmake\vcpkg_get_program_files_32_bit.cmake - ..\scripts\cmake\vcpkg_get_program_files_platform_bitness.cmake = ..\scripts\cmake\vcpkg_get_program_files_platform_bitness.cmake - ..\scripts\cmake\vcpkg_get_windows_sdk.cmake = ..\scripts\cmake\vcpkg_get_windows_sdk.cmake - ..\scripts\cmake\vcpkg_install_cmake.cmake = ..\scripts\cmake\vcpkg_install_cmake.cmake - ..\scripts\cmake\vcpkg_install_meson.cmake = ..\scripts\cmake\vcpkg_install_meson.cmake - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {34671B80-54F9-46F5-8310-AC429C11D4FB}.Debug|x64.ActiveCfg = Debug|x64 - {34671B80-54F9-46F5-8310-AC429C11D4FB}.Debug|x64.Build.0 = Debug|x64 - {34671B80-54F9-46F5-8310-AC429C11D4FB}.Debug|x86.ActiveCfg = Debug|Win32 - {34671B80-54F9-46F5-8310-AC429C11D4FB}.Debug|x86.Build.0 = Debug|Win32 - {34671B80-54F9-46F5-8310-AC429C11D4FB}.Release|x64.ActiveCfg = Release|x64 - {34671B80-54F9-46F5-8310-AC429C11D4FB}.Release|x64.Build.0 = Release|x64 - {34671B80-54F9-46F5-8310-AC429C11D4FB}.Release|x86.ActiveCfg = Release|Win32 - {34671B80-54F9-46F5-8310-AC429C11D4FB}.Release|x86.Build.0 = Release|Win32 - {B98C92B7-2874-4537-9D46-D14E5C237F04}.Debug|x64.ActiveCfg = Debug|x64 - {B98C92B7-2874-4537-9D46-D14E5C237F04}.Debug|x64.Build.0 = Debug|x64 - {B98C92B7-2874-4537-9D46-D14E5C237F04}.Debug|x86.ActiveCfg = Debug|Win32 - {B98C92B7-2874-4537-9D46-D14E5C237F04}.Debug|x86.Build.0 = Debug|Win32 - {B98C92B7-2874-4537-9D46-D14E5C237F04}.Release|x64.ActiveCfg = Release|x64 - {B98C92B7-2874-4537-9D46-D14E5C237F04}.Release|x64.Build.0 = Release|x64 - {B98C92B7-2874-4537-9D46-D14E5C237F04}.Release|x86.ActiveCfg = Release|Win32 - {B98C92B7-2874-4537-9D46-D14E5C237F04}.Release|x86.Build.0 = Release|Win32 - {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Debug|x64.ActiveCfg = Debug|x64 - {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Debug|x64.Build.0 = Debug|x64 - {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Debug|x86.ActiveCfg = Debug|Win32 - {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Debug|x86.Build.0 = Debug|Win32 - {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Release|x64.ActiveCfg = Release|x64 - {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Release|x64.Build.0 = Release|x64 - {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Release|x86.ActiveCfg = Release|Win32 - {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Release|x86.Build.0 = Release|Win32 - {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Debug|x64.ActiveCfg = Debug|x64 - {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Debug|x64.Build.0 = Debug|x64 - {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Debug|x86.ActiveCfg = Debug|Win32 - {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Debug|x86.Build.0 = Debug|Win32 - {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Release|x64.ActiveCfg = Release|x64 - {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Release|x64.Build.0 = Release|x64 - {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Release|x86.ActiveCfg = Release|Win32 - {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {A0122231-04D5-420B-81CA-7960946E5E65} = {F5893B21-EA71-4432-84D6-5FB0E0461A2A} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {DEDCC7AF-0FE6-4387-9FFE-495D6C1AEE1B} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcpkg", "vcpkg\vcpkg.vcxproj", "{34671B80-54F9-46F5-8310-AC429C11D4FB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcpkglib", "vcpkglib\vcpkglib.vcxproj", "{B98C92B7-2874-4537-9D46-D14E5C237F04}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcpkgmetricsuploader", "vcpkgmetricsuploader\vcpkgmetricsuploader.vcxproj", "{7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vcpkgtest", "vcpkgtest\vcpkgtest.vcxproj", "{F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F5893B21-EA71-4432-84D6-5FB0E0461A2A}" + ProjectSection(SolutionItems) = preProject + ..\scripts\bootstrap.ps1 = ..\scripts\bootstrap.ps1 + ..\scripts\fetchDependency.ps1 = ..\scripts\fetchDependency.ps1 + ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1 = ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1 + ..\scripts\findVisualStudioInstallationInstances.ps1 = ..\scripts\findVisualStudioInstallationInstances.ps1 + ..\scripts\get_triplet_environment.cmake = ..\scripts\get_triplet_environment.cmake + ..\scripts\getProgramFiles32bit.ps1 = ..\scripts\getProgramFiles32bit.ps1 + ..\scripts\getProgramFilesPlatformBitness.ps1 = ..\scripts\getProgramFilesPlatformBitness.ps1 + ..\scripts\getWindowsSDK.ps1 = ..\scripts\getWindowsSDK.ps1 + ..\scripts\internalCI.ps1 = ..\scripts\internalCI.ps1 + ..\scripts\ports.cmake = ..\scripts\ports.cmake + ..\scripts\SHA256Hash.ps1 = ..\scripts\SHA256Hash.ps1 + ..\scripts\VcpkgPowershellUtils.ps1 = ..\scripts\VcpkgPowershellUtils.ps1 + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cmake", "cmake", "{A0122231-04D5-420B-81CA-7960946E5E65}" + ProjectSection(SolutionItems) = preProject + ..\scripts\cmake\vcpkg_acquire_msys.cmake = ..\scripts\cmake\vcpkg_acquire_msys.cmake + ..\scripts\cmake\vcpkg_apply_patches.cmake = ..\scripts\cmake\vcpkg_apply_patches.cmake + ..\scripts\cmake\vcpkg_build_cmake.cmake = ..\scripts\cmake\vcpkg_build_cmake.cmake + ..\scripts\cmake\vcpkg_build_msbuild.cmake = ..\scripts\cmake\vcpkg_build_msbuild.cmake + ..\scripts\cmake\vcpkg_build_qmake.cmake = ..\scripts\cmake\vcpkg_build_qmake.cmake + ..\scripts\cmake\vcpkg_common_functions.cmake = ..\scripts\cmake\vcpkg_common_functions.cmake + ..\scripts\cmake\vcpkg_configure_cmake.cmake = ..\scripts\cmake\vcpkg_configure_cmake.cmake + ..\scripts\cmake\vcpkg_configure_meson.cmake = ..\scripts\cmake\vcpkg_configure_meson.cmake + ..\scripts\cmake\vcpkg_configure_qmake.cmake = ..\scripts\cmake\vcpkg_configure_qmake.cmake + ..\scripts\cmake\vcpkg_copy_pdbs.cmake = ..\scripts\cmake\vcpkg_copy_pdbs.cmake + ..\scripts\cmake\vcpkg_copy_tool_dependencies.cmake = ..\scripts\cmake\vcpkg_copy_tool_dependencies.cmake + ..\scripts\cmake\vcpkg_download_distfile.cmake = ..\scripts\cmake\vcpkg_download_distfile.cmake + ..\scripts\cmake\vcpkg_execute_required_process.cmake = ..\scripts\cmake\vcpkg_execute_required_process.cmake + ..\scripts\cmake\vcpkg_execute_required_process_repeat.cmake = ..\scripts\cmake\vcpkg_execute_required_process_repeat.cmake + ..\scripts\cmake\vcpkg_extract_source_archive.cmake = ..\scripts\cmake\vcpkg_extract_source_archive.cmake + ..\scripts\cmake\vcpkg_find_acquire_program.cmake = ..\scripts\cmake\vcpkg_find_acquire_program.cmake + ..\scripts\cmake\vcpkg_fixup_cmake_targets.cmake = ..\scripts\cmake\vcpkg_fixup_cmake_targets.cmake + ..\scripts\cmake\vcpkg_from_bitbucket.cmake = ..\scripts\cmake\vcpkg_from_bitbucket.cmake + ..\scripts\cmake\vcpkg_from_github.cmake = ..\scripts\cmake\vcpkg_from_github.cmake + ..\scripts\cmake\vcpkg_get_program_files_32_bit.cmake = ..\scripts\cmake\vcpkg_get_program_files_32_bit.cmake + ..\scripts\cmake\vcpkg_get_program_files_platform_bitness.cmake = ..\scripts\cmake\vcpkg_get_program_files_platform_bitness.cmake + ..\scripts\cmake\vcpkg_get_windows_sdk.cmake = ..\scripts\cmake\vcpkg_get_windows_sdk.cmake + ..\scripts\cmake\vcpkg_install_cmake.cmake = ..\scripts\cmake\vcpkg_install_cmake.cmake + ..\scripts\cmake\vcpkg_install_meson.cmake = ..\scripts\cmake\vcpkg_install_meson.cmake + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {34671B80-54F9-46F5-8310-AC429C11D4FB}.Debug|x64.ActiveCfg = Debug|x64 + {34671B80-54F9-46F5-8310-AC429C11D4FB}.Debug|x64.Build.0 = Debug|x64 + {34671B80-54F9-46F5-8310-AC429C11D4FB}.Debug|x86.ActiveCfg = Debug|Win32 + {34671B80-54F9-46F5-8310-AC429C11D4FB}.Debug|x86.Build.0 = Debug|Win32 + {34671B80-54F9-46F5-8310-AC429C11D4FB}.Release|x64.ActiveCfg = Release|x64 + {34671B80-54F9-46F5-8310-AC429C11D4FB}.Release|x64.Build.0 = Release|x64 + {34671B80-54F9-46F5-8310-AC429C11D4FB}.Release|x86.ActiveCfg = Release|Win32 + {34671B80-54F9-46F5-8310-AC429C11D4FB}.Release|x86.Build.0 = Release|Win32 + {B98C92B7-2874-4537-9D46-D14E5C237F04}.Debug|x64.ActiveCfg = Debug|x64 + {B98C92B7-2874-4537-9D46-D14E5C237F04}.Debug|x64.Build.0 = Debug|x64 + {B98C92B7-2874-4537-9D46-D14E5C237F04}.Debug|x86.ActiveCfg = Debug|Win32 + {B98C92B7-2874-4537-9D46-D14E5C237F04}.Debug|x86.Build.0 = Debug|Win32 + {B98C92B7-2874-4537-9D46-D14E5C237F04}.Release|x64.ActiveCfg = Release|x64 + {B98C92B7-2874-4537-9D46-D14E5C237F04}.Release|x64.Build.0 = Release|x64 + {B98C92B7-2874-4537-9D46-D14E5C237F04}.Release|x86.ActiveCfg = Release|Win32 + {B98C92B7-2874-4537-9D46-D14E5C237F04}.Release|x86.Build.0 = Release|Win32 + {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Debug|x64.ActiveCfg = Debug|x64 + {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Debug|x64.Build.0 = Debug|x64 + {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Debug|x86.ActiveCfg = Debug|Win32 + {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Debug|x86.Build.0 = Debug|Win32 + {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Release|x64.ActiveCfg = Release|x64 + {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Release|x64.Build.0 = Release|x64 + {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Release|x86.ActiveCfg = Release|Win32 + {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE}.Release|x86.Build.0 = Release|Win32 + {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Debug|x64.ActiveCfg = Debug|x64 + {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Debug|x64.Build.0 = Debug|x64 + {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Debug|x86.ActiveCfg = Debug|Win32 + {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Debug|x86.Build.0 = Debug|Win32 + {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Release|x64.ActiveCfg = Release|x64 + {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Release|x64.Build.0 = Release|x64 + {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Release|x86.ActiveCfg = Release|Win32 + {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {A0122231-04D5-420B-81CA-7960946E5E65} = {F5893B21-EA71-4432-84D6-5FB0E0461A2A} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DEDCC7AF-0FE6-4387-9FFE-495D6C1AEE1B} + EndGlobalSection +EndGlobal diff --git a/toolsrc/vcpkg/vcpkg.vcxproj b/toolsrc/vcpkg/vcpkg.vcxproj index d15e8dd44..4def6a74b 100644 --- a/toolsrc/vcpkg/vcpkg.vcxproj +++ b/toolsrc/vcpkg/vcpkg.vcxproj @@ -1,147 +1,147 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {34671B80-54F9-46F5-8310-AC429C11D4FB} - vcpkg - 8.1 - v140 - - - - Application - true - MultiByte - - - Application - false - true - MultiByte - - - Application - true - MultiByte - - - Application - false - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - Level4 - Disabled - true - ..\include - /std:c++latest %(AdditionalOptions) - true - false - - - winhttp.lib;version.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) - - - - - Level4 - Disabled - true - ..\include - /std:c++latest %(AdditionalOptions) - true - false - - - winhttp.lib;version.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) - - - - - Level3 - MaxSpeed - true - true - true - ..\include - _MBCS;NDEBUG;%(PreprocessorDefinitions) - /std:c++latest %(AdditionalOptions) - true - - - true - true - winhttp.lib;version.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) - - - - - Level3 - MaxSpeed - true - true - true - ..\include - _MBCS;NDEBUG;%(PreprocessorDefinitions) - /std:c++latest %(AdditionalOptions) - true - - - true - true - winhttp.lib;version.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) - - - - - {b98c92b7-2874-4537-9d46-d14e5c237f04} - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {34671B80-54F9-46F5-8310-AC429C11D4FB} + vcpkg + 8.1 + v140 + + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level4 + Disabled + true + ..\include + /std:c++latest %(AdditionalOptions) + true + false + + + winhttp.lib;version.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) + + + + + Level4 + Disabled + true + ..\include + /std:c++latest %(AdditionalOptions) + true + false + + + winhttp.lib;version.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) + + + + + Level3 + MaxSpeed + true + true + true + ..\include + _MBCS;NDEBUG;%(PreprocessorDefinitions) + /std:c++latest %(AdditionalOptions) + true + + + true + true + winhttp.lib;version.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) + + + + + Level3 + MaxSpeed + true + true + true + ..\include + _MBCS;NDEBUG;%(PreprocessorDefinitions) + /std:c++latest %(AdditionalOptions) + true + + + true + true + winhttp.lib;version.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) + + + + + {b98c92b7-2874-4537-9d46-d14e5c237f04} + + + + + + + + + + + \ No newline at end of file diff --git a/toolsrc/vcpkg/vcpkg.vcxproj.filters b/toolsrc/vcpkg/vcpkg.vcxproj.filters index 45a6238f6..3821d89b3 100644 --- a/toolsrc/vcpkg/vcpkg.vcxproj.filters +++ b/toolsrc/vcpkg/vcpkg.vcxproj.filters @@ -1,27 +1,27 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Source Files - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Source Files + + \ No newline at end of file diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index c2bc6b6fd..ae699a840 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -1,255 +1,255 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {B98C92B7-2874-4537-9D46-D14E5C237F04} - vcpkglib - 8.1 - v140 - - - - StaticLibrary - true - MultiByte - - - StaticLibrary - false - true - MultiByte - - - StaticLibrary - true - MultiByte - - - StaticLibrary - false - true - MultiByte - - - 0 - - - - - - - - - - - - - - - - - - - - - - - Level3 - Disabled - true - ..\include - DISABLE_METRICS=$(DISABLE_METRICS);VCPKG_VERSION=$(VCPKG_VERSION);_MBCS;%(PreprocessorDefinitions) - /std:c++latest %(AdditionalOptions) - true - Use - pch.h - false - - - - - Level4 - Disabled - true - ..\include - DISABLE_METRICS=$(DISABLE_METRICS);VCPKG_VERSION=$(VCPKG_VERSION);_MBCS;%(PreprocessorDefinitions) - /std:c++latest %(AdditionalOptions) - true - Use - pch.h - false - - - - - Level3 - MaxSpeed - true - true - true - ..\include - DISABLE_METRICS=$(DISABLE_METRICS);VCPKG_VERSION=$(VCPKG_VERSION);_MBCS;NDEBUG;%(PreprocessorDefinitions) - /std:c++latest %(AdditionalOptions) - true - Use - pch.h - - - true - true - - - - - Level3 - MaxSpeed - true - true - true - ..\include - DISABLE_METRICS=$(DISABLE_METRICS);VCPKG_VERSION=$(VCPKG_VERSION);_MBCS;NDEBUG;%(PreprocessorDefinitions) - /std:c++latest %(AdditionalOptions) - true - Use - pch.h - - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {B98C92B7-2874-4537-9D46-D14E5C237F04} + vcpkglib + 8.1 + v140 + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + 0 + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + true + ..\include + DISABLE_METRICS=$(DISABLE_METRICS);VCPKG_VERSION=$(VCPKG_VERSION);_MBCS;%(PreprocessorDefinitions) + /std:c++latest %(AdditionalOptions) + true + Use + pch.h + false + + + + + Level4 + Disabled + true + ..\include + DISABLE_METRICS=$(DISABLE_METRICS);VCPKG_VERSION=$(VCPKG_VERSION);_MBCS;%(PreprocessorDefinitions) + /std:c++latest %(AdditionalOptions) + true + Use + pch.h + false + + + + + Level3 + MaxSpeed + true + true + true + ..\include + DISABLE_METRICS=$(DISABLE_METRICS);VCPKG_VERSION=$(VCPKG_VERSION);_MBCS;NDEBUG;%(PreprocessorDefinitions) + /std:c++latest %(AdditionalOptions) + true + Use + pch.h + + + true + true + + + + + Level3 + MaxSpeed + true + true + true + ..\include + DISABLE_METRICS=$(DISABLE_METRICS);VCPKG_VERSION=$(VCPKG_VERSION);_MBCS;NDEBUG;%(PreprocessorDefinitions) + /std:c++latest %(AdditionalOptions) + true + Use + pch.h + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 24f943e4a..74bfebf3b 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -1,348 +1,348 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {69f6b6e6-5ac4-4419-a256-b8a6b0392720} - - - {4a229410-0d09-4dab-953b-f434d6483f96} - - - {75592043-ab63-4905-beee-568a6ab8bf93} - - - {fa1f10e7-58d2-4f7c-ac26-a979baa70061} - - - - - Source Files - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg - - - Source Files\vcpkg\base - - - Source Files\vcpkg\base - - - Source Files\vcpkg\base - - - Source Files\vcpkg\base - - - Source Files\vcpkg\base - - - Source Files\vcpkg\base - - - Source Files\vcpkg\base - - - Source Files\vcpkg\base - - - Source Files\vcpkg\base - - - Source Files\vcpkg - - - Source Files\vcpkg - - - - - Header Files - - - 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 - - - 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 - - - Header Files\vcpkg\base - - - Header Files\vcpkg\base - - - Header Files\vcpkg\base - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg - - - Header Files\vcpkg\base - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {69f6b6e6-5ac4-4419-a256-b8a6b0392720} + + + {4a229410-0d09-4dab-953b-f434d6483f96} + + + {75592043-ab63-4905-beee-568a6ab8bf93} + + + {fa1f10e7-58d2-4f7c-ac26-a979baa70061} + + + + + Source Files + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg + + + Source Files\vcpkg\base + + + Source Files\vcpkg\base + + + Source Files\vcpkg\base + + + Source Files\vcpkg\base + + + Source Files\vcpkg\base + + + Source Files\vcpkg\base + + + Source Files\vcpkg\base + + + Source Files\vcpkg\base + + + Source Files\vcpkg\base + + + Source Files\vcpkg + + + Source Files\vcpkg + + + + + Header Files + + + 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 + + + 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 + + + Header Files\vcpkg\base + + + Header Files\vcpkg\base + + + Header Files\vcpkg\base + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg + + + Header Files\vcpkg\base + + \ No newline at end of file diff --git a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj index 4b59c5ace..d78e48e13 100644 --- a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj +++ b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj @@ -1,144 +1,144 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE} - vcpkgmetricsuploader - 8.1 - v140 - - - - Application - true - MultiByte - - - Application - false - true - MultiByte - - - Application - true - MultiByte - - - Application - false - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - Level3 - Disabled - true - ..\include - /std:c++latest %(AdditionalOptions) - true - false - - - winhttp.lib;version.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) - - - - - Level4 - Disabled - true - ..\include - /std:c++latest %(AdditionalOptions) - true - false - - - winhttp.lib;version.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) - - - - - Level3 - MaxSpeed - true - true - true - ..\include - _MBCS;NDEBUG;%(PreprocessorDefinitions) - /std:c++latest %(AdditionalOptions) - true - - - true - true - winhttp.lib;version.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) - - - - - Level3 - MaxSpeed - true - true - true - ..\include - _MBCS;NDEBUG;%(PreprocessorDefinitions) - /std:c++latest %(AdditionalOptions) - true - - - true - true - winhttp.lib;version.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) - - - - - - - - {b98c92b7-2874-4537-9d46-d14e5c237f04} - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {7D6FDEEB-B299-4A23-85EE-F67C4DED47BE} + vcpkgmetricsuploader + 8.1 + v140 + + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + true + ..\include + /std:c++latest %(AdditionalOptions) + true + false + + + winhttp.lib;version.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) + + + + + Level4 + Disabled + true + ..\include + /std:c++latest %(AdditionalOptions) + true + false + + + winhttp.lib;version.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) + + + + + Level3 + MaxSpeed + true + true + true + ..\include + _MBCS;NDEBUG;%(PreprocessorDefinitions) + /std:c++latest %(AdditionalOptions) + true + + + true + true + winhttp.lib;version.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) + + + + + Level3 + MaxSpeed + true + true + true + ..\include + _MBCS;NDEBUG;%(PreprocessorDefinitions) + /std:c++latest %(AdditionalOptions) + true + + + true + true + winhttp.lib;version.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) + + + + + + + + {b98c92b7-2874-4537-9d46-d14e5c237f04} + + + + + \ No newline at end of file diff --git a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj.filters b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj.filters index 847921000..ad56c0c72 100644 --- a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj.filters +++ b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj.filters @@ -1,22 +1,22 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + \ No newline at end of file diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index 166216c45..d61b15a71 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -1,188 +1,188 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - Create - Create - Create - Create - - - - - - - - - {b98c92b7-2874-4537-9d46-d14e5c237f04} - - - - - - - - {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D} - Win32Proj - vcpkgtest - 8.1 - v140 - - - - DynamicLibrary - true - Unicode - false - - - DynamicLibrary - false - true - Unicode - false - - - DynamicLibrary - true - Unicode - false - - - DynamicLibrary - false - true - Unicode - false - - - - - - - - - - - - - - - - - - - - - true - - - true - - - - - - Use - Level3 - Disabled - ..\include;$(VCInstallDir)UnitTest\include;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - tests.pch.h - /std:c++latest %(AdditionalOptions) - true - false - - - Windows - $(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories) - - - - - Use - Level4 - Disabled - ..\include;$(VCInstallDir)UnitTest\include;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\include;%(AdditionalIncludeDirectories) - _DEBUG;%(PreprocessorDefinitions) - true - tests.pch.h - /std:c++latest %(AdditionalOptions) - true - false - - - Windows - $(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories) - - - - - Level3 - Use - MaxSpeed - true - true - ..\include;$(VCInstallDir)UnitTest\include;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;%(PreprocessorDefinitions) - true - tests.pch.h - /std:c++latest %(AdditionalOptions) - true - - - Windows - true - true - $(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories) - - - - - Level3 - Use - MaxSpeed - true - true - ..\include;$(VCInstallDir)UnitTest\include;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\include;%(AdditionalIncludeDirectories) - NDEBUG;%(PreprocessorDefinitions) - true - tests.pch.h - /std:c++latest %(AdditionalOptions) - true - - - Windows - true - true - $(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories) - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + {b98c92b7-2874-4537-9d46-d14e5c237f04} + + + + + + + + {F27B8DB0-1279-4AF8-A2E3-1D49C4F0220D} + Win32Proj + vcpkgtest + 8.1 + v140 + + + + DynamicLibrary + true + Unicode + false + + + DynamicLibrary + false + true + Unicode + false + + + DynamicLibrary + true + Unicode + false + + + DynamicLibrary + false + true + Unicode + false + + + + + + + + + + + + + + + + + + + + + true + + + true + + + + + + Use + Level3 + Disabled + ..\include;$(VCInstallDir)UnitTest\include;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;%(PreprocessorDefinitions) + true + tests.pch.h + /std:c++latest %(AdditionalOptions) + true + false + + + Windows + $(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories) + + + + + Use + Level4 + Disabled + ..\include;$(VCInstallDir)UnitTest\include;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\include;%(AdditionalIncludeDirectories) + _DEBUG;%(PreprocessorDefinitions) + true + tests.pch.h + /std:c++latest %(AdditionalOptions) + true + false + + + Windows + $(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories) + + + + + Level3 + Use + MaxSpeed + true + true + ..\include;$(VCInstallDir)UnitTest\include;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + true + tests.pch.h + /std:c++latest %(AdditionalOptions) + true + + + Windows + true + true + $(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories) + + + + + Level3 + Use + MaxSpeed + true + true + ..\include;$(VCInstallDir)UnitTest\include;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\include;%(AdditionalIncludeDirectories) + NDEBUG;%(PreprocessorDefinitions) + true + tests.pch.h + /std:c++latest %(AdditionalOptions) + true + + + Windows + true + true + $(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories) + + + + + \ No newline at end of file diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters index 422f9298e..0f799426e 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters @@ -1,57 +1,57 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + \ No newline at end of file -- cgit v1.2.3 From e2980c8f91327614f24abec6704a5831d8074a8a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Feb 2018 18:18:43 -0800 Subject: [vcpkg] Add 7zip internal tool --- scripts/vcpkgTools.xml | 7 +++++++ toolsrc/include/vcpkg/vcpkgpaths.h | 2 ++ toolsrc/src/vcpkg/vcpkgpaths.cpp | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index e54d16864..02fd0b996 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -33,4 +33,11 @@ f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8 QtInstallerFramework-win-x86.zip + + 18.01.0 + 7za920\7za.exe + http://www.7-zip.org/a/7za920.zip + 2a3afe19c180f8373fa02ff00254d5394fec0349f5804e0ad2f6067854ff28ac + 7za920.zip + diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 33a9b0067..84e8110ec 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -63,6 +63,7 @@ namespace vcpkg fs::path ports_cmake; + const fs::path& get_7za_exe() const; const fs::path& get_cmake_exe() const; const fs::path& get_git_exe() const; const fs::path& get_nuget_exe() const; @@ -80,6 +81,7 @@ namespace vcpkg private: Lazy> available_triplets; + Lazy _7za_exe; Lazy cmake_exe; Lazy git_exe; Lazy nuget_exe; diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index bf231cecd..f2b39c110 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -205,6 +205,20 @@ namespace vcpkg return fetch_tool(paths.scripts, "cmake", TOOL_DATA); } + static fs::path get_7za_path(const VcpkgPaths& paths) + { +#if defined(_WIN32) + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "7zip"); + if (!paths.get_filesystem().exists(TOOL_DATA.downloaded_exe_path)) + { + return fetch_tool(paths.scripts, "7zip", TOOL_DATA); + } + return TOOL_DATA.downloaded_exe_path; +#else + Checks::exit_with_message(VCPKG_LINE_INFO, "Cannot download 7zip for non-Windows platforms."); +#endif + } + static fs::path get_nuget_path(const VcpkgPaths& paths) { static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "nuget"); @@ -353,6 +367,11 @@ namespace vcpkg return it != this->get_available_triplets().cend(); } + const fs::path& VcpkgPaths::get_7za_exe() const + { + return this->_7za_exe.get_lazy([this]() { return get_7za_path(*this); }); + } + const fs::path& VcpkgPaths::get_cmake_exe() const { return this->cmake_exe.get_lazy([this]() { return get_cmake_path(*this); }); -- cgit v1.2.3 From a2e6ffd86d435f08116e5e80b04796fe6898ebd0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Feb 2018 18:22:17 -0800 Subject: [vcpkg] Refactor VcpkgCmdArguments to not utilize global state --- toolsrc/include/vcpkg/vcpkgcmdarguments.h | 2 ++ toolsrc/src/vcpkg.cpp | 1 + toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 5 +++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index d84be9c22..bce22b6f9 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -79,6 +79,8 @@ namespace vcpkg Optional sendmetrics = nullopt; Optional printmetrics = nullopt; + // feature flags + Optional featurepackages = nullopt; std::string command; std::vector command_arguments; diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index adb32c723..ffda7ede9 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -265,6 +265,7 @@ int main(const int argc, const char* const* const argv) const VcpkgCmdArguments args = VcpkgCmdArguments::create_from_command_line(argc, argv); + if (const auto p = args.featurepackages.get()) GlobalState::feature_packages = *p; if (const auto p = args.printmetrics.get()) Metrics::g_metrics.lock()->set_print_metrics(*p); if (const auto p = args.sendmetrics.get()) Metrics::g_metrics.lock()->set_send_metrics(*p); if (const auto p = args.debug.get()) GlobalState::debugging = *p; diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 84ad17fe3..18acf8e12 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -126,12 +126,13 @@ namespace vcpkg } if (arg == "--featurepackages") { - GlobalState::feature_packages = true; + parse_switch(true, "featurepackages", args.featurepackages); continue; } if (arg == "--no-featurepackages") { - GlobalState::feature_packages = false; + parse_switch(false, "featurepackages", args.featurepackages); + continue; continue; } -- cgit v1.2.3 From 9eb9eca48766289b6377eb479cd5eb5f3da7441d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Feb 2018 18:25:01 -0800 Subject: [vcpkg-hash] Fix target paths containing spaces --- toolsrc/src/vcpkg/commands.hash.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 767a1bf26..bbbbed036 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -10,7 +10,10 @@ namespace vcpkg::Commands::Hash std::string get_file_hash(fs::path const& cmake_exe_path, fs::path const& path, std::string const& hash_type) { const std::string cmd_line = Strings::format( - R"("%s" -E %ssum %s)", cmake_exe_path.u8string(), Strings::ascii_to_lowercase(hash_type), path.u8string()); + R"("%s" -E %ssum "%s")", + cmake_exe_path.u8string(), + Strings::ascii_to_lowercase(hash_type), + path.u8string()); const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); -- cgit v1.2.3 From 25b8f25dadcb2af28ae5be2e6d31884ca67f1b26 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Feb 2018 18:38:25 -0800 Subject: [vcpkg] Initial commit of experimental compressed binary archiving behind a flag --- toolsrc/include/vcpkg/binaryparagraph.h | 4 +- toolsrc/include/vcpkg/build.h | 1 + toolsrc/include/vcpkg/globalstate.h | 1 + toolsrc/include/vcpkg/vcpkgcmdarguments.h | 2 + toolsrc/src/vcpkg.cpp | 9 + toolsrc/src/vcpkg/binaryparagraph.cpp | 11 +- toolsrc/src/vcpkg/build.cpp | 263 ++++++++++++++++++++++++------ toolsrc/src/vcpkg/globalstate.cpp | 1 + toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 9 + 9 files changed, 241 insertions(+), 60 deletions(-) diff --git a/toolsrc/include/vcpkg/binaryparagraph.h b/toolsrc/include/vcpkg/binaryparagraph.h index f59bf693a..3315151c6 100644 --- a/toolsrc/include/vcpkg/binaryparagraph.h +++ b/toolsrc/include/vcpkg/binaryparagraph.h @@ -14,7 +14,7 @@ namespace vcpkg { BinaryParagraph(); explicit BinaryParagraph(std::unordered_map fields); - BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet); + BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet, const std::string& abi_tag); BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet); std::string displayname() const; @@ -40,4 +40,4 @@ namespace vcpkg }; void serialize(const BinaryParagraph& pgh, std::string& out_str); -} \ No newline at end of file +} diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index f560dbf57..ea81c4dbe 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -98,6 +98,7 @@ namespace vcpkg::Build /// 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; diff --git a/toolsrc/include/vcpkg/globalstate.h b/toolsrc/include/vcpkg/globalstate.h index 360d3f43e..bc28e3ff8 100644 --- a/toolsrc/include/vcpkg/globalstate.h +++ b/toolsrc/include/vcpkg/globalstate.h @@ -14,6 +14,7 @@ namespace vcpkg static std::atomic debugging; static std::atomic feature_packages; + static std::atomic g_binary_caching; static std::atomic g_init_console_cp; static std::atomic g_init_console_output_cp; diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index bce22b6f9..f449887f1 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -81,6 +81,8 @@ namespace vcpkg // feature flags Optional featurepackages = nullopt; + Optional binarycaching = nullopt; + std::string command; std::vector command_arguments; diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index ffda7ede9..ef68e6f72 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -263,9 +263,18 @@ int main(const int argc, const char* const* const argv) } load_config(); + const auto vcpkg_feature_flags_env = System::get_environment_variable("VCPKG_FEATURE_FLAGS"); + if (const auto v = vcpkg_feature_flags_env.get()) + { + auto flags = Strings::split(*v, ","); + if (std::find(flags.begin(), flags.end(), "binarycaching") != flags.end()) GlobalState::g_binary_caching = true; + } + const VcpkgCmdArguments args = VcpkgCmdArguments::create_from_command_line(argc, argv); if (const auto p = args.featurepackages.get()) GlobalState::feature_packages = *p; + if (const auto p = args.binarycaching.get()) GlobalState::g_binary_caching = *p; + if (const auto p = args.printmetrics.get()) Metrics::g_metrics.lock()->set_print_metrics(*p); if (const auto p = args.sendmetrics.get()) Metrics::g_metrics.lock()->set_send_metrics(*p); if (const auto p = args.debug.get()) GlobalState::debugging = *p; diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index 7c9e905e8..7a8b0d577 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -71,22 +71,17 @@ namespace vcpkg Checks::check_exit(VCPKG_LINE_INFO, multi_arch == "same", "Multi-Arch must be 'same' but was %s", multi_arch); } - BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet) + 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) { this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO); - this->version = spgh.version; - this->description = spgh.description; - this->maintainer = spgh.maintainer; this->depends = filter_dependencies(spgh.depends, triplet); } BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet) + : version(), feature(fpgh.name), description(fpgh.description), maintainer() { this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO); - this->version = ""; - this->feature = fpgh.name; - this->description = fpgh.description; - this->maintainer = ""; this->depends = filter_dependencies(fpgh.depends, triplet); } diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 0e0928a1b..0486039b7 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -238,10 +238,11 @@ namespace vcpkg::Build static std::unique_ptr create_binary_control_file(const SourceParagraph& source_paragraph, const Triplet& triplet, - const BuildInfo& build_info) + const BuildInfo& build_info, + const std::string& abi_tag) { auto bcf = std::make_unique(); - BinaryParagraph bpgh(source_paragraph, triplet); + BinaryParagraph bpgh(source_paragraph, triplet, abi_tag); if (const auto p_ver = build_info.version.get()) { bpgh.version = *p_ver; @@ -321,11 +322,23 @@ namespace vcpkg::Build auto& fs = paths.get_filesystem(); const Triplet& triplet = config.triplet; + struct AbiEntry + { + std::string key; + std::string value; + }; + + std::vector abi_tag_entries; + const PackageSpec spec = PackageSpec::from_name_and_triplet(config.scf.core_paragraph->name, triplet).value_or_exit(VCPKG_LINE_INFO); std::vector required_fspecs = compute_required_feature_specs(config, status_db); + // extract out the actual package ids + auto dep_pspecs = Util::fmap(required_fspecs, [](FeatureSpec const& fspec) { return fspec.spec(); }); + Util::sort_unique_erase(dep_pspecs); + // Find all features that aren't installed. This destroys required_fspecs. Util::unstable_keep_if(required_fspecs, [&](FeatureSpec const& fspec) { return !status_db.is_installed(fspec) && fspec.name() != spec.name(); @@ -336,81 +349,210 @@ namespace vcpkg::Build return {BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES, std::move(required_fspecs)}; } + // dep_pspecs was not destroyed + for (auto&& pspec : dep_pspecs) + { + if (pspec == spec) continue; + auto status_it = status_db.find_installed(pspec); + Checks::check_exit(VCPKG_LINE_INFO, status_it != status_db.end()); + abi_tag_entries.emplace_back( + AbiEntry{status_it->get()->package.spec.name(), status_it->get()->package.abi}); + } + const fs::path& cmake_exe_path = paths.get_cmake_exe(); const fs::path& git_exe_path = paths.get_git_exe(); const fs::path ports_cmake_script_path = paths.ports_cmake; + if (GlobalState::g_binary_caching) + { + abi_tag_entries.emplace_back(AbiEntry{ + "portfile", Commands::Hash::get_file_hash(cmake_exe_path, config.port_dir / "portfile.cmake", "SHA1")}); + abi_tag_entries.emplace_back(AbiEntry{ + "control", Commands::Hash::get_file_hash(cmake_exe_path, config.port_dir / "CONTROL", "SHA1")}); + } + const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); + abi_tag_entries.emplace_back(AbiEntry{"triplet", pre_build_info.triplet_abi_tag}); std::string features = Strings::join(";", config.feature_list); + abi_tag_entries.emplace_back(AbiEntry{"features", features}); - std::string all_features; - for (auto& feature : config.scf.feature_paragraphs) - { - all_features.append(feature->name + ";"); - } + if (config.build_package_options.use_head_version == UseHeadVersion::YES) + abi_tag_entries.emplace_back(AbiEntry{"head", ""}); - const Toolset& toolset = paths.get_toolset(pre_build_info); - const std::string cmd_launch_cmake = System::make_cmake_cmd( - cmake_exe_path, - ports_cmake_script_path, - { - {"CMD", "BUILD"}, - {"PORT", config.scf.core_paragraph->name}, - {"CURRENT_PORT_DIR", config.port_dir / "/."}, - {"TARGET_TRIPLET", triplet.canonical_name()}, - {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, - {"VCPKG_USE_HEAD_VERSION", - Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, - {"_VCPKG_NO_DOWNLOADS", !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, - {"GIT", git_exe_path}, - {"FEATURES", features}, - {"ALL_FEATURES", all_features}, - }); + std::string full_abi_info = + Strings::join("", abi_tag_entries, [](const AbiEntry& p) { return p.key + " " + p.value + "\n"; }); - const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); - const std::string command = Strings::format(R"(%s && %s)", cmd_set_environment, cmd_launch_cmake); + std::string abi_tag; + + if (GlobalState::g_binary_caching) + { + if (GlobalState::debugging) + { + System::println("[DEBUG] "); + for (auto&& entry : abi_tag_entries) + { + System::println("[DEBUG] %s|%s", entry.key, entry.value); + } + System::println("[DEBUG] "); + } - const auto timer = Chrono::ElapsedTimer::create_started(); + auto abi_tag_entries_missing = abi_tag_entries; + Util::stable_keep_if(abi_tag_entries_missing, [](const AbiEntry& p) { return p.value.empty(); }); - const int return_code = System::cmd_execute_clean(command); - const auto buildtimeus = timer.microseconds(); - const auto spec_string = spec.to_string(); + if (abi_tag_entries_missing.empty()) + { + std::error_code ec; + fs.create_directories(paths.buildtrees / spec.name(), ec); + auto abi_file_path = paths.buildtrees / spec.name() / "vcpkg_abi_info"; + fs.write_contents(abi_file_path, full_abi_info); - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_buildtime(spec.to_string() + ":[" + Strings::join(",", config.feature_list) + "]", - buildtimeus); - if (return_code != 0) + abi_tag = Commands::Hash::get_file_hash(paths.get_cmake_exe(), abi_file_path, "SHA1"); + } + else { - locked_metrics->track_property("error", "build failed"); - locked_metrics->track_property("build_error", spec_string); - return BuildResult::BUILD_FAILED; + System::println("Warning: binary caching disabled because abi keys are missing values:\n%s", + Strings::join("", abi_tag_entries_missing, [](const AbiEntry& e) { + return " " + e.key + "\n"; + })); } } - 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); + std::unique_ptr bcf; - auto bcf = create_binary_control_file(*config.scf.core_paragraph, triplet, build_info); + auto archives_dir = paths.root / "archives"; + if (!abi_tag.empty()) + { + archives_dir /= abi_tag.substr(0, 2); + } + auto archive_path = archives_dir / (abi_tag + ".zip"); - if (error_count != 0) + if (GlobalState::g_binary_caching && !abi_tag.empty() && fs.exists(archive_path)) { - return BuildResult::POST_BUILD_CHECKS_FAILED; + System::println("Using cached binary package: %s", archive_path.u8string()); + + auto pkg_path = paths.package_dir(spec); + 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()); + + auto&& _7za = paths.get_7za_exe(); + + System::cmd_execute_clean(Strings::format( + R"("%s" x "%s" -o"%s" -y >nul)", _7za.u8string(), archive_path.u8string(), pkg_path.u8string())); + + auto maybe_bcf = Paragraphs::try_load_cached_control_package(paths, spec); + bcf = std::make_unique(std::move(maybe_bcf).value_or_exit(VCPKG_LINE_INFO)); } - for (auto&& feature : config.feature_list) + else { - for (auto&& f_pgh : config.scf.feature_paragraphs) + if (GlobalState::g_binary_caching && !abi_tag.empty()) { - if (f_pgh->name == feature) - bcf->features.push_back( - create_binary_feature_control_file(*config.scf.core_paragraph, *f_pgh, triplet)); + System::println("Could not locate cached archive: %s", archive_path.u8string()); } - } - write_binary_control_file(paths, *bcf); + 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); + const std::string cmd_launch_cmake = System::make_cmake_cmd( + cmake_exe_path, + ports_cmake_script_path, + { + {"CMD", "BUILD"}, + {"PORT", config.scf.core_paragraph->name}, + {"CURRENT_PORT_DIR", config.port_dir / "/."}, + {"TARGET_TRIPLET", triplet.canonical_name()}, + {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, + {"VCPKG_USE_HEAD_VERSION", + Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, + {"_VCPKG_NO_DOWNLOADS", + !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, + {"GIT", git_exe_path}, + {"FEATURES", features}, + {"ALL_FEATURES", all_features}, + }); + + const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); + const std::string command = Strings::format(R"(%s && %s)", cmd_set_environment, cmd_launch_cmake); + + const auto timer = Chrono::ElapsedTimer::create_started(); + + const int return_code = System::cmd_execute_clean(command); + const auto buildtimeus = timer.microseconds(); + const auto spec_string = spec.to_string(); + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_buildtime(spec.to_string() + ":[" + Strings::join(",", config.feature_list) + "]", + buildtimeus); + if (return_code != 0) + { + locked_metrics->track_property("error", "build failed"); + locked_metrics->track_property("build_error", spec_string); + return BuildResult::BUILD_FAILED; + } + } + + 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); + + bcf = create_binary_control_file(*config.scf.core_paragraph, triplet, build_info, abi_tag); + + if (error_count != 0) + { + return BuildResult::POST_BUILD_CHECKS_FAILED; + } + for (auto&& feature : config.feature_list) + { + for (auto&& f_pgh : config.scf.feature_paragraphs) + { + if (f_pgh->name == feature) + bcf->features.push_back( + create_binary_feature_control_file(*config.scf.core_paragraph, *f_pgh, triplet)); + } + } + + if (GlobalState::g_binary_caching && !abi_tag.empty()) + { + std::error_code ec; + fs.write_contents( + paths.package_dir(spec) / "share" / spec.name() / "vcpkg_abi_info.txt", full_abi_info, ec); + } + + write_binary_control_file(paths, *bcf); + + if (GlobalState::g_binary_caching && !abi_tag.empty()) + { + auto tmp_archive_path = paths.buildtrees / spec.name() / (spec.triplet().to_string() + ".zip"); + + std::error_code ec; + fs.remove(tmp_archive_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !fs.exists(tmp_archive_path), + "Could not remove file: %s", + tmp_archive_path.u8string()); + auto&& _7za = paths.get_7za_exe(); + + System::cmd_execute_clean(Strings::format( + R"("%s" a "%s" "%s\*" >nul)", + _7za.u8string(), + tmp_archive_path.u8string(), + paths.package_dir(spec).u8string())); + + fs.create_directories(archives_dir, ec); + + fs.rename(tmp_archive_path, archive_path); + + System::println("Stored binary cache: %s", archive_path.u8string()); + } + } return {BuildResult::SUCCEEDED, std::move(bcf)}; } @@ -549,6 +691,26 @@ namespace vcpkg::Build 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"); + auto triplet_abi_tag = [&]() { + static std::map s_hash_cache; + + if (GlobalState::g_binary_caching) + { + auto it_hash = s_hash_cache.find(triplet_file_path); + if (it_hash != s_hash_cache.end()) + { + return it_hash->second; + } + auto hash = Commands::Hash::get_file_hash(paths.get_cmake_exe(), triplet_file_path, "SHA1"); + s_hash_cache.emplace(triplet_file_path, hash); + return hash; + } + else + { + return std::string(); + } + }(); + const auto cmd_launch_cmake = System::make_cmake_cmd(cmake_exe_path, ports_cmake_script_path, { @@ -560,6 +722,7 @@ namespace vcpkg::Build const std::vector lines = Strings::split(ec_data.output, "\n"); PreBuildInfo pre_build_info; + pre_build_info.triplet_abi_tag = triplet_abi_tag; const auto e = lines.cend(); auto cur = std::find(lines.cbegin(), e, FLAG_GUID); diff --git a/toolsrc/src/vcpkg/globalstate.cpp b/toolsrc/src/vcpkg/globalstate.cpp index eac69d9f5..a4100acf7 100644 --- a/toolsrc/src/vcpkg/globalstate.cpp +++ b/toolsrc/src/vcpkg/globalstate.cpp @@ -9,6 +9,7 @@ namespace vcpkg std::atomic GlobalState::debugging(false); std::atomic GlobalState::feature_packages(true); + std::atomic GlobalState::g_binary_caching(false); std::atomic GlobalState::g_init_console_cp(0); std::atomic GlobalState::g_init_console_output_cp(0); diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 18acf8e12..8909e1552 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -133,6 +133,15 @@ namespace vcpkg { parse_switch(false, "featurepackages", args.featurepackages); continue; + } + if (arg == "--binarycaching") + { + parse_switch(true, "binarycaching", args.binarycaching); + continue; + } + if (arg == "--no-binarycaching") + { + parse_switch(false, "binarycaching", args.binarycaching); continue; } -- cgit v1.2.3 From 9db298e34a3ad6efebd4f0d95a0ca45e2d70b377 Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Tue, 27 Feb 2018 23:05:18 +0800 Subject: Add package NMSLiB (#2875) * [nmslib] Init port * [nmslib] Trying extra building --- ports/nmslib/CONTROL | 8 ++++ ports/nmslib/fix-cmake-order.patch | 23 ++++++++++ ports/nmslib/fix-headers.patch | 92 ++++++++++++++++++++++++++++++++++++++ ports/nmslib/portfile.cmake | 60 +++++++++++++++++++++++++ 4 files changed, 183 insertions(+) create mode 100644 ports/nmslib/CONTROL create mode 100644 ports/nmslib/fix-cmake-order.patch create mode 100644 ports/nmslib/fix-headers.patch create mode 100644 ports/nmslib/portfile.cmake diff --git a/ports/nmslib/CONTROL b/ports/nmslib/CONTROL new file mode 100644 index 000000000..be3c8b486 --- /dev/null +++ b/ports/nmslib/CONTROL @@ -0,0 +1,8 @@ +Source: nmslib +Version: 1.7.2 +Description: Non-Metric Space Library (NMSLIB) is an efficient similarity search library and a toolkit for evaluation of k-NN methods for generic non-metric spaces. +# +# ## Extras are currently unsupported for Windows, waiting for fixes. +# Feature: extra +# Description: Build extra algorithms and tools for nmslib. Note that this feature requires a large bunch of dependencies. +# Build-Depends: gsl, eigen3, boost-system, boost-filesystem, boost-timer, boost-foreach, boost-format, boost-math, boost-random, boost-dynamic-bitset, boost-program-options diff --git a/ports/nmslib/fix-cmake-order.patch b/ports/nmslib/fix-cmake-order.patch new file mode 100644 index 000000000..8b465ae47 --- /dev/null +++ b/ports/nmslib/fix-cmake-order.patch @@ -0,0 +1,23 @@ +diff --git a/similarity_search/CMakeLists.txt b/similarity_search/CMakeLists.txt +index 1451b30..a9f1616 100644 +--- a/similarity_search/CMakeLists.txt ++++ b/similarity_search/CMakeLists.txt +@@ -109,9 +109,6 @@ if (WITH_EXTRAS) + message (FATAL_ERROR "Could not locate GSL.") + endif (GSL_FOUND) + +- include_directories (${PROJECT_SOURCE_DIR}/lshkit/include) +- add_subdirectory (lshkit) +- + find_package(Eigen3 3 REQUIRED) + if (EIGEN3_FOUND) + message (STATUS "Found Eigen3.") +@@ -139,6 +136,8 @@ if (WITH_EXTRAS) + else () + message (FATAL_ERROR "Could not locate BOOST.") + endif () ++ ++ add_subdirectory (lshkit) + endif() + + add_subdirectory (src) diff --git a/ports/nmslib/fix-headers.patch b/ports/nmslib/fix-headers.patch new file mode 100644 index 000000000..92a8d6c36 --- /dev/null +++ b/ports/nmslib/fix-headers.patch @@ -0,0 +1,92 @@ +diff --git a/similarity_search/src/method/hnsw.cc b/similarity_search/src/method/hnsw.cc +index 30a7c8a..5ca07c5 100644 +--- a/similarity_search/src/method/hnsw.cc ++++ b/similarity_search/src/method/hnsw.cc +@@ -27,7 +27,7 @@ + #include + #include + // This is only for _mm_prefetch +-#include ++#include + + #include "portable_simd.h" + #include "knnquery.h" +diff --git a/similarity_search/src/method/hnsw_distfunc_opt.cc b/similarity_search/src/method/hnsw_distfunc_opt.cc +index 168ee81..408d95d 100644 +--- a/similarity_search/src/method/hnsw_distfunc_opt.cc ++++ b/similarity_search/src/method/hnsw_distfunc_opt.cc +@@ -30,7 +30,7 @@ + #include "rangequery.h" + #include "portable_intrinsics.h" + // This is only for _mm_prefetch +-#include ++#include + #include "space.h" + + #include "sort_arr_bi.h" +diff --git a/similarity_search/src/method/pivot_neighb_invindx.cc b/similarity_search/src/method/pivot_neighb_invindx.cc +index b6473bd..6dcb00f 100644 +--- a/similarity_search/src/method/pivot_neighb_invindx.cc ++++ b/similarity_search/src/method/pivot_neighb_invindx.cc +@@ -21,7 +21,7 @@ + #include + + // This is only for _mm_prefetch +-#include ++#include + + #include "portable_simd.h" + #include "space.h" +diff --git a/similarity_search/src/method/small_world_rand.cc b/similarity_search/src/method/small_world_rand.cc +index 59e13f7..0f3e0b9 100644 +--- a/similarity_search/src/method/small_world_rand.cc ++++ b/similarity_search/src/method/small_world_rand.cc +@@ -16,7 +16,7 @@ + #include + #include + // This is only for _mm_prefetch +-#include ++#include + + #include "portable_simd.h" + #include "space.h" +diff --git a/similarity_search/src/method/vptree.cc b/similarity_search/src/method/vptree.cc +index d0262ad..0e5befc 100644 +--- a/similarity_search/src/method/vptree.cc ++++ b/similarity_search/src/method/vptree.cc +@@ -20,7 +20,7 @@ + #include + + // This is only for _mm_prefetch +-#include ++#include + + #include "portable_simd.h" + #include "space.h" +diff --git a/similarity_search/test/test_overlap.cc b/similarity_search/test/test_overlap.cc +index 326b26b..413d66d 100644 +--- a/similarity_search/test/test_overlap.cc ++++ b/similarity_search/test/test_overlap.cc +@@ -12,7 +12,6 @@ + * Apache License Version 2.0 http://www.apache.org/licenses/. + * + */ +-#include + + #include + #include +diff --git a/similarity_search/test/test_pow.cc b/similarity_search/test/test_pow.cc +index 1b46a68..faaa84e 100644 +--- a/similarity_search/test/test_pow.cc ++++ b/similarity_search/test/test_pow.cc +@@ -29,8 +29,8 @@ using namespace std; + + const float MAX_REL_DIFF = 1e-6f; + +-vector addExps = { 0, 0.125, 0.25, 0.5 }; +-vector vals = { 0.1, 0.5, 1, 1.5, 2, 4}; ++vector addExps = { 0, 0.125f, 0.25f, 0.5f }; ++vector vals = { 0.1f, 0.5f, 1, 1.5f, 2, 4}; + vector signs = { 1, -1}; + + template bool runTest() { diff --git a/ports/nmslib/portfile.cmake b/ports/nmslib/portfile.cmake new file mode 100644 index 000000000..8743aae80 --- /dev/null +++ b/ports/nmslib/portfile.cmake @@ -0,0 +1,60 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "nmslib only supports static linkage. Building statically.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO searchivarius/nmslib + REF v1.7.2 + SHA512 2f910f752bfb1146aa8d1765fd5faf64d718a92ab7edf9d8ac0a2d9c4359d42b07b3cd553e2aff93da8b009add52ab9cce6b841f5175f57163f73f643ff62c19 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-headers.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-cmake-order.patch +) + +set(WITH_EXTRAS OFF) +if("extra" IN_LIST FEATURES) + set(WITH_EXTRAS ON) +endif() + +# TODO: check SSE and AVX avability and set corresponding tags +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/similarity_search + OPTIONS + -DWITH_EXTRAS=${WITH_EXTRAS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Move headers into separate folder +set(SUBFOLDERS factory method space) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/nmslib) +foreach(SUBFOLER ${SUBFOLDERS}) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/nmslib/${SUBFOLER}) +endforeach() + +file(GLOB HEADERS ${CURRENT_PACKAGES_DIR}/include/*.h ${CURRENT_PACKAGES_DIR}/include/*/*.h) +foreach(HEADER ${HEADERS}) + string(REPLACE "${CURRENT_PACKAGES_DIR}/include" "${CURRENT_PACKAGES_DIR}/include/nmslib" + MOVED_HEADER ${HEADER}) + file(RENAME ${HEADER} ${MOVED_HEADER}) +endforeach(HEADER ${HEADERS}) + +foreach(SUBFOLER ${SUBFOLDERS}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/${SUBFOLER}/) +endforeach() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Put the license file where vcpkg expects it +file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/nmslib/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/nmslib/README.md ${CURRENT_PACKAGES_DIR}/share/nmslib/copyright) -- cgit v1.2.3 From cbe62a8e1e619538621d398ec300b59651abd9a8 Mon Sep 17 00:00:00 2001 From: Stanislav Ershov Date: Tue, 27 Feb 2018 18:34:43 +0300 Subject: [gl3w] Initial port (#2561) * [gl3w] Initial port * [gl3w] Call python inside the portfile -- CMakeLists.txt simplification --- ports/gl3w/0001-enable-shared-build.patch | 60 +++++++++++++++++++++++++++++++ ports/gl3w/CMakeLists.txt | 41 +++++++++++++++++++++ ports/gl3w/CONTROL | 3 ++ ports/gl3w/portfile.cmake | 53 +++++++++++++++++++++++++++ 4 files changed, 157 insertions(+) create mode 100644 ports/gl3w/0001-enable-shared-build.patch create mode 100644 ports/gl3w/CMakeLists.txt create mode 100644 ports/gl3w/CONTROL create mode 100644 ports/gl3w/portfile.cmake diff --git a/ports/gl3w/0001-enable-shared-build.patch b/ports/gl3w/0001-enable-shared-build.patch new file mode 100644 index 000000000..f43437e9d --- /dev/null +++ b/ports/gl3w/0001-enable-shared-build.patch @@ -0,0 +1,60 @@ +From 5f482a64c642f830f1d25f8abae7cae6dd2c6c2b Mon Sep 17 00:00:00 2001 +From: Stanislav Ershov +Date: Mon, 8 Jan 2018 03:16:07 +0300 +Subject: [PATCH] enable shared build + +--- + gl3w_gen.py | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +diff --git a/gl3w_gen.py b/gl3w_gen.py +index 611331a..3515cf9 100755 +--- a/gl3w_gen.py ++++ b/gl3w_gen.py +@@ -130,6 +130,10 @@ with open(os.path.join(args.root, 'include/GL/gl3w.h'), 'wb') as f: + + #include + ++#ifndef GL3W_API ++ #define GL3W_API ++#endif ++ + #ifndef __gl_h_ + #define __gl_h_ + #endif +@@ -147,10 +151,10 @@ typedef void (*GL3WglProc)(void); + typedef GL3WglProc (*GL3WGetProcAddressProc)(const char *proc); + + /* gl3w api */ +-int gl3wInit(void); +-int gl3wInit2(GL3WGetProcAddressProc proc); +-int gl3wIsSupported(int major, int minor); +-GL3WglProc gl3wGetProcAddress(const char *proc); ++GL3W_API int gl3wInit(void); ++GL3W_API int gl3wInit2(GL3WGetProcAddressProc proc); ++GL3W_API int gl3wIsSupported(int major, int minor); ++GL3W_API GL3WglProc gl3wGetProcAddress(const char *proc); + + /* gl3w internal state */ + ''') +@@ -162,7 +168,7 @@ GL3WglProc gl3wGetProcAddress(const char *proc); + write(f, r''' } gl; + }; + +-extern union GL3WProcs gl3wProcs; ++GL3W_API extern union GL3WProcs gl3wProcs; + + /* OpenGL functions */ + ''') +@@ -329,7 +333,7 @@ static const char *proc_names[] = { + write(f, '\t"{0}",\n'.format(proc)) + write(f, r'''}; + +-union GL3WProcs gl3wProcs; ++GL3W_API union GL3WProcs gl3wProcs; + + static void load_procs(GL3WGetProcAddressProc proc) + { +-- +2.15.0.windows.1 + diff --git a/ports/gl3w/CMakeLists.txt b/ports/gl3w/CMakeLists.txt new file mode 100644 index 000000000..30a94eddb --- /dev/null +++ b/ports/gl3w/CMakeLists.txt @@ -0,0 +1,41 @@ +cmake_minimum_required(VERSION 3.9) +project(gl3w C) + +set(HEADER_FILES + "include/GL/gl3w.h" + "include/GL/glcorearb.h" +) + +find_package(OpenGL REQUIRED) + +add_library(gl3w src/gl3w.c) + +target_include_directories(gl3w PUBLIC + $ + $ +) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(gl3w PRIVATE "-DGL3W_API=__declspec(dllexport)") +endif() + +target_include_directories(gl3w PRIVATE ${OPENGL_INCLUDE_DIR}) +target_link_libraries(gl3w PRIVATE ${OPENGL_LIBRARIES}) + +install(TARGETS gl3w + EXPORT gl3wExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT gl3wExport + FILE gl3wConfig.cmake + NAMESPACE unofficial::gl3w:: + DESTINATION share/gl3w +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY include/GL DESTINATION include) +endif() diff --git a/ports/gl3w/CONTROL b/ports/gl3w/CONTROL new file mode 100644 index 000000000..10a2c2b76 --- /dev/null +++ b/ports/gl3w/CONTROL @@ -0,0 +1,3 @@ +Source: gl3w +Version: 8f7f459d +Description: Simple OpenGL core profile loading diff --git a/ports/gl3w/portfile.cmake b/ports/gl3w/portfile.cmake new file mode 100644 index 000000000..bb3f245c9 --- /dev/null +++ b/ports/gl3w/portfile.cmake @@ -0,0 +1,53 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO skaslev/gl3w + REF 8f7f459df8725c9614136b49a96023de276219f2 + SHA512 7674008716accb25347c81f755f2db7a885ecb5c51b481e0e8f337bc8ee0949a5a58f5816b27a66535ed4da0b9438ba6a6a84712560c7b1a0f1b2908b4eb81e5 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_download_distfile( + GLCOREARB_H + URLS "http://www.opengl.org/registry/api/GL/glcorearb.h" + FILENAME "glcorearb-2018-02-27.h" + SHA512 02c3672606e6360f2e1e8335fe581bc2d2b3d518b0f24b0c327006a70de07261dace4b53b13e93029a8eb2af43bcba904c4392f2c35ac512c7f278534ef8eb5d +) + +file(INSTALL ${GLCOREARB_H} DESTINATION ${SOURCE_PATH}/include/GL RENAME glcorearb.h) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-enable-shared-build.patch +) + +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${SOURCE_PATH}/gl3w_gen.py + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME gl3w-gen +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/gl3w) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(HEADER ${CURRENT_PACKAGES_DIR}/include/GL/gl3w.h) + file(READ ${HEADER} _contents) + string(REPLACE "#define GL3W_API" "#define GL3W_API __declspec(dllimport)" _contents "${_contents}") + file(WRITE ${HEADER} "${_contents}") +endif() + +file(INSTALL ${SOURCE_PATH}/UNLICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl3w RENAME copyright) -- cgit v1.2.3 From 397237813c3c04a7c03d56a2b8d555e88c790c9b Mon Sep 17 00:00:00 2001 From: Jason Juang Date: Tue, 27 Feb 2018 07:35:15 -0800 Subject: [cgal] update to 4.11.1 (#2894) --- ports/cgal/CONTROL | 2 +- ports/cgal/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL index c3ab7fb3e..753e30a20 100644 --- a/ports/cgal/CONTROL +++ b/ports/cgal/CONTROL @@ -1,4 +1,4 @@ Source: cgal -Version: 4.11-3 +Version: 4.11.1 Build-Depends: mpfr, mpir, zlib, qt5, boost-format, boost-container, boost-iterator, boost-variant, boost-any, boost-unordered, boost-random Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry. diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake index 6b64d5d26..439a40f7c 100644 --- a/ports/cgal/portfile.cmake +++ b/ports/cgal/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CGAL/cgal - REF releases/CGAL-4.11 - SHA512 91e555d5988bee387afa31331e1e3a8990206468fd8c774fd82979d9ff169e9c4835ecc6ba3d576cda617b6cb2cd52d27657d2434e38b29ce0e7e643436810ab + REF releases/CGAL-4.11.1 + SHA512 fa5bdf62020bfba9d0774dd6333d0a4c6800d4d4c65a8be640710dde5446eca47941567ef801ace5b30b6027f5442b42bb7e0175f52758c5acc595b72cc031f6 HEAD_REF master ) -- cgit v1.2.3 From 4b26cd269c7897229924cec0b6e6f00cb8034837 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 27 Feb 2018 09:01:24 -0800 Subject: [g2o] Fix static builds --- ports/g2o/CONTROL | 2 +- ports/g2o/portfile.cmake | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/g2o/CONTROL b/ports/g2o/CONTROL index 81e2b045d..cdad4d19a 100644 --- a/ports/g2o/CONTROL +++ b/ports/g2o/CONTROL @@ -1,4 +1,4 @@ Source: g2o -Version: 20170730_git-2 +Version: 20170730_git-3 Build-Depends: suitesparse, eigen3, clapack, ceres Description: g2o: A General Framework for Graph Optimization http://openslam.org/g2o.html diff --git a/ports/g2o/portfile.cmake b/ports/g2o/portfile.cmake index bdfa20f62..ba8186789 100644 --- a/ports/g2o/portfile.cmake +++ b/ports/g2o/portfile.cmake @@ -8,10 +8,13 @@ vcpkg_from_github( HEAD_REF master ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_LGPL_SHARED_LIBS) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DBUILD_LGPL_SHARED_LIBS=${BUILD_LGPL_SHARED_LIBS} -DG2O_BUILD_EXAMPLES=OFF -DG2O_BUILD_APPS=OFF ) -- cgit v1.2.3 From ee3f0af2319e7fe19355e6ec80593c4fdba1ca72 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Wed, 28 Feb 2018 01:42:08 +0800 Subject: [devil] Enable features (#2825) --- ports/devil/CONTROL | 29 ++++++++++++++++++++++-- ports/devil/portfile.cmake | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 2 deletions(-) diff --git a/ports/devil/CONTROL b/ports/devil/CONTROL index fcdf51a9d..cddc99222 100644 --- a/ports/devil/CONTROL +++ b/ports/devil/CONTROL @@ -1,4 +1,29 @@ Source: devil -Version: 1.8.0-1 -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp, libraw, jxrlib, openexr, jasper, liblzma +Version: 1.8.0-2 +Build-Depends: Description: A full featured cross-platform image library +Default-Features: libpng, tiff, libjpeg, openexr, jasper, lcms + +Feature: libpng +Build-Depends: libpng +Description: Use Libpng for .png (and some .ico) + +Feature: tiff +Build-Depends: tiff +Description: Use Libtiff for .tif support + +Feature: libjpeg +Build-Depends: libjpeg-turbo +Description: Use Libjpeg for .jpg (and some .blp) support + +Feature: openexr +Build-Depends: openexr +Description: Use openexr + +Feature: jasper +Build-Depends: jasper +Description: Use JasPer for .jp2 (and some .icns) support + +Feature: lcms +Build-Depends: lcms +Description: Use Little CMS for color profiles diff --git a/ports/devil/portfile.cmake b/ports/devil/portfile.cmake index f9dc82293..27e8d0eb0 100644 --- a/ports/devil/portfile.cmake +++ b/ports/devil/portfile.cmake @@ -18,9 +18,64 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/enable-static.patch ) +set(IL_NO_PNG 1) +if("libpng" IN_LIST FEATURES) + set(IL_NO_PNG 0) +endif() + +set(IL_NO_TIF 1) +if("libtiff" IN_LIST FEATURES) + set(IL_NO_TIF 0) +endif() + +set(IL_NO_JPG 1) +if("libjpeg" IN_LIST FEATURES) + set(IL_NO_JPG 0) +endif() + +set(IL_NO_EXR 1) +if("openexr" IN_LIST FEATURES) + set(IL_NO_EXR 0) +endif() + +set(IL_NO_JP2 1) +if("jasper" IN_LIST FEATURES) + set(IL_NO_JP2 0) +endif() + +set(IL_NO_MNG 1) +#if("libmng" IN_LIST FEATURES) +# set(IL_NO_MNG 0) +#endif() + +set(IL_NO_LCMS 1) +if("lcms" IN_LIST FEATURES) + set(IL_NO_LCMS 0) +endif() + +set(IL_USE_DXTC_NVIDIA 0) +#if("nvtt" IN_LIST FEATURES) +# set(IL_USE_DXTC_NVIDIA 1) +#endif() + +set(IL_USE_DXTC_SQUISH 0) +#if("libsquish" IN_LIST FEATURES) +# set(IL_USE_DXTC_SQUISH 1) +#endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/DevIL PREFER_NINJA + OPTIONS + -DIL_NO_PNG=${IL_NO_PNG} + -DIL_NO_TIF=${IL_NO_TIF} + -DIL_NO_JPG=${IL_NO_JPG} + -DIL_NO_EXR=${IL_NO_EXR} + -DIL_NO_JP2=${IL_NO_JP2} + -DIL_NO_MNG=${IL_NO_MNG} + -DIL_NO_LCMS=${IL_NO_LCMS} + -DIL_USE_DXTC_NVIDIA=${IL_USE_DXTC_NVIDIA} + -DIL_USE_DXTC_SQUISH=${IL_USE_DXTC_SQUISH} ) vcpkg_install_cmake() -- cgit v1.2.3 From 0c468df7c75831cb61f7b2e833c3f42d86fa558c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 27 Feb 2018 09:42:50 -0800 Subject: [libcds] Initial commit of 2.3.2 --- ports/libcds/CONTROL | 4 ++++ ports/libcds/cmake-install.patch | 31 +++++++++++++++++++++++++++++++ ports/libcds/portfile.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 ports/libcds/CONTROL create mode 100644 ports/libcds/cmake-install.patch create mode 100644 ports/libcds/portfile.cmake diff --git a/ports/libcds/CONTROL b/ports/libcds/CONTROL new file mode 100644 index 000000000..9b0f4c73a --- /dev/null +++ b/ports/libcds/CONTROL @@ -0,0 +1,4 @@ +Source: libcds +Version: 2.3.2 +Build-Depends: boost-system, boost-thread +Description: a collection of concurrent containers that don't require external (manual) synchronization for shared access, and safe memory reclamation (SMR) algorithms like Hazard Pointer and user-space RCU that is used as an epoch-based SMR. diff --git a/ports/libcds/cmake-install.patch b/ports/libcds/cmake-install.patch new file mode 100644 index 000000000..599216614 --- /dev/null +++ b/ports/libcds/cmake-install.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a198e26..e891aee 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,6 +41,10 @@ if(APPLE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_DARWIN_C_SOURCE") + endif() + ++if(MSVC) ++ add_definitions(-DCDS_BUILD_LIB) ++endif() ++ + if(WITH_BOOST_ATOMIC) + if(Boost_FOUND) + if(${Boost_MINOR_VERSION} GREATER 53) +@@ -191,9 +195,13 @@ target_compile_options(${CDS_STATIC_LIBRARY} PUBLIC "${LIBCDS_PUBLIC_CXX_FLAGS}" + target_compile_options(${CDS_SHARED_LIBRARY} PRIVATE "${LIBCDS_PRIVATE_CXX_FLAGS}") + target_compile_options(${CDS_STATIC_LIBRARY} PRIVATE "${LIBCDS_PRIVATE_CXX_FLAGS}") + +-install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT} NAMELINK_SKIP) +-install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY) ++if(NOT DISABLE_INSTALL_SHARED) ++install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT} NAMELINK_SKIP) ++install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY) ++endif() ++if(NOT DISABLE_INSTALL_STATIC) + install(TARGETS ${CDS_STATIC_LIBRARY} EXPORT LibCDSConfig DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT}) ++endif() + install(EXPORT LibCDSConfig FILE LibCDSConfig.cmake NAMESPACE LibCDS:: DESTINATION lib/cmake/LibCDS) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/cds DESTINATION include COMPONENT ${HEADERS_COMPONENT}) + diff --git a/ports/libcds/portfile.cmake b/ports/libcds/portfile.cmake new file mode 100644 index 000000000..f13759c05 --- /dev/null +++ b/ports/libcds/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO khizmax/libcds + REF v2.3.2 + SHA512 f8313f85ae2950a008245603296b63bdbb2f58ead1a453fb287a8ecb96b79edc5b2f8fe33d6027dbc7ead6ccd1bb7ca8dd830091a86760358bb812a39b4ba83f + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake-install.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DISABLE_INSTALL_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" DISABLE_INSTALL_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_UNIT_TEST=OFF + -DENABLE_STRESS_TEST=OFF + -DDISABLE_INSTALL_STATIC=${DISABLE_INSTALL_STATIC} + -DDISABLE_INSTALL_SHARED=${DISABLE_INSTALL_SHARED} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/LibCDS) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcds RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From e033dcd649585791785f750e2d406849976d708d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 27 Feb 2018 10:14:13 -0800 Subject: [gdal] Add early checks for incompatible target settings --- ports/gdal/portfile.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 9bfb92362..5ee981d6c 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -2,6 +2,12 @@ if (TRIPLET_SYSTEM_ARCH MATCHES "arm") message(FATAL_ERROR " ARM is currently not supported.") endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(FATAL_ERROR "GDAL's nmake buildsystem does not support building static libraries") +elseif(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "GDAL's nmake buildsystem does not support static crt linkage") +endif() + include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From 021ea67aef352b38fa207d951cea419a95922ebf Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 27 Feb 2018 10:18:17 -0800 Subject: [cppcms] Early detection and failure for static crt --- ports/cppcms/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/cppcms/portfile.cmake b/ports/cppcms/portfile.cmake index 30371b6f8..328ba20db 100644 --- a/ports/cppcms/portfile.cmake +++ b/ports/cppcms/portfile.cmake @@ -6,7 +6,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() if(VCPKG_CRT_LINKAGE STREQUAL static) - message("cppcms doesn't support static CRT linkage.") + message(FATAL_ERROR "cppcms doesn't support static CRT linkage.") endif() vcpkg_from_github( -- cgit v1.2.3 From fb12a2287ecc53e6a311126327b977cb8b44f5ab Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 27 Feb 2018 10:36:28 -0800 Subject: [x265] Fix static builds --- ports/x265/CONTROL | 2 +- ports/x265/disable-install-pdb.patch | 13 +++++++++++++ ports/x265/portfile.cmake | 15 ++++++++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 ports/x265/disable-install-pdb.patch diff --git a/ports/x265/CONTROL b/ports/x265/CONTROL index c59410bd9..87e1867bd 100644 --- a/ports/x265/CONTROL +++ b/ports/x265/CONTROL @@ -1,3 +1,3 @@ Source: x265 -Version: 2.7 +Version: 2.7-1 Description: x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream. diff --git a/ports/x265/disable-install-pdb.patch b/ports/x265/disable-install-pdb.patch new file mode 100644 index 000000000..4601f2728 --- /dev/null +++ b/ports/x265/disable-install-pdb.patch @@ -0,0 +1,13 @@ +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index e6d49c6..2409caa 100644 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -546,7 +546,7 @@ if(ENABLE_HDR10_PLUS) + ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) + endif() + install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include) +-if(WIN32) ++if(WIN32 AND 0) + if(MSVC_IDE) + install(FILES "${PROJECT_BINARY_DIR}/Debug/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug) + install(FILES "${PROJECT_BINARY_DIR}/RelWithDebInfo/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo) diff --git a/ports/x265/portfile.cmake b/ports/x265/portfile.cmake index 6f4f7cd6d..0ab99b7d2 100644 --- a/ports/x265/portfile.cmake +++ b/ports/x265/portfile.cmake @@ -8,9 +8,18 @@ vcpkg_from_bitbucket( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-install-pdb.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/source PREFER_NINJA + OPTIONS -DENABLE_SHARED=${ENABLE_SHARED} + OPTIONS_DEBUG -DENABLE_CLI=OFF ) vcpkg_install_cmake() @@ -21,7 +30,11 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/x265) file(RENAME ${CURRENT_PACKAGES_DIR}/bin/x265.exe ${CURRENT_PACKAGES_DIR}/tools/x265/x265.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/x265.exe) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +endif() + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/x265) # Handle copyright -- cgit v1.2.3 From a4ad384c931514c2603a5762baa65a9417273b9c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 27 Feb 2018 10:50:47 -0800 Subject: [qpid-proton] Add early detection of invalid linkage settings --- ports/qpid-proton/portfile.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ports/qpid-proton/portfile.cmake b/ports/qpid-proton/portfile.cmake index 91be9aae3..65189c496 100644 --- a/ports/qpid-proton/portfile.cmake +++ b/ports/qpid-proton/portfile.cmake @@ -1,3 +1,12 @@ +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message("qpid-proton does not support static linkage. Building dynamically.") + set(VCPKG_LIBRARY_LINKAGE "dynamic") +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "qpid-proton does not support static CRT linkage.") +endif() + include(vcpkg_common_functions) # Use this throughout rather than literal string -- cgit v1.2.3 From 781cc3261132a8e326347e0792e47206bdadca60 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 27 Feb 2018 11:23:37 -0800 Subject: [coolprop] Fix static linkage --- ports/coolprop/CONTROL | 2 +- ports/coolprop/portfile.cmake | 50 ++++++++++++++++++++----------------------- 2 files changed, 24 insertions(+), 28 deletions(-) diff --git a/ports/coolprop/CONTROL b/ports/coolprop/CONTROL index 16cbefe24..72ccae87b 100644 --- a/ports/coolprop/CONTROL +++ b/ports/coolprop/CONTROL @@ -1,4 +1,4 @@ Source: coolprop -Version: 6.1.0-2 +Version: 6.1.0-3 Description: Thermophysical properties for the masses Build-Depends: catch, eigen3, pybind11, if97, fmt, rapidjson, msgpack, refprop-headers diff --git a/ports/coolprop/portfile.cmake b/ports/coolprop/portfile.cmake index 2e8c61005..c5b3a8cee 100644 --- a/ports/coolprop/portfile.cmake +++ b/ports/coolprop/portfile.cmake @@ -66,12 +66,21 @@ file(APPEND string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" COOLPROP_SHARED_LIBRARY) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" COOLPROP_STATIC_LIBRARY) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" COOLPROP_MSVC_DYNAMIC) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" COOLPROP_MSVC_STATIC) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DCOOLPROP_SHARED_LIBRARY=${COOLPROP_SHARED_LIBRARY} -DCOOLPROP_STATIC_LIBRARY=${COOLPROP_STATIC_LIBRARY} + -DCOOLPROP_MSVC_DYNAMIC=${COOLPROP_MSVC_DYNAMIC} + -DCOOLPROP_MSVC_STATIC=${COOLPROP_MSVC_STATIC} + OPTIONS_RELEASE + -DCOOLPROP_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR} + OPTIONS_DEBUG + -DCOOLPROP_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug ) vcpkg_install_cmake() @@ -83,39 +92,26 @@ else() set(TARGET_FOLDER "static_library") endif() -# Install the headers -file(GLOB COOLPROP_HEADERS "${SOURCE_PATH}/install_root/${TARGET_FOLDER}/*.h") +file(GLOB_RECURSE COOLPROP_HEADERS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.h") file(INSTALL ${COOLPROP_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) -# Install the libs -set(TARGET_FOLDER ${TARGET_FOLDER}/Windows) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(BITS 32bit) -else() - set(BITS 64bit) -endif() - -file(INSTALL - "${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolProp.lib" - DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) +file(GLOB_RECURSE COOLPROP_LIBS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.lib") +file(GLOB_RECURSE COOLPROP_DLLS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.dll") -file(INSTALL - "${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolPropd.lib" - DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) +file(INSTALL ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +if(COOLPROP_DLLS) + file(INSTALL ${COOLPROP_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() -file(INSTALL - "${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolProp.dll" - DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) +file(GLOB_RECURSE COOLPROP_DEBUG_LIBS "${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER}/*.lib") +file(GLOB_RECURSE COOLPROP_DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER}/*.dll") -file(INSTALL - "${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolPropd.dll" - DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) +file(INSTALL ${COOLPROP_DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +if(COOLPROP_DEBUG_DLLS) + file(INSTALL ${COOLPROP_DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER} ${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}) # Handle copyright file( -- cgit v1.2.3 From fd08d14bdbd54a0715dfa1404be5383b01f68187 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Wed, 28 Feb 2018 05:13:57 +0900 Subject: [libgeotiff] fix util link error (#2896) * [libgeotiff] fix util link error * [libgeotiff] Bump package version --- ports/libgeotiff/0006-Fix-utility-link-error.patch | 42 ++++++++++++++++++++++ ports/libgeotiff/CONTROL | 2 +- ports/libgeotiff/portfile.cmake | 1 + 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 ports/libgeotiff/0006-Fix-utility-link-error.patch diff --git a/ports/libgeotiff/0006-Fix-utility-link-error.patch b/ports/libgeotiff/0006-Fix-utility-link-error.patch new file mode 100644 index 000000000..ef0963b26 --- /dev/null +++ b/ports/libgeotiff/0006-Fix-utility-link-error.patch @@ -0,0 +1,42 @@ +From 2625b4a85b6cacf9b6ede3cf30af16eb795044e9 Mon Sep 17 00:00:00 2001 +From: Hiroshi Miura +Date: Sat, 24 Feb 2018 08:36:31 +0900 +Subject: [PATCH 6/6] Fix utility link error + +Signed-off-by: Hiroshi Miura +--- + bin/CMakeLists.txt | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt +index 583ae36..6c6cc21 100644 +--- a/bin/CMakeLists.txt ++++ b/bin/CMakeLists.txt +@@ -6,10 +6,6 @@ + # + ############################################################################### + +-INCLUDE_DIRECTORIES( +- . +- ${CMAKE_SOURCE_DIR}) +- + IF(WIN32 AND MSVC) + SET(GETOPT_SOURCE getopt.c) + ENDIF() +@@ -22,12 +18,11 @@ MESSAGE(STATUS "Adding GeoTIFF utilities to build") + + FOREACH(utility ${GEOTIFF_UTILITIES}) + ADD_EXECUTABLE(${utility} ${utility}.c ${GETOPT_SOURCE}) +- TARGET_LINK_LIBRARIES(${utility} xtiff ${GEOTIFF_LIBRARY_TARGET}) ++ TARGET_LINK_LIBRARIES(${utility} ${GEOTIFF_LIBRARY_TARGET}) + ENDFOREACH() + + ADD_EXECUTABLE(geotifcp geotifcp.c ${GETOPT_SOURCE}) + TARGET_LINK_LIBRARIES(geotifcp +- xtiff + ${GEOTIFF_LIBRARY_TARGET} + ${JPEG_LIBRARIES} + ${ZLIB_LIBRARIES}) +-- +2.16.1 + diff --git a/ports/libgeotiff/CONTROL b/ports/libgeotiff/CONTROL index e737058e8..abd2fbdc5 100644 --- a/ports/libgeotiff/CONTROL +++ b/ports/libgeotiff/CONTROL @@ -1,4 +1,4 @@ Source: libgeotiff -Version: 1.4.2-2 +Version: 1.4.2-3 Description: Libgeotiff is an open source library normally hosted on top of ​libtiff for reading, and writing GeoTIFF information tags. Build-Depends: tiff, proj4, zlib, libjpeg-turbo diff --git a/ports/libgeotiff/portfile.cmake b/ports/libgeotiff/portfile.cmake index 8f78edf4d..65e5fa436 100644 --- a/ports/libgeotiff/portfile.cmake +++ b/ports/libgeotiff/portfile.cmake @@ -18,6 +18,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/0003-Fix-cmake-TIFF-detection.patch" "${CMAKE_CURRENT_LIST_DIR}/0004-Fix-libxtiff-installation.patch" "${CMAKE_CURRENT_LIST_DIR}/0005-Control-shared-library-build-with-option.patch" + "${CMAKE_CURRENT_LIST_DIR}/0006-Fix-utility-link-error.patch" ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) -- cgit v1.2.3 From f272a872d40edc2714f0b326e211e9b181aa65cc Mon Sep 17 00:00:00 2001 From: pravic Date: Tue, 27 Feb 2018 23:15:37 +0300 Subject: [curl] Add support of different features. (#2862) * [curl] Add support of different features. Default-Features: openssl, http2, ssh (as in previous builds) Feature: curl Description: Builds curl executable (placed in the /tools directory) Feature: http-only Description: Disables all protocols except HTTP/HTTPS/HTTP2 Feature: http2 Build-Depends: nghttp2, openssl Description: HTTP2 support (requires openssl) Feature: openssl Build-Depends: openssl Description: SSL support via OpenSSL Feature: winssl Description: SSL support via Schannel Feature: ssh Build-Depends: libssh2 Description: SSH support via libssh2 * [cpr] Add features of the curl library. * [cpr] Remove transitive features * [curl] Remove http2 from default features. Remove winssl feature. Rename "curl" feature to "tool". * [curl] Fixup curl -> tool renaming * [curl] Further refactoring of WINSSL/Openssl -- use single ssl feature. --- ports/cpr/CONTROL | 4 +-- ports/curl/CONTROL | 25 +++++++++++++-- ports/curl/portfile.cmake | 79 +++++++++++++++++++++++++++++++++++------------ 3 files changed, 83 insertions(+), 25 deletions(-) diff --git a/ports/cpr/CONTROL b/ports/cpr/CONTROL index f79ef823c..6a2751073 100644 --- a/ports/cpr/CONTROL +++ b/ports/cpr/CONTROL @@ -1,4 +1,4 @@ Source: cpr -Version: 1.3.0-1 +Version: 1.3.0-3 Description: C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project. -Build-Depends: curl +Build-Depends: curl[core] diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index 6db37600a..e7f13888d 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,24 @@ Source: curl -Version: 7.58.0-1 -Build-Depends: zlib, openssl, libssh2, nghttp2 +Version: 7.58.0-4 +Build-Depends: zlib Description: A library for transferring data with URLs -# For WINSSL create target triplet which contains set(CURL_USE_WINSSL ON) +Default-Features: ssl +# For WINSSL add set(CURL_USE_WINSSL ON) to your triplet file + +Feature: tool +Description: Builds curl executable + +Feature: non-http +Description: Enables protocols beyond HTTP/HTTPS/HTTP2 + +Feature: http2 +Build-Depends: nghttp2, ssl +Description: HTTP2 support + +Feature: ssl +Build-Depends: openssl +Description: SSL support + +Feature: ssh +Build-Depends: libssh2, curl[non-http] +Description: SSH support via libssh2 diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index b13cdb309..ffb73b425 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -14,24 +14,49 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/0002_fix_uwp.patch ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) + # Support HTTP2 TSL Download https://curl.haxx.se/ca/cacert.pem rename to curl-ca-bundle.crt, copy it to libcurl.dll location. -SET(HTTP2_OPTIONS) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - SET(CURL_STATICLIB OFF) - SET(HTTP2_OPTIONS - -DUSE_NGHTTP2=ON - ) -else() - SET(CURL_STATICLIB ON) +set(HTTP2_OPTIONS) +if("http2" IN_LIST FEATURES) + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "The http2 feature cannot be enabled when building for UWP.") + endif() + + set(HTTP2_OPTIONS -DUSE_NGHTTP2=ON) endif() -set(USE_OPENSSL ON) -if(CURL_USE_WINSSL) - set(USE_OPENSSL OFF) - set(USE_WINSSL ON) - set(HTTP2_OPTIONS) ## disable HTTP2 when CURL_USE_WINSSL +# SSL +set(USE_OPENSSL OFF) +set(USE_WINSSL OFF) +if("ssl" IN_LIST FEATURES) + if(CURL_USE_WINSSL) + set(USE_WINSSL ON) + else() + set(USE_OPENSSL ON) + endif() endif() +# SSH +set(USE_LIBSSH2 OFF) +if("ssh" IN_LIST FEATURES) + set(USE_LIBSSH2 ON) +endif() + +# HTTP/HTTPS only +# Note that `HTTP_ONLY` curl option disables everything including HTTPS, which is not an option. +set(USE_HTTP_ONLY ON) +if("non-http" IN_LIST FEATURES) + set(USE_HTTP_ONLY OFF) +endif() + +# curl exe +set(BUILD_CURL_EXE OFF) +if("tool" IN_LIST FEATURES) + set(BUILD_CURL_EXE ON) +endif() + +# UWP targets set(UWP_OPTIONS) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(UWP_OPTIONS @@ -40,7 +65,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -DENABLE_IPV6=OFF -DENABLE_UNIX_SOCKETS=OFF ) - set(HTTP2_OPTIONS) ## disable curl HTTP2 support endif() vcpkg_find_acquire_program(PERL) @@ -54,12 +78,17 @@ vcpkg_configure_cmake( ${UWP_OPTIONS} ${HTTP2_OPTIONS} -DBUILD_TESTING=OFF - -DBUILD_CURL_EXE=OFF + -DBUILD_CURL_EXE=${BUILD_CURL_EXE} -DENABLE_MANUAL=OFF -DCURL_STATICLIB=${CURL_STATICLIB} -DCMAKE_USE_OPENSSL=${USE_OPENSSL} -DCMAKE_USE_WINSSL=${USE_WINSSL} + -DCMAKE_USE_LIBSSH2=${USE_LIBSSH2} + -DHTTP_ONLY=${USE_HTTP_ONLY} + OPTIONS_RELEASE + -DBUILD_CURL_EXE=${BUILD_CURL_EXE} OPTIONS_DEBUG + -DBUILD_CURL_EXE=OFF -DENABLE_DEBUG=ON ) @@ -68,17 +97,27 @@ vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/curl.exe") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/curl") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/curl.exe ${CURRENT_PACKAGES_DIR}/tools/curl/curl.exe) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/curl) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) # Drop debug suffix, as FindCURL.cmake does not look for it - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl.lib) + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d.lib") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl.lib) + endif() else() file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/curl-config ${CURRENT_PACKAGES_DIR}/debug/bin/curl-config) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libcurl_imp.lib ${CURRENT_PACKAGES_DIR}/lib/libcurl.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d_imp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl.lib) + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/libcurl_imp.lib") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libcurl_imp.lib ${CURRENT_PACKAGES_DIR}/lib/libcurl.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d_imp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl.lib) + endif() endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(READ ${CURRENT_PACKAGES_DIR}/include/curl/curl.h CURL_H) -- cgit v1.2.3 From ba3f552b67a76bc62ef4aecdee778ac47abf330c Mon Sep 17 00:00:00 2001 From: Daniel Strommen Date: Tue, 27 Feb 2018 12:24:41 -0800 Subject: Install sqlite3.exe as part of sqlite3 port (#2525) * Install sqlite3.exe as part of sqlite3 port - Modeled after the bzip2 port: If SQLITE3_SKIP_TOOLS is not set, build and install sqlite3.exe as part of the sqlite3 package. sqlite3.dll must also be copied to the tools folder for sqlite3.exe to be able to launch. - Tested on Windows RS3 with VS 2017 15.5.2. * [sqlite3] Separate into tool feature --- ports/sqlite3/CMakeLists.txt | 21 ++++++++++++++------- ports/sqlite3/CONTROL | 5 ++++- ports/sqlite3/portfile.cmake | 12 +++++++++--- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index dbe636b79..f0d6df1ac 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -1,14 +1,13 @@ cmake_minimum_required(VERSION 3.0) project(sqlite3 C) -include_directories(${SOURCE}) +include_directories(.) if(BUILD_SHARED_LIBS) set(API "-DSQLITE_API=__declspec(dllexport)") else() set(API "-DSQLITE_API=extern") endif() -add_library(sqlite3 ${SOURCE}/sqlite3.c) - +add_library(sqlite3 sqlite3.c) target_compile_definitions(sqlite3 PRIVATE $<$:-DSQLITE_DEBUG> @@ -18,14 +17,22 @@ target_compile_definitions(sqlite3 PRIVATE ) target_include_directories(sqlite3 INTERFACE $) -if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") +if(CMAKE_SYSTEM_NAME MATCHES "WindowsStore") target_compile_definitions(sqlite3 PRIVATE -DSQLITE_OS_WINRT=1) endif() -install(TARGETS sqlite3 EXPORT sqlite3Config +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) +endif() + +install(TARGETS sqlite3 EXPORT sqlite3Config RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) -install(FILES ${SOURCE}/sqlite3.h ${SOURCE}/sqlite3ext.h DESTINATION include CONFIGURATIONS Release) -install(EXPORT sqlite3Config DESTINATION share/sqlite3) \ No newline at end of file + +install(FILES sqlite3.h sqlite3ext.h DESTINATION include CONFIGURATIONS Release) +install(EXPORT sqlite3Config DESTINATION share/sqlite3) diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index ccb3a3745..7e39794dd 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,3 +1,6 @@ Source: sqlite3 -Version: 3.21.0 +Version: 3.21.0-1 Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. + +Feature: tool +Description: sqlite3 executable diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index fc06850e2..031eefbf2 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -12,14 +12,20 @@ vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +set(SQLITE3_SKIP_TOOLS ON) +if("tool" IN_LIST FEATURES) + set(SQLITE3_SKIP_TOOLS OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DSOURCE=${SOURCE_PATH} - -DVCPKG_CMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME} + -DSQLITE3_SKIP_TOOLS=${SQLITE3_SKIP_TOOLS} + OPTIONS_DEBUG + -DSQLITE3_SKIP_TOOLS=ON ) -vcpkg_build_cmake() + vcpkg_install_cmake() file(READ ${CURRENT_PACKAGES_DIR}/debug/share/sqlite3/sqlite3Config-debug.cmake SQLITE3_DEBUG_CONFIG) -- cgit v1.2.3 From 0a93f4ec120f03df6368168561b61b6252bd1199 Mon Sep 17 00:00:00 2001 From: martin-s Date: Tue, 27 Feb 2018 23:06:12 +0100 Subject: - Added port nvidia-texture-tools. --- ports/nvtt/CONTROL | 3 +++ ports/nvtt/portfile.cmake | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 ports/nvtt/CONTROL create mode 100644 ports/nvtt/portfile.cmake diff --git a/ports/nvtt/CONTROL b/ports/nvtt/CONTROL new file mode 100644 index 000000000..31ff5ecf4 --- /dev/null +++ b/ports/nvtt/CONTROL @@ -0,0 +1,3 @@ +Source: nvtt +Version: 2.1.0 +Description: Texture processing tools with support for Direct3D 10 and 11 formats. \ No newline at end of file diff --git a/ports/nvtt/portfile.cmake b/ports/nvtt/portfile.cmake new file mode 100644 index 000000000..237a71b65 --- /dev/null +++ b/ports/nvtt/portfile.cmake @@ -0,0 +1,44 @@ +# 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} +# +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO castano/nvidia-texture-tools + REF 2.1.0 + SHA512 6c5c9588af57023fc384de080cbe5c5ccd8707d04a9533384c606efd09730d780cb21bcf2d3576102a3facd2f281cacb2625958d74575e71550fd98da92e38b6 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNVTT_SHARED=0 +) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(REMOVE ${CURRENT_PACKAGES_DIR}/share/doc/nvtt/LICENSE) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nvtt) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/nvtt/LICENSE ${CURRENT_PACKAGES_DIR}/share/nvtt/copyright) -- cgit v1.2.3 From 8dd968cc6e08f371a98eaf014f42ff44efc5ab84 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 27 Feb 2018 12:29:04 -0800 Subject: [c-ares] Update --- ports/c-ares/CONTROL | 2 +- ports/c-ares/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/c-ares/CONTROL b/ports/c-ares/CONTROL index 6b729a5d9..70eb454e4 100644 --- a/ports/c-ares/CONTROL +++ b/ports/c-ares/CONTROL @@ -1,4 +1,4 @@ Source: c-ares -Version: 1.13.0-1 +Version: cares-1_14_0 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 d78878857..14f948ece 100644 --- a/ports/c-ares/portfile.cmake +++ b/ports/c-ares/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO c-ares/c-ares - REF cares-1_13_0 - SHA512 0ee8a45772c64701d0e860cd84925cef8938a319b3004e02e86af900cbd9e07609940bc474a46bf4252b9b7e3815e1951de8f0eb16718074ec1d39c2105a2abe + REF cares-1_14_0 + SHA512 3ae7938648aec2fae651667bef02139f7eef2e7cd425cc310b7e3d56f409646f6170d37a3c9269aa654bfb1ced0a52b89fe49be9023edf8ff57efd0efaf59052 HEAD_REF master ) -- cgit v1.2.3 From 4642191a099ddd578a46ecbb2c08899233e9e754 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Feb 2018 03:40:10 -0800 Subject: [vcpkg-scripts] The shell zip extractor requires full paths --- scripts/VcpkgPowershellUtils.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index d4296857e..80e6fdc1f 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -163,7 +163,7 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, vcpkgCreateDirectoryIfNotExists $destinationPartial $shell = new-object -com shell.application - $zip = $shell.NameSpace($file) + $zip = $shell.NameSpace($(Get-Item $file).fullname) $itemCount = $zip.Items().Count if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') -- cgit v1.2.3 From a7c93cd73eb734699101976c3017a3d33e33ce2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Wed, 28 Feb 2018 14:22:32 +0100 Subject: [discord-rpc] Update to version 3.0.0 (#2904) * [discord-rpc] Update to 3.0.0 * [discord-rpc] Update to 3.0.0 --- ports/discord-rpc/CONTROL | 2 +- ports/discord-rpc/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/discord-rpc/CONTROL b/ports/discord-rpc/CONTROL index 94769dae5..218257e6a 100644 --- a/ports/discord-rpc/CONTROL +++ b/ports/discord-rpc/CONTROL @@ -1,3 +1,3 @@ Source: discord-rpc -Version: 2.1.0 +Version: 3.0.0 Description: Rich Presence allows you to leverage the totally overhauled "Now Playing" section in a Discord user's profile to help people play your game together. diff --git a/ports/discord-rpc/portfile.cmake b/ports/discord-rpc/portfile.cmake index 9c35458a3..88a5fc976 100644 --- a/ports/discord-rpc/portfile.cmake +++ b/ports/discord-rpc/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO discordapp/discord-rpc - REF v2.1.0 - SHA512 24bbc391670bfb53f0501ed189cef8193f35332de9fff3016fc18eb7eab4970d5c90576aa95dfcc4f1ef553e8b1ea781e1e40e595cbbcc1c4200e4ff174369de + REF v3.0.0 + SHA512 d14ae2b33d832c456621fd0abb137450ae9d7eedf2a3d343a82f2b609da3946e501a9d8016f62b3dd0219a0eaf3c47f82d6023960608d670632939e0b35e8167 HEAD_REF master ) -- cgit v1.2.3 From ef4febc7ef08d1aaa3fb97efadf09e2ad2b9464d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Feb 2018 11:54:40 -0800 Subject: [vcpkg] Fix exporting packages with features-depending-on-features --- toolsrc/include/vcpkg/packagespec.h | 4 ---- toolsrc/src/vcpkg/packagespec.cpp | 21 --------------------- toolsrc/src/vcpkg/statusparagraph.cpp | 31 ++++++++++++++++++++++++++++++- 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/toolsrc/include/vcpkg/packagespec.h b/toolsrc/include/vcpkg/packagespec.h index 0a4347639..299a9c401 100644 --- a/toolsrc/include/vcpkg/packagespec.h +++ b/toolsrc/include/vcpkg/packagespec.h @@ -28,10 +28,6 @@ namespace vcpkg static std::vector to_package_specs(const std::vector& ports, const Triplet& triplet); - static std::vector from_dependencies_of_port(const std::string& port, - const std::vector& dependencies, - const Triplet& triplet); - const std::string& name() const; const Triplet& triplet() const; diff --git a/toolsrc/src/vcpkg/packagespec.cpp b/toolsrc/src/vcpkg/packagespec.cpp index a9e072094..789aaca80 100644 --- a/toolsrc/src/vcpkg/packagespec.cpp +++ b/toolsrc/src/vcpkg/packagespec.cpp @@ -112,27 +112,6 @@ namespace vcpkg }); } - std::vector PackageSpec::from_dependencies_of_port(const std::string& port, - const std::vector& dependencies, - const Triplet& triplet) - { - return Util::fmap(dependencies, [&](const std::string& spec_as_string) -> PackageSpec { - auto maybe_spec = PackageSpec::from_name_and_triplet(spec_as_string, triplet); - if (auto spec = maybe_spec.get()) - { - return std::move(*spec); - } - - const PackageSpecParseResult error_type = maybe_spec.error(); - Checks::exit_with_message(VCPKG_LINE_INFO, - "Invalid dependency [%s] in package [%s]\n" - "%s", - spec_as_string, - port, - vcpkg::to_string(error_type)); - }); - } - const std::string& PackageSpec::name() const { return this->m_name; } const Triplet& PackageSpec::triplet() const { return this->m_triplet; } diff --git a/toolsrc/src/vcpkg/statusparagraph.cpp b/toolsrc/src/vcpkg/statusparagraph.cpp index 05238ba8b..62d1d4b42 100644 --- a/toolsrc/src/vcpkg/statusparagraph.cpp +++ b/toolsrc/src/vcpkg/statusparagraph.cpp @@ -86,13 +86,42 @@ namespace vcpkg } std::vector InstalledPackageView::dependencies() const { + // accumulate all features in installed dependencies + // Todo: make this unneeded by collapsing all package dependencies into the core package auto deps = Util::fmap_flatten(features, [](const StatusParagraph* pgh) -> std::vector const& { return pgh->package.depends; }); + // Add the core paragraph dependencies to the list deps.insert(deps.end(), core->package.depends.begin(), core->package.depends.end()); auto&& spec = core->package.spec; - return PackageSpec::from_dependencies_of_port(spec.name(), deps, spec.triplet()); + + // + // This is a hack to work around existing installations that put featurespecs into binary packages + // (example: curl[core]) + for (auto&& dep : deps) + { + dep.erase(std::find(dep.begin(), dep.end(), '['), dep.end()); + } + Util::unstable_keep_if(deps, [&](auto&& e) { return e != spec.name(); }); + // + Util::sort_unique_erase(deps); + + return Util::fmap(deps, [&](const std::string& dep) -> PackageSpec { + auto maybe_dependency_spec = PackageSpec::from_name_and_triplet(dep, spec.triplet()); + if (auto dependency_spec = maybe_dependency_spec.get()) + { + return std::move(*dependency_spec); + } + + const PackageSpecParseResult error_type = maybe_dependency_spec.error(); + Checks::exit_with_message(VCPKG_LINE_INFO, + "Invalid dependency [%s] in package [%s]\n" + "%s", + dep, + spec.name(), + vcpkg::to_string(error_type)); + }); } } -- cgit v1.2.3 From bbbbfb9e79a201a7c479fbc9e8ca14cd8569703d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Feb 2018 12:15:16 -0800 Subject: [vcpkg] Add tests for create_export_plan and remove unused arguments --- toolsrc/include/vcpkg/dependencies.h | 6 +-- toolsrc/src/tests.plan.cpp | 94 ++++++++++++++++++++++++++++++++++++ toolsrc/src/vcpkg/dependencies.cpp | 19 +++----- toolsrc/src/vcpkg/export.cpp | 9 ++-- 4 files changed, 106 insertions(+), 22 deletions(-) diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 6e02e4efd..fadb8cc7e 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -93,7 +93,7 @@ namespace vcpkg::Dependencies enum class ExportPlanType { UNKNOWN, - PORT_AVAILABLE_BUT_NOT_BUILT, + NOT_BUILT, ALREADY_BUILT }; @@ -165,9 +165,7 @@ namespace vcpkg::Dependencies std::vector create_remove_plan(const std::vector& specs, const StatusParagraphs& status_db); - std::vector create_export_plan(const PortFileProvider& port_file_provider, - const VcpkgPaths& paths, - const std::vector& specs, + std::vector create_export_plan(const std::vector& specs, const StatusParagraphs& status_db); std::vector create_feature_install_plan(const std::unordered_map& map, diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index aae4d2ee4..08d3c1dab 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -997,4 +997,98 @@ namespace UnitTest1 features_check(&plan[1], "a", {"core", "a1"}); } }; + + class ExportPlanTests : public TestClass + { + TEST_METHOD(basic_export_scheme) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a"); + + auto plan = Dependencies::create_export_plan({spec_a}, status_db); + + Assert::AreEqual(size_t(1), plan.size()); + Assert::AreEqual("a", plan[0].spec.name().c_str()); + Assert::IsTrue(plan[0].plan_type == Dependencies::ExportPlanType::ALREADY_BUILT); + } + + TEST_METHOD(basic_export_scheme_with_recurse) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + pghs.push_back(make_status_pgh("b", "a")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a"); + auto spec_b = spec_map.emplace("b", "a"); + + auto plan = Dependencies::create_export_plan({spec_b}, status_db); + + Assert::AreEqual(size_t(2), plan.size()); + Assert::AreEqual("a", plan[0].spec.name().c_str()); + Assert::IsTrue(plan[0].plan_type == Dependencies::ExportPlanType::ALREADY_BUILT); + + Assert::AreEqual("b", plan[1].spec.name().c_str()); + Assert::IsTrue(plan[1].plan_type == Dependencies::ExportPlanType::ALREADY_BUILT); + } + + TEST_METHOD(basic_export_scheme_with_bystander) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + pghs.push_back(make_status_pgh("b")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a"); + auto spec_b = spec_map.emplace("b", "a"); + + auto plan = Dependencies::create_export_plan({spec_a}, status_db); + + Assert::AreEqual(size_t(1), plan.size()); + Assert::AreEqual("a", plan[0].spec.name().c_str()); + Assert::IsTrue(plan[0].plan_type == Dependencies::ExportPlanType::ALREADY_BUILT); + } + + TEST_METHOD(basic_export_scheme_with_missing) + { + StatusParagraphs status_db; + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a"); + + auto plan = Dependencies::create_export_plan({spec_a}, status_db); + + Assert::AreEqual(size_t(1), plan.size()); + Assert::AreEqual("a", plan[0].spec.name().c_str()); + Assert::IsTrue(plan[0].plan_type == Dependencies::ExportPlanType::NOT_BUILT); + } + + TEST_METHOD(basic_upgrade_scheme_with_features) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("b")); + pghs.push_back(make_status_pgh("a")); + pghs.push_back(make_status_feature_pgh("a", "a1", "b[core]")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a", "", {{"a1", ""}}); + + auto plan = Dependencies::create_export_plan({spec_a}, status_db); + + Assert::AreEqual(size_t(2), plan.size()); + + Assert::AreEqual("b", plan[0].spec.name().c_str()); + Assert::IsTrue(plan[0].plan_type == Dependencies::ExportPlanType::ALREADY_BUILT); + + Assert::AreEqual("a", plan[1].spec.name().c_str()); + Assert::IsTrue(plan[1].plan_type == Dependencies::ExportPlanType::ALREADY_BUILT); + } + }; } diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index f4a371a2e..1f853014b 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -223,7 +223,7 @@ namespace vcpkg::Dependencies } ExportPlanAction::ExportPlanAction(const PackageSpec& spec, const RequestType& request_type) - : spec(spec), plan_type(ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT), request_type(request_type) + : spec(spec), plan_type(ExportPlanType::NOT_BUILT), request_type(request_type) { } @@ -349,23 +349,16 @@ namespace vcpkg::Dependencies return Graphs::topological_sort(specs, RemoveAdjacencyProvider{status_db, installed_ports, specs_as_set}); } - std::vector create_export_plan(const PortFileProvider& port_file_provider, - const VcpkgPaths& paths, - const std::vector& specs, + std::vector create_export_plan(const std::vector& specs, const StatusParagraphs& status_db) { struct ExportAdjacencyProvider final : Graphs::AdjacencyProvider { - const VcpkgPaths& paths; const StatusParagraphs& status_db; - const PortFileProvider& provider; const std::unordered_set& specs_as_set; - ExportAdjacencyProvider(const VcpkgPaths& p, - const StatusParagraphs& s, - const PortFileProvider& prov, - const std::unordered_set& specs_as_set) - : paths(p), status_db(s), provider(prov), specs_as_set(specs_as_set) + ExportAdjacencyProvider(const StatusParagraphs& s, const std::unordered_set& specs_as_set) + : status_db(s), specs_as_set(specs_as_set) { } @@ -394,8 +387,8 @@ namespace vcpkg::Dependencies }; const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); - std::vector toposort = Graphs::topological_sort( - specs, ExportAdjacencyProvider{paths, status_db, port_file_provider, specs_as_set}); + std::vector toposort = + Graphs::topological_sort(specs, ExportAdjacencyProvider{status_db, specs_as_set}); return toposort; } diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index a9c407dd8..831058007 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -69,7 +69,7 @@ namespace vcpkg::Export static void print_plan(const std::map>& group_by_plan_type) { static constexpr std::array ORDER = {ExportPlanType::ALREADY_BUILT, - ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT}; + ExportPlanType::NOT_BUILT}; static constexpr Build::BuildPackageOptions build_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES}; @@ -92,7 +92,7 @@ namespace vcpkg::Export case ExportPlanType::ALREADY_BUILT: System::println("The following packages are already built and will be exported:\n%s", as_string); continue; - case ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT: + case ExportPlanType::NOT_BUILT: System::println("The following packages need to be built:\n%s", as_string); continue; default: Checks::unreachable(VCPKG_LINE_INFO); @@ -486,8 +486,7 @@ 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); - std::vector export_plan = - Dependencies::create_export_plan(provider, paths, opts.specs, status_db); + 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"); std::map> group_by_plan_type; @@ -505,7 +504,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console "Additional packages (*) need to be exported to complete this operation."); } - const auto it = group_by_plan_type.find(ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT); + const auto it = group_by_plan_type.find(ExportPlanType::NOT_BUILT); if (it != group_by_plan_type.cend() && !it->second.empty()) { System::println(System::Color::error, "There are packages that have not been built."); -- cgit v1.2.3 From 8361b44fcdb1d7b0535afe6a22a4aa880b05ed5e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Feb 2018 14:20:17 -0800 Subject: [tiny-dnn] Fix regression during upgrade --- ports/tiny-dnn/CONTROL | 2 +- ports/tiny-dnn/portfile.cmake | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ports/tiny-dnn/CONTROL b/ports/tiny-dnn/CONTROL index bb16f127a..550eb4d98 100644 --- a/ports/tiny-dnn/CONTROL +++ b/ports/tiny-dnn/CONTROL @@ -1,3 +1,3 @@ Source: tiny-dnn -Version: 2018-02-25 +Version: 2018-02-25-1 Description: A C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource. diff --git a/ports/tiny-dnn/portfile.cmake b/ports/tiny-dnn/portfile.cmake index 7357eb7c8..686c5e161 100644 --- a/ports/tiny-dnn/portfile.cmake +++ b/ports/tiny-dnn/portfile.cmake @@ -8,8 +8,7 @@ vcpkg_from_github( HEAD_REF master ) -file(INSTALL ${SOURCE_PATH}/tiny_dnn DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/tiny_dnn DESTINATION ${CURRENT_PACKAGES_DIR}/include/) - -file(COPY ${CURRENT_BUILDTREES_DIR}/src/tiny-dnn-dd906fed8c8aff8dc837657c42f9d55f8b793b0e/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiny-dnn) - file(RENAME ${CURRENT_PACKAGES_DIR}/share/tiny-dnn/LICENSE ${CURRENT_PACKAGES_DIR}/share/tiny-dnn/copyright) \ No newline at end of file +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiny-dnn) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/tiny-dnn/LICENSE ${CURRENT_PACKAGES_DIR}/share/tiny-dnn/copyright) -- cgit v1.2.3 From f3463c4867df66b8f91adc4e2aa795b59997eb9d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 28 Feb 2018 17:48:31 -0800 Subject: [bootstrap] Fix reference to xml file --- scripts/bootstrap.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index bc94aecc8..a3c842dc0 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -16,8 +16,7 @@ try { [xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" $toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"git`"]") - $postExtractionExecutableRelativePath = $toolData.postExtractionExecutableRelativePath - $gitFromDownload = "$vcpkgRootDir\downloads\$postExtractionExecutableRelativePath" + $gitFromDownload = "$vcpkgRootDir\downloads\$($toolData.exeRelativePath)" $gitDir = split-path -parent $gitFromDownload $env:path += ";$gitDir" -- cgit v1.2.3 From d979d9b491192764729e82c619d28baaf2d21031 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 28 Feb 2018 18:06:54 -0800 Subject: Fix issue when isPrerelease is not available --- scripts/VcpkgPowershellUtils.ps1 | 5 +++++ scripts/findVisualStudioInstallationInstances.ps1 | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 80e6fdc1f..088519c37 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -3,6 +3,11 @@ function vcpkgHasModule([Parameter(Mandatory=$true)][string]$moduleName) return [bool](Get-Module -ListAvailable -Name $moduleName) } +function vcpkgHasProperty([Parameter(Mandatory=$true)]$object, [Parameter(Mandatory=$true)]$propertyName) +{ + return [bool]($object.psobject.Properties | where { $_.Name -eq "$propertyName"}) +} + function vcpkgCreateDirectoryIfNotExists([Parameter(Mandatory=$true)][string]$dirPath) { if (!(Test-Path $dirPath)) diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 index fba5f447e..cb51c345d 100644 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ b/scripts/findVisualStudioInstallationInstances.ps1 @@ -2,8 +2,10 @@ param( ) - +Set-StrictMode -Version Latest $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition +. "$scriptsDir\VcpkgPowershellUtils.ps1" + $vswhereExe = (& $scriptsDir\fetchTool.ps1 "vswhere") -replace "::" -replace "::" $output = & $vswhereExe -prerelease -legacy -products * -format xml @@ -14,7 +16,13 @@ foreach ($instance in $asXml.instances.instance) { $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash $installationVersion = $instance.InstallationVersion - $isPrerelease = $instance.IsPrerelease + + $isPrerelease = -7 + if (vcpkgHasProperty -object $instance -propertyName "isPrerelease") + { + $isPrerelease = $instance.isPrerelease + } + if ($isPrerelease -eq 0) { $releaseType = "PreferenceWeight3::StableRelease" -- cgit v1.2.3 From 6e0b74c7846216f1483949270df899415908cdf0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 28 Feb 2018 18:43:41 -0800 Subject: [vcpkgHasProperty] Return false if property doesn't exist --- scripts/VcpkgPowershellUtils.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 088519c37..2dbf04085 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -3,8 +3,13 @@ function vcpkgHasModule([Parameter(Mandatory=$true)][string]$moduleName) return [bool](Get-Module -ListAvailable -Name $moduleName) } -function vcpkgHasProperty([Parameter(Mandatory=$true)]$object, [Parameter(Mandatory=$true)]$propertyName) +function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) { + if ($object -eq $null) + { + return $false + } + return [bool]($object.psobject.Properties | where { $_.Name -eq "$propertyName"}) } -- cgit v1.2.3 From 90cf4371c3852a69477dd165538edec04b525e25 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 28 Feb 2018 18:44:02 -0800 Subject: [getWindowsSDK.ps1] Fix error when registry key was not found --- scripts/getWindowsSDK.ps1 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 index ed2fd11c7..d5e2f59a2 100644 --- a/scripts/getWindowsSDK.ps1 +++ b/scripts/getWindowsSDK.ps1 @@ -7,6 +7,10 @@ param( [switch]$DisableWin81SDK = $False ) +Set-StrictMode -Version Latest +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition +. "$scriptsDir\VcpkgPowershellUtils.ps1" + if ($DisableWin10SDK -and $DisableWin81SDK) { throw "Both Win10SDK and Win81SDK were disabled." @@ -61,8 +65,10 @@ function CheckWindows10SDK($path) Write-Verbose "`n" Write-Verbose "Looking for Windows 10 SDK" -CheckWindows10SDK((Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue).KitsRoot10) -CheckWindows10SDK((Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue).KitsRoot10) +$regkey10 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue +$regkey10Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue +if (vcpkgHasProperty -object $regkey10 "KitsRoot10") { CheckWindows10SDK($regkey10.KitsRoot10) } +if (vcpkgHasProperty -object $regkey10Wow6432 "KitsRoot10") { CheckWindows10SDK($regkey10Wow6432.KitsRoot10) } CheckWindows10SDK("$env:ProgramFiles\Windows Kits\10") CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") @@ -89,8 +95,10 @@ function CheckWindows81SDK($path) Write-Verbose "`n" Write-Verbose "Looking for Windows 8.1 SDK" -CheckWindows81SDK((Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue).KitsRoot81) -CheckWindows81SDK((Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue).KitsRoot81) +$regkey81 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue +$regkey81Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue +if (vcpkgHasProperty -object $regkey81 "KitsRoot81") { CheckWindows81SDK($regkey81.KitsRoot81) } +if (vcpkgHasProperty -object $regkey81Wow6432 "KitsRoot81") { CheckWindows81SDK($regkey81Wow6432.KitsRoot81) } CheckWindows81SDK("$env:ProgramFiles\Windows Kits\8.1") CheckWindows81SDK("${env:ProgramFiles(x86)}\Windows Kits\8.1") -- cgit v1.2.3 From 2d2ff28c772a78fa76a656f1a66e04eeea9c879f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 28 Feb 2018 18:44:57 -0800 Subject: [bootstrap] Set-StrictMode to latest --- scripts/bootstrap.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index a3c842dc0..c8ba503d8 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -3,13 +3,12 @@ param( [ValidateNotNullOrEmpty()][string]$disableMetrics = "0", [Parameter(Mandatory=$False)][string]$withVSPath = "" ) - +Set-StrictMode -Version Latest $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition . "$scriptsDir\VcpkgPowershellUtils.ps1" $vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root Write-Verbose("vcpkg Path " + $vcpkgRootDir) - $gitHash = "unknownhash" $oldpath = $env:path try -- cgit v1.2.3 From bbe0aa9230ffa919bec4c3e2b8f51acf4ac052b7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 28 Feb 2018 18:51:25 -0800 Subject: [fetchTool.ps1] Set-StrictMode to Latest --- scripts/fetchTool.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 1f72bb39e..2c2f599ef 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -3,6 +3,7 @@ param( [Parameter(Mandatory=$true)][string]$tool ) +Set-StrictMode -Version Latest $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition . "$scriptsDir\VcpkgPowershellUtils.ps1" @@ -31,7 +32,8 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) return $exePath } - if ($toolData.archiveRelativePath) + $isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath" + if ($isArchive) { $downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)" } @@ -52,7 +54,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) $downloadedFileHash = vcpkgGetSHA256 $downloadPath vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash - if ($toolData.archiveRelativePath) + if ($isArchive) { $outFilename = (Get-ChildItem $downloadPath).BaseName Write-Host "Extracting $tool..." -- cgit v1.2.3 From 1fb3785beed7dfb24c796619d3c596f34758298e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 28 Feb 2018 18:59:51 -0800 Subject: [findMSBuild.ps1] Set-StrictMode to Latest --- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 index 570ebdf44..d7fd24e24 100644 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 @@ -4,9 +4,11 @@ param( [string]$withVSPath = "" ) +Set-StrictMode -Version Latest +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition + $withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition $VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 if ($VisualStudioInstallationInstances -eq $null) { -- cgit v1.2.3 From b21c895ca59f3e7260c3a2a81ad88820fe9c1b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nagy-Egri=20M=C3=A1t=C3=A9=20Ferenc?= Date: Thu, 1 Mar 2018 17:08:53 +0100 Subject: Add OpenCL SDK and clMath ports (#2837) * initial clFFT porting * OpenCL SDK half baked * Tried fixing Debug/Release * Remove DLL deployment * OpenCL SDK installs * clFFT installs * clFFT properly depends on OpenCL * OpenCL SDK fixes and clFFT patches * [clfft][opencl] Simplification, use patches instead of full files. --- ports/clfft/CONTROL | 4 ++ ports/clfft/portfile.cmake | 37 +++++++++++++++++ ports/clfft/tweak-install.patch | 28 +++++++++++++ ports/opencl/CONTROL | 3 ++ ports/opencl/portfile.cmake | 90 +++++++++++++++++++++++++++++++++++++++++ ports/opencl/usage | 7 ++++ 6 files changed, 169 insertions(+) create mode 100644 ports/clfft/CONTROL create mode 100644 ports/clfft/portfile.cmake create mode 100644 ports/clfft/tweak-install.patch create mode 100644 ports/opencl/CONTROL create mode 100644 ports/opencl/portfile.cmake create mode 100644 ports/opencl/usage diff --git a/ports/clfft/CONTROL b/ports/clfft/CONTROL new file mode 100644 index 000000000..0a109ac14 --- /dev/null +++ b/ports/clfft/CONTROL @@ -0,0 +1,4 @@ +Source: clfft +Version: 2.12.2 +Build-Depends: opencl +Description: clFFT is an OpenCL 1.2 accelerated Fast Fourier Transform library. diff --git a/ports/clfft/portfile.cmake b/ports/clfft/portfile.cmake new file mode 100644 index 000000000..4e314b5d9 --- /dev/null +++ b/ports/clfft/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO clMathLibraries/clFFT + REF v2.12.2 + SHA512 19e9a4e06f76ae7c7808d1188677d5553c43598886a75328b7801ab2ca68e35206839a58fe2f958a44a6f7c83284dc9461cd0e21c37d1042bf82e24aad066be8 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/tweak-install.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA + OPTIONS + -DBUILD_LOADLIBRARIES=OFF + -DBUILD_EXAMPLES=OFF + -DSUFFIX_LIB= +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL + "${SOURCE_PATH}/LICENSE" + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/clfft/copyright +) + +vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/clfft/tweak-install.patch b/ports/clfft/tweak-install.patch new file mode 100644 index 000000000..45952032f --- /dev/null +++ b/ports/clfft/tweak-install.patch @@ -0,0 +1,28 @@ +diff --git a/src/clFFTConfig.cmake.in b/src/clFFTConfig.cmake.in +index 5b58c35..ee749a2 100644 +--- a/src/clFFTConfig.cmake.in ++++ b/src/clFFTConfig.cmake.in +@@ -1,3 +1,3 @@ + include(${CMAKE_CURRENT_LIST_DIR}/clFFTTargets.cmake) +-get_filename_component(CLFFT_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/@reldir@/include ABSOLUTE) ++get_filename_component(CLFFT_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/@reldir@/../include ABSOLUTE) + set(CLFFT_LIBRARIES clFFT) +diff --git a/src/library/CMakeLists.txt b/src/library/CMakeLists.txt +index 132ef86..12ba905 100644 +--- a/src/library/CMakeLists.txt ++++ b/src/library/CMakeLists.txt +@@ -90,6 +90,7 @@ target_link_libraries( clFFT ${OPENCL_LIBRARIES} ${CMAKE_DL_LIBS} ) + set_target_properties( clFFT PROPERTIES VERSION ${CLFFT_VERSION} ) + set_target_properties( clFFT PROPERTIES SOVERSION ${CLFFT_SOVERSION} ) + set_target_properties( clFFT PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" ) ++set_target_properties( clFFT PROPERTIES INTERFACE_INCLUDE_DIRECTORIES $ ) + + if( CMAKE_COMPILER_IS_GNUCC ) + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/clFFT.pc.in +@@ -104,5 +105,5 @@ install( TARGETS clFFT + EXPORT Library + RUNTIME DESTINATION bin${SUFFIX_BIN} + LIBRARY DESTINATION lib${SUFFIX_LIB} +- ARCHIVE DESTINATION lib${SUFFIX_LIB}/import ++ ARCHIVE DESTINATION lib${SUFFIX_LIB} + ) diff --git a/ports/opencl/CONTROL b/ports/opencl/CONTROL new file mode 100644 index 000000000..89d4ad0e1 --- /dev/null +++ b/ports/opencl/CONTROL @@ -0,0 +1,3 @@ +Source: opencl +Version: 2.2 (2017.07.18) +Description: C/C++ headers and ICD loader (Installable Client Driver) for OpenCL diff --git a/ports/opencl/portfile.cmake b/ports/opencl/portfile.cmake new file mode 100644 index 000000000..f7e1bdd2f --- /dev/null +++ b/ports/opencl/portfile.cmake @@ -0,0 +1,90 @@ +include(vcpkg_common_functions) + +# OpenCL C headers +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/OpenCL-Headers + REF f039db6764d52388658ef15c30b2237bbda49803 + SHA512 5909a85f96477d731059528303435f06255e98ed8df9d4cd2b62c744b5fe41408c69c0d4068421a2813eb9ad9d70d7f1bace9ebf0db19cc09e71bb8066127c5f + HEAD_REF master +) + +file(INSTALL + "${SOURCE_PATH}/opencl22/CL" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include +) + +# OpenCL C++ headers +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/OpenCL-CLHPP + REF 5dd8bb9e32a8e2f72621566b296ac8143a554270 + SHA512 2909fe2b979b52724ef8d285180d8bfd30bdd56cb79da4effc9e03b576ec7edb5497c99a9fa30541fe63037c84ddef21d4a73e7927f3813baab2a2afeecd55ab + HEAD_REF master +) + +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_execute_required_process( + COMMAND "${PYTHON3}" "${SOURCE_PATH}/gen_cl_hpp.py" + -i ${SOURCE_PATH}/input_cl.hpp + -o ${CURRENT_PACKAGES_DIR}/include/CL/cl.hpp + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME generate_clhpp-${TARGET_TRIPLET} +) + +vcpkg_execute_required_process( + COMMAND "${PYTHON3}" "${SOURCE_PATH}/gen_cl_hpp.py" + -i ${SOURCE_PATH}/input_cl2.hpp + -o ${CURRENT_PACKAGES_DIR}/include/CL/cl2.hpp + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME generate_cl2hpp-${TARGET_TRIPLET} +) +message(STATUS "Generating OpenCL C++ headers done") + +# OpenCL ICD loader +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/OpenCL-ICD-Loader + REF 26a38983cbe5824fd5be03eab8d037758fc44360 + SHA512 3029f758ff0c39b57aa10d881af68e73532fd179c54063ed1d4529b7d6e27a5219e3c24b7fb5598d790ebcdc2441e00001a963671dc90fef2fc377c76d724f54 + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(STATUS "Building the ICD loader as a static library is not supported. Building as DLLs instead.") + set(VCPKG_LIBRARY_LINKAGE "dynamic") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPENCL_INCLUDE_DIRS=${CURRENT_PACKAGES_DIR}/include +) + +vcpkg_build_cmake(TARGET OpenCL) + +file(INSTALL + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/OpenCL.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/OpenCL.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/lib +) + +file(INSTALL + "${SOURCE_PATH}/LICENSE.txt" + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright +) +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/usage + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/${PORT} +) diff --git a/ports/opencl/usage b/ports/opencl/usage new file mode 100644 index 000000000..699ff0170 --- /dev/null +++ b/ports/opencl/usage @@ -0,0 +1,7 @@ +The package opencl is compatible with built-in CMake targets: + + find_package(OpenCL REQUIRED) + target_link_libraries(main PRIVATE ${OpenCL_LIBRARIES}) + target_include_directories(main PRIVATE ${OpenCL_INCLUDE_DIRS}) + +You will also need to install an appropriate driver package from your CPU/GPU manufacturer. -- cgit v1.2.3 From 9c10548fe995ec5499f2c3be1a594834804756da Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Thu, 1 Mar 2018 17:30:03 +0100 Subject: [gflags] remove old patch, fixed upstream, introduce a new patch to fix wrong config path (#2917) * [gflags] remove patch, fixed upstream * [gflags] fix gflags-config.cmake wrong path --- ports/gflags/0001-patch-dir.patch | 13 +++++++++++++ ports/gflags/CONTROL | 2 +- ports/gflags/portfile.cmake | 3 ++- ports/gflags/revert-fix-install.patch | 15 --------------- 4 files changed, 16 insertions(+), 17 deletions(-) create mode 100644 ports/gflags/0001-patch-dir.patch delete mode 100644 ports/gflags/revert-fix-install.patch diff --git a/ports/gflags/0001-patch-dir.patch b/ports/gflags/0001-patch-dir.patch new file mode 100644 index 000000000..d3aaa00fb --- /dev/null +++ b/ports/gflags/0001-patch-dir.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3709073..8e919cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -503,7 +503,7 @@ endif () + # ---------------------------------------------------------------------------- + # installation rules + set (EXPORT_NAME ${PACKAGE_NAME}-targets) +-file (RELATIVE_PATH INSTALL_PREFIX_REL2CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/${CONFIG_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}") ++set (INSTALL_PREFIX_REL2CONFIG_DIR "../..") + configure_file (cmake/config.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-install.cmake" @ONLY) + configure_file (cmake/version.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-version.cmake" @ONLY) + diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index a1bcb795c..72f2937b7 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.2.1-1 +Version: 2.2.1-2 Description: A C++ library that implements commandline flags processing diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index dcbbb7426..7e316c83b 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -14,7 +14,8 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/revert-fix-install.patch" + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-patch-dir.patch # gflags was estimating a wrong relative path between the gflags-config.cmake file and the include path; "../.." goes from share/gflags/ to the triplet root ) vcpkg_configure_cmake( diff --git a/ports/gflags/revert-fix-install.patch b/ports/gflags/revert-fix-install.patch deleted file mode 100644 index 80793b65c..000000000 --- a/ports/gflags/revert-fix-install.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 922a038..7d6af45 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -410,8 +410,8 @@ if (OS_WINDOWS) - set (RUNTIME_INSTALL_DIR "bin") - set (LIBRARY_INSTALL_DIR "lib") - set (INCLUDE_INSTALL_DIR "include") -- set (CONFIG_INSTALL_DIR "share/${PACKAGE_NAME}") -- set (PKGCONFIG_INSTALL_DIR "") -+ set (CONFIG_INSTALL_DIR "lib/cmake/${PACKAGE_NAME}") -+ set (PKGCONFIG_INSTALL_DIR) - else () - set (RUNTIME_INSTALL_DIR bin) - # The LIB_INSTALL_DIR and LIB_SUFFIX variables are used by the Fedora -- cgit v1.2.3 From 1fb4d8dc29975a9950317c0d7363bfa0971d2044 Mon Sep 17 00:00:00 2001 From: Alisayyy-Yang Date: Thu, 1 Mar 2018 08:30:22 -0800 Subject: change the hash value to the expected value (#2916) --- ports/realsense2/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index 49bca7188..b58be1ebe 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -4,7 +4,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense REF v2.10.0 - SHA512 b00cd4617d59197f7baa40d5a4833027c2b0c45e3e67047dce38e9415905ecf78c1ee9fe499c8e3292b54b8de8e96064001d0f154fdb10b2c64c19a8162db6d1 + SHA512 af5f77eb69620e8485bbe0b7c82c405ed518c50b3319e4c174c002180c4842d5dbfaab354051ed4b287effac58ae93dd1160ebc27d35def58e685874a89c02ee HEAD_REF master ) -- cgit v1.2.3 From 87c45c0b53d4b33215e30544d349bbf7a8c699bd Mon Sep 17 00:00:00 2001 From: Alisayyy-Yang Date: Thu, 1 Mar 2018 08:30:47 -0800 Subject: upgrade the version of live555 (#2915) --- ports/live555/CONTROL | 2 +- ports/live555/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/live555/CONTROL b/ports/live555/CONTROL index 4197a3595..07b93da6b 100644 --- a/ports/live555/CONTROL +++ b/ports/live555/CONTROL @@ -1,3 +1,3 @@ Source: live555 -Version: 2018.02.18 +Version: 2018.02.28 Description: A complete RTSP server application diff --git a/ports/live555/portfile.cmake b/ports/live555/portfile.cmake index 9e942d046..d3ac4f51d 100644 --- a/ports/live555/portfile.cmake +++ b/ports/live555/portfile.cmake @@ -4,12 +4,12 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") endif() include(vcpkg_common_functions) -set(LIVE_VERSION 2018.02.18) +set(LIVE_VERSION 2018.02.28) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIVE_VERSION}/live) vcpkg_download_distfile(ARCHIVE URLS "http://www.live555.com/liveMedia/public/live.${LIVE_VERSION}.tar.gz" FILENAME "live.${LIVE_VERSION}.tar.gz" - SHA512 9f72f63df4ce763bf1d106814bfc049562cd909ab96fe3e27e13372ce841e53b89ef302af1743fe83fe3a6aa2ba3c1882bd4184155d3674e0fb3c690b4cebf17 + SHA512 0e445d0b494d82e5826ecea2ec4196472781d3524d2fea95efef83ec5dc0d211334e3ea34dc83b758ed847e2b4290727b299b4118133ca2468911c7cb2053a55 ) vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/${LIVE_VERSION}) -- cgit v1.2.3 From 045c80a7f465d3a037fa2488f37d044f84c79625 Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Thu, 1 Mar 2018 17:31:14 +0100 Subject: configure debug before release (#2911) --- scripts/cmake/vcpkg_configure_cmake.cmake | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 9bb7d6da3..724446f92 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -107,7 +107,7 @@ function(vcpkg_configure_cmake) else() 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 if(GENERATOR STREQUAL "Ninja") vcpkg_find_acquire_program(NINJA) @@ -252,17 +252,6 @@ function(vcpkg_configure_cmake) ) message(STATUS "Configuring ${TARGET_TRIPLET} done") else() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Configuring ${TARGET_TRIPLET}-rel") - file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - vcpkg_execute_required_process( - COMMAND ${rel_command} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - LOGNAME config-${TARGET_TRIPLET}-rel - ) - message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") - endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) @@ -273,7 +262,18 @@ function(vcpkg_configure_cmake) ) message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + vcpkg_execute_required_process( + COMMAND ${rel_command} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + endif() endif() set(_VCPKG_CMAKE_GENERATOR "${GENERATOR}" PARENT_SCOPE) -endfunction() \ No newline at end of file +endfunction() -- cgit v1.2.3 From e836ea08008d1a9fd5841590a959052aa70f25bf Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 1 Mar 2018 08:44:25 -0800 Subject: [liblzma] Switch sources to github mirror. Fixes #2913 --- ports/liblzma/portfile.cmake | 72 +++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/ports/liblzma/portfile.cmake b/ports/liblzma/portfile.cmake index 34aa83e77..81c43a0f8 100644 --- a/ports/liblzma/portfile.cmake +++ b/ports/liblzma/portfile.cmake @@ -1,35 +1,37 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xz-5.2.3) -vcpkg_download_distfile(ARCHIVE - URLS "http://tukaani.org/xz/xz-5.2.3.tar.gz" - FILENAME "xz-5.2.3.tar.gz" - SHA512 a5eb4f707cf31579d166a6f95dbac45cf7ea181036d1632b4f123a4072f502f8d57cd6e7d0588f0bf831a07b8fc4065d26589a25c399b95ddcf5f73435163da6) - -vcpkg_extract_source_archive(${ARCHIVE}) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS_DEBUG - -DLIBLZMA_SKIP_HEADERS=ON) - -vcpkg_install_cmake() -vcpkg_copy_pdbs() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/auto-define-lzma-api-static.patch) -endif() - -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/liblzma/COPYING ${CURRENT_PACKAGES_DIR}/share/liblzma/copyright) - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xz-mirror/xz + REF v5.2.3 + SHA512 d126666e58c6536aa7ae6aa6aac480f421e25aa61c4b5e7adb3de7b99423275a94d583ceaf0b15d559eaf9bc9be18f381cd46e49b1f8cb238c1d715876731063 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DLIBLZMA_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/auto-define-lzma-api-static.patch) +endif() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/liblzma/COPYING ${CURRENT_PACKAGES_DIR}/share/liblzma/copyright) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma) -- cgit v1.2.3 From e70250ca199f9e55c88c242ee980313b8acb45e5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 1 Mar 2018 10:36:13 -0800 Subject: [vcpkg] Improve handling of HDF5 targets --- scripts/buildsystems/vcpkg.cmake | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index d5108471f..7b738bd5e 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -233,12 +233,22 @@ macro(find_package name) elseif("${name}" STREQUAL "tinyxml2") _find_package(${ARGV}) if(TARGET tinyxml2_static AND NOT TARGET tinyxml2) - add_library(tinyxml2 INTERFACE IMPORTED) + _add_library(tinyxml2 INTERFACE IMPORTED) set_target_properties(tinyxml2 PROPERTIES INTERFACE_LINK_LIBRARIES "tinyxml2_static") endif() - elseif("${name}" STREQUAL "HDF5" AND NOT PROJECT_NAME STREQUAL "VTK") + elseif(("${name}" STREQUAL "HDF5" OR "${name}" STREQUAL "hdf5") AND NOT PROJECT_NAME STREQUAL "VTK") # This is a hack to make VTK work. TODO: find another way to suppress the built-in find module. _find_package(${ARGV} CONFIG) + # Fill in missing static/shared targets + foreach(HDF5TARGET hdf5 hdf5_hl hdf5_cpp hdf5_hl_cpp) + if(TARGET hdf5::${HDF5TARGET}-static AND NOT TARGET hdf5::${HDF5TARGET}-shared) + _add_library(hdf5::${HDF5TARGET}-shared INTERFACE IMPORTED) + set_target_properties(hdf5::${HDF5TARGET}-shared PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::${HDF5TARGET}-static") + elseif(TARGET hdf5::${HDF5TARGET}-shared AND NOT TARGET hdf5::${HDF5TARGET}-static) + _add_library(hdf5::${HDF5TARGET}-static INTERFACE IMPORTED) + set_target_properties(hdf5::${HDF5TARGET}-static PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::${HDF5TARGET}-shared") + endif() + endforeach() elseif("${name}" STREQUAL "CURL") _find_package(${ARGV}) if(CURL_FOUND) -- cgit v1.2.3 From 8fe30fe1ea70d5bfac400fdccf30276e4d987be5 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Fri, 2 Mar 2018 03:39:20 +0900 Subject: Add kealib ports and modify hdf5 recipe (#2708) * [kealib] add kealib ports KEALib is a GDAL model library using HDF5 standard. - Patch library cmake scripts. - Provide MIT license file. - Depend on hdf5 library with [cpp] feature. - No generation of GDAL driver. Signed-off-by: Hiroshi Miura * [kealib] fix option key to specify building shared library Signed-off-by: Hiroshi Miura * [kealib] call copy_pdbs() after install Signed-off-by: Hiroshi Miura * [kealib] update cmake patch - fix library name in MSVC - fix to find hdf5 libraries Signed-off-by: Hiroshi Miura * [kealib] add parallel feature Signed-off-by: Hiroshi Miura * Revert "[hdf5] add cpp feature" This reverts commit fbe876646601ea1426679793d44dec7cd3852ddf. * [hdf5] always build cpp library Signed-off-by: Hiroshi Miura * [kealib] drop dependency for feature hdf5[cpp] Signed-off-by: Hiroshi Miura * [kealib] update static link handling Signed-off-by: Hiroshi Miura * [kealib] revert a previous hack for static link to szip/zlib Signed-off-by: Hiroshi Miura * [hdf5] work around szip-config.cmake behavior Signed-off-by: Hiroshi Miura * link dependencies of static libs --- ports/hdf5/.gitattributes | 1 + ports/kealib/CONTROL | 8 +++ ports/kealib/fix-cmake.patch | 122 +++++++++++++++++++++++++++++++++++++++++++ ports/kealib/portfile.cmake | 39 ++++++++++++++ 4 files changed, 170 insertions(+) create mode 100644 ports/hdf5/.gitattributes create mode 100644 ports/kealib/CONTROL create mode 100644 ports/kealib/fix-cmake.patch create mode 100644 ports/kealib/portfile.cmake diff --git a/ports/hdf5/.gitattributes b/ports/hdf5/.gitattributes new file mode 100644 index 000000000..7cb1b64e1 --- /dev/null +++ b/ports/hdf5/.gitattributes @@ -0,0 +1 @@ +use-szip-config.patch text eol=crlf diff --git a/ports/kealib/CONTROL b/ports/kealib/CONTROL new file mode 100644 index 000000000..7e8a712a2 --- /dev/null +++ b/ports/kealib/CONTROL @@ -0,0 +1,8 @@ +Source: kealib +Version: 1.4.7-1 +Build-Depends: hdf5[cpp], zlib, szip +Description: kealib is gdal model using HDF5 standard. + +Feature: parallel +Description: Use parallel support for HDF5 +Build-Depends: hdf5[parallel], msmpi diff --git a/ports/kealib/fix-cmake.patch b/ports/kealib/fix-cmake.patch new file mode 100644 index 000000000..191517990 --- /dev/null +++ b/ports/kealib/fix-cmake.patch @@ -0,0 +1,122 @@ +diff --git a/trunk/CMakeLists.txt b/trunk/CMakeLists.txt +index 464fb13..dc8e26f 100644 +--- a/trunk/CMakeLists.txt ++++ b/trunk/CMakeLists.txt +@@ -8,6 +8,7 @@ + # which were derived from those used by libLAS (http://liblas.org/) + # + # History ++# 2018/01/25 - updated by Hiroshi Miura + # 2012/07/02 - Created by Peter Bunting + # + ############################################################################### +@@ -50,13 +51,10 @@ endif() + + option (BUILD_SHARED_LIBS "Build with shared library" ON) + +-set(HDF5_INCLUDE_DIR /usr/local/include CACHE PATH "Include PATH for HDF5") +-set(HDF5_LIB_PATH /usr/local/lib CACHE PATH "Library PATH for HDF5") + + set(GDAL_INCLUDE_DIR "NOTFOUND" CACHE PATH "Include PATH for GDAL") + set(GDAL_LIB_PATH "NOTFOUND" CACHE PATH "Library PATH for GDAL") + +-set(HDF5_STATIC_LIBS FALSE CACHE BOOL "On Windows, link against static HDF5 libs") + + IF(GDAL_INCLUDE_DIR AND GDAL_LIB_PATH) + # by default, only build if paths are set +@@ -65,6 +63,8 @@ ELSE() + set(LIBKEA_WITH_GDAL FALSE CACHE BOOL "Choose if .kea GDAL driver should be built") + ENDIF() + ++find_package(hdf5 COMPONENTS CXX HL REQUIRED) ++link_libraries(hdf5::hdf5_cpp-shared) + ############################################################################### + + ############################################################################### +@@ -141,14 +141,7 @@ endif(APPLE) + # Check the required libraries are present + + if (MSVC) +- if(HDF5_STATIC_LIBS) +- set(HDF5_LIBRARIES -LIBPATH:"${HDF5_LIB_PATH}" hdf5_cpp.lib hdf5.lib zlibstatic.lib) +- else() +- set(HDF5_LIBRARIES -LIBPATH:"${HDF5_LIB_PATH}" hdf5_cpp.lib hdf5.lib) +- set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB) +- endif() + else() +- set(HDF5_LIBRARIES "-L${HDF5_LIB_PATH} -lhdf5 -lhdf5_hl -lhdf5_cpp") + endif(MSVC) + + if (MSVC) +@@ -160,21 +153,19 @@ endif(MSVC) + + ############################################################################### + # Setup configure file +-configure_file ( "${PROJECT_HEADER_DIR}/kea-config.h.in" "${PROJECT_HEADER_DIR}/libkea/kea-config.h" ) +-configure_file ( "${PROJECT_TOOLS_DIR}/kea-config.in" "${PROJECT_BINARY_DIR}/kea-config" ) ++configure_file ( "${PROJECT_HEADER_DIR}/kea-config.h.in" "${CMAKE_BINARY_DIR}/${PROJECT_HEADER_DIR}/libkea/kea-config.h" ) ++configure_file ( "${PROJECT_TOOLS_DIR}/kea-config.in" "${CMAKE_BINARY_DIR}/${PROJECT_BINARY_DIR}/kea-config" ) + ############################################################################### + + ############################################################################### + # Documentation +-file(READ "doc/index.txt" README ) +-file(WRITE "README.txt" "${README}") + ############################################################################### + + ############################################################################### + # Build library + + include_directories ("${PROJECT_HEADER_DIR}") +-include_directories(${HDF5_INCLUDE_DIR}) ++include_directories ("${CMAKE_BINARY_DIR}/${PROJECT_HEADER_DIR}") + add_subdirectory ("${PROJECT_SOURCE_DIR}") + if (LIBKEA_WITH_GDAL) + add_subdirectory ("${PROJECT_GDAL_DIR}") +@@ -185,13 +176,11 @@ endif(LIBKEA_WITH_GDAL) + # Tests + enable_testing() + add_test(NAME test1 COMMAND src/test1) +- + ############################################################################### + + ############################################################################### + # Installation +- +-install (FILES "${PROJECT_BINARY_DIR}/kea-config" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) ++install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_BINARY_DIR}/kea-config" DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + ############################################################################### + + ############################################################################### +diff --git a/trunk/src/CMakeLists.txt b/trunk/src/CMakeLists.txt +index 84456c4..b804e74 100644 +--- a/trunk/src/CMakeLists.txt ++++ b/trunk/src/CMakeLists.txt +@@ -37,6 +37,7 @@ target_link_libraries(${LIBKEA_LIB_NAME} ${HDF5_LIBRARIES} ) + + ############################################################################### + # Testing ++if(NOT DISABLE_TESTS) + # exe needs to be in 'src' otherwise it doesn't work + add_executable (test1 ${PROJECT_TEST_DIR}/test1.cpp) + target_link_libraries (test1 ${LIBKEA_LIB_NAME}) +@@ -53,6 +54,7 @@ if(NOT WIN32) + # probably should match other compilers, but since this is a Conda + # specific hack I'm not going to bother + endif() ++endif() + + ############################################################################### + # Set target properties +@@ -67,6 +69,9 @@ PROPERTIES + + ############################################################################### + # Installation +-install (TARGETS ${LIBKEA_LIB_NAME} DESTINATION lib) ++install (TARGETS ${LIBKEA_LIB_NAME} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) + install (FILES ${LIBKEA_H} DESTINATION include/libkea) + ############################################################################### +\ No newline at end of file diff --git a/ports/kealib/portfile.cmake b/ports/kealib/portfile.cmake new file mode 100644 index 000000000..4cd8b59d5 --- /dev/null +++ b/ports/kealib/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/kealib-1.4.7) +vcpkg_download_distfile(ARCHIVE + URLS "https://bitbucket.org/chchrsc/kealib/downloads/kealib-1.4.7.tar.gz" + FILENAME "kealib-1.4.7.tar.gz" + SHA512 2d58d7d08943d028e19a24f3ad3316a13b4db59be8697cebf30ee621e6bf0a6a47bf61abadd972d6ea7af1c8eed28bba7edf40fb8709fcccc1effbc90ae6e244 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-cmake.patch +) + +if ("parallel" IN_LIST FEATURES) + set(ENABLE_PARALLEL ON) +else() + set(ENABLE_PARALLEL OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/trunk + PREFER_NINJA + OPTIONS + -DHDF5_PREFER_PARALLEL=${ENABLE_PARALLEL} + -DLIBKEA_WITH_GDAL=OFF + -DDISABLE_TESTS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/trunk/python/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/kealib RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +endif() \ No newline at end of file -- cgit v1.2.3 From 57c9cd012effe59ff43b2555879a6887c8114710 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 1 Mar 2018 10:43:58 -0800 Subject: [hdf5] Remove unneeded .gitattributes --- ports/hdf5/.gitattributes | 1 - 1 file changed, 1 deletion(-) delete mode 100644 ports/hdf5/.gitattributes diff --git a/ports/hdf5/.gitattributes b/ports/hdf5/.gitattributes deleted file mode 100644 index 7cb1b64e1..000000000 --- a/ports/hdf5/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -use-szip-config.patch text eol=crlf -- cgit v1.2.3 From 523b61169498e60168e56f956a9cf63e1d324079 Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Fri, 2 Mar 2018 02:45:41 +0800 Subject: [pcl] Add cuda and tools option (#2775) * [pcl] Add cuda and tools option * [pcl] Add dependency support for tools * [pcl] remove deprecated cuda_arch_bin version * [pcl] Add libpng dependency --- ports/pcl/CONTROL | 14 +++++++++++--- ports/pcl/find_cuda.patch | 15 +++++++++++++++ ports/pcl/portfile.cmake | 27 ++++++++++++++++++++++++--- 3 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 ports/pcl/find_cuda.patch diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index ba78abbf0..82f5cdea3 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,7 +1,7 @@ Source: pcl -Version: 1.8.1-9 +Version: 1.8.1-10 Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. -Build-Depends: eigen3, flann, qhull, vtk, 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 +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 Feature: openni2 Description: OpenNI2 support for PCL @@ -13,4 +13,12 @@ Build-Depends: vtk[qt] Feature: pcap Description: PCAP support for PCL -Build-Depends: winpcap \ No newline at end of file +Build-Depends: winpcap + +Feature: tools +Description: Build PCL utilities +Build-Depends: boost-accumulators + +Feature: cuda +Description: CUDA support for PCL +Build-Depends: cuda \ No newline at end of file diff --git a/ports/pcl/find_cuda.patch b/ports/pcl/find_cuda.patch new file mode 100644 index 000000000..6e872cdab --- /dev/null +++ b/ports/pcl/find_cuda.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/pcl_find_cuda.cmake b/cmake/pcl_find_cuda.cmake +index fd9cfa9..ae9e612 100644 +--- a/cmake/pcl_find_cuda.cmake ++++ b/cmake/pcl_find_cuda.cmake +@@ -43,7 +43,9 @@ if(CUDA_FOUND) + + # Find a complete list for CUDA compute capabilities at http://developer.nvidia.com/cuda-gpus + +- if(NOT ${CUDA_VERSION_STRING} VERSION_LESS "8.0") ++ if(NOT ${CUDA_VERSION_STRING} VERSION_LESS "9.0") ++ set(__cuda_arch_bin "3.0 3.5 5.0 5.2 5.3 6.0 6.1 7.0") ++ elseif(NOT ${CUDA_VERSION_STRING} VERSION_LESS "8.0") + set(__cuda_arch_bin "2.0 2.1(2.0) 3.0 3.5 5.0 5.2 5.3 6.0 6.1") + elseif(NOT ${CUDA_VERSION_STRING} VERSION_LESS "6.5") + set(__cuda_arch_bin "2.0 2.1(2.0) 3.0 3.5 5.0 5.2") diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index eeb7b0e6c..ac92d40db 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -16,6 +16,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/find_flann.patch" "${CMAKE_CURRENT_LIST_DIR}/find_qhull.patch" "${CMAKE_CURRENT_LIST_DIR}/find_openni2.patch" + "${CMAKE_CURRENT_LIST_DIR}/find_cuda.patch" "${CMAKE_CURRENT_LIST_DIR}/vs2017-15.4-workaround.patch" ) @@ -36,23 +37,35 @@ if("pcap" IN_LIST FEATURES) set(WITH_PCAP ON) endif() +set(WITH_CUDA OFF) +if("cuda" IN_LIST FEATURES) + set(WITH_CUDA ON) +endif() + +set(BUILD_TOOLS OFF) +if("tools" IN_LIST FEATURES) + set(BUILD_TOOLS ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS # BUILD -DBUILD_surface_on_nurbs=ON - -DBUILD_tools=OFF + -DBUILD_tools=${BUILD_TOOLS} + -DBUILD_CUDA=${WITH_CUDA} + -DBUILD_GPU=${WITH_CUDA} # build GPU when use CUDA # PCL -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS} -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS} -DPCL_SHARED_LIBS=${PCL_SHARED_LIBS} # WITH - -DWITH_CUDA=OFF + -DWITH_CUDA=${WITH_CUDA} -DWITH_LIBUSB=OFF -DWITH_OPENNI2=${WITH_OPENNI2} -DWITH_PCAP=${WITH_PCAP} - -DWITH_PNG=OFF + -DWITH_PNG=ON -DWITH_QHULL=ON -DWITH_QT=${WITH_QT} -DWITH_VTK=ON @@ -64,5 +77,13 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(BUILD_TOOLS) + file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/pcl) + file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/pcl) +endif() + file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcl) file(RENAME ${CURRENT_PACKAGES_DIR}/share/pcl/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/pcl/copyright) -- cgit v1.2.3 From a0eece81c68faf9713441c3aeb283a16bc232c52 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 1 Mar 2018 11:10:19 -0800 Subject: [vcpkg-download-distfile] Add proxy usage information to download failed message --- scripts/cmake/vcpkg_download_distfile.cmake | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index af4926008..4b111f3f0 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -71,22 +71,22 @@ function(vcpkg_download_distfile VAR) file(REMOVE_RECURSE "${DOWNLOADS}/temp") file(MAKE_DIRECTORY "${DOWNLOADS}/temp") - function(test_hash FILE_KIND CUSTOM_ERROR_ADVICE) + function(test_hash FILE_PATH FILE_KIND CUSTOM_ERROR_ADVICE) if(_VCPKG_INTERNAL_NO_HASH_CHECK) # When using the internal hash skip, do not output an explicit message. return() endif() if(vcpkg_download_distfile_SKIP_SHA512) - message(STATUS "Skipping hash check for ${downloaded_file_path}.") + message(STATUS "Skipping hash check for ${FILE_PATH}.") return() endif() message(STATUS "Testing integrity of ${FILE_KIND}...") - file(SHA512 ${downloaded_file_path} FILE_HASH) + file(SHA512 ${FILE_PATH} FILE_HASH) if(NOT "${FILE_HASH}" STREQUAL "${vcpkg_download_distfile_SHA512}") message(FATAL_ERROR "\nFile does not have expected hash:\n" - " File path: [ ${downloaded_file_path} ]\n" + " File path: [ ${FILE_PATH} ]\n" " Expected hash: [ ${vcpkg_download_distfile_SHA512} ]\n" " Actual hash: [ ${FILE_HASH} ]\n" "${CUSTOM_ERROR_ADVICE}\n") @@ -96,7 +96,7 @@ function(vcpkg_download_distfile VAR) if(EXISTS ${downloaded_file_path}) message(STATUS "Using cached ${downloaded_file_path}") - test_hash("cached file" "Please delete the file and retry if this file should be downloaded again.") + test_hash("${downloaded_file_path}" "cached file" "Please delete the file and retry if this file should be downloaded again.") else() if(_VCPKG_NO_DOWNLOADS) message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") @@ -111,9 +111,6 @@ function(vcpkg_download_distfile VAR) message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") set(download_success 0) else() - get_filename_component(downloaded_file_dir "${downloaded_file_path}" DIRECTORY) - file(MAKE_DIRECTORY "${downloaded_file_dir}") - file(RENAME ${download_file_path_part} ${downloaded_file_path}) message(STATUS "Downloading ${url}... OK") set(download_success 1) break() @@ -122,11 +119,16 @@ function(vcpkg_download_distfile VAR) if (NOT download_success) message(FATAL_ERROR - "\n" + " \n" " Failed to download file.\n" - " Add mirrors or submit an issue at https://github.com/Microsoft/vcpkg/issues\n") + " If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment\n" + " variables to \"https://user:password@your-proxy-ip-address:port/\".\n" + " Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues\n") else() - test_hash("downloaded file" "The file may have been corrupted in transit.") + test_hash("${download_file_path_part}" "downloaded file" "The file may have been corrupted in transit. This can be caused by proxies. If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment variables to \"https://user:password@your-proxy-ip-address:port/\".\n") + get_filename_component(downloaded_file_dir "${downloaded_file_path}" DIRECTORY) + file(MAKE_DIRECTORY "${downloaded_file_dir}") + file(RENAME ${download_file_path_part} ${downloaded_file_path}) endif() endif() set(${VAR} ${downloaded_file_path} PARENT_SCOPE) -- cgit v1.2.3 From 80e0648a401a438ed2f77beb17c901cfcb2bb7bc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 1 Mar 2018 11:39:37 -0800 Subject: [zlib] Fix race condition in build --- ports/zlib/portfile.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index 963b86d24..291180a29 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -13,6 +13,9 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/cmake_dont_build_more_than_needed.patch ) +# This is generated during the cmake build +file(REMOVE ${SOURCE_PATH}/zconf.h) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA -- cgit v1.2.3 From f20b53c20873725a2872456ba02f774c3cffb662 Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Fri, 2 Mar 2018 15:11:58 +0100 Subject: [ogre] update to v1.10.11 --- ports/ogre/001-cmake-install-dir.patch | 48 ++++++++++++++-------------------- ports/ogre/portfile.cmake | 16 +++++------- 2 files changed, 27 insertions(+), 37 deletions(-) diff --git a/ports/ogre/001-cmake-install-dir.patch b/ports/ogre/001-cmake-install-dir.patch index cf73bc977..27c6d2f70 100644 --- a/ports/ogre/001-cmake-install-dir.patch +++ b/ports/ogre/001-cmake-install-dir.patch @@ -1,7 +1,5 @@ -diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt -index 3382de139..404c56e5e 100644 ---- a/CMake/CMakeLists.txt -+++ b/CMake/CMakeLists.txt +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt @@ -13,10 +13,12 @@ # directory, but can also be used for custom projects. ############################################################# @@ -11,36 +9,30 @@ index 3382de139..404c56e5e 100644 -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() ++ if(WIN32 OR APPLE) ++ set(OGRE_CMAKE_DIR "CMake") ++ else() ++ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++ endif() endif() set(INST_FILES -diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake -index 0181259e2..346188c73 100644 ---- a/CMake/InstallResources.cmake -+++ b/CMake/InstallResources.cmake -@@ -245,12 +245,14 @@ endif () +--- a/cmake/InstallResources.cmake ++++ b/cmake/InstallResources.cmake +@@ -241,10 +241,12 @@ endif () # Create the CMake package files include(CMakePackageConfigHelpers) --if (WIN32) -- set(OGRE_CMAKE_DIR CMake) --elseif (UNIX) -- set(OGRE_CMAKE_DIR lib/OGRE/cmake) --elseif (APPLE) --endif () +-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) -+ set(OGRE_CMAKE_DIR CMake) -+ elseif (UNIX) -+ set(OGRE_CMAKE_DIR lib/OGRE/cmake) -+ elseif (APPLE) -+ endif () -+endif() ++ 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 ${OGRE_BINARY_DIR}/cmake/OGREConfig.cmake INSTALL_DESTINATION ${OGRE_CMAKE_DIR} - PATH_VARS CMAKE_INSTALL_PREFIX) diff --git a/ports/ogre/portfile.cmake b/ports/ogre/portfile.cmake index f42b4c220..8281960c6 100644 --- a/ports/ogre/portfile.cmake +++ b/ports/ogre/portfile.cmake @@ -1,14 +1,12 @@ include(vcpkg_common_functions) -set(OGRE_VERSION 1.10.9) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ogre-${OGRE_VERSION}) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/OGRECave/ogre/archive/v${OGRE_VERSION}.zip" - FILENAME "ogre-${OGRE_VERSION}.zip" - SHA512 2e68b30da6dc2e1df6575970623a14057675b069536ed0ac87faeefc8e295965ff7427c99385f29ab803b02bd5294f6886293aabdd17ec8c92f80baf53587457 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OGRECave/ogre + REF v1.10.11 + SHA512 2dfedd6f0a0de1a8c687c001439138b233200ca11e5c9940debf43d8a0380ca6472e0b5f4d599f0e22ca2049d0a5d34066ef41b6bc4912130694fa5d851fc900 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} @@ -126,6 +124,6 @@ string(REPLACE "\"OgreMainStatic\"" "\"\${PACKAGE_PREFIX_DIR}/lib/manual-link/Og file(WRITE "${CURRENT_PACKAGES_DIR}/share/ogre/OGREConfig.cmake" "${_contents}") # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre RENAME copyright) vcpkg_copy_pdbs() -- cgit v1.2.3 From 5a83ee13619762afd495e7ffb0dd2e775843ecff Mon Sep 17 00:00:00 2001 From: Jason Juang Date: Fri, 2 Mar 2018 08:41:23 -0800 Subject: [sdl2] update to 2.0.8 (#2934) --- ports/sdl2/CONTROL | 2 +- ports/sdl2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index f349dc2d4..ffebda760 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.7-4 +Version: 2.0.8 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 7aa17b261..572fef829 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO SDL-Mirror/SDL - REF release-2.0.7 - SHA512 3667c7299d007e0438de90c6dd1f19ad9f30cf155c35792c40267bc74f8fe8acd1046ac918a104690ccba3faa2dbd86b37821a38c6c389179359b903209e2eb7 + REF release-2.0.8 + SHA512 5922dbeb14bb22991160251664b417d3f846867c18b5ecc1bd19c328ffd69b16252b7d45b9a317bafd1207fdb66d93a022dfb239e02447db9babd941956b6b37 HEAD_REF master ) -- cgit v1.2.3 From 01ba04e9a737a2b68993e196b7980ce56b8fde00 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 1 Mar 2018 17:13:57 -0800 Subject: [gettext] Improve and simplify port --- ports/gettext/0002-Fix-uwp-build.patch | 18 +++++----- ports/gettext/CMakeLists.txt | 66 +++++++++++++++++++++++++++++++++- ports/gettext/CMakeLists_libintl.txt | 54 ---------------------------- ports/gettext/CONTROL | 1 + ports/gettext/config.h | 12 +++++-- ports/gettext/libgnuintl.h | 2 +- ports/gettext/portfile.cmake | 9 +++-- 7 files changed, 90 insertions(+), 72 deletions(-) delete mode 100644 ports/gettext/CMakeLists_libintl.txt diff --git a/ports/gettext/0002-Fix-uwp-build.patch b/ports/gettext/0002-Fix-uwp-build.patch index 4e21ef1ed..154131544 100644 --- a/ports/gettext/0002-Fix-uwp-build.patch +++ b/ports/gettext/0002-Fix-uwp-build.patch @@ -1,7 +1,7 @@ -diff --git "a/gettext-0.19/gettext-runtime/intl/langprefs.c" "b/gettext-0.19/gettext-runtime/intl/langprefs.c" +diff --git "a/gettext-runtime/intl/langprefs.c" "b/gettext-runtime/intl/langprefs.c" index aeb1c4e9..2ac531be 100644 ---- "a/gettext-0.19/gettext-runtime/intl/langprefs.c" -+++ "b/gettext-0.19/gettext-runtime/intl/langprefs.c" +--- "a/gettext-runtime/intl/langprefs.c" ++++ "b/gettext-runtime/intl/langprefs.c" @@ -33,7 +33,13 @@ extern void _nl_locale_name_canonicalize (char *name); #endif @@ -17,10 +17,10 @@ index aeb1c4e9..2ac531be 100644 #endif #ifdef WIN32_NATIVE -diff --git "a/gettext-0.19/gettext-runtime/intl/localcharset.c" "b/gettext-0.19/gettext-runtime/intl/localcharset.c" +diff --git "a/gettext-runtime/intl/localcharset.c" "b/gettext-runtime/intl/localcharset.c" index 670b8e6c..035a96bd 100644 ---- "a/gettext-0.19/gettext-runtime/intl/localcharset.c" -+++ "b/gettext-0.19/gettext-runtime/intl/localcharset.c" +--- "a/gettext-runtime/intl/localcharset.c" ++++ "b/gettext-runtime/intl/localcharset.c" @@ -36,6 +36,16 @@ # define WINDOWS_NATIVE #endif @@ -56,10 +56,10 @@ index 670b8e6c..035a96bd 100644 static char buf[2 + 10 + 1]; -diff --git "a/gettext-0.19/gettext-runtime/intl/localename.c" "b/gettext-0.19/gettext-runtime/intl/localename.c" +diff --git "a/gettext-runtime/intl/localename.c" "b/gettext-runtime/intl/localename.c" index 108dd6f1..ace3aa88 100644 ---- "a/gettext-0.19/gettext-runtime/intl/localename.c" -+++ "b/gettext-0.19/gettext-runtime/intl/localename.c" +--- "a/gettext-runtime/intl/localename.c" ++++ "b/gettext-runtime/intl/localename.c" @@ -54,7 +54,13 @@ #endif diff --git a/ports/gettext/CMakeLists.txt b/ports/gettext/CMakeLists.txt index 410ff9c0a..ac6e37c81 100644 --- a/ports/gettext/CMakeLists.txt +++ b/ports/gettext/CMakeLists.txt @@ -1 +1,65 @@ -add_subdirectory(gettext-runtime) \ No newline at end of file +cmake_minimum_required(VERSION 3.5) +project(libintl C) + +find_library(ICONV_LIB NAMES iconv libiconv) +find_path(ICONV_PATH iconv.h) + +find_library(CHARSET_LIB NAMES charset libcharset) +find_path(CHARSET_PATH localcharset.h) + +include_directories(${CMAKE_CURRENT_BINARY_DIR} . ${ICONV_PATH} ${CHARSET_PATH}) +link_libraries(${CHARSET_LIB} ${ICONV_LIB}) + +file(READ config.h _contents) +if(NOT WIN32) + string(REPLACE "/* #undef HAVE_STPCPY */" "#define HAVE_STPCPY 1" _contents "${_contents}") +endif() +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config.h" "${_contents}") + +FILE(GLOB SOURCES +"intl/bindtextdom.c" +"intl/dcgettext.c" +"intl/dcigettext.c" +"intl/dcngettext.c" +"intl/dgettext.c" +"intl/dngettext.c" +"intl/explodename.c" +"intl/finddomain.c" +"intl/gettext.c" +"intl/hash-string.c" +"intl/intl-compat.c" +"intl/l10nflist.c" +"intl/langprefs.c" +"intl/loadmsgcat.c" +"intl/localealias.c" +"intl/localename.c" +"intl/lock.c" +"intl/log.c" +"intl/ngettext.c" +"intl/osdep.c" +"intl/plural-exp.c" +"intl/plural.c" +"intl/printf.c" +"intl/relocatable.c" +"intl/textdomain.c" +"intl/version.c" +) + +set(LOCALDIR "c:/gettext") + +add_definitions(-DLOCALEDIR=\"${LOCALDIR}\") +add_definitions(-DLOCALE_ALIAS_PATH=\"${LOCALDIR}\") +add_definitions(-DLIBDIR=\"${LOCALDIR}\") +add_definitions(-DINSTALLDIR=\"${LOCALDIR}\") +add_definitions("-DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY") + +add_definitions("-DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -D_CRT_SECURE_NO_WARNINGS") + +add_library(libintl ${SOURCES}) + +install(TARGETS libintl + RUNTIME DESTINATION bin + LIBRARY DESTINATION bin + ARCHIVE DESTINATION lib +) + diff --git a/ports/gettext/CMakeLists_libintl.txt b/ports/gettext/CMakeLists_libintl.txt deleted file mode 100644 index f01cf632c..000000000 --- a/ports/gettext/CMakeLists_libintl.txt +++ /dev/null @@ -1,54 +0,0 @@ -cmake_policy(SET CMP0005 OLD) - -project(libintl) - -include_directories(".") - -FILE(GLOB SOURCES -"intl/bindtextdom.c" -"intl/dcgettext.c" -"intl/dcigettext.c" -"intl/dcngettext.c" -"intl/dgettext.c" -"intl/dngettext.c" -"intl/explodename.c" -"intl/finddomain.c" -"intl/gettext.c" -"intl/hash-string.c" -"intl/intl-compat.c" -"intl/l10nflist.c" -"intl/langprefs.c" -"intl/loadmsgcat.c" -"intl/localcharset.c" -"intl/localealias.c" -"intl/localename.c" -"intl/lock.c" -"intl/log.c" -"intl/ngettext.c" -"intl/osdep.c" -"intl/plural-exp.c" -"intl/plural.c" -"intl/printf.c" -"intl/relocatable.c" -"intl/textdomain.c" -"intl/version.c" -) - -set(LOCALDIR "c:\\gettext") - -add_definitions(-DLOCALEDIR=\\\"${LOCALDIR}\\\") -add_definitions(-DLOCALE_ALIAS_PATH=\\\"${LOCALDIR}\\\") -add_definitions(-DLIBDIR=\\\"${LOCALDIR}\\\") -add_definitions(-DINSTALLDIR=\\\"${LOCALDIR}\\\") -add_definitions("-DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY") - -add_definitions("-DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -D_CRT_SECURE_NO_WARNINGS") - -add_library(libintl ${SOURCES}) - -install(TARGETS libintl - RUNTIME DESTINATION bin - LIBRARY DESTINATION bin - ARCHIVE DESTINATION lib -) - diff --git a/ports/gettext/CONTROL b/ports/gettext/CONTROL index 882eb725f..ccb6f5aa4 100644 --- a/ports/gettext/CONTROL +++ b/ports/gettext/CONTROL @@ -1,3 +1,4 @@ Source: gettext Version: 0.19-2 Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages +Build-Depends: libiconv diff --git a/ports/gettext/config.h b/ports/gettext/config.h index 81811e937..bde4dfeeb 100644 --- a/ports/gettext/config.h +++ b/ports/gettext/config.h @@ -1,6 +1,12 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ +#ifndef WIN32 +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +# define _GL_INLINE static inline +#endif + /* Disable function deprecated warnings */ #define _CRT_NONSTDC_NO_WARNINGS @@ -471,7 +477,9 @@ /* Define as the maximum value of type 'size_t', if the system doesn't define it. */ +#if defined(_WIN32) #define SIZE_MAX (((1UL << 31) - 1) * 2 + 1) +#endif /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'size_t'. */ @@ -607,7 +615,7 @@ /* Define as a signed type of the same size as size_t. */ #ifdef _WIN64 #define ssize_t __int64 -#else +#elif _WIN32 #define ssize_t __int32 #endif @@ -618,7 +626,7 @@ don't define. */ #ifdef _WIN64 #define uintmax_t unsigned __int64 -#else +#elif _WIN32 #define uintmax_t unsigned __int32 #endif diff --git a/ports/gettext/libgnuintl.h b/ports/gettext/libgnuintl.h index eac6c8c25..440da4d59 100644 --- a/ports/gettext/libgnuintl.h +++ b/ports/gettext/libgnuintl.h @@ -19,7 +19,7 @@ USA. */ #ifndef _LIBINTL_H #define _LIBINTL_H 1 -#ifdef BUILDING_LIBINTL +#if defined(_WIN32) && defined(libintl_EXPORTS) #define LIBINTL_DLL_EXPORTED __declspec(dllexport) #else #define LIBINTL_DLL_EXPORTED diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index baf4babf2..ef9f52563 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -17,20 +17,19 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_libintl.txt DESTINATION ${SOURCE_PATH}/gettext-runtime) -file(RENAME ${SOURCE_PATH}/gettext-runtime/CMakeLists_libintl.txt ${SOURCE_PATH}/gettext-runtime/CMakeLists.txt) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/gettext-runtime) file(COPY ${CMAKE_CURRENT_LIST_DIR}/libgnuintl.h DESTINATION ${SOURCE_PATH}/gettext-runtime/intl) file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/gettext-runtime) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ + SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Fix-macro-definitions.patch" "${CMAKE_CURRENT_LIST_DIR}/0002-Fix-uwp-build.patch" ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH}/gettext-runtime + PREFER_NINJA ) vcpkg_install_cmake() -- cgit v1.2.3 From bad51b04626f25d323433ec159af1d60f93cadb1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 2 Mar 2018 08:59:17 -0800 Subject: [vcpkg] Improve handling of external toolchain files --- scripts/buildsystems/vcpkg.cmake | 4 +++- toolsrc/include/vcpkg/base/cofffilereader.h | 2 ++ toolsrc/src/vcpkg/base/cofffilereader.cpp | 3 --- toolsrc/src/vcpkg/build.cpp | 9 ++++---- toolsrc/src/vcpkg/commands.env.cpp | 6 +++++- toolsrc/src/vcpkg/postbuildlint.cpp | 33 +++++++++++++++++++---------- toolsrc/src/vcpkg/vcpkgpaths.cpp | 7 +----- 7 files changed, 37 insertions(+), 27 deletions(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 7b738bd5e..50001e97d 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -59,7 +59,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "Wind set(_VCPKG_TARGET_TRIPLET_PLAT uwp) elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") set(_VCPKG_TARGET_TRIPLET_PLAT linux) -elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") +elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(_VCPKG_TARGET_TRIPLET_PLAT osx) +else() set(_VCPKG_TARGET_TRIPLET_PLAT windows) endif() diff --git a/toolsrc/include/vcpkg/base/cofffilereader.h b/toolsrc/include/vcpkg/base/cofffilereader.h index ad2cc7b12..e0ad69b33 100644 --- a/toolsrc/include/vcpkg/base/cofffilereader.h +++ b/toolsrc/include/vcpkg/base/cofffilereader.h @@ -17,7 +17,9 @@ namespace vcpkg::CoffFileReader std::vector machine_types; }; +#if defined(_WIN32) DllInfo read_dll(const fs::path& path); LibInfo read_lib(const fs::path& path); +#endif } diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp index 1927e0b5e..96d280108 100644 --- a/toolsrc/src/vcpkg/base/cofffilereader.cpp +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -306,8 +306,5 @@ namespace vcpkg::CoffFileReader return {std::vector(machine_types.cbegin(), machine_types.cend())}; } -#else - DllInfo read_dll(const fs::path& path) { exit(-1); } - LibInfo read_lib(const fs::path& path) { exit(-1); } #endif } diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 0486039b7..5870bd187 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -208,9 +208,7 @@ namespace vcpkg::Build std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) { - if (pre_build_info.external_toolchain_file) - return Strings::format( - R"("%s" %s 2>&1)", toolset.vcvarsall.u8string(), Strings::join(" ", toolset.vcvarsall_options)); + if (pre_build_info.external_toolchain_file.has_value()) return ""; const char* tonull = " >nul"; if (GlobalState::debugging) @@ -479,8 +477,9 @@ namespace vcpkg::Build {"ALL_FEATURES", all_features}, }); - const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset); - const std::string command = Strings::format(R"(%s && %s)", cmd_set_environment, cmd_launch_cmake); + auto command = make_build_env_cmd(pre_build_info, toolset); + if (!command.empty()) command.append(" && "); + command.append(cmd_launch_cmake); const auto timer = Chrono::ElapsedTimer::create_started(); diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp index 6e52383d8..f3beef6cd 100644 --- a/toolsrc/src/vcpkg/commands.env.cpp +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -21,7 +21,11 @@ namespace vcpkg::Commands::Env const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); const Toolset& toolset = paths.get_toolset(pre_build_info); - System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, toolset) + " && cmd"); + auto env_cmd = Build::make_build_env_cmd(pre_build_info, toolset); + if (env_cmd.empty()) + System::cmd_execute_clean("cmd"); + else + System::cmd_execute_clean(env_cmd + " && cmd"); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp index 2b427737a..a31518ad7 100644 --- a/toolsrc/src/vcpkg/postbuildlint.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -391,6 +391,7 @@ namespace vcpkg::PostBuildLint static LintStatus check_dll_architecture(const std::string& expected_architecture, const std::vector& files) { +#if defined(_WIN32) std::vector binaries_with_invalid_architecture; for (const fs::path& file : files) @@ -413,6 +414,7 @@ namespace vcpkg::PostBuildLint print_invalid_architecture_files(expected_architecture, binaries_with_invalid_architecture); return LintStatus::ERROR_DETECTED; } +#endif return LintStatus::SUCCESS; } @@ -420,6 +422,7 @@ namespace vcpkg::PostBuildLint static LintStatus check_lib_architecture(const std::string& expected_architecture, const std::vector& files) { +#if defined(_WIN32) std::vector binaries_with_invalid_architecture; for (const fs::path& file : files) @@ -451,6 +454,7 @@ namespace vcpkg::PostBuildLint print_invalid_architecture_files(expected_architecture, binaries_with_invalid_architecture); return LintStatus::ERROR_DETECTED; } +#endif return LintStatus::SUCCESS; } @@ -790,11 +794,15 @@ namespace vcpkg::PostBuildLint dlls.insert(dlls.cend(), debug_dlls.cbegin(), debug_dlls.cend()); dlls.insert(dlls.cend(), release_dlls.cbegin(), release_dlls.cend()); - error_count += check_exports_of_dlls(dlls, toolset.dumpbin); - error_count += check_uwp_bit_of_dlls(pre_build_info.cmake_system_name, dlls, toolset.dumpbin); - error_count += check_dll_architecture(pre_build_info.target_architecture, dlls); + if (!toolset.dumpbin.empty()) + { + error_count += check_exports_of_dlls(dlls, toolset.dumpbin); + error_count += check_uwp_bit_of_dlls(pre_build_info.cmake_system_name, dlls, toolset.dumpbin); + error_count += + check_outdated_crt_linkage_of_dlls(dlls, toolset.dumpbin, build_info, pre_build_info); + } - error_count += check_outdated_crt_linkage_of_dlls(dlls, toolset.dumpbin, build_info, pre_build_info); + error_count += check_dll_architecture(pre_build_info.target_architecture, dlls); break; } case Build::LinkageType::STATIC: @@ -805,17 +813,20 @@ namespace vcpkg::PostBuildLint error_count += check_bin_folders_are_not_present_in_static_build(fs, package_dir); - if (!build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT)) + if (!toolset.dumpbin.empty()) { + if (!build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT)) + { + error_count += check_crt_linkage_of_libs( + BuildType::value_of(Build::ConfigurationType::DEBUG, build_info.crt_linkage), + debug_libs, + toolset.dumpbin); + } error_count += check_crt_linkage_of_libs( - BuildType::value_of(Build::ConfigurationType::DEBUG, build_info.crt_linkage), - debug_libs, + BuildType::value_of(Build::ConfigurationType::RELEASE, build_info.crt_linkage), + release_libs, toolset.dumpbin); } - error_count += check_crt_linkage_of_libs( - BuildType::value_of(Build::ConfigurationType::RELEASE, build_info.crt_linkage), - release_libs, - toolset.dumpbin); break; } default: Checks::unreachable(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index f2b39c110..e62ef8662 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -628,13 +628,8 @@ namespace vcpkg ret.dumpbin = ""; ret.supported_architectures = { ToolsetArchOption{"", System::get_host_processor(), System::get_host_processor()}}; -#if defined(_WIN32) - ret.vcvarsall = "cmd"; - ret.vcvarsall_options = {"/c", "echo done"}; -#else - ret.vcvarsall = "true"; + ret.vcvarsall = ""; ret.vcvarsall_options = {}; -#endif ret.version = "external"; ret.visual_studio_root_path = ""; return ret; -- cgit v1.2.3 From 1bcf4cef0dabd4b25acfb933f181d7f1ae1cc2a2 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Fri, 2 Mar 2018 22:16:49 +0300 Subject: [vcpkg] Allow compilation via CMake with MSVC (#2935) --- toolsrc/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index aa2146111..2a340bb8f 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -1,16 +1,20 @@ cmake_minimum_required(VERSION 3.3) project(vcpkg CXX) -add_compile_options(-std=c++1z) - if(CMAKE_COMPILER_IS_GNUXX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") set(GCC 1) elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") set(CLANG 1) +elseif(MSVC) + add_compile_options(/std:c++latest) else() message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}") endif() +if(GCC OR CLANG) + add_compile_options(-std=c++1z) +endif() + file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp) add_executable(vcpkg src/vcpkg.cpp ${VCPKGLIB_SOURCES}) -- cgit v1.2.3 From e4a619c2ca355ecb26bb85882de29d8523ec6c33 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 2 Mar 2018 12:28:34 -0800 Subject: [eigen3][libffi][libmysql][libwebp][rapidjson][websocketpp] Convert to use vcpkg_from_github --- ports/eigen3/portfile.cmake | 6 ++-- ports/libffi/portfile.cmake | 77 ++++++++++++++++++++-------------------- ports/libmysql/portfile.cmake | 10 +++--- ports/libwebp/portfile.cmake | 15 ++++---- ports/rapidjson/portfile.cmake | 13 +++---- ports/websocketpp/portfile.cmake | 24 ++++++------- 6 files changed, 72 insertions(+), 73 deletions(-) diff --git a/ports/eigen3/portfile.cmake b/ports/eigen3/portfile.cmake index 7cae703ad..376e6c10d 100644 --- a/ports/eigen3/portfile.cmake +++ b/ports/eigen3/portfile.cmake @@ -1,10 +1,10 @@ include(vcpkg_common_functions) -vcpkg_from_bitbucket( +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO eigen/eigen + REPO eigenteam/eigen-git-mirror REF 3.3.4 - SHA512 4077a5c3b95e3573774ccd3fe6c7233cb4b83db2358c19b43ea796925bd0201451d8632bddc5d68b1b57bbf67c5473a8908926eed065a745689a2acec9711d5c + SHA512 da3f96ef65c64031bed5311d4ad95cd668f2facb3439bb1f4ecea10ce7cf881daf9d053567fe4ebb50626ab4dbb975d1f74bd632626c688898a97064f99a8f59 HEAD_REF master ) diff --git a/ports/libffi/portfile.cmake b/ports/libffi/portfile.cmake index 2639aa1ba..4240ddc54 100644 --- a/ports/libffi/portfile.cmake +++ b/ports/libffi/portfile.cmake @@ -1,38 +1,39 @@ -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x86 AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x64) - message(FATAL_ERROR "Architecture not supported") -endif() - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libffi-3.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/libffi/libffi/archive/v3.1.zip" - FILENAME "libffi-3.1.zip" - SHA512 a5d4cc638262aecec29e70333119f561588a737fd8f353e18d9bf1bfa7b38eb6aba371778119ea8d35339b458815105d5b110063295b6588a8761b24dac77a7c) - -vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/export-global-data.patch) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DFFI_CONFIG_FILE=${CMAKE_CURRENT_LIST_DIR}/fficonfig.h - OPTIONS_DEBUG - -DFFI_SKIP_HEADERS=ON) - -vcpkg_install_cmake() -vcpkg_copy_pdbs() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/auto-define-static-macro.patch) -endif() - -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libffi) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libffi/LICENSE ${CURRENT_PACKAGES_DIR}/share/libffi/copyright) +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x86 AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + message(FATAL_ERROR "Architecture not supported") +endif() + +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libffi/libffi + REF v3.1 + SHA512 b214e4a876995f44e0a93bad5bf1b3501ea1fbedafbf33ea600007bd08c9bc965a1f0dd90ea870281c3add6c051febd19aa6cdce36f3ee8ba535ba2c0703153c + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/export-global-data.patch) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DFFI_CONFIG_FILE=${CMAKE_CURRENT_LIST_DIR}/fficonfig.h + OPTIONS_DEBUG + -DFFI_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/auto-define-static-macro.patch) +endif() + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libffi) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libffi/LICENSE ${CURRENT_PACKAGES_DIR}/share/libffi/copyright) diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake index 707d10149..741e67308 100644 --- a/ports/libmysql/portfile.cmake +++ b/ports/libmysql/portfile.cmake @@ -3,14 +3,14 @@ if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mysql-server-mysql-5.7.17) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/mysql/mysql-server/archive/mysql-5.7.17.tar.gz" - FILENAME "mysql-server-mysql-5.7.17.tar.gz" +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mysql/mysql-server + REF mysql-5.7.17 SHA512 31488972e08a6b83f88e6e3f7923aca91e01eac702f4942fdae92e13f66d92ac86c24dfe7a65a001db836c900147d1c3871b36af8cbb281a0e6c555617cac12c + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/libwebp/portfile.cmake b/ports/libwebp/portfile.cmake index e1baf1401..e4f5dbbc8 100644 --- a/ports/libwebp/portfile.cmake +++ b/ports/libwebp/portfile.cmake @@ -1,15 +1,12 @@ include(vcpkg_common_functions) -set(WEBP_VERSION 0.6.1) -set(WEBP_HASH f2512db136c9d9a455463134df1aff427f9d603aedd4cabd97ad26f3fa717806427f10a3162a94322900f2457268c867f1b655fc2a6a99d58c4141145979797a) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libwebp-${WEBP_VERSION}) - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/webmproject/libwebp/archive/v${WEBP_VERSION}.zip" - FILENAME "libwebp-${WEBP_VERSION}.zip" - SHA512 ${WEBP_HASH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO webmproject/libwebp + REF v0.6.1 + SHA512 313b345a01c91eb07c2e4d46b93fcda9c50dca9e05e39f757238a679355514a2e9bc9bc220f3d3eb6d6a55148957cb2be14dac330203953337759841af1a32bf + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/rapidjson/portfile.cmake b/ports/rapidjson/portfile.cmake index 80dc14f5d..1a44e592b 100644 --- a/ports/rapidjson/portfile.cmake +++ b/ports/rapidjson/portfile.cmake @@ -1,12 +1,13 @@ #header-only library include(vcpkg_common_functions) -SET(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rapidjson-1.1.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/miloyip/rapidjson/archive/v1.1.0.zip" - FILENAME "rapidjson-v1.1.0.zip" - SHA512 4ddbf6dc5d943eb971e7a62910dd78d1cc5cc3016066a443f351d4276d2be3375ed97796e672c2aecd6990f0b332826f8c8ddc7d367193d7b82f0037f4e4012c + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Tencent/rapidjson + REF v1.1.0 + SHA512 aaa + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) # Put the licence file where vcpkg expects it file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidjson) diff --git a/ports/websocketpp/portfile.cmake b/ports/websocketpp/portfile.cmake index 8531edd7d..71711e8c5 100644 --- a/ports/websocketpp/portfile.cmake +++ b/ports/websocketpp/portfile.cmake @@ -1,21 +1,21 @@ #header-only library include(vcpkg_common_functions) -set(VERSION "0.7.0") -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/websocketpp-${VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/zaphoyd/websocketpp/archive/${VERSION}.zip" - FILENAME "websocketpp-${VERSION}.zip" - SHA512 0cfbc5ed7034758b3666b5154854287441ebeef8e18c4e5f39b62559d4f0e9dda63d79021243c447f57b9855209e1813aeb1c6c475fc98aa71ff03933fc7ac0c + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zaphoyd/websocketpp + REF 0.7.0 + SHA512 91a86d4f5120db3f474169bb146f865f82167b1e9eedabec8793b31005e4ce3d22083283bc1b9f9e37fa0da835addcb2b68260a27c753852c06b3b1bb2f3c12e + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/openssl_110.patch + ${CMAKE_CURRENT_LIST_DIR}/openssl_110.patch ) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/websocketpp) # Put the license file where vcpkg expects it file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/websocketpp/) @@ -25,6 +25,6 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/websocketpp/COPYING ${CURRENT_PACKAGES file(COPY "${SOURCE_PATH}/websocketpp" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.hpp") set(INSTALL_INCLUDE_DIR "\${CMAKE_CURRENT_LIST_DIR}/../../include") -set(WEBSOCKETPP_VERSION ${VERSION}) -configure_file (${SOURCE_PATH}/websocketpp-config.cmake.in "${CURRENT_PACKAGES_DIR}/share/websocketpp/websocketpp-config.cmake" @ONLY) -configure_file (${SOURCE_PATH}/websocketpp-configVersion.cmake.in "${CURRENT_PACKAGES_DIR}/share/websocketpp/websocketpp-configVersion.cmake" @ONLY) \ No newline at end of file +set(WEBSOCKETPP_VERSION 0.7.0) +configure_file(${SOURCE_PATH}/websocketpp-config.cmake.in "${CURRENT_PACKAGES_DIR}/share/websocketpp/websocketpp-config.cmake" @ONLY) +configure_file(${SOURCE_PATH}/websocketpp-configVersion.cmake.in "${CURRENT_PACKAGES_DIR}/share/websocketpp/websocketpp-configVersion.cmake" @ONLY) -- cgit v1.2.3 From 82626abc9cfd632c80e4028a55e8b1b9f8d12859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 2 Mar 2018 22:41:19 +0100 Subject: Update Catch to 1.12.1 (#2936) --- ports/catch-classic/CONTROL | 2 +- ports/catch-classic/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/catch-classic/CONTROL b/ports/catch-classic/CONTROL index 488366f3e..93650d2e6 100644 --- a/ports/catch-classic/CONTROL +++ b/ports/catch-classic/CONTROL @@ -1,5 +1,5 @@ Source: catch-classic -Version: 1.12.0 +Version: 1.12.1 Description: A modern, header-only test framework for unit tests This is specifically the legacy 1.x branch provided for compatibility with older compilers. diff --git a/ports/catch-classic/portfile.cmake b/ports/catch-classic/portfile.cmake index 5334ab503..85460bbab 100644 --- a/ports/catch-classic/portfile.cmake +++ b/ports/catch-classic/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v1.12.0) +set(CATCH_VERSION v1.12.1) vcpkg_download_distfile(HEADER URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-classic-${CATCH_VERSION}.hpp" - SHA512 0334993982a4543a42b301b77622dbc7df9e9c53dfe4e49a7b32cafea59f999e057777e94e719ecc0aafebc02fa937243d7ea6301be086a2dbd9f52b0d61d807 + SHA512 2029065d979690a6b76318e1527fc770e062a3d3411f9354f03063263f01bd3a249c8e86a57eb0e07d66cd068f7cded7d369a53997c2b762eb5fdc2668e30152 ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From f2ece9cab873d16d0909035fcdb125112ccb1992 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 2 Mar 2018 16:02:05 -0800 Subject: [rapidjson] Fix regression during conversion to vcpkg_from_github --- ports/rapidjson/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/rapidjson/portfile.cmake b/ports/rapidjson/portfile.cmake index 1a44e592b..54f1c8eea 100644 --- a/ports/rapidjson/portfile.cmake +++ b/ports/rapidjson/portfile.cmake @@ -5,7 +5,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Tencent/rapidjson REF v1.1.0 - SHA512 aaa + SHA512 2e82a4bddcd6c4669541f5945c2d240fb1b4fdd6e239200246d3dd50ce98733f0a4f6d3daa56f865d8c88779c036099c52a9ae85d47ad263686b68a88d832dff HEAD_REF master ) -- cgit v1.2.3 From 8619994600471303427dd84f46bb9fcf65085227 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 2 Mar 2018 16:54:03 -0800 Subject: [gettext] Fix regression in simplification --- ports/gettext/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/gettext/CMakeLists.txt b/ports/gettext/CMakeLists.txt index ac6e37c81..3129b082b 100644 --- a/ports/gettext/CMakeLists.txt +++ b/ports/gettext/CMakeLists.txt @@ -51,7 +51,10 @@ add_definitions(-DLOCALEDIR=\"${LOCALDIR}\") add_definitions(-DLOCALE_ALIAS_PATH=\"${LOCALDIR}\") add_definitions(-DLIBDIR=\"${LOCALDIR}\") add_definitions(-DINSTALLDIR=\"${LOCALDIR}\") -add_definitions("-DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY") +if(BUILD_SHARED_LIBS) + add_definitions(-DBUILDING_DLL) +endif() +add_definitions("-DBUILDING_LIBINTL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY") add_definitions("-DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -D_CRT_SECURE_NO_WARNINGS") -- cgit v1.2.3 From c0a637188093bf6c363a1686bee98727dfed5502 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 2 Mar 2018 16:03:57 -0800 Subject: [grpc][harfbuzz][jsoncpp][libuv][openjpeg][rocksdb] Upgrades --- ports/grpc/CONTROL | 2 +- ports/grpc/portfile.cmake | 4 ++-- ports/harfbuzz/CONTROL | 2 +- ports/harfbuzz/portfile.cmake | 4 ++-- ports/jsoncpp/CONTROL | 2 +- ports/jsoncpp/portfile.cmake | 4 ++-- ports/libuv/CONTROL | 2 +- ports/libuv/portfile.cmake | 4 ++-- ports/openjpeg/CONTROL | 2 +- ports/openjpeg/portfile.cmake | 4 ++-- ports/rocksdb/CONTROL | 2 +- ports/rocksdb/portfile.cmake | 4 ++-- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 3a0cb1f9b..707c8cb8b 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.9.1 +Version: 1.10.0 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 73f3f2931..abab22925 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF v1.9.1 - SHA512 2043b76f76680df9759d1eef9d524af2b5f82237cd08428a7aa87cadae516052b37dee470a0850e6d63f685e95f0593900d640f7e4f2fa9de9e8c2b760a82191 + REF v1.10.0 + SHA512 52a3e2710fd51b92fb6345cddb9fd64a9b826bcb85dba86075b5e8465abf6dbc26a9245c9f79dd68b0c11a4fa3b983513091000991b61d77761b7debcdac3703 HEAD_REF master ) diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 235a05045..ff26bba07 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.7.4 +Version: 1.7.5 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, ragel, glib (windows) diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index c4bdbca22..17d201bc1 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO behdad/harfbuzz - REF 1.7.4 - SHA512 9d96017ba980280fa2e741dc2c7197e1f4b62b1bbb1e17b57806dc594ed905f52f08136830aafc995420eb709e3c927b2a6ea396fecb3b4a33473c0e0f345dee + REF 1.7.5 + SHA512 c6e0e91203fdf3cbc8e4fd3c5d5cdb8fd8d0c87609b2c35433a42c92721a7f707612cad339eb4871cae8f7e129245e93f1509f21ca45a0a81d44225e2207cbdc HEAD_REF master ) diff --git a/ports/jsoncpp/CONTROL b/ports/jsoncpp/CONTROL index f04c231f8..8fdfe14da 100644 --- a/ports/jsoncpp/CONTROL +++ b/ports/jsoncpp/CONTROL @@ -1,3 +1,3 @@ Source: jsoncpp -Version: 1.8.1-1 +Version: 1.8.4 Description: jsoncpp is an implementation of a JSON reader and writer in C++. JSON (JavaScript Object Notation) is a lightweight data-interchange format that it is easy to parse and redeable for human. diff --git a/ports/jsoncpp/portfile.cmake b/ports/jsoncpp/portfile.cmake index 4f460fda7..c29c869ed 100644 --- a/ports/jsoncpp/portfile.cmake +++ b/ports/jsoncpp/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO open-source-parsers/jsoncpp - REF 1.8.1 - SHA512 4203826fca4c366b51d28ffc928399c914ffaba8be1cada64ff118b5742e6b469d3fc3e59344587d851447857b479794c5697d4fd11a9a55b32a3a7a801b745b + REF 1.8.4 + SHA512 f70361a3263dd8b9441374a9a409462be1426c0d6587c865171a80448ab73b3f69de2b4d70d2f0c541764e1e6cccc727dd53178347901f625ec6fb54fb94f4f1 HEAD_REF master ) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index 792b0b668..2f7647489 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.18.0 +Version: 1.19.2 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index 638012433..4a79096c2 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.18.0 - SHA512 d1ef70b0f060f40cf57b282279d1d63d6dd019b4b811211b2252db32633a80af46290d201b4a4338f84b3efdfe9754a11b29bfa4a7636b06540b1a65e1fd4fbc + REF v1.19.2 + SHA512 4fa879e34c51ae428ebf72ce80873b8d12994ae1560f9d3577a693653bfd5bd4b4fda7ff457b98b5e60fc82546658300401d6545d677f31d2cd66be3d82e02da HEAD_REF v1.x) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/openjpeg/CONTROL b/ports/openjpeg/CONTROL index 862d82ab8..1b7a3697d 100644 --- a/ports/openjpeg/CONTROL +++ b/ports/openjpeg/CONTROL @@ -1,3 +1,3 @@ Source: openjpeg -Version: 2.2.0-1 +Version: 2.3.0 Description: JPEG 2000 image library diff --git a/ports/openjpeg/portfile.cmake b/ports/openjpeg/portfile.cmake index 3f393fa97..de683a089 100644 --- a/ports/openjpeg/portfile.cmake +++ b/ports/openjpeg/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO uclouvain/openjpeg - REF v2.2.0 - SHA512 20651c380bee582ab1950994c424cc00061ad852e9c5438fb32a9809e3f275571a4cc7e92589add0d91debf2394262e58f441c2dd918809fc1c602ed68396a3a + REF v2.3.0 + SHA512 0a9d427be4a820b1d759fca4b50e293721b45fe4885aa61ca1ae09e099f75ed93520448090c780d62f51076d575cc03618cd6d5181bdb6b34e4fc07b4cfdd568 HEAD_REF master ) diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index d9e8585f2..f16c32192 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,4 @@ Source: rocksdb -Version: 5.10.3 +Version: 5.10.4 Description: A library that provides an embeddable, persistent key-value store for fast storage Build-Depends: snappy, lz4, gflags, zlib, gtest diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 1eb0c1165..6256a3b53 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -9,8 +9,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/rocksdb - REF rocksdb-5.10.3 - SHA512 2443e993271e0fbcbb3bfedba72cb9ecf109705f8cd0d7184abe10784646c3111e06ed2bd8456a2773990e5670151a623094632b33c9e36380ba6ad003977044 + REF v5.10.4 + SHA512 42841f2e2ca7dee6e88b0539e997cc365a50161c234e5878e30757022114335c613f6d642a0af2bdc7fdb97d09ed79f4e12454d456f1f7fa1a6489c32540460a HEAD_REF master ) -- cgit v1.2.3 From 41db37fc3dda2597f66db4f7da9ed69d02544b45 Mon Sep 17 00:00:00 2001 From: ucker Date: Sat, 3 Mar 2018 21:40:32 +0800 Subject: update the address of msys2 (#2941) --- scripts/cmake/vcpkg_acquire_msys.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index ab0f4d047..13639cb89 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -48,13 +48,13 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) if(_vam_HOST_ARCHITECTURE STREQUAL "AMD64") set(TOOLSUBPATH msys64) - set(URL "https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20161025.tar.xz/download") + set(URL "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20161025.tar.xz") set(ARCHIVE "msys2-base-x86_64-20161025.tar.xz") set(HASH 6c4c18ec59db80b8269698d074866438a624f1ce735ee5005a01b148b02e8f2e966ae381aa1cb4c50f6226c3b7feb271e36907cf26580df084d695b3c9f5c0eb) set(STAMP "initialized-msys2_64.stamp") else() set(TOOLSUBPATH msys32) - set(URL "https://sourceforge.net/projects/msys2/files/Base/i686/msys2-base-i686-20161025.tar.xz/download") + set(URL "http://repo.msys2.org/distrib/i686/msys2-base-i686-20161025.tar.xz") set(ARCHIVE "msys2-base-i686-20161025.tar.xz") set(HASH c9260a38e0c6bf963adeaea098c4e376449c1dd0afe07480741d6583a1ac4c138951ccb0c5388bd148e04255a5c1a23bf5ee2d58dcd6607c14f1eaa5639a7c85) set(STAMP "initialized-msys2_32.stamp") -- cgit v1.2.3 From a084120ab45f70113b819f4cd55fbb50d7d98247 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 3 Mar 2018 10:46:07 -0800 Subject: [vcpkg-acquire-msys] Restore sourceforge as a fallback mirror --- scripts/cmake/vcpkg_acquire_msys.cmake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake index 13639cb89..eec08e3f1 100644 --- a/scripts/cmake/vcpkg_acquire_msys.cmake +++ b/scripts/cmake/vcpkg_acquire_msys.cmake @@ -48,13 +48,19 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) if(_vam_HOST_ARCHITECTURE STREQUAL "AMD64") set(TOOLSUBPATH msys64) - set(URL "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20161025.tar.xz") + set(URLS + "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20161025.tar.xz" + "https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20161025.tar.xz/download" + ) set(ARCHIVE "msys2-base-x86_64-20161025.tar.xz") set(HASH 6c4c18ec59db80b8269698d074866438a624f1ce735ee5005a01b148b02e8f2e966ae381aa1cb4c50f6226c3b7feb271e36907cf26580df084d695b3c9f5c0eb) set(STAMP "initialized-msys2_64.stamp") else() set(TOOLSUBPATH msys32) - set(URL "http://repo.msys2.org/distrib/i686/msys2-base-i686-20161025.tar.xz") + set(URLS + "http://repo.msys2.org/distrib/i686/msys2-base-i686-20161025.tar.xz" + "https://sourceforge.net/projects/msys2/files/Base/i686/msys2-base-i686-20161025.tar.xz/download" + ) set(ARCHIVE "msys2-base-i686-20161025.tar.xz") set(HASH c9260a38e0c6bf963adeaea098c4e376449c1dd0afe07480741d6583a1ac4c138951ccb0c5388bd148e04255a5c1a23bf5ee2d58dcd6607c14f1eaa5639a7c85) set(STAMP "initialized-msys2_32.stamp") @@ -66,7 +72,7 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) message(STATUS "Acquiring MSYS2...") vcpkg_download_distfile(ARCHIVE_PATH - URLS ${URL} + URLS ${URLS} FILENAME ${ARCHIVE} SHA512 ${HASH} ) -- cgit v1.2.3 From a4b917b04c8cb12933fc3710610da2cdd866c56d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 3 Mar 2018 11:33:59 -0800 Subject: [abseil][glslang][jsonnet][nuklear][rs-core-lib][stb][thrift] Updates --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/glslang/CONTROL | 2 +- ports/glslang/portfile.cmake | 4 ++-- ports/jsonnet/CONTROL | 2 +- ports/jsonnet/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 4 ++-- ports/stb/CONTROL | 2 +- ports/stb/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index 12bec5d9d..67a9364bb 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-2-23 +Version: 2018-03-02 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 0edb0fa32..0a224b3fe 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 0d40cb771eec8741f44e5979cfccf1eeeedb012a - SHA512 1b85e86a6d212c1c94f6f7bed2db0d4c30266a72268b0ef56a317709a484e657d57463263c784eb73f4838b4644b4ae9d5beedcf7e15a700fc5881a7ed825a53 + REF 5337d2d0e312ce6bce0140b5f1da5548a0b3fed5 + SHA512 14b2680c39260c5dc6a4b06583f7581ebfe11cde5c2e93cbca72385b1ba0c216894a3e88aa47ad84cc45af1c237b58e2b6240c35e1c0a73246a06ad472573558 HEAD_REF master ) diff --git a/ports/glslang/CONTROL b/ports/glslang/CONTROL index 02411c5fc..22d5a054e 100644 --- a/ports/glslang/CONTROL +++ b/ports/glslang/CONTROL @@ -1,3 +1,3 @@ Source: glslang -Version: 2018-02-25 +Version: 2018-03-02 Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator diff --git a/ports/glslang/portfile.cmake b/ports/glslang/portfile.cmake index dd7c1ecd4..2182d9bcd 100644 --- a/ports/glslang/portfile.cmake +++ b/ports/glslang/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/glslang - REF 57f6a016f05b83f5f67d46e61771e8f69e0374db - SHA512 f855912cce4c13a42cebc973b3cb85f75d2f960c68a99dff8f768521d81130a031bc06624dde7d2a4c276c9d4e129c5655e74ab410ec20305e3204f3e1b319ce + REF b5b5f918c6b72d7cf2ee73641cc6c6ddb211ca70 + SHA512 ec0f7a23fa60457a481c7b3acf4c127c3bf898d23655d346aeafb304f74e798d632c83d676873f2c764d241de6dc4392cff8d6ce0ee509a4b74ee2233b01c008 HEAD_REF master ) diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index f3fae0497..288c24fca 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-02-25 +Version: 2018-03-02 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 951357fab..f3ead00cc 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF 8606e21dfb599f838890944c6d96d9aa7c70b8c1 - SHA512 955a801a0e50c71a8e7f79cb432496ff23c0769ea5bb17c8dbda8f88d0936d8c3c1213c219641982d606c91adcc48c4354ff02b759f21202831a23ca584d3f0b + REF 221fb7c810815a12ce022ee14760609b6e48d3ab + SHA512 37d0edc2c447e4ee4b87d9c688f60f767cee990811ac41524fb73cb74270a442ab7a085e2046fea24712106cc22cd9f78ffe3d676abc744e1154ab0788eba9b3 HEAD_REF master ) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index 9da44de0d..0bbd39e41 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-02-25 +Version: 2018-03-02 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index fbabb5cfd..8b7a01fb6 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF 45193dc6ddf1473b6e37dfd6b0c1813d5b52e09b - SHA512 f02c1b3b9eeea1a257a43006ec90159d6a8aa830d506133281fd52f9be1bcfef6b0f3ecad7dbad8a7480e4ae530a502b5bf8a50d51892b948f0a814103e66069 + REF d9ccea11fe14905eba3ab4cb44207cf24345011b + SHA512 2e21f308ed4c7888f01321f31d125b26f14e6097166ecad703d92879acc853965256c56765a682cb0be126a923726d31b165d824ea41b837901aab06b2b0e7c0 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index 880c2fa3a..a63e460f3 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-02-25 +Version: 2018-03-02 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index 50acc7d08..698f14769 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF 971a8ca63bee277ef9826449c9da6233186f54f1 - SHA512 a6ef5ff35684c71e19e10af32d8149c3b80dd26a0f81193f336842ec9f220e0bc249a223066076f0d43c06a540e27c7bc3f3e58bf253672084b917fba2c7cbd9 + REF 5c53913b93ac4109795d5098dabcd241162cd401 + SHA512 ee9ca3071c2bc4c5a5fa44fbdbc1ecca36de96a1bde30ea272772434387bd96e72206a8b91ef2938cab4b1b00363d2838a1715bd524ec6ba7d4a36d328b4ad44 HEAD_REF master ) diff --git a/ports/stb/CONTROL b/ports/stb/CONTROL index f881c1aff..b5e306f27 100644 --- a/ports/stb/CONTROL +++ b/ports/stb/CONTROL @@ -1,3 +1,3 @@ Source: stb -Version: 20170724-9d9f75e +Version: 2018-03-02 Description: stb single-file public domain libraries for C/C++ diff --git a/ports/stb/portfile.cmake b/ports/stb/portfile.cmake index c34294adc..bd6587328 100644 --- a/ports/stb/portfile.cmake +++ b/ports/stb/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nothings/stb - REF 9d9f75eb682dd98b34de08bb5c489c6c561c9fa6 - SHA512 e710385b1de9b07108c1a0628e74832e163729d95d529a6fe333156cc8e518af47e480761c2f9acd69cffbc14e477952d7e5b208708ffbd3870949dccf315b4f + REF e6afb9cbae4064da8c3e69af3ff5c4629579c1d2 + SHA512 232ef301d4d6c82c7c5f0e4234b9160cc815f3b6bcc35d341cdf8738646f2f0887ee9838680699f4c9f4274b1390036b2c4fb3ebc2d663af8ff888114dc9f04b HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 423a3a5e6..2a92a1744 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-02-25 +Version: 2018-03-02 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 64ea7a5fd..a5991c228 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF d907cc92db5b93e699a4282e979d097ea863215a - SHA512 3ca6000b7dfef0ccd9e0dc729d15e0acd56a058216550fe93351e4eefd8a55a9f075a02aaf9699d66cc14fa864550e7eb1cae806070d60722bb7b247036c5187 + REF 6aa4c0f448d8f2573d2abcc8c3724bd18b3f8d1d + SHA512 77ebe8b247f1c0c169121a494482ba4d1c98cbbd0ba2edad1fdeaedc0dcb04905194d4455c4124c66424f5640a59c20de86c8cef67a5c621174ef46430e33539 HEAD_REF master ) -- cgit v1.2.3 From 6f5573e889c4125f15fff0ee63b60ebcb79fed2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sat, 3 Mar 2018 22:09:55 +0100 Subject: [vcpkg] Allow ninja-based parallel configuration for UWP targets (#2929) Allow using ninja as parallel configuration runner even if it is not used as generator. This significantly improves throughput for usecases like CI with timeouts and more than one CPU (e.g. AppVeyor). --- scripts/cmake/vcpkg_configure_cmake.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 724446f92..e590fb8e7 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -62,10 +62,12 @@ function(vcpkg_configure_cmake) set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) endif() - set(NINJA_CAN_BE_USED ON) + set(NINJA_CAN_BE_USED ON) # Ninja as generator + set(NINJA_HOST ON) # Ninja as parallel configurator 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") # Ninja and MSBuild have many differences when targetting UWP, so use MSBuild to maximize existing compatibility set(NINJA_CAN_BE_USED OFF) @@ -214,7 +216,7 @@ function(vcpkg_configure_cmake) -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug) - if(NINJA_CAN_BE_USED AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND NOT _csc_DISABLE_PARALLEL_CONFIGURE) + if(NINJA_HOST AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND NOT _csc_DISABLE_PARALLEL_CONFIGURE) vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) -- cgit v1.2.3 From d739a2aa7f4f2a05d923f8122d9c8736474af35a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 3 Mar 2018 19:39:13 -0800 Subject: [ms-gsl] Update --- ports/ms-gsl/CONTROL | 2 +- ports/ms-gsl/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL index 3c1eada28..337e3ac98 100644 --- a/ports/ms-gsl/CONTROL +++ b/ports/ms-gsl/CONTROL @@ -1,3 +1,3 @@ Source: ms-gsl -Version: 2018-02-25 +Version: 2018-03-03 Description: Microsoft implementation of the Guidelines Support Library \ No newline at end of file diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index fb334451f..42bcd57cc 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/GSL - REF 7eb8f41af544941c712916dc0cb2c6c6ef7768ac - SHA512 3ff9135f30f41a254728f312ca447cb574ffab5073ead29ec64c1b10b86da23e1f8bc3c67f67061793c814cd4068cdae95a64348a7de72d757be84757f699589 + REF 6a33b97a84f9c0a60ede78b5db98647e9a48d6c9 + SHA512 b6a0d062f29c5108f3ad74cdf3337d061d440d60d5d2fd82dd9b299474f9a06ec2b6276a62995fb4e0df1e420052833aa545eb53009a57f968442d814ae67b6c HEAD_REF master ) -- cgit v1.2.3 From 8ea4f4106fac67b7f48d3e60296b07973fcef1f6 Mon Sep 17 00:00:00 2001 From: Joel Clay Date: Sun, 4 Mar 2018 23:22:45 -0500 Subject: [cgal] update hash to 4.11.1 --- ports/cgal/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake index 439a40f7c..7e5ad7adc 100644 --- a/ports/cgal/portfile.cmake +++ b/ports/cgal/portfile.cmake @@ -4,7 +4,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CGAL/cgal REF releases/CGAL-4.11.1 - SHA512 fa5bdf62020bfba9d0774dd6333d0a4c6800d4d4c65a8be640710dde5446eca47941567ef801ace5b30b6027f5442b42bb7e0175f52758c5acc595b72cc031f6 + SHA512 51e5d239a0ee62ec6508aea5c696ba74278992343f196e40fe2159ad309ed907443ec0bd2ff96f51d9e34d2b89f164873e7bcb204cdd2c9f4800cea72a5b0094 HEAD_REF master ) -- cgit v1.2.3 From 263d4ba469027a42cdf8d965e44cfa8ca8677a82 Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Sun, 4 Mar 2018 11:31:06 +0100 Subject: [OpenCV] update to 3.4.1 --- ports/opencv/0001-winrt-fixes.patch | 97 ++------------------ ports/opencv/0002-install-options.patch | 71 +++++---------- ports/opencv/0003-disable-downloading.patch | 14 --- ports/opencv/0004-use-find-package-required.patch | 46 ++++------ ports/opencv/0005-remove-protobuf-target.patch | 31 +++++++ ports/opencv/CONTROL | 21 ++++- ports/opencv/portfile.cmake | 104 +++++++++++++--------- 7 files changed, 158 insertions(+), 226 deletions(-) create mode 100644 ports/opencv/0005-remove-protobuf-target.patch diff --git a/ports/opencv/0001-winrt-fixes.patch b/ports/opencv/0001-winrt-fixes.patch index c52c662e1..f913d92a4 100644 --- a/ports/opencv/0001-winrt-fixes.patch +++ b/ports/opencv/0001-winrt-fixes.patch @@ -1,23 +1,6 @@ -From 005963d571f95fc536f60aa77098b9ecbb17128c Mon Sep 17 00:00:00 2001 -From: Robert Schumacher -Date: Wed, 21 Feb 2018 17:03:30 -0800 -Subject: [PATCH 1/5] winrt-fixes - ---- - CMakeLists.txt | 2 +- - cmake/OpenCVCompilerOptions.cmake | 3 +++ - cmake/OpenCVModule.cmake | 2 +- - modules/core/src/utils/filesystem.cpp | 14 ++++++++++++-- - modules/highgui/include/opencv2/highgui/highgui_winrt.hpp | 1 + - modules/highgui/src/window_winrt_bridge.hpp | 1 + - modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp | 4 ++-- - 7 files changed, 21 insertions(+), 6 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4464441..6bfbecd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -296,7 +296,7 @@ OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binar +@@ -311,7 +311,7 @@ OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binar # OpenCV build options # =================================================== OCV_OPTION(ENABLE_CCACHE "Use ccache" (UNIX AND NOT IOS AND (CMAKE_GENERATOR MATCHES "Makefile" OR CMAKE_GENERATOR MATCHES "Ninja")) ) @@ -26,104 +9,45 @@ index 4464441..6bfbecd 100644 OCV_OPTION(ENABLE_SOLUTION_FOLDERS "Solution folder in Visual Studio or in other IDEs" (MSVC_IDE OR CMAKE_GENERATOR MATCHES Xcode) ) OCV_OPTION(ENABLE_PROFILING "Enable profiling in the GCC compiler (Add flags: -g -pg)" OFF IF CMAKE_COMPILER_IS_GNUCXX ) OCV_OPTION(ENABLE_COVERAGE "Enable coverage collection with GCov" OFF IF CMAKE_COMPILER_IS_GNUCXX ) -diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake -index 353ee12..8f4aa3b 100644 ---- a/cmake/OpenCVCompilerOptions.cmake -+++ b/cmake/OpenCVCompilerOptions.cmake -@@ -37,6 +37,9 @@ if(MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "Flags used by the compiler during all build types." FORCE) - endif() -+ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW") -+ endif() - endif() - - set(OPENCV_EXTRA_FLAGS "") -diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake -index a84bbff..8feb6df 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake -@@ -785,7 +785,7 @@ macro(ocv_create_module) +@@ -842,7 +842,7 @@ macro(ocv_create_module) set(the_module_target ${the_module}) endif() - + - if(WINRT) + if(WINRT AND BUILD_TESTS) # removing APPCONTAINER from modules to run from console # in case of usual starting of WinRT test apps output is missing # so starting of console version w/o APPCONTAINER is required to get test results -diff --git a/modules/core/src/utils/filesystem.cpp b/modules/core/src/utils/filesystem.cpp -index 266a92f..1d5a302 100644 ---- a/modules/core/src/utils/filesystem.cpp -+++ b/modules/core/src/utils/filesystem.cpp -@@ -186,7 +186,7 @@ bool createDirectory(const cv::String& path) - wchar_t wpath[MAX_PATH]; - size_t copied = mbstowcs(wpath, path.c_str(), MAX_PATH); - CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1)); -- int result = CreateDirectoryA(wpath, NULL) ? 0 : -1; -+ int result = CreateDirectoryW(wpath, NULL) ? 0 : -1; - #else - int result = _mkdir(path.c_str()); - #endif -@@ -248,8 +248,16 @@ struct FileLock::Impl - int numRetries = 5; - do - { -+#ifdef WINRT -+ wchar_t wpath[MAX_PATH]; -+ size_t copied = mbstowcs(wpath, fname, MAX_PATH); -+ CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1)); -+ handle = ::CreateFile2(wpath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, -+ OPEN_EXISTING, NULL); -+#else - handle = ::CreateFileA(fname, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); -+#endif - if (INVALID_HANDLE_VALUE == handle) - { - if (ERROR_SHARING_VIOLATION == GetLastError()) -@@ -399,7 +407,9 @@ cv::String getCacheDirectory(const char* sub_directory_name, const char* configu - if (cache_path.empty()) - { - cv::String default_cache_path; --#ifdef _WIN32 -+#if WINRT -+ // no defaults -+#elif defined _WIN32 - char tmp_path_buf[MAX_PATH+1] = {0}; - DWORD res = GetTempPath(MAX_PATH, tmp_path_buf); - if (res > 0 && res <= MAX_PATH) -diff --git a/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp b/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp -index f4147f3..b92efdd 100644 --- a/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp +++ b/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp @@ -24,6 +24,7 @@ // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. - + +#include "opencv2/core/cvdef.h" using namespace Windows::UI::Xaml::Controls; - + namespace cv diff --git a/modules/highgui/src/window_winrt_bridge.hpp b/modules/highgui/src/window_winrt_bridge.hpp index 25f4aef..5429f0b 100644 --- a/modules/highgui/src/window_winrt_bridge.hpp +++ b/modules/highgui/src/window_winrt_bridge.hpp @@ -28,6 +28,7 @@ - + #include #include +#include "opencv2/highgui/highgui_c.h" - + using namespace Windows::UI::Xaml::Controls; - + diff --git a/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp b/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp index 236e227..e2417dc 100644 --- a/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp +++ b/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp @@ -94,10 +94,10 @@ Media::CaptureFrameGrabber::~CaptureFrameGrabber() - + void Media::CaptureFrameGrabber::ShowCameraSettings() { -#if WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP @@ -135,6 +59,3 @@ index 236e227..e2417dc 100644 } #endif } --- -2.15.1.windows.2 - diff --git a/ports/opencv/0002-install-options.patch b/ports/opencv/0002-install-options.patch index 6351ceeb8..830c9f385 100644 --- a/ports/opencv/0002-install-options.patch +++ b/ports/opencv/0002-install-options.patch @@ -1,22 +1,6 @@ -From 5d4d154117b39d9e11fda709ede7aadf6b960a7d Mon Sep 17 00:00:00 2001 -From: Robert Schumacher -Date: Wed, 21 Feb 2018 17:05:16 -0800 -Subject: [PATCH 2/5] install-options - ---- - CMakeLists.txt | 20 +++++++++++--------- - cmake/OpenCVGenConfig.cmake | 4 ++-- - cmake/OpenCVGenHeaders.cmake | 8 ++++++-- - cmake/OpenCVModule.cmake | 4 +++- - data/CMakeLists.txt | 6 ++++-- - include/CMakeLists.txt | 16 +++++++++------- - 6 files changed, 35 insertions(+), 23 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6bfbecd..0156eeb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -292,6 +292,10 @@ OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF ) +@@ -307,6 +307,10 @@ OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF ) OCV_OPTION(INSTALL_ANDROID_EXAMPLES "Install Android examples" OFF IF ANDROID ) OCV_OPTION(INSTALL_TO_MANGLED_PATHS "Enables mangled install paths, that help with side by side installs." OFF IF (UNIX AND NOT ANDROID AND NOT APPLE_FRAMEWORK AND BUILD_SHARED_LIBS) ) OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binaries and test data" OFF) @@ -24,21 +8,21 @@ index 6bfbecd..0156eeb 100644 +OCV_OPTION(INSTALL_LICENSE "Install license file" ON) +OCV_OPTION(INSTALL_OTHER "Install other files" ON) +OCV_OPTION(INSTALL_FORCE_UNIX_PATHS "Force unix-style installation" OFF) - + # OpenCV build options # =================================================== -@@ -319,7 +323,7 @@ OCV_OPTION(CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON ) +@@ -335,7 +339,7 @@ OCV_OPTION(CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON ) OCV_OPTION(CV_DISABLE_OPTIMIZATION "Disable explicit optimized code (dispatched code/intrinsics/loop unrolling/etc)" OFF ) OCV_OPTION(CV_TRACE "Enable OpenCV code trace" ON) - + -OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (${BUILD_DOCS} OR ${BUILD_EXAMPLES}) IF (NOT CMAKE_CROSSCOMPILING AND NOT APPLE_FRAMEWORK) ) +OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (BUILD_DOCS OR BUILD_EXAMPLES) IF (NOT CMAKE_CROSSCOMPILING AND NOT APPLE_FRAMEWORK) ) - + if(ENABLE_IMPL_COLLECTION) add_definitions(-DCV_COLLECT_IMPL_DATA) -@@ -355,7 +359,9 @@ else() +@@ -372,7 +376,9 @@ else() endif() - + if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) - if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) + if(DEFINED OpenCV_DISABLE_ARCH_PATH) @@ -47,9 +31,9 @@ index 6bfbecd..0156eeb 100644 ocv_update(OpenCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/") else() message(STATUS "Can't detect runtime and/or arch") -@@ -409,12 +415,8 @@ else() +@@ -427,12 +433,8 @@ else() ocv_update(3P_LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/3rdparty/lib${LIB_SUFFIX}") - + if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) - if(OpenCV_STATIC) - ocv_update(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") @@ -59,32 +43,30 @@ index 6bfbecd..0156eeb 100644 - ocv_update(OPENCV_3P_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") + ocv_update(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib${LIB_SUFFIX}") + ocv_update(OPENCV_3P_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib${LIB_SUFFIX}") - ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native) + ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH samples) ocv_update(OPENCV_JAR_INSTALL_PATH java) ocv_update(OPENCV_OTHER_INSTALL_PATH etc) -@@ -856,7 +858,7 @@ if(NOT OPENCV_LICENSE_FILE) +@@ -895,7 +897,7 @@ if(NOT OPENCV_LICENSE_FILE) endif() - + # for UNIX it does not make sense as LICENSE and readme will be part of the package automatically -if(ANDROID OR NOT UNIX) +if(ANDROID OR NOT UNIX AND INSTALL_LICENSE) install(FILES ${OPENCV_LICENSE_FILE} PERMISSIONS OWNER_READ GROUP_READ WORLD_READ DESTINATION ./ COMPONENT libs) -diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake -index 57c79f2..23f1012 100644 --- a/cmake/OpenCVGenConfig.cmake +++ b/cmake/OpenCVGenConfig.cmake -@@ -103,7 +103,7 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) +@@ -105,7 +105,7 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) endif() endfunction() - + -if((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" OR UNIX) AND NOT ANDROID) +if(((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" OR UNIX) AND NOT ANDROID) OR INSTALL_FORCE_UNIX_PATHS) ocv_gen_config("${CMAKE_BINARY_DIR}/unix-install" "" "") endif() - -@@ -115,7 +115,7 @@ endif() + +@@ -117,7 +117,7 @@ endif() # -------------------------------------------------------------------------------------------- # Part 3/3: ${BIN_DIR}/win-install/OpenCVConfig.cmake -> For use within binary installers/packages # -------------------------------------------------------------------------------------------- @@ -93,8 +75,6 @@ index 57c79f2..23f1012 100644 if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) if(BUILD_SHARED_LIBS) set(_lib_suffix "lib") -diff --git a/cmake/OpenCVGenHeaders.cmake b/cmake/OpenCVGenHeaders.cmake -index 477b910..beace28 100644 --- a/cmake/OpenCVGenHeaders.cmake +++ b/cmake/OpenCVGenHeaders.cmake @@ -1,7 +1,9 @@ @@ -105,22 +85,20 @@ index 477b910..beace28 100644 +if(INSTALL_HEADERS) + install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) +endif() - + # platform-specific config file ocv_compiler_optimization_fill_cpu_config() @@ -29,4 +31,6 @@ set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE #endforeach() - + configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv_modules.hpp.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp") -install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) +if(INSTALL_HEADERS) + install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) +endif() -diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake -index 8feb6df..1a098c4 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake -@@ -930,7 +930,9 @@ macro(_ocv_create_module) +@@ -994,7 +994,9 @@ macro(_ocv_create_module) foreach(hdr ${OPENCV_MODULE_${the_module}_HEADERS}) string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}") if(NOT hdr2 MATCHES "private" AND hdr2 MATCHES "^(opencv2/?.*)/[^/]+.h(..)?$" ) @@ -131,25 +109,21 @@ index 8feb6df..1a098c4 100644 endif() endforeach() endif() -diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt -index 1f0d720..86b9d89 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,8 +1,10 @@ file(GLOB HAAR_CASCADES haarcascades/*.xml) file(GLOB LBP_CASCADES lbpcascades/*.xml) - + -install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) -install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) +if(INSTALL_OTHER) + install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) + install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) +endif() - + if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) install(DIRECTORY "${OPENCV_TEST_DATA_PATH}/" DESTINATION "${OPENCV_TEST_DATA_INSTALL_PATH}" COMPONENT "tests") -diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt -index b4e48e6..5ac6f16 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,7 +1,9 @@ @@ -169,6 +143,3 @@ index b4e48e6..5ac6f16 100644 + DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 + COMPONENT dev) +endif() --- -2.15.1.windows.2 - diff --git a/ports/opencv/0003-disable-downloading.patch b/ports/opencv/0003-disable-downloading.patch index e51bab3b2..28b00251f 100644 --- a/ports/opencv/0003-disable-downloading.patch +++ b/ports/opencv/0003-disable-downloading.patch @@ -1,14 +1,3 @@ -From 692f6f4fcf9bfddaf8779ba622f190c3a8c772f9 Mon Sep 17 00:00:00 2001 -From: Robert Schumacher -Date: Wed, 21 Feb 2018 17:20:22 -0800 -Subject: [PATCH 3/5] disable-downloading - ---- - cmake/OpenCVDownload.cmake | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/cmake/OpenCVDownload.cmake b/cmake/OpenCVDownload.cmake -index f660502..90785f1 100644 --- a/cmake/OpenCVDownload.cmake +++ b/cmake/OpenCVDownload.cmake @@ -151,6 +151,8 @@ function(ocv_download) @@ -20,6 +9,3 @@ index f660502..90785f1 100644 file(DOWNLOAD "${DL_URL}" "${CACHE_CANDIDATE}" INACTIVITY_TIMEOUT 60 TIMEOUT 600 --- -2.15.1.windows.2 - diff --git a/ports/opencv/0004-use-find-package-required.patch b/ports/opencv/0004-use-find-package-required.patch index 6d2fa5688..4e1daf659 100644 --- a/ports/opencv/0004-use-find-package-required.patch +++ b/ports/opencv/0004-use-find-package-required.patch @@ -1,14 +1,3 @@ -From 7e02db97d43cb9aa331da0dbfce8c372c19ad32b Mon Sep 17 00:00:00 2001 -From: Robert Schumacher -Date: Wed, 21 Feb 2018 17:20:49 -0800 -Subject: [PATCH 4/5] use-find-package-required - ---- - cmake/OpenCVFindLibsGrfmt.cmake | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake -index 0ae58c8..5832d56 100644 --- a/cmake/OpenCVFindLibsGrfmt.cmake +++ b/cmake/OpenCVFindLibsGrfmt.cmake @@ -6,7 +6,7 @@ @@ -18,18 +7,18 @@ index 0ae58c8..5832d56 100644 - find_package(ZLIB "${MIN_VER_ZLIB}") + find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED) if(ZLIB_FOUND AND ANDROID) - if(ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib/libz.so" OR - ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib64/libz.so") -@@ -31,7 +31,7 @@ if(WITH_JPEG) + if(ZLIB_LIBRARIES MATCHES "/usr/(lib|lib32|lib64)/libz.so$") + set(ZLIB_LIBRARIES z) +@@ -30,7 +30,7 @@ if(WITH_JPEG) if(BUILD_JPEG) ocv_clear_vars(JPEG_FOUND) else() - include(FindJPEG) + find_package(JPEG REQUIRED) endif() - + if(NOT JPEG_FOUND) -@@ -52,7 +52,7 @@ if(WITH_TIFF) +@@ -51,7 +51,7 @@ if(WITH_TIFF) if(BUILD_TIFF) ocv_clear_vars(TIFF_FOUND) else() @@ -38,7 +27,7 @@ index 0ae58c8..5832d56 100644 if(TIFF_FOUND) ocv_parse_header("${TIFF_INCLUDE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION) endif() -@@ -95,7 +95,7 @@ if(WITH_WEBP) +@@ -94,7 +94,7 @@ if(WITH_WEBP) if(BUILD_WEBP) ocv_clear_vars(WEBP_FOUND WEBP_LIBRARY WEBP_LIBRARIES WEBP_INCLUDE_DIR) else() @@ -47,16 +36,16 @@ index 0ae58c8..5832d56 100644 if(WEBP_FOUND) set(HAVE_WEBP 1) endif() -@@ -136,7 +136,7 @@ if(WITH_JASPER) +@@ -135,7 +135,7 @@ if(WITH_JASPER) if(BUILD_JASPER) ocv_clear_vars(JASPER_FOUND) else() - include(FindJasper) + find_package(Jasper REQUIRED) endif() - + if(NOT JASPER_FOUND) -@@ -160,7 +160,7 @@ if(WITH_PNG) +@@ -159,7 +159,7 @@ if(WITH_PNG) if(BUILD_PNG) ocv_clear_vars(PNG_FOUND) else() @@ -65,33 +54,30 @@ index 0ae58c8..5832d56 100644 if(PNG_FOUND) include(CheckIncludeFile) check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H) -@@ -192,7 +192,7 @@ if(WITH_OPENEXR) +@@ -191,7 +191,7 @@ if(WITH_OPENEXR) if(BUILD_OPENEXR) ocv_clear_vars(OPENEXR_FOUND) else() - include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake") + find_package(OpenEXR REQUIRED) endif() - + if(NOT OPENEXR_FOUND) -@@ -208,7 +208,7 @@ endif() - +@@ -207,7 +207,7 @@ endif() + # --- GDAL (optional) --- if(WITH_GDAL) - find_package(GDAL QUIET) + find_package(GDAL REQUIRED) - + if(NOT GDAL_FOUND) set(HAVE_GDAL NO) -@@ -220,7 +220,7 @@ if(WITH_GDAL) +@@ -219,7 +219,7 @@ if(WITH_GDAL) endif() - + if (WITH_GDCM) - find_package(GDCM QUIET) + find_package(GDCM REQUIRED) if(NOT GDCM_FOUND) set(HAVE_GDCM NO) ocv_clear_vars(GDCM_VERSION GDCM_LIBRARIES) --- -2.15.1.windows.2 - diff --git a/ports/opencv/0005-remove-protobuf-target.patch b/ports/opencv/0005-remove-protobuf-target.patch new file mode 100644 index 000000000..b538ee040 --- /dev/null +++ b/ports/opencv/0005-remove-protobuf-target.patch @@ -0,0 +1,31 @@ +--- a/cmake/OpenCVFindProtobuf.cmake ++++ b/cmake/OpenCVFindProtobuf.cmake +@@ -44,17 +44,6 @@ else() + # end of compatibility block + + if(Protobuf_FOUND) +- if(TARGET protobuf::libprotobuf) +- add_library(libprotobuf INTERFACE) +- target_link_libraries(libprotobuf INTERFACE protobuf::libprotobuf) +- else() +- add_library(libprotobuf UNKNOWN IMPORTED) +- set_target_properties(libprotobuf PROPERTIES +- IMPORTED_LOCATION "${Protobuf_LIBRARY}" +- INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}" +- ) +- get_protobuf_version(Protobuf_VERSION "${Protobuf_INCLUDE_DIR}") +- endif() + set(HAVE_PROTOBUF TRUE) + endif() + endif() +--- a/modules/dnn/CMakeLists.txt ++++ b/modules/dnn/CMakeLists.txt +@@ -65,7 +65,7 @@ endif() + + ocv_module_include_directories(${fw_inc} ${CMAKE_CURRENT_LIST_DIR}/src/ocl4dnn/include ${OPENCL_INCLUDE_DIRS}) + ocv_glob_module_sources(SOURCES ${fw_srcs}) +-ocv_create_module(libprotobuf ${LAPACK_LIBRARIES}) ++ocv_create_module() + ocv_add_samples() + ocv_add_accuracy_tests() + ocv_add_perf_tests() diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index df27dc08c..c4d5adaac 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,8 +1,23 @@ Source: opencv -Version: 3.4.0-3 -Build-Depends: opengl, zlib, protobuf (windows) +Version: 3.4.1 +Build-Depends: zlib Description: computer vision library -Default-Features: jpeg, png, tiff, eigen +Default-Features: opengl, jpeg, png, tiff, eigen, flann + +Feature: opengl +Build-Depends: opengl +Description: opengl support for opencv + +Feature: dnn +Build-Depends: protobuf +Description: opencv_dnn module + +Feature: ovis +Build-Depends: ogre +Description: opencv_ovis module + +Feature: flann +Description: opencv_flann module Feature: sfm Build-Depends: eigen3, glog, gflags, ceres diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index f3efaa779..41e7b7406 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -1,20 +1,12 @@ include(vcpkg_common_functions) -set(OPENCV_PORT_VERSION "3.4.0") - -# This is to ensure we are patching clean sources. These lines can be removed when the OpenCV version is next upgraded. -if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/opencv-${OPENCV_PORT_VERSION}" AND NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/opencv-${OPENCV_PORT_VERSION}/rework.stamp") - file(REMOVE_RECURSE - "${CURRENT_BUILDTREES_DIR}/src/opencv-opencv-${OPENCV_PORT_VERSION}.tar.gz.extracted" - "${CURRENT_BUILDTREES_DIR}/src/opencv-${OPENCV_PORT_VERSION}" - ) -endif() +set(OPENCV_PORT_VERSION "3.4.1") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO opencv/opencv REF ${OPENCV_PORT_VERSION} - SHA512 aa7e475f356ffdaeb2ae9f7e9380c92cae58fabde9cd3b23c388f9190b8fde31ee70d16648042d0c43c03b2ff1f15e4be950be7851133ea0aa82cf6e42ba4710 + SHA512 e1fc14285090c6fe9e26e721f2d67d7096650c523147e925567426ef76aa7f4c6f12035d6f6ce3ec7991a75a6828a810fd4f9b75f78ed5fcccecefbadd79944b HEAD_REF master ) @@ -25,19 +17,38 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/0002-install-options.patch" "${CMAKE_CURRENT_LIST_DIR}/0003-disable-downloading.patch" "${CMAKE_CURRENT_LIST_DIR}/0004-use-find-package-required.patch" + "${CMAKE_CURRENT_LIST_DIR}/0005-remove-protobuf-target.patch" ) file(WRITE "${CURRENT_BUILDTREES_DIR}/src/opencv-${OPENCV_PORT_VERSION}/rework.stamp") -vcpkg_download_distfile(TINYDNN_ARCHIVE +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) + +set(CMAKE_MODULE_PATH) + +set(BUILD_opencv_dnn OFF) +set(WITH_PROTOBUF OFF) +if("dnn" IN_LIST FEATURES) + set(BUILD_opencv_dnn ON) + set(WITH_PROTOBUF ON) + set(PROTOBUF_UPDATE_FILES ON) + set(UPDATE_PROTO_FILES ON) + vcpkg_download_distfile(TINYDNN_ARCHIVE URLS "https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz" FILENAME "opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz" SHA512 5f2c1a161771efa67e85b1fea395953b7744e29f61187ac5a6c54c912fb195b3aef9a5827135c3668bd0eeea5ae04a33cc433e1f6683e2b7955010a2632d168b -) + ) +endif() -string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) +set(BUILD_opencv_flann OFF) +if("flann" IN_LIST FEATURES) + set(BUILD_opencv_flann ON) +endif() -set(CMAKE_MODULE_PATH) +set(BUILD_opencv_ovis OFF) +if("ovis" IN_LIST FEATURES) + set(BUILD_opencv_ovis ON) +endif() set(BUILD_opencv_sfm OFF) if("sfm" IN_LIST FEATURES) @@ -99,19 +110,19 @@ set(WITH_FFMPEG OFF) if("ffmpeg" IN_LIST FEATURES) set(WITH_FFMPEG ON) vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/66b1fed06cf3510235f367f96aa26da5cb234a15/ffmpeg/opencv_ffmpeg.dll" - FILENAME "opencv-cache/ffmpeg/3ae76b105113d944984b2351c61e21c6-opencv_ffmpeg.dll" - SHA512 62ad0d6de7a7887a08313e20c474b4f98ae7746a2c10cce2ea5eae284250830e721b81308a401d0fadd238dda85c3ec0f347b41361fd56e473e790e3c40fa554 + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/opencv_ffmpeg.dll" + FILENAME "opencv-cache/ffmpeg/b8120c07962d591e2e9071a1bf566fd0-opencv_ffmpeg.dll" + SHA512 53325e3bb04de19273270475d7b7d9190c950b0d12e1179feef63c69ba66c9f8593d8ed9b030109dee8c104ab5babea69f18c7cae7366a57d48272d67c00d871 ) vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/66b1fed06cf3510235f367f96aa26da5cb234a15/ffmpeg/opencv_ffmpeg_64.dll" - FILENAME "opencv-cache/ffmpeg/cf3bb5bc9d393b022ea7a42eb63e794d-opencv_ffmpeg_64.dll" - SHA512 5de95a180895aaa5186578572dd1968d2ff3ce8d24c46755c94d768ea6f463c92416c86e851b06b15fc314dd852a456282a56f5b14d6fb9130a054ac9e8230bd + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/opencv_ffmpeg_64.dll" + FILENAME "opencv-cache/ffmpeg/dc9c50e7b05482acc25d6ce0ac61bf1d-opencv_ffmpeg_64.dll" + SHA512 7d90df6f5d141f842a45e5678cf1349657612321250ece4ad5c6b5fb28a50140735d91ced0ce1a6e81962ef87236cbd1669c0b4410308f70fccee341a7a5c28b ) vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/66b1fed06cf3510235f367f96aa26da5cb234a15/ffmpeg/ffmpeg_version.cmake" - FILENAME "opencv-cache/ffmpeg/ec59008da403fb18ab3c1ed66aed583b-ffmpeg_version.cmake" - SHA512 97784032256b104ed9bb3e3f71824985c551b3e4a86928bcf60d3beef50817f66cf276256e140e645e78e04f4463f3665bdda0574585d05af640fb43d0ba4cb9 + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/ffmpeg_version.cmake" + FILENAME "opencv-cache/ffmpeg/3b90f67f4b429e77d3da36698cef700c-ffmpeg_version.cmake" + SHA512 7d0142c30ac6f6260c1bcabc22753030fd25a708477fa28053e8df847c366967d3b93a8ac14af19a2b7b73d9f8241749a431458faf21a0c8efc7d6d99eecfdcf ) endif() @@ -155,6 +166,11 @@ if("gdcm" IN_LIST FEATURES) set(WITH_GDCM ON) endif() +set(WITH_OPENGL OFF) +if("opengl" IN_LIST FEATURES) + set(WITH_OPENGL ON) +endif() + set(WITH_OPENEXR OFF) if("openexr" IN_LIST FEATURES) set(WITH_OPENEXR ON) @@ -196,12 +212,13 @@ if(BUILD_opencv_contrib) OUT_SOURCE_PATH CONTRIB_SOURCE_PATH REPO opencv/opencv_contrib REF ${OPENCV_PORT_VERSION} - SHA512 53f6127304f314d3be834f79520d4bc8a75e14cad8c9c14a66a7a6b37908ded114d24e3a2c664d4ec2275903db08ac826f29433e810c6400f3adc2714a3c5be7 + SHA512 431dfba0f413071d7faa18bc6e6f5e4f015285e2cc730c5dd69b2a4d6aa4250b7e0bcb1814ac6f06f5c76f103aea1f93f72f32aee6bc0cd7ddacdaf1f40075c1 HEAD_REF master ) set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules") endif() +set(WITH_ZLIB ON) set(BUILD_opencv_line_descriptor ON) set(BUILD_opencv_saliency ON) set(BUILD_opencv_bgsegm ON) @@ -219,11 +236,10 @@ vcpkg_configure_cmake( OPTIONS # Ungrouped Entries -DOpenCV_DISABLE_ARCH_PATH=ON - -DPROTOBUF_UPDATE_FILES=ON - -DUPDATE_PROTO_FILES=ON - # BUILD + # Do not build docs/examples -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF + # Do not build integrated libraries, use external ones whenever possible -DBUILD_JASPER=OFF -DBUILD_JPEG=OFF -DBUILD_OPENEXR=OFF @@ -237,16 +253,20 @@ vcpkg_configure_cmake( -DBUILD_WITH_DEBUG_INFO=ON -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT} -DBUILD_ZLIB=OFF + # Select which OpenCV modules should be built -DBUILD_opencv_apps=OFF - -DBUILD_opencv_dnn=ON - -DBUILD_opencv_flann=ON + -DBUILD_opencv_bgsegm=${BUILD_opencv_bgsegm} + -DBUILD_opencv_dnn=${BUILD_opencv_dnn} + -DBUILD_opencv_flann=${BUILD_opencv_flann} + -DBUILD_opencv_line_descriptor=${BUILD_opencv_line_descriptor} + -DBUILD_opencv_ovis=${BUILD_opencv_ovis} -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF - -DBUILD_opencv_sfm=${BUILD_opencv_sfm} - -DBUILD_opencv_line_descriptor=${BUILD_opencv_line_descriptor} -DBUILD_opencv_saliency=${BUILD_opencv_saliency} - -DBUILD_opencv_bgsegm=${BUILD_opencv_bgsegm} - + -DBUILD_opencv_sfm=${BUILD_opencv_sfm} + # PROTOBUF + -DPROTOBUF_UPDATE_FILES=${PROTOBUF_UPDATE_FILES} + -DUPDATE_PROTO_FILES=${UPDATE_PROTO_FILES} # CMAKE -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON "-DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}" @@ -264,22 +284,24 @@ vcpkg_configure_cmake( # WITH -DWITH_CUBLAS=OFF -DWITH_CUDA=${WITH_CUDA} + -DWITH_EIGEN=${WITH_EIGEN} -DWITH_FFMPEG=${WITH_FFMPEG} + -DWITH_GDCM=${WITH_GDCM} -DWITH_IPP=${WITH_IPP} + -DWITH_JASPER=${WITH_JASPER} + -DWITH_JPEG=${WITH_JPEG} -DWITH_LAPACK=OFF -DWITH_MSMF=${WITH_MSMF} -DWITH_OPENCLAMDBLAS=OFF - -DWITH_OPENGL=ON + -DWITH_OPENEXR=${WITH_OPENEXR} + -DWITH_OPENGL=${WITH_OPENGL} + -DWITH_PNG=${WITH_PNG} + -DWITH_PROTOBUF=${WITH_PROTOBUF} -DWITH_QT=${WITH_QT} + -DWITH_TIFF=${WITH_TIFF} -DWITH_VTK=${WITH_VTK} - -DWITH_GDCM=${WITH_GDCM} -DWITH_WEBP=${WITH_WEBP} - -DWITH_OPENEXR=${WITH_OPENEXR} - -DWITH_TIFF=${WITH_TIFF} - -DWITH_JPEG=${WITH_JPEG} - -DWITH_PNG=${WITH_PNG} - -DWITH_JASPER=${WITH_JASPER} - -DWITH_EIGEN=${WITH_EIGEN} + -DWITH_ZLIB=${WITH_ZLIB} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -DINSTALL_OTHER=OFF -- cgit v1.2.3 From 3538714118986c669ff85d8749881d64aa30c62c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 5 Mar 2018 11:00:51 -0800 Subject: [gettext] Fix macro definition patch --- ports/gettext/0001-Fix-macro-definitions.patch | 33 ++++++++------------------ 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/ports/gettext/0001-Fix-macro-definitions.patch b/ports/gettext/0001-Fix-macro-definitions.patch index 506c43dba..07529da97 100644 --- a/ports/gettext/0001-Fix-macro-definitions.patch +++ b/ports/gettext/0001-Fix-macro-definitions.patch @@ -1,37 +1,27 @@ -From df8121a8822245df0b191b7d3b1654611fdac1b2 Mon Sep 17 00:00:00 2001 -From: vlj -Date: Tue, 1 Nov 2016 23:09:06 +0100 -Subject: [PATCH] Fix macro definitions. - ---- - gettext-0.19/gettext-runtime/intl/printf-parse.c | 4 +++- - gettext-0.19/gettext-runtime/intl/xsize.h | 6 ++++++ - 2 files changed, 9 insertions(+), 1 deletion(-) - -diff --git a/gettext-0.19/gettext-runtime/intl/printf-parse.c b/gettext-0.19/gettext-runtime/intl/printf-parse.c -index 0e2d2c7..8cedfc6 100644 ---- a/gettext-0.19/gettext-runtime/intl/printf-parse.c -+++ b/gettext-0.19/gettext-runtime/intl/printf-parse.c +diff --git a/gettext-runtime/intl/printf-parse.c b/gettext-runtime/intl/printf-parse.c +index 0e2d2c7..e1dc39b 100644 +--- a/gettext-runtime/intl/printf-parse.c ++++ b/gettext-runtime/intl/printf-parse.c @@ -48,7 +48,9 @@ #include /* Get intmax_t. */ -#if defined IN_LIBINTL || defined IN_LIBASPRINTF -+#if _MSC_VER ++#if defined _MSC_VER +# define intmax_t long int +#elif defined IN_LIBINTL || defined IN_LIBASPRINTF # if HAVE_STDINT_H_WITH_UINTMAX # include # endif -diff --git a/gettext-0.19/gettext-runtime/intl/xsize.h b/gettext-0.19/gettext-runtime/intl/xsize.h -index c256665..d09e79f 100644 ---- a/gettext-0.19/gettext-runtime/intl/xsize.h -+++ b/gettext-0.19/gettext-runtime/intl/xsize.h +diff --git a/gettext-runtime/intl/xsize.h b/gettext-runtime/intl/xsize.h +index c256665..7400ea1 100644 +--- a/gettext-runtime/intl/xsize.h ++++ b/gettext-runtime/intl/xsize.h @@ -27,6 +27,12 @@ # include #endif -+#ifdef _WIN32 ++#if defined _WIN32 +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +# define _GL_INLINE static inline @@ -40,6 +30,3 @@ index c256665..d09e79f 100644 #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif --- -2.10.1.windows.1 - -- cgit v1.2.3 From 4bdefa8a16842208dd800ebb55217b05799dd5bb Mon Sep 17 00:00:00 2001 From: congzhangzh Date: Tue, 6 Mar 2018 03:09:33 +0800 Subject: add ismrmrd (#2946) * add ismrmrd * [ismrmrd] Use system pugixml --- ports/ismrmrd/CONTROL | 4 ++++ ports/ismrmrd/portfile.cmake | 47 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 ports/ismrmrd/CONTROL create mode 100644 ports/ismrmrd/portfile.cmake diff --git a/ports/ismrmrd/CONTROL b/ports/ismrmrd/CONTROL new file mode 100644 index 000000000..7aaa5a42b --- /dev/null +++ b/ports/ismrmrd/CONTROL @@ -0,0 +1,4 @@ +Source: ismrmrd +Version: 1.3.2-1 +Description: ISMRM Raw Data Format +Build-Depends: pugixml diff --git a/ports/ismrmrd/portfile.cmake b/ports/ismrmrd/portfile.cmake new file mode 100644 index 000000000..a3557f0d2 --- /dev/null +++ b/ports/ismrmrd/portfile.cmake @@ -0,0 +1,47 @@ +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "ismrmrd only supports dynamic library and crt linkage") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ismrmrd/ismrmrd + REF v1.3.2 + SHA512 eb806f71c4b183105b3270d658a68195e009c0f7ca37f54f76d650a4d5c83c44d26b5f12a4c47c608aae9990cd04f1204b0c57e6438ca34a271fd54880133106 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DUSE_SYSTEM_PUGIXML=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/ismrmrd/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll) + file(COPY ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll) +endif() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll) + file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll) +endif() + +file(COPY ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/ismrmrd) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info.exe) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_info.exe) + +file(COPY ${CURRENT_BUILDTREES_DIR}/src/ismrmrd-1.3.2/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ismrmrd) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/ismrmrd/LICENSE ${CURRENT_PACKAGES_DIR}/share/ismrmrd/copyright) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/ismrmrd) -- cgit v1.2.3 From 6675327606b46df3691314ce8b29095ded628483 Mon Sep 17 00:00:00 2001 From: Mikhail Paulyshka Date: Mon, 5 Mar 2018 22:25:37 +0300 Subject: [spirv-tools] update to 2018.1 (#2959) --- ports/spirv-tools/CONTROL | 6 +++--- ports/spirv-tools/portfile.cmake | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/spirv-tools/CONTROL b/ports/spirv-tools/CONTROL index 33c43d628..fb75a1280 100644 --- a/ports/spirv-tools/CONTROL +++ b/ports/spirv-tools/CONTROL @@ -1,3 +1,3 @@ -Source: spirv-tools -Version: 2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 -Description: API and commands for processing SPIR-V modules +Source: spirv-tools +Version: 2018.1-1 +Description: API and commands for processing SPIR-V modules diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake index 08e35b7d3..5120dc4f1 100644 --- a/ports/spirv-tools/portfile.cmake +++ b/ports/spirv-tools/portfile.cmake @@ -8,16 +8,16 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/SPIRV-Tools - REF 7e2d26c77b606b21af839b37fd21381c4a669f23 - SHA512 67e8fcdcb9748df1e7c86bb50358a89b656f80a96534bc5771afc4ce22e9ebcc8ca382f784fab7b856324d487f810c21abaaab2facee7453c0343a9b51d7e60b + REF v2018.1 + SHA512 0637c413dafd931e8222f9bf70a024f8b64116f0300c7732b86bcaff321188a0e746f79c1385ae23a7692e83194586b57692960d5be607fb2d7960731b6cd63f HEAD_REF master ) vcpkg_from_github( OUT_SOURCE_PATH SPIRV_HEADERS_PATH REPO KhronosGroup/SPIRV-Headers - REF 2bb92e6fe2c6aa410152fc6c63443f452acb1a65 - SHA512 cdd1437a67c7e31e2062e5d0f25c767b99a3fadd64b91d00c3b07404e535bb4bfd78a43878ebbcd45e013a7153f1a2c969da99d50a99cc39efab940d0aab7cfd + REF bd4c092be34081d88ec8342b1a4d9f77bcce4cac + SHA512 e0bc7b8ea73bef762eff60d83104ca93c70e06c7b6e66f73c931eb9ec51227e0b64c3169fcccbffa311acf714138300104dd5e51cdfc846ed7961debc1f9cceb HEAD_REF master ) -- cgit v1.2.3 From 26fabaf8803cbf4ce36b98c542e2224277e56c98 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 5 Mar 2018 12:07:43 -0800 Subject: [glib][atk] Disable static builds, fix generation to happen outside the source directory --- ports/atk/CMakeLists.txt | 31 ++++++++++++++++++------------- ports/atk/CONTROL | 2 +- ports/atk/portfile.cmake | 5 ++--- ports/glib/CMakeLists.txt | 5 ++++- ports/glib/CONTROL | 2 +- ports/glib/portfile.cmake | 7 +++---- 6 files changed, 29 insertions(+), 23 deletions(-) diff --git a/ports/atk/CMakeLists.txt b/ports/atk/CMakeLists.txt index f260e09e9..41937fff9 100644 --- a/ports/atk/CMakeLists.txt +++ b/ports/atk/CMakeLists.txt @@ -11,21 +11,26 @@ endif() # generate atkmarshal.c and atkmarshal.h source files # glib-genmarshal should be installed along with glib -if(NOT EXISTS ${CMAKE_SOURCE_DIR}/atk/atkmarshal.h OR NOT EXISTS ${CMAKE_SOURCE_DIR}/atk/atkmarshal.c) - find_program(GLIB_GENMARSHAL glib-genmarshal PATH_SUFFIXES glib) - execute_process( - COMMAND ${GLIB_GENMARSHAL} --prefix=atk_marshal atkmarshal.list --header - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/atk - OUTPUT_FILE ${CMAKE_SOURCE_DIR}/atk/atkmarshal.h) - execute_process( - COMMAND ${GLIB_GENMARSHAL} --prefix=atk_marshal atkmarshal.list --body - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/atk - OUTPUT_FILE ${CMAKE_SOURCE_DIR}/atk/atkmarshal.c) -endif() +find_program(GLIB_GENMARSHAL glib-genmarshal PATH_SUFFIXES glib) +file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/atk) + +message("Generating atkmarshal.h: ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --header") +execute_process( + COMMAND ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --header + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/atk + OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/atk/atkmarshal.h +) + +message("Generating atkmarshal.c: ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --body") +execute_process( + COMMAND ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --body + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/atk + OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/atk/atkmarshal.c +) -configure_file(config.h.win32 ${CMAKE_SOURCE_DIR}/config.h COPYONLY) +configure_file(config.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY) add_definitions(-DHAVE_CONFIG_H) -include_directories(. ./atk) +include_directories(. ./atk ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/atk) find_path(GLIB_INCLUDE_DIR glib.h) find_library(GLIB_GLIB_LIBRARY glib-${GLIB_LIB_VERSION}) diff --git a/ports/atk/CONTROL b/ports/atk/CONTROL index 0af45eab4..b4bdda0eb 100644 --- a/ports/atk/CONTROL +++ b/ports/atk/CONTROL @@ -1,4 +1,4 @@ Source: atk -Version: 2.24.0-1 +Version: 2.24.0-2 Description: GNOME Accessibility Toolkit Build-Depends: glib, gettext diff --git a/ports/atk/portfile.cmake b/ports/atk/portfile.cmake index 66207d5ca..8b65312e5 100644 --- a/ports/atk/portfile.cmake +++ b/ports/atk/portfile.cmake @@ -1,7 +1,6 @@ # ATK uses DllMain -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "ATK only supports dynamic library and crt linkage") endif() include(vcpkg_common_functions) diff --git a/ports/glib/CMakeLists.txt b/ports/glib/CMakeLists.txt index 40763e8cd..25218a7f8 100644 --- a/ports/glib/CMakeLists.txt +++ b/ports/glib/CMakeLists.txt @@ -27,6 +27,8 @@ find_library(PCRE_LIBRARY pcre${PCRE_SUFFIX}) # libiconv find_path(ICONV_INCLUDE_DIR iconv.h) find_library(ICONV_LIBRARY NAMES iconv libiconv) +# libiconv +find_library(CHARSET_LIBRARY NAMES charset libcharset) # libffi find_path(FFI_INCLUDE_DIR ffi.h) find_library(FFI_LIBRARY NAMES ffi libffi) @@ -64,7 +66,7 @@ extract_vcproj_sources(win32/vs14/glib.vcxproj GLIB_SOURCES) list(APPEND GLIB_SOURCES glib/libcharset/localcharset.c) # modified internal version with prefixed symbols add_library(glib ${GLIB_SOURCES}) target_compile_definitions(glib PRIVATE USE_SYSTEM_PCRE ${GLIB_EXPORT_MACRO} GLIB_COMPILATION G_LOG_DOMAIN="GLib" LIBDIR) -target_link_libraries(glib ws2_32 winmm ${PCRE_LIBRARY} ${ICONV_LIBRARY} ${LIBINTL_LIBRARY}) +target_link_libraries(glib ws2_32 winmm ${PCRE_LIBRARY} ${ICONV_LIBRARY} ${CHARSET_LIBRARY} ${LIBINTL_LIBRARY}) target_include_directories(glib PRIVATE ${PCRE_INCLUDE_DIR} ${ICONV_INCLUDE_DIR}) target_include_directories(glib PUBLIC ${LIBINTL_INCLUDE_DIR}) list(APPEND GLIB_TARGETS glib) @@ -161,5 +163,6 @@ message(STATUS "Link-time dependencies:") message(STATUS " " ${ZLIB_LIBRARIES}) message(STATUS " " ${PCRE_LIBRARY}) message(STATUS " " ${ICONV_LIBRARY}) +message(STATUS " " ${CHARSET_LIBRARY}) message(STATUS " " ${FFI_LIBRARY}) message(STATUS " " ${LIBINTL_LIBRARY}) diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL index a4e467bbc..4f06e4e2e 100644 --- a/ports/glib/CONTROL +++ b/ports/glib/CONTROL @@ -1,4 +1,4 @@ Source: glib -Version: 2.52.3-1 +Version: 2.52.3-2 Description: Portable, general-purpose utility library. Build-Depends: zlib, pcre, libffi, gettext, libiconv diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake index 9482b4386..9618b6686 100644 --- a/ports/glib/portfile.cmake +++ b/ports/glib/portfile.cmake @@ -1,12 +1,11 @@ # Glib uses winapi functions not available in WindowsStore -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "Error: UWP builds are currently not supported.") endif() # Glib relies on DllMain -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Glib only supports dynamic library and crt linkage") endif() include(vcpkg_common_functions) -- cgit v1.2.3 From a477fd6b6eb5a4053770e50423c6f1144c338c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Mon, 5 Mar 2018 21:19:27 +0100 Subject: [speexdsp] Improve SIMD extension support (#2960) --- ports/speexdsp/CMakeLists.txt | 6 +++--- ports/speexdsp/portfile.cmake | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ports/speexdsp/CMakeLists.txt b/ports/speexdsp/CMakeLists.txt index 20ae3c290..0708faa2d 100644 --- a/ports/speexdsp/CMakeLists.txt +++ b/ports/speexdsp/CMakeLists.txt @@ -1,6 +1,7 @@ # CMAKE project for libspeexdsp cmake_minimum_required(VERSION 3.1) option(SOURCE_PATH "Root directory.") +option(USE_SSE "Use SSE") project (libspeexdsp) file(GLOB_RECURSE LIBSPEEXDSP_SOURCES "${SOURCE_PATH}/libspeexdsp/*.c") @@ -20,9 +21,8 @@ endif () add_definitions(-DHAVE_CONFIG_H -D_WIN32) -string (TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" LOWERCASE_SYSTEM_PROCESSOR) -if (LOWERCASE_SYSTEM_PROCESSOR STREQUAL "x86" OR LOWERCASE_SYSTEM_PROCESSOR STREQUAL "amd64") - add_definitions(-D_USE_SSE) +if (USE_SSE) + add_definitions(-D_USE_SSE -D_USE_SSE2) endif() include_directories("${SOURCE_PATH}/include" diff --git a/ports/speexdsp/portfile.cmake b/ports/speexdsp/portfile.cmake index 7784b7313..72bc313d7 100644 --- a/ports/speexdsp/portfile.cmake +++ b/ports/speexdsp/portfile.cmake @@ -8,9 +8,15 @@ vcpkg_download_distfile(ARCHIVE_FILE ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) +set(USE_SSE OFF) +set(USE_NEON OFF) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(USE_SSE ON) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${CMAKE_PATH} - OPTIONS -DSOURCE_PATH=${SOURCE_PATH} + OPTIONS -DSOURCE_PATH=${SOURCE_PATH} -DUSE_SSE=${USE_SSE} ) vcpkg_install_cmake() -- cgit v1.2.3 From 87fb30839c255ff6e2cf00b9f44aaa46e2403fb9 Mon Sep 17 00:00:00 2001 From: dirkju Date: Tue, 6 Mar 2018 02:35:31 +0100 Subject: Added Gamma library (#2957) --- ports/gamma/CMakeLists.txt | 44 ++++++++++++++++++++++++++++++++++++++++++++ ports/gamma/CONTROL | 4 ++++ ports/gamma/portfile.cmake | 27 +++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 ports/gamma/CMakeLists.txt create mode 100644 ports/gamma/CONTROL create mode 100644 ports/gamma/portfile.cmake diff --git a/ports/gamma/CMakeLists.txt b/ports/gamma/CMakeLists.txt new file mode 100644 index 000000000..6bb48f193 --- /dev/null +++ b/ports/gamma/CMakeLists.txt @@ -0,0 +1,44 @@ +cmake_minimum_required (VERSION 3.0) + +project (gamma) + +# dependent on libsndfile and portaudio +find_path(LIBSNDFILE_H sndfile.h) +find_library(LIBSNDFILE_LIB NAMES libsndfile-1 libsndfile) +find_path(PORTAUDIO_H portaudio.h) +find_library(PORTAUDIO_LIB NAMES portaudio) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + +set(SOURCEFILES + src/arr.cpp + src/AudioIO.cpp + src/Conversion.cpp + src/Domain.cpp + src/DFT.cpp + src/FFT_fftpack.cpp + src/fftpack++1.cpp + src/fftpack++2.cpp + src/SoundFile.cpp + src/Print.cpp + src/Recorder.cpp + src/scl.cpp + src/Scheduler.cpp + src/Timer.cpp + src/SoundFile.cpp) + +include_directories(. Gamma ${CMAKE_INSTALL_FULL_INCLUDEDIR} ${PORTAUDIO_H} ${LIBSNDFILE_H}) + +add_library (gamma ${SOURCEFILES}) +target_link_libraries(gamma PUBLIC ${LIBSNDFILE_LIB} ${PORTAUDIO_LIB}) + +install( + TARGETS gamma + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY Gamma DESTINATION include FILES_MATCHING PATTERN "*.h") +endif() diff --git a/ports/gamma/CONTROL b/ports/gamma/CONTROL new file mode 100644 index 000000000..b70639ea6 --- /dev/null +++ b/ports/gamma/CONTROL @@ -0,0 +1,4 @@ +Source: gamma +Version: gamma-2018-01-27 +Build-Depends: libsndfile, portaudio +Description: Gamma is a cross-platform, C++ library for doing generic synthesis and filtering of signals. It is oriented towards real-time sound and graphics applications, but is equally useful for non-real-time tasks. Gamma is designed to be "light-footed" in terms of memory and processing making it highly suitable for plug-in development or embedding in other C++ projects. diff --git a/ports/gamma/portfile.cmake b/ports/gamma/portfile.cmake new file mode 100644 index 000000000..139e6a48a --- /dev/null +++ b/ports/gamma/portfile.cmake @@ -0,0 +1,27 @@ +# Instead of official release, base on commit hash for now. +set(GAMMA_RELEASE_TAG "cc442ad0c5da369966cd937a96925c7b9a04e9e5") + +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Gamma-${GAMMA_RELEASE_TAG}) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/LancePutnam/Gamma/archive/cc442ad0c5da369966cd937a96925c7b9a04e9e5.zip" + FILENAME "gamma-${GAMMA_RELEASE_TAG}.zip" + SHA512 de44f4d07db0b2cf09e77508d993273d09788dfa919d549393bb77534922b65e9d8a1b8193b4b02c72e6bc4dd060b41b18ff3520a36d4c28f6e2fb4b1e859ee7 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +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=1 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/gamma RENAME copyright) -- cgit v1.2.3 From d4797b37a624f190e6a8e5a6519d2d0add282634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Tue, 6 Mar 2018 21:08:29 +0100 Subject: [curl] Add missing advapi32 link (#2978) This adds missing library, advapi32, to linking. Fixes ARM builds. The same patch is pending merge upstream: https://github.com/curl/curl/pull/2363 --- ports/curl/0003_fix_libraries.patch | 13 +++++++++++++ ports/curl/portfile.cmake | 1 + 2 files changed, 14 insertions(+) create mode 100644 ports/curl/0003_fix_libraries.patch diff --git a/ports/curl/0003_fix_libraries.patch b/ports/curl/0003_fix_libraries.patch new file mode 100644 index 000000000..a06e7b544 --- /dev/null +++ b/ports/curl/0003_fix_libraries.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 490cc19ef8..23fe34f614 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -330,7 +330,7 @@ if(CMAKE_USE_WINSSL) + set(SSL_ENABLED ON) + set(USE_SCHANNEL ON) # Windows native SSL/TLS support + set(USE_WINDOWS_SSPI ON) # CMAKE_USE_WINSSL implies CURL_WINDOWS_SSPI +- list(APPEND CURL_LIBS "crypt32") ++ list(APPEND CURL_LIBS "crypt32" "advapi32") + endif() + if(CURL_WINDOWS_SSPI) + set(USE_WINDOWS_SSPI ON) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index ffb73b425..94587649d 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch ${CMAKE_CURRENT_LIST_DIR}/0002_fix_uwp.patch + ${CMAKE_CURRENT_LIST_DIR}/0003_fix_libraries.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) -- cgit v1.2.3 From 709ced580d1af1a0704660e355f5a3f0f06c8899 Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Wed, 7 Mar 2018 10:19:24 +0800 Subject: Fix export information --- toolsrc/src/vcpkg/export.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 831058007..16c84f99d 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -228,6 +228,7 @@ namespace vcpkg::Export {fs::path{"scripts"} / "getWindowsSDK.ps1"}, {fs::path{"scripts"} / "getProgramFilesPlatformBitness.ps1"}, {fs::path{"scripts"} / "getProgramFiles32bit.ps1"}, + {fs::path{"scripts"} / "VcpkgPowershellUtils.ps1"}, }; for (const fs::path& file : integration_files_relative_to_root) @@ -428,7 +429,7 @@ namespace vcpkg::Export { System::println( System::Color::success, R"(Files exported at: "%s")", raw_exported_dir_path.generic_string()); - print_next_step_info(export_to_path); + print_next_step_info(raw_exported_dir_path); } if (opts.nuget) -- cgit v1.2.3 From 59795e2a8e4e2ecd0f1a09e165b61291764df94d Mon Sep 17 00:00:00 2001 From: Viktor Gal Date: Wed, 7 Mar 2018 18:56:59 +0100 Subject: add shogun 6.1.3 (#2977) * add shogun 6.1.3 * [shogun] Add additional dependencies, force static linking --- ports/shogun/CONTROL | 4 +++ ports/shogun/MSDirent.cmake | 1 + ports/shogun/cmake.patch | 73 ++++++++++++++++++++++++++++++++++++++++ ports/shogun/portfile.cmake | 67 ++++++++++++++++++++++++++++++++++++ scripts/buildsystems/vcpkg.cmake | 5 +++ 5 files changed, 150 insertions(+) create mode 100644 ports/shogun/CONTROL create mode 100644 ports/shogun/MSDirent.cmake create mode 100644 ports/shogun/cmake.patch create mode 100644 ports/shogun/portfile.cmake diff --git a/ports/shogun/CONTROL b/ports/shogun/CONTROL new file mode 100644 index 000000000..6a05a331e --- /dev/null +++ b/ports/shogun/CONTROL @@ -0,0 +1,4 @@ +Source: shogun +Version: 6.1.3 +Build-Depends: bzip2, eigen3, liblzma, libxml2, openblas, nlopt, rxcpp, snappy, zlib, protobuf, curl, lzo, dirent +Description: Unified and efficient Machine Learning diff --git a/ports/shogun/MSDirent.cmake b/ports/shogun/MSDirent.cmake new file mode 100644 index 000000000..dd895f970 --- /dev/null +++ b/ports/shogun/MSDirent.cmake @@ -0,0 +1 @@ +find_path(MSDIRENT_INCLUDE_DIR NAMES dirent.h) diff --git a/ports/shogun/cmake.patch b/ports/shogun/cmake.patch new file mode 100644 index 000000000..16f1c3ad4 --- /dev/null +++ b/ports/shogun/cmake.patch @@ -0,0 +1,73 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6c48bed..6f97c8b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,8 +60,8 @@ SET(SYSTEM_C_FLAGS "${CMAKE_C_FLAGS}") + SET(SYSTEM_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + STRING(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UC) + IF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION")) +- SET(CMAKE_C_FLAGS "") +- SET(CMAKE_CXX_FLAGS "") ++# SET(CMAKE_C_FLAGS "") ++# SET(CMAKE_CXX_FLAGS "") + ENDIF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION")) + + # CCACHE +@@ -184,12 +184,12 @@ SET(SWIG_CXX_COMPILER_FLAGS "-O0 -g") + SET(CMAKE_C_FLAGS "${COMPILER_WARNINGS} ${CMAKE_C_FLAGS}") + SET(CMAKE_CXX_FLAGS "${COMPILER_WARNINGS} ${CMAKE_CXX_FLAGS}") + IF(MSVC) +- SET(CMAKE_C_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}") +- SET(CMAKE_CXX_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}") +- SET(CMAKE_C_FLAGS_DISTRIBUTION "/Ot") +- SET(CMAKE_CXX_FLAGS_DISTRIBUTION "/Ot") +- SET(CMAKE_C_FLAGS_DEBUG "/DEBUG /Od /Zi") +- SET(CMAKE_CXX_FLAGS_DEBUG "/DEBUG /Od /Zi") ++ # SET(CMAKE_C_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}") ++ # SET(CMAKE_CXX_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}") ++ # SET(CMAKE_C_FLAGS_DISTRIBUTION "/Ot") ++ # SET(CMAKE_CXX_FLAGS_DISTRIBUTION "/Ot") ++ # SET(CMAKE_C_FLAGS_DEBUG "/DEBUG /Od /Zi") ++ # SET(CMAKE_CXX_FLAGS_DEBUG "/DEBUG /Od /Zi") + add_compile_options("/bigobj") + ELSE() + SET(CMAKE_C_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}") +diff --git a/cmake/version.cmake b/cmake/version.cmake +index fbca111..f6847f7 100644 +--- a/cmake/version.cmake ++++ b/cmake/version.cmake +@@ -5,7 +5,7 @@ SET(MAINVERSION ${VERSION}) + + SET(EXTRA "") + +-IF(EXISTS "${ROOT_DIR}/.git/") ++IF(EXISTS "${ROOT_DIR}/.git/" AND FALSE) + FIND_PACKAGE(Git QUIET) + IF (NOT GIT_FOUND) + MESSAGE(FATAL_ERROR "The source is checked out from a git repository, but cannot find git executable!") +diff --git a/src/shogun/CMakeLists.txt b/src/shogun/CMakeLists.txt +index 9e79786..fd76961 100644 +--- a/src/shogun/CMakeLists.txt ++++ b/src/shogun/CMakeLists.txt +@@ -145,7 +145,7 @@ endif() + # add target for static library if enabled + if (LIBSHOGUN_BUILD_STATIC) + add_library(shogun-static STATIC $ ${CMAKE_CURRENT_BINARY_DIR}/lib/config.h) +- set_property(TARGET shogun-static PROPERTY OUTPUT_NAME shogun) ++ set_property(TARGET shogun-static PROPERTY OUTPUT_NAME libshogun) + target_include_directories(shogun-static PUBLIC + $ + $ +@@ -492,10 +492,12 @@ ELSE() + ENDIF() + + # set the desidered targets to be installed ++if(NOT INSTALL_TARGETS) + set(INSTALL_TARGETS shogun) + if (LIBSHOGUN_BUILD_STATIC) + LIST(APPEND INSTALL_TARGETS shogun-static) + endif() ++endif() + + INSTALL( + TARGETS ${INSTALL_TARGETS} diff --git a/ports/shogun/portfile.cmake b/ports/shogun/portfile.cmake new file mode 100644 index 000000000..24e258539 --- /dev/null +++ b/ports/shogun/portfile.cmake @@ -0,0 +1,67 @@ +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("shogun only supports static library linkage") + set(VCPKG_LIBRARY_LINKAGE "static") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO shogun-toolbox/shogun + REF shogun_6.1.3 + SHA512 11aeed456b13720099ca820ab9742c90ce4af2dc049602a425f8c44d2fa155327c7f1d3af2ec840666f600a91e75902d914ffe784d76ed35810da4f3a5815673 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch +) + +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) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_META_EXAMPLES=OFF + -DBUILD_EXAMPLES=OFF + -DUSE_SVMLIGHT=OFF + -DENABLE_TESTING=OFF + -DLICENSE_GPL_SHOGUN=OFF + # 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 + -DCMAKE_DISABLE_FIND_PACKAGE_GLPK=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_CPLEX=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_ARPACK=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_Mosek=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_LpSolve=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_ColPack=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_ARPREC=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_Ctags=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_CCache=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE + + -DINSTALL_TARGETS=shogun-static +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/shogun) + +file(REMOVE_RECURSE + # This directory is empty given the settings above + ${CURRENT_PACKAGES_DIR}/include/shogun/mathematics/linalg/backend + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/shogun) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/shogun/COPYING ${CURRENT_PACKAGES_DIR}/share/shogun/copyright) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 50001e97d..2f3af6598 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -260,6 +260,11 @@ macro(find_package name) "optimized" "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/nghttp2.lib") endif() endif() + elseif("${name}" STREQUAL "LibXml2") + _find_package(${ARGV}) + if(LibXml2_FOUND AND (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) + list(APPEND LIBXML2_LIBRARIES libiconv libcharset ws2_32) + endif() else() _find_package(${ARGV}) endif() -- cgit v1.2.3 From 03deecdf207190d1e133ca304f33d2d946ee6ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Wed, 7 Mar 2018 19:09:57 +0100 Subject: Update Catch to 2.2.0 (#2981) --- ports/catch2/CONTROL | 2 +- ports/catch2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL index 272a2592d..3f87c3130 100644 --- a/ports/catch2/CONTROL +++ b/ports/catch2/CONTROL @@ -1,4 +1,4 @@ Source: catch2 -Version: 2.1.2 +Version: 2.2.0 Description: A modern, header-only test framework for unit testing. Issues, PRs and changelogs can be found at https://github.com/catchorg/Catch2 diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake index 4c75ae0f6..e614304a6 100644 --- a/ports/catch2/portfile.cmake +++ b/ports/catch2/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v2.1.2) +set(CATCH_VERSION v2.2.0) vcpkg_download_distfile(HEADER URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catchorg-catch2-${CATCH_VERSION}.hpp" - SHA512 4d6b26aff890fd543c05a780f777df6a3ac609d67d7bc6888377c7e18b7d8d371f12725a5ff03ce5c3fac05730e8b7116164c7173a04eb56ca38c2f3e3cbb9a6 + SHA512 363a051d6dc67475f6832b2a1e0f7367bdef45a316c5222112842919808227bd9e9ccfe97d0439b79f86377fbb5017eed98f2dc58fe66b14f9804741dcd83036 ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From 76f647feb1e6e0cd42ee3de44d92c0d89d5126a6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Mar 2018 10:14:02 -0800 Subject: [alac-decoder] Fix x64 --- ports/alac-decoder/no-pragma-warning.patch | 14 ++++++++++++++ ports/alac-decoder/portfile.cmake | 1 + 2 files changed, 15 insertions(+) create mode 100644 ports/alac-decoder/no-pragma-warning.patch diff --git a/ports/alac-decoder/no-pragma-warning.patch b/ports/alac-decoder/no-pragma-warning.patch new file mode 100644 index 000000000..97e2960c8 --- /dev/null +++ b/ports/alac-decoder/no-pragma-warning.patch @@ -0,0 +1,14 @@ +diff --git a/alac.c b/alac.c +index b829e29..8e8805f 100644 +--- a/alac.c ++++ b/alac.c +@@ -284,7 +284,9 @@ static int count_leading_zeros(int input) + return output; + } + #else ++#if !defined(_MSC_VER) + #warning using generic count leading zeroes. You may wish to write one for your CPU / compiler ++#endif + static int count_leading_zeros(int input) + { + int output = 0; diff --git a/ports/alac-decoder/portfile.cmake b/ports/alac-decoder/portfile.cmake index 732ed2631..c1390d7f8 100644 --- a/ports/alac-decoder/portfile.cmake +++ b/ports/alac-decoder/portfile.cmake @@ -15,6 +15,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/remove_stdint_headers.patch + ${CMAKE_CURRENT_LIST_DIR}/no-pragma-warning.patch ) vcpkg_configure_cmake( -- cgit v1.2.3 From ae1ce5aaa794c7d3415cabe4f46ea150a01db5ca Mon Sep 17 00:00:00 2001 From: Bruce Jones Date: Wed, 7 Mar 2018 13:17:52 -0500 Subject: applocal-deps applied to MODULE_LIBRARY target too (#2972) * Fix for issue #2786 * [vcpkg-cmake-toolchain] Only applocal dependencies for shared libraries * applocal-deps applied to MODULE_LIBRARY target too --- scripts/buildsystems/vcpkg.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 2f3af6598..b3e27b5d0 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -170,7 +170,7 @@ function(add_library name) list(FIND ARGV "ALIAS" ALIAS_IDX) if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) get_target_property(IS_LIBRARY_SHARED ${name} TYPE) - if(VCPKG_APPLOCAL_DEPS AND _VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp" AND IS_LIBRARY_SHARED STREQUAL "SHARED_LIBRARY") + if(VCPKG_APPLOCAL_DEPS AND _VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp" AND (IS_LIBRARY_SHARED STREQUAL "SHARED_LIBRARY" OR IS_LIBRARY_SHARED STREQUAL "MODULE_LIBRARY")) add_custom_command(TARGET ${name} POST_BUILD COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 -targetBinary $ -- cgit v1.2.3 From a03df3f43308901f742d2afd47e3a0a1abfc3a8b Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Thu, 8 Mar 2018 04:01:49 +0900 Subject: [realsense2] Update to v2.10.1 (#2956) * [realsense2] Update to v2.10.1 Update realsense2 port to librealsense v2.10.1. * [realsense2] Change HEAD to development Change HEAD to development. The latest branch of librealsense is "development". * [realsense2] Add option to support RGB image decode using AVX2 Add option to support RGB image decode using AVX2. This option will be deprecated in the later versions. * [realsense2] Add debug postfix Add debug postfix "_d". --- ports/realsense2/CONTROL | 5 +- ports/realsense2/build_with_static_crt.patch | 67 ++++++++++++++++++++++++++ ports/realsense2/crt-linkage-restriction.patch | 21 -------- ports/realsense2/fix_rgb_using_avx2.patch | 12 +++++ ports/realsense2/portfile.cmake | 26 +++++++--- 5 files changed, 102 insertions(+), 29 deletions(-) create mode 100644 ports/realsense2/build_with_static_crt.patch delete mode 100644 ports/realsense2/crt-linkage-restriction.patch create mode 100644 ports/realsense2/fix_rgb_using_avx2.patch diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index 22cbf12e4..f1674b7e9 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,3 +1,6 @@ Source: realsense2 -Version: 2.10.0 +Version: 2.10.1 Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). + +Feature: avx2 +Description: rgb image decode using avx2 \ No newline at end of file diff --git a/ports/realsense2/build_with_static_crt.patch b/ports/realsense2/build_with_static_crt.patch new file mode 100644 index 000000000..ab8ec426d --- /dev/null +++ b/ports/realsense2/build_with_static_crt.patch @@ -0,0 +1,67 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9425b92d..21232504 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -299,6 +299,8 @@ if(BUILD_EASYLOGGINGPP) + list(APPEND REALSENSE_HPP third-party/easyloggingpp/src/easylogging++.h) + endif() + ++option(BUILD_WITH_STATIC_CRT "Build with static link CRT" ON) ++ + if(WIN32) + source_group("Source Files\\Backend" FILES + src/win/win-helpers.cpp +@@ -484,15 +486,17 @@ if(WIN32) + src/proc/disparity-transform.h + ) + +- foreach(flag_var +- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE +- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO +- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE +- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) +- if(${flag_var} MATCHES "/MD") +- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") +- endif(${flag_var} MATCHES "/MD") +- endforeach(flag_var) ++ if(BUILD_WITH_STATIC_CRT) ++ foreach(flag_var ++ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE ++ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO ++ CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE ++ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) ++ if(${flag_var} MATCHES "/MD") ++ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") ++ endif(${flag_var} MATCHES "/MD") ++ endforeach(flag_var) ++ endif() + else() + + endif() +@@ -652,15 +656,17 @@ if (BUILD_WITH_TM2) + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake) + find_package(libtm REQUIRED) + +- foreach(flag_var +- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE +- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO +- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE +- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) +- if(${flag_var} MATCHES "/MD") +- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") +- endif(${flag_var} MATCHES "/MD") +- endforeach(flag_var) ++ if(BUILD_WITH_STATIC_CRT) ++ foreach(flag_var ++ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE ++ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO ++ CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE ++ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) ++ if(${flag_var} MATCHES "/MD") ++ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") ++ endif(${flag_var} MATCHES "/MD") ++ endforeach(flag_var) ++ endif() + + list(APPEND REALSENSE_HPP + src/tm2/tm-context.h diff --git a/ports/realsense2/crt-linkage-restriction.patch b/ports/realsense2/crt-linkage-restriction.patch deleted file mode 100644 index 772978616..000000000 --- a/ports/realsense2/crt-linkage-restriction.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d6717b19..3fb373be 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -453,16 +453,6 @@ if(WIN32) - src/proc/syncer-processing-block.h - src/proc/disparity-transform.h - ) -- -- foreach(flag_var -- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE -- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO -- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE -- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) -- if(${flag_var} MATCHES "/MD") -- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") -- endif(${flag_var} MATCHES "/MD") -- endforeach(flag_var) - else() - - endif() diff --git a/ports/realsense2/fix_rgb_using_avx2.patch b/ports/realsense2/fix_rgb_using_avx2.patch new file mode 100644 index 000000000..38ae33a7c --- /dev/null +++ b/ports/realsense2/fix_rgb_using_avx2.patch @@ -0,0 +1,12 @@ +diff --git a/src/image.cpp b/src/image.cpp +index 47cc68d8..04a8afd3 100644 +--- a/src/image.cpp ++++ b/src/image.cpp +@@ -8,6 +8,7 @@ + + #ifdef __SSSE3__ + #include // For SSE3 intrinsic used in unpack_yuy2_sse ++#include + #endif + + #pragma pack(push, 1) // All structs in this file are assumed to be byte-packed diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index b58be1ebe..cec2c9695 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -3,18 +3,27 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense - REF v2.10.0 - SHA512 af5f77eb69620e8485bbe0b7c82c405ed518c50b3319e4c174c002180c4842d5dbfaab354051ed4b287effac58ae93dd1160ebc27d35def58e685874a89c02ee - HEAD_REF master + REF v2.10.1 + SHA512 fb00a424a5bd7335cc661261e76cf623e27a89af1033692d4cb6ed523af1295359929c235e82253911e61323cb7b82551a9223862174cb0e2363ac944b2db923 + HEAD_REF development ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/crt-linkage-restriction.patch + ${CMAKE_CURRENT_LIST_DIR}/build_with_static_crt.patch # https://github.com/IntelRealSense/librealsense/pull/1262 + ${CMAKE_CURRENT_LIST_DIR}/fix_rgb_using_avx2.patch # https://github.com/IntelRealSense/librealsense/pull/1245 ) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) +# This option will be deprecated in the later versions. +# Please see Pull Request #1245. https://github.com/IntelRealSense/librealsense/pull/1245 +set(RGB_USING_AVX2 OFF) +if("avx2" IN_LIST FEATURES) + set(RGB_USING_AVX2 ON) +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_LIBRARY_LINKAGE) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_CRT_LINKAGE) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -24,10 +33,13 @@ vcpkg_configure_cmake( -DBUILD_GRAPHICAL_EXAMPLES=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_UNIT_TESTS=OFF - -DBUILD_WITH_OPENMP=OFF # keep OpenMP off until librealsense issue #744 is patched - -DBUILD_SHARED_LIBS=${BUILD_SHARED} + -DBUILD_WITH_OPENMP=OFF + -DBUILD_SHARED_LIBS=${BUILD_LIBRARY_LINKAGE} + -DBUILD_WITH_STATIC_CRT=${BUILD_CRT_LINKAGE} + -DRGB_USING_AVX2=${RGB_USING_AVX2} OPTIONS_DEBUG "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + -DCMAKE_DEBUG_POSTFIX="_d" ) vcpkg_install_cmake() -- cgit v1.2.3 From 7221344fd89a46b2bb4eb300f0633c76823bee55 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Mar 2018 11:10:12 -0800 Subject: [libmysql][chakracore] Add fast fail for uwp --- ports/chakracore/portfile.cmake | 9 +++++++-- ports/libmysql/portfile.cmake | 11 +++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ports/chakracore/portfile.cmake b/ports/chakracore/portfile.cmake index ce5934eb1..7e8d8ec6e 100644 --- a/ports/chakracore/portfile.cmake +++ b/ports/chakracore/portfile.cmake @@ -1,10 +1,15 @@ -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) message(STATUS "Warning: Static building not supported yet. Building dynamic.") set(VCPKG_LIBRARY_LINKAGE dynamic) endif() -if (VCPKG_CRT_LINKAGE STREQUAL static) +if(VCPKG_CRT_LINKAGE STREQUAL static) message(FATAL_ERROR "Static linking of the CRT is not yet supported.") endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "UWP is not currently supported.") +endif() + include(vcpkg_common_functions) vcpkg_from_github( diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake index 741e67308..dee383a81 100644 --- a/ports/libmysql/portfile.cmake +++ b/ports/libmysql/portfile.cmake @@ -2,6 +2,10 @@ if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h") message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.") endif() +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "libmysql cannot currently be cross-compiled for UWP") +endif() + include(vcpkg_common_functions) vcpkg_from_github( @@ -18,6 +22,11 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/boost_and_build.patch ) +set(STACK_DIRECTION) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(STACK_DIRECTION -DSTACK_DIRECTION=-1) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS @@ -25,6 +34,8 @@ vcpkg_configure_cmake( -DWITH_UNIT_TESTS=OFF -DENABLED_PROFILING=OFF -DWIX_DIR=OFF + -DHAVE_LLVM_LIBCPP_EXITCODE=1 + ${STACK_DIRECTION} -DWINDOWS_RUNTIME_MD=ON # Note: this disables _replacement_ of /MD with /MT. If /MT is specified, it will be preserved. ) -- cgit v1.2.3 From a759caf15e031744e99e9718633fcc8d9a60b077 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Mar 2018 11:56:21 -0800 Subject: [gsl] Fix finding release libs in debug configurations. Fixes #2982. --- ports/gsl/CMakeLists.txt | 7 ++++--- ports/gsl/CONTROL | 2 +- ports/gsl/portfile.cmake | 2 +- ports/gsl/usage | 4 ++++ scripts/buildsystems/vcpkg.cmake | 12 ++++++++++++ 5 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 ports/gsl/usage diff --git a/ports/gsl/CMakeLists.txt b/ports/gsl/CMakeLists.txt index eb38a4431..0027fe291 100644 --- a/ports/gsl/CMakeLists.txt +++ b/ports/gsl/CMakeLists.txt @@ -63,10 +63,11 @@ target_link_libraries(gsl PUBLIC gslcblas) if(INSTALL_HEADERS) set_target_properties(gsl PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") endif() -target_include_directories(gslcblas PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_include_directories(gsl PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories(gslcblas PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories(gsl PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) # For the build, we need to copy all headers to the gsl directory -file(COPY ${PUBLIC_HEADERS} DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/gsl") +file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/gsl) +file(COPY ${PUBLIC_HEADERS} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/gsl") set(TARGET_INSTALL_OPTIONS) if(INSTALL_HEADERS) diff --git a/ports/gsl/CONTROL b/ports/gsl/CONTROL index b6dc858dc..f02ecc2ee 100644 --- a/ports/gsl/CONTROL +++ b/ports/gsl/CONTROL @@ -1,3 +1,3 @@ Source: gsl -Version: 2.4-2 +Version: 2.4-3 Description: The GNU Scientific Library is a numerical library for C and C++ programmers diff --git a/ports/gsl/portfile.cmake b/ports/gsl/portfile.cmake index 519fe4708..12c0526bc 100644 --- a/ports/gsl/portfile.cmake +++ b/ports/gsl/portfile.cmake @@ -27,7 +27,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsl) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gsl) file(RENAME ${CURRENT_PACKAGES_DIR}/share/gsl/COPYING ${CURRENT_PACKAGES_DIR}/share/gsl/copyright) vcpkg_copy_pdbs() diff --git a/ports/gsl/usage b/ports/gsl/usage new file mode 100644 index 000000000..f1ae92436 --- /dev/null +++ b/ports/gsl/usage @@ -0,0 +1,4 @@ +The package gsl is compatible with built-in CMake targets: + + find_package(GSL REQUIRED) + target_link_libraries(main PRIVATE GSL::gsl GSL::gslcblas) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index b3e27b5d0..a1989b23a 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -251,6 +251,18 @@ macro(find_package name) set_target_properties(hdf5::${HDF5TARGET}-static PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::${HDF5TARGET}-shared") endif() endforeach() + elseif("${name}" STREQUAL "GSL") + _find_package(${ARGV}) + if(GSL_FOUND AND TARGET GSL::gsl) + set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Release ) + set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Release ) + if( EXISTS "${GSL_LIBRARY_DEBUG}" AND EXISTS "${GSL_CBLAS_LIBRARY_DEBUG}") + set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( GSL::gsl PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_LIBRARY_DEBUG}" ) + set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( GSL::gslcblas PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_CBLAS_LIBRARY_DEBUG}" ) + endif() + endif() elseif("${name}" STREQUAL "CURL") _find_package(${ARGV}) if(CURL_FOUND) -- cgit v1.2.3 From 41c6741b21fe246e288f754ab8dbc2d352a1633f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Mar 2018 12:06:30 -0800 Subject: [c-ares] Fail fast check for uwp --- ports/c-ares/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/c-ares/portfile.cmake b/ports/c-ares/portfile.cmake index 14f948ece..4a569b567 100644 --- a/ports/c-ares/portfile.cmake +++ b/ports/c-ares/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "c-ares does not currently support UWP.") +endif() + include(vcpkg_common_functions) vcpkg_from_github( -- cgit v1.2.3 From 58e8c96de050907cbf76d567f247c01c68bb9855 Mon Sep 17 00:00:00 2001 From: David Nerjes Date: Wed, 7 Mar 2018 23:16:07 +0100 Subject: [entt] inital port (#2984) * [entt] inital port * [entt] Remove unneeded vcpkg_configure_cmake step --- ports/entt/CONTROL | 3 +++ ports/entt/portfile.cmake | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ports/entt/CONTROL create mode 100644 ports/entt/portfile.cmake diff --git a/ports/entt/CONTROL b/ports/entt/CONTROL new file mode 100644 index 000000000..4e4c44334 --- /dev/null +++ b/ports/entt/CONTROL @@ -0,0 +1,3 @@ +Source: entt +Version: 2.4.2-1 +Description: Gaming meets modern C++ - a fast and reliable entity-component system and much more. diff --git a/ports/entt/portfile.cmake b/ports/entt/portfile.cmake new file mode 100644 index 000000000..e67824162 --- /dev/null +++ b/ports/entt/portfile.cmake @@ -0,0 +1,18 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO skypjack/entt + REF v2.4.2 + SHA512 fd532f2c180c328d396f557386b70e961c122af11e379ce57db3709d20345280ada200dadde136ae3557ad25daa944d8a86f7868cd0bedea78427d42c27d6e6d +) + +file(INSTALL + ${SOURCE_PATH}/src/entt + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +# Handle copyright/readme/package files +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/entt RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/entt) -- cgit v1.2.3 From 864ddcd6812bbed805864df0180e8fcab34912f6 Mon Sep 17 00:00:00 2001 From: W1m0k <37108473+W1m0k@users.noreply.github.com> Date: Thu, 8 Mar 2018 05:21:52 +0700 Subject: [uwebsockets] Update to 0.14.5 (#2976) * [uwebsockets] Update to 0.14.5 * [uwebsockets] Use vcpkg_from_github --- ports/uwebsockets/CONTROL | 2 +- ports/uwebsockets/portfile.cmake | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index 13aa16cc5..a5ea7d287 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets -Version: 0.14.4-1 +Version: 0.14.5-1 Build-Depends: libuv, openssl, zlib Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js diff --git a/ports/uwebsockets/portfile.cmake b/ports/uwebsockets/portfile.cmake index 9c7a9d719..6c660e948 100644 --- a/ports/uwebsockets/portfile.cmake +++ b/ports/uwebsockets/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(VERSION 0.14.4) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/uwebsockets-${VERSION}) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/uWebSockets/uWebSockets/archive/v${VERSION}.zip" - FILENAME "uwebsockets-v${VERSION}.zip" - SHA512 cc395437790a51a729582897111304e7d6c72574d59c55929a686b6a8a489eb3ea3ea7f037aeda9083243317ed885bd710a708d3dd635220387d3253e0712b10 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO uWebSockets/uWebSockets + REF v0.14.5 + SHA512 93fa26446962be34f721db609f4cdf5f2d84771a3101f37daab75c1e46aa1a1402ec0d4c6b000b4eeeafa1a391f25c186bfeda1b3dc395da4e48bdb9a498fd22 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 1b4bc5e27eeb037c299d3f57e9bed7e3c20c6d76 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Mar 2018 15:01:49 -0800 Subject: [vcpkg] Add case for exe path discovery for macos --- toolsrc/src/vcpkg/base/system.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index f71fd8445..e55db9461 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -7,6 +7,10 @@ #include +#if defined(__APPLE__) +# include +#endif + #pragma comment(lib, "Advapi32") namespace vcpkg::System @@ -31,7 +35,15 @@ namespace vcpkg::System const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); if (bytes == 0) std::abort(); return fs::path(buf, buf + bytes); -#else +#elif __APPLE__ + uint32_t size = 1024 * 32; + char buf[size] = {}; + bool result = _NSGetExecutablePath(buf, &size); + Checks::check_exit(VCPKG_LINE_INFO, result != -1, "Could not determine current executable path."); + std::unique_ptr canonicalPath (realpath(buf, NULL)); + Checks::check_exit(VCPKG_LINE_INFO, result != -1, "Could not determine current executable path."); + return fs::path(std::string(canonicalPath.get())); +#else /* LINUX */ std::array buf; auto written = readlink("/proc/self/exe", buf.data(), buf.size()); Checks::check_exit(VCPKG_LINE_INFO, written != -1, "Could not determine current executable path."); -- cgit v1.2.3 From a6d56f88e5bb29c99b198e4ff2eee6bed24d4423 Mon Sep 17 00:00:00 2001 From: congzhangzh Date: Thu, 8 Mar 2018 09:19:20 +0800 Subject: add armadillo (#2954) * init add armadillo * [armadillo] Disable wrapper lib. Generate appropriate cmake usage information. --- ports/armadillo/ArmadilloConfig.cmake | 4 +++ ports/armadillo/CONTROL | 3 +++ ports/armadillo/disable-wrapper.patch | 50 +++++++++++++++++++++++++++++++++++ ports/armadillo/portfile.cmake | 39 +++++++++++++++++++++++++++ ports/armadillo/usage | 5 ++++ 5 files changed, 101 insertions(+) create mode 100644 ports/armadillo/ArmadilloConfig.cmake create mode 100644 ports/armadillo/CONTROL create mode 100644 ports/armadillo/disable-wrapper.patch create mode 100644 ports/armadillo/portfile.cmake create mode 100644 ports/armadillo/usage diff --git a/ports/armadillo/ArmadilloConfig.cmake b/ports/armadillo/ArmadilloConfig.cmake new file mode 100644 index 000000000..4658b665c --- /dev/null +++ b/ports/armadillo/ArmadilloConfig.cmake @@ -0,0 +1,4 @@ +set(ARMADILLO_FOUND TRUE) +set(ARMADILLO_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include") +set(ARMADILLO_LIBRARY_DIRS) +set(ARMADILLO_LIBRARIES) diff --git a/ports/armadillo/CONTROL b/ports/armadillo/CONTROL new file mode 100644 index 000000000..59a3ba1f4 --- /dev/null +++ b/ports/armadillo/CONTROL @@ -0,0 +1,3 @@ +Source: armadillo +Version: 8.400.0-1 +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 diff --git a/ports/armadillo/disable-wrapper.patch b/ports/armadillo/disable-wrapper.patch new file mode 100644 index 000000000..06eb4a776 --- /dev/null +++ b/ports/armadillo/disable-wrapper.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7924a8f..853c2ee 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,7 +27,7 @@ include(CheckLibraryExists) + ## You will then need to link your programs with -lblas -llapack instead of -larmadillo + ## If you're using OpenBLAS, link your programs with -lopenblas -llapack instead of -larmadillo + +-set(ARMA_USE_WRAPPER true) ++set(ARMA_USE_WRAPPER false) + + + # the settings below will be automatically configured by the rest of this script +@@ -379,7 +379,7 @@ message(STATUS "Generating ${PROJECT_BINARY_DIR}/tmp/include/config.hpp") + configure_file(${PROJECT_BINARY_DIR}/tmp/include/armadillo_bits/config.hpp.cmake ${PROJECT_BINARY_DIR}/tmp/include/armadillo_bits/config.hpp) + + message(STATUS "Generating ${PROJECT_SOURCE_DIR}/examples/Makefile") +-configure_file(${PROJECT_SOURCE_DIR}/examples/Makefile.cmake ${PROJECT_SOURCE_DIR}/examples/Makefile) ++#configure_file(${PROJECT_SOURCE_DIR}/examples/Makefile.cmake ${PROJECT_SOURCE_DIR}/examples/Makefile) + + + include_directories(${PROJECT_BINARY_DIR}/tmp/include/ ${CMAKE_REQUIRED_INCLUDES}) +@@ -439,11 +439,13 @@ PATTERN "*~" EXCLUDE + PATTERN "*orig" EXCLUDE + ) + ++if(ARMA_USE_WRAPPER) + install(TARGETS armadillo EXPORT ArmadilloLibraryDepends + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +- ++endif() ++ + # Export the package for use from the build-tree + # (this registers the build-tree with a global CMake-registry) + export(PACKAGE armadillo) +@@ -465,10 +467,11 @@ configure_file(${PROJECT_SOURCE_DIR}/cmake_aux/InstallFiles/ArmadilloConfigVersi + "${PROJECT_BINARY_DIR}/ArmadilloConfigVersion.cmake" @ONLY) + + # Install the export set for use with the install-tree ++if(ARMA_USE_WRAPPER) + install(EXPORT ArmadilloLibraryDepends DESTINATION + "${CMAKE_INSTALL_DATADIR}/Armadillo/CMake" + COMPONENT dev) +- ++endif() + + ## GLOBAL INSTALL FILES + # Create ArmadilloConfig.cmake file for the use from the install tree diff --git a/ports/armadillo/portfile.cmake b/ports/armadillo/portfile.cmake new file mode 100644 index 000000000..b8240089c --- /dev/null +++ b/ports/armadillo/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("Armadillo only supports static library linkage") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +#as conradsnicta/armadillo-code has no release, and the link http://sourceforge.net/projects/arma/files/armadillo-8.400.0.tar.xz is not worked, I use the latest commit for 8.400.x branch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO conradsnicta/armadillo-code + REF a25f66da4c27d40a4a7699199cbf4dc747e712a7 + SHA512 bf5e1de18c38503e46f72f4f9f145477b6b782baf0df42600acb8811c7a07a5d8c0cd2ac3015d4169c961876e4cbb0457a7c1417b55ba52c98d4f78d145f9ae6 + HEAD_REF unstable +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-wrapper.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDETECT_HDF5=false +) + +vcpkg_install_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/CMake) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/ArmadilloConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Armadillo) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/Armadillo RENAME copyright) diff --git a/ports/armadillo/usage b/ports/armadillo/usage new file mode 100644 index 000000000..26d82f0ef --- /dev/null +++ b/ports/armadillo/usage @@ -0,0 +1,5 @@ +The package armadillo is compatible with built-in CMake targets: + + find_package(Armadillo CONFIG REQUIRED) + target_include_directories(main PRIVATE ${ARMADILLO_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${ARMADILLO_LIBRARIES}) -- cgit v1.2.3 From d3976588363419c073403eb9bf4dfad7e40fa56f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Mar 2018 17:35:13 -0800 Subject: [azure-storage-cpp] Upgrade to 3.2.0 --- ports/azure-storage-cpp/CONTROL | 2 +- ports/azure-storage-cpp/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index 4f80cfd7d..837aa8ae0 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp -Version: 3.1.0 +Version: 3.2.0 Build-Depends: cpprestsdk, atlmfc 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. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index f98021ff8..b5a4791c3 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -7,8 +7,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-storage-cpp - REF v3.1.0 - SHA512 ebd6f8aab33046942d641bd42b126dae94c49c08963b96b0141cd6827cb865c95f05f4c7a4df9ce8c62b4ec39092c0538a8c274a0a7219c74656ad111b15bfb8 + REF v3.2.0 + SHA512 841c548986de743b508edd149441727e76f66ba09a99454006d2742547267046833062501e79ff2138d6bcad37740f7009cce4590bbdf40b48b935b989959267 HEAD_REF master ) -- cgit v1.2.3 From e629afa182b146e9d1df79e939759af68a555289 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Thu, 8 Mar 2018 09:38:30 +0800 Subject: Install sodium.h (#2986) --- ports/libsodium/CONTROL | 2 +- ports/libsodium/portfile.cmake | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/libsodium/CONTROL b/ports/libsodium/CONTROL index 7546bdd14..b670f39ff 100644 --- a/ports/libsodium/CONTROL +++ b/ports/libsodium/CONTROL @@ -1,3 +1,3 @@ Source: libsodium -Version: 1.0.16 +Version: 1.0.16-1 Description: A modern and easy-to-use crypto library diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index d6da66ab4..ff473b525 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -34,6 +34,10 @@ ELSE() SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) ENDIF() +file(INSTALL + ${SOURCE_PATH}/src/libsodium/include/sodium.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) file(GLOB LIBSODIUM_HEADERS "${SOURCE_PATH}/src/libsodium/include/sodium/*.h") file(INSTALL -- cgit v1.2.3 From 82ce7b2c2fd53aad8d951e3562f93180842e5e38 Mon Sep 17 00:00:00 2001 From: Yann Lanthony Date: Thu, 8 Mar 2018 02:56:38 +0100 Subject: [geogram] update to 1.6.0 (#2965) * [geogram] update to 1.6.0 + fix corrupted patch * [changelog] Revert change to previous updates --- ports/geogram/CONTROL | 2 +- ports/geogram/fix-cmake-config-and-install.patch | 6 +++--- ports/geogram/portfile.cmake | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ports/geogram/CONTROL b/ports/geogram/CONTROL index f79aa5997..81df11d9c 100644 --- a/ports/geogram/CONTROL +++ b/ports/geogram/CONTROL @@ -1,4 +1,4 @@ Source: geogram -Version: 1.4.9-1 +Version: 1.6.0-1 Description: Geogram is a programming library of geometric algorithms. Build-Depends: glfw3, openblas, clapack diff --git a/ports/geogram/fix-cmake-config-and-install.patch b/ports/geogram/fix-cmake-config-and-install.patch index 77f1ef1c2..d4dce24e1 100644 --- a/ports/geogram/fix-cmake-config-and-install.patch +++ b/ports/geogram/fix-cmake-config-and-install.patch @@ -2,8 +2,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 17dc02e..e489d75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -42,7 +42,7 @@ set(VORPALINE_VERSION_MINOR 4) - set(VORPALINE_VERSION_PATCH 9) +@@ -42,7 +42,7 @@ set(VORPALINE_VERSION_MINOR 6) + set(VORPALINE_VERSION_PATCH 0) set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH}) -set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR}) @@ -130,7 +130,7 @@ diff --git a/src/lib/third_party/numerics/CMakeLists.txt b/src/lib/third_party/n index 5789cd2..e4262e3 100644 --- a/src/lib/third_party/numerics/CMakeLists.txt +++ b/src/lib/third_party/numerics/CMakeLists.txt -@@ -10,16 +10,18 @@ endif() +@@ -10,16 +10,19 @@ endif() include_directories(${GEOGRAM_SOURCE_DIR}/src/lib/third_party/numerics/INCLUDE) diff --git a/ports/geogram/portfile.cmake b/ports/geogram/portfile.cmake index 17c9d2281..17a03e6a5 100644 --- a/ports/geogram/portfile.cmake +++ b/ports/geogram/portfile.cmake @@ -12,11 +12,11 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/geogram_1.4.9) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/geogram_1.6.0) vcpkg_download_distfile(ARCHIVE - URLS "https://gforge.inria.fr/frs/download.php/file/36914/geogram_1.4.9.zip" - FILENAME "geogram-1.4.9.zip" - SHA512 de8a93abca90885c3ce1ad6b828442daa1eeaf016594fe707f25c8d4077c6b6cec0958a0662c0aed4ff015a994a55d7ebc7521cbb39b9adcf4373c44c957715e + URLS "https://gforge.inria.fr/frs/download.php/file/37375/geogram_1.6.0.zip" + FILENAME "geogram-1.6.0.zip" + SHA512 8ae0f976338b4e47e2ef3c8cebc48e3957133131be89318df187295b813d3b45557a7dae848b42366635c3f957a63161da2302bb73e6a2af8dd745cfcc122988 ) vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CURRENT_PORT_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}/cmake) -- cgit v1.2.3 From 32b36ae3fa653a9afc455091f6cc60e937f31e39 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Wed, 7 Mar 2018 22:33:04 -0800 Subject: [alembic] update to 1.7.6 --- ports/alembic/CONTROL | 2 +- ports/alembic/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index e1e3090b9..a1c8f7b4b 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.5 +Version: 1.7.6 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. http://alembic.io/ diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index 9b7eee317..8bc4d98ec 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alembic/alembic - REF 1.7.5 - SHA512 9e8c9a29661d4cec16dbc77014188a07112c78b011c48fb5e9c2107512926e2cdd43f65e732c456574e07947afc4e53e200753ca59430f011e6fc8ea31041fc0 + REF 1.7.6 + SHA512 d77aab41cec66b0565b20ec54604754ed6ef83c97d6d27e161b1cdc28af96d624db438cf70d449166c07b8f9f281f14aeb29f9de91ccc06fb6d2934e4c46ef3a HEAD_REF master ) -- cgit v1.2.3 From 9574b71cabde50bc24acb968f4dc397e8b44145b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Mar 2018 14:09:16 -0800 Subject: [abseil][clara][fdk-aac][jsonnet][ms-gsl][nuklear][re2][rs-core-lib][thrift][tiny-dnn][yaml-cpp] Updates --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/clara/CONTROL | 2 +- ports/clara/portfile.cmake | 4 ++-- ports/fdk-aac/CONTROL | 2 +- ports/fdk-aac/portfile.cmake | 4 ++-- ports/jsonnet/CONTROL | 2 +- ports/jsonnet/portfile.cmake | 4 ++-- ports/ms-gsl/CONTROL | 2 +- ports/ms-gsl/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/re2/CONTROL | 2 +- ports/re2/portfile.cmake | 4 ++-- ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/tiny-dnn/CONTROL | 2 +- ports/tiny-dnn/portfile.cmake | 4 ++-- ports/yaml-cpp/CONTROL | 2 +- ports/yaml-cpp/portfile.cmake | 4 ++-- 22 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index 67a9364bb..cd4a6723f 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-03-02 +Version: 2018-03-07 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 0a224b3fe..598f76c2f 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 5337d2d0e312ce6bce0140b5f1da5548a0b3fed5 - SHA512 14b2680c39260c5dc6a4b06583f7581ebfe11cde5c2e93cbca72385b1ba0c216894a3e88aa47ad84cc45af1c237b58e2b6240c35e1c0a73246a06ad472573558 + REF 94f0f79ecd2d9e5271a21bc4ededea9b58c60674 + SHA512 b1309a371b886e4d5d8e963407ddfcd005c041b35880e0af45f07c778875fb69c76f0a1ef7802af3f1eab3497fb40020d8d503c5eb2788fff50dd74b557bf182 HEAD_REF master ) diff --git a/ports/clara/CONTROL b/ports/clara/CONTROL index 19b8d3821..37c630037 100644 --- a/ports/clara/CONTROL +++ b/ports/clara/CONTROL @@ -1,3 +1,3 @@ Source: clara -Version: 2018-02-25 +Version: 2018-03-07 Description: A simple to use command line parser for C++ \ No newline at end of file diff --git a/ports/clara/portfile.cmake b/ports/clara/portfile.cmake index 7dc0a9234..ed4113f3f 100644 --- a/ports/clara/portfile.cmake +++ b/ports/clara/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO philsquared/Clara - REF a07afba39d1842aa4e43dfae95c59631185163b0 - SHA512 a2334e0f272f897ca16fedf8ffcaabd1bbfdb3f488d161bb9a9aa7b00b0bdbede0144a0a4c3261647d3b73a59db513f92384822a4cbca10501f7d6d6dca6b621 + REF adb5ec3a5c20defc80286fd6e8c14aeef10fdcd7 + SHA512 93977d8e2024220f37645812dfe1f8a6ab79568c3dc09fa63894d00f440094944a96878178e43b5508aefb7214a6921dad86f9e92b2833f7a1f8c6f53c35860c HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/single_include/clara.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/fdk-aac/CONTROL b/ports/fdk-aac/CONTROL index 63456baa4..edef0f16d 100644 --- a/ports/fdk-aac/CONTROL +++ b/ports/fdk-aac/CONTROL @@ -1,3 +1,3 @@ Source: fdk-aac -Version: 2018-02-25 +Version: 2018-03-07 Description: A standalone library of the Fraunhofer FDK AAC code diff --git a/ports/fdk-aac/portfile.cmake b/ports/fdk-aac/portfile.cmake index 4e533603f..134885b25 100644 --- a/ports/fdk-aac/portfile.cmake +++ b/ports/fdk-aac/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mstorsjo/fdk-aac - REF 89aeea5f292306c429550e4c9fe55d865c903600 - SHA512 0c89677b6c4f1cc056e8e0ee19c0ca79c9a35babcc8ad1a9b8d93bdfc97c54a12267a1de6e86ebede6825ea40f25b7be938495180e8bc6d4cbab7ebd2e63fcd4 + REF a30bfced6b6d6d976c728552d247cb30dd86e238 + SHA512 07371b78998b2330022ca5f4b6c605a30d279faef28b3fb53d03bbf7163c87bed9432fcd3efbee70906453e7599bc7191e6aeb0bc88b35dcfb79c2a935eb327d HEAD_REF master ) diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index 288c24fca..5f92d26b6 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-03-02 +Version: 2018-03-07 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index f3ead00cc..5206bae7d 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF 221fb7c810815a12ce022ee14760609b6e48d3ab - SHA512 37d0edc2c447e4ee4b87d9c688f60f767cee990811ac41524fb73cb74270a442ab7a085e2046fea24712106cc22cd9f78ffe3d676abc744e1154ab0788eba9b3 + REF 0759409780eec8cb3a7a8ced52f104c0d895ac38 + SHA512 725ac0f9c28e08ac9c694da305da87910fa672328bf77e799635c154f80031ff86c80901608ca379626f6810c590f5700fc1d6904cf3f3c1fde914c2b221f7f6 HEAD_REF master ) diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL index 337e3ac98..c30927bb4 100644 --- a/ports/ms-gsl/CONTROL +++ b/ports/ms-gsl/CONTROL @@ -1,3 +1,3 @@ Source: ms-gsl -Version: 2018-03-03 +Version: 2018-03-07 Description: Microsoft implementation of the Guidelines Support Library \ No newline at end of file diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index 42bcd57cc..45c41f79c 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/GSL - REF 6a33b97a84f9c0a60ede78b5db98647e9a48d6c9 - SHA512 b6a0d062f29c5108f3ad74cdf3337d061d440d60d5d2fd82dd9b299474f9a06ec2b6276a62995fb4e0df1e420052833aa545eb53009a57f968442d814ae67b6c + REF c9e423d7cf2afb88672e31f55e4b30c53be7aae3 + SHA512 a6ea1897b931068384c0dad768202a0314f130cfc30fc6cc8307df14ac02c1842e196d87e30e85e1e3b48295f4f47780a5b3e7123937cb3c8efa9e3e10a596ed HEAD_REF master ) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index 0bbd39e41..8874d2787 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-03-02 +Version: 2018-03-07 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index 8b7a01fb6..f052ee266 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF d9ccea11fe14905eba3ab4cb44207cf24345011b - SHA512 2e21f308ed4c7888f01321f31d125b26f14e6097166ecad703d92879acc853965256c56765a682cb0be126a923726d31b165d824ea41b837901aab06b2b0e7c0 + REF 905b41f640d5ec901a99d343c95e97104292c2d9 + SHA512 b5d671950f411a99a4f7b0017550cc9448c2ab5743256c949895945664d914b78e35f931c4986d863563391cbee11185b94a03c86737cdbb4b3c4e63e0fdc383 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL index 2b911b19c..4155e0c64 100644 --- a/ports/re2/CONTROL +++ b/ports/re2/CONTROL @@ -1,3 +1,3 @@ Source: re2 -Version: 2018-02-25 +Version: 2018-03-07 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 diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake index 39a3d59a2..5274a4213 100644 --- a/ports/re2/portfile.cmake +++ b/ports/re2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/re2 - REF bb093f12a450e4ce2be6bacadff01495cb17eab4 - SHA512 42912068da6acfec33a417d68ad08d44b73f04f542660c6a44b25c5bc5cbece3c9f14a02271072ee47a695d4a5d813acda460c40899f37cf0ecaa220295d5bf3 + REF c1ed8543f1b703ce200212bb5629ba69a2f9b63a + SHA512 399a7545d3ac678b068118271aaa710cfae2c9c38e27b07d880f04714bbb13a19c69b94d4acbdb459f199920fee4d3d1a7e23e22a364c89b3c8b7100ce9b208e HEAD_REF master ) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index a63e460f3..3e276f649 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-03-02 +Version: 2018-03-07 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index 698f14769..e5a2f8c8c 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF 5c53913b93ac4109795d5098dabcd241162cd401 - SHA512 ee9ca3071c2bc4c5a5fa44fbdbc1ecca36de96a1bde30ea272772434387bd96e72206a8b91ef2938cab4b1b00363d2838a1715bd524ec6ba7d4a36d328b4ad44 + REF 3127d573eb15007f878a3cbab7faa8be3255df44 + SHA512 96b08485567547296dbe1d70bedc4d1e59d432b03c468eab83b0b436d2f92b6e51aa5571c039db65abe6797a88c9cf26048539f773bce58c38789384f1a495c3 HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 2a92a1744..d63ec0011 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-03-02 +Version: 2018-03-07 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index a5991c228..b5274c6a4 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 6aa4c0f448d8f2573d2abcc8c3724bd18b3f8d1d - SHA512 77ebe8b247f1c0c169121a494482ba4d1c98cbbd0ba2edad1fdeaedc0dcb04905194d4455c4124c66424f5640a59c20de86c8cef67a5c621174ef46430e33539 + REF b4f22ff30119ea5cadf9b16e97afdcabefe06696 + SHA512 3b63ed69a69b015ef7a2eaa94854b4ab2801c9c7af749b97d7999f4861f4df5a623da4e5b054dadaf4aa48a04c8e010b820d4382de9ef82b191a0d64ddf3181d HEAD_REF master ) diff --git a/ports/tiny-dnn/CONTROL b/ports/tiny-dnn/CONTROL index 550eb4d98..2a53311cb 100644 --- a/ports/tiny-dnn/CONTROL +++ b/ports/tiny-dnn/CONTROL @@ -1,3 +1,3 @@ Source: tiny-dnn -Version: 2018-02-25-1 +Version: 2018-03-07 Description: A C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource. diff --git a/ports/tiny-dnn/portfile.cmake b/ports/tiny-dnn/portfile.cmake index 686c5e161..bb4fc9fcf 100644 --- a/ports/tiny-dnn/portfile.cmake +++ b/ports/tiny-dnn/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tiny-dnn/tiny-dnn - REF 17cb7ae1d130feda9a1612608ac0677cc3254bf8 - SHA512 fbd3cf94b393a4f2aacb0770b5611681b6445f0e16905435c2ec597cfc1c37e3ba7af8bb3b43146e0b2b6cd0fe4df17040f4d72dfb1d4aa50d6310350f655a46 + REF 4a59e4cc8799b3a768618cb157a2edc9d0f05b91 + SHA512 408cfec895140d10c9a498ce78da3ad1e11c245a05c05c5cd82ccedd100fbadad7fb02a4e4c2cb924f8d2c35eca31176dd8270927b5d8376946a237066b10795 HEAD_REF master ) diff --git a/ports/yaml-cpp/CONTROL b/ports/yaml-cpp/CONTROL index 57673babc..1e2d0e5c9 100644 --- a/ports/yaml-cpp/CONTROL +++ b/ports/yaml-cpp/CONTROL @@ -1,3 +1,3 @@ Source: yaml-cpp -Version: 0.6.1 +Version: 0.6.2 Description: yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec. diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake index 574f309d9..0fc4f05b6 100644 --- a/ports/yaml-cpp/portfile.cmake +++ b/ports/yaml-cpp/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jbeder/yaml-cpp - REF yaml-cpp-0.6.1 - SHA512 606482d1d38c6747e22604a24c119adb4b70287da7deadb94cc20d70df47122f1714ec9bfc8f566ecf075b94d48771df17430c50039cb984bdf1980f3b445791 + REF yaml-cpp-0.6.2 + SHA512 fea8ce0a20a00cbc75023d1db442edfcd32d0ac57a3c41b32ec8d56f87cc1d85d7dd7a923ce662f5d3a315f91a736d6be0d649997acd190915c1d68cc93795e4 HEAD_REF master ) -- cgit v1.2.3 From f9ee8fd6b5764ed4d2f5a6c71a092d70398f4ead Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 8 Mar 2018 11:12:22 -0800 Subject: [soundtouch][winpcap] Clear sources between builds to improve reliability --- ports/soundtouch/portfile.cmake | 3 +++ ports/winpcap/portfile.cmake | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/ports/soundtouch/portfile.cmake b/ports/soundtouch/portfile.cmake index 42c055312..cadf5e705 100644 --- a/ports/soundtouch/portfile.cmake +++ b/ports/soundtouch/portfile.cmake @@ -19,6 +19,9 @@ vcpkg_download_distfile(ARCHIVE SHA512 50ef36b6cd21c16e235b908c5518e29b159b11f658a014c47fe767d3d8acebaefefec0ce253b4ed322cbd26387c69c0ed464ddace0c098e61d56d55c198117a5 ) +# MSBuild performs in-source builds, so to ensure reliability we must clear them each time +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) + vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_execute_required_process( diff --git a/ports/winpcap/portfile.cmake b/ports/winpcap/portfile.cmake index 05b0a2c83..701c9892e 100644 --- a/ports/winpcap/portfile.cmake +++ b/ports/winpcap/portfile.cmake @@ -17,6 +17,10 @@ vcpkg_download_distfile(ARCHIVE FILENAME "WpcapSrc_4_1_3.zip" SHA512 89a5109ed17f8069f7a43497f6fec817c58620dbc5fa506e52069b9113c5bc13f69c307affe611281cb727cfa0f8529d07044d41427e350b24468ccc89a87f33 ) + +# MSBuild performs in-source builds, so to ensure reliability we must clear them each time +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) + vcpkg_extract_source_archive(${ARCHIVE}) if(VCPKG_CRT_LINKAGE STREQUAL "static") -- cgit v1.2.3 From 7955320bf358b27d1fa30cc650a254bfb48825a3 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 8 Mar 2018 15:33:11 -0800 Subject: [msix] Initial commit of 1.0 --- ports/msix/CMakeLists.txt | 1 + ports/msix/CONTROL | 5 +++++ ports/msix/install-cmake.patch | 35 ++++++++++++++++++++++++++++++++ ports/msix/portfile.cmake | 46 ++++++++++++++++++++++++++++++++++++++++++ ports/xerces-c/portfile.cmake | 2 +- ports/xerces-c/usage | 4 ++++ 6 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 ports/msix/CMakeLists.txt create mode 100644 ports/msix/CONTROL create mode 100644 ports/msix/install-cmake.patch create mode 100644 ports/msix/portfile.cmake create mode 100644 ports/xerces-c/usage diff --git a/ports/msix/CMakeLists.txt b/ports/msix/CMakeLists.txt new file mode 100644 index 000000000..4c193bbb3 --- /dev/null +++ b/ports/msix/CMakeLists.txt @@ -0,0 +1 @@ +add_custom_target(LIBS) \ No newline at end of file diff --git a/ports/msix/CONTROL b/ports/msix/CONTROL new file mode 100644 index 000000000..52ec64556 --- /dev/null +++ b/ports/msix/CONTROL @@ -0,0 +1,5 @@ +Source: msix +Version: 1.0 +Build-Depends: xerces-c, zlib +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/install-cmake.patch b/ports/msix/install-cmake.patch new file mode 100644 index 000000000..e44cc9b3c --- /dev/null +++ b/ports/msix/install-cmake.patch @@ -0,0 +1,35 @@ +diff --git a/src/msix/CMakeLists.txt b/src/msix/CMakeLists.txt +index 586c140..41a24ae 100644 +--- a/src/msix/CMakeLists.txt ++++ b/src/msix/CMakeLists.txt +@@ -129,6 +129,17 @@ set(LIB_SOURCES + # Define the library + add_library(${LIBRARY_NAME} SHARED ${LIB_SOURCES} ${LIB_PUBLIC_HEADERS} ${LIB_PRIVATE_HEADERS}) + ++if(INSTALL_LIBMSIX) ++ install(TARGETS ${LIBRARY_NAME} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) ++ if(INSTALL_HEADERS) ++ install(FILES ${LIB_PUBLIC_HEADERS} DESTINATION include) ++ endif() ++endif() ++ + # specify that this library is to be built with C++14 + set_property(TARGET ${LIBRARY_NAME} PROPERTY CXX_STANDARD 14) + +@@ -149,8 +160,10 @@ include_directories( + ${CMAKE_PROJECT_ROOT}/lib/xerces/src + ) + +-target_link_libraries(${PROJECT_NAME} PRIVATE zlibstatic) +-target_link_libraries(${PROJECT_NAME} PRIVATE xerces-c) ++find_package(ZLIB REQUIRED) ++find_package(XercesC REQUIRED) ++target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB) ++target_link_libraries(${PROJECT_NAME} PRIVATE XercesC::XercesC) + + IF(AOSP) + target_link_libraries(${PROJECT_NAME} PRIVATE -latomic) diff --git a/ports/msix/portfile.cmake b/ports/msix/portfile.cmake new file mode 100644 index 000000000..552d57699 --- /dev/null +++ b/ports/msix/portfile.cmake @@ -0,0 +1,46 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message("msix only supports dynamic library linkage") + set(VCPKG_LIBRARY_LINKAGE "dynamic") +endif() +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "msix only supports dynamic crt linkage") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/msix-packaging + REF v1.0 + SHA512 11abf60da3414ce59f4347df8b2872ad6aa8a3c1e077f6e0be5c66ce90f14340cec5e58c30fb42ed17a10d5296dc0718bb8cddd665bdc20359bf7f0be4b0b4dc + HEAD_REF master +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/lib) +file(MAKE_DIRECTORY ${SOURCE_PATH}/lib) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/lib) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + -DWIN32=ON + -DINSTALL_LIBMSIX=ON + OPTIONS_RELEASE + -DINSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/msix RENAME copyright) + +vcpkg_copy_pdbs() + diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake index 5623e9518..c0a4166fb 100644 --- a/ports/xerces-c/portfile.cmake +++ b/ports/xerces-c/portfile.cmake @@ -52,7 +52,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xercesc/NLS) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xercesc/util/MsgLoaders/ICU/resources) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/xerces-c) +file(COPY ${SOURCE_PATH}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/xerces-c) file(RENAME ${CURRENT_PACKAGES_DIR}/share/xerces-c/LICENSE ${CURRENT_PACKAGES_DIR}/share/xerces-c/copyright) vcpkg_copy_pdbs() \ No newline at end of file diff --git a/ports/xerces-c/usage b/ports/xerces-c/usage new file mode 100644 index 000000000..70333bf7c --- /dev/null +++ b/ports/xerces-c/usage @@ -0,0 +1,4 @@ +The package xerces-c is compatible with built-in CMake targets: + + find_package(XercesC REQUIRED) + target_link_libraries(main PRIVATE XercesC::XercesC) -- cgit v1.2.3 From a506559ba9ff9aab7a6176b43313a8ce26891269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nagy-Egri=20M=C3=A1t=C3=A9=20Ferenc?= Date: Fri, 9 Mar 2018 06:28:00 +0100 Subject: Add package clBLAS (#2944) * v2.12.2 ships outdated FindOpenCL.cmake * clBLAS installs, passes checks, usable by 3rd party * Added usage file * [clblas] Convert to using a patch file * [clfft] Revert removal of FindOpenCL -- this can be done, but it will require additional source patching --- ports/clblas/CONTROL | 4 ++++ ports/clblas/cmake.patch | 36 +++++++++++++++++++++++++++++ ports/clblas/portfile.cmake | 55 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 ports/clblas/CONTROL create mode 100644 ports/clblas/cmake.patch create mode 100644 ports/clblas/portfile.cmake diff --git a/ports/clblas/CONTROL b/ports/clblas/CONTROL new file mode 100644 index 000000000..416376579 --- /dev/null +++ b/ports/clblas/CONTROL @@ -0,0 +1,4 @@ +Source: clblas +Version: 2.12-1 +Build-Depends: opencl +Description: clBLAS is an OpenCL 1.2 accelerated BLAS (Basic Linear Algebra Subsystem) library. diff --git a/ports/clblas/cmake.patch b/ports/clblas/cmake.patch new file mode 100644 index 000000000..ebe2c0e85 --- /dev/null +++ b/ports/clblas/cmake.patch @@ -0,0 +1,36 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 6a88c41..05b8029 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -276,6 +276,9 @@ endif() + + # This will define OPENCL_FOUND + find_package( OpenCL ${OPENCL_VERSION} ) ++set( OPENCL_FOUND ${OpenCL_FOUND}) ++set( OPENCL_LIBRARIES ${OpenCL_LIBRARIES} ) ++set( OPENCL_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS} ) + + # Find Boost on the system, and configure the type of boost build we want + set( Boost_USE_MULTITHREADED ON ) +diff --git a/src/clBLASConfig.cmake.in b/src/clBLASConfig.cmake.in +index f52d1d6..464feca 100644 +--- a/src/clBLASConfig.cmake.in ++++ b/src/clBLASConfig.cmake.in +@@ -1,3 +1,3 @@ + include(${CMAKE_CURRENT_LIST_DIR}/clBLASTargets.cmake) +-get_filename_component(CLBLAS_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/@reldir@/include ABSOLUTE) ++get_filename_component(CLBLAS_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/@reldir@/../include ABSOLUTE) + set(CLBLAS_LIBRARIES clBLAS) +diff --git a/src/library/CMakeLists.txt b/src/library/CMakeLists.txt +index 5164898..f2d5a88 100644 +--- a/src/library/CMakeLists.txt ++++ b/src/library/CMakeLists.txt +@@ -894,7 +894,7 @@ install( TARGETS clBLAS + EXPORT Library + RUNTIME DESTINATION bin${SUFFIX_BIN} + LIBRARY DESTINATION lib${SUFFIX_LIB} +- ARCHIVE DESTINATION lib${SUFFIX_LIB}/import ++ ARCHIVE DESTINATION lib${SUFFIX_LIB} + ) + + # For debug builds, include the debug runtimes into the package for testing on non-developer machines diff --git a/ports/clblas/portfile.cmake b/ports/clblas/portfile.cmake new file mode 100644 index 000000000..b18377cdf --- /dev/null +++ b/ports/clblas/portfile.cmake @@ -0,0 +1,55 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO clMathLibraries/clBLAS + REF v2.12 + SHA512 5d9b0c58adde69e83d95e9c713e0cdc5f64785fe7e05553a14c57fa483c4ef39e9dc780c26880a7f15924967d5ce4ea29035c29d63eac7ee5a2ae5ddacac2b72 + HEAD_REF master +) + +# v2.12 has a very old FindOpenCL.cmake using OPENCL_ vs. OpenCL_ var names +# conflicting with the built-in, more modern FindOpenCL.cmake +file( + REMOVE ${SOURCE_PATH}/src/FindOpenCL.cmake +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch +) + +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA + OPTIONS + -DBUILD_TEST=OFF + -DBUILD_KTEST=OFF + -DSUFFIX_LIB= + -DPYTHON_EXECUTABLE=${PYTHON3} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL + "${SOURCE_PATH}/LICENSE" + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/clblas + RENAME copyright +) + +file(REMOVE + ${CURRENT_PACKAGES_DIR}/debug/bin/clBLAS-tune.exe + ${CURRENT_PACKAGES_DIR}/bin/clBLAS-tune.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/concrt140d.dll + ${CURRENT_PACKAGES_DIR}/debug/bin/msvcp140d.dll + ${CURRENT_PACKAGES_DIR}/debug/bin/vcruntime140d.dll +) + +vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 965e99cf268b32cc32e0599d99e6c9a1991e95f4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 8 Mar 2018 23:51:55 -0800 Subject: [rttr] Fix executables. Fix read-only permissions. --- ports/rttr/CONTROL | 2 +- ports/rttr/portfile.cmake | 9 +++++++ ports/rttr/remove-owner-read-perms.patch | 41 ++++++++++++++++++++++++++++++++ toolsrc/src/vcpkg/remove.cpp | 19 +++++++++++---- 4 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 ports/rttr/remove-owner-read-perms.patch diff --git a/ports/rttr/CONTROL b/ports/rttr/CONTROL index e7ed99b8c..80cff00bd 100644 --- a/ports/rttr/CONTROL +++ b/ports/rttr/CONTROL @@ -1,3 +1,3 @@ Source: rttr -Version: 0.9.5-1 +Version: 0.9.5-2 Description: an easy and intuitive way to use reflection in C++ diff --git a/ports/rttr/portfile.cmake b/ports/rttr/portfile.cmake index da66d3134..bfb1d23ad 100644 --- a/ports/rttr/portfile.cmake +++ b/ports/rttr/portfile.cmake @@ -20,6 +20,7 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch" "${CMAKE_CURRENT_LIST_DIR}/disable-unit-tests.patch" + "${CMAKE_CURRENT_LIST_DIR}/remove-owner-read-perms.patch" ) vcpkg_configure_cmake( @@ -31,6 +32,14 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +file(GLOB REL_EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB DBG_EXES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(REL_EXES) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/rttr) + file(COPY ${REL_EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/rttr) +endif() +file(REMOVE ${REL_EXES} ${DBG_EXES}) + #Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rttr) file(RENAME ${CURRENT_PACKAGES_DIR}/share/rttr/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/rttr/copyright) diff --git a/ports/rttr/remove-owner-read-perms.patch b/ports/rttr/remove-owner-read-perms.patch new file mode 100644 index 000000000..918de14cc --- /dev/null +++ b/ports/rttr/remove-owner-read-perms.patch @@ -0,0 +1,41 @@ +diff --git a/CMake/config.cmake b/CMake/config.cmake +index 1d753b3..393e3d0 100644 +--- a/CMake/config.cmake ++++ b/CMake/config.cmake +@@ -131,4 +131,4 @@ install( + + install(FILES "${LICENSE_FILE}" "${README_FILE}" + DESTINATION "." +- PERMISSIONS OWNER_READ) ++ ) +diff --git a/CMake/utility.cmake b/CMake/utility.cmake +index 9dbc172..c37671e 100644 +--- a/CMake/utility.cmake ++++ b/CMake/utility.cmake +@@ -165,7 +165,7 @@ function(loadFolder FOLDER _HEADER_FILES _SOURCE_FILES) + # we don't want to install header files which are marked as private + if (${shouldInstall}) + if (NOT ${FULL_HEADER_PATH} MATCHES ".*_p.h$") +- install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}" PERMISSIONS OWNER_READ) ++ install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}") + endif() + endif() + endforeach() +diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt +index ec10eaf..454c41e 100644 +--- a/doc/CMakeLists.txt ++++ b/doc/CMakeLists.txt +@@ -127,11 +127,11 @@ add_custom_target(doc ALL + install(DIRECTORY "${DOXYGEN_OUTPUT_DIRECTORY}/${DOXYGEN_CUSTOM_HTML_DIR}" + DESTINATION "${DOXYGEN_DOC_INSTALL_DIR}" + PATTERN "*.*" +- PERMISSIONS OWNER_READ) ++ ) + + install(FILES "${DOXYGEN_OUTPUT_DIRECTORY}/${DOXYGEN_INDEX_FILE}" + DESTINATION "${DOXYGEN_DOC_INSTALL_DIR}" +- PERMISSIONS OWNER_READ) ++ ) + + ######################################################################################### + diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 3eaf991ce..32433b234 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -58,7 +58,7 @@ namespace vcpkg::Remove const auto status = fs.status(target, ec); if (ec) { - System::println(System::Color::error, "failed: %s", ec.message()); + System::println(System::Color::error, "failed: status(%s): %s", target.u8string(), ec.message()); continue; } @@ -71,12 +71,23 @@ namespace vcpkg::Remove fs.remove(target, ec); if (ec) { - System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message()); +#if defined(_WIN32) + fs::stdfs::permissions(target, fs::stdfs::perms::owner_all | fs::stdfs::perms::group_all, ec); + fs.remove(target, ec); + if (ec) + { + System::println( + System::Color::error, "failed: remove(%s): %s", target.u8string(), ec.message()); + } +#else + System::println( + System::Color::error, "failed: remove(%s): %s", target.u8string(), ec.message()); +#endif } } - else if (!fs::status_known(status)) + else if (!fs::stdfs::exists(status)) { - System::println(System::Color::warning, "Warning: unknown status: %s", target.u8string()); + System::println(System::Color::warning, "Warning: %s: file not found", target.u8string()); } else { -- cgit v1.2.3 From d5ca6630393cd6fa2bd929672b1afd3a9bdd2728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 9 Mar 2018 10:41:40 +0100 Subject: [libzip] Update with latest patches (#2990) --- ports/libzip/CONTROL | 2 +- ports/libzip/fix-attribute.patch | 12 ------------ ports/libzip/portfile.cmake | 5 ++--- 3 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 ports/libzip/fix-attribute.patch diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL index 763275196..f827f4d71 100644 --- a/ports/libzip/CONTROL +++ b/ports/libzip/CONTROL @@ -1,4 +1,4 @@ Source: libzip -Version: 1.4.0 +Version: 1.4.0-1 Build-Depends: zlib Description: A library for reading, creating, and modifying zip archives. diff --git a/ports/libzip/fix-attribute.patch b/ports/libzip/fix-attribute.patch deleted file mode 100644 index 0669d75d6..000000000 --- a/ports/libzip/fix-attribute.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/lib/zip_algorithm_bzip2.c b/lib/zip_algorithm_bzip2.c -index 1748fd4..fd74503 100644 ---- a/lib/zip_algorithm_bzip2.c -+++ b/lib/zip_algorithm_bzip2.c -@@ -270,6 +270,6 @@ zip_compression_algorithm_t zip_algorithm_bzip2_decompress = { - - #else - --static int dummy __attribute__((used)); -+static int dummy; - - #endif /* HAVE_LIBBZ2 */ diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake index ae95a3ae4..5c1f02704 100644 --- a/ports/libzip/portfile.cmake +++ b/ports/libzip/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nih-at/libzip - REF rel-1-4-0 - SHA512 3d8c5e64c567d2b91670ea041228d74cc8415116dfeb5c9bcf587ab817618eace668c5171122eeccf2a5f25242c2439c5f60b361f99a06274ab58aea720fe0bb + REF ad1f02d3b2aac532a89cbf8fd21f55677789b82d + SHA512 b1ed427916ec555ead454d39a244502f64bbc8799c20394944797b878196f1b9a9dda64be218fe89bb1747c841d7b36e8e7fb7b0be1fbdf777f049cd823635d6 ) # Patch cmake and configuration to allow static builds @@ -11,7 +11,6 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/cmake_dont_build_more_than_needed.patch" - "${CMAKE_CURRENT_LIST_DIR}/fix-attribute.patch" ) vcpkg_configure_cmake( -- cgit v1.2.3 From 4bf7b425718cf922c1d62b13cc33450afcf75081 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Mar 2018 00:54:42 -0800 Subject: [rocksdb] Disable optional dependencies to improve reliability. --- ports/rocksdb/CONTROL | 4 ++-- ports/rocksdb/portfile.cmake | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index f16c32192..19383f54a 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,4 @@ Source: rocksdb -Version: 5.10.4 +Version: 5.10.4-1 Description: A library that provides an embeddable, persistent key-value store for fast storage -Build-Depends: snappy, lz4, gflags, zlib, gtest +Build-Depends: snappy, lz4, zlib, gtest diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 6256a3b53..740c40114 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -1,7 +1,5 @@ include(vcpkg_common_functions) -find_program(GIT git) - if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") message(FATAL_ERROR "Rocksdb only supports x64") endif() @@ -35,7 +33,6 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DGIT_EXECUTABLE=${GIT} -DGFLAGS=1 -DSNAPPY=1 -DLZ4=1 @@ -48,6 +45,10 @@ vcpkg_configure_cmake( -DROCKSDB_DISABLE_INSTALL_STATIC_LIB=${ROCKSDB_DISABLE_INSTALL_STATIC_LIB} -DROCKSDB_VERSION=5.10.3 -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} + -DCMAKE_DISABLE_FIND_PACKAGE_TBB=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_NUMA=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_gtest=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE ) vcpkg_install_cmake() -- cgit v1.2.3 From 8d70abd134aaa81a84169ec0b352d1aef0f78446 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Mar 2018 01:43:13 -0800 Subject: [libxml2] Fix vcpkg toolchain helper --- scripts/buildsystems/vcpkg.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index a1989b23a..ce5efc1de 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -275,7 +275,12 @@ macro(find_package name) elseif("${name}" STREQUAL "LibXml2") _find_package(${ARGV}) if(LibXml2_FOUND AND (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) - list(APPEND LIBXML2_LIBRARIES libiconv libcharset ws2_32) + list(APPEND LIBXML2_LIBRARIES + debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libiconv.lib + optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libiconv.lib + debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib + optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib + ws2_32) endif() else() _find_package(${ARGV}) -- cgit v1.2.3 From e4372468a04c886ff3e69b8946bc57d6e7dcfd40 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Mar 2018 17:55:29 -0800 Subject: [cgal] Use commit SHA to ensure a stable reference --- ports/cgal/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake index 7e5ad7adc..4dbe9fd53 100644 --- a/ports/cgal/portfile.cmake +++ b/ports/cgal/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CGAL/cgal - REF releases/CGAL-4.11.1 - SHA512 51e5d239a0ee62ec6508aea5c696ba74278992343f196e40fe2159ad309ed907443ec0bd2ff96f51d9e34d2b89f164873e7bcb204cdd2c9f4800cea72a5b0094 + REF 27859944b4d96797030fc018892d5123b7cba0b2 + SHA512 020d4398fcae0607cd3fe1bd22a190fbe1d45cba0c7e3c95d6d3dfb6d23c43949a1608069972e511f5d47fc787c350c0a0a0085faa2f4b9fd26ce101376752c6 HEAD_REF master ) -- cgit v1.2.3 From ac8b9a13e40082d24afa1fc06757d25136a35b20 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Mar 2018 09:55:22 -0800 Subject: [vcpkg] Enable qualifiers to use ! for inversion --- toolsrc/src/vcpkg/sourceparagraph.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index 2a9480538..0b4baf189 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -202,7 +202,15 @@ namespace vcpkg std::vector ret; for (auto&& dep : deps) { - if (dep.qualifier.empty() || t.canonical_name().find(dep.qualifier) != std::string::npos) + 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.name()); } -- cgit v1.2.3 From 1e380dde21317e73d1859dad1c64c06eb88cc502 Mon Sep 17 00:00:00 2001 From: Wimok Nupphiboon Date: Sat, 10 Mar 2018 11:00:09 +0700 Subject: [uwebsockets] Update to 0.14.6 --- ports/uwebsockets/CONTROL | 2 +- ports/uwebsockets/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index a5ea7d287..1757aae53 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets -Version: 0.14.5-1 +Version: 0.14.6-1 Build-Depends: libuv, openssl, zlib Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js diff --git a/ports/uwebsockets/portfile.cmake b/ports/uwebsockets/portfile.cmake index 6c660e948..f7cbb6843 100644 --- a/ports/uwebsockets/portfile.cmake +++ b/ports/uwebsockets/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO uWebSockets/uWebSockets - REF v0.14.5 - SHA512 93fa26446962be34f721db609f4cdf5f2d84771a3101f37daab75c1e46aa1a1402ec0d4c6b000b4eeeafa1a391f25c186bfeda1b3dc395da4e48bdb9a498fd22 + REF v0.14.6 + SHA512 cac3be6fcd49796590f19bde89e4195cecf9097248f7550ef6942573b59cd132f136ec026203e8524270440a7ae18c49472eb2166028b5c68d4a4cc457af4748 HEAD_REF master ) -- cgit v1.2.3 From 63e1e1f7117df20c9fe445ed9db8a808fc611ea4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Mar 2018 21:53:29 -0800 Subject: [vcpkg] Fix issue in upgrade dependency resolution where self-referencing features cause cycles --- toolsrc/src/tests.plan.cpp | 30 +++++++++++++++++++++++++++++- toolsrc/src/vcpkg/dependencies.cpp | 2 +- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 08d3c1dab..95056810c 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -996,6 +996,34 @@ namespace UnitTest1 features_check(&plan[1], "a", {"core", "a1"}); } + + TEST_METHOD(basic_upgrade_scheme_with_self_features) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a")); + pghs.push_back(make_status_feature_pgh("a", "a1", "")); + pghs.push_back(make_status_feature_pgh("a", "a2", "a[a1]")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a", "", {{"a1", ""}, {"a2", "a[a1]"}}); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + + auto plan = graph.serialize(); + + Assert::AreEqual(size_t(2), plan.size()); + + Assert::AreEqual("a", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + + Assert::AreEqual("a", plan[1].spec().name().c_str()); + Assert::IsTrue(plan[1].install_action.has_value()); + Assert::IsTrue(plan[1].install_action.get()->feature_list == std::set{"core", "a1", "a2"}); + } }; class ExportPlanTests : public TestClass @@ -1069,7 +1097,7 @@ namespace UnitTest1 Assert::IsTrue(plan[0].plan_type == Dependencies::ExportPlanType::NOT_BUILT); } - TEST_METHOD(basic_upgrade_scheme_with_features) + TEST_METHOD(basic_export_scheme_with_features) { std::vector> pghs; pghs.push_back(make_status_pgh("b")); diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 1f853014b..1d017a8d3 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -530,7 +530,7 @@ namespace vcpkg::Dependencies for (auto&& depend : remove_edges_edges) { auto& depend_cluster = graph.get(depend.spec()); - graph_plan.remove_graph.add_edge({&cluster}, {&depend_cluster}); + if (&depend_cluster != &cluster) graph_plan.remove_graph.add_edge({&cluster}, {&depend_cluster}); mark_minus(depend_cluster, graph, graph_plan); } } -- cgit v1.2.3 From a870f5dce852445698ee17dea4e9bd18c51a4e8b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 10 Mar 2018 02:33:56 -0800 Subject: [ogre] Bump control version --- ports/ogre/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL index 1533b8e8d..f7d93e7b2 100644 --- a/ports/ogre/CONTROL +++ b/ports/ogre/CONTROL @@ -1,5 +1,5 @@ Source: ogre -Version: 1.10.9-2 +Version: 1.10.11 Build-Depends: freeimage, freetype, zlib, zziplib Description: 3D Object-Oriented Graphics Rendering Engine -- cgit v1.2.3 From 667f34314f8a6edcb01c1bba72a9dc07ccd6a21c Mon Sep 17 00:00:00 2001 From: Reyzal Date: Sat, 10 Mar 2018 18:59:43 +0800 Subject: Add port quirc (#2949) * fixed SHA512 sum of the package realsense2 * Add port quirc for #2899 * Add port FastCDR for #2953 --- ports/fastcdr/CONTROL | 3 +++ ports/fastcdr/install-cmake.patch | 26 ++++++++++++++++++++++ ports/fastcdr/portfile.cmake | 45 +++++++++++++++++++++++++++++++++++++++ ports/quirc/CMakeLists.txt | 19 +++++++++++++++++ ports/quirc/CONTROL | 3 +++ ports/quirc/patch-for-msvc.patch | 36 +++++++++++++++++++++++++++++++ ports/quirc/portfile.cmake | 31 +++++++++++++++++++++++++++ 7 files changed, 163 insertions(+) create mode 100644 ports/fastcdr/CONTROL create mode 100644 ports/fastcdr/install-cmake.patch create mode 100644 ports/fastcdr/portfile.cmake create mode 100644 ports/quirc/CMakeLists.txt create mode 100644 ports/quirc/CONTROL create mode 100644 ports/quirc/patch-for-msvc.patch create mode 100644 ports/quirc/portfile.cmake diff --git a/ports/fastcdr/CONTROL b/ports/fastcdr/CONTROL new file mode 100644 index 000000000..dfd04bf06 --- /dev/null +++ b/ports/fastcdr/CONTROL @@ -0,0 +1,3 @@ +Source: fastcdr +Version: 1.0.6-1 +Description: eProsima FastCDR is a C++ library that provides two serialization mechanisms. One is the standard CDR serialization mechanism, while the other is a faster implementation that modifies the standard. diff --git a/ports/fastcdr/install-cmake.patch b/ports/fastcdr/install-cmake.patch new file mode 100644 index 000000000..0eff05063 --- /dev/null +++ b/ports/fastcdr/install-cmake.patch @@ -0,0 +1,26 @@ +diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt +index 46d6f20..5d73ec5 100644 +--- a/src/cpp/CMakeLists.txt ++++ b/src/cpp/CMakeLists.txt +@@ -139,7 +139,12 @@ if(MSVC OR MSVC_IDE) + set(DIR_EXTENSION "/${MSVC_ARCH}") + endif() + +- install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_static ++ if(BUILD_SHARED_LIBS) ++ set(PROJECT_TARGETS ${PROJECT_NAME}) ++ else() ++ set(PROJECT_TARGETS ${PROJECT_NAME}_static) ++ endif() ++ install(TARGETS ${PROJECT_TARGETS} + EXPORT ${PROJECT_NAME}Targets + RUNTIME DESTINATION ${BIN_INSTALL_DIR}${DIR_EXTENSION} + LIBRARY DESTINATION ${LIB_INSTALL_DIR}${DIR_EXTENSION} +@@ -147,7 +152,6 @@ if(MSVC OR MSVC_IDE) + COMPONENT libraries_${MSVC_ARCH} + ) + +- export(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_static FILE ${PROJECT_BINARY_DIR}/cmake/config/${PROJECT_NAME}Targets.cmake) + install(EXPORT ${PROJECT_NAME}Targets + DESTINATION ${LIB_INSTALL_DIR}${DIR_EXTENSION}/${PROJECT_NAME}/cmake + COMPONENT cmake diff --git a/ports/fastcdr/portfile.cmake b/ports/fastcdr/portfile.cmake new file mode 100644 index 000000000..91362f3b2 --- /dev/null +++ b/ports/fastcdr/portfile.cmake @@ -0,0 +1,45 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eProsima/Fast-CDR + REF v1.0.6 + SHA512 80861ff6a0283e1398306e081fe70d7d185f980e5714ae51864cae012b8f79719efa24e7f41025b2bfb2052cb2a3098436c75a38407f8f5a331593cb91868fb2 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLICENSE_INSTALL_DIR=share/fastcdr + -DCMAKE_DISABLE_FIND_PACKAGE_GTest=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/fastcdr/cmake) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/lib/fastcdr ${CURRENT_PACKAGES_DIR}/debug/lib/fastcdr) + +# always build static and share library default +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(READ ${CURRENT_PACKAGES_DIR}/include/fastcdr/eProsima_auto_link.h EPROSIMA_AUTO_LINK_H) + string(REPLACE "#define EPROSIMA_LIB_PREFIX \"lib\"" "#define EPROSIMA_LIB_PREFIX" EPROSIMA_AUTO_LINK_H "${EPROSIMA_AUTO_LINK_H}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/fastcdr/eProsima_auto_link.h "${EPROSIMA_AUTO_LINK_H}") +else() + file(READ ${CURRENT_PACKAGES_DIR}/include/fastcdr/config.h FASTCDR_H) + string(REPLACE "#define _FASTCDR_CONFIG_H_" "#define _FASTCDR_CONFIG_H_\r\n#define FASTCDR_DYN_LINK" FASTCDR_H "${FASTCDR_H}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/fastcdr/config.h "${FASTCDR_H}") +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/fastcdr) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/fastcdr/license ${CURRENT_PACKAGES_DIR}/share/fastcdr/copyright) diff --git a/ports/quirc/CMakeLists.txt b/ports/quirc/CMakeLists.txt new file mode 100644 index 000000000..8af398bb8 --- /dev/null +++ b/ports/quirc/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 2.8) + +project(quirc C) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + +add_library(quirc + lib/decode.c + lib/identify.c + lib/quirc.c + lib/version_db.c +) + +install(TARGETS quirc + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +install(FILES ${PROJECT_SOURCE_DIR}/lib/quirc.h DESTINATION include) diff --git a/ports/quirc/CONTROL b/ports/quirc/CONTROL new file mode 100644 index 000000000..1ba02d889 --- /dev/null +++ b/ports/quirc/CONTROL @@ -0,0 +1,3 @@ +Source: quirc +Version: 1.0-1 +Description: quirc is one of the C library available for scanning QR Codes diff --git a/ports/quirc/patch-for-msvc.patch b/ports/quirc/patch-for-msvc.patch new file mode 100644 index 000000000..c755d04a7 --- /dev/null +++ b/ports/quirc/patch-for-msvc.patch @@ -0,0 +1,36 @@ +From 1c1ceecb70ad76751f0b573937380525d7643a87 Mon Sep 17 00:00:00 2001 +From: reyzal +Date: Sun, 4 Mar 2018 12:09:34 +0800 +Subject: [PATCH] for msvc + +--- + lib/identify.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/lib/identify.c b/lib/identify.c +index bf7bd94..cd16b0a 100644 +--- a/lib/identify.c ++++ b/lib/identify.c +@@ -196,9 +196,9 @@ static void threshold(struct quirc *q) + threshold_s = THRESHOLD_S_MIN; + + for (y = 0; y < q->h; y++) { +- int row_average[q->w]; ++ int *row_average = malloc(q->w * sizeof(int)); + +- memset(row_average, 0, sizeof(row_average)); ++ memset(row_average, 0, q->w * sizeof(int)); + + for (x = 0; x < q->w; x++) { + int w, u; +@@ -229,6 +229,7 @@ static void threshold(struct quirc *q) + } + + row += q->w; ++ free(row_average); + } + } + +-- +2.7.3.windows.1 + diff --git a/ports/quirc/portfile.cmake b/ports/quirc/portfile.cmake new file mode 100644 index 000000000..976c7bc92 --- /dev/null +++ b/ports/quirc/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dlbeer/quirc + REF v1.0 + SHA512 a556b08f2e2c710648b342fd06a855aa577b2b8c047c45a1c47cf54cde9963faf612978afba80bfd60a6f4f63156566f549ea303f09ed6e5348c1c30f5d77c13 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/quirc-1.0 + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/patch-for-msvc.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/quirc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/quirc/license ${CURRENT_PACKAGES_DIR}/share/quirc/copyright) -- cgit v1.2.3 From b7daa881f5941f7b4aaf7d8ad667b5a761c9b4cc Mon Sep 17 00:00:00 2001 From: Kim Christensen Date: Sat, 10 Mar 2018 12:36:22 +0100 Subject: Update OpenExr to 2.2.1 (#2931) --- ports/ilmbase/CONTROL | 2 +- ports/ilmbase/portfile.cmake | 4 ++-- ports/openexr/CMakeLists.txt.patch | 20 +++++++------------- ports/openexr/CONTROL | 2 +- ports/openexr/portfile.cmake | 4 ++-- 5 files changed, 13 insertions(+), 19 deletions(-) diff --git a/ports/ilmbase/CONTROL b/ports/ilmbase/CONTROL index 2060d94d5..9e405df31 100644 --- a/ports/ilmbase/CONTROL +++ b/ports/ilmbase/CONTROL @@ -1,3 +1,3 @@ Source: ilmbase -Version: 2.2.0-1 +Version: 2.2.1-1 Description: Base libraries from ILM for OpenEXR diff --git a/ports/ilmbase/portfile.cmake b/ports/ilmbase/portfile.cmake index f81423afc..1752beb2c 100644 --- a/ports/ilmbase/portfile.cmake +++ b/ports/ilmbase/portfile.cmake @@ -2,8 +2,8 @@ if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "UWP build not supported") endif() -set(ILM_VERSION 2.2.0) -set(ILM_HASH 0bbad14ed2bd286dff3987b16ef8631470211da54f822cb3e29b7931807216845ded81c9bf41fd2d22a8b362e8b9904a5450f61f5a242e460083e86b846513f1) +set(ILM_VERSION 2.2.1) +set(ILM_HASH a08ddd9069b34a93612445a445a2ddf80c0e22349bcf221a3cc6e9f5575180b08a8b597009dacabf072360e7162e15964988bc79e8ec82cf3da6507148a75320) include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ilmbase-${ILM_VERSION}) diff --git a/ports/openexr/CMakeLists.txt.patch b/ports/openexr/CMakeLists.txt.patch index bb0d003ef..0ee0110d5 100644 --- a/ports/openexr/CMakeLists.txt.patch +++ b/ports/openexr/CMakeLists.txt.patch @@ -1,27 +1,20 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index d3e3365..a20580e 100644 +index 8c0a385..887ddf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -152,13 +152,13 @@ FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h " - IF (HAVE_GCC_INLINE_ASM_AVX) - FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX 1\n" ) - ENDIF() -- -+ - IF (HAVE_SYSCONF_NPROCESSORS_ONLN) +@@ -157,8 +157,8 @@ IF (HAVE_SYSCONF_NPROCESSORS_ONLN) FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN 1\n" ) ENDIF() -- + -SET (OPENEXR_LIBSUFFIX "") -SET (ILMBASE_LIBSUFFIX "") -+ +SET (OPENEXR_LIBSUFFIX "" CACHE STRING "Default suffix for OpenEXR") +SET (ILMBASE_LIBSUFFIX "" CACHE STRING "Default suffix for ILMBase") IF (NAMESPACE_VERSIONING) SET ( OPENEXR_LIBSUFFIX "-${OPENEXR_VERSION_API}" ) # assume same NAMESPACE_VERSION setting for IlmBase for now @@ -188,32 +188,6 @@ SET_TARGET_PROPERTIES ( IlmImfUtil - SOVERSION 22 + SOVERSION 23 OUTPUT_NAME "IlmImfUtil${OPENEXR_LIBSUFFIX}" ) - @@ -53,10 +46,11 @@ index d3e3365..a20580e 100644 ########################## # Installation -@@ -225,36 +199,3 @@ INSTALL ( FILES +@@ -224,37 +198,3 @@ INSTALL ( FILES + DESTINATION ${CMAKE_INSTALL_PREFIX}/include/OpenEXR ) - +- -# Documentation -INSTALL ( FILES - doc/TechnicalIntroduction.pdf diff --git a/ports/openexr/CONTROL b/ports/openexr/CONTROL index 2bc513755..752dafc6d 100644 --- a/ports/openexr/CONTROL +++ b/ports/openexr/CONTROL @@ -1,4 +1,4 @@ Source: openexr -Version: 2.2.0-4 +Version: 2.2.1-1 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, ilmbase diff --git a/ports/openexr/portfile.cmake b/ports/openexr/portfile.cmake index b5b9c8d97..7e3b6603f 100644 --- a/ports/openexr/portfile.cmake +++ b/ports/openexr/portfile.cmake @@ -1,5 +1,5 @@ -set(OPENEXR_VERSION 2.2.0) -set(OPENEXR_HASH 017abbeeb6b814508180721bc8e8940094965c4c55b135a198c6bcb109a04bf7f72e4aee81ee72cb2185fe818a41d892b383e8d2d59f40c673198948cb79279a) +set(OPENEXR_VERSION 2.2.1) +set(OPENEXR_HASH 192100c6ac47534f3a93c55327d2ab90b07a8265156855086b326184328c257dcde12991b3f3f1831e2df4226fe884adcfe481c2f02a157c715aee665e89a480) include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openexr-${OPENEXR_VERSION}) -- cgit v1.2.3 From 6670b87c18c544bbc9fa167f583b27dc52bce3d9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 10 Mar 2018 14:19:07 -0800 Subject: [vcpkg] Add VCPKG_DEFAULT_VS_PATH environment variable --- toolsrc/include/vcpkg/vcpkgpaths.h | 4 +++- toolsrc/src/vcpkg.cpp | 4 +++- toolsrc/src/vcpkg/vcpkgpaths.cpp | 9 +++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 84e8110ec..71f1bbba9 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -33,7 +33,7 @@ namespace vcpkg struct VcpkgPaths { - static Expected create(const fs::path& vcpkg_root_dir); + 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; @@ -90,5 +90,7 @@ namespace vcpkg Lazy ifw_repogen_exe; Lazy> toolsets; Lazy> toolsets_vs2013; + + fs::path default_vs_path; }; } diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index ef68e6f72..d9b915367 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -94,7 +94,9 @@ static void inner(const VcpkgCmdArguments& args) Checks::check_exit(VCPKG_LINE_INFO, !vcpkg_root_dir.empty(), "Error: Could not detect vcpkg-root."); - const Expected expected_paths = VcpkgPaths::create(vcpkg_root_dir); + auto default_vs_path = System::get_environment_variable("VCPKG_DEFAULT_VS_PATH").value_or(""); + + const Expected expected_paths = VcpkgPaths::create(vcpkg_root_dir, default_vs_path); Checks::check_exit(VCPKG_LINE_INFO, !expected_paths.error(), "Error: Invalid vcpkg root directory %s: %s", diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index e62ef8662..02bc5f041 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -293,7 +293,7 @@ namespace vcpkg return fetch_tool(paths.scripts, "installerbase", TOOL_DATA); } - Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir) + Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir, const std::string& default_vs_path) { std::error_code ec; const fs::path canonical_vcpkg_root_dir = fs::stdfs::canonical(vcpkg_root_dir, ec); @@ -304,6 +304,7 @@ namespace vcpkg VcpkgPaths paths; paths.root = canonical_vcpkg_root_dir; + paths.default_vs_path = default_vs_path; if (paths.root.empty()) { @@ -643,7 +644,11 @@ namespace vcpkg std::vector candidates = Util::element_pointers(vs_toolsets); const auto tsv = prebuildinfo.platform_toolset.get(); - const auto vsp = prebuildinfo.visual_studio_path.get(); + auto vsp = prebuildinfo.visual_studio_path.get(); + if (!vsp && !default_vs_path.empty()) + { + vsp = &default_vs_path; + } if (tsv && vsp) { -- cgit v1.2.3 From 5bb27b217681f8809f07acffb6aa87915a9bca0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sun, 11 Mar 2018 17:12:49 +0100 Subject: Update Catch to 2.2.1 (#3004) --- ports/catch2/CONTROL | 2 +- ports/catch2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL index 3f87c3130..7300079fc 100644 --- a/ports/catch2/CONTROL +++ b/ports/catch2/CONTROL @@ -1,4 +1,4 @@ Source: catch2 -Version: 2.2.0 +Version: 2.2.1 Description: A modern, header-only test framework for unit testing. Issues, PRs and changelogs can be found at https://github.com/catchorg/Catch2 diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake index e614304a6..ebb26c40d 100644 --- a/ports/catch2/portfile.cmake +++ b/ports/catch2/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v2.2.0) +set(CATCH_VERSION v2.2.1) vcpkg_download_distfile(HEADER URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catchorg-catch2-${CATCH_VERSION}.hpp" - SHA512 363a051d6dc67475f6832b2a1e0f7367bdef45a316c5222112842919808227bd9e9ccfe97d0439b79f86377fbb5017eed98f2dc58fe66b14f9804741dcd83036 + SHA512 89f707e667fabf1cc2be43b2ccf046a59007c68b8e4b37dde6799a960e57a9cdd1542289b83631ee6e450e22bf46cba477308ec872c1d0261c3bd4c218ab76fc ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From 971d526d726063a5756d113f3d3cc0a16c8a1bec Mon Sep 17 00:00:00 2001 From: Wimok Nopphiboon <37108473+W1m0k@users.noreply.github.com> Date: Mon, 12 Mar 2018 01:49:14 +0700 Subject: [uwebsockets] Update to 0.14.6 (#3001) --- ports/uwebsockets/CONTROL | 2 +- ports/uwebsockets/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index a5ea7d287..1757aae53 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets -Version: 0.14.5-1 +Version: 0.14.6-1 Build-Depends: libuv, openssl, zlib Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js diff --git a/ports/uwebsockets/portfile.cmake b/ports/uwebsockets/portfile.cmake index 6c660e948..f7cbb6843 100644 --- a/ports/uwebsockets/portfile.cmake +++ b/ports/uwebsockets/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO uWebSockets/uWebSockets - REF v0.14.5 - SHA512 93fa26446962be34f721db609f4cdf5f2d84771a3101f37daab75c1e46aa1a1402ec0d4c6b000b4eeeafa1a391f25c186bfeda1b3dc395da4e48bdb9a498fd22 + REF v0.14.6 + SHA512 cac3be6fcd49796590f19bde89e4195cecf9097248f7550ef6942573b59cd132f136ec026203e8524270440a7ae18c49472eb2166028b5c68d4a4cc457af4748 HEAD_REF master ) -- cgit v1.2.3 From 96da24e7167d18121d9850b6bd7e3836f9354db4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 10 Mar 2018 15:27:48 -0800 Subject: [cimg][doctest][harfbuzz][libwebsockets] Upgrades --- ports/cimg/CONTROL | 2 +- ports/cimg/portfile.cmake | 4 ++-- ports/doctest/CONTROL | 2 +- ports/doctest/portfile.cmake | 4 ++-- ports/harfbuzz/CONTROL | 2 +- ports/harfbuzz/portfile.cmake | 4 ++-- ports/libwebsockets/CONTROL | 2 +- ports/libwebsockets/portfile.cmake | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ports/cimg/CONTROL b/ports/cimg/CONTROL index 74f184270..bd6d5b4a4 100644 --- a/ports/cimg/CONTROL +++ b/ports/cimg/CONTROL @@ -1,3 +1,3 @@ Source: cimg -Version: 2.1.8 +Version: 220 Description: The CImg Library is a small, open-source, and modern C++ toolkit for image processing diff --git a/ports/cimg/portfile.cmake b/ports/cimg/portfile.cmake index 6e5a86ad9..84ee0be9f 100644 --- a/ports/cimg/portfile.cmake +++ b/ports/cimg/portfile.cmake @@ -2,9 +2,9 @@ include(vcpkg_common_functions) vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH REPO "dtschump/CImg" - REF "v.218" + REF v.220 HEAD_REF master - SHA512 aa6267c9b425cb82aa3aeadea9f7c1ffdd975d01b4f64b8cd905ce11cf062ae22eea9b519c681f0fef239615a621dd3cae2a67e04e6cac96425776a4ac176a23) + SHA512 f4954296d7aab9ba840e27d09d4d9abc21d78bedc32bd828f3c898348de7c3711096c1b6ff563907dfa41c78d1ae1c2ac5a8437d272a8d304f940f23b7844076) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/doctest/CONTROL b/ports/doctest/CONTROL index ee03969dc..b83f7b1af 100644 --- a/ports/doctest/CONTROL +++ b/ports/doctest/CONTROL @@ -1,3 +1,3 @@ Source: doctest -Version: 1.2.7 +Version: 1.2.8 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 e70d58d3d..22e867a6d 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 1.2.7 - SHA512 aa6671eb0ac0a7336ad81dea4d696ce61849ab7eb97d6f0f549446b2ac7538a8cdb0a87b8500b3af41cd3f10672ae13591633b368cbcb901f361f7715f22e4e9 + REF 1.2.8 + SHA512 4558909c6a846fa8679539a9d44e442d9ce6aae37c807ef34d95648abfabe0a16e4593aef83293e3d03bcf80e0269742ff0b95d54eb434c7a18be136608cd24d HEAD_REF master ) diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index ff26bba07..f03f52187 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.7.5 +Version: 1.7.6 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, ragel, glib (windows) diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 17d201bc1..b1c91aa91 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO behdad/harfbuzz - REF 1.7.5 - SHA512 c6e0e91203fdf3cbc8e4fd3c5d5cdb8fd8d0c87609b2c35433a42c92721a7f707612cad339eb4871cae8f7e129245e93f1509f21ca45a0a81d44225e2207cbdc + REF 1.7.6 + SHA512 90b51475d532377fe1686264a40f4a5555fc024f6984c1e3c114d8f4662e0c7f4a13e6a95e35fd5b3c54d1bb1b3cb97840b23f5ec2c6a799da61db1614b0fce3 HEAD_REF master ) diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL index 50db40c85..e6b595e0d 100644 --- a/ports/libwebsockets/CONTROL +++ b/ports/libwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: libwebsockets -Version: 2.4.1 +Version: 2.4.2 Build-Depends: zlib, openssl 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 ca6c49a73..79a96007e 100644 --- a/ports/libwebsockets/portfile.cmake +++ b/ports/libwebsockets/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO warmcat/libwebsockets - REF v2.4.1 - SHA512 a5f6a3388517d6f46183dfd1e625475ac1d4d509690e431a581d6ca927078fa50ac9a0787b4305fe088c694af1809335020bfc083a4d4d98585143f13ff61c75 + REF v2.4.2 + SHA512 7bee49f6763ff3ab7861fcda25af8d80f6757c56e197ea42be53e0b2480969eee73de3aee5198f5ff06fd1cb8ab2be4c6495243e83cd0acc235b0da83b2353d1 HEAD_REF master ) -- cgit v1.2.3 From 9f3fd252bf285aa2bbb5880e45322748ab7dcf7b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 11 Mar 2018 12:01:01 -0700 Subject: [clara][jsonnet][rs-core-lib][thrift] Upgrades --- ports/clara/CONTROL | 2 +- ports/clara/portfile.cmake | 4 ++-- ports/jsonnet/CONTROL | 2 +- ports/jsonnet/portfile.cmake | 4 ++-- ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ports/clara/CONTROL b/ports/clara/CONTROL index 37c630037..0825f74e0 100644 --- a/ports/clara/CONTROL +++ b/ports/clara/CONTROL @@ -1,3 +1,3 @@ Source: clara -Version: 2018-03-07 +Version: 2018-03-11 Description: A simple to use command line parser for C++ \ No newline at end of file diff --git a/ports/clara/portfile.cmake b/ports/clara/portfile.cmake index ed4113f3f..377eb932a 100644 --- a/ports/clara/portfile.cmake +++ b/ports/clara/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO philsquared/Clara - REF adb5ec3a5c20defc80286fd6e8c14aeef10fdcd7 - SHA512 93977d8e2024220f37645812dfe1f8a6ab79568c3dc09fa63894d00f440094944a96878178e43b5508aefb7214a6921dad86f9e92b2833f7a1f8c6f53c35860c + REF 008c2ae0a52aaa485d6cb830ad54bc6466733298 + SHA512 270c5d8cdc9c833d1a95f1a2737b3db0f537ab92569b5cc1007184b9f7e59f66bbf9ba95313332826814c0b670919b31e27fe797bb3083ac5e55bad6a6051d51 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/single_include/clara.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index 5f92d26b6..fafb3c255 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-03-07 +Version: 2018-03-11 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 5206bae7d..ca5df8b29 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF 0759409780eec8cb3a7a8ced52f104c0d895ac38 - SHA512 725ac0f9c28e08ac9c694da305da87910fa672328bf77e799635c154f80031ff86c80901608ca379626f6810c590f5700fc1d6904cf3f3c1fde914c2b221f7f6 + REF c03e3e7f40bcf6f2f62168ad0f0fe21137e0c972 + SHA512 b4bad7591b1a23fcb88e58377f472016177581f9256b9e721eab6e762ad2ec947c432cd1b2f659de54cd9ef4d7a67e6c190152365f6093610697a4e720be2a89 HEAD_REF master ) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index 3e276f649..af14306e0 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-03-07 +Version: 2018-03-11 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index e5a2f8c8c..32a0befe2 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF 3127d573eb15007f878a3cbab7faa8be3255df44 - SHA512 96b08485567547296dbe1d70bedc4d1e59d432b03c468eab83b0b436d2f92b6e51aa5571c039db65abe6797a88c9cf26048539f773bce58c38789384f1a495c3 + REF a0d287aada58586fc16e8cbb44b2d34eaabeff46 + SHA512 4b160552118dccd2faf076e397d59ff785b53ff2ba7fc5f4ccd338dcb7d0eec7e851071036b5c983ad1ddccbcb64653bf522507c687a11756089c054241ff21d HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index d63ec0011..3470a9990 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-03-07 +Version: 2018-03-11 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index b5274c6a4..502da193a 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF b4f22ff30119ea5cadf9b16e97afdcabefe06696 - SHA512 3b63ed69a69b015ef7a2eaa94854b4ab2801c9c7af749b97d7999f4861f4df5a623da4e5b054dadaf4aa48a04c8e010b820d4382de9ef82b191a0d64ddf3181d + REF 70b33fb6b48d62859a048cac1bec79cfadb2f310 + SHA512 81c2c41fc4daab8b0da94a67862f1a2db0901804e06ed3445fec7bdc408e983bd0662c0d3fdaa9f149bcd531763620ffdfd3c0226f73d246e8e56dd560ccf1b4 HEAD_REF master ) -- cgit v1.2.3 From ad7fa55bb004571bc7d2aad337dda978fe4d2bac Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Mar 2018 09:57:37 -0800 Subject: [vcpkg] Improve handling of external toolchains. Extract MSVC settings to a separate toolchain file. --- scripts/cmake/vcpkg_configure_cmake.cmake | 45 ++++++++----------------------- scripts/toolchains/windows.cmake | 23 ++++++++++++++++ toolsrc/src/vcpkg/build.cpp | 1 + toolsrc/src/vcpkg/vcpkgpaths.cpp | 3 ++- 4 files changed, 37 insertions(+), 35 deletions(-) create mode 100644 scripts/toolchains/windows.cmake diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index e590fb8e7..aa549903b 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -80,7 +80,7 @@ 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) + elseif(VCPKG_CHAINLOAD_TOOLCHAIN_FILE OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) set(GENERATOR "Ninja") elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") @@ -152,39 +152,8 @@ function(vcpkg_configure_cmake) if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") - else() - set(VCPKG_CXX_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}") - set(VCPKG_C_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}") - if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") - list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" - ) - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" - "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" - ) - elseif(VCPKG_CRT_LINKAGE STREQUAL "static") - list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" - ) - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" - "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" - ) - else() - message(FATAL_ERROR "Invalid setting for VCPKG_CRT_LINKAGE: \"${VCPKG_CRT_LINKAGE}\". It must be \"static\" or \"dynamic\"") - endif() - - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" - "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" - ) - list(APPEND _csc_OPTIONS - "-DCMAKE_CXX_FLAGS=${VCPKG_CXX_FLAGS}" - "-DCMAKE_C_FLAGS=${VCPKG_C_FLAGS}" - ) + 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") endif() list(APPEND _csc_OPTIONS @@ -197,6 +166,14 @@ function(vcpkg_configure_cmake) "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" + "-DVCPKG_CXX_FLAGS=${VCPKG_CXX_FLAGS}" + "-DVCPKG_CXX_FLAGS_RELEASE=${VCPKG_CXX_FLAGS_RELEASE}" + "-DVCPKG_CXX_FLAGS_DEBUG=${VCPKG_CXX_FLAGS_DEBUG}" + "-DVCPKG_C_FLAGS=${VCPKG_C_FLAGS}" + "-DVCPKG_C_FLAGS_RELEASE=${VCPKG_C_FLAGS_RELEASE}" + "-DVCPKG_C_FLAGS_DEBUG=${VCPKG_C_FLAGS_DEBUG}" + "-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}" + "-DVCPKG_LINKER_FLAGS=${VCPKG_LINKER_FLAGS}" ) if(DEFINED ARCH) diff --git a/scripts/toolchains/windows.cmake b/scripts/toolchains/windows.cmake new file mode 100644 index 000000000..7bfc2282b --- /dev/null +++ b/scripts/toolchains/windows.cmake @@ -0,0 +1,23 @@ +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(VCPKG_CRT_LINK_FLAG_PREFIX "/MD") + elseif(VCPKG_CRT_LINKAGE STREQUAL "static") + set(VCPKG_CRT_LINK_FLAG_PREFIX "/MT") + else() + message(FATAL_ERROR "Invalid setting for VCPKG_CRT_LINKAGE: \"${VCPKG_CRT_LINKAGE}\". It must be \"static\" or \"dynamic\"") + endif() + + set(CMAKE_CXX_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}" CACHE STRING "") + set(CMAKE_C_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}" CACHE STRING "") + + set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG ${VCPKG_CRT_LINK_FLAG_PREFIX}d /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "") + set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG ${VCPKG_CRT_LINK_FLAG_PREFIX}d /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "") + set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "") + set(CMAKE_C_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "") + + 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 5870bd187..aa84b6cf5 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -209,6 +209,7 @@ namespace vcpkg::Build std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) { if (pre_build_info.external_toolchain_file.has_value()) return ""; + if (!pre_build_info.cmake_system_name.empty() && pre_build_info.cmake_system_name != "WindowsStore") return ""; const char* tonull = " >nul"; if (GlobalState::debugging) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 02bc5f041..46e80c4a9 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -622,7 +622,8 @@ namespace vcpkg const Toolset& VcpkgPaths::get_toolset(const Build::PreBuildInfo& prebuildinfo) const { - if (prebuildinfo.external_toolchain_file) + if (prebuildinfo.external_toolchain_file || + (!prebuildinfo.cmake_system_name.empty() && prebuildinfo.cmake_system_name != "WindowsStore")) { static Toolset external_toolset = []() -> Toolset { Toolset ret; -- cgit v1.2.3 From f56a5e4e94a1151bc09f073b3597ff3b40e9d4b8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Mar 2018 10:07:39 -0800 Subject: [vcpkg] Improve defaults for other platforms --- scripts/buildsystems/vcpkg.cmake | 4 ++-- scripts/cmake/vcpkg_configure_cmake.cmake | 6 ++++++ scripts/cmake/vcpkg_find_acquire_program.cmake | 12 ++++++++++++ scripts/toolchains/android.cmake | 13 +++++++++++++ scripts/toolchains/linux.cmake | 3 +++ scripts/toolchains/osx.cmake | 1 + 6 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 scripts/toolchains/android.cmake create mode 100644 scripts/toolchains/linux.cmake create mode 100644 scripts/toolchains/osx.cmake diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index ce5efc1de..e621da861 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -57,9 +57,9 @@ endif() if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") set(_VCPKG_TARGET_TRIPLET_PLAT uwp) -elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(_VCPKG_TARGET_TRIPLET_PLAT linux) -elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(_VCPKG_TARGET_TRIPLET_PLAT osx) else() set(_VCPKG_TARGET_TRIPLET_PLAT windows) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index aa549903b..951b6443f 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -154,6 +154,12 @@ function(vcpkg_configure_cmake) 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") endif() list(APPEND _csc_OPTIONS diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index b24345021..21d7ecd8f 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -106,6 +106,8 @@ function(vcpkg_find_acquire_program VAR) set(PROGNAME ninja) set(SUBDIR "ninja-1.8.2") set(PATHS ${DOWNLOADS}/tools/ninja/${SUBDIR}) + 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) @@ -181,6 +183,16 @@ function(vcpkg_find_acquire_program VAR) do_find() if("${${VAR}}" MATCHES "-NOTFOUND") + if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + set(EXAMPLE ".") + if(DEFINED BREW_PACKAGE_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(EXAMPLE ":\n brew install ${BREW_PACKAGE_NAME}") + elseif(DEFINED APT_PACKAGE_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(EXAMPLE ":\n sudo apt-get install ${APT_PACKAGE_NAME}") + endif() + message(FATAL_ERROR "Could not find ${PROGNAME}. Please install it via your package manager${EXAMPLE}") + endif() + vcpkg_download_distfile(ARCHIVE_PATH URLS ${URL} SHA512 ${HASH} diff --git a/scripts/toolchains/android.cmake b/scripts/toolchains/android.cmake new file mode 100644 index 000000000..2a37e4c39 --- /dev/null +++ b/scripts/toolchains/android.cmake @@ -0,0 +1,13 @@ + +set(ANDROID_CPP_FEATURES "rtti exceptions" CACHE STRING "") +set(CMAKE_SYSTEM_NAME Android CACHE STRING "") +set(ANDROID_ABI x86_64 CACHE STRING "") +set(ANDROID_TOOLCHAIN clang CACHE STRING "") +set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "") +set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang CACHE STRING "") + +if(NOT EXISTS "$ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b/build/cmake/android.toolchain.cmake") + message(FATAL_ERROR "Could not find android ndk. Searched at $ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b") +endif() + +include("$ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b/build/cmake/android.toolchain.cmake") diff --git a/scripts/toolchains/linux.cmake b/scripts/toolchains/linux.cmake new file mode 100644 index 000000000..80983b500 --- /dev/null +++ b/scripts/toolchains/linux.cmake @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.5) + +set(CMAKE_SYSTEM_NAME Linux CACHE STRING "") diff --git a/scripts/toolchains/osx.cmake b/scripts/toolchains/osx.cmake new file mode 100644 index 000000000..1a164f178 --- /dev/null +++ b/scripts/toolchains/osx.cmake @@ -0,0 +1 @@ +set(CMAKE_SYSTEM_NAME Darwin CACHE STRING "") -- cgit v1.2.3 From 81b58d1868a0f7edf324b2f366426e2973ac80b7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 9 Mar 2018 03:51:19 -0800 Subject: [vcpkg] Use unzip/zip on non-windows --- toolsrc/src/vcpkg/build.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index aa84b6cf5..408dde798 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -438,10 +438,15 @@ namespace vcpkg::Build 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()); +#if defined(_WIN32) auto&& _7za = paths.get_7za_exe(); System::cmd_execute_clean(Strings::format( R"("%s" x "%s" -o"%s" -y >nul)", _7za.u8string(), archive_path.u8string(), pkg_path.u8string())); +#else + System::cmd_execute_clean(Strings::format( + R"(unzip -qq "%s" "-d%s")", archive_path.u8string(), pkg_path.u8string())); +#endif auto maybe_bcf = Paragraphs::try_load_cached_control_package(paths, spec); bcf = std::make_unique(std::move(maybe_bcf).value_or_exit(VCPKG_LINE_INFO)); @@ -538,6 +543,7 @@ namespace vcpkg::Build !fs.exists(tmp_archive_path), "Could not remove file: %s", tmp_archive_path.u8string()); +#if defined(_WIN32) auto&& _7za = paths.get_7za_exe(); System::cmd_execute_clean(Strings::format( @@ -545,7 +551,12 @@ namespace vcpkg::Build _7za.u8string(), tmp_archive_path.u8string(), paths.package_dir(spec).u8string())); - +#else + System::cmd_execute_clean(Strings::format( + R"(cd '%s' && zip --quiet -r '%s' *)", + paths.package_dir(spec).u8string(), + tmp_archive_path.u8string())); +#endif fs.create_directories(archives_dir, ec); fs.rename(tmp_archive_path, archive_path); -- cgit v1.2.3 From a773c59f05ddfbe3fd68517ed4c91aa179e57f89 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 11 Mar 2018 23:01:33 -0700 Subject: [boost-build] Split out into boost-modular-build-helper and support non-Windows targets --- ports/boost-atomic/CONTROL | 2 +- ports/boost-build/CONTROL | 2 +- ports/boost-build/Jamroot.jam | 150 ---------- ports/boost-build/boost-modular-build.cmake | 275 ----------------- ports/boost-build/nothing.bat | 0 ports/boost-build/portfile.cmake | 45 ++- ports/boost-build/user-config.jam | 33 --- ports/boost-chrono/CONTROL | 2 +- ports/boost-container/CONTROL | 2 +- ports/boost-context/CONTROL | 2 +- ports/boost-coroutine/CONTROL | 2 +- ports/boost-date-time/CONTROL | 2 +- ports/boost-exception/CONTROL | 2 +- ports/boost-fiber/CONTROL | 2 +- ports/boost-filesystem/CONTROL | 2 +- ports/boost-graph-parallel/CONTROL | 2 +- ports/boost-graph/CONTROL | 2 +- ports/boost-iostreams/CONTROL | 2 +- ports/boost-locale/CONTROL | 2 +- ports/boost-log/CONTROL | 2 +- ports/boost-math/CONTROL | 2 +- ports/boost-modular-build-helper/CMakeLists.txt | 120 ++++++++ ports/boost-modular-build-helper/CONTROL | 2 + ports/boost-modular-build-helper/Jamroot.jam | 150 ++++++++++ .../boost-modular-build.cmake | 329 +++++++++++++++++++++ ports/boost-modular-build-helper/nothing.bat | 0 ports/boost-modular-build-helper/portfile.cmake | 11 + ports/boost-modular-build-helper/user-config.jam | 47 +++ ports/boost-mpi/CONTROL | 2 +- ports/boost-program-options/CONTROL | 2 +- ports/boost-random/CONTROL | 2 +- ports/boost-regex/CONTROL | 2 +- ports/boost-serialization/CONTROL | 2 +- ports/boost-signals/CONTROL | 2 +- ports/boost-stacktrace/CONTROL | 2 +- ports/boost-system/CONTROL | 2 +- ports/boost-test/CONTROL | 2 +- ports/boost-thread/CONTROL | 2 +- ports/boost-timer/CONTROL | 2 +- ports/boost-type-erasure/CONTROL | 2 +- ports/boost-vcpkg-helpers/generate-ports.ps1 | 2 +- ports/boost-wave/CONTROL | 2 +- 42 files changed, 711 insertions(+), 511 deletions(-) delete mode 100644 ports/boost-build/Jamroot.jam delete mode 100644 ports/boost-build/boost-modular-build.cmake delete mode 100644 ports/boost-build/nothing.bat delete mode 100644 ports/boost-build/user-config.jam create mode 100644 ports/boost-modular-build-helper/CMakeLists.txt create mode 100644 ports/boost-modular-build-helper/CONTROL create mode 100644 ports/boost-modular-build-helper/Jamroot.jam create mode 100644 ports/boost-modular-build-helper/boost-modular-build.cmake create mode 100644 ports/boost-modular-build-helper/nothing.bat create mode 100644 ports/boost-modular-build-helper/portfile.cmake create mode 100644 ports/boost-modular-build-helper/user-config.jam diff --git a/ports/boost-atomic/CONTROL b/ports/boost-atomic/CONTROL index 9c84408eb..4a625b6df 100644 --- a/ports/boost-atomic/CONTROL +++ b/ports/boost-atomic/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-atomic Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-integer, boost-type-traits, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-integer, boost-type-traits, boost-vcpkg-helpers Description: Boost atomic module diff --git a/ports/boost-build/CONTROL b/ports/boost-build/CONTROL index cf93bfa1e..ef59d386c 100644 --- a/ports/boost-build/CONTROL +++ b/ports/boost-build/CONTROL @@ -1,3 +1,3 @@ Source: boost-build -Version: 1.66.0-5 +Version: 1.66.0-8 Description: Boost.Build diff --git a/ports/boost-build/Jamroot.jam b/ports/boost-build/Jamroot.jam deleted file mode 100644 index 6669b446e..000000000 --- a/ports/boost-build/Jamroot.jam +++ /dev/null @@ -1,150 +0,0 @@ -constant BOOST_VERSION : 1.66.0 ; -constant BOOST_VERSION_ABI_TAG : 1_66 ; -constant BOOST_JAMROOT_MODULE : $(__name__) ; - -import boostcpp ; -import feature ; - -boostcpp.set-version $(BOOST_VERSION) ; - -project boost : requirements - include&&"@CURRENT_INSTALLED_DIR@/include" - BOOST_ALL_NO_LIB=1 - @$(__name__).tag - @REQUIREMENTS@ - ; - -rule boost-install ( libraries * ) -{ - stagedir = [ option.get stagedir ] ; - install stage - : $(libraries) - : $(stagedir)/lib ; -} - -rule tag ( name : type ? : property-set ) -{ - return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ; -} - -rule python-tag ( name : type ? : property-set ) -{ - return [ tag $(name) : $(type) : $(property-set) ] ; -} - -if "@PORT@" != "boost-system" -{ - use-project /boost/system : . ; - - lib boost_system : : "@CURRENT_INSTALLED_DIR@/lib/boost_system-vc140-mt.lib" release ; - lib boost_system : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_system-vc140-mt-gd.lib" debug ; - explicit boost_system ; -} - -if "@PORT@" != "boost-chrono" -{ - use-project /boost/chrono : . ; - - lib boost_chrono : : "@CURRENT_INSTALLED_DIR@/lib/boost_chrono-vc140-mt.lib" release ; - lib boost_chrono : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_chrono-vc140-mt-gd.lib" debug ; - explicit boost_chrono ; -} - -if "@PORT@" != "boost-regex" -{ - use-project /boost/regex : . ; - - lib boost_regex : : "@CURRENT_INSTALLED_DIR@/lib/boost_regex-vc140-mt.lib" release ; - lib boost_regex : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_regex-vc140-mt-gd.lib" debug ; - explicit boost_regex ; -} - -if "@PORT@" != "boost-date-time" -{ - use-project /boost/date_time : . ; - - lib boost_date_time : : "@CURRENT_INSTALLED_DIR@/lib/boost_date_time-vc140-mt.lib" release -/boost/date_time//boost_date_time ; - lib boost_date_time : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_date_time-vc140-mt-gd.lib" debug -/boost/date_time//boost_date_time ; - explicit boost_date_time ; -} - -if "@PORT@" != "boost-thread" -{ - use-project /boost/thread : . ; - - lib boost_thread : : "@CURRENT_INSTALLED_DIR@/lib/boost_thread-vc140-mt.lib" release : : /boost/date_time//boost_date_time ; - lib boost_thread : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_thread-vc140-mt-gd.lib" debug : : /boost/date_time//boost_date_time ; - explicit boost_thread ; -} - -if "@PORT@" != "boost-timer" -{ - use-project /boost/timer : . ; - - lib boost_timer : : "@CURRENT_INSTALLED_DIR@/lib/boost_timer-vc140-mt.lib" release ; - lib boost_timer : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_timer-vc140-mt-gd.lib" debug ; - explicit boost_timer ; -} - -if "@PORT@" != "boost-filesystem" -{ - use-project /boost/filesystem : . ; - - lib boost_filesystem : : "@CURRENT_INSTALLED_DIR@/lib/boost_filesystem-vc140-mt.lib" release : : /boost/system//boost_system ; - lib boost_filesystem : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_filesystem-vc140-mt-gd.lib" debug : : /boost/system//boost_system ; - explicit boost_filesystem ; -} - -if "@PORT@" != "boost-atomic" -{ - use-project /boost/atomic : . ; - - lib boost_atomic : : "@CURRENT_INSTALLED_DIR@/lib/boost_atomic-vc140-mt.lib" release ; - lib boost_atomic : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_atomic-vc140-mt-gd.lib" debug ; - explicit boost_atomic ; -} - -if "@PORT@" != "boost-context" -{ - feature.feature segmented-stacks : on : optional propagated composite ; - feature.compose on : BOOST_USE_SEGMENTED_STACKS ; - - use-project /boost/context : . ; - - lib boost_context : : "@CURRENT_INSTALLED_DIR@/lib/boost_context-vc140-mt.lib" release ; - lib boost_context : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_context-vc140-mt-gd.lib" debug ; - explicit boost_context ; -} - -if "@PORT@" != "boost-test" -{ - use-project /boost/test : . ; - - lib boost_unit_test_framework : : "@CURRENT_INSTALLED_DIR@/lib/boost_unit_test_framework-vc140-mt.lib" release ; - lib boost_unit_test_framework : : "@CURRENT_INSTALLED_DIR@/debug/lib/boost_unit_test_framework-vc140-mt-gd.lib" debug ; - explicit boost_unit_test_framework ; -} - -if "@PORT@" != "boost-serialization" -{ - use-project /boost/serialization : . ; - - lib boost_serialization : : @CURRENT_INSTALLED_DIR@/lib/boost_serialization-vc140-mt.lib release ; - lib boost_serialization : : @CURRENT_INSTALLED_DIR@/debug/lib/boost_serialization-vc140-mt-gd.lib debug ; - explicit boost_serialization ; -} - -rule requires ( foo * ) -{ -} - -rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * ) -{ - name = boost_$(name) ; - lib $(name) : $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ; - boost-install $(name) ; -} - -use-project /boost/@PORT@ : build ; - -build-project build ; diff --git a/ports/boost-build/boost-modular-build.cmake b/ports/boost-build/boost-modular-build.cmake deleted file mode 100644 index 57505dbea..000000000 --- a/ports/boost-build/boost-modular-build.cmake +++ /dev/null @@ -1,275 +0,0 @@ -function(boost_modular_build) - cmake_parse_arguments(_bm "" "SOURCE_PATH;REQUIREMENTS" "OPTIONS" ${ARGN}) - - if(NOT DEFINED _bm_SOURCE_PATH) - message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_build.") - endif() - - # Todo: this serves too similar a purpose as vcpkg_find_acquire_program() - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/tools/boost-build") - else() - get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE) - endif() - - if(NOT EXISTS "${BOOST_BUILD_PATH}") - message(FATAL_ERROR "The x86 boost-build tools must be installed to build for non-x86/x64 platforms. Please run `vcpkg install boost-build:x86-windows`.") - endif() - - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - list(APPEND _bm_OPTIONS windows-api=store) - endif() - - set(_bm_DIR ${CURRENT_INSTALLED_DIR}/share/boost-build) - - if(EXISTS "${_bm_SOURCE_PATH}/Jamfile.v2") - file(REMOVE_RECURSE "${_bm_SOURCE_PATH}/Jamfile.v2") - endif() - - set(REQUIREMENTS ${_bm_REQUIREMENTS}) - - configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) - - # boost thread superfluously builds has_atomic_flag_lockfree on windows. - if(EXISTS "${_bm_SOURCE_PATH}/build/Jamfile.v2") - file(READ ${_bm_SOURCE_PATH}/build/Jamfile.v2 _contents) - string(REPLACE - "\n\nexe has_atomic_flag_lockfree" - "\n\nexplicit has_atomic_flag_lockfree ;\nexe has_atomic_flag_lockfree" - _contents - "${_contents}" - ) - string(REPLACE "\nimport ../../config/checks/config : requires ;" "\n# import ../../config/checks/config : requires ;" _contents "${_contents}") - string(REGEX REPLACE - "\.\./\.\./([^/ ]+)/build//(boost_[^/ ]+)" - "/boost/\\1//\\2" - _contents - "${_contents}" - ) - string(REGEX REPLACE " /boost//([^/ ]+)" " /boost/\\1//boost_\\1" _contents "${_contents}") - file(WRITE ${_bm_SOURCE_PATH}/build/Jamfile.v2 "${_contents}") - endif() - - if(EXISTS "${_bm_SOURCE_PATH}/build/log-architecture.jam") - file(READ ${_bm_SOURCE_PATH}/build/log-architecture.jam _contents) - string(REPLACE - "\nproject.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" - "\n# project.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" - _contents "${_contents}") - file(WRITE ${_bm_SOURCE_PATH}/build/log-architecture.jam "${_contents}") - endif() - - ##################### - # Cleanup previous builds - ###################### - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - # It is possible for a file in this folder to be locked due to antivirus or vctip - execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) - message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\n Files are likely in use.") - endif() - endif() - - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - # It is possible for a file in this folder to be locked due to antivirus or vctip - execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg\n Files are likely in use.") - endif() - endif() - - if(EXISTS ${CURRENT_PACKAGES_DIR}/debug) - message(FATAL_ERROR "Error: directory exists: ${CURRENT_PACKAGES_DIR}/debug\n The previous package was not fully cleared. This is an internal error.") - endif() - file(MAKE_DIRECTORY - ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - ) - - ###################### - # Generate configuration - ###################### - list(APPEND _bm_OPTIONS - -j$ENV{NUMBER_OF_PROCESSORS} - --debug-configuration - --debug-building - --debug-generators - --disable-icu - --ignore-site-config - --hash - -q - -sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}\\include" - -sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}\\include" - threadapi=win32 - threading=multi - ) - set(_bm_OPTIONS_DBG - -sZLIB_BINARY=zlibd - -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" - -sBZIP2_BINARY=bz2d - -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib" - ) - - set(_bm_OPTIONS_REL - -sZLIB_BINARY=zlib - -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" - -sBZIP2_BINARY=bz2 - -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib" - ) - - - # Add build type specific options - if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") - list(APPEND _bm_OPTIONS runtime-link=shared) - else() - list(APPEND _bm_OPTIONS runtime-link=static) - endif() - - if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - list(APPEND _bm_OPTIONS link=shared) - else() - list(APPEND _bm_OPTIONS link=static) - endif() - - if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64") - list(APPEND _bm_OPTIONS address-model=64 architecture=x86) - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - list(APPEND _bm_OPTIONS address-model=32 architecture=arm) - else() - list(APPEND _bm_OPTIONS address-model=32 architecture=x86) - endif() - - file(TO_CMAKE_PATH "${_bm_DIR}/nothing.bat" NOTHING_BAT) - set(TOOLSET_OPTIONS " /EHsc -Zm800 -nologo") - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - find_path(PATH_TO_CL cl.exe) - find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "${PATH_TO_CL}/../../../lib/x86/store/references" NO_DEFAULT_PATH) - if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") - message(FATAL_ERROR "Could not find `platform.winmd` in VS2017. Do you have the Universal Windows Platform development workload installed?") - endif() - else() - find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "$ENV{VS140COMNTOOLS}/../../VC/LIB/store/references") - if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") - message(FATAL_ERROR "Could not find `platform.winmd` in VS2015.") - endif() - endif() - file(TO_NATIVE_PATH "${PLATFORM_WINMD_DIR}" PLATFORM_WINMD_DIR) - string(REPLACE "\\" "\\\\" PLATFORM_WINMD_DIR ${PLATFORM_WINMD_DIR}) # escape backslashes - - set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -Zl \"/AI\"${PLATFORM_WINMD_DIR}\"\" WindowsApp.lib /ZW -DVirtualAlloc=VirtualAllocFromApp -D_WIN32_WINNT=0x0A00") - else() - set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -D_WIN32_WINNT=0x0602") - endif() - - configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) - configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) - - if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - list(APPEND _bm_OPTIONS toolset=msvc-14.1) - elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") - list(APPEND _bm_OPTIONS toolset=msvc-14.0) - else() - message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'") - endif() - - ###################### - # Perform build + Package - ###################### - set(B2_EXE "${BOOST_BUILD_PATH}/b2.exe") - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Building ${TARGET_TRIPLET}-rel") - set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") - vcpkg_execute_required_process( - COMMAND "${B2_EXE}" - --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage - --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel - --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam - ${_bm_OPTIONS} - ${_bm_OPTIONS_REL} - variant=release - debug-symbols=on - WORKING_DIRECTORY ${_bm_SOURCE_PATH} - LOGNAME build-${TARGET_TRIPLET}-rel - ) - message(STATUS "Building ${TARGET_TRIPLET}-rel done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Building ${TARGET_TRIPLET}-dbg") - set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") - vcpkg_execute_required_process( - COMMAND "${B2_EXE}" - --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage - --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg - --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam - ${_bm_OPTIONS} - ${_bm_OPTIONS_DBG} - variant=debug - WORKING_DIRECTORY ${_bm_SOURCE_PATH} - LOGNAME build-${TARGET_TRIPLET}-dbg - ) - message(STATUS "Building ${TARGET_TRIPLET}-dbg done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Packaging ${TARGET_TRIPLET}-rel") - file(GLOB REL_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.lib) - file(COPY ${REL_LIBS} - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - FILES_MATCHING PATTERN "*.lib") - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.dll) - file(COPY ${REL_DLLS} - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - FILES_MATCHING PATTERN "*.dll") - endif() - message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") - endif() - - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") - file(GLOB DBG_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.lib) - file(COPY ${DBG_LIBS} - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - FILES_MATCHING PATTERN "*.lib") - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.dll) - file(COPY ${DBG_DLLS} - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - FILES_MATCHING PATTERN "*.dll") - endif() - message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") - endif() - - file(GLOB INSTALLED_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*.lib ${CURRENT_PACKAGES_DIR}/lib/*.lib) - foreach(LIB ${INSTALLED_LIBS}) - get_filename_component(OLD_FILENAME ${LIB} NAME) - get_filename_component(DIRECTORY_OF_LIB_FILE ${LIB} DIRECTORY) - string(REPLACE "libboost_" "boost_" NEW_FILENAME ${OLD_FILENAME}) - string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs - string(REPLACE "-vc141-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2017 and VS2015 binaries - string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs - string(REPLACE "-sgyd-" "-gyd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs - string(REPLACE "-x32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries - string(REPLACE "-x64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries - string(REPLACE "-a32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries - string(REPLACE "-a64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries - string(REPLACE "-1_66" "" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake > 3.10 to locate the binaries - string(REPLACE "_python3-" "_python-" NEW_FILENAME ${NEW_FILENAME}) - if("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}") - # nothing to do - elseif(EXISTS ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) - file(REMOVE ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}) - else() - file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) - endif() - endforeach() - - vcpkg_copy_pdbs() -endfunction() diff --git a/ports/boost-build/nothing.bat b/ports/boost-build/nothing.bat deleted file mode 100644 index e69de29bb..000000000 diff --git a/ports/boost-build/portfile.cmake b/ports/boost-build/portfile.cmake index ea2b57261..fdd559ebe 100644 --- a/ports/boost-build/portfile.cmake +++ b/ports/boost-build/portfile.cmake @@ -4,12 +4,10 @@ set(VCPKG_POLICY_EMPTY_PACKAGE enabled) if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") return() +elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + return() endif() -# This fixes the lib path to use desktop libs instead of uwp -- TODO: improve this with better "host" compilation -string(REPLACE "\\store\\;" "\\;" LIB "$ENV{LIB}") -set(ENV{LIB} "${LIB}") - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/build @@ -30,6 +28,13 @@ vcpkg_download_distfile(BOOSTCPP_ARCHIVE SHA512 ef2ae1d6a53a7f93654950e2e8e679da6b0359f02baafc03db970801634c1f5d4229633b5b6d74ad96a306e6efe3429d436669dc165b1fa655917e0ec74714e4 ) +file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright) +file(INSTALL ${BOOSTCPP_ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build RENAME boostcpp.jam) + +# This fixes the lib path to use desktop libs instead of uwp -- TODO: improve this with better "host" compilation +string(REPLACE "\\store\\;" "\\;" LIB "$ENV{LIB}") +set(ENV{LIB} "${LIB}") + file(COPY ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build @@ -44,22 +49,16 @@ string(REPLACE "_WIN32_WINNT=0x0602" "" _contents "${_contents}") file(WRITE "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" "${_contents}") message(STATUS "Bootstrapping...") -vcpkg_execute_required_process( - COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" msvc - WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build - LOGNAME bootstrap-${TARGET_TRIPLET} -) - -file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright) -file(INSTALL ${BOOSTCPP_ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build RENAME boostcpp.jam) - - - -file( - COPY - ${CMAKE_CURRENT_LIST_DIR}/boost-modular-build.cmake - ${CMAKE_CURRENT_LIST_DIR}/Jamroot.jam - ${CMAKE_CURRENT_LIST_DIR}/nothing.bat - ${CMAKE_CURRENT_LIST_DIR}/user-config.jam - DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build -) +if(CMAKE_HOST_WIN32) + vcpkg_execute_required_process( + COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" msvc + WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build + LOGNAME bootstrap-${TARGET_TRIPLET} + ) +else() + vcpkg_execute_required_process( + COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.sh" + WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build + LOGNAME bootstrap-${TARGET_TRIPLET} + ) +endif() diff --git a/ports/boost-build/user-config.jam b/ports/boost-build/user-config.jam deleted file mode 100644 index 59cc160cc..000000000 --- a/ports/boost-build/user-config.jam +++ /dev/null @@ -1,33 +0,0 @@ -import toolset ; - -using msvc : : cl.exe : -"@NOTHING_BAT@" -@TOOLSET_OPTIONS@ -; - -if "@PORT@" = "boost-python" -{ - using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_RELEASE@" ; - using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_DEBUG@" : on ; -} - -if "@PORT@" = "boost-mpi" -{ - using mpi : : - @CURRENT_INSTALLED_DIR@/lib - @CURRENT_INSTALLED_DIR@/include - msmpi ; -} - -project user-config : ; - -lib advapi32 ; - -lib icuuc : : "@CURRENT_INSTALLED_DIR@/lib/icuuc.lib" release : : advapi32 ; -lib icuuc : : "@CURRENT_INSTALLED_DIR@/debug/lib/icuucd.lib" debug : : advapi32 ; - -lib icuin : : "@CURRENT_INSTALLED_DIR@/lib/icuin.lib" release : : ; -lib icuin : : "@CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib" debug : : ; - -lib icudt : : "@CURRENT_INSTALLED_DIR@/lib/icudt.lib" release : : ; -lib icudt : : "@CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib" debug : : ; diff --git a/ports/boost-chrono/CONTROL b/ports/boost-chrono/CONTROL index 00ee98871..b5fb892cd 100644 --- a/ports/boost-chrono/CONTROL +++ b/ports/boost-chrono/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-chrono Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-move, boost-mpl, boost-predef, boost-ratio, boost-static-assert, boost-system, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-detail, boost-integer, boost-move, boost-mpl, boost-predef, boost-ratio, boost-static-assert, boost-system, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost chrono module diff --git a/ports/boost-container/CONTROL b/ports/boost-container/CONTROL index df2cfe44e..69e641d36 100644 --- a/ports/boost-container/CONTROL +++ b/ports/boost-container/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-container Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-functional, boost-integer, boost-intrusive, boost-move, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-functional, boost-integer, boost-intrusive, boost-move, boost-static-assert, boost-type-traits, boost-vcpkg-helpers Description: Boost container module diff --git a/ports/boost-context/CONTROL b/ports/boost-context/CONTROL index 37568a50d..22295dddc 100644 --- a/ports/boost-context/CONTROL +++ b/ports/boost-context/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-context Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-pool, boost-predef, boost-smart-ptr, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-detail, boost-integer, boost-pool, boost-predef, boost-smart-ptr, boost-vcpkg-helpers Description: Boost context module diff --git a/ports/boost-coroutine/CONTROL b/ports/boost-coroutine/CONTROL index 227ffe8ef..77683890a 100644 --- a/ports/boost-coroutine/CONTROL +++ b/ports/boost-coroutine/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-coroutine Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-context (windows), boost-detail, boost-exception, boost-integer, boost-move, boost-range, boost-system, boost-thread (windows), boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-context (windows), boost-detail, boost-exception, boost-integer, boost-move, boost-range, boost-system, boost-thread (windows), boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost coroutine module diff --git a/ports/boost-date-time/CONTROL b/ports/boost-date-time/CONTROL index 73f8d07ce..8e8738e8d 100644 --- a/ports/boost-date-time/CONTROL +++ b/ports/boost-date-time/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-date-time Version: 1.66.0 -Build-Depends: boost-algorithm, boost-assert, boost-build, boost-compatibility, boost-config, boost-detail, boost-integer, boost-io, boost-lexical-cast, boost-math, boost-mpl, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Build-Depends: boost-algorithm, boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-detail, boost-integer, boost-io, boost-lexical-cast, boost-math, boost-mpl, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost date_time module diff --git a/ports/boost-exception/CONTROL b/ports/boost-exception/CONTROL index 52d316c34..476c53cf4 100644 --- a/ports/boost-exception/CONTROL +++ b/ports/boost-exception/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-exception Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-smart-ptr, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-smart-ptr, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost exception module diff --git a/ports/boost-fiber/CONTROL b/ports/boost-fiber/CONTROL index 776d929a3..b02c94a3b 100644 --- a/ports/boost-fiber/CONTROL +++ b/ports/boost-fiber/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-fiber Version: 1.66.0 -Build-Depends: boost-algorithm, boost-assert, boost-build, boost-config, boost-context (windows), boost-core, boost-detail, boost-filesystem (windows), boost-format, boost-intrusive, boost-predef, boost-smart-ptr, boost-vcpkg-helpers +Build-Depends: boost-algorithm, boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-context (windows), boost-core, boost-detail, boost-filesystem (windows), boost-format, boost-intrusive, boost-predef, boost-smart-ptr, boost-vcpkg-helpers Description: Boost fiber module diff --git a/ports/boost-filesystem/CONTROL b/ports/boost-filesystem/CONTROL index afa6d0e45..4717d608b 100644 --- a/ports/boost-filesystem/CONTROL +++ b/ports/boost-filesystem/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-filesystem Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-functional, boost-integer, boost-io, boost-iterator, boost-range, boost-smart-ptr, boost-static-assert, boost-system, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-detail, boost-functional, boost-integer, boost-io, boost-iterator, boost-range, boost-smart-ptr, boost-static-assert, boost-system, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost filesystem module diff --git a/ports/boost-graph-parallel/CONTROL b/ports/boost-graph-parallel/CONTROL index ba7cf38d2..3f1e8e1ed 100644 --- a/ports/boost-graph-parallel/CONTROL +++ b/ports/boost-graph-parallel/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-graph-parallel Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-detail, boost-dynamic-bitset, boost-function, boost-functional, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-detail, boost-dynamic-bitset, boost-function, boost-functional, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost graph_parallel module diff --git a/ports/boost-graph/CONTROL b/ports/boost-graph/CONTROL index dc81d1a85..12d74bc1e 100644 --- a/ports/boost-graph/CONTROL +++ b/ports/boost-graph/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-graph Version: 1.66.0 -Build-Depends: boost-algorithm, boost-any, boost-array, boost-assert, boost-bimap, boost-bind, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-functional, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-preprocessor, boost-property-map, boost-property-tree, boost-random, boost-range, boost-regex, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-test (windows), boost-throw-exception, boost-tti, boost-tuple, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers, boost-xpressive +Build-Depends: boost-algorithm, boost-any, boost-array, boost-assert, boost-bimap, boost-bind, boost-build, boost-modular-build-helper, boost-compatibility, boost-concept-check, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-functional, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-preprocessor, boost-property-map, boost-property-tree, boost-random, boost-range, boost-regex, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-test (windows), boost-throw-exception, boost-tti, boost-tuple, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers, boost-xpressive Description: Boost graph module diff --git a/ports/boost-iostreams/CONTROL b/ports/boost-iostreams/CONTROL index 57301cb18..d48fdfd24 100644 --- a/ports/boost-iostreams/CONTROL +++ b/ports/boost-iostreams/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-iostreams Version: 1.66.0 -Build-Depends: boost-assert, boost-bind, boost-build, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, zlib +Build-Depends: boost-assert, boost-bind, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, zlib Description: Boost iostreams module diff --git a/ports/boost-locale/CONTROL b/ports/boost-locale/CONTROL index 884c737b4..0a37505b1 100644 --- a/ports/boost-locale/CONTROL +++ b/ports/boost-locale/CONTROL @@ -1,7 +1,7 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-locale Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-function, boost-integer, boost-iterator, boost-smart-ptr, boost-static-assert, boost-thread (windows), boost-type-traits, boost-unordered, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-function, boost-integer, boost-iterator, boost-smart-ptr, boost-static-assert, boost-thread (windows), boost-type-traits, boost-unordered, boost-vcpkg-helpers Description: Boost locale module Feature: icu diff --git a/ports/boost-log/CONTROL b/ports/boost-log/CONTROL index 912f771d0..e8ac68f44 100644 --- a/ports/boost-log/CONTROL +++ b/ports/boost-log/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-log Version: 1.66.0 -Build-Depends: boost-align, boost-array, boost-asio, boost-assert, boost-atomic, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-date-time, boost-detail, boost-exception, boost-filesystem (windows), boost-function-types, boost-fusion, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iterator, boost-lexical-cast, boost-locale (windows), boost-math, boost-move, boost-mpl, boost-optional, boost-parameter, boost-phoenix, boost-predef, boost-preprocessor, boost-property-tree, boost-proto, boost-random, boost-range, boost-regex, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-thread (windows), boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi, boost-xpressive +Build-Depends: boost-align, boost-array, boost-asio, boost-assert, boost-atomic, boost-bind, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-date-time, boost-detail, boost-exception, boost-filesystem (windows), boost-function-types, boost-fusion, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iterator, boost-lexical-cast, boost-locale (windows), boost-math, boost-move, boost-mpl, boost-optional, boost-parameter, boost-phoenix, boost-predef, boost-preprocessor, boost-property-tree, boost-proto, boost-random, boost-range, boost-regex, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-thread (windows), boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi, boost-xpressive Description: Boost log module diff --git a/ports/boost-math/CONTROL b/ports/boost-math/CONTROL index 8343ab985..33b230a22 100644 --- a/ports/boost-math/CONTROL +++ b/ports/boost-math/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-math Version: 1.66.0 -Build-Depends: boost-array, boost-assert, boost-atomic, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-integer, boost-lambda, boost-lexical-cast, boost-mpl, boost-predef, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-array, boost-assert, boost-atomic, boost-build, boost-modular-build-helper, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-integer, boost-lambda, boost-lexical-cast, boost-mpl, boost-predef, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost math module diff --git a/ports/boost-modular-build-helper/CMakeLists.txt b/ports/boost-modular-build-helper/CMakeLists.txt new file mode 100644 index 000000000..20306e7ed --- /dev/null +++ b/ports/boost-modular-build-helper/CMakeLists.txt @@ -0,0 +1,120 @@ +cmake_minimum_required(VERSION 3.9) +project(boost CXX) + +find_path(ZLIB_INCLUDE zlib.h) +find_path(BZIP2_INCLUDE bzlib.h) +find_path(ICU_PATH include/unicode/utf.h) + +set(VCPKG_PLATFORM_TOOLSET external) + +set(B2_OPTIONS) + +# Add build type specific options +if(BUILD_SHARED_LIBS) + list(APPEND B2_OPTIONS runtime-link=shared) + set(LIB_RUNTIME_LINK "shared") +else() + list(APPEND B2_OPTIONS runtime-link=static) + set(LIB_RUNTIME_LINK "static") +endif() + +if(BUILD_SHARED_LIBS) + list(APPEND B2_OPTIONS link=shared) +else() + list(APPEND B2_OPTIONS link=static) +endif() + +if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64") + list(APPEND B2_OPTIONS address-model=64) +endif() + +list(APPEND B2_OPTIONS target-os=linux toolset=gcc) + +string(REPLACE " " " " CXXFLAGS "${CMAKE_CXX_FLAGS}") +#set(CXXFLAGS "${CXXFLAGS} -Wno-error=unused-command-line-argument") +if(CMAKE_CXX_COMPILER_TARGET) + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_TARGET} ${CMAKE_CXX_COMPILER_TARGET}") +endif() +if(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN) + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} ${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") +endif() +if(CMAKE_SYSROOT AND CMAKE_CXX_COMPILE_OPTIONS_SYSROOT) + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}") +endif() +foreach(INCDIR ${CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES}) + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_INCLUDE_FLAG_C}${CMAKE_INCLUDE_FLAG_C_SEP}${INCDIR}") +endforeach() + +find_library(ZLIB_LIBPATH z) +list(APPEND B2_OPTIONS + -sZLIB_BINARY=z + -sZLIB_LIBPATH="${ZLIB_LIBPATH}" +) +if(CMAKE_BUILD_TYPE STREQUAL "Release") + find_library(BZIP2_LIBPATH bz2) + list(APPEND B2_OPTIONS + -sBZIP2_BINARY=bz2 + -sBZIP2_LIBPATH="${BZIP2_LIBPATH}" + variant=release + ) +elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") + find_library(BZIP2_LIBPATH bz2d) + list(APPEND B2_OPTIONS + -sBZIP2_BINARY=bz2d + -sBZIP2_LIBPATH="${BZIP2_LIBPATH}" + variant=debug + ) +endif() + +configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam ${CMAKE_CURRENT_BINARY_DIR}/user-config.jam @ONLY) + +set(NUMBER_OF_PROCESSORS 1) +if(DEFINED ENV{NUMBER_OF_PROCESSORS}) + set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS}) +elseif(CMAKE_HOST_LINUX) + execute_process( + COMMAND nproc + OUTPUT_VARIABLE NUMBER_OF_PROCESSORS + ) + string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") + string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") +endif() +if(NOT NUMBER_OF_PROCESSORS) + set(NUMBER_OF_PROCESSORS 1) +endif() + +add_custom_target(boost ALL + COMMAND "${B2_EXE}" + --user-config=${CMAKE_CURRENT_BINARY_DIR}/user-config.jam + --stagedir=${CMAKE_CURRENT_BINARY_DIR}/stage + --build-dir=${CMAKE_CURRENT_BINARY_DIR} + ${B2_OPTIONS} + --layout=system + --with-atomic + --with-random + --with-date_time + --with-filesystem + --with-system + --with-thread + --with-chrono + -sZLIB_INCLUDE="${ZLIB_INCLUDE}" + -sBZIP2_INCLUDE="${BZIP2_INCLUDE}" + -sICU_PATH="${ICU_PATH}" + -j${NUMBER_OF_PROCESSORS} + -sBOOST_ROOT=${BOOST_BUILD_PATH} + -sBOOST_BUILD_PATH=${BOOST_BUILD_PATH} + --debug-configuration + --ignore-site-config + --hash + -q + + architecture=x86 + threading=multi + threadapi=pthread + debug-symbols=on + WORKING_DIRECTORY ${SOURCE_PATH} +) + +install( + CODE "file(GLOB LIBS ${CMAKE_CURRENT_BINARY_DIR}/boost/build/*/*.a)\nif(LIBS)\nfile(INSTALL \${LIBS} DESTINATION \"\${CMAKE_INSTALL_PREFIX}/lib\")\nendif()" +) diff --git a/ports/boost-modular-build-helper/CONTROL b/ports/boost-modular-build-helper/CONTROL new file mode 100644 index 000000000..eb2257a01 --- /dev/null +++ b/ports/boost-modular-build-helper/CONTROL @@ -0,0 +1,2 @@ +Source: boost-modular-build-helper +Version: 1 diff --git a/ports/boost-modular-build-helper/Jamroot.jam b/ports/boost-modular-build-helper/Jamroot.jam new file mode 100644 index 000000000..e498483c3 --- /dev/null +++ b/ports/boost-modular-build-helper/Jamroot.jam @@ -0,0 +1,150 @@ +constant BOOST_VERSION : 1.66.0 ; +constant BOOST_VERSION_ABI_TAG : 1_66 ; +constant BOOST_JAMROOT_MODULE : $(__name__) ; + +import boostcpp ; +import feature ; + +boostcpp.set-version $(BOOST_VERSION) ; + +project boost : requirements + include&&"@CURRENT_INSTALLED_DIR@/include" + BOOST_ALL_NO_LIB=1 + @$(__name__).tag + @REQUIREMENTS@ + ; + +rule boost-install ( libraries * ) +{ + stagedir = [ option.get stagedir ] ; + install stage + : $(libraries) + : $(stagedir)/lib ; +} + +rule tag ( name : type ? : property-set ) +{ + return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ; +} + +rule python-tag ( name : type ? : property-set ) +{ + return [ tag $(name) : $(type) : $(property-set) ] ; +} + +if "@PORT@" != "boost-system" +{ + use-project /boost/system : . ; + + lib boost_system : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_system@BOOST_LIB_RELEASE_SUFFIX@" release ; + lib boost_system : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_system@BOOST_LIB_DEBUG_SUFFIX@" debug ; + explicit boost_system ; +} + +if "@PORT@" != "boost-chrono" +{ + use-project /boost/chrono : . ; + + lib boost_chrono : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_chrono@BOOST_LIB_RELEASE_SUFFIX@" release ; + lib boost_chrono : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_chrono@BOOST_LIB_DEBUG_SUFFIX@" debug ; + explicit boost_chrono ; +} + +if "@PORT@" != "boost-regex" +{ + use-project /boost/regex : . ; + + lib boost_regex : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_regex@BOOST_LIB_RELEASE_SUFFIX@" release ; + lib boost_regex : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_regex@BOOST_LIB_DEBUG_SUFFIX@" debug ; + explicit boost_regex ; +} + +if "@PORT@" != "boost-date-time" +{ + use-project /boost/date_time : . ; + + lib boost_date_time : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_date_time@BOOST_LIB_RELEASE_SUFFIX@" release -/boost/date_time//boost_date_time ; + lib boost_date_time : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_date_time@BOOST_LIB_DEBUG_SUFFIX@" debug -/boost/date_time//boost_date_time ; + explicit boost_date_time ; +} + +if "@PORT@" != "boost-thread" +{ + use-project /boost/thread : . ; + + lib boost_thread : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_thread@BOOST_LIB_RELEASE_SUFFIX@" release : : /boost/date_time//boost_date_time ; + lib boost_thread : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_thread@BOOST_LIB_DEBUG_SUFFIX@" debug : : /boost/date_time//boost_date_time ; + explicit boost_thread ; +} + +if "@PORT@" != "boost-timer" +{ + use-project /boost/timer : . ; + + lib boost_timer : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_timer@BOOST_LIB_RELEASE_SUFFIX@" release ; + lib boost_timer : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_timer@BOOST_LIB_DEBUG_SUFFIX@" debug ; + explicit boost_timer ; +} + +if "@PORT@" != "boost-filesystem" +{ + use-project /boost/filesystem : . ; + + lib boost_filesystem : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_filesystem@BOOST_LIB_RELEASE_SUFFIX@" release : : /boost/system//boost_system ; + lib boost_filesystem : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_filesystem@BOOST_LIB_DEBUG_SUFFIX@" debug : : /boost/system//boost_system ; + explicit boost_filesystem ; +} + +if "@PORT@" != "boost-atomic" +{ + use-project /boost/atomic : . ; + + lib boost_atomic : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_atomic@BOOST_LIB_RELEASE_SUFFIX@" release ; + lib boost_atomic : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_atomic@BOOST_LIB_DEBUG_SUFFIX@" debug ; + explicit boost_atomic ; +} + +if "@PORT@" != "boost-context" +{ + feature.feature segmented-stacks : on : optional propagated composite ; + feature.compose on : BOOST_USE_SEGMENTED_STACKS ; + + use-project /boost/context : . ; + + lib boost_context : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_context@BOOST_LIB_RELEASE_SUFFIX@" release ; + lib boost_context : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_context@BOOST_LIB_DEBUG_SUFFIX@" debug ; + explicit boost_context ; +} + +if "@PORT@" != "boost-test" +{ + use-project /boost/test : . ; + + lib boost_unit_test_framework : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_unit_test_framework@BOOST_LIB_RELEASE_SUFFIX@" release ; + lib boost_unit_test_framework : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_unit_test_framework@BOOST_LIB_DEBUG_SUFFIX@" debug ; + explicit boost_unit_test_framework ; +} + +if "@PORT@" != "boost-serialization" +{ + use-project /boost/serialization : . ; + + lib boost_serialization : : @CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_serialization@BOOST_LIB_RELEASE_SUFFIX@ release ; + lib boost_serialization : : @CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_serialization@BOOST_LIB_DEBUG_SUFFIX@ debug ; + explicit boost_serialization ; +} + +rule requires ( foo * ) +{ +} + +rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * ) +{ + name = boost_$(name) ; + lib $(name) : $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ; + boost-install $(name) ; +} + +use-project /boost/@PORT@ : build ; + +build-project build ; diff --git a/ports/boost-modular-build-helper/boost-modular-build.cmake b/ports/boost-modular-build-helper/boost-modular-build.cmake new file mode 100644 index 000000000..557e089dd --- /dev/null +++ b/ports/boost-modular-build-helper/boost-modular-build.cmake @@ -0,0 +1,329 @@ +function(boost_modular_build) + cmake_parse_arguments(_bm "" "SOURCE_PATH;REQUIREMENTS" "OPTIONS" ${ARGN}) + + if(NOT DEFINED _bm_SOURCE_PATH) + message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_build.") + endif() + + # Todo: this serves too similar a purpose as vcpkg_find_acquire_program() + if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE) + elseif(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE) + else() + set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/tools/boost-build") + endif() + + if(NOT EXISTS "${BOOST_BUILD_PATH}") + message(FATAL_ERROR "The x86 boost-build tools must be installed to build for non-x86/x64 platforms. Please run `vcpkg install boost-build:x86-windows`.") + endif() + + if(EXISTS "${BOOST_BUILD_PATH}/b2.exe") + set(B2_EXE "${BOOST_BUILD_PATH}/b2.exe") + elseif(EXISTS "${BOOST_BUILD_PATH}/b2") + set(B2_EXE "${BOOST_BUILD_PATH}/b2") + else() + message(FATAL_ERROR "Could not find b2 in ${BOOST_BUILD_PATH}") + endif() + + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + list(APPEND _bm_OPTIONS windows-api=store) + endif() + + set(_bm_DIR ${CURRENT_INSTALLED_DIR}/share/boost-build) + + if(EXISTS "${_bm_SOURCE_PATH}/Jamfile.v2") + file(REMOVE_RECURSE "${_bm_SOURCE_PATH}/Jamfile.v2") + endif() + + set(REQUIREMENTS ${_bm_REQUIREMENTS}) + + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(BOOST_LIB_PREFIX) + set(BOOST_LIB_RELEASE_SUFFIX -vc140-mt.lib) + set(BOOST_LIB_DEBUG_SUFFIX -vc140-mt-gd.lib) + else() + set(BOOST_LIB_PREFIX lib) + set(BOOST_LIB_RELEASE_SUFFIX .a) + set(BOOST_LIB_DEBUG_SUFFIX .a) + endif() + + # boost thread superfluously builds has_atomic_flag_lockfree on windows. + if(EXISTS "${_bm_SOURCE_PATH}/build/Jamfile.v2") + file(READ ${_bm_SOURCE_PATH}/build/Jamfile.v2 _contents) + string(REPLACE + "\n\nexe has_atomic_flag_lockfree" + "\n\nexplicit has_atomic_flag_lockfree ;\nexe has_atomic_flag_lockfree" + _contents + "${_contents}" + ) + string(REPLACE "\nimport ../../config/checks/config : requires ;" "\n# import ../../config/checks/config : requires ;" _contents "${_contents}") + string(REGEX REPLACE + "\.\./\.\./([^/ ]+)/build//(boost_[^/ ]+)" + "/boost/\\1//\\2" + _contents + "${_contents}" + ) + string(REGEX REPLACE " /boost//([^/ ]+)" " /boost/\\1//boost_\\1" _contents "${_contents}") + file(WRITE ${_bm_SOURCE_PATH}/build/Jamfile.v2 "${_contents}") + endif() + + if(EXISTS "${_bm_SOURCE_PATH}/build/log-architecture.jam") + file(READ ${_bm_SOURCE_PATH}/build/log-architecture.jam _contents) + string(REPLACE + "\nproject.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" + "\n# project.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" + _contents "${_contents}") + file(WRITE ${_bm_SOURCE_PATH}/build/log-architecture.jam "${_contents}") + endif() + + configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) + + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + vcpkg_configure_cmake( + SOURCE_PATH ${CURRENT_INSTALLED_DIR}/share/boost-build + PREFER_NINJA + OPTIONS + "-DB2_EXE=${B2_EXE}" + "-DSOURCE_PATH=${_bm_SOURCE_PATH}" + "-DBOOST_BUILD_PATH=${BOOST_BUILD_PATH}" + ) + vcpkg_install_cmake() + return() + endif() + + ##################### + # Cleanup previous builds + ###################### + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + # It is possible for a file in this folder to be locked due to antivirus or vctip + execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\n Files are likely in use.") + endif() + endif() + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + # It is possible for a file in this folder to be locked due to antivirus or vctip + execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg\n Files are likely in use.") + endif() + endif() + + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug) + message(FATAL_ERROR "Error: directory exists: ${CURRENT_PACKAGES_DIR}/debug\n The previous package was not fully cleared. This is an internal error.") + endif() + file(MAKE_DIRECTORY + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + ) + + if(DEFINED ENV{NUMBER_OF_PROCESSORS}) + set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS}) + else() + execute_process( + COMMAND nproc + OUTPUT_VARIABLE NUMBER_OF_PROCESSORS + ) + string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") + string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") + endif() + + ###################### + # Generate configuration + ###################### + list(APPEND _bm_OPTIONS + -j${NUMBER_OF_PROCESSORS} + --debug-configuration + --debug-building + --debug-generators + --disable-icu + --ignore-site-config + --hash + -q + -sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}/include" + -sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}/include" + threading=multi + ) + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + list(APPEND _bm_OPTIONS threadapi=win32) + else() + list(APPEND _bm_OPTIONS threadapi=pthread) + endif() + set(_bm_OPTIONS_DBG + -sZLIB_BINARY=zlibd + -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}/debug/lib" + -sBZIP2_BINARY=bz2d + -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}/debug/lib" + ) + + set(_bm_OPTIONS_REL + -sZLIB_BINARY=zlib + -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}/lib" + -sBZIP2_BINARY=bz2 + -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}/lib" + ) + + + # Add build type specific options + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + list(APPEND _bm_OPTIONS runtime-link=shared) + else() + list(APPEND _bm_OPTIONS runtime-link=static) + endif() + + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND _bm_OPTIONS link=shared) + else() + list(APPEND _bm_OPTIONS link=static) + endif() + + if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + list(APPEND _bm_OPTIONS address-model=64 architecture=x86) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + list(APPEND _bm_OPTIONS address-model=32 architecture=arm) + else() + list(APPEND _bm_OPTIONS address-model=32 architecture=x86) + endif() + + file(TO_CMAKE_PATH "${_bm_DIR}/nothing.bat" NOTHING_BAT) + set(TOOLSET_OPTIONS " /EHsc -Zm800 -nologo") + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + find_path(PATH_TO_CL cl.exe) + find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "${PATH_TO_CL}/../../../lib/x86/store/references" NO_DEFAULT_PATH) + if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") + message(FATAL_ERROR "Could not find `platform.winmd` in VS2017. Do you have the Universal Windows Platform development workload installed?") + endif() + else() + find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "$ENV{VS140COMNTOOLS}/../../VC/LIB/store/references") + if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") + message(FATAL_ERROR "Could not find `platform.winmd` in VS2015.") + endif() + endif() + file(TO_NATIVE_PATH "${PLATFORM_WINMD_DIR}" PLATFORM_WINMD_DIR) + string(REPLACE "\\" "\\\\" PLATFORM_WINMD_DIR ${PLATFORM_WINMD_DIR}) # escape backslashes + + set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -Zl \"/AI\"${PLATFORM_WINMD_DIR}\"\" WindowsApp.lib /ZW -DVirtualAlloc=VirtualAllocFromApp -D_WIN32_WINNT=0x0A00") + else() + set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -D_WIN32_WINNT=0x0602") + endif() + + configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) + configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) + + if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + list(APPEND _bm_OPTIONS toolset=msvc-14.1) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") + list(APPEND _bm_OPTIONS toolset=msvc-14.0) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "external") + list(APPEND _bm_OPTIONS toolset=gcc) + else() + message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'") + endif() + + ###################### + # Perform build + Package + ###################### + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${TARGET_TRIPLET}-rel") + set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") + vcpkg_execute_required_process( + COMMAND "${B2_EXE}" + --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage + --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam + ${_bm_OPTIONS} + ${_bm_OPTIONS_REL} + variant=release + debug-symbols=on + WORKING_DIRECTORY ${_bm_SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") + vcpkg_execute_required_process( + COMMAND "${B2_EXE}" + --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage + --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam + ${_bm_OPTIONS} + ${_bm_OPTIONS_DBG} + variant=debug + WORKING_DIRECTORY ${_bm_SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Packaging ${TARGET_TRIPLET}-rel") + file(GLOB REL_LIBS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.lib + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.a + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.so + ) + file(COPY ${REL_LIBS} + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.dll) + file(COPY ${REL_DLLS} + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + FILES_MATCHING PATTERN "*.dll") + endif() + message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") + file(GLOB DBG_LIBS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.lib + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.a + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.so + ) + file(COPY ${DBG_LIBS} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.dll) + file(COPY ${DBG_DLLS} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + FILES_MATCHING PATTERN "*.dll") + endif() + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") + endif() + + file(GLOB INSTALLED_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*.lib ${CURRENT_PACKAGES_DIR}/lib/*.lib) + foreach(LIB ${INSTALLED_LIBS}) + get_filename_component(OLD_FILENAME ${LIB} NAME) + get_filename_component(DIRECTORY_OF_LIB_FILE ${LIB} DIRECTORY) + string(REPLACE "libboost_" "boost_" NEW_FILENAME ${OLD_FILENAME}) + string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs + string(REPLACE "-vc141-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2017 and VS2015 binaries + string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs + string(REPLACE "-sgyd-" "-gyd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs + string(REPLACE "-x32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-x64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-a32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-a64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-1_66" "" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake > 3.10 to locate the binaries + string(REPLACE "_python3-" "_python-" NEW_FILENAME ${NEW_FILENAME}) + if("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}") + # nothing to do + elseif(EXISTS ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) + file(REMOVE ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}) + else() + file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) + endif() + endforeach() + + vcpkg_copy_pdbs() +endfunction() diff --git a/ports/boost-modular-build-helper/nothing.bat b/ports/boost-modular-build-helper/nothing.bat new file mode 100644 index 000000000..e69de29bb diff --git a/ports/boost-modular-build-helper/portfile.cmake b/ports/boost-modular-build-helper/portfile.cmake new file mode 100644 index 000000000..1c34f2fec --- /dev/null +++ b/ports/boost-modular-build-helper/portfile.cmake @@ -0,0 +1,11 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +file( + COPY + ${CMAKE_CURRENT_LIST_DIR}/boost-modular-build.cmake + ${CMAKE_CURRENT_LIST_DIR}/Jamroot.jam + ${CMAKE_CURRENT_LIST_DIR}/nothing.bat + ${CMAKE_CURRENT_LIST_DIR}/user-config.jam + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build +) diff --git a/ports/boost-modular-build-helper/user-config.jam b/ports/boost-modular-build-helper/user-config.jam new file mode 100644 index 000000000..e045d622b --- /dev/null +++ b/ports/boost-modular-build-helper/user-config.jam @@ -0,0 +1,47 @@ +import toolset ; + +if "@VCPKG_PLATFORM_TOOLSET@" != "external" +{ + using msvc : : cl.exe : + "@NOTHING_BAT@" + @TOOLSET_OPTIONS@ + ; +} +else +{ + using gcc : 5.4.1 : @CMAKE_CXX_COMPILER@ + : + @CMAKE_RANLIB@ + @CMAKE_AR@ + @CXXFLAGS@ + # MINGW here causes b2 to not run cygpath + mingw + ; +} + +if "@PORT@" = "boost-python" +{ + using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_RELEASE@" ; + using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_DEBUG@" : on ; +} + +if "@PORT@" = "boost-mpi" +{ + using mpi : : + @CURRENT_INSTALLED_DIR@/lib + @CURRENT_INSTALLED_DIR@/include + msmpi ; +} + +project user-config : ; + +lib advapi32 ; + +lib icuuc : : "@CURRENT_INSTALLED_DIR@/lib/icuuc.lib" release : : advapi32 ; +lib icuuc : : "@CURRENT_INSTALLED_DIR@/debug/lib/icuucd.lib" debug : : advapi32 ; + +lib icuin : : "@CURRENT_INSTALLED_DIR@/lib/icuin.lib" release : : ; +lib icuin : : "@CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib" debug : : ; + +lib icudt : : "@CURRENT_INSTALLED_DIR@/lib/icudt.lib" release : : ; +lib icudt : : "@CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib" debug : : ; diff --git a/ports/boost-mpi/CONTROL b/ports/boost-mpi/CONTROL index 7d17fedec..30ce81a1d 100644 --- a/ports/boost-mpi/CONTROL +++ b/ports/boost-mpi/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-mpi Version: 1.66.0-1 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, msmpi +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, msmpi Description: Boost mpi module diff --git a/ports/boost-program-options/CONTROL b/ports/boost-program-options/CONTROL index 3a1ff727e..b43937e55 100644 --- a/ports/boost-program-options/CONTROL +++ b/ports/boost-program-options/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-program-options Version: 1.66.0 -Build-Depends: boost-any, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-lexical-cast, boost-math, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-vcpkg-helpers +Build-Depends: boost-any, boost-bind, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-lexical-cast, boost-math, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-vcpkg-helpers Description: Boost program_options module diff --git a/ports/boost-random/CONTROL b/ports/boost-random/CONTROL index fee15c891..1efeeaafa 100644 --- a/ports/boost-random/CONTROL +++ b/ports/boost-random/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-random Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-math, boost-mpl, boost-range, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-math, boost-mpl, boost-range, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost random module diff --git a/ports/boost-regex/CONTROL b/ports/boost-regex/CONTROL index 24e5014d4..efd3e7f7e 100644 --- a/ports/boost-regex/CONTROL +++ b/ports/boost-regex/CONTROL @@ -1,7 +1,7 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-regex Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-iterator, boost-mpl, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-iterator, boost-mpl, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost regex module Feature: icu diff --git a/ports/boost-serialization/CONTROL b/ports/boost-serialization/CONTROL index 146c618bd..ae97a8c30 100644 --- a/ports/boost-serialization/CONTROL +++ b/ports/boost-serialization/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-serialization Version: 1.66.0 -Build-Depends: boost-array, boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-io, boost-iterator, boost-move, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-spirit, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers +Build-Depends: boost-array, boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-io, boost-iterator, boost-move, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-spirit, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost serialization module diff --git a/ports/boost-signals/CONTROL b/ports/boost-signals/CONTROL index e612f3415..160f73c51 100644 --- a/ports/boost-signals/CONTROL +++ b/ports/boost-signals/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-signals Version: 1.66.0 -Build-Depends: boost-any, boost-build, boost-config, boost-core, boost-function, boost-iterator, boost-optional, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-any, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-function, boost-iterator, boost-optional, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost signals module diff --git a/ports/boost-stacktrace/CONTROL b/ports/boost-stacktrace/CONTROL index b6c11e8f3..9979ef4e1 100644 --- a/ports/boost-stacktrace/CONTROL +++ b/ports/boost-stacktrace/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-stacktrace Version: 1.66.0 -Build-Depends: boost-array, boost-build, boost-config, boost-core, boost-lexical-cast, boost-math, boost-static-assert, boost-type-traits, boost-vcpkg-helpers, boost-winapi +Build-Depends: boost-array, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-lexical-cast, boost-math, boost-static-assert, boost-type-traits, boost-vcpkg-helpers, boost-winapi Description: Boost stacktrace module diff --git a/ports/boost-system/CONTROL b/ports/boost-system/CONTROL index 92d43608f..953782bfb 100644 --- a/ports/boost-system/CONTROL +++ b/ports/boost-system/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-system Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-integer, boost-predef, boost-utility, boost-vcpkg-helpers, boost-winapi +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-integer, boost-predef, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost system module diff --git a/ports/boost-test/CONTROL b/ports/boost-test/CONTROL index 52dac99e2..95b0d8fe9 100644 --- a/ports/boost-test/CONTROL +++ b/ports/boost-test/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-test Version: 1.66.0-2 -Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-io, boost-iterator, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-range, boost-smart-ptr, boost-static-assert, boost-timer, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-io, boost-iterator, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-range, boost-smart-ptr, boost-static-assert, boost-timer, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost test module diff --git a/ports/boost-thread/CONTROL b/ports/boost-thread/CONTROL index 772f1a450..33bc787a1 100644 --- a/ports/boost-thread/CONTROL +++ b/ports/boost-thread/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-thread Version: 1.66.0 -Build-Depends: boost-algorithm, boost-assert, boost-atomic, boost-bind, boost-build, boost-chrono, boost-concept-check, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-function, boost-functional, boost-integer, boost-intrusive, boost-io, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Build-Depends: boost-algorithm, boost-assert, boost-atomic, boost-bind, boost-build, boost-modular-build-helper, boost-chrono, boost-concept-check, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-function, boost-functional, boost-integer, boost-intrusive, boost-io, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost thread module diff --git a/ports/boost-timer/CONTROL b/ports/boost-timer/CONTROL index be8b0c18a..b24137fbb 100644 --- a/ports/boost-timer/CONTROL +++ b/ports/boost-timer/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-timer Version: 1.66.0 -Build-Depends: boost-build, boost-chrono, boost-compatibility, boost-config, boost-core, boost-integer, boost-io, boost-system, boost-throw-exception, boost-vcpkg-helpers +Build-Depends: boost-build, boost-modular-build-helper, boost-chrono, boost-compatibility, boost-config, boost-core, boost-integer, boost-io, boost-system, boost-throw-exception, boost-vcpkg-helpers Description: Boost timer module diff --git a/ports/boost-type-erasure/CONTROL b/ports/boost-type-erasure/CONTROL index 79a8697a3..786acf596 100644 --- a/ports/boost-type-erasure/CONTROL +++ b/ports/boost-type-erasure/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-type-erasure Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-fusion, boost-iterator, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread (windows), boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-detail, boost-fusion, boost-iterator, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread (windows), boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost type_erasure module diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index 8b79826e2..55fa476f4 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -322,7 +322,7 @@ foreach ($library in $libraries) $needsBuild = $false if ((Test-Path $unpacked/build/Jamfile.v2) -and $library -ne "metaparse") { - $deps += @("boost-build") + $deps += @("boost-build", "boost-modular-build-helper") $needsBuild = $true } diff --git a/ports/boost-wave/CONTROL b/ports/boost-wave/CONTROL index 99aa3d8be..4fffc2e71 100644 --- a/ports/boost-wave/CONTROL +++ b/ports/boost-wave/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-wave Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-concept-check, boost-config, boost-core, boost-detail, boost-filesystem (windows), boost-integer, boost-iterator, boost-mpl, boost-multi-index, boost-pool, boost-preprocessor, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-concept-check, boost-config, boost-core, boost-detail, boost-filesystem (windows), boost-integer, boost-iterator, boost-mpl, boost-multi-index, boost-pool, boost-preprocessor, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost wave module -- cgit v1.2.3 From 7aaa59fc9d7b814fc6cabd369e9f148f381ffe59 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 11 Mar 2018 23:03:18 -0700 Subject: [vcpkg] Fix extracting on Windows Server Core. Related to #2518. --- scripts/VcpkgPowershellUtils.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 2dbf04085..73a3fc9ad 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -172,10 +172,6 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, vcpkgRemoveItem $destinationPartial vcpkgCreateDirectoryIfNotExists $destinationPartial - $shell = new-object -com shell.application - $zip = $shell.NameSpace($(Get-Item $file).fullname) - $itemCount = $zip.Items().Count - if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') { Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") @@ -189,6 +185,8 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, else { Write-Verbose("Extracting via shell") + $shell = new-object -com shell.application + $zip = $shell.NameSpace($(Get-Item $file).fullname) foreach($item in $zip.items()) { # Piping to Out-Null is used to block until finished @@ -196,6 +194,8 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, } } + $itemCount = @(Get-ChildItem "$destinationPartial").Count + if ($itemCount -eq 1) { Move-Item -Path "$destinationPartial\*" -Destination $output -- cgit v1.2.3 From 4338ae25a1ac1f81499d12f0c5e4acef5fa1e426 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 11 Mar 2018 23:04:09 -0700 Subject: [vcpkg] Enable packages to provide cmake wrapper scripts. --- scripts/buildsystems/vcpkg.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index e621da861..1d1977e6a 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -184,7 +184,11 @@ function(add_library name) endfunction() macro(find_package name) - if("${name}" STREQUAL "Boost") + string(TOLOWER "${name}" _vcpkg_lowercase_name) + if(EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake") + set(ARGS "${ARGV}") + include(${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake) + elseif("${name}" STREQUAL "Boost") set(_Boost_USE_STATIC_LIBS ${Boost_USE_STATIC_LIBS}) set(_Boost_USE_MULTITHREADED ${Boost_USE_MULTITHREADED}) set(_Boost_USE_STATIC_RUNTIME ${Boost_USE_STATIC_RUNTIME}) -- cgit v1.2.3 From 6d748257418551dbf24ad0cec9b7e5591ccc3e4d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 11 Mar 2018 23:04:52 -0700 Subject: [vcpkg-fixup-cmake-targets] Remove stray absolute references inside top-level cmake files. --- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 4bd4d135f..7f1f827c2 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -158,4 +158,13 @@ function(vcpkg_fixup_cmake_targets) if(NOT REMAINING_FILES) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) endif() + + # Patch out any remaining absolute references + file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" CMAKE_CURRENT_PACKAGES_DIR) + file(GLOB CMAKE_FILES ${RELEASE_SHARE}/*.cmake) + foreach(CMAKE_FILE IN LISTS CMAKE_FILES) + file(READ ${CMAKE_FILE} _contents) + string(REPLACE "${CMAKE_CURRENT_PACKAGES_DIR}" "\${CMAKE_CURRENT_LIST_DIR}/../.." _contents "${_contents}") + file(WRITE ${CMAKE_FILE} "${_contents}") + endforeach() endfunction() -- cgit v1.2.3 From ece289b9a6466dca885fd2555ed783d70dcad9bf Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 11 Mar 2018 23:05:28 -0700 Subject: [vcpkg] Don't set CMAKE_CROSSCOMPILING when targetting Linux-on-Linux --- scripts/toolchains/linux.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/toolchains/linux.cmake b/scripts/toolchains/linux.cmake index 80983b500..d09d374c8 100644 --- a/scripts/toolchains/linux.cmake +++ b/scripts/toolchains/linux.cmake @@ -1,3 +1,6 @@ cmake_minimum_required(VERSION 3.5) +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") +endif() set(CMAKE_SYSTEM_NAME Linux CACHE STRING "") -- cgit v1.2.3 From 9f9778ccff48981a691bf34f30ecc4bf2efd5ac1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 11 Mar 2018 23:41:51 -0700 Subject: [many ports] Improve behavior on Linux and general cleanup --- ports/avro-c/CONTROL | 2 +- ports/avro-c/portfile.cmake | 5 +- ports/butteraugli/CMakeLists.txt | 8 +- ports/capstone/portfile.cmake | 2 +- ports/console-bridge/CONTROL | 2 +- ports/console-bridge/License.txt | 31 -------- ports/console-bridge/portfile.cmake | 27 ++++++- ports/console-bridge/static-macro.patch | 15 ++++ ports/cppunit/portfile.cmake | 12 --- ports/curl/CONTROL | 2 +- ports/curl/portfile.cmake | 6 ++ ports/dirent/portfile.cmake | 5 ++ ports/double-conversion/portfile.cmake | 46 ++++++----- ports/exiv2/portfile.cmake | 8 +- ports/expat/portfile.cmake | 4 +- ports/freetype/CONTROL | 2 +- ports/freetype/portfile.cmake | 5 +- ports/freetype/vcpkg-cmake-wrapper.cmake | 10 +++ ports/gettext/portfile.cmake | 11 +-- ports/gflags/portfile.cmake | 4 + ports/jansson/CONTROL | 2 +- ports/jansson/portfile.cmake | 16 ++-- ports/jasper/opengl-not-required.patch | 14 ++++ ports/jasper/portfile.cmake | 1 + ports/leptonica/CONTROL | 2 +- ports/libcds/lib-suffix-option.patch | 13 ++++ ports/libcds/portfile.cmake | 5 +- ports/libiconv/CMakeLists.txt | 25 ++++-- ports/libiconv/CONTROL | 2 +- ports/libiconv/portfile.cmake | 14 +++- ports/libiconv/vcpkg-iconv-config.cmake | 2 + ports/libidn2/CMakeLists.txt | 8 +- ports/libidn2/portfile.cmake | 1 + ports/libjpeg-turbo/linux-cmake.patch | 26 +++++++ ports/libjpeg-turbo/portfile.cmake | 5 +- ports/liblzma/CMakeLists.txt | 54 ++++++++++++- ports/libpng/CONTROL | 2 +- ports/libpng/portfile.cmake | 4 +- ports/libpng/skip-install-symlink.patch | 22 ++++++ ports/libusb-win32/portfile.cmake | 4 +- ports/libusb/CONTROL | 2 +- ports/libxml2/CMakeLists.txt | 23 ++++-- ports/libxml2/CONTROL | 2 +- ports/libxml2/portfile.cmake | 12 +-- ports/libxml2/vcpkg-cmake-wrapper.cmake | 11 +++ ports/openssl/CMakeLists.txt | 128 +++++++++++++++++++++++++++++++ ports/openssl/portfile-nonwindows.cmake | 30 ++++++++ ports/openssl/portfile.cmake | 22 ++++-- ports/openssl/remove-deps.cmake | 7 ++ ports/pixman/CMakeLists.txt | 64 +++++++++++++++- ports/pixman/CMakeLists_pixman.txt | 53 ------------- ports/pixman/portfile.cmake | 35 +++------ ports/protobuf/CONTROL | 2 +- ports/protobuf/js-embed.patch | 25 ++++++ ports/protobuf/portfile.cmake | 30 +++++--- ports/pthreads/portfile.cmake | 4 + ports/sdl2/CONTROL | 2 +- ports/sdl2/portfile.cmake | 27 ++++++- ports/sqlite3/CMakeLists.txt | 2 +- ports/szip/portfile.cmake | 6 +- ports/telnetpp/portfile.cmake | 2 +- ports/tinyxml2/CONTROL | 2 +- ports/tinyxml2/portfile.cmake | 7 +- ports/tinyxml2/vcpkg-cmake-wrapper.cmake | 5 ++ ports/uvatlas/portfile.cmake | 13 +--- 65 files changed, 684 insertions(+), 261 deletions(-) delete mode 100644 ports/console-bridge/License.txt create mode 100644 ports/console-bridge/static-macro.patch create mode 100644 ports/freetype/vcpkg-cmake-wrapper.cmake create mode 100644 ports/jasper/opengl-not-required.patch create mode 100644 ports/libcds/lib-suffix-option.patch create mode 100644 ports/libiconv/vcpkg-iconv-config.cmake create mode 100644 ports/libjpeg-turbo/linux-cmake.patch create mode 100644 ports/libpng/skip-install-symlink.patch create mode 100644 ports/libxml2/vcpkg-cmake-wrapper.cmake create mode 100644 ports/openssl/CMakeLists.txt create mode 100644 ports/openssl/portfile-nonwindows.cmake create mode 100644 ports/openssl/remove-deps.cmake delete mode 100644 ports/pixman/CMakeLists_pixman.txt create mode 100644 ports/protobuf/js-embed.patch create mode 100644 ports/tinyxml2/vcpkg-cmake-wrapper.cmake diff --git a/ports/avro-c/CONTROL b/ports/avro-c/CONTROL index 3a7334c41..5bcf16fe5 100644 --- a/ports/avro-c/CONTROL +++ b/ports/avro-c/CONTROL @@ -1,4 +1,4 @@ Source: avro-c -Version: 1.8.2 +Version: 1.8.2-1 Description: Apache Avro is a data serialization system Build-Depends: jansson, liblzma, zlib diff --git a/ports/avro-c/portfile.cmake b/ports/avro-c/portfile.cmake index 94fcf25ba..087d3b3af 100644 --- a/ports/avro-c/portfile.cmake +++ b/ports/avro-c/portfile.cmake @@ -16,9 +16,12 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/lang/c + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_Snappy=ON ) -vcpkg_install_cmake(DISABLE_PARALLEL) +vcpkg_install_cmake() vcpkg_copy_pdbs() diff --git a/ports/butteraugli/CMakeLists.txt b/ports/butteraugli/CMakeLists.txt index 0b5373c5a..6a2e5ca02 100644 --- a/ports/butteraugli/CMakeLists.txt +++ b/ports/butteraugli/CMakeLists.txt @@ -5,12 +5,14 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) add_compile_options(-D_CRT_SECURE_NO_WARNINGS -DNOMINMAX) if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018) +else() + add_compile_options(-std=c++11) endif() find_package(JPEG REQUIRED) find_package(PNG REQUIRED) -include_directories(".") +include_directories("." ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS}) add_library(butteraugli_lib butteraugli/butteraugli.cc) @@ -23,8 +25,8 @@ install( if(NOT DISABLE_INSTALL_TOOLS) add_executable(butteraugli butteraugli/butteraugli_main.cc) - target_include_directories(butteraugli PRIVATE ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS}) - target_link_libraries(butteraugli PRIVATE butteraugli_lib ${JPEG_LIBRARIES} ${PNG_LIBRARIES}) + find_library(TURBO turbojpeg) + target_link_libraries(butteraugli butteraugli_lib ${JPEG_LIBRARIES} ${TURBO} ${PNG_LIBRARIES}) install ( TARGETS butteraugli diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index 430638322..77dea256e 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -46,6 +46,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.txt +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/capstone RENAME copyright) diff --git a/ports/console-bridge/CONTROL b/ports/console-bridge/CONTROL index ea6ebf3ba..533c63944 100644 --- a/ports/console-bridge/CONTROL +++ b/ports/console-bridge/CONTROL @@ -1,3 +1,3 @@ Source: console-bridge -Version: 0.3.2-2 +Version: 0.3.2-3 Description: a ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages. diff --git a/ports/console-bridge/License.txt b/ports/console-bridge/License.txt deleted file mode 100644 index affcb8568..000000000 --- a/ports/console-bridge/License.txt +++ /dev/null @@ -1,31 +0,0 @@ -Software License Agreement (BSD License) - -Copyright (c) 2008, Willow Garage, 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: - -* 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. -* Neither the name of the Willow Garage 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 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. \ No newline at end of file diff --git a/ports/console-bridge/portfile.cmake b/ports/console-bridge/portfile.cmake index d88308e5c..74d76923f 100644 --- a/ports/console-bridge/portfile.cmake +++ b/ports/console-bridge/portfile.cmake @@ -6,7 +6,12 @@ vcpkg_from_github( REF 0.3.2 SHA512 41fa5340d7ba79c887ef73eb4fda7b438ed91febd224934ae4658697e4c9e43357207e1b3e191ecce3c97cb9a87b0556372832735a268261bc798cc7683aa207 HEAD_REF master - ) +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/static-macro.patch +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -16,9 +21,23 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") -file(RENAME ${CURRENT_PACKAGES_DIR}/share/console-bridge ${CURRENT_PACKAGES_DIR}/share/console_bridge) +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + 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) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/console-bridge RENAME copyright) +file(READ ${SOURCE_PATH}/src/console.cpp _contents) +string(SUBSTRING "${_contents}" 0 2000 license) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/console-bridge) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/console-bridge/copyright "${license}") + +file(READ ${CURRENT_PACKAGES_DIR}/include/console_bridge/exportdecl.h _contents) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC" "if 1" _contents "${_contents}") +else() + string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC" "if 0" _contents "${_contents}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/console_bridge/exportdecl.h "${_contents}") diff --git a/ports/console-bridge/static-macro.patch b/ports/console-bridge/static-macro.patch new file mode 100644 index 000000000..31e4053aa --- /dev/null +++ b/ports/console-bridge/static-macro.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 604b2ab..e98b51c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,6 +37,10 @@ if(NOT DEFINED BUILD_SHARED_LIBS) + option(BUILD_SHARED_LIBS "Build dynamically-linked binaries" ON) + endif() + ++if(NOT BUILD_SHARED_LIBS) ++ add_definitions(-DCONSOLE_BRIDGE_STATIC) ++endif() ++ + add_library(${PROJECT_NAME} src/console.cpp) + set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION + ${CONSOLE_BRIDGE_MAJOR_VERSION}.${CONSOLE_BRIDGE_MINOR_VERSION}) diff --git a/ports/cppunit/portfile.cmake b/ports/cppunit/portfile.cmake index a56f7849a..7a936d655 100644 --- a/ports/cppunit/portfile.cmake +++ b/ports/cppunit/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) set(VERSION 1.14.0) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}/cppunit-${VERSION}) diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index e7f13888d..0f6acea43 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7.58.0-4 +Version: 7.58.0-5 Build-Depends: zlib Description: A library for transferring data with URLs Default-Features: ssl diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 94587649d..299dc4fa4 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -95,6 +95,12 @@ vcpkg_configure_cmake( 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) +endif() + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/dirent/portfile.cmake b/ports/dirent/portfile.cmake index c9645948e..70ed405cc 100644 --- a/ports/dirent/portfile.cmake +++ b/ports/dirent/portfile.cmake @@ -1,3 +1,8 @@ +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() + include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index ee4881e88..8fc31c692 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -24,29 +24,33 @@ vcpkg_install_cmake() # Rename exported target files into something vcpkg_fixup_cmake_targets expects if(NOT VCPKG_USE_HEAD_VERSION) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake - ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionTargets-debug.cmake) - file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends-release.cmake - ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets-release.cmake) - file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends.cmake - ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake) - - file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake TARGETS_FILE) - string(REPLACE "double-conversionLibraryDepends" "double-conversionTargets" TARGETS_FILE "${TARGETS_FILE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake "${TARGETS_FILE}") - - # Remove hardcoded paths from config file - file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake CONFIG_FILE) - string(REPLACE "${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion/double-conversionLibraryDepends.cmake" - "\${double-conversion_CMAKE_DIR}/double-conversionTargets.cmake" CONFIG_FILE "${CONFIG_FILE}") - string(REPLACE "${CURRENT_PACKAGES_DIR}" - "\${double-conversion_CMAKE_DIR}/../.." CONFIG_FILE "${CONFIG_FILE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake "${CONFIG_FILE}") - - vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) + if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake + ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionTargets-debug.cmake) + file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends-release.cmake + ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets-release.cmake) + file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends.cmake + ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake) + + file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake TARGETS_FILE) + string(REPLACE "double-conversionLibraryDepends" "double-conversionTargets" TARGETS_FILE "${TARGETS_FILE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake "${TARGETS_FILE}") + + # Remove hardcoded paths from config file + file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake CONFIG_FILE) + string(REPLACE "${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion/double-conversionLibraryDepends.cmake" + "\${double-conversion_CMAKE_DIR}/double-conversionTargets.cmake" CONFIG_FILE "${CONFIG_FILE}") + string(REPLACE "${CURRENT_PACKAGES_DIR}" + "\${double-conversion_CMAKE_DIR}/../.." CONFIG_FILE "${CONFIG_FILE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake "${CONFIG_FILE}") + + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) + endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) else() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion) + if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion) + endif() endif() vcpkg_copy_pdbs() diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index d193897f4..2a0acc649 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -25,12 +25,8 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "share/exiv2/cmake") vcpkg_copy_pdbs() # Clean -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/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${EXE} ${DEBUG_EXE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index a8f320ab3..485320a8b 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -34,7 +34,9 @@ file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/sh vcpkg_copy_pdbs() # CMake's FindExpat currently doesn't look for expatd.lib -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/expat.lib) +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/expat.lib) +endif() file(READ ${CURRENT_PACKAGES_DIR}/include/expat_external.h EXPAT_EXTERNAL_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL index c6fcc4243..567cf9020 100644 --- a/ports/freetype/CONTROL +++ b/ports/freetype/CONTROL @@ -1,4 +1,4 @@ Source: freetype -Version: 2.8.1-1 +Version: 2.8.1-3 Build-Depends: zlib, bzip2, libpng Description: A library to render fonts. diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake index 7b98fa477..b0143e382 100644 --- a/ports/freetype/portfile.cmake +++ b/ports/freetype/portfile.cmake @@ -53,9 +53,12 @@ file(COPY ${SOURCE_PATH}/docs/LICENSE.TXT ${SOURCE_PATH}/docs/FTL.TXT ${SOURCE_PATH}/docs/GPLv2.TXT + ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype ) file(RENAME ${CURRENT_PACKAGES_DIR}/share/freetype/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/freetype/copyright) vcpkg_copy_pdbs() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype) +endif() diff --git a/ports/freetype/vcpkg-cmake-wrapper.cmake b/ports/freetype/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..c08499f2d --- /dev/null +++ b/ports/freetype/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,10 @@ +_find_package(${ARGS}) +find_package(ZLIB) +find_package(PNG) +find_package(BZip2) +if(TARGET Freetype::Freetype) + set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES BZip2::BZip2 PNG::PNG ZLIB::ZLIB) +endif() +if(FREETYPE_LIBRARIES) + list(APPEND FREETYPE_LIBRARIES ${BZIP2_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES}) +endif() diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index ef9f52563..33a7da3f4 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -1,10 +1,7 @@ -# 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} -# +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() #Based on https://github.com/winlibs/gettext diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index 7e316c83b..ee730d442 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -30,6 +30,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gflags) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/jansson/CONTROL b/ports/jansson/CONTROL index d5fa4f546..6050b464d 100644 --- a/ports/jansson/CONTROL +++ b/ports/jansson/CONTROL @@ -1,3 +1,3 @@ Source: jansson -Version: 2.11 +Version: 2.11-2 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 034b4eb01..e243422fb 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -33,15 +33,17 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DJANSSON_STATIC_CRT=${JANSSON_STATIC_CRT} - -DJANSSON_EXAMPLES=OFF - -DJANSSON_WITHOUT_TESTS=ON - -DJANSSON_BUILD_SHARED_LIBS=${JANSSON_BUILD_SHARED_LIBS} - -DUSE_WINDOWS_CRYPTOAPI=${USE_WINDOWS_CRYPTOAPI} + -DJANSSON_STATIC_CRT=${JANSSON_STATIC_CRT} + -DJANSSON_EXAMPLES=OFF + -DJANSSON_WITHOUT_TESTS=ON + -DJANSSON_BUILD_SHARED_LIBS=${JANSSON_BUILD_SHARED_LIBS} + -DUSE_WINDOWS_CRYPTOAPI=${USE_WINDOWS_CRYPTOAPI} + -DJANSSON_INSTALL_CMAKE_DIR:STRING=share/jansson ) -vcpkg_install_cmake(DISABLE_PARALLEL) -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/jansson) 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/opengl-not-required.patch b/ports/jasper/opengl-not-required.patch new file mode 100644 index 000000000..5c40a6b67 --- /dev/null +++ b/ports/jasper/opengl-not-required.patch @@ -0,0 +1,14 @@ +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 ee73c8cbd..6e753ed74 100644 --- a/ports/jasper/portfile.cmake +++ b/ports/jasper/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/jasper-fix-uwp.patch + ${CMAKE_CURRENT_LIST_DIR}/opengl-not-required.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) diff --git a/ports/leptonica/CONTROL b/ports/leptonica/CONTROL index 6ca0bea56..2be42f327 100644 --- a/ports/leptonica/CONTROL +++ b/ports/leptonica/CONTROL @@ -1,4 +1,4 @@ Source: leptonica -Version: 1.74.4-2 +Version: 1.74.4-3 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/libcds/lib-suffix-option.patch b/ports/libcds/lib-suffix-option.patch new file mode 100644 index 000000000..eeb2f3e2e --- /dev/null +++ b/ports/libcds/lib-suffix-option.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e891aee..9f12295 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -125,7 +125,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + + if(CMAKE_TARGET_ARCHITECTURE STREQUAL "x86_64") + list(APPEND LIBCDS_PUBLIC_CXX_FLAGS "-mcx16") +- set(LIB_SUFFIX "64") ++ set(LIB_SUFFIX "64" CACHE STRING "") + + # GCC-7: 128-bit atomics support is implemented via libatomic on amd64 + # see https://gcc.gnu.org/ml/gcc/2017-01/msg00167.html diff --git a/ports/libcds/portfile.cmake b/ports/libcds/portfile.cmake index f13759c05..c3ba2ec65 100644 --- a/ports/libcds/portfile.cmake +++ b/ports/libcds/portfile.cmake @@ -10,7 +10,9 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake-install.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/cmake-install.patch + ${CMAKE_CURRENT_LIST_DIR}/lib-suffix-option.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DISABLE_INSTALL_STATIC) @@ -24,6 +26,7 @@ vcpkg_configure_cmake( -DENABLE_STRESS_TEST=OFF -DDISABLE_INSTALL_STATIC=${DISABLE_INSTALL_STATIC} -DDISABLE_INSTALL_SHARED=${DISABLE_INSTALL_SHARED} + "-DLIB_SUFFIX=" ) vcpkg_install_cmake() diff --git a/ports/libiconv/CMakeLists.txt b/ports/libiconv/CMakeLists.txt index be42843e3..95071be9d 100644 --- a/ports/libiconv/CMakeLists.txt +++ b/ports/libiconv/CMakeLists.txt @@ -30,18 +30,29 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) add_definitions(-DLIBDIR -D_CRT_SECURE_NO_WARNINGS) add_library(libcharset libcharset/lib/localcharset.c) +target_include_directories(libcharset PUBLIC $) add_library(libiconv lib/iconv.c) -target_link_libraries(libiconv libcharset) +target_link_libraries(libiconv PRIVATE libcharset) +target_include_directories(libiconv PUBLIC $) -install(TARGETS libcharset libiconv +install(TARGETS libcharset libiconv EXPORT unofficial-iconv-targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) -install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/iconv.h - ${CMAKE_CURRENT_BINARY_DIR}/localcharset.h - DESTINATION include -) +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/iconv.h + ${CMAKE_CURRENT_BINARY_DIR}/localcharset.h + DESTINATION include + ) +endif() + +install( + EXPORT unofficial-iconv-targets + FILE unofficial-iconv-config.cmake + NAMESPACE unofficial::iconv:: + DESTINATION share/unofficial-iconv +) \ No newline at end of file diff --git a/ports/libiconv/CONTROL b/ports/libiconv/CONTROL index aabc4a953..8bb9625b9 100644 --- a/ports/libiconv/CONTROL +++ b/ports/libiconv/CONTROL @@ -1,3 +1,3 @@ Source: libiconv -Version: 1.15-1 +Version: 1.15-2 Description: GNU Unicode text conversion diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index 79c30987c..bded180db 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -1,3 +1,10 @@ +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/libiconv) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-iconv-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libiconv) + return() +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libiconv-1.15) vcpkg_download_distfile(ARCHIVE @@ -20,14 +27,15 @@ vcpkg_apply_patches( 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/unofficial-iconv TARGET_PATH share/unofficial-iconv) + vcpkg_copy_pdbs() # Handle copyright file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libiconv) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libiconv/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/libiconv/copyright) - -# clean out the debug include -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) \ No newline at end of file diff --git a/ports/libiconv/vcpkg-iconv-config.cmake b/ports/libiconv/vcpkg-iconv-config.cmake new file mode 100644 index 000000000..4befd4d15 --- /dev/null +++ b/ports/libiconv/vcpkg-iconv-config.cmake @@ -0,0 +1,2 @@ +add_library(unofficial::vcpkg::libcharset UNKNOWN IMPORTED) +add_library(unofficial::vcpkg::libiconv UNKNOWN IMPORTED) diff --git a/ports/libidn2/CMakeLists.txt b/ports/libidn2/CMakeLists.txt index 9fbe1bcdd..a1eb9f9ce 100644 --- a/ports/libidn2/CMakeLists.txt +++ b/ports/libidn2/CMakeLists.txt @@ -2,9 +2,7 @@ cmake_minimum_required(VERSION 3.8) project(libidn2 C) -find_path(ICONV_INCLUDE_DIR iconv.h) -find_library(ICONV NAMES libiconv) -find_library(ICONV_CHARSET NAMES libcharset) +find_package(unofficial-iconv REQUIRED) set(CMAKE_DEBUG_POSTFIX "d") @@ -94,8 +92,8 @@ set(GL_SRC gl/rawmemchr.c add_library(libidn2 ${LIB_SRC} ${UNISTR_SRC} ${GL_SRC}) -target_include_directories(libidn2 PRIVATE . ./unistring ./gl ${ICONV_INCLUDE_DIR}) -target_link_libraries(libidn2 PRIVATE ${ICONV} ${ICONV_CHARSET}) +target_include_directories(libidn2 PRIVATE . ./unistring ./gl) +target_link_libraries(libidn2 PRIVATE unofficial::iconv::libiconv unofficial::iconv::libcharset) install(TARGETS libidn2 RUNTIME DESTINATION bin diff --git a/ports/libidn2/portfile.cmake b/ports/libidn2/portfile.cmake index bbe8f7bbe..98892e2c0 100644 --- a/ports/libidn2/portfile.cmake +++ b/ports/libidn2/portfile.cmake @@ -35,6 +35,7 @@ simple_copy_template_header(${SOURCE_PATH}/unistring alloca) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() diff --git a/ports/libjpeg-turbo/linux-cmake.patch b/ports/libjpeg-turbo/linux-cmake.patch new file mode 100644 index 000000000..48a04279f --- /dev/null +++ b/ports/libjpeg-turbo/linux-cmake.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c29e604..6e467be 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,10 +29,6 @@ pad_number(VERSION_MINOR 3) + pad_number(VERSION_REVISION 3) + set(LIBJPEG_TURBO_VERSION_NUMBER ${VERSION_MAJOR}${VERSION_MINOR}${VERSION_REVISION}) + +-if(NOT WIN32) +- message(FATAL_ERROR "Platform not supported by this build system. Use autotools instead.") +-endif() +- + string(TIMESTAMP BUILD "%Y%m%d") + + # This does nothing except when using MinGW. CMAKE_BUILD_TYPE has no meaning +@@ -166,8 +162,10 @@ endif() + + if(64BIT) + message(STATUS "64-bit build") ++ add_compile_options(-DSIZEOF_SIZE_T=8) + else() + message(STATUS "32-bit build") ++ add_compile_options(-DSIZEOF_SIZE_T=4) + endif() + + if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index a3c0e65b6..2c8c20f92 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -10,9 +10,10 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-options-for-exes-docs-headers.patch" + "${CMAKE_CURRENT_LIST_DIR}/linux-cmake.patch" ) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") set(LIBJPEGTURBO_SIMD -DWITH_SIMD=OFF) else() set(LIBJPEGTURBO_SIMD -DWITH_SIMD=ON) @@ -41,7 +42,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Rename libraries for static builds -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND EXISTS "${CURRENT_PACKAGES_DIR}/lib/jpeg-static.lib") file(RENAME "${CURRENT_PACKAGES_DIR}/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/lib/jpeg.lib") file(RENAME "${CURRENT_PACKAGES_DIR}/lib/turbojpeg-static.lib" "${CURRENT_PACKAGES_DIR}/lib/turbojpeg.lib") file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg.lib") diff --git a/ports/liblzma/CMakeLists.txt b/ports/liblzma/CMakeLists.txt index e51b034bd..2c809a5aa 100644 --- a/ports/liblzma/CMakeLists.txt +++ b/ports/liblzma/CMakeLists.txt @@ -7,7 +7,59 @@ if(BUILD_SHARED_LIBS) add_definitions(-DDLL_EXPORT) endif() -include_directories(windows) +if(NOT MSVC) + add_definitions(-DHAVE_VISIBILITY=1) +endif() + +if(WIN32) + include_directories(windows) +else() + include_directories(${CMAKE_CURRENT_BINARY_DIR}) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h + """ +#define TUKLIB_SYMBOL_PREFIX lzma_ +#define ASSUME_RAM 128 +#define HAVE_CHECK_CRC32 1 +#define HAVE_CHECK_CRC64 1 +#define HAVE_CHECK_SHA256 1 +#define HAVE_DECODERS 1 +#define HAVE_DECODER_ARM 1 +#define HAVE_DECODER_ARMTHUMB 1 +#define HAVE_DECODER_DELTA 1 +#define HAVE_DECODER_IA64 1 +#define HAVE_DECODER_LZMA1 1 +#define HAVE_DECODER_LZMA2 1 +#define HAVE_DECODER_POWERPC 1 +#define HAVE_DECODER_SPARC 1 +#define HAVE_DECODER_X86 1 +#define HAVE_ENCODERS 1 +#define HAVE_ENCODER_ARM 1 +#define HAVE_ENCODER_ARMTHUMB 1 +#define HAVE_ENCODER_DELTA 1 +#define HAVE_ENCODER_IA64 1 +#define HAVE_ENCODER_LZMA1 1 +#define HAVE_ENCODER_LZMA2 1 +#define HAVE_ENCODER_POWERPC 1 +#define HAVE_ENCODER_SPARC 1 +#define HAVE_ENCODER_X86 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_MF_BT2 1 +#define HAVE_MF_BT3 1 +#define HAVE_MF_BT4 1 +#define HAVE_MF_HC3 1 +#define HAVE_MF_HC4 1 +#define HAVE_STDBOOL_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_VISIBILITY 1 +#define MYTHREAD_POSIX 1 +#define PACKAGE_NAME \"XZ Utils\" +#define PACKAGE_URL \"http://tukaani.org/xz/\" +#define SIZEOF_SIZE_T (sizeof(size_t)) +""") +endif() include_directories(src/liblzma/common) include_directories(src/common) include_directories(src/liblzma/api) diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index 89ea07065..1eec4f2dc 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.34-2 +Version: 1.6.34-3 Build-Depends: zlib 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 4273846e9..1ac8ef3cb 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch + ${CMAKE_CURRENT_LIST_DIR}/skip-install-symlink.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -32,13 +33,14 @@ vcpkg_configure_cmake( -DSKIP_INSTALL_PROGRAMS=ON -DSKIP_INSTALL_EXECUTABLES=ON -DSKIP_INSTALL_FILES=ON + -DSKIP_INSTALL_SYMLINK=ON OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) vcpkg_install_cmake() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND EXISTS ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib) endif() diff --git a/ports/libpng/skip-install-symlink.patch b/ports/libpng/skip-install-symlink.patch new file mode 100644 index 000000000..c31177d7e --- /dev/null +++ b/ports/libpng/skip-install-symlink.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 48c6fa2..589e5f9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -868,7 +868,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +- if(PNG_SHARED) ++ if(PNG_SHARED AND NOT SKIP_INSTALL_SYMLINK) + # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin + if(CYGWIN OR MINGW) + CREATE_SYMLINK(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png) +@@ -881,7 +881,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) + endif(NOT WIN32) + endif(PNG_SHARED) + +- if(PNG_STATIC) ++ if(PNG_STATIC AND NOT SKIP_INSTALL_SYMLINK) + if(NOT WIN32 OR CYGWIN OR MINGW) + CREATE_SYMLINK( libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static) + install(FILES $/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/ports/libusb-win32/portfile.cmake b/ports/libusb-win32/portfile.cmake index bab7675a0..a93b39bca 100644 --- a/ports/libusb-win32/portfile.cmake +++ b/ports/libusb-win32/portfile.cmake @@ -1,7 +1,7 @@ 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: only Windows Desktop builds are currently supported.") endif() set(LIBUSB_VERSION 1.2.6.0) diff --git a/ports/libusb/CONTROL b/ports/libusb/CONTROL index de5fe82b4..722cf9090 100644 --- a/ports/libusb/CONTROL +++ b/ports/libusb/CONTROL @@ -1,3 +1,3 @@ Source: libusb Version: 1.0.21-fc99620 -Description: A library for USB device access from Windows userspace. +Description: a cross-platform library to access USB devices diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt index 02cccd6c7..96ecb901d 100644 --- a/ports/libxml2/CMakeLists.txt +++ b/ports/libxml2/CMakeLists.txt @@ -5,8 +5,10 @@ option(INSTALL_HEADERS "Install public header files" ON) find_package(ZLIB REQUIRED) find_package(LibLZMA REQUIRED) -find_library(ICONV NAMES libiconv) -find_library(ICONV_CHARSET NAMES libcharset) +if(WIN32) + find_library(ICONV NAMES libiconv) + find_library(ICONV_CHARSET NAMES libcharset) +endif() set(SOURCES buf.c @@ -79,17 +81,24 @@ target_include_directories(libxml2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} win32/vc1 target_link_libraries(libxml2 PRIVATE ZLIB::ZLIB ${LIBLZMA_LIBRARIES} - ${ICONV} - ${ICONV_CHARSET} - wsock32.lib - ws2_32.lib ) +if(WIN32) + target_link_libraries(libxml2 PRIVATE + ${ICONV} + ${ICONV_CHARSET} + wsock32.lib + ws2_32.lib + ) + target_compile_definitions(libxml2 PRIVATE + -DHAVE_WIN32_THREADS + ) +endif() + target_compile_definitions(libxml2 PRIVATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_REENTRANT -DNOLIBTOOL - -DHAVE_WIN32_THREADS -DHAVE_ZLIB_H -DHAVE_LZMA_H ) diff --git a/ports/libxml2/CONTROL b/ports/libxml2/CONTROL index ce430ceff..b8552e48e 100644 --- a/ports/libxml2/CONTROL +++ b/ports/libxml2/CONTROL @@ -1,4 +1,4 @@ Source: libxml2 -Version: 2.9.4-2 +Version: 2.9.4-4 Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform) Build-Depends: zlib, libiconv, liblzma diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake index d50183f1d..a300fcaf5 100644 --- a/ports/libxml2/portfile.cmake +++ b/ports/libxml2/portfile.cmake @@ -1,11 +1,3 @@ -# 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) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxml2-2.9.4) vcpkg_download_distfile(ARCHIVE @@ -30,3 +22,7 @@ file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxm file(RENAME ${CURRENT_PACKAGES_DIR}/share/libxml2/COPYING ${CURRENT_PACKAGES_DIR}/share/libxml2/copyright) vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxml2) +endif() diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..6452af426 --- /dev/null +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +_find_package(${ARGS}) +if(LibXml2_FOUND AND (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) + find_package(LibLZMA) + list(APPEND LIBXML2_LIBRARIES + ${LIBLZMA_LIBRARIES} + debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libiconv.lib + optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libiconv.lib + debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib + optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib + ws2_32) +endif() diff --git a/ports/openssl/CMakeLists.txt b/ports/openssl/CMakeLists.txt new file mode 100644 index 000000000..40e82abb4 --- /dev/null +++ b/ports/openssl/CMakeLists.txt @@ -0,0 +1,128 @@ +cmake_minimum_required(VERSION 3.9) +project(openssl C) + +if(NOT SOURCE_PATH) + message(FATAL_ERROR "Requires SOURCE_PATH") +endif() + +if(CMAKE_SYSTEM_NAME STREQUAL "Android") + set(PLATFORM android) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64") + set(PLATFORM linux-generic64) + else() + set(PLATFORM linux-generic32) + endif() +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(PLATFORM darwin64-x86_64-cc) +else() + message(FATAL_ERROR "Unknown platform") +endif() + +get_filename_component(COMPILER_ROOT "${CMAKE_C_COMPILER}" DIRECTORY) + +message("CMAKE_C_COMPILER=${CMAKE_C_COMPILER}") +message("COMPILER_ROOT=${COMPILER_ROOT}") +message("CMAKE_SYSROOT=${CMAKE_SYSROOT}") +message("CMAKE_C_FLAGS=${CMAKE_C_FLAGS}") +message("CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}") +message("CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}") +message("CMAKE_INCLUDE_SYSTEM_FLAG_C=${CMAKE_INCLUDE_SYSTEM_FLAG_C}") + +set(CFLAGS "${CMAKE_C_FLAGS}") +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}") +endif() +if(CMAKE_C_COMPILER_TARGET) + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET} ${CMAKE_C_COMPILER_TARGET}") +endif() +if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN) + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} ${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}") +endif() +if(CMAKE_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT) + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}") +endif() + +file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT};$ENV{PATH}") +set(ENV{ANDROID_DEV} "${CMAKE_SYSROOT}/usr") +set(ENV{CC} "${CMAKE_C_COMPILER}") + +message("ENV{ANDROID_DEV}=$ENV{ANDROID_DEV}") + +get_filename_component(SOURCE_PATH_NAME "${SOURCE_PATH}" NAME) +set(BUILDDIR "${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_PATH_NAME}") + +if(NOT EXISTS "${BUILDDIR}") + file(COPY ${SOURCE_PATH} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +endif() + +get_filename_component(MSYS_BIN_DIR "${MAKE}" DIRECTORY) + + +file(READ "${BUILDDIR}/Configure" _contents) +string(REPLACE "-mandroid" "" _contents "${_contents}") +file(WRITE "${BUILDDIR}/Configure" "${_contents}") + +if(BUILD_SHARED_LIBS) + set(SHARED shared) +else() + set(SHARED no-shared) +endif() + +if(CMAKE_HOST_WIN32) + set(ENV_COMMAND set) + set(PATH_VAR ";%PATH%") +else() + set(ENV_COMMAND export) + set(PATH_VAR ":$ENV{PATH}") +endif() + +add_custom_command( + OUTPUT "${BUILDDIR}/Makefile" + COMMAND ${ENV_COMMAND} CC=${CMAKE_C_COMPILER} + COMMAND ${ENV_COMMAND} AR=${CMAKE_AR} + COMMAND ${ENV_COMMAND} LD=${CMAKE_LINKER} + COMMAND ${ENV_COMMAND} RANLIB=${CMAKE_RANLIB} + COMMAND ${ENV_COMMAND} MAKE=${MAKE} + COMMAND ${ENV_COMMAND} MAKEDEPPROG=${CMAKE_C_COMPILER} + COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}" + COMMAND "${PERL}" Configure + ${SHARED} + enable-static-engine + no-ssl2 + no-krb5 + no-idea + no-bf + no-cast + no-seed + no-md2 + ${PLATFORM} + "--prefix=${CMAKE_INSTALL_PREFIX}" + "--openssldir=${CMAKE_INSTALL_PREFIX}" + ${CFLAGS} + COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake" + VERBATIM + WORKING_DIRECTORY "${BUILDDIR}" +) + +add_custom_target(depend + COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}" + COMMAND "${MAKE}" links # depend MAKEDEPPROG=${CMAKE_C_COMPILER} + VERBATIM + WORKING_DIRECTORY "${BUILDDIR}" + DEPENDS "${BUILDDIR}/Makefile" +) +add_custom_target(build_libs ALL + COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}" + COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h" + COMMAND "${MAKE}" build_libs + VERBATIM + WORKING_DIRECTORY "${BUILDDIR}" + DEPENDS depend + BYPRODUCTS "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a" +) + +install( + FILES "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a" + DESTINATION lib +) diff --git a/ports/openssl/portfile-nonwindows.cmake b/ports/openssl/portfile-nonwindows.cmake new file mode 100644 index 000000000..67e739af1 --- /dev/null +++ b/ports/openssl/portfile-nonwindows.cmake @@ -0,0 +1,30 @@ +if(CMAKE_HOST_WIN32) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES make) + set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + set(MAKE ${MSYS_ROOT}/usr/bin/make.exe) +else() + find_program(MAKE make) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS + -DSOURCE_PATH=${MASTER_COPY_SOURCE_PATH} + -DPERL=${PERL} + -DMAKE=${MAKE} + OPTIONS_RELEASE + -DINSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(GLOB HEADERS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/include/openssl/*.h) +set(RESOLVED_HEADERS) +foreach(HEADER ${HEADERS}) + get_filename_component(X "${HEADER}" REALPATH) + list(APPEND RESOLVED_HEADERS "${X}") +endforeach() + +file(INSTALL ${RESOLVED_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/openssl) +file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright) diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 65662dd86..fe26c0c31 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -7,13 +7,16 @@ include(vcpkg_common_functions) set(OPENSSL_VERSION 1.0.2n) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) -vcpkg_find_acquire_program(PERL) -vcpkg_find_acquire_program(NASM) -find_program(NMAKE nmake) +if(CMAKE_HOST_WIN32) + vcpkg_find_acquire_program(PERL) + vcpkg_find_acquire_program(NASM) +else() + find_program(PERL perl) + find_program(NASM nasm) +endif() get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) -vcpkg_find_acquire_program(JOM) set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH};${PERL_EXE_PATH}") vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE @@ -31,6 +34,13 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/RemoveNonASCIIChar.patch ) +if(VCPKG_CMAKE_SYSTEM_NAME) + include(${CMAKE_CURRENT_LIST_DIR}/portfile-nonwindows.cmake) + return() +endif() + +vcpkg_find_acquire_program(JOM) + set(CONFIGURE_COMMAND ${PERL} Configure enable-static-engine enable-capieng @@ -85,7 +95,7 @@ execute_process( ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log ) vcpkg_execute_required_process( - COMMAND ${NMAKE} -f ${OPENSSL_MAKEFILE} install + COMMAND ${JOM} -j 1 -f ${OPENSSL_MAKEFILE} install WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} LOGNAME build-${TARGET_TRIPLET}-rel-1) @@ -118,7 +128,7 @@ execute_process( ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log ) vcpkg_execute_required_process( - COMMAND ${NMAKE} -f ${OPENSSL_MAKEFILE} install + COMMAND ${JOM} -j 1 -f ${OPENSSL_MAKEFILE} install WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} LOGNAME build-${TARGET_TRIPLET}-dbg-1) diff --git a/ports/openssl/remove-deps.cmake b/ports/openssl/remove-deps.cmake new file mode 100644 index 000000000..a57c70fe9 --- /dev/null +++ b/ports/openssl/remove-deps.cmake @@ -0,0 +1,7 @@ +file(GLOB_RECURSE MAKEFILES ${DIR}/*/Makefile) +foreach(MAKEFILE ${MAKEFILES}) + message("removing deps from ${MAKEFILE}") + file(READ "${MAKEFILE}" _contents) + string(REGEX REPLACE "\n# DO NOT DELETE THIS LINE.*" "" _contents "${_contents}") + file(WRITE "${MAKEFILE}" "${_contents}") +endforeach() diff --git a/ports/pixman/CMakeLists.txt b/ports/pixman/CMakeLists.txt index aad6ec778..322c08a9c 100644 --- a/ports/pixman/CMakeLists.txt +++ b/ports/pixman/CMakeLists.txt @@ -1,4 +1,64 @@ cmake_minimum_required(VERSION 3.0) -project(pixman VERSION 0.32.0 LANGUAGES C CXX) +project(pixman VERSION 0.32.0 LANGUAGES C) -add_subdirectory(pixman) \ No newline at end of file +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +set(CMAKE_DEBUG_POSTFIX "d") + +include_directories(".") + +file(GLOB SOURCES +"pixman.c" +"pixman-access.c" +"pixman-access-accessors.c" +"pixman-bits-image.c" +"pixman-combine32.c" +"pixman-combine-float.c" +"pixman-conical-gradient.c" +"pixman-filter.c" +"pixman-x86.c" +"pixman-mips.c" +"pixman-arm.c" +"pixman-ppc.c" +"pixman-edge.c" +"pixman-edge-accessors.c" +"pixman-fast-path.c" +"pixman-glyph.c" +"pixman-general.c" +"pixman-gradient-walker.c" +"pixman-image.c" +"pixman-implementation.c" +"pixman-linear-gradient.c" +"pixman-matrix.c" +"pixman-noop.c" +"pixman-radial-gradient.c" +"pixman-region16.c" +"pixman-region32.c" +"pixman-solid-fill.c" +"pixman-timer.c" +"pixman-trap.c" +"pixman-utils.c" +"pixman-sse2.c" +) + +add_library(pixman-1 ${SOURCES}) + +# pixman requires the three PACKAGE* definitions in order to compile. The USE_SSE2 definition lets it use SSE2 instructions for speed. Every target machine should have SSE2 these days. +target_compile_definitions(pixman-1 + PUBLIC + PACKAGE="pixman-1" + PACKAGE_VERSION="0.34.0" + PACKAGE_BUGREPORT="" + PRIVATE + USE_SSE2 +) + +# pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files +if(MSVC) + target_compile_options(pixman-1 PRIVATE "/wd4244" "/wd4146" "/wd4996") # PUBLIC "/D_CRT_SECURE_NO_WARNINGS" +endif() + +install(TARGETS pixman-1 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/ports/pixman/CMakeLists_pixman.txt b/ports/pixman/CMakeLists_pixman.txt deleted file mode 100644 index c8030bcd6..000000000 --- a/ports/pixman/CMakeLists_pixman.txt +++ /dev/null @@ -1,53 +0,0 @@ -# Add include directories -include_directories(".") - -FILE(GLOB SOURCES -"pixman.c" -"pixman-access.c" -"pixman-access-accessors.c" -"pixman-bits-image.c" -"pixman-combine32.c" -"pixman-combine-float.c" -"pixman-conical-gradient.c" -"pixman-filter.c" -"pixman-x86.c" -"pixman-mips.c" -"pixman-arm.c" -"pixman-ppc.c" -"pixman-edge.c" -"pixman-edge-accessors.c" -"pixman-fast-path.c" -"pixman-glyph.c" -"pixman-general.c" -"pixman-gradient-walker.c" -"pixman-image.c" -"pixman-implementation.c" -"pixman-linear-gradient.c" -"pixman-matrix.c" -"pixman-noop.c" -"pixman-radial-gradient.c" -"pixman-region16.c" -"pixman-region32.c" -"pixman-solid-fill.c" -"pixman-timer.c" -"pixman-trap.c" -"pixman-utils.c" -"pixman-sse2.c" -) - -set(CMAKE_DEBUG_POSTFIX "d") - -add_library(pixman-1 ${SOURCES}) - -# pixman requires the three PACKAGE* definitions in order to compile. The USE_SSE2 definition lets it use SSE2 instructions for speed. Every target machine should have SSE2 these days. -target_compile_definitions(pixman-1 PUBLIC PACKAGE="pixman-1" PUBLIC PACKAGE_VERSION="0.34.0" PUBLIC PACKAGE_BUGREPORT="" PUBLIC USE_SSE2) - -# pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files -target_compile_options(pixman-1 PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4996") # PUBLIC "/D_CRT_SECURE_NO_WARNINGS" - -# The LIBRARY DESTINATION here is lib rather than bin because pixman must always be compiled as a static library since it has no exports. -install(TARGETS pixman-1 - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) diff --git a/ports/pixman/portfile.cmake b/ports/pixman/portfile.cmake index ac6de80f0..4fb37f6d9 100644 --- a/ports/pixman/portfile.cmake +++ b/ports/pixman/portfile.cmake @@ -1,11 +1,3 @@ -# 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) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pixman-0.34.0) @@ -17,29 +9,26 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_pixman.txt DESTINATION ${SOURCE_PATH}/pixman) -file(RENAME ${SOURCE_PATH}/pixman/CMakeLists_pixman.txt ${SOURCE_PATH}/pixman/CMakeLists.txt) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/pixman) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON + SOURCE_PATH ${SOURCE_PATH}/pixman + PREFER_NINJA ) vcpkg_install_cmake() # Copy the appropriate header files. file(COPY -"${SOURCE_PATH}/pixman/pixman.h" -"${SOURCE_PATH}/pixman/pixman-accessor.h" -"${SOURCE_PATH}/pixman/pixman-combine32.h" -"${SOURCE_PATH}/pixman/pixman-compiler.h" -"${SOURCE_PATH}/pixman/pixman-edge-imp.h" -"${SOURCE_PATH}/pixman/pixman-inlines.h" -"${SOURCE_PATH}/pixman/pixman-private.h" -"${SOURCE_PATH}/pixman/pixman-version.h" -DESTINATION -${CURRENT_PACKAGES_DIR}/include + "${SOURCE_PATH}/pixman/pixman.h" + "${SOURCE_PATH}/pixman/pixman-accessor.h" + "${SOURCE_PATH}/pixman/pixman-combine32.h" + "${SOURCE_PATH}/pixman/pixman-compiler.h" + "${SOURCE_PATH}/pixman/pixman-edge-imp.h" + "${SOURCE_PATH}/pixman/pixman-inlines.h" + "${SOURCE_PATH}/pixman/pixman-private.h" + "${SOURCE_PATH}/pixman/pixman-version.h" + DESTINATION ${CURRENT_PACKAGES_DIR}/include ) # Handle copyright diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 0cf5b4334..86fecafc5 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.5.1 +Version: 3.5.1-1 Description: Protocol Buffers - Google's data interchange format Feature: zlib diff --git a/ports/protobuf/js-embed.patch b/ports/protobuf/js-embed.patch new file mode 100644 index 000000000..df20fe030 --- /dev/null +++ b/ports/protobuf/js-embed.patch @@ -0,0 +1,25 @@ +diff --git a/cmake/libprotoc.cmake b/cmake/libprotoc.cmake +index 107c1c5..233bcf6 100644 +--- a/cmake/libprotoc.cmake ++++ b/cmake/libprotoc.cmake +@@ -73,7 +73,7 @@ set(libprotoc_files + ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_message_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/js/js_generator.cc +- ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc ++ ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc + ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.cc +@@ -210,9 +210,9 @@ set(js_well_known_types_sources + ) + add_executable(js_embed ${protobuf_source_dir}/src/google/protobuf/compiler/js/embed.cc) + add_custom_command( +- OUTPUT ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc + DEPENDS js_embed ${js_well_known_types_sources} +- COMMAND js_embed ${js_well_known_types_sources} > ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc ++ COMMAND "$" ${js_well_known_types_sources} > ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc + ) + + add_library(libprotoc ${protobuf_SHARED_OR_STATIC} diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 197a61446..b8cb43f93 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -8,14 +8,7 @@ vcpkg_download_distfile(ARCHIVE_FILE FILENAME "protobuf-cpp-${PROTOBUF_VERSION}.tar.gz" SHA512 195ccb210229e0a1080dcdb0a1d87b2e421ad55f6b036c56db3183bd50a942c75b4cc84e6af8a10ad88022a247781a06f609a145a461dfbb8f04051b7dd714b3 ) -vcpkg_download_distfile(TOOL_ARCHIVE_FILE - URLS "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-win32.zip" - FILENAME "protoc-${PROTOC_VERSION}-win32.zip" - SHA512 27b1b82e92d82c35158362435a29f590961b91f68cda21bffe46e52271340ea4587c4e3177668809af0d053b61e6efa69f0f62156ea11393cd9e6eb4474a3049 -) - set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}) -set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32) vcpkg_extract_source_archive(${ARCHIVE_FILE}) @@ -25,19 +18,29 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch" "${CMAKE_CURRENT_LIST_DIR}/export-ParseGeneratorParameter.patch" + "${CMAKE_CURRENT_LIST_DIR}/js-embed.patch" ) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32) + vcpkg_download_distfile(TOOL_ARCHIVE_FILE + URLS "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-win32.zip" + FILENAME "protoc-${PROTOC_VERSION}-win32.zip" + SHA512 27b1b82e92d82c35158362435a29f590961b91f68cda21bffe46e52271340ea4587c4e3177668809af0d053b61e6efa69f0f62156ea11393cd9e6eb4474a3049 + ) + + vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${TOOL_PATH}) +endif() -vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${TOOL_PATH}) # Disable the protobuf compiler when targeting UWP -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) +if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME) set(protobuf_BUILD_COMPILER OFF) else() set(protobuf_BUILD_COMPILER ON) endif() -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(protobuf_BUILD_SHARED_LIBS ON) else() set(protobuf_BUILD_SHARED_LIBS OFF) @@ -57,6 +60,7 @@ endif() 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} @@ -92,7 +96,7 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-debug.cmake " protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/share) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin) protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) else() @@ -107,5 +111,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) endif() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/protobuf RENAME copyright) -file(INSTALL ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(INSTALL ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +endif() vcpkg_copy_pdbs() diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index fa7d4a326..3fb715aec 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -1,6 +1,10 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP") endif() +if(VCPKG_CMAKE_SYSTEM_NAME) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pthreads-w32-2-9-1-release) diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index ffebda760..6f39484dd 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.8 +Version: 2.0.8-1 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 572fef829..a3cb80e3f 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -32,11 +32,32 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(EXISTS "${CURRENT_PACKAGES_DIR}/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") +elseif(EXISTS "${CURRENT_PACKAGES_DIR}/SDL2.framework/Resources") + vcpkg_fixup_cmake_targets(CONFIG_PATH "SDL2.framework/Resources") +endif() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/bin/sdl2-config + ${CURRENT_PACKAGES_DIR}/debug/bin/sdl2-config + ${CURRENT_PACKAGES_DIR}/SDL2.framework + ${CURRENT_PACKAGES_DIR}/debug/SDL2.framework +) -vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") +file(GLOB BINS ${CURRENT_PACKAGES_DIR}/debug/bin/* ${CURRENT_PACKAGES_DIR}/bin/*) +if(NOT BINS) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ) +endif() -if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(NOT VCPKG_CMAKE_SYSTEM_NAME) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDL2main.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDL2maind.lib) diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index f0d6df1ac..7d6e20dee 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -10,7 +10,7 @@ endif() add_library(sqlite3 sqlite3.c) target_compile_definitions(sqlite3 PRIVATE - $<$:-DSQLITE_DEBUG> + $<$:SQLITE_DEBUG> ${API} -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_UNLOCK_NOTIFY diff --git a/ports/szip/portfile.cmake b/ports/szip/portfile.cmake index 9fcd22ba1..c98f0e025 100644 --- a/ports/szip/portfile.cmake +++ b/ports/szip/portfile.cmake @@ -26,11 +26,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -file(RENAME ${CURRENT_PACKAGES_DIR}/share/szip/data/COPYING ${CURRENT_PACKAGES_DIR}/share/szip/copyright) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/szip) -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/szip/szip-targets-debug.cmake SZIP_TARGETS_DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" SZIP_TARGETS_DEBUG_MODULE "${SZIP_TARGETS_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/szip/szip-targets-debug.cmake "${SZIP_TARGETS_DEBUG_MODULE}") +file(RENAME ${CURRENT_PACKAGES_DIR}/share/szip/data/COPYING ${CURRENT_PACKAGES_DIR}/share/szip/copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/telnetpp/portfile.cmake b/ports/telnetpp/portfile.cmake index e52d69877..1859ad4a2 100644 --- a/ports/telnetpp/portfile.cmake +++ b/ports/telnetpp/portfile.cmake @@ -44,4 +44,4 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/telnetpp/telnetpp-config-debug.cmake "$ vcpkg_copy_pdbs() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp RENAME COPYRIGHT) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp RENAME copyright) diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL index 70bc8c107..1df7e49f2 100644 --- a/ports/tinyxml2/CONTROL +++ b/ports/tinyxml2/CONTROL @@ -1,3 +1,3 @@ Source: tinyxml2 -Version: 6.0.0 +Version: 6.0.0-2 Description: A simple, small, efficient, C++ XML parser diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake index cf8373e4f..0a7c887c5 100644 --- a/ports/tinyxml2/portfile.cmake +++ b/ports/tinyxml2/portfile.cmake @@ -29,6 +29,9 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -# Handle copyright -file(COPY ${SOURCE_PATH}/readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml2) +file(COPY + ${SOURCE_PATH}/readme.md + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml2 +) file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinyxml2/readme.md ${CURRENT_PACKAGES_DIR}/share/tinyxml2/copyright) diff --git a/ports/tinyxml2/vcpkg-cmake-wrapper.cmake b/ports/tinyxml2/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..867426f1e --- /dev/null +++ b/ports/tinyxml2/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,5 @@ +_find_package(${ARGS}) +if(TARGET tinyxml2_static AND NOT TARGET tinyxml2) + _add_library(tinyxml2 INTERFACE IMPORTED) + set_target_properties(tinyxml2 PROPERTIES INTERFACE_LINK_LIBRARIES "tinyxml2_static") +endif() diff --git a/ports/uvatlas/portfile.cmake b/ports/uvatlas/portfile.cmake index 79dc605f1..ae7e9f285 100644 --- a/ports/uvatlas/portfile.cmake +++ b/ports/uvatlas/portfile.cmake @@ -1,11 +1,3 @@ -# 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} -# - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(STATUS "Warning: Dynamic building not supported yet. Building static.") set(VCPKG_LIBRARY_LINKAGE static) @@ -13,6 +5,9 @@ endif() if (VCPKG_CRT_LINKAGE STREQUAL static) message(FATAL_ERROR "UVAtlas does not currently support static crt linkage") endif() +if(VCPKG_CMAKE_SYSTEM_NAME) + message(FATAL_ERROR "UVAtlas only supports Windows Desktop") +endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/UVAtlas-sept2016) @@ -23,7 +18,7 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") +IF(TRIPLET_SYSTEM_ARCH MATCHES "x86") SET(BUILD_ARCH "Win32") ELSE() SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) -- cgit v1.2.3 From 3421320c83f58d8314c422f67f0b3ce17657c688 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 12 Mar 2018 00:37:53 -0700 Subject: [evpp] Fix build and use external rapidjson --- ports/evpp/CONTROL | 4 +- ports/evpp/fix-rapidjson-1-1.patch | 159 +++++++++++++++++++++++++++++++++++++ ports/evpp/portfile.cmake | 7 ++ 3 files changed, 168 insertions(+), 2 deletions(-) create mode 100644 ports/evpp/fix-rapidjson-1-1.patch diff --git a/ports/evpp/CONTROL b/ports/evpp/CONTROL index 163052ae0..0c4f238f9 100644 --- a/ports/evpp/CONTROL +++ b/ports/evpp/CONTROL @@ -1,4 +1,4 @@ Source: evpp -Version: 0.6.1-1 +Version: 0.6.1-2 Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols. -Build-Depends: glog, libevent +Build-Depends: glog, libevent, rapidjson diff --git a/ports/evpp/fix-rapidjson-1-1.patch b/ports/evpp/fix-rapidjson-1-1.patch new file mode 100644 index 000000000..1dda0b895 --- /dev/null +++ b/ports/evpp/fix-rapidjson-1-1.patch @@ -0,0 +1,159 @@ +diff --git a/3rdparty/libhashkit/crc32.c b/3rdparty/libhashkit/crc32.c +index 6db0478..ff34194 100644 +--- a/3rdparty/libhashkit/crc32.c ++++ b/3rdparty/libhashkit/crc32.c +@@ -73,7 +73,7 @@ static const uint32_t crc32tab[256] = { + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, + }; + +-uint32_t hashkit_crc32(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_crc32(const char *key, size_t key_length, void * context) + { + uint64_t x; + uint32_t crc= UINT32_MAX; +diff --git a/3rdparty/libhashkit/fnv.c b/3rdparty/libhashkit/fnv.c +index ee3754d..d79fe39 100644 +--- a/3rdparty/libhashkit/fnv.c ++++ b/3rdparty/libhashkit/fnv.c +@@ -14,7 +14,7 @@ static uint64_t FNV_64_PRIME= UINT64_C(0x100000001b3); + static uint32_t FNV_32_INIT= 2166136261UL; + static uint32_t FNV_32_PRIME= 16777619; + +-uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void * context) + { + /* Thanks to pierre@demartines.com for the pointer */ + uint64_t hash= FNV_64_INIT; +@@ -28,7 +28,7 @@ uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context __att + return (uint32_t)hash; + } + +-uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void * context) + { + uint32_t hash= (uint32_t) FNV_64_INIT; + +@@ -42,7 +42,7 @@ uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context __at + return hash; + } + +-uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void * context) + { + uint32_t hash= FNV_32_INIT; + +@@ -56,7 +56,7 @@ uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context __att + return hash; + } + +-uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void * context) + { + uint32_t hash= FNV_32_INIT; + +diff --git a/3rdparty/libhashkit/hsieh.c b/3rdparty/libhashkit/hsieh.c +index ba46ed2..c3e9a38 100644 +--- a/3rdparty/libhashkit/hsieh.c ++++ b/3rdparty/libhashkit/hsieh.c +@@ -17,7 +17,7 @@ + +(uint32_t)(((const uint8_t *)(d))[0]) ) + #endif + +-uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_hsieh(const char *key, size_t key_length, void * context) + { + uint32_t hash = 0, tmp; + int rem; +diff --git a/3rdparty/libhashkit/jenkins.c b/3rdparty/libhashkit/jenkins.c +index b684d7a..2b59714 100644 +--- a/3rdparty/libhashkit/jenkins.c ++++ b/3rdparty/libhashkit/jenkins.c +@@ -56,7 +56,7 @@ use a bitmask. For example, if you need only 10 bits, do + In which case, the hash table should have hashsize(10) elements. + */ + +-uint32_t hashkit_jenkins(const char *key, size_t length, void *context __attribute__((unused))) ++uint32_t hashkit_jenkins(const char *key, size_t length, void * context) + { + uint32_t a,b,c; /* internal state */ + union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */ +diff --git a/3rdparty/libhashkit/md5.c b/3rdparty/libhashkit/md5.c +index 7371c6d..0e3181b 100644 +--- a/3rdparty/libhashkit/md5.c ++++ b/3rdparty/libhashkit/md5.c +@@ -352,7 +352,7 @@ unsigned int len) + (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); + } + +-uint32_t hashkit_md5(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_md5(const char *key, size_t key_length, void * context) + { + unsigned char results[16]; + +diff --git a/3rdparty/libhashkit/murmur.c b/3rdparty/libhashkit/murmur.c +index a18ac40..9e55eec 100644 +--- a/3rdparty/libhashkit/murmur.c ++++ b/3rdparty/libhashkit/murmur.c +@@ -17,7 +17,7 @@ + + #include "common.h" + +-uint32_t hashkit_murmur(const char *key, size_t length, void *context __attribute__((unused))) ++uint32_t hashkit_murmur(const char *key, size_t length, void * context) + { + /* + 'm' and 'r' are mixing constants generated offline. They're not +diff --git a/3rdparty/libhashkit/one_at_a_time.c b/3rdparty/libhashkit/one_at_a_time.c +index 579d044..539861c 100644 +--- a/3rdparty/libhashkit/one_at_a_time.c ++++ b/3rdparty/libhashkit/one_at_a_time.c +@@ -13,7 +13,7 @@ http://en.wikipedia.org/wiki/Jenkins_hash_function + + #include "common.h" + +-uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void * context) + { + const char *ptr= key; + uint32_t value= 0; +diff --git a/3rdparty/libhashkit/strerror.c b/3rdparty/libhashkit/strerror.c +index 270fa21..7446782 100644 +--- a/3rdparty/libhashkit/strerror.c ++++ b/3rdparty/libhashkit/strerror.c +@@ -8,7 +8,7 @@ + + #include "common.h" + +-const char *hashkit_strerror(hashkit_st *ptr __attribute__((unused)), hashkit_return_t rc) ++const char *hashkit_strerror(hashkit_st *ptr, hashkit_return_t rc) + { + switch (rc) + { +diff --git a/apps/evnsq/option.cc b/apps/evnsq/option.cc +index e2128f5..0248ace 100644 +--- a/apps/evnsq/option.cc ++++ b/apps/evnsq/option.cc +@@ -21,14 +21,14 @@ std::string Option::ToJSON() const { + doc.AddMember("write_timeout", rapidjson::Value(int64_t(write_timeout.Milliseconds())), doc.GetAllocator()); + doc.AddMember("msg_timeout", rapidjson::Value(int64_t(msg_timeout.Milliseconds())), doc.GetAllocator()); + +- doc.AddMember("client_id", rapidjson::Value(client_id, doc.GetAllocator()), doc.GetAllocator()); +- doc.AddMember("hostname", rapidjson::Value(hostname, doc.GetAllocator()), doc.GetAllocator()); +- doc.AddMember("user_agent", rapidjson::Value(user_agent, doc.GetAllocator()), doc.GetAllocator()); ++ doc.AddMember("client_id", rapidjson::Value(client_id.data(), client_id.size(), doc.GetAllocator()), doc.GetAllocator()); ++ doc.AddMember("hostname", rapidjson::Value(hostname.data(), hostname.size(), doc.GetAllocator()), doc.GetAllocator()); ++ doc.AddMember("user_agent", rapidjson::Value(user_agent.data(), user_agent.size(), doc.GetAllocator()), doc.GetAllocator()); + + doc.AddMember("heartbeat_interval", rapidjson::Value(int64_t(heartbeat_interval.Milliseconds())), doc.GetAllocator()); + + doc.AddMember("deflate", rapidjson::Value(false), doc.GetAllocator()); +- doc.AddMember("long_id", rapidjson::Value(hostname, doc.GetAllocator()), doc.GetAllocator()); ++ doc.AddMember("long_id", rapidjson::Value(hostname.data(), hostname.size(), doc.GetAllocator()), doc.GetAllocator()); + doc.AddMember("output_buffer_size", rapidjson::Value(int64_t(16384)), doc.GetAllocator()); + doc.AddMember("output_buffer_timeout", rapidjson::Value(int64_t(250)), doc.GetAllocator()); + doc.AddMember("feature_negotiation", rapidjson::Value(feature_negotiation), doc.GetAllocator()); +@@ -40,3 +40,4 @@ std::string Option::ToJSON() const { + return std::string(buffer.GetString(), buffer.GetSize()); + } + } ++ diff --git a/ports/evpp/portfile.cmake b/ports/evpp/portfile.cmake index db27b4d63..91831e083 100644 --- a/ports/evpp/portfile.cmake +++ b/ports/evpp/portfile.cmake @@ -20,10 +20,17 @@ else () SHA512 08226fe9853c1984f6554ede8f79a5767eec1d12ff2ff7172eef6f715ac7ea3f495b2336876823842408bd92b0ad99c9a3d506c07fc0add369f5cfa777f0406a HEAD_REF master ) + file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/rapidjson ${SOURCE_PATH}/3rdparty/concurrentqueue) + + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-rapidjson-1-1.patch + ) endif () vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DEVPP_VCPKG_BUILD=ON ) -- cgit v1.2.3 From ca2194d0ceda46f47749957487360141565e33e3 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 12 Mar 2018 00:45:18 -0700 Subject: [evpp] Upgrade to 0.7.0 --- ports/evpp/CONTROL | 2 +- ports/evpp/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/evpp/CONTROL b/ports/evpp/CONTROL index 0c4f238f9..741a94a22 100644 --- a/ports/evpp/CONTROL +++ b/ports/evpp/CONTROL @@ -1,4 +1,4 @@ Source: evpp -Version: 0.6.1-2 +Version: 0.7.0 Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols. Build-Depends: glog, libevent, rapidjson diff --git a/ports/evpp/portfile.cmake b/ports/evpp/portfile.cmake index 91831e083..b20642bdd 100644 --- a/ports/evpp/portfile.cmake +++ b/ports/evpp/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) set(EVPP_LOCAL_TEST OFF) -set(EVPP_VERSION 0.6.1) +set(EVPP_VERSION 0.7.0) if (EVPP_LOCAL_TEST) set(EVPP_HASH bfefb3f7c1f620fbca2c3d94e2e7c39aa963156a084caf39bcc348a9380f97c73c9ee965126434d71c8b14836e669d554ed98632b3bb38eb65b421fd8eff49b2) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/evpp) @@ -17,7 +17,7 @@ else () OUT_SOURCE_PATH SOURCE_PATH REPO Qihoo360/evpp REF v${EVPP_VERSION} - SHA512 08226fe9853c1984f6554ede8f79a5767eec1d12ff2ff7172eef6f715ac7ea3f495b2336876823842408bd92b0ad99c9a3d506c07fc0add369f5cfa777f0406a + SHA512 ddcef8d2af6b3c46473d755c0f0994d63d56240ea85d6b44ceb6b77724c3c56bbf1156f7188e270fb5f9f36f25bfc2f96669d7249a34c921922671e3fe267e88 HEAD_REF master ) file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/rapidjson ${SOURCE_PATH}/3rdparty/concurrentqueue) -- cgit v1.2.3 From 148cb369d8934d32e37ef8e15c95476ec8e5968a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 12 Mar 2018 00:51:45 -0700 Subject: [libzip] Upgrade to 1.5.0 --- ports/libzip/CONTROL | 2 +- ports/libzip/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL index f827f4d71..450687f4f 100644 --- a/ports/libzip/CONTROL +++ b/ports/libzip/CONTROL @@ -1,4 +1,4 @@ Source: libzip -Version: 1.4.0-1 +Version: rel-1-5-0 Build-Depends: zlib Description: A library for reading, creating, and modifying zip archives. diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake index 5c1f02704..dee085f6c 100644 --- a/ports/libzip/portfile.cmake +++ b/ports/libzip/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nih-at/libzip - REF ad1f02d3b2aac532a89cbf8fd21f55677789b82d - SHA512 b1ed427916ec555ead454d39a244502f64bbc8799c20394944797b878196f1b9a9dda64be218fe89bb1747c841d7b36e8e7fb7b0be1fbdf777f049cd823635d6 + REF rel-1-5-0 + SHA512 d8267dd86231d82e0d14fc3e47c7deed3f54bccbc734dff12a7e2522422653f64ebdb76b35b9eb4326227ae89e06bd4cad263558c8312220ff5979b3b2299460 ) # Patch cmake and configuration to allow static builds -- cgit v1.2.3 From cc3d12b16b84377368e5e5b001aeb75877d85ce5 Mon Sep 17 00:00:00 2001 From: yurybura Date: Mon, 12 Mar 2018 19:16:43 +0300 Subject: [rocksdb] Fix build and use debug suffix 'd' [gtest] Fix issue #2373 --- ports/benchmark/portfile.cmake | 1 + ports/gflags/portfile.cmake | 1 + ports/lz4/portfile.cmake | 3 ++- ports/rocksdb/0001-third-party.patch | 8 ++++---- ports/rocksdb/CONTROL | 2 +- ports/rocksdb/portfile.cmake | 8 +++----- ports/snappy/portfile.cmake | 3 ++- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake index 1832174fe..e76bce6ff 100644 --- a/ports/benchmark/portfile.cmake +++ b/ports/benchmark/portfile.cmake @@ -26,6 +26,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DBENCHMARK_ENABLE_TESTING=OFF + -DCMAKE_DEBUG_POSTFIX=d ) vcpkg_install_cmake() diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index ee730d442..31ffeafa5 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -25,6 +25,7 @@ vcpkg_configure_cmake( -DGFLAGS_REGISTER_BUILD_DIR:BOOL=OFF -DGFLAGS_REGISTER_INSTALL_PREFIX:BOOL=OFF -DBUILD_gflags_nothreads_LIB:BOOL=OFF + -DCMAKE_DEBUG_POSTFIX=d ) vcpkg_install_cmake() diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake index 1928d7e70..6150a35e6 100644 --- a/ports/lz4/portfile.cmake +++ b/ports/lz4/portfile.cmake @@ -12,7 +12,8 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS_DEBUG - -DLZ4_SKIP_INCLUDES=ON) + -DLZ4_SKIP_INCLUDES=ON + -DCMAKE_DEBUG_POSTFIX=d) vcpkg_install_cmake() vcpkg_copy_pdbs() diff --git a/ports/rocksdb/0001-third-party.patch b/ports/rocksdb/0001-third-party.patch index c28181623..0b0e3fa8c 100644 --- a/ports/rocksdb/0001-third-party.patch +++ b/ports/rocksdb/0001-third-party.patch @@ -21,8 +21,8 @@ index a364d1d..1d85d50 100644 -set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/bin/retail/amd64/gflags.lib) +set(GFLAGS_HOME ${CURRENT_INSTALLED_DIR}) +set(GFLAGS_INCLUDE ${GFLAGS_HOME}/include) -+find_library(GFLAGS_LIB_DEBUG NAMES gflags gflags_static) -+set(GFLAGS_LIB_RELEASE ${GFLAGS_LIB_DEBUG}) ++set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/debug/lib/gflagsd.lib) ++set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/lib/gflags.lib) # ================================================== GFLAGS ================================================== # @@ -36,7 +36,7 @@ index a364d1d..1d85d50 100644 -set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/bin/retail/amd64/snappy.lib) +set(SNAPPY_HOME ${CURRENT_INSTALLED_DIR}) +set(SNAPPY_INCLUDE ${SNAPPY_HOME}/include) -+set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/debug/lib/snappy.lib) ++set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/debug/lib/snappyd.lib) +set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/lib/snappy.lib) # @@ -51,7 +51,7 @@ index a364d1d..1d85d50 100644 -set(LZ4_LIB_RELEASE ${LZ4_HOME}/bin/retail/amd64/lz4.lib) +set(LZ4_HOME ${CURRENT_INSTALLED_DIR}) +set(LZ4_INCLUDE ${LZ4_HOME}/include) -+set(LZ4_LIB_DEBUG ${LZ4_HOME}/debug/lib/lz4.lib) ++set(LZ4_LIB_DEBUG ${LZ4_HOME}/debug/lib/lz4d.lib) +set(LZ4_LIB_RELEASE ${LZ4_HOME}/lib/lz4.lib) # diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 19383f54a..f317433b5 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,4 @@ Source: rocksdb Version: 5.10.4-1 Description: A library that provides an embeddable, persistent key-value store for fast storage -Build-Depends: snappy, lz4, zlib, gtest +Build-Depends: snappy, gflags, lz4, zlib diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 740c40114..ae60e824e 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -1,9 +1,5 @@ include(vcpkg_common_functions) -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - message(FATAL_ERROR "Rocksdb only supports x64") -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/rocksdb @@ -41,9 +37,11 @@ vcpkg_configure_cmake( -DROCKSDB_INSTALL_ON_WINDOWS=ON -DFAIL_ON_WARNINGS=OFF -DWITH_MD_LIBRARY=${WITH_MD_LIBRARY} + -DPORTABLE=ON + -DCMAKE_DEBUG_POSTFIX=d -DROCKSDB_DISABLE_INSTALL_SHARED_LIB=${ROCKSDB_DISABLE_INSTALL_SHARED_LIB} -DROCKSDB_DISABLE_INSTALL_STATIC_LIB=${ROCKSDB_DISABLE_INSTALL_STATIC_LIB} - -DROCKSDB_VERSION=5.10.3 + -DROCKSDB_VERSION=5.10.4 -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} -DCMAKE_DISABLE_FIND_PACKAGE_TBB=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_NUMA=TRUE diff --git a/ports/snappy/portfile.cmake b/ports/snappy/portfile.cmake index f0169c8f2..c88ff60eb 100644 --- a/ports/snappy/portfile.cmake +++ b/ports/snappy/portfile.cmake @@ -12,7 +12,8 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DSNAPPY_BUILD_TESTS=OFF) + -DSNAPPY_BUILD_TESTS=OFF + -DCMAKE_DEBUG_POSTFIX=d) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Snappy) -- cgit v1.2.3 From f2ab816e81518e5f7060c11cab24200c1256f239 Mon Sep 17 00:00:00 2001 From: gouranga Date: Mon, 12 Mar 2018 19:45:33 +0300 Subject: [WTL] Update to 10.0.7336 --- ports/wtl/CONTROL | 2 +- ports/wtl/portfile.cmake | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ports/wtl/CONTROL b/ports/wtl/CONTROL index 6f8b6208e..bab8da1f2 100644 --- a/ports/wtl/CONTROL +++ b/ports/wtl/CONTROL @@ -1,5 +1,5 @@ Source: wtl Maintainer: jfrederich@gmail.com -Version: 9.1 +Version: 10.0 Description: Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components. Build-Depends: diff --git a/ports/wtl/portfile.cmake b/ports/wtl/portfile.cmake index c8d8c6c34..d992b276a 100644 --- a/ports/wtl/portfile.cmake +++ b/ports/wtl/portfile.cmake @@ -1,9 +1,9 @@ #header-only library include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/project/wtl/WTL%209.1/WTL%209.1.5321%20Final/WTL91_5321_Final.zip?r=&ts=1477467616&use_mirror=netix" - FILENAME "WTL91_5321_Final.zip" - SHA512 52c583f6773839f7ad7fccf0ecba44ad00f41af4ae97d217619cc380ea9b71b90638ae35a5995f9eb08854db423896fec5f06b5cbd853f118eeddd05238a460a + URLS "http://downloads.sourceforge.net/project/wtl/WTL%2010/WTL%2010.0.7336/WTL10_7336.zip" + FILENAME "WTL10_7336.zip" + SHA512 68368be0b35fba97ed63fd684e98c077ab94ea2ce928693da7f1f48e2547486109e045e026218a7c8652aec46930b79572679c0b79afaa75a3dbf98572e4d9b5 ) vcpkg_extract_source_archive(${ARCHIVE}) @@ -13,3 +13,4 @@ file(COPY ${CURRENT_BUILDTREES_DIR}/src/MS-PL.txt DESTINATION ${CURRENT_PACKAGES file(RENAME ${CURRENT_PACKAGES_DIR}/share/wtl/MS-PL.txt ${CURRENT_PACKAGES_DIR}/share/wtl/copyright) file(COPY ${CURRENT_BUILDTREES_DIR}/src/samples DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/appwizard DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) -- cgit v1.2.3 From 23a876d2177992b90d47c7acf2b8dd30e93c581f Mon Sep 17 00:00:00 2001 From: yurybura Date: Mon, 12 Mar 2018 19:51:25 +0300 Subject: [gtest] Fix issue #2373 --- ports/gtest/portfile.cmake | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index b1f9e5dce..b5f3e58c8 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -25,6 +25,7 @@ vcpkg_configure_cmake( OPTIONS -DBUILD_GMOCK=ON -DBUILD_GTEST=ON + -DCMAKE_DEBUG_POSTFIX=d -Dgtest_force_shared_crt=${GTEST_FORCE_SHARED_CRT} ) @@ -60,12 +61,12 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/bin/gmock.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/bin/gmock_main.dll) endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll) +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.dll) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin/) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_main.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_main.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtestd.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_maind.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_maind.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmockd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmockd.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_maind.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_maind.dll) endif() if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.lib) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) @@ -74,12 +75,12 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock_main.lib) endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.lib) +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.lib) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtestd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest_maind.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmockd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_maind.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtestd.lib) + 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/gmockd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmockd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_maind.lib) endif() vcpkg_copy_pdbs() -- cgit v1.2.3 From ffb77253557b7b640c4b5dd6fb13c77b2608df4e Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Mon, 12 Mar 2018 22:44:59 +0300 Subject: Update versions --- ports/benchmark/CONTROL | 2 +- ports/gflags/CONTROL | 2 +- ports/gtest/CONTROL | 2 +- ports/lz4/CONTROL | 2 +- ports/rocksdb/CONTROL | 2 +- ports/snappy/CONTROL | 2 +- ports/zlib/CONTROL | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/benchmark/CONTROL b/ports/benchmark/CONTROL index 9e6262e1b..5b56de372 100644 --- a/ports/benchmark/CONTROL +++ b/ports/benchmark/CONTROL @@ -1,3 +1,3 @@ Source: benchmark -Version: 1.3.0 +Version: 1.3.0-1 Description: A library to support the benchmarking of functions, similar to unit-tests. diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index 72f2937b7..0a8d83aee 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.2.1-2 +Version: 2.2.1-3 Description: A C++ library that implements commandline flags processing diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index f41aec0b9..e76e815c4 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,3 +1,3 @@ Source: gtest -Version: 1.8.0-6 +Version: 1.8.0-7 Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL index ae7d57377..4a0f53689 100644 --- a/ports/lz4/CONTROL +++ b/ports/lz4/CONTROL @@ -1,3 +1,3 @@ Source: lz4 -Version: 1.8.1.2 +Version: 1.8.1.2-1 Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core. diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index f317433b5..161abe80e 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,4 @@ Source: rocksdb -Version: 5.10.4-1 +Version: 5.10.4-2 Description: A library that provides an embeddable, persistent key-value store for fast storage Build-Depends: snappy, gflags, lz4, zlib diff --git a/ports/snappy/CONTROL b/ports/snappy/CONTROL index 230383955..d90f5039c 100644 --- a/ports/snappy/CONTROL +++ b/ports/snappy/CONTROL @@ -1,3 +1,3 @@ Source: snappy -Version: 1.1.7-1 +Version: 1.1.7-2 Description: A fast compressor/decompressor. diff --git a/ports/zlib/CONTROL b/ports/zlib/CONTROL index c55963783..657a8e0ae 100644 --- a/ports/zlib/CONTROL +++ b/ports/zlib/CONTROL @@ -1,3 +1,3 @@ Source: zlib -Version: 1.2.11-3 +Version: 1.2.11-4 Description: A compression library -- cgit v1.2.3 From 92eb878b3efdb780097178125066a6070869c954 Mon Sep 17 00:00:00 2001 From: Yury Bura Date: Mon, 12 Mar 2018 23:12:22 +0300 Subject: Revert version --- ports/zlib/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/zlib/CONTROL b/ports/zlib/CONTROL index 657a8e0ae..c55963783 100644 --- a/ports/zlib/CONTROL +++ b/ports/zlib/CONTROL @@ -1,3 +1,3 @@ Source: zlib -Version: 1.2.11-4 +Version: 1.2.11-3 Description: A compression library -- cgit v1.2.3 From c4457ea6a70d890ceae0b81a89d677eee28f7645 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 01:52:00 -0700 Subject: [matio][rocksdb] Fix build --- ports/matio/CMakeLists.txt | 5 +-- ports/matio/portfile.cmake | 3 +- ports/rocksdb/0001-third-party.patch | 76 ------------------------------------ ports/rocksdb/CONTROL | 4 +- ports/rocksdb/portfile.cmake | 14 ++++--- ports/rocksdb/use-find-package.patch | 13 ++++++ 6 files changed, 26 insertions(+), 89 deletions(-) delete mode 100644 ports/rocksdb/0001-third-party.patch create mode 100644 ports/rocksdb/use-find-package.patch diff --git a/ports/matio/CMakeLists.txt b/ports/matio/CMakeLists.txt index 31b7e1e2b..6c21bbf53 100644 --- a/ports/matio/CMakeLists.txt +++ b/ports/matio/CMakeLists.txt @@ -30,9 +30,8 @@ find_package(ZLIB REQUIRED) target_link_libraries(libmatio PRIVATE ZLIB::ZLIB) target_compile_definitions(libmatio PRIVATE -DHAVE_ZLIB=1) -find_package(HDF5 REQUIRED) -target_include_directories(libmatio PRIVATE ${HDF5_INCLUDE_DIRS} ) -target_link_libraries(libmatio PRIVATE ${HDF5_C_LIBRARIES}) +find_package(hdf5 CONFIG REQUIRED) +target_link_libraries(libmatio PRIVATE hdf5::hdf5-shared hdf5::hdf5_hl-shared) if(BUILD_SHARED_LIBS) target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_DYNAMIC_LIB) else() diff --git a/ports/matio/portfile.cmake b/ports/matio/portfile.cmake index 5752e635c..ac9ca5c45 100644 --- a/ports/matio/portfile.cmake +++ b/ports/matio/portfile.cmake @@ -9,10 +9,9 @@ vcpkg_from_github( 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 ) diff --git a/ports/rocksdb/0001-third-party.patch b/ports/rocksdb/0001-third-party.patch deleted file mode 100644 index 0b0e3fa8c..000000000 --- a/ports/rocksdb/0001-third-party.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 533ab1b3f3f4286aa756e965e22aa88612479e01 Mon Sep 17 00:00:00 2001 -From: Robert Schumacher -Date: Fri, 23 Feb 2018 01:44:44 -0800 -Subject: [PATCH 1/3] third-party - ---- - thirdparty.inc | 32 ++++++++++++++++---------------- - 1 file changed, 16 insertions(+), 16 deletions(-) - -diff --git a/thirdparty.inc b/thirdparty.inc -index a364d1d..1d85d50 100644 ---- a/thirdparty.inc -+++ b/thirdparty.inc -@@ -19,10 +19,10 @@ set (THIRDPARTY_LIBS "") # Initialization, don't touch - # - # Edit these 4 lines to define paths to GFLAGS - # --set(GFLAGS_HOME $ENV{THIRDPARTY_HOME}/Gflags.Library) --set(GFLAGS_INCLUDE ${GFLAGS_HOME}/inc/include) --set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/bin/debug/amd64/gflags.lib) --set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/bin/retail/amd64/gflags.lib) -+set(GFLAGS_HOME ${CURRENT_INSTALLED_DIR}) -+set(GFLAGS_INCLUDE ${GFLAGS_HOME}/include) -+set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/debug/lib/gflagsd.lib) -+set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/lib/gflags.lib) - - # ================================================== GFLAGS ================================================== - # -@@ -63,10 +63,10 @@ endif () - # - # Edit these 4 lines to define paths to Snappy - # --set(SNAPPY_HOME $ENV{THIRDPARTY_HOME}/Snappy.Library) --set(SNAPPY_INCLUDE ${SNAPPY_HOME}/inc/inc) --set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/bin/debug/amd64/snappy.lib) --set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/bin/retail/amd64/snappy.lib) -+set(SNAPPY_HOME ${CURRENT_INSTALLED_DIR}) -+set(SNAPPY_INCLUDE ${SNAPPY_HOME}/include) -+set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/debug/lib/snappyd.lib) -+set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/lib/snappy.lib) - - # - # Don't touch these lines -@@ -106,10 +106,10 @@ endif () - # - # Edit these 4 lines to define paths to LZ4 - # --set(LZ4_HOME $ENV{THIRDPARTY_HOME}/LZ4.Library) --set(LZ4_INCLUDE ${LZ4_HOME}/inc/include) --set(LZ4_LIB_DEBUG ${LZ4_HOME}/bin/debug/amd64/lz4.lib) --set(LZ4_LIB_RELEASE ${LZ4_HOME}/bin/retail/amd64/lz4.lib) -+set(LZ4_HOME ${CURRENT_INSTALLED_DIR}) -+set(LZ4_INCLUDE ${LZ4_HOME}/include) -+set(LZ4_LIB_DEBUG ${LZ4_HOME}/debug/lib/lz4d.lib) -+set(LZ4_LIB_RELEASE ${LZ4_HOME}/lib/lz4.lib) - - # - # Don't touch these lines -@@ -149,10 +149,10 @@ endif () - # - # Edit these 4 lines to define paths to ZLIB - # --set(ZLIB_HOME $ENV{THIRDPARTY_HOME}/ZLIB.Library) --set(ZLIB_INCLUDE ${ZLIB_HOME}/inc/include) --set(ZLIB_LIB_DEBUG ${ZLIB_HOME}/bin/debug/amd64/zlib.lib) --set(ZLIB_LIB_RELEASE ${ZLIB_HOME}/bin/retail/amd64/zlib.lib) -+set(ZLIB_HOME ${CURRENT_INSTALLED_DIR}) -+set(ZLIB_INCLUDE ${ZLIB_HOME}/include) -+set(ZLIB_LIB_DEBUG ${ZLIB_HOME}/debug/lib/zlibd.lib) -+set(ZLIB_LIB_RELEASE ${ZLIB_HOME}/lib/zlib.lib) - - # - # Don't touch these lines --- -2.16.2.windows.1 - diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 161abe80e..cba7757d1 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,4 @@ Source: rocksdb -Version: 5.10.4-2 +Version: 5.10.4-3 Description: A library that provides an embeddable, persistent key-value store for fast storage -Build-Depends: snappy, gflags, lz4, zlib +Build-Depends: zlib diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index ae60e824e..66541caa1 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -11,11 +11,13 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/0001-third-party.patch" "${CMAKE_CURRENT_LIST_DIR}/0002-disable-gtest.patch" "${CMAKE_CURRENT_LIST_DIR}/0003-only-build-one-flavor.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-find-package.patch" ) +file(REMOVE "${SOURCE_PATH}/cmake/modules/Findzlib.cmake") + if(VCPKG_CRT_LINKAGE STREQUAL "static") set(WITH_MD_LIBRARY OFF) else() @@ -29,10 +31,10 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DGFLAGS=1 - -DSNAPPY=1 - -DLZ4=1 - -DZLIB=1 + -DWITH_GFLAGS=0 + -DWITH_SNAPPY=0 + -DWITH_LZ4=0 + -DWITH_ZLIB=1 -DWITH_TESTS=OFF -DROCKSDB_INSTALL_ON_WINDOWS=ON -DFAIL_ON_WARNINGS=OFF @@ -41,7 +43,7 @@ vcpkg_configure_cmake( -DCMAKE_DEBUG_POSTFIX=d -DROCKSDB_DISABLE_INSTALL_SHARED_LIB=${ROCKSDB_DISABLE_INSTALL_SHARED_LIB} -DROCKSDB_DISABLE_INSTALL_STATIC_LIB=${ROCKSDB_DISABLE_INSTALL_STATIC_LIB} - -DROCKSDB_VERSION=5.10.4 + -DROCKSDB_VERSION=5.11.3 -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} -DCMAKE_DISABLE_FIND_PACKAGE_TBB=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_NUMA=TRUE diff --git a/ports/rocksdb/use-find-package.patch b/ports/rocksdb/use-find-package.patch new file mode 100644 index 000000000..1a79c2286 --- /dev/null +++ b/ports/rocksdb/use-find-package.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f3ac9ce..931e9f2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,7 +45,7 @@ option(WITH_JEMALLOC "build with JeMalloc" OFF) + option(WITH_SNAPPY "build with SNAPPY" OFF) + option(WITH_LZ4 "build with lz4" OFF) + option(WITH_ZLIB "build with zlib" OFF) +-if(MSVC) ++if(MSVC AND NOT VCPKG_TOOLCHAIN) + # Defaults currently different for GFLAGS. + # We will address find_package work a little later + option(WITH_GFLAGS "build with GFlags" OFF) -- cgit v1.2.3 From 81b9ab1291bd322b5de8ad0cec2f21ce4d828a28 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 04:26:00 -0700 Subject: [vcpkg] Refactor do_build_package and add archive tombstoning --- toolsrc/include/vcpkg/paragraphs.h | 2 +- toolsrc/src/vcpkg/build.cpp | 238 ++++++++++++++++++++----------------- toolsrc/src/vcpkg/install.cpp | 2 +- toolsrc/src/vcpkg/paragraphs.cpp | 2 +- 4 files changed, 132 insertions(+), 112 deletions(-) diff --git a/toolsrc/include/vcpkg/paragraphs.h b/toolsrc/include/vcpkg/paragraphs.h index e2c7f2d99..fa0265b75 100644 --- a/toolsrc/include/vcpkg/paragraphs.h +++ b/toolsrc/include/vcpkg/paragraphs.h @@ -20,7 +20,7 @@ namespace vcpkg::Paragraphs Parse::ParseExpected try_load_port(const Files::Filesystem& fs, const fs::path& control_path); - Expected try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec); + Expected try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec); struct LoadResults { diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 408dde798..7abd5ae0a 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -315,8 +315,90 @@ namespace vcpkg::Build } static ExtendedBuildResult do_build_package(const VcpkgPaths& paths, + const PreBuildInfo& pre_build_info, + const PackageSpec& spec, + const std::string& abi_tag, const BuildPackageConfig& config, const StatusParagraphs& status_db) + { + auto& fs = paths.get_filesystem(); + const Triplet& triplet = spec.triplet(); + + const fs::path& cmake_exe_path = paths.get_cmake_exe(); + const fs::path& git_exe_path = paths.get_git_exe(); + + 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); + const std::string cmd_launch_cmake = System::make_cmake_cmd( + cmake_exe_path, + paths.ports_cmake, + { + {"CMD", "BUILD"}, + {"PORT", config.scf.core_paragraph->name}, + {"CURRENT_PORT_DIR", config.port_dir / "/."}, + {"TARGET_TRIPLET", spec.triplet().canonical_name()}, + {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, + {"VCPKG_USE_HEAD_VERSION", + Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, + {"_VCPKG_NO_DOWNLOADS", !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, + {"GIT", git_exe_path}, + {"FEATURES", Strings::join(";", config.feature_list)}, + {"ALL_FEATURES", all_features}, + }); + + auto command = make_build_env_cmd(pre_build_info, toolset); + if (!command.empty()) command.append(" && "); + command.append(cmd_launch_cmake); + + const auto timer = Chrono::ElapsedTimer::create_started(); + + const int return_code = System::cmd_execute_clean(command); + const auto buildtimeus = timer.microseconds(); + const auto spec_string = spec.to_string(); + + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_buildtime(spec.to_string() + ":[" + Strings::join(",", config.feature_list) + "]", + buildtimeus); + if (return_code != 0) + { + locked_metrics->track_property("error", "build failed"); + locked_metrics->track_property("build_error", spec_string); + return BuildResult::BUILD_FAILED; + } + } + + 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); + + auto bcf = create_binary_control_file(*config.scf.core_paragraph, triplet, build_info, abi_tag); + + if (error_count != 0) + { + return BuildResult::POST_BUILD_CHECKS_FAILED; + } + for (auto&& feature : config.feature_list) + { + for (auto&& f_pgh : config.scf.feature_paragraphs) + { + if (f_pgh->name == feature) + bcf->features.push_back( + create_binary_feature_control_file(*config.scf.core_paragraph, *f_pgh, triplet)); + } + } + + write_binary_control_file(paths, *bcf); + return {BuildResult::SUCCEEDED, std::move(bcf)}; + } + + ExtendedBuildResult build_package(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const StatusParagraphs& status_db) { auto& fs = paths.get_filesystem(); const Triplet& triplet = config.triplet; @@ -359,9 +441,6 @@ namespace vcpkg::Build } const fs::path& cmake_exe_path = paths.get_cmake_exe(); - const fs::path& git_exe_path = paths.get_git_exe(); - - const fs::path ports_cmake_script_path = paths.ports_cmake; if (GlobalState::g_binary_caching) { @@ -420,124 +499,66 @@ namespace vcpkg::Build std::unique_ptr bcf; - auto archives_dir = paths.root / "archives"; - if (!abi_tag.empty()) - { - archives_dir /= abi_tag.substr(0, 2); - } - auto archive_path = archives_dir / (abi_tag + ".zip"); + auto archives_root_dir = paths.root / "archives"; + auto archive_name = abi_tag + ".zip"; + auto archive_subpath = abi_tag.empty() ? fs::path() : fs::u8path(abi_tag.substr(0, 2)) / archive_name; + auto archive_path = archives_root_dir / archive_subpath; + auto archive_tombstone_path = archives_root_dir / "fail" / archive_subpath; - if (GlobalState::g_binary_caching && !abi_tag.empty() && fs.exists(archive_path)) + auto found_archive = false; + + if (GlobalState::g_binary_caching && !abi_tag.empty()) { - System::println("Using cached binary package: %s", archive_path.u8string()); + if (fs.exists(archive_path)) + { + System::println("Using cached binary package: %s", archive_path.u8string()); - auto pkg_path = paths.package_dir(spec); - 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()); + auto pkg_path = paths.package_dir(spec); + 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()); #if defined(_WIN32) - auto&& _7za = paths.get_7za_exe(); + auto&& _7za = paths.get_7za_exe(); - System::cmd_execute_clean(Strings::format( - R"("%s" x "%s" -o"%s" -y >nul)", _7za.u8string(), archive_path.u8string(), pkg_path.u8string())); + System::cmd_execute_clean(Strings::format( + R"("%s" x "%s" -o"%s" -y >nul)", _7za.u8string(), archive_path.u8string(), pkg_path.u8string())); #else - System::cmd_execute_clean(Strings::format( - R"(unzip -qq "%s" "-d%s")", archive_path.u8string(), pkg_path.u8string())); + System::cmd_execute_clean(Strings::format( + R"(unzip -qq "%s" "-d%s")", archive_path.u8string(), pkg_path.u8string())); #endif - auto maybe_bcf = Paragraphs::try_load_cached_control_package(paths, spec); - bcf = std::make_unique(std::move(maybe_bcf).value_or_exit(VCPKG_LINE_INFO)); - } - else - { - if (GlobalState::g_binary_caching && !abi_tag.empty()) - { - System::println("Could not locate cached archive: %s", archive_path.u8string()); + auto maybe_bcf = Paragraphs::try_load_cached_package(paths, spec); + bcf = std::make_unique(std::move(maybe_bcf).value_or_exit(VCPKG_LINE_INFO)); + found_archive = true; + return {BuildResult::SUCCEEDED, std::move(bcf)}; } - - std::string all_features; - for (auto& feature : config.scf.feature_paragraphs) + else if (fs.exists(archive_tombstone_path)) { - all_features.append(feature->name + ";"); - } - - const Toolset& toolset = paths.get_toolset(pre_build_info); - const std::string cmd_launch_cmake = System::make_cmake_cmd( - cmake_exe_path, - ports_cmake_script_path, - { - {"CMD", "BUILD"}, - {"PORT", config.scf.core_paragraph->name}, - {"CURRENT_PORT_DIR", config.port_dir / "/."}, - {"TARGET_TRIPLET", triplet.canonical_name()}, - {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, - {"VCPKG_USE_HEAD_VERSION", - Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, - {"_VCPKG_NO_DOWNLOADS", - !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, - {"GIT", git_exe_path}, - {"FEATURES", features}, - {"ALL_FEATURES", all_features}, - }); - - auto command = make_build_env_cmd(pre_build_info, toolset); - if (!command.empty()) command.append(" && "); - command.append(cmd_launch_cmake); - - const auto timer = Chrono::ElapsedTimer::create_started(); - - const int return_code = System::cmd_execute_clean(command); - const auto buildtimeus = timer.microseconds(); - const auto spec_string = spec.to_string(); - - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_buildtime(spec.to_string() + ":[" + Strings::join(",", config.feature_list) + "]", - buildtimeus); - if (return_code != 0) - { - locked_metrics->track_property("error", "build failed"); - locked_metrics->track_property("build_error", spec_string); - return BuildResult::BUILD_FAILED; - } + System::println("Found failure tombstone: %s", archive_tombstone_path.u8string()); + return BuildResult::BUILD_FAILED; } + } - 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); + if (GlobalState::g_binary_caching && !abi_tag.empty()) + { + System::println("Could not locate cached archive: %s", archive_path.u8string()); + } - bcf = create_binary_control_file(*config.scf.core_paragraph, triplet, build_info, abi_tag); + ExtendedBuildResult result = do_build_package(paths, pre_build_info, spec, abi_tag, config, status_db); - if (error_count != 0) - { - return BuildResult::POST_BUILD_CHECKS_FAILED; - } - for (auto&& feature : config.feature_list) + if (GlobalState::g_binary_caching && !abi_tag.empty()) + { + if (result.code == BuildResult::SUCCEEDED) { - for (auto&& f_pgh : config.scf.feature_paragraphs) - { - if (f_pgh->name == feature) - bcf->features.push_back( - create_binary_feature_control_file(*config.scf.core_paragraph, *f_pgh, triplet)); - } - } + auto tmp_archive_path = paths.buildtrees / spec.name() / (triplet.to_string() + ".zip"); - if (GlobalState::g_binary_caching && !abi_tag.empty()) - { std::error_code ec; fs.write_contents( paths.package_dir(spec) / "share" / spec.name() / "vcpkg_abi_info.txt", full_abi_info, ec); - } - - write_binary_control_file(paths, *bcf); - if (GlobalState::g_binary_caching && !abi_tag.empty()) - { - auto tmp_archive_path = paths.buildtrees / spec.name() / (spec.triplet().to_string() + ".zip"); - - std::error_code ec; fs.remove(tmp_archive_path, ec); Checks::check_exit(VCPKG_LINE_INFO, !fs.exists(tmp_archive_path), @@ -557,21 +578,20 @@ namespace vcpkg::Build paths.package_dir(spec).u8string(), tmp_archive_path.u8string())); #endif - fs.create_directories(archives_dir, ec); + fs.create_directories(archive_path.parent_path(), ec); fs.rename(tmp_archive_path, archive_path); System::println("Stored binary cache: %s", archive_path.u8string()); } + else if (result.code == BuildResult::BUILD_FAILED || result.code == BuildResult::POST_BUILD_CHECKS_FAILED) + { + // Build failed, so store failure archive + std::error_code ec; + fs.create_directories(archive_tombstone_path.parent_path(), ec); + fs.write_contents(archive_tombstone_path, "", ec); + } } - return {BuildResult::SUCCEEDED, std::move(bcf)}; - } - - ExtendedBuildResult build_package(const VcpkgPaths& paths, - const BuildPackageConfig& config, - const StatusParagraphs& status_db) - { - ExtendedBuildResult result = do_build_package(paths, config, status_db); if (config.build_package_options.clean_buildtrees == CleanBuildtrees::YES) { diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 46c7c53b8..7d36fba82 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -306,7 +306,7 @@ namespace vcpkg::Install System::println("Building package %s... done", display_name_with_features); auto bcf = std::make_unique( - Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO)); + Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO)); auto code = aux_install(display_name_with_features, *bcf); if (action.build_options.clean_packages == Build::CleanPackages::YES) diff --git a/toolsrc/src/vcpkg/paragraphs.cpp b/toolsrc/src/vcpkg/paragraphs.cpp index b66d53994..d0b0c0abf 100644 --- a/toolsrc/src/vcpkg/paragraphs.cpp +++ b/toolsrc/src/vcpkg/paragraphs.cpp @@ -228,7 +228,7 @@ namespace vcpkg::Paragraphs return error_info; } - Expected try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec) + Expected try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec) { Expected>> pghs = get_paragraphs(paths.get_filesystem(), paths.package_dir(spec) / "CONTROL"); -- cgit v1.2.3 From ab09c4a277737b2486190e7a089055e9ad22610d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 05:09:32 -0700 Subject: [libssh] Bake in LIBSSH_STATIC --- ports/libssh/CONTROL | 4 ++-- ports/libssh/portfile.cmake | 15 ++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL index 9ae256937..692a6f4b8 100644 --- a/ports/libssh/CONTROL +++ b/ports/libssh/CONTROL @@ -1,4 +1,4 @@ Source: libssh -Version: 0.7.5-1 -Description:libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side +Version: 0.7.5-2 +Description: libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side Build-Depends: zlib, openssl diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index 8cac84063..36ece7321 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -15,20 +15,25 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DWITH_STATIC_LIB=ON - ) vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake/libssh") - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(INSTALL ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(INSTALL ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/lib/ssh.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/debug/lib/ssh.lib) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + + file(READ ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h _contents) + string(REPLACE "#ifdef LIBSSH_STATIC" "#if 1" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h "${_contents}") endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/static ${CURRENT_PACKAGES_DIR}/debug/lib/static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# The installed cmake config files are nonfunctional (0.7.5) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake ${CURRENT_PACKAGES_DIR}/cmake) + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh RENAME copyright) -- cgit v1.2.3 From 9336d5ea84f597fa508cbf6a70e591402d210984 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 05:21:17 -0700 Subject: [vcpkg] Link pthreads --- toolsrc/CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index 2a340bb8f..da0f41631 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.3) -project(vcpkg CXX) +project(vcpkg C CXX) if(CMAKE_COMPILER_IS_GNUXX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") set(GCC 1) @@ -19,10 +19,14 @@ file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp) add_executable(vcpkg src/vcpkg.cpp ${VCPKGLIB_SOURCES}) target_compile_definitions(vcpkg PRIVATE -DDISABLE_METRICS=0) -target_include_directories(vcpkg PUBLIC include) +target_include_directories(vcpkg PRIVATE include) if(GCC) - target_link_libraries(vcpkg PUBLIC stdc++fs) + target_link_libraries(vcpkg PRIVATE stdc++fs) elseif(CLANG) - target_link_libraries(vcpkg PUBLIC c++experimental) + target_link_libraries(vcpkg PRIVATE c++experimental) endif() + +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads REQUIRED) +target_link_libraries(vcpkg PRIVATE Threads::Threads) -- cgit v1.2.3 From 7142a093448baad2869e1ac99e619f02d3a395c1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 05:56:02 -0700 Subject: [vcpkg] Improve non-Windows default triplet detection --- scripts/buildsystems/vcpkg.cmake | 8 +++++--- scripts/toolchains/freebsd.cmake | 4 ++++ scripts/toolchains/linux.cmake | 2 -- scripts/toolchains/osx.cmake | 3 +++ 4 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 scripts/toolchains/freebsd.cmake diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 1d1977e6a..196ddcb3c 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -57,12 +57,14 @@ endif() if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") set(_VCPKG_TARGET_TRIPLET_PLAT uwp) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")) set(_VCPKG_TARGET_TRIPLET_PLAT linux) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")) set(_VCPKG_TARGET_TRIPLET_PLAT osx) -else() +elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")) set(_VCPKG_TARGET_TRIPLET_PLAT windows) +elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")) + set(_VCPKG_TARGET_TRIPLET_PLAT freebsd) endif() set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)") diff --git a/scripts/toolchains/freebsd.cmake b/scripts/toolchains/freebsd.cmake new file mode 100644 index 000000000..bfeabe18b --- /dev/null +++ b/scripts/toolchains/freebsd.cmake @@ -0,0 +1,4 @@ +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD") + set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") +endif() +set(CMAKE_SYSTEM_NAME FreeBSD CACHE STRING "") diff --git a/scripts/toolchains/linux.cmake b/scripts/toolchains/linux.cmake index d09d374c8..ea4f15d60 100644 --- a/scripts/toolchains/linux.cmake +++ b/scripts/toolchains/linux.cmake @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.5) - if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") endif() diff --git a/scripts/toolchains/osx.cmake b/scripts/toolchains/osx.cmake index 1a164f178..dd21f5264 100644 --- a/scripts/toolchains/osx.cmake +++ b/scripts/toolchains/osx.cmake @@ -1 +1,4 @@ +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") +endif() set(CMAKE_SYSTEM_NAME Darwin CACHE STRING "") -- cgit v1.2.3 From 511128b1c0478e02b50ca27ed7b8b0af3a6b91f1 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 06:19:20 -0700 Subject: [openssl] Add BSD-generic64 --- ports/openssl/CMakeLists.txt | 4 +++- ports/openssl/portfile.cmake | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ports/openssl/CMakeLists.txt b/ports/openssl/CMakeLists.txt index 40e82abb4..a2d863452 100644 --- a/ports/openssl/CMakeLists.txt +++ b/ports/openssl/CMakeLists.txt @@ -14,7 +14,9 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(PLATFORM linux-generic32) endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(PLATFORM darwin64-x86_64-cc) + set(PLATFORM darwin64-x86_64-cc) +elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(PLATFORM BSD-generic64) else() message(FATAL_ERROR "Unknown platform") endif() diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index fe26c0c31..97ea7b614 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -13,6 +13,11 @@ if(CMAKE_HOST_WIN32) else() find_program(PERL perl) find_program(NASM nasm) + if(NOT PERL) + message(FATAL_ERROR "Could not find perl. Please install it through your system package manager.") + elseif(NOT NASM) + message(FATAL_ERROR "Could not find nasm. Please install it through your system package manager.") + endif() endif() get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -- cgit v1.2.3 From f72b46690a89a7e19563f93f0eaa5f8a21184254 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 06:25:59 -0700 Subject: [vcpkg] Silence warnings on recent clang --- toolsrc/include/pch.h | 4 ++++ toolsrc/src/vcpkg/metrics.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index 683bef171..9c9deeb3f 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -46,7 +46,11 @@ #include #include #include +#if defined(_WIN32) #include +#else +#include +#endif #include #include #include diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index d49cadbe2..9e17b237d 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -92,7 +92,7 @@ namespace vcpkg::Metrics { encoded.append("\\\""); } - else if (ch < 0x20 || ch >= 0x80) + else if (ch < 0x20 || static_cast(ch) >= 0x80) { // Note: this treats incoming Strings as Latin-1 static constexpr const char HEX[16] = { -- cgit v1.2.3 From c17ce742f0ad9dd6c48e8b4c9a6a92891c567016 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 07:32:27 -0700 Subject: [libpq] Fix config writing into source dir --- ports/libpq/CMakeLists.txt | 19 +++++++++++-------- ports/libpq/portfile.cmake | 3 +++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ports/libpq/CMakeLists.txt b/ports/libpq/CMakeLists.txt index 54e929a5b..35a67118a 100644 --- a/ports/libpq/CMakeLists.txt +++ b/ports/libpq/CMakeLists.txt @@ -3,11 +3,13 @@ project(libpq VERSION 9.6.1 LANGUAGES C) find_package(OpenSSL REQUIRED) set(CMAKE_DEBUG_POSTFIX "d") -configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config.h.win32 ${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config.h) -configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config_ext.h.win32 ${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config_ext.h) -configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/port/win32.h ${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config_os.h) -file(WRITE src/interfaces/libpq/pg_config_paths.h "#define SYSCONFDIR \"\"") +configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config.h) +configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config_ext.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h) +configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/port/win32.h ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_os.h) +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_paths.h "#define SYSCONFDIR \"\"") + set(INSTALL_INCLUDES ON CACHE BOOL "Install include files") + set(pg_port_src src/port/getaddrinfo.c src/port/pgstrcasecmp.c @@ -53,8 +55,8 @@ set(pg_libpq_src ) set(pg_libpq_interface src/include/postgres_ext.h - src/include/pg_config_ext.h - src/include/pg_config.h + ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h + ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config.h src/interfaces/libpq/libpq-fe.h ) set(pg_libpq_catalog_interface @@ -67,14 +69,15 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) add_library(libpq ${pg_port_src} ${pg_backend_src} ${pg_libpq_src}) target_compile_definitions(libpq PRIVATE -DFRONTEND -DENABLE_THREAD_SAFETY -DUSE_OPENSSL -D_CRT_SECURE_NO_WARNINGS) target_link_libraries(libpq PRIVATE OpenSSL::SSL ws2_32 secur32 advapi32 shell32) -target_include_directories(libpq PRIVATE src/include src/include/port/win32 src/include/port/win32_msvc src/port) +target_include_directories(libpq PRIVATE src/include src/include/port/win32 src/include/port/win32_msvc src/port ${CMAKE_CURRENT_BINARY_DIR}/include) set_target_properties(libpq PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) install(TARGETS libpq ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin - ) +) + if(INSTALL_INCLUDES) install(FILES ${pg_libpq_interface} DESTINATION include) install(DIRECTORY src/include/libpq DESTINATION include) diff --git a/ports/libpq/portfile.cmake b/ports/libpq/portfile.cmake index d98ce9a8a..2d14204fa 100644 --- a/ports/libpq/portfile.cmake +++ b/ports/libpq/portfile.cmake @@ -6,9 +6,12 @@ vcpkg_download_distfile(ARCHIVE SHA512 97141972e154e6b0e756ee6a4e20f26e82022a9fd4c56305314a3a5567a79ece638e4ac3d513b46138737ae6bd27a098f30013a94767db151181aac9c01290a1 ) vcpkg_extract_source_archive(${ARCHIVE}) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS_DEBUG -DINSTALL_INCLUDES=OFF ) -- cgit v1.2.3 From 50a93f01970e499f35edbb57ce0328baeb465635 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 07:32:51 -0700 Subject: [vcpkg] Fix get_executable_path on BSD --- toolsrc/src/vcpkg/base/system.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index e55db9461..e24098f97 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -8,7 +8,11 @@ #include #if defined(__APPLE__) -# include +#include +#endif + +#if defined(__FreeBSD__) +#include #endif #pragma comment(lib, "Advapi32") @@ -35,14 +39,22 @@ namespace vcpkg::System const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); if (bytes == 0) std::abort(); return fs::path(buf, buf + bytes); -#elif __APPLE__ +#elif defined(__APPLE__) uint32_t size = 1024 * 32; char buf[size] = {}; bool result = _NSGetExecutablePath(buf, &size); Checks::check_exit(VCPKG_LINE_INFO, result != -1, "Could not determine current executable path."); - std::unique_ptr canonicalPath (realpath(buf, NULL)); + std::unique_ptr canonicalPath(realpath(buf, NULL)); Checks::check_exit(VCPKG_LINE_INFO, result != -1, "Could not determine current executable path."); return fs::path(std::string(canonicalPath.get())); +#elif defined(__FreeBSD__) + int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1}; + char exePath[2048]; + size_t len = sizeof(exePath); + auto rcode = sysctl(mib, 4, exePath, &len, NULL, 0); + Checks::check_exit(VCPKG_LINE_INFO, rcode == 0, "Could not determine current executable path."); + Checks::check_exit(VCPKG_LINE_INFO, len > 0, "Could not determine current executable path."); + return fs::path(exePath, exePath + len - 1); #else /* LINUX */ std::array buf; auto written = readlink("/proc/self/exe", buf.data(), buf.size()); -- cgit v1.2.3 From 9de17844e0201a27132149e392152525f8e8d34b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 07:37:20 -0700 Subject: [libssh] Only build one flavor at a time, don't build examples. --- ports/libssh/CONTROL | 2 +- ports/libssh/build-one-flavor.patch | 20 ++++++++++++++++++++ ports/libssh/portfile.cmake | 28 ++++++++++++++++++++-------- 3 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 ports/libssh/build-one-flavor.patch diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL index 692a6f4b8..70b555a79 100644 --- a/ports/libssh/CONTROL +++ b/ports/libssh/CONTROL @@ -1,4 +1,4 @@ Source: libssh -Version: 0.7.5-2 +Version: 0.7.5-3 Description: libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side Build-Depends: zlib, openssl diff --git a/ports/libssh/build-one-flavor.patch b/ports/libssh/build-one-flavor.patch new file mode 100644 index 000000000..96e20ba98 --- /dev/null +++ b/ports/libssh/build-one-flavor.patch @@ -0,0 +1,20 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 1012ddf..612f0ba 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -225,6 +225,7 @@ include_directories( + ${LIBSSH_PRIVATE_INCLUDE_DIRS} + ) + ++if (NOT WITH_STATIC_LIB) + add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS}) + + target_link_libraries(${LIBSSH_SHARED_LIBRARY} ${LIBSSH_LINK_LIBRARIES}) +@@ -259,6 +260,7 @@ install( + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + COMPONENT libraries + ) ++endif() + + if (WITH_STATIC_LIB) + add_library(${LIBSSH_STATIC_LIBRARY} STATIC ${libssh_SRCS}) diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index 36ece7321..773685f76 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "WindowsStore not supported") + message(FATAL_ERROR "WindowsStore not supported") endif() set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libssh-0.7.5) vcpkg_download_distfile(ARCHIVE @@ -11,23 +11,35 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/build-one-flavor.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" WITH_STATIC_LIB) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DWITH_STATIC_LIB=ON + OPTIONS + -DWITH_STATIC_LIB=${WITH_STATIC_LIB} + -DWITH_EXAMPLES=OFF + -DWITH_TESTING=OFF + -DWITH_NACL=OFF + -DWITH_GSSAPI=OFF ) vcpkg_install_cmake() vcpkg_copy_pdbs() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/lib/ssh.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/debug/lib/ssh.lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/lib/ssh.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/debug/lib/ssh.lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - file(READ ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h _contents) - string(REPLACE "#ifdef LIBSSH_STATIC" "#if 1" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h "${_contents}") + file(READ ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h _contents) + string(REPLACE "#ifdef LIBSSH_STATIC" "#if 1" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h "${_contents}") endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/static ${CURRENT_PACKAGES_DIR}/debug/lib/static) -- cgit v1.2.3 From 6b7c48646b6f36754384e99f6062880953120905 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 08:14:58 -0700 Subject: [libmysql] Update to 8.0.4 --- ports/libmysql/CONTROL | 3 ++- ports/libmysql/boost_and_build.patch | 44 ------------------------------- ports/libmysql/ignore-boost-version.patch | 13 +++++++++ ports/libmysql/portfile.cmake | 23 ++++++++++------ 4 files changed, 30 insertions(+), 53 deletions(-) delete mode 100644 ports/libmysql/boost_and_build.patch create mode 100644 ports/libmysql/ignore-boost-version.patch diff --git a/ports/libmysql/CONTROL b/ports/libmysql/CONTROL index 8350014e4..6a069b78e 100644 --- a/ports/libmysql/CONTROL +++ b/ports/libmysql/CONTROL @@ -1,3 +1,4 @@ Source: libmysql -Version: 5.7.17-3 +Version: 8.0.4 +Build-Depends: boost-algorithm, boost-geometry, boost-optional, boost-functional, boost-graph Description: A MySQL client library for C development. diff --git a/ports/libmysql/boost_and_build.patch b/ports/libmysql/boost_and_build.patch deleted file mode 100644 index 7fce8ffc5..000000000 --- a/ports/libmysql/boost_and_build.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 44842d3..e34ab24 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -452,7 +452,7 @@ ELSE() - SET(DEFAULT_TMPDIR "\"${TMPDIR}\"") - ENDIF() - --INCLUDE(cmake/boost.cmake) -+#INCLUDE(cmake/boost.cmake) - - IF (CMAKE_SYSTEM_NAME MATCHES "Linux") - OPTION(WITH_SYSTEMD "Enable installation of systemd support files" OFF) -diff --git a/client/dump/CMakeLists.txt b/client/dump/CMakeLists.txt -index bae2ce7..4e11516 100644 ---- a/client/dump/CMakeLists.txt -+++ b/client/dump/CMakeLists.txt -@@ -21,12 +21,12 @@ INCLUDE_DIRECTORIES( - ${CMAKE_SOURCE_DIR}/dump - ) - --IF (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro") -+#IF (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro") - IF (WITHOUT_SERVER) - MESSAGE(STATUS "Not building mysqlpump") - RETURN() - ENDIF() --ENDIF() -+#ENDIF() - - # Prevent Boost from including external precompiled Boost libraries, use - # threading (not implemented for older Solaris Studio compilers) -diff --git a/mysys/mysys_priv.h b/mysys/mysys_priv.h -index 8b7a554..4353037 100644 ---- a/mysys/mysys_priv.h -+++ b/mysys/mysys_priv.h -@@ -18,6 +18,7 @@ - - #include "my_global.h" - #include "mysql/psi/mysql_thread.h" -+#include "my_sys.h" - - #ifdef HAVE_PSI_INTERFACE - diff --git a/ports/libmysql/ignore-boost-version.patch b/ports/libmysql/ignore-boost-version.patch new file mode 100644 index 000000000..ea7111ded --- /dev/null +++ b/ports/libmysql/ignore-boost-version.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/boost.cmake b/cmake/boost.cmake +index 2851181..8788322 100644 +--- a/cmake/boost.cmake ++++ b/cmake/boost.cmake +@@ -280,7 +280,7 @@ IF(NOT BOOST_MAJOR_VERSION EQUAL 10) + COULD_NOT_FIND_BOOST() + ENDIF() + +-IF(NOT BOOST_MINOR_VERSION EQUAL 65) ++IF(NOT BOOST_MINOR_VERSION EQUAL 65 AND NOT IGNORE_BOOST_VERSION) + MESSAGE(WARNING "Boost minor version found is ${BOOST_MINOR_VERSION} " + "we need 65" + ) diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake index dee383a81..d3a7a569d 100644 --- a/ports/libmysql/portfile.cmake +++ b/ports/libmysql/portfile.cmake @@ -6,22 +6,27 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "libmysql cannot currently be cross-compiled for UWP") endif() +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + message(FATAL_ERROR "32-bit builds are not supported by libmysql.") +endif() + include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mysql/mysql-server - REF mysql-5.7.17 - SHA512 31488972e08a6b83f88e6e3f7923aca91e01eac702f4942fdae92e13f66d92ac86c24dfe7a65a001db836c900147d1c3871b36af8cbb281a0e6c555617cac12c + REF mysql-8.0.4 + SHA512 8d9129e7670e88df14238299052a5fe6d4f3e40bf27ef7a3ca8f4f91fb40507b13463e9bd24435b34e5d06c5d056dfb259fb04e77cc251b188eea734db5642be HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/boost_and_build.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/ignore-boost-version.patch ) +file(REMOVE_RECURSE ${SOURCE_PATH}/include/boost_1_65_0) + set(STACK_DIRECTION) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(STACK_DIRECTION -DSTACK_DIRECTION=-1) @@ -29,6 +34,7 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DWITHOUT_SERVER=ON -DWITH_UNIT_TESTS=OFF @@ -37,6 +43,7 @@ vcpkg_configure_cmake( -DHAVE_LLVM_LIBCPP_EXITCODE=1 ${STACK_DIRECTION} -DWINDOWS_RUNTIME_MD=ON # Note: this disables _replacement_ of /MD with /MT. If /MT is specified, it will be preserved. + -DIGNORE_BOOST_VERSION=ON ) vcpkg_install_cmake() @@ -62,9 +69,9 @@ file(REMOVE_RECURSE # remove misc files file(REMOVE - ${CURRENT_PACKAGES_DIR}/COPYING + ${CURRENT_PACKAGES_DIR}/LICENSE ${CURRENT_PACKAGES_DIR}/README - ${CURRENT_PACKAGES_DIR}/debug/COPYING + ${CURRENT_PACKAGES_DIR}/debug/LICENSE ${CURRENT_PACKAGES_DIR}/debug/README) # remove not-related libs @@ -95,5 +102,5 @@ else() endif() # copy license -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmysql) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmysql/COPYING ${CURRENT_PACKAGES_DIR}/share/libmysql/copyright) \ No newline at end of file +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmysql) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmysql/LICENSE ${CURRENT_PACKAGES_DIR}/share/libmysql/copyright) \ No newline at end of file -- cgit v1.2.3 From 3c7997215bc2e44125912fb7aae672f1b63944a8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 11:06:22 -0700 Subject: [vcpkg] Improve default triplets for non-windows --- toolsrc/include/vcpkg/base/strings.h | 2 +- toolsrc/src/vcpkg.cpp | 8 ++++++++ toolsrc/src/vcpkg/base/strings.cpp | 7 +++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 6ef840fb3..6294853af 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -46,7 +46,7 @@ namespace vcpkg::Strings bool case_insensitive_ascii_equals(const CStringView left, const CStringView right); - std::string ascii_to_lowercase(const std::string& input); + std::string ascii_to_lowercase(std::string input); bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern); diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index d9b915367..a65045aa8 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -157,7 +157,15 @@ static void inner(const VcpkgCmdArguments& args) } else { +#if defined(_WIN32) default_triplet = Triplet::X86_WINDOWS; +#elif defined(__APPLE__) + default_triplet = Triplet::from_canonical_name("x64-osx"); +#elif defined(__FreeBSD__) + default_triplet = Triplet::from_canonical_name("x64-freebsd"); +#else + default_triplet = Triplet::from_canonical_name("x64-linux"); +#endif } } diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index d912734e3..a08512c9f 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -108,11 +108,10 @@ namespace vcpkg::Strings #endif } - std::string ascii_to_lowercase(const std::string& input) + std::string ascii_to_lowercase(std::string s) { - std::string output(input); - std::transform(output.begin(), output.end(), output.begin(), &details::tolower_char); - return output; + std::transform(s.begin(), s.end(), s.begin(), &details::tolower_char); + return s; } bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern) -- cgit v1.2.3 From 40bc3cb716c912e7a9cd567369a77918cfce87a2 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 11:06:52 -0700 Subject: [libssh] Fix static builds for non-windows --- ports/libssh/CONTROL | 2 +- ports/libssh/only-one-flavor-threads.patch | 21 +++++++++++++++++++++ ports/libssh/portfile.cmake | 11 ++++++++--- 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 ports/libssh/only-one-flavor-threads.patch diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL index 70b555a79..5f3c8a0db 100644 --- a/ports/libssh/CONTROL +++ b/ports/libssh/CONTROL @@ -1,4 +1,4 @@ Source: libssh -Version: 0.7.5-3 +Version: 0.7.5-4 Description: libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side Build-Depends: zlib, openssl diff --git a/ports/libssh/only-one-flavor-threads.patch b/ports/libssh/only-one-flavor-threads.patch new file mode 100644 index 000000000..31b3e1f36 --- /dev/null +++ b/ports/libssh/only-one-flavor-threads.patch @@ -0,0 +1,21 @@ +diff --git a/src/threads/CMakeLists.txt b/src/threads/CMakeLists.txt +index 2ab4e1b..a47620b 100644 +--- a/src/threads/CMakeLists.txt ++++ b/src/threads/CMakeLists.txt +@@ -59,6 +59,7 @@ include_directories( + if (libssh_threads_SRCS) + set(LIBSSH_THREADS ON CACHE "libssh threads lib" INTERNAL) + ++ if (NOT WITH_STATIC_LIB) + add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS}) + + target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES}) +@@ -89,7 +90,7 @@ if (libssh_threads_SRCS) + COMPONENT libraries + ) + +- if (WITH_STATIC_LIB) ++ else (WITH_STATIC_LIB) + add_library(${LIBSSH_THREADS_STATIC_LIBRARY} STATIC ${libssh_threads_SRCS}) + + if (MSVC) diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index 773685f76..7d986d244 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -13,7 +13,9 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/build-one-flavor.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/build-one-flavor.patch + ${CMAKE_CURRENT_LIST_DIR}/only-one-flavor-threads.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" WITH_STATIC_LIB) @@ -33,8 +35,10 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/lib/ssh.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/debug/lib/ssh.lib) + if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/lib/ssh.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/debug/lib/ssh.lib) + endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) file(READ ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h _contents) @@ -47,5 +51,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # The installed cmake config files are nonfunctional (0.7.5) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake ${CURRENT_PACKAGES_DIR}/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ${CURRENT_PACKAGES_DIR}/lib/cmake) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh RENAME copyright) -- cgit v1.2.3 From 51f93e27f1057cdf7f83d3d799f1b48f3eb77d8a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 00:18:49 -0700 Subject: [abseil][breakpad][cimg][matio][piex][rocksdb][thrift][tiny-dnn][unicorn-lib][unicorn] Updates --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/breakpad/CONTROL | 2 +- ports/breakpad/portfile.cmake | 4 ++-- ports/cimg/CONTROL | 2 +- ports/cimg/portfile.cmake | 4 ++-- ports/matio/CONTROL | 2 +- ports/matio/portfile.cmake | 4 ++-- ports/piex/CONTROL | 2 +- ports/piex/portfile.cmake | 4 ++-- ports/rocksdb/CONTROL | 2 +- ports/rocksdb/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/tiny-dnn/CONTROL | 2 +- ports/tiny-dnn/portfile.cmake | 4 ++-- ports/unicorn-lib/CONTROL | 2 +- ports/unicorn-lib/portfile.cmake | 4 ++-- ports/unicorn/CONTROL | 2 +- ports/unicorn/portfile.cmake | 4 ++-- 20 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index cd4a6723f..37258b7b2 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-03-07 +Version: 2018-03-13 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 598f76c2f..526d93bae 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 94f0f79ecd2d9e5271a21bc4ededea9b58c60674 - SHA512 b1309a371b886e4d5d8e963407ddfcd005c041b35880e0af45f07c778875fb69c76f0a1ef7802af3f1eab3497fb40020d8d503c5eb2788fff50dd74b557bf182 + REF 23ef7e11277a7a7709b70c362eea6b17cb932b34 + SHA512 86f83553b8da536c55660d2dd439f0dfc75d0c1839d83b0f5a1ab6f5016730bcac9d007873901789c71e77603276e85658a86ffa4691c60fabec29b593b49744 HEAD_REF master ) diff --git a/ports/breakpad/CONTROL b/ports/breakpad/CONTROL index 9d3e4959c..6b016d29a 100644 --- a/ports/breakpad/CONTROL +++ b/ports/breakpad/CONTROL @@ -1,4 +1,4 @@ Source: breakpad -Version: 2018-02-25 +Version: 2018-03-13 Build-Depends: libdisasm Description: a set of client and server components which implement a crash-reporting system. diff --git a/ports/breakpad/portfile.cmake b/ports/breakpad/portfile.cmake index a7b28e863..b8bac3f6a 100644 --- a/ports/breakpad/portfile.cmake +++ b/ports/breakpad/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/breakpad - REF 88e9a460dec52d11ce4520c54246cf5cf29f87bf - SHA512 31750e6db23c30b884af7049dc67cd30198e49a638d3e226c5ba31f562145bdfbc42f0679173cefc93df75b11af734ecf164c0d4030408e6f0ab315d60fdb30f + REF 2d80611fedf1e6bce4459f179dafaac844e9fc7f + SHA512 8c4eabb1e2d071ed67d178c1ee8c3679a24bff39439ee360a079fa926e276247ee18d0d88e420407e08c99cac0d1e9a8b4c7f554bf2d07f125eaa1df2f973e38 HEAD_REF master ) diff --git a/ports/cimg/CONTROL b/ports/cimg/CONTROL index bd6d5b4a4..a4b1438e7 100644 --- a/ports/cimg/CONTROL +++ b/ports/cimg/CONTROL @@ -1,3 +1,3 @@ Source: cimg -Version: 220 +Version: 221 Description: The CImg Library is a small, open-source, and modern C++ toolkit for image processing diff --git a/ports/cimg/portfile.cmake b/ports/cimg/portfile.cmake index 84ee0be9f..5a130433f 100644 --- a/ports/cimg/portfile.cmake +++ b/ports/cimg/portfile.cmake @@ -2,9 +2,9 @@ include(vcpkg_common_functions) vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH REPO "dtschump/CImg" - REF v.220 + REF v.221 HEAD_REF master - SHA512 f4954296d7aab9ba840e27d09d4d9abc21d78bedc32bd828f3c898348de7c3711096c1b6ff563907dfa41c78d1ae1c2ac5a8437d272a8d304f940f23b7844076) + SHA512 d1aea69f4662e85c5b56c723cadcc69282f2f1c4e3a968efc312a826a15000c11d61756d3ed87e37ae349cebbd62b67503996c45ed1fe038a91a9f0c8dbec43c) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/matio/CONTROL b/ports/matio/CONTROL index e3d0082f7..7c891c035 100644 --- a/ports/matio/CONTROL +++ b/ports/matio/CONTROL @@ -1,4 +1,4 @@ Source: matio -Version: 1.5.11 +Version: 1.5.12 Description: MATLAB MAT File I/O Library Build-Depends: zlib, hdf5 diff --git a/ports/matio/portfile.cmake b/ports/matio/portfile.cmake index ac9ca5c45..86d5b6a1f 100644 --- a/ports/matio/portfile.cmake +++ b/ports/matio/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tbeu/matio - REF v1.5.11 - SHA512 f500475e80cdb52a4754c49e900a34c0b540a5c64f353287e6b85b0c16156b251fe8088f2ed584af5a4d0916e98fddf73a3799e7c045ab859298687038e6d513 + REF v1.5.12 + SHA512 3bf6d2bf6460531dd2a740813bca3f3da6347b9fadb39803257f11bcceeaa7cf6657921c9ca9c8db02bf2020d5adf2ecf544b2455aa0ca897c0644493b1902a4 HEAD_REF master ) diff --git a/ports/piex/CONTROL b/ports/piex/CONTROL index 946ca9418..43411e564 100644 --- a/ports/piex/CONTROL +++ b/ports/piex/CONTROL @@ -1,3 +1,3 @@ Source: piex -Version: 2018-02-25 +Version: 2018-03-13 Description: The Preview Image Extractor (PIEX) is designed to find and extract the largest diff --git a/ports/piex/portfile.cmake b/ports/piex/portfile.cmake index 94b7e9494..039c2c41d 100644 --- a/ports/piex/portfile.cmake +++ b/ports/piex/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/piex - REF 938f8b6e49ae43b062f76aad968ff76f5f33c965 - SHA512 abe145f29d210b03eb4340a506cd3e061a9ffe69217f916310308c6c8095ebe3229fb969a4403d1ca06375c8c87e78db8bceee89f7963116f80acdce463c556b + REF 2aa74c2dd295758ef4562906a5525300972821fc + SHA512 4fbea41e8f21c2f4a75d899aa28e2d2e92201d429eb8504515466187befc1eac6c9b31d91b039f2aebe2101bbde6b87adce9bae578a536f264d207fe29e4bd8f HEAD_REF master ) diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index cba7757d1..90511f0b2 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,4 @@ Source: rocksdb -Version: 5.10.4-3 +Version: 5.11.3 Description: A library that provides an embeddable, persistent key-value store for fast storage Build-Depends: zlib diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 66541caa1..e37b79633 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 v5.10.4 - SHA512 42841f2e2ca7dee6e88b0539e997cc365a50161c234e5878e30757022114335c613f6d642a0af2bdc7fdb97d09ed79f4e12454d456f1f7fa1a6489c32540460a + REF rocksdb-5.11.3 + SHA512 a4c771e36056ee0da497202b25092d89799db43573a442568b4392b8478ac20320dabf4c904e93bd0641a32f249e9c8dcad0d67577acaee6902cd4d30f29ce57 HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 3470a9990..d7beee7e0 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-03-11 +Version: 2018-03-13 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 502da193a..123b760a7 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 70b33fb6b48d62859a048cac1bec79cfadb2f310 - SHA512 81c2c41fc4daab8b0da94a67862f1a2db0901804e06ed3445fec7bdc408e983bd0662c0d3fdaa9f149bcd531763620ffdfd3c0226f73d246e8e56dd560ccf1b4 + REF 8d55c47610b765b2bcdfaebb7ee8d22930e0bd0d + SHA512 ebca8605f6841826d506608ccf64a985dc97316daa02dfe67e0646761fcea85e8920b17678fb01bfd2dea0337b182316a31c98c79c4e2f4d03f1b342521123d5 HEAD_REF master ) diff --git a/ports/tiny-dnn/CONTROL b/ports/tiny-dnn/CONTROL index 2a53311cb..6468f2473 100644 --- a/ports/tiny-dnn/CONTROL +++ b/ports/tiny-dnn/CONTROL @@ -1,3 +1,3 @@ Source: tiny-dnn -Version: 2018-03-07 +Version: 2018-03-13 Description: A C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource. diff --git a/ports/tiny-dnn/portfile.cmake b/ports/tiny-dnn/portfile.cmake index bb4fc9fcf..151f5dbee 100644 --- a/ports/tiny-dnn/portfile.cmake +++ b/ports/tiny-dnn/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tiny-dnn/tiny-dnn - REF 4a59e4cc8799b3a768618cb157a2edc9d0f05b91 - SHA512 408cfec895140d10c9a498ce78da3ad1e11c245a05c05c5cd82ccedd100fbadad7fb02a4e4c2cb924f8d2c35eca31176dd8270927b5d8376946a237066b10795 + REF 1c5259477b8b4eab376cc19fd1d55ae965ef5e5a + SHA512 756b8e3d5d00b44973bbae2c0bedbe15206bce479dc70ae5fc89f455772deadc05503afd7abcae2048aeabefd7a45cba0fae38555df7e0d9eb33e9feed21b099 HEAD_REF master ) diff --git a/ports/unicorn-lib/CONTROL b/ports/unicorn-lib/CONTROL index 23967af57..2c742eedc 100644 --- a/ports/unicorn-lib/CONTROL +++ b/ports/unicorn-lib/CONTROL @@ -1,4 +1,4 @@ Source: unicorn-lib -Version: 2018-02-25 +Version: 2018-03-13 Description: Unicode library for C++ by Ross Smith Build-Depends: rs-core-lib, pcre, zlib, libiconv diff --git a/ports/unicorn-lib/portfile.cmake b/ports/unicorn-lib/portfile.cmake index 46a7fc67c..c76da4fa3 100644 --- a/ports/unicorn-lib/portfile.cmake +++ b/ports/unicorn-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/unicorn-lib - REF 1ee9ca81e62c1916a08522523ca21a46a5005ad5 - SHA512 b61f8b993d46e4750ccb14aa98dee3b9f3d9de54d2dfa60af4fabb338f04348c450089fa331e7d63342698f39168d660452fb49fb707c1a6647553ec494355bb + REF 8fc132c879e748a61c9e4b6a93a6de209b55dbe5 + SHA512 f70d9fd9c06b4bf7a771abfacd1f989f03ea51395b6819b1162a13954e680d49622e48b61b71195c598ac21861435c6c5fe8ff368880098a07eb4b86547eede0 HEAD_REF master ) diff --git a/ports/unicorn/CONTROL b/ports/unicorn/CONTROL index f1856bac6..398df6e27 100644 --- a/ports/unicorn/CONTROL +++ b/ports/unicorn/CONTROL @@ -1,3 +1,3 @@ Source: unicorn -Version: 2018-02-25 +Version: 2018-03-13 Description: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework diff --git a/ports/unicorn/portfile.cmake b/ports/unicorn/portfile.cmake index 66ba738c0..dd0aad363 100644 --- a/ports/unicorn/portfile.cmake +++ b/ports/unicorn/portfile.cmake @@ -14,8 +14,8 @@ set(VCPKG_CRT_LINKAGE "static") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO unicorn-engine/unicorn - REF dab5060005facc38ef6500496ae7f7bd90e4fdb7 - SHA512 42b656a9d6b8091aaed5729658d7dd94064a9c9c43ad33ca474917b0830b760ee81a37a6eec84848d8aa6784d01568649f036383a8953c3e1de2616b053c682e + REF 1f408ce35917e2dcb2136072eb4db9e1cf3ab70e + SHA512 fb630a391b33f34e1d04eec0daf90427f907c111b3a0a6ed0d50eb3b2fea2777d0edc9f00a01af614cd3d072b800663ae578080ee76af63a2ee8ae21da46396f HEAD_REF master ) -- cgit v1.2.3 From d8aed01655c991ee11264bca6b3db1afab1a8218 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 11:34:59 -0700 Subject: [libjpeg-turbo] Fix non-windows non-linux --- ports/libjpeg-turbo/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index 2c8c20f92..288960662 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -13,7 +13,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/linux-cmake.patch" ) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) set(LIBJPEGTURBO_SIMD -DWITH_SIMD=OFF) else() set(LIBJPEGTURBO_SIMD -DWITH_SIMD=ON) -- cgit v1.2.3 From 94360c2c65c6b38844ee75890d2be4632cdb4514 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 13 Mar 2018 11:35:19 -0700 Subject: [vcpkg-find-acquire-program] Handle PERL and NASM on non-windows --- ports/openssl/portfile.cmake | 14 ++------------ scripts/cmake/vcpkg_find_acquire_program.cmake | 4 ++++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 97ea7b614..3d442ec9e 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -7,18 +7,8 @@ include(vcpkg_common_functions) set(OPENSSL_VERSION 1.0.2n) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) -if(CMAKE_HOST_WIN32) - vcpkg_find_acquire_program(PERL) - vcpkg_find_acquire_program(NASM) -else() - find_program(PERL perl) - find_program(NASM nasm) - if(NOT PERL) - message(FATAL_ERROR "Could not find perl. Please install it through your system package manager.") - elseif(NOT NASM) - message(FATAL_ERROR "Could not find nasm. Please install it through your system package manager.") - endif() -endif() +vcpkg_find_acquire_program(PERL) +vcpkg_find_acquire_program(NASM) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 21d7ecd8f..083b86fc2 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -49,12 +49,16 @@ function(vcpkg_find_acquire_program VAR) if(VAR MATCHES "PERL") set(PROGNAME perl) 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) elseif(VAR MATCHES "NASM") set(PROGNAME nasm) set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.12.02) + set(BREW_PACKAGE_NAME "nasm") + set(APT_PACKAGE_NAME "nasm") set(URL "http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win32/nasm-2.12.02-win32.zip" "http://mirrors.kodi.tv/build-deps/win32/nasm-2.12.02-win32.zip" -- cgit v1.2.3 From 7eae9c153e4622802a7c2c8b318f68692f35890f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 14 Mar 2018 02:56:49 -0700 Subject: [libmysql] Clarify support message --- ports/libmysql/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake index d3a7a569d..6c60d0ccc 100644 --- a/ports/libmysql/portfile.cmake +++ b/ports/libmysql/portfile.cmake @@ -6,8 +6,8 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "libmysql cannot currently be cross-compiled for UWP") endif() -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - message(FATAL_ERROR "32-bit builds are not supported by libmysql.") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND NOT CMAKE_SYSTEM_NAME OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "Oracle has dropped support in libmysql for 32-bit Windows.") endif() include(vcpkg_common_functions) -- cgit v1.2.3 From 0ab8f0d69f469148f926afa796beddc096c45c84 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 14 Mar 2018 03:18:12 -0700 Subject: [libmariadb] Use vcpkg_from_github() and improve conflict check --- ports/libmariadb/portfile.cmake | 84 ++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/ports/libmariadb/portfile.cmake b/ports/libmariadb/portfile.cmake index 3aca7afb3..4486564f6 100644 --- a/ports/libmariadb/portfile.cmake +++ b/ports/libmariadb/portfile.cmake @@ -1,24 +1,24 @@ -if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h") - message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.") +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/libmysql") + message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mariadb-connector-c-3.0.2) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/MariaDB/mariadb-connector-c/archive/v3.0.2.tar.gz" - FILENAME "mariadb-connector-c-3.0.2.tar.gz" +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO MariaDB/mariadb-connector-c + REF v3.0.2 SHA512 a5086ff149b1ca0e1b652013475c5f3793824416a60ec35018b6dcd502bd38b50fa040271ff8d308520dadecc9601671fccf67046fcda2425f1d7c59e1c6c52f + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DWITH_UNITTEST=OFF - -DWITH_SSL=OFF - -DWITH_CURL=OFF + OPTIONS + -DWITH_UNITTEST=OFF + -DWITH_SSL=OFF + -DWITH_CURL=OFF ) vcpkg_install_cmake() @@ -28,47 +28,47 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # fix libmariadb lib & dll directory. if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/mariadb/mariadbclient.lib - ${CURRENT_PACKAGES_DIR}/lib/mariadbclient.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/mariadbclient.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/mariadbclient.lib) + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/mariadb/mariadbclient.lib + ${CURRENT_PACKAGES_DIR}/lib/mariadbclient.lib) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/mariadbclient.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/mariadbclient.lib) else() - file(MAKE_DIRECTORY - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.dll - ${CURRENT_PACKAGES_DIR}/bin/libmariadb.dll) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.dll - ${CURRENT_PACKAGES_DIR}/debug/bin/libmariadb.dll) - file(RENAME - ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.lib - ${CURRENT_PACKAGES_DIR}/lib/libmariadb.lib) - file(RENAME - ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.lib - ${CURRENT_PACKAGES_DIR}/debug/lib/libmariadb.lib) + file(MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.dll + ${CURRENT_PACKAGES_DIR}/bin/libmariadb.dll) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.dll + ${CURRENT_PACKAGES_DIR}/debug/bin/libmariadb.dll) + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.lib + ${CURRENT_PACKAGES_DIR}/lib/libmariadb.lib) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/libmariadb.lib) endif() # remove plugin folder file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/lib/plugin - ${CURRENT_PACKAGES_DIR}/debug/lib/plugin - ${CURRENT_PACKAGES_DIR}/lib/mariadb - ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb) + ${CURRENT_PACKAGES_DIR}/lib/plugin + ${CURRENT_PACKAGES_DIR}/debug/lib/plugin + ${CURRENT_PACKAGES_DIR}/lib/mariadb + ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb) # copy & remove header files file(GLOB HEADER_FILES ${CURRENT_PACKAGES_DIR}/include/mariadb/*) file(REMOVE - ${CURRENT_PACKAGES_DIR}/include/mariadb/my_config.h.in - ${CURRENT_PACKAGES_DIR}/include/mariadb/mysql_version.h.in - ${CURRENT_PACKAGES_DIR}/include/mariadb/CMakeLists.txt - ${CURRENT_PACKAGES_DIR}/include/mariadb/Makefile.am) + ${CURRENT_PACKAGES_DIR}/include/mariadb/my_config.h.in + ${CURRENT_PACKAGES_DIR}/include/mariadb/mysql_version.h.in + ${CURRENT_PACKAGES_DIR}/include/mariadb/CMakeLists.txt + ${CURRENT_PACKAGES_DIR}/include/mariadb/Makefile.am) file(RENAME - ${CURRENT_PACKAGES_DIR}/include/mariadb - ${CURRENT_PACKAGES_DIR}/include/mysql) + ${CURRENT_PACKAGES_DIR}/include/mariadb + ${CURRENT_PACKAGES_DIR}/include/mysql) # copy license file file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmariadb) -- cgit v1.2.3 From b33931c4384f2f0cc2bd10604192c5271d731a1e Mon Sep 17 00:00:00 2001 From: itsuhane Date: Wed, 14 Mar 2018 22:24:39 +0800 Subject: Add OpenMesh 6.3(without apps) (#3032) --- ports/openmesh/CONTROL | 3 +++ ports/openmesh/portfile.cmake | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 ports/openmesh/CONTROL create mode 100644 ports/openmesh/portfile.cmake diff --git a/ports/openmesh/CONTROL b/ports/openmesh/CONTROL new file mode 100644 index 000000000..b803484eb --- /dev/null +++ b/ports/openmesh/CONTROL @@ -0,0 +1,3 @@ +Source: openmesh +Version: 6.3 +Description: A generic and efficient polygon mesh data structure diff --git a/ports/openmesh/portfile.cmake b/ports/openmesh/portfile.cmake new file mode 100644 index 000000000..f70773ceb --- /dev/null +++ b/ports/openmesh/portfile.cmake @@ -0,0 +1,38 @@ +# 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) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openmesh-6.3) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.openmesh.org/media/Releases/6.3/OpenMesh-6.3.tar.gz" + FILENAME "openmesh-6.3.tar.gz" + SHA512 2ef2dcd2e0abcb0c36a3a9abac433ef4d3430115498ff1134525b27a0f023d7e3bb0d80550f0c8b9658c87651594bce29138bdca05db57f02a5e99e2275c2c07 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DBUILD_APPS=OFF # [TODO]: add apps as feature, requires qt5 and freeglut + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/OpenMesh/Tools/VDPM/xpm) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmesh RENAME copyright) -- cgit v1.2.3 From f0dc8c109eaf264fbdbc6fb726fe23a9ef2bd97a Mon Sep 17 00:00:00 2001 From: pravic Date: Wed, 14 Mar 2018 17:51:20 +0300 Subject: [curl] update to 7.59.0 --- 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 0f6acea43..c273ec181 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7.58.0-5 +Version: 7.59.0 Build-Depends: zlib Description: A library for transferring data with URLs Default-Features: ssl diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 299dc4fa4..852fcf9d0 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO curl/curl - REF curl-7_58_0 - SHA512 148c25152732dd5ad2626bc70c7725577e25033a73eecefa4dd820927ec552f9c2d0235cc3f597404d3893eced7d5d2bd9522f6302b7f930e9f65912ac2c91f6 + REF curl-7_59_0 + SHA512 eac51b986db7eafb836bc4fa00def88054304110990bf99a4387a5ff85a8375616c2ee5bee91bf608737faffe9f228dfd62be69a4b0622a4afe3deb1098b6bd3 HEAD_REF master ) -- cgit v1.2.3 From 90c4b8dbb7a69584a4a36c67e4982cf086b7c578 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 14 Mar 2018 04:33:14 -0700 Subject: [vcpkg] Further refactoring inside `build_package()` --- toolsrc/include/vcpkg/commands.h | 2 +- toolsrc/src/vcpkg/build.cpp | 320 ++++++++++++++++++++---------------- toolsrc/src/vcpkg/commands.ci.cpp | 21 ++- toolsrc/src/vcpkg/commands.hash.cpp | 8 +- 4 files changed, 202 insertions(+), 149 deletions(-) diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 4027e12f4..b6b1c56ab 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -120,7 +120,7 @@ namespace vcpkg::Commands namespace Hash { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - std::string get_file_hash(fs::path const& cmake_exe_path, fs::path const& path, std::string const& hash_type); + std::string get_file_hash(const VcpkgPaths& paths, fs::path const& path, std::string const& hash_type); } template diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 7abd5ae0a..99ae5d2a3 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -396,23 +396,160 @@ namespace vcpkg::Build return {BuildResult::SUCCEEDED, std::move(bcf)}; } - ExtendedBuildResult build_package(const VcpkgPaths& paths, - const BuildPackageConfig& config, - const StatusParagraphs& status_db) + static ExtendedBuildResult do_build_package_and_clean_buildtrees(const VcpkgPaths& paths, + const PreBuildInfo& pre_build_info, + const PackageSpec& spec, + const std::string& abi_tag, + const BuildPackageConfig& config, + const StatusParagraphs& status_db) { + auto result = do_build_package(paths, pre_build_info, spec, abi_tag, config, status_db); + + if (config.build_package_options.clean_buildtrees == CleanBuildtrees::YES) + { + auto& fs = paths.get_filesystem(); + const fs::path buildtrees_dir = paths.buildtrees / config.scf.core_paragraph->name; + auto buildtree_files = fs.get_files_non_recursive(buildtrees_dir); + for (auto&& file : buildtree_files) + { + if (fs.is_directory(file) && file.filename() != "src") + { + std::error_code ec; + fs.remove_all(file, ec); + } + } + } + + return result; + } + + struct AbiEntry + { + std::string key; + std::string value; + }; + + struct AbiTagAndFile + { + std::string tag; + fs::path tag_file; + }; + + static Optional compute_abi_tag(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const PreBuildInfo& pre_build_info, + Span dependency_abis) + { + if (!GlobalState::g_binary_caching) return nullopt; + auto& fs = paths.get_filesystem(); const Triplet& triplet = config.triplet; + const std::string& name = config.scf.core_paragraph->name; + + std::vector abi_tag_entries; + + abi_tag_entries.insert(abi_tag_entries.end(), dependency_abis.begin(), dependency_abis.end()); + + abi_tag_entries.emplace_back( + AbiEntry{"portfile", Commands::Hash::get_file_hash(paths, config.port_dir / "portfile.cmake", "SHA1")}); + abi_tag_entries.emplace_back( + AbiEntry{"control", Commands::Hash::get_file_hash(paths, config.port_dir / "CONTROL", "SHA1")}); + + abi_tag_entries.emplace_back(AbiEntry{"triplet", pre_build_info.triplet_abi_tag}); + + std::string features = Strings::join(";", config.feature_list); + abi_tag_entries.emplace_back(AbiEntry{"features", features}); - struct AbiEntry + if (config.build_package_options.use_head_version == UseHeadVersion::YES) + abi_tag_entries.emplace_back(AbiEntry{"head", ""}); + + std::string full_abi_info = + Strings::join("", abi_tag_entries, [](const AbiEntry& p) { return p.key + " " + p.value + "\n"; }); + + if (GlobalState::debugging) { - std::string key; - std::string value; - }; + System::println("[DEBUG] "); + for (auto&& entry : abi_tag_entries) + { + System::println("[DEBUG] %s|%s", entry.key, entry.value); + } + System::println("[DEBUG] "); + } - std::vector abi_tag_entries; + auto abi_tag_entries_missing = abi_tag_entries; + Util::stable_keep_if(abi_tag_entries_missing, [](const AbiEntry& p) { return p.value.empty(); }); - const PackageSpec spec = - PackageSpec::from_name_and_triplet(config.scf.core_paragraph->name, triplet).value_or_exit(VCPKG_LINE_INFO); + if (abi_tag_entries_missing.empty()) + { + std::error_code ec; + fs.create_directories(paths.buildtrees / name, ec); + auto abi_file_path = paths.buildtrees / name / (triplet.canonical_name() + ".vcpkg_abi_info.txt"); + fs.write_contents(abi_file_path, full_abi_info); + + return AbiTagAndFile{Commands::Hash::get_file_hash(paths, abi_file_path, "SHA1"), abi_file_path}; + } + else + { + System::println( + "Warning: binary caching disabled because abi keys are missing values:\n%s", + Strings::join("", abi_tag_entries_missing, [](const AbiEntry& e) { return " " + e.key + "\n"; })); + + return nullopt; + } + } + + static void decompress_archive(const VcpkgPaths& paths, const PackageSpec& spec, const fs::path& archive_path) + { + auto& fs = paths.get_filesystem(); + + auto pkg_path = paths.package_dir(spec); + 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()); + +#if defined(_WIN32) + auto&& _7za = paths.get_7za_exe(); + + System::cmd_execute_clean(Strings::format( + R"("%s" x "%s" -o"%s" -y >nul)", _7za.u8string(), archive_path.u8string(), pkg_path.u8string())); +#else + System::cmd_execute_clean(Strings::format( + R"(unzip -qq "%s" "-d%s")", archive_path.u8string(), pkg_path.u8string())); +#endif + } + + static void compress_archive(const VcpkgPaths& paths, const PackageSpec& spec, const fs::path& tmp_archive_path) + { + auto& fs = paths.get_filesystem(); + + std::error_code ec; + + fs.remove(tmp_archive_path, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !fs.exists(tmp_archive_path), "Could not remove file: %s", tmp_archive_path.u8string()); +#if defined(_WIN32) + auto&& _7za = paths.get_7za_exe(); + + System::cmd_execute_clean(Strings::format( + R"("%s" a "%s" "%s\*" >nul)", + _7za.u8string(), + tmp_archive_path.u8string(), + paths.package_dir(spec).u8string())); +#else + System::cmd_execute_clean(Strings::format( + R"(cd '%s' && zip --quiet -r '%s' *)", paths.package_dir(spec).u8string(), tmp_archive_path.u8string())); +#endif + } + + ExtendedBuildResult build_package(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const StatusParagraphs& status_db) + { + auto& fs = paths.get_filesystem(); + const Triplet& triplet = config.triplet; + const std::string& name = config.scf.core_paragraph->name; std::vector required_fspecs = compute_required_feature_specs(config, status_db); @@ -422,7 +559,7 @@ namespace vcpkg::Build // Find all features that aren't installed. This destroys required_fspecs. Util::unstable_keep_if(required_fspecs, [&](FeatureSpec const& fspec) { - return !status_db.is_installed(fspec) && fspec.name() != spec.name(); + return !status_db.is_installed(fspec) && fspec.name() != name; }); if (!required_fspecs.empty()) @@ -430,109 +567,45 @@ namespace vcpkg::Build return {BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES, std::move(required_fspecs)}; } + const PackageSpec spec = + PackageSpec::from_name_and_triplet(config.scf.core_paragraph->name, triplet).value_or_exit(VCPKG_LINE_INFO); + + std::vector dependency_abis; + // dep_pspecs was not destroyed for (auto&& pspec : dep_pspecs) { if (pspec == spec) continue; auto status_it = status_db.find_installed(pspec); Checks::check_exit(VCPKG_LINE_INFO, status_it != status_db.end()); - abi_tag_entries.emplace_back( + dependency_abis.emplace_back( AbiEntry{status_it->get()->package.spec.name(), status_it->get()->package.abi}); } - const fs::path& cmake_exe_path = paths.get_cmake_exe(); - - if (GlobalState::g_binary_caching) - { - abi_tag_entries.emplace_back(AbiEntry{ - "portfile", Commands::Hash::get_file_hash(cmake_exe_path, config.port_dir / "portfile.cmake", "SHA1")}); - abi_tag_entries.emplace_back(AbiEntry{ - "control", Commands::Hash::get_file_hash(cmake_exe_path, config.port_dir / "CONTROL", "SHA1")}); - } - const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); - abi_tag_entries.emplace_back(AbiEntry{"triplet", pre_build_info.triplet_abi_tag}); - std::string features = Strings::join(";", config.feature_list); - abi_tag_entries.emplace_back(AbiEntry{"features", features}); - - if (config.build_package_options.use_head_version == UseHeadVersion::YES) - abi_tag_entries.emplace_back(AbiEntry{"head", ""}); - - std::string full_abi_info = - Strings::join("", abi_tag_entries, [](const AbiEntry& p) { return p.key + " " + p.value + "\n"; }); - - std::string abi_tag; - - if (GlobalState::g_binary_caching) - { - if (GlobalState::debugging) - { - System::println("[DEBUG] "); - for (auto&& entry : abi_tag_entries) - { - System::println("[DEBUG] %s|%s", entry.key, entry.value); - } - System::println("[DEBUG] "); - } - - auto abi_tag_entries_missing = abi_tag_entries; - Util::stable_keep_if(abi_tag_entries_missing, [](const AbiEntry& p) { return p.value.empty(); }); - - if (abi_tag_entries_missing.empty()) - { - std::error_code ec; - fs.create_directories(paths.buildtrees / spec.name(), ec); - auto abi_file_path = paths.buildtrees / spec.name() / "vcpkg_abi_info"; - fs.write_contents(abi_file_path, full_abi_info); - - abi_tag = Commands::Hash::get_file_hash(paths.get_cmake_exe(), abi_file_path, "SHA1"); - } - else - { - System::println("Warning: binary caching disabled because abi keys are missing values:\n%s", - Strings::join("", abi_tag_entries_missing, [](const AbiEntry& e) { - return " " + e.key + "\n"; - })); - } - } + auto abi_tag_and_file = compute_abi_tag(paths, config, pre_build_info, dependency_abis); std::unique_ptr bcf; - auto archives_root_dir = paths.root / "archives"; - auto archive_name = abi_tag + ".zip"; - auto archive_subpath = abi_tag.empty() ? fs::path() : fs::u8path(abi_tag.substr(0, 2)) / archive_name; - auto archive_path = archives_root_dir / archive_subpath; - auto archive_tombstone_path = archives_root_dir / "fail" / archive_subpath; + auto maybe_abi_tag_and_file = abi_tag_and_file.get(); - auto found_archive = false; - - if (GlobalState::g_binary_caching && !abi_tag.empty()) + if (GlobalState::g_binary_caching && maybe_abi_tag_and_file) { + auto archives_root_dir = paths.root / "archives"; + auto archive_name = maybe_abi_tag_and_file->tag + ".zip"; + auto archive_subpath = fs::u8path(maybe_abi_tag_and_file->tag.substr(0, 2)) / archive_name; + auto archive_path = archives_root_dir / archive_subpath; + auto archive_tombstone_path = archives_root_dir / "fail" / archive_subpath; + if (fs.exists(archive_path)) { System::println("Using cached binary package: %s", archive_path.u8string()); - auto pkg_path = paths.package_dir(spec); - 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()); - -#if defined(_WIN32) - auto&& _7za = paths.get_7za_exe(); - - System::cmd_execute_clean(Strings::format( - R"("%s" x "%s" -o"%s" -y >nul)", _7za.u8string(), archive_path.u8string(), pkg_path.u8string())); -#else - System::cmd_execute_clean(Strings::format( - R"(unzip -qq "%s" "-d%s")", archive_path.u8string(), pkg_path.u8string())); -#endif + decompress_archive(paths, spec, archive_path); auto maybe_bcf = Paragraphs::try_load_cached_package(paths, spec); bcf = std::make_unique(std::move(maybe_bcf).value_or_exit(VCPKG_LINE_INFO)); - found_archive = true; return {BuildResult::SUCCEEDED, std::move(bcf)}; } else if (fs.exists(archive_tombstone_path)) @@ -540,75 +613,42 @@ namespace vcpkg::Build System::println("Found failure tombstone: %s", archive_tombstone_path.u8string()); return BuildResult::BUILD_FAILED; } - } - if (GlobalState::g_binary_caching && !abi_tag.empty()) - { System::println("Could not locate cached archive: %s", archive_path.u8string()); - } - ExtendedBuildResult result = do_build_package(paths, pre_build_info, spec, abi_tag, config, status_db); + ExtendedBuildResult result = do_build_package_and_clean_buildtrees( + paths, pre_build_info, spec, abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config, status_db); + + std::error_code ec; + auto abi_file_in_package = paths.package_dir(spec) / "share" / spec.name() / "vcpkg_abi_info.txt"; + fs.copy_file(maybe_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 (GlobalState::g_binary_caching && !abi_tag.empty()) - { if (result.code == BuildResult::SUCCEEDED) { - auto tmp_archive_path = paths.buildtrees / spec.name() / (triplet.to_string() + ".zip"); + auto tmp_archive_path = paths.buildtrees / spec.name() / (spec.triplet().to_string() + ".zip"); - std::error_code ec; - fs.write_contents( - paths.package_dir(spec) / "share" / spec.name() / "vcpkg_abi_info.txt", full_abi_info, ec); - - fs.remove(tmp_archive_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !fs.exists(tmp_archive_path), - "Could not remove file: %s", - tmp_archive_path.u8string()); -#if defined(_WIN32) - auto&& _7za = paths.get_7za_exe(); + compress_archive(paths, spec, tmp_archive_path); - System::cmd_execute_clean(Strings::format( - R"("%s" a "%s" "%s\*" >nul)", - _7za.u8string(), - tmp_archive_path.u8string(), - paths.package_dir(spec).u8string())); -#else - System::cmd_execute_clean(Strings::format( - R"(cd '%s' && zip --quiet -r '%s' *)", - paths.package_dir(spec).u8string(), - tmp_archive_path.u8string())); -#endif fs.create_directories(archive_path.parent_path(), ec); - fs.rename(tmp_archive_path, archive_path); System::println("Stored binary cache: %s", archive_path.u8string()); } else if (result.code == BuildResult::BUILD_FAILED || result.code == BuildResult::POST_BUILD_CHECKS_FAILED) { - // Build failed, so store failure archive - std::error_code ec; + // Build failed, so store tombstone archive fs.create_directories(archive_tombstone_path.parent_path(), ec); fs.write_contents(archive_tombstone_path, "", ec); } - } - if (config.build_package_options.clean_buildtrees == CleanBuildtrees::YES) + return result; + } + else { - auto& fs = paths.get_filesystem(); - const fs::path buildtrees_dir = paths.buildtrees / config.scf.core_paragraph->name; - auto buildtree_files = fs.get_files_non_recursive(buildtrees_dir); - for (auto&& file : buildtree_files) - { - if (fs.is_directory(file) && file.filename() != "src") - { - std::error_code ec; - fs.remove_all(file, ec); - } - } + return do_build_package_and_clean_buildtrees( + paths, pre_build_info, spec, abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config, status_db); } - - return result; } const std::string& to_string(const BuildResult build_result) @@ -732,7 +772,7 @@ namespace vcpkg::Build { return it_hash->second; } - auto hash = Commands::Hash::get_file_hash(paths.get_cmake_exe(), triplet_file_path, "SHA1"); + auto hash = Commands::Hash::get_file_hash(paths, triplet_file_path, "SHA1"); s_hash_cache.emplace(triplet_file_path, hash); return hash; } diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index c43f25b40..e01072a0a 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -24,6 +24,7 @@ namespace vcpkg::Commands::CI Install::InstallSummary summary; }; + static constexpr StringLiteral OPTION_DRY_RUN = "--dry-run"; static constexpr StringLiteral OPTION_EXCLUDE = "--exclude"; static constexpr StringLiteral OPTION_XUNIT = "--x-xunit"; @@ -32,11 +33,14 @@ namespace vcpkg::Commands::CI {OPTION_XUNIT, "File to output results in XUnit format (internal)"}, }}; + static constexpr std::array CI_SWITCHES = { + {{OPTION_DRY_RUN, "Print out plan without execution"}}}; + const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("ci x64-windows"), - 0, + 1, SIZE_MAX, - {{}, CI_SETTINGS}, + {CI_SWITCHES, CI_SETTINGS}, nullptr, }; @@ -52,6 +56,8 @@ namespace vcpkg::Commands::CI exclusions_set.insert(exclusions.begin(), exclusions.end()); } + auto is_dry_run = Util::Sets::contains(options.switches, OPTION_DRY_RUN); + std::vector triplets; for (const std::string& triplet : args.command_arguments) { @@ -94,8 +100,15 @@ namespace vcpkg::Commands::CI } } - auto summary = Install::perform(action_plan, Install::KeepGoing::YES, paths, status_db); - results.push_back({triplet, std::move(summary)}); + if (is_dry_run) + { + Dependencies::print_plan(action_plan); + } + else + { + auto summary = Install::perform(action_plan, Install::KeepGoing::YES, paths, status_db); + results.push_back({triplet, std::move(summary)}); + } } for (auto&& result : results) diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index bbbbed036..cb0a8cc51 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -7,11 +7,11 @@ namespace vcpkg::Commands::Hash { - std::string get_file_hash(fs::path const& cmake_exe_path, fs::path const& path, std::string const& hash_type) + std::string get_file_hash(const VcpkgPaths& paths, fs::path const& path, std::string const& hash_type) { const std::string cmd_line = Strings::format( R"("%s" -E %ssum "%s")", - cmake_exe_path.u8string(), + paths.get_cmake_exe().u8string(), Strings::ascii_to_lowercase(hash_type), path.u8string()); @@ -48,12 +48,12 @@ namespace vcpkg::Commands::Hash if (args.command_arguments.size() == 1) { - auto hash = get_file_hash(paths.get_cmake_exe(), args.command_arguments[0], "SHA512"); + auto hash = get_file_hash(paths, args.command_arguments[0], "SHA512"); System::println(hash); } if (args.command_arguments.size() == 2) { - auto hash = get_file_hash(paths.get_cmake_exe(), args.command_arguments[0], args.command_arguments[1]); + auto hash = get_file_hash(paths, args.command_arguments[0], args.command_arguments[1]); System::println(hash); } -- cgit v1.2.3 From c5f93055a09629247236d1d7dca2c4aa9c1de7c9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 14 Mar 2018 05:08:35 -0700 Subject: [vcpkg-cmake-toolchain] Only wrap find_package(Boost) if a boost library is installed. --- scripts/buildsystems/vcpkg.cmake | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 196ddcb3c..10e3c3f13 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -190,23 +190,13 @@ macro(find_package name) if(EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake") set(ARGS "${ARGV}") include(${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake) - elseif("${name}" STREQUAL "Boost") - set(_Boost_USE_STATIC_LIBS ${Boost_USE_STATIC_LIBS}) - set(_Boost_USE_MULTITHREADED ${Boost_USE_MULTITHREADED}) - set(_Boost_USE_STATIC_RUNTIME ${Boost_USE_STATIC_RUNTIME}) - set(_Boost_COMPILER ${Boost_COMPILER}) + elseif("${name}" STREQUAL "Boost" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/boost") + # Checking for the boost headers disables this wrapper unless the user has installed at least one boost library unset(Boost_USE_STATIC_LIBS) unset(Boost_USE_MULTITHREADED) unset(Boost_USE_STATIC_RUNTIME) set(Boost_COMPILER "-vc140") _find_package(${ARGV}) - if(NOT Boost_FOUND) - set(Boost_USE_STATIC_LIBS ${_Boost_USE_STATIC_LIBS}) - set(Boost_USE_MULTITHREADED ${_Boost_USE_MULTITHREADED}) - set(Boost_USE_STATIC_RUNTIME ${_Boost_USE_STATIC_RUNTIME}) - set(Boost_COMPILER ${_Boost_COMPILER}) - _find_package(${ARGV}) - endif() elseif("${name}" STREQUAL "ICU") function(_vcpkg_find_in_list) list(FIND ARGV "COMPONENTS" COMPONENTS_IDX) -- cgit v1.2.3 From 4fb24d20ad848c37c9968d8bb7609c7790e27aef Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 14 Mar 2018 10:55:07 -0700 Subject: [jemalloc] Fix corrupted patchfile --- ports/jemalloc/fix-cmakelists.patch | 2 +- ports/jemalloc/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/jemalloc/fix-cmakelists.patch b/ports/jemalloc/fix-cmakelists.patch index a19cb4050..3ba70544c 100644 --- a/ports/jemalloc/fix-cmakelists.patch +++ b/ports/jemalloc/fix-cmakelists.patch @@ -35,7 +35,7 @@ index 06e83ef..229e17a 100644 ${PROJECT_BINARY_DIR}/Debug CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE @@ -754,6 +752,9 @@ if(WIN32) - COMPILE_PDB_NAME + COMPILE_PDB_NAME ${LIBJEMALLOCLIB} ) + if(NOT BUILD_SHARED_LIBS) diff --git a/ports/jemalloc/portfile.cmake b/ports/jemalloc/portfile.cmake index 3fe6fdbb7..527891666 100644 --- a/ports/jemalloc/portfile.cmake +++ b/ports/jemalloc/portfile.cmake @@ -20,6 +20,7 @@ vcpkg_apply_patches( ) vcpkg_configure_cmake( + DISABLE_PARALLEL_CONFIGURE SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DGIT_FOUND=OFF -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON -- cgit v1.2.3 From 01c4289d068e071f6ef2d64ac3328644a62a7f7b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 14 Mar 2018 11:34:59 -0700 Subject: [zeromq] Update --- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index 2e876f6e1..c367a229a 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2-2 +Version: 2018-03-14 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 e5a5d567b..ce12f60c1 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF 18498f620f0f6d4076981ea16eb5760fe4d28dc2 - SHA512 0c4a5c72455411f47283da3cad381600101be19a62437ad8e2c38e5f18fb6d621a3136e402c6eb9ba153f3d6333da9902335c2dacd8405094d4d1269df28d4af + REF 59516ed51a5c8ce7e1de0d9f938141f68507dd3c + SHA512 3a7b9875cdc09e5b24acb007fe4052e879fccd6e326b93b0c1e3fcffc13964e4de04289bda050846fe7ac1281fbb7ee03874b44db1323dada518c809417a2129 HEAD_REF master ) @@ -31,7 +31,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ) +vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) file(READ ${CURRENT_PACKAGES_DIR}/share/zeromq/ZeroMQConfig.cmake _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") -- cgit v1.2.3 From 04030295c0bcd748a3766d5565d84f5c92f21c4c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 14 Mar 2018 15:30:25 -0700 Subject: [opencv] Fixes for contrib --- ports/opencv/CONTROL | 1 + ports/opencv/portfile.cmake | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index c4d5adaac..5450f3906 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -24,6 +24,7 @@ Build-Depends: eigen3, glog, gflags, ceres Description: opencv_sfm module Feature: contrib +Build-Depends: opencv[flann] Description: opencv_contrib module Feature: cuda diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index 41e7b7406..78ed5fa51 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -66,6 +66,12 @@ if("contrib" IN_LIST FEATURES) SHA512 c16e60a6c4bb4de3ab39b876ae3c3f320ea56f69c93e9303bd2dff8760841dcd71be4161fff8bc71e8fe4fe8747fa8465d49d6bd8f5ebcdaea161f4bc2da7c93 ) + vcpkg_download_distfile(TINYDNN_ARCHIVE + URLS "https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz" + FILENAME "opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz" + SHA512 5f2c1a161771efa67e85b1fea395953b7744e29f61187ac5a6c54c912fb195b3aef9a5827135c3668bd0eeea5ae04a33cc433e1f6683e2b7955010a2632d168b + ) + function(download_opencv_3rdparty ID COMMIT HASH) if(NOT EXISTS "${DOWNLOADS}/opencv-cache/${ID}/${COMMIT}.stamp") vcpkg_download_distfile(OCV_DOWNLOAD -- cgit v1.2.3 From f2c7aeedc0154e3e1b19c5583721577a446b9f36 Mon Sep 17 00:00:00 2001 From: Claudio Fantacci Date: Thu, 15 Mar 2018 00:49:54 +0100 Subject: Fix PCL portfile debug/share error (#2996) Add missing file(REMOVE_RECURSE /debug/share) that was preventing post-build validation to complete successfully. --- ports/pcl/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index ac92d40db..812e05674 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -76,6 +76,7 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/pcl) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) if(BUILD_TOOLS) file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) -- cgit v1.2.3 From f1e9e41e7d89780430c382db8ef1198f6ea83dd8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 14 Mar 2018 16:53:23 -0700 Subject: [nlohmann-json] Update to 3.1.2 --- ports/nlohmann-json/CONTROL | 2 +- ports/nlohmann-json/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/nlohmann-json/CONTROL b/ports/nlohmann-json/CONTROL index d32991c0d..b0eee2bf9 100644 --- a/ports/nlohmann-json/CONTROL +++ b/ports/nlohmann-json/CONTROL @@ -1,3 +1,3 @@ Source: nlohmann-json -Version: 3.1.0 +Version: 3.1.2 Description: JSON for Modern C++ diff --git a/ports/nlohmann-json/portfile.cmake b/ports/nlohmann-json/portfile.cmake index b186db817..44f7a86dc 100644 --- a/ports/nlohmann-json/portfile.cmake +++ b/ports/nlohmann-json/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_VERSION 3.1.0) +set(SOURCE_VERSION 3.1.2) vcpkg_download_distfile(HEADER URLS "https://github.com/nlohmann/json/releases/download/v${SOURCE_VERSION}/json.hpp" FILENAME "nlohmann-json-${SOURCE_VERSION}.hpp" - SHA512 710a92f065cc7fc873db2e08158f285390b9ac38f1b0bc6bbfd9e52597574749fe1e90b114d3d750fcc9f79d7d53530242e57135d60675b35c23d1f948ad7ef2 + SHA512 05df0ad3338f0bca885c0aa9da523922b99016986a9b01426b13888c0febd83bf1f6f063886f6c75f8a656ef79abac6292fe442dc05b1897d546ba5b70be48a5 ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From 3a056235b85f34573903a7dc325d45e66549b6ff Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 14 Mar 2018 16:56:33 -0700 Subject: [vcpkg] Create minimal package structure even on failure --- toolsrc/src/vcpkg/build.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 99ae5d2a3..b71bdbf25 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -620,6 +620,7 @@ namespace vcpkg::Build paths, pre_build_info, spec, abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config, status_db); 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(maybe_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()); -- cgit v1.2.3 From 7528c4d525419a418e8e0046f6650b833ad75fd7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 16 Mar 2018 08:02:55 +0000 Subject: Fix boost build errors when vcpkg path has spaces (#3054) * Fix boost build errors when vcpkg path has spaces Add missing quotes in boost_serialization path * [boost-modular-build-helper] Bump version due to change * [boost-modular-build-helper] Quote mpi as well --- ports/boost-modular-build-helper/CONTROL | 2 +- ports/boost-modular-build-helper/Jamroot.jam | 4 ++-- ports/boost-modular-build-helper/user-config.jam | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/boost-modular-build-helper/CONTROL b/ports/boost-modular-build-helper/CONTROL index eb2257a01..d57815738 100644 --- a/ports/boost-modular-build-helper/CONTROL +++ b/ports/boost-modular-build-helper/CONTROL @@ -1,2 +1,2 @@ Source: boost-modular-build-helper -Version: 1 +Version: 2 diff --git a/ports/boost-modular-build-helper/Jamroot.jam b/ports/boost-modular-build-helper/Jamroot.jam index e498483c3..1e3dce89c 100644 --- a/ports/boost-modular-build-helper/Jamroot.jam +++ b/ports/boost-modular-build-helper/Jamroot.jam @@ -129,8 +129,8 @@ if "@PORT@" != "boost-serialization" { use-project /boost/serialization : . ; - lib boost_serialization : : @CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_serialization@BOOST_LIB_RELEASE_SUFFIX@ release ; - lib boost_serialization : : @CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_serialization@BOOST_LIB_DEBUG_SUFFIX@ debug ; + lib boost_serialization : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_serialization@BOOST_LIB_RELEASE_SUFFIX@" release ; + lib boost_serialization : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_serialization@BOOST_LIB_DEBUG_SUFFIX@" debug ; explicit boost_serialization ; } diff --git a/ports/boost-modular-build-helper/user-config.jam b/ports/boost-modular-build-helper/user-config.jam index e045d622b..bd3797283 100644 --- a/ports/boost-modular-build-helper/user-config.jam +++ b/ports/boost-modular-build-helper/user-config.jam @@ -28,8 +28,8 @@ if "@PORT@" = "boost-python" if "@PORT@" = "boost-mpi" { using mpi : : - @CURRENT_INSTALLED_DIR@/lib - @CURRENT_INSTALLED_DIR@/include + "@CURRENT_INSTALLED_DIR@/lib" + "@CURRENT_INSTALLED_DIR@/include" msmpi ; } -- cgit v1.2.3 From 33a8ee0a88b277dab4be336169f4b975f8c41cbb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 14 Mar 2018 01:42:30 -0700 Subject: [abseil][curl][chakracore][thrift] Upgrades --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/chakracore/CONTROL | 2 +- ports/chakracore/portfile.cmake | 4 ++-- ports/curl/0002_fix_uwp.patch | 4 ++-- ports/curl/CONTROL | 2 +- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index 37258b7b2..ff0550213 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-03-13 +Version: 2018-03-14 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 526d93bae..f91867c70 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 23ef7e11277a7a7709b70c362eea6b17cb932b34 - SHA512 86f83553b8da536c55660d2dd439f0dfc75d0c1839d83b0f5a1ab6f5016730bcac9d007873901789c71e77603276e85658a86ffa4691c60fabec29b593b49744 + REF 2661ed4998e8c5e9fa0a7f58b2d32eeab6544a70 + SHA512 07e1f66140883ae407646b3354b60457fd64df267e154cd7d10296bbae3a2d5c050202bcff5a2fdc6ecb4c6dab5bd7b35db3e321d4539085a40b52131d4e8e35 HEAD_REF master ) diff --git a/ports/chakracore/CONTROL b/ports/chakracore/CONTROL index 4ae901a2f..edd7eb1a1 100644 --- a/ports/chakracore/CONTROL +++ b/ports/chakracore/CONTROL @@ -1,3 +1,3 @@ Source: chakracore -Version: 1.8.1 +Version: 1.8.2 Description: Core part of the Chakra Javascript engine diff --git a/ports/chakracore/portfile.cmake b/ports/chakracore/portfile.cmake index 7e8d8ec6e..c056ab599 100644 --- a/ports/chakracore/portfile.cmake +++ b/ports/chakracore/portfile.cmake @@ -15,8 +15,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/ChakraCore - REF v1.8.1 - SHA512 203eaad21130fca9ac043952327f758947d41288ce9eb771bc469e768079a39cc517f86746d85ae270b04c5b7640d18d02f497a18cda05190dfaa68fdc16cbb9 + REF v1.8.2 + SHA512 6d4408311f0c3ff2c9895f59f34f12fb84797d130a562db7c2af27eb26edd3d46bf935dab4cd40c2ffc0dc853ad9bdf432a721cfded7836639858965b7eb67e9 HEAD_REF master ) diff --git a/ports/curl/0002_fix_uwp.patch b/ports/curl/0002_fix_uwp.patch index 8408177e8..111ca98e8 100644 --- a/ports/curl/0002_fix_uwp.patch +++ b/ports/curl/0002_fix_uwp.patch @@ -60,14 +60,14 @@ diff --git a/lib/ftp.c b/lib/ftp.c index 8042edf..3442df7 100644 --- a/lib/ftp.c +++ b/lib/ftp.c -@@ -4297,7 +4297,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) +@@ -4260,7 +4260,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) /* prevpath is "raw" so we convert the input path before we compare the strings */ size_t dlen; - char *path; + char *path = NULL; CURLcode result = - Curl_urldecode(conn->data, data->state.path, 0, &path, &dlen, FALSE); + Curl_urldecode(conn->data, data->state.path, 0, &path, &dlen, TRUE); if(result) { diff --git a/lib/rand.c b/lib/rand.c index 2670af9..0d18d37 100644 diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index c273ec181..1f410c06a 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7.59.0 +Version: 7_59_0-1 Build-Depends: zlib Description: A library for transferring data with URLs Default-Features: ssl diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index d7beee7e0..3dd5541a2 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-03-13 +Version: 2018-03-14 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 123b760a7..05b0da9e0 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 8d55c47610b765b2bcdfaebb7ee8d22930e0bd0d - SHA512 ebca8605f6841826d506608ccf64a985dc97316daa02dfe67e0646761fcea85e8920b17678fb01bfd2dea0337b182316a31c98c79c4e2f4d03f1b342521123d5 + REF da9a9bac92550f676e170e600d4be24769e14835 + SHA512 bf7ba783ae5880d66fb71aa99f9c772509e32c0e35e786a3bfb839901d95efdd7bd27eddc74f7da3452aba176ff6f72cda3cc1e19b5cd808d9fbcd343bc0a403 HEAD_REF master ) -- cgit v1.2.3 From adb8edddbb8e019e04d43d096184d4d6613fece9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 17 Mar 2018 20:10:17 -0700 Subject: [abseil][exiv2][jsonnet][ms-gsl][nuklear][re2][rs-core-lib][thrift][zeromq][zziplib] Upgrades --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/jsonnet/CONTROL | 2 +- ports/jsonnet/portfile.cmake | 4 ++-- ports/ms-gsl/CONTROL | 2 +- ports/ms-gsl/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/re2/CONTROL | 2 +- ports/re2/portfile.cmake | 4 ++-- ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 4 ++-- ports/zziplib/CONTROL | 2 +- ports/zziplib/portfile.cmake | 4 ++-- 20 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index ff0550213..011d38896 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-03-14 +Version: 2018-03-17 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index f91867c70..42052143d 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 2661ed4998e8c5e9fa0a7f58b2d32eeab6544a70 - SHA512 07e1f66140883ae407646b3354b60457fd64df267e154cd7d10296bbae3a2d5c050202bcff5a2fdc6ecb4c6dab5bd7b35db3e321d4539085a40b52131d4e8e35 + REF eed36bfba04dbe8a08ec72e631c3b337e4f2db11 + SHA512 250911ccca6f21fafbd636e1d45bff748c53e31d0867e8f04bd73b1fbb5ecd261aa9d8e6d07ff610d58daed1dbe14e67db48b1f32a4ce41b3ac0abdde4b14146 HEAD_REF master ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index fbcb220c7..8411f4c86 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-02-25 +Version: 2018-03-17 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 2a0acc649..57515137b 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF 28fa146d9758230ea65e2b89574095514aa50429 - SHA512 710020dd404d43edd268a9229f240222b185576d8c277884c57479d291d0f3145b6076d0225849c38ab2e618d113dbc61cd6a60d4545e2a44797a63a2f01a603 + REF a4a0516dc4b8b1376a5d9ca339c59c25e8799033 + SHA512 84ebac0e0aafbf610ae27fd00106a531e5ef1e37f8832c5d52070b0d4f8b8ebad367774f3d0ed4177137fab81d76e08937491b62b77aa73eb563cd7439a111cc HEAD_REF master ) diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index fafb3c255..f32796ca3 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-03-11 +Version: 2018-03-17 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index ca5df8b29..0041d7f2c 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF c03e3e7f40bcf6f2f62168ad0f0fe21137e0c972 - SHA512 b4bad7591b1a23fcb88e58377f472016177581f9256b9e721eab6e762ad2ec947c432cd1b2f659de54cd9ef4d7a67e6c190152365f6093610697a4e720be2a89 + REF 9829acf280a64b58ad0b14c9f5c28fe8564ed13e + SHA512 5ddcc3d6bc91467da766ba0ed81251066e348db14d1fdf681bdd6c08189249d1c221dab73cc6bdf85465217aeda186f2f5c0eee11bb179435a52ff57be12d20e HEAD_REF master ) diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL index c30927bb4..bc4ac2d1d 100644 --- a/ports/ms-gsl/CONTROL +++ b/ports/ms-gsl/CONTROL @@ -1,3 +1,3 @@ Source: ms-gsl -Version: 2018-03-07 +Version: 2018-03-17 Description: Microsoft implementation of the Guidelines Support Library \ No newline at end of file diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index 45c41f79c..c2ce611df 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/GSL - REF c9e423d7cf2afb88672e31f55e4b30c53be7aae3 - SHA512 a6ea1897b931068384c0dad768202a0314f130cfc30fc6cc8307df14ac02c1842e196d87e30e85e1e3b48295f4f47780a5b3e7123937cb3c8efa9e3e10a596ed + REF d846fe50a3f0bb7767c7e087a05f4be95f4da0ec + SHA512 83560cb0c39b6a4781e916c6081ad2728296e1b19760ca1b6426a8431fb6d7093760a882c539dd77152f5892fe081b1795af6366ea91385bb10aba6adf27170f HEAD_REF master ) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index 8874d2787..9d34a7d77 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-03-07 +Version: 2018-03-17 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index f052ee266..51b45286f 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF 905b41f640d5ec901a99d343c95e97104292c2d9 - SHA512 b5d671950f411a99a4f7b0017550cc9448c2ab5743256c949895945664d914b78e35f931c4986d863563391cbee11185b94a03c86737cdbb4b3c4e63e0fdc383 + REF 20cd35c0fb379df3b8668e6319e87ada5081c99d + SHA512 a5cf3ecca15e6a8b8f7a4f7cf1122265831eac1152c6df6495b5e54654e948b05b2e349c46a581b51f6d94bb9c3d4f843f6acaffacd610f54dd45588b8cd5109 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL index 4155e0c64..0a1a4fb1d 100644 --- a/ports/re2/CONTROL +++ b/ports/re2/CONTROL @@ -1,3 +1,3 @@ Source: re2 -Version: 2018-03-07 +Version: 2018-03-17 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 diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake index 5274a4213..cec69eb6a 100644 --- a/ports/re2/portfile.cmake +++ b/ports/re2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/re2 - REF c1ed8543f1b703ce200212bb5629ba69a2f9b63a - SHA512 399a7545d3ac678b068118271aaa710cfae2c9c38e27b07d880f04714bbb13a19c69b94d4acbdb459f199920fee4d3d1a7e23e22a364c89b3c8b7100ce9b208e + REF f2cc1aeb5de463c45d020c446cbcb028385b49f3 + SHA512 68df93cac6916cf5d944b57de505f7c592dcc66bbe003dbaffdf88cfd6648787a272740a861d8c8440ff2888434776141a7710b326907687285f8e9340be127c HEAD_REF master ) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index af14306e0..03e5f4955 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-03-11 +Version: 2018-03-17 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index 32a0befe2..47e31c9bf 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF a0d287aada58586fc16e8cbb44b2d34eaabeff46 - SHA512 4b160552118dccd2faf076e397d59ff785b53ff2ba7fc5f4ccd338dcb7d0eec7e851071036b5c983ad1ddccbcb64653bf522507c687a11756089c054241ff21d + REF c5b4522c336cd2348c9b65b01802ef1c4865fca2 + SHA512 a720d2f4cf6ef9dda1ce3e6bccf1495a8d29d3765d7456a5e8b79342ddc13f68428d17ea1e2993cb181450b0c2dca4c377735eef0f2f2e8a6bd66e6f2b78fd6a HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 3dd5541a2..0d8ba8c5a 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-03-14 +Version: 2018-03-17 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 05b0da9e0..a80b4bb68 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF da9a9bac92550f676e170e600d4be24769e14835 - SHA512 bf7ba783ae5880d66fb71aa99f9c772509e32c0e35e786a3bfb839901d95efdd7bd27eddc74f7da3452aba176ff6f72cda3cc1e19b5cd808d9fbcd343bc0a403 + REF b7084cbc0d377c59e045553add6f61215ed77854 + SHA512 0f3a4ba79b62c4a5f6809fe626adef63b0c0ab0024993146d946aa7de2eeb8e58086220be6a5d6ec41331fc827ce2a9b7ebe9b9b4b59d9d7307ce5f239430005 HEAD_REF master ) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index c367a229a..6ff7822dd 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-03-14 +Version: 2018-03-17 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 ce12f60c1..78d7f7a12 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF 59516ed51a5c8ce7e1de0d9f938141f68507dd3c - SHA512 3a7b9875cdc09e5b24acb007fe4052e879fccd6e326b93b0c1e3fcffc13964e4de04289bda050846fe7ac1281fbb7ee03874b44db1323dada518c809417a2129 + REF 4d9fc8066fe75795e8ccd77526b16baa5615b6bf + SHA512 0ba3b52637ee367f78b63c36e8738b1e217dcbc739bf308b386e9269963a3d87f7670f5904bb2cee6702afac6fe05d51645ab3f897ee507e03ca735f22c91b60 HEAD_REF master ) diff --git a/ports/zziplib/CONTROL b/ports/zziplib/CONTROL index 2b7447609..4d4f7ea58 100644 --- a/ports/zziplib/CONTROL +++ b/ports/zziplib/CONTROL @@ -1,4 +1,4 @@ Source: zziplib -Version: 0.13.62-1 +Version: 0.13.69 Build-Depends: zlib Description: library providing read access on ZIP-archives diff --git a/ports/zziplib/portfile.cmake b/ports/zziplib/portfile.cmake index 68419be3b..2ff90af94 100644 --- a/ports/zziplib/portfile.cmake +++ b/ports/zziplib/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gdraheim/zziplib - REF v0.13.68 - SHA512 e8a9976242acc04064ec239b9b929228370a946e5bd37092adcc1bda14605710a3850d39795d1937b609d1ab9a9a1998152f8c88b2dccc387ac6ec774d9cfce9 + REF v0.13.69 + SHA512 ade026289737f43ca92a8746818d87dd7618d473dbce159546ce9071c9e4cbe164a6b1c9efff16efb7aa0327b2ec6b34f3256c6bda19cd6e325703fffc810ef0 ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From bae7c95b22cff9ef667ce1780b839f1a386ed2d5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 18 Mar 2018 00:33:00 -0700 Subject: [libjpeg-turbo] Disable GETENV/SETENV in UWP. See https://github.com/libjpeg-turbo/libjpeg-turbo/issues/203 --- ports/libjpeg-turbo/CONTROL | 2 +- ports/libjpeg-turbo/portfile.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ports/libjpeg-turbo/CONTROL b/ports/libjpeg-turbo/CONTROL index 2bb119dbc..fa72d68b0 100644 --- a/ports/libjpeg-turbo/CONTROL +++ b/ports/libjpeg-turbo/CONTROL @@ -1,3 +1,3 @@ Source: libjpeg-turbo -Version: 1.5.3 +Version: 1.5.3-1 Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index 288960662..7f6bc4973 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -7,10 +7,17 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_download_distfile(GETENV_PATCH + URLS "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/bd96b30b74fe166fc94218cfc64a097fafdcc05f.diff" + FILENAME "libjpeg-turbo-bd96b30b74fe166fc94218cfc64a097fafdcc05f.diff" + SHA512 4cd064521b5e4baba4adf972f9f574f6dd43a2cd3e3ad143ca2cdf0f165024406d4fd2ed094124d0c17c5370394140e82fdd892d3cdc49609acdf8f79db1758c +) + vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-options-for-exes-docs-headers.patch" "${CMAKE_CURRENT_LIST_DIR}/linux-cmake.patch" + "${GETENV_PATCH}" ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) @@ -22,6 +29,10 @@ else() set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") endif() +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(ENV{_CL_} "-DNO_GETENV -DNO_PUTENV") +endif() + string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_CRT_DLL) -- cgit v1.2.3 From d9abd619fabb6aa6faab08d53ef08bf7f706390e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 17 Mar 2018 20:01:13 -0700 Subject: [gdal] Fix regression due to libmysql upgrade --- ports/gdal/CONTROL | 2 +- ports/gdal/no-my-bool.patch | 13 +++++++++++++ ports/gdal/no-mysql-global-h.patch | 13 +++++++++++++ ports/gdal/no-mysql-sys-h.patch | 13 +++++++++++++ ports/gdal/portfile.cmake | 8 ++++++-- 5 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 ports/gdal/no-my-bool.patch create mode 100644 ports/gdal/no-mysql-global-h.patch create mode 100644 ports/gdal/no-mysql-sys-h.patch diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index b84dc29e1..c958ac671 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,4 +1,4 @@ Source: gdal -Version: 2.2.2 +Version: 2.2.2-1 Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma diff --git a/ports/gdal/no-my-bool.patch b/ports/gdal/no-my-bool.patch new file mode 100644 index 000000000..1ed0279ee --- /dev/null +++ b/ports/gdal/no-my-bool.patch @@ -0,0 +1,13 @@ +diff --git a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp +index 8733af9..f49d862 100644 +--- a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp ++++ b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp +@@ -259,7 +259,7 @@ int OGRMySQLDataSource::Open( const char * pszNewName, char** papszOpenOptionsIn + // Enable automatic reconnection + // Must be called after mysql_real_connect() on MySQL < 5.0.19 + // and at any point on more recent versions. +- my_bool reconnect = 1; ++ bool reconnect = 1; + mysql_options(hConn, MYSQL_OPT_RECONNECT, &reconnect); + } + diff --git a/ports/gdal/no-mysql-global-h.patch b/ports/gdal/no-mysql-global-h.patch new file mode 100644 index 000000000..57ff89ce3 --- /dev/null +++ b/ports/gdal/no-mysql-global-h.patch @@ -0,0 +1,13 @@ +diff --git a/ogr/ogrsf_frmts/mysql/ogr_mysql.h b/ogr/ogrsf_frmts/mysql/ogr_mysql.h +index 76a6762..b2f0fcb 100644 +--- a/ogr/ogrsf_frmts/mysql/ogr_mysql.h ++++ b/ogr/ogrsf_frmts/mysql/ogr_mysql.h +@@ -43,7 +43,7 @@ + #pragma warning( disable : 4211 ) /* nonstandard extension used : redefined extern to static */ + #endif + +-#include ++/* #include */ /* Mysql 8+ no longer ships with my_global.h */ + #include + + #ifdef _MSC_VER diff --git a/ports/gdal/no-mysql-sys-h.patch b/ports/gdal/no-mysql-sys-h.patch new file mode 100644 index 000000000..951425386 --- /dev/null +++ b/ports/gdal/no-mysql-sys-h.patch @@ -0,0 +1,13 @@ +diff --git a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp +index e694bbd..8733af9 100644 +--- a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp ++++ b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp +@@ -44,7 +44,7 @@ + #pragma clang diagnostic ignored "-Wunknown-pragmas" + #pragma clang diagnostic ignored "-Wdocumentation" + #endif +-#include ++/*#include mysql 8.1 no longer ships with my_sys.h*/ + #ifdef __clang__ + #pragma clang diagnostic pop + #endif diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 5ee981d6c..10e2ceab8 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -1,5 +1,5 @@ if (TRIPLET_SYSTEM_ARCH MATCHES "arm") - message(FATAL_ERROR " ARM is currently not supported.") + message(FATAL_ERROR "ARM is currently not supported.") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -16,12 +16,13 @@ vcpkg_download_distfile(ARCHIVE SHA512 b886238a7915c97f4acec5920dabe959d1ab15a8be0bc31ba0d05ad69d1d7d96f864faf0aa82921fa1a1b40b733744202b86f2f45ff63d6518cd18a53f3544a8 ) -# Extract source into archictecture specific directory, because GDALs' nmake based build currently does not +# Extract source into architecture specific directory, because GDALs' nmake based build currently does not # support out of source builds. set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-2.2.2) set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-2.2.2) foreach(BUILD_TYPE debug release) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) vcpkg_apply_patches( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-2.2.2 @@ -29,6 +30,9 @@ foreach(BUILD_TYPE debug release) ${CMAKE_CURRENT_LIST_DIR}/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch ${CMAKE_CURRENT_LIST_DIR}/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch ${CMAKE_CURRENT_LIST_DIR}/0003-Fix-openjpeg-include.patch + ${CMAKE_CURRENT_LIST_DIR}/no-mysql-global-h.patch + ${CMAKE_CURRENT_LIST_DIR}/no-mysql-sys-h.patch + ${CMAKE_CURRENT_LIST_DIR}/no-my-bool.patch ) endforeach() -- cgit v1.2.3 From 56560864e9cca01645fa19c65db9742d85a3e381 Mon Sep 17 00:00:00 2001 From: Daniel Strommen Date: Sun, 18 Mar 2018 04:31:30 -0700 Subject: Include windows.h before including consoleapi.h (#3050) * Include windows.h before including consoleapi.h Issue: cpython fails to build against Windows Insider Preview SDK 17115 Root Cause: Failure to include windows.h before other Windows headers (consoleapi.h) Solution: Include windows.h before consoleapi.h If you don't include Windows.h before other Windows headers, then your code is likely to break with new versions of the Windows Platform SDK, as headers move around or new intraheader dependencies are added. That is what happened here. * Remove redundant consoleapi.h The documented header for all the console API's is windows.h, which includes wincon.h which includes consoleapi.h. Consoleapi.h used to also include windows.h, but this caused a circular dependency. So, adjusting this to only include windows.h and omit the consoleapi.h which is redundant. * [python3] formatting --- ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch | 12 +++++++++++ ports/python3/portfile.cmake | 25 +++++++++-------------- 2 files changed, 22 insertions(+), 15 deletions(-) create mode 100644 ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch diff --git a/ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch b/ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch new file mode 100644 index 000000000..a0efc8d1c --- /dev/null +++ b/ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch @@ -0,0 +1,12 @@ +diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c +--- a/Modules/_io/_iomodule.c ++++ b/Modules/_io/_iomodule.c +@@ -21,7 +21,7 @@ + #endif /* HAVE_SYS_STAT_H */ + + #ifdef MS_WINDOWS +-#include ++#include + #endif + + /* Various interned strings */ diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 9bb50b70c..6285f9a9b 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -1,17 +1,4 @@ -# 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) -# if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static) - # Because the patches patch the same file, they have to be applied in the correct order - # In this scenario, only the second patch needs to be applied, which doesn't work message(STATUS "Warning: Dynamic library with static CRT is not supported. Building static library.") set(VCPKG_LIBRARY_LINKAGE static) endif() @@ -29,8 +16,16 @@ vcpkg_from_github( REF v${PYTHON_VERSION} SHA512 32cca5e344ee66f08712ab5533e5518f724f978ec98d985f7612d0bd8d7f5cac25625363c9eead192faf1806d4ea3393515f72ba962a2a0bed26261e56d8c637 HEAD_REF master - ) +) + +vcpkg_apply_patches( + SOURCE_PATH ${TEMP_SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0004-Fix-iomodule-for-RS4-SDK.patch +) + # We need per-triplet directories because we need to patch the project files differently based on the linkage +# Because the patches patch the same file, they have to be applied in the correct order file(COPY ${TEMP_SOURCE_PATH} DESTINATION ${SOURCE_PATH}) set(SOURCE_PATH ${SOURCE_PATH}/cpython-${PYTHON_VERSION}) @@ -87,4 +82,4 @@ endif() file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}) file(RENAME ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() -- cgit v1.2.3 From dcb940790b97b5518807a0e8af382dc418d84fbf Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Sun, 18 Mar 2018 12:31:54 +0100 Subject: [msmpi] update to v9.0 (#3058) --- ports/msmpi/CONTROL | 2 +- ports/msmpi/portfile.cmake | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ports/msmpi/CONTROL b/ports/msmpi/CONTROL index a7f9f38ef..27e27074a 100644 --- a/ports/msmpi/CONTROL +++ b/ports/msmpi/CONTROL @@ -1,3 +1,3 @@ Source: msmpi -Version: 8.1 +Version: 9.0 Description: Microsoft MPI diff --git a/ports/msmpi/portfile.cmake b/ports/msmpi/portfile.cmake index 0992f5f5d..7933f2361 100644 --- a/ports/msmpi/portfile.cmake +++ b/ports/msmpi/portfile.cmake @@ -2,16 +2,16 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/msmpi-8.1) vcpkg_download_distfile(SDK_ARCHIVE - URLS "https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/msmpisdk.msi" - FILENAME "msmpisdk-8.1.msi" - SHA512 a0cfb713865257b812c19644286fc0d02ec57ce2a0bea066fead4e0ff18b545a0787065ab748f8dd335bb2fa486911aab54c1b842993b7b685c5832c014a63bf + URLS "https://download.microsoft.com/download/2/E/C/2EC96D7F-687B-4613-80F6-E10F670A2D97/msmpisdk.msi" + FILENAME "msmpisdk-9.0.msi" + SHA512 f80cc7619c42a5a0975224c5a0ab6d4085a97ab9a1480318cd72db2f600db52fb81d3959a2a9e0dbd9412b02d0814b8191dd4745bbde397110210e05960628b4 ) macro(download_msmpi_redistributable_package) vcpkg_download_distfile(REDIST_ARCHIVE - URLS "https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/MSMpiSetup.exe" - FILENAME "MSMpiSetup-8.1.exe" - SHA512 92ae65f3d52e786e39dffedabdf48255b4985a075993e626f5f59674e9ffaedbf33a4725e8f142b21468e24cd6d3e49f3d91da0fbda1867784cc93300c12c96b + URLS "https://download.microsoft.com/download/2/E/C/2EC96D7F-687B-4613-80F6-E10F670A2D97/msmpisetup.exe" + FILENAME "msmpisetup-9.0.exe" + SHA512 ad1cc3bc74e4c9c3c0f304395df9468e729e0acd9c77c8c6c806e88eadf4693811d29e608ffb459fcb6f4a20f61946ef4ac2e411aac49fb8f8d5aaddd10d4554 ) endmacro() @@ -20,7 +20,7 @@ endmacro() # We always want the ProgramFiles folder even on a 64-bit machine (not the ProgramFilesx86 folder) vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS) set(SYSTEM_MPIEXEC_FILEPATH "${PROGRAM_FILES_PLATFORM_BITNESS}/Microsoft MPI/Bin/mpiexec.exe") -set(MSMPI_EXPECTED_FULL_VERSION "8.1.12438") +set(MSMPI_EXPECTED_FULL_VERSION "9.0.12497") if(EXISTS "${SYSTEM_MPIEXEC_FILEPATH}") set(MPIEXEC_VERSION_LOGNAME "mpiexec-version") @@ -31,7 +31,6 @@ if(EXISTS "${SYSTEM_MPIEXEC_FILEPATH}") ) file(READ ${CURRENT_BUILDTREES_DIR}/${MPIEXEC_VERSION_LOGNAME}-out.log MPIEXEC_OUTPUT) - # Note: v8.1.1 was released with version 8.1.12438.1091. This is compatible with 8.1.12438.1084 (the version above), so ignore the fourth version number. if(MPIEXEC_OUTPUT MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+)\\.[0-9]+\\]") if(NOT CMAKE_MATCH_1 STREQUAL MSMPI_EXPECTED_FULL_VERSION) download_msmpi_redistributable_package() -- cgit v1.2.3 From be0e6434371d200f0ebec3543f73436817cf1e3f Mon Sep 17 00:00:00 2001 From: Mateusz Loskot Date: Sun, 18 Mar 2018 12:36:55 +0100 Subject: Update FAQ about cleaning downloads and build trees (#3044) * Update FAQ about cleaning downloads and build trees Answers #2202 and #2538 * [vcpkg-docs] Add packages folder to list of temporary folders --- docs/about/faq.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/about/faq.md b/docs/about/faq.md index cb711e384..b345b4fd0 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -72,6 +72,10 @@ A lower level mechanism to achieve the same as the `vcpkg integrate project` NuG ``` +## How can I remove temporary files? + +You can save some disk space by completely removing the `packages\`, `buildtrees\`, and `downloads\` folders. + ## How is CMake used internally by Vcpkg? Vcpkg uses CMake internally as a build scripting language. This is because CMake is already an extremely common build system for cross-platform open source libraries and is becoming very popular for C++ projects in general. It is easy to acquire on Windows, does not require system-wide installation, and legible for unfamiliar users. -- cgit v1.2.3 From 55e2cccc19ad8a8f03ac9f27799babc7f15d9d92 Mon Sep 17 00:00:00 2001 From: Ugo Pattacini Date: Sun, 18 Mar 2018 13:13:40 +0100 Subject: purged empty directory in qt5 (#3028) --- ports/qt5-declarative/portfile.cmake | 2 ++ ports/qt5-tools/portfile.cmake | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ports/qt5-declarative/portfile.cmake b/ports/qt5-declarative/portfile.cmake index 63ce79746..1075c9c72 100644 --- a/ports/qt5-declarative/portfile.cmake +++ b/ports/qt5-declarative/portfile.cmake @@ -3,3 +3,5 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) qt_modular_library(qtdeclarative 49b8b50932b73ea39da14ac3425044193dfd64eabceadba379aa01cf2fc141177f9870c387caf1cf93ce09e8b197828a54b8d9fcefc4d9cdf400a6c6dd9a9e90) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/platforminputcontexts) \ No newline at end of file diff --git a/ports/qt5-tools/portfile.cmake b/ports/qt5-tools/portfile.cmake index 10eefa959..a79a1b134 100644 --- a/ports/qt5-tools/portfile.cmake +++ b/ports/qt5-tools/portfile.cmake @@ -3,3 +3,5 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) qt_modular_library(qttools afce063e167de96dfa264cfd27dc8d80c23ef091a30f4f8119575cae83f39716c3b332427630b340f518b82d6396cca1893f28e00f3c667ba201d7e4fc2aefe1) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}//tools/qt5-tools/platforminputcontexts) \ No newline at end of file -- cgit v1.2.3 From d253123055e6bdfb181c6a8a14a63e2d6fc68cad Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Sun, 18 Mar 2018 20:24:19 +0800 Subject: Add options and documentation for env command (#3007) * [vcpkg] Add options and documentation for env command * [vcpkg-env] Cleanup. Add tools/*. --- toolsrc/include/vcpkg/base/system.h | 5 +++- toolsrc/src/vcpkg/base/system.cpp | 15 +++++++++-- toolsrc/src/vcpkg/commands.env.cpp | 54 ++++++++++++++++++++++++++++++++----- toolsrc/src/vcpkg/help.cpp | 6 +---- 4 files changed, 66 insertions(+), 14 deletions(-) diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index 31034f6b4..b2faf69bb 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -1,5 +1,7 @@ #pragma once +#include + #include #include #include @@ -38,7 +40,8 @@ namespace vcpkg::System std::string output; }; - int cmd_execute_clean(const CStringView cmd_line); + int cmd_execute_clean(const CStringView cmd_line, + const std::unordered_map& extra_env = {}); int cmd_execute(const CStringView cmd_line); diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index e24098f97..f339afa51 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -153,12 +153,12 @@ namespace vcpkg::System R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), args); } - int cmd_execute_clean(const CStringView cmd_line) + int cmd_execute_clean(const CStringView cmd_line, const std::unordered_map& extra_env) { #if defined(_WIN32) 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)"; - static const std::string NEW_PATH = Strings::format( + 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::vector env_wstrings = { @@ -224,11 +224,22 @@ namespace vcpkg::System env_cstr.push_back(L'\0'); } + if (extra_env.find("PATH") != extra_env.end()) + NEW_PATH += Strings::format(";%s", extra_env.find("PATH")->second); env_cstr.append(Strings::to_utf16(NEW_PATH)); env_cstr.push_back(L'\0'); env_cstr.append(L"VSLANG=1033"); env_cstr.push_back(L'\0'); + for (auto item : extra_env) + { + if (item.first == "PATH") continue; + env_cstr.append(Strings::to_utf16(item.first)); + env_cstr.push_back(L'='); + env_cstr.append(Strings::to_utf16(item.second)); + env_cstr.push_back(L'\0'); + } + STARTUPINFOW startup_info; memset(&startup_info, 0, sizeof(STARTUPINFOW)); startup_info.cb = sizeof(STARTUPINFOW); diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp index f3beef6cd..d078baedb 100644 --- a/toolsrc/src/vcpkg/commands.env.cpp +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -1,5 +1,6 @@ #include "pch.h" +#include #include #include #include @@ -7,25 +8,66 @@ namespace vcpkg::Commands::Env { + static constexpr StringLiteral OPTION_BIN = "--bin"; + static constexpr StringLiteral OPTION_INCLUDE = "--include"; + static constexpr StringLiteral OPTION_DEBUG_BIN = "--debug-bin"; + static constexpr StringLiteral OPTION_TOOLS = "--tools"; + static constexpr StringLiteral OPTION_PYTHON = "--python"; + + static constexpr std::array SWITCHES = {{ + {OPTION_BIN, "Add installed bin/ to PATH"}, + {OPTION_INCLUDE, "Add installed include/ to INCLUDE"}, + {OPTION_DEBUG_BIN, "Add installed debug/bin/ to PATH"}, + {OPTION_TOOLS, "Add installed tools/*/ to PATH"}, + {OPTION_PYTHON, "Add installed python/ to PYTHONPATH"}, + }}; + const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("env --triplet x64-windows"), 0, 0, - {}, + {SWITCHES, {}}, nullptr, }; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& triplet) { - args.parse_arguments(COMMAND_STRUCTURE); + const auto& fs = paths.get_filesystem(); + + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); - const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); + const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, triplet); const Toolset& toolset = paths.get_toolset(pre_build_info); auto env_cmd = Build::make_build_env_cmd(pre_build_info, toolset); + + std::unordered_map extra_env = {}; + const bool add_bin = Util::Sets::contains(options.switches, OPTION_BIN); + const bool add_include = Util::Sets::contains(options.switches, OPTION_INCLUDE); + const bool add_debug_bin = Util::Sets::contains(options.switches, OPTION_DEBUG_BIN); + const bool add_tools = Util::Sets::contains(options.switches, OPTION_TOOLS); + const bool add_python = Util::Sets::contains(options.switches, OPTION_PYTHON); + + std::vector path_vars; + if (add_bin) path_vars.push_back((paths.installed / triplet.to_string() / "bin").u8string()); + if (add_debug_bin) path_vars.push_back((paths.installed / triplet.to_string() / "debug" / "bin").u8string()); + if (add_include) extra_env.emplace("INCLUDE", (paths.installed / triplet.to_string() / "include").u8string()); + if (add_tools) + { + auto tools_dir = paths.installed / triplet.to_string() / "tools"; + auto tool_files = fs.get_files_non_recursive(tools_dir); + path_vars.push_back(tools_dir.u8string()); + for (auto&& tool_dir : tool_files) + { + if (fs.is_directory(tool_dir)) path_vars.push_back(tool_dir.u8string()); + } + } + if (add_python) extra_env.emplace("PYTHONPATH", (paths.installed / triplet.to_string() / "python").u8string()); + if (path_vars.size() > 0) extra_env.emplace("PATH", Strings::join(";", path_vars)); + if (env_cmd.empty()) - System::cmd_execute_clean("cmd"); + System::cmd_execute_clean("cmd", extra_env); else - System::cmd_execute_clean(env_cmd + " && cmd"); + System::cmd_execute_clean(env_cmd + " && cmd", extra_env); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index b7d355742..743619937 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -98,14 +98,10 @@ namespace vcpkg::Help " vcpkg create \n" " [archivename] Create a new package\n" " vcpkg owns Search for files in installed packages\n" - " vcpkg cache List cached compiled packages\n" + " vcpkg env Creates a clean shell environment for development or compiling.\n" " vcpkg version Display version information\n" " vcpkg contact Display contact information to send feedback\n" "\n" - //"internal commands:\n" - //" --check-build-deps \n" - //" --create-binary-control \n" - //"\n" "Options:\n" " --triplet Specify the target architecture triplet.\n" " (default: %%VCPKG_DEFAULT_TRIPLET%%, see 'vcpkg help triplet')\n" -- cgit v1.2.3 From 1e73b6550cdea2792defdf8a142c24f4b80317a4 Mon Sep 17 00:00:00 2001 From: Youngho Kim Date: Fri, 16 Mar 2018 16:32:44 +0900 Subject: bug fixed for librtmp on vcpkg bug fixed for librtmp on vcpkg because of wrong find_package name for zlib and openssl --- ports/librtmp/CMakeLists.txt | 4 ++-- ports/librtmp/CONTROL | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/librtmp/CMakeLists.txt b/ports/librtmp/CMakeLists.txt index f0f78e5f1..9751f3d73 100644 --- a/ports/librtmp/CMakeLists.txt +++ b/ports/librtmp/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.8) project(librtmp C) -find_package(zlib REQUIRED) -find_package(openssl REQUIRED) +find_package(ZLIB REQUIRED) +find_package(OpenSSL REQUIRED) include_directories(${ZLIB_INCLUDE_DIRS}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/ports/librtmp/CONTROL b/ports/librtmp/CONTROL index 9a93c8b47..957f5ee16 100644 --- a/ports/librtmp/CONTROL +++ b/ports/librtmp/CONTROL @@ -1,4 +1,4 @@ Source: librtmp -Version: 2.4 +Version: 2.4-1 Build-Depends: zlib, openssl Description: RTMPDump Real-Time Messaging Protocol API -- cgit v1.2.3 From d20fccad10b017e413c71dfd785a14470816ea2b Mon Sep 17 00:00:00 2001 From: Ivy Snow Date: Mon, 19 Mar 2018 11:17:08 +0800 Subject: [curl] fix a dependency error: "Error: Unable to satisfy dependency ssl:x86-windows of curl[http2]:x86-windows" --- ports/curl/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index 1f410c06a..18518e1ea 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7_59_0-1 +Version: 7_59_0-2 Build-Depends: zlib Description: A library for transferring data with URLs Default-Features: ssl @@ -12,7 +12,7 @@ Feature: non-http Description: Enables protocols beyond HTTP/HTTPS/HTTP2 Feature: http2 -Build-Depends: nghttp2, ssl +Build-Depends: nghttp2, curl[ssl] Description: HTTP2 support Feature: ssl -- cgit v1.2.3 From 06b4452da67663a5097a67b0ba1be7b02e50aecd Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 19 Mar 2018 13:26:16 +0100 Subject: Update to ACE 6.4.7 (#3059) * ports/ace/CONTROL: * ports/ace/portfile.cmake: --- ports/ace/CONTROL | 2 +- ports/ace/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/ace/CONTROL b/ports/ace/CONTROL index 596d5a7a7..9baa763dc 100644 --- a/ports/ace/CONTROL +++ b/ports/ace/CONTROL @@ -1,3 +1,3 @@ Source: ace -Version: 6.4.6 +Version: 6.4.7 Description: The ADAPTIVE Communication Environment diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake index 63239138b..25eeabb0b 100644 --- a/ports/ace/portfile.cmake +++ b/ports/ace/portfile.cmake @@ -9,9 +9,9 @@ endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ACE_wrappers/ace) vcpkg_download_distfile(ARCHIVE - URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.6.zip" - FILENAME "ACE-6.4.6.zip" - SHA512 3b1ced19bb42bd753e0a43990f1d8f84dc57f5650c7c972f2e849d4ce3aa1db08673cf14fbc0607d7dbc9b9f95f33f72a5d7f0f11cd993beba528f80eb525e69 + URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.7.zip" + FILENAME "ACE-6.4.7.zip" + SHA512 931c7e5902f3999ed05c13f9d2c53a605e9b59b4ce78f33b42238ac25286aa13fb510e2f780b6aea9505d03edf834109ab4481870327fec1b5bb11d29cfbafdc ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 029fdb2a6cd71aaebb40ac8f97986fdbee9a74be Mon Sep 17 00:00:00 2001 From: Yann Lanthony Date: Mon, 19 Mar 2018 13:26:33 +0100 Subject: [openimageio] update to 1.8.9 (#3051) * [openimageio] update to 1.8.9 * [openimageio] remove '-1' suffix from version name --- ports/openimageio/CONTROL | 4 ++-- ports/openimageio/portfile.cmake | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index 3e498bf56..88a66b315 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -1,4 +1,4 @@ Source: openimageio -Version: 1.7.15-2 -Description: An library for reading and writing images, and a bunch of related classes, utilities, and application +Version: 1.8.9 +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 diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index cc62bd58c..21a5899c1 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.7.15 - SHA512 5b83961a77de36082e0a3abeac8015f9455504680d7437777524a9ac17ac7994df2a2ad1af86a884cf17c1afcd71a36a30e24711cba8d8a30511c05e36d7fadc + REF Release-1.8.9 + SHA512 300eab0d2e7277c46550339d72af59b3ab2232d296b4d46808575015075cdbb9dd911e9b335c0d10bf6d95ebde907240af0f4828d422aca091f82491693dfef3 HEAD_REF master ) @@ -47,6 +47,7 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) 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) -- cgit v1.2.3 From 371cc14917223f427fa42889b774bc6b5539f864 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 19 Mar 2018 08:27:40 -0700 Subject: [azure-storage-cpp] Upgrade to 3.2.1 --- ports/azure-storage-cpp/CONTROL | 2 +- ports/azure-storage-cpp/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index 837aa8ae0..0da717ba7 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp -Version: 3.2.0 +Version: 3.2.1 Build-Depends: cpprestsdk, atlmfc 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. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index b5a4791c3..edac1e2a2 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -7,8 +7,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-storage-cpp - REF v3.2.0 - SHA512 841c548986de743b508edd149441727e76f66ba09a99454006d2742547267046833062501e79ff2138d6bcad37740f7009cce4590bbdf40b48b935b989959267 + REF v3.2.1 + SHA512 8d1e8de439e52f53eb28b77e8adf394468f4861c2c4c1f79ec1437c72e3fc0bc871e4e2662ee58090748915b0f12ce6736a7cc6ede619d332686b9fb6a026c9f HEAD_REF master ) -- cgit v1.2.3 From 5968ebf9f4beae3a0662dfc6ba343b0be07a1241 Mon Sep 17 00:00:00 2001 From: Youngho Kim Date: Mon, 12 Mar 2018 22:13:14 +0900 Subject: [ffmpeg] Add options --- ports/ffmpeg/CONTROL | 31 +++++++++++++++++-- ports/ffmpeg/FindFFMPEG.cmake | 2 +- ports/ffmpeg/configure_opencv.patch | 11 +++++++ ports/ffmpeg/portfile.cmake | 59 +++++++++++++++++++++++++++++++++++-- 4 files changed, 98 insertions(+), 5 deletions(-) create mode 100644 ports/ffmpeg/configure_opencv.patch diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 3ed4c4bac..2f635cc10 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,8 +1,35 @@ Source: ffmpeg -Version: 3.3.3-3 +Version: 3.3.3-4 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. +Feature: ffserver +Description: ffserver appplication support in ffmpeg + +Feature: ffplay +Description: ffplay appplication support in ffmpeg + +Feature: ffprobe +Description: ffprobe appplication support in ffmpeg + Feature: openssl -Build-Depends: openssl +Build-Depends: openssl, ffmpeg[nonfree] Description: openssl support in ffmpeg + +Feature: lzma +Build-Depends: liblzma +Description: lzma support in ffmpeg + +Feature: x264 +Build-Depends: x264, ffmpeg[gpl] +Description: x264 support in ffmpeg + +Feature: opencl +Build-Depends: opencl +Description: opencl support in ffmpeg + +Feature: nonfree +Description: allow nonfree and unredistributable libraries + +Feature: gpl +Description: allow GPL licensed libraries diff --git a/ports/ffmpeg/FindFFMPEG.cmake b/ports/ffmpeg/FindFFMPEG.cmake index ce6e7e600..bd373bfae 100644 --- a/ports/ffmpeg/FindFFMPEG.cmake +++ b/ports/ffmpeg/FindFFMPEG.cmake @@ -8,4 +8,4 @@ foreach(FFMPEG_SUBLIBRARY avformat avdevice avcodec avutil swscale) endforeach() list(APPEND FFMPEG_LIBRARIES wsock32 ws2_32 Secur32) -find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIR) +find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS) diff --git a/ports/ffmpeg/configure_opencv.patch b/ports/ffmpeg/configure_opencv.patch new file mode 100644 index 000000000..66678661e --- /dev/null +++ b/ports/ffmpeg/configure_opencv.patch @@ -0,0 +1,11 @@ +--- a/configure ++++ b/configure +@@ -5804,7 +5804,7 @@ + enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb + enabled libopencv && { check_header opencv2/core/core_c.h && + { use_pkg_config opencv opencv2/core/core_c.h cvCreateImageHeader || +- require opencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } || ++ require opencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core341 -lopencv_imgproc341; } || + require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader; } + enabled libopenh264 && require_pkg_config openh264 wels/codec_api.h WelsGetCodecVersion + enabled libopenjpeg && { { check_lib openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } || diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 56b467685..11c24ebc7 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -3,7 +3,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ffmpeg-3.3.3) vcpkg_download_distfile(ARCHIVE URLS "http://ffmpeg.org/releases/ffmpeg-3.3.3.tar.bz2" FILENAME "ffmpeg-3.3.3.tar.bz2" - SHA512 1cc63bf73356f4e618c0d3572a216bdf5689f10deff56b4262f6d740b0bee5a4b3eac234f45fca3d4d2da77903a507b4fba725b76d2d2070f31b6dae9e7a2dab + SHA512 1cc63bf73356f4e618c0d3572a216bdf5689f10deff56b4262f6d740b0bee5a4b3eac234f45fca3d4d2da77903a507b4fba725b76d2d2070f31b6dae9e7a2dab ) vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( @@ -11,6 +11,7 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/create-lib-libraries.patch ${CMAKE_CURRENT_LIST_DIR}/detect-openssl.patch + ${CMAKE_CURRENT_LIST_DIR}/configure_opencv.patch ) vcpkg_find_acquire_program(YASM) @@ -30,14 +31,66 @@ set(_csc_PROJECT_PATH ffmpeg) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -set(OPTIONS "--disable-ffmpeg --disable-ffprobe --disable-doc --enable-debug") +set(OPTIONS "--enable-asm --enable-yasm --disable-doc --enable-debug --disable-ffmpeg") set(OPTIONS "${OPTIONS} --enable-runtime-cpudetect") + +if("nonfree" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-nonfree") +endif() + +if("gpl" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-gpl") +endif() + if("openssl" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-openssl") else() set(OPTIONS "${OPTIONS} --disable-openssl") endif() +if("ffplay" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-ffplay") +else() + set(OPTIONS "${OPTIONS} --disable-ffplay") +endif() + +if("ffserver" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-ffserver") +else() + set(OPTIONS "${OPTIONS} --disable-ffserver") +endif() + +if("ffprobe" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-ffprobe") +else() + set(OPTIONS "${OPTIONS} --disable-ffprobe") +endif() + +if("x264" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libx264") +else() + set(OPTIONS "${OPTIONS} --disable-libx264") +endif() + +if("opencl" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-opencl") +else() + set(OPTIONS "${OPTIONS} --disable-opencl") +endif() + +if("lzma" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-lzma") +else() + set(OPTIONS "${OPTIONS} --disable-lzma") +endif() + +# bzip2's debug library is named "bz2d", which isn't found by ffmpeg +# if("bzip2" IN_LIST FEATURES) +# set(OPTIONS "${OPTIONS} --enable-bzip2") +# else() +# set(OPTIONS "${OPTIONS} --disable-bzip2") +# endif() + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\") set(OPTIONS "${OPTIONS} --disable-programs --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") @@ -68,6 +121,8 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") endif() endif() +message(STATUS "Building Options: ${OPTIONS}") + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd") set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MD --extra-cxxflags=-MD") -- cgit v1.2.3 From 8bed099d4c4f7bbabc6c17ddbe082fe534121fd0 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 15:15:56 -0400 Subject: [sdl2] Fix build failure when VCPKG_BUILD_TYPE is set --- ports/sdl2/portfile.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index a3cb80e3f..5d7ac5314 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -58,9 +58,14 @@ if(NOT BINS) endif() if(NOT VCPKG_CMAKE_SYSTEM_NAME) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDL2main.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDL2maind.lib) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDL2main.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDL2maind.lib) + endif() file(GLOB SHARE_FILES ${CURRENT_PACKAGES_DIR}/share/sdl2/*.cmake) foreach(SHARE_FILE ${SHARE_FILES}) -- cgit v1.2.3 From 76d63567f0ab7961d08e34e89d7899426c8c95e2 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 14:59:21 -0400 Subject: [freetype] Fix build failures when VCPKG_BUILD_TYPE is set --- ports/freetype/portfile.cmake | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake index b0143e382..15e8aceab 100644 --- a/ports/freetype/portfile.cmake +++ b/ports/freetype/portfile.cmake @@ -33,17 +33,25 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/include/freetype2/ft2build.h ${CURRENT_PACKA file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/freetype2) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/freetype/freetype-config-debug.cmake DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") -string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" DEBUG_MODULE "${DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-debug.cmake "${DEBUG_MODULE}") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(READ ${CURRENT_PACKAGES_DIR}/debug/share/freetype/freetype-config-debug.cmake DEBUG_MODULE) + string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" DEBUG_MODULE "${DEBUG_MODULE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-debug.cmake "${DEBUG_MODULE}") +endif() -file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-release.cmake RELEASE_MODULE) -string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" RELEASE_MODULE "${RELEASE_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-release.cmake "${RELEASE_MODULE}") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-release.cmake RELEASE_MODULE) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" RELEASE_MODULE "${RELEASE_MODULE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-release.cmake "${RELEASE_MODULE}") +endif() # Fix the include dir [freetype2 -> freetype] -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/freetype/freetype-config.cmake CONFIG_MODULE) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(READ ${CURRENT_PACKAGES_DIR}/debug/share/freetype/freetype-config.cmake CONFIG_MODULE) +else() #if(VCPKG_BUILD_TYPE STREQUAL "release") + file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config.cmake CONFIG_MODULE) +endif() string(REPLACE "\${_IMPORT_PREFIX}/include/freetype2" "\${_IMPORT_PREFIX}/include/freetype" CONFIG_MODULE "${CONFIG_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config.cmake "${CONFIG_MODULE}") -- cgit v1.2.3 From 2a311cb01f005acb1878f4c24a77249680e301c8 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 16:02:19 -0400 Subject: [chakracore] Fix build failure when VCPKG_BUILD_TYPE is set --- ports/chakracore/portfile.cmake | 50 ++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/ports/chakracore/portfile.cmake b/ports/chakracore/portfile.cmake index c056ab599..daea20444 100644 --- a/ports/chakracore/portfile.cmake +++ b/ports/chakracore/portfile.cmake @@ -42,29 +42,33 @@ file(INSTALL ${BUILDTREE_PATH}/lib/jsrt/ChakraDebug.h DESTINATION ${CURRENT_PACKAGES_DIR}/include ) -file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.dll - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) -file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/Chakracore.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) -file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.dll - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) -file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/Chakracore.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) -file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ch.exe - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/GCStress.exe - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/rl.exe - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/chakracore) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.dll + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/Chakracore.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.dll + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/Chakracore.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ch.exe + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/GCStress.exe + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/rl.exe + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/chakracore) +endif() vcpkg_copy_pdbs() file(INSTALL -- cgit v1.2.3 From 49a719b78a4c7feccc2aca970ec7fb242e1c121b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 19 Mar 2018 10:30:33 -0700 Subject: [libmysql] Use system dependencies to avoid ODR violations --- ports/libmysql/CONTROL | 4 +- ports/libmysql/portfile.cmake | 12 ++- ports/libmysql/system-libs.patch | 150 ++++++++++++++++++++++++++++++++++ scripts/cmake/vcpkg_build_cmake.cmake | 22 +++-- 4 files changed, 178 insertions(+), 10 deletions(-) create mode 100644 ports/libmysql/system-libs.patch diff --git a/ports/libmysql/CONTROL b/ports/libmysql/CONTROL index 6a069b78e..4af150af9 100644 --- a/ports/libmysql/CONTROL +++ b/ports/libmysql/CONTROL @@ -1,4 +1,4 @@ Source: libmysql -Version: 8.0.4 -Build-Depends: boost-algorithm, boost-geometry, boost-optional, boost-functional, boost-graph +Version: 8.0.4-1 +Build-Depends: boost-algorithm, boost-geometry, boost-optional, boost-functional, boost-graph, openssl, icu, libevent, liblzma, lz4, zlib Description: A MySQL client library for C development. diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake index 6c60d0ccc..c9859c47b 100644 --- a/ports/libmysql/portfile.cmake +++ b/ports/libmysql/portfile.cmake @@ -22,7 +22,9 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/ignore-boost-version.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/ignore-boost-version.patch + ${CMAKE_CURRENT_LIST_DIR}/system-libs.patch ) file(REMOVE_RECURSE ${SOURCE_PATH}/include/boost_1_65_0) @@ -44,9 +46,15 @@ vcpkg_configure_cmake( ${STACK_DIRECTION} -DWINDOWS_RUNTIME_MD=ON # Note: this disables _replacement_ of /MD with /MT. If /MT is specified, it will be preserved. -DIGNORE_BOOST_VERSION=ON + -DWITH_SSL=system + -DWITH_ICU=system + -DWITH_LIBEVENT=system + -DWITH_LZMA=system + -DWITH_LZ4=system + -DWITH_ZLIB=system ) -vcpkg_install_cmake() +vcpkg_install_cmake(ADD_BIN_TO_PATH) # delete debug headers file(REMOVE_RECURSE diff --git a/ports/libmysql/system-libs.patch b/ports/libmysql/system-libs.patch new file mode 100644 index 000000000..b5c1cba0d --- /dev/null +++ b/ports/libmysql/system-libs.patch @@ -0,0 +1,150 @@ +diff --git a/cmake/icu.cmake b/cmake/icu.cmake +index ce9cc67..64445c5 100644 +--- a/cmake/icu.cmake ++++ b/cmake/icu.cmake +@@ -40,49 +40,10 @@ SET(DEFAULT_ICU "bundled") + # install_root is either 'system' or is assumed to be a path. + # + MACRO (FIND_ICU install_root) +- IF("${install_root}" STREQUAL "system") +- SET(EXTRA_FIND_LIB_ARGS) +- SET(EXTRA_FIND_INC_ARGS) +- ELSE() +- SET(EXTRA_FIND_LIB_ARGS HINTS "${install_root}" +- PATH_SUFFIXES "lib" "lib64" NO_DEFAULT_PATH) +- SET(EXTRA_FIND_INC_ARGS HINTS "${install_root}" +- PATH_SUFFIXES "include" NO_DEFAULT_PATH) +- ENDIF() +- +- FIND_PATH(ICU_INCLUDE_DIR NAMES unicode/regex.h ${EXTRA_FIND_INC_ARGS}) +- IF (NOT ICU_INCLUDE_DIR) +- MESSAGE(FATAL_ERROR "Cannot find ICU regular expression headers") +- ENDIF() +- +- IF(WIN32) +- SET(ICU_LIBS icuuc icuio icudt icuin) +- ELSE() +- SET(ICU_LIBS icuuc icuio icudata icui18n) +- ENDIF() +- +- SET(ICU_SYSTEM_LIBRARIES) +- FOREACH(ICU_LIB ${ICU_LIBS}) +- UNSET(ICU_LIB_PATH CACHE) +- FIND_LIBRARY(ICU_LIB_PATH NAMES ${ICU_LIB} ${EXTRA_FIND_LIB_ARGS}) +- IF(NOT ICU_LIB_PATH) +- MESSAGE(FATAL_ERROR "Cannot find the ICU library ${ICU_LIB}") +- ENDIF() +- LIST(APPEND ICU_SYSTEM_LIBRARIES ${ICU_LIB_PATH}) +- ENDFOREACH() +- +- # To do: If we include the path in ICU_INCLUDE_DIR, it leads to GUnit +- # picking up the wrong regex.h header. And it looks like we don't need it; +- # at least on Linux, the header gets installed in an OS path anyway. +- IF(NOT "${install_root}" STREQUAL "system") +- SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR}) +- ENDIF() +- +- SET(ICU_LIBRARIES ${ICU_SYSTEM_LIBRARIES}) +- +- # Needed for version information. +- SET(ICU_COMMON_DIR ${ICU_INCLUDE_DIR}) +- ++ find_package(ICU REQUIRED COMPONENTS uc io dt in) ++ set(ICU_SYSTEM_LIBRARIES ICU::uc ICU::io ICU::dt ICU::in) ++ set(ICU_COMMON_DIR ${ICU_INCLUDE_DIR}) ++ SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR}) + ENDMACRO() + + MACRO (MYSQL_USE_BUNDLED_ICU) +diff --git a/cmake/lz4.cmake b/cmake/lz4.cmake +index 6e576c3..60cb8ba 100644 +--- a/cmake/lz4.cmake ++++ b/cmake/lz4.cmake +@@ -25,7 +25,7 @@ + + MACRO (FIND_SYSTEM_LZ4) + FIND_PATH(PATH_TO_LZ4 NAMES lz4frame.h) +- FIND_LIBRARY(LZ4_SYSTEM_LIBRARY NAMES lz4) ++ FIND_LIBRARY(LZ4_SYSTEM_LIBRARY NAMES lz4d lz4) + IF (PATH_TO_LZ4 AND LZ4_SYSTEM_LIBRARY) + SET(SYSTEM_LZ4_FOUND 1) + INCLUDE_DIRECTORIES(SYSTEM ${PATH_TO_LZ4}) +diff --git a/cmake/lzma.cmake b/cmake/lzma.cmake +index ac8aaa7..78d8e8d 100644 +--- a/cmake/lzma.cmake ++++ b/cmake/lzma.cmake +@@ -24,15 +24,10 @@ + # bundled is the default + + MACRO (FIND_SYSTEM_LZMA) +- FIND_PATH(PATH_TO_LZMA NAMES lzma/lzma.h) +- FIND_LIBRARY(LZMA_SYSTEM_LIBRARY NAMES lzma) +- IF (PATH_TO_LZMA AND LZMA_SYSTEM_LIBRARY) +- SET(SYSTEM_LZMA_FOUND 1) +- SET(LZMA_INCLUDE_DIR ${PATH_TO_LZMA}) +- SET(LZMA_LIBRARY ${LZMA_SYSTEM_LIBRARY}) +- MESSAGE(STATUS "LZMA_INCLUDE_DIR ${LZMA_INCLUDE_DIR}") +- MESSAGE(STATUS "LZMA_LIBRARY ${LZMA_LIBRARY}") +- ENDIF() ++ find_package(LibLZMA REQUIRED) ++ set(LZMA_INCLUDE_DIR ${LZMA_INCLUDE_DIRS}) ++ set(LZMA_LIBRARY ${LZMA_LIBRARIES}) ++ set(SYSTEM_LZMA_FOUND 1) + ENDMACRO() + + MACRO (MYSQL_USE_BUNDLED_LZMA) +diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake +index 8af9699..2bdfe14 100644 +--- a/cmake/ssl.cmake ++++ b/cmake/ssl.cmake +@@ -104,6 +104,16 @@ ENDMACRO() + # Provides the following configure options: + # WITH_SSL=[yes|bundled|system|] + MACRO (MYSQL_CHECK_SSL) ++ find_package(OpenSSL REQUIRED) ++ set(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY} CACHE STRING "") ++ set(CRYPTO_LIBRARY ${OPENSSL_CRYPTO_LIBRARY} CACHE STRING "") ++ FIND_PROGRAM(OPENSSL_EXECUTABLE openssl ++ DOC "path to the openssl executable") ++ SET(SSL_DEFINES "-DHAVE_OPENSSL") ++ set(SSL_LIBRARIES ${OPENSSL_LIBRARIES}) ++ENDMACRO() ++ ++MACRO (MYSQL_CHECK_SSL_OLD) + IF(NOT WITH_SSL) + IF(WIN32) + CHANGE_SSL_SETTINGS("bundled") +diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake +index e74b8c9..6695075 100644 +--- a/cmake/zlib.cmake ++++ b/cmake/zlib.cmake +@@ -51,27 +51,7 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS) + IF(WITH_ZLIB STREQUAL "bundled") + MYSQL_USE_BUNDLED_ZLIB() + ELSE() +- SET(ZLIB_FIND_QUIETLY TRUE) +- INCLUDE(FindZLIB) +- IF(ZLIB_FOUND) +- INCLUDE(CheckFunctionExists) +- SET(CMAKE_REQUIRED_LIBRARIES z) +- CHECK_FUNCTION_EXISTS(crc32 HAVE_CRC32) +- CHECK_FUNCTION_EXISTS(compressBound HAVE_COMPRESSBOUND) +- CHECK_FUNCTION_EXISTS(deflateBound HAVE_DEFLATEBOUND) +- SET(CMAKE_REQUIRED_LIBRARIES) +- IF(HAVE_CRC32 AND HAVE_COMPRESSBOUND AND HAVE_DEFLATEBOUND) +- SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES} CACHE INTERNAL "System zlib library") +- SET(WITH_ZLIB "system" CACHE STRING +- "Which zlib to use (possible values are 'bundled' or 'system')") +- SET(ZLIB_SOURCES "") +- ELSE() +- SET(ZLIB_FOUND FALSE CACHE INTERNAL "Zlib found but not usable") +- MESSAGE(STATUS "system zlib found but not usable") +- ENDIF() +- ENDIF() +- IF(NOT ZLIB_FOUND) +- MYSQL_USE_BUNDLED_ZLIB() +- ENDIF() ++ find_package(ZLIB REQUIRED) ++ SET(ZLIB_LIBRARY ZLIB::ZLIB CACHE INTERNAL "System zlib library") + ENDIF() + ENDMACRO() diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index bdf192792..630662588 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -15,6 +15,9 @@ ## The target passed to the cmake build command (`cmake --build . --target `). If not specified, no target will ## be passed. ## +## ### ADD_BIN_TO_PATH +## Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. +## ## ## Notes: ## This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). ## You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the @@ -27,7 +30,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_build_cmake) - cmake_parse_arguments(_bc "DISABLE_PARALLEL" "TARGET;LOGFILE_ROOT" "" ${ARGN}) + cmake_parse_arguments(_bc "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "TARGET;LOGFILE_ROOT" "" ${ARGN}) if(NOT _bc_LOGFILE_ROOT) set(_bc_LOGFILE_ROOT "build") @@ -65,20 +68,24 @@ function(vcpkg_build_cmake) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) if(BUILDTYPE STREQUAL "debug") set(SHORT_BUILDTYPE "dbg") + set(CONFIG "Debug") else() set(SHORT_BUILDTYPE "rel") + set(CONFIG "Release") endif() message(STATUS "Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") set(LOGPREFIX "${CURRENT_BUILDTREES_DIR}/${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") set(LOGS) - if(BUILDTYPE STREQUAL "release") - set(CONFIG "Release") - else() - set(CONFIG "Debug") + if(_bc_ADD_BIN_TO_PATH) + set(_BACKUP_ENV_PATH "$ENV{PATH}") + if(BUILDTYPE STREQUAL "debug") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin;$ENV{PATH}") + else() + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin;$ENV{PATH}") + endif() endif() - execute_process( COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG} OUTPUT_FILE "${LOGPREFIX}-out.log" @@ -134,6 +141,9 @@ function(vcpkg_build_cmake) endif() endif() message(STATUS "Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} done") + if(_bc_ADD_BIN_TO_PATH) + set(ENV{PATH} "${_BACKUP_ENV_PATH}") + endif() endif() endforeach() endfunction() -- cgit v1.2.3 From 4da9d6cbb62e43170e0f21d26387e1018b1e74e0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 19 Mar 2018 13:17:59 -0700 Subject: [libmysql] Use relative include path. Fixes #3071 --- ports/libmysql/CONTROL | 2 +- ports/libmysql/portfile.cmake | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/libmysql/CONTROL b/ports/libmysql/CONTROL index 4af150af9..6f856c607 100644 --- a/ports/libmysql/CONTROL +++ b/ports/libmysql/CONTROL @@ -1,4 +1,4 @@ Source: libmysql -Version: 8.0.4-1 +Version: 8.0.4-2 Build-Depends: boost-algorithm, boost-geometry, boost-optional, boost-functional, boost-graph, openssl, icu, libevent, liblzma, lz4, zlib Description: A MySQL client library for C development. diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake index c9859c47b..0e7b69edf 100644 --- a/ports/libmysql/portfile.cmake +++ b/ports/libmysql/portfile.cmake @@ -109,6 +109,10 @@ else() file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.pdb) endif() +file(READ ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h _contents) +string(REPLACE "#include " "#include \"mysql/udf_registration_types.h\"" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h "${_contents}") + # copy license file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmysql) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmysql/LICENSE ${CURRENT_PACKAGES_DIR}/share/libmysql/copyright) \ No newline at end of file -- cgit v1.2.3 From 57c3b6acb3681cffb8df9adf0e8899e9c88764fd Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 16:38:12 -0400 Subject: [yoga] Fix build failure when VCPKG_BUILD_TYPE is set --- ports/yoga/portfile.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/yoga/portfile.cmake b/ports/yoga/portfile.cmake index ba13192c8..e6dc1c709 100644 --- a/ports/yoga/portfile.cmake +++ b/ports/yoga/portfile.cmake @@ -33,8 +33,12 @@ vcpkg_build_cmake() vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/yoga DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() vcpkg_copy_pdbs() -- cgit v1.2.3 From 4596fe67d9b9e837af7c563f65b72c5fe4a4ec81 Mon Sep 17 00:00:00 2001 From: Art Date: Mon, 19 Mar 2018 21:40:39 +0100 Subject: Upgraded asio to version 1.12.0 --- ports/asio/CONTROL | 2 +- ports/asio/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/asio/CONTROL b/ports/asio/CONTROL index 021e20592..d2ed48569 100644 --- a/ports/asio/CONTROL +++ b/ports/asio/CONTROL @@ -1,3 +1,3 @@ Source: asio -Version: 1.10.8-1 +Version: 1.12.0 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 88cddfbbc..f6980f14e 100644 --- a/ports/asio/portfile.cmake +++ b/ports/asio/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO chriskohlhoff/asio - REF asio-1-10-8 - SHA512 55c26a6daf893f6e91ec7e8b5d70f1e27f2c1886552b2c9cb5c47b7c3bb08f78c9d6cec0a3bc6edbfb657a5094a001f742db0f18f81f51d79661b01fafea293e + REF asio-1-12-0 + SHA512 a0e341fd6a848784e1533df84d1e6b361c8468f59d4fbde68c1500c1f8a2124ad78db0169098dbbc594ce26717eb9760f37af13cb288a549e2bda563eecf2be3 HEAD_REF master ) -- cgit v1.2.3 From 62a015b4f3754d92381a02b5b11641a1ddcc256d Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 16:46:22 -0400 Subject: [sqlite3] Fix build failure when VCPKG_BUILD_TYPE is set to "release" --- ports/sqlite3/portfile.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index 031eefbf2..d6596e7b2 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -28,9 +28,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/sqlite3/sqlite3Config-debug.cmake SQLITE3_DEBUG_CONFIG) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" SQLITE3_DEBUG_CONFIG "${SQLITE3_DEBUG_CONFIG}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/sqlite3Config-debug.cmake "${SQLITE3_DEBUG_CONFIG}") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(READ ${CURRENT_PACKAGES_DIR}/debug/share/sqlite3/sqlite3Config-debug.cmake SQLITE3_DEBUG_CONFIG) + string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" SQLITE3_DEBUG_CONFIG "${SQLITE3_DEBUG_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/sqlite3Config-debug.cmake "${SQLITE3_DEBUG_CONFIG}") +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -- cgit v1.2.3 From 241e3ddd25b55af4d70195a88fc463aa593366b8 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 16:58:29 -0400 Subject: [proj4] Fix build failure when VCPKG_BUILD_TYPE is set --- ports/proj4/portfile.cmake | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake index 626d6b2e4..bc4e66fcd 100644 --- a/ports/proj4/portfile.cmake +++ b/ports/proj4/portfile.cmake @@ -40,13 +40,17 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH share/proj4) # Rename library and adapt cmake configuration -file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake _contents) -string(REPLACE "proj_4_9.lib" "proj.lib" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake "${_contents}") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake _contents) + string(REPLACE "proj_4_9.lib" "proj.lib" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake "${_contents}") +endif() -file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake _contents) -string(REPLACE "proj_4_9_d.lib" "projd.lib" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake "${_contents}") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake _contents) + string(REPLACE "proj_4_9_d.lib" "projd.lib" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake "${_contents}") +endif() file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake _contents) string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")" @@ -55,8 +59,12 @@ string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")" ) file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake "${_contents}") -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib) +endif() # Remove duplicate headers installed from debug build file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 8e5e293a5155f0c29f2e3356a25ff424df57f922 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 17:15:02 -0400 Subject: [freexl] Fix build failure when VCPKG_BUILD_TYPE is set --- ports/freexl/portfile.cmake | 50 ++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/ports/freexl/portfile.cmake b/ports/freexl/portfile.cmake index 098a1dbec..ff8879fba 100644 --- a/ports/freexl/portfile.cmake +++ b/ports/freexl/portfile.cmake @@ -37,31 +37,35 @@ endif() ################ # Debug build ################ -message(STATUS "Building ${TARGET_TRIPLET}-dbg") +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 -) -message(STATUS "Building ${TARGET_TRIPLET}-dbg done") -vcpkg_copy_pdbs() + 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 ################ -message(STATUS "Building ${TARGET_TRIPLET}-rel") +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") + 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) @@ -74,8 +78,12 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) else() file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib ${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() -- cgit v1.2.3 From cbf6adc9d3224d8f7455f40568dd49c7586d1454 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 16:26:36 -0400 Subject: [paho-mqtt] Fix post-build validation failure when VCPKG_BUILD_TYPE is set The portfile was creating empty directories (for the "other" build type) if `VCPKG_BUILD_TYPE` was specified. --- ports/paho-mqtt/portfile.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/paho-mqtt/portfile.cmake b/ports/paho-mqtt/portfile.cmake index 27f9c8243..3d0fc12e9 100644 --- a/ports/paho-mqtt/portfile.cmake +++ b/ports/paho-mqtt/portfile.cmake @@ -52,11 +52,15 @@ file(GLOB HEADERS "${SOURCE_PATH}/*/*.h") if(DLLS) file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) endif() -file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +if(LIBS) + file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +endif() if(DEBUG_DLLS) file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +if(DEBUG_LIBS) + file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) -- cgit v1.2.3 From a3ecd90797b5271079de85ea1a8af63ac0ccd265 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 18:04:58 -0400 Subject: [libspatialite] Fix build failure when VCPKG_BUILD_TYPE is set --- ports/libspatialite/portfile.cmake | 50 ++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/ports/libspatialite/portfile.cmake b/ports/libspatialite/portfile.cmake index 2a2834096..1c5cfed19 100644 --- a/ports/libspatialite/portfile.cmake +++ b/ports/libspatialite/portfile.cmake @@ -60,32 +60,36 @@ set(LIBS_ALL_REL ################ # Debug build ################ -message(STATUS "Building ${TARGET_TRIPLET}-dbg") +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) + 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() + 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 ################ -message(STATUS "Building ${TARGET_TRIPLET}-rel") +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") + 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) @@ -99,8 +103,12 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) else() file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) + endif() endif() message(STATUS "Packaging ${TARGET_TRIPLET} done") -- cgit v1.2.3 From 72564e610e6715ad0e1b3d62d50ff987e0b0b03e Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 18:13:36 -0400 Subject: [readosm] Fix build failure when VCPKG_BUILD_TYPE is set --- ports/readosm/portfile.cmake | 54 +++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/ports/readosm/portfile.cmake b/ports/readosm/portfile.cmake index c26934685..5bd5a134f 100644 --- a/ports/readosm/portfile.cmake +++ b/ports/readosm/portfile.cmake @@ -30,34 +30,38 @@ endif() ################ # Debug build ################ -message(STATUS "Building ${TARGET_TRIPLET}-dbg") +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) + 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 -) -vcpkg_copy_pdbs() -message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + 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 + ) + vcpkg_copy_pdbs() + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") +endif() ################ # Release build ################ -message(STATUS "Building ${TARGET_TRIPLET}-rel") +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") + 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/readosm RENAME copyright) @@ -70,8 +74,12 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) else() file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/readosm.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/lib/readosm.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/lib/readosm.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib) + endif() endif() -- cgit v1.2.3 From 27016a9b310583e97fd83f74b701fbb1aa38a560 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 18:26:06 -0400 Subject: [yaml-cpp] Fix build failure when VCPKG_BUILD_TYPE is set --- ports/yaml-cpp/portfile.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake index 0fc4f05b6..096b178ac 100644 --- a/ports/yaml-cpp/portfile.cmake +++ b/ports/yaml-cpp/portfile.cmake @@ -32,7 +32,14 @@ get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH) get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" YAML_CONFIG "${YAML_CONFIG}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets.cmake "${YAML_CONFIG}") -foreach(CONF debug release) +set(_targets_cmake_conf) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + list(APPEND _targets_cmake_conf "debug") +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + list(APPEND _targets_cmake_conf "release") +endif() +foreach(CONF ${_targets_cmake_conf}) file(READ ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets-${CONF}.cmake YAML_CONFIG) string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${_IMPORT_PREFIX}" YAML_CONFIG "${YAML_CONFIG}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets-${CONF}.cmake "${YAML_CONFIG}") -- cgit v1.2.3 From 9d02fb0dc8c051e0ecaa188a29d9b0616477c0ae Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 18:35:55 -0400 Subject: [double-conversion] Fix build failure when VCPKG_BUILD_TYPE is set --- ports/double-conversion/portfile.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index 8fc31c692..326d7e1c1 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -25,10 +25,14 @@ vcpkg_install_cmake() # Rename exported target files into something vcpkg_fixup_cmake_targets expects if(NOT VCPKG_USE_HEAD_VERSION) if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake - ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionTargets-debug.cmake) - file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends-release.cmake - ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets-release.cmake) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake + ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionTargets-debug.cmake) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends-release.cmake + ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets-release.cmake) + endif() file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends.cmake ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake) -- cgit v1.2.3 From 2efeda15a26d89cc688579ec75f7ab71bffe9a26 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 19:33:13 -0400 Subject: [protobuf] Fix build failure when VCPKG_BUILD_TYPE is set --- ports/protobuf/portfile.cmake | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index b8cb43f93..593eebe7d 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -85,14 +85,18 @@ endfunction() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/include) -file(READ ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake RELEASE_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc.exe" "\${_IMPORT_PREFIX}/tools/protoc.exe" RELEASE_MODULE "${RELEASE_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake "${RELEASE_MODULE}") - -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/protobuf/protobuf-targets-debug.cmake DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") -string(REPLACE "\${_IMPORT_PREFIX}/debug/bin/protoc.exe" "\${_IMPORT_PREFIX}/tools/protoc.exe" DEBUG_MODULE "${DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-debug.cmake "${DEBUG_MODULE}") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(READ ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake RELEASE_MODULE) + string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc.exe" "\${_IMPORT_PREFIX}/tools/protoc.exe" RELEASE_MODULE "${RELEASE_MODULE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake "${RELEASE_MODULE}") +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(READ ${CURRENT_PACKAGES_DIR}/debug/share/protobuf/protobuf-targets-debug.cmake DEBUG_MODULE) + string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") + string(REPLACE "\${_IMPORT_PREFIX}/debug/bin/protoc.exe" "\${_IMPORT_PREFIX}/tools/protoc.exe" DEBUG_MODULE "${DEBUG_MODULE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-debug.cmake "${DEBUG_MODULE}") +endif() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/share) -- cgit v1.2.3 From 2949174dad100476e68ec9b0d707509554a63f88 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 19:41:20 -0400 Subject: [box2d] Fix build failure when VCPKG_BUILD_TYPE is set --- ports/box2d/portfile.cmake | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/ports/box2d/portfile.cmake b/ports/box2d/portfile.cmake index b07dbc663..87aaefc74 100644 --- a/ports/box2d/portfile.cmake +++ b/ports/box2d/portfile.cmake @@ -42,23 +42,27 @@ set(OUTPUTS_PATH "${SOURCE_PATH}/Box2D/Build/vs2015/bin/${PROJECT_ARCH_BITS}") vcpkg_build_msbuild(PROJECT_PATH ${SOURCE_PATH}/Box2D/Build/vs2015/Box2D.vcxproj) -message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib") -file( - INSTALL ${OUTPUTS_PATH}/Release/ - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - FILES_MATCHING PATTERN "*.lib" -) -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/lib/box2d.lib) -message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib done") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib") + file( + INSTALL ${OUTPUTS_PATH}/Release/ + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + FILES_MATCHING PATTERN "*.lib" + ) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/lib/box2d.lib) + message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib done") +endif() -message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib") -file( - INSTALL ${OUTPUTS_PATH}/Debug/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - FILES_MATCHING PATTERN "*.lib" -) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/debug/lib/box2d.lib) -message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib done") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib") + file( + INSTALL ${OUTPUTS_PATH}/Debug/ + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + FILES_MATCHING PATTERN "*.lib" + ) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/debug/lib/box2d.lib) + message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib done") +endif() message(STATUS "Packaging headers") file( -- cgit v1.2.3 From 6f7d92ddd38ae80da6cc40251b495dd446b9687c Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 20:04:20 -0400 Subject: [libssh] Fix static build failure when VCPKG_BUILD_TYPE is set --- ports/libssh/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index 7d986d244..49c927c22 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -37,6 +37,8 @@ vcpkg_copy_pdbs() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/lib/ssh.lib) + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/debug/lib/ssh.lib) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -- cgit v1.2.3 From 71dc69e2135c3ec4e2dbd23c4ef8692dba6b9177 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 19:50:13 -0400 Subject: [zlib] Fix static build failure when VCPKG_BUILD_TYPE is set --- ports/zlib/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index 291180a29..d924e2135 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -32,6 +32,8 @@ vcpkg_install_cmake() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib ${CURRENT_PACKAGES_DIR}/lib/zlib.lib) + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zlibd.lib) endif() endif() -- cgit v1.2.3 From 0b629c4ff1a56dc5045ecf9beaae59ff98b64fa5 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 20:15:49 -0400 Subject: [libpng] Fix static build failure when VCPKG_BUILD_TYPE is set --- ports/libpng/portfile.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index 1ac8ef3cb..0c9f8ab0b 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -40,9 +40,13 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND EXISTS ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib) + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib) + endif() endif() # Remove CMake config files as they are incorrectly generated and everyone uses built-in FindPNG anyway. -- cgit v1.2.3 From d7394e883cb4b21b6b5ea602308879c51d366fa1 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 19 Mar 2018 15:31:32 -0400 Subject: [glew] Fix build failure when VCPKG_BUILD_TYPE is set --- ports/glew/portfile.cmake | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake index 79c669640..45f711f77 100644 --- a/ports/glew/portfile.cmake +++ b/ports/glew/portfile.cmake @@ -19,7 +19,15 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/glew") -foreach(FILE ${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-debug.cmake ${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-release.cmake) +set(_targets_cmake_files) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + list(APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-debug.cmake") +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + list(APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-release.cmake") +endif() + +foreach(FILE ${_targets_cmake_files}) file(READ ${FILE} _contents) string(REPLACE "libglew32" "glew32" _contents "${_contents}") file(WRITE ${FILE} "${_contents}") @@ -27,6 +35,8 @@ endforeach() if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libglew32.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libglew32.lib ${CURRENT_PACKAGES_DIR}/lib/glew32.lib) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/glew32d.lib) endif() -- cgit v1.2.3 From 95a8f285d8757f40bbaff0d766e851ba7d82820d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 19 Mar 2018 18:59:37 -0700 Subject: Update CHANGELOG and bump version to v0.0.106 --- CHANGELOG.md | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 166 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 134fcd63a..f41efaf10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,168 @@ +vcpkg (0.0.106) +-------------- + * Add ports: + - armadillo 8.400.0-1 + - boost-modular-build-helper 2 + - clblas 2.12-1 + - clfft 2.12.2 + - entt 2.4.2-1 + - fastcdr 1.0.6-1 + - gamma gamma-2018-01-27 + - gl3w 8f7f459d + - graphite2 1.3.10 + - ismrmrd 1.3.2-1 + - kealib 1.4.7-1 + - lcm 1.3.95 + - libcds 2.3.2 + - monkeys-audio 4.3.3 + - msix 1.0 + - nmslib 1.7.2 + - opencl 2.2 (2017.07.18) + - openmesh 6.3 + - quirc 1.0-1 + - shogun 6.1.3 + - x264 152-e9a5903edf8ca59 + - x265 2.7-1 + * Update ports: + - abseil 2018-2-5 -> 2018-03-17 + - ace 6.4.6 -> 6.4.7 + - alembic 1.7.5 -> 1.7.6 + - args d8905de -> 2018-02-23 + - asio 1.10.8-1 -> 1.12.0 + - atk 2.24.0-1 -> 2.24.0-2 + - avro-c 1.8.2 -> 1.8.2-1 + - azure-storage-cpp 3.0.0-4 -> 3.2.1 + - benchmark 1.3.0 -> 1.3.0-1 + - boost-build 1.66.0-5 -> 1.66.0-8 + - breakpad 2018-2-19 -> 2018-03-13 + - butteraugli 2017-09-02-8c60a2aefa19adb-1 -> 2018-02-25 + - c-ares 1.13.0-1 -> cares-1_14_0 + - catch-classic 1.12.0 -> 1.12.1 + - catch2 2.1.2 -> 2.2.1 + - cctz 2.1 -> 2.2 + - cgal 4.11-3 -> 4.11.1 + - chakracore 1.7.4 -> 1.8.2 + - chmlib 0.40-1 -> 0.40-2 + - cimg 2.1.8 -> 221 + - clara 2017-07-20-9661f2b4a50895d52ebb4c59382785a2b416c310 -> 2018-03-11 + - console-bridge 0.3.2-2 -> 0.3.2-3 + - coolprop 6.1.0-2 -> 6.1.0-3 + - cpp-redis 4.3.0 -> 4.3.1 + - cpr 1.3.0-1 -> 1.3.0-3 + - curl 7.58.0-1 -> 7_59_0-2 + - devil 1.8.0-1 -> 1.8.0-2 + - directxmesh dec2017 -> feb2018 + - directxtex dec2017 -> feb2018b + - directxtk dec2017 -> feb2018 + - dirent 2017-06-23-5c7194c2fe2c68c1a8212712c0b4b6195382d27d -> 1.23.1 + - discord-rpc 2.1.0 -> 3.0.0 + - doctest 1.2.6 -> 1.2.8 + - eastl 3.05.08 -> 3.07.02 + - evpp 0.6.1-1 -> 0.7.0 + - exiv2 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99 -> 2018-03-17 + - fdk-aac 2017-11-02-1e351 -> 2018-03-07 + - ffmpeg 3.3.3-2 -> 3.3.3-4 + - freetype 2.8.1-1 -> 2.8.1-3 + - freetype-gl 2017-10-9-82fb152a74f01b1483ac80d15935fbdfaf3ed836 -> 2018-02-25 + - freexl 1.0.4 -> 1.0.4-1 + - g2o 20170730_git-2 -> 20170730_git-3 + - gdal 2.2.2 -> 2.2.2-1 + - gdcm2 2.8.3 -> 2.8.4 + - geogram 1.4.9-1 -> 1.6.0-1 + - gflags 2.2.1-1 -> 2.2.1-3 + - glib 2.52.3-1 -> 2.52.3-2 + - glslang 3a21c880500eac21cdf79bef5b80f970a55ac6af-1 -> 2018-03-02 + - grpc 1.8.3 -> 1.10.0 + - gsl 2.4-2 -> 2.4-3 + - gsl-lite 0.26.0 -> 0.28.0 + - gtest 1.8.0-6 -> 1.8.0-7 + - halide release_2017_10_30 -> release_2018_02_15 + - harfbuzz 1.7.4 -> 1.7.6 + - ilmbase 2.2.0-1 -> 2.2.1-1 + - jansson 2.11 -> 2.11-2 + - jsoncpp 1.8.1-1 -> 1.8.4 + - jsonnet 2017-09-02-11cf9fa9f2fe8acbb14b096316006082564ca580 -> 2018-03-17 + - leptonica 1.74.4-2 -> 1.74.4-3 + - libgeotiff 1.4.2-2 -> 1.4.2-3 + - libiconv 1.15-1 -> 1.15-2 + - libjpeg-turbo 1.5.3 -> 1.5.3-1 + - libmysql 5.7.17-3 -> 8.0.4-2 + - libpng 1.6.34-2 -> 1.6.34-3 + - librtmp 2.4 -> 2.4-1 + - libsndfile 1.0.29-6830c42-2 -> 1.0.29-6830c42-3 + - libsodium 1.0.15-1 -> 1.0.16-1 + - libspatialite 4.3.0a-1 -> 4.3.0a-2 + - libssh 0.7.5-1 -> 0.7.5-4 + - libuv 1.18.0 -> 1.19.2 + - libwebp 0.6.1-1 -> 0.6.1-2 + - libwebsockets 2.4.1 -> 2.4.2 + - libxml2 2.9.4-2 -> 2.9.4-4 + - libzip 1.4.0 -> rel-1-5-0 + - live555 2018.01.29 -> 2018.02.28 + - lodepng 2017-09-01-8a0f16afe74a6a-1 -> 2018-02-25 + - luasocket 2017.05.25.5a17f79b0301f0a1b4c7f1c73388757a7e2ed309 -> 2018-02-25 + - lz4 1.8.1.2 -> 1.8.1.2-1 + - magnum-extras 2018.02-1 -> 2018.02-2 + - matio 1.5.10-2 -> 1.5.12 + - mman git-f5ff813 -> git-f5ff813-2 + - ms-gsl 20171204-9d65e74400976b3509833f49b16d401600c7317d -> 2018-03-17 + - msinttypes 2017-06-26-f9e7c5758ed9e3b9f4b2394de1881c704dd79de0 -> 2018-02-25 + - msmpi 8.1 -> 9.0 + - nlohmann-json 3.1.0 -> 3.1.2 + - nuklear 2017-06-15-5c7194c2fe2c68c1a8212712c0b4b6195382d27d -> 2018-03-17 + - ogre 1.10.9-2 -> 1.10.11 + - opencv 3.4.0-3 -> 3.4.1 + - openexr 2.2.0-1 -> 2.2.1-1 + - openimageio 1.7.15-2 -> 1.8.9 + - openjpeg 2.2.0-1 -> 2.3.0 + - pcl 1.8.1-9 -> 1.8.1-10 + - picosha2 2017-09-01-c5ff159b6 -> 2018-02-25 + - piex 2017-09-01-473434f2dd974978b-1 -> 2018-03-13 + - protobuf 3.5.1 -> 3.5.1-1 + - qt5-modularscripts 1 -> 2 + - re2 2017-12-01-1 -> 2018-03-17 + - readosm 1.1.0 -> 1.1.0-1 + - realsense2 2.10.0 -> 2.10.1 + - rocksdb 2017-06-28-18c63af6ef2b9f014c404b88488ae52e6fead03c-1 -> 5.11.3 + - rs-core-lib commit-1ed2dadbda3977b13e5e83cc1f3eeca76b36ebe5 -> 2018-03-17 + - rttr 0.9.5-1 -> 0.9.5-2 + - scintilla 3.7.6 -> 4.0.3 + - sdl2 2.0.7-4 -> 2.0.8-1 + - snappy 1.1.7-1 -> 1.1.7-2 + - spatialite-tools 4.3.0 -> 4.3.0-1 + - spdlog 0.14.0-1 -> 0.16.3 + - spirv-tools 2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 -> 2018.1-1 + - sqlite3 3.21.0 -> 3.21.0-1 + - stb 20170724-9d9f75e -> 2018-03-02 + - thrift 20172805-72ca60debae1d9fb35d9f0085118873669006d7f-2 -> 2018-03-17 + - tiny-dnn 2017-10-09-dd906fed8c8aff8dc837657c42f9d55f8b793b0e -> 2018-03-13 + - tinyxml2 6.0.0 -> 6.0.0-2 + - torch-th 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-1 -> 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-2 + - unicorn 2017-12-06-bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4-1 -> 2018-03-13 + - unicorn-lib commit-3ffa7fe69a1d0c37fb52a4af61380c5fd84fa5aa -> 2018-03-13 + - uwebsockets 0.14.4-1 -> 0.14.6-1 + - wt 3.3.7-4 -> 4.0.2 + - wtl 9.1 -> 10.0 + - wxwidgets 3.1.0-1 -> 3.1.1 + - yaml-cpp 0.5.4-rc-2 -> 0.6.2 + - zeromq 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2-2 -> 2018-03-17 + - zziplib 0.13.62-1 -> 0.13.69 + * Use TLS 1.2 for downloads. + * Tools used by `vcpkg` (`git`, `cmake` etc) are now specified in `scripts\vcpkgTools.xml`. + - Add `7zip` + * Fix various bugs regarding feature packages. Affects `install`, `upgrade` and `export`. + * `vcpkg hash`: Fix bug with whitespace in path. + * Visual Studio detection now properly identifies legacy versions (VS2015). + * Windows SDK detection no longer fails if certain registry keys are not in their expected places. + * Dependency qualifiers now support `!` for inversion. + * Add `VCPKG_DEFAULT_VS_PATH` environment variable. + - `vcpkg` automatically chooses the latest stable version of Visual Studio to use. + - You can now select the desired VS with the `VCPKG_DEFAULT_VS_PATH` environment variable + - You can also select the behavior by specifiying `VCPKG_VISUAL_STUDIO_PATH` in the triplet file (and this takes precedence over the new environment variable) + +-- vcpkg team MON, 19 Mar 2018 19:00:00 -0800 + + vcpkg (0.0.105) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 157d21b7b..1305e8f43 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.105" \ No newline at end of file +"0.0.106" \ No newline at end of file -- cgit v1.2.3 From efc0255f80d31c5eaef78fc507c246ee153a63aa Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 19 Mar 2018 21:09:13 -0700 Subject: [signalrclient] Use vcpkg_from_github --- ports/signalrclient/CONTROL | 2 +- ports/signalrclient/portfile.cmake | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ports/signalrclient/CONTROL b/ports/signalrclient/CONTROL index ae3ae47c1..fe8aa7dc5 100644 --- a/ports/signalrclient/CONTROL +++ b/ports/signalrclient/CONTROL @@ -1,4 +1,4 @@ Source: signalrclient -Version: 1.0.0-beta1-2 +Version: 1.0.0-beta1-3 Build-Depends: cpprestsdk Description: C++ client for SignalR. diff --git a/ports/signalrclient/portfile.cmake b/ports/signalrclient/portfile.cmake index bf2669569..50f6b0b89 100644 --- a/ports/signalrclient/portfile.cmake +++ b/ports/signalrclient/portfile.cmake @@ -1,12 +1,14 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SignalR-Client-Cpp-1.0.0-beta1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/aspnet/SignalR-Client-Cpp/archive/1.0.0-beta1.tar.gz" - FILENAME "SignalR-Client-Cpp-1.0.0-beta1.tar.gz" + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SignalR/SignalR-Client-Cpp + REF 1.0.0-beta1 SHA512 b38f6f946f1499080071949cbcf574405118f9acfb469441e5b5b0df3e5f0d277a83b30e0d613dc5e54732b9071e3273dac1ee65129f994d5a60eef0e45bdf6c + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From fdf8d471ed553fa802db784e1b049cd77e721ce2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 20 Mar 2018 12:39:43 -0700 Subject: [TLS 1.2] Add message for Powershell 5.1+ --- scripts/VcpkgPowershellUtils.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 73a3fc9ad..82718ecdc 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -140,6 +140,7 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, { Write-Warning "Github has dropped support for TLS versions prior to 1.2, which is not available on your system" Write-Warning "Please manually download $url to $downloadPath" + Write-Warning "To solve this issue for future downloads, you can also install PowerShell 5.1+" throw "Download failed" } } -- cgit v1.2.3 From eab1d5c531695c2a644276832578e5550dd9abf6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 14 Mar 2018 10:30:27 -0700 Subject: [vcpkg-ci] Do not rebuild libraries that were previously successful or failed --- toolsrc/include/vcpkg/base/cache.h | 21 +++++ toolsrc/include/vcpkg/base/util.h | 6 +- toolsrc/include/vcpkg/build.h | 17 ++++ toolsrc/include/vcpkg/commands.h | 12 +++ toolsrc/include/vcpkg/dependencies.h | 5 +- toolsrc/include/vcpkg/install.h | 1 + toolsrc/include/vcpkg/sourceparagraph.h | 2 + toolsrc/src/tests.plan.cpp | 84 ++++++++++++++++++- toolsrc/src/vcpkg/base/system.cpp | 10 ++- toolsrc/src/vcpkg/build.cpp | 44 ++++------ toolsrc/src/vcpkg/commands.ci.cpp | 138 +++++++++++++++++++++++++++++++- toolsrc/src/vcpkg/dependencies.cpp | 11 ++- toolsrc/src/vcpkg/install.cpp | 59 +++++++------- toolsrc/src/vcpkg/sourceparagraph.cpp | 10 +++ 14 files changed, 349 insertions(+), 71 deletions(-) create mode 100644 toolsrc/include/vcpkg/base/cache.h diff --git a/toolsrc/include/vcpkg/base/cache.h b/toolsrc/include/vcpkg/base/cache.h new file mode 100644 index 000000000..dfc7565b8 --- /dev/null +++ b/toolsrc/include/vcpkg/base/cache.h @@ -0,0 +1,21 @@ +#pragma once + +#include + +namespace vcpkg +{ + template + struct Cache + { + template + Value const& get_lazy(const Key& k, const F& f) const + { + auto it = m_cache.find(k); + if (it != m_cache.end()) return it->second; + return m_cache.emplace(k, f()).first->second; + } + + private: + mutable std::map m_cache; + }; +} diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 5e07b240a..b12919951 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -24,10 +24,10 @@ namespace vcpkg::Util namespace Sets { - template - bool contains(const Container& container, const ElementT& item) + template + bool contains(const Container& container, const Key& item) { - return container.find(item) != container.cend(); + return container.find(item) != container.end(); } } diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index ea81c4dbe..8c4d7b575 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -204,4 +204,21 @@ namespace vcpkg::Build }; BuildInfo read_build_info(const Files::Filesystem& fs, const fs::path& filepath); + + struct AbiEntry + { + std::string key; + std::string value; + }; + + struct AbiTagAndFile + { + std::string tag; + fs::path tag_file; + }; + + Optional compute_abi_tag(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const PreBuildInfo& pre_build_info, + Span dependency_abis); } diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index b6b1c56ab..7369b8206 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -7,6 +7,8 @@ #include #include +#include +#include namespace vcpkg::Commands { @@ -23,7 +25,17 @@ namespace vcpkg::Commands namespace CI { + struct UnknownCIPortsResults + { + std::vector unknown; + std::map known; + }; + extern const CommandStructure COMMAND_STRUCTURE; + UnknownCIPortsResults find_unknown_ports_for_ci(const VcpkgPaths& paths, + const std::set& exclusions, + const Dependencies::PortFileProvider& provider, + const std::vector& fspecs); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index fadb8cc7e..33af6c4f5 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -45,7 +45,8 @@ namespace vcpkg::Dependencies InstallPlanAction(const PackageSpec& spec, const SourceControlFile& scf, const std::set& features, - const RequestType& request_type); + const RequestType& request_type, + std::vector&& dependencies); std::string displayname() const; @@ -58,6 +59,8 @@ namespace vcpkg::Dependencies RequestType request_type; Build::BuildPackageOptions build_options; std::set feature_list; + + std::vector computed_dependencies; }; enum class RemovePlanType diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index 2e92764dc..b7acbf15f 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -37,6 +37,7 @@ namespace vcpkg::Install std::string total_elapsed_time; void print() const; + static std::string xunit_result(const PackageSpec& spec, Chrono::ElapsedTime time, Build::BuildResult code); std::string xunit_results() const; }; diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h index ea8e27a94..ae5812ea7 100644 --- a/toolsrc/include/vcpkg/sourceparagraph.h +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -63,6 +63,8 @@ namespace vcpkg std::unique_ptr core_paragraph; std::vector> feature_paragraphs; + + Optional find_feature(const std::string& featurename) const; }; void print_error_message(Span> error_info_list); diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 95056810c..a99f1abb9 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -593,6 +593,87 @@ namespace UnitTest1 features_check(&install_plan[0], "a", {"core"}, Triplet::X64_WINDOWS); } + TEST_METHOD(install_plan_action_dependencies) + { + std::vector> status_paragraphs; + + // Add a port "a" which depends on the core of "b", which was already + // installed explicitly + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_c = spec_map.emplace("c"); + auto spec_b = spec_map.emplace("b", "c"); + spec_map.emplace("a", "b"); + + // Install "a" (without explicit feature specification) + auto install_specs = FullPackageSpec::from_string("a", Triplet::X64_WINDOWS); + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::IsTrue(install_plan.size() == 3); + features_check(&install_plan[0], "c", {"core"}, Triplet::X64_WINDOWS); + + features_check(&install_plan[1], "b", {"core"}, Triplet::X64_WINDOWS); + Assert::IsTrue(install_plan[1].install_action.get()->computed_dependencies == + std::vector{spec_c}); + + features_check(&install_plan[2], "a", {"core"}, Triplet::X64_WINDOWS); + Assert::IsTrue(install_plan[2].install_action.get()->computed_dependencies == + std::vector{spec_b}); + } + + TEST_METHOD(install_plan_action_dependencies_2) + { + std::vector> status_paragraphs; + + // Add a port "a" which depends on the core of "b", which was already + // installed explicitly + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_c = spec_map.emplace("c"); + auto spec_b = spec_map.emplace("b", "c"); + spec_map.emplace("a", "c, b"); + + // Install "a" (without explicit feature specification) + auto install_specs = FullPackageSpec::from_string("a", Triplet::X64_WINDOWS); + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::IsTrue(install_plan.size() == 3); + features_check(&install_plan[0], "c", {"core"}, Triplet::X64_WINDOWS); + + features_check(&install_plan[1], "b", {"core"}, Triplet::X64_WINDOWS); + Assert::IsTrue(install_plan[1].install_action.get()->computed_dependencies == + std::vector{spec_c}); + + features_check(&install_plan[2], "a", {"core"}, Triplet::X64_WINDOWS); + Assert::IsTrue(install_plan[2].install_action.get()->computed_dependencies == + std::vector{spec_b, spec_c}); + } + + TEST_METHOD(install_plan_action_dependencies_3) + { + std::vector> status_paragraphs; + + // Add a port "a" which depends on the core of "b", which was already + // installed explicitly + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + spec_map.emplace("a", "", {{"0", ""}, {"1", "a[0]"}}, {"1"}); + + // Install "a" (without explicit feature specification) + auto install_specs = FullPackageSpec::from_string("a", Triplet::X64_WINDOWS); + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::IsTrue(install_plan.size() == 1); + features_check(&install_plan[0], "a", {"1", "0", "core"}, Triplet::X64_WINDOWS); + Assert::IsTrue(install_plan[0].install_action.get()->computed_dependencies == std::vector{}); + } + TEST_METHOD(upgrade_with_default_features_1) { std::vector> pghs; @@ -619,7 +700,6 @@ namespace UnitTest1 Assert::IsTrue(plan[0].remove_action.has_value()); Assert::AreEqual("a", plan[1].spec().name().c_str()); - Assert::IsTrue(plan[1].install_action.has_value()); features_check(&plan[1], "a", {"core", "0"}, Triplet::X86_WINDOWS); } @@ -651,11 +731,9 @@ namespace UnitTest1 Assert::IsTrue(plan[0].remove_action.has_value()); Assert::AreEqual("b", plan[1].spec().name().c_str()); - Assert::IsTrue(plan[1].install_action.has_value()); features_check(&plan[1], "b", {"b0", "core"}, Triplet::X64_WINDOWS); Assert::AreEqual("a", plan[2].spec().name().c_str()); - Assert::IsTrue(plan[2].install_action.has_value()); features_check(&plan[2], "a", {"core"}, Triplet::X64_WINDOWS); } diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index f339afa51..a315c7880 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -314,6 +314,8 @@ namespace vcpkg::System // Flush stdout before launching external process fflush(stdout); + auto timer = Chrono::ElapsedTimer::create_started(); + #if defined(_WIN32) const auto actual_cmd_line = Strings::format(R"###("%s 2>&1")###", cmd_line); @@ -335,8 +337,10 @@ namespace vcpkg::System } const auto ec = _pclose(pipe); - Debug::println("_pclose() returned %d", ec); remove_byte_order_marks(&output); + + Debug::println("_pclose() returned %d after %8d us", ec, (int)timer.microseconds()); + return {ec, Strings::to_utf8(output)}; #else const auto actual_cmd_line = Strings::format(R"###(%s 2>&1)###", cmd_line); @@ -359,7 +363,9 @@ namespace vcpkg::System } const auto ec = pclose(pipe); - Debug::println("pclose() returned %d", ec); + + Debug::println("_pclose() returned %d after %8d us", ec, (int)timer.microseconds()); + return {ec, output}; #endif } diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index b71bdbf25..bc9eca3ba 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -273,12 +273,10 @@ namespace vcpkg::Build return filter_dependencies(config.scf.core_paragraph->depends, triplet); } - auto it = - Util::find_if(config.scf.feature_paragraphs, - [&](std::unique_ptr const& fpgh) { return fpgh->name == feature; }); - Checks::check_exit(VCPKG_LINE_INFO, it != config.scf.feature_paragraphs.end()); + auto maybe_feature = config.scf.find_feature(feature); + Checks::check_exit(VCPKG_LINE_INFO, maybe_feature.has_value()); - return filter_dependencies(it->get()->depends, triplet); + return filter_dependencies(maybe_feature.get()->depends, triplet); }); auto dep_fspecs = FeatureSpec::from_strings_and_triplet(dep_strings, triplet); @@ -423,22 +421,10 @@ namespace vcpkg::Build return result; } - struct AbiEntry - { - std::string key; - std::string value; - }; - - struct AbiTagAndFile - { - std::string tag; - fs::path tag_file; - }; - - static Optional compute_abi_tag(const VcpkgPaths& paths, - const BuildPackageConfig& config, - const PreBuildInfo& pre_build_info, - Span dependency_abis) + Optional compute_abi_tag(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const PreBuildInfo& pre_build_info, + Span dependency_abis) { if (!GlobalState::g_binary_caching) return nullopt; @@ -584,17 +570,17 @@ namespace vcpkg::Build const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); - auto abi_tag_and_file = compute_abi_tag(paths, config, pre_build_info, dependency_abis); + auto maybe_abi_tag_and_file = compute_abi_tag(paths, config, pre_build_info, dependency_abis); std::unique_ptr bcf; - auto maybe_abi_tag_and_file = abi_tag_and_file.get(); + auto abi_tag_and_file = maybe_abi_tag_and_file.get(); - if (GlobalState::g_binary_caching && maybe_abi_tag_and_file) + if (GlobalState::g_binary_caching && abi_tag_and_file) { auto archives_root_dir = paths.root / "archives"; - auto archive_name = maybe_abi_tag_and_file->tag + ".zip"; - auto archive_subpath = fs::u8path(maybe_abi_tag_and_file->tag.substr(0, 2)) / archive_name; + auto archive_name = abi_tag_and_file->tag + ".zip"; + auto archive_subpath = fs::u8path(abi_tag_and_file->tag.substr(0, 2)) / archive_name; auto archive_path = archives_root_dir / archive_subpath; auto archive_tombstone_path = archives_root_dir / "fail" / archive_subpath; @@ -617,12 +603,12 @@ namespace vcpkg::Build System::println("Could not locate cached archive: %s", archive_path.u8string()); ExtendedBuildResult result = do_build_package_and_clean_buildtrees( - paths, pre_build_info, spec, abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config, status_db); + paths, pre_build_info, spec, maybe_abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config, status_db); 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(maybe_abi_tag_and_file->tag_file, abi_file_in_package, fs::stdfs::copy_options::none, ec); + 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) @@ -648,7 +634,7 @@ namespace vcpkg::Build else { return do_build_package_and_clean_buildtrees( - paths, pre_build_info, spec, abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config, status_db); + paths, pre_build_info, spec, maybe_abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config, status_db); } } diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index e01072a0a..45eb1c83e 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -1,5 +1,6 @@ #include "pch.h" +#include #include #include #include @@ -7,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -44,8 +46,120 @@ namespace vcpkg::Commands::CI nullptr, }; + UnknownCIPortsResults find_unknown_ports_for_ci(const VcpkgPaths& paths, + const std::set& exclusions, + const Dependencies::PortFileProvider& provider, + const std::vector& fspecs) + { + UnknownCIPortsResults ret; + + auto& fs = paths.get_filesystem(); + + std::map abi_tag_map; + std::set will_fail; + + const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::YES, + Build::CleanPackages::YES}; + + vcpkg::Cache pre_build_info_cache; + + auto action_plan = Dependencies::create_feature_install_plan(provider, fspecs, StatusParagraphs{}); + + for (auto&& action : action_plan) + { + if (auto p = action.install_action.get()) + { + // determine abi tag + std::string abi; + if (auto scf = p->source_control_file.get()) + { + auto triplet = p->spec.triplet(); + + const Build::BuildPackageConfig build_config{p->source_control_file.value_or_exit(VCPKG_LINE_INFO), + triplet, + paths.port_dir(p->spec), + install_plan_options, + p->feature_list}; + + auto dependency_abis = + Util::fmap(p->computed_dependencies, [&](const PackageSpec& spec) -> Build::AbiEntry { + auto it = abi_tag_map.find(spec); + + if (it == abi_tag_map.end()) + return {spec.name(), ""}; + else + 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); }); + + auto maybe_tag_and_file = + Build::compute_abi_tag(paths, build_config, pre_build_info, dependency_abis); + if (auto tag_and_file = maybe_tag_and_file.get()) + { + abi = tag_and_file->tag; + abi_tag_map.emplace(p->spec, abi); + } + } + else if (auto ipv = p->installed_package.get()) + { + abi = ipv->core->package.abi; + if (!abi.empty()) abi_tag_map.emplace(p->spec, abi); + } + + std::string state; + + auto archives_root_dir = paths.root / "archives"; + auto archive_name = abi + ".zip"; + auto archive_subpath = fs::u8path(abi.substr(0, 2)) / archive_name; + auto archive_path = archives_root_dir / archive_subpath; + auto archive_tombstone_path = archives_root_dir / "fail" / archive_subpath; + + bool b_will_build = false; + + if (Util::Sets::contains(exclusions, p->spec.name())) + { + ret.known.emplace(p->spec, BuildResult::EXCLUDED); + will_fail.emplace(p->spec); + } + else if (std::any_of(p->computed_dependencies.begin(), + p->computed_dependencies.end(), + [&](const PackageSpec& spec) { return Util::Sets::contains(will_fail, spec); })) + { + ret.known.emplace(p->spec, BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES); + will_fail.emplace(p->spec); + } + else if (fs.exists(archive_path)) + { + state += "pass"; + ret.known.emplace(p->spec, BuildResult::SUCCEEDED); + } + else if (fs.exists(archive_tombstone_path)) + { + state += "fail"; + ret.known.emplace(p->spec, BuildResult::BUILD_FAILED); + will_fail.emplace(p->spec); + } + else + { + ret.unknown.push_back(p->spec); + b_will_build = true; + } + + System::println("%40s: %1s %8s: %s", p->spec, (b_will_build ? "*" : " "), state, abi); + } + } + + return ret; + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { + Checks::check_exit( + VCPKG_LINE_INFO, GlobalState::g_binary_caching, "The ci command requires binary caching to be enabled."); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); std::set exclusions_set; @@ -77,16 +191,21 @@ namespace vcpkg::Commands::CI Build::CleanBuildtrees::YES, Build::CleanPackages::YES}; - std::vector ports = Install::get_all_port_names(paths); + std::vector> all_known_results; + + std::vector all_ports = Install::get_all_port_names(paths); std::vector results; for (const Triplet& triplet : triplets) { Input::check_triplet(triplet, paths); - std::vector specs = PackageSpec::to_package_specs(ports, triplet); + + std::vector specs = PackageSpec::to_package_specs(all_ports, triplet); // Install the default features for every package - const auto featurespecs = Util::fmap(specs, [](auto& spec) { return FeatureSpec(spec, ""); }); + auto all_fspecs = Util::fmap(specs, [](auto& spec) { return FeatureSpec(spec, ""); }); + auto split_specs = find_unknown_ports_for_ci(paths, exclusions_set, paths_port_file, all_fspecs); + auto fspecs = Util::fmap(split_specs.unknown, [](auto& spec) { return FeatureSpec(spec, ""); }); - auto action_plan = Dependencies::create_feature_install_plan(paths_port_file, featurespecs, status_db); + auto action_plan = Dependencies::create_feature_install_plan(paths_port_file, fspecs, status_db); for (auto&& action : action_plan) { @@ -107,7 +226,10 @@ namespace vcpkg::Commands::CI else { auto summary = Install::perform(action_plan, Install::KeepGoing::YES, paths, status_db); + for (auto&& result : summary.results) + split_specs.known.erase(result.spec); results.push_back({triplet, std::move(summary)}); + all_known_results.emplace_back(std::move(split_specs.known)); } } @@ -125,6 +247,14 @@ namespace vcpkg::Commands::CI for (auto&& result : results) xunit_doc += result.summary.xunit_results(); + for (auto&& known_result : all_known_results) + { + for (auto&& result : known_result) + { + xunit_doc += + Install::InstallSummary::xunit_result(result.first, Chrono::ElapsedTime{}, result.second); + } + } xunit_doc += "\n"; paths.get_filesystem().write_contents(fs::u8path(it_xunit->second), xunit_doc); diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 1d017a8d3..f6d81c973 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -144,12 +144,14 @@ namespace vcpkg::Dependencies InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const SourceControlFile& scf, const std::set& features, - const RequestType& request_type) + const RequestType& request_type, + std::vector&& dependencies) : spec(spec) , source_control_file(scf) , plan_type(InstallPlanType::BUILD_AND_INSTALL) , request_type(request_type) , feature_list(features) + , computed_dependencies(std::move(dependencies)) { } @@ -162,6 +164,7 @@ namespace vcpkg::Dependencies , plan_type(InstallPlanType::ALREADY_INSTALLED) , request_type(request_type) , feature_list(features) + , computed_dependencies(installed_package.get()->dependencies()) { } @@ -683,11 +686,17 @@ namespace vcpkg::Dependencies // If it will be transiently uninstalled, we need to issue a full installation command auto pscf = p_cluster->source_control_file.value_or_exit(VCPKG_LINE_INFO); Checks::check_exit(VCPKG_LINE_INFO, pscf != nullptr); + + auto dep_specs = Util::fmap(m_graph_plan->install_graph.adjacency_list(p_cluster), + [](ClusterPtr const& p) { return p->spec; }); + Util::sort_unique_erase(dep_specs); + plan.emplace_back(InstallPlanAction{ p_cluster->spec, *pscf, p_cluster->to_install_features, p_cluster->request_type, + std::move(dep_specs), }); } else diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 7d36fba82..e30a34c18 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -668,39 +668,42 @@ namespace vcpkg::Install return nullptr; } + std::string InstallSummary::xunit_result(const PackageSpec& spec, Chrono::ElapsedTime time, BuildResult code) + { + std::string inner_block; + const char* result_string = ""; + switch (code) + { + case BuildResult::POST_BUILD_CHECKS_FAILED: + case BuildResult::FILE_CONFLICTS: + case BuildResult::BUILD_FAILED: + result_string = "Fail"; + inner_block = Strings::format("", to_string(code)); + break; + case BuildResult::EXCLUDED: + case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: + result_string = "Skip"; + inner_block = Strings::format("", to_string(code)); + break; + case BuildResult::SUCCEEDED: result_string = "Pass"; break; + default: Checks::exit_fail(VCPKG_LINE_INFO); + } + + return Strings::format(R"(%s)" + "\n", + spec, + spec, + time.as().count(), + result_string, + inner_block); + } + std::string InstallSummary::xunit_results() const { std::string xunit_doc; for (auto&& result : results) { - std::string inner_block; - const char* result_string = ""; - switch (result.build_result.code) - { - case BuildResult::POST_BUILD_CHECKS_FAILED: - case BuildResult::FILE_CONFLICTS: - case BuildResult::BUILD_FAILED: - result_string = "Fail"; - inner_block = Strings::format("", - to_string(result.build_result.code)); - break; - case BuildResult::EXCLUDED: - case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: - result_string = "Skip"; - inner_block = - Strings::format("", to_string(result.build_result.code)); - break; - case BuildResult::SUCCEEDED: result_string = "Pass"; break; - default: Checks::exit_fail(VCPKG_LINE_INFO); - } - - xunit_doc += Strings::format(R"(%s)" - "\n", - result.spec, - result.spec, - result.timing.as().count(), - result_string, - inner_block); + xunit_doc += xunit_result(result.spec, result.timing, result.build_result.code); } return xunit_doc; } diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index 0b4baf189..ed61cb42a 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -158,6 +158,16 @@ namespace vcpkg return std::move(control_file); } + Optional SourceControlFile::find_feature(const std::string& featurename) const + { + auto it = Util::find_if(feature_paragraphs, + [&](const std::unique_ptr& p) { return p->name == featurename; }); + if (it != feature_paragraphs.end()) + return **it; + else + return nullopt; + } + Dependency Dependency::parse_dependency(std::string name, std::string qualifier) { Dependency dep; -- cgit v1.2.3 From ab7985a34b8a4de59dc9a6e6c4c40fbb564797b8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 16 Mar 2018 16:53:48 -0700 Subject: [vcpkg-hash] Use BCrypt on Windows --- toolsrc/include/vcpkg/base/strings.h | 4 +- toolsrc/include/vcpkg/base/util.h | 12 +- toolsrc/src/vcpkg/base/strings.cpp | 13 ++- toolsrc/src/vcpkg/commands.hash.cpp | 124 ++++++++++++++++++--- toolsrc/vcpkg/vcpkg.vcxproj | 8 +- .../vcpkgmetricsuploader.vcxproj | 8 +- toolsrc/vcpkgtest/vcpkgtest.vcxproj | 4 + 7 files changed, 146 insertions(+), 27 deletions(-) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 6294853af..c32e81ac2 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -46,7 +46,9 @@ namespace vcpkg::Strings bool case_insensitive_ascii_equals(const CStringView left, const CStringView right); - std::string ascii_to_lowercase(std::string input); + std::string ascii_to_lowercase(std::string s); + + std::string ascii_to_uppercase(std::string s); bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern); diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index b12919951..c73345719 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -6,8 +6,6 @@ #include #include -#include - namespace vcpkg::Util { template @@ -158,6 +156,8 @@ namespace vcpkg::Util MoveOnlyBase& operator=(const MoveOnlyBase&) = delete; MoveOnlyBase& operator=(MoveOnlyBase&&) = default; + + ~MoveOnlyBase() = default; }; struct ResourceBase @@ -168,6 +168,8 @@ namespace vcpkg::Util ResourceBase& operator=(const ResourceBase&) = delete; ResourceBase& operator=(ResourceBase&&) = delete; + + ~ResourceBase() = default; }; template @@ -214,4 +216,10 @@ namespace vcpkg::Util return e == E::YES; } } + + template + void unused(T&& param) + { + (void)param; + } } diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index a08512c9f..5fedf3e1f 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -7,10 +7,11 @@ namespace vcpkg::Strings::details { // To disambiguate between two overloads - static const auto isspace = [](const char c) { return std::isspace(c); }; + static bool IS_SPACE(const char c) { return std::isspace(c) != 0; }; // Avoids C4244 warnings because of char<->int conversion that occur when using std::tolower() static char tolower_char(const char c) { return static_cast(std::tolower(c)); } + static char toupper_char(const char c) { return static_cast(std::toupper(c)); } #if defined(_WIN32) static _locale_t& c_locale() @@ -114,6 +115,12 @@ namespace vcpkg::Strings return s; } + std::string ascii_to_uppercase(std::string s) + { + std::transform(s.begin(), s.end(), s.begin(), &details::toupper_char); + return s; + } + bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern) { #if defined(_WIN32) @@ -136,8 +143,8 @@ namespace vcpkg::Strings std::string trim(std::string&& s) { - s.erase(std::find_if_not(s.rbegin(), s.rend(), details::isspace).base(), s.end()); - s.erase(s.begin(), std::find_if_not(s.begin(), s.end(), details::isspace)); + s.erase(std::find_if_not(s.rbegin(), s.rend(), details::IS_SPACE).base(), s.end()); + s.erase(s.begin(), std::find_if_not(s.begin(), s.end(), details::IS_SPACE)); return std::move(s); } diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index cb0a8cc51..9e1b54390 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -1,13 +1,114 @@ #include "pch.h" +#include +#include #include #include #include #include +#if defined(_WIN32) +#include + +#ifndef NT_SUCCESS +#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0) +#endif + namespace vcpkg::Commands::Hash { - std::string get_file_hash(const VcpkgPaths& paths, fs::path const& path, std::string const& hash_type) + namespace + { + static std::string to_hex(const unsigned char* string, const size_t bytes) + { + static constexpr char HEX_MAP[] = "0123456789abcdef"; + + std::string output; + output.resize(2 * bytes); + + size_t current_char = 0; + for (size_t i = 0; i < bytes; i++) + { + // high + output[current_char] = HEX_MAP[(string[i] & 0xF0) >> 4]; + ++current_char; + // low + output[current_char] = HEX_MAP[(string[i] & 0x0F)]; + ++current_char; + } + + return output; + } + + struct BCryptAlgorithmHandle : Util::ResourceBase + { + BCRYPT_ALG_HANDLE handle = nullptr; + + ~BCryptAlgorithmHandle() + { + if (handle) BCryptCloseAlgorithmProvider(handle, 0); + } + }; + + struct BCryptHashHandle : Util::ResourceBase + { + BCRYPT_HASH_HANDLE handle = nullptr; + + ~BCryptHashHandle() + { + if (handle) BCryptDestroyHash(handle); + } + }; + } + + std::string get_file_hash(const VcpkgPaths&, const fs::path& path, const std::string& hash_type) + { + BCryptAlgorithmHandle algorithm_handle; + + NTSTATUS error_code = BCryptOpenAlgorithmProvider( + &algorithm_handle.handle, Strings::to_utf16(Strings::ascii_to_uppercase(hash_type)).c_str(), nullptr, 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to open the algorithm provider"); + + DWORD hash_buffer_bytes; + DWORD cb_data; + error_code = BCryptGetProperty(algorithm_handle.handle, + BCRYPT_HASH_LENGTH, + reinterpret_cast(&hash_buffer_bytes), + sizeof(DWORD), + &cb_data, + 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to get hash length"); + const ULONG length_in_bytes = hash_buffer_bytes; + + BCryptHashHandle hash_handle; + + error_code = BCryptCreateHash(algorithm_handle.handle, &hash_handle.handle, nullptr, 0, nullptr, 0, 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to initialize the hasher"); + + FILE* file = nullptr; + const auto ec = _wfopen_s(&file, path.c_str(), L"rb"); + Checks::check_exit(VCPKG_LINE_INFO, ec == 0, "Failed to open file: %s", path.u8string()); + unsigned char buffer[4096]; + while (const auto actual_size = fread(buffer, 1, sizeof(buffer), file)) + { + error_code = BCryptHashData(hash_handle.handle, buffer, static_cast(actual_size), 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to hash data"); + } + + fclose(file); + + std::unique_ptr hash_buffer = std::make_unique(length_in_bytes); + + error_code = BCryptFinishHash(hash_handle.handle, hash_buffer.get(), length_in_bytes, 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to finalize the hash"); + + return to_hex(hash_buffer.get(), length_in_bytes); + } +} + +#else +namespace vcpkg::Commands::Hash +{ + std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type) { const std::string cmd_line = Strings::format( R"("%s" -E %ssum "%s")", @@ -32,7 +133,11 @@ namespace vcpkg::Commands::Hash Util::erase_remove_if(hash, isspace); return hash; } +} +#endif +namespace vcpkg::Commands::Hash +{ const CommandStructure COMMAND_STRUCTURE = { Strings::format("The argument should be a file path\n%s", Help::create_example_string("hash boost_1_62_0.tar.bz2")), @@ -44,19 +149,12 @@ namespace vcpkg::Commands::Hash void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - args.parse_arguments(COMMAND_STRUCTURE); - - if (args.command_arguments.size() == 1) - { - auto hash = get_file_hash(paths, args.command_arguments[0], "SHA512"); - System::println(hash); - } - if (args.command_arguments.size() == 2) - { - auto hash = get_file_hash(paths, args.command_arguments[0], args.command_arguments[1]); - System::println(hash); - } + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + const fs::path file_to_hash = args.command_arguments[0]; + const std::string algorithm = args.command_arguments.size() == 2 ? args.command_arguments[1] : "SHA512"; + const std::string hash = get_file_hash(paths, file_to_hash, algorithm); + System::println(hash); Checks::exit_success(VCPKG_LINE_INFO); } } diff --git a/toolsrc/vcpkg/vcpkg.vcxproj b/toolsrc/vcpkg/vcpkg.vcxproj index 4def6a74b..2ab94eb0a 100644 --- a/toolsrc/vcpkg/vcpkg.vcxproj +++ b/toolsrc/vcpkg/vcpkg.vcxproj @@ -77,7 +77,7 @@ false - winhttp.lib;version.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) + winhttp.lib;version.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;Bcrypt.lib;%(AdditionalDependencies) @@ -91,7 +91,7 @@ false - winhttp.lib;version.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) + winhttp.lib;version.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;Bcrypt.lib;%(AdditionalDependencies) @@ -109,7 +109,7 @@ true true - winhttp.lib;version.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) + winhttp.lib;version.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;Bcrypt.lib;%(AdditionalDependencies) @@ -127,7 +127,7 @@ true true - winhttp.lib;version.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) + winhttp.lib;version.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;Bcrypt.lib;%(AdditionalDependencies) diff --git a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj index d78e48e13..a2ceef9ce 100644 --- a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj +++ b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj @@ -77,7 +77,7 @@ false - winhttp.lib;version.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) + winhttp.lib;version.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;Bcrypt.lib;%(AdditionalDependencies) @@ -91,7 +91,7 @@ false - winhttp.lib;version.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) + winhttp.lib;version.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;Bcrypt.lib;%(AdditionalDependencies) @@ -109,7 +109,7 @@ true true - winhttp.lib;version.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) + winhttp.lib;version.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;Bcrypt.lib;%(AdditionalDependencies) @@ -127,7 +127,7 @@ true true - winhttp.lib;version.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) + winhttp.lib;version.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;Bcrypt.lib;%(AdditionalDependencies) diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index d61b15a71..a0d44918d 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -120,6 +120,7 @@ Windows $(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies) @@ -138,6 +139,7 @@ Windows $(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies) @@ -159,6 +161,7 @@ true true $(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies) @@ -180,6 +183,7 @@ true true $(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies) -- cgit v1.2.3 From d80dd5cbc777ce765c2d6b78d7c485fdf05f284b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 19 Mar 2018 15:45:35 -0700 Subject: [vcpkg] Handle failure to store archive --- toolsrc/include/vcpkg/base/files.h | 1 + toolsrc/src/vcpkg/base/files.cpp | 4 ++++ toolsrc/src/vcpkg/build.cpp | 9 ++++++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 09393b9ee..ac1f192ae 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -36,6 +36,7 @@ namespace vcpkg::Files virtual void write_lines(const fs::path& file_path, const std::vector& lines) = 0; virtual void write_contents(const fs::path& file_path, const std::string& data, std::error_code& ec) = 0; virtual void rename(const fs::path& oldpath, const fs::path& newpath) = 0; + virtual void rename(const fs::path& oldpath, const fs::path& newpath, std::error_code& ec) = 0; virtual bool remove(const fs::path& path) = 0; 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; diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index b59104a59..4e61666b7 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -108,6 +108,10 @@ namespace vcpkg::Files output.close(); } + virtual void rename(const fs::path& oldpath, const fs::path& newpath, std::error_code& ec) override + { + fs::stdfs::rename(oldpath, newpath, ec); + } virtual void rename(const fs::path& oldpath, const fs::path& newpath) override { fs::stdfs::rename(oldpath, newpath); diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index bc9eca3ba..ebded2736 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -618,9 +618,12 @@ namespace vcpkg::Build compress_archive(paths, spec, tmp_archive_path); fs.create_directories(archive_path.parent_path(), ec); - fs.rename(tmp_archive_path, archive_path); - - System::println("Stored binary cache: %s", archive_path.u8string()); + fs.rename(tmp_archive_path, archive_path, ec); + if (ec) + System::println( + System::Color::warning, "Failed to store binary cache: %s", archive_path.u8string()); + else + System::println("Stored binary cache: %s", archive_path.u8string()); } else if (result.code == BuildResult::BUILD_FAILED || result.code == BuildResult::POST_BUILD_CHECKS_FAILED) { -- cgit v1.2.3 From 9e54b3792daca1898a1b751d37fa22360721eba5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Mar 2018 21:45:01 -0700 Subject: [mpg123] Disable LTCG for static libs to avoid ABI incompatibility --- ports/mpg123/CONTROL | 2 +- scripts/cmake/vcpkg_build_msbuild.cmake | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/mpg123/CONTROL b/ports/mpg123/CONTROL index f72437453..7eba5e9b8 100644 --- a/ports/mpg123/CONTROL +++ b/ports/mpg123/CONTROL @@ -1,3 +1,3 @@ Source: mpg123 -Version: 1.25.8-2 +Version: 1.25.8-3 Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). \ No newline at end of file diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index b8403d277..6da8a7369 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -87,6 +87,12 @@ function(vcpkg_build_msbuild) /m ) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # Disable LTCG for static libraries because this setting introduces ABI incompatibility between minor compiler versions + # TODO: Add a way for the user to override this if they want to opt-in to incompatibility + list(APPEND _csc_OPTIONS /p:WholeProgramOptimization=false) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") message(STATUS "Building ${_csc_PROJECT_PATH} for Release") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -- cgit v1.2.3 From 0170cdf5abc7719e7819613dfa2263510efd45c3 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Mar 2018 20:15:27 -0700 Subject: [abseil][eastl][exiv2][nuklear][thrift][unicorn][zeromq] Upgrades --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/eastl/CONTROL | 2 +- ports/eastl/portfile.cmake | 4 ++-- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/unicorn/CONTROL | 2 +- ports/unicorn/portfile.cmake | 4 ++-- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 4 ++-- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index 011d38896..b337b7262 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-03-17 +Version: 2018-03-20 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 42052143d..46b665a14 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF eed36bfba04dbe8a08ec72e631c3b337e4f2db11 - SHA512 250911ccca6f21fafbd636e1d45bff748c53e31d0867e8f04bd73b1fbb5ecd261aa9d8e6d07ff610d58daed1dbe14e67db48b1f32a4ce41b3ac0abdde4b14146 + REF 506fb4b56a339314fde23802bd749dbc3b3c1c79 + SHA512 a67d51afcf4446d2c5f27258174dd012e4c15ee1f69eb074770d4f5af335e661b1cafa6b46f6b61b9f7ff0379e7822a03c6d55096dc78a13e554688a8872ebf8 HEAD_REF master ) diff --git a/ports/eastl/CONTROL b/ports/eastl/CONTROL index 2e7d0c433..47a111ea1 100644 --- a/ports/eastl/CONTROL +++ b/ports/eastl/CONTROL @@ -1,4 +1,4 @@ Source: eastl -Version: 3.07.02 +Version: 3.08.00 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/portfile.cmake b/ports/eastl/portfile.cmake index f5b877b8c..1e3831913 100644 --- a/ports/eastl/portfile.cmake +++ b/ports/eastl/portfile.cmake @@ -8,8 +8,8 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eastl) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO electronicarts/EASTL - REF 3.07.02 - SHA512 332db00b69a5493158daf1b0b89717646f0a31aeb0bfc9bf3415caee928102c3253c47c21eda0789350095811db45f5eae82ca24fb3fe1e9d67072f9fcd21235 + REF 3.08.00 + SHA512 dc9510d1b6021fb275049a45d52d25002ac2e9859047c0ba4881aa478b700645e17b4fdbc7cdb43cee86df9155c545d2a29a6c1c5b06df3b8b6b4e150f010ade HEAD_REF master ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 8411f4c86..5fd6dae7f 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-03-17 +Version: 2018-03-20 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 57515137b..3f2440356 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF a4a0516dc4b8b1376a5d9ca339c59c25e8799033 - SHA512 84ebac0e0aafbf610ae27fd00106a531e5ef1e37f8832c5d52070b0d4f8b8ebad367774f3d0ed4177137fab81d76e08937491b62b77aa73eb563cd7439a111cc + REF 59b148aee9402426e4d4cd7db5be6fa5966a68b5 + SHA512 6e7444d26594cd28d0a421b94ce8dc24b8b65cff3112014931a528235578f5cbbb9b945dff61af1d39fed97ab091aa6c5ebab6c662aada93ca5a9b0316f714f0 HEAD_REF master ) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index 9d34a7d77..c9a4c23a5 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-03-17 +Version: 2018-03-20 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index 51b45286f..833a34692 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF 20cd35c0fb379df3b8668e6319e87ada5081c99d - SHA512 a5cf3ecca15e6a8b8f7a4f7cf1122265831eac1152c6df6495b5e54654e948b05b2e349c46a581b51f6d94bb9c3d4f843f6acaffacd610f54dd45588b8cd5109 + REF 94c0412a086110dc801d83c20be7cb4e89dbd5d1 + SHA512 882bce080ca15a9b789289ceda987f1154df1800fd1428cf1d14db5704caf9ed3842ec1fe345db9548fe5305aa8f8721ddd53e75294b896c8caad061d29ec95a HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 0d8ba8c5a..1e0037736 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-03-17 +Version: 2018-03-20 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index a80b4bb68..968a5b109 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF b7084cbc0d377c59e045553add6f61215ed77854 - SHA512 0f3a4ba79b62c4a5f6809fe626adef63b0c0ab0024993146d946aa7de2eeb8e58086220be6a5d6ec41331fc827ce2a9b7ebe9b9b4b59d9d7307ce5f239430005 + REF 22bd3450c6e97e348d64fb6a75171e8ced79d1e4 + SHA512 5774fd332daac80891ac25c6188e415bf5335ffecc636dc120500f03b6ae23f9317c65dbc703cc89946a894f12c6805f396fd42e763d1e0d3ccfe6398357d321 HEAD_REF master ) diff --git a/ports/unicorn/CONTROL b/ports/unicorn/CONTROL index 398df6e27..6d907bd94 100644 --- a/ports/unicorn/CONTROL +++ b/ports/unicorn/CONTROL @@ -1,3 +1,3 @@ Source: unicorn -Version: 2018-03-13 +Version: 2018-03-20 Description: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework diff --git a/ports/unicorn/portfile.cmake b/ports/unicorn/portfile.cmake index dd0aad363..bec0088ed 100644 --- a/ports/unicorn/portfile.cmake +++ b/ports/unicorn/portfile.cmake @@ -14,8 +14,8 @@ set(VCPKG_CRT_LINKAGE "static") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO unicorn-engine/unicorn - REF 1f408ce35917e2dcb2136072eb4db9e1cf3ab70e - SHA512 fb630a391b33f34e1d04eec0daf90427f907c111b3a0a6ed0d50eb3b2fea2777d0edc9f00a01af614cd3d072b800663ae578080ee76af63a2ee8ae21da46396f + REF 9a01ae8379b0a4bc37cf50f7aeba63fddeb523c4 + SHA512 04d5e850bc1ba36856052be5a4e2a433db8d229ae90b2fbf6a5bf32c9dc86829518a8882d331d0bc7d42a23e9f5c43d6609a20dcca388c717940c081ff21b3a4 HEAD_REF master ) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index 6ff7822dd..4ea44046b 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-03-17 +Version: 2018-03-20 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 78d7f7a12..0f3765c3c 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF 4d9fc8066fe75795e8ccd77526b16baa5615b6bf - SHA512 0ba3b52637ee367f78b63c36e8738b1e217dcbc739bf308b386e9269963a3d87f7670f5904bb2cee6702afac6fe05d51645ab3f897ee507e03ca735f22c91b60 + REF 15b3dccf47179a88311c84d6ef250565abd05182 + SHA512 568d315f48c194f7db3df59ecf70a6625e916a4c258a3f5ad1d7b9e5899afd6a7d825f4fb8811cb49dcd752142952a9bd6e4c31af6572373462a4821d6a1a2bd HEAD_REF master ) -- cgit v1.2.3 From d5e433f03bf5220ef075489c18f5d1522fda1a4d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 17 Feb 2018 04:46:38 -0800 Subject: [vcpkg-build-msbuild] Add option to use vcpkg's integration. Fixes #891. Fixes #828. --- docs/maintainers/vcpkg_build_msbuild.md | 5 +++++ ports/atkmm/portfile.cmake | 3 +-- ports/glibmm/portfile.cmake | 3 +-- ports/gtkmm/portfile.cmake | 3 +-- ports/pangomm/portfile.cmake | 3 +-- ports/xalan-c/portfile.cmake | 8 ++++---- scripts/cmake/vcpkg_build_msbuild.cmake | 17 ++++++++++++++++- 7 files changed, 29 insertions(+), 13 deletions(-) diff --git a/docs/maintainers/vcpkg_build_msbuild.md b/docs/maintainers/vcpkg_build_msbuild.md index 889b07bdc..37f8d8df2 100644 --- a/docs/maintainers/vcpkg_build_msbuild.md +++ b/docs/maintainers/vcpkg_build_msbuild.md @@ -19,6 +19,11 @@ vcpkg_build_msbuild( ``` ## Parameters +### USE_VCPKG_INTEGRATION +Apply the normal `integrate install` integration for building the project. + +By default, projects built with this command will not automatically link libraries or have header paths set. + ### PROJECT_PATH The path to the solution (`.sln`) or project (`.vcxproj`) file. diff --git a/ports/atkmm/portfile.cmake b/ports/atkmm/portfile.cmake index 4cbaee7ad..74cf021c8 100644 --- a/ports/atkmm/portfile.cmake +++ b/ports/atkmm/portfile.cmake @@ -28,8 +28,7 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/atkmm.sln TARGET atkmm PLATFORM ${VS_PLATFORM} - # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 - OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets + USE_VCPKG_INTEGRATION ) # Handle headers diff --git a/ports/glibmm/portfile.cmake b/ports/glibmm/portfile.cmake index fd4853f55..7586c40a3 100644 --- a/ports/glibmm/portfile.cmake +++ b/ports/glibmm/portfile.cmake @@ -34,8 +34,7 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/glibmm.sln TARGET giomm PLATFORM ${VS_PLATFORM} - # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 - OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets + USE_VCPKG_INTEGRATION ) # Handle headers diff --git a/ports/gtkmm/portfile.cmake b/ports/gtkmm/portfile.cmake index c82bc597d..707e64a9b 100644 --- a/ports/gtkmm/portfile.cmake +++ b/ports/gtkmm/portfile.cmake @@ -34,8 +34,7 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/gtkmm.sln TARGET gtkmm PLATFORM ${VS_PLATFORM} - # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 - OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets + USE_VCPKG_INTEGRATION ) # Handle headers diff --git a/ports/pangomm/portfile.cmake b/ports/pangomm/portfile.cmake index ad350f638..e3409fe15 100644 --- a/ports/pangomm/portfile.cmake +++ b/ports/pangomm/portfile.cmake @@ -34,8 +34,7 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/pangomm.sln TARGET pangomm PLATFORM ${VS_PLATFORM} - # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 - OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets + USE_VCPKG_INTEGRATION ) # Handle headers diff --git a/ports/xalan-c/portfile.cmake b/ports/xalan-c/portfile.cmake index 55dd9f143..4f4da9143 100644 --- a/ports/xalan-c/portfile.cmake +++ b/ports/xalan-c/portfile.cmake @@ -45,15 +45,15 @@ endif() vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/c/projects/Win32/VC10/AllInOne/AllInOne.vcxproj PLATFORM ${BUILD_ARCH} - # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 - OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets) + USE_VCPKG_INTEGRATION +) # This is needed to generate the required LocalMsgIndex.hpp header vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/c/projects/Win32/VC10/Utils/XalanMsgLib/XalanMsgLib.vcxproj PLATFORM ${BUILD_ARCH} - # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 - OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets) + USE_VCPKG_INTEGRATION +) file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Debug/XalanMessages_1_11D.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Debug/Xalan-C_1_11D.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index 6da8a7369..db04530ef 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -19,6 +19,11 @@ ## ``` ## ## ## Parameters +## ### USE_VCPKG_INTEGRATION +## Apply the normal `integrate install` integration for building the project. +## +## By default, projects built with this command will not automatically link libraries or have header paths set. +## ## ### PROJECT_PATH ## The path to the solution (`.sln`) or project (`.vcxproj`) file. ## @@ -56,7 +61,13 @@ ## * [cppunit](https://github.com/Microsoft/vcpkg/blob/master/ports/cppunit/portfile.cmake) function(vcpkg_build_msbuild) - cmake_parse_arguments(_csc "" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" ${ARGN}) + cmake_parse_arguments( + _csc + "USE_VCPKG_INTEGRATION" + "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" + "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" + ${ARGN} + ) if(NOT DEFINED _csc_RELEASE_CONFIGURATION) set(_csc_RELEASE_CONFIGURATION Release) @@ -93,6 +104,10 @@ function(vcpkg_build_msbuild) list(APPEND _csc_OPTIONS /p:WholeProgramOptimization=false) endif() + if(_csc_USE_VCPKG_INTEGRATION) + list(APPEND _csc_OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") message(STATUS "Building ${_csc_PROJECT_PATH} for Release") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -- cgit v1.2.3 From b676c460435442250bbecd407f0ff289dbd289a6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Mar 2018 00:40:37 -0700 Subject: [nanomsg] Initial commit of 1.1.2 --- ports/nanomsg/CONTROL | 4 ++++ ports/nanomsg/portfile.cmake | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 ports/nanomsg/CONTROL create mode 100644 ports/nanomsg/portfile.cmake diff --git a/ports/nanomsg/CONTROL b/ports/nanomsg/CONTROL new file mode 100644 index 000000000..c39df5e95 --- /dev/null +++ b/ports/nanomsg/CONTROL @@ -0,0 +1,4 @@ +Source: nanomsg +Version: 1.1.2 +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 new file mode 100644 index 000000000..a869baea4 --- /dev/null +++ b/ports/nanomsg/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nanomsg/nanomsg + REF 1.1.2 + SHA512 f95ce24b34c25d139cf3de46585f6354e0311a9d5e7135ad71df62b8bb5df26f81a58b9773c39c320df2d0e97cd2905a8576f9f00b0a4d33774f1b610271cee5 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" NN_STATIC_LIB) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE + -DNN_STATIC_LIB=${NN_STATIC_LIB} + -DNN_TESTS=OFF + -DNN_TOOLS=OFF + -DNN_ENABLE_DOC=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(READ ${CURRENT_PACKAGES_DIR}/include/nanomsg/nn.h _contents) + string(REPLACE "defined(NN_STATIC_LIB)" "1" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/nanomsg/nn.h "${_contents}") +endif() + +file(INSTALL + ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanomsg RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 7cf6615a0145218f0baec63471b742e3471c1c86 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Mar 2018 01:13:27 -0700 Subject: [openssl] Use winsock2.h in headers instead of winsock.h --- ports/openssl/CONTROL | 2 +- ports/openssl/portfile.cmake | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index e1cea2799..43a6eb660 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2n-2 +Version: 1.0.2n-3 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/portfile.cmake b/ports/openssl/portfile.cmake index 3d442ec9e..dd92552f4 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -150,6 +150,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) endif() +file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" _contents) +string(REPLACE "" "" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" "${_contents}") + vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -- cgit v1.2.3 From 43c804a59eebd466835d79ce61628668f0f5b7ee Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Mar 2018 09:49:15 -0700 Subject: [boost-modular-build-helper] Improve handling of non-windows --- ports/boost-modular-build-helper/boost-modular-build.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/boost-modular-build-helper/boost-modular-build.cmake b/ports/boost-modular-build-helper/boost-modular-build.cmake index 557e089dd..222fc7fe9 100644 --- a/ports/boost-modular-build-helper/boost-modular-build.cmake +++ b/ports/boost-modular-build-helper/boost-modular-build.cmake @@ -79,7 +79,7 @@ function(boost_modular_build) configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") vcpkg_configure_cmake( SOURCE_PATH ${CURRENT_INSTALLED_DIR}/share/boost-build PREFER_NINJA -- cgit v1.2.3 From da9c2e79a544e341fd9488695f5e369f3356323e Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Mar 2018 02:32:35 -0700 Subject: [openvpn3][tap-windows6] Initial commit --- ports/asio/CONTROL | 3 ++- ports/openvpn3/CMakeLists.txt | 26 ++++++++++++++++++++++++++ ports/openvpn3/CONTROL | 4 ++++ ports/openvpn3/portfile.cmake | 37 +++++++++++++++++++++++++++++++++++++ ports/tap-windows6/CONTROL | 3 +++ ports/tap-windows6/portfile.cmake | 15 +++++++++++++++ 6 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 ports/openvpn3/CMakeLists.txt create mode 100644 ports/openvpn3/CONTROL create mode 100644 ports/openvpn3/portfile.cmake create mode 100644 ports/tap-windows6/CONTROL create mode 100644 ports/tap-windows6/portfile.cmake diff --git a/ports/asio/CONTROL b/ports/asio/CONTROL index d2ed48569..cd9914052 100644 --- a/ports/asio/CONTROL +++ b/ports/asio/CONTROL @@ -1,3 +1,4 @@ Source: asio -Version: 1.12.0 +Version: 1.12.0-1 +Build-Depends: boost-config, boost-throw-exception, boost-utility, boost-date-time 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/openvpn3/CMakeLists.txt b/ports/openvpn3/CMakeLists.txt new file mode 100644 index 000000000..fcbe85794 --- /dev/null +++ b/ports/openvpn3/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.0) +project(openvpncli CXX) + +find_path(ASIO_HPP asio.hpp) +find_library(MBEDTLS_LIB mbedtls) +find_library(MBEDCRYPTO_LIB mbedcrypto) +find_library(MBEDX509_LIB mbedx509) + +include_directories(. ${ASIO_HPP}) + +add_definitions(-DNOMINMAX -DUSE_ASIO -DUSE_MBEDTLS) + +add_library(ovpncli client/ovpncli.cpp) +target_link_libraries(ovpncli PRIVATE Iphlpapi.lib ${MBEDTLS_LIB} ${MBEDCRYPTO_LIB} ${MBEDX509_LIB}) + +install( + TARGETS ovpncli + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(BUILD_TOOL) + add_executable(cli test/ovpncli/cli.cpp) + target_link_libraries(cli PRIVATE ovpncli) +endif() diff --git a/ports/openvpn3/CONTROL b/ports/openvpn3/CONTROL new file mode 100644 index 000000000..09264a192 --- /dev/null +++ b/ports/openvpn3/CONTROL @@ -0,0 +1,4 @@ +Source: openvpn3 +Version: 2018-03-21 +Build-Depends: asio, tap-windows6 (windows), mbedtls +Description: a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch. diff --git a/ports/openvpn3/portfile.cmake b/ports/openvpn3/portfile.cmake new file mode 100644 index 000000000..aede361dd --- /dev/null +++ b/ports/openvpn3/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +set(VCPKG_LIBRARY_LINKAGE static) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenVPN/openvpn3 + REF 3d5dd9ee3b4182032044d775de5401fc6a7a63ae + SHA512 6a8ed20662efa576c57f38fb9579c5808f745d44e8cd6a84055bec10a58ede5d27e207a842f79ac6a2f7d986494fbd2415f9d59e2b23bd38e45c68546a227697 + 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() + +file(COPY ${SOURCE_PATH}/openvpn DESTINATION ${CURRENT_PACKAGES_DIR}/include/) +file(COPY ${SOURCE_PATH}/client/ovpncli.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/openvpn/) + +file(GLOB_RECURSE HEADERS ${CURRENT_PACKAGES_DIR}/include/openvpn/*) +foreach(HEADER IN LISTS HEADERS) + file(READ "${HEADER}" _contents) + string(REPLACE "defined(USE_ASIO)" "1" _contents "${_contents}") + string(REPLACE "#ifdef USE_ASIO\n" "#if 1\n" _contents "${_contents}") + string(REPLACE "defined(USE_MBEDTLS)" "1" _contents "${_contents}") + string(REPLACE "#ifdef USE_MBEDTLS\n" "#if 1\n" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") +endforeach() + +file(INSTALL + ${SOURCE_PATH}/COPYRIGHT.AGPLV3 + DESTINATION ${CURRENT_PACKAGES_DIR}/share/openvpn3 RENAME copyright) diff --git a/ports/tap-windows6/CONTROL b/ports/tap-windows6/CONTROL new file mode 100644 index 000000000..744247c32 --- /dev/null +++ b/ports/tap-windows6/CONTROL @@ -0,0 +1,3 @@ +Source: tap-windows6 +Version: 9.21.2-0e30f5c +Description: an NDIS 6 implementation of the TAP-Windows driver, used by OpenVPN and other apps. Note: This package only contains the headers for the driver. \ No newline at end of file diff --git a/ports/tap-windows6/portfile.cmake b/ports/tap-windows6/portfile.cmake new file mode 100644 index 000000000..4e2725d1e --- /dev/null +++ b/ports/tap-windows6/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenVPN/tap-windows6 + REF 0e30f5c13b3c7b0bdd60da915350f653e4c14d92 + SHA512 88edecccd4818091f7d70b66f3dfa07146f010a064829dc971abdd0c180ce1f72db9d8f3a1c9f5b4fb3f31e7afe3eadbd7d6f7d711f698e723441d30beaf9e30 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/src/tap-windows.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +file(INSTALL + ${SOURCE_PATH}/COPYRIGHT.MIT + DESTINATION ${CURRENT_PACKAGES_DIR}/share/tap-windows6 RENAME copyright) -- cgit v1.2.3 From 88931dc94bcb01d66cceb52cf16f30fe19486f36 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Mar 2018 09:54:13 -0700 Subject: [boost-modular-build-helper] Reformat --- ports/boost-modular-build-helper/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/boost-modular-build-helper/portfile.cmake b/ports/boost-modular-build-helper/portfile.cmake index 1c34f2fec..6ed367434 100644 --- a/ports/boost-modular-build-helper/portfile.cmake +++ b/ports/boost-modular-build-helper/portfile.cmake @@ -7,5 +7,6 @@ file( ${CMAKE_CURRENT_LIST_DIR}/nothing.bat ${CMAKE_CURRENT_LIST_DIR}/user-config.jam ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt - DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/boost-build ) -- cgit v1.2.3 From 5442d35b9164b75101a57ede9c9dd119b92f18ff Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Mar 2018 01:22:29 -0700 Subject: [caf] Initial commit of 0.15.6 --- ports/caf/CONTROL | 4 +++ ports/caf/openssl-version-override.patch | 14 ++++++++++ ports/caf/portfile.cmake | 48 ++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 ports/caf/CONTROL create mode 100644 ports/caf/openssl-version-override.patch create mode 100644 ports/caf/portfile.cmake diff --git a/ports/caf/CONTROL b/ports/caf/CONTROL new file mode 100644 index 000000000..3053fa95c --- /dev/null +++ b/ports/caf/CONTROL @@ -0,0 +1,4 @@ +Source: caf +Version: 0.15.6 +Build-Depends: openssl +Description: an open source C++11 actor model implementation featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more. diff --git a/ports/caf/openssl-version-override.patch b/ports/caf/openssl-version-override.patch new file mode 100644 index 000000000..bccbd6ca4 --- /dev/null +++ b/ports/caf/openssl-version-override.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a7b75f7..794af1d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -545,6 +545,9 @@ if(NOT CAF_NO_OPENSSL) + message(STATUS + "Disable OpenSSL. Required >= 1.0.1 due to TLSv1.2 support.") + set(CAF_NO_OPENSSL yes) ++ elseif(CAF_OPENSSL_VERSION_OVERRIDE) ++ include_directories(BEFORE ${OPENSSL_INCLUDE_DIR}) ++ add_optional_caf_lib(openssl) + else() + # Check if openssl headers and library versions match + set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) diff --git a/ports/caf/portfile.cmake b/ports/caf/portfile.cmake new file mode 100644 index 000000000..5f06c8d8a --- /dev/null +++ b/ports/caf/portfile.cmake @@ -0,0 +1,48 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_LIBRARY_LINKAGE "static") + message("CAF only supports static library linkage") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO actor-framework/actor-framework + REF 0.15.6 + SHA512 180ef1149fcbbe4532452cbe4509c177ecc3ae3971453505f6600b715be38b3c891ae7f83b8d368fcb20af037e4d6e94f7f750f477bd499d48316fe33fca511e + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/openssl-version-override.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON + -DCAF_BUILD_STATIC=ON + -DCAF_BUILD_STATIC_ONLY=ON + -DCAF_NO_TOOLS=ON + -DCAF_NO_EXAMPLES=ON + -DCAF_NO_BENCHMARKS=ON + -DCAF_NO_UNIT_TESTS=ON + -DCAF_NO_PROTOBUF_EXAMPLES=ON + -DCAF_NO_QT_EXAMPLES=ON + -DCAF_NO_OPENCL=ON + -DCAF_NO_OPENSSL=OFF + -DCAF_NO_CURL_EXAMPLES=ON + -DCAF_OPENSSL_VERSION_OVERRIDE=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/caf RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 9a0b2d19e32c793a9a1f0310be99af50ba211add Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Mar 2018 05:26:19 -0700 Subject: [openssl] Don't require nasm on non-windows --- ports/openssl/portfile-nonwindows.cmake | 3 +++ ports/openssl/portfile.cmake | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ports/openssl/portfile-nonwindows.cmake b/ports/openssl/portfile-nonwindows.cmake index 67e739af1..3a4f69710 100644 --- a/ports/openssl/portfile-nonwindows.cmake +++ b/ports/openssl/portfile-nonwindows.cmake @@ -4,6 +4,9 @@ if(CMAKE_HOST_WIN32) set(MAKE ${MSYS_ROOT}/usr/bin/make.exe) else() find_program(MAKE make) + if(NOT MAKE) + message(FATAL_ERROR "Could not find make. Please install it through your package manager.") + endif() endif() vcpkg_configure_cmake( diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index dd92552f4..023b3e233 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -8,11 +8,9 @@ set(OPENSSL_VERSION 1.0.2n) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) vcpkg_find_acquire_program(PERL) -vcpkg_find_acquire_program(NASM) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) -set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH};${PERL_EXE_PATH}") +set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") 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" @@ -34,6 +32,10 @@ if(VCPKG_CMAKE_SYSTEM_NAME) return() endif() +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH}") + vcpkg_find_acquire_program(JOM) set(CONFIGURE_COMMAND ${PERL} Configure -- cgit v1.2.3 From 1baa7f16420a359328761b330cdaf58b82b6656c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 21 Mar 2018 16:19:06 -0700 Subject: Improve error message when PROGRAMFILES is not found --- toolsrc/src/vcpkg/base/system.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index a315c7880..60067759a 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -533,7 +533,15 @@ namespace vcpkg::System static const fs::path& get_program_files() { - static const fs::path PATH = System::get_environment_variable("PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO); + static const fs::path PATH = []() -> fs::path { + auto value = System::get_environment_variable("PROGRAMFILES"); + if (auto v = value.get()) + { + return *v; + } + Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find PROGRAMFILES environment variable"); + }(); + return PATH; } @@ -543,7 +551,7 @@ namespace vcpkg::System auto value = System::get_environment_variable("ProgramFiles(x86)"); if (auto v = value.get()) { - return std::move(*v); + return *v; } return get_program_files(); }(); @@ -556,7 +564,7 @@ namespace vcpkg::System auto value = System::get_environment_variable("ProgramW6432"); if (auto v = value.get()) { - return std::move(*v); + return *v; } return get_program_files(); }(); -- cgit v1.2.3 From a1a322074972b3adf45d22eb2ba1739d6249e34d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 21 Mar 2018 16:42:06 -0700 Subject: [opengl] Fix error message when WindowsSDK cannot be found --- ports/opengl/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/opengl/portfile.cmake b/ports/opengl/portfile.cmake index 6e9e1d14f..3fcca32da 100644 --- a/ports/opengl/portfile.cmake +++ b/ports/opengl/portfile.cmake @@ -16,7 +16,7 @@ else() endif() if (NOT EXISTS "${LIBGLFILEPATH}") - message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}") + message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBGLFILEPATH}") endif() if (NOT EXISTS "${LIBGLUFILEPATH}") -- cgit v1.2.3 From d45954a96b625ba1856ac97b429163a1919a3299 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 21 Mar 2018 18:21:30 -0700 Subject: System::get_program_files() now returns Optional --- toolsrc/include/vcpkg/base/system.h | 4 ++-- toolsrc/src/vcpkg/base/system.cpp | 35 ++++++++++++++++---------------- toolsrc/src/vcpkg/commands.edit.cpp | 20 +++++++++++++----- toolsrc/src/vcpkg/commands.integrate.cpp | 6 +++--- toolsrc/src/vcpkg/vcpkgpaths.cpp | 18 ++++++++-------- 5 files changed, 48 insertions(+), 35 deletions(-) diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index b2faf69bb..0d089276f 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -110,9 +110,9 @@ namespace vcpkg::System std::vector get_supported_host_architectures(); - const fs::path& get_program_files_32_bit(); + const Optional& get_program_files_32_bit(); - const fs::path& get_program_files_platform_bitness(); + const Optional& get_program_files_platform_bitness(); } namespace vcpkg::Debug diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 60067759a..1094777af 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -224,21 +224,21 @@ namespace vcpkg::System env_cstr.push_back(L'\0'); } - if (extra_env.find("PATH") != extra_env.end()) - NEW_PATH += Strings::format(";%s", extra_env.find("PATH")->second); + if (extra_env.find("PATH") != extra_env.end()) + NEW_PATH += Strings::format(";%s", extra_env.find("PATH")->second); env_cstr.append(Strings::to_utf16(NEW_PATH)); env_cstr.push_back(L'\0'); env_cstr.append(L"VSLANG=1033"); env_cstr.push_back(L'\0'); - for (auto item : extra_env) - { - if (item.first == "PATH") continue; - env_cstr.append(Strings::to_utf16(item.first)); - env_cstr.push_back(L'='); - env_cstr.append(Strings::to_utf16(item.second)); - env_cstr.push_back(L'\0'); - } + for (auto item : extra_env) + { + if (item.first == "PATH") continue; + env_cstr.append(Strings::to_utf16(item.first)); + env_cstr.push_back(L'='); + env_cstr.append(Strings::to_utf16(item.second)); + env_cstr.push_back(L'\0'); + } STARTUPINFOW startup_info; memset(&startup_info, 0, sizeof(STARTUPINFOW)); @@ -531,23 +531,24 @@ namespace vcpkg::System } #endif - static const fs::path& get_program_files() + static const Optional& get_program_files() { - static const fs::path PATH = []() -> fs::path { + static const auto PATH = []() -> Optional { auto value = System::get_environment_variable("PROGRAMFILES"); if (auto v = value.get()) { return *v; } - Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find PROGRAMFILES environment variable"); + + return nullopt; }(); return PATH; } - const fs::path& get_program_files_32_bit() + const Optional& get_program_files_32_bit() { - static const fs::path PATH = []() -> fs::path { + static const auto PATH = []() -> Optional { auto value = System::get_environment_variable("ProgramFiles(x86)"); if (auto v = value.get()) { @@ -558,9 +559,9 @@ namespace vcpkg::System return PATH; } - const fs::path& get_program_files_platform_bitness() + const Optional& get_program_files_platform_bitness() { - static const fs::path PATH = []() -> fs::path { + static const auto PATH = []() -> Optional { auto value = System::get_environment_variable("ProgramW6432"); if (auto v = value.get()) { diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index 41f261a53..ac34a6720 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -69,14 +69,24 @@ namespace vcpkg::Commands::Edit std::vector candidate_paths; auto maybe_editor_path = System::get_environment_variable("EDITOR"); - if (auto editor_path = maybe_editor_path.get()) + if (const std::string* editor_path = maybe_editor_path.get()) { candidate_paths.emplace_back(*editor_path); } - candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE_INSIDERS); - candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE_INSIDERS); - candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE); - candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE); + + const auto& program_files = System::get_program_files_platform_bitness(); + if (const fs::path* pf = program_files.get()) + { + candidate_paths.push_back(*pf / VS_CODE_INSIDERS); + candidate_paths.push_back(*pf / VS_CODE); + } + + const auto& program_files_32_bit = System::get_program_files_32_bit(); + if (const fs::path* pf = program_files_32_bit.get()) + { + candidate_paths.push_back(*pf / VS_CODE_INSIDERS); + candidate_paths.push_back(*pf / VS_CODE); + } const std::vector from_registry = find_from_registry(); candidate_paths.insert(candidate_paths.end(), from_registry.cbegin(), from_registry.cend()); diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 460e99b88..36e4e56e7 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -148,12 +148,12 @@ namespace vcpkg::Commands::Integrate static void integrate_install(const VcpkgPaths& paths) { static const std::array OLD_SYSTEM_TARGET_FILES = { - System::get_program_files_32_bit() / + System::get_program_files_32_bit().value_or_exit(VCPKG_LINE_INFO) / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets", - System::get_program_files_32_bit() / + System::get_program_files_32_bit().value_or_exit(VCPKG_LINE_INFO) / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"}; static const fs::path SYSTEM_WIDE_TARGETS_FILE = - System::get_program_files_32_bit() / + System::get_program_files_32_bit().value_or_exit(VCPKG_LINE_INFO) / "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props"; auto& fs = paths.get_filesystem(); diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 46e80c4a9..63a484a86 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -190,10 +190,11 @@ namespace vcpkg #endif const std::vector from_path = Files::find_from_PATH("cmake"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); -#if defined(_WIN32) - candidate_paths.push_back(System::get_program_files_platform_bitness() / "CMake" / "bin" / "cmake.exe"); - candidate_paths.push_back(System::get_program_files_32_bit() / "CMake" / "bin"); -#endif + + const auto& program_files = System::get_program_files_platform_bitness(); + if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); + const auto& program_files_32_bit = System::get_program_files_32_bit(); + if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); const Optional path = find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); @@ -252,10 +253,11 @@ namespace vcpkg #endif const std::vector from_path = Files::find_from_PATH("git"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); -#if defined(_WIN32) - candidate_paths.push_back(System::get_program_files_platform_bitness() / "git" / "cmd" / "git.exe"); - candidate_paths.push_back(System::get_program_files_32_bit() / "git" / "cmd" / "git.exe"); -#endif + + const auto& program_files = System::get_program_files_platform_bitness(); + if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); + const auto& program_files_32_bit = System::get_program_files_32_bit(); + if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); const Optional path = find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); -- cgit v1.2.3 From 38c9c97b6b2106304a9602ddf580b17e7bf56311 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Mar 2018 11:34:24 -0700 Subject: [double-conversion] Fix on non-windows --- ports/double-conversion/portfile.cmake | 7 +++---- scripts/cmake/vcpkg_configure_cmake.cmake | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index 326d7e1c1..47f3fba4e 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -23,6 +23,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Rename exported target files into something vcpkg_fixup_cmake_targets expects +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion) +endif() if(NOT VCPKG_USE_HEAD_VERSION) if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") @@ -51,10 +54,6 @@ if(NOT VCPKG_USE_HEAD_VERSION) vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -else() - if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion) - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion) - endif() endif() vcpkg_copy_pdbs() diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 951b6443f..5fa42cb11 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -180,6 +180,8 @@ function(vcpkg_configure_cmake) "-DVCPKG_C_FLAGS_DEBUG=${VCPKG_C_FLAGS_DEBUG}" "-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}" "-DVCPKG_LINKER_FLAGS=${VCPKG_LINKER_FLAGS}" + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_BINDIR=bin" ) if(DEFINED ARCH) -- cgit v1.2.3 From 502c4653868efe6512f59400219085efc53f127a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Mar 2018 12:27:29 -0700 Subject: [yaml-cpp][zeromq][zstd] Fix non-windows --- ports/yaml-cpp/portfile.cmake | 7 ++++++- ports/zeromq/portfile.cmake | 7 ++++++- ports/zstd/portfile.cmake | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake index 096b178ac..071931f64 100644 --- a/ports/yaml-cpp/portfile.cmake +++ b/ports/yaml-cpp/portfile.cmake @@ -17,7 +17,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/yaml-cpp) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/yaml-cpp) +endif() # Adjust paths and remove hardcoded ones from the config files file(READ ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-config.cmake YAML_CONFIG) diff --git a/ports/zeromq/portfile.cmake b/ports/zeromq/portfile.cmake index 0f3765c3c..062ed6b48 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -31,7 +31,12 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/ZeroMQ) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ) +endif() file(READ ${CURRENT_PACKAGES_DIR}/share/zeromq/ZeroMQConfig.cmake _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index 874b5ec93..c69ee0cd0 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -32,7 +32,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() 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(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) foreach(HEADER zdict.h zstd.h zstd_errors.h) -- cgit v1.2.3 From 191fab2e592b9f4163d32980272253bc84648831 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Mar 2018 12:54:03 -0700 Subject: [caf][gdcm2] Upgrades --- ports/caf/CONTROL | 2 +- ports/caf/portfile.cmake | 4 ++-- ports/gdcm2/CONTROL | 2 +- ports/gdcm2/portfile.cmake | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/caf/CONTROL b/ports/caf/CONTROL index 3053fa95c..e9b8cd0bf 100644 --- a/ports/caf/CONTROL +++ b/ports/caf/CONTROL @@ -1,4 +1,4 @@ Source: caf -Version: 0.15.6 +Version: 0.15.7 Build-Depends: openssl Description: an open source C++11 actor model implementation featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more. diff --git a/ports/caf/portfile.cmake b/ports/caf/portfile.cmake index 5f06c8d8a..aecd84116 100644 --- a/ports/caf/portfile.cmake +++ b/ports/caf/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO actor-framework/actor-framework - REF 0.15.6 - SHA512 180ef1149fcbbe4532452cbe4509c177ecc3ae3971453505f6600b715be38b3c891ae7f83b8d368fcb20af037e4d6e94f7f750f477bd499d48316fe33fca511e + REF 0.15.7 + SHA512 ff0fa205ad71677b84fa09a2e6ce6bb6d1bc9b790bbbc3ac51505467402ff61a218528004212efa2063c798cc512972d318a2c9423067ee51cef719de2b6b186 HEAD_REF master ) diff --git a/ports/gdcm2/CONTROL b/ports/gdcm2/CONTROL index 073e6cbeb..6268c788f 100644 --- a/ports/gdcm2/CONTROL +++ b/ports/gdcm2/CONTROL @@ -1,4 +1,4 @@ Source: gdcm2 -Version: 2.8.4 +Version: 2.8.5 Description: Grassroots DICOM library Build-Depends: zlib, expat diff --git a/ports/gdcm2/portfile.cmake b/ports/gdcm2/portfile.cmake index bb0782ba4..7e8c89611 100644 --- a/ports/gdcm2/portfile.cmake +++ b/ports/gdcm2/portfile.cmake @@ -14,8 +14,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO malaterre/GDCM - REF v2.8.4 - SHA512 d58854507bcc477bcf7944c82014ceac4c603bf8f0e75ddda2371052f4972f1535cb782b47d0822a8929131b804ea5c16b9236b414d70cbf96a494741391c534 + REF v2.8.5 + SHA512 644a7ad04746ffb36b7923796b967cc11fd3b71baede7722093d5785eaf869280c67a968f6b32aeb43cc7c88927fba78459e4846e058996a1634311311745510 ) vcpkg_apply_patches( -- cgit v1.2.3 From 5daba0bcbb76d728f584ab6b1c9f38d7fec211e9 Mon Sep 17 00:00:00 2001 From: Krzysztof Czurylo Date: Thu, 22 Mar 2018 09:35:02 +0100 Subject: [nvml] Initial commit for NVM Library (#1477) --- ports/nvml/CONTROL | 3 ++ ports/nvml/portfile.cmake | 74 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 ports/nvml/CONTROL create mode 100644 ports/nvml/portfile.cmake diff --git a/ports/nvml/CONTROL b/ports/nvml/CONTROL new file mode 100644 index 000000000..8bf941bd3 --- /dev/null +++ b/ports/nvml/CONTROL @@ -0,0 +1,3 @@ +Source: nvml +Version: 1.3-0 +Description: Non-Volatile Memory Library \ No newline at end of file diff --git a/ports/nvml/portfile.cmake b/ports/nvml/portfile.cmake new file mode 100644 index 000000000..9e51c2bda --- /dev/null +++ b/ports/nvml/portfile.cmake @@ -0,0 +1,74 @@ + +set(NVML_VERSION 1.3) +set(NVML_HASH 59fb552c693d5279ec86eff8eb1c36832c9c5beb6492a64b54b21c09d90ed52cba22d57912a304cf1ec17c4633da641200fd50dbe4a38355f43c674842f991bd) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${NVML_VERSION}) + +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "WARNING: Static building not supported. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +if (TRIPLET_SYSTEM_ARCH MATCHES "arm") + message(FATAL_ERROR "ARM is currently not supported") +elseif (TRIPLET_SYSTEM_ARCH MATCHES "x86") + message(FATAL_ERROR "x86 is not supported. Please use nvml:x64-windows or set environment variable VCPKG_DEFAULT_TRIPLET to 'x64-windows'") +else () + set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH}) +endif() + +# Download source +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pmem/nvml + REF ${NVML_VERSION} + SHA512 ${NVML_HASH} + HEAD_REF master +) + +# Build only the selected projects +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/src/NVML.sln + PLATFORM x64 + TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmempool,Solution Items\\libvmem,Solution Items\\Tools\\pmempool" + OPTIONS /p:SRCVERSION=${NVML_VERSION} +) + +set(DEBUG_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Debug) +set(RELEASE_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Release) + +# Install header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/libpmemobj/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libpmemobj) +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/libpmemobj++/*.hpp) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libpmemobj++) +# Remove unneeded header files +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libvmmalloc.h) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/librpmem.h) + +# Install libraries (debug) +file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.lib ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.exp) +file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libpmemcommon.lib) +file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.dll) +file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +# Install libraries (release) +file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.lib ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.exp) +file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libpmemcommon.lib) +file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.dll) +file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + +# Install tools (release only) +file(INSTALL ${RELEASE_ARTIFACTS_PATH}/pmempool.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/nvml) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/nvml) + +vcpkg_copy_pdbs() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nvml) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/nvml/LICENSE ${CURRENT_PACKAGES_DIR}/share/nvml/copyright) -- cgit v1.2.3 From 67573ccf2c18704137071b1309ff3b0f7231a547 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Mar 2018 01:50:38 -0700 Subject: [pdcurses] Use out-of-source builds. Use official github. Fixes #2951. --- ports/pdcurses/portfile.cmake | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/ports/pdcurses/portfile.cmake b/ports/pdcurses/portfile.cmake index 22268fdc0..f9db020b9 100644 --- a/ports/pdcurses/portfile.cmake +++ b/ports/pdcurses/portfile.cmake @@ -4,20 +4,25 @@ if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) find_program(NMAKE nmake) -vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/project/pdcurses/pdcurses/3.4/pdcurs34.zip" - FILENAME "pdcurs34.zip" - SHA512 0b916bfe37517abb80df7313608cc4e1ed7659a41ce82763000dfdfa5b8311ffd439193c74fc84a591f343147212bf1caf89e7db71f1f7e4fa70f534834cb039 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wmcbrine/PDCurses + REF PDCurses_3_4 + SHA512 a05065c2e43771bf769f25f229b6058c4dc6add65d993f2e304e98bded8a8af88e674638c7385383451fddc45cf3bd8c9a95febffc7abcbcce0e6384e4f397b3 + HEAD_REF master ) -if(EXISTS ${CURRENT_BUILDTREES_DIR}/src) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) -endif() +file(REMOVE_RECURSE + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} +) + +file(GLOB SOURCES ${SOURCE_PATH}/*) + +file(COPY ${SOURCES} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) -vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}) +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}") file(READ ${SOURCE_PATH}/win32/vcwin32.mak PDC_MAK_ORIG) string(REPLACE " -pdb:none" "" PDC_MAK_ORIG ${PDC_MAK_ORIG}) -- cgit v1.2.3 From 19b75faebd135d97a545dc57a51afef6d94cccc7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Mar 2018 02:00:56 -0700 Subject: [README] update badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85f8fc922..99075569d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Vcpkg ![](https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5261/badge) +# Vcpkg ![](https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/8476/badge) ## Overview Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are currently in a preview state; your involvement is vital to its success. -- cgit v1.2.3 From c3fb0b169751ec0f25ac3752a7e83e21173073a4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Mar 2018 03:08:25 -0700 Subject: [vcpkg] Download cmake on osx and linux --- ports/yaml-cpp/CONTROL | 2 +- scripts/fetchTool.ps1 | 8 ++--- scripts/vcpkgTools.xml | 6 ++++ toolsrc/src/vcpkg/base/system.cpp | 6 ++-- toolsrc/src/vcpkg/vcpkgpaths.cpp | 73 ++++++++++++++++++++++++++++++++------- 5 files changed, 74 insertions(+), 21 deletions(-) diff --git a/ports/yaml-cpp/CONTROL b/ports/yaml-cpp/CONTROL index 1e2d0e5c9..bec9b7e13 100644 --- a/ports/yaml-cpp/CONTROL +++ b/ports/yaml-cpp/CONTROL @@ -1,3 +1,3 @@ Source: yaml-cpp -Version: 0.6.2 +Version: 0.6.2-1 Description: yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec. diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 2c2f599ef..86174ee19 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -35,14 +35,14 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) $isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath" if ($isArchive) { - $downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)" + $downloadPath = "$downloadsDir\$(@($toolData.archiveRelativePath)[0])" } else { - $downloadPath = "$downloadsDir\$($toolData.exeRelativePath)" + $downloadPath = "$downloadsDir\$(@($toolData.exeRelativePath)[0])" } - $url = $toolData.url + [String]$url = @($toolData.url)[0] if (!(Test-Path $downloadPath)) { Write-Host "Downloading $tool..." @@ -50,7 +50,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) Write-Host "Downloading $tool has completed successfully." } - $expectedDownloadedFileHash = $toolData.sha256 + $expectedDownloadedFileHash = @($toolData.sha256)[0] $downloadedFileHash = vcpkgGetSHA256 $downloadPath vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 02fd0b996..9c78e92d9 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -6,6 +6,12 @@ https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6 cmake-3.10.2-win32-x86.zip + cmake-3.10.2-Darwin-x86_64/CMake.app/Contents/bin/cmake + https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz + cmake-3.10.2-Darwin-x86_64.tar.gz + cmake-3.10.2-Linux-x86_64/bin/cmake + https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz + cmake-3.10.2-Linux-x86_64.tar.gz 2.16.2 diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 1094777af..171dd2bbf 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -285,14 +285,14 @@ namespace vcpkg::System fflush(nullptr); // Basically we are wrapping it in quotes - const std::string& actual_cmd_line = Strings::format(R"###("%s")###", cmd_line); #if defined(_WIN32) + const std::string& actual_cmd_line = Strings::format(R"###("%s")###", cmd_line); Debug::println("_wsystem(%s)", actual_cmd_line); const int exit_code = _wsystem(Strings::to_utf16(actual_cmd_line).c_str()); Debug::println("_wsystem() returned %d", exit_code); #else - Debug::println("_system(%s)", actual_cmd_line); - const int exit_code = system(actual_cmd_line.c_str()); + Debug::println("_system(%s)", cmd_line); + const int exit_code = system(cmd_line.c_str()); Debug::println("_system() returned %d", exit_code); #endif return exit_code; diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 63a484a86..c36def15d 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -19,6 +19,8 @@ namespace vcpkg { std::array required_version; fs::path downloaded_exe_path; + std::string url; + fs::path downloaded_path; }; static Optional> parse_version_string(const std::string& version_as_string) @@ -41,8 +43,24 @@ namespace vcpkg static ToolData parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool) { +#if defined(_WIN32) + static constexpr StringLiteral OS_STRING = ""; +#elif defined(__APPLE__) + static constexpr StringLiteral OS_STRING = " os=\"osx\""; +#else // assume linux + static constexpr StringLiteral OS_STRING = " os=\"linux\""; +#endif + static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; + const auto maybe_get_string_inside_tags = [](const std::string& input, + const std::regex& regex) -> Optional { + std::smatch match; + const bool has_match = std::regex_search(input.cbegin(), input.cend(), match, regex); + if (!has_match) return nullopt; + return match[1]; + }; + const auto get_string_inside_tags = [](const std::string& input, const std::regex& regex, const std::string& tag_name) -> std::string { std::smatch match; @@ -57,7 +75,10 @@ namespace vcpkg static const std::regex VERSION_REGEX{ Strings::format(R"###(([\s\S]*?))###", tool)}; static const std::regex EXE_RELATIVE_PATH_REGEX{ - Strings::format(R"###(([\s\S]*?))###", tool)}; + Strings::format(R"###(([\s\S]*?))###", OS_STRING)}; + static const std::regex ARCHIVE_RELATIVE_PATH_REGEX{ + Strings::format(R"###(([\s\S]*?))###", OS_STRING)}; + static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###", OS_STRING)}; const std::regex tool_regex{Strings::format(R"###(([\s\S]*?))###", tool)}; @@ -74,9 +95,13 @@ namespace vcpkg const std::string required_version_as_string = get_string_inside_tags(tool_data_as_string, VERSION_REGEX, "requiredVersion"); + const std::string url = get_string_inside_tags(tool_data_as_string, URL_REGEX, "url"); + const std::string exe_relative_path = get_string_inside_tags(tool_data_as_string, EXE_RELATIVE_PATH_REGEX, "exeRelativePath"); + auto archive_relative_path = maybe_get_string_inside_tags(tool_data_as_string, ARCHIVE_RELATIVE_PATH_REGEX); + const Optional> required_version = parse_version_string(required_version_as_string); Checks::check_exit(VCPKG_LINE_INFO, required_version.has_value(), @@ -85,7 +110,10 @@ namespace vcpkg required_version_as_string); const fs::path exe_path = paths.downloads / exe_relative_path; - return ToolData{*required_version.get(), exe_path}; + return ToolData{*required_version.get(), + exe_path, + url, + paths.downloads / archive_relative_path.value_or(exe_relative_path)}; } static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd, @@ -144,8 +172,10 @@ namespace vcpkg return data_lines; } - static fs::path fetch_tool(const fs::path& scripts_folder, const std::string& tool_name, const ToolData& tool_data) + static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) { + const auto& fs = paths.get_filesystem(); + const fs::path& scripts_folder = paths.scripts; const std::array& version = tool_data.required_version; const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); @@ -154,6 +184,7 @@ namespace vcpkg version_as_string, tool_name, version_as_string); +#if defined(_WIN32) const fs::path script = scripts_folder / "fetchtool.ps1"; const std::string title = Strings::format( "Fetching %s version %s (No sufficient installed version was found)", tool_name, version_as_string); @@ -173,21 +204,37 @@ namespace vcpkg expected_downloaded_path.u8string(), actual_downloaded_path.u8string()); return actual_downloaded_path; +#else + if (!fs.exists(tool_data.downloaded_path)) + { + auto code = System::cmd_execute( + Strings::format(R"(curl '%s' --create-dirs --output '%s')", tool_data.url, tool_data.downloaded_path)); + Checks::check_exit(VCPKG_LINE_INFO, code == 0, "curl failed while downloading %s", tool_data.url); + } + auto code = System::cmd_execute( + Strings::format(R"(cd '%s' && tar xzf '%s')", paths.downloads, tool_data.downloaded_path)); + Checks::check_exit(VCPKG_LINE_INFO, code == 0, "tar failed while extracting %s", tool_data.downloaded_path); + + Checks::check_exit(VCPKG_LINE_INFO, + fs.exists(tool_data.downloaded_exe_path), + "Expected %s to exist after extracting", + tool_data.downloaded_exe_path); + + return tool_data.downloaded_exe_path; +#endif } static fs::path get_cmake_path(const VcpkgPaths& paths) { -#if defined(_WIN32) + std::vector candidate_paths; +#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "cmake"); + candidate_paths.push_back(TOOL_DATA.downloaded_exe_path); #else static const ToolData TOOL_DATA = ToolData{{3, 5, 1}, ""}; #endif static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - std::vector candidate_paths; -#if defined(_WIN32) - candidate_paths.push_back(TOOL_DATA.downloaded_exe_path); -#endif const std::vector from_path = Files::find_from_PATH("cmake"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); @@ -203,7 +250,7 @@ namespace vcpkg return *p; } - return fetch_tool(paths.scripts, "cmake", TOOL_DATA); + return fetch_tool(paths, "cmake", TOOL_DATA); } static fs::path get_7za_path(const VcpkgPaths& paths) @@ -212,7 +259,7 @@ namespace vcpkg static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "7zip"); if (!paths.get_filesystem().exists(TOOL_DATA.downloaded_exe_path)) { - return fetch_tool(paths.scripts, "7zip", TOOL_DATA); + return fetch_tool(paths, "7zip", TOOL_DATA); } return TOOL_DATA.downloaded_exe_path; #else @@ -235,7 +282,7 @@ namespace vcpkg return *p; } - return fetch_tool(paths.scripts, "nuget", TOOL_DATA); + return fetch_tool(paths, "nuget", TOOL_DATA); } static fs::path get_git_path(const VcpkgPaths& paths) @@ -266,7 +313,7 @@ namespace vcpkg return *p; } - return fetch_tool(paths.scripts, "git", TOOL_DATA); + return fetch_tool(paths, "git", TOOL_DATA); } static fs::path get_ifw_installerbase_path(const VcpkgPaths& paths) @@ -292,7 +339,7 @@ namespace vcpkg return *p; } - return fetch_tool(paths.scripts, "installerbase", TOOL_DATA); + return fetch_tool(paths, "installerbase", TOOL_DATA); } Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir, const std::string& default_vs_path) -- cgit v1.2.3 From ccd362f9e8637066d9f07d2a43c563eeabfc554d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Mar 2018 07:58:55 -0700 Subject: [yaml-cpp] Revert accidental version bump --- ports/yaml-cpp/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/yaml-cpp/CONTROL b/ports/yaml-cpp/CONTROL index bec9b7e13..1e2d0e5c9 100644 --- a/ports/yaml-cpp/CONTROL +++ b/ports/yaml-cpp/CONTROL @@ -1,3 +1,3 @@ Source: yaml-cpp -Version: 0.6.2-1 +Version: 0.6.2 Description: yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec. -- cgit v1.2.3 From c80650593399fb2dddc9dff74016f3c5f3e29b28 Mon Sep 17 00:00:00 2001 From: pravic Date: Thu, 22 Mar 2018 18:01:42 +0300 Subject: [sciter] Update to 4.1.4.5838 (#3110) --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 23a588b37..e81549a8a 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.1.3 +Version: 4.1.4 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index b6f1685a1..ca48f53c3 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,8 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION 9ba9e27690e9ef4e97f415822fb738e0f36c574e) -set(SCITER_SHA d4e7d204b67e454ba753524fb1d61887fcaeae256abb81297afc0aa7795f1acb21754ef368700dfa919717f23ca1bbb16498de1ad84c94ac7c2fc295f67f91c8) +set(SCITER_REVISION eb0d385af8f426788870cc75522379f67854799c) +set(SCITER_SHA b785f370b27f759e0bec370f413c85b21d82a7cb76b3cbaa50c885b713453a325ff7ace042e263fafec7695c50370bb589597a9877816716bae9a4b4479f54fe) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From 1f62b32641045fe377ee80ff1854a785344687d2 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Mar 2018 10:01:12 -0700 Subject: [vcpkg] Sort abi tags to ensure stability --- toolsrc/include/vcpkg/build.h | 5 +++++ toolsrc/src/vcpkg/build.cpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 8c4d7b575..1c22d39d8 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -209,6 +209,11 @@ namespace vcpkg::Build { std::string key; std::string value; + + bool operator<(const AbiEntry& other) const + { + return key < other.key || (key == other.key && value < other.value); + } }; struct AbiTagAndFile diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index ebded2736..953e77460 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -449,6 +449,8 @@ namespace vcpkg::Build if (config.build_package_options.use_head_version == UseHeadVersion::YES) abi_tag_entries.emplace_back(AbiEntry{"head", ""}); + Util::sort(abi_tag_entries); + std::string full_abi_info = Strings::join("", abi_tag_entries, [](const AbiEntry& p) { return p.key + " " + p.value + "\n"; }); -- cgit v1.2.3 From 637c9bc0f012e402f5cff5e5f9ac1ca993f89ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Thu, 22 Mar 2018 22:28:17 +0100 Subject: [vcpkg] Fix setting exePath in fetchTool (#3114) --- scripts/fetchTool.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 86174ee19..ff9b5d9bf 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -25,7 +25,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) throw "Unkown tool $tool" } - $exePath = "$downloadsDir\$($toolData.exeRelativePath)" + $exePath = "$downloadsDir\$(@($toolData.exeRelativePath)[0])" if (Test-Path $exePath) { -- cgit v1.2.3 From bc4fd2653bba4b22b2a9b94a5f22ee0e253413b5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 22 Mar 2018 16:46:52 -0700 Subject: Improve warning message about Powershell 5.1 --- scripts/VcpkgPowershellUtils.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 82718ecdc..d9c9e3760 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -140,7 +140,7 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, { Write-Warning "Github has dropped support for TLS versions prior to 1.2, which is not available on your system" Write-Warning "Please manually download $url to $downloadPath" - Write-Warning "To solve this issue for future downloads, you can also install PowerShell 5.1+" + Write-Warning "To solve this issue for future downloads, you can also install Windows Management Framework 5.1+" throw "Download failed" } } -- cgit v1.2.3 From b06e3f3c95a091d434fe799d3a6bb2c684deea52 Mon Sep 17 00:00:00 2001 From: Pavel Kisliak <37534137+PavelKisliak@users.noreply.github.com> Date: Fri, 23 Mar 2018 08:49:42 +0300 Subject: Add new package - BitSerializer (#3111) --- ports/bitserializer/CONTROL | 4 ++++ ports/bitserializer/portfile.cmake | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 ports/bitserializer/CONTROL create mode 100644 ports/bitserializer/portfile.cmake diff --git a/ports/bitserializer/CONTROL b/ports/bitserializer/CONTROL new file mode 100644 index 000000000..95e36f5b9 --- /dev/null +++ b/ports/bitserializer/CONTROL @@ -0,0 +1,4 @@ +Source: bitserializer +Version: 0.7 +Build-Depends: cpprestsdk +Description: The library for simple serialization of arbitrary C++ types to various output formats (currently just supported JSON based on CppRestSDK). diff --git a/ports/bitserializer/portfile.cmake b/ports/bitserializer/portfile.cmake new file mode 100644 index 000000000..5e59f0c71 --- /dev/null +++ b/ports/bitserializer/portfile.cmake @@ -0,0 +1,13 @@ +include(vcpkg_common_functions) +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO Pavel_Kisliak/BitSerializer + REF 0.7 + SHA512 3a50b1b3077115f60d298f4257ae6a5a350c1d8b3d575af83b4f0746757ab3393da7c81ac9c7db4e30540fe94f1742b1d39de724b2dec080faf727b885bb19a4 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bitserializer RENAME copyright) -- cgit v1.2.3 From b00aa49657622862670a9c39a497f8455f57986f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Mar 2018 23:03:28 -0700 Subject: [catch2] Use upstream github repo, which also generates cmake config targets. --- ports/catch2/CONTROL | 2 +- ports/catch2/portfile.cmake | 36 ++++++++++++++++++++++++------------ 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL index 7300079fc..faa5f0574 100644 --- a/ports/catch2/CONTROL +++ b/ports/catch2/CONTROL @@ -1,4 +1,4 @@ Source: catch2 -Version: 2.2.1 +Version: 2.2.1-1 Description: A modern, header-only test framework for unit testing. Issues, PRs and changelogs can be found at https://github.com/catchorg/Catch2 diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake index ebb26c40d..65a38d8f0 100644 --- a/ports/catch2/portfile.cmake +++ b/ports/catch2/portfile.cmake @@ -1,18 +1,30 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v2.2.1) - -vcpkg_download_distfile(HEADER - URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" - FILENAME "catchorg-catch2-${CATCH_VERSION}.hpp" - SHA512 89f707e667fabf1cc2be43b2ccf046a59007c68b8e4b37dde6799a960e57a9cdd1542289b83631ee6e450e22bf46cba477308ec872c1d0261c3bd4c218ab76fc +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO catchorg/Catch2 + REF v2.2.1 + SHA512 48d3a0384dcd19fe622c4fda51639be36c904aaff77f5857615010c57e69d8e9f1deb2156e3e4882a592fe260d2bae0efa3cd02c2a2cabe07d9f9db09051a6b0 + HEAD_REF master ) -vcpkg_download_distfile(LICENSE - URLS "https://raw.githubusercontent.com/catchorg/Catch2/${CATCH_VERSION}/LICENSE.txt" - FILENAME "catchorg-catch2-LICENSE-${CATCH_VERSION}.txt" - SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DCATCH_BUILD_EXAMPLES=OFF ) -file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME catch.hpp) -file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch2 RENAME copyright) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Catch2 TARGET_PATH share/catch2) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/catch/catch.hpp) + message(FATAL_ERROR "Main includes have moved. Please update the forwarder.") +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/include/catch.hpp "#include ") +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch2 RENAME copyright) -- cgit v1.2.3 From 651fc946512d8a3bbfc992dd2c5a6935a9a7bfeb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Mar 2018 06:52:20 -0700 Subject: [mpark-variant] Initial commit of v1.3.0 --- ports/mpark-variant/CONTROL | 3 +++ ports/mpark-variant/portfile.cmake | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 ports/mpark-variant/CONTROL create mode 100644 ports/mpark-variant/portfile.cmake diff --git a/ports/mpark-variant/CONTROL b/ports/mpark-variant/CONTROL new file mode 100644 index 000000000..d6cbf380e --- /dev/null +++ b/ports/mpark-variant/CONTROL @@ -0,0 +1,3 @@ +Source: mpark-variant +Version: 1.3.0 +Description: an implementation of C++17 std::variant for C++11/14/17. diff --git a/ports/mpark-variant/portfile.cmake b/ports/mpark-variant/portfile.cmake new file mode 100644 index 000000000..b400507ee --- /dev/null +++ b/ports/mpark-variant/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mpark/variant + REF v1.3.0 + SHA512 53735d14a9b241d93191fa3b7ac8ed8fb17a8f8766318b2817c4dd1948088377190ca168027a297bae41bb2cc1f6043fe51752d43b8c33badcc9f2df9fa08ece + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/mpark_variant TARGET_PATH share/mpark_variant) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpark-variant RENAME copyright) -- cgit v1.2.3 From 8d8e676711d63537dfd1638504798da0786da577 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Mar 2018 09:42:18 -0700 Subject: [azmq] Initial commit of 1.0.2 --- ports/azmq/CONTROL | 6 ++++++ ports/azmq/portfile.cmake | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ports/azmq/CONTROL create mode 100644 ports/azmq/portfile.cmake diff --git a/ports/azmq/CONTROL b/ports/azmq/CONTROL new file mode 100644 index 000000000..350bee266 --- /dev/null +++ b/ports/azmq/CONTROL @@ -0,0 +1,6 @@ +Source: azmq +Version: 1.0.2 +Build-Depends: boost-asio, boost-assert, boost-config, boost-container, boost-format, boost-intrusive, boost-iterator, boost-lexical-cast, boost-logic, boost-optional, boost-random, boost-range, boost-regex, boost-system, boost-thread, boost-utility, zeromq +Description: Boost Asio style bindings for ZeroMQ + This library is built on top of ZeroMQ's standard C interface and is intended to work well with C++ applications which use the Boost libraries in general, and Asio in particular. + The main abstraction exposed by the library is azmq::socket which provides an Asio style socket interface to the underlying zeromq socket and interfaces with Asio's io_service(). The socket implementation participates in the io_service's reactor for asynchronous IO and may be freely mixed with other Asio socket types (raw TCP/UDP/Serial/etc.). diff --git a/ports/azmq/portfile.cmake b/ports/azmq/portfile.cmake new file mode 100644 index 000000000..867b688ee --- /dev/null +++ b/ports/azmq/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeromq/azmq + REF v1.0.2 + SHA512 6e60a670d070ddf84dbd406e88225ff12f84ce39e0e64e9aff4314e174506c286d72cfebb5e2e51eab221f6e163a17cce539d052cea3c18954ec495b096f087b + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/azmq DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +file(INSTALL + ${SOURCE_PATH}/LICENSE-BOOST_1_0 + DESTINATION ${CURRENT_PACKAGES_DIR}/share/azmq RENAME copyright) -- cgit v1.2.3 From a6866d477d0970766b985d07ec2771a8b58b385b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 22 Mar 2018 14:05:23 -0700 Subject: [opengl] If-def on Windows vs other --- ports/opengl/portfile.cmake | 78 ++++++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/ports/opengl/portfile.cmake b/ports/opengl/portfile.cmake index 3fcca32da..80df4ae74 100644 --- a/ports/opengl/portfile.cmake +++ b/ports/opengl/portfile.cmake @@ -1,47 +1,51 @@ include(vcpkg_common_functions) -vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) -vcpkg_get_windows_sdk(WINDOWS_SDK) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) + vcpkg_get_windows_sdk(WINDOWS_SDK) -if (WINDOWS_SDK MATCHES "10.") - set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") - set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") - set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") -elseif(WINDOWS_SDK MATCHES "8.") - set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") - set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") - set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um") -else() - message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") -endif() + if (WINDOWS_SDK MATCHES "10.") + set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") + set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") + set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") + elseif(WINDOWS_SDK MATCHES "8.") + set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") + set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") + set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um") + else() + message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") + endif() -if (NOT EXISTS "${LIBGLFILEPATH}") - message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBGLFILEPATH}") -endif() + if (NOT EXISTS "${LIBGLFILEPATH}") + message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBGLFILEPATH}") + endif() -if (NOT EXISTS "${LIBGLUFILEPATH}") - message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBGLUFILEPATH}") -endif() + if (NOT EXISTS "${LIBGLUFILEPATH}") + message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBGLUFILEPATH}") + endif() -file(MAKE_DIRECTORY - ${CURRENT_PACKAGES_DIR}/include/gl - ${CURRENT_PACKAGES_DIR}/lib - ${CURRENT_PACKAGES_DIR}/debug/lib - ${CURRENT_PACKAGES_DIR}/share/opengl -) + file(MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/include/gl + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug/lib + ${CURRENT_PACKAGES_DIR}/share/opengl + ) -file(COPY - "${HEADERSPATH}\\gl\\GL.h" - "${HEADERSPATH}\\gl\\GLU.h" - DESTINATION ${CURRENT_PACKAGES_DIR}/include/gl + file(COPY + "${HEADERSPATH}\\gl\\GL.h" + "${HEADERSPATH}\\gl\\GLU.h" + DESTINATION ${CURRENT_PACKAGES_DIR}/include/gl ) -file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -if (WINDOWS_SDK MATCHES "10.") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license") -elseif(WINDOWS_SDK MATCHES "8.") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") + if (WINDOWS_SDK MATCHES "10.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license") + elseif(WINDOWS_SDK MATCHES "8.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") + endif() +else() + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) endif() -- cgit v1.2.3 From 3d634005fb177457278f99619d98e51d958b7fc4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Mar 2018 10:14:07 -0700 Subject: [qt5-quickcontrols] Depend on qt5-declarative --- ports/qt5-quickcontrols/CONTROL | 4 ++-- ports/qt5-quickcontrols2/CONTROL | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/qt5-quickcontrols/CONTROL b/ports/qt5-quickcontrols/CONTROL index 64806cdca..1d77861b6 100644 --- a/ports/qt5-quickcontrols/CONTROL +++ b/ports/qt5-quickcontrols/CONTROL @@ -1,4 +1,4 @@ Source: qt5-quickcontrols -Version: 5.9.2-0 +Version: 5.9.2-1 Description: Qt5 QuickControls Module. -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-quickcontrols2/CONTROL b/ports/qt5-quickcontrols2/CONTROL index c600ed225..b46022a10 100644 --- a/ports/qt5-quickcontrols2/CONTROL +++ b/ports/qt5-quickcontrols2/CONTROL @@ -1,4 +1,4 @@ Source: qt5-quickcontrols2 -Version: 5.9.2-0 +Version: 5.9.2-1 Description: Qt5 QuickControls2 Module. -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative -- cgit v1.2.3 From 0167d4f917c7c49ed2041f499bbab6e28fcc9168 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 22 Mar 2018 04:38:03 -0700 Subject: [cctz][abseil] Require c++14 internally --- ports/abseil/CMakeLists.txt | 4 +++- ports/abseil/portfile.cmake | 5 ++--- ports/cctz/CMakeLists.txt | 2 ++ ports/cctz/portfile.cmake | 3 +-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ports/abseil/CMakeLists.txt b/ports/abseil/CMakeLists.txt index c30f75e32..ced5b14ca 100644 --- a/ports/abseil/CMakeLists.txt +++ b/ports/abseil/CMakeLists.txt @@ -3,6 +3,8 @@ project(abseil CXX) add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN) +set(CMAKE_CXX_STANDARD 14) + set(CMAKE_DEBUG_POSTFIX d) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) @@ -90,4 +92,4 @@ install( FILE unofficial-abseil-config.cmake NAMESPACE unofficial::abseil:: DESTINATION share/unofficial-abseil -) \ No newline at end of file +) diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 46b665a14..7f8f28798 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,7 +7,7 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 506fb4b56a339314fde23802bd749dbc3b3c1c79 + REF 506fb4b56a339314fde23802bd749dbc3b3c1c79 SHA512 a67d51afcf4446d2c5f27258174dd012e4c15ee1f69eb074770d4f5af335e661b1cafa6b46f6b61b9f7ff0379e7822a03c6d55096dc78a13e554688a8872ebf8 HEAD_REF master ) @@ -21,8 +21,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-abseil) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/abseil ${CURRENT_PACKAGES_DIR}/share/unofficial-abseil) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-abseil TARGET_PATH share/unofficial-abseil) file(GLOB_RECURSE HEADERS ${CURRENT_PACKAGES_DIR}/include/*) foreach(FILE ${HEADERS}) diff --git a/ports/cctz/CMakeLists.txt b/ports/cctz/CMakeLists.txt index 99322d05e..af557830c 100644 --- a/ports/cctz/CMakeLists.txt +++ b/ports/cctz/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 3.8) project(cctz CXX) +set(CMAKE_CXX_STANDARD 14) + set(CMAKE_DEBUG_POSTFIX d) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) diff --git a/ports/cctz/portfile.cmake b/ports/cctz/portfile.cmake index 5760e7672..d243e1e65 100644 --- a/ports/cctz/portfile.cmake +++ b/ports/cctz/portfile.cmake @@ -20,8 +20,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cctz) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cctz ${CURRENT_PACKAGES_DIR}/share/unofficial-cctz) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cctz TARGET_PATH share/unofficial-cctz) vcpkg_copy_pdbs() -- cgit v1.2.3 From ca154ffb79b03413f38cac3d24707e0d17262ff5 Mon Sep 17 00:00:00 2001 From: ambroise Date: Thu, 25 Jan 2018 23:14:43 +0100 Subject: Initialize project Rajout de fmem de Ambrou en version 1.0 Mise en place de fmem Use original reposotory Cleanup cmake file Add gherkin-c port in vcpkg Microsoft tool Use original reposotory [fmem][gherkin-c] Fill in version. Remove cucumber-cpp. --- ports/fmem/CONTROL | 3 +++ ports/fmem/portfile.cmake | 25 +++++++++++++++++++++++++ ports/gherkin-c/CONTROL | 3 +++ ports/gherkin-c/portfile.cmake | 23 +++++++++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 ports/fmem/CONTROL create mode 100644 ports/fmem/portfile.cmake create mode 100644 ports/gherkin-c/CONTROL create mode 100644 ports/gherkin-c/portfile.cmake diff --git a/ports/fmem/CONTROL b/ports/fmem/CONTROL new file mode 100644 index 000000000..25f24652a --- /dev/null +++ b/ports/fmem/CONTROL @@ -0,0 +1,3 @@ +Source: fmem +Version: c-libs-2ccee3d2fb +Description: A cross-platform library for opening memory-backed libc streams. diff --git a/ports/fmem/portfile.cmake b/ports/fmem/portfile.cmake new file mode 100644 index 000000000..b3b5faa83 --- /dev/null +++ b/ports/fmem/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO c-libs/fmem + REF 2ccee3d2fb2fc72370a9bb2131bfc9167e0d9022 + SHA512 4a63332eb5df7f30bdad9e4233171b5c21dd2b092e525e9dcc4f602295ffff50c555c80fd74d964bc3daeffd8001a9b852f1769ef3161259dd8a3cae3ca3a4df + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fmem RENAME copyright) diff --git a/ports/gherkin-c/CONTROL b/ports/gherkin-c/CONTROL new file mode 100644 index 000000000..171dedae0 --- /dev/null +++ b/ports/gherkin-c/CONTROL @@ -0,0 +1,3 @@ +Source: gherkin-c +Version: c-libs-e63e83104b +Description: Gherkin parser/compiler in C diff --git a/ports/gherkin-c/portfile.cmake b/ports/gherkin-c/portfile.cmake new file mode 100644 index 000000000..f229ba836 --- /dev/null +++ b/ports/gherkin-c/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO c-libs/gherkin-c + REF e63e83104b835e217140e9dc77d9ce2bb50f234e + SHA512 a99b3f695257b45df8ff7b8ec46bff28991cf2b9bc51a25247550471c724bd14ee64340db684f096131f47d7f4ff278d23dda546e7dfe29134bbc1dbccaf0d1e + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_GHERKIN_TESTS=OFF +) +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gherkin-c RENAME copyright) -- cgit v1.2.3 From 55e385952df99bed38c5a053999e73aa1113d92a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Mar 2018 10:47:26 -0700 Subject: [graphite2] Patch out test executable. Fixes #3102. --- ports/graphite2/disable-tests-docs.patch | 19 +++++++++++++++++++ ports/graphite2/portfile.cmake | 12 ++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 ports/graphite2/disable-tests-docs.patch diff --git a/ports/graphite2/disable-tests-docs.patch b/ports/graphite2/disable-tests-docs.patch new file mode 100644 index 000000000..ff92caa16 --- /dev/null +++ b/ports/graphite2/disable-tests-docs.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3466c5f..6d5c6bd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -63,9 +63,13 @@ endif (GRAPHITE2_VM_TYPE STREQUAL "direct" AND NOT (CMAKE_COMPILER_IS_GNUCXX OR + message(STATUS "Using vm machine type: ${GRAPHITE2_VM_TYPE}") + + add_subdirectory(src) ++if(NOT DISABLE_TESTS) + add_subdirectory(tests) ++endif() ++if(NOT DISABLE_DOCS) + add_subdirectory(doc) +-if (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) ++endif() ++if (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE) AND NOT DISABLE_TESTS) + add_subdirectory(gr2fonttest) + endif (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE)) + diff --git a/ports/graphite2/portfile.cmake b/ports/graphite2/portfile.cmake index 000817449..eb017e9d8 100644 --- a/ports/graphite2/portfile.cmake +++ b/ports/graphite2/portfile.cmake @@ -9,16 +9,24 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable-tests-docs.patch" +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DDISABLE_TESTS=ON + -DDISABLE_DOCS=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() -# file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/gr2fonttest.exe) -# file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/gr2fonttest.exe) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/graphite2) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -- cgit v1.2.3 From 7a1bc577c53c6c513c03cea6ef582af2055beebd Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Mar 2018 10:55:04 -0700 Subject: [sqlite-orm] Initial commit of 1.1 --- ports/sqlite-orm/CONTROL | 4 ++++ ports/sqlite-orm/portfile.cmake | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 ports/sqlite-orm/CONTROL create mode 100644 ports/sqlite-orm/portfile.cmake diff --git a/ports/sqlite-orm/CONTROL b/ports/sqlite-orm/CONTROL new file mode 100644 index 000000000..893a0dfe9 --- /dev/null +++ b/ports/sqlite-orm/CONTROL @@ -0,0 +1,4 @@ +Source: sqlite-orm +Version: 1.1 +Build-Depends: sqlite3 +Description: SQLite ORM light header only library for modern C++ diff --git a/ports/sqlite-orm/portfile.cmake b/ports/sqlite-orm/portfile.cmake new file mode 100644 index 000000000..876bbd0e3 --- /dev/null +++ b/ports/sqlite-orm/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fnc12/sqlite_orm + REF v1.1 + SHA512 ebd3c956660b90b1ea64420374db009c68cbab1edd3694d15e953c968190c066e084934327dcf674bcea31e23b14d32c54af7e9ba54f7c6036c3e7cb7cdc6c8d + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/sqlite_orm DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlite-orm RENAME copyright) -- cgit v1.2.3 From 7c6dc9543d13bd4793cd9051f876666c6bb370c0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 22 Mar 2018 15:52:11 -0700 Subject: [cpprestsdk] Use new syntax in CONTROL --- ports/cpprestsdk/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index 663781d40..7e6dbc0d1 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,5 @@ Source: cpprestsdk -Version: 2.10.2 -Build-Depends: zlib, openssl (windows), boost-system (windows), boost-date-time (windows), boost-regex (windows), websocketpp (windows) +Version: 2.10.2-1 +Build-Depends: zlib, openssl (!uwp), boost-system (!uwp), boost-date-time (!uwp), boost-regex (!uwp), websocketpp (!uwp), boost-thread (!uwp&!windows), boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!windows) Description: C++11 JSON, REST, and OAuth library The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. -- cgit v1.2.3 From 0595f955cc7bdecb807ab3d04404298a805ec4b6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Mar 2018 06:53:43 -0700 Subject: [paho-mqtt][cfitsio][ccfits] Reduce conflicts in headers (unistd.h, etc) --- ports/ccfits/CONTROL | 2 +- ports/ccfits/portfile.cmake | 33 +++++++++++++-------------------- ports/cfitsio/CONTROL | 2 +- ports/cfitsio/portfile.cmake | 17 +++++++++++------ ports/paho-mqtt/CONTROL | 4 ++-- ports/paho-mqtt/portfile.cmake | 3 +-- 6 files changed, 29 insertions(+), 32 deletions(-) diff --git a/ports/ccfits/CONTROL b/ports/ccfits/CONTROL index 16b36bc8a..5cd10f63d 100644 --- a/ports/ccfits/CONTROL +++ b/ports/ccfits/CONTROL @@ -1,4 +1,4 @@ Source: ccfits -Version: 2.5-1 +Version: 2.5-2 Description: CCfits is an object oriented interface to the cfitsio library. It is designed to make the capabilities of cfitsio available to programmers working in C++. Build-Depends: cfitsio diff --git a/ports/ccfits/portfile.cmake b/ports/ccfits/portfile.cmake index 6bd9bd170..6aeecfd62 100644 --- a/ports/ccfits/portfile.cmake +++ b/ports/ccfits/portfile.cmake @@ -1,19 +1,6 @@ -# 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) #removes current source to prevent static builds from using patched source code -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/CCfits) -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/CCfits-2.5.tar.gz.extracted) +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CCfits) @@ -31,18 +18,16 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) ) endif() - 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 + PREFER_NINJA + OPTIONS + -DCFITSIO_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/cfitsio ) vcpkg_install_cmake() -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/CCfits.dll ${CURRENT_PACKAGES_DIR}/bin/CCfits.dll) @@ -52,5 +37,13 @@ endif() # Remove duplicate include files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Patch installed headers to look in the correct subdirectory +file(GLOB HEADERS ${CURRENT_PACKAGES_DIR}/include/CCfits/*) +foreach(HEADER IN LISTS HEADERS) + file(READ "${HEADER}" _contents) + string(REPLACE "\"fitsio.h\"" "\"cfitsio/fitsio.h\"" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") +endforeach() + # Handle copyright file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccfits RENAME copyright) diff --git a/ports/cfitsio/CONTROL b/ports/cfitsio/CONTROL index b25eb8026..7c50b295d 100644 --- a/ports/cfitsio/CONTROL +++ b/ports/cfitsio/CONTROL @@ -1,3 +1,3 @@ Source: cfitsio -Version: 3.410-1 +Version: 3.410-2 Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format diff --git a/ports/cfitsio/portfile.cmake b/ports/cfitsio/portfile.cmake index 2490beb80..e9caf61d1 100644 --- a/ports/cfitsio/portfile.cmake +++ b/ports/cfitsio/portfile.cmake @@ -15,14 +15,19 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Remove duplicate include files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/unistd.h) + +# cfitsio uses very common names for its headers, so they must be moved to a subdirectory +file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/cfitsio) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/cfitsio ${CURRENT_PACKAGES_DIR}/include/cfitsio) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - # move DLLs to bin directories for dynamic builds - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/bin/cfitsio.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/debug/bin/cfitsio.dll) + # move DLLs to bin directories for dynamic builds + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/bin/cfitsio.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/debug/bin/cfitsio.dll) endif() # Handle copyright diff --git a/ports/paho-mqtt/CONTROL b/ports/paho-mqtt/CONTROL index cefd6bb87..1acf080ff 100644 --- a/ports/paho-mqtt/CONTROL +++ b/ports/paho-mqtt/CONTROL @@ -1,4 +1,4 @@ Source: paho-mqtt -Version: 1.2.0-2 -Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things +Version: 1.2.0-3 +Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things Build-Depends: openssl diff --git a/ports/paho-mqtt/portfile.cmake b/ports/paho-mqtt/portfile.cmake index 3d0fc12e9..19629b92c 100644 --- a/ports/paho-mqtt/portfile.cmake +++ b/ports/paho-mqtt/portfile.cmake @@ -48,7 +48,6 @@ file(GLOB DEBUG_LIBS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" ) -file(GLOB HEADERS "${SOURCE_PATH}/*/*.h") if(DLLS) file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) endif() @@ -61,7 +60,7 @@ endif() if(DEBUG_LIBS) file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) endif() -file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/src/MQTTAsync.h ${SOURCE_PATH}/src/MQTTClient.h ${SOURCE_PATH}/src/MQTTClientPersistence.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -- cgit v1.2.3 From 7223ab50c128f2311c8e01d2991c0dab8afbd83a Mon Sep 17 00:00:00 2001 From: Guillaume Truchot Date: Fri, 23 Mar 2018 23:59:43 +0100 Subject: Add librsync port (#3119) * Add librsync port * [librsync] Fix missing close paren --- ports/librsync/CONTROL | 3 +++ ports/librsync/portfile.cmake | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 ports/librsync/CONTROL create mode 100644 ports/librsync/portfile.cmake diff --git a/ports/librsync/CONTROL b/ports/librsync/CONTROL new file mode 100644 index 000000000..b51be6105 --- /dev/null +++ b/ports/librsync/CONTROL @@ -0,0 +1,3 @@ +Source: librsync +Version: 2.0.2 +Description: librsync is a library for calculating and applying network deltas, with an interface designed to ease integration into diverse network applications. diff --git a/ports/librsync/portfile.cmake b/ports/librsync/portfile.cmake new file mode 100644 index 000000000..0f9cfad55 --- /dev/null +++ b/ports/librsync/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO librsync/librsync + REF v2.0.2 + SHA512 5d2bc1d62b37e9ed7416203615d0a0e3c05c4c884b5da63eda10dd5c985845b500331bce226e4d45676729382c85b41528282e25d491afda31ba434ac0fefad7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_RDIFF:BOOL=OFF + -DENABLE_COMPRESSION:BOOL=OFF + -DENABLE_TRACE:BOOL=OFF + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS:BOOL=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/rsync.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/rsync.dll ${CURRENT_PACKAGES_DIR}/bin/rsync.dll) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll ${CURRENT_PACKAGES_DIR}/debug/bin/rsync.dll) +endif() + +file(INSTALL + ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/librsync RENAME copyright +) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 6c690a22837bff0804e7ea4c9b2934cf97cd2211 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Mar 2018 16:23:37 -0700 Subject: [vcpkg-configure-cmake] Set CMAKE_INSTALL_LIBDIR as type string to avoid CMake forming an absolute path --- scripts/cmake/vcpkg_configure_cmake.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 5fa42cb11..4ab02f710 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -180,8 +180,8 @@ function(vcpkg_configure_cmake) "-DVCPKG_C_FLAGS_DEBUG=${VCPKG_C_FLAGS_DEBUG}" "-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}" "-DVCPKG_LINKER_FLAGS=${VCPKG_LINKER_FLAGS}" - "-DCMAKE_INSTALL_LIBDIR=lib" - "-DCMAKE_INSTALL_BINDIR=bin" + "-DCMAKE_INSTALL_LIBDIR:STRING=lib" + "-DCMAKE_INSTALL_BINDIR:STRING=bin" ) if(DEFINED ARCH) -- cgit v1.2.3 From 15cb53b9ddd2d86fa9b7c5cdfc67b04ee87ac884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nagy-Egri=20M=C3=A1t=C3=A9=20Ferenc?= Date: Sat, 24 Mar 2018 00:24:04 +0100 Subject: Add port: PLplot (#3117) * Initial commit - added plplot files * Added INTERFACE_INCLUDE_DIRECTORY to libplplot * Fix installation layout * Static linkage of plotting drivers (no need for PATH) * .patch file instead of overwrite * [plplot] Improve handling of cmake scripts. Avoid DLLS_WITHOUT_LIBS. Disable unused dependencies and require some. --- ports/plplot/CONTROL | 8 +++ .../install-interface-include-directories.patch | 13 ++++ ports/plplot/portfile.cmake | 71 ++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 ports/plplot/CONTROL create mode 100644 ports/plplot/install-interface-include-directories.patch create mode 100644 ports/plplot/portfile.cmake diff --git a/ports/plplot/CONTROL b/ports/plplot/CONTROL new file mode 100644 index 000000000..c278778b0 --- /dev/null +++ b/ports/plplot/CONTROL @@ -0,0 +1,8 @@ +Source: plplot +Version: 5.13.0-1 +Build-Depends: freetype, zlib, libpng, bzip2 +Description: PLplot is a cross-platform software package for creating scientific plots whose (UTF-8) plot symbols and text are limited in practice only by what Unicode-aware system fonts are installed on a user's computer. + +Feature: wxwidgets +Build-Depends: wxwidgets +Description: plplot wxwidgets module \ No newline at end of file diff --git a/ports/plplot/install-interface-include-directories.patch b/ports/plplot/install-interface-include-directories.patch new file mode 100644 index 000000000..3e124b5d0 --- /dev/null +++ b/ports/plplot/install-interface-include-directories.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index d81b6a7..6b51809 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -181,6 +181,8 @@ include_directories( + add_library(plplot ${plplot_LIB_SRCS}) + add_dependencies(plplot plhershey-unicode.h_built) + ++target_include_directories(plplot INTERFACE $) ++ + # Deal with external libraries. + set(LIB_INSTALL_RPATH ${LIB_DIR}) + set(libplplot_LINK_LIBRARIES) diff --git a/ports/plplot/portfile.cmake b/ports/plplot/portfile.cmake new file mode 100644 index 000000000..372a59bba --- /dev/null +++ b/ports/plplot/portfile.cmake @@ -0,0 +1,71 @@ +include(vcpkg_common_functions) + +set(PLPLOT_VERSION 5.13.0) +set(PLPLOT_HASH 1d5cb5da17d4bde6d675585bff1f8dcb581719249a0b2687867e767703f8dab0870e7ea44b9549a497f4ac0141a3cabf6761c49520c0e2b26ffe581468512cbb) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/plplot-${PLPLOT_VERSION}) + +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/plplot/files/plplot/${PLPLOT_VERSION}%20Source/plplot-${PLPLOT_VERSION}.tar.gz/download" + FILENAME "plplot-${PLPLOT_VERSION}.tar.gz" + SHA512 ${PLPLOT_HASH} +) +vcpkg_extract_source_archive(${ARCHIVE}) + +set(BUILD_with_wxwidgets OFF) +if("wxwidgets" IN_LIST FEATURES) + set(BUILD_with_wxwidgets ON) +endif() + +# Patch build scripts +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/install-interface-include-directories.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_tcl=OFF + -DPL_HAVE_QHULL=OFF + -DENABLE_qt=OFF + -DPLPLOT_USE_QT5=OFF + -DENABLE_ocaml=OFF + -DPL_DOUBLE=ON + -DENABLE_wxwidgets=${ENABLE_wxwidgets} + -DPLD_wxpng=${ENABLE_wxwidgets} + -DPLD_wxwidgets=${ENABLE_wxwidgets} + -DENABLE_DYNDRIVERS=OFF + -DDATA_DIR=${CURRENT_PACKAGES_DIR}/share/plplot + OPTIONS_DEBUG + -DDRV_DIR=${CURRENT_PACKAGES_DIR}/debug/bin + OPTIONS_RELEASE + -DDRV_DIR=${CURRENT_PACKAGES_DIR}/bin +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/plplot) + +# Remove unnecessary tool +file(REMOVE + ${CURRENT_PACKAGES_DIR}/debug/bin/pltek.exe + ${CURRENT_PACKAGES_DIR}/bin/pltek.exe +) + +# Remove unwanted and duplicate directories +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include +) + +file(INSTALL + ${SOURCE_PATH}/Copyright + DESTINATION ${CURRENT_PACKAGES_DIR}/share/plplot + RENAME copyright +) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/share +) -- cgit v1.2.3 From aa57df6d6ed6d17000522492b66fc93d3f32ab86 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 23 Mar 2018 17:02:23 -0700 Subject: [ffmpeg] Fail-fast if spaces are preset in the path --- ports/ffmpeg/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 11c24ebc7..994e057b3 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -5,6 +5,11 @@ vcpkg_download_distfile(ARCHIVE FILENAME "ffmpeg-3.3.3.tar.bz2" SHA512 1cc63bf73356f4e618c0d3572a216bdf5689f10deff56b4262f6d740b0bee5a4b3eac234f45fca3d4d2da77903a507b4fba725b76d2d2070f31b6dae9e7a2dab ) + +if (${SOURCE_PATH} MATCHES " ") + message(FATAL_ERROR "Error: ffmpeg will not build with spaces in the path. Please use a directory with no spaces") +endif() + vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 69dfad795f4ffb5bec60602ec1116730027ff088 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 14 Mar 2018 16:48:18 -0700 Subject: Introduce Maps::transform_values() --- toolsrc/include/vcpkg/base/util.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index c73345719..7266fbbc6 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -29,6 +30,17 @@ namespace vcpkg::Util } } + namespace Maps + { + template + void transform_values(const std::unordered_map& container, std::unordered_map& output, Func func) + { + std::for_each(container.cbegin(), container.cend(), [&](const std::pair& p) { + output[p.first] = func(p.second); + }); + } + } + template using FmapOut = decltype(std::declval()(*begin(std::declval()))); -- cgit v1.2.3 From d5580dd330bac4d473f146e6efe3756e83a35066 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 24 Mar 2018 01:24:07 -0700 Subject: Join declaration and assignment --- toolsrc/src/vcpkg/install.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index e30a34c18..7a963c82f 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -558,16 +558,15 @@ namespace vcpkg::Install Build::CleanBuildtrees::NO, Build::CleanPackages::NO}; - // Note: action_plan will hold raw pointers to SourceControlFiles from this map - std::vector action_plan; - auto all_ports = Paragraphs::load_all_ports(paths.get_filesystem(), 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); - action_plan = create_feature_install_plan(provider, FullPackageSpec::to_feature_specs(specs), status_db); + // Note: action_plan will hold raw pointers to SourceControlFiles from this map + std::vector action_plan = + create_feature_install_plan(provider, FullPackageSpec::to_feature_specs(specs), status_db); if (!GlobalState::feature_packages) { -- cgit v1.2.3 From 3a91b0072d7500f2be84fe4d6520e8469ba5b5ad Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 24 Mar 2018 01:04:48 -0700 Subject: Fix name --- toolsrc/include/vcpkg/dependencies.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 33af6c4f5..fea0d88a9 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -175,7 +175,7 @@ namespace vcpkg::Dependencies const std::vector& specs, const StatusParagraphs& status_db); - std::vector create_feature_install_plan(const PortFileProvider& port_file_provider, + std::vector create_feature_install_plan(const PortFileProvider& provider, const std::vector& specs, const StatusParagraphs& status_db); -- cgit v1.2.3 From 0778f2ef8ec87152cc75721cb1d25b7d7db63fe4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Mar 2018 15:04:01 -0700 Subject: [parson][azure-uamqp-c][azure-umqtt-c][azure-c-shared-utility][azure-iot-sdk-c] Initial commits --- ports/azure-c-shared-utility/CONTROL | 3 + ports/azure-c-shared-utility/portfile.cmake | 40 +++++++ ports/azure-iot-sdk-c/CONTROL | 4 + ports/azure-iot-sdk-c/improve-external-deps.patch | 136 ++++++++++++++++++++++ ports/azure-iot-sdk-c/portfile.cmake | 46 ++++++++ ports/azure-uamqp-c/CONTROL | 4 + ports/azure-uamqp-c/glob-headers.patch | 14 +++ ports/azure-uamqp-c/portfile.cmake | 41 +++++++ ports/azure-uhttp-c/CONTROL | 4 + ports/azure-uhttp-c/portfile.cmake | 40 +++++++ ports/azure-umqtt-c/CONTROL | 4 + ports/azure-umqtt-c/portfile.cmake | 39 +++++++ ports/parson/CMakeLists.txt | 19 +++ ports/parson/CONTROL | 3 + ports/parson/portfile.cmake | 33 ++++++ 15 files changed, 430 insertions(+) create mode 100644 ports/azure-c-shared-utility/CONTROL create mode 100644 ports/azure-c-shared-utility/portfile.cmake create mode 100644 ports/azure-iot-sdk-c/CONTROL create mode 100644 ports/azure-iot-sdk-c/improve-external-deps.patch create mode 100644 ports/azure-iot-sdk-c/portfile.cmake create mode 100644 ports/azure-uamqp-c/CONTROL create mode 100644 ports/azure-uamqp-c/glob-headers.patch create mode 100644 ports/azure-uamqp-c/portfile.cmake create mode 100644 ports/azure-uhttp-c/CONTROL create mode 100644 ports/azure-uhttp-c/portfile.cmake create mode 100644 ports/azure-umqtt-c/CONTROL create mode 100644 ports/azure-umqtt-c/portfile.cmake create mode 100644 ports/parson/CMakeLists.txt create mode 100644 ports/parson/CONTROL create mode 100644 ports/parson/portfile.cmake diff --git a/ports/azure-c-shared-utility/CONTROL b/ports/azure-c-shared-utility/CONTROL new file mode 100644 index 000000000..efc7592c1 --- /dev/null +++ b/ports/azure-c-shared-utility/CONTROL @@ -0,0 +1,3 @@ +Source: azure-c-shared-utility +Version: 1.1.1 +Description: Azure C SDKs common code diff --git a/ports/azure-c-shared-utility/portfile.cmake b/ports/azure-c-shared-utility/portfile.cmake new file mode 100644 index 000000000..40eacaa4b --- /dev/null +++ b/ports/azure-c-shared-utility/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("azure-c-shared-utility only supports static linkage") + set(VCPKG_LIBRARY_LINKAGE "static") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-c-shared-utility + REF 1.1.1 + SHA512 859513c3bebc3cb5a9e6c0840d2b5bdb5b21b753ed846dced6f4e88f8f937bae89264da57c1bf430660417b10449914b29000b930520e5834140f63df2109b5f + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dskip_samples=ON + -Duse_installed_dependencies=ON + -Duse_default_uuid=ON + -Dbuild_as_dynamic=${BUILD_AS_DYNAMIC} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/azure_c_shared_utility) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY ${SOURCE_PATH}/configs/azure_iot_build_rules.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-c-shared-utility) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-c-shared-utility RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/azure-iot-sdk-c/CONTROL b/ports/azure-iot-sdk-c/CONTROL new file mode 100644 index 000000000..9e65dcb26 --- /dev/null +++ b/ports/azure-iot-sdk-c/CONTROL @@ -0,0 +1,4 @@ +Source: azure-iot-sdk-c +Version: 1.2.1 +Build-Depends: azure-uamqp-c, azure-umqtt-c, azure-c-shared-utility, parson +Description: A C99 SDK for connecting devices to Microsoft Azure IoT services diff --git a/ports/azure-iot-sdk-c/improve-external-deps.patch b/ports/azure-iot-sdk-c/improve-external-deps.patch new file mode 100644 index 000000000..5af7ef29e --- /dev/null +++ b/ports/azure-iot-sdk-c/improve-external-deps.patch @@ -0,0 +1,136 @@ +diff --git a/configs/azure_iot_sdksConfig.cmake b/configs/azure_iot_sdksConfig.cmake +index b9c62e8..edf5847 100644 +--- a/configs/azure_iot_sdksConfig.cmake ++++ b/configs/azure_iot_sdksConfig.cmake +@@ -1,5 +1,10 @@ + #Copyright (c) Microsoft. All rights reserved. + #Licensed under the MIT license. See LICENSE file in the project root for full license information. ++include(CMakeFindDependencyMacro) ++find_dependency(unofficial-parson) ++find_dependency(uamqp) ++find_dependency(umqtt) ++find_dependency(azure_c_shared_utility) + + include("${CMAKE_CURRENT_LIST_DIR}/azure_iot_sdksTargets.cmake") + +diff --git a/dependencies.cmake b/dependencies.cmake +index 063733a..71bfc7d 100644 +--- a/dependencies.cmake ++++ b/dependencies.cmake +@@ -18,6 +18,8 @@ if(${use_installed_dependencies}) + endif() + endif() + ++ find_package(unofficial-parson REQUIRED) ++ link_libraries(unofficial::parson::parson) + else() + add_subdirectory(c-utility) + +diff --git a/iothub_client/CMakeLists.txt b/iothub_client/CMakeLists.txt +index e6d000a..70ade26 100644 +--- a/iothub_client/CMakeLists.txt ++++ b/iothub_client/CMakeLists.txt +@@ -24,22 +24,6 @@ set(install_staticlibs + iothub_client + ) + +-add_library(parson +- ../deps/parson/parson.c +-) +- +-if(MSVC) +- set_source_files_properties(../deps/parson/parson.c PROPERTIES COMPILE_FLAGS "/wd4244 /wd4232") +-endif() +- +-set(install_staticlibs ${install_staticlibs} +- parson +-) +- +-set(iothub_client_libs ${iothub_client_libs} +- parson +-) +- + if(NOT dont_use_uploadtoblob) + set(iothub_client_ll_transport_c_files + ${iothub_client_ll_transport_c_files} +diff --git a/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt b/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt +index 161872a..d53e111 100644 +--- a/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt ++++ b/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt +@@ -31,12 +31,10 @@ set(${theseTestsName}_nuget_c_files + + set(${theseTestsName}_c_files + ../../../certs/certs.c +- ../../../deps/parson/parson.c + ) + + set(${theseTestsName}_h_files + ../../../certs/certs.h +- ../../../deps/parson/parson.h + ../common_dt_e2e/iothubclient_common_dt_e2e.h + ) + +diff --git a/iothub_client/tests/iothubclient_mqtt_dt_e2e/CMakeLists.txt b/iothub_client/tests/iothubclient_mqtt_dt_e2e/CMakeLists.txt +index d472161..b0291e8 100644 +--- a/iothub_client/tests/iothubclient_mqtt_dt_e2e/CMakeLists.txt ++++ b/iothub_client/tests/iothubclient_mqtt_dt_e2e/CMakeLists.txt +@@ -31,12 +31,10 @@ set(${theseTestsName}_nuget_c_files + + set(${theseTestsName}_c_files + ../../../certs/certs.c +- ../../../deps/parson/parson.c + ) + + set(${theseTestsName}_h_files + ../../../certs/certs.h +- ../../../deps/parson/parson.h + ../common_dt_e2e/iothubclient_common_dt_e2e.h + ) + +diff --git a/iothub_client/tests/iothubclient_mqtt_dt_e2e_sfc/CMakeLists.txt b/iothub_client/tests/iothubclient_mqtt_dt_e2e_sfc/CMakeLists.txt +index d05d654..5872c8d 100644 +--- a/iothub_client/tests/iothubclient_mqtt_dt_e2e_sfc/CMakeLists.txt ++++ b/iothub_client/tests/iothubclient_mqtt_dt_e2e_sfc/CMakeLists.txt +@@ -31,12 +31,10 @@ set(${theseTestsName}_nuget_c_files + + set(${theseTestsName}_c_files + ../../../certs/certs.c +- ../../../deps/parson/parson.c + ) + + set(${theseTestsName}_h_files + ../../../certs/certs.h +- ../../../deps/parson/parson.h + ../common_dt_e2e/iothubclient_common_dt_e2e.h + ) + +diff --git a/iothub_service_client/CMakeLists.txt b/iothub_service_client/CMakeLists.txt +index 11a9a9a..4097293 100644 +--- a/iothub_service_client/CMakeLists.txt ++++ b/iothub_service_client/CMakeLists.txt +@@ -72,9 +72,7 @@ endif() + setSdkTargetBuildProperties(iothub_service_client) + + if(NOT ${nuget_e2e_tests}) +- target_link_libraries(iothub_service_client uamqp parson) +-else() +- target_link_libraries(iothub_service_client parson) ++ target_link_libraries(iothub_service_client uamqp) + endif() + + if (NOT ${ARCHITECTURE} STREQUAL "ARM") +diff --git a/serializer/CMakeLists.txt b/serializer/CMakeLists.txt +index 0f6dc74..b4f784c 100644 +--- a/serializer/CMakeLists.txt ++++ b/serializer/CMakeLists.txt +@@ -87,10 +87,6 @@ else() + endif() + setSdkTargetBuildProperties(serializer) + +-target_link_libraries(serializer +- parson +-) +- + if (NOT ${skip_samples}) + if(WIN32) + if (NOT ${ARCHITECTURE} STREQUAL "ARM") diff --git a/ports/azure-iot-sdk-c/portfile.cmake b/ports/azure-iot-sdk-c/portfile.cmake new file mode 100644 index 000000000..b60a03286 --- /dev/null +++ b/ports/azure-iot-sdk-c/portfile.cmake @@ -0,0 +1,46 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("azure-iot-sdk-c only supports static linkage") + set(VCPKG_LIBRARY_LINKAGE "static") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-iot-sdk-c + REF 1.2.1 + SHA512 fd97283adf958d6928eda68fb76d9e5a12ef56440fb349d4feb948516150968bf34f3d1bde3341cc1116beb9ea219b0158462a9e6b89c5f7ccd56eb38d8ed2ab + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/improve-external-deps.patch +) + +file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dskip_samples=ON + -Duse_installed_dependencies=ON + -Duse_default_uuid=ON + -Dbuild_as_dynamic=${BUILD_AS_DYNAMIC} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/azure_iot_sdks) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-iot-sdk-c RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/azure-uamqp-c/CONTROL b/ports/azure-uamqp-c/CONTROL new file mode 100644 index 000000000..03b4a2402 --- /dev/null +++ b/ports/azure-uamqp-c/CONTROL @@ -0,0 +1,4 @@ +Source: azure-uamqp-c +Version: 1.0.0-pre-release-1.0.9 +Build-Depends: azure-c-shared-utility +Description: AMQP library for C diff --git a/ports/azure-uamqp-c/glob-headers.patch b/ports/azure-uamqp-c/glob-headers.patch new file mode 100644 index 000000000..245744f2b --- /dev/null +++ b/ports/azure-uamqp-c/glob-headers.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dbf79e5..aec44e5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -74,7 +74,8 @@ if(WIN32) + include_directories($ENV{OpenSSLDir}/include) + endif() + +-set(uamqp_h_files ++file(GLOB uamqp_h_files ++ ./inc/azure_uamqp_c/* + ./inc/azure_uamqp_c/amqp_definitions.h + ./inc/azure_uamqp_c/amqp_frame_codec.h + ./inc/azure_uamqp_c/amqp_management.h diff --git a/ports/azure-uamqp-c/portfile.cmake b/ports/azure-uamqp-c/portfile.cmake new file mode 100644 index 000000000..a4407963c --- /dev/null +++ b/ports/azure-uamqp-c/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("azure-uamqp-c only supports static linkage") + set(VCPKG_LIBRARY_LINKAGE "static") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-uamqp-c + REF 1.0.0-pre-release-1.0.9 + SHA512 8c7142e0f28779847501941effc8baa0d3411e76bec00a3af0a32f5e25c0ded200d1345fcea58d922d7b0e2b736bc2a57ecaaac23d4de7f97c75a22793cd3750 + HEAD_REF master +) + +vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/glob-headers.patch) + +file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dskip_samples=ON + -Duse_installed_dependencies=ON + -Dbuild_as_dynamic=${BUILD_AS_DYNAMIC} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/uamqp) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-uamqp-c RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/azure-uhttp-c/CONTROL b/ports/azure-uhttp-c/CONTROL new file mode 100644 index 000000000..3711a7dfe --- /dev/null +++ b/ports/azure-uhttp-c/CONTROL @@ -0,0 +1,4 @@ +Source: azure-uhttp-c +Version: 2018-02-09 +Build-Depends: azure-c-shared-utility +Description: Azure HTTP Library written in C diff --git a/ports/azure-uhttp-c/portfile.cmake b/ports/azure-uhttp-c/portfile.cmake new file mode 100644 index 000000000..a04290ec1 --- /dev/null +++ b/ports/azure-uhttp-c/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("azure-uhttp-c only supports static linkage") + set(VCPKG_LIBRARY_LINKAGE "static") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-uhttp-c + REF 2018-02-09 + SHA512 0668be0f7624d021b6d24e81c21c606ab4a59990eb3d83fea6d2c6cf9ea3f2c6904ad021afcf9645c3c5f2238e9b83146f36522c662b0a2626d928cb4a0218ba + HEAD_REF master +) + +file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/c-utility/configs/) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dskip_samples=ON + -Duse_installed_dependencies=ON + -Dbuild_as_dynamic=${BUILD_AS_DYNAMIC} + -DCMAKE_INSTALL_INCLUDEDIR=include +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/uhttp) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-uhttp-c RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/azure-umqtt-c/CONTROL b/ports/azure-umqtt-c/CONTROL new file mode 100644 index 000000000..79bd87b79 --- /dev/null +++ b/ports/azure-umqtt-c/CONTROL @@ -0,0 +1,4 @@ +Source: azure-umqtt-c +Version: 1.0.0-pre-release-1.0.9 +Build-Depends: azure-c-shared-utility +Description: General purpose library for communication over the mqtt protocol diff --git a/ports/azure-umqtt-c/portfile.cmake b/ports/azure-umqtt-c/portfile.cmake new file mode 100644 index 000000000..9a9002166 --- /dev/null +++ b/ports/azure-umqtt-c/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("azure-umqtt-c only supports static linkage") + set(VCPKG_LIBRARY_LINKAGE "static") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-umqtt-c + REF 1.0.0-pre-release-1.0.9 + SHA512 8cabeb431e1b8db64551c0374e80157d9db39011f38db8d3a3dfb77ddf3d6ffed4d6ee0ab697a0af3ce93571fc8a83bb2f3efa52387afe301583151e75f55658 + HEAD_REF master +) + +file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/c-utility/configs/) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_AS_DYNAMIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dskip_samples=ON + -Duse_installed_dependencies=ON + -Dbuild_as_dynamic=${BUILD_AS_DYNAMIC} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/umqtt) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-umqtt-c RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/parson/CMakeLists.txt b/ports/parson/CMakeLists.txt new file mode 100644 index 000000000..f96ed427c --- /dev/null +++ b/ports/parson/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.5) +project(parson C) + +add_library(parson parson.c) +target_include_directories(parson PUBLIC $) + +install(TARGETS parson + EXPORT unofficial-parson-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT unofficial-parson-targets + FILE unofficial-parson-config.cmake + NAMESPACE unofficial::parson:: + DESTINATION share/unofficial-parson +) diff --git a/ports/parson/CONTROL b/ports/parson/CONTROL new file mode 100644 index 000000000..47d1167a2 --- /dev/null +++ b/ports/parson/CONTROL @@ -0,0 +1,3 @@ +Source: parson +Version: 2018-03-23 +Description: a lighweight json library written in C diff --git a/ports/parson/portfile.cmake b/ports/parson/portfile.cmake new file mode 100644 index 000000000..f1028d9ee --- /dev/null +++ b/ports/parson/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("parson only supports static linkage") + set(VCPKG_LIBRARY_LINKAGE "static") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kgabis/parson + REF 387c5665f6b20faa535a7f782dcaa49390963366 + SHA512 755d1351c2176ac75bb865e83cbbd3b8f6b3a5797cccd96e512e474100fbdaacb7d00eb857ebc4478aad40672baeafdecb5d87c26eaa16f43ef5559a0a56f431 + 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() + +file(COPY ${SOURCE_PATH}/parson.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-parson TARGET_PATH share/unofficial-parson) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/parson RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 608456b3252abd688f557e85de3a8697f51d228c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Mar 2018 15:09:07 -0700 Subject: Upgrades --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/azure-c-shared-utility/CONTROL | 2 +- ports/azure-c-shared-utility/portfile.cmake | 4 ++-- ports/azure-iot-sdk-c/CONTROL | 2 +- ports/azure-iot-sdk-c/portfile.cmake | 4 ++-- ports/clara/CONTROL | 2 +- ports/clara/portfile.cmake | 4 ++-- ports/discord-rpc/CONTROL | 2 +- ports/discord-rpc/portfile.cmake | 4 ++-- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 4 ++-- 18 files changed, 27 insertions(+), 27 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index b337b7262..0c28ff456 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-03-20 +Version: 2018-03-23 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 7f8f28798..48a506710 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 506fb4b56a339314fde23802bd749dbc3b3c1c79 - SHA512 a67d51afcf4446d2c5f27258174dd012e4c15ee1f69eb074770d4f5af335e661b1cafa6b46f6b61b9f7ff0379e7822a03c6d55096dc78a13e554688a8872ebf8 + REF 4e2e6c5c0071e6430056a8ef0a6c8a1fe584d8ff + SHA512 f1daa9f7afb8727f2fd3097683bd7192b9f54536d575ce655a7440281463a3eae1bb0072f3010e74a03693b5dbca2e80e220099ae8557171055efcad70767ef1 HEAD_REF master ) diff --git a/ports/azure-c-shared-utility/CONTROL b/ports/azure-c-shared-utility/CONTROL index efc7592c1..99cbcd38d 100644 --- a/ports/azure-c-shared-utility/CONTROL +++ b/ports/azure-c-shared-utility/CONTROL @@ -1,3 +1,3 @@ Source: azure-c-shared-utility -Version: 1.1.1 +Version: 1.0.0-pre-release-1.0.9 Description: Azure C SDKs common code diff --git a/ports/azure-c-shared-utility/portfile.cmake b/ports/azure-c-shared-utility/portfile.cmake index 40eacaa4b..4635f0d97 100644 --- a/ports/azure-c-shared-utility/portfile.cmake +++ b/ports/azure-c-shared-utility/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-c-shared-utility - REF 1.1.1 - SHA512 859513c3bebc3cb5a9e6c0840d2b5bdb5b21b753ed846dced6f4e88f8f937bae89264da57c1bf430660417b10449914b29000b930520e5834140f63df2109b5f + REF 1.0.0-pre-release-1.0.9 + SHA512 df28d0bb01961943d86febd7b54bafd7037b8461b4025e1db26ba0b76c4cadfa722c4cb5695ac0d4f57e16576eb23f3da02703bcc363af54a0476bccec95ce45 HEAD_REF master ) diff --git a/ports/azure-iot-sdk-c/CONTROL b/ports/azure-iot-sdk-c/CONTROL index 9e65dcb26..8c9bdb956 100644 --- a/ports/azure-iot-sdk-c/CONTROL +++ b/ports/azure-iot-sdk-c/CONTROL @@ -1,4 +1,4 @@ Source: azure-iot-sdk-c -Version: 1.2.1 +Version: 1.0.0-pre-release-1.0.9 Build-Depends: azure-uamqp-c, azure-umqtt-c, azure-c-shared-utility, parson 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 b60a03286..e4f0d8758 100644 --- a/ports/azure-iot-sdk-c/portfile.cmake +++ b/ports/azure-iot-sdk-c/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-iot-sdk-c - REF 1.2.1 - SHA512 fd97283adf958d6928eda68fb76d9e5a12ef56440fb349d4feb948516150968bf34f3d1bde3341cc1116beb9ea219b0158462a9e6b89c5f7ccd56eb38d8ed2ab + REF 1.0.0-pre-release-1.0.9 + SHA512 972b5da73399805963031dfacc436665c1a7aaecf4a0035af369d9cf184cb4e7be608b4ca5768902dcfb04f18324c399d095f6543ff3d1da835c40da6e18934e HEAD_REF master ) diff --git a/ports/clara/CONTROL b/ports/clara/CONTROL index 0825f74e0..878313563 100644 --- a/ports/clara/CONTROL +++ b/ports/clara/CONTROL @@ -1,3 +1,3 @@ Source: clara -Version: 2018-03-11 +Version: 2018-03-23 Description: A simple to use command line parser for C++ \ No newline at end of file diff --git a/ports/clara/portfile.cmake b/ports/clara/portfile.cmake index 377eb932a..3c5108b19 100644 --- a/ports/clara/portfile.cmake +++ b/ports/clara/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO philsquared/Clara - REF 008c2ae0a52aaa485d6cb830ad54bc6466733298 - SHA512 270c5d8cdc9c833d1a95f1a2737b3db0f537ab92569b5cc1007184b9f7e59f66bbf9ba95313332826814c0b670919b31e27fe797bb3083ac5e55bad6a6051d51 + REF 3ba13ad04a3eebc002320f187475ddcd267288a3 + SHA512 d2e73d2ac70f9ad6428f434b101d413453648708d545a1a71f2363b5847e710412b69fdb9ab100eb437f9419cc4c250ce7ca56cfa9132096be9aa471dcb677d0 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/single_include/clara.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/discord-rpc/CONTROL b/ports/discord-rpc/CONTROL index 218257e6a..609460036 100644 --- a/ports/discord-rpc/CONTROL +++ b/ports/discord-rpc/CONTROL @@ -1,3 +1,3 @@ Source: discord-rpc -Version: 3.0.0 +Version: 3.1.0 Description: Rich Presence allows you to leverage the totally overhauled "Now Playing" section in a Discord user's profile to help people play your game together. diff --git a/ports/discord-rpc/portfile.cmake b/ports/discord-rpc/portfile.cmake index 88a5fc976..72709ed7c 100644 --- a/ports/discord-rpc/portfile.cmake +++ b/ports/discord-rpc/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO discordapp/discord-rpc - REF v3.0.0 - SHA512 d14ae2b33d832c456621fd0abb137450ae9d7eedf2a3d343a82f2b609da3946e501a9d8016f62b3dd0219a0eaf3c47f82d6023960608d670632939e0b35e8167 + REF v3.1.0 + SHA512 f467ac6428588b45a90eaec0786b7f0d799b5ee9e97528dd69cd1890fb4dd9c887807e845a0a1d75e19e6e1f6cb2d21c8a77d09e95f24d8df0aae04eae17a216 HEAD_REF master ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 5fd6dae7f..36c7220e5 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-03-20 +Version: 2018-03-23 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 3f2440356..80e0b1a6f 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF 59b148aee9402426e4d4cd7db5be6fa5966a68b5 - SHA512 6e7444d26594cd28d0a421b94ce8dc24b8b65cff3112014931a528235578f5cbbb9b945dff61af1d39fed97ab091aa6c5ebab6c662aada93ca5a9b0316f714f0 + REF eb61e57de031ffd8713306cae6ad431d0b84a9b5 + SHA512 078e161de8ffe1953c3215ff745954f00ef4bd5ccef4c7fb079ad67d5350a31bb8f692cb664adba889433c4e79e446dc1f31edfd9ecc8b9471faeba82ae425e6 HEAD_REF master ) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index c9a4c23a5..ba4340611 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-03-20 +Version: 2018-03-23 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index 833a34692..9c240f411 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF 94c0412a086110dc801d83c20be7cb4e89dbd5d1 - SHA512 882bce080ca15a9b789289ceda987f1154df1800fd1428cf1d14db5704caf9ed3842ec1fe345db9548fe5305aa8f8721ddd53e75294b896c8caad061d29ec95a + REF 1acb673af13e72d8ac07522a22127ffd33af65a9 + SHA512 8ee7c45d0a6c64062adec3575ea94cf0d5c8d60d9f30cf8c72051c6e9fcf030562379074f37c1f5da256cce8537078694673ed3b947a603982cdbf26c393fa4b HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 1e0037736..7e21ecce6 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-03-20 +Version: 2018-03-23 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 968a5b109..eae7f5c73 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 22bd3450c6e97e348d64fb6a75171e8ced79d1e4 - SHA512 5774fd332daac80891ac25c6188e415bf5335ffecc636dc120500f03b6ae23f9317c65dbc703cc89946a894f12c6805f396fd42e763d1e0d3ccfe6398357d321 + REF 272470790ad6db791bd6f9db399b2cd2d5879f74 + SHA512 9f9ae5d72adf1b46970f7527fe3841349c5652e4721a16967f1d9edbe4b1ecc83f146ece492234da16ed7c033b172aa49dc7f5431bcdea37286a2dc21835691e HEAD_REF master ) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index 4ea44046b..b3ec200db 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-03-20 +Version: 2018-03-23 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 062ed6b48..72165adaa 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF 15b3dccf47179a88311c84d6ef250565abd05182 - SHA512 568d315f48c194f7db3df59ecf70a6625e916a4c258a3f5ad1d7b9e5899afd6a7d825f4fb8811cb49dcd752142952a9bd6e4c31af6572373462a4821d6a1a2bd + REF c8a1c4542d13b6492949e7525f4fe8da266cac2b + SHA512 600bb2a43afb4f6e2d9a7ce8470841bcb03fc9737f17d276f52b0cf78c6f17d1cf08e2b0046ff746efa8738f33128cb51cbe63cb215937a892222f2e4895a659 HEAD_REF master ) -- cgit v1.2.3 From 7029daa36df7040e420b3722f345b6923ce93ef0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Mar 2018 09:59:42 -0700 Subject: [vcpkg] Handle non-sorted output from std::filesystem --- toolsrc/src/vcpkg/install.cpp | 4 ++-- toolsrc/src/vcpkg/paragraphs.cpp | 4 +++- toolsrc/src/vcpkg/vcpkglib.cpp | 1 + toolsrc/src/vcpkg/vcpkgpaths.cpp | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 7a963c82f..1fbf6d97e 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -70,8 +70,8 @@ namespace vcpkg::Install } const std::string filename = file.filename().u8string(); - if (fs::is_regular_file(status) && (Strings::case_insensitive_ascii_equals(filename.c_str(), "CONTROL") || - Strings::case_insensitive_ascii_equals(filename.c_str(), "BUILD_INFO"))) + if (fs::is_regular_file(status) && (Strings::case_insensitive_ascii_equals(filename, "CONTROL") || + Strings::case_insensitive_ascii_equals(filename, "BUILD_INFO"))) { // Do not copy the control file continue; diff --git a/toolsrc/src/vcpkg/paragraphs.cpp b/toolsrc/src/vcpkg/paragraphs.cpp index d0b0c0abf..41ffceec7 100644 --- a/toolsrc/src/vcpkg/paragraphs.cpp +++ b/toolsrc/src/vcpkg/paragraphs.cpp @@ -251,7 +251,9 @@ namespace vcpkg::Paragraphs LoadResults try_load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir) { LoadResults ret; - for (auto&& path : fs.get_files_non_recursive(ports_dir)) + auto port_dirs = fs.get_files_non_recursive(ports_dir); + Util::sort(port_dirs); + for (auto&& path : port_dirs) { auto maybe_spgh = try_load_port(fs, path); if (const auto spgh = maybe_spgh.get()) diff --git a/toolsrc/src/vcpkg/vcpkglib.cpp b/toolsrc/src/vcpkg/vcpkglib.cpp index 220c29720..7979fd9a5 100644 --- a/toolsrc/src/vcpkg/vcpkglib.cpp +++ b/toolsrc/src/vcpkg/vcpkglib.cpp @@ -54,6 +54,7 @@ namespace vcpkg StatusParagraphs current_status_db = load_current_database(fs, status_file, status_file_old); auto update_files = fs.get_files_non_recursive(updates_dir); + Util::sort(update_files); if (update_files.empty()) { // updates directory is empty, control file is up-to-date. diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index c36def15d..9b331d7fc 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -405,6 +405,7 @@ namespace vcpkg { output.push_back(path.stem().filename().string()); } + Util::sort(output); return output; }); -- cgit v1.2.3 From b14c1ba9088bd5b2ec88ebead50677cc6cc1a576 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 23 Mar 2018 10:01:07 -0700 Subject: [libpq][harfbuzz][qt5-base] Fix non-Windows --- ports/harfbuzz/CONTROL | 2 +- ports/harfbuzz/find-package-freetype-2.patch | 13 ++ ports/harfbuzz/find-package-freetype.patch | 13 -- ports/harfbuzz/portfile.cmake | 4 +- ports/libpq/CMakeLists.txt | 95 ++++++++++--- ports/libpq/CONTROL | 4 +- ports/libpq/pg_config.darwin.h | 191 +++++++++++++++++++++++++++ ports/libpq/pg_config.linux.h | 173 ++++++++++++++++++++++++ ports/libpq/portfile.cmake | 5 +- ports/qt5-base/configure_qt.cmake | 33 ++--- ports/qt5-base/install_qt.cmake | 29 +++- ports/qt5-base/portfile.cmake | 158 ++++++++++++++-------- 12 files changed, 611 insertions(+), 109 deletions(-) create mode 100644 ports/harfbuzz/find-package-freetype-2.patch delete mode 100644 ports/harfbuzz/find-package-freetype.patch create mode 100644 ports/libpq/pg_config.darwin.h create mode 100644 ports/libpq/pg_config.linux.h diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index f03f52187..e6cf6a8e5 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.7.6 +Version: 1.7.6-1 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, ragel, glib (windows) diff --git a/ports/harfbuzz/find-package-freetype-2.patch b/ports/harfbuzz/find-package-freetype-2.patch new file mode 100644 index 000000000..85dbbdeec --- /dev/null +++ b/ports/harfbuzz/find-package-freetype-2.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index defd5d6..03f9d4e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -267,7 +267,7 @@ set (subset_project_headers + + ## Find and include needed header folders and libraries + if (HB_HAVE_FREETYPE) +- include (FindFreetype) ++ find_package(Freetype REQUIRED) + if (NOT FREETYPE_FOUND) + message(FATAL_ERROR "HB_HAVE_FREETYPE was set, but we failed to find it. Maybe add a CMAKE_PREFIX_PATH= to your Freetype2 install prefix") + endif () diff --git a/ports/harfbuzz/find-package-freetype.patch b/ports/harfbuzz/find-package-freetype.patch deleted file mode 100644 index a556d1377..000000000 --- a/ports/harfbuzz/find-package-freetype.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 24ccb6f..21df836 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -201,7 +201,7 @@ set(project_headers - ## Find and include needed header folders and libraries - if (HB_HAVE_FREETYPE) - -- include(FindFreetype) -+ find_package(Freetype REQUIRED) - if (NOT FREETYPE_FOUND) - message(FATAL_ERROR "HB_HAVE_FREETYPE was set, but we failed to find it. Maybe add a CMAKE_PREFIX_PATH= to your Freetype2 install prefix") - endif() diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index b1c91aa91..906e42d95 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -12,10 +12,10 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch" - "${CMAKE_CURRENT_LIST_DIR}/find-package-freetype.patch" + "${CMAKE_CURRENT_LIST_DIR}/find-package-freetype-2.patch" ) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_CMAKE_SYSTEM_NAME) SET(HAVE_GLIB "OFF") SET(BUILTIN_UCDN "ON") else() diff --git a/ports/libpq/CMakeLists.txt b/ports/libpq/CMakeLists.txt index 35a67118a..57b86e255 100644 --- a/ports/libpq/CMakeLists.txt +++ b/ports/libpq/CMakeLists.txt @@ -1,41 +1,98 @@ cmake_minimum_required(VERSION 3.5) project(libpq VERSION 9.6.1 LANGUAGES C) +if(NOT CMAKE_SYSTEM_PROCESSOR) + set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR}) +endif() + find_package(OpenSSL REQUIRED) +find_program(PERL NAMES perl) + +set(CMAKE_STATIC_LIBRARY_PREFIX) +set(CMAKE_SHARED_LIBRARY_PREFIX) set(CMAKE_DEBUG_POSTFIX "d") -configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config.h) -configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config_ext.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h) -configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/port/win32.h ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_os.h) + +file(REMOVE + ${CMAKE_CURRENT_SOURCE_DIR}/src/include/pg_config.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/include/pg_config_ext.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/include/pg_config_os.h +) + +if(WIN32) + configure_file(src/include/pg_config.h.win32 include/pg_config.h) + configure_file(src/include/pg_config_ext.h.win32 include/pg_config_ext.h) + configure_file(src/include/port/win32.h include/pg_config_os.h) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h" "#include \n#define PG_INT64_TYPE int64_t") + configure_file("${PORT_DIR}/pg_config.darwin.h" include/pg_config.h COPYONLY) + configure_file(src/include/port/darwin.h include/pg_config_os.h COPYONLY) + configure_file(src/backend/port/dynloader/darwin.h include/dynloader.h COPYONLY) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h" "#include \n#define PG_INT64_TYPE int64_t") + configure_file(src/include/port/linux.h include/pg_config_os.h COPYONLY) + configure_file("${PORT_DIR}/pg_config.linux.h" include/pg_config.h COPYONLY) + configure_file(src/backend/port/dynloader/linux.h include/dynloader.h COPYONLY) +else() + message(FATAL_ERROR "Unknown system: ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") +endif() file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_paths.h "#define SYSCONFDIR \"\"") set(INSTALL_INCLUDES ON CACHE BOOL "Install include files") set(pg_port_src - src/port/getaddrinfo.c src/port/pgstrcasecmp.c src/port/pqsignal.c src/port/thread.c - src/port/inet_aton.c src/port/crypt.c src/port/noblock.c src/port/chklocale.c - src/port/inet_net_ntop.c src/port/snprintf.c - src/port/strlcpy.c - src/port/dirent.c src/port/dirmod.c src/port/pgsleep.c src/port/open.c src/port/system.c - src/port/win32error.c - src/port/win32setlocale.c ) +if(WIN32) + list(APPEND pg_port_src + src/port/dirent.c + src/port/inet_aton.c + src/port/inet_net_ntop.c + src/port/win32error.c + src/port/win32setlocale.c + src/port/getaddrinfo.c + src/port/strlcpy.c + ) + include_directories(src/include/port/win32 src/include/port/win32_msvc) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + list(APPEND pg_port_src + src/port/strlcpy.c + ) +endif() + set(pg_backend_src src/backend/libpq/md5.c src/backend/libpq/ip.c src/backend/utils/mb/wchar.c src/backend/utils/mb/encnames.c ) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + list(APPEND pg_backend_src + src/backend/port/dynloader/linux.c + src/backend/port/sysv_sema.c + src/backend/port/sysv_shmem.c + ) +endif() +if(NOT WIN32) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/include/utils/errcodes.h + COMMAND "${PERL}" "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/utils/generate-errcodes.pl" "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/utils/errcodes.txt" > "${CMAKE_CURRENT_BINARY_DIR}/include/utils/errcodes.h" + VERBATIM + ) + list(APPEND pg_backend_src + ${CMAKE_CURRENT_BINARY_DIR}/include/utils/errcodes.h + ) +endif() + set(pg_libpq_src src/interfaces/libpq/fe-auth.c src/interfaces/libpq/fe-connect.c @@ -49,16 +106,21 @@ set(pg_libpq_src src/interfaces/libpq/fe-secure.c src/interfaces/libpq/libpq-events.c src/interfaces/libpq/pqexpbuffer.c - src/interfaces/libpq/pthread-win32.c - src/interfaces/libpq/win32.c src/interfaces/libpq/libpq-dist.rc ) + +if(WIN32) + list(APPEND pg_libpq_src + src/interfaces/libpq/pthread-win32.c + src/interfaces/libpq/win32.c + ) +endif() set(pg_libpq_interface src/include/postgres_ext.h ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config.h src/interfaces/libpq/libpq-fe.h - ) +) set(pg_libpq_catalog_interface src/include/catalog/pg_type.h src/include/catalog/genbki.h @@ -68,8 +130,11 @@ set(CMAKE_DEBUG_POSTFIX "d") set(CMAKE_INCLUDE_CURRENT_DIR ON) add_library(libpq ${pg_port_src} ${pg_backend_src} ${pg_libpq_src}) target_compile_definitions(libpq PRIVATE -DFRONTEND -DENABLE_THREAD_SAFETY -DUSE_OPENSSL -D_CRT_SECURE_NO_WARNINGS) -target_link_libraries(libpq PRIVATE OpenSSL::SSL ws2_32 secur32 advapi32 shell32) -target_include_directories(libpq PRIVATE src/include src/include/port/win32 src/include/port/win32_msvc src/port ${CMAKE_CURRENT_BINARY_DIR}/include) +target_link_libraries(libpq PRIVATE OpenSSL::SSL) +if(WIN32) + target_link_libraries(libpq PRIVATE ws2_32 secur32 advapi32 shell32) +endif() +target_include_directories(libpq PRIVATE src/include src/port ${CMAKE_CURRENT_BINARY_DIR}/include) set_target_properties(libpq PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) install(TARGETS libpq diff --git a/ports/libpq/CONTROL b/ports/libpq/CONTROL index b91e08526..225d886de 100644 --- a/ports/libpq/CONTROL +++ b/ports/libpq/CONTROL @@ -1,4 +1,4 @@ Source: libpq -Version: 9.6.1-1 +Version: 9.6.1-4 Description: The official database access API of postgresql -Build-Depends: openssl +Build-Depends: openssl, zlib (linux) diff --git a/ports/libpq/pg_config.darwin.h b/ports/libpq/pg_config.darwin.h new file mode 100644 index 000000000..5db9f84d2 --- /dev/null +++ b/ports/libpq/pg_config.darwin.h @@ -0,0 +1,191 @@ +#define ACCEPT_TYPE_ARG1 int +#define ACCEPT_TYPE_ARG2 struct sockaddr * +#define ACCEPT_TYPE_ARG3 socklen_t +#define ACCEPT_TYPE_RETURN int +#define ALIGNOF_DOUBLE 8 +#define ALIGNOF_INT 4 +#define ALIGNOF_LONG 8 +#define ALIGNOF_SHORT 2 +#define BLCKSZ 8192 +#define DEF_PGPORT 5432 +#define DEF_PGPORT_STR "5432" +#define ENABLE_THREAD_SAFETY 1 +#define FLEXIBLE_ARRAY_MEMBER /**/ +#define FLOAT4PASSBYVAL true +#define FLOAT8PASSBYVAL true +#ifdef GETTIMEOFDAY_1ARG +# define gettimeofday(a,b) gettimeofday(a) +#endif +#define HAVE_ATOMICS 1 +#define HAVE_CBRT 1 +#define HAVE_CRYPT 1 +#define HAVE_DECL_FDATASYNC 0 +#define HAVE_DECL_F_FULLFSYNC 1 +#define HAVE_DECL_POSIX_FADVISE 0 +#define HAVE_DECL_SNPRINTF 1 +#define HAVE_DECL_STRLCAT 1 +#define HAVE_DECL_STRLCPY 1 +#define HAVE_DECL_SYS_SIGLIST 1 +#define HAVE_DECL_VSNPRINTF 1 +#define HAVE_DLOPEN 1 +#define HAVE_FDATASYNC 1 +#define HAVE_FLS 1 +#define HAVE_FSEEKO 1 +#define HAVE_FUNCNAME__FUNC 1 +#define HAVE_GCC__ATOMIC_INT32_CAS 1 +#define HAVE_GCC__ATOMIC_INT64_CAS 1 +#define HAVE_GCC__SYNC_CHAR_TAS 1 +#define HAVE_GCC__SYNC_INT32_CAS 1 +#define HAVE_GCC__SYNC_INT32_TAS 1 +#define HAVE_GCC__SYNC_INT64_CAS 1 +#define HAVE_GETADDRINFO 1 +#define HAVE_GETIFADDRS 1 +#define HAVE_GETOPT 1 +#define HAVE_GETOPT_H 1 +#define HAVE_GETOPT_LONG 1 +#define HAVE_GETPEEREID 1 +#define HAVE_GETPWUID_R 1 +#define HAVE_GETRLIMIT 1 +#define HAVE_GETRUSAGE 1 +#define HAVE_HISTORY_TRUNCATE_FILE 1 +#define HAVE_IFADDRS_H 1 +#define HAVE_INET_ATON 1 +#define HAVE_INTPTR_T 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_INT_OPTERR 1 +#define HAVE_INT_OPTRESET 1 +#define HAVE_INT_TIMEZONE 1 +#define HAVE_IPV6 1 +#define HAVE_ISINF 1 +#define HAVE_LANGINFO_H 1 +#define HAVE_LIBM 1 +#define HAVE_LIBREADLINE 1 +#define HAVE_LIBZ 1 +#define HAVE_LOCALE_T 1 +#define HAVE_LONG_INT_64 1 +#define HAVE_LONG_LONG_INT 1 +#define HAVE_MBSTOWCS_L 1 +#define HAVE_MEMMOVE 1 +#define HAVE_MEMORY_H 1 +#define HAVE_MKDTEMP 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_NETINET_TCP_H 1 +#define HAVE_NET_IF_H 1 +#define HAVE_POLL 1 +#define HAVE_POLL_H 1 +#define HAVE_PTHREAD 1 +#define HAVE_PTHREAD_IS_THREADED_NP 1 +#define HAVE_PTHREAD_PRIO_INHERIT 1 +#define HAVE_PWD_H 1 +#define HAVE_RANDOM 1 +#define HAVE_READLINE_HISTORY_H 1 +#define HAVE_READLINE_READLINE_H 1 +#define HAVE_READLINK 1 +#define HAVE_RINT 1 +#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1 +#define HAVE_RL_COMPLETION_MATCHES 1 +#define HAVE_RL_FILENAME_COMPLETION_FUNCTION 1 +#define HAVE_SETSID 1 +#define HAVE_SHM_OPEN 1 +#define HAVE_SNPRINTF 1 +#define HAVE_SPINLOCKS 1 +#define HAVE_SRANDOM 1 +#define HAVE_SSL_GET_CURRENT_COMPRESSION 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRERROR 1 +#define HAVE_STRERROR_R 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STRLCAT 1 +#define HAVE_STRLCPY 1 +#define HAVE_STRTOLL 1 +#define HAVE_STRTOULL 1 +#define HAVE_STRUCT_ADDRINFO 1 +#define HAVE_STRUCT_OPTION 1 +#define HAVE_STRUCT_SOCKADDR_SA_LEN 1 +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 +#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 +#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1 +#define HAVE_STRUCT_TM_TM_ZONE 1 +#define HAVE_SYMLINK 1 +#define HAVE_SYSLOG 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_IPC_H 1 +#define HAVE_SYS_POLL_H 1 +#define HAVE_SYS_RESOURCE_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SEM_H 1 +#define HAVE_SYS_SHM_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_SOCKIO_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_UCRED_H 1 +#define HAVE_SYS_UN_H 1 +#define HAVE_TERMIOS_H 1 +#define HAVE_TM_ZONE 1 +#define HAVE_TOWLOWER 1 +#define HAVE_TZNAME 1 +#define HAVE_UINTPTR_T 1 +#define HAVE_UNION_SEMUN 1 +#define HAVE_UNISTD_H 1 +#define HAVE_UNIX_SOCKETS 1 +#define HAVE_UNSETENV 1 +#define HAVE_UNSIGNED_LONG_LONG_INT 1 +#define HAVE_UTIME 1 +#define HAVE_UTIMES 1 +#define HAVE_UTIME_H 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_WCHAR_H 1 +#define HAVE_WCSTOMBS 1 +#define HAVE_WCSTOMBS_L 1 +#define HAVE_WCTYPE_H 1 +#define HAVE__BUILTIN_BSWAP32 1 +#define HAVE__BUILTIN_BSWAP64 1 +#define HAVE__BUILTIN_CONSTANT_P 1 +#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1 +#define HAVE__BUILTIN_UNREACHABLE 1 +#define HAVE__GET_CPUID 1 +#define HAVE__STATIC_ASSERT 1 +#define HAVE__VA_ARGS 1 +#define INT64_MODIFIER "l" +#define LOCALE_T_IN_XLOCALE 1 +#define MAXIMUM_ALIGNOF 8 +#define MEMSET_LOOP_LIMIT 1024 +#define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org" +#define PACKAGE_NAME "PostgreSQL" +#define PACKAGE_STRING "PostgreSQL 9.6.3" +#define PACKAGE_TARNAME "postgresql" +#define PACKAGE_URL "" +#define PACKAGE_VERSION "9.6.3" +#define PG_INT128_TYPE __int128 +#define PG_INT64_TYPE long int +#define PG_KRB_SRVNAM "postgres" +#define PG_MAJORVERSION "9.6" +#define PG_PRINTF_ATTRIBUTE printf +#define PG_VERSION "9.6.3" +#define PG_VERSION_NUM 90603 +#define PG_VERSION_STR "PostgreSQL 9.6.3 on x86_64-apple-darwin15.6.0, compiled by Apple LLVM version 7.0.2 (clang-700.1.81), 64-bit" +#define RELSEG_SIZE 131072 +#define SIZEOF_LONG 8 +#define SIZEOF_OFF_T 8 +#define SIZEOF_SIZE_T 8 +#define SIZEOF_VOID_P 8 +#define STDC_HEADERS 1 +#define STRERROR_R_INT 1 +#define USE_FLOAT4_BYVAL 1 +#define USE_FLOAT8_BYVAL 1 +#define USE_INTEGER_DATETIMES 1 +#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1 +#define USE_SYSV_SEMAPHORES 1 +#define USE_SYSV_SHARED_MEMORY 1 +#define WCSTOMBS_L_IN_XLOCALE 1 +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#endif +#define XLOG_BLCKSZ 8192 +#define XLOG_SEG_SIZE (16 * 1024 * 1024) diff --git a/ports/libpq/pg_config.linux.h b/ports/libpq/pg_config.linux.h new file mode 100644 index 000000000..d3758bb95 --- /dev/null +++ b/ports/libpq/pg_config.linux.h @@ -0,0 +1,173 @@ +#define ACCEPT_TYPE_ARG1 int +#define ACCEPT_TYPE_ARG2 struct sockaddr * +#define ACCEPT_TYPE_ARG3 socklen_t +#define ACCEPT_TYPE_RETURN int +#define ALIGNOF_DOUBLE 8 +#define ALIGNOF_INT 4 +#define ALIGNOF_LONG 8 +#define ALIGNOF_SHORT 2 +#define BLCKSZ 8192 +#define DEF_PGPORT 5432 +#define DEF_PGPORT_STR "5432" +#define ENABLE_THREAD_SAFETY 1 +#define FLEXIBLE_ARRAY_MEMBER /**/ +#define FLOAT4PASSBYVAL true +#define FLOAT8PASSBYVAL true +#ifdef GETTIMEOFDAY_1ARG +# define gettimeofday(a,b) gettimeofday(a) +#endif +#define HAVE_ATOMICS 1 +#define HAVE_CBRT 1 +#define HAVE_CRYPT 1 +#define HAVE_CRYPT_H 1 +#define HAVE_DECL_FDATASYNC 1 +#define HAVE_DECL_F_FULLFSYNC 0 +#define HAVE_DECL_POSIX_FADVISE 1 +#define HAVE_DECL_SNPRINTF 1 +#define HAVE_DECL_STRLCAT 0 +#define HAVE_DECL_STRLCPY 0 +#define HAVE_DECL_SYS_SIGLIST 1 +#define HAVE_DECL_VSNPRINTF 1 +#define HAVE_DLOPEN 1 +#define HAVE_FDATASYNC 1 +#define HAVE_FSEEKO 1 +#define HAVE_FUNCNAME__FUNC 1 +#define HAVE_GCC__ATOMIC_INT32_CAS 1 +#define HAVE_GCC__ATOMIC_INT64_CAS 1 +#define HAVE_GCC__SYNC_CHAR_TAS 1 +#define HAVE_GCC__SYNC_INT32_CAS 1 +#define HAVE_GCC__SYNC_INT32_TAS 1 +#define HAVE_GCC__SYNC_INT64_CAS 1 +#define HAVE_GETADDRINFO 1 +#define HAVE_GETHOSTBYNAME_R 1 +#define HAVE_GETIFADDRS 1 +#define HAVE_GETOPT 1 +#define HAVE_GETOPT_H 1 +#define HAVE_GETOPT_LONG 1 +#define HAVE_GETPWUID_R 1 +#define HAVE_GETRLIMIT 1 +#define HAVE_GETRUSAGE 1 +#define HAVE_IFADDRS_H 1 +#define HAVE_INET_ATON 1 +#define HAVE_INTPTR_T 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_INT_OPTERR 1 +#define HAVE_INT_TIMEZONE 1 +#define HAVE_IPV6 1 +#define HAVE_ISINF 1 +#define HAVE_LANGINFO_H 1 +#define HAVE_LIBM 1 +#define HAVE_LIBZ 1 +#define HAVE_LOCALE_T 1 +#define HAVE_LONG_INT_64 1 +#define HAVE_LONG_LONG_INT 1 +#define HAVE_MEMMOVE 1 +#define HAVE_MEMORY_H 1 +#define HAVE_MKDTEMP 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_NETINET_TCP_H 1 +#define HAVE_NET_IF_H 1 +#define HAVE_POLL 1 +#define HAVE_POLL_H 1 +#define HAVE_POSIX_FADVISE 1 +#define HAVE_PTHREAD 1 +#define HAVE_PTHREAD_PRIO_INHERIT 1 +#define HAVE_PWD_H 1 +#define HAVE_RANDOM 1 +#define HAVE_READLINK 1 +#define HAVE_RINT 1 +#define HAVE_SETSID 1 +#define HAVE_SHM_OPEN 1 +#define HAVE_SNPRINTF 1 +#define HAVE_SPINLOCKS 1 +#define HAVE_SRANDOM 1 +#define HAVE_SSL_GET_CURRENT_COMPRESSION 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRERROR 1 +#define HAVE_STRERROR_R 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STRTOLL 1 +#define HAVE_STRTOULL 1 +#define HAVE_STRUCT_ADDRINFO 1 +#define HAVE_STRUCT_OPTION 1 +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 +#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 +#define HAVE_STRUCT_TM_TM_ZONE 1 +#define HAVE_SYMLINK 1 +#define HAVE_SYNC_FILE_RANGE 1 +#define HAVE_SYSLOG 1 +#define HAVE_SYS_EPOLL_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_IPC_H 1 +#define HAVE_SYS_POLL_H 1 +#define HAVE_SYS_RESOURCE_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SEM_H 1 +#define HAVE_SYS_SHM_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_UN_H 1 +#define HAVE_TERMIOS_H 1 +#define HAVE_TM_ZONE 1 +#define HAVE_TOWLOWER 1 +#define HAVE_TZNAME 1 +#define HAVE_UINTPTR_T 1 +#define HAVE_UNISTD_H 1 +#define HAVE_UNIX_SOCKETS 1 +#define HAVE_UNSETENV 1 +#define HAVE_UNSIGNED_LONG_LONG_INT 1 +#define HAVE_UTIME 1 +#define HAVE_UTIMES 1 +#define HAVE_UTIME_H 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_WCHAR_H 1 +#define HAVE_WCSTOMBS 1 +#define HAVE_WCTYPE_H 1 +#define HAVE__BUILTIN_BSWAP32 1 +#define HAVE__BUILTIN_BSWAP64 1 +#define HAVE__BUILTIN_CONSTANT_P 1 +#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1 +#define HAVE__BUILTIN_UNREACHABLE 1 +#define HAVE__GET_CPUID 1 +#define HAVE__STATIC_ASSERT 1 +#define HAVE__VA_ARGS 1 +#define INT64_MODIFIER "l" +#define MAXIMUM_ALIGNOF 8 +#define MEMSET_LOOP_LIMIT 1024 +#define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org" +#define PACKAGE_NAME "PostgreSQL" +#define PACKAGE_STRING "PostgreSQL 9.6.3" +#define PACKAGE_TARNAME "postgresql" +#define PACKAGE_URL "" +#define PACKAGE_VERSION "9.6.3" +#define PG_INT128_TYPE __int128 +#define PG_INT64_TYPE long int +#define PG_KRB_SRVNAM "postgres" +#define PG_MAJORVERSION "9.6" +#define PG_PRINTF_ATTRIBUTE gnu_printf +#define PG_VERSION "9.6.3" +#define PG_VERSION_NUM 90603 +#define PG_VERSION_STR "PostgreSQL 9.6.3 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904, 64-bit" +#define RELSEG_SIZE 131072 +#define SIZEOF_LONG 8 +#define SIZEOF_OFF_T 8 +#define SIZEOF_SIZE_T 8 +#define SIZEOF_VOID_P 8 +#define STDC_HEADERS 1 +#define USE_FLOAT4_BYVAL 1 +#define USE_FLOAT8_BYVAL 1 +#define USE_INTEGER_DATETIMES 1 +#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1 +#define USE_SYSV_SEMAPHORES 1 +#define USE_SYSV_SHARED_MEMORY 1 +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#endif +#define XLOG_BLCKSZ 8192 +#define XLOG_SEG_SIZE (16 * 1024 * 1024) diff --git a/ports/libpq/portfile.cmake b/ports/libpq/portfile.cmake index 2d14204fa..7b23aed32 100644 --- a/ports/libpq/portfile.cmake +++ b/ports/libpq/portfile.cmake @@ -12,7 +12,10 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS_DEBUG -DINSTALL_INCLUDES=OFF + OPTIONS + "-DPORT_DIR=${CMAKE_CURRENT_LIST_DIR}" + OPTIONS_DEBUG + -DINSTALL_INCLUDES=OFF ) vcpkg_install_cmake() diff --git a/ports/qt5-base/configure_qt.cmake b/ports/qt5-base/configure_qt.cmake index 1d4f1e570..356361a9b 100644 --- a/ports/qt5-base/configure_qt.cmake +++ b/ports/qt5-base/configure_qt.cmake @@ -1,12 +1,8 @@ function(configure_qt) cmake_parse_arguments(_csc "" "SOURCE_PATH;PLATFORM" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) - if (_csc_PLATFORM) - set(PLATFORM ${_csc_PLATFORM}) - elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140") - set(PLATFORM "win32-msvc2015") - elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") - set(PLATFORM "win32-msvc2017") + if(NOT _csc_PLATFORM) + message(FATAL_ERROR "configure_qt requires a PLATFORM argument.") endif() vcpkg_find_acquire_program(PERL) @@ -15,17 +11,24 @@ function(configure_qt) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") - if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) - list(APPEND _csc_OPTIONS - "-static" - "-static-runtime" - ) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND _csc_OPTIONS "-static") + endif() + + if(VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND _csc_OPTIONS "-static-runtime") + endif() + + if(CMAKE_HOST_WIN32) + set(CONFIGURE_BAT "configure.bat") + else() + set(CONFIGURE_BAT "configure") endif() message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) vcpkg_execute_required_process( - COMMAND "${_csc_SOURCE_PATH}/configure.bat" ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} + COMMAND "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}" ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} -debug -prefix ${CURRENT_PACKAGES_DIR}/debug -hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5 @@ -36,7 +39,7 @@ function(configure_qt) -headerdir ${CURRENT_PACKAGES_DIR}/include -I ${CURRENT_INSTALLED_DIR}/include -L ${CURRENT_INSTALLED_DIR}/debug/lib - -platform ${PLATFORM} + -platform ${_csc_PLATFORM} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME config-${TARGET_TRIPLET}-dbg ) @@ -45,7 +48,7 @@ function(configure_qt) message(STATUS "Configuring ${TARGET_TRIPLET}-rel") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) vcpkg_execute_required_process( - COMMAND "${_csc_SOURCE_PATH}/configure.bat" ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} + COMMAND "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}" ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} -release -prefix ${CURRENT_PACKAGES_DIR} -hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5 @@ -55,7 +58,7 @@ function(configure_qt) -qmldir ${CURRENT_PACKAGES_DIR}/qml -I ${CURRENT_INSTALLED_DIR}/include -L ${CURRENT_INSTALLED_DIR}/lib - -platform ${PLATFORM} + -platform ${_csc_PLATFORM} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME config-${TARGET_TRIPLET}-rel ) diff --git a/ports/qt5-base/install_qt.cmake b/ports/qt5-base/install_qt.cmake index 37528e4e6..482802f38 100644 --- a/ports/qt5-base/install_qt.cmake +++ b/ports/qt5-base/install_qt.cmake @@ -2,12 +2,27 @@ function(install_qt) cmake_parse_arguments(_bc "DISABLE_PARALLEL" "" "" ${ARGN}) if (_bc_DISABLE_PARALLEL) - set(JOBS "1") + set(NUMBER_OF_PROCESSORS "1") else() - set(JOBS "$ENV{NUMBER_OF_PROCESSORS}") + if(DEFINED ENV{NUMBER_OF_PROCESSORS}) + set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS}) + else() + execute_process( + COMMAND nproc + OUTPUT_VARIABLE NUMBER_OF_PROCESSORS + ) + string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") + string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}") + endif() endif() - vcpkg_find_acquire_program(JOM) + if(CMAKE_HOST_WIN32) + vcpkg_find_acquire_program(JOM) + set(INVOKE "${JOM}" /J ${NUMBER_OF_PROCESSORS}) + else() + find_program(MAKE make) + set(INVOKE "${MAKE}" -j${NUMBER_OF_PROCESSORS}) + endif() vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) set(ENV{PATH} "${PYTHON3_EXE_PATH};$ENV{PATH}") @@ -16,12 +31,12 @@ function(install_qt) message(STATUS "Package ${TARGET_TRIPLET}-dbg") set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/debug/bin;${_path}") vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} + COMMAND ${INVOKE} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME build-${TARGET_TRIPLET}-dbg ) vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} install + COMMAND ${INVOKE} install WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME package-${TARGET_TRIPLET}-dbg ) @@ -30,12 +45,12 @@ function(install_qt) message(STATUS "Package ${TARGET_TRIPLET}-rel") set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/bin;${_path}") vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} + COMMAND ${INVOKE} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel ) vcpkg_execute_required_process( - COMMAND ${JOM} /J ${JOBS} install + COMMAND ${INVOKE} install WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME package-${TARGET_TRIPLET}-rel ) diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 9e9d7779a..39498b4a3 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -1,13 +1,13 @@ include(vcpkg_common_functions) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) -if(BUILDTREES_PATH_LENGTH GREATER 37) +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" "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." ) endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) +if((NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") AND VCPKG_LIBRARY_LINKAGE STREQUAL static) message(FATAL_ERROR "Qt5 doesn't currently support static builds. Please use a dynamic triplet instead.") endif() @@ -30,58 +30,108 @@ if (EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME}) file(RENAME ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_NAME} ${CURRENT_BUILDTREES_DIR}/src/${SRCDIR_NAME}) endif() +# Remove vendored dependencies to ensure they are not picked up by the build +foreach(DEPENDENCY freetype zlib harfbuzzng libjpeg libpng double-conversion) + if(EXISTS ${SOURCE_PATH}/src/3rdparty/${DEPENDENCY}) + file(REMOVE_RECURSE ${SOURCE_PATH}/src/3rdparty/${DEPENDENCY}) + endif() +endforeach() + +file(REMOVE_RECURSE ${SOURCE_PATH}/include/QtZlib) + vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2.patch" +# "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2.patch" "${CMAKE_CURRENT_LIST_DIR}/fix-system-freetype.patch" ) # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") -configure_qt( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -confirm-license - -opensource - -system-zlib - -system-libjpeg - -system-libpng - -system-freetype - -system-pcre - -system-harfbuzz - -system-doubleconversion - -system-sqlite - -no-fontconfig - -sql-sqlite - -sql-psql - -nomake examples -nomake tests - -opengl desktop # other options are "-no-opengl" and "-opengl angle" - -mp - LIBJPEG_LIBS="-ljpeg" - OPTIONS_RELEASE - ZLIB_LIBS="-lzlib" - LIBPNG_LIBS="-llibpng16" - FREETYPE_LIBS="-lfreetype" - OPTIONS_DEBUG - ZLIB_LIBS="-lzlibd" - LIBPNG_LIBS="-llibpng16d" - PSQL_LIBS="-llibpqd" - FREETYPE_LIBS="-lfreetyped" +set(CORE_OPTIONS + -confirm-license + -opensource + -system-zlib + -system-libjpeg + -system-libpng + -system-freetype + -system-pcre + -system-harfbuzz + -system-doubleconversion + -no-fontconfig + -nomake examples -nomake tests ) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(VCPKG_PLATFORM_TOOLSET MATCHES "v140") + set(PLATFORM "win32-msvc2015") + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(PLATFORM "win32-msvc2017") + endif() + configure_qt( + SOURCE_PATH ${SOURCE_PATH} + PLATFORM ${PLATFORM} + OPTIONS + ${CORE_OPTIONS} + -sql-sqlite + -sql-psql + -system-sqlite + -mp + -opengl desktop # other options are "-no-opengl", "-opengl angle", and "-opengl desktop" + LIBJPEG_LIBS="-ljpeg" + OPTIONS_RELEASE + ZLIB_LIBS="-lzlib" + LIBPNG_LIBS="-llibpng16" + FREETYPE_LIBS="-lfreetype" + OPTIONS_DEBUG + ZLIB_LIBS="-lzlibd" + LIBPNG_LIBS="-llibpng16d" + PSQL_LIBS="-llibpqd" + FREETYPE_LIBS="-lfreetyped" + ) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + configure_qt( + SOURCE_PATH ${SOURCE_PATH} + PLATFORM "linux-g++" + OPTIONS + ${CORE_OPTIONS} + -no-sqlite + -no-opengl # other options are "-no-opengl", "-opengl angle", and "-opengl desktop" + LIBJPEG_LIBS="-ljpeg" + OPTIONS_RELEASE + "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libpng16.a" + "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libz.a" + "ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/lib/libz.a" + "LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpng16.a" + "FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/lib/libfreetype.a" + "PSQL_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpq.a ${CURRENT_INSTALLED_DIR}/lib/libssl.a ${CURRENT_INSTALLED_DIR}/lib/libcrypto.a" + OPTIONS_DEBUG + "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a" + "QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a" + "ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a" + "LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a" + "FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libfreetyped.a" + "PSQL_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpqd.a ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.a ${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.a" + ) +endif() + install_qt() file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") +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(REMOVE ${BINARY_TOOLS}) -file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +file(GLOB BINARY_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*") +list(FILTER BINARY_TOOLS EXCLUDE REGEX "\\.dll\$") file(REMOVE ${BINARY_TOOLS}) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf ${CMAKE_CURRENT_LIST_DIR}/qt_release.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5) @@ -94,25 +144,27 @@ vcpkg_execute_required_process( vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5) -#--------------------------------------------------------------------------- -# qtmain(d) vs. Qt5AxServer(d) -#--------------------------------------------------------------------------- -# Qt applications have to either link to qtmain(d) or to Qt5AxServer(d), -# never both. See http://doc.qt.io/qt-5/activeqt-server.html for more info. -# -# Create manual-link folders: -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -# -# Either have users explicitly link against qtmain.lib, qtmaind.lib: -file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl) +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) + #--------------------------------------------------------------------------- + # qtmain(d) vs. Qt5AxServer(d) + #--------------------------------------------------------------------------- + # Qt applications have to either link to qtmain(d) or to Qt5AxServer(d), + # never both. See http://doc.qt.io/qt-5/activeqt-server.html for more info. + # + # Create manual-link folders: + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + # + # Either have users explicitly link against qtmain.lib, qtmaind.lib: + file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(COPY ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qtmain.prl) + file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl) +endif() file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins) file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins) -- cgit v1.2.3 From 8f4ce4fab638b70ff890f0e7c09b92f866b1493d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 24 Mar 2018 09:33:40 -0700 Subject: [magnum-extras] Fix empty build --- ports/magnum-extras/portfile.cmake | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ports/magnum-extras/portfile.cmake b/ports/magnum-extras/portfile.cmake index 402c1aa1f..d97508497 100644 --- a/ports/magnum-extras/portfile.cmake +++ b/ports/magnum-extras/portfile.cmake @@ -7,11 +7,7 @@ vcpkg_from_github( HEAD_REF master ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(BUILD_STATIC 1) -else() - set(BUILD_STATIC 0) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) # Handle features set(_COMPONENT_FLAGS "") @@ -48,14 +44,14 @@ if("ui" IN_LIST FEATURES) message(WARNING "It is recommended to install one of magnum-plugins[freetypefont,harfbuzzfont,stbtruetypefont] to have the UI library working out of the box") endif() - # Debug includes and share are the same as release file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/share) + ${CURRENT_PACKAGES_DIR}/debug/share +) # Clean up empty directories -if("${FEATURES}" STREQUAL "") +if("${FEATURES}" STREQUAL "core") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/lib -- cgit v1.2.3 From e47f165146535e3c6cc21d62a3b7832ce029e02b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 24 Mar 2018 09:35:49 -0700 Subject: [magnum-integration] Fix empty build --- ports/magnum-integration/portfile.cmake | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ports/magnum-integration/portfile.cmake b/ports/magnum-integration/portfile.cmake index 8ef1899fd..da9c393b7 100644 --- a/ports/magnum-integration/portfile.cmake +++ b/ports/magnum-integration/portfile.cmake @@ -7,11 +7,7 @@ vcpkg_from_github( HEAD_REF master ) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(BUILD_STATIC 1) -else() - set(BUILD_STATIC 0) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) # Handle features set(_COMPONENT_FLAGS "") @@ -44,14 +40,16 @@ vcpkg_install_cmake() # Debug includes and share are the same as release file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/share) + ${CURRENT_PACKAGES_DIR}/debug/share +) # Clean up empty directories -if(NOT FEATURES) +if("${FEATURES}" STREQUAL "core") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/lib - ${CURRENT_PACKAGES_DIR}/debug) + ${CURRENT_PACKAGES_DIR}/debug + ) set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) endif() -- cgit v1.2.3 From 5ba45ffd9bb450da020e3694f38c78387d5270ec Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 24 Mar 2018 13:26:48 -0700 Subject: [shapelib] Add option to disable tests --- ports/shapelib/CONTROL | 2 +- ports/shapelib/option-build-test.patch | 13 +++++++++++++ ports/shapelib/portfile.cmake | 25 ++++++++++++++++++------- 3 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 ports/shapelib/option-build-test.patch diff --git a/ports/shapelib/CONTROL b/ports/shapelib/CONTROL index 7d37eb8aa..57fbecb53 100644 --- a/ports/shapelib/CONTROL +++ b/ports/shapelib/CONTROL @@ -1,3 +1,3 @@ Source: shapelib -Version: 1.4.1 +Version: 1.4.1-1 Description: Shapefile C Library is simple C API for reading and writing ESRI Shapefiles diff --git a/ports/shapelib/option-build-test.patch b/ports/shapelib/option-build-test.patch new file mode 100644 index 000000000..c91410f38 --- /dev/null +++ b/ports/shapelib/option-build-test.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c3ef935..845ec06 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -148,7 +148,7 @@ set(executables + find_program(BASH_EXECUTABLE bash) + find_program(SED_EXECUTABLE sed) + if(BASH_EXECUTABLE AND SED_EXECUTABLE) +- set(BUILD_TEST ON) ++ option(BUILD_TEST "" ON) + else(BASH_EXECUTABLE AND SED_EXECUTABLE) + message(STATUS "WARNING: sed or bash not available so disabling testing") + endif(BASH_EXECUTABLE AND SED_EXECUTABLE) diff --git a/ports/shapelib/portfile.cmake b/ports/shapelib/portfile.cmake index 0f2787689..eed76736f 100644 --- a/ports/shapelib/portfile.cmake +++ b/ports/shapelib/portfile.cmake @@ -11,10 +11,17 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/option-build-test.patch +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DBUILD_TEST=OFF) + OPTIONS + -DBUILD_TEST=OFF +) vcpkg_install_cmake() @@ -22,15 +29,19 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") -file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/shapelib) -file(REMOVE ${EXES}) +if(EXES) + file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/shapelib) + file(REMOVE ${EXES}) +endif() file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") -file(REMOVE ${DEBUG_EXES}) +if(DEBUG_EXES) + file(REMOVE ${DEBUG_EXES}) +endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +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}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/shapelib) -- cgit v1.2.3 From e8d1666d9c88ff1ccce3b388ea09f500735f17b7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 24 Mar 2018 13:08:06 -0700 Subject: [aws-sdk-cpp] Update and fix cmake files --- ports/aws-sdk-cpp/CONTROL | 421 ++++++++++++++++++++++- ports/aws-sdk-cpp/CONTROL.in | 4 + ports/aws-sdk-cpp/compute_build_only.cmake | 418 ++++++++++++++++++++++ ports/aws-sdk-cpp/disable_warning_as_error.patch | 13 - ports/aws-sdk-cpp/drop_git.patch | 13 - ports/aws-sdk-cpp/generateFeatures.ps1 | 50 +++ ports/aws-sdk-cpp/portfile.cmake | 100 +++--- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 22 +- 8 files changed, 952 insertions(+), 89 deletions(-) create mode 100644 ports/aws-sdk-cpp/CONTROL.in create mode 100644 ports/aws-sdk-cpp/compute_build_only.cmake delete mode 100644 ports/aws-sdk-cpp/disable_warning_as_error.patch delete mode 100644 ports/aws-sdk-cpp/drop_git.patch create mode 100644 ports/aws-sdk-cpp/generateFeatures.ps1 diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index 3c784db00..09b1c1a7f 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,3 +1,422 @@ Source: aws-sdk-cpp -Version: 1.3.58 +Version: 1.4.21 Description: AWS SDK for C++ +Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs +# Automatically generated by generateFeatures.ps1 + +Feature: access-management +Description: C++ SDK for the AWS access-management service + +Feature: acm +Description: C++ SDK for the AWS acm service + +Feature: alexaforbusiness +Description: C++ SDK for the AWS alexaforbusiness service + +Feature: apigateway +Description: C++ SDK for the AWS apigateway service + +Feature: application-autoscaling +Description: C++ SDK for the AWS application-autoscaling service + +Feature: appstream +Description: C++ SDK for the AWS appstream service + +Feature: appsync +Description: C++ SDK for the AWS appsync service + +Feature: athena +Description: C++ SDK for the AWS athena service + +Feature: autoscaling +Description: C++ SDK for the AWS autoscaling service + +Feature: autoscaling-plans +Description: C++ SDK for the AWS autoscaling-plans service + +Feature: AWSMigrationHub +Description: C++ SDK for the AWS AWSMigrationHub service + +Feature: batch +Description: C++ SDK for the AWS batch service + +Feature: budgets +Description: C++ SDK for the AWS budgets service + +Feature: ce +Description: C++ SDK for the AWS ce service + +Feature: cloud9 +Description: C++ SDK for the AWS cloud9 service + +Feature: clouddirectory +Description: C++ SDK for the AWS clouddirectory service + +Feature: cloudformation +Description: C++ SDK for the AWS cloudformation service + +Feature: cloudfront +Description: C++ SDK for the AWS cloudfront service + +Feature: cloudhsm +Description: C++ SDK for the AWS cloudhsm service + +Feature: cloudhsmv2 +Description: C++ SDK for the AWS cloudhsmv2 service + +Feature: cloudsearch +Description: C++ SDK for the AWS cloudsearch service + +Feature: cloudsearchdomain +Description: C++ SDK for the AWS cloudsearchdomain service + +Feature: cloudtrail +Description: C++ SDK for the AWS cloudtrail service + +Feature: codebuild +Description: C++ SDK for the AWS codebuild service + +Feature: codecommit +Description: C++ SDK for the AWS codecommit service + +Feature: codedeploy +Description: C++ SDK for the AWS codedeploy service + +Feature: codepipeline +Description: C++ SDK for the AWS codepipeline service + +Feature: codestar +Description: C++ SDK for the AWS codestar service + +Feature: cognito-identity +Description: C++ SDK for the AWS cognito-identity service + +Feature: cognito-idp +Description: C++ SDK for the AWS cognito-idp service + +Feature: cognito-sync +Description: C++ SDK for the AWS cognito-sync service + +Feature: comprehend +Description: C++ SDK for the AWS comprehend service + +Feature: config +Description: C++ SDK for the AWS config service + +Feature: cur +Description: C++ SDK for the AWS cur service + +Feature: datapipeline +Description: C++ SDK for the AWS datapipeline service + +Feature: dax +Description: C++ SDK for the AWS dax service + +Feature: devicefarm +Description: C++ SDK for the AWS devicefarm service + +Feature: directconnect +Description: C++ SDK for the AWS directconnect service + +Feature: discovery +Description: C++ SDK for the AWS discovery service + +Feature: dms +Description: C++ SDK for the AWS dms service + +Feature: ds +Description: C++ SDK for the AWS ds service + +Feature: dynamodb +Description: C++ SDK for the AWS dynamodb service + +Feature: dynamodbstreams +Description: C++ SDK for the AWS dynamodbstreams service + +Feature: ec2 +Description: C++ SDK for the AWS ec2 service + +Feature: ecr +Description: C++ SDK for the AWS ecr service + +Feature: ecs +Description: C++ SDK for the AWS ecs service + +Feature: elasticache +Description: C++ SDK for the AWS elasticache service + +Feature: elasticbeanstalk +Description: C++ SDK for the AWS elasticbeanstalk service + +Feature: elasticfilesystem +Description: C++ SDK for the AWS elasticfilesystem service + +Feature: elasticloadbalancing +Description: C++ SDK for the AWS elasticloadbalancing service + +Feature: elasticloadbalancingv2 +Description: C++ SDK for the AWS elasticloadbalancingv2 service + +Feature: elasticmapreduce +Description: C++ SDK for the AWS elasticmapreduce service + +Feature: elastictranscoder +Description: C++ SDK for the AWS elastictranscoder service + +Feature: email +Description: C++ SDK for the AWS email service + +Feature: es +Description: C++ SDK for the AWS es service + +Feature: events +Description: C++ SDK for the AWS events service + +Feature: firehose +Description: C++ SDK for the AWS firehose service + +Feature: gamelift +Description: C++ SDK for the AWS gamelift service + +Feature: glacier +Description: C++ SDK for the AWS glacier service + +Feature: glue +Description: C++ SDK for the AWS glue service + +Feature: greengrass +Description: C++ SDK for the AWS greengrass service + +Feature: guardduty +Description: C++ SDK for the AWS guardduty service + +Feature: health +Description: C++ SDK for the AWS health service + +Feature: iam +Description: C++ SDK for the AWS iam service + +Feature: identity-management +Description: C++ SDK for the AWS identity-management service + +Feature: importexport +Description: C++ SDK for the AWS importexport service + +Feature: inspector +Description: C++ SDK for the AWS inspector service + +Feature: iot +Description: C++ SDK for the AWS iot service + +Feature: iot-data +Description: C++ SDK for the AWS iot-data service + +Feature: iot-jobs-data +Description: C++ SDK for the AWS iot-jobs-data service + +Feature: kinesis +Description: C++ SDK for the AWS kinesis service + +Feature: kinesis-video-archived-media +Description: C++ SDK for the AWS kinesis-video-archived-media service + +Feature: kinesis-video-media +Description: C++ SDK for the AWS kinesis-video-media service + +Feature: kinesisanalytics +Description: C++ SDK for the AWS kinesisanalytics service + +Feature: kinesisvideo +Description: C++ SDK for the AWS kinesisvideo service + +Feature: kms +Description: C++ SDK for the AWS kms service + +Feature: lambda +Description: C++ SDK for the AWS lambda service + +Feature: lex +Description: C++ SDK for the AWS lex service + +Feature: lex-models +Description: C++ SDK for the AWS lex-models service + +Feature: lightsail +Description: C++ SDK for the AWS lightsail service + +Feature: logs +Description: C++ SDK for the AWS logs service + +Feature: machinelearning +Description: C++ SDK for the AWS machinelearning service + +Feature: marketplace-entitlement +Description: C++ SDK for the AWS marketplace-entitlement service + +Feature: marketplacecommerceanalytics +Description: C++ SDK for the AWS marketplacecommerceanalytics service + +Feature: mediaconvert +Description: C++ SDK for the AWS mediaconvert service + +Feature: medialive +Description: C++ SDK for the AWS medialive service + +Feature: mediapackage +Description: C++ SDK for the AWS mediapackage service + +Feature: mediastore +Description: C++ SDK for the AWS mediastore service + +Feature: mediastore-data +Description: C++ SDK for the AWS mediastore-data service + +Feature: meteringmarketplace +Description: C++ SDK for the AWS meteringmarketplace service + +Feature: mobile +Description: C++ SDK for the AWS mobile service + +Feature: mobileanalytics +Description: C++ SDK for the AWS mobileanalytics service + +Feature: monitoring +Description: C++ SDK for the AWS monitoring service + +Feature: mq +Description: C++ SDK for the AWS mq service + +Feature: mturk-requester +Description: C++ SDK for the AWS mturk-requester service + +Feature: opsworks +Description: C++ SDK for the AWS opsworks service + +Feature: opsworkscm +Description: C++ SDK for the AWS opsworkscm service + +Feature: organizations +Description: C++ SDK for the AWS organizations service + +Feature: pinpoint +Description: C++ SDK for the AWS pinpoint service + +Feature: polly +Description: C++ SDK for the AWS polly service + +Feature: polly-sample +Description: C++ SDK for the AWS polly-sample service + +Feature: pricing +Description: C++ SDK for the AWS pricing service + +Feature: queues +Description: C++ SDK for the AWS queues service + +Feature: rds +Description: C++ SDK for the AWS rds service + +Feature: redshift +Description: C++ SDK for the AWS redshift service + +Feature: rekognition +Description: C++ SDK for the AWS rekognition service + +Feature: resource-groups +Description: C++ SDK for the AWS resource-groups service + +Feature: resourcegroupstaggingapi +Description: C++ SDK for the AWS resourcegroupstaggingapi service + +Feature: route53 +Description: C++ SDK for the AWS route53 service + +Feature: route53domains +Description: C++ SDK for the AWS route53domains service + +Feature: s3 +Description: C++ SDK for the AWS s3 service + +Feature: s3-encryption +Description: C++ SDK for the AWS s3-encryption service + +Feature: sagemaker +Description: C++ SDK for the AWS sagemaker service + +Feature: sagemaker-runtime +Description: C++ SDK for the AWS sagemaker-runtime service + +Feature: sdb +Description: C++ SDK for the AWS sdb service + +Feature: serverlessrepo +Description: C++ SDK for the AWS serverlessrepo service + +Feature: servicecatalog +Description: C++ SDK for the AWS servicecatalog service + +Feature: servicediscovery +Description: C++ SDK for the AWS servicediscovery service + +Feature: shield +Description: C++ SDK for the AWS shield service + +Feature: sms +Description: C++ SDK for the AWS sms service + +Feature: snowball +Description: C++ SDK for the AWS snowball service + +Feature: sns +Description: C++ SDK for the AWS sns service + +Feature: sqs +Description: C++ SDK for the AWS sqs service + +Feature: ssm +Description: C++ SDK for the AWS ssm service + +Feature: states +Description: C++ SDK for the AWS states service + +Feature: storagegateway +Description: C++ SDK for the AWS storagegateway service + +Feature: sts +Description: C++ SDK for the AWS sts service + +Feature: support +Description: C++ SDK for the AWS support service + +Feature: swf +Description: C++ SDK for the AWS swf service + +Feature: text-to-speech +Description: C++ SDK for the AWS text-to-speech service + +Feature: transcribe +Description: C++ SDK for the AWS transcribe service + +Feature: transfer +Description: C++ SDK for the AWS transfer service + +Feature: translate +Description: C++ SDK for the AWS translate service + +Feature: waf +Description: C++ SDK for the AWS waf service + +Feature: waf-regional +Description: C++ SDK for the AWS waf-regional service + +Feature: workdocs +Description: C++ SDK for the AWS workdocs service + +Feature: workmail +Description: C++ SDK for the AWS workmail service + +Feature: workspaces +Description: C++ SDK for the AWS workspaces service + +Feature: xray +Description: C++ SDK for the AWS xray service diff --git a/ports/aws-sdk-cpp/CONTROL.in b/ports/aws-sdk-cpp/CONTROL.in new file mode 100644 index 000000000..5cf05fdff --- /dev/null +++ b/ports/aws-sdk-cpp/CONTROL.in @@ -0,0 +1,4 @@ +Source: aws-sdk-cpp +Version: 1.4.21 +Description: AWS SDK for C++ +Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs diff --git a/ports/aws-sdk-cpp/compute_build_only.cmake b/ports/aws-sdk-cpp/compute_build_only.cmake new file mode 100644 index 000000000..de24a203a --- /dev/null +++ b/ports/aws-sdk-cpp/compute_build_only.cmake @@ -0,0 +1,418 @@ +# Automatically generated by generateFeatures.ps1 +if("access-management" IN_LIST FEATURES) + list(APPEND BUILD_ONLY access-management) +endif() +if("acm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY acm) +endif() +if("alexaforbusiness" IN_LIST FEATURES) + list(APPEND BUILD_ONLY alexaforbusiness) +endif() +if("apigateway" IN_LIST FEATURES) + list(APPEND BUILD_ONLY apigateway) +endif() +if("application-autoscaling" IN_LIST FEATURES) + list(APPEND BUILD_ONLY application-autoscaling) +endif() +if("appstream" IN_LIST FEATURES) + list(APPEND BUILD_ONLY appstream) +endif() +if("appsync" IN_LIST FEATURES) + list(APPEND BUILD_ONLY appsync) +endif() +if("athena" IN_LIST FEATURES) + list(APPEND BUILD_ONLY athena) +endif() +if("autoscaling" IN_LIST FEATURES) + list(APPEND BUILD_ONLY autoscaling) +endif() +if("autoscaling-plans" IN_LIST FEATURES) + list(APPEND BUILD_ONLY autoscaling-plans) +endif() +if("AWSMigrationHub" IN_LIST FEATURES) + list(APPEND BUILD_ONLY AWSMigrationHub) +endif() +if("batch" IN_LIST FEATURES) + list(APPEND BUILD_ONLY batch) +endif() +if("budgets" IN_LIST FEATURES) + list(APPEND BUILD_ONLY budgets) +endif() +if("ce" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ce) +endif() +if("cloud9" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloud9) +endif() +if("clouddirectory" IN_LIST FEATURES) + list(APPEND BUILD_ONLY clouddirectory) +endif() +if("cloudformation" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudformation) +endif() +if("cloudfront" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudfront) +endif() +if("cloudhsm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudhsm) +endif() +if("cloudhsmv2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudhsmv2) +endif() +if("cloudsearch" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudsearch) +endif() +if("cloudsearchdomain" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudsearchdomain) +endif() +if("cloudtrail" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudtrail) +endif() +if("codebuild" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codebuild) +endif() +if("codecommit" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codecommit) +endif() +if("codedeploy" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codedeploy) +endif() +if("codepipeline" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codepipeline) +endif() +if("codestar" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codestar) +endif() +if("cognito-identity" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cognito-identity) +endif() +if("cognito-idp" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cognito-idp) +endif() +if("cognito-sync" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cognito-sync) +endif() +if("comprehend" IN_LIST FEATURES) + list(APPEND BUILD_ONLY comprehend) +endif() +if("config" IN_LIST FEATURES) + list(APPEND BUILD_ONLY config) +endif() +if("cur" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cur) +endif() +if("datapipeline" IN_LIST FEATURES) + list(APPEND BUILD_ONLY datapipeline) +endif() +if("dax" IN_LIST FEATURES) + list(APPEND BUILD_ONLY dax) +endif() +if("devicefarm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY devicefarm) +endif() +if("directconnect" IN_LIST FEATURES) + list(APPEND BUILD_ONLY directconnect) +endif() +if("discovery" IN_LIST FEATURES) + list(APPEND BUILD_ONLY discovery) +endif() +if("dms" IN_LIST FEATURES) + list(APPEND BUILD_ONLY dms) +endif() +if("ds" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ds) +endif() +if("dynamodb" IN_LIST FEATURES) + list(APPEND BUILD_ONLY dynamodb) +endif() +if("dynamodbstreams" IN_LIST FEATURES) + list(APPEND BUILD_ONLY dynamodbstreams) +endif() +if("ec2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ec2) +endif() +if("ecr" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ecr) +endif() +if("ecs" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ecs) +endif() +if("elasticache" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticache) +endif() +if("elasticbeanstalk" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticbeanstalk) +endif() +if("elasticfilesystem" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticfilesystem) +endif() +if("elasticloadbalancing" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticloadbalancing) +endif() +if("elasticloadbalancingv2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticloadbalancingv2) +endif() +if("elasticmapreduce" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticmapreduce) +endif() +if("elastictranscoder" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elastictranscoder) +endif() +if("email" IN_LIST FEATURES) + list(APPEND BUILD_ONLY email) +endif() +if("es" IN_LIST FEATURES) + list(APPEND BUILD_ONLY es) +endif() +if("events" IN_LIST FEATURES) + list(APPEND BUILD_ONLY events) +endif() +if("firehose" IN_LIST FEATURES) + list(APPEND BUILD_ONLY firehose) +endif() +if("gamelift" IN_LIST FEATURES) + list(APPEND BUILD_ONLY gamelift) +endif() +if("glacier" IN_LIST FEATURES) + list(APPEND BUILD_ONLY glacier) +endif() +if("glue" IN_LIST FEATURES) + list(APPEND BUILD_ONLY glue) +endif() +if("greengrass" IN_LIST FEATURES) + list(APPEND BUILD_ONLY greengrass) +endif() +if("guardduty" IN_LIST FEATURES) + list(APPEND BUILD_ONLY guardduty) +endif() +if("health" IN_LIST FEATURES) + list(APPEND BUILD_ONLY health) +endif() +if("iam" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iam) +endif() +if("identity-management" IN_LIST FEATURES) + list(APPEND BUILD_ONLY identity-management) +endif() +if("importexport" IN_LIST FEATURES) + list(APPEND BUILD_ONLY importexport) +endif() +if("inspector" IN_LIST FEATURES) + list(APPEND BUILD_ONLY inspector) +endif() +if("iot" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iot) +endif() +if("iot-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iot-data) +endif() +if("iot-jobs-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iot-jobs-data) +endif() +if("kinesis" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesis) +endif() +if("kinesis-video-archived-media" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesis-video-archived-media) +endif() +if("kinesis-video-media" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesis-video-media) +endif() +if("kinesisanalytics" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesisanalytics) +endif() +if("kinesisvideo" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesisvideo) +endif() +if("kms" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kms) +endif() +if("lambda" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lambda) +endif() +if("lex" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lex) +endif() +if("lex-models" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lex-models) +endif() +if("lightsail" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lightsail) +endif() +if("logs" IN_LIST FEATURES) + list(APPEND BUILD_ONLY logs) +endif() +if("machinelearning" IN_LIST FEATURES) + list(APPEND BUILD_ONLY machinelearning) +endif() +if("marketplace-entitlement" IN_LIST FEATURES) + list(APPEND BUILD_ONLY marketplace-entitlement) +endif() +if("marketplacecommerceanalytics" IN_LIST FEATURES) + list(APPEND BUILD_ONLY marketplacecommerceanalytics) +endif() +if("mediaconvert" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediaconvert) +endif() +if("medialive" IN_LIST FEATURES) + list(APPEND BUILD_ONLY medialive) +endif() +if("mediapackage" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediapackage) +endif() +if("mediastore" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediastore) +endif() +if("mediastore-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediastore-data) +endif() +if("meteringmarketplace" IN_LIST FEATURES) + list(APPEND BUILD_ONLY meteringmarketplace) +endif() +if("mobile" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mobile) +endif() +if("mobileanalytics" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mobileanalytics) +endif() +if("monitoring" IN_LIST FEATURES) + list(APPEND BUILD_ONLY monitoring) +endif() +if("mq" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mq) +endif() +if("mturk-requester" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mturk-requester) +endif() +if("opsworks" IN_LIST FEATURES) + list(APPEND BUILD_ONLY opsworks) +endif() +if("opsworkscm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY opsworkscm) +endif() +if("organizations" IN_LIST FEATURES) + list(APPEND BUILD_ONLY organizations) +endif() +if("pinpoint" IN_LIST FEATURES) + list(APPEND BUILD_ONLY pinpoint) +endif() +if("polly" IN_LIST FEATURES) + list(APPEND BUILD_ONLY polly) +endif() +if("polly-sample" IN_LIST FEATURES) + list(APPEND BUILD_ONLY polly-sample) +endif() +if("pricing" IN_LIST FEATURES) + list(APPEND BUILD_ONLY pricing) +endif() +if("queues" IN_LIST FEATURES) + list(APPEND BUILD_ONLY queues) +endif() +if("rds" IN_LIST FEATURES) + list(APPEND BUILD_ONLY rds) +endif() +if("redshift" IN_LIST FEATURES) + list(APPEND BUILD_ONLY redshift) +endif() +if("rekognition" IN_LIST FEATURES) + list(APPEND BUILD_ONLY rekognition) +endif() +if("resource-groups" IN_LIST FEATURES) + list(APPEND BUILD_ONLY resource-groups) +endif() +if("resourcegroupstaggingapi" IN_LIST FEATURES) + list(APPEND BUILD_ONLY resourcegroupstaggingapi) +endif() +if("route53" IN_LIST FEATURES) + list(APPEND BUILD_ONLY route53) +endif() +if("route53domains" IN_LIST FEATURES) + list(APPEND BUILD_ONLY route53domains) +endif() +if("s3" IN_LIST FEATURES) + list(APPEND BUILD_ONLY s3) +endif() +if("s3-encryption" IN_LIST FEATURES) + list(APPEND BUILD_ONLY s3-encryption) +endif() +if("sagemaker" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sagemaker) +endif() +if("sagemaker-runtime" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sagemaker-runtime) +endif() +if("sdb" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sdb) +endif() +if("serverlessrepo" IN_LIST FEATURES) + list(APPEND BUILD_ONLY serverlessrepo) +endif() +if("servicecatalog" IN_LIST FEATURES) + list(APPEND BUILD_ONLY servicecatalog) +endif() +if("servicediscovery" IN_LIST FEATURES) + list(APPEND BUILD_ONLY servicediscovery) +endif() +if("shield" IN_LIST FEATURES) + list(APPEND BUILD_ONLY shield) +endif() +if("sms" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sms) +endif() +if("snowball" IN_LIST FEATURES) + list(APPEND BUILD_ONLY snowball) +endif() +if("sns" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sns) +endif() +if("sqs" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sqs) +endif() +if("ssm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ssm) +endif() +if("states" IN_LIST FEATURES) + list(APPEND BUILD_ONLY states) +endif() +if("storagegateway" IN_LIST FEATURES) + list(APPEND BUILD_ONLY storagegateway) +endif() +if("sts" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sts) +endif() +if("support" IN_LIST FEATURES) + list(APPEND BUILD_ONLY support) +endif() +if("swf" IN_LIST FEATURES) + list(APPEND BUILD_ONLY swf) +endif() +if("text-to-speech" IN_LIST FEATURES) + list(APPEND BUILD_ONLY text-to-speech) +endif() +if("transcribe" IN_LIST FEATURES) + list(APPEND BUILD_ONLY transcribe) +endif() +if("transfer" IN_LIST FEATURES) + list(APPEND BUILD_ONLY transfer) +endif() +if("translate" IN_LIST FEATURES) + list(APPEND BUILD_ONLY translate) +endif() +if("waf" IN_LIST FEATURES) + list(APPEND BUILD_ONLY waf) +endif() +if("waf-regional" IN_LIST FEATURES) + list(APPEND BUILD_ONLY waf-regional) +endif() +if("workdocs" IN_LIST FEATURES) + list(APPEND BUILD_ONLY workdocs) +endif() +if("workmail" IN_LIST FEATURES) + list(APPEND BUILD_ONLY workmail) +endif() +if("workspaces" IN_LIST FEATURES) + list(APPEND BUILD_ONLY workspaces) +endif() +if("xray" IN_LIST FEATURES) + list(APPEND BUILD_ONLY xray) +endif() diff --git a/ports/aws-sdk-cpp/disable_warning_as_error.patch b/ports/aws-sdk-cpp/disable_warning_as_error.patch deleted file mode 100644 index ec5587eb8..000000000 --- a/ports/aws-sdk-cpp/disable_warning_as_error.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmake/compiler_settings.cmake b/cmake/compiler_settings.cmake -index 36795a2..77334ee 100644 ---- a/cmake/compiler_settings.cmake -+++ b/cmake/compiler_settings.cmake -@@ -57,7 +57,7 @@ endif() - if(MSVC) - # warnings as errors, max warning level (4) - if(NOT CMAKE_CXX_FLAGS MATCHES "/WX") -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") -+ #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") - endif() - - # taken from http://stackoverflow.com/questions/2368811/how-to-set-warning-level-in-cmake diff --git a/ports/aws-sdk-cpp/drop_git.patch b/ports/aws-sdk-cpp/drop_git.patch deleted file mode 100644 index 491831bd7..000000000 --- a/ports/aws-sdk-cpp/drop_git.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9d2a98a..ce58b68 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -22,7 +22,7 @@ if(CMAKE_MAJOR_VERSION LESS 3) - endif() - - # git is required for Android builds and optional for all other platforms --find_package(Git) -+#find_package(Git) - - # Cmake invocation variables: - # CUSTOM_MEMORY_MANAGEMENT - if set to 1, generates the sdk project files with custom memory management enabled, otherwise disables it diff --git a/ports/aws-sdk-cpp/generateFeatures.ps1 b/ports/aws-sdk-cpp/generateFeatures.ps1 new file mode 100644 index 000000000..cd61a794f --- /dev/null +++ b/ports/aws-sdk-cpp/generateFeatures.ps1 @@ -0,0 +1,50 @@ +[CmdletBinding()] +param( + [Parameter(Mandatory=$true)][string]$ExtractedSources, + [Parameter(Mandatory=$true)][string]$ControlFileIn, + [Parameter(Mandatory=$true)][string]$ControlFile, + [Parameter(Mandatory=$true)][string]$CMakeFragmentFile +) + +$subfolders = Get-Item $ExtractedSources\aws-cpp-sdk-* + +$controltext = gc $ControlFileIn +$controltext += @("# Automatically generated by generateFeatures.ps1") + +$cmakefragmenttext = @("# Automatically generated by generateFeatures.ps1") + +function GetDescription($dir, $modulename) +{ + if (Test-Path "$dir\CMakeLists.txt") + { + $descs = @(Select-String -Path "$dir\CMakeLists.txt" -Pattern "`"C\+\+ SDK for the AWS [^`"]*`"") + if ($descs.count -eq 1) { + $desc = $descs[0].Matches.Value -replace "`"","" + "Description: $desc" + } + else { "Description: C++ SDK for the AWS $modulename service" } + } + else { "Description: C++ SDK for the AWS $modulename service" } +} + +$subfolders | % { + $modulename = $_.name -replace "^aws-cpp-sdk-","" + if ($modulename -match "-tests`$") { return } + if ($modulename -eq "core") { return } + + $controltext += @("") + $controltext += @("Feature: $modulename") + $controltext += @(GetDescription $_ $modulename) + + $cmakefragmenttext += @( + "if(`"$modulename`" IN_LIST FEATURES)", + " list(APPEND BUILD_ONLY $modulename)", + "endif()" + ) +} + +Write-Verbose ($controltext -join "`n") +$controltext | out-file -enc ascii $ControlFile + +Write-Verbose ($cmakefragmenttext -join "`n") +$cmakefragmenttext | out-file -enc ascii $CMakeFragmentFile diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index d21932496..3adfa15d0 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,79 +3,77 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.3.58 - SHA512 755fe3fd9d507a43fb03c1530a979f5a5a2848588ccab39509987043b3d274f27a7b163bf078a006123450ee881fd4a092cd703246f6f669810f47c186c2b0b8 + REF 1.4.21 + SHA512 b8d063048b9d879603ace5210b671497336e8160cb3b7d10772465db538d95176458446faa9dccd5cc2d7a2c3242239fc3b80a8aa3a5878a0e2b4fc6673b4a35 HEAD_REF master ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/drop_git.patch - ${CMAKE_CURRENT_LIST_DIR}/disable_warning_as_error.patch -) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" FORCE_SHARED_CRT) -if(VCPKG_CRT_LINKAGE STREQUAL static) - set(FORCE_SHARED_CRT OFF) -else() - set(FORCE_SHARED_CRT ON) -endif() +set(BUILD_ONLY core) + +include(${CMAKE_CURRENT_LIST_DIR}/compute_build_only.cmake) + +# This handles escaping the list +string(REPLACE ";" "\\\\\\;" BUILD_ONLY "${BUILD_ONLY}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DENABLE_TESTING=OFF - -DFORCE_SHARED_CRT=${FORCE_SHARED_CRT} + PREFER_NINJA + OPTIONS + -DENABLE_UNITY_BUILD=ON + -DENABLE_TESTING=OFF + -DFORCE_SHARED_CRT=${FORCE_SHARED_CRT} + -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE + "-DBUILD_ONLY=${BUILD_ONLY}" ) vcpkg_install_cmake() -file(GLOB CMAKE_FILES ${CURRENT_PACKAGES_DIR}/lib/cmake/*) - -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) - -file(COPY ${CMAKE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) vcpkg_copy_pdbs() -file(GLOB AWS_TARGETS "${CURRENT_PACKAGES_DIR}/share/aws-cpp-sdk-*/aws-cpp-sdk-*targets.cmake") -foreach(AWS_TARGETS ${AWS_TARGETS}) - file(READ ${AWS_TARGETS} _contents) +file(GLOB_RECURSE AWS_TARGETS "${CURRENT_PACKAGES_DIR}/share/*/*-targets-*.cmake") +foreach(AWS_TARGET IN LISTS AWS_TARGETS) + file(READ ${AWS_TARGET} _contents) string(REGEX REPLACE - "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" - "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + "bin\\/([A-Za-z0-9_.-]+\\.lib)" + "lib/\\1" _contents "${_contents}") - file(WRITE ${AWS_TARGETS} "${_contents}") + file(WRITE ${AWS_TARGET} "${_contents}") endforeach() -file(GLOB AWS_TARGETS_RELEASE "${CURRENT_PACKAGES_DIR}/share/aws-cpp-sdk-*/aws-cpp-sdk-*targets-release.cmake") -foreach(AWS_TARGETS_RELEASE ${AWS_TARGETS_RELEASE}) - file(READ ${AWS_TARGETS_RELEASE} _contents) - string(REGEX REPLACE - "bin\\/([A-Za-z0-9_.-]+lib)" - "lib/\\1" - _contents "${_contents}") - file(WRITE ${AWS_TARGETS_RELEASE} "${_contents}") +file(GLOB AWS_CONFIGS "${CURRENT_PACKAGES_DIR}/share/*/aws-cpp-sdk-*-config.cmake") +list(FILTER AWS_CONFIGS EXCLUDE REGEX "aws-cpp-sdk-core-config\\.cmake\$") +foreach(AWS_CONFIG IN LISTS AWS_CONFIGS) + file(READ "${AWS_CONFIG}" _contents) + file(WRITE "${AWS_CONFIG}" "include(CMakeFindDependencyMacro)\nfind_dependency(aws-cpp-sdk-core)\n${_contents}") endforeach() -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/lib/cmake - ${CURRENT_PACKAGES_DIR}/lib/pkgconfig - ${CURRENT_PACKAGES_DIR}/debug/lib/cmake - ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig - ${CURRENT_PACKAGES_DIR}/nuget - ${CURRENT_PACKAGES_DIR}/debug/nuget) +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/share/AWSSDK + ${CURRENT_PACKAGES_DIR}/lib/pkgconfig + ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig + ${CURRENT_PACKAGES_DIR}/nuget + ${CURRENT_PACKAGES_DIR}/debug/nuget +) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib) - file(GLOB DEBUG_LIB_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib) - file(COPY ${LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(COPY ${DEBUG_LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(REMOVE ${LIB_FILES} ${DEBUG_LIB_FILES}) - - file(APPEND ${CURRENT_PACKAGES_DIR}/include/aws/core/SDKConfig.h "#define USE_IMPORT_EXPORT") + file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib) + if(LIB_FILES) + file(COPY ${LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE ${LIB_FILES}) + endif() + file(GLOB DEBUG_LIB_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib) + if(DEBUG_LIB_FILES) + file(COPY ${DEBUG_LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE ${DEBUG_LIB_FILES}) + endif() + + file(APPEND ${CURRENT_PACKAGES_DIR}/include/aws/core/SDKConfig.h "#ifndef USE_IMPORT_EXPORT\n#define USE_IMPORT_EXPORT\n#endif") endif() # Handle copyright diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 7f1f827c2..475047737 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -81,7 +81,7 @@ function(vcpkg_fixup_cmake_targets) endif() endif() - file(GLOB UNUSED_FILES + file(GLOB_RECURSE UNUSED_FILES "${DEBUG_SHARE}/*[Tt]argets.cmake" "${DEBUG_SHARE}/*[Cc]onfig.cmake" "${DEBUG_SHARE}/*[Cc]onfigVersion.cmake" @@ -91,10 +91,10 @@ function(vcpkg_fixup_cmake_targets) file(REMOVE ${UNUSED_FILES}) endif() - file(GLOB RELEASE_TARGETS + file(GLOB_RECURSE RELEASE_TARGETS "${RELEASE_SHARE}/*-release.cmake" ) - foreach(RELEASE_TARGET ${RELEASE_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}") @@ -102,25 +102,25 @@ function(vcpkg_fixup_cmake_targets) endforeach() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(GLOB DEBUG_TARGETS + file(GLOB_RECURSE DEBUG_TARGETS "${DEBUG_SHARE}/*-debug.cmake" ) - foreach(DEBUG_TARGET ${DEBUG_TARGETS}) - get_filename_component(DEBUG_TARGET_NAME ${DEBUG_TARGET} NAME) + foreach(DEBUG_TARGET IN LISTS DEBUG_TARGETS) + file(RELATIVE_PATH DEBUG_TARGET_REL "${DEBUG_SHARE}" "${DEBUG_TARGET}") 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(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" _contents "${_contents}") string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/${_vfct_TARGET_PATH}/${DEBUG_TARGET_NAME} "${_contents}") + file(WRITE ${RELEASE_SHARE}/${DEBUG_TARGET_REL} "${_contents}") file(REMOVE ${DEBUG_TARGET}) endforeach() endif() - file(GLOB MAIN_TARGETS "${RELEASE_SHARE}/*[Tt]argets.cmake") - foreach(MAIN_TARGET ${MAIN_TARGETS}) + file(GLOB_RECURSE MAIN_TARGETS "${RELEASE_SHARE}/*[Tt]argets.cmake") + foreach(MAIN_TARGET IN LISTS MAIN_TARGETS) file(READ ${MAIN_TARGET} _contents) string(REGEX REPLACE "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" @@ -133,8 +133,8 @@ function(vcpkg_fixup_cmake_targets) file(WRITE ${MAIN_TARGET} "${_contents}") endforeach() - file(GLOB MAIN_CONFIGS "${RELEASE_SHARE}/*[Cc]onfig.cmake") - foreach(MAIN_CONFIG ${MAIN_CONFIGS}) + file(GLOB_RECURSE MAIN_CONFIGS "${RELEASE_SHARE}/*[Cc]onfig.cmake") + foreach(MAIN_CONFIG IN LISTS MAIN_CONFIGS) file(READ ${MAIN_CONFIG} _contents) string(REGEX REPLACE "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" -- cgit v1.2.3 From 21909157e28363480a02d2e30697e8c3d5f36e53 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 24 Mar 2018 15:00:47 -0700 Subject: [soundtouch] Use CMake --- ports/soundtouch/CMakeLists.txt | 32 +++++++++++++++++++++++ ports/soundtouch/CONTROL | 2 +- ports/soundtouch/portfile.cmake | 56 ++++++++--------------------------------- 3 files changed, 44 insertions(+), 46 deletions(-) create mode 100644 ports/soundtouch/CMakeLists.txt diff --git a/ports/soundtouch/CMakeLists.txt b/ports/soundtouch/CMakeLists.txt new file mode 100644 index 000000000..a15daefe4 --- /dev/null +++ b/ports/soundtouch/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.5) +project(soundtouch CXX) + +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(ARCH_SUFFIX _x64) +else() + set(ARCH_SUFFIX) +endif() + +if(BUILD_SHARED_LIBS) + set(TYPE_SUFFIX Dll) +else() + set(TYPE_SUFFIX $<$:D>) +endif() + +file(GLOB SOUNDTOUCH_SOURCES source/SoundTouch/*.cpp) +add_library(libsoundtouch ${SOUNDTOUCH_SOURCES}) +target_include_directories(libsoundtouch PUBLIC include) +set_target_properties(libsoundtouch PROPERTIES OUTPUT_NAME SoundTouch${TYPE_SUFFIX}${ARCH_SUFFIX}) +if(BUILD_SHARED_LIBS) + target_compile_definitions(libsoundtouch PRIVATE -DDLL_EXPORTS) + target_sources(libsoundtouch PRIVATE + source/SoundTouchDLL/SoundTouchDLL.cpp + source/SoundTouchDLL/SoundTouchDLL.rc + ) +endif() + +install(TARGETS libsoundtouch + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/ports/soundtouch/CONTROL b/ports/soundtouch/CONTROL index cc37ea89f..7ae158b88 100644 --- a/ports/soundtouch/CONTROL +++ b/ports/soundtouch/CONTROL @@ -1,4 +1,4 @@ Source: soundtouch -Version: 2.0.0 +Version: 2.0.0-1 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 diff --git a/ports/soundtouch/portfile.cmake b/ports/soundtouch/portfile.cmake index cadf5e705..b7fb1fb45 100644 --- a/ports/soundtouch/portfile.cmake +++ b/ports/soundtouch/portfile.cmake @@ -1,11 +1,15 @@ include(vcpkg_common_functions) # NOTE: SoundTouch has a static c++ version too, but entirely different headers, api, etc -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") message(STATUS "Warning: Static building not supported. Building dynamic.") set(VCPKG_LIBRARY_LINKAGE dynamic) endif() +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Refusing to build DLL with static CRT linkage.") +endif() + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "WindowsStore not supported") endif() @@ -18,56 +22,18 @@ vcpkg_download_distfile(ARCHIVE FILENAME "soundtouch-${VERSION}.zip" SHA512 50ef36b6cd21c16e235b908c5518e29b159b11f658a014c47fe767d3d8acebaefefec0ce253b4ed322cbd26387c69c0ed464ddace0c098e61d56d55c198117a5 ) - -# MSBuild performs in-source builds, so to ensure reliability we must clear them each time -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) - vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_execute_required_process( - COMMAND "devenv.exe" - "SoundTouchDLL.sln" - /Upgrade - WORKING_DIRECTORY ${SOURCE_PATH}/source/SoundTouchDLL - LOGNAME upgrade-Packet-${TARGET_TRIPLET} -) - -IF (TRIPLET_SYSTEM_ARCH MATCHES "x64") - # There is no x64 Debug target - SET(BUILD_RELEASE_CONFIGURATION "ReleaseX64") - SET(BUILD_DEBUG_CONFIGURATION "ReleaseX64") -ELSE() - SET(BUILD_RELEASE_CONFIGURATION "Release") - SET(BUILD_DEBUG_CONFIGURATION "Debug") -ENDIF() - -SET(BUILD_ARCH "Win32") +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/source/SoundTouchDLL/SoundTouchDLL.sln - PLATFORM ${BUILD_ARCH} - RELEASE_CONFIGURATION ${BUILD_RELEASE_CONFIGURATION} - DEBUG_CONFIGURATION ${BUILD_DEBUG_CONFIGURATION} +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) -file(INSTALL ${SOURCE_PATH}/source/SoundTouchDLL/SoundTouchDLL.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +vcpkg_install_cmake() -# Handle libraries -IF (BUILD_RELEASE_CONFIGURATION STREQUAL ReleaseX64) - file(INSTALL ${SOURCE_PATH}/lib/SoundTouch_x64.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(INSTALL ${SOURCE_PATH}/lib/SoundTouchDll_x64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -ELSE() - file(INSTALL ${SOURCE_PATH}/lib/SoundTouch.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(INSTALL ${SOURCE_PATH}/lib/SoundTouchDll.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -ENDIF() - -IF (BUILD_DEBUG_CONFIGURATION STREQUAL ReleaseX64) - file(INSTALL ${SOURCE_PATH}/lib/SoundTouch_x64.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(INSTALL ${SOURCE_PATH}/lib/SoundTouchDll_x64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -ELSE() - file(INSTALL ${SOURCE_PATH}/lib/SoundTouchD.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(INSTALL ${SOURCE_PATH}/lib/SoundTouchDllD.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -ENDIF() +file(INSTALL ${SOURCE_PATH}/source/SoundTouchDLL/SoundTouchDLL.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(COPY ${SOURCE_PATH}/COPYING.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/soundtouch) file(RENAME ${CURRENT_PACKAGES_DIR}/share/soundtouch/COPYING.TXT ${CURRENT_PACKAGES_DIR}/share/soundtouch/copyright) -- cgit v1.2.3 From 21ef72d02a7ea840b3427bda2ea2705aeaef2f00 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Sun, 25 Mar 2018 08:33:34 +0900 Subject: Updating HPX to V1.1 (#3120) * Updating HPX to V1.1 * [hpx] Use vcpkg_fixup_cmake_targets --- ports/hpx/CONTROL | 10 +-- ports/hpx/boost-1-66.patch | 38 -------- ports/hpx/portfile.cmake | 213 ++++++++++++++++++++------------------------- 3 files changed, 99 insertions(+), 162 deletions(-) delete mode 100644 ports/hpx/boost-1-66.patch diff --git a/ports/hpx/CONTROL b/ports/hpx/CONTROL index 471b64986..ff6801a42 100644 --- a/ports/hpx/CONTROL +++ b/ports/hpx/CONTROL @@ -1,5 +1,5 @@ -Source: hpx -Version: 1.0.0-8 -Build-Depends: hwloc, boost-chrono, boost-date-time, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread, boost-context, boost-iostreams, boost-random, boost-atomic, boost-asio, boost-dynamic-bitset, boost-assign, boost-format, boost-signals2, boost-parameter, boost-bimap, boost-accumulators, boost-lockfree, boost-icl -Description: The C++ Standards Library for Concurrency and Parallelism - HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case. +Source: hpx +Version: 1.1.0-1 +Build-Depends: hwloc, boost-accumulators, boost-algorithm, boost-asio, boost-assign, boost-atomic, boost-bimap, boost-chrono, boost-config, boost-context, boost-date-time, boost-dynamic-bitset, boost-exception, boost-filesystem, boost-format, boost-iostreams, boost-lockfree, boost-parameter, boost-program-options, boost-range, boost-regex, boost-signals2, boost-smart-ptr, boost-spirit, boost-system, boost-thread, boost-throw-exception, boost-variant, boost-winapi +Description: The C++ Standards Library for Concurrency and Parallelism + HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case. diff --git a/ports/hpx/boost-1-66.patch b/ports/hpx/boost-1-66.patch deleted file mode 100644 index 6f98a48aa..000000000 --- a/ports/hpx/boost-1-66.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/src/util/asio_util.cpp b/src/util/asio_util.cpp -index e2207de..48a35b9 100644 ---- a/src/util/asio_util.cpp -+++ b/src/util/asio_util.cpp -@@ -231,7 +231,7 @@ namespace hpx { namespace util - tcp::endpoint ep; - if (util::get_endpoint(address, port, ep)) - { -- return endpoint_iterator_type(tcp::resolver::iterator::create( -+ return endpoint_iterator_type(tcp::resolver::results_type::create( - ep, address, port_str)); - } - } -@@ -283,7 +283,7 @@ namespace hpx { namespace util - if (util::get_endpoint(address, port, ep)) - { - return endpoint_iterator_type( -- tcp::resolver::iterator::create(ep, address, port_str)); -+ tcp::resolver::results_type::create(ep, address, port_str)); - } - } - catch (boost::system::system_error const&) { -diff --git a/src/util/serialize_exception.cpp b/src/util/serialize_exception.cpp -index 935e575..22bcf37 100644 ---- a/src/util/serialize_exception.cpp -+++ b/src/util/serialize_exception.cpp -@@ -341,11 +341,7 @@ namespace hpx { namespace serialization - case hpx::util::boost_system_error: - e = hpx::detail::construct_exception( - boost::system::system_error(err_value, --#ifndef BOOST_SYSTEM_NO_DEPRECATED -- boost::system::get_system_category() --#else - boost::system::system_category() --#endif - , err_message - ) - , throw_function_, throw_file_, throw_line_, throw_back_trace_, diff --git a/ports/hpx/portfile.cmake b/ports/hpx/portfile.cmake index e03d566e8..c200a6278 100644 --- a/ports/hpx/portfile.cmake +++ b/ports/hpx/portfile.cmake @@ -1,119 +1,94 @@ -include(vcpkg_common_functions) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building of HPX not supported yet. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO STEllAR-GROUP/hpx - REF 1.0.0 - SHA512 1bb985ad8ab031a7ac034d4597a8bd26eae83fba5aed207c444211954079e10e2d5d83965a1f4ce52d1b29ecc72586c561b984c2c628673a262c07214fd1abb5 - HEAD_REF master -) - -if(NOT VCPKG_USE_HEAD_VERSION) - # apply hotfix to enable building with vcpkg - vcpkg_download_distfile(DIFF1 - URLS "http://stellar-group.org/files/hpx-Build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" - FILENAME "hpx-Build-system-changes-to-make-HPX-compile-when-built-with-vcpkg.diff" - SHA512 86df311a120686139955e1c0fdca55379594be3fa8d46d69ee59d83da351ce3bed487ab946c80f7127aab9699e470e24e545b112f92be9f971f41d95c429d01d - ) - - # apply hotfix to fix issues with building 32bit version - vcpkg_download_distfile(DIFF2 - URLS "http://stellar-group.org/files/hpx-Fixing-32bit-MSVC-compilation.diff" - FILENAME "hpx-Fixing-32bit-MSVC-compilation.diff" - SHA512 31c904d317b4c24eddd819e4856f8326ff3850a5a196c7648c46a11dbb85f35e972e077957b3c4aec67c8b043816fe1cebc92cfe28ed815f682537dfc3421b8b - ) - - # apply hotfix to fix issues when building with UNICODE enabled - vcpkg_download_distfile(DIFF3 - URLS "http://stellar-group.org/files/hpx-Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" - FILENAME "hpx-Making-sure-UNICODE-on-Windows-does-not-break-by-default.diff" - SHA512 8fcdb36307702d64b9d2b26920374a6c5a29a50d125305dc95926c4cbc91215cb0c72ede83b06d0fc007fe7b2283845e08351bd45f11f3677f0d3db4ac8f9424 - ) - - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${DIFF1} - ${DIFF2} - ${DIFF3} - ${CMAKE_CURRENT_LIST_DIR}/boost-1-66.patch - ) -endif() - -SET(BOOST_PATH "${CURRENT_INSTALLED_DIR}/share/boost") -SET(HWLOC_PATH "${CURRENT_INSTALLED_DIR}/share/hwloc") - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DBOOST_ROOT=${BOOST_PATH} - -DHWLOC_ROOT=${HWLOC_ROOT} - -DHPX_WITH_VCPKG=ON - -DHPX_WITH_HWLOC=ON - -DHPX_WITH_TESTS=OFF - -DHPX_WITH_EXAMPLES=OFF - -DHPX_WITH_TOOLS=OFF - -DHPX_WITH_RUNTIME=OFF -) - -vcpkg_install_cmake() - -# post build cleanup -if(NOT VCPKG_USE_HEAD_VERSION) - file(RENAME ${CURRENT_PACKAGES_DIR}/share/hpx-1.0.0 ${CURRENT_PACKAGES_DIR}/share/hpx) -else() - file(RENAME ${CURRENT_PACKAGES_DIR}/share/hpx-1.1.0 ${CURRENT_PACKAGES_DIR}/share/hpx) -endif() - -file(INSTALL - ${SOURCE_PATH}/LICENSE_1_0.txt - DESTINATION ${CURRENT_PACKAGES_DIR}/share/hpx RENAME copyright) - -file(GLOB __hpx_cmakes ${CURRENT_PACKAGES_DIR}/lib/cmake/HPX/*.*) -foreach(__hpx_cmake ${__hpx_cmakes}) - file(COPY ${__hpx_cmake} DESTINATION ${CURRENT_PACKAGES_DIR}/share/hpx/cmake) - file(REMOVE ${__hpx_cmake}) -endforeach() - -file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/lib/*.dll) -foreach(__hpx_dll ${__hpx_dlls}) - file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE ${__hpx_dll}) -endforeach() - -file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/lib/hpx/*.dll) -foreach(__hpx_dll ${__hpx_dlls}) - file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/bin/hpx) - file(REMOVE ${__hpx_dll}) -endforeach() - -file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) -foreach(__hpx_dll ${__hpx_dlls}) - file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${__hpx_dll}) -endforeach() - -file(GLOB __hpx_dlls ${CURRENT_PACKAGES_DIR}/debug/lib/hpx/*.dll) -foreach(__hpx_dll ${__hpx_dlls}) - file(COPY ${__hpx_dll} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/hpx) - file(REMOVE ${__hpx_dll}) -endforeach() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/bazel) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/bazel) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) - -vcpkg_copy_pdbs() - +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building of HPX not supported yet. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO STEllAR-GROUP/hpx + REF 1.1.0 + SHA512 435250143ddbd2608995fe3dc5c229a096312d7ac930925ae56d0abd2d5689886126f6e81bc7e37b84ca9bc99f951ef1f39580168a359c48788ac8d008bc7078 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + "-DBOOST_ROOT=${CURRENT_INSTALLED_DIR}/share/boost" + "-DHWLOC_ROOT=${CURRENT_INSTALLED_DIR}/share/hwloc" + -DHPX_WITH_VCPKG=ON + -DHPX_WITH_HWLOC=ON + -DHPX_WITH_TESTS=OFF + -DHPX_WITH_EXAMPLES=OFF + -DHPX_WITH_TOOLS=OFF + -DHPX_WITH_RUNTIME=OFF +) + +vcpkg_install_cmake() + +# post build cleanup +file(GLOB SHARE_DIR ${CURRENT_PACKAGES_DIR}/share/hpx-*) +file(RENAME ${SHARE_DIR} ${CURRENT_PACKAGES_DIR}/share/hpx) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/HPX) + +file(GLOB_RECURSE CMAKE_FILES "${CURRENT_PACKAGES_DIR}/share/hpx/*.cmake") +foreach(CMAKE_FILE IN LISTS CMAKE_FILES) + file(READ ${CMAKE_FILE} _contents) + string(REGEX REPLACE + "lib/([A-Za-z0-9_.-]+\\.dll)" + "bin/\\1" + _contents "${_contents}") + string(REGEX REPLACE + "lib/hpx/([A-Za-z0-9_.-]+\\.dll)" + "bin/\\1" + _contents "${_contents}") + file(WRITE ${CMAKE_FILE} "${_contents}") +endforeach() + +file(READ "${CURRENT_PACKAGES_DIR}/share/hpx/HPXMacros.cmake" _contents) +string(REPLACE "set(CMAKE_MODULE_PATH \${CMAKE_MODULE_PATH} \"\${CMAKE_CURRENT_LIST_DIR}/../../lib/cmake/HPX\")" "list(APPEND CMAKE_MODULE_PATH \"\${CMAKE_CURRENT_LIST_DIR}\")" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/hpx/HPXMacros.cmake" "${_contents}") + +file(INSTALL + ${SOURCE_PATH}/LICENSE_1_0.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/hpx RENAME copyright) + +file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll) +if(DLLS) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${DLLS}) +endif() + +file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/lib/hpx/*.dll) +if(DLLS) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${DLLS}) +endif() + +file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) +if(DLLS) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DLLS}) +endif() + +file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/hpx/*.dll) +if(DLLS) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DLLS}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/bazel) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/bazel) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 368c85f9ef80b0af1a4a81663683bc4f4fbf0e7e Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sat, 24 Mar 2018 23:53:08 -0700 Subject: [alembic] update to 1.7.7 --- ports/alembic/CONTROL | 2 +- ports/alembic/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index a1c8f7b4b..4e24aab9b 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.6 +Version: 1.7.7 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. http://alembic.io/ diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index 8bc4d98ec..a44771ab2 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alembic/alembic - REF 1.7.6 - SHA512 d77aab41cec66b0565b20ec54604754ed6ef83c97d6d27e161b1cdc28af96d624db438cf70d449166c07b8f9f281f14aeb29f9de91ccc06fb6d2934e4c46ef3a + REF 1.7.7 + SHA512 0ebcf6b9304e84bc60f1c146d0b5e5c5b1de43974ec0725293c444b48b22640945f5883eb9afd46c1ac9f0c260d6f22ff29b4866d6525c416339877be984b149 HEAD_REF master ) -- cgit v1.2.3 From 9c6698ab3446d7aed55103f785f0c00919a949fe Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 25 Mar 2018 10:29:20 -0700 Subject: [lcm] Disable unexpected components. Only install one flavor. Don't delete DLL. --- ports/lcm/CONTROL | 2 +- ports/lcm/only-install-one-flavor.patch | 19 +++++++++++++++++++ ports/lcm/portfile.cmake | 30 ++++++++++++++++++++++++++---- 3 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 ports/lcm/only-install-one-flavor.patch diff --git a/ports/lcm/CONTROL b/ports/lcm/CONTROL index e6b9803fe..0cca68404 100644 --- a/ports/lcm/CONTROL +++ b/ports/lcm/CONTROL @@ -1,5 +1,5 @@ Source: lcm -Version: 1.3.95 +Version: 1.3.95-1 Build-Depends: glib Description: Lightweight Communications and Marshalling (LCM) LCM is a set of libraries and tools for message passing and data marshalling, targeted at real-time systems where high-bandwidth and low latency are critical. It provides a publish/subscribe message passing model and automatic marshalling/unmarshalling code generation with bindings for applications in a variety of programming languages. diff --git a/ports/lcm/only-install-one-flavor.patch b/ports/lcm/only-install-one-flavor.patch new file mode 100644 index 000000000..d22b83c23 --- /dev/null +++ b/ports/lcm/only-install-one-flavor.patch @@ -0,0 +1,19 @@ +diff --git a/lcm/CMakeLists.txt b/lcm/CMakeLists.txt +index a706a85..639ec12 100644 +--- a/lcm/CMakeLists.txt ++++ b/lcm/CMakeLists.txt +@@ -76,8 +76,12 @@ endif() + target_include_directories(lcm-coretypes INTERFACE + $ + ) +- +-install(TARGETS lcm-coretypes lcm-static lcm ++if(BUILD_SHARED_LIBS) ++ set(INSTALL_TARGETS lcm) ++else() ++ set(INSTALL_TARGETS lcm-static) ++endif() ++install(TARGETS lcm-coretypes ${INSTALL_TARGETS} + EXPORT lcmTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} diff --git a/ports/lcm/portfile.cmake b/ports/lcm/portfile.cmake index 98f34e2ca..b50139f62 100644 --- a/ports/lcm/portfile.cmake +++ b/ports/lcm/portfile.cmake @@ -8,15 +8,24 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/only-install-one-flavor.patch +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DLCM_ENABLE_JAVA=OFF + -DLCM_ENABLE_LUA=OFF + -DLCM_ENABLE_PYTHON=OFF -DLCM_ENABLE_TESTS=OFF + -DLCM_INSTALL_M4MACROS=OFF + -DLCM_INSTALL_PKGCONFIG=OFF ) vcpkg_install_cmake() -vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -25,9 +34,22 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/aclocal) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/java) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(COPY ${CURRENT_PACKAGES_DIR}/bin/lcm-gen.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/lcm) +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe) +if(EXES) + file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/lcm) + file(REMOVE ${EXES}) +endif() +file(GLOB DEBUG_EXES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(DEBUG_EXES) + file(REMOVE ${DEBUG_EXES}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lcm) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lcm RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From dc193dd9e50d19f5e3272298d7990f288f702486 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sun, 25 Mar 2018 10:49:35 -0700 Subject: [libuuid] Initial commit of 1.0.3 --- ports/libuuid/CMakeLists.txt | 35 +++++++++++++++++++++++++++++++++++ ports/libuuid/CONTROL | 3 +++ ports/libuuid/config.linux.h | 13 +++++++++++++ ports/libuuid/portfile.cmake | 29 +++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 ports/libuuid/CMakeLists.txt create mode 100644 ports/libuuid/CONTROL create mode 100644 ports/libuuid/config.linux.h create mode 100644 ports/libuuid/portfile.cmake diff --git a/ports/libuuid/CMakeLists.txt b/ports/libuuid/CMakeLists.txt new file mode 100644 index 000000000..a4335f1a8 --- /dev/null +++ b/ports/libuuid/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.0) +project(libuuid C) + +configure_file(config.linux.h config.h COPYONLY) + +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +add_library(uuid STATIC + clear.c + compare.c + copy.c + gen_uuid.c + isnull.c + pack.c + parse.c + randutils.c + unpack.c + unparse.c + uuid_time.c +) +target_compile_options(uuid PRIVATE -include "${CMAKE_CURRENT_BINARY_DIR}/config.h") + +add_executable(test_uuid test_uuid.c) +target_link_libraries(test_uuid uuid) + +if(CMAKE_BUILD_TYPE STREQUAL "Release") + install(FILES uuid.h DESTINATION include) +endif() + +install( + TARGETS uuid + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/ports/libuuid/CONTROL b/ports/libuuid/CONTROL new file mode 100644 index 000000000..bfec975dd --- /dev/null +++ b/ports/libuuid/CONTROL @@ -0,0 +1,3 @@ +Source: libuuid +Version: 1.0.3 +Description: Universally unique id library diff --git a/ports/libuuid/config.linux.h b/ports/libuuid/config.linux.h new file mode 100644 index 000000000..38b53cac1 --- /dev/null +++ b/ports/libuuid/config.linux.h @@ -0,0 +1,13 @@ +#define HAVE_DECL__SC_HOST_NAME_MAX 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_SRANDOM 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_FILE_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_USLEEP 1 +#define PACKAGE_STRING "libuuid 1.0.3" diff --git a/ports/libuuid/portfile.cmake b/ports/libuuid/portfile.cmake new file mode 100644 index 000000000..7989e830d --- /dev/null +++ b/ports/libuuid/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libuuid-1.0.3) +vcpkg_download_distfile(ARCHIVE + URLS "http://sourceforge.net/projects/libuuid/files/libuuid-1.0.3.tar.gz" + FILENAME libuuid-1.0.3.tar.gz + SHA512 77488caccc66503f6f2ded7bdfc4d3bc2c20b24a8dc95b2051633c695e99ec27876ffbafe38269b939826e1fdb06eea328f07b796c9e0aaca12331a787175507 +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/config.linux.h + DESTINATION ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL + ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/libuuid RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From afe6d4f3bba8eec5d3acc644cba61fa192bd37d2 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 25 Mar 2018 18:54:19 -0700 Subject: [ceres] update to 1.14 --- ports/ceres/CONTROL | 2 +- ports/ceres/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL index f2b20f8d3..3f60a3312 100644 --- a/ports/ceres/CONTROL +++ b/ports/ceres/CONTROL @@ -1,5 +1,5 @@ Source: ceres -Version: 1.13.0-4 +Version: 1.14.0 # eigen is always required by CMake, even if it isn't used. Build-Depends: glog, eigen3 Description: non-linear optimization package diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index 8a2b88a35..b6dfacf9f 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -11,8 +11,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ceres-solver/ceres-solver - REF 1.13.0 - SHA512 b548a303d1d4eeb75545551c381624879e363a2eba13cdd998fb3bea9bd51f6b9215b579d59d6133117b70d8bf35e18b983400c3d6200403210c18fcb1886ebb + REF 1.14.0 + SHA512 6dddddf5bd5834332a69add468578ad527e4d94fe85c9751ddf5fe9ad11a34918bdd9c994c49dd6ffc398333d0ac9752ac89aaef1293e2fe0a55524e303d415d HEAD_REF master ) -- cgit v1.2.3 From 568d9e727ec8a45c5c445130d1f9a55c651a1431 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 25 Mar 2018 19:15:43 -0700 Subject: [dlib] update to 19.10 --- ports/dlib/CONTROL | 2 +- ports/dlib/portfile.cmake | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index d711849f0..6863fa130 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,5 +1,5 @@ Source: dlib -Version: 19.9-1 +Version: 19.10 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3, openblas, clapack Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index cf3ae4079..ba3cb3ec4 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO davisking/dlib - REF v19.9 - SHA512 1e2123c22e1b13cc84108fa627bfa92eadc9dee63f93a9f45676bbf2b752c8728117d915ac327f5223b0cdbce87dd3bef2f4d8d5ed3f8f5a314ffa9e8962a246 + REF v19.10 + SHA512 88c5b41c12219e6166c6621b654b3869ca4a2af777a8fa55429b833b90b048e3e74ea7ad752d7440809b8171bbd38090cb24a29770391fc3a9d53f9a5fba3341 HEAD_REF master ) @@ -35,6 +35,7 @@ vcpkg_configure_cmake( -DDLIB_USE_CUDA=${WITH_CUDA} -DDLIB_GIF_SUPPORT=OFF -DDLIB_USE_MKL_FFT=OFF + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE OPTIONS_DEBUG -DDLIB_ENABLE_ASSERTS=ON #-DDLIB_ENABLE_STACK_TRACE=ON -- cgit v1.2.3 From 4a675d467f68b7b6db950f39e21d509c3e3cd20c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Mar 2018 08:13:29 -0700 Subject: [qt5-base] Fix regression. Fixes #3133. --- ports/qt5-base/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 39498b4a3..c398b4370 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -42,7 +42,7 @@ file(REMOVE_RECURSE ${SOURCE_PATH}/include/QtZlib) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES -# "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2.patch" "${CMAKE_CURRENT_LIST_DIR}/fix-system-freetype.patch" ) -- cgit v1.2.3 From 3e33a7751e4d09fd5d5b9aead9b4ad8d7d9bd3e7 Mon Sep 17 00:00:00 2001 From: Sergey Podobry Date: Mon, 26 Mar 2018 18:14:06 +0300 Subject: [plog] Update to 1.1.4 (#3129) --- ports/plog/CONTROL | 6 +++--- ports/plog/portfile.cmake | 34 +++++++++++++++++----------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ports/plog/CONTROL b/ports/plog/CONTROL index 091778688..d1abd52a6 100644 --- a/ports/plog/CONTROL +++ b/ports/plog/CONTROL @@ -1,3 +1,3 @@ -Source: plog -Version: 1.1.3 -Description: Portable, simple and extensible C++ logging library. +Source: plog +Version: 1.1.4 +Description: Portable, simple and extensible C++ logging library. diff --git a/ports/plog/portfile.cmake b/ports/plog/portfile.cmake index 5cc0dfbd4..847f2bd37 100644 --- a/ports/plog/portfile.cmake +++ b/ports/plog/portfile.cmake @@ -1,17 +1,17 @@ -# Header-only library -include(vcpkg_common_functions) - -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO SergiusTheBest/plog - REF 1.1.3 - SHA512 9a5a455e1942158d2802313682ed007750789a9048773302d92f2591dfac0185914dba8b67fa285fed25e54dff44e2c97c92b9e7decd39fa2bca460c03549377 - HEAD_REF master -) - -# Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/plog) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/plog/LICENSE ${CURRENT_PACKAGES_DIR}/share/plog/copyright) - -# Copy header files -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") +# Header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SergiusTheBest/plog + REF 1.1.4 + SHA512 7af75af8343460d62e04cc0c27d4cf86373b136df73d2312d19a2e57fa309e916cef8625b8eed1b7270b93aa5d1ff27aee6edb74beb138e3a21c06a3c3debb41 + HEAD_REF master +) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/plog) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/plog/LICENSE ${CURRENT_PACKAGES_DIR}/share/plog/copyright) + +# Copy header files +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") -- cgit v1.2.3 From 6dc98bbcee6a00269dd93d61950d8ab4c55c3d0b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Mar 2018 08:37:41 -0700 Subject: [aws-sdk-cpp] Remove polly-sample feature. Fixes #3123. --- ports/aws-sdk-cpp/CONTROL | 3 --- ports/aws-sdk-cpp/compute_build_only.cmake | 3 --- ports/aws-sdk-cpp/generateFeatures.ps1 | 5 +++-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index 09b1c1a7f..44d263676 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -304,9 +304,6 @@ Description: C++ SDK for the AWS pinpoint service Feature: polly Description: C++ SDK for the AWS polly service -Feature: polly-sample -Description: C++ SDK for the AWS polly-sample service - Feature: pricing Description: C++ SDK for the AWS pricing service diff --git a/ports/aws-sdk-cpp/compute_build_only.cmake b/ports/aws-sdk-cpp/compute_build_only.cmake index de24a203a..a50ed2128 100644 --- a/ports/aws-sdk-cpp/compute_build_only.cmake +++ b/ports/aws-sdk-cpp/compute_build_only.cmake @@ -299,9 +299,6 @@ endif() if("polly" IN_LIST FEATURES) list(APPEND BUILD_ONLY polly) endif() -if("polly-sample" IN_LIST FEATURES) - list(APPEND BUILD_ONLY polly-sample) -endif() if("pricing" IN_LIST FEATURES) list(APPEND BUILD_ONLY pricing) endif() diff --git a/ports/aws-sdk-cpp/generateFeatures.ps1 b/ports/aws-sdk-cpp/generateFeatures.ps1 index cd61a794f..8c8b1a342 100644 --- a/ports/aws-sdk-cpp/generateFeatures.ps1 +++ b/ports/aws-sdk-cpp/generateFeatures.ps1 @@ -30,6 +30,7 @@ function GetDescription($dir, $modulename) $subfolders | % { $modulename = $_.name -replace "^aws-cpp-sdk-","" if ($modulename -match "-tests`$") { return } + if ($modulename -match "-sample`$") { return } if ($modulename -eq "core") { return } $controltext += @("") @@ -44,7 +45,7 @@ $subfolders | % { } Write-Verbose ($controltext -join "`n") -$controltext | out-file -enc ascii $ControlFile +[IO.File]::WriteAllText($ControlFile, ($controltext -join "`n")+"`n") Write-Verbose ($cmakefragmenttext -join "`n") -$cmakefragmenttext | out-file -enc ascii $CMakeFragmentFile +[IO.File]::WriteAllText($CMakeFragmentFile, ($cmakefragmenttext -join "`n") +"`n") -- cgit v1.2.3 From 64ab9dc274c352f9999f2cc4e8f7f6830cc56c42 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Mar 2018 11:58:37 -0700 Subject: [ceres] Use gflags config file + ninja. Fixes #3116. --- ports/ceres/CONTROL | 2 +- ports/ceres/portfile.cmake | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/ceres/CONTROL b/ports/ceres/CONTROL index 3f60a3312..208082de7 100644 --- a/ports/ceres/CONTROL +++ b/ports/ceres/CONTROL @@ -1,5 +1,5 @@ Source: ceres -Version: 1.14.0 +Version: 1.14.0-1 # eigen is always required by CMake, even if it isn't used. Build-Depends: glog, eigen3 Description: non-linear optimization package diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index b6dfacf9f..7267be402 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -46,6 +46,7 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DEXPORT_BUILD_DIR=ON -DBUILD_EXAMPLES=OFF @@ -55,7 +56,7 @@ vcpkg_configure_cmake( -DEIGENSPARSE=${EIGENSPARSE} -DLAPACK=${LAPACK} -DSUITESPARSE=${SUITESPARSE} - -DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION=OFF # TheiaSfm doesn't work well with this + -DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION=ON -DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION=OFF # TheiaSfm doesn't work well with this -DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE} ) -- cgit v1.2.3 From 4596c6436168c9ff80ef971d75853752c7462479 Mon Sep 17 00:00:00 2001 From: Alisayyy-Yang Date: Mon, 26 Mar 2018 23:43:48 -0700 Subject: force static build when dynamic for the yoga --- ports/yoga/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/yoga/portfile.cmake b/ports/yoga/portfile.cmake index e6dc1c709..d61017d63 100644 --- a/ports/yoga/portfile.cmake +++ b/ports/yoga/portfile.cmake @@ -12,7 +12,8 @@ include(vcpkg_common_functions) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(FATAL_ERROR "Error: Dynamic building not supported yet.") + message(WARNING "Dynamic not supported building static") + set(VCPKG_LIBRARY_LINKAGE static) elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "Error: UWP builds not supported yet.") endif() -- cgit v1.2.3 From 930b1984afdc209746715dc4becaad7f27e68089 Mon Sep 17 00:00:00 2001 From: Alisa Yang Date: Tue, 27 Mar 2018 00:10:48 -0700 Subject: force static build when dynamic --- ports/recast/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/recast/portfile.cmake b/ports/recast/portfile.cmake index 9c26131da..8543fe5c3 100644 --- a/ports/recast/portfile.cmake +++ b/ports/recast/portfile.cmake @@ -1,5 +1,10 @@ include(vcpkg_common_functions) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(WARNING "Dynamic not supported .") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO recastnavigation/recastnavigation -- cgit v1.2.3 From 6e6f90c2731aa3f53ba0919b876e2c60a5931a38 Mon Sep 17 00:00:00 2001 From: Alisa Yang Date: Tue, 27 Mar 2018 00:27:43 -0700 Subject: force static build when dynamic --- ports/recast/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/recast/portfile.cmake b/ports/recast/portfile.cmake index 8543fe5c3..e0670dbae 100644 --- a/ports/recast/portfile.cmake +++ b/ports/recast/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(WARNING "Dynamic not supported .") + message(WARNING "Dynamic not supported building static") set(VCPKG_LIBRARY_LINKAGE static) endif() -- cgit v1.2.3 From 72758773321476dcbb7b9d18f11bf57134bb4545 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 03:04:05 -0700 Subject: [ps1] Fixes/tweaks --- scripts/VcpkgPowershellUtils.ps1 | 13 ++++++------- scripts/fetchTool.ps1 | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index d9c9e3760..bc84afa7f 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -110,9 +110,9 @@ function vcpkgGetSHA256([Parameter(Mandatory=$true)][string]$filePath) function vcpkgCheckEqualFileHash( [Parameter(Mandatory=$true)][string]$filePath, [Parameter(Mandatory=$true)][string]$expectedHash, - [Parameter(Mandatory=$true)][string]$actualHash ) + [Parameter(Mandatory=$true)][string]$actualHash) { - if ($expectedDownloadedFileHash -ne $downloadedFileHash) + if ($expectedHash -ne $actualHash) { Write-Host ("`nFile does not have expected hash:`n" + " File path: [ $filePath ]`n" + @@ -150,7 +150,6 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, $downloadPartPath = "$downloadPath.part" vcpkgRemoveItem $downloadPartPath - $wc = New-Object System.Net.WebClient if (!$wc.Proxy.IsBypassed($url)) { @@ -161,7 +160,7 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, Move-Item -Path $downloadPartPath -Destination $downloadPath } -function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, +function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$archivePath, [Parameter(Mandatory=$true)][string]$destinationDir, [Parameter(Mandatory=$true)][string]$outFilename) { @@ -176,18 +175,18 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') { Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") - Microsoft.PowerShell.Archive\Expand-Archive -path $file -destinationpath $destinationPartial + Microsoft.PowerShell.Archive\Expand-Archive -path $archivePath -destinationpath $destinationPartial } elseif (vcpkgHasCommand -commandName 'Pscx\Expand-Archive') { Write-Verbose("Extracting with Pscx\Expand-Archive") - Pscx\Expand-Archive -path $file -OutputPath $destinationPartial + Pscx\Expand-Archive -path $archivePath -OutputPath $destinationPartial } else { Write-Verbose("Extracting via shell") $shell = new-object -com shell.application - $zip = $shell.NameSpace($(Get-Item $file).fullname) + $zip = $shell.NameSpace($(Get-Item $archivePath).fullname) foreach($item in $zip.items()) { # Piping to Out-Null is used to block until finished diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index ff9b5d9bf..a52986553 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -47,7 +47,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) { Write-Host "Downloading $tool..." vcpkgDownloadFile $url $downloadPath - Write-Host "Downloading $tool has completed successfully." + Write-Host "Downloading $tool... done." } $expectedDownloadedFileHash = @($toolData.sha256)[0] -- cgit v1.2.3 From 72194ae8a0e435aee63b8e40f585646247672e3b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 04:08:57 -0700 Subject: [ps1] More fixes/tweaks --- scripts/VcpkgPowershellUtils.ps1 | 7 +++++-- scripts/fetchTool.ps1 | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index bc84afa7f..92e0f21d0 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -194,11 +194,14 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$archivePath, } } - $itemCount = @(Get-ChildItem "$destinationPartial").Count + $items = @(Get-ChildItem "$destinationPartial") + $itemCount = $items.Count if ($itemCount -eq 1) { - Move-Item -Path "$destinationPartial\*" -Destination $output + $item = $items | Select-Object -first 1 + Write-Host "$item" + Move-Item -Path "$destinationPartial\$item" -Destination $output vcpkgRemoveItem $destinationPartial } else diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index a52986553..af6d4d1d9 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -58,13 +58,14 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) { $outFilename = (Get-ChildItem $downloadPath).BaseName Write-Host "Extracting $tool..." - vcpkgExtractFile -File $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename - Write-Host "Extracting $tool has completed successfully." + vcpkgExtractFile -ArchivePath $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename + Write-Host "Extracting $tool... done." } if (-not (Test-Path $exePath)) { - throw ("Could not detect or download " + $tool) + Write-Error "Could not detect or download $tool" + throw } return $exePath -- cgit v1.2.3 From cfd0d9c0e2e90227532f36343907f95908a1864d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 26 Mar 2018 17:21:46 -0700 Subject: [vcpkg-find-acquire-program] Update version of YASM --- ports/ffmpeg/CONTROL | 2 +- ports/libvpx/CONTROL | 2 +- ports/mpg123/CONTROL | 2 +- scripts/cmake/vcpkg_find_acquire_program.cmake | 17 ++++++++++++----- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 2f635cc10..7688f67f9 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,5 +1,5 @@ Source: ffmpeg -Version: 3.3.3-4 +Version: 3.3.3-5 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/libvpx/CONTROL b/ports/libvpx/CONTROL index b4cfa55f4..6095c6de6 100644 --- a/ports/libvpx/CONTROL +++ b/ports/libvpx/CONTROL @@ -1,3 +1,3 @@ Source: libvpx -Version: 1.6.1-1 +Version: 1.6.1-2 Description: The reference software implementation for the video coding formats VP8 and VP9. diff --git a/ports/mpg123/CONTROL b/ports/mpg123/CONTROL index 7eba5e9b8..488ca7a90 100644 --- a/ports/mpg123/CONTROL +++ b/ports/mpg123/CONTROL @@ -1,3 +1,3 @@ Source: mpg123 -Version: 1.25.8-3 +Version: 1.25.8-4 Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). \ No newline at end of file diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 083b86fc2..64d0c7599 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -40,6 +40,7 @@ function(vcpkg_find_acquire_program VAR) endif() unset(NOEXTRACT) + unset(_vfa_RENAME) unset(SUBDIR) unset(REQUIRED_INTERPRETER) @@ -67,11 +68,13 @@ function(vcpkg_find_acquire_program VAR) set(HASH df7aaba094e17832688c88993997612a2e2c96cc3dc14ca3e8347b44c7762115f5a7fc6d7f20be402553aaa4c9e43ddfcf6228f581cfe89289bae550de151b36) elseif(VAR MATCHES "YASM") set(PROGNAME yasm) - set(PATHS ${DOWNLOADS}/tools/yasm) - set(URL "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe") - set(ARCHIVE "yasm.exe") + set(SUBDIR 1.3.0.6) + set(PATHS ${DOWNLOADS}/tools/yasm/${SUBDIR}) + set(URL "https://www.tortall.net/projects/yasm/snapshots/v1.3.0.6.g1962/yasm-1.3.0.6.g1962.exe") + set(ARCHIVE "yasm-1.3.0.6.g1962.exe") + set(_vfa_RENAME "yasm.exe") set(NOEXTRACT ON) - set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720) + set(HASH c1945669d983b632a10c5ff31e86d6ecbff143c3d8b2c433c0d3d18f84356d2b351f71ac05fd44e5403651b00c31db0d14615d7f9a6ecce5750438d37105c55b) elseif(VAR MATCHES "PYTHON3") set(PROGNAME python) set(SUBDIR "python3") @@ -205,7 +208,11 @@ function(vcpkg_find_acquire_program VAR) file(MAKE_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) if(DEFINED NOEXTRACT) - file(COPY ${ARCHIVE_PATH} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) + if(DEFINED _vfa_RENAME) + file(INSTALL ${ARCHIVE_PATH} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR} RENAME ${_vfa_RENAME}) + else() + file(COPY ${ARCHIVE_PATH} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) + endif() else() get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT) string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) -- cgit v1.2.3 From 02185b60828ded3f89f2a7f2cf75402d00dde123 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 27 Mar 2018 08:47:57 -0700 Subject: [aubio] Fix missing required dependencies --- ports/aubio/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/aubio/CONTROL b/ports/aubio/CONTROL index 945157c7e..6f5daa30a 100644 --- a/ports/aubio/CONTROL +++ b/ports/aubio/CONTROL @@ -1,4 +1,4 @@ Source: aubio -Version: 0.4.6-1 +Version: 0.4.6-2 Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. -Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis +Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis, bzip2, liblzma -- cgit v1.2.3 From 26187d1bed865f472caa2dcd2f154a72f7f6d045 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 27 Mar 2018 09:09:38 -0700 Subject: [qt5-base] Fix pcre2 reference on non-Windows --- ports/qt5-base/fix-system-pcre2-linux.patch | 17 +++++++++++++++++ ports/qt5-base/portfile.cmake | 1 + 2 files changed, 18 insertions(+) create mode 100644 ports/qt5-base/fix-system-pcre2-linux.patch diff --git a/ports/qt5-base/fix-system-pcre2-linux.patch b/ports/qt5-base/fix-system-pcre2-linux.patch new file mode 100644 index 000000000..c5669a4c9 --- /dev/null +++ b/ports/qt5-base/fix-system-pcre2-linux.patch @@ -0,0 +1,17 @@ +diff --git a/src/corelib/configure.json b/src/corelib/configure.json +index a5a1b66..5a48a05 100644 +--- a/src/corelib/configure.json ++++ b/src/corelib/configure.json +@@ -163,8 +163,10 @@ + "builds": { + "debug": "-lpcre2-16d", + "release": "-lpcre2-16" +- } +- } ++ }, ++ "condition": "config.win32" ++ }, ++ { "libs": "-lpcre2-16", "condition": "!config.win32" } + ] + }, + "pps": { diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index c398b4370..e01365fe9 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -44,6 +44,7 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2.patch" "${CMAKE_CURRENT_LIST_DIR}/fix-system-freetype.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-system-pcre2-linux.patch" ) # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings -- cgit v1.2.3 From 45d31162c25e168c46d9dd0f3f00e49edf625f21 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 17:48:33 -0700 Subject: [ps1] Remove extraneous function --- scripts/fetchTool.ps1 | 93 ++++++++++++++++++++++++--------------------------- 1 file changed, 43 insertions(+), 50 deletions(-) diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index af6d4d1d9..8cf8002bc 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -13,64 +13,57 @@ $vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" vcpkgCreateDirectoryIfNotExists $downloadsDir -function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) -{ - $tool = $tool.toLower() - - [xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" - $toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"$tool`"]") # Case-sensitive! +$tool = $tool.toLower() - if ($toolData -eq $null) - { - throw "Unkown tool $tool" - } +[xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" +$toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"$tool`"]") # Case-sensitive! - $exePath = "$downloadsDir\$(@($toolData.exeRelativePath)[0])" +if ($toolData -eq $null) +{ + throw "Unkown tool $tool" +} - if (Test-Path $exePath) - { - return $exePath - } +$exePath = "$downloadsDir\$($toolData.exeRelativePath)" - $isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath" - if ($isArchive) - { - $downloadPath = "$downloadsDir\$(@($toolData.archiveRelativePath)[0])" - } - else - { - $downloadPath = "$downloadsDir\$(@($toolData.exeRelativePath)[0])" - } +if (Test-Path $exePath) +{ + return $exePath +} - [String]$url = @($toolData.url)[0] - if (!(Test-Path $downloadPath)) - { - Write-Host "Downloading $tool..." - vcpkgDownloadFile $url $downloadPath - Write-Host "Downloading $tool... done." - } +$isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath" +if ($isArchive) +{ + $downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)" +} +else +{ + $downloadPath = "$downloadsDir\$($toolData.exeRelativePath)" +} - $expectedDownloadedFileHash = @($toolData.sha256)[0] - $downloadedFileHash = vcpkgGetSHA256 $downloadPath - vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash +[String]$url = $toolData.url +if (!(Test-Path $downloadPath)) +{ + Write-Host "Downloading $tool..." + vcpkgDownloadFile $url $downloadPath + Write-Host "Downloading $tool... done." +} - if ($isArchive) - { - $outFilename = (Get-ChildItem $downloadPath).BaseName - Write-Host "Extracting $tool..." - vcpkgExtractFile -ArchivePath $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename - Write-Host "Extracting $tool... done." - } +$expectedDownloadedFileHash = $toolData.sha256 +$downloadedFileHash = vcpkgGetSHA256 $downloadPath +vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash - if (-not (Test-Path $exePath)) - { - Write-Error "Could not detect or download $tool" - throw - } +if ($isArchive) +{ + $outFilename = (Get-ChildItem $downloadPath).BaseName + Write-Host "Extracting $tool..." + vcpkgExtractFile -ArchivePath $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename + Write-Host "Extracting $tool... done." +} - return $exePath +if (-not (Test-Path $exePath)) +{ + Write-Error "Could not detect or download $tool" + throw } -$path = fetchToolInternal $tool -Write-Verbose "Fetching tool: $tool. Done." -return "::$path::" +return "::$exePath::" -- cgit v1.2.3 From c814c9b8ac883aa42930e1f48660145fd4234fe6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 13:23:30 -0700 Subject: [vcpkgTools.xml] Restructre os-specific info --- scripts/vcpkgTools.xml | 20 ++++++++++++++------ toolsrc/src/vcpkg/vcpkgpaths.cpp | 16 ++++++++-------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 9c78e92d9..5df2de7ad 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -6,12 +6,20 @@ https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6 cmake-3.10.2-win32-x86.zip - cmake-3.10.2-Darwin-x86_64/CMake.app/Contents/bin/cmake - https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz - cmake-3.10.2-Darwin-x86_64.tar.gz - cmake-3.10.2-Linux-x86_64/bin/cmake - https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz - cmake-3.10.2-Linux-x86_64.tar.gz + + + 3.10.2 + cmake-3.10.2-Darwin-x86_64/CMake.app/Contents/bin/cmake + https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz + e748eb7698f8e2783c2eea9ab81eebf66da0238bbf8e8fa722a67a38f2110718 + cmake-3.10.2-Darwin-x86_64.tar.gz + + + 3.10.2 + cmake-3.10.2-Linux-x86_64/bin/cmake + https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz + 7a82b46c35f4e68a0807e8dc04e779dee3f36cd42c6387fd13b5c29fe62a69ea + cmake-3.10.2-Linux-x86_64.tar.gz 2.16.2 diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 9b331d7fc..feacda026 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -46,9 +46,9 @@ namespace vcpkg #if defined(_WIN32) static constexpr StringLiteral OS_STRING = ""; #elif defined(__APPLE__) - static constexpr StringLiteral OS_STRING = " os=\"osx\""; + static constexpr StringLiteral OS_STRING = R"(os="osx")"; #else // assume linux - static constexpr StringLiteral OS_STRING = " os=\"linux\""; + static constexpr StringLiteral OS_STRING = R"(os="linux")"; #endif static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; @@ -72,15 +72,15 @@ namespace vcpkg }; static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO); - static const std::regex VERSION_REGEX{ - Strings::format(R"###(([\s\S]*?))###", tool)}; + static const std::regex VERSION_REGEX{R"###(([\s\S]*?))###"}; static const std::regex EXE_RELATIVE_PATH_REGEX{ - Strings::format(R"###(([\s\S]*?))###", OS_STRING)}; + Strings::format(R"###(([\s\S]*?))###")}; static const std::regex ARCHIVE_RELATIVE_PATH_REGEX{ - Strings::format(R"###(([\s\S]*?))###", OS_STRING)}; - static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###", OS_STRING)}; + Strings::format(R"###(([\s\S]*?))###")}; + static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###")}; - const std::regex tool_regex{Strings::format(R"###(([\s\S]*?))###", tool)}; + const std::regex tool_regex{ + Strings::format(R"###(([\s\S]*?))###", tool, OS_STRING)}; std::smatch match_tool; const bool has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); -- cgit v1.2.3 From 12d862ab2b6e387b596e680d334daa212b77fb32 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 18:06:02 -0700 Subject: [ps1] Revert function removal --- scripts/fetchTool.ps1 | 93 +++++++++++++++++++++++++++------------------------ 1 file changed, 50 insertions(+), 43 deletions(-) diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 8cf8002bc..26eedac3b 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -13,57 +13,64 @@ $vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" vcpkgCreateDirectoryIfNotExists $downloadsDir -$tool = $tool.toLower() +function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) +{ + $tool = $tool.toLower() -[xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" -$toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"$tool`"]") # Case-sensitive! + [xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" + $toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"$tool`"]") # Case-sensitive! -if ($toolData -eq $null) -{ - throw "Unkown tool $tool" -} + if ($toolData -eq $null) + { + throw "Unkown tool $tool" + } -$exePath = "$downloadsDir\$($toolData.exeRelativePath)" + $exePath = "$downloadsDir\$($toolData.exeRelativePath)" -if (Test-Path $exePath) -{ - return $exePath -} + if (Test-Path $exePath) + { + return $exePath + } -$isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath" -if ($isArchive) -{ - $downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)" -} -else -{ - $downloadPath = "$downloadsDir\$($toolData.exeRelativePath)" -} + $isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath" + if ($isArchive) + { + $downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)" + } + else + { + $downloadPath = "$downloadsDir\$($toolData.exeRelativePath)" + } -[String]$url = $toolData.url -if (!(Test-Path $downloadPath)) -{ - Write-Host "Downloading $tool..." - vcpkgDownloadFile $url $downloadPath - Write-Host "Downloading $tool... done." -} + [String]$url = $toolData.url + if (!(Test-Path $downloadPath)) + { + Write-Host "Downloading $tool..." + vcpkgDownloadFile $url $downloadPath + Write-Host "Downloading $tool... done." + } -$expectedDownloadedFileHash = $toolData.sha256 -$downloadedFileHash = vcpkgGetSHA256 $downloadPath -vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash + $expectedDownloadedFileHash = $toolData.sha256 + $downloadedFileHash = vcpkgGetSHA256 $downloadPath + vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash -if ($isArchive) -{ - $outFilename = (Get-ChildItem $downloadPath).BaseName - Write-Host "Extracting $tool..." - vcpkgExtractFile -ArchivePath $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename - Write-Host "Extracting $tool... done." -} + if ($isArchive) + { + $outFilename = (Get-ChildItem $downloadPath).BaseName + Write-Host "Extracting $tool..." + vcpkgExtractFile -ArchivePath $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename + Write-Host "Extracting $tool... done." + } -if (-not (Test-Path $exePath)) -{ - Write-Error "Could not detect or download $tool" - throw + if (-not (Test-Path $exePath)) + { + Write-Error "Could not detect or download $tool" + throw + } + + return $exePath } -return "::$exePath::" +$path = fetchToolInternal $tool +Write-Verbose "Fetching tool: $tool. Done." +return "::$path::" -- cgit v1.2.3 From ee1409f432711e59b58bd170f021949e8e12aedd Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 21:39:23 -0700 Subject: Hotfix #3144 --- toolsrc/src/vcpkg/vcpkgpaths.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index feacda026..a17ffeb05 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -80,7 +80,7 @@ namespace vcpkg static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###")}; const std::regex tool_regex{ - Strings::format(R"###(([\s\S]*?))###", tool, OS_STRING)}; + Strings::format(R"###(([\s\S]*?))###", tool, OS_STRING)}; std::smatch match_tool; const bool has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); -- cgit v1.2.3 From 398a972357d059a8d27adb657a33da6cf2a52450 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 21:48:48 -0700 Subject: Update CHANGELOG and bump version to v0.0.107 --- CHANGELOG.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f41efaf10..36c40f6e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,68 @@ +vcpkg (0.0.107) +-------------- + * Add ports: + - azmq 1.0.2 + - azure-c-shared-utility 1.0.0-pre-release-1.0.9 + - azure-iot-sdk-c 1.0.0-pre-release-1.0.9 + - azure-uamqp-c 1.0.0-pre-release-1.0.9 + - azure-uhttp-c 2018-02-09 + - azure-umqtt-c 1.0.0-pre-release-1.0.9 + - bitserializer 0.7 + - caf 0.15.7 + - fmem c-libs-2ccee3d2fb + - gherkin-c c-libs-e63e83104b + - librsync 2.0.2 + - libuuid 1.0.3 + - mpark-variant 1.3.0 + - nanomsg 1.1.2 + - nvml 1.3-0 + - nvtt 2.1.0 + - openvpn3 2018-03-21 + - parson 2018-03-23 + - plplot 5.13.0-1 + - sqlite-orm 1.1 + - tap-windows6 9.21.2-0e30f5c + * Update ports: + - abseil 2018-03-17 -> 2018-03-23 + - alembic 1.7.6 -> 1.7.7 + - asio 1.12.0 -> 1.12.0-1 + - aubio 0.4.6-1 -> 0.4.6-2 + - aws-sdk-cpp 1.3.58 -> 1.4.21 + - catch2 2.2.1 -> 2.2.1-1 + - ccfits 2.5-1 -> 2.5-2 + - ceres 1.13.0-4 -> 1.14.0-1 + - cfitsio 3.410-1 -> 3.410-2 + - clara 2018-03-11 -> 2018-03-23 + - cpprestsdk 2.10.2 -> 2.10.2-1 + - discord-rpc 3.0.0 -> 3.1.0 + - dlib 19.9-1 -> 19.10 + - eastl 3.07.02 -> 3.08.00 + - exiv2 2018-03-17 -> 2018-03-23 + - ffmpeg 3.3.3-4 -> 3.3.3-5 + - gdcm2 2.8.4 -> 2.8.5 + - harfbuzz 1.7.6 -> 1.7.6-1 + - hpx 1.0.0-8 -> 1.1.0-1 + - lcm 1.3.95 -> 1.3.95-1 + - libpq 9.6.1-1 -> 9.6.1-4 + - libvpx 1.6.1-1 -> 1.6.1-2 + - mpg123 1.25.8-2 -> 1.25.8-4 + - nuklear 2018-03-17 -> 2018-03-23 + - openssl 1.0.2n-2 -> 1.0.2n-3 + - paho-mqtt 1.2.0-2 -> 1.2.0-3 + - plog 1.1.3 -> 1.1.4 + - qt5-quickcontrols 5.9.2-0 -> 5.9.2-1 + - qt5-quickcontrols2 5.9.2-0 -> 5.9.2-1 + - sciter 4.1.3 -> 4.1.4 + - shapelib 1.4.1 -> 1.4.1-1 + - signalrclient 1.0.0-beta1-2 -> 1.0.0-beta1-3 + - soundtouch 2.0.0 -> 2.0.0-1 + - thrift 2018-03-17 -> 2018-03-23 + - unicorn 2018-03-13 -> 2018-03-20 + - zeromq 2018-03-17 -> 2018-03-23 + +-- vcpkg team TUE, 27 Mar 2018 22:00:00 -0800 + + vcpkg (0.0.106) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 1305e8f43..daa1cd86e 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.106" \ No newline at end of file +"0.0.107" \ No newline at end of file -- cgit v1.2.3 From db2694fb2384e85d54def1d4164f1cb763cd2eb6 Mon Sep 17 00:00:00 2001 From: AlISA Yang Date: Wed, 28 Mar 2018 00:39:45 -0700 Subject: Unrar buildsystem doesn't support static building. Building dynamic instead --- ports/unrar/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/unrar/portfile.cmake b/ports/unrar/portfile.cmake index 0528c8b97..19c7c9d7a 100644 --- a/ports/unrar/portfile.cmake +++ b/ports/unrar/portfile.cmake @@ -6,7 +6,8 @@ set(UNRAR_URL http://www.rarlab.com/rar/${UNRAR_FILENAME}) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/unrar) if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message(FATAL_ERROR "Unrar does not currently support building statically") + message(STATUS "Unrar buildsystem doesn't support static building. Building dynamic instead.") + set(VCPKG_LIBRARY_LINKAGE dynamic) endif() #SRC -- cgit v1.2.3 From 0e8481c1dff484f2be1149a4911b8425c0d2e956 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Mar 2018 08:55:47 -0700 Subject: [dlib] Disable shared linkage --- ports/dlib/CONTROL | 2 +- ports/dlib/portfile.cmake | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index 6863fa130..c4d5fe905 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,5 +1,5 @@ Source: dlib -Version: 19.10 +Version: 19.10-1 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3, openblas, clapack Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index ba3cb3ec4..da77c9374 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -1,5 +1,10 @@ include(vcpkg_common_functions) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("dlib only supports static linkage") + set(VCPKG_LIBRARY_LINKAGE "static") +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO davisking/dlib @@ -35,7 +40,6 @@ vcpkg_configure_cmake( -DDLIB_USE_CUDA=${WITH_CUDA} -DDLIB_GIF_SUPPORT=OFF -DDLIB_USE_MKL_FFT=OFF - -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE OPTIONS_DEBUG -DDLIB_ENABLE_ASSERTS=ON #-DDLIB_ENABLE_STACK_TRACE=ON -- cgit v1.2.3 From 1bec90d155e788cd77d19ec2bdaefe53b5cb39b4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Mar 2018 09:07:37 -0700 Subject: [openssl] Update to 1.0.2o --- ports/openssl/CONTROL | 2 +- ports/openssl/RemoveNonASCIIChar.patch | 13 ------------- ports/openssl/portfile.cmake | 9 ++++----- 3 files changed, 5 insertions(+), 19 deletions(-) delete mode 100644 ports/openssl/RemoveNonASCIIChar.patch diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index 43a6eb660..9266dd10d 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2n-3 +Version: 1.0.2o 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/RemoveNonASCIIChar.patch b/ports/openssl/RemoveNonASCIIChar.patch deleted file mode 100644 index 5c4553b0a..000000000 --- a/ports/openssl/RemoveNonASCIIChar.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ssl/bad_dtls_test.c b/ssl/bad_dtls_test.c -index 34af37d..ff754e1 100644 ---- a/ssl/bad_dtls_test.c -+++ b/ssl/bad_dtls_test.c -@@ -19,7 +19,7 @@ - * Note that unlike other SSL tests, we don't test against our own SSL - * server method. Firstly because we don't have one; we *only* support - * DTLS1_BAD_VER as a client. And secondly because even if that were -- * fixed up it's the wrong thing to test against — because if changes -+ * fixed up it's the wrong thing to test against - because if changes - * are made in generic DTLS code which don't take DTLS1_BAD_VER into - * account, there's plenty of scope for making those changes such that - * they break *both* the client and the server in the same way. diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 023b3e233..458aa07b6 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -4,7 +4,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") endif() include(vcpkg_common_functions) -set(OPENSSL_VERSION 1.0.2n) +set(OPENSSL_VERSION 1.0.2o) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) vcpkg_find_acquire_program(PERL) @@ -15,7 +15,7 @@ set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") 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 144bf0d6aa27b4af01df0b7b734c39962649e1711554247d42e05e14d8945742b18745aefdba162e2dfc762b941fd7d3b2d5dc6a781ae4ba10a6f5a3cadb0687 + SHA512 8a2c93657c85143e76785bb32ee836908c31a6f5f8db993fa9777acba6079e630cdddd03edbad65d1587199fc13a1507789eacf038b56eb99139c2091d9df7fd ) vcpkg_extract_source_archive(${OPENSSL_SOURCE_ARCHIVE}) @@ -24,7 +24,6 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch ${CMAKE_CURRENT_LIST_DIR}/STRINGIFYPatch.patch ${CMAKE_CURRENT_LIST_DIR}/EmbedSymbolsInStaticLibsZ7.patch - ${CMAKE_CURRENT_LIST_DIR}/RemoveNonASCIIChar.patch ) if(VCPKG_CMAKE_SYSTEM_NAME) @@ -92,7 +91,7 @@ execute_process( ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log ) vcpkg_execute_required_process( - COMMAND ${JOM} -j 1 -f ${OPENSSL_MAKEFILE} install + COMMAND nmake -f ${OPENSSL_MAKEFILE} install WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} LOGNAME build-${TARGET_TRIPLET}-rel-1) @@ -125,7 +124,7 @@ execute_process( ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log ) vcpkg_execute_required_process( - COMMAND ${JOM} -j 1 -f ${OPENSSL_MAKEFILE} install + COMMAND nmake -f ${OPENSSL_MAKEFILE} install WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} LOGNAME build-${TARGET_TRIPLET}-dbg-1) -- cgit v1.2.3 From ba47c71551ae123aa513af45eca4ae21f66d4af3 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Mar 2018 07:36:51 -0700 Subject: [qt5] Remove absolute paths from .prl files --- ports/qt5-base/CONTROL | 2 +- ports/qt5-base/portfile.cmake | 10 ++++++++++ ports/qt5-modularscripts/CONTROL | 2 +- ports/qt5-modularscripts/qt_modular_library.cmake | 10 ++++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index 1e10239b3..e0b9e0e15 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -1,4 +1,4 @@ Source: qt5-base -Version: 5.9.2-5 +Version: 5.9.2-6 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 e01365fe9..e5bdba8a5 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -167,6 +167,16 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/qtmain.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl) endif() +file(GLOB_RECURSE PRL_FILES "${CURRENT_PACKAGES_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/debug/lib/*.prl") +file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/lib" CMAKE_RELEASE_LIB_PATH) +file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib" CMAKE_DEBUG_LIB_PATH) +foreach(PRL_FILE IN LISTS PRL_FILES) + file(READ "${PRL_FILE}" _contents) + string(REPLACE "${CMAKE_RELEASE_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") + string(REPLACE "${CMAKE_DEBUG_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") + file(WRITE "${PRL_FILE}" "${_contents}") +endforeach() + file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins) file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins) diff --git a/ports/qt5-modularscripts/CONTROL b/ports/qt5-modularscripts/CONTROL index 502887c52..fd3f72392 100644 --- a/ports/qt5-modularscripts/CONTROL +++ b/ports/qt5-modularscripts/CONTROL @@ -1,3 +1,3 @@ Source: qt5-modularscripts -Version: 2 +Version: 3 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 e733e02a5..1ead66d83 100644 --- a/ports/qt5-modularscripts/qt_modular_library.cmake +++ b/ports/qt5-modularscripts/qt_modular_library.cmake @@ -78,6 +78,16 @@ function(qt_modular_library NAME HASH) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) endif() + file(GLOB_RECURSE PRL_FILES "${CURRENT_PACKAGES_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/debug/lib/*.prl") + file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/lib" CMAKE_RELEASE_LIB_PATH) + file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib" CMAKE_DEBUG_LIB_PATH) + foreach(PRL_FILE IN LISTS PRL_FILES) + file(READ "${PRL_FILE}" _contents) + string(REPLACE "${CMAKE_RELEASE_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") + string(REPLACE "${CMAKE_DEBUG_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") + file(WRITE "${PRL_FILE}" "${_contents}") + endforeach() + file(GLOB RELEASE_LIBS "${CURRENT_PACKAGES_DIR}/lib/*") if(NOT RELEASE_LIBS) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) -- cgit v1.2.3 From 6a3921c85a2c47391e503a11ee77cd1b9f2535af Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Thu, 29 Mar 2018 02:47:49 +0300 Subject: [folly] Update to version 2018.03.19.00 (#3094) * [folly] Update to version 2018.03.19.00 * [folly] Add zlib default feature. Disable unexpected packages and handle features. --- ports/folly/CONTROL | 29 ++++++++++++++++++++-- ports/folly/cmake-link-boost-fix.patch | 35 -------------------------- ports/folly/portfile.cmake | 45 +++++++++++++++++++++++++--------- 3 files changed, 60 insertions(+), 49 deletions(-) delete mode 100644 ports/folly/cmake-link-boost-fix.patch diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 8f0bb7656..457874906 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,4 +1,29 @@ Source: folly -Version: 2017.11.27.00-3 +Version: 2018.03.19.00-1 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows -Build-Depends: zlib, openssl, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy, boost-context, boost-chrono, boost-date-time, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread, boost-conversion, boost-multi-index, boost-crc +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 +Default-Features: zlib + +Feature: zlib +Build-Depends: zlib +Description: Support zlib for compression + +Feature: bzip2 +Build-Depends: bzip2 +Description: Support bzip2 for compression + +Feature: lzma +Build-Depends: liblzma +Description: Support LZMA for compression + +Feature: zstd +Build-Depends: zstd +Description: Support zstd for compression + +Feature: snappy +Build-Depends: snappy +Description: Support Snappy for compression + +Feature: lz4 +Build-Depends: lz4 +Description: Support lz4 for compression diff --git a/ports/folly/cmake-link-boost-fix.patch b/ports/folly/cmake-link-boost-fix.patch deleted file mode 100644 index d3baf13a3..000000000 --- a/ports/folly/cmake-link-boost-fix.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ec5a985c..36564534 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -136,13 +136,6 @@ source_group("folly\\build" FILES - ) - - set(FOLLY_SHINY_DEPENDENCIES -- Boost::chrono -- Boost::context -- Boost::date_time -- Boost::filesystem -- Boost::program_options -- Boost::regex -- Boost::system - OpenSSL::SSL - OpenSSL::Crypto - ) -@@ -179,6 +172,7 @@ endif() - - set(FOLLY_LINK_LIBRARIES - ${FOLLY_LINK_LIBRARIES} -+ ${Boost_LIBRARIES} - Iphlpapi.lib - Ws2_32.lib - -@@ -320,7 +314,7 @@ if (BUILD_TESTS) - ) - target_link_libraries(folly_test_support - PUBLIC -- Boost::thread -+ ${Boost_LIBRARIES} - folly - ${LIBGMOCK_LIBRARY} - ) diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 00c1093da..ce101d918 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -17,45 +17,66 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2017.11.27.00 - SHA512 738bb00047a7cbd807f2dccd64031763df80bbebca73f1ae9500b750dcad156dde84e47f4eda7af1bcd7abfae10c973da47515f2e111929979d1637869cf06ee + REF v2018.03.19.00 + SHA512 72df8768753bf9f1109ad3f16645d811906b633833c91c7d9fe856a06c16b5e398876cf6cae415401eff96b568c99ffa1dc0c44d81cd40219bafb0f4c72fc2ca HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/cmake-link-boost-fix.patch ${CMAKE_CURRENT_LIST_DIR}/msvc-15.6-workaround.patch ) +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/FindLZ4.cmake + ${CMAKE_CURRENT_LIST_DIR}/FindSnappy.cmake + DESTINATION ${SOURCE_PATH}/CMake/ +) + if(VCPKG_CRT_LINKAGE STREQUAL static) set(MSVC_USE_STATIC_RUNTIME ON) else() set(MSVC_USE_STATIC_RUNTIME OFF) endif() +set(FEATURE_OPTIONS) + +macro(feature FEATURENAME PACKAGENAME) + if("${FEATURENAME}" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGENAME}=OFF) + else() + list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGENAME}=ON) + endif() +endmacro() + +feature(zlib ZLIB) +feature(bzip2 BZip2) +feature(lzma LibLZMA) +feature(lz4 LZ4) +feature(zstd Zstd) +feature(snappy Snappy) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DMSVC_USE_STATIC_RUNTIME=${MSVC_USE_STATIC_RUNTIME} + -DCMAKE_DISABLE_FIND_PACKAGE_LibDwarf=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Libiberty=ON + -DCMAKE_DISABLE_FIND_PACKAGE_LibAIO=ON + -DLIBAIO_FOUND=OFF + -DLIBURCU_FOUND=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_LibURCU=ON + ${FEATURE_OPTIONS} ) -# Folly runs built executables during the build, so they need access to the installed DLLs. -set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin") - -vcpkg_install_cmake() +vcpkg_install_cmake(ADD_BIN_TO_PATH) vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets() -# changes target search path -file(READ ${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake FOLLY_MODULE) -string(REPLACE "${CURRENT_INSTALLED_DIR}/lib/" "" FOLLY_MODULE "${FOLLY_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake "${FOLLY_MODULE}") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -- cgit v1.2.3 From b955609dda3a7aa1d0a363ee3e309d8902d63b90 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Mar 2018 17:41:17 -0700 Subject: [qwt] Requires qt5-tools for designer --- ports/qwt/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/qwt/CONTROL b/ports/qwt/CONTROL index 9dcf19f5b..383ac11ce 100644 --- a/ports/qwt/CONTROL +++ b/ports/qwt/CONTROL @@ -1,4 +1,4 @@ Source: qwt -Version: 6.1.3-4 +Version: 6.1.3-5 Description: Qt widgets library for technical applications -Build-Depends: qt5-base, qt5-svg +Build-Depends: qt5-base, qt5-svg, qt5-tools -- cgit v1.2.3 From 36dddad940037e0d7b6ce83a5751fee402a8c0d0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 27 Mar 2018 23:05:14 -0700 Subject: [abseil][aws-sdk-cpp][breakpad][exiv2][nuklear][zeromq] Upgrades --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- ports/breakpad/CONTROL | 2 +- ports/breakpad/portfile.cmake | 4 ++-- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 4 ++-- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index 0c28ff456..03462a816 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-03-23 +Version: 2018-03-27 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 48a506710..817ac004a 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 4e2e6c5c0071e6430056a8ef0a6c8a1fe584d8ff - SHA512 f1daa9f7afb8727f2fd3097683bd7192b9f54536d575ce655a7440281463a3eae1bb0072f3010e74a03693b5dbca2e80e220099ae8557171055efcad70767ef1 + REF 70b5fa948d920ccca86d143057497132f63a44f3 + SHA512 5964f4b082d183a3d8227c51617e7ac348b6c7b80264c0e96cdeba40a69979a0954f1792da20f760502d62771ac464400b820e4fe2b0b4ed55f8c6f81b17cc1e HEAD_REF master ) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index 44d263676..bd1ccbec5 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,5 +1,5 @@ Source: aws-sdk-cpp -Version: 1.4.21 +Version: 1.4.23 Description: AWS SDK for C++ Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs # Automatically generated by generateFeatures.ps1 diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 3adfa15d0..7d98781aa 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.4.21 - SHA512 b8d063048b9d879603ace5210b671497336e8160cb3b7d10772465db538d95176458446faa9dccd5cc2d7a2c3242239fc3b80a8aa3a5878a0e2b4fc6673b4a35 + REF 1.4.23 + SHA512 5d77650c6468c5ab57eab2c5a5b647a5f4d56dc31cec0bca051e3e79554b386be5f6ed4b41cd7ca907e9e657c7dbef024fac2b9e505eb44204cf998ac1ee102c HEAD_REF master ) diff --git a/ports/breakpad/CONTROL b/ports/breakpad/CONTROL index 6b016d29a..76e76668b 100644 --- a/ports/breakpad/CONTROL +++ b/ports/breakpad/CONTROL @@ -1,4 +1,4 @@ Source: breakpad -Version: 2018-03-13 +Version: 2018-03-27 Build-Depends: libdisasm Description: a set of client and server components which implement a crash-reporting system. diff --git a/ports/breakpad/portfile.cmake b/ports/breakpad/portfile.cmake index b8bac3f6a..29cf87498 100644 --- a/ports/breakpad/portfile.cmake +++ b/ports/breakpad/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/breakpad - REF 2d80611fedf1e6bce4459f179dafaac844e9fc7f - SHA512 8c4eabb1e2d071ed67d178c1ee8c3679a24bff39439ee360a079fa926e276247ee18d0d88e420407e08c99cac0d1e9a8b4c7f554bf2d07f125eaa1df2f973e38 + REF e93f852a3c316ad767381d5e5bc839eba5c6225b + SHA512 8139472f4f9ce01770cf2922a52cc63fa009cfff93db893d297f61a1b44198b10bba73c92977e84c18a90ef7e71f0911e4fe9d27e8978fc38f231e499e23fc4d HEAD_REF master ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 36c7220e5..06862802c 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-03-23 +Version: 2018-03-27 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 80e0b1a6f..046d0eabc 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF eb61e57de031ffd8713306cae6ad431d0b84a9b5 - SHA512 078e161de8ffe1953c3215ff745954f00ef4bd5ccef4c7fb079ad67d5350a31bb8f692cb664adba889433c4e79e446dc1f31edfd9ecc8b9471faeba82ae425e6 + REF be992520b1570c2696d6ca1302fd49f1cb0164d8 + SHA512 fe4e2907268a8e5fe0b3a03fc39a5ba7d72daaf304b32c37ae8b0c0773711edc9ce0d194cd4f583b430ebf65ebcc58980a2a4e858c893c0bb1adb1886f6c0e6d HEAD_REF master ) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index ba4340611..694ddd5b7 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-03-23 +Version: 2018-03-27 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index 9c240f411..9baefc9a4 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF 1acb673af13e72d8ac07522a22127ffd33af65a9 - SHA512 8ee7c45d0a6c64062adec3575ea94cf0d5c8d60d9f30cf8c72051c6e9fcf030562379074f37c1f5da256cce8537078694673ed3b947a603982cdbf26c393fa4b + REF 7e710ff4fb0186c0e462d43b30c82cab12ea1277 + SHA512 9f65e2fe2e89521002f7d86e8c5f0947a76724b7e7eb87463832732f38561b0415da98a8411e474467a9e5e1b33189c98f6506cc1baf97dbced66cfe05f2a290 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index b3ec200db..64f2a6507 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-03-23 +Version: 2018-03-27 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 72165adaa..45e10bf3d 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF c8a1c4542d13b6492949e7525f4fe8da266cac2b - SHA512 600bb2a43afb4f6e2d9a7ce8470841bcb03fc9737f17d276f52b0cf78c6f17d1cf08e2b0046ff746efa8738f33128cb51cbe63cb215937a892222f2e4895a659 + REF 8fb5b10d8a60e06b9adebd22ecc118f13580375c + SHA512 5839410cf1842c0ac684f42ed52c4ed117104dce5b31106eff3c7e799e1d3d57f72413b4381ebb36e1835bf2aa44fcdc0e36140871141edb96ab50b4d8b23a8d HEAD_REF master ) -- cgit v1.2.3 From 3e1104465eb4e40e3b4dce1a212d90a68928d442 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 28 Mar 2018 18:35:27 -0700 Subject: Add ninja to vcpkgTools.xml --- scripts/vcpkgTools.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 5df2de7ad..477584c5a 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -54,4 +54,18 @@ 2a3afe19c180f8373fa02ff00254d5394fec0349f5804e0ad2f6067854ff28ac 7za920.zip + + 1.8.2 + ninja + https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip + d2fea9ff33b3ef353161ed906f260d565ca55b8ca0568fa07b1d2cab90a84a07 + ninja-linux.zip + + + 1.8.2 + ninja + https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip + 0347d55c66061652b26f48769d566761630ffde3143793b29064a57f356542cc + ninja-mac.zip + -- cgit v1.2.3 From 10e77be9fa5a4d6bb132c8d56ee8426de36ab449 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 28 Mar 2018 19:28:42 -0700 Subject: [folly] Add missing files. --- ports/folly/FindLZ4.cmake | 12 ++++++++++++ ports/folly/FindSnappy.cmake | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 ports/folly/FindLZ4.cmake create mode 100644 ports/folly/FindSnappy.cmake diff --git a/ports/folly/FindLZ4.cmake b/ports/folly/FindLZ4.cmake new file mode 100644 index 000000000..bf3140e15 --- /dev/null +++ b/ports/folly/FindLZ4.cmake @@ -0,0 +1,12 @@ +find_path(LZ4_INCLUDE_DIR lz4.h) + +find_package(LZ4_LIBRARY_DEBUG NAMES lz4d) +find_package(LZ4_LIBRARY_RELEASE NAMES lz4) + +select_library_configurations(LZ4_LIBRARY) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + LZ4 DEFAULT_MSG + LZ4_LIBRARY LZ4_INCLUDE_DIR +) diff --git a/ports/folly/FindSnappy.cmake b/ports/folly/FindSnappy.cmake new file mode 100644 index 000000000..e8916d6e0 --- /dev/null +++ b/ports/folly/FindSnappy.cmake @@ -0,0 +1,12 @@ +find_path(SNAPPY_INCLUDE_DIR snappy.h) + +find_package(SNAPPY_LIBRARY_DEBUG NAMES snappyd) +find_package(SNAPPY_LIBRARY_RELEASE NAMES snappy) + +select_library_configurations(SNAPPY_LIBRARY) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + SNAPPY DEFAULT_MSG + SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR +) -- cgit v1.2.3 From 2e4d839dc5270137f9ff4f1df03c3d60d69d633e Mon Sep 17 00:00:00 2001 From: Koby Kahane Date: Thu, 29 Mar 2018 20:57:32 +0300 Subject: [cryptopp] Update to 6.1.0 (#3171) * [cryptopp] Update to 6.1.0 The CMake files for CryptoPP that were previously built into the project are now available separately in cryptopp-cmake, so we pick them up from there. * [cryptopp] USe ninja, fixup_cmake_targets --- ports/cryptopp/CONTROL | 2 +- ports/cryptopp/portfile.cmake | 35 ++++++++++++++++++++--------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/ports/cryptopp/CONTROL b/ports/cryptopp/CONTROL index 00d14756a..ef8e6fd75 100644 --- a/ports/cryptopp/CONTROL +++ b/ports/cryptopp/CONTROL @@ -1,3 +1,3 @@ Source: cryptopp -Version: 5.6.5-1 +Version: 6.1.0-1 Description: Crypto++ is a free C++ class library of cryptographic schemes. diff --git a/ports/cryptopp/portfile.cmake b/ports/cryptopp/portfile.cmake index 4847c208b..b0b59d29c 100644 --- a/ports/cryptopp/portfile.cmake +++ b/ports/cryptopp/portfile.cmake @@ -3,13 +3,25 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(VCPKG_LIBRARY_LINKAGE static) endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cryptopp-CRYPTOPP_5_6_5) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/weidai11/cryptopp/archive/CRYPTOPP_5_6_5.zip" - FILENAME "CRYPTOPP_5_6_5.zip" - SHA512 abca8089e2d587f59c503d2d6412b3128d061784349c735f3ee46be1cb9e3d0d0fed9a9173765fa033eb2dc744e03810de45b8cc2f8ca1672a36e4123648ea44 + +vcpkg_from_github( + OUT_SOURCE_PATH CMAKE_SOURCE_PATH + REPO noloader/cryptopp-cmake + REF aab149932675e4bb777a9d3d6b3f8b8182583fd7 + SHA512 748c77e936888d042bf4a72cc7ee3b7b2ecf16c003cb23296c1af413c9a0cba00cc942ecace26274fc8ac8bd4d848946beb9d7bf2253c5eab3315a4419ef5f1f + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO weidai11/cryptopp + REF CRYPTOPP_6_1_0 + SHA512 4bc02fef33f1859a07434a4752c2575afd781056e9a91eed99a13cebe2c91d66cbc7173e34d362da63dad6d38f9594ff291accd27e111232996ccd536bba0f39 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_SOURCE_PATH}/cryptopp-config.cmake DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_SOURCE_PATH}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) # Dynamic linking should be avoided for Crypto++ to reduce the attack surface, # so generate a static lib for both dynamic and static vcpkg targets. @@ -19,6 +31,7 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DBUILD_SHARED=OFF -DBUILD_STATIC=ON @@ -27,18 +40,10 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cryptopp) # There is no way to suppress installation of the headers and resource files in debug build. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - -# Remove executables -file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/cryptest.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/cryptest.exe) - -# Remove other files not required in package -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) # Handle copyright file(COPY ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cryptopp) -- cgit v1.2.3 From 3d87445cb0e42e67fa7321059bed0b20d171c605 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 29 Mar 2018 11:14:48 -0700 Subject: [abseil][aws-sdk-cpp][exiv2][rs-core-lib][tbb][thrift][zeromq] Upgrades --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 4 ++-- ports/tbb/CONTROL | 2 +- ports/tbb/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 4 ++-- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index 03462a816..a07f78c76 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-03-27 +Version: 2018-03-29 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 817ac004a..bd1d799a2 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 70b5fa948d920ccca86d143057497132f63a44f3 - SHA512 5964f4b082d183a3d8227c51617e7ac348b6c7b80264c0e96cdeba40a69979a0954f1792da20f760502d62771ac464400b820e4fe2b0b4ed55f8c6f81b17cc1e + REF d9b47d7888b39cd113bacacb9edd5023a71cbb3a + SHA512 d5aac7bbe7cdb1419f19eff80487a1d8fa03cde82db760bf9fab464a62ae66251c62f69ff13940db41af1bb287ea9680782773bf1cb19c15d489f711b390d734 HEAD_REF master ) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index bd1ccbec5..d2f5c186b 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,5 +1,5 @@ Source: aws-sdk-cpp -Version: 1.4.23 +Version: 1.4.24 Description: AWS SDK for C++ Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs # Automatically generated by generateFeatures.ps1 diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 7d98781aa..28097ee1a 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.4.23 - SHA512 5d77650c6468c5ab57eab2c5a5b647a5f4d56dc31cec0bca051e3e79554b386be5f6ed4b41cd7ca907e9e657c7dbef024fac2b9e505eb44204cf998ac1ee102c + REF 1.4.24 + SHA512 bda259caeeb909884128268f0dfe3ca58ce665be2a0304302f1fd09c4217cbcd34c20119009123aeb80377dfe5144b72cbd98d2acbdc9ffa729c09e380751bf2 HEAD_REF master ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 06862802c..0f4ddb750 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-03-27 +Version: 2018-03-29 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 046d0eabc..f68070eea 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF be992520b1570c2696d6ca1302fd49f1cb0164d8 - SHA512 fe4e2907268a8e5fe0b3a03fc39a5ba7d72daaf304b32c37ae8b0c0773711edc9ce0d194cd4f583b430ebf65ebcc58980a2a4e858c893c0bb1adb1886f6c0e6d + REF 8b7941b7332a3299b3b6061e93f352ef66440666 + SHA512 743a9792753915334e86c55112ef876bf0353924b85b0bf33ffb8217606ecb57954eec2d0e904f6e9fd9ea435b96f035bea793cb5040f54169eea0ba0c2fd7e3 HEAD_REF master ) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index 03e5f4955..a6f837d0a 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-03-17 +Version: 2018-03-29 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index 47e31c9bf..cca3be0a3 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF c5b4522c336cd2348c9b65b01802ef1c4865fca2 - SHA512 a720d2f4cf6ef9dda1ce3e6bccf1495a8d29d3765d7456a5e8b79342ddc13f68428d17ea1e2993cb181450b0c2dca4c377735eef0f2f2e8a6bd66e6f2b78fd6a + REF 3300d39fef567adf90f59d07223e55ca44ed4f98 + SHA512 0e696a94ab71ca29c61075d917a26b01057f657537c5516cb3bf2fd046d5c61f7e74d83a7c2eba2d4d923f3bd8b125f61c6732d09ade59b0995f42eb3df22a17 HEAD_REF master ) diff --git a/ports/tbb/CONTROL b/ports/tbb/CONTROL index 1de2e57a5..0e19d650b 100644 --- a/ports/tbb/CONTROL +++ b/ports/tbb/CONTROL @@ -1,3 +1,3 @@ Source: tbb -Version: 2018_U2 +Version: 2018_U3 Description: Intel's Threading Building Blocks. diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index 12e07ba78..f74d096de 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -10,8 +10,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO 01org/tbb - REF 2018_U2 - SHA512 a94b55bcabec47424be1c2d4b7bf3502a545bc714250a260e152b00431420094dbab64c0355bd0004ee9ad10d85c7b920969bf4b6d9a30b3697c7c5202518841 + REF 2018_U3 + SHA512 e92a2aabcdd456c1676eb9ce20653908a867ea18ff118f5f039823f5a10a0da3de61d0044774ad38b137e636fa8602af009dfeb59c84005fe90c6206aa3306ab HEAD_REF tbb_2018) if(TRIPLET_SYSTEM_ARCH STREQUAL x86) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 7e21ecce6..82524e78d 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-03-23 +Version: 2018-03-29 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index eae7f5c73..0293cca6f 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 272470790ad6db791bd6f9db399b2cd2d5879f74 - SHA512 9f9ae5d72adf1b46970f7527fe3841349c5652e4721a16967f1d9edbe4b1ecc83f146ece492234da16ed7c033b172aa49dc7f5431bcdea37286a2dc21835691e + REF 930428438c0b6c8f60560cbb7dcad79042badacb + SHA512 b446126a8f697903abbdafcd8cd9a348fc97d34b2a207592cae1801e481b5159f92b7b0296a3531cd8f2a9e223e051f71ea63ce5da2dd2f67364db9bfd84dcf3 HEAD_REF master ) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index 64f2a6507..a7f21a9b8 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-03-27 +Version: 2018-03-29 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 45e10bf3d..3220d8f3a 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF 8fb5b10d8a60e06b9adebd22ecc118f13580375c - SHA512 5839410cf1842c0ac684f42ed52c4ed117104dce5b31106eff3c7e799e1d3d57f72413b4381ebb36e1835bf2aa44fcdc0e36140871141edb96ab50b4d8b23a8d + REF 2aa54d662048f420ac0dbd5d9b46559963a675f2 + SHA512 48abea6fdac733ff7c2da7b3f45f129dc904d5d5a59f41f4f47419f5c2483a5227aec1a605d76422071045ea82c76ceb55a521bb80fe5d7f77d5d01c43acb3e6 HEAD_REF master ) -- cgit v1.2.3 From e90c5e61eabe12d93486d17dde89b7de979da7d6 Mon Sep 17 00:00:00 2001 From: Krzysztof Czurylo Date: Thu, 29 Mar 2018 22:52:58 +0200 Subject: [pmdk] Rename and update to version 1.4 (#3173) * [pmdk] Rename and update to version 1.4 The NVML project has been renamed to PMDK (Persistent Memory Development Kit). PMDK version 1.4 is the first official release with the new name. * [pmdk] Use vcpkg_from_github more -- avoid separate variable declarations --- ports/nvml/CONTROL | 3 -- ports/nvml/portfile.cmake | 74 --------------------------------------------- ports/pmdk/CONTROL | 3 ++ ports/pmdk/portfile.cmake | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 77 deletions(-) delete mode 100644 ports/nvml/CONTROL delete mode 100644 ports/nvml/portfile.cmake create mode 100644 ports/pmdk/CONTROL create mode 100644 ports/pmdk/portfile.cmake diff --git a/ports/nvml/CONTROL b/ports/nvml/CONTROL deleted file mode 100644 index 8bf941bd3..000000000 --- a/ports/nvml/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: nvml -Version: 1.3-0 -Description: Non-Volatile Memory Library \ No newline at end of file diff --git a/ports/nvml/portfile.cmake b/ports/nvml/portfile.cmake deleted file mode 100644 index 9e51c2bda..000000000 --- a/ports/nvml/portfile.cmake +++ /dev/null @@ -1,74 +0,0 @@ - -set(NVML_VERSION 1.3) -set(NVML_HASH 59fb552c693d5279ec86eff8eb1c36832c9c5beb6492a64b54b21c09d90ed52cba22d57912a304cf1ec17c4633da641200fd50dbe4a38355f43c674842f991bd) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${NVML_VERSION}) - -include(vcpkg_common_functions) - -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "WARNING: Static building not supported. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() - -if (TRIPLET_SYSTEM_ARCH MATCHES "arm") - message(FATAL_ERROR "ARM is currently not supported") -elseif (TRIPLET_SYSTEM_ARCH MATCHES "x86") - message(FATAL_ERROR "x86 is not supported. Please use nvml:x64-windows or set environment variable VCPKG_DEFAULT_TRIPLET to 'x64-windows'") -else () - set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH}) -endif() - -# Download source -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO pmem/nvml - REF ${NVML_VERSION} - SHA512 ${NVML_HASH} - HEAD_REF master -) - -# Build only the selected projects -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/src/NVML.sln - PLATFORM x64 - TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmempool,Solution Items\\libvmem,Solution Items\\Tools\\pmempool" - OPTIONS /p:SRCVERSION=${NVML_VERSION} -) - -set(DEBUG_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Debug) -set(RELEASE_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Release) - -# Install header files -file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/*.h) -file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/libpmemobj/*.h) -file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libpmemobj) -file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/libpmemobj++/*.hpp) -file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libpmemobj++) -# Remove unneeded header files -file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libvmmalloc.h) -file(REMOVE ${CURRENT_PACKAGES_DIR}/include/librpmem.h) - -# Install libraries (debug) -file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.lib ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.exp) -file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libpmemcommon.lib) -file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.dll) -file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - -# Install libraries (release) -file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.lib ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.exp) -file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libpmemcommon.lib) -file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.dll) -file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - -# Install tools (release only) -file(INSTALL ${RELEASE_ARTIFACTS_PATH}/pmempool.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/nvml) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/nvml) - -vcpkg_copy_pdbs() - -# Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nvml) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/nvml/LICENSE ${CURRENT_PACKAGES_DIR}/share/nvml/copyright) diff --git a/ports/pmdk/CONTROL b/ports/pmdk/CONTROL new file mode 100644 index 000000000..f440b68bc --- /dev/null +++ b/ports/pmdk/CONTROL @@ -0,0 +1,3 @@ +Source: pmdk +Version: 1.4-1 +Description: Persistent Memory Development Kit \ No newline at end of file diff --git a/ports/pmdk/portfile.cmake b/ports/pmdk/portfile.cmake new file mode 100644 index 000000000..89c48a8fb --- /dev/null +++ b/ports/pmdk/portfile.cmake @@ -0,0 +1,77 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Static building not supported. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Static CRT linkage is not supported") +endif() + +if (TRIPLET_SYSTEM_ARCH MATCHES "arm") + message(FATAL_ERROR "ARM is currently not supported") +elseif (TRIPLET_SYSTEM_ARCH MATCHES "x86") + message(FATAL_ERROR "x86 is not supported. Please use pmdk:x64-windows instead.") +endif() + +# Download source +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pmem/pmdk + REF 1.4 + SHA512 95dbea9acfea4a6cb433a25f56f7484946a93fbce1c5e0e1d6ff36e0824e3e0e9f28f37024918998358f8ff12e69d0902fcf88357b9ad12695f32e06e86ffac8 + HEAD_REF master +) + +get_filename_component(PMDK_VERSION "${SOURCE_PATH}" NAME) +string(REPLACE "pmdk-" "" PMDK_VERSION "${PMDK_VERSION}") + +# Build only the selected projects +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/src/PMDK.sln + PLATFORM x64 + PLATFORM_TOOLSET v140 + TARGET_PLATFORM_VERSION 10.0.16299.0 + TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmemcto,Solution Items\\libpmempool,Solution Items\\libvmem,Solution Items\\Tools\\pmempool" + OPTIONS /p:SRCVERSION=${PMDK_VERSION} +) + +set(DEBUG_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Debug) +set(RELEASE_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Release) + +# Install header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/libpmemobj/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libpmemobj) +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/libpmemobj++/*.hpp) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libpmemobj++) + +# Remove unneeded header files +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libvmmalloc.h) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/librpmem.h) + +# Install libraries (debug) +file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.lib ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.exp) +file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libpmemcommon.lib) +file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.dll) +file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +# Install libraries (release) +file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.lib ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.exp) +file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libpmemcommon.lib) +file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.dll) +file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + +# Install tools (release only) +file(INSTALL ${RELEASE_ARTIFACTS_PATH}/pmempool.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/pmdk) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/pmdk) + +vcpkg_copy_pdbs() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pmdk) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/pmdk/LICENSE ${CURRENT_PACKAGES_DIR}/share/pmdk/copyright) -- cgit v1.2.3 From 6c118ba7714a98dd37ae55dc891eadb226f5242f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 29 Mar 2018 13:57:38 -0700 Subject: [unrar/recast/yoga] Bump version, fix whitespace --- ports/recast/CONTROL | 2 +- ports/recast/portfile.cmake | 4 ++-- ports/unrar/CONTROL | 2 +- ports/unrar/portfile.cmake | 2 +- ports/yoga/CONTROL | 2 +- ports/yoga/portfile.cmake | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/recast/CONTROL b/ports/recast/CONTROL index 34bb2b34a..4cc61e30d 100644 --- a/ports/recast/CONTROL +++ b/ports/recast/CONTROL @@ -1,3 +1,3 @@ Source: recast -Version: 1.5.1 +Version: 1.5.1-1 Description: Navigation-mesh Toolset for Games diff --git a/ports/recast/portfile.cmake b/ports/recast/portfile.cmake index e0670dbae..7d9f08f93 100644 --- a/ports/recast/portfile.cmake +++ b/ports/recast/portfile.cmake @@ -1,8 +1,8 @@ include(vcpkg_common_functions) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(WARNING "Dynamic not supported building static") - set(VCPKG_LIBRARY_LINKAGE static) + message(WARNING "Dynamic not supported, building static") + set(VCPKG_LIBRARY_LINKAGE static) endif() vcpkg_from_github( diff --git a/ports/unrar/CONTROL b/ports/unrar/CONTROL index ce6d4dab8..d9c586c6a 100644 --- a/ports/unrar/CONTROL +++ b/ports/unrar/CONTROL @@ -1,3 +1,3 @@ Source: unrar -Version: 5.5.8 +Version: 5.5.8-1 Description: rarlab's unrar libary diff --git a/ports/unrar/portfile.cmake b/ports/unrar/portfile.cmake index 19c7c9d7a..4ad834d15 100644 --- a/ports/unrar/portfile.cmake +++ b/ports/unrar/portfile.cmake @@ -6,7 +6,7 @@ set(UNRAR_URL http://www.rarlab.com/rar/${UNRAR_FILENAME}) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/unrar) if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message(STATUS "Unrar buildsystem doesn't support static building. Building dynamic instead.") + message(STATUS "Unrar buildsystem doesn't support static building. Building dynamic instead.") set(VCPKG_LIBRARY_LINKAGE dynamic) endif() diff --git a/ports/yoga/CONTROL b/ports/yoga/CONTROL index c8ff36c24..c4bbe1a69 100644 --- a/ports/yoga/CONTROL +++ b/ports/yoga/CONTROL @@ -1,3 +1,3 @@ Source: yoga -Version: 1.7.0 +Version: 1.7.0-1 Description: Yoga is a cross-platform layout engine which implements Flexbox diff --git a/ports/yoga/portfile.cmake b/ports/yoga/portfile.cmake index d61017d63..a261d5106 100644 --- a/ports/yoga/portfile.cmake +++ b/ports/yoga/portfile.cmake @@ -12,7 +12,7 @@ include(vcpkg_common_functions) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - message(WARNING "Dynamic not supported building static") + message(WARNING "Dynamic not supported, building static") set(VCPKG_LIBRARY_LINKAGE static) elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "Error: UWP builds not supported yet.") -- cgit v1.2.3 From ba7b8e6d7336fd4529cfe1de50b224a98d6ff496 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 29 Mar 2018 15:29:16 -0700 Subject: Add message for appleclang versions that don't support std::filesystem --- toolsrc/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index da0f41631..2a1304526 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -3,6 +3,12 @@ project(vcpkg C CXX) if(CMAKE_COMPILER_IS_GNUXX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") set(GCC 1) +elseif(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 9.0.0) + message(FATAL_ERROR "Apple clang versions 9 and below do not have support for the C++ Filesystem TS. Please install gcc6 or newer from homebrew (brew install gcc6).") + else() + set(CLANG 1) + endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") set(CLANG 1) elseif(MSVC) -- cgit v1.2.3 From ca58367c9ae70739eb55fa46ed2b339e3aaf50df Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 29 Mar 2018 18:34:38 -0700 Subject: [cryptopp] Fix UWP builds --- ports/cryptopp/CONTROL | 2 +- ports/cryptopp/cmake.patch | 15 +++++++++++++++ ports/cryptopp/patch.patch | 12 ++++++++++++ ports/cryptopp/portfile.cmake | 7 +++++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 ports/cryptopp/cmake.patch create mode 100644 ports/cryptopp/patch.patch diff --git a/ports/cryptopp/CONTROL b/ports/cryptopp/CONTROL index ef8e6fd75..6fea020bd 100644 --- a/ports/cryptopp/CONTROL +++ b/ports/cryptopp/CONTROL @@ -1,3 +1,3 @@ Source: cryptopp -Version: 6.1.0-1 +Version: 6.1.0-2 Description: Crypto++ is a free C++ class library of cryptographic schemes. diff --git a/ports/cryptopp/cmake.patch b/ports/cryptopp/cmake.patch new file mode 100644 index 000000000..fbe725eb9 --- /dev/null +++ b/ports/cryptopp/cmake.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5b6e1e6..a0adcf6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -329,6 +329,10 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FI\"winapifamily.h\"" ) + endif () + ++if(WINDOWS_STORE) ++ add_definitions(-DCRYPTOPP_DISABLE_NACL=1) ++endif() ++ + # Enable PIC for all target machines except 32-bit i386 due to register pressures. + if (NOT CRYPTOPP_I386) + SET(CMAKE_POSITION_INDEPENDENT_CODE 1) diff --git a/ports/cryptopp/patch.patch b/ports/cryptopp/patch.patch new file mode 100644 index 000000000..5c49d2757 --- /dev/null +++ b/ports/cryptopp/patch.patch @@ -0,0 +1,12 @@ +diff --git a/config.h b/config.h +index b96b7aa..3f004ac 100644 +--- a/config.h ++++ b/config.h +@@ -795,6 +795,7 @@ NAMESPACE_END + #endif + + #ifdef CRYPTOPP_WIN32_AVAILABLE ++#include + # if !defined(WINAPI_FAMILY) + # define THREAD_TIMER_AVAILABLE + # elif defined(WINAPI_FAMILY) diff --git a/ports/cryptopp/portfile.cmake b/ports/cryptopp/portfile.cmake index b0b59d29c..6b4b844c4 100644 --- a/ports/cryptopp/portfile.cmake +++ b/ports/cryptopp/portfile.cmake @@ -23,6 +23,13 @@ vcpkg_from_github( file(COPY ${CMAKE_SOURCE_PATH}/cryptopp-config.cmake DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_SOURCE_PATH}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_apply_patches( + SOURCE_PATH "${SOURCE_PATH}" + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/patch.patch" + "${CMAKE_CURRENT_LIST_DIR}/cmake.patch" +) + # Dynamic linking should be avoided for Crypto++ to reduce the attack surface, # so generate a static lib for both dynamic and static vcpkg targets. # See also: -- cgit v1.2.3 From f9d4692749ad68340a07453add49a8ef029fa155 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 29 Mar 2018 21:14:06 -0700 Subject: [vcpkg.cmake] Remove Windows SDK detection. Let cmake detect it --- scripts/buildsystems/vcpkg.cmake | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 10e3c3f13..0c32b22fb 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -44,7 +44,7 @@ else() elseif(_VCPKG_CL MATCHES "arm/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH arm) elseif(_VCPKG_CL MATCHES "arm64/cl.exe$") - set(_VCPKG_TARGET_TRIPLET_ARCH arm64) + set(_VCPKG_TARGET_TRIPLET_ARCH arm64) elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") @@ -110,16 +110,6 @@ list(APPEND CMAKE_LIBRARY_PATH ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link ) -if (NOT DEFINED CMAKE_SYSTEM_VERSION AND _VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp") - include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake) - # This is used as an implicit parameter for vcpkg_get_windows_sdk - set(VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR}) - vcpkg_get_windows_sdk(WINDOWS_SDK_VERSION) - unset(VCPKG_ROOT_DIR) - set(CMAKE_SYSTEM_VERSION ${WINDOWS_SDK_VERSION} CACHE STRING "Windows SDK version") - message(STATUS "Found Windows SDK ${WINDOWS_SDK_VERSION}") -endif() - file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) set(CMAKE_SYSTEM_IGNORE_PATH "${_programfiles}/OpenSSL" -- cgit v1.2.3 From 0842b6c327f19df6ec6f7bff3909bcf904a5c5c9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 30 Mar 2018 14:43:42 -0700 Subject: [tesseract] Automatically link ws2_32 to prevent missing symbol issues in clients. --- ports/tesseract/CONTROL | 2 +- ports/tesseract/portfile.cmake | 1 + ports/tesseract/ws2-32.patch | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 ports/tesseract/ws2-32.patch diff --git a/ports/tesseract/CONTROL b/ports/tesseract/CONTROL index 6e0b0428d..264a09584 100644 --- a/ports/tesseract/CONTROL +++ b/ports/tesseract/CONTROL @@ -1,4 +1,4 @@ Source: tesseract -Version: 3.05.01-2 +Version: 3.05.01-3 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 5c37f51b3..cebf4316b 100644 --- a/ports/tesseract/portfile.cmake +++ b/ports/tesseract/portfile.cmake @@ -17,6 +17,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-icu.patch + ${CMAKE_CURRENT_LIST_DIR}/ws2-32.patch ) # The built-in cmake FindICU is better diff --git a/ports/tesseract/ws2-32.patch b/ports/tesseract/ws2-32.patch new file mode 100644 index 000000000..1d3be8189 --- /dev/null +++ b/ports/tesseract/ws2-32.patch @@ -0,0 +1,12 @@ +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; -- cgit v1.2.3 From 35bbd4015a906c92b394698779e57fc2945505cc Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 30 Mar 2018 14:46:22 -0700 Subject: Improve message for appleclang --- toolsrc/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index 2a1304526..acc12f2b3 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -4,8 +4,12 @@ project(vcpkg C CXX) if(CMAKE_COMPILER_IS_GNUXX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") set(GCC 1) elseif(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 9.0.0) - message(FATAL_ERROR "Apple clang versions 9 and below do not have support for the C++ Filesystem TS. Please install gcc6 or newer from homebrew (brew install gcc6).") + if(NOT VCPKG_ALLOW_APPLE_CLANG) + message(FATAL_ERROR +"Building the vcpkg tool requires support for the C++ Filesystem TS. +Apple clang versions 9 and below do not have support for it. +Please install gcc6 or newer from homebrew (brew install gcc6). +If you would like to try anyway, set VCPKG_ALLOW_APPLE_CLANG.") else() set(CLANG 1) endif() -- cgit v1.2.3 From cf9987e21aee94cd4b4c991c6eb788ec87177923 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 30 Mar 2018 15:21:22 -0700 Subject: [openssl] Do not pull in winsock.h from rand.h --- ports/openssl/CONTROL | 2 +- ports/openssl/portfile.cmake | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index 9266dd10d..d5ac7c890 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2o +Version: 1.0.2o-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/portfile.cmake b/ports/openssl/portfile.cmake index 458aa07b6..a6e5fd110 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -155,6 +155,10 @@ file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" _contents) string(REPLACE "" "" _contents "${_contents}") file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" "${_contents}") +file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" _contents) +string(REPLACE "# include " "#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include " _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" "${_contents}") + vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -- cgit v1.2.3 From eea766d2d0ea285541bfd753b68eaa8c3455304a Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 29 Mar 2018 18:53:22 -0700 Subject: [folly][rocksdb] Fix lz4+snappy support --- ports/folly/CONTROL | 2 +- ports/folly/FindLZ4.cmake | 7 ++++--- ports/folly/FindSnappy.cmake | 7 ++++--- ports/rocksdb/CONTROL | 10 +++++++++- ports/rocksdb/Findlz4.cmake | 13 +++++++++++++ ports/rocksdb/Findsnappy.cmake | 13 +++++++++++++ ports/rocksdb/portfile.cmake | 28 +++++++++++++++++++++++----- 7 files changed, 67 insertions(+), 13 deletions(-) create mode 100644 ports/rocksdb/Findlz4.cmake create mode 100644 ports/rocksdb/Findsnappy.cmake diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 457874906..cb3a464af 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,5 +1,5 @@ Source: folly -Version: 2018.03.19.00-1 +Version: 2018.03.19.00-2 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 Default-Features: zlib diff --git a/ports/folly/FindLZ4.cmake b/ports/folly/FindLZ4.cmake index bf3140e15..f80962c66 100644 --- a/ports/folly/FindLZ4.cmake +++ b/ports/folly/FindLZ4.cmake @@ -1,9 +1,10 @@ find_path(LZ4_INCLUDE_DIR lz4.h) -find_package(LZ4_LIBRARY_DEBUG NAMES lz4d) -find_package(LZ4_LIBRARY_RELEASE NAMES lz4) +find_library(LZ4_LIBRARY_DEBUG NAMES lz4d) +find_library(LZ4_LIBRARY_RELEASE NAMES lz4) -select_library_configurations(LZ4_LIBRARY) +include(SelectLibraryConfigurations) +select_library_configurations(LZ4) include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS( diff --git a/ports/folly/FindSnappy.cmake b/ports/folly/FindSnappy.cmake index e8916d6e0..253d0d84c 100644 --- a/ports/folly/FindSnappy.cmake +++ b/ports/folly/FindSnappy.cmake @@ -1,9 +1,10 @@ find_path(SNAPPY_INCLUDE_DIR snappy.h) -find_package(SNAPPY_LIBRARY_DEBUG NAMES snappyd) -find_package(SNAPPY_LIBRARY_RELEASE NAMES snappy) +find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd) +find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy) -select_library_configurations(SNAPPY_LIBRARY) +include(SelectLibraryConfigurations) +select_library_configurations(SNAPPY) include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS( diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 90511f0b2..5e6851f83 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,12 @@ Source: rocksdb -Version: 5.11.3 +Version: 5.11.3-1 Description: A library that provides an embeddable, persistent key-value store for fast storage Build-Depends: zlib + +Feature: lz4 +Build-Depends: lz4 +Description: lz4 support in rocksdb + +Feature: snappy +Build-Depends: snappy +Description: snappy support in rocksdb diff --git a/ports/rocksdb/Findlz4.cmake b/ports/rocksdb/Findlz4.cmake new file mode 100644 index 000000000..f80962c66 --- /dev/null +++ b/ports/rocksdb/Findlz4.cmake @@ -0,0 +1,13 @@ +find_path(LZ4_INCLUDE_DIR 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 DEFAULT_MSG + LZ4_LIBRARY LZ4_INCLUDE_DIR +) diff --git a/ports/rocksdb/Findsnappy.cmake b/ports/rocksdb/Findsnappy.cmake new file mode 100644 index 000000000..253d0d84c --- /dev/null +++ b/ports/rocksdb/Findsnappy.cmake @@ -0,0 +1,13 @@ +find_path(SNAPPY_INCLUDE_DIR snappy.h) + +find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd) +find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy) + +include(SelectLibraryConfigurations) +select_library_configurations(SNAPPY) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + SNAPPY DEFAULT_MSG + SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR +) diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index e37b79633..0278a3b84 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -9,14 +9,19 @@ vcpkg_from_github( ) vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/0002-disable-gtest.patch" "${CMAKE_CURRENT_LIST_DIR}/0003-only-build-one-flavor.patch" "${CMAKE_CURRENT_LIST_DIR}/use-find-package.patch" ) file(REMOVE "${SOURCE_PATH}/cmake/modules/Findzlib.cmake") +file(COPY + "${CMAKE_CURRENT_LIST_DIR}/Findlz4.cmake" + "${CMAKE_CURRENT_LIST_DIR}/Findsnappy.cmake" + DESTINATION "${SOURCE_PATH}/cmake/modules" +) if(VCPKG_CRT_LINKAGE STREQUAL "static") set(WITH_MD_LIBRARY OFF) @@ -27,13 +32,26 @@ endif() string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ROCKSDB_DISABLE_INSTALL_SHARED_LIB) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ROCKSDB_DISABLE_INSTALL_STATIC_LIB) +set(WITH_LZ4 OFF) +if("lz4" IN_LIST FEATURES) + set(WITH_LZ4 ON) +endif() + +set(WITH_SNAPPY OFF) +if("snappy" IN_LIST FEATURES) + set(WITH_SNAPPY ON) +endif() + +get_filename_component(ROCKSDB_VERSION "${SOURCE_PATH}" NAME) +string(REPLACE "rocksdb-rocksdb-" "" ROCKSDB_VERSION "${ROCKSDB_VERSION}") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DWITH_GFLAGS=0 - -DWITH_SNAPPY=0 - -DWITH_LZ4=0 + -DWITH_SNAPPY=${WITH_SNAPPY} + -DWITH_LZ4=${WITH_LZ4} -DWITH_ZLIB=1 -DWITH_TESTS=OFF -DROCKSDB_INSTALL_ON_WINDOWS=ON @@ -43,7 +61,7 @@ vcpkg_configure_cmake( -DCMAKE_DEBUG_POSTFIX=d -DROCKSDB_DISABLE_INSTALL_SHARED_LIB=${ROCKSDB_DISABLE_INSTALL_SHARED_LIB} -DROCKSDB_DISABLE_INSTALL_STATIC_LIB=${ROCKSDB_DISABLE_INSTALL_STATIC_LIB} - -DROCKSDB_VERSION=5.11.3 + -DROCKSDB_VERSION=${ROCKSDB_VERSION} -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} -DCMAKE_DISABLE_FIND_PACKAGE_TBB=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_NUMA=TRUE -- cgit v1.2.3 From 8d0764cca8915ee08701eb0d2416154abfb1e5ab Mon Sep 17 00:00:00 2001 From: weiqiang <819064774@qq.com> Date: Sat, 31 Mar 2018 06:27:40 +0800 Subject: update libvpx 1.7.0 (#3172) --- ports/libvpx/CONTROL | 2 +- ports/libvpx/portfile.cmake | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ports/libvpx/CONTROL b/ports/libvpx/CONTROL index 6095c6de6..fa1522629 100644 --- a/ports/libvpx/CONTROL +++ b/ports/libvpx/CONTROL @@ -1,3 +1,3 @@ Source: libvpx -Version: 1.6.1-2 +Version: 1.7.0 Description: The reference software implementation for the video coding formats VP8 and VP9. diff --git a/ports/libvpx/portfile.cmake b/ports/libvpx/portfile.cmake index 31630332a..d253008e7 100644 --- a/ports/libvpx/portfile.cmake +++ b/ports/libvpx/portfile.cmake @@ -5,8 +5,8 @@ endif() include(vcpkg_common_functions) -set(LIBVPX_VERSION 1.6.1) -set(LIBVPX_HASH 13b7eb515d026b302b8c484d6f06df067feb5aed4ceac953d85fe84fd684dab07e89ddbf80b4f395c6d9127709422156287e5754f49246050b2e18930adb3970) +set(LIBVPX_VERSION 1.7.0) +set(LIBVPX_HASH 8b3b766b550f8d86907628d7ed88035f9a2612aac21542e0fd5ad35b905eb82cbe1be02a1a24afce7a3bcc4766f62611971f72724761996b392136c40a1e7ff0) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libvpx-${LIBVPX_VERSION}) @@ -14,7 +14,7 @@ string(REGEX REPLACE "\\\\" "/" SOURCE_PATH_UNIX ${SOURCE_PATH}) string(REGEX REPLACE "\\\\" "/" CURRENT_PACKAGES_DIR_UNIX ${CURRENT_PACKAGES_DIR}) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/webmproject/libvpx/archive/v${LIBVPX_VERSION}.tar.gz" + URLS "https://github.com/webmproject/libvpx/archive/v${LIBVPX_VERSION}/libvpx-${LIBVPX_VERSION}.tar.gz" FILENAME "libvpx-${LIBVPX_VERSION}.tar.gz" SHA512 ${LIBVPX_HASH} ) @@ -23,8 +23,11 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_find_acquire_program(YASM) vcpkg_find_acquire_program(PERL) vcpkg_acquire_msys(MSYS_ROOT PACKAGES make) +vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils) get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) + +message(STATUS "PERL_EXE_PATH ; ${PERL_EXE_PATH}") set(ENV{PATH} "${YASM_EXE_PATH};${MSYS_ROOT}/usr/bin;$ENV{PATH};${PERL_EXE_PATH}") set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) @@ -48,7 +51,7 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm) set(LIBVPX_ARCH_DIR "ARM") endif() -set(LIBVPX_TARGET_VS "vs14") +set(LIBVPX_TARGET_VS "vs15") message(STATUS "Generating makefile") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) -- cgit v1.2.3 From a8ae8773c5943c0c6a123e1c49c73cbb69e3add6 Mon Sep 17 00:00:00 2001 From: Youngho Kim Date: Sat, 31 Mar 2018 08:34:51 +0900 Subject: add Mosquitto library for IoT (#3127) * initial commit of 1.4.15 for mosquitto lib. initial commit of 1.4.15 for mosquitto lib. * bug fixed for win64 on mosquitto and install error bug fixed for win64 on mosquitto and install error * [mosquitto] Use patches to simplify portfile. --- ports/mosquitto/0001-win64-cmake.patch | 40 ++++++++++++++++++++ ports/mosquitto/CONTROL | 8 ++++ ports/mosquitto/cmake-2.patch | 68 ++++++++++++++++++++++++++++++++++ ports/mosquitto/cmake.patch | 13 +++++++ ports/mosquitto/portfile.cmake | 56 ++++++++++++++++++++++++++++ 5 files changed, 185 insertions(+) create mode 100644 ports/mosquitto/0001-win64-cmake.patch create mode 100644 ports/mosquitto/CONTROL create mode 100644 ports/mosquitto/cmake-2.patch create mode 100644 ports/mosquitto/cmake.patch create mode 100644 ports/mosquitto/portfile.cmake diff --git a/ports/mosquitto/0001-win64-cmake.patch b/ports/mosquitto/0001-win64-cmake.patch new file mode 100644 index 000000000..70888b637 --- /dev/null +++ b/ports/mosquitto/0001-win64-cmake.patch @@ -0,0 +1,40 @@ +--- a/config.h ++++ b/config.h +@@ -16,7 +16,7 @@ + # define EPROTO ECONNABORTED + #endif + +-#ifdef WIN32 ++#ifdef WIN32 || WIN64 + # ifndef strcasecmp + # define strcasecmp strcmpi + # endif +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -4,8 +4,8 @@ + if (${WITH_THREADING} STREQUAL ON) + add_definitions("-DWITH_THREADING") + if (WIN32) +- set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x86\\pthreadVC2.lib) +- set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include) ++ set (PTHREAD_LIBRARIES ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/pthreadsVC2.lib) ++ set (PTHREAD_INCLUDE_DIR ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include) + else (WIN32) + find_library(LIBPTHREAD pthread) + if (LIBPTHREAD) +--- a/lib/net_mosq.h ++++ b/lib/net_mosq.h +@@ -20,7 +20,12 @@ + #include + #else + #include ++#if defined(_MSC_VER) && _MSC_VER > 1900 ++#undef ssize_t + typedef int ssize_t; ++#else ++typedef int ssize_t; ++#endif + #endif + + #include + diff --git a/ports/mosquitto/CONTROL b/ports/mosquitto/CONTROL new file mode 100644 index 000000000..81d12dc23 --- /dev/null +++ b/ports/mosquitto/CONTROL @@ -0,0 +1,8 @@ +Source: mosquitto +Version: 1.4.15 +Build-Depends: c-ares, libwebsockets, openssl, pthreads +Description: Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol versions 3.1 and + 3.1.1. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it + suitable for "machine to machine" messaging such as with low power sensors or mobile devices such as phones, embedded + computers or microcontrollers like the Arduino. you can see more information from this url + https://mosquitto.org/download/ diff --git a/ports/mosquitto/cmake-2.patch b/ports/mosquitto/cmake-2.patch new file mode 100644 index 000000000..bd5121c72 --- /dev/null +++ b/ports/mosquitto/cmake-2.patch @@ -0,0 +1,68 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3a68061..e4197fd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,10 +24,10 @@ endif (WIN32) + add_definitions (-DCMAKE -DVERSION=\"${VERSION}\" -DTIMESTAMP=\"${TIMESTAMP}\") + + if (WIN32) +- set (BINDIR .) +- set (SBINDIR .) ++ set (BINDIR bin) ++ set (SBINDIR bin) + set (SYSCONFDIR .) +- set (LIBDIR .) ++ set (LIBDIR lib) + set (INCLUDEDIR include) + set (DATAROOTDIR share) + set (MANDIR man) +@@ -86,10 +86,10 @@ option(WITH_SRV "Include SRV lookup support?" ON) + add_subdirectory(lib) + add_subdirectory(client) + add_subdirectory(src) +-add_subdirectory(man) ++#add_subdirectory(man) + + # ======================================== + # Install config file + # ======================================== + +-install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION "${SYSCONFDIR}") ++#install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION "${SYSCONFDIR}") +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 1260761..aebd580 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -4,8 +4,8 @@ option(WITH_THREADING "Include client library threading support?" ON) + if (${WITH_THREADING} STREQUAL ON) + add_definitions("-DWITH_THREADING") + if (WIN32) +- set (PTHREAD_LIBRARIES ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/pthreadsVC2.lib) +- set (PTHREAD_INCLUDE_DIR ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include) ++ find_library(PTHREAD_LIBRARIES NAMES pthreadsVC2) ++ find_path(PTHREAD_INCLUDE_DIR pthread.h) + else (WIN32) + find_library(LIBPTHREAD pthread) + if (LIBPTHREAD) +@@ -78,7 +78,7 @@ set_target_properties(libmosquitto PROPERTIES + SOVERSION 1 + ) + +-install(TARGETS libmosquitto RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}") ++install(TARGETS libmosquitto RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}" ARCHIVE DESTINATION "${LIBDIR}") + install(FILES mosquitto.h DESTINATION "${INCLUDEDIR}") + + if (UNIX) +diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt +index b80dc18..e91ec77 100644 +--- a/lib/cpp/CMakeLists.txt ++++ b/lib/cpp/CMakeLists.txt +@@ -10,7 +10,7 @@ set_target_properties(mosquittopp PROPERTIES + VERSION ${VERSION} + SOVERSION 1 + ) +-install(TARGETS mosquittopp RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}") ++install(TARGETS mosquittopp RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}" ARCHIVE DESTINATION "${LIBDIR}") + install(FILES mosquittopp.h DESTINATION "${INCLUDEDIR}") + + if (UNIX) diff --git a/ports/mosquitto/cmake.patch b/ports/mosquitto/cmake.patch new file mode 100644 index 000000000..e20d3986e --- /dev/null +++ b/ports/mosquitto/cmake.patch @@ -0,0 +1,13 @@ +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -4,8 +4,8 @@ + if (${WITH_THREADING} STREQUAL ON) + add_definitions("-DWITH_THREADING") + if (WIN32) +- set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x86\\pthreadVC2.lib) +- set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include) ++ set (PTHREAD_LIBRARIES ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/pthreadsVC2.lib) ++ set (PTHREAD_INCLUDE_DIR ${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include) + else (WIN32) + find_library(LIBPTHREAD pthread) + if (LIBPTHREAD) diff --git a/ports/mosquitto/portfile.cmake b/ports/mosquitto/portfile.cmake new file mode 100644 index 000000000..a9c70f853 --- /dev/null +++ b/ports/mosquitto/portfile.cmake @@ -0,0 +1,56 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message("mosquitto only supports dynamic linkage") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "mosquitto does not support static CRT linkage") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eclipse/mosquitto + REF v1.4.15 + SHA512 428ef9434d3fe022232dcde415fe8cd948d237507d512871803a116230f9e011c10fa01313111ced0946f906e8cc7e26d9eee5de6caa7f82590753a4d087f6fd + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/0001-win64-cmake.patch" + "${CMAKE_CURRENT_LIST_DIR}/cmake.patch" + "${CMAKE_CURRENT_LIST_DIR}/cmake-2.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_SRV=OFF + -DWITH_WEBSOCKETS=ON + -DWITH_TLS=ON + -DWITH_TLS_PSK=ON + -DWITH_THREADING=ON + OPTIONS_RELEASE + -DENABLE_DEBUG=OFF + OPTIONS_DEBUG + -DENABLE_DEBUG=ON +) + +vcpkg_install_cmake() + +# 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(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/mosquitto RENAME copyright) + +# Copy pdb +vcpkg_copy_pdbs() -- cgit v1.2.3 From c8f164fd91a1a0a2c62bd219c6583f3c0c5003d6 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Sat, 31 Mar 2018 03:02:41 +0300 Subject: Add mhook library. (#3178) * Add mhook library. * [mhook] Prefer ninja --- ports/mhook/CONTROL | 3 +++ ports/mhook/portfile.cmake | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 ports/mhook/CONTROL create mode 100644 ports/mhook/portfile.cmake diff --git a/ports/mhook/CONTROL b/ports/mhook/CONTROL new file mode 100644 index 000000000..24fae14df --- /dev/null +++ b/ports/mhook/CONTROL @@ -0,0 +1,3 @@ +Source: mhook +Version: 2.5.1-1 +Description: A Windows API hooking library. diff --git a/ports/mhook/portfile.cmake b/ports/mhook/portfile.cmake new file mode 100644 index 000000000..e9faeccae --- /dev/null +++ b/ports/mhook/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apriorit/mhook + REF 2.5.1 + SHA512 914f198417b1e30301a42463af5cfbf9269dc64bcf1be87d3d6d2943fd72b3536f48eb4bfb25a51dd0bbe0f8f099777b2d49c9d58cb2e2eeb517d998917ae976 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mhook RENAME copyright) + +vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 800f8b0e1dca9cfdb90a9e74c01060bc0440d2a6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 30 Mar 2018 16:59:59 -0700 Subject: Specify ninja exe --- scripts/cmake/vcpkg_configure_cmake.cmake | 1 + scripts/cmake/vcpkg_find_acquire_program.cmake | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 4ab02f710..3a3a88515 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -115,6 +115,7 @@ function(vcpkg_configure_cmake) vcpkg_find_acquire_program(NINJA) get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${NINJA_PATH}") + list(APPEND _csc_OPTIONS "-DCMAKE_MAKE_PROGRAM=${NINJA}") endif() file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 64d0c7599..0352b1890 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -105,14 +105,18 @@ function(vcpkg_find_acquire_program VAR) set(HASH 830cd94ed6518fbe4604a0f5a3322671b4674b87d25a71349c745500d38e85c0fac4f6995242fc5521eb048e3966bb5ec2a96a06b041343ed8da9bba78124f34) 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(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) elseif(VAR MATCHES "NINJA") set(PROGNAME ninja) set(SUBDIR "ninja-1.8.2") - set(PATHS ${DOWNLOADS}/tools/ninja/${SUBDIR}) + if(CMAKE_HOST_WIN32) + set(PATHS "${DOWNLOADS}/tools/ninja/${SUBDIR}") + else() + set(PATHS "${DOWNLOADS}/tools/${SUBDIR}") + 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") -- cgit v1.2.3 From 4a9feaa2403e59b3267f8bd02ef2fd687ea5661d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 30 Mar 2018 18:44:13 -0700 Subject: Allow usage of os="windows" in vcpkgTools.xml from vcpkg.exe (use-cases in powershell still need to be modified) --- toolsrc/src/vcpkg/vcpkgpaths.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index a17ffeb05..7ab4c1c98 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -44,11 +44,11 @@ namespace vcpkg static ToolData parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool) { #if defined(_WIN32) - static constexpr StringLiteral OS_STRING = ""; + static constexpr StringLiteral OS_STRING = "windows"; #elif defined(__APPLE__) - static constexpr StringLiteral OS_STRING = R"(os="osx")"; + static constexpr StringLiteral OS_STRING = "osx"; #else // assume linux - static constexpr StringLiteral OS_STRING = R"(os="linux")"; + static constexpr StringLiteral OS_STRING = "linux"; #endif static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; @@ -79,11 +79,16 @@ namespace vcpkg Strings::format(R"###(([\s\S]*?))###")}; static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###")}; - const std::regex tool_regex{ - Strings::format(R"###(([\s\S]*?))###", tool, OS_STRING)}; + std::regex tool_regex{ + Strings::format(R"###(([\s\S]*?)<\/tool>)###", tool, OS_STRING)}; std::smatch match_tool; - const bool has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); + bool has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); + if (!has_match_tool && OS_STRING == "windows") // Legacy support. Change introduced in vcpkg v0.0.107. + { + tool_regex = Strings::format(R"###(([\s\S]*?)<\/tool>)###", tool); + has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); + } Checks::check_exit(VCPKG_LINE_INFO, has_match_tool, "Could not find entry for tool [%s] in %s", -- cgit v1.2.3 From 55d79020c4a99d658e46b3a88b065712b9e828c8 Mon Sep 17 00:00:00 2001 From: pravic Date: Tue, 3 Apr 2018 02:21:40 +0300 Subject: [sciter] Update to 4.1.5.5856 (#3186) --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index e81549a8a..b2f19fdf0 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.1.4 +Version: 4.1.5 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index ca48f53c3..7aeb87eee 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,8 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION eb0d385af8f426788870cc75522379f67854799c) -set(SCITER_SHA b785f370b27f759e0bec370f413c85b21d82a7cb76b3cbaa50c885b713453a325ff7ace042e263fafec7695c50370bb589597a9877816716bae9a4b4479f54fe) +set(SCITER_REVISION 331bf886a39c1a003f61bb0c1a75037ec4c1e9e4) +set(SCITER_SHA b05b7c694fb75a3308a2684ad78587453d70d41dc0609dfec0a40b465bb8982c79867a63a898a09ed54f6fc516d0b014942824da7a642682b86710ffb23c7366) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From c4aaab17b4447597dbd72b2fc36d669c5b806a9c Mon Sep 17 00:00:00 2001 From: Koby Kahane Date: Tue, 3 Apr 2018 02:32:41 +0300 Subject: [rocksdb] Make zlib support an optional feature (#3189) * [rocksdb] Make zlib support an optional feature. * [rocksdb] Add zlib as a default feature --- ports/rocksdb/CONTROL | 8 ++++++-- ports/rocksdb/portfile.cmake | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 5e6851f83..6e3f6a4c5 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,7 +1,7 @@ Source: rocksdb -Version: 5.11.3-1 +Version: 5.11.3-3 Description: A library that provides an embeddable, persistent key-value store for fast storage -Build-Depends: zlib +Default-Features: zlib Feature: lz4 Build-Depends: lz4 @@ -10,3 +10,7 @@ Description: lz4 support in rocksdb Feature: snappy Build-Depends: snappy Description: snappy support in rocksdb + +Feature: zlib +Build-Depends: zlib +Description: zlib support in rocksdb diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 0278a3b84..169573cf3 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -42,6 +42,11 @@ if("snappy" IN_LIST FEATURES) set(WITH_SNAPPY ON) endif() +set(WITH_ZLIB OFF) +if("zlib" IN_LIST FEATURES) + set(WITH_ZLIB ON) +endif() + get_filename_component(ROCKSDB_VERSION "${SOURCE_PATH}" NAME) string(REPLACE "rocksdb-rocksdb-" "" ROCKSDB_VERSION "${ROCKSDB_VERSION}") @@ -52,7 +57,7 @@ vcpkg_configure_cmake( -DWITH_GFLAGS=0 -DWITH_SNAPPY=${WITH_SNAPPY} -DWITH_LZ4=${WITH_LZ4} - -DWITH_ZLIB=1 + -DWITH_ZLIB=${WITH_ZLIB} -DWITH_TESTS=OFF -DROCKSDB_INSTALL_ON_WINDOWS=ON -DFAIL_ON_WARNINGS=OFF -- cgit v1.2.3 From 0c792e4b394eb4a3921468c5ec03283f8084630d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 30 Mar 2018 16:38:59 -0700 Subject: [aws-sdk-cpp][discord-rpc][thrift] Upgrades --- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- ports/discord-rpc/CONTROL | 2 +- ports/discord-rpc/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index d2f5c186b..eb69e3b10 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,5 +1,5 @@ Source: aws-sdk-cpp -Version: 1.4.24 +Version: 1.4.26 Description: AWS SDK for C++ Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs # Automatically generated by generateFeatures.ps1 diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 28097ee1a..4728ab259 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.4.24 - SHA512 bda259caeeb909884128268f0dfe3ca58ce665be2a0304302f1fd09c4217cbcd34c20119009123aeb80377dfe5144b72cbd98d2acbdc9ffa729c09e380751bf2 + REF 1.4.26 + SHA512 44ba566b82e4e3b0be3250bc02693a2128986eb0f7214b7a2bb4dc716d23afe7e699de89cc4483ab176b07159cf3ecf4821b16e5033b75db39ef410165d4f08b HEAD_REF master ) diff --git a/ports/discord-rpc/CONTROL b/ports/discord-rpc/CONTROL index 609460036..2e6f44688 100644 --- a/ports/discord-rpc/CONTROL +++ b/ports/discord-rpc/CONTROL @@ -1,3 +1,3 @@ Source: discord-rpc -Version: 3.1.0 +Version: 3.2.0 Description: Rich Presence allows you to leverage the totally overhauled "Now Playing" section in a Discord user's profile to help people play your game together. diff --git a/ports/discord-rpc/portfile.cmake b/ports/discord-rpc/portfile.cmake index 72709ed7c..8e4e090b1 100644 --- a/ports/discord-rpc/portfile.cmake +++ b/ports/discord-rpc/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO discordapp/discord-rpc - REF v3.1.0 - SHA512 f467ac6428588b45a90eaec0786b7f0d799b5ee9e97528dd69cd1890fb4dd9c887807e845a0a1d75e19e6e1f6cb2d21c8a77d09e95f24d8df0aae04eae17a216 + REF v3.2.0 + SHA512 83a32db240f30f4429c145dd400eba5b9985ea779e492ffa2be2ba2664d97e4dec1f4416ad0f3e6fc908c3c9b30aebe4a8e293e0ef3c60e01fc6f16b5f9a7c16 HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 82524e78d..8707974d0 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-03-29 +Version: 2018-03-30 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 0293cca6f..574be4dab 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 930428438c0b6c8f60560cbb7dcad79042badacb - SHA512 b446126a8f697903abbdafcd8cd9a348fc97d34b2a207592cae1801e481b5159f92b7b0296a3531cd8f2a9e223e051f71ea63ce5da2dd2f67364db9bfd84dcf3 + REF 8a83b041d20671c3fae9528d5ac1f5413cad7c5a + SHA512 9f0a2fdb92e33aea960342a88134e4ce4f5f86277abb235ae13dd2f5b4e28f82e72e16d7cf18a1a13f5a9368420b01b3b51a8d3b3d3c06fade00978565b93b7d HEAD_REF master ) -- cgit v1.2.3 From adccba04db25b3e3bd44c58a9d2cbc1366e53fde Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 2 Apr 2018 17:12:12 -0700 Subject: [vcpkg.exe] Look for vcpkgTools in downloads/tools/$toolname-$toolversion (only non-windows currently) --- toolsrc/include/vcpkg/vcpkgpaths.h | 2 + toolsrc/src/vcpkg/build.cpp | 6 +++ toolsrc/src/vcpkg/vcpkgpaths.cpp | 94 ++++++++++++++++++++++++++++++++------ 3 files changed, 87 insertions(+), 15 deletions(-) diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 71f1bbba9..b3f24fb89 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -66,6 +66,7 @@ namespace vcpkg const fs::path& get_7za_exe() const; const fs::path& get_cmake_exe() const; const fs::path& get_git_exe() const; + const fs::path& get_ninja_exe() const; const fs::path& get_nuget_exe() const; const fs::path& get_ifw_installerbase_exe() const; const fs::path& get_ifw_binarycreator_exe() const; @@ -84,6 +85,7 @@ namespace vcpkg Lazy _7za_exe; Lazy cmake_exe; Lazy git_exe; + Lazy ninja_exe; Lazy nuget_exe; Lazy ifw_installerbase_exe; Lazy ifw_binarycreator_exe; diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 953e77460..ab2e46aa7 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -322,6 +322,12 @@ namespace vcpkg::Build auto& fs = paths.get_filesystem(); const Triplet& triplet = spec.triplet(); +#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_ninja_exe()); +#endif + const fs::path& cmake_exe_path = paths.get_cmake_exe(); const fs::path& git_exe_path = paths.get_git_exe(); diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 7ab4c1c98..d4bcea5af 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -18,9 +18,10 @@ namespace vcpkg struct ToolData { std::array required_version; - fs::path downloaded_exe_path; + fs::path exe_path; std::string url; fs::path downloaded_path; + fs::path tool_dir_path; }; static Optional> parse_version_string(const std::string& version_as_string) @@ -114,11 +115,20 @@ namespace vcpkg tool, required_version_as_string); +// Legacy support. Change introduced in vcpkg v0.0.107. +#if !defined(_WIN32) + const std::string tool_dir_name = Strings::format("%s-%s", tool, required_version_as_string); + const fs::path tool_dir_path = paths.downloads / "tools" / tool_dir_name; + const fs::path exe_path = tool_dir_path / exe_relative_path; +#else + const fs::path tool_dir_path; const fs::path exe_path = paths.downloads / exe_relative_path; +#endif return ToolData{*required_version.get(), exe_path, url, - paths.downloads / archive_relative_path.value_or(exe_relative_path)}; + paths.downloads / archive_relative_path.value_or(exe_relative_path), + tool_dir_path}; } static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd, @@ -177,6 +187,36 @@ namespace vcpkg return data_lines; } + static void extract_archive(const VcpkgPaths& paths, const fs::path& archive, const fs::path& to_path) + { + Files::Filesystem& fs = paths.get_filesystem(); + const fs::path to_path_partial = to_path.u8string() + ".partial"; + + std::error_code ec; + fs.remove_all(to_path_partial, ec); + fs.create_directories(to_path_partial, ec); + + const auto ext = archive.extension(); + if (ext == ".gz" && ext.extension() != ".tar") + { + const auto code = System::cmd_execute( + Strings::format(R"(cd '%s' && tar xzf '%s')", to_path_partial.u8string(), archive.u8string())); + Checks::check_exit(VCPKG_LINE_INFO, code == 0, "tar failed while extracting %s", archive.u8string()); + } + else if (ext == ".zip") + { + const auto code = System::cmd_execute( + Strings::format(R"(cd '%s' && unzip -qqo '%s')", to_path_partial.u8string(), archive.u8string())); + Checks::check_exit(VCPKG_LINE_INFO, code == 0, "unzip failed while extracting %s", archive.u8string()); + } + else + { + Checks::exit_with_message(VCPKG_LINE_INFO, "Unexpected archive extension: %s", ext.u8string()); + } + + fs.rename(to_path_partial, to_path); + } + static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) { const auto& fs = paths.get_filesystem(); @@ -200,7 +240,7 @@ namespace vcpkg Checks::check_exit(VCPKG_LINE_INFO, tool_path.size() == 1, "Expected tool path, but got %s", output); const fs::path actual_downloaded_path = Strings::trim(std::string{tool_path.at(0)}); - const fs::path& expected_downloaded_path = tool_data.downloaded_exe_path; + const fs::path& expected_downloaded_path = tool_data.exe_path; std::error_code ec; const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); Checks::check_exit(VCPKG_LINE_INFO, @@ -216,16 +256,17 @@ namespace vcpkg Strings::format(R"(curl '%s' --create-dirs --output '%s')", tool_data.url, tool_data.downloaded_path)); Checks::check_exit(VCPKG_LINE_INFO, code == 0, "curl failed while downloading %s", tool_data.url); } - auto code = System::cmd_execute( - Strings::format(R"(cd '%s' && tar xzf '%s')", paths.downloads, tool_data.downloaded_path)); - Checks::check_exit(VCPKG_LINE_INFO, code == 0, "tar failed while extracting %s", tool_data.downloaded_path); + + System::println("Extracting %s...", tool_name); + extract_archive(paths, tool_data.downloaded_path, tool_data.tool_dir_path); + System::println("Extracting %s... done.", tool_name); Checks::check_exit(VCPKG_LINE_INFO, - fs.exists(tool_data.downloaded_exe_path), + fs.exists(tool_data.exe_path), "Expected %s to exist after extracting", - tool_data.downloaded_exe_path); + tool_data.exe_path); - return tool_data.downloaded_exe_path; + return tool_data.exe_path; #endif } @@ -234,7 +275,7 @@ namespace vcpkg std::vector candidate_paths; #if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "cmake"); - candidate_paths.push_back(TOOL_DATA.downloaded_exe_path); + candidate_paths.push_back(TOOL_DATA.exe_path); #else static const ToolData TOOL_DATA = ToolData{{3, 5, 1}, ""}; #endif @@ -262,22 +303,40 @@ namespace vcpkg { #if defined(_WIN32) static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "7zip"); - if (!paths.get_filesystem().exists(TOOL_DATA.downloaded_exe_path)) + if (!paths.get_filesystem().exists(TOOL_DATA.exe_path)) { return fetch_tool(paths, "7zip", TOOL_DATA); } - return TOOL_DATA.downloaded_exe_path; + return TOOL_DATA.exe_path; #else Checks::exit_with_message(VCPKG_LINE_INFO, "Cannot download 7zip for non-Windows platforms."); #endif } + static fs::path get_ninja_path(const VcpkgPaths& paths) + { + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "ninja"); + + std::vector candidate_paths; + candidate_paths.push_back(TOOL_DATA.exe_path); + const std::vector from_path = Files::find_from_PATH("ninja"); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + + auto path = find_if_has_equal_or_greater_version(candidate_paths, "--version", TOOL_DATA.required_version); + if (const auto p = path.get()) + { + return *p; + } + + return fetch_tool(paths, "ninja", TOOL_DATA); + } + static fs::path get_nuget_path(const VcpkgPaths& paths) { static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "nuget"); std::vector candidate_paths; - candidate_paths.push_back(TOOL_DATA.downloaded_exe_path); + candidate_paths.push_back(TOOL_DATA.exe_path); const std::vector from_path = Files::find_from_PATH("nuget"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); @@ -301,7 +360,7 @@ namespace vcpkg std::vector candidate_paths; #if defined(_WIN32) - candidate_paths.push_back(TOOL_DATA.downloaded_exe_path); + candidate_paths.push_back(TOOL_DATA.exe_path); #endif const std::vector from_path = Files::find_from_PATH("git"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); @@ -328,7 +387,7 @@ namespace vcpkg static const std::string VERSION_CHECK_ARGUMENTS = "--framework-version"; std::vector candidate_paths; - candidate_paths.push_back(TOOL_DATA.downloaded_exe_path); + candidate_paths.push_back(TOOL_DATA.exe_path); // TODO: Uncomment later // const std::vector from_path = Files::find_from_PATH("installerbase"); // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); @@ -438,6 +497,11 @@ namespace vcpkg return this->git_exe.get_lazy([this]() { return get_git_path(*this); }); } + const fs::path& VcpkgPaths::get_ninja_exe() const + { + return this->ninja_exe.get_lazy([this]() { return get_ninja_path(*this); }); + } + const fs::path& VcpkgPaths::get_nuget_exe() const { return this->nuget_exe.get_lazy([this]() { return get_nuget_path(*this); }); -- cgit v1.2.3 From 892f7052f943570eb5d8da991ace01725323c695 Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Wed, 7 Mar 2018 17:57:16 +0800 Subject: [vcpkg] Add support of external downloader aria2 --- scripts/cmake/vcpkg_download_distfile.cmake | 47 +++++++++++++++++++++----- scripts/cmake/vcpkg_find_acquire_program.cmake | 8 +++++ toolsrc/include/vcpkg/build.h | 8 +++++ toolsrc/src/vcpkg/build.cpp | 19 +++++++++-- toolsrc/src/vcpkg/install.cpp | 12 +++++-- 5 files changed, 81 insertions(+), 13 deletions(-) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 4b111f3f0..fc6199146 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -103,19 +103,48 @@ function(vcpkg_download_distfile VAR) endif() # Tries to download the file. - foreach(url IN LISTS vcpkg_download_distfile_URLS) - message(STATUS "Downloading ${url}...") - file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status) - list(GET download_status 0 status_code) - if (NOT "${status_code}" STREQUAL "0") - message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") + list(GET vcpkg_download_distfile_URLS 0 SAMPLE_URL) + if(${_VCPKG_DOWNLOAD_TOOL} MATCHES "ARIA2" AND NOT ${SAMPLE_URL} MATCHES "aria2") + vcpkg_find_acquire_program("ARIA2") + message(STATUS "Downloading ${vcpkg_download_distfile_FILENAME}...") + execute_process( + COMMAND ${ARIA2} ${vcpkg_download_distfile_URLS} + -o temp/${vcpkg_download_distfile_FILENAME} + -l download-${vcpkg_download_distfile_FILENAME}-detailed.log + OUTPUT_FILE download-${vcpkg_download_distfile_FILENAME}-out.log + ERROR_FILE download-${vcpkg_download_distfile_FILENAME}-err.log + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${DOWNLOADS} + ) + if (NOT "${error_code}" STREQUAL "0") + message(STATUS + "Downloading ${vcpkg_download_distfile_FILENAME}... Failed.\n" + " Exit Code: ${error_code}\n" + " See logs for more information:\n" + " ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-out.log\n" + " ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-err.log\n" + " ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-detailed.log\n" + ) set(download_success 0) else() - message(STATUS "Downloading ${url}... OK") + message(STATUS "Downloading ${vcpkg_download_distfile_FILENAME}... OK") set(download_success 1) - break() endif() - endforeach(url) + else() + foreach(url IN LISTS vcpkg_download_distfile_URLS) + message(STATUS "Downloading ${url}...") + file(DOWNLOAD ${url} "${download_file_path_part}" STATUS download_status) + list(GET download_status 0 status_code) + if (NOT "${status_code}" STREQUAL "0") + message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") + set(download_success 0) + else() + message(STATUS "Downloading ${url}... OK") + set(download_success 1) + break() + endif() + endforeach(url) + endif() if (NOT download_success) message(FATAL_ERROR diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 0352b1890..ef0e1584f 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -25,6 +25,7 @@ ## - NASM ## - NINJA ## - YASM +## - ARIA2 (Downloader) ## ## Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md). ## @@ -178,6 +179,13 @@ function(vcpkg_find_acquire_program VAR) set(URL "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.14.windows.bin.zip") set(ARCHIVE "doxygen-1.8.14.windows.bin.zip") set(HASH d0d706501e7112045b1f401f22d12a2c8d9b7728edee9ad1975a17dff914c16494ae48a70beab6f6304643779935843f268c7afed3b9da7d403b5cb11cac0c50) + # 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) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 1c22d39d8..a86245ccf 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -57,12 +57,20 @@ namespace vcpkg::Build RELEASE, }; + enum class DownloadTool + { + BUILT_IN, + ARIA2, + }; + const std::string& to_string(DownloadTool tool); + struct BuildPackageOptions { UseHeadVersion use_head_version; AllowDownloads allow_downloads; CleanBuildtrees clean_buildtrees; CleanPackages clean_packages; + DownloadTool download_tool; }; enum class BuildResult diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index ab2e46aa7..79a55bd36 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -165,6 +165,19 @@ namespace vcpkg::Build } } + static const std::string NAME_BUILD_IN_DOWNLOAD = "BUILT_IN"; + static const std::string NAME_ARIA2_DOWNLOAD = "ARIA2"; + + const std::string& to_string(DownloadTool tool) + { + switch (tool) + { + case DownloadTool::BUILT_IN: return NAME_BUILD_IN_DOWNLOAD; + case DownloadTool::ARIA2: return NAME_ARIA2_DOWNLOAD; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + } + Optional to_linkage_type(const std::string& str) { if (str == "dynamic") return LinkageType::DYNAMIC; @@ -348,8 +361,10 @@ namespace vcpkg::Build {"TARGET_TRIPLET", spec.triplet().canonical_name()}, {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, {"VCPKG_USE_HEAD_VERSION", - Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, - {"_VCPKG_NO_DOWNLOADS", !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, + Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, + {"_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)}, {"GIT", git_exe_path}, {"FEATURES", Strings::join(";", config.feature_list)}, {"ALL_FEATURES", all_features}, diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 1fbf6d97e..b998d19ab 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -412,13 +412,15 @@ namespace vcpkg::Install static constexpr StringLiteral OPTION_RECURSE = "--recurse"; static constexpr StringLiteral OPTION_KEEP_GOING = "--keep-going"; static constexpr StringLiteral OPTION_XUNIT = "--x-xunit"; + static constexpr StringLiteral OPTION_USE_ARIA2 = "--use-aria2"; - static constexpr std::array INSTALL_SWITCHES = {{ + static constexpr std::array INSTALL_SWITCHES = {{ {OPTION_DRY_RUN, "Do not actually build or install"}, {OPTION_USE_HEAD_VERSION, "Install the libraries on the command line using the latest upstream sources"}, {OPTION_NO_DOWNLOADS, "Do not download new sources"}, {OPTION_RECURSE, "Allow removal of packages as part of installation"}, {OPTION_KEEP_GOING, "Continue installing packages on failure"}, + {OPTION_USE_ARIA2, "Use aria2 to perform download tasks"}, }}; static constexpr std::array INSTALL_SETTINGS = {{ {OPTION_XUNIT, "File to output results in XUnit format (Internal use)"}, @@ -547,16 +549,22 @@ namespace vcpkg::Install const bool use_head_version = Util::Sets::contains(options.switches, (OPTION_USE_HEAD_VERSION)); const bool no_downloads = Util::Sets::contains(options.switches, (OPTION_NO_DOWNLOADS)); const bool is_recursive = Util::Sets::contains(options.switches, (OPTION_RECURSE)); + const bool use_aria2 = Util::Sets::contains(options.switches, (OPTION_USE_ARIA2)); const KeepGoing keep_going = to_keep_going(Util::Sets::contains(options.switches, OPTION_KEEP_GOING)); // create the plan StatusParagraphs status_db = database_load_check(paths); + Build::DownloadTool download_tool = Build::DownloadTool::BUILT_IN; + if (use_aria2) + download_tool = Build::DownloadTool::ARIA2; + const Build::BuildPackageOptions install_plan_options = { Util::Enum::to_enum(use_head_version), Util::Enum::to_enum(!no_downloads), Build::CleanBuildtrees::NO, - Build::CleanPackages::NO}; + Build::CleanPackages::NO, + download_tool}; auto all_ports = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); std::unordered_map scf_map; -- cgit v1.2.3 From 875410599151252b475234c162c3a9babb8be73f Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Thu, 15 Mar 2018 13:17:54 +0800 Subject: [vcpkg] Remove log files when downloading succeeds. --- scripts/cmake/vcpkg_download_distfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index fc6199146..9fc0a0c9a 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -128,6 +128,11 @@ function(vcpkg_download_distfile VAR) set(download_success 0) else() message(STATUS "Downloading ${vcpkg_download_distfile_FILENAME}... OK") + file(REMOVE + ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-out.log + ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-err.log + ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-detailed.log + ) set(download_success 1) endif() else() -- cgit v1.2.3 From 7849f5da1e72977745f9fd69365f70df98eb028e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 2 Apr 2018 18:37:16 -0700 Subject: [aria2] Use --x-use-aria2 instead of --use-aria2 for now --- toolsrc/src/vcpkg/install.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index b998d19ab..fc336d6c7 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -412,7 +412,7 @@ namespace vcpkg::Install static constexpr StringLiteral OPTION_RECURSE = "--recurse"; static constexpr StringLiteral OPTION_KEEP_GOING = "--keep-going"; static constexpr StringLiteral OPTION_XUNIT = "--x-xunit"; - static constexpr StringLiteral OPTION_USE_ARIA2 = "--use-aria2"; + static constexpr StringLiteral OPTION_USE_ARIA2 = "--x-use-aria2"; static constexpr std::array INSTALL_SWITCHES = {{ {OPTION_DRY_RUN, "Do not actually build or install"}, @@ -556,8 +556,7 @@ namespace vcpkg::Install StatusParagraphs status_db = database_load_check(paths); Build::DownloadTool download_tool = Build::DownloadTool::BUILT_IN; - if (use_aria2) - download_tool = Build::DownloadTool::ARIA2; + if (use_aria2) download_tool = Build::DownloadTool::ARIA2; const Build::BuildPackageOptions install_plan_options = { Util::Enum::to_enum(use_head_version), -- cgit v1.2.3 From 5715b6023b98028d505aee99946864f1b4ddc417 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Tue, 3 Apr 2018 05:32:08 +0300 Subject: [theia] Fix build (#3141) --- ports/theia/CONTROL | 8 +- ports/theia/fix-oiio.patch | 391 +++++++++++++++++++++++++++++++++++++++++++++ ports/theia/portfile.cmake | 1 + 3 files changed, 396 insertions(+), 4 deletions(-) create mode 100644 ports/theia/fix-oiio.patch diff --git a/ports/theia/CONTROL b/ports/theia/CONTROL index 56e2181a3..06dcc80c8 100644 --- a/ports/theia/CONTROL +++ b/ports/theia/CONTROL @@ -1,4 +1,4 @@ -Source: theia -Version: 0.7-d15154a-1 -Build-Depends: flann, cereal, ceres, openimageio, glew, freeglut -Description: An open source library for multiview geometry and structure from motion +Source: theia +Version: 0.7-d15154a-2 +Build-Depends: flann, cereal, ceres[suitesparse], openimageio, glew, freeglut +Description: An open source library for multiview geometry and structure from motion diff --git a/ports/theia/fix-oiio.patch b/ports/theia/fix-oiio.patch new file mode 100644 index 000000000..7cba45db7 --- /dev/null +++ b/ports/theia/fix-oiio.patch @@ -0,0 +1,391 @@ +diff --git a/src/theia/image/image.cc b/src/theia/image/image.cc +index df6aba4..5e2b8dc 100644 +--- a/src/theia/image/image.cc ++++ b/src/theia/image/image.cc +@@ -60,18 +60,18 @@ FloatImage::FloatImage(const FloatImage& image_to_copy) { + } + + FloatImage::FloatImage(const int width, const int height, const int channels) { +- OpenImageIO::ImageSpec image_spec(width, height, channels, +- OpenImageIO::TypeDesc::FLOAT); ++ OIIO_NAMESPACE::ImageSpec image_spec(width, height, channels, ++ OIIO_NAMESPACE::TypeDesc::FLOAT); + image_.reset(image_spec); + } + + FloatImage::FloatImage(const int width, const int height, const int channels, + float* buffer) +- : image_(OpenImageIO::ImageSpec(width, height, channels, +- OpenImageIO::TypeDesc::FLOAT), ++ : image_(OIIO_NAMESPACE::ImageSpec(width, height, channels, ++ OIIO_NAMESPACE::TypeDesc::FLOAT), + reinterpret_cast(buffer)) {} + +-FloatImage::FloatImage(const OpenImageIO::ImageBuf& image) { ++FloatImage::FloatImage(const OIIO_NAMESPACE::ImageBuf& image) { + image_.copy(image); + } + +@@ -80,11 +80,11 @@ FloatImage& FloatImage::operator=(const FloatImage& image2) { + return *this; + } + +-OpenImageIO::ImageBuf& FloatImage::GetOpenImageIOImageBuf() { ++OIIO_NAMESPACE::ImageBuf& FloatImage::GetOpenImageIOImageBuf() { + return image_; + } + +-const OpenImageIO::ImageBuf& FloatImage::GetOpenImageIOImageBuf() const { ++const OIIO_NAMESPACE::ImageBuf& FloatImage::GetOpenImageIOImageBuf() const { + return image_; + } + +@@ -110,7 +110,7 @@ void FloatImage::SetXY(const int x, + DCHECK_LT(c, Channels()); + + // Set the ROI to be the precise pixel location in the correct channel. +- OpenImageIO::ImageBuf::Iterator it(image_, x, y, 0); ++ OIIO_NAMESPACE::ImageBuf::Iterator it(image_, x, y, 0); + it[c] = value; + } + +@@ -195,9 +195,9 @@ void FloatImage::ConvertToGrayscaleImage() { + // Compute luminance via a weighted sum of R,G,B (assuming Rec709 primaries + // and a linear scale) + const float luma_weights[3] = {.2126, .7152, .0722}; +- OpenImageIO::ImageBuf source = image_; ++ OIIO_NAMESPACE::ImageBuf source = image_; + image_.clear(); +- OpenImageIO::ImageBufAlgo::channel_sum(image_, source, luma_weights); ++ OIIO_NAMESPACE::ImageBufAlgo::channel_sum(image_, source, luma_weights); + } + + void FloatImage::ConvertToRGBImage() { +@@ -207,13 +207,13 @@ void FloatImage::ConvertToRGBImage() { + } + + // Copy the single grayscale channel into r, g, and b. +- const OpenImageIO::ImageBuf source(image_); +- OpenImageIO::ImageSpec image_spec(Width(), Height(), 3, +- OpenImageIO::TypeDesc::FLOAT); ++ const OIIO_NAMESPACE::ImageBuf source(image_); ++ OIIO_NAMESPACE::ImageSpec image_spec(Width(), Height(), 3, ++ OIIO_NAMESPACE::TypeDesc::FLOAT); + image_.reset(image_spec); +- OpenImageIO::ImageBufAlgo::paste(image_, 0, 0, 0, 0, source); +- OpenImageIO::ImageBufAlgo::paste(image_, 0, 0, 0, 1, source); +- OpenImageIO::ImageBufAlgo::paste(image_, 0, 0, 0, 2, source); ++ OIIO_NAMESPACE::ImageBufAlgo::paste(image_, 0, 0, 0, 0, source); ++ OIIO_NAMESPACE::ImageBufAlgo::paste(image_, 0, 0, 0, 1, source); ++ OIIO_NAMESPACE::ImageBufAlgo::paste(image_, 0, 0, 0, 2, source); + } + + FloatImage FloatImage::AsGrayscaleImage() const { +@@ -238,12 +238,12 @@ FloatImage FloatImage::AsRGBImage() const { + } + + void FloatImage::ScalePixels(float scale) { +- OpenImageIO::ImageBufAlgo::mul(image_, image_, scale); ++ OIIO_NAMESPACE::ImageBufAlgo::mul(image_, image_, scale); + } + + void FloatImage::Read(const std::string& filename) { + image_.reset(filename); +- image_.read(0, 0, true, OpenImageIO::TypeDesc::FLOAT); ++ image_.read(0, 0, true, OIIO_NAMESPACE::TypeDesc::FLOAT); + } + + void FloatImage::Write(const std::string& filename) const { +@@ -259,19 +259,19 @@ const float* FloatImage::Data() const { + + FloatImage FloatImage::ComputeGradientX() const { + float sobel_filter_x[9] = {-.125, 0, .125, -.25, 0, .25, -.125, 0, .125}; +- OpenImageIO::ImageSpec spec(3, 3, 1, OpenImageIO::TypeDesc::FLOAT); +- OpenImageIO::ImageBuf kernel_x(spec, sobel_filter_x); +- OpenImageIO::ImageBuf gradient_x; +- OpenImageIO::ImageBufAlgo::convolve(gradient_x, image_, kernel_x, false); ++ OIIO_NAMESPACE::ImageSpec spec(3, 3, 1, OIIO_NAMESPACE::TypeDesc::FLOAT); ++ OIIO_NAMESPACE::ImageBuf kernel_x(spec, sobel_filter_x); ++ OIIO_NAMESPACE::ImageBuf gradient_x; ++ OIIO_NAMESPACE::ImageBufAlgo::convolve(gradient_x, image_, kernel_x, false); + return FloatImage(gradient_x); + } + + FloatImage FloatImage::ComputeGradientY() const { + float sobel_filter_y[9] = {-.125, -.25, -.125, 0, 0, 0, .125, .25, .125}; +- OpenImageIO::ImageSpec spec(3, 3, 1, OpenImageIO::TypeDesc::FLOAT); +- OpenImageIO::ImageBuf kernel_y(spec, sobel_filter_y); +- OpenImageIO::ImageBuf gradient_y; +- OpenImageIO::ImageBufAlgo::convolve(gradient_y, image_, kernel_y, false); ++ OIIO_NAMESPACE::ImageSpec spec(3, 3, 1, OIIO_NAMESPACE::TypeDesc::FLOAT); ++ OIIO_NAMESPACE::ImageBuf kernel_y(spec, sobel_filter_y); ++ OIIO_NAMESPACE::ImageBuf gradient_y; ++ OIIO_NAMESPACE::ImageBufAlgo::convolve(gradient_y, image_, kernel_y, false); + return FloatImage(gradient_y); + } + +@@ -280,28 +280,28 @@ FloatImage FloatImage::ComputeGradient() const { + float sobel_filter_x[9] = {-.125, 0, .125, -.25, 0, .25, -.125, 0, .125}; + float sobel_filter_y[9] = {-.125, -.25, -.125, 0, 0, 0, .125, .25, .125}; + +- OpenImageIO::ImageSpec spec(3, 3, 1, OpenImageIO::TypeDesc::FLOAT); +- OpenImageIO::ImageBuf kernel_x(spec, sobel_filter_x); +- OpenImageIO::ImageBuf kernel_y(spec, sobel_filter_y); ++ OIIO_NAMESPACE::ImageSpec spec(3, 3, 1, OIIO_NAMESPACE::TypeDesc::FLOAT); ++ OIIO_NAMESPACE::ImageBuf kernel_x(spec, sobel_filter_x); ++ OIIO_NAMESPACE::ImageBuf kernel_y(spec, sobel_filter_y); + +- OpenImageIO::ImageBuf gradient, gradient_x, gradient_y; +- OpenImageIO::ImageBufAlgo::convolve(gradient_x, image_, kernel_x, false); +- OpenImageIO::ImageBufAlgo::abs(gradient_x, gradient_x); +- OpenImageIO::ImageBufAlgo::convolve(gradient_y, image_, kernel_y, false); +- OpenImageIO::ImageBufAlgo::abs(gradient_y, gradient_y); +- OpenImageIO::ImageBufAlgo::add(gradient, gradient_x, gradient_y); ++ OIIO_NAMESPACE::ImageBuf gradient, gradient_x, gradient_y; ++ OIIO_NAMESPACE::ImageBufAlgo::convolve(gradient_x, image_, kernel_x, false); ++ OIIO_NAMESPACE::ImageBufAlgo::abs(gradient_x, gradient_x); ++ OIIO_NAMESPACE::ImageBufAlgo::convolve(gradient_y, image_, kernel_y, false); ++ OIIO_NAMESPACE::ImageBufAlgo::abs(gradient_y, gradient_y); ++ OIIO_NAMESPACE::ImageBufAlgo::add(gradient, gradient_x, gradient_y); + + return FloatImage(gradient); + } + + void FloatImage::ApproximateGaussianBlur(const double sigma) { +- OpenImageIO::ImageBuf kernel; +- OpenImageIO::ImageBufAlgo::make_kernel(kernel, "gaussian", 5.0f, 5.0f); +- OpenImageIO::ImageBufAlgo::convolve(image_, image_, kernel); ++ OIIO_NAMESPACE::ImageBuf kernel; ++ OIIO_NAMESPACE::ImageBufAlgo::make_kernel(kernel, "gaussian", 5.0f, 5.0f); ++ OIIO_NAMESPACE::ImageBufAlgo::convolve(image_, image_, kernel); + } + + void FloatImage::MedianFilter(const int patch_width) { +- CHECK(OpenImageIO::ImageBufAlgo::median_filter(image_, image_, patch_width)); ++ CHECK(OIIO_NAMESPACE::ImageBufAlgo::median_filter(image_, image_, patch_width)); + } + + void FloatImage::Integrate(FloatImage* integral) const { +@@ -327,14 +327,14 @@ void FloatImage::Resize(int new_width, int new_height) { + // If the image has not been initialized then initialize it with the image + // spec. Otherwise resize the image and interpolate pixels accordingly. + if (!image_.initialized()) { +- OpenImageIO::ImageSpec image_spec(new_width, new_height, Channels(), +- OpenImageIO::TypeDesc::FLOAT); ++ OIIO_NAMESPACE::ImageSpec image_spec(new_width, new_height, Channels(), ++ OIIO_NAMESPACE::TypeDesc::FLOAT); + image_.reset(image_spec); + } else { +- OpenImageIO::ROI roi(0, new_width, 0, new_height, 0, 1, 0, Channels()); +- OpenImageIO::ImageBuf dst; +- CHECK(OpenImageIO::ImageBufAlgo::resize(dst, image_, nullptr, roi)) +- << OpenImageIO::geterror(); ++ OIIO_NAMESPACE::ROI roi(0, new_width, 0, new_height, 0, 1, 0, Channels()); ++ OIIO_NAMESPACE::ImageBuf dst; ++ CHECK(OIIO_NAMESPACE::ImageBufAlgo::resize(dst, image_, nullptr, roi)) ++ << OIIO_NAMESPACE::geterror(); + image_.copy(dst); + } + } +diff --git a/src/theia/image/image.h b/src/theia/image/image.h +index e4f22cc..29122d2 100644 +--- a/src/theia/image/image.h ++++ b/src/theia/image/image.h +@@ -64,7 +64,7 @@ class FloatImage { + + // Copy function. This is a deep copy of the image. + FloatImage(const FloatImage& image_to_copy); +- explicit FloatImage(const OpenImageIO::ImageBuf& image); ++ explicit FloatImage(const OIIO_NAMESPACE::ImageBuf& image); + FloatImage& operator=(const FloatImage& image2); + ~FloatImage() {} + +@@ -74,8 +74,8 @@ class FloatImage { + // wrapper for all algorithms. Getting a reference to the ImageBuf provides + // efficient access to the image data so that the image processing algorithms + // or other manipulations may be executed on the pixels. +- OpenImageIO::ImageBuf& GetOpenImageIOImageBuf(); +- const OpenImageIO::ImageBuf& GetOpenImageIOImageBuf() const; ++ OIIO_NAMESPACE::ImageBuf& GetOpenImageIOImageBuf(); ++ const OIIO_NAMESPACE::ImageBuf& GetOpenImageIOImageBuf() const; + + // Image information + int Rows() const; +@@ -171,7 +171,7 @@ class FloatImage { + void Resize(double scale); + + protected: +- OpenImageIO::ImageBuf image_; ++ OIIO_NAMESPACE::ImageBuf image_; + }; + } // namespace theia + +diff --git a/src/theia/image/image_test.cc b/src/theia/image/image_test.cc +index 894dc30..340488d 100644 +--- a/src/theia/image/image_test.cc ++++ b/src/theia/image/image_test.cc +@@ -53,11 +53,11 @@ RandomNumberGenerator rng(51); + std::string img_filename = THEIA_DATA_DIR + std::string("/") + FLAGS_test_img; + + #define ASSERT_IMG_EQ(oiio_img, theia_img, rows, cols) \ +- oiio_img.read(0, 0, true, OpenImageIO::TypeDesc::FLOAT); \ ++ oiio_img.read(0, 0, true, OIIO_NAMESPACE::TypeDesc::FLOAT); \ + ASSERT_EQ(oiio_img.oriented_width(), theia_img.Cols()); \ + ASSERT_EQ(oiio_img.oriented_height(), theia_img.Rows()); \ + ASSERT_EQ(oiio_img.nchannels(), theia_img.Channels()); \ +- OpenImageIO::ImageBuf::ConstIterator it(oiio_img); \ ++ OIIO_NAMESPACE::ImageBuf::ConstIterator it(oiio_img); \ + for (; !it.done(); ++it) { \ + for (int c = 0; c < oiio_img.nchannels(); c++) { \ + ASSERT_EQ(it[c], theia_img.GetXY(it.x(), it.y(), c)); \ +@@ -89,7 +89,7 @@ float Interpolate(const FloatImage& image, + + // Test that inputting the old fashioned way is the same as through our class. + TEST(Image, RGBInput) { +- OpenImageIO::ImageBuf oiio_img(img_filename.c_str()); ++ OIIO_NAMESPACE::ImageBuf oiio_img(img_filename.c_str()); + oiio_img.read(); + FloatImage theia_img(img_filename); + +@@ -102,7 +102,7 @@ TEST(Image, RGBInput) { + + // Test that width and height methods work. + TEST(Image, RGBColsRows) { +- OpenImageIO::ImageBuf oiio_img(img_filename.c_str()); ++ OIIO_NAMESPACE::ImageBuf oiio_img(img_filename.c_str()); + FloatImage theia_img(img_filename); + + int true_height = oiio_img.oriented_height(); +@@ -114,10 +114,10 @@ TEST(Image, RGBColsRows) { + + // Test that inputting the old fashioned way is the same as through our class. + TEST(Image, ConvertToGrayscaleImage) { +- OpenImageIO::ImageBuf oiio_img(img_filename.c_str()); +- OpenImageIO::ImageBuf gray_img; ++ OIIO_NAMESPACE::ImageBuf oiio_img(img_filename.c_str()); ++ OIIO_NAMESPACE::ImageBuf gray_img; + const float luma_weights[3] = {.2126, .7152, .0722}; +- OpenImageIO::ImageBufAlgo::channel_sum(gray_img, oiio_img, luma_weights); ++ OIIO_NAMESPACE::ImageBufAlgo::channel_sum(gray_img, oiio_img, luma_weights); + + FloatImage theia_img(img_filename); + theia_img.ConvertToGrayscaleImage(); +@@ -131,10 +131,10 @@ TEST(Image, ConvertToGrayscaleImage) { + } + + TEST(Image, ConvertToRGBImage) { +- OpenImageIO::ImageBuf oiio_img(img_filename.c_str()); +- OpenImageIO::ImageBuf gray_img; ++ OIIO_NAMESPACE::ImageBuf oiio_img(img_filename.c_str()); ++ OIIO_NAMESPACE::ImageBuf gray_img; + const float luma_weights[3] = {.2126, .7152, .0722}; +- OpenImageIO::ImageBufAlgo::channel_sum(gray_img, oiio_img, luma_weights); ++ OIIO_NAMESPACE::ImageBufAlgo::channel_sum(gray_img, oiio_img, luma_weights); + + // This should result in an image with the grayscale image copied in each + // channel. +@@ -148,7 +148,7 @@ TEST(Image, ConvertToRGBImage) { + + // Check that all channels have equal value and that the value is equal to the + // grayscale image. +- for (OpenImageIO::ImageBuf::ConstIterator it(gray_img); ++ for (OIIO_NAMESPACE::ImageBuf::ConstIterator it(gray_img); + !it.done(); + ++it) { + ASSERT_EQ(it[0], rgb_img.GetXY(it.x(), it.y(), 0)); +diff --git a/src/theia/sfm/exif_reader.cc b/src/theia/sfm/exif_reader.cc +index 48c049a..fea884d 100644 +--- a/src/theia/sfm/exif_reader.cc ++++ b/src/theia/sfm/exif_reader.cc +@@ -127,8 +127,8 @@ bool ExifReader::ExtractEXIFMetadata( + CameraIntrinsicsPrior* camera_intrinsics_prior) const { + CHECK_NOTNULL(camera_intrinsics_prior); + +- OpenImageIO::ImageBuf image(image_file); +- OpenImageIO::ImageSpec image_spec = image.spec(); ++ OIIO_NAMESPACE::ImageBuf image(image_file); ++ OIIO_NAMESPACE::ImageSpec image_spec = image.spec(); + + // Set the image dimensions. + camera_intrinsics_prior->image_width = image_spec.width; +@@ -154,7 +154,7 @@ bool ExifReader::ExtractEXIFMetadata( + camera_intrinsics_prior->focal_length.is_set = true; + + // Set GPS latitude. +- const OpenImageIO::ImageIOParameter* latitude = ++ const OIIO_NAMESPACE::ImageIOParameter* latitude = + image_spec.find_attribute("GPS:Latitude"); + if (latitude != nullptr) { + camera_intrinsics_prior->latitude.is_set = true; +@@ -173,7 +173,7 @@ bool ExifReader::ExtractEXIFMetadata( + } + + // Set GPS longitude. +- const OpenImageIO::ImageIOParameter* longitude = ++ const OIIO_NAMESPACE::ImageIOParameter* longitude = + image_spec.find_attribute("GPS:Longitude"); + if (longitude != nullptr) { + camera_intrinsics_prior->longitude.is_set = true; +@@ -193,7 +193,7 @@ bool ExifReader::ExtractEXIFMetadata( + + + // Set GSP altitude. +- const OpenImageIO::ImageIOParameter* altitude = ++ const OIIO_NAMESPACE::ImageIOParameter* altitude = + image_spec.find_attribute("GPS:Altitude"); + if (altitude != nullptr) { + camera_intrinsics_prior->altitude.is_set = true; +@@ -205,7 +205,7 @@ bool ExifReader::ExtractEXIFMetadata( + } + + bool ExifReader::SetFocalLengthFromExif( +- const OpenImageIO::ImageSpec& image_spec, ++ const OIIO_NAMESPACE::ImageSpec& image_spec, + CameraIntrinsicsPrior* camera_intrinsics_prior) const { + static const float kMinFocalLength = 1e-2; + +@@ -268,7 +268,7 @@ bool ExifReader::SetFocalLengthFromExif( + } + + bool ExifReader::SetFocalLengthFromSensorDatabase( +- const OpenImageIO::ImageSpec& image_spec, ++ const OIIO_NAMESPACE::ImageSpec& image_spec, + CameraIntrinsicsPrior* camera_intrinsics_prior) const { + const int max_image_dimension = std::max(image_spec.width, image_spec.height); + const float exif_focal_length = +diff --git a/src/theia/sfm/exif_reader.h b/src/theia/sfm/exif_reader.h +index 3049cf4..d9d3108 100644 +--- a/src/theia/sfm/exif_reader.h ++++ b/src/theia/sfm/exif_reader.h +@@ -74,13 +74,13 @@ class ExifReader { + // Sets the focal length from the focal plane resolution. Returns true if a + // valid focal length is found and false otherwise. + bool SetFocalLengthFromExif( +- const OpenImageIO::ImageSpec& image_spec, ++ const OIIO_NAMESPACE::ImageSpec& image_spec, + CameraIntrinsicsPrior* camera_intrinsics_prior) const; + + // Sets the focal length from a look up in the sensor width database. Returns + // true if a valid focal length is found and false otherwise. + bool SetFocalLengthFromSensorDatabase( +- const OpenImageIO::ImageSpec& image_spec, ++ const OIIO_NAMESPACE::ImageSpec& image_spec, + CameraIntrinsicsPrior* camera_intrinsics_prior) const; + + std::unordered_map sensor_width_database_; +diff --git a/src/theia/sfm/undistort_image.cc b/src/theia/sfm/undistort_image.cc +index 95a061d..ae0690e 100644 +--- a/src/theia/sfm/undistort_image.cc ++++ b/src/theia/sfm/undistort_image.cc +@@ -160,9 +160,9 @@ void RemoveImageLensDistortion(const Camera& distorted_camera, + // For each pixel in the undistorted image, find the coordinate in the + // distorted image and set the pixel color accordingly. + const int num_channels = distorted_image.Channels(); +- OpenImageIO::ImageBuf& undistorted_img = ++ OIIO_NAMESPACE::ImageBuf& undistorted_img = + undistorted_image->GetOpenImageIOImageBuf(); +- OpenImageIO::ImageBuf::Iterator undistorted_it(undistorted_img); ++ OIIO_NAMESPACE::ImageBuf::Iterator undistorted_it(undistorted_img); + for (; !undistorted_it.done(); ++undistorted_it) { + Eigen::Vector2d image_point(undistorted_it.x() + 0.5, + undistorted_it.y() + 0.5); diff --git a/ports/theia/portfile.cmake b/ports/theia/portfile.cmake index 8ac920d57..d2e4c6699 100644 --- a/ports/theia/portfile.cmake +++ b/ports/theia/portfile.cmake @@ -20,6 +20,7 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/fix-vlfeat-static.patch ${CMAKE_CURRENT_LIST_DIR}/fix-glog-error.patch ${CMAKE_CURRENT_LIST_DIR}/fix-find-suitesparse.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-oiio.patch ) vcpkg_configure_cmake( -- cgit v1.2.3 From a143d1a7fc817ba877b90e8fb0c0865325997885 Mon Sep 17 00:00:00 2001 From: Koby Kahane Date: Tue, 3 Apr 2018 05:34:51 +0300 Subject: [gtest] Fix missing debug information (#3148) * [gtest] Fix missing debug information Patch a CMake file in gtest not to override the /Z7 compiler option that embeds debug info in the .lib with /Zi that places it in a .pdb. This fixes linker warning LNK4099 when linking with gmock.lib. * [gtest] Bump version to include Zi change --- ports/gtest/0002-Fix-z7-override.patch | 13 +++++++++++++ ports/gtest/CONTROL | 2 +- ports/gtest/portfile.cmake | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ports/gtest/0002-Fix-z7-override.patch diff --git a/ports/gtest/0002-Fix-z7-override.patch b/ports/gtest/0002-Fix-z7-override.patch new file mode 100644 index 000000000..c8de56d09 --- /dev/null +++ b/ports/gtest/0002-Fix-z7-override.patch @@ -0,0 +1,13 @@ +diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake +index 777b91e..75a13c9 100644 +--- a/googletest/cmake/internal_utils.cmake ++++ b/googletest/cmake/internal_utils.cmake +@@ -55,7 +55,7 @@ macro(config_compiler_and_linker) + if (MSVC) + # Newlines inside flags variables break CMake's NMake generator. + # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds. +- set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J -Zi") ++ set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J") + if (MSVC_VERSION LESS 1400) # 1400 is Visual Studio 2005 + # Suppress spurious warnings MSVC 7.1 sometimes issues. + # Forcing value to bool. diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index e76e815c4..2fa32ae3c 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,3 +1,3 @@ Source: gtest -Version: 1.8.0-7 +Version: 1.8.0-8 Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index b5f3e58c8..72fe5813e 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -15,6 +15,7 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch + ${CMAKE_CURRENT_LIST_DIR}/0002-Fix-z7-override.patch ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" GTEST_FORCE_SHARED_CRT) -- cgit v1.2.3 From 79a77a0bb761168b24ad3d1e897200f443b6287b Mon Sep 17 00:00:00 2001 From: Carlos O'Ryan Date: Mon, 2 Apr 2018 23:29:14 -0400 Subject: Add google-cloud-cpp package (#3099) * Initial port for google-cloud-cpp * Use pre-release tag instead of commit sha1. * Fix version. * [google-cloud-cpp] Portfile improvements * [google-cloud-cpp] Update to 0.1.0 --- ports/google-cloud-cpp/CONTROL | 4 ++++ ports/google-cloud-cpp/portfile.cmake | 44 +++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 ports/google-cloud-cpp/CONTROL create mode 100644 ports/google-cloud-cpp/portfile.cmake diff --git a/ports/google-cloud-cpp/CONTROL b/ports/google-cloud-cpp/CONTROL new file mode 100644 index 000000000..e44b2e5e6 --- /dev/null +++ b/ports/google-cloud-cpp/CONTROL @@ -0,0 +1,4 @@ +Source: google-cloud-cpp +Version: 0.1.0 +Build-Depends: grpc, gtest +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 new file mode 100644 index 000000000..701d94ae5 --- /dev/null +++ b/ports/google-cloud-cpp/portfile.cmake @@ -0,0 +1,44 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GoogleCloudPlatform/google-cloud-cpp + REF v0.1.0 + SHA512 3947cc24ca1ed97309f055f17945afe2d6b22ae8f54f86d3395f8c491b7409d4b7bb12206889d04d07f51236e9fd5afd65b904c8c80521a3313588d8069545c2 + HEAD_REF master +) + +set(GOOGLEAPIS_VERSION 92f10d7033c6fa36e1a5a369ab5aa8bafd564009) +vcpkg_download_distfile(GOOGLEAPIS + URLS "https://github.com/google/googleapis/archive/92f10d7033c6fa36e1a5a369ab5aa8bafd564009.zip" + FILENAME "googleapis-${GOOGLEAPIS_VERSION}.zip" + SHA512 4280ece965a231f6a0bb3ea38a961d15babd9eac517f9b0d57e12f186481bbab6a27e4f0ee03ba3c587c9aa93d3c2e6c95f67f50365c65bb10594f0229279287 +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/third_party) +vcpkg_extract_source_archive(${GOOGLEAPIS} ${SOURCE_PATH}/third_party) +file(RENAME ${SOURCE_PATH}/third_party/googleapis-${GOOGLEAPIS_VERSION} ${SOURCE_PATH}/third_party/googleapis) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGOOGLE_CLOUD_CPP_GRPC_PROVIDER=vcpkg + -DGOOGLE_CLOUD_CPP_GMOCK_PROVIDER=vcpkg +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bigtable/client/testing) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake TARGET_PATH share/bigtable_client) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/google-cloud-cpp RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From 182450ab6434cd2b790780e45f6a6cd060874761 Mon Sep 17 00:00:00 2001 From: pravic Date: Tue, 3 Apr 2018 15:38:05 +0300 Subject: [sqlite3] update to 3.23.0 --- ports/sqlite3/CONTROL | 2 +- ports/sqlite3/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index 7e39794dd..a5d76d43b 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,5 +1,5 @@ Source: sqlite3 -Version: 3.21.0-1 +Version: 3.23.0 Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. Feature: tool diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index d6596e7b2..d016660ab 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(SQLITE_VERSION 3210000) -set(SQLITE_HASH 0a272b00825d07528c3842ccd483d81e5e719ab56737eec0972f7f8191dfbe92e35777ab8d1b37c95fde9320bbfa3c365a4b30253af876340f55517ea96bf665) +set(SQLITE_VERSION 3230000) +set(SQLITE_HASH bfca2ec16d926c11c9ec052eae41549f1de392582227ca08eb8a01cc36e58ac528c7677fdab253250ba3e0cf6e5cd9d3d0012e5b558be7db91740ac901dae0fe) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite-amalgamation-${SQLITE_VERSION}) vcpkg_download_distfile(ARCHIVE - URLS "https://sqlite.org/2017/sqlite-amalgamation-${SQLITE_VERSION}.zip" + URLS "https://sqlite.org/2018/sqlite-amalgamation-${SQLITE_VERSION}.zip" FILENAME "sqlite-amalgamation-${SQLITE_VERSION}.zip" SHA512 ${SQLITE_HASH}) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From d1ecca1c7d225d4300ee82d6e915cbe7d6bac244 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 2 Apr 2018 16:45:58 -0700 Subject: [abseil][aws-sdk-cpp][clara][eastl][exiv2][libuv][nuklear][openimageio][thrift] Upgrades --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- ports/clara/CONTROL | 2 +- ports/clara/portfile.cmake | 4 ++-- ports/eastl/CONTROL | 2 +- ports/eastl/portfile.cmake | 4 ++-- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/libuv/CONTROL | 2 +- ports/libuv/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/openimageio/CONTROL | 2 +- ports/openimageio/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- 18 files changed, 27 insertions(+), 27 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index a07f78c76..b7ef25750 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-03-29 +Version: 2018-04-02 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index bd1d799a2..4ccdb27a6 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF d9b47d7888b39cd113bacacb9edd5023a71cbb3a - SHA512 d5aac7bbe7cdb1419f19eff80487a1d8fa03cde82db760bf9fab464a62ae66251c62f69ff13940db41af1bb287ea9680782773bf1cb19c15d489f711b390d734 + REF 7b3c38a0628b9201ce92a6893b96890b64e5daa8 + SHA512 6e23d98adabbefcf8054a0ff03fdbc5438efbd957cd4864ab870496468f9891eeb8f73796a37faba7412a4b88b96771fc23f3f0bb89ab6023800beb99e6660d3 HEAD_REF master ) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index eb69e3b10..b4004cdc0 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,5 +1,5 @@ Source: aws-sdk-cpp -Version: 1.4.26 +Version: 1.4.27 Description: AWS SDK for C++ Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs # Automatically generated by generateFeatures.ps1 diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 4728ab259..26129db5c 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.4.26 - SHA512 44ba566b82e4e3b0be3250bc02693a2128986eb0f7214b7a2bb4dc716d23afe7e699de89cc4483ab176b07159cf3ecf4821b16e5033b75db39ef410165d4f08b + REF 1.4.27 + SHA512 d714fe12d3701461b897256d824b169ff3242bb412d386a2c1455c0dc1dcedf3add444eab556551fbb69e0339b49c3133c1f820710b5681d25a23237e919ddd0 HEAD_REF master ) diff --git a/ports/clara/CONTROL b/ports/clara/CONTROL index 878313563..815db6e52 100644 --- a/ports/clara/CONTROL +++ b/ports/clara/CONTROL @@ -1,3 +1,3 @@ Source: clara -Version: 2018-03-23 +Version: 2018-04-02 Description: A simple to use command line parser for C++ \ No newline at end of file diff --git a/ports/clara/portfile.cmake b/ports/clara/portfile.cmake index 3c5108b19..b4f7a7b20 100644 --- a/ports/clara/portfile.cmake +++ b/ports/clara/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO philsquared/Clara - REF 3ba13ad04a3eebc002320f187475ddcd267288a3 - SHA512 d2e73d2ac70f9ad6428f434b101d413453648708d545a1a71f2363b5847e710412b69fdb9ab100eb437f9419cc4c250ce7ca56cfa9132096be9aa471dcb677d0 + REF ba5485cb56329db3ea3f5402ef596d3b512b903a + SHA512 8aa66e3e1a2b7c544d9d105ad9f803119791b971cce4dff63ae47b63a08fd422fc75108aeb69300fa9982568d689f506456c6f8ed7287a19b9ed84649fad9315 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/single_include/clara.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/eastl/CONTROL b/ports/eastl/CONTROL index 47a111ea1..dbf5fb0f4 100644 --- a/ports/eastl/CONTROL +++ b/ports/eastl/CONTROL @@ -1,4 +1,4 @@ Source: eastl -Version: 3.08.00 +Version: 3.09.00 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/portfile.cmake b/ports/eastl/portfile.cmake index 1e3831913..afe9ed4cf 100644 --- a/ports/eastl/portfile.cmake +++ b/ports/eastl/portfile.cmake @@ -8,8 +8,8 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eastl) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO electronicarts/EASTL - REF 3.08.00 - SHA512 dc9510d1b6021fb275049a45d52d25002ac2e9859047c0ba4881aa478b700645e17b4fdbc7cdb43cee86df9155c545d2a29a6c1c5b06df3b8b6b4e150f010ade + REF 3.09.00 + SHA512 73b1b6ce0eba65fca049571a44595ff581f0dda01dcaaf3e0deb2d22e62b9b694a321339038c5cc2e6802ba3270675b814b73b59a8cfc8d71e645c60b17bebb6 HEAD_REF master ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 0f4ddb750..3e7d58c9a 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-03-29 +Version: 2018-04-02 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index f68070eea..99a72304f 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF 8b7941b7332a3299b3b6061e93f352ef66440666 - SHA512 743a9792753915334e86c55112ef876bf0353924b85b0bf33ffb8217606ecb57954eec2d0e904f6e9fd9ea435b96f035bea793cb5040f54169eea0ba0c2fd7e3 + REF 07d75cd0e833286ce9e301ea83229f3e283c6191 + SHA512 8cf5cb919c12e719d70f2ea71c84835f09f2962095eeb56bb27ef3cd22ad4ea032dfbf9704f9c7393de0a969d3ae0609dafeb619b6c28dca598c8f34a3810b4d HEAD_REF master ) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index 2f7647489..e861df239 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.19.2 +Version: 1.20.0 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index 4a79096c2..46ce33d8d 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.19.2 - SHA512 4fa879e34c51ae428ebf72ce80873b8d12994ae1560f9d3577a693653bfd5bd4b4fda7ff457b98b5e60fc82546658300401d6545d677f31d2cd66be3d82e02da + REF v1.20.0 + SHA512 382309cb6e54765b956b03357cb754f49d93505ba0e0122a77f33efca07d7b87966c993a5fd9f9503edd1bcd0f49ca42bd9cd9264cce94c847aebca77d237ba0 HEAD_REF v1.x) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index 694ddd5b7..51aaf9ac2 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-03-27 +Version: 2018-04-02 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index 9baefc9a4..1e820cc07 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF 7e710ff4fb0186c0e462d43b30c82cab12ea1277 - SHA512 9f65e2fe2e89521002f7d86e8c5f0947a76724b7e7eb87463832732f38561b0415da98a8411e474467a9e5e1b33189c98f6506cc1baf97dbced66cfe05f2a290 + REF 60bd95c926f73b143ec91e66b2fe315ad2a316e1 + SHA512 45cf7c5cab105241aec6c2a56a34abf9701eded52bf06d3092e0079949757a6cbb0d684b45952a054451384cd07a77b1763526470ec84835da3d514c614c65ba HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index 88a66b315..7da61fcb7 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -1,4 +1,4 @@ Source: openimageio -Version: 1.8.9 +Version: 1.8.10 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 diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index 21a5899c1..a9bc35608 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.9 - SHA512 300eab0d2e7277c46550339d72af59b3ab2232d296b4d46808575015075cdbb9dd911e9b335c0d10bf6d95ebde907240af0f4828d422aca091f82491693dfef3 + REF Release-1.8.10 + SHA512 8b80019feb6bffd63bdd64e4ddad5a85b42f0ed7c27f7d82475b60b0b4db3945bd70d8d75921dd9ae8830b941d7eef6b89364ee1ab418558b75397a784314949 HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 8707974d0..da43bce3d 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-03-30 +Version: 2018-04-02 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 574be4dab..80a6f036d 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 8a83b041d20671c3fae9528d5ac1f5413cad7c5a - SHA512 9f0a2fdb92e33aea960342a88134e4ce4f5f86277abb235ae13dd2f5b4e28f82e72e16d7cf18a1a13f5a9368420b01b3b51a8d3b3d3c06fade00978565b93b7d + REF 3c0edfa875218bd83f6b79a7823380e2adc08ae6 + SHA512 8499ae6adf0db725f847f25f1c0b0ccf0abd8b142dd410a8a3c544dfd2fae8bdf1dec86e74eee3b4f78288f53ed5a162214d963513456d9b3be794e157c00a38 HEAD_REF master ) -- cgit v1.2.3 From 410c547fa14ba6197833f19f2180ba2c532c1722 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 3 Apr 2018 15:19:16 -0700 Subject: Use -L on curl --- toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index d4bcea5af..bda2c4174 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -252,8 +252,8 @@ namespace vcpkg #else if (!fs.exists(tool_data.downloaded_path)) { - auto code = System::cmd_execute( - Strings::format(R"(curl '%s' --create-dirs --output '%s')", tool_data.url, tool_data.downloaded_path)); + auto code = System::cmd_execute(Strings::format( + R"(curl -L '%s' --create-dirs --output '%s')", tool_data.url, tool_data.downloaded_path)); Checks::check_exit(VCPKG_LINE_INFO, code == 0, "curl failed while downloading %s", tool_data.url); } -- cgit v1.2.3 From 385df0b02b204e01fbe49c8e3d24c093b22db4b2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 3 Apr 2018 15:28:47 -0700 Subject: Add vcpkg edit --all --- toolsrc/src/vcpkg/commands.edit.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index ac34a6720..94df9f9af 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -34,6 +34,8 @@ namespace vcpkg::Commands::Edit static constexpr StringLiteral OPTION_BUILDTREES = "--buildtrees"; + static constexpr StringLiteral OPTION_ALL = "--all"; + static std::vector valid_arguments(const VcpkgPaths& paths) { auto sources_and_errors = Paragraphs::try_load_all_ports(paths.get_filesystem(), paths.ports); @@ -42,9 +44,9 @@ namespace vcpkg::Commands::Edit [](auto&& pgh) -> std::string { return pgh->core_paragraph->name; }); } - static constexpr std::array EDIT_SWITCHES = {{ - {OPTION_BUILDTREES, "Open editor into the port-specific buildtree subfolder"}, - }}; + static constexpr std::array EDIT_SWITCHES = { + {{OPTION_BUILDTREES, "Open editor into the port-specific buildtree subfolder"}, + {OPTION_ALL, "Open editor into the port as well as the port-specific buildtree subfolder"}}}; const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("edit zlib"), @@ -113,6 +115,15 @@ namespace vcpkg::Commands::Edit Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); } + if (Util::Sets::contains(options.switches, OPTION_ALL)) + { + const auto buildtrees_current_dir = paths.buildtrees / port_name; + + const auto cmd_line = Strings::format( + R"("%s" "%s" %s -n)", env_editor.u8string(), portpath.u8string(), buildtrees_current_dir.u8string()); + Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); + } + const auto cmd_line = Strings::format( R"("%s" "%s" "%s" -n)", env_editor.u8string(), -- cgit v1.2.3 From 599aea98c9a2ef587fd9deacdfcf64dfa2e3c4db Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 3 Apr 2018 15:30:24 -0700 Subject: Add missing quotes --- toolsrc/src/vcpkg/commands.edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index 94df9f9af..6c696018e 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -120,7 +120,7 @@ namespace vcpkg::Commands::Edit const auto buildtrees_current_dir = paths.buildtrees / port_name; const auto cmd_line = Strings::format( - R"("%s" "%s" %s -n)", env_editor.u8string(), portpath.u8string(), buildtrees_current_dir.u8string()); + R"("%s" "%s" "%s" -n)", env_editor.u8string(), portpath.u8string(), buildtrees_current_dir.u8string()); Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); } -- cgit v1.2.3 From 8825e659a62a4d1360c09173882bdf5476d67fc0 Mon Sep 17 00:00:00 2001 From: Josue Andrade Gomes Date: Wed, 4 Apr 2018 09:56:32 -0300 Subject: GraphicsMagick 1.3.28 --- ports/graphicsmagick/CMakeLists.txt | 2 +- ports/graphicsmagick/CONTROL | 2 +- ports/graphicsmagick/portfile.cmake | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/graphicsmagick/CMakeLists.txt b/ports/graphicsmagick/CMakeLists.txt index 035a193cc..27f9fb109 100644 --- a/ports/graphicsmagick/CMakeLists.txt +++ b/ports/graphicsmagick/CMakeLists.txt @@ -77,7 +77,7 @@ add_library(graphicsmagick coders/art.c coders/avs.c coders/tiff.c coders/tile.c coders/tim.c coders/topol.c coders/ttf.c coders/txt.c coders/uil.c coders/url.c coders/uyvy.c coders/vicar.c coders/vid.c coders/viff.c - coders/wbmp.c coders/webp.c coders/wmf.c coders/wpg.c + coders/wbmp.c coders/wmf.c coders/wpg.c coders/x.c coders/xbm.c coders/xc.c coders/xcf.c coders/xpm.c coders/xtrn.c coders/xwd.c coders/yuv.c filters/analyze.c diff --git a/ports/graphicsmagick/CONTROL b/ports/graphicsmagick/CONTROL index 17f2a635d..275bae92f 100644 --- a/ports/graphicsmagick/CONTROL +++ b/ports/graphicsmagick/CONTROL @@ -1,4 +1,4 @@ Source: graphicsmagick -Version: 1.3.26-2 +Version: 1.3.28 Build-Depends: zlib, bzip2, freetype, libjpeg-turbo, libpng, tiff Description: Image processing library diff --git a/ports/graphicsmagick/portfile.cmake b/ports/graphicsmagick/portfile.cmake index 6636802cf..12630d346 100644 --- a/ports/graphicsmagick/portfile.cmake +++ b/ports/graphicsmagick/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(GM_VERSION 1.3.26) +set(GM_VERSION 1.3.28) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/graphicsmagick-${GM_VERSION}-windows-source) vcpkg_download_distfile(ARCHIVE URLS "https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/${GM_VERSION}/GraphicsMagick-${GM_VERSION}-windows-source.7z" FILENAME "GraphicsMagick-${GM_VERSION}-windows-source.7z" - SHA512 c45a054d082d9a7a2889a2235dd5b96bd564acf55bd581426ecd32c426f9797d7d56d6e5f25a5a7da8ebd26bf0d962372b5d48d86532dc6c57522d27c0d18ec8 + SHA512 0271c187634580204dcc3173553bae9e3cd799203d621ad9e2ba64be778760ac307f25af54859b10e60f8e2589287ad98062548f1c3c94f229e68e7c83878419 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 1a296f33e6f1b2857f9916cfb5577ef8b805857b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 3 Apr 2018 12:49:43 -0700 Subject: [theia] Avoid injecting ceres[suitesparse] into 32-bit ci builds --- ports/theia/CONTROL | 4 ++-- ports/theia/portfile.cmake | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/theia/CONTROL b/ports/theia/CONTROL index 06dcc80c8..83d6c2c53 100644 --- a/ports/theia/CONTROL +++ b/ports/theia/CONTROL @@ -1,4 +1,4 @@ Source: theia -Version: 0.7-d15154a-2 -Build-Depends: flann, cereal, ceres[suitesparse], openimageio, glew, freeglut +Version: 0.7-d15154a-3 +Build-Depends: flann, cereal, ceres[suitesparse] (!x86&!uwp&!arm&!linux&!osx), openimageio, glew, freeglut Description: An open source library for multiview geometry and structure from motion diff --git a/ports/theia/portfile.cmake b/ports/theia/portfile.cmake index d2e4c6699..b2e61fae1 100644 --- a/ports/theia/portfile.cmake +++ b/ports/theia/portfile.cmake @@ -3,6 +3,10 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(VCPKG_LIBRARY_LINKAGE static) endif() +if(VCPKG_TARGET_ARCHIECTURE STREQUAL "x86") + message(FATAL_ERROR "theia requires ceres[suitesparse] which depends on suitesparse which depends on openblas which is unavailable on x86.") +endif() + include(vcpkg_common_functions) vcpkg_from_github( -- cgit v1.2.3 From 1f7d155b5fec22b7a04fa49de5672f8557c15cc7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 3 Apr 2018 15:59:54 -0700 Subject: [libiconv][libxml2] Fix libxml2 on Linux and OSX --- ports/libiconv/CONTROL | 2 +- ports/libiconv/portfile.cmake | 2 +- ports/libiconv/unofficial-iconv-config.cmake | 2 + ports/libiconv/vcpkg-iconv-config.cmake | 2 - ports/libxml2/CMakeLists.txt | 84 ++++++++-------------------- ports/libxml2/CONTROL | 2 +- ports/libxml2/config.linux.h | 56 +++++++++++++++++++ ports/libxml2/config.osx.h | 54 ++++++++++++++++++ ports/libxml2/portfile.cmake | 1 + ports/libxml2/vcpkg-cmake-wrapper.cmake | 18 +++--- 10 files changed, 150 insertions(+), 73 deletions(-) create mode 100644 ports/libiconv/unofficial-iconv-config.cmake delete mode 100644 ports/libiconv/vcpkg-iconv-config.cmake create mode 100644 ports/libxml2/config.linux.h create mode 100644 ports/libxml2/config.osx.h diff --git a/ports/libiconv/CONTROL b/ports/libiconv/CONTROL index 8bb9625b9..37c1a0f0d 100644 --- a/ports/libiconv/CONTROL +++ b/ports/libiconv/CONTROL @@ -1,3 +1,3 @@ Source: libiconv -Version: 1.15-2 +Version: 1.15-3 Description: GNU Unicode text conversion diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index bded180db..5cc48da91 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -1,7 +1,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(VCPKG_POLICY_EMPTY_PACKAGE enabled) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/libiconv) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-iconv-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libiconv) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-iconv-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-iconv) return() endif() diff --git a/ports/libiconv/unofficial-iconv-config.cmake b/ports/libiconv/unofficial-iconv-config.cmake new file mode 100644 index 000000000..e272ce09e --- /dev/null +++ b/ports/libiconv/unofficial-iconv-config.cmake @@ -0,0 +1,2 @@ +add_library(unofficial::iconv::libcharset UNKNOWN IMPORTED) +add_library(unofficial::iconv::libiconv UNKNOWN IMPORTED) diff --git a/ports/libiconv/vcpkg-iconv-config.cmake b/ports/libiconv/vcpkg-iconv-config.cmake deleted file mode 100644 index 4befd4d15..000000000 --- a/ports/libiconv/vcpkg-iconv-config.cmake +++ /dev/null @@ -1,2 +0,0 @@ -add_library(unofficial::vcpkg::libcharset UNKNOWN IMPORTED) -add_library(unofficial::vcpkg::libiconv UNKNOWN IMPORTED) diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt index 96ecb901d..3d49985ee 100644 --- a/ports/libxml2/CMakeLists.txt +++ b/ports/libxml2/CMakeLists.txt @@ -3,60 +3,16 @@ project(libxml2 C) option(INSTALL_HEADERS "Install public header files" ON) +set(CMAKE_SHARED_LIBRARY_PREFIX) +set(CMAKE_STATIC_LIBRARY_PREFIX) + find_package(ZLIB REQUIRED) find_package(LibLZMA REQUIRED) -if(WIN32) - find_library(ICONV NAMES libiconv) - find_library(ICONV_CHARSET NAMES libcharset) -endif() +find_package(unofficial-iconv REQUIRED) -set(SOURCES - buf.c - c14n.c - catalog.c - chvalid.c - debugXML.c - dict.c - DOCBparser.c - encoding.c - entities.c - error.c - globals.c - hash.c - HTMLparser.c - HTMLtree.c - legacy.c - list.c - nanoftp.c - nanohttp.c - parser.c - parserInternals.c - pattern.c - relaxng.c - SAX.c - SAX2.c - schematron.c - threads.c - tree.c - uri.c - valid.c - xinclude.c - xlink.c - xmlIO.c - xmlmemory.c - xmlreader.c - xmlregexp.c - xmlmodule.c - xmlsave.c - xmlschemas.c - xmlschemastypes.c - xmlstring.c - xmlunicode.c - xmlwriter.c - xpath.c - xpointer.c - xzlib.c -) +file(GLOB SOURCES *.c) +list(FILTER SOURCES EXCLUDE REGEX "/(run|test|trio)[^/]*$") +list(FILTER SOURCES EXCLUDE REGEX "xml(lint|catalog).c$") # Generate xmlexports with fixed definition of LIBXML_STATIC file(READ include/libxml/xmlexports.h XMLEXPORTS_H) @@ -67,25 +23,33 @@ else() endif() file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/xmlexports.h "${XMLEXPORTS_H}") -file(GLOB PUBLIC_HEADERS include/libxml/*.h) -list(FILTER PUBLIC_HEADERS EXCLUDE REGEX "xmlexports\\.h$") -list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/xmlexports.h) - -configure_file(include/win32config.h config.h COPYONLY) +if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + configure_file(include/win32config.h config.h COPYONLY) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + configure_file("${PORT_DIR}/config.osx.h" config.h COPYONLY) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + configure_file("${PORT_DIR}/config.linux.h" config.h COPYONLY) +else() + message(FATAL_ERROR "No config.h checked in for the target platform. Please run ./configure for libxml2 and add the resulting config.h into this port.") +endif() add_library(libxml2 ${SOURCES}) if(INSTALL_HEADERS) + file(GLOB PUBLIC_HEADERS include/libxml/*.h) + list(FILTER PUBLIC_HEADERS EXCLUDE REGEX "xmlexports\\.h$") + list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/xmlexports.h) + set_target_properties(libxml2 PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") endif() -target_include_directories(libxml2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} win32/vc10 include ${LIBLZMA_INCLUDE_DIRS}) +target_include_directories(libxml2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} include ${LIBLZMA_INCLUDE_DIRS}) target_link_libraries(libxml2 PRIVATE + unofficial::iconv::libcharset unofficial::iconv::libiconv ZLIB::ZLIB ${LIBLZMA_LIBRARIES} ) -if(WIN32) +if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + target_include_directories(libxml2 PRIVATE win32/vc10) target_link_libraries(libxml2 PRIVATE - ${ICONV} - ${ICONV_CHARSET} wsock32.lib ws2_32.lib ) diff --git a/ports/libxml2/CONTROL b/ports/libxml2/CONTROL index b8552e48e..f005d2367 100644 --- a/ports/libxml2/CONTROL +++ b/ports/libxml2/CONTROL @@ -1,4 +1,4 @@ Source: libxml2 -Version: 2.9.4-4 +Version: 2.9.4-5 Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform) Build-Depends: zlib, libiconv, liblzma diff --git a/ports/libxml2/config.linux.h b/ports/libxml2/config.linux.h new file mode 100644 index 000000000..d029e95cf --- /dev/null +++ b/ports/libxml2/config.linux.h @@ -0,0 +1,56 @@ +#define GETHOSTBYNAME_ARG_CAST /**/ +#define HAVE_ANSIDECL_H 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_ARPA_NAMESER_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_DLFCN_H 1 +#define HAVE_DLOPEN /**/ +#define HAVE_ERRNO_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_FLOAT_H 1 +#define HAVE_FTIME 1 +#define HAVE_GETADDRINFO /**/ +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_ISASCII 1 +#define HAVE_LIMITS_H 1 +#define HAVE_LOCALTIME 1 +#define HAVE_LZMA_H 1 +#define HAVE_MALLOC_H 1 +#define HAVE_MATH_H 1 +#define HAVE_MMAP 1 +#define HAVE_NETDB_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_POLL_H 1 +#define HAVE_PTHREAD_H /**/ +#define HAVE_PUTENV 1 +#define HAVE_RAND 1 +#define HAVE_RAND_R 1 +#define HAVE_RESOLV_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SRAND 1 +#define HAVE_STAT 1 +#define HAVE_STDARG_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRFTIME 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIMEB_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_TIME 1 +#define HAVE_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_VA_COPY 1 +#define HAVE_ZLIB_H 1 +#define ICONV_CONST +#define SEND_ARG2_CAST /**/ +#define SUPPORT_IP6 /**/ +#define VA_LIST_IS_ARRAY 1 +#define XML_SOCKLEN_T socklen_t diff --git a/ports/libxml2/config.osx.h b/ports/libxml2/config.osx.h new file mode 100644 index 000000000..95d83edc1 --- /dev/null +++ b/ports/libxml2/config.osx.h @@ -0,0 +1,54 @@ +#define GETHOSTBYNAME_ARG_CAST /**/ +#define HAVE_ARPA_INET_H 1 +#define HAVE_ARPA_NAMESER_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_DLFCN_H 1 +#define HAVE_DLOPEN /**/ +#define HAVE_ERRNO_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_FLOAT_H 1 +#define HAVE_FTIME 1 +#define HAVE_GETADDRINFO /**/ +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_ISASCII 1 +#define HAVE_LIMITS_H 1 +#define HAVE_LOCALTIME 1 +#define HAVE_LZMA_H 1 +#define HAVE_MATH_H 1 +#define HAVE_MMAP 1 +#define HAVE_NETDB_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_POLL_H 1 +#define HAVE_PTHREAD_H /**/ +#define HAVE_PUTENV 1 +#define HAVE_RAND 1 +#define HAVE_RAND_R 1 +#define HAVE_RESOLV_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SRAND 1 +#define HAVE_STAT 1 +#define HAVE_STDARG_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRFTIME 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIMEB_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_TIME 1 +#define HAVE_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_VA_COPY 1 +#define HAVE_ZLIB_H 1 +#define ICONV_CONST +#define SEND_ARG2_CAST /**/ +#define SUPPORT_IP6 /**/ +#define VA_LIST_IS_ARRAY 1 +#define XML_SOCKLEN_T socklen_t diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake index a300fcaf5..cdf10496e 100644 --- a/ports/libxml2/portfile.cmake +++ b/ports/libxml2/portfile.cmake @@ -12,6 +12,7 @@ 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=OFF ) diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake index 6452af426..68bed6547 100644 --- a/ports/libxml2/vcpkg-cmake-wrapper.cmake +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -1,11 +1,13 @@ _find_package(${ARGS}) -if(LibXml2_FOUND AND (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) +if(LibXml2_FOUND) find_package(LibLZMA) - list(APPEND LIBXML2_LIBRARIES - ${LIBLZMA_LIBRARIES} - debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libiconv.lib - optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libiconv.lib - debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib - optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib - ws2_32) + list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES}) + if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + list(APPEND LIBXML2_LIBRARIES + debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libiconv.lib + optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libiconv.lib + debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib + optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib + ws2_32) + endif() endif() -- cgit v1.2.3 From 3baf583934f3077070e9ed4e7684f743ecced577 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 3 Apr 2018 17:02:40 -0700 Subject: [openal-soft] Fix cmake 3.11 issue --- ports/openal-soft/cmake-3-11.patch | 14 ++++++++++++++ ports/openal-soft/portfile.cmake | 8 ++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 ports/openal-soft/cmake-3-11.patch diff --git a/ports/openal-soft/cmake-3-11.patch b/ports/openal-soft/cmake-3-11.patch new file mode 100644 index 000000000..07f7e6936 --- /dev/null +++ b/ports/openal-soft/cmake-3-11.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a871f4c..f9f6b34 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -965,7 +965,8 @@ OPTION(ALSOFT_REQUIRE_DSOUND "Require DirectSound backend" OFF) + OPTION(ALSOFT_REQUIRE_MMDEVAPI "Require MMDevApi backend" OFF) + IF(HAVE_WINDOWS_H) + # Check MMSystem backend +- CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0502) ++ set(CMAKE_REQUIRED_DEFINITIONS -D_WIN32_WINNT=0x0502) ++ CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H) + IF(HAVE_MMSYSTEM_H) + CHECK_SHARED_FUNCTION_EXISTS(waveOutOpen "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM) + IF(HAVE_LIBWINMM) diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake index b1421f1f5..527b4ba60 100644 --- a/ports/openal-soft/portfile.cmake +++ b/ports/openal-soft/portfile.cmake @@ -11,8 +11,12 @@ vcpkg_from_github( HEAD_REF master ) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/dont-export-symbols-in-static-build.patch) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/dont-export-symbols-in-static-build.patch + ${CMAKE_CURRENT_LIST_DIR}/cmake-3-11.patch +) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(OPENAL_LIBTYPE "SHARED") -- cgit v1.2.3 From e37137b5bab670f2776748b1c043c69f883c4dd5 Mon Sep 17 00:00:00 2001 From: RT222 Date: Fri, 6 Apr 2018 02:43:11 +0200 Subject: [sol] Update to version 2.19.5 --- ports/sol/CONTROL | 2 +- ports/sol/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sol/CONTROL b/ports/sol/CONTROL index f1bd57fa3..42b1be455 100644 --- a/ports/sol/CONTROL +++ b/ports/sol/CONTROL @@ -1,3 +1,3 @@ Source: sol -Version: 2.18.7 +Version: 2.19.5 Description: Sol v2.0 - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great diff --git a/ports/sol/portfile.cmake b/ports/sol/portfile.cmake index 83d59becc..c65202380 100644 --- a/ports/sol/portfile.cmake +++ b/ports/sol/portfile.cmake @@ -14,8 +14,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ThePhD/sol2 - REF v2.18.7 - SHA512 747dbcba2da4e44bfb365c0fd0c8df916d0e5d0ddbaa9df514838d84a8fd4261c87db7d14d9683b708b874cd6a73586e7854d9a784743a737858b73acdd78f1c + REF v2.19.5 + SHA512 c004c2331e2eb0aae4467c10609f73879246c3ab5b7421e5b6fcb91b0c6595d999e5fd4c70b1859af1febb374631640d6727bf236a0cd176e40f631813e243a9 HEAD_REF develop ) -- cgit v1.2.3 From e80db08066638efca8ee661f8428bb5aa78dcff9 Mon Sep 17 00:00:00 2001 From: RT222 Date: Fri, 6 Apr 2018 02:43:49 +0200 Subject: [pugixml] Update to version 1.9 --- ports/pugixml/CONTROL | 2 +- ports/pugixml/portfile.cmake | 45 ++++++++++++++++++++++---------------------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/ports/pugixml/CONTROL b/ports/pugixml/CONTROL index eb1f4e634..5e2dad599 100644 --- a/ports/pugixml/CONTROL +++ b/ports/pugixml/CONTROL @@ -1,3 +1,3 @@ Source: pugixml -Version: 1.8.1-3 +Version: 1.9-1 Description: C++ XML processing library diff --git a/ports/pugixml/portfile.cmake b/ports/pugixml/portfile.cmake index 889063223..b0ec2cc58 100644 --- a/ports/pugixml/portfile.cmake +++ b/ports/pugixml/portfile.cmake @@ -1,32 +1,33 @@ +# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pugixml-1.8) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/zeux/pugixml/releases/download/v1.8.1/pugixml-1.8.1.zip" - FILENAME "pugixml-1.8.1.zip" - SHA512 683fe224a9bcac032d78cb44d03915a3766d2faa588f3a8486b5719f26eeba3e17d447edf70e1907f51f8649ffb4607b6badd1365e4c15cf24279bf577dc853e + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeux/pugixml + REF v1.9 + SHA512 f97941941d98a1a056087edc0dde6376bf2cc12ce4523b67a2f2ec5ae0895c2a2e55da32fcca6a997f1a0d918c5f39564167da0a07ce0d7da92880ad8631c31e + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - ) -else() - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/pugixmlapi.patch - ) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_DEFINES="PUGIXML_API=__declspec\(dllexport\)" - ) -endif() +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) vcpkg_install_cmake() vcpkg_copy_pdbs() 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) -- cgit v1.2.3 From 497b8fc91cdfa514e86acdb4f2f516b73c1b760f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 5 Apr 2018 17:49:15 -0700 Subject: [shogun] Disable openblas in x86 to enable builds --- ports/shogun/CONTROL | 2 +- ports/shogun/portfile.cmake | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ports/shogun/CONTROL b/ports/shogun/CONTROL index 6a05a331e..56b6250d6 100644 --- a/ports/shogun/CONTROL +++ b/ports/shogun/CONTROL @@ -1,4 +1,4 @@ Source: shogun Version: 6.1.3 -Build-Depends: bzip2, eigen3, liblzma, libxml2, openblas, nlopt, rxcpp, snappy, zlib, protobuf, curl, lzo, dirent +Build-Depends: bzip2, eigen3, liblzma, libxml2, openblas (x64), 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 24e258539..94ed18797 100644 --- a/ports/shogun/portfile.cmake +++ b/ports/shogun/portfile.cmake @@ -22,10 +22,17 @@ 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_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + --trace -DBUILD_META_EXAMPLES=OFF -DBUILD_EXAMPLES=OFF -DUSE_SVMLIGHT=OFF @@ -47,6 +54,7 @@ vcpkg_configure_cmake( -DCMAKE_DISABLE_FIND_PACKAGE_Ctags=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_CCache=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_BLAS=${CMAKE_DISABLE_FIND_PACKAGE_BLAS} -DINSTALL_TARGETS=shogun-static ) -- cgit v1.2.3 From 9ec84ff4b9c86c44b2f8a12a0fe707ce970ad6dc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 5 Apr 2018 17:49:37 -0700 Subject: [shogun] Remove --trace --- ports/shogun/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/shogun/portfile.cmake b/ports/shogun/portfile.cmake index 94ed18797..4860c5f6b 100644 --- a/ports/shogun/portfile.cmake +++ b/ports/shogun/portfile.cmake @@ -32,7 +32,6 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - --trace -DBUILD_META_EXAMPLES=OFF -DBUILD_EXAMPLES=OFF -DUSE_SVMLIGHT=OFF -- cgit v1.2.3 From d953c7869d5a7feac938aef14bcb5ceb8cd4b175 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 5 Apr 2018 15:14:37 -0700 Subject: [asio] Avoid boost dependency by always specifying ASIO_STANDALONE --- ports/asio/CONTROL | 3 +-- ports/asio/portfile.cmake | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/asio/CONTROL b/ports/asio/CONTROL index cd9914052..ec8ab41a8 100644 --- a/ports/asio/CONTROL +++ b/ports/asio/CONTROL @@ -1,4 +1,3 @@ Source: asio -Version: 1.12.0-1 -Build-Depends: boost-config, boost-throw-exception, boost-utility, boost-date-time +Version: 1.12.0-2 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 f6980f14e..284e25300 100644 --- a/ports/asio/portfile.cmake +++ b/ports/asio/portfile.cmake @@ -15,3 +15,8 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR # Copy the asio header files file(INSTALL ${SOURCE_PATH}/asio/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp" PATTERN "*.ipp") + +# Always use "ASIO_STANDALONE" to avoid boost dependency +file(READ "${CURRENT_PACKAGES_DIR}/include/asio/detail/config.hpp" _contents) +string(REPLACE "defined(ASIO_STANDALONE)" "!defined(VCPKG_DISABLE_ASIO_STANDALONE)" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/asio/detail/config.hpp" "${_contents}") -- cgit v1.2.3 From be4f6f3ffc91795c0ae6d5641d370277c447408a Mon Sep 17 00:00:00 2001 From: RT222 Date: Fri, 6 Apr 2018 02:57:39 +0200 Subject: Delete pugixmlapi.patch --- ports/pugixml/pugixmlapi.patch | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 ports/pugixml/pugixmlapi.patch diff --git a/ports/pugixml/pugixmlapi.patch b/ports/pugixml/pugixmlapi.patch deleted file mode 100644 index 177664dbe..000000000 --- a/ports/pugixml/pugixmlapi.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/pugixml.hpp b/src/pugixml.hpp -index 4d76bfa..75a4f8a 100644 ---- a/src/pugixml.hpp -+++ b/src/pugixml.hpp -@@ -50,7 +50,7 @@ - - // If no API is defined, assume default - #ifndef PUGIXML_API --# define PUGIXML_API -+# define PUGIXML_API __declspec(dllimport) - #endif - - // If no API for classes is defined, assume default -- cgit v1.2.3 From 708f7c66c840662acb9d7d484ea06aa5cd2e65b5 Mon Sep 17 00:00:00 2001 From: RT222 Date: Fri, 6 Apr 2018 03:08:01 +0200 Subject: [icu] Update to version 61.1 --- ports/icu/CONTROL | 2 +- ports/icu/portfile.cmake | 35 ++++++++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/ports/icu/CONTROL b/ports/icu/CONTROL index 3553238f9..9d8320762 100644 --- a/ports/icu/CONTROL +++ b/ports/icu/CONTROL @@ -1,3 +1,3 @@ Source: icu -Version: 59.1-1 +Version: 61.1-1 Description: Mature and widely used Unicode and localization library. diff --git a/ports/icu/portfile.cmake b/ports/icu/portfile.cmake index dcf9efda5..afacc076c 100644 --- a/ports/icu/portfile.cmake +++ b/ports/icu/portfile.cmake @@ -1,15 +1,31 @@ +# 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) +# if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "Error: UWP builds are currently not supported.") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/icu-59.1/icu) -set(ICU_VERSION 59) -vcpkg_download_distfile(ARCHIVE - URLS "http://download.icu-project.org/files/icu4c/59.1/icu4c-59_1-src.zip" - FILENAME "icu4c-59_1-src.zip" - SHA512 1d3b39678e7cc4e9794e724982886a4918642231048eb76b9f683aad5a19e0b7c52b3b9c7107cb1a3879464682c4a3a97b58ab012d082bd9e5a80c67adf8ce8b) -vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/icu-59.1) +set(VERSION 61.1) +set(VERSION2 61_1) +set(ICU_VERSION_MAJOR 61) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/icu-${VERSION}/icu) +vcpkg_download_distfile( + ARCHIVE + URLS "http://download.icu-project.org/files/icu4c/${VERSION}/icu4c-${VERSION2}-src.zip" + FILENAME "icu4c-${VERSION2}-src.zip" + SHA512 60fed25976b8c2fe2df0b0ab745ded24da237711ec8c1e1dbdfe6eaf2014fb6b3a4bcaa488174cf770737a1c159a2d3f48a86a139cbb277163f064e607b8928f + ) +vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/icu-${VERSION}) vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-escapestr-tool.patch) @@ -109,8 +125,8 @@ file(REMOVE ${TEST_LIBS}) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) # copy icu dlls from lib to bin - file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/icu*${ICU_VERSION}.dll) - file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/icu*d${ICU_VERSION}.dll) + file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/icu*${ICU_VERSION_MAJOR}.dll) + file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/icu*d${ICU_VERSION_MAJOR}.dll) file(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) else() @@ -139,5 +155,6 @@ endif() # This is expected because ICU database contains no executable code vcpkg_copy_pdbs() +# Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/icu) file(RENAME ${CURRENT_PACKAGES_DIR}/share/icu/LICENSE ${CURRENT_PACKAGES_DIR}/share/icu/copyright) -- cgit v1.2.3 From 47ee755807d1e5af114465c54afa865668d075fc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 5 Apr 2018 21:25:55 -0700 Subject: [tbb] Use exact hash to avoid tag changes --- ports/tbb/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index f74d096de..4a0b80ec4 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -10,8 +10,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO 01org/tbb - REF 2018_U3 - SHA512 e92a2aabcdd456c1676eb9ce20653908a867ea18ff118f5f039823f5a10a0da3de61d0044774ad38b137e636fa8602af009dfeb59c84005fe90c6206aa3306ab + REF 633b01ad27e012e1dc4e392c3230250d1f4967a4 + SHA512 5576b5e1efa0c7938dc08a1a9503ea19234b20f6a742f3d13a8de19b47f5bdafa1bb855e4de022a4b096a429e66739599a198fdf687c167c659f7556235fa01f HEAD_REF tbb_2018) if(TRIPLET_SYSTEM_ARCH STREQUAL x86) -- cgit v1.2.3 From 35f5a0de5327efdea1e9aea7979a2c828daacc0d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 5 Apr 2018 21:39:47 -0700 Subject: [vcpkg-cmake-toolchain] Remove some hardcoded find_package helpers and guard all remaining ones --- scripts/buildsystems/vcpkg.cmake | 37 +++++-------------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 0c32b22fb..a9f8190f7 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -187,7 +187,7 @@ macro(find_package name) unset(Boost_USE_STATIC_RUNTIME) set(Boost_COMPILER "-vc140") _find_package(${ARGV}) - elseif("${name}" STREQUAL "ICU") + elseif("${name}" STREQUAL "ICU" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/unicode/utf.h") function(_vcpkg_find_in_list) list(FIND ARGV "COMPONENTS" COMPONENTS_IDX) set(COMPONENTS_IDX ${COMPONENTS_IDX} PARENT_SCOPE) @@ -198,7 +198,7 @@ macro(find_package name) else() _find_package(${ARGV}) endif() - elseif("${name}" STREQUAL "TIFF") + elseif("${name}" STREQUAL "TIFF" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/tiff.h") _find_package(${ARGV}) find_package(LibLZMA) if(TARGET TIFF::TIFF) @@ -207,24 +207,7 @@ macro(find_package name) if(TIFF_LIBRARIES) list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES}) endif() - elseif("${name}" STREQUAL "Freetype") - _find_package(${ARGV}) - find_package(ZLIB) - find_package(PNG) - find_package(BZip2) - if(TARGET Freetype::Freetype) - set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES BZip2::BZip2 PNG::PNG ZLIB::ZLIB) - endif() - if(FREETYPE_LIBRARIES) - list(APPEND FREETYPE_LIBRARIES ${BZIP2_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES}) - endif() - elseif("${name}" STREQUAL "tinyxml2") - _find_package(${ARGV}) - if(TARGET tinyxml2_static AND NOT TARGET tinyxml2) - _add_library(tinyxml2 INTERFACE IMPORTED) - set_target_properties(tinyxml2 PROPERTIES INTERFACE_LINK_LIBRARIES "tinyxml2_static") - endif() - elseif(("${name}" STREQUAL "HDF5" OR "${name}" STREQUAL "hdf5") AND NOT PROJECT_NAME STREQUAL "VTK") + elseif(("${name}" STREQUAL "HDF5" OR "${name}" STREQUAL "hdf5") AND NOT PROJECT_NAME STREQUAL "VTK" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/hdf5.h") # This is a hack to make VTK work. TODO: find another way to suppress the built-in find module. _find_package(${ARGV} CONFIG) # Fill in missing static/shared targets @@ -237,7 +220,7 @@ macro(find_package name) set_target_properties(hdf5::${HDF5TARGET}-static PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::${HDF5TARGET}-shared") endif() endforeach() - elseif("${name}" STREQUAL "GSL") + elseif("${name}" STREQUAL "GSL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/gsl") _find_package(${ARGV}) if(GSL_FOUND AND TARGET GSL::gsl) set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Release ) @@ -249,7 +232,7 @@ macro(find_package name) set_target_properties( GSL::gslcblas PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_CBLAS_LIBRARY_DEBUG}" ) endif() endif() - elseif("${name}" STREQUAL "CURL") + elseif("${name}" STREQUAL "CURL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/curl") _find_package(${ARGV}) if(CURL_FOUND) if(EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/nghttp2.lib") @@ -258,16 +241,6 @@ macro(find_package name) "optimized" "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/nghttp2.lib") endif() endif() - elseif("${name}" STREQUAL "LibXml2") - _find_package(${ARGV}) - if(LibXml2_FOUND AND (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) - list(APPEND LIBXML2_LIBRARIES - debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libiconv.lib - optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libiconv.lib - debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib - optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib - ws2_32) - endif() else() _find_package(${ARGV}) endif() -- cgit v1.2.3 From 09c9d1b75db3182c2d9fcfd6e0c73175eea652ce Mon Sep 17 00:00:00 2001 From: George Fotopoulos Date: Fri, 6 Apr 2018 07:43:26 +0300 Subject: [forest] Update to version 7.0.1 (#3208) * Update portfile.cmake * [forest] Update to version 7.0.1 * [forest] Use vcpkg_from_github --- ports/forest/CONTROL | 2 +- ports/forest/portfile.cmake | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ports/forest/CONTROL b/ports/forest/CONTROL index 522668d9d..e22089dab 100644 --- a/ports/forest/CONTROL +++ b/ports/forest/CONTROL @@ -1,3 +1,3 @@ Source: forest -Version: 4.5.0 +Version: 7.0.1 Description: Forest is an open-source, template library of tree data structures written in C++11. diff --git a/ports/forest/portfile.cmake b/ports/forest/portfile.cmake index 6f076a0db..78e85a5fe 100644 --- a/ports/forest/portfile.cmake +++ b/ports/forest/portfile.cmake @@ -1,13 +1,12 @@ -# Ηeader-only library - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/forest-4.5.0) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/xorz57/forest/archive/4.5.0.zip" - FILENAME "forest-4.5.0.zip" - SHA512 ae256ad38802d0827cfcd45ffae35ddb95cf74e38cf3e5d806f6e2215f701abfb8159f82e2bb6362788fe96a9f9008429d366e7abbc7980b29b3528052cfe43e + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xorz57/forest + REF 7.0.1 + SHA512 75f5f643ec20bab3298e5983f2ab1672dc304102059cf454341fe37495f1e18ac6a6fcce927b49f441a586ec788d4be44e1ceab8e1947565c2ab3ff519daded8 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) # Handle headers file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") -- cgit v1.2.3 From 2e354dd23357af7e0ec23798ee2448ee196a1eef Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 5 Apr 2018 21:54:45 -0700 Subject: [shogun] Require python3 --- ports/shogun/portfile.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/shogun/portfile.cmake b/ports/shogun/portfile.cmake index 4860c5f6b..e002ead4a 100644 --- a/ports/shogun/portfile.cmake +++ b/ports/shogun/portfile.cmake @@ -28,6 +28,10 @@ else() set(CMAKE_DISABLE_FIND_PACKAGE_BLAS 1) endif() +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA -- cgit v1.2.3 From 89201f4aecdfefb2cc456b4f71e9dcf63c1d93c9 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 5 Apr 2018 15:28:05 -0700 Subject: [abseil][aws-sdk-cpp][azure-c-shared-utility][azure-iot-sdk-c][azure-uamqp-c][azure-umqtt-c][breakpad][exiv2][gdcm2][grpc][nuklear][rocksdb][rs-core-lib][thrift][zeromq] Upgrades --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- ports/azure-c-shared-utility/CONTROL | 2 +- ports/azure-c-shared-utility/portfile.cmake | 4 ++-- ports/azure-iot-sdk-c/CONTROL | 2 +- ports/azure-iot-sdk-c/portfile.cmake | 4 ++-- ports/azure-uamqp-c/CONTROL | 2 +- ports/azure-uamqp-c/portfile.cmake | 4 ++-- ports/azure-umqtt-c/CONTROL | 2 +- ports/azure-umqtt-c/portfile.cmake | 4 ++-- ports/breakpad/CONTROL | 2 +- ports/breakpad/portfile.cmake | 4 ++-- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/gdcm2/CONTROL | 2 +- ports/gdcm2/portfile.cmake | 4 ++-- ports/grpc/CONTROL | 2 +- ports/grpc/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/rocksdb/CONTROL | 2 +- ports/rocksdb/pass-major-version.patch | 20 ++++++++++++++++++++ ports/rocksdb/portfile.cmake | 10 ++++++---- ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 6 ++++-- 31 files changed, 71 insertions(+), 47 deletions(-) create mode 100644 ports/rocksdb/pass-major-version.patch diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index b7ef25750..dddbdd2b2 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-04-02 +Version: 2018-04-05 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 4ccdb27a6..8abf42dc4 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 7b3c38a0628b9201ce92a6893b96890b64e5daa8 - SHA512 6e23d98adabbefcf8054a0ff03fdbc5438efbd957cd4864ab870496468f9891eeb8f73796a37faba7412a4b88b96771fc23f3f0bb89ab6023800beb99e6660d3 + REF abd0824ba64094e860803730c44d985334ad8770 + SHA512 2ba077b82a526612d8339d0f89cd82b57d510de2056ae12a07903ae39e536c2c0a8a7ccf37cf7228a372dd3e3db50a441afe76f448ce3483de86b49c495fcc06 HEAD_REF master ) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index b4004cdc0..b6a7785f2 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,5 +1,5 @@ Source: aws-sdk-cpp -Version: 1.4.27 +Version: 1.4.30 Description: AWS SDK for C++ Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs # Automatically generated by generateFeatures.ps1 diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 26129db5c..ac63ac850 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.4.27 - SHA512 d714fe12d3701461b897256d824b169ff3242bb412d386a2c1455c0dc1dcedf3add444eab556551fbb69e0339b49c3133c1f820710b5681d25a23237e919ddd0 + REF 1.4.30 + SHA512 309e700d1c351f6cb44036d3f2caf9c0fc8d96c7decdb403cff066c9927f1134a26dd50ba92af3b1b8c93a89e4bacf3a505cca3684136460e220df4309e467ba HEAD_REF master ) diff --git a/ports/azure-c-shared-utility/CONTROL b/ports/azure-c-shared-utility/CONTROL index 99cbcd38d..97d0a9a64 100644 --- a/ports/azure-c-shared-utility/CONTROL +++ b/ports/azure-c-shared-utility/CONTROL @@ -1,3 +1,3 @@ Source: azure-c-shared-utility -Version: 1.0.0-pre-release-1.0.9 +Version: 1.1.2 Description: Azure C SDKs common code diff --git a/ports/azure-c-shared-utility/portfile.cmake b/ports/azure-c-shared-utility/portfile.cmake index 4635f0d97..6aea93dad 100644 --- a/ports/azure-c-shared-utility/portfile.cmake +++ b/ports/azure-c-shared-utility/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-c-shared-utility - REF 1.0.0-pre-release-1.0.9 - SHA512 df28d0bb01961943d86febd7b54bafd7037b8461b4025e1db26ba0b76c4cadfa722c4cb5695ac0d4f57e16576eb23f3da02703bcc363af54a0476bccec95ce45 + REF 1.1.2 + SHA512 23c576efe0cc6c4a47d356f1e0be9e23d2b4e22692d35efa7d0d627a05fad245c55a81d26e60e1f7f7676d547a0e28c357846d2854b31f3f6ae7c39a934cf3d4 HEAD_REF master ) diff --git a/ports/azure-iot-sdk-c/CONTROL b/ports/azure-iot-sdk-c/CONTROL index 8c9bdb956..72ecadfca 100644 --- a/ports/azure-iot-sdk-c/CONTROL +++ b/ports/azure-iot-sdk-c/CONTROL @@ -1,4 +1,4 @@ Source: azure-iot-sdk-c -Version: 1.0.0-pre-release-1.0.9 +Version: 1.2.2 Build-Depends: azure-uamqp-c, azure-umqtt-c, azure-c-shared-utility, parson 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 e4f0d8758..a1e864ab2 100644 --- a/ports/azure-iot-sdk-c/portfile.cmake +++ b/ports/azure-iot-sdk-c/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-iot-sdk-c - REF 1.0.0-pre-release-1.0.9 - SHA512 972b5da73399805963031dfacc436665c1a7aaecf4a0035af369d9cf184cb4e7be608b4ca5768902dcfb04f18324c399d095f6543ff3d1da835c40da6e18934e + REF 1.2.2 + SHA512 1542f8347e5efc3104eacf1696b84739299bedb4f50dce3869b3a53072b5c016aadf34223658c18fe28e87eab775a0687b5bf18b5629a7a87b8709b123b3599a HEAD_REF master ) diff --git a/ports/azure-uamqp-c/CONTROL b/ports/azure-uamqp-c/CONTROL index 03b4a2402..832675f10 100644 --- a/ports/azure-uamqp-c/CONTROL +++ b/ports/azure-uamqp-c/CONTROL @@ -1,4 +1,4 @@ Source: azure-uamqp-c -Version: 1.0.0-pre-release-1.0.9 +Version: 1.2.2 Build-Depends: azure-c-shared-utility Description: AMQP library for C diff --git a/ports/azure-uamqp-c/portfile.cmake b/ports/azure-uamqp-c/portfile.cmake index a4407963c..e912c30fd 100644 --- a/ports/azure-uamqp-c/portfile.cmake +++ b/ports/azure-uamqp-c/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-uamqp-c - REF 1.0.0-pre-release-1.0.9 - SHA512 8c7142e0f28779847501941effc8baa0d3411e76bec00a3af0a32f5e25c0ded200d1345fcea58d922d7b0e2b736bc2a57ecaaac23d4de7f97c75a22793cd3750 + REF 1.2.2 + SHA512 66d4169ecfa1f0bc37c1b61de34908703d1f2d49d5b6edf5aa0c208795117b614a3c0afbba95df3ffc5364f4fd45debe2c95ac7a5be86fbd42d997b4db2aaf9c HEAD_REF master ) diff --git a/ports/azure-umqtt-c/CONTROL b/ports/azure-umqtt-c/CONTROL index 79bd87b79..d8aff61a8 100644 --- a/ports/azure-umqtt-c/CONTROL +++ b/ports/azure-umqtt-c/CONTROL @@ -1,4 +1,4 @@ Source: azure-umqtt-c -Version: 1.0.0-pre-release-1.0.9 +Version: 1.1.2 Build-Depends: azure-c-shared-utility Description: General purpose library for communication over the mqtt protocol diff --git a/ports/azure-umqtt-c/portfile.cmake b/ports/azure-umqtt-c/portfile.cmake index 9a9002166..b66ab4f2e 100644 --- a/ports/azure-umqtt-c/portfile.cmake +++ b/ports/azure-umqtt-c/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-umqtt-c - REF 1.0.0-pre-release-1.0.9 - SHA512 8cabeb431e1b8db64551c0374e80157d9db39011f38db8d3a3dfb77ddf3d6ffed4d6ee0ab697a0af3ce93571fc8a83bb2f3efa52387afe301583151e75f55658 + REF 1.1.2 + SHA512 e99b1292d6acdefef43b13cb2ad5b5972ed9e65fb3b2b3eacf06486e88f65fdb1e119fd0cf7dadddb1b1dffaef1aa30edda68fa5dc8aa2b22bcdad2d56e1de63 HEAD_REF master ) diff --git a/ports/breakpad/CONTROL b/ports/breakpad/CONTROL index 76e76668b..80789a41d 100644 --- a/ports/breakpad/CONTROL +++ b/ports/breakpad/CONTROL @@ -1,4 +1,4 @@ Source: breakpad -Version: 2018-03-27 +Version: 2018-04-05 Build-Depends: libdisasm Description: a set of client and server components which implement a crash-reporting system. diff --git a/ports/breakpad/portfile.cmake b/ports/breakpad/portfile.cmake index 29cf87498..5030bb936 100644 --- a/ports/breakpad/portfile.cmake +++ b/ports/breakpad/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/breakpad - REF e93f852a3c316ad767381d5e5bc839eba5c6225b - SHA512 8139472f4f9ce01770cf2922a52cc63fa009cfff93db893d297f61a1b44198b10bba73c92977e84c18a90ef7e71f0911e4fe9d27e8978fc38f231e499e23fc4d + REF adcc90ddb8c9ebc13a4312116ad92d8628b691c3 + SHA512 f6dbdad54dcd778a2ece7de28b60b95c2c276d386f672ab5990c6de41f17fa526f6d1092e38163647ed2feed07c91826ec3f4c21a219ca5f5fac203a7a21eeec HEAD_REF master ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 3e7d58c9a..b66823aa0 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-04-02 +Version: 2018-04-05 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 99a72304f..5423bfdd8 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF 07d75cd0e833286ce9e301ea83229f3e283c6191 - SHA512 8cf5cb919c12e719d70f2ea71c84835f09f2962095eeb56bb27ef3cd22ad4ea032dfbf9704f9c7393de0a969d3ae0609dafeb619b6c28dca598c8f34a3810b4d + REF db5bb66d0697572eacaf0c2aa3b8e7ac2a0c4e54 + SHA512 afc82f79073ace4d567a9db4ee8991c013d12b2939930e12fe5adf0f7d398b87bce127689f3ca9b1c234cc1321ed3f6bee8335590958616a03af9de58e12c24b HEAD_REF master ) diff --git a/ports/gdcm2/CONTROL b/ports/gdcm2/CONTROL index 6268c788f..45900dbab 100644 --- a/ports/gdcm2/CONTROL +++ b/ports/gdcm2/CONTROL @@ -1,4 +1,4 @@ Source: gdcm2 -Version: 2.8.5 +Version: 2.8.6 Description: Grassroots DICOM library Build-Depends: zlib, expat diff --git a/ports/gdcm2/portfile.cmake b/ports/gdcm2/portfile.cmake index 7e8c89611..65fa7a6e1 100644 --- a/ports/gdcm2/portfile.cmake +++ b/ports/gdcm2/portfile.cmake @@ -14,8 +14,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO malaterre/GDCM - REF v2.8.5 - SHA512 644a7ad04746ffb36b7923796b967cc11fd3b71baede7722093d5785eaf869280c67a968f6b32aeb43cc7c88927fba78459e4846e058996a1634311311745510 + REF v2.8.6 + SHA512 c04c131afae6a326978d82ea7c6f42eaa5d8e0f9d9dc3b6ad531a2d6ef7261e603cef32f364609ae99ff33f144373fe7bdd62056e535b6d487b0a4b13919062e ) vcpkg_apply_patches( diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 707c8cb8b..088d9336e 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.10.0 +Version: 1.10.1 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index abab22925..f68f67e64 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO grpc/grpc - REF v1.10.0 - SHA512 52a3e2710fd51b92fb6345cddb9fd64a9b826bcb85dba86075b5e8465abf6dbc26a9245c9f79dd68b0c11a4fa3b983513091000991b61d77761b7debcdac3703 + REF v1.10.1 + SHA512 2221d902c60eada6dd1547a63d26bd3b30cb6710247b5e48523bacde498a3691cc177f1dbe9db8a007b8ae341a5b0c8ec999539e26a9bcff480a8d0b02140997 HEAD_REF master ) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index 51aaf9ac2..dff07255c 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-04-02 +Version: 2018-04-05 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index 1e820cc07..9ab405ed0 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF 60bd95c926f73b143ec91e66b2fe315ad2a316e1 - SHA512 45cf7c5cab105241aec6c2a56a34abf9701eded52bf06d3092e0079949757a6cbb0d684b45952a054451384cd07a77b1763526470ec84835da3d514c614c65ba + REF d374953d274131f9f295e5fdada9b9f83e208072 + SHA512 bc7d6f4d8ec8993450f415560a5f3b603f310416f54ff1f58b51554e9de7c1d8e8ed7552abfb3e51a2e711863e2e3b75169a3fd2ae7f4f79ae429797858a9faf HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 6e3f6a4c5..852281924 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,5 +1,5 @@ Source: rocksdb -Version: 5.11.3-3 +Version: 5.12.2 Description: A library that provides an embeddable, persistent key-value store for fast storage Default-Features: zlib diff --git a/ports/rocksdb/pass-major-version.patch b/ports/rocksdb/pass-major-version.patch new file mode 100644 index 000000000..1cc3f2d13 --- /dev/null +++ b/ports/rocksdb/pass-major-version.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d6bfbf2..ea6a884 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -132,6 +132,7 @@ endif() + + string(REGEX REPLACE "[^0-9a-f]+" "" GIT_SHA "${GIT_SHA}") + ++if(NOT DEFINED ROCKSDB_VERSION OR NOT DEFINED ROCKSDB_VERSION_MAJOR) + set(SH_CMD "sh") + execute_process(COMMAND + ${SH_CMD} -c "build_tools/version.sh full" +@@ -145,6 +146,7 @@ execute_process(COMMAND + OUTPUT_VARIABLE ROCKSDB_VERSION_MAJOR + ) + string(STRIP "${ROCKSDB_VERSION_MAJOR}" ROCKSDB_VERSION_MAJOR) ++endif() + + option(WITH_MD_LIBRARY "build with MD" ON) + if(WIN32 AND MSVC) diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 169573cf3..92ca0c2fa 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 rocksdb-5.11.3 - SHA512 a4c771e36056ee0da497202b25092d89799db43573a442568b4392b8478ac20320dabf4c904e93bd0641a32f249e9c8dcad0d67577acaee6902cd4d30f29ce57 + REF v5.12.2 + SHA512 53e81e87e84f0500cd09d754c39e86265a16a52d4b84f9044f8d9759c224881eb7ef4bf89f9b01fdff25f123ed4dfa7b5cb272d2311f27b322c15fe2e893bbe3 HEAD_REF master ) @@ -14,6 +14,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/0002-disable-gtest.patch" "${CMAKE_CURRENT_LIST_DIR}/0003-only-build-one-flavor.patch" "${CMAKE_CURRENT_LIST_DIR}/use-find-package.patch" + "${CMAKE_CURRENT_LIST_DIR}/pass-major-version.patch" ) file(REMOVE "${SOURCE_PATH}/cmake/modules/Findzlib.cmake") @@ -48,7 +49,8 @@ if("zlib" IN_LIST FEATURES) endif() get_filename_component(ROCKSDB_VERSION "${SOURCE_PATH}" NAME) -string(REPLACE "rocksdb-rocksdb-" "" ROCKSDB_VERSION "${ROCKSDB_VERSION}") +string(REPLACE "rocksdb-" "" ROCKSDB_VERSION "${ROCKSDB_VERSION}") +string(REGEX REPLACE "^([0-9]+)." "\\1" ROCKSDB_MAJOR_VERSION "${ROCKSDB_VERSION}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -67,7 +69,7 @@ vcpkg_configure_cmake( -DROCKSDB_DISABLE_INSTALL_SHARED_LIB=${ROCKSDB_DISABLE_INSTALL_SHARED_LIB} -DROCKSDB_DISABLE_INSTALL_STATIC_LIB=${ROCKSDB_DISABLE_INSTALL_STATIC_LIB} -DROCKSDB_VERSION=${ROCKSDB_VERSION} - -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} + -DROCKSDB_VERSION_MAJOR=${ROCKSDB_MAJOR_VERSION} -DCMAKE_DISABLE_FIND_PACKAGE_TBB=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_NUMA=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_gtest=TRUE diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index a6f837d0a..a26371439 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-03-29 +Version: 2018-04-05 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index cca3be0a3..7392e5843 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF 3300d39fef567adf90f59d07223e55ca44ed4f98 - SHA512 0e696a94ab71ca29c61075d917a26b01057f657537c5516cb3bf2fd046d5c61f7e74d83a7c2eba2d4d923f3bd8b125f61c6732d09ade59b0995f42eb3df22a17 + REF c49c44a14567719e927c942aec7d8e4971aad5bf + SHA512 17f5cb5d1c60fa832d32f65fce2a1fd00b108d5c1594240543bb6f889c8ddae6dbe83215b63ff15927921bcc9352348340e036c5118278867498216f63e9fef4 HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index da43bce3d..eec5fd732 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-04-02 +Version: 2018-04-05 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 80a6f036d..4002a0cfd 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 3c0edfa875218bd83f6b79a7823380e2adc08ae6 - SHA512 8499ae6adf0db725f847f25f1c0b0ccf0abd8b142dd410a8a3c544dfd2fae8bdf1dec86e74eee3b4f78288f53ed5a162214d963513456d9b3be794e157c00a38 + REF a0cf38ed312a5342eb05574719485b725fa52eee + SHA512 518142e3b98ae79e622b3b5989c7754e4d6e32e1ffd1b39915932afdb40c0e1fa6ef1d182de6dfebcfc69a20eae9635f6ae8e8532b3a7e8acb5e7c3ee980c2b7 HEAD_REF master ) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index a7f21a9b8..b333f7440 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-03-29 +Version: 2018-04-05 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 3220d8f3a..8019053f9 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF 2aa54d662048f420ac0dbd5d9b46559963a675f2 - SHA512 48abea6fdac733ff7c2da7b3f45f129dc904d5d5a59f41f4f47419f5c2483a5227aec1a605d76422071045ea82c76ceb55a521bb80fe5d7f77d5d01c43acb3e6 + REF bb4fb32925c6465fd0f8e8cc89e5347bc79bc4bf + SHA512 73101b68d93fdf1eca1f83373fe4c946865978d32ca11692e9015a63af8d42ff2d2ff93c88c812f75c2d80596c986df59e62f8de3dc1a016ab24f91f518c24eb HEAD_REF master ) @@ -45,6 +45,8 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") else() 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") + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() file(WRITE ${CURRENT_PACKAGES_DIR}/share/zeromq/ZeroMQConfig.cmake "${_contents}") -- cgit v1.2.3 From 997fddb3c1a3acb7579e1fe0ab82436b227a0dc4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Apr 2018 18:46:09 -0700 Subject: [aws-sdk-cpp] Fix linux --- ports/aws-sdk-cpp/CONTROL | 6 +++++- ports/aws-sdk-cpp/CONTROL.in | 3 ++- ports/aws-sdk-cpp/compute_build_only.cmake | 3 +++ ports/aws-sdk-cpp/portfile.cmake | 7 +++++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index b6a7785f2..2d6642faa 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,6 +1,7 @@ Source: aws-sdk-cpp -Version: 1.4.30 +Version: 1.4.30-1 Description: AWS SDK for C++ +Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows) Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs # Automatically generated by generateFeatures.ps1 @@ -103,6 +104,9 @@ Description: C++ SDK for the AWS comprehend service Feature: config Description: C++ SDK for the AWS config service +Feature: connect +Description: C++ SDK for the AWS connect service + Feature: cur Description: C++ SDK for the AWS cur service diff --git a/ports/aws-sdk-cpp/CONTROL.in b/ports/aws-sdk-cpp/CONTROL.in index 5cf05fdff..184374de6 100644 --- a/ports/aws-sdk-cpp/CONTROL.in +++ b/ports/aws-sdk-cpp/CONTROL.in @@ -1,4 +1,5 @@ Source: aws-sdk-cpp -Version: 1.4.21 +Version: 1.4.30-1 Description: AWS SDK for C++ +Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows) Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs diff --git a/ports/aws-sdk-cpp/compute_build_only.cmake b/ports/aws-sdk-cpp/compute_build_only.cmake index a50ed2128..f4a139153 100644 --- a/ports/aws-sdk-cpp/compute_build_only.cmake +++ b/ports/aws-sdk-cpp/compute_build_only.cmake @@ -98,6 +98,9 @@ endif() if("config" IN_LIST FEATURES) list(APPEND BUILD_ONLY config) endif() +if("connect" IN_LIST FEATURES) + list(APPEND BUILD_ONLY connect) +endif() if("cur" IN_LIST FEATURES) list(APPEND BUILD_ONLY cur) endif() diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index ac63ac850..6263b2b45 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -14,8 +14,11 @@ set(BUILD_ONLY core) include(${CMAKE_CURRENT_LIST_DIR}/compute_build_only.cmake) -# This handles escaping the list -string(REPLACE ";" "\\\\\\;" BUILD_ONLY "${BUILD_ONLY}") +if(CMAKE_HOST_WIN32) + string(REPLACE ";" "\\\\\\;" BUILD_ONLY "${BUILD_ONLY}") +else() + string(REPLACE ";" "\\\\\\\\\\\;" BUILD_ONLY "${BUILD_ONLY}") +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 31377dee20dad9b95357934732996e2448f2eaf5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 3 Apr 2018 21:05:31 -0700 Subject: Use 7z for extracting. Extract tools in downloads/tools --- scripts/VcpkgPowershellUtils.ps1 | 58 +++++++--------------------------------- scripts/fetchTool.ps1 | 22 ++++++++++++--- scripts/vcpkgTools.xml | 20 +++++++++----- toolsrc/src/vcpkg/vcpkgpaths.cpp | 8 +----- 4 files changed, 42 insertions(+), 66 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 92e0f21d0..988c6dbf0 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -1,8 +1,3 @@ -function vcpkgHasModule([Parameter(Mandatory=$true)][string]$moduleName) -{ - return [bool](Get-Module -ListAvailable -Name $moduleName) -} - function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) { if ($object -eq $null) @@ -160,54 +155,21 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, Move-Item -Path $downloadPartPath -Destination $downloadPath } -function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$archivePath, - [Parameter(Mandatory=$true)][string]$destinationDir, - [Parameter(Mandatory=$true)][string]$outFilename) +function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$sevenZipExe, + [Parameter(Mandatory=$true)][string]$archivePath, + [Parameter(Mandatory=$true)][string]$destinationDir) { - vcpkgCreateDirectoryIfNotExists $destinationDir - $output = "$destinationDir\$outFilename" - vcpkgRemoveItem $output - $destinationPartial = "$destinationDir\partially-extracted" - + vcpkgRemoveItem $destinationDir + $destinationPartial = "$destinationDir.partial" vcpkgRemoveItem $destinationPartial vcpkgCreateDirectoryIfNotExists $destinationPartial - - if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') - { - Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") - Microsoft.PowerShell.Archive\Expand-Archive -path $archivePath -destinationpath $destinationPartial - } - elseif (vcpkgHasCommand -commandName 'Pscx\Expand-Archive') - { - Write-Verbose("Extracting with Pscx\Expand-Archive") - Pscx\Expand-Archive -path $archivePath -OutputPath $destinationPartial - } - else - { - Write-Verbose("Extracting via shell") - $shell = new-object -com shell.application - $zip = $shell.NameSpace($(Get-Item $archivePath).fullname) - foreach($item in $zip.items()) - { - # Piping to Out-Null is used to block until finished - $shell.Namespace($destinationPartial).copyhere($item) | Out-Null - } - } - - $items = @(Get-ChildItem "$destinationPartial") - $itemCount = $items.Count - - if ($itemCount -eq 1) - { - $item = $items | Select-Object -first 1 - Write-Host "$item" - Move-Item -Path "$destinationPartial\$item" -Destination $output - vcpkgRemoveItem $destinationPartial - } - else + $ec = vcpkgInvokeCommand "$sevenZipExe" "x `"$archivePath`" -o`"$destinationPartial`" -y" + if ($ec -ne 0) { - Move-Item -Path "$destinationPartial" -Destination $output + Write-Host "Could not extract $archivePath" + throw } + Rename-Item -Path "$destinationPartial" -NewName $destinationDir } function vcpkgInvokeCommand() diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 26eedac3b..315983841 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -25,7 +25,8 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) throw "Unkown tool $tool" } - $exePath = "$downloadsDir\$($toolData.exeRelativePath)" + $toolPath="$downloadsDir\tools\$tool-$($toolData.requiredVersion)-windows" + $exePath = "$toolPath\$($toolData.exeRelativePath)" if (Test-Path $exePath) { @@ -39,7 +40,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) } else { - $downloadPath = "$downloadsDir\$($toolData.exeRelativePath)" + $downloadPath = "$toolPath\$($toolData.exeRelativePath)" } [String]$url = $toolData.url @@ -56,9 +57,22 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) if ($isArchive) { - $outFilename = (Get-ChildItem $downloadPath).BaseName Write-Host "Extracting $tool..." - vcpkgExtractFile -ArchivePath $downloadPath -DestinationDir $downloadsDir -outFilename $outFilename + if ($tool -eq "7zip") + { + $sevenZipR = fetchToolInternal "7zr" + $ec = vcpkgInvokeCommand "$sevenZipR" "x `"$downloadPath`" -o`"$toolPath`" -y" + if ($ec -ne 0) + { + Write-Host "Could not extract $downloadPath" + throw + } + } + else + { + $sevenZipExe = fetchToolInternal "7zip" + vcpkgExtractFile -sevenZipExe "$sevenZipExe" -ArchivePath $downloadPath -DestinationDir $toolPath + } Write-Host "Extracting $tool... done." } diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 477584c5a..6ef1e4d35 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -23,20 +23,20 @@ 2.16.2 - MinGit-2.16.2-32-bit\cmd\git.exe + cmd\git.exe https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-32-bit.zip 322c727e482aa97522c64a5ac68bdda3780111e8670bcfb532beac8e11ece5da MinGit-2.16.2-32-bit.zip 2.3.2 - vswhere-2.3.2\vswhere.exe + vswhere.exe https://github.com/Microsoft/vswhere/releases/download/2.3.2/vswhere.exe 103f2784c4b2c8e70c7c1c03687abbf22bce052aae30639406e4e13ffa29ee04 4.4.0 - nuget-4.4.0\nuget.exe + nuget.exe https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe 2cf9b118937eef825464e548f0c44f7f64090047746de295d75ac3dcffa3e1f6 @@ -49,10 +49,16 @@ 18.01.0 - 7za920\7za.exe - http://www.7-zip.org/a/7za920.zip - 2a3afe19c180f8373fa02ff00254d5394fec0349f5804e0ad2f6067854ff28ac - 7za920.zip + 7za.exe + https://www.7-zip.org/a/7z1801-extra.7z + 9371df22bcd0e1aff9eaa52aa3292350eecd011f11494e709314ae3f3eb279e2 + 7z1801-extra.7z + + + 18.01.0 + 7zr.exe + https://www.7-zip.org/a/7zr.exe + 2c7a8709260e0295a2a3cfd5a8ad0459f37490ed1794ea68bf85a6fab362553b 1.8.2 diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index bda2c4174..f2086257e 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -115,15 +115,9 @@ namespace vcpkg tool, required_version_as_string); -// Legacy support. Change introduced in vcpkg v0.0.107. -#if !defined(_WIN32) - const std::string tool_dir_name = Strings::format("%s-%s", tool, required_version_as_string); + const std::string tool_dir_name = Strings::format("%s-%s-%s", tool, required_version_as_string, OS_STRING); const fs::path tool_dir_path = paths.downloads / "tools" / tool_dir_name; const fs::path exe_path = tool_dir_path / exe_relative_path; -#else - const fs::path tool_dir_path; - const fs::path exe_path = paths.downloads / exe_relative_path; -#endif return ToolData{*required_version.get(), exe_path, url, -- cgit v1.2.3 From 54c68da907e4881d29e8017e085e6786e1c34ace Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 3 Apr 2018 22:15:17 -0700 Subject: Use aria2 to do downloads (other than aria2 itself, 7za and 7zr) --- scripts/VcpkgPowershellUtils.ps1 | 26 ++++++++++++++++++++++++++ scripts/fetchTool.ps1 | 13 ++++++++++++- scripts/vcpkgTools.xml | 7 +++++++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 988c6dbf0..7082ca747 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -155,6 +155,32 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, Move-Item -Path $downloadPartPath -Destination $downloadPath } +function vcpkgDownloadFileWithAria2( [Parameter(Mandatory=$true)][string]$aria2exe, + [Parameter(Mandatory=$true)][string]$url, + [Parameter(Mandatory=$true)][string]$downloadPath) +{ + if (Test-Path $downloadPath) + { + return + } + + vcpkgCreateParentDirectoryIfNotExists $downloadPath + $downloadPartPath = "$downloadPath.part" + vcpkgRemoveItem $downloadPartPath + + $parentDir = split-path -parent $downloadPath + $filename = split-path -leaf $downloadPath + + $ec = vcpkgInvokeCommand "$aria2exe" "--dir `"$parentDir`" --out `"$filename.part`" $url" + if ($ec -ne 0) + { + Write-Host "Could not download $url" + throw + } + + Move-Item -Path $downloadPartPath -Destination $downloadPath +} + function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$sevenZipExe, [Parameter(Mandatory=$true)][string]$archivePath, [Parameter(Mandatory=$true)][string]$destinationDir) diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 315983841..05335c724 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -47,7 +47,18 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) if (!(Test-Path $downloadPath)) { Write-Host "Downloading $tool..." - vcpkgDownloadFile $url $downloadPath + + # aria2 needs 7zip & 7zr to extract. So, we need to download those trough powershell + if ($tool -eq "aria2" -or $tool -eq "7zip" -or $tool -eq "7zr") + { + vcpkgDownloadFile $url $downloadPath + } + else + { + $aria2exe = fetchToolInternal "aria2" + vcpkgDownloadFileWithAria2 $aria2exe $url $downloadPath + } + Write-Host "Downloading $tool... done." } diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 6ef1e4d35..fe1cc12a9 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -60,6 +60,13 @@ https://www.7-zip.org/a/7zr.exe 2c7a8709260e0295a2a3cfd5a8ad0459f37490ed1794ea68bf85a6fab362553b + + 18.01.0 + aria2-1.33.1-win-32bit-build1\aria2c.exe + https://github.com/aria2/aria2/releases/download/release-1.33.1/aria2-1.33.1-win-32bit-build1.zip + 04bf07c0449c703db17fbcd586365aebba00201ca513ca4808b543f1f9208f1f + aria2-1.33.1-win-32bit-build1.zip + 1.8.2 ninja -- cgit v1.2.3 From 0c0f68939e0d8367e55793f80f0000f2a43a812a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 01:45:45 -0700 Subject: Introduce "vcpkg fetch" --- toolsrc/include/vcpkg/commands.h | 7 + toolsrc/include/vcpkg/vcpkgpaths.h | 32 +- toolsrc/src/vcpkg/build.cpp | 15 +- toolsrc/src/vcpkg/commands.cpp | 9 +- toolsrc/src/vcpkg/commands.create.cpp | 2 +- toolsrc/src/vcpkg/commands.exportifw.cpp | 6 +- toolsrc/src/vcpkg/commands.fetch.cpp | 656 ++++++++++++++++++++++++++++++ toolsrc/src/vcpkg/commands.integrate.cpp | 2 +- toolsrc/src/vcpkg/commands.portsdiff.cpp | 4 +- toolsrc/src/vcpkg/export.cpp | 4 +- toolsrc/src/vcpkg/vcpkgpaths.cpp | 654 +---------------------------- toolsrc/vcpkglib/vcpkglib.vcxproj | 1 + toolsrc/vcpkglib/vcpkglib.vcxproj.filters | 3 + 13 files changed, 714 insertions(+), 681 deletions(-) create mode 100644 toolsrc/src/vcpkg/commands.fetch.cpp diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 7369b8206..f6f1de626 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -135,6 +135,13 @@ namespace vcpkg::Commands std::string get_file_hash(const VcpkgPaths& paths, fs::path const& path, std::string const& hash_type); } + namespace Fetch + { + std::vector find_toolset_instances(const VcpkgPaths& paths); + fs::path get_tool_path(const VcpkgPaths& paths, const std::string& tool); + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); + } + template struct PackageNameAndFunction { diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index b3f24fb89..090414de3 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -7,8 +7,22 @@ #include #include +#include + namespace vcpkg { + namespace Tools + { + static const std::string SEVEN_ZIP = "7zip"; + static const std::string CMAKE = "cmake"; + static const std::string GIT = "git"; + static const std::string NINJA = "ninja"; + static const std::string NUGET = "nuget"; + static const std::string IFW_INSTALLER_BASE = "ifw_installerbase"; + static const std::string IFW_BINARYCREATOR = "ifw_binarycreator"; + static const std::string IFW_REPOGEN = "ifw_repogen"; + } + struct ToolsetArchOption { CStringView name; @@ -63,14 +77,7 @@ namespace vcpkg fs::path ports_cmake; - const fs::path& get_7za_exe() const; - const fs::path& get_cmake_exe() const; - const fs::path& get_git_exe() const; - const fs::path& get_ninja_exe() const; - const fs::path& get_nuget_exe() const; - const fs::path& get_ifw_installerbase_exe() const; - const fs::path& get_ifw_binarycreator_exe() const; - const fs::path& get_ifw_repogen_exe() const; + const fs::path& get_tool_exe(const std::string& tool) const; /// Retrieve a toolset matching a VS version /// @@ -82,14 +89,7 @@ namespace vcpkg private: Lazy> available_triplets; - Lazy _7za_exe; - Lazy cmake_exe; - Lazy git_exe; - Lazy ninja_exe; - Lazy nuget_exe; - Lazy ifw_installerbase_exe; - Lazy ifw_binarycreator_exe; - Lazy ifw_repogen_exe; + mutable std::map tool_paths; Lazy> toolsets; Lazy> toolsets_vs2013; diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 79a55bd36..86d171534 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -341,8 +341,8 @@ namespace vcpkg::Build vcpkg::Util::unused(paths.get_ninja_exe()); #endif - const fs::path& cmake_exe_path = paths.get_cmake_exe(); - const fs::path& git_exe_path = paths.get_git_exe(); + const fs::path& cmake_exe_path = paths.get_tool_exe(Tools::CMAKE); + const fs::path& git_exe_path = paths.get_tool_exe(Tools::GIT); std::string all_features; for (auto& feature : config.scf.feature_paragraphs) @@ -361,9 +361,8 @@ namespace vcpkg::Build {"TARGET_TRIPLET", spec.triplet().canonical_name()}, {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, {"VCPKG_USE_HEAD_VERSION", - Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, - {"_VCPKG_NO_DOWNLOADS", - !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, + Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, + {"_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)}, {"GIT", git_exe_path}, {"FEATURES", Strings::join(";", config.feature_list)}, @@ -519,7 +518,7 @@ namespace vcpkg::Build Checks::check_exit(VCPKG_LINE_INFO, files.empty(), "unable to clear path: %s", pkg_path.u8string()); #if defined(_WIN32) - auto&& _7za = paths.get_7za_exe(); + auto&& _7za = paths.get_tool_exe(Tools::SEVEN_ZIP); System::cmd_execute_clean(Strings::format( R"("%s" x "%s" -o"%s" -y >nul)", _7za.u8string(), archive_path.u8string(), pkg_path.u8string())); @@ -539,7 +538,7 @@ namespace vcpkg::Build Checks::check_exit( VCPKG_LINE_INFO, !fs.exists(tmp_archive_path), "Could not remove file: %s", tmp_archive_path.u8string()); #if defined(_WIN32) - auto&& _7za = paths.get_7za_exe(); + auto&& _7za = paths.get_tool_exe(Tools::SEVEN_ZIP); System::cmd_execute_clean(Strings::format( R"("%s" a "%s" "%s\*" >nul)", @@ -771,7 +770,7 @@ namespace vcpkg::Build { static constexpr CStringView FLAG_GUID = "c35112b6-d1ba-415b-aa5d-81de856ef8eb"; - const fs::path& cmake_exe_path = paths.get_cmake_exe(); + 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"); diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index d9c0e54cd..e98ff711a 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -43,16 +43,15 @@ namespace vcpkg::Commands {"portsdiff", &PortsDiff::perform_and_exit}, {"autocomplete", &Autocomplete::perform_and_exit}, {"hash", &Hash::perform_and_exit}, - }; + {"fetch", &Fetch::perform_and_exit}, + }; return t; } Span> get_available_commands_type_c() { - static std::vector> t = { - {"version", &Version::perform_and_exit}, - {"contact", &Contact::perform_and_exit} - }; + static std::vector> t = {{"version", &Version::perform_and_exit}, + {"contact", &Contact::perform_and_exit}}; return t; } } diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index 25c34cf09..60769c9ef 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -22,7 +22,7 @@ namespace vcpkg::Commands::Create const std::string port_name = args.command_arguments.at(0); const std::string url = args.command_arguments.at(1); - const fs::path& cmake_exe = paths.get_cmake_exe(); + const fs::path& cmake_exe = paths.get_tool_exe(Tools::CMAKE); std::vector cmake_args{{"CMD", "CREATE"}, {"PORT", port_name}, {"URL", url}}; diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp index 58d9aa0be..ae106196a 100644 --- a/toolsrc/src/vcpkg/commands.exportifw.cpp +++ b/toolsrc/src/vcpkg/commands.exportifw.cpp @@ -291,7 +291,7 @@ namespace vcpkg::Export::IFW std::error_code ec; Files::Filesystem& fs = paths.get_filesystem(); - const fs::path& installerbase_exe = paths.get_ifw_installerbase_exe(); + const fs::path& installerbase_exe = paths.get_tool_exe(Tools::IFW_INSTALLER_BASE); fs::path tempmaintenancetool = ifw_packages_dir_path / "maintenance" / "data" / "tempmaintenancetool.exe"; fs.create_directories(tempmaintenancetool.parent_path(), ec); Checks::check_exit(VCPKG_LINE_INFO, @@ -335,7 +335,7 @@ namespace vcpkg::Export::IFW void do_repository(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) { - const fs::path& repogen_exe = paths.get_ifw_repogen_exe(); + const fs::path& repogen_exe = paths.get_tool_exe(Tools::IFW_REPOGEN); const fs::path packages_dir = get_packages_dir_path(export_id, ifw_options, paths); const fs::path repository_dir = get_repository_dir_path(export_id, ifw_options, paths); @@ -361,7 +361,7 @@ namespace vcpkg::Export::IFW void do_installer(const std::string& export_id, const Options& ifw_options, const VcpkgPaths& paths) { - const fs::path& binarycreator_exe = paths.get_ifw_binarycreator_exe(); + const fs::path& binarycreator_exe = paths.get_tool_exe(Tools::IFW_BINARYCREATOR); const fs::path config_file = get_config_file_path(export_id, ifw_options, paths); const fs::path packages_dir = get_packages_dir_path(export_id, ifw_options, paths); const fs::path repository_dir = get_repository_dir_path(export_id, ifw_options, paths); diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp new file mode 100644 index 000000000..95c47e2db --- /dev/null +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -0,0 +1,656 @@ +#include "pch.h" + +#include +#include +#include +#include +#include +#include + +namespace vcpkg::Commands::Fetch +{ + static constexpr CStringView V_120 = "v120"; + static constexpr CStringView V_140 = "v140"; + static constexpr CStringView V_141 = "v141"; + + struct ToolData + { + std::array required_version; + fs::path exe_path; + std::string url; + fs::path downloaded_path; + fs::path tool_dir_path; + }; + + static Optional> parse_version_string(const std::string& version_as_string) + { + static const std::regex RE(R"###((\d+)\.(\d+)\.(\d+))###"); + + std::match_results match; + const auto found = std::regex_search(version_as_string, match, RE); + if (!found) + { + return {}; + } + + const int d1 = atoi(match[1].str().c_str()); + const int d2 = atoi(match[2].str().c_str()); + const int d3 = atoi(match[3].str().c_str()); + const std::array result = {d1, d2, d3}; + return result; + } + + static ToolData parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool) + { +#if defined(_WIN32) + static constexpr StringLiteral OS_STRING = "windows"; +#elif defined(__APPLE__) + static constexpr StringLiteral OS_STRING = "osx"; +#else // assume linux + static constexpr StringLiteral OS_STRING = "linux"; +#endif + + static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; + + const auto maybe_get_string_inside_tags = [](const std::string& input, + const std::regex& regex) -> Optional { + std::smatch match; + const bool has_match = std::regex_search(input.cbegin(), input.cend(), match, regex); + if (!has_match) return nullopt; + return match[1]; + }; + + const auto get_string_inside_tags = + [](const std::string& input, const std::regex& regex, const std::string& tag_name) -> std::string { + std::smatch match; + const bool has_match = std::regex_search(input.cbegin(), input.cend(), match, regex); + Checks::check_exit( + VCPKG_LINE_INFO, has_match, "Could not find tag <%s> in %s", tag_name, XML_PATH.generic_string()); + + return match[1]; + }; + + static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO); + static const std::regex VERSION_REGEX{R"###(([\s\S]*?))###"}; + static const std::regex EXE_RELATIVE_PATH_REGEX{ + Strings::format(R"###(([\s\S]*?))###")}; + static const std::regex ARCHIVE_RELATIVE_PATH_REGEX{ + Strings::format(R"###(([\s\S]*?))###")}; + static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###")}; + + std::regex tool_regex{ + Strings::format(R"###(([\s\S]*?)<\/tool>)###", tool, OS_STRING)}; + + std::smatch match_tool; + bool has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); + if (!has_match_tool && OS_STRING == "windows") // Legacy support. Change introduced in vcpkg v0.0.107. + { + tool_regex = Strings::format(R"###(([\s\S]*?)<\/tool>)###", tool); + has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); + } + Checks::check_exit(VCPKG_LINE_INFO, + has_match_tool, + "Could not find entry for tool [%s] in %s", + tool, + XML_PATH.generic_string()); + + const std::string tool_data_as_string = get_string_inside_tags(XML, tool_regex, tool); + + const std::string required_version_as_string = + get_string_inside_tags(tool_data_as_string, VERSION_REGEX, "requiredVersion"); + + const std::string url = get_string_inside_tags(tool_data_as_string, URL_REGEX, "url"); + + const std::string exe_relative_path = + get_string_inside_tags(tool_data_as_string, EXE_RELATIVE_PATH_REGEX, "exeRelativePath"); + + auto archive_relative_path = maybe_get_string_inside_tags(tool_data_as_string, ARCHIVE_RELATIVE_PATH_REGEX); + + const Optional> required_version = parse_version_string(required_version_as_string); + Checks::check_exit(VCPKG_LINE_INFO, + required_version.has_value(), + "Could not parse version for tool %s. Version string was: %s", + tool, + required_version_as_string); + + const std::string tool_dir_name = Strings::format("%s-%s-%s", tool, required_version_as_string, OS_STRING); + const fs::path tool_dir_path = paths.downloads / "tools" / tool_dir_name; + const fs::path exe_path = tool_dir_path / exe_relative_path; + return ToolData{*required_version.get(), + exe_path, + url, + paths.downloads / archive_relative_path.value_or(exe_relative_path), + tool_dir_path}; + } + + static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd, + const std::array& expected_version) + { + const auto rc = System::cmd_execute_and_capture_output(Strings::format(R"(%s)", version_cmd)); + if (rc.exit_code != 0) + { + return false; + } + + const Optional> v = parse_version_string(rc.output); + if (!v.has_value()) + { + return false; + } + + const std::array actual_version = *v.get(); + return (actual_version[0] > expected_version[0] || + (actual_version[0] == expected_version[0] && actual_version[1] > expected_version[1]) || + (actual_version[0] == expected_version[0] && actual_version[1] == expected_version[1] && + actual_version[2] >= expected_version[2])); + } + + static Optional find_if_has_equal_or_greater_version(const std::vector& candidate_paths, + const std::string& version_check_arguments, + const std::array& expected_version) + { + auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { + const std::string cmd = Strings::format(R"("%s" %s)", p.u8string(), version_check_arguments); + return exists_and_has_equal_or_greater_version(cmd, expected_version); + }); + + if (it != candidate_paths.cend()) + { + return std::move(*it); + } + + return nullopt; + } + + static std::vector keep_data_lines(const std::string& data_blob) + { + static const std::regex DATA_LINE_REGEX(R"(::(.+?)(?=::))"); + + std::vector data_lines; + + const std::sregex_iterator it(data_blob.cbegin(), data_blob.cend(), DATA_LINE_REGEX); + const std::sregex_iterator end; + for (std::sregex_iterator i = it; i != end; ++i) + { + const std::smatch match = *i; + data_lines.push_back(match[1].str()); + } + + return data_lines; + } + + static void extract_archive(const VcpkgPaths& paths, const fs::path& archive, const fs::path& to_path) + { + Files::Filesystem& fs = paths.get_filesystem(); + const fs::path to_path_partial = to_path.u8string() + ".partial"; + + std::error_code ec; + fs.remove_all(to_path_partial, ec); + fs.create_directories(to_path_partial, ec); + + const auto ext = archive.extension(); + if (ext == ".gz" && ext.extension() != ".tar") + { + const auto code = System::cmd_execute( + Strings::format(R"(cd '%s' && tar xzf '%s')", to_path_partial.u8string(), archive.u8string())); + Checks::check_exit(VCPKG_LINE_INFO, code == 0, "tar failed while extracting %s", archive.u8string()); + } + else if (ext == ".zip") + { + const auto code = System::cmd_execute( + Strings::format(R"(cd '%s' && unzip -qqo '%s')", to_path_partial.u8string(), archive.u8string())); + Checks::check_exit(VCPKG_LINE_INFO, code == 0, "unzip failed while extracting %s", archive.u8string()); + } + else + { + Checks::exit_with_message(VCPKG_LINE_INFO, "Unexpected archive extension: %s", ext.u8string()); + } + + fs.rename(to_path_partial, to_path); + } + + static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) + { + const auto& fs = paths.get_filesystem(); + const fs::path& scripts_folder = paths.scripts; + const std::array& version = tool_data.required_version; + + const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); + System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", + tool_name, + version_as_string, + tool_name, + version_as_string); +#if defined(_WIN32) + const fs::path script = scripts_folder / "fetchtool.ps1"; + const std::string title = Strings::format( + "Fetching %s version %s (No sufficient installed version was found)", tool_name, version_as_string); + const System::PowershellParameter tool_param("tool", tool_name); + const std::string output = System::powershell_execute_and_capture_output(title, script, {tool_param}); + + const std::vector tool_path = keep_data_lines(output); + Checks::check_exit(VCPKG_LINE_INFO, tool_path.size() == 1, "Expected tool path, but got %s", output); + + const fs::path actual_downloaded_path = Strings::trim(std::string{tool_path.at(0)}); + const fs::path& expected_downloaded_path = tool_data.exe_path; + std::error_code ec; + const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + eq && !ec, + "Expected tool downloaded path to be %s, but was %s", + expected_downloaded_path.u8string(), + actual_downloaded_path.u8string()); + return actual_downloaded_path; +#else + if (!fs.exists(tool_data.downloaded_path)) + { + auto code = System::cmd_execute(Strings::format( + R"(curl -L '%s' --create-dirs --output '%s')", tool_data.url, tool_data.downloaded_path)); + Checks::check_exit(VCPKG_LINE_INFO, code == 0, "curl failed while downloading %s", tool_data.url); + } + + System::println("Extracting %s...", tool_name); + extract_archive(paths, tool_data.downloaded_path, tool_data.tool_dir_path); + System::println("Extracting %s... done.", tool_name); + + Checks::check_exit(VCPKG_LINE_INFO, + fs.exists(tool_data.exe_path), + "Expected %s to exist after extracting", + tool_data.exe_path); + + return tool_data.exe_path; +#endif + } + + static fs::path get_cmake_path(const VcpkgPaths& paths) + { + std::vector candidate_paths; +#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "cmake"); + candidate_paths.push_back(TOOL_DATA.exe_path); +#else + static const ToolData TOOL_DATA = ToolData{{3, 5, 1}, ""}; +#endif + static const std::string VERSION_CHECK_ARGUMENTS = "--version"; + + const std::vector from_path = Files::find_from_PATH("cmake"); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + + const auto& program_files = System::get_program_files_platform_bitness(); + if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); + const auto& program_files_32_bit = System::get_program_files_32_bit(); + if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); + + const Optional path = + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); + if (const auto p = path.get()) + { + return *p; + } + + return fetch_tool(paths, "cmake", TOOL_DATA); + } + + static fs::path get_7za_path(const VcpkgPaths& paths) + { +#if defined(_WIN32) + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "7zip"); + if (!paths.get_filesystem().exists(TOOL_DATA.exe_path)) + { + return fetch_tool(paths, "7zip", TOOL_DATA); + } + return TOOL_DATA.exe_path; +#else + Checks::exit_with_message(VCPKG_LINE_INFO, "Cannot download 7zip for non-Windows platforms."); +#endif + } + + static fs::path get_ninja_path(const VcpkgPaths& paths) + { + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "ninja"); + + std::vector candidate_paths; + candidate_paths.push_back(TOOL_DATA.exe_path); + const std::vector from_path = Files::find_from_PATH("ninja"); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + + auto path = find_if_has_equal_or_greater_version(candidate_paths, "--version", TOOL_DATA.required_version); + if (const auto p = path.get()) + { + return *p; + } + + return fetch_tool(paths, "ninja", TOOL_DATA); + } + + static fs::path get_nuget_path(const VcpkgPaths& paths) + { + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "nuget"); + + std::vector candidate_paths; + candidate_paths.push_back(TOOL_DATA.exe_path); + const std::vector from_path = Files::find_from_PATH("nuget"); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + + auto path = find_if_has_equal_or_greater_version(candidate_paths, "", TOOL_DATA.required_version); + if (const auto p = path.get()) + { + return *p; + } + + return fetch_tool(paths, "nuget", TOOL_DATA); + } + + static fs::path get_git_path(const VcpkgPaths& paths) + { +#if defined(_WIN32) + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "git"); +#else + static const ToolData TOOL_DATA = ToolData{{2, 7, 4}, ""}; +#endif + static const std::string VERSION_CHECK_ARGUMENTS = "--version"; + + std::vector candidate_paths; +#if defined(_WIN32) + candidate_paths.push_back(TOOL_DATA.exe_path); +#endif + const std::vector from_path = Files::find_from_PATH("git"); + candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + + const auto& program_files = System::get_program_files_platform_bitness(); + if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); + const auto& program_files_32_bit = System::get_program_files_32_bit(); + if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); + + const Optional path = + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); + if (const auto p = path.get()) + { + return *p; + } + + return fetch_tool(paths, "git", TOOL_DATA); + } + + static fs::path get_ifw_installerbase_path(const VcpkgPaths& paths) + { + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "installerbase"); + + static const std::string VERSION_CHECK_ARGUMENTS = "--framework-version"; + + std::vector candidate_paths; + candidate_paths.push_back(TOOL_DATA.exe_path); + // TODO: Uncomment later + // const std::vector from_path = Files::find_from_PATH("installerbase"); + // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / + // "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe"); + // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / + // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); + + const Optional path = + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); + if (const auto p = path.get()) + { + return *p; + } + + return fetch_tool(paths, "installerbase", TOOL_DATA); + } + + struct VisualStudioInstance + { + fs::path root_path; + std::string version; + std::string release_type; + std::string preference_weight; // Mostly unused, just for verification that order is as intended + + std::string major_version() const { return version.substr(0, 2); } + }; + + static std::vector get_visual_studio_instances(const VcpkgPaths& paths) + { + const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; + const std::string output = + System::powershell_execute_and_capture_output("Detecting Visual Studio instances", script); + + const std::vector instances_as_strings = keep_data_lines(output); + Checks::check_exit(VCPKG_LINE_INFO, + !instances_as_strings.empty(), + "Could not detect any Visual Studio instances.\n" + "Powershell script:\n" + " %s\n" + "returned:\n" + "%s", + script.generic_string(), + output); + + std::vector instances; + for (const std::string& instance_as_string : instances_as_strings) + { + const std::vector split = Strings::split(instance_as_string, "::"); + Checks::check_exit(VCPKG_LINE_INFO, + split.size() == 4, + "Invalid Visual Studio instance format.\n" + "Expected: PreferenceWeight::ReleaseType::Version::PathToVisualStudio\n" + "Actual : %s\n", + instance_as_string); + instances.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); + } + + return instances; + } + + std::vector find_toolset_instances(const VcpkgPaths& paths) + { + using CPU = System::CPUArchitecture; + + const auto& fs = paths.get_filesystem(); + + // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations. + std::vector paths_examined; + + std::vector found_toolsets; + std::vector excluded_toolsets; + + const std::vector vs_instances = get_visual_studio_instances(paths); + const bool v140_is_available = Util::find_if(vs_instances, [&](const VisualStudioInstance& vs_instance) { + return vs_instance.major_version() == "14"; + }) != vs_instances.cend(); + + for (const VisualStudioInstance& vs_instance : vs_instances) + { + const std::string major_version = vs_instance.major_version(); + if (major_version == "15") + { + const fs::path vc_dir = vs_instance.root_path / "VC"; + + // Skip any instances that do not have vcvarsall. + const fs::path vcvarsall_dir = vc_dir / "Auxiliary" / "Build"; + const fs::path vcvarsall_bat = vcvarsall_dir / "vcvarsall.bat"; + paths_examined.push_back(vcvarsall_bat); + if (!fs.exists(vcvarsall_bat)) continue; + + // Get all supported architectures + std::vector supported_architectures; + if (fs.exists(vcvarsall_dir / "vcvars32.bat")) + supported_architectures.push_back({"x86", CPU::X86, CPU::X86}); + if (fs.exists(vcvarsall_dir / "vcvars64.bat")) + supported_architectures.push_back({"amd64", CPU::X64, CPU::X64}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) + supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) + supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM}); + if (fs.exists(vcvarsall_dir / "vcvarsx86_arm64.bat")) + supported_architectures.push_back({"x86_arm64", CPU::X86, CPU::ARM64}); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) + supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86}); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) + supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM}); + if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm64.bat")) + supported_architectures.push_back({"amd64_arm64", CPU::X64, CPU::ARM64}); + + // Locate the "best" MSVC toolchain version + const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; + std::vector msvc_subdirectories = fs.get_files_non_recursive(msvc_path); + Util::unstable_keep_if(msvc_subdirectories, + [&fs](const fs::path& path) { return fs.is_directory(path); }); + + // Sort them so that latest comes first + std::sort( + msvc_subdirectories.begin(), + msvc_subdirectories.end(), + [](const fs::path& left, const fs::path& right) { return left.filename() > right.filename(); }); + + for (const fs::path& subdir : msvc_subdirectories) + { + const fs::path dumpbin_path = subdir / "bin" / "HostX86" / "x86" / "dumpbin.exe"; + paths_examined.push_back(dumpbin_path); + if (fs.exists(dumpbin_path)) + { + const Toolset v141toolset = Toolset{ + vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}; + + auto english_language_pack = dumpbin_path.parent_path() / "1033"; + + if (!fs.exists(english_language_pack)) + { + excluded_toolsets.push_back(v141toolset); + break; + } + + found_toolsets.push_back(v141toolset); + + if (v140_is_available) + { + const Toolset v140toolset = Toolset{vs_instance.root_path, + dumpbin_path, + vcvarsall_bat, + {"-vcvars_ver=14.0"}, + V_140, + supported_architectures}; + found_toolsets.push_back(v140toolset); + } + + break; + } + } + + continue; + } + + if (major_version == "14" || major_version == "12") + { + const fs::path vcvarsall_bat = vs_instance.root_path / "VC" / "vcvarsall.bat"; + + paths_examined.push_back(vcvarsall_bat); + if (fs.exists(vcvarsall_bat)) + { + const fs::path vs_dumpbin_exe = vs_instance.root_path / "VC" / "bin" / "dumpbin.exe"; + paths_examined.push_back(vs_dumpbin_exe); + + const fs::path vs_bin_dir = vcvarsall_bat.parent_path() / "bin"; + std::vector supported_architectures; + if (fs.exists(vs_bin_dir / "vcvars32.bat")) + supported_architectures.push_back({"x86", CPU::X86, CPU::X86}); + if (fs.exists(vs_bin_dir / "amd64\\vcvars64.bat")) + supported_architectures.push_back({"x64", CPU::X64, CPU::X64}); + if (fs.exists(vs_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) + supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64}); + if (fs.exists(vs_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) + supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM}); + if (fs.exists(vs_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) + supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86}); + if (fs.exists(vs_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) + supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM}); + + if (fs.exists(vs_dumpbin_exe)) + { + const Toolset toolset = {vs_instance.root_path, + vs_dumpbin_exe, + vcvarsall_bat, + {}, + major_version == "14" ? V_140 : V_120, + supported_architectures}; + + auto english_language_pack = vs_dumpbin_exe.parent_path() / "1033"; + + if (!fs.exists(english_language_pack)) + { + excluded_toolsets.push_back(toolset); + break; + } + + found_toolsets.push_back(toolset); + } + } + } + } + + if (!excluded_toolsets.empty()) + { + System::println( + System::Color::warning, + "Warning: The following VS instances are excluded because the English language pack is unavailable."); + for (const Toolset& toolset : excluded_toolsets) + { + System::println(" %s", toolset.visual_studio_root_path.u8string()); + } + System::println(System::Color::warning, "Please install the English language pack."); + } + + if (found_toolsets.empty()) + { + System::println(System::Color::error, "Could not locate a complete toolset."); + System::println("The following paths were examined:"); + for (const fs::path& path : paths_examined) + { + System::println(" %s", path.u8string()); + } + Checks::exit_fail(VCPKG_LINE_INFO); + } + + return found_toolsets; + } + + fs::path get_tool_path(const VcpkgPaths& paths, const std::string& tool) + { + // First deal with specially handled tools. + // For these we may look in locations like Program Files, the PATH etc as well as the auto-downloaded location. + if (tool == Tools::SEVEN_ZIP) return get_7za_path(paths); + if (tool == Tools::CMAKE) return get_cmake_path(paths); + if (tool == Tools::GIT) return get_git_path(paths); + if (tool == Tools::NINJA) return get_ninja_path(paths); + if (tool == Tools::NUGET) return get_nuget_path(paths); + if (tool == Tools::IFW_INSTALLER_BASE) return get_ifw_installerbase_path(paths); + if (tool == Tools::IFW_BINARYCREATOR) + return get_ifw_installerbase_path(paths).parent_path() / "binarycreator.exe"; + if (tool == Tools::IFW_REPOGEN) return get_ifw_installerbase_path(paths).parent_path() / "repogen.exe"; + + // For other tools, we simply always auto-download them. + const ToolData tool_data = parse_tool_data_from_xml(paths, tool); + if (paths.get_filesystem().exists(tool_data.exe_path)) + { + return tool_data.exe_path; + } + return fetch_tool(paths, tool, tool_data); + } + + const CommandStructure COMMAND_STRUCTURE = { + Strings::format("The argument should be tool name\n%s", Help::create_example_string("fetch cmake")), + 1, + 1, + {}, + nullptr, + }; + + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + { + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + + const std::string tool = args.command_arguments[0]; + const fs::path tool_path = get_tool_path(paths, tool); + System::println(tool_path.u8string()); + Checks::exit_success(VCPKG_LINE_INFO); + } +} diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 36e4e56e7..d6ae27181 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -276,7 +276,7 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", { auto& fs = paths.get_filesystem(); - const fs::path& nuget_exe = paths.get_nuget_exe(); + const fs::path& nuget_exe = paths.get_tool_exe(Tools::NUGET); const fs::path& buildsystems_dir = paths.buildsystems; const fs::path tmp_dir = buildsystems_dir / "tmp"; diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index dba04ce5b..c6b02582f 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -79,7 +79,7 @@ namespace vcpkg::Commands::PortsDiff { std::error_code ec; auto& fs = paths.get_filesystem(); - const fs::path& git_exe = paths.get_git_exe(); + const fs::path& git_exe = paths.get_tool_exe(Tools::GIT); const fs::path dot_git_dir = paths.root / ".git"; const std::string ports_dir_name_as_string = paths.ports.filename().u8string(); const fs::path temp_checkout_path = @@ -130,7 +130,7 @@ namespace vcpkg::Commands::PortsDiff { args.parse_arguments(COMMAND_STRUCTURE); - const fs::path& git_exe = paths.get_git_exe(); + const fs::path& git_exe = paths.get_tool_exe(Tools::GIT); const std::string git_commit_id_for_previous_snapshot = args.command_arguments.at(0); const std::string git_commit_id_for_current_snapshot = diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 16c84f99d..32151c791 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -123,7 +123,7 @@ namespace vcpkg::Export const fs::path& output_dir) { Files::Filesystem& fs = paths.get_filesystem(); - const fs::path& nuget_exe = paths.get_nuget_exe(); + const fs::path& nuget_exe = paths.get_tool_exe(Tools::NUGET); // This file will be placed in "build\native" in the nuget package. Therefore, go up two dirs. const std::string targets_redirect_content = @@ -189,7 +189,7 @@ namespace vcpkg::Export const fs::path& output_dir, const ArchiveFormat& format) { - const fs::path& cmake_exe = paths.get_cmake_exe(); + const fs::path& cmake_exe = paths.get_tool_exe(Tools::CMAKE); const std::string exported_dir_filename = raw_exported_dir.filename().u8string(); const std::string exported_archive_filename = diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index f2086257e..4f998d579 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -5,401 +5,13 @@ #include #include #include +#include #include #include #include namespace vcpkg { - static constexpr CStringView V_120 = "v120"; - static constexpr CStringView V_140 = "v140"; - static constexpr CStringView V_141 = "v141"; - - struct ToolData - { - std::array required_version; - fs::path exe_path; - std::string url; - fs::path downloaded_path; - fs::path tool_dir_path; - }; - - static Optional> parse_version_string(const std::string& version_as_string) - { - static const std::regex RE(R"###((\d+)\.(\d+)\.(\d+))###"); - - std::match_results match; - const auto found = std::regex_search(version_as_string, match, RE); - if (!found) - { - return {}; - } - - const int d1 = atoi(match[1].str().c_str()); - const int d2 = atoi(match[2].str().c_str()); - const int d3 = atoi(match[3].str().c_str()); - const std::array result = {d1, d2, d3}; - return result; - } - - static ToolData parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool) - { -#if defined(_WIN32) - static constexpr StringLiteral OS_STRING = "windows"; -#elif defined(__APPLE__) - static constexpr StringLiteral OS_STRING = "osx"; -#else // assume linux - static constexpr StringLiteral OS_STRING = "linux"; -#endif - - static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; - - const auto maybe_get_string_inside_tags = [](const std::string& input, - const std::regex& regex) -> Optional { - std::smatch match; - const bool has_match = std::regex_search(input.cbegin(), input.cend(), match, regex); - if (!has_match) return nullopt; - return match[1]; - }; - - const auto get_string_inside_tags = - [](const std::string& input, const std::regex& regex, const std::string& tag_name) -> std::string { - std::smatch match; - const bool has_match = std::regex_search(input.cbegin(), input.cend(), match, regex); - Checks::check_exit( - VCPKG_LINE_INFO, has_match, "Could not find tag <%s> in %s", tag_name, XML_PATH.generic_string()); - - return match[1]; - }; - - static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO); - static const std::regex VERSION_REGEX{R"###(([\s\S]*?))###"}; - static const std::regex EXE_RELATIVE_PATH_REGEX{ - Strings::format(R"###(([\s\S]*?))###")}; - static const std::regex ARCHIVE_RELATIVE_PATH_REGEX{ - Strings::format(R"###(([\s\S]*?))###")}; - static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###")}; - - std::regex tool_regex{ - Strings::format(R"###(([\s\S]*?)<\/tool>)###", tool, OS_STRING)}; - - std::smatch match_tool; - bool has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); - if (!has_match_tool && OS_STRING == "windows") // Legacy support. Change introduced in vcpkg v0.0.107. - { - tool_regex = Strings::format(R"###(([\s\S]*?)<\/tool>)###", tool); - has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); - } - Checks::check_exit(VCPKG_LINE_INFO, - has_match_tool, - "Could not find entry for tool [%s] in %s", - tool, - XML_PATH.generic_string()); - - const std::string tool_data_as_string = get_string_inside_tags(XML, tool_regex, tool); - - const std::string required_version_as_string = - get_string_inside_tags(tool_data_as_string, VERSION_REGEX, "requiredVersion"); - - const std::string url = get_string_inside_tags(tool_data_as_string, URL_REGEX, "url"); - - const std::string exe_relative_path = - get_string_inside_tags(tool_data_as_string, EXE_RELATIVE_PATH_REGEX, "exeRelativePath"); - - auto archive_relative_path = maybe_get_string_inside_tags(tool_data_as_string, ARCHIVE_RELATIVE_PATH_REGEX); - - const Optional> required_version = parse_version_string(required_version_as_string); - Checks::check_exit(VCPKG_LINE_INFO, - required_version.has_value(), - "Could not parse version for tool %s. Version string was: %s", - tool, - required_version_as_string); - - const std::string tool_dir_name = Strings::format("%s-%s-%s", tool, required_version_as_string, OS_STRING); - const fs::path tool_dir_path = paths.downloads / "tools" / tool_dir_name; - const fs::path exe_path = tool_dir_path / exe_relative_path; - return ToolData{*required_version.get(), - exe_path, - url, - paths.downloads / archive_relative_path.value_or(exe_relative_path), - tool_dir_path}; - } - - static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd, - const std::array& expected_version) - { - const auto rc = System::cmd_execute_and_capture_output(Strings::format(R"(%s)", version_cmd)); - if (rc.exit_code != 0) - { - return false; - } - - const Optional> v = parse_version_string(rc.output); - if (!v.has_value()) - { - return false; - } - - const std::array actual_version = *v.get(); - return (actual_version[0] > expected_version[0] || - (actual_version[0] == expected_version[0] && actual_version[1] > expected_version[1]) || - (actual_version[0] == expected_version[0] && actual_version[1] == expected_version[1] && - actual_version[2] >= expected_version[2])); - } - - static Optional find_if_has_equal_or_greater_version(const std::vector& candidate_paths, - const std::string& version_check_arguments, - const std::array& expected_version) - { - auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { - const std::string cmd = Strings::format(R"("%s" %s)", p.u8string(), version_check_arguments); - return exists_and_has_equal_or_greater_version(cmd, expected_version); - }); - - if (it != candidate_paths.cend()) - { - return std::move(*it); - } - - return nullopt; - } - - static std::vector keep_data_lines(const std::string& data_blob) - { - static const std::regex DATA_LINE_REGEX(R"(::(.+?)(?=::))"); - - std::vector data_lines; - - const std::sregex_iterator it(data_blob.cbegin(), data_blob.cend(), DATA_LINE_REGEX); - const std::sregex_iterator end; - for (std::sregex_iterator i = it; i != end; ++i) - { - const std::smatch match = *i; - data_lines.push_back(match[1].str()); - } - - return data_lines; - } - - static void extract_archive(const VcpkgPaths& paths, const fs::path& archive, const fs::path& to_path) - { - Files::Filesystem& fs = paths.get_filesystem(); - const fs::path to_path_partial = to_path.u8string() + ".partial"; - - std::error_code ec; - fs.remove_all(to_path_partial, ec); - fs.create_directories(to_path_partial, ec); - - const auto ext = archive.extension(); - if (ext == ".gz" && ext.extension() != ".tar") - { - const auto code = System::cmd_execute( - Strings::format(R"(cd '%s' && tar xzf '%s')", to_path_partial.u8string(), archive.u8string())); - Checks::check_exit(VCPKG_LINE_INFO, code == 0, "tar failed while extracting %s", archive.u8string()); - } - else if (ext == ".zip") - { - const auto code = System::cmd_execute( - Strings::format(R"(cd '%s' && unzip -qqo '%s')", to_path_partial.u8string(), archive.u8string())); - Checks::check_exit(VCPKG_LINE_INFO, code == 0, "unzip failed while extracting %s", archive.u8string()); - } - else - { - Checks::exit_with_message(VCPKG_LINE_INFO, "Unexpected archive extension: %s", ext.u8string()); - } - - fs.rename(to_path_partial, to_path); - } - - static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) - { - const auto& fs = paths.get_filesystem(); - const fs::path& scripts_folder = paths.scripts; - const std::array& version = tool_data.required_version; - - const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); - System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", - tool_name, - version_as_string, - tool_name, - version_as_string); -#if defined(_WIN32) - const fs::path script = scripts_folder / "fetchtool.ps1"; - const std::string title = Strings::format( - "Fetching %s version %s (No sufficient installed version was found)", tool_name, version_as_string); - const System::PowershellParameter tool_param("tool", tool_name); - const std::string output = System::powershell_execute_and_capture_output(title, script, {tool_param}); - - const std::vector tool_path = keep_data_lines(output); - Checks::check_exit(VCPKG_LINE_INFO, tool_path.size() == 1, "Expected tool path, but got %s", output); - - const fs::path actual_downloaded_path = Strings::trim(std::string{tool_path.at(0)}); - const fs::path& expected_downloaded_path = tool_data.exe_path; - std::error_code ec; - const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - eq && !ec, - "Expected tool downloaded path to be %s, but was %s", - expected_downloaded_path.u8string(), - actual_downloaded_path.u8string()); - return actual_downloaded_path; -#else - if (!fs.exists(tool_data.downloaded_path)) - { - auto code = System::cmd_execute(Strings::format( - R"(curl -L '%s' --create-dirs --output '%s')", tool_data.url, tool_data.downloaded_path)); - Checks::check_exit(VCPKG_LINE_INFO, code == 0, "curl failed while downloading %s", tool_data.url); - } - - System::println("Extracting %s...", tool_name); - extract_archive(paths, tool_data.downloaded_path, tool_data.tool_dir_path); - System::println("Extracting %s... done.", tool_name); - - Checks::check_exit(VCPKG_LINE_INFO, - fs.exists(tool_data.exe_path), - "Expected %s to exist after extracting", - tool_data.exe_path); - - return tool_data.exe_path; -#endif - } - - static fs::path get_cmake_path(const VcpkgPaths& paths) - { - std::vector candidate_paths; -#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "cmake"); - candidate_paths.push_back(TOOL_DATA.exe_path); -#else - static const ToolData TOOL_DATA = ToolData{{3, 5, 1}, ""}; -#endif - static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - - const std::vector from_path = Files::find_from_PATH("cmake"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - - const auto& program_files = System::get_program_files_platform_bitness(); - if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); - const auto& program_files_32_bit = System::get_program_files_32_bit(); - if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); - - const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_tool(paths, "cmake", TOOL_DATA); - } - - static fs::path get_7za_path(const VcpkgPaths& paths) - { -#if defined(_WIN32) - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "7zip"); - if (!paths.get_filesystem().exists(TOOL_DATA.exe_path)) - { - return fetch_tool(paths, "7zip", TOOL_DATA); - } - return TOOL_DATA.exe_path; -#else - Checks::exit_with_message(VCPKG_LINE_INFO, "Cannot download 7zip for non-Windows platforms."); -#endif - } - - static fs::path get_ninja_path(const VcpkgPaths& paths) - { - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "ninja"); - - std::vector candidate_paths; - candidate_paths.push_back(TOOL_DATA.exe_path); - const std::vector from_path = Files::find_from_PATH("ninja"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - - auto path = find_if_has_equal_or_greater_version(candidate_paths, "--version", TOOL_DATA.required_version); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_tool(paths, "ninja", TOOL_DATA); - } - - static fs::path get_nuget_path(const VcpkgPaths& paths) - { - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "nuget"); - - std::vector candidate_paths; - candidate_paths.push_back(TOOL_DATA.exe_path); - const std::vector from_path = Files::find_from_PATH("nuget"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - - auto path = find_if_has_equal_or_greater_version(candidate_paths, "", TOOL_DATA.required_version); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_tool(paths, "nuget", TOOL_DATA); - } - - static fs::path get_git_path(const VcpkgPaths& paths) - { -#if defined(_WIN32) - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "git"); -#else - static const ToolData TOOL_DATA = ToolData{{2, 7, 4}, ""}; -#endif - static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - - std::vector candidate_paths; -#if defined(_WIN32) - candidate_paths.push_back(TOOL_DATA.exe_path); -#endif - const std::vector from_path = Files::find_from_PATH("git"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - - const auto& program_files = System::get_program_files_platform_bitness(); - if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); - const auto& program_files_32_bit = System::get_program_files_32_bit(); - if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); - - const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_tool(paths, "git", TOOL_DATA); - } - - static fs::path get_ifw_installerbase_path(const VcpkgPaths& paths) - { - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "installerbase"); - - static const std::string VERSION_CHECK_ARGUMENTS = "--framework-version"; - - std::vector candidate_paths; - candidate_paths.push_back(TOOL_DATA.exe_path); - // TODO: Uncomment later - // const std::vector from_path = Files::find_from_PATH("installerbase"); - // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / - // "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe"); - // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / - // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); - - const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); - if (const auto p = path.get()) - { - return *p; - } - - return fetch_tool(paths, "installerbase", TOOL_DATA); - } - Expected VcpkgPaths::create(const fs::path& vcpkg_root_dir, const std::string& default_vs_path) { std::error_code ec; @@ -471,266 +83,22 @@ namespace vcpkg bool VcpkgPaths::is_valid_triplet(const Triplet& t) const { - auto it = Util::find_if(this->get_available_triplets(), - [&](auto&& available_triplet) { return t.canonical_name() == available_triplet; }); + const auto it = Util::find_if(this->get_available_triplets(), [&](auto&& available_triplet) { + return t.canonical_name() == available_triplet; + }); return it != this->get_available_triplets().cend(); } - const fs::path& VcpkgPaths::get_7za_exe() const + const fs::path& VcpkgPaths::get_tool_exe(const std::string& tool) const { - return this->_7za_exe.get_lazy([this]() { return get_7za_path(*this); }); - } - - const fs::path& VcpkgPaths::get_cmake_exe() const - { - return this->cmake_exe.get_lazy([this]() { return get_cmake_path(*this); }); - } - - const fs::path& VcpkgPaths::get_git_exe() const - { - return this->git_exe.get_lazy([this]() { return get_git_path(*this); }); - } - - const fs::path& VcpkgPaths::get_ninja_exe() const - { - return this->ninja_exe.get_lazy([this]() { return get_ninja_path(*this); }); - } - - const fs::path& VcpkgPaths::get_nuget_exe() const - { - return this->nuget_exe.get_lazy([this]() { return get_nuget_path(*this); }); - } - - const fs::path& VcpkgPaths::get_ifw_installerbase_exe() const - { - return this->ifw_installerbase_exe.get_lazy([this]() { return get_ifw_installerbase_path(*this); }); - } - - const fs::path& VcpkgPaths::get_ifw_binarycreator_exe() const - { - return this->ifw_binarycreator_exe.get_lazy( - [this]() { return get_ifw_installerbase_exe().parent_path() / "binarycreator.exe"; }); - } - - const fs::path& VcpkgPaths::get_ifw_repogen_exe() const - { - return this->ifw_repogen_exe.get_lazy( - [this]() { return get_ifw_installerbase_exe().parent_path() / "repogen.exe"; }); - } - - struct VisualStudioInstance - { - fs::path root_path; - std::string version; - std::string release_type; - std::string preference_weight; // Mostly unused, just for verification that order is as intended - - std::string major_version() const { return version.substr(0, 2); } - }; - - static std::vector get_visual_studio_instances(const VcpkgPaths& paths) - { - const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; - const std::string output = - System::powershell_execute_and_capture_output("Detecting Visual Studio instances", script); - - const std::vector instances_as_strings = keep_data_lines(output); - Checks::check_exit(VCPKG_LINE_INFO, - !instances_as_strings.empty(), - "Could not detect any Visual Studio instances.\n" - "Powershell script:\n" - " %s\n" - "returned:\n" - "%s", - script.generic_string(), - output); - - std::vector instances; - for (const std::string& instance_as_string : instances_as_strings) - { - const std::vector split = Strings::split(instance_as_string, "::"); - Checks::check_exit(VCPKG_LINE_INFO, - split.size() == 4, - "Invalid Visual Studio instance format.\n" - "Expected: PreferenceWeight::ReleaseType::Version::PathToVisualStudio\n" - "Actual : %s\n", - instance_as_string); - instances.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); - } - - return instances; - } - - static std::vector find_toolset_instances(const VcpkgPaths& paths) - { - using CPU = System::CPUArchitecture; - - const auto& fs = paths.get_filesystem(); - - // Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations. - std::vector paths_examined; - - std::vector found_toolsets; - std::vector excluded_toolsets; - - const std::vector vs_instances = get_visual_studio_instances(paths); - const bool v140_is_available = Util::find_if(vs_instances, [&](const VisualStudioInstance& vs_instance) { - return vs_instance.major_version() == "14"; - }) != vs_instances.cend(); - - for (const VisualStudioInstance& vs_instance : vs_instances) - { - const std::string major_version = vs_instance.major_version(); - if (major_version == "15") - { - const fs::path vc_dir = vs_instance.root_path / "VC"; - - // Skip any instances that do not have vcvarsall. - const fs::path vcvarsall_dir = vc_dir / "Auxiliary" / "Build"; - const fs::path vcvarsall_bat = vcvarsall_dir / "vcvarsall.bat"; - paths_examined.push_back(vcvarsall_bat); - if (!fs.exists(vcvarsall_bat)) continue; - - // Get all supported architectures - std::vector supported_architectures; - if (fs.exists(vcvarsall_dir / "vcvars32.bat")) - supported_architectures.push_back({"x86", CPU::X86, CPU::X86}); - if (fs.exists(vcvarsall_dir / "vcvars64.bat")) - supported_architectures.push_back({"amd64", CPU::X64, CPU::X64}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat")) - supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat")) - supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM}); - if (fs.exists(vcvarsall_dir / "vcvarsx86_arm64.bat")) - supported_architectures.push_back({"x86_arm64", CPU::X86, CPU::ARM64}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat")) - supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat")) - supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM}); - if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm64.bat")) - supported_architectures.push_back({"amd64_arm64", CPU::X64, CPU::ARM64}); - - // Locate the "best" MSVC toolchain version - const fs::path msvc_path = vc_dir / "Tools" / "MSVC"; - std::vector msvc_subdirectories = fs.get_files_non_recursive(msvc_path); - Util::unstable_keep_if(msvc_subdirectories, - [&fs](const fs::path& path) { return fs.is_directory(path); }); - - // Sort them so that latest comes first - std::sort( - msvc_subdirectories.begin(), - msvc_subdirectories.end(), - [](const fs::path& left, const fs::path& right) { return left.filename() > right.filename(); }); - - for (const fs::path& subdir : msvc_subdirectories) - { - const fs::path dumpbin_path = subdir / "bin" / "HostX86" / "x86" / "dumpbin.exe"; - paths_examined.push_back(dumpbin_path); - if (fs.exists(dumpbin_path)) - { - const Toolset v141toolset = Toolset{ - vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}; - - auto english_language_pack = dumpbin_path.parent_path() / "1033"; - - if (!fs.exists(english_language_pack)) - { - excluded_toolsets.push_back(v141toolset); - break; - } - - found_toolsets.push_back(v141toolset); - - if (v140_is_available) - { - const Toolset v140toolset = Toolset{vs_instance.root_path, - dumpbin_path, - vcvarsall_bat, - {"-vcvars_ver=14.0"}, - V_140, - supported_architectures}; - found_toolsets.push_back(v140toolset); - } - - break; - } - } - - continue; - } - - if (major_version == "14" || major_version == "12") - { - const fs::path vcvarsall_bat = vs_instance.root_path / "VC" / "vcvarsall.bat"; - - paths_examined.push_back(vcvarsall_bat); - if (fs.exists(vcvarsall_bat)) - { - const fs::path vs_dumpbin_exe = vs_instance.root_path / "VC" / "bin" / "dumpbin.exe"; - paths_examined.push_back(vs_dumpbin_exe); - - const fs::path vs_bin_dir = vcvarsall_bat.parent_path() / "bin"; - std::vector supported_architectures; - if (fs.exists(vs_bin_dir / "vcvars32.bat")) - supported_architectures.push_back({"x86", CPU::X86, CPU::X86}); - if (fs.exists(vs_bin_dir / "amd64\\vcvars64.bat")) - supported_architectures.push_back({"x64", CPU::X64, CPU::X64}); - if (fs.exists(vs_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat")) - supported_architectures.push_back({"x86_amd64", CPU::X86, CPU::X64}); - if (fs.exists(vs_bin_dir / "x86_arm\\vcvarsx86_arm.bat")) - supported_architectures.push_back({"x86_arm", CPU::X86, CPU::ARM}); - if (fs.exists(vs_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat")) - supported_architectures.push_back({"amd64_x86", CPU::X64, CPU::X86}); - if (fs.exists(vs_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat")) - supported_architectures.push_back({"amd64_arm", CPU::X64, CPU::ARM}); - - if (fs.exists(vs_dumpbin_exe)) - { - const Toolset toolset = {vs_instance.root_path, - vs_dumpbin_exe, - vcvarsall_bat, - {}, - major_version == "14" ? V_140 : V_120, - supported_architectures}; - - auto english_language_pack = vs_dumpbin_exe.parent_path() / "1033"; - - if (!fs.exists(english_language_pack)) - { - excluded_toolsets.push_back(toolset); - break; - } - - found_toolsets.push_back(toolset); - } - } - } - } - - if (!excluded_toolsets.empty()) - { - System::println( - System::Color::warning, - "Warning: The following VS instances are excluded because the English language pack is unavailable."); - for (const Toolset& toolset : excluded_toolsets) - { - System::println(" %s", toolset.visual_studio_root_path.u8string()); - } - System::println(System::Color::warning, "Please install the English language pack."); - } - - if (found_toolsets.empty()) + const auto it = this->tool_paths.find(tool); + if (it != this->tool_paths.cend()) { - System::println(System::Color::error, "Could not locate a complete toolset."); - System::println("The following paths were examined:"); - for (const fs::path& path : paths_examined) - { - System::println(" %s", path.u8string()); - } - Checks::exit_fail(VCPKG_LINE_INFO); + return it->second; } - return found_toolsets; + this->tool_paths[tool] = Commands::Fetch::get_tool_path(*this, tool); + return this->tool_paths[tool]; } const Toolset& VcpkgPaths::get_toolset(const Build::PreBuildInfo& prebuildinfo) const @@ -754,7 +122,7 @@ namespace vcpkg // Invariant: toolsets are non-empty and sorted with newest at back() const std::vector& vs_toolsets = - this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); }); + this->toolsets.get_lazy([this]() { return Commands::Fetch::find_toolset_instances(*this); }); std::vector candidates = Util::element_pointers(vs_toolsets); const auto tsv = prebuildinfo.platform_toolset.get(); diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index ae699a840..871d0c58d 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -214,6 +214,7 @@ + diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters index 74bfebf3b..6a23a09b5 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj.filters +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj.filters @@ -198,6 +198,9 @@ Source Files\vcpkg + + Source Files\vcpkg + -- cgit v1.2.3 From e3099b458b5c11742c1b88c27847801090870f2d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 19:26:14 -0700 Subject: Use 7zip920 instead of 7zr --- scripts/VcpkgPowershellUtils.ps1 | 19 +++++++++++++++++++ scripts/fetchTool.ps1 | 14 +++++++++----- scripts/vcpkgTools.xml | 11 ++++++----- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 7082ca747..d7967889e 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -198,6 +198,25 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$sevenZipExe, Rename-Item -Path "$destinationPartial" -NewName $destinationDir } +function vcpkgExtractZipFileWithShell( [Parameter(Mandatory=$true)][string]$archivePath, + [Parameter(Mandatory=$true)][string]$destinationDir) +{ + vcpkgRemoveItem $destinationDir + $destinationPartial = "$destinationDir.partial" + vcpkgRemoveItem $destinationPartial + vcpkgCreateDirectoryIfNotExists $destinationPartial + + $shell = new-object -com shell.application + $zip = $shell.NameSpace($(Get-Item $archivePath).fullname) + foreach($item in $zip.items()) + { + # Piping to Out-Null is used to block until finished + $shell.Namespace($destinationPartial).copyhere($item) | Out-Null + } + + Rename-Item -Path "$destinationPartial" -NewName $destinationDir +} + function vcpkgInvokeCommand() { param ( [Parameter(Mandatory=$true)][string]$executable, diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 05335c724..e46c7808d 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -48,8 +48,8 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) { Write-Host "Downloading $tool..." - # aria2 needs 7zip & 7zr to extract. So, we need to download those trough powershell - if ($tool -eq "aria2" -or $tool -eq "7zip" -or $tool -eq "7zr") + # aria2 needs 7zip & 7zip920 to extract. So, we need to download those trough powershell + if ($tool -eq "aria2" -or $tool -eq "7zip" -or $tool -eq "7zip920") { vcpkgDownloadFile $url $downloadPath } @@ -69,10 +69,14 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) if ($isArchive) { Write-Host "Extracting $tool..." - if ($tool -eq "7zip") + if ($tool -eq "7zip920") { - $sevenZipR = fetchToolInternal "7zr" - $ec = vcpkgInvokeCommand "$sevenZipR" "x `"$downloadPath`" -o`"$toolPath`" -y" + vcpkgExtractZipFileWithShell -ArchivePath $downloadPath -DestinationDir $toolPath + } + elseif ($tool -eq "7zip") + { + $sevenZip920 = fetchToolInternal "7zip920" + $ec = vcpkgInvokeCommand "$sevenZip920" "x `"$downloadPath`" -o`"$toolPath`" -y" if ($ec -ne 0) { Write-Host "Could not extract $downloadPath" diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index fe1cc12a9..810818998 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -54,11 +54,12 @@ 9371df22bcd0e1aff9eaa52aa3292350eecd011f11494e709314ae3f3eb279e2 7z1801-extra.7z - - 18.01.0 - 7zr.exe - https://www.7-zip.org/a/7zr.exe - 2c7a8709260e0295a2a3cfd5a8ad0459f37490ed1794ea68bf85a6fab362553b + + 9.20.0 + 7za.exe + https://www.7-zip.org/a/7za920.zip + 2a3afe19c180f8373fa02ff00254d5394fec0349f5804e0ad2f6067854ff28ac + 7za920.zip 18.01.0 -- cgit v1.2.3 From 23c2b82535d24a8ef343ce2ca36e5a63d111dcd8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 19:28:10 -0700 Subject: [vcpkgTools.xml] Add os="windows" to relevant entries --- scripts/vcpkgTools.xml | 16 ++++++++-------- toolsrc/src/vcpkg/commands.fetch.cpp | 9 ++------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 810818998..fbd6aabd6 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -1,6 +1,6 @@ - + 3.10.2 cmake-3.10.2-win32-x86\bin\cmake.exe https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip @@ -21,47 +21,47 @@ 7a82b46c35f4e68a0807e8dc04e779dee3f36cd42c6387fd13b5c29fe62a69ea cmake-3.10.2-Linux-x86_64.tar.gz - + 2.16.2 cmd\git.exe https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-32-bit.zip 322c727e482aa97522c64a5ac68bdda3780111e8670bcfb532beac8e11ece5da MinGit-2.16.2-32-bit.zip - + 2.3.2 vswhere.exe https://github.com/Microsoft/vswhere/releases/download/2.3.2/vswhere.exe 103f2784c4b2c8e70c7c1c03687abbf22bce052aae30639406e4e13ffa29ee04 - + 4.4.0 nuget.exe https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe 2cf9b118937eef825464e548f0c44f7f64090047746de295d75ac3dcffa3e1f6 - + 3.1.81 QtInstallerFramework-win-x86\bin\installerbase.exe https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8 QtInstallerFramework-win-x86.zip - + 18.01.0 7za.exe https://www.7-zip.org/a/7z1801-extra.7z 9371df22bcd0e1aff9eaa52aa3292350eecd011f11494e709314ae3f3eb279e2 7z1801-extra.7z - + 9.20.0 7za.exe https://www.7-zip.org/a/7za920.zip 2a3afe19c180f8373fa02ff00254d5394fec0349f5804e0ad2f6067854ff28ac 7za920.zip - + 18.01.0 aria2-1.33.1-win-32bit-build1\aria2c.exe https://github.com/aria2/aria2/releases/download/release-1.33.1/aria2-1.33.1-win-32bit-build1.zip diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 95c47e2db..cfb1b6c2a 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -78,16 +78,11 @@ namespace vcpkg::Commands::Fetch Strings::format(R"###(([\s\S]*?))###")}; static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###")}; - std::regex tool_regex{ + const std::regex tool_regex{ Strings::format(R"###(([\s\S]*?)<\/tool>)###", tool, OS_STRING)}; std::smatch match_tool; - bool has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); - if (!has_match_tool && OS_STRING == "windows") // Legacy support. Change introduced in vcpkg v0.0.107. - { - tool_regex = Strings::format(R"###(([\s\S]*?)<\/tool>)###", tool); - has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); - } + const bool has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); Checks::check_exit(VCPKG_LINE_INFO, has_match_tool, "Could not find entry for tool [%s] in %s", -- cgit v1.2.3 From 863a8f3329356d260c02c0d6f855e81fd1e2cea9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 19:37:31 -0700 Subject: [vcpkgTools.xml] Rename archiveRelativePath to archiveName --- scripts/fetchTool.ps1 | 4 ++-- scripts/vcpkgTools.xml | 20 ++++++++++---------- toolsrc/src/vcpkg/commands.fetch.cpp | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index e46c7808d..79ac82cb0 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -33,10 +33,10 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) return $exePath } - $isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath" + $isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveName" if ($isArchive) { - $downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)" + $downloadPath = "$downloadsDir\$($toolData.archiveName)" } else { diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index fbd6aabd6..839e476b0 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -5,28 +5,28 @@ cmake-3.10.2-win32-x86\bin\cmake.exe https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6 - cmake-3.10.2-win32-x86.zip + cmake-3.10.2-win32-x86.zip 3.10.2 cmake-3.10.2-Darwin-x86_64/CMake.app/Contents/bin/cmake https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz e748eb7698f8e2783c2eea9ab81eebf66da0238bbf8e8fa722a67a38f2110718 - cmake-3.10.2-Darwin-x86_64.tar.gz + cmake-3.10.2-Darwin-x86_64.tar.gz 3.10.2 cmake-3.10.2-Linux-x86_64/bin/cmake https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz 7a82b46c35f4e68a0807e8dc04e779dee3f36cd42c6387fd13b5c29fe62a69ea - cmake-3.10.2-Linux-x86_64.tar.gz + cmake-3.10.2-Linux-x86_64.tar.gz 2.16.2 cmd\git.exe https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-32-bit.zip 322c727e482aa97522c64a5ac68bdda3780111e8670bcfb532beac8e11ece5da - MinGit-2.16.2-32-bit.zip + MinGit-2.16.2-32-bit.zip 2.3.2 @@ -45,41 +45,41 @@ QtInstallerFramework-win-x86\bin\installerbase.exe https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8 - QtInstallerFramework-win-x86.zip + QtInstallerFramework-win-x86.zip 18.01.0 7za.exe https://www.7-zip.org/a/7z1801-extra.7z 9371df22bcd0e1aff9eaa52aa3292350eecd011f11494e709314ae3f3eb279e2 - 7z1801-extra.7z + 7z1801-extra.7z 9.20.0 7za.exe https://www.7-zip.org/a/7za920.zip 2a3afe19c180f8373fa02ff00254d5394fec0349f5804e0ad2f6067854ff28ac - 7za920.zip + 7za920.zip 18.01.0 aria2-1.33.1-win-32bit-build1\aria2c.exe https://github.com/aria2/aria2/releases/download/release-1.33.1/aria2-1.33.1-win-32bit-build1.zip 04bf07c0449c703db17fbcd586365aebba00201ca513ca4808b543f1f9208f1f - aria2-1.33.1-win-32bit-build1.zip + aria2-1.33.1-win-32bit-build1.zip 1.8.2 ninja https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip d2fea9ff33b3ef353161ed906f260d565ca55b8ca0568fa07b1d2cab90a84a07 - ninja-linux.zip + ninja-linux.zip 1.8.2 ninja https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip 0347d55c66061652b26f48769d566761630ffde3143793b29064a57f356542cc - ninja-mac.zip + ninja-mac.zip diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index cfb1b6c2a..10153293c 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -75,7 +75,7 @@ namespace vcpkg::Commands::Fetch static const std::regex EXE_RELATIVE_PATH_REGEX{ Strings::format(R"###(([\s\S]*?))###")}; static const std::regex ARCHIVE_RELATIVE_PATH_REGEX{ - Strings::format(R"###(([\s\S]*?))###")}; + Strings::format(R"###(([\s\S]*?))###")}; static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###")}; const std::regex tool_regex{ -- cgit v1.2.3 From 32404eee694266a23a5d8a2c2f004d68c1d79195 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 19:52:14 -0700 Subject: [vcpkgTools.xml] Verify the version field --- toolsrc/src/vcpkg/commands.fetch.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 10153293c..d2634a5f0 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -50,6 +50,7 @@ namespace vcpkg::Commands::Fetch static constexpr StringLiteral OS_STRING = "linux"; #endif + static const std::string XML_VERSION = "1"; static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; const auto maybe_get_string_inside_tags = [](const std::string& input, @@ -70,6 +71,7 @@ namespace vcpkg::Commands::Fetch return match[1]; }; + static const std::regex XML_VERSION_REGEX{R"###()###"}; static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO); static const std::regex VERSION_REGEX{R"###(([\s\S]*?))###"}; static const std::regex EXE_RELATIVE_PATH_REGEX{ @@ -78,6 +80,17 @@ namespace vcpkg::Commands::Fetch Strings::format(R"###(([\s\S]*?))###")}; static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###")}; + std::smatch match_xml_version; + const bool has_xml_version = std::regex_search(XML.cbegin(), XML.cend(), match_xml_version, XML_VERSION_REGEX); + Checks::check_exit( + VCPKG_LINE_INFO, has_xml_version, "Could not find in %s", XML_PATH.generic_string()); + Checks::check_exit(VCPKG_LINE_INFO, + XML_VERSION == match_xml_version[1], + "Expected %s version: [%s], but was [%s]. Please re-run bootstrap-vcpkg.", + XML_PATH.generic_string(), + XML_VERSION, + match_xml_version[1]); + const std::regex tool_regex{ Strings::format(R"###(([\s\S]*?)<\/tool>)###", tool, OS_STRING)}; -- cgit v1.2.3 From da9d1c46750bf78db65383e3a48d71905b8f91ef Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 19:53:56 -0700 Subject: Misc archiveRelativePath->archiveName renames --- toolsrc/src/vcpkg/commands.fetch.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index d2634a5f0..90b408cc0 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -76,8 +76,7 @@ namespace vcpkg::Commands::Fetch static const std::regex VERSION_REGEX{R"###(([\s\S]*?))###"}; static const std::regex EXE_RELATIVE_PATH_REGEX{ Strings::format(R"###(([\s\S]*?))###")}; - static const std::regex ARCHIVE_RELATIVE_PATH_REGEX{ - Strings::format(R"###(([\s\S]*?))###")}; + static const std::regex ARCHIVE_NAME_REGEX{Strings::format(R"###(([\s\S]*?))###")}; static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###")}; std::smatch match_xml_version; @@ -112,7 +111,7 @@ namespace vcpkg::Commands::Fetch const std::string exe_relative_path = get_string_inside_tags(tool_data_as_string, EXE_RELATIVE_PATH_REGEX, "exeRelativePath"); - auto archive_relative_path = maybe_get_string_inside_tags(tool_data_as_string, ARCHIVE_RELATIVE_PATH_REGEX); + auto archive_name = maybe_get_string_inside_tags(tool_data_as_string, ARCHIVE_NAME_REGEX); const Optional> required_version = parse_version_string(required_version_as_string); Checks::check_exit(VCPKG_LINE_INFO, @@ -127,7 +126,7 @@ namespace vcpkg::Commands::Fetch return ToolData{*required_version.get(), exe_path, url, - paths.downloads / archive_relative_path.value_or(exe_relative_path), + paths.downloads / archive_name.value_or(exe_relative_path), tool_dir_path}; } -- cgit v1.2.3 From 2fa16cda18856ae7f6685c48c0aeefd15225af11 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 20:07:45 -0700 Subject: [vcpkgTools.xml] Change sha256 to sha512 --- scripts/VcpkgPowershellUtils.ps1 | 8 ++++---- scripts/fetchTool.ps1 | 4 ++-- scripts/vcpkgTools.xml | 24 ++++++++++++------------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index d7967889e..676ee5c03 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -79,22 +79,22 @@ function vcpkgGetCredentials() } } -function vcpkgGetSHA256([Parameter(Mandatory=$true)][string]$filePath) +function vcpkgGetSHA512([Parameter(Mandatory=$true)][string]$filePath) { if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Utility\Get-FileHash') { Write-Verbose("Hashing with Microsoft.PowerShell.Utility\Get-FileHash") - $hash = (Microsoft.PowerShell.Utility\Get-FileHash -Path $filePath -Algorithm SHA256).Hash + $hash = (Microsoft.PowerShell.Utility\Get-FileHash -Path $filePath -Algorithm SHA512).Hash } elseif(vcpkgHasCommand -commandName 'Pscx\Get-Hash') { Write-Verbose("Hashing with Pscx\Get-Hash") - $hash = (Pscx\Get-Hash -Path $filePath -Algorithm SHA256).HashString + $hash = (Pscx\Get-Hash -Path $filePath -Algorithm SHA512).HashString } else { Write-Verbose("Hashing with .NET") - $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA256") + $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA512") $fileAsByteArray = [io.File]::ReadAllBytes($filePath) $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) $hash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 79ac82cb0..d5c8fe77e 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -62,8 +62,8 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) Write-Host "Downloading $tool... done." } - $expectedDownloadedFileHash = $toolData.sha256 - $downloadedFileHash = vcpkgGetSHA256 $downloadPath + $expectedDownloadedFileHash = $toolData.sha512 + $downloadedFileHash = vcpkgGetSHA512 $downloadPath vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash if ($isArchive) diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 839e476b0..c3114c2e5 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -4,82 +4,82 @@ 3.10.2 cmake-3.10.2-win32-x86\bin\cmake.exe https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip - f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6 + 9c16861a2ac09c7011b84f38459ecfec2829a9f825b254acbbde46d98f12f8ca0d4db3a6764758cb671507ee7c0327576d87658b81d7ddf1e8280b37569eb16d cmake-3.10.2-win32-x86.zip 3.10.2 cmake-3.10.2-Darwin-x86_64/CMake.app/Contents/bin/cmake https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz - e748eb7698f8e2783c2eea9ab81eebf66da0238bbf8e8fa722a67a38f2110718 + cb7d76e11c892eb786da5804282c4141564390c3552e08c506c7abb93015eb5f619c55255459872b219399ce8114ac321fe92df7f82a7e42bbc874eec240571e cmake-3.10.2-Darwin-x86_64.tar.gz 3.10.2 cmake-3.10.2-Linux-x86_64/bin/cmake https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz - 7a82b46c35f4e68a0807e8dc04e779dee3f36cd42c6387fd13b5c29fe62a69ea + 54389b5cb3f3cb9d182d35e0b1eaf7b301695899930da0d26e9df1dc25056213a077646d23ea609a93daa81d30687757d9cf0dc263339fa3d73dbeb1284bc1a9 cmake-3.10.2-Linux-x86_64.tar.gz 2.16.2 cmd\git.exe https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-32-bit.zip - 322c727e482aa97522c64a5ac68bdda3780111e8670bcfb532beac8e11ece5da + 004e1dc1904f2e2d5c3534d0a56f58bf030b1146f5b263d6d191e60f72cd35455977c588604708125a1e93268ee8f7a5ab32ed6115adc028257b12d5926f350a MinGit-2.16.2-32-bit.zip 2.3.2 vswhere.exe https://github.com/Microsoft/vswhere/releases/download/2.3.2/vswhere.exe - 103f2784c4b2c8e70c7c1c03687abbf22bce052aae30639406e4e13ffa29ee04 + 42f8a8ffd0b156b2e30b2ec7bf7d19582b3ce38a2046ff62bd7fd82f12a8d66ed601e74865957864cef0a376e33a7d07cad746f03c57d1b95a7929a1f8f119ed 4.4.0 nuget.exe https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe - 2cf9b118937eef825464e548f0c44f7f64090047746de295d75ac3dcffa3e1f6 + fb0903665d2a64ce1da3f40961eb19e46c152a631b2441750aa8b30b20acd2a5e78d7f1058e79e83e37959b3ce9a090a60f081895fdba9998715e3a64437c3e5 3.1.81 QtInstallerFramework-win-x86\bin\installerbase.exe https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip - f2ce23cf5cf9fc7ce409bdca49328e09a070c0026d3c8a04e4dfde7b05b83fe8 + 1f3e593270d7c2a4e271fdb49c637a2de462351310ef66bba298d30f6ca23365ec6aecf2e57799a00c873267cd3f92060ecac03eb291d42903d0e0869cd17c73 QtInstallerFramework-win-x86.zip 18.01.0 7za.exe https://www.7-zip.org/a/7z1801-extra.7z - 9371df22bcd0e1aff9eaa52aa3292350eecd011f11494e709314ae3f3eb279e2 + 9133fc551d76515e37fdd4dd8c1e28d464aea493548246b44565a42bba46715764f41f9cfa14d470d298c3a6e9829d200f8be5168cb67cf8f23d8042fca833bc 7z1801-extra.7z 9.20.0 7za.exe https://www.7-zip.org/a/7za920.zip - 2a3afe19c180f8373fa02ff00254d5394fec0349f5804e0ad2f6067854ff28ac + 84e830c91a0e8ae499cc4814080da6569d8a6acbddc585c8b62abc86c809793aeb669b0a741063a379fd281ade85f120bc27efeb67d63bf961be893eec8bc3b3 7za920.zip 18.01.0 aria2-1.33.1-win-32bit-build1\aria2c.exe https://github.com/aria2/aria2/releases/download/release-1.33.1/aria2-1.33.1-win-32bit-build1.zip - 04bf07c0449c703db17fbcd586365aebba00201ca513ca4808b543f1f9208f1f + 2456176ba3d506a07cf0cc4f61f080e1ff8cb4106426d66f354c5bb67a9a8720b5ddb26904275e61b1f623c932355f7dcde4cd17556cc895f11293c23c3a9bf3 aria2-1.33.1-win-32bit-build1.zip 1.8.2 ninja https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip - d2fea9ff33b3ef353161ed906f260d565ca55b8ca0568fa07b1d2cab90a84a07 + 38fcb68e745c1f15b4b50f20069ffe686b1ef5baf93b74958e132ea5d30d155cf6970d6dc1b095aafd421ebd8bcc63acf4f64e305c496266b5182f99b815cca5 ninja-linux.zip 1.8.2 ninja https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip - 0347d55c66061652b26f48769d566761630ffde3143793b29064a57f356542cc + acadfb286eb7d93676629701917fa0c3c39f36daa068c169e4a098c29f97380d1ea95abfd42b04798ff118fd9dc93fdb250fcda36086bac20bc5506354214fc3 ninja-mac.zip -- cgit v1.2.3 From 408cd5ccb8d8260efd9a8f2ff956414587d42e28 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 20:33:45 -0700 Subject: [vcpkgTools.xml] requiredVersion -> version --- scripts/fetchTool.ps1 | 2 +- scripts/vcpkgTools.xml | 24 ++++++++++++------------ toolsrc/src/vcpkg/commands.fetch.cpp | 18 +++++++++--------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index d5c8fe77e..55d04ec98 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -25,7 +25,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) throw "Unkown tool $tool" } - $toolPath="$downloadsDir\tools\$tool-$($toolData.requiredVersion)-windows" + $toolPath="$downloadsDir\tools\$tool-$($toolData.version)-windows" $exePath = "$toolPath\$($toolData.exeRelativePath)" if (Test-Path $exePath) diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index c3114c2e5..07284333c 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -1,82 +1,82 @@ - 3.10.2 + 3.10.2 cmake-3.10.2-win32-x86\bin\cmake.exe https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip 9c16861a2ac09c7011b84f38459ecfec2829a9f825b254acbbde46d98f12f8ca0d4db3a6764758cb671507ee7c0327576d87658b81d7ddf1e8280b37569eb16d cmake-3.10.2-win32-x86.zip - 3.10.2 + 3.10.2 cmake-3.10.2-Darwin-x86_64/CMake.app/Contents/bin/cmake https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz cb7d76e11c892eb786da5804282c4141564390c3552e08c506c7abb93015eb5f619c55255459872b219399ce8114ac321fe92df7f82a7e42bbc874eec240571e cmake-3.10.2-Darwin-x86_64.tar.gz - 3.10.2 + 3.10.2 cmake-3.10.2-Linux-x86_64/bin/cmake https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz 54389b5cb3f3cb9d182d35e0b1eaf7b301695899930da0d26e9df1dc25056213a077646d23ea609a93daa81d30687757d9cf0dc263339fa3d73dbeb1284bc1a9 cmake-3.10.2-Linux-x86_64.tar.gz - 2.16.2 + 2.16.2 cmd\git.exe https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-32-bit.zip 004e1dc1904f2e2d5c3534d0a56f58bf030b1146f5b263d6d191e60f72cd35455977c588604708125a1e93268ee8f7a5ab32ed6115adc028257b12d5926f350a MinGit-2.16.2-32-bit.zip - 2.3.2 + 2.3.2 vswhere.exe https://github.com/Microsoft/vswhere/releases/download/2.3.2/vswhere.exe 42f8a8ffd0b156b2e30b2ec7bf7d19582b3ce38a2046ff62bd7fd82f12a8d66ed601e74865957864cef0a376e33a7d07cad746f03c57d1b95a7929a1f8f119ed - 4.4.0 + 4.4.0 nuget.exe https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe fb0903665d2a64ce1da3f40961eb19e46c152a631b2441750aa8b30b20acd2a5e78d7f1058e79e83e37959b3ce9a090a60f081895fdba9998715e3a64437c3e5 - 3.1.81 + 3.1.81 QtInstallerFramework-win-x86\bin\installerbase.exe https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip 1f3e593270d7c2a4e271fdb49c637a2de462351310ef66bba298d30f6ca23365ec6aecf2e57799a00c873267cd3f92060ecac03eb291d42903d0e0869cd17c73 QtInstallerFramework-win-x86.zip - 18.01.0 + 18.01.0 7za.exe https://www.7-zip.org/a/7z1801-extra.7z 9133fc551d76515e37fdd4dd8c1e28d464aea493548246b44565a42bba46715764f41f9cfa14d470d298c3a6e9829d200f8be5168cb67cf8f23d8042fca833bc 7z1801-extra.7z - 9.20.0 + 9.20.0 7za.exe https://www.7-zip.org/a/7za920.zip 84e830c91a0e8ae499cc4814080da6569d8a6acbddc585c8b62abc86c809793aeb669b0a741063a379fd281ade85f120bc27efeb67d63bf961be893eec8bc3b3 7za920.zip - 18.01.0 + 18.01.0 aria2-1.33.1-win-32bit-build1\aria2c.exe https://github.com/aria2/aria2/releases/download/release-1.33.1/aria2-1.33.1-win-32bit-build1.zip 2456176ba3d506a07cf0cc4f61f080e1ff8cb4106426d66f354c5bb67a9a8720b5ddb26904275e61b1f623c932355f7dcde4cd17556cc895f11293c23c3a9bf3 aria2-1.33.1-win-32bit-build1.zip - 1.8.2 + 1.8.2 ninja https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip 38fcb68e745c1f15b4b50f20069ffe686b1ef5baf93b74958e132ea5d30d155cf6970d6dc1b095aafd421ebd8bcc63acf4f64e305c496266b5182f99b815cca5 ninja-linux.zip - 1.8.2 + 1.8.2 ninja https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip acadfb286eb7d93676629701917fa0c3c39f36daa068c169e4a098c29f97380d1ea95abfd42b04798ff118fd9dc93fdb250fcda36086bac20bc5506354214fc3 diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 90b408cc0..a82f31724 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -15,7 +15,7 @@ namespace vcpkg::Commands::Fetch struct ToolData { - std::array required_version; + std::array version; fs::path exe_path; std::string url; fs::path downloaded_path; @@ -73,7 +73,7 @@ namespace vcpkg::Commands::Fetch static const std::regex XML_VERSION_REGEX{R"###()###"}; static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO); - static const std::regex VERSION_REGEX{R"###(([\s\S]*?))###"}; + static const std::regex VERSION_REGEX{R"###(([\s\S]*?))###"}; static const std::regex EXE_RELATIVE_PATH_REGEX{ Strings::format(R"###(([\s\S]*?))###")}; static const std::regex ARCHIVE_NAME_REGEX{Strings::format(R"###(([\s\S]*?))###")}; @@ -104,7 +104,7 @@ namespace vcpkg::Commands::Fetch const std::string tool_data_as_string = get_string_inside_tags(XML, tool_regex, tool); const std::string required_version_as_string = - get_string_inside_tags(tool_data_as_string, VERSION_REGEX, "requiredVersion"); + get_string_inside_tags(tool_data_as_string, VERSION_REGEX, "version"); const std::string url = get_string_inside_tags(tool_data_as_string, URL_REGEX, "url"); @@ -220,7 +220,7 @@ namespace vcpkg::Commands::Fetch { const auto& fs = paths.get_filesystem(); const fs::path& scripts_folder = paths.scripts; - const std::array& version = tool_data.required_version; + const std::array& version = tool_data.version; const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", @@ -289,7 +289,7 @@ namespace vcpkg::Commands::Fetch if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -321,7 +321,7 @@ namespace vcpkg::Commands::Fetch const std::vector from_path = Files::find_from_PATH("ninja"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - auto path = find_if_has_equal_or_greater_version(candidate_paths, "--version", TOOL_DATA.required_version); + auto path = find_if_has_equal_or_greater_version(candidate_paths, "--version", TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -339,7 +339,7 @@ namespace vcpkg::Commands::Fetch const std::vector from_path = Files::find_from_PATH("nuget"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - auto path = find_if_has_equal_or_greater_version(candidate_paths, "", TOOL_DATA.required_version); + auto path = find_if_has_equal_or_greater_version(candidate_paths, "", TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -370,7 +370,7 @@ namespace vcpkg::Commands::Fetch if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -396,7 +396,7 @@ namespace vcpkg::Commands::Fetch // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.required_version); + find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); if (const auto p = path.get()) { return *p; -- cgit v1.2.3 From 540ab527894f96a57682dc4bca2a08548221b762 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 20:47:58 -0700 Subject: Fix #ifdef'ed references to get_tool_exe() --- toolsrc/src/vcpkg/build.cpp | 2 +- toolsrc/src/vcpkg/commands.hash.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 86d171534..b7055100b 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -338,7 +338,7 @@ namespace vcpkg::Build #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_ninja_exe()); + vcpkg::Util::unused(paths.get_tool_exe(Tools::NINJA)); #endif const fs::path& cmake_exe_path = paths.get_tool_exe(Tools::CMAKE); diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 9e1b54390..517970b2c 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -112,7 +112,7 @@ namespace vcpkg::Commands::Hash { const std::string cmd_line = Strings::format( R"("%s" -E %ssum "%s")", - paths.get_cmake_exe().u8string(), + paths.get_tool_exe(Tools::CMAKE).u8string(), Strings::ascii_to_lowercase(hash_type), path.u8string()); -- cgit v1.2.3 From ab9dd6e6eb85331631ba41f16b04c21e292c93d1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 20:56:55 -0700 Subject: [find_acquire] Extract variable --- scripts/cmake/vcpkg_find_acquire_program.cmake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index ef0e1584f..3f0142377 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -218,19 +218,20 @@ function(vcpkg_find_acquire_program VAR) FILENAME ${ARCHIVE} ) - file(MAKE_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) + set(PROG_PATH_SUBDIR "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}") + file(MAKE_DIRECTORY ${PROG_PATH_SUBDIR}) if(DEFINED NOEXTRACT) if(DEFINED _vfa_RENAME) - file(INSTALL ${ARCHIVE_PATH} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR} RENAME ${_vfa_RENAME}) + file(INSTALL ${ARCHIVE_PATH} DESTINATION ${PROG_PATH_SUBDIR} RENAME ${_vfa_RENAME}) else() - file(COPY ${ARCHIVE_PATH} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}) + file(COPY ${ARCHIVE_PATH} DESTINATION ${PROG_PATH_SUBDIR}) endif() else() get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT) string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) if(ARCHIVE_EXTENSION STREQUAL ".msi") file(TO_NATIVE_PATH "${ARCHIVE_PATH}" ARCHIVE_NATIVE_PATH) - file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}" DESTINATION_NATIVE_PATH) + file(TO_NATIVE_PATH "${PROG_PATH_SUBDIR}" DESTINATION_NATIVE_PATH) execute_process( COMMAND msiexec /a ${ARCHIVE_NATIVE_PATH} /qn TARGETDIR=${DESTINATION_NATIVE_PATH} WORKING_DIRECTORY ${DOWNLOADS} @@ -238,7 +239,7 @@ function(vcpkg_find_acquire_program VAR) else() execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE_PATH} - WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR} + WORKING_DIRECTORY ${PROG_PATH_SUBDIR} ) endif() endif() -- cgit v1.2.3 From e6ed2f89027bd35744f0522c49643449ee12ee33 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 20:58:50 -0700 Subject: [find_acquire] Fix ninja path --- scripts/cmake/vcpkg_find_acquire_program.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 3f0142377..30ecb0573 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -116,7 +116,7 @@ function(vcpkg_find_acquire_program VAR) if(CMAKE_HOST_WIN32) set(PATHS "${DOWNLOADS}/tools/ninja/${SUBDIR}") else() - set(PATHS "${DOWNLOADS}/tools/${SUBDIR}") + set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-linux") endif() set(BREW_PACKAGE_NAME "ninja") set(APT_PACKAGE_NAME "ninja-build") -- cgit v1.2.3 From 0108d6ea2808adea5fe7ce97f6871b59a0fadb1d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 21:47:50 -0700 Subject: Disable vcpkg fetch for now --- toolsrc/src/vcpkg/commands.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index e98ff711a..c6b700aae 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -43,7 +43,7 @@ namespace vcpkg::Commands {"portsdiff", &PortsDiff::perform_and_exit}, {"autocomplete", &Autocomplete::perform_and_exit}, {"hash", &Hash::perform_and_exit}, - {"fetch", &Fetch::perform_and_exit}, + // {"fetch", &Fetch::perform_and_exit}, }; return t; } -- cgit v1.2.3 From b217246f70fd6ac8f8d093b4457ae9035a2dd954 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 22:01:08 -0700 Subject: [vcpkg.exe] Hash check after downloading a tool --- toolsrc/src/vcpkg/commands.fetch.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index a82f31724..33fa74c62 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -20,6 +20,7 @@ namespace vcpkg::Commands::Fetch std::string url; fs::path downloaded_path; fs::path tool_dir_path; + std::string sha512; }; static Optional> parse_version_string(const std::string& version_as_string) @@ -78,6 +79,7 @@ namespace vcpkg::Commands::Fetch Strings::format(R"###(([\s\S]*?))###")}; static const std::regex ARCHIVE_NAME_REGEX{Strings::format(R"###(([\s\S]*?))###")}; static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###")}; + static const std::regex SHA512_REGEX{Strings::format(R"###(([\s\S]*?))###")}; std::smatch match_xml_version; const bool has_xml_version = std::regex_search(XML.cbegin(), XML.cend(), match_xml_version, XML_VERSION_REGEX); @@ -123,11 +125,15 @@ namespace vcpkg::Commands::Fetch const std::string tool_dir_name = Strings::format("%s-%s-%s", tool, required_version_as_string, OS_STRING); const fs::path tool_dir_path = paths.downloads / "tools" / tool_dir_name; const fs::path exe_path = tool_dir_path / exe_relative_path; + + const std::string sha512 = get_string_inside_tags(tool_data_as_string, SHA512_REGEX, "sha512"); + return ToolData{*required_version.get(), exe_path, url, paths.downloads / archive_name.value_or(exe_relative_path), - tool_dir_path}; + tool_dir_path, + sha512}; } static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd, @@ -256,6 +262,17 @@ namespace vcpkg::Commands::Fetch Checks::check_exit(VCPKG_LINE_INFO, code == 0, "curl failed while downloading %s", tool_data.url); } + const std::string actual_hash = Hash::get_file_hash(paths, tool_data.downloaded_path, "SHA512"); + Checks::check_exit(VCPKG_LINE_INFO, + tool_data.sha512 == actual_hash, + "File does not have the expected hash:\n" + " File path : [ %s ]\n" + " Expected hash: [ %s ]\n" + " Actual hash: [ %s ] \n", + tool_data.downloaded_path.u8string(), + tool_data.sha512, + actual_hash); + System::println("Extracting %s...", tool_name); extract_archive(paths, tool_data.downloaded_path, tool_data.tool_dir_path); System::println("Extracting %s... done.", tool_name); -- cgit v1.2.3 From 5b78dfaf68d33c2444437f92d253d7fa912152ec Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 22:13:12 -0700 Subject: [fetchTool] Extract aria2 with shell --- scripts/fetchTool.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 55d04ec98..c076d304a 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -48,8 +48,8 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) { Write-Host "Downloading $tool..." - # aria2 needs 7zip & 7zip920 to extract. So, we need to download those trough powershell - if ($tool -eq "aria2" -or $tool -eq "7zip" -or $tool -eq "7zip920") + # Download aria2 with .NET. aria2 will be used to download everything else. + if ($tool -eq "aria2") { vcpkgDownloadFile $url $downloadPath } @@ -69,7 +69,9 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) if ($isArchive) { Write-Host "Extracting $tool..." - if ($tool -eq "7zip920") + # Extract 7zip920 with shell because we need it to extract 7zip + # Extract aria2 with shell because we need it to download 7zip + if ($tool -eq "7zip920" -or $tool -eq "aria2") { vcpkgExtractZipFileWithShell -ArchivePath $downloadPath -DestinationDir $toolPath } -- cgit v1.2.3 From 3a9be92f7e9cb867eaef4091ace282e4c8e82b92 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Apr 2018 03:16:22 -0700 Subject: [fetchTool.ps1] Move downloaded file in place after hash check --- scripts/VcpkgPowershellUtils.ps1 | 19 +++++++++++++++---- scripts/fetchTool.ps1 | 8 ++------ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 676ee5c03..63069f44d 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -103,22 +103,25 @@ function vcpkgGetSHA512([Parameter(Mandatory=$true)][string]$filePath) return $hash.ToLower() } -function vcpkgCheckEqualFileHash( [Parameter(Mandatory=$true)][string]$filePath, +function vcpkgCheckEqualFileHash( [Parameter(Mandatory=$true)][string]$url, + [Parameter(Mandatory=$true)][string]$filePath, [Parameter(Mandatory=$true)][string]$expectedHash, [Parameter(Mandatory=$true)][string]$actualHash) { if ($expectedHash -ne $actualHash) { Write-Host ("`nFile does not have expected hash:`n" + + " url: [ $url ]`n" + " File path: [ $filePath ]`n" + " Expected hash: [ $expectedHash ]`n" + " Actual hash: [ $actualHash ]`n") - throw "Invalid Hash for file $filePath" + throw } } function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, - [Parameter(Mandatory=$true)][string]$downloadPath) + [Parameter(Mandatory=$true)][string]$downloadPath, + [Parameter(Mandatory=$true)][string]$sha512) { if (Test-Path $downloadPath) { @@ -152,12 +155,17 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, } $wc.DownloadFile($url, $downloadPartPath) + + $actualHash = vcpkgGetSHA512 $downloadPartPath + vcpkgCheckEqualFileHash -url $url -filePath $downloadPath -expectedHash $sha512 -actualHash $actualHash + Move-Item -Path $downloadPartPath -Destination $downloadPath } function vcpkgDownloadFileWithAria2( [Parameter(Mandatory=$true)][string]$aria2exe, [Parameter(Mandatory=$true)][string]$url, - [Parameter(Mandatory=$true)][string]$downloadPath) + [Parameter(Mandatory=$true)][string]$downloadPath, + [Parameter(Mandatory=$true)][string]$sha512) { if (Test-Path $downloadPath) { @@ -178,6 +186,9 @@ function vcpkgDownloadFileWithAria2( [Parameter(Mandatory=$true)][string]$ari throw } + $actualHash = vcpkgGetSHA512 $downloadPartPath + vcpkgCheckEqualFileHash -url $url -filePath $downloadPath -expectedHash $sha512 -actualHash $actualHash + Move-Item -Path $downloadPartPath -Destination $downloadPath } diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index c076d304a..c1e8d87fc 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -51,21 +51,17 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) # Download aria2 with .NET. aria2 will be used to download everything else. if ($tool -eq "aria2") { - vcpkgDownloadFile $url $downloadPath + vcpkgDownloadFile $url $downloadPath $toolData.sha512 } else { $aria2exe = fetchToolInternal "aria2" - vcpkgDownloadFileWithAria2 $aria2exe $url $downloadPath + vcpkgDownloadFileWithAria2 $aria2exe $url $downloadPath $toolData.sha512 } Write-Host "Downloading $tool... done." } - $expectedDownloadedFileHash = $toolData.sha512 - $downloadedFileHash = vcpkgGetSHA512 $downloadPath - vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash - if ($isArchive) { Write-Host "Extracting $tool..." -- cgit v1.2.3 From 7cfc53a45e53476ff93406644c82c4f15563f67b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Apr 2018 03:37:04 -0700 Subject: [vcpkg.exe] Move downloaded file in place after hash check --- toolsrc/src/vcpkg/commands.fetch.cpp | 59 +++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 33fa74c62..e369f44d2 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -18,7 +18,7 @@ namespace vcpkg::Commands::Fetch std::array version; fs::path exe_path; std::string url; - fs::path downloaded_path; + fs::path download_path; fs::path tool_dir_path; std::string sha512; }; @@ -219,7 +219,41 @@ namespace vcpkg::Commands::Fetch Checks::exit_with_message(VCPKG_LINE_INFO, "Unexpected archive extension: %s", ext.u8string()); } - fs.rename(to_path_partial, to_path); + fs.rename(to_path_partial, to_path, ec); + } + + static void download_file(const VcpkgPaths& paths, + const std::string& url, + const fs::path& download_path, + const std::string& sha512) + { + Files::Filesystem& fs = paths.get_filesystem(); + if (fs.exists(download_path)) + { + return; + } + + const std::string download_path_part = download_path.u8string() + ".part"; + std::error_code ec; + fs.remove(download_path_part, ec); + const auto code = System::cmd_execute(Strings::format( + R"(curl -L '%s' --create-dirs --output '%s')", url, download_path_part)); + Checks::check_exit(VCPKG_LINE_INFO, code == 0, "Could not download %s", url); + + const std::string actual_hash = Hash::get_file_hash(paths, download_path_part, "SHA512"); + Checks::check_exit(VCPKG_LINE_INFO, + sha512 == actual_hash, + "File does not have the expected hash:\n" + " url : [ %s ]\n" + " File path : [ %s ]\n" + " Expected hash: [ %s ]\n" + " Actual hash: [ %s ] \n", + url, + download_path.u8string(), + sha512, + actual_hash); + + fs.rename(download_path_part, download_path, ec); } static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) @@ -255,26 +289,15 @@ namespace vcpkg::Commands::Fetch actual_downloaded_path.u8string()); return actual_downloaded_path; #else - if (!fs.exists(tool_data.downloaded_path)) + if (!fs.exists(tool_data.download_path)) { - auto code = System::cmd_execute(Strings::format( - R"(curl -L '%s' --create-dirs --output '%s')", tool_data.url, tool_data.downloaded_path)); - Checks::check_exit(VCPKG_LINE_INFO, code == 0, "curl failed while downloading %s", tool_data.url); + System::println("Downloading %s...", tool_name); + download_file(paths, tool_data.url, tool_data.download_path, tool_data.sha512); + System::println("Downloading %s... done.", tool_name); } - const std::string actual_hash = Hash::get_file_hash(paths, tool_data.downloaded_path, "SHA512"); - Checks::check_exit(VCPKG_LINE_INFO, - tool_data.sha512 == actual_hash, - "File does not have the expected hash:\n" - " File path : [ %s ]\n" - " Expected hash: [ %s ]\n" - " Actual hash: [ %s ] \n", - tool_data.downloaded_path.u8string(), - tool_data.sha512, - actual_hash); - System::println("Extracting %s...", tool_name); - extract_archive(paths, tool_data.downloaded_path, tool_data.tool_dir_path); + extract_archive(paths, tool_data.download_path, tool_data.tool_dir_path); System::println("Extracting %s... done.", tool_name); Checks::check_exit(VCPKG_LINE_INFO, -- cgit v1.2.3 From 870fa61e0132028f43c292b7fd7a7d7c6525a8d7 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Apr 2018 04:29:43 -0700 Subject: [vcpkg hash] Don't use cmake for non-windows hashes. Use shasum instead --- toolsrc/include/vcpkg/commands.h | 4 ++-- toolsrc/src/vcpkg/build.cpp | 8 +++---- toolsrc/src/vcpkg/commands.cpp | 8 ++++--- toolsrc/src/vcpkg/commands.fetch.cpp | 2 +- toolsrc/src/vcpkg/commands.hash.cpp | 43 ++++++++++++++++-------------------- 5 files changed, 31 insertions(+), 34 deletions(-) diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index f6f1de626..65e7fdd14 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -131,8 +131,8 @@ namespace vcpkg::Commands namespace Hash { - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - std::string get_file_hash(const VcpkgPaths& paths, fs::path const& path, std::string const& hash_type); + void perform_and_exit(const VcpkgCmdArguments& args); + std::string get_file_hash(fs::path const& path, std::string const& hash_type); } namespace Fetch diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index b7055100b..16a85db52 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -457,9 +457,9 @@ namespace vcpkg::Build abi_tag_entries.insert(abi_tag_entries.end(), dependency_abis.begin(), dependency_abis.end()); abi_tag_entries.emplace_back( - AbiEntry{"portfile", Commands::Hash::get_file_hash(paths, config.port_dir / "portfile.cmake", "SHA1")}); + AbiEntry{"portfile", Commands::Hash::get_file_hash(config.port_dir / "portfile.cmake", "SHA1")}); abi_tag_entries.emplace_back( - AbiEntry{"control", Commands::Hash::get_file_hash(paths, config.port_dir / "CONTROL", "SHA1")}); + AbiEntry{"control", Commands::Hash::get_file_hash(config.port_dir / "CONTROL", "SHA1")}); abi_tag_entries.emplace_back(AbiEntry{"triplet", pre_build_info.triplet_abi_tag}); @@ -494,7 +494,7 @@ namespace vcpkg::Build auto abi_file_path = paths.buildtrees / name / (triplet.canonical_name() + ".vcpkg_abi_info.txt"); fs.write_contents(abi_file_path, full_abi_info); - return AbiTagAndFile{Commands::Hash::get_file_hash(paths, abi_file_path, "SHA1"), abi_file_path}; + return AbiTagAndFile{Commands::Hash::get_file_hash(abi_file_path, "SHA1"), abi_file_path}; } else { @@ -784,7 +784,7 @@ namespace vcpkg::Build { return it_hash->second; } - auto hash = Commands::Hash::get_file_hash(paths, triplet_file_path, "SHA1"); + auto hash = Commands::Hash::get_file_hash(triplet_file_path, "SHA1"); s_hash_cache.emplace(triplet_file_path, hash); return hash; } diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index c6b700aae..9041b37ff 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -42,7 +42,6 @@ namespace vcpkg::Commands {"cache", &Cache::perform_and_exit}, {"portsdiff", &PortsDiff::perform_and_exit}, {"autocomplete", &Autocomplete::perform_and_exit}, - {"hash", &Hash::perform_and_exit}, // {"fetch", &Fetch::perform_and_exit}, }; return t; @@ -50,8 +49,11 @@ namespace vcpkg::Commands Span> get_available_commands_type_c() { - static std::vector> t = {{"version", &Version::perform_and_exit}, - {"contact", &Contact::perform_and_exit}}; + static std::vector> t = { + {"version", &Version::perform_and_exit}, + {"contact", &Contact::perform_and_exit}, + {"hash", &Hash::perform_and_exit}, + }; return t; } } diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index e369f44d2..1ba043728 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -240,7 +240,7 @@ namespace vcpkg::Commands::Fetch R"(curl -L '%s' --create-dirs --output '%s')", url, download_path_part)); Checks::check_exit(VCPKG_LINE_INFO, code == 0, "Could not download %s", url); - const std::string actual_hash = Hash::get_file_hash(paths, download_path_part, "SHA512"); + const std::string actual_hash = Hash::get_file_hash(download_path_part, "SHA512"); Checks::check_exit(VCPKG_LINE_INFO, sha512 == actual_hash, "File does not have the expected hash:\n" diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 517970b2c..087f3e682 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -60,7 +60,7 @@ namespace vcpkg::Commands::Hash }; } - std::string get_file_hash(const VcpkgPaths&, const fs::path& path, const std::string& hash_type) + std::string get_file_hash(const fs::path& path, const std::string& hash_type) { BCryptAlgorithmHandle algorithm_handle; @@ -108,30 +108,25 @@ namespace vcpkg::Commands::Hash #else namespace vcpkg::Commands::Hash { - std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type) + std::string get_file_hash(const fs::path& path, const std::string& hash_type) { - const std::string cmd_line = Strings::format( - R"("%s" -E %ssum "%s")", - paths.get_tool_exe(Tools::CMAKE).u8string(), - Strings::ascii_to_lowercase(hash_type), - path.u8string()); - - const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, "Running command:\n %s\n failed", cmd_line); - - std::string const& output = ec_data.output; - - const auto start = output.find_first_of(' '); - Checks::check_exit( - VCPKG_LINE_INFO, start != std::string::npos, "Unexpected output format from command: %s", cmd_line); + if (!Strings::case_insensitive_ascii_starts_with(hash_type, "SHA")) + { + Checks::exit_with_message( + VCPKG_LINE_INFO, "shasum only supports SHA hashes, but %s was provided", hash_type); + } - const auto end = output.find_first_of("\r\n", start + 1); - Checks::check_exit( - VCPKG_LINE_INFO, end != std::string::npos, "Unexpected output format from command: %s", cmd_line); + const std::string digest_size = hash_type.substr(3, hash_type.length() - 3); - auto hash = output.substr(0, start); - Util::erase_remove_if(hash, isspace); - return hash; + const std::string cmd_line = Strings::format( + R"(shasum -a %s "%s" | awk '{ print $1 }')", digest_size, path.u8string()); + const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); + Checks::check_exit(VCPKG_LINE_INFO, + ec_data.exit_code == 0, + "Failed to run:\n" + " %s", + cmd_line); + return Strings::trim(std::string{ec_data.output}); } } #endif @@ -147,13 +142,13 @@ namespace vcpkg::Commands::Hash nullptr, }; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) + void perform_and_exit(const VcpkgCmdArguments& args) { Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); const fs::path file_to_hash = args.command_arguments[0]; const std::string algorithm = args.command_arguments.size() == 2 ? args.command_arguments[1] : "SHA512"; - const std::string hash = get_file_hash(paths, file_to_hash, algorithm); + const std::string hash = get_file_hash(file_to_hash, algorithm); System::println(hash); Checks::exit_success(VCPKG_LINE_INFO); } -- cgit v1.2.3 From e71230855443a0b87c38e011531cfc6b9d6ffce5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Apr 2018 16:41:52 -0700 Subject: [vcpkg hash] Add string hashing (as opposed to file hashing) --- toolsrc/include/vcpkg/commands.h | 4 ++- toolsrc/src/vcpkg/commands.hash.cpp | 57 +++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 65e7fdd14..d8d2abfa9 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -131,8 +131,10 @@ namespace vcpkg::Commands namespace Hash { + std::string get_string_hash(const std::string& s, const std::string& hash_type); + std::string get_file_hash(const fs::path& path, const std::string& hash_type); + void perform_and_exit(const VcpkgCmdArguments& args); - std::string get_file_hash(fs::path const& path, std::string const& hash_type); } namespace Fetch diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 087f3e682..856b0e283 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -103,6 +103,42 @@ namespace vcpkg::Commands::Hash return to_hex(hash_buffer.get(), length_in_bytes); } + + std::string get_string_hash(const std::string& s, const std::string& hash_type) + { + BCryptAlgorithmHandle algorithm_handle; + + NTSTATUS error_code = BCryptOpenAlgorithmProvider( + &algorithm_handle.handle, Strings::to_utf16(Strings::ascii_to_uppercase(hash_type)).c_str(), nullptr, 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to open the algorithm provider"); + + DWORD hash_buffer_bytes; + DWORD cb_data; + error_code = BCryptGetProperty(algorithm_handle.handle, + BCRYPT_HASH_LENGTH, + reinterpret_cast(&hash_buffer_bytes), + sizeof(DWORD), + &cb_data, + 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to get hash length"); + const ULONG length_in_bytes = hash_buffer_bytes; + + BCryptHashHandle hash_handle; + + error_code = BCryptCreateHash(algorithm_handle.handle, &hash_handle.handle, nullptr, 0, nullptr, 0, 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to initialize the hasher"); + + auto* const buffer = reinterpret_cast(const_cast(s.c_str())); + error_code = BCryptHashData(hash_handle.handle, buffer, static_cast(s.size()), 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to hash data"); + + std::unique_ptr hash_buffer = std::make_unique(length_in_bytes); + + error_code = BCryptFinishHash(hash_handle.handle, hash_buffer.get(), length_in_bytes, 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to finalize the hash"); + + return to_hex(hash_buffer.get(), length_in_bytes); + } } #else @@ -128,6 +164,27 @@ namespace vcpkg::Commands::Hash cmd_line); return Strings::trim(std::string{ec_data.output}); } + + std::string get_string_hash(const std::string& s, const std::string& hash_type) + { + if (!Strings::case_insensitive_ascii_starts_with(hash_type, "SHA")) + { + Checks::exit_with_message( + VCPKG_LINE_INFO, "shasum only supports SHA hashes, but %s was provided", hash_type); + } + + const std::string digest_size = hash_type.substr(3, hash_type.length() - 3); + + const std::string cmd_line = Strings::format( + R"(echo -n "%s" | shasum -a %s | awk '{ print $1 }')", s, digest_size); + const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); + Checks::check_exit(VCPKG_LINE_INFO, + ec_data.exit_code == 0, + "Failed to run:\n" + " %s", + cmd_line); + return Strings::trim(std::string{ec_data.output}); + } } #endif -- cgit v1.2.3 From c1257f988a49b167cd9d94a0931806c6e465700a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Apr 2018 17:03:45 -0700 Subject: [vcpkg hash] Refactor to reduce code duplication --- toolsrc/src/vcpkg/commands.hash.cpp | 149 +++++++++++++++++++----------------- 1 file changed, 78 insertions(+), 71 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 856b0e283..c0130f12f 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -18,7 +18,7 @@ namespace vcpkg::Commands::Hash { namespace { - static std::string to_hex(const unsigned char* string, const size_t bytes) + std::string to_hex(const unsigned char* string, const size_t bytes) { static constexpr char HEX_MAP[] = "0123456789abcdef"; @@ -58,86 +58,93 @@ namespace vcpkg::Commands::Hash if (handle) BCryptDestroyHash(handle); } }; - } - std::string get_file_hash(const fs::path& path, const std::string& hash_type) - { - BCryptAlgorithmHandle algorithm_handle; - - NTSTATUS error_code = BCryptOpenAlgorithmProvider( - &algorithm_handle.handle, Strings::to_utf16(Strings::ascii_to_uppercase(hash_type)).c_str(), nullptr, 0); - Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to open the algorithm provider"); - - DWORD hash_buffer_bytes; - DWORD cb_data; - error_code = BCryptGetProperty(algorithm_handle.handle, - BCRYPT_HASH_LENGTH, - reinterpret_cast(&hash_buffer_bytes), - sizeof(DWORD), - &cb_data, - 0); - Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to get hash length"); - const ULONG length_in_bytes = hash_buffer_bytes; - - BCryptHashHandle hash_handle; - - error_code = BCryptCreateHash(algorithm_handle.handle, &hash_handle.handle, nullptr, 0, nullptr, 0, 0); - Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to initialize the hasher"); - - FILE* file = nullptr; - const auto ec = _wfopen_s(&file, path.c_str(), L"rb"); - Checks::check_exit(VCPKG_LINE_INFO, ec == 0, "Failed to open file: %s", path.u8string()); - unsigned char buffer[4096]; - while (const auto actual_size = fread(buffer, 1, sizeof(buffer), file)) + struct BCryptHasher { - error_code = BCryptHashData(hash_handle.handle, buffer, static_cast(actual_size), 0); - Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to hash data"); - } - - fclose(file); - - std::unique_ptr hash_buffer = std::make_unique(length_in_bytes); - - error_code = BCryptFinishHash(hash_handle.handle, hash_buffer.get(), length_in_bytes, 0); - Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to finalize the hash"); - - return to_hex(hash_buffer.get(), length_in_bytes); - } - - std::string get_string_hash(const std::string& s, const std::string& hash_type) - { - BCryptAlgorithmHandle algorithm_handle; + explicit BCryptHasher(const std::string& hash_type) + { + NTSTATUS error_code = + BCryptOpenAlgorithmProvider(&this->algorithm_handle.handle, + Strings::to_utf16(Strings::ascii_to_uppercase(hash_type)).c_str(), + nullptr, + 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to open the algorithm provider"); + + DWORD hash_buffer_bytes; + DWORD cb_data; + error_code = BCryptGetProperty(this->algorithm_handle.handle, + BCRYPT_HASH_LENGTH, + reinterpret_cast(&hash_buffer_bytes), + sizeof(DWORD), + &cb_data, + 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to get hash length"); + this->length_in_bytes = hash_buffer_bytes; + } - NTSTATUS error_code = BCryptOpenAlgorithmProvider( - &algorithm_handle.handle, Strings::to_utf16(Strings::ascii_to_uppercase(hash_type)).c_str(), nullptr, 0); - Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to open the algorithm provider"); + std::string hash_file(const fs::path& path) const + { + BCryptHashHandle hash_handle; + this->initialize_hash_handle(hash_handle); + + FILE* file = nullptr; + const auto ec = _wfopen_s(&file, path.c_str(), L"rb"); + Checks::check_exit(VCPKG_LINE_INFO, ec == 0, "Failed to open file: %s", path.u8string()); + unsigned char buffer[4096]; + while (const auto actual_size = fread(buffer, 1, sizeof(buffer), file)) + { + hash_data(hash_handle, buffer, actual_size); + } + fclose(file); + + return this->finalize_hash_handle(hash_handle); + } - DWORD hash_buffer_bytes; - DWORD cb_data; - error_code = BCryptGetProperty(algorithm_handle.handle, - BCRYPT_HASH_LENGTH, - reinterpret_cast(&hash_buffer_bytes), - sizeof(DWORD), - &cb_data, - 0); - Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to get hash length"); - const ULONG length_in_bytes = hash_buffer_bytes; + std::string hash_string(const std::string& s) const + { + BCryptHashHandle hash_handle; + this->initialize_hash_handle(hash_handle); + hash_data(hash_handle, reinterpret_cast(const_cast(s.c_str())), s.size()); + return this->finalize_hash_handle(hash_handle); + } - BCryptHashHandle hash_handle; + private: + void initialize_hash_handle(BCryptHashHandle& hash_handle) const + { + const NTSTATUS error_code = + BCryptCreateHash(this->algorithm_handle.handle, &hash_handle.handle, nullptr, 0, nullptr, 0, 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to initialize the hasher"); + } - error_code = BCryptCreateHash(algorithm_handle.handle, &hash_handle.handle, nullptr, 0, nullptr, 0, 0); - Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to initialize the hasher"); + void hash_data(BCryptHashHandle& hash_handle, unsigned char* buffer, const size_t& data_size) const + { + const NTSTATUS error_code = + BCryptHashData(hash_handle.handle, buffer, static_cast(data_size), 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to hash data"); + } - auto* const buffer = reinterpret_cast(const_cast(s.c_str())); - error_code = BCryptHashData(hash_handle.handle, buffer, static_cast(s.size()), 0); - Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to hash data"); + std::string finalize_hash_handle(const BCryptHashHandle& hash_handle) const + { + std::unique_ptr hash_buffer = std::make_unique(this->length_in_bytes); + const NTSTATUS error_code = + BCryptFinishHash(hash_handle.handle, hash_buffer.get(), this->length_in_bytes, 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to finalize the hash"); + return to_hex(hash_buffer.get(), this->length_in_bytes); + } - std::unique_ptr hash_buffer = std::make_unique(length_in_bytes); + BCryptAlgorithmHandle algorithm_handle; + ULONG length_in_bytes; + }; + } - error_code = BCryptFinishHash(hash_handle.handle, hash_buffer.get(), length_in_bytes, 0); - Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to finalize the hash"); + std::string get_file_hash(const fs::path& path, const std::string& hash_type) + { + return BCryptHasher{hash_type}.hash_file(path); + } - return to_hex(hash_buffer.get(), length_in_bytes); + std::string get_string_hash(const std::string& s, const std::string& hash_type) + { + return BCryptHasher{hash_type}.hash_string(s); } } -- cgit v1.2.3 From 3f6f9f3f4d48ef0115f3095f7d8d2c6d3b0c63e1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Apr 2018 17:12:59 -0700 Subject: [metrics] Use new string-hash functions instead of ps1 script --- scripts/SHA256Hash.ps1 | 9 --------- toolsrc/src/vcpkg/metrics.cpp | 11 ++--------- 2 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 scripts/SHA256Hash.ps1 diff --git a/scripts/SHA256Hash.ps1 b/scripts/SHA256Hash.ps1 deleted file mode 100644 index 348d461b7..000000000 --- a/scripts/SHA256Hash.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -[CmdletBinding()] -Param( - [Parameter(Mandatory=$True)] - [String]$Value -) - -$sha256 = New-Object -TypeName System.Security.Cryptography.SHA256CryptoServiceProvider -$utf8 = New-Object -TypeName System.Text.UTF8Encoding -[System.BitConverter]::ToString($sha256.ComputeHash($utf8.GetBytes($Value))) diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 9e17b237d..4067efc95 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -264,17 +264,10 @@ namespace vcpkg::Metrics while (next != last) { - auto match = *next; + const auto match = *next; if (match[0] != "00-00-00-00-00-00") { - const std::string matchstr = match[0]; - const System::PowershellParameter value("Value", matchstr); - auto hash_result = System::powershell_execute_and_capture_output( - "SHA256Hash", get_vcpkg_root() / "scripts" / "SHA256Hash.ps1", {value}); - Util::erase_remove_if(hash_result, - [](char ch) { return !(ch >= 'A' && ch <= 'F') && !(ch >= '0' && ch <= '9'); }); - hash_result = Strings::ascii_to_lowercase(hash_result); - return hash_result; + return vcpkg::Commands::Hash::get_string_hash(match[0], "SHA256"); } ++next; } -- cgit v1.2.3 From ca9503b9d7f9bca6e2f9881a7f4ec9ce9d600928 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Apr 2018 21:28:02 -0700 Subject: [vcpkg hash] Refactor and tweaks in BCryptHasher. --- toolsrc/src/vcpkg/commands.hash.cpp | 83 +++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index c0130f12f..19f73b463 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -39,28 +39,52 @@ namespace vcpkg::Commands::Hash return output; } - struct BCryptAlgorithmHandle : Util::ResourceBase + class BCryptHasher { - BCRYPT_ALG_HANDLE handle = nullptr; + struct BCryptAlgorithmHandle : Util::ResourceBase + { + BCRYPT_ALG_HANDLE handle = nullptr; + + ~BCryptAlgorithmHandle() + { + if (handle) BCryptCloseAlgorithmProvider(handle, 0); + } + }; + + struct BCryptHashHandle : Util::ResourceBase + { + BCRYPT_HASH_HANDLE handle = nullptr; + + ~BCryptHashHandle() + { + if (handle) BCryptDestroyHash(handle); + } + }; - ~BCryptAlgorithmHandle() + static void initialize_hash_handle(BCryptHashHandle& hash_handle, + const BCryptAlgorithmHandle& algorithm_handle) { - if (handle) BCryptCloseAlgorithmProvider(handle, 0); + const NTSTATUS error_code = + BCryptCreateHash(algorithm_handle.handle, &hash_handle.handle, nullptr, 0, nullptr, 0, 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to initialize the hasher"); } - }; - struct BCryptHashHandle : Util::ResourceBase - { - BCRYPT_HASH_HANDLE handle = nullptr; + static void hash_data(BCryptHashHandle& hash_handle, const unsigned char* buffer, const size_t& data_size) + { + const NTSTATUS error_code = BCryptHashData( + hash_handle.handle, const_cast(buffer), static_cast(data_size), 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to hash data"); + } - ~BCryptHashHandle() + static std::string finalize_hash_handle(const BCryptHashHandle& hash_handle, const ULONG length_in_bytes) { - if (handle) BCryptDestroyHash(handle); + std::unique_ptr hash_buffer = std::make_unique(length_in_bytes); + const NTSTATUS error_code = BCryptFinishHash(hash_handle.handle, hash_buffer.get(), length_in_bytes, 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to finalize the hash"); + return to_hex(hash_buffer.get(), length_in_bytes); } - }; - struct BCryptHasher - { + public: explicit BCryptHasher(const std::string& hash_type) { NTSTATUS error_code = @@ -85,7 +109,7 @@ namespace vcpkg::Commands::Hash std::string hash_file(const fs::path& path) const { BCryptHashHandle hash_handle; - this->initialize_hash_handle(hash_handle); + initialize_hash_handle(hash_handle, this->algorithm_handle); FILE* file = nullptr; const auto ec = _wfopen_s(&file, path.c_str(), L"rb"); @@ -97,41 +121,18 @@ namespace vcpkg::Commands::Hash } fclose(file); - return this->finalize_hash_handle(hash_handle); + return finalize_hash_handle(hash_handle, length_in_bytes); } std::string hash_string(const std::string& s) const { BCryptHashHandle hash_handle; - this->initialize_hash_handle(hash_handle); - hash_data(hash_handle, reinterpret_cast(const_cast(s.c_str())), s.size()); - return this->finalize_hash_handle(hash_handle); + initialize_hash_handle(hash_handle, this->algorithm_handle); + hash_data(hash_handle, reinterpret_cast(s.c_str()), s.size()); + return finalize_hash_handle(hash_handle, length_in_bytes); } private: - void initialize_hash_handle(BCryptHashHandle& hash_handle) const - { - const NTSTATUS error_code = - BCryptCreateHash(this->algorithm_handle.handle, &hash_handle.handle, nullptr, 0, nullptr, 0, 0); - Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to initialize the hasher"); - } - - void hash_data(BCryptHashHandle& hash_handle, unsigned char* buffer, const size_t& data_size) const - { - const NTSTATUS error_code = - BCryptHashData(hash_handle.handle, buffer, static_cast(data_size), 0); - Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to hash data"); - } - - std::string finalize_hash_handle(const BCryptHashHandle& hash_handle) const - { - std::unique_ptr hash_buffer = std::make_unique(this->length_in_bytes); - const NTSTATUS error_code = - BCryptFinishHash(hash_handle.handle, hash_buffer.get(), this->length_in_bytes, 0); - Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to finalize the hash"); - return to_hex(hash_buffer.get(), this->length_in_bytes); - } - BCryptAlgorithmHandle algorithm_handle; ULONG length_in_bytes; }; -- cgit v1.2.3 From ec790eb1716fca367dccc2b5f7e96a8719ca74fa Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Apr 2018 22:01:11 -0700 Subject: [vcpkg hash] Refactor to reduce repetition. Allow simple chars in get_string_hash() for now. --- toolsrc/src/vcpkg/commands.hash.cpp | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 19f73b463..a3ac2cbbb 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -152,7 +152,7 @@ namespace vcpkg::Commands::Hash #else namespace vcpkg::Commands::Hash { - std::string get_file_hash(const fs::path& path, const std::string& hash_type) + static std::string get_digest_size(const std::string& hash_type) { if (!Strings::case_insensitive_ascii_starts_with(hash_type, "SHA")) { @@ -160,10 +160,11 @@ namespace vcpkg::Commands::Hash VCPKG_LINE_INFO, "shasum only supports SHA hashes, but %s was provided", hash_type); } - const std::string digest_size = hash_type.substr(3, hash_type.length() - 3); + return hash_type.substr(3, hash_type.length() - 3); + } - const std::string cmd_line = Strings::format( - R"(shasum -a %s "%s" | awk '{ print $1 }')", digest_size, path.u8string()); + static std::string run_shasum_and_post_process(const std::string& cmd_line) + { const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); Checks::check_exit(VCPKG_LINE_INFO, ec_data.exit_code == 0, @@ -173,25 +174,27 @@ namespace vcpkg::Commands::Hash return Strings::trim(std::string{ec_data.output}); } + std::string get_file_hash(const fs::path& path, const std::string& hash_type) + { + const std::string digest_size = get_digest_size(hash_type); + const std::string cmd_line = Strings::format( + R"(shasum -a %s "%s" | awk '{ print $1 }')", digest_size, path.u8string()); + return run_shasum_and_post_process(cmd_line); + } + std::string get_string_hash(const std::string& s, const std::string& hash_type) { - if (!Strings::case_insensitive_ascii_starts_with(hash_type, "SHA")) - { - Checks::exit_with_message( - VCPKG_LINE_INFO, "shasum only supports SHA hashes, but %s was provided", hash_type); - } + const std::string digest_size = get_digest_size(hash_type); - const std::string digest_size = hash_type.substr(3, hash_type.length() - 3); + static const std::regex ALLOWED_CHARS{"^[a-zA-Z0-9:]*$"}; + + Checks::check_exit(VCPKG_LINE_INFO, + std::regex_match(s, ALLOWED_CHARS), + "Only alphanumeric chars and colons are currently allowed"); const std::string cmd_line = Strings::format( R"(echo -n "%s" | shasum -a %s | awk '{ print $1 }')", s, digest_size); - const auto ec_data = System::cmd_execute_and_capture_output(cmd_line); - Checks::check_exit(VCPKG_LINE_INFO, - ec_data.exit_code == 0, - "Failed to run:\n" - " %s", - cmd_line); - return Strings::trim(std::string{ec_data.output}); + return run_shasum_and_post_process(cmd_line); } } #endif -- cgit v1.2.3 From 1bfb01cfeeffc8c8161f64b1bd2986557b6ba207 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 5 Apr 2018 22:05:55 -0700 Subject: [vcpkg hash] Add sanity checking --- toolsrc/include/vcpkg/commands.h | 4 ++-- toolsrc/src/vcpkg/build.cpp | 8 ++++---- toolsrc/src/vcpkg/commands.cpp | 2 +- toolsrc/src/vcpkg/commands.fetch.cpp | 2 +- toolsrc/src/vcpkg/commands.hash.cpp | 33 +++++++++++++++++++++++---------- 5 files changed, 31 insertions(+), 18 deletions(-) diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index d8d2abfa9..6d29b7960 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -132,9 +132,9 @@ namespace vcpkg::Commands namespace Hash { std::string get_string_hash(const std::string& s, const std::string& hash_type); - std::string get_file_hash(const fs::path& path, const std::string& hash_type); + std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type); - void perform_and_exit(const VcpkgCmdArguments& args); + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } namespace Fetch diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 16a85db52..b7055100b 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -457,9 +457,9 @@ namespace vcpkg::Build abi_tag_entries.insert(abi_tag_entries.end(), dependency_abis.begin(), dependency_abis.end()); abi_tag_entries.emplace_back( - AbiEntry{"portfile", Commands::Hash::get_file_hash(config.port_dir / "portfile.cmake", "SHA1")}); + AbiEntry{"portfile", Commands::Hash::get_file_hash(paths, config.port_dir / "portfile.cmake", "SHA1")}); abi_tag_entries.emplace_back( - AbiEntry{"control", Commands::Hash::get_file_hash(config.port_dir / "CONTROL", "SHA1")}); + AbiEntry{"control", Commands::Hash::get_file_hash(paths, config.port_dir / "CONTROL", "SHA1")}); abi_tag_entries.emplace_back(AbiEntry{"triplet", pre_build_info.triplet_abi_tag}); @@ -494,7 +494,7 @@ namespace vcpkg::Build auto abi_file_path = paths.buildtrees / name / (triplet.canonical_name() + ".vcpkg_abi_info.txt"); fs.write_contents(abi_file_path, full_abi_info); - return AbiTagAndFile{Commands::Hash::get_file_hash(abi_file_path, "SHA1"), abi_file_path}; + return AbiTagAndFile{Commands::Hash::get_file_hash(paths, abi_file_path, "SHA1"), abi_file_path}; } else { @@ -784,7 +784,7 @@ namespace vcpkg::Build { return it_hash->second; } - auto hash = Commands::Hash::get_file_hash(triplet_file_path, "SHA1"); + auto hash = Commands::Hash::get_file_hash(paths, triplet_file_path, "SHA1"); s_hash_cache.emplace(triplet_file_path, hash); return hash; } diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index 9041b37ff..8b6ffb3d7 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -42,6 +42,7 @@ namespace vcpkg::Commands {"cache", &Cache::perform_and_exit}, {"portsdiff", &PortsDiff::perform_and_exit}, {"autocomplete", &Autocomplete::perform_and_exit}, + {"hash", &Hash::perform_and_exit}, // {"fetch", &Fetch::perform_and_exit}, }; return t; @@ -52,7 +53,6 @@ namespace vcpkg::Commands static std::vector> t = { {"version", &Version::perform_and_exit}, {"contact", &Contact::perform_and_exit}, - {"hash", &Hash::perform_and_exit}, }; return t; } diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 1ba043728..e369f44d2 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -240,7 +240,7 @@ namespace vcpkg::Commands::Fetch R"(curl -L '%s' --create-dirs --output '%s')", url, download_path_part)); Checks::check_exit(VCPKG_LINE_INFO, code == 0, "Could not download %s", url); - const std::string actual_hash = Hash::get_file_hash(download_path_part, "SHA512"); + const std::string actual_hash = Hash::get_file_hash(paths, download_path_part, "SHA512"); Checks::check_exit(VCPKG_LINE_INFO, sha512 == actual_hash, "File does not have the expected hash:\n" diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index a3ac2cbbb..3f90eeaca 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -7,6 +7,19 @@ #include #include +namespace vcpkg::Commands::Hash +{ + static void verify_has_only_allowed_chars(const std::string& s) + { + static const std::regex ALLOWED_CHARS{"^[a-zA-Z0-9-]*$"}; + Checks::check_exit(VCPKG_LINE_INFO, + std::regex_match(s, ALLOWED_CHARS), + "Only alphanumeric chars and dashes are currently allowed. String was:\n" + " % s", + s); + } +} + #if defined(_WIN32) #include @@ -138,13 +151,16 @@ namespace vcpkg::Commands::Hash }; } - std::string get_file_hash(const fs::path& path, const std::string& hash_type) + std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type) { + Checks::check_exit( + VCPKG_LINE_INFO, paths.get_filesystem().exists(path), "File %s does not exist", path.u8string()); return BCryptHasher{hash_type}.hash_file(path); } std::string get_string_hash(const std::string& s, const std::string& hash_type) { + verify_has_only_allowed_chars(s); return BCryptHasher{hash_type}.hash_string(s); } } @@ -174,9 +190,11 @@ namespace vcpkg::Commands::Hash return Strings::trim(std::string{ec_data.output}); } - std::string get_file_hash(const fs::path& path, const std::string& hash_type) + std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type) { const std::string digest_size = get_digest_size(hash_type); + Checks::check_exit( + VCPKG_LINE_INFO, paths.get_filesystem().exists(path), "File %s does not exist", path.u8string()); const std::string cmd_line = Strings::format( R"(shasum -a %s "%s" | awk '{ print $1 }')", digest_size, path.u8string()); return run_shasum_and_post_process(cmd_line); @@ -185,12 +203,7 @@ namespace vcpkg::Commands::Hash std::string get_string_hash(const std::string& s, const std::string& hash_type) { const std::string digest_size = get_digest_size(hash_type); - - static const std::regex ALLOWED_CHARS{"^[a-zA-Z0-9:]*$"}; - - Checks::check_exit(VCPKG_LINE_INFO, - std::regex_match(s, ALLOWED_CHARS), - "Only alphanumeric chars and colons are currently allowed"); + verify_has_only_allowed_chars(s); const std::string cmd_line = Strings::format( R"(echo -n "%s" | shasum -a %s | awk '{ print $1 }')", s, digest_size); @@ -210,13 +223,13 @@ namespace vcpkg::Commands::Hash nullptr, }; - void perform_and_exit(const VcpkgCmdArguments& args) + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); const fs::path file_to_hash = args.command_arguments[0]; const std::string algorithm = args.command_arguments.size() == 2 ? args.command_arguments[1] : "SHA512"; - const std::string hash = get_file_hash(file_to_hash, algorithm); + const std::string hash = get_file_hash(paths, file_to_hash, algorithm); System::println(hash); Checks::exit_success(VCPKG_LINE_INFO); } -- cgit v1.2.3 From 7d5c33cf1b9483c94894e5f1831c8411b36f37cf Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 14:36:48 -0700 Subject: [vcpkgTools.xml] Bump version to "2" --- scripts/vcpkgTools.xml | 2 +- toolsrc/src/vcpkg/commands.fetch.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 07284333c..ba81ed926 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -1,5 +1,5 @@ - + 3.10.2 cmake-3.10.2-win32-x86\bin\cmake.exe diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index e369f44d2..d085fb0f7 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -51,7 +51,7 @@ namespace vcpkg::Commands::Fetch static constexpr StringLiteral OS_STRING = "linux"; #endif - static const std::string XML_VERSION = "1"; + static const std::string XML_VERSION = "2"; static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; const auto maybe_get_string_inside_tags = [](const std::string& input, -- cgit v1.2.3 From ee75dd08d3ea93eb2cc2f309a1f49abe2b470448 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 14:45:50 -0700 Subject: Improve error message --- toolsrc/src/vcpkg/commands.fetch.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index d085fb0f7..0be097bc9 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -83,8 +83,11 @@ namespace vcpkg::Commands::Fetch std::smatch match_xml_version; const bool has_xml_version = std::regex_search(XML.cbegin(), XML.cend(), match_xml_version, XML_VERSION_REGEX); - Checks::check_exit( - VCPKG_LINE_INFO, has_xml_version, "Could not find in %s", XML_PATH.generic_string()); + Checks::check_exit(VCPKG_LINE_INFO, + has_xml_version, + R"(Could not find in %s)", + XML_VERSION, + XML_PATH.generic_string()); Checks::check_exit(VCPKG_LINE_INFO, XML_VERSION == match_xml_version[1], "Expected %s version: [%s], but was [%s]. Please re-run bootstrap-vcpkg.", -- cgit v1.2.3 From d11014e2ae97c8f7b38f72d23d942a4f107afd26 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 14:46:40 -0700 Subject: Don't ignore fs.rename() errors --- toolsrc/src/vcpkg/commands.fetch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 0be097bc9..85ec6b289 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -222,7 +222,7 @@ namespace vcpkg::Commands::Fetch Checks::exit_with_message(VCPKG_LINE_INFO, "Unexpected archive extension: %s", ext.u8string()); } - fs.rename(to_path_partial, to_path, ec); + fs.rename(to_path_partial, to_path); } static void download_file(const VcpkgPaths& paths, @@ -256,7 +256,7 @@ namespace vcpkg::Commands::Fetch sha512, actual_hash); - fs.rename(download_path_part, download_path, ec); + fs.rename(download_path_part, download_path); } static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) -- cgit v1.2.3 From ba432c23bccb3e0eb716765984cc9e9e91845822 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 14:47:15 -0700 Subject: Fix spacing in error message --- toolsrc/src/vcpkg/commands.fetch.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 85ec6b289..7cce312dd 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -247,10 +247,10 @@ namespace vcpkg::Commands::Fetch Checks::check_exit(VCPKG_LINE_INFO, sha512 == actual_hash, "File does not have the expected hash:\n" - " url : [ %s ]\n" - " File path : [ %s ]\n" - " Expected hash: [ %s ]\n" - " Actual hash: [ %s ] \n", + " url : [ %s ]\n" + " File path : [ %s ]\n" + " Expected hash : [ %s ]\n" + " Actual hash : [ %s ]\n", url, download_path.u8string(), sha512, -- cgit v1.2.3 From 80f16f769e981b4a52ae841dd71f73009866133c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 14:51:53 -0700 Subject: Use Cache class --- toolsrc/include/vcpkg/vcpkgpaths.h | 3 ++- toolsrc/src/vcpkg/vcpkgpaths.cpp | 9 +-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 090414de3..fc6b319d8 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -3,6 +3,7 @@ #include #include +#include #include #include #include @@ -89,7 +90,7 @@ namespace vcpkg private: Lazy> available_triplets; - mutable std::map tool_paths; + Cache tool_paths; Lazy> toolsets; Lazy> toolsets_vs2013; diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 4f998d579..0903c2d76 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -91,14 +91,7 @@ namespace vcpkg const fs::path& VcpkgPaths::get_tool_exe(const std::string& tool) const { - const auto it = this->tool_paths.find(tool); - if (it != this->tool_paths.cend()) - { - return it->second; - } - - this->tool_paths[tool] = Commands::Fetch::get_tool_path(*this, tool); - return this->tool_paths[tool]; + return this->tool_paths.get_lazy(tool, [&]() { return Commands::Fetch::get_tool_path(*this, tool); }); } const Toolset& VcpkgPaths::get_toolset(const Build::PreBuildInfo& prebuildinfo) const -- cgit v1.2.3 From 5d96ff1229d3e93f901215f054225d2859b07f5f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 15:12:26 -0700 Subject: [fetch] Don't attempt to download on unknown OSes --- toolsrc/src/vcpkg/commands.fetch.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 7cce312dd..1d2c67d67 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -47,10 +47,13 @@ namespace vcpkg::Commands::Fetch static constexpr StringLiteral OS_STRING = "windows"; #elif defined(__APPLE__) static constexpr StringLiteral OS_STRING = "osx"; -#else // assume linux +#elif defined(__linux__) static constexpr StringLiteral OS_STRING = "linux"; +#else + return ToolData{}; #endif +#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) static const std::string XML_VERSION = "2"; static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; @@ -137,6 +140,7 @@ namespace vcpkg::Commands::Fetch paths.downloads / archive_name.value_or(exe_relative_path), tool_dir_path, sha512}; +#endif } static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd, -- cgit v1.2.3 From b87aeb77deb7b6cdc7e78d0b006243a15993e78c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 15:17:16 -0700 Subject: [vcpkg.exe] Verify hash for already present files. Dont check for path twice --- toolsrc/src/vcpkg/commands.fetch.cpp | 42 ++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 1d2c67d67..cf19b4384 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -229,17 +229,31 @@ namespace vcpkg::Commands::Fetch fs.rename(to_path_partial, to_path); } + static void verify_hash(const VcpkgPaths& paths, + const std::string& url, + const fs::path& path, + const std::string& sha512) + { + const std::string actual_hash = Hash::get_file_hash(paths, path, "SHA512"); + Checks::check_exit(VCPKG_LINE_INFO, + sha512 == actual_hash, + "File does not have the expected hash:\n" + " url : [ %s ]\n" + " File path : [ %s ]\n" + " Expected hash : [ %s ]\n" + " Actual hash : [ %s ]\n", + url, + path.u8string(), + sha512, + actual_hash); + } + static void download_file(const VcpkgPaths& paths, const std::string& url, const fs::path& download_path, const std::string& sha512) { Files::Filesystem& fs = paths.get_filesystem(); - if (fs.exists(download_path)) - { - return; - } - const std::string download_path_part = download_path.u8string() + ".part"; std::error_code ec; fs.remove(download_path_part, ec); @@ -247,19 +261,7 @@ namespace vcpkg::Commands::Fetch R"(curl -L '%s' --create-dirs --output '%s')", url, download_path_part)); Checks::check_exit(VCPKG_LINE_INFO, code == 0, "Could not download %s", url); - const std::string actual_hash = Hash::get_file_hash(paths, download_path_part, "SHA512"); - Checks::check_exit(VCPKG_LINE_INFO, - sha512 == actual_hash, - "File does not have the expected hash:\n" - " url : [ %s ]\n" - " File path : [ %s ]\n" - " Expected hash : [ %s ]\n" - " Actual hash : [ %s ]\n", - url, - download_path.u8string(), - sha512, - actual_hash); - + verify_hash(paths, url, download_path_part, sha512); fs.rename(download_path_part, download_path); } @@ -302,6 +304,10 @@ namespace vcpkg::Commands::Fetch download_file(paths, tool_data.url, tool_data.download_path, tool_data.sha512); System::println("Downloading %s... done.", tool_name); } + else + { + verify_hash(paths, tool_data.url, tool_data.download_path, tool_data.sha512); + } System::println("Extracting %s...", tool_name); extract_archive(paths, tool_data.download_path, tool_data.tool_dir_path); -- cgit v1.2.3 From d5a1e1054120c993560e5de1c6ad8ac16131d356 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 15:22:50 -0700 Subject: [ps1] Verify hash for already present files. Dont check for path twice --- scripts/VcpkgPowershellUtils.ps1 | 23 ++++------------------- scripts/fetchTool.ps1 | 4 ++++ 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 63069f44d..f6882409b 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -105,9 +105,9 @@ function vcpkgGetSHA512([Parameter(Mandatory=$true)][string]$filePath) function vcpkgCheckEqualFileHash( [Parameter(Mandatory=$true)][string]$url, [Parameter(Mandatory=$true)][string]$filePath, - [Parameter(Mandatory=$true)][string]$expectedHash, - [Parameter(Mandatory=$true)][string]$actualHash) + [Parameter(Mandatory=$true)][string]$expectedHash) { + $actualHash = vcpkgGetSHA512 $filePath if ($expectedHash -ne $actualHash) { Write-Host ("`nFile does not have expected hash:`n" + @@ -123,11 +123,6 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, [Parameter(Mandatory=$true)][string]$downloadPath, [Parameter(Mandatory=$true)][string]$sha512) { - if (Test-Path $downloadPath) - { - return - } - if ($url -match "github") { if ([System.Enum]::IsDefined([Net.SecurityProtocolType], "Tls12")) @@ -155,10 +150,7 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, } $wc.DownloadFile($url, $downloadPartPath) - - $actualHash = vcpkgGetSHA512 $downloadPartPath - vcpkgCheckEqualFileHash -url $url -filePath $downloadPath -expectedHash $sha512 -actualHash $actualHash - + vcpkgCheckEqualFileHash -url $url -filePath $downloadPartPath -expectedHash $sha512 Move-Item -Path $downloadPartPath -Destination $downloadPath } @@ -167,11 +159,6 @@ function vcpkgDownloadFileWithAria2( [Parameter(Mandatory=$true)][string]$ari [Parameter(Mandatory=$true)][string]$downloadPath, [Parameter(Mandatory=$true)][string]$sha512) { - if (Test-Path $downloadPath) - { - return - } - vcpkgCreateParentDirectoryIfNotExists $downloadPath $downloadPartPath = "$downloadPath.part" vcpkgRemoveItem $downloadPartPath @@ -186,9 +173,7 @@ function vcpkgDownloadFileWithAria2( [Parameter(Mandatory=$true)][string]$ari throw } - $actualHash = vcpkgGetSHA512 $downloadPartPath - vcpkgCheckEqualFileHash -url $url -filePath $downloadPath -expectedHash $sha512 -actualHash $actualHash - + vcpkgCheckEqualFileHash -url $url -filePath $downloadPartPath -expectedHash $sha512 Move-Item -Path $downloadPartPath -Destination $downloadPath } diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index c1e8d87fc..8de642674 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -61,6 +61,10 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) Write-Host "Downloading $tool... done." } + else + { + vcpkgCheckEqualFileHash -url $url -filePath $downloadPath -expectedHash $toolData.sha512 + } if ($isArchive) { -- cgit v1.2.3 From be2ea0373fbbb17ec792155ebaec0d2dd3d95242 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 15:47:58 -0700 Subject: #ifdef linux-specific code --- toolsrc/src/vcpkg/commands.fetch.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index cf19b4384..9652d0b9e 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -199,6 +199,7 @@ namespace vcpkg::Commands::Fetch return data_lines; } +#if !defined(_WIN32) static void extract_archive(const VcpkgPaths& paths, const fs::path& archive, const fs::path& to_path) { Files::Filesystem& fs = paths.get_filesystem(); @@ -265,6 +266,7 @@ namespace vcpkg::Commands::Fetch fs.rename(download_path_part, download_path); } +#endif static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) { const auto& fs = paths.get_filesystem(); -- cgit v1.2.3 From 402bbbc1e2b26f714f88cc6f40283008dabba64f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 19:19:54 -0700 Subject: [Checks] Take parameter by ref --- toolsrc/include/vcpkg/base/checks.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/include/vcpkg/base/checks.h b/toolsrc/include/vcpkg/base/checks.h index fb162c897..bceee3428 100644 --- a/toolsrc/include/vcpkg/base/checks.h +++ b/toolsrc/include/vcpkg/base/checks.h @@ -27,7 +27,7 @@ namespace vcpkg::Checks // Display an error message to the user and exit the tool. [[noreturn]] void exit_with_message(const LineInfo& line_info, const char* error_message_template, - const Arg1 error_message_arg1, + const Arg1& error_message_arg1, const Args&... error_message_args) { exit_with_message(line_info, @@ -42,7 +42,7 @@ namespace vcpkg::Checks void check_exit(const LineInfo& line_info, Conditional&& expression, const char* error_message_template, - const Arg1 error_message_arg1, + const Arg1& error_message_arg1, const Args&... error_message_args) { if (!expression) -- cgit v1.2.3 From 15e4f46b45c432a41ee6a962609039bc2497ec19 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 4 Apr 2018 21:32:06 -0700 Subject: Update CHANGELOG and bump version to v0.0.108 --- CHANGELOG.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36c40f6e8..0cc88e2c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,68 @@ +vcpkg (0.0.108) +-------------- + * Add ports: + - google-cloud-cpp 0.1.0 + - mhook 2.5.1-1 + - mosquitto 1.4.15 + - pmdk 1.4-1 (renamed from nvml) + * Remove Ports: + - nvml 1.3-0 (renamed to pmdk) + * Update ports: + - abseil 2018-03-23 -> 2018-04-05 + - asio 1.12.0-1 -> 1.12.0-2 + - aws-sdk-cpp 1.4.21 -> 1.4.30-1 + - azure-c-shared-utility 1.0.0-pre-release-1.0.9 -> 1.1.2 + - azure-iot-sdk-c 1.0.0-pre-release-1.0.9 -> 1.2.2 + - azure-uamqp-c 1.0.0-pre-release-1.0.9 -> 1.2.2 + - azure-umqtt-c 1.0.0-pre-release-1.0.9 -> 1.1.2 + - breakpad 2018-03-13 -> 2018-04-05 + - clara 2018-03-23 -> 2018-04-02 + - cryptopp 5.6.5-1 -> 6.1.0-2 + - discord-rpc 3.1.0 -> 3.2.0 + - dlib 19.10 -> 19.10-1 + - eastl 3.08.00 -> 3.09.00 + - exiv2 2018-03-23 -> 2018-04-05 + - folly 2017.11.27.00-3 -> 2018.03.19.00-2 + - forest 4.5.0 -> 7.0.1 + - gdcm2 2.8.5 -> 2.8.6 + - grpc 1.10.0 -> 1.10.1 + - gtest 1.8.0-7 -> 1.8.0-8 + - libiconv 1.15-2 -> 1.15-3 + - libuv 1.19.2 -> 1.20.0 + - libvpx 1.6.1-2 -> 1.7.0 + - libxml2 2.9.4-4 -> 2.9.4-5 + - nuklear 2018-03-23 -> 2018-04-05 + - openimageio 1.8.9 -> 1.8.10 + - openssl 1.0.2n-3 -> 1.0.2o-1 + - qt5-base 5.9.2-5 -> 5.9.2-6 + - qt5-modularscripts 2 -> 3 + - qwt 6.1.3-4 -> 6.1.3-5 + - recast 1.5.1 -> 1.5.1-1 + - rocksdb 5.11.3 -> 5.12.2 + - rs-core-lib 2018-03-17 -> 2018-04-05 + - sciter 4.1.4 -> 4.1.5 + - tbb 2018_U2 -> 2018_U3 + - tesseract 3.05.01-2 -> 3.05.01-3 + - theia 0.7-d15154a-1 -> 0.7-d15154a-3 + - thrift 2018-03-23 -> 2018-04-05 + - unrar 5.5.8 -> 5.5.8-1 + - yoga 1.7.0 -> 1.7.0-1 + - zeromq 2018-03-23 -> 2018-04-05 + * `vcpkg.cmake`: Remove detection for Windows SDK. Let `cmake` detect it instead. + * Rework `vcpkgTools.xml`. + - `` renamed to `` + - `` renamed `` + - `` changed to `` + - `` tags now specify an `os="x"` property + - The version of the tools list (i.e. ``) is now verified by `vcpkg.exe`. + * Use [7zip](https://www.7-zip.org/) to extract vcpkg tools defined in `vcpkgTools.xml`. + * Use [aria2](https://aria2.github.io/) to download vcpkg tools defined in `vcpkgTools.xml`. + - The experimental flag `vcpkg install --x-use-aria2` allows you to use `aria2` for other downloads as well. + * `vckg hash` improvements + +-- vcpkg team FRI, 06 Apr 2018 19:30:00 -0800 + + vcpkg (0.0.107) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index daa1cd86e..2cd1bf9ac 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.107" \ No newline at end of file +"0.0.108" \ No newline at end of file -- cgit v1.2.3 From f63994db6c02266525b33c014f1447cb72a19e82 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 20:34:06 -0700 Subject: Update nuget.exe to 4.6.2 --- scripts/vcpkgTools.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index ba81ed926..a11ee344f 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -35,10 +35,10 @@ 42f8a8ffd0b156b2e30b2ec7bf7d19582b3ce38a2046ff62bd7fd82f12a8d66ed601e74865957864cef0a376e33a7d07cad746f03c57d1b95a7929a1f8f119ed - 4.4.0 + 4.6.2 nuget.exe - https://dist.nuget.org/win-x86-commandline/v4.4.0/nuget.exe - fb0903665d2a64ce1da3f40961eb19e46c152a631b2441750aa8b30b20acd2a5e78d7f1058e79e83e37959b3ce9a090a60f081895fdba9998715e3a64437c3e5 + https://dist.nuget.org/win-x86-commandline/v4.6.2/nuget.exe + 60daea7bec2de23089f7ad73985dd788ac154171d6326c2c456726849b8f97dfc38cbdd9b9bf8d96aced009ccaaed317905b65c108e149cfbbbcdfb95f8f0519 3.1.81 -- cgit v1.2.3 From 340320487342740ff2313f44efd35eeba9423ac2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 20:36:07 -0700 Subject: Update vswhere.exe to 2.4.1 --- scripts/vcpkgTools.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index a11ee344f..daaf29214 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -29,10 +29,10 @@ MinGit-2.16.2-32-bit.zip - 2.3.2 + 2.4.1 vswhere.exe - https://github.com/Microsoft/vswhere/releases/download/2.3.2/vswhere.exe - 42f8a8ffd0b156b2e30b2ec7bf7d19582b3ce38a2046ff62bd7fd82f12a8d66ed601e74865957864cef0a376e33a7d07cad746f03c57d1b95a7929a1f8f119ed + https://github.com/Microsoft/vswhere/releases/download/2.4.1/vswhere.exe + f477842d0cebefcd6bf9c6d536ab8ea20ec5b0aa967ee963ab6a101aeff9df8742ca600d35f39e2e7158d76d8231f1ed2bef6104dce84d2bf8d6b07d17d706a1 4.6.2 -- cgit v1.2.3 From 740622dd73b96c49c66564f5c060bd179bc13b5d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 6 Apr 2018 14:46:51 -0700 Subject: [aws-sdk-cpp][catch2][exiv2][forest][nuklear][rs-core-lib][thrift] Upgrades --- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- ports/catch2/CONTROL | 2 +- ports/catch2/portfile.cmake | 4 ++-- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/forest/CONTROL | 2 +- ports/forest/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index 2d6642faa..a3e7c57c5 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,5 +1,5 @@ Source: aws-sdk-cpp -Version: 1.4.30-1 +Version: 1.4.31-1 Description: AWS SDK for C++ Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows) Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 6263b2b45..d3cf3f0bb 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.4.30 - SHA512 309e700d1c351f6cb44036d3f2caf9c0fc8d96c7decdb403cff066c9927f1134a26dd50ba92af3b1b8c93a89e4bacf3a505cca3684136460e220df4309e467ba + REF 1.4.31 + SHA512 f0fc2c3c82201ff68ba53c19a7a452e79b5dc9fc47a146e4917105cfac546d64c57a8203beadaf9842e1c4e93ac2245ffbfd247a88107de12245d1624f35dddf HEAD_REF master ) diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL index faa5f0574..a466f7be5 100644 --- a/ports/catch2/CONTROL +++ b/ports/catch2/CONTROL @@ -1,4 +1,4 @@ Source: catch2 -Version: 2.2.1-1 +Version: 2.2.2 Description: A modern, header-only test framework for unit testing. Issues, PRs and changelogs can be found at https://github.com/catchorg/Catch2 diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake index 65a38d8f0..5329d9cab 100644 --- a/ports/catch2/portfile.cmake +++ b/ports/catch2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO catchorg/Catch2 - REF v2.2.1 - SHA512 48d3a0384dcd19fe622c4fda51639be36c904aaff77f5857615010c57e69d8e9f1deb2156e3e4882a592fe260d2bae0efa3cd02c2a2cabe07d9f9db09051a6b0 + REF v2.2.2 + SHA512 ab91036c6c3ace087d0382ce99f26b2c30a4b75d52f285619ca282a618470fe388afe47495f3b2764268d600c6834c60ba464483d06f3a1c4316c099477c8e38 HEAD_REF master ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index b66823aa0..f620972ef 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-04-05 +Version: 2018-04-06 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 5423bfdd8..90ffe6ddc 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF db5bb66d0697572eacaf0c2aa3b8e7ac2a0c4e54 - SHA512 afc82f79073ace4d567a9db4ee8991c013d12b2939930e12fe5adf0f7d398b87bce127689f3ca9b1c234cc1321ed3f6bee8335590958616a03af9de58e12c24b + REF 336b759cc0192e7db1ccafd42e13a43085e74a58 + SHA512 1e94d31d9b6667ea8dcff12fb4a0a9c24dba44f665a98dba1752657a3a26a654655c2c00eecfdf540a76e9e217f21d9471e0e244226f4e013fc044ad245adaaa HEAD_REF master ) diff --git a/ports/forest/CONTROL b/ports/forest/CONTROL index e22089dab..e161e22ae 100644 --- a/ports/forest/CONTROL +++ b/ports/forest/CONTROL @@ -1,3 +1,3 @@ Source: forest -Version: 7.0.1 +Version: 7.0.3 Description: Forest is an open-source, template library of tree data structures written in C++11. diff --git a/ports/forest/portfile.cmake b/ports/forest/portfile.cmake index 78e85a5fe..39ef63350 100644 --- a/ports/forest/portfile.cmake +++ b/ports/forest/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xorz57/forest - REF 7.0.1 - SHA512 75f5f643ec20bab3298e5983f2ab1672dc304102059cf454341fe37495f1e18ac6a6fcce927b49f441a586ec788d4be44e1ceab8e1947565c2ab3ff519daded8 + REF 7.0.3 + SHA512 0e3adde14d9035427f3ca4d40cf6ee9598e8222f0e9884e570cdddf31ceb4fb516c802bf2abfb169e35da6adebfd7514238ca23121871fe9911419449a72cfe0 HEAD_REF master ) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index dff07255c..bfa1e2ab5 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-04-05 +Version: 2018-04-06 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index 9ab405ed0..0722fe775 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF d374953d274131f9f295e5fdada9b9f83e208072 - SHA512 bc7d6f4d8ec8993450f415560a5f3b603f310416f54ff1f58b51554e9de7c1d8e8ed7552abfb3e51a2e711863e2e3b75169a3fd2ae7f4f79ae429797858a9faf + REF bca152011e3f5839c7eb08864f76f1f900d4ffe7 + SHA512 aa3bf7f9f32fe63140505e4845a9ee22fb9feb1abc3dd36b333697548778272b817795844a8b6f5cc95a4e460afd69fd96359955ab4e8d12737ac4b46be7e4d1 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index a26371439..1a0ea6519 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-04-05 +Version: 2018-04-06 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index 7392e5843..8229e78e8 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF c49c44a14567719e927c942aec7d8e4971aad5bf - SHA512 17f5cb5d1c60fa832d32f65fce2a1fd00b108d5c1594240543bb6f889c8ddae6dbe83215b63ff15927921bcc9352348340e036c5118278867498216f63e9fef4 + REF 0a500c3a326d1ba177e48ebdb2d71b0a9cd54eae + SHA512 14642b9c3c4eba8faea434eb94fc19fadbc8e40cbf43ae3591be89b1cd2a0b2f13f93c7ac88d1778d557a185fa6efe5eadf64542da7baf625a39dcb53b0b2313 HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index eec5fd732..57caf006a 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-04-05 +Version: 2018-04-06 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 4002a0cfd..626ef2b44 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF a0cf38ed312a5342eb05574719485b725fa52eee - SHA512 518142e3b98ae79e622b3b5989c7754e4d6e32e1ffd1b39915932afdb40c0e1fa6ef1d182de6dfebcfc69a20eae9635f6ae8e8532b3a7e8acb5e7c3ee980c2b7 + REF 7ad0665008764c0522672b314605d88959e20716 + SHA512 5fc3b5084d40b972af13c00008f5d8b7d7dbe82cfbec31769b09a042911dee99f0979a2592dbcb72836c0ee5036905e1caee2cc76c4e296b20855276c4c30ffd HEAD_REF master ) -- cgit v1.2.3 From bab554a8b3df8bf451e846022b310204b8843640 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 22:52:35 -0700 Subject: [vcpkg hash] Process in C++ instead of calling awk --- toolsrc/src/vcpkg/commands.hash.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 3f90eeaca..801b8d323 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -187,7 +187,16 @@ namespace vcpkg::Commands::Hash "Failed to run:\n" " %s", cmd_line); - return Strings::trim(std::string{ec_data.output}); + + std::vector split = Strings::split(ec_data.output, " "); + Checks::check_exit(VCPKG_LINE_INFO, + split.size() == 3, + "Expected output of the form [hash filename\n] (3 tokens), but got\n" + "[%s] (%s tokens)", + ec_data.output, + std::to_string(split.size())); + + return split[0]; } std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type) @@ -196,7 +205,7 @@ namespace vcpkg::Commands::Hash Checks::check_exit( VCPKG_LINE_INFO, paths.get_filesystem().exists(path), "File %s does not exist", path.u8string()); const std::string cmd_line = Strings::format( - R"(shasum -a %s "%s" | awk '{ print $1 }')", digest_size, path.u8string()); + R"(shasum -a %s "%s")", digest_size, path.u8string()); return run_shasum_and_post_process(cmd_line); } @@ -206,7 +215,7 @@ namespace vcpkg::Commands::Hash verify_has_only_allowed_chars(s); const std::string cmd_line = Strings::format( - R"(echo -n "%s" | shasum -a %s | awk '{ print $1 }')", s, digest_size); + R"(echo -n "%s" | shasum -a %s)", s, digest_size); return run_shasum_and_post_process(cmd_line); } } -- cgit v1.2.3 From 479ed417d91122f68bf5806622a78be04b391166 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Apr 2018 22:54:27 -0700 Subject: [vcpkg hash] formatting --- toolsrc/src/vcpkg/commands.hash.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 801b8d323..c23a63e1e 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -204,8 +204,7 @@ namespace vcpkg::Commands::Hash const std::string digest_size = get_digest_size(hash_type); Checks::check_exit( VCPKG_LINE_INFO, paths.get_filesystem().exists(path), "File %s does not exist", path.u8string()); - const std::string cmd_line = Strings::format( - R"(shasum -a %s "%s")", digest_size, path.u8string()); + const std::string cmd_line = Strings::format(R"(shasum -a %s "%s")", digest_size, path.u8string()); return run_shasum_and_post_process(cmd_line); } @@ -214,8 +213,7 @@ namespace vcpkg::Commands::Hash const std::string digest_size = get_digest_size(hash_type); verify_has_only_allowed_chars(s); - const std::string cmd_line = Strings::format( - R"(echo -n "%s" | shasum -a %s)", s, digest_size); + const std::string cmd_line = Strings::format(R"(echo -n "%s" | shasum -a %s)", s, digest_size); return run_shasum_and_post_process(cmd_line); } } -- cgit v1.2.3 From 0b7fc2f6617dc24edb1debcbabe6895231a03245 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 6 Apr 2018 23:36:43 -0700 Subject: [openvr] update to 1.0.14 --- ports/openvr/CONTROL | 2 +- ports/openvr/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/openvr/CONTROL b/ports/openvr/CONTROL index 3e42aaa23..816a8751f 100644 --- a/ports/openvr/CONTROL +++ b/ports/openvr/CONTROL @@ -1,3 +1,3 @@ Source: openvr -Version: 1.0.13 +Version: 1.0.14 Description: an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting. diff --git a/ports/openvr/portfile.cmake b/ports/openvr/portfile.cmake index b86f44335..31e1658b1 100644 --- a/ports/openvr/portfile.cmake +++ b/ports/openvr/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ValveSoftware/openvr - REF v1.0.13 - SHA512 3ec901f9363f9517fd3246cf58c0792c2446c39d61997a46375756b0965e6fad6902a5d1b87eb65c579e1b615cbb6e6688e7dc8ced957e5dc50b4c4dcbbb36b9 + REF v1.0.14 + SHA512 2f38622121911ad4d59971fe88313f839fcb3bddae07af266b3b9f804a8c3855b4eb67d9153f0979db3465279dfcce9cb0bfe83451bf8639be5cdc9acafa2eda HEAD_REF master ) -- cgit v1.2.3 From 59e574ceb364b33fd2bc56990b4b27232c2f97d6 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 6 Apr 2018 23:42:03 -0700 Subject: [tinyxml2] update to 6.2.0 --- ports/tinyxml2/CONTROL | 2 +- ports/tinyxml2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL index 1df7e49f2..185fa749c 100644 --- a/ports/tinyxml2/CONTROL +++ b/ports/tinyxml2/CONTROL @@ -1,3 +1,3 @@ Source: tinyxml2 -Version: 6.0.0-2 +Version: 6.2.0 Description: A simple, small, efficient, C++ XML parser diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake index 0a7c887c5..8a28b424b 100644 --- a/ports/tinyxml2/portfile.cmake +++ b/ports/tinyxml2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO leethomason/tinyxml2 - REF 6.0.0 - SHA512 30c68f491830187738b01ca5db1a96e7b4907cf8fa09a533c90ea084ab5e73f798dff6305cfc4edccc8989926e91c0482677bb5796799113c839dbd0528c8ad5 + REF 6.2.0 + SHA512 ef784240aeb090ab04aad659352ad4b224c431feecf485f33aca7936bcaa0ef4ab9d0a2e0692d3cf6036ac3e8012019d65665e780a920bbad3d4820f736445b1 HEAD_REF master ) -- cgit v1.2.3 From 7a19c72ca9e9ae8215be63e957ba11cc156b87b9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:03:59 -0700 Subject: Rename. Remove stray semicolon --- toolsrc/src/vcpkg/base/strings.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 5fedf3e1f..541b1f2d9 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -7,7 +7,7 @@ namespace vcpkg::Strings::details { // To disambiguate between two overloads - static bool IS_SPACE(const char c) { return std::isspace(c) != 0; }; + static bool is_space(const char c) { return std::isspace(c) != 0; } // Avoids C4244 warnings because of char<->int conversion that occur when using std::tolower() static char tolower_char(const char c) { return static_cast(std::tolower(c)); } @@ -143,8 +143,8 @@ namespace vcpkg::Strings std::string trim(std::string&& s) { - s.erase(std::find_if_not(s.rbegin(), s.rend(), details::IS_SPACE).base(), s.end()); - s.erase(s.begin(), std::find_if_not(s.begin(), s.end(), details::IS_SPACE)); + s.erase(std::find_if_not(s.rbegin(), s.rend(), details::is_space).base(), s.end()); + s.erase(s.begin(), std::find_if_not(s.begin(), s.end(), details::is_space)); return std::move(s); } -- cgit v1.2.3 From fcdf4637ed9c645cc3719358a292c4571806e0bd Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:07:40 -0700 Subject: Default construct std::array() --- toolsrc/src/vcpkg/base/chrono.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/base/chrono.cpp b/toolsrc/src/vcpkg/base/chrono.cpp index 00f8ba3f1..eff84ee4e 100644 --- a/toolsrc/src/vcpkg/base/chrono.cpp +++ b/toolsrc/src/vcpkg/base/chrono.cpp @@ -117,9 +117,7 @@ namespace vcpkg::Chrono std::string CTime::to_string() const { - std::array date; - date.fill(0); - + std::array date{}; strftime(&date[0], date.size(), "%Y-%m-%dT%H:%M:%S.0Z", &m_tm); return &date[0]; } -- cgit v1.2.3 From 87f7f23d07ad6af428793a3acb45626d1228c802 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:10:03 -0700 Subject: const/auto --- toolsrc/src/vcpkg/base/chrono.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/base/chrono.cpp b/toolsrc/src/vcpkg/base/chrono.cpp index eff84ee4e..2a76f5df0 100644 --- a/toolsrc/src/vcpkg/base/chrono.cpp +++ b/toolsrc/src/vcpkg/base/chrono.cpp @@ -15,7 +15,7 @@ namespace vcpkg::Chrono using std::chrono::nanoseconds; using std::chrono::seconds; - const double nanos_as_double = static_cast(nanos.count()); + const auto nanos_as_double = static_cast(nanos.count()); if (duration_cast(nanos) > hours()) { @@ -92,7 +92,7 @@ namespace vcpkg::Chrono Optional CTime::parse(CStringView str) { CTime ret; - auto assigned = + const auto assigned = #if defined(_WIN32) sscanf_s #else @@ -123,7 +123,7 @@ namespace vcpkg::Chrono } std::chrono::system_clock::time_point CTime::to_time_point() const { - auto t = mktime(&m_tm); + const time_t t = mktime(&m_tm); return std::chrono::system_clock::from_time_t(t); } } -- cgit v1.2.3 From a64b160c67bfe8de754f41004f5c7cdbfea0a0ee Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:13:41 -0700 Subject: Use auto on left side when casting on right side --- toolsrc/src/vcpkg/base/cofffilereader.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp index 96d280108..bc418f42a 100644 --- a/toolsrc/src/vcpkg/base/cofffilereader.cpp +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -87,7 +87,7 @@ namespace vcpkg::CoffFileReader static const size_t MACHINE_TYPE_SIZE = 2; std::string machine_field_as_string = data.substr(MACHINE_TYPE_OFFSET, MACHINE_TYPE_SIZE); - const uint16_t machine = reinterpret_bytes(machine_field_as_string.c_str()); + const auto machine = reinterpret_bytes(machine_field_as_string.c_str()); return to_machine_type(machine); } @@ -158,7 +158,7 @@ namespace vcpkg::CoffFileReader for (uint32_t i = 0; i < offset_count; ++i) { const std::string value_as_string = raw_offsets.substr(OFFSET_WIDTH * i, OFFSET_WIDTH * (i + 1)); - const uint32_t value = reinterpret_bytes(value_as_string.c_str()); + const auto value = reinterpret_bytes(value_as_string.c_str()); // Ignore offsets that point to offset 0. See vcpkg github #223 #288 #292 if (value != 0) @@ -182,7 +182,7 @@ namespace vcpkg::CoffFileReader static ImportHeader read(fstream& fs) { static const size_t SIG1_OFFSET = 0; - static const uint16_t SIG1 = static_cast(MachineType::UNKNOWN); + static const auto SIG1 = static_cast(MachineType::UNKNOWN); static const size_t SIG1_SIZE = 2; static const size_t SIG2_OFFSET = 2; @@ -194,11 +194,11 @@ namespace vcpkg::CoffFileReader fs.read(&ret.data[0], HEADER_SIZE); const std::string sig1_as_string = ret.data.substr(SIG1_OFFSET, SIG1_SIZE); - const uint16_t sig1 = reinterpret_bytes(sig1_as_string.c_str()); + const auto sig1 = reinterpret_bytes(sig1_as_string.c_str()); Checks::check_exit(VCPKG_LINE_INFO, sig1 == SIG1, "Sig1 was incorrect. Expected %s but got %s", SIG1, sig1); const std::string sig2_as_string = ret.data.substr(SIG2_OFFSET, SIG2_SIZE); - const uint16_t sig2 = reinterpret_bytes(sig2_as_string.c_str()); + const auto sig2 = reinterpret_bytes(sig2_as_string.c_str()); Checks::check_exit(VCPKG_LINE_INFO, sig2 == SIG2, "Sig2 was incorrect. Expected %s but got %s", SIG2, sig2); return ret; @@ -210,7 +210,7 @@ namespace vcpkg::CoffFileReader static const size_t MACHINE_TYPE_SIZE = 2; std::string machine_field_as_string = data.substr(MACHINE_TYPE_OFFSET, MACHINE_TYPE_SIZE); - const uint16_t machine = reinterpret_bytes(machine_field_as_string.c_str()); + const auto machine = reinterpret_bytes(machine_field_as_string.c_str()); return to_machine_type(machine); } @@ -278,7 +278,7 @@ namespace vcpkg::CoffFileReader second_linker_member_header.name().substr(0, 2) == "/ ", "Could not find proper second linker member"); // The first 4 bytes contains the number of archive members - const uint32_t archive_member_count = read_value_from_stream(fs); + const auto archive_member_count = read_value_from_stream(fs); const OffsetsArray offsets = OffsetsArray::read(fs, archive_member_count); marker.advance_by(ArchiveMemberHeader::HEADER_SIZE + second_linker_member_header.member_size()); marker.seek_to_marker(fs); @@ -297,7 +297,7 @@ namespace vcpkg::CoffFileReader { marker.set_to_offset(offset + ArchiveMemberHeader::HEADER_SIZE); // Skip the header, no need to read it. marker.seek_to_marker(fs); - const uint16_t first_two_bytes = peek_value_from_stream(fs); + const auto first_two_bytes = peek_value_from_stream(fs); const bool isImportHeader = to_machine_type(first_two_bytes) == MachineType::UNKNOWN; const MachineType machine = isImportHeader ? ImportHeader::read(fs).machine_type() : CoffFileHeader::read(fs).machine_type(); -- cgit v1.2.3 From 2076dfe376d21d3f89e342903edb0a95e96a51e5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:14:20 -0700 Subject: Naming convention --- toolsrc/src/vcpkg/base/cofffilereader.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp index bc418f42a..fdab307eb 100644 --- a/toolsrc/src/vcpkg/base/cofffilereader.cpp +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -43,7 +43,7 @@ namespace vcpkg::CoffFileReader actual); } - static void read_and_verify_PE_signature(fstream& fs) + static void read_and_verify_pe_signature(fstream& fs) { static const size_t OFFSET_TO_PE_SIGNATURE_OFFSET = 0x3c; @@ -51,13 +51,13 @@ namespace vcpkg::CoffFileReader static const size_t PE_SIGNATURE_SIZE = 4; fs.seekg(OFFSET_TO_PE_SIGNATURE_OFFSET, ios_base::beg); - const int32_t offset_to_PE_signature = read_value_from_stream(fs); + const auto offset_to_pe_signature = read_value_from_stream(fs); - fs.seekg(offset_to_PE_signature); + fs.seekg(offset_to_pe_signature); char signature[PE_SIGNATURE_SIZE]; fs.read(signature, PE_SIGNATURE_SIZE); verify_equal_strings(VCPKG_LINE_INFO, PE_SIGNATURE, signature, PE_SIGNATURE_SIZE, "PE_SIGNATURE"); - fs.seekg(offset_to_PE_signature + PE_SIGNATURE_SIZE, ios_base::beg); + fs.seekg(offset_to_pe_signature + PE_SIGNATURE_SIZE, ios_base::beg); } static fpos_t align_to_size(const uint64_t unaligned, const uint64_t alignment_size) @@ -235,7 +235,7 @@ namespace vcpkg::CoffFileReader std::fstream fs(path, std::ios::in | std::ios::binary | std::ios::ate); Checks::check_exit(VCPKG_LINE_INFO, fs.is_open(), "Could not open file %s for reading", path.generic_string()); - read_and_verify_PE_signature(fs); + read_and_verify_pe_signature(fs); CoffFileHeader header = CoffFileHeader::read(fs); const MachineType machine = header.machine_type(); return {machine}; @@ -283,8 +283,8 @@ namespace vcpkg::CoffFileReader marker.advance_by(ArchiveMemberHeader::HEADER_SIZE + second_linker_member_header.member_size()); marker.seek_to_marker(fs); - const bool hasLongnameMemberHeader = peek_value_from_stream(fs) == 0x2F2F; - if (hasLongnameMemberHeader) + const bool has_longname_member_header = peek_value_from_stream(fs) == 0x2F2F; + if (has_longname_member_header) { const ArchiveMemberHeader longnames_member_header = ArchiveMemberHeader::read(fs); marker.advance_by(ArchiveMemberHeader::HEADER_SIZE + longnames_member_header.member_size()); @@ -298,9 +298,9 @@ namespace vcpkg::CoffFileReader marker.set_to_offset(offset + ArchiveMemberHeader::HEADER_SIZE); // Skip the header, no need to read it. marker.seek_to_marker(fs); const auto first_two_bytes = peek_value_from_stream(fs); - const bool isImportHeader = to_machine_type(first_two_bytes) == MachineType::UNKNOWN; + const bool is_import_header = to_machine_type(first_two_bytes) == MachineType::UNKNOWN; const MachineType machine = - isImportHeader ? ImportHeader::read(fs).machine_type() : CoffFileHeader::read(fs).machine_type(); + is_import_header ? ImportHeader::read(fs).machine_type() : CoffFileHeader::read(fs).machine_type(); machine_types.insert(machine); } -- cgit v1.2.3 From fc27c9dd5c2559fb604cc2ce73cfb8e79ef0e406 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:18:07 -0700 Subject: [cofffilereader] Use StringLiteral --- toolsrc/src/vcpkg/base/cofffilereader.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp index fdab307eb..fec26a441 100644 --- a/toolsrc/src/vcpkg/base/cofffilereader.cpp +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -2,6 +2,7 @@ #include #include +#include using namespace std; @@ -47,7 +48,7 @@ namespace vcpkg::CoffFileReader { static const size_t OFFSET_TO_PE_SIGNATURE_OFFSET = 0x3c; - static const char* PE_SIGNATURE = "PE\0\0"; + static const StringLiteral PE_SIGNATURE = "PE\0\0"; static const size_t PE_SIGNATURE_SIZE = 4; fs.seekg(OFFSET_TO_PE_SIGNATURE_OFFSET, ios_base::beg); @@ -56,7 +57,7 @@ namespace vcpkg::CoffFileReader fs.seekg(offset_to_pe_signature); char signature[PE_SIGNATURE_SIZE]; fs.read(signature, PE_SIGNATURE_SIZE); - verify_equal_strings(VCPKG_LINE_INFO, PE_SIGNATURE, signature, PE_SIGNATURE_SIZE, "PE_SIGNATURE"); + verify_equal_strings(VCPKG_LINE_INFO, PE_SIGNATURE.c_str(), signature, PE_SIGNATURE_SIZE, "PE_SIGNATURE"); fs.seekg(offset_to_pe_signature + PE_SIGNATURE_SIZE, ios_base::beg); } @@ -102,7 +103,7 @@ namespace vcpkg::CoffFileReader static ArchiveMemberHeader read(fstream& fs) { static const size_t HEADER_END_OFFSET = 58; - static const char* HEADER_END = "`\n"; + static const StringLiteral HEADER_END = "`\n"; static const size_t HEADER_END_SIZE = 2; ArchiveMemberHeader ret; @@ -113,7 +114,7 @@ namespace vcpkg::CoffFileReader { const std::string header_end = ret.data.substr(HEADER_END_OFFSET, HEADER_END_SIZE); verify_equal_strings( - VCPKG_LINE_INFO, HEADER_END, header_end.c_str(), HEADER_END_SIZE, "LIB HEADER_END"); + VCPKG_LINE_INFO, HEADER_END.c_str(), header_end.c_str(), HEADER_END_SIZE, "LIB HEADER_END"); } return ret; @@ -220,14 +221,14 @@ namespace vcpkg::CoffFileReader static void read_and_verify_archive_file_signature(fstream& fs) { - static const char* FILE_START = "!\n"; + static const StringLiteral FILE_START = "!\n"; static const size_t FILE_START_SIZE = 8; fs.seekg(fs.beg); char file_start[FILE_START_SIZE]; fs.read(file_start, FILE_START_SIZE); - verify_equal_strings(VCPKG_LINE_INFO, FILE_START, file_start, FILE_START_SIZE, "LIB FILE_START"); + verify_equal_strings(VCPKG_LINE_INFO, FILE_START.c_str(), file_start, FILE_START_SIZE, "LIB FILE_START"); } DllInfo read_dll(const fs::path& path) -- cgit v1.2.3 From d1420efa9faf9b18ba49f3990d8c0cebf7889641 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:18:46 -0700 Subject: fs.beg -> std::festream::beg --- toolsrc/src/vcpkg/base/cofffilereader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp index fec26a441..7538808c2 100644 --- a/toolsrc/src/vcpkg/base/cofffilereader.cpp +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -224,7 +224,7 @@ namespace vcpkg::CoffFileReader static const StringLiteral FILE_START = "!\n"; static const size_t FILE_START_SIZE = 8; - fs.seekg(fs.beg); + fs.seekg(std::fstream::beg); char file_start[FILE_START_SIZE]; fs.read(file_start, FILE_START_SIZE); -- cgit v1.2.3 From 84a0eaa0f2ead797cc78d74e3f35239430447383 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:20:25 -0700 Subject: [cofffilereader.cpp] static const -> static constexpr --- toolsrc/src/vcpkg/base/cofffilereader.cpp | 54 +++++++++++++++---------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp index 7538808c2..5b06a885c 100644 --- a/toolsrc/src/vcpkg/base/cofffilereader.cpp +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -46,10 +46,10 @@ namespace vcpkg::CoffFileReader static void read_and_verify_pe_signature(fstream& fs) { - static const size_t OFFSET_TO_PE_SIGNATURE_OFFSET = 0x3c; + static constexpr size_t OFFSET_TO_PE_SIGNATURE_OFFSET = 0x3c; - static const StringLiteral PE_SIGNATURE = "PE\0\0"; - static const size_t PE_SIGNATURE_SIZE = 4; + static constexpr StringLiteral PE_SIGNATURE = "PE\0\0"; + static constexpr size_t PE_SIGNATURE_SIZE = 4; fs.seekg(OFFSET_TO_PE_SIGNATURE_OFFSET, ios_base::beg); const auto offset_to_pe_signature = read_value_from_stream(fs); @@ -72,7 +72,7 @@ namespace vcpkg::CoffFileReader struct CoffFileHeader { - static const size_t HEADER_SIZE = 20; + static constexpr size_t HEADER_SIZE = 20; static CoffFileHeader read(fstream& fs) { @@ -84,8 +84,8 @@ namespace vcpkg::CoffFileReader MachineType machine_type() const { - static const size_t MACHINE_TYPE_OFFSET = 0; - static const size_t MACHINE_TYPE_SIZE = 2; + static constexpr size_t MACHINE_TYPE_OFFSET = 0; + static constexpr size_t MACHINE_TYPE_SIZE = 2; std::string machine_field_as_string = data.substr(MACHINE_TYPE_OFFSET, MACHINE_TYPE_SIZE); const auto machine = reinterpret_bytes(machine_field_as_string.c_str()); @@ -98,13 +98,13 @@ namespace vcpkg::CoffFileReader struct ArchiveMemberHeader { - static const size_t HEADER_SIZE = 60; + static constexpr size_t HEADER_SIZE = 60; static ArchiveMemberHeader read(fstream& fs) { - static const size_t HEADER_END_OFFSET = 58; - static const StringLiteral HEADER_END = "`\n"; - static const size_t HEADER_END_SIZE = 2; + static constexpr size_t HEADER_END_OFFSET = 58; + static constexpr StringLiteral HEADER_END = "`\n"; + static constexpr size_t HEADER_END_SIZE = 2; ArchiveMemberHeader ret; ret.data.resize(HEADER_SIZE); @@ -122,17 +122,17 @@ namespace vcpkg::CoffFileReader std::string name() const { - static const size_t HEADER_NAME_OFFSET = 0; - static const size_t HEADER_NAME_SIZE = 16; + static constexpr size_t HEADER_NAME_OFFSET = 0; + static constexpr size_t HEADER_NAME_SIZE = 16; return data.substr(HEADER_NAME_OFFSET, HEADER_NAME_SIZE); } uint64_t member_size() const { - static const size_t ALIGNMENT_SIZE = 2; + static constexpr size_t ALIGNMENT_SIZE = 2; - static const size_t HEADER_SIZE_OFFSET = 48; - static const size_t HEADER_SIZE_FIELD_SIZE = 10; + static constexpr size_t HEADER_SIZE_OFFSET = 48; + static constexpr size_t HEADER_SIZE_FIELD_SIZE = 10; const std::string as_string = data.substr(HEADER_SIZE_OFFSET, HEADER_SIZE_FIELD_SIZE); // This is in ASCII decimal representation const uint64_t value = std::strtoull(as_string.c_str(), nullptr, 10); @@ -148,7 +148,7 @@ namespace vcpkg::CoffFileReader { static OffsetsArray read(fstream& fs, const uint32_t offset_count) { - static const size_t OFFSET_WIDTH = 4; + static constexpr size_t OFFSET_WIDTH = 4; std::string raw_offsets; const size_t raw_offset_size = offset_count * OFFSET_WIDTH; @@ -178,17 +178,17 @@ namespace vcpkg::CoffFileReader struct ImportHeader { - static const size_t HEADER_SIZE = 20; + static constexpr size_t HEADER_SIZE = 20; static ImportHeader read(fstream& fs) { - static const size_t SIG1_OFFSET = 0; - static const auto SIG1 = static_cast(MachineType::UNKNOWN); - static const size_t SIG1_SIZE = 2; + static constexpr size_t SIG1_OFFSET = 0; + static constexpr auto SIG1 = static_cast(MachineType::UNKNOWN); + static constexpr size_t SIG1_SIZE = 2; - static const size_t SIG2_OFFSET = 2; - static const uint16_t SIG2 = 0xFFFF; - static const size_t SIG2_SIZE = 2; + static constexpr size_t SIG2_OFFSET = 2; + static constexpr uint16_t SIG2 = 0xFFFF; + static constexpr size_t SIG2_SIZE = 2; ImportHeader ret; ret.data.resize(HEADER_SIZE); @@ -207,8 +207,8 @@ namespace vcpkg::CoffFileReader MachineType machine_type() const { - static const size_t MACHINE_TYPE_OFFSET = 6; - static const size_t MACHINE_TYPE_SIZE = 2; + static constexpr size_t MACHINE_TYPE_OFFSET = 6; + static constexpr size_t MACHINE_TYPE_SIZE = 2; std::string machine_field_as_string = data.substr(MACHINE_TYPE_OFFSET, MACHINE_TYPE_SIZE); const auto machine = reinterpret_bytes(machine_field_as_string.c_str()); @@ -221,8 +221,8 @@ namespace vcpkg::CoffFileReader static void read_and_verify_archive_file_signature(fstream& fs) { - static const StringLiteral FILE_START = "!\n"; - static const size_t FILE_START_SIZE = 8; + static constexpr StringLiteral FILE_START = "!\n"; + static constexpr size_t FILE_START_SIZE = 8; fs.seekg(std::fstream::beg); -- cgit v1.2.3 From 4f1c5e0b9ad516b1b506154fe4bf88d96e8664c8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:32:40 -0700 Subject: Use instead of . Default construct. --- toolsrc/src/vcpkg/base/system.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 171dd2bbf..ea74f872e 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #if defined(__APPLE__) #include @@ -23,7 +23,7 @@ namespace vcpkg::System { using std::chrono::system_clock; std::time_t now_time = system_clock::to_time_t(system_clock::now()); - tm parts; + tm parts{}; #if defined(_WIN32) localtime_s(&parts, &now_time); #else -- cgit v1.2.3 From 9725e59b997e1db31db9b9dfcb96725cbe0f474d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:37:02 -0700 Subject: [system.cpp] Naming convention, const, auto& --- toolsrc/src/vcpkg/base/system.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index ea74f872e..3f2f47d72 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -158,7 +158,7 @@ namespace vcpkg::System #if defined(_WIN32) 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( + 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::vector env_wstrings = { @@ -225,13 +225,13 @@ namespace vcpkg::System } if (extra_env.find("PATH") != extra_env.end()) - NEW_PATH += Strings::format(";%s", extra_env.find("PATH")->second); - env_cstr.append(Strings::to_utf16(NEW_PATH)); + new_path += Strings::format(";%s", extra_env.find("PATH")->second); + env_cstr.append(Strings::to_utf16(new_path)); env_cstr.push_back(L'\0'); env_cstr.append(L"VSLANG=1033"); env_cstr.push_back(L'\0'); - for (auto item : extra_env) + for (const auto& item : extra_env) { if (item.first == "PATH") continue; env_cstr.append(Strings::to_utf16(item.first)); @@ -339,7 +339,7 @@ namespace vcpkg::System const auto ec = _pclose(pipe); remove_byte_order_marks(&output); - Debug::println("_pclose() returned %d after %8d us", ec, (int)timer.microseconds()); + Debug::println("_pclose() returned %d after %8d us", ec, static_cast(timer.microseconds())); return {ec, Strings::to_utf8(output)}; #else -- cgit v1.2.3 From 30e516cd6163fb06d517669497b1aa7ad6db666f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:39:23 -0700 Subject: constructor order of init --- toolsrc/src/vcpkg/binaryparagraph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index 7a8b0d577..73ca23df1 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -79,7 +79,7 @@ namespace vcpkg } BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet) - : version(), feature(fpgh.name), description(fpgh.description), maintainer() + : version(), description(fpgh.description), maintainer(), feature(fpgh.name) { this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO); this->depends = filter_dependencies(fpgh.depends, triplet); -- cgit v1.2.3 From 4e4afa29bfc053d852544a24c2ecaeff165521fd Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:47:31 -0700 Subject: [build.cpp] Clang tidy fixes --- toolsrc/src/vcpkg/build.cpp | 73 ++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index b7055100b..76381f862 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -64,7 +64,8 @@ namespace vcpkg::Build::Command const Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES, Build::CleanBuildtrees::NO, - Build::CleanPackages::NO}; + Build::CleanPackages::NO, + Build::DownloadTool::BUILT_IN}; std::set features_as_set(full_spec.features.begin(), full_spec.features.end()); features_as_set.emplace("core"); @@ -210,7 +211,7 @@ namespace vcpkg::Build for (auto&& host : host_architectures) { - auto it = Util::find_if(toolset.supported_architectures, [&](const ToolsetArchOption& opt) { + const auto it = Util::find_if(toolset.supported_architectures, [&](const ToolsetArchOption& opt) { return host == opt.host_arch && target_arch == opt.target_arch; }); if (it != toolset.supported_architectures.end()) return it->name; @@ -279,7 +280,7 @@ namespace vcpkg::Build { const Triplet& triplet = config.triplet; - auto dep_strings = + const std::vector dep_strings = Util::fmap_flatten(config.feature_list, [&](std::string const& feature) -> std::vector { if (feature == "core") { @@ -302,7 +303,7 @@ namespace vcpkg::Build if (fspec.feature().empty()) { // reference to default features - auto it = status_db.find_installed(fspec.spec()); + const auto it = status_db.find_installed(fspec.spec()); if (it == status_db.end()) { // not currently installed, so just leave the default reference so it will fail later @@ -310,9 +311,9 @@ namespace vcpkg::Build } else { - ret.push_back(FeatureSpec{fspec.spec(), "core"}); + ret.emplace_back(fspec.spec(), "core"); for (auto&& default_feature : it->get()->package.default_features) - ret.push_back(FeatureSpec{fspec.spec(), default_feature}); + ret.emplace_back(fspec.spec(), default_feature); } } else @@ -463,7 +464,7 @@ namespace vcpkg::Build abi_tag_entries.emplace_back(AbiEntry{"triplet", pre_build_info.triplet_abi_tag}); - std::string features = Strings::join(";", config.feature_list); + const std::string features = Strings::join(";", config.feature_list); abi_tag_entries.emplace_back(AbiEntry{"features", features}); if (config.build_package_options.use_head_version == UseHeadVersion::YES) @@ -471,7 +472,7 @@ namespace vcpkg::Build Util::sort(abi_tag_entries); - std::string full_abi_info = + const std::string full_abi_info = Strings::join("", abi_tag_entries, [](const AbiEntry& p) { return p.key + " " + p.value + "\n"; }); if (GlobalState::debugging) @@ -491,19 +492,17 @@ namespace vcpkg::Build { std::error_code ec; fs.create_directories(paths.buildtrees / name, ec); - auto abi_file_path = paths.buildtrees / name / (triplet.canonical_name() + ".vcpkg_abi_info.txt"); + const auto abi_file_path = paths.buildtrees / name / (triplet.canonical_name() + ".vcpkg_abi_info.txt"); fs.write_contents(abi_file_path, full_abi_info); return AbiTagAndFile{Commands::Hash::get_file_hash(paths, abi_file_path, "SHA1"), abi_file_path}; } - else - { - System::println( - "Warning: binary caching disabled because abi keys are missing values:\n%s", - Strings::join("", abi_tag_entries_missing, [](const AbiEntry& e) { return " " + e.key + "\n"; })); - return nullopt; - } + System::println( + "Warning: binary caching disabled because abi keys are missing values:\n%s", + Strings::join("", abi_tag_entries_missing, [](const AbiEntry& e) { return " " + e.key + "\n"; })); + + return nullopt; } static void decompress_archive(const VcpkgPaths& paths, const PackageSpec& spec, const fs::path& archive_path) @@ -518,10 +517,10 @@ namespace vcpkg::Build Checks::check_exit(VCPKG_LINE_INFO, files.empty(), "unable to clear path: %s", pkg_path.u8string()); #if defined(_WIN32) - auto&& _7za = paths.get_tool_exe(Tools::SEVEN_ZIP); + auto&& seven_zip_exe = paths.get_tool_exe(Tools::SEVEN_ZIP); System::cmd_execute_clean(Strings::format( - R"("%s" x "%s" -o"%s" -y >nul)", _7za.u8string(), archive_path.u8string(), pkg_path.u8string())); + R"("%s" x "%s" -o"%s" -y >nul)", seven_zip_exe.u8string(), archive_path.u8string(), pkg_path.u8string())); #else System::cmd_execute_clean(Strings::format( R"(unzip -qq "%s" "-d%s")", archive_path.u8string(), pkg_path.u8string())); @@ -538,11 +537,11 @@ namespace vcpkg::Build Checks::check_exit( VCPKG_LINE_INFO, !fs.exists(tmp_archive_path), "Could not remove file: %s", tmp_archive_path.u8string()); #if defined(_WIN32) - auto&& _7za = paths.get_tool_exe(Tools::SEVEN_ZIP); + auto&& seven_zip_exe = paths.get_tool_exe(Tools::SEVEN_ZIP); System::cmd_execute_clean(Strings::format( R"("%s" a "%s" "%s\*" >nul)", - _7za.u8string(), + seven_zip_exe.u8string(), tmp_archive_path.u8string(), paths.package_dir(spec).u8string())); #else @@ -584,7 +583,7 @@ namespace vcpkg::Build for (auto&& pspec : dep_pspecs) { if (pspec == spec) continue; - auto status_it = status_db.find_installed(pspec); + const auto status_it = status_db.find_installed(pspec); Checks::check_exit(VCPKG_LINE_INFO, status_it != status_db.end()); dependency_abis.emplace_back( AbiEntry{status_it->get()->package.spec.name(), status_it->get()->package.abi}); @@ -594,17 +593,15 @@ namespace vcpkg::Build auto maybe_abi_tag_and_file = compute_abi_tag(paths, config, pre_build_info, dependency_abis); - std::unique_ptr bcf; - - auto abi_tag_and_file = maybe_abi_tag_and_file.get(); + const auto abi_tag_and_file = maybe_abi_tag_and_file.get(); if (GlobalState::g_binary_caching && abi_tag_and_file) { - auto archives_root_dir = paths.root / "archives"; - auto archive_name = abi_tag_and_file->tag + ".zip"; - auto archive_subpath = fs::u8path(abi_tag_and_file->tag.substr(0, 2)) / archive_name; - auto archive_path = archives_root_dir / archive_subpath; - auto archive_tombstone_path = archives_root_dir / "fail" / archive_subpath; + 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)) { @@ -613,10 +610,12 @@ namespace vcpkg::Build decompress_archive(paths, spec, archive_path); auto maybe_bcf = Paragraphs::try_load_cached_package(paths, spec); - bcf = std::make_unique(std::move(maybe_bcf).value_or_exit(VCPKG_LINE_INFO)); + std::unique_ptr bcf = + std::make_unique(std::move(maybe_bcf).value_or_exit(VCPKG_LINE_INFO)); return {BuildResult::SUCCEEDED, std::move(bcf)}; } - else if (fs.exists(archive_tombstone_path)) + + if (fs.exists(archive_tombstone_path)) { System::println("Found failure tombstone: %s", archive_tombstone_path.u8string()); return BuildResult::BUILD_FAILED; @@ -635,7 +634,7 @@ namespace vcpkg::Build if (result.code == BuildResult::SUCCEEDED) { - auto tmp_archive_path = paths.buildtrees / spec.name() / (spec.triplet().to_string() + ".zip"); + const auto tmp_archive_path = paths.buildtrees / spec.name() / (spec.triplet().to_string() + ".zip"); compress_archive(paths, spec, tmp_archive_path); @@ -656,11 +655,9 @@ namespace vcpkg::Build return result; } - else - { - return do_build_package_and_clean_buildtrees( - paths, pre_build_info, spec, maybe_abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config, status_db); - } + + return do_build_package_and_clean_buildtrees( + paths, pre_build_info, spec, maybe_abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config, status_db); } const std::string& to_string(const BuildResult build_result) @@ -774,7 +771,7 @@ namespace vcpkg::Build 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"); - auto triplet_abi_tag = [&]() { + const std::string triplet_abi_tag = [&]() { static std::map s_hash_cache; if (GlobalState::g_binary_caching) -- cgit v1.2.3 From 627e91a08fbd2cc407b87bbf961067761dec78c0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:51:36 -0700 Subject: Util::unused() for commands that don't have arguments --- toolsrc/src/vcpkg/commands.cache.cpp | 2 +- toolsrc/src/vcpkg/commands.create.cpp | 2 +- toolsrc/src/vcpkg/commands.dependinfo.cpp | 3 +-- toolsrc/src/vcpkg/commands.import.cpp | 2 +- toolsrc/src/vcpkg/commands.integrate.cpp | 2 +- toolsrc/src/vcpkg/commands.owns.cpp | 2 +- toolsrc/src/vcpkg/commands.portsdiff.cpp | 2 +- toolsrc/src/vcpkg/commands.version.cpp | 2 +- 8 files changed, 8 insertions(+), 9 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index 85bf5fb4d..a9d8ba03c 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -38,7 +38,7 @@ namespace vcpkg::Commands::Cache void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - args.parse_arguments(COMMAND_STRUCTURE); + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); const std::vector binary_paragraphs = read_all_binary_paragraphs(paths); if (binary_paragraphs.empty()) diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp index 60769c9ef..dfb3ab784 100644 --- a/toolsrc/src/vcpkg/commands.create.cpp +++ b/toolsrc/src/vcpkg/commands.create.cpp @@ -18,7 +18,7 @@ namespace vcpkg::Commands::Create void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - args.parse_arguments(COMMAND_STRUCTURE); + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); const std::string port_name = args.command_arguments.at(0); const std::string url = args.command_arguments.at(1); diff --git a/toolsrc/src/vcpkg/commands.dependinfo.cpp b/toolsrc/src/vcpkg/commands.dependinfo.cpp index bb300d96e..1ca658216 100644 --- a/toolsrc/src/vcpkg/commands.dependinfo.cpp +++ b/toolsrc/src/vcpkg/commands.dependinfo.cpp @@ -19,7 +19,7 @@ namespace vcpkg::Commands::DependInfo void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - args.parse_arguments(COMMAND_STRUCTURE); + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); std::vector> source_control_files = Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports); @@ -30,7 +30,6 @@ namespace vcpkg::Commands::DependInfo Util::erase_remove_if(source_control_files, [&](const std::unique_ptr& source_control_file) { - const SourceParagraph& source_paragraph = *source_control_file->core_paragraph; if (Strings::case_insensitive_ascii_contains(source_paragraph.name, filter)) diff --git a/toolsrc/src/vcpkg/commands.import.cpp b/toolsrc/src/vcpkg/commands.import.cpp index 24394207b..4b595697a 100644 --- a/toolsrc/src/vcpkg/commands.import.cpp +++ b/toolsrc/src/vcpkg/commands.import.cpp @@ -103,7 +103,7 @@ namespace vcpkg::Commands::Import void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - args.parse_arguments(COMMAND_STRUCTURE); + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); const fs::path control_file_path(args.command_arguments[0]); const fs::path include_directory(args.command_arguments[1]); diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index d6ae27181..044a88d80 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -352,7 +352,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - args.parse_arguments(COMMAND_STRUCTURE); + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); #if defined(_WIN32) if (args.command_arguments[0] == Subcommand::INSTALL) diff --git a/toolsrc/src/vcpkg/commands.owns.cpp b/toolsrc/src/vcpkg/commands.owns.cpp index 52249187b..ee9584651 100644 --- a/toolsrc/src/vcpkg/commands.owns.cpp +++ b/toolsrc/src/vcpkg/commands.owns.cpp @@ -34,7 +34,7 @@ namespace vcpkg::Commands::Owns void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - args.parse_arguments(COMMAND_STRUCTURE); + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); const StatusParagraphs status_db = database_load_check(paths); search_file(paths, args.command_arguments[0], status_db); diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index c6b02582f..0a72b3435 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -128,7 +128,7 @@ namespace vcpkg::Commands::PortsDiff void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - args.parse_arguments(COMMAND_STRUCTURE); + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); const fs::path& git_exe = paths.get_tool_exe(Tools::GIT); diff --git a/toolsrc/src/vcpkg/commands.version.cpp b/toolsrc/src/vcpkg/commands.version.cpp index ffc5d2c8f..2ad91b57d 100644 --- a/toolsrc/src/vcpkg/commands.version.cpp +++ b/toolsrc/src/vcpkg/commands.version.cpp @@ -83,7 +83,7 @@ namespace vcpkg::Commands::Version void perform_and_exit(const VcpkgCmdArguments& args) { - args.parse_arguments(COMMAND_STRUCTURE); + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); System::println("Vcpkg package management program version %s\n" "\n" -- cgit v1.2.3 From 8d343ce6dfc850abdfbfd098765df072271ae6ad Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 02:58:30 -0700 Subject: [commands] Clang-tidy fixes --- toolsrc/src/vcpkg/commands.contact.cpp | 14 +++++++++----- toolsrc/src/vcpkg/commands.edit.cpp | 2 +- toolsrc/src/vcpkg/commands.integrate.cpp | 2 +- toolsrc/src/vcpkg/commands.list.cpp | 2 +- toolsrc/src/vcpkg/commands.upgrade.cpp | 3 ++- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.contact.cpp b/toolsrc/src/vcpkg/commands.contact.cpp index ffed07557..9f86a67dc 100644 --- a/toolsrc/src/vcpkg/commands.contact.cpp +++ b/toolsrc/src/vcpkg/commands.contact.cpp @@ -14,24 +14,28 @@ namespace vcpkg::Commands::Contact return S_EMAIL; } - static const CommandSwitch switches[] = {{"--survey", "Launch default browser to the current vcpkg survey"}}; + static constexpr StringLiteral OPTION_SURVEY = "--survey"; + + static constexpr std::array SWITCHES = {{ + {OPTION_SURVEY, "Launch default browser to the current vcpkg survey"}, + }}; const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("contact"), 0, 0, - {switches, {}}, + {SWITCHES, {}}, nullptr, }; void perform_and_exit(const VcpkgCmdArguments& args) { - auto parsed_args = args.parse_arguments(COMMAND_STRUCTURE); + const ParsedArguments parsed_args = args.parse_arguments(COMMAND_STRUCTURE); - if (Util::Sets::contains(parsed_args.switches, switches[0].name)) + if (Util::Sets::contains(parsed_args.switches, SWITCHES[0].name)) { auto maybe_now = Chrono::CTime::get_current_date_time(); - if (auto p_now = maybe_now.get()) + if (const auto p_now = maybe_now.get()) { auto& fs = Files::get_real_filesystem(); auto config = UserConfig::try_read_data(fs); diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index 6c696018e..f0ddd43c5 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -93,7 +93,7 @@ namespace vcpkg::Commands::Edit const std::vector from_registry = find_from_registry(); candidate_paths.insert(candidate_paths.end(), from_registry.cbegin(), from_registry.cend()); - auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { return fs.exists(p); }); + const auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { return fs.exists(p); }); if (it == candidate_paths.cend()) { System::println( diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 044a88d80..e70d9b2e3 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -108,7 +108,7 @@ namespace vcpkg::Commands::Integrate #if defined(_WIN32) static ElevationPromptChoice elevated_cmd_execute(const std::string& param) { - SHELLEXECUTEINFOW sh_ex_info = {0}; + SHELLEXECUTEINFOW sh_ex_info{}; sh_ex_info.cbSize = sizeof(sh_ex_info); sh_ex_info.fMask = SEE_MASK_NOCLOSEPROCESS; sh_ex_info.hwnd = nullptr; diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index a5efd5442..4c4518d25 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -10,7 +10,7 @@ namespace vcpkg::Commands::List static constexpr StringLiteral OPTION_FULLDESC = "--x-full-desc"; // TODO: This should find a better home, eventually - static void do_print(const StatusParagraph& pgh, bool full_desc) + static void do_print(const StatusParagraph& pgh, const bool full_desc) { if (full_desc) { diff --git a/toolsrc/src/vcpkg/commands.upgrade.cpp b/toolsrc/src/vcpkg/commands.upgrade.cpp index c5b48f2a2..a902ddeaf 100644 --- a/toolsrc/src/vcpkg/commands.upgrade.cpp +++ b/toolsrc/src/vcpkg/commands.upgrade.cpp @@ -144,7 +144,8 @@ namespace vcpkg::Commands::Upgrade const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES, Build::CleanBuildtrees::NO, - Build::CleanPackages::NO}; + Build::CleanPackages::NO, + Build::DownloadTool::BUILT_IN}; // Set build settings for all install actions for (auto&& action : plan) -- cgit v1.2.3 From f07026539835aad4b87e2a88b3e38e144edaa9dd Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 03:12:15 -0700 Subject: [export.cpp] Define all valuse in BuildOptions --- toolsrc/src/vcpkg/export.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 32151c791..eda909635 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -70,8 +70,11 @@ namespace vcpkg::Export { static constexpr std::array ORDER = {ExportPlanType::ALREADY_BUILT, ExportPlanType::NOT_BUILT}; - static constexpr Build::BuildPackageOptions build_options = {Build::UseHeadVersion::NO, - Build::AllowDownloads::YES}; + static constexpr Build::BuildPackageOptions BUILD_OPTIONS = {Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::NO, + Build::CleanPackages::NO, + Build::DownloadTool::BUILT_IN}; for (const ExportPlanType plan_type : ORDER) { @@ -84,7 +87,7 @@ namespace vcpkg::Export std::vector cont = it->second; std::sort(cont.begin(), cont.end(), &ExportPlanAction::compare_by_name); const std::string as_string = Strings::join("\n", cont, [](const ExportPlanAction* p) { - return Dependencies::to_output_string(p->request_type, p->spec.to_string(), build_options); + return Dependencies::to_output_string(p->request_type, p->spec.to_string(), BUILD_OPTIONS); }); switch (plan_type) -- cgit v1.2.3 From 269e78bb610369cbdc193be92c4fdd5bba1f7831 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 03:12:33 -0700 Subject: Remove unused #include directives --- toolsrc/src/vcpkg/export.cpp | 2 -- toolsrc/src/vcpkg/parse.cpp | 1 - toolsrc/src/vcpkg/triplet.cpp | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index eda909635..85a4dfad1 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -13,8 +13,6 @@ #include #include -#include - namespace vcpkg::Export { using Dependencies::ExportPlanAction; diff --git a/toolsrc/src/vcpkg/parse.cpp b/toolsrc/src/vcpkg/parse.cpp index c2670f561..d50296cf8 100644 --- a/toolsrc/src/vcpkg/parse.cpp +++ b/toolsrc/src/vcpkg/parse.cpp @@ -2,7 +2,6 @@ #include -#include #include namespace vcpkg::Parse diff --git a/toolsrc/src/vcpkg/triplet.cpp b/toolsrc/src/vcpkg/triplet.cpp index ef0fab183..c4ad3f690 100644 --- a/toolsrc/src/vcpkg/triplet.cpp +++ b/toolsrc/src/vcpkg/triplet.cpp @@ -1,6 +1,5 @@ #include "pch.h" -#include #include #include @@ -38,7 +37,7 @@ namespace vcpkg const Triplet Triplet::ARM_UWP = from_canonical_name("arm-uwp"); const Triplet Triplet::ARM64_UWP = from_canonical_name("arm64-uwp"); const Triplet Triplet::ARM_WINDOWS = from_canonical_name("arm-windows"); - const Triplet Triplet::ARM64_WINDOWS = from_canonical_name("arm64-windows"); + const Triplet Triplet::ARM64_WINDOWS = from_canonical_name("arm64-windows"); bool Triplet::operator==(const Triplet& other) const { return this->m_instance == other.m_instance; } -- cgit v1.2.3 From 77338ee0df064fe89f9eb991b61bc9bb467f755c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 7 Apr 2018 03:24:45 -0700 Subject: Remove more unused #include directives --- toolsrc/include/vcpkg/base/chrono.h | 1 - toolsrc/include/vcpkg/export.ifw.h | 2 -- toolsrc/include/vcpkg/paragraphs.h | 3 --- toolsrc/include/vcpkg/vcpkgcmdarguments.h | 1 - toolsrc/include/vcpkg/vcpkgpaths.h | 2 -- toolsrc/src/vcpkg/commands.portsdiff.cpp | 1 + 6 files changed, 1 insertion(+), 9 deletions(-) diff --git a/toolsrc/include/vcpkg/base/chrono.h b/toolsrc/include/vcpkg/base/chrono.h index 4291115f7..7b393e377 100644 --- a/toolsrc/include/vcpkg/base/chrono.h +++ b/toolsrc/include/vcpkg/base/chrono.h @@ -2,7 +2,6 @@ #include #include -#include #include namespace vcpkg::Chrono diff --git a/toolsrc/include/vcpkg/export.ifw.h b/toolsrc/include/vcpkg/export.ifw.h index d28a4436d..b1573924e 100644 --- a/toolsrc/include/vcpkg/export.ifw.h +++ b/toolsrc/include/vcpkg/export.ifw.h @@ -3,8 +3,6 @@ #include #include -#include - #include #include diff --git a/toolsrc/include/vcpkg/paragraphs.h b/toolsrc/include/vcpkg/paragraphs.h index fa0265b75..56f09387a 100644 --- a/toolsrc/include/vcpkg/paragraphs.h +++ b/toolsrc/include/vcpkg/paragraphs.h @@ -3,12 +3,9 @@ #include #include #include -#include #include -#include - namespace vcpkg::Paragraphs { using RawParagraph = Parse::RawParagraph; diff --git a/toolsrc/include/vcpkg/vcpkgcmdarguments.h b/toolsrc/include/vcpkg/vcpkgcmdarguments.h index f449887f1..de65eec28 100644 --- a/toolsrc/include/vcpkg/vcpkgcmdarguments.h +++ b/toolsrc/include/vcpkg/vcpkgcmdarguments.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include #include diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index fc6b319d8..9c8f2911a 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -8,8 +8,6 @@ #include #include -#include - namespace vcpkg { namespace Tools diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp index 0a72b3435..2d2b4bd5f 100644 --- a/toolsrc/src/vcpkg/commands.portsdiff.cpp +++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3 From 1e1899c3a27f3816c39145049e2c33832071b8c6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sun, 8 Apr 2018 15:12:19 -0700 Subject: [ps1] Handle "downloading" local files Fixes #3230 --- scripts/VcpkgPowershellUtils.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index f6882409b..3ab301c55 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -166,6 +166,12 @@ function vcpkgDownloadFileWithAria2( [Parameter(Mandatory=$true)][string]$ari $parentDir = split-path -parent $downloadPath $filename = split-path -leaf $downloadPath + if ((Test-Path $url) -or ($url.StartsWith("file://"))) # if is local file + { + vcpkgDownloadFile $url $downloadPath $sha512 + return + } + $ec = vcpkgInvokeCommand "$aria2exe" "--dir `"$parentDir`" --out `"$filename.part`" $url" if ($ec -ne 0) { -- cgit v1.2.3 From aa5f9f00e039ff22c287e4c580608d49f473a79b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 9 Apr 2018 19:31:48 -0700 Subject: [folly] Update taking into account change in cmake files location --- ports/folly/CONTROL | 2 +- ports/folly/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index cb3a464af..865c93ce6 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,5 +1,5 @@ Source: folly -Version: 2018.03.19.00-2 +Version: 2018.04.09.00 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 Default-Features: zlib diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index ce101d918..520ab0539 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -17,8 +17,8 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2018.03.19.00 - SHA512 72df8768753bf9f1109ad3f16645d811906b633833c91c7d9fe856a06c16b5e398876cf6cae415401eff96b568c99ffa1dc0c44d81cd40219bafb0f4c72fc2ca + REF v2018.04.09.00 + SHA512 625034437ee6c261949652dbd6cafb50b0954b691750e4591cd0eb03cf369348cfae3b4b98c012bd906a157b7642ebcb1d8843311c74416ed51bffc5b1da3018 HEAD_REF master ) @@ -75,7 +75,7 @@ vcpkg_install_cmake(ADD_BIN_TO_PATH) vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/folly) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 908e714980fe2f2ab32cba4dd44f6a61b5991733 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 9 Apr 2018 22:14:47 -0700 Subject: Fix typo --- scripts/fetchTool.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 8de642674..be18656c7 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -22,7 +22,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) if ($toolData -eq $null) { - throw "Unkown tool $tool" + throw "Unknown tool $tool" } $toolPath="$downloadsDir\tools\$tool-$($toolData.version)-windows" -- cgit v1.2.3 From 05edef92233854e944baa3cbde4d5b004f717bdd Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 9 Apr 2018 19:18:56 -0700 Subject: [abseil][aws-sdk-cpp][exiv2][forest][jsonnet][rs-core-lib][thrift][unicorn-lib] Upgrades --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/forest/CONTROL | 2 +- ports/forest/portfile.cmake | 4 ++-- ports/jsonnet/CONTROL | 2 +- ports/jsonnet/portfile.cmake | 4 ++-- ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/unicorn-lib/CONTROL | 2 +- ports/unicorn-lib/portfile.cmake | 4 ++-- 16 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index dddbdd2b2..42edc7e12 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-04-05 +Version: 2018-04-09 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 8abf42dc4..f2a08328b 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF abd0824ba64094e860803730c44d985334ad8770 - SHA512 2ba077b82a526612d8339d0f89cd82b57d510de2056ae12a07903ae39e536c2c0a8a7ccf37cf7228a372dd3e3db50a441afe76f448ce3483de86b49c495fcc06 + REF 3f622d6c5990a7ae80eb8e52450c309a28bbec77 + SHA512 27c11bbe4e321fcd42f1947fab2a7deb108443bf46260e7f7920cc28442a4dbfbf315d579e866b2d82e92cfe1fd43e82cbd51e907cbf74a25d724cfd8acda055 HEAD_REF master ) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index a3e7c57c5..c9338b0cc 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,5 +1,5 @@ Source: aws-sdk-cpp -Version: 1.4.31-1 +Version: 1.4.32 Description: AWS SDK for C++ Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows) Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index d3cf3f0bb..6b3b1f241 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.4.31 - SHA512 f0fc2c3c82201ff68ba53c19a7a452e79b5dc9fc47a146e4917105cfac546d64c57a8203beadaf9842e1c4e93ac2245ffbfd247a88107de12245d1624f35dddf + REF 1.4.32 + SHA512 f37aaf1d439acd1563fe50624e2e7856ba5d267a540a8cd1fde80d0d7bd9e2cdd261f9f6e3e843548cc17b8ea7158419a9e0ed27092acf5c22b5c9e38d327c64 HEAD_REF master ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index f620972ef..af05d4ddf 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-04-06 +Version: 2018-04-09 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 90ffe6ddc..109105085 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF 336b759cc0192e7db1ccafd42e13a43085e74a58 - SHA512 1e94d31d9b6667ea8dcff12fb4a0a9c24dba44f665a98dba1752657a3a26a654655c2c00eecfdf540a76e9e217f21d9471e0e244226f4e013fc044ad245adaaa + REF fbd8e2669e223d43c34777c61029bb19b4c6e833 + SHA512 9c87e3123458e9dbf24df80118a09a6cc2c10855b19e59b3164634166b10f2daef54ac35a207bf8865eeb08cbc1d2d5b2ab33e4f2539bf8ffa82a7012c0eecc4 HEAD_REF master ) diff --git a/ports/forest/CONTROL b/ports/forest/CONTROL index e161e22ae..c37318d66 100644 --- a/ports/forest/CONTROL +++ b/ports/forest/CONTROL @@ -1,3 +1,3 @@ Source: forest -Version: 7.0.3 +Version: 7.0.6 Description: Forest is an open-source, template library of tree data structures written in C++11. diff --git a/ports/forest/portfile.cmake b/ports/forest/portfile.cmake index 39ef63350..48ab6c9dd 100644 --- a/ports/forest/portfile.cmake +++ b/ports/forest/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xorz57/forest - REF 7.0.3 - SHA512 0e3adde14d9035427f3ca4d40cf6ee9598e8222f0e9884e570cdddf31ceb4fb516c802bf2abfb169e35da6adebfd7514238ca23121871fe9911419449a72cfe0 + REF 7.0.6 + SHA512 a1e5d27f2b8b9e6758a67a9124fc25517074c633644651b26f6683bab09189569e75ccf4ae7d9cfeddae234435b073fc00e0f5385c4e9370062c3e8b222c1c59 HEAD_REF master ) diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index f32796ca3..55bc73fa4 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-03-17 +Version: 2018-04-09 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 0041d7f2c..02afe21b8 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF 9829acf280a64b58ad0b14c9f5c28fe8564ed13e - SHA512 5ddcc3d6bc91467da766ba0ed81251066e348db14d1fdf681bdd6c08189249d1c221dab73cc6bdf85465217aeda186f2f5c0eee11bb179435a52ff57be12d20e + REF bdbb3b32dda55b42b1f8843acc88f7bb4e38103f + SHA512 a275b63169a24c3319029dee85ec1efec54310cbc8a347a3f791dae6c2565358b74ce48f373453abd7b57361b67388fb85b9401f014df0b132f1cf0dd9babb49 HEAD_REF master ) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index 1a0ea6519..de6b3c5a2 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-04-06 +Version: 2018-04-09 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index 8229e78e8..18d127849 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF 0a500c3a326d1ba177e48ebdb2d71b0a9cd54eae - SHA512 14642b9c3c4eba8faea434eb94fc19fadbc8e40cbf43ae3591be89b1cd2a0b2f13f93c7ac88d1778d557a185fa6efe5eadf64542da7baf625a39dcb53b0b2313 + REF ca8065dea45355836d9ca834823775c23a1f3571 + SHA512 4bead4c2317f8b1f33844eacd052724680da6e00d52acb9238a458598a0745a86e91ac8f41a9b2ec4be1365a18e727e1e2659910f293d3bfe3f3b49d34d20b30 HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 57caf006a..e544fbbe0 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-04-06 +Version: 2018-04-09 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 626ef2b44..5461f3307 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 7ad0665008764c0522672b314605d88959e20716 - SHA512 5fc3b5084d40b972af13c00008f5d8b7d7dbe82cfbec31769b09a042911dee99f0979a2592dbcb72836c0ee5036905e1caee2cc76c4e296b20855276c4c30ffd + REF 606f1ef31447526b908244933d5b716397a6bad8 + SHA512 101de834e8f19ed5f4855a3b138425ffdc8103565f04656f1544098821ad54d5e89f8275cf50b380f01d3a83f4ba7670ec1cc79ec7bd4594172f6fb06d3e034b HEAD_REF master ) diff --git a/ports/unicorn-lib/CONTROL b/ports/unicorn-lib/CONTROL index 2c742eedc..4a46f6343 100644 --- a/ports/unicorn-lib/CONTROL +++ b/ports/unicorn-lib/CONTROL @@ -1,4 +1,4 @@ Source: unicorn-lib -Version: 2018-03-13 +Version: 2018-04-09 Description: Unicode library for C++ by Ross Smith Build-Depends: rs-core-lib, pcre, zlib, libiconv diff --git a/ports/unicorn-lib/portfile.cmake b/ports/unicorn-lib/portfile.cmake index c76da4fa3..c215e7ccd 100644 --- a/ports/unicorn-lib/portfile.cmake +++ b/ports/unicorn-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/unicorn-lib - REF 8fc132c879e748a61c9e4b6a93a6de209b55dbe5 - SHA512 f70d9fd9c06b4bf7a771abfacd1f989f03ea51395b6819b1162a13954e680d49622e48b61b71195c598ac21861435c6c5fe8ff368880098a07eb4b86547eede0 + REF 38b8bfe7b22978d42923a55ed3303a0aadd86abd + SHA512 423dc648476cc957273a7a81770ce5b25452bd685aaa36688cecb1e7cc83495ede6a441fb33e010e80782986c32a8cc87fe42844b0ccd597ce9a4e5286dc6791 HEAD_REF master ) -- cgit v1.2.3 From 504b4b797a27c42db6783864863b4101699b095a Mon Sep 17 00:00:00 2001 From: RT222 Date: Tue, 10 Apr 2018 19:31:57 +0200 Subject: [yoga] Update to 1.8.0 (#3234) --- ports/yoga/CONTROL | 2 +- ports/yoga/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/yoga/CONTROL b/ports/yoga/CONTROL index c4bbe1a69..7a96eb9c2 100644 --- a/ports/yoga/CONTROL +++ b/ports/yoga/CONTROL @@ -1,3 +1,3 @@ Source: yoga -Version: 1.7.0-1 +Version: 1.8.0-1 Description: Yoga is a cross-platform layout engine which implements Flexbox diff --git a/ports/yoga/portfile.cmake b/ports/yoga/portfile.cmake index a261d5106..5dbb4e527 100644 --- a/ports/yoga/portfile.cmake +++ b/ports/yoga/portfile.cmake @@ -21,8 +21,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/yoga - REF 1.7.0 - SHA512 3472a6db429e1fd0365321b2e663935741c4c97331f3936ea7b590b8218ada567ef7517fb20b1c843c1aad393e2b564e9626170a3d6c25e85450f9e8eb7ffdcc + REF v1.8.0 + SHA512 9af0e9e66ce223c99a9cab12721099ca40f85d2fa2a0e0a7d2bcff6d5acc5b6ca0edaaa53e49ec921bf78bb986070702cfe3271c4819147486dad6f6ee93e690 HEAD_REF master ) -- cgit v1.2.3 From bb054e645d6a91adc6d533929ff3b4d9fd1d8788 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 2 Apr 2018 20:40:25 -0700 Subject: [vcpkg] Don't pass /utf-8 to VS 2013 --- scripts/cmake/vcpkg_configure_cmake.cmake | 1 + scripts/toolchains/windows.cmake | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 3a3a88515..3e0922428 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -165,6 +165,7 @@ function(vcpkg_configure_cmake) list(APPEND _csc_OPTIONS "-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}" + "-DVCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" diff --git a/scripts/toolchains/windows.cmake b/scripts/toolchains/windows.cmake index 7bfc2282b..753723bd9 100644 --- a/scripts/toolchains/windows.cmake +++ b/scripts/toolchains/windows.cmake @@ -9,8 +9,16 @@ 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() - set(CMAKE_CXX_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}" CACHE STRING "") - set(CMAKE_C_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}" CACHE STRING "") + set(CHARSET_FLAG "/utf-8") + if(VCPKG_PLATFORM_TOOLSET MATCHES "v120") + # VS 2013 does not support /utf-8 + set(CHARSET_FLAG) + endif() + + 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 "") + + 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 "") set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG ${VCPKG_CRT_LINK_FLAG_PREFIX}d /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "") -- cgit v1.2.3 From 6d0d3b1d2c4ac7e798c029a25ca870b03e1877fe Mon Sep 17 00:00:00 2001 From: Gabor Cseh Date: Tue, 10 Apr 2018 19:49:55 +0200 Subject: At static build now the bin directories are removed. (#3240) --- ports/plplot/portfile.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ports/plplot/portfile.cmake b/ports/plplot/portfile.cmake index 372a59bba..7b35f0a15 100644 --- a/ports/plplot/portfile.cmake +++ b/ports/plplot/portfile.cmake @@ -53,6 +53,14 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/pltek.exe ) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(STATUS "Static build: Removing the full bin directory.") + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/bin + ) +endif() + # Remove unwanted and duplicate directories file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include -- cgit v1.2.3 From 58be8482764c4bae5a62418786b30432a69649aa Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 10 Apr 2018 10:52:19 -0700 Subject: [vcpkg] Always use -c65001 for the resource compiler on windows. Fixes #3221. --- scripts/toolchains/windows.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/toolchains/windows.cmake b/scripts/toolchains/windows.cmake index 753723bd9..266e023b1 100644 --- a/scripts/toolchains/windows.cmake +++ b/scripts/toolchains/windows.cmake @@ -17,6 +17,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) -- cgit v1.2.3 From eda41aa2caae4ec0d33f0e372c1f8ff1e2d5dafc Mon Sep 17 00:00:00 2001 From: chausner Date: Tue, 10 Apr 2018 19:56:24 +0200 Subject: Add liblinear package (#3229) --- ports/liblinear/CMakeLists.txt | 47 ++++++++++++++++++++++++++++++++++++++++++ ports/liblinear/CONTROL | 3 +++ ports/liblinear/portfile.cmake | 26 +++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 ports/liblinear/CMakeLists.txt create mode 100644 ports/liblinear/CONTROL create mode 100644 ports/liblinear/portfile.cmake diff --git a/ports/liblinear/CMakeLists.txt b/ports/liblinear/CMakeLists.txt new file mode 100644 index 000000000..6e6928a91 --- /dev/null +++ b/ports/liblinear/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.9) +project(liblinear) + +add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + +add_library(blas OBJECT + blas/daxpy.c + blas/ddot.c + blas/dnrm2.c + blas/dscal.c +) + +add_library(liblinear + linear.cpp + tron.cpp + $ +) +target_include_directories(liblinear PRIVATE .) +if(BUILD_SHARED_LIBS) + target_link_libraries(liblinear PRIVATE "-DEF:${CMAKE_CURRENT_SOURCE_DIR}/linear.def") +endif() + +add_executable(train train.c $) +target_link_libraries(train liblinear) + +add_executable(predict predict.c $) +target_link_libraries(predict liblinear) + +install( + TARGETS liblinear + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install( + TARGETS train predict + RUNTIME DESTINATION tools/liblinear + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES linear.h tron.h + DESTINATION include/liblinear) +endif() \ No newline at end of file diff --git a/ports/liblinear/CONTROL b/ports/liblinear/CONTROL new file mode 100644 index 000000000..3e83e601d --- /dev/null +++ b/ports/liblinear/CONTROL @@ -0,0 +1,3 @@ +Source: liblinear +Version: 2.20 +Description: A Library for Large Linear Classification diff --git a/ports/liblinear/portfile.cmake b/ports/liblinear/portfile.cmake new file mode 100644 index 000000000..4d662d0a5 --- /dev/null +++ b/ports/liblinear/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cjlin1/liblinear + REF v220 + SHA512 cde798b7cb221513cf2b8bbe134d6c3dce1ed26c43504d8c09dbed93b82ca47bfd271d4dd3d03384187273906ce140d4ce4418a4a8c21410015ec1631c1042c6 + HEAD_REF master +) + +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 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/liblinear) + +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblinear RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblinear) -- cgit v1.2.3 From b4aad86642c50afcbaa4e348dba2b8f86c28ad56 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 10 Apr 2018 10:58:48 -0700 Subject: [forest] Revise description. Fixes #3235 --- ports/forest/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/forest/CONTROL b/ports/forest/CONTROL index c37318d66..76dbbf47e 100644 --- a/ports/forest/CONTROL +++ b/ports/forest/CONTROL @@ -1,3 +1,3 @@ Source: forest Version: 7.0.6 -Description: Forest is an open-source, template library of tree data structures written in C++11. +Description: Template library of tree data structures -- cgit v1.2.3 From bb7501a37eb266aaeb6ff9af9d85d0b782eb1981 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 10 Apr 2018 15:05:04 -0700 Subject: [protobuf] Fix for linux/osx --- ports/protobuf/CONTROL | 2 +- ports/protobuf/portfile.cmake | 30 +++++++++++++++++++++--------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 86fecafc5..12e508f6d 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.5.1-1 +Version: 3.5.1-2 Description: Protocol Buffers - Google's data interchange format Feature: zlib diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 593eebe7d..765b52a1d 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -21,7 +21,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/js-embed.patch" ) -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(CMAKE_HOST_WIN32) set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32) vcpkg_download_distfile(TOOL_ARCHIVE_FILE URLS "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-win32.zip" @@ -85,27 +85,39 @@ endfunction() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/include) +if(CMAKE_HOST_WIN32) + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") file(READ ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake RELEASE_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc.exe" "\${_IMPORT_PREFIX}/tools/protoc.exe" RELEASE_MODULE "${RELEASE_MODULE}") + string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protoc${EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake "${RELEASE_MODULE}") endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") file(READ ${CURRENT_PACKAGES_DIR}/debug/share/protobuf/protobuf-targets-debug.cmake DEBUG_MODULE) string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") - string(REPLACE "\${_IMPORT_PREFIX}/debug/bin/protoc.exe" "\${_IMPORT_PREFIX}/tools/protoc.exe" DEBUG_MODULE "${DEBUG_MODULE}") + string(REPLACE "\${_IMPORT_PREFIX}/debug/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protoc${EXECUTABLE_SUFFIX}" DEBUG_MODULE "${DEBUG_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-debug.cmake "${DEBUG_MODULE}") endif() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/share) -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin) - protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) +if(CMAKE_HOST_WIN32) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin) + protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) + else() + protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin/protoc.exe) + protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe) + endif() else() - protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin/protoc.exe) - protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe) + protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/protoc DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -115,7 +127,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) endif() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/protobuf RENAME copyright) -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(CMAKE_HOST_WIN32) file(INSTALL ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) endif() vcpkg_copy_pdbs() -- cgit v1.2.3 From 401e7a0e7ca47cefb7e332f50333f8719d26a90c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 10 Apr 2018 15:38:58 -0700 Subject: [vcpkg_build_cmake] Add workaround for WSL filesystem issues --- scripts/cmake/vcpkg_build_cmake.cmake | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 630662588..41415d9a8 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -105,6 +105,7 @@ function(vcpkg_build_cmake) if(out_contents MATCHES "LINK : fatal error LNK1102:" OR out_contents MATCHES " fatal error C1060: ") # The linker ran out of memory during execution. We will try continuing once more, with parallelism disabled. + message(STATUS "Restarting Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} without parallelism because memory exceeded") execute_process( COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG} OUTPUT_FILE "${LOGPREFIX}-out-1.log" @@ -123,6 +124,33 @@ function(vcpkg_build_cmake) list(APPEND LOGS "${LOGPREFIX}-err-1.log") endif() endif() + elseif(out_contents MATCHES ": No such file or directory") + # WSL workaround - WSL occassionally fails with no such file or directory. Detect if we are running in WSL and restart. + execute_process(COMMAND "uname" "-r" + OUTPUT_VARIABLE UNAME_R ERROR_VARIABLE UNAME_R + OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) + + if (UNAME_R MATCHES "Microsoft") + message(STATUS "Restarting Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} because of (potential) wsl subsystem issue.") + execute_process( + COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} + OUTPUT_FILE "${LOGPREFIX}-out-1.log" + ERROR_FILE "${LOGPREFIX}-err-1.log" + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) + + if(error_code) + file(READ "${LOGPREFIX}-out-1.log" out_contents) + file(READ "${LOGPREFIX}-err-1.log" err_contents) + + if(out_contents) + list(APPEND LOGS "${LOGPREFIX}-out-1.log") + endif() + if(err_contents) + list(APPEND LOGS "${LOGPREFIX}-err-1.log") + endif() + endif() + endif() endif() if(error_code) -- cgit v1.2.3 From 9ccad4304edc3ac452b3c295d5ee203c861fcc6f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 10 Apr 2018 19:05:18 -0700 Subject: [directxmesh] Update to latest version. Resolves VS15.7 issues --- ports/directxmesh/CONTROL | 4 ++-- ports/directxmesh/portfile.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/directxmesh/CONTROL b/ports/directxmesh/CONTROL index 9ccd7156e..41b26ef1a 100644 --- a/ports/directxmesh/CONTROL +++ b/ports/directxmesh/CONTROL @@ -1,3 +1,3 @@ -Source: directxmesh -Version: feb2018 +Source: directxmesh +Version: feb2018-eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9 Description: DirectXMesh geometry processing library \ No newline at end of file diff --git a/ports/directxmesh/portfile.cmake b/ports/directxmesh/portfile.cmake index 69f335c61..6d64d3658 100644 --- a/ports/directxmesh/portfile.cmake +++ b/ports/directxmesh/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXMesh - REF feb2018 - SHA512 b5d21c8960ef9c8f2e608807ce29fd4873d0f4ad5bb0b6432f6efbb6110bfd61a16fbaab8a5c626cc1977f48923a562a618f29b9b2f112db625c0a8eb43f0422 + REF eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9 + SHA512 35a6be07fbdf5d9a39e7f5a3716057d09643d0c4bb43d39beae4233ca6941d2e2318b826dcc4a385dfa512675c7e28f320067b88bb325943b6532c8e65ebcd1b HEAD_REF master ) -- cgit v1.2.3 From 8da8f3e5b3cca98e9151d421a91f5c1590a47086 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 10 Apr 2018 04:48:02 -0700 Subject: [vcpkg] Rework dependencies.cpp to improve type safety and error detection --- toolsrc/include/vcpkg/base/optional.h | 6 + toolsrc/include/vcpkg/dependencies.h | 3 +- toolsrc/include/vcpkg/statusparagraph.h | 1 + toolsrc/include/vcpkg/vcpkglib.h | 2 +- toolsrc/src/tests.plan.cpp | 146 +++++++---- toolsrc/src/vcpkg/commands.list.cpp | 9 +- toolsrc/src/vcpkg/dependencies.cpp | 435 ++++++++++++++++---------------- toolsrc/src/vcpkg/remove.cpp | 4 +- toolsrc/src/vcpkg/statusparagraph.cpp | 8 +- toolsrc/src/vcpkg/update.cpp | 11 +- toolsrc/src/vcpkg/vcpkglib.cpp | 24 +- 11 files changed, 364 insertions(+), 285 deletions(-) diff --git a/toolsrc/include/vcpkg/base/optional.h b/toolsrc/include/vcpkg/base/optional.h index af2d297a6..b629de9b3 100644 --- a/toolsrc/include/vcpkg/base/optional.h +++ b/toolsrc/include/vcpkg/base/optional.h @@ -64,6 +64,12 @@ namespace vcpkg return std::move(this->m_base.value()); } + T& value_or_exit(const LineInfo& line_info) & + { + this->exit_if_null(line_info); + return this->m_base.value(); + } + const T& value_or_exit(const LineInfo& line_info) const& { this->exit_if_null(line_info); diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index fea0d88a9..704e76b07 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -37,8 +37,7 @@ namespace vcpkg::Dependencies InstallPlanAction(); - InstallPlanAction(const PackageSpec& spec, - InstalledPackageView&& spghs, + InstallPlanAction(InstalledPackageView&& spghs, const std::set& features, const RequestType& request_type); diff --git a/toolsrc/include/vcpkg/statusparagraph.h b/toolsrc/include/vcpkg/statusparagraph.h index 0802de530..16144e467 100644 --- a/toolsrc/include/vcpkg/statusparagraph.h +++ b/toolsrc/include/vcpkg/statusparagraph.h @@ -54,6 +54,7 @@ namespace vcpkg { } + const PackageSpec& spec() const { return core->package.spec; } std::vector dependencies() const; const StatusParagraph* core; diff --git a/toolsrc/include/vcpkg/vcpkglib.h b/toolsrc/include/vcpkg/vcpkglib.h index 3c8e676bf..5674d30db 100644 --- a/toolsrc/include/vcpkg/vcpkglib.h +++ b/toolsrc/include/vcpkg/vcpkglib.h @@ -16,7 +16,7 @@ namespace vcpkg SortedVector files; }; - std::vector get_installed_ports(const StatusParagraphs& status_db); + std::vector get_installed_ports(const StatusParagraphs& status_db); std::vector get_installed_files(const VcpkgPaths& paths, const StatusParagraphs& status_db); diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index a99f1abb9..b054702a1 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -81,7 +81,7 @@ namespace UnitTest1 { std::unordered_map map; Triplet triplet; - PackageSpecMap(const Triplet& t) { triplet = t; } + PackageSpecMap(const Triplet& t = Triplet::X86_WINDOWS) { triplet = t; } PackageSpec emplace(const char* name, const char* depends = "", @@ -105,7 +105,7 @@ namespace UnitTest1 { std::vector> status_paragraphs; - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a", "b"); auto spec_b = spec_map.emplace("b", "c"); auto spec_c = spec_map.emplace("c"); @@ -124,7 +124,7 @@ namespace UnitTest1 { std::vector> status_paragraphs; - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a", "d"); auto spec_b = spec_map.emplace("b", "d, e"); auto spec_c = spec_map.emplace("c", "e, h"); @@ -167,7 +167,7 @@ namespace UnitTest1 std::vector> status_paragraphs; status_paragraphs.push_back(make_status_pgh("a")); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = FullPackageSpec{spec_map.emplace("a")}; auto install_plan = @@ -187,7 +187,7 @@ namespace UnitTest1 { std::vector> status_paragraphs; - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = FullPackageSpec{spec_map.emplace("a", "b")}; auto spec_b = FullPackageSpec{spec_map.emplace("b")}; @@ -216,7 +216,7 @@ namespace UnitTest1 status_paragraphs.push_back(make_status_pgh("j", "k")); status_paragraphs.push_back(make_status_pgh("k")); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a", "b, c, d, e, f, g, h, j, k"); auto spec_b = spec_map.emplace("b", "c, d, e, f, g, h, j, k"); @@ -251,7 +251,7 @@ namespace UnitTest1 status_paragraphs.push_back(make_status_pgh("b")); status_paragraphs.push_back(make_status_feature_pgh("b", "b1")); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = FullPackageSpec{spec_map.emplace("a", "b, b[b1]", {{"a1", "b[b2]"}}), {"a1"}}; auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})}; @@ -271,7 +271,7 @@ namespace UnitTest1 { std::vector> status_paragraphs; - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[b1]", {{"a1", "b[b2]"}}), {"a1"}}; auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}, {"b2", ""}, {"b3", ""}})}; @@ -291,7 +291,7 @@ namespace UnitTest1 std::vector> status_paragraphs; status_paragraphs.push_back(make_status_pgh("a")); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}}), {"core"}}; auto spec_b = FullPackageSpec{spec_map.emplace("b")}; @@ -315,7 +315,7 @@ namespace UnitTest1 status_paragraphs.push_back(make_status_pgh("a")); status_paragraphs.push_back(make_status_feature_pgh("a", "a1", "")); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = FullPackageSpec{spec_map.emplace("a", "b", {{"a1", ""}})}; auto spec_b = FullPackageSpec{spec_map.emplace("b")}; @@ -334,7 +334,7 @@ namespace UnitTest1 { std::vector> status_paragraphs; - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = FullPackageSpec{spec_map.emplace("a", "", {{"a1", "b[b1]"}, {"a2", "b[b2]"}, {"a3", "a[a2]"}}), {"a3"}}; @@ -355,7 +355,7 @@ namespace UnitTest1 std::vector> status_paragraphs; status_paragraphs.push_back(make_status_pgh("b")); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = FullPackageSpec{spec_map.emplace("a", "b[core]"), {"core"}}; auto spec_b = FullPackageSpec{spec_map.emplace("b", "", {{"b1", ""}}), {"b1"}}; @@ -376,7 +376,7 @@ namespace UnitTest1 status_paragraphs.push_back(make_status_pgh("x", "b")); status_paragraphs.push_back(make_status_pgh("b")); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = FullPackageSpec{spec_map.emplace("a")}; auto spec_x = FullPackageSpec{spec_map.emplace("x", "a"), {"core"}}; @@ -674,17 +674,35 @@ namespace UnitTest1 Assert::IsTrue(install_plan[0].install_action.get()->computed_dependencies == std::vector{}); } + TEST_METHOD(install_with_default_features) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a", "")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map; + auto b_spec = spec_map.emplace("b", "", {{"0", ""}}, {"0"}); + auto a_spec = spec_map.emplace("a", "b[core]", {{"0", ""}}); + + // Install "a" and indicate that "b" should not install default features + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, {FeatureSpec{a_spec, "0"}, FeatureSpec{b_spec, "core"}}, status_db); + + Assert::IsTrue(install_plan.size() == 3); + remove_plan_check(&install_plan[0], "a"); + features_check(&install_plan[1], "b", {"core"}); + features_check(&install_plan[2], "a", {"0", "core"}); + } + TEST_METHOD(upgrade_with_default_features_1) { std::vector> pghs; pghs.push_back(make_status_pgh("a", "", "1")); pghs.push_back(make_status_feature_pgh("a", "0")); - pghs.back()->package.spec = - PackageSpec::from_name_and_triplet("a", Triplet::X86_WINDOWS).value_or_exit(VCPKG_LINE_INFO); StatusParagraphs status_db(std::move(pghs)); // Add a port "a" of which "core" and "0" are already installed. - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a", "", {{"0", ""}, {"1", ""}}, {"1"}); Dependencies::MapPortFileProvider provider(spec_map.map); @@ -697,23 +715,47 @@ namespace UnitTest1 Assert::AreEqual(size_t(2), plan.size()); Assert::AreEqual("a", plan[0].spec().name().c_str()); - Assert::IsTrue(plan[0].remove_action.has_value()); - - Assert::AreEqual("a", plan[1].spec().name().c_str()); - features_check(&plan[1], "a", {"core", "0"}, Triplet::X86_WINDOWS); + remove_plan_check(&plan[0], "a"); + features_check(&plan[1], "a", {"core", "0"}); } TEST_METHOD(upgrade_with_default_features_2) { std::vector> pghs; - pghs.push_back(make_status_pgh("b")); - pghs.push_back(make_status_pgh("a", "b[core]")); - pghs.back()->package.spec = - PackageSpec::from_name_and_triplet("a", Triplet::X64_WINDOWS).value_or_exit(VCPKG_LINE_INFO); + // B is currently installed _without_ default feature b0 + pghs.push_back(make_status_pgh("b", "", "b0", "x64-windows")); + pghs.push_back(make_status_pgh("a", "b[core]", "", "x64-windows")); + + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_a = spec_map.emplace("a", "b[core]"); + auto spec_b = spec_map.emplace("b", "", {{"b0", ""}, {"b1", ""}}, {"b0", "b1"}); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + graph.upgrade(spec_b); + auto plan = graph.serialize(); + + // The upgrade should install the new default feature b1 but not b0 + Assert::AreEqual(size_t(4), plan.size()); + remove_plan_check(&plan[0], "a", Triplet::X64_WINDOWS); + remove_plan_check(&plan[1], "b", Triplet::X64_WINDOWS); + features_check(&plan[2], "b", {"core", "b1"}, Triplet::X64_WINDOWS); + features_check(&plan[3], "a", {"core"}, Triplet::X64_WINDOWS); + } + + TEST_METHOD(upgrade_with_default_features_3) + { + std::vector> pghs; + // note: unrelated package due to x86 triplet + pghs.push_back(make_status_pgh("b", "", "", "x86-windows")); + pghs.push_back(make_status_pgh("a", "", "", "x64-windows")); StatusParagraphs status_db(std::move(pghs)); - // Add a port "a" of which "core" and "0" are already installed. PackageSpecMap spec_map(Triplet::X64_WINDOWS); auto spec_a = spec_map.emplace("a", "b[core]"); spec_map.emplace("b", "", {{"b0", ""}, {"b1", ""}}, {"b0"}); @@ -724,17 +766,33 @@ namespace UnitTest1 graph.upgrade(spec_a); auto plan = graph.serialize(); - // The upgrade should not install the default feature + // The upgrade should install the default feature Assert::AreEqual(size_t(3), plan.size()); + remove_plan_check(&plan[0], "a", Triplet::X64_WINDOWS); + features_check(&plan[1], "b", {"b0", "core"}, Triplet::X64_WINDOWS); + features_check(&plan[2], "a", {"core"}, Triplet::X64_WINDOWS); + } - Assert::AreEqual("a", plan[0].spec().name().c_str()); - Assert::IsTrue(plan[0].remove_action.has_value()); + TEST_METHOD(upgrade_with_new_default_feature) + { + std::vector> pghs; + pghs.push_back(make_status_pgh("a", "", "0", "x86-windows")); - Assert::AreEqual("b", plan[1].spec().name().c_str()); - features_check(&plan[1], "b", {"b0", "core"}, Triplet::X64_WINDOWS); + StatusParagraphs status_db(std::move(pghs)); - Assert::AreEqual("a", plan[2].spec().name().c_str()); - features_check(&plan[2], "a", {"core"}, Triplet::X64_WINDOWS); + PackageSpecMap spec_map; + auto spec_a = spec_map.emplace("a", "", {{"0", ""}, {"1", ""}, {"2", ""}}, {"0", "1"}); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + auto plan = graph.serialize(); + + // The upgrade should install the new default feature but not the old default feature 0 + Assert::AreEqual(size_t(2), plan.size()); + remove_plan_check(&plan[0], "a", Triplet::X86_WINDOWS); + features_check(&plan[1], "a", {"core", "1"}, Triplet::X86_WINDOWS); } TEST_METHOD(transitive_features_test) @@ -924,7 +982,7 @@ namespace UnitTest1 pghs.push_back(make_status_pgh("a")); StatusParagraphs status_db(std::move(pghs)); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a"); Dependencies::MapPortFileProvider provider(spec_map.map); @@ -948,7 +1006,7 @@ namespace UnitTest1 pghs.push_back(make_status_pgh("b", "a")); StatusParagraphs status_db(std::move(pghs)); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a"); spec_map.emplace("b", "a"); @@ -980,7 +1038,7 @@ namespace UnitTest1 pghs.push_back(make_status_pgh("b")); StatusParagraphs status_db(std::move(pghs)); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a"); spec_map.emplace("b", "a"); @@ -1004,7 +1062,7 @@ namespace UnitTest1 pghs.push_back(make_status_pgh("a")); StatusParagraphs status_db(std::move(pghs)); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a", "b"); spec_map.emplace("b"); @@ -1031,7 +1089,7 @@ namespace UnitTest1 pghs.push_back(make_status_feature_pgh("a", "a1")); StatusParagraphs status_db(std::move(pghs)); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a", "", {{"a1", ""}}); Dependencies::MapPortFileProvider provider(spec_map.map); @@ -1057,7 +1115,7 @@ namespace UnitTest1 StatusParagraphs status_db(std::move(pghs)); // a1 was added as a default feature and should be installed in upgrade - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a", "", {{"a1", ""}}, {"a1"}); Dependencies::MapPortFileProvider provider(spec_map.map); @@ -1083,7 +1141,7 @@ namespace UnitTest1 pghs.push_back(make_status_feature_pgh("a", "a2", "a[a1]")); StatusParagraphs status_db(std::move(pghs)); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a", "", {{"a1", ""}, {"a2", "a[a1]"}}); Dependencies::MapPortFileProvider provider(spec_map.map); @@ -1112,7 +1170,7 @@ namespace UnitTest1 pghs.push_back(make_status_pgh("a")); StatusParagraphs status_db(std::move(pghs)); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a"); auto plan = Dependencies::create_export_plan({spec_a}, status_db); @@ -1129,7 +1187,7 @@ namespace UnitTest1 pghs.push_back(make_status_pgh("b", "a")); StatusParagraphs status_db(std::move(pghs)); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a"); auto spec_b = spec_map.emplace("b", "a"); @@ -1150,7 +1208,7 @@ namespace UnitTest1 pghs.push_back(make_status_pgh("b")); StatusParagraphs status_db(std::move(pghs)); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a"); auto spec_b = spec_map.emplace("b", "a"); @@ -1165,7 +1223,7 @@ namespace UnitTest1 { StatusParagraphs status_db; - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a"); auto plan = Dependencies::create_export_plan({spec_a}, status_db); @@ -1183,7 +1241,7 @@ namespace UnitTest1 pghs.push_back(make_status_feature_pgh("a", "a1", "b[core]")); StatusParagraphs status_db(std::move(pghs)); - PackageSpecMap spec_map(Triplet::X86_WINDOWS); + PackageSpecMap spec_map; auto spec_a = spec_map.emplace("a", "", {{"a1", ""}}); auto plan = Dependencies::create_export_plan({spec_a}, status_db); diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index 4c4518d25..1bfbc4247 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -44,14 +44,19 @@ namespace vcpkg::Commands::List const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); const StatusParagraphs status_paragraphs = database_load_check(paths); - std::vector installed_packages = get_installed_ports(status_paragraphs); + auto installed_ipv = get_installed_ports(status_paragraphs); - if (installed_packages.empty()) + if (installed_ipv.empty()) { System::println("No packages are installed. Did you mean `search`?"); Checks::exit_success(VCPKG_LINE_INFO); } + auto installed_packages = Util::fmap(installed_ipv, [](const InstalledPackageView& ipv) { return ipv.core; }); + auto installed_features = + Util::fmap_flatten(installed_ipv, [](const InstalledPackageView& ipv) { return ipv.features; }); + installed_packages.insert(installed_packages.end(), installed_features.begin(), installed_features.end()); + std::sort(installed_packages.begin(), installed_packages.end(), [](const StatusParagraph* lhs, const StatusParagraph* rhs) -> bool { diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index f6d81c973..a8bc901a0 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -13,11 +13,17 @@ namespace vcpkg::Dependencies { - struct FeatureNodeEdges + struct ClusterInstalled { - std::vector remove_edges; - std::vector build_edges; - bool plus = false; + InstalledPackageView ipv; + std::set remove_edges; + std::set original_features; + }; + + struct ClusterSource + { + const SourceControlFile* scf; + std::unordered_map> build_edges; }; /// @@ -25,14 +31,15 @@ namespace vcpkg::Dependencies /// struct Cluster : Util::MoveOnlyBase { - InstalledPackageView installed_package; - - Optional source_control_file; PackageSpec spec; - std::unordered_map edges_by_feature; + + Optional installed; + Optional source; + + // Note: this map can contain "special" strings such as "" and "*" + std::unordered_map plus; std::set to_install_features; - std::set original_features; - bool will_remove = false; + bool minus = false; bool transient_uninstalled = true; RequestType request_type = RequestType::AUTO_SELECTED; }; @@ -88,27 +95,26 @@ namespace vcpkg::Dependencies auto maybe_scf = m_provider.get_control_file(spec.name()); auto& clust = m_graph[spec]; clust.spec = spec; - if (auto p_scf = maybe_scf.get()) cluster_from_scf(*p_scf, clust); + if (auto p_scf = maybe_scf.get()) + { + clust.source = cluster_from_scf(*p_scf, clust.spec.triplet()); + } return clust; } return it->second; } private: - void cluster_from_scf(const SourceControlFile& scf, Cluster& out_cluster) const + static ClusterSource cluster_from_scf(const SourceControlFile& scf, Triplet t) { - FeatureNodeEdges core_dependencies; - core_dependencies.build_edges = - filter_dependencies_to_specs(scf.core_paragraph->depends, out_cluster.spec.triplet()); - out_cluster.edges_by_feature.emplace("core", std::move(core_dependencies)); + ClusterSource ret; + ret.build_edges.emplace("core", filter_dependencies_to_specs(scf.core_paragraph->depends, t)); for (const auto& feature : scf.feature_paragraphs) - { - FeatureNodeEdges added_edges; - added_edges.build_edges = filter_dependencies_to_specs(feature->depends, out_cluster.spec.triplet()); - out_cluster.edges_by_feature.emplace(feature->name, std::move(added_edges)); - } - out_cluster.source_control_file = &scf; + ret.build_edges.emplace(feature->name, filter_dependencies_to_specs(feature->depends, t)); + + ret.scf = &scf; + return ret; } std::unordered_map m_graph; @@ -155,11 +161,10 @@ namespace vcpkg::Dependencies { } - InstallPlanAction::InstallPlanAction(const PackageSpec& spec, - InstalledPackageView&& ipv, + InstallPlanAction::InstallPlanAction(InstalledPackageView&& ipv, const std::set& features, const RequestType& request_type) - : spec(spec) + : spec(ipv.spec()) , installed_package(std::move(ipv)) , plan_type(InstallPlanType::ALREADY_INSTALLED) , request_type(request_type) @@ -289,11 +294,11 @@ namespace vcpkg::Dependencies struct RemoveAdjacencyProvider final : Graphs::AdjacencyProvider { const StatusParagraphs& status_db; - const std::vector& installed_ports; + const std::vector& installed_ports; const std::unordered_set& specs_as_set; RemoveAdjacencyProvider(const StatusParagraphs& status_db, - const std::vector& installed_ports, + const std::vector& installed_ports, const std::unordered_set& specs_as_set) : status_db(status_db), installed_ports(installed_ports), specs_as_set(specs_as_set) { @@ -308,24 +313,13 @@ namespace vcpkg::Dependencies const PackageSpec& spec = plan.spec; std::vector dependents; - for (const StatusParagraph* an_installed_package : installed_ports) + for (auto&& ipv : installed_ports) { - if (an_installed_package->package.spec.triplet() != spec.triplet()) continue; + auto deps = ipv.dependencies(); - std::vector deps = an_installed_package->package.depends; - // - // This is a hack to work around existing installations that put featurespecs into binary packages - // (example: curl[core]) Eventually, this can be returned to a simple string search. - for (auto&& dep : deps) - { - dep.erase(std::find(dep.begin(), dep.end(), '['), dep.end()); - } - Util::unstable_keep_if(deps, - [&](auto&& e) { return e != an_installed_package->package.spec.name(); }); - // - if (std::find(deps.begin(), deps.end(), spec.name()) == deps.end()) continue; + if (std::find(deps.begin(), deps.end(), spec) == deps.end()) continue; - dependents.push_back(an_installed_package->package.spec); + dependents.push_back(ipv.spec()); } return dependents; @@ -347,7 +341,7 @@ namespace vcpkg::Dependencies std::string to_string(const PackageSpec& spec) const override { return spec.to_string(); } }; - const std::vector& installed_ports = get_installed_ports(status_db); + auto installed_ports = get_installed_ports(status_db); const std::unordered_set specs_as_set(specs.cbegin(), specs.cend()); return Graphs::topological_sort(specs, RemoveAdjacencyProvider{status_db, installed_ports, specs_as_set}); } @@ -405,161 +399,201 @@ namespace vcpkg::Dependencies Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan, - const std::unordered_set& prevent_default_features = {}); + const std::unordered_set& prevent_default_features); - static void mark_minus(Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan); + static void mark_minus(Cluster& cluster, + ClusterGraph& graph, + GraphPlan& graph_plan, + const std::unordered_set& prevent_default_features); - MarkPlusResult mark_plus(const std::string& feature, - Cluster& cluster, - ClusterGraph& graph, - GraphPlan& graph_plan, - const std::unordered_set& prevent_default_features) + static MarkPlusResult follow_plus_dependencies(const std::string& feature, + Cluster& cluster, + ClusterGraph& graph, + GraphPlan& graph_plan, + const std::unordered_set& prevent_default_features) { - if (feature.empty()) + if (auto p_source = cluster.source.get()) { - if (prevent_default_features.find(cluster.spec.name()) == prevent_default_features.end()) + auto it_build_edges = p_source->build_edges.find(feature); + if (it_build_edges != p_source->build_edges.end()) { - // Indicates that core was not specified in the reference + // mark this package for rebuilding if needed + mark_minus(cluster, graph, graph_plan, prevent_default_features); + + graph_plan.install_graph.add_vertex({&cluster}); + cluster.to_install_features.insert(feature); - // Add default features for this package, if this is the "core" feature and we - // are not supposed to prevent default features for this package - if (auto scf = cluster.source_control_file.value_or(nullptr)) + if (feature != "core") { - for (auto&& default_feature : scf->core_paragraph.get()->default_features) - { - auto res = mark_plus(default_feature, cluster, graph, graph_plan, prevent_default_features); - if (res != MarkPlusResult::SUCCESS) - { - return res; - } - } + // All features implicitly depend on core + auto res = mark_plus("core", cluster, graph, graph_plan, prevent_default_features); + + // Should be impossible for "core" to not exist + Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS); } - // "core" is always an implicit default feature. In case we did not add it as - // a dependency above (e.g. no default features), add it here. - auto res = mark_plus("core", cluster, graph, graph_plan, prevent_default_features); - if (res != MarkPlusResult::SUCCESS) + if (!cluster.installed.get() && !Util::Sets::contains(prevent_default_features, cluster.spec.name())) { - return res; + // Add the default features of this package if it was not previously installed and it isn't being + // suppressed. + auto res = mark_plus("", cluster, graph, graph_plan, prevent_default_features); + + Checks::check_exit(VCPKG_LINE_INFO, + res == MarkPlusResult::SUCCESS, + "Error: Unable to satisfy default dependencies of %s", + cluster.spec); + } + + for (auto&& depend : it_build_edges->second) + { + auto& depend_cluster = graph.get(depend.spec()); + auto res = mark_plus(depend.feature(), depend_cluster, graph, graph_plan, prevent_default_features); + + Checks::check_exit(VCPKG_LINE_INFO, + res == MarkPlusResult::SUCCESS, + "Error: Unable to satisfy dependency %s of %s", + depend, + FeatureSpec(cluster.spec, feature)); + + if (&depend_cluster == &cluster) continue; + graph_plan.install_graph.add_edge({&cluster}, {&depend_cluster}); } - return MarkPlusResult::SUCCESS; - } - else - { - // Skip adding the default features, as explicitly told not to. return MarkPlusResult::SUCCESS; } } - auto it = cluster.edges_by_feature.find(feature); - if (it == cluster.edges_by_feature.end()) return MarkPlusResult::FEATURE_NOT_FOUND; + // The feature was not available in the installed package nor the source paragraph. + return MarkPlusResult::FEATURE_NOT_FOUND; + } - if (cluster.edges_by_feature[feature].plus) return MarkPlusResult::SUCCESS; + MarkPlusResult mark_plus(const std::string& feature, + Cluster& cluster, + ClusterGraph& graph, + GraphPlan& graph_plan, + const std::unordered_set& prevent_default_features) + { + auto& plus = cluster.plus[feature]; + if (plus) return MarkPlusResult::SUCCESS; + plus = true; - if (cluster.original_features.find(feature) == cluster.original_features.end()) + if (feature.empty()) { - cluster.transient_uninstalled = true; - } + // Add default features for this package. This is an exact reference, so ignore prevent_default_features. + if (auto p_source = cluster.source.get()) + { + for (auto&& default_feature : p_source->scf->core_paragraph.get()->default_features) + { + auto res = mark_plus(default_feature, cluster, graph, graph_plan, prevent_default_features); + if (res != MarkPlusResult::SUCCESS) + { + return res; + } + } + } + else + { + Checks::exit_with_message(VCPKG_LINE_INFO, + "Error: Unable to install default features because can't find CONTROL for %s", + cluster.spec); + } - if (!cluster.transient_uninstalled) - { - return MarkPlusResult::SUCCESS; + // "core" is always required. + return mark_plus("core", cluster, graph, graph_plan, prevent_default_features); } - cluster.edges_by_feature[feature].plus = true; - if (!cluster.original_features.empty()) + if (feature == "*") { - mark_minus(cluster, graph, graph_plan); - } + if (auto p_source = cluster.source.get()) + { + for (auto&& feature : p_source->scf->feature_paragraphs) + { + auto res = mark_plus(feature->name, cluster, graph, graph_plan, prevent_default_features); - graph_plan.install_graph.add_vertex({&cluster}); - auto& tracked = cluster.to_install_features; - tracked.insert(feature); + Checks::check_exit(VCPKG_LINE_INFO, + res == MarkPlusResult::SUCCESS, + "Error: Unable to locate feature %s in %s", + feature->name, + cluster.spec); + } - if (feature != "core") - { - // All features implicitly depend on core - auto res = mark_plus("core", cluster, graph, graph_plan, prevent_default_features); + auto res = mark_plus("core", cluster, graph, graph_plan, prevent_default_features); - // Should be impossible for "core" to not exist - Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS); - } - else - { - // Add the default features of this package. - auto res = mark_plus("", cluster, graph, graph_plan, prevent_default_features); + Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS); + } + else + { + Checks::exit_with_message( + VCPKG_LINE_INFO, "Error: Unable to handle '*' because can't find CONTROL for %s", cluster.spec); + } + return MarkPlusResult::SUCCESS; } - for (auto&& depend : cluster.edges_by_feature[feature].build_edges) + if (auto p_installed = cluster.installed.get()) { - auto& depend_cluster = graph.get(depend.spec()); - auto res = mark_plus(depend.feature(), depend_cluster, graph, graph_plan, prevent_default_features); - - Checks::check_exit(VCPKG_LINE_INFO, - res == MarkPlusResult::SUCCESS, - "Error: Unable to satisfy dependency %s of %s", - depend, - FeatureSpec(cluster.spec, feature)); - - if (&depend_cluster == &cluster) continue; - graph_plan.install_graph.add_edge({&cluster}, {&depend_cluster}); + if (p_installed->original_features.find(feature) != p_installed->original_features.end()) + { + return MarkPlusResult::SUCCESS; + } } - return MarkPlusResult::SUCCESS; + // This feature was or will be uninstalled, therefore we need to rebuild + mark_minus(cluster, graph, graph_plan, prevent_default_features); + + return follow_plus_dependencies(feature, cluster, graph, graph_plan, prevent_default_features); } - void mark_minus(Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan) + void mark_minus(Cluster& cluster, + ClusterGraph& graph, + GraphPlan& graph_plan, + const std::unordered_set& prevent_default_features) { - if (cluster.will_remove) return; - cluster.will_remove = true; - - std::unordered_set prevent_default_features; + if (cluster.minus) return; + cluster.minus = true; + cluster.transient_uninstalled = true; - if (cluster.request_type == RequestType::USER_REQUESTED) - { - // Do not install default features for packages which the user - // installed explicitly. New default features for dependent - // clusters should still be upgraded. - prevent_default_features.insert(cluster.spec.name()); + auto p_installed = cluster.installed.get(); + auto p_source = cluster.source.get(); - // For dependent packages this is handles through the recursion - } + Checks::check_exit( + VCPKG_LINE_INFO, + p_source, + "Error: cannot locate new portfile for %s. Please explicitly remove this package with `vcpkg remove %s`.", + cluster.spec, + cluster.spec); - graph_plan.remove_graph.add_vertex({&cluster}); - for (auto&& pair : cluster.edges_by_feature) + if (p_installed) { - auto& remove_edges_edges = pair.second.remove_edges; - for (auto&& depend : remove_edges_edges) + graph_plan.remove_graph.add_vertex({&cluster}); + for (auto&& edge : p_installed->remove_edges) { - auto& depend_cluster = graph.get(depend.spec()); - if (&depend_cluster != &cluster) graph_plan.remove_graph.add_edge({&cluster}, {&depend_cluster}); - mark_minus(depend_cluster, graph, graph_plan); + auto& depend_cluster = graph.get(edge); + Checks::check_exit(VCPKG_LINE_INFO, &cluster != &depend_cluster); + graph_plan.remove_graph.add_edge({&cluster}, {&depend_cluster}); + mark_minus(depend_cluster, graph, graph_plan, prevent_default_features); } - } - cluster.transient_uninstalled = true; - for (auto&& original_feature : cluster.original_features) - { - auto res = mark_plus(original_feature, cluster, graph, graph_plan, prevent_default_features); - if (res != MarkPlusResult::SUCCESS) + // Reinstall all original features. Don't use mark_plus because it will ignore them since they are + // "already installed". + for (auto&& f : p_installed->original_features) { - System::println(System::Color::warning, - "Warning: could not reinstall feature %s", - FeatureSpec{cluster.spec, original_feature}); + auto res = follow_plus_dependencies(f, cluster, graph, graph_plan, prevent_default_features); + if (res != MarkPlusResult::SUCCESS) + { + System::println(System::Color::warning, + "Warning: could not reinstall feature %s", + FeatureSpec{cluster.spec, f}); + } } - } - // Check if any default features have been added - if (auto scf = cluster.source_control_file.value_or(nullptr)) - { - auto& previous_df = cluster.installed_package.core->package.default_features; - for (auto&& default_feature : scf->core_paragraph->default_features) + // 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) { if (std::find(previous_df.begin(), previous_df.end(), default_feature) == previous_df.end()) { - // this is a new default feature, mark it for installation - auto res = mark_plus(default_feature, cluster, graph, graph_plan); + // This is a new default feature, mark it for installation + auto res = mark_plus(default_feature, cluster, graph, graph_plan, prevent_default_features); if (res != MarkPlusResult::SUCCESS) { System::println(System::Color::warning, @@ -588,7 +622,11 @@ namespace vcpkg::Dependencies PackageGraph pgraph(provider, status_db); for (auto&& spec : specs) + { + // If preventing default features, ignore the automatically generated "" references + if (spec.feature().empty() && Util::Sets::contains(prevent_default_features, spec.name())) continue; pgraph.install(spec, prevent_default_features); + } return pgraph.serialize(); } @@ -614,37 +652,10 @@ namespace vcpkg::Dependencies { Cluster& spec_cluster = m_graph->get(spec.spec()); spec_cluster.request_type = RequestType::USER_REQUESTED; - if (spec.feature() == "*") - { - if (auto p_scf = spec_cluster.source_control_file.value_or(nullptr)) - { - for (auto&& feature : p_scf->feature_paragraphs) - { - auto res = - mark_plus(feature->name, spec_cluster, *m_graph, *m_graph_plan, prevent_default_features); - - Checks::check_exit( - VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); - } - - auto res = mark_plus("core", spec_cluster, *m_graph, *m_graph_plan, prevent_default_features); - Checks::check_exit( - VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); - } - else - { - Checks::exit_with_message( - VCPKG_LINE_INFO, "Error: Unable to handle '*' because can't find CONTROL for %s", spec.spec()); - } - } - else - { - auto res = mark_plus(spec.feature(), spec_cluster, *m_graph, *m_graph_plan, prevent_default_features); + auto res = mark_plus(spec.feature(), spec_cluster, *m_graph, *m_graph_plan, prevent_default_features); - Checks::check_exit( - VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); - } + Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s", spec); m_graph_plan->install_graph.add_vertex(ClusterPtr{&spec_cluster}); } @@ -654,7 +665,7 @@ namespace vcpkg::Dependencies Cluster& spec_cluster = m_graph->get(spec); spec_cluster.request_type = RequestType::USER_REQUESTED; - mark_minus(spec_cluster, *m_graph, *m_graph_plan); + mark_minus(spec_cluster, *m_graph, *m_graph_plan, {}); } std::vector PackageGraph::serialize() const @@ -669,11 +680,8 @@ namespace vcpkg::Dependencies for (auto&& p_cluster : remove_toposort) { - auto scf = *p_cluster->source_control_file.get(); - auto spec = PackageSpec::from_name_and_triplet(scf->core_paragraph->name, p_cluster->spec.triplet()) - .value_or_exit(VCPKG_LINE_INFO); plan.emplace_back(RemovePlanAction{ - std::move(spec), + std::move(p_cluster->spec), RemovePlanType::REMOVE, p_cluster->request_type, }); @@ -684,8 +692,7 @@ 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_control_file.value_or_exit(VCPKG_LINE_INFO); - Checks::check_exit(VCPKG_LINE_INFO, pscf != nullptr); + auto pscf = p_cluster->source.value_or_exit(VCPKG_LINE_INFO).scf; auto dep_specs = Util::fmap(m_graph_plan->install_graph.adjacency_list(p_cluster), [](ClusterPtr const& p) { return p->spec; }); @@ -703,10 +710,10 @@ namespace vcpkg::Dependencies { // If the package isn't transitively installed, still include it if the user explicitly requested it if (p_cluster->request_type != RequestType::USER_REQUESTED) continue; + auto&& installed = p_cluster->installed.value_or_exit(VCPKG_LINE_INFO); plan.emplace_back(InstallPlanAction{ - p_cluster->spec, - InstalledPackageView{p_cluster->installed_package}, - p_cluster->original_features, + InstalledPackageView{installed.ipv}, + installed.original_features, p_cluster->request_type, }); } @@ -722,44 +729,36 @@ namespace vcpkg::Dependencies auto installed_ports = get_installed_ports(status_db); - for (auto&& status_paragraph : installed_ports) + for (auto&& ipv : installed_ports) { - Cluster& cluster = graph->get(status_paragraph->package.spec); + Cluster& cluster = graph->get(ipv.spec()); cluster.transient_uninstalled = false; - auto& status_paragraph_feature = status_paragraph->package.feature; - - // In this case, empty string indicates the "core" paragraph for a package. - if (status_paragraph_feature.empty()) - { - cluster.original_features.insert("core"); - cluster.installed_package.core = status_paragraph; - } - else - { - cluster.original_features.insert(status_paragraph_feature); - cluster.installed_package.features.emplace_back(status_paragraph); - } + cluster.installed = [](const InstalledPackageView& ipv) -> ClusterInstalled { + ClusterInstalled ret; + ret.ipv = ipv; + ret.original_features.emplace("core"); + for (auto&& feature : ipv.features) + ret.original_features.emplace(feature->package.feature); + return ret; + }(ipv); } // Populate the graph with "remove edges", which are the reverse of the Build-Depends edges. - for (auto&& status_paragraph : installed_ports) + for (auto&& ipv : installed_ports) { - auto& spec = status_paragraph->package.spec; - auto& status_paragraph_feature = status_paragraph->package.feature; - auto reverse_edges = FeatureSpec::from_strings_and_triplet(status_paragraph->package.depends, - status_paragraph->package.spec.triplet()); + auto deps = ipv.dependencies(); - for (auto&& dependency : reverse_edges) + for (auto&& dep : deps) { - auto& dep_cluster = graph->get(dependency.spec()); - - auto depends_name = dependency.feature(); - if (depends_name.empty()) depends_name = "core"; - - auto& target_node = dep_cluster.edges_by_feature[depends_name]; - target_node.remove_edges.emplace_back(FeatureSpec{spec, status_paragraph_feature}); + auto p_installed = graph->get(dep).installed.get(); + Checks::check_exit(VCPKG_LINE_INFO, + p_installed, + "Error: database corrupted. Package %s is installed but dependency %s is not.", + ipv.spec(), + dep); + p_installed->remove_edges.emplace(ipv.spec()); } } return graph; diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp index 32433b234..13cc9325e 100644 --- a/toolsrc/src/vcpkg/remove.cpp +++ b/toolsrc/src/vcpkg/remove.cpp @@ -201,9 +201,9 @@ namespace vcpkg::Remove static std::vector valid_arguments(const VcpkgPaths& paths) { const StatusParagraphs status_db = database_load_check(paths); - const std::vector installed_packages = get_installed_ports(status_db); + auto installed_packages = get_installed_ports(status_db); - return Util::fmap(installed_packages, [](auto&& pgh) -> std::string { return pgh->package.spec.to_string(); }); + return Util::fmap(installed_packages, [](auto&& pgh) -> std::string { return pgh.spec().to_string(); }); } const CommandStructure COMMAND_STRUCTURE = { diff --git a/toolsrc/src/vcpkg/statusparagraph.cpp b/toolsrc/src/vcpkg/statusparagraph.cpp index 62d1d4b42..236689494 100644 --- a/toolsrc/src/vcpkg/statusparagraph.cpp +++ b/toolsrc/src/vcpkg/statusparagraph.cpp @@ -95,7 +95,7 @@ namespace vcpkg // Add the core paragraph dependencies to the list deps.insert(deps.end(), core->package.depends.begin(), core->package.depends.end()); - auto&& spec = core->package.spec; + auto&& l_spec = spec(); // // This is a hack to work around existing installations that put featurespecs into binary packages @@ -104,12 +104,12 @@ namespace vcpkg { dep.erase(std::find(dep.begin(), dep.end(), '['), dep.end()); } - Util::unstable_keep_if(deps, [&](auto&& e) { return e != spec.name(); }); + Util::unstable_keep_if(deps, [&](auto&& e) { return e != l_spec.name(); }); // Util::sort_unique_erase(deps); return Util::fmap(deps, [&](const std::string& dep) -> PackageSpec { - auto maybe_dependency_spec = PackageSpec::from_name_and_triplet(dep, spec.triplet()); + auto maybe_dependency_spec = PackageSpec::from_name_and_triplet(dep, l_spec.triplet()); if (auto dependency_spec = maybe_dependency_spec.get()) { return std::move(*dependency_spec); @@ -120,7 +120,7 @@ namespace vcpkg "Invalid dependency [%s] in package [%s]\n" "%s", dep, - spec.name(), + l_spec.name(), vcpkg::to_string(error_type)); }); } diff --git a/toolsrc/src/vcpkg/update.cpp b/toolsrc/src/vcpkg/update.cpp index d6c5614ed..57259f952 100644 --- a/toolsrc/src/vcpkg/update.cpp +++ b/toolsrc/src/vcpkg/update.cpp @@ -17,17 +17,12 @@ namespace vcpkg::Update std::vector find_outdated_packages(const Dependencies::PortFileProvider& provider, const StatusParagraphs& status_db) { - const std::vector installed_packages = get_installed_ports(status_db); + auto installed_packages = get_installed_ports(status_db); std::vector output; - for (const StatusParagraph* pgh : installed_packages) + for (auto&& ipv : installed_packages) { - if (!pgh->package.feature.empty()) - { - // Skip feature paragraphs; only consider master paragraphs for needing updates. - continue; - } - + const auto& pgh = ipv.core; auto maybe_scf = provider.get_control_file(pgh->package.spec.name()); if (auto p_scf = maybe_scf.get()) { diff --git a/toolsrc/src/vcpkg/vcpkglib.cpp b/toolsrc/src/vcpkg/vcpkglib.cpp index 7979fd9a5..c8e95dab1 100644 --- a/toolsrc/src/vcpkg/vcpkglib.cpp +++ b/toolsrc/src/vcpkg/vcpkglib.cpp @@ -169,16 +169,32 @@ namespace vcpkg fs.rename(updated_listfile_path, listfile_path); } - std::vector get_installed_ports(const StatusParagraphs& status_db) + std::vector get_installed_ports(const StatusParagraphs& status_db) { - std::vector installed_packages; + std::map ipv_map; + + std::vector installed_packages; for (auto&& pgh : status_db) { if (!pgh->is_installed()) continue; - installed_packages.push_back(pgh.get()); + auto& ipv = ipv_map[pgh->package.spec]; + if (pgh->package.feature.empty()) + { + ipv.core = pgh.get(); + } + else + { + ipv.features.emplace_back(pgh.get()); + } } - return installed_packages; + for (auto&& ipv : ipv_map) + Checks::check_exit(VCPKG_LINE_INFO, + ipv.second.core != nullptr, + "Database is corrupted: package %s has features but no core paragraph.", + ipv.first); + + return Util::fmap(ipv_map, [](auto&& p) -> InstalledPackageView { return std::move(p.second); }); } std::vector get_installed_files(const VcpkgPaths& paths, -- cgit v1.2.3 From a2aeb2f1949c42622ccc7f9572a441e2a4475132 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 12 Apr 2018 00:47:17 -0700 Subject: [vcpkg] Mark many types noexcept. Make certain code patterns more transparent to /analyze. #ifdef-out unused code on non-windows. --- toolsrc/CMakeLists.txt | 3 +++ toolsrc/include/vcpkg/base/chrono.h | 10 ++++---- toolsrc/include/vcpkg/base/cstringview.h | 15 +----------- toolsrc/include/vcpkg/base/files.h | 2 +- toolsrc/include/vcpkg/base/lineinfo.h | 2 +- toolsrc/include/vcpkg/base/optional.h | 6 ++--- toolsrc/include/vcpkg/base/span.h | 7 +++--- toolsrc/include/vcpkg/base/strings.h | 2 +- toolsrc/include/vcpkg/binaryparagraph.h | 2 +- toolsrc/include/vcpkg/build.h | 6 ++--- toolsrc/include/vcpkg/dependencies.h | 6 ++--- toolsrc/include/vcpkg/packagespecparseresult.h | 2 +- toolsrc/include/vcpkg/statusparagraph.h | 4 ++-- toolsrc/include/vcpkg/triplet.h | 4 ++-- toolsrc/include/vcpkg/versiont.h | 4 ++-- toolsrc/src/tests.plan.cpp | 2 +- toolsrc/src/vcpkg.cpp | 2 ++ toolsrc/src/vcpkg/base/cofffilereader.cpp | 7 +++--- toolsrc/src/vcpkg/base/files.cpp | 17 ++++++++------ toolsrc/src/vcpkg/base/strings.cpp | 14 ++++++----- toolsrc/src/vcpkg/base/system.cpp | 32 +++++++++++--------------- toolsrc/src/vcpkg/binaryparagraph.cpp | 2 +- toolsrc/src/vcpkg/build.cpp | 14 +++++------ toolsrc/src/vcpkg/commands.ci.cpp | 7 ++---- toolsrc/src/vcpkg/commands.edit.cpp | 5 ++-- toolsrc/src/vcpkg/commands.fetch.cpp | 5 ++-- toolsrc/src/vcpkg/commands.hash.cpp | 11 +++++---- toolsrc/src/vcpkg/commands.integrate.cpp | 21 ++++++++++++++++- toolsrc/src/vcpkg/dependencies.cpp | 25 ++++++++++++++------ toolsrc/src/vcpkg/export.cpp | 12 +++++----- toolsrc/src/vcpkg/metrics.cpp | 6 ----- toolsrc/src/vcpkg/postbuildlint.cpp | 8 +++++-- toolsrc/src/vcpkg/statusparagraph.cpp | 3 ++- toolsrc/src/vcpkg/versiont.cpp | 4 ++-- 34 files changed, 147 insertions(+), 125 deletions(-) diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index acc12f2b3..db756deee 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -23,6 +23,9 @@ endif() if(GCC OR CLANG) add_compile_options(-std=c++1z) + if(WERROR) + add_compile_options(-Wall -Wno-unknown-pragmas -Werror) + endif() endif() file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp) diff --git a/toolsrc/include/vcpkg/base/chrono.h b/toolsrc/include/vcpkg/base/chrono.h index 7b393e377..aa764a597 100644 --- a/toolsrc/include/vcpkg/base/chrono.h +++ b/toolsrc/include/vcpkg/base/chrono.h @@ -11,8 +11,8 @@ namespace vcpkg::Chrono using duration = std::chrono::high_resolution_clock::time_point::duration; public: - constexpr ElapsedTime() : m_duration() {} - constexpr ElapsedTime(duration d) : m_duration(d) {} + constexpr ElapsedTime() noexcept : m_duration() {} + constexpr ElapsedTime(duration d) noexcept : m_duration(d) {} template TimeUnit as() const @@ -31,7 +31,7 @@ namespace vcpkg::Chrono public: static ElapsedTimer create_started(); - constexpr ElapsedTimer() : m_start_tick() {} + constexpr ElapsedTimer() noexcept : m_start_tick() {} ElapsedTime elapsed() const { @@ -52,8 +52,8 @@ namespace vcpkg::Chrono static Optional get_current_date_time(); static Optional parse(CStringView str); - constexpr CTime() : m_tm{0} {} - explicit constexpr CTime(tm t) : m_tm{t} {} + constexpr CTime() noexcept : m_tm{0} {} + explicit constexpr CTime(tm t) noexcept : m_tm{t} {} std::string to_string() const; diff --git a/toolsrc/include/vcpkg/base/cstringview.h b/toolsrc/include/vcpkg/base/cstringview.h index 0441bc573..f285aa36c 100644 --- a/toolsrc/include/vcpkg/base/cstringview.h +++ b/toolsrc/include/vcpkg/base/cstringview.h @@ -7,7 +7,7 @@ namespace vcpkg { struct CStringView { - constexpr CStringView() : cstr(nullptr) {} + constexpr CStringView() noexcept : cstr(nullptr) {} constexpr CStringView(const char* cstr) : cstr(cstr) {} constexpr CStringView(const CStringView&) = default; CStringView(const std::string& str) : cstr(str.c_str()) {} @@ -18,19 +18,6 @@ namespace vcpkg const char* cstr; }; - struct CWStringView - { - constexpr CWStringView() : cstr(nullptr) {} - constexpr CWStringView(const wchar_t* cstr) : cstr(cstr) {} - constexpr CWStringView(const CWStringView&) = default; - CWStringView(const std::wstring& str) : cstr(str.c_str()) {} - - constexpr const wchar_t* c_str() const { return cstr; } - - private: - const wchar_t* cstr; - }; - namespace details { inline bool vcpkg_strcmp(const char* l, const char* r) { return strcmp(l, r) == 0; } diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index ac1f192ae..f16805d0a 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -64,7 +64,7 @@ namespace vcpkg::Files Filesystem& get_real_filesystem(); - static const char* FILESYSTEM_INVALID_CHARACTERS = R"(\/:*?"<>|)"; + static constexpr const char* FILESYSTEM_INVALID_CHARACTERS = R"(\/:*?"<>|)"; bool has_invalid_chars_for_filesystem(const std::string& s); diff --git a/toolsrc/include/vcpkg/base/lineinfo.h b/toolsrc/include/vcpkg/base/lineinfo.h index e7e8c3031..e0eb8bec9 100644 --- a/toolsrc/include/vcpkg/base/lineinfo.h +++ b/toolsrc/include/vcpkg/base/lineinfo.h @@ -9,7 +9,7 @@ namespace vcpkg int line_number; const char* file_name; - constexpr LineInfo() : line_number(0), file_name("") {} + constexpr LineInfo() noexcept : line_number(0), file_name("") {} constexpr LineInfo(const int lineno, const char* filename) : line_number(lineno), file_name(filename) {} std::string to_string() const; diff --git a/toolsrc/include/vcpkg/base/optional.h b/toolsrc/include/vcpkg/base/optional.h index b629de9b3..6b84b10aa 100644 --- a/toolsrc/include/vcpkg/base/optional.h +++ b/toolsrc/include/vcpkg/base/optional.h @@ -16,7 +16,7 @@ namespace vcpkg template struct OptionalStorage { - constexpr OptionalStorage() : m_is_present(false), m_t() {} + constexpr OptionalStorage() noexcept : m_is_present(false), m_t() {} constexpr OptionalStorage(const T& t) : m_is_present(true), m_t(t) {} constexpr OptionalStorage(T&& t) : m_is_present(true), m_t(std::move(t)) {} @@ -33,7 +33,7 @@ namespace vcpkg template struct OptionalStorage { - constexpr OptionalStorage() : m_t(nullptr) {} + constexpr OptionalStorage() noexcept : m_t(nullptr) {} constexpr OptionalStorage(T& t) : m_t(&t) {} constexpr bool has_value() const { return m_t != nullptr; } @@ -48,7 +48,7 @@ namespace vcpkg template struct Optional { - constexpr Optional() {} + constexpr Optional() noexcept {} // Constructors are intentionally implicit constexpr Optional(NullOpt) {} diff --git a/toolsrc/include/vcpkg/base/span.h b/toolsrc/include/vcpkg/base/span.h index c9ac18afe..2b067d0ac 100644 --- a/toolsrc/include/vcpkg/base/span.h +++ b/toolsrc/include/vcpkg/base/span.h @@ -19,18 +19,19 @@ namespace vcpkg using iterator = pointer; constexpr Span() noexcept : m_ptr(nullptr), m_count(0) {} - constexpr Span(std::nullptr_t) noexcept : Span() {} + constexpr Span(std::nullptr_t) noexcept : m_ptr(nullptr), m_count(0) {} constexpr Span(pointer ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {} constexpr Span(pointer ptr_begin, pointer ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {} constexpr Span(std::initializer_list l) noexcept : m_ptr(l.begin()), m_count(l.size()) {} template - constexpr Span(T (&arr)[N]) noexcept : Span(arr, N) + constexpr Span(T (&arr)[N]) noexcept : m_ptr(arr), m_count(N) { } template - constexpr Span(const std::array, N>& arr) noexcept : Span(arr.data(), arr.size()) + constexpr Span(const std::array, N>& arr) noexcept + : m_ptr(arr.data()), m_count(arr.size()) { } diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index c32e81ac2..4cc17bcf4 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -36,7 +36,7 @@ namespace vcpkg::Strings std::wstring to_utf16(const CStringView& s); - std::string to_utf8(const CWStringView& w); + std::string to_utf8(const wchar_t* w); std::string escape_string(const CStringView& s, char char_to_escape, char escape_char); diff --git a/toolsrc/include/vcpkg/binaryparagraph.h b/toolsrc/include/vcpkg/binaryparagraph.h index 3315151c6..5ba2fbde3 100644 --- a/toolsrc/include/vcpkg/binaryparagraph.h +++ b/toolsrc/include/vcpkg/binaryparagraph.h @@ -12,7 +12,7 @@ namespace vcpkg /// struct BinaryParagraph { - BinaryParagraph(); + BinaryParagraph() noexcept; explicit BinaryParagraph(std::unordered_map fields); BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet, const std::string& abi_tag); BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet); diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index a86245ccf..c5e7e8d88 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -62,7 +62,7 @@ namespace vcpkg::Build BUILT_IN, ARIA2, }; - const std::string& to_string(DownloadTool tool); + const std::string& to_string(DownloadTool tool); struct BuildPackageOptions { @@ -203,8 +203,8 @@ namespace vcpkg::Build struct BuildInfo { - LinkageType crt_linkage; - LinkageType library_linkage; + LinkageType crt_linkage = LinkageType::DYNAMIC; + LinkageType library_linkage = LinkageType::DYNAMIC; Optional version; diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 704e76b07..3c3b8f267 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -35,7 +35,7 @@ namespace vcpkg::Dependencies { static bool compare_by_name(const InstallPlanAction* left, const InstallPlanAction* right); - InstallPlanAction(); + InstallPlanAction() noexcept; InstallPlanAction(InstalledPackageView&& spghs, const std::set& features, @@ -73,7 +73,7 @@ namespace vcpkg::Dependencies { static bool compare_by_name(const RemovePlanAction* left, const RemovePlanAction* right); - RemovePlanAction(); + RemovePlanAction() noexcept; RemovePlanAction(const PackageSpec& spec, const RemovePlanType& plan_type, const RequestType& request_type); PackageSpec spec; @@ -103,7 +103,7 @@ namespace vcpkg::Dependencies { static bool compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right); - ExportPlanAction(); + ExportPlanAction() noexcept; ExportPlanAction(const PackageSpec& spec, InstalledPackageView&& installed_package, const RequestType& request_type); diff --git a/toolsrc/include/vcpkg/packagespecparseresult.h b/toolsrc/include/vcpkg/packagespecparseresult.h index dd91c9a67..be3497152 100644 --- a/toolsrc/include/vcpkg/packagespecparseresult.h +++ b/toolsrc/include/vcpkg/packagespecparseresult.h @@ -17,7 +17,7 @@ namespace vcpkg template<> struct ErrorHolder { - ErrorHolder() : m_err(PackageSpecParseResult::SUCCESS) {} + ErrorHolder() noexcept : m_err(PackageSpecParseResult::SUCCESS) {} ErrorHolder(PackageSpecParseResult err) : m_err(err) {} bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; } diff --git a/toolsrc/include/vcpkg/statusparagraph.h b/toolsrc/include/vcpkg/statusparagraph.h index 16144e467..e79c946cc 100644 --- a/toolsrc/include/vcpkg/statusparagraph.h +++ b/toolsrc/include/vcpkg/statusparagraph.h @@ -29,7 +29,7 @@ namespace vcpkg /// struct StatusParagraph { - StatusParagraph(); + StatusParagraph() noexcept; explicit StatusParagraph(std::unordered_map&& fields); bool is_installed() const { return want == Want::INSTALL && state == InstallState::INSTALLED; } @@ -47,7 +47,7 @@ namespace vcpkg struct InstalledPackageView { - InstalledPackageView() : core(nullptr) {} + InstalledPackageView() noexcept : core(nullptr) {} InstalledPackageView(const StatusParagraph* c, std::vector&& fs) : core(c), features(std::move(fs)) diff --git a/toolsrc/include/vcpkg/triplet.h b/toolsrc/include/vcpkg/triplet.h index 10464dc2c..334960e49 100644 --- a/toolsrc/include/vcpkg/triplet.h +++ b/toolsrc/include/vcpkg/triplet.h @@ -9,7 +9,7 @@ namespace vcpkg struct Triplet { public: - constexpr Triplet() : m_instance(&DEFAULT_INSTANCE) {} + constexpr Triplet() noexcept : m_instance(&DEFAULT_INSTANCE) {} static Triplet from_canonical_name(const std::string& triplet_as_string); @@ -47,4 +47,4 @@ namespace std { size_t operator()(const vcpkg::Triplet& t) const { return t.hash_code(); } }; -} \ No newline at end of file +} diff --git a/toolsrc/include/vcpkg/versiont.h b/toolsrc/include/vcpkg/versiont.h index 8427dfe3b..e893f1abc 100644 --- a/toolsrc/include/vcpkg/versiont.h +++ b/toolsrc/include/vcpkg/versiont.h @@ -5,7 +5,7 @@ namespace vcpkg { struct VersionT { - VersionT(); + VersionT() noexcept; VersionT(std::string&& value); VersionT(const std::string& value); @@ -23,7 +23,7 @@ namespace vcpkg VersionT left; VersionT right; - VersionDiff(); + VersionDiff() noexcept; VersionDiff(const VersionT& left, const VersionT& right); std::string to_string() const; diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index b054702a1..238aa7032 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -81,7 +81,7 @@ namespace UnitTest1 { std::unordered_map map; Triplet triplet; - PackageSpecMap(const Triplet& t = Triplet::X86_WINDOWS) { triplet = t; } + PackageSpecMap(const Triplet& t = Triplet::X86_WINDOWS) noexcept { triplet = t; } PackageSpec emplace(const char* name, const char* depends = "", diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index a65045aa8..06c99e9a8 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -223,6 +223,7 @@ static void load_config() } } +#if defined(_WIN32) static std::string trim_path_from_command_line(const std::string& full_command_line) { Checks::check_exit( @@ -243,6 +244,7 @@ static std::string trim_path_from_command_line(const std::string& full_command_l ++it; return std::string(it, full_command_line.cend()); } +#endif #if defined(_WIN32) int wmain(const int argc, const wchar_t* const* const argv) diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp index 5b06a885c..fca0b627e 100644 --- a/toolsrc/src/vcpkg/base/cofffilereader.cpp +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -148,17 +148,18 @@ namespace vcpkg::CoffFileReader { static OffsetsArray read(fstream& fs, const uint32_t offset_count) { - static constexpr size_t OFFSET_WIDTH = 4; + static constexpr uint32_t OFFSET_WIDTH = 4; std::string raw_offsets; - const size_t raw_offset_size = offset_count * OFFSET_WIDTH; + const uint32_t raw_offset_size = offset_count * OFFSET_WIDTH; raw_offsets.resize(raw_offset_size); fs.read(&raw_offsets[0], raw_offset_size); OffsetsArray ret; for (uint32_t i = 0; i < offset_count; ++i) { - const std::string value_as_string = raw_offsets.substr(OFFSET_WIDTH * i, OFFSET_WIDTH * (i + 1)); + const std::string value_as_string = raw_offsets.substr(OFFSET_WIDTH * static_cast(i), + OFFSET_WIDTH * (static_cast(i) + 1)); const auto value = reinterpret_bytes(value_as_string.c_str()); // Ignore offsets that point to offset 0. See vcpkg github #223 #288 #292 diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 4e61666b7..1723b467e 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -22,9 +22,9 @@ namespace vcpkg::Files auto length = file_stream.tellg(); file_stream.seekg(0, file_stream.beg); - if (length > SIZE_MAX) + if (length == std::streampos(-1)) { - return std::make_error_code(std::errc::file_too_large); + return std::make_error_code(std::errc::io_error); } std::string output; @@ -185,12 +185,15 @@ namespace vcpkg::Files return; } - auto count = fwrite(data.data(), sizeof(data[0]), data.size(), f); - fclose(f); - - if (count != data.size()) + if (f != nullptr) { - ec = std::make_error_code(std::errc::no_space_on_device); + auto count = fwrite(data.data(), sizeof(data[0]), data.size(), f); + fclose(f); + + if (count != data.size()) + { + ec = std::make_error_code(std::errc::no_space_on_device); + } } } }; diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 541b1f2d9..fbc33ca42 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -39,7 +39,7 @@ namespace vcpkg::Strings::details _vsnprintf_s_l(&output.at(0), output.size() + 1, output.size(), fmtstr, c_locale(), args); #else va_start(args, fmtstr); - auto res = vsnprintf(&output.at(0), output.size() + 1, fmtstr, args); + vsnprintf(&output.at(0), output.size() + 1, fmtstr, args); #endif va_end(args); @@ -52,23 +52,25 @@ namespace vcpkg::Strings std::wstring to_utf16(const CStringView& s) { #if defined(_WIN32) - const int size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); std::wstring output; + const size_t size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); + if (size == 0) return output; output.resize(size - 1); - MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, output.data(), size - 1); + MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, output.data(), static_cast(size) - 1); return output; #else Checks::unreachable(VCPKG_LINE_INFO); #endif } - std::string to_utf8(const CWStringView& w) + std::string to_utf8(const wchar_t* w) { #if defined(_WIN32) - const int size = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, nullptr, 0, nullptr, nullptr); std::string output; + const size_t size = WideCharToMultiByte(CP_UTF8, 0, w, -1, nullptr, 0, nullptr, nullptr); + if (size == 0) return output; output.resize(size - 1); - WideCharToMultiByte(CP_UTF8, 0, w.c_str(), -1, output.data(), size - 1, nullptr, nullptr); + WideCharToMultiByte(CP_UTF8, 0, w, -1, output.data(), static_cast(size) - 1, nullptr, nullptr); return output; #else Checks::unreachable(VCPKG_LINE_INFO); diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 3f2f47d72..d4210fe6d 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -214,7 +214,7 @@ namespace vcpkg::System for (auto&& env_wstring : env_wstrings) { - const Optional value = System::get_environment_variable(Strings::to_utf8(env_wstring)); + const Optional value = System::get_environment_variable(Strings::to_utf8(env_wstring.c_str())); const auto v = value.get(); if (!v || v->empty()) continue; @@ -298,17 +298,6 @@ namespace vcpkg::System return exit_code; } - // On Win7, output from powershell calls contain a byte order mark, so we strip it out if it is present - static void remove_byte_order_marks(std::wstring* s) - { - const wchar_t* a = s->c_str(); - // This is the UTF-8 byte-order mark - while (s->size() >= 3 && a[0] == 0xEF && a[1] == 0xBB && a[2] == 0xBF) - { - s->erase(0, 3); - } - } - ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line) { // Flush stdout before launching external process @@ -325,7 +314,7 @@ namespace vcpkg::System const auto pipe = _wpopen(Strings::to_utf16(actual_cmd_line).c_str(), L"r"); if (pipe == nullptr) { - return {1, Strings::to_utf8(output)}; + return {1, Strings::to_utf8(output.c_str())}; } while (fgetws(buf, 1024, pipe)) { @@ -333,15 +322,22 @@ namespace vcpkg::System } if (!feof(pipe)) { - return {1, Strings::to_utf8(output)}; + return {1, Strings::to_utf8(output.c_str())}; } const auto ec = _pclose(pipe); - remove_byte_order_marks(&output); + + // On Win7, output from powershell calls contain a utf-8 byte order mark in the utf-16 stream, so we strip it + // out if it is present. 0xEF,0xBB,0xBF is the UTF-8 byte-order mark + const wchar_t* a = output.c_str(); + while (output.size() >= 3 && a[0] == 0xEF && a[1] == 0xBB && a[2] == 0xBF) + { + output.erase(0, 3); + } Debug::println("_pclose() returned %d after %8d us", ec, static_cast(timer.microseconds())); - return {ec, Strings::to_utf8(output)}; + return {ec, Strings::to_utf8(output.c_str())}; #else const auto actual_cmd_line = Strings::format(R"###(%s 2>&1)###", cmd_line); @@ -481,7 +477,7 @@ namespace vcpkg::System const auto sz2 = GetEnvironmentVariableW(w_varname.c_str(), ret.data(), static_cast(ret.size())); Checks::check_exit(VCPKG_LINE_INFO, sz2 + 1 == sz); ret.pop_back(); - return Strings::to_utf8(ret); + return Strings::to_utf8(ret.c_str()); #else auto v = getenv(varname.c_str()); if (!v) return nullopt; @@ -522,7 +518,7 @@ namespace vcpkg::System return nullopt; ret.pop_back(); // remove extra trailing null byte - return Strings::to_utf8(ret); + return Strings::to_utf8(ret.c_str()); } #else Optional get_registry_string(void* base_hkey, const CStringView sub_key, const CStringView valuename) diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index 73ca23df1..126c7df97 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -24,7 +24,7 @@ namespace vcpkg static const std::string DEFAULTFEATURES = "Default-Features"; } - BinaryParagraph::BinaryParagraph() = default; + BinaryParagraph::BinaryParagraph() noexcept = default; BinaryParagraph::BinaryParagraph(std::unordered_map fields) { diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 76381f862..7a9d35667 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -330,8 +330,7 @@ namespace vcpkg::Build const PreBuildInfo& pre_build_info, const PackageSpec& spec, const std::string& abi_tag, - const BuildPackageConfig& config, - const StatusParagraphs& status_db) + const BuildPackageConfig& config) { auto& fs = paths.get_filesystem(); const Triplet& triplet = spec.triplet(); @@ -419,10 +418,9 @@ namespace vcpkg::Build const PreBuildInfo& pre_build_info, const PackageSpec& spec, const std::string& abi_tag, - const BuildPackageConfig& config, - const StatusParagraphs& status_db) + const BuildPackageConfig& config) { - auto result = do_build_package(paths, pre_build_info, spec, abi_tag, config, status_db); + auto result = do_build_package(paths, pre_build_info, spec, abi_tag, config); if (config.build_package_options.clean_buildtrees == CleanBuildtrees::YES) { @@ -564,7 +562,7 @@ namespace vcpkg::Build auto dep_pspecs = Util::fmap(required_fspecs, [](FeatureSpec const& fspec) { return fspec.spec(); }); Util::sort_unique_erase(dep_pspecs); - // Find all features that aren't installed. This destroys required_fspecs. + // Find all features that aren't installed. This mutates required_fspecs. Util::unstable_keep_if(required_fspecs, [&](FeatureSpec const& fspec) { return !status_db.is_installed(fspec) && fspec.name() != name; }); @@ -624,7 +622,7 @@ namespace vcpkg::Build System::println("Could not locate cached archive: %s", 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, status_db); + 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); @@ -657,7 +655,7 @@ namespace vcpkg::Build } return do_build_package_and_clean_buildtrees( - paths, pre_build_info, spec, maybe_abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config, status_db); + paths, pre_build_info, spec, maybe_abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config); } const std::string& to_string(const BuildResult build_result) diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 45eb1c83e..04b42ea00 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -77,11 +77,8 @@ namespace vcpkg::Commands::CI { auto triplet = p->spec.triplet(); - const Build::BuildPackageConfig build_config{p->source_control_file.value_or_exit(VCPKG_LINE_INFO), - triplet, - paths.port_dir(p->spec), - install_plan_options, - p->feature_list}; + const Build::BuildPackageConfig build_config{ + *scf, triplet, paths.port_dir(p->spec), install_plan_options, p->feature_list}; auto dependency_abis = Util::fmap(p->computed_dependencies, [&](const PackageSpec& spec) -> Build::AbiEntry { diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index f0ddd43c5..82569dd07 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -9,14 +9,15 @@ namespace vcpkg::Commands::Edit { static std::vector find_from_registry() { + std::vector output; + +#if defined(_WIN32) static const std::array REGKEYS = { R"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C26E74D1-022E-4238-8B9D-1E7564A36CC9}_is1)", R"(SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1287CAD5-7C8D-410D-88B9-0D1EE4A83FF2}_is1)", R"(SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F8A2A208-72B3-4D61-95FC-8A65D340689B}_is1)", }; - std::vector output; -#if defined(_WIN32) for (auto&& keypath : REGKEYS) { const Optional code_installpath = diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 9652d0b9e..7a1e6a810 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -269,8 +269,6 @@ namespace vcpkg::Commands::Fetch #endif static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) { - const auto& fs = paths.get_filesystem(); - const fs::path& scripts_folder = paths.scripts; const std::array& version = tool_data.version; const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); @@ -280,7 +278,7 @@ namespace vcpkg::Commands::Fetch tool_name, version_as_string); #if defined(_WIN32) - const fs::path script = scripts_folder / "fetchtool.ps1"; + const fs::path script = paths.scripts / "fetchtool.ps1"; const std::string title = Strings::format( "Fetching %s version %s (No sufficient installed version was found)", tool_name, version_as_string); const System::PowershellParameter tool_param("tool", tool_name); @@ -300,6 +298,7 @@ namespace vcpkg::Commands::Fetch actual_downloaded_path.u8string()); return actual_downloaded_path; #else + const auto& fs = paths.get_filesystem(); if (!fs.exists(tool_data.download_path)) { System::println("Downloading %s...", tool_name); diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index c23a63e1e..1f709f87b 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -127,12 +127,15 @@ namespace vcpkg::Commands::Hash FILE* file = nullptr; const auto ec = _wfopen_s(&file, path.c_str(), L"rb"); Checks::check_exit(VCPKG_LINE_INFO, ec == 0, "Failed to open file: %s", path.u8string()); - unsigned char buffer[4096]; - while (const auto actual_size = fread(buffer, 1, sizeof(buffer), file)) + if (file != nullptr) { - hash_data(hash_handle, buffer, actual_size); + unsigned char buffer[4096]; + while (const auto actual_size = fread(buffer, 1, sizeof(buffer), file)) + { + hash_data(hash_handle, buffer, actual_size); + } + fclose(file); } - fclose(file); return finalize_hash_handle(hash_handle, length_in_bytes); } diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index e70d9b2e3..7061a3984 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -8,6 +8,7 @@ namespace vcpkg::Commands::Integrate { +#if defined(_WIN32) static std::string create_appdata_targets_shortcut(const std::string& target_path) noexcept { return Strings::format(R"###( @@ -18,7 +19,9 @@ namespace vcpkg::Commands::Integrate target_path, target_path); } +#endif +#if defined(_WIN32) static std::string create_system_targets_shortcut() noexcept { return R"###( @@ -31,7 +34,9 @@ namespace vcpkg::Commands::Integrate )###"; } +#endif +#if defined(_WIN32) static std::string create_nuget_targets_file_contents(const fs::path& msbuild_vcpkg_targets_file) noexcept { const std::string as_string = msbuild_vcpkg_targets_file.string(); @@ -47,7 +52,9 @@ namespace vcpkg::Commands::Integrate as_string, as_string); } +#endif +#if defined(_WIN32) static std::string create_nuget_props_file_contents() noexcept { return R"###( @@ -58,7 +65,9 @@ namespace vcpkg::Commands::Integrate )###"; } +#endif +#if defined(_WIN32) static std::string get_nuget_id(const fs::path& vcpkg_root_dir) { std::string dir_id = vcpkg_root_dir.generic_string(); @@ -71,7 +80,9 @@ namespace vcpkg::Commands::Integrate const std::string nuget_id = "vcpkg." + dir_id; return nuget_id; } +#endif +#if defined(_WIN32) static std::string create_nuspec_file_contents(const fs::path& vcpkg_root_dir, const std::string& nuget_id, const std::string& nupkg_version) @@ -98,14 +109,15 @@ namespace vcpkg::Commands::Integrate content = Strings::replace_all(std::move(content), "@VERSION@", nupkg_version); return content; } +#endif +#if defined(_WIN32) enum class ElevationPromptChoice { YES, NO }; -#if defined(_WIN32) static ElevationPromptChoice elevated_cmd_execute(const std::string& param) { SHELLEXECUTEINFOW sh_ex_info{}; @@ -272,6 +284,7 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", } #endif +#if defined(WIN32) static void integrate_project(const VcpkgPaths& paths) { auto& fs = paths.get_filesystem(); @@ -319,13 +332,19 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console Checks::exit_success(VCPKG_LINE_INFO); } +#endif +#if defined(_WIN32) const char* const INTEGRATE_COMMAND_HELPSTRING = " vcpkg integrate install Make installed packages available user-wide. Requires admin privileges on " "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"; +#else + const char* const INTEGRATE_COMMAND_HELPSTRING = + "No user-wide integration methods are available on this platform\n"; +#endif namespace Subcommand { diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index a8bc901a0..8fb35b0da 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; + const SourceControlFile* scf = nullptr; std::unordered_map> build_edges; }; @@ -145,7 +145,10 @@ namespace vcpkg::Dependencies } } - InstallPlanAction::InstallPlanAction() : plan_type(InstallPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} + InstallPlanAction::InstallPlanAction() noexcept + : plan_type(InstallPlanType::UNKNOWN), request_type(RequestType::UNKNOWN), build_options{} + { + } InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const SourceControlFile& scf, @@ -156,6 +159,7 @@ namespace vcpkg::Dependencies , source_control_file(scf) , plan_type(InstallPlanType::BUILD_AND_INSTALL) , request_type(request_type) + , build_options{} , feature_list(features) , computed_dependencies(std::move(dependencies)) { @@ -168,6 +172,7 @@ namespace vcpkg::Dependencies , installed_package(std::move(ipv)) , plan_type(InstallPlanType::ALREADY_INSTALLED) , request_type(request_type) + , build_options{} , feature_list(features) , computed_dependencies(installed_package.get()->dependencies()) { @@ -189,7 +194,10 @@ namespace vcpkg::Dependencies return left->spec.name() < right->spec.name(); } - RemovePlanAction::RemovePlanAction() : plan_type(RemovePlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} + RemovePlanAction::RemovePlanAction() noexcept + : plan_type(RemovePlanType::UNKNOWN), request_type(RequestType::UNKNOWN) + { + } RemovePlanAction::RemovePlanAction(const PackageSpec& spec, const RemovePlanType& plan_type, @@ -218,7 +226,10 @@ namespace vcpkg::Dependencies return left->spec.name() < right->spec.name(); } - ExportPlanAction::ExportPlanAction() : plan_type(ExportPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {} + ExportPlanAction::ExportPlanAction() noexcept + : plan_type(ExportPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) + { + } ExportPlanAction::ExportPlanAction(const PackageSpec& spec, InstalledPackageView&& installed_package, @@ -506,14 +517,14 @@ namespace vcpkg::Dependencies { if (auto p_source = cluster.source.get()) { - for (auto&& feature : p_source->scf->feature_paragraphs) + for (auto&& fpgh : p_source->scf->feature_paragraphs) { - auto res = mark_plus(feature->name, cluster, graph, graph_plan, prevent_default_features); + auto res = mark_plus(fpgh->name, cluster, graph, graph_plan, prevent_default_features); Checks::check_exit(VCPKG_LINE_INFO, res == MarkPlusResult::SUCCESS, "Error: Unable to locate feature %s in %s", - feature->name, + fpgh->name, cluster.spec); } diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 85a4dfad1..152252018 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -247,12 +247,12 @@ namespace vcpkg::Export struct ExportArguments { - bool dry_run; - bool raw; - bool nuget; - bool ifw; - bool zip; - bool seven_zip; + bool dry_run = false; + bool raw = false; + bool nuget = false; + bool ifw = false; + bool zip = false; + bool seven_zip = false; Optional maybe_output; diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index 4067efc95..8890c067f 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -245,12 +245,6 @@ namespace vcpkg::Metrics bool get_compiled_metrics_enabled() { return DISABLE_METRICS == 0; } - static fs::path get_vcpkg_root() - { - return Files::get_real_filesystem().find_file_recursively_up( - fs::stdfs::absolute(System::get_exe_path_of_current_process()), ".vcpkg-root"); - } - std::string get_MAC_user() { #if defined(_WIN32) diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp index a31518ad7..6fe11951f 100644 --- a/toolsrc/src/vcpkg/postbuildlint.cpp +++ b/toolsrc/src/vcpkg/postbuildlint.cpp @@ -361,6 +361,7 @@ namespace vcpkg::PostBuildLint std::string actual_arch; }; +#if defined(_WIN32) static std::string get_actual_architecture(const MachineType& machine_type) { switch (machine_type) @@ -374,7 +375,9 @@ namespace vcpkg::PostBuildLint default: return "Machine Type Code = " + std::to_string(static_cast(machine_type)); } } +#endif +#if defined(_WIN32) static void print_invalid_architecture_files(const std::string& expected_architecture, std::vector binaries_with_invalid_architecture) { @@ -391,7 +394,6 @@ namespace vcpkg::PostBuildLint static LintStatus check_dll_architecture(const std::string& expected_architecture, const std::vector& files) { -#if defined(_WIN32) std::vector binaries_with_invalid_architecture; for (const fs::path& file : files) @@ -414,10 +416,10 @@ namespace vcpkg::PostBuildLint print_invalid_architecture_files(expected_architecture, binaries_with_invalid_architecture); return LintStatus::ERROR_DETECTED; } -#endif return LintStatus::SUCCESS; } +#endif static LintStatus check_lib_architecture(const std::string& expected_architecture, const std::vector& files) @@ -802,7 +804,9 @@ namespace vcpkg::PostBuildLint check_outdated_crt_linkage_of_dlls(dlls, toolset.dumpbin, build_info, pre_build_info); } +#if defined(_WIN32) error_count += check_dll_architecture(pre_build_info.target_architecture, dlls); +#endif break; } case Build::LinkageType::STATIC: diff --git a/toolsrc/src/vcpkg/statusparagraph.cpp b/toolsrc/src/vcpkg/statusparagraph.cpp index 236689494..462d8d8ed 100644 --- a/toolsrc/src/vcpkg/statusparagraph.cpp +++ b/toolsrc/src/vcpkg/statusparagraph.cpp @@ -12,7 +12,7 @@ namespace vcpkg static const std::string STATUS = "Status"; } - StatusParagraph::StatusParagraph() : want(Want::ERROR_STATE), state(InstallState::ERROR_STATE) {} + StatusParagraph::StatusParagraph() noexcept : want(Want::ERROR_STATE), state(InstallState::ERROR_STATE) {} void serialize(const StatusParagraph& pgh, std::string& out_str) { @@ -25,6 +25,7 @@ namespace vcpkg } StatusParagraph::StatusParagraph(std::unordered_map&& fields) + : want(Want::ERROR_STATE), state(InstallState::ERROR_STATE) { auto status_it = fields.find(BinaryParagraphRequiredField::STATUS); Checks::check_exit(VCPKG_LINE_INFO, status_it != fields.end(), "Expected 'Status' field in status paragraph"); diff --git a/toolsrc/src/vcpkg/versiont.cpp b/toolsrc/src/vcpkg/versiont.cpp index 0d4a39255..d20e6b577 100644 --- a/toolsrc/src/vcpkg/versiont.cpp +++ b/toolsrc/src/vcpkg/versiont.cpp @@ -5,7 +5,7 @@ namespace vcpkg { - VersionT::VersionT() : value("0.0.0") {} + VersionT::VersionT() noexcept : value("0.0.0") {} VersionT::VersionT(std::string&& value) : value(std::move(value)) {} VersionT::VersionT(const std::string& value) : value(value) {} const std::string& VersionT::to_string() const { return value; } @@ -13,7 +13,7 @@ namespace vcpkg bool operator!=(const VersionT& left, const VersionT& right) { return left.to_string() != right.to_string(); } std::string to_printf_arg(const VersionT& version) { return version.to_string(); } - VersionDiff::VersionDiff() : left(), right() {} + VersionDiff::VersionDiff() noexcept : left(), right() {} VersionDiff::VersionDiff(const VersionT& left, const VersionT& right) : left(left), right(right) {} std::string VersionDiff::to_string() const -- cgit v1.2.3 From 5886a48dc7c5be48be3baf73ce2e8e136252aede Mon Sep 17 00:00:00 2001 From: "Billy O'Neal (VC LIBS)" Date: Thu, 12 Apr 2018 15:31:11 -0700 Subject: Remove call to nonexistent member of std::fpos. See http://eel.is/c++draft/fpos -- to get to an offset you can convert to int; there is no seekpos member. --- toolsrc/src/vcpkg/base/cofffilereader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/base/cofffilereader.cpp b/toolsrc/src/vcpkg/base/cofffilereader.cpp index fca0b627e..2c09e2c19 100644 --- a/toolsrc/src/vcpkg/base/cofffilereader.cpp +++ b/toolsrc/src/vcpkg/base/cofffilereader.cpp @@ -247,7 +247,7 @@ namespace vcpkg::CoffFileReader { void set_to_offset(const fpos_t position) { this->m_absolute_position = position; } - void set_to_current_pos(fstream& fs) { this->m_absolute_position = fs.tellg().seekpos(); } + void set_to_current_pos(fstream& fs) { this->m_absolute_position = fs.tellg(); } void seek_to_marker(fstream& fs) const { fs.seekg(this->m_absolute_position, ios_base::beg); } -- cgit v1.2.3 From dc207a2c891fe6deb2710ccde0abf48078f64fcd Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 12 Apr 2018 18:15:38 -0700 Subject: Restore powershell extracting because shell may not be available (see #3252) --- scripts/VcpkgPowershellUtils.ps1 | 40 ++++++++++++++++++++++++++++++---------- scripts/fetchTool.ps1 | 4 ++-- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 3ab301c55..fdd89e7b9 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -1,3 +1,8 @@ +function vcpkgHasModule([Parameter(Mandatory=$true)][string]$moduleName) +{ + return [bool](Get-Module -ListAvailable -Name $moduleName) +} + function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) { if ($object -eq $null) @@ -183,9 +188,9 @@ function vcpkgDownloadFileWithAria2( [Parameter(Mandatory=$true)][string]$ari Move-Item -Path $downloadPartPath -Destination $downloadPath } -function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$sevenZipExe, - [Parameter(Mandatory=$true)][string]$archivePath, - [Parameter(Mandatory=$true)][string]$destinationDir) +function vcpkgExtractFileWith7z([Parameter(Mandatory=$true)][string]$sevenZipExe, + [Parameter(Mandatory=$true)][string]$archivePath, + [Parameter(Mandatory=$true)][string]$destinationDir) { vcpkgRemoveItem $destinationDir $destinationPartial = "$destinationDir.partial" @@ -200,20 +205,35 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$sevenZipExe, Rename-Item -Path "$destinationPartial" -NewName $destinationDir } -function vcpkgExtractZipFileWithShell( [Parameter(Mandatory=$true)][string]$archivePath, - [Parameter(Mandatory=$true)][string]$destinationDir) +function vcpkgExtractZipFile( [Parameter(Mandatory=$true)][string]$archivePath, + [Parameter(Mandatory=$true)][string]$destinationDir) { vcpkgRemoveItem $destinationDir $destinationPartial = "$destinationDir.partial" vcpkgRemoveItem $destinationPartial vcpkgCreateDirectoryIfNotExists $destinationPartial - $shell = new-object -com shell.application - $zip = $shell.NameSpace($(Get-Item $archivePath).fullname) - foreach($item in $zip.items()) + + if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') + { + Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") + Microsoft.PowerShell.Archive\Expand-Archive -path $archivePath -destinationpath $destinationPartial + } + elseif (vcpkgHasCommand -commandName 'Pscx\Expand-Archive') { - # Piping to Out-Null is used to block until finished - $shell.Namespace($destinationPartial).copyhere($item) | Out-Null + Write-Verbose("Extracting with Pscx\Expand-Archive") + Pscx\Expand-Archive -path $archivePath -OutputPath $destinationPartial + } + else + { + Write-Verbose("Extracting via shell") + $shell = new-object -com shell.application + $zip = $shell.NameSpace($(Get-Item $archivePath).fullname) + foreach($item in $zip.items()) + { + # Piping to Out-Null is used to block until finished + $shell.Namespace($destinationPartial).copyhere($item) | Out-Null + } } Rename-Item -Path "$destinationPartial" -NewName $destinationDir diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index be18656c7..dd3f0f9f4 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -73,7 +73,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) # Extract aria2 with shell because we need it to download 7zip if ($tool -eq "7zip920" -or $tool -eq "aria2") { - vcpkgExtractZipFileWithShell -ArchivePath $downloadPath -DestinationDir $toolPath + vcpkgExtractZipFile -ArchivePath $downloadPath -DestinationDir $toolPath } elseif ($tool -eq "7zip") { @@ -88,7 +88,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) else { $sevenZipExe = fetchToolInternal "7zip" - vcpkgExtractFile -sevenZipExe "$sevenZipExe" -ArchivePath $downloadPath -DestinationDir $toolPath + vcpkgExtractFileWith7z -sevenZipExe "$sevenZipExe" -ArchivePath $downloadPath -DestinationDir $toolPath } Write-Host "Extracting $tool... done." } -- cgit v1.2.3 From 4c028691c7f03335f6fb8a38ce80794c213819cb Mon Sep 17 00:00:00 2001 From: Wimok Nupphiboon Date: Fri, 13 Apr 2018 10:10:55 +0700 Subject: [uwebsockets] Update to 0.14.7 --- ports/uwebsockets/CONTROL | 2 +- ports/uwebsockets/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index 1757aae53..7e636ba9c 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets -Version: 0.14.6-1 +Version: 0.14.7-1 Build-Depends: libuv, openssl, zlib Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js diff --git a/ports/uwebsockets/portfile.cmake b/ports/uwebsockets/portfile.cmake index f7cbb6843..a24f49631 100644 --- a/ports/uwebsockets/portfile.cmake +++ b/ports/uwebsockets/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO uWebSockets/uWebSockets - REF v0.14.6 - SHA512 cac3be6fcd49796590f19bde89e4195cecf9097248f7550ef6942573b59cd132f136ec026203e8524270440a7ae18c49472eb2166028b5c68d4a4cc457af4748 + REF v0.14.7 + SHA512 1049497f7b63770dcfdc44bef562ce43b87fa553e8ec778c8ee2506f406a23f5fdcf67904f0458e38fc0843899b43b92ccef5f36cae40228cfe47b6f38fa0e15 HEAD_REF master ) -- cgit v1.2.3 From 600f7fdf30434f7c1e1e15acf3df3271d6b91387 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 10 Apr 2018 05:46:46 -0700 Subject: [date] Fix Linux&OSX, add unofficial targets --- ports/date/CMakeLists.txt | 22 +++++++++++++++++++--- ports/date/CONTROL | 4 ++++ ports/date/portfile.cmake | 19 +++++++++++++++---- 3 files changed, 38 insertions(+), 7 deletions(-) diff --git a/ports/date/CMakeLists.txt b/ports/date/CMakeLists.txt index 4c38e4a87..292c1758a 100644 --- a/ports/date/CMakeLists.txt +++ b/ports/date/CMakeLists.txt @@ -1,28 +1,44 @@ cmake_minimum_required(VERSION 3.5.1) project(tz CXX) +set(CMAKE_CXX_STANDARD 11) if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) endif() -add_definitions(-DNOMINMAX) +option(HAS_REMOTE_API "" 0) +add_definitions(-DNOMINMAX -DHAS_REMOTE_API=${HAS_REMOTE_API}) -include_directories("./include") +add_library(date INTERFACE) +target_include_directories(date INTERFACE $) add_library(tz src/tz.cpp) +target_include_directories(tz PUBLIC $ $) + +if(HAS_REMOTE_API) + find_package(CURL REQUIRED) + target_link_libraries(tz PUBLIC $) + target_include_directories(tz PUBLIC $) +endif() if(BUILD_SHARED_LIBS) target_compile_definitions(tz PRIVATE -DDATE_BUILD_DLL) endif() install( - TARGETS tz + TARGETS tz date + EXPORT tz RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-date-config.cmake" "include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-date-targets.cmake)\n") + +install(EXPORT tz FILE unofficial-date-targets.cmake NAMESPACE unofficial::date:: DESTINATION share/unofficial-date) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-date-config.cmake DESTINATION share/unofficial-date) + if(NOT DISABLE_INSTALL_HEADERS) install(FILES include/date/date.h include/date/tz.h include/date/julian.h include/date/iso_week.h include/date/islamic.h DESTINATION include/date) endif() diff --git a/ports/date/CONTROL b/ports/date/CONTROL index 8c1797072..bf3095ac6 100644 --- a/ports/date/CONTROL +++ b/ports/date/CONTROL @@ -1,3 +1,7 @@ Source: date Version: 2.4 Description: A date and time library based on the C++11/14/17 header + +Feature: remote-api +Description: support automatic download of tz data +Build-Depends: curl diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake index c60a7bcb0..3b36a19fc 100644 --- a/ports/date/portfile.cmake +++ b/ports/date/portfile.cmake @@ -1,9 +1,11 @@ include(vcpkg_common_functions) -message(WARNING - "You will need to also install http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml into your install location" - "See https://howardhinnant.github.io/date/tz.html" -) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(WARNING + "You will need to also install http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml into your install location.\n" + "See https://howardhinnant.github.io/date/tz.html" + ) +endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -20,18 +22,27 @@ vcpkg_apply_patches( file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +set(HAS_REMOTE_API 0) +if("remote-api" IN_LIST FEATURES) + set(HAS_REMOTE_API 1) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS -DHAS_REMOTE_API=${HAS_REMOTE_API} OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-date TARGET_PATH share/unofficial-date) + vcpkg_copy_pdbs() set(HEADER "${CURRENT_PACKAGES_DIR}/include/date/tz.h") file(READ "${HEADER}" _contents) +string(REPLACE "#define TZ_H" "#define TZ_H\n#undef HAS_REMOTE_API\n#define HAS_REMOTE_API ${HAS_REMOTE_API}" _contents "${_contents}") if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) string(REPLACE "ifdef DATE_BUILD_DLL" "if 1" _contents "${_contents}") endif() -- cgit v1.2.3 From 0764aafbd07fffa81e68aa1fe091b01ea429e29c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 12 Apr 2018 04:03:17 -0700 Subject: [abseil][aws-sdk-cpp][breakpad][chakracore][cimg][date][exiv2][libzip][rs-core-lib] Upgrades --- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- ports/breakpad/CONTROL | 2 +- ports/breakpad/portfile.cmake | 4 ++-- ports/chakracore/CONTROL | 2 +- ports/chakracore/portfile.cmake | 4 ++-- ports/cimg/CONTROL | 2 +- ports/cimg/portfile.cmake | 4 ++-- ports/date/CONTROL | 2 +- ports/date/portfile.cmake | 4 ++-- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/libzip/CONTROL | 2 +- ports/libzip/portfile.cmake | 4 ++-- ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 4 ++-- 18 files changed, 27 insertions(+), 27 deletions(-) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index 42edc7e12..b1a1def7f 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-04-09 +Version: 2018-04-12 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index f2a08328b..71d26de69 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 3f622d6c5990a7ae80eb8e52450c309a28bbec77 - SHA512 27c11bbe4e321fcd42f1947fab2a7deb108443bf46260e7f7920cc28442a4dbfbf315d579e866b2d82e92cfe1fd43e82cbd51e907cbf74a25d724cfd8acda055 + REF a7e522daf1ec9cda69b356472f662142dd0c1215 + SHA512 250b602fc3f5a4c3b6522ef0f49bdf63db0070289cb415cb31bb672b95b35dc9494f881adeb1b090927b1cd942c3674b6142747f601c8f7233bd12d4078583f3 HEAD_REF master ) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index c9338b0cc..fbc86b58f 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,5 +1,5 @@ Source: aws-sdk-cpp -Version: 1.4.32 +Version: 1.4.33 Description: AWS SDK for C++ Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows) Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 6b3b1f241..815926ddd 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.4.32 - SHA512 f37aaf1d439acd1563fe50624e2e7856ba5d267a540a8cd1fde80d0d7bd9e2cdd261f9f6e3e843548cc17b8ea7158419a9e0ed27092acf5c22b5c9e38d327c64 + REF 1.4.33 + SHA512 ebe8e402107b7b70a9b397c94ad981ff02d97e10e6fd8337f19b732185ecbb79e132eecd513300ce733a765fd780dd765c1d2b34479e5e1d891fa771722bad81 HEAD_REF master ) diff --git a/ports/breakpad/CONTROL b/ports/breakpad/CONTROL index 80789a41d..9324ac2fa 100644 --- a/ports/breakpad/CONTROL +++ b/ports/breakpad/CONTROL @@ -1,4 +1,4 @@ Source: breakpad -Version: 2018-04-05 +Version: 2018-04-12 Build-Depends: libdisasm Description: a set of client and server components which implement a crash-reporting system. diff --git a/ports/breakpad/portfile.cmake b/ports/breakpad/portfile.cmake index 5030bb936..6b21e6ee0 100644 --- a/ports/breakpad/portfile.cmake +++ b/ports/breakpad/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/breakpad - REF adcc90ddb8c9ebc13a4312116ad92d8628b691c3 - SHA512 f6dbdad54dcd778a2ece7de28b60b95c2c276d386f672ab5990c6de41f17fa526f6d1092e38163647ed2feed07c91826ec3f4c21a219ca5f5fac203a7a21eeec + REF c83fcf647033cd31348b4109c2a9d8df72706361 + SHA512 680b92b1bff6c92a26a3510242f0fb083e63e0234e5a49b2df74b9c743b5a8900d800e617a4910b40748ea699c0d981c42009366a8734e5eb3af081deeb4515b HEAD_REF master ) diff --git a/ports/chakracore/CONTROL b/ports/chakracore/CONTROL index edd7eb1a1..6c7db9e54 100644 --- a/ports/chakracore/CONTROL +++ b/ports/chakracore/CONTROL @@ -1,3 +1,3 @@ Source: chakracore -Version: 1.8.2 +Version: 1.8.3 Description: Core part of the Chakra Javascript engine diff --git a/ports/chakracore/portfile.cmake b/ports/chakracore/portfile.cmake index daea20444..0f3874119 100644 --- a/ports/chakracore/portfile.cmake +++ b/ports/chakracore/portfile.cmake @@ -15,8 +15,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/ChakraCore - REF v1.8.2 - SHA512 6d4408311f0c3ff2c9895f59f34f12fb84797d130a562db7c2af27eb26edd3d46bf935dab4cd40c2ffc0dc853ad9bdf432a721cfded7836639858965b7eb67e9 + REF v1.8.3 + SHA512 4a5d6372cab51bb70911519fb9639d0cb6c456a966e2c90992f924ba36dcf741e32dbf18aea4419dc855f286da7e3edbfcc796bc90347858192c976298315785 HEAD_REF master ) diff --git a/ports/cimg/CONTROL b/ports/cimg/CONTROL index a4b1438e7..694db4b5d 100644 --- a/ports/cimg/CONTROL +++ b/ports/cimg/CONTROL @@ -1,3 +1,3 @@ Source: cimg -Version: 221 +Version: 2.2.2 Description: The CImg Library is a small, open-source, and modern C++ toolkit for image processing diff --git a/ports/cimg/portfile.cmake b/ports/cimg/portfile.cmake index 5a130433f..b7607bff2 100644 --- a/ports/cimg/portfile.cmake +++ b/ports/cimg/portfile.cmake @@ -2,9 +2,9 @@ include(vcpkg_common_functions) vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH REPO "dtschump/CImg" - REF v.221 + REF v.2.2.2 HEAD_REF master - SHA512 d1aea69f4662e85c5b56c723cadcc69282f2f1c4e3a968efc312a826a15000c11d61756d3ed87e37ae349cebbd62b67503996c45ed1fe038a91a9f0c8dbec43c) + SHA512 b3090e594accc31222e24e787381af315b5168dad4ea9669cc543ad6807c175dd60b9eddceda1c74a7bb716912650219763077b3eaee6fae79cfec1099c65836) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/date/CONTROL b/ports/date/CONTROL index bf3095ac6..f9a86d671 100644 --- a/ports/date/CONTROL +++ b/ports/date/CONTROL @@ -1,5 +1,5 @@ Source: date -Version: 2.4 +Version: 2.4.1 Description: A date and time library based on the C++11/14/17 header Feature: remote-api diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake index 3b36a19fc..749c0c5f0 100644 --- a/ports/date/portfile.cmake +++ b/ports/date/portfile.cmake @@ -10,8 +10,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO HowardHinnant/date - REF v2.4 - SHA512 01bcc021ebf9ca0ac88c797896a291ff81834e7fae37323ad20881d3a172963c04d3c7bea0dd37cd945b756ab7f70f0a02edb18a085bf9abf8d8f10056f73f3c + REF v2.4.1 + SHA512 ce7d1c4518558d3690b3a33cd3da1066b43a5f641282c331c60be73e9b010227d4998bca5f34694215ae52f6514a2f5eccd6b0a5ee3dcf8cef2f2d1644c8beee HEAD_REF master ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index af05d4ddf..2e7eaef26 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-04-09 +Version: 2018-04-12 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 109105085..3e645a91e 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF fbd8e2669e223d43c34777c61029bb19b4c6e833 - SHA512 9c87e3123458e9dbf24df80118a09a6cc2c10855b19e59b3164634166b10f2daef54ac35a207bf8865eeb08cbc1d2d5b2ab33e4f2539bf8ffa82a7012c0eecc4 + REF c80b1b9d51689692bc865f1a1d16bf7fd2a532c4 + SHA512 72c3801678424cd738423ea28e03c44f4d2bfd6a7e3c2cea53806b3705eebc5e86a293d3aa2bea51f6f426b9e280a3f7b8883bb4e4c627cc413159d9565033a0 HEAD_REF master ) diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL index 450687f4f..e82f0fee2 100644 --- a/ports/libzip/CONTROL +++ b/ports/libzip/CONTROL @@ -1,4 +1,4 @@ Source: libzip -Version: rel-1-5-0 +Version: rel-1-5-1 Build-Depends: zlib Description: A library for reading, creating, and modifying zip archives. diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake index dee085f6c..b509c5eb0 100644 --- a/ports/libzip/portfile.cmake +++ b/ports/libzip/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nih-at/libzip - REF rel-1-5-0 - SHA512 d8267dd86231d82e0d14fc3e47c7deed3f54bccbc734dff12a7e2522422653f64ebdb76b35b9eb4326227ae89e06bd4cad263558c8312220ff5979b3b2299460 + REF rel-1-5-1 + SHA512 778f438f6354f030656baa5497b3154ad8fb764011d2a6925136f32e06dc0dcd1ed93fe05dbf7be619004a68cdabe5e34a83b988c1501ed67e9cfa4fa540350f ) # Patch cmake and configuration to allow static builds diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index de6b3c5a2..d7e583054 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-04-09 +Version: 2018-04-12 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index 18d127849..0994afa4d 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF ca8065dea45355836d9ca834823775c23a1f3571 - SHA512 4bead4c2317f8b1f33844eacd052724680da6e00d52acb9238a458598a0745a86e91ac8f41a9b2ec4be1365a18e727e1e2659910f293d3bfe3f3b49d34d20b30 + REF 529b74de173a77ba057ebc54d1f91629e7b643bd + SHA512 d836ee1c022522618f37fdeba941986977317fa68a909d8255e6abfd39564f72f47f8c78c2fa9e4ccc52da75987b56a02f8f2d5aad2890ef7b93ea843c85940c HEAD_REF master ) -- cgit v1.2.3 From 4550e44e7a451ffec9160f74ea9856db40bfa47e Mon Sep 17 00:00:00 2001 From: eao197 Date: Fri, 13 Apr 2018 20:40:20 +0300 Subject: sobjectizer updated to v.5.5.22 --- ports/sobjectizer/CONTROL | 2 +- ports/sobjectizer/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sobjectizer/CONTROL b/ports/sobjectizer/CONTROL index 7843e5622..839c2ed42 100644 --- a/ports/sobjectizer/CONTROL +++ b/ports/sobjectizer/CONTROL @@ -1,3 +1,3 @@ Source: sobjectizer -Version: 5.5.21 +Version: 5.5.22 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 b03b55b24..ed6b3f844 100644 --- a/ports/sobjectizer/portfile.cmake +++ b/ports/sobjectizer/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(VERSION 5.5.21) +set(VERSION 5.5.22) 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 eaee9e27b751307a540df34ca368f5253e191b3079c1222737d4ccc1800006d35ad8411cec0aec862a7ee00d7cc3c1e4494434d4aef7adb89655e99b5d4caf41 + SHA512 0f7c109a890fc4271a4f45ff009811d5d7479cec86ce8f6a312979bfd07a55e46069511d7868e1c7bf29e5ff6495d22d71fd3ba2b1253b2fb9299657d7b0384d ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 4e48a1c235d776b5099a61252ff726edb5b6a6b7 Mon Sep 17 00:00:00 2001 From: Wimok Nopphiboon <37108473+W1m0k@users.noreply.github.com> Date: Sat, 14 Apr 2018 07:48:45 +0700 Subject: [uwebsockets] Update to 0.14.7 (#3253) * [uwebsockets] Update to 0.14.6 * [uwebsockets] Update to 0.14.7 --- ports/uwebsockets/CONTROL | 2 +- ports/uwebsockets/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index 1757aae53..7e636ba9c 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets -Version: 0.14.6-1 +Version: 0.14.7-1 Build-Depends: libuv, openssl, zlib Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js diff --git a/ports/uwebsockets/portfile.cmake b/ports/uwebsockets/portfile.cmake index f7cbb6843..a24f49631 100644 --- a/ports/uwebsockets/portfile.cmake +++ b/ports/uwebsockets/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO uWebSockets/uWebSockets - REF v0.14.6 - SHA512 cac3be6fcd49796590f19bde89e4195cecf9097248f7550ef6942573b59cd132f136ec026203e8524270440a7ae18c49472eb2166028b5c68d4a4cc457af4748 + REF v0.14.7 + SHA512 1049497f7b63770dcfdc44bef562ce43b87fa553e8ec778c8ee2506f406a23f5fdcf67904f0458e38fc0843899b43b92ccef5f36cae40228cfe47b6f38fa0e15 HEAD_REF master ) -- cgit v1.2.3 From a9b1541fd6d308a17848ab4eb5396598ffa1a240 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 16 Apr 2018 16:14:50 -0700 Subject: [vcpkg, xml] Parse with string-search instead of regex Resolves issue with inconsistent regex behavior between platforms. For example [/s/S]*? does not properly match on Clang. String-searching is also generally more performant. --- toolsrc/src/vcpkg/commands.fetch.cpp | 83 +++++++++++++++++------------------- 1 file changed, 40 insertions(+), 43 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 7a1e6a810..1e31e6bc4 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -41,6 +41,22 @@ namespace vcpkg::Commands::Fetch return result; } + static Optional extract_string_between_delimiters(const std::string& input, + const std::string& left_delim, + const std::string& right_delim, + const size_t& starting_offset = 0) + { + const size_t from = input.find(left_delim, starting_offset); + if (from == std::string::npos) return nullopt; + + const size_t substring_start = from + left_delim.length(); + + const size_t to = input.find(right_delim, substring_start); + if (from == std::string::npos) return nullopt; + + return input.substr(substring_start, to - substring_start); + } + static ToolData parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool) { #if defined(_WIN32) @@ -57,33 +73,21 @@ namespace vcpkg::Commands::Fetch static const std::string XML_VERSION = "2"; static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; - const auto maybe_get_string_inside_tags = [](const std::string& input, - const std::regex& regex) -> Optional { - std::smatch match; - const bool has_match = std::regex_search(input.cbegin(), input.cend(), match, regex); - if (!has_match) return nullopt; - return match[1]; - }; - const auto get_string_inside_tags = - [](const std::string& input, const std::regex& regex, const std::string& tag_name) -> std::string { - std::smatch match; - const bool has_match = std::regex_search(input.cbegin(), input.cend(), match, regex); - Checks::check_exit( - VCPKG_LINE_INFO, has_match, "Could not find tag <%s> in %s", tag_name, XML_PATH.generic_string()); + [](const std::string& input, const std::string& left_delim, const std::string& right_delim) -> std::string { + Optional result = extract_string_between_delimiters(input, left_delim, right_delim); + Checks::check_exit(VCPKG_LINE_INFO, + result.has_value(), + "Could not find tag <%s>.*<%s> in %s", + left_delim, + right_delim, + XML_PATH.generic_string()); - return match[1]; + return *result.get(); }; static const std::regex XML_VERSION_REGEX{R"###()###"}; static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO); - static const std::regex VERSION_REGEX{R"###(([\s\S]*?))###"}; - static const std::regex EXE_RELATIVE_PATH_REGEX{ - Strings::format(R"###(([\s\S]*?))###")}; - static const std::regex ARCHIVE_NAME_REGEX{Strings::format(R"###(([\s\S]*?))###")}; - static const std::regex URL_REGEX{Strings::format(R"###(([\s\S]*?))###")}; - static const std::regex SHA512_REGEX{Strings::format(R"###(([\s\S]*?))###")}; - std::smatch match_xml_version; const bool has_xml_version = std::regex_search(XML.cbegin(), XML.cend(), match_xml_version, XML_VERSION_REGEX); Checks::check_exit(VCPKG_LINE_INFO, @@ -98,43 +102,36 @@ namespace vcpkg::Commands::Fetch XML_VERSION, match_xml_version[1]); - const std::regex tool_regex{ - Strings::format(R"###(([\s\S]*?)<\/tool>)###", tool, OS_STRING)}; - - std::smatch match_tool; - const bool has_match_tool = std::regex_search(XML.cbegin(), XML.cend(), match_tool, tool_regex); + const std::regex tool_regex{Strings::format(R"###()###", tool, OS_STRING)}; + std::smatch match_tool_entry; + const bool has_tool_entry = std::regex_search(XML.cbegin(), XML.cend(), match_tool_entry, tool_regex); Checks::check_exit(VCPKG_LINE_INFO, - has_match_tool, + has_tool_entry, "Could not find entry for tool [%s] in %s", tool, XML_PATH.generic_string()); - const std::string tool_data_as_string = get_string_inside_tags(XML, tool_regex, tool); - - const std::string required_version_as_string = - get_string_inside_tags(tool_data_as_string, VERSION_REGEX, "version"); - - const std::string url = get_string_inside_tags(tool_data_as_string, URL_REGEX, "url"); + const std::string tool_data = get_string_inside_tags(XML, match_tool_entry[0], R"()"); + const std::string version_as_string = get_string_inside_tags(tool_data, "", R"()"); const std::string exe_relative_path = - get_string_inside_tags(tool_data_as_string, EXE_RELATIVE_PATH_REGEX, "exeRelativePath"); - - auto archive_name = maybe_get_string_inside_tags(tool_data_as_string, ARCHIVE_NAME_REGEX); + get_string_inside_tags(tool_data, "", R"()"); + const std::string url = get_string_inside_tags(tool_data, "", R"()"); + const std::string sha512 = get_string_inside_tags(tool_data, "", R"()"); + auto archive_name = extract_string_between_delimiters(tool_data, "", R"()"); - const Optional> required_version = parse_version_string(required_version_as_string); + const Optional> version = parse_version_string(version_as_string); Checks::check_exit(VCPKG_LINE_INFO, - required_version.has_value(), + version.has_value(), "Could not parse version for tool %s. Version string was: %s", tool, - required_version_as_string); + version_as_string); - const std::string tool_dir_name = Strings::format("%s-%s-%s", tool, required_version_as_string, OS_STRING); + const std::string tool_dir_name = Strings::format("%s-%s-%s", tool, version_as_string, OS_STRING); const fs::path tool_dir_path = paths.downloads / "tools" / tool_dir_name; const fs::path exe_path = tool_dir_path / exe_relative_path; - const std::string sha512 = get_string_inside_tags(tool_data_as_string, SHA512_REGEX, "sha512"); - - return ToolData{*required_version.get(), + return ToolData{*version.get(), exe_path, url, paths.downloads / archive_name.value_or(exe_relative_path), -- cgit v1.2.3 From b8c5337875080b95ed0d05510f2ff226abf235b8 Mon Sep 17 00:00:00 2001 From: Florian Date: Tue, 17 Apr 2018 18:58:45 +0200 Subject: update google benchmark to 1.4.0 (#3237) --- ports/benchmark/CONTROL | 2 +- ports/benchmark/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/benchmark/CONTROL b/ports/benchmark/CONTROL index 5b56de372..9853a1509 100644 --- a/ports/benchmark/CONTROL +++ b/ports/benchmark/CONTROL @@ -1,3 +1,3 @@ Source: benchmark -Version: 1.3.0-1 +Version: 1.4.0 Description: A library to support the benchmarking of functions, similar to unit-tests. diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake index e76bce6ff..d724bf5ee 100644 --- a/ports/benchmark/portfile.cmake +++ b/ports/benchmark/portfile.cmake @@ -16,8 +16,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/benchmark - REF v1.3.0 - SHA512 272775e4dbd0ecc65a2a3a64f24e79682b630929dea3af47349329ac8b796341f1197458a67c9aac0e514857ebe7cbc191d18f6fd2c0aea3242562e69d8a6849 + REF v1.4.0 + SHA512 4bb5119fe6c0558e5a8b39486169ffcbf24e877ec7f28636dfab1692936b77334f76d28bda2cdada18e5070579da7a5bf0617bfbb6a09848f0b071df8e694d76 HEAD_REF master ) -- cgit v1.2.3 From 0700fbd9c0f7f37ba8e2a32f012b027efefdc3af Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Tue, 17 Apr 2018 13:00:20 -0400 Subject: [physfs] Update to version 3.0.1 (#3238) --- ports/physfs/export-symbols-in-shared-build-only.patch | 13 ------------- ports/physfs/portfile.cmake | 11 ++--------- 2 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 ports/physfs/export-symbols-in-shared-build-only.patch diff --git a/ports/physfs/export-symbols-in-shared-build-only.patch b/ports/physfs/export-symbols-in-shared-build-only.patch deleted file mode 100644 index b3303dcd8..000000000 --- a/ports/physfs/export-symbols-in-shared-build-only.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/physfs.h b/physfs.h -index 3c252c6..4319981 100644 ---- a/physfs.h -+++ b/physfs.h -@@ -221,7 +221,7 @@ extern "C" { - #endif - - #ifndef DOXYGEN_SHOULD_IGNORE_THIS --#if (defined _MSC_VER) -+#if (defined _MSC_VER && defined (physfs_EXPORTS)) - #define __EXPORT__ __declspec(dllexport) - #elif (__GNUC__ >= 3) - #define __EXPORT__ __attribute__((visibility("default"))) diff --git a/ports/physfs/portfile.cmake b/ports/physfs/portfile.cmake index c6233eed3..08b49e69f 100644 --- a/ports/physfs/portfile.cmake +++ b/ports/physfs/portfile.cmake @@ -1,20 +1,13 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "${PORT} does not currently support UWP") -endif() - include(vcpkg_common_functions) -set(PHYSFS_VERSION 2.0.3) +set(PHYSFS_VERSION 3.0.1) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/physfs-${PHYSFS_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://icculus.org/physfs/downloads/physfs-${PHYSFS_VERSION}.tar.bz2" FILENAME "physfs-${PHYSFS_VERSION}.tar.bz2" - SHA512 47eff0c81b8dc3bb526766b0a8ad2437d2951867880116d6e6e8f2ec1490e263541fb741867fed6517cc3fa8a9c5651b36e3e02a499f19cfdc5c7261c9707e80 + SHA512 ddf3b075ccb506da5e9a1ce96001be402752b9b777c2e816a85d48aff3626ff0886ea43eb07bd300fe3a9f59b9a002f54d822c51d483a4ee94b38378534c1879 ) vcpkg_extract_source_archive(${ARCHIVE}) -vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/export-symbols-in-shared-build-only.patch) - string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PHYSFS_STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PHYSFS_SHARED) -- cgit v1.2.3 From 9d52f41a8f6a2b6905b439217add223c403e8623 Mon Sep 17 00:00:00 2001 From: Claudio Fantacci Date: Tue, 17 Apr 2018 19:01:22 +0200 Subject: [realsense2] Add tools compilation (#3002) * Add features to realsense2 port (cherry picked from commit 87d1039774f9652275607e8bce120a7e493719d7) * Increment port version --- ports/realsense2/CONTROL | 8 ++++++-- ports/realsense2/portfile.cmake | 34 +++++++++++++++++++++++++--------- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index f1674b7e9..2465fd1a4 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,6 +1,10 @@ Source: realsense2 -Version: 2.10.1 +Version: 2.10.1-1 Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). Feature: avx2 -Description: rgb image decode using avx2 \ No newline at end of file +Description: rgb image decode using avx2 + +Feature: tools +Build-Depends: opengl +Description: Build Intel® RealSense™ examples and tools diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index cec2c9695..8e6b57392 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -15,6 +15,9 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/fix_rgb_using_avx2.patch # https://github.com/IntelRealSense/librealsense/pull/1245 ) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_LIBRARY_LINKAGE) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_CRT_LINKAGE) + # This option will be deprecated in the later versions. # Please see Pull Request #1245. https://github.com/IntelRealSense/librealsense/pull/1245 set(RGB_USING_AVX2 OFF) @@ -22,15 +25,22 @@ if("avx2" IN_LIST FEATURES) set(RGB_USING_AVX2 ON) endif() -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_LIBRARY_LINKAGE) -string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_CRT_LINKAGE) +set(BUILD_EXAMPLES OFF) +set(BUILD_GRAPHICAL_EXAMPLES OFF) +if("tools" IN_LIST FEATURES) + set(BUILD_EXAMPLES ON) + set(BUILD_GRAPHICAL_EXAMPLES ON) + set(BUILD_TOOLS ON) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DENFORCE_METADATA=ON - -DBUILD_EXAMPLES=OFF - -DBUILD_GRAPHICAL_EXAMPLES=OFF + -DBUILD_EXAMPLES=${BUILD_EXAMPLES} + -DBUILD_GRAPHICAL_EXAMPLES=${BUILD_GRAPHICAL_EXAMPLES} + -DBUILD_CV_EXAMPLES=OFF + -DBUILD_PCL_EXAMPLES=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_WITH_OPENMP=OFF @@ -43,13 +53,19 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/realsense2) +vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/realsense2) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/realsense2/COPYING ${CURRENT_PACKAGES_DIR}/share/realsense2/copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -vcpkg_copy_pdbs() +if(BUILD_TOOLS) + file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/realsense2) + file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/realsense2) +endif() +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/realsense2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/realsense2/COPYING ${CURRENT_PACKAGES_DIR}/share/realsense2/copyright) -- cgit v1.2.3 From fbf5fe822951437de2124643658131c222d9deca Mon Sep 17 00:00:00 2001 From: Patrick Grison <36514071+pgrison@users.noreply.github.com> Date: Tue, 17 Apr 2018 19:25:31 +0200 Subject: [vxl] first port - vxl commit 7a130cf of 2018/04/14 (#3265) --- ports/vxl/CONTROL | 3 +++ ports/vxl/portfile.cmake | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 ports/vxl/CONTROL create mode 100644 ports/vxl/portfile.cmake diff --git a/ports/vxl/CONTROL b/ports/vxl/CONTROL new file mode 100644 index 000000000..33cd87cb8 --- /dev/null +++ b/ports/vxl/CONTROL @@ -0,0 +1,3 @@ +Source: vxl +Version: 20180414-7a130cf +Description: A multi-platform collection of C++ software libraries for Computer Vision and Image Understanding. diff --git a/ports/vxl/portfile.cmake b/ports/vxl/portfile.cmake new file mode 100644 index 000000000..c2ea3d929 --- /dev/null +++ b/ports/vxl/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vxl/vxl + REF 7a130cf05e907a6500e3e717297082c46e77f524 + SHA512 b9f7e48e37b44469031c6de1bf2a3d0aa0ecf4d3c2f4dd0d1a84c273ca8a778b48f3caf7ec6ef0f2dea1dc534ebfdb6b2cde47a56d81aa4f0685114c0bda157c + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/core/vxl_copyright.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From c3062a7b8d06ea20c2105e8b277ccc76af99a2d2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Apr 2018 13:45:01 -0700 Subject: Use ~/.vcpkg/config instead of ~/vcpkg/config --- toolsrc/src/vcpkg/userconfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/userconfig.cpp b/toolsrc/src/vcpkg/userconfig.cpp index 9db2e5d47..574a97b64 100644 --- a/toolsrc/src/vcpkg/userconfig.cpp +++ b/toolsrc/src/vcpkg/userconfig.cpp @@ -35,7 +35,7 @@ namespace vcpkg return get_localappdata() / "vcpkg" / "config"; #else auto maybe_home = System::get_environment_variable("HOME"); - return fs::path(maybe_home.value_or("/var")) / "vcpkg" / "config"; + return fs::path(maybe_home.value_or("/var")) / ".vcpkg" / "config"; #endif } -- cgit v1.2.3 From 2a80b89ea7db68a4991d02e7535aab032dd7c155 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 14:46:50 -0700 Subject: [vxl] Use system dependencies where possible -- note that openjpeg2 is still not used. --- ports/vxl/CONTROL | 3 ++- ports/vxl/portfile.cmake | 20 +++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ports/vxl/CONTROL b/ports/vxl/CONTROL index 33cd87cb8..52d725f45 100644 --- a/ports/vxl/CONTROL +++ b/ports/vxl/CONTROL @@ -1,3 +1,4 @@ Source: vxl -Version: 20180414-7a130cf +Version: 20180414-7a130cf-1 +Build-Depends: zlib, tiff, expat, libpng, bzip2, libjpeg-turbo, shapelib, libgeotiff Description: A multi-platform collection of C++ software libraries for Computer Vision and Image Understanding. diff --git a/ports/vxl/portfile.cmake b/ports/vxl/portfile.cmake index c2ea3d929..7e27591e5 100644 --- a/ports/vxl/portfile.cmake +++ b/ports/vxl/portfile.cmake @@ -2,19 +2,33 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO vxl/vxl - REF 7a130cf05e907a6500e3e717297082c46e77f524 - SHA512 b9f7e48e37b44469031c6de1bf2a3d0aa0ecf4d3c2f4dd0d1a84c273ca8a778b48f3caf7ec6ef0f2dea1dc534ebfdb6b2cde47a56d81aa4f0685114c0bda157c + REPO vxl/vxl + REF 7a130cf05e907a6500e3e717297082c46e77f524 + SHA512 b9f7e48e37b44469031c6de1bf2a3d0aa0ecf4d3c2f4dd0d1a84c273ca8a778b48f3caf7ec6ef0f2dea1dc534ebfdb6b2cde47a56d81aa4f0685114c0bda157c HEAD_REF master ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DVXL_USING_NATIVE_ZLIB=ON + -DVXL_USING_NATIVE_BZLIB2=ON + -DVXL_USING_NATIVE_JPEG=ON + -DVXL_USING_NATIVE_TIFF=ON + -DVXL_USING_NATIVE_EXPAT=ON + -DVXL_USING_NATIVE_PNG=ON + -DVXL_USING_NATIVE_SHAPELIB=ON + -DVXL_USING_NATIVE_GEOTIFF=ON + -DVXL_FORCE_V3P_OPENJPEG2=ON + -DVXL_FORCE_V3P_J2K=ON + -DBUILD_TESTING=OFF + -DBUILD_EXAMPLES=OFF ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/vxl/cmake) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -- cgit v1.2.3 From 028f280d222ae8802561e876f33701c0faecce54 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 15:37:46 -0700 Subject: [cppzmq] Install cmake target files --- ports/cppzmq/CONTROL | 2 +- ports/cppzmq/portfile.cmake | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ports/cppzmq/CONTROL b/ports/cppzmq/CONTROL index 39928046d..e970bac53 100644 --- a/ports/cppzmq/CONTROL +++ b/ports/cppzmq/CONTROL @@ -1,4 +1,4 @@ Source: cppzmq -Version: 4.2.2 +Version: 4.2.2-1 Build-Depends: zeromq Description: lightweight messaging kernel, C++ bindings diff --git a/ports/cppzmq/portfile.cmake b/ports/cppzmq/portfile.cmake index 4f0701c59..282a86dfd 100644 --- a/ports/cppzmq/portfile.cmake +++ b/ports/cppzmq/portfile.cmake @@ -9,9 +9,16 @@ vcpkg_from_github( HEAD_REF master ) -# cppzmq is a single header library, so we just need to copy that file in the include directory -file(INSTALL ${SOURCE_PATH}/zmq.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(INSTALL ${SOURCE_PATH}/zmq_addon.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/cppzmq) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppzmq) -- cgit v1.2.3 From a4b35f14baac9ccaadca7c6daf6dea39cb9817a2 Mon Sep 17 00:00:00 2001 From: John Farrier Date: Tue, 17 Apr 2018 19:11:18 -0400 Subject: Upgrade Celero to v2.2.0 (#3259) * Upgrade Celero to v2.2.0 * [celero] Fix installed cmake targets --- ports/celero/CONTROL | 2 +- ports/celero/portfile.cmake | 11 +++++++---- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 9 ++++++++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ports/celero/CONTROL b/ports/celero/CONTROL index d40c93783..6180230dd 100644 --- a/ports/celero/CONTROL +++ b/ports/celero/CONTROL @@ -1,3 +1,3 @@ Source: celero -Version: 2.1.0-1 +Version: 2.1.0-2 Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++. diff --git a/ports/celero/portfile.cmake b/ports/celero/portfile.cmake index c942ca5d8..0800115ec 100644 --- a/ports/celero/portfile.cmake +++ b/ports/celero/portfile.cmake @@ -5,12 +5,11 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(VCPKG_LIBRARY_LINKAGE static) endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DigitalInBlue/Celero - REF v2.1.0 - SHA512 30563567255b09a2c810d97896839589ed99d45b6c8d075fd16d1a0068457d70195a199f5c982c84784c2e03284c1eaac565253fa72b81d9e2d4102721b80221 + REF v2.2.0 + SHA512 6fac1fa949b18caabf59f3675c6e592cfadc3efa5e674b1f8b183e728ec880a4f5616d5d41c97f8fc26ef9520284188f519b7634209d0a56fb38a6993a9e9680 HEAD_REF master ) @@ -24,6 +23,10 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/celero/celero-target.cmake ${CURRENT_PACKAGES_DIR}/share/celero/celero-config.cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/celero RENAME copyright) diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 475047737..47c91f83c 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -28,6 +28,12 @@ function(vcpkg_fixup_cmake_targets) set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/${_vfct_TARGET_PATH}) if(_vfct_CONFIG_PATH AND NOT RELEASE_SHARE STREQUAL "${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}") + if(_vfct_CONFIG_PATH STREQUAL "share") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/share2) + file(RENAME ${CURRENT_PACKAGES_DIR}/share ${CURRENT_PACKAGES_DIR}/share2) + set(_vfct_CONFIG_PATH share2) + endif() + set(DEBUG_CONFIG ${CURRENT_PACKAGES_DIR}/debug/${_vfct_CONFIG_PATH}) set(RELEASE_CONFIG ${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}) @@ -36,6 +42,7 @@ function(vcpkg_fixup_cmake_targets) message(FATAL_ERROR "'${DEBUG_CONFIG}' does not exist.") endif() + # This roundabout handling enables CONFIG_PATH share file(MAKE_DIRECTORY ${DEBUG_SHARE}) file(GLOB FILES ${DEBUG_CONFIG}/*) file(COPY ${FILES} DESTINATION ${DEBUG_SHARE}) @@ -76,7 +83,7 @@ function(vcpkg_fixup_cmake_targets) endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - if(NOT EXISTS ${DEBUG_SHARE}) + if(NOT EXISTS "${DEBUG_SHARE}") message(FATAL_ERROR "'${DEBUG_SHARE}' does not exist.") endif() endif() -- cgit v1.2.3 From 8fcb1073abe8611fa24b43f7c1cda0d7404e108e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 18 Apr 2018 18:52:22 -0700 Subject: [vcpkg edit] Now accepts multiple ports as arg --- toolsrc/src/vcpkg/commands.edit.cpp | 70 +++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 27 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index 82569dd07..b6324565c 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -1,5 +1,6 @@ #include "pch.h" +#include #include #include #include @@ -52,11 +53,42 @@ namespace vcpkg::Commands::Edit const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("edit zlib"), 1, - 1, + 10, {EDIT_SWITCHES, {}}, &valid_arguments, }; + static std::vector create_editor_arguments(const VcpkgPaths& paths, + const ParsedArguments& options, + const std::vector& ports) + { + if (Util::Sets::contains(options.switches, OPTION_ALL)) + { + return Util::fmap(ports, [&](const std::string& port_name) -> std::string { + const auto portpath = paths.ports / port_name; + const auto portfile = portpath / "portfile.cmake"; + const auto buildtrees_current_dir = paths.buildtrees / port_name; + return Strings::format(R"###("%s" "%s" "%s")###", + portpath.u8string(), + portfile.u8string(), + buildtrees_current_dir.u8string()); + }); + } + + if (Util::Sets::contains(options.switches, OPTION_BUILDTREES)) + { + return Util::fmap(ports, [&](const std::string& port_name) -> std::string { + return (paths.buildtrees / port_name).u8string(); + }); + } + + return Util::fmap(ports, [&](const std::string& port_name) -> std::string { + const auto portpath = paths.ports / port_name; + const auto portfile = portpath / "portfile.cmake"; + return Strings::format(R"###("%s" "%s")###", portpath.u8string(), portfile.u8string()); + }); + } + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { static const fs::path VS_CODE_INSIDERS = fs::path{"Microsoft VS Code Insiders"} / "Code - Insiders.exe"; @@ -65,10 +97,14 @@ namespace vcpkg::Commands::Edit auto& fs = paths.get_filesystem(); const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); - const std::string port_name = args.command_arguments.at(0); - const fs::path portpath = paths.ports / port_name; - Checks::check_exit(VCPKG_LINE_INFO, fs.is_directory(portpath), R"(Could not find port named "%s")", port_name); + const std::vector& ports = args.command_arguments; + for (auto&& port_name : ports) + { + const fs::path portpath = paths.ports / port_name; + Checks::check_exit( + VCPKG_LINE_INFO, fs.is_directory(portpath), R"(Could not find port named "%s")", port_name); + } std::vector candidate_paths; auto maybe_editor_path = System::get_environment_variable("EDITOR"); @@ -107,29 +143,9 @@ namespace vcpkg::Commands::Edit } const fs::path env_editor = *it; - if (Util::Sets::contains(options.switches, OPTION_BUILDTREES)) - { - const auto buildtrees_current_dir = paths.buildtrees / port_name; - - const auto cmd_line = - Strings::format(R"("%s" "%s" -n)", env_editor.u8string(), buildtrees_current_dir.u8string()); - Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); - } - - if (Util::Sets::contains(options.switches, OPTION_ALL)) - { - const auto buildtrees_current_dir = paths.buildtrees / port_name; - - const auto cmd_line = Strings::format( - R"("%s" "%s" "%s" -n)", env_editor.u8string(), portpath.u8string(), buildtrees_current_dir.u8string()); - Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); - } - - const auto cmd_line = Strings::format( - R"("%s" "%s" "%s" -n)", - env_editor.u8string(), - portpath.u8string(), - (portpath / "portfile.cmake").u8string()); + const std::vector arguments = create_editor_arguments(paths, options, ports); + const auto args_as_string = Strings::join(" ", arguments); + const auto cmd_line = Strings::format(R"("%s" %s -n)", env_editor.u8string(), args_as_string); Checks::exit_with_code(VCPKG_LINE_INFO, System::cmd_execute(cmd_line)); } } -- cgit v1.2.3 From 08438e581c3818932f5bc66c744b4d49b2734b62 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 18 Apr 2018 19:28:50 -0700 Subject: [zeromq] Fix cmake targets for static zeromq --- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index b333f7440..de0a3635f 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-04-05 +Version: 2018-04-05-1 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 8019053f9..23bace766 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -43,6 +43,7 @@ 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") -- cgit v1.2.3 From 3a3fa5cd8f02dde78b00c12273b338e293edcd51 Mon Sep 17 00:00:00 2001 From: Jonathan Hale Date: Thu, 19 Apr 2018 04:33:12 +0200 Subject: [magnum] Properly deploy plugins (#3191) * [magnum] Properly deploy magnum plugins Signed-off-by: Squareys * [magnum-plugins] Add tinygltfimporter feature Signed-off-by: Squareys * [magnum][magnum-plugins] Add features: trade and any* Prepares upcoming move of those sublibraries and allows building --head immediately. For current release this only adds some unused cmake flags that will be ignored. Signed-off-by: Squareys * [magnum] Add gl feature, cleanup dependencies, mark upcoming features And sort features alphabetically. Signed-off-by: Squareys * [magnum-plugins] Prepare renaming of static flag for --head installs Signed-off-by: Squareys * [magnum] Add two missing feature dependencies Signed-off-by: Squareys * [magnum] Enable magnum[any*] features by default Signed-off-by: Squareys --- ports/magnum-plugins/CONTROL | 26 ++++++-- ports/magnum-plugins/portfile.cmake | 7 +- ports/magnum/CONTROL | 102 ++++++++++++++++++++---------- ports/magnum/magnumdeploy.ps1 | 38 +++++++++++ ports/magnum/portfile.cmake | 3 + scripts/buildsystems/msbuild/applocal.ps1 | 17 ++++- 6 files changed, 148 insertions(+), 45 deletions(-) create mode 100644 ports/magnum/magnumdeploy.ps1 diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 12a444e2d..98e7e606d 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,31 +1,36 @@ Source: magnum-plugins -Version: 2018.02-1 +Version: 2018.02-2 Build-Depends: magnum Description: Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ Default-Features: anyimageimporter, anysceneimporter, anyimageconverter, ddsimporter, miniexrimageconverter, opengeximporter, stanfordimporter, stbimageconverter, stbimageimporter Feature: anyimageimporter Description: AnyImageImporter plugin +Build-Depends: magnum[trade] Feature: anyaudioimporter Description: AnyAudioImporter plugin +Build-Depends: magnum[audio] Feature: anyimageconverter Description: AnyImageConverter plugin +Build-Depends: magnum[trade] Feature: anysceneimporter Description: AnySceneImporter plugin +Build-Depends: magnum[trade] Feature: assimpimporter Description: AssimpImporter plugin -Build-Depends: assimp, magnum-plugins[anyimageimporter] +Build-Depends: assimp, magnum-plugins[anyimageimporter], magnum[anyimageimporter], magnum[trade] Feature: ddsimporter Description: DdsImporter plugin +Build-Depends: magnum[trade] Feature: devilimageimporter Description: DevIlImageImporter plugin -Build-Depends: devil +Build-Depends: devil, magnum[trade] Feature: drflacaudioimporter Description: DrFlacAudioImporter plugin @@ -45,31 +50,35 @@ Build-Depends: harfbuzz, magnum-plugins[freetypefont] Feature: jpegimporter Description: JpegImporter plugin -Build-Depends: libjpeg-turbo +Build-Depends: libjpeg-turbo, magnum[trade] Feature: miniexrimageconverter Description: MiniExrImageConverter plugin +Build-Depends: magnum[trade] Feature: opengeximporter Description: OpenGexImporter plugin -Build-Depends: magnum-plugins[anyimageimporter] +Build-Depends: magnum-plugins[anyimageimporter], magnum[anyimageimporter], magnum[trade] Feature: pngimageconverter Description: PngImageConverter plugin -Build-Depends: libpng +Build-Depends: libpng, magnum[trade] Feature: pngimporter Description: PngImporter plugin -Build-Depends: libpng +Build-Depends: libpng, magnum[trade] Feature: stanfordimporter Description: StanfordImporter plugin +Build-Depends: magnum[trade] Feature: stbimageconverter Description: StbImageConverter plugin +Build-Depends: magnum[trade] Feature: stbimageimporter Description: StbImageImporter plugin +Build-Depends: magnum[trade] Feature: stbtruetypefont Description: StbTrueTypeFont plugin @@ -79,3 +88,6 @@ Feature: stbvorbisaudioimporter Description: StbVorbisAudioImporter plugin Build-Depends: magnum[audio] +Feature: tinygltfimporter +Description: (Upcoming) TinyGltfImporter plugin +Build-Depends: magnum-plugins[anyimageimporter], magnum[anyimageimporter], magnum-plugins[stbimageimporter], magnum[trade] diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index 86e5622d5..bedf9e395 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -14,9 +14,9 @@ vcpkg_apply_patches( ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(BUILD_STATIC 1) + set(BUILD_PLUGINS_STATIC 1) else() - set(BUILD_STATIC 0) + set(BUILD_PLUGINS_STATIC 0) endif() # Handle features @@ -40,7 +40,8 @@ vcpkg_configure_cmake( PREFER_NINJA # Disable this option if project cannot be built with Ninja OPTIONS ${_COMPONENT_FLAGS} - -DBUILD_STATIC=${BUILD_STATIC} + -DBUILD_STATIC=${BUILD_PLUGINS_STATIC} + -DBUILD_PLUGINS_STATIC=${BUILD_PLUGINS_STATIC} -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum ) diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index dcf86f079..6f3aebadc 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,42 +1,65 @@ Source: magnum -Version: 2018.02-1 +Version: 2018.02-2 Build-Depends: corrade[pluginmanager], corrade[utility] Description: C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ -Default-Features: debugtools, meshtools, primitives, scenegraph, shaders, shapes, text, texturetools, sdl2application, windowlesswglapplication +Default-Features: anyimageimporter, anyaudioimporter, anyimageconverter, anysceneimporter, debugtools, gl, meshtools, primitives, scenegraph, shaders, shapes, text, texturetools, trade, sdl2application, windowlesswglapplication -Feature: sdl2application -Description: Sdl2Application library -Build-Depends: sdl2 +Feature: al-info +Description: magnum-al-info utility +Build-Depends: magnum[audio] -Feature: glfwapplication -Description: GlfwApplication library -Build-Depends: glfw3 +Feature: anyimageimporter +Description: (Upcoming) AnyImageImporter plugin +Build-Depends: magnum[trade] -Feature: glutapplication -Description: GlutApplication library -Build-Depends: freeglut +Feature: anyaudioimporter +Description: (Upcoming) AnyAudioImporter plugin +Build-Depends: magnum[audio] + +Feature: anyimageconverter +Description: (Upcoming) AnyImageConverter plugin +Build-Depends: magnum[trade] + +Feature: anysceneimporter +Description: (Upcoming) AnySceneImporter plugin +Build-Depends: magnum[trade] Feature: audio Description: Audio library Build-Depends: openal-soft -Feature: magnuminfo -Description: magnum-info utility +Feature: debugtools +Description: DebugTools library + +Feature: distancefieldconverter +Description: magnum-distancefieldconverter utility +Build-Depends: magnum[texturetools], magnum[gl] Feature: fontconverter Description: magnum-fontconverter utility -Build-Depends: magnum[text] +Build-Depends: magnum[text], magnum[gl] -Feature: distancefieldconverter -Description: magnum-distancefieldconverter utility -Build-Depends: magnum[texturetools] +Feature: gl +Description: (Upcoming) GL library + +Feature: gl-info +Description: (Upcoming) gl-info utility +Build-Depends: magnum[gl] + +Feature: glfwapplication +Description: GlfwApplication library +Build-Depends: glfw3 + +Feature: glutapplication +Description: GlutApplication library +Build-Depends: freeglut, magnum[gl] Feature: imageconverter Description: magnum-imageconverter utility +Build-Depends: magnum[trade] -Feature: wavaudioimporter -Description: WavAudioImporter plugin -Build-Depends: magnum[audio] +Feature: magnuminfo +Description: magnum-info utility Feature: magnumfont Description: MagnumFont plugin @@ -46,23 +69,29 @@ Feature: magnumfontconverter Description: MagnumFontConverter plugin Build-Depends: magnum[text], magnum[tgaimageconverter] +Feature: meshtools +Description: MeshTools library +Build-Depends: magnum[trade] + Feature: objimporter Description: ObjImporter plugin +Build-Depends: magnum[trade] Feature: tgaimageconverter Description: TgaImageConverter plugin +Build-Depends: magnum[trade] -Feature: tgaimporter -Description: TgaImporter plugin - -Feature: debugtools -Description: DebugTools library - -Feature: meshtools -Description: MeshTools library +Feature: opengltester +Description: OpenGLTester library +Build-Depends: corrade[testsuite], magnum[gl] Feature: primitives Description: Primitives library +Build-Depends: magnum[trade] + +Feature: sdl2application +Description: Sdl2Application library +Build-Depends: sdl2 Feature: shapes Description: Shapes library @@ -80,16 +109,21 @@ Build-Depends: magnum[texturetools] Feature: texturetools Description: TextureTools library -Feature: al-info -Description: magnum-al-info utility +Feature: tgaimporter +Description: TgaImporter plugin +Build-Depends: magnum[trade] + +Feature: trade +Description: (Upcoming) Trade library + +Feature: wavaudioimporter +Description: WavAudioImporter plugin Build-Depends: magnum[audio] Feature: windowlesswglapplication Description: WindowlessWglApplication library +Build-Depends: magnum[gl] Feature: wglcontext Description: WglContext library - -Feature: opengltester -Description: OpenGLTester library -Build-Depends: corrade[testsuite] +Build-Depends: magnum[gl] diff --git a/ports/magnum/magnumdeploy.ps1 b/ports/magnum/magnumdeploy.ps1 new file mode 100644 index 000000000..203f2bac3 --- /dev/null +++ b/ports/magnum/magnumdeploy.ps1 @@ -0,0 +1,38 @@ +# Magnum's plugin deployment strategy is that each Magnum module has a hardcoded +# set of plugin directories. Each of these directories is deployed in +# full if that Module is referenced. +# +# Note: this function signature and behavior is depended upon by applocal.ps1 +function deployPluginsIfMagnum([string]$targetBinaryDir, [string]$MagnumPluginsDir, [string]$targetBinaryName) { + Write-Verbose "Deploying magnum plugins" + + $baseDir = Split-Path $MagnumPluginsDir -parent + $pluginsBase = Split-Path $MagnumPluginsDir -Leaf + $binDir = "$baseDir\bin" + + function deployPlugins([string]$pluginSubdirName) { + if (Test-Path "$MagnumPluginsDir\$pluginSubdirName") { + Write-Verbose " Deploying plugins directory '$pluginSubdirName'" + New-Item "$targetBinaryDir\$pluginsBase\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null + Get-ChildItem -Path "$MagnumPluginsDir\$pluginSubdirName\*" -Include "*.dll", "*.conf", "*.pdb" | % { + deployBinary "$targetBinaryDir\$pluginsBase\$pluginSubdirName" "$MagnumPluginsDir\$pluginSubdirName" $_.Name + resolve $_ + } + } else { + Write-Verbose " Skipping plugins directory '$pluginSubdirName': doesn't exist" + } + } + + # We detect Magnum modules in use via the DLLs themselves. + # Rather than checking for Magnum*.dll, we check for Magnum.dll and + # Magnum-d.dll to avoid falsly matching MagnumTextureTools.dll for example. + if ($targetBinaryName -like "MagnumAudio.dll" -or $targetBinaryName -like "MagnumAudio-d.dll") { + deployPlugins "audioimporters" + } elseif ($targetBinaryName -like "MagnumText.dll" -or $targetBinaryName -like "MagnumText-d.dll") { + deployPlugins "fonts" + deployPlugins "fontconverters" + } elseif ($targetBinaryName -like "Magnum.dll" -or $targetBinaryName -like "Magnum-d.dll") { + deployPlugins "importers" + deployPlugins "imageconverters" + } +} diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 10d7f02fc..af22fbb60 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -94,6 +94,9 @@ else() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/MagnumPlugins) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) + + file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/bin/magnum) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/magnum-d) endif() # Handle copyright diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index 3f0f2ef37..e5f3c3dd0 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -4,6 +4,7 @@ param([string]$targetBinary, [string]$installedDir, [string]$tlogFile, [string]$ $g_searched = @{} # Note: installedDir is actually the bin\ directory. $g_install_root = Split-Path $installedDir -parent +$g_is_debug = $g_install_root -match '(.*\\)?debug(\\)?$' # Ensure we create the copied files log, even if we don't end up copying any files if ($copiedFilesLog) @@ -63,6 +64,13 @@ function resolve([string]$targetBinary) { deployBinary $baseTargetBinaryDir $installedDir "$_" if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $targetBinaryDir "$g_install_root\plugins" "$_" } if (Test-Path function:\deployOpenNI2) { deployOpenNI2 $targetBinaryDir "$g_install_root" "$_" } + if (Test-Path function:\deployPluginsIfMagnum) { + if ($g_is_debug) { + deployPluginsIfMagnum $targetBinaryDir "$g_install_root\bin\magnum-d" "$_" + } else { + deployPluginsIfMagnum $targetBinaryDir "$g_install_root\bin\magnum" "$_" + } + } resolve "$baseTargetBinaryDir\$_" } elseif (Test-Path "$targetBinaryDir\$_") { Write-Verbose " ${_}: $_ not found in vcpkg; locally deployed" @@ -85,5 +93,12 @@ if (Test-Path "$g_install_root\bin\OpenNI2\openni2deploy.ps1") { . "$g_install_root\bin\OpenNI2\openni2deploy.ps1" } +# Note: This is a hack to make Magnum work. +if (Test-Path "$g_install_root\bin\magnum\magnumdeploy.ps1") { + . "$g_install_root\bin\magnum\magnumdeploy.ps1" +} elseif (Test-Path "$g_install_root\bin\magnum-d\magnumdeploy.ps1") { + . "$g_install_root\bin\magnum-d\magnumdeploy.ps1" +} + resolve($targetBinary) -Write-Verbose $($g_searched | out-string) \ No newline at end of file +Write-Verbose $($g_searched | out-string) -- cgit v1.2.3 From a95fbce456feaa14fe67a875037da2a0c58d7a3f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 16:15:06 -0700 Subject: [libxml2] Display usage information --- ports/libxml2/portfile.cmake | 2 +- ports/libxml2/usage | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 ports/libxml2/usage diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake index cdf10496e..d55d4052d 100644 --- a/ports/libxml2/portfile.cmake +++ b/ports/libxml2/portfile.cmake @@ -19,7 +19,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxml2) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxml2) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libxml2/COPYING ${CURRENT_PACKAGES_DIR}/share/libxml2/copyright) vcpkg_copy_pdbs() diff --git a/ports/libxml2/usage b/ports/libxml2/usage new file mode 100644 index 000000000..fd94c4b4e --- /dev/null +++ b/ports/libxml2/usage @@ -0,0 +1,5 @@ +The package libxml2 is compatible with built-in CMake targets: + + find_package(LibXml2 REQUIRED) + target_include_directories(main PRIVATE ${LIBXML2_INCLUDE_DIR}) + target_link_libraries(main PRIVATE ${LIBXML2_LIBRARIES}) -- cgit v1.2.3 From 2b896d2a2224ab2eed23dd1bcb3558fc5230d7a8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 16:15:21 -0700 Subject: [libuuid] Install headers into correct subdirectory --- ports/libuuid/CMakeLists.txt | 2 +- ports/libuuid/CONTROL | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libuuid/CMakeLists.txt b/ports/libuuid/CMakeLists.txt index a4335f1a8..ff1edd0ef 100644 --- a/ports/libuuid/CMakeLists.txt +++ b/ports/libuuid/CMakeLists.txt @@ -24,7 +24,7 @@ add_executable(test_uuid test_uuid.c) target_link_libraries(test_uuid uuid) if(CMAKE_BUILD_TYPE STREQUAL "Release") - install(FILES uuid.h DESTINATION include) + install(FILES uuid.h DESTINATION include/uuid) endif() install( diff --git a/ports/libuuid/CONTROL b/ports/libuuid/CONTROL index bfec975dd..04bfbe47b 100644 --- a/ports/libuuid/CONTROL +++ b/ports/libuuid/CONTROL @@ -1,3 +1,3 @@ Source: libuuid -Version: 1.0.3 +Version: 1.0.3-1 Description: Universally unique id library -- cgit v1.2.3 From 042b7023a17f54080927c1d27d757aa4860dea27 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 16:15:42 -0700 Subject: [libsigcpp] Fix building with older gcc versions --- ports/libsigcpp/CMakeLists.txt | 2 ++ ports/libsigcpp/CONTROL | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/libsigcpp/CMakeLists.txt b/ports/libsigcpp/CMakeLists.txt index 7a669a24e..9c43b1a1b 100644 --- a/ports/libsigcpp/CMakeLists.txt +++ b/ports/libsigcpp/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 3.0) project(libsigc++) +set(CMAKE_CXX_STANDARD 17) + set(SIGCPP_API_VERSION 2.0) add_definitions(-DSIGC_BUILD) diff --git a/ports/libsigcpp/CONTROL b/ports/libsigcpp/CONTROL index 02b2e4b83..c0393066b 100644 --- a/ports/libsigcpp/CONTROL +++ b/ports/libsigcpp/CONTROL @@ -1,3 +1,3 @@ Source: libsigcpp -Version: 2.10 +Version: 2.10-1 Description: Typesafe callback framework for C++ -- cgit v1.2.3 From 6984ef0c2ce27e7905f47078e79117c4e02e5ea0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 16:16:23 -0700 Subject: [libiconv] Fix unofficial-iconv cmake targets on non-windows --- ports/libiconv/CONTROL | 2 +- ports/libiconv/portfile.cmake | 2 +- ports/libiconv/unofficial-iconv-config.cmake | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ports/libiconv/CONTROL b/ports/libiconv/CONTROL index 37c1a0f0d..852156dc6 100644 --- a/ports/libiconv/CONTROL +++ b/ports/libiconv/CONTROL @@ -1,3 +1,3 @@ Source: libiconv -Version: 1.15-3 +Version: 1.15-4 Description: GNU Unicode text conversion diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index 5cc48da91..f1ee147f9 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -1,6 +1,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(VCPKG_POLICY_EMPTY_PACKAGE enabled) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/libiconv) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/unofficial-iconv) file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-iconv-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-iconv) return() endif() diff --git a/ports/libiconv/unofficial-iconv-config.cmake b/ports/libiconv/unofficial-iconv-config.cmake index e272ce09e..7d08ff5f5 100644 --- a/ports/libiconv/unofficial-iconv-config.cmake +++ b/ports/libiconv/unofficial-iconv-config.cmake @@ -1,2 +1,6 @@ -add_library(unofficial::iconv::libcharset UNKNOWN IMPORTED) -add_library(unofficial::iconv::libiconv UNKNOWN IMPORTED) +add_library(unofficial::iconv::libcharset INTERFACE IMPORTED) +add_library(unofficial::iconv::libiconv INTERFACE IMPORTED) +if(APPLE) + set_property(TARGET unofficial::iconv::libcharset PROPERTY INTERFACE_LINK_LIBRARIES "charset;unofficial::iconv::libiconv") + set_property(TARGET unofficial::iconv::libiconv PROPERTY INTERFACE_LINK_LIBRARIES "iconv") +endif() \ No newline at end of file -- cgit v1.2.3 From 24cf00365b2ca6977962dd22cba8718ca51ab4be Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 16:18:25 -0700 Subject: [libffi] Fix non-windows --- ports/libffi/CMakeLists.txt | 112 ++++++++++++++++++++++-------- ports/libffi/fficonfig.h | 163 -------------------------------------------- ports/libffi/portfile.cmake | 9 ++- 3 files changed, 91 insertions(+), 193 deletions(-) diff --git a/ports/libffi/CMakeLists.txt b/ports/libffi/CMakeLists.txt index 79e9e671d..1f8e2d332 100644 --- a/ports/libffi/CMakeLists.txt +++ b/ports/libffi/CMakeLists.txt @@ -1,13 +1,40 @@ -cmake_minimum_required(VERSION 3.0) -project(libffi) +cmake_minimum_required(VERSION 3.9) +project(libffi C ASM) + +set(CMAKE_SHARED_LIBRARY_PREFIX) +set(CMAKE_STATIC_LIBRARY_PREFIX) + +if(NOT CMAKE_SYSTEM_PROCESSOR) + set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}") +endif() # config variables for ffi.h.in set(VERSION 3.1) -if(CMAKE_SIZEOF_VOID_P EQUAL 4) + +set(KNOWN_PROCESSORS x86 x86_64 AMD64 ARM ARM64 i386) + +if(NOT CMAKE_SYSTEM_PROCESSOR IN_LIST KNOWN_PROCESSORS) + message(FATAL_ERROR "Unknown processor: ${CMAKE_SYSTEM_PROCESSOR}") +endif() + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "ARM") + set(TARGET ARM) +elseif(CMAKE_SYSTEM_NAME MATCHES "BSD" AND CMAKE_SIZEOF_VOID_P EQUAL 4) + set(TARGET X86_FREEBSD) +elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 4) set(TARGET X86_WIN32) -else() +elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 8) set(TARGET X86_WIN64) +elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") + set(TARGET X86_DARWIN) +elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(TARGET X86_64) +elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(TARGET X86) +else() + message(FATAL_ERROR "Cannot determine target. Please consult ${CMAKE_CURRENT_SOURCE_DIR}/configure.ac and add your platform to this CMake file.") endif() + set(HAVE_LONG_DOUBLE 0) set(HAVE_LONG_DOUBLE_VARIANT 0) set(FFI_EXEC_TRAMPOLINE_TABLE 0) @@ -24,33 +51,13 @@ include_directories(include) add_definitions(-DHAVE_CONFIG_H) add_definitions(-DFFI_BUILDING) if(BUILD_SHARED_LIBS) - add_definitions(-DFFI_EXPORT_DATA) + if(WIN32) + add_definitions(-DFFI_EXPORT_DATA) + endif() set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() -if(CMAKE_SIZEOF_VOID_P EQUAL 4) - set(ARCH_ASM_NAME win32) - set(ARCH_ASSEMBLER ml /safeseh) -else() - set(ARCH_ASM_NAME win64) - set(ARCH_ASSEMBLER ml64) -endif() - -execute_process( - COMMAND cl /nologo /EP /I. /Iinclude ${CMAKE_SOURCE_DIR}/src/x86/${ARCH_ASM_NAME}.S - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - OUTPUT_FILE ${ARCH_ASM_NAME}.asm) - -# Produced *.asm file could be just added to sources. -# It works in x64 mode, but for some strange reason MASM returns error code when in x86, -# (even though it didn't report any errors and correctly generated object file) -# which in turn causes MSBUILD to stop. -execute_process( - COMMAND ${ARCH_ASSEMBLER} /c /Zi ${ARCH_ASM_NAME}.asm - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) - set(FFI_SOURCES - ${CMAKE_BINARY_DIR}/${ARCH_ASM_NAME}.obj src/x86/ffi.c src/closures.c src/java_raw_api.c @@ -58,6 +65,57 @@ set(FFI_SOURCES src/raw_api.c src/types.c) +macro(add_assembly ASMFILE) + get_filename_component(ASMFILE_FULL "${ASMFILE}" ABSOLUTE) + if(MSVC) + if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(ARCH_ASSEMBLER ml /safeseh) + else() + set(ARCH_ASSEMBLER ml64) + endif() + + get_filename_component(ARCH_ASM_NAME "${ASMFILE_FULL}" NAME_WE) + + execute_process( + COMMAND ${CMAKE_C_COMPILER} /nologo /EP /I. /Iinclude ${ASMFILE_FULL} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + OUTPUT_FILE ${ARCH_ASM_NAME}.asm + ) + + # Produced *.asm file could be just added to sources. + # It works in x64 mode, but for some strange reason MASM returns error code when in x86, + # (even though it didn't report any errors and correctly generated object file) + # which in turn causes MSBUILD to stop. + execute_process( + COMMAND ${ARCH_ASSEMBLER} /c /Zi ${ARCH_ASM_NAME}.asm + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + ) + + list(APPEND FFI_SOURCES ${CMAKE_BINARY_DIR}/${ARCH_ASM_NAME}.obj) + else() + list(APPEND FFI_SOURCES ${ASMFILE}) + endif() +endmacro() + +if("${TARGET}" STREQUAL "X86") + add_assembly(src/x86/sysv.S) + add_assembly(src/x86/win32.S) +elseif("${TARGET}" STREQUAL "X86_64") + list(APPEND FFI_SOURCES src/x86/ffi64.c) + add_assembly(src/x86/unix64.S) + add_assembly(src/x86/sysv.S) +elseif("${TARGET}" STREQUAL "X86_WIN32") + add_assembly(src/x86/win32.S) +elseif("${TARGET}" STREQUAL "X86_WIN64") + add_assembly(src/x86/win64.S) +elseif("${TARGET}" STREQUAL "X86_DARWIN") + list(APPEND FFI_SOURCES src/x86/ffi64.c) + add_assembly(src/x86/darwin.S) + add_assembly(src/x86/darwin64.S) +else() + message(FATAL_ERROR "Target not implemented") +endif() + if(CMAKE_BUILD_TYPE STREQUAL Debug) list(APPEND FFI_SOURCES src/debug.c) add_definitions(-DFFI_DEBUG) diff --git a/ports/libffi/fficonfig.h b/ports/libffi/fficonfig.h index b5cd2368f..ff8b0ca44 100644 --- a/ports/libffi/fficonfig.h +++ b/ports/libffi/fficonfig.h @@ -1,209 +1,46 @@ -/* fficonfig.h. Generated from fficonfig.h.in by configure. */ -/* fficonfig.h.in. Generated from configure.ac by autoheader. */ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to the flags needed for the .section .eh_frame directive. */ -/* #undef EH_FRAME_FLAGS */ - -/* Define this if you want extra debugging. */ -/* #undef FFI_DEBUG */ - -/* Cannot use PROT_EXEC on this target, so, we revert to alternative means */ -/* #undef FFI_EXEC_TRAMPOLINE_TABLE */ - -/* Define this if you want to enable pax emulated trampolines */ -/* #undef FFI_MMAP_EXEC_EMUTRAMP_PAX */ - -/* Cannot use malloc on this target, so, we revert to alternative means */ -/* #undef FFI_MMAP_EXEC_WRIT */ - -/* Define this if you do not want support for the raw API. */ -/* #undef FFI_NO_RAW_API */ - -/* Define this if you do not want support for aggregate types. */ -/* #undef FFI_NO_STRUCTS */ - -/* Define to 1 if you have `alloca', as a function or macro. */ #define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define if your assembler supports .ascii. */ #ifndef _WIN64 #define HAVE_AS_ASCII_PSEUDO_OP 1 #endif - -/* Define if your assembler supports .cfi_* directives. */ -/* #undef HAVE_AS_CFI_PSEUDO_OP */ - -/* Define if your assembler supports .register. */ -/* #undef HAVE_AS_REGISTER_PSEUDO_OP */ - -/* Define if your assembler and linker support unaligned PC relative relocs. - */ -/* #undef HAVE_AS_SPARC_UA_PCREL */ - -/* Define if your assembler supports .string. */ #ifndef _WIN64 #define HAVE_AS_STRING_PSEUDO_OP 1 #endif - -/* Define if your assembler supports unwind section type. */ -/* #undef HAVE_AS_X86_64_UNWIND_SECTION_TYPE */ - -/* Define if your assembler supports PC relative relocs. */ #ifndef _WIN64 #define HAVE_AS_X86_PCREL 1 #endif - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define if __attribute__((visibility("hidden"))) is supported. */ -/* #undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE */ - -/* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 - -/* Define if you have the long double type and it is bigger than a double */ -/* #undef HAVE_LONG_DOUBLE */ - -/* Define if you support more than one size of the long double type */ -/* #undef HAVE_LONG_DOUBLE_VARIANT */ - -/* Define to 1 if you have the `memcpy' function. */ -/* #undef HAVE_MEMCPY */ - -/* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mmap' function. */ -/* #undef HAVE_MMAP */ - -/* Define if mmap with MAP_ANON(YMOUS) works. */ -/* #undef HAVE_MMAP_ANON */ - -/* Define if mmap of /dev/zero works. */ -/* #undef HAVE_MMAP_DEV_ZERO */ - -/* Define if read-only mmap of a plain file works. */ -/* #undef HAVE_MMAP_FILE */ - -/* Define if .eh_frame sections should be read-only. */ -/* #undef HAVE_RO_EH_FRAME */ - -/* 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. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_MMAN_H */ - -/* 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. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" - -/* Name of package */ #define PACKAGE "libffi" - -/* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "http://github.com/atgreen/libffi/issues" - -/* Define to the full name of this package. */ #define PACKAGE_NAME "libffi" - -/* Define to the full name and version of this package. */ #define PACKAGE_STRING "libffi 3.1" - -/* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libffi" - -/* Define to the home page for this package. */ #define PACKAGE_URL "" - -/* Define to the version of this package. */ #define PACKAGE_VERSION "3.1" - -/* The size of `double', as computed by sizeof. */ #define SIZEOF_DOUBLE 8 - -/* The size of `long double', as computed by sizeof. */ #define SIZEOF_LONG_DOUBLE 8 - -/* The size of `size_t', as computed by sizeof. */ #ifndef _WIN64 #define SIZEOF_SIZE_T 4 #else #define SIZEOF_SIZE_T 8 #endif - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 - -/* Define if symbols are underscored. */ #ifndef _WIN64 #define SYMBOL_UNDERSCORE 1 #endif - -/* Define this if you are using Purify and want to suppress spurious messages. - */ -/* #undef USING_PURIFY */ - -/* Version number of package */ #define VERSION "3.1" - -/* 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 -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - - #ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE #ifdef LIBFFI_ASM #define FFI_HIDDEN(name) .hidden name diff --git a/ports/libffi/portfile.cmake b/ports/libffi/portfile.cmake index 4240ddc54..8799e23a8 100644 --- a/ports/libffi/portfile.cmake +++ b/ports/libffi/portfile.cmake @@ -16,14 +16,16 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/export-global-data.patch) + ${CMAKE_CURRENT_LIST_DIR}/export-global-data.patch +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DFFI_CONFIG_FILE=${CMAKE_CURRENT_LIST_DIR}/fficonfig.h OPTIONS_DEBUG - -DFFI_SKIP_HEADERS=ON) + -DFFI_SKIP_HEADERS=ON +) vcpkg_install_cmake() vcpkg_copy_pdbs() @@ -32,7 +34,8 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) vcpkg_apply_patches( SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include PATCHES - ${CMAKE_CURRENT_LIST_DIR}/auto-define-static-macro.patch) + ${CMAKE_CURRENT_LIST_DIR}/auto-define-static-macro.patch + ) endif() file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libffi) -- cgit v1.2.3 From cc75f4a3d87fa36f9b9e43f58574a7d85fb887b0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 16:19:59 -0700 Subject: [gettext] Fix for OSX. Slightly improve handling on Windows. --- ports/gettext/CMakeLists.txt | 95 ++++-- ports/gettext/CONTROL | 2 +- ports/gettext/config.h | 677 --------------------------------------- ports/gettext/config.win32.h | 677 +++++++++++++++++++++++++++++++++++++++ ports/gettext/libgnuintl.h | 423 ------------------------ ports/gettext/libgnuintl.win32.h | 423 ++++++++++++++++++++++++ ports/gettext/portfile.cmake | 19 +- 7 files changed, 1173 insertions(+), 1143 deletions(-) delete mode 100644 ports/gettext/config.h create mode 100644 ports/gettext/config.win32.h delete mode 100644 ports/gettext/libgnuintl.h create mode 100644 ports/gettext/libgnuintl.win32.h diff --git a/ports/gettext/CMakeLists.txt b/ports/gettext/CMakeLists.txt index 3129b082b..7df8c33dc 100644 --- a/ports/gettext/CMakeLists.txt +++ b/ports/gettext/CMakeLists.txt @@ -1,49 +1,75 @@ cmake_minimum_required(VERSION 3.5) project(libintl C) -find_library(ICONV_LIB NAMES iconv libiconv) -find_path(ICONV_PATH iconv.h) +find_package(unofficial-iconv REQUIRED) -find_library(CHARSET_LIB NAMES charset libcharset) -find_path(CHARSET_PATH localcharset.h) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/config .) -include_directories(${CMAKE_CURRENT_BINARY_DIR} . ${ICONV_PATH} ${CHARSET_PATH}) -link_libraries(${CHARSET_LIB} ${ICONV_LIB}) +set(CMAKE_STATIC_LIBRARY_PREFIX) +set(CMAKE_SHARED_LIBRARY_PREFIX) -file(READ config.h _contents) +if(WIN32) + set(HAVE_POSIX_PRINTF 0) + set(HAVE_SNPRINTF 0) + set(HAVE_ASPRINTF 0) + set(HAVE_WPRINTF 0) + set(HAVE_NEWLOCALE 0) + + configure_file(intl/libgnuintl.win32.h config/libgnuintl.h COPYONLY) + configure_file(config.win32.h config/config.h COPYONLY) +else() + set(HAVE_POSIX_PRINTF 1) + set(HAVE_SNPRINTF 1) + set(HAVE_ASPRINTF 1) + set(HAVE_WPRINTF 1) + set(HAVE_NEWLOCALE 1) + add_definitions(-DHAVE_NEWLOCALE=1) + + configure_file(intl/libgnuintl.in.h config/libgnuintl.h @ONLY) + configure_file(config.win32.h config/config.h COPYONLY) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/config/libgnuintl.h" DESTINATION include RENAME libintl.h) +endif() + +file(READ "${CMAKE_CURRENT_BINARY_DIR}/config/config.h" _contents) if(NOT WIN32) string(REPLACE "/* #undef HAVE_STPCPY */" "#define HAVE_STPCPY 1" _contents "${_contents}") endif() -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config.h" "${_contents}") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config/config.h" "${_contents}") FILE(GLOB SOURCES -"intl/bindtextdom.c" -"intl/dcgettext.c" -"intl/dcigettext.c" -"intl/dcngettext.c" -"intl/dgettext.c" -"intl/dngettext.c" -"intl/explodename.c" -"intl/finddomain.c" -"intl/gettext.c" -"intl/hash-string.c" -"intl/intl-compat.c" -"intl/l10nflist.c" -"intl/langprefs.c" -"intl/loadmsgcat.c" -"intl/localealias.c" -"intl/localename.c" -"intl/lock.c" -"intl/log.c" -"intl/ngettext.c" -"intl/osdep.c" -"intl/plural-exp.c" -"intl/plural.c" -"intl/printf.c" -"intl/relocatable.c" -"intl/textdomain.c" -"intl/version.c" + "intl/bindtextdom.c" + "intl/dcgettext.c" + "intl/dcigettext.c" + "intl/dcngettext.c" + "intl/dgettext.c" + "intl/dngettext.c" + "intl/explodename.c" + "intl/finddomain.c" + "intl/gettext.c" + "intl/hash-string.c" + "intl/intl-compat.c" + "intl/l10nflist.c" + "intl/langprefs.c" + "intl/loadmsgcat.c" + "intl/localealias.c" + "intl/localename.c" + "intl/lock.c" + "intl/log.c" + "intl/ngettext.c" + "intl/osdep.c" + "intl/plural-exp.c" + "intl/plural.c" + "intl/printf.c" + "intl/relocatable.c" + "intl/textdomain.c" + "intl/version.c" ) +if(NOT WIN32) + list(APPEND SOURCES "intl/setlocale.c") +endif() set(LOCALDIR "c:/gettext") @@ -59,6 +85,7 @@ add_definitions("-DBUILDING_LIBINTL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIB add_definitions("-DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -D_CRT_SECURE_NO_WARNINGS") add_library(libintl ${SOURCES}) +target_link_libraries(libintl PRIVATE unofficial::iconv::libcharset unofficial::iconv::libiconv) install(TARGETS libintl RUNTIME DESTINATION bin diff --git a/ports/gettext/CONTROL b/ports/gettext/CONTROL index ccb6f5aa4..9044cd724 100644 --- a/ports/gettext/CONTROL +++ b/ports/gettext/CONTROL @@ -1,4 +1,4 @@ Source: gettext -Version: 0.19-2 +Version: 0.19-4 Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages Build-Depends: libiconv diff --git a/ports/gettext/config.h b/ports/gettext/config.h deleted file mode 100644 index bde4dfeeb..000000000 --- a/ports/gettext/config.h +++ /dev/null @@ -1,677 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -#ifndef WIN32 -# define _GL_INLINE_HEADER_BEGIN -# define _GL_INLINE_HEADER_END -# define _GL_INLINE static inline -#endif - -/* Disable function deprecated warnings */ -#define _CRT_NONSTDC_NO_WARNINGS - -/* Define to the number of bits in type 'ptrdiff_t'. */ -#define BITSIZEOF_PTRDIFF_T sizeof(ptrdiff_t) - -/* Define to the number of bits in type 'sig_atomic_t'. */ -#define BITSIZEOF_SIG_ATOMIC_T 32 - -/* Define to the number of bits in type 'size_t'. */ -#define BITSIZEOF_SIZE_T sizeof(size_t) - -/* Define to the number of bits in type 'wchar_t'. */ -#define BITSIZEOF_WCHAR_T 16 - -/* Define to the number of bits in type 'wint_t'. */ -#define BITSIZEOF_WINT_T 16 - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define if mono is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_MONO */ - -/* Define if pnet is the preferred C# implementation. */ -/* #undef CSHARP_CHOICE_PNET */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#define ENABLE_NLS 1 - -/* Define to 1 if the package shall run at any location in the filesystem. */ -/* #undef ENABLE_RELOCATABLE */ - -/* Define to 1 when using the gnulib module fwriteerror. */ -#define GNULIB_FWRITEERROR 1 - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if you have the `argz_count' function. */ -/* #undef HAVE_ARGZ_COUNT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARGZ_H */ - -/* Define to 1 if you have the `argz_next' function. */ -/* #undef HAVE_ARGZ_NEXT */ - -/* Define to 1 if you have the `argz_stringify' function. */ -/* #undef HAVE_ARGZ_STRINGIFY */ - -/* Define to 1 if you have the `asprintf' function. */ -/* #undef HAVE_ASPRINTF */ - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BP_SYM_H */ - -/* Define to 1 if the compiler understands __builtin_expect. */ -/* #undef HAVE_BUILTIN_EXPECT */ - -/* Define to 1 if you have the `canonicalize_file_name' function. */ -/* #undef HAVE_CANONICALIZE_FILE_NAME */ - -/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -/* #undef HAVE_CFLOCALECOPYCURRENT */ - -/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ - -/* Define if the GNU dcgettext() function is already present or preinstalled. - */ -/* #undef HAVE_DCGETTEXT */ - -/* Define to 1 if you have the declaration of `canonicalize_file_name', and to - 0 if you don't. */ -#define HAVE_DECL_CANONICALIZE_FILE_NAME 0 - -/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_CLEARERR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_FEOF_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FERROR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FFLUSH_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FGETS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FPUTS_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FREAD_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_FWRITE_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_GETCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_GETC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. - */ -#define HAVE_DECL_GETENV 1 - -/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if - you don't. */ -#define HAVE_DECL_PUTCHAR_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you - don't. */ -#define HAVE_DECL_PUTC_UNLOCKED 0 - -/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. - */ -#define HAVE_DECL_STRDUP 1 - -/* Define to 1 if you have the declaration of `strerror', and to 0 if you - don't. */ -/* #undef HAVE_DECL_STRERROR */ - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 0 - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - don't. */ -#define HAVE_DECL_STRNLEN 0 - -/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you - don't. */ -#define HAVE_DECL_WCWIDTH 0 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNPRINTF 1 - -/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you - don't. */ -#define HAVE_DECL__SNWPRINTF 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define if you have the declaration of environ. */ -#define HAVE_ENVIRON_DECL 1 - -/* Define to 1 if you have the `fwprintf' function. */ -#define HAVE_FWPRINTF 1 - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getegid' function. */ -/* #undef HAVE_GETEGID */ - -/* Define to 1 if you have the `geteuid' function. */ -/* #undef HAVE_GETEUID */ - -/* Define to 1 if you have the `getgid' function. */ -/* #undef HAVE_GETGID */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GETOPT_H */ - -/* Define to 1 if you have the `getopt_long_only' function. */ -/* #undef HAVE_GETOPT_LONG_ONLY */ - -/* Define to 1 if you have the `getpagesize' function. */ -/* #undef HAVE_GETPAGESIZE */ - -/* Define if the GNU gettext() function is already present or preinstalled. */ -/* #undef HAVE_GETTEXT */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define if you have the iconv() function and it works. */ -/* #undef HAVE_ICONV */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ICONV_H */ - -/* Define if your compiler supports the #include_next directive. */ -/* #undef HAVE_INCLUDE_NEXT */ - -/* Define if you have the 'intmax_t' type in or . */ -/* #undef HAVE_INTMAX_T */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -/* #undef HAVE_INTTYPES_H_WITH_UINTMAX */ - -/* Define to 1 if you have the `iswcntrl' function. */ -#define HAVE_ISWCNTRL 1 - -/* Define if you have and nl_langinfo(CODESET). */ -/* #undef HAVE_LANGINFO_CODESET */ - -/* Define if your file defines LC_MESSAGES. */ -/* #undef HAVE_LC_MESSAGES */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if the system has the type `long long int'. */ -/* #undef HAVE_LONG_LONG_INT */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACH_O_DYLD_H */ - -/* Define if the 'malloc' function is POSIX compliant. */ -/* #undef HAVE_MALLOC_POSIX */ - -/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ -/* #undef HAVE_MBRTOWC */ - -/* Define to 1 if declares mbstate_t. */ -#define HAVE_MBSTATE_T 1 - -/* Define to 1 if you have the `memchr' function. */ -#define HAVE_MEMCHR 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mempcpy' function. */ -/* #undef HAVE_MEMPCPY */ - -/* Define to 1 if you have a working `mmap' system call. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define if you have and it defines the NL_LOCALE_NAME macro if - _GNU_SOURCE is defined. */ -/* #undef HAVE_NL_LOCALE_NAME */ - -/* Define if your printf() function supports format strings with positions. */ -/* #undef HAVE_POSIX_PRINTF */ - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ - -/* Define if the POSIX multithreading library has read/write locks. */ -/* #undef HAVE_PTHREAD_RWLOCK */ - -/* Define to 1 if you have the `putenv' function. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the `readlink' function. */ -/* #undef HAVE_READLINK */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the `setenv' function. */ -/* #undef HAVE_SETENV */ - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -#define HAVE_SIGNED_SIG_ATOMIC_T 1 - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WCHAR_T */ - -/* Define to 1 if 'wint_t' is a signed integer type. */ -/* #undef HAVE_SIGNED_WINT_T */ - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define to 1 if stdbool.h conforms to C99. */ -/* #undef HAVE_STDBOOL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STDINT_H */ - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -/* #undef HAVE_STDINT_H_WITH_UINTMAX */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `stpcpy' function. */ -/* #undef HAVE_STPCPY */ - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror_r' function. */ -/* #undef HAVE_STRERROR_R */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STRINGS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_INTTYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ - -/* 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 `tsearch' function. */ -/* #undef HAVE_TSEARCH */ - -/* Define if you have the 'uintmax_t' type in or . */ -/* #undef HAVE_UINTMAX_T */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if the system has the type `unsigned long long int'. */ -/* #undef HAVE_UNSIGNED_LONG_LONG_INT */ - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the 'wchar_t' type. */ -#define HAVE_WCHAR_T 1 - -/* Define to 1 if you have the `wcslen' function. */ -#define HAVE_WCSLEN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Define to 1 if you have the `wcwidth' function. */ -/* #undef HAVE_WCWIDTH */ - -/* Define if you have the 'wint_t' type. */ -#define HAVE_WINT_T 1 - -/* Define to 1 if the system has the type `_Bool'. */ -/* #undef HAVE__BOOL */ - -/* Define to 1 if you have the `_NSGetExecutablePath' function. */ -/* #undef HAVE__NSGETEXECUTABLEPATH */ - -/* Define to 1 if you have the `__fsetlocking' function. */ -/* #undef HAVE___FSETLOCKING */ - -/* Define as const if the declaration of iconv() needs const. */ -/* #undef ICONV_CONST */ - -/* Define to a symbolic name denoting the flavor of iconv_open() - implementation. */ -/* #undef ICONV_FLAVOR */ - -/* Define to the value of ${prefix}, as a string. */ -/* #define INSTALLPREFIX "/usr/local" */ - -/* Define if integer division by zero raises signal SIGFPE. */ -#define INTDIV0_RAISES_SIGFPE 0 - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#define MALLOC_0_IS_NONNULL 1 - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#define NO_MINUS_C_MINUS_O 1 - -/* Name of package */ -#define PACKAGE "gettext-runtime" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "" - -/* Define if exists and defines unusable PRI* macros. */ -/* #undef PRI_MACROS_BROKEN */ - -/* Define if the pthread_in_use() detection is hard. */ -/* #undef PTHREAD_IN_USE_DETECTION_HARD */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -#define PTRDIFF_T_SUFFIX - -/* Define this to 1 if strerror is broken. */ -/* #undef REPLACE_STRERROR */ - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -#define SIG_ATOMIC_T_SUFFIX - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#if defined(_WIN32) -#define SIZE_MAX (((1UL << 31) - 1) * 2 + 1) -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -#define SIZE_T_SUFFIX u - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -/* #undef STRERROR_R_CHAR_P */ - -/* Define if the POSIX multithreading library can be used. */ -/* #undef USE_POSIX_THREADS */ - -/* Define if references to the POSIX multithreading library should be made - weak. */ -/* #undef USE_POSIX_THREADS_WEAK */ - -/* Define if the GNU Pth multithreading library can be used. */ -/* #undef USE_PTH_THREADS */ - -/* Define if references to the GNU Pth multithreading library should be made - weak. */ -/* #undef USE_PTH_THREADS_WEAK */ - -/* Define if the old Solaris multithreading library can be used. */ -/* #undef USE_SOLARIS_THREADS */ - -/* Define if references to the old Solaris multithreading library should be - made weak. */ -/* #undef USE_SOLARIS_THREADS_WEAK */ - -/* Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, but it is not - safe for multithreaded apps. */ -#define USE_UNLOCKED_IO 0 - -/* Define if the Win32 multithreading API can be used. */ -#define USE_WIN32_THREADS 1 - -/* Version number of package */ -#define VERSION "0.17" - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -#define WCHAR_T_SUFFIX - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wint_t'. */ -#define WINT_T_SUFFIX - -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif - -/* Define to 1 if on MINIX. */ -/* #undef _MINIX */ - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# define _ALL_SOURCE 1 -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# define _POSIX_PTHREAD_SEMANTICS 1 -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# define _TANDEM_SOURCE 1 -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# define __EXTENSIONS__ 1 -#endif - - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#define __GETOPT_PREFIX rpl_ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#define inline __inline -#endif - -/* Define to a type if does not define. */ -/* #undef mbstate_t */ - -/* Define as the type of the result of subtracting two pointers, if the system - doesn't define it. */ -/* #undef ptrdiff_t */ - -/* Define to a replacement function name for realpath(). */ -#define realpath rpl_realpath - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict -/* Work around a bug in Sun C++: it does not support _Restrict, even - though the corresponding Sun C compiler does, which causes - "#define restrict _Restrict" in the previous line. Perhaps some future - version of Sun C++ will work with _Restrict; if so, it'll probably - define __RESTRICT, just as Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -#endif - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define as a signed type of the same size as size_t. */ -#ifdef _WIN64 -#define ssize_t __int64 -#elif _WIN32 -#define ssize_t __int32 -#endif - -/* Define to rpl_strnlen if the replacement function should be used. */ -#define strnlen rpl_strnlen - -/* Define to unsigned long or unsigned long long if and - don't define. */ -#ifdef _WIN64 -#define uintmax_t unsigned __int64 -#elif _WIN32 -#define uintmax_t unsigned __int32 -#endif - -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#if 0 -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init libintl_lock_init -#define glthread_lock_lock libintl_lock_lock -#define glthread_lock_unlock libintl_lock_unlock -#define glthread_lock_destroy libintl_lock_destroy -#define glthread_rwlock_init libintl_rwlock_init -#define glthread_rwlock_rdlock libintl_rwlock_rdlock -#define glthread_rwlock_wrlock libintl_rwlock_wrlock -#define glthread_rwlock_unlock libintl_rwlock_unlock -#define glthread_rwlock_destroy libintl_rwlock_destroy -#define glthread_recursive_lock_init libintl_recursive_lock_init -#define glthread_recursive_lock_lock libintl_recursive_lock_lock -#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock -#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy -#define glthread_once libintl_once -#define glthread_once_call libintl_once_call -#define glthread_once_singlethreaded libintl_once_singlethreaded -#endif - - -/* On Windows, variables that may be in a DLL must be marked specially. */ -#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER -# define DLL_VARIABLE __declspec (dllimport) -#else -# define DLL_VARIABLE -#endif - -/* Extra OS/2 (emx+gcc) defines. */ -#ifdef __EMX__ -# include "intl/os2compat.h" -#endif - diff --git a/ports/gettext/config.win32.h b/ports/gettext/config.win32.h new file mode 100644 index 000000000..0d3c1d34e --- /dev/null +++ b/ports/gettext/config.win32.h @@ -0,0 +1,677 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +#ifndef WIN32 +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +# define _GL_INLINE static inline +#endif + +/* Disable function deprecated warnings */ +#define _CRT_NONSTDC_NO_WARNINGS + +/* Define to the number of bits in type 'ptrdiff_t'. */ +#define BITSIZEOF_PTRDIFF_T sizeof(ptrdiff_t) + +/* Define to the number of bits in type 'sig_atomic_t'. */ +#define BITSIZEOF_SIG_ATOMIC_T 32 + +/* Define to the number of bits in type 'size_t'. */ +#define BITSIZEOF_SIZE_T sizeof(size_t) + +/* Define to the number of bits in type 'wchar_t'. */ +#define BITSIZEOF_WCHAR_T 16 + +/* Define to the number of bits in type 'wint_t'. */ +#define BITSIZEOF_WINT_T 16 + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define if mono is the preferred C# implementation. */ +/* #undef CSHARP_CHOICE_MONO */ + +/* Define if pnet is the preferred C# implementation. */ +/* #undef CSHARP_CHOICE_PNET */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#define ENABLE_NLS 1 + +/* Define to 1 if the package shall run at any location in the filesystem. */ +#define ENABLE_RELOCATABLE 1 + +/* Define to 1 when using the gnulib module fwriteerror. */ +#define GNULIB_FWRITEERROR 1 + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the `argz_count' function. */ +/* #undef HAVE_ARGZ_COUNT */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ARGZ_H */ + +/* Define to 1 if you have the `argz_next' function. */ +/* #undef HAVE_ARGZ_NEXT */ + +/* Define to 1 if you have the `argz_stringify' function. */ +/* #undef HAVE_ARGZ_STRINGIFY */ + +/* Define to 1 if you have the `asprintf' function. */ +/* #undef HAVE_ASPRINTF */ + +/* Define to 1 if you have the `atexit' function. */ +#define HAVE_ATEXIT 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BP_SYM_H */ + +/* Define to 1 if the compiler understands __builtin_expect. */ +/* #undef HAVE_BUILTIN_EXPECT */ + +/* Define to 1 if you have the `canonicalize_file_name' function. */ +/* #undef HAVE_CANONICALIZE_FILE_NAME */ + +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* Define to 1 if you have the declaration of `canonicalize_file_name', and to + 0 if you don't. */ +#define HAVE_DECL_CANONICALIZE_FILE_NAME 0 + +/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_CLEARERR_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_FEOF_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FERROR_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FFLUSH_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FGETS_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FPUTC_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FPUTS_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FREAD_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FWRITE_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_GETCHAR_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_GETC_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_PUTCHAR_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_PUTC_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. + */ +#define HAVE_DECL_STRDUP 1 + +/* Define to 1 if you have the declaration of `strerror', and to 0 if you + don't. */ +/* #undef HAVE_DECL_STRERROR */ + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_R 0 + +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 0 + +/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you + don't. */ +#define HAVE_DECL_WCWIDTH 0 + +/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNPRINTF 1 + +/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNWPRINTF 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define if you have the declaration of environ. */ +#define HAVE_ENVIRON_DECL 1 + +/* Define to 1 if you have the `fwprintf' function. */ +#define HAVE_FWPRINTF 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getegid' function. */ +/* #undef HAVE_GETEGID */ + +/* Define to 1 if you have the `geteuid' function. */ +/* #undef HAVE_GETEUID */ + +/* Define to 1 if you have the `getgid' function. */ +/* #undef HAVE_GETGID */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GETOPT_H */ + +/* Define to 1 if you have the `getopt_long_only' function. */ +/* #undef HAVE_GETOPT_LONG_ONLY */ + +/* Define to 1 if you have the `getpagesize' function. */ +/* #undef HAVE_GETPAGESIZE */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if you have the `getuid' function. */ +/* #undef HAVE_GETUID */ + +/* Define if you have the iconv() function and it works. */ +/* #undef HAVE_ICONV */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ICONV_H */ + +/* Define if your compiler supports the #include_next directive. */ +/* #undef HAVE_INCLUDE_NEXT */ + +/* Define if you have the 'intmax_t' type in or . */ +/* #undef HAVE_INTMAX_T */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_INTTYPES_H */ + +/* Define if exists, doesn't clash with , and + declares uintmax_t. */ +/* #undef HAVE_INTTYPES_H_WITH_UINTMAX */ + +/* Define to 1 if you have the `iswcntrl' function. */ +#define HAVE_ISWCNTRL 1 + +/* Define if you have and nl_langinfo(CODESET). */ +/* #undef HAVE_LANGINFO_CODESET */ + +/* Define if your file defines LC_MESSAGES. */ +/* #undef HAVE_LC_MESSAGES */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if the system has the type `long long int'. */ +/* #undef HAVE_LONG_LONG_INT */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACH_O_DYLD_H */ + +/* Define if the 'malloc' function is POSIX compliant. */ +/* #undef HAVE_MALLOC_POSIX */ + +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ +/* #undef HAVE_MBRTOWC */ + +/* Define to 1 if declares mbstate_t. */ +#define HAVE_MBSTATE_T 1 + +/* Define to 1 if you have the `memchr' function. */ +#define HAVE_MEMCHR 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mempcpy' function. */ +/* #undef HAVE_MEMPCPY */ + +/* Define to 1 if you have a working `mmap' system call. */ +/* #undef HAVE_MMAP */ + +/* Define to 1 if you have the `munmap' function. */ +/* #undef HAVE_MUNMAP */ + +/* Define if you have and it defines the NL_LOCALE_NAME macro if + _GNU_SOURCE is defined. */ +/* #undef HAVE_NL_LOCALE_NAME */ + +/* Define if your printf() function supports format strings with positions. */ +/* #undef HAVE_POSIX_PRINTF */ + +/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ +/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ + +/* Define if the POSIX multithreading library has read/write locks. */ +/* #undef HAVE_PTHREAD_RWLOCK */ + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the `readlink' function. */ +/* #undef HAVE_READLINK */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SEARCH_H 1 + +/* Define to 1 if you have the `setenv' function. */ +/* #undef HAVE_SETENV */ + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ +#define HAVE_SIGNED_SIG_ATOMIC_T 1 + +/* Define to 1 if 'wchar_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WCHAR_T */ + +/* Define to 1 if 'wint_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WINT_T */ + +/* Define to 1 if you have the `snprintf' function. */ +/* #undef HAVE_SNPRINTF */ + +/* Define to 1 if stdbool.h conforms to C99. */ +/* #undef HAVE_STDBOOL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STDINT_H */ + +/* Define if exists, doesn't clash with , and declares + uintmax_t. */ +/* #undef HAVE_STDINT_H_WITH_UINTMAX */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `stpcpy' function. */ +/* #undef HAVE_STPCPY */ + +/* Define to 1 if you have the `strcasecmp' function. */ +/* #undef HAVE_STRCASECMP */ + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror_r' function. */ +/* #undef HAVE_STRERROR_R */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STRINGS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BITYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INTTYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PARAM_H */ + +/* 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 `tsearch' function. */ +/* #undef HAVE_TSEARCH */ + +/* Define if you have the 'uintmax_t' type in or . */ +/* #undef HAVE_UINTMAX_T */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNISTD_H */ + +/* Define to 1 if the system has the type `unsigned long long int'. */ +/* #undef HAVE_UNSIGNED_LONG_LONG_INT */ + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +#define HAVE_VISIBILITY 0 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you have the 'wchar_t' type. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if you have the `wcslen' function. */ +#define HAVE_WCSLEN 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + +/* Define to 1 if you have the `wcwidth' function. */ +/* #undef HAVE_WCWIDTH */ + +/* Define if you have the 'wint_t' type. */ +#define HAVE_WINT_T 1 + +/* Define to 1 if the system has the type `_Bool'. */ +/* #undef HAVE__BOOL */ + +/* Define to 1 if you have the `_NSGetExecutablePath' function. */ +/* #undef HAVE__NSGETEXECUTABLEPATH */ + +/* Define to 1 if you have the `__fsetlocking' function. */ +/* #undef HAVE___FSETLOCKING */ + +/* Define as const if the declaration of iconv() needs const. */ +/* #undef ICONV_CONST */ + +/* Define to a symbolic name denoting the flavor of iconv_open() + implementation. */ +/* #undef ICONV_FLAVOR */ + +/* Define to the value of ${prefix}, as a string. */ +/* #define INSTALLPREFIX "/usr/local" */ + +/* Define if integer division by zero raises signal SIGFPE. */ +#define INTDIV0_RAISES_SIGFPE 0 + +/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ +#define MALLOC_0_IS_NONNULL 1 + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#define NO_MINUS_C_MINUS_O 1 + +/* Name of package */ +#define PACKAGE "gettext-runtime" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" + +/* Define if exists and defines unusable PRI* macros. */ +/* #undef PRI_MACROS_BROKEN */ + +/* Define if the pthread_in_use() detection is hard. */ +/* #undef PTHREAD_IN_USE_DETECTION_HARD */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'ptrdiff_t'. */ +#define PTRDIFF_T_SUFFIX + +/* Define this to 1 if strerror is broken. */ +/* #undef REPLACE_STRERROR */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'sig_atomic_t'. */ +#define SIG_ATOMIC_T_SUFFIX + +/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#if defined(_WIN32) +#define SIZE_MAX (((1UL << 31) - 1) * 2 + 1) +#endif + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'size_t'. */ +#define SIZE_T_SUFFIX u + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if strerror_r returns char *. */ +/* #undef STRERROR_R_CHAR_P */ + +/* Define if the POSIX multithreading library can be used. */ +/* #undef USE_POSIX_THREADS */ + +/* Define if references to the POSIX multithreading library should be made + weak. */ +/* #undef USE_POSIX_THREADS_WEAK */ + +/* Define if the GNU Pth multithreading library can be used. */ +/* #undef USE_PTH_THREADS */ + +/* Define if references to the GNU Pth multithreading library should be made + weak. */ +/* #undef USE_PTH_THREADS_WEAK */ + +/* Define if the old Solaris multithreading library can be used. */ +/* #undef USE_SOLARIS_THREADS */ + +/* Define if references to the old Solaris multithreading library should be + made weak. */ +/* #undef USE_SOLARIS_THREADS_WEAK */ + +/* Define to 1 if you want getc etc. to use unlocked I/O if available. + Unlocked I/O can improve performance in unithreaded apps, but it is not + safe for multithreaded apps. */ +#define USE_UNLOCKED_IO 0 + +/* Define if the Win32 multithreading API can be used. */ +#define USE_WIN32_THREADS 1 + +/* Version number of package */ +#define VERSION "0.17" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wchar_t'. */ +#define WCHAR_T_SUFFIX + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wint_t'. */ +#define WINT_T_SUFFIX + +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Define to rpl_ if the getopt replacement functions and variables should be + used. */ +#define __GETOPT_PREFIX rpl_ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#define inline __inline +#endif + +/* Define to a type if does not define. */ +/* #undef mbstate_t */ + +/* Define as the type of the result of subtracting two pointers, if the system + doesn't define it. */ +/* #undef ptrdiff_t */ + +/* Define to a replacement function name for realpath(). */ +#define realpath rpl_realpath + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#define restrict +/* Work around a bug in Sun C++: it does not support _Restrict, even + though the corresponding Sun C compiler does, which causes + "#define restrict _Restrict" in the previous line. Perhaps some future + version of Sun C++ will work with _Restrict; if so, it'll probably + define __RESTRICT, just as Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define as a signed type of the same size as size_t. */ +#ifdef _WIN64 +#define ssize_t __int64 +#elif _WIN32 +#define ssize_t __int32 +#endif + +/* Define to rpl_strnlen if the replacement function should be used. */ +#define strnlen rpl_strnlen + +/* Define to unsigned long or unsigned long long if and + don't define. */ +#ifdef _WIN64 +#define uintmax_t unsigned __int64 +#elif _WIN32 +#define uintmax_t unsigned __int32 +#endif + +#define __libc_lock_t gl_lock_t +#define __libc_lock_define gl_lock_define +#define __libc_lock_define_initialized gl_lock_define_initialized +#define __libc_lock_init gl_lock_init +#define __libc_lock_lock gl_lock_lock +#define __libc_lock_unlock gl_lock_unlock +#define __libc_lock_recursive_t gl_recursive_lock_t +#define __libc_lock_define_recursive gl_recursive_lock_define +#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized +#define __libc_lock_init_recursive gl_recursive_lock_init +#define __libc_lock_lock_recursive gl_recursive_lock_lock +#define __libc_lock_unlock_recursive gl_recursive_lock_unlock +#if 0 +#define glthread_in_use libintl_thread_in_use +#define glthread_lock_init libintl_lock_init +#define glthread_lock_lock libintl_lock_lock +#define glthread_lock_unlock libintl_lock_unlock +#define glthread_lock_destroy libintl_lock_destroy +#define glthread_rwlock_init libintl_rwlock_init +#define glthread_rwlock_rdlock libintl_rwlock_rdlock +#define glthread_rwlock_wrlock libintl_rwlock_wrlock +#define glthread_rwlock_unlock libintl_rwlock_unlock +#define glthread_rwlock_destroy libintl_rwlock_destroy +#define glthread_recursive_lock_init libintl_recursive_lock_init +#define glthread_recursive_lock_lock libintl_recursive_lock_lock +#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock +#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy +#define glthread_once libintl_once +#define glthread_once_call libintl_once_call +#define glthread_once_singlethreaded libintl_once_singlethreaded +#endif + + +/* On Windows, variables that may be in a DLL must be marked specially. */ +#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER +# define DLL_VARIABLE __declspec (dllimport) +#else +# define DLL_VARIABLE +#endif + +/* Extra OS/2 (emx+gcc) defines. */ +#ifdef __EMX__ +# include "intl/os2compat.h" +#endif + diff --git a/ports/gettext/libgnuintl.h b/ports/gettext/libgnuintl.h deleted file mode 100644 index 440da4d59..000000000 --- a/ports/gettext/libgnuintl.h +++ /dev/null @@ -1,423 +0,0 @@ -/* Message catalogs for internationalization. -Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Library General Public License as published -by the Free Software Foundation; either version 2, or (at your option) -any later version. - -This program 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -USA. */ - -#ifndef _LIBINTL_H -#define _LIBINTL_H 1 - -#if defined(_WIN32) && defined(libintl_EXPORTS) -#define LIBINTL_DLL_EXPORTED __declspec(dllexport) -#else -#define LIBINTL_DLL_EXPORTED -#endif - -#include - -/* The LC_MESSAGES locale category is the category used by the functions -gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. -On systems that don't define it, use an arbitrary value instead. -On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) -then includes (i.e. this file!) and then only defines -LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES -in this case. */ -#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) -# define LC_MESSAGES 1729 -#endif - -/* We define an additional symbol to signal that we use the GNU -implementation of gettext. */ -#define __USE_GNU_GETTEXT 1 - -/* Provide information about the supported file formats. Returns the -maximum minor revision number supported for a given major revision. */ -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ - ((major) == 0 || (major) == 1 ? 1 : -1) - -/* Resolve a platform specific conflict on DJGPP. GNU gettext takes -precedence over _conio_gettext. */ -#ifdef __DJGPP__ -# undef gettext -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - - /* Version number: (major<<16) + (minor<<8) + subminor */ -#define LIBINTL_VERSION 0x001100 - extern LIBINTL_DLL_EXPORTED int libintl_version; - - - /* We redirect the functions to those prefixed with "libintl_". This is - necessary, because some systems define gettext/textdomain/... in the C - library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). - If we used the unprefixed names, there would be cases where the - definition in the C library would override the one in the libintl.so - shared library. Recall that on ELF systems, the symbols are looked - up in the following order: - 1. in the executable, - 2. in the shared libraries specified on the link command line, in order, - 3. in the dependencies of the shared libraries specified on the link - command line, - 4. in the dlopen()ed shared libraries, in the order in which they were - dlopen()ed. - The definition in the C library would override the one in libintl.so if - either - * -lc is given on the link command line and -lintl isn't, or - * -lc is given on the link command line before -lintl, or - * libintl.so is a dependency of a dlopen()ed shared library but not - linked to the executable at link time. - Since Solaris gettext() behaves differently than GNU gettext(), this - would be unacceptable. - - The redirection happens by default through macros in C, so that &gettext - is independent of the compilation unit, but through inline functions in - C++, in order not to interfere with the name mangling of class fields or - class methods called 'gettext'. */ - - /* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. - If he doesn't, we choose the method. A third possible method is - _INTL_REDIRECT_ASM, supported only by GCC. */ -#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) -# if __GNUC__ >= 2 && !(__APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) -# define _INTL_REDIRECT_ASM -# else -# ifdef __cplusplus -# define _INTL_REDIRECT_INLINE -# else -# define _INTL_REDIRECT_MACROS -# endif -# endif -#endif - /* Auxiliary macros. */ -#ifdef _INTL_REDIRECT_ASM -# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) -# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring -# define _INTL_STRINGIFY(prefix) #prefix -#else -# define _INTL_ASM(cname) -#endif - - /* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return - its n-th argument literally. This enables GCC to warn for example about - printf (gettext ("foo %y")). */ -#if __GNUC__ >= 3 && !(__APPLE_CC__ > 1 && defined __cplusplus) -# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) -#else -# define _INTL_MAY_RETURN_STRING_ARG(n) -#endif - - /* Look up MSGID in the current default message catalog for the current - LC_MESSAGES locale. If not found, returns MSGID itself (the default - text). */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_gettext(const char *__msgid) - _INTL_MAY_RETURN_STRING_ARG(1); - static inline char *gettext(const char *__msgid) - { - return libintl_gettext(__msgid); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define gettext libintl_gettext -#endif - extern LIBINTL_DLL_EXPORTED char *gettext(const char *__msgid) - _INTL_ASM(libintl_gettext) - _INTL_MAY_RETURN_STRING_ARG(1); -#endif - - /* Look up MSGID in the DOMAINNAME message catalog for the current - LC_MESSAGES locale. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_dgettext(const char *__domainname, const char *__msgid) - _INTL_MAY_RETURN_STRING_ARG(2); - static inline char *dgettext(const char *__domainname, const char *__msgid) - { - return libintl_dgettext(__domainname, __msgid); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define dgettext libintl_dgettext -#endif - extern LIBINTL_DLL_EXPORTED char *dgettext(const char *__domainname, const char *__msgid) - _INTL_ASM(libintl_dgettext) - _INTL_MAY_RETURN_STRING_ARG(2); -#endif - - /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY - locale. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_dcgettext(const char *__domainname, const char *__msgid, - int __category) - _INTL_MAY_RETURN_STRING_ARG(2); - static inline char *dcgettext(const char *__domainname, const char *__msgid, - int __category) - { - return libintl_dcgettext(__domainname, __msgid, __category); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define dcgettext libintl_dcgettext -#endif - extern LIBINTL_DLL_EXPORTED char *dcgettext(const char *__domainname, const char *__msgid, - int __category) - _INTL_ASM(libintl_dcgettext) - _INTL_MAY_RETURN_STRING_ARG(2); -#endif - - - /* Similar to `gettext' but select the plural form corresponding to the - number N. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_ngettext(const char *__msgid1, const char *__msgid2, - unsigned long int __n) - _INTL_MAY_RETURN_STRING_ARG(1) _INTL_MAY_RETURN_STRING_ARG(2); - static inline char *ngettext(const char *__msgid1, const char *__msgid2, - unsigned long int __n) - { - return libintl_ngettext(__msgid1, __msgid2, __n); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define ngettext libintl_ngettext -#endif - extern LIBINTL_DLL_EXPORTED char *ngettext(const char *__msgid1, const char *__msgid2, - unsigned long int __n) - _INTL_ASM(libintl_ngettext) - _INTL_MAY_RETURN_STRING_ARG(1) _INTL_MAY_RETURN_STRING_ARG(2); -#endif - - /* Similar to `dgettext' but select the plural form corresponding to the - number N. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_dngettext(const char *__domainname, const char *__msgid1, - const char *__msgid2, unsigned long int __n) - _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); - static inline char *dngettext(const char *__domainname, const char *__msgid1, - const char *__msgid2, unsigned long int __n) - { - return libintl_dngettext(__domainname, __msgid1, __msgid2, __n); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define dngettext libintl_dngettext -#endif - extern LIBINTL_DLL_EXPORTED char *dngettext(const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n) - _INTL_ASM(libintl_dngettext) - _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); -#endif - - /* Similar to `dcgettext' but select the plural form corresponding to the - number N. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_dcngettext(const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n, int __category) - _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); - static inline char *dcngettext(const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n, int __category) - { - return libintl_dcngettext(__domainname, __msgid1, __msgid2, __n, __category); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define dcngettext libintl_dcngettext -#endif - extern LIBINTL_DLL_EXPORTED char *dcngettext(const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n, int __category) - _INTL_ASM(libintl_dcngettext) - _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); -#endif - - - - /* Set the current default message catalog to DOMAINNAME. - If DOMAINNAME is null, return the current default. - If DOMAINNAME is "", reset to the default of "messages". */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_textdomain(const char *__domainname); - static inline char *textdomain(const char *__domainname) - { - return libintl_textdomain(__domainname); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define textdomain libintl_textdomain -#endif - extern LIBINTL_DLL_EXPORTED char *textdomain(const char *__domainname) - _INTL_ASM(libintl_textdomain); -#endif - - /* Specify that the DOMAINNAME message catalog will be found - in DIRNAME rather than in the system locale data base. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_bindtextdomain(const char *__domainname, - const char *__dirname); - static inline char *bindtextdomain(const char *__domainname, - const char *__dirname) - { - return libintl_bindtextdomain(__domainname, __dirname); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define bindtextdomain libintl_bindtextdomain -#endif - extern LIBINTL_DLL_EXPORTED char *bindtextdomain(const char *__domainname, const char *__dirname) - _INTL_ASM(libintl_bindtextdomain); -#endif - - /* Specify the character encoding in which the messages from the - DOMAINNAME message catalog will be returned. */ -#ifdef _INTL_REDIRECT_INLINE - extern LIBINTL_DLL_EXPORTED char *libintl_bind_textdomain_codeset(const char *__domainname, - const char *__codeset); - static inline char *bind_textdomain_codeset(const char *__domainname, - const char *__codeset) - { - return libintl_bind_textdomain_codeset(__domainname, __codeset); - } -#else -#ifdef _INTL_REDIRECT_MACROS -# define bind_textdomain_codeset libintl_bind_textdomain_codeset -#endif - extern LIBINTL_DLL_EXPORTED char *bind_textdomain_codeset(const char *__domainname, - const char *__codeset) - _INTL_ASM(libintl_bind_textdomain_codeset); -#endif - - - - /* Support for format strings with positions in *printf(), following the - POSIX/XSI specification. - Note: These replacements for the *printf() functions are visible only - in source files that #include or #include "gettext.h". - Packages that use *printf() in source files that don't refer to _() - or gettext() but for which the format string could be the return value - of _() or gettext() need to add this #include. Oh well. */ - -#if !0 - -#include -#include - - /* Get va_list. */ -#if __STDC__ || defined __cplusplus || defined _MSC_VER -# include -#else -# include -#endif - -#undef fprintf -#define fprintf libintl_fprintf - extern LIBINTL_DLL_EXPORTED int fprintf(FILE *, const char *, ...); -#undef vfprintf -#define vfprintf libintl_vfprintf - extern LIBINTL_DLL_EXPORTED int vfprintf(FILE *, const char *, va_list); - -#undef printf -#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ - /* Don't break __attribute__((format(printf,M,N))). - This redefinition is only possible because the libc in NetBSD, Cygwin, - mingw does not have a function __printf__. */ -# define libintl_printf __printf__ -#endif -#define printf libintl_printf - extern LIBINTL_DLL_EXPORTED int printf(const char *, ...); -#undef vprintf -#define vprintf libintl_vprintf - extern LIBINTL_DLL_EXPORTED int vprintf(const char *, va_list); - -#undef sprintf -#define sprintf libintl_sprintf - extern LIBINTL_DLL_EXPORTED int sprintf(char *, const char *, ...); -#undef vsprintf -#define vsprintf libintl_vsprintf - extern LIBINTL_DLL_EXPORTED int vsprintf(char *, const char *, va_list); - -#if 0 - -#undef snprintf -#define snprintf libintl_snprintf - extern LIBINTL_DLL_EXPORTED int snprintf(char *, size_t, const char *, ...); -#undef vsnprintf -#define vsnprintf libintl_vsnprintf - extern LIBINTL_DLL_EXPORTED int vsnprintf(char *, size_t, const char *, va_list); - -#endif - -#if 0 - -#undef asprintf -#define asprintf libintl_asprintf - extern LIBINTL_DLL_EXPORTED int asprintf(char **, const char *, ...); -#undef vasprintf -#define vasprintf libintl_vasprintf - extern LIBINTL_DLL_EXPORTED int vasprintf(char **, const char *, va_list); - -#endif - -#if 0 - -#undef fwprintf -#define fwprintf libintl_fwprintf - extern LIBINTL_DLL_EXPORTED int fwprintf(FILE *, const wchar_t *, ...); -#undef vfwprintf -#define vfwprintf libintl_vfwprintf - extern LIBINTL_DLL_EXPORTED int vfwprintf(FILE *, const wchar_t *, va_list); - -#undef wprintf -#define wprintf libintl_wprintf - extern LIBINTL_DLL_EXPORTED int wprintf(const wchar_t *, ...); -#undef vwprintf -#define vwprintf libintl_vwprintf - extern LIBINTL_DLL_EXPORTED int vwprintf(const wchar_t *, va_list); - -#undef swprintf -#define swprintf libintl_swprintf - extern LIBINTL_DLL_EXPORTED int swprintf(wchar_t *, size_t, const wchar_t *, ...); -#undef vswprintf -#define vswprintf libintl_vswprintf - extern LIBINTL_DLL_EXPORTED int vswprintf(wchar_t *, size_t, const wchar_t *, va_list); - -#endif - -#endif - - - /* Support for relocatable packages. */ - - /* Sets the original and the current installation prefix of the package. - Relocation simply replaces a pathname starting with the original prefix - by the corresponding pathname with the current prefix instead. Both - prefixes should be directory names without trailing slash (i.e. use "" - instead of "/"). */ -#define libintl_set_relocation_prefix libintl_set_relocation_prefix - extern LIBINTL_DLL_EXPORTED void - libintl_set_relocation_prefix(const char *orig_prefix, - const char *curr_prefix); - - -#ifdef __cplusplus -} -#endif - -#endif /* libintl.h */ \ No newline at end of file diff --git a/ports/gettext/libgnuintl.win32.h b/ports/gettext/libgnuintl.win32.h new file mode 100644 index 000000000..440da4d59 --- /dev/null +++ b/ports/gettext/libgnuintl.win32.h @@ -0,0 +1,423 @@ +/* Message catalogs for internationalization. +Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU Library General Public License as published +by the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +USA. */ + +#ifndef _LIBINTL_H +#define _LIBINTL_H 1 + +#if defined(_WIN32) && defined(libintl_EXPORTS) +#define LIBINTL_DLL_EXPORTED __declspec(dllexport) +#else +#define LIBINTL_DLL_EXPORTED +#endif + +#include + +/* The LC_MESSAGES locale category is the category used by the functions +gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. +On systems that don't define it, use an arbitrary value instead. +On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) +then includes (i.e. this file!) and then only defines +LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES +in this case. */ +#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) +# define LC_MESSAGES 1729 +#endif + +/* We define an additional symbol to signal that we use the GNU +implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +/* Provide information about the supported file formats. Returns the +maximum minor revision number supported for a given major revision. */ +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ + ((major) == 0 || (major) == 1 ? 1 : -1) + +/* Resolve a platform specific conflict on DJGPP. GNU gettext takes +precedence over _conio_gettext. */ +#ifdef __DJGPP__ +# undef gettext +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + + /* Version number: (major<<16) + (minor<<8) + subminor */ +#define LIBINTL_VERSION 0x001100 + extern LIBINTL_DLL_EXPORTED int libintl_version; + + + /* We redirect the functions to those prefixed with "libintl_". This is + necessary, because some systems define gettext/textdomain/... in the C + library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). + If we used the unprefixed names, there would be cases where the + definition in the C library would override the one in the libintl.so + shared library. Recall that on ELF systems, the symbols are looked + up in the following order: + 1. in the executable, + 2. in the shared libraries specified on the link command line, in order, + 3. in the dependencies of the shared libraries specified on the link + command line, + 4. in the dlopen()ed shared libraries, in the order in which they were + dlopen()ed. + The definition in the C library would override the one in libintl.so if + either + * -lc is given on the link command line and -lintl isn't, or + * -lc is given on the link command line before -lintl, or + * libintl.so is a dependency of a dlopen()ed shared library but not + linked to the executable at link time. + Since Solaris gettext() behaves differently than GNU gettext(), this + would be unacceptable. + + The redirection happens by default through macros in C, so that &gettext + is independent of the compilation unit, but through inline functions in + C++, in order not to interfere with the name mangling of class fields or + class methods called 'gettext'. */ + + /* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. + If he doesn't, we choose the method. A third possible method is + _INTL_REDIRECT_ASM, supported only by GCC. */ +#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) +# if __GNUC__ >= 2 && !(__APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) +# define _INTL_REDIRECT_ASM +# else +# ifdef __cplusplus +# define _INTL_REDIRECT_INLINE +# else +# define _INTL_REDIRECT_MACROS +# endif +# endif +#endif + /* Auxiliary macros. */ +#ifdef _INTL_REDIRECT_ASM +# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) +# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring +# define _INTL_STRINGIFY(prefix) #prefix +#else +# define _INTL_ASM(cname) +#endif + + /* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return + its n-th argument literally. This enables GCC to warn for example about + printf (gettext ("foo %y")). */ +#if __GNUC__ >= 3 && !(__APPLE_CC__ > 1 && defined __cplusplus) +# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) +#else +# define _INTL_MAY_RETURN_STRING_ARG(n) +#endif + + /* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_gettext(const char *__msgid) + _INTL_MAY_RETURN_STRING_ARG(1); + static inline char *gettext(const char *__msgid) + { + return libintl_gettext(__msgid); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define gettext libintl_gettext +#endif + extern LIBINTL_DLL_EXPORTED char *gettext(const char *__msgid) + _INTL_ASM(libintl_gettext) + _INTL_MAY_RETURN_STRING_ARG(1); +#endif + + /* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_dgettext(const char *__domainname, const char *__msgid) + _INTL_MAY_RETURN_STRING_ARG(2); + static inline char *dgettext(const char *__domainname, const char *__msgid) + { + return libintl_dgettext(__domainname, __msgid); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define dgettext libintl_dgettext +#endif + extern LIBINTL_DLL_EXPORTED char *dgettext(const char *__domainname, const char *__msgid) + _INTL_ASM(libintl_dgettext) + _INTL_MAY_RETURN_STRING_ARG(2); +#endif + + /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_dcgettext(const char *__domainname, const char *__msgid, + int __category) + _INTL_MAY_RETURN_STRING_ARG(2); + static inline char *dcgettext(const char *__domainname, const char *__msgid, + int __category) + { + return libintl_dcgettext(__domainname, __msgid, __category); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define dcgettext libintl_dcgettext +#endif + extern LIBINTL_DLL_EXPORTED char *dcgettext(const char *__domainname, const char *__msgid, + int __category) + _INTL_ASM(libintl_dcgettext) + _INTL_MAY_RETURN_STRING_ARG(2); +#endif + + + /* Similar to `gettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_ngettext(const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_MAY_RETURN_STRING_ARG(1) _INTL_MAY_RETURN_STRING_ARG(2); + static inline char *ngettext(const char *__msgid1, const char *__msgid2, + unsigned long int __n) + { + return libintl_ngettext(__msgid1, __msgid2, __n); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define ngettext libintl_ngettext +#endif + extern LIBINTL_DLL_EXPORTED char *ngettext(const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_ASM(libintl_ngettext) + _INTL_MAY_RETURN_STRING_ARG(1) _INTL_MAY_RETURN_STRING_ARG(2); +#endif + + /* Similar to `dgettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_dngettext(const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) + _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); + static inline char *dngettext(const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) + { + return libintl_dngettext(__domainname, __msgid1, __msgid2, __n); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define dngettext libintl_dngettext +#endif + extern LIBINTL_DLL_EXPORTED char *dngettext(const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_ASM(libintl_dngettext) + _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); +#endif + + /* Similar to `dcgettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_dcngettext(const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) + _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); + static inline char *dcngettext(const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) + { + return libintl_dcngettext(__domainname, __msgid1, __msgid2, __n, __category); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define dcngettext libintl_dcngettext +#endif + extern LIBINTL_DLL_EXPORTED char *dcngettext(const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) + _INTL_ASM(libintl_dcngettext) + _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); +#endif + + + + /* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_textdomain(const char *__domainname); + static inline char *textdomain(const char *__domainname) + { + return libintl_textdomain(__domainname); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define textdomain libintl_textdomain +#endif + extern LIBINTL_DLL_EXPORTED char *textdomain(const char *__domainname) + _INTL_ASM(libintl_textdomain); +#endif + + /* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_bindtextdomain(const char *__domainname, + const char *__dirname); + static inline char *bindtextdomain(const char *__domainname, + const char *__dirname) + { + return libintl_bindtextdomain(__domainname, __dirname); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define bindtextdomain libintl_bindtextdomain +#endif + extern LIBINTL_DLL_EXPORTED char *bindtextdomain(const char *__domainname, const char *__dirname) + _INTL_ASM(libintl_bindtextdomain); +#endif + + /* Specify the character encoding in which the messages from the + DOMAINNAME message catalog will be returned. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_bind_textdomain_codeset(const char *__domainname, + const char *__codeset); + static inline char *bind_textdomain_codeset(const char *__domainname, + const char *__codeset) + { + return libintl_bind_textdomain_codeset(__domainname, __codeset); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define bind_textdomain_codeset libintl_bind_textdomain_codeset +#endif + extern LIBINTL_DLL_EXPORTED char *bind_textdomain_codeset(const char *__domainname, + const char *__codeset) + _INTL_ASM(libintl_bind_textdomain_codeset); +#endif + + + + /* Support for format strings with positions in *printf(), following the + POSIX/XSI specification. + Note: These replacements for the *printf() functions are visible only + in source files that #include or #include "gettext.h". + Packages that use *printf() in source files that don't refer to _() + or gettext() but for which the format string could be the return value + of _() or gettext() need to add this #include. Oh well. */ + +#if !0 + +#include +#include + + /* Get va_list. */ +#if __STDC__ || defined __cplusplus || defined _MSC_VER +# include +#else +# include +#endif + +#undef fprintf +#define fprintf libintl_fprintf + extern LIBINTL_DLL_EXPORTED int fprintf(FILE *, const char *, ...); +#undef vfprintf +#define vfprintf libintl_vfprintf + extern LIBINTL_DLL_EXPORTED int vfprintf(FILE *, const char *, va_list); + +#undef printf +#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ + /* Don't break __attribute__((format(printf,M,N))). + This redefinition is only possible because the libc in NetBSD, Cygwin, + mingw does not have a function __printf__. */ +# define libintl_printf __printf__ +#endif +#define printf libintl_printf + extern LIBINTL_DLL_EXPORTED int printf(const char *, ...); +#undef vprintf +#define vprintf libintl_vprintf + extern LIBINTL_DLL_EXPORTED int vprintf(const char *, va_list); + +#undef sprintf +#define sprintf libintl_sprintf + extern LIBINTL_DLL_EXPORTED int sprintf(char *, const char *, ...); +#undef vsprintf +#define vsprintf libintl_vsprintf + extern LIBINTL_DLL_EXPORTED int vsprintf(char *, const char *, va_list); + +#if 0 + +#undef snprintf +#define snprintf libintl_snprintf + extern LIBINTL_DLL_EXPORTED int snprintf(char *, size_t, const char *, ...); +#undef vsnprintf +#define vsnprintf libintl_vsnprintf + extern LIBINTL_DLL_EXPORTED int vsnprintf(char *, size_t, const char *, va_list); + +#endif + +#if 0 + +#undef asprintf +#define asprintf libintl_asprintf + extern LIBINTL_DLL_EXPORTED int asprintf(char **, const char *, ...); +#undef vasprintf +#define vasprintf libintl_vasprintf + extern LIBINTL_DLL_EXPORTED int vasprintf(char **, const char *, va_list); + +#endif + +#if 0 + +#undef fwprintf +#define fwprintf libintl_fwprintf + extern LIBINTL_DLL_EXPORTED int fwprintf(FILE *, const wchar_t *, ...); +#undef vfwprintf +#define vfwprintf libintl_vfwprintf + extern LIBINTL_DLL_EXPORTED int vfwprintf(FILE *, const wchar_t *, va_list); + +#undef wprintf +#define wprintf libintl_wprintf + extern LIBINTL_DLL_EXPORTED int wprintf(const wchar_t *, ...); +#undef vwprintf +#define vwprintf libintl_vwprintf + extern LIBINTL_DLL_EXPORTED int vwprintf(const wchar_t *, va_list); + +#undef swprintf +#define swprintf libintl_swprintf + extern LIBINTL_DLL_EXPORTED int swprintf(wchar_t *, size_t, const wchar_t *, ...); +#undef vswprintf +#define vswprintf libintl_vswprintf + extern LIBINTL_DLL_EXPORTED int vswprintf(wchar_t *, size_t, const wchar_t *, va_list); + +#endif + +#endif + + + /* Support for relocatable packages. */ + + /* Sets the original and the current installation prefix of the package. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +#define libintl_set_relocation_prefix libintl_set_relocation_prefix + extern LIBINTL_DLL_EXPORTED void + libintl_set_relocation_prefix(const char *orig_prefix, + const char *curr_prefix); + + +#ifdef __cplusplus +} +#endif + +#endif /* libintl.h */ \ No newline at end of file diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index 33a7da3f4..cb5ea37c1 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -1,4 +1,4 @@ -if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(VCPKG_POLICY_EMPTY_PACKAGE enabled) return() endif() @@ -14,9 +14,14 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/gettext-runtime) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/libgnuintl.h DESTINATION ${SOURCE_PATH}/gettext-runtime/intl) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/gettext-runtime) +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/config.win32.h + DESTINATION ${SOURCE_PATH}/gettext-runtime +) +file(REMOVE ${SOURCE_PATH}/gettext-runtime/intl/libgnuintl.h ${SOURCE_PATH}/gettext-runtime/config.h) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/libgnuintl.win32.h DESTINATION ${SOURCE_PATH}/gettext-runtime/intl) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} @@ -27,15 +32,13 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/gettext-runtime PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) vcpkg_install_cmake() -file(COPY ${SOURCE_PATH}/gettext-runtime/intl/libgnuintl.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(RENAME ${CURRENT_PACKAGES_DIR}/include/libgnuintl.h ${CURRENT_PACKAGES_DIR}/include/libintl.h) - # Handle copyright file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gettext) file(RENAME ${CURRENT_PACKAGES_DIR}/share/gettext/COPYING ${CURRENT_PACKAGES_DIR}/share/gettext/copyright) -vcpkg_copy_pdbs() \ No newline at end of file +vcpkg_copy_pdbs() -- cgit v1.2.3 From 79a526a3753553fd9b1f874ada7688b2fb8396a4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 16:21:39 -0700 Subject: [glib][glibmm] Fix for non-windows. For glibmm, use CMake replacement buildsystem. --- ports/glib/CMakeLists.txt | 220 ++- ports/glib/CONTROL | 2 +- ports/glib/cmake/install_headers.cmake | 5 +- ports/glib/portfile.cmake | 16 +- ports/glibmm/CMakeLists.txt | 121 ++ ports/glibmm/CONTROL | 2 +- ports/glibmm/COPYING | 514 ------ ports/glibmm/README | 4 - ports/glibmm/fix_charset.patch | 2702 -------------------------------- ports/glibmm/fix_properties.patch | 1721 -------------------- ports/glibmm/glibmm-api-variant.patch | 84 + ports/glibmm/portfile.cmake | 89 +- 12 files changed, 412 insertions(+), 5068 deletions(-) create mode 100644 ports/glibmm/CMakeLists.txt delete mode 100644 ports/glibmm/COPYING delete mode 100644 ports/glibmm/README delete mode 100644 ports/glibmm/fix_charset.patch delete mode 100644 ports/glibmm/fix_properties.patch create mode 100644 ports/glibmm/glibmm-api-variant.patch diff --git a/ports/glib/CMakeLists.txt b/ports/glib/CMakeLists.txt index 25218a7f8..3743b0a34 100644 --- a/ports/glib/CMakeLists.txt +++ b/ports/glib/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required(VERSION 3.0) project(glib C) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_C_STANDARD 11) + set(GLIB_DLL_SUFFIX 2) set(GLIB_LIB_SUFFIX 2.0) @@ -9,7 +12,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug) endif() if(BUILD_SHARED_LIBS) - set(GLIB_EXPORT_MACRO DLL_EXPORT) + add_definitions(-DDLL_EXPORT) endif() set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) @@ -23,27 +26,70 @@ find_path(PCRE_INCLUDE_DIR pcre.h) if(CMAKE_BUILD_TYPE STREQUAL Debug) set(PCRE_SUFFIX d) endif() -find_library(PCRE_LIBRARY pcre${PCRE_SUFFIX}) -# libiconv -find_path(ICONV_INCLUDE_DIR iconv.h) -find_library(ICONV_LIBRARY NAMES iconv libiconv) +find_library(PCRE_LIBRARY NAMES pcre${PCRE_SUFFIX} pcre) # libiconv -find_library(CHARSET_LIBRARY NAMES charset libcharset) +find_package(unofficial-iconv REQUIRED) # libffi find_path(FFI_INCLUDE_DIR ffi.h) find_library(FFI_LIBRARY NAMES ffi libffi) -# libintl(gettext) -find_path(LIBINTL_INCLUDE_DIR libintl.h) -find_library(LIBINTL_LIBRARY NAMES intl libintl) +get_filename_component(LIB_DIR "${FFI_LIBRARY}" DIRECTORY) +if(APPLE) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) + find_library(FOUNDATION_LIBRARY Foundation) + find_library(CORESERVICES_LIBRARY CoreServices) + link_libraries(${CORESERVICES_LIBRARY} ${COREFOUNDATION_LIBRARY} ${FOUNDATION_LIBRARY}) +endif() + +if(WIN32 OR APPLE) + # libintl(gettext) + find_path(LIBINTL_INCLUDE_DIR libintl.h) + find_library(LIBINTL_LIBRARY NAMES intl libintl) +else() + set(LIBINTL_INCLUDE_DIR) + set(LIBINTL_LIBRARY) +endif() + +if(WIN32) + set(LIBRESOLV_LIBRARY) +else() + find_library(LIBRESOLV_LIBRARY NAMES resolv libresolv) +endif() #prepare config files -configure_file(config.h.win32 ${CMAKE_SOURCE_DIR}/config.h COPYONLY) -configure_file(glib/glibconfig.h.win32 ${CMAKE_SOURCE_DIR}/glib/glibconfig.h COPYONLY) -configure_file(gmodule/gmoduleconf.h.win32 ${CMAKE_SOURCE_DIR}/gmodule/gmoduleconf.h COPYONLY) -configure_file(gio/gnetworking.h.win32 ${CMAKE_SOURCE_DIR}/gio/gnetworking.h COPYONLY) -add_definitions(-DHAVE_CONFIG_H) +if(WIN32) + configure_file(config.h.win32 ${CMAKE_BINARY_DIR}/config/config.h COPYONLY) + configure_file(glib/glibconfig.h.win32 ${CMAKE_BINARY_DIR}/config/glib/glibconfig.h COPYONLY) + configure_file(gmodule/gmoduleconf.h.win32 ${CMAKE_BINARY_DIR}/config/gmodule/gmoduleconf.h COPYONLY) + configure_file(gio/gnetworking.h.win32 ${CMAKE_BINARY_DIR}/config/gio/gnetworking.h COPYONLY) + add_definitions(-DHAVE_CONFIG_H) +else() + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/config) + set(ENV{LIBFFI_LIBS} "${FFI_LIBRARY}") + set(ENV{PCRE_LIBS} "${PCRE_LIBRARY}") + set(ENV{LIBFFI_CFLAGS} "-I${FFI_INCLUDE_DIR}") + set(ENV{PCRE_CFLAGS} "-I${PCRE_INCLUDE_DIR}") + set(ENV{MSGFMT} "/bin/echo") + set(ENV{GMSGFMT} "/bin/echo") + if(NOT EXISTS "${CMAKE_BINARY_DIR}/config/config.h") + execute_process( + COMMAND "${CMAKE_SOURCE_DIR}/configure" + --disable-libelf + --disable-libmount + "CPPFLAGS=-I${PCRE_INCLUDE_DIR}" + "CFLAGS=-I${PCRE_INCLUDE_DIR}" + "LDFLAGS=-L${LIB_DIR}" + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/config + RESULT_VARIABLE res + ) + if(NOT res EQUAL 0) + message(FATAL_ERROR "Configure failed.") + endif() + endif() + add_definitions("-DGIO_MODULE_DIR=\"gio/modules\"") +endif() -include_directories(. ./glib) +include_directories(${CMAKE_BINARY_DIR}/config ${CMAKE_BINARY_DIR}/config/glib ${CMAKE_BINARY_DIR}/config/gio ${CMAKE_BINARY_DIR}/config/gmodule) +include_directories(. glib) # This macro purposely doesn't find nodes with sources that have additional properties set # Most of such files in glib are PCRE sources which we don't use anyway @@ -64,60 +110,155 @@ endmacro() # main module extract_vcproj_sources(win32/vs14/glib.vcxproj GLIB_SOURCES) list(APPEND GLIB_SOURCES glib/libcharset/localcharset.c) # modified internal version with prefixed symbols +if(NOT WIN32) + list(FILTER GLIB_SOURCES EXCLUDE REGEX "win32.c\$|win32-helper.c\$") + list(APPEND GLIB_SOURCES "glib/gthread-posix.c" "glib/giounix.c" "glib/gspawn.c" "glib/glib-unix.c") +endif() add_library(glib ${GLIB_SOURCES}) -target_compile_definitions(glib PRIVATE USE_SYSTEM_PCRE ${GLIB_EXPORT_MACRO} GLIB_COMPILATION G_LOG_DOMAIN="GLib" LIBDIR) -target_link_libraries(glib ws2_32 winmm ${PCRE_LIBRARY} ${ICONV_LIBRARY} ${CHARSET_LIBRARY} ${LIBINTL_LIBRARY}) +target_compile_definitions(glib PRIVATE GLIB_COMPILATION G_LOG_DOMAIN="GLib" LIBDIR="") +target_link_libraries(glib PRIVATE ${PCRE_LIBRARY} unofficial::iconv::libiconv unofficial::iconv::libcharset ${LIBINTL_LIBRARY}) +if(WIN32) + target_compile_definitions(glib PRIVATE USE_SYSTEM_PCRE) + target_link_libraries(glib PRIVATE ws2_32 winmm) +else() + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + target_link_libraries(glib PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) +endif() target_include_directories(glib PRIVATE ${PCRE_INCLUDE_DIR} ${ICONV_INCLUDE_DIR}) -target_include_directories(glib PUBLIC ${LIBINTL_INCLUDE_DIR}) +target_include_directories(glib PUBLIC ${LIBINTL_INCLUDE_DIR}) list(APPEND GLIB_TARGETS glib) +if(NOT GLIB_SKIP_HEADERS) + install(FILES glib/glib.h glib/glib-object.h ${CMAKE_BINARY_DIR}/config/glib/glibconfig.h DESTINATION include) + + file(GLOB GLIB_HEADERS glib/*.h) + list(FILTER GLIB_HEADERS EXCLUDE REGEX "/glib.h\$|/glib-object.h\$|private.h\$") + install(FILES ${GLIB_HEADERS} DESTINATION include/glib) + + file(GLOB GLIB_DEP_HEADERS glib/deprecated/*.h) + install(FILES ${GLIB_DEP_HEADERS} DESTINATION include/glib/deprecated) +endif() # gthread add_library(gthread gthread/gthread-impl.c) target_compile_definitions(gthread PRIVATE G_LOG_DOMAIN="GThread") -target_link_libraries(gthread glib ${LIBINTL_LIBRARY}) +target_link_libraries(gthread PRIVATE glib ${LIBINTL_LIBRARY}) target_include_directories(gthread PRIVATE ${LIBINTL_INCLUDE_DIR}) list(APPEND GLIB_TARGETS gthread) # gobject extract_vcproj_sources(win32/vs14/gobject.vcxproj GOBJECT_SOURCES) add_library(gobject ${GOBJECT_SOURCES}) -target_compile_definitions(gobject PRIVATE GOBJECT_COMPILATION ${GLIB_EXPORT_MACRO} G_LOG_DOMAIN="GLib-GObject") -target_link_libraries(gobject gthread glib ${FFI_LIBRARY}) +target_compile_definitions(gobject PRIVATE GOBJECT_COMPILATION G_LOG_DOMAIN="GLib-GObject") +target_link_libraries(gobject PRIVATE gthread glib ${FFI_LIBRARY}) target_include_directories(gobject PRIVATE ${FFI_INCLUDE_DIR}) list(APPEND GLIB_TARGETS gobject) +if(NOT GLIB_SKIP_HEADERS) + file(GLOB GOBJECT_HEADERS gobject/*.h gobject/gobjectnotifyqueue.c) + list(FILTER GOBJECT_HEADERS EXCLUDE REGEX "private.h\$") + install(FILES ${GOBJECT_HEADERS} DESTINATION include/gobject) +endif() # gmodule add_library(gmodule gmodule/gmodule.c) target_compile_definitions(gmodule PRIVATE G_LOG_DOMAIN="GModule") -target_link_libraries(gmodule glib ${LIBINTL_LIBRARY}) +target_link_libraries(gmodule PRIVATE glib ${LIBINTL_LIBRARY}) +target_include_directories(gmodule PUBLIC $) target_include_directories(gmodule PRIVATE ${LIBINTL_INCLUDE_DIR}) list(APPEND GLIB_TARGETS gmodule) +if(NOT GLIB_SKIP_HEADERS) + install(FILES gmodule/gmodule.h DESTINATION include) +endif() + +# gio subdirs +if(NOT WIN32) + file(GLOB XDGMIME_SOURCES gio/xdgmime/*.c) + add_library(xdgmime ${XDGMIME_SOURCES}) + target_compile_definitions(xdgmime PRIVATE -DXDG_PREFIX=_gio_xdg) + list(APPEND GLIB_TARGETS xdgmime) +endif() + +if(NOT WIN32 AND NOT APPLE) + file(GLOB INOTIFY_SOURCES gio/inotify/*.c) + add_library(inotify ${INOTIFY_SOURCES}) + target_link_libraries(inotify PRIVATE gmodule) + target_compile_definitions(inotify PRIVATE -DG_LOG_DOMAIN=\"GLib-GIO\" -DGIO_COMPILATION -DG_DISABLE_DEPRECATED) + list(APPEND GLIB_TARGETS inotify) +endif() + +if(APPLE) + file(GLOB KQUEUE_SOURCES gio/kqueue/*.c) + add_library(kqueue ${KQUEUE_SOURCES}) + target_link_libraries(kqueue PRIVATE gmodule) + target_compile_definitions(kqueue PRIVATE -DG_LOG_DOMAIN=\"GLib-GIO\" -DGIO_COMPILATION -DG_DISABLE_DEPRECATED) + list(APPEND GLIB_TARGETS kqueue) +endif() # gio extract_vcproj_sources(win32/vs14/gio.vcxproj GIO_SOURCES) +if(NOT WIN32) + file(GLOB GIO_UNIX_SOURCES "gio/gunix*.c" "gio/g*notificationbackend.c" "gio/g*portal*.c") + list(APPEND GIO_SOURCES ${GIO_UNIX_SOURCES}) + list(APPEND GIO_SOURCES + "gio/gcontenttype.c" + "gio/gfiledescriptorbased.c" + "gio/gnetworkmonitornm.c" + "gio/xdp-dbus.c" + ) + list(FILTER GIO_SOURCES EXCLUDE REGEX "/gwin32[^/]+\$|win32/[^/]+\$|win32.c\$|gregistrysettingsbackend.c\$") + if(APPLE) + set_property(SOURCE + gio/gcocoanotificationbackend.c + gio/gosxappinfo.c + gio/gnextstepsettingsbackend.c + PROPERTY COMPILE_FLAGS "-x objective-c") + list(APPEND GIO_SOURCES + "gio/gnextstepsettingsbackend.c" + "gio/gosxappinfo.c" + ) + else() + list(APPEND GIO_SOURCES + "gio/gnetworkmonitornetlink.c" + "gio/gdesktopappinfo.c" + ) + list(FILTER GIO_SOURCES EXCLUDE REGEX "gcocoanotificationbackend.c\$") + endif() +endif() +if(NOT GLIB_SKIP_HEADERS) + file(GLOB GIO_HEADERS gio/*.h) + list(FILTER GIO_HEADERS EXCLUDE REGEX "private.h\$") + install(FILES ${GIO_HEADERS} ${CMAKE_BINARY_DIR}/config/gio/gnetworking.h DESTINATION include/gio) +endif() add_library(gio ${GIO_SOURCES}) -target_compile_definitions(gio PRIVATE GIO_COMPILATION ${GLIB_EXPORT_MACRO} G_LOG_DOMAIN="GLib-GIO") -target_link_libraries(gio glib gmodule gobject ws2_32 shlwapi dnsapi iphlpapi ${ZLIB_LIBRARIES}) -target_include_directories(gio PRIVATE ./gio ./gmodule ${ZLIB_INCLUDE_DIRS}) +target_compile_definitions(gio PRIVATE GIO_COMPILATION G_LOG_DOMAIN="GLib-GIO") +target_link_libraries(gio PRIVATE glib gmodule gobject ZLIB::ZLIB ${LIBRESOLV_LIBRARY} ${LIBINTL_LIBRARY}) +target_include_directories(gio PUBLIC $) +if(WIN32) + target_link_libraries(gio PRIVATE ws2_32 shlwapi dnsapi iphlpapi) +elseif(APPLE) + target_link_libraries(gio PRIVATE xdgmime kqueue) +else() + target_link_libraries(gio PRIVATE xdgmime inotify) +endif() list(APPEND GLIB_TARGETS gio) foreach(GTARGET ${GLIB_TARGETS}) - set_target_properties(${GTARGET} PROPERTIES + set_target_properties(${GTARGET} PROPERTIES OUTPUT_NAME ${GTARGET}-${GLIB_DLL_SUFFIX} ARCHIVE_OUTPUT_NAME ${GTARGET}-${GLIB_LIB_SUFFIX}) endforeach() macro(add_glib_tool TOOL_NAME) add_executable(${TOOL_NAME} ${ARGN}) - target_link_libraries(${TOOL_NAME} glib) + target_link_libraries(${TOOL_NAME} glib ${LIBINTL_LIBRARY}) target_compile_definitions(${TOOL_NAME} PRIVATE GLIB_COMPILATION) list(APPEND GLIB_TOOLS ${TOOL_NAME}) endmacro() macro(add_gio_tool TOOL_NAME) add_executable(${TOOL_NAME} ${ARGN}) - target_link_libraries(${TOOL_NAME} glib gio gobject gmodule) - target_include_directories(${TOOL_NAME} PRIVATE ./gmodule ./gio) + target_link_libraries(${TOOL_NAME} PRIVATE glib gio gobject gmodule ${LIBINTL_LIBRARY}) + target_include_directories(${TOOL_NAME} PRIVATE gmodule gio) target_compile_definitions(${TOOL_NAME} PRIVATE GIO_COMPILATION) list(APPEND GLIB_TOOLS ${TOOL_NAME}) endmacro() @@ -125,22 +266,22 @@ endmacro() if(NOT GLIB_SKIP_TOOLS) configure_file(gobject/glib-mkenums.in ${CMAKE_SOURCE_DIR}/gobject/glib-mkenums @ONLY) # uses GLIB_VERSION install(FILES gobject/glib-mkenums DESTINATION tools/glib) - + configure_file(gio/gdbus-2.0/codegen/gdbus-codegen.in ${CMAKE_SOURCE_DIR}/gio/gdbus-2.0/codegen/gdbus-codegen COPYONLY) install(FILES gio/gdbus-2.0/codegen/gdbus-codegen DESTINATION tools/glib) file(GLOB CODEGEN_SOURCES gio/gdbus-2.0/codegen/*.py) install(FILES ${CODEGEN_SOURCES} DESTINATION tools/glib/codegen) - - add_gio_tool(gdbus gio/gdbus-tool.c) + + add_gio_tool(gdbus gio/gdbus-tool.c) add_gio_tool(gio-querymodules gio/gio-querymodules.c) file(GLOB GIO_TOOL_SOURCES gio/gio-tool*.c) add_gio_tool(gio-tool ${GIO_TOOL_SOURCES}) set_target_properties(gio-tool PROPERTIES OUTPUT_NAME gio) add_gio_tool(glib-compile-resources gio/glib-compile-resources.c gio/gvdb/gvdb-builder.c) - add_gio_tool(glib-compile-schemas gio/glib-compile-schemas.c gio/gvdb/gvdb-builder.c) + add_gio_tool(glib-compile-schemas gio/glib-compile-schemas.c gio/gvdb/gvdb-builder.c) add_gio_tool(gresource gio/gresource-tool.c) add_gio_tool(gsettings gio/gsettings-tool.c) - + if(CMAKE_SIZEOF_VOID_P EQUAL 4) set(WIN win32) else() @@ -148,16 +289,15 @@ if(NOT GLIB_SKIP_TOOLS) endif() add_glib_tool(glib-genmarshal gobject/glib-genmarshal.c) - add_glib_tool(gspawn-${WIN}-helper WIN32 glib/gspawn-win32-helper.c) - add_glib_tool(gspawn-${WIN}-helper-console glib/gspawn-win32-helper-console.c) - + if(WIN32) + add_glib_tool(gspawn-${WIN}-helper WIN32 glib/gspawn-win32-helper.c) + add_glib_tool(gspawn-${WIN}-helper-console glib/gspawn-win32-helper-console.c) + endif() + install(TARGETS ${GLIB_TOOLS} RUNTIME DESTINATION tools/glib) endif() install(TARGETS ${GLIB_TARGETS} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) -if(NOT GLIB_SKIP_HEADERS) - include(install_headers) -endif() message(STATUS "Link-time dependencies:") message(STATUS " " ${ZLIB_LIBRARIES}) diff --git a/ports/glib/CONTROL b/ports/glib/CONTROL index 4f06e4e2e..f37b794cb 100644 --- a/ports/glib/CONTROL +++ b/ports/glib/CONTROL @@ -1,4 +1,4 @@ Source: glib -Version: 2.52.3-2 +Version: 2.52.3-9 Description: Portable, general-purpose utility library. Build-Depends: zlib, pcre, libffi, gettext, libiconv diff --git a/ports/glib/cmake/install_headers.cmake b/ports/glib/cmake/install_headers.cmake index 0cfc207a4..7840f34ab 100644 --- a/ports/glib/cmake/install_headers.cmake +++ b/ports/glib/cmake/install_headers.cmake @@ -1,7 +1,6 @@ # generated from glib-install.props install(FILES glib/glib.h DESTINATION include) -install(FILES glib/glibconfig.h DESTINATION include) -install(FILES glib/glib.h DESTINATION include) +install(FILES ${CMAKE_BINARY_DIR}/config/glib/glibconfig.h DESTINATION include) install(FILES glib/glib-object.h DESTINATION include) install(FILES glib/deprecated/gallocator.h DESTINATION include/glib/deprecated) install(FILES glib/deprecated/gcache.h DESTINATION include/glib/deprecated) @@ -251,6 +250,6 @@ install(FILES gio/gdbusobjectmanagerclient.h DESTINATION include/gio) install(FILES gio/gdbusobjectmanagerserver.h DESTINATION include/gio) install(FILES gio/gtestdbus.h DESTINATION include/gio) install(FILES gio/gioenumtypes.h DESTINATION include/gio) -install(FILES gio/gnetworking.h DESTINATION include/gio) +install(FILES ${CMAKE_BINARY_DIR}/config/gio/gnetworking.h DESTINATION include/gio) install(FILES gio/gwin32inputstream.h DESTINATION include/gio) install(FILES gio/gwin32outputstream.h DESTINATION include/gio) diff --git a/ports/glib/portfile.cmake b/ports/glib/portfile.cmake index 9618b6686..a500cbd24 100644 --- a/ports/glib/portfile.cmake +++ b/ports/glib/portfile.cmake @@ -3,9 +3,15 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "Error: UWP builds are currently not supported.") endif() -# Glib relies on DllMain -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_CRT_LINKAGE STREQUAL "static") - message(FATAL_ERROR "Glib only supports dynamic library and crt linkage") +# Glib relies on DllMain on Windows +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message("Glib relies on DllMain and therefore cannot be built statically") + set(VCPKG_LIBRARY_LINKAGE "dynamic") + endif() + if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Glib only supports dynamic library and crt linkage") + endif() endif() include(vcpkg_common_functions) @@ -25,6 +31,7 @@ vcpkg_apply_patches( file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH}) file(REMOVE_RECURSE ${SOURCE_PATH}/glib/pcre) +file(WRITE ${SOURCE_PATH}/glib/pcre/Makefile.in) file(REMOVE ${SOURCE_PATH}/glib/win_iconv.c) vcpkg_configure_cmake( @@ -34,7 +41,8 @@ vcpkg_configure_cmake( -DGLIB_VERSION=${GLIB_VERSION} OPTIONS_DEBUG -DGLIB_SKIP_HEADERS=ON - -DGLIB_SKIP_TOOLS=ON) + -DGLIB_SKIP_TOOLS=ON + ) vcpkg_install_cmake() vcpkg_copy_pdbs() diff --git a/ports/glibmm/CMakeLists.txt b/ports/glibmm/CMakeLists.txt new file mode 100644 index 000000000..9f0165786 --- /dev/null +++ b/ports/glibmm/CMakeLists.txt @@ -0,0 +1,121 @@ +cmake_minimum_required(VERSION 3.9) +project(glibmm) + +set(CMAKE_CXX_STANDARD 17) + +find_path(GLIB_INCLUDE_DIR NAMES glib.h) +find_library(GLIB_LIBRARY NAMES glib-2.0) +find_library(GIO_LIBRARY NAMES gio-2.0) +find_library(GOBJECT_LIBRARY NAMES gobject-2.0) +find_library(GMODULE_LIBRARY NAMES gmodule-2.0) +find_library(GTHREAD_LIBRARY NAMES gthread-2.0) +find_program(GLIB_COMPILE_SCHEMAS NAMES glib-compile-schemas) +find_library(PCRE_LIBRARY NAMES pcre) +find_library(SIGC_LIBRARY NAMES sigc-2.0) +find_library(FFI_LIBRARY NAMES ffi libffi) + +include_directories(${GLIB_INCLUDE_DIR}) +link_libraries( + ${GIO_LIBRARY} + ${GOBJECT_LIBRARY} + ${GMODULE_LIBRARY} + ${GTHREAD_LIBRARY} + ${GLIB_LIBRARY} + ${PCRE_LIBRARY} + ${SIGC_LIBRARY} + ${FFI_LIBRARY} +) + +if(APPLE) + find_library(LIBINTL_LIBRARY NAMES intl) +endif() + +find_package(unofficial-iconv REQUIRED) +link_libraries(${LIBINTL_LIBRARY} unofficial::iconv::libiconv) + +if(APPLE) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) + find_library(CORESERVICES_LIBRARY CoreServices) + find_library(FOUNDATION_LIBRARY Foundation) + link_libraries(${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${FOUNDATION_LIBRARY}) +endif() + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + +if(BUILD_SHARED_LIBS) + add_definitions(-DGLIBMM_DLL -DGIOMM_DLL) +else() + add_definitions(-DGLIBMM_STATIC_LIB -DGIOMM_STATIC_LIB) +endif() + +if(WIN32) + add_compile_options(/FI${WARNINGS_HEADER} -DSIZEOF_WCHAR_T=2) +else() + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + link_libraries(Threads::Threads ${CMAKE_DL_LIBS}) +endif() + +if(WIN32) + configure_file(MSVC_Net2013/giomm/giommconfig.h ${CMAKE_BINARY_DIR}/config/gio/giommconfig.h COPYONLY) + configure_file(MSVC_Net2013/glibmm/glibmmconfig.h ${CMAKE_BINARY_DIR}/config/glib/glibmmconfig.h COPYONLY) +else() + set(ENV{GLIB_COMPILE_SCHEMAS} "${GLIB_COMPILE_SCHEMAS}") + set(ENV{GLIBMM_CFLAGS} -I${GLIB_INCLUDE_DIR}) + set(ENV{GLIBMM_LIBS} "${GLIB_LIBRARY}") + set(ENV{GIOMM_CFLAGS} -I${GLIB_INCLUDE_DIR}) + set(ENV{GIOMM_LIBS} "${GIO_LIBRARY}") + set(ENV{PKG_CONFIG} "echo") + + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/config) + execute_process( + COMMAND "${CMAKE_SOURCE_DIR}/configure" + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/config + RESULT_VARIABLE res + ) + if(NOT res EQUAL 0) + message(FATAL_ERROR "Configure failed.") + endif() +endif() + +file(GLOB GLIBMM_SOURCES glib/glibmm/*.cc) +add_library(glibmm ${GLIBMM_SOURCES}) +target_compile_definitions(glibmm PRIVATE -DGLIBMM_BUILD) +target_include_directories(glibmm PUBLIC glib ${CMAKE_BINARY_DIR}/config/glib) + +file(GLOB GIOMM_SOURCES gio/giomm/*.cc) +if(WIN32) + list(FILTER GIOMM_SOURCES EXCLUDE REGEX "desktopappinfo.cc\$|/unix[^/]+.cc\$") +endif() +add_library(giomm ${GIOMM_SOURCES}) +target_compile_definitions(giomm PRIVATE -DGIOMM_BUILD) +target_link_libraries(giomm PUBLIC glibmm) +target_include_directories(giomm PUBLIC gio ${CMAKE_BINARY_DIR}/config/gio) + +install( + TARGETS glibmm giomm + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES + ${CMAKE_BINARY_DIR}/config/gio/giommconfig.h + gio/giomm.h + ${CMAKE_BINARY_DIR}/config/glib/glibmmconfig.h + glib/glibmm.h + DESTINATION include + ) + install( + DIRECTORY gio/giomm glib/glibmm + DESTINATION include + FILES_MATCHING PATTERN *.h + ) +endif() + +if(NOT DISABLE_EXAMPLES) + add_executable(options examples/options/main.cc) + target_link_libraries(options PRIVATE giomm) +endif() diff --git a/ports/glibmm/CONTROL b/ports/glibmm/CONTROL index 52a4e0e05..a7ccbe937 100644 --- a/ports/glibmm/CONTROL +++ b/ports/glibmm/CONTROL @@ -1,4 +1,4 @@ Source: glibmm -Version: 2.52.1 +Version: 2.52.1-7 Description: This is glibmm, a C++ API for parts of glib that are useful for C++. See http://www.gtkmm.org. Build-Depends: zlib, pcre, libffi, gettext, libiconv, glib, libsigcpp diff --git a/ports/glibmm/COPYING b/ports/glibmm/COPYING deleted file mode 100644 index 5e1f37e13..000000000 --- a/ports/glibmm/COPYING +++ /dev/null @@ -1,514 +0,0 @@ - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations -below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. -^L - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. -^L - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control -compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. -^L - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. -^L - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. -^L - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. -^L - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply, and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License -may add an explicit geographical distribution limitation excluding those -countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. -^L - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS -^L - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms -of the ordinary General Public License). - - To apply these terms, attach the following notices to the library. -It is safest to attach them to the start of each source file to most -effectively convey the exclusion of warranty; and each file should -have at least the "copyright" line and a pointer to where the full -notice is found. - - - - Copyright (C) - - 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper -mail. - -You should also get your employer (if you work as a programmer) or -your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James -Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/ports/glibmm/README b/ports/glibmm/README deleted file mode 100644 index 341c67e43..000000000 --- a/ports/glibmm/README +++ /dev/null @@ -1,4 +0,0 @@ -This is glibmm, a C++ API for parts of glib that are useful for C++. -See http://www.gtkmm.org - - diff --git a/ports/glibmm/fix_charset.patch b/ports/glibmm/fix_charset.patch deleted file mode 100644 index 8831fc946..000000000 --- a/ports/glibmm/fix_charset.patch +++ /dev/null @@ -1,2702 +0,0 @@ -diff --git a/MSVC_Net2013/compose.vcxproj b/MSVC_Net2013/compose.vcxproj -index 4775af3..72a7054 100644 ---- a/MSVC_Net2013/compose.vcxproj -+++ b/MSVC_Net2013/compose.vcxproj -@@ -23,26 +23,27 @@ - {D1C74410-023C-48DE-B636-E8B6D177C306} - compose - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -189,4 +190,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/dispatcher.vcxproj b/MSVC_Net2013/dispatcher.vcxproj -index 6c403c0..90d254a 100644 ---- a/MSVC_Net2013/dispatcher.vcxproj -+++ b/MSVC_Net2013/dispatcher.vcxproj -@@ -23,26 +23,27 @@ - {129ECC08-6D30-4884-B824-4AF96EF0A45C} - dispatcher - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -189,4 +190,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/dispatcher2.vcxproj b/MSVC_Net2013/dispatcher2.vcxproj -index db6a5fd..9cf6b57 100644 ---- a/MSVC_Net2013/dispatcher2.vcxproj -+++ b/MSVC_Net2013/dispatcher2.vcxproj -@@ -22,26 +22,27 @@ - dispatcher2 - {18A82706-B645-4DF5-AB09-06B90128BAC5} - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -188,4 +189,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj -index 8894039..0b2cb08 100644 ---- a/MSVC_Net2013/gendef.vcxproj -+++ b/MSVC_Net2013/gendef.vcxproj -@@ -1,168 +1,169 @@ --??? -- -- -- -- Debug -- Win32 -- -- -- Debug -- x64 -- -- -- Release -- Win32 -- -- -- Release -- x64 -- -- -- -- {07324745-C9BE-4D65-B08A-9C88188C0C28} -- Win32Proj -- -- -- -- Application -- MultiByte -- v120 -- -- -- Application -- MultiByte -- v120 -- -- -- Application -- MultiByte -- v120 -- -- -- Application -- MultiByte -- v120 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- true -- true -- false -- true -- true -- true -- false -- true -- -- -- -- Disabled -- _DEBUG;%(PreprocessorDefinitions) -- true -- EnableFastChecks -- MultiThreadedDebug -- Level3 -- EditAndContinue -- -- -- true -- $(OutDir)\$(TargetName).pdb -- Console -- false -- -- -- MachineX86 -+??? -+ -+ -+ -+ Debug -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release -+ Win32 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ {07324745-C9BE-4D65-B08A-9C88188C0C28} -+ Win32Proj -+ 8.1 -+ -+ -+ -+ Application -+ Unicode -+ v120 -+ -+ -+ Application -+ Unicode -+ v120 -+ -+ -+ Application -+ Unicode -+ v120 -+ -+ -+ Application -+ Unicode -+ v120 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ true -+ true -+ false -+ true -+ true -+ true -+ false -+ true -+ -+ -+ -+ Disabled -+ _DEBUG;%(PreprocessorDefinitions) -+ true -+ EnableFastChecks -+ MultiThreadedDebug -+ Level3 -+ EditAndContinue -+ -+ -+ true -+ $(OutDir)\$(TargetName).pdb -+ Console -+ false -+ -+ -+ MachineX86 - %(AdditionalDependencies) -- -- -- -- -- ;%(PreprocessorDefinitions) -- MultiThreaded -- Level3 -- ProgramDatabase -- -- -- true -- Console -- true -- true -- false -- -- -- MachineX86 -+ -+ -+ -+ -+ ;%(PreprocessorDefinitions) -+ MultiThreaded -+ Level3 -+ ProgramDatabase -+ -+ -+ true -+ Console -+ true -+ true -+ false -+ -+ -+ MachineX86 - %(AdditionalDependencies) -- -- -- -- -- X64 -- -- -- Disabled -- _DEBUG;%(PreprocessorDefinitions) -- true -- EnableFastChecks -- MultiThreadedDebug -- Level3 -- ProgramDatabase -- -- -- true -- $(OutDir)\$(TargetName).pdb -- Console -- false -- -- -- MachineX64 -+ -+ -+ -+ -+ X64 -+ -+ -+ Disabled -+ _DEBUG;%(PreprocessorDefinitions) -+ true -+ EnableFastChecks -+ MultiThreadedDebug -+ Level3 -+ ProgramDatabase -+ -+ -+ true -+ $(OutDir)\$(TargetName).pdb -+ Console -+ false -+ -+ -+ MachineX64 - %(AdditionalDependencies) -- -- -- -- -- X64 -- -- -- ;%(PreprocessorDefinitions) -- MultiThreaded -- Level3 -- ProgramDatabase -- -- -- true -- Console -- true -- true -- false -- -- -- MachineX64 -+ -+ -+ -+ -+ X64 -+ -+ -+ ;%(PreprocessorDefinitions) -+ MultiThreaded -+ Level3 -+ ProgramDatabase -+ -+ -+ true -+ Console -+ true -+ true -+ false -+ -+ -+ MachineX64 - %(AdditionalDependencies) -- -- -- -- -- -- -- -- -- -\ No newline at end of file -+ -+ -+ -+ -+ -+ -+ -+ -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/giomm.vcxproj b/MSVC_Net2013/giomm.vcxproj -index df3c4f8..f9baf6b 100644 ---- a/MSVC_Net2013/giomm.vcxproj -+++ b/MSVC_Net2013/giomm.vcxproj -@@ -1,458 +1,459 @@ --??? -- -- -- -- Debug -- Win32 -- -- -- Debug -- x64 -- -- -- Release -- Win32 -- -- -- Release -- x64 -- -- -- -- giomm -- {EE6C0430-C2C9-425C-8EBA-963FAC3E9832} -- -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- %(AdditionalOptions) -- Disabled -+??? -+ -+ -+ -+ Debug -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release -+ Win32 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ giomm -+ {EE6C0430-C2C9-425C-8EBA-963FAC3E9832} -+ 8.1 -+ -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ %(AdditionalOptions) -+ Disabled - .\giomm;..\gio;%(AdditionalIncludeDirectories) -- _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) -- true -- EnableFastChecks -- MultiThreadedDebugDLL -- Level3 -- EditAndContinue -- -- -- Generate giomm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj -- -- -+ _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) -+ true -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ Level3 -+ EditAndContinue -+ -+ -+ Generate giomm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj -+ -+ - %(AdditionalDependencies) -- %(AdditionalLibraryDirectories) -- $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll -- $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib -- $(IntDir)\$(ProjectName).def -- true -- false -- -- -- -- -- -- -- X64 -- -- -- %(AdditionalOptions) -- Disabled -+ %(AdditionalLibraryDirectories) -+ $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll -+ $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib -+ $(IntDir)\$(ProjectName).def -+ true -+ false -+ -+ -+ -+ -+ -+ -+ X64 -+ -+ -+ %(AdditionalOptions) -+ Disabled - .\giomm;..\gio;%(AdditionalIncludeDirectories) -- _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) -- true -- EnableFastChecks -- MultiThreadedDebugDLL -- Level3 -- ProgramDatabase -- -- -- Generate giomm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj -- -- -+ _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) -+ true -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ Level3 -+ ProgramDatabase -+ -+ -+ Generate giomm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj -+ -+ - %(AdditionalDependencies) -- %(AdditionalLibraryDirectories) -- $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll -- $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib -- $(IntDir)\$(ProjectName).def -- true -- false -- -- -- MachineX64 -- -- -- -- -- %(AdditionalOptions) -+ %(AdditionalLibraryDirectories) -+ $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll -+ $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib -+ $(IntDir)\$(ProjectName).def -+ true -+ false -+ -+ -+ MachineX64 -+ -+ -+ -+ -+ %(AdditionalOptions) - .\giomm;..\gio;%(AdditionalIncludeDirectories) -- $(GioMMBuildDefs);%(PreprocessorDefinitions) -- MultiThreadedDLL -- Level3 -- ProgramDatabase -- -- -- Generate giomm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj -- -- -+ $(GioMMBuildDefs);%(PreprocessorDefinitions) -+ MultiThreadedDLL -+ Level3 -+ ProgramDatabase -+ -+ -+ Generate giomm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj -+ -+ - %(AdditionalDependencies) -- %(AdditionalLibraryDirectories) -- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll -- $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib -- $(IntDir)\$(ProjectName).def -- false -- true -- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb -- true -- -- -- -- -- -- -- X64 -- -- -- %(AdditionalOptions) -+ %(AdditionalLibraryDirectories) -+ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll -+ $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib -+ $(IntDir)\$(ProjectName).def -+ false -+ true -+ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb -+ true -+ -+ -+ -+ -+ -+ -+ X64 -+ -+ -+ %(AdditionalOptions) - .\giomm;..\gio;%(AdditionalIncludeDirectories) -- $(GioMMBuildDefs);%(PreprocessorDefinitions) -- MultiThreadedDLL -- Level3 -- ProgramDatabase -- -- -- Generate giomm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj -- -- -+ $(GioMMBuildDefs);%(PreprocessorDefinitions) -+ MultiThreadedDLL -+ Level3 -+ ProgramDatabase -+ -+ -+ Generate giomm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj -+ -+ - %(AdditionalDependencies) -- %(AdditionalLibraryDirectories) -- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll -- $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib -- $(IntDir)\$(ProjectName).def -- false -- true -- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb -- true -- -- -- MachineX64 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- {58b2b53c-c4ff-47fd-817b-095e45b7f7d4} -- false -- -- -- -- -- -- -\ No newline at end of file -+ %(AdditionalLibraryDirectories) -+ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll -+ $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib -+ $(IntDir)\$(ProjectName).def -+ false -+ true -+ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb -+ true -+ -+ -+ MachineX64 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ {58b2b53c-c4ff-47fd-817b-095e45b7f7d4} -+ false -+ -+ -+ -+ -+ -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/giomm_simple.vcxproj b/MSVC_Net2013/giomm_simple.vcxproj -index 1eb6124..2db412e 100644 ---- a/MSVC_Net2013/giomm_simple.vcxproj -+++ b/MSVC_Net2013/giomm_simple.vcxproj -@@ -23,26 +23,27 @@ - {F4F66980-51D4-4CC2-A529-9AD2C9F7D143} - tests_giomm_simple - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -189,4 +190,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/glibmm.vcxproj b/MSVC_Net2013/glibmm.vcxproj -index cf86400..e3df6a8 100644 ---- a/MSVC_Net2013/glibmm.vcxproj -+++ b/MSVC_Net2013/glibmm.vcxproj -@@ -1,362 +1,363 @@ --??? -- -- -- -- Debug -- Win32 -- -- -- Debug -- x64 -- -- -- Release -- Win32 -- -- -- Release -- x64 -- -- -- -- glibmm -- {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} -- glibmm -- Win32Proj -- -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- DynamicLibrary -- MultiByte -- v120 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- true -- true -- true -- true -- true -- true -- true -- true -- -- -- -- %(AdditionalOptions) -- Disabled -- %(AdditionalIncludeDirectories) -- _DEBUG;$(GLibMMBuildDefs);%(PreprocessorDefinitions) -- true -- EnableFastChecks -- MultiThreadedDebugDLL -- true -- Level3 -- EditAndContinue -- -- -- Generate glibmm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj -- -- -+??? -+ -+ -+ -+ Debug -+ Win32 -+ -+ -+ Debug -+ x64 -+ -+ -+ Release -+ Win32 -+ -+ -+ Release -+ x64 -+ -+ -+ -+ glibmm -+ {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} -+ glibmm -+ Win32Proj -+ 8.1 -+ -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ DynamicLibrary -+ Unicode -+ v120 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ true -+ true -+ true -+ true -+ true -+ true -+ true -+ true -+ -+ -+ -+ %(AdditionalOptions) -+ Disabled -+ %(AdditionalIncludeDirectories) -+ _DEBUG;$(GLibMMBuildDefs);%(PreprocessorDefinitions) -+ true -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ true -+ Level3 -+ EditAndContinue -+ -+ -+ Generate glibmm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj -+ -+ - %(AdditionalDependencies) -- %(AdditionalLibraryDirectories) -- $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll -- $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib -- $(IntDir)\$(ProjectName).def -- true -- false -- -- -- -- -- -- -- X64 -- -- -- %(AdditionalOptions) -- Disabled -- %(AdditionalIncludeDirectories) -- _DEBUG;$(GLibMMBuildDefs);%(PreprocessorDefinitions) -- true -- EnableFastChecks -- MultiThreadedDebugDLL -- true -- Level3 -- ProgramDatabase -- -- -- Generate glibmm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj -- -- -+ %(AdditionalLibraryDirectories) -+ $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll -+ $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib -+ $(IntDir)\$(ProjectName).def -+ true -+ false -+ -+ -+ -+ -+ -+ -+ X64 -+ -+ -+ %(AdditionalOptions) -+ Disabled -+ %(AdditionalIncludeDirectories) -+ _DEBUG;$(GLibMMBuildDefs);%(PreprocessorDefinitions) -+ true -+ EnableFastChecks -+ MultiThreadedDebugDLL -+ true -+ Level3 -+ ProgramDatabase -+ -+ -+ Generate glibmm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj -+ -+ - %(AdditionalDependencies) -- %(AdditionalLibraryDirectories) -- $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll -- $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib -- $(IntDir)\$(ProjectName).def -- true -- false -- -- -- MachineX64 -- -- -- -- -- %(AdditionalOptions) -- %(AdditionalIncludeDirectories) -- $(GLibMMBuildDefs);%(PreprocessorDefinitions) -- MultiThreadedDLL -- true -- Level3 -- ProgramDatabase -- -- -- Generate glibmm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj -- -- -+ %(AdditionalLibraryDirectories) -+ $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll -+ $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib -+ $(IntDir)\$(ProjectName).def -+ true -+ false -+ -+ -+ MachineX64 -+ -+ -+ -+ -+ %(AdditionalOptions) -+ %(AdditionalIncludeDirectories) -+ $(GLibMMBuildDefs);%(PreprocessorDefinitions) -+ MultiThreadedDLL -+ true -+ Level3 -+ ProgramDatabase -+ -+ -+ Generate glibmm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj -+ -+ - %(AdditionalDependencies) -- %(AdditionalLibraryDirectories) -- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll -- $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib -- $(IntDir)\$(ProjectName).def -- true -- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb -- false -- true -- -- -- -- -- -- -- X64 -- -- -- %(AdditionalOptions) -- %(AdditionalIncludeDirectories) -- $(GLibMMBuildDefs);%(PreprocessorDefinitions) -- MultiThreadedDLL -- true -- Level3 -- ProgramDatabase -- -- -- Generate glibmm def file -- $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj -- -- -+ %(AdditionalLibraryDirectories) -+ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll -+ $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib -+ $(IntDir)\$(ProjectName).def -+ true -+ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb -+ false -+ true -+ -+ -+ -+ -+ -+ -+ X64 -+ -+ -+ %(AdditionalOptions) -+ %(AdditionalIncludeDirectories) -+ $(GLibMMBuildDefs);%(PreprocessorDefinitions) -+ MultiThreadedDLL -+ true -+ Level3 -+ ProgramDatabase -+ -+ -+ Generate glibmm def file -+ $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj -+ -+ - %(AdditionalDependencies) -- %(AdditionalLibraryDirectories) -- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll -- $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib -- $(IntDir)\$(ProjectName).def -- true -- $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb -- false -- true -- -- -- MachineX64 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- {07324745-c9be-4d65-b08a-9c88188c0c28} -- false -- -- -- -- -- -- -\ No newline at end of file -+ %(AdditionalLibraryDirectories) -+ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll -+ $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib -+ $(IntDir)\$(ProjectName).def -+ true -+ $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).pdb -+ false -+ true -+ -+ -+ MachineX64 -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ {07324745-c9be-4d65-b08a-9c88188c0c28} -+ false -+ -+ -+ -+ -+ -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/glibmm_value.vcxproj b/MSVC_Net2013/glibmm_value.vcxproj -index 9639003..7e12415 100644 ---- a/MSVC_Net2013/glibmm_value.vcxproj -+++ b/MSVC_Net2013/glibmm_value.vcxproj -@@ -23,26 +23,27 @@ - {22277003-3228-486E-A6A8-994B8B13AF30} - tests_glibmm_value - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -186,4 +187,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj -index 059ceec..b6f2843 100644 ---- a/MSVC_Net2013/install.vcxproj -+++ b/MSVC_Net2013/install.vcxproj -@@ -22,28 +22,29 @@ - {2093D218-190E-4194-9421-3BA7CBF33B10} - install - Win32Proj -+ 8.1 - - - - Utility -- MultiByte -+ Unicode - true - v120 - - - Utility -- MultiByte -+ Unicode - v120 - - - Utility -- MultiByte -+ Unicode - true - v120 - - - Utility -- MultiByte -+ Unicode - v120 - - -@@ -113,4 +114,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/keyfile.vcxproj b/MSVC_Net2013/keyfile.vcxproj -index 0993e6a..ee23bae 100644 ---- a/MSVC_Net2013/keyfile.vcxproj -+++ b/MSVC_Net2013/keyfile.vcxproj -@@ -23,26 +23,27 @@ - {569A24AB-8D81-4427-B40D-85485AA7F3CD} - dispatcher - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -189,4 +190,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/markup.vcxproj b/MSVC_Net2013/markup.vcxproj -index 03b3295..db2dfab 100644 ---- a/MSVC_Net2013/markup.vcxproj -+++ b/MSVC_Net2013/markup.vcxproj -@@ -22,26 +22,27 @@ - markup - {6300FCFA-97F1-4967-802E-E354D95DB0EB} - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -188,4 +189,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/options.vcxproj b/MSVC_Net2013/options.vcxproj -index f627c4e..dda25b9 100644 ---- a/MSVC_Net2013/options.vcxproj -+++ b/MSVC_Net2013/options.vcxproj -@@ -23,26 +23,27 @@ - {46962B9A-C5E9-4863-9408-97514D63F420} - dispatcher - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -189,4 +190,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/properties.vcxproj b/MSVC_Net2013/properties.vcxproj -index 6858140..d8a95c2 100644 ---- a/MSVC_Net2013/properties.vcxproj -+++ b/MSVC_Net2013/properties.vcxproj -@@ -23,26 +23,27 @@ - {206CC821-8BE3-4455-B09E-63F93E30F20C} - dispatcher - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -189,4 +190,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/regex.vcxproj b/MSVC_Net2013/regex.vcxproj -index 84418df..c4c0cf0 100644 ---- a/MSVC_Net2013/regex.vcxproj -+++ b/MSVC_Net2013/regex.vcxproj -@@ -23,26 +23,27 @@ - {7374A5A1-4E74-44BD-918C-FDF80B97FA3F} - dispatcher - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -189,4 +190,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/resolver.vcxproj b/MSVC_Net2013/resolver.vcxproj -index 113d86a..9fa59a4 100644 ---- a/MSVC_Net2013/resolver.vcxproj -+++ b/MSVC_Net2013/resolver.vcxproj -@@ -23,26 +23,27 @@ - {E4D320F1-7D2D-43AF-874F-14524220EF92} - resolver - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -193,4 +194,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/socket-client.vcxproj b/MSVC_Net2013/socket-client.vcxproj -index 3743708..bfb8330 100644 ---- a/MSVC_Net2013/socket-client.vcxproj -+++ b/MSVC_Net2013/socket-client.vcxproj -@@ -23,26 +23,27 @@ - {1E38D900-90AC-4E18-B34C-7B08E3383087} - socket-client - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -193,4 +194,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/socket-client.vcxproj.filters b/MSVC_Net2013/socket-client.vcxproj.filters -index edb14c1..8d41b33 100644 ---- a/MSVC_Net2013/socket-client.vcxproj.filters -+++ b/MSVC_Net2013/socket-client.vcxproj.filters -@@ -15,6 +15,6 @@ - - - -- Source Files -+ - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/socket-server.vcxproj b/MSVC_Net2013/socket-server.vcxproj -index 4116263..e6744af 100644 ---- a/MSVC_Net2013/socket-server.vcxproj -+++ b/MSVC_Net2013/socket-server.vcxproj -@@ -23,26 +23,27 @@ - {7A4EB8C4-4784-4E9E-96E6-CA6FF4CE1D20} - socket-server - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -193,4 +194,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/socket-server.vcxproj.filters b/MSVC_Net2013/socket-server.vcxproj.filters -index 66a88d3..8d41b33 100644 ---- a/MSVC_Net2013/socket-server.vcxproj.filters -+++ b/MSVC_Net2013/socket-server.vcxproj.filters -@@ -15,6 +15,6 @@ - - - -- Source Files -+ - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/thread.vcxproj b/MSVC_Net2013/thread.vcxproj -index 9950bbb..d1824e8 100644 ---- a/MSVC_Net2013/thread.vcxproj -+++ b/MSVC_Net2013/thread.vcxproj -@@ -22,26 +22,27 @@ - thread - {5357AB2B-A5F9-463C-92D8-00357CCC3ECE} - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -184,4 +185,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/threadpool.vcxproj b/MSVC_Net2013/threadpool.vcxproj -index 9ab9748..d0a0d15 100644 ---- a/MSVC_Net2013/threadpool.vcxproj -+++ b/MSVC_Net2013/threadpool.vcxproj -@@ -22,26 +22,27 @@ - threadpool - {962484DB-2111-48A4-BEF0-194433719D0D} - Win32Proj -+ 8.1 - - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - - Application -- MultiByte -+ Unicode - v120 - - -@@ -192,4 +193,4 @@ - - - -- -+ -\ No newline at end of file diff --git a/ports/glibmm/fix_properties.patch b/ports/glibmm/fix_properties.patch deleted file mode 100644 index 51044a27f..000000000 --- a/ports/glibmm/fix_properties.patch +++ /dev/null @@ -1,1721 +0,0 @@ -diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj -index 62dbcc8..7da2fbd 100644 ---- a/MSVC_Net2013/gendef.vcxproj -+++ b/MSVC_Net2013/gendef.vcxproj -@@ -91,6 +91,7 @@ - - - MachineX86 -+ %(AdditionalDependencies) - - - -@@ -109,6 +110,7 @@ - - - MachineX86 -+ %(AdditionalDependencies) - - - -@@ -132,6 +134,7 @@ - - - MachineX64 -+ %(AdditionalDependencies) - - - -@@ -153,6 +156,7 @@ - - - MachineX64 -+ %(AdditionalDependencies) - - - -@@ -161,4 +165,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/giomm.vcxproj b/MSVC_Net2013/giomm.vcxproj -index bc4fc3d..078fcb2 100644 ---- a/MSVC_Net2013/giomm.vcxproj -+++ b/MSVC_Net2013/giomm.vcxproj -@@ -69,7 +69,7 @@ - - %(AdditionalOptions) - Disabled -- .\giomm;..\gio;$(GlibEtcInstallRoot)\include\gio-win32-2.0;%(AdditionalIncludeDirectories) -+ .\giomm;..\gio;%(AdditionalIncludeDirectories) - _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) - true - EnableFastChecks -@@ -82,7 +82,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj - - -- gio-2.0.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) -+ %(AdditionalDependencies) - %(AdditionalLibraryDirectories) - $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll - $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib -@@ -100,7 +100,7 @@ - - %(AdditionalOptions) - Disabled -- .;../..;../../glib;../../gio;$(SolutionDir)\glibmm;..\..\..\vs10\x64\include\gio-win32-2.0;..\..\..\vs10\x64\include\glib-2.0;..\..\..\vs10\x64\lib\glib-2.0\include;..\..\..\vs10\x64\include\sigc++-2.0;..\..\..\vs10\x64\lib\sigc++-2.0\include;..\..\..\vs10\x64\include;%(AdditionalIncludeDirectories) -+ .\giomm;..\gio;%(AdditionalIncludeDirectories) - _DEBUG;$(GioMMBuildDefs);%(PreprocessorDefinitions) - true - EnableFastChecks -@@ -113,7 +113,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj - - -- gio-2.0.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) -+ %(AdditionalDependencies) - %(AdditionalLibraryDirectories) - $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll - $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib -@@ -128,7 +128,7 @@ - - - %(AdditionalOptions) -- .\giomm;..\gio;$(GlibEtcInstallRoot)\include\gio-win32-2.0;%(AdditionalIncludeDirectories) -+ .\giomm;..\gio;%(AdditionalIncludeDirectories) - $(GioMMBuildDefs);%(PreprocessorDefinitions) - MultiThreadedDLL - Level3 -@@ -139,7 +139,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj - - -- gio-2.0.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) -+ %(AdditionalDependencies) - %(AdditionalLibraryDirectories) - $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll - $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib -@@ -158,7 +158,7 @@ - - - %(AdditionalOptions) -- .\giomm;..\gio;$(GlibEtcInstallRoot)\include\gio-win32-2.0;%(AdditionalIncludeDirectories) -+ .\giomm;..\gio;%(AdditionalIncludeDirectories) - $(GioMMBuildDefs);%(PreprocessorDefinitions) - MultiThreadedDLL - Level3 -@@ -169,7 +169,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj - - -- gio-2.0.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) -+ %(AdditionalDependencies) - %(AdditionalLibraryDirectories) - $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll - $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib -@@ -455,4 +455,4 @@ - - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/giomm.vcxproj.filters b/MSVC_Net2013/giomm.vcxproj.filters -index 4f01b13..934eddc 100644 ---- a/MSVC_Net2013/giomm.vcxproj.filters -+++ b/MSVC_Net2013/giomm.vcxproj.filters -@@ -15,266 +15,780 @@ - - - -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -- Source Files -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ - - -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Source Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Source Files -- Source Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Source Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -- Header Files -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Source Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Source Files -+ -+ -+ Source Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Source Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ -+ -+ Header Files -+ - - -- Resource Files -+ -+ Resource Files - - -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/glibmm-build-defines.props b/MSVC_Net2013/glibmm-build-defines.props -index 5cbde3c..9a027c5 100644 ---- a/MSVC_Net2013/glibmm-build-defines.props -+++ b/MSVC_Net2013/glibmm-build-defines.props -@@ -6,8 +6,8 @@ - - SIZEOF_WCHAR_T=2;GLIBMM_BUILD - GIOMM_BUILD -- sigc-vc$(VSVer)0-2_0.lib -- sigc-vc$(VSVer)0-d-2_0.lib -+ sigc-2_0.lib -+ sigc-2_0.lib - - - <_PropertySheetDisplayName>glibmmbuilddefinesprops -@@ -16,28 +16,10 @@ - - - -- .\glibmm;..;..\glib;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) -+ .\glibmm;..;.;..\glib;%(AdditionalIncludeDirectories) - msvc_recommended_pragmas.h;%(ForcedIncludeFiles) - true - /d2Zi+ %(AdditionalOptions) - -- -- glib-2.0.lib;gobject-2.0.lib;gmodule-2.0.lib;%(AdditionalDependencies) -- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) -- - -- -- -- $(GLibMMBuildDefs) -- -- -- $(GioMMBuildDefs) -- -- -- $(CPPDepLibsRelease) -- -- -- $(CPPDepLibsDebug) -- -- -- -+ -\ No newline at end of file -diff --git a/MSVC_Net2013/glibmm-install.props b/MSVC_Net2013/glibmm-install.props -index f28a0c8..9283a7b 100644 ---- a/MSVC_Net2013/glibmm-install.props -+++ b/MSVC_Net2013/glibmm-install.props -@@ -3,410 +3,4 @@ - - - -- -- $(SolutionDir)$(Configuration)\$(Platform)\bin -- $(BinDir)\glibmm$(ReleaseDllSuffix).dll;$(BinDir)\giomm$(ReleaseDllSuffix).dll -- $(BinDir)\glibmm$(DebugDllSuffix).dll;$(BinDir)\giomm$(DebugDllSuffix).dll -- --mkdir $(CopyDir) --mkdir $(CopyDir)\bin --copy $(BinDir)\glibmm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).dll $(CopyDir)\bin --copy $(BinDir)\glibmm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).pdb $(CopyDir)\bin --copy $(BinDir)\giomm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).dll $(CopyDir)\bin --copy $(BinDir)\giomm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).pdb $(CopyDir)\bin -- --mkdir $(CopyDir)\lib\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\include --mkdir $(CopyDir)\lib\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\include --copy $(BinDir)\glibmm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).lib $(CopyDir)\lib --copy $(BinDir)\giomm-vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion).lib $(CopyDir)\lib -- --mkdir $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --mkdir $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\glib\glibmm.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion) --copy ..\gio\giomm.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion) -- --copy ..\glib\glibmm\arrayhandle.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\balancedtree.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\base64.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\binding.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\bytes.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\bytearray.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\checksum.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\class.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\containerhandle_shared.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\containers.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\convert.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\date.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\datetime.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\debug.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\enums.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\dispatcher.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\error.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\exception.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\exceptionhandler.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\fileutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\helperlist.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\i18n-lib.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\i18n.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\init.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\interface.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\iochannel.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\keyfile.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\listhandle.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\main.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\markup.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\miscutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\module.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\nodetree.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\object.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\objectbase.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\optioncontext.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\optionentry.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\optiongroup.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\pattern.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\priorities.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\property.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\propertyproxy.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\propertyproxy_base.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\quark.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\random.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\refptr.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\regex.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\sarray.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\shell.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\signalproxy.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\signalproxy_connectionnode.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\slisthandle.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\spawn.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\streamiochannel.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\stringutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\threadpool.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\threads.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\timer.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\timeval.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\timezone.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\unicode.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\uriutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\ustring.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\utility.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\variant.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\variantdict.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\variantiter.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\varianttype.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\variant_basictypes.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\thread.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\value.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\valuearray.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\value_basictypes.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\value_custom.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\vectorutils.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\weakref.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\wrap.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm --copy ..\glib\glibmm\wrap_init.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm -- --copy ..\glib\glibmm\private\balancedtree_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\binding_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\bytes_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\bytearray_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\checksum_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\convert_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\date_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\datetime_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\enums_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\fileutils_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\interface_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\iochannel_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\keyfile_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\markup_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\miscutils_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\module_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\nodetree_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\object_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\optioncontext_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\optionentry_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\optiongroup_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\regex_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\shell_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\spawn_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\threads_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\timezone_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\unicode_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\uriutils_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\variant_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\variantdict_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\variantiter_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\varianttype_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\thread_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private --copy ..\glib\glibmm\private\valuearray_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private -- --copy ..\gio\giomm\action.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\actiongroup.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\actionmap.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\applaunchcontext.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\appinfo.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\application.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\applicationcommandline.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\asyncinitable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\asyncresult.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\bufferedinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\bufferedoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\cancellable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\charsetconverter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\contenttype.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\converter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\converterinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\converteroutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\credentials.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\datainputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dataoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusactiongroup.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusauthobserver.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbuserror.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbuserrorutils.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusinterface.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusinterfaceskeleton.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusinterfacevtable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusintrospection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusmenumodel.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusmessage.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusmethodinvocation.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusobject.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusownname.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusproxy.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusserver.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbussubtreevtable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbusutils.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\dbuswatchname.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\drive.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\emblem.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\emblemedicon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\enums.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\error.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\file.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\fileattributeinfo.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\fileattributeinfolist.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\fileenumerator.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\fileicon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\fileinfo.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\fileinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\fileiostream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\filemonitor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\filenamecompleter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\fileoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\filterinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\filteroutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\icon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\inetaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\inetsocketaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\init.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\initable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\inputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\iostream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\listmodel.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\liststore.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\loadableicon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\memoryinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\memoryoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\menuattributeiter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\menulinkiter.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\menu.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\menuitem.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\menumodel.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\mount.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\mountoperation.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\networkaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\networkmonitor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\networkservice.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\notification.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\outputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\permission.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\pollableinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\pollableoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\proxy.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\proxyaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\proxyresolver.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\remoteactiongroup.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\resolver.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\resource.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\seekable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\settings.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\settingsschema.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\settingsschemakey.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\settingsschemasource.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\simpleaction.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\simpleactiongroup.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\simpleiostream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\simplepermission.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\socket.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\socketaddress.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\socketaddressenumerator.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\socketclient.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\socketconnectable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\socketconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\socketcontrolmessage.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\socketlistener.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\socketservice.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\socketsource.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\srvtarget.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\tcpconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\tcpwrapperconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\threadedsocketservice.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\themedicon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\tlscertificate.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\tlsclientconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\tlsconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\tlsdatabase.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\tlsinteraction.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\tlspassword.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\tlsserverconnection.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\volume.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\volumemonitor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\wrap_init.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\zlibdecompressor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm --copy ..\gio\giomm\zlibcompressor.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm -- --copy ..\gio\giomm\private\action_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\actiongroup_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\actionmap_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\appinfo_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\applaunchcontext_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\application_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\applicationcommandline_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\asyncinitable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\asyncresult_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\bufferedinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\bufferedoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\cancellable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\charsetconverter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\converter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\converterinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\converteroutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\credentials_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\datainputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dataoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusactiongroup_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusauthobserver_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbuserror_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbuserrorutils_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusinterface_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusinterfaceskeleton_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusinterfacevtable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusintrospection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusmenumodel_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusmessage_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusmethodinvocation_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusobject_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusownname_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusproxy_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusserver_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbussubtreevtable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbusutils_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\dbuswatchname_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\drive_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\emblem_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\emblemedicon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\enums_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\error_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\file_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\fileattributeinfo_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\fileattributeinfolist_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\fileenumerator_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\fileicon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\fileinfo_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\fileinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\fileiostream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\filemonitor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\filenamecompleter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\fileoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\filterinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\filteroutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\icon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\inetaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\inetsocketaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\initable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\inputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\iostream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\listmodel_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\liststore_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\loadableicon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\memoryinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\memoryoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\menu_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\menuattributeiter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\menuitem_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\menulinkiter_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\menumodel_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\mount_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\mountoperation_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\networkaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\networkmonitor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\networkservice_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\notification_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\outputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\pollableinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\pollableoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\proxy_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\proxyaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\proxyresolver_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\remoteactiongroup_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\resolver_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\resource_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\seekable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\settings_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\settingsschema_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\settingsschemakey_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\settingsschemasource_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\simpleaction_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\simpleactiongroup_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\simpleiostream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\socket_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\socketaddress_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\socketaddressenumerator_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\socketclient_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\socketconnectable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\socketconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\socketcontrolmessage_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\socketlistener_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\socketservice_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\srvtarget_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\tcpconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\tcpwrapperconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\themedicon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\threadedsocketservice_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\tlscertificate_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\tlsclientconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\tlsconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\tlsdatabase_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\tlsinteraction_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\tlspassword_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\tlsserverconnection_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\volume_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\volumemonitor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\zlibcompressor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy ..\gio\giomm\private\zlibdecompressor_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private --copy .\glibmm\glibmmconfig.h $(CopyDir)\lib\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\include --copy .\giomm\giommconfig.h $(CopyDir)\lib\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\include -- -- -- -- <_PropertySheetDisplayName>glibmminstallprops -- -- -- -- $(BinDir) -- -- -- $(InstalledReleaseDlls) -- -- -- $(InstalledDebugDlls) -- -- -- $(GLibmmDoInstall) -- -- - -diff --git a/MSVC_Net2013/glibmm-version-paths.props b/MSVC_Net2013/glibmm-version-paths.props -index 216731b..e5f0f6a 100644 ---- a/MSVC_Net2013/glibmm-version-paths.props -+++ b/MSVC_Net2013/glibmm-version-paths.props -@@ -2,13 +2,9 @@ - - - 12 -- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) -- $(GlibEtcInstallRoot) - $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ - 2 - 4 -- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) -- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) - - - <_PropertySheetDisplayName>glibmmversionpathsprops -@@ -17,12 +13,6 @@ - - $(VSVer) - -- -- $(GlibEtcInstallRoot) -- -- -- $(CopyDir) -- - - $(DefDir) - -@@ -32,11 +22,5 @@ - - $(ApiMinorVersion) - -- -- $(ReleaseDllSuffix) -- -- -- $(DebugDllSuffix) -- - - -diff --git a/MSVC_Net2013/glibmm.vcxproj b/MSVC_Net2013/glibmm.vcxproj -index 6594edc..c611561 100644 ---- a/MSVC_Net2013/glibmm.vcxproj -+++ b/MSVC_Net2013/glibmm.vcxproj -@@ -93,7 +93,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj - - -- $(CPPDepLibsDebug);%(AdditionalDependencies) -+ %(AdditionalDependencies) - %(AdditionalLibraryDirectories) - $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll - $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib -@@ -125,7 +125,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(DebugDllSuffix).dll $(IntDir)*.obj - - -- $(CPPDepLibsDebug);%(AdditionalDependencies) -+ %(AdditionalDependencies) - %(AdditionalLibraryDirectories) - $(OutDir)\$(ProjectName)$(DebugDllSuffix).dll - $(TargetDir)$(ProjectName)$(DebugDllSuffix).lib -@@ -152,7 +152,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj - - -- $(CPPDepLibsRelease);%(AdditionalDependencies) -+ %(AdditionalDependencies) - %(AdditionalLibraryDirectories) - $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll - $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib -@@ -183,7 +183,7 @@ - $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(ProjectName)$(ReleaseDllSuffix).dll $(IntDir)*.obj - - -- $(CPPDepLibsRelease);%(AdditionalDependencies) -+ %(AdditionalDependencies) - %(AdditionalLibraryDirectories) - $(OutDir)\$(ProjectName)$(ReleaseDllSuffix).dll - $(TargetDir)$(ProjectName)$(ReleaseDllSuffix).lib -@@ -359,4 +359,4 @@ - - - -- -+ -\ No newline at end of file diff --git a/ports/glibmm/glibmm-api-variant.patch b/ports/glibmm/glibmm-api-variant.patch new file mode 100644 index 000000000..bb00ac3f5 --- /dev/null +++ b/ports/glibmm/glibmm-api-variant.patch @@ -0,0 +1,84 @@ +diff --git a/glib/glibmm/varianttype.h b/glib/glibmm/varianttype.h +index a232e70..64eb4a1 100644 +--- a/glib/glibmm/varianttype.h ++++ b/glib/glibmm/varianttype.h +@@ -500,54 +500,79 @@ public: + + }; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_BOOL; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_BYTE; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_INT16; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_UINT16; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_INT32; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_UINT32; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_INT64; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_UINT64; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_DOUBLE; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_STRING; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_OBJECT_PATH; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_SIGNATURE; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_VARIANT; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_HANDLE; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_UNIT; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_ANY; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_BASIC; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_MAYBE; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_ARRAY; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_TUPLE; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_DICT_ENTRY; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_DICTIONARY; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_STRING_ARRAY; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_BYTESTRING; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_BYTESTRING_ARRAY; + + diff --git a/ports/glibmm/portfile.cmake b/ports/glibmm/portfile.cmake index 7586c40a3..792bf3dde 100644 --- a/ports/glibmm/portfile.cmake +++ b/ports/glibmm/portfile.cmake @@ -1,15 +1,8 @@ -# Glib uses winapi functions not available in WindowsStore, so glibmm -# also +# Glib uses winapi functions not available in WindowsStore, so glibmm also if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) message(FATAL_ERROR "Error: UWP builds are currently not supported.") endif() -# Glib relies on DllMain, so glibmm also -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - message(STATUS "Warning: Static building not supported. Building dynamic.") - set(VCPKG_LIBRARY_LINKAGE dynamic) -endif() - include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/glibmm-2.52.1) vcpkg_download_distfile(ARCHIVE @@ -21,81 +14,21 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix_properties.patch ${CMAKE_CURRENT_LIST_DIR}/fix_charset.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/glibmm-api-variant.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) - -set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) -if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) - set(VS_PLATFORM "Win32") -endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/glibmm.sln - TARGET giomm - PLATFORM ${VS_PLATFORM} - USE_VCPKG_INTEGRATION -) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -# Handle headers -file(COPY ${SOURCE_PATH}/MSVC_Net2013/giomm/giommconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${SOURCE_PATH}/gio/giomm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file( - COPY - ${SOURCE_PATH}/gio/giomm - DESTINATION ${CURRENT_PACKAGES_DIR}/include - FILES_MATCHING PATTERN *.h -) -file(COPY ${SOURCE_PATH}/MSVC_Net2013/glibmm/glibmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file(COPY ${SOURCE_PATH}/glib/glibmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -file( - COPY - ${SOURCE_PATH}/glib/glibmm - DESTINATION ${CURRENT_PACKAGES_DIR}/include - FILES_MATCHING PATTERN *.h +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWARNINGS_HEADER=${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON ) -# Handle libraries -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/giomm.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/giomm.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/glibmm.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/glibmm.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/giomm.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/giomm.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/glibmm.dll - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) -file( - COPY - ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/glibmm.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) +vcpkg_install_cmake() vcpkg_copy_pdbs() -- cgit v1.2.3 From b9009fff1b5f9541119d764927abb5bfabc8f9fc Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 16:22:00 -0700 Subject: [libxmlpp] Initial commit of 2.40.1 --- ports/libxmlpp/CMakeLists.txt | 97 +++++++++++++++++++++++++++++++++++++++++++ ports/libxmlpp/CONTROL | 4 ++ ports/libxmlpp/portfile.cmake | 26 ++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 ports/libxmlpp/CMakeLists.txt create mode 100644 ports/libxmlpp/CONTROL create mode 100644 ports/libxmlpp/portfile.cmake diff --git a/ports/libxmlpp/CMakeLists.txt b/ports/libxmlpp/CMakeLists.txt new file mode 100644 index 000000000..697d6bbc2 --- /dev/null +++ b/ports/libxmlpp/CMakeLists.txt @@ -0,0 +1,97 @@ +cmake_minimum_required(VERSION 3.9) +project(libxmlpp) + +set(CMAKE_CXX_STANDARD 17) + +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + +find_path(GLIBMM_INCLUDE_DIR NAMES glibmm.h) +find_library(GLIBMM_LIBRARY NAMES glibmm) +find_library(GIOMM_LIBRARY NAMES giomm) +find_library(GLIB_LIBRARY NAMES glib glib-2.0) +find_library(GIO_LIBRARY NAMES gio gio-2.0) +find_library(GMODULE_LIBRARY NAMES gmodule gmodule-2.0) +find_library(GOBJECT_LIBRARY NAMES gobject gobject-2.0) +find_library(SIGCPP_LIBRARY NAMES sigc sigc-2.0) +find_library(FFI_LIBRARY NAMES ffi libffi) +find_library(PCRE_LIBRARY NAMES pcre libpcre) +find_package(LibXml2 REQUIRED) +find_package(LibLZMA REQUIRED) +find_package(ZLIB REQUIRED) + +if(APPLE) + find_library(LIBINTL_LIBRARY NAMES intl) +endif() + +find_package(unofficial-iconv REQUIRED) +link_libraries(${LIBINTL_LIBRARY} unofficial::iconv::libiconv) + +if(APPLE) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) + find_library(CORESERVICES_LIBRARY CoreServices) + find_library(FOUNDATION_LIBRARY Foundation) + link_libraries(${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${FOUNDATION_LIBRARY}) +endif() + +link_libraries( + ${GIOMM_LIBRARY} + ${GLIBMM_LIBRARY} + ${GMODULE_LIBRARY} + ${GOBJECT_LIBRARY} + ${GIO_LIBRARY} + ${GLIB_LIBRARY} + ${SIGCPP_LIBRARY} + ${FFI_LIBRARY} + ${LIBXML2_LIBRARIES} + ${PCRE_LIBRARY} + ${LIBLZMA_LIBRARIES} + ZLIB::ZLIB +) +include_directories(${GLIBMM_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIRS} ${LIBLZMA_INCLUDE_DIRS}) +include_directories(. ${CMAKE_BINARY_DIR}/config) +if(NOT WIN32) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + link_libraries(Threads::Threads ${CMAKE_DL_LIBS}) +endif() + +# config file +if(WIN32) + configure_file(MSVC_Net2010/libxml++/libxml++config.h ${CMAKE_BINARY_DIR}/config/libxml++config.h COPYONLY) +else() + set(ENV{GLIBMM_CFLAGS} -I${GLIBMM_INCLUDE_DIR}) + set(ENV{GLIBMM_LIBS} "${GLIBMM_LIBRARY}") + set(ENV{GIOMM_CFLAGS} -I${GLIBMM_INCLUDE_DIR}) + set(ENV{GIOMM_LIBS} "${GIOMM_LIBRARY}") + set(ENV{PKG_CONFIG} "echo") + + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/config) + execute_process( + COMMAND "${CMAKE_SOURCE_DIR}/configure" + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/config + RESULT_VARIABLE res + ) + if(NOT res EQUAL 0) + message(FATAL_ERROR "Configure failed.") + endif() +endif() + +file(GLOB_RECURSE SOURCES libxml++/*.cc) +add_library(xml++ ${SOURCES}) +target_compile_definitions(xml++ PRIVATE -DLIBXMLPP_BUILD) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${CMAKE_BINARY_DIR}/config/libxml++config.h DESTINATION include) + install(DIRECTORY libxml++ DESTINATION include FILES_MATCHING PATTERN *.h) +endif() +install( + TARGETS xml++ + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(NOT DISABLE_EXAMPLES) + add_executable(dom_build examples/dom_build/main.cc) + target_link_libraries(dom_build xml++) +endif() diff --git a/ports/libxmlpp/CONTROL b/ports/libxmlpp/CONTROL new file mode 100644 index 000000000..46ec26ea1 --- /dev/null +++ b/ports/libxmlpp/CONTROL @@ -0,0 +1,4 @@ +Source: libxmlpp +Version: 2.40.1-1 +Description: a C++ wrapper for the libxml XML parser library. +Build-Depends: libxml2, glibmm diff --git a/ports/libxmlpp/portfile.cmake b/ports/libxmlpp/portfile.cmake new file mode 100644 index 000000000..8b6c758ac --- /dev/null +++ b/ports/libxmlpp/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) +set(LIBXMLPP_VERSION 2.40.1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxml++-${LIBXMLPP_VERSION}) +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.40/libxml++-${LIBXMLPP_VERSION}.tar.xz" + FILENAME "libxml++-${LIBXMLPP_VERSION}.tar.xz" + SHA512 a4ec2e8182d981c57bdcb8f0a203a3161f8c735ceb59fd212408b7a539d1dc826adf6717bed8f4d544ab08afd9c2fc861efe518e24bbd3a1c4b158e2ca48183a +) +vcpkg_extract_source_archive(${ARCHIVE}) + +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_copy_pdbs() + +# Handle copyright and readme +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxmlpp RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxmlpp) -- cgit v1.2.3 From b831381cf569436177ada02366c4850a665b8465 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 16:26:01 -0700 Subject: [boost] Improve non-windows support --- ports/boost-asio/CONTROL | 2 +- ports/boost-atomic/CONTROL | 2 +- ports/boost-chrono/CONTROL | 2 +- ports/boost-compute/CONTROL | 2 +- ports/boost-container/CONTROL | 2 +- ports/boost-context/CONTROL | 2 +- ports/boost-coroutine/CONTROL | 2 +- ports/boost-coroutine2/CONTROL | 2 +- ports/boost-date-time/CONTROL | 2 +- ports/boost-dll/CONTROL | 2 +- ports/boost-exception/CONTROL | 2 +- ports/boost-fiber/CONTROL | 2 +- ports/boost-filesystem/CONTROL | 2 +- ports/boost-graph-parallel/CONTROL | 2 +- ports/boost-graph-parallel/portfile.cmake | 2 -- ports/boost-graph/CONTROL | 2 +- ports/boost-interval/CONTROL | 2 +- ports/boost-iostreams/CONTROL | 2 +- ports/boost-locale/CONTROL | 2 +- ports/boost-locale/cmake-fragment.cmake | 10 ++++++++++ ports/boost-locale/portfile.cmake | 1 + ports/boost-log/CONTROL | 2 +- ports/boost-math/CONTROL | 2 +- ports/boost-modular-build-helper/CMakeLists.txt | 14 +++++++++++++- ports/boost-modular-build-helper/CONTROL | 2 +- .../boost-modular-build.cmake | 10 +++++++++- ports/boost-modular-build-helper/user-config.jam | 3 +++ ports/boost-mpi/CONTROL | 2 +- ports/boost-poly-collection/CONTROL | 2 +- ports/boost-pool/CONTROL | 2 +- ports/boost-process/CONTROL | 2 +- ports/boost-program-options/CONTROL | 2 +- ports/boost-random/CONTROL | 2 +- ports/boost-regex/CONTROL | 2 +- ports/boost-serialization/CONTROL | 2 +- ports/boost-signals/CONTROL | 2 +- ports/boost-spirit/CONTROL | 2 +- ports/boost-stacktrace/CONTROL | 2 +- ports/boost-system/CONTROL | 2 +- ports/boost-test/CONTROL | 2 +- ports/boost-test/portfile.cmake | 2 +- ports/boost-thread/CONTROL | 2 +- ports/boost-timer/CONTROL | 2 +- ports/boost-type-erasure/CONTROL | 2 +- ports/boost-vcpkg-helpers/generate-ports.ps1 | 22 ++++++++++++++++++---- ports/boost-wave/CONTROL | 2 +- ports/boost/CONTROL | 2 +- 47 files changed, 94 insertions(+), 48 deletions(-) create mode 100644 ports/boost-locale/cmake-fragment.cmake diff --git a/ports/boost-asio/CONTROL b/ports/boost-asio/CONTROL index 8335a6dd8..169640a9b 100644 --- a/ports/boost-asio/CONTROL +++ b/ports/boost-asio/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-asio Version: 1.66.0-1 -Build-Depends: boost-coroutine (windows), boost-date-time, boost-regex, boost-system, boost-vcpkg-helpers, openssl +Build-Depends: boost-coroutine (!uwp), boost-date-time, boost-regex, boost-system, boost-vcpkg-helpers, openssl Description: Boost asio module diff --git a/ports/boost-atomic/CONTROL b/ports/boost-atomic/CONTROL index 4a625b6df..6289fb560 100644 --- a/ports/boost-atomic/CONTROL +++ b/ports/boost-atomic/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-atomic Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-integer, boost-type-traits, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-config, boost-integer, boost-modular-build-helper, boost-type-traits, boost-vcpkg-helpers Description: Boost atomic module diff --git a/ports/boost-chrono/CONTROL b/ports/boost-chrono/CONTROL index b5fb892cd..563547137 100644 --- a/ports/boost-chrono/CONTROL +++ b/ports/boost-chrono/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-chrono Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-detail, boost-integer, boost-move, boost-mpl, boost-predef, boost-ratio, boost-static-assert, boost-system, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-modular-build-helper, boost-move, boost-mpl, boost-predef, boost-ratio, boost-static-assert, boost-system, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost chrono module diff --git a/ports/boost-compute/CONTROL b/ports/boost-compute/CONTROL index 3c7b1c17e..9c90be96e 100644 --- a/ports/boost-compute/CONTROL +++ b/ports/boost-compute/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-compute Version: 1.66.0 -Build-Depends: boost-algorithm, boost-array, boost-assert, boost-chrono, boost-config, boost-core, boost-filesystem (windows), boost-function, boost-function-types, boost-fusion, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-preprocessor, boost-property-tree, boost-proto, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-uuid, boost-vcpkg-helpers +Build-Depends: boost-algorithm, boost-array, boost-assert, boost-chrono, boost-config, boost-core, boost-filesystem (!uwp), boost-function, boost-function-types, boost-fusion, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-preprocessor, boost-property-tree, boost-proto, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-uuid, boost-vcpkg-helpers Description: Boost compute module diff --git a/ports/boost-container/CONTROL b/ports/boost-container/CONTROL index 69e641d36..2fbed7951 100644 --- a/ports/boost-container/CONTROL +++ b/ports/boost-container/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-container Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-functional, boost-integer, boost-intrusive, boost-move, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-functional, boost-integer, boost-intrusive, boost-modular-build-helper, boost-move, boost-static-assert, boost-type-traits, boost-vcpkg-helpers Description: Boost container module diff --git a/ports/boost-context/CONTROL b/ports/boost-context/CONTROL index 22295dddc..bd72d021c 100644 --- a/ports/boost-context/CONTROL +++ b/ports/boost-context/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-context Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-detail, boost-integer, boost-pool, boost-predef, boost-smart-ptr, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-modular-build-helper, boost-pool, boost-predef, boost-smart-ptr, boost-vcpkg-helpers Description: Boost context module diff --git a/ports/boost-coroutine/CONTROL b/ports/boost-coroutine/CONTROL index 77683890a..998958b5f 100644 --- a/ports/boost-coroutine/CONTROL +++ b/ports/boost-coroutine/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-coroutine Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-context (windows), boost-detail, boost-exception, boost-integer, boost-move, boost-range, boost-system, boost-thread (windows), boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-config, boost-context (!uwp), boost-detail, boost-exception, boost-integer, boost-modular-build-helper, boost-move, boost-range, boost-system, boost-thread (!uwp), boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost coroutine module diff --git a/ports/boost-coroutine2/CONTROL b/ports/boost-coroutine2/CONTROL index fd52e362a..bd1156825 100644 --- a/ports/boost-coroutine2/CONTROL +++ b/ports/boost-coroutine2/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-coroutine2 Version: 1.66.0 -Build-Depends: boost-assert, boost-config, boost-context (windows), boost-detail, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-config, boost-context (!uwp), boost-detail, boost-vcpkg-helpers Description: Boost coroutine2 module diff --git a/ports/boost-date-time/CONTROL b/ports/boost-date-time/CONTROL index 8e8738e8d..6814dc0e1 100644 --- a/ports/boost-date-time/CONTROL +++ b/ports/boost-date-time/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-date-time Version: 1.66.0 -Build-Depends: boost-algorithm, boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-detail, boost-integer, boost-io, boost-lexical-cast, boost-math, boost-mpl, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Build-Depends: boost-algorithm, boost-assert, boost-build, boost-compatibility, boost-config, boost-detail, boost-integer, boost-io, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost date_time module diff --git a/ports/boost-dll/CONTROL b/ports/boost-dll/CONTROL index 96c9f59dc..cfb7e5e6e 100644 --- a/ports/boost-dll/CONTROL +++ b/ports/boost-dll/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-dll Version: 1.66.0 -Build-Depends: boost-config, boost-core, boost-filesystem (windows), boost-integer, boost-move, boost-mpl, boost-predef, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Build-Depends: boost-config, boost-core, boost-filesystem (!uwp), boost-integer, boost-move, boost-mpl, boost-predef, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost dll module diff --git a/ports/boost-exception/CONTROL b/ports/boost-exception/CONTROL index 476c53cf4..2f807d992 100644 --- a/ports/boost-exception/CONTROL +++ b/ports/boost-exception/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-exception Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-smart-ptr, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-modular-build-helper, boost-smart-ptr, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost exception module diff --git a/ports/boost-fiber/CONTROL b/ports/boost-fiber/CONTROL index b02c94a3b..a3b230904 100644 --- a/ports/boost-fiber/CONTROL +++ b/ports/boost-fiber/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-fiber Version: 1.66.0 -Build-Depends: boost-algorithm, boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-context (windows), boost-core, boost-detail, boost-filesystem (windows), boost-format, boost-intrusive, boost-predef, boost-smart-ptr, boost-vcpkg-helpers +Build-Depends: boost-algorithm, boost-assert, boost-build, boost-config, boost-context (!uwp), boost-core, boost-detail, boost-filesystem (!uwp), boost-format, boost-intrusive, boost-modular-build-helper, boost-predef, boost-smart-ptr, boost-vcpkg-helpers Description: Boost fiber module diff --git a/ports/boost-filesystem/CONTROL b/ports/boost-filesystem/CONTROL index 4717d608b..d50e6a177 100644 --- a/ports/boost-filesystem/CONTROL +++ b/ports/boost-filesystem/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-filesystem Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-detail, boost-functional, boost-integer, boost-io, boost-iterator, boost-range, boost-smart-ptr, boost-static-assert, boost-system, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-functional, boost-integer, boost-io, boost-iterator, boost-modular-build-helper, boost-range, boost-smart-ptr, boost-static-assert, boost-system, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost filesystem module diff --git a/ports/boost-graph-parallel/CONTROL b/ports/boost-graph-parallel/CONTROL index 3f1e8e1ed..13f28ffd5 100644 --- a/ports/boost-graph-parallel/CONTROL +++ b/ports/boost-graph-parallel/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-graph-parallel Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-detail, boost-dynamic-bitset, boost-function, boost-functional, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-detail, boost-dynamic-bitset, boost-function, boost-functional, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost graph_parallel module diff --git a/ports/boost-graph-parallel/portfile.cmake b/ports/boost-graph-parallel/portfile.cmake index 8d2fdb2eb..32e083f05 100644 --- a/ports/boost-graph-parallel/portfile.cmake +++ b/ports/boost-graph-parallel/portfile.cmake @@ -10,7 +10,5 @@ vcpkg_from_github( HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) -boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-graph/CONTROL b/ports/boost-graph/CONTROL index 12d74bc1e..a7dd22633 100644 --- a/ports/boost-graph/CONTROL +++ b/ports/boost-graph/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-graph Version: 1.66.0 -Build-Depends: boost-algorithm, boost-any, boost-array, boost-assert, boost-bimap, boost-bind, boost-build, boost-modular-build-helper, boost-compatibility, boost-concept-check, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-functional, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-preprocessor, boost-property-map, boost-property-tree, boost-random, boost-range, boost-regex, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-test (windows), boost-throw-exception, boost-tti, boost-tuple, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers, boost-xpressive +Build-Depends: boost-algorithm, boost-any, boost-array, boost-assert, boost-bimap, boost-bind, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-functional, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-preprocessor, boost-property-map, boost-property-tree, boost-random, boost-range, boost-regex, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-test (!uwp), boost-throw-exception, boost-tti, boost-tuple, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers, boost-xpressive Description: Boost graph module diff --git a/ports/boost-interval/CONTROL b/ports/boost-interval/CONTROL index 644558413..cfd096adc 100644 --- a/ports/boost-interval/CONTROL +++ b/ports/boost-interval/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-interval Version: 1.66.0 -Build-Depends: boost-compatibility, boost-config, boost-logic (windows), boost-vcpkg-helpers +Build-Depends: boost-compatibility, boost-config, boost-logic (!uwp), boost-vcpkg-helpers Description: Boost interval module diff --git a/ports/boost-iostreams/CONTROL b/ports/boost-iostreams/CONTROL index d48fdfd24..d0d82f8b6 100644 --- a/ports/boost-iostreams/CONTROL +++ b/ports/boost-iostreams/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-iostreams Version: 1.66.0 -Build-Depends: boost-assert, boost-bind, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, zlib +Build-Depends: boost-assert, boost-bind, boost-build, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, zlib Description: Boost iostreams module diff --git a/ports/boost-locale/CONTROL b/ports/boost-locale/CONTROL index 0a37505b1..5ed156bdd 100644 --- a/ports/boost-locale/CONTROL +++ b/ports/boost-locale/CONTROL @@ -1,7 +1,7 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-locale Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-function, boost-integer, boost-iterator, boost-smart-ptr, boost-static-assert, boost-thread (windows), boost-type-traits, boost-unordered, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-config, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-thread (!uwp), boost-type-traits, boost-unordered, boost-vcpkg-helpers, libiconv (!uwp&!windows) Description: Boost locale module Feature: icu diff --git a/ports/boost-locale/cmake-fragment.cmake b/ports/boost-locale/cmake-fragment.cmake new file mode 100644 index 000000000..11d3ed70e --- /dev/null +++ b/ports/boost-locale/cmake-fragment.cmake @@ -0,0 +1,10 @@ +find_library(LIBICONV_LIBRARY iconv) +get_filename_component(LIBICONV_DIR "${LIBICONV_LIBRARY}" DIRECTORY) + +list(APPEND B2_OPTIONS + boost.locale.iconv=on + boost.locale.posix=on + /boost/locale//boost_locale + boost.locale.icu=off + -sICONV_PATH=${LIBICONV_LIBRARY} +) diff --git a/ports/boost-locale/portfile.cmake b/ports/boost-locale/portfile.cmake index 9c1aa2ff4..e6d82a1a6 100644 --- a/ports/boost-locale/portfile.cmake +++ b/ports/boost-locale/portfile.cmake @@ -19,6 +19,7 @@ endif() include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build( SOURCE_PATH ${SOURCE_PATH} + BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/cmake-fragment.cmake" OPTIONS boost.locale.iconv=off boost.locale.posix=off diff --git a/ports/boost-log/CONTROL b/ports/boost-log/CONTROL index e8ac68f44..f8398c7ca 100644 --- a/ports/boost-log/CONTROL +++ b/ports/boost-log/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-log Version: 1.66.0 -Build-Depends: boost-align, boost-array, boost-asio, boost-assert, boost-atomic, boost-bind, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-date-time, boost-detail, boost-exception, boost-filesystem (windows), boost-function-types, boost-fusion, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iterator, boost-lexical-cast, boost-locale (windows), boost-math, boost-move, boost-mpl, boost-optional, boost-parameter, boost-phoenix, boost-predef, boost-preprocessor, boost-property-tree, boost-proto, boost-random, boost-range, boost-regex, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-thread (windows), boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi, boost-xpressive +Build-Depends: boost-align, boost-array, boost-asio, boost-assert, boost-atomic, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-date-time, boost-detail, boost-exception, boost-filesystem (!uwp), boost-function-types, boost-fusion, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iterator, boost-lexical-cast, boost-locale (!uwp), boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-parameter, boost-phoenix, boost-predef, boost-preprocessor, boost-property-tree, boost-proto, boost-random, boost-range, boost-regex, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-thread (!uwp), boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi, boost-xpressive Description: Boost log module diff --git a/ports/boost-math/CONTROL b/ports/boost-math/CONTROL index 33b230a22..2617f4412 100644 --- a/ports/boost-math/CONTROL +++ b/ports/boost-math/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-math Version: 1.66.0 -Build-Depends: boost-array, boost-assert, boost-atomic, boost-build, boost-modular-build-helper, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-integer, boost-lambda, boost-lexical-cast, boost-mpl, boost-predef, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-array, boost-assert, boost-atomic, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-integer, boost-lambda, boost-lexical-cast, boost-modular-build-helper, boost-mpl, boost-predef, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost math module diff --git a/ports/boost-modular-build-helper/CMakeLists.txt b/ports/boost-modular-build-helper/CMakeLists.txt index 20306e7ed..4153f0132 100644 --- a/ports/boost-modular-build-helper/CMakeLists.txt +++ b/ports/boost-modular-build-helper/CMakeLists.txt @@ -9,6 +9,10 @@ set(VCPKG_PLATFORM_TOOLSET external) set(B2_OPTIONS) +if(DEFINED BOOST_CMAKE_FRAGMENT) + include(${BOOST_CMAKE_FRAGMENT}) +endif() + # Add build type specific options if(BUILD_SHARED_LIBS) list(APPEND B2_OPTIONS runtime-link=shared) @@ -28,7 +32,11 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64") list(APPEND B2_OPTIONS address-model=64) endif() -list(APPEND B2_OPTIONS target-os=linux toolset=gcc) +if(APPLE) + list(APPEND B2_OPTIONS target-os=darwin toolset=clang) +else() + list(APPEND B2_OPTIONS target-os=linux toolset=gcc) +endif() string(REPLACE " " " " CXXFLAGS "${CMAKE_CXX_FLAGS}") #set(CXXFLAGS "${CXXFLAGS} -Wno-error=unused-command-line-argument") @@ -45,6 +53,10 @@ foreach(INCDIR ${CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES}) set(CXXFLAGS "${CXXFLAGS} ${CMAKE_INCLUDE_FLAG_C}${CMAKE_INCLUDE_FLAG_C_SEP}${INCDIR}") endforeach() +if(APPLE) + set(CXXFLAGS "${CXXFLAGS} -D_DARWIN_C_SOURCE") +endif() + find_library(ZLIB_LIBPATH z) list(APPEND B2_OPTIONS -sZLIB_BINARY=z diff --git a/ports/boost-modular-build-helper/CONTROL b/ports/boost-modular-build-helper/CONTROL index d57815738..a7f1ecf61 100644 --- a/ports/boost-modular-build-helper/CONTROL +++ b/ports/boost-modular-build-helper/CONTROL @@ -1,2 +1,2 @@ Source: boost-modular-build-helper -Version: 2 +Version: 2018-04-15 diff --git a/ports/boost-modular-build-helper/boost-modular-build.cmake b/ports/boost-modular-build-helper/boost-modular-build.cmake index 222fc7fe9..2833c51a6 100644 --- a/ports/boost-modular-build-helper/boost-modular-build.cmake +++ b/ports/boost-modular-build-helper/boost-modular-build.cmake @@ -1,5 +1,5 @@ function(boost_modular_build) - cmake_parse_arguments(_bm "" "SOURCE_PATH;REQUIREMENTS" "OPTIONS" ${ARGN}) + cmake_parse_arguments(_bm "" "SOURCE_PATH;REQUIREMENTS;BOOST_CMAKE_FRAGMENT" "OPTIONS" ${ARGN}) if(NOT DEFINED _bm_SOURCE_PATH) message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_build.") @@ -80,6 +80,9 @@ function(boost_modular_build) configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(DEFINED _bm_BOOST_CMAKE_FRAGMENT) + set(fragment_option "-DBOOST_CMAKE_FRAGMENT=${_bm_BOOST_CMAKE_FRAGMENT}") + endif() vcpkg_configure_cmake( SOURCE_PATH ${CURRENT_INSTALLED_DIR}/share/boost-build PREFER_NINJA @@ -87,8 +90,13 @@ function(boost_modular_build) "-DB2_EXE=${B2_EXE}" "-DSOURCE_PATH=${_bm_SOURCE_PATH}" "-DBOOST_BUILD_PATH=${BOOST_BUILD_PATH}" + ${fragment_option} ) vcpkg_install_cmake() + + if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/lib) + message(FATAL_ERROR "No libraries were produced. This indicates a failure while building the boost library.") + endif() return() endif() diff --git a/ports/boost-modular-build-helper/user-config.jam b/ports/boost-modular-build-helper/user-config.jam index bd3797283..abefc7fae 100644 --- a/ports/boost-modular-build-helper/user-config.jam +++ b/ports/boost-modular-build-helper/user-config.jam @@ -45,3 +45,6 @@ lib icuin : : "@CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib" debu lib icudt : : "@CURRENT_INSTALLED_DIR@/lib/icudt.lib" release : : ; lib icudt : : "@CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib" debug : : ; + +lib iconv : : "@LIBICONV_LIBRARY@" shared shared release : : ; +lib iconv : : "@LIBICONV_LIBRARY@" shared shared debug : : ; diff --git a/ports/boost-mpi/CONTROL b/ports/boost-mpi/CONTROL index 30ce81a1d..b5cfcd106 100644 --- a/ports/boost-mpi/CONTROL +++ b/ports/boost-mpi/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-mpi Version: 1.66.0-1 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, msmpi +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, msmpi Description: Boost mpi module diff --git a/ports/boost-poly-collection/CONTROL b/ports/boost-poly-collection/CONTROL index 66679c5c9..d8b2b34ec 100644 --- a/ports/boost-poly-collection/CONTROL +++ b/ports/boost-poly-collection/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-poly-collection Version: 1.66.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-iterator, boost-mpl, boost-type-erasure (windows), boost-type-traits, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-iterator, boost-mpl, boost-type-erasure (!uwp), boost-type-traits, boost-vcpkg-helpers Description: Boost poly_collection module diff --git a/ports/boost-pool/CONTROL b/ports/boost-pool/CONTROL index 141cc45c3..8c054f8a9 100644 --- a/ports/boost-pool/CONTROL +++ b/ports/boost-pool/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-pool Version: 1.66.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-detail, boost-integer, boost-thread (windows), boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-detail, boost-integer, boost-thread (!uwp), boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost pool module diff --git a/ports/boost-process/CONTROL b/ports/boost-process/CONTROL index 28d9c027d..25ddd60ef 100644 --- a/ports/boost-process/CONTROL +++ b/ports/boost-process/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-process Version: 1.66.0 -Build-Depends: boost-algorithm, boost-asio, boost-config, boost-core, boost-filesystem (windows), boost-fusion, boost-iterator, boost-move, boost-optional, boost-system, boost-tokenizer, boost-type-index, boost-vcpkg-helpers, boost-winapi +Build-Depends: boost-algorithm, boost-asio, boost-config, boost-core, boost-filesystem (!uwp), boost-fusion, boost-iterator, boost-move, boost-optional, boost-system, boost-tokenizer, boost-type-index, boost-vcpkg-helpers, boost-winapi Description: Boost process module diff --git a/ports/boost-program-options/CONTROL b/ports/boost-program-options/CONTROL index b43937e55..931843a34 100644 --- a/ports/boost-program-options/CONTROL +++ b/ports/boost-program-options/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-program-options Version: 1.66.0 -Build-Depends: boost-any, boost-bind, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-lexical-cast, boost-math, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-vcpkg-helpers +Build-Depends: boost-any, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-vcpkg-helpers Description: Boost program_options module diff --git a/ports/boost-random/CONTROL b/ports/boost-random/CONTROL index 1efeeaafa..2fa6b682c 100644 --- a/ports/boost-random/CONTROL +++ b/ports/boost-random/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-random Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-math, boost-mpl, boost-range, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-math, boost-modular-build-helper, boost-mpl, boost-range, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost random module diff --git a/ports/boost-regex/CONTROL b/ports/boost-regex/CONTROL index efd3e7f7e..1ff1473ac 100644 --- a/ports/boost-regex/CONTROL +++ b/ports/boost-regex/CONTROL @@ -1,7 +1,7 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-regex Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-iterator, boost-mpl, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost regex module Feature: icu diff --git a/ports/boost-serialization/CONTROL b/ports/boost-serialization/CONTROL index ae97a8c30..1cfc392e9 100644 --- a/ports/boost-serialization/CONTROL +++ b/ports/boost-serialization/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-serialization Version: 1.66.0 -Build-Depends: boost-array, boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-io, boost-iterator, boost-move, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-spirit, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers +Build-Depends: boost-array, boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-io, boost-iterator, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-spirit, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost serialization module diff --git a/ports/boost-signals/CONTROL b/ports/boost-signals/CONTROL index 160f73c51..1b3743e2f 100644 --- a/ports/boost-signals/CONTROL +++ b/ports/boost-signals/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-signals Version: 1.66.0 -Build-Depends: boost-any, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-function, boost-iterator, boost-optional, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-any, boost-build, boost-config, boost-core, boost-function, boost-iterator, boost-modular-build-helper, boost-optional, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost signals module diff --git a/ports/boost-spirit/CONTROL b/ports/boost-spirit/CONTROL index ed71760c0..f79535e4c 100644 --- a/ports/boost-spirit/CONTROL +++ b/ports/boost-spirit/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-spirit Version: 1.66.0 -Build-Depends: boost-algorithm, boost-array, boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-endian, boost-filesystem (windows), boost-foreach, boost-function, boost-function-types, boost-fusion, boost-integer, boost-io, boost-iostreams (windows), boost-iterator, boost-lexical-cast, boost-locale (windows), boost-math, boost-move, boost-mpl, boost-optional, boost-phoenix, boost-pool, boost-preprocessor, boost-proto, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-thread (windows), boost-throw-exception, boost-tti, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers +Build-Depends: boost-algorithm, boost-array, boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-endian, boost-filesystem (!uwp), boost-foreach, boost-function, boost-function-types, boost-fusion, boost-integer, boost-io, boost-iostreams (!uwp), boost-iterator, boost-lexical-cast, boost-locale (!uwp), boost-math, boost-move, boost-mpl, boost-optional, boost-phoenix, boost-pool, boost-preprocessor, boost-proto, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-thread (!uwp), boost-throw-exception, boost-tti, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost spirit module diff --git a/ports/boost-stacktrace/CONTROL b/ports/boost-stacktrace/CONTROL index 9979ef4e1..c55b3ea01 100644 --- a/ports/boost-stacktrace/CONTROL +++ b/ports/boost-stacktrace/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-stacktrace Version: 1.66.0 -Build-Depends: boost-array, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-lexical-cast, boost-math, boost-static-assert, boost-type-traits, boost-vcpkg-helpers, boost-winapi +Build-Depends: boost-array, boost-build, boost-config, boost-core, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-static-assert, boost-type-traits, boost-vcpkg-helpers, boost-winapi Description: Boost stacktrace module diff --git a/ports/boost-system/CONTROL b/ports/boost-system/CONTROL index 953782bfb..95f01a09c 100644 --- a/ports/boost-system/CONTROL +++ b/ports/boost-system/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-system Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-integer, boost-predef, boost-utility, boost-vcpkg-helpers, boost-winapi +Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-integer, boost-modular-build-helper, boost-predef, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost system module diff --git a/ports/boost-test/CONTROL b/ports/boost-test/CONTROL index 95b0d8fe9..f77ae6c94 100644 --- a/ports/boost-test/CONTROL +++ b/ports/boost-test/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-test Version: 1.66.0-2 -Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-io, boost-iterator, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-range, boost-smart-ptr, boost-static-assert, boost-timer, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-io, boost-iterator, boost-modular-build-helper, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-range, boost-smart-ptr, boost-static-assert, boost-timer, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost test module diff --git a/ports/boost-test/portfile.cmake b/ports/boost-test/portfile.cmake index acb28c7d4..329256a83 100644 --- a/ports/boost-test/portfile.cmake +++ b/ports/boost-test/portfile.cmake @@ -14,7 +14,6 @@ include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) file(GLOB MONITOR_LIBS ${CURRENT_PACKAGES_DIR}/lib/*_exec_monitor*) @@ -28,3 +27,4 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") file(COPY ${DEBUG_MONITOR_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) file(REMOVE ${DEBUG_MONITOR_LIBS}) endif() + diff --git a/ports/boost-thread/CONTROL b/ports/boost-thread/CONTROL index 33bc787a1..963eaa5bc 100644 --- a/ports/boost-thread/CONTROL +++ b/ports/boost-thread/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-thread Version: 1.66.0 -Build-Depends: boost-algorithm, boost-assert, boost-atomic, boost-bind, boost-build, boost-modular-build-helper, boost-chrono, boost-concept-check, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-function, boost-functional, boost-integer, boost-intrusive, boost-io, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Build-Depends: boost-algorithm, boost-assert, boost-atomic, boost-bind, boost-build, boost-chrono, boost-concept-check, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-function, boost-functional, boost-integer, boost-intrusive, boost-io, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost thread module diff --git a/ports/boost-timer/CONTROL b/ports/boost-timer/CONTROL index b24137fbb..328b78579 100644 --- a/ports/boost-timer/CONTROL +++ b/ports/boost-timer/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-timer Version: 1.66.0 -Build-Depends: boost-build, boost-modular-build-helper, boost-chrono, boost-compatibility, boost-config, boost-core, boost-integer, boost-io, boost-system, boost-throw-exception, boost-vcpkg-helpers +Build-Depends: boost-build, boost-chrono, boost-compatibility, boost-config, boost-core, boost-integer, boost-io, boost-modular-build-helper, boost-system, boost-throw-exception, boost-vcpkg-helpers Description: Boost timer module diff --git a/ports/boost-type-erasure/CONTROL b/ports/boost-type-erasure/CONTROL index 786acf596..b8e6bc4dd 100644 --- a/ports/boost-type-erasure/CONTROL +++ b/ports/boost-type-erasure/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-type-erasure Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-detail, boost-fusion, boost-iterator, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread (windows), boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-fusion, boost-iterator, boost-modular-build-helper, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread (!uwp), boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost type_erasure module diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index 55fa476f4..7f5ecc9fb 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -6,7 +6,8 @@ param ( $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition -$libsDisabledInUWP = "iostreams|filesystem|thread|context|python|stacktrace|program-options|program_options|coroutine`$|fiber|locale|test|type-erasure|type_erasure|wave|log" +$libsDisabledInLinux = "python|fiber" +$libsDisabledInUWP = "iostreams|filesystem|thread|context|python|stacktrace|program[_-]options|coroutine`$|fiber|locale|test|type[_-]erasure|wave|log" function Generate() { @@ -100,6 +101,7 @@ function Generate() "include(`${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)" "boost_modular_build(" " SOURCE_PATH `${SOURCE_PATH}" + " BOOST_CMAKE_FRAGMENT `"`${CMAKE_CURRENT_LIST_DIR}/cmake-fragment.cmake`"" " OPTIONS" " boost.locale.iconv=off" " boost.locale.posix=off" @@ -307,10 +309,14 @@ foreach ($library in $libraries) -and ` (($library -notmatch "utility|concept_check") -or ($_ -notmatch "iterator")) } | % { "boost-$_" -replace "_","-" } | % { - if ($_ -match $libsDisabledInUWP) + if ($_ -match $libsDisabledInLinux -and $_ -match $libsDisabledInUWP) { "$_ (windows)" } + elseif ($_ -match $libsDisabledInUWP) + { + "$_ (!uwp)" + } else { $_ @@ -320,7 +326,7 @@ foreach ($library in $libraries) $deps += @("boost-vcpkg-helpers") $needsBuild = $false - if ((Test-Path $unpacked/build/Jamfile.v2) -and $library -ne "metaparse") + if ((Test-Path $unpacked/build/Jamfile.v2) -and $library -ne "metaparse" -and $library -ne "graph_parallel") { $deps += @("boost-build", "boost-modular-build-helper") $needsBuild = $true @@ -335,6 +341,10 @@ foreach ($library in $libraries) { $deps += @("zlib", "bzip2") } + elseif ($library -eq "locale") + { + $deps += @("libiconv (!uwp&!windows)") + } elseif ($library -eq "asio") { $deps += @("openssl") @@ -350,10 +360,14 @@ foreach ($library in $libraries) -Depends $deps ` -NeedsBuild $needsBuild - if ($library -match $libsDisabledInUWP) + if ($library -match $libsDisabledInLinux -and $library -match $libsDisabledInUWP) { $libraries_in_boost_port += @("$library (windows)") } + elseif ($library -match $libsDisabledInUWP) + { + $libraries_in_boost_port += @("$library (!uwp)") + } else { $libraries_in_boost_port += @($library) diff --git a/ports/boost-wave/CONTROL b/ports/boost-wave/CONTROL index 4fffc2e71..251703103 100644 --- a/ports/boost-wave/CONTROL +++ b/ports/boost-wave/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-wave Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-concept-check, boost-config, boost-core, boost-detail, boost-filesystem (windows), boost-integer, boost-iterator, boost-mpl, boost-multi-index, boost-pool, boost-preprocessor, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Build-Depends: boost-assert, boost-build, boost-concept-check, boost-config, boost-core, boost-detail, boost-filesystem (!uwp), boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-multi-index, boost-pool, boost-preprocessor, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost wave module diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 0153a151a..72993bba6 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -2,7 +2,7 @@ Source: boost Version: 1.66.0 Description: Peer-reviewed portable C++ source libraries -Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-context (windows), boost-conversion, boost-convert, boost-core, boost-coroutine (windows), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-disjoint-sets, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (windows), boost-filesystem (windows), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (windows), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (windows), boost-local-function, boost-lockfree, boost-log (windows), boost-logic (windows), boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-optional, boost-parameter, boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options (windows), boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (windows), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-scope-exit, boost-serialization, boost-signals, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (windows), boost-statechart, boost-static-assert, boost-system, boost-test (windows), boost-thread (windows), boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure (windows), boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-vmd, boost-wave (windows), boost-winapi, boost-xpressive +Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-context (!uwp), boost-conversion, boost-convert, boost-core, boost-coroutine (!uwp), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-disjoint-sets, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (windows), boost-filesystem (!uwp), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (!uwp), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (!uwp), boost-local-function, boost-lockfree, boost-log (!uwp), boost-logic (!uwp), boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-optional, boost-parameter, boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options (!uwp), boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (windows), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-scope-exit, boost-serialization, boost-signals, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (!uwp), boost-statechart, boost-static-assert, boost-system, boost-test (!uwp), boost-thread (!uwp), boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure (!uwp), boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-vmd, boost-wave (!uwp), boost-winapi, boost-xpressive Feature: mpi Description: Build with MPI support -- cgit v1.2.3 From fb0c047b4d78c3150d16e401f0714475a02009b5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 16:26:20 -0700 Subject: [azure-storage-cpp] Support non-windows --- ports/azure-storage-cpp/CONTROL | 2 +- ports/azure-storage-cpp/glibmm-cmake.patch | 13 ++++++++ ports/azure-storage-cpp/portfile.cmake | 3 ++ ports/azure-storage-cpp/pplx-do-while.patch | 52 +++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 ports/azure-storage-cpp/glibmm-cmake.patch create mode 100644 ports/azure-storage-cpp/pplx-do-while.patch diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index 0da717ba7..c68552bba 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp Version: 3.2.1 -Build-Depends: cpprestsdk, atlmfc +Build-Depends: cpprestsdk, atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), glibmm (!windows&!uwp), libxmlpp (!windows&!uwp), libuuid (!windows&!uwp) 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. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ diff --git a/ports/azure-storage-cpp/glibmm-cmake.patch b/ports/azure-storage-cpp/glibmm-cmake.patch new file mode 100644 index 000000000..4d3e4a8cd --- /dev/null +++ b/ports/azure-storage-cpp/glibmm-cmake.patch @@ -0,0 +1,13 @@ +diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake +index 79a4bcb..fe130bd 100644 +--- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake ++++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake +@@ -36,7 +36,7 @@ find_path(GlibmmConfig_INCLUDE_DIR + ) + + find_library(Glibmm_LIBRARY +- NAMES glibmm-2.4 ++ NAMES glibmm glibmm-2.4 + PATHS + ${Glibmm_PKGCONF_LIBRARY_DIRS} + /usr diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index edac1e2a2..2f8e921a5 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -18,11 +18,14 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/cmake.patch ${CMAKE_CURRENT_LIST_DIR}/static-builds.patch ${CMAKE_CURRENT_LIST_DIR}/support-cpprest-findpackage.patch + ${CMAKE_CURRENT_LIST_DIR}/glibmm-cmake.patch + ${CMAKE_CURRENT_LIST_DIR}/pplx-do-while.patch ) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/Microsoft.WindowsAzure.Storage OPTIONS + -DCMAKE_FIND_FRAMEWORK=LAST -DBUILD_TESTS=OFF -DBUILD_SAMPLES=OFF ) diff --git a/ports/azure-storage-cpp/pplx-do-while.patch b/ports/azure-storage-cpp/pplx-do-while.patch new file mode 100644 index 000000000..0c2163442 --- /dev/null +++ b/ports/azure-storage-cpp/pplx-do-while.patch @@ -0,0 +1,52 @@ +diff --git a/Microsoft.WindowsAzure.Storage/includes/wascore/executor.h b/Microsoft.WindowsAzure.Storage/includes/wascore/executor.h +index 756163d..6fbfd44 100644 +--- a/Microsoft.WindowsAzure.Storage/includes/wascore/executor.h ++++ b/Microsoft.WindowsAzure.Storage/includes/wascore/executor.h +@@ -366,7 +366,7 @@ namespace azure { namespace storage { namespace core { + // TODO: Reduce usage of auto variable types + + auto instance = std::make_shared(command, options, context); +- return pplx::details::do_while([instance]() -> pplx::task ++ return details::_do_while([instance]() -> pplx::task + { + // 0. Begin request + instance->validate_location_mode(); +diff --git a/Microsoft.WindowsAzure.Storage/includes/wascore/util.h b/Microsoft.WindowsAzure.Storage/includes/wascore/util.h +index f3401f2..6a6aa48 100644 +--- a/Microsoft.WindowsAzure.Storage/includes/wascore/util.h ++++ b/Microsoft.WindowsAzure.Storage/includes/wascore/util.h +@@ -127,6 +127,21 @@ namespace azure { namespace storage { namespace core { + }; + #endif + ++ namespace details ++ { ++ template ++ pplx::task _do_while(F func) ++ { ++ pplx::task first = func(); ++ return first.then([=](bool guard) -> pplx::task { ++ if (guard) ++ return azure::storage::core::details::_do_while(func); ++ else ++ return first; ++ }); ++ } ++ } ++ + }}} // namespace azure::storage::core + + #pragma pop_macro("max") +diff --git a/Microsoft.WindowsAzure.Storage/src/util.cpp b/Microsoft.WindowsAzure.Storage/src/util.cpp +index dd2250a..b8d1341 100644 +--- a/Microsoft.WindowsAzure.Storage/src/util.cpp ++++ b/Microsoft.WindowsAzure.Storage/src/util.cpp +@@ -98,7 +98,7 @@ namespace azure { namespace storage { namespace core { + auto obuffer = ostream.streambuf(); + auto length_ptr = (length != std::numeric_limits::max()) ? std::make_shared(length) : nullptr; + auto total_ptr = std::make_shared(0); +- return pplx::details::do_while([istream, obuffer, buffer_size, length_ptr, total_ptr, max_length] () -> pplx::task ++ return azure::storage::core::details::_do_while([istream, obuffer, buffer_size, length_ptr, total_ptr, max_length] () -> pplx::task + { + size_t read_length = buffer_size; + if ((length_ptr != nullptr) && (*length_ptr < read_length)) -- cgit v1.2.3 From 751015f6a44d6f89ca71ac63d7c5cab83cf531c0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 15:18:09 -0700 Subject: [boost] Update to 1.67 --- ports/boost-accumulators/CONTROL | 2 +- ports/boost-accumulators/portfile.cmake | 4 +- ports/boost-algorithm/CONTROL | 2 +- ports/boost-algorithm/portfile.cmake | 4 +- ports/boost-align/CONTROL | 2 +- ports/boost-align/portfile.cmake | 4 +- ports/boost-any/CONTROL | 2 +- ports/boost-any/portfile.cmake | 4 +- ports/boost-array/CONTROL | 2 +- ports/boost-array/portfile.cmake | 4 +- ports/boost-asio/CONTROL | 2 +- ports/boost-asio/portfile.cmake | 4 +- ports/boost-assert/CONTROL | 2 +- ports/boost-assert/portfile.cmake | 4 +- ports/boost-assign/CONTROL | 4 +- ports/boost-assign/portfile.cmake | 4 +- ports/boost-atomic/CONTROL | 2 +- ports/boost-atomic/portfile.cmake | 4 +- ports/boost-beast/CONTROL | 4 +- ports/boost-beast/portfile.cmake | 4 +- ports/boost-bimap/CONTROL | 2 +- ports/boost-bimap/portfile.cmake | 4 +- ports/boost-bind/CONTROL | 2 +- ports/boost-bind/portfile.cmake | 4 +- ports/boost-build/CONTROL | 2 +- ports/boost-build/portfile.cmake | 12 +++--- ports/boost-callable-traits/CONTROL | 2 +- ports/boost-callable-traits/portfile.cmake | 4 +- ports/boost-chrono/CONTROL | 2 +- ports/boost-chrono/portfile.cmake | 4 +- ports/boost-circular-buffer/CONTROL | 2 +- ports/boost-circular-buffer/portfile.cmake | 4 +- ports/boost-compatibility/CONTROL | 2 +- ports/boost-compatibility/portfile.cmake | 4 +- ports/boost-compute/CONTROL | 2 +- ports/boost-compute/portfile.cmake | 4 +- ports/boost-concept-check/CONTROL | 2 +- ports/boost-concept-check/portfile.cmake | 4 +- ports/boost-config/CONTROL | 2 +- ports/boost-config/portfile.cmake | 5 ++- ports/boost-container-hash/CONTROL | 5 +++ ports/boost-container-hash/portfile.cmake | 14 +++++++ ports/boost-container/CONTROL | 2 +- ports/boost-container/portfile.cmake | 4 +- ports/boost-context/CONTROL | 2 +- ports/boost-context/portfile.cmake | 9 +++- ports/boost-contract/CONTROL | 5 +++ ports/boost-contract/portfile.cmake | 16 ++++++++ ports/boost-conversion/CONTROL | 2 +- ports/boost-conversion/portfile.cmake | 4 +- ports/boost-convert/CONTROL | 2 +- ports/boost-convert/portfile.cmake | 4 +- ports/boost-core/CONTROL | 2 +- ports/boost-core/portfile.cmake | 4 +- ports/boost-coroutine/CONTROL | 2 +- ports/boost-coroutine/portfile.cmake | 4 +- ports/boost-coroutine2/CONTROL | 2 +- ports/boost-coroutine2/portfile.cmake | 4 +- ports/boost-crc/CONTROL | 2 +- ports/boost-crc/portfile.cmake | 4 +- ports/boost-date-time/CONTROL | 4 +- ports/boost-date-time/portfile.cmake | 4 +- ports/boost-detail/CONTROL | 2 +- ports/boost-detail/portfile.cmake | 4 +- ports/boost-disjoint-sets/CONTROL | 2 +- ports/boost-disjoint-sets/portfile.cmake | 4 +- ports/boost-dll/CONTROL | 4 +- ports/boost-dll/portfile.cmake | 4 +- ports/boost-dynamic-bitset/CONTROL | 2 +- ports/boost-dynamic-bitset/portfile.cmake | 4 +- ports/boost-endian/CONTROL | 2 +- ports/boost-endian/portfile.cmake | 4 +- ports/boost-exception/CONTROL | 2 +- ports/boost-exception/portfile.cmake | 4 +- ports/boost-fiber/CONTROL | 2 +- ports/boost-fiber/portfile.cmake | 9 +++- ports/boost-filesystem/CONTROL | 2 +- ports/boost-filesystem/portfile.cmake | 4 +- ports/boost-flyweight/CONTROL | 2 +- ports/boost-flyweight/portfile.cmake | 4 +- ports/boost-foreach/CONTROL | 2 +- ports/boost-foreach/portfile.cmake | 4 +- ports/boost-format/CONTROL | 2 +- ports/boost-format/portfile.cmake | 4 +- ports/boost-function-types/CONTROL | 2 +- ports/boost-function-types/portfile.cmake | 4 +- ports/boost-function/CONTROL | 2 +- ports/boost-function/portfile.cmake | 4 +- ports/boost-functional/CONTROL | 4 +- ports/boost-functional/portfile.cmake | 4 +- ports/boost-fusion/CONTROL | 2 +- ports/boost-fusion/portfile.cmake | 4 +- ports/boost-geometry/CONTROL | 2 +- ports/boost-geometry/portfile.cmake | 4 +- ports/boost-gil/CONTROL | 2 +- ports/boost-gil/portfile.cmake | 4 +- ports/boost-graph-parallel/CONTROL | 2 +- ports/boost-graph-parallel/portfile.cmake | 4 +- ports/boost-graph/CONTROL | 2 +- ports/boost-graph/portfile.cmake | 4 +- ports/boost-hana/CONTROL | 2 +- ports/boost-hana/portfile.cmake | 4 +- ports/boost-heap/CONTROL | 2 +- ports/boost-heap/portfile.cmake | 4 +- ports/boost-hof/CONTROL | 5 +++ ports/boost-hof/portfile.cmake | 14 +++++++ ports/boost-icl/CONTROL | 2 +- ports/boost-icl/portfile.cmake | 4 +- ports/boost-integer/CONTROL | 2 +- ports/boost-integer/portfile.cmake | 4 +- ports/boost-interprocess/CONTROL | 2 +- ports/boost-interprocess/portfile.cmake | 4 +- ports/boost-interval/CONTROL | 2 +- ports/boost-interval/portfile.cmake | 4 +- ports/boost-intrusive/CONTROL | 2 +- ports/boost-intrusive/portfile.cmake | 4 +- ports/boost-io/CONTROL | 2 +- ports/boost-io/portfile.cmake | 4 +- ports/boost-iostreams/CMakeLists.txt | 37 +++++++++++++++++ ports/boost-iostreams/CONTROL | 4 +- ports/boost-iostreams/portfile.cmake | 26 +++++++++--- ports/boost-iterator/CONTROL | 2 +- ports/boost-iterator/portfile.cmake | 4 +- ports/boost-lambda/CONTROL | 2 +- ports/boost-lambda/portfile.cmake | 4 +- ports/boost-lexical-cast/CONTROL | 2 +- ports/boost-lexical-cast/portfile.cmake | 4 +- ports/boost-local-function/CONTROL | 2 +- ports/boost-local-function/portfile.cmake | 4 +- ports/boost-locale/CONTROL | 2 +- ports/boost-locale/portfile.cmake | 4 +- ports/boost-lockfree/CONTROL | 2 +- ports/boost-lockfree/portfile.cmake | 4 +- ports/boost-log/CONTROL | 4 +- ports/boost-log/portfile.cmake | 17 +++++++- ports/boost-logic/CONTROL | 2 +- ports/boost-logic/portfile.cmake | 4 +- ports/boost-math/CONTROL | 2 +- ports/boost-math/portfile.cmake | 4 +- ports/boost-metaparse/CONTROL | 2 +- ports/boost-metaparse/portfile.cmake | 4 +- ports/boost-modular-build-helper/CMakeLists.txt | 2 +- ports/boost-modular-build-helper/CONTROL | 2 +- ports/boost-modular-build-helper/Jamroot.jam | 7 +++- .../boost-modular-build.cmake | 35 +++++----------- ports/boost-move/CONTROL | 2 +- ports/boost-move/portfile.cmake | 4 +- ports/boost-mp11/CONTROL | 4 +- ports/boost-mp11/portfile.cmake | 4 +- ports/boost-mpi/CONTROL | 4 +- ports/boost-mpi/portfile.cmake | 4 +- ports/boost-mpl/CONTROL | 2 +- ports/boost-mpl/portfile.cmake | 4 +- ports/boost-msm/CONTROL | 2 +- ports/boost-msm/portfile.cmake | 4 +- ports/boost-multi-array/CONTROL | 2 +- ports/boost-multi-array/portfile.cmake | 4 +- ports/boost-multi-index/CONTROL | 2 +- ports/boost-multi-index/portfile.cmake | 4 +- ports/boost-multiprecision/CONTROL | 2 +- ports/boost-multiprecision/portfile.cmake | 4 +- ports/boost-numeric-conversion/CONTROL | 2 +- ports/boost-numeric-conversion/portfile.cmake | 4 +- ports/boost-odeint/CONTROL | 2 +- ports/boost-odeint/portfile.cmake | 4 +- ports/boost-optional/CONTROL | 2 +- ports/boost-optional/portfile.cmake | 4 +- ports/boost-parameter/CONTROL | 2 +- ports/boost-parameter/portfile.cmake | 4 +- ports/boost-phoenix/CONTROL | 2 +- ports/boost-phoenix/portfile.cmake | 4 +- ports/boost-poly-collection/CONTROL | 2 +- ports/boost-poly-collection/portfile.cmake | 4 +- ports/boost-polygon/CONTROL | 2 +- ports/boost-polygon/portfile.cmake | 4 +- ports/boost-pool/CONTROL | 2 +- ports/boost-pool/portfile.cmake | 4 +- ports/boost-predef/CONTROL | 2 +- ports/boost-predef/portfile.cmake | 6 ++- ports/boost-preprocessor/CONTROL | 2 +- ports/boost-preprocessor/portfile.cmake | 4 +- ports/boost-process/CONTROL | 2 +- ports/boost-process/portfile.cmake | 4 +- ports/boost-program-options/CONTROL | 2 +- ports/boost-program-options/portfile.cmake | 4 +- ports/boost-property-map/CONTROL | 2 +- ports/boost-property-map/portfile.cmake | 4 +- ports/boost-property-tree/CONTROL | 2 +- ports/boost-property-tree/portfile.cmake | 4 +- ports/boost-proto/CONTROL | 2 +- ports/boost-proto/portfile.cmake | 4 +- ports/boost-ptr-container/CONTROL | 2 +- ports/boost-ptr-container/portfile.cmake | 4 +- ports/boost-python/CONTROL | 2 +- ports/boost-python/portfile.cmake | 4 +- ports/boost-qvm/CONTROL | 2 +- ports/boost-qvm/portfile.cmake | 4 +- ports/boost-random/CONTROL | 4 +- ports/boost-random/portfile.cmake | 4 +- ports/boost-range/CONTROL | 2 +- ports/boost-range/portfile.cmake | 4 +- ports/boost-ratio/CONTROL | 2 +- ports/boost-ratio/portfile.cmake | 4 +- ports/boost-rational/CONTROL | 2 +- ports/boost-rational/portfile.cmake | 4 +- ports/boost-regex/CONTROL | 4 +- ports/boost-regex/portfile.cmake | 4 +- ports/boost-scope-exit/CONTROL | 2 +- ports/boost-scope-exit/portfile.cmake | 4 +- ports/boost-serialization/CONTROL | 2 +- ports/boost-serialization/portfile.cmake | 4 +- ports/boost-signals/CONTROL | 2 +- ports/boost-signals/portfile.cmake | 4 +- ports/boost-signals2/CONTROL | 2 +- ports/boost-signals2/portfile.cmake | 4 +- ports/boost-smart-ptr/CONTROL | 2 +- ports/boost-smart-ptr/portfile.cmake | 4 +- ports/boost-sort/CONTROL | 4 +- ports/boost-sort/portfile.cmake | 4 +- ports/boost-spirit/CONTROL | 2 +- ports/boost-spirit/portfile.cmake | 4 +- ports/boost-stacktrace/CONTROL | 4 +- ports/boost-stacktrace/portfile.cmake | 4 +- ports/boost-statechart/CONTROL | 2 +- ports/boost-statechart/portfile.cmake | 4 +- ports/boost-static-assert/CONTROL | 2 +- ports/boost-static-assert/portfile.cmake | 4 +- ports/boost-system/CONTROL | 2 +- ports/boost-system/portfile.cmake | 4 +- ports/boost-test/CONTROL | 4 +- ports/boost-test/portfile.cmake | 9 +++- ports/boost-thread/CONTROL | 2 +- ports/boost-thread/b2-options.cmake | 1 + ports/boost-thread/portfile.cmake | 11 +++-- ports/boost-throw-exception/CONTROL | 2 +- ports/boost-throw-exception/portfile.cmake | 4 +- ports/boost-timer/CONTROL | 2 +- ports/boost-timer/portfile.cmake | 4 +- ports/boost-tokenizer/CONTROL | 2 +- ports/boost-tokenizer/portfile.cmake | 4 +- ports/boost-tti/CONTROL | 2 +- ports/boost-tti/portfile.cmake | 4 +- ports/boost-tuple/CONTROL | 2 +- ports/boost-tuple/portfile.cmake | 4 +- ports/boost-type-erasure/CONTROL | 4 +- ports/boost-type-erasure/portfile.cmake | 4 +- ports/boost-type-index/CONTROL | 4 +- ports/boost-type-index/portfile.cmake | 4 +- ports/boost-type-traits/CONTROL | 2 +- ports/boost-type-traits/portfile.cmake | 4 +- ports/boost-typeof/CONTROL | 2 +- ports/boost-typeof/portfile.cmake | 4 +- ports/boost-ublas/CONTROL | 2 +- ports/boost-ublas/portfile.cmake | 4 +- ports/boost-units/CONTROL | 2 +- ports/boost-units/portfile.cmake | 4 +- ports/boost-unordered/CONTROL | 4 +- ports/boost-unordered/portfile.cmake | 4 +- ports/boost-utility/CONTROL | 4 +- ports/boost-utility/portfile.cmake | 4 +- ports/boost-uuid/CONTROL | 4 +- ports/boost-uuid/portfile.cmake | 4 +- ports/boost-variant/CONTROL | 4 +- ports/boost-variant/portfile.cmake | 4 +- ports/boost-vcpkg-helpers/generate-ports.ps1 | 44 ++++++++++++++------ .../post-source-stubs/context.cmake | 5 +++ .../post-source-stubs/fiber.cmake | 5 +++ .../post-source-stubs/log.cmake | 13 ++++++ .../post-source-stubs/python.cmake | 5 +++ .../post-source-stubs/test.cmake | 5 +++ ports/boost-vmd/CONTROL | 2 +- ports/boost-vmd/portfile.cmake | 4 +- ports/boost-wave/CONTROL | 4 +- ports/boost-wave/portfile.cmake | 4 +- ports/boost-winapi/CONTROL | 2 +- ports/boost-winapi/portfile.cmake | 4 +- ports/boost-xpressive/CONTROL | 2 +- ports/boost-xpressive/portfile.cmake | 4 +- ports/boost/CONTROL | 4 +- ports/cartographer/CONTROL | 2 +- ports/cartographer/portfile.cmake | 5 ++- ports/libtorrent/CONTROL | 4 +- ports/libtorrent/boost-167.patch | 48 ++++++++++++++++++++++ ports/libtorrent/portfile.cmake | 4 +- 284 files changed, 709 insertions(+), 468 deletions(-) create mode 100644 ports/boost-container-hash/CONTROL create mode 100644 ports/boost-container-hash/portfile.cmake create mode 100644 ports/boost-contract/CONTROL create mode 100644 ports/boost-contract/portfile.cmake create mode 100644 ports/boost-hof/CONTROL create mode 100644 ports/boost-hof/portfile.cmake create mode 100644 ports/boost-iostreams/CMakeLists.txt create mode 100644 ports/boost-thread/b2-options.cmake create mode 100644 ports/boost-vcpkg-helpers/post-source-stubs/context.cmake create mode 100644 ports/boost-vcpkg-helpers/post-source-stubs/fiber.cmake create mode 100644 ports/boost-vcpkg-helpers/post-source-stubs/log.cmake create mode 100644 ports/boost-vcpkg-helpers/post-source-stubs/python.cmake create mode 100644 ports/boost-vcpkg-helpers/post-source-stubs/test.cmake create mode 100644 ports/libtorrent/boost-167.patch diff --git a/ports/boost-accumulators/CONTROL b/ports/boost-accumulators/CONTROL index dda6adfc0..7c3b8aedc 100644 --- a/ports/boost-accumulators/CONTROL +++ b/ports/boost-accumulators/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-accumulators -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-array, boost-assert, boost-circular-buffer, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-interval, boost-iterator, boost-mpl, boost-numeric-conversion, boost-odeint, boost-parameter, boost-preprocessor, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-typeof, boost-type-traits, boost-ublas, boost-utility, boost-vcpkg-helpers Description: Boost accumulators module diff --git a/ports/boost-accumulators/portfile.cmake b/ports/boost-accumulators/portfile.cmake index 9c13dcc52..f4e5abf16 100644 --- a/ports/boost-accumulators/portfile.cmake +++ b/ports/boost-accumulators/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/accumulators - REF boost-1.66.0 - SHA512 8413fb2c8f52ae8ec0253847ae01bd1a99d3746bd24bafb9707c243119055e3fbb7da848048db8493c80b8f1bb149d18cd03d8be22ffd2465165fb644cdfd12e + REF boost-1.67.0 + SHA512 f68e35b502f22af605d8d5c1648b856cbdeaa2f592ad1a7732ea2be6d9207271f4842320875bde693651479c39a394055fb2315e5422a6ebb623412fb44b2a04 HEAD_REF master ) diff --git a/ports/boost-algorithm/CONTROL b/ports/boost-algorithm/CONTROL index 50534ac12..bf9846b26 100644 --- a/ports/boost-algorithm/CONTROL +++ b/ports/boost-algorithm/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-algorithm -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-array, boost-assert, boost-bind, boost-concept-check, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-iterator, boost-mpl, boost-range, boost-regex, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers Description: Boost algorithm module diff --git a/ports/boost-algorithm/portfile.cmake b/ports/boost-algorithm/portfile.cmake index 2f6803405..55f8ddad1 100644 --- a/ports/boost-algorithm/portfile.cmake +++ b/ports/boost-algorithm/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/algorithm - REF boost-1.66.0 - SHA512 46779a82175b89da21789e332befb89972320652bafcdacf76f456d3d9ff3635a2db0693dd035bd6651262f762f591d026387682f3c0764315e40d5f007e72ee + REF boost-1.67.0 + SHA512 74509b979d71c1aa21734555022c056b4ab508e01e715d469b0021704654cc27db91ce41266bb567b62d5cfafe0f92d1c0fda67f917b5198b0326713240c2e77 HEAD_REF master ) diff --git a/ports/boost-align/CONTROL b/ports/boost-align/CONTROL index e3009e539..11f7f2090 100644 --- a/ports/boost-align/CONTROL +++ b/ports/boost-align/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-align -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-core, boost-static-assert, boost-throw-exception, boost-vcpkg-helpers Description: Boost align module diff --git a/ports/boost-align/portfile.cmake b/ports/boost-align/portfile.cmake index 80a2a7ab7..28c878dc4 100644 --- a/ports/boost-align/portfile.cmake +++ b/ports/boost-align/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/align - REF boost-1.66.0 - SHA512 3f358344470f797e093fd5db80a6d332e960b7301188e346771e06acc620d97d0e02562eb417eb4627a2200967af4eda74931fc61c8746df16d754f4b578b958 + REF boost-1.67.0 + SHA512 4dfbe372e977787067b7d270bd54f66919e48620300552f76ec3075e02e4514214d3bd8b5ff83599b7f277a8cafa95e550620231bfe366f38aa26ee51c6ef942 HEAD_REF master ) diff --git a/ports/boost-any/CONTROL b/ports/boost-any/CONTROL index c0f854590..c420de0d9 100644 --- a/ports/boost-any/CONTROL +++ b/ports/boost-any/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-any -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-mpl, boost-static-assert, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost any module diff --git a/ports/boost-any/portfile.cmake b/ports/boost-any/portfile.cmake index 47de0a492..a5fbf5279 100644 --- a/ports/boost-any/portfile.cmake +++ b/ports/boost-any/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/any - REF boost-1.66.0 - SHA512 57f24a2532e31e664415642c2e125263964eae6798dfc31eae586a3e4fe516edc1adea882883d34613744ae79acfbc0bed9c8fd823153bafc25d9c3c1ec1e5ef + REF boost-1.67.0 + SHA512 1fd58fdd94cb08078f77d9131568255f35afb63e52a66379d14b35d5d9572f97468fc8a70b966d2c13b28149ccc8659ec0ba70c3cbda62ae08b8f8f1961c15e4 HEAD_REF master ) diff --git a/ports/boost-array/CONTROL b/ports/boost-array/CONTROL index 549e3b979..429743ad5 100644 --- a/ports/boost-array/CONTROL +++ b/ports/boost-array/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-array -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-static-assert, boost-throw-exception, boost-vcpkg-helpers Description: Boost array module diff --git a/ports/boost-array/portfile.cmake b/ports/boost-array/portfile.cmake index 299bf6ff3..e0245f551 100644 --- a/ports/boost-array/portfile.cmake +++ b/ports/boost-array/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/array - REF boost-1.66.0 - SHA512 67ca3644cdea6c2ac1791707e93c517cb1cc5aa593ead675bcfa844a27bcbb61ae4c1c35dc1cbb099e45041275e0ca70c99726a9f70319358057bc448f538425 + REF boost-1.67.0 + SHA512 db8ae6ffa7b29405d3e140acc22dd5bba9c7eade435fa2235b4c54e1c45c1bb28b927e4168ce4811a0206b83fe99580feffc6ae36a8c6cf99f6b13a2eb0682cd HEAD_REF master ) diff --git a/ports/boost-asio/CONTROL b/ports/boost-asio/CONTROL index 169640a9b..2fdc3dc0a 100644 --- a/ports/boost-asio/CONTROL +++ b/ports/boost-asio/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-asio -Version: 1.66.0-1 +Version: 1.67.0-1 Build-Depends: boost-coroutine (!uwp), boost-date-time, boost-regex, boost-system, boost-vcpkg-helpers, openssl Description: Boost asio module diff --git a/ports/boost-asio/portfile.cmake b/ports/boost-asio/portfile.cmake index f513ae43c..de750d6d3 100644 --- a/ports/boost-asio/portfile.cmake +++ b/ports/boost-asio/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/asio - REF boost-1.66.0 - SHA512 7d9989bd96b2940183a1aa75e7f7a6cec0ecf630922009d440ba876802411eba80ddc9b22bd4af65d6f12e3414eb130dc27a884c53bceabdfe8bafb9772db01f + REF boost-1.67.0 + SHA512 b7497608afa49580eeb9a74feefc624eb66a3e6db21f2a65291ccb287fe60dc8d923a9143bc10e73b8508ec2ef094e6caf2ef96528790c5324b6aceced55f29f HEAD_REF master ) diff --git a/ports/boost-assert/CONTROL b/ports/boost-assert/CONTROL index 70f7769c3..701ae791f 100644 --- a/ports/boost-assert/CONTROL +++ b/ports/boost-assert/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-assert -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-vcpkg-helpers Description: Boost assert module diff --git a/ports/boost-assert/portfile.cmake b/ports/boost-assert/portfile.cmake index cd0e8267f..d37ed3bee 100644 --- a/ports/boost-assert/portfile.cmake +++ b/ports/boost-assert/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/assert - REF boost-1.66.0 - SHA512 a00e17793c94d8d9e616bc5e80433fd68e4e4e51abf23956b6a7c977b01300d6a2200e9f6a8d249d7813b57d20fb2e6a844f5d2eb7504add99d748f89c2f39d5 + REF boost-1.67.0 + SHA512 e0559f543bffc1acd6a95bf54978a29eff42c6e8c5f825a7b93cb652a5260bcfd5eb1a09b2859e9a3621c3438e7670e4e4132735acdce4d43608cfdf426e5444 HEAD_REF master ) diff --git a/ports/boost-assign/CONTROL b/ports/boost-assign/CONTROL index 88deae645..1f3046320 100644 --- a/ports/boost-assign/CONTROL +++ b/ports/boost-assign/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-assign -Version: 1.66.0 -Build-Depends: boost-array, boost-config, boost-detail, boost-mpl, boost-preprocessor, boost-ptr-container, boost-range, boost-static-assert, boost-tuple, boost-type-traits, boost-vcpkg-helpers +Version: 1.67.0 +Build-Depends: boost-array, boost-config, boost-detail, boost-mpl, boost-preprocessor, boost-ptr-container, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-vcpkg-helpers Description: Boost assign module diff --git a/ports/boost-assign/portfile.cmake b/ports/boost-assign/portfile.cmake index e2d0a7e20..a8b01985b 100644 --- a/ports/boost-assign/portfile.cmake +++ b/ports/boost-assign/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/assign - REF boost-1.66.0 - SHA512 501e11279f672a24585a6189438f2310358cc67a8838995abb0f1454f230242fdd8f206ec294cdbb39ebe7e606a8a4ef2a96e0fe236d5e044ab4708eae030264 + REF boost-1.67.0 + SHA512 e7fd39fc4bcf7cc97c3f987a2cc7434c51d23fe47dbd480ac9203209c61db0883b479582adcfdef22b9f007df3467b43da72bef8b186ea8c5883a85013394dd2 HEAD_REF master ) diff --git a/ports/boost-atomic/CONTROL b/ports/boost-atomic/CONTROL index 6289fb560..488cbe7de 100644 --- a/ports/boost-atomic/CONTROL +++ b/ports/boost-atomic/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-atomic -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-build, boost-config, boost-integer, boost-modular-build-helper, boost-type-traits, boost-vcpkg-helpers Description: Boost atomic module diff --git a/ports/boost-atomic/portfile.cmake b/ports/boost-atomic/portfile.cmake index feb671183..12f253805 100644 --- a/ports/boost-atomic/portfile.cmake +++ b/ports/boost-atomic/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/atomic - REF boost-1.66.0 - SHA512 2f13902827ea0639ec37e514d87cfc9081bca6f4f6d98e0ad84f19b2042900e03bb3f5c2fb4891864174ae5abb743315af27062d7b10de861e91a7e92df91f98 + REF boost-1.67.0 + SHA512 4a4ab037e17c6c2a5a1ae5acb880392f863daa4cc87ca22349d9da565b229d68ce1befe96d7457778dddd40afb95266d6cb45552a46d9679f7bc935e8fb16b85 HEAD_REF master ) diff --git a/ports/boost-beast/CONTROL b/ports/boost-beast/CONTROL index 13f1d67f6..867f09008 100644 --- a/ports/boost-beast/CONTROL +++ b/ports/boost-beast/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-beast -Version: 1.66.0 -Build-Depends: boost-asio, boost-assert, boost-config, boost-container, boost-core, boost-endian, boost-intrusive, boost-optional, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Version: 1.67.0 +Build-Depends: boost-asio, boost-assert, boost-bind, boost-config, boost-container, boost-core, boost-endian, boost-intrusive, boost-optional, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost beast module diff --git a/ports/boost-beast/portfile.cmake b/ports/boost-beast/portfile.cmake index 16d782d94..355d5bc3e 100644 --- a/ports/boost-beast/portfile.cmake +++ b/ports/boost-beast/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/beast - REF boost-1.66.0 - SHA512 0559721217469b3862c6653488de245841f351098766d2cbf4d0fd3a2ecdd96460ecaf5591166dc59f7c5a9806edab9101c9939c98b294c3cbd2d738dd07f6c6 + REF boost-1.67.0 + SHA512 7530553985c8beee0b24b1ba77b8c6e2279315c74c20f8d6d2f2028fb6fed6c80f81eacb8a2de6fce651fcb6bf0c9d67f65234cb2e1fd433e0f6ceda1566e5b6 HEAD_REF master ) diff --git a/ports/boost-bimap/CONTROL b/ports/boost-bimap/CONTROL index 7c84d3103..9bffc6bbc 100644 --- a/ports/boost-bimap/CONTROL +++ b/ports/boost-bimap/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-bimap -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-concept-check, boost-config, boost-functional, boost-iterator, boost-lambda, boost-mpl, boost-multi-index, boost-preprocessor, boost-property-map, boost-serialization, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost bimap module diff --git a/ports/boost-bimap/portfile.cmake b/ports/boost-bimap/portfile.cmake index eda19317a..a9b8e0e12 100644 --- a/ports/boost-bimap/portfile.cmake +++ b/ports/boost-bimap/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/bimap - REF boost-1.66.0 - SHA512 f0784a2fd2be60b404d8a3bb43fa4685ab75a17a18e9e9fb0a8e8d1df18323ad02ad12720f5cfb310c93a33fd3bdec09d8ac92cbc4ff875f9ff4c3a6263d4f8b + REF boost-1.67.0 + SHA512 c142c149fcfd0a33e130779a0a9f9be41d077703137b6537bfc8c8ed7ff9031fd8e196f076791e00450a286c1ace56979ee7a0c59348f304f2d41daf12aba355 HEAD_REF master ) diff --git a/ports/boost-bind/CONTROL b/ports/boost-bind/CONTROL index 1c9875b2f..bdc97f096 100644 --- a/ports/boost-bind/CONTROL +++ b/ports/boost-bind/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-bind -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-detail, boost-vcpkg-helpers Description: Boost bind module diff --git a/ports/boost-bind/portfile.cmake b/ports/boost-bind/portfile.cmake index 8f6ee1cfb..e55b91055 100644 --- a/ports/boost-bind/portfile.cmake +++ b/ports/boost-bind/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/bind - REF boost-1.66.0 - SHA512 a3366e1d30b6d69fe1ce9a7daeabb5e32a64dea3c043be44327941e93a19a3bfa78a1a552c189edf7490f743d1e5686555d3caaf6826aeb6c7be4900e9c2368c + REF boost-1.67.0 + SHA512 4172a426fad408f06f7e36f90396158b8fb345ff7b4147ec3471771d465335c9b01f7e7dda040c842684a5c6eef596ea4c8f7b803489fbddfb016e48e3fcf8fd HEAD_REF master ) diff --git a/ports/boost-build/CONTROL b/ports/boost-build/CONTROL index ef59d386c..678914811 100644 --- a/ports/boost-build/CONTROL +++ b/ports/boost-build/CONTROL @@ -1,3 +1,3 @@ Source: boost-build -Version: 1.66.0-8 +Version: 1.67.0 Description: Boost.Build diff --git a/ports/boost-build/portfile.cmake b/ports/boost-build/portfile.cmake index fdd559ebe..dfd507997 100644 --- a/ports/boost-build/portfile.cmake +++ b/ports/boost-build/portfile.cmake @@ -11,21 +11,21 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/build - REF boost-1.66.0 - SHA512 db94eefa0c2fe410cfdf7599102670377a069d52a7c8d4181f6209e3e65860e9d92f86ec5994e402b8a773a47a4ad5c074acf9763eabbe293266af19380e7ca9 + REF boost-1.67.0 + SHA512 93aa3f0c76245fefe2ceabde9c287e7738f79cdab71eeb42ba426f06e7846b5da5c00fc7581d7f31135687e10660521d34c7ffb1ce7299b70d7330a81b0e5acc HEAD_REF master ) vcpkg_download_distfile(ARCHIVE - URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.66.0/LICENSE_1_0.txt" + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.67.0/LICENSE_1_0.txt" FILENAME "boost_LICENSE_1_0.txt" SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 ) vcpkg_download_distfile(BOOSTCPP_ARCHIVE - URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.66.0/boostcpp.jam" - FILENAME "boost-1.66.0-boostcpp.jam" - SHA512 ef2ae1d6a53a7f93654950e2e8e679da6b0359f02baafc03db970801634c1f5d4229633b5b6d74ad96a306e6efe3429d436669dc165b1fa655917e0ec74714e4 + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.67.0/boostcpp.jam" + FILENAME "boost-1.67.0-boostcpp.jam" + SHA512 4d887b05b4873e651fd9bc20f04fc072c7d801fd50445c989517cd39c3a8aa132ed46c407fb0efb35825fc0fc1035393d5ac0da5922be2c120cf2bfff952b3bc ) file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright) diff --git a/ports/boost-callable-traits/CONTROL b/ports/boost-callable-traits/CONTROL index dbe301198..4951e77c5 100644 --- a/ports/boost-callable-traits/CONTROL +++ b/ports/boost-callable-traits/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-callable-traits -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-vcpkg-helpers Description: Boost callable_traits module diff --git a/ports/boost-callable-traits/portfile.cmake b/ports/boost-callable-traits/portfile.cmake index 0a0a670b3..7d262945f 100644 --- a/ports/boost-callable-traits/portfile.cmake +++ b/ports/boost-callable-traits/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/callable_traits - REF boost-1.66.0 - SHA512 87a0f4de9a8cf2652addca6b3b685cea242bf55e1609409f41360813761ad3078b414761cf34856223fe60f460616e13e7b2e6017afc3d053879c7ec8292b9b0 + REF boost-1.67.0 + SHA512 5a6dedd5b8c4f57d4e896dbd963927459a42cc2488dd09628b5cc484327d21b32d7f5f2d976a55b4a62783faa4688b6f020983030bfc1f4307acf7f66b179fbc HEAD_REF master ) diff --git a/ports/boost-chrono/CONTROL b/ports/boost-chrono/CONTROL index 563547137..529526653 100644 --- a/ports/boost-chrono/CONTROL +++ b/ports/boost-chrono/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-chrono -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-modular-build-helper, boost-move, boost-mpl, boost-predef, boost-ratio, boost-static-assert, boost-system, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost chrono module diff --git a/ports/boost-chrono/portfile.cmake b/ports/boost-chrono/portfile.cmake index d1cb98af1..2918d3e9d 100644 --- a/ports/boost-chrono/portfile.cmake +++ b/ports/boost-chrono/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/chrono - REF boost-1.66.0 - SHA512 edbc8c16bcdc4b79c47885e720c96781e6737d31c54e2c051596e693390c5a8efca4e16e253db0db5a996c72c1d0fb6482dda7dc58f78fd67edb09ad12f3a25b + REF boost-1.67.0 + SHA512 ce86585c30b7500dd9f75074325428b57278e5bd88e6accbee235477ff73a0056fffae40ec0d88bcd28bfa59c4b37f290a618dc5af684dc6fc89302358d5d049 HEAD_REF master ) diff --git a/ports/boost-circular-buffer/CONTROL b/ports/boost-circular-buffer/CONTROL index 56be43c12..53c0acf58 100644 --- a/ports/boost-circular-buffer/CONTROL +++ b/ports/boost-circular-buffer/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-circular-buffer -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-container, boost-core, boost-detail, boost-iterator, boost-move, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost circular_buffer module diff --git a/ports/boost-circular-buffer/portfile.cmake b/ports/boost-circular-buffer/portfile.cmake index 85b46c0d4..ad1753f8e 100644 --- a/ports/boost-circular-buffer/portfile.cmake +++ b/ports/boost-circular-buffer/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/circular_buffer - REF boost-1.66.0 - SHA512 78d74fa417da8d19b8344feccff009ed90eb07e36251f2a18dcd58716c230c7faade68faf2b7b98c2fc43fea8186c38e5a81c1d2c981841b59e35b0dc6026943 + REF boost-1.67.0 + SHA512 1c1f085f81def77135b95fd3255ef0280c84c7f899b632b91c28bdc33dcfff8eaef3f9f233a356499756305a11c4a33022b72a46b990ec56db73ac4036711c45 HEAD_REF master ) diff --git a/ports/boost-compatibility/CONTROL b/ports/boost-compatibility/CONTROL index acb31e6f1..3379e76da 100644 --- a/ports/boost-compatibility/CONTROL +++ b/ports/boost-compatibility/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-compatibility -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-vcpkg-helpers Description: Boost compatibility module diff --git a/ports/boost-compatibility/portfile.cmake b/ports/boost-compatibility/portfile.cmake index e59db2e84..41f9b81fb 100644 --- a/ports/boost-compatibility/portfile.cmake +++ b/ports/boost-compatibility/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/compatibility - REF boost-1.66.0 - SHA512 3f78455431974ca24fe48a6fce22eb9f374455560f2e9442c921e082e23ceb82b9ac2a443e6c4dbba2d24531dd0752ef854d3548340e3dba42b31aa795885fe3 + REF boost-1.67.0 + SHA512 d8733176ab4d208d5d44fe2a14c73d0309f62be5c2b9b9f50558c44c034c4f727260787185696bbaf5051b359bb14435cdc467644251e5d67b0b945d8f3b84a1 HEAD_REF master ) diff --git a/ports/boost-compute/CONTROL b/ports/boost-compute/CONTROL index 9c90be96e..094eae8b6 100644 --- a/ports/boost-compute/CONTROL +++ b/ports/boost-compute/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-compute -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-algorithm, boost-array, boost-assert, boost-chrono, boost-config, boost-core, boost-filesystem (!uwp), boost-function, boost-function-types, boost-fusion, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-preprocessor, boost-property-tree, boost-proto, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-uuid, boost-vcpkg-helpers Description: Boost compute module diff --git a/ports/boost-compute/portfile.cmake b/ports/boost-compute/portfile.cmake index 2c70ac5ef..a31f9d897 100644 --- a/ports/boost-compute/portfile.cmake +++ b/ports/boost-compute/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/compute - REF boost-1.66.0 - SHA512 c540200a62faf4e4b5895177d9b33f9316d0d5e4052f3bfea7eb33d9faa9446bd5015c55f59c923134c59d635f1078e1e7e50e013636efc65820056bb6bdb704 + REF boost-1.67.0 + SHA512 d7f470eb2dcf96198d68d61edf8d53491819f8e29452f80e4140e34a11e044ecd45cfdbcd28cc29da2e905c6f324872704d4a834c62242050a0d5fc46deda029 HEAD_REF master ) diff --git a/ports/boost-concept-check/CONTROL b/ports/boost-concept-check/CONTROL index c56fc9fae..c5f814b20 100644 --- a/ports/boost-concept-check/CONTROL +++ b/ports/boost-concept-check/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-concept-check -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-mpl, boost-vcpkg-helpers Description: Boost concept_check module diff --git a/ports/boost-concept-check/portfile.cmake b/ports/boost-concept-check/portfile.cmake index 36d7bac9c..fae7c074c 100644 --- a/ports/boost-concept-check/portfile.cmake +++ b/ports/boost-concept-check/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/concept_check - REF boost-1.66.0 - SHA512 bec39bf040752414e08f7f6222b8557ea27df0e48c57fc2a1ad680ee15256a37a4e6a8cad1b39bb5f8800bfc7a32c39f89321669d04be9698775e77cd26e2fee + REF boost-1.67.0 + SHA512 82b67cf07b455b4775bc10a872d3b181af6bf689c7b3cd14160da9434965607840dd200a33f9286cde6c8aabad13a0af863c584d93eb1510bfb8a099d0169076 HEAD_REF master ) diff --git a/ports/boost-config/CONTROL b/ports/boost-config/CONTROL index ed053950a..ba249ccb3 100644 --- a/ports/boost-config/CONTROL +++ b/ports/boost-config/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-config -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-vcpkg-helpers Description: Boost config module diff --git a/ports/boost-config/portfile.cmake b/ports/boost-config/portfile.cmake index 21d1c4083..0e705c2b7 100644 --- a/ports/boost-config/portfile.cmake +++ b/ports/boost-config/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/config - REF boost-1.66.0 - SHA512 7754f48170ceb06fce2961bf7ecf85d7601eccdaf1949fc5730a2bfb4524ff32b703be053059defcfb1c08d21573e8184a38283c59b6091f69e565eade06d9c1 + REF boost-1.67.0 + SHA512 517dc632e009c052f7d594c715342a2d94a95e0bcf466c3e3fbab1de38b7314846733f98e7010c386a5bab81d365fb6a08be04d21bee8c93450df97c53a12791 HEAD_REF master ) @@ -18,3 +18,4 @@ file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#undef BOOS if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#define BOOST_ALL_DYN_LINK\n") endif() +file(COPY ${SOURCE_PATH}/checks DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-config) diff --git a/ports/boost-container-hash/CONTROL b/ports/boost-container-hash/CONTROL new file mode 100644 index 000000000..1e50b4400 --- /dev/null +++ b/ports/boost-container-hash/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-container-hash +Version: 1.67.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Description: Boost container_hash module diff --git a/ports/boost-container-hash/portfile.cmake b/ports/boost-container-hash/portfile.cmake new file mode 100644 index 000000000..c9692bd76 --- /dev/null +++ b/ports/boost-container-hash/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/container_hash + REF boost-1.67.0 + SHA512 6d9916c1ad2483c6877ecf5141c724319a9d65b672ad1c0d7cf5ee396755788cee78955b8cd4a1bf5f5351c68d78b0cc8a4993c70379639eb1a85cae940c06f3 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-container/CONTROL b/ports/boost-container/CONTROL index 2fbed7951..bd2afdfc1 100644 --- a/ports/boost-container/CONTROL +++ b/ports/boost-container/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-container -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-functional, boost-integer, boost-intrusive, boost-modular-build-helper, boost-move, boost-static-assert, boost-type-traits, boost-vcpkg-helpers Description: Boost container module diff --git a/ports/boost-container/portfile.cmake b/ports/boost-container/portfile.cmake index d2cc5c209..58ab998b4 100644 --- a/ports/boost-container/portfile.cmake +++ b/ports/boost-container/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/container - REF boost-1.66.0 - SHA512 805421c56ace8786803a572e6047f0ab2de74973d7b04d603080b007c6ee7f288364dfe91f6d11be6128e8d5b0d9b2554237a6f77ee3855f3b598c3d5e20f3d1 + REF boost-1.67.0 + SHA512 559479466cf75ee7ce8f88d1c465f9c375722c954f2a833e842c732ba3dfc70bd30ae10e42e11afc043edc52767cddcf1f925b3c88f9d2c026f3e422ababd397 HEAD_REF master ) diff --git a/ports/boost-context/CONTROL b/ports/boost-context/CONTROL index bd72d021c..5797590fe 100644 --- a/ports/boost-context/CONTROL +++ b/ports/boost-context/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-context -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-modular-build-helper, boost-pool, boost-predef, boost-smart-ptr, boost-vcpkg-helpers Description: Boost context module diff --git a/ports/boost-context/portfile.cmake b/ports/boost-context/portfile.cmake index b749a9d80..ecdfe4d69 100644 --- a/ports/boost-context/portfile.cmake +++ b/ports/boost-context/portfile.cmake @@ -5,11 +5,16 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/context - REF boost-1.66.0 - SHA512 73efe1ab2c3b589e0ec7a095ab4a62090d8a980efbc81ac915823d1015fec215647a558bf0102fb42dbcdb05e9a4f70bd145bba095f09f1f4aec24eceddef3d4 + REF boost-1.67.0 + SHA512 4d6f7c0211c6941c8089d844b4ceae45322c2089ce41c029a21ef9b4fabdc0030a0c99fcc6c6be43d10372a171726b03a62aecae0241b8f2427439a2a283c306 HEAD_REF master ) +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) diff --git a/ports/boost-contract/CONTROL b/ports/boost-contract/CONTROL new file mode 100644 index 000000000..b881538b1 --- /dev/null +++ b/ports/boost-contract/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-contract +Version: 1.67.0 +Build-Depends: boost-any, boost-assert, boost-build, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-function-types, boost-modular-build-helper, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-thread (!uwp), boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Description: Boost contract module diff --git a/ports/boost-contract/portfile.cmake b/ports/boost-contract/portfile.cmake new file mode 100644 index 000000000..a83fe112d --- /dev/null +++ b/ports/boost-contract/portfile.cmake @@ -0,0 +1,16 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/contract + REF boost-1.67.0 + SHA512 f0d069773d9c152be01ef803f05f134ee85190f44eec3147b8d9c025b7bf21f8b674141add0e249b0d8bb66b8d5d24f4f0e2d5b6e838ea72e38d3c64aa76c436 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-conversion/CONTROL b/ports/boost-conversion/CONTROL index 916585c42..516434726 100644 --- a/ports/boost-conversion/CONTROL +++ b/ports/boost-conversion/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-conversion -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-vcpkg-helpers Description: Boost conversion module diff --git a/ports/boost-conversion/portfile.cmake b/ports/boost-conversion/portfile.cmake index 00ce64df7..067f58c66 100644 --- a/ports/boost-conversion/portfile.cmake +++ b/ports/boost-conversion/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/conversion - REF boost-1.66.0 - SHA512 685308e332cbcf94fa9788d36bbfcbbfe384010761b581df913f259c87add3041fba122fb0bd38ad6b706d64918f88e5b13730a4ab0e8e6f450aed82df4edd6d + REF boost-1.67.0 + SHA512 6a8bdcec46a08b6b29a9288c24e6dd868c694ebd33ae8062c8ee9784be91d12031cda27841ea9f6212cdb8f0e9b9b21d68ccb96c3d38011cad5c93bfc62a568d HEAD_REF master ) diff --git a/ports/boost-convert/CONTROL b/ports/boost-convert/CONTROL index e4219cb68..807fe0380 100644 --- a/ports/boost-convert/CONTROL +++ b/ports/boost-convert/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-convert -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-function-types, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-parameter, boost-range, boost-spirit, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost convert module diff --git a/ports/boost-convert/portfile.cmake b/ports/boost-convert/portfile.cmake index a3c10172a..693a9178d 100644 --- a/ports/boost-convert/portfile.cmake +++ b/ports/boost-convert/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/convert - REF boost-1.66.0 - SHA512 5edd73c5f78471a567f03e7772834656295acd6897f4674950a5064053d1c8de019050141d5109cc2bba13a94d2a06e2c7020d09af9eb78174f5bf8dc2ba2220 + REF boost-1.67.0 + SHA512 c51909030b2263a7f837e3732824d75b2fdf8b585c560f58e90ca8d2e6e3c48584cdc52e70f1058ef1e7fbe66085abd6053484025d14fb26201beddcf89c91ff HEAD_REF master ) diff --git a/ports/boost-core/CONTROL b/ports/boost-core/CONTROL index 785f2e2fd..2a765e76f 100644 --- a/ports/boost-core/CONTROL +++ b/ports/boost-core/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-core -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-vcpkg-helpers Description: Boost core module diff --git a/ports/boost-core/portfile.cmake b/ports/boost-core/portfile.cmake index 70c989e16..29a2b6a1f 100644 --- a/ports/boost-core/portfile.cmake +++ b/ports/boost-core/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/core - REF boost-1.66.0 - SHA512 a8705d00b2f6803f924d73dc47ec9084824e9b80d19e281da632aed60abd2c60cf8b32bca92ea3ef1b8039100a7ac61d761a0eff521e3a182a6cd7a9de8b5710 + REF boost-1.67.0 + SHA512 3b00c5893012e420c0faf6de3b43c0c4ae4645ced19b7f10403c6a7cd194954df7a4462999ca78226b29858848690223657e4eef9b6cf36d92828d5642057381 HEAD_REF master ) diff --git a/ports/boost-coroutine/CONTROL b/ports/boost-coroutine/CONTROL index 998958b5f..6a0a4a69e 100644 --- a/ports/boost-coroutine/CONTROL +++ b/ports/boost-coroutine/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-coroutine -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-build, boost-config, boost-context (!uwp), boost-detail, boost-exception, boost-integer, boost-modular-build-helper, boost-move, boost-range, boost-system, boost-thread (!uwp), boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost coroutine module diff --git a/ports/boost-coroutine/portfile.cmake b/ports/boost-coroutine/portfile.cmake index 14c8dbe3b..4b0e88cd1 100644 --- a/ports/boost-coroutine/portfile.cmake +++ b/ports/boost-coroutine/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/coroutine - REF boost-1.66.0 - SHA512 f42318076c1547797dd9427c47eb6a6dc5e2407f788d6e8c7e8b6092632238a6e33f1c4d02c25af00bb85f89c82a6f8f2d10911620b5d53cbc0bf931c7fdd160 + REF boost-1.67.0 + SHA512 c636fc88a981d983f29cf5721c056d4c2cedbd48fe54d0aa4f2069ccb2c7438ee661167ff87298c22d7d84f6c61b1dd677d1ea91733e5e8fb04f7033d1559f63 HEAD_REF master ) diff --git a/ports/boost-coroutine2/CONTROL b/ports/boost-coroutine2/CONTROL index bd1156825..b9701bcb1 100644 --- a/ports/boost-coroutine2/CONTROL +++ b/ports/boost-coroutine2/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-coroutine2 -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-context (!uwp), boost-detail, boost-vcpkg-helpers Description: Boost coroutine2 module diff --git a/ports/boost-coroutine2/portfile.cmake b/ports/boost-coroutine2/portfile.cmake index 19ad0fecc..55d637732 100644 --- a/ports/boost-coroutine2/portfile.cmake +++ b/ports/boost-coroutine2/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/coroutine2 - REF boost-1.66.0 - SHA512 2ecc05325b7870e1d315e488b9f463f56f9959e6ae98277363176f32d80ba8dbd5d6b706e7cc60c896f53708fb25841ed5ef9f0520dba22c5f1a32ac120559f2 + REF boost-1.67.0 + SHA512 9ff6607abb4006a503da52915d2f8f653d68a64fd0501962eee49393229be7d9fa35f0f4564306413271f08d33317e55475c0789e36639a178044f1424215097 HEAD_REF master ) diff --git a/ports/boost-crc/CONTROL b/ports/boost-crc/CONTROL index fdc424db6..2c51d0629 100644 --- a/ports/boost-crc/CONTROL +++ b/ports/boost-crc/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-crc -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-compatibility, boost-config, boost-integer, boost-vcpkg-helpers Description: Boost crc module diff --git a/ports/boost-crc/portfile.cmake b/ports/boost-crc/portfile.cmake index 435ec9ad5..a045eedee 100644 --- a/ports/boost-crc/portfile.cmake +++ b/ports/boost-crc/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/crc - REF boost-1.66.0 - SHA512 887a1ee59535f150a6166432e8b9fdd124d604363c3609f9958d25ce3f265c42f1d749b52075d4e617acf552f68a56d92d249f562ad6475b53b15ca364e4e5b4 + REF boost-1.67.0 + SHA512 9168aed67125e955abd8e689bbbcb780adc16345447e1b781344b13d66827ab24ad2af038e10153c64bc458b66cf2cfe2961ddb22a3c494a86429dab60349a18 HEAD_REF master ) diff --git a/ports/boost-date-time/CONTROL b/ports/boost-date-time/CONTROL index 6814dc0e1..89af5c17e 100644 --- a/ports/boost-date-time/CONTROL +++ b/ports/boost-date-time/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-date-time -Version: 1.66.0 -Build-Depends: boost-algorithm, boost-assert, boost-build, boost-compatibility, boost-config, boost-detail, boost-integer, boost-io, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Version: 1.67.0 +Build-Depends: boost-algorithm, boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-io, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-numeric-conversion, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost date_time module diff --git a/ports/boost-date-time/portfile.cmake b/ports/boost-date-time/portfile.cmake index a171018c4..fd5ce947d 100644 --- a/ports/boost-date-time/portfile.cmake +++ b/ports/boost-date-time/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/date_time - REF boost-1.66.0 - SHA512 5c8ddf94d1c5a0bc5c216c9cbb4560a2e0aa7b116966a9a9250a517fb4c83f2fb9ad0c37c65f65e8cad2c7f21f621d696e1efd6d2bd557c1bfaa8b9d8c566f7d + REF boost-1.67.0 + SHA512 e164bc45bb7e4836521b31cb75a0fa3e960d0bdd0c7dabc4f8f457056c54b54bbd06f44a934aa5c7f2ee680f2f994b9fba47a0e460287c8e2d22b49450fc0872 HEAD_REF master ) diff --git a/ports/boost-detail/CONTROL b/ports/boost-detail/CONTROL index 21ae5d726..ab5e1efd3 100644 --- a/ports/boost-detail/CONTROL +++ b/ports/boost-detail/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-detail -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-compatibility, boost-config, boost-vcpkg-helpers Description: Boost detail module diff --git a/ports/boost-detail/portfile.cmake b/ports/boost-detail/portfile.cmake index eec646472..93fe10eb1 100644 --- a/ports/boost-detail/portfile.cmake +++ b/ports/boost-detail/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/detail - REF boost-1.66.0 - SHA512 9ad69f2d032535207748680e635b5c5cfeb2921f67f6d711d5083fd67686f63476fa04c03e0abf63bc58405b4a38b542686192398930154df716ea9381c7a43f + REF boost-1.67.0 + SHA512 3746e61719cee4e7307677633edf170f8824b8fbd9aa7f159c9ff1feac662fc73f9a4bbe06fad9d9c5fbe356d6ec398d53223ddb7d85c01f906fe698f217f8b4 HEAD_REF master ) diff --git a/ports/boost-disjoint-sets/CONTROL b/ports/boost-disjoint-sets/CONTROL index 7ab636e2d..a3ea6717d 100644 --- a/ports/boost-disjoint-sets/CONTROL +++ b/ports/boost-disjoint-sets/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-disjoint-sets -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-graph, boost-vcpkg-helpers Description: Boost disjoint_sets module diff --git a/ports/boost-disjoint-sets/portfile.cmake b/ports/boost-disjoint-sets/portfile.cmake index 223339e95..8115c4d8b 100644 --- a/ports/boost-disjoint-sets/portfile.cmake +++ b/ports/boost-disjoint-sets/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/disjoint_sets - REF boost-1.66.0 - SHA512 608239f39a11995ebd930d250a39c92971b6547b853eabe49938f6bbdadfbdb4f2220ccaf98e3516fe817284dc310dfb579f6fd7ae082dda9e7a5f80ce53abe6 + REF boost-1.67.0 + SHA512 cc792b79935983656b40785520e3eef9b578a69fcc3c54b3ba24d60a8a36fccc86722dfc4ea621aec727d6c73b22586dbd38f253293dc46730cc418f6832bc33 HEAD_REF master ) diff --git a/ports/boost-dll/CONTROL b/ports/boost-dll/CONTROL index cfb7e5e6e..f5b9f1b63 100644 --- a/ports/boost-dll/CONTROL +++ b/ports/boost-dll/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-dll -Version: 1.66.0 -Build-Depends: boost-config, boost-core, boost-filesystem (!uwp), boost-integer, boost-move, boost-mpl, boost-predef, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Version: 1.67.0 +Build-Depends: boost-config, boost-core, boost-filesystem (!uwp), boost-integer, boost-move, boost-mpl, boost-predef, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-throw-exception, boost-type-index, boost-type-traits, boost-vcpkg-helpers, boost-winapi Description: Boost dll module diff --git a/ports/boost-dll/portfile.cmake b/ports/boost-dll/portfile.cmake index 063b979f5..51ce40f96 100644 --- a/ports/boost-dll/portfile.cmake +++ b/ports/boost-dll/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/dll - REF boost-1.66.0 - SHA512 42e4442fbf50f33528e389ca463042c9155df970a7725a6d10213e3a8c311b638006271d1b5691e0ccdeb71652034568b2b5fa299a5b1580ad4433db0371138a + REF boost-1.67.0 + SHA512 bf8bb5e422abd2cded6aa1181570db487f2db786ce8261ed1816eae7e6a8386795f91d8c5ded981a691c19d82a5bffb2aabfe6f5c95ceccc6e22de35c854b21c HEAD_REF master ) diff --git a/ports/boost-dynamic-bitset/CONTROL b/ports/boost-dynamic-bitset/CONTROL index 1170b0099..7910a4010 100644 --- a/ports/boost-dynamic-bitset/CONTROL +++ b/ports/boost-dynamic-bitset/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-dynamic-bitset -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-serialization, boost-vcpkg-helpers Description: Boost dynamic_bitset module diff --git a/ports/boost-dynamic-bitset/portfile.cmake b/ports/boost-dynamic-bitset/portfile.cmake index 414f7b304..a612a4a7e 100644 --- a/ports/boost-dynamic-bitset/portfile.cmake +++ b/ports/boost-dynamic-bitset/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/dynamic_bitset - REF boost-1.66.0 - SHA512 fa9bc10bbcd7ea907acf11abfd245fa70e4d82e5f7fe5b295b65e404ed19b276c06cd68ccec36a2276e76985a20c2a788c99e8cee095f24c04d0c8c5f5952135 + REF boost-1.67.0 + SHA512 242c7f79a50c98357017bfd09a3d2b27b2a9f1f8e12518eb497bd684ac9cf2dd6afdffb417a135a3648e40f4efb10c0f45703cff302212b8bdcf35ab1428955f HEAD_REF master ) diff --git a/ports/boost-endian/CONTROL b/ports/boost-endian/CONTROL index cfcb7cb52..80aff90ad 100644 --- a/ports/boost-endian/CONTROL +++ b/ports/boost-endian/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-endian -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-predef, boost-static-assert, boost-system, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost endian module diff --git a/ports/boost-endian/portfile.cmake b/ports/boost-endian/portfile.cmake index 911d90971..18ff7dfaa 100644 --- a/ports/boost-endian/portfile.cmake +++ b/ports/boost-endian/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/endian - REF boost-1.66.0 - SHA512 5b23ff8f2fd2f59dc56637bef628328e8b99e261ce421809363cdfeb203646667f10b624b114e8e70d1fdfce0d53055dd03376d21ef4b5cba0f51b600091f2f3 + REF boost-1.67.0 + SHA512 198cb5eb9b9f9a4ca6bd069c79f9222e748248d7f7f8231ab9b288334f3f77c37b398abc5d097463a4ce69b4f0de209f247d5f15b1ccdd0fcbf036009ddd73ad HEAD_REF master ) diff --git a/ports/boost-exception/CONTROL b/ports/boost-exception/CONTROL index 2f807d992..0a64b7cb9 100644 --- a/ports/boost-exception/CONTROL +++ b/ports/boost-exception/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-exception -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-modular-build-helper, boost-smart-ptr, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost exception module diff --git a/ports/boost-exception/portfile.cmake b/ports/boost-exception/portfile.cmake index eda3644a7..19c6c2058 100644 --- a/ports/boost-exception/portfile.cmake +++ b/ports/boost-exception/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/exception - REF boost-1.66.0 - SHA512 ab4bd5df7250847c866e5b6db99930d190c04b2c2a46e49eb62e9ed9467b6f5aa60aa2db87e9fe27145321bf429a23e94a83bb28ea9f574d01b02ea06dd89571 + REF boost-1.67.0 + SHA512 b5b27177ea5e434b7d8898b281a43ad1e74b02ce80b9cc184b34bebc3d43e39fe72b84003096f320b2fade1d0cfaa0a56d0a228fd96782cdd32c2fb143b78ae2 HEAD_REF master ) diff --git a/ports/boost-fiber/CONTROL b/ports/boost-fiber/CONTROL index a3b230904..1e200489f 100644 --- a/ports/boost-fiber/CONTROL +++ b/ports/boost-fiber/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-fiber -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-algorithm, boost-assert, boost-build, boost-config, boost-context (!uwp), boost-core, boost-detail, boost-filesystem (!uwp), boost-format, boost-intrusive, boost-modular-build-helper, boost-predef, boost-smart-ptr, boost-vcpkg-helpers Description: Boost fiber module diff --git a/ports/boost-fiber/portfile.cmake b/ports/boost-fiber/portfile.cmake index ef8751a53..244192dca 100644 --- a/ports/boost-fiber/portfile.cmake +++ b/ports/boost-fiber/portfile.cmake @@ -5,11 +5,16 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/fiber - REF boost-1.66.0 - SHA512 ba3980846e6602999a2187fb40c9c17d0bd0a8b7681bcdb2c9695ec5e218b6306c52680b565e176f170a7219aedf86596e356e92612bee87bf1ad8123261ccaf + REF boost-1.67.0 + SHA512 2f29021b781a853fb0b00cb7a6e0a541f17d71af4f33e9a47fd875e06d3073e703dfba5cdc7a349b735a1083eff5039ebb227204f7e56f4ad949cafc485095b0 HEAD_REF master ) +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) diff --git a/ports/boost-filesystem/CONTROL b/ports/boost-filesystem/CONTROL index d50e6a177..503a4af37 100644 --- a/ports/boost-filesystem/CONTROL +++ b/ports/boost-filesystem/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-filesystem -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-functional, boost-integer, boost-io, boost-iterator, boost-modular-build-helper, boost-range, boost-smart-ptr, boost-static-assert, boost-system, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost filesystem module diff --git a/ports/boost-filesystem/portfile.cmake b/ports/boost-filesystem/portfile.cmake index 5a964b7a1..c80609e37 100644 --- a/ports/boost-filesystem/portfile.cmake +++ b/ports/boost-filesystem/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/filesystem - REF boost-1.66.0 - SHA512 16c6c692485e02515fc09da5672cad4eb3c313e3a9ed9854d52ad1ba97a38d7346e4d0cf70baacba8468628bc1348350404151c3ff8984397a819d2cde3e4974 + REF boost-1.67.0 + SHA512 a81dbf5dcf1b7bde572b02276ee25f78c5673d64aee8b5f864e6b2e04f29cdbf8ecd469b1f039bcda3b490372d3387121a896bf7faf30f767f63c107a1cf581d HEAD_REF master ) diff --git a/ports/boost-flyweight/CONTROL b/ports/boost-flyweight/CONTROL index fb4378501..49feb377c 100644 --- a/ports/boost-flyweight/CONTROL +++ b/ports/boost-flyweight/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-flyweight -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-functional, boost-interprocess, boost-mpl, boost-multi-index, boost-parameter, boost-preprocessor, boost-serialization, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost flyweight module diff --git a/ports/boost-flyweight/portfile.cmake b/ports/boost-flyweight/portfile.cmake index 25c0f65f5..ab0e36ed3 100644 --- a/ports/boost-flyweight/portfile.cmake +++ b/ports/boost-flyweight/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/flyweight - REF boost-1.66.0 - SHA512 4c0faaafe0143404d6eabc57ee5089840290c865ab00b7b3c81d4ab37c1603aaec77bc7f592e4566ed20786a14bc6bb9a6623384fdf6886168cac2696224c6df + REF boost-1.67.0 + SHA512 eec64c8c0d473e6bb07968c8cb2dd9c12788a72008d59c8b53b14ea15ada18e740c518df6bcece1cecd13f9511898c69e00693a769404d4e51e2f7efb6c00754 HEAD_REF master ) diff --git a/ports/boost-foreach/CONTROL b/ports/boost-foreach/CONTROL index e2ecd2aae..72cc98a56 100644 --- a/ports/boost-foreach/CONTROL +++ b/ports/boost-foreach/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-foreach -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-detail, boost-iterator, boost-mpl, boost-range, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost foreach module diff --git a/ports/boost-foreach/portfile.cmake b/ports/boost-foreach/portfile.cmake index 21c688318..59977a213 100644 --- a/ports/boost-foreach/portfile.cmake +++ b/ports/boost-foreach/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/foreach - REF boost-1.66.0 - SHA512 17ae42db9b9b13841133cb35ccd1b0a2bf6121e72ef53b7f06d8715d0ef2d9c6daee631df1c8eb87013b1415ec4ed7481b3d67aa86122c84bfc560b0815f81c6 + REF boost-1.67.0 + SHA512 67cce17f58564a1ab09f85f9da3c73135dab2171be9487723e69d1bf10cb1abef2aae3747d39ca605510505510943a114d7637d49dd5f3b097c191b4993052b5 HEAD_REF master ) diff --git a/ports/boost-format/CONTROL b/ports/boost-format/CONTROL index 264544399..0b8cf858d 100644 --- a/ports/boost-format/CONTROL +++ b/ports/boost-format/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-format -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-optional, boost-smart-ptr, boost-throw-exception, boost-utility, boost-vcpkg-helpers Description: Boost format module diff --git a/ports/boost-format/portfile.cmake b/ports/boost-format/portfile.cmake index a80e1c7e6..d88559d64 100644 --- a/ports/boost-format/portfile.cmake +++ b/ports/boost-format/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/format - REF boost-1.66.0 - SHA512 f730b56c3c56e85d5f467b7c9b60b29b112990ac29ecfbd6cdcd41ac6c931b71067a88d35ba688c8b80b9f4636a5f6010448f470cd3c0c7cad7c8c1d933c1a67 + REF boost-1.67.0 + SHA512 31d355d0986f18f32373a45ee6a5d4d8f688dcc3bd13fdf388dd77166459871deb33bc7ecc9dbbc46fcf546ba3ed8a475c5f4fdcf6377af320ec18d15a9a35d4 HEAD_REF master ) diff --git a/ports/boost-function-types/CONTROL b/ports/boost-function-types/CONTROL index a091f72c4..bad8d7e56 100644 --- a/ports/boost-function-types/CONTROL +++ b/ports/boost-function-types/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-function-types -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-detail, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers Description: Boost function_types module diff --git a/ports/boost-function-types/portfile.cmake b/ports/boost-function-types/portfile.cmake index 2a679a25a..ee327ef33 100644 --- a/ports/boost-function-types/portfile.cmake +++ b/ports/boost-function-types/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/function_types - REF boost-1.66.0 - SHA512 ecac32195728a38bb83ee553d25567bca3a4075948fbffdf2f5d6cd7c4df7ca1b90ed32ec2811e6aa7eea264d6a1e63c8fc2fc9a091d081e231aadb513ed1646 + REF boost-1.67.0 + SHA512 843c87d527615c70524cd537252619187aa8088aa5e7f46bffa7d1bd75ba8852901ee89a15490ea90b0be331712d0e8b4db369f9aede83c150b7201b430f0adc HEAD_REF master ) diff --git a/ports/boost-function/CONTROL b/ports/boost-function/CONTROL index 78e68d4a9..c9b474fd9 100644 --- a/ports/boost-function/CONTROL +++ b/ports/boost-function/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-function -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-integer, boost-mpl, boost-preprocessor, boost-type-index, boost-typeof, boost-type-traits, boost-vcpkg-helpers Description: Boost function module diff --git a/ports/boost-function/portfile.cmake b/ports/boost-function/portfile.cmake index decf00686..b8c0a6841 100644 --- a/ports/boost-function/portfile.cmake +++ b/ports/boost-function/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/function - REF boost-1.66.0 - SHA512 7efe61484e99bf4b68bd70415411fe4b22da6c76c7bb2e4b86fc766a98f5bca02d3911c81763893edfabfe6dc3fd4e0b125656a518e4b46449ef2620c1278454 + REF boost-1.67.0 + SHA512 8484b7bcab099a0c96dc021a0a33551ecb0b56fee4bbc6c5a43becc0a82f307f3836204857bfc45aa2db255c7faf61831e8a46f537ebf9bd5730a408c7103c7c HEAD_REF master ) diff --git a/ports/boost-functional/CONTROL b/ports/boost-functional/CONTROL index 1c5b17ccd..7b5b90be4 100644 --- a/ports/boost-functional/CONTROL +++ b/ports/boost-functional/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-functional -Version: 1.66.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-detail, boost-integer, boost-mpl, boost-preprocessor, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.67.0 +Build-Depends: boost-config, boost-mpl, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost functional module diff --git a/ports/boost-functional/portfile.cmake b/ports/boost-functional/portfile.cmake index 5de067de4..89ac3b17a 100644 --- a/ports/boost-functional/portfile.cmake +++ b/ports/boost-functional/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/functional - REF boost-1.66.0 - SHA512 d909a4d4696ece5ebaff97a743c5f9fec2ce27b72de46a96252a07a021ad689ce73aab1f1828ca2925bac0ef48ccbe99bdd5f6a56186061fdecdb416f72cc98f + REF boost-1.67.0 + SHA512 05f8149975166b68a32e0e98b08b91e41b19d2304416afd62dfceaabf76323ee4b711aedc0e5379520d9e4decaeead1e6b8121737732f524d31664a3777670ba HEAD_REF master ) diff --git a/ports/boost-fusion/CONTROL b/ports/boost-fusion/CONTROL index 29864c681..62c087b14 100644 --- a/ports/boost-fusion/CONTROL +++ b/ports/boost-fusion/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-fusion -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-detail, boost-functional, boost-function-types, boost-mpl, boost-preprocessor, boost-static-assert, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost fusion module diff --git a/ports/boost-fusion/portfile.cmake b/ports/boost-fusion/portfile.cmake index 3923f82bc..164c4f70d 100644 --- a/ports/boost-fusion/portfile.cmake +++ b/ports/boost-fusion/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/fusion - REF boost-1.66.0 - SHA512 2c965b3ad18f4b2551af4595de415c3c1354296c1244675a354b74de12106bf10ddea07c7e55e93469f3af0de64cb00e1d353e569af40de506d68b88adeba7d0 + REF boost-1.67.0 + SHA512 2ac1af4f1a9aa9b90fb7057a8133e668207225a46e23c5ec1e65020b8a63c6daeabbf799f0b7aa9946fc5f9dded1003e00c68645363fa9e15014f2af7ea1498b HEAD_REF master ) diff --git a/ports/boost-geometry/CONTROL b/ports/boost-geometry/CONTROL index 009e7e1c1..52879d024 100644 --- a/ports/boost-geometry/CONTROL +++ b/ports/boost-geometry/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-geometry -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-algorithm, boost-array, boost-assert, boost-concept-check, boost-config, boost-container, boost-core, boost-detail, boost-function-types, boost-fusion, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-multiprecision, boost-numeric-conversion, boost-polygon, boost-qvm, boost-range, boost-rational, boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost geometry module diff --git a/ports/boost-geometry/portfile.cmake b/ports/boost-geometry/portfile.cmake index c2f1d20ab..9b63741e9 100644 --- a/ports/boost-geometry/portfile.cmake +++ b/ports/boost-geometry/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/geometry - REF boost-1.66.0 - SHA512 05f983d9258ddc663139a46ecb2f8a14988ad74fcc623af713bc486de2c9241896ca5f6a85d47cd02911f5f1f2f5acc439bb6f45ae9ef13667a30d27d9b5c123 + REF boost-1.67.0 + SHA512 25a2a758804597054442747f9a3288989aee92e42212b1837562d3c629aa1ed0c210e86cb83f4501f7e4280550b194a727ef26ed222ef627a8d260549781bcd3 HEAD_REF master ) diff --git a/ports/boost-gil/CONTROL b/ports/boost-gil/CONTROL index 71bf438b8..94770b5ee 100644 --- a/ports/boost-gil/CONTROL +++ b/ports/boost-gil/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-gil -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-bind, boost-concept-check, boost-config, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost gil module diff --git a/ports/boost-gil/portfile.cmake b/ports/boost-gil/portfile.cmake index deb977a20..94e470ac9 100644 --- a/ports/boost-gil/portfile.cmake +++ b/ports/boost-gil/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/gil - REF boost-1.66.0 - SHA512 f60c452740e56810ee967aab68b61277af0b467085bb7594dfbdea07e02354f2533983f88867c788862bc30c027720f8aeff2ab8f5a251c1a2b7c686b43064bc + REF boost-1.67.0 + SHA512 a40b89a97444d62ed1c6ba2c4ccf6442df9d8afddd7a9af8eacb0a587eb2952faabbd608ebd17030c10a3ce77f32dc6d4bed846fa78a0f57f4b992c0333a2d33 HEAD_REF master ) diff --git a/ports/boost-graph-parallel/CONTROL b/ports/boost-graph-parallel/CONTROL index 13f28ffd5..e7435bd2a 100644 --- a/ports/boost-graph-parallel/CONTROL +++ b/ports/boost-graph-parallel/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-graph-parallel -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-compatibility, boost-config, boost-detail, boost-dynamic-bitset, boost-function, boost-functional, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost graph_parallel module diff --git a/ports/boost-graph-parallel/portfile.cmake b/ports/boost-graph-parallel/portfile.cmake index 32e083f05..71b44bef2 100644 --- a/ports/boost-graph-parallel/portfile.cmake +++ b/ports/boost-graph-parallel/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/graph_parallel - REF boost-1.66.0 - SHA512 0f897d52610827b352c509d9d3400a9424f2e927fe5bce7ba1a39884938ca9ae1c9d362277828d3e77fa727676bfeb993f3d9bc7f11815cc119c0dabbd5a2ed4 + REF boost-1.67.0 + SHA512 f83c9bfb65c519e545657bd2e2752b37ce45d5e21877dd8a8fc36c895c5612cf0284508188be6b46719a5a5b771d5ad1e0fcb00a3082f7f9c5fb0788f2b9d560 HEAD_REF master ) diff --git a/ports/boost-graph/CONTROL b/ports/boost-graph/CONTROL index a7dd22633..a3345ffa0 100644 --- a/ports/boost-graph/CONTROL +++ b/ports/boost-graph/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-graph -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-algorithm, boost-any, boost-array, boost-assert, boost-bimap, boost-bind, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-functional, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-preprocessor, boost-property-map, boost-property-tree, boost-random, boost-range, boost-regex, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-test (!uwp), boost-throw-exception, boost-tti, boost-tuple, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers, boost-xpressive Description: Boost graph module diff --git a/ports/boost-graph/portfile.cmake b/ports/boost-graph/portfile.cmake index 21670d647..75048b8b6 100644 --- a/ports/boost-graph/portfile.cmake +++ b/ports/boost-graph/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/graph - REF boost-1.66.0 - SHA512 49f0292a4cbb26c4f9ada0e85f717a7848a81812957b891f72e99c9b7a62025bce244a2f7ef56aaf42f44ab11c41a02be4f1f70df41d3605da45becf370ca81b + REF boost-1.67.0 + SHA512 afcfa95744da4f4ceefced30601d64a40fa600e3d41311f6140588d8a23e54fcb05226c381fcef0b8b992d61b95a915c867e50221c5290b6c54b915546b3935e HEAD_REF master ) diff --git a/ports/boost-hana/CONTROL b/ports/boost-hana/CONTROL index 9c9524e01..0cdc62ad6 100644 --- a/ports/boost-hana/CONTROL +++ b/ports/boost-hana/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-hana -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers Description: Boost hana module diff --git a/ports/boost-hana/portfile.cmake b/ports/boost-hana/portfile.cmake index 05ce047aa..5a48a4e9e 100644 --- a/ports/boost-hana/portfile.cmake +++ b/ports/boost-hana/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/hana - REF boost-1.66.0 - SHA512 cf105931ad59147edd97aaee29d9af4f069ada58c1c0f49eba7c3f921c5a412c90609853603504207526cf80c728f188ba4ee024fc2b7c8c924f98faf543167a + REF boost-1.67.0 + SHA512 45e8b9da8c09bd6cb74f52068f0e4af43f40126227ad5c557e111c8edce2e8857f5a11c6ecc6c57833041a38d9355a7c0263f9b84cc335725c994a9cb029411b HEAD_REF master ) diff --git a/ports/boost-heap/CONTROL b/ports/boost-heap/CONTROL index 588ee634c..5724d68e8 100644 --- a/ports/boost-heap/CONTROL +++ b/ports/boost-heap/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-heap -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-array, boost-assert, boost-bind, boost-concept-check, boost-integer, boost-intrusive, boost-iterator, boost-mpl, boost-parameter, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost heap module diff --git a/ports/boost-heap/portfile.cmake b/ports/boost-heap/portfile.cmake index 02a25bab9..bdccbce0d 100644 --- a/ports/boost-heap/portfile.cmake +++ b/ports/boost-heap/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/heap - REF boost-1.66.0 - SHA512 3c7f14860e6456144f1282024bdf8c99415fe2c9395a01dea9000b26e9587430a73e133e7c72f3d40b5eab9c891e86ea3fa420a84e7d187a349f869f721b4587 + REF boost-1.67.0 + SHA512 e8c511c8e1cdf0f9f20cf5923657f5a6dff2348a50570b0590444764106030bb40d7efa6e2087818ca71a11bf5fe62642ea08a4a8d7b2b25051f68a46c383a6d HEAD_REF master ) diff --git a/ports/boost-hof/CONTROL b/ports/boost-hof/CONTROL new file mode 100644 index 000000000..886630ca5 --- /dev/null +++ b/ports/boost-hof/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-hof +Version: 1.67.0 +Build-Depends: boost-vcpkg-helpers +Description: Boost hof module diff --git a/ports/boost-hof/portfile.cmake b/ports/boost-hof/portfile.cmake new file mode 100644 index 000000000..59fc83381 --- /dev/null +++ b/ports/boost-hof/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/hof + REF boost-1.67.0 + SHA512 797240bb1a3ac0ed5335dd858db7816f7f07ce99794e5d7b16b08de82ae1d80e7de9f029673569d9f880cc616037299d50571ad7ffb94e30b2d7b08392b4d1c3 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-icl/CONTROL b/ports/boost-icl/CONTROL index d5d8aba74..2923589ef 100644 --- a/ports/boost-icl/CONTROL +++ b/ports/boost-icl/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-icl -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-concept-check, boost-config, boost-date-time, boost-detail, boost-iterator, boost-move, boost-mpl, boost-rational, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost icl module diff --git a/ports/boost-icl/portfile.cmake b/ports/boost-icl/portfile.cmake index 1f6bac41b..087769896 100644 --- a/ports/boost-icl/portfile.cmake +++ b/ports/boost-icl/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/icl - REF boost-1.66.0 - SHA512 3e240adbc815215d58c45978a52cf9e5ee8df1b457634d53f403dfc7785372f1711e407d6b1ccd48f6e4383455a5dc2c5a35923b6ac9ae722b91094902b8a599 + REF boost-1.67.0 + SHA512 1234057200f4329631041a6c1bc644e3096cb24df3e3b3c19bddbe9915e2b2e27148640666befa61e165e6143f47f83280e3a89f84b70c93fa07e6ab38d7c854 HEAD_REF master ) diff --git a/ports/boost-integer/CONTROL b/ports/boost-integer/CONTROL index 6f6773b8c..adde53632 100644 --- a/ports/boost-integer/CONTROL +++ b/ports/boost-integer/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-integer -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-static-assert, boost-vcpkg-helpers Description: Boost integer module diff --git a/ports/boost-integer/portfile.cmake b/ports/boost-integer/portfile.cmake index 4afba50e8..17bd4fbcb 100644 --- a/ports/boost-integer/portfile.cmake +++ b/ports/boost-integer/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/integer - REF boost-1.66.0 - SHA512 ed22f30132300985361c3176b0e308c9ed2d0a2f470c3686898c66f90dfa21912edb92477f82f75b77b3409a21ea317442ab4d21889af45ebb2bc86bf88ce67f + REF boost-1.67.0 + SHA512 bac11eb68d0f0a29919df25e29352daca3f24ab4c183f2f052fbbe1e4c93ac15657b24f9bd450b31910b33c68234581e834d51651585bbba7e69b10646ab224f HEAD_REF master ) diff --git a/ports/boost-interprocess/CONTROL b/ports/boost-interprocess/CONTROL index 75d524e61..72f7f45a6 100644 --- a/ports/boost-interprocess/CONTROL +++ b/ports/boost-interprocess/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-interprocess -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-integer, boost-intrusive, boost-move, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers Description: Boost interprocess module diff --git a/ports/boost-interprocess/portfile.cmake b/ports/boost-interprocess/portfile.cmake index c10635499..b46d0dd91 100644 --- a/ports/boost-interprocess/portfile.cmake +++ b/ports/boost-interprocess/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/interprocess - REF boost-1.66.0 - SHA512 e3c7f4fb49d126671354212fdb079c418847061a33589ab92c8cb600b469b98c658533307e1d0322c97568eb2716caccbf43b4b2d8eab520eab4d0f50b4df773 + REF boost-1.67.0 + SHA512 ea4ece14b396220549bd3887330cd4a49149f303c936c03e27e232683235f62f759f44f0a473e24d3466bbadfd785633589caacaf620f861cddf03750c270467 HEAD_REF master ) diff --git a/ports/boost-interval/CONTROL b/ports/boost-interval/CONTROL index cfd096adc..c9f43b7d1 100644 --- a/ports/boost-interval/CONTROL +++ b/ports/boost-interval/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-interval -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-compatibility, boost-config, boost-logic (!uwp), boost-vcpkg-helpers Description: Boost interval module diff --git a/ports/boost-interval/portfile.cmake b/ports/boost-interval/portfile.cmake index 9fe190197..373fe4777 100644 --- a/ports/boost-interval/portfile.cmake +++ b/ports/boost-interval/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/interval - REF boost-1.66.0 - SHA512 adc8e7cf75de4f07607b2a13f38c4bb442780e7ad2e5a73f831803101f61f3d93d8d26407d68b1f811309e9a1362613fd29b5ff49e013341d421b0e76d6f4a69 + REF boost-1.67.0 + SHA512 fb02438e6e29ab3ce21fbb87cd8562d278f9f352b3964cb7a62a6f0ea0b38567af5bfd12973cdd48c6235283b0b7b6ef9ecfd9c9a130b14c22a9764aec6c2102 HEAD_REF master ) diff --git a/ports/boost-intrusive/CONTROL b/ports/boost-intrusive/CONTROL index 966c775c3..d7d7ae3f0 100644 --- a/ports/boost-intrusive/CONTROL +++ b/ports/boost-intrusive/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-intrusive -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-core, boost-functional, boost-move, boost-static-assert, boost-vcpkg-helpers Description: Boost intrusive module diff --git a/ports/boost-intrusive/portfile.cmake b/ports/boost-intrusive/portfile.cmake index 2fc9fd32a..73f5d7673 100644 --- a/ports/boost-intrusive/portfile.cmake +++ b/ports/boost-intrusive/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/intrusive - REF boost-1.66.0 - SHA512 b61e88d38c9ee6cd174380c53fc3422f72824c895b3723c4ac7b3b3e0bd52d52fe40d349db5f8eff3b23413950ae872fa7634514ac072111614875922580c493 + REF boost-1.67.0 + SHA512 9181b1c7ea651c4c8aa0ae226b2a35cb65521da105249b12af899e294ed1f20868002846a3f200b40d51c795c0a6e6b3b2b2f41ea59e817a842cb09aadcf9f9e HEAD_REF master ) diff --git a/ports/boost-io/CONTROL b/ports/boost-io/CONTROL index e146c12a6..26764cae4 100644 --- a/ports/boost-io/CONTROL +++ b/ports/boost-io/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-io -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-detail, boost-vcpkg-helpers Description: Boost io module diff --git a/ports/boost-io/portfile.cmake b/ports/boost-io/portfile.cmake index 0991872ff..729e22175 100644 --- a/ports/boost-io/portfile.cmake +++ b/ports/boost-io/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/io - REF boost-1.66.0 - SHA512 33926210420fa6bd83006e6d2de3bad4c1094c179309402d78aea906cdb301e652b32438472a29b195fac7e007146fbb081c722cc2ebf2c63acb0d0e44f73f20 + REF boost-1.67.0 + SHA512 a0549634a0d2afe1646437dab5b018a139f9e1b98fb3cb2a5730262700d64aa54a87a9676901ac192676fc5ee4b61aee11205f20acaa0da5746844ac292a913a HEAD_REF master ) diff --git a/ports/boost-iostreams/CMakeLists.txt b/ports/boost-iostreams/CMakeLists.txt new file mode 100644 index 000000000..17e0af6de --- /dev/null +++ b/ports/boost-iostreams/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required(VERSION 3.5) +project(boost-iostreams) + +if(BUILD_SHARED_LIBS) + add_definitions(-DBOOST_IOSTREAMS_DYN_LINK=1) +endif() +add_definitions( + -DBOOST_ALL_NO_LIB=1 + -DBOOST_IOSTREAMS_USE_DEPRECATED +) +include_directories(include) +file(GLOB SOURCES src/*.cpp) +add_library(boost_iostreams ${SOURCES}) + +if(MSVC) + set_property(TARGET boost_iostreams PROPERTY OUTPUT_NAME_RELEASE boost_iostreams-vc140-mt) + set_property(TARGET boost_iostreams PROPERTY OUTPUT_NAME_DEBUG boost_iostreams-vc140-mt-gd) + + set_property(TARGET boost_iostreams PROPERTY RUNTIME_OUTPUT_NAME_RELEASE boost_iostreams-vc141-mt-x32-1_67) + set_property(TARGET boost_iostreams PROPERTY RUNTIME_OUTPUT_NAME_DEBUG boost_iostreams-vc141-mt-gd-x32-1_67) +endif() + +find_package(ZLIB REQUIRED) +target_link_libraries(boost_iostreams PRIVATE ZLIB::ZLIB) + +find_package(BZip2 REQUIRED) +target_link_libraries(boost_iostreams PRIVATE BZip2::BZip2) + +find_package(LibLZMA REQUIRED) +target_include_directories(boost_iostreams PRIVATE ${LIBLZMA_INCLUDE_DIRS}) +target_link_libraries(boost_iostreams PRIVATE ${LIBLZMA_LIBRARIES}) + +install(TARGETS boost_iostreams + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) diff --git a/ports/boost-iostreams/CONTROL b/ports/boost-iostreams/CONTROL index d0d82f8b6..249031a5a 100644 --- a/ports/boost-iostreams/CONTROL +++ b/ports/boost-iostreams/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-iostreams -Version: 1.66.0 -Build-Depends: boost-assert, boost-bind, boost-build, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, zlib +Version: 1.67.0 +Build-Depends: boost-assert, boost-bind, boost-build, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, zlib, liblzma Description: Boost iostreams module diff --git a/ports/boost-iostreams/portfile.cmake b/ports/boost-iostreams/portfile.cmake index 782a7cb40..c929f9ed7 100644 --- a/ports/boost-iostreams/portfile.cmake +++ b/ports/boost-iostreams/portfile.cmake @@ -5,12 +5,26 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/iostreams - REF boost-1.66.0 - SHA512 d2d603013dd952a550850c986fc18ded90a483d9eccd80aec4bb421187f6d8ba8fc2c82926f60d4e4f777c67eab1b8dc3708058147dcdd1ab259aa13cee26fd9 + REF boost-1.67.0 + SHA512 73fada0b6e236e0b86f28d8cf75e71dfb6b6a84622986cd72f39de3a310442e6122c91d22ba95bd29381dd559f5cac52a1e28cf97e7e8a6f0c70ccc4f38ceeba HEAD_REF master ) -include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) -boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) -include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) -boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) +vcpkg_download_distfile(LICENSE + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.67.0/LICENSE_1_0.txt" + FILENAME "boost_LICENSE_1_0.txt" + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 +) + +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(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-iostreams RENAME copyright) diff --git a/ports/boost-iterator/CONTROL b/ports/boost-iterator/CONTROL index 416c85d53..f6acb2afa 100644 --- a/ports/boost-iterator/CONTROL +++ b/ports/boost-iterator/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-iterator -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-function-types, boost-fusion, boost-mpl, boost-optional, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost iterator module diff --git a/ports/boost-iterator/portfile.cmake b/ports/boost-iterator/portfile.cmake index 365938407..e2163a620 100644 --- a/ports/boost-iterator/portfile.cmake +++ b/ports/boost-iterator/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/iterator - REF boost-1.66.0 - SHA512 33a3ffd242769bf55325516346193db0d5ddb69e9da1f7805c35953e4ec7f090fb60faeea8d19c17e651148ba93d48b4a634533de9b5cb13af2a5e9cd0fd0e15 + REF boost-1.67.0 + SHA512 245a63416ae578b494328798d578fe3f253e339abd10c047a14137181759b99d02a9eef4fa4872b794154378a1b80b12fd502849d67b8b13012e6b08b66b650e HEAD_REF master ) diff --git a/ports/boost-lambda/CONTROL b/ports/boost-lambda/CONTROL index dd83f0048..a1996dfbf 100644 --- a/ports/boost-lambda/CONTROL +++ b/ports/boost-lambda/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-lambda -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-bind, boost-config, boost-detail, boost-mpl, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost lambda module diff --git a/ports/boost-lambda/portfile.cmake b/ports/boost-lambda/portfile.cmake index bb9d68c6f..b14d46c97 100644 --- a/ports/boost-lambda/portfile.cmake +++ b/ports/boost-lambda/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/lambda - REF boost-1.66.0 - SHA512 2f5fd6c55c686528971c9e021779f39217952b279e5bef46879233fb1c516895a4fcdc6eddf43cd0fb73aa7ee5f868d6f4d51fdc74c9f68515ef6735ff31a349 + REF boost-1.67.0 + SHA512 d95b3df3321639c4ced7db0fa10e5f204d20961a95d185080a40477520a591b5806974ec7cb28256bbb8b58e2f635cac60fff47eefabe29c5c3fabda211e276f HEAD_REF master ) diff --git a/ports/boost-lexical-cast/CONTROL b/ports/boost-lexical-cast/CONTROL index a7c913996..68b6e1e05 100644 --- a/ports/boost-lexical-cast/CONTROL +++ b/ports/boost-lexical-cast/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-lexical-cast -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-array, boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-detail, boost-integer, boost-mpl, boost-numeric-conversion, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost lexical_cast module diff --git a/ports/boost-lexical-cast/portfile.cmake b/ports/boost-lexical-cast/portfile.cmake index b86e06415..877a8cf84 100644 --- a/ports/boost-lexical-cast/portfile.cmake +++ b/ports/boost-lexical-cast/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/lexical_cast - REF boost-1.66.0 - SHA512 93afc3a296ca30ebb3f48aaf7752a4da33d3e621b56f0f574e98a21aceb7c402fc7512ac65895c8bf473b6962222d0022a6d2aadad5ce2cdbfdf5318967dc76b + REF boost-1.67.0 + SHA512 b3c0c4e94265784001d8b9fc317a2bafe4c83aede9311a7172a76b1c0bf47cc811f7963e9580d0d3f0527f16531abb204b9201c0cc611dd322bcfce2671fa54d HEAD_REF master ) diff --git a/ports/boost-local-function/CONTROL b/ports/boost-local-function/CONTROL index 512cb0f7d..415cba13d 100644 --- a/ports/boost-local-function/CONTROL +++ b/ports/boost-local-function/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-local-function -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-mpl, boost-preprocessor, boost-scope-exit, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost local_function module diff --git a/ports/boost-local-function/portfile.cmake b/ports/boost-local-function/portfile.cmake index a4f378933..95d8334f6 100644 --- a/ports/boost-local-function/portfile.cmake +++ b/ports/boost-local-function/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/local_function - REF boost-1.66.0 - SHA512 3f76fda169f11ceca60c8e1857643d7bf7eea85fdb615635469e28cdc6e02f022d5f698ec53608d6f1068be653ceda40f33f4c832782e347037b924208fc5d20 + REF boost-1.67.0 + SHA512 dfe717ff4fd46a44422162fa00289a1f57aaed42215d238b4219d493bf4945564e1d6103599c0c3d90ed196eff2dc7ad6f0949e284ddfc9c6f400620b63ebaf8 HEAD_REF master ) diff --git a/ports/boost-locale/CONTROL b/ports/boost-locale/CONTROL index 5ed156bdd..eca61edd4 100644 --- a/ports/boost-locale/CONTROL +++ b/ports/boost-locale/CONTROL @@ -1,6 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-locale -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-build, boost-config, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-thread (!uwp), boost-type-traits, boost-unordered, boost-vcpkg-helpers, libiconv (!uwp&!windows) Description: Boost locale module diff --git a/ports/boost-locale/portfile.cmake b/ports/boost-locale/portfile.cmake index e6d82a1a6..c4dbf9229 100644 --- a/ports/boost-locale/portfile.cmake +++ b/ports/boost-locale/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/locale - REF boost-1.66.0 - SHA512 558c84fe83909b9eb410ed5b846d2393733811e3765e99e41884a7fc7020163437a42584911b4f634706c1a0e79e23bb09bd6a3ffa219c9e524a10ace02728af + REF boost-1.67.0 + SHA512 220ed43884722e7a342b8fa5010e8659ccebcd106907c38052b411d710f110924a2b4622cb10e1302ad0553cf350430f02c63e3e66d45bb38b47d7eb022d01d9 HEAD_REF master ) diff --git a/ports/boost-lockfree/CONTROL b/ports/boost-lockfree/CONTROL index 7a6eaef4d..ca9746fdc 100644 --- a/ports/boost-lockfree/CONTROL +++ b/ports/boost-lockfree/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-lockfree -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-align, boost-array, boost-assert, boost-atomic, boost-config, boost-core, boost-integer, boost-mpl, boost-parameter, boost-predef, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost lockfree module diff --git a/ports/boost-lockfree/portfile.cmake b/ports/boost-lockfree/portfile.cmake index 989729d14..af6f80454 100644 --- a/ports/boost-lockfree/portfile.cmake +++ b/ports/boost-lockfree/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/lockfree - REF boost-1.66.0 - SHA512 f4c5c146fd2e457e6ee4090a4492eef7cd204ec594349c239c3f50e348a161b8598d7445ca03daea8720b58f0eb1eb5ec8332b078f8dcd9d8133b0d17796e21e + REF boost-1.67.0 + SHA512 d4287c5782191469a077f7cebfa64d72733f186fe627e9fa97a3856168423f9f606168bb67b47814ef2047f0b7434c02dc6ff93ba3f817923d3dff22f46360f9 HEAD_REF master ) diff --git a/ports/boost-log/CONTROL b/ports/boost-log/CONTROL index f8398c7ca..6f4116b03 100644 --- a/ports/boost-log/CONTROL +++ b/ports/boost-log/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-log -Version: 1.66.0 -Build-Depends: boost-align, boost-array, boost-asio, boost-assert, boost-atomic, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-date-time, boost-detail, boost-exception, boost-filesystem (!uwp), boost-function-types, boost-fusion, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iterator, boost-lexical-cast, boost-locale (!uwp), boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-parameter, boost-phoenix, boost-predef, boost-preprocessor, boost-property-tree, boost-proto, boost-random, boost-range, boost-regex, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-thread (!uwp), boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi, boost-xpressive +Version: 1.67.0 +Build-Depends: boost-align, boost-array, boost-asio, boost-assert, boost-atomic, boost-bind, boost-build, boost-compatibility, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-filesystem (!uwp), boost-function-types, boost-fusion, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iterator, boost-lexical-cast, boost-locale (!uwp), boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-parameter, boost-phoenix, boost-predef, boost-preprocessor, boost-property-tree, boost-proto, boost-random, boost-range, boost-regex, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-thread (!uwp), boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi, boost-xpressive Description: Boost log module diff --git a/ports/boost-log/portfile.cmake b/ports/boost-log/portfile.cmake index 302fb786a..5d9dbb622 100644 --- a/ports/boost-log/portfile.cmake +++ b/ports/boost-log/portfile.cmake @@ -5,11 +5,24 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/log - REF boost-1.66.0 - SHA512 cb0b7ac7136c1066c6dd10a27873febbf983b9c7b7d141ba5e1076a0984cb83609a3c8d38d13e7641002d460f868c2593fecdfd86d9eb75078f14597ab965fa1 + REF boost-1.67.0 + SHA512 68046c749156e11c8c1aa256a54bc89d809b2fa627565051ef09481378cb401eeaec533585f34ce065abb1e416381be536ca19ad972d35b3096e4332d1ffee9d HEAD_REF master ) +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +string(REPLACE " @select-arch-specific-sources" "#@select-arch-specific-sources" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + +file(READ ${SOURCE_PATH}/build/log-architecture.jam _contents) +string(REPLACE + "\nproject.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" + "\nproject.load [ path.join [ path.make $(here:D) ] config/checks/architecture ] ;" + _contents "${_contents}") +file(WRITE ${SOURCE_PATH}/build/log-architecture.jam "${_contents}") + include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) diff --git a/ports/boost-logic/CONTROL b/ports/boost-logic/CONTROL index 535a53caa..32310be7c 100644 --- a/ports/boost-logic/CONTROL +++ b/ports/boost-logic/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-logic -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-detail, boost-vcpkg-helpers Description: Boost logic module diff --git a/ports/boost-logic/portfile.cmake b/ports/boost-logic/portfile.cmake index 08a578ccd..fce91a705 100644 --- a/ports/boost-logic/portfile.cmake +++ b/ports/boost-logic/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/logic - REF boost-1.66.0 - SHA512 76e8534127da09c7b70e14927dae03696e251e1c9a825f466d6848dfd0ba14e0d4e8b7bd00dfebe4caf9ef10c591e0d50140b1d4c9c638e0b3f7ae7bf353b8af + REF boost-1.67.0 + SHA512 2a82bbfcea9d1a4ed8563374dc8796873b05ab474edebaea9a9e983148c80ce9bd76625d2bf7e40942c328321cf259ddc70f89550f43a4c6c3e36cb7e5cbe569 HEAD_REF master ) diff --git a/ports/boost-math/CONTROL b/ports/boost-math/CONTROL index 2617f4412..d9cc1cf1a 100644 --- a/ports/boost-math/CONTROL +++ b/ports/boost-math/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-math -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-array, boost-assert, boost-atomic, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-integer, boost-lambda, boost-lexical-cast, boost-modular-build-helper, boost-mpl, boost-predef, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost math module diff --git a/ports/boost-math/portfile.cmake b/ports/boost-math/portfile.cmake index 2ad0b28e2..cfeb034fa 100644 --- a/ports/boost-math/portfile.cmake +++ b/ports/boost-math/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/math - REF boost-1.66.0 - SHA512 0fbeea0cb3303fe66e42b54d3db81e92d6b05a5dec90bd36e1365db738b33790e9bc6ff56a8ead0a2e2d578606702eb364d023bce0f1f42a454f60d0626e8737 + REF boost-1.67.0 + SHA512 7d84aacd9a39daf61f836cf522331ea21b18413b28716a2620fcf49c05b32e0e2f7e14f7bd207fc1df7a6b450356158891ef2576335911b0d6a3f78326eb8c62 HEAD_REF master ) diff --git a/ports/boost-metaparse/CONTROL b/ports/boost-metaparse/CONTROL index 7f18a1f45..86ddf75f1 100644 --- a/ports/boost-metaparse/CONTROL +++ b/ports/boost-metaparse/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-metaparse -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-mpl, boost-predef, boost-preprocessor, boost-static-assert, boost-type-traits, boost-vcpkg-helpers Description: Boost metaparse module diff --git a/ports/boost-metaparse/portfile.cmake b/ports/boost-metaparse/portfile.cmake index 22742179c..d25238629 100644 --- a/ports/boost-metaparse/portfile.cmake +++ b/ports/boost-metaparse/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/metaparse - REF boost-1.66.0 - SHA512 919c0f198b19114fe1ed457fead502cee729b7c14de460b176784e9778b0040a960d916b4c7fbeb3e7c3ec285b7b1a0d90de8d0dfcca5c14c9d810ab17da5717 + REF boost-1.67.0 + SHA512 d92a78f3dd56083464bb2544427e87c5208d716f509452ada3150fb1beb43caae4dba16daf6626ae0783d1ae0812bbe49be23a638138bccdca873037857ec7a4 HEAD_REF master ) diff --git a/ports/boost-modular-build-helper/CMakeLists.txt b/ports/boost-modular-build-helper/CMakeLists.txt index 4153f0132..f75a6ee66 100644 --- a/ports/boost-modular-build-helper/CMakeLists.txt +++ b/ports/boost-modular-build-helper/CMakeLists.txt @@ -124,7 +124,7 @@ add_custom_target(boost ALL threading=multi threadapi=pthread debug-symbols=on - WORKING_DIRECTORY ${SOURCE_PATH} + WORKING_DIRECTORY ${SOURCE_PATH}/build ) install( diff --git a/ports/boost-modular-build-helper/CONTROL b/ports/boost-modular-build-helper/CONTROL index a7f1ecf61..7324d6ba0 100644 --- a/ports/boost-modular-build-helper/CONTROL +++ b/ports/boost-modular-build-helper/CONTROL @@ -1,2 +1,2 @@ Source: boost-modular-build-helper -Version: 2018-04-15 +Version: 2018-04-16-4 diff --git a/ports/boost-modular-build-helper/Jamroot.jam b/ports/boost-modular-build-helper/Jamroot.jam index 1e3dce89c..8c24fff86 100644 --- a/ports/boost-modular-build-helper/Jamroot.jam +++ b/ports/boost-modular-build-helper/Jamroot.jam @@ -1,5 +1,5 @@ -constant BOOST_VERSION : 1.66.0 ; -constant BOOST_VERSION_ABI_TAG : 1_66 ; +constant BOOST_VERSION : 1.67.0 ; +constant BOOST_VERSION_ABI_TAG : 1_67 ; constant BOOST_JAMROOT_MODULE : $(__name__) ; import boostcpp ; @@ -39,6 +39,9 @@ if "@PORT@" != "boost-system" lib boost_system : : "@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_system@BOOST_LIB_RELEASE_SUFFIX@" release ; lib boost_system : : "@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_system@BOOST_LIB_DEBUG_SUFFIX@" debug ; explicit boost_system ; + + use-project /boost : . ; + alias system : boost_system ; } if "@PORT@" != "boost-chrono" diff --git a/ports/boost-modular-build-helper/boost-modular-build.cmake b/ports/boost-modular-build-helper/boost-modular-build.cmake index 2833c51a6..d28762175 100644 --- a/ports/boost-modular-build-helper/boost-modular-build.cmake +++ b/ports/boost-modular-build-helper/boost-modular-build.cmake @@ -32,10 +32,6 @@ function(boost_modular_build) set(_bm_DIR ${CURRENT_INSTALLED_DIR}/share/boost-build) - if(EXISTS "${_bm_SOURCE_PATH}/Jamfile.v2") - file(REMOVE_RECURSE "${_bm_SOURCE_PATH}/Jamfile.v2") - endif() - set(REQUIREMENTS ${_bm_REQUIREMENTS}) if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") @@ -48,16 +44,10 @@ function(boost_modular_build) set(BOOST_LIB_DEBUG_SUFFIX .a) endif() - # boost thread superfluously builds has_atomic_flag_lockfree on windows. if(EXISTS "${_bm_SOURCE_PATH}/build/Jamfile.v2") file(READ ${_bm_SOURCE_PATH}/build/Jamfile.v2 _contents) - string(REPLACE - "\n\nexe has_atomic_flag_lockfree" - "\n\nexplicit has_atomic_flag_lockfree ;\nexe has_atomic_flag_lockfree" - _contents - "${_contents}" - ) - string(REPLACE "\nimport ../../config/checks/config : requires ;" "\n# import ../../config/checks/config : requires ;" _contents "${_contents}") + #string(REPLACE "import ../../predef/check/predef" "import predef/check/predef" _contents "${_contents}") + #string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") string(REGEX REPLACE "\.\./\.\./([^/ ]+)/build//(boost_[^/ ]+)" "/boost/\\1//\\2" @@ -68,16 +58,13 @@ function(boost_modular_build) file(WRITE ${_bm_SOURCE_PATH}/build/Jamfile.v2 "${_contents}") endif() - if(EXISTS "${_bm_SOURCE_PATH}/build/log-architecture.jam") - file(READ ${_bm_SOURCE_PATH}/build/log-architecture.jam _contents) - string(REPLACE - "\nproject.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" - "\n# project.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" - _contents "${_contents}") - file(WRITE ${_bm_SOURCE_PATH}/build/log-architecture.jam "${_contents}") - endif() - configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) + # if(EXISTS "${CURRENT_INSTALLED_DIR}/share/boost-config/checks") + # file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${_bm_SOURCE_PATH}/build/config") + # endif() + # if(EXISTS "${CURRENT_INSTALLED_DIR}/share/boost-predef/check") + # file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-predef/check" DESTINATION "${_bm_SOURCE_PATH}/build/predef") + # endif() if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") if(DEFINED _bm_BOOST_CMAKE_FRAGMENT) @@ -250,7 +237,7 @@ function(boost_modular_build) ${_bm_OPTIONS_REL} variant=release debug-symbols=on - WORKING_DIRECTORY ${_bm_SOURCE_PATH} + WORKING_DIRECTORY ${_bm_SOURCE_PATH}/build LOGNAME build-${TARGET_TRIPLET}-rel ) message(STATUS "Building ${TARGET_TRIPLET}-rel done") @@ -267,7 +254,7 @@ function(boost_modular_build) ${_bm_OPTIONS} ${_bm_OPTIONS_DBG} variant=debug - WORKING_DIRECTORY ${_bm_SOURCE_PATH} + WORKING_DIRECTORY ${_bm_SOURCE_PATH}/build LOGNAME build-${TARGET_TRIPLET}-dbg ) message(STATUS "Building ${TARGET_TRIPLET}-dbg done") @@ -322,7 +309,7 @@ function(boost_modular_build) string(REPLACE "-x64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries string(REPLACE "-a32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries string(REPLACE "-a64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries - string(REPLACE "-1_66" "" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake > 3.10 to locate the binaries + string(REPLACE "-1_67" "" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake > 3.10 to locate the binaries string(REPLACE "_python3-" "_python-" NEW_FILENAME ${NEW_FILENAME}) if("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}") # nothing to do diff --git a/ports/boost-move/CONTROL b/ports/boost-move/CONTROL index ec9de26e9..4f68406d4 100644 --- a/ports/boost-move/CONTROL +++ b/ports/boost-move/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-move -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-detail, boost-integer, boost-static-assert, boost-vcpkg-helpers Description: Boost move module diff --git a/ports/boost-move/portfile.cmake b/ports/boost-move/portfile.cmake index c340db6e3..f0b02398d 100644 --- a/ports/boost-move/portfile.cmake +++ b/ports/boost-move/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/move - REF boost-1.66.0 - SHA512 e431ca8c709f6acb205f93e3c1de1a3b46325e183726bd9b862f4fba436af92b3f5a945eddfe04c3fa775fd88311f98eafa9e81f5014f3a0309096f18b837286 + REF boost-1.67.0 + SHA512 4ff739fbd59db18b4e8ec6b2bd85072422a6253b964d5f12c49e8c0f022ad5760927f753c4b1e75bcb7c38fd8e6f7a9b31aa58b5f8672eb273011a8602dfeb80 HEAD_REF master ) diff --git a/ports/boost-mp11/CONTROL b/ports/boost-mp11/CONTROL index 70bd30300..fa92b50d1 100644 --- a/ports/boost-mp11/CONTROL +++ b/ports/boost-mp11/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-mp11 -Version: 1.66.0 -Build-Depends: boost-config, boost-detail, boost-vcpkg-helpers +Version: 1.67.0 +Build-Depends: boost-config, boost-vcpkg-helpers Description: Boost mp11 module diff --git a/ports/boost-mp11/portfile.cmake b/ports/boost-mp11/portfile.cmake index a350e333e..95aa349b2 100644 --- a/ports/boost-mp11/portfile.cmake +++ b/ports/boost-mp11/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/mp11 - REF boost-1.66.0 - SHA512 40eb7813f7821d584733b5499270b8ef26619502a3eac78b026587477be881a55efbb99769a0818c50413facb12f583b459df121c8d01dc06ceb4ea50a5f7029 + REF boost-1.67.0 + SHA512 baf1127b837db0902576bbb7f4bb09ad8f38f19ae45025879ae49ba9fef723647460b35a58f81d6bb7cf7dbbf94ff81cd32a948540e276660c8b8de5318f474b HEAD_REF master ) diff --git a/ports/boost-mpi/CONTROL b/ports/boost-mpi/CONTROL index b5cfcd106..c6d33eb26 100644 --- a/ports/boost-mpi/CONTROL +++ b/ports/boost-mpi/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-mpi -Version: 1.66.0-1 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, msmpi +Version: 1.67.0-1 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-foreach, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, msmpi Description: Boost mpi module diff --git a/ports/boost-mpi/portfile.cmake b/ports/boost-mpi/portfile.cmake index 0ac40b4a6..ac67bd677 100644 --- a/ports/boost-mpi/portfile.cmake +++ b/ports/boost-mpi/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/mpi - REF boost-1.66.0 - SHA512 bd6385274f291c905ba0239f8399058e4bf76a07d5b984a10fe737e895495c92190ef468be48c32247d4bcb3dd844a5b72b9370ebd2a95945aa38be60bdd3465 + REF boost-1.67.0 + SHA512 fd9c5795db268dbd16bfc051344f6f58ca691dafefb05e2f89521db84d57c6f0ee3f750a75d06b3aaefb14261d0bc40f5e002932383ae0f03c6456d0086c6b8e HEAD_REF master ) diff --git a/ports/boost-mpl/CONTROL b/ports/boost-mpl/CONTROL index f082844d6..350007a53 100644 --- a/ports/boost-mpl/CONTROL +++ b/ports/boost-mpl/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-mpl -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-detail, boost-predef, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers Description: Boost mpl module diff --git a/ports/boost-mpl/portfile.cmake b/ports/boost-mpl/portfile.cmake index 44fc12d93..92f6df54b 100644 --- a/ports/boost-mpl/portfile.cmake +++ b/ports/boost-mpl/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/mpl - REF boost-1.66.0 - SHA512 e88fa03fbc0f876f838826c5ccfd3866425fa87fd81b9aeb83e4c0afded189a66b06206230f07d1177bdbc39ea5b15cb050ad6285d7704ea83bb43c7d608cc1b + REF boost-1.67.0 + SHA512 90143065ae6a180dd542ad50ceb111d221b587e6e109707c3421582996f0918828f42df69d1e44071981996f30fe59e969efa2271a8b70e70a10516f9b83b1f4 HEAD_REF master ) diff --git a/ports/boost-msm/CONTROL b/ports/boost-msm/CONTROL index f51a7993f..704e55def 100644 --- a/ports/boost-msm/CONTROL +++ b/ports/boost-msm/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-msm -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-any, boost-assert, boost-bind, boost-circular-buffer, boost-config, boost-core, boost-detail, boost-function, boost-fusion, boost-mpl, boost-parameter, boost-phoenix, boost-preprocessor, boost-proto, boost-serialization, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost msm module diff --git a/ports/boost-msm/portfile.cmake b/ports/boost-msm/portfile.cmake index c16c3a962..c22d53aa3 100644 --- a/ports/boost-msm/portfile.cmake +++ b/ports/boost-msm/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/msm - REF boost-1.66.0 - SHA512 722360bb58971b52ca2078f908d439544d577fbcba0a99328a000be59772e492c5243192641cc91fe6b3ed95885b209a30f47fd1dd7246889b0552cdc1246b3d + REF boost-1.67.0 + SHA512 073afc97247d0cf6eb579cffafbd43696390b28125d7e104cba4b5e2ac6120b24f64c5fa167f5e5958d7e7fb93eb7ea698b660f9fcee781bd84068919f6512e7 HEAD_REF master ) diff --git a/ports/boost-multi-array/CONTROL b/ports/boost-multi-array/CONTROL index 68ac4410b..efa6049e7 100644 --- a/ports/boost-multi-array/CONTROL +++ b/ports/boost-multi-array/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-multi-array -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-compatibility, boost-config, boost-vcpkg-helpers Description: Boost multi_array module diff --git a/ports/boost-multi-array/portfile.cmake b/ports/boost-multi-array/portfile.cmake index ead468c54..93ff6b0aa 100644 --- a/ports/boost-multi-array/portfile.cmake +++ b/ports/boost-multi-array/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/multi_array - REF boost-1.66.0 - SHA512 6240a90a020f1a6dda1be9e5d5d3743d6f5c50cea1a8b8f75151e60314822e8469db7c0d134a1b1ff50af40833017ee087673894e7e8bd6c394d68547ae68d62 + REF boost-1.67.0 + SHA512 a1f58b1223ffc6935d3ff9dd599dea294af36e9532adef471be0c971450ffd5ebafed6b0ab61637663df22e933b066eccac1fa50c783961d7a4bcf209c7d0fbb HEAD_REF master ) diff --git a/ports/boost-multi-index/CONTROL b/ports/boost-multi-index/CONTROL index d6da63dcd..86e7733dd 100644 --- a/ports/boost-multi-index/CONTROL +++ b/ports/boost-multi-index/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-multi-index -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-bind, boost-compatibility, boost-config, boost-core, boost-detail, boost-foreach, boost-functional, boost-integer, boost-iterator, boost-move, boost-mpl, boost-preprocessor, boost-serialization, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost multi_index module diff --git a/ports/boost-multi-index/portfile.cmake b/ports/boost-multi-index/portfile.cmake index 7b8f35aff..cc458c95a 100644 --- a/ports/boost-multi-index/portfile.cmake +++ b/ports/boost-multi-index/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/multi_index - REF boost-1.66.0 - SHA512 a96c5f7f6a31236462a06c11320232d5aeb16a4df9ff8af972d03c27fb35d6cf17789d8ea6b6d155b55ea435335e605ec7a049c418c529ed48f99b31a4f34423 + REF boost-1.67.0 + SHA512 6630d086a99b5e36d344643030a1639ab1d9393ccc93b112d56cb6c674e97f67b4a9245e51d0b43416274f50d2af094551c814822c9b17abc19b52227042ad91 HEAD_REF master ) diff --git a/ports/boost-multiprecision/CONTROL b/ports/boost-multiprecision/CONTROL index 241880570..b78a02113 100644 --- a/ports/boost-multiprecision/CONTROL +++ b/ports/boost-multiprecision/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-multiprecision -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-array, boost-assert, boost-config, boost-detail, boost-functional, boost-integer, boost-lexical-cast, boost-math, boost-mpl, boost-random, boost-rational, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost multiprecision module diff --git a/ports/boost-multiprecision/portfile.cmake b/ports/boost-multiprecision/portfile.cmake index 43423e6c3..5ded1a0d8 100644 --- a/ports/boost-multiprecision/portfile.cmake +++ b/ports/boost-multiprecision/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/multiprecision - REF boost-1.66.0 - SHA512 3ba38ec20855a0f2f363c34e3c958a7e2e93cbb45d1ab995c26a38e06751192ada95e1a28ea0e9106002cef6250b68dcdecf83a8c6b42676c467ec2d7626288e + REF boost-1.67.0 + SHA512 a2481ad9856ab5024d86097967f187596f18eada71effa51313fb72b02809f5177582fe13bfa5db647f31b5a667b209bf044bc0598385408494c0f6284d0c8a2 HEAD_REF master ) diff --git a/ports/boost-numeric-conversion/CONTROL b/ports/boost-numeric-conversion/CONTROL index 8bc729ec9..674e4ca0a 100644 --- a/ports/boost-numeric-conversion/CONTROL +++ b/ports/boost-numeric-conversion/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-numeric-conversion -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-detail, boost-integer, boost-preprocessor, boost-throw-exception, boost-vcpkg-helpers Description: Boost numeric_conversion module diff --git a/ports/boost-numeric-conversion/portfile.cmake b/ports/boost-numeric-conversion/portfile.cmake index c525b2e1f..b14d24011 100644 --- a/ports/boost-numeric-conversion/portfile.cmake +++ b/ports/boost-numeric-conversion/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/numeric_conversion - REF boost-1.66.0 - SHA512 3f20e7adf501d69544fe5a4e8b52efa8e7b4327c0c371f1abc22f6aa6035931bcf0597853690b59140378e158462b0ba1d85d2c8ba978c2a5185cac7acefd313 + REF boost-1.67.0 + SHA512 0c1d46e4529bcec8eeb5b138f9ded9974688e14923eb148dc8e89f7fce93d07236be5448d28d9812f7b87bdd11391f0ab8ca57b659b7bedc820d0080b3a3f5d1 HEAD_REF master ) diff --git a/ports/boost-odeint/CONTROL b/ports/boost-odeint/CONTROL index 4ab8a7814..86baeb6a6 100644 --- a/ports/boost-odeint/CONTROL +++ b/ports/boost-odeint/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-odeint -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-array, boost-assert, boost-bind, boost-compute, boost-config, boost-core, boost-function, boost-fusion, boost-iterator, boost-math, boost-mpl, boost-multi-array, boost-preprocessor, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-units, boost-utility, boost-vcpkg-helpers Description: Boost odeint module diff --git a/ports/boost-odeint/portfile.cmake b/ports/boost-odeint/portfile.cmake index 5309f3663..38293012e 100644 --- a/ports/boost-odeint/portfile.cmake +++ b/ports/boost-odeint/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/odeint - REF boost-1.66.0 - SHA512 f4d1a0d689c64bbd3dc93060e0e787aa39940b4ca0baf557ea7cb1c28225af5388d24b1654be04103427ba3b943f83dc34be1c0acedcdc2a9b8ac63acbe6946c + REF boost-1.67.0 + SHA512 9c18b9ec2f02c9b36afb06c80ad9e881ab7c41580c2fca5b5c5a62c0aa6e1c3e9bb72c8a28670749e3723ce4bce4397db45547ba4db76acd6088f07644cadaa0 HEAD_REF master ) diff --git a/ports/boost-optional/CONTROL b/ports/boost-optional/CONTROL index 752708636..d20c879af 100644 --- a/ports/boost-optional/CONTROL +++ b/ports/boost-optional/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-optional -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-move, boost-mpl, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost optional module diff --git a/ports/boost-optional/portfile.cmake b/ports/boost-optional/portfile.cmake index af2b6641c..261634e12 100644 --- a/ports/boost-optional/portfile.cmake +++ b/ports/boost-optional/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/optional - REF boost-1.66.0 - SHA512 489e8a10abcd906e2bf12d1019f16c02e64ca32df5611351d6a512ff3fdd742f726820a1b6f9de66de78363f8a6a964d1f06905c91382342b5320effd7991b89 + REF boost-1.67.0 + SHA512 a161c9bc69cb39d9828be89d9113766d930ef0c1b12de113b5d103e8139fceabdaac0081664f14ef96f1f9df1fac0b36469010766da3ba4c054910244c452bc8 HEAD_REF master ) diff --git a/ports/boost-parameter/CONTROL b/ports/boost-parameter/CONTROL index aaee2abfc..360daf3a3 100644 --- a/ports/boost-parameter/CONTROL +++ b/ports/boost-parameter/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-parameter -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-detail, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers Description: Boost parameter module diff --git a/ports/boost-parameter/portfile.cmake b/ports/boost-parameter/portfile.cmake index 871f7198b..3e5ae71bc 100644 --- a/ports/boost-parameter/portfile.cmake +++ b/ports/boost-parameter/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/parameter - REF boost-1.66.0 - SHA512 042be1f9030f4561295a8fcdd252c094d7e17cfd7cc237dfcab6d131c568466fa5ee86a57746d8b254a577251922c7dfa5c1913529743936b8ec90cbb6e7939c + REF boost-1.67.0 + SHA512 f49f1cbedc0b09de484af7ffd9d00e129e9e8cc88fd82d47a95f89b06eae909973843347d1fe09936d686d026d2266384cf23b7dd9a5d7df2d8889629fea1684 HEAD_REF master ) diff --git a/ports/boost-phoenix/CONTROL b/ports/boost-phoenix/CONTROL index ad3236dde..f6cf5316b 100644 --- a/ports/boost-phoenix/CONTROL +++ b/ports/boost-phoenix/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-phoenix -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-function, boost-fusion, boost-mpl, boost-predef, boost-preprocessor, boost-proto, boost-range, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost phoenix module diff --git a/ports/boost-phoenix/portfile.cmake b/ports/boost-phoenix/portfile.cmake index 74e290f1e..3df599d31 100644 --- a/ports/boost-phoenix/portfile.cmake +++ b/ports/boost-phoenix/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/phoenix - REF boost-1.66.0 - SHA512 dbffb57041607e90dfea2113192e1a8fc73934faefe00a00d50542e102b8659f55b4491cc2066fd181444bd04f2a610d75bb67773c205742d8def3516d9148aa + REF boost-1.67.0 + SHA512 38095cd0de7a2fb03e4acaf27364a9f9797e1c92315b956f78a5f3d478fbd65a0b97dba53e9081418223864222f9a560f679b6c973ed994233e68b39fd3a5d63 HEAD_REF master ) diff --git a/ports/boost-poly-collection/CONTROL b/ports/boost-poly-collection/CONTROL index d8b2b34ec..9cdae8e73 100644 --- a/ports/boost-poly-collection/CONTROL +++ b/ports/boost-poly-collection/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-poly-collection -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-iterator, boost-mpl, boost-type-erasure (!uwp), boost-type-traits, boost-vcpkg-helpers Description: Boost poly_collection module diff --git a/ports/boost-poly-collection/portfile.cmake b/ports/boost-poly-collection/portfile.cmake index 7edccef50..f6d495b04 100644 --- a/ports/boost-poly-collection/portfile.cmake +++ b/ports/boost-poly-collection/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/poly_collection - REF boost-1.66.0 - SHA512 110af2363b0ca7f6941ebd45d67edda865b704cbf8e7009349e1487f7c0303e3d2d891576ff7004a74bafd66cf913d91e83166c54a9c34770e58c574e288d688 + REF boost-1.67.0 + SHA512 9ebf5a9a682f0d79ee80dbc1a097dbd06f7c7d064798e25d72a369fa771beb6c37ed9553bc3b8cdbbcb40bc89a628155a850807f5487c714655d2fdb85102b66 HEAD_REF master ) diff --git a/ports/boost-polygon/CONTROL b/ports/boost-polygon/CONTROL index 8c95d707e..ea01f4bb0 100644 --- a/ports/boost-polygon/CONTROL +++ b/ports/boost-polygon/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-polygon -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-integer, boost-mpl, boost-utility, boost-vcpkg-helpers Description: Boost polygon module diff --git a/ports/boost-polygon/portfile.cmake b/ports/boost-polygon/portfile.cmake index 1244b3abb..83d6d5b5e 100644 --- a/ports/boost-polygon/portfile.cmake +++ b/ports/boost-polygon/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/polygon - REF boost-1.66.0 - SHA512 7d8b3b275ab5c010a3c1736e59290b514d44080a7fec9e26b28d39c3df2346ac9f5d762b84c6f55296452bbcdf3a8cff5ac3f2895a99be90c4630efb04229157 + REF boost-1.67.0 + SHA512 d6fbf84a808065a5d6946ff0eae8af41d280dc6e30d34c1d1e6f9e5860884f94466d976db4b9537e94c40a76129ae0567cebd05a1116b80ff66629c423520753 HEAD_REF master ) diff --git a/ports/boost-pool/CONTROL b/ports/boost-pool/CONTROL index 8c054f8a9..7013cb6c4 100644 --- a/ports/boost-pool/CONTROL +++ b/ports/boost-pool/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-pool -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-compatibility, boost-config, boost-detail, boost-integer, boost-thread (!uwp), boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost pool module diff --git a/ports/boost-pool/portfile.cmake b/ports/boost-pool/portfile.cmake index 2b70b4c24..e85dd3329 100644 --- a/ports/boost-pool/portfile.cmake +++ b/ports/boost-pool/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/pool - REF boost-1.66.0 - SHA512 1b54515a075ff2039ff18ac615a3e172cd7e703d7d27970c12f507aaa32cf36ac79b5fc4e808df10e076175036d953fff601c8814ef286b61fcc41ac1a708c3b + REF boost-1.67.0 + SHA512 fe6f9a5e147806e80fa706e7f02a1b4b6f48e044c6b2a7d7fce6685ec2ada960c17a1ae3fb8cf19661ca8e9e3b1b3a49a30328f9e5ca12f15514810733a1c299 HEAD_REF master ) diff --git a/ports/boost-predef/CONTROL b/ports/boost-predef/CONTROL index 9419ab7b5..92b0e35cd 100644 --- a/ports/boost-predef/CONTROL +++ b/ports/boost-predef/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-predef -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-vcpkg-helpers Description: Boost predef module diff --git a/ports/boost-predef/portfile.cmake b/ports/boost-predef/portfile.cmake index 289bc4988..5b495ed8d 100644 --- a/ports/boost-predef/portfile.cmake +++ b/ports/boost-predef/portfile.cmake @@ -5,10 +5,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/predef - REF boost-1.66.0 - SHA512 24f9ddb4ff5f16ae6a8764e940aa85f703c924e550423d7ff58c0e6b97568ecc78b6e97cbcc4ea0489ff2272501130db33e80bf86f071f1bad1d4b0f8c8665ae + REF boost-1.67.0 + SHA512 c67076cb04de0ad0bfdc2fabc4112fe4a1ffb6c21a42e4e11a63e173ef3573e614fe515e7ad7af0cf6628a90fa44aad45013f79ae68d5f35df034953f84b75e1 HEAD_REF master ) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) + +file(COPY ${SOURCE_PATH}/tools/check DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-predef) diff --git a/ports/boost-preprocessor/CONTROL b/ports/boost-preprocessor/CONTROL index 6cc22c054..f6f683423 100644 --- a/ports/boost-preprocessor/CONTROL +++ b/ports/boost-preprocessor/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-preprocessor -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-vcpkg-helpers Description: Boost preprocessor module diff --git a/ports/boost-preprocessor/portfile.cmake b/ports/boost-preprocessor/portfile.cmake index 0a2a62ad4..0626080f4 100644 --- a/ports/boost-preprocessor/portfile.cmake +++ b/ports/boost-preprocessor/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/preprocessor - REF boost-1.66.0 - SHA512 233c46132d69499d96d8cf47fd41e7b80a558b43ace57a654be9bf4aad8c46907bf2fcc0e5698c0df4c8006bcd1e51a72b69c9269e128f360477481ff8cb2451 + REF boost-1.67.0 + SHA512 9bb18c25144c1428c6e9a32a670c041bc6165b862636b5c626e8b66959906988605f75548fc61539f91c32282b72c150b8b398f7fcee2fa2e5720032b74fd80f HEAD_REF master ) diff --git a/ports/boost-process/CONTROL b/ports/boost-process/CONTROL index 25ddd60ef..a5654c920 100644 --- a/ports/boost-process/CONTROL +++ b/ports/boost-process/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-process -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-algorithm, boost-asio, boost-config, boost-core, boost-filesystem (!uwp), boost-fusion, boost-iterator, boost-move, boost-optional, boost-system, boost-tokenizer, boost-type-index, boost-vcpkg-helpers, boost-winapi Description: Boost process module diff --git a/ports/boost-process/portfile.cmake b/ports/boost-process/portfile.cmake index 3b5fac7cf..d59399e5f 100644 --- a/ports/boost-process/portfile.cmake +++ b/ports/boost-process/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/process - REF boost-1.66.0 - SHA512 4e9b4709c9c46eade2b2ac572b323928cbb793168b3a6ae78387ce7f224daa6a8358c8902547066f5ab2ab34705cb2b1a854cc33144e5459ce95acee96be1d6e + REF boost-1.67.0 + SHA512 a279fcd351c2f8a2087438b67e973f74e150c24585cf586fd59f81c0ec712f8c042768549823268618c7c9c106ed5d8153a7d020fc415ac40f5d78a2a7e93bb6 HEAD_REF master ) diff --git a/ports/boost-program-options/CONTROL b/ports/boost-program-options/CONTROL index 931843a34..f37b745ba 100644 --- a/ports/boost-program-options/CONTROL +++ b/ports/boost-program-options/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-program-options -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-any, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-vcpkg-helpers Description: Boost program_options module diff --git a/ports/boost-program-options/portfile.cmake b/ports/boost-program-options/portfile.cmake index 2eb6086f1..4f8624361 100644 --- a/ports/boost-program-options/portfile.cmake +++ b/ports/boost-program-options/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/program_options - REF boost-1.66.0 - SHA512 8c196b4c784def8cedb9c591e364e1759d1c90ff41a536c4c2f0dcc4cae58fb82ab3b6640438b6e98988eba7f6517e2baa5ce67738e9aad7db5924b71a7937fe + REF boost-1.67.0 + SHA512 eccb93bbc8ba6808afb06764577184c3b58cb260e0a5ead5a79c43300379744b4c9649ecf18b9c88b3c22c9f1a28d4c7bcf77f638693a97f38bfd15e48b58804 HEAD_REF master ) diff --git a/ports/boost-property-map/CONTROL b/ports/boost-property-map/CONTROL index 2b88e8c12..f8142fa41 100644 --- a/ports/boost-property-map/CONTROL +++ b/ports/boost-property-map/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-property-map -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-any, boost-assert, boost-bind, boost-concept-check, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-multi-index, boost-optional, boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost property_map module diff --git a/ports/boost-property-map/portfile.cmake b/ports/boost-property-map/portfile.cmake index 6f6739aa9..c2c4561fd 100644 --- a/ports/boost-property-map/portfile.cmake +++ b/ports/boost-property-map/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/property_map - REF boost-1.66.0 - SHA512 3a935f14bf87a8c469b39a9fc4457f11d932caede6558d49868073ad35113a6285c48fed4fe3f2e6c8d743f1cf28ac0e8c4bb83b230a55035a89a60e24d43441 + REF boost-1.67.0 + SHA512 07360357577815c6545473d3b5ac64e6851031cc926bcc72419e0bbc49b291477a1e15663e79916044f2e8b946dee397dc1aede7eb2286d506fd86c87e81db48 HEAD_REF master ) diff --git a/ports/boost-property-tree/CONTROL b/ports/boost-property-tree/CONTROL index c1f329ea3..cbb168eae 100644 --- a/ports/boost-property-tree/CONTROL +++ b/ports/boost-property-tree/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-property-tree -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-any, boost-assert, boost-bind, boost-compatibility, boost-config, boost-core, boost-format, boost-iterator, boost-mpl, boost-multi-index, boost-optional, boost-range, boost-serialization, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost property_tree module diff --git a/ports/boost-property-tree/portfile.cmake b/ports/boost-property-tree/portfile.cmake index 8632df529..8a87f7410 100644 --- a/ports/boost-property-tree/portfile.cmake +++ b/ports/boost-property-tree/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/property_tree - REF boost-1.66.0 - SHA512 257f3ae750d71c82c0585766e1a35ac90dfced98fdccde8fe5fc504f26e42e7c6629c83fa6cae098271f7cf0cbe669f00246248b548740b303e32c63e79b0492 + REF boost-1.67.0 + SHA512 b22b596af0a6a39a4671c44aa099cd4c2235a5f51e1400f14df2925a5a17487d8910253228c61b1198f0184e58e6e2940c7fde5c193549c21efe737bed363d67 HEAD_REF master ) diff --git a/ports/boost-proto/CONTROL b/ports/boost-proto/CONTROL index 3fc404fa4..9b6adca8f 100644 --- a/ports/boost-proto/CONTROL +++ b/ports/boost-proto/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-proto -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-detail, boost-fusion, boost-mpl, boost-preprocessor, boost-range, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost proto module diff --git a/ports/boost-proto/portfile.cmake b/ports/boost-proto/portfile.cmake index c6ba949a2..34691bdf3 100644 --- a/ports/boost-proto/portfile.cmake +++ b/ports/boost-proto/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/proto - REF boost-1.66.0 - SHA512 bf15dc60d07be6e0198c3afd9ca232561e7e919957a0c28b8558bc6bea25e9c3b64af7efa573daeda657e8f6657dc3c11570776261dc29cc4e50356a5b67333a + REF boost-1.67.0 + SHA512 ed20abaad9b61d9a82f544a9ae3d05e1f908551958ea0a86b6325a2440a30c94c30caddc5354b603428df070a9eb418adad487d2cc3f2ea0c9a4bf361e8b2ca8 HEAD_REF master ) diff --git a/ports/boost-ptr-container/CONTROL b/ports/boost-ptr-container/CONTROL index d55c82ae0..9c664a05d 100644 --- a/ports/boost-ptr-container/CONTROL +++ b/ports/boost-ptr-container/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-ptr-container -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-array, boost-assert, boost-circular-buffer, boost-config, boost-core, boost-iterator, boost-mpl, boost-range, boost-serialization, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers Description: Boost ptr_container module diff --git a/ports/boost-ptr-container/portfile.cmake b/ports/boost-ptr-container/portfile.cmake index 8191f2c41..0f1892dda 100644 --- a/ports/boost-ptr-container/portfile.cmake +++ b/ports/boost-ptr-container/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/ptr_container - REF boost-1.66.0 - SHA512 4a90951b6467a4bc97ef9426b1a3d29178084c3033664ef1717926592e515d446b4a8f0c42d1bb640d7a82d7219514f5370f16744bbd8bfbc922b2f5b2c85180 + REF boost-1.67.0 + SHA512 d8349a2b3ebff817ffc42301b61d13536c341def39dd3ec9bf5f5abfa0c7ad545f6b5f8babd3cc276b7c171e55760ea2d0a03dcc0653ac7a245246c89d1b7117 HEAD_REF master ) diff --git a/ports/boost-python/CONTROL b/ports/boost-python/CONTROL index f59353af7..36bb42387 100644 --- a/ports/boost-python/CONTROL +++ b/ports/boost-python/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-python -Version: 1.66.0-1 +Version: 1.67.0-1 Build-Depends: boost-bind, boost-config, boost-core, boost-detail, boost-graph, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-property-map, boost-smart-ptr, boost-static-assert, boost-tuple, boost-utility, boost-vcpkg-helpers, python3 Description: Boost python module diff --git a/ports/boost-python/portfile.cmake b/ports/boost-python/portfile.cmake index db55b3e7b..73980e640 100644 --- a/ports/boost-python/portfile.cmake +++ b/ports/boost-python/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/python - REF boost-1.66.0 - SHA512 3a16f16c19bf8a97c10db5c4a39385646a49ed794e9f7a0030181c0fb163671306ca92714aeea6440f60d043736ea4c15d1256fb418f18aea164c2d09420774f + REF boost-1.67.0 + SHA512 59091af63626cc6e33f76bded8733b5fb044f7139197e6c887e8e279831954c1e8b67341b6b2f3c9dce97e67a166996321ea439609d225dab7f68762423d6211 HEAD_REF master ) diff --git a/ports/boost-qvm/CONTROL b/ports/boost-qvm/CONTROL index a7521d4ab..ee0044271 100644 --- a/ports/boost-qvm/CONTROL +++ b/ports/boost-qvm/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-qvm -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-exception, boost-static-assert, boost-throw-exception, boost-utility, boost-vcpkg-helpers Description: Boost qvm module diff --git a/ports/boost-qvm/portfile.cmake b/ports/boost-qvm/portfile.cmake index b16d419d5..014723f28 100644 --- a/ports/boost-qvm/portfile.cmake +++ b/ports/boost-qvm/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/qvm - REF boost-1.66.0 - SHA512 b7c1db0f7db316e6f2094185497deaf58fe45f9a11517c76a66bec65d9ee9f32167bccb36ad8388c0f06649067a89e5b1c3894af0a4b4b327ee51ae29dd86c50 + REF boost-1.67.0 + SHA512 dce723e782bb19737a51e99c3535ab7101569ad217a475b25c742d4a35fd774d5b02883a3604b75a4141f8cbb385c82ed1496051032d1d993fb6218549885095 HEAD_REF master ) diff --git a/ports/boost-random/CONTROL b/ports/boost-random/CONTROL index 2fa6b682c..e9f682433 100644 --- a/ports/boost-random/CONTROL +++ b/ports/boost-random/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-random -Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-math, boost-modular-build-helper, boost-mpl, boost-range, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.67.0 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-io, boost-math, boost-modular-build-helper, boost-mpl, boost-range, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost random module diff --git a/ports/boost-random/portfile.cmake b/ports/boost-random/portfile.cmake index ec99fec55..6112ed2c3 100644 --- a/ports/boost-random/portfile.cmake +++ b/ports/boost-random/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/random - REF boost-1.66.0 - SHA512 ca62697080e059fa8b01e364b07fdb99bb7db078c2a5683e0f67d89705530276331a5f8706307b14b49f2621d1c158e0d1b9188aee54ab8852bab7800ca18b3e + REF boost-1.67.0 + SHA512 482a25fed9c420407cb83c8003a78dc518bb3942e23c3b206a0f0e050148fbed91aa0526b78614189d162d7c65d7a3ffb566a1735b23e1d0d5d592af0cdc499f HEAD_REF master ) diff --git a/ports/boost-range/CONTROL b/ports/boost-range/CONTROL index 2cf963bef..a9c7421ea 100644 --- a/ports/boost-range/CONTROL +++ b/ports/boost-range/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-range -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-array, boost-assert, boost-concept-check, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-iterator, boost-mpl, boost-optional, boost-preprocessor, boost-regex, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost range module diff --git a/ports/boost-range/portfile.cmake b/ports/boost-range/portfile.cmake index 7b676d431..c649c87ff 100644 --- a/ports/boost-range/portfile.cmake +++ b/ports/boost-range/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/range - REF boost-1.66.0 - SHA512 98b050cb3e4249c72222d0efac4edbf4cb62ff303dd1634e7e76fea7dff19c62eceb837e8cffbd088fb28b16b98e923f62c7220d5ff424f3c82383a78df97785 + REF boost-1.67.0 + SHA512 f6c400a40937b09eee02eecbd579d67530fd4cae5f5f9a02cd3914cbcf6d4170870fa6c05a5a018e070f9ddc8c75c43dd93171f57a032ff5294ed19a3cc299af HEAD_REF master ) diff --git a/ports/boost-ratio/CONTROL b/ports/boost-ratio/CONTROL index 801212d8c..a58bbdab0 100644 --- a/ports/boost-ratio/CONTROL +++ b/ports/boost-ratio/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-ratio -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-integer, boost-mpl, boost-rational, boost-static-assert, boost-type-traits, boost-vcpkg-helpers Description: Boost ratio module diff --git a/ports/boost-ratio/portfile.cmake b/ports/boost-ratio/portfile.cmake index a39d80204..45caa9299 100644 --- a/ports/boost-ratio/portfile.cmake +++ b/ports/boost-ratio/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/ratio - REF boost-1.66.0 - SHA512 caa2ed8f01d6f99aaa8ab8bc52c0f9a8cf2551585760abf6e1d0f129c77c58f3b68569a0db6917c0a40a38faf63935ae23e482b96a2417bd7cb3d5f61e59d887 + REF boost-1.67.0 + SHA512 0ff5a25d9e9798c52cc017df6a7b52a2c13becb84ab6dda06244a92459f1602ff3843e71cda205ed9c831b4727929cbebc688e8b028e029005ffb8f04e39f259 HEAD_REF master ) diff --git a/ports/boost-rational/CONTROL b/ports/boost-rational/CONTROL index f78bf6029..fcc4de99f 100644 --- a/ports/boost-rational/CONTROL +++ b/ports/boost-rational/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-rational -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-integer, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost rational module diff --git a/ports/boost-rational/portfile.cmake b/ports/boost-rational/portfile.cmake index 437d650fa..5ced46770 100644 --- a/ports/boost-rational/portfile.cmake +++ b/ports/boost-rational/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/rational - REF boost-1.66.0 - SHA512 e61b85344d3418484c044ac0d3946059a3a341cab490d1a54dbee241946c7cb5882e30fcd5e8c9a919622cee69828108d2f7dc578eae51f31c5fb1217deff152 + REF boost-1.67.0 + SHA512 27fece61a7de96bf783a5f5d5b290934f76741848466fbe256c5517fb5671105d68e3126fd4b135c73a0290cbd81cff9849b599d14cdd948897d1ecc573ab016 HEAD_REF master ) diff --git a/ports/boost-regex/CONTROL b/ports/boost-regex/CONTROL index 1ff1473ac..edfbe8672 100644 --- a/ports/boost-regex/CONTROL +++ b/ports/boost-regex/CONTROL @@ -1,7 +1,7 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-regex -Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Version: 1.67.0 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-container-hash, boost-core, boost-detail, boost-functional, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost regex module Feature: icu diff --git a/ports/boost-regex/portfile.cmake b/ports/boost-regex/portfile.cmake index 58cd529cd..8895931d6 100644 --- a/ports/boost-regex/portfile.cmake +++ b/ports/boost-regex/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/regex - REF boost-1.66.0 - SHA512 def00fc4876fd83a2581eea15228940a665cb79eff26e979079b5df568952f144b74da2f41ddffe6792784fe3fceca94d7b0f49d1a7f01a4df78948244fe86b1 + REF boost-1.67.0 + SHA512 e3b3aaaf866aa9e6a4148c545f4d4a4ab8037dc8882ed7cd4eecd7727976d1a137a4c4e5599283f5d6f3616e865369d80733070f571fdb990555e4769f59ab83 HEAD_REF master ) diff --git a/ports/boost-scope-exit/CONTROL b/ports/boost-scope-exit/CONTROL index a94cb9fd6..fff7088b2 100644 --- a/ports/boost-scope-exit/CONTROL +++ b/ports/boost-scope-exit/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-scope-exit -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-detail, boost-function, boost-mpl, boost-preprocessor, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost scope_exit module diff --git a/ports/boost-scope-exit/portfile.cmake b/ports/boost-scope-exit/portfile.cmake index 1c31b1002..61add4866 100644 --- a/ports/boost-scope-exit/portfile.cmake +++ b/ports/boost-scope-exit/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/scope_exit - REF boost-1.66.0 - SHA512 cb46dee821cf9f873eac9d8e937773a44c9e77b7c9972d064e1cc7b9f95e8b06509da29e2357c479f70993aae25756de1dad5d6639690f4390d466deef75b8da + REF boost-1.67.0 + SHA512 31386f5e44669a01c3396df8fa001c85c7c6231413f4ed788602bb2861db3535e0ed01c61c4b9bdccdcc0020ce92dbbf2bc02711abbbf8dbafe089305d21fb5a HEAD_REF master ) diff --git a/ports/boost-serialization/CONTROL b/ports/boost-serialization/CONTROL index 1cfc392e9..d2c4357be 100644 --- a/ports/boost-serialization/CONTROL +++ b/ports/boost-serialization/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-serialization -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-array, boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-io, boost-iterator, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-spirit, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost serialization module diff --git a/ports/boost-serialization/portfile.cmake b/ports/boost-serialization/portfile.cmake index 2349283f2..b8229d3ec 100644 --- a/ports/boost-serialization/portfile.cmake +++ b/ports/boost-serialization/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/serialization - REF boost-1.66.0 - SHA512 8d4908a1eba309c8e752f07e123d0c6d461e3ce87db3b3afbf4ae56340c1ead6ac874be392d8270b167be28d7dc515f98abece091b081fd4794cb375f9779880 + REF boost-1.67.0 + SHA512 719b69945ebdf9eca9849c74bfab38ce1e2c8b4a11ea7cdf98c3da6250887f1712c841b18e428c5bac421b007e3bd0efce9b2c12893395982df98826621dc3bc HEAD_REF master ) diff --git a/ports/boost-signals/CONTROL b/ports/boost-signals/CONTROL index 1b3743e2f..47f3c2382 100644 --- a/ports/boost-signals/CONTROL +++ b/ports/boost-signals/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-signals -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-any, boost-build, boost-config, boost-core, boost-function, boost-iterator, boost-modular-build-helper, boost-optional, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost signals module diff --git a/ports/boost-signals/portfile.cmake b/ports/boost-signals/portfile.cmake index a2453b0b5..32d456803 100644 --- a/ports/boost-signals/portfile.cmake +++ b/ports/boost-signals/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/signals - REF boost-1.66.0 - SHA512 4a857c2f272ccd5feef7549a9344444e30de71ca49f33d42415aad3af0659534cc46490082a3ab9d52f3bced7635cbb17b6db16216a13a4df79349f01a0fe636 + REF boost-1.67.0 + SHA512 420281efef7ad8742ead144e924b21a8aaac500e8075c0bdf9e1d835d2069b4514f9d0af9ff9b00270334413cbe501acee7cb3eb7a218a53aed0479ff4e8367b HEAD_REF master ) diff --git a/ports/boost-signals2/CONTROL b/ports/boost-signals2/CONTROL index 749be6f6b..0d90874ba 100644 --- a/ports/boost-signals2/CONTROL +++ b/ports/boost-signals2/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-signals2 -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-predef, boost-preprocessor, boost-smart-ptr, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost signals2 module diff --git a/ports/boost-signals2/portfile.cmake b/ports/boost-signals2/portfile.cmake index 992a410c9..56ee81f08 100644 --- a/ports/boost-signals2/portfile.cmake +++ b/ports/boost-signals2/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/signals2 - REF boost-1.66.0 - SHA512 e49e263836db77603b256b45c8d764b91d2ff9b1bcfa36e6b446fbaf0be2e7135b715cf00795d0a98ade48f3ff574c54fadfa58faae330261c58642c0dfaf39a + REF boost-1.67.0 + SHA512 5c691c9275ac2f640a46a1f5a03debd326ce1c64905af6475ebe6caced3ffa4fe27a3a6b91ce60c72bcf06fcd5fbeba79afaef8314f2be655b1ad648d5a046e4 HEAD_REF master ) diff --git a/ports/boost-smart-ptr/CONTROL b/ports/boost-smart-ptr/CONTROL index a4451ef05..6a6f5fb28 100644 --- a/ports/boost-smart-ptr/CONTROL +++ b/ports/boost-smart-ptr/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-smart-ptr -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-integer, boost-move, boost-predef, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost smart_ptr module diff --git a/ports/boost-smart-ptr/portfile.cmake b/ports/boost-smart-ptr/portfile.cmake index de74fd25d..a83bc4a22 100644 --- a/ports/boost-smart-ptr/portfile.cmake +++ b/ports/boost-smart-ptr/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/smart_ptr - REF boost-1.66.0 - SHA512 d45d925531c5060cabd5a949612c3d1358ca92120253c04a755390fc5be80fae2f756cb358b636cf0a86d3091e5c27574a4e4f340ece94a8291acab4a0b4c8a0 + REF boost-1.67.0 + SHA512 f8e9aaf7dce69fa21c1023bd990cc10957e2965261c9ac54cc4a045a6a4675f9e6a4796ec2e359f967d9670126434ec49ff0ba72fec0d041a86a569463e16d4c HEAD_REF master ) diff --git a/ports/boost-sort/CONTROL b/ports/boost-sort/CONTROL index 6f13d05a2..9a52c06cc 100644 --- a/ports/boost-sort/CONTROL +++ b/ports/boost-sort/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-sort -Version: 1.66.0 -Build-Depends: boost-integer, boost-serialization, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.67.0 +Build-Depends: boost-integer, boost-range, boost-serialization, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost sort module diff --git a/ports/boost-sort/portfile.cmake b/ports/boost-sort/portfile.cmake index e5e63b33d..a8f999030 100644 --- a/ports/boost-sort/portfile.cmake +++ b/ports/boost-sort/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/sort - REF boost-1.66.0 - SHA512 0c4d252cf92f46b402be2d9f46f4c4b052dbbb85c83cb7e78a9f75a2e2d14225614f97f3b4e91205d55f224faef2baf939c28fb935d9dbfa140aa7a9c51836df + REF boost-1.67.0 + SHA512 dfd8f61aa342c226a88390f8b05d394fd8c019ebc8d008dbb3022bca4716d4e9623e9d2024fd3143ead3de89441b470dc234252b96d80dcd3d6e2be5ce4bd090 HEAD_REF master ) diff --git a/ports/boost-spirit/CONTROL b/ports/boost-spirit/CONTROL index f79535e4c..ee973c0b4 100644 --- a/ports/boost-spirit/CONTROL +++ b/ports/boost-spirit/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-spirit -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-algorithm, boost-array, boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-endian, boost-filesystem (!uwp), boost-foreach, boost-function, boost-function-types, boost-fusion, boost-integer, boost-io, boost-iostreams (!uwp), boost-iterator, boost-lexical-cast, boost-locale (!uwp), boost-math, boost-move, boost-mpl, boost-optional, boost-phoenix, boost-pool, boost-preprocessor, boost-proto, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-thread (!uwp), boost-throw-exception, boost-tti, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers Description: Boost spirit module diff --git a/ports/boost-spirit/portfile.cmake b/ports/boost-spirit/portfile.cmake index 0a5ebf5aa..f7b3f04f8 100644 --- a/ports/boost-spirit/portfile.cmake +++ b/ports/boost-spirit/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/spirit - REF boost-1.66.0 - SHA512 c02594dc732d8ad8d23b1ed94f7aea05e3a339d0189a224340ea882b0de68f10820ad40886e040269ce4e08a558806c48662acba0bf00d95b8cafb5a7ce0057b + REF boost-1.67.0 + SHA512 c5afd70ff38112232966e204e543b83316693a941f9da0300e9214ad3198601c805b2259f7e9ce58afc03b9e91403d98f94852b0e4eaa71b9e94157ca37aac9b HEAD_REF master ) diff --git a/ports/boost-stacktrace/CONTROL b/ports/boost-stacktrace/CONTROL index c55b3ea01..bba967212 100644 --- a/ports/boost-stacktrace/CONTROL +++ b/ports/boost-stacktrace/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-stacktrace -Version: 1.66.0 -Build-Depends: boost-array, boost-build, boost-config, boost-core, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-static-assert, boost-type-traits, boost-vcpkg-helpers, boost-winapi +Version: 1.67.0 +Build-Depends: boost-array, boost-build, boost-config, boost-container-hash, boost-core, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-static-assert, boost-type-traits, boost-vcpkg-helpers, boost-winapi Description: Boost stacktrace module diff --git a/ports/boost-stacktrace/portfile.cmake b/ports/boost-stacktrace/portfile.cmake index 34c6e6d31..5cb9ac5bc 100644 --- a/ports/boost-stacktrace/portfile.cmake +++ b/ports/boost-stacktrace/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/stacktrace - REF boost-1.66.0 - SHA512 40b96f7c1fdaf5a5909148d7edd4f77b4991ead70d5350bc7c8451781c80020496b14688c0dff365b75941a1ba16244246a52b6a708f4b1f79c99f4d8a0556f0 + REF boost-1.67.0 + SHA512 30e425d113c155b7a1a9f5802ce5c0efa91223825e09bf6dc596e208b1fec7e1adacbabe6950f5d35037a8bd4e2c3841e95cb9a02419a652beabfb083c460edc HEAD_REF master ) diff --git a/ports/boost-statechart/CONTROL b/ports/boost-statechart/CONTROL index eafbc2db4..b98913b82 100644 --- a/ports/boost-statechart/CONTROL +++ b/ports/boost-statechart/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-statechart -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-bind, boost-config, boost-conversion, boost-core, boost-detail, boost-function, boost-mpl, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-vcpkg-helpers Description: Boost statechart module diff --git a/ports/boost-statechart/portfile.cmake b/ports/boost-statechart/portfile.cmake index 61680bd2b..a76882124 100644 --- a/ports/boost-statechart/portfile.cmake +++ b/ports/boost-statechart/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/statechart - REF boost-1.66.0 - SHA512 c9e20deca66f896eee004d19be388857817b2d4bdf49a9a146625de091420399a7098a6ecb2020ce07a96b11092922f4623159434b04983072dad8b91d2d7187 + REF boost-1.67.0 + SHA512 2b63d4664b3fc20adf12106607ef1485700d5aeea9bbfc9005a9ac08984034a8a31c037a4ae3e99b4787187ed797844d26afb1140f73ef5009504549be64a6cf HEAD_REF master ) diff --git a/ports/boost-static-assert/CONTROL b/ports/boost-static-assert/CONTROL index e4719ff49..58be1dfc7 100644 --- a/ports/boost-static-assert/CONTROL +++ b/ports/boost-static-assert/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-static-assert -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-detail, boost-vcpkg-helpers Description: Boost static_assert module diff --git a/ports/boost-static-assert/portfile.cmake b/ports/boost-static-assert/portfile.cmake index 2598280af..125f80bbb 100644 --- a/ports/boost-static-assert/portfile.cmake +++ b/ports/boost-static-assert/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/static_assert - REF boost-1.66.0 - SHA512 97e0007ffef86578f4877744947e4c7d90de932719df25a38a72c018112b9b6d6d2fbdbef9307c02d1d85e5d8733a0f20a903c0fc623ef969afc788cfdf8722b + REF boost-1.67.0 + SHA512 6ffffe8c9bb799851dd5b3f03ec3038c7545ee55429a2c9124c6b7c5abbe43b8cb0cc860d758fbbeaa1810775da8f0ad1bfd25362a78866c1ecf5242bdb548eb HEAD_REF master ) diff --git a/ports/boost-system/CONTROL b/ports/boost-system/CONTROL index 95f01a09c..01985fbe6 100644 --- a/ports/boost-system/CONTROL +++ b/ports/boost-system/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-system -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-integer, boost-modular-build-helper, boost-predef, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost system module diff --git a/ports/boost-system/portfile.cmake b/ports/boost-system/portfile.cmake index bc35d0d93..d61109754 100644 --- a/ports/boost-system/portfile.cmake +++ b/ports/boost-system/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/system - REF boost-1.66.0 - SHA512 97181610bc577182cb83c55b7c5d73aec6794543c0a7b43b4d08c7a1ed9936500f383038dbda1c0876f58d52c000f8b2e4a6bc1f68d14c7d9f015918f1c46851 + REF boost-1.67.0 + SHA512 3d7c8d9e0c4f3f5be95cf897e265adb1f2c96faa5dbc13b8050f988ddc94b9510531718b1726b147ab3484bff1ccf7bf18179084dcea968dcf80fd2f1c68686c HEAD_REF master ) diff --git a/ports/boost-test/CONTROL b/ports/boost-test/CONTROL index f77ae6c94..182c9ccf6 100644 --- a/ports/boost-test/CONTROL +++ b/ports/boost-test/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-test -Version: 1.66.0-2 -Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-io, boost-iterator, boost-modular-build-helper, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-range, boost-smart-ptr, boost-static-assert, boost-timer, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.67.0-2 +Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-io, boost-iterator, boost-modular-build-helper, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-timer, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost test module diff --git a/ports/boost-test/portfile.cmake b/ports/boost-test/portfile.cmake index 329256a83..d5834c60d 100644 --- a/ports/boost-test/portfile.cmake +++ b/ports/boost-test/portfile.cmake @@ -5,11 +5,16 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/test - REF boost-1.66.0 - SHA512 f5f0557fc7afb1c085765edda5ec37ce2a0f31aa39c861a7979dfd5344751978139cc3eef44d773140e4b023c0123065169fc11ae889ca1ea51f58bdf5018a5d + REF boost-1.67.0 + SHA512 9af937ef02982039b5aab54e142b877fef6c46f71b7cc8c83d81f850f4b4229ee93425ab8a88e6888952686e1e23da6591da072432a06c1bceae83c793a43cf5 HEAD_REF master ) +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../predef/check/predef" "import predef/check/predef" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-predef/check" DESTINATION "${SOURCE_PATH}/build/predef") + include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) diff --git a/ports/boost-thread/CONTROL b/ports/boost-thread/CONTROL index 963eaa5bc..6eeb13ebc 100644 --- a/ports/boost-thread/CONTROL +++ b/ports/boost-thread/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-thread -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-algorithm, boost-assert, boost-atomic, boost-bind, boost-build, boost-chrono, boost-concept-check, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-function, boost-functional, boost-integer, boost-intrusive, boost-io, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi Description: Boost thread module diff --git a/ports/boost-thread/b2-options.cmake b/ports/boost-thread/b2-options.cmake new file mode 100644 index 000000000..07acc10b5 --- /dev/null +++ b/ports/boost-thread/b2-options.cmake @@ -0,0 +1 @@ +list(APPEND B2_OPTIONS /boost/thread//boost_thread) diff --git a/ports/boost-thread/portfile.cmake b/ports/boost-thread/portfile.cmake index e1f0a0c2f..30f203d31 100644 --- a/ports/boost-thread/portfile.cmake +++ b/ports/boost-thread/portfile.cmake @@ -5,12 +5,17 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/thread - REF boost-1.66.0 - SHA512 35875d3feb64617b74ef1303939a9e0f8d72b9b2d7361e9a25c54431c60c17b481023006f2329e4cd8dd37206553991e40a12a20bb479ec497c475240e19776b + REF boost-1.67.0 + SHA512 e641484c2d021d0a8b77955bd9ee7f53f4a4c7f003b9260aa17c78b236a8cda4b1ec59c9fb16aab823b7be9d6da6a67c2d333308d8b1d5c9bbaa6a0de9018479 HEAD_REF master ) include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) -boost_modular_build(SOURCE_PATH ${SOURCE_PATH} REQUIREMENTS "/boost/date_time//boost_date_time") +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + REQUIREMENTS "/boost/date_time//boost_date_time" + OPTIONS /boost/thread//boost_thread + BOOST_CMAKE_FRAGMENT ${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake +) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-throw-exception/CONTROL b/ports/boost-throw-exception/CONTROL index 61809bb7b..d6b606c78 100644 --- a/ports/boost-throw-exception/CONTROL +++ b/ports/boost-throw-exception/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-throw-exception -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-detail, boost-vcpkg-helpers Description: Boost throw_exception module diff --git a/ports/boost-throw-exception/portfile.cmake b/ports/boost-throw-exception/portfile.cmake index c4e87087e..dca2f1ac4 100644 --- a/ports/boost-throw-exception/portfile.cmake +++ b/ports/boost-throw-exception/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/throw_exception - REF boost-1.66.0 - SHA512 46c1683ded42fe9b0cd44711071bee1122dbd0529648f69439cc5391d05e7e22968235bc852878441ad051b6c021b10e319b6337aff28f6acaafca7e70480ef8 + REF boost-1.67.0 + SHA512 ce049466973f338071acd51dab620c0a428eb6777384003f5ffc1a90128cf87d7f8283aeb351ca576a8cfabe46e603b7d748fbe2f03b46227b6eb9faf292f106 HEAD_REF master ) diff --git a/ports/boost-timer/CONTROL b/ports/boost-timer/CONTROL index 328b78579..67537375d 100644 --- a/ports/boost-timer/CONTROL +++ b/ports/boost-timer/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-timer -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-build, boost-chrono, boost-compatibility, boost-config, boost-core, boost-integer, boost-io, boost-modular-build-helper, boost-system, boost-throw-exception, boost-vcpkg-helpers Description: Boost timer module diff --git a/ports/boost-timer/portfile.cmake b/ports/boost-timer/portfile.cmake index 072b701a7..1f3b9dcda 100644 --- a/ports/boost-timer/portfile.cmake +++ b/ports/boost-timer/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/timer - REF boost-1.66.0 - SHA512 2b50d38e3b5ca79014f96eb8fb55d1320c0de97ba2bb632dec946690437f8a1533c3e78e25798a0f49c08a5644f7f55afcd0f85f94bea4e041cddbcd8867450d + REF boost-1.67.0 + SHA512 6028432edbdee4318d3295c9834417d31816efd8e16c5a0bcc41c0b1ffdd422c31eadb01cb0934684421bb07079476ecae41ec64d314c60d19d02ed9d995c682 HEAD_REF master ) diff --git a/ports/boost-tokenizer/CONTROL b/ports/boost-tokenizer/CONTROL index 27fb3021b..ed1cb640e 100644 --- a/ports/boost-tokenizer/CONTROL +++ b/ports/boost-tokenizer/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-tokenizer -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-detail, boost-iterator, boost-mpl, boost-throw-exception, boost-vcpkg-helpers Description: Boost tokenizer module diff --git a/ports/boost-tokenizer/portfile.cmake b/ports/boost-tokenizer/portfile.cmake index 4f4c066bf..15ebbe89c 100644 --- a/ports/boost-tokenizer/portfile.cmake +++ b/ports/boost-tokenizer/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/tokenizer - REF boost-1.66.0 - SHA512 ce5f6d89fd8b61a5d8074d8cb6bbc3b9a0e3ebf96081c9dda8e67a64b7052f38ebc50581284fa182f83f6f3eb54eee5292f6e79832ffd293ef9a35af2b595a51 + REF boost-1.67.0 + SHA512 2240809c63060f267c9b62171fcc1d959a199d8de65647de767c9829068a81e600d9084a8af0681bb09152e82789df2f13975a7ff1f0cd9ab6789347fe3154c6 HEAD_REF master ) diff --git a/ports/boost-tti/CONTROL b/ports/boost-tti/CONTROL index bcab1a023..fb2d59aa3 100644 --- a/ports/boost-tti/CONTROL +++ b/ports/boost-tti/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-tti -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-detail, boost-function-types, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers Description: Boost tti module diff --git a/ports/boost-tti/portfile.cmake b/ports/boost-tti/portfile.cmake index d263b7540..4e15f4095 100644 --- a/ports/boost-tti/portfile.cmake +++ b/ports/boost-tti/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/tti - REF boost-1.66.0 - SHA512 8c399d475819b68324e1a56b9ba13a3e26faf175d3180b0317e82212ce4c587d8074c597832165e81a3ed6af09026b7c5433a8cd58b6ad861dad7d9fe1d57eee + REF boost-1.67.0 + SHA512 e46b2a5cfd84c46577c499ee643f62804daf376fecaf15d3425b73d0221ab34dc2f882e31d7f8906adabafd271fc3707c6c5a2d99da8446a88951c4e828567f3 HEAD_REF master ) diff --git a/ports/boost-tuple/CONTROL b/ports/boost-tuple/CONTROL index a96059c05..7129158e3 100644 --- a/ports/boost-tuple/CONTROL +++ b/ports/boost-tuple/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-tuple -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost tuple module diff --git a/ports/boost-tuple/portfile.cmake b/ports/boost-tuple/portfile.cmake index 2c4cfe5be..be031628c 100644 --- a/ports/boost-tuple/portfile.cmake +++ b/ports/boost-tuple/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/tuple - REF boost-1.66.0 - SHA512 c65bd37871256f1edb1db4d9ac158788c3a76248d7f7ff72eece874ea521d9846d55373e223d783a4c6fe3a524088fe2e4e58e533d1144671e4a1d22443f0414 + REF boost-1.67.0 + SHA512 de9e0836ec0f923483d2738de44f1738a5d9c00cd4ea3f0c61192e892bf026d16a5719f874811b04c6e9d27b0ee7ac80a3b88b30198ca06d54df181640b374b8 HEAD_REF master ) diff --git a/ports/boost-type-erasure/CONTROL b/ports/boost-type-erasure/CONTROL index b8e6bc4dd..579b091a0 100644 --- a/ports/boost-type-erasure/CONTROL +++ b/ports/boost-type-erasure/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-type-erasure -Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-fusion, boost-iterator, boost-modular-build-helper, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread (!uwp), boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.67.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-fusion, boost-iterator, boost-modular-build-helper, boost-mp11, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread (!uwp), boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-vmd Description: Boost type_erasure module diff --git a/ports/boost-type-erasure/portfile.cmake b/ports/boost-type-erasure/portfile.cmake index 95c28afc6..c6c07eb1b 100644 --- a/ports/boost-type-erasure/portfile.cmake +++ b/ports/boost-type-erasure/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/type_erasure - REF boost-1.66.0 - SHA512 a64b3477478a656c0e04e897f4b9e19941b884c17cfa07ec05f96cebab0f4a377d728ddee354923c1c00bd85f2bf180a46747ccfe5eceb3fe143c2154e0be0e8 + REF boost-1.67.0 + SHA512 45bcade387e21315ea94f69981531ca38c367d6e7e8bcc82e67b86360d4f0e6a786ff94935a10a7b2e6bed21c0847008bbfa70e8adc5f3704f4eafef54664d86 HEAD_REF master ) diff --git a/ports/boost-type-index/CONTROL b/ports/boost-type-index/CONTROL index e291a6222..ec217ec27 100644 --- a/ports/boost-type-index/CONTROL +++ b/ports/boost-type-index/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-type-index -Version: 1.66.0 -Build-Depends: boost-config, boost-core, boost-functional, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Version: 1.67.0 +Build-Depends: boost-config, boost-container-hash, boost-core, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost type_index module diff --git a/ports/boost-type-index/portfile.cmake b/ports/boost-type-index/portfile.cmake index ae292b7e5..1554e1258 100644 --- a/ports/boost-type-index/portfile.cmake +++ b/ports/boost-type-index/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/type_index - REF boost-1.66.0 - SHA512 c731d336b0b29a0dbbb12c027fe052f9cea0f06703d05e3f24c24d9feb5abcf04cfb6e867da752cdbc75056db9482b5318ee1489db54244c3fdc6e1f32899aa8 + REF boost-1.67.0 + SHA512 31a471bedaa8e30eb84e22e7f059938ffb25c649a80b203067da1c63bcb8d1fcd9cf61bff593fcdb6d463408bc6cb2775dbb589ac04bc6de7e0bc351e0b3abd9 HEAD_REF master ) diff --git a/ports/boost-type-traits/CONTROL b/ports/boost-type-traits/CONTROL index 3b88d7122..f7eab32a7 100644 --- a/ports/boost-type-traits/CONTROL +++ b/ports/boost-type-traits/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-type-traits -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-core, boost-detail, boost-static-assert, boost-vcpkg-helpers Description: Boost type_traits module diff --git a/ports/boost-type-traits/portfile.cmake b/ports/boost-type-traits/portfile.cmake index 5a7fb6a79..0ae0417b2 100644 --- a/ports/boost-type-traits/portfile.cmake +++ b/ports/boost-type-traits/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/type_traits - REF boost-1.66.0 - SHA512 ad05d6e50914e0d9c0e8267dd3b01f090f7dd3c6370b4b59ae1bbcc50b2cb2a5f1b2647eacc15ff4f2e071da0732a6fc47508284d6d20ca0a545fd6f8d90648c + REF boost-1.67.0 + SHA512 3a2c0b3498c9a71d668fcb0f0b46b7c97275396f5fe3703ceb2534a34bc497af10a655da72570ab9073a0a92db6ed079ed4ddd14fff54c791784d734a54d24bc HEAD_REF master ) diff --git a/ports/boost-typeof/CONTROL b/ports/boost-typeof/CONTROL index 93d92c65a..25c345a3e 100644 --- a/ports/boost-typeof/CONTROL +++ b/ports/boost-typeof/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-typeof -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-mpl, boost-preprocessor, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost typeof module diff --git a/ports/boost-typeof/portfile.cmake b/ports/boost-typeof/portfile.cmake index 644b8e121..2e7aaca5b 100644 --- a/ports/boost-typeof/portfile.cmake +++ b/ports/boost-typeof/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/typeof - REF boost-1.66.0 - SHA512 4436dc1b346dfaf9bd77ab386e213fb4a5fb9f3ea5f4de3e2eaaf4e7c2c6712729071e8e25c4014c36a0977f62b646900e2db7c9f65121ef32475074940e4937 + REF boost-1.67.0 + SHA512 91b29446146a44aa0983c953086e45863b40e7d053670a0ef78f703d2419db7ac1615b42b7eca70e70088b7da9e9c37687e9ac570fc3995a74a9e78cae78280c HEAD_REF master ) diff --git a/ports/boost-ublas/CONTROL b/ports/boost-ublas/CONTROL index acbd90541..a6dd9d24e 100644 --- a/ports/boost-ublas/CONTROL +++ b/ports/boost-ublas/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-ublas -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-concept-check, boost-config, boost-core, boost-iterator, boost-mpl, boost-range, boost-serialization, boost-smart-ptr, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost ublas module diff --git a/ports/boost-ublas/portfile.cmake b/ports/boost-ublas/portfile.cmake index 385810a3b..db221b6cd 100644 --- a/ports/boost-ublas/portfile.cmake +++ b/ports/boost-ublas/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/ublas - REF boost-1.66.0 - SHA512 77d2dac6f7df56d8640e000ffce7042c828765da9a1ccb1f487559ac7ad2577246334e32e058a41ef028719c7465990d12e4fc0294ecf1747ac90bda53cf7d00 + REF boost-1.67.0 + SHA512 5ff9cbbd1e9dd33eb1230e2d5247d80526be1d5f5d3e145dbdb2f95c1f61b86438a937174936cf4489fac81111b72ee317a6e653ae6c3d84b58bdc1cd2ce7a82 HEAD_REF master ) diff --git a/ports/boost-units/CONTROL b/ports/boost-units/CONTROL index 4728dcb90..2d85d080a 100644 --- a/ports/boost-units/CONTROL +++ b/ports/boost-units/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-units -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-io, boost-lambda, boost-math, boost-mpl, boost-preprocessor, boost-serialization, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost units module diff --git a/ports/boost-units/portfile.cmake b/ports/boost-units/portfile.cmake index 1180ec01b..df480dbb5 100644 --- a/ports/boost-units/portfile.cmake +++ b/ports/boost-units/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/units - REF boost-1.66.0 - SHA512 493c91b8741788c18147b0689df82e8391992797420f09fa3d90f8405c1ac7cab6a17c39231836d4410525eae3ae53899157cd48e28e3136ffc16970fc5209f6 + REF boost-1.67.0 + SHA512 33ce1386e67982d4b6f45fa78ce787332c7a753463650762a66da1064741fc6f9909fe1929416ec7918060300cedda93642fd6adb4a2d5f4c689f4d48b2a720f HEAD_REF master ) diff --git a/ports/boost-unordered/CONTROL b/ports/boost-unordered/CONTROL index f051d4f33..50cd43f5f 100644 --- a/ports/boost-unordered/CONTROL +++ b/ports/boost-unordered/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-unordered -Version: 1.66.0 -Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-detail, boost-functional, boost-iterator, boost-move, boost-predef, boost-preprocessor, boost-smart-ptr, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.67.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-detail, boost-functional, boost-move, boost-predef, boost-preprocessor, boost-smart-ptr, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost unordered module diff --git a/ports/boost-unordered/portfile.cmake b/ports/boost-unordered/portfile.cmake index f90c8094f..02fae3899 100644 --- a/ports/boost-unordered/portfile.cmake +++ b/ports/boost-unordered/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/unordered - REF boost-1.66.0 - SHA512 4abb2d6a2847c28ecd2324afd4caf46a9fe2597e3bceaf2fe430cb82688ce6584137356fd3dff5fe1ab60ab8a51460821d9dd78c14d4e0fb6e11c4dee7cc0adb + REF boost-1.67.0 + SHA512 8eb086d4993ff7079b0919b0ad39ac16b37b4951eb9cf4d5f388aff37cf2b7ae42621277a23f8d870a35ff571de44ee1dc7b0faf108fdbf1ccdd8ed2d6be51d4 HEAD_REF master ) diff --git a/ports/boost-utility/CONTROL b/ports/boost-utility/CONTROL index 1793f88f3..481427860 100644 --- a/ports/boost-utility/CONTROL +++ b/ports/boost-utility/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-utility -Version: 1.66.0 -Build-Depends: boost-config, boost-core, boost-detail, boost-mpl, boost-preprocessor, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Version: 1.67.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-integer, boost-preprocessor, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost utility module diff --git a/ports/boost-utility/portfile.cmake b/ports/boost-utility/portfile.cmake index 42c9d1fc7..1a919c18a 100644 --- a/ports/boost-utility/portfile.cmake +++ b/ports/boost-utility/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/utility - REF boost-1.66.0 - SHA512 aa72e1d32bb1575e23ec8e1dc12421e56d114532a9e7b3ebf2edf6926c79d2e2eb3c5483f241bc014b65008a9d03fbeadc85a6f0cea9013ecea2b1c1e942ea59 + REF boost-1.67.0 + SHA512 4123a71af8234789b2b68f2a3b6e13e7ad3e46484e8b06ee2159d7337d101a2b1c8b8e7ca70ce29f0b71802f45014e1db03253e1f6515a6ad2f9d5ebced77caf HEAD_REF master ) diff --git a/ports/boost-uuid/CONTROL b/ports/boost-uuid/CONTROL index 9c81b7c12..09af27bd7 100644 --- a/ports/boost-uuid/CONTROL +++ b/ports/boost-uuid/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-uuid -Version: 1.66.0 -Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-io, boost-iterator, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Version: 1.67.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-integer, boost-io, boost-numeric-conversion, boost-predef, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tti, boost-type-traits, boost-vcpkg-helpers, boost-winapi Description: Boost uuid module diff --git a/ports/boost-uuid/portfile.cmake b/ports/boost-uuid/portfile.cmake index 35b9c4c17..b68c1f68b 100644 --- a/ports/boost-uuid/portfile.cmake +++ b/ports/boost-uuid/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/uuid - REF boost-1.66.0 - SHA512 5fc333c76f4d44fcbca4a7be02117015e361b85c615d3f728d9805d32f55431fca33f90bb0151a789b341606d8ce7538163a162a4c7ba29823cf7a01326685d7 + REF boost-1.67.0 + SHA512 224324198b24c4606ca0c3c370c8d344730e6851ccdff012eaa6024ede958b342c5b728ddbb0a5c52dedcd0ac628bf12213de14654348c3e18eb20aa73d8b7e4 HEAD_REF master ) diff --git a/ports/boost-variant/CONTROL b/ports/boost-variant/CONTROL index 9edcfa99e..246ee7355 100644 --- a/ports/boost-variant/CONTROL +++ b/ports/boost-variant/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-variant -Version: 1.66.0 -Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-functional, boost-math, boost-move, boost-mpl, boost-preprocessor, boost-static-assert, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers +Version: 1.67.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 Description: Boost variant module diff --git a/ports/boost-variant/portfile.cmake b/ports/boost-variant/portfile.cmake index 8e32a822d..8449a21aa 100644 --- a/ports/boost-variant/portfile.cmake +++ b/ports/boost-variant/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/variant - REF boost-1.66.0 - SHA512 3eb3d4070bf81033c0a342956393e2e902618dc482fd3ba7c0b4f97ac3259fff31943a9b059bc25dd6d399af6d8b56a8297b462776b14b5012c6436b00c7d491 + REF boost-1.67.0 + SHA512 1fc6a0a98cdb2eca64f8a380e31724c70a9a0260ab2e433ad5812c580c9e2a867c6faf7ee17b0c6cf94b6410af1e509ac5d51e93b6fa1174b3d1c55ca62a10c7 HEAD_REF master ) diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index 7f5ecc9fb..0635608fd 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -1,13 +1,13 @@ [CmdletBinding()] param ( $libraries = @(), - $version = "1.66.0" + $version = "1.67.0" ) $scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition $libsDisabledInLinux = "python|fiber" -$libsDisabledInUWP = "iostreams|filesystem|thread|context|python|stacktrace|program[_-]options|coroutine`$|fiber|locale|test|type[_-]erasure|wave|log" +$libsDisabledInUWP = "iostreams|filesystem|thread|context|contract|python|stacktrace|program[_-]options|coroutine`$|fiber|locale|test|type[_-]erasure|wave|log" function Generate() { @@ -76,15 +76,9 @@ function Generate() "" ) - if ($Name -eq "python") + if (Test-Path "$scriptsDir/post-source-stubs/$Name.cmake") { - $portfileLines += @( - "# Find Python. Can't use find_package here, but we already know where everything is" - "file(GLOB PYTHON_INCLUDE_PATH `"`${CURRENT_INSTALLED_DIR}/include/python[0-9.]*`")" - "set(PYTHONLIBS_RELEASE `"`${CURRENT_INSTALLED_DIR}/lib`")" - "set(PYTHONLIBS_DEBUG `"`${CURRENT_INSTALLED_DIR}/debug/lib`")" - "string(REGEX REPLACE `".*python([0-9\.]+)`$`" `"\\1`" PYTHON_VERSION `"`${PYTHON_INCLUDE_PATH}`")" - ) + $portfileLines += @(get-content "$scriptsDir/post-source-stubs/$Name.cmake") } if ($NeedsBuild) @@ -127,7 +121,7 @@ function Generate() { $portfileLines += @( "include(`${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)" - "boost_modular_build(SOURCE_PATH `${SOURCE_PATH} REQUIREMENTS `"/boost/date_time//boost_date_time`")" + "boost_modular_build(SOURCE_PATH `${SOURCE_PATH} REQUIREMENTS `"/boost/date_time//boost_date_time`" OPTIONS /boost/thread//boost_thread)" ) } else @@ -160,6 +154,14 @@ function Generate() "if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)" " file(APPEND `${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp `"\n#define BOOST_ALL_DYN_LINK\n`")" "endif()" + "file(COPY `${SOURCE_PATH}/checks DESTINATION `${CURRENT_PACKAGES_DIR}/share/boost-config)" + ) + } + if ($Name -eq "predef") + { + $portfileLines += @( + "" + "file(COPY `${SOURCE_PATH}/tools/check DESTINATION `${CURRENT_PACKAGES_DIR}/share/boost-predef)" ) } if ($Name -eq "test") @@ -198,6 +200,19 @@ if (!(Test-Path "$scriptsDir/boost")) popd } } +else +{ + pushd $scriptsDir/boost + try + { + git fetch + git checkout -f boost-$version + } + finally + { + popd + } +} $libraries_found = ls $scriptsDir/boost/libs -directory | % name | % { if ($_ -match "numeric") @@ -229,7 +244,7 @@ foreach ($library in $libraries) if (!(Test-Path $archive)) { "Downloading boost/$library..." - Invoke-WebRequest "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" -OutFile $archive + & "$scriptsDir\..\..\downloads\tools\aria2-18.01.0-windows\aria2-1.33.1-win-32bit-build1\aria2c.exe" "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" -d "$scriptsDir/downloads" -o "$library-boost-$version.tar.gz" } $hash = vcpkg hash $archive $unpacked = "$scriptsDir/libs/$library-boost-$version" @@ -293,6 +308,11 @@ foreach ($library in $libraries) $deps = @($groups | ? { $libraries_found -contains $_ }) + if ($library -eq "regex") + { + $deps += @("container_hash") + } + $deps = @($deps | ? { # Boost contains cycles, so remove a few dependencies to break the loop. (($library -notmatch "core|assert|mpl|detail|type_traits") -or ($_ -notmatch "utility")) ` diff --git a/ports/boost-vcpkg-helpers/post-source-stubs/context.cmake b/ports/boost-vcpkg-helpers/post-source-stubs/context.cmake new file mode 100644 index 000000000..9ccf34233 --- /dev/null +++ b/ports/boost-vcpkg-helpers/post-source-stubs/context.cmake @@ -0,0 +1,5 @@ +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + diff --git a/ports/boost-vcpkg-helpers/post-source-stubs/fiber.cmake b/ports/boost-vcpkg-helpers/post-source-stubs/fiber.cmake new file mode 100644 index 000000000..9ccf34233 --- /dev/null +++ b/ports/boost-vcpkg-helpers/post-source-stubs/fiber.cmake @@ -0,0 +1,5 @@ +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + diff --git a/ports/boost-vcpkg-helpers/post-source-stubs/log.cmake b/ports/boost-vcpkg-helpers/post-source-stubs/log.cmake new file mode 100644 index 000000000..78500ddc3 --- /dev/null +++ b/ports/boost-vcpkg-helpers/post-source-stubs/log.cmake @@ -0,0 +1,13 @@ +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +string(REPLACE " @select-arch-specific-sources" "#@select-arch-specific-sources" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + +file(READ ${SOURCE_PATH}/build/log-architecture.jam _contents) +string(REPLACE + "\nproject.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" + "\nproject.load [ path.join [ path.make $(here:D) ] config/checks/architecture ] ;" + _contents "${_contents}") +file(WRITE ${SOURCE_PATH}/build/log-architecture.jam "${_contents}") + diff --git a/ports/boost-vcpkg-helpers/post-source-stubs/python.cmake b/ports/boost-vcpkg-helpers/post-source-stubs/python.cmake new file mode 100644 index 000000000..40b8e0a0b --- /dev/null +++ b/ports/boost-vcpkg-helpers/post-source-stubs/python.cmake @@ -0,0 +1,5 @@ +# Find Python. Can't use find_package here, but we already know where everything is +file(GLOB PYTHON_INCLUDE_PATH "${CURRENT_INSTALLED_DIR}/include/python[0-9.]*") +set(PYTHONLIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") +set(PYTHONLIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") +string(REGEX REPLACE ".*python([0-9\.]+)$" "\\1" PYTHON_VERSION "${PYTHON_INCLUDE_PATH}") diff --git a/ports/boost-vcpkg-helpers/post-source-stubs/test.cmake b/ports/boost-vcpkg-helpers/post-source-stubs/test.cmake new file mode 100644 index 000000000..b2872338d --- /dev/null +++ b/ports/boost-vcpkg-helpers/post-source-stubs/test.cmake @@ -0,0 +1,5 @@ +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../predef/check/predef" "import predef/check/predef" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-predef/check" DESTINATION "${SOURCE_PATH}/build/predef") + diff --git a/ports/boost-vmd/CONTROL b/ports/boost-vmd/CONTROL index cbd36905a..b6bea6cff 100644 --- a/ports/boost-vmd/CONTROL +++ b/ports/boost-vmd/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-vmd -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-preprocessor, boost-vcpkg-helpers Description: Boost vmd module diff --git a/ports/boost-vmd/portfile.cmake b/ports/boost-vmd/portfile.cmake index eab18ada3..0d96a6606 100644 --- a/ports/boost-vmd/portfile.cmake +++ b/ports/boost-vmd/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/vmd - REF boost-1.66.0 - SHA512 a0112a6751d1dc9c015d8ba8a2dce5ebe13c2189cec1039a5bc57e71efad7244c39eabdb5e24c8d8111edfc1a9856154b9c3f658f36bfd935274e02229e86821 + REF boost-1.67.0 + SHA512 479b816decaf5bba27f6aee25af950bfce2df62ebd1e278cf62ad6260bb590ac93c284f09de43fc96d0504093937507d55bffd1ae751af6120a4632da02409d6 HEAD_REF master ) diff --git a/ports/boost-wave/CONTROL b/ports/boost-wave/CONTROL index 251703103..aa1a8e707 100644 --- a/ports/boost-wave/CONTROL +++ b/ports/boost-wave/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-wave -Version: 1.66.0 -Build-Depends: boost-assert, boost-build, boost-concept-check, boost-config, boost-core, boost-detail, boost-filesystem (!uwp), boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-multi-index, boost-pool, boost-preprocessor, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Version: 1.67.0 +Build-Depends: boost-assert, boost-build, boost-concept-check, boost-config, boost-core, boost-detail, boost-filesystem (!uwp), boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-multi-index, boost-pool, boost-preprocessor, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers Description: Boost wave module diff --git a/ports/boost-wave/portfile.cmake b/ports/boost-wave/portfile.cmake index e335f6ba4..479770e92 100644 --- a/ports/boost-wave/portfile.cmake +++ b/ports/boost-wave/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/wave - REF boost-1.66.0 - SHA512 2fd57aab7cbc92e7d46bc35512f2019d71f0e5af93dfcbfeada595d899bbf9ae1f1c88f915d555f2fce16419a9320164203303d00f09493cfa5f87afde002d42 + REF boost-1.67.0 + SHA512 e298b903dbeae5577938e92559b699a0f89abcff9299781c1857c401503b6c31b56420908aed6f0063b25508e97e978c39282352a1355d0924012e384994094b HEAD_REF master ) diff --git a/ports/boost-winapi/CONTROL b/ports/boost-winapi/CONTROL index f06f0c530..9f3242243 100644 --- a/ports/boost-winapi/CONTROL +++ b/ports/boost-winapi/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-winapi -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-config, boost-integer, boost-predef, boost-vcpkg-helpers Description: Boost winapi module diff --git a/ports/boost-winapi/portfile.cmake b/ports/boost-winapi/portfile.cmake index d788dea86..30c36ee1f 100644 --- a/ports/boost-winapi/portfile.cmake +++ b/ports/boost-winapi/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/winapi - REF boost-1.66.0 - SHA512 ec60e5d73d6553ca981b4a65b0edcd85dc54336e6369124204495a35c6c1c7adf79345e47425a93f1d9ed6694bfae76828162eb102bc660901fb276a3e9eb989 + REF boost-1.67.0 + SHA512 1a0935132e8058b3f592406aaf6bb6fa8df6c96c35e61e09d84e39c6ab00c50b87346789d309fdfb7de8f6252134a76a59c0dc214fe1f4ee25d82c379cf63a3c HEAD_REF master ) diff --git a/ports/boost-xpressive/CONTROL b/ports/boost-xpressive/CONTROL index e126d3c19..baa3e7216 100644 --- a/ports/boost-xpressive/CONTROL +++ b/ports/boost-xpressive/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-xpressive -Version: 1.66.0 +Version: 1.67.0 Build-Depends: boost-assert, boost-compatibility, boost-config, boost-conversion, boost-core, boost-detail, boost-exception, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-proto, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers Description: Boost xpressive module diff --git a/ports/boost-xpressive/portfile.cmake b/ports/boost-xpressive/portfile.cmake index 2eacea441..2d4791918 100644 --- a/ports/boost-xpressive/portfile.cmake +++ b/ports/boost-xpressive/portfile.cmake @@ -5,8 +5,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/xpressive - REF boost-1.66.0 - SHA512 99b4cab1ec6e85421dfbd8085cbdad2533e48aaff352ba920d589da328ee78a009d27b53042f08bb64d4b3b02499152928cadb5c97537c9b8ab5ce97daaf34f9 + REF boost-1.67.0 + SHA512 3883764ee2d0c5cfcf444319ae5c7ec547d27d0f54c1e2f4e4b134be25c3fbc7954bae1f783cac96386a63984dcff4197bd98176644c1d6bc50926256f39069d HEAD_REF master ) diff --git a/ports/boost/CONTROL b/ports/boost/CONTROL index 72993bba6..23fc8ef59 100644 --- a/ports/boost/CONTROL +++ b/ports/boost/CONTROL @@ -1,8 +1,8 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost -Version: 1.66.0 +Version: 1.67.0 Description: Peer-reviewed portable C++ source libraries -Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-context (!uwp), boost-conversion, boost-convert, boost-core, boost-coroutine (!uwp), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-disjoint-sets, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (windows), boost-filesystem (!uwp), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (!uwp), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (!uwp), boost-local-function, boost-lockfree, boost-log (!uwp), boost-logic (!uwp), boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-optional, boost-parameter, boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options (!uwp), boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (windows), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-scope-exit, boost-serialization, boost-signals, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (!uwp), boost-statechart, boost-static-assert, boost-system, boost-test (!uwp), boost-thread (!uwp), boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure (!uwp), boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-vmd, boost-wave (!uwp), boost-winapi, boost-xpressive +Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-container-hash, boost-context (!uwp), boost-contract (!uwp), boost-conversion, boost-convert, boost-core, boost-coroutine (!uwp), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-disjoint-sets, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (windows), boost-filesystem (!uwp), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-hof, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (!uwp), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (!uwp), boost-local-function, boost-lockfree, boost-log (!uwp), boost-logic (!uwp), boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-optional, boost-parameter, boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options (!uwp), boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (windows), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-scope-exit, boost-serialization, boost-signals, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (!uwp), boost-statechart, boost-static-assert, boost-system, boost-test (!uwp), boost-thread (!uwp), boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure (!uwp), boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-vmd, boost-wave (!uwp), boost-winapi, boost-xpressive Feature: mpi Description: Build with MPI support diff --git a/ports/cartographer/CONTROL b/ports/cartographer/CONTROL index 8439ea8e6..88f0dc6b7 100644 --- a/ports/cartographer/CONTROL +++ b/ports/cartographer/CONTROL @@ -1,4 +1,4 @@ Source: cartographer -Version: 0.3.0-3 +Version: 0.3.0-4 Build-Depends: ceres[eigensparse], gflags, glog, lua, cairo, boost-iostreams, gtest, protobuf Description: Google 2D & 3D SLAM package diff --git a/ports/cartographer/portfile.cmake b/ports/cartographer/portfile.cmake index 49ca1b4b2..75f28a015 100644 --- a/ports/cartographer/portfile.cmake +++ b/ports/cartographer/portfile.cmake @@ -16,7 +16,8 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS + PREFER_NINJA + OPTIONS -DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION=OFF -DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION=OFF -Dgtest_disable_pthreads=ON @@ -27,7 +28,7 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cartographer) vcpkg_copy_pdbs() # Clean diff --git a/ports/libtorrent/CONTROL b/ports/libtorrent/CONTROL index e0de70962..815a53497 100644 --- a/ports/libtorrent/CONTROL +++ b/ports/libtorrent/CONTROL @@ -1,4 +1,4 @@ Source: libtorrent -Version: 1.1.6 +Version: 1.1.6-1 Description: An efficient feature complete C++ BitTorrent implementation -Build-Depends: openssl, boost-system, boost-date-time, boost-chrono, boost-random, boost-asio, boost-crc, boost-config +Build-Depends: openssl, boost-system, boost-date-time, boost-chrono, boost-random, boost-asio, boost-crc, boost-config, boost-iterator diff --git a/ports/libtorrent/boost-167.patch b/ports/libtorrent/boost-167.patch new file mode 100644 index 000000000..279d517d5 --- /dev/null +++ b/ports/libtorrent/boost-167.patch @@ -0,0 +1,48 @@ +diff --git a/include/libtorrent/ip_filter.hpp b/include/libtorrent/ip_filter.hpp +index dac1cab..0b29c64 100644 +--- a/include/libtorrent/ip_filter.hpp ++++ b/include/libtorrent/ip_filter.hpp +@@ -42,6 +42,7 @@ POSSIBILITY OF SUCH DAMAGE. + + #include + #include ++#include + #include + #include + +diff --git a/src/kademlia/routing_table.cpp b/src/kademlia/routing_table.cpp +index 1ac00de..1d11617 100644 +--- a/src/kademlia/routing_table.cpp ++++ b/src/kademlia/routing_table.cpp +@@ -53,6 +53,7 @@ POSSIBILITY OF SUCH DAMAGE. + + #include + #include ++#include + + #include "libtorrent/aux_/disable_warnings_pop.hpp" + +diff --git a/src/torrent.cpp b/src/torrent.cpp +index feacfa4..7b2b920 100644 +--- a/src/torrent.cpp ++++ b/src/torrent.cpp +@@ -46,6 +46,7 @@ POSSIBILITY OF SUCH DAMAGE. + + #include + #include ++#include + #if TORRENT_USE_I2P + # include + #endif +diff --git a/test/test_ip_filter.cpp b/test/test_ip_filter.cpp +index 21ac404..40e3cd5 100644 +--- a/test/test_ip_filter.cpp ++++ b/test/test_ip_filter.cpp +@@ -32,6 +32,7 @@ POSSIBILITY OF SUCH DAMAGE. + + #include "libtorrent/ip_filter.hpp" + #include ++#include + + #include "test.hpp" + #include "settings.hpp" diff --git a/ports/libtorrent/portfile.cmake b/ports/libtorrent/portfile.cmake index bf0d851b9..792fe1dee 100644 --- a/ports/libtorrent/portfile.cmake +++ b/ports/libtorrent/portfile.cmake @@ -10,7 +10,9 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/add-datetime-to-boost-libs.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/add-datetime-to-boost-libs.patch + ${CMAKE_CURRENT_LIST_DIR}/boost-167.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBTORRENT_SHARED) -- cgit v1.2.3 From 60e63d34472819af88bd0f4aa4ca5b502775cf04 Mon Sep 17 00:00:00 2001 From: jadedrip Date: Fri, 20 Apr 2018 01:43:10 +0800 Subject: update llvm to 6.0.0 (#3118) --- ports/llvm/CONTROL | 8 +-- ports/llvm/portfile.cmake | 164 +++++++++++++++++++++++----------------------- 2 files changed, 86 insertions(+), 86 deletions(-) diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index ecc6346ca..27604d397 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,4 +1,4 @@ -Source: llvm -Version: 5.0.1 -Description: The LLVM Compiler Infrastructure -Build-Depends: atlmfc +Source: llvm +Version: 6.0.0 +Description: The LLVM Compiler Infrastructure +Build-Depends: atlmfc diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 60580947e..795d72d31 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -1,82 +1,82 @@ -# LLVM documentation recommends always using static library linkage when -# building with Microsoft toolchain; it's also the default on other platforms -set(VCPKG_LIBRARY_LINKAGE static) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "llvm cannot currently be built for UWP") -endif() - -include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-5.0.1.src) -vcpkg_download_distfile(ARCHIVE - URLS "http://releases.llvm.org/5.0.1/llvm-5.0.1.src.tar.xz" - FILENAME "llvm-5.0.1.src.tar.xz" - SHA512 bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b5366172c4aad46592dfd8afe372349ecf264f581463d017f9cee2d63c1cb -) -vcpkg_extract_source_archive(${ARCHIVE}) - -vcpkg_download_distfile(CLANG_ARCHIVE - URLS "http://releases.llvm.org/5.0.1/cfe-5.0.1.src.tar.xz" - FILENAME "cfe-5.0.1.src.tar.xz" - SHA512 6619177a2ff9934fe8b15d6aa229abb8e34d0b1a75228d9efba9393daf71d6419a7256de57b31e2f9f829f71f842118556f996e86ee076f1e0a7cd394dfd31a2 -) -vcpkg_extract_source_archive(${CLANG_ARCHIVE} ${SOURCE_PATH}/tools) - -if(NOT EXISTS ${SOURCE_PATH}/tools/clang) - file(RENAME ${SOURCE_PATH}/tools/cfe-5.0.1.src ${SOURCE_PATH}/tools/clang) -endif() - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-cmake-modules-to-share.patch -) - -vcpkg_find_acquire_program(PYTHON3) -get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DLLVM_TARGETS_TO_BUILD=X86 - -DLLVM_INCLUDE_TOOLS=ON - -DLLVM_INCLUDE_UTILS=OFF - -DLLVM_INCLUDE_EXAMPLES=OFF - -DLLVM_INCLUDE_TESTS=OFF - -DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF - -DLLVM_TOOLS_INSTALL_DIR=tools/llvm -) - -vcpkg_install_cmake() - -file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*) -file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*) -file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/llvm) -file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/llvm) -file(REMOVE ${EXE}) -file(REMOVE ${DEBUG_EXE}) - -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/clang TARGET_PATH share/clang) -vcpkg_fixup_cmake_targets(CONFIG_PATH share/llvm) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/llvm) - -file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/tools - ${CURRENT_PACKAGES_DIR}/debug/share - ${CURRENT_PACKAGES_DIR}/debug/bin - ${CURRENT_PACKAGES_DIR}/debug/msbuild-bin - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/msbuild-bin - ${CURRENT_PACKAGES_DIR}/tools/msbuild-bin -) - -# Remove one empty include subdirectory if it is 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() - -# Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/llvm RENAME copyright) +# LLVM documentation recommends always using static library linkage when +# building with Microsoft toolchain; it's also the default on other platforms +set(VCPKG_LIBRARY_LINKAGE static) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "llvm cannot currently be built for UWP") +endif() + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/llvm-6.0.0.src) +vcpkg_download_distfile(ARCHIVE + URLS "http://releases.llvm.org/6.0.0/llvm-6.0.0.src.tar.xz" + FILENAME "llvm-6.0.0.src.tar.xz" + SHA512 a71fdd5ddc46f01327ad891cfcc198febdbe10769c57f14d8a4fb7d514621ee4080e1a641200d3353c16a16731d390270499ec6cd3dc98fadc570f3eb6b52b8c +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_download_distfile(CLANG_ARCHIVE + URLS "http://releases.llvm.org/6.0.0/cfe-6.0.0.src.tar.xz" + FILENAME "cfe-6.0.0.src.tar.xz" + SHA512 e886dd27448503bbfc7fd4f68eb089c19b2f2be4f0e5b26d3df253833f60b91d70b472a6b530063386e2252075b110ce9f5942800feddf6c34b94a75cf7bd5c6 +) +vcpkg_extract_source_archive(${CLANG_ARCHIVE} ${SOURCE_PATH}/tools) + +if(NOT EXISTS ${SOURCE_PATH}/tools/clang) + file(RENAME ${SOURCE_PATH}/tools/cfe-6.0.0.src ${SOURCE_PATH}/tools/clang) +endif() + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-cmake-modules-to-share.patch +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLLVM_TARGETS_TO_BUILD=X86 + -DLLVM_INCLUDE_TOOLS=ON + -DLLVM_INCLUDE_UTILS=OFF + -DLLVM_INCLUDE_EXAMPLES=OFF + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF + -DLLVM_TOOLS_INSTALL_DIR=tools/llvm +) + +vcpkg_install_cmake() + +file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*) +file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*) +file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/llvm) +file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/llvm) +file(REMOVE ${EXE}) +file(REMOVE ${DEBUG_EXE}) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/clang TARGET_PATH share/clang) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/llvm) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/llvm) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/tools + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/debug/msbuild-bin + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/msbuild-bin + ${CURRENT_PACKAGES_DIR}/tools/msbuild-bin +) + +# Remove one empty include subdirectory if it is 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() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/llvm RENAME copyright) -- cgit v1.2.3 From 12e21abfc77ce6b68fd47ac6faa6722e80d22977 Mon Sep 17 00:00:00 2001 From: Ashik Salim Date: Fri, 20 Apr 2018 02:56:48 +0530 Subject: [x264] Fix compilation for uwp (#3270) * [x264] borrow some code from ffmpeg portfile to fix compilation for uwp * [x264] Fix uwp configure instead of removing -RTC1 --- ports/x264/CONTROL | 2 +- ports/x264/portfile.cmake | 20 ++++++++++++++++++-- ports/x264/uwp-cflags.patch | 12 ++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 ports/x264/uwp-cflags.patch diff --git a/ports/x264/CONTROL b/ports/x264/CONTROL index b9a3a4f9b..245fb8f7f 100644 --- a/ports/x264/CONTROL +++ b/ports/x264/CONTROL @@ -1,3 +1,3 @@ Source: x264 -Version: 152-e9a5903edf8ca59 +Version: 152-e9a5903edf8ca59-1 Description: x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format diff --git a/ports/x264/portfile.cmake b/ports/x264/portfile.cmake index b9dbfa34d..d5f85ecdd 100644 --- a/ports/x264/portfile.cmake +++ b/ports/x264/portfile.cmake @@ -10,6 +10,12 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/uwp-cflags.patch +) + # Acquire tools vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15) @@ -25,10 +31,18 @@ set(CONFIGURE_OPTIONS "--host=i686-pc-mingw32 --enable-strip --disable-lavf --di if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --enable-shared") + if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib") + endif() else() set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --enable-static") endif() +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\") + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") +endif() + set(CONFIGURE_OPTIONS_RELEASE "--prefix=${CURRENT_PACKAGES_DIR}") set(CONFIGURE_OPTIONS_DEBUG "--enable-debug --prefix=${CURRENT_PACKAGES_DIR}/debug") @@ -86,8 +100,10 @@ vcpkg_execute_required_process( LOGNAME "build-${TARGET_TRIPLET}-dbg") message(STATUS "Package ${TARGET_TRIPLET}-dbg done") -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/x264) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/x264.exe ${CURRENT_PACKAGES_DIR}/tools/x264/x264.exe) +if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/x264) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/x264.exe ${CURRENT_PACKAGES_DIR}/tools/x264/x264.exe) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig diff --git a/ports/x264/uwp-cflags.patch b/ports/x264/uwp-cflags.patch new file mode 100644 index 000000000..fd04755bc --- /dev/null +++ b/ports/x264/uwp-cflags.patch @@ -0,0 +1,12 @@ +diff --git a/configure b/configure +index f7b14d9..2c92b2a 100644 +--- a/configure ++++ b/configure +@@ -821,7 +821,6 @@ if [ $SYS = WINDOWS ]; then + if cpp_check "winapifamily.h" "" "!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)" ; then + [ $compiler = CL ] || die "WinRT requires MSVC" + define HAVE_WINRT +- CFLAGS="$CFLAGS -MD" + LDFLAGS="$LDFLAGS -appcontainer" + if ! cpp_check "" "" "defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0603" ; then + die "_WIN32_WINNT must be defined to at least 0x0603 (Windows 8.1) for WinRT" -- cgit v1.2.3 From 96dbb6c3df72b45cd81b166a6853bf341c683ab7 Mon Sep 17 00:00:00 2001 From: RT222 Date: Fri, 6 Apr 2018 01:27:20 +0200 Subject: Initial port --- ports/utf8h/CONTROL | 3 +++ ports/utf8h/portfile.cmake | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 ports/utf8h/CONTROL create mode 100644 ports/utf8h/portfile.cmake diff --git a/ports/utf8h/CONTROL b/ports/utf8h/CONTROL new file mode 100644 index 000000000..5f1acf4c0 --- /dev/null +++ b/ports/utf8h/CONTROL @@ -0,0 +1,3 @@ +Source: utf8h +Version: 841cb2deb8eb806e73fff0e1f43a11fca4f5da45 +Description: Single header utf8 string functions for C and C++ diff --git a/ports/utf8h/portfile.cmake b/ports/utf8h/portfile.cmake new file mode 100644 index 000000000..11b35c21a --- /dev/null +++ b/ports/utf8h/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sheredom/utf8.h + REF 841cb2deb8eb806e73fff0e1f43a11fca4f5da45 + SHA512 cce44011abc58556c031c0de1018b83225bdbbc0e8d7374e3fd6f0b63c8e200086c49e7caac61b559f1e6d5a7ad349a58a13876a1b1341c18349a5cee59a105b + HEAD_REF master +) + +# Copy the utf8h header files +file(COPY ${SOURCE_PATH}/utf8.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/utf8h) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/utf8h RENAME copyright) -- cgit v1.2.3 From 8f08e64ace2bc18db78b5246711a29395c6180a1 Mon Sep 17 00:00:00 2001 From: Stephen Kyne Date: Thu, 19 Apr 2018 23:30:39 +0100 Subject: [fluidsynth] Initial port (#3016) * [portaudio] Added ASIO support to build * Update libpng to 1.6.34 * [liblo] Initial port * Revert "Update libpng to 1.6.34" This reverts commit ede0bb947b07aea119b7b05e3625c3eec1395af4. * Revert "[liblo] Initial port" This reverts commit bb819eb21841bb8cf4816af5a78e17ef58ec8ce5. * [fluidsynth] Initial port * Fixed version numbers --- ports/fluidsynth/CONTROL | 4 ++++ ports/fluidsynth/portfile.cmake | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 ports/fluidsynth/CONTROL create mode 100644 ports/fluidsynth/portfile.cmake diff --git a/ports/fluidsynth/CONTROL b/ports/fluidsynth/CONTROL new file mode 100644 index 000000000..7fbb29a5b --- /dev/null +++ b/ports/fluidsynth/CONTROL @@ -0,0 +1,4 @@ +Source: fluidsynth +Version: 1.1.10 +Description: FluidSynth reads and handles MIDI events from the MIDI input device. It is the software analogue of a MIDI synthesizer. FluidSynth can also play midifiles using a Soundfont. +Build-Depends: glib \ No newline at end of file diff --git a/ports/fluidsynth/portfile.cmake b/ports/fluidsynth/portfile.cmake new file mode 100644 index 000000000..ed0cf532d --- /dev/null +++ b/ports/fluidsynth/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/fluidsynth-1.1.10) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO FluidSynth/fluidsynth + REF v1.1.10 + SHA512 7ff7757baf6dee37f65a4fd214ffab1aa1434cfd1545deb4108fe2e9b0ed19d616880b2740a693b51ade0a4be998a671910b43cae26eb67fb97b16a513752cbc + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -Denable-pkgconfig=0 +) + +vcpkg_install_cmake() + +# Copy fluidsynth.exe to tools dir +file(COPY ${CURRENT_PACKAGES_DIR}/bin/fluidsynth.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/fluidsynth) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/fluidsynth) + +# Remove unnecessary files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/fluidsynth.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/fluidsynth.exe) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fluidsynth RENAME copyright) -- cgit v1.2.3 From 8087d70a2d8ca1437517d7a0c742631705c096ee Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 17 Apr 2018 16:53:41 -0700 Subject: [breakpad][jsonnet][nuklear][parson][thrift][wt][zeromq] Upgrades --- ports/breakpad/CONTROL | 2 +- ports/breakpad/portfile.cmake | 4 ++-- ports/jsonnet/CONTROL | 2 +- ports/jsonnet/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/parson/CONTROL | 2 +- ports/parson/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/wt/CONTROL | 2 +- ports/wt/portfile.cmake | 4 ++-- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 4 ++-- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ports/breakpad/CONTROL b/ports/breakpad/CONTROL index 9324ac2fa..d6622f15a 100644 --- a/ports/breakpad/CONTROL +++ b/ports/breakpad/CONTROL @@ -1,4 +1,4 @@ Source: breakpad -Version: 2018-04-12 +Version: 2018-04-17 Build-Depends: libdisasm Description: a set of client and server components which implement a crash-reporting system. diff --git a/ports/breakpad/portfile.cmake b/ports/breakpad/portfile.cmake index 6b21e6ee0..939988ef2 100644 --- a/ports/breakpad/portfile.cmake +++ b/ports/breakpad/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/breakpad - REF c83fcf647033cd31348b4109c2a9d8df72706361 - SHA512 680b92b1bff6c92a26a3510242f0fb083e63e0234e5a49b2df74b9c743b5a8900d800e617a4910b40748ea699c0d981c42009366a8734e5eb3af081deeb4515b + REF 9eac2058b70615519b2c4d8c6bdbfca1bd079e39 + SHA512 2bdbfc7455bde3b93c1b0e3d47250722525ffeddbe99277e48d0c2930c461162e9342ed7560b4ea5d1245baf162b1102f0e01176611b403c672435e4f518a7fd HEAD_REF master ) diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index 55bc73fa4..3cd30746a 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-04-09 +Version: 2018-04-17 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 02afe21b8..3f4edbf38 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF bdbb3b32dda55b42b1f8843acc88f7bb4e38103f - SHA512 a275b63169a24c3319029dee85ec1efec54310cbc8a347a3f791dae6c2565358b74ce48f373453abd7b57361b67388fb85b9401f014df0b132f1cf0dd9babb49 + REF 125012dd904a7d111adf1082b3dca5642dbfd418 + SHA512 1d03d92aee54862d7ae03227be290f24b283dc89d60e77ffa42bfa9485e9ff0e39a93c27cfb1049cee7015c25f6d62b27362bb0836973d2ac1f919276c33ab3c HEAD_REF master ) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index bfa1e2ab5..82fba8753 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-04-06 +Version: 2018-04-17 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index 0722fe775..99b60f8e6 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF bca152011e3f5839c7eb08864f76f1f900d4ffe7 - SHA512 aa3bf7f9f32fe63140505e4845a9ee22fb9feb1abc3dd36b333697548778272b817795844a8b6f5cc95a4e460afd69fd96359955ab4e8d12737ac4b46be7e4d1 + REF b91a815c826619bfcacacad090e31b2dd3e1a20c + SHA512 d1966cd01a3d6e75608426f2813ec038dff1291674d481899c031248f0469b47b78f3e35b86a78090e3f019cc478c606d2b78bcc80117fb54de9ed5df22883a0 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/parson/CONTROL b/ports/parson/CONTROL index 47d1167a2..7c82a9eba 100644 --- a/ports/parson/CONTROL +++ b/ports/parson/CONTROL @@ -1,3 +1,3 @@ Source: parson -Version: 2018-03-23 +Version: 2018-04-17 Description: a lighweight json library written in C diff --git a/ports/parson/portfile.cmake b/ports/parson/portfile.cmake index f1028d9ee..87fda6451 100644 --- a/ports/parson/portfile.cmake +++ b/ports/parson/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kgabis/parson - REF 387c5665f6b20faa535a7f782dcaa49390963366 - SHA512 755d1351c2176ac75bb865e83cbbd3b8f6b3a5797cccd96e512e474100fbdaacb7d00eb857ebc4478aad40672baeafdecb5d87c26eaa16f43ef5559a0a56f431 + REF 921da6f5d7b82ac3c8c809341028daafe47e3210 + SHA512 fac1989d03148c1efec5e483704e76110c6575258c7ad0585f4598c1666b22804b8bd672fa31869227b5334fb1ba0b70eb380a971950df1a8f52e56e646956d9 HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index e544fbbe0..449a6a4ca 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-04-09 +Version: 2018-04-17 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 5461f3307..81b65cea0 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 606f1ef31447526b908244933d5b716397a6bad8 - SHA512 101de834e8f19ed5f4855a3b138425ffdc8103565f04656f1544098821ad54d5e89f8275cf50b380f01d3a83f4ba7670ec1cc79ec7bd4594172f6fb06d3e034b + REF 4a00fc658a1dc90be33a223a2c7ee336679e8745 + SHA512 b5f380b195498103d0ab4612c1754b29a8dce8e9360e46f5d6dd6daead477c6d2b9b0092ef83a081d937973e21a77fa8b55d5cb7c1d2d5abe71c6b0caa4dae30 HEAD_REF master ) diff --git a/ports/wt/CONTROL b/ports/wt/CONTROL index 8b9b98aa3..d3a707343 100644 --- a/ports/wt/CONTROL +++ b/ports/wt/CONTROL @@ -1,4 +1,4 @@ Source: wt -Version: 4.0.2 +Version: 4.0.3 Description: Wt is a C++ library for developing web applications Build-Depends: openssl, sqlite3, libpq, pango, glew, boost-date-time, boost-regex, boost-program-options, boost-signals, boost-system, boost-filesystem, boost-thread, boost-random, boost-multi-index, boost-signals2, boost-asio, boost-ublas, boost-conversion, boost-array, boost-smart-ptr, boost-tuple, boost-algorithm, boost-logic diff --git a/ports/wt/portfile.cmake b/ports/wt/portfile.cmake index b3081b8a3..b33e9110b 100644 --- a/ports/wt/portfile.cmake +++ b/ports/wt/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO emweb/wt - REF 4.0.2 - SHA512 85e35374bec662c314b20d0699656895364386ee2e51ca99d131702f02ea5a4defeb357fdda3cf068049f077daaa7a3af1dc3d239fb73b3cf13b574778e5609c + REF 4.0.3 + SHA512 5985f72cbd3065ac696aad4d11711f2d69e066ee17141b56fd7c2616c7f7353586ab8d13db2baa90fa8f3cb116aa7c9044ee3cc42e99e8f5c8704f886ac3b2b6 HEAD_REF master ) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index de0a3635f..b74483695 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-04-05-1 +Version: 2018-04-17 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 23bace766..a907be9af 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF bb4fb32925c6465fd0f8e8cc89e5347bc79bc4bf - SHA512 73101b68d93fdf1eca1f83373fe4c946865978d32ca11692e9015a63af8d42ff2d2ff93c88c812f75c2d80596c986df59e62f8de3dc1a016ab24f91f518c24eb + REF c971445025535b9f989ab0b78f5ddd1c026f1878 + SHA512 4eb85e207f53de73cf5369c4c3e79d858ee380e1374ebe807dfc6f99782efc2b98984f48a2cce11b9bf22c7934ef3d1a075cb98fb9e90d5f216a4e128d6df212 HEAD_REF master ) -- cgit v1.2.3 From 9b8245e6de769499464a50362151e347c952c395 Mon Sep 17 00:00:00 2001 From: Jacob Zhong Date: Fri, 20 Apr 2018 07:17:35 +0800 Subject: Add package Fast-RTPS and enable modules for python (#2948) * [ros2] Init packages * [fastrtps] Finish porting * Add python acquiring module * [ros2] Setting up environment * [ros2] remove ros2 * [vcpkg-acquire-python] Revert to split PR --- ports/fastrtps/CONTROL | 4 ++++ ports/fastrtps/fix-install.patch | 14 ++++++++++++++ ports/fastrtps/portfile.cmake | 32 ++++++++++++++++++++++++++++++++ ports/vlpp/portfile.cmake | 2 +- 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 ports/fastrtps/CONTROL create mode 100644 ports/fastrtps/fix-install.patch create mode 100644 ports/fastrtps/portfile.cmake diff --git a/ports/fastrtps/CONTROL b/ports/fastrtps/CONTROL new file mode 100644 index 000000000..edbe4b7d4 --- /dev/null +++ b/ports/fastrtps/CONTROL @@ -0,0 +1,4 @@ +Source: fastrtps +Version: 1.5.0 +Description: Eprosima Fast RTPS is a C++ implementation of the RTPS (Real Time Publish Subscribe) protocol, which provides publisher-subscriber communications over unreliable transports such as UDP, as defined and maintained by the Object Management Group (OMG) consortium. +Build-Depends: openssl, asio, tinyxml2 \ No newline at end of file diff --git a/ports/fastrtps/fix-install.patch b/ports/fastrtps/fix-install.patch new file mode 100644 index 000000000..4777ae3ee --- /dev/null +++ b/ports/fastrtps/fix-install.patch @@ -0,0 +1,14 @@ +diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt +index a1e91fd..f5578cd 100644 +--- a/src/cpp/CMakeLists.txt ++++ b/src/cpp/CMakeLists.txt +@@ -416,7 +416,8 @@ if(MSVC OR MSVC_IDE) + PATTERN "*.pdb" + ) + +- if(NOT (("${MSVC_ARCH}" STREQUAL "i86Win32VS2013") OR ("${MSVC_ARCH}" STREQUAL "x64Win64VS2013"))) ++ if(NOT (("${MSVC_ARCH}" STREQUAL "i86Win32VS2013") OR ("${MSVC_ARCH}" STREQUAL "x64Win64VS2013") ++ OR ("${MSVC_ARCH}" STREQUAL "i86Win32VS2015") OR ("${MSVC_ARCH}" STREQUAL "x64Win64VS2015"))) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_static.dir/Debug/${PROJECT_NAME}_static.pdb + DESTINATION ${LIB_INSTALL_DIR}${DIR_EXTENSION} + COMPONENT libraries_${MSVC_ARCH} diff --git a/ports/fastrtps/portfile.cmake b/ports/fastrtps/portfile.cmake new file mode 100644 index 000000000..855d9f8b5 --- /dev/null +++ b/ports/fastrtps/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eProsima/Fast-RTPS + REF b1779b608c7b5b2dcb101728f4213c58bdde74ee # waiting for next release + SHA512 9ec4a1e41296df1c0bc00926d925e0947602fabb68e9b28311e92739b0e1909a2993b15fc05eb31aeb9842ed50127f8d56571d09e57dd64ac6f37d0fed6cea73 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-install.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) +file(COPY ${CURRENT_PACKAGES_DIR}/lib/fastrtps DESTINATION ${CURRENT_PACKAGES_DIR}/share) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/examples) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/examples) + +file(RENAME ${CURRENT_PACKAGES_DIR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/fastrtps/copyright) diff --git a/ports/vlpp/portfile.cmake b/ports/vlpp/portfile.cmake index 1b7ec027a..1ee003ffb 100644 --- a/ports/vlpp/portfile.cmake +++ b/ports/vlpp/portfile.cmake @@ -22,7 +22,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGE_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Tools file(INSTALL ${SOURCE_PATH}/Tools/CppMerge.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) -- cgit v1.2.3 From 90a50a950283aebb9a0b0a9ecef7f9fcae0dd256 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Apr 2018 15:04:00 -0700 Subject: [azure-iot-sdk] Upgrades --- ports/azure-c-shared-utility/CONTROL | 2 +- ports/azure-c-shared-utility/portfile.cmake | 4 +-- ports/azure-iot-sdk-c/CONTROL | 2 +- .../azure-iot-sdk-c/improve-external-deps-2.patch | 20 +++++++++++ ports/azure-iot-sdk-c/improve-external-deps.patch | 42 ---------------------- ports/azure-iot-sdk-c/portfile.cmake | 5 +-- ports/azure-uamqp-c/CONTROL | 2 +- ports/azure-uamqp-c/portfile.cmake | 4 +-- ports/azure-umqtt-c/CONTROL | 2 +- ports/azure-umqtt-c/portfile.cmake | 4 +-- 10 files changed, 33 insertions(+), 54 deletions(-) create mode 100644 ports/azure-iot-sdk-c/improve-external-deps-2.patch diff --git a/ports/azure-c-shared-utility/CONTROL b/ports/azure-c-shared-utility/CONTROL index 97d0a9a64..08fecee67 100644 --- a/ports/azure-c-shared-utility/CONTROL +++ b/ports/azure-c-shared-utility/CONTROL @@ -1,3 +1,3 @@ Source: azure-c-shared-utility -Version: 1.1.2 +Version: 1.1.3 Description: Azure C SDKs common code diff --git a/ports/azure-c-shared-utility/portfile.cmake b/ports/azure-c-shared-utility/portfile.cmake index 6aea93dad..6b706aae3 100644 --- a/ports/azure-c-shared-utility/portfile.cmake +++ b/ports/azure-c-shared-utility/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-c-shared-utility - REF 1.1.2 - SHA512 23c576efe0cc6c4a47d356f1e0be9e23d2b4e22692d35efa7d0d627a05fad245c55a81d26e60e1f7f7676d547a0e28c357846d2854b31f3f6ae7c39a934cf3d4 + REF 1.1.3 + SHA512 8c69f39ccca30d11a7e665a46e3ec33826af062657a87d32f68e80c6182b15d5e02839f9e541f5dc840219e3256ac090452f4873b6a1a62b3fe6682780314056 HEAD_REF master ) diff --git a/ports/azure-iot-sdk-c/CONTROL b/ports/azure-iot-sdk-c/CONTROL index 72ecadfca..a706b195c 100644 --- a/ports/azure-iot-sdk-c/CONTROL +++ b/ports/azure-iot-sdk-c/CONTROL @@ -1,4 +1,4 @@ Source: azure-iot-sdk-c -Version: 1.2.2 +Version: 1.2.3 Build-Depends: azure-uamqp-c, azure-umqtt-c, azure-c-shared-utility, parson Description: A C99 SDK for connecting devices to Microsoft Azure IoT services diff --git a/ports/azure-iot-sdk-c/improve-external-deps-2.patch b/ports/azure-iot-sdk-c/improve-external-deps-2.patch new file mode 100644 index 000000000..04795fa1f --- /dev/null +++ b/ports/azure-iot-sdk-c/improve-external-deps-2.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aa2dfad..f1656ea 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -129,15 +129,6 @@ endif() + #Use solution folders. + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +-# build the parson library for json parsing +-add_library(parson +- ./deps/parson/parson.c +- ./deps/parson/parson.h +-) +-if(MSVC) +- set_source_files_properties(../deps/parson/parson.c PROPERTIES COMPILE_FLAGS "/wd4244 /wd4232") +-endif() +- + if(IN_OPENWRT) + ADD_DEFINITIONS("$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}") + INCLUDE_DIRECTORIES("$ENV{TOOLCHAIN_DIR}/usr/include" "$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}") diff --git a/ports/azure-iot-sdk-c/improve-external-deps.patch b/ports/azure-iot-sdk-c/improve-external-deps.patch index 5af7ef29e..d96e0fe38 100644 --- a/ports/azure-iot-sdk-c/improve-external-deps.patch +++ b/ports/azure-iot-sdk-c/improve-external-deps.patch @@ -26,33 +26,6 @@ index 063733a..71bfc7d 100644 else() add_subdirectory(c-utility) -diff --git a/iothub_client/CMakeLists.txt b/iothub_client/CMakeLists.txt -index e6d000a..70ade26 100644 ---- a/iothub_client/CMakeLists.txt -+++ b/iothub_client/CMakeLists.txt -@@ -24,22 +24,6 @@ set(install_staticlibs - iothub_client - ) - --add_library(parson -- ../deps/parson/parson.c --) -- --if(MSVC) -- set_source_files_properties(../deps/parson/parson.c PROPERTIES COMPILE_FLAGS "/wd4244 /wd4232") --endif() -- --set(install_staticlibs ${install_staticlibs} -- parson --) -- --set(iothub_client_libs ${iothub_client_libs} -- parson --) -- - if(NOT dont_use_uploadtoblob) - set(iothub_client_ll_transport_c_files - ${iothub_client_ll_transport_c_files} diff --git a/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt b/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt index 161872a..d53e111 100644 --- a/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt @@ -119,18 +92,3 @@ index 11a9a9a..4097293 100644 endif() if (NOT ${ARCHITECTURE} STREQUAL "ARM") -diff --git a/serializer/CMakeLists.txt b/serializer/CMakeLists.txt -index 0f6dc74..b4f784c 100644 ---- a/serializer/CMakeLists.txt -+++ b/serializer/CMakeLists.txt -@@ -87,10 +87,6 @@ else() - endif() - setSdkTargetBuildProperties(serializer) - --target_link_libraries(serializer -- parson --) -- - if (NOT ${skip_samples}) - if(WIN32) - if (NOT ${ARCHITECTURE} STREQUAL "ARM") diff --git a/ports/azure-iot-sdk-c/portfile.cmake b/ports/azure-iot-sdk-c/portfile.cmake index a1e864ab2..0abffcb0f 100644 --- a/ports/azure-iot-sdk-c/portfile.cmake +++ b/ports/azure-iot-sdk-c/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-iot-sdk-c - REF 1.2.2 - SHA512 1542f8347e5efc3104eacf1696b84739299bedb4f50dce3869b3a53072b5c016aadf34223658c18fe28e87eab775a0687b5bf18b5629a7a87b8709b123b3599a + REF 1.2.3 + SHA512 6192d454bb2ecb01989f7636751acd6919021b55b772f4ea25a6d0ddd263e7f988275f7fb0b1c304d4ebd30418c9f870eb1c504a4a504f2faeb712ef8e669d5a HEAD_REF master ) @@ -17,6 +17,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/improve-external-deps.patch + ${CMAKE_CURRENT_LIST_DIR}/improve-external-deps-2.patch ) file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/) diff --git a/ports/azure-uamqp-c/CONTROL b/ports/azure-uamqp-c/CONTROL index 832675f10..098209ac9 100644 --- a/ports/azure-uamqp-c/CONTROL +++ b/ports/azure-uamqp-c/CONTROL @@ -1,4 +1,4 @@ Source: azure-uamqp-c -Version: 1.2.2 +Version: 1.2.3 Build-Depends: azure-c-shared-utility Description: AMQP library for C diff --git a/ports/azure-uamqp-c/portfile.cmake b/ports/azure-uamqp-c/portfile.cmake index e912c30fd..c037010f1 100644 --- a/ports/azure-uamqp-c/portfile.cmake +++ b/ports/azure-uamqp-c/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-uamqp-c - REF 1.2.2 - SHA512 66d4169ecfa1f0bc37c1b61de34908703d1f2d49d5b6edf5aa0c208795117b614a3c0afbba95df3ffc5364f4fd45debe2c95ac7a5be86fbd42d997b4db2aaf9c + REF 1.2.3 + SHA512 18fc978517371fcb19e1c078f07d06b3bf8ec046c5cba955dd3cfe0a364d8775542acc970d81fa42384942ea4db7fb60d8939e80e90baf582c9d9e6ff0b577b5 HEAD_REF master ) diff --git a/ports/azure-umqtt-c/CONTROL b/ports/azure-umqtt-c/CONTROL index d8aff61a8..68cfaaa05 100644 --- a/ports/azure-umqtt-c/CONTROL +++ b/ports/azure-umqtt-c/CONTROL @@ -1,4 +1,4 @@ Source: azure-umqtt-c -Version: 1.1.2 +Version: 1.1.3 Build-Depends: azure-c-shared-utility Description: General purpose library for communication over the mqtt protocol diff --git a/ports/azure-umqtt-c/portfile.cmake b/ports/azure-umqtt-c/portfile.cmake index b66ab4f2e..f24e087bf 100644 --- a/ports/azure-umqtt-c/portfile.cmake +++ b/ports/azure-umqtt-c/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-umqtt-c - REF 1.1.2 - SHA512 e99b1292d6acdefef43b13cb2ad5b5972ed9e65fb3b2b3eacf06486e88f65fdb1e119fd0cf7dadddb1b1dffaef1aa30edda68fa5dc8aa2b22bcdad2d56e1de63 + REF 1.1.3 + SHA512 5c57fe40dce8166e1e138db45b642152a337dbbbc4d85998ac99b016627c0135b99bd7b189d249c6278837ef4af5ba4e4f964a9b65788acef37d7b37ae125b16 HEAD_REF master ) -- cgit v1.2.3 From 4f52f53b99f6a5465157958bc99f79cc0b2712ad Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 19 Apr 2018 16:23:01 -0700 Subject: [folly] Upgrade --- ports/folly/CONTROL | 2 +- ports/folly/find-gflags.patch | 13 +++++++++++++ ports/folly/msvc-15.6-workaround.patch | 25 ------------------------- ports/folly/portfile.cmake | 7 ++++--- 4 files changed, 18 insertions(+), 29 deletions(-) create mode 100644 ports/folly/find-gflags.patch delete mode 100644 ports/folly/msvc-15.6-workaround.patch diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 865c93ce6..13f732525 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,5 +1,5 @@ Source: folly -Version: 2018.04.09.00 +Version: 2018.04.16.00 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 Default-Features: zlib diff --git a/ports/folly/find-gflags.patch b/ports/folly/find-gflags.patch new file mode 100644 index 000000000..986dd6d57 --- /dev/null +++ b/ports/folly/find-gflags.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake +index 396fa6c..9d80d99 100644 +--- a/CMake/folly-deps.cmake ++++ b/CMake/folly-deps.cmake +@@ -22,7 +22,7 @@ list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) + list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) + + set(FOLLY_HAVE_LIBGFLAGS OFF) +-find_package(GFlags CONFIG QUIET) ++find_package(gflags CONFIG REQUIRED) + if (gflags_FOUND) + message(STATUS "Found gflags from package config") + set(FOLLY_HAVE_LIBGFLAGS ON) diff --git a/ports/folly/msvc-15.6-workaround.patch b/ports/folly/msvc-15.6-workaround.patch deleted file mode 100644 index 6102f32ac..000000000 --- a/ports/folly/msvc-15.6-workaround.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/folly/FBString.h b/folly/FBString.h -index 4882aac..6c83046 100644 ---- a/folly/FBString.h -+++ b/folly/FBString.h -@@ -1890,12 +1890,14 @@ inline basic_fbstring& basic_fbstring::operator=( - - template - template --inline typename std::enable_if< -- std::is_same< -- typename std::decay::type, -- typename basic_fbstring::value_type>::value, -- basic_fbstring&>::type --basic_fbstring::operator=(TP c) { -+inline auto -+basic_fbstring::operator=(TP c) -+ -> typename std::enable_if< -+ std::is_same< -+ typename std::decay::type, -+ typename basic_fbstring::value_type>::value, -+ basic_fbstring&>::type -+{ - Invariant checker(*this); - - if (empty()) { diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 520ab0539..fabfd0085 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -17,15 +17,15 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2018.04.09.00 - SHA512 625034437ee6c261949652dbd6cafb50b0954b691750e4591cd0eb03cf369348cfae3b4b98c012bd906a157b7642ebcb1d8843311c74416ed51bffc5b1da3018 + REF v2018.04.16.00 + SHA512 1f14da6eece3a490bd134a40550c2a3f78356789090e19933b8f10bc356837ee774a21e6f0b88c45831a968587049092b9d0d77617f040ab8e177de224400408 HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/msvc-15.6-workaround.patch + ${CMAKE_CURRENT_LIST_DIR}/find-gflags.patch ) file(COPY @@ -33,6 +33,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindSnappy.cmake DESTINATION ${SOURCE_PATH}/CMake/ ) +file(REMOVE ${SOURCE_PATH}/CMake/FindGFlags.cmake) if(VCPKG_CRT_LINKAGE STREQUAL static) set(MSVC_USE_STATIC_RUNTIME ON) -- cgit v1.2.3 From cad078b6341e4be4fa292aa751104afacab68b45 Mon Sep 17 00:00:00 2001 From: Vitaliy Didik Date: Fri, 20 Apr 2018 12:26:37 +0300 Subject: Updated rhash to 1.3.6. --- ports/rhash/CONTROL | 2 +- ports/rhash/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/rhash/CONTROL b/ports/rhash/CONTROL index 16b50c945..14b8768d4 100644 --- a/ports/rhash/CONTROL +++ b/ports/rhash/CONTROL @@ -1,3 +1,3 @@ Source: rhash -Version: 1.3.5-1 +Version: 1.3.6 Description: C library for computing a wide variety of hash sums diff --git a/ports/rhash/portfile.cmake b/ports/rhash/portfile.cmake index 749501375..cc1188c38 100644 --- a/ports/rhash/portfile.cmake +++ b/ports/rhash/portfile.cmake @@ -6,8 +6,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rhash/RHash - REF v1.3.5 - SHA512 e8450aab0c16bfb975bf4aeee218740fb4d86d5514e426b70c3edb84e4d63865cd4051939aa95c24a87a78baaedc49e40bb509b2610e89ca3745930808b3ef6c + REF v1.3.6 + SHA512 54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6 HEAD_REF master) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/librhash) -- cgit v1.2.3 From df1eaafc1b9de5730f8f639bd140108693cf64f3 Mon Sep 17 00:00:00 2001 From: Wimok Nupphiboon Date: Sun, 22 Apr 2018 20:38:55 +0700 Subject: [uwebsockets] Update to 0.14.8 --- ports/uwebsockets/CONTROL | 2 +- ports/uwebsockets/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index 7e636ba9c..3871e8691 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets -Version: 0.14.7-1 +Version: 0.14.8-1 Build-Depends: libuv, openssl, zlib Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js diff --git a/ports/uwebsockets/portfile.cmake b/ports/uwebsockets/portfile.cmake index a24f49631..f9d6c43a1 100644 --- a/ports/uwebsockets/portfile.cmake +++ b/ports/uwebsockets/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO uWebSockets/uWebSockets - REF v0.14.7 - SHA512 1049497f7b63770dcfdc44bef562ce43b87fa553e8ec778c8ee2506f406a23f5fdcf67904f0458e38fc0843899b43b92ccef5f36cae40228cfe47b6f38fa0e15 + REF v0.14.8 + SHA512 5e78e2f10e95648ad1e7f26612f69da3bbdcdb3f17c99e3bb9775e3eb440a2741f05375dcc043b43f0f2d4de6da54e7534431c5c10c1350103a4379b55cf9081 HEAD_REF master ) -- cgit v1.2.3 From d2f69445b6394f197f986d1b6945e7960fd10b22 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Apr 2018 16:21:36 -0700 Subject: Retry the wsl workaround up to 10 times --- scripts/cmake/vcpkg_build_cmake.cmake | 42 ++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 41415d9a8..983ac9221 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -131,25 +131,31 @@ function(vcpkg_build_cmake) OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) if (UNAME_R MATCHES "Microsoft") - message(STATUS "Restarting Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} because of (potential) wsl subsystem issue.") - execute_process( - COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} - OUTPUT_FILE "${LOGPREFIX}-out-1.log" - ERROR_FILE "${LOGPREFIX}-err-1.log" - RESULT_VARIABLE error_code - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) - - if(error_code) - file(READ "${LOGPREFIX}-out-1.log" out_contents) - file(READ "${LOGPREFIX}-err-1.log" err_contents) - - if(out_contents) - list(APPEND LOGS "${LOGPREFIX}-out-1.log") + set(ITERATION 0) + while (ITERATION LESS 10 AND out_contents MATCHES ": No such file or directory") + MATH(EXPR ITERATION "${ITERATION}+1") + message(STATUS "Restarting Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} because of wsl subsystem issue. Iteration: ${ITERATION}") + execute_process( + COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} + OUTPUT_FILE "${LOGPREFIX}-out-${ITERATION}.log" + ERROR_FILE "${LOGPREFIX}-err-${ITERATION}.log" + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) + + if(error_code) + file(READ "${LOGPREFIX}-out-${ITERATION}.log" out_contents) + file(READ "${LOGPREFIX}-err-${ITERATION}.log" err_contents) + + if(out_contents) + list(APPEND LOGS "${LOGPREFIX}-out-${ITERATION}.log") + endif() + if(err_contents) + list(APPEND LOGS "${LOGPREFIX}-err-${ITERATION}.log") + endif() + else() + break() endif() - if(err_contents) - list(APPEND LOGS "${LOGPREFIX}-err-1.log") - endif() - endif() + endwhile() endif() endif() -- cgit v1.2.3 From c400cea91de1ba91183a0097b2d179d71067727d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 17 Apr 2018 16:22:44 -0700 Subject: [openssl] Add -ldl to the link line when appropriate --- ports/openssl/CONTROL | 2 +- ports/openssl/portfile-nonwindows.cmake | 4 ++++ ports/openssl/vcpkg-cmake-wrapper.cmake | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 ports/openssl/vcpkg-cmake-wrapper.cmake diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index d5ac7c890..fe7ea5c01 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2o-1 +Version: 1.0.2o-2 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/portfile-nonwindows.cmake b/ports/openssl/portfile-nonwindows.cmake index 3a4f69710..c324b132a 100644 --- a/ports/openssl/portfile-nonwindows.cmake +++ b/ports/openssl/portfile-nonwindows.cmake @@ -31,3 +31,7 @@ endforeach() file(INSTALL ${RESOLVED_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/openssl) file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl) +endif() diff --git a/ports/openssl/vcpkg-cmake-wrapper.cmake b/ports/openssl/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..1e0500055 --- /dev/null +++ b/ports/openssl/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,7 @@ +_find_package(${ARGS}) +if(OPENSSL_FOUND) + list(APPEND OPENSSL_LIBRARIES "dl") + if(TARGET OpenSSL::Crypto) + set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl") + endif() +endif() -- cgit v1.2.3 From 14708a09a9ade27dce3329ee8453a8a2724f94b6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 18 Apr 2018 16:32:10 -0700 Subject: [grpc] Fix build for linux Fix --- ports/grpc/CONTROL | 2 +- ports/grpc/disable-csharp-ext-2.patch | 20 ++++++++++++++++++++ ports/grpc/portfile.cmake | 9 +++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 ports/grpc/disable-csharp-ext-2.patch diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 088d9336e..6f8f18467 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.10.1 +Version: 1.10.1-1 Build-Depends: zlib, openssl, protobuf, c-ares Description: An RPC library and framework diff --git a/ports/grpc/disable-csharp-ext-2.patch b/ports/grpc/disable-csharp-ext-2.patch new file mode 100644 index 000000000..1bc863105 --- /dev/null +++ b/ports/grpc/disable-csharp-ext-2.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0dc0bd3..7f702cc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4699,6 +4699,7 @@ endif (gRPC_BUILD_TESTS) + + option(gRPC_INSTALL_CSHARP_EXT "" ON) + ++if(gRPC_INSTALL_CSHARP_EXT) + add_library(grpc_csharp_ext SHARED + src/csharp/ext/grpc_csharp_ext.c + ) +@@ -4741,6 +4742,7 @@ if (gRPC_INSTALL AND gRPC_INSTALL_CSHARP_EXT) + ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} + ) + endif() ++endif() + + if (gRPC_BUILD_TESTS) + diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index f68f67e64..54f294896 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -22,6 +22,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext.patch + ${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext-2.patch ) if(VCPKG_CRT_LINKAGE STREQUAL static) @@ -66,8 +67,12 @@ if(TOOLS) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/grpc) endif() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) # Leave the executable files in bin/ and debug/bin +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() -- cgit v1.2.3 From d84e86a910126e91c781af63e33e3516aa171f2a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 18 Apr 2018 18:13:11 -0700 Subject: Fix grpc lookup (case-insensitive) --- scripts/buildsystems/vcpkg.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index a9f8190f7..91c196fb9 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -241,6 +241,8 @@ macro(find_package name) "optimized" "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/nghttp2.lib") endif() endif() + elseif("${_vcpkg_lowercase_name}" STREQUAL "grpc" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/grpc") + _find_package(gRPC ${ARGN}) else() _find_package(${ARGV}) endif() -- cgit v1.2.3 From 825c22de5803db64bf2b82cbe734c26c450b1789 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 20 Apr 2018 15:31:26 -0700 Subject: [protobuf] Fix protoc permissions --- ports/protobuf/CONTROL | 2 +- ports/protobuf/portfile.cmake | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 12e508f6d..ba20ec0c9 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.5.1-2 +Version: 3.5.1-3 Description: Protocol Buffers - Google's data interchange format Feature: zlib diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 765b52a1d..a6875edb9 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -116,7 +116,8 @@ if(CMAKE_HOST_WIN32) endif() else() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) - file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/protoc DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/protoc DESTINATION ${CURRENT_PACKAGES_DIR}/tools + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ) protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin) endif() -- cgit v1.2.3 From aff1819c796fab3e04b9dc1a4b850ef9358ed9a4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 23 Apr 2018 18:55:52 -0700 Subject: Update CHANGELOG and bump version to v0.0.109 --- CHANGELOG.md | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 77 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cc88e2c2..24f6df0b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,79 @@ +vcpkg (0.0.109) +-------------- + * Add ports: + - boost-container-hash 1.67.0 + - boost-contract 1.67.0 + - boost-hof 1.67.0 + - fastrtps 1.5.0 + - fluidsynth 1.1.10 + - liblinear 2.20 + - libxmlpp 2.40.1-1 + - utf8h 841cb2deb8eb806e73fff0e1f43a11fca4f5da45 + - vxl 20180414-7a130cf-1 + * Update ports: + - abseil 2018-04-05 -> 2018-04-12 + - aws-sdk-cpp 1.4.30-1 -> 1.4.33 + - azure-c-shared-utility 1.1.2 -> 1.1.3 + - azure-iot-sdk-c 1.2.2 -> 1.2.3 + - azure-uamqp-c 1.2.2 -> 1.2.3 + - azure-umqtt-c 1.1.2 -> 1.1.3 + - benchmark 1.3.0-1 -> 1.4.0 + - boost 1.66.0 -> 1.67.0 + - boost-* 1.66.0 -> 1.67.0 + - breakpad 2018-04-05 -> 2018-04-17 + - cartographer 0.3.0-3 -> 0.3.0-4 + - catch2 2.2.1-1 -> 2.2.2 + - celero 2.1.0-1 -> 2.1.0-2 + - chakracore 1.8.2 -> 1.8.3 + - cimg 221 -> 2.2.2 + - cppzmq 4.2.2 -> 4.2.2-1 + - date 2.4 -> 2.4.1 + - directxmesh feb2018 -> feb2018-eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9 + - exiv2 2018-04-05 -> 2018-04-12 + - folly 2018.03.19.00-2 -> 2018.04.16.00 + - forest 7.0.1 -> 7.0.6 + - gettext 0.19-2 -> 0.19-4 + - glib 2.52.3-2 -> 2.52.3-9 + - glibmm 2.52.1 -> 2.52.1-7 + - graphicsmagick 1.3.26-2 -> 1.3.28 + - grpc 1.10.1 -> 1.10.1-1 + - icu 59.1-1 -> 61.1-1 + - jsonnet 2018-03-17 -> 2018-04-17 + - libiconv 1.15-3 -> 1.15-4 + - libsigcpp 2.10 -> 2.10-1 + - libtorrent 1.1.6 -> 1.1.6-1 + - libuuid 1.0.3 -> 1.0.3-1 + - libzip rel-1-5-0 -> rel-1-5-1 + - llvm 5.0.1 -> 6.0.0 + - magnum 2018.02-1 -> 2018.02-2 + - magnum-plugins 2018.02-1 -> 2018.02-2 + - nuklear 2018-04-05 -> 2018-04-17 + - openssl 1.0.2o-1 -> 1.0.2o-2 + - openvr 1.0.13 -> 1.0.14 + - parson 2018-03-23 -> 2018-04-17 + - protobuf 3.5.1-1 -> 3.5.1-3 + - pugixml 1.8.1-3 -> 1.9-1 + - realsense2 2.10.1 -> 2.10.1-1 + - rs-core-lib 2018-04-05 -> 2018-04-12 + - sol 2.18.7 -> 2.19.5 + - sqlite3 3.21.0-1 -> 3.23.0 + - thrift 2018-04-05 -> 2018-04-17 + - tinyxml2 6.0.0-2 -> 6.2.0 + - unicorn-lib 2018-03-13 -> 2018-04-09 + - uwebsockets 0.14.6-1 -> 0.14.7-1 + - wt 4.0.2 -> 4.0.3 + - x264 152-e9a5903edf8ca59 -> 152-e9a5903edf8ca59-1 + - yoga 1.7.0-1 -> 1.8.0-1 + - zeromq 2018-04-05 -> 2018-04-17 + * Bump required version & auto-downloaded version of `nuget` to 4.6.2 + * Bump required version & auto-downloaded version of `vswhere` to 2.4.1 + * `vcpkg edit` improvements + - '--all' now will open both the buildtrees dir and the package dir + - Allow multiple ports to be specified as arguments + +-- vcpkg team MON, 23 Apr 2018 19:00:00 -0800 + + vcpkg (0.0.108) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 2cd1bf9ac..f8e183aed 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.108" \ No newline at end of file +"0.0.109" \ No newline at end of file -- cgit v1.2.3 From a11086e3b9d560d3b73de91175c57db658e39809 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 27 Mar 2018 03:03:26 -0700 Subject: Introduce bootstrap.sh --- bootstrap-vcpkg.sh | 2 + scripts/bootstrap.sh | 188 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 190 insertions(+) create mode 100644 bootstrap-vcpkg.sh create mode 100644 scripts/bootstrap.sh diff --git a/bootstrap-vcpkg.sh b/bootstrap-vcpkg.sh new file mode 100644 index 000000000..4bfb17308 --- /dev/null +++ b/bootstrap-vcpkg.sh @@ -0,0 +1,2 @@ +vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) +$vcpkgRootDir/scripts/bootstrap.sh \ No newline at end of file diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh new file mode 100644 index 000000000..66efb1d62 --- /dev/null +++ b/scripts/bootstrap.sh @@ -0,0 +1,188 @@ +#!/bin/sh + +# Find vcpkg-root +vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) +while [ "$vcpkgRootDir" != "/" ] && ! [ -e "$vcpkgRootDir/.vcpkg-root" ]; do + vcpkgRootDir="$(dirname "$vcpkgRootDir")" +done + +downloadsDir="$vcpkgRootDir/downloads" + +extractStringBetweenDelimiters() +{ + input=$1;leftDelim=$2;rightDelim=$3 + output="${input##*$leftDelim}" + output="${output%%$rightDelim*}" + echo "$output" +} + +vcpkgCheckRepoTool() +{ + __tool=$1 + if ! command -v "$__tool" >/dev/null 2>&1 ; then + echo "Could not find $__tool. Please install it (and other dependencies) with:" + echo "sudo apt-get install curl unzip tar" + exit 1 + fi +} + +vcpkgCheckEqualFileHash() +{ + url=$1; filePath=$2; expectedHash=$3 + + actualHash=$(shasum -a 512 "$filePath") # sha512sum not available on osx + actualHash="${actualHash%% *}" # shasum returns [hash filename], so get the first word + + if ! [ "$expectedHash" = "$actualHash" ]; then + echo "" + echo "File does not have expected hash:" + echo " url: [ $url ]" + echo " File path: [ $downloadPath ]" + echo " Expected hash: [ $sha512 ]" + echo " Actual hash: [ $actualHash ]" + exit + fi +} + +vcpkgDownloadFile() +{ + url=$1; downloadPath=$2 sha512=$3 + vcpkgCheckRepoTool "curl" + rm -rf "$downloadPath.part" + curl -L $url --create-dirs --output "$downloadPath.part" || exit 1 + + vcpkgCheckEqualFileHash $url "$downloadPath.part" $sha512 + mv "$downloadPath.part" "$downloadPath" +} + +vcpkgExtractArchive() +{ + archive=$1; toPath=$2 + rm -rf "$toPath" "$toPath.partial" + mkdir -p "$toPath.partial" + + archiveType="${archive##*.}" + if [ "$archiveType" = "zip" ]; then + vcpkgCheckRepoTool "unzip" + $(cd "$toPath.partial" && unzip -qqo "$archive") + else + vcpkgCheckRepoTool "tar" + $(cd "$toPath.partial" && tar xzf "$archive") + fi + mv "$toPath.partial" "$toPath" +} + +fetchTool() +{ + tool=$1; UNAME=$2; __output=$3 + + if [ "$tool" = "" ]; then + echo "No tool name provided" + return 1 + fi + + if [ "$UNAME" = "Linux" ]; then + os="linux" + elif [ "$UNAME" = "Darwin" ]; then + os="osx" + else + echo "Unknown uname: $UNAME" + return 1 + fi + + xmlFileAsString=`cat $vcpkgRootDir/scripts/vcpkgTools.xml` + toolRegexStart="" + toolData="$(extractStringBetweenDelimiters "$xmlFileAsString" "$toolRegexStart" "")" + if [ "$toolData" = "" ]; then + echo "Unknown tool: $tool" + return 1 + fi + + version="$(extractStringBetweenDelimiters "$toolData" "" "")" + + toolPath="$downloadsDir/tools/$tool-$version-$os" + + exeRelativePath="$(extractStringBetweenDelimiters "$toolData" "" "")" + exePath="$toolPath/$exeRelativePath" + + if [ -e "$exePath" ]; then + eval $__output="'$exePath'" + return 0 + fi + + isArchive=true + if [ $isArchive = true ]; then + archiveName="$(extractStringBetweenDelimiters "$toolData" "" "")" + downloadPath="$downloadsDir/$archiveName" + else + echo "Non-archives not supported yet" + return 1 + fi + + url="$(extractStringBetweenDelimiters "$toolData" "" "")" + sha512="$(extractStringBetweenDelimiters "$toolData" "" "")" + if ! [ -e "$downloadPath" ]; then + echo "Downloading $tool..." + vcpkgDownloadFile $url "$downloadPath" $sha512 + echo "Downloading $tool... done." + else + vcpkgCheckEqualFileHash $url "$downloadPath" $sha512 + fi + + if [ $isArchive = true ]; then + echo "Extracting $tool..." + vcpkgExtractArchive "$downloadPath" "$toolPath" + echo "Extracting $tool... done." + fi + + if ! [ -e "$exePath" ]; then + echo "Could not detect or download $tool" + return 1 + fi + + eval $__output="'$exePath'" + return 0 +} + +selectCXX() +{ + __output=$1 + + if [ "x$CXX" = "x" ]; then + CXX=g++ + if which g++-7 >/dev/null 2>&1; then + CXX=g++-7 + elif which g++-6 >/dev/null 2>&1; then + CXX=g++-6 + fi + fi + + gccversion="$("$CXX" -v 2>&1)" + gccversion="$(extractStringBetweenDelimiters "$gccversion" "gcc version " ".")" + if [ "$gccversion" = "5" ]; then + echo "CXX ($CXX) is too old; please install a newer compiler such as g++-7." + echo "sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y" + echo "sudo apt-get update -y" + echo "sudo apt-get install g++-7 -y" + return 1 + fi + + eval $__output="'$CXX'" +} + +# Preparation +UNAME="$(uname)" +fetchTool "cmake" "$UNAME" cmakeExe || exit 1 +fetchTool "ninja" "$UNAME" ninjaExe || exit 1 +selectCXX CXX || exit 1 + +# Do the build +buildDir="$vcpkgRootDir/toolsrc/build.rel" +rm -rf "$buildDir" +mkdir -p "$buildDir" + +(cd "$buildDir" && CXX=$CXX "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe") +(cd "$buildDir" && "$cmakeExe" --build .) + +rm -rf "$vcpkgRootDir/vcpkg" +cp "$buildDir/vcpkg" "$vcpkgRootDir/" \ No newline at end of file -- cgit v1.2.3 From f703f60bd0064c3aeb116982812a3745817d30fe Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 23 Apr 2018 19:33:19 -0700 Subject: Add triplets for x64-linux and x64-osx --- .gitignore | 4 +++- triplets/x64-linux.cmake | 5 +++++ triplets/x64-osx.cmake | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 triplets/x64-linux.cmake create mode 100644 triplets/x64-osx.cmake diff --git a/.gitignore b/.gitignore index 18384e3da..d105fd368 100644 --- a/.gitignore +++ b/.gitignore @@ -279,7 +279,7 @@ downloads/ installed*/ packages/ scripts/buildsystems/tmp/ -#ignore custom triplets +#ignore custom triplets triplets/* #add vcpkg-designed triplets back in !triplets/arm-uwp.cmake @@ -292,6 +292,8 @@ triplets/* !triplets/x86-windows-static.cmake !triplets/arm64-uwp.cmake !triplets/arm64-windows.cmake +!triplets/x64-linux.cmake +!triplets/x64-osx.cmake *.exe *.zip diff --git a/triplets/x64-linux.cmake b/triplets/x64-linux.cmake new file mode 100644 index 000000000..519618463 --- /dev/null +++ b/triplets/x64-linux.cmake @@ -0,0 +1,5 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Linux) diff --git a/triplets/x64-osx.cmake b/triplets/x64-osx.cmake new file mode 100644 index 000000000..af3a8c348 --- /dev/null +++ b/triplets/x64-osx.cmake @@ -0,0 +1,5 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Darwin) -- cgit v1.2.3 From cde623c774618d8cebed56e08dd0c0106ce0a951 Mon Sep 17 00:00:00 2001 From: pravic Date: Tue, 24 Apr 2018 07:14:53 +0300 Subject: [sqlite3] update to 3.23.1 --- ports/sqlite3/CONTROL | 2 +- ports/sqlite3/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index a5d76d43b..6dc0714e0 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,5 +1,5 @@ Source: sqlite3 -Version: 3.23.0 +Version: 3.23.1 Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. Feature: tool diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index d016660ab..bd7bcc15c 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -set(SQLITE_VERSION 3230000) -set(SQLITE_HASH bfca2ec16d926c11c9ec052eae41549f1de392582227ca08eb8a01cc36e58ac528c7677fdab253250ba3e0cf6e5cd9d3d0012e5b558be7db91740ac901dae0fe) +set(SQLITE_VERSION 3230100) +set(SQLITE_HASH 5784f4dea7f14d7dcf5dd07f0e111c8f0b64ff55c68b32a23fba7a36baf1f095c7a35573fc3b57b84822878218b78f9b0187c4e3f0439d4215471ee5f556eee1) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite-amalgamation-${SQLITE_VERSION}) vcpkg_download_distfile(ARCHIVE -- cgit v1.2.3 From 90db2c72173c7398122e693d797f82736dabd109 Mon Sep 17 00:00:00 2001 From: pravic Date: Tue, 24 Apr 2018 07:29:17 +0300 Subject: [sqlite3] Fix tool feature with static builds refs #2525 --- ports/sqlite3/CMakeLists.txt | 8 ++++++-- ports/sqlite3/CONTROL | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index 7d6e20dee..b4b105a65 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -9,7 +9,7 @@ else() endif() add_library(sqlite3 sqlite3.c) -target_compile_definitions(sqlite3 PRIVATE +target_compile_definitions(sqlite3 PRIVATE $<$:SQLITE_DEBUG> ${API} -DSQLITE_ENABLE_RTREE @@ -25,7 +25,11 @@ 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) + install(TARGETS sqlite3-bin sqlite3 + RUNTIME DESTINATION tools + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) endif() install(TARGETS sqlite3 EXPORT sqlite3Config diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index 6dc0714e0..74d70909b 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,5 +1,5 @@ Source: sqlite3 -Version: 3.23.1 +Version: 3.23.1-1 Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. Feature: tool -- cgit v1.2.3 From 810f79302bcfb31cc5541d2c06f9c6be9d7cc9c5 Mon Sep 17 00:00:00 2001 From: pravic Date: Tue, 24 Apr 2018 07:37:05 +0300 Subject: [sciter] Update to 4.1.6.5883 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index b2f19fdf0..5e573c899 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.1.5 +Version: 4.1.6 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 7aeb87eee..7a10297b2 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,8 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION 331bf886a39c1a003f61bb0c1a75037ec4c1e9e4) -set(SCITER_SHA b05b7c694fb75a3308a2684ad78587453d70d41dc0609dfec0a40b465bb8982c79867a63a898a09ed54f6fc516d0b014942824da7a642682b86710ffb23c7366) +set(SCITER_REVISION 1f6f9afc6bf3c4f60ea510fc75f89634f282d15d) +set(SCITER_SHA 53be8007c22349e9801c413483d70cad437bc3399686f2c503da9b7aa96bf212e7563b13fff8e62942b0991fa775e87e542b5ff9c3dbc4aff1fd5291200b2c8e) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From 95f0756826e4ac10edbdfb56a9e1c60681263569 Mon Sep 17 00:00:00 2001 From: Jennifer Zhao Date: Tue, 24 Apr 2018 02:30:04 -0700 Subject: Fix Clblas --- ports/clblas/portfile.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/clblas/portfile.cmake b/ports/clblas/portfile.cmake index b18377cdf..98ea1e515 100644 --- a/ports/clblas/portfile.cmake +++ b/ports/clblas/portfile.cmake @@ -32,7 +32,9 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL -- cgit v1.2.3 From 290907f9059bac92dd59d8bbceef6a3ef728a0ae Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Tue, 24 Apr 2018 23:04:09 +0900 Subject: [realsense2] Update to v2.10.4 Update realsense2 port to librealsense v2.10.4. --- ports/realsense2/CONTROL | 5 +-- ports/realsense2/build_with_static_crt.patch | 67 ---------------------------- ports/realsense2/fix_rgb_using_avx2.patch | 12 ----- ports/realsense2/portfile.cmake | 27 +++-------- 4 files changed, 7 insertions(+), 104 deletions(-) delete mode 100644 ports/realsense2/build_with_static_crt.patch delete mode 100644 ports/realsense2/fix_rgb_using_avx2.patch diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index 2465fd1a4..f87152bc6 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,10 +1,7 @@ Source: realsense2 -Version: 2.10.1-1 +Version: 2.10.4 Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). -Feature: avx2 -Description: rgb image decode using avx2 - Feature: tools Build-Depends: opengl Description: Build Intel® RealSense™ examples and tools diff --git a/ports/realsense2/build_with_static_crt.patch b/ports/realsense2/build_with_static_crt.patch deleted file mode 100644 index ab8ec426d..000000000 --- a/ports/realsense2/build_with_static_crt.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9425b92d..21232504 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -299,6 +299,8 @@ if(BUILD_EASYLOGGINGPP) - list(APPEND REALSENSE_HPP third-party/easyloggingpp/src/easylogging++.h) - endif() - -+option(BUILD_WITH_STATIC_CRT "Build with static link CRT" ON) -+ - if(WIN32) - source_group("Source Files\\Backend" FILES - src/win/win-helpers.cpp -@@ -484,15 +486,17 @@ if(WIN32) - src/proc/disparity-transform.h - ) - -- foreach(flag_var -- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE -- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO -- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE -- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) -- if(${flag_var} MATCHES "/MD") -- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") -- endif(${flag_var} MATCHES "/MD") -- endforeach(flag_var) -+ if(BUILD_WITH_STATIC_CRT) -+ foreach(flag_var -+ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE -+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO -+ CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE -+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) -+ if(${flag_var} MATCHES "/MD") -+ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") -+ endif(${flag_var} MATCHES "/MD") -+ endforeach(flag_var) -+ endif() - else() - - endif() -@@ -652,15 +656,17 @@ if (BUILD_WITH_TM2) - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake) - find_package(libtm REQUIRED) - -- foreach(flag_var -- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE -- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO -- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE -- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) -- if(${flag_var} MATCHES "/MD") -- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") -- endif(${flag_var} MATCHES "/MD") -- endforeach(flag_var) -+ if(BUILD_WITH_STATIC_CRT) -+ foreach(flag_var -+ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE -+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO -+ CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE -+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) -+ if(${flag_var} MATCHES "/MD") -+ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") -+ endif(${flag_var} MATCHES "/MD") -+ endforeach(flag_var) -+ endif() - - list(APPEND REALSENSE_HPP - src/tm2/tm-context.h diff --git a/ports/realsense2/fix_rgb_using_avx2.patch b/ports/realsense2/fix_rgb_using_avx2.patch deleted file mode 100644 index 38ae33a7c..000000000 --- a/ports/realsense2/fix_rgb_using_avx2.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/image.cpp b/src/image.cpp -index 47cc68d8..04a8afd3 100644 ---- a/src/image.cpp -+++ b/src/image.cpp -@@ -8,6 +8,7 @@ - - #ifdef __SSSE3__ - #include // For SSE3 intrinsic used in unpack_yuy2_sse -+#include - #endif - - #pragma pack(push, 1) // All structs in this file are assumed to be byte-packed diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index 8e6b57392..ed9e88ea2 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -3,28 +3,14 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense - REF v2.10.1 - SHA512 fb00a424a5bd7335cc661261e76cf623e27a89af1033692d4cb6ed523af1295359929c235e82253911e61323cb7b82551a9223862174cb0e2363ac944b2db923 + REF v2.10.4 + SHA512 35580cd4ab65b85eb7fcebac3be629960993223437e3c44b0bcc2f7572d85231e822a922b2f5e22480fcc1edb9295ab2c5893794d638c2ab6faf49a9eea57603 HEAD_REF development ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/build_with_static_crt.patch # https://github.com/IntelRealSense/librealsense/pull/1262 - ${CMAKE_CURRENT_LIST_DIR}/fix_rgb_using_avx2.patch # https://github.com/IntelRealSense/librealsense/pull/1245 -) - string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_LIBRARY_LINKAGE) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_CRT_LINKAGE) -# This option will be deprecated in the later versions. -# Please see Pull Request #1245. https://github.com/IntelRealSense/librealsense/pull/1245 -set(RGB_USING_AVX2 OFF) -if("avx2" IN_LIST FEATURES) - set(RGB_USING_AVX2 ON) -endif() - set(BUILD_EXAMPLES OFF) set(BUILD_GRAPHICAL_EXAMPLES OFF) if("tools" IN_LIST FEATURES) @@ -36,18 +22,17 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS + #Ungrouped Entries -DENFORCE_METADATA=ON + # BUILD -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_GRAPHICAL_EXAMPLES=${BUILD_GRAPHICAL_EXAMPLES} - -DBUILD_CV_EXAMPLES=OFF - -DBUILD_PCL_EXAMPLES=OFF - -DBUILD_PYTHON_BINDINGS=OFF + -DBUILD_SHARED_LIBS=${BUILD_LIBRARY_LINKAGE} -DBUILD_UNIT_TESTS=OFF -DBUILD_WITH_OPENMP=OFF - -DBUILD_SHARED_LIBS=${BUILD_LIBRARY_LINKAGE} -DBUILD_WITH_STATIC_CRT=${BUILD_CRT_LINKAGE} - -DRGB_USING_AVX2=${RGB_USING_AVX2} OPTIONS_DEBUG + # CMAKE "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" -DCMAKE_DEBUG_POSTFIX="_d" ) -- cgit v1.2.3 From 27a295aaf25e512192c59197ef3e98b4276402b8 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Tue, 24 Apr 2018 23:07:37 +0900 Subject: [realsense2] Disable Build Tools when Debug Configuration to Speed-Up Install Disable build tools when debug configuration to speed-up vcpkg install. --- ports/realsense2/portfile.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index ed9e88ea2..6a02259ba 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -16,7 +16,6 @@ set(BUILD_GRAPHICAL_EXAMPLES OFF) if("tools" IN_LIST FEATURES) set(BUILD_EXAMPLES ON) set(BUILD_GRAPHICAL_EXAMPLES ON) - set(BUILD_TOOLS ON) endif() vcpkg_configure_cmake( @@ -32,6 +31,9 @@ vcpkg_configure_cmake( -DBUILD_WITH_OPENMP=OFF -DBUILD_WITH_STATIC_CRT=${BUILD_CRT_LINKAGE} OPTIONS_DEBUG + # BUILD + -DBUILD_EXAMPLES=OFF + -DBUILD_GRAPHICAL_EXAMPLES=OFF # CMAKE "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" -DCMAKE_DEBUG_POSTFIX="_d" @@ -44,7 +46,7 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -if(BUILD_TOOLS) +if(BUILD_EXAMPLES) file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/realsense2) -- cgit v1.2.3 From ed9bb364468717b5b1f55980556935fac2f8e8a5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Apr 2018 10:42:38 -0700 Subject: Update CHANGELOG and bump version to v0.0.110 --- CHANGELOG.md | 7 +++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24f6df0b9..8f275866d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +vcpkg (0.0.110) +-------------- + * `vcpkg` is now available for Linux and MacOS. More information [here](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/). + +-- vcpkg team TUE, 24 Apr 2018 10:30:00 -0800 + + vcpkg (0.0.109) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index f8e183aed..ca3fbdad8 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.109" \ No newline at end of file +"0.0.110" \ No newline at end of file -- cgit v1.2.3 From d126acab7bc5789e8f75197c2ac1fda03584caba Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Apr 2018 11:02:57 -0700 Subject: [vcpkg integrate] Do nothing on linux instead of showing error message --- toolsrc/src/vcpkg/commands.integrate.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 7061a3984..2e1750c80 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -392,8 +392,10 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console paths.scripts / "addPoshVcpkgToPowershellProfile.ps1"); Checks::exit_success(VCPKG_LINE_INFO); } -#endif Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown parameter %s for integrate", args.command_arguments[0]); +#else + Checks::exit_success(VCPKG_LINE_INFO); +#endif } } -- cgit v1.2.3 From de4edd0e8c8487158aedbf4d9cd4cd78554127c6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Apr 2018 11:03:47 -0700 Subject: [README] Show cmake instructions in the README instead of only linking to another md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 99075569d..4983508a4 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,8 @@ C:\src\vcpkg> .\vcpkg install sdl2 curl ``` Finally, create a New Project (or open an existing one) in Visual Studio 2017 or 2015. All installed libraries are immediately ready to be `#include`'d and used in your project. -For CMake projects, simply include our toolchain file. See our [using a package](docs/examples/using-sqlite.md) example for the specifics. +The best way to use installed libraries with cmake is via the toolchain file `scripts\buildsystems\vcpkg.cmake`. To use this file, you simply need to add it onto your CMake command line as `-DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake`. +For more information, see our [using a package](docs/examples/using-sqlite.md) example for the specifics. ## Tab-Completion / Auto-Completion `Vcpkg` supports auto-completion of commands, package names, options etc. To enable tab-completion in Powershell, use -- cgit v1.2.3 From f0767d3bd996553636a5cdc6bd2cad8f9aa903b5 Mon Sep 17 00:00:00 2001 From: Claudio Fantacci Date: Tue, 24 Apr 2018 20:09:12 +0200 Subject: Fix PCL compile tools (#3301) Add missing boost definition using a patch. Better compile from HEAD. --- ports/pcl/boost_uuid_random_generator_compat.patch | 13 +++++++++++++ ports/pcl/portfile.cmake | 1 + 2 files changed, 14 insertions(+) create mode 100644 ports/pcl/boost_uuid_random_generator_compat.patch diff --git a/ports/pcl/boost_uuid_random_generator_compat.patch b/ports/pcl/boost_uuid_random_generator_compat.patch new file mode 100644 index 000000000..891890b46 --- /dev/null +++ b/ports/pcl/boost_uuid_random_generator_compat.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0405dca2..00e5238e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -168,6 +168,8 @@ if(CMAKE_COMPILER_IS_MSVC) + endif() + endif() + ++add_definitions(-DBOOST_UUID_RANDOM_GENERATOR_COMPAT) ++ + if(CMAKE_COMPILER_IS_PATHSCALE) + if("${CMAKE_CXX_FLAGS}" STREQUAL "") + SET(CMAKE_CXX_FLAGS "-Wno-uninitialized -zerouv -pthread -mp") diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index 812e05674..12c9ec398 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -18,6 +18,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/find_openni2.patch" "${CMAKE_CURRENT_LIST_DIR}/find_cuda.patch" "${CMAKE_CURRENT_LIST_DIR}/vs2017-15.4-workaround.patch" + "${CMAKE_CURRENT_LIST_DIR}/boost_uuid_random_generator_compat.patch" ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS) -- cgit v1.2.3 From f12ded7fd0ca91fb128ddaf20b933f8457d9c1f3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Apr 2018 22:44:46 +0000 Subject: [sh] Fix permission --- bootstrap-vcpkg.sh | 0 scripts/bootstrap.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bootstrap-vcpkg.sh mode change 100644 => 100755 scripts/bootstrap.sh diff --git a/bootstrap-vcpkg.sh b/bootstrap-vcpkg.sh old mode 100644 new mode 100755 diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh old mode 100644 new mode 100755 -- cgit v1.2.3 From f51b9d403a5a1bb99aa7c13e6b64f398ff423a40 Mon Sep 17 00:00:00 2001 From: Joel Clay Date: Tue, 24 Apr 2018 18:52:32 -0400 Subject: Add crossplatform announcement to docs --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 3fa5784e9..1d12b282e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,7 +25,7 @@ Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are - [Export](specifications/export-command.md) ### Blog posts - +- [Announcing a single C++ library manager for Linux, macOS and Windows: Vcpkg](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/) - [Vcpkg: introducing the export command](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/) - [Binary Compatibility and Pain-free Upgrade Why Moving to Visual Studio 2017 is almost "too easy"](https://blogs.msdn.microsoft.com/vcblog/2017/03/07/binary-compatibility-and-pain-free-upgrade-why-moving-to-visual-studio-2017-is-almost-too-easy/) - [Vcpkg recent enhancements](https://blogs.msdn.microsoft.com/vcblog/2017/02/14/vcpkg-recent-enhancements/) -- cgit v1.2.3 From b5e4c4c7cf68b807e222b09415b678d2f47a3d3b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Apr 2018 16:04:14 -0700 Subject: [find_acquire.cmake] Fix ninja path for mac --- scripts/cmake/vcpkg_find_acquire_program.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 30ecb0573..39a722d93 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -115,6 +115,8 @@ function(vcpkg_find_acquire_program VAR) set(SUBDIR "ninja-1.8.2") if(CMAKE_HOST_WIN32) set(PATHS "${DOWNLOADS}/tools/ninja/${SUBDIR}") + elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-osx") else() set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-linux") endif() -- cgit v1.2.3 From 967765f294f1390a9963e21c2918502e22e64caf Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 24 Apr 2018 22:56:18 -0700 Subject: [osx] Ignore .DS_Store file. Fixes #3306 --- toolsrc/src/vcpkg/paragraphs.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/toolsrc/src/vcpkg/paragraphs.cpp b/toolsrc/src/vcpkg/paragraphs.cpp index 41ffceec7..77c028937 100644 --- a/toolsrc/src/vcpkg/paragraphs.cpp +++ b/toolsrc/src/vcpkg/paragraphs.cpp @@ -253,6 +253,10 @@ namespace vcpkg::Paragraphs LoadResults ret; auto port_dirs = fs.get_files_non_recursive(ports_dir); Util::sort(port_dirs); + Util::erase_remove_if(port_dirs, [&](auto&& port_dir_entry) { + return fs.is_regular_file(port_dir_entry) && port_dir_entry.filename() == ".DS_Store"; + }); + for (auto&& path : port_dirs) { auto maybe_spgh = try_load_port(fs, path); -- cgit v1.2.3 From f6530368eb31734734c0e1e7ce990c0cb93f0b24 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 25 Apr 2018 00:19:27 -0700 Subject: Remove noexcept from BinaryParagraph() --- toolsrc/include/vcpkg/binaryparagraph.h | 2 +- toolsrc/src/vcpkg/binaryparagraph.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/include/vcpkg/binaryparagraph.h b/toolsrc/include/vcpkg/binaryparagraph.h index 5ba2fbde3..3315151c6 100644 --- a/toolsrc/include/vcpkg/binaryparagraph.h +++ b/toolsrc/include/vcpkg/binaryparagraph.h @@ -12,7 +12,7 @@ namespace vcpkg /// struct BinaryParagraph { - BinaryParagraph() noexcept; + BinaryParagraph(); explicit BinaryParagraph(std::unordered_map fields); BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet, const std::string& abi_tag); BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet); diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index 126c7df97..73ca23df1 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -24,7 +24,7 @@ namespace vcpkg static const std::string DEFAULTFEATURES = "Default-Features"; } - BinaryParagraph::BinaryParagraph() noexcept = default; + BinaryParagraph::BinaryParagraph() = default; BinaryParagraph::BinaryParagraph(std::unordered_map fields) { -- cgit v1.2.3 From 77b323a5be7215d7601b217c37ca13ec62ea2c1c Mon Sep 17 00:00:00 2001 From: Jan Niklas Hasse Date: Wed, 25 Apr 2018 09:59:55 +0200 Subject: Add Bash shebang to bootstrap script --- bootstrap-vcpkg.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap-vcpkg.sh b/bootstrap-vcpkg.sh index 4bfb17308..67102ca25 100755 --- a/bootstrap-vcpkg.sh +++ b/bootstrap-vcpkg.sh @@ -1,2 +1,4 @@ +#!/usr/bin/env bash + vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) -$vcpkgRootDir/scripts/bootstrap.sh \ No newline at end of file +$vcpkgRootDir/scripts/bootstrap.sh -- cgit v1.2.3 From 83f3006b4d2361f6411d30f8af2656dae29ed991 Mon Sep 17 00:00:00 2001 From: Afnan Enayet Date: Wed, 25 Apr 2018 12:04:58 -0400 Subject: Update gitignore to exclude the `vcpkg` binary (artifact of the build script) from the git repo --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d105fd368..aa272483c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ +vcpkg # Visual Studio 2015 cache/options directory .vs/ @@ -299,4 +300,4 @@ triplets/* ############################################################ # vcpkg - End -############################################################ \ No newline at end of file +############################################################ -- cgit v1.2.3 From 28082c2e936137dd30ece6ea85c2cfece88f1f9d Mon Sep 17 00:00:00 2001 From: Alexey Gruzdev Date: Wed, 25 Apr 2018 19:46:18 +0100 Subject: [yato] Added yato library package --- ports/yato/CONTROL | 3 +++ ports/yato/portfile.cmake | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 ports/yato/CONTROL create mode 100644 ports/yato/portfile.cmake diff --git a/ports/yato/CONTROL b/ports/yato/CONTROL new file mode 100644 index 000000000..f3793fb80 --- /dev/null +++ b/ports/yato/CONTROL @@ -0,0 +1,3 @@ +Source: yato +Version: 1.0 +Description: Modern C++14 containers and utilities, actors system, typesafe config diff --git a/ports/yato/portfile.cmake b/ports/yato/portfile.cmake new file mode 100644 index 000000000..f688675ba --- /dev/null +++ b/ports/yato/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO alexey_gruzdev/yato + REF v1.0 + SHA512 631b870fd2704a03d9d66ef244f4e50968ae63da4fda0c7cd1f6ce2cea2b1e8b4506b0148cd1af1e133a70fd5d9cdc9d8c054edac6141118ee3c9427e186b270 + HEAD_REF master +) + +# Copy all header files +file(COPY "${SOURCE_PATH}/include/yato" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DYATO_BUILD_TESTS:BOOL=OFF -DYATO_BUILD_ACTORS:BOOL=ON -DYATO_BUILD_CONFIG:BOOL=ON -DYATO_CONFIG_MANUAL:BOOL=ON +) + +vcpkg_build_cmake() + +set(BUILD_ROOT_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +set(BUILD_ROOT_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +file(COPY "${BUILD_ROOT_DEBUG}/modules/actors/Debug/YatoActors.lib" + "${BUILD_ROOT_DEBUG}/modules/config/Debug/YatoConfig.lib" + DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/" +) + +file(COPY "${BUILD_ROOT_RELEASE}/modules/actors/Release/YatoActors.lib" + "${BUILD_ROOT_RELEASE}/modules/config/Release/YatoConfig.lib" + DESTINATION "${CURRENT_PACKAGES_DIR}/lib/" +) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/yato) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/yato/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/yato/copyright) + + + -- cgit v1.2.3 From 237268f29d90c270f9955eb86cc5471bbb47d22a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 25 Apr 2018 13:19:49 -0700 Subject: [sh] Change to #!/bin/sh --- bootstrap-vcpkg.sh | 4 ++++ 1 file changed, 4 insertions(+) mode change 100755 => 100644 bootstrap-vcpkg.sh diff --git a/bootstrap-vcpkg.sh b/bootstrap-vcpkg.sh old mode 100755 new mode 100644 index 67102ca25..7196fbde0 --- a/bootstrap-vcpkg.sh +++ b/bootstrap-vcpkg.sh @@ -1,4 +1,8 @@ +<<<<<<< Updated upstream #!/usr/bin/env bash +======= +#!/bin/sh +>>>>>>> Stashed changes vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) $vcpkgRootDir/scripts/bootstrap.sh -- cgit v1.2.3 From d1b9a8637c84d185dd2c99249bae41864987bf05 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 25 Apr 2018 14:36:31 -0700 Subject: [sh] Remove merge conflict lines --- bootstrap-vcpkg.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bootstrap-vcpkg.sh b/bootstrap-vcpkg.sh index 7196fbde0..92e65dc6c 100644 --- a/bootstrap-vcpkg.sh +++ b/bootstrap-vcpkg.sh @@ -1,8 +1,4 @@ -<<<<<<< Updated upstream -#!/usr/bin/env bash -======= #!/bin/sh ->>>>>>> Stashed changes vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) $vcpkgRootDir/scripts/bootstrap.sh -- cgit v1.2.3 From 56d394e0979d1798f27addb2ad40a412c57eb348 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 25 Apr 2018 22:10:03 +0000 Subject: [sh] permissions --- bootstrap-vcpkg.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bootstrap-vcpkg.sh diff --git a/bootstrap-vcpkg.sh b/bootstrap-vcpkg.sh old mode 100644 new mode 100755 -- cgit v1.2.3 From 92b565e00a8203bc8ecd9e11adc6cbffe9213203 Mon Sep 17 00:00:00 2001 From: Cheney Wang Date: Wed, 25 Apr 2018 02:57:02 -0700 Subject: Since the auto_ptr is removed in c++17, so use unique_ptr to instead of it. --- ports/libxmlpp/fixAutoPtrExpired.patch | 114 +++++++++++++++++++++++++++++++++ ports/libxmlpp/portfile.cmake | 5 ++ 2 files changed, 119 insertions(+) create mode 100644 ports/libxmlpp/fixAutoPtrExpired.patch diff --git a/ports/libxmlpp/fixAutoPtrExpired.patch b/ports/libxmlpp/fixAutoPtrExpired.patch new file mode 100644 index 000000000..98d4df6bc --- /dev/null +++ b/ports/libxmlpp/fixAutoPtrExpired.patch @@ -0,0 +1,114 @@ +diff --git a/libxml++/parsers/saxparser.h b/libxml++/parsers/saxparser.h +index 1362ca3..0bd36d2 100644 +--- a/libxml++/parsers/saxparser.h ++++ b/libxml++/parsers/saxparser.h +@@ -221,7 +221,7 @@ private: + //TODO: Remove the virtual when we can break ABI? + virtual void parse(); + +- std::auto_ptr<_xmlSAXHandler> sax_handler_; ++ std::unique_ptr<_xmlSAXHandler> sax_handler_; + + // A separate xmlpp::Document that is just used for entity resolution, + // and never seen in the API: +diff --git a/libxml++/parsers/textreader.h b/libxml++/parsers/textreader.h +index 48901b2..17f0737 100644 +--- a/libxml++/parsers/textreader.h ++++ b/libxml++/parsers/textreader.h +@@ -257,7 +257,7 @@ class TextReader: NonCopyable + void * locator); + void check_for_exceptions() const; + +- std::auto_ptr propertyreader; ++ std::unique_ptr propertyreader; + _xmlTextReader* impl_; + int severity_; + Glib::ustring error_; +diff --git a/libxml++/relaxngschema.h b/libxml++/relaxngschema.h +index 8df7089..ffe2eaa 100644 +--- a/libxml++/relaxngschema.h ++++ b/libxml++/relaxngschema.h +@@ -23,7 +23,7 @@ + + #include + #include +-#include // std::auto_ptr ++#include // std::unique_ptr + + #ifndef DOXYGEN_SHOULD_SKIP_THIS + extern "C" { +@@ -105,7 +105,7 @@ protected: + + private: + struct Impl; +- std::auto_ptr pimpl_; ++ std::unique_ptr pimpl_; + }; + + } // namespace xmlpp +diff --git a/libxml++/validators/relaxngvalidator.h b/libxml++/validators/relaxngvalidator.h +index 5cd5ad7..cd29393 100644 +--- a/libxml++/validators/relaxngvalidator.h ++++ b/libxml++/validators/relaxngvalidator.h +@@ -22,7 +22,7 @@ + #define __LIBXMLPP_VALIDATOR_RELAXNGVALIDATOR_H + + #include +-#include // std::auto_ptr ++#include // std::unique_ptr + + namespace Glib + { +@@ -156,7 +156,7 @@ protected: + + private: + struct Impl; +- std::auto_ptr pimpl_; ++ std::unique_ptr pimpl_; + }; + + } // namespace xmlpp +diff --git a/libxml++/validators/xsdvalidator.h b/libxml++/validators/xsdvalidator.h +index 941d7f1..d64b971 100644 +--- a/libxml++/validators/xsdvalidator.h ++++ b/libxml++/validators/xsdvalidator.h +@@ -20,7 +20,7 @@ + #define __LIBXMLPP_VALIDATOR_XSDVALIDATOR_H + + #include +-#include // std::auto_ptr ++#include // std::unique_ptr + + namespace Glib + { +@@ -146,7 +146,7 @@ protected: + + private: + struct Impl; +- std::auto_ptr pimpl_; ++ std::unique_ptr pimpl_; + }; + + } // namespace xmlpp +diff --git a/libxml++/xsdschema.h b/libxml++/xsdschema.h +index 1333025..8220e4e 100644 +--- a/libxml++/xsdschema.h ++++ b/libxml++/xsdschema.h +@@ -21,7 +21,7 @@ + + #include + #include +-#include // std::auto_ptr ++#include // std::unique_ptr + + #ifndef DOXYGEN_SHOULD_SKIP_THIS + extern "C" { +@@ -96,7 +96,7 @@ protected: + + private: + struct Impl; +- std::auto_ptr pimpl_; ++ std::unique_ptr pimpl_; + }; + + } // namespace xmlpp diff --git a/ports/libxmlpp/portfile.cmake b/ports/libxmlpp/portfile.cmake index 8b6c758ac..9c39d6397 100644 --- a/ports/libxmlpp/portfile.cmake +++ b/ports/libxmlpp/portfile.cmake @@ -10,6 +10,11 @@ vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxml++-${LIBXMLPP_VERSION} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fixAutoPtrExpired.patch" +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA -- cgit v1.2.3 From babc84598b673cae0ddd51d24941c902427c2dc0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 25 Apr 2018 16:30:31 -0700 Subject: [libxmlpp] Bump version in CONTROL file --- ports/libxmlpp/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libxmlpp/CONTROL b/ports/libxmlpp/CONTROL index 46ec26ea1..890d1471d 100644 --- a/ports/libxmlpp/CONTROL +++ b/ports/libxmlpp/CONTROL @@ -1,4 +1,4 @@ Source: libxmlpp -Version: 2.40.1-1 +Version: 2.40.1-2 Description: a C++ wrapper for the libxml XML parser library. Build-Depends: libxml2, glibmm -- cgit v1.2.3 From 6d5bf1b2006c50194c768667f86b89152435d853 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 25 Apr 2018 16:43:44 -0700 Subject: [readme] Add additional supported host platforms --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4983508a4..38d01601f 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ For short description of available commands, run `vcpkg help`. ## Quick Start Prerequisites: -- Windows 10, 8.1, or 7 -- Visual Studio 2017 or Visual Studio 2015 Update 3 +- Windows 10, 8.1, 7, Linux, or OSX +- Visual Studio 2017 or Visual Studio 2015 Update 3 (on Windows) - Git - *Optional: CMake 3.10.2* -- cgit v1.2.3 From 6a3c1db30bbdc0d2580a3c787d90811e6bb7823a Mon Sep 17 00:00:00 2001 From: Rudi Lee Date: Thu, 26 Apr 2018 07:38:45 +0700 Subject: Checking for sha512sum on OS which doesn't have shasum --- scripts/bootstrap.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 66efb1d62..58eb9e9fb 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -29,8 +29,15 @@ vcpkgCheckRepoTool() vcpkgCheckEqualFileHash() { url=$1; filePath=$2; expectedHash=$3 + + SHASUM="shasum -a 512" # sha512sum is not available on osx - actualHash=$(shasum -a 512 "$filePath") # sha512sum not available on osx + # checking for sha512sum on os which doesn't have shasum + if which sha512sum >/dev/null 2>&1; then + SHASUM=sha512sum + fi + + actualHash=$("$SHASUM" "$filePath") actualHash="${actualHash%% *}" # shasum returns [hash filename], so get the first word if ! [ "$expectedHash" = "$actualHash" ]; then -- cgit v1.2.3 From 857447263f73d494b2ce3e3d1f2a06bfaaeac68f Mon Sep 17 00:00:00 2001 From: Joel Clay Date: Wed, 25 Apr 2018 20:58:32 -0400 Subject: Update Readme to reflect cross-platform support (#3304) * Remove Windows as specific prerequisite * Add crossplatform announcement to docs * [find_acquire.cmake] Fix ninja path for mac * Another pass at making more platfrom neutral * two additional fixes * [osx] Ignore .DS_Store file. Fixes #3306 * Remove noexcept from BinaryParagraph() * Add Bash shebang to bootstrap script * Update gitignore to exclude the `vcpkg` binary (artifact of the build script) from the git repo * [sh] Change to #!/bin/sh * [sh] Remove merge conflict lines * [sh] permissions * Since the auto_ptr is removed in c++17, so use unique_ptr to instead of it. * [libxmlpp] Bump version in CONTROL file * [readme] Add additional supported host platforms * [readme] Slight packing and reformatting --- README.md | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 38d01601f..c35c597d9 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,48 @@ # Vcpkg ![](https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/8476/badge) ## Overview -Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are currently in a preview state; your involvement is vital to its success. +Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are currently in a preview state; your involvement is vital to its success! For short description of available commands, run `vcpkg help`. ## Quick Start Prerequisites: -- Windows 10, 8.1, 7, Linux, or OSX +- Windows 10, 8.1, 7, Linux, or MacOS - Visual Studio 2017 or Visual Studio 2015 Update 3 (on Windows) - Git - *Optional: CMake 3.10.2* -Clone this repository, then run +To get started: ``` -C:\src\vcpkg> .\bootstrap-vcpkg.bat +> git clone https://github.com/Microsoft/vcpkg +> cd vcpkg + +PS> .\bootstrap-vcpkg.bat +Ubuntu:~/$ ./bootstrap-vcpkg.sh ``` + Then, to hook up user-wide integration, run (note: requires admin on first use) ``` -C:\src\vcpkg> .\vcpkg integrate install +PS> .\vcpkg integrate install +Ubuntu:~/$ ./vcpkg integrate install ``` + Install any packages with ``` -C:\src\vcpkg> .\vcpkg install sdl2 curl +PS> .\vcpkg install sdl2 curl +Ubuntu:~/$ ./vcpkg install sdl2 curl ``` -Finally, create a New Project (or open an existing one) in Visual Studio 2017 or 2015. All installed libraries are immediately ready to be `#include`'d and used in your project. -The best way to use installed libraries with cmake is via the toolchain file `scripts\buildsystems\vcpkg.cmake`. To use this file, you simply need to add it onto your CMake command line as `-DCMAKE_TOOLCHAIN_FILE=D:\src\vcpkg\scripts\buildsystems\vcpkg.cmake`. -For more information, see our [using a package](docs/examples/using-sqlite.md) example for the specifics. +The best way to use installed libraries with CMake is via the toolchain file `scripts\buildsystems\vcpkg.cmake`. To use this file, you simply need to add it onto your CMake command line as `-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake`. + +In Visual Studio, you can create a New Project (or open an existing one). All installed libraries are immediately ready to be `#include`'d and used in your project without additional configuration. + +For more information, see our [using a package](docs/examples/using-sqlite.md) example for the specifics. + +Additional notes on macOS and Linux support can be found in the [official announcement](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/). ## Tab-Completion / Auto-Completion -`Vcpkg` supports auto-completion of commands, package names, options etc. To enable tab-completion in Powershell, use +`vcpkg` supports auto-completion of commands, package names, options etc. To enable tab-completion in Powershell, use ``` .\vcpkg integrate powershell ``` -- cgit v1.2.3 From 9167511656715c81d01cc87af5db1835f026f5b6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 25 Apr 2018 18:14:24 -0700 Subject: Fix #3170 issue with /permissive- --- toolsrc/include/tests.utils.h | 40 ++++++++++++++++++++++++++++++++++++---- toolsrc/src/tests.paragraph.cpp | 9 --------- toolsrc/src/tests.utils.cpp | 30 ------------------------------ 3 files changed, 36 insertions(+), 43 deletions(-) diff --git a/toolsrc/include/tests.utils.h b/toolsrc/include/tests.utils.h index 970506663..7f7ec9e88 100644 --- a/toolsrc/include/tests.utils.h +++ b/toolsrc/include/tests.utils.h @@ -12,10 +12,42 @@ namespace Microsoft::VisualStudio::CppUnitTestFramework { - std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t); - std::wstring ToString(const vcpkg::Dependencies::RequestType& t); - std::wstring ToString(const vcpkg::PackageSpecParseResult& t); - std::wstring ToString(const vcpkg::PackageSpec& t); + template<> + 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<> + 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<> + std::wstring ToString(const vcpkg::PackageSpecParseResult& t) + { + return ToString(static_cast(t)); + } + + template<> + std::wstring ToString(const vcpkg::PackageSpec& t) + { + return ToString(t.to_string()); + } } std::unique_ptr make_status_pgh(const char* name, diff --git a/toolsrc/src/tests.paragraph.cpp b/toolsrc/src/tests.paragraph.cpp index dca89bc59..9a56ad9ee 100644 --- a/toolsrc/src/tests.paragraph.cpp +++ b/toolsrc/src/tests.paragraph.cpp @@ -5,15 +5,6 @@ using namespace Microsoft::VisualStudio::CppUnitTestFramework; -namespace Microsoft::VisualStudio::CppUnitTestFramework -{ - template<> - inline std::wstring ToString(const vcpkg::PackageSpecParseResult& t) - { - return ToString(static_cast(t)); - } -} - namespace Strings = vcpkg::Strings; namespace UnitTest1 diff --git a/toolsrc/src/tests.utils.cpp b/toolsrc/src/tests.utils.cpp index a3d8ffc7d..ac391f559 100644 --- a/toolsrc/src/tests.utils.cpp +++ b/toolsrc/src/tests.utils.cpp @@ -5,36 +5,6 @@ using namespace Microsoft::VisualStudio::CppUnitTestFramework; using namespace vcpkg; -namespace Microsoft::VisualStudio::CppUnitTestFramework -{ - std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t) - { - switch (t) - { - case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; - case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; - case Dependencies::InstallPlanType::EXCLUDED: return L"EXCLUDED"; - case Dependencies::InstallPlanType::UNKNOWN: return L"UNKNOWN"; - default: return ToString(static_cast(t)); - } - } - - std::wstring ToString(const vcpkg::Dependencies::RequestType& t) - { - switch (t) - { - case Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED"; - case Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED"; - case Dependencies::RequestType::UNKNOWN: return L"UNKNOWN"; - default: return ToString(static_cast(t)); - } - } - - std::wstring ToString(const vcpkg::PackageSpecParseResult& t) { return ToString(static_cast(t)); } - - 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, -- cgit v1.2.3 From 1d351e0846475f097b6fbea0c52eb60c590f2b08 Mon Sep 17 00:00:00 2001 From: tamaroth Date: Thu, 26 Apr 2018 03:27:26 +0200 Subject: [bigint] Add missing header file #3319 (#3320) * [bigint] Add missing header file. File BigIntegerUtils.hh, which is required by the library, was not being copied. * [bigint] Bump control file version --- ports/bigint/CMakeLists.txt | 3 ++- ports/bigint/CONTROL | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/bigint/CMakeLists.txt b/ports/bigint/CMakeLists.txt index cb62597ef..e4cccbe12 100644 --- a/ports/bigint/CMakeLists.txt +++ b/ports/bigint/CMakeLists.txt @@ -13,7 +13,7 @@ set( BigInteger.cc BigIntegerAlgorithms.cc BigUnsignedInABase.cc - BigIntegerUtils.cc + BigIntegerUtils.cc ) set( @@ -24,6 +24,7 @@ set( BigIntegerAlgorithms.hh BigUnsignedInABase.hh BigIntegerLibrary.hh + BigIntegerUtils.hh ) add_library(bigint ${bigint_srcs}) diff --git a/ports/bigint/CONTROL b/ports/bigint/CONTROL index 4079363f1..5247cbf81 100644 --- a/ports/bigint/CONTROL +++ b/ports/bigint/CONTROL @@ -1,3 +1,3 @@ Source: bigint -Version: 2010.04.30-1 +Version: 2010.04.30-2 Description: C++ Big Integer Library -- cgit v1.2.3 From c78a609dabb0df43d0443452261f7c3b592b9b41 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 26 Apr 2018 02:11:04 +0000 Subject: [sh] Tweak so only the sh forwarder needs to be +x --- bootstrap-vcpkg.sh | 2 +- scripts/bootstrap.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 scripts/bootstrap.sh diff --git a/bootstrap-vcpkg.sh b/bootstrap-vcpkg.sh index 92e65dc6c..b77b74890 100755 --- a/bootstrap-vcpkg.sh +++ b/bootstrap-vcpkg.sh @@ -1,4 +1,4 @@ #!/bin/sh vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) -$vcpkgRootDir/scripts/bootstrap.sh +. $vcpkgRootDir/scripts/bootstrap.sh diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh old mode 100755 new mode 100644 index 66efb1d62..c69dc0135 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -185,4 +185,4 @@ mkdir -p "$buildDir" (cd "$buildDir" && "$cmakeExe" --build .) rm -rf "$vcpkgRootDir/vcpkg" -cp "$buildDir/vcpkg" "$vcpkgRootDir/" \ No newline at end of file +cp "$buildDir/vcpkg" "$vcpkgRootDir/" -- cgit v1.2.3 From ef594607829ad6ed2bd462a0ddcbb0ee698b3f4f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 25 Apr 2018 22:23:45 -0700 Subject: [bootstrap.sh] Minor refactoring for clarity --- scripts/bootstrap.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 2225f029d..95ee75af1 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -29,15 +29,15 @@ vcpkgCheckRepoTool() vcpkgCheckEqualFileHash() { url=$1; filePath=$2; expectedHash=$3 - - SHASUM="shasum -a 512" # sha512sum is not available on osx - # checking for sha512sum on os which doesn't have shasum - if which sha512sum >/dev/null 2>&1; then - SHASUM=sha512sum + if command -v "sha512sum" >/dev/null 2>&1 ; then + actualHash=$(sha512sum "$filePath") + else + # sha512sum is not available by default on osx + # shasum is not available by default on Fedora + actualHash=$(shasum -a 512 "$filePath") fi - actualHash=$("$SHASUM" "$filePath") actualHash="${actualHash%% *}" # shasum returns [hash filename], so get the first word if ! [ "$expectedHash" = "$actualHash" ]; then -- cgit v1.2.3 From 8a624f93b7a3915616396b2f958c17b04bec45a3 Mon Sep 17 00:00:00 2001 From: Nicolai Grodzitski Date: Fri, 27 Apr 2018 00:51:13 +0300 Subject: Improve cmake routine for nodejs/http-parser. (#3283) * Improve cmake routine for nodejs/http-parser. Now it is installed as a propper target and can be searched with `find_package(http-parser REQUIRED)` and then used as a dependency like this: `target_link_libraries(main PRIVATE nodejs::http_parser)`. Also using namespace for referencing http-parser lib, which is safer, although the old name must still work, as names of the binaries remained unchanged. * Remove duplicate variable definition and add newlines at the end of files. * [http-parser] Rename exported targets to "unofficial", since they are not blessed by upstream --- ports/http-parser/CMakeLists.txt | 30 ++++++++++++++++++++---------- ports/http-parser/CONTROL | 2 +- ports/http-parser/portfile.cmake | 28 ++++++++++++---------------- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/ports/http-parser/CMakeLists.txt b/ports/http-parser/CMakeLists.txt index d959fff79..284c8e903 100644 --- a/ports/http-parser/CMakeLists.txt +++ b/ports/http-parser/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required (VERSION 3.4) -project (http-parser) +cmake_minimum_required(VERSION 3.4) +project(http-parser C) -if (BUILD_SHARED_LIBS) - SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() if(CMAKE_BUILD_TYPE MATCHES "Release") @@ -11,11 +11,21 @@ endif() add_library(http_parser http_parser.c http_parser.h) -install(TARGETS http_parser - RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" - ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" +target_include_directories(http_parser PUBLIC $) + +install( + TARGETS http_parser + EXPORT NODEJS_HTTP_PARSER_ALL_TARGETS + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin +) + +install( + EXPORT NODEJS_HTTP_PARSER_ALL_TARGETS + NAMESPACE unofficial::http_parser:: + FILE unofficial-http-parser-config.cmake + DESTINATION share/unofficial-http-parser ) -if (NOT SKIP_INSTALL_HEADERS) - install(FILES http_parser.h DESTINATION "${CMAKE_INSTALL_PREFIX}/include") -endif() \ No newline at end of file +install(FILES http_parser.h DESTINATION include) diff --git a/ports/http-parser/CONTROL b/ports/http-parser/CONTROL index a9edf4071..26b9f8d34 100644 --- a/ports/http-parser/CONTROL +++ b/ports/http-parser/CONTROL @@ -1,3 +1,3 @@ Source: http-parser -Version: 2.7.1-2 +Version: 2.7.1-3 Description: HTTP Parser. diff --git a/ports/http-parser/portfile.cmake b/ports/http-parser/portfile.cmake index 728293eed..49f829a53 100644 --- a/ports/http-parser/portfile.cmake +++ b/ports/http-parser/portfile.cmake @@ -1,29 +1,25 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/http-parser-2.7.1) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://github.com/nodejs/http-parser/archive/v2.7.1.zip" - FILENAME "http-parser-2.7.1.zip" - SHA512 9fb8b855ba7edb47628c91ac062d7ffce9c4bb8d6b8237d861d7926af989fb3e354c113821bdab1b8ac910f5f1064ca1339947aa20d56f6806b919b0cd6b6eae +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nodejs/http-parser + REF v2.7.1 + SHA512 c0fe86455db1a563a5c668f118dfa9a27b9a637ee1c0e2f2f18a5b816352436ed90435ea978e3f3d85b037d3c630234e47d609dc3b7086b898286c4e54d9f031 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON + PREFER_NINJA ) 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") + # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/http-parser) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/http-parser/LICENSE-MIT ${CURRENT_PACKAGES_DIR}/share/http-parser/copyright) \ No newline at end of file +file(RENAME ${CURRENT_PACKAGES_DIR}/share/http-parser/LICENSE-MIT ${CURRENT_PACKAGES_DIR}/share/http-parser/copyright) -- cgit v1.2.3 From 7c51f3a1a27ca2d302ed4c414439d35973bee6fb Mon Sep 17 00:00:00 2001 From: Jason Juang Date: Thu, 26 Apr 2018 14:52:57 -0700 Subject: [llvm] fix issue #3282 (#3286) --- ports/llvm/CONTROL | 2 +- ports/llvm/portfile.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index 27604d397..37368dbc7 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,4 +1,4 @@ Source: llvm -Version: 6.0.0 +Version: 6.0.0-1 Description: The LLVM Compiler Infrastructure Build-Depends: atlmfc diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 795d72d31..650e2ae92 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -70,6 +70,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/msbuild-bin ${CURRENT_PACKAGES_DIR}/tools/msbuild-bin + ${CURRENT_PACKAGES_DIR}/include/llvm/BinaryFormat/WasmRelocs ) # Remove one empty include subdirectory if it is indeed empty -- cgit v1.2.3 From 5ab4a6f673ccce9796579a4132d397cddafa0916 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 20 Apr 2018 17:53:57 -0700 Subject: [python3] Fix folder handling --- ports/python3/CONTROL | 2 +- ports/python3/portfile.cmake | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ports/python3/CONTROL b/ports/python3/CONTROL index 0a730e517..c8331f8cf 100644 --- a/ports/python3/CONTROL +++ b/ports/python3/CONTROL @@ -1,3 +1,3 @@ Source: python3 -Version: 3.6.4 +Version: 3.6.4-1 Description: The Python programming language as an embeddable library \ No newline at end of file diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 6285f9a9b..16b3a3db3 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -9,12 +9,12 @@ set(PYTHON_VERSION_PATCH 4) set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}) include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) + vcpkg_from_github( OUT_SOURCE_PATH TEMP_SOURCE_PATH REPO python/cpython REF v${PYTHON_VERSION} - SHA512 32cca5e344ee66f08712ab5533e5518f724f978ec98d985f7612d0bd8d7f5cac25625363c9eead192faf1806d4ea3393515f72ba962a2a0bed26261e56d8c637 + SHA512 32cca5e344ee66f08712ab5533e5518f724f978ec98d985f7612d0bd8d7f5cac25625363c9eead192faf1806d4ea3393515f72ba962a2a0bed26261e56d8c637 HEAD_REF master ) @@ -26,8 +26,9 @@ vcpkg_apply_patches( # We need per-triplet directories because we need to patch the project files differently based on the linkage # Because the patches patch the same file, they have to be applied in the correct order -file(COPY ${TEMP_SOURCE_PATH} DESTINATION ${SOURCE_PATH}) -set(SOURCE_PATH ${SOURCE_PATH}/cpython-${PYTHON_VERSION}) +set(SOURCE_PATH "${TEMP_SOURCE_PATH}-Lib-${VCPKG_LIBRARY_LINKAGE}-crt-${VCPKG_CRT_LINKAGE}") +file(REMOVE_RECURSE ${SOURCE_PATH}) +file(RENAME "${TEMP_SOURCE_PATH}" ${SOURCE_PATH}) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) vcpkg_apply_patches( @@ -57,7 +58,7 @@ endif() vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/PCBuild/pythoncore.vcxproj PLATFORM ${BUILD_ARCH}) - + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 09a5b6e365d5feec39df66308903061a731ecf95 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 20 Apr 2018 18:33:44 -0700 Subject: [ismrmrd] Use ${SOURCE_PATH} --- ports/ismrmrd/CONTROL | 2 +- ports/ismrmrd/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/ismrmrd/CONTROL b/ports/ismrmrd/CONTROL index 7aaa5a42b..3fe989da9 100644 --- a/ports/ismrmrd/CONTROL +++ b/ports/ismrmrd/CONTROL @@ -1,4 +1,4 @@ Source: ismrmrd -Version: 1.3.2-1 +Version: 1.3.2-2 Description: ISMRM Raw Data Format Build-Depends: pugixml diff --git a/ports/ismrmrd/portfile.cmake b/ports/ismrmrd/portfile.cmake index a3557f0d2..1fda781b2 100644 --- a/ports/ismrmrd/portfile.cmake +++ b/ports/ismrmrd/portfile.cmake @@ -41,7 +41,7 @@ file(COPY ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info.exe DESTINATION ${CURRENT_PAC file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info.exe) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_info.exe) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/ismrmrd-1.3.2/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ismrmrd) +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) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/ismrmrd) -- cgit v1.2.3 From 8b941c56add1a3d0acc7d860c82b8093d73a482d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 20 Apr 2018 18:41:24 -0700 Subject: [leveldb] Fix SOURCE_PATH. Warn before changing linkage. Other fixes --- ports/leveldb/CONTROL | 2 +- ports/leveldb/portfile.cmake | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/ports/leveldb/CONTROL b/ports/leveldb/CONTROL index 5953bc35d..515d7dfea 100644 --- a/ports/leveldb/CONTROL +++ b/ports/leveldb/CONTROL @@ -1,3 +1,3 @@ Source: leveldb -Version: 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-1 +Version: 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-2 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/portfile.cmake b/ports/leveldb/portfile.cmake index 387cfd96e..9d6892977 100644 --- a/ports/leveldb/portfile.cmake +++ b/ports/leveldb/portfile.cmake @@ -1,23 +1,20 @@ include(vcpkg_common_functions) -set(VCPKG_LIBRARY_LINKAGE static) - -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/leveldb-8b1cd3753b184341e837b30383832645135d3d73) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "Warning: Dynamic building not supported yet. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() vcpkg_from_github( - OUT_SOURCE_PATH "leveldb" - BRANCH "bitcoin-fork" - REPO "bitcoin-core/leveldb" - REF "8b1cd3753b184341e837b30383832645135d3d73" + OUT_SOURCE_PATH SOURCE_PATH + BRANCH "bitcoin-fork" + REPO "bitcoin-core/leveldb" + REF "8b1cd3753b184341e837b30383832645135d3d73" SHA512 f5ad5fd21fb28ee052a4f3873abd58dab508c71621bcd482ab9e6ef4b57eca182c81502ddfe59736f5b2a54f2d05b397dd15982b3bd5d9039cd481eae3c7b958 ) -message(STATUS "Patching") - vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/msvc_code_fix.diff) - -message(STATUS "Building") file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 0d9158961fede526cee979e4ae29e8b521c7726b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 20 Apr 2018 18:43:52 -0700 Subject: [libqrencode] Use SOURCE_PATH --- ports/libqrencode/CONTROL | 2 +- ports/libqrencode/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/libqrencode/CONTROL b/ports/libqrencode/CONTROL index 0e96c99a9..056d6a92b 100644 --- a/ports/libqrencode/CONTROL +++ b/ports/libqrencode/CONTROL @@ -1,4 +1,4 @@ Source: libqrencode -Version: 4.0.0-1 +Version: 4.0.0-2 Build-Depends: libpng, libiconv Description: libqrencode - a fast and compact QR Code encoding library diff --git a/ports/libqrencode/portfile.cmake b/ports/libqrencode/portfile.cmake index ff0c2302b..72af0103e 100644 --- a/ports/libqrencode/portfile.cmake +++ b/ports/libqrencode/portfile.cmake @@ -39,7 +39,7 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/qrencoded.dll) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/libqrencode-4.0.0/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libqrencode) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libqrencode) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libqrencode/COPYING ${CURRENT_PACKAGES_DIR}/share/libqrencode/copyright) vcpkg_copy_pdbs() -- cgit v1.2.3 From 5baa90a615b4a99e24fba7fa2764726d6559667f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 20 Apr 2018 18:46:47 -0700 Subject: [quirc] Use SOURCE_PATH --- ports/quirc/CONTROL | 2 +- ports/quirc/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/quirc/CONTROL b/ports/quirc/CONTROL index 1ba02d889..d86ea00ae 100644 --- a/ports/quirc/CONTROL +++ b/ports/quirc/CONTROL @@ -1,3 +1,3 @@ Source: quirc -Version: 1.0-1 +Version: 1.0-2 Description: quirc is one of the C library available for scanning QR Codes diff --git a/ports/quirc/portfile.cmake b/ports/quirc/portfile.cmake index 976c7bc92..fd05c3db4 100644 --- a/ports/quirc/portfile.cmake +++ b/ports/quirc/portfile.cmake @@ -11,7 +11,7 @@ vcpkg_from_github( file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/quirc-1.0 + SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/patch-for-msvc.patch ) -- cgit v1.2.3 From 402c962f755297f2829717cd2519ef87f894923d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 26 Apr 2018 19:12:26 -0700 Subject: [clblas] Also delete clBLAS-tune.pdb --- ports/clblas/portfile.cmake | 3 ++- ports/gainput/CONTROL | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/clblas/portfile.cmake b/ports/clblas/portfile.cmake index 98ea1e515..9088fc2e9 100644 --- a/ports/clblas/portfile.cmake +++ b/ports/clblas/portfile.cmake @@ -9,7 +9,7 @@ vcpkg_from_github( ) # v2.12 has a very old FindOpenCL.cmake using OPENCL_ vs. OpenCL_ var names -# conflicting with the built-in, more modern FindOpenCL.cmake +# conflicting with the built-in, more modern FindOpenCL.cmake file( REMOVE ${SOURCE_PATH}/src/FindOpenCL.cmake ) @@ -45,6 +45,7 @@ file(INSTALL ) file(REMOVE + ${CURRENT_PACKAGES_DIR}/debug/bin/clBLAS-tune.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/clBLAS-tune.exe ${CURRENT_PACKAGES_DIR}/bin/clBLAS-tune.exe ${CURRENT_PACKAGES_DIR}/debug/bin/concrt140d.dll diff --git a/ports/gainput/CONTROL b/ports/gainput/CONTROL index 45b7b6afb..29ac472c5 100644 --- a/ports/gainput/CONTROL +++ b/ports/gainput/CONTROL @@ -1,3 +1,3 @@ Source: gainput -Version: 1.0.0 +Version: 1.0.0-1 Description: Gainput is a multiplatform C++ input library, supporting mouse, keyboard and controllers -- cgit v1.2.3 From da1805f3c0542d6c584eddf627b2ebc34d2ce64d Mon Sep 17 00:00:00 2001 From: jiefangxuanyan <505745416@qq.com> Date: Fri, 27 Apr 2018 14:16:47 +0800 Subject: Fix #3250 (#3284) * [rapidjson] Fix CMake target (#3250) * [rapidjson] Bump control version. Add usage information. --- ports/rapidjson/CONTROL | 2 +- ports/rapidjson/portfile.cmake | 23 ++++++++++++++++++----- ports/rapidjson/usage | 4 ++++ 3 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 ports/rapidjson/usage diff --git a/ports/rapidjson/CONTROL b/ports/rapidjson/CONTROL index 0dd6333cf..7646755a5 100644 --- a/ports/rapidjson/CONTROL +++ b/ports/rapidjson/CONTROL @@ -1,3 +1,3 @@ Source: rapidjson -Version: 1.1.0 +Version: 1.1.0-1 Description: A fast JSON parser/generator for C++ with both SAX/DOM style API diff --git a/ports/rapidjson/portfile.cmake b/ports/rapidjson/portfile.cmake index 54f1c8eea..4f87ed6f4 100644 --- a/ports/rapidjson/portfile.cmake +++ b/ports/rapidjson/portfile.cmake @@ -9,10 +9,23 @@ vcpkg_from_github( HEAD_REF master ) +# Use RapidJSON's own build process, skipping examples and tests +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DRAPIDJSON_BUILD_DOC:BOOL=OFF + -DRAPIDJSON_BUILD_EXAMPLES:BOOL=OFF + -DRAPIDJSON_BUILD_TESTS:BOOL=OFF + -DCMAKE_INSTALL_DIR:STRING=cmake +) +vcpkg_install_cmake() + +# Move CMake config files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +# Delete redundant directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/doc) + # Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidjson) +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) - -# Copy the rapidjson header files -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") -vcpkg_copy_pdbs() diff --git a/ports/rapidjson/usage b/ports/rapidjson/usage new file mode 100644 index 000000000..81e541e17 --- /dev/null +++ b/ports/rapidjson/usage @@ -0,0 +1,4 @@ +The package rapidjson provides CMake integration: + + find_package(RapidJSON REQUIRED) + target_include_directories(main PRIVATE ${RAPIDJSON_INCLUDE_DIRS}) -- cgit v1.2.3 From 576f28edf30dc720aa67ff72180ab24aed6695ec Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 27 Apr 2018 08:32:43 -0700 Subject: [cgal] update to 4.12 --- ports/cgal/CONTROL | 2 +- ports/cgal/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL index 753e30a20..b81d27c96 100644 --- a/ports/cgal/CONTROL +++ b/ports/cgal/CONTROL @@ -1,4 +1,4 @@ Source: cgal -Version: 4.11.1 +Version: 4.12 Build-Depends: mpfr, mpir, zlib, qt5, boost-format, boost-container, boost-iterator, boost-variant, boost-any, boost-unordered, boost-random Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry. diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake index 4dbe9fd53..3eb0a9de7 100644 --- a/ports/cgal/portfile.cmake +++ b/ports/cgal/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CGAL/cgal - REF 27859944b4d96797030fc018892d5123b7cba0b2 - SHA512 020d4398fcae0607cd3fe1bd22a190fbe1d45cba0c7e3c95d6d3dfb6d23c43949a1608069972e511f5d47fc787c350c0a0a0085faa2f4b9fd26ce101376752c6 + REF f7c3c8212b56c0d6dae63787efc99093f4383415 + SHA512 fc40483b5f0e2071c3458cbd67ee7e503f68b7f6a1bbb525b6003d1a440e662cb85c257167ce6d55a73e0cc49b27a7d2b56dcf6b5eeddc78772567fdc48ba160 HEAD_REF master ) -- cgit v1.2.3 From 540a32c8413df21bc11aa714ff3086c9520fe6f5 Mon Sep 17 00:00:00 2001 From: Francois Budin Date: Fri, 27 Apr 2018 11:14:47 -0400 Subject: Require the version of g++ to be at least 6 On Ubuntu 16.04, old versions of g++ such as 4.9 are available. Other Linux distributions may also ship with g++ versions older than 5. With the previous test, the bootstrap script was not failing fast and instead was starting to compile vcpkg before it encountered the unsupported flag -std=c++1z. The error message was not very explicit and that was making it difficult to the developer to understand what the problem was. However, when using g++ 5, an clear error message was printed to help the user. This commit shows the helpful error message anytime g++ is older than version 6. --- scripts/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 95ee75af1..037a9136d 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -166,7 +166,7 @@ selectCXX() gccversion="$("$CXX" -v 2>&1)" gccversion="$(extractStringBetweenDelimiters "$gccversion" "gcc version " ".")" - if [ "$gccversion" = "5" ]; then + if [ "$gccversion" -lt "6" ]; then echo "CXX ($CXX) is too old; please install a newer compiler such as g++-7." echo "sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y" echo "sudo apt-get update -y" -- cgit v1.2.3 From 08afae2a7a5cd276fd251cbeef9a27f15261fc0c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Apr 2018 16:17:18 -0700 Subject: Bump version of git to 2.17.0 (was 2.16.2) --- scripts/vcpkgTools.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index daaf29214..1a2abae81 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -22,11 +22,11 @@ cmake-3.10.2-Linux-x86_64.tar.gz - 2.16.2 + 2.17.0 cmd\git.exe - https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-32-bit.zip - 004e1dc1904f2e2d5c3534d0a56f58bf030b1146f5b263d6d191e60f72cd35455977c588604708125a1e93268ee8f7a5ab32ed6115adc028257b12d5926f350a - MinGit-2.16.2-32-bit.zip + https://github.com/git-for-windows/git/releases/download/v2.17.0.windows.1/MinGit-2.17.0-32-bit.zip + a34575ab1b4f553e62535e38492904b512df4d6a837cf4abf205dbcdd05edf1eef450cc5b15a4f63f901424d5f3cd1f78b6b22437d0d4f8cd9ce4e42e82617b9 + MinGit-2.17.0-32-bit.zip 2.4.1 -- cgit v1.2.3 From 468bfeb56e29e0130a1b56adb4c23fdba403221e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 21 Feb 2018 21:17:14 -0800 Subject: [Clean patching] Each portref-patchset combo gets its own hash-based directory --- ports/azure-storage-cpp/portfile.cmake | 6 +-- ports/folly/portfile.cmake | 4 -- scripts/cmake/vcpkg_from_github.cmake | 73 +++++++++++++++++++++++++--------- 3 files changed, 56 insertions(+), 27 deletions(-) diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index 2f8e921a5..56dbc2ca3 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -10,10 +10,6 @@ vcpkg_from_github( REF v3.2.1 SHA512 8d1e8de439e52f53eb28b77e8adf394468f4861c2c4c1f79ec1437c72e3fc0bc871e4e2662ee58090748915b0f12ce6736a7cc6ede619d332686b9fb6a026c9f HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch ${CMAKE_CURRENT_LIST_DIR}/static-builds.patch @@ -35,7 +31,7 @@ vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-storage-cpp RENAME copyright) -file(REMOVE_RECURSE +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index fabfd0085..2a35561d1 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -20,10 +20,6 @@ vcpkg_from_github( REF v2018.04.16.00 SHA512 1f14da6eece3a490bd134a40550c2a3f78356789090e19933b8f10bc356837ee774a21e6f0b88c45831a968587049092b9d0d77617f040ab8e177de224400408 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/find-gflags.patch ) diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index c6a23cff6..28ada0631 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -51,7 +51,7 @@ ## * [beast](https://github.com/Microsoft/vcpkg/blob/master/ports/beast/portfile.cmake) function(vcpkg_from_github) set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 HEAD_REF) - set(multipleValuesArgs) + set(multipleValuesArgs PATCHES) cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) if(NOT DEFINED _vdud_OUT_SOURCE_PATH) @@ -73,21 +73,17 @@ function(vcpkg_from_github) string(REGEX REPLACE ".*/" "" REPO_NAME ${_vdud_REPO}) string(REGEX REPLACE "/.*" "" ORG_NAME ${_vdud_REPO}) - macro(set_SOURCE_PATH BASE BASEREF) - set(SOURCE_PATH "${BASE}/${REPO_NAME}-${BASEREF}") - if(EXISTS ${SOURCE_PATH}) - set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) - else() - # Sometimes GitHub strips a leading 'v' off the REF. - string(REGEX REPLACE "^v" "" REF ${BASEREF}) - string(REPLACE "/" "-" REF ${REF}) - set(SOURCE_PATH "${BASE}/${REPO_NAME}-${REF}") - if(EXISTS ${SOURCE_PATH}) - set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) - else() - message(FATAL_ERROR "Could not determine source path: '${BASE}/${REPO_NAME}-${BASEREF}' does not exist") - endif() + macro(set_TEMP_SOURCE_PATH BASE BASEREF) + set(TEMP_SOURCE_PATH "${BASE}/${REPO_NAME}-${BASEREF}") + if(NOT EXISTS ${TEMP_SOURCE_PATH}) + # Sometimes GitHub strips a leading 'v' off the REF. + string(REGEX REPLACE "^v" "" REF ${BASEREF}) + string(REPLACE "/" "-" REF ${REF}) + set(TEMP_SOURCE_PATH "${BASE}/${REPO_NAME}-${REF}") + if(NOT EXISTS ${TEMP_SOURCE_PATH}) + message(FATAL_ERROR "Could not determine source path: '${BASE}/${REPO_NAME}-${BASEREF}' does not exist") endif() + endif() endmacro() if(VCPKG_USE_HEAD_VERSION AND NOT DEFINED _vdud_HEAD_REF) @@ -108,8 +104,44 @@ function(vcpkg_from_github) SHA512 "${_vdud_SHA512}" FILENAME "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}.tar.gz" ) - vcpkg_extract_source_archive_ex(ARCHIVE "${ARCHIVE}") - set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src ${SANITIZED_REF}) + + # Take the last 10 chars of the REF + set(REF_MAX_LENGTH 10) + string(LENGTH ${SANITIZED_REF} REF_LENGTH) + math(EXPR FROM_REF ${REF_LENGTH}-${REF_MAX_LENGTH}) + if(FROM_REF LESS 0) + set(FROM_REF 0) + endif() + string(SUBSTRING ${SANITIZED_REF} ${FROM_REF} ${REF_LENGTH} SHORTENED_SANITIZED_REF) + + # Hash the archive hash along with the patches. Take the first 10 chars of the hash + set(PATCHSET_HASH "${_vdud_SHA512}") + foreach(PATCH IN LISTS _vdud_PATCHES) + file(SHA512 ${PATCH} CURRENT_HASH) + string(APPEND PATCHSET_HASH ${CURRENT_HASH}) + endforeach() + + string(SHA512 PATCHSET_HASH ${PATCHSET_HASH}) + string(SUBSTRING ${PATCHSET_HASH} 0 10 PATCHSET_HASH) + set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${SHORTENED_SANITIZED_REF}-${PATCHSET_HASH}") + + if(NOT EXISTS ${SOURCE_PATH}) + set(TEMP_DIR "${CURRENT_BUILDTREES_DIR}/src/TEMP") + file(REMOVE_RECURSE ${TEMP_DIR}) + vcpkg_extract_source_archive_ex(ARCHIVE "${ARCHIVE}" WORKING_DIRECTORY ${TEMP_DIR}) + set_TEMP_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/TEMP ${SANITIZED_REF}) + + vcpkg_apply_patches( + SOURCE_PATH ${TEMP_SOURCE_PATH} + PATCHES ${_vdud_PATCHES} + ) + + file(RENAME ${TEMP_SOURCE_PATH} ${SOURCE_PATH}) + file(REMOVE_RECURSE ${TEMP_DIR}) + endif() + + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + return() endif() @@ -167,5 +199,10 @@ function(vcpkg_from_github) set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) endif() - set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/head ${SANITIZED_HEAD_REF}) + set_TEMP_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/head ${SANITIZED_HEAD_REF}) + vcpkg_apply_patches( + SOURCE_PATH ${TEMP_SOURCE_PATH} + PATCHES ${_vdud_PATCHES} + ) + set(${_vdud_OUT_SOURCE_PATH} "${TEMP_SOURCE_PATH}" PARENT_SCOPE) endfunction() -- cgit v1.2.3 From 039abe258b956fe51b5893b3fb2d20661f2a8eb4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 18 Apr 2018 02:32:37 -0700 Subject: [ci] Don't block binarycaching = false --- toolsrc/src/vcpkg/commands.ci.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 04b42ea00..e2b93dc7e 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -154,8 +154,10 @@ namespace vcpkg::Commands::CI void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - Checks::check_exit( - VCPKG_LINE_INFO, GlobalState::g_binary_caching, "The ci command requires binary caching to be enabled."); + if (!GlobalState::g_binary_caching) + { + System::println(System::Color::warning, "Warning: Running ci without binary caching!"); + } const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); -- cgit v1.2.3 From 38d139ceb8bca5b8bb91eddf25180e0433f40115 Mon Sep 17 00:00:00 2001 From: Alexej Harm Date: Sat, 28 Apr 2018 16:30:51 +0200 Subject: [openssl] added support for platforms without libdl (#3368) --- ports/openssl/vcpkg-cmake-wrapper.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ports/openssl/vcpkg-cmake-wrapper.cmake b/ports/openssl/vcpkg-cmake-wrapper.cmake index 1e0500055..82313bdab 100644 --- a/ports/openssl/vcpkg-cmake-wrapper.cmake +++ b/ports/openssl/vcpkg-cmake-wrapper.cmake @@ -1,7 +1,10 @@ _find_package(${ARGS}) if(OPENSSL_FOUND) - list(APPEND OPENSSL_LIBRARIES "dl") - if(TARGET OpenSSL::Crypto) - set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl") + find_library(OPENSSL_DL_LIBRARY NAMES dl) + if(OPENSSL_DL_LIBRARY) + list(APPEND OPENSSL_LIBRARIES "dl") + if(TARGET OpenSSL::Crypto) + set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl") + endif() endif() endif() -- cgit v1.2.3 From ed3f943259acd4913f99891a709c8d6713f18397 Mon Sep 17 00:00:00 2001 From: Paul T Date: Sat, 28 Apr 2018 10:34:57 -0400 Subject: Add Visual Studio 2013 Support for Qt5 (#3361) Add case for toolset v120 which corresponds to visual studio 2013. --- ports/qt5-base/portfile.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index e5bdba8a5..569540213 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -69,6 +69,8 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore set(PLATFORM "win32-msvc2015") elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(PLATFORM "win32-msvc2017") + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v120") + set(PLATFORM "win32-msvc2013") endif() configure_qt( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From a9d989ec056246ea320a56ca7d02b161a6fee387 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 28 Apr 2018 11:26:57 -0700 Subject: [vcpkg-integrate-install] Add vcpkg.path.txt to localappdata for more generic consumption. --- toolsrc/include/vcpkg/userconfig.h | 2 + toolsrc/src/vcpkg/commands.integrate.cpp | 87 ++++++++++++++++++++++---------- toolsrc/src/vcpkg/userconfig.cpp | 11 ++-- 3 files changed, 70 insertions(+), 30 deletions(-) diff --git a/toolsrc/include/vcpkg/userconfig.h b/toolsrc/include/vcpkg/userconfig.h index 63b8e5481..d044f43ef 100644 --- a/toolsrc/include/vcpkg/userconfig.h +++ b/toolsrc/include/vcpkg/userconfig.h @@ -17,4 +17,6 @@ namespace vcpkg void try_write_data(Files::Filesystem& fs) const; }; + + fs::path get_user_dir(); } diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 2e1750c80..8897ea138 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -5,6 +5,7 @@ #include #include #include +#include namespace vcpkg::Commands::Integrate { @@ -156,8 +157,10 @@ namespace vcpkg::Commands::Integrate } #endif + static fs::path get_path_txt_path() { return get_user_dir() / "vcpkg.path.txt"; } + #if defined(_WIN32) - static void integrate_install(const VcpkgPaths& paths) + static void integrate_install_msbuild14(Files::Filesystem& fs, const fs::path& tmp_dir) { static const std::array OLD_SYSTEM_TARGET_FILES = { System::get_program_files_32_bit().value_or_exit(VCPKG_LINE_INFO) / @@ -168,8 +171,6 @@ namespace vcpkg::Commands::Integrate System::get_program_files_32_bit().value_or_exit(VCPKG_LINE_INFO) / "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props"; - auto& fs = paths.get_filesystem(); - // TODO: This block of code should eventually be removed for (auto&& old_system_wide_targets_file : OLD_SYSTEM_TARGET_FILES) { @@ -188,12 +189,6 @@ namespace vcpkg::Commands::Integrate } } } - - std::error_code ec; - const fs::path tmp_dir = paths.buildsystems / "tmp"; - fs.create_directory(paths.buildsystems, ec); - fs.create_directory(tmp_dir, ec); - bool should_install_system = true; const Expected system_wide_file_contents = fs.read_contents(SYSTEM_WIDE_TARGETS_FILE); static const std::regex RE(R"###()###"); @@ -232,24 +227,52 @@ namespace vcpkg::Commands::Integrate "Error: failed to copy targets file to %s", SYSTEM_WIDE_TARGETS_FILE.string()); } + } +#endif - const fs::path appdata_src_path = tmp_dir / "vcpkg.user.targets"; - fs.write_contents(appdata_src_path, - create_appdata_targets_shortcut(paths.buildsystems_msbuild_targets.string())); - auto appdata_dst_path = get_appdata_targets_path(); + static void integrate_install(const VcpkgPaths& paths) + { + auto& fs = paths.get_filesystem(); + +#if defined(_WIN32) + { + std::error_code ec; + const fs::path tmp_dir = paths.buildsystems / "tmp"; + fs.create_directory(paths.buildsystems, ec); + fs.create_directory(tmp_dir, ec); + + integrate_install_msbuild14(fs, tmp_dir); + + const fs::path appdata_src_path = tmp_dir / "vcpkg.user.targets"; + fs.write_contents(appdata_src_path, + create_appdata_targets_shortcut(paths.buildsystems_msbuild_targets.string())); + auto appdata_dst_path = get_appdata_targets_path(); - const auto rc = fs.copy_file(appdata_src_path, appdata_dst_path, fs::copy_options::overwrite_existing, ec); + const auto rc = fs.copy_file(appdata_src_path, appdata_dst_path, fs::copy_options::overwrite_existing, ec); + + if (!rc || ec) + { + System::println(System::Color::error, + "Error: Failed to copy file: %s -> %s", + appdata_src_path.string(), + appdata_dst_path.string()); + Checks::exit_fail(VCPKG_LINE_INFO); + } + } +#endif - if (!rc || ec) + const auto pathtxt = get_path_txt_path(); + std::error_code ec; + fs.write_contents(pathtxt, paths.root.generic_u8string(), ec); + if (ec) { - System::println(System::Color::error, - "Error: Failed to copy file: %s -> %s", - appdata_src_path.string(), - appdata_dst_path.string()); + System::println(System::Color::error, "Error: Failed to write file: %s", pathtxt.string()); Checks::exit_fail(VCPKG_LINE_INFO); } + System::println(System::Color::success, "Applied user-wide integration for this vcpkg root."); const fs::path cmake_toolchain = paths.buildsystems / "vcpkg.cmake"; +#if defined(_WIN32) System::println( R"( All MSBuild C++ projects can now #include any installed libraries. @@ -258,17 +281,29 @@ Installing new libraries will make them instantly available. CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", cmake_toolchain.generic_string()); +#else + System::println( + R"( +CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", + cmake_toolchain.generic_string()); +#endif Checks::exit_success(VCPKG_LINE_INFO); } static void integrate_remove(Files::Filesystem& fs) { + std::error_code ec; + bool was_deleted = false; + +#if defined(_WIN32) const fs::path path = get_appdata_targets_path(); - std::error_code ec; - const bool was_deleted = fs.remove(path, ec); + was_deleted |= fs.remove(path, ec); + Checks::check_exit(VCPKG_LINE_INFO, !ec, "Error: Unable to remove user-wide integration: %s", ec.message()); +#endif + was_deleted |= fs.remove(get_path_txt_path(), ec); Checks::check_exit(VCPKG_LINE_INFO, !ec, "Error: Unable to remove user-wide integration: %s", ec.message()); if (was_deleted) @@ -282,7 +317,6 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", Checks::exit_success(VCPKG_LINE_INFO); } -#endif #if defined(WIN32) static void integrate_project(const VcpkgPaths& paths) @@ -343,7 +377,8 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console " vcpkg integrate powershell Enable PowerShell Tab-Completion\n"; #else const char* const INTEGRATE_COMMAND_HELPSTRING = - "No user-wide integration methods are available on this platform\n"; + " vcpkg integrate install Make installed packages available user-wide.\n" + " vcpkg integrate remove Remove user-wide integration\n"; #endif namespace Subcommand @@ -373,7 +408,6 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console { Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); -#if defined(_WIN32) if (args.command_arguments[0] == Subcommand::INSTALL) { return integrate_install(paths); @@ -382,6 +416,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console { return integrate_remove(paths.get_filesystem()); } +#if defined(_WIN32) if (args.command_arguments[0] == Subcommand::PROJECT) { return integrate_project(paths); @@ -392,10 +427,8 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console paths.scripts / "addPoshVcpkgToPowershellProfile.ps1"); Checks::exit_success(VCPKG_LINE_INFO); } +#endif Checks::exit_with_message(VCPKG_LINE_INFO, "Unknown parameter %s for integrate", args.command_arguments[0]); -#else - Checks::exit_success(VCPKG_LINE_INFO); -#endif } } diff --git a/toolsrc/src/vcpkg/userconfig.cpp b/toolsrc/src/vcpkg/userconfig.cpp index 574a97b64..4945fdaaa 100644 --- a/toolsrc/src/vcpkg/userconfig.cpp +++ b/toolsrc/src/vcpkg/userconfig.cpp @@ -29,16 +29,21 @@ namespace namespace vcpkg { - static fs::path get_config_path() + fs::path get_user_dir() { #if defined(_WIN32) - return get_localappdata() / "vcpkg" / "config"; + return get_localappdata() / "vcpkg"; #else auto maybe_home = System::get_environment_variable("HOME"); - return fs::path(maybe_home.value_or("/var")) / ".vcpkg" / "config"; + return fs::path(maybe_home.value_or("/var")) / ".vcpkg"; #endif } + static fs::path get_config_path() + { + return get_user_dir() / "config"; + } + UserConfig UserConfig::try_read_data(const Files::Filesystem& fs) { UserConfig ret; -- cgit v1.2.3 From 5ee8177e50ddf1a07daf045994d507511ea59408 Mon Sep 17 00:00:00 2001 From: pravic Date: Sun, 29 Apr 2018 12:30:04 +0300 Subject: [sciter] Update to 4.1.7.5890 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 5e573c899..cfe94f7ec 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.1.6 +Version: 4.1.7 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 7a10297b2..52248998c 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,8 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION 1f6f9afc6bf3c4f60ea510fc75f89634f282d15d) -set(SCITER_SHA 53be8007c22349e9801c413483d70cad437bc3399686f2c503da9b7aa96bf212e7563b13fff8e62942b0991fa775e87e542b5ff9c3dbc4aff1fd5291200b2c8e) +set(SCITER_REVISION a33d27afd10552c1d24b78d2e539097ebf1b1f60) +set(SCITER_SHA 3d819ba0cbfbd3b0c7355e40c3e6d40806f1a281528d6225835ec2340157afc4c7378cae533a0a2824f9bdfa37c8cdd35774b1e1362cfda3f1529b7bcea4d027) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From 5897e96f9328584177fe9c13ce6b2db64d089962 Mon Sep 17 00:00:00 2001 From: Alexey Gruzdev Date: Mon, 30 Apr 2018 19:30:29 +0100 Subject: [yato] Fixed artifacts copying for non-windows platforms --- ports/yato/portfile.cmake | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ports/yato/portfile.cmake b/ports/yato/portfile.cmake index f688675ba..44ee93782 100644 --- a/ports/yato/portfile.cmake +++ b/ports/yato/portfile.cmake @@ -12,30 +12,30 @@ vcpkg_from_bitbucket( file(COPY "${SOURCE_PATH}/include/yato" DESTINATION "${CURRENT_PACKAGES_DIR}/include" ) +file(COPY "${SOURCE_PATH}/modules/actors/yato" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" +) +file(COPY "${SOURCE_PATH}/modules/config/yato" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DYATO_BUILD_TESTS:BOOL=OFF -DYATO_BUILD_ACTORS:BOOL=ON -DYATO_BUILD_CONFIG:BOOL=ON -DYATO_CONFIG_MANUAL:BOOL=ON + OPTIONS + -DYATO_BUILD_TESTS:BOOL=OFF + -DYATO_BUILD_ACTORS:BOOL=ON + -DYATO_BUILD_CONFIG:BOOL=ON + -DYATO_CONFIG_MANUAL:BOOL=ON + -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=${CURRENT_PACKAGES_DIR}/debug/lib/ + -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG:PATH=${CURRENT_PACKAGES_DIR}/debug/lib/ + -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG:PATH=${CURRENT_PACKAGES_DIR}/debug/lib/ + -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=${CURRENT_PACKAGES_DIR}/lib/ + -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE:PATH=${CURRENT_PACKAGES_DIR}/lib/ + -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE:PATH=${CURRENT_PACKAGES_DIR}/lib/ ) vcpkg_build_cmake() -set(BUILD_ROOT_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") -set(BUILD_ROOT_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - -file(COPY "${BUILD_ROOT_DEBUG}/modules/actors/Debug/YatoActors.lib" - "${BUILD_ROOT_DEBUG}/modules/config/Debug/YatoConfig.lib" - DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/" -) - -file(COPY "${BUILD_ROOT_RELEASE}/modules/actors/Release/YatoActors.lib" - "${BUILD_ROOT_RELEASE}/modules/config/Release/YatoConfig.lib" - DESTINATION "${CURRENT_PACKAGES_DIR}/lib/" -) - # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/yato) file(RENAME ${CURRENT_PACKAGES_DIR}/share/yato/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/yato/copyright) - - - -- cgit v1.2.3 From 7a01d4b3929c2ea337b9cf6bdbbdc7ff1ceca2c1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 30 Apr 2018 13:45:31 -0700 Subject: [yato] Bump CONTROL file version --- ports/yato/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/yato/CONTROL b/ports/yato/CONTROL index f3793fb80..f19519315 100644 --- a/ports/yato/CONTROL +++ b/ports/yato/CONTROL @@ -1,3 +1,3 @@ Source: yato -Version: 1.0 +Version: 1.0-1 Description: Modern C++14 containers and utilities, actors system, typesafe config -- cgit v1.2.3 From 286c400417e323693cba8c6f04c1be7898cc0e75 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 30 Apr 2018 14:54:50 -0700 Subject: [docs] Update docs --- docs/maintainers/vcpkg_build_cmake.md | 3 +++ docs/maintainers/vcpkg_find_acquire_program.md | 1 + 2 files changed, 4 insertions(+) diff --git a/docs/maintainers/vcpkg_build_cmake.md b/docs/maintainers/vcpkg_build_cmake.md index ddfa46f6b..1e17eb975 100644 --- a/docs/maintainers/vcpkg_build_cmake.md +++ b/docs/maintainers/vcpkg_build_cmake.md @@ -15,6 +15,9 @@ The underlying buildsystem will be instructed to not parallelize The target passed to the cmake build command (`cmake --build . --target `). If not specified, no target will be passed. +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. + ## Notes: This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the diff --git a/docs/maintainers/vcpkg_find_acquire_program.md b/docs/maintainers/vcpkg_find_acquire_program.md index 8107c8dd2..57a2bf75a 100644 --- a/docs/maintainers/vcpkg_find_acquire_program.md +++ b/docs/maintainers/vcpkg_find_acquire_program.md @@ -25,6 +25,7 @@ The current list of programs includes: - NASM - NINJA - YASM +- ARIA2 (Downloader) Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md). -- cgit v1.2.3 From 827c893b8e8224ca7c02a0d674fa9dba626aedb8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 27 Apr 2018 03:15:17 -0700 Subject: [sfml] Support Linux --- ports/freeglut/CONTROL | 2 +- ports/freeglut/portfile.cmake | 12 +++- ports/libflac/CMakeLists.txt | 30 ++++++---- ports/libflac/CONTROL | 2 +- ports/openal-soft/CONTROL | 2 +- ports/openal-soft/portfile.cmake | 16 ++++-- ports/sfml/CMakeLists.txt | 115 +++++---------------------------------- ports/sfml/CONTROL | 4 +- ports/sfml/portfile.cmake | 29 ++++++---- 9 files changed, 77 insertions(+), 135 deletions(-) diff --git a/ports/freeglut/CONTROL b/ports/freeglut/CONTROL index d7c3801f7..8baaba1dc 100644 --- a/ports/freeglut/CONTROL +++ b/ports/freeglut/CONTROL @@ -1,3 +1,3 @@ Source: freeglut -Version: 3.0.0-3 +Version: 3.0.0-4 Description: Open source implementation of GLUT with source and binary backwards compatibility. diff --git a/ports/freeglut/portfile.cmake b/ports/freeglut/portfile.cmake index 3e6248126..913fc90ff 100644 --- a/ports/freeglut/portfile.cmake +++ b/ports/freeglut/portfile.cmake @@ -7,6 +7,10 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message("Freeglut currently requires the following libraries from the system package manager:\n opengl\n glu\n libx11\n\nThese can be installed on Ubuntu systems via apt-get install libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev") +endif() + # disable debug suffix, because FindGLUT.cmake from CMake 3.8 doesn't support it file(READ ${SOURCE_PATH}/CMakeLists.txt FREEGLUT_CMAKELISTS) string(REPLACE "SET( CMAKE_DEBUG_POSTFIX \"d\" )" @@ -41,9 +45,11 @@ string(REPLACE "pragma comment (lib, \"freeglutd.lib\")" file(WRITE ${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h "${FREEGLUT_STDH}") # Rename static lib (otherwise it's incompatible with FindGLUT.cmake) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/lib/freeglut.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut.lib) +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/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/lib/freeglut.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut.lib) + endif() endif() # Clean diff --git a/ports/libflac/CMakeLists.txt b/ports/libflac/CMakeLists.txt index 518419c4f..d6f01399a 100644 --- a/ports/libflac/CMakeLists.txt +++ b/ports/libflac/CMakeLists.txt @@ -7,15 +7,22 @@ if(NOT DEFINED LIBFLAC_ARCHITECTURE) message(FATAL_ERROR "Target architecture not specified") endif() -file(GLOB LIBFLAC_SOURCES - ${PROJECT_SOURCE_DIR}/src/libFLAC/*.c - ${PROJECT_SOURCE_DIR}/src/share/win_utf8_io/win_utf8_io.c) +file(GLOB LIBFLAC_SOURCES src/libFLAC/*.c) -file(GLOB LIBFLACXX_SOURCES - ${PROJECT_SOURCE_DIR}/src/libFLAC++/*.cpp) +if(WIN32) + list(APPEND LIBFLAC_SOURCES src/share/win_utf8_io/win_utf8_io.c) +else() + list(FILTER LIBFLAC_SOURCES EXCLUDE REGEX "windows[^/]*$") + + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h "#include ") + include_directories(${CMAKE_CURRENT_BINARY_DIR}) + add_definitions(-DHAVE_CONFIG_H) +endif() + +file(GLOB LIBFLACXX_SOURCES src/libFLAC++/*.cpp) -include_directories(${PROJECT_SOURCE_DIR}/include) -include_directories(${PROJECT_SOURCE_DIR}/src/libFLAC/include) +include_directories(include) +include_directories(src/libFLAC/include) if(NOT LIBFLAC_ARCHITECTURE MATCHES arm) add_definitions(-DFLAC__SSE_OS) @@ -44,14 +51,15 @@ endif() add_definitions(-DPACKAGE_VERSION="1.3.2") add_definitions(-DFLAC__HAS_OGG) add_definitions(-DFLAC__ALIGN_MALLOC_DATA) # 32 byte boundary +add_definitions(-DHAVE_LROUND) add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_NONSTDC_NO_WARNINGS) add_library(libFLAC ${LIBFLAC_SOURCES}) add_library(libFLACXX ${LIBFLACXX_SOURCES}) -set_target_properties(libFLAC PROPERTIES OUTPUT_NAME flac) -set_target_properties(libFLACXX PROPERTIES OUTPUT_NAME flac++) +set_target_properties(libFLAC PROPERTIES OUTPUT_NAME FLAC) +set_target_properties(libFLACXX PROPERTIES OUTPUT_NAME FLAC++) find_library(OGG_LIBRARY ogg) find_path(OGG_INCLUDE_DIR ogg/ogg.h) @@ -73,10 +81,10 @@ install(TARGETS libFLAC libFLACXX LIBRARY DESTINATION lib) if(NOT DEFINED LIBFLAC_SKIP_HEADERS) - install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/FLAC/ + install(DIRECTORY include/FLAC/ DESTINATION include/FLAC FILES_MATCHING PATTERN "*.h") - install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/FLAC++/ + install(DIRECTORY include/FLAC++/ DESTINATION include/FLAC++ FILES_MATCHING PATTERN "*.h") endif() diff --git a/ports/libflac/CONTROL b/ports/libflac/CONTROL index ca2995d68..1a16c7a6a 100644 --- a/ports/libflac/CONTROL +++ b/ports/libflac/CONTROL @@ -1,4 +1,4 @@ Source: libflac -Version: 1.3.2-4 +Version: 1.3.2-5 Description: Library for manipulating FLAC files Build-Depends: libogg diff --git a/ports/openal-soft/CONTROL b/ports/openal-soft/CONTROL index f7af2c687..cd7078c08 100644 --- a/ports/openal-soft/CONTROL +++ b/ports/openal-soft/CONTROL @@ -1,3 +1,3 @@ Source: openal-soft -Version: 1.18.2-1 +Version: 1.18.2-2 Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake index 527b4ba60..f35e81b4e 100644 --- a/ports/openal-soft/portfile.cmake +++ b/ports/openal-soft/portfile.cmake @@ -24,6 +24,14 @@ else() set(OPENAL_LIBTYPE "STATIC") endif() +if(VCPKG_CMAKE_SYSTEM_NAME) + set(ALSOFT_REQUIRE_WINDOWS OFF) + set(ALSOFT_REQUIRE_LINUX ON) +else() + set(ALSOFT_REQUIRE_WINDOWS ON) + set(ALSOFT_REQUIRE_LINUX OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -36,7 +44,7 @@ vcpkg_configure_cmake( -DALSOFT_CONFIG=OFF -DALSOFT_HRTF_DEFS=OFF -DALSOFT_AMBDEC_PRESETS=OFF - -DALSOFT_BACKEND_ALSA=OFF + -DALSOFT_BACKEND_ALSA=${ALSOFT_REQUIRE_LINUX} -DALSOFT_BACKEND_OSS=OFF -DALSOFT_BACKEND_SOLARIS=OFF -DALSOFT_BACKEND_SNDIO=OFF @@ -47,9 +55,9 @@ vcpkg_configure_cmake( -DALSOFT_BACKEND_JACK=OFF -DALSOFT_BACKEND_OPENSL=OFF -DALSOFT_BACKEND_WAVE=ON - -DALSOFT_REQUIRE_WINMM=ON - -DALSOFT_REQUIRE_DSOUND=ON - -DALSOFT_REQUIRE_MMDEVAPI=ON + -DALSOFT_REQUIRE_WINMM=${ALSOFT_REQUIRE_WINDOWS} + -DALSOFT_REQUIRE_DSOUND=${ALSOFT_REQUIRE_WINDOWS} + -DALSOFT_REQUIRE_MMDEVAPI=${ALSOFT_REQUIRE_WINDOWS} ) vcpkg_install_cmake() diff --git a/ports/sfml/CMakeLists.txt b/ports/sfml/CMakeLists.txt index e8e16edec..f6ab26235 100644 --- a/ports/sfml/CMakeLists.txt +++ b/ports/sfml/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 2.6) project(SFML) -include_directories(${PROJECT_SOURCE_DIR}/include) -include_directories(${PROJECT_SOURCE_DIR}/src) +include_directories(include) +include_directories(src) if(NOT BUILD_SHARED_LIBS) add_definitions(-DSFML_STATIC) @@ -13,110 +13,23 @@ add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS) # import SFML's 'sfml_add_library' macro and find_package utils set(VERSION_MAJOR 2) -set(SFML_OS_WINDOWS ON) +include(cmake/Config.cmake) set(SFML_GENERATE_PDB ON) -include(cmake/macros.cmake) +include(cmake/Macros.cmake) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules/) -# system module +add_subdirectory(src/SFML/System) +add_subdirectory(src/SFML/Window) +add_subdirectory(src/SFML/Network) +add_subdirectory(src/SFML/Audio) +add_subdirectory(src/SFML/Graphics) -file(GLOB SFML_SYSTEM_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/System/*.cpp - ${PROJECT_SOURCE_DIR}/src/SFML/System/Win32/*cpp) - -sfml_add_library(sfml-system - SOURCES ${SFML_SYSTEM_SOURCES} - EXTERNAL_LIBS winmm) - -# window module - -file(GLOB SFML_WINDOW_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Window/*.cpp - ${PROJECT_SOURCE_DIR}/src/SFML/Window/Win32/*cpp) - -list(REMOVE_ITEM SFML_WINDOW_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Window/EGLCheck.cpp - ${PROJECT_SOURCE_DIR}/src/SFML/Window/EglContext.cpp) - -sfml_add_library(sfml-window - SOURCES ${SFML_WINDOW_SOURCES} - DEPENDS sfml-system - EXTERNAL_LIBS winmm gdi32 opengl32) - -# network module - -file(GLOB SFML_NETWORK_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Network/*.cpp - ${PROJECT_SOURCE_DIR}/src/SFML/Network/Win32/*cpp) - -sfml_add_library(sfml-network - SOURCES ${SFML_NETWORK_SOURCES} - DEPENDS sfml-system - EXTERNAL_LIBS ws2_32) - -# audio module - -file(GLOB SFML_AUDIO_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Audio/*.cpp) - -find_package(OpenAL REQUIRED) -find_package(Vorbis REQUIRED) -find_package(FLAC REQUIRED) - -sfml_add_library(sfml-audio - SOURCES ${SFML_AUDIO_SOURCES} - DEPENDS sfml-system - EXTERNAL_LIBS ${OPENAL_LIBRARY} ${VORBIS_LIBRARIES} ${FLAC_LIBRARY}) - -target_include_directories(sfml-audio SYSTEM PRIVATE ${OPENAL_INCLUDE_DIR}) -target_include_directories(sfml-audio SYSTEM PRIVATE ${VORBIS_INCLUDE_DIRS}) -target_include_directories(sfml-audio SYSTEM PRIVATE ${FLAC_INCLUDE_DIR}) - -# graphics module - -file(GLOB SFML_GRAPHICS_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Graphics/*.cpp) - -find_package(JPEG REQUIRED) -find_package(Freetype REQUIRED) # fails to find debug lib -if(CMAKE_BUILD_TYPE MATCHES Debug) - find_library(FREETYPE_DEBUG_LIBRARY freetyped) - set(FREETYPE_ACTUAL_LIBRARY ${FREETYPE_DEBUG_LIBRARY}) -else() - set(FREETYPE_ACTUAL_LIBRARY ${FREETYPE_LIBRARY}) +if(WIN32) + set(LIB_SUFFIX /manual-link) + add_subdirectory(src/SFML/Main) + unset(LIB_SUFFIX) endif() -find_path(STB_HEADERS stb_image.h) - -sfml_add_library(sfml-graphics - SOURCES ${SFML_GRAPHICS_SOURCES} - DEPENDS sfml-system sfml-window - EXTERNAL_LIBS ${FREETYPE_ACTUAL_LIBRARY} ${JPEG_LIBRARY} opengl32) - -target_include_directories(sfml-graphics SYSTEM PRIVATE ${STB_HEADERS}) -target_include_directories(sfml-graphics SYSTEM PRIVATE ${FREETYPE_INCLUDE_DIRS}) -target_include_directories(sfml-graphics SYSTEM PRIVATE ${JPEG_INCLUDE_DIR}) -set_target_properties(sfml-graphics PROPERTIES COMPILE_FLAGS -DSTBI_FAILURE_USERMSG) - -# main module - -add_library(sfml-main STATIC ${PROJECT_SOURCE_DIR}/src/SFML/Main/MainWin32.cpp) -set_target_properties(sfml-main PROPERTIES DEBUG_POSTFIX -d) -install(TARGETS sfml-main ARCHIVE DESTINATION lib) - -# headers if(NOT DEFINED SFML_SKIP_HEADERS) - install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include) + install(DIRECTORY include/ DESTINATION include) endif() - -# log linked libraries - -message(STATUS "Link-time dependencies:") -message(STATUS " " ${VORBIS_LIBRARY}) -message(STATUS " " ${VORBISFILE_LIBRARY}) -message(STATUS " " ${VORBISENC_LIBRARY}) -message(STATUS " " ${OGG_LIBRARY}) -message(STATUS " " ${OPENAL_LIBRARY}) -message(STATUS " " ${FLAC_LIBRARY}) -message(STATUS " " ${FREETYPE_ACTUAL_LIBRARY}) -message(STATUS " " ${JPEG_LIBRARY}) diff --git a/ports/sfml/CONTROL b/ports/sfml/CONTROL index 778638482..e27af6646 100644 --- a/ports/sfml/CONTROL +++ b/ports/sfml/CONTROL @@ -1,4 +1,4 @@ Source: sfml -Version: 2.4.2-2 +Version: 2.4.2-3 Description: Simple and fast multimedia library -Build-Depends: freetype, libflac, libjpeg-turbo, libogg, libvorbis, openal-soft, stb +Build-Depends: freetype, libflac, libjpeg-turbo, libogg, libvorbis, openal-soft, stb, freeglut (!uwp&&!windows) diff --git a/ports/sfml/portfile.cmake b/ports/sfml/portfile.cmake index ea4cfd138..974383eb4 100644 --- a/ports/sfml/portfile.cmake +++ b/ports/sfml/portfile.cmake @@ -1,19 +1,24 @@ include(vcpkg_common_functions) vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH - REPO "sfml/sfml" - REF "2.4.2" + REPO SFML/SFML + REF 2.4.2 HEAD_REF master - SHA512 8acfdf320939c953a9a3413398f82d02d68a56a337f1366c2677c14ce032baa8ba059113ac3c91bb6e6fc22eef119369a265be7ef6894526e6a97a01f37e1972) - + SHA512 8acfdf320939c953a9a3413398f82d02d68a56a337f1366c2677c14ce032baa8ba059113ac3c91bb6e6fc22eef119369a265be7ef6894526e6a97a01f37e1972 +) file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message("SFML currently requires the following libraries from the system package manager:\n libudev\n libx11\n libxrandr\n opengl\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxrandr-dev libxi-dev libudev-dev mesa-common-dev") +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS_DEBUG - -DSFML_SKIP_HEADERS=ON) + OPTIONS_DEBUG + -DSFML_SKIP_HEADERS=ON +) vcpkg_install_cmake() vcpkg_copy_pdbs() @@ -24,13 +29,15 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endif() # move sfml-main to manual link dir -file(COPY ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) -file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib) +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) + file(COPY ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) + file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib) +endif() # At the time of writing, HEAD has license.md instead of license.txt -if (VCPKG_HEAD_VERSION) +if(VCPKG_HEAD_VERSION) file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright) else() file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright) -- cgit v1.2.3 From c4caf29213f54b1786102c1b4dc085b6d7142998 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 30 Apr 2018 19:08:34 -0700 Subject: [vcpkg] Fix temporary download directory when vcpkg is located at the root of a drive --- scripts/VcpkgPowershellUtils.ps1 | 17 ++++++++++++++--- scripts/fetchTool.ps1 | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index fdd89e7b9..3ea18116b 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -89,7 +89,13 @@ function vcpkgGetSHA512([Parameter(Mandatory=$true)][string]$filePath) if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Utility\Get-FileHash') { Write-Verbose("Hashing with Microsoft.PowerShell.Utility\Get-FileHash") - $hash = (Microsoft.PowerShell.Utility\Get-FileHash -Path $filePath -Algorithm SHA512).Hash + $hashresult = Microsoft.PowerShell.Utility\Get-FileHash -Path $filePath -Algorithm SHA512 -ErrorVariable hashError + if ($hashError) + { + Start-Sleep 3 + $hashresult = Microsoft.PowerShell.Utility\Get-FileHash -Path $filePath -Algorithm SHA512 -ErrorVariable Stop + } + $hash = $hashresult.Hash } elseif(vcpkgHasCommand -commandName 'Pscx\Get-Hash') { @@ -177,7 +183,7 @@ function vcpkgDownloadFileWithAria2( [Parameter(Mandatory=$true)][string]$ari return } - $ec = vcpkgInvokeCommand "$aria2exe" "--dir `"$parentDir`" --out `"$filename.part`" $url" + $ec = vcpkgInvokeCommand "$aria2exe" "--dir=`"$parentDir`" --out=`"$filename.part`" $url" if ($ec -ne 0) { Write-Host "Could not download $url" @@ -202,7 +208,12 @@ function vcpkgExtractFileWith7z([Parameter(Mandatory=$true)][string]$sevenZipExe Write-Host "Could not extract $archivePath" throw } - Rename-Item -Path "$destinationPartial" -NewName $destinationDir + Rename-Item -Path "$destinationPartial" -NewName $destinationDir -ErrorVariable renameResult + if ($renameResult) + { + Start-Sleep 3 + Rename-Item -Path "$destinationPartial" -NewName $destinationDir -ErrorAction Stop + } } function vcpkgExtractZipFile( [Parameter(Mandatory=$true)][string]$archivePath, diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index dd3f0f9f4..eca405b62 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -4,6 +4,7 @@ param( ) Set-StrictMode -Version Latest + $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition . "$scriptsDir\VcpkgPowershellUtils.ps1" @@ -12,6 +13,7 @@ $vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root $downloadsDir = "$vcpkgRootDir\downloads" vcpkgCreateDirectoryIfNotExists $downloadsDir +$downloadsDir = Resolve-Path $downloadsDir function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) { -- cgit v1.2.3 From 793019b9cd362aefac06cd7f94d6e6db77d31b69 Mon Sep 17 00:00:00 2001 From: Mateusz Loskot Date: Tue, 1 May 2018 10:14:18 +0200 Subject: [GEOS] Generate debug library names with `d` suffix (#3371) * [GEOS] Generate debug library names with `d` suffix Currently geos.lib name is used for both, debug and optimised GEOS libraries. This leads to situation when: ``` find_library(GEOS_LIBRARY_DEBUG NAMES geos) find_library(GEOS_LIBRARY_RELEASE NAMES geos) ``` finds the same library for both ``` GEOS_LIBRARY_DEBUG=D:/vcpkg/installed/x64-windows/debug/lib/geos.lib GEOS_LIBRARY_RELEASE=D:/vcpkg/installed/x64-windows/debug/lib/geos.lib ``` This is minimal patch that works around the problem. Next, complete fix should be submitted to GEOS upstream, preferably using exported targets. * [libspatialite] Add missing geos suffixes in static builds --- ports/gdal/portfile.cmake | 2 +- ports/geos/CONTROL | 2 +- ports/geos/portfile.cmake | 11 +++++++---- ports/libspatialite/portfile.cmake | 4 ++-- ports/spatialite-tools/portfile.cmake | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 10e2ceab8..ba77b624a 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -55,7 +55,7 @@ file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.lib" PNG_LIBRA # Setup geos libraries + include path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" GEOS_INCLUDE_DIR) file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib" GEOS_LIBRARY_REL) -file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geos_c.lib" GEOS_LIBRARY_DBG) +file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib" GEOS_LIBRARY_DBG) # Setup expat libraries + include path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" EXPAT_INCLUDE_DIR) diff --git a/ports/geos/CONTROL b/ports/geos/CONTROL index 2b192d088..1a32a8103 100644 --- a/ports/geos/CONTROL +++ b/ports/geos/CONTROL @@ -1,3 +1,3 @@ Source: geos -Version: 3.6.2-2 +Version: 3.6.2-3 Description: Geometry Engine Open Source diff --git a/ports/geos/portfile.cmake b/ports/geos/portfile.cmake index 68b4ab9f7..e5a404254 100644 --- a/ports/geos/portfile.cmake +++ b/ports/geos/portfile.cmake @@ -31,7 +31,10 @@ file(DOWNLOAD http://svn.osgeo.org/geos/branches/3.6/cmake/modules/GenerateSourc vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DGEOS_ENABLE_TESTS=False + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DCMAKE_DEBUG_POSTFIX=d + -DGEOS_ENABLE_TESTS=False ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -39,11 +42,11 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/geos) file(RENAME ${CURRENT_PACKAGES_DIR}/share/geos/COPYING ${CURRENT_PACKAGES_DIR}/share/geos/copyright) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libgeos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libgeos.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libgeos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libgeosd.lib) else() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/geos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/geos.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/geos_c.lib ${CURRENT_PACKAGES_DIR}/debug/lib/geos_c.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/geos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/geosd.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/geos_c.lib ${CURRENT_PACKAGES_DIR}/debug/lib/geos_cd.lib) endif() diff --git a/ports/libspatialite/portfile.cmake b/ports/libspatialite/portfile.cmake index 1c5cfed19..59a1499f4 100644 --- a/ports/libspatialite/portfile.cmake +++ b/ports/libspatialite/portfile.cmake @@ -24,14 +24,14 @@ if(VCPKG_CRT_LINKAGE STREQUAL dynamic) set(CL_FLAGS_DBG "/MDd /Zi") set(CL_FLAGS_REL "/MD /Ox") set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib") - set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_c.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib") set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib") set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib") else() set(CL_FLAGS_DBG "/MTd /Zi") set(CL_FLAGS_REL "/MT /Ox") set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libgeos_c.lib ${CURRENT_INSTALLED_DIR}/lib/libgeos.lib") - set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libgeos_c.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libgeos.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libgeos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libgeosd.lib") set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib") set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzma.lib ws2_32.lib") endif() diff --git a/ports/spatialite-tools/portfile.cmake b/ports/spatialite-tools/portfile.cmake index 6bfd19966..25de070ee 100644 --- a/ports/spatialite-tools/portfile.cmake +++ b/ports/spatialite-tools/portfile.cmake @@ -23,7 +23,7 @@ if(VCPKG_CRT_LINKAGE STREQUAL dynamic) set(CL_FLAGS_DBG "/MDd /Zi") set(CL_FLAGS_REL "/MD /Ox") set(GEOS_LIBS_REL "${LDIR}/lib/geos_c.lib") - set(GEOS_LIBS_DBG "${LDIR}/debug/lib/geos_c.lib") + set(GEOS_LIBS_DBG "${LDIR}/debug/lib/geos_cd.lib") set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib") set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib") set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib") -- cgit v1.2.3 From 39d38f5aea18ef78e71a380a577970af97cbb38f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 30 Apr 2018 15:53:00 -0700 Subject: [poco] Suffix binaries with mt when building against static CRT --- ports/poco/CONTROL | 2 +- ports/poco/portfile.cmake | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index e979e2247..c3d177430 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,5 +1,5 @@ Source: poco -Version: 1.8.1-1 +Version: 1.8.1-2 Build-Depends: zlib, pcre, sqlite3, expat Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 399f1a064..1ea06d4ff 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -18,6 +18,7 @@ vcpkg_apply_patches( ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" POCO_STATIC) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" POCO_MT) if("mysql" IN_LIST FEATURES) # enabling MySQL support @@ -31,6 +32,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DPOCO_STATIC=${POCO_STATIC} + -DPOCO_MT=${POCO_MT} -DENABLE_SEVENZIP=ON -DENABLE_TESTS=OFF -DPOCO_UNBUNDLED=ON # OFF means: using internal copy of sqlite, libz, pcre, expat, ... -- cgit v1.2.3 From 4d28651f9ea0c6681d73b133386a42e1924d4b33 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 28 Apr 2018 14:39:25 -0700 Subject: [range-v3] Split ports to enable newer range-v3 versions on linux --- ports/range-v3-vs2015/CONTROL | 3 ++ ports/range-v3-vs2015/portfile.cmake | 14 +++++++++ ports/range-v3/CONTROL | 3 +- ports/range-v3/portfile.cmake | 56 ++++++++++++++++++++---------------- 4 files changed, 51 insertions(+), 25 deletions(-) create mode 100644 ports/range-v3-vs2015/CONTROL create mode 100644 ports/range-v3-vs2015/portfile.cmake diff --git a/ports/range-v3-vs2015/CONTROL b/ports/range-v3-vs2015/CONTROL new file mode 100644 index 000000000..62c9f63ce --- /dev/null +++ b/ports/range-v3-vs2015/CONTROL @@ -0,0 +1,3 @@ +Source: range-v3-vs2015 +Version: 20151130-vcpkg5 +Description: Range library for C++11/14/17. diff --git a/ports/range-v3-vs2015/portfile.cmake b/ports/range-v3-vs2015/portfile.cmake new file mode 100644 index 000000000..bc7153a53 --- /dev/null +++ b/ports/range-v3-vs2015/portfile.cmake @@ -0,0 +1,14 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/Range-V3-VS2015 + REF 423bcae5cf18948591361329784d3b12ef41711b + SHA512 c6756bc6b5131c4c0ffb96550fb40decf734fc8c30e3d51c5c2bf03aae4d7426de36e896a1abf0a200a49a3906d4b60c1cf52f43504554b64d89c91de3e92746 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/range-v3-vs2015) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/range-v3-vs2015/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/range-v3-vs2015/copyright) +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") +vcpkg_copy_pdbs() diff --git a/ports/range-v3/CONTROL b/ports/range-v3/CONTROL index 6325b3a55..ee21c16c9 100644 --- a/ports/range-v3/CONTROL +++ b/ports/range-v3/CONTROL @@ -1,3 +1,4 @@ Source: range-v3 -Version: 20151130-vcpkg5 +Version: 0.3.5 +Build-Depends: range-v3-vs2015 (windows), range-v3-vs2015 (uwp) Description: Range library for C++11/14/17. diff --git a/ports/range-v3/portfile.cmake b/ports/range-v3/portfile.cmake index b4c0c1403..cbeb38bf0 100644 --- a/ports/range-v3/portfile.cmake +++ b/ports/range-v3/portfile.cmake @@ -1,28 +1,36 @@ -#header-only library include(vcpkg_common_functions) -# set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/range-v3-6eb5c831ffe12cd5cb96390dbe917ca1b248772d) -# vcpkg_download_distfile(ARCHIVE -# URLS "https://github.com/ericniebler/range-v3/archive/6eb5c831ffe12cd5cb96390dbe917ca1b248772d.zip" -# FILENAME "range-v3-6eb5c831ffe12cd5cb96390dbe917ca1b248772d.zip" -# SHA512 2605af46c2c049f66dc982b1c4e506a8f115d47cc6c61a80f08921c667e52ad3097c485280ee43711c84b84a1490929e085b89cf9ad4c83b93222315210e92aa -# ) -# vcpkg_download_distfile(DIFF -# URLS "https://github.com/Microsoft/Range-V3-VS2015/compare/fork_base...00ed689bac7a9dcd8601dbde382758675516799d.diff" -# FILENAME "range-v3-fork_base_to_00ed689bac7a9dcd8601dbde382758675516799d.diff" -# SHA512 6158cd9ee1f5957294a26dc780c881839e0bae8610688a618cd11d47df34d5e543fa09ac9a3b33d4a65af8eceae0a6a3055621206c291ef75f982e7915daf91a -# ) -# vcpkg_extract_source_archive(${ARCHIVE}) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + message("The current range-v3 releases are not compatible with the current MSVC releases.") + message("The latest available range-v3 fork compatible with MSVC will be used instead.") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ericniebler/range-v3 + REF 0.3.5 + SHA512 0b8b97c32760f19e7a3f35b0f28b0c15c7735fbd1aa54f685c58faf50bf2cf112aed4ac7cfa9154b9caf7047400a6c7fd5c33d978f2e3cec6bc392a758aeabad + HEAD_REF master + ) -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Microsoft/Range-V3-VS2015 - REF 423bcae5cf18948591361329784d3b12ef41711b - SHA512 c6756bc6b5131c4c0ffb96550fb40decf734fc8c30e3d51c5c2bf03aae4d7426de36e896a1abf0a200a49a3906d4b60c1cf52f43504554b64d89c91de3e92746 - HEAD_REF master -) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRANGE_V3_NO_TESTING=ON + -DRANGE_V3_NO_EXAMPLE=ON + -DRANGE_V3_NO_PERF=ON + -DRANGE_V3_NO_HEADER_CHECK=ON + ) -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/range-v3) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/range-v3/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/range-v3/copyright) -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") -vcpkg_copy_pdbs() + vcpkg_install_cmake() + + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/range-v3) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + + vcpkg_copy_pdbs() + + file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/range-v3) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/range-v3/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/range-v3/copyright) +endif() -- cgit v1.2.3 From 316a3cb2452ab7faf8cf1d0b03d739617b5d09e7 Mon Sep 17 00:00:00 2001 From: Jozef Izso Date: Tue, 1 May 2018 10:48:16 +0200 Subject: Clarify toolset numbers and Visual Studio versions (#3355) --- docs/users/triplets.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/users/triplets.md b/docs/users/triplets.md index eb83aeb10..911ab5469 100644 --- a/docs/users/triplets.md +++ b/docs/users/triplets.md @@ -35,6 +35,9 @@ Specifies the C/C++ compiler toolchain to use. This can be set to `v141`, `v140`, or left blank. If left blank, we select the latest compiler toolset available on your machine. +Visual Studio 2015 platform toolset is `v140` +Visual Studio 2017 platform toolset is `v141` + ## Per-port customization The CMake Macro `PORT` will be set when interpreting the triplet file and can be used to change settings (such as `VCPKG_LIBRARY_LINKAGE`) on a per-port basis. -- cgit v1.2.3 From 8eac56110738c06b7f0afd9f2815e1366d8ecc65 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 1 May 2018 15:49:11 -0700 Subject: [abseil][aws-sdk-cpp][directxmesh][directxtex][directxtk][discord-rpc][exiv2][folly][jsonnet][libuv][ms-gsl][nuklear][rocksdb][rs-core-lib][thrift][unicorn][zeromq] Upgrades --- ports/abseil/CMakeLists.txt | 1 + ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- ports/directxmesh/CONTROL | 2 +- ports/directxmesh/portfile.cmake | 4 ++-- ports/directxtex/CONTROL | 2 +- ports/directxtex/portfile.cmake | 4 ++-- ports/directxtk/CONTROL | 2 +- ports/directxtk/portfile.cmake | 4 ++-- ports/discord-rpc/CONTROL | 2 +- ports/discord-rpc/portfile.cmake | 4 ++-- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/folly/CONTROL | 2 +- ports/folly/portfile.cmake | 4 ++-- ports/jsonnet/CONTROL | 2 +- ports/jsonnet/portfile.cmake | 4 ++-- ports/libuv/CONTROL | 2 +- ports/libuv/portfile.cmake | 4 ++-- ports/ms-gsl/CONTROL | 2 +- ports/ms-gsl/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/rocksdb/CONTROL | 2 +- ports/rocksdb/portfile.cmake | 4 ++-- ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/unicorn/CONTROL | 2 +- ports/unicorn/portfile.cmake | 4 ++-- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 4 ++-- 35 files changed, 52 insertions(+), 51 deletions(-) diff --git a/ports/abseil/CMakeLists.txt b/ports/abseil/CMakeLists.txt index ced5b14ca..bed720843 100644 --- a/ports/abseil/CMakeLists.txt +++ b/ports/abseil/CMakeLists.txt @@ -75,6 +75,7 @@ add_sublibrary(utility) target_link_public_libraries(algorithm base meta) target_link_public_libraries(container algorithm base memory) +target_link_public_libraries(debugging base) target_link_public_libraries(memory meta) target_link_public_libraries(meta base) target_link_public_libraries(numeric base) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index b1a1def7f..48e1dc27a 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-04-12 +Version: 2018-04-25-1 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 71d26de69..d9568b79d 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF a7e522daf1ec9cda69b356472f662142dd0c1215 - SHA512 250b602fc3f5a4c3b6522ef0f49bdf63db0070289cb415cb31bb672b95b35dc9494f881adeb1b090927b1cd942c3674b6142747f601c8f7233bd12d4078583f3 + REF ea0e750e52ee223db34a242f9a7229ac04a0f473 + SHA512 1115fdf784eaa18c8287c6d40e773f0a4e8241db6fe8f71a17bb7018c715db0459803e6ebaeac31673c80fbc24505795e7b0783ef04d1e5e8d5359725f3698bf HEAD_REF master ) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index fbc86b58f..1a4226b9a 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,5 +1,5 @@ Source: aws-sdk-cpp -Version: 1.4.33 +Version: 1.4.38 Description: AWS SDK for C++ Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows) Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 815926ddd..11e7a5056 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.4.33 - SHA512 ebe8e402107b7b70a9b397c94ad981ff02d97e10e6fd8337f19b732185ecbb79e132eecd513300ce733a765fd780dd765c1d2b34479e5e1d891fa771722bad81 + REF 1.4.38 + SHA512 ad0ea1fa8ca63da5d936d28b1df1e9d0a609547956b5a25c0fac4043c5ba912ef33e6ee4da7898d804eee4ccb9289540ebdf3a91a101c9d439daef78903cd087 HEAD_REF master ) diff --git a/ports/directxmesh/CONTROL b/ports/directxmesh/CONTROL index 41b26ef1a..8b8206540 100644 --- a/ports/directxmesh/CONTROL +++ b/ports/directxmesh/CONTROL @@ -1,3 +1,3 @@ Source: directxmesh -Version: feb2018-eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9 +Version: apr2018 Description: DirectXMesh geometry processing library \ No newline at end of file diff --git a/ports/directxmesh/portfile.cmake b/ports/directxmesh/portfile.cmake index 6d64d3658..090e0df36 100644 --- a/ports/directxmesh/portfile.cmake +++ b/ports/directxmesh/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXMesh - REF eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9 - SHA512 35a6be07fbdf5d9a39e7f5a3716057d09643d0c4bb43d39beae4233ca6941d2e2318b826dcc4a385dfa512675c7e28f320067b88bb325943b6532c8e65ebcd1b + REF apr2018 + SHA512 960e28665e4e79358e2985923e9fc9dbebc2ae5f8acb880b1f3990f2dc86683c266d41f14b0526fc391629c608b879915f88ce091eaee619debb48fc39fa9e3d HEAD_REF master ) diff --git a/ports/directxtex/CONTROL b/ports/directxtex/CONTROL index 8d47b6302..0d428284e 100644 --- a/ports/directxtex/CONTROL +++ b/ports/directxtex/CONTROL @@ -1,3 +1,3 @@ Source: directxtex -Version: feb2018b +Version: apr2018 Description: DirectXTex texture processing library \ No newline at end of file diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake index ec466e0d6..41423a6cc 100644 --- a/ports/directxtex/portfile.cmake +++ b/ports/directxtex/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTex - REF feb2018b - SHA512 7ab88ea863947ec279c9c83bd6dd48e15345430c750c7215c22998661fad1a711f207c57227bc5cc3cddfb5e0a89a8971d7ef3319057636e2b6f3e2e607ea0cb + REF apr2018 + SHA512 b4e55358628c13f2a8f1f3cb0258a0d126057bc1dfa45e645e0ec21203cdda091c8244deeb775ec950ed534bddd82b71aa1d00f7356bf7f7c49a072bd206b373 HEAD_REF master ) diff --git a/ports/directxtk/CONTROL b/ports/directxtk/CONTROL index 1861befc1..7c69aeba2 100644 --- a/ports/directxtk/CONTROL +++ b/ports/directxtk/CONTROL @@ -1,3 +1,3 @@ Source: directxtk -Version: feb2018 +Version: apr2018 Description: A collection of helper classes for writing DirectX 11.x code in C++. diff --git a/ports/directxtk/portfile.cmake b/ports/directxtk/portfile.cmake index 18ff47218..da7d9b40c 100644 --- a/ports/directxtk/portfile.cmake +++ b/ports/directxtk/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTK - REF feb2018 - SHA512 0f123f6fa26bf5aebd0d0b3139f655369726581c25eec24d804eebf5dc34b3e45476e8a1679bf1a294b011bf32e19c5e2a63a385ecb8774dfacee3e8833c5b9e + REF apr2018 + SHA512 d7e58883a7c18e239964ca0da62441446af233d99e221a6d23f1a3a89991b0bc1e4ca31205895230488abd4e65103f59ec950af42ba379e409783927ee97cc4a HEAD_REF master ) diff --git a/ports/discord-rpc/CONTROL b/ports/discord-rpc/CONTROL index 2e6f44688..82e7515ed 100644 --- a/ports/discord-rpc/CONTROL +++ b/ports/discord-rpc/CONTROL @@ -1,3 +1,3 @@ Source: discord-rpc -Version: 3.2.0 +Version: 3.3.0 Description: Rich Presence allows you to leverage the totally overhauled "Now Playing" section in a Discord user's profile to help people play your game together. diff --git a/ports/discord-rpc/portfile.cmake b/ports/discord-rpc/portfile.cmake index 8e4e090b1..5a2f04c85 100644 --- a/ports/discord-rpc/portfile.cmake +++ b/ports/discord-rpc/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO discordapp/discord-rpc - REF v3.2.0 - SHA512 83a32db240f30f4429c145dd400eba5b9985ea779e492ffa2be2ba2664d97e4dec1f4416ad0f3e6fc908c3c9b30aebe4a8e293e0ef3c60e01fc6f16b5f9a7c16 + REF v3.3.0 + SHA512 8bb2674edefabf75670ceca29364d69e2002152bff9fe55757f4cda03544b4d827ff33595d98e6d8acdc73ca61cef8ab8054ad0a1ffc905cb26496068b15025f HEAD_REF master ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 2e7eaef26..38b8d8d85 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-04-12 +Version: 2018-04-25 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 3e645a91e..2e09b7076 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF c80b1b9d51689692bc865f1a1d16bf7fd2a532c4 - SHA512 72c3801678424cd738423ea28e03c44f4d2bfd6a7e3c2cea53806b3705eebc5e86a293d3aa2bea51f6f426b9e280a3f7b8883bb4e4c627cc413159d9565033a0 + REF 4bcec183d52995169653f619e50cbeadab420807 + SHA512 812cace9303f6d0bb2b1e5833e1b5728316126b0a5cc14662b79a0eb14dd752862e79d4014748320696c65c1466b113c57f106b9fd25f2d7dd4e5a9d4a275d16 HEAD_REF master ) diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 13f732525..2732747b9 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,5 +1,5 @@ Source: folly -Version: 2018.04.16.00 +Version: 2018.04.23.00 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 Default-Features: zlib diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 2a35561d1..2d390a54e 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -17,8 +17,8 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2018.04.16.00 - SHA512 1f14da6eece3a490bd134a40550c2a3f78356789090e19933b8f10bc356837ee774a21e6f0b88c45831a968587049092b9d0d77617f040ab8e177de224400408 + REF v2018.04.23.00 + SHA512 7614f799fe12047070f2efe471ccbb6166dca62947d3fd5baa9a3cc50bab6238bda77ca61153779913903ad57346767b21cf59c025a0a93db39ad99e1258c45d HEAD_REF master PATCHES ${CMAKE_CURRENT_LIST_DIR}/find-gflags.patch diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index 3cd30746a..d559187f3 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-04-17 +Version: 2018-04-25 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 3f4edbf38..6314800dc 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF 125012dd904a7d111adf1082b3dca5642dbfd418 - SHA512 1d03d92aee54862d7ae03227be290f24b283dc89d60e77ffa42bfa9485e9ff0e39a93c27cfb1049cee7015c25f6d62b27362bb0836973d2ac1f919276c33ab3c + REF 33dd1c612d1026466cd37e04d3ea7d61ae07241e + SHA512 656939e57ed47a1ccb0656751176c58f575570d00a84c7b256898e25dd67f734b3cea014d328f63ece21b62f62d807643986dad65ca8cc3a7bda53f8b01f8a51 HEAD_REF master ) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index e861df239..bcb1ccb3e 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.20.0 +Version: 1.20.2 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index 46ce33d8d..2e3d12fa5 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.20.0 - SHA512 382309cb6e54765b956b03357cb754f49d93505ba0e0122a77f33efca07d7b87966c993a5fd9f9503edd1bcd0f49ca42bd9cd9264cce94c847aebca77d237ba0 + REF v1.20.2 + SHA512 449dfd15e2953d2a8b9c6160ab39728a87799b3e8595f9e3013467daf69d3561e2c5602172a0596e7c884237cf0d52d3b0f00edde03a7b037dc90b61bce2057c HEAD_REF v1.x) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL index bc4ac2d1d..f0bcb191b 100644 --- a/ports/ms-gsl/CONTROL +++ b/ports/ms-gsl/CONTROL @@ -1,3 +1,3 @@ Source: ms-gsl -Version: 2018-03-17 +Version: 2018-04-25 Description: Microsoft implementation of the Guidelines Support Library \ No newline at end of file diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index c2ce611df..9c5d11568 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/GSL - REF d846fe50a3f0bb7767c7e087a05f4be95f4da0ec - SHA512 83560cb0c39b6a4781e916c6081ad2728296e1b19760ca1b6426a8431fb6d7093760a882c539dd77152f5892fe081b1795af6366ea91385bb10aba6adf27170f + REF 2fc94db3ebfb1b066edeafac1837f34d6111bff4 + SHA512 b64e454b66570b2139e401e5ffd6042f2d977903cba54fa100246865967457900deee92bfbfa3976bdae555017c044b384a8dfa247946afccd664e2d30204ab2 HEAD_REF master ) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index 82fba8753..8cb502042 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-04-17 +Version: 2018-04-25 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index 99b60f8e6..5d60955d7 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF b91a815c826619bfcacacad090e31b2dd3e1a20c - SHA512 d1966cd01a3d6e75608426f2813ec038dff1291674d481899c031248f0469b47b78f3e35b86a78090e3f019cc478c606d2b78bcc80117fb54de9ed5df22883a0 + REF 823f79f856d711eb61af17090af0a623b631e409 + SHA512 6146d2fb26e7d74f9f554619f6a378ecf19ff6a83aa71dba8ee55d194f337c67acae0de7139a4a09736b4685980c9cd85e3c1e99ebf02ee9a306b67b17f185d8 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 852281924..85e542a43 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,5 +1,5 @@ Source: rocksdb -Version: 5.12.2 +Version: 5.12.4 Description: A library that provides an embeddable, persistent key-value store for fast storage Default-Features: zlib diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 92ca0c2fa..114ace627 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 v5.12.2 - SHA512 53e81e87e84f0500cd09d754c39e86265a16a52d4b84f9044f8d9759c224881eb7ef4bf89f9b01fdff25f123ed4dfa7b5cb272d2311f27b322c15fe2e893bbe3 + REF v5.12.4 + SHA512 661e30a9fd2a83f2d8dbcc9f27e8ae2e83f384bb7f4f61dc41d89e85d93edc1032b70ab97063e0e3c0bda591612214793d1b075c6dcfeda2e0a32acb6e9d8689 HEAD_REF master ) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index d7e583054..2cb7543f5 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-04-12 +Version: 2018-04-25 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index 0994afa4d..f103dc631 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF 529b74de173a77ba057ebc54d1f91629e7b643bd - SHA512 d836ee1c022522618f37fdeba941986977317fa68a909d8255e6abfd39564f72f47f8c78c2fa9e4ccc52da75987b56a02f8f2d5aad2890ef7b93ea843c85940c + REF ae6cde6069cae27079ec36536bc960e119d502e3 + SHA512 79014460c91fa262257e912824cf4528213cec3baebd39b104c52bc162c5fd3040ecf74156aebc428f3a4846d141475ab6a41f28f43edfc06ff7331cb3e93d4a HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 449a6a4ca..1967007ec 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-04-17 +Version: 2018-04-25 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 81b65cea0..4aaf03315 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 4a00fc658a1dc90be33a223a2c7ee336679e8745 - SHA512 b5f380b195498103d0ab4612c1754b29a8dce8e9360e46f5d6dd6daead477c6d2b9b0092ef83a081d937973e21a77fa8b55d5cb7c1d2d5abe71c6b0caa4dae30 + REF 0293c3643b0075b510b9d92b2cc39b6d5e0fadb8 + SHA512 2bf217d9317b35215d5f984ae76509ddf505459dec97fde6aae8b4a2632882df971c438a99afc87fbe28dd931e2d1283315d1dbb3eb8af92c94fa0fdffd05ac0 HEAD_REF master ) diff --git a/ports/unicorn/CONTROL b/ports/unicorn/CONTROL index 6d907bd94..7f0a41d7e 100644 --- a/ports/unicorn/CONTROL +++ b/ports/unicorn/CONTROL @@ -1,3 +1,3 @@ Source: unicorn -Version: 2018-03-20 +Version: 2018-04-25 Description: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework diff --git a/ports/unicorn/portfile.cmake b/ports/unicorn/portfile.cmake index bec0088ed..3b0a89419 100644 --- a/ports/unicorn/portfile.cmake +++ b/ports/unicorn/portfile.cmake @@ -14,8 +14,8 @@ set(VCPKG_CRT_LINKAGE "static") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO unicorn-engine/unicorn - REF 9a01ae8379b0a4bc37cf50f7aeba63fddeb523c4 - SHA512 04d5e850bc1ba36856052be5a4e2a433db8d229ae90b2fbf6a5bf32c9dc86829518a8882d331d0bc7d42a23e9f5c43d6609a20dcca388c717940c081ff21b3a4 + REF 2edb4b57c492d3255b4bfa9a08963657166fb311 + SHA512 e68ef5f1abd8ad2560bdf94957e6d7a3a106fbe4f3b34d8cfc75ab2f7a754df214e5fdddd34670412fc4dd652261391bb8f5976bea2476a2997ff29bc10b81e8 HEAD_REF master ) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index b74483695..013800189 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-04-17 +Version: 2018-04-25 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 a907be9af..0bdb2a47b 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF c971445025535b9f989ab0b78f5ddd1c026f1878 - SHA512 4eb85e207f53de73cf5369c4c3e79d858ee380e1374ebe807dfc6f99782efc2b98984f48a2cce11b9bf22c7934ef3d1a075cb98fb9e90d5f216a4e128d6df212 + REF 69a894e1cb34c42026512a6a30f3ea6a0c77e675 + SHA512 215d9863545a6218b51de4c316d26fdb191164d356ae425bc3e15772954a1a96ee6f57aa13fdfb1f0e2a30dc7c3ca1d434b0e61ebbd31d0f1087306d529162d3 HEAD_REF master ) -- cgit v1.2.3 From 64c32687f357d98db0f9e1c6f0cb6cd488e6c68d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 1 May 2018 15:39:19 -0700 Subject: [box2d] Replace buildsystem with CMake for better cross-platform support --- ports/box2d/CMakeLists.txt | 21 +++++++++++ ports/box2d/CONTROL | 2 +- ports/box2d/portfile.cmake | 68 ++++++++---------------------------- ports/box2d/use-static-linkage.patch | 40 --------------------- 4 files changed, 36 insertions(+), 95 deletions(-) create mode 100644 ports/box2d/CMakeLists.txt delete mode 100644 ports/box2d/use-static-linkage.patch diff --git a/ports/box2d/CMakeLists.txt b/ports/box2d/CMakeLists.txt new file mode 100644 index 000000000..951554266 --- /dev/null +++ b/ports/box2d/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.9) +project(Box2d CXX) + +file(GLOB_RECURSE SOURCES Box2D/Box2D/*.cpp) + +add_library(Box2D ${SOURCES}) +target_include_directories(Box2D PUBLIC $ $) + +install(TARGETS Box2D + EXPORT unofficial-box2d-targets + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install( + EXPORT unofficial-box2d-targets + FILE unofficial-box2d-config.cmake + NAMESPACE unofficial::box2d:: + DESTINATION share/unofficial-box2d +) diff --git a/ports/box2d/CONTROL b/ports/box2d/CONTROL index 7cfcb01a0..220a5a058 100644 --- a/ports/box2d/CONTROL +++ b/ports/box2d/CONTROL @@ -1,3 +1,3 @@ Source: box2d -Version: 2.3.1-374664b +Version: 2.3.1-374664b-1 Description: Box2D (http://box2d.org) is an open source C++ engine for simulating rigid bodies in 2D. diff --git a/ports/box2d/portfile.cmake b/ports/box2d/portfile.cmake index 87aaefc74..c35f37444 100644 --- a/ports/box2d/portfile.cmake +++ b/ports/box2d/portfile.cmake @@ -1,17 +1,8 @@ - -# Get output directory -set(PROJECT_ARCH_BITS "x64") -if(TRIPLET_SYSTEM_ARCH MATCHES "x86") - set(PROJECT_ARCH_BITS "x32") -elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm") - message(FATAL_ERROR "ARM not supported") -endif(TRIPLET_SYSTEM_ARCH MATCHES "x86") - - include(vcpkg_common_functions) -if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("Box2D only supports building as a static library") + set(VCPKG_LIBRARY_LINKAGE "static") endif() vcpkg_from_github( @@ -22,54 +13,23 @@ vcpkg_from_github( HEAD_REF master ) -if(VCPKG_CRT_LINKAGE STREQUAL "static") - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/use-static-linkage.patch - ) -endif() - -# Put the licence and readme files where vcpkg expects it -message(STATUS "Packaging license") -file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/box2d) -file(COPY ${SOURCE_PATH}/Box2D/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/box2d) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/box2d/License.txt ${CURRENT_PACKAGES_DIR}/share/box2d/copyright) -message(STATUS "Packaging license done") - -# Building: -set(OUTPUTS_PATH "${SOURCE_PATH}/Box2D/Build/vs2015/bin/${PROJECT_ARCH_BITS}") +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_build_msbuild(PROJECT_PATH ${SOURCE_PATH}/Box2D/Build/vs2015/Box2D.vcxproj) - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib") - file( - INSTALL ${OUTPUTS_PATH}/Release/ - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - FILES_MATCHING PATTERN "*.lib" - ) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/lib/box2d.lib) - message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib done") -endif() +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib") - file( - INSTALL ${OUTPUTS_PATH}/Debug/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - FILES_MATCHING PATTERN "*.lib" - ) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/debug/lib/box2d.lib) - message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib done") -endif() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-box2d TARGET_PATH share/unofficial-box2d) -message(STATUS "Packaging headers") file( COPY ${SOURCE_PATH}/Box2D/Box2D DESTINATION ${CURRENT_PACKAGES_DIR}/include - PATTERN "*.h" + FILES_MATCHING PATTERN "*.h" ) -message(STATUS "Packaging headers done") vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/Box2D/License.txt ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/box2d) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/box2d/License.txt ${CURRENT_PACKAGES_DIR}/share/box2d/copyright) diff --git a/ports/box2d/use-static-linkage.patch b/ports/box2d/use-static-linkage.patch deleted file mode 100644 index 4c3fccd53..000000000 --- a/ports/box2d/use-static-linkage.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/Box2D/Build/vs2015/Box2D.vcxproj b/Box2D/Build/vs2015/Box2D.vcxproj -index 830803c..5dda519 100644 ---- a/Box2D/Build/vs2015/Box2D.vcxproj -+++ b/Box2D/Build/vs2015/Box2D.vcxproj -@@ -86,7 +86,7 @@ - _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks -- MultiThreadedDebugDLL -+ MultiThreadedDebug - true - - -@@ -115,7 +115,7 @@ - _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks -- MultiThreadedDebugDLL -+ MultiThreadedDebug - true - - -@@ -145,7 +145,7 @@ - _CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) - false - true -- MultiThreadedDLL -+ MultiThreaded - true - - -@@ -176,7 +176,7 @@ - _CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions) - false - true -- MultiThreadedDLL -+ MultiThreaded - true - - -- cgit v1.2.3 From ae4cd42aab41e50b1d3911f0ac844f459cdd4a4c Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 1 May 2018 22:52:18 -0700 Subject: [alembic] update to 1.7.8 --- ports/alembic/CONTROL | 2 +- ports/alembic/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index 4e24aab9b..9a43a7b00 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.7 +Version: 1.7.8 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. http://alembic.io/ diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index a44771ab2..d9720a178 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alembic/alembic - REF 1.7.7 - SHA512 0ebcf6b9304e84bc60f1c146d0b5e5c5b1de43974ec0725293c444b48b22640945f5883eb9afd46c1ac9f0c260d6f22ff29b4866d6525c416339877be984b149 + REF 1.7.8 + SHA512 bc36e30d1aecd67da16247365a973c462e9716309d090fefe36f625c8d2ab2d517fe8ac694a9188cd6eeb623a3217f59f461c82fcfec43d0a60a07381526983a HEAD_REF master ) -- cgit v1.2.3 From 6bff657152d1aed717898088dd939b6ad3f118a5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 1 May 2018 16:34:16 -0700 Subject: [poco] Upgrade to version 1.9.0 --- ports/poco/CONTROL | 2 +- ports/poco/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index c3d177430..9656723bb 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,5 +1,5 @@ Source: poco -Version: 1.8.1-2 +Version: 1.9.0 Build-Depends: zlib, pcre, sqlite3, expat Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 1ea06d4ff..271e223f8 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pocoproject/poco - REF poco-1.8.1-release - SHA512 ca57b30c10fc4e611dbdd90c7e36db34b8cb9a7dae675dc8aed37457a26d3433080caf26eaace85adf8d6a6ad7945c49f7c66f274b26fe9cc0c7d5107be3828e + REF poco-1.9.0-release + SHA512 de2346d62b2e89ba04abe62a83f6ede7a496e80bcbe53a880a1aa8e87a8ebd9a430dd70fdc6aada836bb1021c6df21375fd0cbcf62dbb6e29a2f65d6d90cf2b9 HEAD_REF master ) -- cgit v1.2.3 From 1e41c4377f38512d1d6c0d65a2e7b9c7c8b03bea Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Wed, 2 May 2018 17:37:15 +0900 Subject: Add yajl port (#3379) * Add yajl port * [yajl] Patch cmake to fix install directories and avoid overwriting compiler flags --- ports/yajl/CONTROL | 3 +++ ports/yajl/cmake.patch | 36 ++++++++++++++++++++++++++++++++++++ ports/yajl/portfile.cmake | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 ports/yajl/CONTROL create mode 100644 ports/yajl/cmake.patch create mode 100644 ports/yajl/portfile.cmake diff --git a/ports/yajl/CONTROL b/ports/yajl/CONTROL new file mode 100644 index 000000000..6811dc84a --- /dev/null +++ b/ports/yajl/CONTROL @@ -0,0 +1,3 @@ +Source: yajl +Version: 2.1.0-1 +Description: Yet Another JSON Library diff --git a/ports/yajl/cmake.patch b/ports/yajl/cmake.patch new file mode 100644 index 000000000..c631ead21 --- /dev/null +++ b/ports/yajl/cmake.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4c0a9be..cbec22f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,7 +28,7 @@ ENDIF (NOT CMAKE_BUILD_TYPE) + + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + +-IF (WIN32) ++IF (WIN32 AND FALSE) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") + ADD_DEFINITIONS(-DWIN32) + SET(linkFlags "/PDB:NONE /INCREMENTAL:NO /OPT:NOREF /OPT:NOICF") +@@ -46,7 +46,8 @@ IF (WIN32) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4255 /wd4130 /wd4100 /wd4711") + SET(CMAKE_C_FLAGS_DEBUG "/D DEBUG /Od /Z7") + SET(CMAKE_C_FLAGS_RELEASE "/D NDEBUG /O2") +-ELSE (WIN32) ++endif() ++if (NOT WIN32) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") + IF(CMAKE_COMPILER_IS_GNUCC) + INCLUDE(CheckCCompilerFlag) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 99cf9e9..454482a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -78,7 +78,7 @@ INCLUDE_DIRECTORIES(${incDir}/..) + # at build time you may specify the cmake variable LIB_SUFFIX to handle + # 64-bit systems which use 'lib64' + INSTALL(TARGETS yajl +- RUNTIME DESTINATION lib${LIB_SUFFIX} ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX}) diff --git a/ports/yajl/portfile.cmake b/ports/yajl/portfile.cmake new file mode 100644 index 000000000..92742e0a7 --- /dev/null +++ b/ports/yajl/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lloyd/yajl + REF 2.1.0 + SHA512 9e786d080803df80ec03a9c2f447501e6e8e433a6baf636824bc1d50ecf4f5f80d7dfb1d47958aeb0a30fe459bd0ef033d41bc6a79e1dc6e6b5eade930b19b02 + HEAD_REF master + PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/yajl RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/pkgconfig) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(GLOB SHAREDOBJECTS ${CURRENT_PACKAGES_DIR}/lib/libyajl.so* ${CURRENT_PACKAGES_DIR}/debug/lib/libyajl.so*) + file(REMOVE_RECURSE ${SHAREDOBJECTS} ${CURRENT_PACKAGES_DIR}/lib/yajl.lib ${CURRENT_PACKAGES_DIR}/debug/lib/yajl.lib) +else() + file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE_RECURSE + ${EXES} + ${CURRENT_PACKAGES_DIR}/lib/yajl_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/yajl_s.lib + ${CURRENT_PACKAGES_DIR}/lib/libyajl_s.a ${CURRENT_PACKAGES_DIR}/debug/lib/libyajl_s.a + ) +endif() -- cgit v1.2.3 From 3e0901a90435e26a575e8b9c747928b88a7e3539 Mon Sep 17 00:00:00 2001 From: Squareys Date: Wed, 2 May 2018 12:13:26 +0200 Subject: [corrade] Update to v2018.04 Signed-off-by: Squareys --- ports/corrade/CONTROL | 2 +- ports/corrade/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL index a886c8639..e719d90e4 100644 --- a/ports/corrade/CONTROL +++ b/ports/corrade/CONTROL @@ -1,5 +1,5 @@ Source: corrade -Version: 2018.02-1 +Version: 2018.04-1 Description: C++11/C++14 multiplatform utility library http://magnum.graphics/corrade/ Default-Features: interconnect, pluginmanager, testsuite, utility diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 85ad3e4b0..9c407a753 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/corrade - REF v2018.02 - SHA512 8fe4998dc32586386b8fa2030941f3ace6d5e76aadcf7e20a620d276cc9247324e10eb58f2c2c9e84a1a9d9b336e6bdc788f9947c9e507a053d6fd2ffcd3d58e + REF v2018.04 + SHA512 be14f0cb76c904a37f962af16b331407ec6a1f7a31245c7221f41fcbce2749a1ad67057d451736814e357eaa59e015f16996bdba819f69a1dd0f3d5a3cad34a4 HEAD_REF master ) -- cgit v1.2.3 From 3338ab613cf44f336e3d6a78bd06d5c12094d921 Mon Sep 17 00:00:00 2001 From: Squareys Date: Wed, 2 May 2018 12:17:57 +0200 Subject: [magnum,-plugins] Also install headers for dynamically built plugins While before there was no use for linking the plugins directly or using them as libraries in some other way when built dynamically, there now are intra-dependencies between plugins which to be detected, require the headers to be installed. Additionally, the folders lib/magnum and debug/lib/magnum-d are no longer empty, as we put the plugin deploy scripts there. Removing them is therefore superfluous. (Prepares upcoming release/head build) Signed-off-by: Squareys --- ports/magnum-plugins/portfile.cmake | 13 +++---------- ports/magnum/portfile.cmake | 5 ----- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index bedf9e395..acbd70861 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -73,16 +73,9 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) else() - # remove headers and libs for plugins - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - # hint vcpkg - set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) - set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/MagnumPlugins) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) endif() # Handle copyright diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index af22fbb60..dece1caa9 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -90,11 +90,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) else() - # remove headers and libs for plugins - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/MagnumPlugins) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/bin/magnum) file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/magnum-d) endif() -- cgit v1.2.3 From eee593968968f479987452535d9508bc38451fb5 Mon Sep 17 00:00:00 2001 From: Squareys Date: Wed, 2 May 2018 12:21:02 +0200 Subject: [magnum,-plugins,-integration,-extras] Update to v2018.04 Signed-off-by: Squareys --- ports/magnum-extras/CONTROL | 18 +++++++++--------- ports/magnum-extras/portfile.cmake | 4 ++-- ports/magnum-integration/CONTROL | 2 +- ports/magnum-integration/portfile.cmake | 4 ++-- ports/magnum-plugins/CONTROL | 31 +++++++++---------------------- ports/magnum-plugins/portfile.cmake | 27 ++++++++++++++------------- ports/magnum/CONTROL | 22 ++++++++++------------ ports/magnum/portfile.cmake | 4 ++-- 8 files changed, 49 insertions(+), 63 deletions(-) diff --git a/ports/magnum-extras/CONTROL b/ports/magnum-extras/CONTROL index d0f9f32d0..752f7333b 100644 --- a/ports/magnum-extras/CONTROL +++ b/ports/magnum-extras/CONTROL @@ -1,9 +1,9 @@ -Source: magnum-extras -Version: 2018.02-2 -Build-Depends: magnum -Description: Extras for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ -Default-Features: - -Feature: ui -Description: Ui library -Build-Depends: corrade[interconnect], magnum[text] +Source: magnum-extras +Version: 2018.04-1 +Build-Depends: magnum +Description: Extras for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ +Default-Features: + +Feature: ui +Description: Ui library +Build-Depends: corrade[interconnect], magnum[text] diff --git a/ports/magnum-extras/portfile.cmake b/ports/magnum-extras/portfile.cmake index d97508497..61aa619cd 100644 --- a/ports/magnum-extras/portfile.cmake +++ b/ports/magnum-extras/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-extras - REF v2018.02 - SHA512 62c0832d19a36e0f89ffcd958356130c81f577b1091a9232d43307868caf51a1fd186c4aa196bd456d3c37cb887c9802d80eb0b332893bafa812298dbc39d7b7 + REF v2018.04 + SHA512 2c933d0cad6f0b6580a84dba22bfdadf120a302246cab404a99749e0ba7bb0d799ee606ca43cc1c39f85ae37a00dcc7374b9fd05eb2bb07945c9371a9c8a8492 HEAD_REF master ) diff --git a/ports/magnum-integration/CONTROL b/ports/magnum-integration/CONTROL index a791e5718..a7fbebb5b 100644 --- a/ports/magnum-integration/CONTROL +++ b/ports/magnum-integration/CONTROL @@ -1,5 +1,5 @@ Source: magnum-integration -Version: 2018.02-1 +Version: 2018.04-1 Build-Depends: magnum Description: Integrations for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ Default-Features: diff --git a/ports/magnum-integration/portfile.cmake b/ports/magnum-integration/portfile.cmake index da9c393b7..4790d07d5 100644 --- a/ports/magnum-integration/portfile.cmake +++ b/ports/magnum-integration/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-integration - REF v2018.02 - SHA512 b2db442d5e29c117ee30ee2c37f5087c3d360158a52eb6bc19e5c1a0388a0ec1338c53e3fdad618bb6f4aba5d88fe10d20bb1539e5f21a309b8f06f2e195279c + REF v2018.04 + SHA512 ef22309dea452de8cf63d62f4b99f3e7b5b12b3580455e8fc1d53eabd921e24ec3824ce238a2b74cf0b6fd137e238b67c6b4653e750072b1105c6571e352d9fe HEAD_REF master ) diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 98e7e606d..9722245f6 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,28 +1,15 @@ Source: magnum-plugins -Version: 2018.02-2 +Version: 2018.04-1 Build-Depends: magnum Description: Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ -Default-Features: anyimageimporter, anysceneimporter, anyimageconverter, ddsimporter, miniexrimageconverter, opengeximporter, stanfordimporter, stbimageconverter, stbimageimporter - -Feature: anyimageimporter -Description: AnyImageImporter plugin -Build-Depends: magnum[trade] - -Feature: anyaudioimporter -Description: AnyAudioImporter plugin -Build-Depends: magnum[audio] - -Feature: anyimageconverter -Description: AnyImageConverter plugin -Build-Depends: magnum[trade] - -Feature: anysceneimporter -Description: AnySceneImporter plugin -Build-Depends: magnum[trade] +Default-Features: ddsimporter, miniexrimageconverter, opengeximporter, stanfordimporter, stbimageconverter, stbimageimporter Feature: assimpimporter Description: AssimpImporter plugin -Build-Depends: assimp, magnum-plugins[anyimageimporter], magnum[anyimageimporter], magnum[trade] +Build-Depends: assimp, magnum[anyimageimporter], magnum[trade] + +Feature: openddl +Description: OpenDdl library Feature: ddsimporter Description: DdsImporter plugin @@ -58,7 +45,7 @@ Build-Depends: magnum[trade] Feature: opengeximporter Description: OpenGexImporter plugin -Build-Depends: magnum-plugins[anyimageimporter], magnum[anyimageimporter], magnum[trade] +Build-Depends: magnum[anyimageimporter], magnum[trade], magnum-plugins[openddl] Feature: pngimageconverter Description: PngImageConverter plugin @@ -89,5 +76,5 @@ Description: StbVorbisAudioImporter plugin Build-Depends: magnum[audio] Feature: tinygltfimporter -Description: (Upcoming) TinyGltfImporter plugin -Build-Depends: magnum-plugins[anyimageimporter], magnum[anyimageimporter], magnum-plugins[stbimageimporter], magnum[trade] +Description: TinyGltfImporter plugin +Build-Depends: magnum[anyimageimporter], magnum-plugins[stbimageimporter], magnum[trade] diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index acbd70861..54ea7659c 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-plugins - REF v2018.02 - SHA512 650d3ec26b3c72aa98ffa242b072e382445de49d4849042faf5dac800d5e4cce223cac3fa1cc079fcb230632730af1d90ac7d347d152a1f31d224732499e96b4 + REF v2018.04 + SHA512 0b8ae1488e210d111826532299d1e29c5eba32c75f7c210caff088a9a57459b6354474c7a53fccd0c78553d67d79bf041d471b5822c59cb2c9612126cf3e49ef HEAD_REF master ) @@ -53,8 +53,9 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -# Clean up empty directories -if(NOT FEATURES) +# Clean up empty directories, if not building anything. +# FEATURES may only contain "core", but that does not build anything. +if(NOT FEATURES OR FEATURES STREQUAL "core") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/lib @@ -63,15 +64,15 @@ if(NOT FEATURES) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - # move plugin libs to conventional place - file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) - file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) - file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*) - file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + # move plugin libs to conventional place + file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) + file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*) + file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) else() set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 6f3aebadc..c34339938 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,5 +1,5 @@ Source: magnum -Version: 2018.02-2 +Version: 2018.04-1 Build-Depends: corrade[pluginmanager], corrade[utility] Description: C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ Default-Features: anyimageimporter, anyaudioimporter, anyimageconverter, anysceneimporter, debugtools, gl, meshtools, primitives, scenegraph, shaders, shapes, text, texturetools, trade, sdl2application, windowlesswglapplication @@ -9,19 +9,19 @@ Description: magnum-al-info utility Build-Depends: magnum[audio] Feature: anyimageimporter -Description: (Upcoming) AnyImageImporter plugin +Description: AnyImageImporter plugin Build-Depends: magnum[trade] Feature: anyaudioimporter -Description: (Upcoming) AnyAudioImporter plugin +Description: AnyAudioImporter plugin Build-Depends: magnum[audio] Feature: anyimageconverter -Description: (Upcoming) AnyImageConverter plugin +Description: AnyImageConverter plugin Build-Depends: magnum[trade] Feature: anysceneimporter -Description: (Upcoming) AnySceneImporter plugin +Description: AnySceneImporter plugin Build-Depends: magnum[trade] Feature: audio @@ -40,10 +40,10 @@ Description: magnum-fontconverter utility Build-Depends: magnum[text], magnum[gl] Feature: gl -Description: (Upcoming) GL library +Description: GL library Feature: gl-info -Description: (Upcoming) gl-info utility +Description: gl-info utility Build-Depends: magnum[gl] Feature: glfwapplication @@ -58,9 +58,6 @@ Feature: imageconverter Description: magnum-imageconverter utility Build-Depends: magnum[trade] -Feature: magnuminfo -Description: magnum-info utility - Feature: magnumfont Description: MagnumFont plugin Build-Depends: magnum[text] @@ -101,10 +98,11 @@ Description: SceneGraph library Feature: shaders Description: Shaders library +Build-Depends: magnum[gl] Feature: text Description: Text library -Build-Depends: magnum[texturetools] +Build-Depends: magnum[texturetools], magnum[gl] Feature: texturetools Description: TextureTools library @@ -114,7 +112,7 @@ Description: TgaImporter plugin Build-Depends: magnum[trade] Feature: trade -Description: (Upcoming) Trade library +Description: Trade library Feature: wavaudioimporter Description: WavAudioImporter plugin diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index dece1caa9..e6b501e5a 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum - REF v2018.02 - SHA512 aeb0cab91ae0a7cca79c15ce98d9b2f8d46f5bc11bb90718e59188bf233154fb51668e0241112b65103f40e675736d74c86a2e5ccffcb698780ccedb1b3fb8bd + REF v2018.04 + SHA512 6ad50e782c8cb10157cf969a571f8c0c0c91161de60ac25cf86eda09106f4de73168618a1a5fe0931c3fd293c718911e14d610bd4f86fe3e073620bd7619a9eb HEAD_REF master ) -- cgit v1.2.3 From d0aeb24a44e7446f834055e06ec7c416b877c425 Mon Sep 17 00:00:00 2001 From: Nicolai Grodzitski Date: Thu, 3 May 2018 08:29:46 +0300 Subject: Add RESTinio port. (#3410) * Make restinio port. First implementation (find-module files are not installed yet). * Add current status of a port files (not working). * Prepare restinio port files. * Change restinio archive URL. * [restinio] Slim portfile --- ports/restinio/CONTROL | 4 ++++ ports/restinio/portfile.cmake | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 ports/restinio/CONTROL create mode 100644 ports/restinio/portfile.cmake diff --git a/ports/restinio/CONTROL b/ports/restinio/CONTROL new file mode 100644 index 000000000..516de716a --- /dev/null +++ b/ports/restinio/CONTROL @@ -0,0 +1,4 @@ +Source: restinio +Version: 0.4.5 +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 new file mode 100644 index 000000000..ba25481f6 --- /dev/null +++ b/ports/restinio/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/restinio-0.4.5-vcpkg) +vcpkg_download_distfile(ARCHIVE + URLS "https://bitbucket.org/sobjectizerteam/restinio-0.4/downloads/restinio-0.4.5-vcpkg.zip" + FILENAME "restinio-0.4.5-vcpkg.zip" + SHA512 f5f135f761f29b2d4a9641ac1b37bb57bb6213df39b92ad349f8b73440142b2bd2a6093ee4c222417f61303ae46e960fb77b7a0c34d7e3924f3df1a50036b2da +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/vcpkg + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/restinio") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/restinio) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/restinio/LICENSE ${CURRENT_PACKAGES_DIR}/share/restinio/copyright) -- cgit v1.2.3 From e011ec299313c98ba183acd051492278601bf411 Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Thu, 3 May 2018 14:31:21 +0900 Subject: Add cmark port (#3406) * Add cmark port * [cmark] Only build one of static/dynamic --- ports/cmark/CONTROL | 3 +++ ports/cmark/portfile.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 ports/cmark/CONTROL create mode 100644 ports/cmark/portfile.cmake diff --git a/ports/cmark/CONTROL b/ports/cmark/CONTROL new file mode 100644 index 000000000..4211c9bbc --- /dev/null +++ b/ports/cmark/CONTROL @@ -0,0 +1,3 @@ +Source: cmark +Version: 0.28.3-1 +Description: CommonMark parsing and rendering library diff --git a/ports/cmark/portfile.cmake b/ports/cmark/portfile.cmake new file mode 100644 index 000000000..b452a4488 --- /dev/null +++ b/ports/cmark/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # Note: fails due to missing cmark_export.h -- fix should be to always generate the correct export header. + message(FATAL_ERROR "cmark does not currently support static library linkage") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO commonmark/cmark + REF 0.28.3 + SHA512 409105a3228a8ae22ba6acf95cd99bc9a2c20f8603aa0e803a33172eb6ef53f80f8f0262d2258b77f9fd6e1f2e9017a6c906b88f761e053c09ef88c9ffab7d29 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CMARK_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CMARK_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMARK_TESTS=OFF + -DCMARK_SHARED=${CMARK_SHARED} + -DCMARK_STATIC=${CMARK_STATIC} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cmark RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/cmark.exe ${CURRENT_PACKAGES_DIR}/debug/bin/cmark.exe) +endif() -- cgit v1.2.3 From 68447ced17de6afff3bb1240c5f51077a34e777f Mon Sep 17 00:00:00 2001 From: yyzybb537 <289633152@qq.com> Date: Thu, 3 May 2018 13:36:19 +0800 Subject: Add libgo library packge (#3394) * Add libgo library packge * [libgo] Fix Windows and adjust cmake usage information --- ports/libgo/CONTROL | 3 ++ ports/libgo/cmake.patch | 38 ++++++++++++++++++++++++++ ports/libgo/libgo-config.cmake | 25 +++++++++++++++++ ports/libgo/portfile.cmake | 62 ++++++++++++++++++++++++++++++++++++++++++ ports/libgo/usage | 5 ++++ 5 files changed, 133 insertions(+) create mode 100644 ports/libgo/CONTROL create mode 100644 ports/libgo/cmake.patch create mode 100644 ports/libgo/libgo-config.cmake create mode 100644 ports/libgo/portfile.cmake create mode 100644 ports/libgo/usage diff --git a/ports/libgo/CONTROL b/ports/libgo/CONTROL new file mode 100644 index 000000000..5764d77fb --- /dev/null +++ b/ports/libgo/CONTROL @@ -0,0 +1,3 @@ +Source: libgo +Version: 2.7 +Description: The best stackful coroutine by c++11. diff --git a/ports/libgo/cmake.patch b/ports/libgo/cmake.patch new file mode 100644 index 000000000..f6fd5fef8 --- /dev/null +++ b/ports/libgo/cmake.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0d291e4..0f6cc38 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -158,7 +158,7 @@ if (UNIX) + set(CMAKE_CXX_FLAGS "-std=c++11 -fPIC -Wall -pthread ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS_DEBUG "-g -pg ${CMAKE_CXX_FLAGS} -Werror") + set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 ${CMAKE_CXX_FLAGS} -Werror") +-else () ++elseif (NOT DISABLE_ADJUST_COMMAND_LINE_FLAGS) + if (NOT DISABLE_DYNAMIC_LIB) + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") +@@ -180,7 +180,7 @@ set(STATIC_T "libgo_static") + add_library("${STATIC_T}" STATIC ${CO_SRC_LIST}) + set_target_properties("${STATIC_T}" PROPERTIES OUTPUT_NAME "${TARGET}") + +-if (UNIX) ++if (UNIX OR FORCE_UNIX_TARGETS) + add_subdirectory(${PROJECT_SOURCE_DIR}/libgo/main) + + if (NOT DISABLE_DYNAMIC_LIB) +@@ -201,9 +201,15 @@ if (UNIX) + PATTERN "ctx_boost_coroutine" EXCLUDE + PATTERN "ctx_ucontext" EXCLUDE + PATTERN "*.h") ++ if(UNIX) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/linux/ DESTINATION "include/libgo" FILES_MATCHING PATTERN "*.h") ++ else() ++ install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/windows/ DESTINATION "include/libgo" FILES_MATCHING PATTERN "*.h") ++ endif() ++ if(NOT DISABLE_SYSTEMWIDE) + file(WRITE ${PROJECT_SOURCE_DIR}/tools/libgo.conf "${CMAKE_INSTALL_PREFIX}/lib") + install(FILES ${PROJECT_SOURCE_DIR}/tools/libgo.conf DESTINATION "/etc/ld.so.conf.d") ++ endif() + if (DEPEND_BOOST) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/ctx_boost_coroutine/ DESTINATION "include/libgo/ctx_boost_coroutine" FILES_MATCHING PATTERN "*.h") + install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/ctx_boost_context/ DESTINATION "include/libgo/ctx_boost_context" FILES_MATCHING PATTERN "*.h") diff --git a/ports/libgo/libgo-config.cmake b/ports/libgo/libgo-config.cmake new file mode 100644 index 000000000..fd52f8dd3 --- /dev/null +++ b/ports/libgo/libgo-config.cmake @@ -0,0 +1,25 @@ +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + +if(NOT LIBGO_FIND_COMPONENTS) + set(LIBGO_FIND_COMPONENTS libgo libgo) + if(LIBGO_FIND_REQUIRED) + set(LIBGO_FIND_REQUIRED_libgo TRUE) + endif() + + set(LIBGO_FOUND TRUE) +endif() + +set(LIBGO_INCLUDE_DIRS ${_DIR}/../../include) +set(LIBGO_LIBRARIES) +if (EXISTS ${_DIR}/../../lib/liblibgo.a) + list(APPEND LIBGO_LIBRARIES optimized ${_DIR}/../../lib/liblibgo.a) +endif() +if (EXISTS ${_DIR}/../../debug/lib/liblibgo.a) + list(APPEND LIBGO_LIBRARIES debug ${_DIR}/../../debug/lib/liblibgo.a) +endif() +if (EXISTS ${_DIR}/../../lib/libgo.lib) + list(APPEND LIBGO_LIBRARIES optimized ${_DIR}/../../lib/libgo.lib) +endif() +if (EXISTS ${_DIR}/../../debug/lib/libgo.lib) + list(APPEND LIBGO_LIBRARIES debug ${_DIR}/../../debug/lib/libgo.lib) +endif() diff --git a/ports/libgo/portfile.cmake b/ports/libgo/portfile.cmake new file mode 100644 index 000000000..6807aabfb --- /dev/null +++ b/ports/libgo/portfile.cmake @@ -0,0 +1,62 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("libgo currently only supports static linkage") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yyzybb537/libgo + REF v2.7 + SHA512 eb83b87cf06464be8fc9632b69c14fd6e0612bedbf5b2e04c0a9c178d554ece85e3673b4e6076d7d8801d308d5975f6347662f2c2c4682cc8583b3096cced574 + HEAD_REF master + PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch +) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/XBased/xhook/archive/e18c450541892212ca4f11dc91fa269fabf9646f.tar.gz" + FILENAME "xhook-e18c450541892212ca4f11dc91fa269fabf9646f.tar.gz" + SHA512 1bcf320f50cff13d92013a9f0ab5c818c2b6b63e9c1ac18c5dd69189e448d7a848f1678389d8b2c08c65f907afb3909e743f6c593d9cfb21e2bb67d5c294a166 +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/third_party) + +vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}/third_party) +file(RENAME ${SOURCE_PATH}/third_party/xhook-e18c450541892212ca4f11dc91fa269fabf9646f ${SOURCE_PATH}/third_party/xhook) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDISABLE_ADJUST_COMMAND_LINE_FLAGS=ON + -DDISABLE_DYNAMIC_LIB=ON + -DFORCE_UNIX_TARGETS=ON + -DDISABLE_SYSTEMWIDE=ON +) + +vcpkg_install_cmake() + +# remove duplicated include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/libgo/disable_hook) + +file(GLOB REL_MAIN ${CURRENT_PACKAGES_DIR}/lib/libgo_main.lib ${CURRENT_PACKAGES_DIR}/lib/liblibgo_main.a) +if(REL_MAIN) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(COPY ${REL_MAIN} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(REMOVE ${REL_MAIN}) +endif() + +file(GLOB DBG_MAIN ${CURRENT_PACKAGES_DIR}/debug/lib/libgo_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/liblibgo_main.a) +if(DBG_MAIN) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(COPY ${DBG_MAIN} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(REMOVE ${DBG_MAIN}) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgo RENAME copyright) +file(INSTALL ${CURRENT_PORT_DIR}/libgo-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgo) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/libgo/usage b/ports/libgo/usage new file mode 100644 index 000000000..a8f072947 --- /dev/null +++ b/ports/libgo/usage @@ -0,0 +1,5 @@ +The package libgo provides CMake integration: + + find_package(libgo REQUIRED) + target_include_directories(main PRIVATE ${LIBGO_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${LIBGO_LIBRARIES}) -- cgit v1.2.3 From 6ec3a486332bd50500decee0aeaa166fa37ba8d2 Mon Sep 17 00:00:00 2001 From: Jay Carlson Date: Thu, 3 May 2018 00:38:08 -0500 Subject: [treehopper] Add package for Treehopper C++ API (#3330) * Add package definition for Treehopper's C++ API * Bump to 1.11.2 * Bump to 1.11.3 * [treehopper] Fix cmake targets. Block non-dynamic usage. --- ports/treehopper/CONTROL | 3 +++ ports/treehopper/portfile.cmake | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ports/treehopper/CONTROL create mode 100644 ports/treehopper/portfile.cmake diff --git a/ports/treehopper/CONTROL b/ports/treehopper/CONTROL new file mode 100644 index 000000000..336a42250 --- /dev/null +++ b/ports/treehopper/CONTROL @@ -0,0 +1,3 @@ +Source: treehopper +Version: 1.11.3-1 +Description: Treehopper connects the physical world to your computer, tablet, or smartphone. For more information, visit https://treehopper.io. diff --git a/ports/treehopper/portfile.cmake b/ports/treehopper/portfile.cmake new file mode 100644 index 000000000..fd90f0392 --- /dev/null +++ b/ports/treehopper/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message("treehopper only supports dynamic library linkage") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "treehopper does not support static crt linkage") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO treehopper-electronics/treehopper-sdk + REF 1.11.3 + SHA512 65b748375b798787c8b59f9657151f340920c939c3f079105b9b78f4e3b775125598106c6dfa4feba111a64d30f007003a70110ac767802a7dd1127a25c9fb14 + HEAD_REF master) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/C++/API/ + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/treehopper) + +file(INSTALL ${SOURCE_PATH}/C++/API/inc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/Treehopper/) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/treehopper RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) \ No newline at end of file -- cgit v1.2.3 From 8f0ebdf8d561ef8402db44cd9abb2c912cff276d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 3 May 2018 15:03:35 -0700 Subject: [vcpkg] Remove utf16 usage from non-Windows --- toolsrc/include/vcpkg/base/strings.h | 2 ++ toolsrc/src/vcpkg.cpp | 4 +++- toolsrc/src/vcpkg/base/files.cpp | 7 ++++--- toolsrc/src/vcpkg/base/strings.cpp | 12 ++++-------- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 4cc17bcf4..e165c69da 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -34,9 +34,11 @@ namespace vcpkg::Strings return details::format_internal(fmtstr, to_printf_arg(to_printf_arg(args))...); } +#if defined(_WIN32) std::wstring to_utf16(const CStringView& s); std::string to_utf8(const wchar_t* w); +#endif std::string escape_string(const CStringView& s, char char_to_escape, char escape_char); diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 06c99e9a8..ac2eec876 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -70,7 +70,7 @@ static void inner(const VcpkgCmdArguments& args) fs::path vcpkg_root_dir; if (args.vcpkg_root_dir != nullptr) { - vcpkg_root_dir = fs::stdfs::absolute(Strings::to_utf16(*args.vcpkg_root_dir)); + vcpkg_root_dir = fs::stdfs::absolute(fs::u8path(*args.vcpkg_root_dir)); } else { @@ -94,6 +94,8 @@ static void inner(const VcpkgCmdArguments& args) Checks::check_exit(VCPKG_LINE_INFO, !vcpkg_root_dir.empty(), "Error: Could not detect vcpkg-root."); + Debug::println("Using vcpkg-root: %s", vcpkg_root_dir.u8string()); + auto default_vs_path = System::get_environment_variable("VCPKG_DEFAULT_VS_PATH").value_or(""); const Expected expected_paths = VcpkgPaths::create(vcpkg_root_dir, default_vs_path); diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 1723b467e..0542af1e7 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -56,16 +56,17 @@ namespace vcpkg::Files const std::string& filename) const override { fs::path current_dir = starting_dir; - for (; !current_dir.empty(); current_dir = current_dir.parent_path()) + fs::path unix_root = "/"; + for (; !current_dir.empty() && current_dir != unix_root; current_dir = current_dir.parent_path()) { const fs::path candidate = current_dir / filename; if (exists(candidate)) { - break; + return current_dir; } } - return current_dir; + return fs::path(); } virtual std::vector get_files_recursive(const fs::path& dir) const override diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index fbc33ca42..48dc5ed09 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -49,33 +49,29 @@ namespace vcpkg::Strings::details namespace vcpkg::Strings { +#if defined(_WIN32) std::wstring to_utf16(const CStringView& s) { -#if defined(_WIN32) std::wstring output; const size_t size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); if (size == 0) return output; output.resize(size - 1); MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, output.data(), static_cast(size) - 1); return output; -#else - Checks::unreachable(VCPKG_LINE_INFO); -#endif } +#endif +#if defined(_WIN32) std::string to_utf8(const wchar_t* w) { -#if defined(_WIN32) std::string output; const size_t size = WideCharToMultiByte(CP_UTF8, 0, w, -1, nullptr, 0, nullptr, nullptr); if (size == 0) return output; output.resize(size - 1); WideCharToMultiByte(CP_UTF8, 0, w, -1, output.data(), static_cast(size) - 1, nullptr, nullptr); return output; -#else - Checks::unreachable(VCPKG_LINE_INFO); -#endif } +#endif std::string escape_string(const CStringView& s, char char_to_escape, char escape_char) { -- cgit v1.2.3 From 120f444af37f4b6e2cb4205b0ef5f8c6b97e8637 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 3 May 2018 15:51:02 -0700 Subject: [vcpkg] Add missing debug statement and fix libc++ Filesystem TS issue. --- toolsrc/src/vcpkg/base/system.cpp | 5 ++++- toolsrc/src/vcpkg/build.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index d4210fe6d..95c9511f9 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -274,8 +274,11 @@ namespace vcpkg::System Debug::println("CreateProcessW() returned %lu", exit_code); return static_cast(exit_code); #else + Debug::println("system(%s)", cmd_line.c_str()); fflush(nullptr); - return system(cmd_line.c_str()); + int rc = system(cmd_line.c_str()); + Debug::println("system() returned %d", rc); + return rc; #endif } diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 7a9d35667..3616348d6 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -357,7 +357,7 @@ namespace vcpkg::Build { {"CMD", "BUILD"}, {"PORT", config.scf.core_paragraph->name}, - {"CURRENT_PORT_DIR", config.port_dir / "/."}, + {"CURRENT_PORT_DIR", config.port_dir}, {"TARGET_TRIPLET", spec.triplet().canonical_name()}, {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, {"VCPKG_USE_HEAD_VERSION", -- cgit v1.2.3 From 9265fe76bf3ed53db03eb31cad9be1c7594bfcb3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 4 May 2018 16:49:07 -0700 Subject: unix_root -> UNIX_ROOT static const --- toolsrc/src/vcpkg/base/files.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 0542af1e7..3d96e834b 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -55,9 +55,9 @@ namespace vcpkg::Files virtual fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename) const override { + static const fs::path UNIX_ROOT = "/"; fs::path current_dir = starting_dir; - fs::path unix_root = "/"; - for (; !current_dir.empty() && current_dir != unix_root; current_dir = current_dir.parent_path()) + for (; !current_dir.empty() && current_dir != UNIX_ROOT; current_dir = current_dir.parent_path()) { const fs::path candidate = current_dir / filename; if (exists(candidate)) -- cgit v1.2.3 From ab58f531ccf6da9895502cb8ae7bd85b29823d1d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 4 May 2018 18:14:54 -0700 Subject: git for linux/osx version moved to vcpkgTools.xml --- scripts/vcpkgTools.xml | 12 ++++++++++++ toolsrc/src/vcpkg/commands.fetch.cpp | 18 ++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 1a2abae81..1f17102d2 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -28,6 +28,18 @@ a34575ab1b4f553e62535e38492904b512df4d6a837cf4abf205dbcdd05edf1eef450cc5b15a4f63f901424d5f3cd1f78b6b22437d0d4f8cd9ce4e42e82617b9 MinGit-2.17.0-32-bit.zip + + 2.7.4 + + + + + + 2.7.4 + + + + 2.4.1 vswhere.exe diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 1e31e6bc4..a6cfec3f0 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -83,7 +83,8 @@ namespace vcpkg::Commands::Fetch right_delim, XML_PATH.generic_string()); - return *result.get(); + auto r = *result.get(); + return Strings::trim(std::move(r)); }; static const std::regex XML_VERSION_REGEX{R"###()###"}; @@ -255,8 +256,8 @@ namespace vcpkg::Commands::Fetch const std::string download_path_part = download_path.u8string() + ".part"; std::error_code ec; fs.remove(download_path_part, ec); - const auto code = System::cmd_execute(Strings::format( - R"(curl -L '%s' --create-dirs --output '%s')", url, download_path_part)); + const auto code = System::cmd_execute( + Strings::format(R"(curl -L '%s' --create-dirs --output '%s')", url, download_path_part)); Checks::check_exit(VCPKG_LINE_INFO, code == 0, "Could not download %s", url); verify_hash(paths, url, download_path_part, sha512); @@ -267,8 +268,13 @@ namespace vcpkg::Commands::Fetch static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) { const std::array& version = tool_data.version; - const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); + Checks::check_exit(VCPKG_LINE_INFO, + !tool_data.url.empty(), + "A suitable version of %s was not found (required v%s) and unable to automatically " + "download a portable one. Please install a newer version of git.", + tool_name, + version_as_string); System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", tool_name, version_as_string, @@ -401,11 +407,7 @@ namespace vcpkg::Commands::Fetch static fs::path get_git_path(const VcpkgPaths& paths) { -#if defined(_WIN32) static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "git"); -#else - static const ToolData TOOL_DATA = ToolData{{2, 7, 4}, ""}; -#endif static const std::string VERSION_CHECK_ARGUMENTS = "--version"; std::vector candidate_paths; -- cgit v1.2.3 From 44b894326246dfd6114cd70d6373a9253e0a604c Mon Sep 17 00:00:00 2001 From: Nicolai Grodzitski Date: Sun, 6 May 2018 02:42:06 +0300 Subject: Update RESTinio (#3423) * Make restinio port. First implementation (find-module files are not installed yet). * Add current status of a port files (not working). * Prepare restinio port files. * Change restinio archive URL. * [restinio] Slim portfile * Update RESTinio version. --- ports/restinio/CONTROL | 2 +- ports/restinio/portfile.cmake | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ports/restinio/CONTROL b/ports/restinio/CONTROL index 516de716a..eed60e4c3 100644 --- a/ports/restinio/CONTROL +++ b/ports/restinio/CONTROL @@ -1,4 +1,4 @@ Source: restinio -Version: 0.4.5 +Version: 0.4.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 diff --git a/ports/restinio/portfile.cmake b/ports/restinio/portfile.cmake index ba25481f6..b2c496dfb 100644 --- a/ports/restinio/portfile.cmake +++ b/ports/restinio/portfile.cmake @@ -1,10 +1,12 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/restinio-0.4.5-vcpkg) +set(RESTINIO_VERSION 0.4.5.1) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/restinio-${RESTINIO_VERSION}-vcpkg) vcpkg_download_distfile(ARCHIVE - URLS "https://bitbucket.org/sobjectizerteam/restinio-0.4/downloads/restinio-0.4.5-vcpkg.zip" - FILENAME "restinio-0.4.5-vcpkg.zip" - SHA512 f5f135f761f29b2d4a9641ac1b37bb57bb6213df39b92ad349f8b73440142b2bd2a6093ee4c222417f61303ae46e960fb77b7a0c34d7e3924f3df1a50036b2da + URLS "https://bitbucket.org/sobjectizerteam/restinio-0.4/downloads/restinio-${RESTINIO_VERSION}-vcpkg.zip" + FILENAME "restinio-${RESTINIO_VERSION}-vcpkg.zip" + SHA512 198153f9b8d866c2aa57932720b31ff1f8e523d9640ad0c8becb911afed1fa12caa636847234cfc83d584a15bdc4b05fb98cbc4730af2520b453c5de468eb7fa ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 541f2e2ea547e9223d9500992bbb3ebea085aee9 Mon Sep 17 00:00:00 2001 From: Erwan BERNARD Date: Sun, 6 May 2018 01:44:32 +0200 Subject: [inja] add inja (#3428) --- ports/inja/CONTROL | 4 ++++ ports/inja/portfile.cmake | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 ports/inja/CONTROL create mode 100644 ports/inja/portfile.cmake diff --git a/ports/inja/CONTROL b/ports/inja/CONTROL new file mode 100644 index 000000000..a905ab796 --- /dev/null +++ b/ports/inja/CONTROL @@ -0,0 +1,4 @@ +Source: inja +Version: 1.0.0 +Build-Depends: nlohmann-json +Description: Inja - A Template Engine for Modern C++ diff --git a/ports/inja/portfile.cmake b/ports/inja/portfile.cmake new file mode 100644 index 000000000..dc9dc1a6b --- /dev/null +++ b/ports/inja/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pantor/inja + REF v1.0.0 + SHA512 39598df84766a0d2a28dc92e083e27b7072600372e0313727cd5dd1fe6ad1efc055dc98055247f5cb1fc4096ffb37b59995107f3456a4495bd01381ac6c74a2b + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/src/inja.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/src/inja.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/share/inja RENAME copyright) +vcpkg_copy_pdbs() -- cgit v1.2.3 From 1c49195f789b7b8d7eaeb2542730a1f72cfbefcf Mon Sep 17 00:00:00 2001 From: Coraline Date: Sat, 5 May 2018 16:44:48 -0700 Subject: physfs: fix-up CONTROL for v3.0.1 (#3421) Changed [Version] in .../ports/physfs/CONTROL to match current version in portfile.cmake --- ports/physfs/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/physfs/CONTROL b/ports/physfs/CONTROL index 20d973f18..a937d38bf 100644 --- a/ports/physfs/CONTROL +++ b/ports/physfs/CONTROL @@ -1,4 +1,4 @@ Source: physfs -Version: 2.0.3-2 +Version: 3.0.1 Description: a library to provide abstract access to various archives Build-Depends: zlib -- cgit v1.2.3 From ee469d525d835d56c97509d17e237d741d34b60c Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Mon, 7 May 2018 15:23:11 +0900 Subject: [vlpp] Fix Linux build --- ports/vlpp/CMakeLists.txt | 5 ++++- ports/vlpp/CONTROL | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ports/vlpp/CMakeLists.txt b/ports/vlpp/CMakeLists.txt index 238600f6e..d5fec60c4 100644 --- a/ports/vlpp/CMakeLists.txt +++ b/ports/vlpp/CMakeLists.txt @@ -7,7 +7,10 @@ set(SRCS Import/Vlpp.cpp Import/VlppWorkflow.cpp Import/VlppWorkflowCompiler.cpp) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") + +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") +endif() # Create and configure the target add_library(Vlpp ${SRCS}) diff --git a/ports/vlpp/CONTROL b/ports/vlpp/CONTROL index aa8381cae..392beec5e 100644 --- a/ports/vlpp/CONTROL +++ b/ports/vlpp/CONTROL @@ -1,3 +1,3 @@ Source: vlpp -Version: 0.9.3.1 +Version: 0.9.3.1-1 Description: Common C++ construction, including string operation / generic container / linq / General-LR parser generator / multithreading / reflection for C++ / etc -- cgit v1.2.3 From 0591034a2a0a63029821344372ed7349dabf5a36 Mon Sep 17 00:00:00 2001 From: Mateusz Loskot Date: Mon, 7 May 2018 13:25:52 +0200 Subject: Add VSCode workspace file to .gitignore [ci skip] --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index aa272483c..796739b31 100644 --- a/.gitignore +++ b/.gitignore @@ -274,6 +274,7 @@ __pycache__/ ############################################################ .vscode/ +*.code-workspace buildtrees/ build*/ downloads/ -- cgit v1.2.3 From ee1b4d525a52605767c3d038d59e736ea1155d7c Mon Sep 17 00:00:00 2001 From: Thomas Margier Date: Mon, 7 May 2018 21:08:01 +0200 Subject: [imgui] Update to 1.60 --- ports/imgui/CONTROL | 2 +- ports/imgui/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL index 6b6a82476..640dece87 100644 --- a/ports/imgui/CONTROL +++ b/ports/imgui/CONTROL @@ -1,3 +1,3 @@ Source: imgui -Version: 1.53 +Version: 1.60 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 1ca99841d..7b18fc9ed 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ocornut/imgui - REF v1.53 - SHA512 3e1ebf3844eaca3471064fa3d5792525c696b39f502c75235fae469038b73ae0eff198f13d5e1a35f86c011903cd379066afe1e22b6df769b9b16dc390f8b0c3 + REF v1.60 + SHA512 405b79ced59b4e4e45eebdbf278435f325a553e04338702dbdd3f30c7a39cb52a4dad91443bd99d19f61e60cd78d544fc1436ae2d10fef7c3a8a46cbb62685d9 HEAD_REF master ) -- cgit v1.2.3 From 6b9bfcb6cff3b9c3e566e2ae9677c8dae7bb81de Mon Sep 17 00:00:00 2001 From: ArashPartow Date: Tue, 8 May 2018 21:19:26 +1000 Subject: Update for ExprTk package --- ports/exprtk/CONTROL | 2 +- ports/exprtk/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/exprtk/CONTROL b/ports/exprtk/CONTROL index 2ebcfab28..4df1a2e2b 100644 --- a/ports/exprtk/CONTROL +++ b/ports/exprtk/CONTROL @@ -1,3 +1,3 @@ Source: exprtk -Version: 2018.01.01-f32d2b4 +Version: 2018.04.30-46877b6 Description: Simple to use, easy to integrate and extremely efficient run-time C++ mathematical expression parser and evaluation engine. diff --git a/ports/exprtk/portfile.cmake b/ports/exprtk/portfile.cmake index 1178a3e12..69d9921ec 100644 --- a/ports/exprtk/portfile.cmake +++ b/ports/exprtk/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArashPartow/exprtk - REF f32d2b4bbb640ea4732b8a7fce1bd9717e9c998b - SHA512 22c977dc2514bd525856ed26b8895687601e79784486efe9d4f27466e1e1932c4a947297d83e9b98a6c82df9eaf5b0f82990741bbb699d565ca11e5755a55dd6 + REF 46877b604cfcc0a0e592fc7a8a874cf2a9f90cf4 + SHA512 1043b5b6aa64bc3f8d989d2aac3e3a125188b1526ab92e245ad526ab1fe37e10cb275f2b77d311b4d91bd4ea32e1d81dfcd8abf8373b723a8b664842690ee1ae ) file(COPY ${SOURCE_PATH}/exprtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -- cgit v1.2.3 From f6fe7fcc07f63db7f2991dafdde515cabfa1d227 Mon Sep 17 00:00:00 2001 From: ArashPartow Date: Tue, 8 May 2018 21:34:06 +1000 Subject: Update for StrTk package --- ports/strtk/CONTROL | 2 +- ports/strtk/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/strtk/CONTROL b/ports/strtk/CONTROL index 2fbac5743..0c9cf1720 100644 --- a/ports/strtk/CONTROL +++ b/ports/strtk/CONTROL @@ -1,4 +1,4 @@ Source: strtk -Version: 2018.01.01-5579ed1 +Version: 2018.05.07-48c9554 Description: robust, optimized and portable string processing algorithms for the C++ language Build-Depends: boost diff --git a/ports/strtk/portfile.cmake b/ports/strtk/portfile.cmake index c5998a538..f98f06930 100644 --- a/ports/strtk/portfile.cmake +++ b/ports/strtk/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArashPartow/strtk - REF 5579ed1fa9766a5f9b67ed4773a3f59e7b107093 - SHA512 552ada7aa36fd057003a0fcaeabd3b457bb7b4dbc05ae595b905503d254c95334569c63b7c9f014a174489e56902a38744417b14eaa08f86558e3c66063863b3 + REF 48c9554b3f079e34205c0af661c81c6f75f1da05 + SHA512 92a1b34808f20489d9b8c94aed384b08fcf2586967185c23a0027ee6d7170d5998e255d6aedc1fbb68327f48c0b106b8efd39f476e4041d6bcc5685c73fc1015 ) file(COPY ${SOURCE_PATH}/strtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) -- cgit v1.2.3 From 7e7958739ed7e87617465235f8f9306ae521e82e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 8 May 2018 17:22:37 -0700 Subject: Use CMAKE_EXECUTABLE_SUFFIX --- ports/protobuf/portfile.cmake | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index a6875edb9..cf30b97a1 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -85,22 +85,16 @@ endfunction() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/include) -if(CMAKE_HOST_WIN32) - set(EXECUTABLE_SUFFIX ".exe") -else() - set(EXECUTABLE_SUFFIX "") -endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") file(READ ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake RELEASE_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protoc${EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}") + string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc${CMAKE_EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protoc${CMAKE_EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake "${RELEASE_MODULE}") endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") file(READ ${CURRENT_PACKAGES_DIR}/debug/share/protobuf/protobuf-targets-debug.cmake DEBUG_MODULE) string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") - string(REPLACE "\${_IMPORT_PREFIX}/debug/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protoc${EXECUTABLE_SUFFIX}" DEBUG_MODULE "${DEBUG_MODULE}") + string(REPLACE "\${_IMPORT_PREFIX}/debug/bin/protoc${CMAKE_EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protoc${CMAKE_EXECUTABLE_SUFFIX}" DEBUG_MODULE "${DEBUG_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-debug.cmake "${DEBUG_MODULE}") endif() -- cgit v1.2.3 From d91e2ef669e45db8c62f320ad87b51f8e4ce9bed Mon Sep 17 00:00:00 2001 From: Cheney-Wang Date: Wed, 9 May 2018 04:30:38 -0700 Subject: FixpmdkFailure --- ports/pmdk/CONTROL | 2 +- ports/pmdk/addPowerShellExecutionPolicy.patch | 22 ++++++++++++++++++++++ ports/pmdk/portfile.cmake | 5 +++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ports/pmdk/addPowerShellExecutionPolicy.patch diff --git a/ports/pmdk/CONTROL b/ports/pmdk/CONTROL index f440b68bc..c8346d105 100644 --- a/ports/pmdk/CONTROL +++ b/ports/pmdk/CONTROL @@ -1,3 +1,3 @@ Source: pmdk -Version: 1.4-1 +Version: 1.4-2 Description: Persistent Memory Development Kit \ No newline at end of file diff --git a/ports/pmdk/addPowerShellExecutionPolicy.patch b/ports/pmdk/addPowerShellExecutionPolicy.patch new file mode 100644 index 000000000..bb03d23bb --- /dev/null +++ b/ports/pmdk/addPowerShellExecutionPolicy.patch @@ -0,0 +1,22 @@ +diff --git a/srcversion.vcxproj b/srcversion.vcxproj +index 8761197..795d1a7 100644 +--- a/srcversion.vcxproj ++++ b/srcversion.vcxproj +@@ -72,7 +72,7 @@ + + + +- powershell.exe -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) ++ powershell.exe -ExecutionPolicy Bypass -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) + __NON_EXISTENT_FILE__ + generate srcversion.h + +@@ -99,7 +99,7 @@ + + + +- powershell.exe -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) ++ powershell.exe -ExecutionPolicy Bypass -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION) + __NON_EXISTENT_FILE__ + generate srcversion.h + diff --git a/ports/pmdk/portfile.cmake b/ports/pmdk/portfile.cmake index 89c48a8fb..0e292aa2c 100644 --- a/ports/pmdk/portfile.cmake +++ b/ports/pmdk/portfile.cmake @@ -26,6 +26,11 @@ vcpkg_from_github( get_filename_component(PMDK_VERSION "${SOURCE_PATH}" NAME) string(REPLACE "pmdk-" "" PMDK_VERSION "${PMDK_VERSION}") +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH}/src/windows/srcversion + PATCHES "${CMAKE_CURRENT_LIST_DIR}/addPowerShellExecutionPolicy.patch" +) + # Build only the selected projects vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/src/PMDK.sln -- cgit v1.2.3 From a0d1713f8ca85037edfc2be6546e5803b06ff68f Mon Sep 17 00:00:00 2001 From: Parker Snell Date: Wed, 9 May 2018 08:46:57 -0700 Subject: Update sol2 to 2.20.0 --- ports/sol/CONTROL | 2 +- ports/sol/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sol/CONTROL b/ports/sol/CONTROL index 42b1be455..3f56b4e09 100644 --- a/ports/sol/CONTROL +++ b/ports/sol/CONTROL @@ -1,3 +1,3 @@ Source: sol -Version: 2.19.5 +Version: 2.20.0 Description: Sol v2.0 - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great diff --git a/ports/sol/portfile.cmake b/ports/sol/portfile.cmake index c65202380..a7791efe9 100644 --- a/ports/sol/portfile.cmake +++ b/ports/sol/portfile.cmake @@ -14,8 +14,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ThePhD/sol2 - REF v2.19.5 - SHA512 c004c2331e2eb0aae4467c10609f73879246c3ab5b7421e5b6fcb91b0c6595d999e5fd4c70b1859af1febb374631640d6727bf236a0cd176e40f631813e243a9 + REF v2.20.0 + SHA512 b7b5d7c2c30d54325f9f8f99eeea815afdf159b1193d1ee4b9510ab605d9fa0bc088041b3d6f1f704ce94741ffd9f01d174991007ecec7043a3fd1b93d4dd91b HEAD_REF develop ) -- cgit v1.2.3 From 6c4c7c0d78f4dd71aa75785fbc09004bbfe345ca Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 9 May 2018 19:26:12 -0700 Subject: Improve unsupported toolchain error message --- toolsrc/src/vcpkg/build.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 3616348d6..1ed5e744a 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -217,7 +217,12 @@ namespace vcpkg::Build if (it != toolset.supported_architectures.end()) return it->name; } - Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported toolchain combination %s", target_architecture); + Checks::exit_with_message(VCPKG_LINE_INFO, + "Unsupported toolchain combination. Target was: %s but supported ones were:\n%s", + target_architecture, + Strings::join(",", toolset.supported_architectures, [](const ToolsetArchOption& t) { + return t.name.c_str(); + })); } std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) @@ -520,8 +525,8 @@ namespace vcpkg::Build 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(Strings::format( - R"(unzip -qq "%s" "-d%s")", archive_path.u8string(), pkg_path.u8string())); + System::cmd_execute_clean( + Strings::format(R"(unzip -qq "%s" "-d%s")", archive_path.u8string(), pkg_path.u8string())); #endif } @@ -537,11 +542,10 @@ namespace vcpkg::Build #if defined(_WIN32) auto&& seven_zip_exe = paths.get_tool_exe(Tools::SEVEN_ZIP); - System::cmd_execute_clean(Strings::format( - R"("%s" a "%s" "%s\*" >nul)", - seven_zip_exe.u8string(), - tmp_archive_path.u8string(), - paths.package_dir(spec).u8string())); + System::cmd_execute_clean(Strings::format(R"("%s" a "%s" "%s\*" >nul)", + seven_zip_exe.u8string(), + tmp_archive_path.u8string(), + paths.package_dir(spec).u8string())); #else System::cmd_execute_clean(Strings::format( R"(cd '%s' && zip --quiet -r '%s' *)", paths.package_dir(spec).u8string(), tmp_archive_path.u8string())); -- cgit v1.2.3 From e7f2efbb83f68b849aa6f4e09e711db8904d3cc3 Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Thu, 10 May 2018 13:08:18 +0900 Subject: [brotli] Fix Linux build --- ports/brotli/CONTROL | 2 +- ports/brotli/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/brotli/CONTROL b/ports/brotli/CONTROL index 0c4d7eb0c..86d7a948b 100644 --- a/ports/brotli/CONTROL +++ b/ports/brotli/CONTROL @@ -1,3 +1,3 @@ Source: brotli -Version: 1.0.2-1 +Version: 1.0.2-2 Description: a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling. diff --git a/ports/brotli/portfile.cmake b/ports/brotli/portfile.cmake index b4e33086e..1663f3b23 100644 --- a/ports/brotli/portfile.cmake +++ b/ports/brotli/portfile.cmake @@ -17,8 +17,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/brotli) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/brotli.exe ${CURRENT_PACKAGES_DIR}/tools/brotli/brotli.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/brotli.exe) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/brotli${CMAKE_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/brotli/brotli${CMAKE_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/brotli${CMAKE_EXECUTABLE_SUFFIX}) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/brotli) -- cgit v1.2.3 From 4c32ca65417776dbdde980a3fcabcabc4abb2e54 Mon Sep 17 00:00:00 2001 From: Koby Kahane Date: Thu, 10 May 2018 23:15:00 +0300 Subject: [lz4] update to 1.8.2 --- ports/lz4/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake index 6150a35e6..bbeee708f 100644 --- a/ports/lz4/portfile.cmake +++ b/ports/lz4/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lz4/lz4 - REF v1.8.1.2 - SHA512 f4ed450bc05477cc6c2b42e6fe1fbb1fb0907f1d05b68b1d69d975b555ddb385550f204258e6d91642e14ce373815141dc218cda03b711793935d5458bc45c7f + REF v1.8.2 + SHA512 5fadc79334d37739c947d6dfc24f48ce82989fc5ee4f2bb8201ccf7ee3230b9e6e7c8488beb64050a035369f4247161d258bdb539578bec224ccebfef1b8a763 HEAD_REF dev) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -- cgit v1.2.3 From 50e5ee1e40380cf543ae804775462181984a86dc Mon Sep 17 00:00:00 2001 From: yurybura Date: Fri, 11 May 2018 13:31:12 +0300 Subject: [lz4] fix version number [zstd] update to 1.3.4 --- ports/lz4/CONTROL | 2 +- ports/zstd/CONTROL | 2 +- ports/zstd/portfile.cmake | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL index 4a0f53689..bf2dd6c08 100644 --- a/ports/lz4/CONTROL +++ b/ports/lz4/CONTROL @@ -1,3 +1,3 @@ Source: lz4 -Version: 1.8.1.2-1 +Version: 1.8.2 Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core. diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL index fa139d868..406d67176 100644 --- a/ports/zstd/CONTROL +++ b/ports/zstd/CONTROL @@ -1,3 +1,3 @@ Source: zstd -Version: 1.3.3 +Version: 1.3.4 Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index 874b5ec93..1b0aa24ac 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/zstd - REF v1.3.3 - SHA512 72b63f96f65ca987cdc82c24354f7665c7dc3b2563cb0646f355c34bf8f090d8a0759729f8beaba8317272bdab34749f934055707b25cfd69c98a9fdcfbc59ae + REF v1.3.4 + SHA512 d3c8c1dfabd251b03205b64eff97898c1e2ca457191b1f6257450e6d2675451a68aa0bc2220b2c65baa69a6997d98490612779d95b3325320c0a3202810ae554 HEAD_REF dev) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -28,7 +28,9 @@ vcpkg_configure_cmake( -DZSTD_LEGACY_SUPPORT=1 -DZSTD_BUILD_PROGRAMS=0 -DZSTD_BUILD_TESTS=0 - -DZSTD_BUILD_CONTRIB=0) + -DZSTD_BUILD_CONTRIB=0 + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=d) vcpkg_install_cmake() vcpkg_copy_pdbs() -- cgit v1.2.3 From 29d04b8b4005f5e2bfe61ccdc7a93d5c6c8a13d9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 11 May 2018 21:46:55 -0700 Subject: Update CHANGELOG and bump version to v0.0.111 --- CHANGELOG.md | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 79 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f275866d..6b22351ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,81 @@ +vcpkg (0.0.111) +-------------- + * Add ports: + - cmark 0.28.3-1 + - inja 1.0.0 + - libgo 2.7 + - range-v3-vs2015 20151130-vcpkg5 + - restinio 0.4.5.1 + - treehopper 1.11.3-1 + - yajl 2.1.0-1 + - yato 1.0-1 + * Update ports: + - abseil 2018-04-12 -> 2018-04-25-1 + - alembic 1.7.7 -> 1.7.8 + - aws-sdk-cpp 1.4.33 -> 1.4.38 + - bigint 2010.04.30-1 -> 2010.04.30-2 + - box2d 2.3.1-374664b -> 2.3.1-374664b-1 + - brotli 1.0.2-1 -> 1.0.2-2 + - cgal 4.11.1 -> 4.12 + - corrade 2018.02-1 -> 2018.04-1 + - directxmesh feb2018-eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9 -> apr2018 + - directxtex feb2018b -> apr2018 + - directxtk feb2018 -> apr2018 + - discord-rpc 3.2.0 -> 3.3.0 + - exiv2 2018-04-12 -> 2018-04-25 + - exprtk 2018.01.01-f32d2b4 -> 2018.04.30-46877b6 + - folly 2018.04.16.00 -> 2018.04.23.00 + - freeglut 3.0.0-3 -> 3.0.0-4 + - gainput 1.0.0 -> 1.0.0-1 + - geos 3.6.2-2 -> 3.6.2-3 + - http-parser 2.7.1-2 -> 2.7.1-3 + - imgui 1.53 -> 1.60 + - ismrmrd 1.3.2-1 -> 1.3.2-2 + - jsonnet 2018-04-17 -> 2018-04-25 + - leveldb 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-1 -> 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-2 + - libflac 1.3.2-4 -> 1.3.2-5 + - libqrencode 4.0.0-1 -> 4.0.0-2 + - libuv 1.20.0 -> 1.20.2 + - libxmlpp 2.40.1-1 -> 2.40.1-2 + - llvm 6.0.0 -> 6.0.0-1 + - magnum 2018.02-2 -> 2018.04-1 + - magnum-extras 2018.02-2 -> 2018.04-1 + - magnum-integration 2018.02-1 -> 2018.04-1 + - magnum-plugins 2018.02-2 -> 2018.04-1 + - ms-gsl 2018-03-17 -> 2018-04-25 + - nuklear 2018-04-17 -> 2018-04-25 + - openal-soft 1.18.2-1 -> 1.18.2-2 + - physfs 2.0.3-2 -> 3.0.1 + - poco 1.8.1-1 -> 1.9.0 + - python3 3.6.4 -> 3.6.4-1 + - quirc 1.0-1 -> 1.0-2 + - range-v3 20151130-vcpkg5 -> 0.3.5 + - rapidjson 1.1.0 -> 1.1.0-1 + - realsense2 2.10.1-1 -> 2.10.4 + - rhash 1.3.5-1 -> 1.3.6 + - rocksdb 5.12.2 -> 5.12.4 + - rs-core-lib 2018-04-12 -> 2018-04-25 + - sciter 4.1.5 -> 4.1.7 + - sfml 2.4.2-2 -> 2.4.2-3 + - sobjectizer 5.5.21 -> 5.5.22 + - sol 2.19.5 -> 2.20.0 + - sqlite3 3.23.0 -> 3.23.1-1 + - strtk 2018.01.01-5579ed1 -> 2018.05.07-48c9554 + - thrift 2018-04-17 -> 2018-04-25 + - unicorn 2018-03-20 -> 2018-04-25 + - uwebsockets 0.14.7-1 -> 0.14.8-1 + - vlpp 0.9.3.1 -> 0.9.3.1-1 + - zeromq 2018-04-17 -> 2018-04-25 + - zstd 1.3.3 -> 1.3.4 + * Add clean patching for vcpkg_from_github() + - `vcpkg_from_github()` now takes a PATCHES argument (see the azure-storage-cpp [portfile](ports\azure-storage-cpp\portfile.cmake) as an example) + - A unique directory name is derived from the source hash and the patch hashes + - Modifying the patches would previously cause the new patches to fail to apply if sources with a previous version of the patches were present in the buildtrees. This is no longer the case. + * Fix various cross-platform issues + +-- vcpkg team FRI, 11 May 2018 21:45:00 -0800 + + vcpkg (0.0.110) -------------- * `vcpkg` is now available for Linux and MacOS. More information [here](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/). diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index ca3fbdad8..c1c986b7c 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.110" \ No newline at end of file +"0.0.111" \ No newline at end of file -- cgit v1.2.3 From f38fbe4abf3e17b477aca4d0036b8d135537e666 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Mon, 14 May 2018 17:01:26 +0300 Subject: [ceres] Fix build on Linux. Closes #3490 --- ports/ceres/portfile.cmake | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index 7267be402..98621116b 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -1,9 +1,9 @@ set(MSVC_USE_STATIC_CRT_VALUE OFF) if(VCPKG_CRT_LINKAGE STREQUAL "static") - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "Ceres does not currently support mixing static CRT and dynamic library linkage") - endif() - set(MSVC_USE_STATIC_CRT_VALUE ON) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "Ceres does not currently support mixing static CRT and dynamic library linkage") + endif() + set(MSVC_USE_STATIC_CRT_VALUE ON) endif() include(vcpkg_common_functions) @@ -16,9 +16,6 @@ vcpkg_from_github( HEAD_REF master ) -# Ninja crash compiler with error: -# "fatal error C1001: An internal error has occurred in the compiler. (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 255)" - set(SUITESPARSE OFF) if("suitesparse" IN_LIST FEATURES) set(SUITESPARSE ON) @@ -62,7 +59,13 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + +if(WIN32) + vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib${LIB_SUFFIX}/cmake/Ceres") +endif() + vcpkg_copy_pdbs() # Changes target search path -- cgit v1.2.3 From bc4daef14e958749af48fba36dcc4759f2591504 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 14 May 2018 17:15:01 +0200 Subject: ace 6.4.8 * ports/ace/CONTROL: * ports/ace/portfile.cmake: --- ports/ace/CONTROL | 2 +- ports/ace/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/ace/CONTROL b/ports/ace/CONTROL index 9baa763dc..4dc7311b2 100644 --- a/ports/ace/CONTROL +++ b/ports/ace/CONTROL @@ -1,3 +1,3 @@ Source: ace -Version: 6.4.7 +Version: 6.4.8 Description: The ADAPTIVE Communication Environment diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake index 25eeabb0b..5f8f178e5 100644 --- a/ports/ace/portfile.cmake +++ b/ports/ace/portfile.cmake @@ -9,9 +9,9 @@ endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ACE_wrappers/ace) vcpkg_download_distfile(ARCHIVE - URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.7.zip" - FILENAME "ACE-6.4.7.zip" - SHA512 931c7e5902f3999ed05c13f9d2c53a605e9b59b4ce78f33b42238ac25286aa13fb510e2f780b6aea9505d03edf834109ab4481870327fec1b5bb11d29cfbafdc + URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.8.zip" + FILENAME "ACE-6.4.8.zip" + SHA512 a46e7d03bf9d8a76905c91e416749b092016210bd93308bdee0ca8740f7f3ac7c4b4d5688929729fa277c02019710c7e288f5f5f9ee187a0ec176d9ebbb90f96 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From fcb303331e44b08eb921d644aed531463c8f7077 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 1 May 2018 15:55:59 -0700 Subject: [abseil][aws-sdk-cpp][folly][jsonnet][ms-gsl][mujs][openimageio][re2][rs-core-lib][thrift][unicorn-lib][zeromq] Upgrades [robin-map] Initial commit --- ports/abseil/CMakeLists.txt | 2 +- ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- ports/folly/CONTROL | 2 +- ports/folly/portfile.cmake | 4 ++-- ports/jsonnet/CONTROL | 2 +- ports/jsonnet/portfile.cmake | 4 ++-- ports/ms-gsl/CONTROL | 2 +- ports/ms-gsl/portfile.cmake | 4 ++-- ports/mujs/CONTROL | 2 +- ports/mujs/portfile.cmake | 4 ++-- ports/openimageio/CONTROL | 4 ++-- ports/openimageio/portfile.cmake | 10 ++++++++-- ports/re2/CONTROL | 2 +- ports/re2/portfile.cmake | 4 ++-- ports/robin-map/CONTROL | 3 +++ ports/robin-map/portfile.cmake | 17 +++++++++++++++++ ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/unicorn-lib/CONTROL | 2 +- ports/unicorn-lib/portfile.cmake | 4 ++-- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 4 ++-- 27 files changed, 64 insertions(+), 38 deletions(-) create mode 100644 ports/robin-map/CONTROL create mode 100644 ports/robin-map/portfile.cmake diff --git a/ports/abseil/CMakeLists.txt b/ports/abseil/CMakeLists.txt index bed720843..fabe1516c 100644 --- a/ports/abseil/CMakeLists.txt +++ b/ports/abseil/CMakeLists.txt @@ -16,7 +16,7 @@ endif() function(add_sublibrary LIB) file(GLOB_RECURSE SOURCES "absl/${LIB}/*.cc") - list(FILTER SOURCES EXCLUDE REGEX "_test(ing)?(_.+)?.cc$|_nonprod.cc$") + list(FILTER SOURCES EXCLUDE REGEX "_test(ing)?(_.+)?.cc$|_nonprod.cc$|test_util.cc$") file(GLOB HEADERS "absl/${LIB}/*.h" "absl/${LIB}/*.inc") file(GLOB INTERNAL_HEADERS "absl/${LIB}/internal/*.h") diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index 48e1dc27a..0b46aff1e 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-04-25-1 +Version: 2018-05-01-1 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index d9568b79d..46a31b2e4 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF ea0e750e52ee223db34a242f9a7229ac04a0f473 - SHA512 1115fdf784eaa18c8287c6d40e773f0a4e8241db6fe8f71a17bb7018c715db0459803e6ebaeac31673c80fbc24505795e7b0783ef04d1e5e8d5359725f3698bf + REF 9613678332c976568272c8f4a78631a29159271d + SHA512 a3694d4c74f542f7a55872707548469e1bdc6dcd05d40ffd62de41d7440dc1fb98d260f690a6799ad39142e35226b04aacc6122aa1edf104fc9d396997995a8c HEAD_REF master ) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index 1a4226b9a..726233f74 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,5 +1,5 @@ Source: aws-sdk-cpp -Version: 1.4.38 +Version: 1.4.40 Description: AWS SDK for C++ Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows) Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 11e7a5056..98db4fc15 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.4.38 - SHA512 ad0ea1fa8ca63da5d936d28b1df1e9d0a609547956b5a25c0fac4043c5ba912ef33e6ee4da7898d804eee4ccb9289540ebdf3a91a101c9d439daef78903cd087 + REF 1.4.40 + SHA512 1c97820fa6239a8907c7c053bdfb3f3091121c6928c2c25a86a0263c26231bf08c1928d16e86c863d9cedfd6faf6f6f65234a22188dd14e61a2d452445c33b59 HEAD_REF master ) diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 2732747b9..5d924658f 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,5 +1,5 @@ Source: folly -Version: 2018.04.23.00 +Version: 2018.04.30.00 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 Default-Features: zlib diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 2d390a54e..baef4e466 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -17,8 +17,8 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2018.04.23.00 - SHA512 7614f799fe12047070f2efe471ccbb6166dca62947d3fd5baa9a3cc50bab6238bda77ca61153779913903ad57346767b21cf59c025a0a93db39ad99e1258c45d + REF v2018.04.30.00 + SHA512 875d61084e82a7fd64f8da0fa305b8475425eabaf746db6f27148bbefc50940fe1ce7395cefc820930b1d76c6fffaea0d89e47c81992724e2c773e7cb274f36c HEAD_REF master PATCHES ${CMAKE_CURRENT_LIST_DIR}/find-gflags.patch diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index d559187f3..15286cedb 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-04-25 +Version: 2018-05-01 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 6314800dc..17afd237c 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF 33dd1c612d1026466cd37e04d3ea7d61ae07241e - SHA512 656939e57ed47a1ccb0656751176c58f575570d00a84c7b256898e25dd67f734b3cea014d328f63ece21b62f62d807643986dad65ca8cc3a7bda53f8b01f8a51 + REF 2d25ad112daad159b63ef7c5e2a9ec6ed90e326b + SHA512 9f4e90c69f70ea2c35768d5aba90752442c898ea21f026ec24abafc2626b1e17819bbcb17f79531774b26912e92d7e67cdd5108501c9ab31635c997eb7f2915a HEAD_REF master ) diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL index f0bcb191b..a3f8d76dc 100644 --- a/ports/ms-gsl/CONTROL +++ b/ports/ms-gsl/CONTROL @@ -1,3 +1,3 @@ Source: ms-gsl -Version: 2018-04-25 +Version: 2018-05-01 Description: Microsoft implementation of the Guidelines Support Library \ No newline at end of file diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index 9c5d11568..5b2726758 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/GSL - REF 2fc94db3ebfb1b066edeafac1837f34d6111bff4 - SHA512 b64e454b66570b2139e401e5ffd6042f2d977903cba54fa100246865967457900deee92bfbfa3976bdae555017c044b384a8dfa247946afccd664e2d30204ab2 + REF d6b26b367b294aca43ff2d28c50293886ad1d5d4 + SHA512 b0190ce7680004c40bf59dab0d4e442f12a69989d707bd94346590c1282277273c6b71db0cf91b4aa1ffa9871bcdd4bed17b5760d9a81a5317fb84c62ea8dc43 HEAD_REF master ) diff --git a/ports/mujs/CONTROL b/ports/mujs/CONTROL index 10b776ab0..f653a2a19 100644 --- a/ports/mujs/CONTROL +++ b/ports/mujs/CONTROL @@ -1,3 +1,3 @@ Source: mujs -Version: 25821e6d74fab5fcc200fe5e818362e03e114428 +Version: 2018-05-01 Description: An embeddable Javascript interpreter in C diff --git a/ports/mujs/portfile.cmake b/ports/mujs/portfile.cmake index 9af5984e8..c1254b1af 100644 --- a/ports/mujs/portfile.cmake +++ b/ports/mujs/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ccxvii/mujs - REF 25821e6d74fab5fcc200fe5e818362e03e114428 - SHA512 8f4ae9151ce6b7ef4b1951d23f95167d16a2acb0eba4ee656ad56c92cd19af3e049c6903533d93caf0206f776374f3203b6a3f3e1748c4e720dc11ed8ac26342 + REF 780b14b5b73724c36800bf72db1f8f1a2b77f76d + SHA512 e320d36794811136a3a9ea2c750736694368007873332682491baa38472100db918f5f237ce6c351498c0d83ffce7185c6b86a87223a28eb511b12ea086aa4aa HEAD_REF master ) diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index 7da61fcb7..2639d87e9 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -1,4 +1,4 @@ Source: openimageio -Version: 1.8.10 +Version: Release-1.9.2dev 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 +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 diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index a9bc35608..83d139f03 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -3,11 +3,14 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenImageIO/oiio - REF Release-1.8.10 - SHA512 8b80019feb6bffd63bdd64e4ddad5a85b42f0ed7c27f7d82475b60b0b4db3945bd70d8d75921dd9ae8830b941d7eef6b89364ee1ab418558b75397a784314949 + REF Release-1.9.2dev + SHA512 11293f09189f26a68e2e899e15081644c17f6ad1be070d090d9df133b98f7f30a09344a2b599c8b82dc8daba64847a9dfa278f9857bc110e975e9e06c3a2fa6f HEAD_REF master ) +file(REMOVE_RECURSE "${SOURCE_PATH}/ext") +file(MAKE_DIRECTORY "${SOURCE_PATH}/ext/robin-map/tsl") + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILDSTATIC ON) set(LINKSTATIC ON) @@ -37,6 +40,9 @@ vcpkg_configure_cmake( -DUSE_QT=OFF -DBUILDSTATIC=${BUILDSTATIC} -DLINKSTATIC=${LINKSTATIC} + -DBUILD_MISSING_PYBIND11=OFF + -DBUILD_MISSING_DEPS=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON ) vcpkg_install_cmake() diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL index 0a1a4fb1d..a9e5abf1e 100644 --- a/ports/re2/CONTROL +++ b/ports/re2/CONTROL @@ -1,3 +1,3 @@ Source: re2 -Version: 2018-03-17 +Version: 2018-05-01 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 diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake index cec69eb6a..1e92be864 100644 --- a/ports/re2/portfile.cmake +++ b/ports/re2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/re2 - REF f2cc1aeb5de463c45d020c446cbcb028385b49f3 - SHA512 68df93cac6916cf5d944b57de505f7c592dcc66bbe003dbaffdf88cfd6648787a272740a861d8c8440ff2888434776141a7710b326907687285f8e9340be127c + REF 71e6699778cebf99ed11e78e48b9370f79b9ea39 + SHA512 2d8499467eb4a5c0607f6814ea2d0bbdd5025b00a7ebd8bc7c8cd897ef39e21597b9ac01baf48d4f82613fb531c1e3562e63396e6b1fdfa3532b8b7af05f049c HEAD_REF master ) diff --git a/ports/robin-map/CONTROL b/ports/robin-map/CONTROL new file mode 100644 index 000000000..f24dc8337 --- /dev/null +++ b/ports/robin-map/CONTROL @@ -0,0 +1,3 @@ +Source: robin-map +Version: 0.2.0 +Description: A C++ implementation of a fast hash map and hash set using robin hood hashing diff --git a/ports/robin-map/portfile.cmake b/ports/robin-map/portfile.cmake new file mode 100644 index 000000000..6436f6194 --- /dev/null +++ b/ports/robin-map/portfile.cmake @@ -0,0 +1,17 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Tessil/robin-map + REF v0.2.0 + SHA512 6d16c612a0d646fd08857f2f6ee2909fb607ff05fa9c7733a2b618d662f63bba2f99677b75a09870a1582b7b37f255c4ff1f9171c897c3cfa73dd8879de1ec18 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/tsl DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/robin-map + RENAME copyright +) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index 2cb7543f5..561f6b1b9 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-04-25 +Version: 2018-05-01 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index f103dc631..a793e3482 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF ae6cde6069cae27079ec36536bc960e119d502e3 - SHA512 79014460c91fa262257e912824cf4528213cec3baebd39b104c52bc162c5fd3040ecf74156aebc428f3a4846d141475ab6a41f28f43edfc06ff7331cb3e93d4a + REF 3434c7f401a6fdc47372960363202228b5cab39b + SHA512 76be0a078ffbb2c8a4da7d433bd37a0d20a01f75b684931d243d2b3ca5164ea609ec443b6267be631737a9a5187de294f7151c8403e5ee1a3d574362c3c419bf HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 1967007ec..6573f71cf 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-04-25 +Version: 2018-05-01 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 4aaf03315..140182c96 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 0293c3643b0075b510b9d92b2cc39b6d5e0fadb8 - SHA512 2bf217d9317b35215d5f984ae76509ddf505459dec97fde6aae8b4a2632882df971c438a99afc87fbe28dd931e2d1283315d1dbb3eb8af92c94fa0fdffd05ac0 + REF c7aa68bd59d1d3a1bbcb133fc986ff404d47b129 + SHA512 e95f3bcc5abf52f208d7e8b013748643bbe9b1cc734bda6aafd234d7d0a4e0a7ef96d4eec0d6ea1d2572812ad126e961fb7a495da4d01ab5eaaaabb2d1625f81 HEAD_REF master ) diff --git a/ports/unicorn-lib/CONTROL b/ports/unicorn-lib/CONTROL index 4a46f6343..236a0301a 100644 --- a/ports/unicorn-lib/CONTROL +++ b/ports/unicorn-lib/CONTROL @@ -1,4 +1,4 @@ Source: unicorn-lib -Version: 2018-04-09 +Version: 2018-05-01 Description: Unicode library for C++ by Ross Smith Build-Depends: rs-core-lib, pcre, zlib, libiconv diff --git a/ports/unicorn-lib/portfile.cmake b/ports/unicorn-lib/portfile.cmake index c215e7ccd..cc4392497 100644 --- a/ports/unicorn-lib/portfile.cmake +++ b/ports/unicorn-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/unicorn-lib - REF 38b8bfe7b22978d42923a55ed3303a0aadd86abd - SHA512 423dc648476cc957273a7a81770ce5b25452bd685aaa36688cecb1e7cc83495ede6a441fb33e010e80782986c32a8cc87fe42844b0ccd597ce9a4e5286dc6791 + REF 1009796f0aec3c1cf686078713939b99b516dcbd + SHA512 bde58811b11667d378450eb15f4d425e6e8629667f84958bef20a127db28e6a8abc57f79d386e11e67aa4b84c5519c7a1b61a1bb05210c8b1651709a921c06eb HEAD_REF master ) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index 013800189..698477378 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-04-25 +Version: 2018-05-01 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 0bdb2a47b..da317efe9 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF 69a894e1cb34c42026512a6a30f3ea6a0c77e675 - SHA512 215d9863545a6218b51de4c316d26fdb191164d356ae425bc3e15772954a1a96ee6f57aa13fdfb1f0e2a30dc7c3ca1d434b0e61ebbd31d0f1087306d529162d3 + REF 6160da5dbe2590e09c4704d5c093292ec088ec11 + SHA512 2286f32874b9b9f815605da319a773cb29ec948c4ae7697c99bc2b957b847f7fb2cf098274803387b40847e1cdee5ee752c793d88b23a2c3c316e1e9f4ed9c54 HEAD_REF master ) -- cgit v1.2.3 From 84e807598d245c658ffe3cc02c61ad0ec13a1d2f Mon Sep 17 00:00:00 2001 From: milerius Date: Tue, 15 May 2018 10:31:52 +0200 Subject: [sfml] update to 2.5.0 --- ports/sfml/portfile.cmake | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ports/sfml/portfile.cmake b/ports/sfml/portfile.cmake index 974383eb4..e0aa98080 100644 --- a/ports/sfml/portfile.cmake +++ b/ports/sfml/portfile.cmake @@ -2,9 +2,9 @@ include(vcpkg_common_functions) vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH REPO SFML/SFML - REF 2.4.2 + REF 2.5.0 HEAD_REF master - SHA512 8acfdf320939c953a9a3413398f82d02d68a56a337f1366c2677c14ce032baa8ba059113ac3c91bb6e6fc22eef119369a265be7ef6894526e6a97a01f37e1972 + SHA512 94306dcbed7d68bb7e226cd91e25950a07bcf393988c4bb79f9de3555c18c78cae4573e911235f712e711a7c02a614bf370df32b8d85240d2f08142327e05076 ) file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) @@ -36,9 +36,5 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib) endif() -# At the time of writing, HEAD has license.md instead of license.txt -if(VCPKG_HEAD_VERSION) - file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright) -else() - file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright) -endif() \ No newline at end of file + +file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright) -- cgit v1.2.3 From 04da399a7b566da940ccf9079a914d418a7ae7b2 Mon Sep 17 00:00:00 2001 From: Jason Yang Date: Tue, 15 May 2018 17:34:36 +0800 Subject: Support azure-storage-cpp 4.0.0 --- ports/azure-storage-cpp/CONTROL | 4 +- ports/azure-storage-cpp/cmake.patch | 64 ++++++++++++++++++---- ports/azure-storage-cpp/glibmm-cmake.patch | 13 ----- ports/azure-storage-cpp/portfile.cmake | 7 +-- ports/azure-storage-cpp/static-builds.patch | 13 ----- .../support-cpprest-findpackage.patch | 32 ----------- 6 files changed, 56 insertions(+), 77 deletions(-) delete mode 100644 ports/azure-storage-cpp/glibmm-cmake.patch delete mode 100644 ports/azure-storage-cpp/static-builds.patch delete mode 100644 ports/azure-storage-cpp/support-cpprest-findpackage.patch diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index c68552bba..eec7c8fcd 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp -Version: 3.2.1 -Build-Depends: cpprestsdk, atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), glibmm (!windows&!uwp), libxmlpp (!windows&!uwp), libuuid (!windows&!uwp) +Version: 4.0.0 +Build-Depends: cpprestsdk, atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), libxml2 (!windows&!uwp), libuuid (!windows&!uwp) 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. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ diff --git a/ports/azure-storage-cpp/cmake.patch b/ports/azure-storage-cpp/cmake.patch index 96fdace2d..04f6b5ade 100644 --- a/ports/azure-storage-cpp/cmake.patch +++ b/ports/azure-storage-cpp/cmake.patch @@ -1,8 +1,32 @@ diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index 07878c2..8d1c47e 100644 +index a23b93f..e471b86 100644 --- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt +++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -51,20 +51,25 @@ if(UNIX) +@@ -1,5 +1,5 @@ + set(CMAKE_LEGACY_CYGWIN_WIN32 0) +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.8) + project(azurestorage) + + enable_testing() +@@ -21,8 +21,6 @@ if(UNIX) + + # Prefer the latest (make the latest one first) + list(REVERSE OPENSSL_ROOT_DIR) +- +- + if(NOT GETTEXT_LIB_DIR) + message(WARNING "No GETTEXT_LIB_DIR specified, assuming: /usr/local/opt/gettext/lib") + set(GETTEXT_LIB_DIR "/usr/local/opt/gettext/lib") +@@ -40,6 +38,7 @@ if(UNIX) + find_package(OpenSSL 1.0.0 REQUIRED) + + ++ + find_package(UUID REQUIRED) + find_package(Casablanca REQUIRED) + find_package(LibXML2 REQUIRED) +@@ -48,20 +47,25 @@ if(UNIX) find_package(UnitTest++ REQUIRED) endif() @@ -36,7 +60,7 @@ index 07878c2..8d1c47e 100644 message("-- Setting gcc options") set(WARNINGS "-Wall -Wextra -Wunused-parameter -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls -Wunreachable-code") -@@ -81,22 +86,29 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") +@@ -78,22 +82,31 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") add_definitions(-DBOOST_LOG_DYN_LINK) endif() add_definitions(-D_TURN_OFF_PLATFORM_STRING) @@ -75,23 +99,39 @@ index 07878c2..8d1c47e 100644 + add_compile_options(/MP) + if(BUILD_SHARED_LIBS) + add_definitions(-DWASTORAGE_DLL -D_USRDLL) ++ else() ++ add_definitions(-D_NO_WASTORAGE_API) + endif() else() message("-- Unknown compiler, success is doubtful.") endif() -@@ -109,7 +121,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) +@@ -106,7 +119,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) - set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${LibXML++_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${Glibmm_INCLUDE_DIRS}) + set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${LibXML2_INCLUDE_DIR}) - set(AZURESTORAGE_LIBRARY azurestorage) - set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${LibXML++_LIBRARIES} ${UUID_LIBRARIES} ${Glibmm_LIBRARIES}) + set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${UUID_LIBRARIES} ${LibXML2_LIBRARIES}) diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -index 5c1df3c..da66eb4 100644 +index 5c1df3c..40e1767 100644 --- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake +++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -@@ -27,6 +27,7 @@ find_path(CASABLANCA_INCLUDE_DIR +@@ -23,10 +23,21 @@ find_path(CASABLANCA_INCLUDE_DIR + include + ) + ++find_package(cpprestsdk) ++ ++if(cpprestsdk_FOUND) ++ set(CASABLANCA_LIBRARY cpprestsdk::cpprest) ++ set(CASABLANCA_PROCESS_LIBS CASABLANCA_LIBRARY) ++ set(CASABLANCA_PROCESS_INCLUDES CASABLANCA_INCLUDE_DIR) ++ libfind_process(CASABLANCA) ++ return() ++endif() ++ + # Library find_library(CASABLANCA_LIBRARY NAMES cpprest @@ -100,7 +140,7 @@ index 5c1df3c..da66eb4 100644 ${CASABLANCA_PKGCONF_LIBRARY_DIRS} ${CASABLANCA_DIR} diff --git a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt -index b08111f..74ba2fb 100644 +index 59fedac..3737eeb 100644 --- a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt +++ b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt @@ -2,7 +2,7 @@ include_directories(${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR}) @@ -110,9 +150,9 @@ index b08111f..74ba2fb 100644 -if(UNIX) +if(UNIX OR WIN32) set(SOURCES + xml_wrapper.cpp xmlhelpers.cpp - response_parsers.cpp -@@ -64,24 +64,46 @@ if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug") +@@ -65,24 +65,46 @@ if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") endif() if (APPLE) @@ -139,7 +179,7 @@ index b08111f..74ba2fb 100644 target_link_libraries(${AZURESTORAGE_LIBRARIES}) +if(WIN32) -+ target_link_libraries(${AZURESTORAGE_LIBRARY} Ws2_32.lib rpcrt4.lib xmllite.lib bcrypt.lib) ++ target_link_libraries(${AZURESTORAGE_LIBRARY} Ws2_32.lib rpcrt4.lib xmllite.lib bcrypt.lib) +endif() # Portions specific to azure storage binary versioning and installation. diff --git a/ports/azure-storage-cpp/glibmm-cmake.patch b/ports/azure-storage-cpp/glibmm-cmake.patch deleted file mode 100644 index 4d3e4a8cd..000000000 --- a/ports/azure-storage-cpp/glibmm-cmake.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake -index 79a4bcb..fe130bd 100644 ---- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake -+++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake -@@ -36,7 +36,7 @@ find_path(GlibmmConfig_INCLUDE_DIR - ) - - find_library(Glibmm_LIBRARY -- NAMES glibmm-2.4 -+ NAMES glibmm glibmm-2.4 - PATHS - ${Glibmm_PKGCONF_LIBRARY_DIRS} - /usr diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index 56dbc2ca3..99c388208 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -7,14 +7,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-storage-cpp - REF v3.2.1 - SHA512 8d1e8de439e52f53eb28b77e8adf394468f4861c2c4c1f79ec1437c72e3fc0bc871e4e2662ee58090748915b0f12ce6736a7cc6ede619d332686b9fb6a026c9f + REF v4.0.0 + SHA512 5ca264e014685852eb52b5b732d352e3eaaca3358d4bdf78ac2a571fd3b18f2d967583ce4ec64105fb87f0ef182a84671248f3f6a62c4886ff05dfa10c773605 HEAD_REF master PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch - ${CMAKE_CURRENT_LIST_DIR}/static-builds.patch - ${CMAKE_CURRENT_LIST_DIR}/support-cpprest-findpackage.patch - ${CMAKE_CURRENT_LIST_DIR}/glibmm-cmake.patch ${CMAKE_CURRENT_LIST_DIR}/pplx-do-while.patch ) diff --git a/ports/azure-storage-cpp/static-builds.patch b/ports/azure-storage-cpp/static-builds.patch deleted file mode 100644 index 09b2f1077..000000000 --- a/ports/azure-storage-cpp/static-builds.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index 8d1c47e..3b4d1c0 100644 ---- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt -+++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -108,6 +108,8 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - add_compile_options(/MP) - if(BUILD_SHARED_LIBS) - add_definitions(-DWASTORAGE_DLL -D_USRDLL) -+ else() -+ add_definitions(-D_NO_WASTORAGE_API) - endif() - else() - message("-- Unknown compiler, success is doubtful.") diff --git a/ports/azure-storage-cpp/support-cpprest-findpackage.patch b/ports/azure-storage-cpp/support-cpprest-findpackage.patch deleted file mode 100644 index 5cd805208..000000000 --- a/ports/azure-storage-cpp/support-cpprest-findpackage.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index 3b4d1c0..d8818ac 100644 ---- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt -+++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -1,5 +1,5 @@ - set(CMAKE_LEGACY_CYGWIN_WIN32 0) --cmake_minimum_required(VERSION 2.6) -+cmake_minimum_required(VERSION 3.8) - project(azurestorage) - - enable_testing() -diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -index da66eb4..40e1767 100644 ---- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -+++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -@@ -23,6 +23,16 @@ find_path(CASABLANCA_INCLUDE_DIR - include - ) - -+find_package(cpprestsdk) -+ -+if(cpprestsdk_FOUND) -+ set(CASABLANCA_LIBRARY cpprestsdk::cpprest) -+ set(CASABLANCA_PROCESS_LIBS CASABLANCA_LIBRARY) -+ set(CASABLANCA_PROCESS_INCLUDES CASABLANCA_INCLUDE_DIR) -+ libfind_process(CASABLANCA) -+ return() -+endif() -+ - # Library - find_library(CASABLANCA_LIBRARY - NAMES -- cgit v1.2.3 From 87e7728ff34f726044c95657bcebd39a7d71c796 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 15 May 2018 20:51:30 -0700 Subject: [catch-classic] Update to 1.12.2 --- ports/catch-classic/CONTROL | 2 +- ports/catch-classic/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/catch-classic/CONTROL b/ports/catch-classic/CONTROL index 93650d2e6..af4d6a737 100644 --- a/ports/catch-classic/CONTROL +++ b/ports/catch-classic/CONTROL @@ -1,5 +1,5 @@ Source: catch-classic -Version: 1.12.1 +Version: 1.12.2 Description: A modern, header-only test framework for unit tests This is specifically the legacy 1.x branch provided for compatibility with older compilers. diff --git a/ports/catch-classic/portfile.cmake b/ports/catch-classic/portfile.cmake index 85460bbab..47f8ef16b 100644 --- a/ports/catch-classic/portfile.cmake +++ b/ports/catch-classic/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v1.12.1) +set(CATCH_VERSION v1.12.2) vcpkg_download_distfile(HEADER URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-classic-${CATCH_VERSION}.hpp" - SHA512 2029065d979690a6b76318e1527fc770e062a3d3411f9354f03063263f01bd3a249c8e86a57eb0e07d66cd068f7cded7d369a53997c2b762eb5fdc2668e30152 + SHA512 d2cf8b2fe95aae061a7771a0e1b7135583595d1f36dfc8d5e4d10e101ab58f6fac9d260f77c5760906c24aa402d7433aa82b5d6a0ca6b3ad91092dc5cc2d9c22 ) vcpkg_download_distfile(LICENSE -- cgit v1.2.3 From 8ce92654856897d5da7649ecea5d28818f3bcadd Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 15 May 2018 20:57:10 -0700 Subject: [bootstrap-vcpkg.sh] Find g++-8. Fixes #3486. --- scripts/bootstrap.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 037a9136d..8a4c92936 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -157,7 +157,9 @@ selectCXX() if [ "x$CXX" = "x" ]; then CXX=g++ - if which g++-7 >/dev/null 2>&1; then + if which g++-8 >/dev/null 2>&1; then + CXX=g++-8 + elif which g++-7 >/dev/null 2>&1; then CXX=g++-7 elif which g++-6 >/dev/null 2>&1; then CXX=g++-6 -- cgit v1.2.3 From b6f1217a63577c7040093e92b96994e43810cca8 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 14 May 2018 17:10:20 -0700 Subject: [boost-modular-build-helper] Pass address-model=64 on all 64-bit platforms. --- ports/boost-modular-build-helper/CMakeLists.txt | 4 +++- ports/boost-modular-build-helper/CONTROL | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/boost-modular-build-helper/CMakeLists.txt b/ports/boost-modular-build-helper/CMakeLists.txt index f75a6ee66..dc4d13dd1 100644 --- a/ports/boost-modular-build-helper/CMakeLists.txt +++ b/ports/boost-modular-build-helper/CMakeLists.txt @@ -28,8 +28,10 @@ else() list(APPEND B2_OPTIONS link=static) endif() -if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64") +if(CMAKE_SIZEOF_VOID_P EQUAL 8) list(APPEND B2_OPTIONS address-model=64) +else() + list(APPEND B2_OPTIONS address-model=32) endif() if(APPLE) diff --git a/ports/boost-modular-build-helper/CONTROL b/ports/boost-modular-build-helper/CONTROL index 7324d6ba0..0ee783390 100644 --- a/ports/boost-modular-build-helper/CONTROL +++ b/ports/boost-modular-build-helper/CONTROL @@ -1,2 +1,2 @@ Source: boost-modular-build-helper -Version: 2018-04-16-4 +Version: 2018-05-14 -- cgit v1.2.3 From db2b2d2658cf56da6183a1af844b33c37c8bd9d0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 15 May 2018 18:57:34 -0700 Subject: [brotli][folly][sol] Fix regressions on master --- ports/brotli/CONTROL | 2 +- ports/brotli/portfile.cmake | 14 +++++++++++--- ports/folly/CONTROL | 2 +- ports/folly/portfile.cmake | 4 ++-- ports/sol/CONTROL | 2 +- ports/sol/portfile.cmake | 15 ++------------- 6 files changed, 18 insertions(+), 21 deletions(-) diff --git a/ports/brotli/CONTROL b/ports/brotli/CONTROL index 86d7a948b..512faf203 100644 --- a/ports/brotli/CONTROL +++ b/ports/brotli/CONTROL @@ -1,3 +1,3 @@ Source: brotli -Version: 1.0.2-2 +Version: 1.0.2-3 Description: a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling. diff --git a/ports/brotli/portfile.cmake b/ports/brotli/portfile.cmake index 1663f3b23..64f1485a6 100644 --- a/ports/brotli/portfile.cmake +++ b/ports/brotli/portfile.cmake @@ -17,8 +17,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/brotli) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/brotli${CMAKE_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/brotli/brotli${CMAKE_EXECUTABLE_SUFFIX}) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/brotli${CMAKE_EXECUTABLE_SUFFIX}) +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/brotli ${CURRENT_PACKAGES_DIR}/bin/brotli.exe) +file(GLOB DEBUG_EXES ${CURRENT_PACKAGES_DIR}/debug/bin/brotli ${CURRENT_PACKAGES_DIR}/debug/bin/brotli.exe) +file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/brotli) +file(REMOVE ${EXES} ${DEBUG_EXES}) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/brotli) @@ -26,8 +28,14 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(GLOB STATIC_LIBS "${CURRENT_PACKAGES_DIR}/lib/*-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*-static.lib") file(REMOVE ${STATIC_LIBS}) else() - file(GLOB LIBS "${CURRENT_PACKAGES_DIR}/lib/*.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib") + file(GLOB LIBS + "${CURRENT_PACKAGES_DIR}/lib/*.lib" + "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib" + "${CURRENT_PACKAGES_DIR}/lib/*.a" + "${CURRENT_PACKAGES_DIR}/debug/lib/*.a" + ) list(FILTER LIBS EXCLUDE REGEX "-static\\.lib\$") + list(FILTER LIBS EXCLUDE REGEX "-static\\.a\$") file(REMOVE_RECURSE ${LIBS} ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 5d924658f..658468f55 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,5 +1,5 @@ Source: folly -Version: 2018.04.30.00 +Version: 2018.05.14.00 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 Default-Features: zlib diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index baef4e466..9dce4f14e 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -17,8 +17,8 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2018.04.30.00 - SHA512 875d61084e82a7fd64f8da0fa305b8475425eabaf746db6f27148bbefc50940fe1ce7395cefc820930b1d76c6fffaea0d89e47c81992724e2c773e7cb274f36c + REF v2018.05.14.00 + SHA512 ea03bdd239a637729aa863034f2ff679fcb5b982d0ebb015d45b84317afa0faec31595a2069b6553e1cc265272783926e370888f046b8d0bbd7833af2b985cb1 HEAD_REF master PATCHES ${CMAKE_CURRENT_LIST_DIR}/find-gflags.patch diff --git a/ports/sol/CONTROL b/ports/sol/CONTROL index 3f56b4e09..aa276b1f2 100644 --- a/ports/sol/CONTROL +++ b/ports/sol/CONTROL @@ -1,3 +1,3 @@ Source: sol -Version: 2.20.0 +Version: 2.20.0-1 Description: Sol v2.0 - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great diff --git a/ports/sol/portfile.cmake b/ports/sol/portfile.cmake index a7791efe9..8e6516d9a 100644 --- a/ports/sol/portfile.cmake +++ b/ports/sol/portfile.cmake @@ -1,21 +1,10 @@ -# 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 ThePhD/sol2 - REF v2.20.0 - SHA512 b7b5d7c2c30d54325f9f8f99eeea815afdf159b1193d1ee4b9510ab605d9fa0bc088041b3d6f1f704ce94741ffd9f01d174991007ecec7043a3fd1b93d4dd91b + REF f8ee7abe527a9e8414fc4965e5cbd0f8395fbeae + SHA512 6bf090deb3b664e9585672b8f85275b76c53eddc7fe206ceec943522195bb726e976c946b59cc23863bc7e0feab36f4fe1a6a7a5dae3f9c2ec5c64060014afbf HEAD_REF develop ) -- cgit v1.2.3 From 6294c6af84441ec98dc18bdb00a1b5a6c4052e14 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 15 May 2018 20:39:10 -0700 Subject: [blosc] Fix accidentally using local vendored copies --- ports/blosc/CONTROL | 2 +- ports/blosc/portfile.cmake | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/blosc/CONTROL b/ports/blosc/CONTROL index d6ec941e1..1a2378aed 100644 --- a/ports/blosc/CONTROL +++ b/ports/blosc/CONTROL @@ -1,4 +1,4 @@ Source: blosc -Version: 1.13.5 +Version: 1.13.5-1 Build-Depends: lz4, snappy, zlib, zstd Description: A blocking, shuffling and loss-less compression library that can be faster than `memcpy()` diff --git a/ports/blosc/portfile.cmake b/ports/blosc/portfile.cmake index d2107b106..33d6f729a 100644 --- a/ports/blosc/portfile.cmake +++ b/ports/blosc/portfile.cmake @@ -16,6 +16,8 @@ else() set(BLOSC_SHARED ON) endif() +file(REMOVE_RECURSE ${SOURCE_PATH}/internal-complibs) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DPREFER_EXTERNAL_LZ4=ON -- cgit v1.2.3 From 52f01eefa6e1da7a9458807a1eb3d288ecd50613 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 16 May 2018 04:48:26 +0000 Subject: [bootstrap.sh] Fix whitespace-in-path issues --- bootstrap-vcpkg.sh | 2 +- scripts/bootstrap.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-vcpkg.sh b/bootstrap-vcpkg.sh index b77b74890..a7643894c 100755 --- a/bootstrap-vcpkg.sh +++ b/bootstrap-vcpkg.sh @@ -1,4 +1,4 @@ #!/bin/sh vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) -. $vcpkgRootDir/scripts/bootstrap.sh +. "$vcpkgRootDir/scripts/bootstrap.sh" diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 8a4c92936..e999fa55e 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -97,7 +97,7 @@ fetchTool() return 1 fi - xmlFileAsString=`cat $vcpkgRootDir/scripts/vcpkgTools.xml` + xmlFileAsString=`cat "$vcpkgRootDir/scripts/vcpkgTools.xml"` toolRegexStart="" toolData="$(extractStringBetweenDelimiters "$xmlFileAsString" "$toolRegexStart" "")" if [ "$toolData" = "" ]; then -- cgit v1.2.3 From 803ba0f43a8d03320c6601803742afaa02d16e77 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 15 May 2018 22:34:02 -0700 Subject: [openvr] update to 1.0.15 --- ports/openvr/CONTROL | 2 +- ports/openvr/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/openvr/CONTROL b/ports/openvr/CONTROL index 816a8751f..fe619c8af 100644 --- a/ports/openvr/CONTROL +++ b/ports/openvr/CONTROL @@ -1,3 +1,3 @@ Source: openvr -Version: 1.0.14 +Version: 1.0.15 Description: an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting. diff --git a/ports/openvr/portfile.cmake b/ports/openvr/portfile.cmake index 31e1658b1..02fa29e58 100644 --- a/ports/openvr/portfile.cmake +++ b/ports/openvr/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ValveSoftware/openvr - REF v1.0.14 - SHA512 2f38622121911ad4d59971fe88313f839fcb3bddae07af266b3b9f804a8c3855b4eb67d9153f0979db3465279dfcce9cb0bfe83451bf8639be5cdc9acafa2eda + REF v1.0.15 + SHA512 22ad52a659e1d2e4b52832400ac5c6766d1657cb81dfb9868bdc253120c661d41eeea68991eac44af9179d2bf6a346f038f1c444278a98b55b6b738af90ba1b5 HEAD_REF master ) -- cgit v1.2.3 From 723225f52935b3f81b5de9f88b5de8dc72e005d5 Mon Sep 17 00:00:00 2001 From: Erwan BERNARD Date: Sat, 5 May 2018 20:01:14 +0200 Subject: [rocksdb] fix zlib findpackage --- ports/rocksdb/0004-zlib-findpackage.patch | 13 +++++++++++++ ports/rocksdb/portfile.cmake | 1 + 2 files changed, 14 insertions(+) create mode 100644 ports/rocksdb/0004-zlib-findpackage.patch diff --git a/ports/rocksdb/0004-zlib-findpackage.patch b/ports/rocksdb/0004-zlib-findpackage.patch new file mode 100644 index 000000000..25182760d --- /dev/null +++ b/ports/rocksdb/0004-zlib-findpackage.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fb3b126..45ca7b6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -86,7 +86,7 @@ else() + endif() + + if(WITH_ZLIB) +- find_package(zlib REQUIRED) ++ find_package(ZLIB REQUIRED) + add_definitions(-DZLIB) + include_directories(${ZLIB_INCLUDE_DIR}) + list(APPEND THIRDPARTY_LIBS ${ZLIB_LIBRARIES}) diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 114ace627..95642b19f 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/0002-disable-gtest.patch" "${CMAKE_CURRENT_LIST_DIR}/0003-only-build-one-flavor.patch" + "${CMAKE_CURRENT_LIST_DIR}/0004-zlib-findpackage.patch" "${CMAKE_CURRENT_LIST_DIR}/use-find-package.patch" "${CMAKE_CURRENT_LIST_DIR}/pass-major-version.patch" ) -- cgit v1.2.3 From 1b0682a39e1143660c3d5aa371f66591a64e8a5d Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 5 May 2018 04:23:19 -0700 Subject: [vcpkg] Significantly reduce usage of powershell. Reduce console font switching bug --- scripts/VcpkgPowershellUtils.ps1 | 322 +------------- scripts/addPoshVcpkgToPowershellProfile.ps1 | 7 +- scripts/bootstrap.ps1 | 108 +++-- scripts/fetchTool.ps1 | 109 ----- scripts/findAnyMSBuildWithCppPlatformToolset.ps1 | 58 --- scripts/findVisualStudioInstallationInstances.ps1 | 61 --- scripts/getProgramFiles32bit.ps1 | 17 - scripts/getProgramFilesPlatformBitness.ps1 | 17 - scripts/getVisualStudioInstances.ps1 | 74 ++++ scripts/vcpkgTools.xml | 15 +- toolsrc/include/vcpkg/base/system.h | 2 + toolsrc/include/vcpkg/commands.h | 4 +- toolsrc/include/vcpkg/vcpkgpaths.h | 1 + toolsrc/src/vcpkg/base/checks.cpp | 2 + toolsrc/src/vcpkg/base/system.cpp | 19 +- toolsrc/src/vcpkg/build.cpp | 14 +- toolsrc/src/vcpkg/commands.cpp | 2 +- toolsrc/src/vcpkg/commands.fetch.cpp | 509 ++++++++++++++++------ toolsrc/src/vcpkg/commands.hash.cpp | 7 +- toolsrc/src/vcpkg/export.cpp | 2 - toolsrc/src/vcpkg/vcpkgpaths.cpp | 9 +- toolsrc/vcpkg.sln | 5 +- 22 files changed, 596 insertions(+), 768 deletions(-) delete mode 100644 scripts/fetchTool.ps1 delete mode 100644 scripts/findAnyMSBuildWithCppPlatformToolset.ps1 delete mode 100644 scripts/findVisualStudioInstallationInstances.ps1 delete mode 100644 scripts/getProgramFiles32bit.ps1 delete mode 100644 scripts/getProgramFilesPlatformBitness.ps1 create mode 100644 scripts/getVisualStudioInstances.ps1 diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 3ea18116b..259df4acb 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -1,8 +1,3 @@ -function vcpkgHasModule([Parameter(Mandatory=$true)][string]$moduleName) -{ - return [bool](Get-Module -ListAvailable -Name $moduleName) -} - function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) { if ($object -eq $null) @@ -10,320 +5,21 @@ function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Par return $false } - return [bool]($object.psobject.Properties | where { $_.Name -eq "$propertyName"}) -} - -function vcpkgCreateDirectoryIfNotExists([Parameter(Mandatory=$true)][string]$dirPath) -{ - if (!(Test-Path $dirPath)) - { - New-Item -ItemType Directory -Path $dirPath | Out-Null - } -} - -function vcpkgCreateParentDirectoryIfNotExists([Parameter(Mandatory=$true)][string]$path) -{ - $parentDir = split-path -parent $path - if ([string]::IsNullOrEmpty($parentDir)) - { - return - } - - if (!(Test-Path $parentDir)) - { - New-Item -ItemType Directory -Path $parentDir | Out-Null - } -} - -function vcpkgIsDirectory([Parameter(Mandatory=$true)][string]$path) -{ - return (Get-Item $path) -is [System.IO.DirectoryInfo] -} - -function vcpkgRemoveItem([Parameter(Mandatory=$true)][string]$path) -{ - if ([string]::IsNullOrEmpty($path)) - { - return - } - - if (Test-Path $path) - { - # Remove-Item -Recurse occasionally fails. This is a workaround - if (vcpkgIsDirectory $path) - { - & cmd.exe /c rd /s /q $path - } - else - { - Remove-Item $path -Force - } - } -} - -function vcpkgHasCommand([Parameter(Mandatory=$true)][string]$commandName) -{ - return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) -} - -function vcpkgHasCommandParameter([Parameter(Mandatory=$true)][string]$commandName, [Parameter(Mandatory=$true)][string]$parameterName) -{ - return (Get-Command $commandName).Parameters.Keys -contains $parameterName -} - -function vcpkgGetCredentials() -{ - if (vcpkgHasCommandParameter -commandName 'Get-Credential' -parameterName 'Message') - { - return Get-Credential -Message "Enter credentials for Proxy Authentication" - } - else - { - Write-Host "Enter credentials for Proxy Authentication" - return Get-Credential - } -} - -function vcpkgGetSHA512([Parameter(Mandatory=$true)][string]$filePath) -{ - if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Utility\Get-FileHash') - { - Write-Verbose("Hashing with Microsoft.PowerShell.Utility\Get-FileHash") - $hashresult = Microsoft.PowerShell.Utility\Get-FileHash -Path $filePath -Algorithm SHA512 -ErrorVariable hashError - if ($hashError) - { - Start-Sleep 3 - $hashresult = Microsoft.PowerShell.Utility\Get-FileHash -Path $filePath -Algorithm SHA512 -ErrorVariable Stop - } - $hash = $hashresult.Hash - } - elseif(vcpkgHasCommand -commandName 'Pscx\Get-Hash') - { - Write-Verbose("Hashing with Pscx\Get-Hash") - $hash = (Pscx\Get-Hash -Path $filePath -Algorithm SHA512).HashString - } - else - { - Write-Verbose("Hashing with .NET") - $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA512") - $fileAsByteArray = [io.File]::ReadAllBytes($filePath) - $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) - $hash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) - } - - return $hash.ToLower() + return [bool]($object.psobject.Properties | Where-Object { $_.Name -eq "$propertyName"}) } -function vcpkgCheckEqualFileHash( [Parameter(Mandatory=$true)][string]$url, - [Parameter(Mandatory=$true)][string]$filePath, - [Parameter(Mandatory=$true)][string]$expectedHash) +function getProgramFiles32bit() { - $actualHash = vcpkgGetSHA512 $filePath - if ($expectedHash -ne $actualHash) + $out = ${env:PROGRAMFILES(X86)} + if ($out -eq $null) { - Write-Host ("`nFile does not have expected hash:`n" + - " url: [ $url ]`n" + - " File path: [ $filePath ]`n" + - " Expected hash: [ $expectedHash ]`n" + - " Actual hash: [ $actualHash ]`n") - throw + $out = ${env:PROGRAMFILES} } -} -function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, - [Parameter(Mandatory=$true)][string]$downloadPath, - [Parameter(Mandatory=$true)][string]$sha512) -{ - if ($url -match "github") + if ($out -eq $null) { - if ([System.Enum]::IsDefined([Net.SecurityProtocolType], "Tls12")) - { - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - } - else - { - Write-Warning "Github has dropped support for TLS versions prior to 1.2, which is not available on your system" - Write-Warning "Please manually download $url to $downloadPath" - Write-Warning "To solve this issue for future downloads, you can also install Windows Management Framework 5.1+" - throw "Download failed" - } + throw "Could not find [Program Files 32-bit]" } - vcpkgCreateParentDirectoryIfNotExists $downloadPath - - $downloadPartPath = "$downloadPath.part" - vcpkgRemoveItem $downloadPartPath - - $wc = New-Object System.Net.WebClient - if (!$wc.Proxy.IsBypassed($url)) - { - $wc.Proxy.Credentials = vcpkgGetCredentials - } - - $wc.DownloadFile($url, $downloadPartPath) - vcpkgCheckEqualFileHash -url $url -filePath $downloadPartPath -expectedHash $sha512 - Move-Item -Path $downloadPartPath -Destination $downloadPath -} - -function vcpkgDownloadFileWithAria2( [Parameter(Mandatory=$true)][string]$aria2exe, - [Parameter(Mandatory=$true)][string]$url, - [Parameter(Mandatory=$true)][string]$downloadPath, - [Parameter(Mandatory=$true)][string]$sha512) -{ - vcpkgCreateParentDirectoryIfNotExists $downloadPath - $downloadPartPath = "$downloadPath.part" - vcpkgRemoveItem $downloadPartPath - - $parentDir = split-path -parent $downloadPath - $filename = split-path -leaf $downloadPath - - if ((Test-Path $url) -or ($url.StartsWith("file://"))) # if is local file - { - vcpkgDownloadFile $url $downloadPath $sha512 - return - } - - $ec = vcpkgInvokeCommand "$aria2exe" "--dir=`"$parentDir`" --out=`"$filename.part`" $url" - if ($ec -ne 0) - { - Write-Host "Could not download $url" - throw - } - - vcpkgCheckEqualFileHash -url $url -filePath $downloadPartPath -expectedHash $sha512 - Move-Item -Path $downloadPartPath -Destination $downloadPath -} - -function vcpkgExtractFileWith7z([Parameter(Mandatory=$true)][string]$sevenZipExe, - [Parameter(Mandatory=$true)][string]$archivePath, - [Parameter(Mandatory=$true)][string]$destinationDir) -{ - vcpkgRemoveItem $destinationDir - $destinationPartial = "$destinationDir.partial" - vcpkgRemoveItem $destinationPartial - vcpkgCreateDirectoryIfNotExists $destinationPartial - $ec = vcpkgInvokeCommand "$sevenZipExe" "x `"$archivePath`" -o`"$destinationPartial`" -y" - if ($ec -ne 0) - { - Write-Host "Could not extract $archivePath" - throw - } - Rename-Item -Path "$destinationPartial" -NewName $destinationDir -ErrorVariable renameResult - if ($renameResult) - { - Start-Sleep 3 - Rename-Item -Path "$destinationPartial" -NewName $destinationDir -ErrorAction Stop - } -} - -function vcpkgExtractZipFile( [Parameter(Mandatory=$true)][string]$archivePath, - [Parameter(Mandatory=$true)][string]$destinationDir) -{ - vcpkgRemoveItem $destinationDir - $destinationPartial = "$destinationDir.partial" - vcpkgRemoveItem $destinationPartial - vcpkgCreateDirectoryIfNotExists $destinationPartial - - - if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') - { - Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") - Microsoft.PowerShell.Archive\Expand-Archive -path $archivePath -destinationpath $destinationPartial - } - elseif (vcpkgHasCommand -commandName 'Pscx\Expand-Archive') - { - Write-Verbose("Extracting with Pscx\Expand-Archive") - Pscx\Expand-Archive -path $archivePath -OutputPath $destinationPartial - } - else - { - Write-Verbose("Extracting via shell") - $shell = new-object -com shell.application - $zip = $shell.NameSpace($(Get-Item $archivePath).fullname) - foreach($item in $zip.items()) - { - # Piping to Out-Null is used to block until finished - $shell.Namespace($destinationPartial).copyhere($item) | Out-Null - } - } - - Rename-Item -Path "$destinationPartial" -NewName $destinationDir -} - -function vcpkgInvokeCommand() -{ - param ( [Parameter(Mandatory=$true)][string]$executable, - [string]$arguments = "") - - Write-Verbose "Executing: ${executable} ${arguments}" - $process = Start-Process -FilePath "`"$executable`"" -ArgumentList $arguments -PassThru -NoNewWindow - Wait-Process -InputObject $process - $ec = $process.ExitCode - Write-Verbose "Execution terminated with exit code $ec." - return $ec -} - -function vcpkgInvokeCommandClean() -{ - param ( [Parameter(Mandatory=$true)][string]$executable, - [string]$arguments = "") - - Write-Verbose "Clean-Executing: ${executable} ${arguments}" - $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition - $cleanEnvScript = "$scriptsDir\VcpkgPowershellUtils-ClearEnvironment.ps1" - $tripleQuotes = "`"`"`"" - $argumentsWithEscapedQuotes = $arguments -replace "`"", $tripleQuotes - $command = ". $tripleQuotes$cleanEnvScript$tripleQuotes; & $tripleQuotes$executable$tripleQuotes $argumentsWithEscapedQuotes" - $arg = "-NoProfile", "-ExecutionPolicy Bypass", "-command $command" - - $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow - Wait-Process -InputObject $process - $ec = $process.ExitCode - Write-Verbose "Execution terminated with exit code $ec." - return $ec -} - -function vcpkgFormatElapsedTime([TimeSpan]$ts) -{ - if ($ts.TotalHours -ge 1) - { - return [string]::Format( "{0:N2} h", $ts.TotalHours); - } - - if ($ts.TotalMinutes -ge 1) - { - return [string]::Format( "{0:N2} min", $ts.TotalMinutes); - } - - if ($ts.TotalSeconds -ge 1) - { - return [string]::Format( "{0:N2} s", $ts.TotalSeconds); - } - - if ($ts.TotalMilliseconds -ge 1) - { - return [string]::Format( "{0:N2} ms", $ts.TotalMilliseconds); - } - - throw $ts -} - -function vcpkgFindFileRecursivelyUp() -{ - param( - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory=$true)][string]$startingDir, - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory=$true)][string]$filename - ) - - $currentDir = $startingDir - - while (!($currentDir -eq "") -and !(Test-Path "$currentDir\$filename")) - { - Write-Verbose "Examining $currentDir for $filename" - $currentDir = Split-path $currentDir -Parent - } - Write-Verbose "Examining $currentDir for $filename - Found" - return $currentDir -} + return $out +} \ No newline at end of file diff --git a/scripts/addPoshVcpkgToPowershellProfile.ps1 b/scripts/addPoshVcpkgToPowershellProfile.ps1 index dcbd2e0be..5c13a8d4a 100644 --- a/scripts/addPoshVcpkgToPowershellProfile.ps1 +++ b/scripts/addPoshVcpkgToPowershellProfile.ps1 @@ -18,10 +18,10 @@ $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition $profileEntry = "Import-Module '$scriptsDir\posh-vcpkg'" $profilePath = $PROFILE # Implicit powershell variable -if (!(Test-Path $profilePath)) +$profileDir = Split-Path $profilePath -Parent +if (!(Test-Path $profileDir)) { - $profileDir = Split-Path $profilePath -Parent - vcpkgCreateDirectoryIfNotExists $profileDir + New-Item -ItemType Directory -Path $profileDir | Out-Null } Write-Host "`nAdding the following line to ${profilePath}:" @@ -38,6 +38,7 @@ if ($existingImports.Count -gt 0) return } +# Modifying the profile will invalidate any signatures. # Posh-git does the following check, so we should too. # https://github.com/dahlbyk/posh-git/blob/master/src/Utils.ps1 # If the profile script exists and is signed, then we should not modify it diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index c8ba503d8..41ba25746 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -5,35 +5,18 @@ param( ) Set-StrictMode -Version Latest $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" -$vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root -Write-Verbose("vcpkg Path " + $vcpkgRootDir) -$gitHash = "unknownhash" -$oldpath = $env:path -try -{ - [xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" - $toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"git`"]") - $gitFromDownload = "$vcpkgRootDir\downloads\$($toolData.exeRelativePath)" - $gitDir = split-path -parent $gitFromDownload +$vcpkgRootDir = $scriptsDir +$withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash - $env:path += ";$gitDir" - if (Get-Command "git" -ErrorAction SilentlyContinue) - { - $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short - if ($LASTEXITCODE -ne 0) - { - $gitHash = "unknownhash" - } - } -} -finally +while (!($vcpkgRootDir -eq "") -and !(Test-Path "$vcpkgRootDir\.vcpkg-root")) { - $env:path = $oldpath + Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root" + $vcpkgRootDir = Split-path $vcpkgRootDir -Parent } -Write-Verbose("Git repo version string is " + $gitHash) +Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root - Found" +$gitHash = "nohash" $vcpkgSourcesPath = "$vcpkgRootDir\toolsrc" if (!(Test-Path $vcpkgSourcesPath)) @@ -42,7 +25,58 @@ if (!(Test-Path $vcpkgSourcesPath)) return } -$msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $withVSPath +function findAnyMSBuildWithCppPlatformToolset([string]$withVSPath) +{ + $VisualStudioInstances = & $scriptsDir\getVisualStudioInstances.ps1 + if ($VisualStudioInstances -eq $null) + { + throw "Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed." + } + + Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstances))" + foreach ($instanceCandidateWithEOL in $VisualStudioInstances) + { + $instanceCandidate = $instanceCandidateWithEOL -replace "::" -replace "::" + Write-Verbose "Inspecting: $instanceCandidate" + $split = $instanceCandidate -split "::" + # $preferenceWeight = $split[0] + # $releaseType = $split[1] + $version = $split[2] + $path = $split[3] + + if ($withVSPath -ne "" -and $withVSPath -ne $path) + { + Write-Verbose "Skipping: $instanceCandidate" + continue + } + + $majorVersion = $version.Substring(0,2); + if ($majorVersion -eq "15") + { + $VCFolder= "$path\VC\Tools\MSVC\" + if (Test-Path $VCFolder) + { + Write-Verbose "Picking: $instanceCandidate" + return "$path\MSBuild\15.0\Bin\MSBuild.exe", "v141" + } + } + + if ($majorVersion -eq "14") + { + $clExe= "$path\VC\bin\cl.exe" + if (Test-Path $clExe) + { + Write-Verbose "Picking: $instanceCandidate" + $programFilesPath = getProgramFiles32bit + return "$programFilesPath\MSBuild\14.0\Bin\MSBuild.exe", "v140" + } + } + } + + throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed." +} + +$msbuildExeWithPlatformToolset = findAnyMSBuildWithCppPlatformToolset $withVSPath $msbuildExe = $msbuildExeWithPlatformToolset[0] $platformToolset = $msbuildExeWithPlatformToolset[1] $windowsSDK = & $scriptsDir\getWindowsSDK.ps1 @@ -54,10 +88,33 @@ $arguments = ( "/p:Platform=x86", "/p:PlatformToolset=$platformToolset", "/p:TargetPlatformVersion=$windowsSDK", +"/verbosity:minimal", "/m", +"/nologo", "`"$vcpkgSourcesPath\dirs.proj`"") -join " " +function vcpkgInvokeCommandClean() +{ + param ( [Parameter(Mandatory=$true)][string]$executable, + [string]$arguments = "") + + Write-Verbose "Clean-Executing: ${executable} ${arguments}" + $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition + $cleanEnvScript = "$scriptsDir\VcpkgPowershellUtils-ClearEnvironment.ps1" + $tripleQuotes = "`"`"`"" + $argumentsWithEscapedQuotes = $arguments -replace "`"", $tripleQuotes + $command = ". $tripleQuotes$cleanEnvScript$tripleQuotes; & $tripleQuotes$executable$tripleQuotes $argumentsWithEscapedQuotes" + $arg = "-NoProfile", "-ExecutionPolicy Bypass", "-command $command" + + $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow + Wait-Process -InputObject $process + $ec = $process.ExitCode + Write-Verbose "Execution terminated with exit code $ec." + return $ec +} + # vcpkgInvokeCommandClean cmd "/c echo %PATH%" +Write-Host "`nBuilding vcpkg.exe ...`n" $ec = vcpkgInvokeCommandClean $msbuildExe $arguments if ($ec -ne 0) @@ -65,6 +122,7 @@ if ($ec -ne 0) Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." return } +Write-Host "`nBuilding vcpkg.exe... done.`n" Write-Verbose("Placing vcpkg.exe in the correct location") diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 deleted file mode 100644 index eca405b62..000000000 --- a/scripts/fetchTool.ps1 +++ /dev/null @@ -1,109 +0,0 @@ -[CmdletBinding()] -param( - [Parameter(Mandatory=$true)][string]$tool -) - -Set-StrictMode -Version Latest - -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" - -Write-Verbose "Fetching tool: $tool" -$vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root - -$downloadsDir = "$vcpkgRootDir\downloads" -vcpkgCreateDirectoryIfNotExists $downloadsDir -$downloadsDir = Resolve-Path $downloadsDir - -function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) -{ - $tool = $tool.toLower() - - [xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" - $toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"$tool`"]") # Case-sensitive! - - if ($toolData -eq $null) - { - throw "Unknown tool $tool" - } - - $toolPath="$downloadsDir\tools\$tool-$($toolData.version)-windows" - $exePath = "$toolPath\$($toolData.exeRelativePath)" - - if (Test-Path $exePath) - { - return $exePath - } - - $isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveName" - if ($isArchive) - { - $downloadPath = "$downloadsDir\$($toolData.archiveName)" - } - else - { - $downloadPath = "$toolPath\$($toolData.exeRelativePath)" - } - - [String]$url = $toolData.url - if (!(Test-Path $downloadPath)) - { - Write-Host "Downloading $tool..." - - # Download aria2 with .NET. aria2 will be used to download everything else. - if ($tool -eq "aria2") - { - vcpkgDownloadFile $url $downloadPath $toolData.sha512 - } - else - { - $aria2exe = fetchToolInternal "aria2" - vcpkgDownloadFileWithAria2 $aria2exe $url $downloadPath $toolData.sha512 - } - - Write-Host "Downloading $tool... done." - } - else - { - vcpkgCheckEqualFileHash -url $url -filePath $downloadPath -expectedHash $toolData.sha512 - } - - if ($isArchive) - { - Write-Host "Extracting $tool..." - # Extract 7zip920 with shell because we need it to extract 7zip - # Extract aria2 with shell because we need it to download 7zip - if ($tool -eq "7zip920" -or $tool -eq "aria2") - { - vcpkgExtractZipFile -ArchivePath $downloadPath -DestinationDir $toolPath - } - elseif ($tool -eq "7zip") - { - $sevenZip920 = fetchToolInternal "7zip920" - $ec = vcpkgInvokeCommand "$sevenZip920" "x `"$downloadPath`" -o`"$toolPath`" -y" - if ($ec -ne 0) - { - Write-Host "Could not extract $downloadPath" - throw - } - } - else - { - $sevenZipExe = fetchToolInternal "7zip" - vcpkgExtractFileWith7z -sevenZipExe "$sevenZipExe" -ArchivePath $downloadPath -DestinationDir $toolPath - } - Write-Host "Extracting $tool... done." - } - - if (-not (Test-Path $exePath)) - { - Write-Error "Could not detect or download $tool" - throw - } - - return $exePath -} - -$path = fetchToolInternal $tool -Write-Verbose "Fetching tool: $tool. Done." -return "::$path::" diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 deleted file mode 100644 index d7fd24e24..000000000 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ /dev/null @@ -1,58 +0,0 @@ -[CmdletBinding()] -param( - [Parameter(Mandatory=$False)] - [string]$withVSPath = "" -) - -Set-StrictMode -Version Latest -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition - -$withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash - -$VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 -if ($VisualStudioInstallationInstances -eq $null) -{ - throw "Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed." -} - -Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstallationInstances))" -foreach ($instanceCandidateWithEOL in $VisualStudioInstallationInstances) -{ - $instanceCandidate = $instanceCandidateWithEOL -replace "::" -replace "::" - Write-Verbose "Inspecting: $instanceCandidate" - $split = $instanceCandidate -split "::" - # $preferenceWeight = $split[0] - # $releaseType = $split[1] - $version = $split[2] - $path = $split[3] - - if ($withVSPath -ne "" -and $withVSPath -ne $path) - { - Write-Verbose "Skipping: $instanceCandidate" - continue - } - - $majorVersion = $version.Substring(0,2); - if ($majorVersion -eq "15") - { - $VCFolder= "$path\VC\Tools\MSVC\" - if (Test-Path $VCFolder) - { - Write-Verbose "Picking: $instanceCandidate" - return "$path\MSBuild\15.0\Bin\MSBuild.exe", "v141" - } - } - - if ($majorVersion -eq "14") - { - $clExe= "$path\VC\bin\cl.exe" - if (Test-Path $clExe) - { - Write-Verbose "Picking: $instanceCandidate" - $programFilesPath = & $scriptsDir\getProgramFiles32bit.ps1 - return "$programFilesPath\MSBuild\14.0\Bin\MSBuild.exe", "v140" - } - } -} - -throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed." \ No newline at end of file diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 deleted file mode 100644 index cb51c345d..000000000 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ /dev/null @@ -1,61 +0,0 @@ -[CmdletBinding()] -param( - -) -Set-StrictMode -Version Latest -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" - -$vswhereExe = (& $scriptsDir\fetchTool.ps1 "vswhere") -replace "::" -replace "::" - -$output = & $vswhereExe -prerelease -legacy -products * -format xml -[xml]$asXml = $output - -$results = New-Object System.Collections.ArrayList -foreach ($instance in $asXml.instances.instance) -{ - $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash - $installationVersion = $instance.InstallationVersion - - $isPrerelease = -7 - if (vcpkgHasProperty -object $instance -propertyName "isPrerelease") - { - $isPrerelease = $instance.isPrerelease - } - - if ($isPrerelease -eq 0) - { - $releaseType = "PreferenceWeight3::StableRelease" - } - elseif ($isPrerelease -eq 1) - { - $releaseType = "PreferenceWeight2::PreRelease" - } - else - { - $releaseType = "PreferenceWeight1::Legacy" - } - - # Placed like that for easy sorting according to preference - $results.Add("::${releaseType}::${installationVersion}::${installationPath}::") > $null -} - -# If nothing is found, attempt to find VS2015 Build Tools (not detected by vswhere.exe) -if ($results.Count -eq 0) -{ - $programFiles = & $scriptsDir\getProgramFiles32bit.ps1 - $installationPath = "$programFiles\Microsoft Visual Studio 14.0" - $clExe = "$installationPath\VC\bin\cl.exe" - $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" - - if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) - { - return "::PreferenceWeight1::Legacy::14.0::$installationPath::" - } -} - - -$results.Sort() -$results.Reverse() - -return $results \ No newline at end of file diff --git a/scripts/getProgramFiles32bit.ps1 b/scripts/getProgramFiles32bit.ps1 deleted file mode 100644 index 6b71915b1..000000000 --- a/scripts/getProgramFiles32bit.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -[CmdletBinding()] -param( - -) - -$out = ${env:PROGRAMFILES(X86)} -if ($out -eq $null) -{ - $out = ${env:PROGRAMFILES} -} - -if ($out -eq $null) -{ - throw "Could not find [Program Files 32-bit]" -} - -return $out \ No newline at end of file diff --git a/scripts/getProgramFilesPlatformBitness.ps1 b/scripts/getProgramFilesPlatformBitness.ps1 deleted file mode 100644 index 2be4c1137..000000000 --- a/scripts/getProgramFilesPlatformBitness.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -[CmdletBinding()] -param( - -) - -$out = ${env:ProgramW6432} -if ($out -eq $null) -{ - $out = ${env:PROGRAMFILES} -} - -if ($out -eq $null) -{ - throw "Could not find [Program Files Platform Bitness]" -} - -return $out \ No newline at end of file diff --git a/scripts/getVisualStudioInstances.ps1 b/scripts/getVisualStudioInstances.ps1 new file mode 100644 index 000000000..83b0b8ebd --- /dev/null +++ b/scripts/getVisualStudioInstances.ps1 @@ -0,0 +1,74 @@ +[CmdletBinding()] +param( + +) +Set-StrictMode -Version Latest +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition +. "$scriptsDir\VcpkgPowershellUtils.ps1" + +$programFiles = getProgramFiles32bit + +$results = New-Object System.Collections.ArrayList + +$vswhereExe = "$programFiles\Microsoft Visual Studio\Installer\vswhere.exe" + +if (Test-Path $vswhereExe) +{ + $output = & $vswhereExe -prerelease -legacy -products * -format xml + [xml]$asXml = $output + + foreach ($instance in $asXml.instances.instance) + { + $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash + $installationVersion = $instance.InstallationVersion + + $isPrerelease = -7 + if (vcpkgHasProperty -object $instance -propertyName "isPrerelease") + { + $isPrerelease = $instance.isPrerelease + } + + if ($isPrerelease -eq 0) + { + $releaseType = "PreferenceWeight3::StableRelease" + } + elseif ($isPrerelease -eq 1) + { + $releaseType = "PreferenceWeight2::PreRelease" + } + else + { + $releaseType = "PreferenceWeight1::Legacy" + } + + # Placed like that for easy sorting according to preference + $results.Add("::${releaseType}::${installationVersion}::${installationPath}::") > $null + } +} +else +{ + Write-Verbose "Could not locate vswhere at $vswhereExe" +} + +$installationPath = Split-Path -Parent $(Split-Path -Parent "$env:vs140comntools") +$clExe = "$installationPath\VC\bin\cl.exe" +$vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + +if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) +{ + $results.Add("::PreferenceWeight1::Legacy::14.0::$installationPath::") > $null +} + +$installationPath = "$programFiles\Microsoft Visual Studio 14.0" +$clExe = "$installationPath\VC\bin\cl.exe" +$vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + +if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) +{ + $results.Add("::PreferenceWeight1::Legacy::14.0::$installationPath::") > $null +} + +$results.Sort() +$results.Reverse() + +return $results diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 1f17102d2..9d5487577 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -61,17 +61,10 @@ 18.01.0 - 7za.exe - https://www.7-zip.org/a/7z1801-extra.7z - 9133fc551d76515e37fdd4dd8c1e28d464aea493548246b44565a42bba46715764f41f9cfa14d470d298c3a6e9829d200f8be5168cb67cf8f23d8042fca833bc - 7z1801-extra.7z - - - 9.20.0 - 7za.exe - https://www.7-zip.org/a/7za920.zip - 84e830c91a0e8ae499cc4814080da6569d8a6acbddc585c8b62abc86c809793aeb669b0a741063a379fd281ade85f120bc27efeb67d63bf961be893eec8bc3b3 - 7za920.zip + 7-Zip.CommandLine.18.1.0\tools\7za.exe + https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 + 8c75314102e68d2b2347d592f8e3eb05812e1ebb525decbac472231633753f1d4ca31c8e6881a36144a8da26b2571305b3ae3f4e2b85fc4a290aeda63d1a13b8 + 7-zip.commandline.18.1.0.nupkg 18.01.0 diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index 0d089276f..cf9c78868 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -47,6 +47,7 @@ namespace vcpkg::System ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line); +#if defined(_WIN32) void powershell_execute(const std::string& title, const fs::path& script_path, const std::vector& parameters = {}); @@ -54,6 +55,7 @@ namespace vcpkg::System std::string powershell_execute_and_capture_output(const std::string& title, const fs::path& script_path, const std::vector& parameters = {}); +#endif enum class Color { diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 6d29b7960..708151dce 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -132,14 +132,14 @@ namespace vcpkg::Commands namespace Hash { std::string get_string_hash(const std::string& s, const std::string& hash_type); - std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type); + std::string get_file_hash(const Files::Filesystem& fs, const fs::path& path, const std::string& hash_type); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } namespace Fetch { - std::vector find_toolset_instances(const VcpkgPaths& paths); + std::vector find_toolset_instances_prefered_first(const VcpkgPaths& paths); fs::path get_tool_path(const VcpkgPaths& paths, const std::string& tool); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 9c8f2911a..a3c90fd33 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -66,6 +66,7 @@ namespace vcpkg fs::path triplets; fs::path scripts; + fs::path tools; fs::path buildsystems; fs::path buildsystems_msbuild_targets; diff --git a/toolsrc/src/vcpkg/base/checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp index d96cb98ff..2ac5f9a15 100644 --- a/toolsrc/src/vcpkg/base/checks.cpp +++ b/toolsrc/src/vcpkg/base/checks.cpp @@ -16,6 +16,8 @@ namespace vcpkg::Checks const auto elapsed_us = GlobalState::timer.lock()->microseconds(); + Debug::println("Exiting after %d us", static_cast(elapsed_us)); + auto metrics = Metrics::g_metrics.lock(); metrics->track_metric("elapsed_us", elapsed_us); GlobalState::debugging = false; diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 95c9511f9..4da4548af 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -155,6 +155,7 @@ namespace vcpkg::System int cmd_execute_clean(const CStringView cmd_line, const std::unordered_map& extra_env) { + auto timer = Chrono::ElapsedTimer::create_started(); #if defined(_WIN32) 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)"; @@ -271,7 +272,7 @@ namespace vcpkg::System DWORD exit_code = 0; GetExitCodeProcess(process_info.hProcess, &exit_code); - Debug::println("CreateProcessW() returned %lu", exit_code); + Debug::println("CreateProcessW() returned %lu after %d us", exit_code, static_cast(timer.microseconds())); return static_cast(exit_code); #else Debug::println("system(%s)", cmd_line.c_str()); @@ -369,13 +370,20 @@ namespace vcpkg::System #endif } +#if defined(_WIN32) void powershell_execute(const std::string& title, const fs::path& script_path, const std::vector& parameters) { + SetConsoleCP(437); + SetConsoleOutputCP(437); + const std::string cmd = make_powershell_cmd(script_path, parameters); const int rc = System::cmd_execute(cmd); + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); + if (rc) { System::println(Color::error, @@ -394,14 +402,22 @@ namespace vcpkg::System Checks::exit_with_code(VCPKG_LINE_INFO, rc); } } +#endif +#if defined(_WIN32) std::string powershell_execute_and_capture_output(const std::string& title, const fs::path& script_path, const std::vector& parameters) { + SetConsoleCP(437); + SetConsoleOutputCP(437); + const std::string cmd = make_powershell_cmd(script_path, parameters); auto rc = System::cmd_execute_and_capture_output(cmd); + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); + if (rc.exit_code) { System::println(Color::error, @@ -433,6 +449,7 @@ namespace vcpkg::System return rc.output; } +#endif void println() { putchar('\n'); } diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 1ed5e744a..b8ccb15bf 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -461,9 +461,9 @@ namespace vcpkg::Build abi_tag_entries.insert(abi_tag_entries.end(), dependency_abis.begin(), dependency_abis.end()); abi_tag_entries.emplace_back( - AbiEntry{"portfile", Commands::Hash::get_file_hash(paths, config.port_dir / "portfile.cmake", "SHA1")}); + AbiEntry{"portfile", Commands::Hash::get_file_hash(fs, config.port_dir / "portfile.cmake", "SHA1")}); abi_tag_entries.emplace_back( - AbiEntry{"control", Commands::Hash::get_file_hash(paths, config.port_dir / "CONTROL", "SHA1")}); + AbiEntry{"control", Commands::Hash::get_file_hash(fs, config.port_dir / "CONTROL", "SHA1")}); abi_tag_entries.emplace_back(AbiEntry{"triplet", pre_build_info.triplet_abi_tag}); @@ -498,7 +498,7 @@ namespace vcpkg::Build const auto abi_file_path = paths.buildtrees / name / (triplet.canonical_name() + ".vcpkg_abi_info.txt"); fs.write_contents(abi_file_path, full_abi_info); - return AbiTagAndFile{Commands::Hash::get_file_hash(paths, abi_file_path, "SHA1"), abi_file_path}; + return AbiTagAndFile{Commands::Hash::get_file_hash(fs, abi_file_path, "SHA1"), abi_file_path}; } System::println( @@ -783,14 +783,12 @@ namespace vcpkg::Build { return it_hash->second; } - auto hash = Commands::Hash::get_file_hash(paths, triplet_file_path, "SHA1"); + auto hash = Commands::Hash::get_file_hash(paths.get_filesystem(), triplet_file_path, "SHA1"); s_hash_cache.emplace(triplet_file_path, hash); return hash; } - else - { - return std::string(); - } + + return std::string(); }(); const auto cmd_launch_cmake = System::make_cmake_cmd(cmake_exe_path, diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index 8b6ffb3d7..09da57705 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -43,7 +43,7 @@ namespace vcpkg::Commands {"portsdiff", &PortsDiff::perform_and_exit}, {"autocomplete", &Autocomplete::perform_and_exit}, {"hash", &Hash::perform_and_exit}, - // {"fetch", &Fetch::perform_and_exit}, + {"fetch", &Fetch::perform_and_exit}, }; return t; } diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index a6cfec3f0..d50d13c59 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include +#include #include #include #include @@ -19,6 +20,7 @@ namespace vcpkg::Commands::Fetch fs::path exe_path; std::string url; fs::path download_path; + bool is_archive; fs::path tool_dir_path; std::string sha512; }; @@ -41,20 +43,85 @@ namespace vcpkg::Commands::Fetch return result; } - static Optional extract_string_between_delimiters(const std::string& input, - const std::string& left_delim, - const std::string& right_delim, - const size_t& starting_offset = 0) + struct VcpkgStringRange { - const size_t from = input.find(left_delim, starting_offset); - if (from == std::string::npos) return nullopt; + VcpkgStringRange() = default; - const size_t substring_start = from + left_delim.length(); + // Implicit by design + VcpkgStringRange(const std::string& s) : begin(s.cbegin()), end(s.cend()) {} - const size_t to = input.find(right_delim, substring_start); - if (from == std::string::npos) return nullopt; + VcpkgStringRange(const std::string::const_iterator begin, const std::string::const_iterator end) + : begin(begin), end(end) + { + } + + std::string::const_iterator begin; + std::string::const_iterator end; + + std::string to_string() const { return std::string(this->begin, this->end); } + }; + + static std::vector find_all_enclosed(const VcpkgStringRange& input, + const std::string& left_delim, + const std::string& right_delim) + { + std::string::const_iterator it_left = input.begin; + std::string::const_iterator it_right = input.begin; + + std::vector output; - return input.substr(substring_start, to - substring_start); + while (true) + { + it_left = std::search(it_right, input.end, left_delim.cbegin(), left_delim.cend()); + if (it_left == input.end) break; + + it_left += left_delim.length(); + + it_right = std::search(it_left, input.end, right_delim.cbegin(), right_delim.cend()); + if (it_right == input.end) break; + + output.emplace_back(it_left, it_right); + + ++it_right; + } + + return output; + } + + static VcpkgStringRange find_exactly_one_enclosed(const VcpkgStringRange& input, + const std::string& left_tag, + const std::string& right_tag) + { + std::vector result = find_all_enclosed(input, left_tag, right_tag); + Checks::check_exit(VCPKG_LINE_INFO, + result.size() == 1, + "Found %d sets of %s.*%s but expected exactly 1, in block:\n%s", + result.size(), + left_tag, + right_tag, + input); + return std::move(result.front()); + } + + static Optional find_at_most_one_enclosed(const VcpkgStringRange& input, + const std::string& left_tag, + const std::string& right_tag) + { + std::vector result = find_all_enclosed(input, left_tag, right_tag); + Checks::check_exit(VCPKG_LINE_INFO, + result.size() <= 1, + "Found %d sets of %s.*%s but expected at most 1, in block:\n%s", + result.size(), + left_tag, + right_tag, + input); + + if (result.empty()) + { + return nullopt; + } + + return result.front(); } static ToolData parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool) @@ -72,21 +139,6 @@ namespace vcpkg::Commands::Fetch #if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) static const std::string XML_VERSION = "2"; static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; - - const auto get_string_inside_tags = - [](const std::string& input, const std::string& left_delim, const std::string& right_delim) -> std::string { - Optional result = extract_string_between_delimiters(input, left_delim, right_delim); - Checks::check_exit(VCPKG_LINE_INFO, - result.has_value(), - "Could not find tag <%s>.*<%s> in %s", - left_delim, - right_delim, - XML_PATH.generic_string()); - - auto r = *result.get(); - return Strings::trim(std::move(r)); - }; - static const std::regex XML_VERSION_REGEX{R"###()###"}; static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO); std::smatch match_xml_version; @@ -112,14 +164,14 @@ namespace vcpkg::Commands::Fetch tool, XML_PATH.generic_string()); - const std::string tool_data = get_string_inside_tags(XML, match_tool_entry[0], R"()"); - - const std::string version_as_string = get_string_inside_tags(tool_data, "", R"()"); + const std::string tool_data = find_exactly_one_enclosed(XML, match_tool_entry[0], "").to_string(); + const std::string version_as_string = + find_exactly_one_enclosed(tool_data, "", "").to_string(); const std::string exe_relative_path = - get_string_inside_tags(tool_data, "", R"()"); - const std::string url = get_string_inside_tags(tool_data, "", R"()"); - const std::string sha512 = get_string_inside_tags(tool_data, "", R"()"); - auto archive_name = extract_string_between_delimiters(tool_data, "", R"()"); + find_exactly_one_enclosed(tool_data, "", "").to_string(); + const std::string url = find_exactly_one_enclosed(tool_data, "", "").to_string(); + const std::string sha512 = find_exactly_one_enclosed(tool_data, "", "").to_string(); + auto archive_name = find_at_most_one_enclosed(tool_data, "", ""); const Optional> version = parse_version_string(version_as_string); Checks::check_exit(VCPKG_LINE_INFO, @@ -129,13 +181,14 @@ namespace vcpkg::Commands::Fetch version_as_string); const std::string tool_dir_name = Strings::format("%s-%s-%s", tool, version_as_string, OS_STRING); - const fs::path tool_dir_path = paths.downloads / "tools" / tool_dir_name; + const fs::path tool_dir_path = paths.tools / tool_dir_name; const fs::path exe_path = tool_dir_path / exe_relative_path; return ToolData{*version.get(), exe_path, url, - paths.downloads / archive_name.value_or(exe_relative_path), + paths.downloads / archive_name.value_or(exe_relative_path).to_string(), + archive_name.has_value(), tool_dir_path, sha512}; #endif @@ -163,51 +216,87 @@ namespace vcpkg::Commands::Fetch actual_version[2] >= expected_version[2])); } - static Optional find_if_has_equal_or_greater_version(const std::vector& candidate_paths, + static Optional find_if_has_equal_or_greater_version(Files::Filesystem& fs, + const std::vector& candidate_paths, const std::string& version_check_arguments, const std::array& expected_version) { - auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { + const auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { + if (!fs.exists(p)) return false; const std::string cmd = Strings::format(R"("%s" %s)", p.u8string(), version_check_arguments); return exists_and_has_equal_or_greater_version(cmd, expected_version); }); if (it != candidate_paths.cend()) { - return std::move(*it); + return *it; } return nullopt; } - static std::vector keep_data_lines(const std::string& data_blob) - { - static const std::regex DATA_LINE_REGEX(R"(::(.+?)(?=::))"); - - std::vector data_lines; - - const std::sregex_iterator it(data_blob.cbegin(), data_blob.cend(), DATA_LINE_REGEX); - const std::sregex_iterator end; - for (std::sregex_iterator i = it; i != end; ++i) - { - const std::smatch match = *i; - data_lines.push_back(match[1].str()); - } - - return data_lines; - } - -#if !defined(_WIN32) static void extract_archive(const VcpkgPaths& paths, const fs::path& archive, const fs::path& to_path) { Files::Filesystem& fs = paths.get_filesystem(); const fs::path to_path_partial = to_path.u8string() + ".partial"; 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) + if (ext == ".nupkg") + { + static bool recursion_limiter_sevenzip_old = false; + Checks::check_exit(VCPKG_LINE_INFO, !recursion_limiter_sevenzip_old); + recursion_limiter_sevenzip_old = true; + const auto nuget_exe = get_tool_path(paths, Tools::NUGET); + + const std::string stem = archive.stem().u8string(); + // assuming format of [name].[version in the form d.d.d] + // This assumption may not always hold + std::smatch match; + const bool has_match = std::regex_match(stem, match, std::regex{R"###(^(.+)\.(\d+\.\d+\.\d+)$)###"}); + Checks::check_exit(VCPKG_LINE_INFO, + has_match, + "Could not deduce nuget id and version from filename: %s", + archive.u8string()); + + const std::string nugetid = match[1]; + const std::string version = match[2]; + + const auto code_and_output = System::cmd_execute_and_capture_output(Strings::format( + R"("%s" install %s -Version %s -OutputDirectory "%s" -Source "%s" -nocache -DirectDownload -NonInteractive -ForceEnglishOutput -PackageSaveMode nuspec)", + nuget_exe.u8string(), + nugetid, + version, + to_path_partial.u8string(), + paths.downloads.u8string())); + + Checks::check_exit(VCPKG_LINE_INFO, + code_and_output.exit_code == 0, + "Failed to extract '%s' with message:\n%s", + archive.u8string(), + code_and_output.output); + recursion_limiter_sevenzip_old = false; + } + else + { + static bool recursion_limiter_sevenzip = false; + Checks::check_exit(VCPKG_LINE_INFO, !recursion_limiter_sevenzip); + recursion_limiter_sevenzip = true; + const auto seven_zip = get_tool_path(paths, Tools::SEVEN_ZIP); + const auto code_and_output = System::cmd_execute_and_capture_output(Strings::format( + R"("%s" x "%s" -o"%s" -y)", seven_zip.u8string(), archive.u8string(), to_path_partial.u8string())); + Checks::check_exit(VCPKG_LINE_INFO, + code_and_output.exit_code == 0, + "7zip failed while extracting '%s' with message:\n%s", + archive.u8string(), + code_and_output.output); + recursion_limiter_sevenzip = false; + } +#else if (ext == ".gz" && ext.extension() != ".tar") { const auto code = System::cmd_execute( @@ -224,16 +313,23 @@ namespace vcpkg::Commands::Fetch { Checks::exit_with_message(VCPKG_LINE_INFO, "Unexpected archive extension: %s", ext.u8string()); } +#endif - fs.rename(to_path_partial, to_path); + fs.rename(to_path_partial, to_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Failed to do post-extract rename-in-place.\nfs.rename(%s, %s, %s)", + to_path_partial.u8string(), + to_path.u8string(), + ec.message()); } - static void verify_hash(const VcpkgPaths& paths, + static void verify_hash(const Files::Filesystem& fs, const std::string& url, const fs::path& path, const std::string& sha512) { - const std::string actual_hash = Hash::get_file_hash(paths, path, "SHA512"); + const std::string actual_hash = Hash::get_file_hash(fs, path, "SHA512"); Checks::check_exit(VCPKG_LINE_INFO, sha512 == actual_hash, "File does not have the expected hash:\n" @@ -247,24 +343,119 @@ namespace vcpkg::Commands::Fetch actual_hash); } - static void download_file(const VcpkgPaths& paths, +#if defined(_WIN32) + static void winhttp_download_file(Files::Filesystem& fs, + CStringView target_file_path, + CStringView hostname, + CStringView url_path) + { + // Make sure the directories are present, otherwise fopen_s fails + const auto dir = fs::path(target_file_path.c_str()).parent_path(); + std::error_code ec; + fs.create_directories(dir, ec); + Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not create directories %s", dir.u8string()); + + FILE* f = nullptr; + const errno_t err = fopen_s(&f, target_file_path.c_str(), "wb"); + Checks::check_exit(VCPKG_LINE_INFO, + !err, + "Could not download https://%s%s. Failed to open file %s. Error code was %s", + hostname, + url_path, + target_file_path, + std::to_string(err)); + + auto hSession = WinHttpOpen( + L"vcpkg/1.0", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); + Checks::check_exit(VCPKG_LINE_INFO, hSession, "WinHttpOpen() failed: %d", GetLastError()); + + // Use Windows 10 defaults on Windows 7 + DWORD secure_protocols(WINHTTP_FLAG_SECURE_PROTOCOL_SSL3 | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1 | + WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2); + WinHttpSetOption(hSession, WINHTTP_OPTION_SECURE_PROTOCOLS, &secure_protocols, sizeof(secure_protocols)); + + // Specify an HTTP server. + auto hConnect = WinHttpConnect(hSession, Strings::to_utf16(hostname).c_str(), INTERNET_DEFAULT_HTTPS_PORT, 0); + Checks::check_exit(VCPKG_LINE_INFO, hConnect, "WinHttpConnect() failed: %d", GetLastError()); + + // Create an HTTP request handle. + auto hRequest = WinHttpOpenRequest(hConnect, + L"GET", + Strings::to_utf16(url_path).c_str(), + nullptr, + WINHTTP_NO_REFERER, + WINHTTP_DEFAULT_ACCEPT_TYPES, + WINHTTP_FLAG_SECURE); + Checks::check_exit(VCPKG_LINE_INFO, hRequest, "WinHttpOpenRequest() failed: %d", GetLastError()); + + // Send a request. + auto bResults = + WinHttpSendRequest(hRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, 0); + Checks::check_exit(VCPKG_LINE_INFO, bResults, "WinHttpSendRequest() failed: %d", GetLastError()); + + // End the request. + bResults = WinHttpReceiveResponse(hRequest, NULL); + Checks::check_exit(VCPKG_LINE_INFO, bResults, "WinHttpReceiveResponse() failed: %d", GetLastError()); + + std::vector buf; + + size_t total_downloaded_size = 0; + DWORD dwSize = 0; + do + { + DWORD downloaded_size = 0; + bResults = WinHttpQueryDataAvailable(hRequest, &dwSize); + Checks::check_exit(VCPKG_LINE_INFO, bResults, "WinHttpQueryDataAvailable() failed: %d", GetLastError()); + + if (buf.size() < dwSize) buf.resize(dwSize * 2); + + bResults = WinHttpReadData(hRequest, (LPVOID)buf.data(), dwSize, &downloaded_size); + Checks::check_exit(VCPKG_LINE_INFO, bResults, "WinHttpReadData() failed: %d", GetLastError()); + fwrite(buf.data(), 1, downloaded_size, f); + + total_downloaded_size += downloaded_size; + } while (dwSize > 0); + + WinHttpCloseHandle(hSession); + WinHttpCloseHandle(hConnect); + WinHttpCloseHandle(hRequest); + fflush(f); + fclose(f); + } +#endif + + static void download_file(Files::Filesystem& fs, const std::string& url, const fs::path& download_path, const std::string& sha512) { - Files::Filesystem& fs = paths.get_filesystem(); const std::string download_path_part = download_path.u8string() + ".part"; std::error_code ec; + fs.remove(download_path, ec); fs.remove(download_path_part, ec); +#if defined(_WIN32) + auto url_no_proto = url.substr(8); // drop https:// + auto path_begin = Util::find(url_no_proto, '/'); + std::string hostname(url_no_proto.begin(), path_begin); + std::string path(path_begin, url_no_proto.end()); + + winhttp_download_file(fs, download_path_part.c_str(), hostname, path); +#else const auto code = System::cmd_execute( Strings::format(R"(curl -L '%s' --create-dirs --output '%s')", url, download_path_part)); Checks::check_exit(VCPKG_LINE_INFO, code == 0, "Could not download %s", url); +#endif - verify_hash(paths, url, download_path_part, sha512); - fs.rename(download_path_part, download_path); + verify_hash(fs, url, download_path_part, sha512); + fs.rename(download_path_part, download_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Failed to do post-download rename-in-place.\nfs.rename(%s, %s, %s)", + download_path_part, + download_path.u8string(), + ec.message()); } -#endif static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) { const std::array& version = tool_data.version; @@ -280,50 +471,37 @@ namespace vcpkg::Commands::Fetch version_as_string, tool_name, version_as_string); -#if defined(_WIN32) - const fs::path script = paths.scripts / "fetchtool.ps1"; - const std::string title = Strings::format( - "Fetching %s version %s (No sufficient installed version was found)", tool_name, version_as_string); - const System::PowershellParameter tool_param("tool", tool_name); - const std::string output = System::powershell_execute_and_capture_output(title, script, {tool_param}); - - const std::vector tool_path = keep_data_lines(output); - Checks::check_exit(VCPKG_LINE_INFO, tool_path.size() == 1, "Expected tool path, but got %s", output); - - const fs::path actual_downloaded_path = Strings::trim(std::string{tool_path.at(0)}); - const fs::path& expected_downloaded_path = tool_data.exe_path; - std::error_code ec; - const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - eq && !ec, - "Expected tool downloaded path to be %s, but was %s", - expected_downloaded_path.u8string(), - actual_downloaded_path.u8string()); - return actual_downloaded_path; -#else - const auto& fs = paths.get_filesystem(); + auto& fs = paths.get_filesystem(); if (!fs.exists(tool_data.download_path)) { System::println("Downloading %s...", tool_name); - download_file(paths, tool_data.url, tool_data.download_path, tool_data.sha512); + download_file(fs, tool_data.url, tool_data.download_path, tool_data.sha512); System::println("Downloading %s... done.", tool_name); } else { - verify_hash(paths, tool_data.url, tool_data.download_path, tool_data.sha512); + verify_hash(fs, tool_data.url, tool_data.download_path, tool_data.sha512); } - System::println("Extracting %s...", tool_name); - extract_archive(paths, tool_data.download_path, tool_data.tool_dir_path); - System::println("Extracting %s... done.", tool_name); + if (tool_data.is_archive) + { + System::println("Extracting %s...", tool_name); + extract_archive(paths, tool_data.download_path, tool_data.tool_dir_path); + System::println("Extracting %s... done.", tool_name); + } + else + { + std::error_code ec; + fs.create_directories(tool_data.exe_path.parent_path(), ec); + fs.rename(tool_data.download_path, tool_data.exe_path, ec); + } Checks::check_exit(VCPKG_LINE_INFO, fs.exists(tool_data.exe_path), - "Expected %s to exist after extracting", - tool_data.exe_path); + "Expected %s to exist after fetching", + tool_data.exe_path.u8string()); return tool_data.exe_path; -#endif } static fs::path get_cmake_path(const VcpkgPaths& paths) @@ -345,8 +523,8 @@ namespace vcpkg::Commands::Fetch const auto& program_files_32_bit = System::get_program_files_32_bit(); if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); - const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); + const Optional path = find_if_has_equal_or_greater_version( + paths.get_filesystem(), candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -378,7 +556,8 @@ namespace vcpkg::Commands::Fetch const std::vector from_path = Files::find_from_PATH("ninja"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - auto path = find_if_has_equal_or_greater_version(candidate_paths, "--version", TOOL_DATA.version); + auto path = find_if_has_equal_or_greater_version( + paths.get_filesystem(), candidate_paths, "--version", TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -396,7 +575,8 @@ namespace vcpkg::Commands::Fetch const std::vector from_path = Files::find_from_PATH("nuget"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - auto path = find_if_has_equal_or_greater_version(candidate_paths, "", TOOL_DATA.version); + auto path = + find_if_has_equal_or_greater_version(paths.get_filesystem(), candidate_paths, "", TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -422,8 +602,8 @@ namespace vcpkg::Commands::Fetch const auto& program_files_32_bit = System::get_program_files_32_bit(); if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); - const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); + const Optional path = find_if_has_equal_or_greater_version( + paths.get_filesystem(), candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -448,8 +628,8 @@ namespace vcpkg::Commands::Fetch // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); - const Optional path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); + const Optional path = find_if_has_equal_or_greater_version( + paths.get_filesystem(), candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -460,48 +640,114 @@ namespace vcpkg::Commands::Fetch struct VisualStudioInstance { + enum class ReleaseType + { + STABLE, + PRERELEASE, + LEGACY + }; + + static bool prefered_first_comparator(const VisualStudioInstance& left, const VisualStudioInstance& right) + { + const auto get_preference_weight = [](const ReleaseType& type) -> int { + switch (type) + { + case ReleaseType::STABLE: return 3; + case ReleaseType::PRERELEASE: return 2; + case ReleaseType::LEGACY: return 1; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + }; + + if (left.release_type != right.release_type) + { + return get_preference_weight(left.release_type) > get_preference_weight(right.release_type); + } + + return left.version > right.version; + } + + VisualStudioInstance(fs::path&& root_path, std::string&& version, const ReleaseType& release_type) + : root_path(std::move(root_path)), version(std::move(version)), release_type(release_type) + { + } + fs::path root_path; std::string version; - std::string release_type; - std::string preference_weight; // Mostly unused, just for verification that order is as intended + ReleaseType release_type; std::string major_version() const { return version.substr(0, 2); } }; static std::vector get_visual_studio_instances(const VcpkgPaths& paths) { - const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; - const std::string output = - System::powershell_execute_and_capture_output("Detecting Visual Studio instances", script); + const auto& fs = paths.get_filesystem(); + + const auto& program_files_32_bit = System::get_program_files_32_bit().value_or_exit(VCPKG_LINE_INFO); + const fs::path vswhere_exe = program_files_32_bit / "Microsoft Visual Studio" / "Installer" / "vswhere.exe"; + Checks::check_exit( + VCPKG_LINE_INFO, fs.exists(vswhere_exe), "Could not locate vswhere at %s", vswhere_exe.u8string()); + + const auto code_and_output = System::cmd_execute_and_capture_output( + Strings::format(R"("%s" -prerelease -legacy -products * -format xml)", vswhere_exe.u8string())); - const std::vector instances_as_strings = keep_data_lines(output); Checks::check_exit(VCPKG_LINE_INFO, - !instances_as_strings.empty(), - "Could not detect any Visual Studio instances.\n" - "Powershell script:\n" - " %s\n" - "returned:\n" - "%s", - script.generic_string(), - output); + code_and_output.exit_code == 0, + "Running vswhere.exe failed with message:\n%s", + code_and_output.output); + + const auto& xml_as_string = code_and_output.output; + + const auto instance_entries = find_all_enclosed(xml_as_string, "", ""); std::vector instances; - for (const std::string& instance_as_string : instances_as_strings) + for (const VcpkgStringRange& instance : instance_entries) { - const std::vector split = Strings::split(instance_as_string, "::"); - Checks::check_exit(VCPKG_LINE_INFO, - split.size() == 4, - "Invalid Visual Studio instance format.\n" - "Expected: PreferenceWeight::ReleaseType::Version::PathToVisualStudio\n" - "Actual : %s\n", - instance_as_string); - instances.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); + auto maybe_is_prerelease = find_at_most_one_enclosed(instance, "", ""); + + VisualStudioInstance::ReleaseType release_type = VisualStudioInstance::ReleaseType::LEGACY; + if (auto p = maybe_is_prerelease.get()) + { + auto s = p->to_string(); + if (s == "0") + release_type = VisualStudioInstance::ReleaseType::STABLE; + else if (s == "1") + release_type = VisualStudioInstance::ReleaseType::PRERELEASE; + else + Checks::unreachable(VCPKG_LINE_INFO); + } + + instances.emplace_back( + find_exactly_one_enclosed(instance, "", "").to_string(), + find_exactly_one_enclosed(instance, "", "").to_string(), + release_type); } + const auto append_if_has_cl = [&](fs::path&& path_root) { + const auto cl_exe = path_root / "VC" / "bin" / "cl.exe"; + const auto vcvarsall_bat = path_root / "VC" / "vcvarsall.bat"; + + if (fs.exists(cl_exe) && fs.exists(vcvarsall_bat)) + instances.emplace_back(std::move(path_root), "14.0", VisualStudioInstance::ReleaseType::LEGACY); + }; + + auto maybe_vs140comntools = System::get_environment_variable("vs140comntools"); + if (const auto path_as_string = maybe_vs140comntools.get()) + { + // We want lexically_normal(), but it is not available + // Correct root path might be 2 or 3 levels up, depending on if the path has trailing backslash. Try both. + auto common7_tools = fs::path{*path_as_string}; + append_if_has_cl(fs::path{*path_as_string}.parent_path().parent_path()); + append_if_has_cl(fs::path{*path_as_string}.parent_path().parent_path().parent_path()); + } + + append_if_has_cl(program_files_32_bit / "Microsoft Visual Studio 14.0"); + return instances; } - std::vector find_toolset_instances(const VcpkgPaths& paths) +#if defined(_WIN32) + std::vector find_toolset_instances_prefered_first(const VcpkgPaths& paths) { using CPU = System::CPUArchitecture; @@ -513,12 +759,14 @@ namespace vcpkg::Commands::Fetch std::vector found_toolsets; std::vector excluded_toolsets; - const std::vector vs_instances = get_visual_studio_instances(paths); - const bool v140_is_available = Util::find_if(vs_instances, [&](const VisualStudioInstance& vs_instance) { + const SortedVector sorted{get_visual_studio_instances(paths), + VisualStudioInstance::prefered_first_comparator}; + + const bool v140_is_available = Util::find_if(sorted, [&](const VisualStudioInstance& vs_instance) { return vs_instance.major_version() == "14"; - }) != vs_instances.cend(); + }) != sorted.end(); - for (const VisualStudioInstance& vs_instance : vs_instances) + for (const VisualStudioInstance& vs_instance : sorted) { const std::string major_version = vs_instance.major_version(); if (major_version == "15") @@ -672,6 +920,7 @@ namespace vcpkg::Commands::Fetch return found_toolsets; } +#endif fs::path get_tool_path(const VcpkgPaths& paths, const std::string& tool) { diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 1f709f87b..d7d653ca3 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -154,10 +154,9 @@ namespace vcpkg::Commands::Hash }; } - std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type) + std::string get_file_hash(const Files::Filesystem& fs, const fs::path& path, const std::string& hash_type) { - Checks::check_exit( - VCPKG_LINE_INFO, paths.get_filesystem().exists(path), "File %s does not exist", path.u8string()); + Checks::check_exit(VCPKG_LINE_INFO, fs.exists(path), "File %s does not exist", path.u8string()); return BCryptHasher{hash_type}.hash_file(path); } @@ -239,7 +238,7 @@ namespace vcpkg::Commands::Hash const fs::path file_to_hash = args.command_arguments[0]; const std::string algorithm = args.command_arguments.size() == 2 ? args.command_arguments[1] : "SHA512"; - const std::string hash = get_file_hash(paths, file_to_hash, algorithm); + const std::string hash = get_file_hash(paths.get_filesystem(), file_to_hash, algorithm); System::println(hash); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 152252018..b13140de2 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -227,8 +227,6 @@ namespace vcpkg::Export {fs::path{"scripts"} / "buildsystems" / "vcpkg.cmake"}, {fs::path{"scripts"} / "cmake" / "vcpkg_get_windows_sdk.cmake"}, {fs::path{"scripts"} / "getWindowsSDK.ps1"}, - {fs::path{"scripts"} / "getProgramFilesPlatformBitness.ps1"}, - {fs::path{"scripts"} / "getProgramFiles32bit.ps1"}, {fs::path{"scripts"} / "VcpkgPowershellUtils.ps1"}, }; diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 0903c2d76..caf09f526 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -39,6 +39,7 @@ namespace vcpkg paths.triplets = paths.root / "triplets"; paths.scripts = paths.root / "scripts"; + paths.tools = paths.downloads / "tools"; paths.buildsystems = paths.scripts / "buildsystems"; paths.buildsystems_msbuild_targets = paths.buildsystems / "msbuild" / "vcpkg.targets"; @@ -113,9 +114,11 @@ namespace vcpkg return external_toolset; } - // Invariant: toolsets are non-empty and sorted with newest at back() +#if !defined(_WIN32) + Checks::exit_with_message(VCPKG_LINE_INFO, "Cannot build windows triplets from non-windows."); +#else const std::vector& vs_toolsets = - this->toolsets.get_lazy([this]() { return Commands::Fetch::find_toolset_instances(*this); }); + this->toolsets.get_lazy([this]() { return Commands::Fetch::find_toolset_instances_prefered_first(*this); }); std::vector candidates = Util::element_pointers(vs_toolsets); const auto tsv = prebuildinfo.platform_toolset.get(); @@ -159,6 +162,8 @@ namespace vcpkg Checks::check_exit(VCPKG_LINE_INFO, !candidates.empty(), "No suitable Visual Studio instances were found"); return *candidates.front(); + +#endif } Files::Filesystem& VcpkgPaths::get_filesystem() const { return Files::get_real_filesystem(); } diff --git a/toolsrc/vcpkg.sln b/toolsrc/vcpkg.sln index eae73a760..792d39906 100644 --- a/toolsrc/vcpkg.sln +++ b/toolsrc/vcpkg.sln @@ -15,11 +15,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F589 ProjectSection(SolutionItems) = preProject ..\scripts\bootstrap.ps1 = ..\scripts\bootstrap.ps1 ..\scripts\fetchDependency.ps1 = ..\scripts\fetchDependency.ps1 - ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1 = ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1 - ..\scripts\findVisualStudioInstallationInstances.ps1 = ..\scripts\findVisualStudioInstallationInstances.ps1 + ..\scripts\getVisualStudioInstances.ps1 = ..\scripts\getVisualStudioInstances.ps1 ..\scripts\get_triplet_environment.cmake = ..\scripts\get_triplet_environment.cmake - ..\scripts\getProgramFiles32bit.ps1 = ..\scripts\getProgramFiles32bit.ps1 - ..\scripts\getProgramFilesPlatformBitness.ps1 = ..\scripts\getProgramFilesPlatformBitness.ps1 ..\scripts\getWindowsSDK.ps1 = ..\scripts\getWindowsSDK.ps1 ..\scripts\internalCI.ps1 = ..\scripts\internalCI.ps1 ..\scripts\ports.cmake = ..\scripts\ports.cmake -- cgit v1.2.3 From 8bb28d0de4903075643a1683cad3c4e5ad89920a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 15 May 2018 23:41:31 -0700 Subject: Fix signature of hashing function --- toolsrc/src/vcpkg/commands.hash.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index d7d653ca3..0c7aa72c4 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -201,11 +201,10 @@ namespace vcpkg::Commands::Hash return split[0]; } - std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type) + std::string get_file_hash(const Files::Filesystem& fs, const fs::path& path, const std::string& hash_type) { const std::string digest_size = get_digest_size(hash_type); - Checks::check_exit( - VCPKG_LINE_INFO, paths.get_filesystem().exists(path), "File %s does not exist", path.u8string()); + Checks::check_exit(VCPKG_LINE_INFO, fs.exists(path), "File %s does not exist", path.u8string()); const std::string cmd_line = Strings::format(R"(shasum -a %s "%s")", digest_size, path.u8string()); return run_shasum_and_post_process(cmd_line); } -- cgit v1.2.3 From f35ff4c8bc0fbe52a3c5c78f74f7c33e550b12e1 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Wed, 16 May 2018 17:26:45 +0300 Subject: [openexr] Fix linux build --- ports/openexr/fix-static-linking.patch | 14 ++++++++++++++ ports/openexr/portfile.cmake | 3 ++- scripts/toolchains/linux.cmake | 14 ++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 ports/openexr/fix-static-linking.patch diff --git a/ports/openexr/fix-static-linking.patch b/ports/openexr/fix-static-linking.patch new file mode 100644 index 000000000..af2f067f1 --- /dev/null +++ b/ports/openexr/fix-static-linking.patch @@ -0,0 +1,14 @@ +diff --git a/IlmImf/CMakeLists.txt b/IlmImf/CMakeLists.txt +index 18d90edc..21bbaa27 100644 +--- a/IlmImf/CMakeLists.txt ++++ b/IlmImf/CMakeLists.txt +@@ -25,8 +25,8 @@ ADD_EXECUTABLE ( dwaLookups + + TARGET_LINK_LIBRARIES ( dwaLookups + Half +- Iex${ILMBASE_LIBSUFFIX} + IlmThread${ILMBASE_LIBSUFFIX} ++ Iex${ILMBASE_LIBSUFFIX} + ${PTHREAD_LIB} + ) + diff --git a/ports/openexr/portfile.cmake b/ports/openexr/portfile.cmake index 7e3b6603f..b02a487a9 100644 --- a/ports/openexr/portfile.cmake +++ b/ports/openexr/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-missing-export.patch" "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-static-linking.patch" ) # Ensure helper executables can run during build @@ -20,7 +21,7 @@ set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin") # In debug build buildsystem cannot locate IlmBase headers set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG}") -set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -I\"${CURRENT_INSTALLED_DIR}/include/OpenExr\"") +set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -I\"${CURRENT_INSTALLED_DIR}/include/OpenEXR\"") vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA diff --git a/scripts/toolchains/linux.cmake b/scripts/toolchains/linux.cmake index ea4f15d60..1ad180b4b 100644 --- a/scripts/toolchains/linux.cmake +++ b/scripts/toolchains/linux.cmake @@ -2,3 +2,17 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") endif() set(CMAKE_SYSTEM_NAME Linux CACHE STRING "") + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + set(CMAKE_CXX_FLAGS " ${VCPKG_CXX_FLAGS}" CACHE STRING "") + set(CMAKE_C_FLAGS " ${VCPKG_C_FLAGS}" CACHE STRING "") + + set(CMAKE_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "") + set(CMAKE_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "") + set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "") + set(CMAKE_C_FLAGS_RELEASE "${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "") + + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS}" CACHE STRING "") + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS}" CACHE STRING "") +endif() -- cgit v1.2.3 From 4f17361e246764485b0fc9bce972168b01904777 Mon Sep 17 00:00:00 2001 From: pravic Date: Wed, 16 May 2018 17:35:59 +0300 Subject: [curl] update to 7.60.0 --- 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 18518e1ea..d1de96015 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7_59_0-2 +Version: 7.60.0 Build-Depends: zlib Description: A library for transferring data with URLs Default-Features: ssl diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 852fcf9d0..d2a4bee9f 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO curl/curl - REF curl-7_59_0 - SHA512 eac51b986db7eafb836bc4fa00def88054304110990bf99a4387a5ff85a8375616c2ee5bee91bf608737faffe9f228dfd62be69a4b0622a4afe3deb1098b6bd3 + REF curl-7_60_0 + SHA512 876ca211d40887f36f77661235d3875bdd3fe210f131c8bd1025bd8c9ca3144a9ac23247067675a3e30385427748c51d0d54250cc2bb4a2ae0c3a9b9428b0e66 HEAD_REF master ) -- cgit v1.2.3 From 8b8538b52765bb09a9496fd9e501f21660ab2202 Mon Sep 17 00:00:00 2001 From: Alexej Harm Date: Wed, 16 May 2018 17:21:30 +0200 Subject: [wtl] Fix capitalization in file copy script --- ports/wtl/CONTROL | 2 +- ports/wtl/portfile.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/wtl/CONTROL b/ports/wtl/CONTROL index bab8da1f2..5fbab5c61 100644 --- a/ports/wtl/CONTROL +++ b/ports/wtl/CONTROL @@ -1,5 +1,5 @@ Source: wtl Maintainer: jfrederich@gmail.com -Version: 10.0 +Version: 10.0-1 Description: Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components. Build-Depends: diff --git a/ports/wtl/portfile.cmake b/ports/wtl/portfile.cmake index d992b276a..02121d1c1 100644 --- a/ports/wtl/portfile.cmake +++ b/ports/wtl/portfile.cmake @@ -7,10 +7,10 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/wtl FILES_MATCHING PATTERN "*.h") +file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/Include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/wtl FILES_MATCHING PATTERN "*.h") file(COPY ${CURRENT_BUILDTREES_DIR}/src/MS-PL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) file(RENAME ${CURRENT_PACKAGES_DIR}/share/wtl/MS-PL.txt ${CURRENT_PACKAGES_DIR}/share/wtl/copyright) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/samples DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/appwizard DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/Samples DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/AppWizard DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) -- cgit v1.2.3 From 1d39174ca5a15462764fb65c04571f45794b0711 Mon Sep 17 00:00:00 2001 From: Eric Mittelette Date: Wed, 16 May 2018 09:25:44 -0700 Subject: adding a blog link in the doc --- docs/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/index.md b/docs/index.md index 1d12b282e..c34715a27 100644 --- a/docs/index.md +++ b/docs/index.md @@ -26,6 +26,7 @@ Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are ### Blog posts - [Announcing a single C++ library manager for Linux, macOS and Windows: Vcpkg](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/) +- [Vcpkg: Using multiple enlistments to handle multiple versions of a library](https://blogs.msdn.microsoft.com/vcblog/2017/10/23/vcpkg-using-multiple-enlistments/) - [Vcpkg: introducing the export command](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/) - [Binary Compatibility and Pain-free Upgrade Why Moving to Visual Studio 2017 is almost "too easy"](https://blogs.msdn.microsoft.com/vcblog/2017/03/07/binary-compatibility-and-pain-free-upgrade-why-moving-to-visual-studio-2017-is-almost-too-easy/) - [Vcpkg recent enhancements](https://blogs.msdn.microsoft.com/vcblog/2017/02/14/vcpkg-recent-enhancements/) -- cgit v1.2.3 From 8347101e63649dab2930bbc11dab39fa37c1e927 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 16 May 2018 14:51:17 -0700 Subject: [ps1] Add missing "include" --- scripts/bootstrap.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 41ba25746..ed9491e2d 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -5,6 +5,7 @@ param( ) Set-StrictMode -Version Latest $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition +. "$scriptsDir\VcpkgPowershellUtils.ps1" $vcpkgRootDir = $scriptsDir $withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash -- cgit v1.2.3 From f4c6fe61d0ec08d6911f914d0f57ab525a08ec0b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 16 May 2018 15:11:55 -0700 Subject: [vcpkg.exe] Don't error if vswhere.exe is not found --- toolsrc/src/vcpkg/commands.fetch.cpp | 68 ++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index d50d13c59..c46031665 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -682,45 +682,43 @@ namespace vcpkg::Commands::Fetch static std::vector get_visual_studio_instances(const VcpkgPaths& paths) { const auto& fs = paths.get_filesystem(); + std::vector instances; const auto& program_files_32_bit = System::get_program_files_32_bit().value_or_exit(VCPKG_LINE_INFO); - const fs::path vswhere_exe = program_files_32_bit / "Microsoft Visual Studio" / "Installer" / "vswhere.exe"; - Checks::check_exit( - VCPKG_LINE_INFO, fs.exists(vswhere_exe), "Could not locate vswhere at %s", vswhere_exe.u8string()); - - const auto code_and_output = System::cmd_execute_and_capture_output( - Strings::format(R"("%s" -prerelease -legacy -products * -format xml)", vswhere_exe.u8string())); - - Checks::check_exit(VCPKG_LINE_INFO, - code_and_output.exit_code == 0, - "Running vswhere.exe failed with message:\n%s", - code_and_output.output); - const auto& xml_as_string = code_and_output.output; - - const auto instance_entries = find_all_enclosed(xml_as_string, "", ""); - - std::vector instances; - for (const VcpkgStringRange& instance : instance_entries) + // Instances from vswhere + const fs::path vswhere_exe = program_files_32_bit / "Microsoft Visual Studio" / "Installer" / "vswhere.exe"; + if (fs.exists(vswhere_exe)) { - auto maybe_is_prerelease = find_at_most_one_enclosed(instance, "", ""); + const auto code_and_output = System::cmd_execute_and_capture_output( + Strings::format(R"("%s" -prerelease -legacy -products * -format xml)", vswhere_exe.u8string())); + Checks::check_exit(VCPKG_LINE_INFO, + code_and_output.exit_code == 0, + "Running vswhere.exe failed with message:\n%s", + code_and_output.output); - VisualStudioInstance::ReleaseType release_type = VisualStudioInstance::ReleaseType::LEGACY; - if (auto p = maybe_is_prerelease.get()) + const auto instance_entries = find_all_enclosed(code_and_output.output, "", ""); + for (const VcpkgStringRange& instance : instance_entries) { - auto s = p->to_string(); - if (s == "0") - release_type = VisualStudioInstance::ReleaseType::STABLE; - else if (s == "1") - release_type = VisualStudioInstance::ReleaseType::PRERELEASE; - else - Checks::unreachable(VCPKG_LINE_INFO); - } + auto maybe_is_prerelease = find_at_most_one_enclosed(instance, "", ""); - instances.emplace_back( - find_exactly_one_enclosed(instance, "", "").to_string(), - find_exactly_one_enclosed(instance, "", "").to_string(), - release_type); + VisualStudioInstance::ReleaseType release_type = VisualStudioInstance::ReleaseType::LEGACY; + if (const auto p = maybe_is_prerelease.get()) + { + const auto s = p->to_string(); + if (s == "0") + release_type = VisualStudioInstance::ReleaseType::STABLE; + else if (s == "1") + release_type = VisualStudioInstance::ReleaseType::PRERELEASE; + else + Checks::unreachable(VCPKG_LINE_INFO); + } + + instances.emplace_back( + find_exactly_one_enclosed(instance, "", "").to_string(), + find_exactly_one_enclosed(instance, "", "").to_string(), + release_type); + } } const auto append_if_has_cl = [&](fs::path&& path_root) { @@ -731,8 +729,9 @@ namespace vcpkg::Commands::Fetch instances.emplace_back(std::move(path_root), "14.0", VisualStudioInstance::ReleaseType::LEGACY); }; - auto maybe_vs140comntools = System::get_environment_variable("vs140comntools"); - if (const auto path_as_string = maybe_vs140comntools.get()) + // VS2015 instance from environment variable + auto maybe_vs140_comntools = System::get_environment_variable("vs140comntools"); + if (const auto path_as_string = maybe_vs140_comntools.get()) { // We want lexically_normal(), but it is not available // Correct root path might be 2 or 3 levels up, depending on if the path has trailing backslash. Try both. @@ -741,6 +740,7 @@ namespace vcpkg::Commands::Fetch append_if_has_cl(fs::path{*path_as_string}.parent_path().parent_path().parent_path()); } + // VS2015 instance from Program Files append_if_has_cl(program_files_32_bit / "Microsoft Visual Studio 14.0"); return instances; -- cgit v1.2.3 From f69cce7051e4404e19fe8c049c23c4678fe8b3d4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 16 May 2018 15:30:26 -0700 Subject: Fix typo --- toolsrc/include/vcpkg/commands.h | 2 +- toolsrc/src/vcpkg/commands.fetch.cpp | 6 +++--- toolsrc/src/vcpkg/vcpkgpaths.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 708151dce..21e77aa52 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -139,7 +139,7 @@ namespace vcpkg::Commands namespace Fetch { - std::vector find_toolset_instances_prefered_first(const VcpkgPaths& paths); + std::vector find_toolset_instances_preferred_first(const VcpkgPaths& paths); fs::path get_tool_path(const VcpkgPaths& paths, const std::string& tool); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index c46031665..c88ae9dd0 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -647,7 +647,7 @@ namespace vcpkg::Commands::Fetch LEGACY }; - static bool prefered_first_comparator(const VisualStudioInstance& left, const VisualStudioInstance& right) + static bool preferred_first_comparator(const VisualStudioInstance& left, const VisualStudioInstance& right) { const auto get_preference_weight = [](const ReleaseType& type) -> int { switch (type) @@ -747,7 +747,7 @@ namespace vcpkg::Commands::Fetch } #if defined(_WIN32) - std::vector find_toolset_instances_prefered_first(const VcpkgPaths& paths) + std::vector find_toolset_instances_preferred_first(const VcpkgPaths& paths) { using CPU = System::CPUArchitecture; @@ -760,7 +760,7 @@ namespace vcpkg::Commands::Fetch std::vector excluded_toolsets; const SortedVector sorted{get_visual_studio_instances(paths), - VisualStudioInstance::prefered_first_comparator}; + VisualStudioInstance::preferred_first_comparator}; const bool v140_is_available = Util::find_if(sorted, [&](const VisualStudioInstance& vs_instance) { return vs_instance.major_version() == "14"; diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index caf09f526..9b74bea74 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -117,8 +117,8 @@ namespace vcpkg #if !defined(_WIN32) Checks::exit_with_message(VCPKG_LINE_INFO, "Cannot build windows triplets from non-windows."); #else - const std::vector& vs_toolsets = - this->toolsets.get_lazy([this]() { return Commands::Fetch::find_toolset_instances_prefered_first(*this); }); + const std::vector& vs_toolsets = this->toolsets.get_lazy( + [this]() { return Commands::Fetch::find_toolset_instances_preferred_first(*this); }); std::vector candidates = Util::element_pointers(vs_toolsets); const auto tsv = prebuildinfo.platform_toolset.get(); -- cgit v1.2.3 From 55322d464ea6af90925362e0572014f1cc298be5 Mon Sep 17 00:00:00 2001 From: Dale Stammen Date: Wed, 16 May 2018 17:09:19 -0700 Subject: added ignore 4703 warning to fix uwp builds (#3279) * added ignore 4703 warning to fix uwp builds * [protobuf] Bump version to include patchfile --- ports/protobuf/CONTROL | 2 +- ports/protobuf/fix-uwp.patch | 12 ++++++++++++ ports/protobuf/portfile.cmake | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 ports/protobuf/fix-uwp.patch diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index ba20ec0c9..8b149b051 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.5.1-3 +Version: 3.5.1-4 Description: Protocol Buffers - Google's data interchange format Feature: zlib diff --git a/ports/protobuf/fix-uwp.patch b/ports/protobuf/fix-uwp.patch new file mode 100644 index 000000000..ba09d5913 --- /dev/null +++ b/ports/protobuf/fix-uwp.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 3afe376..1a0b6a7 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -151,6 +151,7 @@ if (MSVC) + /wd4506 # no definition for inline function 'function' + /wd4800 # 'type' : forcing value to bool 'true' or 'false' (performance warning) + /wd4996 # The compiler encountered a deprecated declaration. ++ /wd4703 # Potentially uninitialized local pointer variable 'name' used. + ) + # Allow big object + add_definitions(/bigobj) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index cf30b97a1..f96b5240b 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -19,6 +19,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch" "${CMAKE_CURRENT_LIST_DIR}/export-ParseGeneratorParameter.patch" "${CMAKE_CURRENT_LIST_DIR}/js-embed.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-uwp.patch" ) if(CMAKE_HOST_WIN32) -- cgit v1.2.3 From 950a3d00493a90fed9bfc629bfbf9144da689d3f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 16 May 2018 18:59:25 -0700 Subject: [vcpkg edit] Fix whitespace-in-path issue --- toolsrc/src/vcpkg/commands.edit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index b6324565c..2569c2cea 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -78,7 +78,8 @@ namespace vcpkg::Commands::Edit if (Util::Sets::contains(options.switches, OPTION_BUILDTREES)) { return Util::fmap(ports, [&](const std::string& port_name) -> std::string { - return (paths.buildtrees / port_name).u8string(); + const auto buildtrees_current_dir = paths.buildtrees / port_name; + return Strings::format(R"###("%s")###", buildtrees_current_dir.u8string()); }); } -- cgit v1.2.3 From df28620ba6d5e11dbb492a89a042ece1810d8519 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 16 May 2018 19:05:13 -0700 Subject: Update CHANGELOG and bump version to v0.0.112 --- CHANGELOG.md | 32 ++++++++++++++++++++++++++++++++ toolsrc/VERSION.txt | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b22351ba..1d6cb3775 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,35 @@ +vcpkg (0.0.112) +-------------- + * Add ports: + - robin-map 0.2.0 + * Update ports: + - abseil 2018-04-25-1 -> 2018-05-01-1 + - ace 6.4.7 -> 6.4.8 + - aws-sdk-cpp 1.4.38 -> 1.4.40 + - azure-storage-cpp 3.2.1 -> 4.0.0 + - blosc 1.13.5 -> 1.13.5-1 + - boost-modular-build-helper 2018-04-16-4 -> 2018-05-14 + - brotli 1.0.2-2 -> 1.0.2-3 + - catch-classic 1.12.1 -> 1.12.2 + - folly 2018.04.23.00 -> 2018.05.14.00 + - jsonnet 2018-04-25 -> 2018-05-01 + - ms-gsl 2018-04-25 -> 2018-05-01 + - mujs 25821e6d74fab5fcc200fe5e818362e03e114428 -> 2018-05-01 + - openimageio 1.8.10 -> Release-1.9.2dev + - openvr 1.0.14 -> 1.0.15 + - protobuf 3.5.1-3 -> 3.5.1-4 + - re2 2018-03-17 -> 2018-05-01 + - rs-core-lib 2018-04-25 -> 2018-05-01 + - sol 2.20.0 -> 2.20.0-1 + - thrift 2018-04-25 -> 2018-05-01 + - unicorn-lib 2018-04-09 -> 2018-05-01 + - zeromq 2018-04-25 -> 2018-05-01 + * `vcpkg` no longer calls powershell for downloading/extracting and detecting Visual Studio. + - This also fixes an issue where `vcpkg.exe` would change the console's font when calling + +-- vcpkg team WED, 16 May 2018 19:00:00 -0800 + + vcpkg (0.0.111) -------------- * Add ports: diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index c1c986b7c..3bf1a6f6f 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.111" \ No newline at end of file +"0.0.112" \ No newline at end of file -- cgit v1.2.3 From 1e03300470b5235b3026ff94e585adef8f961785 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 16 May 2018 19:19:02 -0700 Subject: [ps1] Fix error when vs140comntools is not available --- scripts/getVisualStudioInstances.ps1 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/getVisualStudioInstances.ps1 b/scripts/getVisualStudioInstances.ps1 index 83b0b8ebd..910d0f98b 100644 --- a/scripts/getVisualStudioInstances.ps1 +++ b/scripts/getVisualStudioInstances.ps1 @@ -50,13 +50,16 @@ else Write-Verbose "Could not locate vswhere at $vswhereExe" } -$installationPath = Split-Path -Parent $(Split-Path -Parent "$env:vs140comntools") -$clExe = "$installationPath\VC\bin\cl.exe" -$vcvarsallbat = "$installationPath\VC\vcvarsall.bat" - -if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) +if ("$env:vs140comntools" -ne "") { - $results.Add("::PreferenceWeight1::Legacy::14.0::$installationPath::") > $null + $installationPath = Split-Path -Parent $(Split-Path -Parent "$env:vs140comntools") + $clExe = "$installationPath\VC\bin\cl.exe" + $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + + if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) + { + $results.Add("::PreferenceWeight1::Legacy::14.0::$installationPath::") > $null + } } $installationPath = "$programFiles\Microsoft Visual Studio 14.0" -- cgit v1.2.3 From 461e886d268eddee569ce81e76ca9c956a0f2ea6 Mon Sep 17 00:00:00 2001 From: Force Charlie Date: Thu, 17 May 2018 21:06:26 +0800 Subject: update nghttp2 to 1.32.0 --- ports/nghttp2/CONTROL | 2 +- ports/nghttp2/enable-static.patch | 18 +++++++++++------- ports/nghttp2/portfile.cmake | 4 ++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ports/nghttp2/CONTROL b/ports/nghttp2/CONTROL index f4ff49ae0..0214aa9a3 100644 --- a/ports/nghttp2/CONTROL +++ b/ports/nghttp2/CONTROL @@ -1,3 +1,3 @@ Source: nghttp2 -Version: 1.30.0-1 +Version: 1.32.0 Description: Implementation of the Hypertext Transfer Protocol version 2 in C diff --git a/ports/nghttp2/enable-static.patch b/ports/nghttp2/enable-static.patch index 3b58979cf..18e58daeb 100644 --- a/ports/nghttp2/enable-static.patch +++ b/ports/nghttp2/enable-static.patch @@ -1,23 +1,27 @@ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index 0846d06..290679f 100644 +index 17e422b..b2e7a6e 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt -@@ -38,7 +38,7 @@ if(WIN32) +@@ -37,8 +37,8 @@ if(WIN32) + set(NGHTTP2_RES ${CMAKE_CURRENT_BINARY_DIR}/version.rc) endif() - # Public shared library +-# Public shared library -add_library(nghttp2 SHARED ${NGHTTP2_SOURCES} ${NGHTTP2_RES}) ++# Public library +add_library(nghttp2 ${NGHTTP2_SOURCES} ${NGHTTP2_RES}) set_target_properties(nghttp2 PROPERTIES COMPILE_FLAGS "${WARNCFLAGS}" VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION} -@@ -48,6 +48,9 @@ target_include_directories(nghttp2 INTERFACE - "${CMAKE_CURRENT_BINARY_DIR}/includes" +@@ -49,6 +49,10 @@ target_include_directories(nghttp2 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/includes" ) + +if(NOT BUILD_SHARED_LIBS) + target_compile_definitions(nghttp2 PUBLIC "-DNGHTTP2_STATICLIB") +endif() - - if(HAVE_CUNIT) ++ + if(HAVE_CUNIT OR ENABLE_STATIC_LIB) # Static library (for unittests because of symbol visibility) + add_library(nghttp2_static STATIC ${NGHTTP2_SOURCES}) + diff --git a/ports/nghttp2/portfile.cmake b/ports/nghttp2/portfile.cmake index 3c082c191..c2caa520c 100644 --- a/ports/nghttp2/portfile.cmake +++ b/ports/nghttp2/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) set(LIB_NAME nghttp2) -set(LIB_VERSION 1.30.0) +set(LIB_VERSION 1.32.0) set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) @@ -9,7 +9,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/nghttp2/nghttp2/releases/download/v${LIB_VERSION}/${LIB_FILENAME}" FILENAME "${LIB_FILENAME}" - SHA512 26ce717a085e9fbdf8e644d4c8ab6961ca60029c4dfa112c9932523d1c4cc3f40fda4283afddf78a649e7f6fb7d3f3bfce3197186a4f70819b5996e8158089da + SHA512 f5bd36230cd42bd544d75b71af44f2fa2798363ddc1efb05499f6c8e86d54acfe6fde20f3d544ed560324a30141408dba6bc7e03e5f03ee7f7df532fb21aecbd ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 8ee61ea6d0b2d9ebdad10de347cff9a926d8eee5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 17 May 2018 14:08:52 -0700 Subject: [pmdk] Fix v140 requirement --- ports/pmdk/addPowerShellExecutionPolicy.patch | 6 +++--- ports/pmdk/portfile.cmake | 11 +++-------- ports/pmdk/v141.patch | 13 +++++++++++++ 3 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 ports/pmdk/v141.patch diff --git a/ports/pmdk/addPowerShellExecutionPolicy.patch b/ports/pmdk/addPowerShellExecutionPolicy.patch index bb03d23bb..692ff176a 100644 --- a/ports/pmdk/addPowerShellExecutionPolicy.patch +++ b/ports/pmdk/addPowerShellExecutionPolicy.patch @@ -1,7 +1,7 @@ -diff --git a/srcversion.vcxproj b/srcversion.vcxproj +diff --git a/src/windows/srcversion/srcversion.vcxproj b/src/windows/srcversion/srcversion.vcxproj index 8761197..795d1a7 100644 ---- a/srcversion.vcxproj -+++ b/srcversion.vcxproj +--- a/src/windows/srcversion/srcversion.vcxproj ++++ b/src/windows/srcversion/srcversion.vcxproj @@ -72,7 +72,7 @@ diff --git a/ports/pmdk/portfile.cmake b/ports/pmdk/portfile.cmake index 0e292aa2c..215de2963 100644 --- a/ports/pmdk/portfile.cmake +++ b/ports/pmdk/portfile.cmake @@ -21,22 +21,17 @@ vcpkg_from_github( REF 1.4 SHA512 95dbea9acfea4a6cb433a25f56f7484946a93fbce1c5e0e1d6ff36e0824e3e0e9f28f37024918998358f8ff12e69d0902fcf88357b9ad12695f32e06e86ffac8 HEAD_REF master + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/addPowerShellExecutionPolicy.patch" + "${CMAKE_CURRENT_LIST_DIR}/v141.patch" ) get_filename_component(PMDK_VERSION "${SOURCE_PATH}" NAME) string(REPLACE "pmdk-" "" PMDK_VERSION "${PMDK_VERSION}") -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH}/src/windows/srcversion - PATCHES "${CMAKE_CURRENT_LIST_DIR}/addPowerShellExecutionPolicy.patch" -) - # Build only the selected projects vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/src/PMDK.sln - PLATFORM x64 - PLATFORM_TOOLSET v140 - TARGET_PLATFORM_VERSION 10.0.16299.0 TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmemcto,Solution Items\\libpmempool,Solution Items\\libvmem,Solution Items\\Tools\\pmempool" OPTIONS /p:SRCVERSION=${PMDK_VERSION} ) diff --git a/ports/pmdk/v141.patch b/ports/pmdk/v141.patch new file mode 100644 index 000000000..f77abe93f --- /dev/null +++ b/ports/pmdk/v141.patch @@ -0,0 +1,13 @@ +diff --git a/src/common/util.h b/src/common/util.h +index 04b098f..33a64c2 100644 +--- a/src/common/util.h ++++ b/src/common/util.h +@@ -284,7 +284,7 @@ typedef enum { + #error MSVC ports of util_atomic_ only work on X86_64 + #endif + +-#if _MSC_VER > 1911 ++#if _MSC_VER >= 2000 + #error util_atomic_ utility functions not tested with this version of VC++ + #error These utility functions are not future proof, as they are not + #error based on publicly available documentation. -- cgit v1.2.3 From 5e754c1d44155821702233649dc28c44cb9342bd Mon Sep 17 00:00:00 2001 From: Dale Stammen Date: Thu, 17 May 2018 20:15:15 -0700 Subject: [grpc] Fix uwp (#3281) --- ports/grpc/CONTROL | 4 +- ports/grpc/fix-uwp.patch | 554 ++++++++++++++++++++++++++++++++++++++++++++++ ports/grpc/portfile.cmake | 16 +- 3 files changed, 566 insertions(+), 8 deletions(-) create mode 100644 ports/grpc/fix-uwp.patch diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 6f8f18467..71c9f9d29 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.10.1-1 -Build-Depends: zlib, openssl, protobuf, c-ares +Version: 1.10.1-2 +Build-Depends: zlib, openssl, protobuf, c-ares (!uwp) Description: An RPC library and framework diff --git a/ports/grpc/fix-uwp.patch b/ports/grpc/fix-uwp.patch new file mode 100644 index 000000000..2ab2ae652 --- /dev/null +++ b/ports/grpc/fix-uwp.patch @@ -0,0 +1,554 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0dc0bd3..2407e4a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -84,6 +84,9 @@ if(UNIX) + endif() + if(WIN32) + set(_gRPC_PLATFORM_WINDOWS ON) ++ if(${CMAKE_SYSTEM_NAME} MATCHES "WindowsStore") ++ set(_gRPC_PLATFORM_UWP ON) ++ endif() + endif() + + set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) +@@ -144,6 +147,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR}) + # ``.proto`` files + # + function(protobuf_generate_grpc_cpp) ++ if(_gRPC_PLATFORM_UWP) ++ return() ++ endif() ++ + if(NOT ARGN) + message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files") + return() +@@ -178,27 +185,29 @@ function(protobuf_generate_grpc_cpp) + endforeach() + endfunction() + +-add_custom_target(plugins +- DEPENDS +- grpc_cpp_plugin +- grpc_csharp_plugin +- grpc_node_plugin +- grpc_objective_c_plugin +- grpc_php_plugin +- grpc_python_plugin +- grpc_ruby_plugin +-) ++if(NOT _gRPC_PLATFORM_UWP) ++ add_custom_target(plugins ++ DEPENDS ++ grpc_cpp_plugin ++ grpc_csharp_plugin ++ grpc_node_plugin ++ grpc_objective_c_plugin ++ grpc_php_plugin ++ grpc_python_plugin ++ grpc_ruby_plugin ++ ) + +-add_custom_target(tools_c +- DEPENDS +- check_epollexclusive +- grpc_create_jwt +- grpc_print_google_default_creds_token +- grpc_verify_jwt +- gen_hpack_tables +- gen_legal_metadata_characters +- gen_percent_encoding_tables +-) ++ add_custom_target(tools_c ++ DEPENDS ++ check_epollexclusive ++ grpc_create_jwt ++ grpc_print_google_default_creds_token ++ grpc_verify_jwt ++ gen_hpack_tables ++ gen_legal_metadata_characters ++ gen_percent_encoding_tables ++ ) ++endif() + + add_custom_target(tools_cxx + DEPENDS +@@ -3223,7 +3232,7 @@ if (gRPC_INSTALL) + ) + endif() + +- ++if(NOT _gRPC_PLATFORM_UWP) + add_library(grpc++_error_details + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/status/status.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/status/status.grpc.pb.cc +@@ -3285,6 +3294,7 @@ if (gRPC_INSTALL) + ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} + ) + endif() ++endif() + + if (gRPC_BUILD_TESTS) + +@@ -3347,67 +3357,69 @@ endforeach() + + endif (gRPC_BUILD_TESTS) + +-add_library(grpc++_reflection +- src/cpp/ext/proto_server_reflection.cc +- src/cpp/ext/proto_server_reflection_plugin.cc +- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.cc +- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc +- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.h +- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h +-) +- +-if(WIN32 AND MSVC) +- set_target_properties(grpc++_reflection PROPERTIES COMPILE_PDB_NAME "grpc++_reflection" +- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" ++if(NOT _gRPC_PLATFORM_UWP) ++ add_library(grpc++_reflection ++ src/cpp/ext/proto_server_reflection.cc ++ src/cpp/ext/proto_server_reflection_plugin.cc ++ ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.cc ++ ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc ++ ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.h ++ ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h + ) +- if (gRPC_INSTALL) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_reflection.pdb +- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL ++ ++ if(WIN32 AND MSVC) ++ set_target_properties(grpc++_reflection PROPERTIES COMPILE_PDB_NAME "grpc++_reflection" ++ COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + ) ++ if (gRPC_INSTALL) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_reflection.pdb ++ DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL ++ ) ++ endif() + endif() +-endif() + +-protobuf_generate_grpc_cpp( +- src/proto/grpc/reflection/v1alpha/reflection.proto +-) ++ protobuf_generate_grpc_cpp( ++ src/proto/grpc/reflection/v1alpha/reflection.proto ++ ) + +-target_include_directories(grpc++_reflection +- PUBLIC $ $ +- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} +- PRIVATE ${_gRPC_SSL_INCLUDE_DIR} +- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} +- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} +- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} +- PRIVATE ${_gRPC_CARES_INCLUDE_DIR} +- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} +- PRIVATE ${_gRPC_PROTO_GENS_DIR} +-) ++ target_include_directories(grpc++_reflection ++ PUBLIC $ $ ++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ++ PRIVATE ${_gRPC_SSL_INCLUDE_DIR} ++ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} ++ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ++ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} ++ PRIVATE ${_gRPC_CARES_INCLUDE_DIR} ++ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} ++ PRIVATE ${_gRPC_PROTO_GENS_DIR} ++ ) + +-target_link_libraries(grpc++_reflection +- ${_gRPC_PROTOBUF_LIBRARIES} +- ${_gRPC_ALLTARGETS_LIBRARIES} +- grpc++ +- grpc +-) ++ target_link_libraries(grpc++_reflection ++ ${_gRPC_PROTOBUF_LIBRARIES} ++ ${_gRPC_ALLTARGETS_LIBRARIES} ++ grpc++ ++ grpc ++ ) + +-foreach(_hdr +- include/grpc++/ext/proto_server_reflection_plugin.h +- include/grpcpp/ext/proto_server_reflection_plugin.h +-) +- string(REPLACE "include/" "" _path ${_hdr}) +- get_filename_component(_path ${_path} PATH) +- install(FILES ${_hdr} +- DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" ++ foreach(_hdr ++ include/grpc++/ext/proto_server_reflection_plugin.h ++ include/grpcpp/ext/proto_server_reflection_plugin.h + ) +-endforeach() ++ string(REPLACE "include/" "" _path ${_hdr}) ++ get_filename_component(_path ${_path} PATH) ++ install(FILES ${_hdr} ++ DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" ++ ) ++ endforeach() + + +-if (gRPC_INSTALL) +- install(TARGETS grpc++_reflection EXPORT gRPCTargets +- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} +- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} +- ) ++ if (gRPC_INSTALL) ++ install(TARGETS grpc++_reflection EXPORT gRPCTargets ++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ) ++ endif() + endif() + + if (gRPC_BUILD_TESTS) +@@ -4197,26 +4209,28 @@ endforeach() + + endif (gRPC_BUILD_TESTS) + +-add_library(grpc_plugin_support +- src/compiler/cpp_generator.cc +- src/compiler/csharp_generator.cc +- src/compiler/node_generator.cc +- src/compiler/objective_c_generator.cc +- src/compiler/php_generator.cc +- src/compiler/python_generator.cc +- src/compiler/ruby_generator.cc +-) +- +-if(WIN32 AND MSVC) +- set_target_properties(grpc_plugin_support PROPERTIES COMPILE_PDB_NAME "grpc_plugin_support" +- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" ++if(NOT _gRPC_PLATFORM_UWP) ++ add_library(grpc_plugin_support ++ src/compiler/cpp_generator.cc ++ src/compiler/csharp_generator.cc ++ src/compiler/node_generator.cc ++ src/compiler/objective_c_generator.cc ++ src/compiler/php_generator.cc ++ src/compiler/python_generator.cc ++ src/compiler/ruby_generator.cc + ) +- if (gRPC_INSTALL) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_plugin_support.pdb +- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL ++ ++ if(WIN32 AND MSVC) ++ set_target_properties(grpc_plugin_support PROPERTIES COMPILE_PDB_NAME "grpc_plugin_support" ++ COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + ) ++ if (gRPC_INSTALL) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_plugin_support.pdb ++ DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL ++ ) ++ endif() + endif() +-endif() ++ + + + target_include_directories(grpc_plugin_support +@@ -4236,6 +4250,8 @@ target_link_libraries(grpc_plugin_support + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + ) ++endif() ++ + + foreach(_hdr + include/grpc++/impl/codegen/config_protobuf.h +@@ -4248,13 +4264,14 @@ foreach(_hdr + ) + endforeach() + +- +-if (gRPC_INSTALL) +- install(TARGETS grpc_plugin_support EXPORT gRPCTargets +- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} +- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} +- ) ++if(NOT _gRPC_PLATFORM_UWP) ++ if (gRPC_INSTALL) ++ install(TARGETS grpc_plugin_support EXPORT gRPCTargets ++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ) ++ endif() + endif() + + if (gRPC_BUILD_TESTS) +@@ -10250,11 +10267,11 @@ target_link_libraries(grpc_cli + + endif (gRPC_BUILD_TESTS) + +-add_executable(grpc_cpp_plugin +- src/compiler/cpp_plugin.cc ++if(NOT _gRPC_PLATFORM_UWP) ++ add_executable(grpc_cpp_plugin ++ src/compiler/cpp_plugin.cc + ) + +- + target_include_directories(grpc_cpp_plugin + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include +@@ -10351,142 +10368,141 @@ if (gRPC_INSTALL) + ) + endif() + ++ add_executable(grpc_objective_c_plugin ++ src/compiler/objective_c_plugin.cc ++ ) + +-add_executable(grpc_objective_c_plugin +- src/compiler/objective_c_plugin.cc +-) +- +- +-target_include_directories(grpc_objective_c_plugin +- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} +- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include +- PRIVATE ${_gRPC_SSL_INCLUDE_DIR} +- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} +- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} +- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} +- PRIVATE ${_gRPC_CARES_INCLUDE_DIR} +- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} +- PRIVATE ${_gRPC_PROTO_GENS_DIR} +-) +- +-target_link_libraries(grpc_objective_c_plugin +- ${_gRPC_PROTOBUF_PROTOC_LIBRARIES} +- ${_gRPC_PROTOBUF_LIBRARIES} +- ${_gRPC_ALLTARGETS_LIBRARIES} +- grpc_plugin_support +-) + ++ target_include_directories(grpc_objective_c_plugin ++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include ++ PRIVATE ${_gRPC_SSL_INCLUDE_DIR} ++ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} ++ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ++ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} ++ PRIVATE ${_gRPC_CARES_INCLUDE_DIR} ++ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} ++ PRIVATE ${_gRPC_PROTO_GENS_DIR} ++ ) + +-if (gRPC_INSTALL) +- install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets +- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} +- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ target_link_libraries(grpc_objective_c_plugin ++ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES} ++ ${_gRPC_PROTOBUF_LIBRARIES} ++ ${_gRPC_ALLTARGETS_LIBRARIES} ++ grpc_plugin_support + ) +-endif() + + +-add_executable(grpc_php_plugin +- src/compiler/php_plugin.cc +-) ++ if (gRPC_INSTALL) ++ install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets ++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ) ++ endif() + + +-target_include_directories(grpc_php_plugin +- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} +- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include +- PRIVATE ${_gRPC_SSL_INCLUDE_DIR} +- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} +- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} +- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} +- PRIVATE ${_gRPC_CARES_INCLUDE_DIR} +- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} +- PRIVATE ${_gRPC_PROTO_GENS_DIR} +-) ++ add_executable(grpc_php_plugin ++ src/compiler/php_plugin.cc ++ ) + +-target_link_libraries(grpc_php_plugin +- ${_gRPC_PROTOBUF_PROTOC_LIBRARIES} +- ${_gRPC_PROTOBUF_LIBRARIES} +- ${_gRPC_ALLTARGETS_LIBRARIES} +- grpc_plugin_support +-) + ++ target_include_directories(grpc_php_plugin ++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include ++ PRIVATE ${_gRPC_SSL_INCLUDE_DIR} ++ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} ++ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ++ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} ++ PRIVATE ${_gRPC_CARES_INCLUDE_DIR} ++ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} ++ PRIVATE ${_gRPC_PROTO_GENS_DIR} ++ ) + +-if (gRPC_INSTALL) +- install(TARGETS grpc_php_plugin EXPORT gRPCTargets +- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} +- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ target_link_libraries(grpc_php_plugin ++ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES} ++ ${_gRPC_PROTOBUF_LIBRARIES} ++ ${_gRPC_ALLTARGETS_LIBRARIES} ++ grpc_plugin_support + ) +-endif() + + +-add_executable(grpc_python_plugin +- src/compiler/python_plugin.cc +-) ++ if (gRPC_INSTALL) ++ install(TARGETS grpc_php_plugin EXPORT gRPCTargets ++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ) ++ endif() + + +-target_include_directories(grpc_python_plugin +- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} +- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include +- PRIVATE ${_gRPC_SSL_INCLUDE_DIR} +- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} +- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} +- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} +- PRIVATE ${_gRPC_CARES_INCLUDE_DIR} +- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} +- PRIVATE ${_gRPC_PROTO_GENS_DIR} +-) ++ add_executable(grpc_python_plugin ++ src/compiler/python_plugin.cc ++ ) + +-target_link_libraries(grpc_python_plugin +- ${_gRPC_PROTOBUF_PROTOC_LIBRARIES} +- ${_gRPC_PROTOBUF_LIBRARIES} +- ${_gRPC_ALLTARGETS_LIBRARIES} +- grpc_plugin_support +-) + ++ target_include_directories(grpc_python_plugin ++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include ++ PRIVATE ${_gRPC_SSL_INCLUDE_DIR} ++ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} ++ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ++ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} ++ PRIVATE ${_gRPC_CARES_INCLUDE_DIR} ++ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} ++ PRIVATE ${_gRPC_PROTO_GENS_DIR} ++ ) + +-if (gRPC_INSTALL) +- install(TARGETS grpc_python_plugin EXPORT gRPCTargets +- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} +- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ target_link_libraries(grpc_python_plugin ++ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES} ++ ${_gRPC_PROTOBUF_LIBRARIES} ++ ${_gRPC_ALLTARGETS_LIBRARIES} ++ grpc_plugin_support + ) +-endif() + + +-add_executable(grpc_ruby_plugin +- src/compiler/ruby_plugin.cc +-) ++ if (gRPC_INSTALL) ++ install(TARGETS grpc_python_plugin EXPORT gRPCTargets ++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ) ++ endif() + + +-target_include_directories(grpc_ruby_plugin +- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} +- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include +- PRIVATE ${_gRPC_SSL_INCLUDE_DIR} +- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} +- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} +- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} +- PRIVATE ${_gRPC_CARES_INCLUDE_DIR} +- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} +- PRIVATE ${_gRPC_PROTO_GENS_DIR} +-) ++ add_executable(grpc_ruby_plugin ++ src/compiler/ruby_plugin.cc ++ ) + +-target_link_libraries(grpc_ruby_plugin +- ${_gRPC_PROTOBUF_PROTOC_LIBRARIES} +- ${_gRPC_PROTOBUF_LIBRARIES} +- ${_gRPC_ALLTARGETS_LIBRARIES} +- grpc_plugin_support +-) + ++ target_include_directories(grpc_ruby_plugin ++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include ++ PRIVATE ${_gRPC_SSL_INCLUDE_DIR} ++ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR} ++ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ++ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR} ++ PRIVATE ${_gRPC_CARES_INCLUDE_DIR} ++ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} ++ PRIVATE ${_gRPC_PROTO_GENS_DIR} ++ ) + +-if (gRPC_INSTALL) +- install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets +- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} +- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ target_link_libraries(grpc_ruby_plugin ++ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES} ++ ${_gRPC_PROTOBUF_LIBRARIES} ++ ${_gRPC_ALLTARGETS_LIBRARIES} ++ grpc_plugin_support + ) +-endif() + ++ ++ if (gRPC_INSTALL) ++ install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets ++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ) ++ endif() ++endif() + if (gRPC_BUILD_TESTS) + + add_executable(grpc_tool_test diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 54f294896..259fd222e 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -15,14 +15,10 @@ vcpkg_from_github( REF v1.10.1 SHA512 2221d902c60eada6dd1547a63d26bd3b30cb6710247b5e48523bacde498a3691cc177f1dbe9db8a007b8ae341a5b0c8ec999539e26a9bcff480a8d0b02140997 HEAD_REF master -) - -# Issue: https://github.com/grpc/grpc/issues/10759 -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext.patch ${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext-2.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-uwp.patch ) if(VCPKG_CRT_LINKAGE STREQUAL static) @@ -31,6 +27,14 @@ else() set(gRPC_MSVC_STATIC_RUNTIME OFF) endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(cares_CARES_PROVIDER OFF) +else() + set(cares_CARES_PROVIDER "package") +endif() + + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -41,7 +45,7 @@ vcpkg_configure_cmake( -DgRPC_ZLIB_PROVIDER=package -DgRPC_SSL_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package - -DgRPC_CARES_PROVIDER=package + -DgRPC_CARES_PROVIDER=${cares_CARES_PROVIDER} -DgRPC_GFLAGS_PROVIDER=none -DgRPC_BENCHMARK_PROVIDER=none -DgRPC_INSTALL_CSHARP_EXT=OFF -- cgit v1.2.3 From 6ad96b7e7a69f12d12b299218cbbaf4fbad4bb9b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 17 May 2018 17:35:11 -0700 Subject: 2018.05.17 updates --- ports/args/CONTROL | 2 +- ports/args/portfile.cmake | 4 ++-- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- ports/chakracore/CONTROL | 2 +- ports/chakracore/portfile.cmake | 4 ++-- ports/cimg/CONTROL | 2 +- ports/cimg/portfile.cmake | 4 ++-- ports/directxmesh/CONTROL | 2 +- ports/directxmesh/portfile.cmake | 4 ++-- ports/directxtex/CONTROL | 2 +- ports/directxtex/portfile.cmake | 4 ++-- ports/directxtk/CONTROL | 2 +- ports/directxtk/portfile.cmake | 4 ++-- ports/doctest/CONTROL | 2 +- ports/doctest/portfile.cmake | 4 ++-- ports/entt/CONTROL | 2 +- ports/entt/portfile.cmake | 4 ++-- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/fdk-aac/CONTROL | 2 +- ports/fdk-aac/portfile.cmake | 4 ++-- ports/forest/CONTROL | 2 +- ports/forest/portfile.cmake | 4 ++-- ports/jsonnet/CONTROL | 2 +- ports/jsonnet/portfile.cmake | 4 ++-- ports/libuv/CONTROL | 2 +- ports/libuv/portfile.cmake | 4 ++-- ports/libwebsockets/CONTROL | 2 +- ports/libwebsockets/portfile.cmake | 4 ++-- ports/lodepng/CONTROL | 2 +- ports/lodepng/portfile.cmake | 4 ++-- ports/ms-gsl/CONTROL | 2 +- ports/ms-gsl/portfile.cmake | 4 ++-- ports/mujs/CONTROL | 2 +- ports/mujs/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/parson/CONTROL | 2 +- ports/parson/portfile.cmake | 4 ++-- ports/re2/CONTROL | 2 +- ports/re2/portfile.cmake | 4 ++-- ports/rocksdb/CONTROL | 2 +- ports/rocksdb/portfile.cmake | 4 ++-- ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/unicorn-lib/CONTROL | 2 +- ports/unicorn-lib/portfile.cmake | 4 ++-- ports/unicorn/CONTROL | 2 +- ports/unicorn/portfile.cmake | 4 ++-- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 4 ++-- 54 files changed, 81 insertions(+), 81 deletions(-) diff --git a/ports/args/CONTROL b/ports/args/CONTROL index ee2a6a09a..83205335a 100644 --- a/ports/args/CONTROL +++ b/ports/args/CONTROL @@ -1,3 +1,3 @@ Source: args -Version: 2018-02-23 +Version: 2018-05-17 Description: A simple header-only C++ argument parser library. diff --git a/ports/args/portfile.cmake b/ports/args/portfile.cmake index 29d76b81f..215f1ce92 100644 --- a/ports/args/portfile.cmake +++ b/ports/args/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Taywee/args - REF 7bf17000aa0969b8ca3178c72ec834b105944a41 - SHA512 38f038f2ea3cdbf62678112a28f6b9a2b46b7b291ec9a7c78393c28b1169dc393a086393f24534804188d434583896d9eaedca964c00a2db032fb337ebc9c214 + REF bd0429e91f5bb140271870d5421e412bf78b9f31 + SHA512 585314e572b97d9b1689f71617f33562da46652141f094a3845eeace7acedc8560e010e5b7fb7afa4ff2dc37a62724445f5c8650c0c6270d42c4b5fd271a5e76 HEAD_REF master ) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index 726233f74..d91cf33c7 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,5 +1,5 @@ Source: aws-sdk-cpp -Version: 1.4.40 +Version: 1.4.52 Description: AWS SDK for C++ Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows) Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 98db4fc15..1d566339e 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.4.40 - SHA512 1c97820fa6239a8907c7c053bdfb3f3091121c6928c2c25a86a0263c26231bf08c1928d16e86c863d9cedfd6faf6f6f65234a22188dd14e61a2d452445c33b59 + REF 1.4.52 + SHA512 ef10a2d9d491ae28179ec7622b34470153cf3a6fdf50ca8f942c098d74a12a9e555c314537c91e06285990fe942bee9e4ff21396752153d482e9db1776981d6b HEAD_REF master ) diff --git a/ports/chakracore/CONTROL b/ports/chakracore/CONTROL index 6c7db9e54..2b8dc8a5a 100644 --- a/ports/chakracore/CONTROL +++ b/ports/chakracore/CONTROL @@ -1,3 +1,3 @@ Source: chakracore -Version: 1.8.3 +Version: 1.8.4 Description: Core part of the Chakra Javascript engine diff --git a/ports/chakracore/portfile.cmake b/ports/chakracore/portfile.cmake index 0f3874119..5492d5039 100644 --- a/ports/chakracore/portfile.cmake +++ b/ports/chakracore/portfile.cmake @@ -15,8 +15,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/ChakraCore - REF v1.8.3 - SHA512 4a5d6372cab51bb70911519fb9639d0cb6c456a966e2c90992f924ba36dcf741e32dbf18aea4419dc855f286da7e3edbfcc796bc90347858192c976298315785 + REF v1.8.4 + SHA512 54f0ec00656d26c3cb3c034c0d1f0c927b67ce083cca6d2ced1f936e31a0987d0e4000dfb2419ffa6a21a15fa87b03a9214e92e8694158fc1e3715a095f08e19 HEAD_REF master ) diff --git a/ports/cimg/CONTROL b/ports/cimg/CONTROL index 694db4b5d..1aee8a425 100644 --- a/ports/cimg/CONTROL +++ b/ports/cimg/CONTROL @@ -1,3 +1,3 @@ Source: cimg -Version: 2.2.2 +Version: 2.2.3 Description: The CImg Library is a small, open-source, and modern C++ toolkit for image processing diff --git a/ports/cimg/portfile.cmake b/ports/cimg/portfile.cmake index b7607bff2..1023eec26 100644 --- a/ports/cimg/portfile.cmake +++ b/ports/cimg/portfile.cmake @@ -2,9 +2,9 @@ include(vcpkg_common_functions) vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH REPO "dtschump/CImg" - REF v.2.2.2 + REF v.2.2.3 HEAD_REF master - SHA512 b3090e594accc31222e24e787381af315b5168dad4ea9669cc543ad6807c175dd60b9eddceda1c74a7bb716912650219763077b3eaee6fae79cfec1099c65836) + SHA512 0c92b4162e9259e447f9d1e777cc18b9df57cde77159681cdc8e15843f3c149fbf9ac7a420d63642d2a3aefb36bdb1740ef53d587a0983c32748f317605c16e0) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/directxmesh/CONTROL b/ports/directxmesh/CONTROL index 8b8206540..443917882 100644 --- a/ports/directxmesh/CONTROL +++ b/ports/directxmesh/CONTROL @@ -1,3 +1,3 @@ Source: directxmesh -Version: apr2018 +Version: may2018 Description: DirectXMesh geometry processing library \ No newline at end of file diff --git a/ports/directxmesh/portfile.cmake b/ports/directxmesh/portfile.cmake index 090e0df36..89a83c272 100644 --- a/ports/directxmesh/portfile.cmake +++ b/ports/directxmesh/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXMesh - REF apr2018 - SHA512 960e28665e4e79358e2985923e9fc9dbebc2ae5f8acb880b1f3990f2dc86683c266d41f14b0526fc391629c608b879915f88ce091eaee619debb48fc39fa9e3d + REF may2018 + SHA512 33fe4a680f274b1e7a643cc1a49762d7c9528e1fefab8ec41010c8b3b094cad56731c23e4d098b0684689050a62a89186557cf448075e73b9f592bad22cb0ca0 HEAD_REF master ) diff --git a/ports/directxtex/CONTROL b/ports/directxtex/CONTROL index 0d428284e..42efa2233 100644 --- a/ports/directxtex/CONTROL +++ b/ports/directxtex/CONTROL @@ -1,3 +1,3 @@ Source: directxtex -Version: apr2018 +Version: may2018 Description: DirectXTex texture processing library \ No newline at end of file diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake index 41423a6cc..d80a831c1 100644 --- a/ports/directxtex/portfile.cmake +++ b/ports/directxtex/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTex - REF apr2018 - SHA512 b4e55358628c13f2a8f1f3cb0258a0d126057bc1dfa45e645e0ec21203cdda091c8244deeb775ec950ed534bddd82b71aa1d00f7356bf7f7c49a072bd206b373 + REF may2018 + SHA512 208186f9efe045b6219ac19748896e3630494f75bec33030248b0d7b37d6d6c2433d3fce7141157f85ce068a27a170d0af153dfc4465a9d280aef181ebe3a51f HEAD_REF master ) diff --git a/ports/directxtk/CONTROL b/ports/directxtk/CONTROL index 7c69aeba2..e52f8dc14 100644 --- a/ports/directxtk/CONTROL +++ b/ports/directxtk/CONTROL @@ -1,3 +1,3 @@ Source: directxtk -Version: apr2018 +Version: may2018 Description: A collection of helper classes for writing DirectX 11.x code in C++. diff --git a/ports/directxtk/portfile.cmake b/ports/directxtk/portfile.cmake index da7d9b40c..cd290e142 100644 --- a/ports/directxtk/portfile.cmake +++ b/ports/directxtk/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTK - REF apr2018 - SHA512 d7e58883a7c18e239964ca0da62441446af233d99e221a6d23f1a3a89991b0bc1e4ca31205895230488abd4e65103f59ec950af42ba379e409783927ee97cc4a + REF may2018 + SHA512 0d492fcd72882aa91270b8fbaf9caa897bf4499931921fdded052129ecbb5476a373fa32ac0870897bc5ead9dae749f9b52e86fc617654f64b263041001cdfb5 HEAD_REF master ) diff --git a/ports/doctest/CONTROL b/ports/doctest/CONTROL index b83f7b1af..3de9dedb3 100644 --- a/ports/doctest/CONTROL +++ b/ports/doctest/CONTROL @@ -1,3 +1,3 @@ Source: doctest -Version: 1.2.8 +Version: 1.2.9 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 22e867a6d..433a52f53 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 1.2.8 - SHA512 4558909c6a846fa8679539a9d44e442d9ce6aae37c807ef34d95648abfabe0a16e4593aef83293e3d03bcf80e0269742ff0b95d54eb434c7a18be136608cd24d + REF 1.2.9 + SHA512 9500570fb0ef7b06799fbe92b8f96eacf16eba630abe4f67a235901995192e31fafb812704f327f0a2582c8fe61c3bb458d2eaf3c4287f24c1ffbc04c46a2471 HEAD_REF master ) diff --git a/ports/entt/CONTROL b/ports/entt/CONTROL index 4e4c44334..6887500b9 100644 --- a/ports/entt/CONTROL +++ b/ports/entt/CONTROL @@ -1,3 +1,3 @@ Source: entt -Version: 2.4.2-1 +Version: 2.5.0 Description: Gaming meets modern C++ - a fast and reliable entity-component system and much more. diff --git a/ports/entt/portfile.cmake b/ports/entt/portfile.cmake index e67824162..4df78448c 100644 --- a/ports/entt/portfile.cmake +++ b/ports/entt/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO skypjack/entt - REF v2.4.2 - SHA512 fd532f2c180c328d396f557386b70e961c122af11e379ce57db3709d20345280ada200dadde136ae3557ad25daa944d8a86f7868cd0bedea78427d42c27d6e6d + REF v2.5.0 + SHA512 a56d17c4ac832b50349293eb40c32efb079d90c9a7010589979eac5f13b97e82c032f94b87d0d7885099ee6f1857e68e064e3248c7f4d52ccca02620fd80ea25 ) file(INSTALL diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 38b8d8d85..085efe481 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-04-25 +Version: 2018-05-17 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 2e09b7076..c4c3173d2 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF 4bcec183d52995169653f619e50cbeadab420807 - SHA512 812cace9303f6d0bb2b1e5833e1b5728316126b0a5cc14662b79a0eb14dd752862e79d4014748320696c65c1466b113c57f106b9fd25f2d7dd4e5a9d4a275d16 + REF 4b24e011dc485102a68a8809621e718fc77830a2 + SHA512 acd192c585a074fae3308cce9355e735165142dc19c4a1ab6040fe4e686aa199f30d664eb2b450fe297c9ce0b027952bf784e8aea18c893d80b28e331bf48839 HEAD_REF master ) diff --git a/ports/fdk-aac/CONTROL b/ports/fdk-aac/CONTROL index edef0f16d..970062761 100644 --- a/ports/fdk-aac/CONTROL +++ b/ports/fdk-aac/CONTROL @@ -1,3 +1,3 @@ Source: fdk-aac -Version: 2018-03-07 +Version: 2018-05-17 Description: A standalone library of the Fraunhofer FDK AAC code diff --git a/ports/fdk-aac/portfile.cmake b/ports/fdk-aac/portfile.cmake index 134885b25..16c1b700f 100644 --- a/ports/fdk-aac/portfile.cmake +++ b/ports/fdk-aac/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mstorsjo/fdk-aac - REF a30bfced6b6d6d976c728552d247cb30dd86e238 - SHA512 07371b78998b2330022ca5f4b6c605a30d279faef28b3fb53d03bbf7163c87bed9432fcd3efbee70906453e7599bc7191e6aeb0bc88b35dcfb79c2a935eb327d + REF a50eecf65b5ce5d4f03768c5c2cb4b492d2badad + SHA512 1cb42e99d9d3112a42497f85c8ddbfb919a1c33bc8094408a828468762fe6d07c97940effa69d043c2d9923f3fa1805fd8c723154631609a6b0883eb4d3c6b27 HEAD_REF master ) diff --git a/ports/forest/CONTROL b/ports/forest/CONTROL index 76dbbf47e..ba9d0f53b 100644 --- a/ports/forest/CONTROL +++ b/ports/forest/CONTROL @@ -1,3 +1,3 @@ Source: forest -Version: 7.0.6 +Version: 7.0.7 Description: Template library of tree data structures diff --git a/ports/forest/portfile.cmake b/ports/forest/portfile.cmake index 48ab6c9dd..c9975bbb0 100644 --- a/ports/forest/portfile.cmake +++ b/ports/forest/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xorz57/forest - REF 7.0.6 - SHA512 a1e5d27f2b8b9e6758a67a9124fc25517074c633644651b26f6683bab09189569e75ccf4ae7d9cfeddae234435b073fc00e0f5385c4e9370062c3e8b222c1c59 + REF 7.0.7 + SHA512 23488008d92736b4d1460cca95216918085071bf107356989158752faac14248a81a35e0acfd7e119895006304c0e3dda86174e551e87f588c62c1f264168d63 HEAD_REF master ) diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index 15286cedb..ff23cda3e 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-05-01 +Version: 2018-05-17 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 17afd237c..51a7118c2 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF 2d25ad112daad159b63ef7c5e2a9ec6ed90e326b - SHA512 9f4e90c69f70ea2c35768d5aba90752442c898ea21f026ec24abafc2626b1e17819bbcb17f79531774b26912e92d7e67cdd5108501c9ab31635c997eb7f2915a + REF d0ef48c976d9b72992001507ed3055baf56c2ba9 + SHA512 ffa1a0da01dd770e3de37ffc78cc623efecd4e667de184116b8d9fdcc28ebb1fd2b09425d7f20c3f4dc2f3e4c8a637a1057eb7de0c41d042dce9941fcd593b0a HEAD_REF master ) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index bcb1ccb3e..155a88cfe 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.20.2 +Version: 1.20.3 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index 2e3d12fa5..cdc1034ff 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.20.2 - SHA512 449dfd15e2953d2a8b9c6160ab39728a87799b3e8595f9e3013467daf69d3561e2c5602172a0596e7c884237cf0d52d3b0f00edde03a7b037dc90b61bce2057c + REF v1.20.3 + SHA512 60ebc0059ec9fdd022aa9d60b2a0340f29e037bf79fa08707f6f2ecca9ec263c7a6466bdc1f94e0875a6a627ee749efa86117dedb22119676a7bafed8b5d77a0 HEAD_REF v1.x) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL index e6b595e0d..bf33021a2 100644 --- a/ports/libwebsockets/CONTROL +++ b/ports/libwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: libwebsockets -Version: 2.4.2 +Version: 3.0.0 Build-Depends: zlib, openssl 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 79a96007e..79903c3a4 100644 --- a/ports/libwebsockets/portfile.cmake +++ b/ports/libwebsockets/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO warmcat/libwebsockets - REF v2.4.2 - SHA512 7bee49f6763ff3ab7861fcda25af8d80f6757c56e197ea42be53e0b2480969eee73de3aee5198f5ff06fd1cb8ab2be4c6495243e83cd0acc235b0da83b2353d1 + REF v3.0.0 + SHA512 626edd00cc4f7559c67fc1663cbc4679a3c4e7a1b60944a7cf6968c6676073bbc15f9b90f4f2ea629394ebbcf84856663ae032a3557bae383bd0db54838d30e8 HEAD_REF master ) diff --git a/ports/lodepng/CONTROL b/ports/lodepng/CONTROL index 12a944ab5..0f31c87fb 100644 --- a/ports/lodepng/CONTROL +++ b/ports/lodepng/CONTROL @@ -1,3 +1,3 @@ Source: lodepng -Version: 2018-02-25 +Version: 2018-05-17 Description: PNG encoder and decoder in C and C++ diff --git a/ports/lodepng/portfile.cmake b/ports/lodepng/portfile.cmake index 4fa423a0a..9b390b4ff 100644 --- a/ports/lodepng/portfile.cmake +++ b/ports/lodepng/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lvandeve/lodepng - REF 116f5b2ed7c4a9c6779ae291b79770727cbb11ad - SHA512 746528e4cb4c8678a91f607ff7c2d61f651a19ef1efcd4694deb0d2191970674de7e13331004f7702b31a335474cf71364c8da0fdc7c75852db3cb896f00a375 + REF d03d7df9888aafb9c7f615895c34b05acf033908 + SHA512 a7139f839ad161075909611527645c75758959626fbb5d892dc1bfba8df2d4c3cfa86328de5534386e6053843727d2bc453fd439a2e329fd3be5d36d77903a0f HEAD_REF master ) diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL index a3f8d76dc..68398fb19 100644 --- a/ports/ms-gsl/CONTROL +++ b/ports/ms-gsl/CONTROL @@ -1,3 +1,3 @@ Source: ms-gsl -Version: 2018-05-01 +Version: 2018-05-17 Description: Microsoft implementation of the Guidelines Support Library \ No newline at end of file diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index 5b2726758..0a3518a8a 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/GSL - REF d6b26b367b294aca43ff2d28c50293886ad1d5d4 - SHA512 b0190ce7680004c40bf59dab0d4e442f12a69989d707bd94346590c1282277273c6b71db0cf91b4aa1ffa9871bcdd4bed17b5760d9a81a5317fb84c62ea8dc43 + REF d6a2242d97827449f3f1c1c2e54214ceb9e80d62 + SHA512 d98d294e6560bc47f6b30fddf046be2a97bf9091c6e096c2c699db582d0322260c825c2357df2d2e55d017973c17798dd1d994931403534570789883f1d00321 HEAD_REF master ) diff --git a/ports/mujs/CONTROL b/ports/mujs/CONTROL index f653a2a19..bb9ab194f 100644 --- a/ports/mujs/CONTROL +++ b/ports/mujs/CONTROL @@ -1,3 +1,3 @@ Source: mujs -Version: 2018-05-01 +Version: 2018-05-17 Description: An embeddable Javascript interpreter in C diff --git a/ports/mujs/portfile.cmake b/ports/mujs/portfile.cmake index c1254b1af..5724f4593 100644 --- a/ports/mujs/portfile.cmake +++ b/ports/mujs/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ccxvii/mujs - REF 780b14b5b73724c36800bf72db1f8f1a2b77f76d - SHA512 e320d36794811136a3a9ea2c750736694368007873332682491baa38472100db918f5f237ce6c351498c0d83ffce7185c6b86a87223a28eb511b12ea086aa4aa + REF cbdf814ee25841ce2130e6d58b0ac607b508f045 + SHA512 7477d539c409985ca5849b7b7ef5f0dfd974f850b763bdbb1024faeda82a01eefdeb94ca6f7505f234e1670017d9e68b8d5de68f34124a83528b99301c02f03f HEAD_REF master ) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index 8cb502042..ffc589cb1 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-04-25 +Version: 2018-05-17 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index 5d60955d7..9ad603d7b 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF 823f79f856d711eb61af17090af0a623b631e409 - SHA512 6146d2fb26e7d74f9f554619f6a378ecf19ff6a83aa71dba8ee55d194f337c67acae0de7139a4a09736b4685980c9cd85e3c1e99ebf02ee9a306b67b17f185d8 + REF b1209dbb2e087dacb1d5224c3f85675cabbe2330 + SHA512 940730caf6f3732c7846feaf48d3a91538985bc9f0c3b2fea66e395c99c1ca0c6252829152cac3d58dc04d39da19a9aa9b4d9134a6cd1a4ed2594931e22e0461 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/parson/CONTROL b/ports/parson/CONTROL index 7c82a9eba..5a6d27896 100644 --- a/ports/parson/CONTROL +++ b/ports/parson/CONTROL @@ -1,3 +1,3 @@ Source: parson -Version: 2018-04-17 +Version: 2018-05-17 Description: a lighweight json library written in C diff --git a/ports/parson/portfile.cmake b/ports/parson/portfile.cmake index 87fda6451..134520fbd 100644 --- a/ports/parson/portfile.cmake +++ b/ports/parson/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kgabis/parson - REF 921da6f5d7b82ac3c8c809341028daafe47e3210 - SHA512 fac1989d03148c1efec5e483704e76110c6575258c7ad0585f4598c1666b22804b8bd672fa31869227b5334fb1ba0b70eb380a971950df1a8f52e56e646956d9 + REF 4f3eaa6849ba62404fc5756650168bb2056d0b46 + SHA512 dd98ebdb7f39387e600d529b8c92986f20781e7ec6b2baffcdc553e834be826ada4724247750300a897cacdee8f942d3c7d540e6bb410c2854a9291a80df847f HEAD_REF master ) diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL index a9e5abf1e..9da837955 100644 --- a/ports/re2/CONTROL +++ b/ports/re2/CONTROL @@ -1,3 +1,3 @@ Source: re2 -Version: 2018-05-01 +Version: 2018-05-17 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 diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake index 1e92be864..f92a24bf2 100644 --- a/ports/re2/portfile.cmake +++ b/ports/re2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/re2 - REF 71e6699778cebf99ed11e78e48b9370f79b9ea39 - SHA512 2d8499467eb4a5c0607f6814ea2d0bbdd5025b00a7ebd8bc7c8cd897ef39e21597b9ac01baf48d4f82613fb531c1e3562e63396e6b1fdfa3532b8b7af05f049c + REF 6cf8ccd82dbaab2668e9b13596c68183c9ecd13f + SHA512 3a088cd94516ff4410de63d6fcaff999161e75be8014713177cbd030c95a8802712219b032ad651ac4781011db5e385b6d6e8b4a665196637edc4033b41a2c3c HEAD_REF master ) diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 85e542a43..a2747e3f5 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,5 +1,5 @@ Source: rocksdb -Version: 5.12.4 +Version: 5.13.1 Description: A library that provides an embeddable, persistent key-value store for fast storage Default-Features: zlib diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 95642b19f..1e2720b51 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 v5.12.4 - SHA512 661e30a9fd2a83f2d8dbcc9f27e8ae2e83f384bb7f4f61dc41d89e85d93edc1032b70ab97063e0e3c0bda591612214793d1b075c6dcfeda2e0a32acb6e9d8689 + REF v5.13.1 + SHA512 70942aecb4decbe79a92cf3122c4d5d3232572084e2b018a911ce7149783c8047dbd338911644b7f3b6fc795fdd5f2971f75a8c5e4502f0765d6de0045bc970c HEAD_REF master ) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index 561f6b1b9..c20b05efb 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-05-01 +Version: 2018-05-17 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index a793e3482..0fc091504 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF 3434c7f401a6fdc47372960363202228b5cab39b - SHA512 76be0a078ffbb2c8a4da7d433bd37a0d20a01f75b684931d243d2b3ca5164ea609ec443b6267be631737a9a5187de294f7151c8403e5ee1a3d574362c3c419bf + REF eb5c851f4e82d31692d7c45225b41fdc374134aa + SHA512 e1a3a8cd16f069c8c58858dfe516df0aa2dd07f4e415a2ef7539104024910383217f75c16481347ef0a92a17faad98aa051320ec9e4693426ad9cd297983d923 HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 6573f71cf..87cb4fa05 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-05-01 +Version: 2018-05-17 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit 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. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 140182c96..f951c2bd5 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF c7aa68bd59d1d3a1bbcb133fc986ff404d47b129 - SHA512 e95f3bcc5abf52f208d7e8b013748643bbe9b1cc734bda6aafd234d7d0a4e0a7ef96d4eec0d6ea1d2572812ad126e961fb7a495da4d01ab5eaaaabb2d1625f81 + REF 88591e32e710a0524327153c8b629d5b461e35e0 + SHA512 372e323c4b2163247353a63d127ec69e3448269bb465b7fdf4e14c06a152602ac412649d04da4e191ec79bada467cb4b217e70f4874f9059e2ae984334f54ff8 HEAD_REF master ) diff --git a/ports/unicorn-lib/CONTROL b/ports/unicorn-lib/CONTROL index 236a0301a..194e24eb8 100644 --- a/ports/unicorn-lib/CONTROL +++ b/ports/unicorn-lib/CONTROL @@ -1,4 +1,4 @@ Source: unicorn-lib -Version: 2018-05-01 +Version: 2018-05-17 Description: Unicode library for C++ by Ross Smith Build-Depends: rs-core-lib, pcre, zlib, libiconv diff --git a/ports/unicorn-lib/portfile.cmake b/ports/unicorn-lib/portfile.cmake index cc4392497..ec28ec237 100644 --- a/ports/unicorn-lib/portfile.cmake +++ b/ports/unicorn-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/unicorn-lib - REF 1009796f0aec3c1cf686078713939b99b516dcbd - SHA512 bde58811b11667d378450eb15f4d425e6e8629667f84958bef20a127db28e6a8abc57f79d386e11e67aa4b84c5519c7a1b61a1bb05210c8b1651709a921c06eb + REF 2c8e7f8948aaf51654685e2f6fa3ea1da3fa8d24 + SHA512 1eb3f8d8a6cbe383c4dd01c5a9883d57a024d47b2adc94c437ca815be7532d7b26a4883061ee31c16194336d095d59bce2ca3a538f100f0d05dc1ff8e0b3f7ad HEAD_REF master ) diff --git a/ports/unicorn/CONTROL b/ports/unicorn/CONTROL index 7f0a41d7e..82b42ba9c 100644 --- a/ports/unicorn/CONTROL +++ b/ports/unicorn/CONTROL @@ -1,3 +1,3 @@ Source: unicorn -Version: 2018-04-25 +Version: 2018-05-17 Description: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework diff --git a/ports/unicorn/portfile.cmake b/ports/unicorn/portfile.cmake index 3b0a89419..0340a0e3b 100644 --- a/ports/unicorn/portfile.cmake +++ b/ports/unicorn/portfile.cmake @@ -14,8 +14,8 @@ set(VCPKG_CRT_LINKAGE "static") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO unicorn-engine/unicorn - REF 2edb4b57c492d3255b4bfa9a08963657166fb311 - SHA512 e68ef5f1abd8ad2560bdf94957e6d7a3a106fbe4f3b34d8cfc75ab2f7a754df214e5fdddd34670412fc4dd652261391bb8f5976bea2476a2997ff29bc10b81e8 + REF 19ffa83d4353af8834c4c55590ca2ecd357a6bbe + SHA512 db09f91da1f0611663200ca1add7f878e677d3df4faebdb38e68e96a795c1d2bb7bf5b4af44d9b92fc91a1c1f18a89862a0aa3f12ef8a1277d8bfdf94b0b5020 HEAD_REF master ) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index 698477378..fc3b8da7b 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-05-01 +Version: 2018-05-17 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 da317efe9..4ea6df988 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF 6160da5dbe2590e09c4704d5c093292ec088ec11 - SHA512 2286f32874b9b9f815605da319a773cb29ec948c4ae7697c99bc2b957b847f7fb2cf098274803387b40847e1cdee5ee752c793d88b23a2c3c316e1e9f4ed9c54 + REF 6a5051fac3bb09db7e7772dcbdd591ee7ded1400 + SHA512 e05e1d293be513836e3afa117f6acb6f75ecd1b772c7be1c2850b0f165205fec8f0a91bb9b0aaffa9477aae5cc6aae401b9d5d5aa5986c28c3d76e3d4fa4f3e9 HEAD_REF master ) -- cgit v1.2.3 From ef71cef4921a9e54c8abf8280820cc5cb6fb926e Mon Sep 17 00:00:00 2001 From: Alexej Harm Date: Fri, 18 May 2018 08:35:20 +0200 Subject: [podofo] Create an optional flavor for the fontconfig dependency (#3516) * [podofo] Create an optional flavor for the fontconfig dependency * [podofo] Simplify portfile and improve robustness --- ports/podofo/CONTROL | 8 ++++++-- ports/podofo/portfile.cmake | 45 +++++++++++++++++++++++---------------------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/ports/podofo/CONTROL b/ports/podofo/CONTROL index 55fa20a28..2e36ace2f 100644 --- a/ports/podofo/CONTROL +++ b/ports/podofo/CONTROL @@ -1,4 +1,8 @@ Source: podofo -Version: 0.9.5-1 +Version: 0.9.5-2 Description: PoDoFo is a library to work with the PDF file format -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl, freetype, fontconfig +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl (!windows&!uwp), freetype + +Feature: fontconfig +Description: Enable font manager support on Unix platforms. +Build-Depends: fontconfig diff --git a/ports/podofo/portfile.cmake b/ports/podofo/portfile.cmake index 7c62ea07a..c49534329 100644 --- a/ports/podofo/portfile.cmake +++ b/ports/podofo/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) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/podofo-0.9.5) vcpkg_download_distfile(ARCHIVE @@ -19,18 +7,31 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DPODOFO_BUILD_LIB_ONLY=1 -DPODOFO_BUILD_SHARED=1 - ) -elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DPODOFO_BUILD_LIB_ONLY=1 -DPODOFO_BUILD_STATIC=1 - ) +set(PODOFO_NO_FONTMANAGER ON) +if("fontconfig" IN_LIST FEATURES) + set(PODOFO_NO_FONTMANAGER OFF) +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PODOFO_BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PODOFO_BUILD_STATIC) + +set(IS_WIN32 OFF) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + set(IS_WIN32 ON) endif() +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DPODOFO_BUILD_LIB_ONLY=1 + -DPODOFO_BUILD_SHARED=${PODOFO_BUILD_SHARED} + -DPODOFO_BUILD_STATIC=${PODOFO_BUILD_STATIC} + -DPODOFO_NO_FONTMANAGER=${PODOFO_NO_FONTMANAGER} + -DCMAKE_DISABLE_FIND_PACKAGE_FONTCONFIG=${PODOFO_NO_FONTMANAGER} + -DCMAKE_DISABLE_FIND_PACKAGE_LIBCRYPTO=${IS_WIN32} + -DCMAKE_DISABLE_FIND_PACKAGE_LIBIDN=ON +) + vcpkg_install_cmake() # Handle copyright -- cgit v1.2.3 From 2988f8577b8ee3e977c187401af544e9eae4ff7b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 17 May 2018 23:39:36 -0700 Subject: [faq.md] Update with support for Linux/OSX. Fixes #3416. --- docs/about/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/about/faq.md b/docs/about/faq.md index b345b4fd0..87496da44 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -26,7 +26,7 @@ To see an example of this, look at [`ports\opengl\portfile.cmake`](https://githu We currently target Windows Desktop (x86 and x64) as well as the Universal Windows Platform (x86, x64, and ARM). See `vcpkg help triplet` for the current list. ## Does Vcpkg run on Linux/OSX? -No, for this preview we are focusing on Windows as a host platform. If you'd be interested in having Vcpkg run on Linux or OSX, please let us know in [this issue](https://github.com/microsoft/vcpkg/issues/57)! +Yes! We continously test on OSX and Ubuntu 16.04, however we know users have been successful with Arch, Fedora, and FreeBSD. If you have trouble with your favorite Linux distribution, let us know in an issue and we'd be happy to help! ## How do I use different versions of a library on one machine? Within a single instance of Vcpkg (e.g. one set of `installed\`, `packages\`, `ports\` and so forth), you can only have one version of a library installed (otherwise, the headers would conflict with each other!). For those with experience with system-wide package managers, packages in Vcpkg correspond to the `X-dev` or `X-devel` packages. -- cgit v1.2.3 From 2978f18ad33b138581d06badae64ad08fdff4653 Mon Sep 17 00:00:00 2001 From: Mateusz Loskot Date: Fri, 18 May 2018 08:42:45 +0200 Subject: Add PDAL 1.7.1 (#3452) * Add PDAL 1.7.1 First stab at porting PDAL (https://pdal.io), creates package: - with minimal set of required dependencies - with dynamic library only - dependency GDAL does not build as static - with pdal executable * [pdal] Allow building static libs on top of DLLs. --- ports/pdal/0001-win32_compiler_options.cmake.patch | 14 ++++ ports/pdal/CONTROL | 4 ++ ports/pdal/FindGDAL.cmake | 13 ++++ ports/pdal/FindGEOS.cmake | 13 ++++ ports/pdal/FindGeoTIFF.cmake | 13 ++++ ports/pdal/portfile.cmake | 79 ++++++++++++++++++++++ 6 files changed, 136 insertions(+) create mode 100644 ports/pdal/0001-win32_compiler_options.cmake.patch create mode 100644 ports/pdal/CONTROL create mode 100644 ports/pdal/FindGDAL.cmake create mode 100644 ports/pdal/FindGEOS.cmake create mode 100644 ports/pdal/FindGeoTIFF.cmake create mode 100644 ports/pdal/portfile.cmake diff --git a/ports/pdal/0001-win32_compiler_options.cmake.patch b/ports/pdal/0001-win32_compiler_options.cmake.patch new file mode 100644 index 000000000..8486cc1cd --- /dev/null +++ b/ports/pdal/0001-win32_compiler_options.cmake.patch @@ -0,0 +1,14 @@ +diff -Nuar a/cmake/win32_compiler_options.cmake b/cmake/win32_compiler_options.cmake +--- a/cmake/win32_compiler_options.cmake 2018-04-06 20:24:17.000000000 +0200 ++++ b/cmake/win32_compiler_options.cmake 2018-04-28 19:40:54.534593200 +0200 +@@ -67,10 +67,6 @@ + endif() + endif() + +-set(CMAKE_INCLUDE_PATH "c:/OSGeo4W64/include;$ENV{CMAKE_INCLUDE_PATH}") +-set(CMAKE_LIBRARY_PATH "c:/OSGeo4W64/lib;$ENV{CMAKE_LIBRARY_PATH}") +-set(CMAKE_PREFIX_PATH "c:/OSGeo4W64/cmake;$ENV{CMAKE_LIBRARY_PATH}") +- + #ABELL (& gadomski) - WHY? + set(PDAL_PLATFORM_WIN32 1) + set(WINSOCK_LIBRARY ws2_32) diff --git a/ports/pdal/CONTROL b/ports/pdal/CONTROL new file mode 100644 index 000000000..3db5c51ac --- /dev/null +++ b/ports/pdal/CONTROL @@ -0,0 +1,4 @@ +Source: pdal +Version: 1.7.1-1 +Description: PDAL - Point Data Abstraction Library is a library for manipulating point cloud data. +Build-Depends: gdal, geos, jsoncpp, libgeotiff diff --git a/ports/pdal/FindGDAL.cmake b/ports/pdal/FindGDAL.cmake new file mode 100644 index 000000000..9683cb0e5 --- /dev/null +++ b/ports/pdal/FindGDAL.cmake @@ -0,0 +1,13 @@ +find_path(GDAL_INCLUDE_DIR gdal.h) + +find_library(GDAL_LIBRARY_DEBUG NAMES gdald) +find_library(GDAL_LIBRARY_RELEASE NAMES gdal) + +include(SelectLibraryConfigurations) +select_library_configurations(GDAL) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + GDAL DEFAULT_MSG + GDAL_LIBRARY GDAL_INCLUDE_DIR +) diff --git a/ports/pdal/FindGEOS.cmake b/ports/pdal/FindGEOS.cmake new file mode 100644 index 000000000..88d17b073 --- /dev/null +++ b/ports/pdal/FindGEOS.cmake @@ -0,0 +1,13 @@ +find_path(GEOS_INCLUDE_DIR geos_c.h) + +find_library(GEOS_LIBRARY_DEBUG NAMES geos_cd) +find_library(GEOS_LIBRARY_RELEASE NAMES geos_c) + +include(SelectLibraryConfigurations) +select_library_configurations(GEOS) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + GEOS DEFAULT_MSG + GEOS_LIBRARY GEOS_INCLUDE_DIR +) diff --git a/ports/pdal/FindGeoTIFF.cmake b/ports/pdal/FindGeoTIFF.cmake new file mode 100644 index 000000000..51a5fb2d8 --- /dev/null +++ b/ports/pdal/FindGeoTIFF.cmake @@ -0,0 +1,13 @@ +find_path(GEOTIFF_INCLUDE_DIR geotiff.h) + +find_library(GEOTIFF_LIBRARY_DEBUG NAMES geotiff_d) +find_library(GEOTIFF_LIBRARY_RELEASE NAMES geotiff) + +include(SelectLibraryConfigurations) +select_library_configurations(GEOTIFF) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + GEOTIFF DEFAULT_MSG + GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR +) diff --git a/ports/pdal/portfile.cmake b/ports/pdal/portfile.cmake new file mode 100644 index 000000000..f9b413218 --- /dev/null +++ b/ports/pdal/portfile.cmake @@ -0,0 +1,79 @@ +# vcpkg portfile.cmake for PDAL +# +# NOTE: update the version string for new PDAL release +set(PDAL_VERSION_STR "1.7.1") +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/PDAL-${PDAL_VERSION_STR}-src) + +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/pdal/PDAL-${PDAL_VERSION_STR}-src.tar.gz" + FILENAME "PDAL-${PDAL_VERSION_STR}-src.tar.gz" + SHA512 e3e63bb05930c1a28c4f46c7edfaa8e9ea20484f1888d845b660a29a76f1dd1daea3db30a98607be0c2eeb86930ec8bfd0965d5d7d84b07a4fe4cb4512da9b09 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/PDAL-${PDAL_VERSION_STR}-src + PATCHES + ${CURRENT_PORT_DIR}/0001-win32_compiler_options.cmake.patch +) + +# Deploy custom CMake modules to enforce expected dependencies look-up +foreach(_module IN ITEMS FindGDAL FindGEOS FindGeoTIFF) + 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) +else() + set(PDAL_BUILD_STATIC ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPDAL_BUILD_STATIC:BOOL=${PDAL_BUILD_STATIC} + -DWITH_TESTS:BOOL=OFF + -DWITH_COMPLETION:BOOL=OFF +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/pdal/cmake) +vcpkg_copy_pdbs() + +# Install copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdal RENAME copyright +) + +# Install PDAL executable +file(GLOB _pdal_apps ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(COPY ${_pdal_apps} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/pdal) +file(REMOVE ${_pdal_apps}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +# Post-install clean-up +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/lib/pdal + ${CURRENT_PACKAGES_DIR}/debug/lib/pdal + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +else() + file(GLOB _pdal_bats ${CURRENT_PACKAGES_DIR}/bin/*.bat) + file(REMOVE ${_pdal_bats}) + file(GLOB _pdal_bats ${CURRENT_PACKAGES_DIR}/debug/bin/*.bat) + file(REMOVE ${_pdal_bats}) + file(GLOB _pdal_apps ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${_pdal_apps}) +endif() -- cgit v1.2.3 From 0aad7df94445ea0eb8d6dfe3acf07fac9a4e9fa9 Mon Sep 17 00:00:00 2001 From: Mateusz Loskot Date: Fri, 18 May 2018 08:46:04 +0200 Subject: [GDAL] Update to 2.3.0 (#3478) Update portfile.cmake for easier version/checksum maintenance. Update and rename 0001 patch fixing debug build. Update no-my-bool.patch following source file changes. Remove no patches which are no longer required due to corresponding changes in the GDAL source code. Supports PROJ 4.9.x and 5.x - the latter not in vcpkg ports. --- ...e-CXX_CRT_FLAGS-to-allow-for-selection-of.patch | 37 ---------------------- ports/gdal/0001-Fix-debug-crt-flags.patch | 27 ++++++++++++++++ ...lusion-of-PDB-in-release-dll-if-so-reques.patch | 14 -------- ports/gdal/0003-Fix-openjpeg-include.patch | 20 ------------ ports/gdal/CONTROL | 4 +-- ports/gdal/no-my-bool.patch | 25 +++++++-------- ports/gdal/no-mysql-global-h.patch | 13 -------- ports/gdal/no-mysql-sys-h.patch | 13 -------- ports/gdal/portfile.cmake | 28 +++++++++------- 9 files changed, 57 insertions(+), 124 deletions(-) delete mode 100644 ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch create mode 100644 ports/gdal/0001-Fix-debug-crt-flags.patch delete mode 100644 ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch delete mode 100644 ports/gdal/0003-Fix-openjpeg-include.patch delete mode 100644 ports/gdal/no-mysql-global-h.patch delete mode 100644 ports/gdal/no-mysql-sys-h.patch diff --git a/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch b/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch deleted file mode 100644 index 7817c4a38..000000000 --- a/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/nmake.opt b/nmake.opt -index bd5719c2d1..f6101ccd59 100644 ---- a/nmake.opt -+++ b/nmake.opt -@@ -127,18 +127,28 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb - CXX_PDB_FLAGS= - !ENDIF - -+# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) -+# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well -+!IFNDEF CXX_CRT_FLAGS -+!IFNDEF DEBUG -+CXX_CRT_FLAGS=/MD -+!ELSE -+CXX_CRT_FLAGS=/MDd -+!ENDIF -+!ENDIF -+ - !IFNDEF OPTFLAGS - !IF $(MSVC_VER) >= 1400 - !IFNDEF DEBUG --OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG -+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG - !ELSE --OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG -+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG - !ENDIF - !ELSE - !IFNDEF DEBUG --OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /Ox /FC /DNDEBUG -+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /Ox /DNDEBUG - !ELSE --OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /FC /DDEBUG -+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /DDEBUG - !ENDIF - !ENDIF #MSVC_VER - !ENDIF # OPTFLAGS diff --git a/ports/gdal/0001-Fix-debug-crt-flags.patch b/ports/gdal/0001-Fix-debug-crt-flags.patch new file mode 100644 index 000000000..753d53131 --- /dev/null +++ b/ports/gdal/0001-Fix-debug-crt-flags.patch @@ -0,0 +1,27 @@ +diff -Nuar a/nmake.opt b/nmake.opt +--- a/nmake.opt 2018-05-04 09:05:46.000000000 +0200 ++++ b/nmake.opt 2018-05-11 22:58:39.387603800 +0200 +@@ -120,11 +120,21 @@ + CXX_PDB_FLAGS= + !ENDIF + ++# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) ++# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well ++!IFNDEF CXX_CRT_FLAGS ++!IFNDEF DEBUG ++CXX_CRT_FLAGS=/MD ++!ELSE ++CXX_CRT_FLAGS=/MDd ++!ENDIF ++!ENDIF ++ + !IFNDEF OPTFLAGS + !IFNDEF DEBUG +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG + !ELSE +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MDd /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG + !ENDIF + !ENDIF # OPTFLAGS + diff --git a/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch b/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch deleted file mode 100644 index 57030b99b..000000000 --- a/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/nmake.opt b/nmake.opt -index bd5719c2d1..c0ca442cbe 100644 ---- a/nmake.opt -+++ b/nmake.opt -@@ -195,6 +205,9 @@ SOFTWARNFLAGS= /wd4244 /wd4702 /wd4701 /wd4013 /wd4706 /wd4057 /wd4210 /wd4305 - # Linker debug options - !IFDEF DEBUG - LDEBUG= /debug -+!ELSEIFDEF WITH_PDB -+# Ensures that PDB is included in release DLL if so requested -+LDEBUG= /debug /opt:ref /opt:icf - !ENDIF - - # Uncomment the following if you are building for 64-bit windows diff --git a/ports/gdal/0003-Fix-openjpeg-include.patch b/ports/gdal/0003-Fix-openjpeg-include.patch deleted file mode 100644 index 4ea72690c..000000000 --- a/ports/gdal/0003-Fix-openjpeg-include.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/frmts/openjpeg/openjpegdataset.cpp b/frmts/openjpeg/openjpegdataset.cpp -index 5978882bc9..72cc7b9559 100644 ---- a/frmts/openjpeg/openjpegdataset.cpp -+++ b/frmts/openjpeg/openjpegdataset.cpp -@@ -34,14 +34,8 @@ - #pragma clang diagnostic ignored "-Wdocumentation" - #endif - --#if defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20200 --#include --#elif defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20100 --#include --#else - #include /* openjpeg.h needs FILE* */ --#include --#endif -+#include - - #ifdef __clang__ - #pragma clang diagnostic pop diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index c958ac671..be75e6693 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,4 +1,4 @@ Source: gdal -Version: 2.2.2-1 +Version: 2.3.0-1 Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. -Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma +Build-Depends: proj, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma diff --git a/ports/gdal/no-my-bool.patch b/ports/gdal/no-my-bool.patch index 1ed0279ee..2589ff044 100644 --- a/ports/gdal/no-my-bool.patch +++ b/ports/gdal/no-my-bool.patch @@ -1,13 +1,12 @@ -diff --git a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp -index 8733af9..f49d862 100644 ---- a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp -+++ b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp -@@ -259,7 +259,7 @@ int OGRMySQLDataSource::Open( const char * pszNewName, char** papszOpenOptionsIn - // Enable automatic reconnection - // Must be called after mysql_real_connect() on MySQL < 5.0.19 - // and at any point on more recent versions. -- my_bool reconnect = 1; -+ bool reconnect = 1; - mysql_options(hConn, MYSQL_OPT_RECONNECT, &reconnect); - } - +diff -Nuar a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp +--- a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp 2018-05-04 09:09:26.000000000 +0200 ++++ b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp 2018-05-11 23:07:44.284558300 +0200 +@@ -235,7 +235,7 @@ + // Enable automatic reconnection + // Must be called after mysql_real_connect() on MySQL < 5.0.19 + // and at any point on more recent versions. +- my_bool reconnect = 1; ++ bool reconnect = 1; + mysql_options(hConn, MYSQL_OPT_RECONNECT, &reconnect); + } + diff --git a/ports/gdal/no-mysql-global-h.patch b/ports/gdal/no-mysql-global-h.patch deleted file mode 100644 index 57ff89ce3..000000000 --- a/ports/gdal/no-mysql-global-h.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ogr/ogrsf_frmts/mysql/ogr_mysql.h b/ogr/ogrsf_frmts/mysql/ogr_mysql.h -index 76a6762..b2f0fcb 100644 ---- a/ogr/ogrsf_frmts/mysql/ogr_mysql.h -+++ b/ogr/ogrsf_frmts/mysql/ogr_mysql.h -@@ -43,7 +43,7 @@ - #pragma warning( disable : 4211 ) /* nonstandard extension used : redefined extern to static */ - #endif - --#include -+/* #include */ /* Mysql 8+ no longer ships with my_global.h */ - #include - - #ifdef _MSC_VER diff --git a/ports/gdal/no-mysql-sys-h.patch b/ports/gdal/no-mysql-sys-h.patch deleted file mode 100644 index 951425386..000000000 --- a/ports/gdal/no-mysql-sys-h.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp -index e694bbd..8733af9 100644 ---- a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp -+++ b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp -@@ -44,7 +44,7 @@ - #pragma clang diagnostic ignored "-Wunknown-pragmas" - #pragma clang diagnostic ignored "-Wdocumentation" - #endif --#include -+/*#include mysql 8.1 no longer ships with my_sys.h*/ - #ifdef __clang__ - #pragma clang diagnostic pop - #endif diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index ba77b624a..70eea8583 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -1,3 +1,11 @@ +# vcpkg portfile.cmake for GDAL +# +# NOTE: update the version and checksum for new GDAL release +set(GDAL_VERSION_STR "2.3.0") +set(GDAL_VERSION_PKG "230") +set(GDAL_VERSION_LIB "203") +set(GDAL_PACKAGE_SUM "f3f790b7ecb28916d6d0628b15ddc6b396a25a8f1f374589ea5e95b5a50addc99e05e363113f907b6c96faa69870b5dc9fdf3d771f9c8937b4aa8819bd78b190") + if (TRIPLET_SYSTEM_ARCH MATCHES "arm") message(FATAL_ERROR "ARM is currently not supported.") endif() @@ -11,27 +19,23 @@ endif() include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE - URLS "http://download.osgeo.org/gdal/2.2.2/gdal222.zip" - FILENAME "gdal222.zip" - SHA512 b886238a7915c97f4acec5920dabe959d1ab15a8be0bc31ba0d05ad69d1d7d96f864faf0aa82921fa1a1b40b733744202b86f2f45ff63d6518cd18a53f3544a8 + URLS "http://download.osgeo.org/gdal/${GDAL_VERSION_STR}/gdal${GDAL_VERSION_PKG}.zip" + FILENAME "gdal${GDAL_VERSION_PKG}.zip" + SHA512 ${GDAL_PACKAGE_SUM} ) # Extract source into architecture specific directory, because GDALs' nmake based build currently does not # support out of source builds. -set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-2.2.2) -set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-2.2.2) +set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-${GDAL_VERSION_STR}) +set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-${GDAL_VERSION_STR}) foreach(BUILD_TYPE debug release) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-2.2.2 + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch - ${CMAKE_CURRENT_LIST_DIR}/0003-Fix-openjpeg-include.patch - ${CMAKE_CURRENT_LIST_DIR}/no-mysql-global-h.patch - ${CMAKE_CURRENT_LIST_DIR}/no-mysql-sys-h.patch + ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-debug-crt-flags.patch ${CMAKE_CURRENT_LIST_DIR}/no-my-bool.patch ) endforeach() @@ -220,7 +224,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) else() file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(REMOVE ${EXE_FILES} ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) - file(COPY ${SOURCE_PATH_DEBUG}/gdal202.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${SOURCE_PATH_DEBUG}/gdal${GDAL_VERSION_LIB}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) -- cgit v1.2.3 From 15776d1d655543bc1eceb5f930cf6028ce44f176 Mon Sep 17 00:00:00 2001 From: Erwan BERNARD Date: Fri, 18 May 2018 11:03:26 +0200 Subject: [libuv] add libuv for linux (#3437) * [libuv] add libuv for linux [libuv] add linux in not skip header * inject VCPKG_CMAKE_SYSTEM_NAME, add darwin * remove message * [vlpp] Fix Linux build * Add VSCode workspace file to .gitignore [ci skip] * [imgui] Update to 1.60 * Update for ExprTk package * Update for StrTk package * Use CMAKE_EXECUTABLE_SUFFIX * FixpmdkFailure * Update sol2 to 2.20.0 * Improve unsupported toolchain error message * [brotli] Fix Linux build * [lz4] update to 1.8.2 * [lz4] fix version number [zstd] update to 1.3.4 * Update CHANGELOG and bump version to v0.0.111 * [ceres] Fix build on Linux. Closes #3490 * ace 6.4.8 * ports/ace/CONTROL: * ports/ace/portfile.cmake: * [abseil][aws-sdk-cpp][folly][jsonnet][ms-gsl][mujs][openimageio][re2][rs-core-lib][thrift][unicorn-lib][zeromq] Upgrades [robin-map] Initial commit * [sfml] update to 2.5.0 * Support azure-storage-cpp 4.0.0 * [catch-classic] Update to 1.12.2 * [bootstrap-vcpkg.sh] Find g++-8. Fixes #3486. * [boost-modular-build-helper] Pass address-model=64 on all 64-bit platforms. * [brotli][folly][sol] Fix regressions on master * [blosc] Fix accidentally using local vendored copies * [bootstrap.sh] Fix whitespace-in-path issues * [openvr] update to 1.0.15 * [rocksdb] fix zlib findpackage * [vcpkg] Significantly reduce usage of powershell. Reduce console font switching bug * Fix signature of hashing function * [openexr] Fix linux build * [curl] update to 7.60.0 * [wtl] Fix capitalization in file copy script * adding a blog link in the doc * [ps1] Add missing "include" * [vcpkg.exe] Don't error if vswhere.exe is not found * Fix typo * added ignore 4703 warning to fix uwp builds (#3279) * added ignore 4703 warning to fix uwp builds * [protobuf] Bump version to include patchfile * [vcpkg edit] Fix whitespace-in-path issue * Update CHANGELOG and bump version to v0.0.112 * [ps1] Fix error when vs140comntools is not available * [pmdk] Fix v140 requirement * [grpc] Fix uwp (#3281) * 2018.05.17 updates * [libuv] CMake simplification --- ports/libuv/CMakeLists.txt | 64 ++++++++++++++++++++++++++++++++++++++-------- ports/libuv/CONTROL | 2 +- ports/libuv/portfile.cmake | 7 +++-- 3 files changed, 60 insertions(+), 13 deletions(-) diff --git a/ports/libuv/CMakeLists.txt b/ports/libuv/CMakeLists.txt index 87c0a6c95..2ebc71612 100644 --- a/ports/libuv/CMakeLists.txt +++ b/ports/libuv/CMakeLists.txt @@ -2,24 +2,68 @@ cmake_minimum_required(VERSION 3.5) project(libuv C) file(GLOB UV_SOURCES_COMMON src/*.c) + +file(GLOB UV_SOURCES_UNIX + src/unix/async.c + src/unix/core.c + src/unix/dl.c + src/unix/fs.c + src/unix/getaddrinfo.c + src/unix/getnameinfo.c + src/unix/loop.c + src/unix/loop-watcher.c + src/unix/pipe.c + src/unix/poll.c + src/unix/process.c + src/unix/signal.c + src/unix/stream.c + src/unix/tcp.c + src/unix/thread.c + src/unix/timer.c + src/unix/tty.c + src/unix/udp.c + src/unix/proctitle.c +) +file(GLOB UV_SOURCES_LINUX + src/unix/linux-core.c + src/unix/linux-inotify.c + src/unix/linux-syscalls.c +) +file(GLOB UV_SOURCES_DARWIN + src/unix/kqueue.c + src/unix/darwin.c + src/unix/fsevents.c + src/unix/pthread-barrier.c + src/unix/darwin-proctitle.c +) file(GLOB UV_SOURCES_WIN src/win/*.c) -add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN}) -target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600") -target_link_libraries(libuv iphlpapi psapi shell32 userenv ws2_32) +if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN}) + target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600") + target_link_libraries(libuv iphlpapi psapi shell32 userenv ws2_32) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_DARWIN}) +else() # Assume some Linux variant + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_LINUX}) +endif() + target_include_directories(libuv PUBLIC ./include PRIVATE ./src) set_target_properties(libuv PROPERTIES DEFINE_SYMBOL BUILDING_UV_SHARED) if(NOT UV_SKIP_HEADERS) install(FILES - include/tree.h - include/uv.h - include/uv-version.h - include/uv-errno.h - include/uv-threadpool.h - include/uv-win.h - DESTINATION include) + include/tree.h + include/uv.h + include/uv-version.h + include/uv-errno.h + include/uv-threadpool.h + include/uv-win.h + include/uv-unix.h + include/uv-darwin.h + DESTINATION include) endif() + install(TARGETS libuv RUNTIME DESTINATION bin ARCHIVE DESTINATION lib diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index 155a88cfe..1c916abe7 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.20.3 +Version: 1.20.3-1 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index cdc1034ff..4f3d3f738 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -1,10 +1,12 @@ include(vcpkg_common_functions) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv REF v1.20.3 SHA512 60ebc0059ec9fdd022aa9d60b2a0340f29e037bf79fa08707f6f2ecca9ec263c7a6466bdc1f94e0875a6a627ee749efa86117dedb22119676a7bafed8b5d77a0 - HEAD_REF v1.x) + HEAD_REF v1.x +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -12,7 +14,8 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS_DEBUG - -DUV_SKIP_HEADERS=ON) + -DUV_SKIP_HEADERS=ON +) vcpkg_install_cmake() vcpkg_copy_pdbs() -- cgit v1.2.3 From ddcc4ad33450636dc126384c953d8fb03e8d05c2 Mon Sep 17 00:00:00 2001 From: alqaz Date: Fri, 18 May 2018 18:00:09 +0800 Subject: uwebsocket on linux need c++ support (#3455) * uwebsocket on linux need c++ support * [uwebsockets] Compile feature required on all platforms * [libuv] Install pthread-barrier.h --- ports/libuv/CMakeLists.txt | 4 +++- ports/libuv/CONTROL | 2 +- ports/uwebsockets/CMakeLists.txt | 1 + ports/uwebsockets/CONTROL | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ports/libuv/CMakeLists.txt b/ports/libuv/CMakeLists.txt index 2ebc71612..538169e09 100644 --- a/ports/libuv/CMakeLists.txt +++ b/ports/libuv/CMakeLists.txt @@ -61,7 +61,9 @@ if(NOT UV_SKIP_HEADERS) include/uv-win.h include/uv-unix.h include/uv-darwin.h - DESTINATION include) + include/pthread-barrier.h + DESTINATION include +) endif() install(TARGETS libuv diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index 1c916abe7..6affcb3c2 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.20.3-1 +Version: 1.20.3-2 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/uwebsockets/CMakeLists.txt b/ports/uwebsockets/CMakeLists.txt index 43ccd039c..c3c4f97d8 100644 --- a/ports/uwebsockets/CMakeLists.txt +++ b/ports/uwebsockets/CMakeLists.txt @@ -11,6 +11,7 @@ file(GLOB SOURCES src/*.cpp) add_library(uWS ${SOURCES}) target_include_directories(uWS PUBLIC ${OPENSSL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS}) target_link_libraries(uWS PUBLIC ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBUV_LIBRARY}) +target_compile_features(uWS PRIVATE cxx_range_for) install(TARGETS uWS RUNTIME DESTINATION bin diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index 3871e8691..c212611de 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets -Version: 0.14.8-1 +Version: 0.14.8-2 Build-Depends: libuv, openssl, zlib Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js -- cgit v1.2.3 From 642e3a78d4d4a9a107b71eedbe044873322afe86 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 18 May 2018 02:53:34 -0700 Subject: [opus] Don't redefine main() in the static lib --- ports/opus/CONTROL | 2 +- ports/opus/no-main.patch | 14 ++++++++++++++ ports/opus/portfile.cmake | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 ports/opus/no-main.patch diff --git a/ports/opus/CONTROL b/ports/opus/CONTROL index 6f794c986..e5c715bba 100644 --- a/ports/opus/CONTROL +++ b/ports/opus/CONTROL @@ -1,3 +1,3 @@ Source: opus -Version: 1.2.1 +Version: 1.2.1-1 Description: Totally open, royalty-free, highly versatile audio codec diff --git a/ports/opus/no-main.patch b/ports/opus/no-main.patch new file mode 100644 index 000000000..6c373de7b --- /dev/null +++ b/ports/opus/no-main.patch @@ -0,0 +1,14 @@ +diff --git a/win32/VS2015/opus.vcxproj b/win32/VS2015/opus.vcxproj +index 33bf706..296bc79 100644 +--- a/win32/VS2015/opus.vcxproj ++++ b/win32/VS2015/opus.vcxproj +@@ -350,9 +350,6 @@ + + + +- +- 4244;%(DisableSpecificWarnings) +- + + + diff --git a/ports/opus/portfile.cmake b/ports/opus/portfile.cmake index 5bc9b6b60..ed2ed092e 100644 --- a/ports/opus/portfile.cmake +++ b/ports/opus/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_from_github( REF v1.2.1 SHA512 fdc64b43875dd07dc9eb1c37e9a61d1c10e3095de62ed9597d51b93445136958c9f5fee78c33ae7f90c72a20200083cdc727d8e79f2f9e580ad4e2f8c50cccb4 HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/no-main.patch" ) # Ensure proper crt linkage -- cgit v1.2.3 From 5fe458d22e7a00422a518467f8060025d1d331b0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 18 May 2018 04:54:47 -0700 Subject: [pdal] Avoid configure_file() into the source directory --- ports/pdal/CONTROL | 2 +- ports/pdal/no-source-dir-writes.patch | 49 +++++++++++++++++++++++++++++++++++ ports/pdal/portfile.cmake | 7 +++-- 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 ports/pdal/no-source-dir-writes.patch diff --git a/ports/pdal/CONTROL b/ports/pdal/CONTROL index 3db5c51ac..1065a5c2d 100644 --- a/ports/pdal/CONTROL +++ b/ports/pdal/CONTROL @@ -1,4 +1,4 @@ Source: pdal -Version: 1.7.1-1 +Version: 1.7.1-2 Description: PDAL - Point Data Abstraction Library is a library for manipulating point cloud data. Build-Depends: gdal, geos, jsoncpp, libgeotiff diff --git a/ports/pdal/no-source-dir-writes.patch b/ports/pdal/no-source-dir-writes.patch new file mode 100644 index 000000000..f7ec12f6b --- /dev/null +++ b/ports/pdal/no-source-dir-writes.patch @@ -0,0 +1,49 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dc146d1..9b82544 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -140,7 +140,7 @@ get_git_head_revision(GIT_REFSPEC GIT_SHA1) + + configure_file( + "${PROJECT_SOURCE_DIR}/gitsha.cpp.in" +- "${PROJECT_SOURCE_DIR}/pdal/gitsha.cpp") ++ "${PROJECT_BINARY_DIR}/pdal/gitsha.cpp") + + # needs to come before configuration of pdal_features + if(APPLE) +@@ -201,6 +201,7 @@ file(GLOB BASE_SRCS + ${PDAL_IO_DIR}/*.cpp + ${PDAL_KERNELS_DIR}/*.cpp + ${PDAL_SRC_DIR}/*.cpp ++ ${PROJECT_BINARY_DIR}/pdal/gitsha.cpp + ${PDAL_SRC_DIR}/compression/*.cpp) + file(GLOB_RECURSE PRIVATE_SRCS + ${PDAL_FILTERS_DIR}/private/*.cpp +diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt +index b02aa4a..d60b041 100644 +--- a/apps/CMakeLists.txt ++++ b/apps/CMakeLists.txt +@@ -66,9 +66,9 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pdal.pc + if(UNIX OR APPLE) + # Autoconf compatibility variables to use the same script source. + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.in" +- "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config" @ONLY) ++ "${CMAKE_CURRENT_BINARY_DIR}/pdal-config" @ONLY) + +- file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config" ++ file(COPY "${CMAKE_CURRENT_BINARY_DIR}/pdal-config" + DESTINATION + "${PDAL_OUTPUT_BIN_DIR}/" + FILE_PERMISSIONS +@@ -85,9 +85,9 @@ if(UNIX OR APPLE) + elseif(WIN32) + # Autoconf compatibility variables to use the same script source. + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pdal-config-bat.in" +- "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.bat" @ONLY) ++ "${CMAKE_CURRENT_BINARY_DIR}/pdal-config.bat" @ONLY) + +- file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.bat" ++ file(COPY "${CMAKE_CURRENT_BINARY_DIR}/pdal-config.bat" + DESTINATION + "${PDAL_OUTPUT_BIN_DIR}/" + FILE_PERMISSIONS diff --git a/ports/pdal/portfile.cmake b/ports/pdal/portfile.cmake index f9b413218..cbcb97ced 100644 --- a/ports/pdal/portfile.cmake +++ b/ports/pdal/portfile.cmake @@ -14,11 +14,14 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/PDAL-${PDAL_VERSION_STR}-src + SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CURRENT_PORT_DIR}/0001-win32_compiler_options.cmake.patch + ${CMAKE_CURRENT_LIST_DIR}/0001-win32_compiler_options.cmake.patch + ${CMAKE_CURRENT_LIST_DIR}/no-source-dir-writes.patch ) +file(REMOVE "${SOURCE_PATH}/pdal/gitsha.cpp") + # Deploy custom CMake modules to enforce expected dependencies look-up foreach(_module IN ITEMS FindGDAL FindGEOS FindGeoTIFF) file(REMOVE "${SOURCE_PATH}/cmake/modules/${_module}.cmake") -- cgit v1.2.3 From 7ad1fcc376024b442baa67db6c1f2d10932a657b Mon Sep 17 00:00:00 2001 From: Ryan Cheung Date: Fri, 18 May 2018 23:15:52 +0800 Subject: Package sdl2pp (#3430) * Fix mpg123 build in macOS and Linux, fix sdl2-mixer find mpg123 libarry * Add package sdl2pp * [mpg123] Use Windows logic in Windows Desktop * [sdl2-mixer] Bump package version * [sdl2pp] Use patch instead of replacing CMakeLists.txt. Use vcpkg_from_github() --- ports/mpg123/CONTROL | 4 +- ports/mpg123/portfile.cmake | 153 +++++++++++++++++++++++++++---------- ports/sdl2-mixer/CMakeLists.txt | 6 +- ports/sdl2-mixer/CONTROL | 2 +- ports/sdl2pp/CONTROL | 4 + ports/sdl2pp/find-debug-libs.patch | 54 +++++++++++++ ports/sdl2pp/portfile.cmake | 28 +++++++ 7 files changed, 205 insertions(+), 46 deletions(-) create mode 100644 ports/sdl2pp/CONTROL create mode 100644 ports/sdl2pp/find-debug-libs.patch create mode 100644 ports/sdl2pp/portfile.cmake diff --git a/ports/mpg123/CONTROL b/ports/mpg123/CONTROL index 488ca7a90..ca4f01835 100644 --- a/ports/mpg123/CONTROL +++ b/ports/mpg123/CONTROL @@ -1,3 +1,3 @@ Source: mpg123 -Version: 1.25.8-4 -Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). \ No newline at end of file +Version: 1.25.8-5 +Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). diff --git a/ports/mpg123/portfile.cmake b/ports/mpg123/portfile.cmake index 891542f00..ff7645390 100644 --- a/ports/mpg123/portfile.cmake +++ b/ports/mpg123/portfile.cmake @@ -29,55 +29,128 @@ vcpkg_find_acquire_program(YASM) get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - "${CURRENT_PORT_DIR}/0001-fix-crt-linking.patch" - "${CURRENT_PORT_DIR}/0002-fix-x86-build.patch") - -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj - RELEASE_CONFIGURATION Release_x86${MPG123_CONFIGURATION_SUFFIX} - DEBUG_CONFIGURATION Debug_x86${MPG123_CONFIGURATION_SUFFIX} -) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CURRENT_PORT_DIR}/0001-fix-crt-linking.patch" + "${CURRENT_PORT_DIR}/0002-fix-x86-build.patch") -message(STATUS "Installing") -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.dll - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) - file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.dll - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj + RELEASE_CONFIGURATION Release_x86${MPG123_CONFIGURATION_SUFFIX} + DEBUG_CONFIGURATION Debug_x86${MPG123_CONFIGURATION_SUFFIX} ) -else() + + message(STATUS "Installing") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.dll + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.dll + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + else() + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug_x86/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release_x86/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + endif() + file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug_x86/libmpg123.pdb + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release_x86/libmpg123.pdb + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib ) -endif() + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/mpg123.h + ${SOURCE_PATH}/src/libmpg123/fmt123.h + ${SOURCE_PATH}/src/libmpg123/mpg123.h.in + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + file(REMOVE_RECURSE ${SOURCE_PATH}/build/debug) + file(REMOVE_RECURSE ${SOURCE_PATH}/build/release) -file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) -file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) -file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/mpg123.h - ${SOURCE_PATH}/src/libmpg123/fmt123.h - ${SOURCE_PATH}/src/libmpg123/mpg123.h.in - DESTINATION ${CURRENT_PACKAGES_DIR}/include -) + ################ + # Debug build + ################ + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND "${SOURCE_PATH}/configure" --prefix=${SOURCE_PATH}/build/debug --enable-debug=yes --enable-static=yes --disable-dependency-tracking --with-default-audio=coreaudio --with-module-suffix=.so + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done.") + + message(STATUS "Installing ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND make -j install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Installing ${TARGET_TRIPLET}-dbg done.") + + ################ + # Release build + ################ + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make distclean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + vcpkg_execute_required_process( + COMMAND "${SOURCE_PATH}/configure" --prefix=${SOURCE_PATH}/build/release --enable-static=yes --disable-dependency-tracking --with-default-audio=coreaudio --with-module-suffix=.so + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done.") + + message(STATUS "Installing ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make -j install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + message(STATUS "Installing ${TARGET_TRIPLET}-rel done.") + + file( + INSTALL + "${SOURCE_PATH}/build/debug/include/fmt123.h" + "${SOURCE_PATH}/build/debug/include/mpg123.h" + "${SOURCE_PATH}/build/debug/include/out123.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include + ) + + file( + INSTALL + "${SOURCE_PATH}/build/debug/lib/libmpg123.a" + "${SOURCE_PATH}/build/debug/lib/libout123.a" + DESTINATION + ${CURRENT_INSTALLED_DIR}/debug/lib + ) + + file( + INSTALL + "${SOURCE_PATH}/build/release/lib/libmpg123.a" + "${SOURCE_PATH}/build/release/lib/libout123.a" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib + ) +endif() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpg123 RENAME copyright) diff --git a/ports/sdl2-mixer/CMakeLists.txt b/ports/sdl2-mixer/CMakeLists.txt index 1df35c44a..6992521b1 100644 --- a/ports/sdl2-mixer/CMakeLists.txt +++ b/ports/sdl2-mixer/CMakeLists.txt @@ -7,14 +7,14 @@ set(SDL_MIXER_INCLUDES ${SDL_INCLUDE_DIR}) set(SDL_MIXER_LIBRARIES ${SDL_LIBRARY}) # builtin formats -set(SDL_MIXER_DEFINES +set(SDL_MIXER_DEFINES MUSIC_WAV MUSIC_MID_NATIVE) # MP3 support if(SDL_MIXER_ENABLE_MP3) find_path(MPG123_INCLUDE_DIR mpg123.h) - find_library(MPG123_LIBRARY libmpg123) + find_library(MPG123_LIBRARY NAMES libmpg123 mpg123) list(APPEND SDL_MIXER_INCLUDES ${MPG123_INCLUDE_DIR}) list(APPEND SDL_MIXER_LIBRARIES ${MPG123_LIBRARY}) list(APPEND SDL_MIXER_DEFINES MUSIC_MP3_MPG123) @@ -47,7 +47,7 @@ if(SDL_MIXER_ENABLE_OGGVORBIS) list(APPEND SDL_MIXER_DEFINES MUSIC_OGG) endif() -add_library(SDL2_mixer +add_library(SDL2_mixer effect_position.c effect_stereoreverse.c effects_internal.c diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL index e66081fc7..7f953a2f9 100644 --- a/ports/sdl2-mixer/CONTROL +++ b/ports/sdl2-mixer/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-mixer -Version: 2.0.2-2 +Version: 2.0.2-4 Description: Multi-channel audio mixer library for SDL. Build-Depends: sdl2, libflac, mpg123, libmodplug, libvorbis diff --git a/ports/sdl2pp/CONTROL b/ports/sdl2pp/CONTROL new file mode 100644 index 000000000..19fecb092 --- /dev/null +++ b/ports/sdl2pp/CONTROL @@ -0,0 +1,4 @@ +Source: sdl2pp +Version: 0.16.0-1 +Description: C++11 bindings/wrapper for SDL2 https://sdl2pp.amdmi3.ru +Build-Depends: sdl2, sdl2-mixer, sdl2-image, sdl2-ttf diff --git a/ports/sdl2pp/find-debug-libs.patch b/ports/sdl2pp/find-debug-libs.patch new file mode 100644 index 000000000..282324345 --- /dev/null +++ b/ports/sdl2pp/find-debug-libs.patch @@ -0,0 +1,54 @@ +diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake +index 8b2addb..4def5f3 100644 +--- a/cmake/FindSDL2.cmake ++++ b/cmake/FindSDL2.cmake +@@ -8,8 +8,8 @@ + + FIND_PATH(SDL2_INCLUDE_DIR NAMES SDL.h PATH_SUFFIXES SDL2) + +-FIND_LIBRARY(SDL2_LIBRARY NAMES SDL2) +-FIND_LIBRARY(SDL2MAIN_LIBRARY NAMES SDL2main) ++FIND_LIBRARY(SDL2_LIBRARY NAMES SDL2d SDL2) ++FIND_LIBRARY(SDL2MAIN_LIBRARY NAMES SDL2maind SDL2main) + + INCLUDE(FindPackageHandleStandardArgs) + +diff --git a/cmake/FindSDL2_image.cmake b/cmake/FindSDL2_image.cmake +index 88adb3f..d6e829d 100644 +--- a/cmake/FindSDL2_image.cmake ++++ b/cmake/FindSDL2_image.cmake +@@ -8,7 +8,7 @@ + + FIND_PATH(SDL2_IMAGE_INCLUDE_DIR NAMES SDL_image.h PATH_SUFFIXES SDL2) + +-FIND_LIBRARY(SDL2_IMAGE_LIBRARY NAMES SDL2_image) ++FIND_LIBRARY(SDL2_IMAGE_LIBRARY NAMES SDL2_imaged SDL2_image) + + INCLUDE(FindPackageHandleStandardArgs) + +diff --git a/cmake/FindSDL2_mixer.cmake b/cmake/FindSDL2_mixer.cmake +index ef5748b..c2dbbde 100644 +--- a/cmake/FindSDL2_mixer.cmake ++++ b/cmake/FindSDL2_mixer.cmake +@@ -8,7 +8,7 @@ + + FIND_PATH(SDL2_MIXER_INCLUDE_DIR NAMES SDL_mixer.h PATH_SUFFIXES SDL2) + +-FIND_LIBRARY(SDL2_MIXER_LIBRARY NAMES SDL2_mixer) ++FIND_LIBRARY(SDL2_MIXER_LIBRARY NAMES SDL2_mixerd SDL2_mixer) + + INCLUDE(FindPackageHandleStandardArgs) + +diff --git a/cmake/FindSDL2_ttf.cmake b/cmake/FindSDL2_ttf.cmake +index b480d55..9fb65b9 100644 +--- a/cmake/FindSDL2_ttf.cmake ++++ b/cmake/FindSDL2_ttf.cmake +@@ -8,7 +8,7 @@ + + FIND_PATH(SDL2_TTF_INCLUDE_DIR NAMES SDL_ttf.h PATH_SUFFIXES SDL2) + +-FIND_LIBRARY(SDL2_TTF_LIBRARY NAMES SDL2_ttf) ++FIND_LIBRARY(SDL2_TTF_LIBRARY NAMES SDL2_ttfd SDL2_ttf) + + INCLUDE(FindPackageHandleStandardArgs) + diff --git a/ports/sdl2pp/portfile.cmake b/ports/sdl2pp/portfile.cmake new file mode 100644 index 000000000..7fbaf9c69 --- /dev/null +++ b/ports/sdl2pp/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libSDL2pp/libSDL2pp + REF 0.16.0 + SHA512 36603a0b1c3ba9294fffa5368357866e5689ceed9743352ff52c096d8b0070cc3f8708a5e837c10c871b410b6bda3ed7e8e3b95cb9afc136d91afb035cde6361 + HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/find-debug-libs.patch" +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL2PP_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSDL2PP_WITH_EXAMPLES=OFF + -DSDL2PP_WITH_TESTS=OFF + -DSDL2PP_STATIC=${SDL2PP_STATIC} +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2pp RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -- cgit v1.2.3 From b68da8a9dc122533d51db9661e9c9ec2fad86794 Mon Sep 17 00:00:00 2001 From: Alexandro Sanchez Date: Fri, 18 May 2018 19:10:16 +0200 Subject: Add keystone port (#3273) * Add keystone port * [keystone] Small portfile simplifications --- ports/keystone/CONTROL | 3 +++ ports/keystone/portfile.cmake | 51 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 ports/keystone/CONTROL create mode 100644 ports/keystone/portfile.cmake diff --git a/ports/keystone/CONTROL b/ports/keystone/CONTROL new file mode 100644 index 000000000..70443a202 --- /dev/null +++ b/ports/keystone/CONTROL @@ -0,0 +1,3 @@ +Source: keystone +Version: 0.9.1 +Description: Lightweight multi-platform, multi-architecture assembler framework diff --git a/ports/keystone/portfile.cmake b/ports/keystone/portfile.cmake new file mode 100644 index 000000000..6f740aeda --- /dev/null +++ b/ports/keystone/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO keystone-engine/keystone + REF 0.9.1 + SHA512 3bd9c3793d5862a0a8628b52da381625e62445f661dbd5ed715723e7d9db01ce3f9586e5ca0a5cc71e8ceb6c912050f5c28e3ccd540e72c8abcfd2f0d1bbae17 + HEAD_REF master +) + +vcpkg_find_acquire_program(PYTHON2) + +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} + -DPYTHON_EXECUTABLE=${PYTHON2} + + # Add support for only a subset of architectures + #-DLLVM_TARGETS_TO_BUILD="AArch64;X86" +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(EXES) + file(REMOVE ${EXES}) +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + # Move DLLs + file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${DLLS}) + file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DLLS}) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/keystone + RENAME copyright +) -- cgit v1.2.3 From a90d78293b21f27ab184a35fb61d3f3732764b36 Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Fri, 18 May 2018 20:57:31 +0300 Subject: [libevent] Fix build on Linux (#3426) --- ports/libevent/portfile.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake index 6a1755c3e..251624e3f 100644 --- a/ports/libevent/portfile.cmake +++ b/ports/libevent/portfile.cmake @@ -21,6 +21,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DEVENT_INSTALL_CMAKE_DIR:PATH=share/libevent -DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_REGRESS=ON @@ -31,7 +32,7 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent) -- cgit v1.2.3 From aad8cbb041ff9d306273ff136f5b3ecd2821b929 Mon Sep 17 00:00:00 2001 From: Nicolai Grodzitski Date: Fri, 18 May 2018 21:03:15 +0300 Subject: Add json_dto library. (#3467) * Prepare port for json_dto. * Add new line at the end of file. * Add json-dto to vcpkg. --- ports/json-dto/CONTROL | 4 ++++ ports/json-dto/portfile.cmake | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 ports/json-dto/CONTROL create mode 100644 ports/json-dto/portfile.cmake diff --git a/ports/json-dto/CONTROL b/ports/json-dto/CONTROL new file mode 100644 index 000000000..2f8c57b00 --- /dev/null +++ b/ports/json-dto/CONTROL @@ -0,0 +1,4 @@ +Source: json-dto +Version: 0.2.5 +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 new file mode 100644 index 000000000..037ce7f96 --- /dev/null +++ b/ports/json-dto/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +set(JSON_DTO_VERSION 0.2.5) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/json_dto-${JSON_DTO_VERSION}-vcpkg) + +vcpkg_download_distfile(ARCHIVE + URLS "https://bitbucket.org/sobjectizerteam/json_dto-0.2/downloads/json_dto-${JSON_DTO_VERSION}-vcpkg.zip" + FILENAME "json_dto-${JSON_DTO_VERSION}-vcpkg.zip" + SHA512 cc21f2abc2799cb9f1c95ae3ae3512869e33d7d0b79c3e05e71d6f0a4376dcf948d89a4d71fe4266efa9d84c19c8a4b8ca2bc8d3d8c217df9ba4e6b87e50c33e +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/dev + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DJSON_DTO_INSTALL=ON + -DJSON_DTO_TEST=OFF + -DJSON_DTO_SAMPLE=OFF + -DJSON_DTO_INSTALL_SAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/json-dto") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/json-dto) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/json-dto/LICENSE ${CURRENT_PACKAGES_DIR}/share/json-dto/copyright) -- cgit v1.2.3 From b31cfb8b87d7548c10b2b04b7298c753b0af1521 Mon Sep 17 00:00:00 2001 From: Sztergbaum Roman Date: Fri, 18 May 2018 21:46:34 +0200 Subject: fix compilation error on clang 6.0/APPLE (#3520) * fix compilation error on clang 6.0/APPLE * Update system.cpp --- toolsrc/src/vcpkg/base/system.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 4da4548af..73a92f2da 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -40,8 +40,9 @@ namespace vcpkg::System if (bytes == 0) std::abort(); return fs::path(buf, buf + bytes); #elif defined(__APPLE__) - uint32_t size = 1024 * 32; - char buf[size] = {}; + static constexpr const uint32_t buff_size = 1024 * 32; + uint32_t size = buff_size; + char buf[buff_size] = {}; bool result = _NSGetExecutablePath(buf, &size); Checks::check_exit(VCPKG_LINE_INFO, result != -1, "Could not determine current executable path."); std::unique_ptr canonicalPath(realpath(buf, NULL)); -- cgit v1.2.3 From cf649980bc9cfff3d28b7bb452bd33fbc158d55c Mon Sep 17 00:00:00 2001 From: test Date: Sat, 19 May 2018 13:50:40 +0800 Subject: libgo update to v2.8 --- ports/libgo/CONTROL | 3 ++- ports/libgo/portfile.cmake | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ports/libgo/CONTROL b/ports/libgo/CONTROL index 5764d77fb..51673711c 100644 --- a/ports/libgo/CONTROL +++ b/ports/libgo/CONTROL @@ -1,3 +1,4 @@ Source: libgo -Version: 2.7 +Version: 2.8 +Build-Depends: boost-context Description: The best stackful coroutine by c++11. diff --git a/ports/libgo/portfile.cmake b/ports/libgo/portfile.cmake index 6807aabfb..01dabcb81 100644 --- a/ports/libgo/portfile.cmake +++ b/ports/libgo/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO yyzybb537/libgo - REF v2.7 - SHA512 eb83b87cf06464be8fc9632b69c14fd6e0612bedbf5b2e04c0a9c178d554ece85e3673b4e6076d7d8801d308d5975f6347662f2c2c4682cc8583b3096cced574 + REF v2.8 + SHA512 44784de4aec36ea321195c11c99a73de4f6f51285febdf6980e8aaced1fdfc0a34c6b1a8acc8c6b424e747310a1d7fb1604f722084c28ab91f8ebee15667d59b HEAD_REF master PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch ) @@ -31,6 +31,7 @@ vcpkg_configure_cmake( OPTIONS -DDISABLE_ADJUST_COMMAND_LINE_FLAGS=ON -DDISABLE_DYNAMIC_LIB=ON + -DENABLE_BOOST_CONTEXT=ON -DFORCE_UNIX_TARGETS=ON -DDISABLE_SYSTEMWIDE=ON ) -- cgit v1.2.3 From d463ea43509f7fdfc6928d40687476b9dc4fa4c4 Mon Sep 17 00:00:00 2001 From: jasjuang Date: Fri, 18 May 2018 23:34:40 -0700 Subject: [dlib] update to 19.11 --- ports/dlib/CONTROL | 2 +- ports/dlib/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index c4d5fe905..8ad3c2470 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,5 +1,5 @@ Source: dlib -Version: 19.10-1 +Version: 19.11 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3, openblas, clapack Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index da77c9374..919662691 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO davisking/dlib - REF v19.10 - SHA512 88c5b41c12219e6166c6621b654b3869ca4a2af777a8fa55429b833b90b048e3e74ea7ad752d7440809b8171bbd38090cb24a29770391fc3a9d53f9a5fba3341 + REF v19.11 + SHA512 d0219a4dc7355e2b9f62098093abd99cd6ddef080b25269acc2e14a402a7b7dafc9a5448a6ff97548089c78f81e2068b404de2be0449f1696d9e40db6acd8046 HEAD_REF master ) -- cgit v1.2.3 From 438af21f07c57364e0fc2535fff525eb444f003b Mon Sep 17 00:00:00 2001 From: Mike Howard Date: Sat, 19 May 2018 21:12:48 -0400 Subject: osgearth port (#3257) * created port for osgearth * [osgearth] Slight simplification. Block DLL linking against static CRT --- ports/osgearth/CONTROL | 4 +++ ports/osgearth/portfile.cmake | 64 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 ports/osgearth/CONTROL create mode 100644 ports/osgearth/portfile.cmake diff --git a/ports/osgearth/CONTROL b/ports/osgearth/CONTROL new file mode 100644 index 000000000..34c5bad24 --- /dev/null +++ b/ports/osgearth/CONTROL @@ -0,0 +1,4 @@ +Source: osgearth +Version: 2.9 +Description: osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping. +Build-Depends: osg diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake new file mode 100644 index 000000000..501c38d08 --- /dev/null +++ b/ports/osgearth/portfile.cmake @@ -0,0 +1,64 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building will not support load data through plugins.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL static) + message(FATAL_ERROR "osgearth does not support static CRT linkage") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gwaldron/osgearth + REF d06e47995620674900d96eb694ff4866a29a9d4f + SHA512 d4b790dc2be4b6ffcd3ab5b4c1062bb56dd4503511ea3f4033a2546ce553dbd45535bfb70ba646416acebf67eba2e5d2740a05477387acad87956bf99fc4038a + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +#Release +set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/osgearth) +set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/osgPlugins-3.5.6) + +file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PATH}) +file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PLUGIN_PATH}) + +file(GLOB OSGEARTH_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB OSGDB_PLUGINS ${CURRENT_PACKAGES_DIR}/bin/osgdb*.dll) + +file(COPY ${OSGEARTH_TOOLS} DESTINATION ${OSGEARTH_TOOL_PATH}) +file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH}) + +file(REMOVE_RECURSE ${OSGEARTH_TOOLS}) +file(REMOVE_RECURSE ${OSGDB_PLUGINS}) + +#Debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/osgearth) +set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/osgPlugins-3.5.6) + +file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PATH}) +file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) + +file(GLOB OSGEARTH_DEBUG_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(GLOB OSGDB_DEBUG_PLUGINS ${CURRENT_PACKAGES_DIR}/debug/bin/osgdb*.dll) + +file(COPY ${OSGEARTH_DEBUG_TOOLS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PATH}) +file(COPY ${OSGDB_DEBUG_PLUGINS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) + +file(REMOVE_RECURSE ${OSGEARTH_DEBUG_TOOLS}) +file(REMOVE_RECURSE ${OSGDB_DEBUG_PLUGINS}) + + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/osgearth) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/osgearth/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/osgearth/copyright) \ No newline at end of file -- cgit v1.2.3 From 658f1caaab56e7559eca17653bd9ca87a900f136 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 19 May 2018 17:27:30 -0700 Subject: [vcpkg_get_windows_sdk] Don't call powershell. Deduce from env --- scripts/cmake/vcpkg_get_windows_sdk.cmake | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake index a8aad64a9..e7d72a125 100644 --- a/scripts/cmake/vcpkg_get_windows_sdk.cmake +++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake @@ -1,16 +1,6 @@ # Returns Windows SDK number via out variable "ret" function(vcpkg_get_windows_sdk ret) - execute_process( - COMMAND powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& {& '${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1'}" 2>&1 - INPUT_FILE NUL - OUTPUT_VARIABLE WINDOWS_SDK - RESULT_VARIABLE error_code) - - if (error_code) - message(FATAL_ERROR "Could not find Windows SDK") - endif() - - # Remove trailing newline and non-numeric characters - string(REGEX REPLACE "[^0-9.]" "" WINDOWS_SDK "${WINDOWS_SDK}") + set(WINDOWS_SDK $ENV{WindowsSDKVersion}) + string(REPLACE "\\" "" WINDOWS_SDK "${WINDOWS_SDK}") set(${ret} ${WINDOWS_SDK} PARENT_SCOPE) endfunction() \ No newline at end of file -- cgit v1.2.3 From 9e4196d49524d41959e84f27b4080a0ec2cb37e6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 19 May 2018 17:50:51 -0700 Subject: Merge getWindowsSDK into bootstrap.ps1 --- scripts/bootstrap.ps1 | 119 ++++++++++++++++++++++++++++++++++++++++++- scripts/getWindowsSDK.ps1 | 126 ---------------------------------------------- toolsrc/vcpkg.sln | 1 - 3 files changed, 118 insertions(+), 128 deletions(-) delete mode 100644 scripts/getWindowsSDK.ps1 diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index ed9491e2d..970fa0488 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -76,11 +76,128 @@ function findAnyMSBuildWithCppPlatformToolset([string]$withVSPath) throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed." } +function getWindowsSDK( [Parameter(Mandatory=$False)][switch]$DisableWin10SDK = $False, + [Parameter(Mandatory=$False)][switch]$DisableWin81SDK = $False) +{ + if ($DisableWin10SDK -and $DisableWin81SDK) + { + throw "Both Win10SDK and Win81SDK were disabled." + } + + Write-Verbose "Finding WinSDK" + + $validInstances = New-Object System.Collections.ArrayList + + # Windows 10 SDK + function CheckWindows10SDK($path) + { + if ($path -eq $null) + { + return + } + + $folder = (Join-Path $path "Include") + if (!(Test-Path $folder)) + { + Write-Verbose "$folder - Not Found" + return + } + + Write-Verbose "$folder - Found" + $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) + [array]::Reverse($win10sdkVersions) # Newest SDK first + + foreach ($win10sdkV in $win10sdkVersions) + { + $windowsheader = "$folder\$win10sdkV\um\windows.h" + if (!(Test-Path $windowsheader)) + { + Write-Verbose "$windowsheader - Not Found" + continue + } + Write-Verbose "$windowsheader - Found" + + $ddkheader = "$folder\$win10sdkV\shared\sdkddkver.h" + if (!(Test-Path $ddkheader)) + { + Write-Verbose "$ddkheader - Not Found" + continue + } + + Write-Verbose "$ddkheader - Found" + $win10sdkVersionString = $win10sdkV.ToString() + Write-Verbose "Found $win10sdkVersionString" + $validInstances.Add($win10sdkVersionString) > $null + } + } + + Write-Verbose "`n" + Write-Verbose "Looking for Windows 10 SDK" + $regkey10 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue + $regkey10Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue + if (vcpkgHasProperty -object $regkey10 "KitsRoot10") { CheckWindows10SDK($regkey10.KitsRoot10) } + if (vcpkgHasProperty -object $regkey10Wow6432 "KitsRoot10") { CheckWindows10SDK($regkey10Wow6432.KitsRoot10) } + CheckWindows10SDK("$env:ProgramFiles\Windows Kits\10") + CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") + + # Windows 8.1 SDK + function CheckWindows81SDK($path) + { + if ($path -eq $null) + { + return + } + + $folder = "$path\Include" + if (!(Test-Path $folder)) + { + Write-Verbose "$folder - Not Found" + return + } + + Write-Verbose "$folder - Found" + $win81sdkVersionString = "8.1" + Write-Verbose "Found $win81sdkVersionString" + $validInstances.Add($win81sdkVersionString) > $null + } + + Write-Verbose "`n" + Write-Verbose "Looking for Windows 8.1 SDK" + $regkey81 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue + $regkey81Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue + if (vcpkgHasProperty -object $regkey81 "KitsRoot81") { CheckWindows81SDK($regkey81.KitsRoot81) } + if (vcpkgHasProperty -object $regkey81Wow6432 "KitsRoot81") { CheckWindows81SDK($regkey81Wow6432.KitsRoot81) } + CheckWindows81SDK("$env:ProgramFiles\Windows Kits\8.1") + CheckWindows81SDK("${env:ProgramFiles(x86)}\Windows Kits\8.1") + + Write-Verbose "`n`n`n" + Write-Verbose "The following Windows SDKs were found:" + foreach ($instance in $validInstances) + { + Write-Verbose $instance + } + + # Selecting + foreach ($instance in $validInstances) + { + if (!$DisableWin10SDK -and $instance -match "10.") + { + return $instance + } + + if (!$DisableWin81SDK -and $instance -match "8.1") + { + return $instance + } + } + + throw "Could not detect a Windows SDK / TargetPlatformVersion" +} $msbuildExeWithPlatformToolset = findAnyMSBuildWithCppPlatformToolset $withVSPath $msbuildExe = $msbuildExeWithPlatformToolset[0] $platformToolset = $msbuildExeWithPlatformToolset[1] -$windowsSDK = & $scriptsDir\getWindowsSDK.ps1 +$windowsSDK = getWindowsSDK $arguments = ( "`"/p:VCPKG_VERSION=-$gitHash`"", diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 deleted file mode 100644 index d5e2f59a2..000000000 --- a/scripts/getWindowsSDK.ps1 +++ /dev/null @@ -1,126 +0,0 @@ -[CmdletBinding()] -param( - [Parameter(Mandatory=$False)] - [switch]$DisableWin10SDK = $False, - - [Parameter(Mandatory=$False)] - [switch]$DisableWin81SDK = $False -) - -Set-StrictMode -Version Latest -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" - -if ($DisableWin10SDK -and $DisableWin81SDK) -{ - throw "Both Win10SDK and Win81SDK were disabled." -} - -Write-Verbose "Executing $($MyInvocation.MyCommand.Name)" - -$validInstances = New-Object System.Collections.ArrayList - -# Windows 10 SDK -function CheckWindows10SDK($path) -{ - if ($path -eq $null) - { - return - } - - $folder = (Join-Path $path "Include") - if (!(Test-Path $folder)) - { - Write-Verbose "$folder - Not Found" - return - } - - Write-Verbose "$folder - Found" - $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) - [array]::Reverse($win10sdkVersions) # Newest SDK first - - foreach ($win10sdkV in $win10sdkVersions) - { - $windowsheader = "$folder\$win10sdkV\um\windows.h" - if (!(Test-Path $windowsheader)) - { - Write-Verbose "$windowsheader - Not Found" - continue - } - Write-Verbose "$windowsheader - Found" - - $ddkheader = "$folder\$win10sdkV\shared\sdkddkver.h" - if (!(Test-Path $ddkheader)) - { - Write-Verbose "$ddkheader - Not Found" - continue - } - - Write-Verbose "$ddkheader - Found" - $win10sdkVersionString = $win10sdkV.ToString() - Write-Verbose "Found $win10sdkVersionString" - $validInstances.Add($win10sdkVersionString) > $null - } -} - -Write-Verbose "`n" -Write-Verbose "Looking for Windows 10 SDK" -$regkey10 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue -$regkey10Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue -if (vcpkgHasProperty -object $regkey10 "KitsRoot10") { CheckWindows10SDK($regkey10.KitsRoot10) } -if (vcpkgHasProperty -object $regkey10Wow6432 "KitsRoot10") { CheckWindows10SDK($regkey10Wow6432.KitsRoot10) } -CheckWindows10SDK("$env:ProgramFiles\Windows Kits\10") -CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") - -# Windows 8.1 SDK -function CheckWindows81SDK($path) -{ - if ($path -eq $null) - { - return - } - - $folder = "$path\Include" - if (!(Test-Path $folder)) - { - Write-Verbose "$folder - Not Found" - return - } - - Write-Verbose "$folder - Found" - $win81sdkVersionString = "8.1" - Write-Verbose "Found $win81sdkVersionString" - $validInstances.Add($win81sdkVersionString) > $null -} - -Write-Verbose "`n" -Write-Verbose "Looking for Windows 8.1 SDK" -$regkey81 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue -$regkey81Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue -if (vcpkgHasProperty -object $regkey81 "KitsRoot81") { CheckWindows81SDK($regkey81.KitsRoot81) } -if (vcpkgHasProperty -object $regkey81Wow6432 "KitsRoot81") { CheckWindows81SDK($regkey81Wow6432.KitsRoot81) } -CheckWindows81SDK("$env:ProgramFiles\Windows Kits\8.1") -CheckWindows81SDK("${env:ProgramFiles(x86)}\Windows Kits\8.1") - -Write-Verbose "`n`n`n" -Write-Verbose "The following Windows SDKs were found:" -foreach ($instance in $validInstances) -{ - Write-Verbose $instance -} - -# Selecting -foreach ($instance in $validInstances) -{ - if (!$DisableWin10SDK -and $instance -match "10.") - { - return $instance - } - - if (!$DisableWin81SDK -and $instance -match "8.1") - { - return $instance - } -} - -throw "Could not detect a Windows SDK / TargetPlatformVersion" diff --git a/toolsrc/vcpkg.sln b/toolsrc/vcpkg.sln index 792d39906..0ca40c6cd 100644 --- a/toolsrc/vcpkg.sln +++ b/toolsrc/vcpkg.sln @@ -17,7 +17,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F589 ..\scripts\fetchDependency.ps1 = ..\scripts\fetchDependency.ps1 ..\scripts\getVisualStudioInstances.ps1 = ..\scripts\getVisualStudioInstances.ps1 ..\scripts\get_triplet_environment.cmake = ..\scripts\get_triplet_environment.cmake - ..\scripts\getWindowsSDK.ps1 = ..\scripts\getWindowsSDK.ps1 ..\scripts\internalCI.ps1 = ..\scripts\internalCI.ps1 ..\scripts\ports.cmake = ..\scripts\ports.cmake ..\scripts\SHA256Hash.ps1 = ..\scripts\SHA256Hash.ps1 -- cgit v1.2.3 From 555fa8d7cc25f409fea9626383dfc38c5d5db6b4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 19 May 2018 17:54:12 -0700 Subject: Merge getVisualStudioInstances into bootstrap.ps1 --- scripts/bootstrap.ps1 | 72 ++++++++++++++++++++++++++++++++- scripts/getVisualStudioInstances.ps1 | 77 ------------------------------------ toolsrc/vcpkg.sln | 1 - 3 files changed, 71 insertions(+), 79 deletions(-) delete mode 100644 scripts/getVisualStudioInstances.ps1 diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 970fa0488..a2d9103dd 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -26,9 +26,79 @@ if (!(Test-Path $vcpkgSourcesPath)) return } +function getVisualStudioInstances() +{ + $programFiles = getProgramFiles32bit + $results = New-Object System.Collections.ArrayList + $vswhereExe = "$programFiles\Microsoft Visual Studio\Installer\vswhere.exe" + if (Test-Path $vswhereExe) + { + $output = & $vswhereExe -prerelease -legacy -products * -format xml + [xml]$asXml = $output + + foreach ($instance in $asXml.instances.instance) + { + $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash + $installationVersion = $instance.InstallationVersion + + $isPrerelease = -7 + if (vcpkgHasProperty -object $instance -propertyName "isPrerelease") + { + $isPrerelease = $instance.isPrerelease + } + + if ($isPrerelease -eq 0) + { + $releaseType = "PreferenceWeight3::StableRelease" + } + elseif ($isPrerelease -eq 1) + { + $releaseType = "PreferenceWeight2::PreRelease" + } + else + { + $releaseType = "PreferenceWeight1::Legacy" + } + + # Placed like that for easy sorting according to preference + $results.Add("::${releaseType}::${installationVersion}::${installationPath}::") > $null + } + } + else + { + Write-Verbose "Could not locate vswhere at $vswhereExe" + } + + if ("$env:vs140comntools" -ne "") + { + $installationPath = Split-Path -Parent $(Split-Path -Parent "$env:vs140comntools") + $clExe = "$installationPath\VC\bin\cl.exe" + $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + + if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) + { + $results.Add("::PreferenceWeight1::Legacy::14.0::$installationPath::") > $null + } + } + + $installationPath = "$programFiles\Microsoft Visual Studio 14.0" + $clExe = "$installationPath\VC\bin\cl.exe" + $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + + if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) + { + $results.Add("::PreferenceWeight1::Legacy::14.0::$installationPath::") > $null + } + + $results.Sort() + $results.Reverse() + + return $results +} + function findAnyMSBuildWithCppPlatformToolset([string]$withVSPath) { - $VisualStudioInstances = & $scriptsDir\getVisualStudioInstances.ps1 + $VisualStudioInstances = getVisualStudioInstances if ($VisualStudioInstances -eq $null) { throw "Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed." diff --git a/scripts/getVisualStudioInstances.ps1 b/scripts/getVisualStudioInstances.ps1 deleted file mode 100644 index 910d0f98b..000000000 --- a/scripts/getVisualStudioInstances.ps1 +++ /dev/null @@ -1,77 +0,0 @@ -[CmdletBinding()] -param( - -) -Set-StrictMode -Version Latest -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" - -$programFiles = getProgramFiles32bit - -$results = New-Object System.Collections.ArrayList - -$vswhereExe = "$programFiles\Microsoft Visual Studio\Installer\vswhere.exe" - -if (Test-Path $vswhereExe) -{ - $output = & $vswhereExe -prerelease -legacy -products * -format xml - [xml]$asXml = $output - - foreach ($instance in $asXml.instances.instance) - { - $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash - $installationVersion = $instance.InstallationVersion - - $isPrerelease = -7 - if (vcpkgHasProperty -object $instance -propertyName "isPrerelease") - { - $isPrerelease = $instance.isPrerelease - } - - if ($isPrerelease -eq 0) - { - $releaseType = "PreferenceWeight3::StableRelease" - } - elseif ($isPrerelease -eq 1) - { - $releaseType = "PreferenceWeight2::PreRelease" - } - else - { - $releaseType = "PreferenceWeight1::Legacy" - } - - # Placed like that for easy sorting according to preference - $results.Add("::${releaseType}::${installationVersion}::${installationPath}::") > $null - } -} -else -{ - Write-Verbose "Could not locate vswhere at $vswhereExe" -} - -if ("$env:vs140comntools" -ne "") -{ - $installationPath = Split-Path -Parent $(Split-Path -Parent "$env:vs140comntools") - $clExe = "$installationPath\VC\bin\cl.exe" - $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" - - if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) - { - $results.Add("::PreferenceWeight1::Legacy::14.0::$installationPath::") > $null - } -} - -$installationPath = "$programFiles\Microsoft Visual Studio 14.0" -$clExe = "$installationPath\VC\bin\cl.exe" -$vcvarsallbat = "$installationPath\VC\vcvarsall.bat" - -if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) -{ - $results.Add("::PreferenceWeight1::Legacy::14.0::$installationPath::") > $null -} - -$results.Sort() -$results.Reverse() - -return $results diff --git a/toolsrc/vcpkg.sln b/toolsrc/vcpkg.sln index 0ca40c6cd..3d12aafaf 100644 --- a/toolsrc/vcpkg.sln +++ b/toolsrc/vcpkg.sln @@ -15,7 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F589 ProjectSection(SolutionItems) = preProject ..\scripts\bootstrap.ps1 = ..\scripts\bootstrap.ps1 ..\scripts\fetchDependency.ps1 = ..\scripts\fetchDependency.ps1 - ..\scripts\getVisualStudioInstances.ps1 = ..\scripts\getVisualStudioInstances.ps1 ..\scripts\get_triplet_environment.cmake = ..\scripts\get_triplet_environment.cmake ..\scripts\internalCI.ps1 = ..\scripts\internalCI.ps1 ..\scripts\ports.cmake = ..\scripts\ports.cmake -- cgit v1.2.3 From a739df905c129eb13d7060419a78f5a693974b63 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 19 May 2018 17:54:50 -0700 Subject: Merge VcpkgPowershellUtils into bootstrap.ps1 --- scripts/VcpkgPowershellUtils.ps1 | 25 ------------------------- scripts/bootstrap.ps1 | 27 +++++++++++++++++++++++++-- toolsrc/vcpkg.sln | 1 - 3 files changed, 25 insertions(+), 28 deletions(-) delete mode 100644 scripts/VcpkgPowershellUtils.ps1 diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 deleted file mode 100644 index 259df4acb..000000000 --- a/scripts/VcpkgPowershellUtils.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) -{ - if ($object -eq $null) - { - return $false - } - - return [bool]($object.psobject.Properties | Where-Object { $_.Name -eq "$propertyName"}) -} - -function getProgramFiles32bit() -{ - $out = ${env:PROGRAMFILES(X86)} - if ($out -eq $null) - { - $out = ${env:PROGRAMFILES} - } - - if ($out -eq $null) - { - throw "Could not find [Program Files 32-bit]" - } - - return $out -} \ No newline at end of file diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index a2d9103dd..09c138bb3 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -5,10 +5,33 @@ param( ) Set-StrictMode -Version Latest $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" - $vcpkgRootDir = $scriptsDir $withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash +function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) +{ + if ($object -eq $null) + { + return $false + } + + return [bool]($object.psobject.Properties | Where-Object { $_.Name -eq "$propertyName"}) +} + +function getProgramFiles32bit() +{ + $out = ${env:PROGRAMFILES(X86)} + if ($out -eq $null) + { + $out = ${env:PROGRAMFILES} + } + + if ($out -eq $null) + { + throw "Could not find [Program Files 32-bit]" + } + + return $out +} while (!($vcpkgRootDir -eq "") -and !(Test-Path "$vcpkgRootDir\.vcpkg-root")) { diff --git a/toolsrc/vcpkg.sln b/toolsrc/vcpkg.sln index 3d12aafaf..8155e0882 100644 --- a/toolsrc/vcpkg.sln +++ b/toolsrc/vcpkg.sln @@ -19,7 +19,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F589 ..\scripts\internalCI.ps1 = ..\scripts\internalCI.ps1 ..\scripts\ports.cmake = ..\scripts\ports.cmake ..\scripts\SHA256Hash.ps1 = ..\scripts\SHA256Hash.ps1 - ..\scripts\VcpkgPowershellUtils.ps1 = ..\scripts\VcpkgPowershellUtils.ps1 EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cmake", "cmake", "{A0122231-04D5-420B-81CA-7960946E5E65}" -- cgit v1.2.3 From 8549a095a8707c2aa38e9ee1642bef2cf0a90d81 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 19 May 2018 17:55:15 -0700 Subject: Remove stray entries --- scripts/addPoshVcpkgToPowershellProfile.ps1 | 1 - toolsrc/src/vcpkg/export.cpp | 2 -- toolsrc/vcpkg.sln | 2 -- 3 files changed, 5 deletions(-) diff --git a/scripts/addPoshVcpkgToPowershellProfile.ps1 b/scripts/addPoshVcpkgToPowershellProfile.ps1 index 5c13a8d4a..1dd27aacf 100644 --- a/scripts/addPoshVcpkgToPowershellProfile.ps1 +++ b/scripts/addPoshVcpkgToPowershellProfile.ps1 @@ -14,7 +14,6 @@ function findExistingImportModuleDirectives([Parameter(Mandatory=$true)][string] } $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" $profileEntry = "Import-Module '$scriptsDir\posh-vcpkg'" $profilePath = $PROFILE # Implicit powershell variable diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index b13140de2..c444cf3d0 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -226,8 +226,6 @@ namespace vcpkg::Export {fs::path{"scripts"} / "buildsystems" / "msbuild" / "vcpkg.targets"}, {fs::path{"scripts"} / "buildsystems" / "vcpkg.cmake"}, {fs::path{"scripts"} / "cmake" / "vcpkg_get_windows_sdk.cmake"}, - {fs::path{"scripts"} / "getWindowsSDK.ps1"}, - {fs::path{"scripts"} / "VcpkgPowershellUtils.ps1"}, }; for (const fs::path& file : integration_files_relative_to_root) diff --git a/toolsrc/vcpkg.sln b/toolsrc/vcpkg.sln index 8155e0882..9a998e214 100644 --- a/toolsrc/vcpkg.sln +++ b/toolsrc/vcpkg.sln @@ -14,11 +14,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F5893B21-EA71-4432-84D6-5FB0E0461A2A}" ProjectSection(SolutionItems) = preProject ..\scripts\bootstrap.ps1 = ..\scripts\bootstrap.ps1 - ..\scripts\fetchDependency.ps1 = ..\scripts\fetchDependency.ps1 ..\scripts\get_triplet_environment.cmake = ..\scripts\get_triplet_environment.cmake ..\scripts\internalCI.ps1 = ..\scripts\internalCI.ps1 ..\scripts\ports.cmake = ..\scripts\ports.cmake - ..\scripts\SHA256Hash.ps1 = ..\scripts\SHA256Hash.ps1 EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cmake", "cmake", "{A0122231-04D5-420B-81CA-7960946E5E65}" -- cgit v1.2.3 From bc96c069aced70a51a04a5e009f7c7931c488028 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 19 May 2018 18:07:09 -0700 Subject: [bootstrap.ps1] Remove unneeded it was used for communication with vcpkg --- scripts/bootstrap.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 09c138bb3..0427ce2ba 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -7,6 +7,7 @@ Set-StrictMode -Version Latest $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition $vcpkgRootDir = $scriptsDir $withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash + function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) { if ($object -eq $null) @@ -84,7 +85,7 @@ function getVisualStudioInstances() } # Placed like that for easy sorting according to preference - $results.Add("::${releaseType}::${installationVersion}::${installationPath}::") > $null + $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null } } else @@ -100,7 +101,7 @@ function getVisualStudioInstances() if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) { - $results.Add("::PreferenceWeight1::Legacy::14.0::$installationPath::") > $null + $results.Add("PreferenceWeight1::Legacy::14.0::$installationPath") > $null } } @@ -110,7 +111,7 @@ function getVisualStudioInstances() if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) { - $results.Add("::PreferenceWeight1::Legacy::14.0::$installationPath::") > $null + $results.Add("PreferenceWeight1::Legacy::14.0::$installationPath") > $null } $results.Sort() @@ -128,9 +129,8 @@ function findAnyMSBuildWithCppPlatformToolset([string]$withVSPath) } Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstances))" - foreach ($instanceCandidateWithEOL in $VisualStudioInstances) + foreach ($instanceCandidate in $VisualStudioInstances) { - $instanceCandidate = $instanceCandidateWithEOL -replace "::" -replace "::" Write-Verbose "Inspecting: $instanceCandidate" $split = $instanceCandidate -split "::" # $preferenceWeight = $split[0] -- cgit v1.2.3 From f1653a23d5a4a1f4ce8b4d034594526a649de0d1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 19 May 2018 18:08:10 -0700 Subject: Inline variable --- scripts/bootstrap.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 0427ce2ba..43cf96c56 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -41,7 +41,6 @@ while (!($vcpkgRootDir -eq "") -and !(Test-Path "$vcpkgRootDir\.vcpkg-root")) } Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root - Found" -$gitHash = "nohash" $vcpkgSourcesPath = "$vcpkgRootDir\toolsrc" if (!(Test-Path $vcpkgSourcesPath)) @@ -293,7 +292,7 @@ $platformToolset = $msbuildExeWithPlatformToolset[1] $windowsSDK = getWindowsSDK $arguments = ( -"`"/p:VCPKG_VERSION=-$gitHash`"", +"`"/p:VCPKG_VERSION=-nohash`"", "`"/p:DISABLE_METRICS=$disableMetrics`"", "/p:Configuration=Release", "/p:Platform=x86", -- cgit v1.2.3 From 3fc199dc52c4c6152ee83e95474a18bb076549e5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 19 May 2018 18:23:05 -0700 Subject: Remove unused internalCI.ps1 --- scripts/internalCI.ps1 | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 scripts/internalCI.ps1 diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1 deleted file mode 100644 index 9529c3766..000000000 --- a/scripts/internalCI.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -$ErrorActionPreference = "Stop" - -rm TEST-internal-ci.xml -errorAction SilentlyContinue - -New-Item -type directory downloads -errorAction SilentlyContinue | Out-Null -./scripts/bootstrap.ps1 -if (-not $?) { throw $? } - -# Clear out any intermediate files from the previous build -if (Test-Path buildtrees) -{ - Get-ChildItem buildtrees/*/* | ? { $_.Name -ne "src" } | Remove-Item -Recurse -Force -} - -# Purge any outdated packages -./vcpkg remove --outdated --recurse -if (-not $?) { throw $? } - -./vcpkg.exe install azure-storage-cpp cpprestsdk:x64-windows-static cpprestsdk:x86-uwp ` -bond cryptopp zlib expat sdl2 curl sqlite3 libuv protobuf:x64-windows sfml opencv:x64-windows uwebsockets uwebsockets:x64-windows-static ` -opencv:x86-uwp boost:x86-uwp --keep-going "--x-xunit=TEST-internal-ci.xml" --recurse -if (-not $?) { throw $? } -- cgit v1.2.3 From 6ccd43dfa7bedbfe9323e13085a476cca5d616d5 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 19 May 2018 18:24:50 -0700 Subject: Rename ps1 file --- scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 | 52 ----------------------- scripts/bootstrap.ps1 | 2 +- scripts/cleanEnvironmentHelper.ps1 | 52 +++++++++++++++++++++++ 3 files changed, 53 insertions(+), 53 deletions(-) delete mode 100644 scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 create mode 100644 scripts/cleanEnvironmentHelper.ps1 diff --git a/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 b/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 deleted file mode 100644 index 0a133f5f8..000000000 --- a/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 +++ /dev/null @@ -1,52 +0,0 @@ -# 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 -$machineEnvironmentMap = [Environment]::GetEnvironmentVariables('Machine') # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment -$userEnvironmentMap = [Environment]::GetEnvironmentVariables('User') # HKEY_CURRENT_USER\Environment - -# Identify the keySet of environment variable names -$nameSet = ($specialEnvironmentMap.Keys + $machineEnvironmentMap.Keys + $userEnvironmentMap.Keys) | Sort-Object | Select-Object -Unique - -# Any environment variable in the $nameSet should be restored to its original value -foreach ($name in $nameSet) -{ - if ($specialEnvironmentMap.ContainsKey($name)) - { - [Environment]::SetEnvironmentVariable($name, $specialEnvironmentMap[$name], 'Process') - continue; - } - - # PATH needs to be concatenated as it has values in both machine and user environment. Any other values should be set. - if ($name -match 'path') - { - $pathValuePartial = @() - # Machine values before user values - $pathValuePartial += $machineEnvironmentMap[$name] -split ';' - $pathValuePartial += $userEnvironmentMap[$name] -split ';' - $pathValue = $pathValuePartial -join ';' - [Environment]::SetEnvironmentVariable($name, $pathValue, 'Process') - continue; - } - - if ($userEnvironmentMap.ContainsKey($name)) - { - [Environment]::SetEnvironmentVariable($name, $userEnvironmentMap[$name], 'Process') - continue; - } - - if ($machineEnvironmentMap.ContainsKey($name)) - { - [Environment]::SetEnvironmentVariable($name, $machineEnvironmentMap[$name], 'Process') - continue; - } - - throw "Unreachable: Unknown variable $name" -} - -# Any environment variable NOT in the $nameSet should be removed -$processEnvironmentMap = [Environment]::GetEnvironmentVariables('Process') -$variablesForRemoval = $processEnvironmentMap.Keys | Where-Object {$nameSet -notcontains $_} -foreach ($name in $variablesForRemoval) -{ - [Environment]::SetEnvironmentVariable($name, $null, 'Process') -} diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index 43cf96c56..c37ffd57f 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -310,7 +310,7 @@ function vcpkgInvokeCommandClean() Write-Verbose "Clean-Executing: ${executable} ${arguments}" $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition - $cleanEnvScript = "$scriptsDir\VcpkgPowershellUtils-ClearEnvironment.ps1" + $cleanEnvScript = "$scriptsDir\cleanEnvironmentHelper.ps1" $tripleQuotes = "`"`"`"" $argumentsWithEscapedQuotes = $arguments -replace "`"", $tripleQuotes $command = ". $tripleQuotes$cleanEnvScript$tripleQuotes; & $tripleQuotes$executable$tripleQuotes $argumentsWithEscapedQuotes" diff --git a/scripts/cleanEnvironmentHelper.ps1 b/scripts/cleanEnvironmentHelper.ps1 new file mode 100644 index 000000000..0a133f5f8 --- /dev/null +++ b/scripts/cleanEnvironmentHelper.ps1 @@ -0,0 +1,52 @@ +# 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 +$machineEnvironmentMap = [Environment]::GetEnvironmentVariables('Machine') # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment +$userEnvironmentMap = [Environment]::GetEnvironmentVariables('User') # HKEY_CURRENT_USER\Environment + +# Identify the keySet of environment variable names +$nameSet = ($specialEnvironmentMap.Keys + $machineEnvironmentMap.Keys + $userEnvironmentMap.Keys) | Sort-Object | Select-Object -Unique + +# Any environment variable in the $nameSet should be restored to its original value +foreach ($name in $nameSet) +{ + if ($specialEnvironmentMap.ContainsKey($name)) + { + [Environment]::SetEnvironmentVariable($name, $specialEnvironmentMap[$name], 'Process') + continue; + } + + # PATH needs to be concatenated as it has values in both machine and user environment. Any other values should be set. + if ($name -match 'path') + { + $pathValuePartial = @() + # Machine values before user values + $pathValuePartial += $machineEnvironmentMap[$name] -split ';' + $pathValuePartial += $userEnvironmentMap[$name] -split ';' + $pathValue = $pathValuePartial -join ';' + [Environment]::SetEnvironmentVariable($name, $pathValue, 'Process') + continue; + } + + if ($userEnvironmentMap.ContainsKey($name)) + { + [Environment]::SetEnvironmentVariable($name, $userEnvironmentMap[$name], 'Process') + continue; + } + + if ($machineEnvironmentMap.ContainsKey($name)) + { + [Environment]::SetEnvironmentVariable($name, $machineEnvironmentMap[$name], 'Process') + continue; + } + + throw "Unreachable: Unknown variable $name" +} + +# Any environment variable NOT in the $nameSet should be removed +$processEnvironmentMap = [Environment]::GetEnvironmentVariables('Process') +$variablesForRemoval = $processEnvironmentMap.Keys | Where-Object {$nameSet -notcontains $_} +foreach ($name in $variablesForRemoval) +{ + [Environment]::SetEnvironmentVariable($name, $null, 'Process') +} -- cgit v1.2.3 From 285c69b0faa220311f3ccc60febaa2e7c6d87bb1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 19 May 2018 19:01:10 -0700 Subject: [c++] Condense powershell helper code into the remaining single usage `vcpkg integrate powershell` uses it --- toolsrc/include/vcpkg/base/system.h | 19 ------ toolsrc/src/vcpkg/base/system.cpp | 106 ------------------------------- toolsrc/src/vcpkg/commands.integrate.cpp | 42 +++++++++++- 3 files changed, 39 insertions(+), 128 deletions(-) diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index cf9c78868..813d600cd 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -25,15 +25,6 @@ namespace vcpkg::System const fs::path& cmake_script, const std::vector& pass_variables); - struct PowershellParameter - { - PowershellParameter(const CStringView varname, const char* varvalue); - PowershellParameter(const CStringView varname, const std::string& varvalue); - PowershellParameter(const CStringView varname, const fs::path& path); - - std::string s; - }; - struct ExitCodeAndOutput { int exit_code; @@ -47,16 +38,6 @@ namespace vcpkg::System ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line); -#if defined(_WIN32) - void powershell_execute(const std::string& title, - const fs::path& script_path, - const std::vector& parameters = {}); - - std::string powershell_execute_and_capture_output(const std::string& title, - const fs::path& script_path, - const std::vector& parameters = {}); -#endif - enum class Color { success = 10, diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 73a92f2da..1aa12d0a4 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -129,31 +129,6 @@ namespace vcpkg::System R"("%s" %s -P "%s")", cmake_exe.u8string(), cmd_cmake_pass_variables, cmake_script.generic_u8string()); } - PowershellParameter::PowershellParameter(const CStringView varname, const char* varvalue) - : s(Strings::format(R"(-%s '%s')", varname, varvalue)) - { - } - - PowershellParameter::PowershellParameter(const CStringView varname, const std::string& varvalue) - : PowershellParameter(varname, varvalue.c_str()) - { - } - - PowershellParameter::PowershellParameter(const CStringView varname, const fs::path& path) - : PowershellParameter(varname, path.generic_u8string()) - { - } - - static std::string make_powershell_cmd(const fs::path& script_path, - const std::vector& parameters) - { - const std::string args = Strings::join(" ", parameters, [](auto&& v) { return v.s; }); - - // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned - return Strings::format( - R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), args); - } - int cmd_execute_clean(const CStringView cmd_line, const std::unordered_map& extra_env) { auto timer = Chrono::ElapsedTimer::create_started(); @@ -371,87 +346,6 @@ namespace vcpkg::System #endif } -#if defined(_WIN32) - void powershell_execute(const std::string& title, - const fs::path& script_path, - const std::vector& parameters) - { - SetConsoleCP(437); - SetConsoleOutputCP(437); - - const std::string cmd = make_powershell_cmd(script_path, parameters); - const int rc = System::cmd_execute(cmd); - - SetConsoleCP(CP_UTF8); - SetConsoleOutputCP(CP_UTF8); - - if (rc) - { - System::println(Color::error, - "%s\n" - "Could not run:\n" - " '%s'", - title, - script_path.generic_string()); - - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_property("error", "powershell script failed"); - locked_metrics->track_property("title", title); - } - - Checks::exit_with_code(VCPKG_LINE_INFO, rc); - } - } -#endif - -#if defined(_WIN32) - std::string powershell_execute_and_capture_output(const std::string& title, - const fs::path& script_path, - const std::vector& parameters) - { - SetConsoleCP(437); - SetConsoleOutputCP(437); - - const std::string cmd = make_powershell_cmd(script_path, parameters); - auto rc = System::cmd_execute_and_capture_output(cmd); - - SetConsoleCP(CP_UTF8); - SetConsoleOutputCP(CP_UTF8); - - if (rc.exit_code) - { - System::println(Color::error, - "%s\n" - "Could not run:\n" - " '%s'\n" - "Error message was:\n" - " %s", - title, - script_path.generic_string(), - rc.output); - - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_property("error", "powershell script failed"); - locked_metrics->track_property("title", title); - } - - Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); - } - - // Remove newline from all output. - // Powershell returns newlines when it hits the column count of the console. - // For example, this is 80 in cmd on Windows 7. If the expected output is longer than 80 lines, we get - // newlines in-between the data. - // To solve this, we design our interaction with powershell to not depend on newlines, - // and then strip all newlines here. - rc.output = Strings::replace_all(std::move(rc.output), "\n", ""); - - return rc.output; - } -#endif - void println() { putchar('\n'); } void print(const CStringView message) { fputs(message.c_str(), stdout); } diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 8897ea138..82172e363 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include namespace vcpkg::Commands::Integrate @@ -368,6 +369,43 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console } #endif +#if defined(_WIN32) + static void integrate_powershell(const VcpkgPaths& paths) + { + 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 std::string cmd = Strings::format( + R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), ""); + const int rc = System::cmd_execute(cmd); + + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); + + if (rc) + { + System::println(System::Color::error, + "%s\n" + "Could not run:\n" + " '%s'", + TITLE, + script_path.generic_string()); + + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_property("error", "powershell script failed"); + locked_metrics->track_property("title", TITLE); + } + } + + Checks::exit_with_code(VCPKG_LINE_INFO, rc); + } +#endif + #if defined(_WIN32) const char* const INTEGRATE_COMMAND_HELPSTRING = " vcpkg integrate install Make installed packages available user-wide. Requires admin privileges on " @@ -423,9 +461,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console } if (args.command_arguments[0] == Subcommand::POWERSHELL) { - System::powershell_execute("PowerShell Tab-Completion", - paths.scripts / "addPoshVcpkgToPowershellProfile.ps1"); - Checks::exit_success(VCPKG_LINE_INFO); + return integrate_powershell(paths); } #endif -- cgit v1.2.3 From b07568da4100d8be5d54feb1b1ccf65d0a5c0c3f Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 19 May 2018 19:29:31 -0700 Subject: Update CHANGELOG and bump version to v0.0.113 --- CHANGELOG.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++- toolsrc/VERSION.txt | 2 +- 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d6cb3775..7440dcdc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,56 @@ +vcpkg (0.0.113) +-------------- + * Add ports: + - json-dto 0.2.5 + - keystone 0.9.1 + - osgearth 2.9 + - pdal 1.7.1-2 + - sdl2pp 0.16.0-1 + * Update ports: + - args 2018-02-23 -> 2018-05-17 + - aws-sdk-cpp 1.4.40 -> 1.4.52 + - chakracore 1.8.3 -> 1.8.4 + - cimg 2.2.2 -> 2.2.3 + - curl 7_59_0-2 -> 7.60.0 + - directxmesh apr2018 -> may2018 + - directxtex apr2018 -> may2018 + - directxtk apr2018 -> may2018 + - doctest 1.2.8 -> 1.2.9 + - entt 2.4.2-1 -> 2.5.0 + - exiv2 2018-04-25 -> 2018-05-17 + - fdk-aac 2018-03-07 -> 2018-05-17 + - forest 7.0.6 -> 7.0.7 + - gdal 2.2.2-1 -> 2.3.0-1 + - grpc 1.10.1-1 -> 1.10.1-2 + - jsonnet 2018-05-01 -> 2018-05-17 + - libuv 1.20.2 -> 1.20.3-2 + - libwebsockets 2.4.2 -> 3.0.0 + - lodepng 2018-02-25 -> 2018-05-17 + - mpg123 1.25.8-4 -> 1.25.8-5 + - ms-gsl 2018-05-01 -> 2018-05-17 + - mujs 2018-05-01 -> 2018-05-17 + - nuklear 2018-04-25 -> 2018-05-17 + - opus 1.2.1 -> 1.2.1-1 + - parson 2018-04-17 -> 2018-05-17 + - pmdk 1.4-1 -> 1.4-2 + - podofo 0.9.5-1 -> 0.9.5-2 + - re2 2018-05-01 -> 2018-05-17 + - rocksdb 5.12.4 -> 5.13.1 + - rs-core-lib 2018-05-01 -> 2018-05-17 + - sdl2-mixer 2.0.2-2 -> 2.0.2-4 + - thrift 2018-05-01 -> 2018-05-17 + - unicorn 2018-04-25 -> 2018-05-17 + - unicorn-lib 2018-05-01 -> 2018-05-17 + - uwebsockets 0.14.8-1 -> 0.14.8-2 + - wtl 10.0 -> 10.0-1 + - zeromq 2018-05-01 -> 2018-05-17 + * `vcpkg` no longer calls `powershell` from `cmake`. + - This completes the fix for the issue where `vcpkg.exe` would change the console's font when invoking `powershell`. + - `Powershell` is no longer called other than for bootstrap and powershell integration for tab-completion. + +-- vcpkg team SAT, 16 May 2018 19:30:00 -0800 + + vcpkg (0.0.112) -------------- * Add ports: @@ -25,7 +78,7 @@ vcpkg (0.0.112) - unicorn-lib 2018-04-09 -> 2018-05-01 - zeromq 2018-04-25 -> 2018-05-01 * `vcpkg` no longer calls powershell for downloading/extracting and detecting Visual Studio. - - This also fixes an issue where `vcpkg.exe` would change the console's font when calling + - This also fixes an issue where `vcpkg.exe` would change the console's font when invoking `powershell`. -- vcpkg team WED, 16 May 2018 19:00:00 -0800 diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 3bf1a6f6f..6833d4427 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.112" \ No newline at end of file +"0.0.113" \ No newline at end of file -- cgit v1.2.3 From 7932abed8d10b59f6a448c71349667dded004106 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 19 May 2018 19:38:45 -0700 Subject: [ps1] Move variable close to where it is set --- scripts/bootstrap.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index c37ffd57f..149134dff 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -5,7 +5,6 @@ param( ) Set-StrictMode -Version Latest $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -$vcpkgRootDir = $scriptsDir $withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) @@ -34,6 +33,7 @@ function getProgramFiles32bit() return $out } +$vcpkgRootDir = $scriptsDir while (!($vcpkgRootDir -eq "") -and !(Test-Path "$vcpkgRootDir\.vcpkg-root")) { Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root" -- cgit v1.2.3 From ef5686e586f465660d3987a9f1fd4e0b6914821d Mon Sep 17 00:00:00 2001 From: Matt Tyson Date: Fri, 11 May 2018 20:13:06 +1000 Subject: Fix Windows curl/nghttp2 static build When curl is linked with a static nghttp2, NGHTTP2_STATICLIB must be defined. --- ports/curl/0004_nghttp2_staticlib.patch | 14 ++++++++++++++ ports/curl/portfile.cmake | 1 + 2 files changed, 15 insertions(+) create mode 100644 ports/curl/0004_nghttp2_staticlib.patch diff --git a/ports/curl/0004_nghttp2_staticlib.patch b/ports/curl/0004_nghttp2_staticlib.patch new file mode 100644 index 000000000..c5cba9c5f --- /dev/null +++ b/ports/curl/0004_nghttp2_staticlib.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 490cc19..51c0a92 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -388,6 +388,9 @@ if(USE_NGHTTP2) + find_package(NGHTTP2 REQUIRED) + include_directories(${NGHTTP2_INCLUDE_DIRS}) + list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES}) ++ if(CURL_STATICLIB) ++ add_definitions(-DNGHTTP2_STATICLIB) ++ endif() + endif() + + if(NOT CURL_DISABLE_LDAP) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index d2a4bee9f..329ead341 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch ${CMAKE_CURRENT_LIST_DIR}/0002_fix_uwp.patch ${CMAKE_CURRENT_LIST_DIR}/0003_fix_libraries.patch + ${CMAKE_CURRENT_LIST_DIR}/0004_nghttp2_staticlib.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) -- cgit v1.2.3 From 032fa481b1c8655f5ffb1def2219d81db6ab3f8c Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 19 May 2018 19:43:46 -0700 Subject: [curl] Bump version --- ports/curl/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index d1de96015..61456a99b 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7.60.0 +Version: 7.60.0-1 Build-Depends: zlib Description: A library for transferring data with URLs Default-Features: ssl -- cgit v1.2.3 From 37a33b58459736e5e8fd2878ad161ae35a1a68d5 Mon Sep 17 00:00:00 2001 From: Force Charlie Date: Sun, 20 May 2018 21:04:22 +0800 Subject: [wtl] use https url --- ports/wtl/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/wtl/portfile.cmake b/ports/wtl/portfile.cmake index 02121d1c1..6ee21e895 100644 --- a/ports/wtl/portfile.cmake +++ b/ports/wtl/portfile.cmake @@ -1,7 +1,7 @@ #header-only library include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/project/wtl/WTL%2010/WTL%2010.0.7336/WTL10_7336.zip" + URLS "https://downloads.sourceforge.net/project/wtl/WTL%2010/WTL%2010.0.7336/WTL10_7336.zip" FILENAME "WTL10_7336.zip" SHA512 68368be0b35fba97ed63fd684e98c077ab94ea2ce928693da7f1f48e2547486109e045e026218a7c8652aec46930b79572679c0b79afaa75a3dbf98572e4d9b5 ) -- cgit v1.2.3 From 9ecaa1702d48dd14a4470cad6112569e91d5efdb Mon Sep 17 00:00:00 2001 From: jasjuang Date: Sun, 20 May 2018 18:23:23 -0700 Subject: [dlib] update to 19.12 --- ports/dlib/CONTROL | 2 +- ports/dlib/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index 8ad3c2470..bfd8e371f 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,5 +1,5 @@ Source: dlib -Version: 19.11 +Version: 19.12 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3, openblas, clapack Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index 919662691..5889f7fe5 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO davisking/dlib - REF v19.11 - SHA512 d0219a4dc7355e2b9f62098093abd99cd6ddef080b25269acc2e14a402a7b7dafc9a5448a6ff97548089c78f81e2068b404de2be0449f1696d9e40db6acd8046 + REF v19.12 + SHA512 d10f050df116b038045821c3af71f9e6e12cbe2fc328f1361d6a64edc9a80899f50f024cfb07df96a326a99b0925a1f2ca8b186dc3b424e823cfea1efa331acf HEAD_REF master ) -- cgit v1.2.3 From 8c69ff583675a9fdd4a66fafa99089335041c34d Mon Sep 17 00:00:00 2001 From: pravic Date: Mon, 21 May 2018 07:48:43 +0300 Subject: [sciter] Update to 4.1.8.5918 --- ports/sciter/CONTROL | 2 +- ports/sciter/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index cfe94f7ec..9bce21511 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.1.7 +Version: 4.1.8 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 52248998c..55a24a929 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,8 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION a33d27afd10552c1d24b78d2e539097ebf1b1f60) -set(SCITER_SHA 3d819ba0cbfbd3b0c7355e40c3e6d40806f1a281528d6225835ec2340157afc4c7378cae533a0a2824f9bdfa37c8cdd35774b1e1362cfda3f1529b7bcea4d027) +set(SCITER_REVISION e7f7663ad85ec41223c4888e679df72e1d7c4835) +set(SCITER_SHA d76cd7e59d0768fa3ab61c04d1a73c0ea893ad420f672aa974e8038c6e2ca713cae625e3c0ea5d866ee229408bd5707deb5226ee4d7b93a270866c8a79de64ec) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) -- cgit v1.2.3 From 9bb5ec7891643f08993dbfefe5735fe94fcb2379 Mon Sep 17 00:00:00 2001 From: pravic Date: Mon, 21 May 2018 16:00:12 +0300 Subject: [sciter] Support Linux and Darwin targets. --- ports/sciter/portfile.cmake | 49 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 55a24a929..b2f0f8f37 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -21,6 +21,7 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) set(SCITER_ARCH 32) endif() + # check out the `https://github.com/c-smile/sciter-sdk/archive/${SCITER_REVISION}.tar.gz` # hash checksum can be obtained with `curl -L -o tmp.tgz ${URL} && vcpkg hash tmp.tgz` vcpkg_from_github( @@ -39,15 +40,15 @@ vcpkg_apply_patches( # install include directory file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/sciter FILES_MATCHING - PATTERN "sciter-gtk-main.cpp" EXCLUDE - PATTERN "sciter-osx-main.mm" EXCLUDE PATTERN "*.cpp" + PATTERN "*.mm" PATTERN "*.h" PATTERN "*.hpp" ) set(SCITER_SHARE ${CURRENT_PACKAGES_DIR}/share/sciter) set(SCITER_TOOLS ${CURRENT_PACKAGES_DIR}/tools/sciter) +set(TOOL_PERMS FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) # license file(COPY ${SOURCE_PATH}/logfile.htm DESTINATION ${SCITER_SHARE}) @@ -59,16 +60,42 @@ file(COPY ${SOURCE_PATH}/samples DESTINATION ${SCITER_SHARE}) file(COPY ${SOURCE_PATH}/widgets DESTINATION ${SCITER_SHARE}) # tools -file(INSTALL ${SOURCE_PATH}/bin/packfolder.exe DESTINATION ${SCITER_TOOLS}) -file(INSTALL ${SOURCE_PATH}/bin/tiscript.exe DESTINATION ${SCITER_TOOLS}) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux AND VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(SCITER_BIN ${SOURCE_PATH}/bin.gtk/x64) + + file(INSTALL ${SCITER_BIN}/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/usciter DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/inspector DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${SCITER_TOOLS}) + + file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin) + set(SCITER_BIN ${SOURCE_PATH}/bin.osx) + + file(INSTALL ${SCITER_BIN}/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/inspector.app DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/sciter.app DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${SCITER_TOOLS}) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.exe DESTINATION ${SCITER_TOOLS}) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/inspector.exe DESTINATION ${SCITER_TOOLS}) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + set(SCITER_BIN ${SOURCE_PATH}/bin/${SCITER_ARCH}) + + file(INSTALL ${SOURCE_PATH}/bin/packfolder.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SOURCE_PATH}/bin/tiscript.exe DESTINATION ${SCITER_TOOLS}) + + file(INSTALL ${SCITER_BIN}/sciter.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/inspector.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${SCITER_TOOLS}) + + file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${SCITER_BIN}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() message(STATUS "Warning: Sciter requires manual deployment of the correct DLL files.") -- cgit v1.2.3 From 473248862a0eafbfb802fc1d8ad554096795ce06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Mewes?= Date: Tue, 22 May 2018 08:38:05 +0200 Subject: New Package vtk-dicom (#3449) * add CONTROL and portfile.cmake for vtk-dicom standalone package Can make use of the feature 'gdcm' to decompress DICOM files for use with VTK. * fix CAPSLOCK typo -.- * [vtk-dicom] Remove BUILD_SHARED_LIBS because it is automatically provided --- ports/vtk-dicom/CONTROL | 8 ++++++++ ports/vtk-dicom/portfile.cmake | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 ports/vtk-dicom/CONTROL create mode 100644 ports/vtk-dicom/portfile.cmake diff --git a/ports/vtk-dicom/CONTROL b/ports/vtk-dicom/CONTROL new file mode 100644 index 000000000..fdd8e04d3 --- /dev/null +++ b/ports/vtk-dicom/CONTROL @@ -0,0 +1,8 @@ +Source: vtk-dicom +Version: 0.8.8-alpha-1 +Description: DICOM for VTK +Build-Depends: vtk, zlib + +Feature: gdcm +Description: Use gdcm for decompressing DICOM files. +Build-Depends: gdcm2 diff --git a/ports/vtk-dicom/portfile.cmake b/ports/vtk-dicom/portfile.cmake new file mode 100644 index 000000000..e7f5c65aa --- /dev/null +++ b/ports/vtk-dicom/portfile.cmake @@ -0,0 +1,42 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dgobbi/vtk-dicom + REF ca27801fad6356c98ba19e760b9b4b8e9128f60e + SHA512 d4916fa385e6f26da0a5d7eb981497c9121ff4f67b4b03e518aa4974d2b0ef207168e939e5063e705c15f627ace56e39aca5f5891d333924cbc80c9277aa7dd2 + HEAD_REF master +) + +if ("gdcm" IN_LIST FEATURES) + set(USE_GDCM ON ) +else() + set(USE_GDCM OFF ) +endif() + + +if(USE_GDCM) + list(APPEND ADDITIONAL_OPTIONS + -DUSE_GDCM=ON + -DUSE_DCMTK=OFF + ) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_PROGRAMS=OFF + -DBUILD_EXAMPLES=OFF + ${ADDITIONAL_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk-dicom) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/vtk-dicom/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/vtk-dicom/copyright) -- cgit v1.2.3 From c10d9d117ab452f6842949d26468fd2dab7692cd Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 19 May 2018 19:40:08 -0700 Subject: [sfml] Use upstream CMake. Install SFMLConfig.cmake. --- ports/sfml/CMakeLists.txt | 35 ----------------------------------- ports/sfml/CONTROL | 2 +- ports/sfml/portfile.cmake | 20 +++++++++++++++++--- 3 files changed, 18 insertions(+), 39 deletions(-) delete mode 100644 ports/sfml/CMakeLists.txt diff --git a/ports/sfml/CMakeLists.txt b/ports/sfml/CMakeLists.txt deleted file mode 100644 index f6ab26235..000000000 --- a/ports/sfml/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -cmake_minimum_required(VERSION 2.6) -project(SFML) - -include_directories(include) -include_directories(src) - -if(NOT BUILD_SHARED_LIBS) - add_definitions(-DSFML_STATIC) -endif() -add_definitions(-DUNICODE -D_UNICODE) -add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS) - -# import SFML's 'sfml_add_library' macro and find_package utils - -set(VERSION_MAJOR 2) -include(cmake/Config.cmake) -set(SFML_GENERATE_PDB ON) -include(cmake/Macros.cmake) -set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules/) - -add_subdirectory(src/SFML/System) -add_subdirectory(src/SFML/Window) -add_subdirectory(src/SFML/Network) -add_subdirectory(src/SFML/Audio) -add_subdirectory(src/SFML/Graphics) - -if(WIN32) - set(LIB_SUFFIX /manual-link) - add_subdirectory(src/SFML/Main) - unset(LIB_SUFFIX) -endif() - -if(NOT DEFINED SFML_SKIP_HEADERS) - install(DIRECTORY include/ DESTINATION include) -endif() diff --git a/ports/sfml/CONTROL b/ports/sfml/CONTROL index e27af6646..b4b3e968e 100644 --- a/ports/sfml/CONTROL +++ b/ports/sfml/CONTROL @@ -1,4 +1,4 @@ Source: sfml -Version: 2.4.2-3 +Version: 2.5.0 Description: Simple and fast multimedia library Build-Depends: freetype, libflac, libjpeg-turbo, libogg, libvorbis, openal-soft, stb, freeglut (!uwp&&!windows) diff --git a/ports/sfml/portfile.cmake b/ports/sfml/portfile.cmake index e0aa98080..f07a199e6 100644 --- a/ports/sfml/portfile.cmake +++ b/ports/sfml/portfile.cmake @@ -5,10 +5,13 @@ vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH REF 2.5.0 HEAD_REF master SHA512 94306dcbed7d68bb7e226cd91e25950a07bcf393988c4bb79f9de3555c18c78cae4573e911235f712e711a7c02a614bf370df32b8d85240d2f08142327e05076 + PATCHES "${CMAKE_CURRENT_LIST_DIR}/portfile.cmake" ) file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +# Without this, we get error: list sub-command REMOVE_DUPLICATES requires list to be present. +file(MAKE_DIRECTORY ${SOURCE_PATH}/extlibs/libs) +file(WRITE ${SOURCE_PATH}/extlibs/libs/x "") if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message("SFML currently requires the following libraries from the system package manager:\n libudev\n libx11\n libxrandr\n opengl\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxrandr-dev libxi-dev libudev-dev mesa-common-dev") @@ -16,11 +19,15 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS_DEBUG - -DSFML_SKIP_HEADERS=ON + OPTIONS + -DSFML_BUILD_FRAMEWORKS=OFF + -DSFML_USE_SYSTEM_DEPS=ON + -DSFML_MISC_INSTALL_PREFIX=share/sfml + -DSFML_GENERATE_PDB=OFF ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SFML) vcpkg_copy_pdbs() # don't force users to define SFML_STATIC while using static library @@ -34,7 +41,14 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib) + file(GLOB FILES "${CURRENT_PACKAGES_DIR}/share/sfml/SFML*Targets-*.cmake") + foreach(FILE ${FILES}) + file(READ "${FILE}" _contents) + string(REPLACE "/lib/sfml-main" "/lib/manual-link/sfml-main" _contents "${_contents}") + file(WRITE "${FILE}" "${_contents}") + endforeach() endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright) -- cgit v1.2.3 From 78e4d07e84afc0f1ab23179534aa08bf6e194b98 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 22 May 2018 03:37:40 -0700 Subject: [vcpkg] Improve CMake messages to account for case-sensitive filesystems. Improve CMake messages to display shortest targets first (which are hopefully the "public" ones). Also, fix bug in StringLiteral. --- toolsrc/include/vcpkg/base/stringliteral.h | 3 ++- toolsrc/include/vcpkg/base/strings.h | 2 ++ toolsrc/src/vcpkg/base/strings.cpp | 6 +++++ toolsrc/src/vcpkg/commands.cache.cpp | 2 +- toolsrc/src/vcpkg/commands.list.cpp | 2 +- toolsrc/src/vcpkg/install.cpp | 43 +++++++++++++++++++++++------- 6 files changed, 46 insertions(+), 12 deletions(-) diff --git a/toolsrc/include/vcpkg/base/stringliteral.h b/toolsrc/include/vcpkg/base/stringliteral.h index c07f04cec..9970adc2a 100644 --- a/toolsrc/include/vcpkg/base/stringliteral.h +++ b/toolsrc/include/vcpkg/base/stringliteral.h @@ -7,7 +7,8 @@ namespace vcpkg struct StringLiteral { template - constexpr StringLiteral(const char (&str)[N]) : m_size(N), m_cstr(str) + constexpr StringLiteral(const char (&str)[N]) + : m_size(N - 1) /* -1 here accounts for the null byte at the end*/, m_cstr(str) { } diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index e165c69da..4b39b0a28 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include @@ -53,6 +54,7 @@ namespace vcpkg::Strings std::string ascii_to_uppercase(std::string s); bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern); + bool ends_with(const std::string& s, StringLiteral pattern); template std::string join(const char* delimiter, const Container& v, Transformer transformer) diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index 48dc5ed09..8d43e7af7 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -128,6 +128,12 @@ namespace vcpkg::Strings #endif } + bool ends_with(const std::string& s, StringLiteral pattern) + { + if (s.size() < pattern.size()) return false; + return std::equal(s.end() - pattern.size(), s.end(), pattern.c_str(), pattern.c_str() + pattern.size()); + } + std::string replace_all(std::string&& s, const std::string& search, const std::string& rep) { size_t pos = 0; diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index a9d8ba03c..464f4f9ee 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -61,7 +61,7 @@ namespace vcpkg::Commands::Cache for (const BinaryParagraph& binary_paragraph : binary_paragraphs) { const std::string displayname = binary_paragraph.displayname(); - if (Strings::case_insensitive_ascii_find(displayname, args.command_arguments[0]) == displayname.end()) + if (!Strings::case_insensitive_ascii_contains(displayname, args.command_arguments[0])) { continue; } diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index 1bfbc4247..cadc06ad3 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -76,7 +76,7 @@ namespace vcpkg::Commands::List for (const StatusParagraph* status_paragraph : installed_packages) { const std::string displayname = status_paragraph->package.displayname(); - if (Strings::case_insensitive_ascii_find(displayname, args.command_arguments[0]) == displayname.end()) + if (!Strings::case_insensitive_ascii_contains(displayname, args.command_arguments[0])) { continue; } diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index fc336d6c7..40e696fa0 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -462,14 +462,14 @@ namespace vcpkg::Install auto files = fs.read_lines(paths.listfile_path(bpgh)); if (auto p_lines = files.get()) { + std::map config_files; std::map> library_targets; for (auto&& suffix : *p_lines) { - if (Strings::case_insensitive_ascii_find(suffix, "/share/") != suffix.end() && - suffix.substr(suffix.size() - 6) == ".cmake") + if (Strings::case_insensitive_ascii_contains(suffix, "/share/") && Strings::ends_with(suffix, ".cmake")) { - // File is inside the share folder + // CMake file is inside the share folder auto path = paths.installed / suffix; auto maybe_contents = fs.read_contents(path); auto find_package_name = path.parent_path().filename().u8string(); @@ -485,6 +485,21 @@ namespace vcpkg::Install ++next; } } + + auto filename = fs::u8path(suffix).filename().u8string(); + + if (Strings::ends_with(filename, "Config.cmake")) + { + auto root = filename.substr(0, filename.size() - 12); + if (Strings::case_insensitive_ascii_equals(root, find_package_name)) + config_files[find_package_name] = root; + } + else if (Strings::ends_with(filename, "-config.cmake")) + { + auto root = filename.substr(0, filename.size() - 13); + if (Strings::case_insensitive_ascii_equals(root, find_package_name)) + config_files[find_package_name] = root; + } } } @@ -497,11 +512,23 @@ namespace vcpkg::Install for (auto&& library_target_pair : library_targets) { + auto config_it = config_files.find(library_target_pair.first); + if (config_it != config_files.end()) + System::println(" find_package(%s CONFIG REQUIRED)", config_it->second); + else + System::println(" find_package(%s CONFIG REQUIRED)", library_target_pair.first); + + std::sort(library_target_pair.second.begin(), + library_target_pair.second.end(), + [](const std::string& l, const std::string& r) { + if (l.size() < r.size()) return true; + if (l.size() > r.size()) return false; + return l < r; + }); + if (library_target_pair.second.size() <= 4) { - System::println(" find_package(%s REQUIRED)\n" - " target_link_libraries(main PRIVATE %s)\n", - library_target_pair.first, + System::println(" target_link_libraries(main PRIVATE %s)\n", Strings::join(" ", library_target_pair.second)); } else @@ -509,10 +536,8 @@ namespace vcpkg::Install auto omitted = library_target_pair.second.size() - 4; library_target_pair.second.erase(library_target_pair.second.begin() + 4, library_target_pair.second.end()); - System::println(" find_package(%s REQUIRED)\n" - " # Note: %zd targets were omitted\n" + System::println(" # Note: %zd target(s) were omitted.\n" " target_link_libraries(main PRIVATE %s)\n", - library_target_pair.first, omitted, Strings::join(" ", library_target_pair.second)); } -- cgit v1.2.3 From 00655fa9f1398ab8a80548e16eee18c6ccd22883 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 19 May 2018 18:07:16 -0700 Subject: [soci] Switch to vcpkg_from_github(). Use WITH_Xs to improve robustness --- ports/soci/CONTROL | 1 + ports/soci/portfile.cmake | 56 ++++++++++++++++++++--------------------------- 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/ports/soci/CONTROL b/ports/soci/CONTROL index 1d1708a64..93af03325 100644 --- a/ports/soci/CONTROL +++ b/ports/soci/CONTROL @@ -1,3 +1,4 @@ Source: soci Version: 2016.10.22-1 +Build-Depends: boost-date-time, sqlite3 Description: SOCI database access library diff --git a/ports/soci/portfile.cmake b/ports/soci/portfile.cmake index 0358297c5..4a86818c3 100644 --- a/ports/soci/portfile.cmake +++ b/ports/soci/portfile.cmake @@ -1,27 +1,14 @@ -# 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) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/soci-6eb1a3e9775ab7cdbf0f7f5aa5891792313cd8d9) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/SOCI/soci/archive/6eb1a3e9775ab7cdbf0f7f5aa5891792313cd8d9.zip" - FILENAME "soci-master-2016.10.22.zip" - SHA512 6bb0f7d3442de627089760485d3e663f12873b4871c4b4b4dfac5d380bad014865ac8382f7356e02514e9140f187dea8dcf8d6c25ac9c3e827e9fa69e9ed13b5 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SOCI/soci + REF 6eb1a3e9775ab7cdbf0f7f5aa5891792313cd8d9 + SHA512 0d0127e422934c5ac707184b519b7682cb67d1480ebecf56520d085c9d29381075c1e2f7bfd8f5b7873ce3cc8ce35ba793e06f0c1f8bb506a83949cd27d15015 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(SOCI_STATIC OFF) - set(SOCI_DYNAMIC ON) -elseif(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(SOCI_STATIC ON) - set(SOCI_DYNAMIC OFF) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SOCI_DYNAMIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SOCI_STATIC) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -31,21 +18,26 @@ vcpkg_configure_cmake( -DSOCI_LIBDIR=lib # This is to always have output in the lib folder and not lib64 for 64-bit builds -DSOCI_STATIC=${SOCI_STATIC} -DSOCI_SHARED=${SOCI_DYNAMIC} + + -DWITH_BOOST=ON + -DWITH_SQLITE3=ON + + -DWITH_MYSQL=OFF + -DWITH_ODBC=OFF + -DWITH_ORACLE=OFF + -DWITH_POSTGRESQL=OFF + -DWITH_FIREBIRD=OFF + -DWITH_DB2=OFF ) vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/soci) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SOCI.cmake ${CURRENT_PACKAGES_DIR}/share/soci/SOCIConfig.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SOCI-release.cmake ${CURRENT_PACKAGES_DIR}/share/soci/SOCI-release.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/cmake/SOCI-debug.cmake ${CURRENT_PACKAGES_DIR}/share/soci/SOCI-debug.cmake) -file(READ ${CURRENT_PACKAGES_DIR}/share/soci/SOCIConfig.cmake CONFIG_FILE) -set(pattern "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\n") -string(REPLACE "${pattern}" "${pattern}${pattern}" CONFIG_FILE ${CONFIG_FILE}) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/soci/SOCIConfig.cmake ${CONFIG_FILE}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SOCI.cmake ${CURRENT_PACKAGES_DIR}/cmake/SOCIConfig.cmake) + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/soci) file(RENAME ${CURRENT_PACKAGES_DIR}/share/soci/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/soci/copyright) -- cgit v1.2.3 From b142632afdba938a7fc7386074c5d8446e1d7ab0 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 19 May 2018 18:08:17 -0700 Subject: [soci] Upgrade to 3.2.3 --- ports/soci/CONTROL | 4 ++-- ports/soci/no-define-snprintf.patch | 14 ++++++++++++++ ports/soci/portfile.cmake | 19 +++++++++---------- 3 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 ports/soci/no-define-snprintf.patch diff --git a/ports/soci/CONTROL b/ports/soci/CONTROL index 93af03325..41b3d4190 100644 --- a/ports/soci/CONTROL +++ b/ports/soci/CONTROL @@ -1,4 +1,4 @@ Source: soci -Version: 2016.10.22-1 -Build-Depends: boost-date-time, sqlite3 +Version: 3.2.3-1 +Build-Depends: sqlite3 Description: SOCI database access library diff --git a/ports/soci/no-define-snprintf.patch b/ports/soci/no-define-snprintf.patch new file mode 100644 index 000000000..ab6db0d1a --- /dev/null +++ b/ports/soci/no-define-snprintf.patch @@ -0,0 +1,14 @@ +diff --git a/src/core/soci-platform.h b/src/core/soci-platform.h +index aa5e4b1..2d8c5c7 100644 +--- a/src/core/soci-platform.h ++++ b/src/core/soci-platform.h +@@ -24,7 +24,9 @@ + #endif + + // Define if you have the snprintf variants. ++#if _MSC_VER < 1900 + #define snprintf _snprintf ++#endif + + // Define if you have the strtoll and strtoull variants. + #if _MSC_VER < 1300 diff --git a/ports/soci/portfile.cmake b/ports/soci/portfile.cmake index 4a86818c3..b26355293 100644 --- a/ports/soci/portfile.cmake +++ b/ports/soci/portfile.cmake @@ -2,26 +2,29 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO SOCI/soci - REF 6eb1a3e9775ab7cdbf0f7f5aa5891792313cd8d9 - SHA512 0d0127e422934c5ac707184b519b7682cb67d1480ebecf56520d085c9d29381075c1e2f7bfd8f5b7873ce3cc8ce35ba793e06f0c1f8bb506a83949cd27d15015 + REF 3.2.3 + SHA512 8c597b37efe82c85e6d951f66cb0f818d2c12cb673914bc7b322bc0a9da676e6c02f221c9104fb06d1b4b02fed4e5a4fb872dd3370b9117f248c3b948faf4fb3 HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/no-define-snprintf.patch" ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SOCI_DYNAMIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SOCI_STATIC) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA OPTIONS -DSOCI_TESTS=OFF -DSOCI_CXX_C11=ON - -DSOCI_LIBDIR=lib # This is to always have output in the lib folder and not lib64 for 64-bit builds + -DSOCI_LIBDIR:STRING=lib # This is to always have output in the lib folder and not lib64 for 64-bit builds + -DLIBDIR:STRING=lib -DSOCI_STATIC=${SOCI_STATIC} -DSOCI_SHARED=${SOCI_DYNAMIC} - -DWITH_BOOST=ON -DWITH_SQLITE3=ON + -DWITH_BOOST=OFF -DWITH_MYSQL=OFF -DWITH_ODBC=OFF -DWITH_ORACLE=OFF @@ -32,14 +35,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SOCI.cmake ${CURRENT_PACKAGES_DIR}/cmake/SOCIConfig.cmake) - -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/soci) +file(COPY ${SOURCE_PATH}/src/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/soci) file(RENAME ${CURRENT_PACKAGES_DIR}/share/soci/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/soci/copyright) vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 7971d70e10386bbc2cd7f646f8e99b28cde1b0c7 Mon Sep 17 00:00:00 2001 From: DDoSolitary Date: Tue, 22 May 2018 19:43:24 +0800 Subject: Fix dep to lz4 for libarchive. Fix #3271. --- ports/libarchive/fix-lz4.patch | 18 ++++++++++++++++++ ports/libarchive/portfile.cmake | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 ports/libarchive/fix-lz4.patch diff --git a/ports/libarchive/fix-lz4.patch b/ports/libarchive/fix-lz4.patch new file mode 100644 index 000000000..6a3d974fc --- /dev/null +++ b/ports/libarchive/fix-lz4.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 73bf07b3..76a1d61d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -515,7 +515,10 @@ IF (LZ4_INCLUDE_DIR) + ENDIF (LZ4_INCLUDE_DIR) + + FIND_PATH(LZ4_INCLUDE_DIR lz4.h) +-FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) ++FIND_LIBRARY(LZ4_LIBRARY_DEBUG NAMES lz4d liblz4d) ++FIND_LIBRARY(LZ4_LIBRARY_RELEASE NAMES lz4 liblz4) ++INCLUDE(SelectLibraryConfigurations) ++SELECT_LIBRARY_CONFIGURATIONS(LZ4) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) + IF(LZ4_FOUND) + + \ No newline at end of file diff --git a/ports/libarchive/portfile.cmake b/ports/libarchive/portfile.cmake index a5bed4143..04ce714fb 100644 --- a/ports/libarchive/portfile.cmake +++ b/ports/libarchive/portfile.cmake @@ -15,7 +15,8 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-dependencies.patch) + ${CMAKE_CURRENT_LIST_DIR}/fix-dependencies.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-lz4.patch) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From db7d775a5136d69f4d0fba8db6d290c7840fe23d Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Tue, 22 May 2018 13:52:32 -0400 Subject: [libvorbis] Update to 1.3.6-112d3bd --- ports/libvorbis/CONTROL | 2 +- ports/libvorbis/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/libvorbis/CONTROL b/ports/libvorbis/CONTROL index 20f8c6e29..96b9ed8df 100644 --- a/ports/libvorbis/CONTROL +++ b/ports/libvorbis/CONTROL @@ -1,4 +1,4 @@ Source: libvorbis -Version: 1.3.5-143caf4-3 +Version: 1.3.6-112d3bd Description: Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format. Build-Depends: libogg diff --git a/ports/libvorbis/portfile.cmake b/ports/libvorbis/portfile.cmake index 26eb1dceb..6a862c84b 100644 --- a/ports/libvorbis/portfile.cmake +++ b/ports/libvorbis/portfile.cmake @@ -7,11 +7,11 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/vorbis-143caf4023a90c09a5eb685fdd46fb9b9c36b1ee) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/vorbis-112d3bd0aaacad51305e1464d4b381dabad0e88b) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/xiph/vorbis/archive/143caf4023a90c09a5eb685fdd46fb9b9c36b1ee.zip" - FILENAME "vorbis-143caf4023a90c09a5eb685fdd46fb9b9c36b1ee.zip" - SHA512 9eeb64b1664ba8a1d118cdc5efc0090fe5f542eff33a16f4676fde8e59031fd0f9017857a7c45ca549899cab34efefd81dd54a57fab97f91f776fd9426f4e37a + URLS "https://github.com/xiph/vorbis/archive/112d3bd0aaacad51305e1464d4b381dabad0e88b.zip" + FILENAME "vorbis-112d3bd0aaacad51305e1464d4b381dabad0e88b.zip" + SHA512 94e773a34f3e8d1c8ed0422f0eab345b35f76a96760141af83d69d007ebf076fca2d083a77d36bfa4ea10dfefa03a8fa35201aced963655ab8a524aaa7580b11 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 4105e5526bec59412ce860980d73e8f1ad614e05 Mon Sep 17 00:00:00 2001 From: Sztergbaum Roman Date: Tue, 22 May 2018 22:12:35 +0200 Subject: remove libjpeg of SFML CONTROL file according to https://en.sfml-dev.org/forums/index.php?topic=24009.msg163052#msg163052 libjpeg is no longer a dependancies of sfml : "libjpeg is no longer a dependency of SFML, but since you use the old FindSFML.cmake it still thinks it is." --- ports/sfml/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/sfml/CONTROL b/ports/sfml/CONTROL index b4b3e968e..dbc86b29b 100644 --- a/ports/sfml/CONTROL +++ b/ports/sfml/CONTROL @@ -1,4 +1,4 @@ Source: sfml Version: 2.5.0 Description: Simple and fast multimedia library -Build-Depends: freetype, libflac, libjpeg-turbo, libogg, libvorbis, openal-soft, stb, freeglut (!uwp&&!windows) +Build-Depends: freetype, libflac, libogg, libvorbis, openal-soft, stb, freeglut (!uwp&&!windows) -- cgit v1.2.3 From 2a73e133448c14738271e8b0227c8b2eb4992ea3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 22 May 2018 17:14:30 -0700 Subject: Direct-init instead of copy-init --- toolsrc/src/vcpkg/commands.fetch.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index c88ae9dd0..33c5c1dcc 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -816,7 +816,7 @@ namespace vcpkg::Commands::Fetch paths_examined.push_back(dumpbin_path); if (fs.exists(dumpbin_path)) { - const Toolset v141toolset = Toolset{ + const Toolset v141toolset{ vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}; auto english_language_pack = dumpbin_path.parent_path() / "1033"; @@ -831,12 +831,12 @@ namespace vcpkg::Commands::Fetch if (v140_is_available) { - const Toolset v140toolset = Toolset{vs_instance.root_path, - dumpbin_path, - vcvarsall_bat, - {"-vcvars_ver=14.0"}, - V_140, - supported_architectures}; + const Toolset v140toolset{vs_instance.root_path, + dumpbin_path, + vcvarsall_bat, + {"-vcvars_ver=14.0"}, + V_140, + supported_architectures}; found_toolsets.push_back(v140toolset); } -- cgit v1.2.3 From 7dd5c7abfc0b0ee7de3620ad3739bbffa4018d41 Mon Sep 17 00:00:00 2001 From: Antonio Maiorano Date: Tue, 22 May 2018 23:55:25 -0400 Subject: Fix build of sdl2-net for linux --- ports/sdl2-net/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/sdl2-net/CMakeLists.txt b/ports/sdl2-net/CMakeLists.txt index aea5f005e..5ee86e9bd 100644 --- a/ports/sdl2-net/CMakeLists.txt +++ b/ports/sdl2-net/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.0) project(SDL2_NET C) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") +if (MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") +endif() find_path(SDL_INCLUDE_DIR SDL2/SDL.h) find_library(SDL_LIBRARY NAMES SDL2d SDL2) -- cgit v1.2.3 From 8071f31fd3f8e2b42aba081dcea2e56ae3904cca Mon Sep 17 00:00:00 2001 From: jasjuang Date: Tue, 22 May 2018 22:03:43 -0700 Subject: [glm] update to 0.9.9.0 --- ports/glm/CONTROL | 2 +- ports/glm/portfile.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/glm/CONTROL b/ports/glm/CONTROL index 10a6e5f88..7dbcec7d4 100644 --- a/ports/glm/CONTROL +++ b/ports/glm/CONTROL @@ -1,3 +1,3 @@ Source: glm -Version: 0.9.8.5-1 +Version: 0.9.9.0 Description: OpenGL Mathematics (GLM) https://glm.g-truc.net diff --git a/ports/glm/portfile.cmake b/ports/glm/portfile.cmake index 1fb4fe073..b975cc370 100644 --- a/ports/glm/portfile.cmake +++ b/ports/glm/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO g-truc/glm - REF 0.9.8.5 - SHA512 5a7e84ecc5a54320c74776c133bfdbeaf0d4496a7a7fdf2f4ccf89e66b3665a577a370a662ac97a350a2b1f717ce769cb0826057ebb3b13c9c2fee65f20ac7b4 + REF 0.9.9.0 + SHA512 b7a6996cb98bc334130c33a339275b50ea28d8dfce300f3d14ac52edf0b5c38bf216d318f411e898edef428876c0b2d1f6a6e951f160f31425fe0852ad150421 HEAD_REF master ) @@ -27,5 +27,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Put the license file where vcpkg expects it -file(COPY ${SOURCE_PATH}/copying.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glm/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/glm/copying.txt ${CURRENT_PACKAGES_DIR}/share/glm/copyright) +file(COPY ${SOURCE_PATH}/manual.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/glm/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/glm/manual.md ${CURRENT_PACKAGES_DIR}/share/glm/copyright) -- cgit v1.2.3 From 98898a3b7ce406deca331fa50a3fbca358d157f9 Mon Sep 17 00:00:00 2001 From: DDoSolitary Date: Wed, 23 May 2018 18:29:16 +0800 Subject: [libarchive] Fix indenting. --- ports/libarchive/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libarchive/portfile.cmake b/ports/libarchive/portfile.cmake index 04ce714fb..d361b7da8 100644 --- a/ports/libarchive/portfile.cmake +++ b/ports/libarchive/portfile.cmake @@ -16,7 +16,7 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch ${CMAKE_CURRENT_LIST_DIR}/fix-dependencies.patch - ${CMAKE_CURRENT_LIST_DIR}/fix-lz4.patch) + ${CMAKE_CURRENT_LIST_DIR}/fix-lz4.patch) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} -- cgit v1.2.3 From 4772ed9965df907ea0dc29d92929b1cd4f89a0c9 Mon Sep 17 00:00:00 2001 From: DDoSolitary Date: Wed, 23 May 2018 18:31:43 +0800 Subject: [libarchive] Increase build number. --- ports/libarchive/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libarchive/CONTROL b/ports/libarchive/CONTROL index c17693807..dfcfa66b3 100644 --- a/ports/libarchive/CONTROL +++ b/ports/libarchive/CONTROL @@ -1,4 +1,4 @@ Source: libarchive -Version: 3.3.2-1 +Version: 3.3.2-2 Description: Library for reading and writing streaming archives Build-Depends: zlib, bzip2, libxml2, lz4, liblzma, openssl -- cgit v1.2.3 From 8618d43552632d9e19a97284c9f6f3ebe02cf434 Mon Sep 17 00:00:00 2001 From: Alberto Jaspe Date: Wed, 23 May 2018 14:27:59 +0200 Subject: Added new port for SpaceLand library --- ports/spaceland/CONTROL | 4 ++++ ports/spaceland/portfile.cmake | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 ports/spaceland/CONTROL create mode 100644 ports/spaceland/portfile.cmake diff --git a/ports/spaceland/CONTROL b/ports/spaceland/CONTROL new file mode 100644 index 000000000..2baf34633 --- /dev/null +++ b/ports/spaceland/CONTROL @@ -0,0 +1,4 @@ +Source: spaceland +Version: 7.8.2-0 +Description: Spaceland Lib (sl) is a suite for geometric computation, specifically adapted to OpenGL. +Build-Depends: zlib diff --git a/ports/spaceland/portfile.cmake b/ports/spaceland/portfile.cmake new file mode 100644 index 000000000..d22276d60 --- /dev/null +++ b/ports/spaceland/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(STATUS "WARNING: Dynamic building not supported. Building static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sl-7.8.2-Source) + +vcpkg_download_distfile(ARCHIVE + URLS "http://vic.crs4.it/vic/download/pkgs/sl-7.8.2-Source.tar.gz" + FILENAME "sl-7.8.2-Source.tar.gz" + SHA512 1391dac1474ddb47d0cf0eb7baeb7db68d6356c2116f732dd57b8a050739523282ded0643cc466640f2b22f25dd6bfced00ede4e041b7ff83754a99ae6725d7d +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DSL_TEST=OFF + -DSL_INSTALL_SLFIND_MODULE=OFF + OPTIONS_DEBUG + -DSL_TEST=OFF + -DSL_INSTALL_SLFIND_MODULE=OFF +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle license +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/spaceland) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/spaceland/COPYING ${CURRENT_PACKAGES_DIR}/share/spaceland/license) + +# Handle copyright +file(COPY ${SOURCE_PATH}/copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/spaceland) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/spaceland/copyright.txt ${CURRENT_PACKAGES_DIR}/share/spaceland/copyright) -- cgit v1.2.3 From de8d4a3823f60522b980cefc48bcd27279b6ec28 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 23 May 2018 16:00:29 -0700 Subject: [libgo] Fix patch --- ports/libgo/cmake.patch | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/ports/libgo/cmake.patch b/ports/libgo/cmake.patch index f6fd5fef8..bed9cddaa 100644 --- a/ports/libgo/cmake.patch +++ b/ports/libgo/cmake.patch @@ -1,17 +1,17 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0d291e4..0f6cc38 100644 +index dbbdd7d..29396a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -158,7 +158,7 @@ if (UNIX) +@@ -137,7 +137,7 @@ if (UNIX) set(CMAKE_CXX_FLAGS "-std=c++11 -fPIC -Wall -pthread ${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS_DEBUG "-g -pg ${CMAKE_CXX_FLAGS} -Werror") - set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 ${CMAKE_CXX_FLAGS} -Werror") + set(CMAKE_CXX_FLAGS_DEBUG "-g -pg ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 ${CMAKE_CXX_FLAGS}") -else () +elseif (NOT DISABLE_ADJUST_COMMAND_LINE_FLAGS) if (NOT DISABLE_DYNAMIC_LIB) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") -@@ -180,7 +180,7 @@ set(STATIC_T "libgo_static") +@@ -159,7 +159,7 @@ set(STATIC_T "libgo_static") add_library("${STATIC_T}" STATIC ${CO_SRC_LIST}) set_target_properties("${STATIC_T}" PROPERTIES OUTPUT_NAME "${TARGET}") @@ -20,7 +20,7 @@ index 0d291e4..0f6cc38 100644 add_subdirectory(${PROJECT_SOURCE_DIR}/libgo/main) if (NOT DISABLE_DYNAMIC_LIB) -@@ -201,9 +201,15 @@ if (UNIX) +@@ -180,7 +180,11 @@ if (UNIX) PATTERN "ctx_boost_coroutine" EXCLUDE PATTERN "ctx_ucontext" EXCLUDE PATTERN "*.h") @@ -29,10 +29,6 @@ index 0d291e4..0f6cc38 100644 + else() + install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/windows/ DESTINATION "include/libgo" FILES_MATCHING PATTERN "*.h") + endif() -+ if(NOT DISABLE_SYSTEMWIDE) - file(WRITE ${PROJECT_SOURCE_DIR}/tools/libgo.conf "${CMAKE_INSTALL_PREFIX}/lib") - install(FILES ${PROJECT_SOURCE_DIR}/tools/libgo.conf DESTINATION "/etc/ld.so.conf.d") -+ endif() + #file(WRITE ${PROJECT_SOURCE_DIR}/tools/libgo.conf "${CMAKE_INSTALL_PREFIX}/lib") + #install(FILES ${PROJECT_SOURCE_DIR}/tools/libgo.conf DESTINATION "/etc/ld.so.conf.d") if (DEPEND_BOOST) - install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/ctx_boost_coroutine/ DESTINATION "include/libgo/ctx_boost_coroutine" FILES_MATCHING PATTERN "*.h") - install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/ctx_boost_context/ DESTINATION "include/libgo/ctx_boost_context" FILES_MATCHING PATTERN "*.h") -- cgit v1.2.3 From 1f00e2fc6798a4b9748204f34204797b0684794e Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 23 May 2018 16:45:10 -0700 Subject: [libgo] Bump version --- ports/libgo/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libgo/CONTROL b/ports/libgo/CONTROL index 51673711c..c5c06fd8b 100644 --- a/ports/libgo/CONTROL +++ b/ports/libgo/CONTROL @@ -1,4 +1,4 @@ Source: libgo -Version: 2.8 +Version: 2.8-1 Build-Depends: boost-context Description: The best stackful coroutine by c++11. -- cgit v1.2.3 From db5f96d5b4414941fd4398b6ad879354785200d0 Mon Sep 17 00:00:00 2001 From: Xiang Fan Date: Thu, 24 May 2018 17:45:48 -0700 Subject: Add a new boost-hana-msvc port which allows MSVC 15.7 RTM to build boost hana (certain tests / examples require /Zc:ternary). boost-hana will now redirect to this new port under Windows platform. --- ports/boost-hana-msvc/CONTROL | 5 +++++ ports/boost-hana-msvc/portfile.cmake | 14 ++++++++++++++ ports/boost-hana/CONTROL | 2 +- ports/boost-hana/portfile.cmake | 6 ++++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 ports/boost-hana-msvc/CONTROL create mode 100644 ports/boost-hana-msvc/portfile.cmake diff --git a/ports/boost-hana-msvc/CONTROL b/ports/boost-hana-msvc/CONTROL new file mode 100644 index 000000000..da9d6a3a6 --- /dev/null +++ b/ports/boost-hana-msvc/CONTROL @@ -0,0 +1,5 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-hana-msvc +Version: 1.67.0 +Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers +Description: Boost hana module diff --git a/ports/boost-hana-msvc/portfile.cmake b/ports/boost-hana-msvc/portfile.cmake new file mode 100644 index 000000000..c0e61600a --- /dev/null +++ b/ports/boost-hana-msvc/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiangfan-ms/hana + REF caa985795ab6c4b2c7bcf1458ccbb6ded65c15cb + SHA512 7ed65bda17042c42f7a76d88e66df61155800066119f6b256e20cf04dcd18d46584d3e44ad6555e9a17d9c0bf85fbf173ae6079f5a4a878341f959c855ebee6b + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/ports/boost-hana/CONTROL b/ports/boost-hana/CONTROL index 0cdc62ad6..277954948 100644 --- a/ports/boost-hana/CONTROL +++ b/ports/boost-hana/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-hana Version: 1.67.0 -Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers +Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers, boost-hana-msvc (windows), boost-hana-msvc (uwp) Description: Boost hana module diff --git a/ports/boost-hana/portfile.cmake b/ports/boost-hana/portfile.cmake index 5a48a4e9e..1ce675cf0 100644 --- a/ports/boost-hana/portfile.cmake +++ b/ports/boost-hana/portfile.cmake @@ -2,6 +2,11 @@ include(vcpkg_common_functions) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + message("The current MSVC releases can't compile boost hana yet.") + message("Use a fork from boost 1.67 which has source workarounds instead.") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO boostorg/hana @@ -12,3 +17,4 @@ vcpkg_from_github( include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) +endif() -- cgit v1.2.3 From 67f3be7bf94bcac4e6a68eff746fb96de0a79380 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 24 May 2018 18:25:41 -0700 Subject: Fix #Automatically generated comment. Bump version --- ports/boost-hana-msvc/CONTROL | 3 +-- ports/boost-hana-msvc/portfile.cmake | 2 -- ports/boost-hana/CONTROL | 4 ++-- ports/boost-hana/portfile.cmake | 10 +++++----- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/ports/boost-hana-msvc/CONTROL b/ports/boost-hana-msvc/CONTROL index da9d6a3a6..0d2f178f8 100644 --- a/ports/boost-hana-msvc/CONTROL +++ b/ports/boost-hana-msvc/CONTROL @@ -1,5 +1,4 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-hana-msvc -Version: 1.67.0 +Version: 1.67.0-1 Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers Description: Boost hana module diff --git a/ports/boost-hana-msvc/portfile.cmake b/ports/boost-hana-msvc/portfile.cmake index c0e61600a..c56926499 100644 --- a/ports/boost-hana-msvc/portfile.cmake +++ b/ports/boost-hana-msvc/portfile.cmake @@ -1,5 +1,3 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 - include(vcpkg_common_functions) vcpkg_from_github( diff --git a/ports/boost-hana/CONTROL b/ports/boost-hana/CONTROL index 277954948..a64771061 100644 --- a/ports/boost-hana/CONTROL +++ b/ports/boost-hana/CONTROL @@ -1,5 +1,5 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 but has edits Source: boost-hana -Version: 1.67.0 +Version: 1.67.0-1 Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers, boost-hana-msvc (windows), boost-hana-msvc (uwp) Description: Boost hana module diff --git a/ports/boost-hana/portfile.cmake b/ports/boost-hana/portfile.cmake index 1ce675cf0..ef2bc9bb3 100644 --- a/ports/boost-hana/portfile.cmake +++ b/ports/boost-hana/portfile.cmake @@ -1,11 +1,11 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 but has edits include(vcpkg_common_functions) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) - message("The current MSVC releases can't compile boost hana yet.") - message("Use a fork from boost 1.67 which has source workarounds instead.") - set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + message("The current MSVC releases can't compile boost hana yet.") + message("Use a fork from boost 1.67 which has source workarounds instead.") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) else() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH -- cgit v1.2.3 From 8396510395d07ba43dd530b0cdbbdbbc8dc8593e Mon Sep 17 00:00:00 2001 From: Vincent Tavernier Date: Fri, 25 May 2018 16:52:07 +0200 Subject: [soil] Added port for SOIL This commit adds a new package for SOIL (https://www.lonesock.net/soil.html). Name: SOIL Version: 2008.7.7-1 Description: SOIL, Simple OpenGL Image Loader --- ports/soil/CMakeLists.txt | 50 +++++++++++++++++++++++++++++++++++ ports/soil/CONTROL | 3 +++ ports/soil/LICENSE | 6 +++++ ports/soil/SOILConfig.cmake.in | 13 +++++++++ ports/soil/SOILConfigVersion.cmake.in | 11 ++++++++ ports/soil/portfile.cmake | 29 ++++++++++++++++++++ 6 files changed, 112 insertions(+) create mode 100644 ports/soil/CMakeLists.txt create mode 100644 ports/soil/CONTROL create mode 100644 ports/soil/LICENSE create mode 100644 ports/soil/SOILConfig.cmake.in create mode 100644 ports/soil/SOILConfigVersion.cmake.in create mode 100644 ports/soil/portfile.cmake diff --git a/ports/soil/CMakeLists.txt b/ports/soil/CMakeLists.txt new file mode 100644 index 000000000..5cee52a60 --- /dev/null +++ b/ports/soil/CMakeLists.txt @@ -0,0 +1,50 @@ +cmake_minimum_required(VERSION 3.8) + +project(SOIL C) + +option(INSTALL_HEADERS "Install header files" ON) + +set(INSTALL_CMAKE_DIR share/soil) + +add_library(SOIL STATIC + src/image_helper.c + src/stb_image_aug.c + src/image_DXT.c + src/SOIL.c) + +target_include_directories(SOIL INTERFACE $) + +if(INSTALL_HEADERS) + install(TARGETS SOIL + EXPORT SOILTargets + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + + install(FILES src/SOIL.h + DESTINATION include/SOIL/) + + # Prepare and install package files + set(SOIL_VERSION "2018.7.7") + + export(TARGETS SOIL FILE "${PROJECT_BINARY_DIR}/SOILTargets.cmake") + + export(PACKAGE SOIL) + + # Create the SOILConfig.cmake and SOILConfigVersion files + configure_file(SOILConfig.cmake.in "${PROJECT_BINARY_DIR}/SOILConfig.cmake" @ONLY) + configure_file(SOILConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/SOILConfigVersion.cmake" @ONLY) + + # Install the SOILConfig.cmake and SOILConfigVersion.cmake + install(FILES + "${PROJECT_BINARY_DIR}/SOILConfig.cmake" + "${PROJECT_BINARY_DIR}/SOILConfigVersion.cmake" + DESTINATION "${INSTALL_CMAKE_DIR}") + + # Install the export set for use with the install-tree + install(EXPORT SOILTargets DESTINATION + "${INSTALL_CMAKE_DIR}") +else() + install(TARGETS SOIL + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) +endif() diff --git a/ports/soil/CONTROL b/ports/soil/CONTROL new file mode 100644 index 000000000..412857025 --- /dev/null +++ b/ports/soil/CONTROL @@ -0,0 +1,3 @@ +Source: soil +Version: 2008.07.07-1 +Description: Simple OpenGL Image Library diff --git a/ports/soil/LICENSE b/ports/soil/LICENSE new file mode 100644 index 000000000..22f05fdf9 --- /dev/null +++ b/ports/soil/LICENSE @@ -0,0 +1,6 @@ +https://www.lonesock.net/soil.html + +Simple OpenGL Image Library + +License: +Public Domain diff --git a/ports/soil/SOILConfig.cmake.in b/ports/soil/SOILConfig.cmake.in new file mode 100644 index 000000000..730e8879f --- /dev/null +++ b/ports/soil/SOILConfig.cmake.in @@ -0,0 +1,13 @@ +# - Config file for the SOIL package +# It defines the following variables +# SOIL_INCLUDE_DIRS - include directories for SOIL +# SOIL_LIBRARIES - libraries to link against + +# Load targets +get_filename_component(SOIL_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +include("${SOIL_CMAKE_DIR}/SOILTargets.cmake") + +# Set properties +get_target_property(SOIL_INCLUDE_DIRS SOIL INTERFACE_INCLUDE_DIRECTORIES) +set(SOIL_LIBRARIES SOIL) +mark_as_advanced(SOIL_INCLUDE_DIRS SOIL_LIBRARIES) diff --git a/ports/soil/SOILConfigVersion.cmake.in b/ports/soil/SOILConfigVersion.cmake.in new file mode 100644 index 000000000..1e3e04965 --- /dev/null +++ b/ports/soil/SOILConfigVersion.cmake.in @@ -0,0 +1,11 @@ +set(PACKAGE_VERSION "@SOIL_VERSION@") + +# Check whether the requested PACKAGE_FIND_VERSION is compatible +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/ports/soil/portfile.cmake b/ports/soil/portfile.cmake new file mode 100644 index 000000000..69073e22d --- /dev/null +++ b/ports/soil/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/Simple OpenGL Image Library") +vcpkg_download_distfile(ARCHIVE + URLS "http://www.lonesock.net/files/soil.zip" + FILENAME "soil-2008.07.07.zip" + SHA512 a575a84aa65b7556320779d635561341f5cf156418d0462473e5d1eb082829be3bcb30600b4887af75aeddd3715de16bdb3ca1668ebaa93eea62bacf22b79548 +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/SOILConfig.cmake.in + ${CMAKE_CURRENT_LIST_DIR}/SOILConfigVersion.cmake.in + ${CMAKE_CURRENT_LIST_DIR}/LICENSE + DESTINATION ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/soil RENAME copyright) -- cgit v1.2.3 From f591398ec89f12e64db3fad41b435ab94c860a23 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sat, 26 May 2018 00:29:27 +0900 Subject: [realsense2] Update to v2.11.1 Update realsense2 port to librealsense v2.11.1. --- ports/realsense2/CONTROL | 2 +- ports/realsense2/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index f87152bc6..ffceb5722 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,5 +1,5 @@ Source: realsense2 -Version: 2.10.4 +Version: 2.11.1 Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). Feature: tools diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index 6a02259ba..8c80de5d6 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense - REF v2.10.4 - SHA512 35580cd4ab65b85eb7fcebac3be629960993223437e3c44b0bcc2f7572d85231e822a922b2f5e22480fcc1edb9295ab2c5893794d638c2ab6faf49a9eea57603 + REF v2.11.1 + SHA512 fa7d2e6262f0c90783a937a88aa32d89f4f36e96ead7356bde455f8eabbd09e798ce1736bccb07ecfa2f2d32c43cad2fff7f441d246856869c09ae3e06ad43f1 HEAD_REF development ) -- cgit v1.2.3 From 2ac7527b40b1dbeb7856b9f763362c1e139e2ca9 Mon Sep 17 00:00:00 2001 From: Michael Hofmann Date: Sun, 13 May 2018 22:34:06 +0200 Subject: Add new port: selene (https://github.com/kmhofmann/selene) --- ports/selene/CONTROL | 4 ++++ ports/selene/portfile.cmake | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 ports/selene/CONTROL create mode 100644 ports/selene/portfile.cmake diff --git a/ports/selene/CONTROL b/ports/selene/CONTROL new file mode 100644 index 000000000..6b90431a8 --- /dev/null +++ b/ports/selene/CONTROL @@ -0,0 +1,4 @@ +Source: selene +Version: 0.1.0 +Description: A C++14 image representation, processing and I/O library. +Build-Depends: zlib, libpng, libjpeg-turbo diff --git a/ports/selene/portfile.cmake b/ports/selene/portfile.cmake new file mode 100644 index 000000000..dcc263635 --- /dev/null +++ b/ports/selene/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/selene-0.1.0) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(SELENE_EXPORT_SYMBOLS TRUE) +else() + set(SELENE_EXPORT_SYMBOLS FALSE) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kmhofmann/selene + REF v0.1.0 + SHA512 59b136cc92a2a6e09d5260fa642f3c7405d89f0505adda4693652f866d51464dfe0380e05a0b20e2cb22b091b9d142a2082e8d1c96164d8821ebebd0df78c4ad + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=${SELENE_EXPORT_SYMBOLS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/${PORT}") +vcpkg_copy_pdbs() + +# Include files should not be duplicated into the /debug/include directory. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/selene RENAME copyright) \ No newline at end of file -- cgit v1.2.3